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
11,600
my_caseup_str_utf8mb4
eloqsql/strings/ctype-utf8.c
static size_t my_caseup_str_utf8mb4(CHARSET_INFO *cs, char *src) { my_wc_t wc; int srcres, dstres; char *dst= src, *dst0= src; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(cs->caseup_multiply == 1); while (*src && (srcres= my_mb_wc_utf8mb4_no_range(cs, &wc, (uchar *) src)) > 0) { my_toupper_utf8mb4(uni_plane, &wc); if ((dstres= my_wc_mb_utf8mb4_no_range(cs, wc, (uchar*) dst)) <= 0) break; src+= srcres; dst+= dstres; } *dst= '\0'; return (size_t) (dst - dst0); }
O3
c
my_caseup_str_utf8mb4: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx cmpb $0x0, (%rsi) movq %rsi, %r14 je 0xcc11f movq 0x78(%rdi), %r15 movq %rbx, %r12 movq %rbx, %r14 leaq -0x30(%rbp), %rdi movq %r12, %rsi callq 0xcf463 testl %eax, %eax je 0xcc11f movl %eax, %r13d movq -0x30(%rbp), %rdi cmpq (%r15), %rdi ja 0xcc100 movq 0x8(%r15), %rax movq %rdi, %rcx shrq $0x8, %rcx movq (%rax,%rcx,8), %rax testq %rax, %rax je 0xcc100 movzbl %dil, %ecx leaq (%rcx,%rcx,2), %rcx movl (%rax,%rcx,4), %edi movq %rdi, -0x30(%rbp) movq %r14, %rsi callq 0xcf57f testl %eax, %eax je 0xcc11f movl %r13d, %ecx movl %eax, %eax addq %rax, %r14 cmpb $0x0, (%r12,%rcx) leaq (%r12,%rcx), %r12 jne 0xcc0c1 movb $0x0, (%r14) subq %rbx, %r14 movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_caseup_str_utf8mb4: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi cmp byte ptr [rsi], 0 mov r14, rsi jz short loc_CC11F mov r15, [rdi+78h] mov r12, rbx mov r14, rbx loc_CC0C1: lea rdi, [rbp+var_30] mov rsi, r12 call my_mb_wc_utf8mb4_no_range test eax, eax jz short loc_CC11F mov r13d, eax mov rdi, [rbp+var_30] cmp rdi, [r15] ja short loc_CC100 mov rax, [r15+8] mov rcx, rdi shr rcx, 8 mov rax, [rax+rcx*8] test rax, rax jz short loc_CC100 movzx ecx, dil lea rcx, [rcx+rcx*2] mov edi, [rax+rcx*4] mov [rbp+var_30], rdi loc_CC100: mov rsi, r14 call my_wc_mb_utf8mb4_no_range test eax, eax jz short loc_CC11F mov ecx, r13d mov eax, eax add r14, rax cmp byte ptr [r12+rcx], 0 lea r12, [r12+rcx] jnz short loc_CC0C1 loc_CC11F: mov byte ptr [r14], 0 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_caseup_str_utf8mb4(long long a1, _BYTE *a2) { long long v2; // rax _BYTE *v3; // r14 _QWORD *v4; // r15 _BYTE *v5; // r12 unsigned int v6; // eax unsigned int v7; // r13d long long v8; // rdi long long v9; // rax unsigned int v10; // eax bool v11; // zf _QWORD v13[6]; // [rsp+0h] [rbp-30h] BYREF v13[0] = v2; v3 = a2; if ( *a2 ) { v4 = *(_QWORD **)(a1 + 120); v5 = a2; v3 = a2; do { v6 = my_mb_wc_utf8mb4_no_range(v13, v5); if ( !v6 ) break; v7 = v6; v8 = v13[0]; if ( v13[0] <= *v4 ) { v9 = *(_QWORD *)(v4[1] + 8LL * (v13[0] >> 8)); if ( v9 ) { v8 = *(unsigned int *)(v9 + 12LL * LOBYTE(v13[0])); v13[0] = v8; } } v10 = my_wc_mb_utf8mb4_no_range(v8, v3); if ( !v10 ) break; v3 += v10; v11 = v5[v7] == 0; v5 += v7; } while ( !v11 ); } *v3 = 0; return v3 - a2; }
my_caseup_str_utf8mb4: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI CMP byte ptr [RSI],0x0 MOV R14,RSI JZ 0x001cc11f MOV R15,qword ptr [RDI + 0x78] MOV R12,RBX MOV R14,RBX LAB_001cc0c1: LEA RDI,[RBP + -0x30] MOV RSI,R12 CALL 0x001cf463 TEST EAX,EAX JZ 0x001cc11f MOV R13D,EAX MOV RDI,qword ptr [RBP + -0x30] CMP RDI,qword ptr [R15] JA 0x001cc100 MOV RAX,qword ptr [R15 + 0x8] MOV RCX,RDI SHR RCX,0x8 MOV RAX,qword ptr [RAX + RCX*0x8] TEST RAX,RAX JZ 0x001cc100 MOVZX ECX,DIL LEA RCX,[RCX + RCX*0x2] MOV EDI,dword ptr [RAX + RCX*0x4] MOV qword ptr [RBP + -0x30],RDI LAB_001cc100: MOV RSI,R14 CALL 0x001cf57f TEST EAX,EAX JZ 0x001cc11f MOV ECX,R13D MOV EAX,EAX ADD R14,RAX CMP byte ptr [R12 + RCX*0x1],0x0 LEA R12,[R12 + RCX*0x1] JNZ 0x001cc0c1 LAB_001cc11f: MOV byte ptr [R14],0x0 SUB R14,RBX MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_caseup_str_utf8mb4(long param_1,char *param_2) { char *pcVar1; ulong *puVar2; long lVar3; uint uVar4; uint uVar5; ulong in_RAX; char *pcVar6; char *pcVar7; ulong local_38; pcVar7 = param_2; if (*param_2 != '\0') { puVar2 = *(ulong **)(param_1 + 0x78); pcVar6 = param_2; local_38 = in_RAX; do { uVar4 = my_mb_wc_utf8mb4_no_range(&local_38,pcVar6); if (uVar4 == 0) break; if ((local_38 <= *puVar2) && (lVar3 = *(long *)(puVar2[1] + (local_38 >> 8) * 8), lVar3 != 0)) { local_38 = (ulong)*(uint *)(lVar3 + (local_38 & 0xff) * 0xc); } uVar5 = my_wc_mb_utf8mb4_no_range(local_38,pcVar7); if (uVar5 == 0) break; pcVar7 = pcVar7 + uVar5; pcVar1 = pcVar6 + uVar4; pcVar6 = pcVar6 + uVar4; } while (*pcVar1 != '\0'); } *pcVar7 = '\0'; return (long)pcVar7 - (long)param_2; }
11,601
minja::DictExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
Value do_evaluate(const std::shared_ptr<Context> & context) const override { auto result = Value::object(); for (const auto& [key, value] : elements) { if (!key) throw std::runtime_error("Dict key is null"); if (!value) throw std::runtime_error("Dict value is null"); result.set(key->evaluate(context), value->evaluate(context)); } return result; }
O1
cpp
minja::DictExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb8, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %r13 xorl %ebx, %ebx leaq 0xa8(%rsp), %r12 movq %rbx, (%r12) movl $0x30, %edi callq 0x196d0 movabsq $0x100000001, %rcx # imm = 0x100000001 movq %rcx, 0x8(%rax) leaq 0x8dea7(%rip), %rcx # 0xe3458 addq $0x10, %rcx movq %rcx, (%rax) leaq 0x10(%rax), %rcx xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rax) movq %rbx, 0x20(%rax) movq %rax, 0x8(%r12) movq %rcx, (%r12) movq %r13, (%rsp) movq %r13, %rdi movq %r12, %rsi callq 0x55a66 movq 0x8(%r12), %rdi testq %rdi, %rdi je 0x555ee callq 0x3503e movq 0x20(%r15), %rbx movq 0x28(%r15), %r15 cmpq %r15, %rbx je 0x55754 leaq 0x58(%rsp), %r13 leaq 0x8(%rsp), %rbp cmpq $0x0, (%rbx) je 0x5576a cmpq $0x0, 0x10(%rbx) je 0x55788 movq (%rbx), %rsi movq %r13, %rdi movq %r14, %rdx callq 0x42ac6 movq 0x10(%rbx), %rsi movq %rbp, %rdi movq %r14, %rdx callq 0x42ac6 movq (%rsp), %rdi movq %r13, %rsi movq %rbp, %rdx callq 0x5587e leaq 0x48(%rsp), %r12 movq %r12, %rdi xorl %esi, %esi callq 0x42e48 movq %r12, %rdi callq 0x4fdb4 movq 0x40(%rsp), %rdi testq %rdi, %rdi je 0x55670 callq 0x3503e movq 0x30(%rsp), %rdi testq %rdi, %rdi je 0x5567f callq 0x3503e movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x5568e callq 0x3503e movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x556c4 movq 0x8f8f9(%rip), %rax # 0xe4f98 cmpb $0x0, (%rax) je 0x556af movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x556b9 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x556c4 movq (%rdi), %rax callq *0x18(%rax) leaq 0x98(%rsp), %r12 movq %r12, %rdi xorl %esi, %esi callq 0x42e48 movq %r12, %rdi callq 0x4fdb4 movq 0x90(%rsp), %rdi testq %rdi, %rdi je 0x556f0 callq 0x3503e movq 0x80(%rsp), %rdi testq %rdi, %rdi je 0x55702 callq 0x3503e movq 0x70(%rsp), %rdi testq %rdi, %rdi je 0x55711 callq 0x3503e movq 0x60(%rsp), %rdi testq %rdi, %rdi je 0x55747 movq 0x8f876(%rip), %rax # 0xe4f98 cmpb $0x0, (%rax) je 0x55732 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x5573c movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x55747 movq (%rdi), %rax callq *0x18(%rax) addq $0x20, %rbx cmpq %r15, %rbx jne 0x55609 movq (%rsp), %rax addq $0xb8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x19380 movq %rax, %r15 leaq 0x5d653(%rip), %rsi # 0xb2dd1 movq %rax, %rdi callq 0x19280 jmp 0x557a4 movl $0x10, %edi callq 0x19380 movq %rax, %r15 leaq 0x5d646(%rip), %rsi # 0xb2de2 movq %rax, %rdi callq 0x19280 movq 0x8f845(%rip), %rsi # 0xe4ff0 movq 0x8f7be(%rip), %rdx # 0xe4f70 movq %r15, %rdi callq 0x19bb0 jmp 0x557bc movq %rax, %r14 movq %r15, %rdi callq 0x19520 jmp 0x557ec jmp 0x557e9 movq %rax, %r14 jmp 0x557dd movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x42dbc leaq 0x58(%rsp), %rdi callq 0x42dbc jmp 0x557ec movq %rax, %r14 movq (%rsp), %rdi callq 0x42dbc movq %r14, %rdi callq 0x19c10 nop
_ZNK5minja8DictExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0B8h mov r14, rdx mov r15, rsi mov r13, rdi xor ebx, ebx lea r12, [rsp+0E8h+var_40] mov [r12], rbx mov edi, 30h ; '0'; unsigned __int64 call __Znwm; operator new(ulong) mov rcx, 100000001h mov [rax+8], rcx lea rcx, _ZTVSt23_Sp_counted_ptr_inplaceIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEESaISN_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>,std::allocator<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>>,(__gnu_cxx::_Lock_policy)2> add rcx, 10h mov [rax], rcx lea rcx, [rax+10h] xorps xmm0, xmm0 movups xmmword ptr [rax+10h], xmm0 mov [rax+20h], rbx mov [r12+8], rax mov [r12], rcx mov [rsp+0E8h+var_E8], r13 mov rdi, r13 mov rsi, r12 call _ZN5minja5ValueC2ERKSt10shared_ptrIN8nlohmann16json_abi_v3_11_311ordered_mapINS3_10basic_jsonIS4_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEES0_St4lessISG_ESaISt4pairIKSG_S0_EEEEE; minja::Value::Value(std::shared_ptr<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>> const&) mov rdi, [r12+8] test rdi, rdi jz short loc_555EE call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_555EE: mov rbx, [r15+20h] mov r15, [r15+28h] cmp rbx, r15 jz loc_55754 lea r13, [rsp+0E8h+var_90] lea rbp, [rsp+0E8h+var_E0] loc_55609: cmp qword ptr [rbx], 0 jz loc_5576A cmp qword ptr [rbx+10h], 0 jz loc_55788 mov rsi, [rbx] mov rdi, r13 mov rdx, r14 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov rsi, [rbx+10h] mov rdi, rbp mov rdx, r14 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov rdi, [rsp+0E8h+var_E8]; this mov rsi, r13; minja::Value * mov rdx, rbp; minja::Value * call _ZN5minja5Value3setERKS0_S2_; minja::Value::set(minja::Value const&,minja::Value const&) lea r12, [rsp+0E8h+var_A0] mov rdi, r12 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rsp+0E8h+var_A8] test rdi, rdi jz short loc_55670 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_55670: mov rdi, [rsp+0E8h+var_B8] test rdi, rdi jz short loc_5567F call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5567F: mov rdi, [rsp+0E8h+var_C8] test rdi, rdi jz short loc_5568E call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5568E: mov rdi, [rsp+0E8h+var_D8] test rdi, rdi jz short loc_556C4 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_556AF mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_556B9 loc_556AF: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_556B9: cmp eax, 1 jnz short loc_556C4 mov rax, [rdi] call qword ptr [rax+18h] loc_556C4: lea r12, [rsp+0E8h+var_50] mov rdi, r12 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rsp+0E8h+var_58] test rdi, rdi jz short loc_556F0 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_556F0: mov rdi, [rsp+0E8h+var_68] test rdi, rdi jz short loc_55702 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_55702: mov rdi, [rsp+0E8h+var_78] test rdi, rdi jz short loc_55711 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_55711: mov rdi, [rsp+0E8h+var_88] test rdi, rdi jz short loc_55747 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_55732 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_5573C loc_55732: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_5573C: cmp eax, 1 jnz short loc_55747 mov rax, [rdi] call qword ptr [rax+18h] loc_55747: add rbx, 20h ; ' ' cmp rbx, r15 jnz loc_55609 loc_55754: mov rax, [rsp+0E8h+var_E8] add rsp, 0B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_5576A: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aDictKeyIsNull; "Dict key is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_557A4 loc_55788: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aDictValueIsNul; "Dict value is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_557A4: mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r15; void * call ___cxa_throw jmp short $+2 loc_557BC: mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_557EC jmp short loc_557E9 mov r14, rax jmp short loc_557DD mov r14, rax lea rdi, [rsp+0E8h+var_E0]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_557DD: lea rdi, [rsp+0E8h+var_90]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_557EC loc_557E9: mov r14, rax loc_557EC: mov rdi, [rsp+0E8h+var_E8]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() mov rdi, r14 call __Unwind_Resume
minja::Value * minja::DictExpr::do_evaluate(minja::Value *a1, long long a2) { long long v2; // rax void (****v3)(void); // rbx void (****v4)(void); // r15 long long v5; // rdi signed __int32 v6; // eax long long v7; // rdi signed __int32 v8; // eax std::runtime_error *exception; // r15 _BYTE v12[8]; // [rsp+8h] [rbp-E0h] BYREF long long v13; // [rsp+10h] [rbp-D8h] volatile signed __int32 *v14; // [rsp+20h] [rbp-C8h] volatile signed __int32 *v15; // [rsp+30h] [rbp-B8h] volatile signed __int32 *v16; // [rsp+40h] [rbp-A8h] void *v17[2]; // [rsp+48h] [rbp-A0h] BYREF _BYTE v18[8]; // [rsp+58h] [rbp-90h] BYREF long long v19; // [rsp+60h] [rbp-88h] volatile signed __int32 *v20; // [rsp+70h] [rbp-78h] volatile signed __int32 *v21; // [rsp+80h] [rbp-68h] volatile signed __int32 *v22; // [rsp+90h] [rbp-58h] void *v23[2]; // [rsp+98h] [rbp-50h] BYREF long long v24; // [rsp+A8h] [rbp-40h] BYREF volatile signed __int32 *v25; // [rsp+B0h] [rbp-38h] v2 = operator new(0x30uLL); *(_QWORD *)(v2 + 8) = 0x100000001LL; *(_QWORD *)v2 = &`vtable for'std::_Sp_counted_ptr_inplace<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>>>,std::allocator<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>>>>,(__gnu_cxx::_Lock_policy)2> + 2; *(_OWORD *)(v2 + 16) = 0LL; *(_QWORD *)(v2 + 32) = 0LL; v25 = (volatile signed __int32 *)v2; v24 = v2 + 16; minja::Value::Value(a1, &v24); if ( v25 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v25); v3 = *(void (*****)(void))(a2 + 32); v4 = *(void (*****)(void))(a2 + 40); if ( v3 != v4 ) { while ( *v3 ) { if ( !v3[2] ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Dict value is null"); LABEL_34: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)v18, *v3); minja::Expression::evaluate((long long)v12, v3[2]); minja::Value::set(a1, (const minja::Value *)v18, (const minja::Value *)v12); 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 *)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>::data::~data(v17); if ( v16 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v16); if ( v15 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v15); if ( v14 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14); v5 = v13; if ( v13 ) { if ( _libc_single_threaded ) { v6 = *(_DWORD *)(v13 + 12); *(_DWORD *)(v13 + 12) = v6 - 1; } else { v6 = _InterlockedExchangeAdd((volatile signed __int32 *)(v13 + 12), 0xFFFFFFFF); } if ( v6 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v5 + 24LL))(v5, 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 *)v23); 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(v23); if ( v22 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v22); if ( v21 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v21); if ( v20 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v20); v7 = v19; if ( v19 ) { if ( _libc_single_threaded ) { v8 = *(_DWORD *)(v19 + 12); *(_DWORD *)(v19 + 12) = v8 - 1; } else { v8 = _InterlockedExchangeAdd((volatile signed __int32 *)(v19 + 12), 0xFFFFFFFF); } if ( v8 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v7 + 24LL))(v7, 0LL); } v3 += 4; if ( v3 == v4 ) return a1; } exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Dict key is null"); goto LABEL_34; } return a1; }
do_evaluate: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xb8 MOV R14,RDX MOV R15,RSI MOV R13,RDI XOR EBX,EBX LEA R12,[RSP + 0xa8] MOV qword ptr [R12],RBX MOV EDI,0x30 CALL 0x001196d0 MOV RCX,0x100000001 MOV qword ptr [RAX + 0x8],RCX LEA RCX,[0x1e3458] ADD RCX,0x10 MOV qword ptr [RAX],RCX LEA RCX,[RAX + 0x10] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x10],XMM0 MOV qword ptr [RAX + 0x20],RBX MOV qword ptr [R12 + 0x8],RAX MOV qword ptr [R12],RCX MOV qword ptr [RSP],R13 MOV RDI,R13 MOV RSI,R12 CALL 0x00155a66 MOV RDI,qword ptr [R12 + 0x8] TEST RDI,RDI JZ 0x001555ee CALL 0x0013503e LAB_001555ee: MOV RBX,qword ptr [R15 + 0x20] MOV R15,qword ptr [R15 + 0x28] CMP RBX,R15 JZ 0x00155754 LEA R13,[RSP + 0x58] LEA RBP,[RSP + 0x8] LAB_00155609: CMP qword ptr [RBX],0x0 JZ 0x0015576a CMP qword ptr [RBX + 0x10],0x0 JZ 0x00155788 MOV RSI,qword ptr [RBX] LAB_00155621: MOV RDI,R13 MOV RDX,R14 CALL 0x00142ac6 MOV RSI,qword ptr [RBX + 0x10] LAB_00155630: MOV RDI,RBP MOV RDX,R14 CALL 0x00142ac6 LAB_0015563b: MOV RDI,qword ptr [RSP] MOV RSI,R13 MOV RDX,RBP CALL 0x0015587e LAB_0015564a: LEA R12,[RSP + 0x48] MOV RDI,R12 XOR ESI,ESI CALL 0x00142e48 MOV RDI,R12 CALL 0x0014fdb4 MOV RDI,qword ptr [RSP + 0x40] TEST RDI,RDI JZ 0x00155670 CALL 0x0013503e LAB_00155670: MOV RDI,qword ptr [RSP + 0x30] TEST RDI,RDI JZ 0x0015567f CALL 0x0013503e LAB_0015567f: MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x0015568e CALL 0x0013503e LAB_0015568e: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x001556c4 MOV RAX,qword ptr [0x001e4f98] CMP byte ptr [RAX],0x0 JZ 0x001556af MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001556b9 LAB_001556af: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001556b9: CMP EAX,0x1 JNZ 0x001556c4 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001556c4: LEA R12,[RSP + 0x98] MOV RDI,R12 XOR ESI,ESI CALL 0x00142e48 MOV RDI,R12 CALL 0x0014fdb4 MOV RDI,qword ptr [RSP + 0x90] TEST RDI,RDI JZ 0x001556f0 CALL 0x0013503e LAB_001556f0: MOV RDI,qword ptr [RSP + 0x80] TEST RDI,RDI JZ 0x00155702 CALL 0x0013503e LAB_00155702: MOV RDI,qword ptr [RSP + 0x70] TEST RDI,RDI JZ 0x00155711 CALL 0x0013503e LAB_00155711: MOV RDI,qword ptr [RSP + 0x60] TEST RDI,RDI JZ 0x00155747 MOV RAX,qword ptr [0x001e4f98] CMP byte ptr [RAX],0x0 JZ 0x00155732 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x0015573c LAB_00155732: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_0015573c: CMP EAX,0x1 JNZ 0x00155747 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_00155747: ADD RBX,0x20 CMP RBX,R15 JNZ 0x00155609 LAB_00155754: MOV RAX,qword ptr [RSP] ADD RSP,0xb8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0015576a: MOV EDI,0x10 CALL 0x00119380 MOV R15,RAX LAB_00155777: LEA RSI,[0x1b2dd1] MOV RDI,RAX CALL 0x00119280 LAB_00155786: JMP 0x001557a4 LAB_00155788: MOV EDI,0x10 CALL 0x00119380 MOV R15,RAX LAB_00155795: LEA RSI,[0x1b2de2] MOV RDI,RAX CALL 0x00119280 LAB_001557a4: MOV RSI,qword ptr [0x001e4ff0] MOV RDX,qword ptr [0x001e4f70] MOV RDI,R15 CALL 0x00119bb0
/* minja::DictExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */ DictExpr * __thiscall minja::DictExpr::do_evaluate(DictExpr *this,shared_ptr *param_1) { int *piVar1; long *plVar2; int iVar3; runtime_error *this_00; long *plVar4; Expression local_e0 [8]; long *local_d8; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_c8; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_b8; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_a8; data local_a0 [16]; Expression local_90 [8]; long *local_88; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_78; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_68; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58; data local_50 [16]; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_38; local_40 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0; local_38 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)operator_new(0x30); *(int8 *)(local_38 + 8) = 0x100000001; *(int ***)local_38 = &PTR___Sp_counted_ptr_inplace_001e3468; local_40 = local_38 + 0x10; *(int8 *)(local_38 + 0x10) = 0; *(int8 *)(local_38 + 0x18) = 0; *(int8 *)(local_38 + 0x20) = 0; Value::Value((Value *)this,(shared_ptr *)&local_40); if (local_38 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_38); } plVar4 = *(long **)(param_1 + 0x20); plVar2 = *(long **)(param_1 + 0x28); if (plVar4 != plVar2) { do { if (*plVar4 == 0) { this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00155777 to 00155785 has its CatchHandler @ 001557bc */ std::runtime_error::runtime_error(this_00,"Dict key is null"); LAB_001557a4: /* try { // try from 001557a4 to 001557b9 has its CatchHandler @ 001557e9 */ /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_001e4ff0,PTR__runtime_error_001e4f70); } if (plVar4[2] == 0) { this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00155795 to 001557a3 has its CatchHandler @ 001557ba */ std::runtime_error::runtime_error(this_00,"Dict value is null"); goto LAB_001557a4; } /* try { // try from 00155621 to 0015562b has its CatchHandler @ 001557c9 */ Expression::evaluate(local_90,(shared_ptr *)*plVar4); /* try { // try from 00155630 to 0015563a has its CatchHandler @ 001557cb */ Expression::evaluate(local_e0,(shared_ptr *)plVar4[2]); /* try { // try from 0015563b to 00155649 has its CatchHandler @ 001557d0 */ Value::set((Value *)this,(Value *)local_90,(Value *)local_e0); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_a0,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_a0); if (local_a8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_a8); } if (local_b8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_b8); } if (local_c8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_c8); } if (local_d8 != (long *)0x0) { if (*PTR___libc_single_threaded_001e4f98 == '\0') { LOCK(); piVar1 = (int *)((long)local_d8 + 0xc); iVar3 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar3 = *(int *)((long)local_d8 + 0xc); *(int *)((long)local_d8 + 0xc) = iVar3 + -1; } if (iVar3 == 1) { (**(code **)(*local_d8 + 0x18))(); } } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_50,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_50); if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58); } if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68); } if (local_78 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_78); } if (local_88 != (long *)0x0) { if (*PTR___libc_single_threaded_001e4f98 == '\0') { LOCK(); piVar1 = (int *)((long)local_88 + 0xc); iVar3 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar3 = *(int *)((long)local_88 + 0xc); *(int *)((long)local_88 + 0xc) = iVar3 + -1; } if (iVar3 == 1) { (**(code **)(*local_88 + 0x18))(); } } plVar4 = plVar4 + 4; } while (plVar4 != plVar2); } return this; }
11,602
my_strnxfrm_8bit_bin
eloqsql/strings/ctype-bin.c
static size_t my_strnxfrm_8bit_bin(CHARSET_INFO *cs, uchar * dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags) { set_if_smaller(srclen, dstlen); set_if_smaller(srclen, nweights); if (srclen && dst != src) memcpy(dst, src, srclen); return my_strxfrm_pad_desc_and_reverse(cs, dst, dst + srclen, dst + dstlen, (uint)(nweights - srclen), flags, 0); }
O3
c
my_strnxfrm_8bit_bin: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r9, %r13 movl %ecx, %ebx movq %rdx, %r14 movq %rsi, %r12 movq %rdi, %r15 movl 0x10(%rbp), %r9d cmpq %rdx, %r13 cmovaeq %rdx, %r13 movl %ecx, %eax cmpq %rax, %r13 cmovaeq %rax, %r13 testq %r13, %r13 sete %al cmpq %r8, %rsi sete %cl orb %al, %cl jne 0xb34f2 movq %r12, %rdi movq %r8, %rsi movq %r13, %rdx callq 0x2a0a0 movl 0x10(%rbp), %r9d leaq (%r12,%r13), %rdx addq %r12, %r14 subl %r13d, %ebx movl $0x0, (%rsp) movq %r15, %rdi movq %r12, %rsi movq %r14, %rcx movl %ebx, %r8d callq 0xbb868 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strnxfrm_8bit_bin: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r13, r9 mov ebx, ecx mov r14, rdx mov r12, rsi mov r15, rdi mov r9d, [rbp+arg_0] cmp r13, rdx cmovnb r13, rdx mov eax, ecx cmp r13, rax cmovnb r13, rax test r13, r13 setz al cmp rsi, r8 setz cl or cl, al jnz short loc_B34F2 mov rdi, r12 mov rsi, r8 mov rdx, r13 call _memcpy mov r9d, [rbp+arg_0] loc_B34F2: lea rdx, [r12+r13] add r14, r12 sub ebx, r13d mov [rsp+30h+var_30], 0 mov rdi, r15 mov rsi, r12 mov rcx, r14 mov r8d, ebx call my_strxfrm_pad_desc_and_reverse add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_strnxfrm_8bit_bin( int a1, long long a2, unsigned long long a3, unsigned int a4, long long a5, unsigned long long a6, int a7) { int v9; // r14d int v10; // r9d v9 = a3; v10 = a7; if ( a6 >= a3 ) a6 = a3; if ( a6 >= a4 ) a6 = a4; if ( a6 != 0 && a2 != a5 ) { memcpy(a2, a5, a6); v10 = a7; } return my_strxfrm_pad_desc_and_reverse(a1, a2, (int)a2 + (int)a6, (int)a2 + v9, a4 - (unsigned int)a6, v10, 0); }
my_strnxfrm_8bit_bin: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R13,R9 MOV EBX,ECX MOV R14,RDX MOV R12,RSI MOV R15,RDI MOV R9D,dword ptr [RBP + 0x10] CMP R13,RDX CMOVNC R13,RDX MOV EAX,ECX CMP R13,RAX CMOVNC R13,RAX TEST R13,R13 SETZ AL CMP RSI,R8 SETZ CL OR CL,AL JNZ 0x001b34f2 MOV RDI,R12 MOV RSI,R8 MOV RDX,R13 CALL 0x0012a0a0 MOV R9D,dword ptr [RBP + 0x10] LAB_001b34f2: LEA RDX,[R12 + R13*0x1] ADD R14,R12 SUB EBX,R13D MOV dword ptr [RSP],0x0 MOV RDI,R15 MOV RSI,R12 MOV RCX,R14 MOV R8D,EBX CALL 0x001bb868 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void my_strnxfrm_8bit_bin (int8 param_1,void *param_2,ulong param_3,uint param_4,void *param_5, ulong param_6,int4 param_7) { int8 in_RAX; uint uVar1; uVar1 = (uint)((ulong)in_RAX >> 0x20); if (param_3 <= param_6) { param_6 = param_3; } if (param_4 <= param_6) { param_6 = (ulong)param_4; } if (param_2 != param_5 && param_6 != 0) { memcpy(param_2,param_5,param_6); } my_strxfrm_pad_desc_and_reverse (param_1,param_2,(long)param_2 + param_6,param_3 + (long)param_2,param_4 - (int)param_6, param_7,(ulong)uVar1 << 0x20); return; }
11,603
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 0x5c734 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 0x5c732 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 0x5c73f 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_5C734 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_5C732 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_5C732: jmp short loc_5C73F loc_5C734: mov rax, [rbp+var_10] mov qword ptr [rax], 0FFFDh loc_5C73F: 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 0x0015c734 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 0x0015c732 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_0015c732: JMP 0x0015c73f LAB_0015c734: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],0xfffd LAB_0015c73f: 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; }
11,604
array_append_string_unique
eloqsql/mysys/mf_arr_appstr.c
my_bool array_append_string_unique(const char *str, const char **array, size_t size) { const char **p; /* end points at the terminating NULL element */ const char **end= array + size - 1; DBUG_ASSERT(*end == NULL); for (p= array; *p; ++p) { if (strcmp(*p, str) == 0) break; } if (p >= end) return TRUE; /* Array is full */ DBUG_ASSERT(*p == NULL || strcmp(*p, str) == 0); while (*(p + 1)) { *p= *(p + 1); ++p; } DBUG_ASSERT(p < end); *p= str; return FALSE; /* Success */ }
O3
c
array_append_string_unique: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 leaq (%rsi,%rdx,8), %r15 addq $-0x8, %r15 movq (%rsi), %rdi testq %rdi, %rdi je 0xb138a movq %r14, %rsi callq 0x2a690 testl %eax, %eax je 0xb138a movq 0x8(%rbx), %rdi addq $0x8, %rbx jmp 0xb136f movb $0x1, %al cmpq %r15, %rbx jae 0xb13ac movq 0x8(%rbx), %rax testq %rax, %rax je 0xb13a7 movq %rax, (%rbx) movq 0x10(%rbx), %rax addq $0x8, %rbx jmp 0xb1395 movq %r14, (%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq nop
array_append_string_unique: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rsi mov r14, rdi lea r15, [rsi+rdx*8] add r15, 0FFFFFFFFFFFFFFF8h mov rdi, [rsi] loc_B136F: test rdi, rdi jz short loc_B138A mov rsi, r14 call _strcmp test eax, eax jz short loc_B138A mov rdi, [rbx+8] add rbx, 8 jmp short loc_B136F loc_B138A: mov al, 1 cmp rbx, r15 jnb short loc_B13AC mov rax, [rbx+8] loc_B1395: test rax, rax jz short loc_B13A7 mov [rbx], rax mov rax, [rbx+10h] add rbx, 8 jmp short loc_B1395 loc_B13A7: mov [rbx], r14 xor eax, eax loc_B13AC: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
char array_append_string_unique(long long a1, _QWORD *a2, long long a3) { _QWORD *v3; // rbx unsigned long long v5; // r15 long long v6; // rdi char result; // al long long v8; // rax v3 = a2; v5 = (unsigned long long)&a2[a3 - 1]; v6 = *a2; while ( v6 && (unsigned int)strcmp(v6, a1) ) { v6 = v3[1]; ++v3; } result = 1; if ( (unsigned long long)v3 < v5 ) { v8 = v3[1]; while ( v8 ) { *v3 = v8; v8 = v3[2]; ++v3; } *v3 = a1; return 0; } return result; }
array_append_string_unique: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI LEA R15,[RSI + RDX*0x8] ADD R15,-0x8 MOV RDI,qword ptr [RSI] LAB_001b136f: TEST RDI,RDI JZ 0x001b138a MOV RSI,R14 CALL 0x0012a690 TEST EAX,EAX JZ 0x001b138a MOV RDI,qword ptr [RBX + 0x8] ADD RBX,0x8 JMP 0x001b136f LAB_001b138a: MOV AL,0x1 CMP RBX,R15 JNC 0x001b13ac MOV RAX,qword ptr [RBX + 0x8] LAB_001b1395: TEST RAX,RAX JZ 0x001b13a7 MOV qword ptr [RBX],RAX MOV RAX,qword ptr [RBX + 0x10] ADD RBX,0x8 JMP 0x001b1395 LAB_001b13a7: MOV qword ptr [RBX],R14 XOR EAX,EAX LAB_001b13ac: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int8 array_append_string_unique(char *param_1,long *param_2,long param_3) { long *plVar1; int iVar2; int8 uVar3; long lVar4; char *__s1; long *plVar5; plVar5 = param_2 + param_3 + -1; __s1 = (char *)*param_2; while (__s1 != (char *)0x0) { iVar2 = strcmp(__s1,param_1); if (iVar2 == 0) break; plVar1 = param_2 + 1; param_2 = param_2 + 1; __s1 = (char *)*plVar1; } uVar3 = 1; if (param_2 < plVar5) { lVar4 = param_2[1]; while (lVar4 != 0) { *param_2 = lVar4; plVar5 = param_2 + 2; param_2 = param_2 + 1; lVar4 = *plVar5; } *param_2 = (long)param_1; uVar3 = 0; } return uVar3; }
11,605
uf_space_endspace
eloqsql/storage/maria/ma_packrec.c
static void uf_space_endspace(MARIA_COLUMNDEF *rec, MARIA_BIT_BUFF *bit_buff, uchar *to, uchar *end) { uint spaces; if (get_bit(bit_buff)) bfill(to, (end-to), ' '); else { if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end) { bit_buff->error=1; return; } if (to+spaces != end) decode_bytes(rec,bit_buff,to,end-spaces); bfill(end - spaces, spaces, ' '); } }
O0
c
uf_space_endspace: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x10(%rbp), %rax cmpl $0x0, 0x4(%rax) je 0x4eab7 movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx addl $-0x1, %ecx movl %ecx, 0x4(%rdx) movl $0x1, %edx shll %cl, %edx movl %edx, %ecx andl %ecx, %eax cmpl $0x0, %eax jne 0x4eadb jmp 0x4eaf9 movq -0x10(%rbp), %rdi callq 0x4e0f0 movq -0x10(%rbp), %rax movl $0x1f, 0x4(%rax) movq -0x10(%rbp), %rax movl (%rax), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax je 0x4eaf9 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rdx movq -0x18(%rbp), %rax subq %rax, %rdx movl $0x20, %esi callq 0x2a2a0 jmp 0x4ebc4 movq -0x10(%rbp), %rax movl 0x4(%rax), %eax movq -0x8(%rbp), %rcx cmpl 0x24(%rcx), %eax jb 0x4eb3c movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x8(%rbp), %rcx movl 0x24(%rcx), %esi movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx subl %esi, %ecx movl %ecx, 0x4(%rdx) shrl %cl, %eax movq -0x8(%rbp), %rcx movl 0x24(%rcx), %ecx movl %ecx, %edx leaq 0x2715cc(%rip), %rcx # 0x2c0100 andl (%rcx,%rdx,4), %eax movl %eax, -0x28(%rbp) jmp 0x4eb4f movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rax movl 0x24(%rax), %esi callq 0x4d8a0 movl %eax, -0x28(%rbp) movl -0x28(%rbp), %ecx movl %ecx, -0x24(%rbp) movq -0x18(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax cmpq -0x20(%rbp), %rax jbe 0x4eb71 movq -0x10(%rbp), %rax movl $0x1, 0x28(%rax) jmp 0x4ebc4 movq -0x18(%rbp), %rax movl -0x24(%rbp), %ecx addq %rcx, %rax cmpq -0x20(%rbp), %rax je 0x4eba4 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx movl -0x24(%rbp), %eax movl %eax, %r8d xorl %eax, %eax subq %r8, %rax addq %rax, %rcx callq 0x4e430 movq -0x20(%rbp), %rdi movl -0x24(%rbp), %eax movl %eax, %ecx xorl %eax, %eax subq %rcx, %rax addq %rax, %rdi movl -0x24(%rbp), %eax movl %eax, %edx movl $0x20, %esi callq 0x2a2a0 addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
uf_space_endspace: 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], rcx mov rax, [rbp+var_10] cmp dword ptr [rax+4], 0 jz short loc_4EAB7 mov rax, [rbp+var_10] mov eax, [rax] mov rdx, [rbp+var_10] mov ecx, [rdx+4] add ecx, 0FFFFFFFFh mov [rdx+4], ecx mov edx, 1 shl edx, cl mov ecx, edx and eax, ecx cmp eax, 0 jnz short loc_4EADB jmp short loc_4EAF9 loc_4EAB7: mov rdi, [rbp+var_10] call fill_buffer mov rax, [rbp+var_10] mov dword ptr [rax+4], 1Fh mov rax, [rbp+var_10] mov eax, [rax] and eax, 80000000h cmp eax, 0 jz short loc_4EAF9 loc_4EADB: mov rdi, [rbp+var_18] mov rdx, [rbp+var_20] mov rax, [rbp+var_18] sub rdx, rax mov esi, 20h ; ' ' call _memset jmp loc_4EBC4 loc_4EAF9: mov rax, [rbp+var_10] mov eax, [rax+4] mov rcx, [rbp+var_8] cmp eax, [rcx+24h] jb short loc_4EB3C mov rax, [rbp+var_10] mov eax, [rax] mov rcx, [rbp+var_8] mov esi, [rcx+24h] mov rdx, [rbp+var_10] mov ecx, [rdx+4] sub ecx, esi mov [rdx+4], ecx shr eax, cl mov rcx, [rbp+var_8] mov ecx, [rcx+24h] mov edx, ecx lea rcx, mask and eax, [rcx+rdx*4] mov [rbp+var_28], eax jmp short loc_4EB4F loc_4EB3C: mov rdi, [rbp+var_10] mov rax, [rbp+var_8] mov esi, [rax+24h] call fill_and_get_bits mov [rbp+var_28], eax loc_4EB4F: mov ecx, [rbp+var_28] mov [rbp+var_24], ecx mov rax, [rbp+var_18] mov ecx, ecx add rax, rcx cmp rax, [rbp+var_20] jbe short loc_4EB71 mov rax, [rbp+var_10] mov dword ptr [rax+28h], 1 jmp short loc_4EBC4 loc_4EB71: mov rax, [rbp+var_18] mov ecx, [rbp+var_24] add rax, rcx cmp rax, [rbp+var_20] jz short loc_4EBA4 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] mov eax, [rbp+var_24] mov r8d, eax xor eax, eax sub rax, r8 add rcx, rax call decode_bytes loc_4EBA4: mov rdi, [rbp+var_20] mov eax, [rbp+var_24] mov ecx, eax xor eax, eax sub rax, rcx add rdi, rax mov eax, [rbp+var_24] mov edx, eax mov esi, 20h ; ' ' call _memset loc_4EBC4: add rsp, 30h pop rbp retn
long long uf_space_endspace(long long a1, int *a2, _BYTE *a3, _BYTE *a4) { int v4; // eax int v5; // ecx long long result; // rax unsigned int v7; // eax int v8; // ecx unsigned int bits; // [rsp+8h] [rbp-28h] if ( a2[1] ) { v4 = *a2; v5 = a2[1] - 1; a2[1] = v5; if ( ((1 << v5) & v4) == 0 ) goto LABEL_6; return memset(a3, 32LL, a4 - a3); } fill_buffer((long long)a2); a2[1] = 31; if ( *a2 < 0 ) return memset(a3, 32LL, a4 - a3); LABEL_6: if ( (unsigned int)a2[1] < *(_DWORD *)(a1 + 36) ) { bits = fill_and_get_bits(a2, *(_DWORD *)(a1 + 36)); } else { v7 = *a2; v8 = a2[1] - *(_DWORD *)(a1 + 36); a2[1] = v8; bits = mask[*(unsigned int *)(a1 + 36)] & (v7 >> v8); } if ( &a3[bits] <= a4 ) { if ( &a3[bits] != a4 ) decode_bytes(a1, (long long)a2, a3, &a4[-bits]); return memset(&a4[-bits], 32LL, bits); } else { result = (long long)a2; a2[10] = 1; } return result; }
uf_space_endspace: 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],RCX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x4],0x0 JZ 0x0014eab7 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] ADD ECX,-0x1 MOV dword ptr [RDX + 0x4],ECX MOV EDX,0x1 SHL EDX,CL MOV ECX,EDX AND EAX,ECX CMP EAX,0x0 JNZ 0x0014eadb JMP 0x0014eaf9 LAB_0014eab7: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0014e0f0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4],0x1f MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] AND EAX,0x80000000 CMP EAX,0x0 JZ 0x0014eaf9 LAB_0014eadb: MOV RDI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] SUB RDX,RAX MOV ESI,0x20 CALL 0x0012a2a0 JMP 0x0014ebc4 LAB_0014eaf9: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x4] MOV RCX,qword ptr [RBP + -0x8] CMP EAX,dword ptr [RCX + 0x24] JC 0x0014eb3c MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RCX + 0x24] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] SUB ECX,ESI MOV dword ptr [RDX + 0x4],ECX SHR EAX,CL MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0x24] MOV EDX,ECX LEA RCX,[0x3c0100] AND EAX,dword ptr [RCX + RDX*0x4] MOV dword ptr [RBP + -0x28],EAX JMP 0x0014eb4f LAB_0014eb3c: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RAX + 0x24] CALL 0x0014d8a0 MOV dword ptr [RBP + -0x28],EAX LAB_0014eb4f: MOV ECX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x24],ECX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,ECX ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x20] JBE 0x0014eb71 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x28],0x1 JMP 0x0014ebc4 LAB_0014eb71: MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x24] ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x20] JZ 0x0014eba4 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 EAX,dword ptr [RBP + -0x24] MOV R8D,EAX XOR EAX,EAX SUB RAX,R8 ADD RCX,RAX CALL 0x0014e430 LAB_0014eba4: MOV RDI,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x24] MOV ECX,EAX XOR EAX,EAX SUB RAX,RCX ADD RDI,RAX MOV EAX,dword ptr [RBP + -0x24] MOV EDX,EAX MOV ESI,0x20 CALL 0x0012a2a0 LAB_0014ebc4: ADD RSP,0x30 POP RBP RET
void uf_space_endspace(long param_1,uint *param_2,void *param_3,ulong param_4) { uint uVar1; uint local_30; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar1 = *param_2 & 0x80000000; } else { uVar1 = param_2[1]; param_2[1] = uVar1 - 1; uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f); } if (uVar1 == 0) { if (param_2[1] < *(uint *)(param_1 + 0x24)) { local_30 = fill_and_get_bits(param_2,*(int4 *)(param_1 + 0x24)); } else { uVar1 = param_2[1] - *(int *)(param_1 + 0x24); param_2[1] = uVar1; local_30 = *param_2 >> ((byte)uVar1 & 0x1f) & *(uint *)(mask + (ulong)*(uint *)(param_1 + 0x24) * 4); } if (param_4 < (long)param_3 + (ulong)local_30) { param_2[10] = 1; } else { if ((long)param_3 + (ulong)local_30 != param_4) { decode_bytes(param_1,param_2,param_3,param_4 - local_30); } memset((void *)(param_4 - local_30),0x20,(ulong)local_30); } } else { memset(param_3,0x20,param_4 - (long)param_3); } return; }
11,606
LefDefParser::lefiViaRule::propNumber(int) const
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiViaRule.cpp
double lefiViaRule::propNumber(int i) const { char msg[160]; if (i < 0 || i >= numProps_) { sprintf(msg, "ERROR (LEFPARS-1431): The index number %d given for the VIARULE PROPERTY is invalid.\nValid index is from 0 to %d", i, numProps_); lefiError(0, 1431, msg); return 0; } return dvalues_[i]; }
O0
cpp
LefDefParser::lefiViaRule::propNumber(int) const: subq $0xc8, %rsp movq %rdi, 0xb8(%rsp) movl %esi, 0xb4(%rsp) movq 0xb8(%rsp), %rax movq %rax, 0x8(%rsp) cmpl $0x0, 0xb4(%rsp) jl 0x30b71 movq 0x8(%rsp), %rcx movl 0xb4(%rsp), %eax cmpl 0x1d8(%rcx), %eax jl 0x30bb5 movq 0x8(%rsp), %rax leaq 0x10(%rsp), %rdi movl 0xb4(%rsp), %edx movl 0x1d8(%rax), %ecx leaq 0x491c2(%rip), %rsi # 0x79d51 movb $0x0, %al callq 0x2050 leaq 0x10(%rsp), %rdx xorl %edi, %edi movl $0x597, %esi # imm = 0x597 callq 0x3f4e0 xorps %xmm0, %xmm0 movsd %xmm0, 0xc0(%rsp) jmp 0x30bd7 movq 0x8(%rsp), %rax movq 0x1f0(%rax), %rax movslq 0xb4(%rsp), %rcx movsd (%rax,%rcx,8), %xmm0 movsd %xmm0, 0xc0(%rsp) movsd 0xc0(%rsp), %xmm0 addq $0xc8, %rsp retq nopl (%rax,%rax)
_ZNK12LefDefParser11lefiViaRule10propNumberEi: sub rsp, 0C8h mov [rsp+0C8h+var_10], rdi mov [rsp+0C8h+var_14], esi mov rax, [rsp+0C8h+var_10] mov [rsp+0C8h+var_C0], rax cmp [rsp+0C8h+var_14], 0 jl short loc_30B71 mov rcx, [rsp+0C8h+var_C0] mov eax, [rsp+0C8h+var_14] cmp eax, [rcx+1D8h] jl short loc_30BB5 loc_30B71: mov rax, [rsp+0C8h+var_C0] lea rdi, [rsp+0C8h+var_B8] mov edx, [rsp+0C8h+var_14] mov ecx, [rax+1D8h] lea rsi, aErrorLefpars14_11; "ERROR (LEFPARS-1431): The index number "... mov al, 0 call _sprintf lea rdx, [rsp+0C8h+var_B8]; int xor edi, edi; this mov esi, 597h; int call _ZN12LefDefParser9lefiErrorEiiPKc; LefDefParser::lefiError(int,int,char const*) xorps xmm0, xmm0 movsd [rsp+0C8h+var_8], xmm0 jmp short loc_30BD7 loc_30BB5: mov rax, [rsp+0C8h+var_C0] mov rax, [rax+1F0h] movsxd rcx, [rsp+0C8h+var_14] movsd xmm0, qword ptr [rax+rcx*8] movsd [rsp+0C8h+var_8], xmm0 loc_30BD7: movsd xmm0, [rsp+0C8h+var_8] add rsp, 0C8h retn
double LefDefParser::lefiViaRule::propNumber(LefDefParser::lefiViaRule *this, int a2) { const char *v2; // rcx int v4[41]; // [rsp+10h] [rbp-B8h] BYREF int v5; // [rsp+B4h] [rbp-14h] LefDefParser::lefiViaRule *v6; // [rsp+B8h] [rbp-10h] v6 = this; v5 = a2; if ( a2 >= 0 && v5 < *((_DWORD *)this + 118) ) return *(double *)(*((_QWORD *)this + 62) + 8LL * v5); sprintf( v4, "ERROR (LEFPARS-1431): The index number %d given for the VIARULE PROPERTY is invalid.\nValid index is from 0 to %d", v5, *((_DWORD *)this + 118)); LefDefParser::lefiError(0LL, 1431, (int)v4, v2); return 0.0; }
propNumber: SUB RSP,0xc8 MOV qword ptr [RSP + 0xb8],RDI MOV dword ptr [RSP + 0xb4],ESI MOV RAX,qword ptr [RSP + 0xb8] MOV qword ptr [RSP + 0x8],RAX CMP dword ptr [RSP + 0xb4],0x0 JL 0x00130b71 MOV RCX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RSP + 0xb4] CMP EAX,dword ptr [RCX + 0x1d8] JL 0x00130bb5 LAB_00130b71: MOV RAX,qword ptr [RSP + 0x8] LEA RDI,[RSP + 0x10] MOV EDX,dword ptr [RSP + 0xb4] MOV ECX,dword ptr [RAX + 0x1d8] LEA RSI,[0x179d51] MOV AL,0x0 CALL 0x00102050 LEA RDX,[RSP + 0x10] XOR EDI,EDI MOV ESI,0x597 CALL 0x0013f4e0 XORPS XMM0,XMM0 MOVSD qword ptr [RSP + 0xc0],XMM0 JMP 0x00130bd7 LAB_00130bb5: MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x1f0] MOVSXD RCX,dword ptr [RSP + 0xb4] MOVSD XMM0,qword ptr [RAX + RCX*0x8] MOVSD qword ptr [RSP + 0xc0],XMM0 LAB_00130bd7: MOVSD XMM0,qword ptr [RSP + 0xc0] ADD RSP,0xc8 RET
/* LefDefParser::lefiViaRule::propNumber(int) const */ int8 __thiscall LefDefParser::lefiViaRule::propNumber(lefiViaRule *this,int param_1) { char local_b8 [164]; int local_14; lefiViaRule *local_10; int8 local_8; if ((param_1 < 0) || (*(int *)(this + 0x1d8) <= param_1)) { local_14 = param_1; local_10 = this; sprintf(local_b8, "ERROR (LEFPARS-1431): The index number %d given for the VIARULE PROPERTY is invalid.\nValid index is from 0 to %d" ,(ulong)(uint)param_1,(ulong)*(uint *)(this + 0x1d8)); lefiError(0,0x597,local_b8); local_8 = 0; } else { local_8 = *(int8 *)(*(long *)(this + 0x1f0) + (long)param_1 * 8); } return local_8; }
11,607
rak_string_init_copy
fabiosvm[P]rak/src/string.c
void rak_string_init_copy(RakString *str1, RakString *str2, RakError *err) { int len = rak_string_len(str2); rak_string_init_with_capacity(str1, len, err); if (!rak_is_ok(err)) return; memcpy(rak_string_chars(str1), rak_string_chars(str2), len); str1->slice.len = len; }
O3
c
rak_string_init_copy: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r12 movq %rsi, %r15 movq %rdi, %rbx movl 0xc(%rsi), %ebp movslq %ebp, %r14 movl $0x0, (%rdi) movl $0x8, %eax movl %eax, %r13d leal (,%r13,2), %eax cmpl %ebp, %r13d jl 0x7d71 movslq %r13d, %rdi movq %r12, %rsi callq 0x74a4 cmpb $0x1, (%r12) jne 0x7db4 movl %r13d, 0x8(%rbx) movl $0x0, 0xc(%rbx) movq %rax, 0x10(%rbx) movq 0x10(%r15), %rsi movq %rax, %rdi movq %r14, %rdx callq 0x2100 movl %ebp, 0xc(%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
rak_string_init_copy: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r12, rdx mov r15, rsi mov rbx, rdi mov ebp, [rsi+0Ch] movsxd r14, ebp mov dword ptr [rdi], 0 mov eax, 8 loc_7D71: mov r13d, eax lea eax, ds:0[r13*2] cmp r13d, ebp jl short loc_7D71 movsxd rdi, r13d mov rsi, r12 call rak_memory_alloc cmp byte ptr [r12], 1 jnz short loc_7DB4 mov [rbx+8], r13d mov dword ptr [rbx+0Ch], 0 mov [rbx+10h], rax mov rsi, [r15+10h] mov rdi, rax mov rdx, r14 call _memcpy mov [rbx+0Ch], ebp loc_7DB4: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long rak_string_init_copy(long long a1, long long a2, _BYTE *a3) { int v4; // ebp int v5; // eax int v6; // r13d long long result; // rax v4 = *(_DWORD *)(a2 + 12); *(_DWORD *)a1 = 0; v5 = 8; do { v6 = v5; v5 *= 2; } while ( v6 < v4 ); result = rak_memory_alloc(v6, a3); if ( *a3 == 1 ) { *(_DWORD *)(a1 + 8) = v6; *(_DWORD *)(a1 + 12) = 0; *(_QWORD *)(a1 + 16) = result; result = memcpy(result, *(_QWORD *)(a2 + 16), v4); *(_DWORD *)(a1 + 12) = v4; } return result; }
rak_string_init_copy: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R12,RDX MOV R15,RSI MOV RBX,RDI MOV EBP,dword ptr [RSI + 0xc] MOVSXD R14,EBP MOV dword ptr [RDI],0x0 MOV EAX,0x8 LAB_00107d71: MOV R13D,EAX LEA EAX,[R13*0x2] CMP R13D,EBP JL 0x00107d71 MOVSXD RDI,R13D MOV RSI,R12 CALL 0x001074a4 CMP byte ptr [R12],0x1 JNZ 0x00107db4 MOV dword ptr [RBX + 0x8],R13D MOV dword ptr [RBX + 0xc],0x0 MOV qword ptr [RBX + 0x10],RAX MOV RSI,qword ptr [R15 + 0x10] MOV RDI,RAX MOV RDX,R14 CALL 0x00102100 MOV dword ptr [RBX + 0xc],EBP LAB_00107db4: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void rak_string_init_copy(int4 *param_1,long param_2,char *param_3) { int iVar1; int iVar2; int iVar3; void *__dest; iVar1 = *(int *)(param_2 + 0xc); *param_1 = 0; iVar2 = 8; do { iVar3 = iVar2; iVar2 = iVar3 * 2; } while (iVar3 < iVar1); __dest = (void *)rak_memory_alloc((long)iVar3,param_3); if (*param_3 == '\x01') { param_1[2] = iVar3; param_1[3] = 0; *(void **)(param_1 + 4) = __dest; memcpy(__dest,*(void **)(param_2 + 0x10),(long)iVar1); param_1[3] = iVar1; } return; }
11,608
multadd
eloqsql/strings/dtoa.c
static Bigint *multadd(Bigint *b, int m, int a, Stack_alloc *alloc) { int i, wds; ULong *x; ULLong carry, y; Bigint *b1; wds= b->wds; x= b->p.x; i= 0; carry= a; do { y= *x * (ULLong)m + carry; carry= y >> 32; *x++= (ULong)(y & FFFFFFFF); } while (++i < wds); if (carry) { if (wds >= b->maxwds) { b1= Balloc(b->k+1, alloc); Bcopy(b1, b); Bfree(b, alloc); b= b1; } b->p.x[wds++]= (ULong) carry; b->wds= wds; } return b; }
O3
c
multadd: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %r14 movq %rdi, %rbx movslq 0x14(%rdi), %r12 movq (%rdi), %rax movslq %edx, %r13 movslq %esi, %rcx cmpl $0x2, %r12d movl $0x1, %edx cmovgel %r12d, %edx xorl %esi, %esi movl (%rax,%rsi,4), %edi imulq %rcx, %rdi addq %r13, %rdi movq %rdi, %r13 shrq $0x20, %r13 movl %edi, (%rax,%rsi,4) incq %rsi cmpl %esi, %edx jne 0xd5416 shrq $0x20, %rdi je 0xd5483 cmpl 0xc(%rbx), %r12d jl 0xd5474 movl 0x8(%rbx), %edi incl %edi movq %r14, %rsi callq 0xd4dbc movq %rax, %r15 leaq 0x10(%rax), %rdi leaq 0x10(%rbx), %rsi movslq 0x14(%rbx), %rax leaq 0x8(,%rax,4), %rdx callq 0x29080 movq %rbx, %rdi movq %r14, %rsi callq 0xd51b5 movq %r15, %rbx movq (%rbx), %rax leal 0x1(%r12), %ecx movl %r13d, (%rax,%r12,4) movl %ecx, 0x14(%rbx) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
multadd: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rcx mov rbx, rdi movsxd r12, dword ptr [rdi+14h] mov rax, [rdi] movsxd r13, edx movsxd rcx, esi cmp r12d, 2 mov edx, 1 cmovge edx, r12d xor esi, esi loc_D5416: mov edi, [rax+rsi*4] imul rdi, rcx add rdi, r13 mov r13, rdi shr r13, 20h mov [rax+rsi*4], edi inc rsi cmp edx, esi jnz short loc_D5416 shr rdi, 20h jz short loc_D5483 cmp r12d, [rbx+0Ch] jl short loc_D5474 mov edi, [rbx+8] inc edi mov rsi, r14 call Balloc mov r15, rax lea rdi, [rax+10h] lea rsi, [rbx+10h] movsxd rax, dword ptr [rbx+14h] lea rdx, ds:8[rax*4] call _memcpy mov rdi, rbx mov rsi, r14 call Bfree mov rbx, r15 loc_D5474: mov rax, [rbx] lea ecx, [r12+1] mov [rax+r12*4], r13d mov [rbx+14h], ecx loc_D5483: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long multadd(unsigned long long a1, int a2, int a3, unsigned long long *a4) { unsigned long long v5; // rbx long long v6; // r12 long long v7; // rax unsigned long long v8; // r13 long long v9; // rcx int v10; // edx long long v11; // rsi unsigned long long v12; // rdi long long v13; // r15 v5 = a1; v6 = *(int *)(a1 + 20); v7 = *(_QWORD *)a1; v8 = a3; v9 = a2; v10 = 1; if ( (int)v6 >= 2 ) v10 = *(_DWORD *)(a1 + 20); v11 = 0LL; do { v12 = v8 + v9 * *(unsigned int *)(v7 + 4 * v11); v8 = HIDWORD(v12); *(_DWORD *)(v7 + 4 * v11++) = v12; } while ( v10 != (_DWORD)v11 ); if ( HIDWORD(v12) ) { if ( (int)v6 >= *(_DWORD *)(v5 + 12) ) { v13 = Balloc(*(_DWORD *)(v5 + 8) + 1, (long long)a4); memcpy(v13 + 16, v5 + 16, 4LL * *(int *)(v5 + 20) + 8); Bfree(v5, a4); v5 = v13; } *(_DWORD *)(*(_QWORD *)v5 + 4 * v6) = HIDWORD(v12); *(_DWORD *)(v5 + 20) = v6 + 1; } return v5; }
multadd: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RCX MOV RBX,RDI MOVSXD R12,dword ptr [RDI + 0x14] MOV RAX,qword ptr [RDI] MOVSXD R13,EDX MOVSXD RCX,ESI CMP R12D,0x2 MOV EDX,0x1 CMOVGE EDX,R12D XOR ESI,ESI LAB_001d5416: MOV EDI,dword ptr [RAX + RSI*0x4] IMUL RDI,RCX ADD RDI,R13 MOV R13,RDI SHR R13,0x20 MOV dword ptr [RAX + RSI*0x4],EDI INC RSI CMP EDX,ESI JNZ 0x001d5416 SHR RDI,0x20 JZ 0x001d5483 CMP R12D,dword ptr [RBX + 0xc] JL 0x001d5474 MOV EDI,dword ptr [RBX + 0x8] INC EDI MOV RSI,R14 CALL 0x001d4dbc MOV R15,RAX LEA RDI,[RAX + 0x10] LEA RSI,[RBX + 0x10] MOVSXD RAX,dword ptr [RBX + 0x14] LEA RDX,[0x8 + RAX*0x4] CALL 0x00129080 MOV RDI,RBX MOV RSI,R14 CALL 0x001d51b5 MOV RBX,R15 LAB_001d5474: MOV RAX,qword ptr [RBX] LEA ECX,[R12 + 0x1] MOV dword ptr [RAX + R12*0x4],R13D MOV dword ptr [RBX + 0x14],ECX LAB_001d5483: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long * multadd(long *param_1,int param_2,int param_3,int8 param_4) { int iVar1; long lVar2; long *plVar3; int iVar4; long lVar5; ulong uVar6; ulong uVar7; iVar1 = *(int *)((long)param_1 + 0x14); lVar2 = *param_1; uVar7 = (ulong)param_3; iVar4 = 1; if (1 < iVar1) { iVar4 = iVar1; } lVar5 = 0; do { uVar6 = (ulong)*(uint *)(lVar2 + lVar5 * 4) * (long)param_2 + uVar7; uVar7 = uVar6 >> 0x20; *(int *)(lVar2 + lVar5 * 4) = (int)uVar6; lVar5 = lVar5 + 1; } while (iVar4 != (int)lVar5); plVar3 = param_1; if (uVar6 >> 0x20 != 0) { if (*(int *)((long)param_1 + 0xc) <= iVar1) { plVar3 = (long *)Balloc((int)param_1[1] + 1,param_4); memcpy(plVar3 + 2,param_1 + 2,(long)*(int *)((long)param_1 + 0x14) * 4 + 8); Bfree(param_1,param_4); } *(int *)(*plVar3 + (long)iVar1 * 4) = (int)(uVar6 >> 0x20); *(int *)((long)plVar3 + 0x14) = iVar1 + 1; } return plVar3; }
11,609
ft_make_key
eloqsql/storage/myisam/ft_update.c
uint _ft_make_key(MI_INFO *info, uint keynr, uchar *keybuf, FT_WORD *wptr, my_off_t filepos) { uchar buf[HA_FT_MAXBYTELEN+16]; float weight=(float) ((filepos==HA_OFFSET_ERROR) ? 0 : wptr->weight); DBUG_ENTER("_ft_make_key"); mi_float4store(buf,weight); int2store(buf+HA_FT_WLEN,wptr->len); memcpy(buf+HA_FT_WLEN+2,wptr->pos,wptr->len); DBUG_RETURN(_mi_make_key(info,keynr,(uchar*) keybuf,buf,filepos)); }
O0
c
ft_make_key: pushq %rbp movq %rsp, %rbp subq $0x170, %rsp # imm = 0x170 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x128(%rbp) movl %esi, -0x12c(%rbp) movq %rdx, -0x138(%rbp) movq %rcx, -0x140(%rbp) movq %r8, -0x148(%rbp) cmpq $-0x1, -0x148(%rbp) jne 0xa2c01 xorps %xmm0, %xmm0 movsd %xmm0, -0x160(%rbp) jmp 0xa2c15 movq -0x140(%rbp), %rax movsd 0x8(%rax), %xmm0 movsd %xmm0, -0x160(%rbp) movsd -0x160(%rbp), %xmm0 cvtsd2ss %xmm0, %xmm0 movss %xmm0, -0x14c(%rbp) movb -0x149(%rbp), %al movb %al, -0x120(%rbp) movb -0x14a(%rbp), %al movb %al, -0x11f(%rbp) movb -0x14b(%rbp), %al movb %al, -0x11e(%rbp) movb -0x14c(%rbp), %al movb %al, -0x11d(%rbp) leaq -0x120(%rbp), %rax addq $0x4, %rax movq %rax, -0x158(%rbp) movq -0x140(%rbp), %rax movq 0x10(%rax), %rax movw %ax, %cx movq -0x158(%rbp), %rax movw %cx, (%rax) leaq -0x120(%rbp), %rdi addq $0x4, %rdi addq $0x2, %rdi movq -0x140(%rbp), %rax movq (%rax), %rsi movq -0x140(%rbp), %rax movq 0x10(%rax), %rdx callq 0x2a0b0 movq -0x128(%rbp), %rdi movl -0x12c(%rbp), %esi movq -0x138(%rbp), %rdx leaq -0x120(%rbp), %rcx movq -0x148(%rbp), %r8 callq 0xadec0 movl %eax, -0x164(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xa2cfa movl -0x164(%rbp), %eax addq $0x170, %rsp # imm = 0x170 popq %rbp retq callq 0x2a250 nop
_ft_make_key: push rbp mov rbp, rsp sub rsp, 170h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_128], rdi mov [rbp+var_12C], esi mov [rbp+var_138], rdx mov [rbp+var_140], rcx mov [rbp+var_148], r8 cmp [rbp+var_148], 0FFFFFFFFFFFFFFFFh jnz short loc_A2C01 xorps xmm0, xmm0 movsd [rbp+var_160], xmm0 jmp short loc_A2C15 loc_A2C01: mov rax, [rbp+var_140] movsd xmm0, qword ptr [rax+8] movsd [rbp+var_160], xmm0 loc_A2C15: movsd xmm0, [rbp+var_160] cvtsd2ss xmm0, xmm0 movss [rbp+var_14C], xmm0 mov al, byte ptr [rbp+var_14C+3] mov [rbp+var_120], al mov al, byte ptr [rbp+var_14C+2] mov [rbp+var_11F], al mov al, byte ptr [rbp+var_14C+1] mov [rbp+var_11E], al mov al, byte ptr [rbp+var_14C] mov [rbp+var_11D], al lea rax, [rbp+var_120] add rax, 4 mov [rbp+var_158], rax mov rax, [rbp+var_140] mov rax, [rax+10h] mov cx, ax mov rax, [rbp+var_158] mov [rax], cx lea rdi, [rbp+var_120] add rdi, 4 add rdi, 2 mov rax, [rbp+var_140] mov rsi, [rax] mov rax, [rbp+var_140] mov rdx, [rax+10h] call _memcpy mov rdi, [rbp+var_128] mov esi, [rbp+var_12C] mov rdx, [rbp+var_138] lea rcx, [rbp+var_120] mov r8, [rbp+var_148] call _mi_make_key mov [rbp+var_164], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_A2CFA mov eax, [rbp+var_164] add rsp, 170h pop rbp retn loc_A2CFA: call ___stack_chk_fail
long long ft_make_key(long long a1, unsigned int a2, long long a3, long long a4, long long a5) { float v5; // xmm0_4 double v7; // [rsp+10h] [rbp-160h] _BYTE v10[4]; // [rsp+50h] [rbp-120h] BYREF __int16 v11; // [rsp+54h] [rbp-11Ch] _BYTE v12[282]; // [rsp+56h] [rbp-11Ah] BYREF *(_QWORD *)&v12[274] = __readfsqword(0x28u); if ( a5 == -1 ) v7 = 0.0; else v7 = *(double *)(a4 + 8); v5 = v7; v10[0] = HIBYTE(v5); v10[1] = BYTE2(v5); v10[2] = BYTE1(v5); v10[3] = LOBYTE(v5); v11 = *(_QWORD *)(a4 + 16); memcpy(v12, *(_QWORD *)a4, *(_QWORD *)(a4 + 16)); return (unsigned int)mi_make_key(a1, a2, a3, v10, a5); }
_ft_make_key: PUSH RBP MOV RBP,RSP SUB RSP,0x170 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x128],RDI MOV dword ptr [RBP + -0x12c],ESI MOV qword ptr [RBP + -0x138],RDX MOV qword ptr [RBP + -0x140],RCX MOV qword ptr [RBP + -0x148],R8 CMP qword ptr [RBP + -0x148],-0x1 JNZ 0x001a2c01 XORPS XMM0,XMM0 MOVSD qword ptr [RBP + -0x160],XMM0 JMP 0x001a2c15 LAB_001a2c01: MOV RAX,qword ptr [RBP + -0x140] MOVSD XMM0,qword ptr [RAX + 0x8] MOVSD qword ptr [RBP + -0x160],XMM0 LAB_001a2c15: MOVSD XMM0,qword ptr [RBP + -0x160] CVTSD2SS XMM0,XMM0 MOVSS dword ptr [RBP + -0x14c],XMM0 MOV AL,byte ptr [RBP + -0x149] MOV byte ptr [RBP + -0x120],AL MOV AL,byte ptr [RBP + -0x14a] MOV byte ptr [RBP + -0x11f],AL MOV AL,byte ptr [RBP + -0x14b] MOV byte ptr [RBP + -0x11e],AL MOV AL,byte ptr [RBP + -0x14c] MOV byte ptr [RBP + -0x11d],AL LEA RAX,[RBP + -0x120] ADD RAX,0x4 MOV qword ptr [RBP + -0x158],RAX MOV RAX,qword ptr [RBP + -0x140] MOV RAX,qword ptr [RAX + 0x10] MOV CX,AX MOV RAX,qword ptr [RBP + -0x158] MOV word ptr [RAX],CX LEA RDI,[RBP + -0x120] ADD RDI,0x4 ADD RDI,0x2 MOV RAX,qword ptr [RBP + -0x140] MOV RSI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x140] MOV RDX,qword ptr [RAX + 0x10] CALL 0x0012a0b0 MOV RDI,qword ptr [RBP + -0x128] MOV ESI,dword ptr [RBP + -0x12c] MOV RDX,qword ptr [RBP + -0x138] LEA RCX,[RBP + -0x120] MOV R8,qword ptr [RBP + -0x148] CALL 0x001adec0 MOV dword ptr [RBP + -0x164],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001a2cfa MOV EAX,dword ptr [RBP + -0x164] ADD RSP,0x170 POP RBP RET LAB_001a2cfa: CALL 0x0012a250
int4 _ft_make_key(int8 param_1,int4 param_2,int8 param_3,int8 *param_4, long param_5) { int4 uVar1; long in_FS_OFFSET; float fVar2; double local_168; int1 local_154; int1 uStack_153; int1 uStack_152; int1 uStack_151; int1 local_128; int1 local_127; int1 local_126; int1 local_125; int2 local_124; int1 auStack_122 [274]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); if (param_5 == -1) { local_168 = 0.0; } else { local_168 = (double)param_4[1]; } fVar2 = (float)local_168; uStack_151 = (int1)((uint)fVar2 >> 0x18); local_128 = uStack_151; uStack_152 = (int1)((uint)fVar2 >> 0x10); local_127 = uStack_152; uStack_153 = (int1)((uint)fVar2 >> 8); local_126 = uStack_153; local_154 = SUB41(fVar2,0); local_125 = local_154; local_124 = (int2)param_4[2]; memcpy(auStack_122,(void *)*param_4,param_4[2]); uVar1 = _mi_make_key(param_1,param_2,param_3,&local_128,param_5); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return uVar1; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
11,610
nglog::LogDestination::SetLogFilenameExtension(char const*)
ng-log[P]ng-log/src/logging.cc
inline void LogDestination::SetLogFilenameExtension(const char* ext) { // Prevent any subtle race conditions by wrapping a mutex lock around // all this stuff. std::lock_guard<std::mutex> l{log_mutex}; for (int severity = 0; severity < NUM_SEVERITIES; ++severity) { log_destination(static_cast<LogSeverity>(severity)) ->fileobject_.SetExtension(ext); } }
O1
cpp
nglog::LogDestination::SetLogFilenameExtension(char const*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x2eac7(%rip), %rdi # 0x40d48 callq 0x7840 testl %eax, %eax jne 0x12387 leaq 0x1f9fb(%rip), %r14 # 0x31c90 xorl %r15d, %r15d cmpq $0x0, (%r14) jne 0x122d3 movl $0xd0, %edi callq 0x9020 movq %rax, %r13 movq %rax, %rdi movl %r15d, %esi xorl %edx, %edx callq 0xa860 movq $0x0, (%rsp) movq %r14, %rdi movq %r13, %rsi callq 0x12c64 movq %rsp, %rdi callq 0x11890 movq (%r14), %r12 leaq 0x8(%r12), %r13 movq %r13, %rdi callq 0x7840 testl %eax, %eax jne 0x12380 leaq 0x78(%r12), %rbp movq %rbp, %rdi movq %rbx, %rsi callq 0x7100 testl %eax, %eax je 0x1234c movq 0x98(%r12), %rdi testq %rdi, %rdi je 0x12329 movq $0x0, 0x98(%r12) callq 0x7520 movl $0x1f, 0xb0(%r12) movq 0x80(%r12), %r12 movq %rbx, %rdi callq 0x71f0 movq %rbp, %rdi xorl %esi, %esi movq %r12, %rdx movq %rbx, %rcx movq %rax, %r8 callq 0x78b0 movq %r13, %rdi callq 0x73e0 incq %r15 addq $0x8, %r14 cmpq $0x4, %r15 jne 0x12298 leaq 0x2e9dc(%rip), %rdi # 0x40d48 callq 0x73e0 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %eax, %edi callq 0x7350 movl %eax, %edi callq 0x7350 jmp 0x123af movq %rax, %rbx movl $0xd0, %esi movq %r13, %rdi callq 0x906c jmp 0x123b2 movq %rax, %rbx movq %r13, %rdi callq 0x73e0 jmp 0x123b2 movq %rax, %rbx leaq 0x2e98f(%rip), %rdi # 0x40d48 callq 0x73e0 movq %rbx, %rdi callq 0x79b0
_ZN5nglog14LogDestination23SetLogFilenameExtensionEPKc: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex call _pthread_mutex_lock test eax, eax jnz loc_12387 lea r14, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_ xor r15d, r15d loc_12298: cmp qword ptr [r14], 0 jnz short loc_122D3 mov edi, 0D0h; unsigned __int64 call _Znwm; operator new(ulong) mov r13, rax mov rdi, rax mov esi, r15d xor edx, edx call _ZN5nglog14LogDestinationC2ENS_11LogSeverityEPKc; nglog::LogDestination::LogDestination(nglog::LogSeverity,char const*) mov [rsp+38h+var_38], 0 mov rdi, r14 mov rsi, r13 call _ZNSt15__uniq_ptr_implIN5nglog14LogDestinationESt14default_deleteIS1_EE5resetEPS1_; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(nglog::LogDestination*) mov rdi, rsp call _ZNSt10unique_ptrIN5nglog14LogDestinationESt14default_deleteIS1_EED2Ev; std::unique_ptr<nglog::LogDestination>::~unique_ptr() loc_122D3: mov r12, [r14] lea r13, [r12+8] mov rdi, r13 call _pthread_mutex_lock test eax, eax jnz loc_12380 lea rbp, [r12+78h] mov rdi, rbp mov rsi, rbx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_1234C mov rdi, [r12+98h] test rdi, rdi jz short loc_12329 mov qword ptr [r12+98h], 0 call _fclose mov dword ptr [r12+0B0h], 1Fh loc_12329: mov r12, [r12+80h] mov rdi, rbx call _strlen mov rdi, rbp xor esi, esi mov rdx, r12 mov rcx, rbx mov r8, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) loc_1234C: mov rdi, r13 call _pthread_mutex_unlock inc r15 add r14, 8 cmp r15, 4 jnz loc_12298 lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex call _pthread_mutex_unlock add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_12380: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) loc_12387: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) jmp short loc_123AF mov rbx, rax mov esi, 0D0h; unsigned __int64 mov rdi, r13; void * call _ZdlPvm; operator delete(void *,ulong) jmp short loc_123B2 mov rbx, rax mov rdi, r13 call _pthread_mutex_unlock jmp short loc_123B2 loc_123AF: mov rbx, rax loc_123B2: lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex call _pthread_mutex_unlock mov rdi, rbx call __Unwind_Resume
long long nglog::LogDestination::SetLogFilenameExtension(nglog::LogDestination *this, const char *a2) { nglog::LogDestination *v2; // rax int v4; // eax long long *v5; // r14 long long i; // r15 long long v7; // r13 long long v8; // r12 long long v9; // r13 int v10; // eax long long v11; // rbp long long v12; // rdi long long v13; // r12 long long v14; // rax nglog::LogDestination *v16; // [rsp+0h] [rbp-38h] BYREF v16 = v2; v4 = pthread_mutex_lock(&nglog::log_mutex); if ( v4 ) std::__throw_system_error(v4); v5 = (long long *)&nglog::LogDestination::log_destinations_; for ( i = 0LL; i != 4; ++i ) { if ( !*v5 ) { v7 = operator new(208LL); nglog::LogDestination::LogDestination(v7, i, 0LL); v16 = 0LL; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(v5, v7); std::unique_ptr<nglog::LogDestination>::~unique_ptr(&v16); } v8 = *v5; v9 = *v5 + 8; v10 = pthread_mutex_lock(v9); if ( v10 ) std::__throw_system_error(v10); v11 = v8 + 120; if ( (unsigned int)std::string::compare(v8 + 120, this) ) { v12 = *(_QWORD *)(v8 + 152); if ( v12 ) { *(_QWORD *)(v8 + 152) = 0LL; fclose(v12); *(_DWORD *)(v8 + 176) = 31; } v13 = *(_QWORD *)(v8 + 128); v14 = strlen(this); std::string::_M_replace(v11, 0LL, v13, this, v14); } pthread_mutex_unlock(v9); ++v5; } return pthread_mutex_unlock(&nglog::log_mutex); }
SetLogFilenameExtension: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI LEA RDI,[0x140d48] CALL 0x00107840 TEST EAX,EAX JNZ 0x00112387 LEA R14,[0x131c90] XOR R15D,R15D LAB_00112298: CMP qword ptr [R14],0x0 JNZ 0x001122d3 LAB_0011229e: MOV EDI,0xd0 CALL 0x00109020 LAB_001122a8: MOV R13,RAX MOV RDI,RAX MOV ESI,R15D XOR EDX,EDX CALL 0x0010a860 MOV qword ptr [RSP],0x0 MOV RDI,R14 MOV RSI,R13 CALL 0x00112c64 MOV RDI,RSP CALL 0x00111890 LAB_001122d3: MOV R12,qword ptr [R14] LEA R13,[R12 + 0x8] MOV RDI,R13 CALL 0x00107840 TEST EAX,EAX JNZ 0x00112380 LEA RBP,[R12 + 0x78] MOV RDI,RBP MOV RSI,RBX CALL 0x00107100 TEST EAX,EAX JZ 0x0011234c MOV RDI,qword ptr [R12 + 0x98] TEST RDI,RDI JZ 0x00112329 MOV qword ptr [R12 + 0x98],0x0 CALL 0x00107520 MOV dword ptr [R12 + 0xb0],0x1f LAB_00112329: MOV R12,qword ptr [R12 + 0x80] MOV RDI,RBX CALL 0x001071f0 LAB_00112339: MOV RDI,RBP XOR ESI,ESI MOV RDX,R12 MOV RCX,RBX MOV R8,RAX CALL 0x001078b0 LAB_0011234c: MOV RDI,R13 CALL 0x001073e0 INC R15 ADD R14,0x8 CMP R15,0x4 JNZ 0x00112298 LEA RDI,[0x140d48] CALL 0x001073e0 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00112380: MOV EDI,EAX CALL 0x00107350 LAB_00112387: MOV EDI,EAX CALL 0x00107350
/* nglog::LogDestination::SetLogFilenameExtension(char const*) */ void nglog::LogDestination::SetLogFilenameExtension(char *param_1) { long lVar1; FILE *__stream; char *pcVar2; int iVar3; int8 in_RAX; LogDestination *pLVar4; __uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *this; ulong uVar5; int8 local_38; local_38 = in_RAX; iVar3 = pthread_mutex_lock((pthread_mutex_t *)log_mutex); if (iVar3 != 0) { /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar3); } this = (__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *) &log_destinations_; uVar5 = 0; do { if (*(long *)this == 0) { /* try { // try from 0011229e to 001122a7 has its CatchHandler @ 0011238e */ pLVar4 = (LogDestination *)operator_new(0xd0); /* try { // try from 001122a8 to 001122b7 has its CatchHandler @ 00112390 */ LogDestination(pLVar4,uVar5 & 0xffffffff,0); local_38 = 0; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset (this,pLVar4); std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::~unique_ptr ((unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *) &local_38); } lVar1 = *(long *)this; iVar3 = pthread_mutex_lock((pthread_mutex_t *)(lVar1 + 8)); if (iVar3 != 0) { /* try { // try from 00112380 to 00112386 has its CatchHandler @ 001123af */ /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar3); } iVar3 = std::__cxx11::string::compare((char *)(lVar1 + 0x78)); if (iVar3 != 0) { __stream = *(FILE **)(lVar1 + 0x98); if (__stream != (FILE *)0x0) { *(int8 *)(lVar1 + 0x98) = 0; fclose(__stream); *(int4 *)(lVar1 + 0xb0) = 0x1f; } pcVar2 = *(char **)(lVar1 + 0x80); strlen(param_1); /* try { // try from 00112339 to 0011234b has its CatchHandler @ 001123a2 */ std::__cxx11::string::_M_replace((ulong)(lVar1 + 0x78),0,pcVar2,(ulong)param_1); } pthread_mutex_unlock((pthread_mutex_t *)(lVar1 + 8)); uVar5 = uVar5 + 1; this = this + 8; } while (uVar5 != 4); pthread_mutex_unlock((pthread_mutex_t *)log_mutex); return; }
11,611
nglog::LogDestination::SetLogFilenameExtension(char const*)
ng-log[P]ng-log/src/logging.cc
inline void LogDestination::SetLogFilenameExtension(const char* ext) { // Prevent any subtle race conditions by wrapping a mutex lock around // all this stuff. std::lock_guard<std::mutex> l{log_mutex}; for (int severity = 0; severity < NUM_SEVERITIES; ++severity) { log_destination(static_cast<LogSeverity>(severity)) ->fileobject_.SetExtension(ext); } }
O3
cpp
nglog::LogDestination::SetLogFilenameExtension(char const*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x2ee19(%rip), %rdi # 0x40d48 callq 0x7840 testl %eax, %eax jne 0x12037 leaq 0x1fd4d(%rip), %r14 # 0x31c90 xorl %r15d, %r15d movq (%r14), %r12 testq %r12, %r12 jne 0x11f86 movl $0xd0, %edi callq 0x8eb0 movq %rax, %r13 movq %rax, %rdi movl %r15d, %esi xorl %edx, %edx callq 0xa664 movq $0x0, (%rsp) movq %r14, %rdi movq %r13, %rsi callq 0x1295a movq %rsp, %rdi callq 0x11574 movq (%r14), %r12 leaq 0x8(%r12), %r13 movq %r13, %rdi callq 0x7840 testl %eax, %eax jne 0x12030 leaq 0x78(%r12), %rbp movq %rbp, %rdi movq %rbx, %rsi callq 0x7100 testl %eax, %eax je 0x11ffc movq 0x98(%r12), %rdi testq %rdi, %rdi je 0x11fd9 movq $0x0, 0x98(%r12) callq 0x7520 movl $0x1f, 0xb0(%r12) movq 0x80(%r12), %r12 movq %rbx, %rdi callq 0x71f0 movq %rbp, %rdi xorl %esi, %esi movq %r12, %rdx movq %rbx, %rcx movq %rax, %r8 callq 0x78b0 movq %r13, %rdi callq 0x73e0 incq %r15 addq $0x8, %r14 cmpq $0x4, %r15 jne 0x11f46 leaq 0x2ed2c(%rip), %rdi # 0x40d48 callq 0x73e0 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %eax, %edi callq 0x7350 movl %eax, %edi callq 0x7350 jmp 0x1205f movq %rax, %rbx movl $0xd0, %esi movq %r13, %rdi callq 0x8efc jmp 0x12062 movq %rax, %rbx movq %r13, %rdi callq 0x73e0 jmp 0x12062 movq %rax, %rbx leaq 0x2ecdf(%rip), %rdi # 0x40d48 callq 0x73e0 movq %rbx, %rdi callq 0x79b0
_ZN5nglog14LogDestination23SetLogFilenameExtensionEPKc: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex call _pthread_mutex_lock test eax, eax jnz loc_12037 lea r14, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_ xor r15d, r15d loc_11F46: mov r12, [r14] test r12, r12 jnz short loc_11F86 mov edi, 0D0h; unsigned __int64 call _Znwm; operator new(ulong) mov r13, rax mov rdi, rax mov esi, r15d xor edx, edx call _ZN5nglog14LogDestinationC2ENS_11LogSeverityEPKc; nglog::LogDestination::LogDestination(nglog::LogSeverity,char const*) mov [rsp+38h+var_38], 0 mov rdi, r14 mov rsi, r13 call _ZNSt15__uniq_ptr_implIN5nglog14LogDestinationESt14default_deleteIS1_EE5resetEPS1_; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(nglog::LogDestination*) mov rdi, rsp call _ZNSt10unique_ptrIN5nglog14LogDestinationESt14default_deleteIS1_EED2Ev; std::unique_ptr<nglog::LogDestination>::~unique_ptr() mov r12, [r14] loc_11F86: lea r13, [r12+8] mov rdi, r13 call _pthread_mutex_lock test eax, eax jnz loc_12030 lea rbp, [r12+78h] mov rdi, rbp mov rsi, rbx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_11FFC mov rdi, [r12+98h] test rdi, rdi jz short loc_11FD9 mov qword ptr [r12+98h], 0 call _fclose mov dword ptr [r12+0B0h], 1Fh loc_11FD9: mov r12, [r12+80h] mov rdi, rbx call _strlen mov rdi, rbp xor esi, esi mov rdx, r12 mov rcx, rbx mov r8, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) loc_11FFC: mov rdi, r13 call _pthread_mutex_unlock inc r15 add r14, 8 cmp r15, 4 jnz loc_11F46 lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex call _pthread_mutex_unlock add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_12030: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) loc_12037: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) jmp short loc_1205F mov rbx, rax mov esi, 0D0h; unsigned __int64 mov rdi, r13; void * call _ZdlPvm; operator delete(void *,ulong) jmp short loc_12062 mov rbx, rax mov rdi, r13 call _pthread_mutex_unlock jmp short loc_12062 loc_1205F: mov rbx, rax loc_12062: lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex call _pthread_mutex_unlock mov rdi, rbx call __Unwind_Resume
long long nglog::LogDestination::SetLogFilenameExtension(nglog::LogDestination *this, const char *a2) { nglog::LogDestination *v2; // rax int v4; // eax long long *v5; // r14 long long i; // r15 long long v7; // r12 long long v8; // r13 long long v9; // r13 int v10; // eax long long v11; // rbp long long v12; // rdi long long v13; // r12 long long v14; // rax nglog::LogDestination *v16; // [rsp+0h] [rbp-38h] BYREF v16 = v2; v4 = pthread_mutex_lock(&nglog::log_mutex); if ( v4 ) std::__throw_system_error(v4); v5 = nglog::LogDestination::log_destinations_; for ( i = 0LL; i != 4; ++i ) { v7 = *v5; if ( !*v5 ) { v8 = operator new(208LL); nglog::LogDestination::LogDestination(v8, i, 0LL); v16 = 0LL; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(v5, v8); std::unique_ptr<nglog::LogDestination>::~unique_ptr(&v16); v7 = *v5; } v9 = v7 + 8; v10 = pthread_mutex_lock(v7 + 8); if ( v10 ) std::__throw_system_error(v10); v11 = v7 + 120; if ( (unsigned int)std::string::compare(v7 + 120, this) ) { v12 = *(_QWORD *)(v7 + 152); if ( v12 ) { *(_QWORD *)(v7 + 152) = 0LL; fclose(v12); *(_DWORD *)(v7 + 176) = 31; } v13 = *(_QWORD *)(v7 + 128); v14 = strlen(this); std::string::_M_replace(v11, 0LL, v13, this, v14); } pthread_mutex_unlock(v9); ++v5; } return pthread_mutex_unlock(&nglog::log_mutex); }
SetLogFilenameExtension: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI LEA RDI,[0x140d48] CALL 0x00107840 TEST EAX,EAX JNZ 0x00112037 LEA R14,[0x131c90] XOR R15D,R15D LAB_00111f46: MOV R12,qword ptr [R14] TEST R12,R12 JNZ 0x00111f86 LAB_00111f4e: MOV EDI,0xd0 CALL 0x00108eb0 LAB_00111f58: MOV R13,RAX MOV RDI,RAX MOV ESI,R15D XOR EDX,EDX CALL 0x0010a664 MOV qword ptr [RSP],0x0 MOV RDI,R14 MOV RSI,R13 CALL 0x0011295a MOV RDI,RSP CALL 0x00111574 MOV R12,qword ptr [R14] LAB_00111f86: LEA R13,[R12 + 0x8] MOV RDI,R13 CALL 0x00107840 TEST EAX,EAX JNZ 0x00112030 LEA RBP,[R12 + 0x78] MOV RDI,RBP MOV RSI,RBX CALL 0x00107100 TEST EAX,EAX JZ 0x00111ffc MOV RDI,qword ptr [R12 + 0x98] TEST RDI,RDI JZ 0x00111fd9 MOV qword ptr [R12 + 0x98],0x0 CALL 0x00107520 MOV dword ptr [R12 + 0xb0],0x1f LAB_00111fd9: MOV R12,qword ptr [R12 + 0x80] MOV RDI,RBX CALL 0x001071f0 LAB_00111fe9: MOV RDI,RBP XOR ESI,ESI MOV RDX,R12 MOV RCX,RBX MOV R8,RAX CALL 0x001078b0 LAB_00111ffc: MOV RDI,R13 CALL 0x001073e0 INC R15 ADD R14,0x8 CMP R15,0x4 JNZ 0x00111f46 LEA RDI,[0x140d48] CALL 0x001073e0 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00112030: MOV EDI,EAX CALL 0x00107350 LAB_00112037: MOV EDI,EAX CALL 0x00107350
/* nglog::LogDestination::SetLogFilenameExtension(char const*) */ void nglog::LogDestination::SetLogFilenameExtension(char *param_1) { FILE *__stream; char *pcVar1; int iVar2; int8 in_RAX; LogDestination *pLVar3; long lVar4; __uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *this; ulong uVar5; int8 local_38; local_38 = in_RAX; iVar2 = pthread_mutex_lock((pthread_mutex_t *)log_mutex); if (iVar2 != 0) { /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar2); } this = (__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *) &log_destinations_; uVar5 = 0; do { lVar4 = *(long *)this; if (lVar4 == 0) { /* try { // try from 00111f4e to 00111f57 has its CatchHandler @ 0011203e */ pLVar3 = (LogDestination *)operator_new(0xd0); /* try { // try from 00111f58 to 00111f67 has its CatchHandler @ 00112040 */ LogDestination(pLVar3,uVar5 & 0xffffffff,0); local_38 = 0; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset (this,pLVar3); std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::~unique_ptr ((unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *) &local_38); lVar4 = *(long *)this; } iVar2 = pthread_mutex_lock((pthread_mutex_t *)(lVar4 + 8)); if (iVar2 != 0) { /* try { // try from 00112030 to 00112036 has its CatchHandler @ 0011205f */ /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar2); } iVar2 = std::__cxx11::string::compare((char *)(lVar4 + 0x78)); if (iVar2 != 0) { __stream = *(FILE **)(lVar4 + 0x98); if (__stream != (FILE *)0x0) { *(int8 *)(lVar4 + 0x98) = 0; fclose(__stream); *(int4 *)(lVar4 + 0xb0) = 0x1f; } pcVar1 = *(char **)(lVar4 + 0x80); strlen(param_1); /* try { // try from 00111fe9 to 00111ffb has its CatchHandler @ 00112052 */ std::__cxx11::string::_M_replace((ulong)(lVar4 + 0x78),0,pcVar1,(ulong)param_1); } pthread_mutex_unlock((pthread_mutex_t *)(lVar4 + 8)); uVar5 = uVar5 + 1; this = this + 8; } while (uVar5 != 4); pthread_mutex_unlock((pthread_mutex_t *)log_mutex); return; }
11,612
js_string_normalize
bluesky950520[P]quickjs/quickjs.c
static JSValue js_string_normalize(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { const char *form, *p; size_t form_len; int is_compat, buf_len, out_len; UnicodeNormalizationEnum n_type; JSValue val; uint32_t *buf, *out_buf; val = JS_ToStringCheckObject(ctx, this_val); if (JS_IsException(val)) return val; buf_len = JS_ToUTF32String(ctx, &buf, val); JS_FreeValue(ctx, val); if (buf_len < 0) return JS_EXCEPTION; if (argc == 0 || JS_IsUndefined(argv[0])) { n_type = UNICODE_NFC; } else { form = JS_ToCStringLen(ctx, &form_len, argv[0]); if (!form) goto fail1; p = form; if (p[0] != 'N' || p[1] != 'F') goto bad_form; p += 2; is_compat = FALSE; if (*p == 'K') { is_compat = TRUE; p++; } if (*p == 'C' || *p == 'D') { n_type = UNICODE_NFC + is_compat * 2 + (*p - 'C'); if ((p + 1 - form) != form_len) goto bad_form; } else { bad_form: JS_FreeCString(ctx, form); JS_ThrowRangeError(ctx, "bad normalization form"); fail1: js_free(ctx, buf); return JS_EXCEPTION; } JS_FreeCString(ctx, form); } out_len = unicode_normalize(&out_buf, buf, buf_len, n_type, ctx->rt, (DynBufReallocFunc *)js_realloc_rt); js_free(ctx, buf); if (out_len < 0) return JS_EXCEPTION; val = JS_NewUTF32String(ctx, out_buf, out_len); js_free(ctx, out_buf); return val; }
O1
c
js_string_normalize: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %r8, %r12 movl %ecx, %r13d movq %rdi, %rbx callq 0x425ff movq %rax, %r15 movq %rdx, %r14 cmpl $0x6, %r14d jne 0x7d03e movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 movq %r15, %r12 andq %rax, %r12 jmp 0x7d265 movq %r12, 0x38(%rsp) movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx xorl %ecx, %ecx callq 0x27add movq %rdx, %r12 movq %rax, (%rsp) movl $0xffffffff, %ebp # imm = 0xFFFFFFFF cmpl $0x6, %r12d jne 0x7d27d movq 0x18(%rbx), %rdi movq %r15, %rsi movq %r14, %rdx callq 0x1d8c6 movl $0x6, %r14d xorl %r15d, %r15d testl %ebp, %ebp js 0x7d22d testl %r13d, %r13d je 0x7d0a0 movq 0x38(%rsp), %rax movq 0x8(%rax), %rcx cmpl $0x3, %ecx jne 0x7d158 movq 0x28(%rsp), %r12 movq 0x18(%rbx), %r8 leaq -0x605ee(%rip), %r9 # 0x1cac2 leaq 0x20(%rsp), %rdi movq %r12, %rsi movl %ebp, %edx movl %r15d, %ecx callq 0x989bb movl %eax, %ebp movq %rbx, %rdi movq %r12, %rsi callq 0x1cb99 testl %ebp, %ebp js 0x7d22a movq 0x20(%rsp), %r15 movq %rbx, (%rsp) movl %ebp, 0x14(%rsp) movl $0x0, 0x10(%rsp) movq $0x0, 0x18(%rsp) movq %rbx, %rdi movl %ebp, %esi xorl %edx, %edx callq 0x20b73 movq %rax, 0x8(%rsp) testq %rax, %rax je 0x7d2ab testl %ebp, %ebp je 0x7d138 movl %ebp, %r12d xorl %r13d, %r13d movq %rsp, %r14 movl (%r15,%r13,4), %esi movq %r14, %rdi callq 0x333f0 testl %eax, %eax jne 0x7d232 incq %r13 cmpq %r13, %r12 jne 0x7d11c movq %rsp, %rdi callq 0x33444 movq %rax, %r15 movq %rdx, %r14 movabsq $-0x100000000, %r12 # imm = 0xFFFFFFFF00000000 andq %rax, %r12 jmp 0x7d255 movq (%rax), %rdx leaq 0x40(%rsp), %rsi movq %rbx, %rdi xorl %r8d, %r8d callq 0x20bf7 testq %rax, %rax je 0x7d21d cmpb $0x4e, (%rax) jne 0x7d1e7 cmpb $0x46, 0x1(%rax) jne 0x7d1e7 leaq 0x2(%rax), %rdx leaq 0x3(%rax), %rsi xorl %ecx, %ecx cmpb $0x4b, 0x2(%rax) cmoveq %rsi, %rdx sete %cl movzbl 0x2(%rax,%rcx), %esi leal -0x43(%rsi), %edi cmpb $0x1, %dil ja 0x7d1e7 subq %rax, %rdx incq %rdx cmpq 0x40(%rsp), %rdx jne 0x7d1e7 addl %ecx, %ecx leal (%rsi,%rcx), %r15d addl $-0x43, %r15d movq 0x18(%rbx), %rdi movl -0x18(%rax), %ecx leal -0x1(%rcx), %edx movl %edx, -0x18(%rax) cmpl $0x1, %ecx jg 0x7d0a0 addq $-0x18, %rax movq %rax, %rsi movq $-0x7, %rdx callq 0x21266 jmp 0x7d0a0 movq 0x18(%rbx), %rdi movl -0x18(%rax), %ecx leal -0x1(%rcx), %edx movl %edx, -0x18(%rax) cmpl $0x1, %ecx jg 0x7d20c addq $-0x18, %rax movq %rax, %rsi movq $-0x7, %rdx callq 0x21266 leaq 0x25010(%rip), %rsi # 0xa2223 movq %rbx, %rdi xorl %eax, %eax callq 0x20add movq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x1cb99 xorl %r15d, %r15d xorl %r12d, %r12d jmp 0x7d265 movq (%rsp), %rdi movq 0x8(%rsp), %rsi callq 0x1cb99 movq $0x0, 0x8(%rsp) movl $0x6, %r14d xorl %r15d, %r15d xorl %r12d, %r12d orq %r12, %r15 movq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x1cb99 movl %r15d, %eax orq %r12, %rax movq %r14, %rdx addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq (%rsp), %rsi movq %rsi, 0x30(%rsp) leaq 0x28(%rsp), %rdx movq %rbx, %rdi callq 0x127cb movl %eax, %ebp movq 0x18(%rbx), %rdi movq 0x30(%rsp), %rsi movq %r12, %rdx callq 0x1d8c6 jmp 0x7d069 movl $0x0, 0x14(%rsp) movl $0xffffffff, 0x1c(%rsp) # imm = 0xFFFFFFFF jmp 0x7d249
js_string_normalize: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r12, r8 mov r13d, ecx mov rbx, rdi call JS_ToStringCheckObject mov r15, rax mov r14, rdx cmp r14d, 6 jnz short loc_7D03E mov rax, 0FFFFFFFF00000000h mov r12, r15 and r12, rax jmp loc_7D265 loc_7D03E: mov [rsp+78h+var_40], r12 mov rdi, rbx mov rsi, r15 mov rdx, r14 xor ecx, ecx call JS_ToStringInternal mov r12, rdx mov [rsp+78h+var_78], rax mov ebp, 0FFFFFFFFh cmp r12d, 6 jnz loc_7D27D loc_7D069: mov rdi, [rbx+18h] mov rsi, r15 mov rdx, r14 call JS_FreeValueRT mov r14d, 6 xor r15d, r15d test ebp, ebp js loc_7D22D test r13d, r13d jz short loc_7D0A0 mov rax, [rsp+78h+var_40] mov rcx, [rax+8] cmp ecx, 3 jnz loc_7D158 loc_7D0A0: mov r12, [rsp+78h+var_50] mov r8, [rbx+18h] lea r9, js_realloc_rt lea rdi, [rsp+78h+var_58] mov rsi, r12 mov edx, ebp mov ecx, r15d call unicode_normalize mov ebp, eax mov rdi, rbx mov rsi, r12 call js_free test ebp, ebp js loc_7D22A mov r15, [rsp+78h+var_58] mov [rsp+78h+var_78], rbx mov [rsp+78h+var_64], ebp mov [rsp+78h+var_68], 0 mov [rsp+78h+var_60], 0 mov rdi, rbx mov esi, ebp xor edx, edx call js_alloc_string mov [rsp+78h+var_70], rax test rax, rax jz loc_7D2AB test ebp, ebp jz short loc_7D138 mov r12d, ebp xor r13d, r13d mov r14, rsp loc_7D11C: mov esi, [r15+r13*4] mov rdi, r14 call string_buffer_putc test eax, eax jnz loc_7D232 inc r13 cmp r12, r13 jnz short loc_7D11C loc_7D138: mov rdi, rsp call string_buffer_end mov r15, rax mov r14, rdx mov r12, 0FFFFFFFF00000000h and r12, rax jmp loc_7D255 loc_7D158: mov rdx, [rax] lea rsi, [rsp+78h+var_38] mov rdi, rbx xor r8d, r8d call JS_ToCStringLen2 test rax, rax jz loc_7D21D cmp byte ptr [rax], 4Eh ; 'N' jnz short loc_7D1E7 cmp byte ptr [rax+1], 46h ; 'F' jnz short loc_7D1E7 lea rdx, [rax+2] lea rsi, [rax+3] xor ecx, ecx cmp byte ptr [rax+2], 4Bh ; 'K' cmovz rdx, rsi setz cl movzx esi, byte ptr [rax+rcx+2] lea edi, [rsi-43h] cmp dil, 1 ja short loc_7D1E7 sub rdx, rax inc rdx cmp rdx, [rsp+78h+var_38] jnz short loc_7D1E7 add ecx, ecx lea r15d, [rsi+rcx] add r15d, 0FFFFFFBDh mov rdi, [rbx+18h] mov ecx, [rax-18h] lea edx, [rcx-1] mov [rax-18h], edx cmp ecx, 1 jg loc_7D0A0 add rax, 0FFFFFFFFFFFFFFE8h mov rsi, rax mov rdx, 0FFFFFFFFFFFFFFF9h call js_free_value_rt jmp loc_7D0A0 loc_7D1E7: mov rdi, [rbx+18h] mov ecx, [rax-18h] lea edx, [rcx-1] mov [rax-18h], edx cmp ecx, 1 jg short loc_7D20C add rax, 0FFFFFFFFFFFFFFE8h mov rsi, rax mov rdx, 0FFFFFFFFFFFFFFF9h call js_free_value_rt loc_7D20C: lea rsi, aBadNormalizati; "bad normalization form" mov rdi, rbx xor eax, eax call JS_ThrowRangeError loc_7D21D: mov rsi, [rsp+78h+var_50] mov rdi, rbx call js_free loc_7D22A: xor r15d, r15d loc_7D22D: xor r12d, r12d jmp short loc_7D265 loc_7D232: mov rdi, [rsp+78h+var_78] mov rsi, [rsp+78h+var_70] call js_free mov [rsp+78h+var_70], 0 loc_7D249: mov r14d, 6 xor r15d, r15d xor r12d, r12d loc_7D255: or r15, r12 mov rsi, [rsp+78h+var_58] mov rdi, rbx call js_free loc_7D265: mov eax, r15d or rax, r12 mov rdx, r14 add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7D27D: mov rsi, [rsp+78h+var_78] mov [rsp+78h+var_48], rsi lea rdx, [rsp+78h+var_50] mov rdi, rbx call to_utf32_buf mov ebp, eax mov rdi, [rbx+18h] mov rsi, [rsp+78h+var_48] mov rdx, r12 call JS_FreeValueRT jmp loc_7D069 loc_7D2AB: mov [rsp+78h+var_64], 0 mov dword ptr [rsp+78h+var_60+4], 0FFFFFFFFh jmp short loc_7D249
unsigned long long js_string_normalize( _DWORD *a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { int v15; // r13d unsigned long long v17; // rax long long v18; // rdx long long v19; // r8 long long v20; // r9 __m128 v21; // xmm4 __m128 v22; // xmm5 unsigned long long v23; // r15 long long v24; // r14 unsigned long long v25; // r12 _DWORD *v26; // rax long long v27; // rdx long long v28; // r12 int v29; // ebp long long v30; // rcx long long v31; // r12 int v32; // ebp long long v33; // r15 long long v34; // r13 _BYTE *v35; // rax long long v36; // r8 long long v37; // r9 __m128 v38; // xmm4 __m128 v39; // xmm5 _BYTE *v40; // rdx long long v41; // rcx int v42; // esi long long v43; // rdi int v44; // ecx long long v45; // rdi long long v46; // rcx long long v47; // rdx _DWORD *v49; // [rsp+0h] [rbp-78h] BYREF long long v50; // [rsp+8h] [rbp-70h] int v51; // [rsp+10h] [rbp-68h] int v52; // [rsp+14h] [rbp-64h] long long v53; // [rsp+18h] [rbp-60h] long long v54; // [rsp+20h] [rbp-58h] BYREF long long v55; // [rsp+28h] [rbp-50h] BYREF _DWORD *v56; // [rsp+30h] [rbp-48h] long long *v57; // [rsp+38h] [rbp-40h] long long v58[7]; // [rsp+40h] [rbp-38h] BYREF v15 = a4; v17 = JS_ToStringCheckObject((long long)a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v23 = v17; v24 = v18; if ( (_DWORD)v18 != 6 ) { v57 = (long long *)a5; v26 = (_DWORD *)JS_ToStringInternal((long long)a1, v17, v18, 0, v19, v20, a7, a8, a9, a10, v21, v22, a13, a14); v28 = v27; v49 = v26; v29 = -1; if ( (_DWORD)v27 != 6 ) { v56 = v49; v29 = to_utf32_buf((long long)a1, (long long)v49, &v55); JS_FreeValueRT(*((_QWORD *)a1 + 3), v56, v28); } JS_FreeValueRT(*((_QWORD *)a1 + 3), (_DWORD *)v23, v24); LODWORD(v23) = 0; if ( v29 < 0 ) goto LABEL_29; if ( !v15 ) goto LABEL_8; v30 = v57[1]; if ( (_DWORD)v30 == 3 ) goto LABEL_8; v35 = (_BYTE *)JS_ToCStringLen2((long long)a1, v58, *v57, v30, 0); if ( v35 ) { if ( *v35 == 78 && v35[1] == 70 ) { v40 = v35 + 2; v41 = 0LL; if ( v35[2] == 75 ) v40 = v35 + 3; LOBYTE(v41) = v35[2] == 75; v42 = (unsigned __int8)v35[v41 + 2]; if ( (unsigned __int8)(v42 - 67) <= 1u && v40 - v35 + 1 == v58[0] ) { LODWORD(v23) = v42 + 2 * v41 - 67; v43 = *((_QWORD *)a1 + 3); v44 = *((_DWORD *)v35 - 6); *((_DWORD *)v35 - 6) = v44 - 1; if ( v44 <= 1 ) js_free_value_rt(v43, (_QWORD *)v35 - 3, -7); LABEL_8: v31 = v55; v32 = unicode_normalize(&v54, v55, (unsigned int)v29, (unsigned int)v23, *((_QWORD *)a1 + 3), js_realloc_rt); js_free((long long)a1, v31); if ( v32 >= 0 ) { v33 = v54; v49 = a1; v52 = v32; v51 = 0; v53 = 0LL; v50 = js_alloc_string((long long)a1, (unsigned int)v32, 0); if ( v50 ) { if ( !v32 ) { LABEL_14: v23 = (unsigned long long)string_buffer_end((long long)&v49); v25 = v23 & 0xFFFFFFFF00000000LL; LABEL_32: LODWORD(v23) = v25 | v23; js_free((long long)a1, v54); return v25 | (unsigned int)v23; } v34 = 0LL; while ( !(unsigned int)string_buffer_putc((long long)&v49, *(_DWORD *)(v33 + 4 * v34)) ) { if ( v32 == ++v34 ) goto LABEL_14; } js_free((long long)v49, v50); v50 = 0LL; } else { v52 = 0; HIDWORD(v53) = -1; } LODWORD(v23) = 0; v25 = 0LL; goto LABEL_32; } goto LABEL_28; } } v45 = *((_QWORD *)a1 + 3); v46 = *((unsigned int *)v35 - 6); v47 = (unsigned int)(v46 - 1); *((_DWORD *)v35 - 6) = v47; if ( (int)v46 <= 1 ) js_free_value_rt(v45, (_QWORD *)v35 - 3, -7); JS_ThrowRangeError( (long long)a1, (long long)"bad normalization form", v47, v46, v36, v37, a7, a8, a9, a10, v38, v39, a13, a14, (char)v49); } js_free((long long)a1, v55); LABEL_28: LODWORD(v23) = 0; LABEL_29: v25 = 0LL; return v25 | (unsigned int)v23; } v25 = v17 & 0xFFFFFFFF00000000LL; return v25 | (unsigned int)v23; }
js_string_normalize: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R12,R8 MOV R13D,ECX MOV RBX,RDI CALL 0x001425ff MOV R15,RAX MOV R14,RDX CMP R14D,0x6 JNZ 0x0017d03e MOV RAX,-0x100000000 MOV R12,R15 AND R12,RAX JMP 0x0017d265 LAB_0017d03e: MOV qword ptr [RSP + 0x38],R12 MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 XOR ECX,ECX CALL 0x00127add MOV R12,RDX MOV qword ptr [RSP],RAX MOV EBP,0xffffffff CMP R12D,0x6 JNZ 0x0017d27d LAB_0017d069: MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R15 MOV RDX,R14 CALL 0x0011d8c6 MOV R14D,0x6 XOR R15D,R15D TEST EBP,EBP JS 0x0017d22d TEST R13D,R13D JZ 0x0017d0a0 MOV RAX,qword ptr [RSP + 0x38] MOV RCX,qword ptr [RAX + 0x8] CMP ECX,0x3 JNZ 0x0017d158 LAB_0017d0a0: MOV R12,qword ptr [RSP + 0x28] MOV R8,qword ptr [RBX + 0x18] LEA R9,[0x11cac2] LEA RDI,[RSP + 0x20] MOV RSI,R12 MOV EDX,EBP MOV ECX,R15D CALL 0x001989bb MOV EBP,EAX MOV RDI,RBX MOV RSI,R12 CALL 0x0011cb99 TEST EBP,EBP JS 0x0017d22a MOV R15,qword ptr [RSP + 0x20] MOV qword ptr [RSP],RBX MOV dword ptr [RSP + 0x14],EBP MOV dword ptr [RSP + 0x10],0x0 MOV qword ptr [RSP + 0x18],0x0 MOV RDI,RBX MOV ESI,EBP XOR EDX,EDX CALL 0x00120b73 MOV qword ptr [RSP + 0x8],RAX TEST RAX,RAX JZ 0x0017d2ab TEST EBP,EBP JZ 0x0017d138 MOV R12D,EBP XOR R13D,R13D MOV R14,RSP LAB_0017d11c: MOV ESI,dword ptr [R15 + R13*0x4] MOV RDI,R14 CALL 0x001333f0 TEST EAX,EAX JNZ 0x0017d232 INC R13 CMP R12,R13 JNZ 0x0017d11c LAB_0017d138: MOV RDI,RSP CALL 0x00133444 MOV R15,RAX MOV R14,RDX MOV R12,-0x100000000 AND R12,RAX JMP 0x0017d255 LAB_0017d158: MOV RDX,qword ptr [RAX] LEA RSI,[RSP + 0x40] MOV RDI,RBX XOR R8D,R8D CALL 0x00120bf7 TEST RAX,RAX JZ 0x0017d21d CMP byte ptr [RAX],0x4e JNZ 0x0017d1e7 CMP byte ptr [RAX + 0x1],0x46 JNZ 0x0017d1e7 LEA RDX,[RAX + 0x2] LEA RSI,[RAX + 0x3] XOR ECX,ECX CMP byte ptr [RAX + 0x2],0x4b CMOVZ RDX,RSI SETZ CL MOVZX ESI,byte ptr [RAX + RCX*0x1 + 0x2] LEA EDI,[RSI + -0x43] CMP DIL,0x1 JA 0x0017d1e7 SUB RDX,RAX INC RDX CMP RDX,qword ptr [RSP + 0x40] JNZ 0x0017d1e7 ADD ECX,ECX LEA R15D,[RSI + RCX*0x1] ADD R15D,-0x43 MOV RDI,qword ptr [RBX + 0x18] MOV ECX,dword ptr [RAX + -0x18] LEA EDX,[RCX + -0x1] MOV dword ptr [RAX + -0x18],EDX CMP ECX,0x1 JG 0x0017d0a0 ADD RAX,-0x18 MOV RSI,RAX MOV RDX,-0x7 CALL 0x00121266 JMP 0x0017d0a0 LAB_0017d1e7: MOV RDI,qword ptr [RBX + 0x18] MOV ECX,dword ptr [RAX + -0x18] LEA EDX,[RCX + -0x1] MOV dword ptr [RAX + -0x18],EDX CMP ECX,0x1 JG 0x0017d20c ADD RAX,-0x18 MOV RSI,RAX MOV RDX,-0x7 CALL 0x00121266 LAB_0017d20c: LEA RSI,[0x1a2223] MOV RDI,RBX XOR EAX,EAX CALL 0x00120add LAB_0017d21d: MOV RSI,qword ptr [RSP + 0x28] MOV RDI,RBX CALL 0x0011cb99 LAB_0017d22a: XOR R15D,R15D LAB_0017d22d: XOR R12D,R12D JMP 0x0017d265 LAB_0017d232: MOV RDI,qword ptr [RSP] MOV RSI,qword ptr [RSP + 0x8] CALL 0x0011cb99 MOV qword ptr [RSP + 0x8],0x0 LAB_0017d249: MOV R14D,0x6 XOR R15D,R15D XOR R12D,R12D LAB_0017d255: OR R15,R12 MOV RSI,qword ptr [RSP + 0x20] MOV RDI,RBX CALL 0x0011cb99 LAB_0017d265: MOV EAX,R15D OR RAX,R12 MOV RDX,R14 ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017d27d: MOV RSI,qword ptr [RSP] MOV qword ptr [RSP + 0x30],RSI LEA RDX,[RSP + 0x28] MOV RDI,RBX CALL 0x001127cb MOV EBP,EAX MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RSP + 0x30] MOV RDX,R12 CALL 0x0011d8c6 JMP 0x0017d069 LAB_0017d2ab: MOV dword ptr [RSP + 0x14],0x0 MOV dword ptr [RSP + 0x1c],0xffffffff JMP 0x0017d249
int1 [16] js_string_normalize(long param_1,int8 param_2,int8 param_3,int param_4, int8 *param_5) { int iVar1; int8 uVar2; long lVar3; uint uVar4; int iVar5; char *pcVar6; char *pcVar7; ulong uVar8; int iVar9; bool bVar10; int1 auVar11 [16]; int1 auVar12 [16]; long local_78; long local_70; int4 local_68; uint local_64; int8 local_60; long local_58; int8 local_50; long local_48; int8 *local_40; char *local_38; auVar11 = JS_ToStringCheckObject(); uVar8 = auVar11._0_8_; if (auVar11._8_4_ == 6) { uVar8 = uVar8 & 0xffffffff00000000; goto LAB_0017d265; } local_40 = param_5; auVar12 = JS_ToStringInternal(param_1,uVar8,auVar11._8_8_,0); local_78 = auVar12._0_8_; iVar5 = -1; if (auVar12._8_4_ != 6) { local_48 = local_78; iVar5 = to_utf32_buf(param_1,local_78,&local_50); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_48,auVar12._8_8_); } JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar8,auVar11._8_8_); iVar9 = 0; if (-1 < iVar5) { if ((param_4 == 0) || ((int)local_40[1] == 3)) { LAB_0017d0a0: uVar4 = unicode_normalize(&local_58,local_50,iVar5,iVar9,*(int8 *)(param_1 + 0x18), js_realloc_rt); js_free(param_1,local_50); lVar3 = local_58; if (-1 < (int)uVar4) { local_68 = 0; local_60 = 0; local_78 = param_1; local_64 = uVar4; local_70 = js_alloc_string(param_1,uVar4,0); if (local_70 == 0) { local_64 = 0; local_60 = CONCAT44(0xffffffff,(int4)local_60); LAB_0017d249: auVar11 = ZEXT816(6) << 0x40; uVar8 = 0; } else { if (uVar4 != 0) { uVar8 = 0; do { iVar5 = string_buffer_putc(&local_78,*(int4 *)(lVar3 + uVar8 * 4)); if (iVar5 != 0) { js_free(local_78,local_70); local_70 = 0; goto LAB_0017d249; } uVar8 = uVar8 + 1; } while (uVar4 != uVar8); } auVar11 = string_buffer_end(&local_78); uVar8 = auVar11._0_8_ & 0xffffffff00000000; } js_free(param_1,local_58); goto LAB_0017d265; } } else { pcVar6 = (char *)JS_ToCStringLen2(param_1,&local_38,*local_40,local_40[1],0); if (pcVar6 != (char *)0x0) { if ((*pcVar6 == 'N') && (pcVar6[1] == 'F')) { bVar10 = pcVar6[2] == 'K'; pcVar7 = pcVar6 + 2; if (bVar10) { pcVar7 = pcVar6 + 3; } if (((byte)(pcVar6[(ulong)bVar10 + 2] + 0xbdU) < 2) && (pcVar7 + (1 - (long)pcVar6) == local_38)) { iVar9 = (uint)(byte)pcVar6[(ulong)bVar10 + 2] + (uint)bVar10 * 2 + -0x43; uVar2 = *(int8 *)(param_1 + 0x18); iVar1 = *(int *)(pcVar6 + -0x18); *(int *)(pcVar6 + -0x18) = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(uVar2,pcVar6 + -0x18,0xfffffffffffffff9); } goto LAB_0017d0a0; } } uVar2 = *(int8 *)(param_1 + 0x18); iVar5 = *(int *)(pcVar6 + -0x18); *(int *)(pcVar6 + -0x18) = iVar5 + -1; if (iVar5 < 2) { js_free_value_rt(uVar2,pcVar6 + -0x18,0xfffffffffffffff9); } JS_ThrowRangeError(param_1,"bad normalization form"); } js_free(param_1,local_50); } } auVar11 = ZEXT816(6) << 0x40; uVar8 = 0; LAB_0017d265: auVar12._0_8_ = auVar11._0_8_ & 0xffffffff | uVar8; auVar12._8_8_ = auVar11._8_8_; return auVar12; }
11,613
plutovg_canvas_restore
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-canvas.c
void plutovg_canvas_restore(plutovg_canvas_t* canvas) { if(canvas->state->next == NULL) return; plutovg_state_t* old_state = canvas->state; canvas->state = old_state->next; plutovg_state_reset(old_state); old_state->next = canvas->freed_state; canvas->freed_state = old_state; }
O1
c
plutovg_canvas_restore: pushq %r14 pushq %rbx pushq %rax movq 0x18(%rdi), %r14 movq 0x98(%r14), %rax testq %rax, %rax je 0x2386c movq %rdi, %rbx movq %rax, 0x18(%rdi) movq (%r14), %rdi callq 0x2a181 movq 0x8(%r14), %rdi callq 0x24eb6 xorps %xmm0, %xmm0 movups %xmm0, 0xc(%r14) movups %xmm0, (%r14) movsd 0x2118b(%rip), %xmm0 # 0x44990 movups %xmm0, 0x1c(%r14) movaps 0x1f8ff(%rip), %xmm0 # 0x43110 movups %xmm0, 0x2c(%r14) movaps 0x21183(%rip), %xmm0 # 0x449a0 movups %xmm0, 0x3c(%r14) movl $0x0, 0x58(%r14) leaq 0x60(%r14), %rdi callq 0x2cc73 movabsq $0x300000000, %rax # imm = 0x300000000 movq %rax, 0x80(%r14) movabsq $0x3f80000041400000, %rax # imm = 0x3F80000041400000 movq %rax, 0x88(%r14) movb $0x0, 0x90(%r14) movq 0x20(%rbx), %rax movq %rax, 0x98(%r14) movq %r14, 0x20(%rbx) addq $0x8, %rsp popq %rbx popq %r14 retq
plutovg_canvas_restore: push r14 push rbx push rax mov r14, [rdi+18h] mov rax, [r14+98h] test rax, rax jz loc_2386C mov rbx, rdi mov [rdi+18h], rax mov rdi, [r14] call plutovg_paint_destroy mov rdi, [r14+8] call plutovg_font_face_destroy xorps xmm0, xmm0 movups xmmword ptr [r14+0Ch], xmm0 movups xmmword ptr [r14], xmm0 movsd xmm0, cs:qword_44990 movups xmmword ptr [r14+1Ch], xmm0 movaps xmm0, cs:xmmword_43110 movups xmmword ptr [r14+2Ch], xmm0 movaps xmm0, cs:xmmword_449A0 movups xmmword ptr [r14+3Ch], xmm0 mov dword ptr [r14+58h], 0 lea rdi, [r14+60h] call plutovg_span_buffer_reset mov rax, 300000000h mov [r14+80h], rax mov rax, 3F80000041400000h mov [r14+88h], rax mov byte ptr [r14+90h], 0 mov rax, [rbx+20h] mov [r14+98h], rax mov [rbx+20h], r14 loc_2386C: add rsp, 8 pop rbx pop r14 retn
long long plutovg_canvas_restore(long long a1) { long long v1; // r14 long long result; // rax v1 = *(_QWORD *)(a1 + 24); result = *(_QWORD *)(v1 + 152); if ( result ) { *(_QWORD *)(a1 + 24) = result; plutovg_paint_destroy(*(_QWORD *)v1); plutovg_font_face_destroy(*(_QWORD *)(v1 + 8)); *(_OWORD *)(v1 + 12) = 0LL; *(_OWORD *)v1 = 0LL; *(_OWORD *)(v1 + 28) = 0x3F8000003F800000uLL; *(_OWORD *)(v1 + 44) = xmmword_43110; *(_OWORD *)(v1 + 60) = xmmword_449A0; *(_DWORD *)(v1 + 88) = 0; plutovg_span_buffer_reset(v1 + 96); *(_QWORD *)(v1 + 128) = 0x300000000LL; *(_QWORD *)(v1 + 136) = 0x3F80000041400000LL; *(_BYTE *)(v1 + 144) = 0; result = *(_QWORD *)(a1 + 32); *(_QWORD *)(v1 + 152) = result; *(_QWORD *)(a1 + 32) = v1; } return result; }
plutovg_canvas_restore: PUSH R14 PUSH RBX PUSH RAX MOV R14,qword ptr [RDI + 0x18] MOV RAX,qword ptr [R14 + 0x98] TEST RAX,RAX JZ 0x0012386c MOV RBX,RDI MOV qword ptr [RDI + 0x18],RAX MOV RDI,qword ptr [R14] CALL 0x0012a181 MOV RDI,qword ptr [R14 + 0x8] CALL 0x00124eb6 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0xc],XMM0 MOVUPS xmmword ptr [R14],XMM0 MOVSD XMM0,qword ptr [0x00144990] MOVUPS xmmword ptr [R14 + 0x1c],XMM0 MOVAPS XMM0,xmmword ptr [0x00143110] MOVUPS xmmword ptr [R14 + 0x2c],XMM0 MOVAPS XMM0,xmmword ptr [0x001449a0] MOVUPS xmmword ptr [R14 + 0x3c],XMM0 MOV dword ptr [R14 + 0x58],0x0 LEA RDI,[R14 + 0x60] CALL 0x0012cc73 MOV RAX,0x300000000 MOV qword ptr [R14 + 0x80],RAX MOV RAX,0x3f80000041400000 MOV qword ptr [R14 + 0x88],RAX MOV byte ptr [R14 + 0x90],0x0 MOV RAX,qword ptr [RBX + 0x20] MOV qword ptr [R14 + 0x98],RAX MOV qword ptr [RBX + 0x20],R14 LAB_0012386c: ADD RSP,0x8 POP RBX POP R14 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void plutovg_canvas_restore(long param_1) { int8 *puVar1; int8 uVar2; int4 uVar3; int4 uVar4; int4 uVar5; puVar1 = *(int8 **)(param_1 + 0x18); if (puVar1[0x13] != 0) { *(int8 *)(param_1 + 0x18) = puVar1[0x13]; plutovg_paint_destroy(*puVar1); plutovg_font_face_destroy(puVar1[1]); *(int8 *)((long)puVar1 + 0xc) = 0; *(int8 *)((long)puVar1 + 0x14) = 0; *puVar1 = 0; puVar1[1] = 0; *(int8 *)((long)puVar1 + 0x1c) = DAT_00144990; *(int8 *)((long)puVar1 + 0x24) = 0; uVar2 = _UNK_00143118; *(int8 *)((long)puVar1 + 0x2c) = _DAT_00143110; *(int8 *)((long)puVar1 + 0x34) = uVar2; uVar5 = _UNK_001449ac; uVar4 = _UNK_001449a8; uVar3 = _UNK_001449a4; *(int4 *)((long)puVar1 + 0x3c) = _DAT_001449a0; *(int4 *)(puVar1 + 8) = uVar3; *(int4 *)((long)puVar1 + 0x44) = uVar4; *(int4 *)(puVar1 + 9) = uVar5; *(int4 *)(puVar1 + 0xb) = 0; plutovg_span_buffer_reset(puVar1 + 0xc); puVar1[0x10] = 0x300000000; puVar1[0x11] = 0x3f80000041400000; *(int1 *)(puVar1 + 0x12) = 0; puVar1[0x13] = *(int8 *)(param_1 + 0x20); *(int8 **)(param_1 + 0x20) = puVar1; } return; }
11,614
plutovg_canvas_restore
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-canvas.c
void plutovg_canvas_restore(plutovg_canvas_t* canvas) { if(canvas->state->next == NULL) return; plutovg_state_t* old_state = canvas->state; canvas->state = old_state->next; plutovg_state_reset(old_state); old_state->next = canvas->freed_state; canvas->freed_state = old_state; }
O2
c
plutovg_canvas_restore: pushq %r14 pushq %rbx pushq %rax movq 0x18(%rdi), %r14 movq 0x98(%r14), %rax testq %rax, %rax je 0x1fe33 movq %rdi, %rbx movq %rax, 0x18(%rdi) movq (%r14), %rdi callq 0x25458 movq 0x8(%r14), %rdi callq 0x21290 xorps %xmm0, %xmm0 movups %xmm0, 0xc(%r14) movups %xmm0, (%r14) movsd 0x1bc67(%rip), %xmm0 # 0x3ba30 movups %xmm0, 0x1c(%r14) movaps 0x1a30b(%rip), %xmm0 # 0x3a0e0 movups %xmm0, 0x2c(%r14) andq $0x0, 0x3c(%r14) movss 0x1ac29(%rip), %xmm0 # 0x3aa10 movlps %xmm0, 0x44(%r14) andl $0x0, 0x58(%r14) leaq 0x60(%r14), %rdi callq 0x2785d movabsq $0x300000000, %rax # imm = 0x300000000 movq %rax, 0x80(%r14) movsd 0x1bc2d(%rip), %xmm0 # 0x3ba40 movsd %xmm0, 0x88(%r14) movb $0x0, 0x90(%r14) movq 0x20(%rbx), %rax movq %rax, 0x98(%r14) movq %r14, 0x20(%rbx) addq $0x8, %rsp popq %rbx popq %r14 retq
plutovg_canvas_restore: push r14 push rbx push rax mov r14, [rdi+18h] mov rax, [r14+98h] test rax, rax jz loc_1FE33 mov rbx, rdi mov [rdi+18h], rax mov rdi, [r14] call plutovg_paint_destroy mov rdi, [r14+8] call plutovg_font_face_destroy xorps xmm0, xmm0 movups xmmword ptr [r14+0Ch], xmm0 movups xmmword ptr [r14], xmm0 movsd xmm0, cs:qword_3BA30 movups xmmword ptr [r14+1Ch], xmm0 movaps xmm0, cs:xmmword_3A0E0 movups xmmword ptr [r14+2Ch], xmm0 and qword ptr [r14+3Ch], 0 movss xmm0, cs:dword_3AA10 movlps qword ptr [r14+44h], xmm0 and dword ptr [r14+58h], 0 lea rdi, [r14+60h] call plutovg_span_buffer_reset mov rax, 300000000h mov [r14+80h], rax movsd xmm0, cs:qword_3BA40 movsd qword ptr [r14+88h], xmm0 mov byte ptr [r14+90h], 0 mov rax, [rbx+20h] mov [r14+98h], rax mov [rbx+20h], r14 loc_1FE33: add rsp, 8 pop rbx pop r14 retn
long long plutovg_canvas_restore(long long a1) { long long v1; // r14 long long result; // rax v1 = *(_QWORD *)(a1 + 24); result = *(_QWORD *)(v1 + 152); if ( result ) { *(_QWORD *)(a1 + 24) = result; plutovg_paint_destroy(*(_QWORD *)v1); plutovg_font_face_destroy(*(_QWORD *)(v1 + 8)); *(_OWORD *)(v1 + 12) = 0LL; *(_OWORD *)v1 = 0LL; *(_OWORD *)(v1 + 28) = 0x3F8000003F800000uLL; *(_OWORD *)(v1 + 44) = xmmword_3A0E0; *(_QWORD *)(v1 + 60) = 0LL; _mm_storel_ps((double *)(v1 + 68), (__m128)0x41200000u); *(_DWORD *)(v1 + 88) = 0; plutovg_span_buffer_reset(v1 + 96); *(_QWORD *)(v1 + 128) = 0x300000000LL; *(_QWORD *)(v1 + 136) = 0x3F80000041400000LL; *(_BYTE *)(v1 + 144) = 0; result = *(_QWORD *)(a1 + 32); *(_QWORD *)(v1 + 152) = result; *(_QWORD *)(a1 + 32) = v1; } return result; }
plutovg_canvas_restore: PUSH R14 PUSH RBX PUSH RAX MOV R14,qword ptr [RDI + 0x18] MOV RAX,qword ptr [R14 + 0x98] TEST RAX,RAX JZ 0x0011fe33 MOV RBX,RDI MOV qword ptr [RDI + 0x18],RAX MOV RDI,qword ptr [R14] CALL 0x00125458 MOV RDI,qword ptr [R14 + 0x8] CALL 0x00121290 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0xc],XMM0 MOVUPS xmmword ptr [R14],XMM0 MOVSD XMM0,qword ptr [0x0013ba30] MOVUPS xmmword ptr [R14 + 0x1c],XMM0 MOVAPS XMM0,xmmword ptr [0x0013a0e0] MOVUPS xmmword ptr [R14 + 0x2c],XMM0 AND qword ptr [R14 + 0x3c],0x0 MOVSS XMM0,dword ptr [0x0013aa10] MOVLPS qword ptr [R14 + 0x44],XMM0 AND dword ptr [R14 + 0x58],0x0 LEA RDI,[R14 + 0x60] CALL 0x0012785d MOV RAX,0x300000000 MOV qword ptr [R14 + 0x80],RAX MOVSD XMM0,qword ptr [0x0013ba40] MOVSD qword ptr [R14 + 0x88],XMM0 MOV byte ptr [R14 + 0x90],0x0 MOV RAX,qword ptr [RBX + 0x20] MOV qword ptr [R14 + 0x98],RAX MOV qword ptr [RBX + 0x20],R14 LAB_0011fe33: ADD RSP,0x8 POP RBX POP R14 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void plutovg_canvas_restore(long param_1) { int8 *puVar1; int8 uVar2; puVar1 = *(int8 **)(param_1 + 0x18); if (puVar1[0x13] != 0) { *(int8 *)(param_1 + 0x18) = puVar1[0x13]; plutovg_paint_destroy(*puVar1); plutovg_font_face_destroy(puVar1[1]); *(int8 *)((long)puVar1 + 0xc) = 0; *(int8 *)((long)puVar1 + 0x14) = 0; *puVar1 = 0; puVar1[1] = 0; *(int8 *)((long)puVar1 + 0x1c) = DAT_0013ba30; *(int8 *)((long)puVar1 + 0x24) = 0; uVar2 = _UNK_0013a0e8; *(int8 *)((long)puVar1 + 0x2c) = _DAT_0013a0e0; *(int8 *)((long)puVar1 + 0x34) = uVar2; *(int8 *)((long)puVar1 + 0x3c) = 0; *(ulong *)((long)puVar1 + 0x44) = (ulong)DAT_0013aa10; *(int4 *)(puVar1 + 0xb) = 0; plutovg_span_buffer_reset(puVar1 + 0xc); puVar1[0x10] = 0x300000000; puVar1[0x11] = DAT_0013ba40; *(int1 *)(puVar1 + 0x12) = 0; puVar1[0x13] = *(int8 *)(param_1 + 0x20); *(int8 **)(param_1 + 0x20) = puVar1; } return; }
11,615
ggml_tallocr_new
ngxson[P]ggml-easy/ggml/src/ggml-alloc.c
struct ggml_tallocr ggml_tallocr_new(ggml_backend_buffer_t buffer) { void * base = ggml_backend_buffer_get_base(buffer); size_t align = ggml_backend_buffer_get_alignment(buffer); assert(align && !(align & (align - 1))); // power of 2 struct ggml_tallocr talloc = (struct ggml_tallocr) { /*.buffer = */ buffer, /*.base = */ base, /*.alignment = */ align, /*.offset = */ aligned_offset(base, 0, align), }; return talloc; }
O1
c
ggml_tallocr_new: pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx movq %rsi, %rdi callq 0x174f0 movq %rax, %r15 movq %r14, %rdi callq 0x17730 movq %rax, %rcx movq %r14, (%rbx) movq %r15, 0x8(%rbx) movq %rax, 0x10(%rbx) movq %r15, %rax xorl %edx, %edx divq %rcx movq %rcx, %rax subq %rdx, %rax xorl %edx, %edx divq %rcx movq %rdx, 0x18(%rbx) movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq
ggml_tallocr_new: push r15 push r14 push rbx mov r14, rsi mov rbx, rdi mov rdi, rsi call _ggml_backend_buffer_get_base mov r15, rax mov rdi, r14 call _ggml_backend_buffer_get_alignment mov rcx, rax mov [rbx], r14 mov [rbx+8], r15 mov [rbx+10h], rax mov rax, r15 xor edx, edx div rcx mov rax, rcx sub rax, rdx xor edx, edx div rcx mov [rbx+18h], rdx mov rax, rbx pop rbx pop r14 pop r15 retn
_QWORD * ggml_tallocr_new(_QWORD *a1, long long a2) { unsigned long long base; // r15 unsigned long long alignment; // rax base = ggml_backend_buffer_get_base(a2); alignment = ggml_backend_buffer_get_alignment(a2); *a1 = a2; a1[1] = base; a1[2] = alignment; a1[3] = (alignment - base % alignment) % alignment; return a1; }
ggml_tallocr_new: PUSH R15 PUSH R14 PUSH RBX MOV R14,RSI MOV RBX,RDI MOV RDI,RSI CALL 0x001174f0 MOV R15,RAX MOV RDI,R14 CALL 0x00117730 MOV RCX,RAX MOV qword ptr [RBX],R14 MOV qword ptr [RBX + 0x8],R15 MOV qword ptr [RBX + 0x10],RAX MOV RAX,R15 XOR EDX,EDX DIV RCX MOV RAX,RCX SUB RAX,RDX XOR EDX,EDX DIV RCX MOV qword ptr [RBX + 0x18],RDX MOV RAX,RBX POP RBX POP R14 POP R15 RET
int8 * ggml_tallocr_new(int8 *param_1,int8 param_2) { ulong uVar1; ulong uVar2; uVar1 = ggml_backend_buffer_get_base(param_2); uVar2 = ggml_backend_buffer_get_alignment(param_2); *param_1 = param_2; param_1[1] = uVar1; param_1[2] = uVar2; param_1[3] = (uVar2 - uVar1 % uVar2) % uVar2; return param_1; }
11,616
ggml_tallocr_new
ngxson[P]ggml-easy/ggml/src/ggml-alloc.c
struct ggml_tallocr ggml_tallocr_new(ggml_backend_buffer_t buffer) { void * base = ggml_backend_buffer_get_base(buffer); size_t align = ggml_backend_buffer_get_alignment(buffer); assert(align && !(align & (align - 1))); // power of 2 struct ggml_tallocr talloc = (struct ggml_tallocr) { /*.buffer = */ buffer, /*.base = */ base, /*.alignment = */ align, /*.offset = */ aligned_offset(base, 0, align), }; return talloc; }
O2
c
ggml_tallocr_new: pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx movq %rsi, %rdi callq 0x1dce0 movq %rax, %r15 movq %r14, %rdi callq 0x1e040 movq %rax, %rcx movq %r14, (%rbx) movq %r15, 0x8(%rbx) movq %rax, 0x10(%rbx) movq %r15, %rax xorl %edx, %edx divq %rcx movq %rcx, %rax subq %rdx, %rax xorl %edx, %edx divq %rcx movq %rdx, 0x18(%rbx) movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq
ggml_tallocr_new: push r15 push r14 push rbx mov r14, rsi mov rbx, rdi mov rdi, rsi call _ggml_backend_buffer_get_base mov r15, rax mov rdi, r14 call _ggml_backend_buffer_get_alignment mov rcx, rax mov [rbx], r14 mov [rbx+8], r15 mov [rbx+10h], rax mov rax, r15 xor edx, edx div rcx mov rax, rcx sub rax, rdx xor edx, edx div rcx mov [rbx+18h], rdx mov rax, rbx pop rbx pop r14 pop r15 retn
_QWORD * ggml_tallocr_new(_QWORD *a1, long long a2) { unsigned long long base; // r15 unsigned long long alignment; // rax base = ggml_backend_buffer_get_base(a2); alignment = ggml_backend_buffer_get_alignment(a2); *a1 = a2; a1[1] = base; a1[2] = alignment; a1[3] = (alignment - base % alignment) % alignment; return a1; }
ggml_tallocr_new: PUSH R15 PUSH R14 PUSH RBX MOV R14,RSI MOV RBX,RDI MOV RDI,RSI CALL 0x0011dce0 MOV R15,RAX MOV RDI,R14 CALL 0x0011e040 MOV RCX,RAX MOV qword ptr [RBX],R14 MOV qword ptr [RBX + 0x8],R15 MOV qword ptr [RBX + 0x10],RAX MOV RAX,R15 XOR EDX,EDX DIV RCX MOV RAX,RCX SUB RAX,RDX XOR EDX,EDX DIV RCX MOV qword ptr [RBX + 0x18],RDX MOV RAX,RBX POP RBX POP R14 POP R15 RET
int8 * ggml_tallocr_new(int8 *param_1,int8 param_2) { ulong uVar1; ulong uVar2; uVar1 = ggml_backend_buffer_get_base(param_2); uVar2 = ggml_backend_buffer_get_alignment(param_2); *param_1 = param_2; param_1[1] = uVar1; param_1[2] = uVar2; param_1[3] = (uVar2 - uVar1 % uVar2) % uVar2; return param_1; }
11,617
llama_model_load_from_splits
monkey531[P]llama/src/llama.cpp
struct llama_model * llama_model_load_from_splits( const char ** paths, size_t n_paths, struct llama_model_params params) { std::vector<std::string> splits; if (n_paths == 0) { LLAMA_LOG_ERROR("%s: list of splits is empty\n", __func__); return nullptr; } for (size_t i = 0; i < n_paths; ++i) { splits.push_back(paths[i]); } return llama_model_load_from_file_impl(splits.front(), splits, params); }
O2
cpp
llama_model_load_from_splits: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp xorps %xmm0, %xmm0 movaps %xmm0, 0x50(%rsp) andq $0x0, 0x60(%rsp) testq %rsi, %rsi je 0xabd7c movq %rsi, %rbx movq %rdi, %r14 xorl %ebp, %ebp leaq 0x68(%rsp), %r15 leaq 0x4f(%rsp), %r12 leaq 0x50(%rsp), %r13 cmpq %rbp, %rbx je 0xabd40 movq (%r14,%rbp,8), %rsi movq %r15, %rdi movq %r12, %rdx callq 0xa6e20 movq %r13, %rdi movq %r15, %rsi callq 0x9d020 movq %r15, %rdi callq 0xa8d48 incq %rbp jmp 0xabd14 leaq 0x50(%rsp), %rsi movq (%rsi), %rdi leaq 0xc0(%rsp), %rax movups (%rax), %xmm0 movups 0x10(%rax), %xmm1 movups 0x20(%rax), %xmm2 movups 0x30(%rax), %xmm3 movups %xmm3, 0x30(%rsp) movups %xmm2, 0x20(%rsp) movups %xmm1, 0x10(%rsp) movups %xmm0, (%rsp) callq 0xab60b movq %rax, %rbx jmp 0xabd96 xorl %ebx, %ebx leaq 0x92654(%rip), %rsi # 0x13e3d9 leaq 0x9266a(%rip), %rdx # 0x13e3f6 pushq $0x4 popq %rdi xorl %eax, %eax callq 0xa16d0 leaq 0x50(%rsp), %rdi callq 0x9fcb0 movq %rbx, %rax addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xabdb7 movq %rax, %rbx jmp 0xabdc9 movq %rax, %rbx leaq 0x68(%rsp), %rdi callq 0xa8d48 leaq 0x50(%rsp), %rdi callq 0x9fcb0 movq %rbx, %rdi callq 0xa7540
llama_model_load_from_splits: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h xorps xmm0, xmm0 movaps [rsp+0B8h+var_68], xmm0 and [rsp+0B8h+var_58], 0 test rsi, rsi jz short loc_ABD7C mov rbx, rsi mov r14, rdi xor ebp, ebp lea r15, [rsp+0B8h+var_50] lea r12, [rsp+0B8h+var_69] lea r13, [rsp+0B8h+var_68] loc_ABD14: cmp rbx, rbp jz short loc_ABD40 mov rsi, [r14+rbp*8] mov rdi, r15 mov rdx, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rdi, r13 mov rsi, r15 call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) mov rdi, r15; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() inc rbp jmp short loc_ABD14 loc_ABD40: lea rsi, [rsp+0B8h+var_68] mov rdi, [rsi] lea rax, [rsp+0B8h+arg_0] movups xmm0, xmmword ptr [rax] movups xmm1, xmmword ptr [rax+10h] movups xmm2, xmmword ptr [rax+20h] movups xmm3, xmmword ptr [rax+30h] movups [rsp+0B8h+var_88], xmm3 movups [rsp+0B8h+var_98], xmm2 movups [rsp+0B8h+var_A8], xmm1 movups [rsp+0B8h+var_B8], xmm0 call _ZL31llama_model_load_from_file_implRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIS4_SaIS4_EE18llama_model_params; llama_model_load_from_file_impl(std::string const&,std::vector<std::string> &,llama_model_params) mov rbx, rax jmp short loc_ABD96 loc_ABD7C: xor ebx, ebx lea rsi, aSListOfSplitsI; "%s: list of splits is empty\n" lea rdx, aLlamaModelLoad_3; "llama_model_load_from_splits" push 4 pop rdi xor eax, eax call __Z18llama_log_internal14ggml_log_levelPKcz; llama_log_internal(ggml_log_level,char const*,...) loc_ABD96: lea rdi, [rsp+0B8h+var_68] call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rax, rbx add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_ABDB7: mov rbx, rax jmp short loc_ABDC9 mov rbx, rax lea rdi, [rsp+arg_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_ABDC9: lea rdi, [rsp+arg_48] call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, rbx call __Unwind_Resume
long long llama_model_load_from_splits( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, _QWORD *a7, long long a8, int a9, long long a10, long long ( *a11)(), int *a12, long long a13, char a14) { long long i; // rbp long long v15; // rbx char v17; // [rsp+4Fh] [rbp-69h] BYREF __int128 v18; // [rsp+50h] [rbp-68h] BYREF long long v19; // [rsp+60h] [rbp-58h] _BYTE v20[80]; // [rsp+68h] [rbp-50h] BYREF v18 = 0LL; v19 = 0LL; if ( a2 ) { for ( i = 0LL; a2 != i; ++i ) { std::string::basic_string<std::allocator<char>>(v20, *(_QWORD *)(a1 + 8 * i), &v17); std::vector<std::string>::emplace_back<std::string>(&v18, v20); std::string::~string(v20); } v15 = llama_model_load_from_file_impl(v18, (long long)&v18, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); } else { v15 = 0LL; llama_log_internal( 4, (unsigned int)"%s: list of splits is empty\n", (unsigned int)"llama_model_load_from_splits", a4, a5, a6); } std::vector<std::string>::~vector(&v18); return v15; }
llama_model_load_from_splits: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x50],XMM0 AND qword ptr [RSP + 0x60],0x0 TEST RSI,RSI JZ 0x001abd7c MOV RBX,RSI MOV R14,RDI XOR EBP,EBP LEA R15,[RSP + 0x68] LEA R12,[RSP + 0x4f] LEA R13,[RSP + 0x50] LAB_001abd14: CMP RBX,RBP JZ 0x001abd40 MOV RSI,qword ptr [R14 + RBP*0x8] LAB_001abd1d: MOV RDI,R15 MOV RDX,R12 CALL 0x001a6e20 LAB_001abd28: MOV RDI,R13 MOV RSI,R15 CALL 0x0019d020 MOV RDI,R15 CALL 0x001a8d48 INC RBP JMP 0x001abd14 LAB_001abd40: LEA RSI,[RSP + 0x50] MOV RDI,qword ptr [RSI] LAB_001abd48: LEA RAX,[RSP + 0xc0] MOVUPS XMM0,xmmword ptr [RAX] MOVUPS XMM1,xmmword ptr [RAX + 0x10] MOVUPS XMM2,xmmword ptr [RAX + 0x20] MOVUPS XMM3,xmmword ptr [RAX + 0x30] MOVUPS xmmword ptr [RSP + 0x30],XMM3 MOVUPS xmmword ptr [RSP + 0x20],XMM2 MOVUPS xmmword ptr [RSP + 0x10],XMM1 MOVUPS xmmword ptr [RSP],XMM0 CALL 0x001ab60b MOV RBX,RAX JMP 0x001abd96 LAB_001abd7c: XOR EBX,EBX LEA RSI,[0x23e3d9] LEA RDX,[0x23e3f6] PUSH 0x4 POP RDI XOR EAX,EAX CALL 0x001a16d0 LAB_001abd96: LEA RDI,[RSP + 0x50] CALL 0x0019fcb0 MOV RAX,RBX ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 llama_model_load_from_splits(long param_1,long param_2) { int8 uVar1; long lVar2; allocator local_69; int8 local_68; int8 uStack_60; int8 local_58; string local_50 [32]; local_68 = 0; uStack_60 = 0; local_58 = 0; if (param_2 == 0) { uVar1 = 0; llama_log_internal(4,"%s: list of splits is empty\n","llama_model_load_from_splits"); } else { for (lVar2 = 0; param_2 != lVar2; lVar2 = lVar2 + 1) { /* try { // try from 001abd1d to 001abd27 has its CatchHandler @ 001abdb7 */ std::__cxx11::string::string<std::allocator<char>> (local_50,*(char **)(param_1 + lVar2 * 8),&local_69); /* try { // try from 001abd28 to 001abd32 has its CatchHandler @ 001abdbc */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_68, local_50); std::__cxx11::string::~string(local_50); } /* try { // try from 001abd48 to 001abd95 has its CatchHandler @ 001abdb5 */ uVar1 = llama_model_load_from_file_impl(local_68); } std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_68); return uVar1; }
11,618
rlGetLocationUniform
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rlgl.h
int rlGetLocationUniform(unsigned int shaderId, const char *uniformName) { int location = -1; #if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2) location = glGetUniformLocation(shaderId, uniformName); //if (location == -1) TRACELOG(RL_LOG_WARNING, "SHADER: [ID %i] Failed to find shader uniform: %s", shaderId, uniformName); //else TRACELOG(RL_LOG_INFO, "SHADER: [ID %i] Shader uniform (%s) set at location: %i", shaderId, uniformName, location); #endif return location; }
O0
c
rlGetLocationUniform: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF movq 0x161a43(%rip), %rax # 0x218f60 movl -0x4(%rbp), %edi movq -0x10(%rbp), %rsi callq *%rax movl %eax, -0x14(%rbp) movl -0x14(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
rlGetLocationUniform: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_14], 0FFFFFFFFh mov rax, cs:glad_glGetUniformLocation mov edi, [rbp+var_4] mov rsi, [rbp+var_10] call rax ; glad_glGetUniformLocation mov [rbp+var_14], eax mov eax, [rbp+var_14] add rsp, 20h pop rbp retn
long long rlGetLocationUniform(unsigned int a1, long long a2) { return (unsigned int)glad_glGetUniformLocation(a1, a2); }
rlGetLocationUniform: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],0xffffffff MOV RAX,qword ptr [0x00318f60] MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x10] CALL RAX MOV dword ptr [RBP + -0x14],EAX MOV EAX,dword ptr [RBP + -0x14] ADD RSP,0x20 POP RBP RET
int4 rlGetLocationUniform(int4 param_1,int8 param_2) { int4 uVar1; uVar1 = (*glad_glGetUniformLocation)(param_1,param_2); return uVar1; }
11,619
rlGetLocationUniform
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rlgl.h
int rlGetLocationUniform(unsigned int shaderId, const char *uniformName) { int location = -1; #if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2) location = glGetUniformLocation(shaderId, uniformName); //if (location == -1) TRACELOG(RL_LOG_WARNING, "SHADER: [ID %i] Failed to find shader uniform: %s", shaderId, uniformName); //else TRACELOG(RL_LOG_INFO, "SHADER: [ID %i] Shader uniform (%s) set at location: %i", shaderId, uniformName, location); #endif return location; }
O2
c
rlGetLocationUniform: movq 0xd071c(%rip), %rax # 0x125ec0 jmpq *%rax
rlGetLocationUniform: mov rax, cs:glad_glGetUniformLocation jmp rax
long long rlGetLocationUniform(long long a1, long long a2) { return glad_glGetUniformLocation(a1, a2); }
rlGetLocationUniform: MOV RAX,qword ptr [0x00225ec0] JMP RAX
void rlGetLocationUniform(void) { /* WARNING: Could not recover jumptable at 0x001557a4. Too many branches */ /* WARNING: Treating indirect jump as call */ (*glad_glGetUniformLocation)(); return; }
11,620
rlGetLocationUniform
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rlgl.h
int rlGetLocationUniform(unsigned int shaderId, const char *uniformName) { int location = -1; #if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2) location = glGetUniformLocation(shaderId, uniformName); //if (location == -1) TRACELOG(RL_LOG_WARNING, "SHADER: [ID %i] Failed to find shader uniform: %s", shaderId, uniformName); //else TRACELOG(RL_LOG_INFO, "SHADER: [ID %i] Shader uniform (%s) set at location: %i", shaderId, uniformName, location); #endif return location; }
O3
c
rlGetLocationUniform: movq 0xc581e(%rip), %rax # 0x139ea0 movq %rdx, %rsi jmpq *%rax
GetShaderLocation: mov rax, cs:glad_glGetUniformLocation mov rsi, rdx jmp rax
long long GetShaderLocation(long long a1, long long a2, long long a3) { return glad_glGetUniformLocation(a1, a3); }
GetShaderLocation: MOV RAX,qword ptr [0x00239ea0] MOV RSI,RDX JMP RAX
void GetShaderLocation(int8 param_1,int8 param_2,int8 param_3) { /* WARNING: Could not recover jumptable at 0x00174685. Too many branches */ /* WARNING: Treating indirect jump as call */ (*glad_glGetUniformLocation)(param_1,param_3); return; }
11,621
my_hash_first
eloqsql/mysys/hash.c
uchar* my_hash_first(const HASH *hash, const uchar *key, size_t length, HASH_SEARCH_STATE *current_record) { uchar *res; DBUG_ASSERT(my_hash_inited(hash)); res= my_hash_first_from_hash_value(hash, hash->hash_function(hash->charset, key, length ? length : hash->key_length), key, length, current_record); return res; }
O3
c
my_hash_first: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rcx, %rbx movq %rsi, %r14 movq %rdi, %r15 movq 0x58(%rdi), %rax movq 0x68(%rdi), %rdi movq %rdx, %r12 testq %rdx, %rdx jne 0x294a8 movq 0x8(%r15), %rdx xorl %r12d, %r12d movq %r14, %rsi callq *%rax movq %r15, %rdi movl %eax, %esi movq %r14, %rdx movq %r12, %rcx movq %rbx, %r8 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x294df
my_hash_first: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rcx mov r14, rsi mov r15, rdi mov rax, [rdi+58h] mov rdi, [rdi+68h] mov r12, rdx test rdx, rdx jnz short loc_294A8 mov rdx, [r15+8] xor r12d, r12d loc_294A8: mov rsi, r14 call rax mov rdi, r15 mov esi, eax mov rdx, r14 mov rcx, r12 mov r8, rbx pop rbx pop r12 pop r14 pop r15 pop rbp jmp my_hash_first_from_hash_value
long long my_hash_first(_QWORD *a1, long long a2, long long a3, long long a4) { long long ( *v6)(long long, long long, long long); // rax long long v7; // rdi long long v8; // r12 unsigned int v9; // eax v6 = (long long ( *)(long long, long long, long long))a1[11]; v7 = a1[13]; v8 = a3; if ( !a3 ) { a3 = a1[1]; v8 = 0LL; } v9 = v6(v7, a2, a3); return my_hash_first_from_hash_value(a1, v9, a2, v8, a4); }
my_hash_first: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RCX MOV R14,RSI MOV R15,RDI MOV RAX,qword ptr [RDI + 0x58] MOV RDI,qword ptr [RDI + 0x68] MOV R12,RDX TEST RDX,RDX JNZ 0x001294a8 MOV RDX,qword ptr [R15 + 0x8] XOR R12D,R12D LAB_001294a8: MOV RSI,R14 CALL RAX MOV RDI,R15 MOV ESI,EAX MOV RDX,R14 MOV RCX,R12 MOV R8,RBX POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x001294df
void my_hash_first(long param_1,int8 param_2,long param_3,int8 param_4) { int4 uVar1; long lVar2; lVar2 = param_3; if (param_3 == 0) { param_3 = *(long *)(param_1 + 8); lVar2 = 0; } uVar1 = (**(code **)(param_1 + 0x58))(*(int8 *)(param_1 + 0x68),param_2,param_3); my_hash_first_from_hash_value(param_1,uVar1,param_2,lVar2,param_4); return; }
11,622
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::erase(__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>>, __gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>>)
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; }
O0
cpp
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::erase(__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>>, __gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>>): subq $0x98, %rsp movq %rsi, 0x88(%rsp) movq %rdx, 0x80(%rsp) movq %rdi, 0x78(%rsp) movq 0x78(%rsp), %rax movq %rax, 0x8(%rsp) leaq 0x88(%rsp), %rdi leaq 0x80(%rsp), %rsi callq 0xbc400 testb $0x1, %al jne 0xbcb31 jmp 0xbcb46 movq 0x88(%rsp), %rax movq %rax, 0x90(%rsp) jmp 0xbcc98 movq 0x88(%rsp), %rax movq %rax, 0x68(%rsp) movq 0x80(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x68(%rsp), %rdi movq 0x60(%rsp), %rsi callq 0xbcce0 movq 0x8(%rsp), %rdi movq %rax, 0x70(%rsp) callq 0xbb430 movq %rax, 0x50(%rsp) movq 0x88(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x50(%rsp), %rdi movq 0x48(%rsp), %rsi callq 0xbcce0 movq %rax, 0x58(%rsp) movq 0x88(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x70(%rsp), %rsi movq 0x30(%rsp), %rdi callq 0xbccb0 movq 0x8(%rsp), %rdi movq %rax, 0x38(%rsp) callq 0xbb460 movq %rax, 0x28(%rsp) leaq 0x38(%rsp), %rdi leaq 0x28(%rsp), %rsi callq 0xbb490 testb $0x1, %al jne 0xbcbf3 jmp 0xbcc56 leaq 0x40(%rsp), %rdi callq 0xbc600 movq %rax, %rdi callq 0xb8b10 leaq 0x40(%rsp), %rdi callq 0xbb4d0 movq %rax, (%rsp) movq 0x40(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x70(%rsp), %rsi movq 0x18(%rsp), %rdi callq 0xbccb0 movq %rax, 0x20(%rsp) leaq 0x20(%rsp), %rdi callq 0xbb4d0 movq (%rsp), %rdi movq %rax, %rsi callq 0xbcd20 leaq 0x40(%rsp), %rdi callq 0xbb510 jmp 0xbcbb1 movq 0x8(%rsp), %rdi callq 0xb6f10 movq 0x8(%rsp), %rdi movq %rax, %rsi subq 0x70(%rsp), %rsi callq 0xbcd60 movq 0x8(%rsp), %rdi callq 0xbb430 movq %rax, 0x10(%rsp) movq 0x58(%rsp), %rsi leaq 0x10(%rsp), %rdi callq 0xbce00 movq %rax, 0x90(%rsp) movq 0x90(%rsp), %rax addq $0x98, %rsp retq nopl (%rax,%rax)
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEESP_: sub rsp, 98h mov [rsp+98h+var_10], rsi mov [rsp+98h+var_18], rdx mov [rsp+98h+var_20], rdi mov rax, [rsp+98h+var_20] mov [rsp+98h+var_90], rax lea rdi, [rsp+98h+var_10] lea rsi, [rsp+98h+var_18] call _ZN9__gnu_cxxeqIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbRKNS_17__normal_iteratorIT_T0_EESR_; __gnu_cxx::operator==<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&,__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&) test al, 1 jnz short loc_BCB31 jmp short loc_BCB46 loc_BCB31: mov rax, [rsp+98h+var_10] mov [rsp+98h+var_8], rax jmp loc_BCC98 loc_BCB46: mov rax, [rsp+98h+var_10] mov [rsp+98h+var_30], rax mov rax, [rsp+98h+var_18] mov [rsp+98h+var_38], rax mov rdi, [rsp+98h+var_30] mov rsi, [rsp+98h+var_38] call _ZSt8distanceIN9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSB_11ordered_mapESt6vectorS8_blmdSaNSB_14adl_serializerESE_IhSaIhEEvEEESE_ISJ_SaISJ_EEEEENSt15iterator_traitsIT_E15difference_typeESP_SP_; std::distance<__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>>(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>,__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>) mov rdi, [rsp+98h+var_90] mov [rsp+98h+var_28], rax call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE5beginEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::begin(void) mov [rsp+98h+var_48], rax mov rax, [rsp+98h+var_10] mov [rsp+98h+var_50], rax mov rdi, [rsp+98h+var_48] mov rsi, [rsp+98h+var_50] call _ZSt8distanceIN9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSB_11ordered_mapESt6vectorS8_blmdSaNSB_14adl_serializerESE_IhSaIhEEvEEESE_ISJ_SaISJ_EEEEENSt15iterator_traitsIT_E15difference_typeESP_SP_; std::distance<__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>>(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>,__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>) mov [rsp+98h+var_40], rax mov rax, [rsp+98h+var_10] mov [rsp+98h+var_58], rax loc_BCBB1: mov rax, [rsp+98h+var_58] mov [rsp+98h+var_68], rax mov rsi, [rsp+98h+var_28] mov rdi, [rsp+98h+var_68] call _ZSt4nextIN9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSB_11ordered_mapESt6vectorS8_blmdSaNSB_14adl_serializerESE_IhSaIhEEvEEESE_ISJ_SaISJ_EEEEET_SO_NSt15iterator_traitsISO_E15difference_typeE; std::next<__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>>(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>,std::iterator_traits<__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>>::difference_type) mov rdi, [rsp+98h+var_90] mov [rsp+98h+var_60], rax call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE3endEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::end(void) mov [rsp+98h+var_70], rax lea rdi, [rsp+98h+var_60] lea rsi, [rsp+98h+var_70] call _ZN9__gnu_cxxneIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbRKNS_17__normal_iteratorIT_T0_EESR_; __gnu_cxx::operator!=<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&,__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&) test al, 1 jnz short loc_BCBF3 jmp short loc_BCC56 loc_BCBF3: lea rdi, [rsp+98h+var_58] call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator->(void) mov rdi, rax call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS8_11ordered_mapESt6vectorS5_blmdSaNS8_14adl_serializerESB_IhSaIhEEvEEED2Ev; std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::~pair() lea rdi, [rsp+98h+var_58] call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEdeEv; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator*(void) mov [rsp+98h+var_98], rax mov rax, [rsp+98h+var_58] mov [rsp+98h+var_80], rax mov rsi, [rsp+98h+var_28] mov rdi, [rsp+98h+var_80] call _ZSt4nextIN9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSB_11ordered_mapESt6vectorS8_blmdSaNSB_14adl_serializerESE_IhSaIhEEvEEESE_ISJ_SaISJ_EEEEET_SO_NSt15iterator_traitsISO_E15difference_typeE; std::next<__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>>(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>,std::iterator_traits<__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>>::difference_type) mov [rsp+98h+var_78], rax lea rdi, [rsp+98h+var_78] call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEdeEv; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator*(void) mov rdi, [rsp+98h+var_98] mov rsi, rax call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS8_11ordered_mapESt6vectorS5_blmdSaNS8_14adl_serializerESB_IhSaIhEEvEEEC2EOSG_; std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::pair(std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>&&) lea rdi, [rsp+98h+var_58] call _ZN9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEppEv; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator++(void) jmp loc_BCBB1 loc_BCC56: mov rdi, [rsp+98h+var_90] call _ZNKSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE4sizeEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::size(void) mov rdi, [rsp+98h+var_90] mov rsi, rax sub rsi, [rsp+98h+var_28] call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE6resizeEm; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::resize(ulong) mov rdi, [rsp+98h+var_90] call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE5beginEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::begin(void) mov [rsp+98h+var_88], rax mov rsi, [rsp+98h+var_40] lea rdi, [rsp+98h+var_88] call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEplEl; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator+(long) mov [rsp+98h+var_8], rax loc_BCC98: mov rax, [rsp+98h+var_8] add rsp, 98h retn
long long nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::erase( _QWORD *a1, long long a2, long long a3) { void *v3; // rax long long v4; // rax long long v5; // rax long long v7; // [rsp+0h] [rbp-98h] _QWORD v8[2]; // [rsp+10h] [rbp-88h] BYREF long long v9; // [rsp+20h] [rbp-78h] BYREF _QWORD v10[2]; // [rsp+28h] [rbp-70h] BYREF long long v11; // [rsp+38h] [rbp-60h] BYREF _QWORD v12[2]; // [rsp+40h] [rbp-58h] BYREF long long v13; // [rsp+50h] [rbp-48h] long long v14; // [rsp+58h] [rbp-40h] long long v15; // [rsp+60h] [rbp-38h] long long v16; // [rsp+68h] [rbp-30h] long long v17; // [rsp+70h] [rbp-28h] _QWORD *v18; // [rsp+78h] [rbp-20h] long long v19; // [rsp+80h] [rbp-18h] BYREF long long v20; // [rsp+88h] [rbp-10h] BYREF v20 = a2; v19 = a3; v18 = a1; if ( __gnu_cxx::operator==<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>( (long long)&v20, (long long)&v19) ) { return v20; } v16 = v20; v15 = v19; v17 = std::distance<__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>>( v20, v19); v13 = std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::begin((long long)a1); v12[1] = v20; v14 = std::distance<__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>>( v13, v20); v12[0] = v20; while ( 1 ) { v10[1] = v12[0]; v11 = std::next<__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>>( v12[0], v17); v10[0] = std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::end((long long)a1); if ( !__gnu_cxx::operator!=<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>( (long long)&v11, (long long)v10) ) break; v3 = (void *)__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator->((long long)v12); std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::~pair(v3); v7 = __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator*((long long)v12); v8[1] = v12[0]; v9 = std::next<__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>>( v12[0], v17); v4 = __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator*((long long)&v9); std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::pair( v7, v4); __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator++(v12); } v5 = std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::size(a1); std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::resize( a1, v5 - v17); v8[0] = std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::begin((long long)a1); return __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator+( v8, v14); }
erase: SUB RSP,0x98 MOV qword ptr [RSP + 0x88],RSI MOV qword ptr [RSP + 0x80],RDX MOV qword ptr [RSP + 0x78],RDI MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x8],RAX LEA RDI,[RSP + 0x88] LEA RSI,[RSP + 0x80] CALL 0x001bc400 TEST AL,0x1 JNZ 0x001bcb31 JMP 0x001bcb46 LAB_001bcb31: MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0x90],RAX JMP 0x001bcc98 LAB_001bcb46: MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0x68],RAX MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x60],RAX MOV RDI,qword ptr [RSP + 0x68] MOV RSI,qword ptr [RSP + 0x60] CALL 0x001bcce0 MOV RDI,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x70],RAX CALL 0x001bb430 MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0x48],RAX MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x48] CALL 0x001bcce0 MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0x40],RAX LAB_001bcbb1: MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x30],RAX MOV RSI,qword ptr [RSP + 0x70] MOV RDI,qword ptr [RSP + 0x30] CALL 0x001bccb0 MOV RDI,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x38],RAX CALL 0x001bb460 MOV qword ptr [RSP + 0x28],RAX LEA RDI,[RSP + 0x38] LEA RSI,[RSP + 0x28] CALL 0x001bb490 TEST AL,0x1 JNZ 0x001bcbf3 JMP 0x001bcc56 LAB_001bcbf3: LEA RDI,[RSP + 0x40] CALL 0x001bc600 MOV RDI,RAX CALL 0x001b8b10 LEA RDI,[RSP + 0x40] CALL 0x001bb4d0 MOV qword ptr [RSP],RAX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x18],RAX MOV RSI,qword ptr [RSP + 0x70] MOV RDI,qword ptr [RSP + 0x18] CALL 0x001bccb0 MOV qword ptr [RSP + 0x20],RAX LEA RDI,[RSP + 0x20] CALL 0x001bb4d0 MOV RDI,qword ptr [RSP] MOV RSI,RAX CALL 0x001bcd20 LEA RDI,[RSP + 0x40] CALL 0x001bb510 JMP 0x001bcbb1 LAB_001bcc56: MOV RDI,qword ptr [RSP + 0x8] CALL 0x001b6f10 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,RAX SUB RSI,qword ptr [RSP + 0x70] CALL 0x001bcd60 MOV RDI,qword ptr [RSP + 0x8] CALL 0x001bb430 MOV qword ptr [RSP + 0x10],RAX MOV RSI,qword ptr [RSP + 0x58] LEA RDI,[RSP + 0x10] CALL 0x001bce00 MOV qword ptr [RSP + 0x90],RAX LAB_001bcc98: MOV RAX,qword ptr [RSP + 0x90] ADD RSP,0x98 RET
/* nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::string const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > > >::erase(__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::string const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >*, std::vector<std::pair<std::__cxx11::string const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >, std::allocator<std::pair<std::__cxx11::string const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > > > >, __gnu_cxx::__normal_iterator<std::pair<std::__cxx11::string const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >*, std::vector<std::pair<std::__cxx11::string const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >, std::allocator<std::pair<std::__cxx11::string const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > > > >) */ int8 __thiscall nlohmann::json_abi_v3_11_3:: ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::erase(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> *this,int8 param_2,int8 param_3) { bool bVar1; pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *ppVar2; pair *ppVar3; long lVar4; int8 local_88; int8 local_80; int8 local_78; int8 local_70; int8 local_68; int8 local_60; int8 local_58; int8 local_50; int8 local_48; long local_40; int8 local_38; int8 local_30; long local_28; ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> *local_20; int8 local_18; int8 local_10; int8 local_8; local_20 = this; local_18 = param_3; local_10 = param_2; bVar1 = __gnu_cxx::operator==((__normal_iterator *)&local_10,(__normal_iterator *)&local_18); if (bVar1) { local_8 = local_10; } else { local_30 = local_10; local_38 = local_18; local_28 = std:: distance<__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>*,std::vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>>> (local_10,local_18); local_48 = std:: vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::begin((vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> *)this); local_50 = local_10; local_40 = std:: distance<__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>*,std::vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>>> (local_48,local_10); local_58 = local_10; while( true ) { local_68 = local_58; local_60 = std:: next<__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>*,std::vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>>> (local_58,local_28); local_70 = std:: vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::end((vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> *)this); bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_60,(__normal_iterator *)&local_70); if (!bVar1) break; ppVar2 = (pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *)__gnu_cxx:: __normal_iterator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>*,std::vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>> ::operator->((__normal_iterator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>*,std::vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>> *)&local_58); std:: pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::~pair(ppVar2); ppVar2 = (pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *)__gnu_cxx:: __normal_iterator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>*,std::vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>> ::operator*((__normal_iterator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>*,std::vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>> *)&local_58); local_80 = local_58; local_78 = std:: next<__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>*,std::vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>>> (local_58,local_28); ppVar3 = (pair *)__gnu_cxx:: __normal_iterator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>*,std::vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>> ::operator*((__normal_iterator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>*,std::vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>> *)&local_78); std:: pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::pair(ppVar2,ppVar3); __gnu_cxx:: __normal_iterator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>*,std::vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>> ::operator++((__normal_iterator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>*,std::vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>> *)&local_58); } lVar4 = std:: vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::size((vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> *)this); std:: vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::resize((vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> *)this,lVar4 - local_28); local_88 = std:: vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::begin((vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> *)this); local_8 = __gnu_cxx:: __normal_iterator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>*,std::vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>> ::operator+((__normal_iterator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>*,std::vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>> *)&local_88,local_40); } return local_8; }
11,623
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::erase(__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>>, __gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>>)
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<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::erase(__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>>, __gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>>): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx cmpq %rdx, %rsi je 0x44693 movq %rdi, %r14 subq %rbx, %rdx pushq $0x30 popq %rcx movq %rdx, %rax cqto idivq %rcx movq %rax, %r15 movq (%rdi), %rax movq %rax, (%rsp) imulq $0x30, %r15, %r13 addq %rbx, %r13 movq %r13, %r12 negq %r12 movq %rbx, %rbp cmpq 0x8(%r14), %r13 je 0x4466d movq %rbp, %rdi callq 0x43a42 movq %rbp, %rdi movq %r13, %rsi callq 0x446a6 addq $0x30, %rbp addq $0x30, %r13 addq $-0x30, %r12 jmp 0x44646 subq (%rsp), %rbx addq (%r14), %r12 negq %r12 movq %r12, %rax cqto pushq $0x30 popq %rcx idivq %rcx subq %r15, %rax movq %r14, %rdi movq %rax, %rsi callq 0x446d0 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_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEESP_: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi cmp rsi, rdx jz short loc_44693 mov r14, rdi sub rdx, rbx push 30h ; '0' pop rcx mov rax, rdx cqo idiv rcx mov r15, rax mov rax, [rdi] mov [rsp+38h+var_38], rax imul r13, r15, 30h ; '0' add r13, rbx mov r12, r13 neg r12 mov rbp, rbx loc_44646: cmp r13, [r14+8] jz short loc_4466D mov rdi, rbp; void * call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS8_11ordered_mapESt6vectorS5_blmdSaNS8_14adl_serializerESB_IhSaIhEEvEEED2Ev; std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::~pair() mov rdi, rbp mov rsi, r13 call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS8_11ordered_mapESt6vectorS5_blmdSaNS8_14adl_serializerESB_IhSaIhEEvEEEC2EOSG_; std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::pair(std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>&&) add rbp, 30h ; '0' add r13, 30h ; '0' add r12, 0FFFFFFFFFFFFFFD0h jmp short loc_44646 loc_4466D: sub rbx, [rsp+38h+var_38] add r12, [r14] neg r12 mov rax, r12 cqo push 30h ; '0' pop rcx idiv rcx sub rax, r15 mov rdi, r14 mov rsi, rax call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE6resizeEm; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::resize(ulong) add rbx, [r14] loc_44693: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char * nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::erase( long long *a1, char *a2, char *a3) { char *v3; // rbx long long v4; // r15 char *v5; // r13 long long v6; // r12 char *v7; // rbp long long v9; // [rsp+0h] [rbp-38h] v3 = a2; if ( a2 != a3 ) { v4 = (a3 - a2) / 48; v9 = *a1; v5 = &a2[48 * v4]; v6 = -(long long)v5; v7 = a2; while ( v5 != (char *)a1[1] ) { std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::~pair(v7); std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::pair( v7, v5); v7 += 48; v5 += 48; v6 -= 48LL; } std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::resize( a1, -(*a1 + v6) / 48 - v4, -(*a1 + v6) % 48); return &a2[*a1 - 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 0x00144693 MOV R14,RDI SUB RDX,RBX PUSH 0x30 POP RCX MOV RAX,RDX CQO IDIV RCX MOV R15,RAX MOV RAX,qword ptr [RDI] MOV qword ptr [RSP],RAX IMUL R13,R15,0x30 ADD R13,RBX MOV R12,R13 NEG R12 MOV RBP,RBX LAB_00144646: CMP R13,qword ptr [R14 + 0x8] JZ 0x0014466d MOV RDI,RBP CALL 0x00143a42 MOV RDI,RBP MOV RSI,R13 CALL 0x001446a6 ADD RBP,0x30 ADD R13,0x30 ADD R12,-0x30 JMP 0x00144646 LAB_0014466d: SUB RBX,qword ptr [RSP] ADD R12,qword ptr [R14] NEG R12 MOV RAX,R12 CQO PUSH 0x30 POP RCX IDIV RCX SUB RAX,R15 MOV RDI,R14 MOV RSI,RAX CALL 0x001446d0 ADD RBX,qword ptr [R14] LAB_00144693: 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<std::__cxx11::string, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::string const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > > >::erase(__gnu_cxx::__normal_iterator<std::pair<std::__cxx11::string const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >*, std::vector<std::pair<std::__cxx11::string const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >, std::allocator<std::pair<std::__cxx11::string const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > > > >, __gnu_cxx::__normal_iterator<std::pair<std::__cxx11::string const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >*, std::vector<std::pair<std::__cxx11::string const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >, std::allocator<std::pair<std::__cxx11::string const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > > > >) */ pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> * __thiscall nlohmann::json_abi_v3_11_3:: ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::erase(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> *this,pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *param_2, pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *param_3) { long lVar1; long lVar2; pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this_00; long lVar3; pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *ppVar4; if (param_2 != param_3) { lVar2 = ((long)param_3 - (long)param_2) / 0x30; lVar1 = *(long *)this; ppVar4 = param_2 + lVar2 * 0x30; lVar3 = -(long)ppVar4; this_00 = param_2; for (; ppVar4 != *(pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> **)(this + 8); ppVar4 = ppVar4 + 0x30) { std:: pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::~pair(this_00); std:: pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::pair(this_00,ppVar4); this_00 = this_00 + 0x30; lVar3 = lVar3 + -0x30; } std:: vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::resize((vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> *)this,-(lVar3 + *(long *)this) / 0x30 - lVar2); param_2 = param_2 + (*(long *)this - lVar1); } return param_2; }
11,624
my_xml_error_pos
eloqsql/strings/xml.c
size_t my_xml_error_pos(MY_XML_PARSER *p) { const char *beg=p->beg; const char *s; for ( s=p->beg ; s<p->cur; s++) { if (s[0] == '\n') beg=s; } return (size_t) (p->cur-beg); }
O0
c
my_xml_error_pos: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq 0x128(%rax), %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movq 0x128(%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq -0x8(%rbp), %rcx cmpq 0x130(%rcx), %rax jae 0x8419b movq -0x18(%rbp), %rax movsbl (%rax), %eax cmpl $0xa, %eax jne 0x8418b movq -0x18(%rbp), %rax movq %rax, -0x10(%rbp) jmp 0x8418d movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) jmp 0x84166 movq -0x8(%rbp), %rax movq 0x130(%rax), %rax movq -0x10(%rbp), %rcx subq %rcx, %rax popq %rbp retq nop
my_xml_error_pos: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax+128h] mov [rbp+var_10], rax mov rax, [rbp+var_8] mov rax, [rax+128h] mov [rbp+var_18], rax loc_84166: mov rax, [rbp+var_18] mov rcx, [rbp+var_8] cmp rax, [rcx+130h] jnb short loc_8419B mov rax, [rbp+var_18] movsx eax, byte ptr [rax] cmp eax, 0Ah jnz short loc_8418B mov rax, [rbp+var_18] mov [rbp+var_10], rax loc_8418B: jmp short $+2 loc_8418D: mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax jmp short loc_84166 loc_8419B: mov rax, [rbp+var_8] mov rax, [rax+130h] mov rcx, [rbp+var_10] sub rax, rcx pop rbp retn
long long my_xml_error_pos(long long a1) { _BYTE *i; // [rsp+0h] [rbp-18h] _BYTE *v3; // [rsp+8h] [rbp-10h] v3 = *(_BYTE **)(a1 + 296); for ( i = v3; (unsigned long long)i < *(_QWORD *)(a1 + 304); ++i ) { if ( *i == 10 ) v3 = i; } return *(_QWORD *)(a1 + 304) - (_QWORD)v3; }
my_xml_error_pos: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x128] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x128] MOV qword ptr [RBP + -0x18],RAX LAB_00184166: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x130] JNC 0x0018419b MOV RAX,qword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX] CMP EAX,0xa JNZ 0x0018418b MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x10],RAX LAB_0018418b: JMP 0x0018418d LAB_0018418d: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x00184166 LAB_0018419b: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x130] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,RCX POP RBP RET
long my_xml_error_pos(long param_1) { char *local_20; char *local_18; local_18 = *(char **)(param_1 + 0x128); for (local_20 = *(char **)(param_1 + 0x128); local_20 < *(char **)(param_1 + 0x130); local_20 = local_20 + 1) { if (*local_20 == '\n') { local_18 = local_20; } } return *(long *)(param_1 + 0x130) - (long)local_18; }
11,625
gguf_get_val_f64
monkey531[P]llama/ggml/src/gguf.cpp
double gguf_get_val_f64(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); return ctx->kv[key_id].get_val<double>(); }
O3
cpp
gguf_get_val_f64: pushq %r14 pushq %rbx pushq %rax testq %rsi, %rsi js 0x3d593 movq %rdi, %rbx movq 0x8(%rdi), %rdi movq 0x10(%rbx), %rax subq %rdi, %rax sarq $0x3, %rax movabsq $0x2e8ba2e8ba2e8ba3, %rcx # imm = 0x2E8BA2E8BA2E8BA3 imulq %rax, %rcx cmpq %rsi, %rcx jle 0x3d593 imulq $0x58, %rsi, %r14 addq %r14, %rdi callq 0x16620 cmpq $0x1, %rax jne 0x3d5af addq 0x8(%rbx), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x17320 movsd (%rax), %xmm0 addq $0x8, %rsp popq %rbx popq %r14 retq leaq 0x1c73b(%rip), %rdi # 0x59cd5 leaq 0xd0bc(%rip), %rdx # 0x4a65d leaq 0x1cbb8(%rip), %rcx # 0x5a160 movl $0x359, %esi # imm = 0x359 jmp 0x3d5c9 leaq 0x1c71f(%rip), %rdi # 0x59cd5 leaq 0xd0a0(%rip), %rdx # 0x4a65d leaq 0x1cc6b(%rip), %rcx # 0x5a22f movl $0x35a, %esi # imm = 0x35A xorl %eax, %eax callq 0x17c60
gguf_get_val_f64: push r14 push rbx push rax test rsi, rsi js short loc_3D593 mov rbx, rdi mov rdi, [rdi+8] mov rax, [rbx+10h] sub rax, rdi sar rax, 3 mov rcx, 2E8BA2E8BA2E8BA3h imul rcx, rax cmp rcx, rsi jle short loc_3D593 imul r14, rsi, 58h ; 'X' add rdi, r14; this call __ZNK7gguf_kv6get_neEv; gguf_kv::get_ne(void) cmp rax, 1 jnz short loc_3D5AF add r14, [rbx+8] mov rdi, r14 xor esi, esi call __ZNK7gguf_kv7get_valIdEERKT_m; gguf_kv::get_val<double>(ulong) movsd xmm0, qword ptr [rax] add rsp, 8 pop rbx pop r14 retn loc_3D593: 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, 359h jmp short loc_3D5C9 loc_3D5AF: 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, 35Ah loc_3D5C9: xor eax, eax call _ggml_abort
double gguf_get_val_f64(long long a1, long long a2, long long a3, long long a4, int a5, int a6) { long long v7; // rdi const char *v9; // rcx int v10; // esi if ( a2 < 0 || (v7 = *(_QWORD *)(a1 + 8), 0x2E8BA2E8BA2E8BA3LL * ((*(_QWORD *)(a1 + 16) - v7) >> 3) <= a2) ) { v9 = "key_id >= 0 && key_id < gguf_get_n_kv(ctx)"; v10 = 857; goto LABEL_7; } if ( gguf_kv::get_ne((gguf_kv *)(88 * a2 + v7)) != 1 ) { v9 = "ctx->kv[key_id].get_ne() == 1"; v10 = 858; LABEL_7: ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/gguf.cpp", v10, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v9, a5, a6); } return *(double *)gguf_kv::get_val<double>(*(_QWORD *)(a1 + 8) + 88 * a2, 0LL); }
gguf_get_val_f64: PUSH R14 PUSH RBX PUSH RAX TEST RSI,RSI JS 0x0013d593 MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x8] MOV RAX,qword ptr [RBX + 0x10] SUB RAX,RDI SAR RAX,0x3 MOV RCX,0x2e8ba2e8ba2e8ba3 IMUL RCX,RAX CMP RCX,RSI JLE 0x0013d593 IMUL R14,RSI,0x58 ADD RDI,R14 CALL 0x00116620 CMP RAX,0x1 JNZ 0x0013d5af ADD R14,qword ptr [RBX + 0x8] MOV RDI,R14 XOR ESI,ESI CALL 0x00117320 MOVSD XMM0,qword ptr [RAX] ADD RSP,0x8 POP RBX POP R14 RET LAB_0013d593: LEA RDI,[0x159cd5] LEA RDX,[0x14a65d] LEA RCX,[0x15a160] MOV ESI,0x359 JMP 0x0013d5c9 LAB_0013d5af: LEA RDI,[0x159cd5] LEA RDX,[0x14a65d] LEA RCX,[0x15a22f] MOV ESI,0x35a LAB_0013d5c9: XOR EAX,EAX CALL 0x00117c60
double gguf_get_val_f64(long param_1,long param_2) { double *pdVar1; long lVar2; char *pcVar3; int8 uVar4; if ((param_2 < 0) || (lVar2 = (*(long *)(param_1 + 0x10) - *(long *)(param_1 + 8) >> 3) * 0x2e8ba2e8ba2e8ba3, lVar2 - param_2 == 0 || lVar2 < param_2)) { pcVar3 = "key_id >= 0 && key_id < gguf_get_n_kv(ctx)"; uVar4 = 0x359; } else { lVar2 = gguf_kv::get_ne((gguf_kv *)(*(long *)(param_1 + 8) + param_2 * 0x58)); if (lVar2 == 1) { pdVar1 = gguf_kv::get_val<double>((gguf_kv *)(param_2 * 0x58 + *(long *)(param_1 + 8)),0); return *pdVar1; } pcVar3 = "ctx->kv[key_id].get_ne() == 1"; uVar4 = 0x35a; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/gguf.cpp",uVar4, "GGML_ASSERT(%s) failed",pcVar3); }
11,626
CacheHierarchy::~CacheHierarchy()
DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/MainMulCache.cpp
~CacheHierarchy() { delete l1cache; delete l2cache; delete l3cache; delete memory; }
O0
cpp
CacheHierarchy::~CacheHierarchy(): subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x8(%rax), %rax movq %rax, 0x28(%rsp) cmpq $0x0, %rax je 0x2d3d movq 0x28(%rsp), %rdi movq (%rdi), %rax callq *0x18(%rax) movq 0x20(%rsp), %rax movq 0x10(%rax), %rax movq %rax, 0x18(%rsp) cmpq $0x0, %rax je 0x2d5c movq 0x18(%rsp), %rdi movq (%rdi), %rax callq *0x18(%rax) movq 0x20(%rsp), %rax movq 0x18(%rax), %rax movq %rax, 0x10(%rsp) cmpq $0x0, %rax je 0x2d7b movq 0x10(%rsp), %rdi movq (%rdi), %rax callq *0x18(%rax) movq 0x20(%rsp), %rax movq (%rax), %rax movq %rax, 0x8(%rsp) cmpq $0x0, %rax je 0x2da2 movq 0x8(%rsp), %rdi callq 0x31c0 movq 0x8(%rsp), %rdi callq 0x2180 addq $0x38, %rsp retq nopw (%rax,%rax)
_ZN14CacheHierarchyD2Ev: sub rsp, 38h mov [rsp+38h+var_8], rdi mov rax, [rsp+38h+var_8] mov [rsp+38h+var_18], rax mov rax, [rax+8] mov [rsp+38h+var_10], rax cmp rax, 0 jz short loc_2D3D mov rdi, [rsp+38h+var_10] mov rax, [rdi] call qword ptr [rax+18h] loc_2D3D: mov rax, [rsp+38h+var_18] mov rax, [rax+10h] mov [rsp+38h+var_20], rax cmp rax, 0 jz short loc_2D5C mov rdi, [rsp+38h+var_20] mov rax, [rdi] call qword ptr [rax+18h] loc_2D5C: mov rax, [rsp+38h+var_18] mov rax, [rax+18h] mov [rsp+38h+var_28], rax cmp rax, 0 jz short loc_2D7B mov rdi, [rsp+38h+var_28] mov rax, [rdi] call qword ptr [rax+18h] loc_2D7B: mov rax, [rsp+38h+var_18] mov rax, [rax] mov [rsp+38h+var_30], rax cmp rax, 0 jz short loc_2DA2 mov rdi, [rsp+38h+var_30]; this call _ZN13MemoryManagerD2Ev; MemoryManager::~MemoryManager() mov rdi, [rsp+38h+var_30]; void * call __ZdlPv; operator delete(void *) loc_2DA2: add rsp, 38h retn
void CacheHierarchy::~CacheHierarchy(CacheHierarchy *this) { MemoryManager *v1; // [rsp+8h] [rbp-30h] long long v2; // [rsp+10h] [rbp-28h] long long v3; // [rsp+18h] [rbp-20h] long long v4; // [rsp+28h] [rbp-10h] v4 = *((_QWORD *)this + 1); if ( v4 ) (*(void ( **)(long long))(*(_QWORD *)v4 + 24LL))(v4); v3 = *((_QWORD *)this + 2); if ( v3 ) (*(void ( **)(long long))(*(_QWORD *)v3 + 24LL))(v3); v2 = *((_QWORD *)this + 3); if ( v2 ) (*(void ( **)(long long))(*(_QWORD *)v2 + 24LL))(v2); v1 = *(MemoryManager **)this; if ( *(_QWORD *)this ) { MemoryManager::~MemoryManager(v1); operator delete(v1); } }
~CacheHierarchy: SUB RSP,0x38 MOV qword ptr [RSP + 0x30],RDI MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x28],RAX CMP RAX,0x0 JZ 0x00102d3d MOV RDI,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_00102d3d: MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x18],RAX CMP RAX,0x0 JZ 0x00102d5c MOV RDI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_00102d5c: MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x10],RAX CMP RAX,0x0 JZ 0x00102d7b MOV RDI,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_00102d7b: MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x8],RAX CMP RAX,0x0 JZ 0x00102da2 MOV RDI,qword ptr [RSP + 0x8] CALL 0x001031c0 MOV RDI,qword ptr [RSP + 0x8] CALL 0x00102180 LAB_00102da2: ADD RSP,0x38 RET
/* CacheHierarchy::~CacheHierarchy() */ void __thiscall CacheHierarchy::~CacheHierarchy(CacheHierarchy *this) { MemoryManager *this_00; if (*(long **)(this + 8) != (long *)0x0) { (**(code **)(**(long **)(this + 8) + 0x18))(); } if (*(long **)(this + 0x10) != (long *)0x0) { (**(code **)(**(long **)(this + 0x10) + 0x18))(); } if (*(long **)(this + 0x18) != (long *)0x0) { (**(code **)(**(long **)(this + 0x18) + 0x18))(); } this_00 = *(MemoryManager **)this; if (this_00 != (MemoryManager *)0x0) { MemoryManager::~MemoryManager(this_00); operator_delete(this_00); } return; }
11,627
my_like_range_simple
eloqsql/strings/ctype-simple.c
my_bool my_like_range_simple(CHARSET_INFO *cs, const char *ptr, size_t ptr_length, pbool escape, pbool w_one, pbool w_many, size_t res_length, char *min_str,char *max_str, size_t *min_length, size_t *max_length) { const char *end= ptr + ptr_length; char *min_org=min_str; char *min_end=min_str+res_length; size_t charlen= res_length / cs->mbmaxlen; for (; ptr != end && min_str != min_end && charlen > 0 ; ptr++, charlen--) { if (*ptr == escape && ptr+1 != end) { ptr++; /* Skip escape */ *min_str++= *max_str++ = *ptr; continue; } if (*ptr == w_one) /* '_' in SQL */ { *min_str++='\0'; /* This should be min char */ *max_str++= (char) cs->max_sort_char; continue; } if (*ptr == w_many) /* '%' in SQL */ { /* Calculate length of keys */ *min_length= (cs->state & (MY_CS_BINSORT | MY_CS_NOPAD)) ? (size_t) (min_str - min_org) : res_length; *max_length= res_length; do { *min_str++= 0; *max_str++= (char) cs->max_sort_char; } while (min_str != min_end); return 0; } *min_str++= *max_str++ = *ptr; } *min_length= *max_length = (size_t) (min_str - min_org); while (min_str != min_end) *min_str++= *max_str++ = ' '; /* Because if key compression */ return 0; }
O0
c
my_like_range_simple: pushq %rbp movq %rsp, %rbp movl %r8d, -0x60(%rbp) movl %ecx, %eax movl -0x60(%rbp), %ecx movl %eax, -0x5c(%rbp) movq %rdx, %rax movl -0x5c(%rbp), %edx movq %rax, -0x58(%rbp) movq %rsi, %rax movq -0x58(%rbp), %rsi movq %rax, -0x50(%rbp) movq %rdi, %r8 movq -0x50(%rbp), %rdi movb %r9b, %al movq 0x30(%rbp), %r9 movq 0x28(%rbp), %r9 movq 0x20(%rbp), %r9 movq 0x18(%rbp), %r9 movq 0x10(%rbp), %r9 movq %r8, -0x10(%rbp) movq %rdi, -0x18(%rbp) movq %rsi, -0x20(%rbp) movb %dl, -0x21(%rbp) movb %cl, -0x22(%rbp) movb %al, -0x23(%rbp) movq -0x18(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x30(%rbp) movq 0x18(%rbp), %rax movq %rax, -0x38(%rbp) movq 0x18(%rbp), %rax addq 0x10(%rbp), %rax movq %rax, -0x40(%rbp) movq 0x10(%rbp), %rax movq -0x10(%rbp), %rcx movl 0x9c(%rcx), %ecx xorl %edx, %edx divq %rcx movq %rax, -0x48(%rbp) movq -0x18(%rbp), %rcx xorl %eax, %eax cmpq -0x30(%rbp), %rcx movb %al, -0x61(%rbp) je 0x43318 movq 0x18(%rbp), %rcx xorl %eax, %eax cmpq -0x40(%rbp), %rcx movb %al, -0x61(%rbp) je 0x43318 cmpq $0x0, -0x48(%rbp) seta %al movb %al, -0x61(%rbp) movb -0x61(%rbp), %al testb $0x1, %al jne 0x43324 jmp 0x43499 movq -0x18(%rbp), %rax movsbl (%rax), %eax movsbl -0x21(%rbp), %ecx cmpl %ecx, %eax jne 0x4337a movq -0x18(%rbp), %rax addq $0x1, %rax cmpq -0x30(%rbp), %rax je 0x4337a movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movb (%rax), %cl movq 0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x20(%rbp) movb %cl, (%rax) movq 0x18(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x18(%rbp) movb %cl, (%rax) jmp 0x4347c movq -0x18(%rbp), %rax movsbl (%rax), %eax movsbl -0x22(%rbp), %ecx cmpl %ecx, %eax jne 0x433be movq 0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, 0x18(%rbp) movb $0x0, (%rax) movq -0x10(%rbp), %rax movq 0xa8(%rax), %rax movb %al, %cl movq 0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x20(%rbp) movb %cl, (%rax) jmp 0x4347c movq -0x18(%rbp), %rax movsbl (%rax), %eax movsbl -0x23(%rbp), %ecx cmpl %ecx, %eax jne 0x43454 movq -0x10(%rbp), %rax movl 0xc(%rax), %eax andl $0x20010, %eax # imm = 0x20010 cmpl $0x0, %eax je 0x433f3 movq 0x18(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax movq %rax, -0x70(%rbp) jmp 0x433fb movq 0x10(%rbp), %rax movq %rax, -0x70(%rbp) movq -0x70(%rbp), %rcx movq 0x28(%rbp), %rax movq %rcx, (%rax) movq 0x10(%rbp), %rcx movq 0x30(%rbp), %rax movq %rcx, (%rax) movq 0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, 0x18(%rbp) movb $0x0, (%rax) movq -0x10(%rbp), %rax movq 0xa8(%rax), %rax movb %al, %cl movq 0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x20(%rbp) movb %cl, (%rax) movq 0x18(%rbp), %rax cmpq -0x40(%rbp), %rax jne 0x43411 movb $0x0, -0x1(%rbp) jmp 0x434e6 movq -0x18(%rbp), %rax movb (%rax), %cl movq 0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x20(%rbp) movb %cl, (%rax) movq 0x18(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x18(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) movq -0x48(%rbp), %rax addq $-0x1, %rax movq %rax, -0x48(%rbp) jmp 0x432ef movq 0x18(%rbp), %rcx movq -0x38(%rbp), %rax subq %rax, %rcx movq 0x30(%rbp), %rax movq %rcx, (%rax) movq 0x28(%rbp), %rax movq %rcx, (%rax) movq 0x18(%rbp), %rax cmpq -0x40(%rbp), %rax je 0x434e2 movq 0x20(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, 0x20(%rbp) movb $0x20, (%rax) movq 0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, 0x18(%rbp) movb $0x20, (%rax) jmp 0x434b2 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al popq %rbp retq nopl (%rax,%rax)
my_like_range_simple: push rbp mov rbp, rsp mov [rbp+var_60], r8d mov eax, ecx mov ecx, [rbp+var_60] mov [rbp+var_5C], eax mov rax, rdx mov edx, [rbp+var_5C] mov [rbp+var_58], rax mov rax, rsi mov rsi, [rbp+var_58] mov [rbp+var_50], rax mov r8, rdi mov rdi, [rbp+var_50] mov al, r9b mov r9, [rbp+arg_20] mov r9, [rbp+arg_18] mov r9, [rbp+arg_10] mov r9, [rbp+arg_8] mov r9, [rbp+arg_0] mov [rbp+var_10], r8 mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov [rbp+var_21], dl mov [rbp+var_22], cl mov [rbp+var_23], al mov rax, [rbp+var_18] add rax, [rbp+var_20] mov [rbp+var_30], rax mov rax, [rbp+arg_8] mov [rbp+var_38], rax mov rax, [rbp+arg_8] add rax, [rbp+arg_0] mov [rbp+var_40], rax mov rax, [rbp+arg_0] mov rcx, [rbp+var_10] mov ecx, [rcx+9Ch] xor edx, edx div rcx mov [rbp+var_48], rax loc_432EF: mov rcx, [rbp+var_18] xor eax, eax cmp rcx, [rbp+var_30] mov [rbp+var_61], al jz short loc_43318 mov rcx, [rbp+arg_8] xor eax, eax cmp rcx, [rbp+var_40] mov [rbp+var_61], al jz short loc_43318 cmp [rbp+var_48], 0 setnbe al mov [rbp+var_61], al loc_43318: mov al, [rbp+var_61] test al, 1 jnz short loc_43324 jmp loc_43499 loc_43324: mov rax, [rbp+var_18] movsx eax, byte ptr [rax] movsx ecx, [rbp+var_21] cmp eax, ecx jnz short loc_4337A mov rax, [rbp+var_18] add rax, 1 cmp rax, [rbp+var_30] jz short loc_4337A mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax mov rax, [rbp+var_18] mov cl, [rax] mov rax, [rbp+arg_10] mov rdx, rax add rdx, 1 mov [rbp+arg_10], rdx mov [rax], cl mov rax, [rbp+arg_8] mov rdx, rax add rdx, 1 mov [rbp+arg_8], rdx mov [rax], cl jmp loc_4347C loc_4337A: mov rax, [rbp+var_18] movsx eax, byte ptr [rax] movsx ecx, [rbp+var_22] cmp eax, ecx jnz short loc_433BE mov rax, [rbp+arg_8] mov rcx, rax add rcx, 1 mov [rbp+arg_8], rcx mov byte ptr [rax], 0 mov rax, [rbp+var_10] mov rax, [rax+0A8h] mov cl, al mov rax, [rbp+arg_10] mov rdx, rax add rdx, 1 mov [rbp+arg_10], rdx mov [rax], cl jmp loc_4347C loc_433BE: mov rax, [rbp+var_18] movsx eax, byte ptr [rax] movsx ecx, [rbp+var_23] cmp eax, ecx jnz loc_43454 mov rax, [rbp+var_10] mov eax, [rax+0Ch] and eax, 20010h cmp eax, 0 jz short loc_433F3 mov rax, [rbp+arg_8] mov rcx, [rbp+var_38] sub rax, rcx mov [rbp+var_70], rax jmp short loc_433FB loc_433F3: mov rax, [rbp+arg_0] mov [rbp+var_70], rax loc_433FB: mov rcx, [rbp+var_70] mov rax, [rbp+arg_18] mov [rax], rcx mov rcx, [rbp+arg_0] mov rax, [rbp+arg_20] mov [rax], rcx loc_43411: mov rax, [rbp+arg_8] mov rcx, rax add rcx, 1 mov [rbp+arg_8], rcx mov byte ptr [rax], 0 mov rax, [rbp+var_10] mov rax, [rax+0A8h] mov cl, al mov rax, [rbp+arg_10] mov rdx, rax add rdx, 1 mov [rbp+arg_10], rdx mov [rax], cl mov rax, [rbp+arg_8] cmp rax, [rbp+var_40] jnz short loc_43411 mov [rbp+var_1], 0 jmp loc_434E6 loc_43454: mov rax, [rbp+var_18] mov cl, [rax] mov rax, [rbp+arg_10] mov rdx, rax add rdx, 1 mov [rbp+arg_10], rdx mov [rax], cl mov rax, [rbp+arg_8] mov rdx, rax add rdx, 1 mov [rbp+arg_8], rdx mov [rax], cl loc_4347C: mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax mov rax, [rbp+var_48] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_48], rax jmp loc_432EF loc_43499: mov rcx, [rbp+arg_8] mov rax, [rbp+var_38] sub rcx, rax mov rax, [rbp+arg_20] mov [rax], rcx mov rax, [rbp+arg_18] mov [rax], rcx loc_434B2: mov rax, [rbp+arg_8] cmp rax, [rbp+var_40] jz short loc_434E2 mov rax, [rbp+arg_10] mov rcx, rax add rcx, 1 mov [rbp+arg_10], rcx mov byte ptr [rax], 20h ; ' ' mov rax, [rbp+arg_8] mov rcx, rax add rcx, 1 mov [rbp+arg_8], rcx mov byte ptr [rax], 20h ; ' ' jmp short loc_434B2 loc_434E2: mov [rbp+var_1], 0 loc_434E6: mov al, [rbp+var_1] pop rbp retn
char my_like_range_simple( long long a1, _BYTE *a2, long long a3, char a4, char a5, char a6, unsigned long long a7, _BYTE *a8, _BYTE *a9, unsigned long long *a10, _QWORD *a11) { char v11; // cl _BYTE *v12; // rax _BYTE *v13; // rax _BYTE *v14; // rax _BYTE *v15; // rax _BYTE *v16; // rax _BYTE *v17; // rax char v18; // cl _BYTE *v19; // rax _BYTE *v20; // rax _BYTE *v21; // rax _BYTE *v22; // rax unsigned long long v24; // [rsp+0h] [rbp-70h] bool v25; // [rsp+Fh] [rbp-61h] unsigned long long i; // [rsp+28h] [rbp-48h] _BYTE *v27; // [rsp+30h] [rbp-40h] long long v28; // [rsp+38h] [rbp-38h] _BYTE *v29; // [rsp+40h] [rbp-30h] _BYTE *v31; // [rsp+58h] [rbp-18h] v31 = a2; v29 = &a2[a3]; v28 = (long long)a8; v27 = &a8[a7]; for ( i = a7 / *(unsigned int *)(a1 + 156); ; --i ) { v25 = 0; if ( v31 != v29 ) { v25 = 0; if ( a8 != v27 ) v25 = i != 0; } if ( !v25 ) { *a11 = &a8[-v28]; *a10 = (unsigned long long)&a8[-v28]; while ( a8 != v27 ) { v21 = a9++; *v21 = 32; v22 = a8++; *v22 = 32; } return 0; } if ( (char)*v31 == a4 && v31 + 1 != v29 ) { v11 = *++v31; v12 = a9++; *v12 = *v31; v13 = a8++; *v13 = v11; goto LABEL_19; } if ( (char)*v31 == a5 ) { v14 = a8++; *v14 = 0; v15 = a9++; *v15 = *(_QWORD *)(a1 + 168); goto LABEL_19; } if ( (char)*v31 == a6 ) break; v18 = *v31; v19 = a9++; *v19 = *v31; v20 = a8++; *v20 = v18; LABEL_19: ++v31; } if ( (*(_DWORD *)(a1 + 12) & 0x20010) != 0 ) v24 = (unsigned long long)&a8[-v28]; else v24 = a7; *a10 = v24; *a11 = a7; do { v16 = a8++; *v16 = 0; v17 = a9++; *v17 = *(_QWORD *)(a1 + 168); } while ( a8 != v27 ); return 0; }
my_like_range_simple: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x60],R8D MOV EAX,ECX MOV ECX,dword ptr [RBP + -0x60] MOV dword ptr [RBP + -0x5c],EAX MOV RAX,RDX MOV EDX,dword ptr [RBP + -0x5c] MOV qword ptr [RBP + -0x58],RAX MOV RAX,RSI MOV RSI,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x50],RAX MOV R8,RDI MOV RDI,qword ptr [RBP + -0x50] MOV AL,R9B MOV R9,qword ptr [RBP + 0x30] MOV R9,qword ptr [RBP + 0x28] MOV R9,qword ptr [RBP + 0x20] MOV R9,qword ptr [RBP + 0x18] MOV R9,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x10],R8 MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV byte ptr [RBP + -0x21],DL MOV byte ptr [RBP + -0x22],CL MOV byte ptr [RBP + -0x23],AL MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + 0x18] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + 0x18] ADD RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + 0x10] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x9c] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x48],RAX LAB_001432ef: MOV RCX,qword ptr [RBP + -0x18] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x30] MOV byte ptr [RBP + -0x61],AL JZ 0x00143318 MOV RCX,qword ptr [RBP + 0x18] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x40] MOV byte ptr [RBP + -0x61],AL JZ 0x00143318 CMP qword ptr [RBP + -0x48],0x0 SETA AL MOV byte ptr [RBP + -0x61],AL LAB_00143318: MOV AL,byte ptr [RBP + -0x61] TEST AL,0x1 JNZ 0x00143324 JMP 0x00143499 LAB_00143324: MOV RAX,qword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX] MOVSX ECX,byte ptr [RBP + -0x21] CMP EAX,ECX JNZ 0x0014337a MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 CMP RAX,qword ptr [RBP + -0x30] JZ 0x0014337a MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + 0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + 0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + 0x18] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + 0x18],RDX MOV byte ptr [RAX],CL JMP 0x0014347c LAB_0014337a: MOV RAX,qword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX] MOVSX ECX,byte ptr [RBP + -0x22] CMP EAX,ECX JNZ 0x001433be MOV RAX,qword ptr [RBP + 0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + 0x18],RCX MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xa8] MOV CL,AL MOV RAX,qword ptr [RBP + 0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + 0x20],RDX MOV byte ptr [RAX],CL JMP 0x0014347c LAB_001433be: MOV RAX,qword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX] MOVSX ECX,byte ptr [RBP + -0x23] CMP EAX,ECX JNZ 0x00143454 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x20010 CMP EAX,0x0 JZ 0x001433f3 MOV RAX,qword ptr [RBP + 0x18] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX MOV qword ptr [RBP + -0x70],RAX JMP 0x001433fb LAB_001433f3: MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x70],RAX LAB_001433fb: MOV RCX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RBP + 0x28] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + 0x10] MOV RAX,qword ptr [RBP + 0x30] MOV qword ptr [RAX],RCX LAB_00143411: MOV RAX,qword ptr [RBP + 0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + 0x18],RCX MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xa8] MOV CL,AL MOV RAX,qword ptr [RBP + 0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + 0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + 0x18] CMP RAX,qword ptr [RBP + -0x40] JNZ 0x00143411 MOV byte ptr [RBP + -0x1],0x0 JMP 0x001434e6 LAB_00143454: MOV RAX,qword ptr [RBP + -0x18] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + 0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + 0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + 0x18] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + 0x18],RDX MOV byte ptr [RAX],CL LAB_0014347c: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x48] ADD RAX,-0x1 MOV qword ptr [RBP + -0x48],RAX JMP 0x001432ef LAB_00143499: MOV RCX,qword ptr [RBP + 0x18] MOV RAX,qword ptr [RBP + -0x38] SUB RCX,RAX MOV RAX,qword ptr [RBP + 0x30] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + 0x28] MOV qword ptr [RAX],RCX LAB_001434b2: MOV RAX,qword ptr [RBP + 0x18] CMP RAX,qword ptr [RBP + -0x40] JZ 0x001434e2 MOV RAX,qword ptr [RBP + 0x20] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + 0x20],RCX MOV byte ptr [RAX],0x20 MOV RAX,qword ptr [RBP + 0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + 0x18],RCX MOV byte ptr [RAX],0x20 JMP 0x001434b2 LAB_001434e2: MOV byte ptr [RBP + -0x1],0x0 LAB_001434e6: MOV AL,byte ptr [RBP + -0x1] POP RBP RET
int8 my_like_range_simple (long param_1,char *param_2,long param_3,char param_4,char param_5,char param_6, ulong param_7,char *param_8,char *param_9,ulong *param_10,ulong *param_11) { char cVar1; char *pcVar2; char *pcVar3; ulong uVar4; bool bVar5; ulong local_78; ulong local_50; char *local_20; pcVar3 = param_8; pcVar2 = param_8 + param_7; local_50 = param_7 / *(uint *)(param_1 + 0x9c); local_20 = param_2; while( true ) { bVar5 = false; if ((local_20 != param_2 + param_3) && (bVar5 = false, param_8 != pcVar2)) { bVar5 = local_50 != 0; } if (!bVar5) break; if ((*local_20 == param_4) && (local_20 + 1 != param_2 + param_3)) { local_20 = local_20 + 1; cVar1 = *local_20; *param_9 = cVar1; *param_8 = cVar1; } else if (*local_20 == param_5) { *param_8 = '\0'; *param_9 = (char)*(int8 *)(param_1 + 0xa8); } else { if (*local_20 == param_6) { if ((*(uint *)(param_1 + 0xc) & 0x20010) == 0) { local_78 = param_7; } else { local_78 = (long)param_8 - (long)pcVar3; } *param_10 = local_78; *param_11 = param_7; do { pcVar3 = param_8 + 1; *param_8 = '\0'; *param_9 = (char)*(int8 *)(param_1 + 0xa8); param_8 = pcVar3; param_9 = param_9 + 1; } while (pcVar3 != pcVar2); return 0; } cVar1 = *local_20; *param_9 = cVar1; *param_8 = cVar1; } param_9 = param_9 + 1; param_8 = param_8 + 1; local_20 = local_20 + 1; local_50 = local_50 - 1; } uVar4 = (long)param_8 - (long)pcVar3; *param_11 = uVar4; *param_10 = uVar4; while (param_8 != pcVar2) { *param_9 = ' '; *param_8 = ' '; param_8 = param_8 + 1; param_9 = param_9 + 1; } return 0; }
11,628
add_compiled_collation
eloqsql/mysys/charset.c
void add_compiled_collation(struct charset_info_st *cs) { DBUG_ASSERT(cs->number < array_elements(all_charsets)); all_charsets[cs->number]= cs; cs->state|= MY_CS_AVAILABLE; if ((my_hash_insert(&charset_name_hash, (uchar*) cs))) { #ifndef DBUG_OFF CHARSET_INFO *org= (CHARSET_INFO*) my_hash_search(&charset_name_hash, (uchar*) cs->cs_name.str, cs->cs_name.length); DBUG_ASSERT(org); DBUG_ASSERT(org->cs_name.str == cs->cs_name.str); DBUG_ASSERT(org->cs_name.length == strlen(cs->cs_name.str)); #endif } }
O0
c
add_compiled_collation: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) jmp 0x2a33e movq -0x8(%rbp), %rdx movq -0x8(%rbp), %rax movl (%rax), %eax movl %eax, %ecx leaq 0x35a0cf(%rip), %rax # 0x384420 movq %rdx, (%rax,%rcx,8) movq -0x8(%rbp), %rax movl 0xc(%rax), %ecx orl $0x200, %ecx # imm = 0x200 movl %ecx, 0xc(%rax) movq -0x8(%rbp), %rsi leaq 0x35e0b0(%rip), %rdi # 0x388420 callq 0x24ce0 cmpb $0x0, %al je 0x2a37b jmp 0x2a37b addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
add_compiled_collation: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi jmp short $+2 loc_2A33E: mov rdx, [rbp+var_8] mov rax, [rbp+var_8] mov eax, [rax] mov ecx, eax lea rax, all_charsets mov [rax+rcx*8], rdx mov rax, [rbp+var_8] mov ecx, [rax+0Ch] or ecx, 200h mov [rax+0Ch], ecx mov rsi, [rbp+var_8] lea rdi, charset_name_hash call my_hash_insert cmp al, 0 jz short loc_2A37B jmp short $+2 loc_2A37B: add rsp, 10h pop rbp retn
char add_compiled_collation(unsigned int *a1) { all_charsets[*a1] = a1; a1[3] |= 0x200u; return my_hash_insert((long long)&charset_name_hash, (long long)a1); }
add_compiled_collation: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI JMP 0x0012a33e LAB_0012a33e: MOV RDX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX] MOV ECX,EAX LEA RAX,[0x484420] MOV qword ptr [RAX + RCX*0x8],RDX MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0xc] OR ECX,0x200 MOV dword ptr [RAX + 0xc],ECX MOV RSI,qword ptr [RBP + -0x8] LEA RDI,[0x488420] CALL 0x00124ce0 CMP AL,0x0 JZ 0x0012a37b JMP 0x0012a37b LAB_0012a37b: ADD RSP,0x10 POP RBP RET
void add_compiled_collation(uint *param_1) { (&all_charsets)[*param_1] = param_1; param_1[3] = param_1[3] | 0x200; my_hash_insert(charset_name_hash,param_1); return; }
11,629
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 # 0x8bd2e movq %rax, 0x18(%rsi) leaq 0x1d7(%rip), %rax # 0x8bd3e movq %rax, 0x10(%rsi) movzbl (%rdx), %eax movzbl 0x1(%rdx), %ecx leaq 0x60(%rsp), %r15 movq %r15, %rdi movl %eax, %edx callq 0x8d56e movq %rsp, %r12 movq %r12, %rdi callq 0x48930 andq $0x0, 0x8(%r12) movq %r15, (%r12) leaq 0x1b9(%rip), %rax # 0x8bd56 movq %rax, 0x18(%r12) leaq 0x1bf(%rip), %rax # 0x8bd68 movq %rax, 0x10(%r12) andq $0x0, 0x28(%r12) movq %r15, 0x20(%r12) leaq 0x1ce(%rip), %rax # 0x8bd8e movq %rax, 0x38(%r12) leaq 0x262(%rip), %rax # 0x8be2e movq %rax, 0x30(%r12) andq $0x0, 0x48(%r12) movq %r15, 0x40(%r12) leaq 0x168f(%rip), %rax # 0x8d272 movq %rax, 0x58(%r12) leaq 0x16e3(%rip), %rax # 0x8d2d2 movq %rax, 0x50(%r12) movq %rsp, %rsi movq %r14, %rdi callq 0x8d706 leaq 0x60(%rsp), %rdi callq 0x8d71a leaq 0x60(%rsp), %rsi movq %rbx, %rdi callq 0x8d88c movq %rsp, %rdi callq 0x8d942 leaq 0x60(%rsp), %rdi callq 0x8d962 movq %rbx, %rax addq $0x158, %rsp # imm = 0x158 popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx movq %rsp, %rdi callq 0x48930 jmp 0x8bc5c movq %rax, %rbx movq %rsp, %rdi callq 0x8d942 leaq 0x60(%rsp), %rdi callq 0x8d962 movq %rbx, %rdi callq 0x24f80
_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_8BC5C 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_8BC5C: 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,[0x18bd2e] MOV qword ptr [RSI + 0x18],RAX LEA RAX,[0x18bd3e] MOV qword ptr [RSI + 0x10],RAX MOVZX EAX,byte ptr [RDX] MOVZX ECX,byte ptr [RDX + 0x1] LAB_0018bb72: LEA R15,[RSP + 0x60] MOV RDI,R15 MOV EDX,EAX CALL 0x0018d56e MOV R12,RSP MOV RDI,R12 CALL 0x00148930 AND qword ptr [R12 + 0x8],0x0 MOV qword ptr [R12],R15 LEA RAX,[0x18bd56] MOV qword ptr [R12 + 0x18],RAX LEA RAX,[0x18bd68] MOV qword ptr [R12 + 0x10],RAX AND qword ptr [R12 + 0x28],0x0 MOV qword ptr [R12 + 0x20],R15 LEA RAX,[0x18bd8e] MOV qword ptr [R12 + 0x38],RAX LEA RAX,[0x18be2e] MOV qword ptr [R12 + 0x30],RAX AND qword ptr [R12 + 0x48],0x0 MOV qword ptr [R12 + 0x40],R15 LEA RAX,[0x18d272] MOV qword ptr [R12 + 0x58],RAX LEA RAX,[0x18d2d2] MOV qword ptr [R12 + 0x50],RAX LAB_0018bbf4: MOV RSI,RSP MOV RDI,R14 CALL 0x0018d706 LEA RDI,[RSP + 0x60] CALL 0x0018d71a LEA RSI,[RSP + 0x60] MOV RDI,RBX CALL 0x0018d88c LAB_0018bc16: MOV RDI,RSP CALL 0x0018d942 LEA RDI,[RSP + 0x60] CALL 0x0018d962 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 0018bb72 to 0018bb80 has its CatchHandler @ 0018bc3a */ 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 0018bbf4 to 0018bc15 has its CatchHandler @ 0018bc47 */ 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; }
11,630
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(); }
O3
cpp
build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&): pushq %r15 pushq %r14 pushq %rbx subq $0x160, %rsp # imm = 0x160 movq %rsi, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 movq %rsp, %rsi movaps %xmm0, (%rsi) leaq 0x2f4(%rip), %rax # 0xbbc96 movq %rax, 0x18(%rsi) leaq 0x315(%rip), %rax # 0xbbcc2 movq %rax, 0x10(%rsi) movzbl (%rdx), %eax movzbl 0x1(%rdx), %ecx leaq 0x68(%rsp), %r15 movq %r15, %rdi movl %eax, %edx callq 0xbef64 movq 0x10(%rsp), %rax testq %rax, %rax je 0xbb9de movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax xorl %eax, %eax movq %rax, 0x8(%rsp) movq %r15, (%rsp) leaq 0x2ea(%rip), %rcx # 0xbbcda movq %rcx, 0x18(%rsp) leaq 0x2f0(%rip), %rcx # 0xbbcec movq %rcx, 0x10(%rsp) movq %rax, 0x28(%rsp) movq %r15, 0x20(%rsp) leaq 0x300(%rip), %rcx # 0xbbd12 movq %rcx, 0x38(%rsp) leaq 0x3a6(%rip), %rcx # 0xbbdc4 movq %rcx, 0x30(%rsp) movq %rax, 0x48(%rsp) movq %r15, 0x40(%rsp) leaq 0x2e86(%rip), %rcx # 0xbe8ba movq %rcx, 0x58(%rsp) leaq 0x2ee4(%rip), %rcx # 0xbe924 movq %rcx, 0x50(%rsp) cmpq %rax, 0x10(%r14) je 0xbbb25 movq %rsp, %rsi movq %r14, %rdi callq *0x18(%r14) leaq 0x68(%rsp), %rdi callq 0xbf166 leaq 0x68(%rsp), %rsi movq %rbx, %rdi callq 0xbf32e movq 0x50(%rsp), %rax testq %rax, %rax je 0xbba89 leaq 0x40(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x30(%rsp), %rax testq %rax, %rax je 0xbbaa2 leaq 0x20(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x10(%rsp), %rax testq %rax, %rax je 0xbbab9 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax leaq 0x148(%rsp), %rdi callq 0x21ff8 leaq 0x130(%rsp), %rdi callq 0x21ff8 leaq 0xf8(%rsp), %rdi callq 0x7f284 leaq 0xc0(%rsp), %rdi callq 0xbfb42 leaq 0x90(%rsp), %r14 movq %r14, %rdi callq 0xbfc24 movq -0x18(%r14), %rax testq %rax, %rax je 0xbbb15 leaq 0x68(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbx, %rax addq $0x160, %rsp # imm = 0x160 popq %rbx popq %r14 popq %r15 retq callq 0x1b310 jmp 0xbbb50 jmp 0xbbb50 jmp 0xbbb50 jmp 0xbbb50 jmp 0xbbb50 movq %rax, %rbx movq 0x10(%rsp), %rax testq %rax, %rax je 0xbbb6d movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0xbbb6d movq %rax, %rdi callq 0x21535 movq %rax, %rbx movq %rsp, %rdi callq 0xbf43a leaq 0x68(%rsp), %rdi callq 0xbf490 movq %rbx, %rdi callq 0x1bf90 nop
_Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options: push r15 push r14 push rbx sub rsp, 160h mov r14, rsi mov rbx, rdi xorps xmm0, xmm0 mov rsi, rsp; int 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]; int lea r15, [rsp+178h+var_110] mov rdi, r15; int mov edx, eax; int 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 rax, [rsp+178h+var_168] test rax, rax jz short loc_BB9DE mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_BB9DE: xor eax, eax mov [rsp+178h+var_170], rax mov [rsp+178h+var_178], r15 lea rcx, _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 [rsp+178h+var_160], rcx lea rcx, _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 [rsp+178h+var_168], rcx mov [rsp+178h+var_150], rax mov [rsp+178h+var_158], r15 lea rcx, _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 [rsp+178h+var_140], rcx lea rcx, _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 [rsp+178h+var_148], rcx mov [rsp+178h+var_130], rax mov [rsp+178h+var_138], r15 lea rcx, _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 [rsp+178h+var_120], rcx lea rcx, _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 [rsp+178h+var_128], rcx cmp [r14+10h], rax jz loc_BBB25 mov rsi, rsp mov rdi, r14 call qword ptr [r14+18h] lea rdi, [rsp+178h+var_110]; this call _ZN15SchemaConverter12check_errorsEv; SchemaConverter::check_errors(void) lea rsi, [rsp+178h+var_110] mov rdi, rbx call _ZN15SchemaConverter14format_grammarB5cxx11Ev; SchemaConverter::format_grammar(void) mov rax, [rsp+178h+var_128] test rax, rax jz short loc_BBA89 lea rdi, [rsp+178h+var_138] mov rsi, rdi mov edx, 3 call rax loc_BBA89: mov rax, [rsp+178h+var_148] test rax, rax jz short loc_BBAA2 lea rdi, [rsp+178h+var_158] mov rsi, rdi mov edx, 3 call rax loc_BBAA2: mov rax, [rsp+178h+var_168] test rax, rax jz short loc_BBAB9 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_BBAB9: lea rdi, [rsp+178h+var_30] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rdi, [rsp+178h+var_48] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rdi, [rsp+178h+var_80] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable() lea rdi, [rsp+178h+var_B8] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEESaISH_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSJ_18_Mod_range_hashingENSJ_20_Default_ranged_hashENSJ_20_Prime_rehash_policyENSJ_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable() lea r14, [rsp+178h+var_E8] mov rdi, r14 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree() mov rax, [r14-18h] test rax, rax jz short loc_BBB15 lea rdi, [rsp+178h+var_110] mov rsi, rdi mov edx, 3 call rax loc_BBB15: mov rax, rbx add rsp, 160h pop rbx pop r14 pop r15 retn loc_BBB25: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) jmp short loc_BBB50 jmp short loc_BBB50 jmp short loc_BBB50 jmp short loc_BBB50 jmp short loc_BBB50 mov rbx, rax mov rax, [rsp+178h+var_168] test rax, rax jz short loc_BBB6D mov rdi, rsp mov rsi, rdi mov edx, 3 call rax jmp short loc_BBB6D loc_BBB50: mov rdi, rax call __clang_call_terminate mov rbx, rax mov rdi, rsp; this call _ZN22common_grammar_builderD2Ev; common_grammar_builder::~common_grammar_builder() lea rdi, [rsp+178h+var_110]; this call _ZN15SchemaConverterD2Ev; SchemaConverter::~SchemaConverter() loc_BBB6D: 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 int *v11; // [rsp+0h] [rbp-178h] BYREF long long v12; // [rsp+8h] [rbp-170h] long long ( *v13)(); // [rsp+10h] [rbp-168h] void *v14; // [rsp+18h] [rbp-160h] int *v15; // [rsp+20h] [rbp-158h] BYREF long long v16; // [rsp+28h] [rbp-150h] long long ( *v17)(); // [rsp+30h] [rbp-148h] long long ( *v18)(int, int, int, int, int, int, int, long long); // [rsp+38h] [rbp-140h] int *v19; // [rsp+40h] [rbp-138h] BYREF long long v20; // [rsp+48h] [rbp-130h] long long ( *v21)(); // [rsp+50h] [rbp-128h] long long ( *v22)(int, int, int, int, int, int, void *, int, long long); // [rsp+58h] [rbp-120h] int v23; // [rsp+60h] [rbp-118h] int v24[4]; // [rsp+68h] [rbp-110h] BYREF void ( *v25)(int *, int *, long long); // [rsp+78h] [rbp-100h] _BYTE v26[48]; // [rsp+90h] [rbp-E8h] BYREF _BYTE v27[56]; // [rsp+C0h] [rbp-B8h] BYREF _BYTE v28[56]; // [rsp+F8h] [rbp-80h] BYREF _BYTE v29[24]; // [rsp+130h] [rbp-48h] BYREF _BYTE v30[48]; // [rsp+148h] [rbp-30h] BYREF SchemaConverter::SchemaConverter( (int)v24, (int)&v11, *a3, a3[1], a5, a6, 0LL, 0, (long long)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, (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, v15, v16, (long long)v17); if ( v13 ) ((void ( *)(int **, int **, long long))v13)(&v11, &v11, 3LL); v12 = 0LL; v11 = v24; v14 = &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; v13 = 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; v16 = 0LL; v15 = v24; v18 = 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; v17 = 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; v20 = 0LL; v19 = v24; v22 = 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; v21 = 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; if ( !*(_QWORD *)(a2 + 16) ) std::__throw_bad_function_call(); (*(void ( **)(long long, int **))(a2 + 24))(a2, &v11); SchemaConverter::check_errors((SchemaConverter *)v24); SchemaConverter::format_grammar[abi:cxx11]( a1, (unsigned int)v24, v6, v7, v8, v9, (_DWORD)v11, v12, (_DWORD)v13, (_DWORD)v14, (_DWORD)v15, v16, (_DWORD)v17, (_DWORD)v18, (_DWORD)v19, v20, (_DWORD)v21, (_DWORD)v22, v23, v24[0], v24[2], (char)v25); if ( v21 ) ((void ( *)(int **, int **, long long))v21)(&v19, &v19, 3LL); if ( v17 ) ((void ( *)(int **, int **, long long))v17)(&v15, &v15, 3LL); if ( v13 ) ((void ( *)(int **, int **, long long))v13)(&v11, &v11, 3LL); std::vector<std::string>::~vector((long long)v30); std::vector<std::string>::~vector((long long)v29); std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable((long long)v28); std::_Hashtable<std::string,std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable(v27); std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree(v26); if ( v25 ) v25(v24, v24, 3LL); return a1; }
build_grammar[abi:cxx11]: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x160 MOV R14,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOV RSI,RSP MOVAPS xmmword ptr [RSI],XMM0 LEA RAX,[0x1bbc96] MOV qword ptr [RSI + 0x18],RAX LEA RAX,[0x1bbcc2] MOV qword ptr [RSI + 0x10],RAX MOVZX EAX,byte ptr [RDX] MOVZX ECX,byte ptr [RDX + 0x1] LAB_001bb9b8: LEA R15,[RSP + 0x68] MOV RDI,R15 MOV EDX,EAX CALL 0x001bef64 MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x001bb9de LAB_001bb9d1: MOV RDI,RSP MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001bb9de: XOR EAX,EAX MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP],R15 LEA RCX,[0x1bbcda] MOV qword ptr [RSP + 0x18],RCX LEA RCX,[0x1bbcec] MOV qword ptr [RSP + 0x10],RCX MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x20],R15 LEA RCX,[0x1bbd12] MOV qword ptr [RSP + 0x38],RCX LEA RCX,[0x1bbdc4] MOV qword ptr [RSP + 0x30],RCX MOV qword ptr [RSP + 0x48],RAX MOV qword ptr [RSP + 0x40],R15 LEA RCX,[0x1be8ba] MOV qword ptr [RSP + 0x58],RCX LEA RCX,[0x1be924] MOV qword ptr [RSP + 0x50],RCX CMP qword ptr [R14 + 0x10],RAX JZ 0x001bbb25 LAB_001bba4f: MOV RSI,RSP MOV RDI,R14 CALL qword ptr [R14 + 0x18] LEA RDI,[RSP + 0x68] CALL 0x001bf166 LEA RSI,[RSP + 0x68] MOV RDI,RBX CALL 0x001bf32e MOV RAX,qword ptr [RSP + 0x50] TEST RAX,RAX JZ 0x001bba89 LEA RDI,[RSP + 0x40] LAB_001bba7f: MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001bba89: MOV RAX,qword ptr [RSP + 0x30] TEST RAX,RAX JZ 0x001bbaa2 LEA RDI,[RSP + 0x20] LAB_001bba98: MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001bbaa2: MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x001bbab9 LAB_001bbaac: MOV RDI,RSP MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001bbab9: LEA RDI,[RSP + 0x148] CALL 0x00121ff8 LEA RDI,[RSP + 0x130] CALL 0x00121ff8 LEA RDI,[RSP + 0xf8] CALL 0x0017f284 LEA RDI,[RSP + 0xc0] CALL 0x001bfb42 LEA R14,[RSP + 0x90] MOV RDI,R14 CALL 0x001bfc24 MOV RAX,qword ptr [R14 + -0x18] TEST RAX,RAX JZ 0x001bbb15 LAB_001bbb06: LEA RDI,[RSP + 0x68] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001bbb15: MOV RAX,RBX ADD RSP,0x160 POP RBX POP R14 POP R15 RET LAB_001bbb25: CALL 0x0011b310
/* 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_110 [16]; code *local_100; _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> local_e8 [48]; _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> local_b8 [56]; _Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> local_80 [56]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_48 [24]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_30 [24]; 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 001bb9b8 to 001bb9c6 has its CatchHandler @ 001bbb34 */ SchemaConverter::SchemaConverter (local_110,(function *)&local_178,*(bool *)in_RDX,*(bool *)(in_RDX + 1)); if (local_168 != (code *)0x0) { /* try { // try from 001bb9d1 to 001bb9dd has its CatchHandler @ 001bbb32 */ (*local_168)(&local_178,&local_178,3); } 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_110; local_158 = local_110; local_138 = local_110; if (*(long *)(param_2 + 0x10) != 0) { /* try { // try from 001bba4f to 001bba6f has its CatchHandler @ 001bbb58 */ (**(code **)(param_2 + 0x18))(param_2,&local_178); SchemaConverter::check_errors(local_110); SchemaConverter::format_grammar_abi_cxx11_(); if (local_128 != (code *)0x0) { /* try { // try from 001bba7f to 001bba88 has its CatchHandler @ 001bbb30 */ (*local_128)(&local_138,&local_138,3); } if (local_148 != (code *)0x0) { /* try { // try from 001bba98 to 001bbaa1 has its CatchHandler @ 001bbb2e */ (*local_148)(&local_158,&local_158,3); } if (local_168 != (code *)0x0) { /* try { // try from 001bbaac to 001bbab8 has its CatchHandler @ 001bbb2c */ (*local_168)(&local_178,&local_178,3); } std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_30); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_48); std:: _Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> ::~_Hashtable(local_80); std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::~_Hashtable(local_b8); std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::~_Rb_tree(local_e8); if (local_100 != (code *)0x0) { /* try { // try from 001bbb06 to 001bbb14 has its CatchHandler @ 001bbb2a */ (*local_100)(local_110,local_110,3); } return param_1; } /* WARNING: Subroutine does not return */ /* try { // try from 001bbb25 to 001bbb29 has its CatchHandler @ 001bbb58 */ std::__throw_bad_function_call(); }
11,631
my_uni_utf16le
eloqsql/strings/ctype-ucs2.c
static int my_uni_utf16le(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { uint32 first, second, total; if (wc < MY_UTF16_SURROGATE_HIGH_FIRST || (wc > MY_UTF16_SURROGATE_LOW_LAST && wc <= 0xFFFF)) { if (s + 2 > e) return MY_CS_TOOSMALL2; int2store(s, wc); return 2; /* [0000-D7FF,E000-FFFF] */ } if (wc < 0xFFFF || wc > 0x10FFFF) return MY_CS_ILUNI; /* [D800-DFFF,10FFFF+] */ if (s + 4 > e) return MY_CS_TOOSMALL4; wc-= 0x10000; first= (0xD800 | ((wc >> 10) & 0x3FF)); second= (0xDC00 | (wc & 0x3FF)); total= first | (second << 16); int4store(s, total); return 4; /* [010000-10FFFF] */ }
O3
c
my_uni_utf16le: pushq %rbp movq %rsp, %rbp cmpq $0xd800, %rsi # imm = 0xD800 setae %al movq %rsi, %rdi andq $-0x2000, %rdi # imm = 0xE000 cmpq $0xe000, %rdi # imm = 0xE000 setne %dil testb %dil, %al jne 0x426a7 leaq 0x2(%rdx), %rdi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rdi ja 0x426ec movw %si, (%rdx) movl $0x2, %eax jmp 0x426ec leaq -0x110000(%rsi), %rdi xorl %eax, %eax cmpq $-0x100001, %rdi # imm = 0xFFEFFFFF jb 0x426ec leaq 0x4(%rdx), %rdi movl $0xffffff98, %eax # imm = 0xFFFFFF98 cmpq %rcx, %rdi ja 0x426ec leal 0xf0000(%rsi), %eax shrl $0xa, %eax andl $0x3ff, %eax # imm = 0x3FF shll $0x10, %esi andl $0x3ff0000, %esi # imm = 0x3FF0000 addl %esi, %eax addl $0xdc00d800, %eax # imm = 0xDC00D800 movl %eax, (%rdx) movl $0x4, %eax popq %rbp retq
my_uni_utf16le: push rbp mov rbp, rsp cmp rsi, 0D800h setnb al mov rdi, rsi and rdi, 0FFFFFFFFFFFFE000h cmp rdi, 0E000h setnz dil test al, dil jnz short loc_426A7 lea rdi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rdi, rcx ja short loc_426EC mov [rdx], si mov eax, 2 jmp short loc_426EC loc_426A7: lea rdi, [rsi-110000h] xor eax, eax cmp rdi, 0FFFFFFFFFFEFFFFFh jb short loc_426EC lea rdi, [rdx+4] mov eax, 0FFFFFF98h cmp rdi, rcx ja short loc_426EC lea eax, unk_F0000[rsi] shr eax, 0Ah and eax, 3FFh shl esi, 10h and esi, 3FF0000h add eax, esi add eax, 0DC00D800h mov [rdx], eax mov eax, 4 loc_426EC: pop rbp retn
long long my_uni_utf16le(long long a1, unsigned long long a2, _DWORD *a3, unsigned long long a4) { long long result; // rax if ( (a2 & 0xFFFFFFFFFFFFE000LL) != 57344 && a2 >= 0xD800 ) { result = 0LL; if ( a2 - 1114112 >= 0xFFFFFFFFFFEFFFFFLL ) { result = 4294967192LL; if ( (unsigned long long)(a3 + 1) <= a4 ) { *a3 = (((_DWORD)a2 << 16) & 0x3FF0000) + (((unsigned int)((unsigned int)&unk_F0000 + a2) >> 10) & 0x3FF) - 603924480; return 4LL; } } } else { result = 4294967194LL; if ( (unsigned long long)a3 + 2 <= a4 ) { *(_WORD *)a3 = a2; return 2LL; } } return result; }
my_uni_utf16le: PUSH RBP MOV RBP,RSP CMP RSI,0xd800 SETNC AL MOV RDI,RSI AND RDI,-0x2000 CMP RDI,0xe000 SETNZ DIL TEST AL,DIL JNZ 0x001426a7 LEA RDI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RDI,RCX JA 0x001426ec MOV word ptr [RDX],SI MOV EAX,0x2 JMP 0x001426ec LAB_001426a7: LEA RDI,[RSI + -0x110000] XOR EAX,EAX CMP RDI,-0x100001 JC 0x001426ec LEA RDI,[RDX + 0x4] MOV EAX,0xffffff98 CMP RDI,RCX JA 0x001426ec LEA EAX,[RSI + 0xf0000] SHR EAX,0xa AND EAX,0x3ff SHL ESI,0x10 AND ESI,0x3ff0000 ADD EAX,ESI ADD EAX,0xdc00d800 MOV dword ptr [RDX],EAX MOV EAX,0x4 LAB_001426ec: POP RBP RET
int8 my_uni_utf16le(int8 param_1,ulong param_2,int *param_3,int *param_4) { int8 uVar1; if (param_2 < 0xd800 || (param_2 & 0xffffffffffffe000) == 0xe000) { uVar1 = 0xffffff9a; if ((int *)((long)param_3 + 2U) <= param_4) { *(short *)param_3 = (short)param_2; uVar1 = 2; } } else { uVar1 = 0; if ((0xffffffffffeffffe < param_2 - 0x110000) && (uVar1 = 0xffffff98, param_3 + 1 <= param_4)) { *param_3 = ((uint)param_2 + 0xf0000 >> 10 & 0x3ff) + ((uint)param_2 & 0x3ff) * 0x10000 + -0x23ff2800; uVar1 = 4; } } return uVar1; }
11,632
mj_mulJacTVec_island
aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_core_constraint.c
void mj_mulJacTVec_island(const mjModel* m, const mjData* d, mjtNum* res, const mjtNum* vec, int island, int flg_resunc, int flg_vecunc) { // no island, call regular function if (island < 0) { mj_mulJacTVec(m, d, res, vec); return; } // sizes int vecnnz = d->island_efcnum[island]; int resnnz = d->island_dofnum[island]; // indices int* vecind = d->island_efcind + d->island_efcadr[island]; int* resind = d->island_dofind + d->island_dofadr[island]; // sparse Jacobian if (mj_isSparse(m)) { for (int i=0; i < resnnz; i++) { int row = resind[i]; int JTnnz = d->efc_JT_rownnz[row]; int JTrowadr = d->efc_JT_rowadr[row]; int* JTind = d->efc_JT_colind + JTrowadr; mjtNum* JT = d->efc_JT + JTrowadr; int j = flg_resunc ? row : i; res[j] = mju_dotSparse2(JT, vec, JTnnz, JTind, vecnnz, vecind, flg_vecunc); } } // dense Jacobian else { int nefc = d->nefc; for (int i=0; i < resnnz; i++) { int row = resind[i]; int j = flg_resunc ? row : i; res[j] = mju_dotSparse(vec, d->efc_JT + nefc*row, vecnnz, vecind, flg_vecunc); } } }
O0
c
mj_mulJacTVec_island: subq $0x88, %rsp movl 0x90(%rsp), %eax movq %rdi, 0x80(%rsp) movq %rsi, 0x78(%rsp) movq %rdx, 0x70(%rsp) movq %rcx, 0x68(%rsp) movl %r8d, 0x64(%rsp) movl %r9d, 0x60(%rsp) cmpl $0x0, 0x64(%rsp) jge 0x6fb87 movq 0x80(%rsp), %rdi movq 0x78(%rsp), %rsi movq 0x70(%rsp), %rdx movq 0x68(%rsp), %rcx callq 0x497c0 jmp 0x6fdda movq 0x78(%rsp), %rax movq 0x27b30(%rax), %rax movslq 0x64(%rsp), %rcx movl (%rax,%rcx,4), %eax movl %eax, 0x5c(%rsp) movq 0x78(%rsp), %rax movq 0x27b08(%rax), %rax movslq 0x64(%rsp), %rcx movl (%rax,%rcx,4), %eax movl %eax, 0x58(%rsp) movq 0x78(%rsp), %rax movq 0x27b40(%rax), %rax movq 0x78(%rsp), %rcx movq 0x27b38(%rcx), %rcx movslq 0x64(%rsp), %rdx movslq (%rcx,%rdx,4), %rcx shlq $0x2, %rcx addq %rcx, %rax movq %rax, 0x50(%rsp) movq 0x78(%rsp), %rax movq 0x27b18(%rax), %rax movq 0x78(%rsp), %rcx movq 0x27b10(%rcx), %rcx movslq 0x64(%rsp), %rdx movslq (%rcx,%rdx,4), %rcx shlq $0x2, %rcx addq %rcx, %rax movq %rax, 0x48(%rsp) movq 0x80(%rsp), %rdi callq 0x49770 cmpl $0x0, %eax je 0x6fd29 movl $0x0, 0x44(%rsp) movl 0x44(%rsp), %eax cmpl 0x58(%rsp), %eax jge 0x6fd24 movq 0x48(%rsp), %rax movslq 0x44(%rsp), %rcx movl (%rax,%rcx,4), %eax movl %eax, 0x40(%rsp) movq 0x78(%rsp), %rax movq 0x27a90(%rax), %rax movslq 0x40(%rsp), %rcx movl (%rax,%rcx,4), %eax movl %eax, 0x3c(%rsp) movq 0x78(%rsp), %rax movq 0x27a98(%rax), %rax movslq 0x40(%rsp), %rcx movl (%rax,%rcx,4), %eax movl %eax, 0x38(%rsp) movq 0x78(%rsp), %rax movq 0x27aa8(%rax), %rax movslq 0x38(%rsp), %rcx shlq $0x2, %rcx addq %rcx, %rax movq %rax, 0x30(%rsp) movq 0x78(%rsp), %rax movq 0x27ab8(%rax), %rax movslq 0x38(%rsp), %rcx shlq $0x3, %rcx addq %rcx, %rax movq %rax, 0x28(%rsp) cmpl $0x0, 0x60(%rsp) je 0x6fcc9 movl 0x40(%rsp), %eax movl %eax, 0x10(%rsp) jmp 0x6fcd1 movl 0x44(%rsp), %eax movl %eax, 0x10(%rsp) movl 0x10(%rsp), %eax movl %eax, 0x24(%rsp) movq 0x28(%rsp), %rdi movq 0x68(%rsp), %rsi movl 0x3c(%rsp), %edx movq 0x30(%rsp), %rcx movl 0x5c(%rsp), %r8d movq 0x50(%rsp), %r9 movl 0x90(%rsp), %eax movl %eax, (%rsp) callq 0x497a0 movq 0x70(%rsp), %rax movslq 0x24(%rsp), %rcx vmovsd %xmm0, (%rax,%rcx,8) movl 0x44(%rsp), %eax addl $0x1, %eax movl %eax, 0x44(%rsp) jmp 0x6fc2f jmp 0x6fdda movq 0x78(%rsp), %rax movl 0x2773c(%rax), %eax movl %eax, 0x20(%rsp) movl $0x0, 0x1c(%rsp) movl 0x1c(%rsp), %eax cmpl 0x58(%rsp), %eax jge 0x6fdd8 movq 0x48(%rsp), %rax movslq 0x1c(%rsp), %rcx movl (%rax,%rcx,4), %eax movl %eax, 0x18(%rsp) cmpl $0x0, 0x60(%rsp) je 0x6fd70 movl 0x18(%rsp), %eax movl %eax, 0xc(%rsp) jmp 0x6fd78 movl 0x1c(%rsp), %eax movl %eax, 0xc(%rsp) movl 0xc(%rsp), %eax movl %eax, 0x14(%rsp) movq 0x68(%rsp), %rdi movq 0x78(%rsp), %rax movq 0x27ab8(%rax), %rsi movl 0x20(%rsp), %eax imull 0x18(%rsp), %eax cltq shlq $0x3, %rax addq %rax, %rsi movl 0x5c(%rsp), %edx movq 0x50(%rsp), %rcx movl 0x90(%rsp), %r8d callq 0x497b0 movq 0x70(%rsp), %rax movslq 0x14(%rsp), %rcx vmovsd %xmm0, (%rax,%rcx,8) movl 0x1c(%rsp), %eax addl $0x1, %eax movl %eax, 0x1c(%rsp) jmp 0x6fd40 jmp 0x6fdda addq $0x88, %rsp retq nopw %cs:(%rax,%rax)
mj_mulJacTVec_island: sub rsp, 88h mov eax, [rsp+88h+arg_0] mov [rsp+88h+var_8], rdi mov [rsp+88h+var_10], rsi mov [rsp+88h+var_18], rdx mov [rsp+88h+var_20], rcx mov [rsp+88h+var_24], r8d mov [rsp+88h+var_28], r9d cmp [rsp+88h+var_24], 0 jge short loc_6FB87 mov rdi, [rsp+88h+var_8] mov rsi, [rsp+88h+var_10] mov rdx, [rsp+88h+var_18] mov rcx, [rsp+88h+var_20] call _mj_mulJacTVec jmp loc_6FDDA loc_6FB87: mov rax, [rsp+88h+var_10] mov rax, [rax+27B30h] movsxd rcx, [rsp+88h+var_24] mov eax, [rax+rcx*4] mov [rsp+88h+var_2C], eax mov rax, [rsp+88h+var_10] mov rax, [rax+27B08h] movsxd rcx, [rsp+88h+var_24] mov eax, [rax+rcx*4] mov [rsp+88h+var_30], eax mov rax, [rsp+88h+var_10] mov rax, [rax+27B40h] mov rcx, [rsp+88h+var_10] mov rcx, [rcx+27B38h] movsxd rdx, [rsp+88h+var_24] movsxd rcx, dword ptr [rcx+rdx*4] shl rcx, 2 add rax, rcx mov [rsp+88h+var_38], rax mov rax, [rsp+88h+var_10] mov rax, [rax+27B18h] mov rcx, [rsp+88h+var_10] mov rcx, [rcx+27B10h] movsxd rdx, [rsp+88h+var_24] movsxd rcx, dword ptr [rcx+rdx*4] shl rcx, 2 add rax, rcx mov [rsp+88h+var_40], rax mov rdi, [rsp+88h+var_8] call _mj_isSparse cmp eax, 0 jz loc_6FD29 mov [rsp+88h+var_44], 0 loc_6FC2F: mov eax, [rsp+88h+var_44] cmp eax, [rsp+88h+var_30] jge loc_6FD24 mov rax, [rsp+88h+var_40] movsxd rcx, [rsp+88h+var_44] mov eax, [rax+rcx*4] mov [rsp+88h+var_48], eax mov rax, [rsp+88h+var_10] mov rax, [rax+27A90h] movsxd rcx, [rsp+88h+var_48] mov eax, [rax+rcx*4] mov [rsp+88h+var_4C], eax mov rax, [rsp+88h+var_10] mov rax, [rax+27A98h] movsxd rcx, [rsp+88h+var_48] mov eax, [rax+rcx*4] mov [rsp+88h+var_50], eax mov rax, [rsp+88h+var_10] mov rax, [rax+27AA8h] movsxd rcx, [rsp+88h+var_50] shl rcx, 2 add rax, rcx mov [rsp+88h+var_58], rax mov rax, [rsp+88h+var_10] mov rax, [rax+27AB8h] movsxd rcx, [rsp+88h+var_50] shl rcx, 3 add rax, rcx mov [rsp+88h+var_60], rax cmp [rsp+88h+var_28], 0 jz short loc_6FCC9 mov eax, [rsp+88h+var_48] mov [rsp+88h+var_78], eax jmp short loc_6FCD1 loc_6FCC9: mov eax, [rsp+88h+var_44] mov [rsp+88h+var_78], eax loc_6FCD1: mov eax, [rsp+88h+var_78] mov [rsp+88h+var_64], eax mov rdi, [rsp+88h+var_60] mov rsi, [rsp+88h+var_20] mov edx, [rsp+88h+var_4C] mov rcx, [rsp+88h+var_58] mov r8d, [rsp+88h+var_2C] mov r9, [rsp+88h+var_38] mov eax, [rsp+88h+arg_0] mov [rsp+88h+var_88], eax call _mju_dotSparse2 mov rax, [rsp+88h+var_18] movsxd rcx, [rsp+88h+var_64] vmovsd qword ptr [rax+rcx*8], xmm0 mov eax, [rsp+88h+var_44] add eax, 1 mov [rsp+88h+var_44], eax jmp loc_6FC2F loc_6FD24: jmp loc_6FDDA loc_6FD29: mov rax, [rsp+88h+var_10] mov eax, [rax+2773Ch] mov [rsp+88h+var_68], eax mov [rsp+88h+var_6C], 0 loc_6FD40: mov eax, [rsp+88h+var_6C] cmp eax, [rsp+88h+var_30] jge loc_6FDD8 mov rax, [rsp+88h+var_40] movsxd rcx, [rsp+88h+var_6C] mov eax, [rax+rcx*4] mov [rsp+88h+var_70], eax cmp [rsp+88h+var_28], 0 jz short loc_6FD70 mov eax, [rsp+88h+var_70] mov [rsp+88h+var_7C], eax jmp short loc_6FD78 loc_6FD70: mov eax, [rsp+88h+var_6C] mov [rsp+88h+var_7C], eax loc_6FD78: mov eax, [rsp+88h+var_7C] mov [rsp+88h+var_74], eax mov rdi, [rsp+88h+var_20] mov rax, [rsp+88h+var_10] mov rsi, [rax+27AB8h] mov eax, [rsp+88h+var_68] imul eax, [rsp+88h+var_70] cdqe shl rax, 3 add rsi, rax mov edx, [rsp+88h+var_2C] mov rcx, [rsp+88h+var_38] mov r8d, [rsp+88h+arg_0] call _mju_dotSparse mov rax, [rsp+88h+var_18] movsxd rcx, [rsp+88h+var_74] vmovsd qword ptr [rax+rcx*8], xmm0 mov eax, [rsp+88h+var_6C] add eax, 1 mov [rsp+88h+var_6C], eax jmp loc_6FD40 loc_6FDD8: jmp short $+2 loc_6FDDA: add rsp, 88h retn
long long mj_mulJacTVec_island( long long a1, long long a2, long long a3, long long a4, int a5, int a6, __m128 _XMM0, unsigned int a8) { long long result; // rax unsigned int v13; // [rsp+Ch] [rbp-7Ch] unsigned int v14; // [rsp+10h] [rbp-78h] unsigned int j; // [rsp+1Ch] [rbp-6Ch] int v16; // [rsp+20h] [rbp-68h] int v17; // [rsp+38h] [rbp-50h] int v18; // [rsp+40h] [rbp-48h] unsigned int i; // [rsp+44h] [rbp-44h] long long v20; // [rsp+48h] [rbp-40h] long long v21; // [rsp+50h] [rbp-38h] int v22; // [rsp+58h] [rbp-30h] unsigned int v23; // [rsp+5Ch] [rbp-2Ch] if ( a5 < 0 ) return mj_mulJacTVec(a1, a2, a3, a4); v23 = *(_DWORD *)(*(_QWORD *)(a2 + 162608) + 4LL * a5); v22 = *(_DWORD *)(*(_QWORD *)(a2 + 162568) + 4LL * a5); v21 = 4LL * *(int *)(*(_QWORD *)(a2 + 162616) + 4LL * a5) + *(_QWORD *)(a2 + 162624); v20 = 4LL * *(int *)(*(_QWORD *)(a2 + 162576) + 4LL * a5) + *(_QWORD *)(a2 + 162584); if ( mj_isSparse(a1) ) { for ( i = 0; ; ++i ) { result = i; if ( (int)i >= v22 ) break; v18 = *(_DWORD *)(v20 + 4LL * (int)i); if ( a6 ) v14 = *(_DWORD *)(v20 + 4LL * (int)i); else v14 = i; v17 = *(_DWORD *)(*(_QWORD *)(a2 + 162456) + 4LL * v18); *(double *)_XMM0.m128_u64 = mju_dotSparse2( 8 * v17 + *(_DWORD *)(a2 + 162488), a4, *(_DWORD *)(*(_QWORD *)(a2 + 162448) + 4LL * v18), 4 * v17 + *(_DWORD *)(a2 + 162472), v23, v21, a8); _RAX = a3; _RCX = (int)v14; __asm { vmovsd qword ptr [rax+rcx*8], xmm0 } } } else { v16 = *(_DWORD *)(a2 + 161596); for ( j = 0; ; ++j ) { result = j; if ( (int)j >= v22 ) break; if ( a6 ) v13 = *(_DWORD *)(v20 + 4LL * (int)j); else v13 = j; *(double *)_XMM0.m128_u64 = mju_dotSparse( a4, 8LL * *(_DWORD *)(v20 + 4LL * (int)j) * v16 + *(_QWORD *)(a2 + 162488), v23, v21, a8); _RAX = a3; _RCX = (int)v13; __asm { vmovsd qword ptr [rax+rcx*8], xmm0 } } } return result; }
mj_mulJacTVec_island: SUB RSP,0x88 MOV EAX,dword ptr [RSP + 0x90] MOV qword ptr [RSP + 0x80],RDI MOV qword ptr [RSP + 0x78],RSI MOV qword ptr [RSP + 0x70],RDX MOV qword ptr [RSP + 0x68],RCX MOV dword ptr [RSP + 0x64],R8D MOV dword ptr [RSP + 0x60],R9D CMP dword ptr [RSP + 0x64],0x0 JGE 0x0016fb87 MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x78] MOV RDX,qword ptr [RSP + 0x70] MOV RCX,qword ptr [RSP + 0x68] CALL 0x001497c0 JMP 0x0016fdda LAB_0016fb87: MOV RAX,qword ptr [RSP + 0x78] MOV RAX,qword ptr [RAX + 0x27b30] MOVSXD RCX,dword ptr [RSP + 0x64] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0x5c],EAX MOV RAX,qword ptr [RSP + 0x78] MOV RAX,qword ptr [RAX + 0x27b08] MOVSXD RCX,dword ptr [RSP + 0x64] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0x58],EAX MOV RAX,qword ptr [RSP + 0x78] MOV RAX,qword ptr [RAX + 0x27b40] MOV RCX,qword ptr [RSP + 0x78] MOV RCX,qword ptr [RCX + 0x27b38] MOVSXD RDX,dword ptr [RSP + 0x64] MOVSXD RCX,dword ptr [RCX + RDX*0x4] SHL RCX,0x2 ADD RAX,RCX MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [RSP + 0x78] MOV RAX,qword ptr [RAX + 0x27b18] MOV RCX,qword ptr [RSP + 0x78] MOV RCX,qword ptr [RCX + 0x27b10] MOVSXD RDX,dword ptr [RSP + 0x64] MOVSXD RCX,dword ptr [RCX + RDX*0x4] SHL RCX,0x2 ADD RAX,RCX MOV qword ptr [RSP + 0x48],RAX MOV RDI,qword ptr [RSP + 0x80] CALL 0x00149770 CMP EAX,0x0 JZ 0x0016fd29 MOV dword ptr [RSP + 0x44],0x0 LAB_0016fc2f: MOV EAX,dword ptr [RSP + 0x44] CMP EAX,dword ptr [RSP + 0x58] JGE 0x0016fd24 MOV RAX,qword ptr [RSP + 0x48] MOVSXD RCX,dword ptr [RSP + 0x44] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0x40],EAX MOV RAX,qword ptr [RSP + 0x78] MOV RAX,qword ptr [RAX + 0x27a90] MOVSXD RCX,dword ptr [RSP + 0x40] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0x3c],EAX MOV RAX,qword ptr [RSP + 0x78] MOV RAX,qword ptr [RAX + 0x27a98] MOVSXD RCX,dword ptr [RSP + 0x40] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0x38],EAX MOV RAX,qword ptr [RSP + 0x78] MOV RAX,qword ptr [RAX + 0x27aa8] MOVSXD RCX,dword ptr [RSP + 0x38] SHL RCX,0x2 ADD RAX,RCX MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x78] MOV RAX,qword ptr [RAX + 0x27ab8] MOVSXD RCX,dword ptr [RSP + 0x38] SHL RCX,0x3 ADD RAX,RCX MOV qword ptr [RSP + 0x28],RAX CMP dword ptr [RSP + 0x60],0x0 JZ 0x0016fcc9 MOV EAX,dword ptr [RSP + 0x40] MOV dword ptr [RSP + 0x10],EAX JMP 0x0016fcd1 LAB_0016fcc9: MOV EAX,dword ptr [RSP + 0x44] MOV dword ptr [RSP + 0x10],EAX LAB_0016fcd1: MOV EAX,dword ptr [RSP + 0x10] MOV dword ptr [RSP + 0x24],EAX MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x68] MOV EDX,dword ptr [RSP + 0x3c] MOV RCX,qword ptr [RSP + 0x30] MOV R8D,dword ptr [RSP + 0x5c] MOV R9,qword ptr [RSP + 0x50] MOV EAX,dword ptr [RSP + 0x90] MOV dword ptr [RSP],EAX CALL 0x001497a0 MOV RAX,qword ptr [RSP + 0x70] MOVSXD RCX,dword ptr [RSP + 0x24] VMOVSD qword ptr [RAX + RCX*0x8],XMM0 MOV EAX,dword ptr [RSP + 0x44] ADD EAX,0x1 MOV dword ptr [RSP + 0x44],EAX JMP 0x0016fc2f LAB_0016fd24: JMP 0x0016fdda LAB_0016fd29: MOV RAX,qword ptr [RSP + 0x78] MOV EAX,dword ptr [RAX + 0x2773c] MOV dword ptr [RSP + 0x20],EAX MOV dword ptr [RSP + 0x1c],0x0 LAB_0016fd40: MOV EAX,dword ptr [RSP + 0x1c] CMP EAX,dword ptr [RSP + 0x58] JGE 0x0016fdd8 MOV RAX,qword ptr [RSP + 0x48] MOVSXD RCX,dword ptr [RSP + 0x1c] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0x18],EAX CMP dword ptr [RSP + 0x60],0x0 JZ 0x0016fd70 MOV EAX,dword ptr [RSP + 0x18] MOV dword ptr [RSP + 0xc],EAX JMP 0x0016fd78 LAB_0016fd70: MOV EAX,dword ptr [RSP + 0x1c] MOV dword ptr [RSP + 0xc],EAX LAB_0016fd78: MOV EAX,dword ptr [RSP + 0xc] MOV dword ptr [RSP + 0x14],EAX MOV RDI,qword ptr [RSP + 0x68] MOV RAX,qword ptr [RSP + 0x78] MOV RSI,qword ptr [RAX + 0x27ab8] MOV EAX,dword ptr [RSP + 0x20] IMUL EAX,dword ptr [RSP + 0x18] CDQE SHL RAX,0x3 ADD RSI,RAX MOV EDX,dword ptr [RSP + 0x5c] MOV RCX,qword ptr [RSP + 0x50] MOV R8D,dword ptr [RSP + 0x90] CALL 0x001497b0 MOV RAX,qword ptr [RSP + 0x70] MOVSXD RCX,dword ptr [RSP + 0x14] VMOVSD qword ptr [RAX + RCX*0x8],XMM0 MOV EAX,dword ptr [RSP + 0x1c] ADD EAX,0x1 MOV dword ptr [RSP + 0x1c],EAX JMP 0x0016fd40 LAB_0016fdd8: JMP 0x0016fdda LAB_0016fdda: ADD RSP,0x88 RET
void mj_mulJacTVec_island (int8 param_1,long param_2,long param_3,int8 param_4,int param_5, int param_6,int4 param_7) { int4 uVar1; int iVar2; int iVar3; int iVar4; long lVar5; long lVar6; long lVar7; int8 uVar8; int4 local_7c; int4 local_78; int4 local_6c; int4 local_44; if (param_5 < 0) { mj_mulJacTVec(param_1,param_2,param_3,param_4); } else { uVar1 = *(int4 *)(*(long *)(param_2 + 0x27b30) + (long)param_5 * 4); iVar2 = *(int *)(*(long *)(param_2 + 0x27b08) + (long)param_5 * 4); lVar5 = *(long *)(param_2 + 0x27b40) + (long)*(int *)(*(long *)(param_2 + 0x27b38) + (long)param_5 * 4) * 4; lVar6 = *(long *)(param_2 + 0x27b18) + (long)*(int *)(*(long *)(param_2 + 0x27b10) + (long)param_5 * 4) * 4; iVar4 = mj_isSparse(param_1); if (iVar4 == 0) { iVar4 = *(int *)(param_2 + 0x2773c); for (local_6c = 0; local_6c < iVar2; local_6c = local_6c + 1) { iVar3 = *(int *)(lVar6 + (long)local_6c * 4); local_7c = iVar3; if (param_6 == 0) { local_7c = local_6c; } uVar8 = mju_dotSparse(param_4,*(long *)(param_2 + 0x27ab8) + (long)(iVar4 * iVar3) * 8,uVar1 ,lVar5,param_7); *(int8 *)(param_3 + (long)local_7c * 8) = uVar8; } } else { for (local_44 = 0; local_44 < iVar2; local_44 = local_44 + 1) { local_78 = *(int *)(lVar6 + (long)local_44 * 4); lVar7 = (long)local_78; iVar4 = *(int *)(*(long *)(param_2 + 0x27a98) + (long)local_78 * 4); if (param_6 == 0) { local_78 = local_44; } uVar8 = mju_dotSparse2(*(long *)(param_2 + 0x27ab8) + (long)iVar4 * 8,param_4, *(int4 *)(*(long *)(param_2 + 0x27a90) + lVar7 * 4), *(long *)(param_2 + 0x27aa8) + (long)iVar4 * 4,uVar1,lVar5,param_7); *(int8 *)(param_3 + (long)local_78 * 8) = uVar8; } } } return; }
11,633
Apc_target::dequeue_request(Apc_target::Call_request*)
eloqsql/include/../sql/my_apc.cc
void Apc_target::dequeue_request(Call_request *qe) { mysql_mutex_assert_owner(LOCK_thd_kill_ptr); if (apc_calls == qe) { if ((apc_calls= apc_calls->next) == qe) { apc_calls= NULL; } } qe->prev->next= qe->next; qe->next->prev= qe->prev; }
O0
cpp
Apc_target::dequeue_request(Apc_target::Call_request*): pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) jmp 0x24806 movq -0x18(%rbp), %rax movq 0x10(%rax), %rax cmpq -0x10(%rbp), %rax jne 0x24838 movq -0x18(%rbp), %rcx movq 0x10(%rcx), %rax movq 0x48(%rax), %rax movq %rax, 0x10(%rcx) cmpq -0x10(%rbp), %rax jne 0x24836 movq -0x18(%rbp), %rax movq $0x0, 0x10(%rax) jmp 0x24838 movq -0x10(%rbp), %rax movq 0x48(%rax), %rcx movq -0x10(%rbp), %rax movq 0x50(%rax), %rax movq %rcx, 0x48(%rax) movq -0x10(%rbp), %rax movq 0x50(%rax), %rcx movq -0x10(%rbp), %rax movq 0x48(%rax), %rax movq %rcx, 0x50(%rax) popq %rbp retq nopw %cs:(%rax,%rax)
_ZN10Apc_target15dequeue_requestEPNS_12Call_requestE: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_18], rax jmp short $+2 loc_24806: mov rax, [rbp+var_18] mov rax, [rax+10h] cmp rax, [rbp+var_10] jnz short loc_24838 mov rcx, [rbp+var_18] mov rax, [rcx+10h] mov rax, [rax+48h] mov [rcx+10h], rax cmp rax, [rbp+var_10] jnz short loc_24836 mov rax, [rbp+var_18] mov qword ptr [rax+10h], 0 loc_24836: jmp short $+2 loc_24838: mov rax, [rbp+var_10] mov rcx, [rax+48h] mov rax, [rbp+var_10] mov rax, [rax+50h] mov [rax+48h], rcx mov rax, [rbp+var_10] mov rcx, [rax+50h] mov rax, [rbp+var_10] mov rax, [rax+48h] mov [rax+50h], rcx pop rbp retn
long long Apc_target::dequeue_request(long long a1, long long a2) { long long v2; // rax long long result; // rax if ( *(_QWORD *)(a1 + 16) == a2 ) { v2 = *(_QWORD *)(*(_QWORD *)(a1 + 16) + 72LL); *(_QWORD *)(a1 + 16) = v2; if ( v2 == a2 ) *(_QWORD *)(a1 + 16) = 0LL; } *(_QWORD *)(*(_QWORD *)(a2 + 80) + 72LL) = *(_QWORD *)(a2 + 72); result = *(_QWORD *)(a2 + 72); *(_QWORD *)(result + 80) = *(_QWORD *)(a2 + 80); return result; }
dequeue_request: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX JMP 0x00124806 LAB_00124806: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] CMP RAX,qword ptr [RBP + -0x10] JNZ 0x00124838 MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RCX + 0x10] MOV RAX,qword ptr [RAX + 0x48] MOV qword ptr [RCX + 0x10],RAX CMP RAX,qword ptr [RBP + -0x10] JNZ 0x00124836 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x10],0x0 LAB_00124836: JMP 0x00124838 LAB_00124838: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x48] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x50] MOV qword ptr [RAX + 0x48],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x50] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x48] MOV qword ptr [RAX + 0x50],RCX POP RBP RET
/* Apc_target::dequeue_request(Apc_target::Call_request*) */ void __thiscall Apc_target::dequeue_request(Apc_target *this,Call_request *param_1) { Call_request *pCVar1; if ((*(Call_request **)(this + 0x10) == param_1) && (pCVar1 = *(Call_request **)(*(long *)(this + 0x10) + 0x48), *(Call_request **)(this + 0x10) = pCVar1, pCVar1 == param_1)) { *(int8 *)(this + 0x10) = 0; } *(int8 *)(*(long *)(param_1 + 0x50) + 0x48) = *(int8 *)(param_1 + 0x48); *(int8 *)(*(long *)(param_1 + 0x48) + 0x50) = *(int8 *)(param_1 + 0x50); return; }
11,634
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateChildToParentMapping()
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/refinement.cpp
void Refinement::populateChildToParentMapping() { ChildTag initialChildTags[2][4]; for (int i = 0; i < 2; ++i) { for (int j = 0; j < 4; ++j) { ChildTag & tag = initialChildTags[i][j]; tag._incomplete = (unsigned char)i; tag._parentType = 0; tag._indexInParent = (unsigned char)j; } } populateFaceParentVectors(initialChildTags); populateEdgeParentVectors(initialChildTags); populateVertexParentVectors(initialChildTags); }
O0
cpp
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateChildToParentMapping(): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x38(%rbp) leaq -0x10(%rbp), %rax movq %rax, %rcx addq $0x8, %rcx movq %rcx, -0x30(%rbp) movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rdi movq %rdi, -0x40(%rbp) callq 0xd4800 movq -0x40(%rbp), %rax movq -0x30(%rbp), %rcx addq $0x1, %rax cmpq %rcx, %rax movq %rax, -0x28(%rbp) jne 0xfe6b7 movl $0x0, -0x14(%rbp) cmpl $0x2, -0x14(%rbp) jge 0xfe760 movl $0x0, -0x18(%rbp) cmpl $0x4, -0x18(%rbp) jge 0xfe753 movslq -0x14(%rbp), %rcx leaq -0x10(%rbp), %rax shlq $0x2, %rcx addq %rcx, %rax movslq -0x18(%rbp), %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) movl -0x14(%rbp), %eax movb %al, %dl movq -0x20(%rbp), %rax movb (%rax), %cl andb $0x1, %dl andb $-0x2, %cl orb %dl, %cl movb %cl, (%rax) movq -0x20(%rbp), %rax movb (%rax), %cl andb $-0x7, %cl orb $0x0, %cl movb %cl, (%rax) movl -0x18(%rbp), %eax movb %al, %dl movq -0x20(%rbp), %rax movb (%rax), %cl andb $0x3, %dl shlb $0x3, %dl andb $-0x19, %cl orb %dl, %cl movb %cl, (%rax) movl -0x18(%rbp), %eax addl $0x1, %eax movl %eax, -0x18(%rbp) jmp 0xfe6ed jmp 0xfe755 movl -0x14(%rbp), %eax addl $0x1, %eax movl %eax, -0x14(%rbp) jmp 0xfe6e0 movq -0x38(%rbp), %rdi leaq -0x10(%rbp), %rsi callq 0xd1ce0 movq -0x38(%rbp), %rdi leaq -0x10(%rbp), %rsi callq 0xcbf70 movq -0x38(%rbp), %rdi leaq -0x10(%rbp), %rsi callq 0xd6f70 addq $0x40, %rsp popq %rbp retq nopl (%rax)
_ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement28populateChildToParentMappingEv: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_38], rax lea rax, [rbp+var_10] mov rcx, rax add rcx, 8 mov [rbp+var_30], rcx mov [rbp+var_28], rax loc_FE6B7: mov rdi, [rbp+var_28]; this mov [rbp+var_40], rdi call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement8ChildTagC2Ev; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag::ChildTag(void) mov rax, [rbp+var_40] mov rcx, [rbp+var_30] add rax, 1 cmp rax, rcx mov [rbp+var_28], rax jnz short loc_FE6B7 mov [rbp+var_14], 0 loc_FE6E0: cmp [rbp+var_14], 2 jge short loc_FE760 mov [rbp+var_18], 0 loc_FE6ED: cmp [rbp+var_18], 4 jge short loc_FE753 movsxd rcx, [rbp+var_14] lea rax, [rbp+var_10] shl rcx, 2 add rax, rcx movsxd rcx, [rbp+var_18] add rax, rcx mov [rbp+var_20], rax mov eax, [rbp+var_14] mov dl, al mov rax, [rbp+var_20] mov cl, [rax] and dl, 1 and cl, 0FEh or cl, dl mov [rax], cl mov rax, [rbp+var_20] mov cl, [rax] and cl, 0F9h or cl, 0 mov [rax], cl mov eax, [rbp+var_18] mov dl, al mov rax, [rbp+var_20] mov cl, [rax] and dl, 3 shl dl, 3 and cl, 0E7h or cl, dl mov [rax], cl mov eax, [rbp+var_18] add eax, 1 mov [rbp+var_18], eax jmp short loc_FE6ED loc_FE753: jmp short $+2 loc_FE755: mov eax, [rbp+var_14] add eax, 1 mov [rbp+var_14], eax jmp short loc_FE6E0 loc_FE760: mov rdi, [rbp+var_38] lea rsi, [rbp+var_10] call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement25populateFaceParentVectorsEPA4_KNS3_8ChildTagE; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateFaceParentVectors(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag const(*)[4]) mov rdi, [rbp+var_38] lea rsi, [rbp+var_10] call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement25populateEdgeParentVectorsEPA4_KNS3_8ChildTagE; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeParentVectors(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag const(*)[4]) mov rdi, [rbp+var_38] lea rsi, [rbp+var_10] call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement27populateVertexParentVectorsEPA4_KNS3_8ChildTagE; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexParentVectors(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag const(*)[4]) add rsp, 40h pop rbp retn
long long OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateChildToParentMapping( OpenSubdiv::v3_6_0::Vtr::internal::Refinement *this) { OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag *v2; // [rsp+18h] [rbp-28h] _BYTE *v3; // [rsp+20h] [rbp-20h] int j; // [rsp+28h] [rbp-18h] int i; // [rsp+2Ch] [rbp-14h] _DWORD v6[2]; // [rsp+30h] [rbp-10h] BYREF OpenSubdiv::v3_6_0::Vtr::internal::Refinement *v7; // [rsp+38h] [rbp-8h] BYREF v7 = this; v2 = (OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag *)v6; do { OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag::ChildTag(v2); v2 = (OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag *)((char *)v2 + 1); } while ( v2 != (OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag *)&v7 ); for ( i = 0; i < 2; ++i ) { for ( j = 0; j < 4; ++j ) { v3 = (char *)&v6[i] + j; *v3 = i & 1 | *v3 & 0xFE; *v3 &= 0xF9u; *v3 = (8 * (j & 3)) | *v3 & 0xE7; } } OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateFaceParentVectors(this, v6); OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeParentVectors(this, v6); return OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexParentVectors(this, v6); }
populateChildToParentMapping: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x38],RAX LEA RAX,[RBP + -0x10] MOV RCX,RAX ADD RCX,0x8 MOV qword ptr [RBP + -0x30],RCX MOV qword ptr [RBP + -0x28],RAX LAB_001fe6b7: MOV RDI,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x40],RDI CALL 0x001d4800 MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x30] ADD RAX,0x1 CMP RAX,RCX MOV qword ptr [RBP + -0x28],RAX JNZ 0x001fe6b7 MOV dword ptr [RBP + -0x14],0x0 LAB_001fe6e0: CMP dword ptr [RBP + -0x14],0x2 JGE 0x001fe760 MOV dword ptr [RBP + -0x18],0x0 LAB_001fe6ed: CMP dword ptr [RBP + -0x18],0x4 JGE 0x001fe753 MOVSXD RCX,dword ptr [RBP + -0x14] LEA RAX,[RBP + -0x10] SHL RCX,0x2 ADD RAX,RCX MOVSXD RCX,dword ptr [RBP + -0x18] ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV EAX,dword ptr [RBP + -0x14] MOV DL,AL MOV RAX,qword ptr [RBP + -0x20] MOV CL,byte ptr [RAX] AND DL,0x1 AND CL,0xfe OR CL,DL MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x20] MOV CL,byte ptr [RAX] AND CL,0xf9 OR CL,0x0 MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x18] MOV DL,AL MOV RAX,qword ptr [RBP + -0x20] MOV CL,byte ptr [RAX] AND DL,0x3 SHL DL,0x3 AND CL,0xe7 OR CL,DL MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x18] ADD EAX,0x1 MOV dword ptr [RBP + -0x18],EAX JMP 0x001fe6ed LAB_001fe753: JMP 0x001fe755 LAB_001fe755: MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 MOV dword ptr [RBP + -0x14],EAX JMP 0x001fe6e0 LAB_001fe760: MOV RDI,qword ptr [RBP + -0x38] LEA RSI,[RBP + -0x10] CALL 0x001d1ce0 MOV RDI,qword ptr [RBP + -0x38] LEA RSI,[RBP + -0x10] CALL 0x001cbf70 MOV RDI,qword ptr [RBP + -0x38] LEA RSI,[RBP + -0x10] CALL 0x001d6f70 ADD RSP,0x40 POP RBP RET
/* OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateChildToParentMapping() */ void __thiscall OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateChildToParentMapping(Refinement *this) { ChildTag *pCVar1; ChildTag *local_30; int local_20; int local_1c; ChildTag local_18 [8]; Refinement *local_10; local_30 = local_18; local_10 = this; do { ChildTag::ChildTag(local_30); local_30 = local_30 + 1; } while (local_30 != (ChildTag *)&local_10); for (local_1c = 0; local_1c < 2; local_1c = local_1c + 1) { for (local_20 = 0; local_20 < 4; local_20 = local_20 + 1) { pCVar1 = local_18 + (long)local_20 + (long)local_1c * 4; *pCVar1 = (ChildTag)((byte)*pCVar1 & 0xfe | (byte)local_1c & 1); *pCVar1 = (ChildTag)((byte)*pCVar1 & 0xf9); *pCVar1 = (ChildTag)((byte)*pCVar1 & 0xe7 | ((byte)local_20 & 3) << 3); } } populateFaceParentVectors(this,local_18); populateEdgeParentVectors(this,local_18); populateVertexParentVectors(this,local_18); return; }
11,635
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateChildToParentMapping()
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/refinement.cpp
void Refinement::populateChildToParentMapping() { ChildTag initialChildTags[2][4]; for (int i = 0; i < 2; ++i) { for (int j = 0; j < 4; ++j) { ChildTag & tag = initialChildTags[i][j]; tag._incomplete = (unsigned char)i; tag._parentType = 0; tag._indexInParent = (unsigned char)j; } } populateFaceParentVectors(initialChildTags); populateEdgeParentVectors(initialChildTags); populateVertexParentVectors(initialChildTags); }
O1
cpp
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateChildToParentMapping(): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq %rsp, %rax xorl %ecx, %ecx movl %ecx, %edx xorl %esi, %esi movb (%rax,%rsi), %dil andb $-0x20, %dil addb %dl, %dil movb %dil, (%rax,%rsi) incq %rsi addb $0x8, %dl cmpq $0x4, %rsi jne 0x48a20 leaq 0x1(%rcx), %rdx addq $0x4, %rax testq %rcx, %rcx movq %rdx, %rcx je 0x48a1c movq %rsp, %r14 movq %rbx, %rdi movq %r14, %rsi callq 0x3b090 movq %rbx, %rdi movq %r14, %rsi callq 0x39e40 movq %rbx, %rdi movq %r14, %rsi callq 0x3c1f0 addq $0x8, %rsp popq %rbx popq %r14 retq nop
_ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement28populateChildToParentMappingEv: push r14 push rbx push rax mov rbx, rdi mov rax, rsp xor ecx, ecx loc_48A1C: mov edx, ecx xor esi, esi loc_48A20: mov dil, [rax+rsi] and dil, 0E0h add dil, dl mov [rax+rsi], dil inc rsi add dl, 8 cmp rsi, 4 jnz short loc_48A20 lea rdx, [rcx+1] add rax, 4 test rcx, rcx mov rcx, rdx jz short loc_48A1C mov r14, rsp mov rdi, rbx mov rsi, r14 call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement25populateFaceParentVectorsEPA4_KNS3_8ChildTagE; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateFaceParentVectors(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag const(*)[4]) mov rdi, rbx mov rsi, r14 call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement25populateEdgeParentVectorsEPA4_KNS3_8ChildTagE; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeParentVectors(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag const(*)[4]) mov rdi, rbx mov rsi, r14 call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement27populateVertexParentVectorsEPA4_KNS3_8ChildTagE; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexParentVectors(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag const(*)[4]) add rsp, 8 pop rbx pop r14 retn
long long OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateChildToParentMapping( OpenSubdiv::v3_6_0::Vtr::internal::Refinement *this) { long long v1; // rax _QWORD *v2; // rax long long v3; // rcx char v4; // dl long long i; // rsi long long v6; // rdx _QWORD v9[3]; // [rsp-8h] [rbp-18h] BYREF v9[0] = v1; v2 = v9; v3 = 0LL; do { v4 = v3; for ( i = 0LL; i != 4; ++i ) { *((_BYTE *)v2 + i) = v4 + (*((_BYTE *)v2 + i) & 0xE0); v4 += 8; } v6 = v3 + 1; v2 = (_QWORD *)((char *)v2 + 4); } while ( v3++ == 0 ); OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateFaceParentVectors(this, v9, v6, v3); OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeParentVectors(this, v9); return OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexParentVectors(this, v9); }
populateChildToParentMapping: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV RAX,RSP XOR ECX,ECX LAB_00148a1c: MOV EDX,ECX XOR ESI,ESI LAB_00148a20: MOV DIL,byte ptr [RAX + RSI*0x1] AND DIL,0xe0 ADD DIL,DL MOV byte ptr [RAX + RSI*0x1],DIL INC RSI ADD DL,0x8 CMP RSI,0x4 JNZ 0x00148a20 LEA RDX,[RCX + 0x1] ADD RAX,0x4 TEST RCX,RCX MOV RCX,RDX JZ 0x00148a1c MOV R14,RSP MOV RDI,RBX MOV RSI,R14 CALL 0x0013b090 MOV RDI,RBX MOV RSI,R14 CALL 0x00139e40 MOV RDI,RBX MOV RSI,R14 CALL 0x0013c1f0 ADD RSP,0x8 POP RBX POP R14 RET
/* OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateChildToParentMapping() */ void __thiscall OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateChildToParentMapping(Refinement *this) { ChildTag *pCVar1; ulong uVar2; ulong uVar3; long lVar4; bool bVar5; ChildTag local_18 [8]; pCVar1 = local_18; uVar2 = 0; do { uVar3 = uVar2 & 0xffffffff; lVar4 = 0; do { pCVar1[lVar4] = (ChildTag)((*(byte *)(pCVar1 + lVar4) & 0xe0) + (char)uVar3); lVar4 = lVar4 + 1; uVar3 = (ulong)(byte)((char)uVar3 + 8); } while (lVar4 != 4); pCVar1 = pCVar1 + 4; bVar5 = uVar2 == 0; uVar2 = uVar2 + 1; } while (bVar5); populateFaceParentVectors(this,local_18); populateEdgeParentVectors(this,local_18); populateVertexParentVectors(this,local_18); return; }
11,636
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateChildToParentMapping()
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/refinement.cpp
void Refinement::populateChildToParentMapping() { ChildTag initialChildTags[2][4]; for (int i = 0; i < 2; ++i) { for (int j = 0; j < 4; ++j) { ChildTag & tag = initialChildTags[i][j]; tag._incomplete = (unsigned char)i; tag._parentType = 0; tag._indexInParent = (unsigned char)j; } } populateFaceParentVectors(initialChildTags); populateEdgeParentVectors(initialChildTags); populateVertexParentVectors(initialChildTags); }
O2
cpp
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateChildToParentMapping(): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq %rsp, %rax xorl %ecx, %ecx cmpq $0x2, %rcx je 0x60b1e movl %ecx, %edx xorl %esi, %esi cmpq $0x4, %rsi je 0x60b15 movb (%rax,%rsi), %dil andb $-0x20, %dil addb %dl, %dil movb %dil, (%rax,%rsi) incq %rsi addb $0x8, %dl jmp 0x60af8 incq %rcx addq $0x4, %rax jmp 0x60aee movq %rsp, %r14 movq %rbx, %rdi movq %r14, %rsi callq 0x53f10 movq %rbx, %rdi movq %r14, %rsi callq 0x521a0 movq %rbx, %rdi movq %r14, %rsi callq 0x55a90 addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement28populateChildToParentMappingEv: push r14 push rbx push rax mov rbx, rdi mov rax, rsp xor ecx, ecx loc_60AEE: cmp rcx, 2 jz short loc_60B1E mov edx, ecx xor esi, esi loc_60AF8: cmp rsi, 4 jz short loc_60B15 mov dil, [rax+rsi] and dil, 0E0h add dil, dl mov [rax+rsi], dil inc rsi add dl, 8 jmp short loc_60AF8 loc_60B15: inc rcx add rax, 4 jmp short loc_60AEE loc_60B1E: mov r14, rsp mov rdi, rbx; this mov rsi, r14 call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement25populateFaceParentVectorsEPA4_KNS3_8ChildTagE; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateFaceParentVectors(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag const(*)[4]) mov rdi, rbx; this mov rsi, r14 call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement25populateEdgeParentVectorsEPA4_KNS3_8ChildTagE; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeParentVectors(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag const(*)[4]) mov rdi, rbx mov rsi, r14 call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement27populateVertexParentVectorsEPA4_KNS3_8ChildTagE; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexParentVectors(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::ChildTag const(*)[4]) add rsp, 8 pop rbx pop r14 retn
long long OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateChildToParentMapping( OpenSubdiv::v3_6_0::Vtr::internal::Refinement *this) { long long v1; // rax _QWORD *v2; // rax long long i; // rcx char v4; // dl long long j; // rsi _QWORD v7[3]; // [rsp-8h] [rbp-18h] BYREF v7[0] = v1; v2 = v7; for ( i = 0LL; i != 2; ++i ) { v4 = i; for ( j = 0LL; j != 4; ++j ) { *((_BYTE *)v2 + j) = v4 + (*((_BYTE *)v2 + j) & 0xE0); v4 += 8; } v2 = (_QWORD *)((char *)v2 + 4); } OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateFaceParentVectors(this); OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeParentVectors(this); return OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateVertexParentVectors(this, v7); }
populateChildToParentMapping: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV RAX,RSP XOR ECX,ECX LAB_00160aee: CMP RCX,0x2 JZ 0x00160b1e MOV EDX,ECX XOR ESI,ESI LAB_00160af8: CMP RSI,0x4 JZ 0x00160b15 MOV DIL,byte ptr [RAX + RSI*0x1] AND DIL,0xe0 ADD DIL,DL MOV byte ptr [RAX + RSI*0x1],DIL INC RSI ADD DL,0x8 JMP 0x00160af8 LAB_00160b15: INC RCX ADD RAX,0x4 JMP 0x00160aee LAB_00160b1e: MOV R14,RSP MOV RDI,RBX MOV RSI,R14 CALL 0x00153f10 MOV RDI,RBX MOV RSI,R14 CALL 0x001521a0 MOV RDI,RBX MOV RSI,R14 CALL 0x00155a90 ADD RSP,0x8 POP RBX POP R14 RET
/* OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateChildToParentMapping() */ void __thiscall OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateChildToParentMapping(Refinement *this) { ChildTag *pCVar1; ulong uVar2; ulong uVar3; long lVar4; ChildTag local_18 [8]; pCVar1 = local_18; for (uVar2 = 0; uVar2 != 2; uVar2 = uVar2 + 1) { uVar3 = uVar2 & 0xffffffff; for (lVar4 = 0; lVar4 != 4; lVar4 = lVar4 + 1) { pCVar1[lVar4] = (ChildTag)((*(byte *)(pCVar1 + lVar4) & 0xe0) + (char)uVar3); uVar3 = (ulong)(byte)((char)uVar3 + 8); } pCVar1 = pCVar1 + 4; } populateFaceParentVectors(this,local_18); populateEdgeParentVectors(this,local_18); populateVertexParentVectors(this,local_18); return; }
11,637
uf_prespace_selected
eloqsql/storage/maria/ma_packrec.c
static void uf_prespace_selected(MARIA_COLUMNDEF *rec, MARIA_BIT_BUFF *bit_buff, uchar *to, uchar *end) { uint spaces; if (get_bit(bit_buff)) { if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end) { bit_buff->error=1; return; } bfill(to, spaces, ' '); if (to+spaces != end) decode_bytes(rec,bit_buff,to+spaces,end); } else decode_bytes(rec,bit_buff,to,end); }
O0
c
uf_prespace_selected: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x10(%rbp), %rax cmpl $0x0, 0x4(%rax) je 0x4afea movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx addl $-0x1, %ecx movl %ecx, 0x4(%rdx) movl $0x1, %edx shll %cl, %edx movl %edx, %ecx andl %ecx, %eax cmpl $0x0, %eax jne 0x4b012 jmp 0x4b0ca movq -0x10(%rbp), %rdi callq 0x49f60 movq -0x10(%rbp), %rax movl $0x1f, 0x4(%rax) movq -0x10(%rbp), %rax movl (%rax), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax je 0x4b0ca movq -0x10(%rbp), %rax movl 0x4(%rax), %eax movq -0x8(%rbp), %rcx cmpl 0x24(%rcx), %eax jb 0x4b055 movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x8(%rbp), %rcx movl 0x24(%rcx), %esi movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx subl %esi, %ecx movl %ecx, 0x4(%rdx) shrl %cl, %eax movq -0x8(%rbp), %rcx movl 0x24(%rcx), %ecx movl %ecx, %edx leaq 0x27fe13(%rip), %rcx # 0x2cae60 andl (%rcx,%rdx,4), %eax movl %eax, -0x28(%rbp) jmp 0x4b068 movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rax movl 0x24(%rax), %esi callq 0x49710 movl %eax, -0x28(%rbp) movl -0x28(%rbp), %ecx movl %ecx, -0x24(%rbp) movq -0x18(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax cmpq -0x20(%rbp), %rax jbe 0x4b08a movq -0x10(%rbp), %rax movl $0x1, 0x28(%rax) jmp 0x4b0df movq -0x18(%rbp), %rdi movl -0x24(%rbp), %eax movl %eax, %edx movl $0x20, %esi callq 0x2a2a0 movq -0x18(%rbp), %rax movl -0x24(%rbp), %ecx addq %rcx, %rax cmpq -0x20(%rbp), %rax je 0x4b0c8 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movl -0x24(%rbp), %eax addq %rax, %rdx movq -0x20(%rbp), %rcx callq 0x4a2a0 jmp 0x4b0df movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx callq 0x4a2a0 addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
uf_prespace_selected: 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], rcx mov rax, [rbp+var_10] cmp dword ptr [rax+4], 0 jz short loc_4AFEA mov rax, [rbp+var_10] mov eax, [rax] mov rdx, [rbp+var_10] mov ecx, [rdx+4] add ecx, 0FFFFFFFFh mov [rdx+4], ecx mov edx, 1 shl edx, cl mov ecx, edx and eax, ecx cmp eax, 0 jnz short loc_4B012 jmp loc_4B0CA loc_4AFEA: mov rdi, [rbp+var_10] call fill_buffer mov rax, [rbp+var_10] mov dword ptr [rax+4], 1Fh mov rax, [rbp+var_10] mov eax, [rax] and eax, 80000000h cmp eax, 0 jz loc_4B0CA loc_4B012: mov rax, [rbp+var_10] mov eax, [rax+4] mov rcx, [rbp+var_8] cmp eax, [rcx+24h] jb short loc_4B055 mov rax, [rbp+var_10] mov eax, [rax] mov rcx, [rbp+var_8] mov esi, [rcx+24h] mov rdx, [rbp+var_10] mov ecx, [rdx+4] sub ecx, esi mov [rdx+4], ecx shr eax, cl mov rcx, [rbp+var_8] mov ecx, [rcx+24h] mov edx, ecx lea rcx, mask and eax, [rcx+rdx*4] mov [rbp+var_28], eax jmp short loc_4B068 loc_4B055: mov rdi, [rbp+var_10] mov rax, [rbp+var_8] mov esi, [rax+24h] call fill_and_get_bits mov [rbp+var_28], eax loc_4B068: mov ecx, [rbp+var_28] mov [rbp+var_24], ecx mov rax, [rbp+var_18] mov ecx, ecx add rax, rcx cmp rax, [rbp+var_20] jbe short loc_4B08A mov rax, [rbp+var_10] mov dword ptr [rax+28h], 1 jmp short loc_4B0DF loc_4B08A: mov rdi, [rbp+var_18] mov eax, [rbp+var_24] mov edx, eax mov esi, 20h ; ' ' call _memset mov rax, [rbp+var_18] mov ecx, [rbp+var_24] add rax, rcx cmp rax, [rbp+var_20] jz short loc_4B0C8 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov eax, [rbp+var_24] add rdx, rax mov rcx, [rbp+var_20] call decode_bytes loc_4B0C8: jmp short loc_4B0DF loc_4B0CA: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] call decode_bytes loc_4B0DF: add rsp, 30h pop rbp retn
long long uf_prespace_selected(long long a1, int *a2, _BYTE *a3, _BYTE *a4) { int v4; // eax int v5; // ecx unsigned int v6; // eax int v7; // ecx long long result; // rax unsigned int bits; // [rsp+8h] [rbp-28h] if ( a2[1] ) { v4 = *a2; v5 = a2[1] - 1; a2[1] = v5; if ( ((1 << v5) & v4) == 0 ) return decode_bytes(a1, (long long)a2, a3, a4); } else { fill_buffer((long long)a2); a2[1] = 31; if ( *a2 >= 0 ) return decode_bytes(a1, (long long)a2, a3, a4); } if ( (unsigned int)a2[1] < *(_DWORD *)(a1 + 36) ) { bits = fill_and_get_bits(a2, *(_DWORD *)(a1 + 36)); } else { v6 = *a2; v7 = a2[1] - *(_DWORD *)(a1 + 36); a2[1] = v7; bits = mask[*(unsigned int *)(a1 + 36)] & (v6 >> v7); } if ( &a3[bits] <= a4 ) { memset(a3, 32LL, bits); result = (long long)&a3[bits]; if ( (_BYTE *)result != a4 ) return decode_bytes(a1, (long long)a2, &a3[bits], a4); } else { result = (long long)a2; a2[10] = 1; } return result; }
uf_prespace_selected: 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],RCX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x4],0x0 JZ 0x0014afea MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] ADD ECX,-0x1 MOV dword ptr [RDX + 0x4],ECX MOV EDX,0x1 SHL EDX,CL MOV ECX,EDX AND EAX,ECX CMP EAX,0x0 JNZ 0x0014b012 JMP 0x0014b0ca LAB_0014afea: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00149f60 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4],0x1f MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] AND EAX,0x80000000 CMP EAX,0x0 JZ 0x0014b0ca LAB_0014b012: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x4] MOV RCX,qword ptr [RBP + -0x8] CMP EAX,dword ptr [RCX + 0x24] JC 0x0014b055 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RCX + 0x24] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] SUB ECX,ESI MOV dword ptr [RDX + 0x4],ECX SHR EAX,CL MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0x24] MOV EDX,ECX LEA RCX,[0x3cae60] AND EAX,dword ptr [RCX + RDX*0x4] MOV dword ptr [RBP + -0x28],EAX JMP 0x0014b068 LAB_0014b055: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RAX + 0x24] CALL 0x00149710 MOV dword ptr [RBP + -0x28],EAX LAB_0014b068: MOV ECX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x24],ECX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,ECX ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x20] JBE 0x0014b08a MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x28],0x1 JMP 0x0014b0df LAB_0014b08a: MOV RDI,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x24] MOV EDX,EAX MOV ESI,0x20 CALL 0x0012a2a0 MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x24] ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x20] JZ 0x0014b0c8 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x24] ADD RDX,RAX MOV RCX,qword ptr [RBP + -0x20] CALL 0x0014a2a0 LAB_0014b0c8: JMP 0x0014b0df LAB_0014b0ca: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] CALL 0x0014a2a0 LAB_0014b0df: ADD RSP,0x30 POP RBP RET
void uf_prespace_selected(long param_1,uint *param_2,void *param_3,ulong param_4) { uint uVar1; uint local_30; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar1 = *param_2 & 0x80000000; } else { uVar1 = param_2[1]; param_2[1] = uVar1 - 1; uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f); } if (uVar1 == 0) { decode_bytes(param_1,param_2,param_3,param_4); } else { if (param_2[1] < *(uint *)(param_1 + 0x24)) { local_30 = fill_and_get_bits(param_2,*(int4 *)(param_1 + 0x24)); } else { uVar1 = param_2[1] - *(int *)(param_1 + 0x24); param_2[1] = uVar1; local_30 = *param_2 >> ((byte)uVar1 & 0x1f) & *(uint *)(mask + (ulong)*(uint *)(param_1 + 0x24) * 4); } if (param_4 < (long)param_3 + (ulong)local_30) { param_2[10] = 1; } else { memset(param_3,0x20,(ulong)local_30); if ((long)param_3 + (ulong)local_30 != param_4) { decode_bytes(param_1,param_2,(long)param_3 + (ulong)local_30,param_4); } } } return; }
11,638
common_chat_format_name[abi:cxx11](common_chat_format)
monkey531[P]llama/common/chat.cpp
std::string common_chat_format_name(common_chat_format format) { switch (format) { case COMMON_CHAT_FORMAT_CONTENT_ONLY: return "Content-only"; case COMMON_CHAT_FORMAT_GENERIC: return "Generic"; case COMMON_CHAT_FORMAT_MISTRAL_NEMO: return "Mistral Nemo"; case COMMON_CHAT_FORMAT_LLAMA_3_X: return "Llama 3.x"; case COMMON_CHAT_FORMAT_LLAMA_3_X_WITH_BUILTIN_TOOLS: return "Llama 3.x with builtin tools"; case COMMON_CHAT_FORMAT_DEEPSEEK_R1: return "DeepSeek R1"; case COMMON_CHAT_FORMAT_FIREFUNCTION_V2: return "FireFunction v2"; case COMMON_CHAT_FORMAT_FUNCTIONARY_V3_2: return "Functionary v3.2"; case COMMON_CHAT_FORMAT_FUNCTIONARY_V3_1_LLAMA_3_1: return "Functionary v3.1 Llama 3.1"; case COMMON_CHAT_FORMAT_HERMES_2_PRO: return "Hermes 2 Pro"; case COMMON_CHAT_FORMAT_COMMAND_R7B: return "Command R7B"; default: throw std::runtime_error("Unknown chat format"); } }
O2
cpp
common_chat_format_name[abi:cxx11](common_chat_format): pushq %r14 pushq %rbx subq $0x18, %rsp cmpl $0xa, %esi ja 0x71137 movq %rdi, %rbx movl %esi, %eax leaq 0x23668(%rip), %rcx # 0x946e8 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x246a0(%rip), %rsi # 0x95730 leaq 0x17(%rsp), %rdx jmp 0x71124 leaq 0x246bb(%rip), %rsi # 0x9575c leaq 0x13(%rsp), %rdx jmp 0x71124 leaq 0x24712(%rip), %rsi # 0x957c1 leaq 0xe(%rsp), %rdx jmp 0x71124 leaq 0x24688(%rip), %rsi # 0x95745 leaq 0x15(%rsp), %rdx jmp 0x71124 leaq 0x24687(%rip), %rsi # 0x95752 leaq 0x14(%rsp), %rdx jmp 0x71124 leaq 0x246bc(%rip), %rsi # 0x95795 leaq 0x10(%rsp), %rdx jmp 0x71124 leaq 0x24656(%rip), %rsi # 0x9573d leaq 0x16(%rsp), %rdx jmp 0x71124 leaq 0x24684(%rip), %rsi # 0x95779 leaq 0x12(%rsp), %rdx jmp 0x71124 leaq 0x24682(%rip), %rsi # 0x95785 leaq 0x11(%rsp), %rdx jmp 0x71124 leaq 0x246bd(%rip), %rsi # 0x957ce leaq 0xd(%rsp), %rdx jmp 0x71124 leaq 0x24687(%rip), %rsi # 0x957a6 leaq 0xf(%rsp), %rdx movq %rbx, %rdi callq 0x22836 movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r14 retq pushq $0x10 popq %rdi callq 0x20380 movq %rax, %rbx leaq 0x24691(%rip), %rsi # 0x957da movq %rax, %rdi callq 0x20270 movq 0x5de98(%rip), %rsi # 0xceff0 movq 0x5de11(%rip), %rdx # 0xcef70 movq %rbx, %rdi callq 0x20b30 movq %rax, %r14 movq %rbx, %rdi callq 0x20510 movq %r14, %rdi callq 0x20ba0
_Z23common_chat_format_nameB5cxx1118common_chat_format: push r14 push rbx sub rsp, 18h cmp esi, 0Ah; switch 11 cases ja def_71087; jumptable 0000000000071087 default case mov rbx, rdi mov eax, esi lea rcx, jpt_71087 movsxd rax, ds:(jpt_71087 - 946E8h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_71089: lea rsi, aContentOnly; jumptable 0000000000071087 case 0 lea rdx, [rsp+28h+var_11] jmp loc_71124 loc_7109A: lea rsi, aLlama3XWithBui; jumptable 0000000000071087 case 4 lea rdx, [rsp+28h+var_15] jmp short loc_71124 loc_710A8: lea rsi, aHermes2Pro; jumptable 0000000000071087 case 9 lea rdx, [rsp+28h+var_1A] jmp short loc_71124 loc_710B6: lea rsi, aMistralNemo; jumptable 0000000000071087 case 2 lea rdx, [rsp+28h+var_13] jmp short loc_71124 loc_710C4: lea rsi, aLlama3X; jumptable 0000000000071087 case 3 lea rdx, [rsp+28h+var_14] jmp short loc_71124 loc_710D2: lea rsi, aFunctionaryV32; jumptable 0000000000071087 case 7 lea rdx, [rsp+28h+var_18] jmp short loc_71124 loc_710E0: lea rsi, aGeneric; jumptable 0000000000071087 case 1 lea rdx, [rsp+28h+var_12] jmp short loc_71124 loc_710EE: lea rsi, aDeepseekR1; jumptable 0000000000071087 case 5 lea rdx, [rsp+28h+var_16] jmp short loc_71124 loc_710FC: lea rsi, aFirefunctionV2; jumptable 0000000000071087 case 6 lea rdx, [rsp+28h+var_17] jmp short loc_71124 loc_7110A: lea rsi, aCommandR7b; jumptable 0000000000071087 case 10 lea rdx, [rsp+28h+var_1B] jmp short loc_71124 loc_71118: lea rsi, aFunctionaryV31; jumptable 0000000000071087 case 8 lea rdx, [rsp+28h+var_19] loc_71124: mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rax, rbx add rsp, 18h pop rbx pop r14 retn def_71087: push 10h; jumptable 0000000000071087 default case pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aUnknownChatFor; "Unknown chat format" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception mov rdi, r14 call __Unwind_Resume
_QWORD * common_chat_format_name[abi:cxx11](_QWORD *a1, int a2) { const char *v2; // rsi std::runtime_error *exception; // rbx switch ( a2 ) { case 0: v2 = "Content-only"; break; case 1: v2 = "Generic"; break; case 2: v2 = "Mistral Nemo"; break; case 3: v2 = "Llama 3.x"; break; case 4: v2 = "Llama 3.x with builtin tools"; break; case 5: v2 = "DeepSeek R1"; break; case 6: v2 = "FireFunction v2"; break; case 7: v2 = "Functionary v3.2"; break; case 8: v2 = "Functionary v3.1 Llama 3.1"; break; case 9: v2 = "Hermes 2 Pro"; break; case 10: v2 = "Command R7B"; break; default: exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Unknown chat format"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } std::string::basic_string<std::allocator<char>>(a1, (long long)v2); return a1; }
common_chat_format_name[abi:cxx11]: PUSH R14 PUSH RBX SUB RSP,0x18 CMP ESI,0xa JA 0x00171137 MOV RBX,RDI MOV EAX,ESI LEA RCX,[0x1946e8] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: LEA RSI,[0x195730] LEA RDX,[RSP + 0x17] JMP 0x00171124 caseD_4: LEA RSI,[0x19575c] LEA RDX,[RSP + 0x13] JMP 0x00171124 caseD_9: LEA RSI,[0x1957c1] LEA RDX,[RSP + 0xe] JMP 0x00171124 caseD_2: LEA RSI,[0x195745] LEA RDX,[RSP + 0x15] JMP 0x00171124 caseD_3: LEA RSI,[0x195752] LEA RDX,[RSP + 0x14] JMP 0x00171124 caseD_7: LEA RSI,[0x195795] LEA RDX,[RSP + 0x10] JMP 0x00171124 caseD_1: LEA RSI,[0x19573d] LEA RDX,[RSP + 0x16] JMP 0x00171124 caseD_5: LEA RSI,[0x195779] LEA RDX,[RSP + 0x12] JMP 0x00171124 caseD_6: LEA RSI,[0x195785] LEA RDX,[RSP + 0x11] JMP 0x00171124 caseD_a: LEA RSI,[0x1957ce] LEA RDX,[RSP + 0xd] JMP 0x00171124 caseD_8: LEA RSI,[0x1957a6] LEA RDX,[RSP + 0xf] LAB_00171124: MOV RDI,RBX CALL 0x00122836 MOV RAX,RBX ADD RSP,0x18 POP RBX POP R14 RET default: PUSH 0x10 POP RDI CALL 0x00120380 MOV RBX,RAX LAB_00171142: LEA RSI,[0x1957da] MOV RDI,RAX CALL 0x00120270 LAB_00171151: MOV RSI,qword ptr [0x001ceff0] MOV RDX,qword ptr [0x001cef70] MOV RDI,RBX CALL 0x00120b30
/* common_chat_format_name[abi:cxx11](common_chat_format) */ string * common_chat_format_name_abi_cxx11_(string *param_1,int4 param_2) { runtime_error *this; allocator *paVar1; char *pcVar2; allocator local_1b; allocator local_1a; allocator local_19; allocator local_18; allocator local_17; allocator local_16; allocator local_15; allocator local_14; allocator local_13; allocator local_12; allocator local_11; switch(param_2) { case 0: pcVar2 = "Content-only"; paVar1 = &local_11; break; case 1: pcVar2 = "Generic"; paVar1 = &local_12; break; case 2: pcVar2 = "Mistral Nemo"; paVar1 = &local_13; break; case 3: pcVar2 = "Llama 3.x"; paVar1 = &local_14; break; case 4: pcVar2 = "Llama 3.x with builtin tools"; paVar1 = &local_15; break; case 5: pcVar2 = "DeepSeek R1"; paVar1 = &local_16; break; case 6: pcVar2 = "FireFunction v2"; paVar1 = &local_17; break; case 7: pcVar2 = "Functionary v3.2"; paVar1 = &local_18; break; case 8: pcVar2 = "Functionary v3.1 Llama 3.1"; paVar1 = &local_19; break; case 9: pcVar2 = "Hermes 2 Pro"; paVar1 = &local_1a; break; case 10: pcVar2 = "Command R7B"; paVar1 = &local_1b; break; default: this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00171142 to 00171150 has its CatchHandler @ 00171167 */ std::runtime_error::runtime_error(this,"Unknown chat format"); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001ceff0,PTR__runtime_error_001cef70); } std::__cxx11::string::string<std::allocator<char>>(param_1,pcVar2,paVar1); return param_1; }
11,639
common_chat_format_name[abi:cxx11](common_chat_format)
monkey531[P]llama/common/chat.cpp
std::string common_chat_format_name(common_chat_format format) { switch (format) { case COMMON_CHAT_FORMAT_CONTENT_ONLY: return "Content-only"; case COMMON_CHAT_FORMAT_GENERIC: return "Generic"; case COMMON_CHAT_FORMAT_MISTRAL_NEMO: return "Mistral Nemo"; case COMMON_CHAT_FORMAT_LLAMA_3_X: return "Llama 3.x"; case COMMON_CHAT_FORMAT_LLAMA_3_X_WITH_BUILTIN_TOOLS: return "Llama 3.x with builtin tools"; case COMMON_CHAT_FORMAT_DEEPSEEK_R1: return "DeepSeek R1"; case COMMON_CHAT_FORMAT_FIREFUNCTION_V2: return "FireFunction v2"; case COMMON_CHAT_FORMAT_FUNCTIONARY_V3_2: return "Functionary v3.2"; case COMMON_CHAT_FORMAT_FUNCTIONARY_V3_1_LLAMA_3_1: return "Functionary v3.1 Llama 3.1"; case COMMON_CHAT_FORMAT_HERMES_2_PRO: return "Hermes 2 Pro"; case COMMON_CHAT_FORMAT_COMMAND_R7B: return "Command R7B"; default: throw std::runtime_error("Unknown chat format"); } }
O3
cpp
common_chat_format_name[abi:cxx11](common_chat_format): pushq %r14 pushq %rbx pushq %rax cmpl $0xa, %esi ja 0x7fd6f movq %rdi, %rbx movl %esi, %eax leaq 0x2facf(%rip), %rcx # 0xaf718 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x30af0(%rip), %rsi # 0xb0750 leaq 0x30af5(%rip), %rdx # 0xb075c jmp 0x7fd5c leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x30b02(%rip), %rsi # 0xb077c leaq 0x30b17(%rip), %rdx # 0xb0798 jmp 0x7fd5c leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x30b4d(%rip), %rsi # 0xb07e1 leaq 0x30b52(%rip), %rdx # 0xb07ed jmp 0x7fd5c leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x30ab7(%rip), %rsi # 0xb0765 leaq 0x30abc(%rip), %rdx # 0xb0771 jmp 0x7fd5c leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x30aaa(%rip), %rsi # 0xb0772 leaq 0x30aac(%rip), %rdx # 0xb077b jmp 0x7fd5c leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x30ad3(%rip), %rsi # 0xb07b5 leaq 0x30adc(%rip), %rdx # 0xb07c5 jmp 0x7fd5c leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x30a64(%rip), %rsi # 0xb075d leaq 0x30a64(%rip), %rdx # 0xb0764 jmp 0x7fd5c leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x30a89(%rip), %rsi # 0xb0799 leaq 0x30a8d(%rip), %rdx # 0xb07a4 jmp 0x7fd5c leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x30a7e(%rip), %rsi # 0xb07a5 leaq 0x30a86(%rip), %rdx # 0xb07b4 jmp 0x7fd5c leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x30ab0(%rip), %rsi # 0xb07ee leaq 0x30ab4(%rip), %rdx # 0xb07f9 jmp 0x7fd5c leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x30a71(%rip), %rsi # 0xb07c6 leaq 0x30a84(%rip), %rdx # 0xb07e0 movq %rbx, %rdi callq 0x1c7c8 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq movl $0x10, %edi callq 0x18350 movq %rax, %rbx leaq 0x30a77(%rip), %rsi # 0xb07fa movq %rax, %rdi callq 0x18260 movq 0x5c25e(%rip), %rsi # 0xdbff0 movq 0x5c1d7(%rip), %rdx # 0xdbf70 movq %rbx, %rdi callq 0x18b30 movq %rax, %r14 movq %rbx, %rdi callq 0x184f0 movq %r14, %rdi callq 0x18ba0
_Z23common_chat_format_nameB5cxx1118common_chat_format: push r14 push rbx push rax cmp esi, 0Ah; switch 11 cases ja def_7FC50; jumptable 000000000007FC50 default case mov rbx, rdi mov eax, esi lea rcx, jpt_7FC50 movsxd rax, ds:(jpt_7FC50 - 0AF718h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_7FC52: lea rax, [rbx+10h]; jumptable 000000000007FC50 case 0 mov [rbx], rax lea rsi, aContentOnly; "Content-only" lea rdx, aContentOnly+0Ch; "" jmp loc_7FD5C loc_7FC6C: lea rax, [rbx+10h]; jumptable 000000000007FC50 case 4 mov [rbx], rax lea rsi, aLlama3XWithBui; "Llama 3.x with builtin tools" lea rdx, aLlama3XWithBui+1Ch; "" jmp loc_7FD5C loc_7FC86: lea rax, [rbx+10h]; jumptable 000000000007FC50 case 9 mov [rbx], rax lea rsi, aHermes2Pro; "Hermes 2 Pro" lea rdx, aHermes2Pro+0Ch; "" jmp loc_7FD5C loc_7FCA0: lea rax, [rbx+10h]; jumptable 000000000007FC50 case 2 mov [rbx], rax lea rsi, aMistralNemo; "Mistral Nemo" lea rdx, aMistralNemo+0Ch; "" jmp loc_7FD5C loc_7FCBA: lea rax, [rbx+10h]; jumptable 000000000007FC50 case 3 mov [rbx], rax lea rsi, aLlama3X; "Llama 3.x" lea rdx, aLlama3X+9; "" jmp loc_7FD5C loc_7FCD4: lea rax, [rbx+10h]; jumptable 000000000007FC50 case 7 mov [rbx], rax lea rsi, aFunctionaryV32; "Functionary v3.2" lea rdx, aFunctionaryV32+10h; "" jmp short loc_7FD5C loc_7FCEB: lea rax, [rbx+10h]; jumptable 000000000007FC50 case 1 mov [rbx], rax lea rsi, aGeneric; "Generic" lea rdx, aGeneric+7; "" jmp short loc_7FD5C loc_7FD02: lea rax, [rbx+10h]; jumptable 000000000007FC50 case 5 mov [rbx], rax lea rsi, aDeepseekR1; "DeepSeek R1" lea rdx, aDeepseekR1+0Bh; "" jmp short loc_7FD5C loc_7FD19: lea rax, [rbx+10h]; jumptable 000000000007FC50 case 6 mov [rbx], rax lea rsi, aFirefunctionV2; "FireFunction v2" lea rdx, aFirefunctionV2+0Fh; "" jmp short loc_7FD5C loc_7FD30: lea rax, [rbx+10h]; jumptable 000000000007FC50 case 10 mov [rbx], rax lea rsi, aCommandR7b; "Command R7B" lea rdx, aCommandR7b+0Bh; "" jmp short loc_7FD5C loc_7FD47: lea rax, [rbx+10h]; jumptable 000000000007FC50 case 8 mov [rbx], rax lea rsi, aFunctionaryV31; "Functionary v3.1 Llama 3.1" lea rdx, aFunctionaryV31+1Ah; "" loc_7FD5C: mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rax, rbx add rsp, 8 pop rbx pop r14 retn def_7FC50: mov edi, 10h; jumptable 000000000007FC50 default case call ___cxa_allocate_exception mov rbx, rax lea rsi, aUnknownChatFor; "Unknown chat format" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception mov rdi, r14 call __Unwind_Resume
_QWORD * common_chat_format_name[abi:cxx11](_QWORD *a1, int a2) { char *v2; // rsi char *v3; // rdx std::runtime_error *exception; // rbx switch ( a2 ) { case 0: *a1 = a1 + 2; v2 = "Content-only"; v3 = ""; break; case 1: *a1 = a1 + 2; v2 = "Generic"; v3 = ""; break; case 2: *a1 = a1 + 2; v2 = "Mistral Nemo"; v3 = ""; break; case 3: *a1 = a1 + 2; v2 = "Llama 3.x"; v3 = ""; break; case 4: *a1 = a1 + 2; v2 = "Llama 3.x with builtin tools"; v3 = ""; break; case 5: *a1 = a1 + 2; v2 = "DeepSeek R1"; v3 = ""; break; case 6: *a1 = a1 + 2; v2 = "FireFunction v2"; v3 = ""; break; case 7: *a1 = a1 + 2; v2 = "Functionary v3.2"; v3 = ""; break; case 8: *a1 = a1 + 2; v2 = "Functionary v3.1 Llama 3.1"; v3 = ""; break; case 9: *a1 = a1 + 2; v2 = "Hermes 2 Pro"; v3 = ""; break; case 10: *a1 = a1 + 2; v2 = "Command R7B"; v3 = ""; break; default: exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Unknown chat format"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } std::string::_M_construct<char const*>((long long)a1, v2, (long long)v3); return a1; }
common_chat_format_name[abi:cxx11]: PUSH R14 PUSH RBX PUSH RAX CMP ESI,0xa JA 0x0017fd6f MOV RBX,RDI MOV EAX,ESI LEA RCX,[0x1af718] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1b0750] LEA RDX,[0x1b075c] JMP 0x0017fd5c caseD_4: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1b077c] LEA RDX,[0x1b0798] JMP 0x0017fd5c caseD_9: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1b07e1] LEA RDX,[0x1b07ed] JMP 0x0017fd5c caseD_2: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1b0765] LEA RDX,[0x1b0771] JMP 0x0017fd5c caseD_3: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1b0772] LEA RDX,[0x1b077b] JMP 0x0017fd5c caseD_7: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1b07b5] LEA RDX,[0x1b07c5] JMP 0x0017fd5c caseD_1: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1b075d] LEA RDX,[0x1b0764] JMP 0x0017fd5c caseD_5: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1b0799] LEA RDX,[0x1b07a4] JMP 0x0017fd5c caseD_6: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1b07a5] LEA RDX,[0x1b07b4] JMP 0x0017fd5c caseD_a: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1b07ee] LEA RDX,[0x1b07f9] JMP 0x0017fd5c caseD_8: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1b07c6] LEA RDX,[0x1b07e0] LAB_0017fd5c: MOV RDI,RBX CALL 0x0011c7c8 MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET default: MOV EDI,0x10 CALL 0x00118350 MOV RBX,RAX LAB_0017fd7c: LEA RSI,[0x1b07fa] MOV RDI,RAX CALL 0x00118260 LAB_0017fd8b: MOV RSI,qword ptr [0x001dbff0] MOV RDX,qword ptr [0x001dbf70] MOV RDI,RBX CALL 0x00118b30
/* common_chat_format_name[abi:cxx11](common_chat_format) */ long * common_chat_format_name_abi_cxx11_(long *param_1,int4 param_2) { runtime_error *this; char *pcVar1; char *pcVar2; switch(param_2) { case 0: *param_1 = (long)(param_1 + 2); pcVar2 = "Content-only"; pcVar1 = ""; break; case 1: *param_1 = (long)(param_1 + 2); pcVar2 = "Generic"; pcVar1 = ""; break; case 2: *param_1 = (long)(param_1 + 2); pcVar2 = "Mistral Nemo"; pcVar1 = ""; break; case 3: *param_1 = (long)(param_1 + 2); pcVar2 = "Llama 3.x"; pcVar1 = ""; break; case 4: *param_1 = (long)(param_1 + 2); pcVar2 = "Llama 3.x with builtin tools"; pcVar1 = ""; break; case 5: *param_1 = (long)(param_1 + 2); pcVar2 = "DeepSeek R1"; pcVar1 = ""; break; case 6: *param_1 = (long)(param_1 + 2); pcVar2 = "FireFunction v2"; pcVar1 = ""; break; case 7: *param_1 = (long)(param_1 + 2); pcVar2 = "Functionary v3.2"; pcVar1 = ""; break; case 8: *param_1 = (long)(param_1 + 2); pcVar2 = "Functionary v3.1 Llama 3.1"; pcVar1 = ""; break; case 9: *param_1 = (long)(param_1 + 2); pcVar2 = "Hermes 2 Pro"; pcVar1 = ""; break; case 10: *param_1 = (long)(param_1 + 2); pcVar2 = "Command R7B"; pcVar1 = ""; break; default: this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0017fd7c to 0017fd8a has its CatchHandler @ 0017fda1 */ std::runtime_error::runtime_error(this,"Unknown chat format"); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001dbff0,PTR__runtime_error_001dbf70); } std::__cxx11::string::_M_construct<char_const*>(param_1,pcVar2,pcVar1); return param_1; }
11,640
my_filename
eloqsql/mysys/my_div.c
char * my_filename(File fd) { DBUG_ENTER("my_filename"); if ((uint) fd >= (uint) my_file_limit || !my_file_info[fd].name) DBUG_RETURN((char*) "UNKNOWN"); if (fd >= 0 && my_file_info[fd].type != UNOPEN) { DBUG_RETURN(my_file_info[fd].name); } else DBUG_RETURN((char*) "UNOPENED"); /* Debug message */ }
O0
c
my_filename: pushq %rbp movq %rsp, %rbp movl %edi, -0xc(%rbp) movl -0xc(%rbp), %eax leaq 0x19af6f(%rip), %rcx # 0x1dd3c0 cmpl (%rcx), %eax jae 0x42470 leaq 0x19af6c(%rip), %rax # 0x1dd3c8 movq (%rax), %rax movslq -0xc(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax cmpq $0x0, (%rax) jne 0x4247f jmp 0x42472 leaq 0x465ae(%rip), %rax # 0x88a27 movq %rax, -0x8(%rbp) jmp 0x424cd cmpl $0x0, -0xc(%rbp) jl 0x424c0 leaq 0x19af3c(%rip), %rax # 0x1dd3c8 movq (%rax), %rax movslq -0xc(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax cmpl $0x0, 0x8(%rax) je 0x424c0 jmp 0x424a2 leaq 0x19af1f(%rip), %rax # 0x1dd3c8 movq (%rax), %rax movslq -0xc(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rax movq %rax, -0x8(%rbp) jmp 0x424cd jmp 0x424c2 leaq 0x46566(%rip), %rax # 0x88a2f movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
my_filename: push rbp mov rbp, rsp mov [rbp+var_C], edi mov eax, [rbp+var_C] lea rcx, my_file_limit cmp eax, [rcx] jnb short loc_42470 lea rax, my_file_info mov rax, [rax] movsxd rcx, [rbp+var_C] shl rcx, 4 add rax, rcx cmp qword ptr [rax], 0 jnz short loc_4247F loc_42470: jmp short $+2 loc_42472: lea rax, aUnknown_1; "UNKNOWN" mov [rbp+var_8], rax jmp short loc_424CD loc_4247F: cmp [rbp+var_C], 0 jl short loc_424C0 lea rax, my_file_info mov rax, [rax] movsxd rcx, [rbp+var_C] shl rcx, 4 add rax, rcx cmp dword ptr [rax+8], 0 jz short loc_424C0 jmp short $+2 loc_424A2: lea rax, my_file_info mov rax, [rax] movsxd rcx, [rbp+var_C] shl rcx, 4 add rax, rcx mov rax, [rax] mov [rbp+var_8], rax jmp short loc_424CD loc_424C0: jmp short $+2 loc_424C2: lea rax, aUnopened; "UNOPENED" mov [rbp+var_8], rax loc_424CD: mov rax, [rbp+var_8] pop rbp retn
const char * my_filename(int a1) { if ( (unsigned int)a1 >= my_file_limit || !*((_QWORD *)my_file_info + 2 * a1) ) return "UNKNOWN"; if ( a1 >= 0 && *((_DWORD *)my_file_info + 4 * a1 + 2) ) return (const char *)*((_QWORD *)my_file_info + 2 * a1); return "UNOPENED"; }
my_filename: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0xc],EDI MOV EAX,dword ptr [RBP + -0xc] LEA RCX,[0x2dd3c0] CMP EAX,dword ptr [RCX] JNC 0x00142470 LEA RAX,[0x2dd3c8] MOV RAX,qword ptr [RAX] MOVSXD RCX,dword ptr [RBP + -0xc] SHL RCX,0x4 ADD RAX,RCX CMP qword ptr [RAX],0x0 JNZ 0x0014247f LAB_00142470: JMP 0x00142472 LAB_00142472: LEA RAX,[0x188a27] MOV qword ptr [RBP + -0x8],RAX JMP 0x001424cd LAB_0014247f: CMP dword ptr [RBP + -0xc],0x0 JL 0x001424c0 LEA RAX,[0x2dd3c8] MOV RAX,qword ptr [RAX] MOVSXD RCX,dword ptr [RBP + -0xc] SHL RCX,0x4 ADD RAX,RCX CMP dword ptr [RAX + 0x8],0x0 JZ 0x001424c0 JMP 0x001424a2 LAB_001424a2: LEA RAX,[0x2dd3c8] MOV RAX,qword ptr [RAX] MOVSXD RCX,dword ptr [RBP + -0xc] SHL RCX,0x4 ADD RAX,RCX MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x8],RAX JMP 0x001424cd LAB_001424c0: JMP 0x001424c2 LAB_001424c2: LEA RAX,[0x188a2f] MOV qword ptr [RBP + -0x8],RAX LAB_001424cd: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
char * my_filename(uint param_1) { char *local_10; if ((param_1 < my_file_limit) && (*(long *)(my_file_info + (long)(int)param_1 * 0x10) != 0)) { if (((int)param_1 < 0) || (*(int *)(my_file_info + (long)(int)param_1 * 0x10 + 8) == 0)) { local_10 = "UNOPENED"; } else { local_10 = *(char **)(my_file_info + (long)(int)param_1 * 0x10); } } else { local_10 = "UNKNOWN"; } return local_10; }
11,641
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::push_back(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&)
monkey531[P]llama/common/json.hpp
void push_back(const typename object_t::value_type& val) { // push_back only works for null objects or objects if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_object()))) { JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this)); } // transform null object into an object if (is_null()) { m_data.m_type = value_t::object; m_data.m_value = value_t::object; assert_invariant(); } // add element to object auto res = m_data.m_value.object->insert(val); set_parent(res.first->second); }
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>::push_back(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %rbx movq %rdi, %r14 movzbl (%rdi), %eax testl %eax, %eax jne 0xb851c movb $0x1, (%r14) movl $0x20, %edi callq 0x1b890 xorps %xmm0, %xmm0 movups %xmm0, (%rax) movq $0x0, 0x10(%rax) movq %rax, 0x8(%r14) movq %r14, %rdi movl $0x1, %esi callq 0x58644 jmp 0xb8521 cmpl $0x1, %eax jne 0xb8535 movq 0x8(%r14), %rdi movq %rbx, %rsi addq $0x30, %rsp popq %rbx popq %r14 popq %rbp jmp 0xb8736 movl $0x20, %edi callq 0x1b440 movq %rax, %rbx movq %r14, %rdi callq 0x5eb8c leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x3a871(%rip), %rsi # 0xf2dca leaq 0x10(%rsp), %rdi callq 0x86669 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x134, %esi # imm = 0x134 movq %r14, %rcx callq 0x5e934 xorl %ebp, %ebp leaq 0x739b4(%rip), %rsi # 0x12bf38 leaq -0x5d7c9(%rip), %rdx # 0x5adc2 movq %rbx, %rdi callq 0x1bef0 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb85b1 movq 0x20(%rsp), %rsi incq %rsi callq 0x1b8b0 testb %bpl, %bpl jne 0xb85bb jmp 0xb85c3 movq %rax, %r14 movq %rbx, %rdi callq 0x1b650 movq %r14, %rdi callq 0x1bf70 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backERKSt4pairIKS9_SD_E: push rbp; char push r14; int push rbx; __int64 sub rsp, 30h mov rbx, rsi mov r14, rdi movzx eax, byte ptr [rdi] test eax, eax jnz short loc_B851C mov byte ptr [r14], 1 mov edi, 20h ; ' '; unsigned __int64 call __Znwm; operator new(ulong) xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 mov qword ptr [rax+10h], 0 mov [r14+8], rax mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) jmp short loc_B8521 loc_B851C: cmp eax, 1 jnz short loc_B8535 loc_B8521: mov rdi, [r14+8] mov rsi, rbx add rsp, 30h pop rbx pop r14 pop rbp jmp _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE6insertERKSI_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::insert(std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&) loc_B8535: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUsePushB; "cannot use push_back() with " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 134h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B85B1 mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B85B1: test bpl, bpl jnz short loc_B85BB jmp short loc_B85C3 mov r14, rax loc_B85BB: mov rdi, rbx; void * call ___cxa_free_exception loc_B85C3: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::push_back( long long a1, long long a2) { long long v2; // rax nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx const char *v5; // [rsp+8h] [rbp-40h] BYREF _QWORD v6[2]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 ) { if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); 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>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v6, (long long)"cannot use push_back() with ", &v5); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 308, v6); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } } else { *(_BYTE *)a1 = 1; v2 = operator new(0x20uLL); *(_OWORD *)v2 = 0LL; *(_QWORD *)(v2 + 16) = 0LL; *(_QWORD *)(a1 + 8) = v2; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); } return nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::insert( *(_QWORD *)(a1 + 8), a2); }
push_back: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RSI MOV R14,RDI MOVZX EAX,byte ptr [RDI] TEST EAX,EAX JNZ 0x001b851c MOV byte ptr [R14],0x1 MOV EDI,0x20 CALL 0x0011b890 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],0x0 MOV qword ptr [R14 + 0x8],RAX MOV RDI,R14 MOV ESI,0x1 CALL 0x00158644 JMP 0x001b8521 LAB_001b851c: CMP EAX,0x1 JNZ 0x001b8535 LAB_001b8521: MOV RDI,qword ptr [R14 + 0x8] MOV RSI,RBX ADD RSP,0x30 POP RBX POP R14 POP RBP JMP 0x001b8736 LAB_001b8535: MOV EDI,0x20 CALL 0x0011b440 MOV RBX,RAX MOV RDI,R14 CALL 0x0015eb8c LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_001b8552: LEA RSI,[0x1f2dca] LEA RDI,[RSP + 0x10] CALL 0x00186669 MOV BPL,0x1 LAB_001b8566: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x134 MOV RCX,R14 CALL 0x0015e934 XOR EBP,EBP LEA RSI,[0x22bf38] LEA RDX,[0x15adc2] MOV RDI,RBX CALL 0x0011bef0
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::push_back(std::pair<std::__cxx11::string const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > const&) */ void __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::push_back(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,pair *param_1) { int8 *puVar1; int8 uVar2; char *local_40; detail local_38 [32]; if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0) { *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1; puVar1 = (int8 *)operator_new(0x20); *puVar1 = 0; puVar1[1] = 0; puVar1[2] = 0; *(int8 **)(this + 8) = puVar1; assert_invariant(SUB81(this,0)); } else if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar2 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 001b8552 to 001b8562 has its CatchHandler @ 001b85b8 */ detail::concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_38,"cannot use push_back() with ",&local_40); /* try { // try from 001b8566 to 001b8592 has its CatchHandler @ 001b8593 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x134,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception); } ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::insert(*(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> **)(this + 8),param_1); return; }
11,642
LefDefParser::lefiMacro::bumpProps()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiMacro.cpp
void lefiMacro::bumpProps() { int lim; int news; char **newpn; char **newpv; double *newd; char *newt; int i; if (propertiesAllocated_ <= 0) lim = 2; // starts with 4 else lim = propertiesAllocated_; news = lim + lim; newpn = (char**) lefMalloc(sizeof(char*) * news); newpv = (char**) lefMalloc(sizeof(char*) * news); newd = (double*) lefMalloc(sizeof(double) * news); newt = (char*) lefMalloc(sizeof(char) * news); propertiesAllocated_ = news; for (i = 0; i < lim; i++) { newpn[i] = propNames_[i]; newpv[i] = propValues_[i]; newd[i] = propNums_[i]; newt[i] = propTypes_[i]; } lefFree((char*) (propNames_)); lefFree((char*) (propValues_)); lefFree((char*) (propNums_)); lefFree((char*) (propTypes_)); propNames_ = newpn; propValues_ = newpv; propNums_ = newd; propTypes_ = newt; }
O0
cpp
LefDefParser::lefiMacro::bumpProps(): subq $0x48, %rsp movq %rdi, 0x40(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x8(%rsp) cmpl $0x0, 0x128(%rax) jg 0x46526 movl $0x2, 0x3c(%rsp) jmp 0x46535 movq 0x8(%rsp), %rax movl 0x128(%rax), %eax movl %eax, 0x3c(%rsp) movl 0x3c(%rsp), %eax addl 0x3c(%rsp), %eax movl %eax, 0x38(%rsp) movslq 0x38(%rsp), %rdi shlq $0x3, %rdi callq 0x359d0 movq %rax, 0x30(%rsp) movslq 0x38(%rsp), %rdi shlq $0x3, %rdi callq 0x359d0 movq %rax, 0x28(%rsp) movslq 0x38(%rsp), %rdi shlq $0x3, %rdi callq 0x359d0 movq %rax, 0x20(%rsp) movslq 0x38(%rsp), %rdi shlq $0x0, %rdi callq 0x359d0 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x18(%rsp) movl 0x38(%rsp), %ecx movl %ecx, 0x128(%rax) movl $0x0, 0x14(%rsp) movl 0x14(%rsp), %eax cmpl 0x3c(%rsp), %eax jge 0x46642 movq 0x8(%rsp), %rax movq 0x130(%rax), %rcx movslq 0x14(%rsp), %rdx movq (%rcx,%rdx,8), %rsi movq 0x30(%rsp), %rcx movslq 0x14(%rsp), %rdx movq %rsi, (%rcx,%rdx,8) movq 0x138(%rax), %rcx movslq 0x14(%rsp), %rdx movq (%rcx,%rdx,8), %rsi movq 0x28(%rsp), %rcx movslq 0x14(%rsp), %rdx movq %rsi, (%rcx,%rdx,8) movq 0x140(%rax), %rcx movslq 0x14(%rsp), %rdx movsd (%rcx,%rdx,8), %xmm0 movq 0x20(%rsp), %rcx movslq 0x14(%rsp), %rdx movsd %xmm0, (%rcx,%rdx,8) movq 0x148(%rax), %rax movslq 0x14(%rsp), %rcx movb (%rax,%rcx), %dl movq 0x18(%rsp), %rax movslq 0x14(%rsp), %rcx movb %dl, (%rax,%rcx) movl 0x14(%rsp), %eax addl $0x1, %eax movl %eax, 0x14(%rsp) jmp 0x465a7 movq 0x8(%rsp), %rax movq 0x130(%rax), %rdi callq 0x38c90 movq 0x8(%rsp), %rax movq 0x138(%rax), %rdi callq 0x38c90 movq 0x8(%rsp), %rax movq 0x140(%rax), %rdi callq 0x38c90 movq 0x8(%rsp), %rax movq 0x148(%rax), %rdi callq 0x38c90 movq 0x8(%rsp), %rax movq 0x30(%rsp), %rcx movq %rcx, 0x130(%rax) movq 0x28(%rsp), %rcx movq %rcx, 0x138(%rax) movq 0x20(%rsp), %rcx movq %rcx, 0x140(%rax) movq 0x18(%rsp), %rcx movq %rcx, 0x148(%rax) addq $0x48, %rsp retq
_ZN12LefDefParser9lefiMacro9bumpPropsEv: sub rsp, 48h mov [rsp+48h+var_8], rdi mov rax, [rsp+48h+var_8] mov [rsp+48h+var_40], rax cmp dword ptr [rax+128h], 0 jg short loc_46526 mov [rsp+48h+var_C], 2 jmp short loc_46535 loc_46526: mov rax, [rsp+48h+var_40] mov eax, [rax+128h] mov [rsp+48h+var_C], eax loc_46535: mov eax, [rsp+48h+var_C] add eax, [rsp+48h+var_C] mov [rsp+48h+var_10], eax movsxd rdi, [rsp+48h+var_10] shl rdi, 3; this call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong) mov [rsp+48h+var_18], rax movsxd rdi, [rsp+48h+var_10] shl rdi, 3; this call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong) mov [rsp+48h+var_20], rax movsxd rdi, [rsp+48h+var_10] shl rdi, 3; this call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong) mov [rsp+48h+var_28], rax movsxd rdi, [rsp+48h+var_10] shl rdi, 0; this call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong) mov rcx, rax mov rax, [rsp+48h+var_40] mov [rsp+48h+var_30], rcx mov ecx, [rsp+48h+var_10] mov [rax+128h], ecx mov [rsp+48h+var_34], 0 loc_465A7: mov eax, [rsp+48h+var_34] cmp eax, [rsp+48h+var_C] jge loc_46642 mov rax, [rsp+48h+var_40] mov rcx, [rax+130h] movsxd rdx, [rsp+48h+var_34] mov rsi, [rcx+rdx*8] mov rcx, [rsp+48h+var_18] movsxd rdx, [rsp+48h+var_34] mov [rcx+rdx*8], rsi mov rcx, [rax+138h] movsxd rdx, [rsp+48h+var_34] mov rsi, [rcx+rdx*8]; void * mov rcx, [rsp+48h+var_20] movsxd rdx, [rsp+48h+var_34] mov [rcx+rdx*8], rsi mov rcx, [rax+140h] movsxd rdx, [rsp+48h+var_34] movsd xmm0, qword ptr [rcx+rdx*8] mov rcx, [rsp+48h+var_28] movsxd rdx, [rsp+48h+var_34] movsd qword ptr [rcx+rdx*8], xmm0 mov rax, [rax+148h] movsxd rcx, [rsp+48h+var_34] mov dl, [rax+rcx] mov rax, [rsp+48h+var_30] movsxd rcx, [rsp+48h+var_34] mov [rax+rcx], dl mov eax, [rsp+48h+var_34] add eax, 1 mov [rsp+48h+var_34], eax jmp loc_465A7 loc_46642: mov rax, [rsp+48h+var_40] mov rdi, [rax+130h]; this call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *) mov rax, [rsp+48h+var_40] mov rdi, [rax+138h]; this call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *) mov rax, [rsp+48h+var_40] mov rdi, [rax+140h]; this call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *) mov rax, [rsp+48h+var_40] mov rdi, [rax+148h]; this call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *) mov rax, [rsp+48h+var_40] mov rcx, [rsp+48h+var_18] mov [rax+130h], rcx mov rcx, [rsp+48h+var_20] mov [rax+138h], rcx mov rcx, [rsp+48h+var_28] mov [rax+140h], rcx mov rcx, [rsp+48h+var_30] mov [rax+148h], rcx add rsp, 48h retn
LefDefParser::lefiMacro * LefDefParser::lefiMacro::bumpProps(LefDefParser::lefiMacro *this, void *a2) { long long v2; // rcx LefDefParser::lefiMacro *result; // rax int i; // [rsp+14h] [rbp-34h] long long v5; // [rsp+18h] [rbp-30h] long long v6; // [rsp+20h] [rbp-28h] long long v7; // [rsp+28h] [rbp-20h] long long v8; // [rsp+30h] [rbp-18h] int v9; // [rsp+3Ch] [rbp-Ch] if ( *((int *)this + 74) > 0 ) v9 = *((_DWORD *)this + 74); else v9 = 2; v8 = LefDefParser::lefMalloc((LefDefParser *)(16LL * v9)); v7 = LefDefParser::lefMalloc((LefDefParser *)(16LL * v9)); v6 = LefDefParser::lefMalloc((LefDefParser *)(16LL * v9)); v2 = LefDefParser::lefMalloc((LefDefParser *)(2 * v9)); v5 = v2; *((_DWORD *)this + 74) = 2 * v9; for ( i = 0; i < v9; ++i ) { *(_QWORD *)(v8 + 8LL * i) = *(_QWORD *)(*((_QWORD *)this + 38) + 8LL * i); a2 = *(void **)(*((_QWORD *)this + 39) + 8LL * i); *(_QWORD *)(v7 + 8LL * i) = a2; *(_QWORD *)(v6 + 8LL * i) = *(_QWORD *)(*((_QWORD *)this + 40) + 8LL * i); *(_BYTE *)(v2 + i) = *(_BYTE *)(*((_QWORD *)this + 41) + i); } LefDefParser::lefFree(*((LefDefParser **)this + 38), a2); LefDefParser::lefFree(*((LefDefParser **)this + 39), a2); LefDefParser::lefFree(*((LefDefParser **)this + 40), a2); LefDefParser::lefFree(*((LefDefParser **)this + 41), a2); result = this; *((_QWORD *)this + 38) = v8; *((_QWORD *)this + 39) = v7; *((_QWORD *)this + 40) = v6; *((_QWORD *)this + 41) = v5; return result; }
bumpProps: SUB RSP,0x48 MOV qword ptr [RSP + 0x40],RDI MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x8],RAX CMP dword ptr [RAX + 0x128],0x0 JG 0x00146526 MOV dword ptr [RSP + 0x3c],0x2 JMP 0x00146535 LAB_00146526: MOV RAX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RAX + 0x128] MOV dword ptr [RSP + 0x3c],EAX LAB_00146535: MOV EAX,dword ptr [RSP + 0x3c] ADD EAX,dword ptr [RSP + 0x3c] MOV dword ptr [RSP + 0x38],EAX MOVSXD RDI,dword ptr [RSP + 0x38] SHL RDI,0x3 CALL 0x001359d0 MOV qword ptr [RSP + 0x30],RAX MOVSXD RDI,dword ptr [RSP + 0x38] SHL RDI,0x3 CALL 0x001359d0 MOV qword ptr [RSP + 0x28],RAX MOVSXD RDI,dword ptr [RSP + 0x38] SHL RDI,0x3 CALL 0x001359d0 MOV qword ptr [RSP + 0x20],RAX MOVSXD RDI,dword ptr [RSP + 0x38] SHL RDI,0x0 CALL 0x001359d0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x18],RCX MOV ECX,dword ptr [RSP + 0x38] MOV dword ptr [RAX + 0x128],ECX MOV dword ptr [RSP + 0x14],0x0 LAB_001465a7: MOV EAX,dword ptr [RSP + 0x14] CMP EAX,dword ptr [RSP + 0x3c] JGE 0x00146642 MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RAX + 0x130] MOVSXD RDX,dword ptr [RSP + 0x14] MOV RSI,qword ptr [RCX + RDX*0x8] MOV RCX,qword ptr [RSP + 0x30] MOVSXD RDX,dword ptr [RSP + 0x14] MOV qword ptr [RCX + RDX*0x8],RSI MOV RCX,qword ptr [RAX + 0x138] MOVSXD RDX,dword ptr [RSP + 0x14] MOV RSI,qword ptr [RCX + RDX*0x8] MOV RCX,qword ptr [RSP + 0x28] MOVSXD RDX,dword ptr [RSP + 0x14] MOV qword ptr [RCX + RDX*0x8],RSI MOV RCX,qword ptr [RAX + 0x140] MOVSXD RDX,dword ptr [RSP + 0x14] MOVSD XMM0,qword ptr [RCX + RDX*0x8] MOV RCX,qword ptr [RSP + 0x20] MOVSXD RDX,dword ptr [RSP + 0x14] MOVSD qword ptr [RCX + RDX*0x8],XMM0 MOV RAX,qword ptr [RAX + 0x148] MOVSXD RCX,dword ptr [RSP + 0x14] MOV DL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RSP + 0x18] MOVSXD RCX,dword ptr [RSP + 0x14] MOV byte ptr [RAX + RCX*0x1],DL MOV EAX,dword ptr [RSP + 0x14] ADD EAX,0x1 MOV dword ptr [RSP + 0x14],EAX JMP 0x001465a7 LAB_00146642: MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x130] CALL 0x00138c90 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x138] CALL 0x00138c90 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x140] CALL 0x00138c90 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x148] CALL 0x00138c90 MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x130],RCX MOV RCX,qword ptr [RSP + 0x28] MOV qword ptr [RAX + 0x138],RCX MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x140],RCX MOV RCX,qword ptr [RSP + 0x18] MOV qword ptr [RAX + 0x148],RCX ADD RSP,0x48 RET
/* LefDefParser::lefiMacro::bumpProps() */ void __thiscall LefDefParser::lefiMacro::bumpProps(lefiMacro *this) { int iVar1; long lVar2; long lVar3; long lVar4; long lVar5; int local_34; int local_c; if (*(int *)(this + 0x128) < 1) { local_c = 2; } else { local_c = *(int *)(this + 0x128); } iVar1 = local_c * 2; lVar2 = lefMalloc((long)iVar1 << 3); lVar3 = lefMalloc((long)iVar1 << 3); lVar4 = lefMalloc((long)iVar1 << 3); lVar5 = lefMalloc((long)iVar1); *(int *)(this + 0x128) = iVar1; for (local_34 = 0; local_34 < local_c; local_34 = local_34 + 1) { *(int8 *)(lVar2 + (long)local_34 * 8) = *(int8 *)(*(long *)(this + 0x130) + (long)local_34 * 8); *(int8 *)(lVar3 + (long)local_34 * 8) = *(int8 *)(*(long *)(this + 0x138) + (long)local_34 * 8); *(int8 *)(lVar4 + (long)local_34 * 8) = *(int8 *)(*(long *)(this + 0x140) + (long)local_34 * 8); *(int1 *)(lVar5 + local_34) = *(int1 *)(*(long *)(this + 0x148) + (long)local_34); } lefFree(*(void **)(this + 0x130)); lefFree(*(void **)(this + 0x138)); lefFree(*(void **)(this + 0x140)); lefFree(*(void **)(this + 0x148)); *(long *)(this + 0x130) = lVar2; *(long *)(this + 0x138) = lVar3; *(long *)(this + 0x140) = lVar4; *(long *)(this + 0x148) = lVar5; return; }
11,643
ggml_aligned_free
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
void ggml_aligned_free(void * ptr, size_t size) { GGML_UNUSED(size); #if defined(_MSC_VER) || defined(__MINGW32__) _aligned_free(ptr); #elif GGML_USE_CPU_HBM if (ptr != NULL) { hbw_free(ptr); } #elif TARGET_OS_OSX if (ptr != NULL) { vm_deallocate((vm_map_t)mach_task_self(), (vm_address_t)ptr, size); } #else free(ptr); #endif }
O2
c
ggml_aligned_free: jmp 0x1ed30
ggml_aligned_free: jmp _free
// attributes: thunk long long ggml_aligned_free(long long a1, long long a2) { return free(a1, a2); }
ggml_aligned_free: JMP 0x0011ed30
void ggml_aligned_free(void) { (*(code *)PTR_free_00173e98)(); return; }
11,644
ggml_aligned_free
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
void ggml_aligned_free(void * ptr, size_t size) { GGML_UNUSED(size); #if defined(_MSC_VER) || defined(__MINGW32__) _aligned_free(ptr); #elif GGML_USE_CPU_HBM if (ptr != NULL) { hbw_free(ptr); } #elif TARGET_OS_OSX if (ptr != NULL) { vm_deallocate((vm_map_t)mach_task_self(), (vm_address_t)ptr, size); } #else free(ptr); #endif }
O3
c
ggml_aligned_free: jmp 0x17420
ggml_aligned_free: jmp _free
// attributes: thunk long long ggml_aligned_free(long long a1) { return free(a1); }
ggml_aligned_free: JMP 0x00117420
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ void ggml_aligned_free(void *__ptr) { (*(code *)PTR_free_0016ea10)(); return; }
11,645
process_str_arg
eloqsql/strings/my_vsnprintf.c
static char *process_str_arg(CHARSET_INFO *cs, char *to, const char *end, longlong length_arg, size_t width, char *par, uint print_type, my_bool nice_cut) { int well_formed_error; uint dots= 0; size_t plen, left_len= (size_t) (end - to) + 1, slen=0; my_bool left_fill= 1; size_t length; /* The sign of the length argument specific the string should be right or left adjusted */ if (length_arg < 0) { length= (size_t) -length_arg; left_fill= 0; } else length= (size_t) length_arg; if (!par) par = (char*) "(null)"; if (nice_cut) { plen= slen= strnlen(par, width + 1); if (plen > width) plen= width; if (left_len <= plen) { plen = left_len - 1; length= plen; } if ((slen > plen)) { if (plen < 3) { dots= (uint) plen; plen= 0; } else { dots= 3; plen-= 3; } } } else { plen= slen= strnlen(par, width); dots= 0; if (left_len <= plen) { plen = left_len - 1; length= plen; } } plen= my_well_formed_length(cs, par, par + plen, width, &well_formed_error); if (print_type & ESCAPED_ARG) { const char *org_to= to; to= backtick_string(cs, to, end, par, plen + dots, '`', MY_TEST(dots)); plen= (size_t) (to - org_to); dots= 0; } else { if (left_fill) { if (plen + dots < length) to= strfill(to, length - plen - dots, ' '); } to= strnmov(to,par,plen); if (dots) to= strfill(to, dots, '.'); } if (!left_fill && plen + dots < length) to= strfill(to, length - plen - dots, ' '); return to; }
O3
c
process_str_arg: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %r8, %r15 movq %rdi, -0x58(%rbp) movq %rdx, -0x50(%rbp) movq %rdx, %r14 movq %rsi, -0x38(%rbp) subq %rsi, %r14 leaq 0x1(%r14), %rbx movq %rcx, %r13 negq %r13 movq %rcx, -0x40(%rbp) cmovsq %rcx, %r13 testq %r9, %r9 leaq 0x8612(%rip), %r12 # 0xdee08 cmovneq %r9, %r12 cmpb $0x0, 0x18(%rbp) je 0xd683e leaq 0x1(%r15), %rsi movq %r12, %rdi callq 0x29500 cmpq %r15, %rax movq %r15, %rdx cmovbq %rax, %rdx cmpq %rdx, %rbx cmovbeq %r14, %rdx cmovbeq %r14, %r13 movl $0x0, -0x2c(%rbp) cmpq %rdx, %rax movq %r13, -0x48(%rbp) jbe 0xd686f cmpq $0x2, %rdx ja 0xd6864 movl %edx, -0x2c(%rbp) xorl %edx, %edx jmp 0xd686f movq %r12, %rdi movq %r15, %rsi callq 0x29500 movq %rax, %rdx cmpq %rax, %rbx cmovbeq %r14, %rdx cmovbeq %r14, %r13 movq %r13, -0x48(%rbp) movl $0x0, -0x2c(%rbp) jmp 0xd686f addq $-0x3, %rdx movl $0x3, -0x2c(%rbp) addq %r12, %rdx movq -0x58(%rbp), %rdi movq 0xb8(%rdi), %rax leaq -0x70(%rbp), %rbx movq %r12, %rsi movq %r15, %rcx movq %rbx, %r8 callq *0xc8(%rax) movq (%rbx), %r13 subq %r12, %r13 movl 0x10(%rbp), %eax testb $0x8, %al jne 0xd68d7 movq -0x40(%rbp), %rbx testq %rbx, %rbx js 0xd69aa movl -0x2c(%rbp), %r14d movl %r14d, %eax addq %r13, %rax movq -0x48(%rbp), %rsi subq %rax, %rsi jbe 0xd69b4 movq -0x38(%rbp), %rdi movl $0x20, %edx callq 0xd70dc movq %rax, %rdi jmp 0xd69b8 movl -0x2c(%rbp), %eax addq %rax, %r13 xorps %xmm0, %xmm0 movaps %xmm0, -0x70(%rbp) movq $0x0, -0x60(%rbp) cmpq %r13, %r14 jbe 0xd6a34 movq -0x38(%rbp), %rax leaq 0x1(%rax), %r15 movb $0x60, (%rax) testq %r13, %r13 jle 0xd69e3 addq %r12, %r13 xorl %r14d, %r14d cmpl $0x0, -0x2c(%rbp) je 0xd693a movl %r14d, %eax movq %r15, -0x70(%rbp,%rax,8) movl %r14d, %eax incl %eax movl $0xaaaaaaab, %ecx # imm = 0xAAAAAAAB imulq %rcx, %rax shrq $0x21, %rax leal (%rax,%rax,2), %eax negl %eax addl %eax, %r14d incl %r14d movb (%r12), %bl movq -0x58(%rbp), %rdi movq 0xb8(%rdi), %rax movq %r12, %rsi movq %r13, %rdx callq *0xc0(%rax) cmpl $0x2, %eax movl $0x1, %ecx cmovll %ecx, %eax jge 0xd697b cmpb $0x60, %bl jne 0xd697b leaq 0x1(%r15), %rdi cmpq -0x50(%rbp), %rdi jae 0xd6a34 movb $0x60, (%r15) jmp 0xd697e movq %r15, %rdi movl %eax, %ebx leaq (%rdi,%rbx), %rax cmpq -0x50(%rbp), %rax jae 0xd6a34 movq %r12, %rsi movq %rbx, %rdx callq 0xd713c movq %rax, %r15 addq %rbx, %r12 cmpq %r13, %r12 jb 0xd690f jmp 0xd69e6 movq -0x38(%rbp), %rdi movl -0x2c(%rbp), %r14d jmp 0xd69b8 movq -0x38(%rbp), %rdi movq %r12, %rsi movq %r13, %rdx callq 0xd713c movq %rax, %r15 testl %r14d, %r14d je 0xd6a48 movl %r14d, %r14d movq %r15, %rdi movq %r14, %rsi movl $0x2e, %edx callq 0xd70dc movq %rax, %r15 jmp 0xd6a4b xorl %r14d, %r14d leaq 0x1(%r15), %rax cmpq -0x50(%rbp), %rax jae 0xd6a34 cmpl $0x0, -0x2c(%rbp) je 0xd6a96 subl $0x1, %r14d movl $0x2, %eax cmovbl %eax, %r14d movq -0x70(%rbp,%r14,8), %rdx testq %rdx, %rdx je 0xd6a34 movl $0x1, %ecx subl $0x1, %r14d cmovbl %eax, %r14d movq -0x70(%rbp,%r14,8), %r15 testq %r15, %r15 je 0xd6a7e incl %ecx movq %r15, %rdx cmpl $0x3, %ecx jne 0xd6a16 jmp 0xd6a81 movq -0x38(%rbp), %rax movb $0x0, (%rax) movq %rax, %r15 movq -0x40(%rbp), %rbx movq %r15, %r13 subq %rax, %r13 xorl %r14d, %r14d testq %rbx, %rbx jns 0xd6a6c addq %r14, %r13 movq -0x48(%rbp), %rsi subq %r13, %rsi jbe 0xd6a6c movq %r15, %rdi movl $0x20, %edx callq 0xd70dc movq %rax, %r15 movq %r15, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rdx, %r15 movl %ecx, %ebx movq %r15, %rdi movl $0x2e, %esi movq %rbx, %rdx callq 0x292a0 addq %rbx, %r15 movb $0x60, (%r15) incq %r15 movq -0x40(%rbp), %rbx movq -0x38(%rbp), %rax jmp 0xd6a42
process_str_arg: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r15, r8 mov [rbp+var_58], rdi mov [rbp+var_50], rdx mov r14, rdx mov [rbp+var_38], rsi sub r14, rsi lea rbx, [r14+1] mov r13, rcx neg r13 mov [rbp+var_40], rcx cmovs r13, rcx test r9, r9 lea r12, aNull; "(null)" cmovnz r12, r9 cmp [rbp+arg_8], 0 jz short loc_D683E lea rsi, [r15+1] mov rdi, r12 call _strnlen cmp rax, r15 mov rdx, r15 cmovb rdx, rax cmp rbx, rdx cmovbe rdx, r14 cmovbe r13, r14 mov [rbp+var_2C], 0 cmp rax, rdx mov [rbp+var_48], r13 jbe short loc_D686F cmp rdx, 2 ja short loc_D6864 mov [rbp+var_2C], edx xor edx, edx jmp short loc_D686F loc_D683E: mov rdi, r12 mov rsi, r15 call _strnlen mov rdx, rax cmp rbx, rax cmovbe rdx, r14 cmovbe r13, r14 mov [rbp+var_48], r13 mov [rbp+var_2C], 0 jmp short loc_D686F loc_D6864: add rdx, 0FFFFFFFFFFFFFFFDh mov [rbp+var_2C], 3 loc_D686F: add rdx, r12 mov rdi, [rbp+var_58] mov rax, [rdi+0B8h] lea rbx, [rbp+var_70] mov rsi, r12 mov rcx, r15 mov r8, rbx call qword ptr [rax+0C8h] mov r13, [rbx] sub r13, r12 mov eax, [rbp+arg_0] test al, 8 jnz short loc_D68D7 mov rbx, [rbp+var_40] test rbx, rbx js loc_D69AA mov r14d, [rbp+var_2C] mov eax, r14d add rax, r13 mov rsi, [rbp+var_48] sub rsi, rax jbe loc_D69B4 mov rdi, [rbp+var_38] mov edx, 20h ; ' ' call strfill mov rdi, rax jmp loc_D69B8 loc_D68D7: mov eax, [rbp+var_2C] add r13, rax xorps xmm0, xmm0 movaps [rbp+var_70], xmm0 mov [rbp+var_60], 0 cmp r14, r13 jbe loc_D6A34 mov rax, [rbp+var_38] lea r15, [rax+1] mov byte ptr [rax], 60h ; '`' test r13, r13 jle loc_D69E3 add r13, r12 xor r14d, r14d loc_D690F: cmp [rbp+var_2C], 0 jz short loc_D693A mov eax, r14d mov qword ptr [rbp+rax*8+var_70], r15 mov eax, r14d inc eax mov ecx, 0AAAAAAABh imul rax, rcx shr rax, 21h lea eax, [rax+rax*2] neg eax add r14d, eax inc r14d loc_D693A: mov bl, [r12] mov rdi, [rbp+var_58] mov rax, [rdi+0B8h] mov rsi, r12 mov rdx, r13 call qword ptr [rax+0C0h] cmp eax, 2 mov ecx, 1 cmovl eax, ecx jge short loc_D697B cmp bl, 60h ; '`' jnz short loc_D697B lea rdi, [r15+1] cmp rdi, [rbp+var_50] jnb loc_D6A34 mov byte ptr [r15], 60h ; '`' jmp short loc_D697E loc_D697B: mov rdi, r15 loc_D697E: mov ebx, eax lea rax, [rdi+rbx] cmp rax, [rbp+var_50] jnb loc_D6A34 mov rsi, r12 mov rdx, rbx call strnmov mov r15, rax add r12, rbx cmp r12, r13 jb loc_D690F jmp short loc_D69E6 loc_D69AA: mov rdi, [rbp+var_38] mov r14d, [rbp+var_2C] jmp short loc_D69B8 loc_D69B4: mov rdi, [rbp+var_38] loc_D69B8: mov rsi, r12 mov rdx, r13 call strnmov mov r15, rax test r14d, r14d jz short loc_D6A48 mov r14d, r14d mov rdi, r15 mov rsi, r14 mov edx, 2Eh ; '.' call strfill mov r15, rax jmp short loc_D6A4B loc_D69E3: xor r14d, r14d loc_D69E6: lea rax, [r15+1] cmp rax, [rbp+var_50] jnb short loc_D6A34 cmp [rbp+var_2C], 0 jz loc_D6A96 sub r14d, 1 mov eax, 2 cmovb r14d, eax mov rdx, qword ptr [rbp+r14*8+var_70] test rdx, rdx jz short loc_D6A34 mov ecx, 1 loc_D6A16: sub r14d, 1 cmovb r14d, eax mov r15, qword ptr [rbp+r14*8+var_70] test r15, r15 jz short loc_D6A7E inc ecx mov rdx, r15 cmp ecx, 3 jnz short loc_D6A16 jmp short loc_D6A81 loc_D6A34: mov rax, [rbp+var_38] mov byte ptr [rax], 0 mov r15, rax mov rbx, [rbp+var_40] loc_D6A42: mov r13, r15 sub r13, rax loc_D6A48: xor r14d, r14d loc_D6A4B: test rbx, rbx jns short loc_D6A6C add r13, r14 mov rsi, [rbp+var_48] sub rsi, r13 jbe short loc_D6A6C mov rdi, r15 mov edx, 20h ; ' ' call strfill mov r15, rax loc_D6A6C: mov rax, r15 add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_D6A7E: mov r15, rdx loc_D6A81: mov ebx, ecx mov rdi, r15 mov esi, 2Eh ; '.' mov rdx, rbx call _memset add r15, rbx loc_D6A96: mov byte ptr [r15], 60h ; '`' inc r15 mov rbx, [rbp+var_40] mov rax, [rbp+var_38] jmp short loc_D6A42
long long process_str_arg( long long a1, _BYTE *a2, unsigned long long a3, long long a4, unsigned long long a5, const char *a6, char a7, char a8) { unsigned long long v9; // r14 unsigned long long v10; // rbx long long v11; // r13 const char *v12; // r12 unsigned long long v13; // rax unsigned long long v14; // rdx long long v15; // rcx long long v16; // r8 long long v17; // r9 long long v18; // r13 long long v19; // rbx long long v20; // r14 unsigned long long v21; // rax long long v22; // rdi long long v23; // r13 _BYTE *v24; // r15 const char *v25; // r13 unsigned int v26; // r14d char v27; // bl unsigned int v28; // eax _BYTE *v29; // rdi long long v30; // rbx long long v31; // rax long long v32; // r15 bool v33; // cf long long v34; // r14 long long v35; // rdx unsigned int v36; // ecx long long v37; // r15 _BYTE *v38; // rax unsigned long long v39; // r13 long long v41; // rbx __int128 v42; // [rsp+0h] [rbp-70h] BYREF long long v43; // [rsp+10h] [rbp-60h] long long v44; // [rsp+18h] [rbp-58h] unsigned long long v45; // [rsp+20h] [rbp-50h] unsigned long long v46; // [rsp+28h] [rbp-48h] long long v47; // [rsp+30h] [rbp-40h] _BYTE *v48; // [rsp+38h] [rbp-38h] unsigned int v49; // [rsp+44h] [rbp-2Ch] v44 = a1; v45 = a3; v48 = a2; v9 = a3 - (_QWORD)a2; v10 = a3 - (_QWORD)a2 + 1; v11 = -a4; v47 = a4; if ( a4 > 0 ) v11 = a4; v12 = "(null)"; if ( a6 ) v12 = a6; if ( a8 ) { v13 = strnlen(v12, a5 + 1); v14 = a5; if ( v13 < a5 ) v14 = v13; if ( v10 <= v14 ) { v14 = v9; v11 = v9; } v49 = 0; v46 = v11; if ( v13 > v14 ) { if ( v14 > 2 ) { v14 -= 3LL; v49 = 3; } else { v49 = v14; v14 = 0LL; } } } else { v14 = strnlen(v12, a5); if ( v10 <= v14 ) { v14 = v9; v11 = v9; } v46 = v11; v49 = 0; } (*(void ( **)(long long, const char *, const char *, unsigned long long, __int128 *))(*(_QWORD *)(v44 + 184) + 200LL))( v44, v12, &v12[v14], a5, &v42); v18 = v42 - (_QWORD)v12; if ( (a7 & 8) != 0 ) { v23 = v49 + v18; v42 = 0LL; v43 = 0LL; if ( v9 > v23 ) { v24 = v48 + 1; *v48 = 96; if ( v23 > 0 ) { v25 = &v12[v23]; v26 = 0; while ( 1 ) { if ( v49 ) { *((_QWORD *)&v42 + v26) = v24; v15 = 2863311531LL; v26 += -3 * ((v26 + 1) / 3) + 1; } v27 = *v12; v28 = (*(long long ( **)(long long, const char *, const char *, long long, long long, long long, _QWORD, _QWORD, long long))(*(_QWORD *)(v44 + 184) + 192LL))( v44, v12, v25, v15, v16, v17, v42, *((_QWORD *)&v42 + 1), v43); if ( (int)v28 < 2 && (v28 = 1, v27 == 96) ) { v29 = v24 + 1; if ( (unsigned long long)(v24 + 1) >= v45 ) goto LABEL_50; *v24 = 96; } else { v29 = v24; } v30 = v28; if ( (unsigned long long)&v29[v28] >= v45 ) goto LABEL_50; v24 = (_BYTE *)strnmov(v29, v12, v28); v12 += v30; if ( v12 >= v25 ) goto LABEL_39; } } v26 = 0; LABEL_39: if ( (unsigned long long)(v24 + 1) >= v45 ) goto LABEL_50; if ( !v49 ) { LABEL_59: *v24 = 96; v32 = (long long)(v24 + 1); v19 = v47; v38 = v48; goto LABEL_51; } v33 = v26 == 0; v34 = v26 - 1; if ( v33 ) v34 = 2LL; v35 = *((_QWORD *)&v42 + v34); if ( v35 ) { v36 = 1; while ( 1 ) { v33 = (_DWORD)v34 == 0; v34 = (unsigned int)(v34 - 1); if ( v33 ) v34 = 2LL; v37 = *((_QWORD *)&v42 + v34); if ( !v37 ) break; ++v36; v35 = *((_QWORD *)&v42 + v34); if ( v36 == 3 ) goto LABEL_58; } v37 = v35; LABEL_58: v41 = v36; memset(v37, 46LL, v36); v24 = (_BYTE *)(v41 + v37); goto LABEL_59; } } LABEL_50: v38 = v48; *v48 = 0; v32 = (long long)v38; v19 = v47; LABEL_51: v18 = v32 - (_QWORD)v38; LABEL_52: v20 = 0LL; goto LABEL_53; } v19 = v47; if ( v47 < 0 ) { v22 = (long long)v48; LODWORD(v20) = v49; } else { LODWORD(v20) = v49; v21 = v18 + v49; if ( v46 <= v21 ) v22 = (long long)v48; else v22 = strfill(v48, v46 - v21, 32LL); } v31 = strnmov(v22, v12, v18); v32 = v31; if ( !(_DWORD)v20 ) goto LABEL_52; v20 = (unsigned int)v20; v32 = strfill(v31, (unsigned int)v20, 46LL); LABEL_53: if ( v19 < 0 ) { v39 = v20 + v18; if ( v46 > v39 ) return strfill(v32, v46 - v39, 32LL); } return v32; }
process_str_arg: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R15,R8 MOV qword ptr [RBP + -0x58],RDI MOV qword ptr [RBP + -0x50],RDX MOV R14,RDX MOV qword ptr [RBP + -0x38],RSI SUB R14,RSI LEA RBX,[R14 + 0x1] MOV R13,RCX NEG R13 MOV qword ptr [RBP + -0x40],RCX CMOVS R13,RCX TEST R9,R9 LEA R12,[0x1dee08] CMOVNZ R12,R9 CMP byte ptr [RBP + 0x18],0x0 JZ 0x001d683e LEA RSI,[R15 + 0x1] MOV RDI,R12 CALL 0x00129500 CMP RAX,R15 MOV RDX,R15 CMOVC RDX,RAX CMP RBX,RDX CMOVBE RDX,R14 CMOVBE R13,R14 MOV dword ptr [RBP + -0x2c],0x0 CMP RAX,RDX MOV qword ptr [RBP + -0x48],R13 JBE 0x001d686f CMP RDX,0x2 JA 0x001d6864 MOV dword ptr [RBP + -0x2c],EDX XOR EDX,EDX JMP 0x001d686f LAB_001d683e: MOV RDI,R12 MOV RSI,R15 CALL 0x00129500 MOV RDX,RAX CMP RBX,RAX CMOVBE RDX,R14 CMOVBE R13,R14 MOV qword ptr [RBP + -0x48],R13 MOV dword ptr [RBP + -0x2c],0x0 JMP 0x001d686f LAB_001d6864: ADD RDX,-0x3 MOV dword ptr [RBP + -0x2c],0x3 LAB_001d686f: ADD RDX,R12 MOV RDI,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RDI + 0xb8] LEA RBX,[RBP + -0x70] MOV RSI,R12 MOV RCX,R15 MOV R8,RBX CALL qword ptr [RAX + 0xc8] MOV R13,qword ptr [RBX] SUB R13,R12 MOV EAX,dword ptr [RBP + 0x10] TEST AL,0x8 JNZ 0x001d68d7 MOV RBX,qword ptr [RBP + -0x40] TEST RBX,RBX JS 0x001d69aa MOV R14D,dword ptr [RBP + -0x2c] MOV EAX,R14D ADD RAX,R13 MOV RSI,qword ptr [RBP + -0x48] SUB RSI,RAX JBE 0x001d69b4 MOV RDI,qword ptr [RBP + -0x38] MOV EDX,0x20 CALL 0x001d70dc MOV RDI,RAX JMP 0x001d69b8 LAB_001d68d7: MOV EAX,dword ptr [RBP + -0x2c] ADD R13,RAX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RBP + -0x70],XMM0 MOV qword ptr [RBP + -0x60],0x0 CMP R14,R13 JBE 0x001d6a34 MOV RAX,qword ptr [RBP + -0x38] LEA R15,[RAX + 0x1] MOV byte ptr [RAX],0x60 TEST R13,R13 JLE 0x001d69e3 ADD R13,R12 XOR R14D,R14D LAB_001d690f: CMP dword ptr [RBP + -0x2c],0x0 JZ 0x001d693a MOV EAX,R14D MOV qword ptr [RBP + RAX*0x8 + -0x70],R15 MOV EAX,R14D INC EAX MOV ECX,0xaaaaaaab IMUL RAX,RCX SHR RAX,0x21 LEA EAX,[RAX + RAX*0x2] NEG EAX ADD R14D,EAX INC R14D LAB_001d693a: MOV BL,byte ptr [R12] MOV RDI,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RDI + 0xb8] MOV RSI,R12 MOV RDX,R13 CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 MOV ECX,0x1 CMOVL EAX,ECX JGE 0x001d697b CMP BL,0x60 JNZ 0x001d697b LEA RDI,[R15 + 0x1] CMP RDI,qword ptr [RBP + -0x50] JNC 0x001d6a34 MOV byte ptr [R15],0x60 JMP 0x001d697e LAB_001d697b: MOV RDI,R15 LAB_001d697e: MOV EBX,EAX LEA RAX,[RDI + RBX*0x1] CMP RAX,qword ptr [RBP + -0x50] JNC 0x001d6a34 MOV RSI,R12 MOV RDX,RBX CALL 0x001d713c MOV R15,RAX ADD R12,RBX CMP R12,R13 JC 0x001d690f JMP 0x001d69e6 LAB_001d69aa: MOV RDI,qword ptr [RBP + -0x38] MOV R14D,dword ptr [RBP + -0x2c] JMP 0x001d69b8 LAB_001d69b4: MOV RDI,qword ptr [RBP + -0x38] LAB_001d69b8: MOV RSI,R12 MOV RDX,R13 CALL 0x001d713c MOV R15,RAX TEST R14D,R14D JZ 0x001d6a48 MOV R14D,R14D MOV RDI,R15 MOV RSI,R14 MOV EDX,0x2e CALL 0x001d70dc MOV R15,RAX JMP 0x001d6a4b LAB_001d69e3: XOR R14D,R14D LAB_001d69e6: LEA RAX,[R15 + 0x1] CMP RAX,qword ptr [RBP + -0x50] JNC 0x001d6a34 CMP dword ptr [RBP + -0x2c],0x0 JZ 0x001d6a96 SUB R14D,0x1 MOV EAX,0x2 CMOVC R14D,EAX MOV RDX,qword ptr [RBP + R14*0x8 + -0x70] TEST RDX,RDX JZ 0x001d6a34 MOV ECX,0x1 LAB_001d6a16: SUB R14D,0x1 CMOVC R14D,EAX MOV R15,qword ptr [RBP + R14*0x8 + -0x70] TEST R15,R15 JZ 0x001d6a7e INC ECX MOV RDX,R15 CMP ECX,0x3 JNZ 0x001d6a16 JMP 0x001d6a81 LAB_001d6a34: MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX],0x0 MOV R15,RAX MOV RBX,qword ptr [RBP + -0x40] LAB_001d6a42: MOV R13,R15 SUB R13,RAX LAB_001d6a48: XOR R14D,R14D LAB_001d6a4b: TEST RBX,RBX JNS 0x001d6a6c ADD R13,R14 MOV RSI,qword ptr [RBP + -0x48] SUB RSI,R13 JBE 0x001d6a6c MOV RDI,R15 MOV EDX,0x20 CALL 0x001d70dc MOV R15,RAX LAB_001d6a6c: MOV RAX,R15 ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001d6a7e: MOV R15,RDX LAB_001d6a81: MOV EBX,ECX MOV RDI,R15 MOV ESI,0x2e MOV RDX,RBX CALL 0x001292a0 ADD R15,RBX LAB_001d6a96: MOV byte ptr [R15],0x60 INC R15 MOV RBX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x38] JMP 0x001d6a42
int1 * process_str_arg(long param_1,int1 *param_2,int1 *param_3,ulong param_4,ulong param_5, char *param_6,uint param_7,char param_8) { char cVar1; void *pvVar2; uint uVar3; uint uVar4; size_t sVar5; int1 *puVar6; void *__s; long lVar7; char *__string; long lVar8; ulong uVar9; char *pcVar10; int iVar11; ulong uVar12; long local_78 [4]; int1 *local_58; ulong local_50; ulong local_48; int1 *local_40; uint local_34; uVar12 = (long)param_3 - (long)param_2; local_50 = -param_4; if (0 < (long)param_4) { local_50 = param_4; } __string = "(null)"; if (param_6 != (char *)0x0) { __string = param_6; } local_78[3] = param_1; local_58 = param_3; local_48 = param_4; local_40 = param_2; if (param_8 == '\0') { uVar9 = strnlen(__string,param_5); if (uVar12 + 1 <= uVar9) { local_50 = uVar12; uVar9 = uVar12; } local_34 = 0; } else { sVar5 = strnlen(__string,param_5 + 1); uVar9 = param_5; if (sVar5 < param_5) { uVar9 = sVar5; } if (uVar12 + 1 <= uVar9) { local_50 = uVar12; uVar9 = uVar12; } local_34 = 0; if (uVar9 < sVar5) { if (uVar9 < 3) { local_34 = (uint)uVar9; uVar9 = 0; } else { uVar9 = uVar9 - 3; local_34 = 3; } } } (**(code **)(*(long *)(local_78[3] + 0xb8) + 200)) (local_78[3],__string,__string + uVar9,param_5,local_78); uVar4 = local_34; uVar9 = local_48; lVar8 = local_78[0] - (long)__string; if ((param_7 & 8) == 0) { puVar6 = local_40; if ((-1 < (long)local_48) && (lVar7 = local_50 - ((ulong)local_34 + lVar8), (ulong)local_34 + lVar8 <= local_50 && lVar7 != 0)) { puVar6 = (int1 *)strfill(local_40,lVar7,0x20); } uVar12 = (ulong)uVar4; puVar6 = (int1 *)strnmov(puVar6,__string,lVar8); if (uVar4 != 0) { puVar6 = (int1 *)strfill(puVar6,uVar12,0x2e); goto LAB_001d6a4b; } } else { uVar9 = lVar8 + (ulong)local_34; local_78[0] = 0; local_78[1] = 0; local_78[2] = 0; if (uVar9 < uVar12) { puVar6 = local_40 + 1; *local_40 = 0x60; if ((long)uVar9 < 1) { iVar11 = 0; } else { pcVar10 = __string + uVar9; uVar12 = 0; do { if (local_34 != 0) { local_78[uVar12] = (long)puVar6; uVar12 = (ulong)((int)uVar12 + (((int)uVar12 + 1U) / 3) * -3 + 1); } iVar11 = (int)uVar12; cVar1 = *__string; uVar4 = (**(code **)(*(long *)(local_78[3] + 0xb8) + 0xc0))(local_78[3],__string,pcVar10); if (((int)uVar4 < 2) && (uVar4 = 1, cVar1 == '`')) { if (local_58 <= puVar6 + 1) goto LAB_001d6a34; *puVar6 = 0x60; puVar6 = puVar6 + 1; } uVar9 = (ulong)uVar4; if (local_58 <= puVar6 + uVar9) goto LAB_001d6a34; puVar6 = (int1 *)strnmov(puVar6,__string,uVar9); __string = __string + uVar9; } while (__string < pcVar10); } if (local_58 <= puVar6 + 1) goto LAB_001d6a34; if (local_34 != 0) { uVar4 = iVar11 - 1; if (iVar11 == 0) { uVar4 = 2; } uVar12 = (ulong)uVar4; if ((void *)local_78[uVar12] == (void *)0x0) goto LAB_001d6a34; uVar4 = 1; __s = (void *)local_78[uVar12]; do { uVar3 = (int)uVar12 - 1; if ((int)uVar12 == 0) { uVar3 = 2; } uVar12 = (ulong)uVar3; pvVar2 = (void *)local_78[uVar12]; } while ((pvVar2 != (void *)0x0) && (uVar4 = uVar4 + 1, __s = pvVar2, uVar4 != 3)); memset(__s,0x2e,(ulong)uVar4); puVar6 = (int1 *)((long)__s + (ulong)uVar4); } *puVar6 = 0x60; puVar6 = puVar6 + 1; } else { LAB_001d6a34: *local_40 = 0; puVar6 = local_40; } lVar8 = (long)puVar6 - (long)local_40; uVar9 = local_48; } uVar12 = 0; LAB_001d6a4b: if (((long)uVar9 < 0) && (lVar7 = local_50 - (lVar8 + uVar12), lVar8 + uVar12 <= local_50 && lVar7 != 0)) { puVar6 = (int1 *)strfill(puVar6,lVar7,0x20); } return puVar6; }
11,646
minja::CommentTemplateToken::~CommentTemplateToken()
monkey531[P]llama/common/minja.hpp
CommentTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, const std::string& t) : TemplateToken(Type::Comment, location, pre, post), text(t) {}
O3
cpp
minja::CommentTemplateToken::~CommentTemplateToken(): pushq %rbx movq %rdi, %rbx leaq 0xa7a31(%rip), %rax # 0x12c290 addq $0x10, %rax movq %rax, (%rdi) movq 0x30(%rdi), %rdi leaq 0x40(%rbx), %rax cmpq %rax, %rdi je 0x8487e movq (%rax), %rsi incq %rsi callq 0x1b8b0 leaq 0xa7a53(%rip), %rax # 0x12c2d8 addq $0x10, %rax movq %rax, (%rbx) movq 0x18(%rbx), %rdi testq %rdi, %rdi je 0x8489b popq %rbx jmp 0x6d556 popq %rbx retq nop
_ZN5minja20CommentTemplateTokenD2Ev: push rbx mov rbx, rdi lea rax, _ZTVN5minja20CommentTemplateTokenE; `vtable for'minja::CommentTemplateToken add rax, 10h mov [rdi], rax mov rdi, [rdi+30h]; void * lea rax, [rbx+40h] cmp rdi, rax jz short loc_8487E mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8487E: lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken add rax, 10h mov [rbx], rax mov rdi, [rbx+18h] test rdi, rdi jz short loc_8489B pop rbx jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_8489B: pop rbx retn
void minja::CommentTemplateToken::~CommentTemplateToken(minja::CommentTemplateToken *this) { char *v2; // rdi volatile signed __int32 *v3; // rdi *(_QWORD *)this = &`vtable for'minja::CommentTemplateToken + 2; v2 = (char *)*((_QWORD *)this + 6); if ( v2 != (char *)this + 64 ) operator delete(v2, *((_QWORD *)this + 8) + 1LL); *(_QWORD *)this = &`vtable for'minja::TemplateToken + 2; v3 = (volatile signed __int32 *)*((_QWORD *)this + 3); if ( v3 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3); }
~CommentTemplateToken: PUSH RBX MOV RBX,RDI LEA RAX,[0x22c290] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x30] LEA RAX,[RBX + 0x40] CMP RDI,RAX JZ 0x0018487e MOV RSI,qword ptr [RAX] INC RSI CALL 0x0011b8b0 LAB_0018487e: LEA RAX,[0x22c2d8] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RBX + 0x18] TEST RDI,RDI JZ 0x0018489b POP RBX JMP 0x0016d556 LAB_0018489b: POP RBX RET
/* minja::CommentTemplateToken::~CommentTemplateToken() */ void __thiscall minja::CommentTemplateToken::~CommentTemplateToken(CommentTemplateToken *this) { *(int ***)this = &PTR__CommentTemplateToken_0022c2a0; if (*(CommentTemplateToken **)(this + 0x30) != this + 0x40) { operator_delete(*(CommentTemplateToken **)(this + 0x30),*(long *)(this + 0x40) + 1); } *(int ***)this = &PTR__TemplateToken_0022c2e8; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18)); return; } return; }
11,647
inline_mysql_cond_init
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_cond_init( #ifdef HAVE_PSI_COND_INTERFACE PSI_cond_key key, #endif mysql_cond_t *that, const pthread_condattr_t *attr) { #ifdef HAVE_PSI_COND_INTERFACE that->m_psi= PSI_COND_CALL(init_cond)(key, &that->m_cond); #else that->m_psi= NULL; #endif return pthread_cond_init(&that->m_cond, attr); }
O0
c
inline_mysql_cond_init: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) leaq 0x1c954e(%rip), %rax # 0x2c0238 movq (%rax), %rax movq 0x60(%rax), %rax movl -0x4(%rbp), %edi movq -0x10(%rbp), %rsi callq *%rax movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x30(%rax) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x2a360 addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
inline_mysql_cond_init_4: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx lea rax, PSI_server mov rax, [rax] mov rax, [rax+60h] mov edi, [rbp+var_4] mov rsi, [rbp+var_10] call rax mov rcx, rax mov rax, [rbp+var_10] mov [rax+30h], rcx mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call _pthread_cond_init add rsp, 20h pop rbp retn
long long inline_mysql_cond_init_4(unsigned int a1, long long a2, long long a3) { *(_QWORD *)(a2 + 48) = ((long long ( *)(_QWORD, long long))PSI_server[12])(a1, a2); return pthread_cond_init(a2, a3); }
inline_mysql_cond_init: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX LEA RAX,[0x3c0238] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x60] MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x10] CALL RAX MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x30],RCX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0012a360 ADD RSP,0x20 POP RBP RET
void inline_mysql_cond_init(int4 param_1,pthread_cond_t *param_2,pthread_condattr_t *param_3) { longlong lVar1; lVar1 = (**(code **)(PSI_server + 0x60))(param_1,param_2); param_2[1].__align = lVar1; pthread_cond_init(param_2,param_3); return; }
11,648
my_chsize
eloqsql/mysys/my_chsize.c
int my_chsize(File fd, my_off_t newlength, int filler, myf MyFlags) { my_off_t oldsize; uchar buff[IO_SIZE]; DBUG_ENTER("my_chsize"); DBUG_PRINT("my",("fd: %d length: %lu MyFlags: %lu",fd,(ulong) newlength, MyFlags)); if ((oldsize= my_seek(fd, 0L, MY_SEEK_END, MYF(MY_WME+MY_FAE))) == newlength) DBUG_RETURN(0); DBUG_PRINT("info",("old_size: %ld", (ulong) oldsize)); if (oldsize > newlength) { #ifdef _WIN32 if (my_win_chsize(fd, newlength)) { my_errno= errno; goto err; } DBUG_RETURN(0); #elif defined(HAVE_FTRUNCATE) if (ftruncate(fd, (off_t) newlength)) { my_errno= errno; goto err; } DBUG_RETURN(0); #else /* Fill space between requested length and true length with 'filler' We should never come here on any modern machine */ if (my_seek(fd, newlength, MY_SEEK_SET, MYF(MY_WME+MY_FAE)) == MY_FILEPOS_ERROR) { goto err; } swap_variables(my_off_t, newlength, oldsize); #endif } /* Full file with 'filler' until it's as big as requested */ bfill(buff, IO_SIZE, filler); while (newlength-oldsize > IO_SIZE) { if (my_write(fd, buff, IO_SIZE, MYF(MY_NABP))) goto err; oldsize+= IO_SIZE; } if (my_write(fd,buff,(size_t) (newlength-oldsize), MYF(MY_NABP))) goto err; DBUG_RETURN(0); err: DBUG_PRINT("error", ("errno: %d", errno)); if (MyFlags & MY_WME) my_error(EE_CANT_CHSIZE, MYF(ME_BELL), my_errno); DBUG_RETURN(1); }
O3
c
my_chsize: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1018, %rsp # imm = 0x1018 movq %rcx, -0x1038(%rbp) movl %edx, %r13d movq %rsi, %r14 movl %edi, %r15d movq %fs:0x28, %rax movq %rax, -0x30(%rbp) xorl %ebx, %ebx movl $0x18, %ecx xorl %esi, %esi movl $0x2, %edx callq 0xa076c movq %r14, %r12 subq %rax, %r12 je 0x9da79 jae 0x9d9e9 movl %r15d, %edi movq %r14, %rsi callq 0x29500 testl %eax, %eax je 0x9da79 callq 0x297b0 movl (%rax), %ebx callq 0xa16ee movl %ebx, (%rax) jmp 0x9da53 leaq -0x1030(%rbp), %rdi movl $0x1000, %edx # imm = 0x1000 movl %r13d, %esi callq 0x292c0 cmpq $0x1001, %r12 # imm = 0x1001 jb 0x9da37 leaq -0x1030(%rbp), %r13 movl $0x1000, %edx # imm = 0x1000 movl $0x4, %ecx movl %r15d, %edi movq %r13, %rsi callq 0x2f004 testq %rax, %rax jne 0x9da53 addq $-0x1000, %r12 # imm = 0xF000 cmpq $0x1001, %r12 # imm = 0x1001 jae 0x9da0d leaq -0x1030(%rbp), %rsi movl $0x4, %ecx movl %r15d, %edi movq %r12, %rdx callq 0x2f004 testq %rax, %rax je 0x9da79 movl $0x1, %ebx testb $0x10, -0x1038(%rbp) je 0x9da79 callq 0xa16ee movl (%rax), %edx movl $0x4, %esi movl $0xe, %edi xorl %eax, %eax callq 0x9dda3 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x9da9c movl %ebx, %eax addq $0x1018, %rsp # imm = 0x1018 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29270 nopl (%rax)
my_chsize: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 1018h mov [rbp+var_1038], rcx mov r13d, edx mov r14, rsi mov r15d, edi mov rax, fs:28h mov [rbp+var_30], rax xor ebx, ebx mov ecx, 18h xor esi, esi mov edx, 2 call my_seek mov r12, r14 sub r12, rax jz loc_9DA79 jnb short loc_9D9E9 mov edi, r15d mov rsi, r14 call _ftruncate64 test eax, eax jz loc_9DA79 call ___errno_location mov ebx, [rax] call _my_thread_var mov [rax], ebx jmp short loc_9DA53 loc_9D9E9: lea rdi, [rbp+var_1030] mov edx, 1000h mov esi, r13d call _memset cmp r12, 1001h jb short loc_9DA37 lea r13, [rbp+var_1030] loc_9DA0D: mov edx, 1000h mov ecx, 4 mov edi, r15d mov rsi, r13 call my_write test rax, rax jnz short loc_9DA53 add r12, 0FFFFFFFFFFFFF000h cmp r12, 1001h jnb short loc_9DA0D loc_9DA37: lea rsi, [rbp+var_1030] mov ecx, 4 mov edi, r15d mov rdx, r12 call my_write test rax, rax jz short loc_9DA79 loc_9DA53: mov ebx, 1 test byte ptr [rbp+var_1038], 10h jz short loc_9DA79 call _my_thread_var mov edx, [rax] mov esi, 4 mov edi, 0Eh xor eax, eax call my_error loc_9DA79: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_9DA9C mov eax, ebx add rsp, 1018h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_9DA9C: call ___stack_chk_fail
long long my_chsize(long long a1, const char *a2, unsigned int a3, char a4) { unsigned int v5; // r15d unsigned int v6; // ebx unsigned long long v7; // rax unsigned long long v8; // r12 int v9; // ebx _DWORD *v10; // rax int v11; // ecx int v12; // r8d int v13; // r9d _BYTE v16[4096]; // [rsp+10h] [rbp-1030h] BYREF unsigned long long v17; // [rsp+1010h] [rbp-30h] v5 = a1; v17 = __readfsqword(0x28u); v6 = 0; v7 = my_seek(a1, 0LL, 2LL, 24LL); v8 = (unsigned long long)&a2[-v7]; if ( a2 != (const char *)v7 ) { if ( (unsigned long long)a2 >= v7 ) { memset(v16, a3, sizeof(v16)); if ( v8 < 0x1001 ) { LABEL_8: a2 = v16; a1 = v5; if ( !my_write(v5, (long long)v16, v8, 4LL) ) return v6; } else { while ( 1 ) { a1 = v5; a2 = v16; if ( my_write(v5, (long long)v16, 4096LL, 4LL) ) break; v8 -= 4096LL; if ( v8 < 0x1001 ) goto LABEL_8; } } } else { a1 = (unsigned int)a1; if ( !(unsigned int)ftruncate64((unsigned int)a1, a2) ) return v6; v9 = *(_DWORD *)__errno_location((unsigned int)a1); *(_DWORD *)my_thread_var((unsigned int)a1, a2) = v9; } v6 = 1; if ( (a4 & 0x10) != 0 ) { v10 = (_DWORD *)my_thread_var(a1, a2); my_error(14, 4, *v10, v11, v12, v13); } } return v6; }
my_chsize: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1018 MOV qword ptr [RBP + -0x1038],RCX MOV R13D,EDX MOV R14,RSI MOV R15D,EDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX XOR EBX,EBX MOV ECX,0x18 XOR ESI,ESI MOV EDX,0x2 CALL 0x001a076c MOV R12,R14 SUB R12,RAX JZ 0x0019da79 JNC 0x0019d9e9 MOV EDI,R15D MOV RSI,R14 CALL 0x00129500 TEST EAX,EAX JZ 0x0019da79 CALL 0x001297b0 MOV EBX,dword ptr [RAX] CALL 0x001a16ee MOV dword ptr [RAX],EBX JMP 0x0019da53 LAB_0019d9e9: LEA RDI,[RBP + -0x1030] MOV EDX,0x1000 MOV ESI,R13D CALL 0x001292c0 CMP R12,0x1001 JC 0x0019da37 LEA R13,[RBP + -0x1030] LAB_0019da0d: MOV EDX,0x1000 MOV ECX,0x4 MOV EDI,R15D MOV RSI,R13 CALL 0x0012f004 TEST RAX,RAX JNZ 0x0019da53 ADD R12,-0x1000 CMP R12,0x1001 JNC 0x0019da0d LAB_0019da37: LEA RSI,[RBP + -0x1030] MOV ECX,0x4 MOV EDI,R15D MOV RDX,R12 CALL 0x0012f004 TEST RAX,RAX JZ 0x0019da79 LAB_0019da53: MOV EBX,0x1 TEST byte ptr [RBP + -0x1038],0x10 JZ 0x0019da79 CALL 0x001a16ee MOV EDX,dword ptr [RAX] MOV ESI,0x4 MOV EDI,0xe XOR EAX,EAX CALL 0x0019dda3 LAB_0019da79: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0019da9c MOV EAX,EBX ADD RSP,0x1018 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0019da9c: CALL 0x00129270
int8 my_chsize(ulong param_1,ulong param_2,int param_3,ulong param_4) { int iVar1; ulong uVar2; int *piVar3; long lVar4; int4 *puVar5; int8 uVar6; ulong uVar7; long in_FS_OFFSET; int1 local_1038 [4096]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar6 = 0; uVar2 = my_seek(param_1,0,2,0x18); uVar7 = param_2 - uVar2; if (uVar7 != 0) { if (param_2 < uVar2) { iVar1 = ftruncate64((int)param_1,param_2); if (iVar1 == 0) goto LAB_0019da79; piVar3 = __errno_location(); iVar1 = *piVar3; piVar3 = (int *)_my_thread_var(); *piVar3 = iVar1; } else { memset(local_1038,param_3,0x1000); if (0x1000 < uVar7) { do { lVar4 = my_write(param_1 & 0xffffffff,local_1038,0x1000,4); if (lVar4 != 0) goto LAB_0019da53; uVar7 = uVar7 - 0x1000; } while (0x1000 < uVar7); } lVar4 = my_write(param_1 & 0xffffffff,local_1038,uVar7,4); if (lVar4 == 0) goto LAB_0019da79; } LAB_0019da53: uVar6 = 1; if ((param_4 & 0x10) != 0) { puVar5 = (int4 *)_my_thread_var(); my_error(0xe,4,*puVar5); } } LAB_0019da79: if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return uVar6; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
11,649
bytes_read
corpus-core[P]colibri-stateless/src/util/bytes.c
bytes_t bytes_read(char* filename) { unsigned char buffer[1024]; size_t bytesRead; buffer_t data = {0}; FILE* file = strcmp(filename, "-") ? fopen(filename, "rb") : stdin; if (file == NULL) return NULL_BYTES; while ((bytesRead = fread(buffer, 1, 1024, file)) == sizeof(buffer)) buffer_append(&data, bytes(buffer, bytesRead)); if (bytesRead > 0) buffer_append(&data, bytes(buffer, bytesRead)); buffer_append(&data, bytes(NULL, 1)); data.data.len--; if (ferror(file)) { fprintf(stderr, "Error reading file: %s\n", filename); buffer_free(&data); data.data = NULL_BYTES; } #ifndef __clang_analyzer__ if (file != stdin) #endif fclose(file); return data.data; }
O0
c
bytes_read: pushq %rbp movq %rsp, %rbp subq $0x490, %rsp # imm = 0x490 movq %rdi, -0x18(%rbp) leaq -0x440(%rbp), %rdi xorl %esi, %esi movl $0x18, %edx callq 0x5110 movq -0x18(%rbp), %rdi leaq 0x3bc93(%rip), %rsi # 0x55000 callq 0x5250 cmpl $0x0, %eax je 0x19390 movq -0x18(%rbp), %rdi leaq 0x3acc1(%rip), %rsi # 0x54043 callq 0x5320 movq %rax, -0x490(%rbp) jmp 0x193a1 movq 0x55c59(%rip), %rax # 0x6eff0 movq (%rax), %rax movq %rax, -0x490(%rbp) movq -0x490(%rbp), %rax movq %rax, -0x448(%rbp) cmpq $0x0, -0x448(%rbp) jne 0x193cd movl $0x0, -0x10(%rbp) movq $0x0, -0x8(%rbp) jmp 0x1954b jmp 0x193cf leaq -0x420(%rbp), %rdi movq -0x448(%rbp), %rcx movl $0x1, %esi movl $0x400, %edx # imm = 0x400 callq 0x51b0 movq %rax, -0x428(%rbp) cmpq $0x400, %rax # imm = 0x400 jne 0x19431 movq -0x428(%rbp), %rax movl %eax, -0x458(%rbp) leaq -0x420(%rbp), %rax movq %rax, -0x450(%rbp) movl -0x458(%rbp), %esi movq -0x450(%rbp), %rdx leaq -0x440(%rbp), %rdi callq 0x18bd0 jmp 0x193cf cmpq $0x0, -0x428(%rbp) jbe 0x1946f movq -0x428(%rbp), %rax movl %eax, -0x468(%rbp) leaq -0x420(%rbp), %rax movq %rax, -0x460(%rbp) movl -0x468(%rbp), %esi movq -0x460(%rbp), %rdx leaq -0x440(%rbp), %rdi callq 0x18bd0 movl $0x1, -0x478(%rbp) movq $0x0, -0x470(%rbp) movl -0x478(%rbp), %esi movq -0x470(%rbp), %rdx leaq -0x440(%rbp), %rdi callq 0x18bd0 movl -0x440(%rbp), %eax addl $-0x1, %eax movl %eax, -0x440(%rbp) movq -0x448(%rbp), %rdi callq 0x5220 cmpl $0x0, %eax je 0x19516 movq 0x55b1c(%rip), %rax # 0x6efe0 movq (%rax), %rdi movq -0x18(%rbp), %rdx leaq 0x3ab74(%rip), %rsi # 0x54046 movb $0x0, %al callq 0x50d0 leaq -0x440(%rbp), %rdi callq 0x18d90 movl $0x0, -0x488(%rbp) movq $0x0, -0x480(%rbp) movq -0x488(%rbp), %rax movq %rax, -0x440(%rbp) movq -0x480(%rbp), %rax movq %rax, -0x438(%rbp) movq -0x448(%rbp), %rax movq 0x55acc(%rip), %rcx # 0x6eff0 cmpq (%rcx), %rax je 0x19535 movq -0x448(%rbp), %rdi callq 0x5140 movq -0x440(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x438(%rbp), %rax movq %rax, -0x8(%rbp) movl -0x10(%rbp), %eax movq -0x8(%rbp), %rdx addq $0x490, %rsp # imm = 0x490 popq %rbp retq nopl (%rax,%rax)
bytes_read: push rbp mov rbp, rsp sub rsp, 490h mov [rbp+var_18], rdi lea rdi, [rbp+var_440] xor esi, esi mov edx, 18h call _memset mov rdi, [rbp+var_18] lea rsi, aH2cOversizeDst+10h; "-" call _strcmp cmp eax, 0 jz short loc_19390 mov rdi, [rbp+var_18] lea rsi, aRb; "rb" call _fopen mov [rbp+var_490], rax jmp short loc_193A1 loc_19390: mov rax, cs:stdin_ptr mov rax, [rax] mov [rbp+var_490], rax loc_193A1: mov rax, [rbp+var_490] mov [rbp+var_448], rax cmp [rbp+var_448], 0 jnz short loc_193CD mov dword ptr [rbp+var_10], 0 mov [rbp+var_8], 0 jmp loc_1954B loc_193CD: jmp short $+2 loc_193CF: lea rdi, [rbp+var_420] mov rcx, [rbp+var_448] mov esi, 1 mov edx, 400h call _fread mov [rbp+var_428], rax cmp rax, 400h jnz short loc_19431 mov rax, [rbp+var_428] mov [rbp+var_458], eax lea rax, [rbp+var_420] mov [rbp+var_450], rax mov esi, [rbp+var_458] mov rdx, [rbp+var_450] lea rdi, [rbp+var_440] call buffer_append jmp short loc_193CF loc_19431: cmp [rbp+var_428], 0 jbe short loc_1946F mov rax, [rbp+var_428] mov [rbp+var_468], eax lea rax, [rbp+var_420] mov [rbp+var_460], rax mov esi, [rbp+var_468] mov rdx, [rbp+var_460] lea rdi, [rbp+var_440] call buffer_append loc_1946F: mov [rbp+var_478], 1 mov [rbp+var_470], 0 mov esi, [rbp+var_478] mov rdx, [rbp+var_470] lea rdi, [rbp+var_440] call buffer_append mov eax, dword ptr [rbp+var_440] add eax, 0FFFFFFFFh mov dword ptr [rbp+var_440], eax mov rdi, [rbp+var_448] call _ferror cmp eax, 0 jz short loc_19516 mov rax, cs:stderr_ptr mov rdi, [rax] mov rdx, [rbp+var_18] lea rsi, aErrorReadingFi; "Error reading file: %s\n" mov al, 0 call _fprintf lea rdi, [rbp+var_440] call buffer_free mov dword ptr [rbp+var_488], 0 mov [rbp+var_480], 0 mov rax, [rbp+var_488] mov [rbp+var_440], rax mov rax, [rbp+var_480] mov [rbp+var_438], rax loc_19516: mov rax, [rbp+var_448] mov rcx, cs:stdin_ptr cmp rax, [rcx] jz short loc_19535 mov rdi, [rbp+var_448] call _fclose loc_19535: mov rax, [rbp+var_440] mov [rbp+var_10], rax mov rax, [rbp+var_438] mov [rbp+var_8], rax loc_1954B: mov eax, dword ptr [rbp+var_10] mov rdx, [rbp+var_8] add rsp, 490h pop rbp retn
long long bytes_read(const char *a1) { long long v2; // [rsp+0h] [rbp-490h] long long v3; // [rsp+8h] [rbp-488h] long long v4; // [rsp+50h] [rbp-440h] BYREF long long v5; // [rsp+58h] [rbp-438h] long long v6; // [rsp+68h] [rbp-428h] _BYTE v7[1032]; // [rsp+70h] [rbp-420h] BYREF const char *v8; // [rsp+478h] [rbp-18h] long long v9; // [rsp+480h] [rbp-10h] long long v10; // [rsp+488h] [rbp-8h] v8 = a1; memset(&v4, 0LL, 24LL); if ( !(unsigned int)strcmp(v8, "-") ) v2 = stdin; else v2 = fopen(v8, "rb"); if ( v2 ) { while ( 1 ) { v6 = fread(v7, 1LL, 1024LL, v2); if ( v6 != 1024 ) break; buffer_append((unsigned int *)&v4, 0x400u, (long long)v7); } if ( v6 ) buffer_append((unsigned int *)&v4, v6, (long long)v7); buffer_append((unsigned int *)&v4, 1u, 0LL); LODWORD(v4) = v4 - 1; if ( (unsigned int)ferror(v2) ) { fprintf(stderr, "Error reading file: %s\n", v8); buffer_free((long long)&v4); LODWORD(v3) = 0; v4 = v3; v5 = 0LL; } if ( v2 != stdin ) fclose(v2); v9 = v4; v10 = v5; } else { LODWORD(v9) = 0; v10 = 0LL; } return (unsigned int)v9; }
bytes_read: PUSH RBP MOV RBP,RSP SUB RSP,0x490 MOV qword ptr [RBP + -0x18],RDI LEA RDI,[RBP + -0x440] XOR ESI,ESI MOV EDX,0x18 CALL 0x00105110 MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[0x155000] CALL 0x00105250 CMP EAX,0x0 JZ 0x00119390 MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[0x154043] CALL 0x00105320 MOV qword ptr [RBP + -0x490],RAX JMP 0x001193a1 LAB_00119390: MOV RAX,qword ptr [0x0016eff0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x490],RAX LAB_001193a1: MOV RAX,qword ptr [RBP + -0x490] MOV qword ptr [RBP + -0x448],RAX CMP qword ptr [RBP + -0x448],0x0 JNZ 0x001193cd MOV dword ptr [RBP + -0x10],0x0 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0011954b LAB_001193cd: JMP 0x001193cf LAB_001193cf: LEA RDI,[RBP + -0x420] MOV RCX,qword ptr [RBP + -0x448] MOV ESI,0x1 MOV EDX,0x400 CALL 0x001051b0 MOV qword ptr [RBP + -0x428],RAX CMP RAX,0x400 JNZ 0x00119431 MOV RAX,qword ptr [RBP + -0x428] MOV dword ptr [RBP + -0x458],EAX LEA RAX,[RBP + -0x420] MOV qword ptr [RBP + -0x450],RAX MOV ESI,dword ptr [RBP + -0x458] MOV RDX,qword ptr [RBP + -0x450] LEA RDI,[RBP + -0x440] CALL 0x00118bd0 JMP 0x001193cf LAB_00119431: CMP qword ptr [RBP + -0x428],0x0 JBE 0x0011946f MOV RAX,qword ptr [RBP + -0x428] MOV dword ptr [RBP + -0x468],EAX LEA RAX,[RBP + -0x420] MOV qword ptr [RBP + -0x460],RAX MOV ESI,dword ptr [RBP + -0x468] MOV RDX,qword ptr [RBP + -0x460] LEA RDI,[RBP + -0x440] CALL 0x00118bd0 LAB_0011946f: MOV dword ptr [RBP + -0x478],0x1 MOV qword ptr [RBP + -0x470],0x0 MOV ESI,dword ptr [RBP + -0x478] MOV RDX,qword ptr [RBP + -0x470] LEA RDI,[RBP + -0x440] CALL 0x00118bd0 MOV EAX,dword ptr [RBP + -0x440] ADD EAX,-0x1 MOV dword ptr [RBP + -0x440],EAX MOV RDI,qword ptr [RBP + -0x448] CALL 0x00105220 CMP EAX,0x0 JZ 0x00119516 MOV RAX,qword ptr [0x0016efe0] MOV RDI,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x18] LEA RSI,[0x154046] MOV AL,0x0 CALL 0x001050d0 LEA RDI,[RBP + -0x440] CALL 0x00118d90 MOV dword ptr [RBP + -0x488],0x0 MOV qword ptr [RBP + -0x480],0x0 MOV RAX,qword ptr [RBP + -0x488] MOV qword ptr [RBP + -0x440],RAX MOV RAX,qword ptr [RBP + -0x480] MOV qword ptr [RBP + -0x438],RAX LAB_00119516: MOV RAX,qword ptr [RBP + -0x448] MOV RCX,qword ptr [0x0016eff0] CMP RAX,qword ptr [RCX] JZ 0x00119535 MOV RDI,qword ptr [RBP + -0x448] CALL 0x00105140 LAB_00119535: MOV RAX,qword ptr [RBP + -0x440] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x438] MOV qword ptr [RBP + -0x8],RAX LAB_0011954b: MOV EAX,dword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x8] ADD RSP,0x490 POP RBP RET
int1 [16] bytes_read(char *param_1) { int iVar1; int1 auVar2 [16]; FILE *local_498; uint uStack_48c; ulong local_448; int8 local_440; size_t local_430; int1 local_428 [1032]; char *local_20; ulong local_18; int8 local_10; local_20 = param_1; memset(&local_448,0,0x18); iVar1 = strcmp(local_20,"-"); if (iVar1 == 0) { local_498 = *(FILE **)PTR_stdin_0016eff0; } else { local_498 = fopen(local_20,"rb"); } if (local_498 == (FILE *)0x0) { local_18 = 0; local_10 = 0; } else { while (local_430 = fread(local_428,1,0x400,local_498), local_430 == 0x400) { buffer_append(&local_448,0x400,local_428); } if (local_430 != 0) { buffer_append(&local_448,local_430 & 0xffffffff,local_428); } buffer_append(&local_448,1,0); local_448 = CONCAT44(local_448._4_4_,(int)local_448 + -1); iVar1 = ferror(local_498); if (iVar1 != 0) { fprintf(*(FILE **)PTR_stderr_0016efe0,"Error reading file: %s\n",local_20); buffer_free(&local_448); local_448 = (ulong)uStack_48c << 0x20; local_440 = 0; } if (local_498 != *(FILE **)PTR_stdin_0016eff0) { fclose(local_498); } local_18 = local_448; local_10 = local_440; } auVar2._0_8_ = local_18 & 0xffffffff; auVar2._8_8_ = local_10; return auVar2; }
11,650
bytes_read
corpus-core[P]colibri-stateless/src/util/bytes.c
bytes_t bytes_read(char* filename) { unsigned char buffer[1024]; size_t bytesRead; buffer_t data = {0}; FILE* file = strcmp(filename, "-") ? fopen(filename, "rb") : stdin; if (file == NULL) return NULL_BYTES; while ((bytesRead = fread(buffer, 1, 1024, file)) == sizeof(buffer)) buffer_append(&data, bytes(buffer, bytesRead)); if (bytesRead > 0) buffer_append(&data, bytes(buffer, bytesRead)); buffer_append(&data, bytes(NULL, 1)); data.data.len--; if (ferror(file)) { fprintf(stderr, "Error reading file: %s\n", filename); buffer_free(&data); data.data = NULL_BYTES; } #ifndef __clang_analyzer__ if (file != stdin) #endif fclose(file); return data.data; }
O1
c
bytes_read: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x428, %rsp # imm = 0x428 movq %rdi, %rbx xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) movq $0x0, 0x10(%rsp) leaq 0x2cf8e(%rip), %rsi # 0x3fe20 callq 0x5280 testl %eax, %eax je 0x12eaf leaq 0x2c151(%rip), %rsi # 0x3eff3 movq %rbx, %rdi callq 0x5330 movq %rax, %r14 jmp 0x12eb9 movq 0x4713a(%rip), %rax # 0x59ff0 movq (%rax), %r14 testq %r14, %r14 je 0x12f4c leaq 0x20(%rsp), %r15 movq %rsp, %r12 movl $0x1, %esi movl $0x400, %edx # imm = 0x400 movq %r15, %rdi movq %r14, %rcx callq 0x51d0 cmpq $0x400, %rax # imm = 0x400 jne 0x12ef9 movq %r12, %rdi movl $0x400, %esi # imm = 0x400 movq %r15, %rdx callq 0x1294d jmp 0x12eca testq %rax, %rax je 0x12f0d movq %rsp, %rdi leaq 0x20(%rsp), %rdx movl %eax, %esi callq 0x1294d movq %rsp, %r15 movq %r15, %rdi movl $0x1, %esi xorl %edx, %edx callq 0x1294d decl (%r15) movq %r14, %rdi callq 0x5250 testl %eax, %eax jne 0x12f5f movq 0x470bb(%rip), %rax # 0x59ff0 cmpq (%rax), %r14 je 0x12f42 movq %r14, %rdi callq 0x5160 movl (%rsp), %eax movq 0x8(%rsp), %rdx jmp 0x12f50 xorl %eax, %eax xorl %edx, %edx addq $0x428, %rsp # imm = 0x428 popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rsp, %rsi movq %rbx, %rdi callq 0x54a0 jmp 0x12f2e
bytes_read: push r15 push r14 push r12 push rbx sub rsp, 428h mov rbx, rdi xorps xmm0, xmm0 movaps [rsp+448h+var_448], xmm0 mov [rsp+448h+var_438], 0 lea rsi, aH2cOversizeDst+10h; "-" call _strcmp test eax, eax jz short loc_12EAF lea rsi, aRb; "rb" mov rdi, rbx call _fopen mov r14, rax jmp short loc_12EB9 loc_12EAF: mov rax, cs:stdin_ptr mov r14, [rax] loc_12EB9: test r14, r14 jz loc_12F4C lea r15, [rsp+448h+var_428] mov r12, rsp loc_12ECA: mov esi, 1 mov edx, 400h mov rdi, r15 mov rcx, r14 call _fread cmp rax, 400h jnz short loc_12EF9 mov rdi, r12 mov esi, 400h mov rdx, r15 call buffer_append jmp short loc_12ECA loc_12EF9: test rax, rax jz short loc_12F0D mov rdi, rsp lea rdx, [rsp+448h+var_428] mov esi, eax call buffer_append loc_12F0D: mov r15, rsp mov rdi, r15 mov esi, 1 xor edx, edx call buffer_append dec dword ptr [r15] mov rdi, r14 call _ferror test eax, eax jnz short loc_12F5F loc_12F2E: mov rax, cs:stdin_ptr cmp r14, [rax] jz short loc_12F42 mov rdi, r14 call _fclose loc_12F42: mov eax, dword ptr [rsp+448h+var_448] mov rdx, qword ptr [rsp+448h+var_448+8] jmp short loc_12F50 loc_12F4C: xor eax, eax xor edx, edx loc_12F50: add rsp, 428h pop rbx pop r12 pop r14 pop r15 retn loc_12F5F: mov rsi, rsp mov rdi, rbx call bytes_read_cold_1 jmp short loc_12F2E
long long bytes_read(const char *a1) { long long v1; // r14 long long v2; // rax __int128 v4; // [rsp+0h] [rbp-448h] BYREF long long v5; // [rsp+10h] [rbp-438h] _BYTE v6[1064]; // [rsp+20h] [rbp-428h] BYREF v4 = 0LL; v5 = 0LL; if ( !(unsigned int)strcmp(a1, "-") ) v1 = stdin; else v1 = fopen(a1, "rb"); if ( !v1 ) return 0LL; while ( 1 ) { v2 = fread(v6, 1LL, 1024LL, v1); if ( v2 != 1024 ) break; buffer_append((unsigned int *)&v4, 0x400u, (long long)v6); } if ( v2 ) buffer_append((unsigned int *)&v4, v2, (long long)v6); buffer_append((unsigned int *)&v4, 1u, 0LL); LODWORD(v4) = v4 - 1; if ( (unsigned int)ferror(v1) ) bytes_read_cold_1(a1, (long long)&v4); if ( v1 != stdin ) fclose(v1); return (unsigned int)v4; }
bytes_read: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x428 MOV RBX,RDI XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x10],0x0 LEA RSI,[0x13fe20] CALL 0x00105280 TEST EAX,EAX JZ 0x00112eaf LEA RSI,[0x13eff3] MOV RDI,RBX CALL 0x00105330 MOV R14,RAX JMP 0x00112eb9 LAB_00112eaf: MOV RAX,qword ptr [0x00159ff0] MOV R14,qword ptr [RAX] LAB_00112eb9: TEST R14,R14 JZ 0x00112f4c LEA R15,[RSP + 0x20] MOV R12,RSP LAB_00112eca: MOV ESI,0x1 MOV EDX,0x400 MOV RDI,R15 MOV RCX,R14 CALL 0x001051d0 CMP RAX,0x400 JNZ 0x00112ef9 MOV RDI,R12 MOV ESI,0x400 MOV RDX,R15 CALL 0x0011294d JMP 0x00112eca LAB_00112ef9: TEST RAX,RAX JZ 0x00112f0d MOV RDI,RSP LEA RDX,[RSP + 0x20] MOV ESI,EAX CALL 0x0011294d LAB_00112f0d: MOV R15,RSP MOV RDI,R15 MOV ESI,0x1 XOR EDX,EDX CALL 0x0011294d DEC dword ptr [R15] MOV RDI,R14 CALL 0x00105250 TEST EAX,EAX JNZ 0x00112f5f LAB_00112f2e: MOV RAX,qword ptr [0x00159ff0] CMP R14,qword ptr [RAX] JZ 0x00112f42 MOV RDI,R14 CALL 0x00105160 LAB_00112f42: MOV EAX,dword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] JMP 0x00112f50 LAB_00112f4c: XOR EAX,EAX XOR EDX,EDX LAB_00112f50: ADD RSP,0x428 POP RBX POP R12 POP R14 POP R15 RET LAB_00112f5f: MOV RSI,RSP MOV RDI,RBX CALL 0x001054a0 JMP 0x00112f2e
int1 [16] bytes_read(char *param_1) { int iVar1; FILE *__stream; size_t sVar2; int1 auVar3 [16]; ulong local_448; int8 uStack_440; int8 local_438; int1 local_428 [1032]; local_448 = 0; uStack_440 = 0; local_438 = 0; iVar1 = strcmp(param_1,"-"); if (iVar1 == 0) { __stream = *(FILE **)PTR_stdin_00159ff0; } else { __stream = fopen(param_1,"rb"); } if (__stream == (FILE *)0x0) { local_448 = 0; uStack_440 = 0; } else { while( true ) { sVar2 = fread(local_428,1,0x400,__stream); if (sVar2 != 0x400) break; buffer_append(&local_448,0x400,local_428); } if (sVar2 != 0) { buffer_append(&local_448,sVar2 & 0xffffffff,local_428); } buffer_append(&local_448,1,0); local_448 = CONCAT44(local_448._4_4_,(int)local_448 + -1); iVar1 = ferror(__stream); if (iVar1 != 0) { bytes_read_cold_1(param_1,&local_448); } if (__stream != *(FILE **)PTR_stdin_00159ff0) { fclose(__stream); } local_448 = local_448 & 0xffffffff; } auVar3._8_8_ = uStack_440; auVar3._0_8_ = local_448; return auVar3; }
11,651
bytes_read
corpus-core[P]colibri-stateless/src/util/bytes.c
bytes_t bytes_read(char* filename) { unsigned char buffer[1024]; size_t bytesRead; buffer_t data = {0}; FILE* file = strcmp(filename, "-") ? fopen(filename, "rb") : stdin; if (file == NULL) return NULL_BYTES; while ((bytesRead = fread(buffer, 1, 1024, file)) == sizeof(buffer)) buffer_append(&data, bytes(buffer, bytesRead)); if (bytesRead > 0) buffer_append(&data, bytes(buffer, bytesRead)); buffer_append(&data, bytes(NULL, 1)); data.data.len--; if (ferror(file)) { fprintf(stderr, "Error reading file: %s\n", filename); buffer_free(&data); data.data = NULL_BYTES; } #ifndef __clang_analyzer__ if (file != stdin) #endif fclose(file); return data.data; }
O3
c
bytes_read: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x420, %rsp # imm = 0x420 movq %rdi, %rbx xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) movq $0x0, 0x10(%rsp) cmpb $0x2d, (%rdi) jne 0x12ba0 cmpb $0x0, 0x1(%rbx) je 0x12c63 leaq 0x2c448(%rip), %rsi # 0x3efef movq %rbx, %rdi callq 0x5330 movq %rax, %r14 testq %r14, %r14 je 0x12c4b leaq 0x20(%rsp), %r15 movq %rsp, %r12 movl $0x1, %esi movl $0x400, %edx # imm = 0x400 movq %r15, %rdi movq %r14, %rcx callq 0x51d0 cmpq $0x400, %rax # imm = 0x400 jne 0x12bf2 movq %r12, %rdi movl $0x400, %esi # imm = 0x400 movq %r15, %rdx callq 0x12651 jmp 0x12bc3 testq %rax, %rax je 0x12c06 movq %rsp, %rdi leaq 0x20(%rsp), %rdx movl %eax, %esi callq 0x12651 xorl %r15d, %r15d movq %rsp, %r12 movq %r12, %rdi movl $0x1, %esi xorl %edx, %edx callq 0x12651 movl (%r12), %ebp movq %r14, %rdi callq 0x5250 testl %eax, %eax jne 0x12c72 decl %ebp movl %ebp, %r15d movq 0x473b9(%rip), %rax # 0x59ff0 cmpq (%rax), %r14 je 0x12c44 movq %r14, %rdi callq 0x5160 movq 0x8(%rsp), %rdx jmp 0x12c50 xorl %r15d, %r15d xorl %edx, %edx movl %r15d, %eax addq $0x420, %rsp # imm = 0x420 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq 0x47386(%rip), %rax # 0x59ff0 movq (%rax), %r14 jmp 0x12bb2 movq %rsp, %rsi movq %rbx, %rdi callq 0x54a0 jmp 0x12c30
bytes_read: push rbp push r15 push r14 push r12 push rbx sub rsp, 420h mov rbx, rdi xorps xmm0, xmm0 movaps [rsp+448h+var_448], xmm0 mov [rsp+448h+var_438], 0 cmp byte ptr [rdi], 2Dh ; '-' jnz short loc_12BA0 cmp byte ptr [rbx+1], 0 jz loc_12C63 loc_12BA0: lea rsi, aRb; "rb" mov rdi, rbx call _fopen mov r14, rax loc_12BB2: test r14, r14 jz loc_12C4B lea r15, [rsp+448h+var_428] mov r12, rsp loc_12BC3: mov esi, 1 mov edx, 400h mov rdi, r15 mov rcx, r14 call _fread cmp rax, 400h jnz short loc_12BF2 mov rdi, r12 mov esi, 400h mov rdx, r15 call buffer_append jmp short loc_12BC3 loc_12BF2: test rax, rax jz short loc_12C06 mov rdi, rsp lea rdx, [rsp+448h+var_428] mov esi, eax call buffer_append loc_12C06: xor r15d, r15d mov r12, rsp mov rdi, r12 mov esi, 1 xor edx, edx call buffer_append mov ebp, [r12] mov rdi, r14 call _ferror test eax, eax jnz short loc_12C72 dec ebp mov r15d, ebp loc_12C30: mov rax, cs:stdin_ptr cmp r14, [rax] jz short loc_12C44 mov rdi, r14 call _fclose loc_12C44: mov rdx, qword ptr [rsp+448h+var_448+8] jmp short loc_12C50 loc_12C4B: xor r15d, r15d xor edx, edx loc_12C50: mov eax, r15d add rsp, 420h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_12C63: mov rax, cs:stdin_ptr mov r14, [rax] jmp loc_12BB2 loc_12C72: mov rsi, rsp mov rdi, rbx call bytes_read_cold_1 jmp short loc_12C30
long long bytes_read(long long a1) { long long v1; // r14 long long v2; // rax unsigned int v3; // r15d int v4; // ebp __int128 v6; // [rsp+0h] [rbp-448h] BYREF long long v7; // [rsp+10h] [rbp-438h] _BYTE v8[1064]; // [rsp+20h] [rbp-428h] BYREF v6 = 0LL; v7 = 0LL; if ( *(_BYTE *)a1 == 45 && !*(_BYTE *)(a1 + 1) ) v1 = stdin; else v1 = fopen(a1, "rb"); if ( v1 ) { while ( 1 ) { v2 = fread(v8, 1LL, 1024LL, v1); if ( v2 != 1024 ) break; buffer_append((unsigned int *)&v6, 0x400u, (long long)v8); } if ( v2 ) buffer_append((unsigned int *)&v6, v2, (long long)v8); v3 = 0; buffer_append((unsigned int *)&v6, 1u, 0LL); v4 = v6; if ( (unsigned int)ferror(v1) ) bytes_read_cold_1((const char *)a1, (long long)&v6); else v3 = v4 - 1; if ( v1 != stdin ) fclose(v1); } else { return 0; } return v3; }
bytes_read: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x420 MOV RBX,RDI XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x10],0x0 CMP byte ptr [RDI],0x2d JNZ 0x00112ba0 CMP byte ptr [RBX + 0x1],0x0 JZ 0x00112c63 LAB_00112ba0: LEA RSI,[0x13efef] MOV RDI,RBX CALL 0x00105330 MOV R14,RAX LAB_00112bb2: TEST R14,R14 JZ 0x00112c4b LEA R15,[RSP + 0x20] MOV R12,RSP LAB_00112bc3: MOV ESI,0x1 MOV EDX,0x400 MOV RDI,R15 MOV RCX,R14 CALL 0x001051d0 CMP RAX,0x400 JNZ 0x00112bf2 MOV RDI,R12 MOV ESI,0x400 MOV RDX,R15 CALL 0x00112651 JMP 0x00112bc3 LAB_00112bf2: TEST RAX,RAX JZ 0x00112c06 MOV RDI,RSP LEA RDX,[RSP + 0x20] MOV ESI,EAX CALL 0x00112651 LAB_00112c06: XOR R15D,R15D MOV R12,RSP MOV RDI,R12 MOV ESI,0x1 XOR EDX,EDX CALL 0x00112651 MOV EBP,dword ptr [R12] MOV RDI,R14 CALL 0x00105250 TEST EAX,EAX JNZ 0x00112c72 DEC EBP MOV R15D,EBP LAB_00112c30: MOV RAX,qword ptr [0x00159ff0] CMP R14,qword ptr [RAX] JZ 0x00112c44 MOV RDI,R14 CALL 0x00105160 LAB_00112c44: MOV RDX,qword ptr [RSP + 0x8] JMP 0x00112c50 LAB_00112c4b: XOR R15D,R15D XOR EDX,EDX LAB_00112c50: MOV EAX,R15D ADD RSP,0x420 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00112c63: MOV RAX,qword ptr [0x00159ff0] MOV R14,qword ptr [RAX] JMP 0x00112bb2 LAB_00112c72: MOV RSI,RSP MOV RDI,RBX CALL 0x001054a0 JMP 0x00112c30
int1 [16] bytes_read(char *param_1) { int iVar1; int iVar2; FILE *__stream; size_t sVar3; uint uVar4; int1 auVar5 [16]; int8 local_448; int8 uStack_440; int8 local_438; int1 local_428 [1024]; local_448 = 0; uStack_440 = 0; local_438 = 0; if ((*param_1 == '-') && (param_1[1] == '\0')) { __stream = *(FILE **)PTR_stdin_00159ff0; } else { __stream = fopen(param_1,"rb"); } if (__stream == (FILE *)0x0) { uVar4 = 0; uStack_440 = 0; } else { while (sVar3 = fread(local_428,1,0x400,__stream), sVar3 == 0x400) { buffer_append(&local_448,0x400,local_428); } if (sVar3 != 0) { buffer_append(&local_448,sVar3 & 0xffffffff,local_428); } uVar4 = 0; buffer_append(&local_448,1,0); iVar1 = (int)local_448; iVar2 = ferror(__stream); if (iVar2 == 0) { uVar4 = iVar1 - 1; } else { bytes_read_cold_1(param_1,&local_448); } if (__stream != *(FILE **)PTR_stdin_00159ff0) { fclose(__stream); } } auVar5._4_4_ = 0; auVar5._0_4_ = uVar4; auVar5._8_8_ = uStack_440; return auVar5; }
11,652
mysql_local_infile_end
eloqsql/libmariadb/libmariadb/ma_loaddata.c
static void mysql_local_infile_end(void *ptr) { MYSQL_INFILE_INFO *info = (MYSQL_INFILE_INFO *)ptr; if (info) { if (info->fp) ma_close(info->fp); free(ptr); } return; }
O3
c
mysql_local_infile_end: testq %rdi, %rdi je 0x258a5 pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx movq (%rdi), %rdi testq %rdi, %rdi je 0x25897 callq 0x2a9d8 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %rbp jmp 0x13580 retq
mysql_local_infile_end: test rdi, rdi jz short locret_258A5 push rbp mov rbp, rsp push rbx push rax mov rbx, rdi mov rdi, [rdi] test rdi, rdi jz short loc_25897 call ma_close loc_25897: mov rdi, rbx add rsp, 8 pop rbx pop rbp jmp _free locret_258A5: retn
long long mysql_local_infile_end(long long *a1) { long long v2; // rdi long long result; // rax if ( a1 ) { v2 = *a1; if ( v2 ) ma_close(v2); return free(a1); } return result; }
mysql_local_infile_end: TEST RDI,RDI JZ 0x001258a5 PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI MOV RDI,qword ptr [RDI] TEST RDI,RDI JZ 0x00125897 CALL 0x0012a9d8 LAB_00125897: MOV RDI,RBX ADD RSP,0x8 POP RBX POP RBP JMP 0x00113580 LAB_001258a5: RET
void mysql_local_infile_end(long *param_1) { if (param_1 != (long *)0x0) { if (*param_1 != 0) { ma_close(); } free(param_1); return; } return; }
11,653
minja::simple_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&)
monkey531[P]llama/common/minja.hpp
static Value simple_function(const std::string & fn_name, const std::vector<std::string> & params, const std::function<Value(const std::shared_ptr<Context> &, Value & args)> & fn) { std::map<std::string, size_t> named_positions; for (size_t i = 0, n = params.size(); i < n; i++) named_positions[params[i]] = i; return Value::callable([=](const std::shared_ptr<Context> & context, ArgumentsValue & args) -> Value { auto args_obj = Value::object(); std::vector<bool> provided_args(params.size()); for (size_t i = 0, n = args.args.size(); i < n; i++) { auto & arg = args.args[i]; if (i < params.size()) { args_obj.set(params[i], arg); provided_args[i] = true; } else { throw std::runtime_error("Too many positional params for " + fn_name); } } for (auto & [name, value] : args.kwargs) { auto named_pos_it = named_positions.find(name); if (named_pos_it == named_positions.end()) { throw std::runtime_error("Unknown argument " + name + " for function " + fn_name); } provided_args[named_pos_it->second] = true; args_obj.set(name, value); } return fn(context, args_obj); }); }
O3
cpp
minja::simple_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movq %rcx, 0x28(%rsp) movq %rdx, %r15 movq %rsi, %r14 movq %rdi, 0x20(%rsp) leaq 0xc0(%rsp), %rax movl $0x0, (%rax) xorl %ecx, %ecx movq %rcx, 0x8(%rax) movq %rax, 0x10(%rax) movq %rax, 0x18(%rax) movq %rcx, 0x20(%rax) movq 0x8(%rdx), %rbp subq (%rdx), %rbp je 0x7cd7e sarq $0x5, %rbp cmpq $0x1, %rbp adcq $0x0, %rbp xorl %ebx, %ebx leaq 0xb8(%rsp), %r13 xorl %r12d, %r12d movq (%r15), %rsi addq %rbx, %rsi movq %r13, %rdi callq 0xb0b1e movq %r12, (%rax) incq %r12 addq $0x20, %rbx cmpq %r12, %rbp jne 0x7cd61 leaq 0x30(%rsp), %rdi movq %r15, %rsi callq 0x5997c leaq 0x48(%rsp), %rdi leaq 0x58(%rsp), %r13 movq %r13, -0x10(%r13) movq (%r14), %rsi movq 0x8(%r14), %rdx addq %rsi, %rdx callq 0x268c4 leaq 0x68(%rsp), %r14 leaq 0xb8(%rsp), %rsi movq %r14, %rdi callq 0xb0f78 leaq 0x98(%rsp), %r15 movq %r15, %rdi movq 0x28(%rsp), %rsi callq 0xb0b9a xorps %xmm0, %xmm0 movaps %xmm0, 0x10(%rsp) movaps %xmm0, (%rsp) movl $0x88, %edi callq 0x1b900 movq %rax, %r12 leaq 0x30(%rsp), %rsi movq %rax, %rdi callq 0x5997c leaq 0x18(%r12), %rdi leaq 0x28(%r12), %rbp movq %rbp, 0x18(%r12) movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx addq %rsi, %rdx callq 0x268c4 leaq 0x40(%r12), %rax movq 0x78(%rsp), %rdx testq %rdx, %rdx je 0x7ce65 leaq 0x70(%rsp), %rdi movl (%rdi), %ecx movq %rdx, 0x48(%r12) movq 0x10(%rdi), %r8 movq 0x18(%rdi), %rsi movq %rax, 0x8(%rdx) leaq 0x90(%rsp), %rdx movq (%rdx), %rax movq %rax, 0x60(%r12) movq $0x0, -0x18(%rdx) movq %rdi, -0x10(%rdx) movq %rdi, -0x8(%rdx) movq %r8, %rax jmp 0x7ce78 movq $0x0, 0x48(%r12) leaq 0x60(%r12), %rdx xorl %ecx, %ecx movq %rax, %rsi movq %rax, 0x50(%r12) movq %rsi, 0x58(%r12) movq $0x0, (%rdx) movl %ecx, 0x40(%r12) leaq 0x68(%r12), %rdi movq %r15, %rsi callq 0xb0b9a movq %rsp, %rsi movq %r12, (%rsi) leaq 0x1c8(%rip), %rax # 0x7d070 movq %rax, 0x18(%rsi) leaq 0x83b(%rip), %rax # 0x7d6ee movq %rax, 0x10(%rsi) movq 0x20(%rsp), %rdi callq 0x9a738 movq 0x10(%rsp), %rax testq %rax, %rax je 0x7ced8 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0xa8(%rsp), %rax testq %rax, %rax je 0x7cef2 movq %r15, %rdi movq %r15, %rsi movl $0x3, %edx callq *%rax movq %r14, %rdi callq 0xb11da movq 0x48(%rsp), %rdi cmpq %r13, %rdi je 0x7cf11 movq 0x58(%rsp), %rsi incq %rsi callq 0x1b930 leaq 0x30(%rsp), %rdi callq 0x25d5c leaq 0xb8(%rsp), %rdi callq 0xb11da addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x7cfb9 jmp 0x7cfb9 movq %rax, %rbx movq 0x10(%rsp), %rax testq %rax, %rax je 0x7cfc4 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0x7cfc4 jmp 0x7cfb9 movq %rax, %rbx movq %r12, %rdi addq $0x38, %rdi callq 0xb11da movq 0x18(%r12), %rdi cmpq %rbp, %rdi je 0x7cf86 movq (%rbp), %rsi incq %rsi callq 0x1b930 jmp 0x7cf86 movq %rax, %rbx movq %r12, %rdi callq 0x25d5c jmp 0x7cf93 movq %rax, %rbx movl $0x88, %esi movq %r12, %rdi callq 0x1b930 movq 0x10(%rsp), %rax testq %rax, %rax je 0x7cfc4 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0x7cfc4 movq %rax, %rdi callq 0x26123 movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x7d022 jmp 0x7d00d movq %rax, %rbx movq %r14, %rdi callq 0xb11da jmp 0x7cfe0 movq %rax, %rbx movq 0x48(%rsp), %rdi cmpq %r13, %rdi je 0x7cffc movq 0x58(%rsp), %rsi incq %rsi callq 0x1b930 jmp 0x7cffc movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x25d5c jmp 0x7d00d jmp 0x7d00a movq %rax, %rbx leaq 0xb8(%rsp), %rdi callq 0xb11da movq %rbx, %rdi callq 0x1c0d0
_ZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov [rsp+118h+var_F0], rcx mov r15, rdx mov r14, rsi mov [rsp+118h+var_F8], rdi lea rax, [rsp+118h+var_58] mov dword ptr [rax], 0 xor ecx, ecx mov [rax+8], rcx mov [rax+10h], rax mov [rax+18h], rax mov [rax+20h], rcx mov rbp, [rdx+8] sub rbp, [rdx] jz short loc_7CD7E sar rbp, 5 cmp rbp, 1 adc rbp, 0 xor ebx, ebx lea r13, [rsp+118h+var_60] xor r12d, r12d loc_7CD61: mov rsi, [r15] add rsi, rbx mov rdi, r13 call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEEixERS9_; std::map<std::string,ulong>::operator[](std::string const&) mov [rax], r12 inc r12 add rbx, 20h ; ' ' cmp rbp, r12 jnz short loc_7CD61 loc_7CD7E: lea rdi, [rsp+118h+var_E8] mov rsi, r15 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) lea rdi, [rsp+118h+var_D0] lea r13, [rsp+118h+var_C0] mov [r13-10h], r13 mov rsi, [r14] mov rdx, [r14+8] add rdx, rsi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea r14, [rsp+118h+var_B0] lea rsi, [rsp+118h+var_60] mov rdi, r14 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EEC2ERKSE_; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::_Rb_tree(std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>> const&) lea r15, [rsp+118h+var_80] mov rdi, r15 mov rsi, [rsp+118h+var_F0] call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERS1_EEC2ERKS9_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&) xorps xmm0, xmm0 movaps [rsp+118h+var_108], xmm0 movaps [rsp+118h+var_118], xmm0 mov edi, 88h; unsigned __int64 call __Znwm; operator new(ulong) mov r12, rax lea rsi, [rsp+118h+var_E8] mov rdi, rax call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) lea rdi, [r12+18h] lea rbp, [r12+28h] mov [r12+18h], rbp mov rsi, [rsp+118h+var_D0] mov rdx, [rsp+118h+var_C8] add rdx, rsi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rax, [r12+40h] mov rdx, [rsp+118h+var_A0] test rdx, rdx jz short loc_7CE65 lea rdi, [rsp+118h+var_A8] mov ecx, [rdi] mov [r12+48h], rdx mov r8, [rdi+10h] mov rsi, [rdi+18h] mov [rdx+8], rax lea rdx, [rsp+118h+var_88] mov rax, [rdx] mov [r12+60h], rax mov qword ptr [rdx-18h], 0 mov [rdx-10h], rdi mov [rdx-8], rdi mov rax, r8 jmp short loc_7CE78 loc_7CE65: mov qword ptr [r12+48h], 0 lea rdx, [r12+60h] xor ecx, ecx mov rsi, rax loc_7CE78: mov [r12+50h], rax mov [r12+58h], rsi mov qword ptr [rdx], 0 mov [r12+40h], ecx lea rdi, [r12+68h] mov rsi, r15 call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERS1_EEC2ERKS9_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&) mov rsi, rsp mov [rsi], r12 lea rax, _ZNSt17_Function_handlerIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEZNS0_L15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISF_SaISF_EERKSt8functionIFS1_S6_RS1_EEE3$_0E9_M_invokeERKSt9_Any_dataS6_S8_; std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_invoke(std::_Any_data const&,std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &) mov [rsi+18h], rax lea rax, _ZNSt17_Function_handlerIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEZNS0_L15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISF_SaISF_EERKSt8functionIFS1_S6_RS1_EEE3$_0E10_M_managerERSt9_Any_dataRKSV_St18_Manager_operation; std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsi+10h], rax mov rdi, [rsp+118h+var_F8] call _ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE; minja::Value::callable(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&) mov rax, qword ptr [rsp+118h+var_108] test rax, rax jz short loc_7CED8 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_7CED8: mov rax, [rsp+118h+var_70] test rax, rax jz short loc_7CEF2 mov rdi, r15 mov rsi, r15 mov edx, 3 call rax loc_7CEF2: mov rdi, r14 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree() mov rdi, [rsp+118h+var_D0]; void * cmp rdi, r13 jz short loc_7CF11 mov rsi, [rsp+118h+var_C0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7CF11: lea rdi, [rsp+118h+var_E8] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rdi, [rsp+118h+var_60] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree() add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_7CFB9 jmp short loc_7CFB9 mov rbx, rax mov rax, qword ptr [rsp+118h+var_108] test rax, rax jz short loc_7CFC4 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax jmp short loc_7CFC4 jmp short loc_7CFB9 mov rbx, rax mov rdi, r12 add rdi, 38h ; '8' call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree() mov rdi, [r12+18h]; void * cmp rdi, rbp jz short loc_7CF86 mov rsi, [rbp+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_7CF86 mov rbx, rax loc_7CF86: mov rdi, r12 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp short loc_7CF93 mov rbx, rax loc_7CF93: mov esi, 88h; unsigned __int64 mov rdi, r12; void * call __ZdlPvm; operator delete(void *,ulong) mov rax, qword ptr [rsp+118h+var_108] test rax, rax jz short loc_7CFC4 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax jmp short loc_7CFC4 loc_7CFB9: mov rdi, rax call __clang_call_terminate mov rbx, rax loc_7CFC4: lea rdi, [rsp+118h+var_E8] call _ZZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EEEN3$_0D2Ev; minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0() jmp short loc_7D00D mov rbx, rax mov rdi, r14 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree() jmp short loc_7CFE0 mov rbx, rax loc_7CFE0: mov rdi, [rsp+118h+var_D0]; void * cmp rdi, r13 jz short loc_7CFFC mov rsi, [rsp+118h+var_C0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_7CFFC mov rbx, rax loc_7CFFC: lea rdi, [rsp+118h+var_E8] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp short loc_7D00D jmp short $+2 loc_7D00A: mov rbx, rax loc_7D00D: lea rdi, [rsp+118h+var_60] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree() mov rdi, rbx call __Unwind_Resume
long long minja::simple_function(long long a1, long long a2, _QWORD *a3, long long a4) { long long v5; // rbp long long v6; // rbp long long v7; // rbx long long v8; // r12 long long v9; // r12 long long v10; // rax long long v11; // rdx int v12; // ecx int *v13; // r8 int *v14; // rsi long long *v15; // rdx int v16; // edx int v17; // ecx int v18; // r8d int v19; // r9d __int128 v21; // [rsp+0h] [rbp-118h] BYREF __int128 v22; // [rsp+10h] [rbp-108h] long long v23; // [rsp+20h] [rbp-F8h] long long v24; // [rsp+28h] [rbp-F0h] _QWORD v25[3]; // [rsp+30h] [rbp-E8h] BYREF void *v26[2]; // [rsp+48h] [rbp-D0h] BYREF _QWORD v27[2]; // [rsp+58h] [rbp-C0h] BYREF _BYTE v28[8]; // [rsp+68h] [rbp-B0h] BYREF int v29; // [rsp+70h] [rbp-A8h] BYREF long long v30; // [rsp+78h] [rbp-A0h] int *v31; // [rsp+80h] [rbp-98h] int *v32; // [rsp+88h] [rbp-90h] long long v33; // [rsp+90h] [rbp-88h] BYREF _BYTE v34[16]; // [rsp+98h] [rbp-80h] BYREF void ( *v35)(_BYTE *, _BYTE *, long long); // [rsp+A8h] [rbp-70h] _BYTE v36[8]; // [rsp+B8h] [rbp-60h] BYREF int v37; // [rsp+C0h] [rbp-58h] BYREF long long v38; // [rsp+C8h] [rbp-50h] int *v39; // [rsp+D0h] [rbp-48h] int *v40; // [rsp+D8h] [rbp-40h] long long v41; // [rsp+E0h] [rbp-38h] v24 = a4; v23 = a1; v37 = 0; v38 = 0LL; v39 = &v37; v40 = &v37; v41 = 0LL; v5 = a3[1] - *a3; if ( v5 ) { v6 = (v5 >> 5 == 0) + (v5 >> 5); v7 = 0LL; v8 = 0LL; do { *(_QWORD *)std::map<std::string,unsigned long>::operator[](v36, v7 + *a3) = v8++; v7 += 32LL; } while ( v6 != v8 ); } std::vector<std::string>::vector((long long)v25, a3); v26[0] = v27; std::string::_M_construct<char *>((long long)v26, *(_BYTE **)a2, *(_QWORD *)a2 + *(_QWORD *)(a2 + 8)); std::_Rb_tree<std::string,std::pair<std::string const,unsigned long>,std::_Select1st<std::pair<std::string const,unsigned long>>,std::less<std::string>,std::allocator<std::pair<std::string const,unsigned long>>>::_Rb_tree( v28, v36); std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(v34, v24); v22 = 0LL; v21 = 0LL; v9 = operator new(0x88uLL); std::vector<std::string>::vector(v9, v25); *(_QWORD *)(v9 + 24) = v9 + 40; std::string::_M_construct<char *>(v9 + 24, (_BYTE *)v26[0], (long long)v26[0] + (unsigned long long)v26[1]); v10 = v9 + 64; v11 = v30; if ( v30 ) { v12 = v29; *(_QWORD *)(v9 + 72) = v30; v13 = v31; v14 = v32; *(_QWORD *)(v11 + 8) = v10; v15 = &v33; *(_QWORD *)(v9 + 96) = v33; v30 = 0LL; v31 = &v29; v32 = &v29; v10 = (long long)v13; } else { *(_QWORD *)(v9 + 72) = 0LL; v15 = (long long *)(v9 + 96); v12 = 0; v14 = (int *)(v9 + 64); } *(_QWORD *)(v9 + 80) = v10; *(_QWORD *)(v9 + 88) = v14; *v15 = 0LL; *(_DWORD *)(v9 + 64) = v12; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(v9 + 104, v34); *((_QWORD *)&v22 + 1) = std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_invoke; *(_QWORD *)&v22 = std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_manager; minja::Value::callable(v23, (unsigned int)&v21, v16, v17, v18, v19, v9, *((long long *)&v21 + 1)); if ( (_QWORD)v22 ) ((void ( *)(__int128 *, __int128 *, long long))v22)(&v21, &v21, 3LL); if ( v35 ) v35(v34, v34, 3LL); std::_Rb_tree<std::string,std::pair<std::string const,unsigned long>,std::_Select1st<std::pair<std::string const,unsigned long>>,std::less<std::string>,std::allocator<std::pair<std::string const,unsigned long>>>::~_Rb_tree(v28); if ( v26[0] != v27 ) operator delete(v26[0], v27[0] + 1LL); std::vector<std::string>::~vector((long long)v25); return std::_Rb_tree<std::string,std::pair<std::string const,unsigned long>,std::_Select1st<std::pair<std::string const,unsigned long>>,std::less<std::string>,std::allocator<std::pair<std::string const,unsigned long>>>::~_Rb_tree(v36); }
simple_function: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV qword ptr [RSP + 0x28],RCX MOV R15,RDX MOV R14,RSI MOV qword ptr [RSP + 0x20],RDI LEA RAX,[RSP + 0xc0] MOV dword ptr [RAX],0x0 XOR ECX,ECX MOV qword ptr [RAX + 0x8],RCX MOV qword ptr [RAX + 0x10],RAX MOV qword ptr [RAX + 0x18],RAX MOV qword ptr [RAX + 0x20],RCX MOV RBP,qword ptr [RDX + 0x8] SUB RBP,qword ptr [RDX] JZ 0x0017cd7e SAR RBP,0x5 CMP RBP,0x1 ADC RBP,0x0 XOR EBX,EBX LEA R13,[RSP + 0xb8] XOR R12D,R12D LAB_0017cd61: MOV RSI,qword ptr [R15] ADD RSI,RBX LAB_0017cd67: MOV RDI,R13 CALL 0x001b0b1e MOV qword ptr [RAX],R12 INC R12 ADD RBX,0x20 CMP RBP,R12 JNZ 0x0017cd61 LAB_0017cd7e: LEA RDI,[RSP + 0x30] MOV RSI,R15 CALL 0x0015997c LEA RDI,[RSP + 0x48] LEA R13,[RSP + 0x58] MOV qword ptr [R13 + -0x10],R13 MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] ADD RDX,RSI LAB_0017cda3: CALL 0x001268c4 LEA R14,[RSP + 0x68] LAB_0017cdad: LEA RSI,[RSP + 0xb8] MOV RDI,R14 CALL 0x001b0f78 LEA R15,[RSP + 0x98] LAB_0017cdc5: MOV RDI,R15 MOV RSI,qword ptr [RSP + 0x28] CALL 0x001b0b9a XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOVAPS xmmword ptr [RSP],XMM0 LAB_0017cdde: MOV EDI,0x88 CALL 0x0011b900 LAB_0017cde8: MOV R12,RAX LEA RSI,[RSP + 0x30] MOV RDI,RAX CALL 0x0015997c LEA RDI,[R12 + 0x18] LEA RBP,[R12 + 0x28] MOV qword ptr [R12 + 0x18],RBP MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] ADD RDX,RSI LAB_0017ce14: CALL 0x001268c4 LEA RAX,[R12 + 0x40] MOV RDX,qword ptr [RSP + 0x78] TEST RDX,RDX JZ 0x0017ce65 LEA RDI,[RSP + 0x70] MOV ECX,dword ptr [RDI] MOV qword ptr [R12 + 0x48],RDX MOV R8,qword ptr [RDI + 0x10] MOV RSI,qword ptr [RDI + 0x18] MOV qword ptr [RDX + 0x8],RAX LEA RDX,[RSP + 0x90] MOV RAX,qword ptr [RDX] MOV qword ptr [R12 + 0x60],RAX MOV qword ptr [RDX + -0x18],0x0 MOV qword ptr [RDX + -0x10],RDI MOV qword ptr [RDX + -0x8],RDI MOV RAX,R8 JMP 0x0017ce78 LAB_0017ce65: MOV qword ptr [R12 + 0x48],0x0 LEA RDX,[R12 + 0x60] XOR ECX,ECX MOV RSI,RAX LAB_0017ce78: MOV qword ptr [R12 + 0x50],RAX MOV qword ptr [R12 + 0x58],RSI MOV qword ptr [RDX],0x0 MOV dword ptr [R12 + 0x40],ECX LEA RDI,[R12 + 0x68] LAB_0017ce93: MOV RSI,R15 CALL 0x001b0b9a MOV RSI,RSP MOV qword ptr [RSI],R12 LEA RAX,[0x17d070] MOV qword ptr [RSI + 0x18],RAX LEA RAX,[0x17d6ee] MOV qword ptr [RSI + 0x10],RAX LAB_0017ceb7: MOV RDI,qword ptr [RSP + 0x20] CALL 0x0019a738 MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x0017ced8 LAB_0017cecb: MOV RDI,RSP MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_0017ced8: MOV RAX,qword ptr [RSP + 0xa8] TEST RAX,RAX JZ 0x0017cef2 LAB_0017cee5: MOV RDI,R15 MOV RSI,R15 MOV EDX,0x3 CALL RAX LAB_0017cef2: MOV RDI,R14 CALL 0x001b11da MOV RDI,qword ptr [RSP + 0x48] CMP RDI,R13 JZ 0x0017cf11 MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x0011b930 LAB_0017cf11: LEA RDI,[RSP + 0x30] CALL 0x00125d5c LEA RDI,[RSP + 0xb8] CALL 0x001b11da ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* minja::simple_function(std::__cxx11::string const&, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&) */ void __thiscall minja::simple_function(minja *this,string *param_1,vector *param_2,function *param_3) { long *plVar1; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *this_00; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *pvVar2; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *pvVar3; long lVar4; long lVar5; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *pvVar6; long lVar7; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_118; int8 uStack_110; code *local_108; code *pcStack_100; minja *local_f8; function *local_f0; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_e8 [24]; long *local_d0; long local_c8; long local_c0 [2]; _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> local_b0 [8]; int4 local_a8 [2]; long local_a0; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_98; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_90; int8 local_88; function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)> local_80 [16]; code *local_70; map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> local_60 [8]; int4 local_58 [2]; int8 local_50; int4 *local_48; int4 *local_40; int8 local_38; local_48 = local_58; local_58[0] = 0; local_50 = 0; local_38 = 0; local_f8 = this; local_f0 = param_3; local_40 = local_48; if (*(long *)(param_2 + 8) - *(long *)param_2 != 0) { lVar5 = *(long *)(param_2 + 8) - *(long *)param_2 >> 5; lVar4 = 0; lVar7 = 0; do { /* try { // try from 0017cd67 to 0017cd6e has its CatchHandler @ 0017d00a */ plVar1 = (long *)std:: map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::operator[](local_60,(string *)(*(long *)param_2 + lVar4)); *plVar1 = lVar7; lVar7 = lVar7 + 1; lVar4 = lVar4 + 0x20; } while (lVar5 + (ulong)(lVar5 == 0) != lVar7); } /* try { // try from 0017cd7e to 0017cd8a has its CatchHandler @ 0017d008 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector(local_e8,param_2); local_d0 = local_c0; /* try { // try from 0017cda3 to 0017cda7 has its CatchHandler @ 0017cff9 */ std::__cxx11::string::_M_construct<char*> (&local_d0,*(long *)param_1,*(long *)(param_1 + 8) + *(long *)param_1); /* try { // try from 0017cdad to 0017cdbc has its CatchHandler @ 0017cfdd */ std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::_Rb_tree(local_b0,(_Rb_tree *)local_60); /* try { // try from 0017cdc5 to 0017cdd1 has its CatchHandler @ 0017cfd0 */ std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>::function (local_80,local_f0); local_108 = (code *)0x0; pcStack_100 = (code *)0x0; local_118 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)0x0; uStack_110 = 0; /* try { // try from 0017cdde to 0017cde7 has its CatchHandler @ 0017cfc1 */ this_00 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)operator_new(0x88); /* try { // try from 0017cde8 to 0017cdf7 has its CatchHandler @ 0017cf90 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector (this_00,(vector *)local_e8); *(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(this_00 + 0x18) = this_00 + 0x28; /* try { // try from 0017ce14 to 0017ce18 has its CatchHandler @ 0017cf83 */ std::__cxx11::string::_M_construct<char*>(this_00 + 0x18,local_d0,local_c8 + (long)local_d0); pvVar2 = this_00 + 0x40; if (local_a0 == 0) { *(int8 *)(this_00 + 0x48) = 0; pvVar3 = this_00 + 0x60; local_a8[0] = 0; pvVar6 = pvVar2; } else { *(long *)(this_00 + 0x48) = local_a0; *(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(local_a0 + 8) = pvVar2; pvVar3 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_88; *(int8 *)(this_00 + 0x60) = local_88; local_a0 = 0; pvVar2 = local_98; pvVar6 = local_90; local_98 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_a8; local_90 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_a8; } *(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(this_00 + 0x50) = pvVar2; *(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(this_00 + 0x58) = pvVar6; *(int8 *)pvVar3 = 0; *(int4 *)(this_00 + 0x40) = local_a8[0]; /* try { // try from 0017ce93 to 0017ce9a has its CatchHandler @ 0017cf5c */ std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>::function ((function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)> *) (this_00 + 0x68),local_80); pcStack_100 = std:: _Function_handler<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&),minja::simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&)::$_0> ::_M_invoke; local_108 = std:: _Function_handler<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&),minja::simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&)::$_0> ::_M_manager; local_118 = this_00; /* try { // try from 0017ceb7 to 0017cec0 has its CatchHandler @ 0017cf3e */ Value::callable((Value *)local_f8,(function *)&local_118); if (local_108 != (code *)0x0) { /* try { // try from 0017cecb to 0017ced7 has its CatchHandler @ 0017cf3c */ (*local_108)(&local_118,&local_118,3); } if (local_70 != (code *)0x0) { /* try { // try from 0017cee5 to 0017cef1 has its CatchHandler @ 0017cf3a */ (*local_70)(local_80,local_80,3); } std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::~_Rb_tree(local_b0); if (local_d0 != local_c0) { operator_delete(local_d0,local_c0[0] + 1); } std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_e8); std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::~_Rb_tree((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> *)local_60); return; }
11,654
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>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
hkr04[P]cpp-mcp/common/json.hpp
data& operator=(data&&) noexcept = delete;
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>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&): pushq %r14 pushq %rbx pushq %rax xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movzbl (%rsi), %eax movb %al, (%rdi) decl %eax cmpl $0x7, %eax ja 0xcce5 movq %rdi, %rbx leaq 0x3c362(%rip), %rcx # 0x49004 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x8(%rsi), %rax jmp 0xcce1 movq 0x8(%rsi), %rdi callq 0xe6d6 jmp 0xcce1 movq 0x8(%rsi), %rdi callq 0xe758 jmp 0xcce1 movzbl 0x8(%rsi), %eax jmp 0xcce1 movq 0x8(%rsi), %rdi callq 0xe306 jmp 0xcce1 movq 0x8(%rsi), %rdi callq 0xe52c movq %rax, 0x8(%rbx) addq $0x8, %rsp popq %rbx popq %r14 retq jmp 0xccf3 jmp 0xccf3 jmp 0xccf3 movq %rax, %r14 movq %rbx, %rdi callq 0xdc84 movq %r14, %rdi callq 0xaac0
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_: push r14 push rbx push rax xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 movzx eax, byte ptr [rsi] mov [rdi], al dec eax; switch 8 cases cmp eax, 7 ja short def_CCA9; jumptable 000000000000CCA9 default case mov rbx, rdi lea rcx, jpt_CCA9 movsxd rax, ds:(jpt_CCA9 - 49004h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_CCAB: mov rax, [rsi+8]; jumptable 000000000000CCA9 cases 5-7 jmp short loc_CCE1 loc_CCB1: mov rdi, [rsi+8]; jumptable 000000000000CCA9 case 3 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS9_JRKS9_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::string,std::string const&>(std::string const&) jmp short loc_CCE1 loc_CCBC: mov rdi, [rsi+8]; jumptable 000000000000CCA9 case 8 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS0_27byte_container_with_subtypeISC_EEJRKSG_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>>,nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>> const&>(nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>> const&) jmp short loc_CCE1 loc_CCC7: movzx eax, byte ptr [rsi+8]; jumptable 000000000000CCA9 case 4 jmp short loc_CCE1 loc_CCCD: mov rdi, [rsi+8]; jumptable 000000000000CCA9 case 1 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS2_IS9_SD_St4lessIvESaISt4pairIKS9_SD_EEEEJRKSL_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>,nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&>(nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&) jmp short loc_CCE1 loc_CCD8: mov rdi, [rsi+8]; jumptable 000000000000CCA9 case 2 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJRKSG_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::vector<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::vector<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&>(std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&) loc_CCE1: mov [rbx+8], rax def_CCA9: add rsp, 8; jumptable 000000000000CCA9 default case pop rbx pop r14 retn jmp short loc_CCF3 jmp short loc_CCF3 jmp short $+2 loc_CCF3: mov r14, rax mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( long long a1, unsigned __int8 *a2, int a3, int a4, int a5, int a6) { int v6; // eax int v7; // eax long long result; // rax int v9; // [rsp-8h] [rbp-18h] v9 = v6; *(_OWORD *)a1 = 0LL; v7 = *a2; *(_BYTE *)a1 = v7; result = (unsigned int)(v7 - 1); switch ( (int)result ) { case 0: 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>::create<nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>,nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>> const&>( *((_QWORD *)a2 + 1), (_DWORD)a2, a3, a4, a5, a6, v9); goto LABEL_8; case 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>::create<std::vector<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::vector<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&>( *((_QWORD *)a2 + 1), (_DWORD)a2, a3, a4, a5, a6, v9); goto LABEL_8; case 2: 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>::create<std::string,std::string const&>( *((_QWORD *)a2 + 1), (_DWORD)a2, a3, a4, a5, a6, v9); goto LABEL_8; case 3: result = a2[8]; goto LABEL_8; case 4: case 5: case 6: result = *((_QWORD *)a2 + 1); goto LABEL_8; case 7: 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>::create<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned char>>,nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned char>> const&>( *((_QWORD *)a2 + 1), (_DWORD)a2, a3, a4, a5, a6, v9); LABEL_8: *(_QWORD *)(a1 + 8) = result; break; default: return result; } return result; }
basic_json: PUSH R14 PUSH RBX PUSH RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOVZX EAX,byte ptr [RSI] MOV byte ptr [RDI],AL DEC EAX CMP EAX,0x7 JA 0x0010cce5 MOV RBX,RDI LEA RCX,[0x149004] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_5: MOV RAX,qword ptr [RSI + 0x8] JMP 0x0010cce1 caseD_3: MOV RDI,qword ptr [RSI + 0x8] LAB_0010ccb5: CALL 0x0010e6d6 JMP 0x0010cce1 caseD_8: MOV RDI,qword ptr [RSI + 0x8] LAB_0010ccc0: CALL 0x0010e758 JMP 0x0010cce1 caseD_4: MOVZX EAX,byte ptr [RSI + 0x8] JMP 0x0010cce1 caseD_1: MOV RDI,qword ptr [RSI + 0x8] LAB_0010ccd1: CALL 0x0010e306 JMP 0x0010cce1 caseD_2: MOV RDI,qword ptr [RSI + 0x8] LAB_0010ccdc: CALL 0x0010e52c LAB_0010cce1: MOV qword ptr [RBX + 0x8],RAX default: ADD RSP,0x8 POP RBX POP R14 RET
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&) */ void __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,basic_json *param_1) { basic_json bVar1; string *psVar2; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; bVar1 = *param_1; *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )bVar1; switch(bVar1) { case (basic_json)0x1: /* try { // try from 0010ccd1 to 0010ccd5 has its CatchHandler @ 0010ccef */ psVar2 = (string *) create<nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>,nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>const&> (*(ordered_map **)(param_1 + 8)); break; case (basic_json)0x2: /* try { // try from 0010ccdc to 0010cce0 has its CatchHandler @ 0010cced */ psVar2 = (string *) create<std::vector<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<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::vector<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<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&> (*(vector **)(param_1 + 8)); break; case (basic_json)0x3: /* try { // try from 0010ccb5 to 0010ccb9 has its CatchHandler @ 0010ccf3 */ psVar2 = create<std::__cxx11::string,std::__cxx11::string_const&>(*(string **)(param_1 + 8)); break; case (basic_json)0x4: psVar2 = (string *)(ulong)(byte)param_1[8]; break; case (basic_json)0x5: case (basic_json)0x6: case (basic_json)0x7: psVar2 = *(string **)(param_1 + 8); break; case (basic_json)0x8: /* try { // try from 0010ccc0 to 0010ccc4 has its CatchHandler @ 0010ccf1 */ psVar2 = (string *) create<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned_char,std::allocator<unsigned_char>>>,nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned_char,std::allocator<unsigned_char>>>const&> (*(byte_container_with_subtype **)(param_1 + 8)); break; default: goto switchD_0010cca9_default; } *(string **)(this + 8) = psVar2; switchD_0010cca9_default: return; }
11,655
CLI::App::get_subcommands(std::function<bool (CLI::App const*)> const&) const
MikePodsytnik[P]TCRtrie/build_O2/_deps/cli11-src/include/CLI/impl/App_inl.hpp
CLI11_INLINE std::vector<const App *> App::get_subcommands(const std::function<bool(const App *)> &filter) const { std::vector<const App *> subcomms(subcommands_.size()); std::transform( std::begin(subcommands_), std::end(subcommands_), std::begin(subcomms), [](const App_p &v) { return v.get(); }); if(filter) { subcomms.erase(std::remove_if(std::begin(subcomms), std::end(subcomms), [&filter](const App *app) { return !filter(app); }), std::end(subcomms)); } return subcomms; }
O2
cpp
CLI::App::get_subcommands(std::function<bool (CLI::App const*)> const&) const: pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movq 0x288(%rsi), %rsi subq 0x280(%r15), %rsi sarq $0x4, %rsi leaq 0xf(%rsp), %rdx callq 0x119d0 movq 0x280(%r15), %rax movq 0x288(%r15), %rcx movq (%rbx), %rdx cmpq %rcx, %rax je 0xa13a movq (%rax), %rsi movq %rsi, (%rdx) addq $0x10, %rax addq $0x8, %rdx jmp 0xa125 cmpq $0x0, 0x10(%r14) je 0xa15f movq (%rbx), %rdi movq 0x8(%rbx), %rsi movq %r14, %rdx callq 0x11b7c movq 0x8(%rbx), %rdx movq %rbx, %rdi movq %rax, %rsi callq 0x11a22 movq %rbx, %rax addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq jmp 0xa16e movq %rax, %r14 movq %rbx, %rdi callq 0x11a54 movq %r14, %rdi callq 0x7770 nop
_ZNK3CLI3App15get_subcommandsERKSt8functionIFbPKS0_EE: push r15 push r14 push rbx sub rsp, 10h mov r14, rdx mov r15, rsi mov rbx, rdi mov rsi, [rsi+288h] sub rsi, [r15+280h] sar rsi, 4 lea rdx, [rsp+28h+var_19] call _ZNSt6vectorIPKN3CLI3AppESaIS3_EEC2EmRKS4_; std::vector<CLI::App const*>::vector(ulong,std::allocator<CLI::App const*> const&) mov rax, [r15+280h] mov rcx, [r15+288h] mov rdx, [rbx] loc_A125: cmp rax, rcx jz short loc_A13A mov rsi, [rax] mov [rdx], rsi add rax, 10h add rdx, 8 jmp short loc_A125 loc_A13A: cmp qword ptr [r14+10h], 0 jz short loc_A15F mov rdi, [rbx] mov rsi, [rbx+8] mov rdx, r14 call _ZSt11__remove_ifIN9__gnu_cxx17__normal_iteratorIPPKN3CLI3AppESt6vectorIS5_SaIS5_EEEENS0_5__ops10_Iter_predIZNKS3_15get_subcommandsERKSt8functionIFbS5_EEEUlS5_E_EEET_SK_SK_T0_; std::__remove_if<__gnu_cxx::__normal_iterator<CLI::App const**,std::vector<CLI::App const*>>,__gnu_cxx::__ops::_Iter_pred<CLI::App::get_subcommands(std::function<bool ()(CLI::App const*)> const&)::{lambda(CLI::App const*)#1}>>(__gnu_cxx::__normal_iterator<CLI::App const**,std::vector<CLI::App const*>>,__gnu_cxx::__normal_iterator<CLI::App const**,std::vector<CLI::App const*>>,__gnu_cxx::__ops::_Iter_pred<CLI::App::get_subcommands(std::function<bool ()(CLI::App const*)> const&)::{lambda(CLI::App const*)#1}>) mov rdx, [rbx+8] mov rdi, rbx mov rsi, rax call _ZNSt6vectorIPKN3CLI3AppESaIS3_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS3_S5_EESA_; std::vector<CLI::App const*>::erase(__gnu_cxx::__normal_iterator<CLI::App const* const*,std::vector<CLI::App const*>>,__gnu_cxx::__normal_iterator<CLI::App const* const*,std::vector<CLI::App const*>>) loc_A15F: mov rax, rbx add rsp, 10h pop rbx pop r14 pop r15 retn jmp short $+2 loc_A16E: mov r14, rax mov rdi, rbx call _ZNSt12_Vector_baseIPKN3CLI3AppESaIS3_EED2Ev; std::_Vector_base<CLI::App const*>::~_Vector_base() mov rdi, r14 call __Unwind_Resume
_QWORD * CLI::App::get_subcommands(_QWORD *a1, long long a2, long long a3) { _QWORD *v4; // rax _QWORD *v5; // rcx _QWORD *v6; // rdx long long v7; // rax _BYTE v9[25]; // [rsp+Fh] [rbp-19h] BYREF std::vector<CLI::App const*>::vector(a1, (long long)(*(_QWORD *)(a2 + 648) - *(_QWORD *)(a2 + 640)) >> 4, v9); v4 = *(_QWORD **)(a2 + 640); v5 = *(_QWORD **)(a2 + 648); v6 = (_QWORD *)*a1; while ( v4 != v5 ) { *v6 = *v4; v4 += 2; ++v6; } if ( *(_QWORD *)(a3 + 16) ) { v7 = std::__remove_if<__gnu_cxx::__normal_iterator<CLI::App const**,std::vector<CLI::App const*>>,__gnu_cxx::__ops::_Iter_pred<CLI::App::get_subcommands(std::function<bool ()(CLI::App const*)> const&)::{lambda(CLI::App const*)#1}>>( *a1, a1[1], a3); std::vector<CLI::App const*>::erase(a1, v7, a1[1]); } return a1; }
get_subcommands: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV RSI,qword ptr [RSI + 0x288] SUB RSI,qword ptr [R15 + 0x280] SAR RSI,0x4 LEA RDX,[RSP + 0xf] CALL 0x001119d0 MOV RAX,qword ptr [R15 + 0x280] MOV RCX,qword ptr [R15 + 0x288] MOV RDX,qword ptr [RBX] LAB_0010a125: CMP RAX,RCX JZ 0x0010a13a MOV RSI,qword ptr [RAX] MOV qword ptr [RDX],RSI ADD RAX,0x10 ADD RDX,0x8 JMP 0x0010a125 LAB_0010a13a: CMP qword ptr [R14 + 0x10],0x0 JZ 0x0010a15f MOV RDI,qword ptr [RBX] MOV RSI,qword ptr [RBX + 0x8] LAB_0010a148: MOV RDX,R14 CALL 0x00111b7c MOV RDX,qword ptr [RBX + 0x8] LAB_0010a154: MOV RDI,RBX MOV RSI,RAX CALL 0x00111a22 LAB_0010a15f: MOV RAX,RBX ADD RSP,0x10 POP RBX POP R14 POP R15 RET
/* CLI::App::get_subcommands(std::function<bool (CLI::App const*)> const&) const */ function * CLI::App::get_subcommands(function *param_1) { int8 *puVar1; int8 *puVar2; int8 uVar3; long in_RDX; int8 *puVar4; long in_RSI; allocator local_19; std::vector<CLI::App_const*,std::allocator<CLI::App_const*>>::vector ((vector<CLI::App_const*,std::allocator<CLI::App_const*>> *)param_1, *(long *)(in_RSI + 0x288) - *(long *)(in_RSI + 0x280) >> 4,&local_19); puVar1 = *(int8 **)(in_RSI + 0x288); puVar4 = *(int8 **)param_1; for (puVar2 = *(int8 **)(in_RSI + 0x280); puVar2 != puVar1; puVar2 = puVar2 + 2) { *puVar4 = *puVar2; puVar4 = puVar4 + 1; } if (*(long *)(in_RDX + 0x10) != 0) { /* try { // try from 0010a148 to 0010a14f has its CatchHandler @ 0010a16e */ uVar3 = std:: __remove_if<__gnu_cxx::__normal_iterator<CLI::App_const**,std::vector<CLI::App_const*,std::allocator<CLI::App_const*>>>,__gnu_cxx::__ops::_Iter_pred<CLI::App::get_subcommands(std::function<bool(CLI::App_const*)>const&)const::_lambda(CLI::App_const*)_1_>> (*(int8 *)param_1,*(int8 *)(param_1 + 8)); /* try { // try from 0010a154 to 0010a15e has its CatchHandler @ 0010a16c */ std::vector<CLI::App_const*,std::allocator<CLI::App_const*>>::erase ((vector<CLI::App_const*,std::allocator<CLI::App_const*>> *)param_1,uVar3, *(int8 *)(param_1 + 8)); } return param_1; }
11,656
nglog::LogMessage::LogStream::~LogStream()
ng-log[P]ng-log/src/ng-log/logging.h
class NGLOG_EXPORT LogStream : public std::ostream { NGLOG_MSVC_POP_WARNING() public: // In some cases, like when compiling glog as a static library with GCC and // linking against a Clang-built executable, this constructor will be // removed by the linker. We use this attribute to prevent the linker from // discarding it. NGLOG_USED LogStream(char* buf, int len, int64 ctr) : std::ostream(nullptr), streambuf_(buf, len), ctr_(ctr), self_(this) { rdbuf(&streambuf_); } LogStream(LogStream&& other) noexcept : std::ostream(nullptr), streambuf_(std::move(other.streambuf_)), ctr_(std::exchange(other.ctr_, 0)), self_(this) { rdbuf(&streambuf_); } LogStream& operator=(LogStream&& other) noexcept { streambuf_ = std::move(other.streambuf_); ctr_ = std::exchange(other.ctr_, 0); rdbuf(&streambuf_); return *this; } int64 ctr() const { return ctr_; } void set_ctr(int64 ctr) { ctr_ = ctr; } LogStream* self() const { return self_; } // Legacy std::streambuf methods. size_t pcount() const { return streambuf_.pcount(); } char* pbase() const { return streambuf_.pbase(); } char* str() const { return pbase(); } LogStream(const LogStream&) = delete; LogStream& operator=(const LogStream&) = delete; private: base_logging::LogStreamBuf streambuf_; int64 ctr_; // Counter hack (for the LOG_EVERY_X() macro) LogStream* self_; // Consistency check hack }
O0
c
nglog::LogMessage::LogStream::~LogStream(): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x10(%rbp) callq 0xcdb0 movq -0x10(%rbp), %rdi movl $0x160, %esi # imm = 0x160 callq 0xba40 addq $0x10, %rsp popq %rbp retq nopl (%rax)
_ZN5nglog10LogMessage9LogStreamD0Ev: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8]; this mov [rbp+var_10], rdi call _ZN5nglog10LogMessage9LogStreamD1Ev; nglog::LogMessage::LogStream::~LogStream() mov rdi, [rbp+var_10]; void * mov esi, 160h; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) add rsp, 10h pop rbp retn
void nglog::LogMessage::LogStream::~LogStream(nglog::LogMessage::LogStream *this) { nglog::LogMessage::LogStream::~LogStream(this); operator delete(this); }
~LogStream: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RDI CALL 0x0010cdb0 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x160 CALL 0x0010ba40 ADD RSP,0x10 POP RBP RET
/* nglog::LogMessage::LogStream::~LogStream() */ void __thiscall nglog::LogMessage::LogStream::~LogStream(LogStream *this) { ~LogStream(this); operator_delete(this,0x160); return; }
11,657
nglog::LogMessage::LogStream::~LogStream()
ng-log[P]ng-log/src/ng-log/logging.h
class NGLOG_EXPORT LogStream : public std::ostream { NGLOG_MSVC_POP_WARNING() public: // In some cases, like when compiling glog as a static library with GCC and // linking against a Clang-built executable, this constructor will be // removed by the linker. We use this attribute to prevent the linker from // discarding it. NGLOG_USED LogStream(char* buf, int len, int64 ctr) : std::ostream(nullptr), streambuf_(buf, len), ctr_(ctr), self_(this) { rdbuf(&streambuf_); } LogStream(LogStream&& other) noexcept : std::ostream(nullptr), streambuf_(std::move(other.streambuf_)), ctr_(std::exchange(other.ctr_, 0)), self_(this) { rdbuf(&streambuf_); } LogStream& operator=(LogStream&& other) noexcept { streambuf_ = std::move(other.streambuf_); ctr_ = std::exchange(other.ctr_, 0); rdbuf(&streambuf_); return *this; } int64 ctr() const { return ctr_; } void set_ctr(int64 ctr) { ctr_ = ctr; } LogStream* self() const { return self_; } // Legacy std::streambuf methods. size_t pcount() const { return streambuf_.pcount(); } char* pbase() const { return streambuf_.pbase(); } char* str() const { return pbase(); } LogStream(const LogStream&) = delete; LogStream& operator=(const LogStream&) = delete; private: base_logging::LogStreamBuf streambuf_; int64 ctr_; // Counter hack (for the LOG_EVERY_X() macro) LogStream* self_; // Consistency check hack }
O1
c
nglog::LogMessage::LogStream::~LogStream(): pushq %rbx leaq 0x1e464(%rip), %rax # 0x30898 leaq 0x18(%rax), %rcx movq %rcx, (%rdi) leaq 0x60(%rdi), %rbx addq $0x40, %rax movq %rax, 0x60(%rdi) movq 0x1eaea(%rip), %rax # 0x30f38 addq $0x10, %rax movq %rax, 0x8(%rdi) addq $0x40, %rdi callq 0x77b0 movq %rbx, %rdi popq %rbx jmp 0x7170
_ZN5nglog10NullStreamD1Ev: push rbx lea rax, _ZTCN5nglog10NullStreamE0_NS_10LogMessage9LogStreamE; `construction vtable for'nglog::LogMessage::LogStream-in-nglog::NullStream lea rcx, [rax+18h] mov [rdi], rcx lea rbx, [rdi+60h] add rax, 40h ; '@' mov [rdi+60h], rax mov rax, cs:_ZTVSt15basic_streambufIcSt11char_traitsIcEE_ptr add rax, 10h mov [rdi+8], rax add rdi, 40h ; '@'; this call __ZNSt6localeD1Ev; std::locale::~locale() mov rdi, rbx; this pop rbx jmp __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
void nglog::NullStream::~NullStream(nglog::NullStream *this) { *(_QWORD *)this = (char *)&`construction vtable for'nglog::LogMessage::LogStream-in-nglog::NullStream + 24; *((_QWORD *)this + 12) = (char *)&`construction vtable for'nglog::LogMessage::LogStream-in-nglog::NullStream + 64; *((_QWORD *)this + 1) = (char *)&`vtable for'std::streambuf + 16; std::locale::~locale((nglog::NullStream *)((char *)this + 64)); std::ios_base::~ios_base((nglog::NullStream *)((char *)this + 96)); }
~NullStream: PUSH RBX LEA RAX,[0x130898] LEA RCX,[RAX + 0x18] MOV qword ptr [RDI],RCX LEA RBX,[RDI + 0x60] ADD RAX,0x40 MOV qword ptr [RDI + 0x60],RAX MOV RAX,qword ptr [0x00130f38] ADD RAX,0x10 MOV qword ptr [RDI + 0x8],RAX ADD RDI,0x40 CALL 0x001077b0 MOV RDI,RBX POP RBX JMP 0x00107170
/* nglog::NullStream::~NullStream() */ void __thiscall nglog::NullStream::~NullStream(NullStream *this) { *(int8 *)this = 0x1308b0; *(int8 *)(this + 0x60) = 0x1308d8; *(int **)(this + 8) = PTR_vtable_00130f38 + 0x10; std::locale::~locale((locale *)(this + 0x40)); std::ios_base::~ios_base((ios_base *)(this + 0x60)); return; }
11,658
nglog::LogMessage::LogStream::~LogStream()
ng-log[P]ng-log/src/ng-log/logging.h
class NGLOG_EXPORT LogStream : public std::ostream { NGLOG_MSVC_POP_WARNING() public: // In some cases, like when compiling glog as a static library with GCC and // linking against a Clang-built executable, this constructor will be // removed by the linker. We use this attribute to prevent the linker from // discarding it. NGLOG_USED LogStream(char* buf, int len, int64 ctr) : std::ostream(nullptr), streambuf_(buf, len), ctr_(ctr), self_(this) { rdbuf(&streambuf_); } LogStream(LogStream&& other) noexcept : std::ostream(nullptr), streambuf_(std::move(other.streambuf_)), ctr_(std::exchange(other.ctr_, 0)), self_(this) { rdbuf(&streambuf_); } LogStream& operator=(LogStream&& other) noexcept { streambuf_ = std::move(other.streambuf_); ctr_ = std::exchange(other.ctr_, 0); rdbuf(&streambuf_); return *this; } int64 ctr() const { return ctr_; } void set_ctr(int64 ctr) { ctr_ = ctr; } LogStream* self() const { return self_; } // Legacy std::streambuf methods. size_t pcount() const { return streambuf_.pcount(); } char* pbase() const { return streambuf_.pbase(); } char* str() const { return pbase(); } LogStream(const LogStream&) = delete; LogStream& operator=(const LogStream&) = delete; private: base_logging::LogStreamBuf streambuf_; int64 ctr_; // Counter hack (for the LOG_EVERY_X() macro) LogStream* self_; // Consistency check hack }
O2
c
nglog::LogMessage::LogStream::~LogStream(): movq (%rsi), %rax movq %rax, (%rdi) movq 0x18(%rsi), %rcx movq -0x18(%rax), %rax movq %rcx, (%rdi,%rax) addq $0x8, %rdi jmp 0x8b40 nopl (%rax)
_ZN5nglog10LogMessage9LogStreamD2Ev: mov rax, [rsi] mov [rdi], rax mov rcx, [rsi+18h] mov rax, [rax-18h] mov [rdi+rax], rcx add rdi, 8 jmp __ZNSt15basic_streambufIcSt11char_traitsIcEED2Ev; std::streambuf::~streambuf()
void nglog::LogMessage::LogStream::~LogStream(nglog::LogMessage::LogStream *this, long long *a2) { long long v2; // rax v2 = *a2; *(_QWORD *)this = *a2; *(_QWORD *)((char *)this + *(_QWORD *)(v2 - 24)) = a2[3]; std::streambuf::~streambuf((char *)this + 8); }
~LogStream: MOV RAX,qword ptr [RSI] MOV qword ptr [RDI],RAX MOV RCX,qword ptr [RSI + 0x18] MOV RAX,qword ptr [RAX + -0x18] MOV qword ptr [RDI + RAX*0x1],RCX ADD RDI,0x8 JMP 0x00108b40
/* nglog::LogMessage::LogStream::~LogStream() */ void __thiscall nglog::LogMessage::LogStream::~LogStream(LogStream *this) { long lVar1; long *in_RSI; lVar1 = *in_RSI; *(long *)this = lVar1; *(long *)(this + *(long *)(lVar1 + -0x18)) = in_RSI[3]; std::streambuf::~streambuf((streambuf *)(this + 8)); return; }
11,659
nglog::LogMessage::LogStream::~LogStream()
ng-log[P]ng-log/src/ng-log/logging.h
class NGLOG_EXPORT LogStream : public std::ostream { NGLOG_MSVC_POP_WARNING() public: // In some cases, like when compiling glog as a static library with GCC and // linking against a Clang-built executable, this constructor will be // removed by the linker. We use this attribute to prevent the linker from // discarding it. NGLOG_USED LogStream(char* buf, int len, int64 ctr) : std::ostream(nullptr), streambuf_(buf, len), ctr_(ctr), self_(this) { rdbuf(&streambuf_); } LogStream(LogStream&& other) noexcept : std::ostream(nullptr), streambuf_(std::move(other.streambuf_)), ctr_(std::exchange(other.ctr_, 0)), self_(this) { rdbuf(&streambuf_); } LogStream& operator=(LogStream&& other) noexcept { streambuf_ = std::move(other.streambuf_); ctr_ = std::exchange(other.ctr_, 0); rdbuf(&streambuf_); return *this; } int64 ctr() const { return ctr_; } void set_ctr(int64 ctr) { ctr_ = ctr; } LogStream* self() const { return self_; } // Legacy std::streambuf methods. size_t pcount() const { return streambuf_.pcount(); } char* pbase() const { return streambuf_.pbase(); } char* str() const { return pbase(); } LogStream(const LogStream&) = delete; LogStream& operator=(const LogStream&) = delete; private: base_logging::LogStreamBuf streambuf_; int64 ctr_; // Counter hack (for the LOG_EVERY_X() macro) LogStream* self_; // Consistency check hack }
O3
c
nglog::LogMessage::LogStream::~LogStream(): pushq %rbx movq (%rdi), %rax movq -0x18(%rax), %rax leaq 0x26c79(%rip), %rcx # 0x30428 leaq 0x58(%rdi,%rax), %rbx movq %rcx, -0x58(%rbx) leaq 0x26c91(%rip), %rcx # 0x30450 movq %rcx, (%rbx) movq 0x2776f(%rip), %rcx # 0x30f38 addq $0x10, %rcx movq %rcx, -0x50(%rbx) addq %rax, %rdi addq $0x40, %rdi callq 0x77b0 movq %rbx, %rdi popq %rbx jmp 0x7170
_ZTv0_n24_N5nglog10LogMessage9LogStreamD1Ev: push rbx mov rax, [rdi] mov rax, [rax-18h] lea rcx, off_30428 lea rbx, [rdi+rax+58h] mov [rbx-58h], rcx lea rcx, off_30450 mov [rbx], rcx mov rcx, cs:_ZTVSt15basic_streambufIcSt11char_traitsIcEE_ptr add rcx, 10h mov [rbx-50h], rcx add rdi, rax add rdi, 40h ; '@'; this call __ZNSt6localeD1Ev; std::locale::~locale() mov rdi, rbx; this pop rbx jmp __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
void `virtual thunk to'nglog::LogMessage::LogStream::~LogStream(nglog::LogMessage::LogStream *this) { long long v1; // rax std::ios_base *v2; // rbx v1 = *(_QWORD *)(*(_QWORD *)this - 24LL); v2 = (nglog::LogMessage::LogStream *)((char *)this + v1 + 88); *((_QWORD *)v2 - 11) = off_30428; *(_QWORD *)v2 = off_30450; *((_QWORD *)v2 - 10) = (char *)&`vtable for'std::streambuf + 16; std::locale::~locale((nglog::LogMessage::LogStream *)((char *)this + v1 + 64)); std::ios_base::~ios_base(v2); }
~LogStream: PUSH RBX MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + -0x18] LEA RCX,[0x130428] LEA RBX,[RDI + RAX*0x1 + 0x58] MOV qword ptr [RBX + -0x58],RCX LEA RCX,[0x130450] MOV qword ptr [RBX],RCX MOV RCX,qword ptr [0x00130f38] ADD RCX,0x10 MOV qword ptr [RBX + -0x50],RCX ADD RDI,RAX ADD RDI,0x40 CALL 0x001077b0 MOV RDI,RBX POP RBX JMP 0x00107170
/* virtual thunk to nglog::LogMessage::LogStream::~LogStream() */ void __thiscall nglog::LogMessage::LogStream::~LogStream(LogStream *this) { ios_base *this_00; long lVar1; lVar1 = *(long *)(*(long *)this + -0x18); this_00 = (ios_base *)(this + lVar1 + 0x58); *(int ***)(this_00 + -0x58) = &PTR__LogStream_00130428; *(int ***)this_00 = &PTR__LogStream_00130450; *(int **)(this_00 + -0x50) = PTR_vtable_00130f38 + 0x10; std::locale::~locale((locale *)(this + lVar1 + 0x40)); std::ios_base::~ios_base(this_00); return; }
11,660
cpu_count_math_cpus(int)
monkey531[P]llama/common/common.cpp
static int cpu_count_math_cpus(int n_cpu) { int result = 0; for (int cpu = 0; cpu < n_cpu; ++cpu) { if (pin_cpu(cpu)) { return -1; } if (is_running_on_efficiency_core()) { continue; // efficiency cores harm lockstep threading } ++cpu; // hyperthreading isn't useful for linear algebra ++result; } return result; }
O0
cpp
cpu_count_math_cpus(int): subq $0x18, %rsp movl %edi, 0x10(%rsp) movl $0x0, 0xc(%rsp) movl $0x0, 0x8(%rsp) movl 0x8(%rsp), %eax cmpl 0x10(%rsp), %eax jge 0xec76a movl 0x8(%rsp), %edi callq 0xf5f50 cmpl $0x0, %eax je 0xec73a movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF jmp 0xec772 callq 0xf5ff0 testb $0x1, %al jne 0xec745 jmp 0xec747 jmp 0xec75d movl 0x8(%rsp), %eax addl $0x1, %eax movl %eax, 0x8(%rsp) movl 0xc(%rsp), %eax addl $0x1, %eax movl %eax, 0xc(%rsp) movl 0x8(%rsp), %eax addl $0x1, %eax movl %eax, 0x8(%rsp) jmp 0xec718 movl 0xc(%rsp), %eax movl %eax, 0x14(%rsp) movl 0x14(%rsp), %eax addq $0x18, %rsp retq nopl (%rax,%rax)
_ZL19cpu_count_math_cpusi: sub rsp, 18h mov [rsp+18h+var_8], edi mov [rsp+18h+var_C], 0 mov [rsp+18h+var_10], 0 loc_EC718: mov eax, [rsp+18h+var_10] cmp eax, [rsp+18h+var_8] jge short loc_EC76A mov edi, [rsp+18h+var_10]; int call _ZL7pin_cpui; pin_cpu(int) cmp eax, 0 jz short loc_EC73A mov [rsp+18h+var_4], 0FFFFFFFFh jmp short loc_EC772 loc_EC73A: call _ZL29is_running_on_efficiency_corev; is_running_on_efficiency_core(void) test al, 1 jnz short loc_EC745 jmp short loc_EC747 loc_EC745: jmp short loc_EC75D loc_EC747: mov eax, [rsp+18h+var_10] add eax, 1 mov [rsp+18h+var_10], eax mov eax, [rsp+18h+var_C] add eax, 1 mov [rsp+18h+var_C], eax loc_EC75D: mov eax, [rsp+18h+var_10] add eax, 1 mov [rsp+18h+var_10], eax jmp short loc_EC718 loc_EC76A: mov eax, [rsp+18h+var_C] mov [rsp+18h+var_4], eax loc_EC772: mov eax, [rsp+18h+var_4] add rsp, 18h retn
long long cpu_count_math_cpus(int a1) { int i; // [rsp+8h] [rbp-10h] unsigned int v3; // [rsp+Ch] [rbp-Ch] v3 = 0; for ( i = 0; i < a1; ++i ) { if ( (unsigned int)pin_cpu(i) ) return (unsigned int)-1; if ( (is_running_on_efficiency_core() & 1) == 0 ) { ++i; ++v3; } } return v3; }
cpu_count_math_cpus: SUB RSP,0x18 MOV dword ptr [RSP + 0x10],EDI MOV dword ptr [RSP + 0xc],0x0 MOV dword ptr [RSP + 0x8],0x0 LAB_001ec718: MOV EAX,dword ptr [RSP + 0x8] CMP EAX,dword ptr [RSP + 0x10] JGE 0x001ec76a MOV EDI,dword ptr [RSP + 0x8] CALL 0x001f5f50 CMP EAX,0x0 JZ 0x001ec73a MOV dword ptr [RSP + 0x14],0xffffffff JMP 0x001ec772 LAB_001ec73a: CALL 0x001f5ff0 TEST AL,0x1 JNZ 0x001ec745 JMP 0x001ec747 LAB_001ec745: JMP 0x001ec75d LAB_001ec747: MOV EAX,dword ptr [RSP + 0x8] ADD EAX,0x1 MOV dword ptr [RSP + 0x8],EAX MOV EAX,dword ptr [RSP + 0xc] ADD EAX,0x1 MOV dword ptr [RSP + 0xc],EAX LAB_001ec75d: MOV EAX,dword ptr [RSP + 0x8] ADD EAX,0x1 MOV dword ptr [RSP + 0x8],EAX JMP 0x001ec718 LAB_001ec76a: MOV EAX,dword ptr [RSP + 0xc] MOV dword ptr [RSP + 0x14],EAX LAB_001ec772: MOV EAX,dword ptr [RSP + 0x14] ADD RSP,0x18 RET
/* cpu_count_math_cpus(int) */ int cpu_count_math_cpus(int param_1) { int iVar1; ulong uVar2; int local_10; int local_c; local_c = 0; local_10 = 0; while( true ) { if (param_1 <= local_10) { return local_c; } iVar1 = pin_cpu(local_10); if (iVar1 != 0) break; uVar2 = is_running_on_efficiency_core(); if ((uVar2 & 1) == 0) { local_10 = local_10 + 1; local_c = local_c + 1; } local_10 = local_10 + 1; } return -1; }
11,661
ma_tls_get_finger_print
eloqsql/libmariadb/libmariadb/secure/openssl.c
unsigned int ma_tls_get_finger_print(MARIADB_TLS *ctls, char *fp, unsigned int len) { X509 *cert= NULL; MYSQL *mysql; unsigned int fp_len; if (!ctls || !ctls->ssl) return 0; mysql= SSL_get_app_data(ctls->ssl); if (!(cert= SSL_get_peer_certificate(ctls->ssl))) { my_set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, ER(CR_SSL_CONNECTION_ERROR), "Unable to get server certificate"); goto end; } if (len < EVP_MAX_MD_SIZE) { my_set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, ER(CR_SSL_CONNECTION_ERROR), "Finger print buffer too small"); goto end; } if (!X509_digest(cert, EVP_sha1(), (unsigned char *)fp, &fp_len)) { my_set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, ER(CR_SSL_CONNECTION_ERROR), "invalid finger print of server certificate"); goto end; } X509_free(cert); return (fp_len); end: X509_free(cert); return 0; }
O0
c
ma_tls_get_finger_print: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq $0x0, -0x28(%rbp) cmpq $0x0, -0x10(%rbp) je 0x694cd movq -0x10(%rbp), %rax cmpq $0x0, 0x10(%rax) jne 0x694d9 movl $0x0, -0x4(%rbp) jmp 0x695e6 movq -0x10(%rbp), %rax movq 0x10(%rax), %rdi xorl %esi, %esi callq 0x38320 movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rdi callq 0x38ac0 movq %rax, -0x28(%rbp) cmpq $0x0, %rax jne 0x69537 movq -0x30(%rbp), %rdi leaq 0x1e04c2(%rip), %rax # 0x2499d0 movq (%rax), %rdx leaq 0x1e04c8(%rip), %rax # 0x2499e0 movq 0xd0(%rax), %rcx movl $0x7ea, %esi # imm = 0x7EA leaq 0x76725(%rip), %r8 # 0xdfc50 movb $0x0, %al callq 0x47bd0 jmp 0x695d6 cmpl $0x40, -0x1c(%rbp) jae 0x6956e movq -0x30(%rbp), %rdi leaq 0x1e0488(%rip), %rax # 0x2499d0 movq (%rax), %rdx leaq 0x1e048e(%rip), %rax # 0x2499e0 movq 0xd0(%rax), %rcx movl $0x7ea, %esi # imm = 0x7EA leaq 0x76738(%rip), %r8 # 0xdfc9d movb $0x0, %al callq 0x47bd0 jmp 0x695d6 movq -0x28(%rbp), %rax movq %rax, -0x40(%rbp) callq 0x38350 movq -0x40(%rbp), %rdi movq %rax, %rsi movq -0x18(%rbp), %rdx leaq -0x34(%rbp), %rcx callq 0x38250 cmpl $0x0, %eax jne 0x695c5 movq -0x30(%rbp), %rdi leaq 0x1e0431(%rip), %rax # 0x2499d0 movq (%rax), %rdx leaq 0x1e0437(%rip), %rax # 0x2499e0 movq 0xd0(%rax), %rcx movl $0x7ea, %esi # imm = 0x7EA leaq 0x766ff(%rip), %r8 # 0xdfcbb movb $0x0, %al callq 0x47bd0 jmp 0x695d6 movq -0x28(%rbp), %rdi callq 0x38bf0 movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x695e6 movq -0x28(%rbp), %rdi callq 0x38bf0 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nop
ma_tls_get_finger_print: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_28], 0 cmp [rbp+var_10], 0 jz short loc_694CD mov rax, [rbp+var_10] cmp qword ptr [rax+10h], 0 jnz short loc_694D9 loc_694CD: mov [rbp+var_4], 0 jmp loc_695E6 loc_694D9: mov rax, [rbp+var_10] mov rdi, [rax+10h] xor esi, esi call _SSL_get_ex_data mov [rbp+var_30], rax mov rax, [rbp+var_10] mov rdi, [rax+10h] call _SSL_get1_peer_certificate mov [rbp+var_28], rax cmp rax, 0 jnz short loc_69537 mov rdi, [rbp+var_30] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] lea rax, client_errors mov rcx, [rax+0D0h] mov esi, 7EAh lea r8, aUnableToGetSer; "Unable to get server certificate" mov al, 0 call my_set_error jmp loc_695D6 loc_69537: cmp [rbp+var_1C], 40h ; '@' jnb short loc_6956E mov rdi, [rbp+var_30] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] lea rax, client_errors mov rcx, [rax+0D0h] mov esi, 7EAh lea r8, aFingerPrintBuf; "Finger print buffer too small" mov al, 0 call my_set_error jmp short loc_695D6 loc_6956E: mov rax, [rbp+var_28] mov [rbp+var_40], rax call _EVP_sha1 mov rdi, [rbp+var_40] mov rsi, rax mov rdx, [rbp+var_18] lea rcx, [rbp+var_34] call _X509_digest cmp eax, 0 jnz short loc_695C5 mov rdi, [rbp+var_30] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] lea rax, client_errors mov rcx, [rax+0D0h] mov esi, 7EAh lea r8, aInvalidFingerP; "invalid finger print of server certific"... mov al, 0 call my_set_error jmp short loc_695D6 loc_695C5: mov rdi, [rbp+var_28] call _X509_free mov eax, [rbp+var_34] mov [rbp+var_4], eax jmp short loc_695E6 loc_695D6: mov rdi, [rbp+var_28] call _X509_free mov [rbp+var_4], 0 loc_695E6: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long ma_tls_get_finger_print(long long a1, long long a2, unsigned int a3) { long long v3; // rax unsigned int v5; // [rsp+Ch] [rbp-34h] BYREF long long v6; // [rsp+10h] [rbp-30h] long long v7; // [rsp+18h] [rbp-28h] unsigned int v8; // [rsp+24h] [rbp-1Ch] long long v9; // [rsp+28h] [rbp-18h] long long v10; // [rsp+30h] [rbp-10h] v10 = a1; v9 = a2; v8 = a3; v7 = 0LL; if ( a1 && *(_QWORD *)(v10 + 16) ) { v6 = SSL_get_ex_data(*(_QWORD *)(v10 + 16), 0LL); v7 = SSL_get1_peer_certificate(*(_QWORD *)(v10 + 16)); if ( v7 ) { if ( v8 >= 0x40 ) { v3 = EVP_sha1(); if ( (unsigned int)X509_digest(v7, v3, v9, &v5) ) { X509_free(v7); return v5; } my_set_error( v6, 0x7EAu, (long long)SQLSTATE_UNKNOWN, (long long)client_errors[26], "invalid finger print of server certificate"); } else { my_set_error(v6, 0x7EAu, (long long)SQLSTATE_UNKNOWN, (long long)client_errors[26], "Finger print buffer too small"); } } else { my_set_error( v6, 0x7EAu, (long long)SQLSTATE_UNKNOWN, (long long)client_errors[26], "Unable to get server certificate"); } X509_free(v7); return 0; } return 0; }
ma_tls_get_finger_print: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV qword ptr [RBP + -0x28],0x0 CMP qword ptr [RBP + -0x10],0x0 JZ 0x001694cd MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x10],0x0 JNZ 0x001694d9 LAB_001694cd: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001695e6 LAB_001694d9: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x10] XOR ESI,ESI CALL 0x00138320 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x10] CALL 0x00138ac0 MOV qword ptr [RBP + -0x28],RAX CMP RAX,0x0 JNZ 0x00169537 MOV RDI,qword ptr [RBP + -0x30] LEA RAX,[0x3499d0] MOV RDX,qword ptr [RAX] LEA RAX,[0x3499e0] MOV RCX,qword ptr [RAX + 0xd0] MOV ESI,0x7ea LEA R8,[0x1dfc50] MOV AL,0x0 CALL 0x00147bd0 JMP 0x001695d6 LAB_00169537: CMP dword ptr [RBP + -0x1c],0x40 JNC 0x0016956e MOV RDI,qword ptr [RBP + -0x30] LEA RAX,[0x3499d0] MOV RDX,qword ptr [RAX] LEA RAX,[0x3499e0] MOV RCX,qword ptr [RAX + 0xd0] MOV ESI,0x7ea LEA R8,[0x1dfc9d] MOV AL,0x0 CALL 0x00147bd0 JMP 0x001695d6 LAB_0016956e: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x40],RAX CALL 0x00138350 MOV RDI,qword ptr [RBP + -0x40] MOV RSI,RAX MOV RDX,qword ptr [RBP + -0x18] LEA RCX,[RBP + -0x34] CALL 0x00138250 CMP EAX,0x0 JNZ 0x001695c5 MOV RDI,qword ptr [RBP + -0x30] LEA RAX,[0x3499d0] MOV RDX,qword ptr [RAX] LEA RAX,[0x3499e0] MOV RCX,qword ptr [RAX + 0xd0] MOV ESI,0x7ea LEA R8,[0x1dfcbb] MOV AL,0x0 CALL 0x00147bd0 JMP 0x001695d6 LAB_001695c5: MOV RDI,qword ptr [RBP + -0x28] CALL 0x00138bf0 MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX JMP 0x001695e6 LAB_001695d6: MOV RDI,qword ptr [RBP + -0x28] CALL 0x00138bf0 MOV dword ptr [RBP + -0x4],0x0 LAB_001695e6: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
int4 ma_tls_get_finger_print(long param_1,uchar *param_2,uint param_3) { int iVar1; X509 *data; EVP_MD *type; uint local_3c; void *local_38; X509 *local_30; uint local_24; uchar *local_20; long local_18; local_30 = (X509 *)0x0; if ((param_1 != 0) && (*(long *)(param_1 + 0x10) != 0)) { local_24 = param_3; local_20 = param_2; local_18 = param_1; local_38 = SSL_get_ex_data(*(SSL **)(param_1 + 0x10),0); data = (X509 *)SSL_get1_peer_certificate(*(int8 *)(local_18 + 0x10)); local_30 = data; if (data == (X509 *)0x0) { my_set_error(local_38,0x7ea,SQLSTATE_UNKNOWN,PTR_s_TLS_SSL_error_____100s_00349ab0, "Unable to get server certificate"); } else if (local_24 < 0x40) { my_set_error(local_38,0x7ea,SQLSTATE_UNKNOWN,PTR_s_TLS_SSL_error_____100s_00349ab0, "Finger print buffer too small"); } else { type = EVP_sha1(); iVar1 = X509_digest(data,type,local_20,&local_3c); if (iVar1 != 0) { X509_free(local_30); return local_3c; } my_set_error(local_38,0x7ea,SQLSTATE_UNKNOWN,PTR_s_TLS_SSL_error_____100s_00349ab0, "invalid finger print of server certificate"); } X509_free(local_30); } return 0; }
11,662
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_number()
hkr04[P]cpp-mcp/common/json.hpp
token_type scan_number() // lgtm [cpp/use-of-goto] { // reset token_buffer to store the number's bytes reset(); // the type of the parsed number; initially set to unsigned; will be // changed if minus sign, decimal point or exponent is read token_type number_type = token_type::value_unsigned; // state (init): we just found out we need to scan a number switch (current) { case '-': { add(current); goto scan_number_minus; } case '0': { add(current); goto scan_number_zero; } case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any1; } // all other characters are rejected outside scan_number() default: // LCOV_EXCL_LINE JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE } scan_number_minus: // state: we just parsed a leading minus sign number_type = token_type::value_integer; switch (get()) { case '0': { add(current); goto scan_number_zero; } case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any1; } default: { error_message = "invalid number; expected digit after '-'"; return token_type::parse_error; } } scan_number_zero: // state: we just parse a zero (maybe with a leading minus sign) switch (get()) { case '.': { add(decimal_point_char); goto scan_number_decimal1; } case 'e': case 'E': { add(current); goto scan_number_exponent; } default: goto scan_number_done; } scan_number_any1: // state: we just parsed a number 0-9 (maybe with a leading minus sign) switch (get()) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any1; } case '.': { add(decimal_point_char); goto scan_number_decimal1; } case 'e': case 'E': { add(current); goto scan_number_exponent; } default: goto scan_number_done; } scan_number_decimal1: // state: we just parsed a decimal point number_type = token_type::value_float; switch (get()) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_decimal2; } default: { error_message = "invalid number; expected digit after '.'"; return token_type::parse_error; } } scan_number_decimal2: // we just parsed at least one number after a decimal point switch (get()) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_decimal2; } case 'e': case 'E': { add(current); goto scan_number_exponent; } default: goto scan_number_done; } scan_number_exponent: // we just parsed an exponent number_type = token_type::value_float; switch (get()) { case '+': case '-': { add(current); goto scan_number_sign; } case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any2; } default: { error_message = "invalid number; expected '+', '-', or digit after exponent"; return token_type::parse_error; } } scan_number_sign: // we just parsed an exponent sign switch (get()) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any2; } default: { error_message = "invalid number; expected digit after exponent sign"; return token_type::parse_error; } } scan_number_any2: // we just parsed a number after the exponent or exponent sign switch (get()) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any2; } default: goto scan_number_done; } scan_number_done: // unget the character after the number (we only read it to know that // we are done scanning a number) unget(); char* endptr = nullptr; // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg) errno = 0; // try to parse integers first and fall back to floats if (number_type == token_type::value_unsigned) { const auto x = std::strtoull(token_buffer.data(), &endptr, 10); // we checked the number format before JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size()); if (errno == 0) { value_unsigned = static_cast<number_unsigned_t>(x); if (value_unsigned == x) { return token_type::value_unsigned; } } } else if (number_type == token_type::value_integer) { const auto x = std::strtoll(token_buffer.data(), &endptr, 10); // we checked the number format before JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size()); if (errno == 0) { value_integer = static_cast<number_integer_t>(x); if (value_integer == x) { return token_type::value_integer; } } } // this code is reached if we parse a floating-point number or if an // integer conversion above failed strtof(value_float, token_buffer.data(), &endptr); // we checked the number format before JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size()); return token_type::value_float; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_number(): pushq %rbp pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx callq 0x3c95c movl 0x14(%rbx), %eax leal -0x31(%rax), %ecx cmpl $0x9, %ecx jae 0x3c6e7 pushq $0x5 popq %rbp leaq 0x50(%rbx), %r14 movsbl %al, %esi movq %r14, %rdi callq 0xa5c0 movq %rbx, %rdi callq 0x3c8b0 leal -0x30(%rax), %ecx cmpl $0xa, %ecx jae 0x3c67b movsbl 0x14(%rbx), %esi jmp 0x3c65d cmpl $0x2e, %eax je 0x3c78b cmpl $0x45, %eax je 0x3c692 cmpl $0x65, %eax jne 0x3c7e3 movsbl 0x14(%rbx), %esi movq %r14, %rdi callq 0xa5c0 movq %rbx, %rdi callq 0x3c8b0 leal -0x30(%rax), %ecx cmpl $0xa, %ecx jae 0x3c71b leaq 0x50(%rbx), %r14 movsbl 0x14(%rbx), %esi movq %r14, %rdi callq 0xa5c0 leaq 0x50(%rbx), %r14 pushq $0x7 popq %rbp movq %rbx, %rdi callq 0x3c8b0 addl $-0x30, %eax cmpl $0x9, %eax ja 0x3c7e3 movsbl 0x14(%rbx), %esi movq %r14, %rdi callq 0xa5c0 jmp 0x3c6c5 cmpl $0x30, %eax je 0x3c759 cmpl $0x2d, %eax jne 0x3c6fd leaq 0x50(%rbx), %rdi pushq $0x2d popq %rsi callq 0xa5c0 movq %rbx, %rdi callq 0x3c8b0 leal -0x31(%rax), %ecx cmpl $0x9, %ecx jae 0x3c87d movl 0x14(%rbx), %eax pushq $0x6 jmp 0x3c655 cmpl $0x2d, %eax je 0x3c729 cmpl $0x2b, %eax jne 0x3c874 movsbl 0x14(%rbx), %esi leaq 0x50(%rbx), %r14 movq %r14, %rdi callq 0xa5c0 movq %rbx, %rdi callq 0x3c8b0 addl $-0x30, %eax cmpl $0xa, %eax jb 0x3c6b2 leaq 0x1142e(%rip), %rax # 0x4db82 jmp 0x3c89e leaq 0x50(%rbx), %rdi pushq $0x30 popq %rsi callq 0xa5c0 pushq $0x5 popq %rbp movq %rbx, %rdi callq 0x3c8b0 cmpl $0x65, %eax je 0x3c86b cmpl $0x45, %eax je 0x3c86b cmpl $0x2e, %eax jne 0x3c7e3 leaq 0x50(%rbx), %r14 movsbl 0x90(%rbx), %esi movq %r14, %rdi callq 0xa5c0 movq %rbx, %rdi callq 0x3c8b0 addl $-0x30, %eax cmpl $0x9, %eax ja 0x3c85a leaq 0x50(%rbx), %r14 movsbl 0x14(%rbx), %esi movq %r14, %rdi callq 0xa5c0 movq %rbx, %rdi callq 0x3c8b0 leal -0x30(%rax), %ecx cmpl $0xa, %ecx jb 0x3c7b2 cmpl $0x65, %eax je 0x3c692 cmpl $0x45, %eax je 0x3c692 pushq $0x7 popq %rbp movq %rbx, %rdi callq 0x3c926 andq $0x0, 0x8(%rsp) callq 0xa050 movq %rax, %r14 andl $0x0, (%rax) cmpl $0x6, %ebp je 0x3c828 cmpl $0x5, %ebp jne 0x3c83f movq 0x50(%rbx), %rdi leaq 0x8(%rsp), %rsi pushq $0xa popq %rdx callq 0xa860 cmpl $0x0, (%r14) jne 0x3c83f movq %rax, 0x80(%rbx) pushq $0x5 jmp 0x3c8a4 movq 0x50(%rbx), %rdi leaq 0x8(%rsp), %rsi pushq $0xa popq %rdx callq 0xac10 cmpl $0x0, (%r14) je 0x3c863 pushq $0x7 popq %rbp movq 0x50(%rbx), %rdi leaq 0x8(%rsp), %rsi callq 0xa560 movsd %xmm0, 0x88(%rbx) jmp 0x3c8a5 leaq 0x112bd(%rip), %rax # 0x4db1e jmp 0x3c89e movq %rax, 0x78(%rbx) pushq $0x6 jmp 0x3c8a4 leaq 0x50(%rbx), %r14 jmp 0x3c692 leaq 0x112cc(%rip), %rax # 0x4db47 jmp 0x3c89e cmpl $0x30, %eax jne 0x3c897 pushq $0x6 popq %rbp movsbl 0x14(%rbx), %esi leaq 0x50(%rbx), %rdi callq 0xa5c0 jmp 0x3c768 leaq 0x11257(%rip), %rax # 0x4daf5 movq %rax, 0x70(%rbx) pushq $0xe popq %rbp movl %ebp, %eax addq $0x10, %rsp popq %rbx popq %r14 popq %rbp retq
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE11scan_numberEv: push rbp push r14 push rbx sub rsp, 10h mov rbx, rdi call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5resetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::reset(void) mov eax, [rbx+14h] lea ecx, [rax-31h] cmp ecx, 9 jnb loc_3C6E7 push 5 loc_3C655: pop rbp lea r14, [rbx+50h] movsx esi, al loc_3C65D: mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) lea ecx, [rax-30h] cmp ecx, 0Ah jnb short loc_3C67B movsx esi, byte ptr [rbx+14h] jmp short loc_3C65D loc_3C67B: cmp eax, 2Eh ; '.' jz loc_3C78B cmp eax, 45h ; 'E' jz short loc_3C692 cmp eax, 65h ; 'e' jnz loc_3C7E3 loc_3C692: movsx esi, byte ptr [rbx+14h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) lea ecx, [rax-30h] cmp ecx, 0Ah jnb short loc_3C71B lea r14, [rbx+50h] loc_3C6B2: movsx esi, byte ptr [rbx+14h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) lea r14, [rbx+50h] push 7 pop rbp loc_3C6C5: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) add eax, 0FFFFFFD0h cmp eax, 9 ja loc_3C7E3 movsx esi, byte ptr [rbx+14h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) jmp short loc_3C6C5 loc_3C6E7: cmp eax, 30h ; '0' jz short loc_3C759 cmp eax, 2Dh ; '-' jnz short loc_3C6FD lea rdi, [rbx+50h] push 2Dh ; '-' pop rsi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) loc_3C6FD: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) lea ecx, [rax-31h] cmp ecx, 9 jnb loc_3C87D mov eax, [rbx+14h] push 6 jmp loc_3C655 loc_3C71B: cmp eax, 2Dh ; '-' jz short loc_3C729 cmp eax, 2Bh ; '+' jnz loc_3C874 loc_3C729: movsx esi, byte ptr [rbx+14h] lea r14, [rbx+50h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) add eax, 0FFFFFFD0h cmp eax, 0Ah jb loc_3C6B2 lea rax, aInvalidNumberE; "invalid number; expected digit after ex"... jmp loc_3C89E loc_3C759: lea rdi, [rbx+50h] push 30h ; '0' pop rsi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) push 5 pop rbp loc_3C768: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) cmp eax, 65h ; 'e' jz loc_3C86B cmp eax, 45h ; 'E' jz loc_3C86B cmp eax, 2Eh ; '.' jnz short loc_3C7E3 lea r14, [rbx+50h] loc_3C78B: movsx esi, byte ptr [rbx+90h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) add eax, 0FFFFFFD0h cmp eax, 9 ja loc_3C85A lea r14, [rbx+50h] loc_3C7B2: movsx esi, byte ptr [rbx+14h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) lea ecx, [rax-30h] cmp ecx, 0Ah jb short loc_3C7B2 cmp eax, 65h ; 'e' jz loc_3C692 cmp eax, 45h ; 'E' jz loc_3C692 push 7 pop rbp loc_3C7E3: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(void) and [rsp+28h+var_20], 0 call ___errno_location mov r14, rax and dword ptr [rax], 0 cmp ebp, 6 jz short loc_3C828 cmp ebp, 5 jnz short loc_3C83F mov rdi, [rbx+50h] lea rsi, [rsp+28h+var_20] push 0Ah pop rdx call _strtoull cmp dword ptr [r14], 0 jnz short loc_3C83F mov [rbx+80h], rax push 5 jmp short loc_3C8A4 loc_3C828: mov rdi, [rbx+50h] lea rsi, [rsp+28h+var_20] push 0Ah pop rdx call strtoll cmp dword ptr [r14], 0 jz short loc_3C863 loc_3C83F: push 7 pop rbp mov rdi, [rbx+50h] lea rsi, [rsp+28h+var_20] call _strtod movsd qword ptr [rbx+88h], xmm0 jmp short loc_3C8A5 loc_3C85A: lea rax, aInvalidNumberE_0; "invalid number; expected digit after '."... jmp short loc_3C89E loc_3C863: mov [rbx+78h], rax push 6 jmp short loc_3C8A4 loc_3C86B: lea r14, [rbx+50h] jmp loc_3C692 loc_3C874: lea rax, aInvalidNumberE_1; "invalid number; expected '+', '-', or d"... jmp short loc_3C89E loc_3C87D: cmp eax, 30h ; '0' jnz short loc_3C897 push 6 pop rbp movsx esi, byte ptr [rbx+14h] lea rdi, [rbx+50h] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) jmp loc_3C768 loc_3C897: lea rax, aInvalidNumberE_2; "invalid number; expected digit after '-"... loc_3C89E: mov [rbx+70h], rax push 0Eh loc_3C8A4: pop rbp loc_3C8A5: mov eax, ebp add rsp, 10h pop rbx pop r14 pop rbp retn
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_number( long long a1) { int v1; // eax int v2; // ebp long long v3; // r14 long long i; // rsi int v5; // eax int v6; // eax long long v7; // r14 int v8; // eax const char *v9; // rax int v10; // eax int v11; // eax _DWORD *v12; // r14 long long v13; // rax long long v14; // rax unsigned int v15; // ebp int v17; // [rsp-8h] [rbp-30h] _QWORD v19[4]; // [rsp+8h] [rbp-20h] BYREF 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(); v1 = *(_DWORD *)(a1 + 20); if ( (unsigned int)(v1 - 49) >= 9 ) { if ( v1 == 48 ) { i = 48LL; std::string::push_back(a1 + 80, 48LL); v2 = 5; } else { if ( v1 == 45 ) std::string::push_back(a1 + 80, 45LL); v8 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1); if ( (unsigned int)(v8 - 49) < 9 ) { v1 = *(_DWORD *)(a1 + 20); v17 = 6; goto LABEL_3; } if ( v8 != 48 ) { v9 = "invalid number; expected digit after '-'"; goto LABEL_47; } v2 = 6; i = (unsigned int)*(char *)(a1 + 20); std::string::push_back(a1 + 80, i); } v10 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1); if ( v10 == 101 || v10 == 69 ) { v3 = a1 + 80; goto LABEL_9; } if ( v10 != 46 ) goto LABEL_34; v3 = a1 + 80; LABEL_28: std::string::push_back(v3, (unsigned int)*(char *)(a1 + 144)); if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) - 48 > 9 ) { v9 = "invalid number; expected digit after '.'"; goto LABEL_47; } v3 = a1 + 80; do { i = (unsigned int)*(char *)(a1 + 20); std::string::push_back(a1 + 80, i); v11 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1); } while ( (unsigned int)(v11 - 48) < 0xA ); if ( v11 != 101 && v11 != 69 ) { v2 = 7; goto LABEL_34; } LABEL_9: std::string::push_back(v3, (unsigned int)*(char *)(a1 + 20)); v6 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1); if ( (unsigned int)(v6 - 48) < 0xA ) { v7 = a1 + 80; goto LABEL_11; } if ( v6 == 45 || v6 == 43 ) { v7 = a1 + 80; std::string::push_back(a1 + 80, (unsigned int)*(char *)(a1 + 20)); if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) - 48 < 0xA ) { LABEL_11: i = (unsigned int)*(char *)(a1 + 20); std::string::push_back(v7, i); v2 = 7; while ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) - 48 <= 9 ) { i = (unsigned int)*(char *)(a1 + 20); std::string::push_back(a1 + 80, i); } goto LABEL_34; } v9 = "invalid number; expected digit after exponent sign"; } else { v9 = "invalid number; expected '+', '-', or digit after exponent"; } LABEL_47: *(_QWORD *)(a1 + 112) = v9; return 14; } v17 = 5; LABEL_3: v2 = v17; v3 = a1 + 80; for ( i = (unsigned int)(char)v1; ; i = (unsigned int)*(char *)(a1 + 20) ) { std::string::push_back(a1 + 80, i); v5 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1); if ( (unsigned int)(v5 - 48) >= 0xA ) break; } if ( v5 == 46 ) goto LABEL_28; if ( v5 == 69 || v5 == 101 ) goto LABEL_9; LABEL_34: nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(a1); v19[0] = 0LL; v12 = (_DWORD *)__errno_location(a1, i); *v12 = 0; if ( v2 == 6 ) { v14 = strtoll(*(_QWORD *)(a1 + 80), v19, 10LL); if ( !*v12 ) { *(_QWORD *)(a1 + 120) = v14; return 6; } } else if ( v2 == 5 ) { v13 = strtoull(*(_QWORD *)(a1 + 80), v19, 10LL); if ( !*v12 ) { *(_QWORD *)(a1 + 128) = v13; return 5; } } v15 = 7; *(double *)(a1 + 136) = strtod(*(_QWORD *)(a1 + 80), v19); return v15; }
scan_number: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x10 MOV RBX,RDI CALL 0x0013c95c MOV EAX,dword ptr [RBX + 0x14] LEA ECX,[RAX + -0x31] CMP ECX,0x9 JNC 0x0013c6e7 PUSH 0x5 LAB_0013c655: POP RBP LEA R14,[RBX + 0x50] MOVSX ESI,AL LAB_0013c65d: MOV RDI,R14 CALL 0x0010a5c0 MOV RDI,RBX CALL 0x0013c8b0 LEA ECX,[RAX + -0x30] CMP ECX,0xa JNC 0x0013c67b MOVSX ESI,byte ptr [RBX + 0x14] JMP 0x0013c65d LAB_0013c67b: CMP EAX,0x2e JZ 0x0013c78b CMP EAX,0x45 JZ 0x0013c692 CMP EAX,0x65 JNZ 0x0013c7e3 LAB_0013c692: MOVSX ESI,byte ptr [RBX + 0x14] MOV RDI,R14 CALL 0x0010a5c0 MOV RDI,RBX CALL 0x0013c8b0 LEA ECX,[RAX + -0x30] CMP ECX,0xa JNC 0x0013c71b LEA R14,[RBX + 0x50] LAB_0013c6b2: MOVSX ESI,byte ptr [RBX + 0x14] MOV RDI,R14 CALL 0x0010a5c0 LEA R14,[RBX + 0x50] PUSH 0x7 POP RBP LAB_0013c6c5: MOV RDI,RBX CALL 0x0013c8b0 ADD EAX,-0x30 CMP EAX,0x9 JA 0x0013c7e3 MOVSX ESI,byte ptr [RBX + 0x14] MOV RDI,R14 CALL 0x0010a5c0 JMP 0x0013c6c5 LAB_0013c6e7: CMP EAX,0x30 JZ 0x0013c759 CMP EAX,0x2d JNZ 0x0013c6fd LEA RDI,[RBX + 0x50] PUSH 0x2d POP RSI CALL 0x0010a5c0 LAB_0013c6fd: MOV RDI,RBX CALL 0x0013c8b0 LEA ECX,[RAX + -0x31] CMP ECX,0x9 JNC 0x0013c87d MOV EAX,dword ptr [RBX + 0x14] PUSH 0x6 JMP 0x0013c655 LAB_0013c71b: CMP EAX,0x2d JZ 0x0013c729 CMP EAX,0x2b JNZ 0x0013c874 LAB_0013c729: MOVSX ESI,byte ptr [RBX + 0x14] LEA R14,[RBX + 0x50] MOV RDI,R14 CALL 0x0010a5c0 MOV RDI,RBX CALL 0x0013c8b0 ADD EAX,-0x30 CMP EAX,0xa JC 0x0013c6b2 LEA RAX,[0x14db82] JMP 0x0013c89e LAB_0013c759: LEA RDI,[RBX + 0x50] PUSH 0x30 POP RSI CALL 0x0010a5c0 PUSH 0x5 POP RBP LAB_0013c768: MOV RDI,RBX CALL 0x0013c8b0 CMP EAX,0x65 JZ 0x0013c86b CMP EAX,0x45 JZ 0x0013c86b CMP EAX,0x2e JNZ 0x0013c7e3 LEA R14,[RBX + 0x50] LAB_0013c78b: MOVSX ESI,byte ptr [RBX + 0x90] MOV RDI,R14 CALL 0x0010a5c0 MOV RDI,RBX CALL 0x0013c8b0 ADD EAX,-0x30 CMP EAX,0x9 JA 0x0013c85a LEA R14,[RBX + 0x50] LAB_0013c7b2: MOVSX ESI,byte ptr [RBX + 0x14] MOV RDI,R14 CALL 0x0010a5c0 MOV RDI,RBX CALL 0x0013c8b0 LEA ECX,[RAX + -0x30] CMP ECX,0xa JC 0x0013c7b2 CMP EAX,0x65 JZ 0x0013c692 CMP EAX,0x45 JZ 0x0013c692 PUSH 0x7 POP RBP LAB_0013c7e3: MOV RDI,RBX CALL 0x0013c926 AND qword ptr [RSP + 0x8],0x0 CALL 0x0010a050 MOV R14,RAX AND dword ptr [RAX],0x0 CMP EBP,0x6 JZ 0x0013c828 CMP EBP,0x5 JNZ 0x0013c83f MOV RDI,qword ptr [RBX + 0x50] LEA RSI,[RSP + 0x8] PUSH 0xa POP RDX CALL 0x0010a860 CMP dword ptr [R14],0x0 JNZ 0x0013c83f MOV qword ptr [RBX + 0x80],RAX PUSH 0x5 JMP 0x0013c8a4 LAB_0013c828: MOV RDI,qword ptr [RBX + 0x50] LEA RSI,[RSP + 0x8] PUSH 0xa POP RDX CALL 0x0010ac10 CMP dword ptr [R14],0x0 JZ 0x0013c863 LAB_0013c83f: PUSH 0x7 POP RBP MOV RDI,qword ptr [RBX + 0x50] LEA RSI,[RSP + 0x8] CALL 0x0010a560 MOVSD qword ptr [RBX + 0x88],XMM0 JMP 0x0013c8a5 LAB_0013c85a: LEA RAX,[0x14db1e] JMP 0x0013c89e LAB_0013c863: MOV qword ptr [RBX + 0x78],RAX PUSH 0x6 JMP 0x0013c8a4 LAB_0013c86b: LEA R14,[RBX + 0x50] JMP 0x0013c692 LAB_0013c874: LEA RAX,[0x14db47] JMP 0x0013c89e LAB_0013c87d: CMP EAX,0x30 JNZ 0x0013c897 PUSH 0x6 POP RBP MOVSX ESI,byte ptr [RBX + 0x14] LEA RDI,[RBX + 0x50] CALL 0x0010a5c0 JMP 0x0013c768 LAB_0013c897: LEA RAX,[0x14daf5] LAB_0013c89e: MOV qword ptr [RBX + 0x70],RAX PUSH 0xe LAB_0013c8a4: POP RBP LAB_0013c8a5: MOV EAX,EBP ADD RSP,0x10 POP RBX POP R14 POP RBP RET
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::scan_number() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::scan_number(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) { char cVar1; int iVar2; int iVar3; char *pcVar4; int *piVar5; ulonglong uVar6; longlong lVar7; double dVar8; int8 uStack_30; char *local_20; reset(this); iVar3 = *(int *)(this + 0x14); cVar1 = (char)this; if (iVar3 - 0x31U < 9) { iVar3 = 5; LAB_0013c655: do { std::__cxx11::string::push_back(cVar1 + 'P'); iVar2 = get(this); } while (iVar2 - 0x30U < 10); if (iVar2 == 0x2e) { LAB_0013c78b: std::__cxx11::string::push_back(cVar1 + 'P'); iVar3 = get(this); if (9 < iVar3 - 0x30U) { pcVar4 = "invalid number; expected digit after \'.\'"; goto LAB_0013c89e; } do { std::__cxx11::string::push_back(cVar1 + 'P'); iVar3 = get(this); } while (iVar3 - 0x30U < 10); if ((iVar3 == 0x65) || (iVar3 == 0x45)) goto LAB_0013c692; iVar3 = 7; } else if ((iVar2 == 0x45) || (iVar2 == 0x65)) { LAB_0013c692: std::__cxx11::string::push_back(cVar1 + 'P'); iVar3 = get(this); if (9 < iVar3 - 0x30U) { if ((iVar3 == 0x2d) || (iVar3 == 0x2b)) { std::__cxx11::string::push_back(cVar1 + 'P'); iVar3 = get(this); if (iVar3 - 0x30U < 10) goto LAB_0013c6b2; pcVar4 = "invalid number; expected digit after exponent sign"; } else { pcVar4 = "invalid number; expected \'+\', \'-\', or digit after exponent"; } goto LAB_0013c89e; } LAB_0013c6b2: std::__cxx11::string::push_back(cVar1 + 'P'); iVar3 = 7; while (iVar2 = get(this), iVar2 - 0x30U < 10) { std::__cxx11::string::push_back(cVar1 + 'P'); } } LAB_0013c7e3: unget(this); local_20 = (char *)0x0; piVar5 = __errno_location(); *piVar5 = 0; if (iVar3 == 6) { lVar7 = strtoll(*(char **)(this + 0x50),&local_20,10); if (*piVar5 == 0) { *(longlong *)(this + 0x78) = lVar7; return 6; } } else if ((iVar3 == 5) && (uVar6 = strtoull(*(char **)(this + 0x50),&local_20,10), *piVar5 == 0)) { *(ulonglong *)(this + 0x80) = uVar6; return 5; } uStack_30 = 7; dVar8 = strtod(*(char **)(this + 0x50),&local_20); *(double *)(this + 0x88) = dVar8; } else { if (iVar3 == 0x30) { std::__cxx11::string::push_back(cVar1 + 'P'); iVar3 = 5; LAB_0013c768: iVar2 = get(this); if ((iVar2 == 0x65) || (iVar2 == 0x45)) goto LAB_0013c692; if (iVar2 != 0x2e) goto LAB_0013c7e3; goto LAB_0013c78b; } if (iVar3 == 0x2d) { std::__cxx11::string::push_back(cVar1 + 'P'); } iVar3 = get(this); if (iVar3 - 0x31U < 9) { iVar3 = 6; goto LAB_0013c655; } if (iVar3 == 0x30) { iVar3 = 6; std::__cxx11::string::push_back(cVar1 + 'P'); goto LAB_0013c768; } pcVar4 = "invalid number; expected digit after \'-\'"; LAB_0013c89e: *(char **)(this + 0x70) = pcVar4; uStack_30 = 0xe; } return uStack_30; }
11,663
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_number()
hkr04[P]cpp-mcp/common/json.hpp
token_type scan_number() // lgtm [cpp/use-of-goto] { // reset token_buffer to store the number's bytes reset(); // the type of the parsed number; initially set to unsigned; will be // changed if minus sign, decimal point or exponent is read token_type number_type = token_type::value_unsigned; // state (init): we just found out we need to scan a number switch (current) { case '-': { add(current); goto scan_number_minus; } case '0': { add(current); goto scan_number_zero; } case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any1; } // all other characters are rejected outside scan_number() default: // LCOV_EXCL_LINE JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE } scan_number_minus: // state: we just parsed a leading minus sign number_type = token_type::value_integer; switch (get()) { case '0': { add(current); goto scan_number_zero; } case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any1; } default: { error_message = "invalid number; expected digit after '-'"; return token_type::parse_error; } } scan_number_zero: // state: we just parse a zero (maybe with a leading minus sign) switch (get()) { case '.': { add(decimal_point_char); goto scan_number_decimal1; } case 'e': case 'E': { add(current); goto scan_number_exponent; } default: goto scan_number_done; } scan_number_any1: // state: we just parsed a number 0-9 (maybe with a leading minus sign) switch (get()) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any1; } case '.': { add(decimal_point_char); goto scan_number_decimal1; } case 'e': case 'E': { add(current); goto scan_number_exponent; } default: goto scan_number_done; } scan_number_decimal1: // state: we just parsed a decimal point number_type = token_type::value_float; switch (get()) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_decimal2; } default: { error_message = "invalid number; expected digit after '.'"; return token_type::parse_error; } } scan_number_decimal2: // we just parsed at least one number after a decimal point switch (get()) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_decimal2; } case 'e': case 'E': { add(current); goto scan_number_exponent; } default: goto scan_number_done; } scan_number_exponent: // we just parsed an exponent number_type = token_type::value_float; switch (get()) { case '+': case '-': { add(current); goto scan_number_sign; } case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any2; } default: { error_message = "invalid number; expected '+', '-', or digit after exponent"; return token_type::parse_error; } } scan_number_sign: // we just parsed an exponent sign switch (get()) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any2; } default: { error_message = "invalid number; expected digit after exponent sign"; return token_type::parse_error; } } scan_number_any2: // we just parsed a number after the exponent or exponent sign switch (get()) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any2; } default: goto scan_number_done; } scan_number_done: // unget the character after the number (we only read it to know that // we are done scanning a number) unget(); char* endptr = nullptr; // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg) errno = 0; // try to parse integers first and fall back to floats if (number_type == token_type::value_unsigned) { const auto x = std::strtoull(token_buffer.data(), &endptr, 10); // we checked the number format before JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size()); if (errno == 0) { value_unsigned = static_cast<number_unsigned_t>(x); if (value_unsigned == x) { return token_type::value_unsigned; } } } else if (number_type == token_type::value_integer) { const auto x = std::strtoll(token_buffer.data(), &endptr, 10); // we checked the number format before JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size()); if (errno == 0) { value_integer = static_cast<number_integer_t>(x); if (value_integer == x) { return token_type::value_integer; } } } // this code is reached if we parse a floating-point number or if an // integer conversion above failed strtof(value_float, token_buffer.data(), &endptr); // we checked the number format before JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size()); return token_type::value_float; }
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>>>>>::scan_number(): pushq %rbp pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx callq 0x47ffe movl 0x14(%rbx), %eax movl $0x5, %ebp leal -0x31(%rax), %ecx cmpl $0x9, %ecx jae 0x47dd4 leaq 0x50(%rbx), %r14 movsbl %al, %esi movq %r14, %rdi callq 0xa560 movq %rbx, %rdi callq 0xb0ac leal -0x30(%rax), %ecx cmpl $0xa, %ecx jae 0x47d83 movsbl 0x14(%rbx), %esi jmp 0x47d65 cmpl $0x2e, %eax je 0x47eb0 cmpl $0x45, %eax je 0x47d9a cmpl $0x65, %eax jne 0x47ee5 movsbl 0x14(%rbx), %esi movq %r14, %rdi callq 0xa560 movq %rbx, %rdi callq 0xb0ac leal -0x30(%rax), %ecx cmpl $0xa, %ecx jb 0x47e19 cmpl $0x2d, %eax je 0x47f80 cmpl $0x2b, %eax je 0x47f80 leaq 0x12d9c(%rip), %rax # 0x5ab6b jmp 0x47eda cmpl $0x30, %eax je 0x47e7a cmpl $0x2d, %eax jne 0x47df0 leaq 0x50(%rbx), %rdi movl $0x2d, %esi callq 0xa560 movq %rbx, %rdi callq 0xb0ac leal -0x31(%rax), %ecx cmpl $0x9, %ecx jb 0x47f5f cmpl $0x30, %eax je 0x47fe7 leaq 0x12d05(%rip), %rax # 0x5ab19 jmp 0x47eda leaq 0x50(%rbx), %r14 movsbl 0x14(%rbx), %esi movq %r14, %rdi callq 0xa560 movq %rbx, %rdi callq 0xb0ac addl $-0x30, %eax cmpl $0x9, %eax ja 0x47e59 leaq 0x50(%rbx), %r14 movsbl 0x14(%rbx), %esi movq %r14, %rdi callq 0xa560 movq %rbx, %rdi callq 0xb0ac addl $-0x30, %eax cmpl $0xa, %eax jb 0x47e3d movq %rbx, %rdi callq 0xb122 movq $0x0, 0x8(%rsp) callq 0xa060 movl $0x0, (%rax) jmp 0x47f3b leaq 0x50(%rbx), %rdi movl $0x30, %esi callq 0xa560 movl $0x5, %ebp movq %rbx, %rdi callq 0xb0ac cmpl $0x65, %eax je 0x47f6c cmpl $0x45, %eax je 0x47f6c cmpl $0x2e, %eax jne 0x47ee5 leaq 0x50(%rbx), %r14 movsbl 0x90(%rbx), %esi movq %r14, %rdi callq 0xa560 movq %rbx, %rdi callq 0xb0ac addl $-0x30, %eax cmpl $0x9, %eax jbe 0x47fb0 leaq 0x12c68(%rip), %rax # 0x5ab42 movq %rax, 0x70(%rbx) movl $0xe, %eax jmp 0x47f56 movq %rbx, %rdi callq 0xb122 movq $0x0, 0x8(%rsp) callq 0xa060 movq %rax, %r14 movl $0x0, (%rax) movq 0x50(%rbx), %rdi leaq 0x8(%rsp), %rsi movl $0xa, %edx cmpl $0x5, %ebp jne 0x47f30 callq 0xa7f0 cmpl $0x0, (%r14) jne 0x47f3b movq %rax, 0x80(%rbx) movl $0x5, %eax jmp 0x47f56 callq 0xa0c0 cmpl $0x0, (%r14) je 0x47f75 movq 0x50(%rbx), %rdi leaq 0x8(%rsp), %rsi callq 0xa500 movsd %xmm0, 0x88(%rbx) movl $0x7, %eax addq $0x10, %rsp popq %rbx popq %r14 popq %rbp retq movl 0x14(%rbx), %eax movl $0x6, %ebp jmp 0x47d5e leaq 0x50(%rbx), %r14 jmp 0x47d9a movq %rax, 0x78(%rbx) movl $0x6, %eax jmp 0x47f56 movsbl 0x14(%rbx), %esi leaq 0x50(%rbx), %r14 movq %r14, %rdi callq 0xa560 movq %rbx, %rdi callq 0xb0ac addl $-0x30, %eax cmpl $0xa, %eax jb 0x47e1d leaq 0x12bfb(%rip), %rax # 0x5aba6 jmp 0x47eda leaq 0x50(%rbx), %r14 movsbl 0x14(%rbx), %esi movq %r14, %rdi callq 0xa560 movq %rbx, %rdi callq 0xb0ac leal -0x30(%rax), %ecx cmpl $0xa, %ecx jb 0x47fb4 cmpl $0x65, %eax je 0x47d9a cmpl $0x45, %eax je 0x47d9a jmp 0x47e59 movsbl 0x14(%rbx), %esi leaq 0x50(%rbx), %rdi callq 0xa560 movl $0x6, %ebp jmp 0x47e8d
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE11scan_numberEv: push rbp push r14 push rbx sub rsp, 10h mov rbx, rdi call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5resetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::reset(void) mov eax, [rbx+14h] mov ebp, 5 lea ecx, [rax-31h] cmp ecx, 9 jnb short loc_47DD4 loc_47D5E: lea r14, [rbx+50h] movsx esi, al loc_47D65: mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) lea ecx, [rax-30h] cmp ecx, 0Ah jnb short loc_47D83 movsx esi, byte ptr [rbx+14h] jmp short loc_47D65 loc_47D83: cmp eax, 2Eh ; '.' jz loc_47EB0 cmp eax, 45h ; 'E' jz short loc_47D9A cmp eax, 65h ; 'e' jnz loc_47EE5 loc_47D9A: movsx esi, byte ptr [rbx+14h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) lea ecx, [rax-30h] cmp ecx, 0Ah jb short loc_47E19 cmp eax, 2Dh ; '-' jz loc_47F80 cmp eax, 2Bh ; '+' jz loc_47F80 lea rax, aInvalidNumberE; "invalid number; expected '+', '-', or d"... jmp loc_47EDA loc_47DD4: cmp eax, 30h ; '0' jz loc_47E7A cmp eax, 2Dh ; '-' jnz short loc_47DF0 lea rdi, [rbx+50h] mov esi, 2Dh ; '-' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) loc_47DF0: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) lea ecx, [rax-31h] cmp ecx, 9 jb loc_47F5F cmp eax, 30h ; '0' jz loc_47FE7 lea rax, aInvalidNumberE_0; "invalid number; expected digit after '-"... jmp loc_47EDA loc_47E19: lea r14, [rbx+50h] loc_47E1D: movsx esi, byte ptr [rbx+14h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) add eax, 0FFFFFFD0h cmp eax, 9 ja short loc_47E59 lea r14, [rbx+50h] loc_47E3D: movsx esi, byte ptr [rbx+14h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) add eax, 0FFFFFFD0h cmp eax, 0Ah jb short loc_47E3D loc_47E59: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(void) mov [rsp+28h+var_20], 0 call ___errno_location mov dword ptr [rax], 0 jmp loc_47F3B loc_47E7A: lea rdi, [rbx+50h] mov esi, 30h ; '0' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov ebp, 5 loc_47E8D: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) cmp eax, 65h ; 'e' jz loc_47F6C cmp eax, 45h ; 'E' jz loc_47F6C cmp eax, 2Eh ; '.' jnz short loc_47EE5 lea r14, [rbx+50h] loc_47EB0: movsx esi, byte ptr [rbx+90h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) add eax, 0FFFFFFD0h cmp eax, 9 jbe loc_47FB0 lea rax, aInvalidNumberE_1; "invalid number; expected digit after '."... loc_47EDA: mov [rbx+70h], rax mov eax, 0Eh jmp short loc_47F56 loc_47EE5: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(void) mov [rsp+28h+var_20], 0 call ___errno_location mov r14, rax mov dword ptr [rax], 0 mov rdi, [rbx+50h] lea rsi, [rsp+28h+var_20] mov edx, 0Ah cmp ebp, 5 jnz short loc_47F30 call _strtoull cmp dword ptr [r14], 0 jnz short loc_47F3B mov [rbx+80h], rax mov eax, 5 jmp short loc_47F56 loc_47F30: call _strtoll cmp dword ptr [r14], 0 jz short loc_47F75 loc_47F3B: mov rdi, [rbx+50h] lea rsi, [rsp+28h+var_20] call _strtod movsd qword ptr [rbx+88h], xmm0 mov eax, 7 loc_47F56: add rsp, 10h pop rbx pop r14 pop rbp retn loc_47F5F: mov eax, [rbx+14h] mov ebp, 6 jmp loc_47D5E loc_47F6C: lea r14, [rbx+50h] jmp loc_47D9A loc_47F75: mov [rbx+78h], rax mov eax, 6 jmp short loc_47F56 loc_47F80: movsx esi, byte ptr [rbx+14h] lea r14, [rbx+50h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) add eax, 0FFFFFFD0h cmp eax, 0Ah jb loc_47E1D lea rax, aInvalidNumberE_2; "invalid number; expected digit after ex"... jmp loc_47EDA loc_47FB0: lea r14, [rbx+50h] loc_47FB4: movsx esi, byte ptr [rbx+14h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) lea ecx, [rax-30h] cmp ecx, 0Ah jb short loc_47FB4 cmp eax, 65h ; 'e' jz loc_47D9A cmp eax, 45h ; 'E' jz loc_47D9A jmp loc_47E59 loc_47FE7: movsx esi, byte ptr [rbx+14h] lea rdi, [rbx+50h] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov ebp, 6 jmp loc_47E8D
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>>>::scan_number( long long a1) { int v2; // eax int v3; // ebp long long v4; // r14 long long i; // rsi int v6; // eax int v7; // eax const char *v8; // rax int v9; // eax long long v10; // r14 long long v11; // rsi long long v12; // rdx long long v13; // rcx long long v14; // r8 long long v15; // r9 int v16; // eax long long v18; // rdx long long v19; // rcx long long v20; // r8 long long v21; // r9 _DWORD *v22; // r14 long long v23; // rdi long long v24; // rax long long v25; // rax int v26; // eax _QWORD v27[4]; // [rsp+8h] [rbp-20h] BYREF 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(); v2 = *(_DWORD *)(a1 + 20); v3 = 5; if ( (unsigned int)(v2 - 49) >= 9 ) { if ( v2 == 48 ) { i = 48LL; std::string::push_back(a1 + 80, 48LL); v3 = 5; } else { if ( v2 == 45 ) std::string::push_back(a1 + 80, 45LL); v9 = 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); if ( (unsigned int)(v9 - 49) < 9 ) { v2 = *(_DWORD *)(a1 + 20); v3 = 6; goto LABEL_2; } if ( v9 != 48 ) { v8 = "invalid number; expected digit after '-'"; goto LABEL_29; } i = (unsigned int)*(char *)(a1 + 20); std::string::push_back(a1 + 80, i); v3 = 6; } v16 = 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); if ( v16 == 101 || v16 == 69 ) { v4 = a1 + 80; goto LABEL_8; } if ( v16 != 46 ) goto LABEL_30; v4 = a1 + 80; LABEL_27: std::string::push_back(v4, (unsigned int)*(char *)(a1 + 144)); if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1) - 48 > 9 ) { v8 = "invalid number; expected digit after '.'"; goto LABEL_29; } v4 = a1 + 80; do { v11 = (unsigned int)*(char *)(a1 + 20); std::string::push_back(a1 + 80, v11); v26 = 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); } while ( (unsigned int)(v26 - 48) < 0xA ); if ( v26 != 101 && v26 != 69 ) { LABEL_21: nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(a1); v27[0] = 0LL; *(_DWORD *)__errno_location(a1, v11, v12, v13, v14, v15) = 0; goto LABEL_34; } LABEL_8: std::string::push_back(v4, (unsigned int)*(char *)(a1 + 20)); v7 = 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); if ( (unsigned int)(v7 - 48) < 0xA ) { v10 = a1 + 80; } else { if ( v7 != 45 && v7 != 43 ) { v8 = "invalid number; expected '+', '-', or digit after exponent"; LABEL_29: *(_QWORD *)(a1 + 112) = v8; return 14LL; } v10 = a1 + 80; std::string::push_back(a1 + 80, (unsigned int)*(char *)(a1 + 20)); if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1) - 48 >= 0xA ) { v8 = "invalid number; expected digit after exponent sign"; goto LABEL_29; } } v11 = (unsigned int)*(char *)(a1 + 20); std::string::push_back(v10, v11); if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1) - 48 <= 9 ) { do { v11 = (unsigned int)*(char *)(a1 + 20); std::string::push_back(a1 + 80, v11); } while ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1) - 48 < 0xA ); } goto LABEL_21; } LABEL_2: v4 = a1 + 80; for ( i = (unsigned int)(char)v2; ; i = (unsigned int)*(char *)(a1 + 20) ) { std::string::push_back(a1 + 80, i); v6 = 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); if ( (unsigned int)(v6 - 48) >= 0xA ) break; } if ( v6 == 46 ) goto LABEL_27; if ( v6 == 69 || v6 == 101 ) goto LABEL_8; LABEL_30: nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(a1); v27[0] = 0LL; v22 = (_DWORD *)__errno_location(a1, i, v18, v19, v20, v21); *v22 = 0; v23 = *(_QWORD *)(a1 + 80); if ( v3 == 5 ) { v24 = strtoull(v23, v27, 10LL); if ( !*v22 ) { *(_QWORD *)(a1 + 128) = v24; return 5LL; } goto LABEL_34; } v25 = strtoll(v23, v27, 10LL); if ( *v22 ) { LABEL_34: *(double *)(a1 + 136) = strtod(*(_QWORD *)(a1 + 80), v27); return 7LL; } *(_QWORD *)(a1 + 120) = v25; return 6LL; }
scan_number: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x10 MOV RBX,RDI CALL 0x00147ffe MOV EAX,dword ptr [RBX + 0x14] MOV EBP,0x5 LEA ECX,[RAX + -0x31] CMP ECX,0x9 JNC 0x00147dd4 LAB_00147d5e: LEA R14,[RBX + 0x50] MOVSX ESI,AL LAB_00147d65: MOV RDI,R14 CALL 0x0010a560 MOV RDI,RBX CALL 0x0010b0ac LEA ECX,[RAX + -0x30] CMP ECX,0xa JNC 0x00147d83 MOVSX ESI,byte ptr [RBX + 0x14] JMP 0x00147d65 LAB_00147d83: CMP EAX,0x2e JZ 0x00147eb0 CMP EAX,0x45 JZ 0x00147d9a CMP EAX,0x65 JNZ 0x00147ee5 LAB_00147d9a: MOVSX ESI,byte ptr [RBX + 0x14] MOV RDI,R14 CALL 0x0010a560 MOV RDI,RBX CALL 0x0010b0ac LEA ECX,[RAX + -0x30] CMP ECX,0xa JC 0x00147e19 CMP EAX,0x2d JZ 0x00147f80 CMP EAX,0x2b JZ 0x00147f80 LEA RAX,[0x15ab6b] JMP 0x00147eda LAB_00147dd4: CMP EAX,0x30 JZ 0x00147e7a CMP EAX,0x2d JNZ 0x00147df0 LEA RDI,[RBX + 0x50] MOV ESI,0x2d CALL 0x0010a560 LAB_00147df0: MOV RDI,RBX CALL 0x0010b0ac LEA ECX,[RAX + -0x31] CMP ECX,0x9 JC 0x00147f5f CMP EAX,0x30 JZ 0x00147fe7 LEA RAX,[0x15ab19] JMP 0x00147eda LAB_00147e19: LEA R14,[RBX + 0x50] LAB_00147e1d: MOVSX ESI,byte ptr [RBX + 0x14] MOV RDI,R14 CALL 0x0010a560 MOV RDI,RBX CALL 0x0010b0ac ADD EAX,-0x30 CMP EAX,0x9 JA 0x00147e59 LEA R14,[RBX + 0x50] LAB_00147e3d: MOVSX ESI,byte ptr [RBX + 0x14] MOV RDI,R14 CALL 0x0010a560 MOV RDI,RBX CALL 0x0010b0ac ADD EAX,-0x30 CMP EAX,0xa JC 0x00147e3d LAB_00147e59: MOV RDI,RBX CALL 0x0010b122 MOV qword ptr [RSP + 0x8],0x0 CALL 0x0010a060 MOV dword ptr [RAX],0x0 JMP 0x00147f3b LAB_00147e7a: LEA RDI,[RBX + 0x50] MOV ESI,0x30 CALL 0x0010a560 MOV EBP,0x5 LAB_00147e8d: MOV RDI,RBX CALL 0x0010b0ac CMP EAX,0x65 JZ 0x00147f6c CMP EAX,0x45 JZ 0x00147f6c CMP EAX,0x2e JNZ 0x00147ee5 LEA R14,[RBX + 0x50] LAB_00147eb0: MOVSX ESI,byte ptr [RBX + 0x90] MOV RDI,R14 CALL 0x0010a560 MOV RDI,RBX CALL 0x0010b0ac ADD EAX,-0x30 CMP EAX,0x9 JBE 0x00147fb0 LEA RAX,[0x15ab42] LAB_00147eda: MOV qword ptr [RBX + 0x70],RAX MOV EAX,0xe JMP 0x00147f56 LAB_00147ee5: MOV RDI,RBX CALL 0x0010b122 MOV qword ptr [RSP + 0x8],0x0 CALL 0x0010a060 MOV R14,RAX MOV dword ptr [RAX],0x0 MOV RDI,qword ptr [RBX + 0x50] LEA RSI,[RSP + 0x8] MOV EDX,0xa CMP EBP,0x5 JNZ 0x00147f30 CALL 0x0010a7f0 CMP dword ptr [R14],0x0 JNZ 0x00147f3b MOV qword ptr [RBX + 0x80],RAX MOV EAX,0x5 JMP 0x00147f56 LAB_00147f30: CALL 0x0010a0c0 CMP dword ptr [R14],0x0 JZ 0x00147f75 LAB_00147f3b: MOV RDI,qword ptr [RBX + 0x50] LEA RSI,[RSP + 0x8] CALL 0x0010a500 MOVSD qword ptr [RBX + 0x88],XMM0 MOV EAX,0x7 LAB_00147f56: ADD RSP,0x10 POP RBX POP R14 POP RBP RET LAB_00147f5f: MOV EAX,dword ptr [RBX + 0x14] MOV EBP,0x6 JMP 0x00147d5e LAB_00147f6c: LEA R14,[RBX + 0x50] JMP 0x00147d9a LAB_00147f75: MOV qword ptr [RBX + 0x78],RAX MOV EAX,0x6 JMP 0x00147f56 LAB_00147f80: MOVSX ESI,byte ptr [RBX + 0x14] LEA R14,[RBX + 0x50] MOV RDI,R14 CALL 0x0010a560 MOV RDI,RBX CALL 0x0010b0ac ADD EAX,-0x30 CMP EAX,0xa JC 0x00147e1d LEA RAX,[0x15aba6] JMP 0x00147eda LAB_00147fb0: LEA R14,[RBX + 0x50] LAB_00147fb4: MOVSX ESI,byte ptr [RBX + 0x14] MOV RDI,R14 CALL 0x0010a560 MOV RDI,RBX CALL 0x0010b0ac LEA ECX,[RAX + -0x30] CMP ECX,0xa JC 0x00147fb4 CMP EAX,0x65 JZ 0x00147d9a CMP EAX,0x45 JZ 0x00147d9a JMP 0x00147e59 LAB_00147fe7: MOVSX ESI,byte ptr [RBX + 0x14] LEA RDI,[RBX + 0x50] CALL 0x0010a560 MOV EBP,0x6 JMP 0x00147e8d
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::scan_number() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::scan_number(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) { char cVar1; int iVar2; char *pcVar3; int *piVar4; ulonglong uVar5; longlong lVar6; int iVar7; double dVar8; char *local_20; reset(this); iVar2 = *(int *)(this + 0x14); iVar7 = 5; cVar1 = (char)this; if (iVar2 - 0x31U < 9) { LAB_00147d5e: do { std::__cxx11::string::push_back(cVar1 + 'P'); iVar2 = get(this); } while (iVar2 - 0x30U < 10); if (iVar2 != 0x2e) { if ((iVar2 != 0x45) && (iVar2 != 0x65)) { LAB_00147ee5: unget(this); local_20 = (char *)0x0; piVar4 = __errno_location(); *piVar4 = 0; if (iVar7 == 5) { uVar5 = strtoull(*(char **)(this + 0x50),&local_20,10); if (*piVar4 == 0) { *(ulonglong *)(this + 0x80) = uVar5; return 5; } } else { lVar6 = strtoll(*(char **)(this + 0x50),&local_20,10); if (*piVar4 == 0) { *(longlong *)(this + 0x78) = lVar6; return 6; } } goto LAB_00147f3b; } goto LAB_00147d9a; } LAB_00147eb0: std::__cxx11::string::push_back(cVar1 + 'P'); iVar2 = get(this); if (9 < iVar2 - 0x30U) { pcVar3 = "invalid number; expected digit after \'.\'"; goto LAB_00147eda; } do { std::__cxx11::string::push_back(cVar1 + 'P'); iVar2 = get(this); } while (iVar2 - 0x30U < 10); if ((iVar2 == 0x65) || (iVar2 == 0x45)) goto LAB_00147d9a; } else { if (iVar2 == 0x30) { std::__cxx11::string::push_back(cVar1 + 'P'); iVar7 = 5; } else { if (iVar2 == 0x2d) { std::__cxx11::string::push_back(cVar1 + 'P'); } iVar2 = get(this); if (iVar2 - 0x31U < 9) { iVar7 = 6; goto LAB_00147d5e; } if (iVar2 != 0x30) { pcVar3 = "invalid number; expected digit after \'-\'"; goto LAB_00147eda; } std::__cxx11::string::push_back(cVar1 + 'P'); iVar7 = 6; } iVar2 = get(this); if ((iVar2 != 0x65) && (iVar2 != 0x45)) { if (iVar2 != 0x2e) goto LAB_00147ee5; goto LAB_00147eb0; } LAB_00147d9a: std::__cxx11::string::push_back(cVar1 + 'P'); iVar2 = get(this); if (9 < iVar2 - 0x30U) { if ((iVar2 != 0x2d) && (iVar2 != 0x2b)) { pcVar3 = "invalid number; expected \'+\', \'-\', or digit after exponent"; LAB_00147eda: *(char **)(this + 0x70) = pcVar3; return 0xe; } std::__cxx11::string::push_back(cVar1 + 'P'); iVar2 = get(this); if (9 < iVar2 - 0x30U) { pcVar3 = "invalid number; expected digit after exponent sign"; goto LAB_00147eda; } } std::__cxx11::string::push_back(cVar1 + 'P'); iVar2 = get(this); if (iVar2 - 0x30U < 10) { do { std::__cxx11::string::push_back(cVar1 + 'P'); iVar2 = get(this); } while (iVar2 - 0x30U < 10); } } unget(this); local_20 = (char *)0x0; piVar4 = __errno_location(); *piVar4 = 0; LAB_00147f3b: dVar8 = strtod(*(char **)(this + 0x50),&local_20); *(double *)(this + 0x88) = dVar8; return 7; }
11,664
cli_report_progress
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static int cli_report_progress(MYSQL *mysql, uchar *packet, uint length) { uint stage, max_stage, proc_length; double progress; uchar *start= packet; if (length < 5) return 1; /* Wrong packet */ if (!(mysql->options.extension && mysql->options.extension->report_progress)) return 0; /* No callback, ignore packet */ packet++; /* Ignore number of strings */ stage= (uint) *packet++; max_stage= (uint) *packet++; progress= uint3korr(packet)/1000.0; packet+= 3; proc_length= net_field_length(&packet); if (packet + proc_length > start + length) return 1; /* Wrong packet */ (*mysql->options.extension->report_progress)(mysql, stage, max_stage, progress, (char*) packet, proc_length); return 0; }
O0
c
cli_report_progress: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x38(%rbp) cmpl $0x5, -0x1c(%rbp) jae 0x309dd movl $0x1, -0x4(%rbp) jmp 0x30ad0 movq -0x10(%rbp), %rax cmpq $0x0, 0x480(%rax) je 0x30a00 movq -0x10(%rbp), %rax movq 0x480(%rax), %rax cmpq $0x0, 0x80(%rax) jne 0x30a0c movl $0x0, -0x4(%rbp) jmp 0x30ad0 movq -0x18(%rbp), %rax incq %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq %rax, %rcx incq %rcx movq %rcx, -0x18(%rbp) movzbl (%rax), %eax movl %eax, -0x20(%rbp) movq -0x18(%rbp), %rax movq %rax, %rcx incq %rcx movq %rcx, -0x18(%rbp) movzbl (%rax), %eax movl %eax, -0x24(%rbp) movq -0x18(%rbp), %rcx movzwl (%rcx), %eax movzbl 0x2(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax cvtsi2sd %eax, %xmm0 movsd 0x34a95(%rip), %xmm1 # 0x654f0 divsd %xmm1, %xmm0 movsd %xmm0, -0x30(%rbp) movq -0x18(%rbp), %rax addq $0x3, %rax movq %rax, -0x18(%rbp) leaq -0x18(%rbp), %rdi callq 0x30ae0 movl %eax, -0x28(%rbp) movq -0x18(%rbp), %rax movl -0x28(%rbp), %ecx addq %rcx, %rax movq -0x38(%rbp), %rcx movl -0x1c(%rbp), %edx addq %rdx, %rcx cmpq %rcx, %rax jbe 0x30a9e movl $0x1, -0x4(%rbp) jmp 0x30ad0 movq -0x10(%rbp), %rax movq 0x480(%rax), %rax movq 0x80(%rax), %rax movq -0x10(%rbp), %rdi movl -0x20(%rbp), %esi movl -0x24(%rbp), %edx movsd -0x30(%rbp), %xmm0 movq -0x18(%rbp), %rcx movl -0x28(%rbp), %r8d callq *%rax movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopl (%rax)
cli_report_progress: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov rax, [rbp+var_18] mov [rbp+var_38], rax cmp [rbp+var_1C], 5 jnb short loc_309DD mov [rbp+var_4], 1 jmp loc_30AD0 loc_309DD: mov rax, [rbp+var_10] cmp qword ptr [rax+480h], 0 jz short loc_30A00 mov rax, [rbp+var_10] mov rax, [rax+480h] cmp qword ptr [rax+80h], 0 jnz short loc_30A0C loc_30A00: mov [rbp+var_4], 0 jmp loc_30AD0 loc_30A0C: mov rax, [rbp+var_18] inc rax mov [rbp+var_18], rax mov rax, [rbp+var_18] mov rcx, rax inc rcx mov [rbp+var_18], rcx movzx eax, byte ptr [rax] mov [rbp+var_20], eax mov rax, [rbp+var_18] mov rcx, rax inc rcx mov [rbp+var_18], rcx movzx eax, byte ptr [rax] mov [rbp+var_24], eax mov rcx, [rbp+var_18] movzx eax, word ptr [rcx] movzx ecx, byte ptr [rcx+2] shl ecx, 10h or eax, ecx cvtsi2sd xmm0, eax movsd xmm1, cs:qword_654F0 divsd xmm0, xmm1 movsd [rbp+var_30], xmm0 mov rax, [rbp+var_18] add rax, 3 mov [rbp+var_18], rax lea rdi, [rbp+var_18] call net_field_length mov [rbp+var_28], eax mov rax, [rbp+var_18] mov ecx, [rbp+var_28] add rax, rcx mov rcx, [rbp+var_38] mov edx, [rbp+var_1C] add rcx, rdx cmp rax, rcx jbe short loc_30A9E mov [rbp+var_4], 1 jmp short loc_30AD0 loc_30A9E: mov rax, [rbp+var_10] mov rax, [rax+480h] mov rax, [rax+80h] mov rdi, [rbp+var_10] mov esi, [rbp+var_20] mov edx, [rbp+var_24] movsd xmm0, [rbp+var_30] mov rcx, [rbp+var_18] mov r8d, [rbp+var_28] call rax mov [rbp+var_4], 0 loc_30AD0: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long cli_report_progress(long long a1, unsigned __int16 *a2, unsigned int a3) { unsigned __int16 *v3; // rax unsigned __int16 *v4; // rax double v6; // [rsp+10h] [rbp-30h] unsigned int v7; // [rsp+18h] [rbp-28h] unsigned int v8; // [rsp+1Ch] [rbp-24h] unsigned int v9; // [rsp+20h] [rbp-20h] unsigned __int16 *v11; // [rsp+28h] [rbp-18h] BYREF long long v12; // [rsp+30h] [rbp-10h] v12 = a1; v11 = a2; if ( a3 >= 5 ) { if ( *(_QWORD *)(v12 + 1152) && *(_QWORD *)(*(_QWORD *)(v12 + 1152) + 128LL) ) { v11 = (unsigned __int16 *)((char *)v11 + 1); v3 = v11; v11 = (unsigned __int16 *)((char *)v11 + 1); v9 = *(unsigned __int8 *)v3; v4 = v11; v11 = (unsigned __int16 *)((char *)v11 + 1); v8 = *(unsigned __int8 *)v4; v6 = (double)((*((unsigned __int8 *)v11 + 2) << 16) | (unsigned int)*v11) / 1000.0; v11 = (unsigned __int16 *)((char *)v11 + 3); v7 = net_field_length(&v11); if ( (char *)v11 + v7 <= (char *)a2 + a3 ) { (*(void ( **)(long long, _QWORD, _QWORD, unsigned __int16 *, _QWORD, double))(*(_QWORD *)(v12 + 1152) + 128LL))( v12, v9, v8, v11, v7, v6); return 0; } else { return 1; } } else { return 0; } } else { return 1; } }
cli_report_progress: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x38],RAX CMP dword ptr [RBP + -0x1c],0x5 JNC 0x001309dd MOV dword ptr [RBP + -0x4],0x1 JMP 0x00130ad0 LAB_001309dd: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x480],0x0 JZ 0x00130a00 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x480] CMP qword ptr [RAX + 0x80],0x0 JNZ 0x00130a0c LAB_00130a00: MOV dword ptr [RBP + -0x4],0x0 JMP 0x00130ad0 LAB_00130a0c: MOV RAX,qword ptr [RBP + -0x18] INC RAX MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX INC RCX MOV qword ptr [RBP + -0x18],RCX MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x20],EAX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX INC RCX MOV qword ptr [RBP + -0x18],RCX MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x24],EAX MOV RCX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 OR EAX,ECX CVTSI2SD XMM0,EAX MOVSD XMM1,qword ptr [0x001654f0] DIVSD XMM0,XMM1 MOVSD qword ptr [RBP + -0x30],XMM0 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x3 MOV qword ptr [RBP + -0x18],RAX LEA RDI,[RBP + -0x18] CALL 0x00130ae0 MOV dword ptr [RBP + -0x28],EAX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x28] ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x38] MOV EDX,dword ptr [RBP + -0x1c] ADD RCX,RDX CMP RAX,RCX JBE 0x00130a9e MOV dword ptr [RBP + -0x4],0x1 JMP 0x00130ad0 LAB_00130a9e: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x80] MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x24] MOVSD XMM0,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x18] MOV R8D,dword ptr [RBP + -0x28] CALL RAX MOV dword ptr [RBP + -0x4],0x0 LAB_00130ad0: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
int4 cli_report_progress(long param_1,long param_2,uint param_3) { int1 uVar1; int1 uVar2; uint uVar3; double dVar4; long local_20; long local_18; int4 local_c; if (param_3 < 5) { local_c = 1; } else if ((*(long *)(param_1 + 0x480) == 0) || (*(long *)(*(long *)(param_1 + 0x480) + 0x80) == 0)) { local_c = 0; } else { uVar1 = *(int1 *)(param_2 + 1); uVar2 = *(int1 *)(param_2 + 2); dVar4 = (double)*(uint3 *)(param_2 + 3) / DAT_001654f0; local_20 = param_2 + 6; local_18 = param_1; uVar3 = net_field_length(&local_20); if (param_2 + (ulong)param_3 < local_20 + (ulong)uVar3) { local_c = 1; } else { (**(code **)(*(long *)(local_18 + 0x480) + 0x80))(dVar4,local_18,uVar1,uVar2,local_20,uVar3); local_c = 0; } } return local_c; }
11,665
ma_get_length
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
static long ma_get_length(MYSQL_STMT *stmt, unsigned int param_nr, unsigned long row_nr) { if (!stmt->params[param_nr].length) return 0; if (stmt->param_callback) return (long)*stmt->params[param_nr].length; if (stmt->row_size) return *(long *)((char *)stmt->params[param_nr].length + row_nr * stmt->row_size); else return stmt->params[param_nr].length[row_nr]; }
O0
c
ma_get_length: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x70(%rax), %rax movl -0x14(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax cmpq $0x0, (%rax) jne 0x41a14 movq $0x0, -0x8(%rbp) jmp 0x41a9e movq -0x10(%rbp), %rax cmpq $0x0, 0x390(%rax) je 0x41a40 movq -0x10(%rbp), %rax movq 0x70(%rax), %rax movl -0x14(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax movq (%rax), %rax movq (%rax), %rax movq %rax, -0x8(%rbp) jmp 0x41a9e movq -0x10(%rbp), %rax cmpq $0x0, 0x370(%rax) je 0x41a7d movq -0x10(%rbp), %rax movq 0x70(%rax), %rax movl -0x14(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax movq (%rax), %rax movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rdx imulq 0x370(%rdx), %rcx movq (%rax,%rcx), %rax movq %rax, -0x8(%rbp) jmp 0x41a9e movq -0x10(%rbp), %rax movq 0x70(%rax), %rax movl -0x14(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax movq (%rax), %rax movq -0x20(%rbp), %rcx movq (%rax,%rcx,8), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq nopw %cs:(%rax,%rax)
ma_get_length: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov rax, [rax+70h] mov ecx, [rbp+var_14] imul rcx, 70h ; 'p' add rax, rcx cmp qword ptr [rax], 0 jnz short loc_41A14 mov [rbp+var_8], 0 jmp loc_41A9E loc_41A14: mov rax, [rbp+var_10] cmp qword ptr [rax+390h], 0 jz short loc_41A40 mov rax, [rbp+var_10] mov rax, [rax+70h] mov ecx, [rbp+var_14] imul rcx, 70h ; 'p' add rax, rcx mov rax, [rax] mov rax, [rax] mov [rbp+var_8], rax jmp short loc_41A9E loc_41A40: mov rax, [rbp+var_10] cmp qword ptr [rax+370h], 0 jz short loc_41A7D mov rax, [rbp+var_10] mov rax, [rax+70h] mov ecx, [rbp+var_14] imul rcx, 70h ; 'p' add rax, rcx mov rax, [rax] mov rcx, [rbp+var_20] mov rdx, [rbp+var_10] imul rcx, [rdx+370h] mov rax, [rax+rcx] mov [rbp+var_8], rax jmp short loc_41A9E loc_41A7D: mov rax, [rbp+var_10] mov rax, [rax+70h] mov ecx, [rbp+var_14] imul rcx, 70h ; 'p' add rax, rcx mov rax, [rax] mov rcx, [rbp+var_20] mov rax, [rax+rcx*8] mov [rbp+var_8], rax loc_41A9E: mov rax, [rbp+var_8] pop rbp retn
long long ma_get_length(_QWORD *a1, unsigned int a2, long long a3) { if ( !*(_QWORD *)(112LL * a2 + a1[14]) ) return 0LL; if ( a1[114] ) return **(_QWORD **)(112LL * a2 + a1[14]); if ( a1[110] ) return *(_QWORD *)(*(_QWORD *)(112LL * a2 + a1[14]) + a1[110] * a3); return *(_QWORD *)(*(_QWORD *)(112LL * a2 + a1[14]) + 8 * a3); }
ma_get_length: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x70] MOV ECX,dword ptr [RBP + -0x14] IMUL RCX,RCX,0x70 ADD RAX,RCX CMP qword ptr [RAX],0x0 JNZ 0x00141a14 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00141a9e LAB_00141a14: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x390],0x0 JZ 0x00141a40 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x70] MOV ECX,dword ptr [RBP + -0x14] IMUL RCX,RCX,0x70 ADD RAX,RCX MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x8],RAX JMP 0x00141a9e LAB_00141a40: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x370],0x0 JZ 0x00141a7d MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x70] MOV ECX,dword ptr [RBP + -0x14] IMUL RCX,RCX,0x70 ADD RAX,RCX MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x10] IMUL RCX,qword ptr [RDX + 0x370] MOV RAX,qword ptr [RAX + RCX*0x1] MOV qword ptr [RBP + -0x8],RAX JMP 0x00141a9e LAB_00141a7d: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x70] MOV ECX,dword ptr [RBP + -0x14] IMUL RCX,RCX,0x70 ADD RAX,RCX MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x8],RAX LAB_00141a9e: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
int8 ma_get_length(long param_1,uint param_2,long param_3) { int8 local_10; if (*(long *)(*(long *)(param_1 + 0x70) + (ulong)param_2 * 0x70) == 0) { local_10 = 0; } else if (*(long *)(param_1 + 0x390) == 0) { if (*(long *)(param_1 + 0x370) == 0) { local_10 = *(int8 *) (*(long *)(*(long *)(param_1 + 0x70) + (ulong)param_2 * 0x70) + param_3 * 8); } else { local_10 = *(int8 *) (*(long *)(*(long *)(param_1 + 0x70) + (ulong)param_2 * 0x70) + param_3 * *(long *)(param_1 + 0x370)); } } else { local_10 = **(int8 **)(*(long *)(param_1 + 0x70) + (ulong)param_2 * 0x70); } return local_10; }
11,666
mthd_my_read_rows
eloqsql/libmariadb/libmariadb/mariadb_lib.c
MYSQL_DATA *mthd_my_read_rows(MYSQL *mysql,MYSQL_FIELD *mysql_fields, uint fields) { uint field; ulong pkt_len; ulong len; uchar *cp; char *to, *end_to; MYSQL_DATA *result; MYSQL_ROWS **prev_ptr,*cur; NET *net = &mysql->net; if ((pkt_len= ma_net_safe_read(mysql)) == packet_error) return(0); if (!(result=(MYSQL_DATA*) calloc(1, sizeof(MYSQL_DATA)))) { SET_CLIENT_ERROR(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); return(0); } ma_init_alloc_root(&result->alloc,8192,0); /* Assume rowlength < 8192 */ result->alloc.min_malloc=sizeof(MYSQL_ROWS); prev_ptr= &result->data; result->rows=0; result->fields=fields; while (*(cp=net->read_pos) != 254 || pkt_len >= 8) { result->rows++; if (!(cur= (MYSQL_ROWS*) ma_alloc_root(&result->alloc, sizeof(MYSQL_ROWS))) || !(cur->data= ((MYSQL_ROW) ma_alloc_root(&result->alloc, (fields+1)*sizeof(char *)+fields+pkt_len)))) { free_rows(result); SET_CLIENT_ERROR(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); return(0); } *prev_ptr=cur; prev_ptr= &cur->next; to= (char*) (cur->data+fields+1); end_to=to+fields+pkt_len-1; for (field=0 ; field < fields ; field++) { if ((len=(ulong) net_field_length(&cp)) == NULL_LENGTH) { /* null field */ cur->data[field] = 0; } else { cur->data[field] = to; if (len > (ulong)(end_to - to) || to > end_to) { free_rows(result); SET_CLIENT_ERROR(mysql, CR_UNKNOWN_ERROR, SQLSTATE_UNKNOWN, 0); return(0); } memcpy(to,(char*) cp,len); to[len]=0; to+=len+1; cp+=len; if (mysql_fields) { if (mysql_fields[field].max_length < len) mysql_fields[field].max_length=len; } } } cur->data[field]=to; /* End of last field */ if ((pkt_len=ma_net_safe_read(mysql)) == packet_error) { free_rows(result); return(0); } } *prev_ptr=0; /* last pointer is null */ /* save status */ if (pkt_len > 1) { cp++; mysql->warning_count= uint2korr(cp); cp+= 2; mysql->server_status= uint2korr(cp); } return(result); }
O0
c
mthd_my_read_rows: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x10(%rbp), %rdi callq 0x3cb80 movq %rax, -0x28(%rbp) movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpq %rcx, %rax jne 0x4116f movq $0x0, -0x8(%rbp) jmp 0x415b6 movl $0x1, %edi movl $0x60, %esi callq 0x378c0 movq %rax, -0x50(%rbp) cmpq $0x0, %rax jne 0x411fa jmp 0x4118a movq -0x10(%rbp), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movq -0x10(%rbp), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x1f65a6(%rip), %rax # 0x237750 movq (%rax), %rsi movl $0x5, %edx callq 0x37150 movq -0x10(%rbp), %rax movb $0x0, 0x29c(%rax) movq -0x10(%rbp), %rdi addq $0x97, %rdi leaq 0x1f658c(%rip), %rax # 0x237760 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x37150 movq -0x10(%rbp), %rax movb $0x0, 0x296(%rax) movq $0x0, -0x8(%rbp) jmp 0x415b6 movq -0x50(%rbp), %rdi addq $0x10, %rdi movl $0x2000, %esi # imm = 0x2000 xorl %eax, %eax movl %eax, %edx callq 0x4b7a0 movq -0x50(%rbp), %rax movq $0x18, 0x28(%rax) movq -0x50(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x50(%rbp), %rax movq $0x0, 0x48(%rax) movl -0x1c(%rbp), %ecx movq -0x50(%rbp), %rax movl %ecx, 0x50(%rax) movq -0x68(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x38(%rbp) movzbl (%rax), %ecx movb $0x1, %al cmpl $0xfe, %ecx movb %al, -0x69(%rbp) jne 0x41261 cmpq $0x8, -0x28(%rbp) setae %al movb %al, -0x69(%rbp) movb -0x69(%rbp), %al testb $0x1, %al jne 0x4126d jmp 0x41536 movq -0x50(%rbp), %rax movq 0x48(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x48(%rax) movq -0x50(%rbp), %rdi addq $0x10, %rdi movl $0x18, %esi callq 0x4b880 movq %rax, -0x60(%rbp) cmpq $0x0, %rax je 0x412cc movq -0x50(%rbp), %rdi addq $0x10, %rdi movl -0x1c(%rbp), %eax addl $0x1, %eax movl %eax, %eax movl %eax, %esi shlq $0x3, %rsi movl -0x1c(%rbp), %eax addq %rax, %rsi addq -0x28(%rbp), %rsi callq 0x4b880 movq -0x60(%rbp), %rcx movq %rax, 0x8(%rcx) cmpq $0x0, %rax jne 0x41345 movq -0x50(%rbp), %rdi callq 0x3d2e0 movq -0x10(%rbp), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movq -0x10(%rbp), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x1f645b(%rip), %rax # 0x237750 movq (%rax), %rsi movl $0x5, %edx callq 0x37150 movq -0x10(%rbp), %rax movb $0x0, 0x29c(%rax) movq -0x10(%rbp), %rdi addq $0x97, %rdi leaq 0x1f6441(%rip), %rax # 0x237760 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x37150 movq -0x10(%rbp), %rax movb $0x0, 0x296(%rax) movq $0x0, -0x8(%rbp) jmp 0x415b6 movq -0x60(%rbp), %rcx movq -0x58(%rbp), %rax movq %rcx, (%rax) movq -0x60(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x60(%rbp), %rax movq 0x8(%rax), %rax movl -0x1c(%rbp), %ecx shlq $0x3, %rcx addq %rcx, %rax addq $0x8, %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movl -0x1c(%rbp), %ecx addq %rcx, %rax addq -0x28(%rbp), %rax addq $-0x1, %rax movq %rax, -0x48(%rbp) movl $0x0, -0x20(%rbp) movl -0x20(%rbp), %eax cmpl -0x1c(%rbp), %eax jae 0x414f1 leaq -0x38(%rbp), %rdi callq 0x3d1a0 movq %rax, -0x30(%rbp) cmpq $-0x1, %rax jne 0x413c6 movq -0x60(%rbp), %rax movq 0x8(%rax), %rax movl -0x20(%rbp), %ecx movq $0x0, (%rax,%rcx,8) jmp 0x414e1 movq -0x40(%rbp), %rdx movq -0x60(%rbp), %rax movq 0x8(%rax), %rax movl -0x20(%rbp), %ecx movq %rdx, (%rax,%rcx,8) movq -0x30(%rbp), %rax movq -0x48(%rbp), %rcx movq -0x40(%rbp), %rdx subq %rdx, %rcx cmpq %rcx, %rax ja 0x413f7 movq -0x40(%rbp), %rax cmpq -0x48(%rbp), %rax jbe 0x4146f movq -0x50(%rbp), %rdi callq 0x3d2e0 movq -0x10(%rbp), %rax movl $0x7d0, 0x90(%rax) # imm = 0x7D0 movq -0x10(%rbp), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x1f6330(%rip), %rax # 0x237750 movq (%rax), %rsi movl $0x5, %edx callq 0x37150 movq -0x10(%rbp), %rax movb $0x0, 0x29c(%rax) movq -0x10(%rbp), %rdi addq $0x97, %rdi leaq 0x1f6316(%rip), %rax # 0x237760 movq (%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x37150 movq -0x10(%rbp), %rax movb $0x0, 0x296(%rax) movq $0x0, -0x8(%rbp) jmp 0x415b6 movq -0x40(%rbp), %rdi movq -0x38(%rbp), %rsi movq -0x30(%rbp), %rdx callq 0x370c0 movq -0x40(%rbp), %rax movq -0x30(%rbp), %rcx movb $0x0, (%rax,%rcx) movq -0x30(%rbp), %rax addq $0x1, %rax addq -0x40(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x30(%rbp), %rax addq -0x38(%rbp), %rax movq %rax, -0x38(%rbp) cmpq $0x0, -0x18(%rbp) je 0x414df movq -0x18(%rbp), %rax movl -0x20(%rbp), %ecx shlq $0x7, %rcx addq %rcx, %rax movq 0x40(%rax), %rax cmpq -0x30(%rbp), %rax jae 0x414dd movq -0x30(%rbp), %rcx movq -0x18(%rbp), %rax movl -0x20(%rbp), %edx shlq $0x7, %rdx addq %rdx, %rax movq %rcx, 0x40(%rax) jmp 0x414df jmp 0x414e1 jmp 0x414e3 movl -0x20(%rbp), %eax addl $0x1, %eax movl %eax, -0x20(%rbp) jmp 0x4138f movq -0x40(%rbp), %rdx movq -0x60(%rbp), %rax movq 0x8(%rax), %rax movl -0x20(%rbp), %ecx movq %rdx, (%rax,%rcx,8) movq -0x10(%rbp), %rdi callq 0x3cb80 movq %rax, -0x28(%rbp) movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpq %rcx, %rax jne 0x41531 movq -0x50(%rbp), %rdi callq 0x3d2e0 movq $0x0, -0x8(%rbp) jmp 0x415b6 jmp 0x4123a movq -0x58(%rbp), %rax movq $0x0, (%rax) cmpq $0x1, -0x28(%rbp) jbe 0x415ae movq -0x38(%rbp), %rax addq $0x1, %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movzbl (%rax), %eax movzwl %ax, %eax movq -0x38(%rbp), %rcx movzbl 0x1(%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx addl %ecx, %eax movzwl %ax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x388(%rax) movq -0x38(%rbp), %rax addq $0x2, %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movzbl (%rax), %eax movzwl %ax, %eax movq -0x38(%rbp), %rcx movzbl 0x1(%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx addl %ecx, %eax movzwl %ax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x380(%rax) movq -0x50(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x70, %rsp popq %rbp retq
mthd_my_read_rows: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov rax, [rbp+var_10] mov [rbp+var_68], rax mov rdi, [rbp+var_10] call ma_net_safe_read mov [rbp+var_28], rax mov ecx, 0FFFFFFFFh cmp rax, rcx jnz short loc_4116F mov [rbp+var_8], 0 jmp loc_415B6 loc_4116F: mov edi, 1 mov esi, 60h ; '`' call _calloc mov [rbp+var_50], rax cmp rax, 0 jnz short loc_411FA jmp short $+2 loc_4118A: mov rax, [rbp+var_10] mov dword ptr [rax+90h], 7D8h mov rdi, [rbp+var_10] add rdi, 297h lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+29Ch], 0 mov rdi, [rbp+var_10] add rdi, 97h lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+296h], 0 mov [rbp+var_8], 0 jmp loc_415B6 loc_411FA: mov rdi, [rbp+var_50] add rdi, 10h mov esi, 2000h xor eax, eax mov edx, eax call ma_init_alloc_root mov rax, [rbp+var_50] mov qword ptr [rax+28h], 18h mov rax, [rbp+var_50] mov [rbp+var_58], rax mov rax, [rbp+var_50] mov qword ptr [rax+48h], 0 mov ecx, [rbp+var_1C] mov rax, [rbp+var_50] mov [rax+50h], ecx loc_4123A: mov rax, [rbp+var_68] mov rax, [rax+20h] mov [rbp+var_38], rax movzx ecx, byte ptr [rax] mov al, 1 cmp ecx, 0FEh mov [rbp+var_69], al jnz short loc_41261 cmp [rbp+var_28], 8 setnb al mov [rbp+var_69], al loc_41261: mov al, [rbp+var_69] test al, 1 jnz short loc_4126D jmp loc_41536 loc_4126D: mov rax, [rbp+var_50] mov rcx, [rax+48h] add rcx, 1 mov [rax+48h], rcx mov rdi, [rbp+var_50] add rdi, 10h mov esi, 18h call ma_alloc_root mov [rbp+var_60], rax cmp rax, 0 jz short loc_412CC mov rdi, [rbp+var_50] add rdi, 10h mov eax, [rbp+var_1C] add eax, 1 mov eax, eax mov esi, eax shl rsi, 3 mov eax, [rbp+var_1C] add rsi, rax add rsi, [rbp+var_28] call ma_alloc_root mov rcx, [rbp+var_60] mov [rcx+8], rax cmp rax, 0 jnz short loc_41345 loc_412CC: mov rdi, [rbp+var_50] call free_rows mov rax, [rbp+var_10] mov dword ptr [rax+90h], 7D8h mov rdi, [rbp+var_10] add rdi, 297h lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+29Ch], 0 mov rdi, [rbp+var_10] add rdi, 97h lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+296h], 0 mov [rbp+var_8], 0 jmp loc_415B6 loc_41345: mov rcx, [rbp+var_60] mov rax, [rbp+var_58] mov [rax], rcx mov rax, [rbp+var_60] mov [rbp+var_58], rax mov rax, [rbp+var_60] mov rax, [rax+8] mov ecx, [rbp+var_1C] shl rcx, 3 add rax, rcx add rax, 8 mov [rbp+var_40], rax mov rax, [rbp+var_40] mov ecx, [rbp+var_1C] add rax, rcx add rax, [rbp+var_28] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_48], rax mov [rbp+var_20], 0 loc_4138F: mov eax, [rbp+var_20] cmp eax, [rbp+var_1C] jnb loc_414F1 lea rdi, [rbp+var_38] call net_field_length mov [rbp+var_30], rax cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_413C6 mov rax, [rbp+var_60] mov rax, [rax+8] mov ecx, [rbp+var_20] mov qword ptr [rax+rcx*8], 0 jmp loc_414E1 loc_413C6: mov rdx, [rbp+var_40] mov rax, [rbp+var_60] mov rax, [rax+8] mov ecx, [rbp+var_20] mov [rax+rcx*8], rdx mov rax, [rbp+var_30] mov rcx, [rbp+var_48] mov rdx, [rbp+var_40] sub rcx, rdx cmp rax, rcx ja short loc_413F7 mov rax, [rbp+var_40] cmp rax, [rbp+var_48] jbe short loc_4146F loc_413F7: mov rdi, [rbp+var_50] call free_rows mov rax, [rbp+var_10] mov dword ptr [rax+90h], 7D0h mov rdi, [rbp+var_10] add rdi, 297h lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+29Ch], 0 mov rdi, [rbp+var_10] add rdi, 97h lea rax, client_errors mov rsi, [rax] mov edx, 1FFh call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+296h], 0 mov [rbp+var_8], 0 jmp loc_415B6 loc_4146F: mov rdi, [rbp+var_40] mov rsi, [rbp+var_38] mov rdx, [rbp+var_30] call _memcpy mov rax, [rbp+var_40] mov rcx, [rbp+var_30] mov byte ptr [rax+rcx], 0 mov rax, [rbp+var_30] add rax, 1 add rax, [rbp+var_40] mov [rbp+var_40], rax mov rax, [rbp+var_30] add rax, [rbp+var_38] mov [rbp+var_38], rax cmp [rbp+var_18], 0 jz short loc_414DF mov rax, [rbp+var_18] mov ecx, [rbp+var_20] shl rcx, 7 add rax, rcx mov rax, [rax+40h] cmp rax, [rbp+var_30] jnb short loc_414DD mov rcx, [rbp+var_30] mov rax, [rbp+var_18] mov edx, [rbp+var_20] shl rdx, 7 add rax, rdx mov [rax+40h], rcx loc_414DD: jmp short $+2 loc_414DF: jmp short $+2 loc_414E1: jmp short $+2 loc_414E3: mov eax, [rbp+var_20] add eax, 1 mov [rbp+var_20], eax jmp loc_4138F loc_414F1: mov rdx, [rbp+var_40] mov rax, [rbp+var_60] mov rax, [rax+8] mov ecx, [rbp+var_20] mov [rax+rcx*8], rdx mov rdi, [rbp+var_10] call ma_net_safe_read mov [rbp+var_28], rax mov ecx, 0FFFFFFFFh cmp rax, rcx jnz short loc_41531 mov rdi, [rbp+var_50] call free_rows mov [rbp+var_8], 0 jmp loc_415B6 loc_41531: jmp loc_4123A loc_41536: mov rax, [rbp+var_58] mov qword ptr [rax], 0 cmp [rbp+var_28], 1 jbe short loc_415AE mov rax, [rbp+var_38] add rax, 1 mov [rbp+var_38], rax mov rax, [rbp+var_38] movzx eax, byte ptr [rax] movzx eax, ax mov rcx, [rbp+var_38] movzx ecx, byte ptr [rcx+1] movzx ecx, cx shl ecx, 8 add eax, ecx movzx ecx, ax mov rax, [rbp+var_10] mov [rax+388h], ecx mov rax, [rbp+var_38] add rax, 2 mov [rbp+var_38], rax mov rax, [rbp+var_38] movzx eax, byte ptr [rax] movzx eax, ax mov rcx, [rbp+var_38] movzx ecx, byte ptr [rcx+1] movzx ecx, cx shl ecx, 8 add eax, ecx movzx ecx, ax mov rax, [rbp+var_10] mov [rax+380h], ecx loc_415AE: mov rax, [rbp+var_50] mov [rbp+var_8], rax loc_415B6: mov rax, [rbp+var_8] add rsp, 70h pop rbp retn
long long mthd_my_read_rows(long long a1, long long a2, long long a3, long long a4, int a5, int a6) { unsigned __int8 *v6; // rsi long long v7; // rax int v8; // r8d int v9; // r9d long long v10; // rcx bool v12; // [rsp+7h] [rbp-69h] long long v13; // [rsp+10h] [rbp-60h] _QWORD *v14; // [rsp+18h] [rbp-58h] long long v15; // [rsp+20h] [rbp-50h] unsigned long long v16; // [rsp+28h] [rbp-48h] unsigned long long v17; // [rsp+30h] [rbp-40h] unsigned __int8 *v18; // [rsp+38h] [rbp-38h] BYREF unsigned long long v19; // [rsp+40h] [rbp-30h] unsigned long long v20; // [rsp+48h] [rbp-28h] unsigned int i; // [rsp+50h] [rbp-20h] unsigned int v22; // [rsp+54h] [rbp-1Ch] long long v23; // [rsp+58h] [rbp-18h] long long v24; // [rsp+60h] [rbp-10h] v24 = a1; v23 = a2; v22 = a3; v20 = ma_net_safe_read(a1, a2, a3, a4, a5, a6); if ( v20 == 0xFFFFFFFF ) return 0LL; v15 = calloc(1LL, 96LL); if ( v15 ) { ma_init_alloc_root(v15 + 16, 0x2000LL, 0LL); *(_QWORD *)(v15 + 40) = 24LL; v14 = (_QWORD *)v15; *(_QWORD *)(v15 + 72) = 0LL; *(_DWORD *)(v15 + 80) = v22; while ( 1 ) { v18 = *(unsigned __int8 **)(a1 + 32); v12 = 1; if ( *v18 == 254 ) v12 = v20 >= 8; if ( !v12 ) break; ++*(_QWORD *)(v15 + 72); v13 = ma_alloc_root(v15 + 16, 24LL); if ( !v13 || (v6 = (unsigned __int8 *)(v20 + v22 + 8LL * (v22 + 1)), v7 = ma_alloc_root(v15 + 16, v6), (*(_QWORD *)(v13 + 8) = v7) == 0LL) ) { free_rows(v15); *(_DWORD *)(v24 + 144) = 2008; strncpy(v24 + 663, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(v24 + 668) = 0; strncpy(v24 + 151, client_errors[8], 511LL); *(_BYTE *)(v24 + 662) = 0; return 0LL; } *v14 = v13; v14 = (_QWORD *)v13; v17 = 8LL * v22 + *(_QWORD *)(v13 + 8) + 8; v16 = v20 + v22 + v17 - 1; for ( i = 0; i < v22; ++i ) { v19 = net_field_length(&v18); if ( v19 == -1LL ) { *(_QWORD *)(*(_QWORD *)(v13 + 8) + 8LL * i) = 0LL; } else { *(_QWORD *)(*(_QWORD *)(v13 + 8) + 8LL * i) = v17; if ( v19 > v16 - v17 || v17 > v16 ) { free_rows(v15); *(_DWORD *)(v24 + 144) = 2000; strncpy(v24 + 663, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(v24 + 668) = 0; strncpy(v24 + 151, client_errors[0], 511LL); *(_BYTE *)(v24 + 662) = 0; return 0LL; } v6 = v18; memcpy(v17, v18, v19); *(_BYTE *)(v17 + v19) = 0; v17 += v19 + 1; v18 += v19; if ( v23 && *(_QWORD *)(((unsigned long long)i << 7) + v23 + 64) < v19 ) *(_QWORD *)(((unsigned long long)i << 7) + v23 + 64) = v19; } } v10 = i; *(_QWORD *)(*(_QWORD *)(v13 + 8) + 8LL * i) = v17; v20 = ma_net_safe_read(v24, (long long)v6, v17, v10, v8, v9); if ( v20 == 0xFFFFFFFF ) { free_rows(v15); return 0LL; } } *v14 = 0LL; if ( v20 > 1 ) { ++v18; *(_DWORD *)(v24 + 904) = (unsigned __int16)((v18[1] << 8) + *v18); v18 += 2; *(_DWORD *)(v24 + 896) = (unsigned __int16)((v18[1] << 8) + *v18); } return v15; } else { *(_DWORD *)(v24 + 144) = 2008; strncpy(v24 + 663, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(v24 + 668) = 0; strncpy(v24 + 151, client_errors[8], 511LL); *(_BYTE *)(v24 + 662) = 0; return 0LL; } }
mthd_my_read_rows: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x68],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0013cb80 MOV qword ptr [RBP + -0x28],RAX MOV ECX,0xffffffff CMP RAX,RCX JNZ 0x0014116f MOV qword ptr [RBP + -0x8],0x0 JMP 0x001415b6 LAB_0014116f: MOV EDI,0x1 MOV ESI,0x60 CALL 0x001378c0 MOV qword ptr [RBP + -0x50],RAX CMP RAX,0x0 JNZ 0x001411fa JMP 0x0014118a LAB_0014118a: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x90],0x7d8 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x297 LEA RAX,[0x337750] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00137150 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x29c],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x97 LEA RAX,[0x337760] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x00137150 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x296],0x0 MOV qword ptr [RBP + -0x8],0x0 JMP 0x001415b6 LAB_001411fa: MOV RDI,qword ptr [RBP + -0x50] ADD RDI,0x10 MOV ESI,0x2000 XOR EAX,EAX MOV EDX,EAX CALL 0x0014b7a0 MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RAX + 0x28],0x18 MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RAX + 0x48],0x0 MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX + 0x50],ECX LAB_0014123a: MOV RAX,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x38],RAX MOVZX ECX,byte ptr [RAX] MOV AL,0x1 CMP ECX,0xfe MOV byte ptr [RBP + -0x69],AL JNZ 0x00141261 CMP qword ptr [RBP + -0x28],0x8 SETNC AL MOV byte ptr [RBP + -0x69],AL LAB_00141261: MOV AL,byte ptr [RBP + -0x69] TEST AL,0x1 JNZ 0x0014126d JMP 0x00141536 LAB_0014126d: MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RAX + 0x48] ADD RCX,0x1 MOV qword ptr [RAX + 0x48],RCX MOV RDI,qword ptr [RBP + -0x50] ADD RDI,0x10 MOV ESI,0x18 CALL 0x0014b880 MOV qword ptr [RBP + -0x60],RAX CMP RAX,0x0 JZ 0x001412cc MOV RDI,qword ptr [RBP + -0x50] ADD RDI,0x10 MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,0x1 MOV EAX,EAX MOV ESI,EAX SHL RSI,0x3 MOV EAX,dword ptr [RBP + -0x1c] ADD RSI,RAX ADD RSI,qword ptr [RBP + -0x28] CALL 0x0014b880 MOV RCX,qword ptr [RBP + -0x60] MOV qword ptr [RCX + 0x8],RAX CMP RAX,0x0 JNZ 0x00141345 LAB_001412cc: MOV RDI,qword ptr [RBP + -0x50] CALL 0x0013d2e0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x90],0x7d8 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x297 LEA RAX,[0x337750] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00137150 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x29c],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x97 LEA RAX,[0x337760] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x00137150 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x296],0x0 MOV qword ptr [RBP + -0x8],0x0 JMP 0x001415b6 LAB_00141345: MOV RCX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RAX + 0x8] MOV ECX,dword ptr [RBP + -0x1c] SHL RCX,0x3 ADD RAX,RCX ADD RAX,0x8 MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RBP + -0x1c] ADD RAX,RCX ADD RAX,qword ptr [RBP + -0x28] ADD RAX,-0x1 MOV qword ptr [RBP + -0x48],RAX MOV dword ptr [RBP + -0x20],0x0 LAB_0014138f: MOV EAX,dword ptr [RBP + -0x20] CMP EAX,dword ptr [RBP + -0x1c] JNC 0x001414f1 LEA RDI,[RBP + -0x38] CALL 0x0013d1a0 MOV qword ptr [RBP + -0x30],RAX CMP RAX,-0x1 JNZ 0x001413c6 MOV RAX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RAX + 0x8] MOV ECX,dword ptr [RBP + -0x20] MOV qword ptr [RAX + RCX*0x8],0x0 JMP 0x001414e1 LAB_001413c6: MOV RDX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RAX + 0x8] MOV ECX,dword ptr [RBP + -0x20] MOV qword ptr [RAX + RCX*0x8],RDX MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x40] SUB RCX,RDX CMP RAX,RCX JA 0x001413f7 MOV RAX,qword ptr [RBP + -0x40] CMP RAX,qword ptr [RBP + -0x48] JBE 0x0014146f LAB_001413f7: MOV RDI,qword ptr [RBP + -0x50] CALL 0x0013d2e0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x90],0x7d0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x297 LEA RAX,[0x337750] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00137150 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x29c],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x97 LEA RAX,[0x337760] MOV RSI,qword ptr [RAX] MOV EDX,0x1ff CALL 0x00137150 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x296],0x0 MOV qword ptr [RBP + -0x8],0x0 JMP 0x001415b6 LAB_0014146f: MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x30] CALL 0x001370c0 MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x30] MOV byte ptr [RAX + RCX*0x1],0x0 MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 ADD RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x18],0x0 JZ 0x001414df MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x20] SHL RCX,0x7 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x40] CMP RAX,qword ptr [RBP + -0x30] JNC 0x001414dd MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x20] SHL RDX,0x7 ADD RAX,RDX MOV qword ptr [RAX + 0x40],RCX LAB_001414dd: JMP 0x001414df LAB_001414df: JMP 0x001414e1 LAB_001414e1: JMP 0x001414e3 LAB_001414e3: MOV EAX,dword ptr [RBP + -0x20] ADD EAX,0x1 MOV dword ptr [RBP + -0x20],EAX JMP 0x0014138f LAB_001414f1: MOV RDX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RAX + 0x8] MOV ECX,dword ptr [RBP + -0x20] MOV qword ptr [RAX + RCX*0x8],RDX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0013cb80 MOV qword ptr [RBP + -0x28],RAX MOV ECX,0xffffffff CMP RAX,RCX JNZ 0x00141531 MOV RDI,qword ptr [RBP + -0x50] CALL 0x0013d2e0 MOV qword ptr [RBP + -0x8],0x0 JMP 0x001415b6 LAB_00141531: JMP 0x0014123a LAB_00141536: MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RAX],0x0 CMP qword ptr [RBP + -0x28],0x1 JBE 0x001415ae MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,byte ptr [RAX] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x38] MOVZX ECX,byte ptr [RCX + 0x1] MOVZX ECX,CX SHL ECX,0x8 ADD EAX,ECX MOVZX ECX,AX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x388],ECX MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x2 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,byte ptr [RAX] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x38] MOVZX ECX,byte ptr [RCX + 0x1] MOVZX ECX,CX SHL ECX,0x8 ADD EAX,ECX MOVZX ECX,AX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x380],ECX LAB_001415ae: MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x8],RAX LAB_001415b6: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x70 POP RBP RET
int8 * mthd_my_read_rows(long param_1,long param_2,uint param_3) { int8 *puVar1; int8 *puVar2; long lVar3; void *pvVar4; int8 *local_60; void *local_48; char *local_40; ulong local_38; ulong local_30; uint local_28; uint local_24; long local_20; long local_18; local_24 = param_3; local_20 = param_2; local_18 = param_1; local_30 = ma_net_safe_read(param_1); if (local_30 != 0xffffffff) { puVar1 = (int8 *)calloc(1,0x60); if (puVar1 == (int8 *)0x0) { *(int4 *)(local_18 + 0x90) = 0x7d8; strncpy((char *)(local_18 + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(local_18 + 0x29c) = 0; strncpy((char *)(local_18 + 0x97),PTR_s_Client_run_out_of_memory_003377a0,0x1ff); *(int1 *)(local_18 + 0x296) = 0; } else { ma_init_alloc_root(puVar1 + 2,0x2000,0); puVar1[5] = 0x18; puVar1[9] = 0; *(uint *)(puVar1 + 10) = local_24; local_60 = puVar1; do { local_40 = *(char **)(param_1 + 0x20); if (*local_40 == -2 && local_30 < 8) { *local_60 = 0; if (1 < local_30) { *(uint *)(local_18 + 0x388) = (uint)(byte)local_40[1] + (uint)(byte)local_40[2] * 0x100 & 0xffff; *(uint *)(local_18 + 0x380) = (uint)(byte)local_40[3] + (uint)(byte)local_40[4] * 0x100 & 0xffff; return puVar1; } return puVar1; } puVar1[9] = puVar1[9] + 1; puVar2 = (int8 *)ma_alloc_root(puVar1 + 2,0x18); if (puVar2 == (int8 *)0x0) { LAB_001412cc: free_rows(puVar1); *(int4 *)(local_18 + 0x90) = 0x7d8; strncpy((char *)(local_18 + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(local_18 + 0x29c) = 0; strncpy((char *)(local_18 + 0x97),PTR_s_Client_run_out_of_memory_003377a0,0x1ff); *(int1 *)(local_18 + 0x296) = 0; return (int8 *)0x0; } lVar3 = ma_alloc_root(puVar1 + 2,(ulong)(local_24 + 1) * 8 + (ulong)local_24 + local_30); puVar2[1] = lVar3; if (lVar3 == 0) goto LAB_001412cc; *local_60 = puVar2; local_48 = (void *)(puVar2[1] + (ulong)local_24 * 8 + 8); pvVar4 = (void *)((long)local_48 + local_30 + local_24 + -1); for (local_28 = 0; local_28 < local_24; local_28 = local_28 + 1) { local_38 = net_field_length(&local_40); if (local_38 == 0xffffffffffffffff) { *(int8 *)(puVar2[1] + (ulong)local_28 * 8) = 0; } else { *(void **)(puVar2[1] + (ulong)local_28 * 8) = local_48; if (((ulong)((long)pvVar4 - (long)local_48) < local_38) || (pvVar4 < local_48)) { free_rows(puVar1); *(int4 *)(local_18 + 0x90) = 2000; strncpy((char *)(local_18 + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(local_18 + 0x29c) = 0; strncpy((char *)(local_18 + 0x97),client_errors,0x1ff); *(int1 *)(local_18 + 0x296) = 0; return (int8 *)0x0; } memcpy(local_48,local_40,local_38); *(int1 *)((long)local_48 + local_38) = 0; local_48 = (void *)(local_38 + 1 + (long)local_48); local_40 = local_40 + local_38; if ((local_20 != 0) && (*(ulong *)(local_20 + (ulong)local_28 * 0x80 + 0x40) < local_38) ) { *(ulong *)(local_20 + (ulong)local_28 * 0x80 + 0x40) = local_38; } } } *(void **)(puVar2[1] + (ulong)local_28 * 8) = local_48; local_30 = ma_net_safe_read(local_18); local_60 = puVar2; } while (local_30 != 0xffffffff); free_rows(puVar1); } } return (int8 *)0x0; }
11,667
js_object_defineProperty
bluesky950520[P]quickjs/quickjs.c
static JSValue js_object_defineProperty(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSValue obj, prop, desc; int ret, flags; JSAtom atom; obj = argv[0]; prop = argv[1]; desc = argv[2]; if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT) return JS_ThrowTypeErrorNotAnObject(ctx); atom = JS_ValueToAtom(ctx, prop); if (unlikely(atom == JS_ATOM_NULL)) return JS_EXCEPTION; flags = JS_PROP_THROW | JS_PROP_DEFINE_PROPERTY; if (magic) flags = JS_PROP_REFLECT_DEFINE_PROPERTY; ret = JS_DefinePropertyDesc(ctx, obj, atom, desc, flags); JS_FreeAtom(ctx, atom); if (ret < 0) { return JS_EXCEPTION; } else if (magic) { return js_bool(ret); } else { return js_dup(obj); } }
O3
c
js_object_defineProperty: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %r12 movq 0x8(%r8), %r15 cmpl $-0x1, %r15d jne 0x12997 movl %r9d, %ebp movq (%r8), %rbx movq 0x20(%r8), %rax movq %rax, 0x8(%rsp) movq 0x28(%r8), %rax movq %rax, 0x10(%rsp) movq 0x10(%r8), %rsi movq 0x18(%r8), %rdx movq %r12, %rdi callq 0x23ad1 pushq $0x6 popq %r14 testl %eax, %eax je 0x129b0 movl %eax, %r13d testl %ebp, %ebp movl $0x44000, %eax # imm = 0x44000 movl $0x80000, %ecx # imm = 0x80000 cmovel %eax, %ecx movl %ecx, (%rsp) movq %r12, %rdi movq %rbx, %rsi movq %r15, %rdx movl %r13d, %ecx movq 0x8(%rsp), %r8 movq 0x10(%rsp), %r9 callq 0x72bf0 movl %ebp, 0x8(%rsp) movl %eax, %ebp movq %r12, %rdi movl %r13d, %esi callq 0x202f5 testl %ebp, %ebp js 0x129b0 cmpl $0x0, 0x8(%rsp) je 0x129cb xorl %ebx, %ebx testl %ebp, %ebp setne %bl pushq $0x1 jmp 0x129ac leaq 0x8df4f(%rip), %rsi # 0xa08ed xorl %ebx, %ebx movq %r12, %rdi xorl %eax, %eax callq 0x2214f pushq $0x6 popq %r14 jmp 0x129b2 xorl %ebx, %ebx xorl %ecx, %ecx movl %ebx, %eax orq %rcx, %rax movq %r14, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq incl (%rbx) movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rbx, %rcx movq %r15, %r14 jmp 0x129b4
js_object_defineProperty: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r12, rdi mov r15, [r8+8] cmp r15d, 0FFFFFFFFh jnz loc_12997 mov ebp, r9d mov rbx, [r8] mov rax, [r8+20h] mov [rsp+48h+var_40], rax mov rax, [r8+28h] mov [rsp+48h+var_38], rax mov rsi, [r8+10h] mov rdx, [r8+18h] mov rdi, r12 call JS_ValueToAtom push 6 pop r14 test eax, eax jz short loc_129B0 mov r13d, eax test ebp, ebp mov eax, 44000h mov ecx, offset loc_80000 cmovz ecx, eax mov [rsp+48h+var_48], ecx mov rdi, r12 mov rsi, rbx mov rdx, r15 mov ecx, r13d mov r8, [rsp+48h+var_40] mov r9, [rsp+48h+var_38] call JS_DefinePropertyDesc mov dword ptr [rsp+48h+var_40], ebp mov ebp, eax mov rdi, r12 mov esi, r13d call JS_FreeAtom test ebp, ebp js short loc_129B0 cmp dword ptr [rsp+48h+var_40], 0 jz short loc_129CB xor ebx, ebx test ebp, ebp setnz bl push 1 jmp short loc_129AC loc_12997: lea rsi, aOperandPrototy+20h; "not an object" xor ebx, ebx mov rdi, r12 xor eax, eax call JS_ThrowTypeError push 6 loc_129AC: pop r14 jmp short loc_129B2 loc_129B0: xor ebx, ebx loc_129B2: xor ecx, ecx loc_129B4: mov eax, ebx or rax, rcx mov rdx, r14 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_129CB: inc dword ptr [rbx] mov rcx, 0FFFFFFFF00000000h and rcx, rbx mov r14, r15 jmp short loc_129B4
unsigned long long js_object_defineProperty( long long a1, long long a2, int a3, int a4, unsigned long long *a5, int a6) { unsigned long long v7; // rbx unsigned int v8; // eax unsigned int v9; // r13d void *v10; // rcx int v11; // eax int v12; // ebp unsigned long long v13; // rcx unsigned long long v15; // [rsp+8h] [rbp-40h] int v16; // [rsp+8h] [rbp-40h] unsigned long long v17; // [rsp+10h] [rbp-38h] if ( (unsigned int)a5[1] == -1 ) { v7 = *a5; v15 = a5[4]; v17 = a5[5]; v8 = JS_ValueToAtom(a1, a5[2], a5[3]); if ( !v8 ) goto LABEL_9; v9 = v8; v10 = &loc_80000; if ( !a6 ) LODWORD(v10) = 278528; v11 = JS_DefinePropertyDesc(a1, v7, -1, v8, v15, v17, (_DWORD)v10); v16 = a6; v12 = v11; JS_FreeAtom(a1, v9); if ( v12 >= 0 ) { if ( !v16 ) { ++*(_DWORD *)v7; v13 = v7 & 0xFFFFFFFF00000000LL; return v13 | (unsigned int)v7; } LODWORD(v7) = v12 != 0; } else { LABEL_9: LODWORD(v7) = 0; } } else { LODWORD(v7) = 0; JS_ThrowTypeError(a1, (unsigned int)"not an object", a3, a4, (_DWORD)a5, a6); } v13 = 0LL; return v13 | (unsigned int)v7; }
js_object_defineProperty: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R12,RDI MOV R15,qword ptr [R8 + 0x8] CMP R15D,-0x1 JNZ 0x00112997 MOV EBP,R9D MOV RBX,qword ptr [R8] MOV RAX,qword ptr [R8 + 0x20] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [R8 + 0x28] MOV qword ptr [RSP + 0x10],RAX MOV RSI,qword ptr [R8 + 0x10] MOV RDX,qword ptr [R8 + 0x18] MOV RDI,R12 CALL 0x00123ad1 PUSH 0x6 POP R14 TEST EAX,EAX JZ 0x001129b0 MOV R13D,EAX TEST EBP,EBP MOV EAX,0x44000 MOV ECX,0x80000 CMOVZ ECX,EAX MOV dword ptr [RSP],ECX MOV RDI,R12 MOV RSI,RBX MOV RDX,R15 MOV ECX,R13D MOV R8,qword ptr [RSP + 0x8] MOV R9,qword ptr [RSP + 0x10] CALL 0x00172bf0 MOV dword ptr [RSP + 0x8],EBP MOV EBP,EAX MOV RDI,R12 MOV ESI,R13D CALL 0x001202f5 TEST EBP,EBP JS 0x001129b0 CMP dword ptr [RSP + 0x8],0x0 JZ 0x001129cb XOR EBX,EBX TEST EBP,EBP SETNZ BL PUSH 0x1 JMP 0x001129ac LAB_00112997: LEA RSI,[0x1a08ed] XOR EBX,EBX MOV RDI,R12 XOR EAX,EAX CALL 0x0012214f PUSH 0x6 LAB_001129ac: POP R14 JMP 0x001129b2 LAB_001129b0: XOR EBX,EBX LAB_001129b2: XOR ECX,ECX LAB_001129b4: MOV EAX,EBX OR RAX,RCX MOV RDX,R14 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001129cb: INC dword ptr [RBX] MOV RCX,-0x100000000 AND RCX,RBX MOV R14,R15 JMP 0x001129b4
int1 [16] js_object_defineProperty(int8 param_1) { int8 uVar1; int8 uVar2; int iVar3; int iVar4; int4 uVar5; ulong uVar6; int *piVar7; int8 *in_R8; int in_R9D; int1 auVar8 [16]; int8 uStackY_50; uStackY_50 = in_R8[1]; if ((int)uStackY_50 == -1) { piVar7 = (int *)*in_R8; uVar1 = in_R8[4]; uVar2 = in_R8[5]; iVar3 = JS_ValueToAtom(param_1,in_R8[2],in_R8[3]); if (iVar3 != 0) { uVar5 = 0x80000; if (in_R9D == 0) { uVar5 = 0x44000; } iVar4 = JS_DefinePropertyDesc(param_1,piVar7,uStackY_50,iVar3,uVar1,uVar2,uVar5); JS_FreeAtom(param_1,iVar3); if (-1 < iVar4) { if (in_R9D == 0) { *piVar7 = *piVar7 + 1; uVar6 = (ulong)piVar7 & 0xffffffff00000000; goto LAB_001129b4; } piVar7 = (int *)(ulong)(iVar4 != 0); uStackY_50 = 1; goto LAB_001129b2; } } piVar7 = (int *)0x0; uStackY_50 = 6; } else { piVar7 = (int *)0x0; JS_ThrowTypeError(param_1,"not an object"); uStackY_50 = 6; } LAB_001129b2: uVar6 = 0; LAB_001129b4: auVar8._0_8_ = (ulong)piVar7 & 0xffffffff | uVar6; auVar8._8_8_ = uStackY_50; return auVar8; }
11,668
ggml_fp32_to_fp16_row
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
void ggml_fp32_to_fp16_row(const float * x, ggml_fp16_t * y, int n) { int i = 0; #if defined(__F16C__) for (; i + 7 < n; i += 8) { __m256 x_vec = _mm256_loadu_ps(x + i); __m128i y_vec = _mm256_cvtps_ph(x_vec, _MM_FROUND_TO_NEAREST_INT); _mm_storeu_si128((__m128i *)(y + i), y_vec); } for(; i + 3 < n; i += 4) { __m128 x_vec = _mm_loadu_ps(x + i); __m128i y_vec = _mm_cvtps_ph(x_vec, _MM_FROUND_TO_NEAREST_INT); _mm_storel_epi64((__m128i *)(y + i), y_vec); } #endif for (; i < n; i++) { y[i] = GGML_FP32_TO_FP16(x[i]); } }
O1
c
ggml_fp32_to_fp16_row: xorl %ecx, %ecx movl %edx, %eax cmpl $0x8, %edx jl 0x8dc45 xorl %ecx, %ecx movq %rcx, %r8 vmovdqu (%rdi,%rcx,4), %ymm0 vcvtps2ph $0x0, %ymm0, (%rsi,%rcx,2) addq $0x8, %rcx addq $0xf, %r8 cmpq %rax, %r8 jb 0x8dc29 movl %ecx, %r8d orl $0x3, %r8d cmpl %edx, %r8d jge 0x8dc73 movl %ecx, %ecx movl %ecx, %r8d vmovdqu (%rdi,%rcx,4), %xmm0 vcvtps2ph $0x0, %xmm0, (%rsi,%rcx,2) addq $0x4, %rcx addl $0x4, %r8d orl $0x3, %r8d cmpl %edx, %r8d jl 0x8dc53 cmpl %edx, %ecx jge 0x8dc93 movl %ecx, %ecx vmovss (%rdi,%rcx,4), %xmm0 vcvtps2ph $0x0, %xmm0, %xmm0 vpextrw $0x0, %xmm0, (%rsi,%rcx,2) incq %rcx cmpq %rcx, %rax jne 0x8dc79 vzeroupper retq
ggml_fp32_to_fp16_row: xor ecx, ecx mov eax, edx cmp edx, 8 jl short loc_8DC45 xor ecx, ecx loc_8DC29: mov r8, rcx vmovdqu ymm0, ymmword ptr [rdi+rcx*4] vcvtps2ph xmmword ptr [rsi+rcx*2], ymm0, 0 add rcx, 8 add r8, 0Fh cmp r8, rax jb short loc_8DC29 loc_8DC45: mov r8d, ecx or r8d, 3 cmp r8d, edx jge short loc_8DC73 mov ecx, ecx loc_8DC53: mov r8d, ecx vmovdqu xmm0, xmmword ptr [rdi+rcx*4] vcvtps2ph qword ptr [rsi+rcx*2], xmm0, 0 add rcx, 4 add r8d, 4 or r8d, 3 cmp r8d, edx jl short loc_8DC53 loc_8DC73: cmp ecx, edx jge short loc_8DC93 mov ecx, ecx loc_8DC79: vmovss xmm0, dword ptr [rdi+rcx*4] vcvtps2ph xmm0, xmm0, 0 vpextrw word ptr [rsi+rcx*2], xmm0, 0 inc rcx cmp rax, rcx jnz short loc_8DC79 loc_8DC93: vzeroupper retn
long long ggml_fp32_to_fp16_row(long long _RDI, long long _RSI, int a3) { long long result; // rax long long v5; // r8 int v7; // r8d LODWORD(_RCX) = 0; result = (unsigned int)a3; if ( a3 >= 8 ) { _RCX = 0LL; do { v5 = _RCX; __asm { vmovdqu ymm0, ymmword ptr [rdi+rcx*4] vcvtps2ph xmmword ptr [rsi+rcx*2], ymm0, 0 } _RCX += 8LL; } while ( v5 + 15 < (unsigned long long)(unsigned int)a3 ); } if ( (int)(_RCX | 3) < a3 ) { _RCX = (unsigned int)_RCX; do { v7 = _RCX; __asm { vmovdqu xmm0, xmmword ptr [rdi+rcx*4] vcvtps2ph qword ptr [rsi+rcx*2], xmm0, 0 } _RCX += 4LL; } while ( ((v7 + 4) | 3) < a3 ); } if ( (int)_RCX < a3 ) { _RCX = (unsigned int)_RCX; do { __asm { vmovss xmm0, dword ptr [rdi+rcx*4] vcvtps2ph xmm0, xmm0, 0 vpextrw word ptr [rsi+rcx*2], xmm0, 0 } ++_RCX; } while ( a3 != _RCX ); } __asm { vzeroupper } return result; }
11,669
ggml_fp32_to_fp16_row
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
void ggml_fp32_to_fp16_row(const float * x, ggml_fp16_t * y, int n) { int i = 0; #if defined(__F16C__) for (; i + 7 < n; i += 8) { __m256 x_vec = _mm256_loadu_ps(x + i); __m128i y_vec = _mm256_cvtps_ph(x_vec, _MM_FROUND_TO_NEAREST_INT); _mm_storeu_si128((__m128i *)(y + i), y_vec); } for(; i + 3 < n; i += 4) { __m128 x_vec = _mm_loadu_ps(x + i); __m128i y_vec = _mm_cvtps_ph(x_vec, _MM_FROUND_TO_NEAREST_INT); _mm_storel_epi64((__m128i *)(y + i), y_vec); } #endif for (; i < n; i++) { y[i] = GGML_FP32_TO_FP16(x[i]); } }
O2
c
ggml_fp32_to_fp16_row: movslq %edx, %rax xorl %ecx, %ecx leaq 0x7(%rcx), %rdx cmpq %rax, %rdx jge 0x6766d vmovdqu (%rdi,%rcx,4), %ymm0 vcvtps2ph $0x0, %ymm0, (%rsi,%rcx,2) addq $0x8, %rcx jmp 0x67642 vmovdqu (%rdi,%rcx,4), %xmm0 vcvtps2ph $0x0, %xmm0, (%rsi,%rcx,2) addq $0x4, %rcx leaq 0x3(%rcx), %rdx cmpq %rax, %rdx jl 0x6765d jmp 0x6768d vmovss (%rdi,%rcx,4), %xmm0 vcvtps2ph $0x0, %xmm0, %xmm0 vpextrw $0x0, %xmm0, (%rsi,%rcx,2) incq %rcx cmpq %rax, %rcx jl 0x67678 vzeroupper retq
ggml_fp32_to_fp16_row: movsxd rax, edx xor ecx, ecx loc_67642: lea rdx, [rcx+7] cmp rdx, rax jge short loc_6766D vmovdqu ymm0, ymmword ptr [rdi+rcx*4] vcvtps2ph xmmword ptr [rsi+rcx*2], ymm0, 0 add rcx, 8 jmp short loc_67642 loc_6765D: vmovdqu xmm0, xmmword ptr [rdi+rcx*4] vcvtps2ph qword ptr [rsi+rcx*2], xmm0, 0 add rcx, 4 loc_6766D: lea rdx, [rcx+3] cmp rdx, rax jl short loc_6765D jmp short loc_6768D loc_67678: vmovss xmm0, dword ptr [rdi+rcx*4] vcvtps2ph xmm0, xmm0, 0 vpextrw word ptr [rsi+rcx*2], xmm0, 0 inc rcx loc_6768D: cmp rcx, rax jl short loc_67678 vzeroupper retn
long long ggml_fp32_to_fp16_row(long long _RDI, long long _RSI, int a3) { long long result; // rax result = a3; for ( _RCX = 0LL; _RCX + 7 < a3; _RCX += 8LL ) { __asm { vmovdqu ymm0, ymmword ptr [rdi+rcx*4] vcvtps2ph xmmword ptr [rsi+rcx*2], ymm0, 0 } } while ( _RCX + 3 < a3 ) { __asm { vmovdqu xmm0, xmmword ptr [rdi+rcx*4] vcvtps2ph qword ptr [rsi+rcx*2], xmm0, 0 } _RCX += 4LL; } while ( _RCX < a3 ) { __asm { vmovss xmm0, dword ptr [rdi+rcx*4] vcvtps2ph xmm0, xmm0, 0 vpextrw word ptr [rsi+rcx*2], xmm0, 0 } ++_RCX; } __asm { vzeroupper } return result; }
ggml_fp32_to_fp16_row: MOVSXD RAX,EDX XOR ECX,ECX LAB_00167642: LEA RDX,[RCX + 0x7] CMP RDX,RAX JGE 0x0016766d VMOVDQU YMM0,ymmword ptr [RDI + RCX*0x4] VCVTPS2PH xmmword ptr [RSI + RCX*0x2],YMM0,0x0 ADD RCX,0x8 JMP 0x00167642 LAB_0016765d: VMOVDQU XMM0,xmmword ptr [RDI + RCX*0x4] VCVTPS2PH qword ptr [RSI + RCX*0x2],XMM0,0x0 ADD RCX,0x4 LAB_0016766d: LEA RDX,[RCX + 0x3] CMP RDX,RAX JL 0x0016765d JMP 0x0016768d LAB_00167678: VMOVSS XMM0,dword ptr [RDI + RCX*0x4] VCVTPS2PH XMM0,XMM0,0x0 VPEXTRW word ptr [RSI + RCX*0x2],XMM0,0x0 INC RCX LAB_0016768d: CMP RCX,RAX JL 0x00167678 VZEROUPPER RET
void ggml_fp32_to_fp16_row(long param_1,long param_2,int param_3) { long lVar1; long lVar2; int1 auVar3 [16]; lVar1 = (long)param_3; for (lVar2 = 0; lVar2 + 7 < lVar1; lVar2 = lVar2 + 8) { auVar3 = vcvtps2ph_f16c(*(int1 (*) [32])(param_1 + lVar2 * 4),0); *(int1 (*) [16])(param_2 + lVar2 * 2) = auVar3; } for (; lVar2 + 3 < lVar1; lVar2 = lVar2 + 4) { vcvtps2ph_f16c(*(int1 (*) [16])(param_1 + lVar2 * 4),0); } for (; lVar2 < lVar1; lVar2 = lVar2 + 1) { auVar3 = vcvtps2ph_f16c(ZEXT416(*(uint *)(param_1 + lVar2 * 4)),0); vpextrw_avx(auVar3,0); } return; }
11,670
ggml_fp32_to_fp16_row
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
void ggml_fp32_to_fp16_row(const float * x, ggml_fp16_t * y, int n) { int i = 0; #if defined(__F16C__) for (; i + 7 < n; i += 8) { __m256 x_vec = _mm256_loadu_ps(x + i); __m128i y_vec = _mm256_cvtps_ph(x_vec, _MM_FROUND_TO_NEAREST_INT); _mm_storeu_si128((__m128i *)(y + i), y_vec); } for(; i + 3 < n; i += 4) { __m128 x_vec = _mm_loadu_ps(x + i); __m128i y_vec = _mm_cvtps_ph(x_vec, _MM_FROUND_TO_NEAREST_INT); _mm_storel_epi64((__m128i *)(y + i), y_vec); } #endif for (; i < n; i++) { y[i] = GGML_FP32_TO_FP16(x[i]); } }
O3
c
ggml_fp32_to_fp16_row: xorl %ecx, %ecx movl %edx, %eax cmpl $0x8, %edx jl 0x8c9e9 xorl %ecx, %ecx movq %rcx, %r8 vmovdqu (%rdi,%rcx,4), %ymm0 vcvtps2ph $0x0, %ymm0, (%rsi,%rcx,2) addq $0x8, %rcx addq $0xf, %r8 cmpq %rax, %r8 jb 0x8c9cd movl %ecx, %r8d orl $0x3, %r8d cmpl %edx, %r8d jge 0x8ca17 movl %ecx, %ecx movl %ecx, %r8d vmovdqu (%rdi,%rcx,4), %xmm0 vcvtps2ph $0x0, %xmm0, (%rsi,%rcx,2) addq $0x4, %rcx addl $0x4, %r8d orl $0x3, %r8d cmpl %edx, %r8d jl 0x8c9f7 cmpl %edx, %ecx jge 0x8ca37 movl %ecx, %ecx vmovss (%rdi,%rcx,4), %xmm0 vcvtps2ph $0x0, %xmm0, %xmm0 vpextrw $0x0, %xmm0, (%rsi,%rcx,2) incq %rcx cmpq %rcx, %rax jne 0x8ca1d vzeroupper retq
ggml_fp32_to_fp16_row: xor ecx, ecx mov eax, edx cmp edx, 8 jl short loc_8C9E9 xor ecx, ecx loc_8C9CD: mov r8, rcx vmovdqu ymm0, ymmword ptr [rdi+rcx*4] vcvtps2ph xmmword ptr [rsi+rcx*2], ymm0, 0 add rcx, 8 add r8, 0Fh cmp r8, rax jb short loc_8C9CD loc_8C9E9: mov r8d, ecx or r8d, 3 cmp r8d, edx jge short loc_8CA17 mov ecx, ecx loc_8C9F7: mov r8d, ecx vmovdqu xmm0, xmmword ptr [rdi+rcx*4] vcvtps2ph qword ptr [rsi+rcx*2], xmm0, 0 add rcx, 4 add r8d, 4 or r8d, 3 cmp r8d, edx jl short loc_8C9F7 loc_8CA17: cmp ecx, edx jge short loc_8CA37 mov ecx, ecx loc_8CA1D: vmovss xmm0, dword ptr [rdi+rcx*4] vcvtps2ph xmm0, xmm0, 0 vpextrw word ptr [rsi+rcx*2], xmm0, 0 inc rcx cmp rax, rcx jnz short loc_8CA1D loc_8CA37: vzeroupper retn
long long ggml_fp32_to_fp16_row(long long _RDI, long long _RSI, int a3) { long long result; // rax long long v5; // r8 int v7; // r8d LODWORD(_RCX) = 0; result = (unsigned int)a3; if ( a3 >= 8 ) { _RCX = 0LL; do { v5 = _RCX; __asm { vmovdqu ymm0, ymmword ptr [rdi+rcx*4] vcvtps2ph xmmword ptr [rsi+rcx*2], ymm0, 0 } _RCX += 8LL; } while ( v5 + 15 < (unsigned long long)(unsigned int)a3 ); } if ( (int)(_RCX | 3) < a3 ) { _RCX = (unsigned int)_RCX; do { v7 = _RCX; __asm { vmovdqu xmm0, xmmword ptr [rdi+rcx*4] vcvtps2ph qword ptr [rsi+rcx*2], xmm0, 0 } _RCX += 4LL; } while ( ((v7 + 4) | 3) < a3 ); } if ( (int)_RCX < a3 ) { _RCX = (unsigned int)_RCX; do { __asm { vmovss xmm0, dword ptr [rdi+rcx*4] vcvtps2ph xmm0, xmm0, 0 vpextrw word ptr [rsi+rcx*2], xmm0, 0 } ++_RCX; } while ( a3 != _RCX ); } __asm { vzeroupper } return result; }
11,671
my_register_filename
eloqsql/mysys/my_open.c
File my_register_filename(File fd, const char *FileName, enum file_type type_of_file, uint error_message_number, myf MyFlags) { DBUG_ENTER("my_register_filename"); if ((int) fd >= MY_FILE_MIN) { my_atomic_add32_explicit(&my_file_opened, 1, MY_MEMORY_ORDER_RELAXED); if ((uint) fd >= my_file_limit || (MyFlags & MY_NO_REGISTER)) DBUG_RETURN(fd); my_file_info[fd].name = my_strdup(key_memory_my_file_info, FileName, MyFlags); statistic_increment(my_file_total_opened,&THR_LOCK_open); my_file_info[fd].type = type_of_file; DBUG_PRINT("exit",("fd: %d",fd)); DBUG_RETURN(fd); } my_errno= errno; DBUG_PRINT("error",("Got error %d on open", my_errno)); if (MyFlags & (MY_FFNF | MY_FAE | MY_WME)) { if (my_errno == EMFILE) error_message_number= EE_OUT_OF_FILERESOURCES; my_error(error_message_number, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))), FileName, my_errno); } DBUG_RETURN(-1); }
O3
c
my_register_filename: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %r14 movq %rsi, %r15 testl %edi, %edi js 0x33ec9 movl %edi, %ebx leaq 0x355189(%rip), %rax # 0x388ff4 lock incl (%rax) testl $0x2004, %r14d # imm = 0x2004 jne 0x33f18 leaq 0x2c553e(%rip), %rax # 0x2f93c0 cmpl %ebx, (%rax) jbe 0x33f18 movl %edx, %r13d leaq 0x355690(%rip), %rax # 0x389524 movl (%rax), %edi movq %r15, %rsi movq %r14, %rdx callq 0x2bc1c leaq 0x2c5520(%rip), %rcx # 0x2f93c8 movq (%rcx), %rdx movl %ebx, %esi shlq $0x4, %rsi movq %rax, (%rdx,%rsi) leaq 0x355124(%rip), %rax # 0x388fe0 incq (%rax) movq (%rcx), %rax movl %r13d, 0x8(%rax,%rsi) jmp 0x33f18 movl %ecx, %r12d callq 0x24050 movl (%rax), %ebx callq 0x2c376 movl %ebx, (%rax) movl $0xffffffff, %ebx # imm = 0xFFFFFFFF testb $0x19, %r14b je 0x33f18 callq 0x2c376 cmpl $0x18, (%rax) movl $0x17, %eax cmovel %eax, %r12d andl $0x440, %r14d # imm = 0x440 orq $0x4, %r14 callq 0x2c376 movl (%rax), %ecx movl %r12d, %edi movq %r14, %rsi movq %r15, %rdx xorl %eax, %eax callq 0x3339b movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_register_filename: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, r8 mov r15, rsi test edi, edi js short loc_33EC9 mov ebx, edi lea rax, my_file_opened lock inc dword ptr [rax] test r14d, 2004h jnz loc_33F18 lea rax, my_file_limit cmp [rax], ebx jbe loc_33F18 mov r13d, edx lea rax, key_memory_my_file_info mov edi, [rax] mov rsi, r15 mov rdx, r14 call my_strdup lea rcx, my_file_info mov rdx, [rcx] mov esi, ebx shl rsi, 4 mov [rdx+rsi], rax lea rax, my_file_total_opened inc qword ptr [rax] mov rax, [rcx] mov [rax+rsi+8], r13d jmp short loc_33F18 loc_33EC9: mov r12d, ecx call ___errno_location mov ebx, [rax] call _my_thread_var mov [rax], ebx mov ebx, 0FFFFFFFFh test r14b, 19h jz short loc_33F18 call _my_thread_var cmp dword ptr [rax], 18h mov eax, 17h cmovz r12d, eax and r14d, 440h or r14, 4 call _my_thread_var mov ecx, [rax] mov edi, r12d mov rsi, r14 mov rdx, r15 xor eax, eax call my_error loc_33F18: mov eax, ebx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_register_filename(long long a1, long long a2, int a3, unsigned int a4, __int16 a5) { unsigned int v6; // ebx long long v8; // rax long long v9; // rsi int v11; // ebx unsigned int *v12; // rax if ( (int)a1 < 0 ) { v11 = *(_DWORD *)__errno_location(a1); *(_DWORD *)my_thread_var() = v11; v6 = -1; if ( (a5 & 0x19) != 0 ) { if ( *(_DWORD *)my_thread_var() == 24 ) a4 = 23; v12 = (unsigned int *)my_thread_var(); my_error(a4, a5 & 0x440 | 4, a2, *v12); } } else { v6 = a1; _InterlockedIncrement(my_file_opened); if ( (a5 & 0x2004) == 0 && my_file_limit > (unsigned int)a1 ) { v8 = my_strdup(key_memory_my_file_info, a2, a5); v9 = 16LL * (unsigned int)a1; *(_QWORD *)((char *)my_file_info + v9) = v8; ++my_file_total_opened; *(_DWORD *)((char *)my_file_info + v9 + 8) = a3; } } return v6; }
my_register_filename: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,R8 MOV R15,RSI TEST EDI,EDI JS 0x00133ec9 MOV EBX,EDI LEA RAX,[0x488ff4] INC.LOCK dword ptr [RAX] TEST R14D,0x2004 JNZ 0x00133f18 LEA RAX,[0x3f93c0] CMP dword ptr [RAX],EBX JBE 0x00133f18 MOV R13D,EDX LEA RAX,[0x489524] MOV EDI,dword ptr [RAX] MOV RSI,R15 MOV RDX,R14 CALL 0x0012bc1c LEA RCX,[0x3f93c8] MOV RDX,qword ptr [RCX] MOV ESI,EBX SHL RSI,0x4 MOV qword ptr [RDX + RSI*0x1],RAX LEA RAX,[0x488fe0] INC qword ptr [RAX] MOV RAX,qword ptr [RCX] MOV dword ptr [RAX + RSI*0x1 + 0x8],R13D JMP 0x00133f18 LAB_00133ec9: MOV R12D,ECX CALL 0x00124050 MOV EBX,dword ptr [RAX] CALL 0x0012c376 MOV dword ptr [RAX],EBX MOV EBX,0xffffffff TEST R14B,0x19 JZ 0x00133f18 CALL 0x0012c376 CMP dword ptr [RAX],0x18 MOV EAX,0x17 CMOVZ R12D,EAX AND R14D,0x440 OR R14,0x4 CALL 0x0012c376 MOV ECX,dword ptr [RAX] MOV EDI,R12D MOV RSI,R14 MOV RDX,R15 XOR EAX,EAX CALL 0x0013339b LAB_00133f18: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
uint my_register_filename (uint param_1,int8 param_2,int4 param_3,int4 param_4,ulong param_5) { int iVar1; int8 uVar2; int *piVar3; int4 *puVar4; if ((int)param_1 < 0) { piVar3 = __errno_location(); iVar1 = *piVar3; piVar3 = (int *)_my_thread_var(); *piVar3 = iVar1; param_1 = 0xffffffff; if ((param_5 & 0x19) != 0) { piVar3 = (int *)_my_thread_var(); if (*piVar3 == 0x18) { param_4 = 0x17; } puVar4 = (int4 *)_my_thread_var(); my_error(param_4,(uint)param_5 & 0x440 | 4,param_2,*puVar4); } } else { LOCK(); my_file_opened = my_file_opened + 1; UNLOCK(); if (((param_5 & 0x2004) == 0) && (param_1 < my_file_limit)) { uVar2 = my_strdup(key_memory_my_file_info,param_2,param_5); *(int8 *)(my_file_info + (ulong)param_1 * 0x10) = uVar2; my_file_total_opened = my_file_total_opened + 1; *(int4 *)(my_file_info + (ulong)param_1 * 0x10 + 8) = param_3; } } return param_1; }
11,672
google::protobuf::compiler::java::ClassNameResolver::GetFileDefaultImmutableClassName[abi:cxx11](google::protobuf::FileDescriptor const*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/name_resolver.cc
std::string ClassNameResolver::GetFileDefaultImmutableClassName( const FileDescriptor* file) { std::string basename; std::string::size_type last_slash = file->name().find_last_of('/'); if (last_slash == std::string::npos) { basename = file->name(); } else { basename = file->name().substr(last_slash + 1); } return UnderscoresToCamelCase(StripProto(basename), true); }
O3
cpp
google::protobuf::compiler::java::ClassNameResolver::GetFileDefaultImmutableClassName[abi:cxx11](google::protobuf::FileDescriptor const*): pushq %r15 pushq %r14 pushq %rbx subq $0x40, %rsp movq %rdx, %r14 movq %rdi, %rbx leaq 0x30(%rsp), %r15 movq %r15, -0x10(%r15) movq $0x0, -0x8(%r15) movb $0x0, (%r15) movq 0x8(%rdx), %rdi movl $0x2f, %esi movq $-0x1, %rdx callq 0x1f910 cmpq $-0x1, %rax je 0x473e0 movq 0x8(%r14), %rsi incq %rax movq %rsp, %rdi movq %rax, %rdx movq $-0x1, %rcx callq 0x1f510 leaq 0x20(%rsp), %rdi movq %rsp, %r14 movq %r14, %rsi callq 0x1f5d0 movq (%r14), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x473ee callq 0x1f4a0 jmp 0x473ee movq 0x8(%r14), %rsi leaq 0x20(%rsp), %rdi callq 0x1f260 movq %rsp, %rdi leaq 0x20(%rsp), %rsi callq 0x25634 movq %rsp, %rsi movq %rbx, %rdi movl $0x1, %edx callq 0x4323a leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x4741e callq 0x1f4a0 movq 0x20(%rsp), %rdi cmpq %r15, %rdi je 0x4742d callq 0x1f4a0 movq %rbx, %rax addq $0x40, %rsp popq %rbx popq %r14 popq %r15 retq jmp 0x47456 jmp 0x47456 movq %rax, %rbx leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x47459 callq 0x1f4a0 jmp 0x47459 movq %rax, %rbx movq 0x20(%rsp), %rdi cmpq %r15, %rdi je 0x47468 callq 0x1f4a0 movq %rbx, %rdi callq 0x1f860
_ZN6google8protobuf8compiler4java17ClassNameResolver32GetFileDefaultImmutableClassNameB5cxx11EPKNS0_14FileDescriptorE: push r15 push r14 push rbx sub rsp, 40h mov r14, rdx mov rbx, rdi lea r15, [rsp+58h+var_28] mov [r15-10h], r15 mov qword ptr [r15-8], 0 mov byte ptr [r15], 0 mov rdi, [rdx+8] mov esi, 2Fh ; '/' mov rdx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEcm; std::string::rfind(char,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_473E0 mov rsi, [r14+8] inc rax mov rdi, rsp mov rdx, rax mov rcx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) lea rdi, [rsp+58h+var_38] mov r14, rsp mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r14]; void * lea rax, [rsp+58h+var_48] cmp rdi, rax jz short loc_473EE call __ZdlPv; operator delete(void *) jmp short loc_473EE loc_473E0: mov rsi, [r14+8] lea rdi, [rsp+58h+var_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) loc_473EE: mov rdi, rsp; int lea rsi, [rsp+58h+var_38]; int call _ZN6google8protobuf8compiler10StripProtoERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::compiler::StripProto(std::string const&) mov rsi, rsp mov rdi, rbx mov edx, 1 call _ZN6google8protobuf8compiler4java22UnderscoresToCamelCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb; google::protobuf::compiler::java::UnderscoresToCamelCase(std::string const&,bool) lea rax, [rsp+58h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_4741E call __ZdlPv; operator delete(void *) loc_4741E: mov rdi, [rsp+58h+var_38]; void * cmp rdi, r15 jz short loc_4742D call __ZdlPv; operator delete(void *) loc_4742D: mov rax, rbx add rsp, 40h pop rbx pop r14 pop r15 retn jmp short loc_47456 jmp short loc_47456 mov rbx, rax lea rax, [rsp+arg_8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_47459 call __ZdlPv; operator delete(void *) jmp short loc_47459 loc_47456: mov rbx, rax loc_47459: mov rdi, [rsp+arg_18]; void * cmp rdi, r15 jz short loc_47468 call __ZdlPv; operator delete(void *) loc_47468: mov rdi, rbx call __Unwind_Resume
long long google::protobuf::compiler::java::ClassNameResolver::GetFileDefaultImmutableClassName[abi:cxx11]( long long a1, int a2, long long a3) { long long v4; // rax void *v6[2]; // [rsp+0h] [rbp-58h] BYREF _BYTE v7[16]; // [rsp+10h] [rbp-48h] BYREF void *v8[2]; // [rsp+20h] [rbp-38h] BYREF _BYTE v9[40]; // [rsp+30h] [rbp-28h] BYREF v8[0] = v9; v8[1] = 0LL; v9[0] = 0; v4 = std::string::rfind(*(_QWORD *)(a3 + 8), 47LL, -1LL); if ( v4 == -1 ) { std::string::_M_assign(v8, *(_QWORD *)(a3 + 8)); } else { std::string::substr(v6, *(_QWORD *)(a3 + 8), v4 + 1, -1LL); std::string::operator=(v8, v6); if ( v6[0] != v7 ) operator delete(v6[0]); } google::protobuf::compiler::StripProto(v6, (long long *)v8); google::protobuf::compiler::java::UnderscoresToCamelCase(a1, (long long)v6, 1); if ( v6[0] != v7 ) operator delete(v6[0]); if ( v8[0] != v9 ) operator delete(v8[0]); return a1; }
GetFileDefaultImmutableClassName[abi:cxx11]: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RDX MOV RBX,RDI LEA R15,[RSP + 0x30] MOV qword ptr [R15 + -0x10],R15 MOV qword ptr [R15 + -0x8],0x0 MOV byte ptr [R15],0x0 MOV RDI,qword ptr [RDX + 0x8] MOV ESI,0x2f MOV RDX,-0x1 CALL 0x0011f910 CMP RAX,-0x1 JZ 0x001473e0 MOV RSI,qword ptr [R14 + 0x8] INC RAX LAB_001473aa: MOV RDI,RSP MOV RDX,RAX MOV RCX,-0x1 CALL 0x0011f510 LEA RDI,[RSP + 0x20] MOV R14,RSP MOV RSI,R14 CALL 0x0011f5d0 MOV RDI,qword ptr [R14] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x001473ee CALL 0x0011f4a0 JMP 0x001473ee LAB_001473e0: MOV RSI,qword ptr [R14 + 0x8] LAB_001473e4: LEA RDI,[RSP + 0x20] CALL 0x0011f260 LAB_001473ee: MOV RDI,RSP LEA RSI,[RSP + 0x20] CALL 0x00125634 LAB_001473fb: MOV RSI,RSP MOV RDI,RBX MOV EDX,0x1 CALL 0x0014323a LAB_0014740b: LEA RAX,[RSP + 0x10] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0014741e CALL 0x0011f4a0 LAB_0014741e: MOV RDI,qword ptr [RSP + 0x20] CMP RDI,R15 JZ 0x0014742d CALL 0x0011f4a0 LAB_0014742d: MOV RAX,RBX ADD RSP,0x40 POP RBX POP R14 POP R15 RET
/* google::protobuf::compiler::java::ClassNameResolver::GetFileDefaultImmutableClassName[abi:cxx11](google::protobuf::FileDescriptor const*) */ FileDescriptor * google::protobuf::compiler::java::ClassNameResolver::GetFileDefaultImmutableClassName_abi_cxx11_ (FileDescriptor *param_1) { long lVar1; long in_RDX; int1 *local_58 [2]; int1 local_48 [16]; int1 *local_38; int8 local_30; int1 local_28 [16]; local_30 = 0; local_28[0] = 0; local_38 = local_28; lVar1 = std::__cxx11::string::rfind((char)*(int8 *)(in_RDX + 8),0x2f); if (lVar1 == -1) { /* try { // try from 001473e4 to 001473ed has its CatchHandler @ 0014743a */ std::__cxx11::string::_M_assign((string *)&local_38); } else { /* try { // try from 001473aa to 001473bb has its CatchHandler @ 0014743c */ std::__cxx11::string::substr((ulong)local_58,*(ulong *)(in_RDX + 8)); std::__cxx11::string::operator=((string *)&local_38,(string *)local_58); if (local_58[0] != local_48) { operator_delete(local_58[0]); } } /* try { // try from 001473ee to 001473fa has its CatchHandler @ 00147456 */ StripProto((compiler *)local_58,(string *)&local_38); /* try { // try from 001473fb to 0014740a has its CatchHandler @ 0014743e */ UnderscoresToCamelCase((string *)param_1,SUB81(local_58,0)); if (local_58[0] != local_48) { operator_delete(local_58[0]); } if (local_38 != local_28) { operator_delete(local_38); } return param_1; }
11,673
stbi__jpeg_get_bit
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h
stbi_inline static int stbi__jpeg_get_bit(stbi__jpeg *j) { unsigned int k; if (j->code_bits < 1) stbi__grow_buffer_unsafe(j); if (j->code_bits < 1) return 0; // ran out of bits from stream, return 0s intead of continuing k = j->code_buffer; j->code_buffer <<= 1; --j->code_bits; return k & 0x80000000; }
O3
c
stbi__jpeg_get_bit: pushq %rbx movq %rdi, %rbx movl 0x4824(%rdi), %ecx testl %ecx, %ecx jg 0x38cce movq %rbx, %rdi callq 0x38908 movl 0x4824(%rbx), %ecx testl %ecx, %ecx jle 0x38cec movl 0x4820(%rbx), %eax leal (%rax,%rax), %edx movl %edx, 0x4820(%rbx) decl %ecx movl %ecx, 0x4824(%rbx) andl $0x80000000, %eax # imm = 0x80000000 popq %rbx retq xorl %eax, %eax jmp 0x38cea
stbi__jpeg_get_bit: push rbx mov rbx, rdi mov ecx, [rdi+4824h] test ecx, ecx jg short loc_38CCE mov rdi, rbx call stbi__grow_buffer_unsafe mov ecx, [rbx+4824h] test ecx, ecx jle short loc_38CEC loc_38CCE: mov eax, [rbx+4820h] lea edx, [rax+rax] mov [rbx+4820h], edx dec ecx mov [rbx+4824h], ecx and eax, 80000000h loc_38CEA: pop rbx retn loc_38CEC: xor eax, eax jmp short loc_38CEA
long long stbi__jpeg_get_bit(long long a1) { int v1; // ecx int v2; // eax v1 = *(_DWORD *)(a1 + 18468); if ( v1 <= 0 ) { stbi__grow_buffer_unsafe(a1); v1 = *(_DWORD *)(a1 + 18468); if ( v1 <= 0 ) return 0LL; } v2 = *(_DWORD *)(a1 + 18464); *(_DWORD *)(a1 + 18464) = 2 * v2; *(_DWORD *)(a1 + 18468) = v1 - 1; return v2 & 0x80000000; }
stbi__jpeg_get_bit: PUSH RBX MOV RBX,RDI MOV ECX,dword ptr [RDI + 0x4824] TEST ECX,ECX JG 0x00138cce MOV RDI,RBX CALL 0x00138908 MOV ECX,dword ptr [RBX + 0x4824] TEST ECX,ECX JLE 0x00138cec LAB_00138cce: MOV EAX,dword ptr [RBX + 0x4820] LEA EDX,[RAX + RAX*0x1] MOV dword ptr [RBX + 0x4820],EDX DEC ECX MOV dword ptr [RBX + 0x4824],ECX AND EAX,0x80000000 LAB_00138cea: POP RBX RET LAB_00138cec: XOR EAX,EAX JMP 0x00138cea
uint stbi__jpeg_get_bit(long param_1) { uint uVar1; int iVar2; iVar2 = *(int *)(param_1 + 0x4824); if (iVar2 < 1) { stbi__grow_buffer_unsafe(param_1); iVar2 = *(int *)(param_1 + 0x4824); if (iVar2 < 1) { return 0; } } uVar1 = *(uint *)(param_1 + 0x4820); *(uint *)(param_1 + 0x4820) = uVar1 * 2; *(int *)(param_1 + 0x4824) = iVar2 + -1; return uVar1 & 0x80000000; }
11,674
translog_example_table_init
eloqsql/storage/maria/unittest/ma_loghandler_examples.c
void translog_example_table_init() { int i; log_record_type_descriptor[LOGREC_FIXED_RECORD_0LSN_EXAMPLE]= INIT_LOGREC_FIXED_RECORD_0LSN_EXAMPLE; log_record_type_descriptor[LOGREC_VARIABLE_RECORD_0LSN_EXAMPLE]= INIT_LOGREC_VARIABLE_RECORD_0LSN_EXAMPLE; log_record_type_descriptor[LOGREC_FIXED_RECORD_1LSN_EXAMPLE]= INIT_LOGREC_FIXED_RECORD_1LSN_EXAMPLE; log_record_type_descriptor[LOGREC_VARIABLE_RECORD_1LSN_EXAMPLE]= INIT_LOGREC_VARIABLE_RECORD_1LSN_EXAMPLE; log_record_type_descriptor[LOGREC_FIXED_RECORD_2LSN_EXAMPLE]= INIT_LOGREC_FIXED_RECORD_2LSN_EXAMPLE; log_record_type_descriptor[LOGREC_VARIABLE_RECORD_2LSN_EXAMPLE]= INIT_LOGREC_VARIABLE_RECORD_2LSN_EXAMPLE; for (i= LOGREC_VARIABLE_RECORD_2LSN_EXAMPLE + 1; i < LOGREC_NUMBER_OF_TYPES; i++) log_record_type_descriptor[i].rclass= LOGRECTYPE_NOT_ALLOWED; #ifndef DBUG_OFF check_translog_description_table(LOGREC_VARIABLE_RECORD_2LSN_EXAMPLE); #endif }
O3
c
translog_example_table_init: pushq %rbp movq %rsp, %rbp leaq 0x3d26ed(%rip), %rax # 0x405f80 leaq 0x48(%rax), %rdi leaq 0x34fcc2(%rip), %rsi # 0x383560 movl $0x9, %ecx rep movsq (%rsi), %es:(%rdi) leaq 0x90(%rax), %rdi leaq 0x34fcf4(%rip), %rsi # 0x3835a8 movl $0x9, %ecx rep movsq (%rsi), %es:(%rdi) leaq 0xd8(%rax), %rdi leaq 0x34fd26(%rip), %rsi # 0x3835f0 movl $0x9, %ecx rep movsq (%rsi), %es:(%rdi) leaq 0x120(%rax), %rdi leaq 0x34fd58(%rip), %rsi # 0x383638 movl $0x9, %ecx rep movsq (%rsi), %es:(%rdi) leaq 0x168(%rax), %rdi leaq 0x34fd8a(%rip), %rsi # 0x383680 movl $0x9, %ecx rep movsq (%rsi), %es:(%rdi) leaq 0x1b0(%rax), %rdi leaq 0x34fdbc(%rip), %rsi # 0x3836c8 movl $0x9, %ecx rep movsq (%rsi), %es:(%rdi) addq $0x1f8, %rax # imm = 0x1F8 xorl %ecx, %ecx movdqa 0xac70c(%rip), %xmm0 # 0xe0030 movdqa 0xac714(%rip), %xmm1 # 0xe0040 movdqa 0xac71c(%rip), %xmm2 # 0xe0050 movdqa 0xac724(%rip), %xmm3 # 0xe0060 pshufd $0xf5, %xmm3, %xmm4 # xmm4 = xmm3[1,1,3,3] movq %rcx, %xmm5 pshufd $0x44, %xmm5, %xmm5 # xmm5 = xmm5[0,1,0,1] movdqa %xmm5, %xmm6 por %xmm1, %xmm6 pxor %xmm2, %xmm6 movdqa %xmm3, %xmm7 pcmpgtd %xmm6, %xmm7 pshufd $0xf5, %xmm6, %xmm6 # xmm6 = xmm6[1,1,3,3] pcmpeqd %xmm4, %xmm6 pand %xmm7, %xmm6 movd %xmm6, %edx testb $0x1, %dl je 0x3397b movl $0x0, (%rax) pextrw $0x4, %xmm6, %edx testb $0x1, %dl je 0x3398c movl $0x0, 0x48(%rax) por %xmm0, %xmm5 pxor %xmm2, %xmm5 movdqa %xmm3, %xmm6 pcmpgtd %xmm5, %xmm6 pshufd $0xf5, %xmm5, %xmm5 # xmm5 = xmm5[1,1,3,3] pcmpeqd %xmm4, %xmm5 pand %xmm6, %xmm5 pextrw $0x0, %xmm5, %edx testb $0x1, %dl je 0x339bd movl $0x0, 0x90(%rax) pextrw $0x4, %xmm5, %edx testb $0x1, %dl je 0x339d1 movl $0x0, 0xd8(%rax) addq $0x4, %rcx addq $0x120, %rax # imm = 0x120 cmpq $0x3c, %rcx jne 0x33941 popq %rbp retq nop
translog_example_table_init: push rbp mov rbp, rsp lea rax, log_record_type_descriptor lea rdi, [rax+48h] lea rsi, INIT_LOGREC_FIXED_RECORD_0LSN_EXAMPLE mov ecx, 9 rep movsq lea rdi, [rax+90h] lea rsi, INIT_LOGREC_VARIABLE_RECORD_0LSN_EXAMPLE mov ecx, 9 rep movsq lea rdi, [rax+0D8h] lea rsi, INIT_LOGREC_FIXED_RECORD_1LSN_EXAMPLE mov ecx, 9 rep movsq lea rdi, [rax+120h] lea rsi, INIT_LOGREC_VARIABLE_RECORD_1LSN_EXAMPLE mov ecx, 9 rep movsq lea rdi, [rax+168h] lea rsi, INIT_LOGREC_FIXED_RECORD_2LSN_EXAMPLE mov ecx, 9 rep movsq lea rdi, [rax+1B0h] lea rsi, INIT_LOGREC_VARIABLE_RECORD_2LSN_EXAMPLE mov ecx, 9 rep movsq add rax, 1F8h xor ecx, ecx movdqa xmm0, cs:xmmword_E0030 movdqa xmm1, cs:xmmword_E0040 movdqa xmm2, cs:xmmword_E0050 movdqa xmm3, cs:xmmword_E0060 pshufd xmm4, xmm3, 0F5h loc_33941: movq xmm5, rcx pshufd xmm5, xmm5, 44h ; 'D' movdqa xmm6, xmm5 por xmm6, xmm1 pxor xmm6, xmm2 movdqa xmm7, xmm3 pcmpgtd xmm7, xmm6 pshufd xmm6, xmm6, 0F5h pcmpeqd xmm6, xmm4 pand xmm6, xmm7 movd edx, xmm6 test dl, 1 jz short loc_3397B mov dword ptr [rax], 0 loc_3397B: pextrw edx, xmm6, 4 test dl, 1 jz short loc_3398C mov dword ptr [rax+48h], 0 loc_3398C: por xmm5, xmm0 pxor xmm5, xmm2 movdqa xmm6, xmm3 pcmpgtd xmm6, xmm5 pshufd xmm5, xmm5, 0F5h pcmpeqd xmm5, xmm4 pand xmm5, xmm6 pextrw edx, xmm5, 0 test dl, 1 jz short loc_339BD mov dword ptr [rax+90h], 0 loc_339BD: pextrw edx, xmm5, 4 test dl, 1 jz short loc_339D1 mov dword ptr [rax+0D8h], 0 loc_339D1: add rcx, 4 add rax, 120h cmp rcx, 3Ch ; '<' jnz loc_33941 pop rbp retn
_DWORD *translog_example_table_init() { _DWORD *result; // rax unsigned long long v1; // rcx __m128i si128; // xmm0 __m128i v3; // xmm1 __m128i v4; // xmm2 __m128i v5; // xmm3 __m128i v6; // xmm4 __m128i v7; // xmm5 __m128i v8; // xmm6 __m128i v9; // xmm6 __m128i v10; // xmm5 __m128i v11; // xmm5 qmemcpy((char *)&log_record_type_descriptor + 72, &INIT_LOGREC_FIXED_RECORD_0LSN_EXAMPLE, 0x48uLL); qmemcpy((char *)&log_record_type_descriptor + 144, &INIT_LOGREC_VARIABLE_RECORD_0LSN_EXAMPLE, 0x48uLL); qmemcpy((char *)&log_record_type_descriptor + 216, &INIT_LOGREC_FIXED_RECORD_1LSN_EXAMPLE, 0x48uLL); qmemcpy((char *)&log_record_type_descriptor + 288, &INIT_LOGREC_VARIABLE_RECORD_1LSN_EXAMPLE, 0x48uLL); qmemcpy((char *)&log_record_type_descriptor + 360, &INIT_LOGREC_FIXED_RECORD_2LSN_EXAMPLE, 0x48uLL); qmemcpy((char *)&log_record_type_descriptor + 432, &INIT_LOGREC_VARIABLE_RECORD_2LSN_EXAMPLE, 0x48uLL); result = (_DWORD *)((char *)&log_record_type_descriptor + 504); v1 = 0LL; si128 = _mm_load_si128((const __m128i *)&xmmword_E0030); v3 = _mm_load_si128((const __m128i *)&xmmword_E0040); v4 = _mm_load_si128((const __m128i *)&xmmword_E0050); v5 = _mm_load_si128((const __m128i *)&xmmword_E0060); v6 = _mm_shuffle_epi32(v5, 245); do { v7 = _mm_shuffle_epi32((__m128i)v1, 68); v8 = _mm_xor_si128(_mm_or_si128(v7, v3), v4); v9 = _mm_and_si128(_mm_cmpeq_epi32(_mm_shuffle_epi32(v8, 245), v6), _mm_cmpgt_epi32(v5, v8)); if ( (_mm_cvtsi128_si32(v9) & 1) != 0 ) *result = 0; if ( (_mm_extract_epi16(v9, 4) & 1) != 0 ) result[18] = 0; v10 = _mm_xor_si128(_mm_or_si128(v7, si128), v4); v11 = _mm_and_si128(_mm_cmpeq_epi32(_mm_shuffle_epi32(v10, 245), v6), _mm_cmpgt_epi32(v5, v10)); if ( (_mm_extract_epi16(v11, 0) & 1) != 0 ) result[36] = 0; if ( (_mm_extract_epi16(v11, 4) & 1) != 0 ) result[54] = 0; v1 += 4LL; result += 72; } while ( v1 != 60 ); return result; }
translog_example_table_init: PUSH RBP MOV RBP,RSP LEA RAX,[0x505f80] LEA RDI,[RAX + 0x48] LEA RSI,[0x483560] MOV ECX,0x9 MOVSQ.REP RDI,RSI LEA RDI,[RAX + 0x90] LEA RSI,[0x4835a8] MOV ECX,0x9 MOVSQ.REP RDI,RSI LEA RDI,[RAX + 0xd8] LEA RSI,[0x4835f0] MOV ECX,0x9 MOVSQ.REP RDI,RSI LEA RDI,[RAX + 0x120] LEA RSI,[0x483638] MOV ECX,0x9 MOVSQ.REP RDI,RSI LEA RDI,[RAX + 0x168] LEA RSI,[0x483680] MOV ECX,0x9 MOVSQ.REP RDI,RSI LEA RDI,[RAX + 0x1b0] LEA RSI,[0x4836c8] MOV ECX,0x9 MOVSQ.REP RDI,RSI ADD RAX,0x1f8 XOR ECX,ECX MOVDQA XMM0,xmmword ptr [0x001e0030] MOVDQA XMM1,xmmword ptr [0x001e0040] MOVDQA XMM2,xmmword ptr [0x001e0050] MOVDQA XMM3,xmmword ptr [0x001e0060] PSHUFD XMM4,XMM3,0xf5 LAB_00133941: MOVQ XMM5,RCX PSHUFD XMM5,XMM5,0x44 MOVDQA XMM6,XMM5 POR XMM6,XMM1 PXOR XMM6,XMM2 MOVDQA XMM7,XMM3 PCMPGTD XMM7,XMM6 PSHUFD XMM6,XMM6,0xf5 PCMPEQD XMM6,XMM4 PAND XMM6,XMM7 MOVD EDX,XMM6 TEST DL,0x1 JZ 0x0013397b MOV dword ptr [RAX],0x0 LAB_0013397b: PEXTRW EDX,XMM6,0x4 TEST DL,0x1 JZ 0x0013398c MOV dword ptr [RAX + 0x48],0x0 LAB_0013398c: POR XMM5,XMM0 PXOR XMM5,XMM2 MOVDQA XMM6,XMM3 PCMPGTD XMM6,XMM5 PSHUFD XMM5,XMM5,0xf5 PCMPEQD XMM5,XMM4 PAND XMM5,XMM6 PEXTRW EDX,XMM5,0x0 TEST DL,0x1 JZ 0x001339bd MOV dword ptr [RAX + 0x90],0x0 LAB_001339bd: PEXTRW EDX,XMM5,0x4 TEST DL,0x1 JZ 0x001339d1 MOV dword ptr [RAX + 0xd8],0x0 LAB_001339d1: ADD RCX,0x4 ADD RAX,0x120 CMP RCX,0x3c JNZ 0x00133941 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void translog_example_table_init(void) { int1 auVar1 [16]; int1 auVar2 [16]; int1 auVar3 [16]; int iVar4; int iVar5; int8 *puVar6; long lVar7; int8 *puVar8; int1 auVar9 [16]; int1 auVar10 [16]; puVar6 = &INIT_LOGREC_FIXED_RECORD_0LSN_EXAMPLE; puVar8 = &DAT_00505fc8; for (lVar7 = 9; lVar7 != 0; lVar7 = lVar7 + -1) { *puVar8 = *puVar6; puVar6 = puVar6 + 1; puVar8 = puVar8 + 1; } puVar6 = &INIT_LOGREC_VARIABLE_RECORD_0LSN_EXAMPLE; puVar8 = &DAT_00506010; for (lVar7 = 9; lVar7 != 0; lVar7 = lVar7 + -1) { *puVar8 = *puVar6; puVar6 = puVar6 + 1; puVar8 = puVar8 + 1; } puVar6 = &INIT_LOGREC_FIXED_RECORD_1LSN_EXAMPLE; puVar8 = &DAT_00506058; for (lVar7 = 9; lVar7 != 0; lVar7 = lVar7 + -1) { *puVar8 = *puVar6; puVar6 = puVar6 + 1; puVar8 = puVar8 + 1; } puVar6 = &INIT_LOGREC_VARIABLE_RECORD_1LSN_EXAMPLE; puVar8 = &DAT_005060a0; for (lVar7 = 9; lVar7 != 0; lVar7 = lVar7 + -1) { *puVar8 = *puVar6; puVar6 = puVar6 + 1; puVar8 = puVar8 + 1; } puVar6 = &INIT_LOGREC_FIXED_RECORD_2LSN_EXAMPLE; puVar8 = &DAT_005060e8; for (lVar7 = 9; lVar7 != 0; lVar7 = lVar7 + -1) { *puVar8 = *puVar6; puVar6 = puVar6 + 1; puVar8 = puVar8 + 1; } puVar6 = &INIT_LOGREC_VARIABLE_RECORD_2LSN_EXAMPLE; puVar8 = &DAT_00506130; for (lVar7 = 9; iVar5 = _UNK_001e0064, iVar4 = _DAT_001e0060, auVar3 = _DAT_001e0050, auVar2 = _DAT_001e0040, auVar1 = _DAT_001e0030, lVar7 != 0; lVar7 = lVar7 + -1) { *puVar8 = *puVar6; puVar6 = puVar6 + 1; puVar8 = puVar8 + 1; } puVar6 = &DAT_00506178; lVar7 = 0; do { auVar9._8_4_ = (int)lVar7; auVar9._0_8_ = lVar7; auVar9._12_4_ = (int)((ulong)lVar7 >> 0x20); auVar10 = (auVar9 | auVar2) ^ auVar3; if (auVar10._4_4_ == iVar5 && auVar10._0_4_ < iVar4) { *(int4 *)puVar6 = 0; *(int4 *)(puVar6 + 9) = 0; } auVar9 = (auVar9 | auVar1) ^ auVar3; if (auVar9._4_4_ == iVar5 && auVar9._0_4_ < iVar4) { *(int4 *)(puVar6 + 0x12) = 0; *(int4 *)(puVar6 + 0x1b) = 0; } lVar7 = lVar7 + 4; puVar6 = puVar6 + 0x24; } while (lVar7 != 0x3c); return; }
11,675
my_coll_parser_scan_shift
eloqsql/strings/ctype-uca.c
static int my_coll_parser_scan_shift(MY_COLL_RULE_PARSER *p) { if (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_SHIFT) { my_coll_rule_shift_at_level(&p->rule, my_coll_parser_curr(p)->diff); return my_coll_parser_scan(p); } return 0; }
O3
c
my_coll_parser_scan_shift: xorl %eax, %eax cmpl $0x1, (%rdi) jne 0x783d2 movl 0x20(%rdi), %eax decl %eax cmpl $0x3, %eax ja 0x783a5 leaq 0x1a90cc(%rip), %rcx # 0x221420 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax incl 0xd0(%rdi) movl $0x0, 0xdc(%rdi) movq $0x0, 0xd4(%rdi) jmp 0x783a5 incl 0xd8(%rdi) movl $0x0, 0xdc(%rdi) jmp 0x783a5 incl 0xdc(%rdi) jmp 0x783a5 incl 0xd4(%rdi) movq $0x0, 0xd8(%rdi) pushq %rbp movq %rsp, %rbp leaq 0x28(%rdi), %rax movq 0x48(%rdi), %rcx movq %rcx, 0x20(%rdi) movups 0x28(%rdi), %xmm0 movups 0x38(%rdi), %xmm1 movups %xmm1, 0x10(%rdi) movups %xmm0, (%rdi) movq %rax, %rdi callq 0x7809f movl $0x1, %eax popq %rbp retq
my_coll_parser_scan_shift: xor eax, eax cmp dword ptr [rdi], 1 jnz locret_783D2 mov eax, [rdi+20h] dec eax; switch 4 cases cmp eax, 3 ja short def_7835B; jumptable 000000000007835B default case lea rcx, jpt_7835B movsxd rax, ds:(jpt_7835B - 221420h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_7835D: inc dword ptr [rdi+0D0h]; jumptable 000000000007835B case 1 mov dword ptr [rdi+0DCh], 0 mov qword ptr [rdi+0D4h], 0 jmp short def_7835B; jumptable 000000000007835B default case loc_7837A: inc dword ptr [rdi+0D8h]; jumptable 000000000007835B case 3 mov dword ptr [rdi+0DCh], 0 jmp short def_7835B; jumptable 000000000007835B default case loc_7838C: inc dword ptr [rdi+0DCh]; jumptable 000000000007835B case 4 jmp short def_7835B; jumptable 000000000007835B default case loc_78394: inc dword ptr [rdi+0D4h]; jumptable 000000000007835B case 2 mov qword ptr [rdi+0D8h], 0 def_7835B: push rbp; jumptable 000000000007835B default case mov rbp, rsp lea rax, [rdi+28h] mov rcx, [rdi+48h] mov [rdi+20h], rcx movups xmm0, xmmword ptr [rdi+28h] movups xmm1, xmmword ptr [rdi+38h] movups xmmword ptr [rdi+10h], xmm1 movups xmmword ptr [rdi], xmm0 mov rdi, rax call my_coll_lexem_next mov eax, 1 pop rbp locret_783D2: retn
long long my_coll_parser_scan_shift(long long a1) { long long result; // rax __int128 v2; // xmm0 result = 0LL; if ( *(_DWORD *)a1 == 1 ) { switch ( *(_DWORD *)(a1 + 32) ) { case 1: ++*(_DWORD *)(a1 + 208); *(_DWORD *)(a1 + 220) = 0; *(_QWORD *)(a1 + 212) = 0LL; break; case 2: ++*(_DWORD *)(a1 + 212); *(_QWORD *)(a1 + 216) = 0LL; break; case 3: ++*(_DWORD *)(a1 + 216); *(_DWORD *)(a1 + 220) = 0; break; case 4: ++*(_DWORD *)(a1 + 220); break; default: break; } *(_QWORD *)(a1 + 32) = *(_QWORD *)(a1 + 72); v2 = *(_OWORD *)(a1 + 40); *(_OWORD *)(a1 + 16) = *(_OWORD *)(a1 + 56); *(_OWORD *)a1 = v2; my_coll_lexem_next(a1 + 40); return 1LL; } return result; }
my_coll_parser_scan_shift: XOR EAX,EAX CMP dword ptr [RDI],0x1 JNZ 0x001783d2 MOV EAX,dword ptr [RDI + 0x20] DEC EAX CMP EAX,0x3 JA 0x001783a5 LEA RCX,[0x321420] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: INC dword ptr [RDI + 0xd0] MOV dword ptr [RDI + 0xdc],0x0 MOV qword ptr [RDI + 0xd4],0x0 JMP 0x001783a5 caseD_3: INC dword ptr [RDI + 0xd8] MOV dword ptr [RDI + 0xdc],0x0 JMP 0x001783a5 caseD_4: INC dword ptr [RDI + 0xdc] JMP 0x001783a5 caseD_2: INC dword ptr [RDI + 0xd4] MOV qword ptr [RDI + 0xd8],0x0 default: PUSH RBP MOV RBP,RSP LEA RAX,[RDI + 0x28] MOV RCX,qword ptr [RDI + 0x48] MOV qword ptr [RDI + 0x20],RCX MOVUPS XMM0,xmmword ptr [RDI + 0x28] MOVUPS XMM1,xmmword ptr [RDI + 0x38] MOVUPS xmmword ptr [RDI + 0x10],XMM1 MOVUPS xmmword ptr [RDI],XMM0 MOV RDI,RAX CALL 0x0017809f MOV EAX,0x1 POP RBP LAB_001783d2: RET
int8 my_coll_parser_scan_shift(int *param_1) { int8 uVar1; uVar1 = 0; if (*param_1 == 1) { switch(param_1[8]) { case 1: param_1[0x34] = param_1[0x34] + 1; param_1[0x37] = 0; param_1[0x35] = 0; param_1[0x36] = 0; break; case 2: param_1[0x35] = param_1[0x35] + 1; param_1[0x36] = 0; param_1[0x37] = 0; break; case 3: param_1[0x36] = param_1[0x36] + 1; param_1[0x37] = 0; break; case 4: param_1[0x37] = param_1[0x37] + 1; } *(int8 *)(param_1 + 8) = *(int8 *)(param_1 + 0x12); param_1[4] = param_1[0xe]; param_1[5] = param_1[0xf]; param_1[6] = param_1[0x10]; param_1[7] = param_1[0x11]; *param_1 = param_1[10]; param_1[1] = param_1[0xb]; param_1[2] = param_1[0xc]; param_1[3] = param_1[0xd]; my_coll_lexem_next(param_1 + 10); uVar1 = 1; } return uVar1; }
11,676
ma_ck_write
eloqsql/storage/maria/ma_write.c
my_bool _ma_ck_write(MARIA_HA *info, MARIA_KEY *key) { DBUG_ENTER("_ma_ck_write"); if (info->bulk_insert && is_tree_inited(&info->bulk_insert[key->keyinfo->key_nr])) { DBUG_RETURN(_ma_ck_write_tree(info, key)); } DBUG_RETURN(_ma_ck_write_btree(info, key)); }
O3
c
ma_ck_write: movq %rdi, %rax movq 0x310(%rdi), %rdi testq %rdi, %rdi je 0x55e55 movq 0x8(%rsi), %rcx movzbl 0xa5(%rcx), %ecx imulq $0x298, %rcx, %rcx # imm = 0x298 cmpq $0x0, (%rdi,%rcx) je 0x55e55 pushq %rbp movq %rsp, %rbp addq %rcx, %rdi movl 0x14(%rsi), %edx movl %edx, 0x640(%rax) movq (%rsi), %rax addl 0x10(%rsi), %edx movq 0x230(%rdi), %rcx movq %rax, %rsi callq 0xa493e testq %rax, %rax sete %al popq %rbp retq movq %rax, %rdi jmp 0x55e5a
_ma_ck_write: mov rax, rdi mov rdi, [rdi+310h] test rdi, rdi jz short loc_55E55 mov rcx, [rsi+8] movzx ecx, byte ptr [rcx+0A5h] imul rcx, 298h cmp qword ptr [rdi+rcx], 0 jz short loc_55E55 push rbp mov rbp, rsp add rdi, rcx mov edx, [rsi+14h] mov [rax+640h], edx mov rax, [rsi] add edx, [rsi+10h] mov rcx, [rdi+230h] mov rsi, rax call tree_insert test rax, rax setz al pop rbp retn loc_55E55: mov rdi, rax jmp short $+2
char ma_ck_write(long long a1, long long a2) { long long v3; // rdi long long v4; // rcx int v5; // edx v3 = *(_QWORD *)(a1 + 784); if ( !v3 ) return ma_ck_write_btree(a1); v4 = 664LL * *(unsigned __int8 *)(*(_QWORD *)(a2 + 8) + 165LL); if ( !*(_QWORD *)(v3 + v4) ) return ma_ck_write_btree(a1); v5 = *(_DWORD *)(a2 + 20); *(_DWORD *)(a1 + 1600) = v5; return tree_insert(v4 + v3, *(_QWORD *)a2, (unsigned int)(*(_DWORD *)(a2 + 16) + v5), *(_QWORD *)(v4 + v3 + 560)) == 0; }
_ma_ck_write: MOV RAX,RDI MOV RDI,qword ptr [RDI + 0x310] TEST RDI,RDI JZ 0x00155e55 MOV RCX,qword ptr [RSI + 0x8] MOVZX ECX,byte ptr [RCX + 0xa5] IMUL RCX,RCX,0x298 CMP qword ptr [RDI + RCX*0x1],0x0 JZ 0x00155e55 PUSH RBP MOV RBP,RSP ADD RDI,RCX MOV EDX,dword ptr [RSI + 0x14] MOV dword ptr [RAX + 0x640],EDX MOV RAX,qword ptr [RSI] ADD EDX,dword ptr [RSI + 0x10] MOV RCX,qword ptr [RDI + 0x230] MOV RSI,RAX CALL 0x001a493e TEST RAX,RAX SETZ AL POP RBP RET LAB_00155e55: MOV RDI,RAX JMP 0x00155e5a
bool _ma_ck_write(long param_1,int8 *param_2) { int iVar1; int1 uVar2; long lVar3; long lVar4; lVar4 = *(long *)(param_1 + 0x310); if ((lVar4 != 0) && (lVar3 = (ulong)*(byte *)(param_2[1] + 0xa5) * 0x298, *(long *)(lVar4 + lVar3) != 0)) { lVar4 = lVar4 + lVar3; iVar1 = *(int *)((long)param_2 + 0x14); *(int *)(param_1 + 0x640) = iVar1; lVar4 = tree_insert(lVar4,*param_2,iVar1 + *(int *)(param_2 + 2),*(int8 *)(lVar4 + 0x230)) ; return lVar4 == 0; } uVar2 = _ma_ck_write_btree(param_1); return (bool)uVar2; }
11,677
node_update_hash
corpus-core[P]colibri-stateless/src/chains/eth/verifier/patricia_trie.c
static void node_update_hash(node_t* node, bool follow_parent, ssz_builder_t* builder) { buffer_t buf = {0}; serialize_node(node, &buf); rlp_to_list(&buf); node->hash_len = buf.data.len; if (builder) ssz_add_dynamic_list_bytes(builder, 0, buf.data); if (node->hash_len >= 32) { keccak(buf.data, node->hash); node->hash_len = 32; } else memcpy(node->hash, buf.data.data, node->hash_len); buffer_free(&buf); if (node->parent && follow_parent) node_update_hash(node->parent, true, NULL); }
O0
c
node_update_hash: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movb %sil, %al movq %rdi, -0x8(%rbp) andb $0x1, %al movb %al, -0x9(%rbp) movq %rdx, -0x18(%rbp) leaq -0x30(%rbp), %rdi xorl %esi, %esi movl $0x18, %edx callq 0x23140 movq -0x8(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0x33f00 leaq -0x30(%rbp), %rdi callq 0x35310 movl -0x30(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x20(%rax) cmpq $0x0, -0x18(%rbp) je 0x33291 movq -0x18(%rbp), %rdi movl -0x30(%rbp), %edx movq -0x28(%rbp), %rcx xorl %esi, %esi callq 0xa21d0 movq -0x8(%rbp), %rax cmpl $0x20, 0x20(%rax) jb 0x332b8 movq -0x8(%rbp), %rdx movl -0x30(%rbp), %edi movq -0x28(%rbp), %rsi callq 0xa3340 movq -0x8(%rbp), %rax movl $0x20, 0x20(%rax) jmp 0x332ce movq -0x8(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x8(%rbp), %rax movl 0x20(%rax), %eax movl %eax, %edx callq 0x231c0 leaq -0x30(%rbp), %rdi callq 0x9cbf0 movq -0x8(%rbp), %rax cmpq $0x0, 0x28(%rax) je 0x332fe testb $0x1, -0x9(%rbp) je 0x332fe movq -0x8(%rbp), %rax movq 0x28(%rax), %rdi movl $0x1, %esi xorl %eax, %eax movl %eax, %edx callq 0x33230 addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
node_update_hash: push rbp mov rbp, rsp sub rsp, 30h mov al, sil mov [rbp+var_8], rdi and al, 1 mov [rbp+var_9], al mov [rbp+var_18], rdx lea rdi, [rbp+var_30] xor esi, esi mov edx, 18h call _memset mov rdi, [rbp+var_8] lea rsi, [rbp+var_30] call serialize_node lea rdi, [rbp+var_30] call rlp_to_list mov ecx, [rbp+var_30] mov rax, [rbp+var_8] mov [rax+20h], ecx cmp [rbp+var_18], 0 jz short loc_33291 mov rdi, [rbp+var_18] mov edx, [rbp+var_30] mov rcx, [rbp+var_28] xor esi, esi call ssz_add_dynamic_list_bytes loc_33291: mov rax, [rbp+var_8] cmp dword ptr [rax+20h], 20h ; ' ' jb short loc_332B8 mov rdx, [rbp+var_8] mov edi, [rbp+var_30] mov rsi, [rbp+var_28] call keccak mov rax, [rbp+var_8] mov dword ptr [rax+20h], 20h ; ' ' jmp short loc_332CE loc_332B8: mov rdi, [rbp+var_8] mov rsi, [rbp+var_28] mov rax, [rbp+var_8] mov eax, [rax+20h] mov edx, eax call _memcpy loc_332CE: lea rdi, [rbp+var_30] call buffer_free mov rax, [rbp+var_8] cmp qword ptr [rax+28h], 0 jz short loc_332FE test [rbp+var_9], 1 jz short loc_332FE mov rax, [rbp+var_8] mov rdi, [rax+28h] mov esi, 1 xor eax, eax mov edx, eax call node_update_hash loc_332FE: add rsp, 30h pop rbp retn
long long node_update_hash(long long a1, char a2, long long a3) { long long result; // rax unsigned int v4; // [rsp+0h] [rbp-30h] BYREF long long v5; // [rsp+8h] [rbp-28h] long long v6; // [rsp+18h] [rbp-18h] char v7; // [rsp+27h] [rbp-9h] long long v8; // [rsp+28h] [rbp-8h] v8 = a1; v7 = a2 & 1; v6 = a3; memset(&v4, 0LL, 24LL); serialize_node(v8, &v4); rlp_to_list(&v4); *(_DWORD *)(v8 + 32) = v4; if ( v6 ) ssz_add_dynamic_list_bytes(v6, 0LL, v4, v5); if ( *(_DWORD *)(v8 + 32) < 0x20u ) { memcpy(v8, v5, *(unsigned int *)(v8 + 32)); } else { keccak(v4, v5, v8); *(_DWORD *)(v8 + 32) = 32; } buffer_free(&v4); result = v8; if ( *(_QWORD *)(v8 + 40) ) { if ( (v7 & 1) != 0 ) return node_update_hash(*(_QWORD *)(v8 + 40), 1LL, 0LL); } return result; }
node_update_hash: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV AL,SIL MOV qword ptr [RBP + -0x8],RDI AND AL,0x1 MOV byte ptr [RBP + -0x9],AL MOV qword ptr [RBP + -0x18],RDX LEA RDI,[RBP + -0x30] XOR ESI,ESI MOV EDX,0x18 CALL 0x00123140 MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[RBP + -0x30] CALL 0x00133f00 LEA RDI,[RBP + -0x30] CALL 0x00135310 MOV ECX,dword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x20],ECX CMP qword ptr [RBP + -0x18],0x0 JZ 0x00133291 MOV RDI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x28] XOR ESI,ESI CALL 0x001a21d0 LAB_00133291: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x20],0x20 JC 0x001332b8 MOV RDX,qword ptr [RBP + -0x8] MOV EDI,dword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x28] CALL 0x001a3340 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x20],0x20 JMP 0x001332ce LAB_001332b8: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x20] MOV EDX,EAX CALL 0x001231c0 LAB_001332ce: LEA RDI,[RBP + -0x30] CALL 0x0019cbf0 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x28],0x0 JZ 0x001332fe TEST byte ptr [RBP + -0x9],0x1 JZ 0x001332fe MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x28] MOV ESI,0x1 XOR EAX,EAX MOV EDX,EAX CALL 0x00133230 LAB_001332fe: ADD RSP,0x30 POP RBP RET
void node_update_hash(void *param_1,byte param_2,long param_3) { int4 local_38 [2]; void *local_30; long local_20; byte local_11; void *local_10; local_11 = param_2 & 1; local_20 = param_3; local_10 = param_1; memset(local_38,0,0x18); serialize_node(local_10,local_38); rlp_to_list(local_38); *(int4 *)((long)local_10 + 0x20) = local_38[0]; if (local_20 != 0) { ssz_add_dynamic_list_bytes(local_20,0,local_38[0],local_30); } if (*(uint *)((long)local_10 + 0x20) < 0x20) { memcpy(local_10,local_30,(ulong)*(uint *)((long)local_10 + 0x20)); } else { keccak(local_38[0],local_30,local_10); *(int4 *)((long)local_10 + 0x20) = 0x20; } buffer_free(local_38); if ((*(long *)((long)local_10 + 0x28) != 0) && ((local_11 & 1) != 0)) { node_update_hash(*(int8 *)((long)local_10 + 0x28),1,0); } return; }
11,678
node_update_hash
corpus-core[P]colibri-stateless/src/chains/eth/verifier/patricia_trie.c
static void node_update_hash(node_t* node, bool follow_parent, ssz_builder_t* builder) { buffer_t buf = {0}; serialize_node(node, &buf); rlp_to_list(&buf); node->hash_len = buf.data.len; if (builder) ssz_add_dynamic_list_bytes(builder, 0, buf.data); if (node->hash_len >= 32) { keccak(buf.data, node->hash); node->hash_len = 32; } else memcpy(node->hash, buf.data.data, node->hash_len); buffer_free(&buf); if (node->parent && follow_parent) node_update_hash(node->parent, true, NULL); }
O3
c
node_update_hash: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x20, %rsp movq %rdx, %r15 movl %esi, %ebx movq %rdi, %r14 xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) movq $0x0, 0x10(%rsp) movl 0x30(%rdi), %eax testl %eax, %eax je 0x2cbc4 cmpl $0x1, %eax je 0x2cba3 cmpl $0x2, %eax jne 0x2cbe7 xorl %r13d, %r13d movq %rsp, %r12 movq 0x38(%r14,%r13,8), %rsi movq %r12, %rdi callq 0x2cf43 incq %r13 cmpq $0x10, %r13 jne 0x2cb7a movl 0xb8(%r14), %esi movq 0xc0(%r14), %rdx movq %rsp, %rdi jmp 0x2cbe2 movl 0x38(%r14), %esi movq 0x40(%r14), %rdx movq %rsp, %r12 movq %r12, %rdi callq 0x2d79d movq 0x48(%r14), %rsi movq %r12, %rdi callq 0x2cf43 jmp 0x2cbe7 movl 0x38(%r14), %esi movq 0x40(%r14), %rdx movq %rsp, %r12 movq %r12, %rdi callq 0x2d79d movl 0x48(%r14), %esi movq 0x50(%r14), %rdx movq %r12, %rdi callq 0x2d79d movq %rsp, %r12 movq %r12, %rdi callq 0x2d963 movl (%r12), %edx movl %edx, 0x20(%r14) testq %r15, %r15 je 0x2cc12 movq 0x8(%rsp), %rcx movq %r15, %rdi xorl %esi, %esi callq 0x542b4 movl 0x20(%r14), %edx cmpl $0x20, %edx jb 0x2cc31 movl (%rsp), %edi movq 0x8(%rsp), %rsi movq %r14, %rdx callq 0x54d10 movl $0x20, 0x20(%r14) jmp 0x2cc40 movq 0x8(%rsp), %rsi movl %edx, %edx movq %r14, %rdi callq 0x211a0 movq %rsp, %rdi callq 0x510bf movq 0x28(%r14), %rdi testq %rdi, %rdi sete %al xorb $0x1, %bl orb %al, %bl jne 0x2cc65 movl $0x1, %esi xorl %edx, %edx callq 0x2cb3e addq $0x20, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
node_update_hash: push r15 push r14 push r13 push r12 push rbx sub rsp, 20h mov r15, rdx mov ebx, esi mov r14, rdi xorps xmm0, xmm0 movaps [rsp+48h+var_48], xmm0 mov [rsp+48h+var_38], 0 mov eax, [rdi+30h] test eax, eax jz short loc_2CBC4 cmp eax, 1 jz short loc_2CBA3 cmp eax, 2 jnz short loc_2CBE7 xor r13d, r13d mov r12, rsp loc_2CB7A: mov rsi, [r14+r13*8+38h] mov rdi, r12 call rlp_add_child inc r13 cmp r13, 10h jnz short loc_2CB7A mov esi, [r14+0B8h] mov rdx, [r14+0C0h] mov rdi, rsp jmp short loc_2CBE2 loc_2CBA3: mov esi, [r14+38h] mov rdx, [r14+40h] mov r12, rsp mov rdi, r12 call rlp_add_item mov rsi, [r14+48h] mov rdi, r12 call rlp_add_child jmp short loc_2CBE7 loc_2CBC4: mov esi, [r14+38h] mov rdx, [r14+40h] mov r12, rsp mov rdi, r12 call rlp_add_item mov esi, [r14+48h] mov rdx, [r14+50h] mov rdi, r12 loc_2CBE2: call rlp_add_item loc_2CBE7: mov r12, rsp mov rdi, r12 call rlp_to_list mov edx, [r12] mov [r14+20h], edx test r15, r15 jz short loc_2CC12 mov rcx, qword ptr [rsp+48h+var_48+8] mov rdi, r15 xor esi, esi call ssz_add_dynamic_list_bytes mov edx, [r14+20h] loc_2CC12: cmp edx, 20h ; ' ' jb short loc_2CC31 mov edi, dword ptr [rsp+48h+var_48] mov rsi, qword ptr [rsp+48h+var_48+8] mov rdx, r14 call keccak mov dword ptr [r14+20h], 20h ; ' ' jmp short loc_2CC40 loc_2CC31: mov rsi, qword ptr [rsp+48h+var_48+8] mov edx, edx mov rdi, r14 call _memcpy loc_2CC40: mov rdi, rsp call buffer_free mov rdi, [r14+28h] test rdi, rdi setz al xor bl, 1 or bl, al jnz short loc_2CC65 mov esi, 1 xor edx, edx call node_update_hash loc_2CC65: add rsp, 20h pop rbx pop r12 pop r13 pop r14 pop r15 retn
char node_update_hash(long long a1, unsigned __int8 a2, long long a3) { int v5; // eax long long i; // r13 long long v7; // rsi long long v8; // rdx long long v9; // rdx long long v10; // rdi char result; // al __int128 v12; // [rsp+0h] [rbp-48h] BYREF long long v13; // [rsp+10h] [rbp-38h] v12 = 0LL; v13 = 0LL; v5 = *(_DWORD *)(a1 + 48); if ( v5 ) { if ( v5 == 1 ) { rlp_add_item(&v12, *(unsigned int *)(a1 + 56), *(_QWORD *)(a1 + 64)); rlp_add_child(&v12, *(_QWORD *)(a1 + 72)); goto LABEL_10; } if ( v5 != 2 ) goto LABEL_10; for ( i = 0LL; i != 16; ++i ) rlp_add_child(&v12, *(_QWORD *)(a1 + 8 * i + 56)); v7 = *(unsigned int *)(a1 + 184); v8 = *(_QWORD *)(a1 + 192); } else { rlp_add_item(&v12, *(unsigned int *)(a1 + 56), *(_QWORD *)(a1 + 64)); v7 = *(unsigned int *)(a1 + 72); v8 = *(_QWORD *)(a1 + 80); } rlp_add_item(&v12, v7, v8); LABEL_10: rlp_to_list(&v12); v9 = (unsigned int)v12; *(_DWORD *)(a1 + 32) = v12; if ( a3 ) { ssz_add_dynamic_list_bytes(a3, 0LL, v9, *((_QWORD *)&v12 + 1)); LODWORD(v9) = *(_DWORD *)(a1 + 32); } if ( (unsigned int)v9 < 0x20 ) { memcpy(a1); } else { keccak((unsigned int)v12, *((_QWORD *)&v12 + 1), a1); *(_DWORD *)(a1 + 32) = 32; } buffer_free(&v12); v10 = *(_QWORD *)(a1 + 40); result = v10 == 0; if ( !((v10 == 0) | a2 ^ 1) ) return node_update_hash(v10, 1LL, 0LL); return result; }
node_update_hash: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x20 MOV R15,RDX MOV EBX,ESI MOV R14,RDI XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x10],0x0 MOV EAX,dword ptr [RDI + 0x30] TEST EAX,EAX JZ 0x0012cbc4 CMP EAX,0x1 JZ 0x0012cba3 CMP EAX,0x2 JNZ 0x0012cbe7 XOR R13D,R13D MOV R12,RSP LAB_0012cb7a: MOV RSI,qword ptr [R14 + R13*0x8 + 0x38] MOV RDI,R12 CALL 0x0012cf43 INC R13 CMP R13,0x10 JNZ 0x0012cb7a MOV ESI,dword ptr [R14 + 0xb8] MOV RDX,qword ptr [R14 + 0xc0] MOV RDI,RSP JMP 0x0012cbe2 LAB_0012cba3: MOV ESI,dword ptr [R14 + 0x38] MOV RDX,qword ptr [R14 + 0x40] MOV R12,RSP MOV RDI,R12 CALL 0x0012d79d MOV RSI,qword ptr [R14 + 0x48] MOV RDI,R12 CALL 0x0012cf43 JMP 0x0012cbe7 LAB_0012cbc4: MOV ESI,dword ptr [R14 + 0x38] MOV RDX,qword ptr [R14 + 0x40] MOV R12,RSP MOV RDI,R12 CALL 0x0012d79d MOV ESI,dword ptr [R14 + 0x48] MOV RDX,qword ptr [R14 + 0x50] MOV RDI,R12 LAB_0012cbe2: CALL 0x0012d79d LAB_0012cbe7: MOV R12,RSP MOV RDI,R12 CALL 0x0012d963 MOV EDX,dword ptr [R12] MOV dword ptr [R14 + 0x20],EDX TEST R15,R15 JZ 0x0012cc12 MOV RCX,qword ptr [RSP + 0x8] MOV RDI,R15 XOR ESI,ESI CALL 0x001542b4 MOV EDX,dword ptr [R14 + 0x20] LAB_0012cc12: CMP EDX,0x20 JC 0x0012cc31 MOV EDI,dword ptr [RSP] MOV RSI,qword ptr [RSP + 0x8] MOV RDX,R14 CALL 0x00154d10 MOV dword ptr [R14 + 0x20],0x20 JMP 0x0012cc40 LAB_0012cc31: MOV RSI,qword ptr [RSP + 0x8] MOV EDX,EDX MOV RDI,R14 CALL 0x001211a0 LAB_0012cc40: MOV RDI,RSP CALL 0x001510bf MOV RDI,qword ptr [R14 + 0x28] TEST RDI,RDI SETZ AL XOR BL,0x1 OR BL,AL JNZ 0x0012cc65 MOV ESI,0x1 XOR EDX,EDX CALL 0x0012cb3e LAB_0012cc65: ADD RSP,0x20 POP RBX POP R12 POP R13 POP R14 POP R15 RET
void node_update_hash(void *param_1,char param_2,long param_3) { int iVar1; int4 uVar2; int8 uVar3; size_t __n; long lVar4; ulong local_48; void *pvStack_40; int8 local_38; local_48 = 0; pvStack_40 = (void *)0x0; local_38 = 0; iVar1 = *(int *)((long)param_1 + 0x30); if (iVar1 == 0) { rlp_add_item(&local_48,*(int4 *)((long)param_1 + 0x38), *(int8 *)((long)param_1 + 0x40)); uVar2 = *(int4 *)((long)param_1 + 0x48); uVar3 = *(int8 *)((long)param_1 + 0x50); } else { if (iVar1 == 1) { rlp_add_item(&local_48,*(int4 *)((long)param_1 + 0x38), *(int8 *)((long)param_1 + 0x40)); rlp_add_child(&local_48,*(int8 *)((long)param_1 + 0x48)); goto LAB_0012cbe7; } if (iVar1 != 2) goto LAB_0012cbe7; lVar4 = 0; do { rlp_add_child(&local_48,*(int8 *)((long)param_1 + lVar4 * 8 + 0x38)); lVar4 = lVar4 + 1; } while (lVar4 != 0x10); uVar2 = *(int4 *)((long)param_1 + 0xb8); uVar3 = *(int8 *)((long)param_1 + 0xc0); } rlp_add_item(&local_48,uVar2,uVar3); LAB_0012cbe7: rlp_to_list(&local_48); __n = local_48 & 0xffffffff; *(int4 *)((long)param_1 + 0x20) = (int4)local_48; if (param_3 != 0) { ssz_add_dynamic_list_bytes(param_3,0,__n,pvStack_40); __n = (size_t)*(uint *)((long)param_1 + 0x20); } if ((uint)__n < 0x20) { memcpy(param_1,pvStack_40,__n); } else { keccak(local_48 & 0xffffffff,pvStack_40,param_1); *(int4 *)((long)param_1 + 0x20) = 0x20; } buffer_free(&local_48); if (param_2 == '\x01' && *(long *)((long)param_1 + 0x28) != 0) { node_update_hash(*(long *)((long)param_1 + 0x28),1,0); } return; }
11,679
aimrt::common::util::ConstBufferOperator::GetUint32()
aimrt_mujoco_sim/_deps/aimrt-src/src/common/net/../util/buffer_util.h
uint32_t GetUint32() { if (cur_ + sizeof(uint32_t) > end_) [[unlikely]] throw BufferOutOfBoundsException(); uint32_t n = GetUint32FromBuf(cur_); cur_ += sizeof(uint32_t); return n; }
O0
c
aimrt::common::util::ConstBufferOperator::GetUint32(): subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq 0x20(%rsp), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rcx), %rax addq $0x4, %rax cmpq 0x8(%rcx), %rax jbe 0x5ab05c movl $0x10, %edi callq 0x1ca590 movq %rax, %rdi movq %rdi, %rax movq %rax, (%rsp) callq 0x58cb20 jmp 0x5ab02c movq (%rsp), %rdi leaq 0x336ae1(%rip), %rsi # 0x8e1b18 leaq -0x1e4de(%rip), %rdx # 0x58cb60 callq 0x1cfa20 movq (%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x18(%rsp) movl %eax, 0x14(%rsp) callq 0x1d6bd0 jmp 0x5ab08a movq 0x8(%rsp), %rax movq 0x10(%rax), %rdi callq 0x538240 movl %eax, %ecx movq 0x8(%rsp), %rax movl %ecx, 0x10(%rsp) movq 0x10(%rax), %rcx addq $0x4, %rcx movq %rcx, 0x10(%rax) movl 0x10(%rsp), %eax addq $0x28, %rsp retq movq 0x18(%rsp), %rdi callq 0x1d0790 nopw %cs:(%rax,%rax) nop
_ZN5aimrt6common4util19ConstBufferOperator9GetUint32Ev: sub rsp, 28h mov [rsp+28h+var_8], rdi mov rcx, [rsp+28h+var_8] mov [rsp+28h+var_20], rcx mov rax, [rcx+10h] add rax, 4 cmp rax, [rcx+8] jbe short loc_5AB05C mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rdi, rax; this mov rax, rdi mov [rsp+28h+var_28], rax call _ZN5aimrt6common4util26BufferOutOfBoundsExceptionC2Ev; aimrt::common::util::BufferOutOfBoundsException::BufferOutOfBoundsException(void) jmp short $+2 loc_5AB02C: mov rdi, [rsp+28h+var_28]; void * lea rsi, _ZTIN5aimrt6common4util26BufferOutOfBoundsExceptionE; char * lea rdx, _ZN5aimrt6common4util26BufferOutOfBoundsExceptionD2Ev; void (*)(void *) call ___cxa_throw mov rdi, [rsp+28h+var_28]; void * mov rcx, rax mov eax, edx mov [rsp+28h+var_10], rcx mov [rsp+28h+var_14], eax call ___cxa_free_exception jmp short loc_5AB08A loc_5AB05C: mov rax, [rsp+28h+var_20] mov rdi, [rax+10h]; this call _ZN5aimrt6common4util16GetUint32FromBufEPKc; aimrt::common::util::GetUint32FromBuf(char const*) mov ecx, eax mov rax, [rsp+28h+var_20] mov [rsp+28h+var_18], ecx mov rcx, [rax+10h] add rcx, 4 mov [rax+10h], rcx mov eax, [rsp+28h+var_18] add rsp, 28h retn loc_5AB08A: mov rdi, [rsp+28h+var_10] call __Unwind_Resume
long long aimrt::common::util::ConstBufferOperator::GetUint32( aimrt::common::util::ConstBufferOperator *this, const char *a2) { long long result; // rax aimrt::common::util::BufferOutOfBoundsException *exception; // [rsp+0h] [rbp-28h] if ( (unsigned long long)(*((_QWORD *)this + 2) + 4LL) > *((_QWORD *)this + 1) ) { exception = (aimrt::common::util::BufferOutOfBoundsException *)__cxa_allocate_exception(0x10uLL); aimrt::common::util::BufferOutOfBoundsException::BufferOutOfBoundsException(exception); __cxa_throw( exception, (struct type_info *)&`typeinfo for'aimrt::common::util::BufferOutOfBoundsException, (void (*)(void *))aimrt::common::util::BufferOutOfBoundsException::~BufferOutOfBoundsException); } LODWORD(result) = aimrt::common::util::GetUint32FromBuf(*((aimrt::common::util **)this + 2), a2); *((_QWORD *)this + 2) += 4LL; return (unsigned int)result; }
get: MOV qword ptr [RSP + -0x8],RDI MOV RAX,qword ptr [RSP + -0x8] MOV RAX,qword ptr [RAX] RET
/* std::__shared_ptr<aimrt::common::net::AsioTcpClient, (__gnu_cxx::_Lock_policy)2>::get() const */ int8 __thiscall std::__shared_ptr<aimrt::common::net::AsioTcpClient,(__gnu_cxx::_Lock_policy)2>::get (__shared_ptr<aimrt::common::net::AsioTcpClient,(__gnu_cxx::_Lock_policy)2> *this) { return *(int8 *)this; }
11,680
aimrt::common::util::ConstBufferOperator::GetUint32()
aimrt_mujoco_sim/_deps/aimrt-src/src/common/net/../util/buffer_util.h
uint32_t GetUint32() { if (cur_ + sizeof(uint32_t) > end_) [[unlikely]] throw BufferOutOfBoundsException(); uint32_t n = GetUint32FromBuf(cur_); cur_ += sizeof(uint32_t); return n; }
O3
c
aimrt::common::util::ConstBufferOperator::GetUint32(): pushq %r14 pushq %rbx pushq %rax movq 0x10(%rdi), %rax leaq 0x4(%rax), %rcx cmpq 0x8(%rdi), %rcx ja 0x1bae86 movl (%rax), %eax movq %rcx, 0x10(%rdi) addq $0x8, %rsp popq %rbx popq %r14 retq movl $0x10, %edi callq 0x91050 movq %rax, %rbx movq %rax, %rdi callq 0x1b21ce movq %rbx, %rdi callq 0x9690a movq %rax, %r14 movq %rbx, %rdi callq 0x91a40 movq %r14, %rdi callq 0x945e0
_ZN5aimrt6common4util19ConstBufferOperator9GetUint32Ev: push r14 push rbx push rax mov rax, [rdi+10h] lea rcx, [rax+4] cmp rcx, [rdi+8] ja short loc_1BAE86 mov eax, [rax] mov [rdi+10h], rcx add rsp, 8 pop rbx pop r14 retn loc_1BAE86: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, rax; this call _ZN5aimrt6common4util26BufferOutOfBoundsExceptionC2Ev; aimrt::common::util::BufferOutOfBoundsException::BufferOutOfBoundsException(void) mov rdi, rbx call _ZN5aimrt6common4util19ConstBufferOperator9GetUint32Ev_cold_1; aimrt::common::util::ConstBufferOperator::GetUint32(void) [clone] mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception mov rdi, r14 call __Unwind_Resume
long long aimrt::common::util::ConstBufferOperator::GetUint32(aimrt::common::util::ConstBufferOperator *this) { unsigned int *v1; // rax unsigned int *v2; // rcx long long result; // rax aimrt::common::util::BufferOutOfBoundsException *exception; // rbx v1 = (unsigned int *)*((_QWORD *)this + 2); v2 = v1 + 1; if ( (unsigned long long)(v1 + 1) > *((_QWORD *)this + 1) ) { exception = (aimrt::common::util::BufferOutOfBoundsException *)__cxa_allocate_exception(0x10uLL); aimrt::common::util::BufferOutOfBoundsException::BufferOutOfBoundsException(exception); aimrt::common::util::ConstBufferOperator::GetUint32(exception); } result = *v1; *((_QWORD *)this + 2) = v2; return result; }
11,681
translog_buffer_decrease_writers
eloqsql/storage/maria/ma_loghandler.c
static void translog_buffer_decrease_writers(struct st_translog_buffer *buffer) { DBUG_ENTER("translog_buffer_decrease_writers"); translog_buffer_lock_assert_owner(buffer); buffer->copy_to_buffer_in_progress--; DBUG_PRINT("info", ("copy_to_buffer_in_progress. Buffer #%u %p progress: %d", (uint) buffer->buffer_no, buffer, buffer->copy_to_buffer_in_progress)); if (buffer->copy_to_buffer_in_progress == 0) mysql_cond_broadcast(&buffer->waiting_filling_buffer); DBUG_VOID_RETURN; }
O0
c
translog_buffer_decrease_writers: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movl 0x100078(%rax), %ecx addl $-0x1, %ecx movl %ecx, 0x100078(%rax) jmp 0x5d111 movq -0x8(%rbp), %rax cmpl $0x0, 0x100078(%rax) jne 0x5d12e movq -0x8(%rbp), %rdi addq $0x100040, %rdi # imm = 0x100040 callq 0x57320 jmp 0x5d130 jmp 0x5d132 addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
translog_buffer_decrease_writers: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov ecx, [rax+100078h] add ecx, 0FFFFFFFFh mov [rax+100078h], ecx jmp short $+2 loc_5D111: mov rax, [rbp+var_8] cmp dword ptr [rax+100078h], 0 jnz short loc_5D12E mov rdi, [rbp+var_8] add rdi, 100040h call inline_mysql_cond_broadcast_0 loc_5D12E: jmp short $+2 loc_5D130: jmp short $+2 loc_5D132: add rsp, 10h pop rbp retn
long long translog_buffer_decrease_writers(long long a1) { long long result; // rax --*(_DWORD *)(a1 + 1048696); result = a1; if ( !*(_DWORD *)(a1 + 1048696) ) return inline_mysql_cond_broadcast_0(a1 + 1048640); return result; }
translog_buffer_decrease_writers: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x100078] ADD ECX,-0x1 MOV dword ptr [RAX + 0x100078],ECX JMP 0x0015d111 LAB_0015d111: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x100078],0x0 JNZ 0x0015d12e MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x100040 CALL 0x00157320 LAB_0015d12e: JMP 0x0015d130 LAB_0015d130: JMP 0x0015d132 LAB_0015d132: ADD RSP,0x10 POP RBP RET
void translog_buffer_decrease_writers(long param_1) { *(int *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_type + param_1) = *(int *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_type + param_1) + -1; if (*(int *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_type + param_1) == 0) { inline_mysql_cond_broadcast((long)&Elf64_Phdr_ARRAY_00100040[0].p_type + param_1); } return; }
11,682
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::start_object(unsigned long)
monkey531[P]llama/common/json.hpp
bool start_object(std::size_t len) { // check callback for object start const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::object_start, discarded); keep_stack.push_back(keep); auto val = handle_value(BasicJsonType::value_t::object, true); ref_stack.push_back(val.second); // check object limit if (ref_stack.back() && JSON_HEDLEY_UNLIKELY(len != static_cast<std::size_t>(-1) && len > ref_stack.back()->max_size())) { JSON_THROW(out_of_range::create(408, concat("excessive object size: ", std::to_string(len)), ref_stack.back())); } return true; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::start_object(unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x58, %rsp movq %rsi, %r15 movq %rdi, %r14 addq $0x80, %rdi leaq 0x8(%r14), %rbx movq 0x10(%r14), %rsi subq 0x8(%r14), %rsi shrq $0x3, %rsi leaq 0xa8(%r14), %rcx xorl %edx, %edx callq 0x68ad2 leaq 0x20(%r14), %rdi movzbl %al, %esi callq 0x67d78 leaq 0x8(%rsp), %rsi movb $0x1, (%rsi) pushq $0x1 popq %rdx movq %r14, %rdi callq 0x68af6 leaq 0x50(%rsp), %rsi movb %al, -0x8(%rsi) movq %rdx, (%rsi) movq %rbx, %rdi callq 0x68d00 movq 0x10(%r14), %rax movq -0x8(%rax), %rdi testq %rdi, %rdi sete %al cmpq $-0x1, %r15 sete %cl orb %al, %cl jne 0x68372 callq 0x68d1e cmpq %r15, %rax jb 0x6837f movb $0x1, %al addq $0x58, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq pushq $0x20 popq %rdi callq 0x265e0 movq %rax, %rbx leaq 0x28(%rsp), %rdi movq %r15, %rsi callq 0x42685 leaq 0x66d6d(%rip), %rsi # 0xcf10b leaq 0x8(%rsp), %rdi leaq 0x28(%rsp), %rdx callq 0x68e33 movq 0x10(%r14), %rax movq -0x8(%rax), %rcx movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0x198, %esi # imm = 0x198 callq 0x68d46 xorl %ebp, %ebp leaq 0xb6d45(%rip), %rsi # 0x11f118 leaq -0x1234(%rip), %rdx # 0x671a6 movq %rbx, %rdi callq 0x275b0 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x27998 jmp 0x683f7 movq %rax, %r14 movb $0x1, %bpl leaq 0x28(%rsp), %rdi callq 0x27998 testb %bpl, %bpl jne 0x6840b jmp 0x68413 movq %rax, %r14 movq %rbx, %rdi callq 0x268f0 movq %r14, %rdi callq 0x27660 nop
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12start_objectEm: push rbp push r15 push r14; char push rbx; int sub rsp, 58h mov r15, rsi mov r14, rdi add rdi, 80h lea rbx, [r14+8] mov rsi, [r14+10h] sub rsi, [r14+8] shr rsi, 3 lea rcx, [r14+0A8h] xor edx, edx call _ZNKSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEclEiS3_SH_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::operator()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &) lea rdi, [r14+20h] movzx esi, al call _ZNSt6vectorIbSaIbEE9push_backEb; std::vector<bool>::push_back(bool) lea rsi, [rsp+78h+var_70] mov byte ptr [rsi], 1 push 1 pop rdx mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueINS1_7value_tEEESt4pairIbPSF_EOT_b; nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(nlohmann::json_abi_v3_11_3::detail::value_t &&,bool) lea rsi, [rsp+78h+var_28] mov [rsi-8], al mov [rsi], rdx mov rdi, rbx call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE9push_backERKSE_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> * const&) mov rax, [r14+10h] mov rdi, [rax-8] test rdi, rdi setz al cmp r15, 0FFFFFFFFFFFFFFFFh setz cl or cl, al jnz short loc_68372 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8max_sizeEv; 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>::max_size(void) cmp rax, r15 jb short loc_6837F loc_68372: mov al, 1 add rsp, 58h pop rbx pop r14 pop r15 pop rbp retn loc_6837F: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+78h+var_50]; this mov rsi, r15; unsigned __int64 call _ZNSt7__cxx119to_stringEm; std::to_string(ulong) lea rsi, aExcessiveObjec; "excessive object size: " lea rdi, [rsp+78h+var_70] lea rdx, [rsp+78h+var_50] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA24_KcS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[24],std::string>(char const(&)[24],std::string &&) mov rax, [r14+10h] mov rcx, [rax-8] mov bpl, 1 lea rdx, [rsp+78h+var_70] mov rdi, rbx; this mov esi, 198h; int 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 mov r14, rax lea rdi, [rsp+78h+var_70]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_683F7 mov r14, rax mov bpl, 1 loc_683F7: lea rdi, [rsp+78h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_6840B jmp short loc_68413 mov r14, rax loc_6840B: mov rdi, rbx; void * call ___cxa_free_exception loc_68413: mov rdi, r14 call __Unwind_Resume
char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::start_object( long long a1, unsigned long long a2) { unsigned __int8 v2; // al long long v3; // rdx nlohmann::json_abi_v3_11_3::detail::out_of_range *exception; // rbx char v6; // [rsp+0h] [rbp-78h] int v7[6]; // [rsp+8h] [rbp-70h] BYREF char v8; // [rsp+20h] [rbp-58h] int v9[6]; // [rsp+28h] [rbp-50h] BYREF char v10; // [rsp+40h] [rbp-38h] int v11; // [rsp+48h] [rbp-30h] long long v12; // [rsp+50h] [rbp-28h] int v13; // [rsp+58h] [rbp-20h] char v14; // [rsp+60h] [rbp-18h] v2 = std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::operator()( a1 + 128, (*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 3, 0LL, a1 + 168); std::vector<bool>::push_back(a1 + 32, v2); LOBYTE(v7[0]) = 1; LOBYTE(v11) = nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>( a1, v7, 1LL); v12 = v3; std::vector<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<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::push_back(a1 + 8); if ( *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL) != 0LL && a2 != -1LL && 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>::max_size() < a2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL); std::to_string((std::__cxx11 *)v9, a2); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[24],std::string>( v7, "excessive object size: ", v9); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 408, v6, v7[0], v7[2], v7[4], v8, v9[0], v9[2], v9[4], v10, v11, v12, v13, v14); __cxa_throw( exception, (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 1; }
start_object: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x58 MOV R15,RSI MOV R14,RDI ADD RDI,0x80 LEA RBX,[R14 + 0x8] MOV RSI,qword ptr [R14 + 0x10] SUB RSI,qword ptr [R14 + 0x8] SHR RSI,0x3 LEA RCX,[R14 + 0xa8] XOR EDX,EDX CALL 0x00168ad2 LEA RDI,[R14 + 0x20] MOVZX ESI,AL CALL 0x00167d78 LEA RSI,[RSP + 0x8] MOV byte ptr [RSI],0x1 PUSH 0x1 POP RDX MOV RDI,R14 CALL 0x00168af6 LEA RSI,[RSP + 0x50] MOV byte ptr [RSI + -0x8],AL MOV qword ptr [RSI],RDX MOV RDI,RBX CALL 0x00168d00 MOV RAX,qword ptr [R14 + 0x10] MOV RDI,qword ptr [RAX + -0x8] TEST RDI,RDI SETZ AL CMP R15,-0x1 SETZ CL OR CL,AL JNZ 0x00168372 CALL 0x00168d1e CMP RAX,R15 JC 0x0016837f LAB_00168372: MOV AL,0x1 ADD RSP,0x58 POP RBX POP R14 POP R15 POP RBP RET LAB_0016837f: PUSH 0x20 POP RDI CALL 0x001265e0 MOV RBX,RAX LAB_0016838a: LEA RDI,[RSP + 0x28] MOV RSI,R15 CALL 0x00142685 LAB_00168397: LEA RSI,[0x1cf10b] LEA RDI,[RSP + 0x8] LEA RDX,[RSP + 0x28] CALL 0x00168e33 MOV RAX,qword ptr [R14 + 0x10] MOV RCX,qword ptr [RAX + -0x8] MOV BPL,0x1 LAB_001683b8: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0x198 CALL 0x00168d46 XOR EBP,EBP LEA RSI,[0x21f118] LEA RDX,[0x1671a6] MOV RDI,RBX CALL 0x001275b0
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::start_object(unsigned long) */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::start_object(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,ulong param_1) { bool bVar1; ulong uVar2; int8 uVar3; basic_json *extraout_RDX; detail local_70 [32]; __cxx11 local_50 [32]; int1 local_30; basic_json *local_28; bVar1 = (bool)std:: function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> ::operator()(this + 0x80,(ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3, 0,this + 0xa8); std::vector<bool,std::allocator<bool>>::push_back ((vector<bool,std::allocator<bool>> *)(this + 0x20),bVar1); local_70[0] = (detail)0x1; local_30 = handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(this,local_70,true); local_28 = extraout_RDX; std:: vector<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<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::push_back((vector<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<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8),&local_28); if (param_1 != 0xffffffffffffffff && *(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> **)(*(long *)(this + 0x10) + -8) != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)0x0) { uVar2 = 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> ::max_size(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> **)(*(long *)(this + 0x10) + -8)); if (uVar2 < param_1) { uVar3 = __cxa_allocate_exception(0x20); /* try { // try from 0016838a to 00168396 has its CatchHandler @ 00168408 */ std::__cxx11::to_string(local_50,param_1); /* try { // try from 00168397 to 001683ac has its CatchHandler @ 001683f1 */ concat<std::__cxx11::string,char_const(&)[24],std::__cxx11::string> (local_70,"excessive object size: ",(string *)local_50); /* try { // try from 001683b8 to 001683e1 has its CatchHandler @ 001683e2 */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar3,0x198,local_70,*(int8 *)(*(long *)(this + 0x10) + -8)); /* WARNING: Subroutine does not return */ __cxa_throw(uVar3,&out_of_range::typeinfo,exception::~exception); } } return 1; }
11,683
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); }
O3
c
my_rw_init: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx leaq 0x351b7b(%rip), %rsi # 0x3b1370 callq 0x28600 leaq -0x14(%rbp), %r14 movq %r14, %rdi callq 0x28090 leaq 0x28(%rbx), %rdi movq %r14, %rsi callq 0x284e0 leaq 0x58(%rbx), %rdi movq %r14, %rsi callq 0x284e0 movq %r14, %rdi callq 0x281b0 movq $0x0, 0x88(%rbx) xorl %eax, %eax addq $0x10, %rsp popq %rbx popq %r14 popq %rbp retq
my_rw_init: push rbp mov rbp, rsp push r14 push rbx sub rsp, 10h mov rbx, rdi lea rsi, my_fast_mutexattr call _pthread_mutex_init lea r14, [rbp+var_14] mov rdi, r14 call _pthread_condattr_init lea rdi, [rbx+28h] mov rsi, r14 call _pthread_cond_init lea rdi, [rbx+58h] mov rsi, r14 call _pthread_cond_init mov rdi, r14 call _pthread_condattr_destroy mov qword ptr [rbx+88h], 0 xor eax, eax add rsp, 10h pop rbx pop r14 pop rbp retn
long long my_rw_init(long long a1) { _BYTE v2[20]; // [rsp+Ch] [rbp-14h] BYREF pthread_mutex_init(a1, &my_fast_mutexattr); pthread_condattr_init(v2); pthread_cond_init(a1 + 40, v2); pthread_cond_init(a1 + 88, v2); pthread_condattr_destroy(v2); *(_QWORD *)(a1 + 136) = 0LL; return 0LL; }
my_rw_init: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x10 MOV RBX,RDI LEA RSI,[0x4b1370] CALL 0x00128600 LEA R14,[RBP + -0x14] MOV RDI,R14 CALL 0x00128090 LEA RDI,[RBX + 0x28] MOV RSI,R14 CALL 0x001284e0 LEA RDI,[RBX + 0x58] MOV RSI,R14 CALL 0x001284e0 MOV RDI,R14 CALL 0x001281b0 MOV qword ptr [RBX + 0x88],0x0 XOR EAX,EAX ADD RSP,0x10 POP RBX POP R14 POP RBP RET
int8 my_rw_init(pthread_mutex_t *param_1) { pthread_condattr_t local_1c; pthread_mutex_init(param_1,(pthread_mutexattr_t *)&my_fast_mutexattr); pthread_condattr_init(&local_1c); pthread_cond_init((pthread_cond_t *)(param_1 + 1),&local_1c); pthread_cond_init((pthread_cond_t *)((long)param_1 + 0x58),&local_1c); pthread_condattr_destroy(&local_1c); *(int8 *)((long)param_1 + 0x88) = 0; return 0; }
11,684
my_strnxfrm_uca_pad
eloqsql/strings/ctype-uca.c
static uchar * my_strnxfrm_uca_pad(uchar *dst, uchar *de, int weight) { for ( ; dst < de; ) { *dst++= weight >> 8; if (dst < de) *dst++= weight & 0xFF; } return dst; }
O0
c
my_strnxfrm_uca_pad: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq -0x8(%rbp), %rax cmpq -0x10(%rbp), %rax jae 0x59d79 movl -0x14(%rbp), %eax sarl $0x8, %eax movb %al, %cl movq -0x8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %cl, (%rax) movq -0x8(%rbp), %rax cmpq -0x10(%rbp), %rax jae 0x59d77 movl -0x14(%rbp), %eax andl $0xff, %eax movb %al, %cl movq -0x8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %cl, (%rax) jmp 0x59d2f movq -0x8(%rbp), %rax popq %rbp retq nop
my_strnxfrm_uca_pad: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx loc_59D2F: mov rax, [rbp+var_8] cmp rax, [rbp+var_10] jnb short loc_59D79 mov eax, [rbp+var_14] sar eax, 8 mov cl, al mov rax, [rbp+var_8] mov rdx, rax add rdx, 1 mov [rbp+var_8], rdx mov [rax], cl mov rax, [rbp+var_8] cmp rax, [rbp+var_10] jnb short loc_59D77 mov eax, [rbp+var_14] and eax, 0FFh mov cl, al mov rax, [rbp+var_8] mov rdx, rax add rdx, 1 mov [rbp+var_8], rdx mov [rax], cl loc_59D77: jmp short loc_59D2F loc_59D79: mov rax, [rbp+var_8] pop rbp retn
_BYTE * my_strnxfrm_uca_pad(_BYTE *a1, unsigned long long a2, __int16 a3) { _BYTE *v3; // rax _BYTE *v4; // rax while ( (unsigned long long)a1 < a2 ) { v3 = a1++; *v3 = HIBYTE(a3); if ( (unsigned long long)a1 < a2 ) { v4 = a1++; *v4 = a3; } } return a1; }
my_strnxfrm_uca_pad: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX LAB_00159d2f: MOV RAX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RBP + -0x10] JNC 0x00159d79 MOV EAX,dword ptr [RBP + -0x14] SAR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x8],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RBP + -0x10] JNC 0x00159d77 MOV EAX,dword ptr [RBP + -0x14] AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x8],RDX MOV byte ptr [RAX],CL LAB_00159d77: JMP 0x00159d2f LAB_00159d79: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
int1 * my_strnxfrm_uca_pad(int1 *param_1,int1 *param_2,int4 param_3) { int1 *puVar1; int1 *local_10; puVar1 = param_1; while (local_10 = puVar1, local_10 < param_2) { puVar1 = local_10 + 1; *local_10 = (char)((uint)param_3 >> 8); if (puVar1 < param_2) { *puVar1 = (char)param_3; puVar1 = local_10 + 2; } } return local_10; }
11,685
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 0x429e2 jmp 0x429e4 jmp 0x429e6 jmp 0x429e8 jmp 0x429ea 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 0x42ad2 movq -0x40(%rbp), %rax movq (%rax), %rax movq 0x8(%rax), %rax cmpq -0x18(%rbp), %rax jae 0x42a89 movq -0x10(%rbp), %rcx movl 0x2c(%rcx), %eax movl %eax, %edx addl $0x1, %edx movl %edx, 0x2c(%rcx) cmpl $0xa, %eax jb 0x42a89 movq -0x40(%rbp), %rax movq (%rax), %rax cmpq $0x1000, 0x8(%rax) # imm = 0x1000 jae 0x42a89 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 0x42ab2 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 0x42abb jmp 0x42ad0 movq -0x38(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x38(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) jmp 0x42a94 jmp 0x42ad2 cmpq $0x0, -0x38(%rbp) jne 0x42bd5 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 0x42b1d movq -0x20(%rbp), %rax movq %rax, -0x58(%rbp) jmp 0x42b25 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 0x36e60 movq %rax, -0x38(%rbp) cmpq $0x0, %rax jne 0x42b8b movq -0x10(%rbp), %rax cmpq $0x0, 0x30(%rax) je 0x42b7c movq -0x10(%rbp), %rax callq *0x30(%rax) jmp 0x42b7e movq $0x0, -0x8(%rbp) jmp 0x42c5d 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 0x42bcf jmp 0x42bd1 jmp 0x42bd3 jmp 0x42bd5 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 0x42c41 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 0x42c4b jmp 0x42c4d jmp 0x42c4f jmp 0x42c51 jmp 0x42c53 jmp 0x42c55 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_429E2: jmp short $+2 loc_429E4: jmp short $+2 loc_429E6: jmp short $+2 loc_429E8: jmp short $+2 loc_429EA: 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_42AD2 mov rax, [rbp+var_40] mov rax, [rax] mov rax, [rax+8] cmp rax, [rbp+var_18] jnb short loc_42A89 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_42A89 mov rax, [rbp+var_40] mov rax, [rax] cmp qword ptr [rax+8], 1000h jnb short loc_42A89 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_42A89: mov rax, [rbp+var_40] mov rax, [rax] mov [rbp+var_38], rax loc_42A94: xor eax, eax cmp [rbp+var_38], 0 mov [rbp+var_49], al jz short loc_42AB2 mov rax, [rbp+var_38] mov rax, [rax+8] cmp rax, [rbp+var_18] setb al mov [rbp+var_49], al loc_42AB2: mov al, [rbp+var_49] test al, 1 jnz short loc_42ABB jmp short loc_42AD0 loc_42ABB: 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_42A94 loc_42AD0: jmp short $+2 loc_42AD2: cmp [rbp+var_38], 0 jnz loc_42BD5 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_42B1D mov rax, [rbp+var_20] mov [rbp+var_58], rax jmp short loc_42B25 loc_42B1D: mov rax, [rbp+var_28] mov [rbp+var_58], rax loc_42B25: 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_42B8B mov rax, [rbp+var_10] cmp qword ptr [rax+30h], 0 jz short loc_42B7C mov rax, [rbp+var_10] call qword ptr [rax+30h] loc_42B7C: jmp short $+2 loc_42B7E: mov [rbp+var_8], 0 jmp loc_42C5D loc_42B8B: 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_42BCF: jmp short $+2 loc_42BD1: jmp short $+2 loc_42BD3: jmp short $+2 loc_42BD5: 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_42C41 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_42C41: mov rax, [rbp+var_30] mov [rbp+var_30], rax jmp short $+2 loc_42C4B: jmp short $+2 loc_42C4D: jmp short $+2 loc_42C4F: jmp short $+2 loc_42C51: jmp short $+2 loc_42C53: jmp short $+2 loc_42C55: mov rax, [rbp+var_30] mov [rbp+var_8], rax loc_42C5D: 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 0x001429e2 LAB_001429e2: JMP 0x001429e4 LAB_001429e4: JMP 0x001429e6 LAB_001429e6: JMP 0x001429e8 LAB_001429e8: JMP 0x001429ea LAB_001429ea: 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 0x00142ad2 MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x8] CMP RAX,qword ptr [RBP + -0x18] JNC 0x00142a89 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 0x00142a89 MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0x8],0x1000 JNC 0x00142a89 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_00142a89: MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX LAB_00142a94: XOR EAX,EAX CMP qword ptr [RBP + -0x38],0x0 MOV byte ptr [RBP + -0x49],AL JZ 0x00142ab2 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_00142ab2: MOV AL,byte ptr [RBP + -0x49] TEST AL,0x1 JNZ 0x00142abb JMP 0x00142ad0 LAB_00142abb: 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 0x00142a94 LAB_00142ad0: JMP 0x00142ad2 LAB_00142ad2: CMP qword ptr [RBP + -0x38],0x0 JNZ 0x00142bd5 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 0x00142b1d MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x58],RAX JMP 0x00142b25 LAB_00142b1d: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x58],RAX LAB_00142b25: 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 0x00136e60 MOV qword ptr [RBP + -0x38],RAX CMP RAX,0x0 JNZ 0x00142b8b MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x30],0x0 JZ 0x00142b7c MOV RAX,qword ptr [RBP + -0x10] CALL qword ptr [RAX + 0x30] LAB_00142b7c: JMP 0x00142b7e LAB_00142b7e: MOV qword ptr [RBP + -0x8],0x0 JMP 0x00142c5d LAB_00142b8b: 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 0x00142bcf LAB_00142bcf: JMP 0x00142bd1 LAB_00142bd1: JMP 0x00142bd3 LAB_00142bd3: JMP 0x00142bd5 LAB_00142bd5: 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 0x00142c41 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_00142c41: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x30],RAX JMP 0x00142c4b LAB_00142c4b: JMP 0x00142c4d LAB_00142c4d: JMP 0x00142c4f LAB_00142c4f: JMP 0x00142c51 LAB_00142c51: JMP 0x00142c53 LAB_00142c53: JMP 0x00142c55 LAB_00142c55: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x8],RAX LAB_00142c5d: 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); }
11,686
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 }
O3
c
alloc_root: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx addq $0x7, %r14 andq $-0x8, %r14 movq (%rdi), %rax movq %rdi, %r12 testq %rax, %rax je 0x361b2 cmpq %r14, 0x8(%rax) jae 0x36199 movl 0x2c(%rbx), %ecx leal 0x1(%rcx), %edx movl %edx, 0x2c(%rbx) cmpl $0xa, %ecx jb 0x36199 cmpq $0xfff, 0x8(%rax) # imm = 0xFFF ja 0x36199 movq (%rax), %rcx movq %rcx, (%rbx) movq 0x8(%rbx), %rcx movq %rcx, (%rax) movq %rax, 0x8(%rbx) movl $0x0, 0x2c(%rbx) movq %rbx, %rax movq %rax, %r12 movq (%rax), %rax testq %rax, %rax je 0x361b2 movq 0x8(%rax), %rdx cmpq %r14, %rdx jb 0x3619c jmp 0x3620f movq 0x20(%rbx), %rdx movq %rdx, %rax andq $-0x2, %rax movl 0x28(%rbx), %r15d shrl $0x2, %r15d imulq %rax, %r15 leaq 0x18(%r14), %rax cmpq %r15, %rax cmovaq %rax, %r15 movl 0x38(%rbx), %edi andl $0x1, %edx shll $0x10, %edx orq $0x1010, %rdx # imm = 0x1010 movq %r15, %rsi callq 0x300d9 testq %rax, %rax je 0x36241 incl 0x28(%rbx) movq (%r12), %rcx movq %rcx, (%rax) movq %r15, 0x10(%rax) addq $-0x18, %r15 movq %r15, 0x8(%rax) movq %rax, (%r12) movq 0x8(%rax), %rdx movq 0x10(%rax), %rcx subq %rdx, %rcx addq %rax, %rcx subq %r14, %rdx movq %rdx, 0x8(%rax) cmpq 0x18(%rbx), %rdx jae 0x3624e movq (%rax), %rdx movq %rdx, (%r12) movq 0x8(%rbx), %rdx movq %rdx, (%rax) movq %rax, 0x8(%rbx) movl $0x0, 0x2c(%rbx) jmp 0x3624e movq 0x30(%rbx), %rax testq %rax, %rax je 0x3624c callq *%rax xorl %ecx, %ecx movq %rcx, %rax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
alloc_root: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov r14, rsi mov rbx, rdi add r14, 7 and r14, 0FFFFFFFFFFFFFFF8h mov rax, [rdi] mov r12, rdi test rax, rax jz short loc_361B2 cmp [rax+8], r14 jnb short loc_36199 mov ecx, [rbx+2Ch] lea edx, [rcx+1] mov [rbx+2Ch], edx cmp ecx, 0Ah jb short loc_36199 cmp qword ptr [rax+8], 0FFFh ja short loc_36199 mov rcx, [rax] mov [rbx], rcx mov rcx, [rbx+8] mov [rax], rcx mov [rbx+8], rax mov dword ptr [rbx+2Ch], 0 loc_36199: mov rax, rbx loc_3619C: mov r12, rax mov rax, [rax] test rax, rax jz short loc_361B2 mov rdx, [rax+8] cmp rdx, r14 jb short loc_3619C jmp short loc_3620F loc_361B2: mov rdx, [rbx+20h] mov rax, rdx and rax, 0FFFFFFFFFFFFFFFEh mov r15d, [rbx+28h] shr r15d, 2 imul r15, rax lea rax, [r14+18h] cmp rax, r15 cmova r15, rax mov edi, [rbx+38h] and edx, 1 shl edx, 10h or rdx, 1010h mov rsi, r15 call my_malloc test rax, rax jz short loc_36241 inc dword ptr [rbx+28h] mov rcx, [r12] mov [rax], rcx mov [rax+10h], r15 add r15, 0FFFFFFFFFFFFFFE8h mov [rax+8], r15 mov [r12], rax mov rdx, [rax+8] loc_3620F: mov rcx, [rax+10h] sub rcx, rdx add rcx, rax sub rdx, r14 mov [rax+8], rdx cmp rdx, [rbx+18h] jnb short loc_3624E mov rdx, [rax] mov [r12], rdx mov rdx, [rbx+8] mov [rax], rdx mov [rbx+8], rax mov dword ptr [rbx+2Ch], 0 jmp short loc_3624E loc_36241: mov rax, [rbx+30h] test rax, rax jz short loc_3624C call rax loc_3624C: xor ecx, ecx loc_3624E: mov rax, rcx pop rbx pop r12 pop r14 pop r15 pop rbp retn
char * alloc_root(long long a1, long long a2) { unsigned long long v2; // r14 _QWORD *v3; // rax _QWORD *v4; // r12 unsigned int v5; // ecx _QWORD *v6; // rax unsigned long long v7; // rdx long long v8; // rdx unsigned long long v9; // r15 char *v10; // rcx unsigned long long v11; // rdx void (*v12)(void); // rax v2 = (a2 + 7) & 0xFFFFFFFFFFFFFFF8LL; v3 = *(_QWORD **)a1; v4 = (_QWORD *)a1; if ( *(_QWORD *)a1 ) { if ( v3[1] < v2 ) { v5 = *(_DWORD *)(a1 + 44); *(_DWORD *)(a1 + 44) = v5 + 1; if ( v5 >= 0xA && v3[1] <= 0xFFFuLL ) { *(_QWORD *)a1 = *v3; *v3 = *(_QWORD *)(a1 + 8); *(_QWORD *)(a1 + 8) = v3; *(_DWORD *)(a1 + 44) = 0; } } v6 = (_QWORD *)a1; while ( 1 ) { v4 = v6; v6 = (_QWORD *)*v6; if ( !v6 ) break; v7 = v6[1]; if ( v7 >= v2 ) goto LABEL_14; } } v8 = *(_QWORD *)(a1 + 32); v9 = (v8 & 0xFFFFFFFFFFFFFFFELL) * (*(_DWORD *)(a1 + 40) >> 2); if ( v2 + 24 > v9 ) v9 = v2 + 24; v6 = (_QWORD *)my_malloc(*(_DWORD *)(a1 + 56), v9, ((v8 & 1) << 16) | 0x1010); if ( v6 ) { ++*(_DWORD *)(a1 + 40); *v6 = *v4; v6[2] = v9; v6[1] = v9 - 24; *v4 = v6; v7 = v6[1]; LABEL_14: v10 = (char *)v6 + v6[2] - v7; v11 = v7 - v2; v6[1] = v11; if ( v11 < *(_QWORD *)(a1 + 24) ) { *v4 = *v6; *v6 = *(_QWORD *)(a1 + 8); *(_QWORD *)(a1 + 8) = v6; *(_DWORD *)(a1 + 44) = 0; } } else { v12 = *(void (**)(void))(a1 + 48); if ( v12 ) v12(); return 0LL; } return v10; }
alloc_root: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R14,RSI MOV RBX,RDI ADD R14,0x7 AND R14,-0x8 MOV RAX,qword ptr [RDI] MOV R12,RDI TEST RAX,RAX JZ 0x001361b2 CMP qword ptr [RAX + 0x8],R14 JNC 0x00136199 MOV ECX,dword ptr [RBX + 0x2c] LEA EDX,[RCX + 0x1] MOV dword ptr [RBX + 0x2c],EDX CMP ECX,0xa JC 0x00136199 CMP qword ptr [RAX + 0x8],0xfff JA 0x00136199 MOV RCX,qword ptr [RAX] MOV qword ptr [RBX],RCX MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RAX],RCX MOV qword ptr [RBX + 0x8],RAX MOV dword ptr [RBX + 0x2c],0x0 LAB_00136199: MOV RAX,RBX LAB_0013619c: MOV R12,RAX MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x001361b2 MOV RDX,qword ptr [RAX + 0x8] CMP RDX,R14 JC 0x0013619c JMP 0x0013620f LAB_001361b2: MOV RDX,qword ptr [RBX + 0x20] MOV RAX,RDX AND RAX,-0x2 MOV R15D,dword ptr [RBX + 0x28] SHR R15D,0x2 IMUL R15,RAX LEA RAX,[R14 + 0x18] CMP RAX,R15 CMOVA R15,RAX MOV EDI,dword ptr [RBX + 0x38] AND EDX,0x1 SHL EDX,0x10 OR RDX,0x1010 MOV RSI,R15 CALL 0x001300d9 TEST RAX,RAX JZ 0x00136241 INC dword ptr [RBX + 0x28] MOV RCX,qword ptr [R12] MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x10],R15 ADD R15,-0x18 MOV qword ptr [RAX + 0x8],R15 MOV qword ptr [R12],RAX MOV RDX,qword ptr [RAX + 0x8] LAB_0013620f: MOV RCX,qword ptr [RAX + 0x10] SUB RCX,RDX ADD RCX,RAX SUB RDX,R14 MOV qword ptr [RAX + 0x8],RDX CMP RDX,qword ptr [RBX + 0x18] JNC 0x0013624e MOV RDX,qword ptr [RAX] MOV qword ptr [R12],RDX MOV RDX,qword ptr [RBX + 0x8] MOV qword ptr [RAX],RDX MOV qword ptr [RBX + 0x8],RAX MOV dword ptr [RBX + 0x2c],0x0 JMP 0x0013624e LAB_00136241: MOV RAX,qword ptr [RBX + 0x30] TEST RAX,RAX JZ 0x0013624c CALL RAX LAB_0013624c: XOR ECX,ECX LAB_0013624e: MOV RAX,RCX POP RBX POP R12 POP R14 POP R15 POP RBP RET
long alloc_root(long *param_1,long param_2) { uint uVar1; long *plVar2; long lVar3; long *plVar4; long *plVar5; ulong uVar6; ulong uVar7; uVar6 = param_2 + 7U & 0xfffffffffffffff8; plVar2 = (long *)*param_1; plVar5 = param_1; if (plVar2 == (long *)0x0) { LAB_001361b2: uVar7 = (ulong)(*(uint *)(param_1 + 5) >> 2) * (param_1[4] & 0xfffffffffffffffeU); if (uVar7 < uVar6 + 0x18) { uVar7 = uVar6 + 0x18; } plVar4 = (long *)my_malloc((int)param_1[7],uVar7,((uint)param_1[4] & 1) << 0x10 | 0x1010); if (plVar4 == (long *)0x0) { if ((code *)param_1[6] != (code *)0x0) { (*(code *)param_1[6])(); } return 0; } *(int *)(param_1 + 5) = (int)param_1[5] + 1; *plVar4 = *plVar5; plVar4[2] = uVar7; plVar4[1] = uVar7 - 0x18; *plVar5 = (long)plVar4; uVar7 = plVar4[1]; } else { plVar4 = param_1; if ((((ulong)plVar2[1] < uVar6) && (uVar1 = *(uint *)((long)param_1 + 0x2c), *(uint *)((long)param_1 + 0x2c) = uVar1 + 1, 9 < uVar1)) && ((ulong)plVar2[1] < 0x1000)) { *param_1 = *plVar2; *plVar2 = param_1[1]; param_1[1] = (long)plVar2; *(int4 *)((long)param_1 + 0x2c) = 0; } do { plVar5 = plVar4; plVar4 = (long *)*plVar5; if (plVar4 == (long *)0x0) goto LAB_001361b2; uVar7 = plVar4[1]; } while (uVar7 < uVar6); } lVar3 = plVar4[2]; plVar4[1] = uVar7 - uVar6; if (uVar7 - uVar6 < (ulong)param_1[3]) { *plVar5 = *plVar4; *plVar4 = param_1[1]; param_1[1] = (long)plVar4; *(int4 *)((long)param_1 + 0x2c) = 0; } return (lVar3 - uVar7) + (long)plVar4; }
11,687
hashcmp
eloqsql/mysys/hash.c
static int hashcmp(const HASH *hash, HASH_LINK *pos, const uchar *key, size_t length) { size_t rec_keylength; uchar *rec_key= (uchar*) my_hash_key(hash, pos->data, &rec_keylength, 1); return ((length && length != rec_keylength) || my_strnncoll(hash->charset, (uchar*) rec_key, rec_keylength, (uchar*) key, rec_keylength)); }
O3
c
hashcmp: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rcx, %r15 movq %rdx, %rbx movq %rdi, %r14 movq 0x50(%rdi), %rax testq %rax, %rax je 0xb3bd4 leaq -0x28(%rbp), %r12 movq %rsi, %rdi movq %r12, %rsi movl $0x1, %edx callq *%rax movq %rax, %rsi movq (%r12), %rdx jmp 0xb3bdf movq 0x8(%r14), %rdx movq %rdx, -0x28(%rbp) addq (%r14), %rsi testq %r15, %r15 sete %al cmpq %r15, %rdx sete %cl orb %al, %cl movl $0x1, %eax cmpb $0x1, %cl jne 0xb3c17 movq 0x68(%r14), %rdi movq 0xc0(%rdi), %rax movq %rbx, %rcx movq %rdx, %r8 xorl %r9d, %r9d callq *0x8(%rax) movl %eax, %ecx xorl %eax, %eax testl %ecx, %ecx setne %al addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
hashcmp: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 10h mov r15, rcx mov rbx, rdx mov r14, rdi mov rax, [rdi+50h] test rax, rax jz short loc_B3BD4 lea r12, [rbp+var_28] mov rdi, rsi mov rsi, r12 mov edx, 1 call rax mov rsi, rax mov rdx, [r12] jmp short loc_B3BDF loc_B3BD4: mov rdx, [r14+8] mov [rbp+var_28], rdx add rsi, [r14] loc_B3BDF: test r15, r15 setz al cmp rdx, r15 setz cl or cl, al mov eax, 1 cmp cl, 1 jnz short loc_B3C17 mov rdi, [r14+68h] mov rax, [rdi+0C0h] mov rcx, rbx mov r8, rdx xor r9d, r9d call qword ptr [rax+8] mov ecx, eax xor eax, eax test ecx, ecx setnz al loc_B3C17: add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn
_BOOL8 hashcmp(_QWORD *a1, long long a2, long long a3, long long a4) { long long ( *v6)(long long, _QWORD *, long long); // rax long long v7; // rsi long long v8; // rdx _BOOL8 result; // rax _QWORD v10[5]; // [rsp+8h] [rbp-28h] BYREF v6 = (long long ( *)(long long, _QWORD *, long long))a1[10]; if ( v6 ) { v7 = v6(a2, v10, 1LL); v8 = v10[0]; } else { v8 = a1[1]; v10[0] = v8; v7 = *a1 + a2; } result = 1LL; if ( a4 == 0 || v8 == a4 ) return (*(unsigned int ( **)(_QWORD, long long, long long, long long, long long, _QWORD))(*(_QWORD *)(a1[13] + 192LL) + 8LL))( a1[13], v7, v8, a3, v8, 0LL) != 0; return result; }
hashcmp: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R15,RCX MOV RBX,RDX MOV R14,RDI MOV RAX,qword ptr [RDI + 0x50] TEST RAX,RAX JZ 0x001b3bd4 LEA R12,[RBP + -0x28] MOV RDI,RSI MOV RSI,R12 MOV EDX,0x1 CALL RAX MOV RSI,RAX MOV RDX,qword ptr [R12] JMP 0x001b3bdf LAB_001b3bd4: MOV RDX,qword ptr [R14 + 0x8] MOV qword ptr [RBP + -0x28],RDX ADD RSI,qword ptr [R14] LAB_001b3bdf: TEST R15,R15 SETZ AL CMP RDX,R15 SETZ CL OR CL,AL MOV EAX,0x1 CMP CL,0x1 JNZ 0x001b3c17 MOV RDI,qword ptr [R14 + 0x68] MOV RAX,qword ptr [RDI + 0xc0] MOV RCX,RBX MOV R8,RDX XOR R9D,R9D CALL qword ptr [RAX + 0x8] MOV ECX,EAX XOR EAX,EAX TEST ECX,ECX SETNZ AL LAB_001b3c17: ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET
bool hashcmp(long *param_1,long param_2,int8 param_3,long param_4) { int iVar1; bool bVar2; long local_30; if ((code *)param_1[10] == (code *)0x0) { local_30 = param_1[1]; param_2 = param_2 + *param_1; } else { param_2 = (*(code *)param_1[10])(param_2,&local_30,1); } bVar2 = true; if (local_30 == param_4 || param_4 == 0) { iVar1 = (**(code **)(*(long *)(param_1[0xd] + 0xc0) + 8)) (param_1[0xd],param_2,local_30,param_3,local_30,0); bVar2 = iVar1 != 0; } return bVar2; }
11,688
parse_time
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
static int parse_time(const char *str, size_t length, const char **end_ptr, MYSQL_TIME *tm) { int err= 0; const char *p = str; const char *end = str + length; size_t frac_len; int ret=1; tm->hour = my_strtoui(p, end-p, &p, &err); if (err || tm->hour > 838 || p == end || *p != ':' ) goto end; p++; tm->minute = my_strtoui(p, end-p, &p, &err); if (err || tm->minute > 59 || p == end || *p != ':') goto end; p++; tm->second = my_strtoui(p, end-p, &p, &err); if (err || tm->second > 59) goto end; ret = 0; tm->second_part = 0; if (p == end) goto end; /* Check for fractional part*/ if (*p != '.') goto end; p++; frac_len = MIN(6,end-p); tm->second_part = my_strtoui(p, frac_len, &p, &err); if (err) goto end; if (frac_len < 6) tm->second_part *= frac_mul[frac_len]; ret = 0; /* Consume whole fractional part, even after 6 digits.*/ p += frac_len; while(p < *end_ptr) { if (*p < '0' || *p > '9') break; p++; } end: *end_ptr = p; return ret; }
O0
c
parse_time: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movl $0x0, -0x24(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x8(%rbp), %rax addq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) movl $0x1, -0x44(%rbp) movq -0x30(%rbp), %rdi movq -0x38(%rbp), %rsi movq -0x30(%rbp), %rax subq %rax, %rsi leaq -0x30(%rbp), %rdx leaq -0x24(%rbp), %rcx callq 0x612e0 movl %eax, %ecx movq -0x20(%rbp), %rax movl %ecx, 0xc(%rax) cmpl $0x0, -0x24(%rbp) jne 0x5ff48 movq -0x20(%rbp), %rax cmpl $0x346, 0xc(%rax) # imm = 0x346 ja 0x5ff48 movq -0x30(%rbp), %rax cmpq -0x38(%rbp), %rax je 0x5ff48 movq -0x30(%rbp), %rax movsbl (%rax), %eax cmpl $0x3a, %eax je 0x5ff4d jmp 0x600fc movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rdi movq -0x38(%rbp), %rsi movq -0x30(%rbp), %rax subq %rax, %rsi leaq -0x30(%rbp), %rdx leaq -0x24(%rbp), %rcx callq 0x612e0 movl %eax, %ecx movq -0x20(%rbp), %rax movl %ecx, 0x10(%rax) cmpl $0x0, -0x24(%rbp) jne 0x5ffa4 movq -0x20(%rbp), %rax cmpl $0x3b, 0x10(%rax) ja 0x5ffa4 movq -0x30(%rbp), %rax cmpq -0x38(%rbp), %rax je 0x5ffa4 movq -0x30(%rbp), %rax movsbl (%rax), %eax cmpl $0x3a, %eax je 0x5ffa9 jmp 0x600fc movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rdi movq -0x38(%rbp), %rsi movq -0x30(%rbp), %rax subq %rax, %rsi leaq -0x30(%rbp), %rdx leaq -0x24(%rbp), %rcx callq 0x612e0 movl %eax, %ecx movq -0x20(%rbp), %rax movl %ecx, 0x14(%rax) cmpl $0x0, -0x24(%rbp) jne 0x5ffea movq -0x20(%rbp), %rax cmpl $0x3b, 0x14(%rax) jbe 0x5ffef jmp 0x600fc movl $0x0, -0x44(%rbp) movq -0x20(%rbp), %rax movq $0x0, 0x18(%rax) movq -0x30(%rbp), %rax cmpq -0x38(%rbp), %rax jne 0x60011 jmp 0x600fc movq -0x30(%rbp), %rax movsbl (%rax), %eax cmpl $0x2e, %eax je 0x60022 jmp 0x600fc movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) movq -0x38(%rbp), %rcx movq -0x30(%rbp), %rax subq %rax, %rcx movl $0x6, %eax cmpq %rcx, %rax jge 0x6004e movl $0x6, %eax movq %rax, -0x50(%rbp) jmp 0x6005d movq -0x38(%rbp), %rax movq -0x30(%rbp), %rcx subq %rcx, %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x30(%rbp), %rdi movq -0x40(%rbp), %rsi leaq -0x30(%rbp), %rdx leaq -0x24(%rbp), %rcx callq 0x612e0 movl %eax, %eax movl %eax, %ecx movq -0x20(%rbp), %rax movq %rcx, 0x18(%rax) cmpl $0x0, -0x24(%rbp) je 0x6008e jmp 0x600fc cmpq $0x6, -0x40(%rbp) jae 0x600b2 movq -0x40(%rbp), %rcx leaq 0x86800(%rip), %rax # 0xe68a0 movl (%rax,%rcx,4), %eax movl %eax, %ecx movq -0x20(%rbp), %rax imulq 0x18(%rax), %rcx movq %rcx, 0x18(%rax) movl $0x0, -0x44(%rbp) movq -0x40(%rbp), %rax addq -0x30(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq -0x18(%rbp), %rcx cmpq (%rcx), %rax jae 0x600fa movq -0x30(%rbp), %rax movsbl (%rax), %eax cmpl $0x30, %eax jl 0x600ea movq -0x30(%rbp), %rax movsbl (%rax), %eax cmpl $0x39, %eax jle 0x600ec jmp 0x600fa movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) jmp 0x600c5 jmp 0x600fc movq -0x30(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl -0x44(%rbp), %eax addq $0x50, %rsp popq %rbp retq
parse_time: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_24], 0 mov rax, [rbp+var_8] mov [rbp+var_30], rax mov rax, [rbp+var_8] add rax, [rbp+var_10] mov [rbp+var_38], rax mov [rbp+var_44], 1 mov rdi, [rbp+var_30] mov rsi, [rbp+var_38] mov rax, [rbp+var_30] sub rsi, rax lea rdx, [rbp+var_30] lea rcx, [rbp+var_24] call my_strtoui mov ecx, eax mov rax, [rbp+var_20] mov [rax+0Ch], ecx cmp [rbp+var_24], 0 jnz short loc_5FF48 mov rax, [rbp+var_20] cmp dword ptr [rax+0Ch], 346h ja short loc_5FF48 mov rax, [rbp+var_30] cmp rax, [rbp+var_38] jz short loc_5FF48 mov rax, [rbp+var_30] movsx eax, byte ptr [rax] cmp eax, 3Ah ; ':' jz short loc_5FF4D loc_5FF48: jmp loc_600FC loc_5FF4D: mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax mov rdi, [rbp+var_30] mov rsi, [rbp+var_38] mov rax, [rbp+var_30] sub rsi, rax lea rdx, [rbp+var_30] lea rcx, [rbp+var_24] call my_strtoui mov ecx, eax mov rax, [rbp+var_20] mov [rax+10h], ecx cmp [rbp+var_24], 0 jnz short loc_5FFA4 mov rax, [rbp+var_20] cmp dword ptr [rax+10h], 3Bh ; ';' ja short loc_5FFA4 mov rax, [rbp+var_30] cmp rax, [rbp+var_38] jz short loc_5FFA4 mov rax, [rbp+var_30] movsx eax, byte ptr [rax] cmp eax, 3Ah ; ':' jz short loc_5FFA9 loc_5FFA4: jmp loc_600FC loc_5FFA9: mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax mov rdi, [rbp+var_30] mov rsi, [rbp+var_38] mov rax, [rbp+var_30] sub rsi, rax lea rdx, [rbp+var_30] lea rcx, [rbp+var_24] call my_strtoui mov ecx, eax mov rax, [rbp+var_20] mov [rax+14h], ecx cmp [rbp+var_24], 0 jnz short loc_5FFEA mov rax, [rbp+var_20] cmp dword ptr [rax+14h], 3Bh ; ';' jbe short loc_5FFEF loc_5FFEA: jmp loc_600FC loc_5FFEF: mov [rbp+var_44], 0 mov rax, [rbp+var_20] mov qword ptr [rax+18h], 0 mov rax, [rbp+var_30] cmp rax, [rbp+var_38] jnz short loc_60011 jmp loc_600FC loc_60011: mov rax, [rbp+var_30] movsx eax, byte ptr [rax] cmp eax, 2Eh ; '.' jz short loc_60022 jmp loc_600FC loc_60022: mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax mov rcx, [rbp+var_38] mov rax, [rbp+var_30] sub rcx, rax mov eax, 6 cmp rax, rcx jge short loc_6004E mov eax, 6 mov [rbp+var_50], rax jmp short loc_6005D loc_6004E: mov rax, [rbp+var_38] mov rcx, [rbp+var_30] sub rax, rcx mov [rbp+var_50], rax loc_6005D: mov rax, [rbp+var_50] mov [rbp+var_40], rax mov rdi, [rbp+var_30] mov rsi, [rbp+var_40] lea rdx, [rbp+var_30] lea rcx, [rbp+var_24] call my_strtoui mov eax, eax mov ecx, eax mov rax, [rbp+var_20] mov [rax+18h], rcx cmp [rbp+var_24], 0 jz short loc_6008E jmp short loc_600FC loc_6008E: cmp [rbp+var_40], 6 jnb short loc_600B2 mov rcx, [rbp+var_40] lea rax, frac_mul mov eax, [rax+rcx*4] mov ecx, eax mov rax, [rbp+var_20] imul rcx, [rax+18h] mov [rax+18h], rcx loc_600B2: mov [rbp+var_44], 0 mov rax, [rbp+var_40] add rax, [rbp+var_30] mov [rbp+var_30], rax loc_600C5: mov rax, [rbp+var_30] mov rcx, [rbp+var_18] cmp rax, [rcx] jnb short loc_600FA mov rax, [rbp+var_30] movsx eax, byte ptr [rax] cmp eax, 30h ; '0' jl short loc_600EA mov rax, [rbp+var_30] movsx eax, byte ptr [rax] cmp eax, 39h ; '9' jle short loc_600EC loc_600EA: jmp short loc_600FA loc_600EC: mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax jmp short loc_600C5 loc_600FA: jmp short $+2 loc_600FC: mov rcx, [rbp+var_30] mov rax, [rbp+var_18] mov [rax], rcx mov eax, [rbp+var_44] add rsp, 50h pop rbp retn
long long parse_time(_BYTE *a1, long long a2, _QWORD *a3, long long a4) { int v4; // eax int v5; // eax int v6; // eax unsigned int v7; // eax unsigned long long v9; // [rsp+0h] [rbp-50h] unsigned int v10; // [rsp+Ch] [rbp-44h] _BYTE *v11; // [rsp+18h] [rbp-38h] _BYTE *v12; // [rsp+20h] [rbp-30h] BYREF int v13; // [rsp+2Ch] [rbp-24h] BYREF long long v14; // [rsp+30h] [rbp-20h] _QWORD *v15; // [rsp+38h] [rbp-18h] long long v16; // [rsp+40h] [rbp-10h] _BYTE *v17; // [rsp+48h] [rbp-8h] v17 = a1; v16 = a2; v15 = a3; v14 = a4; v13 = 0; v12 = a1; v11 = &a1[a2]; v10 = 1; v4 = my_strtoui(a1, a2, &v12, &v13); *(_DWORD *)(v14 + 12) = v4; if ( !v13 && *(_DWORD *)(v14 + 12) <= 0x346u && v12 != v11 && *v12 == 58 ) { ++v12; v5 = my_strtoui(v12, v11 - v12, &v12, &v13); *(_DWORD *)(v14 + 16) = v5; if ( !v13 && *(_DWORD *)(v14 + 16) <= 0x3Bu && v12 != v11 && *v12 == 58 ) { ++v12; v6 = my_strtoui(v12, v11 - v12, &v12, &v13); *(_DWORD *)(v14 + 20) = v6; if ( !v13 && *(_DWORD *)(v14 + 20) <= 0x3Bu ) { v10 = 0; *(_QWORD *)(v14 + 24) = 0LL; if ( v12 != v11 && *v12 == 46 ) { ++v12; v9 = v11 - v12 <= 6 ? v11 - v12 : 6LL; v7 = my_strtoui(v12, v9, &v12, &v13); *(_QWORD *)(v14 + 24) = v7; if ( !v13 ) { if ( v9 < 6 ) *(_QWORD *)(v14 + 24) *= frac_mul[v9]; v10 = 0; for ( v12 += v9; (unsigned long long)v12 < *v15 && (char)*v12 >= 48 && (char)*v12 <= 57; ++v12 ) ; } } } } } *v15 = v12; return v10; }
parse_time: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x8] ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RAX MOV dword ptr [RBP + -0x44],0x1 MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x30] SUB RSI,RAX LEA RDX,[RBP + -0x30] LEA RCX,[RBP + -0x24] CALL 0x001612e0 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0xc],ECX CMP dword ptr [RBP + -0x24],0x0 JNZ 0x0015ff48 MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0xc],0x346 JA 0x0015ff48 MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x38] JZ 0x0015ff48 MOV RAX,qword ptr [RBP + -0x30] MOVSX EAX,byte ptr [RAX] CMP EAX,0x3a JZ 0x0015ff4d LAB_0015ff48: JMP 0x001600fc LAB_0015ff4d: MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x30] SUB RSI,RAX LEA RDX,[RBP + -0x30] LEA RCX,[RBP + -0x24] CALL 0x001612e0 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x10],ECX CMP dword ptr [RBP + -0x24],0x0 JNZ 0x0015ffa4 MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0x10],0x3b JA 0x0015ffa4 MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x38] JZ 0x0015ffa4 MOV RAX,qword ptr [RBP + -0x30] MOVSX EAX,byte ptr [RAX] CMP EAX,0x3a JZ 0x0015ffa9 LAB_0015ffa4: JMP 0x001600fc LAB_0015ffa9: MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x30] SUB RSI,RAX LEA RDX,[RBP + -0x30] LEA RCX,[RBP + -0x24] CALL 0x001612e0 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x14],ECX CMP dword ptr [RBP + -0x24],0x0 JNZ 0x0015ffea MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0x14],0x3b JBE 0x0015ffef LAB_0015ffea: JMP 0x001600fc LAB_0015ffef: MOV dword ptr [RBP + -0x44],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x18],0x0 MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x38] JNZ 0x00160011 JMP 0x001600fc LAB_00160011: MOV RAX,qword ptr [RBP + -0x30] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2e JZ 0x00160022 JMP 0x001600fc LAB_00160022: MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x30] SUB RCX,RAX MOV EAX,0x6 CMP RAX,RCX JGE 0x0016004e MOV EAX,0x6 MOV qword ptr [RBP + -0x50],RAX JMP 0x0016005d LAB_0016004e: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x30] SUB RAX,RCX MOV qword ptr [RBP + -0x50],RAX LAB_0016005d: MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x40] LEA RDX,[RBP + -0x30] LEA RCX,[RBP + -0x24] CALL 0x001612e0 MOV EAX,EAX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x18],RCX CMP dword ptr [RBP + -0x24],0x0 JZ 0x0016008e JMP 0x001600fc LAB_0016008e: CMP qword ptr [RBP + -0x40],0x6 JNC 0x001600b2 MOV RCX,qword ptr [RBP + -0x40] LEA RAX,[0x1e68a0] MOV EAX,dword ptr [RAX + RCX*0x4] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x20] IMUL RCX,qword ptr [RAX + 0x18] MOV qword ptr [RAX + 0x18],RCX LAB_001600b2: MOV dword ptr [RBP + -0x44],0x0 MOV RAX,qword ptr [RBP + -0x40] ADD RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x30],RAX LAB_001600c5: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RCX] JNC 0x001600fa MOV RAX,qword ptr [RBP + -0x30] MOVSX EAX,byte ptr [RAX] CMP EAX,0x30 JL 0x001600ea MOV RAX,qword ptr [RBP + -0x30] MOVSX EAX,byte ptr [RAX] CMP EAX,0x39 JLE 0x001600ec LAB_001600ea: JMP 0x001600fa LAB_001600ec: MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX JMP 0x001600c5 LAB_001600fa: JMP 0x001600fc LAB_001600fc: MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV EAX,dword ptr [RBP + -0x44] ADD RSP,0x50 POP RBP RET
int4 parse_time(char *param_1,long param_2,int8 *param_3,long param_4) { int4 uVar1; uint uVar2; char *pcVar3; ulong local_58; int4 local_4c; char *local_38; int local_2c; long local_28; int8 *local_20; long local_18; char *local_10; local_2c = 0; pcVar3 = param_1 + param_2; local_4c = 1; local_38 = param_1; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; uVar1 = my_strtoui(param_1,(long)pcVar3 - (long)param_1,&local_38,&local_2c); *(int4 *)(local_28 + 0xc) = uVar1; if ((((local_2c == 0) && (*(uint *)(local_28 + 0xc) < 0x347)) && (local_38 != pcVar3)) && (*local_38 == ':')) { local_38 = local_38 + 1; uVar1 = my_strtoui(local_38,(long)pcVar3 - (long)local_38,&local_38,&local_2c); *(int4 *)(local_28 + 0x10) = uVar1; if (((local_2c == 0) && (*(uint *)(local_28 + 0x10) < 0x3c)) && ((local_38 != pcVar3 && (*local_38 == ':')))) { local_38 = local_38 + 1; uVar1 = my_strtoui(local_38,(long)pcVar3 - (long)local_38,&local_38,&local_2c); *(int4 *)(local_28 + 0x14) = uVar1; if ((local_2c == 0) && (*(uint *)(local_28 + 0x14) < 0x3c)) { local_4c = 0; *(int8 *)(local_28 + 0x18) = 0; if ((local_38 != pcVar3) && (*local_38 == '.')) { local_38 = local_38 + 1; if ((long)pcVar3 - (long)local_38 < 7) { local_58 = (long)pcVar3 - (long)local_38; } else { local_58 = 6; } uVar2 = my_strtoui(local_38,local_58,&local_38,&local_2c); *(ulong *)(local_28 + 0x18) = (ulong)uVar2; if (local_2c == 0) { if (local_58 < 6) { *(ulong *)(local_28 + 0x18) = (ulong)*(uint *)(frac_mul + local_58 * 4) * *(long *)(local_28 + 0x18); } local_4c = 0; for (local_38 = local_38 + local_58; ((local_38 < (char *)*local_20 && ('/' < *local_38)) && (*local_38 < ':')); local_38 = local_38 + 1) { } } } } } } *local_20 = local_38; return local_4c; }
11,689
parse_time
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
static int parse_time(const char *str, size_t length, const char **end_ptr, MYSQL_TIME *tm) { int err= 0; const char *p = str; const char *end = str + length; size_t frac_len; int ret=1; tm->hour = my_strtoui(p, end-p, &p, &err); if (err || tm->hour > 838 || p == end || *p != ':' ) goto end; p++; tm->minute = my_strtoui(p, end-p, &p, &err); if (err || tm->minute > 59 || p == end || *p != ':') goto end; p++; tm->second = my_strtoui(p, end-p, &p, &err); if (err || tm->second > 59) goto end; ret = 0; tm->second_part = 0; if (p == end) goto end; /* Check for fractional part*/ if (*p != '.') goto end; p++; frac_len = MIN(6,end-p); tm->second_part = my_strtoui(p, frac_len, &p, &err); if (err) goto end; if (frac_len < 6) tm->second_part *= frac_mul[frac_len]; ret = 0; /* Consume whole fractional part, even after 6 digits.*/ p += frac_len; while(p < *end_ptr) { if (*p < '0' || *p > '9') break; p++; } end: *end_ptr = p; return ret; }
O3
c
parse_time: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rcx, %r14 movq %rdx, %rbx movl $0x0, -0x24(%rbp) leaq (%rdi,%rsi), %rax testq %rsi, %rsi jle 0x521a4 movabsq $0x1999999999999999, %r8 # imm = 0x1999999999999999 xorl %edx, %edx xorl %esi, %esi xorl %ecx, %ecx movsbq (%rdi,%rsi), %r9 leal -0x3a(%r9), %r10d cmpb $-0xa, %r10b jb 0x521b4 cmpq %r8, %rcx ja 0x521a8 leaq (%rcx,%rcx), %r10 leaq (%r10,%r10,4), %r10 movl $0x2f, %r11d subq %r9, %r11 cmpq %r11, %r10 ja 0x521a8 leaq (%r10,%r9), %rcx addq $-0x30, %rcx leaq (%rdi,%rsi), %r9 incq %r9 incq %rsi cmpq %rax, %r9 jb 0x5215c addq %rsi, %rdi xorl %edx, %edx jmp 0x521ca xorl %ecx, %ecx jmp 0x521be movl $0x22, -0x24(%rbp) movl $0x22, %edx testq %rsi, %rsi je 0x521be addq %rsi, %rdi jmp 0x521ca movl $0x22, -0x24(%rbp) movl $0x22, %edx movq %rdi, -0x30(%rbp) movq %rcx, %rsi shrq $0x20, %rsi movl %ecx, 0xc(%r14) movl $0x1, %r15d jne 0x522ab testl %edx, %edx setne %dl cmpl $0x347, %ecx # imm = 0x347 setae %cl orb %dl, %cl cmpq %rax, %rdi sete %dl orb %cl, %dl jne 0x522ab cmpb $0x3a, (%rdi) jne 0x522ab incq %rdi movq %rdi, -0x30(%rbp) movq %rax, %rcx subq %rdi, %rcx testq %rcx, %rcx jle 0x52276 movabsq $0x1999999999999999, %r8 # imm = 0x1999999999999999 xorl %edx, %edx xorl %esi, %esi xorl %ecx, %ecx movsbq (%rdi,%rsi), %r9 leal -0x3a(%r9), %r10d cmpb $-0xa, %r10b jb 0x52286 cmpq %r8, %rcx ja 0x5227a leaq (%rcx,%rcx), %r10 leaq (%r10,%r10,4), %r10 movl $0x2f, %r11d subq %r9, %r11 cmpq %r11, %r10 ja 0x5227a leaq (%r10,%r9), %rcx addq $-0x30, %rcx leaq (%rdi,%rsi), %r9 incq %r9 incq %rsi cmpq %rax, %r9 jb 0x5222e addq %rsi, %rdi xorl %edx, %edx jmp 0x5229a xorl %ecx, %ecx jmp 0x5228e movl $0x22, -0x24(%rbp) movl $0x22, %edx addq %rsi, %rdi testq %rsi, %rsi jne 0x5229a movl $0x22, -0x24(%rbp) movl $0x22, %edx movq %rdi, -0x30(%rbp) movq %rcx, %rsi shrq $0x20, %rsi movl %ecx, 0x10(%r14) je 0x522c2 movq -0x30(%rbp), %rax movq %rax, (%rbx) movl %r15d, %eax addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq cmpl $0x3b, %ecx ja 0x522ab testl %edx, %edx jne 0x522ab cmpq %rax, %rdi je 0x522ab cmpb $0x3a, (%rdi) jne 0x522ab incq %rdi movq %rdi, -0x30(%rbp) movq %rax, %rcx subq %rdi, %rcx testq %rcx, %rcx jle 0x5233f movabsq $0x1999999999999999, %r8 # imm = 0x1999999999999999 xorl %edx, %edx xorl %esi, %esi xorl %ecx, %ecx movsbq (%rdi,%rsi), %r9 leal -0x3a(%r9), %r10d cmpb $-0xa, %r10b jb 0x5234f cmpq %r8, %rcx ja 0x52343 leaq (%rcx,%rcx), %r10 leaq (%r10,%r10,4), %r10 movl $0x2f, %r11d subq %r9, %r11 cmpq %r11, %r10 ja 0x52343 leaq (%r10,%r9), %rcx addq $-0x30, %rcx leaq (%rdi,%rsi), %r9 incq %r9 incq %rsi cmpq %rax, %r9 jb 0x522f7 addq %rsi, %rdi xorl %edx, %edx jmp 0x52363 xorl %ecx, %ecx jmp 0x52357 movl $0x22, -0x24(%rbp) movl $0x22, %edx addq %rsi, %rdi testq %rsi, %rsi jne 0x52363 movl $0x22, -0x24(%rbp) movl $0x22, %edx movq %rdi, -0x30(%rbp) movq %rcx, %rsi shrq $0x20, %rsi movl %ecx, 0x14(%r14) jne 0x522ab testl %edx, %edx setne %dl cmpl $0x3c, %ecx setae %cl orb %dl, %cl jne 0x522ab movq $0x0, 0x18(%r14) xorl %r15d, %r15d cmpq %rax, %rdi je 0x522ab cmpb $0x2e, (%rdi) jne 0x522ab incq %rdi leaq -0x30(%rbp), %rdx movq %rdi, (%rdx) subq %rdi, %rax cmpq $0x6, %rax movl $0x6, %r12d cmovlq %rax, %r12 leaq -0x24(%rbp), %rcx movq %r12, %rsi callq 0x53200 movq %rax, %rcx shrq $0x20, %rcx je 0x523e3 movl %eax, %eax movq %rax, 0x18(%r14) jmp 0x522ab cmpl $0x0, -0x24(%rbp) movq %rax, 0x18(%r14) jne 0x522ab cmpq $0x5, %r12 ja 0x5240a leaq 0x598a2(%rip), %rcx # 0xabca0 movl (%rcx,%r12,4), %ecx imulq %rcx, %rax movq %rax, 0x18(%r14) addq -0x30(%rbp), %r12 movq (%rbx), %rax cmpq %rax, %r12 jae 0x5242d movb (%r12), %cl addb $-0x3a, %cl cmpb $-0xa, %cl jb 0x5242d incq %r12 cmpq %rax, %r12 jb 0x52416 movq %rax, %r12 movq %r12, -0x30(%rbp) jmp 0x522ab
parse_time: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 10h mov r14, rcx mov rbx, rdx mov [rbp+var_24], 0 lea rax, [rdi+rsi] test rsi, rsi jle short loc_521A4 mov r8, 1999999999999999h xor edx, edx xor esi, esi xor ecx, ecx loc_5215C: movsx r9, byte ptr [rdi+rsi] lea r10d, [r9-3Ah] cmp r10b, 0F6h jb short loc_521B4 cmp rcx, r8 ja short loc_521A8 lea r10, [rcx+rcx] lea r10, [r10+r10*4] mov r11d, 2Fh ; '/' sub r11, r9 cmp r10, r11 ja short loc_521A8 lea rcx, [r10+r9] add rcx, 0FFFFFFFFFFFFFFD0h lea r9, [rdi+rsi] inc r9 inc rsi cmp r9, rax jb short loc_5215C add rdi, rsi xor edx, edx jmp short loc_521CA loc_521A4: xor ecx, ecx jmp short loc_521BE loc_521A8: mov [rbp+var_24], 22h ; '"' mov edx, 22h ; '"' loc_521B4: test rsi, rsi jz short loc_521BE add rdi, rsi jmp short loc_521CA loc_521BE: mov [rbp+var_24], 22h ; '"' mov edx, 22h ; '"' loc_521CA: mov [rbp+var_30], rdi mov rsi, rcx shr rsi, 20h mov [r14+0Ch], ecx mov r15d, 1 jnz loc_522AB test edx, edx setnz dl cmp ecx, 347h setnb cl or cl, dl cmp rdi, rax setz dl or dl, cl jnz loc_522AB cmp byte ptr [rdi], 3Ah ; ':' jnz loc_522AB inc rdi mov [rbp+var_30], rdi mov rcx, rax sub rcx, rdi test rcx, rcx jle short loc_52276 mov r8, 1999999999999999h xor edx, edx xor esi, esi xor ecx, ecx loc_5222E: movsx r9, byte ptr [rdi+rsi] lea r10d, [r9-3Ah] cmp r10b, 0F6h jb short loc_52286 cmp rcx, r8 ja short loc_5227A lea r10, [rcx+rcx] lea r10, [r10+r10*4] mov r11d, 2Fh ; '/' sub r11, r9 cmp r10, r11 ja short loc_5227A lea rcx, [r10+r9] add rcx, 0FFFFFFFFFFFFFFD0h lea r9, [rdi+rsi] inc r9 inc rsi cmp r9, rax jb short loc_5222E add rdi, rsi xor edx, edx jmp short loc_5229A loc_52276: xor ecx, ecx jmp short loc_5228E loc_5227A: mov [rbp+var_24], 22h ; '"' mov edx, 22h ; '"' loc_52286: add rdi, rsi test rsi, rsi jnz short loc_5229A loc_5228E: mov [rbp+var_24], 22h ; '"' mov edx, 22h ; '"' loc_5229A: mov [rbp+var_30], rdi mov rsi, rcx shr rsi, 20h mov [r14+10h], ecx jz short loc_522C2 loc_522AB: mov rax, [rbp+var_30] mov [rbx], rax mov eax, r15d add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_522C2: cmp ecx, 3Bh ; ';' ja short loc_522AB test edx, edx jnz short loc_522AB cmp rdi, rax jz short loc_522AB cmp byte ptr [rdi], 3Ah ; ':' jnz short loc_522AB inc rdi mov [rbp+var_30], rdi mov rcx, rax sub rcx, rdi test rcx, rcx jle short loc_5233F mov r8, 1999999999999999h xor edx, edx xor esi, esi xor ecx, ecx loc_522F7: movsx r9, byte ptr [rdi+rsi] lea r10d, [r9-3Ah] cmp r10b, 0F6h jb short loc_5234F cmp rcx, r8 ja short loc_52343 lea r10, [rcx+rcx] lea r10, [r10+r10*4] mov r11d, 2Fh ; '/' sub r11, r9 cmp r10, r11 ja short loc_52343 lea rcx, [r10+r9] add rcx, 0FFFFFFFFFFFFFFD0h lea r9, [rdi+rsi] inc r9 inc rsi cmp r9, rax jb short loc_522F7 add rdi, rsi xor edx, edx jmp short loc_52363 loc_5233F: xor ecx, ecx jmp short loc_52357 loc_52343: mov [rbp+var_24], 22h ; '"' mov edx, 22h ; '"' loc_5234F: add rdi, rsi test rsi, rsi jnz short loc_52363 loc_52357: mov [rbp+var_24], 22h ; '"' mov edx, 22h ; '"' loc_52363: mov [rbp+var_30], rdi mov rsi, rcx shr rsi, 20h mov [r14+14h], ecx jnz loc_522AB test edx, edx setnz dl cmp ecx, 3Ch ; '<' setnb cl or cl, dl jnz loc_522AB mov qword ptr [r14+18h], 0 xor r15d, r15d cmp rdi, rax jz loc_522AB cmp byte ptr [rdi], 2Eh ; '.' jnz loc_522AB inc rdi lea rdx, [rbp+var_30] mov [rdx], rdi sub rax, rdi cmp rax, 6 mov r12d, 6 cmovl r12, rax lea rcx, [rbp+var_24] mov rsi, r12 call my_strtoull mov rcx, rax shr rcx, 20h jz short loc_523E3 mov eax, eax mov [r14+18h], rax jmp loc_522AB loc_523E3: cmp [rbp+var_24], 0 mov [r14+18h], rax jnz loc_522AB cmp r12, 5 ja short loc_5240A lea rcx, frac_mul mov ecx, [rcx+r12*4] imul rax, rcx mov [r14+18h], rax loc_5240A: add r12, [rbp+var_30] mov rax, [rbx] cmp r12, rax jnb short loc_5242D loc_52416: mov cl, [r12] add cl, 0C6h cmp cl, 0F6h jb short loc_5242D inc r12 cmp r12, rax jb short loc_52416 mov r12, rax loc_5242D: mov [rbp+var_30], r12 jmp loc_522AB
long long parse_time(_BYTE *a1, long long a2, _BYTE **a3, long long a4, long long a5) { _BYTE *v7; // rax int v8; // edx long long v9; // rsi unsigned long long v10; // rcx long long v11; // r9 unsigned long long v12; // r9 unsigned int v13; // r15d _BYTE *v14; // rdi int v15; // edx long long v16; // rsi unsigned long long v17; // rcx long long v18; // r9 unsigned long long v19; // r9 _BYTE *v21; // rdi int v22; // edx long long v23; // rsi unsigned long long v24; // rcx long long v25; // r9 unsigned long long v26; // r9 _BYTE *v27; // rdi long long v28; // rax unsigned long long v29; // r12 unsigned long long v30; // rax bool v31; // zf _BYTE *v32; // r12 _BYTE *v33; // [rsp+0h] [rbp-30h] BYREF int v34[9]; // [rsp+Ch] [rbp-24h] BYREF v34[0] = 0; v7 = &a1[a2]; if ( a2 <= 0 ) { v10 = 0LL; LABEL_12: v34[0] = 34; v8 = 34; goto LABEL_13; } a5 = 0x1999999999999999LL; v8 = 0; v9 = 0LL; v10 = 0LL; while ( 1 ) { v11 = (char)a1[v9]; if ( (unsigned __int8)(v11 - 58) < 0xF6u ) break; if ( v10 > 0x1999999999999999LL || 10 * v10 > 47 - v11 ) { v34[0] = 34; v8 = 34; break; } v10 = 10 * v10 + v11 - 48; v12 = (unsigned long long)&a1[++v9]; if ( v12 >= (unsigned long long)v7 ) { a1 += v9; v8 = 0; goto LABEL_13; } } if ( !v9 ) goto LABEL_12; a1 += v9; LABEL_13: v33 = a1; *(_DWORD *)(a4 + 12) = v10; v13 = 1; if ( HIDWORD(v10) || v8 != 0 || (unsigned int)v10 >= 0x347 || a1 == v7 || *a1 != 58 ) goto LABEL_28; v14 = a1 + 1; v33 = v14; if ( v7 - v14 <= 0 ) { v17 = 0LL; LABEL_26: v34[0] = 34; v15 = 34; goto LABEL_27; } a5 = 0x1999999999999999LL; v15 = 0; v16 = 0LL; v17 = 0LL; while ( 1 ) { v18 = (char)v14[v16]; if ( (unsigned __int8)(v18 - 58) < 0xF6u ) break; if ( v17 > 0x1999999999999999LL || 10 * v17 > 47 - v18 ) { v34[0] = 34; v15 = 34; break; } v17 = 10 * v17 + v18 - 48; v19 = (unsigned long long)&v14[++v16]; if ( v19 >= (unsigned long long)v7 ) { v14 += v16; v15 = 0; goto LABEL_27; } } v14 += v16; if ( !v16 ) goto LABEL_26; LABEL_27: v33 = v14; *(_DWORD *)(a4 + 16) = v17; if ( HIDWORD(v17) || (unsigned int)v17 > 0x3B || v15 || v14 == v7 || *v14 != 58 ) goto LABEL_28; v21 = v14 + 1; v33 = v21; if ( v7 - v21 <= 0 ) { v24 = 0LL; } else { a5 = 0x1999999999999999LL; v22 = 0; v23 = 0LL; v24 = 0LL; while ( 1 ) { v25 = (char)v21[v23]; if ( (unsigned __int8)(v25 - 58) < 0xF6u ) break; if ( v24 > 0x1999999999999999LL || 10 * v24 > 47 - v25 ) { v34[0] = 34; v22 = 34; break; } v24 = 10 * v24 + v25 - 48; v26 = (unsigned long long)&v21[++v23]; if ( v26 >= (unsigned long long)v7 ) { v21 += v23; v22 = 0; goto LABEL_44; } } v21 += v23; if ( v23 ) goto LABEL_44; } v34[0] = 34; v22 = 34; LABEL_44: v33 = v21; *(_DWORD *)(a4 + 20) = v24; if ( !HIDWORD(v24) && v22 == 0 && (unsigned int)v24 < 0x3C ) { *(_QWORD *)(a4 + 24) = 0LL; v13 = 0; if ( v21 != v7 && *v21 == 46 ) { v27 = v21 + 1; v33 = v27; v28 = v7 - v27; v29 = 6LL; if ( v28 < 6 ) v29 = v28; v30 = my_strtoull(v27, v29, &v33, v34, a5); if ( HIDWORD(v30) ) { *(_QWORD *)(a4 + 24) = (unsigned int)v30; } else { v31 = v34[0] == 0; *(_QWORD *)(a4 + 24) = v30; if ( v31 ) { if ( v29 <= 5 ) *(_QWORD *)(a4 + 24) = frac_mul[v29] * v30; v32 = &v33[v29]; if ( v32 < *a3 ) { while ( (unsigned __int8)(*v32 - 58) >= 0xF6u ) { if ( ++v32 >= *a3 ) { v32 = *a3; break; } } } v33 = v32; } } } } LABEL_28: *a3 = v33; return v13; }
parse_time: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R14,RCX MOV RBX,RDX MOV dword ptr [RBP + -0x24],0x0 LEA RAX,[RDI + RSI*0x1] TEST RSI,RSI JLE 0x001521a4 MOV R8,0x1999999999999999 XOR EDX,EDX XOR ESI,ESI XOR ECX,ECX LAB_0015215c: MOVSX R9,byte ptr [RDI + RSI*0x1] LEA R10D,[R9 + -0x3a] CMP R10B,0xf6 JC 0x001521b4 CMP RCX,R8 JA 0x001521a8 LEA R10,[RCX + RCX*0x1] LEA R10,[R10 + R10*0x4] MOV R11D,0x2f SUB R11,R9 CMP R10,R11 JA 0x001521a8 LEA RCX,[R10 + R9*0x1] ADD RCX,-0x30 LEA R9,[RDI + RSI*0x1] INC R9 INC RSI CMP R9,RAX JC 0x0015215c ADD RDI,RSI XOR EDX,EDX JMP 0x001521ca LAB_001521a4: XOR ECX,ECX JMP 0x001521be LAB_001521a8: MOV dword ptr [RBP + -0x24],0x22 MOV EDX,0x22 LAB_001521b4: TEST RSI,RSI JZ 0x001521be ADD RDI,RSI JMP 0x001521ca LAB_001521be: MOV dword ptr [RBP + -0x24],0x22 MOV EDX,0x22 LAB_001521ca: MOV qword ptr [RBP + -0x30],RDI MOV RSI,RCX SHR RSI,0x20 MOV dword ptr [R14 + 0xc],ECX MOV R15D,0x1 JNZ 0x001522ab TEST EDX,EDX SETNZ DL CMP ECX,0x347 SETNC CL OR CL,DL CMP RDI,RAX SETZ DL OR DL,CL JNZ 0x001522ab CMP byte ptr [RDI],0x3a JNZ 0x001522ab INC RDI MOV qword ptr [RBP + -0x30],RDI MOV RCX,RAX SUB RCX,RDI TEST RCX,RCX JLE 0x00152276 MOV R8,0x1999999999999999 XOR EDX,EDX XOR ESI,ESI XOR ECX,ECX LAB_0015222e: MOVSX R9,byte ptr [RDI + RSI*0x1] LEA R10D,[R9 + -0x3a] CMP R10B,0xf6 JC 0x00152286 CMP RCX,R8 JA 0x0015227a LEA R10,[RCX + RCX*0x1] LEA R10,[R10 + R10*0x4] MOV R11D,0x2f SUB R11,R9 CMP R10,R11 JA 0x0015227a LEA RCX,[R10 + R9*0x1] ADD RCX,-0x30 LEA R9,[RDI + RSI*0x1] INC R9 INC RSI CMP R9,RAX JC 0x0015222e ADD RDI,RSI XOR EDX,EDX JMP 0x0015229a LAB_00152276: XOR ECX,ECX JMP 0x0015228e LAB_0015227a: MOV dword ptr [RBP + -0x24],0x22 MOV EDX,0x22 LAB_00152286: ADD RDI,RSI TEST RSI,RSI JNZ 0x0015229a LAB_0015228e: MOV dword ptr [RBP + -0x24],0x22 MOV EDX,0x22 LAB_0015229a: MOV qword ptr [RBP + -0x30],RDI MOV RSI,RCX SHR RSI,0x20 MOV dword ptr [R14 + 0x10],ECX JZ 0x001522c2 LAB_001522ab: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBX],RAX MOV EAX,R15D ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001522c2: CMP ECX,0x3b JA 0x001522ab TEST EDX,EDX JNZ 0x001522ab CMP RDI,RAX JZ 0x001522ab CMP byte ptr [RDI],0x3a JNZ 0x001522ab INC RDI MOV qword ptr [RBP + -0x30],RDI MOV RCX,RAX SUB RCX,RDI TEST RCX,RCX JLE 0x0015233f MOV R8,0x1999999999999999 XOR EDX,EDX XOR ESI,ESI XOR ECX,ECX LAB_001522f7: MOVSX R9,byte ptr [RDI + RSI*0x1] LEA R10D,[R9 + -0x3a] CMP R10B,0xf6 JC 0x0015234f CMP RCX,R8 JA 0x00152343 LEA R10,[RCX + RCX*0x1] LEA R10,[R10 + R10*0x4] MOV R11D,0x2f SUB R11,R9 CMP R10,R11 JA 0x00152343 LEA RCX,[R10 + R9*0x1] ADD RCX,-0x30 LEA R9,[RDI + RSI*0x1] INC R9 INC RSI CMP R9,RAX JC 0x001522f7 ADD RDI,RSI XOR EDX,EDX JMP 0x00152363 LAB_0015233f: XOR ECX,ECX JMP 0x00152357 LAB_00152343: MOV dword ptr [RBP + -0x24],0x22 MOV EDX,0x22 LAB_0015234f: ADD RDI,RSI TEST RSI,RSI JNZ 0x00152363 LAB_00152357: MOV dword ptr [RBP + -0x24],0x22 MOV EDX,0x22 LAB_00152363: MOV qword ptr [RBP + -0x30],RDI MOV RSI,RCX SHR RSI,0x20 MOV dword ptr [R14 + 0x14],ECX JNZ 0x001522ab TEST EDX,EDX SETNZ DL CMP ECX,0x3c SETNC CL OR CL,DL JNZ 0x001522ab MOV qword ptr [R14 + 0x18],0x0 XOR R15D,R15D CMP RDI,RAX JZ 0x001522ab CMP byte ptr [RDI],0x2e JNZ 0x001522ab INC RDI LEA RDX,[RBP + -0x30] MOV qword ptr [RDX],RDI SUB RAX,RDI CMP RAX,0x6 MOV R12D,0x6 CMOVL R12,RAX LEA RCX,[RBP + -0x24] MOV RSI,R12 CALL 0x00153200 MOV RCX,RAX SHR RCX,0x20 JZ 0x001523e3 MOV EAX,EAX MOV qword ptr [R14 + 0x18],RAX JMP 0x001522ab LAB_001523e3: CMP dword ptr [RBP + -0x24],0x0 MOV qword ptr [R14 + 0x18],RAX JNZ 0x001522ab CMP R12,0x5 JA 0x0015240a LEA RCX,[0x1abca0] MOV ECX,dword ptr [RCX + R12*0x4] IMUL RAX,RCX MOV qword ptr [R14 + 0x18],RAX LAB_0015240a: ADD R12,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBX] CMP R12,RAX JNC 0x0015242d LAB_00152416: MOV CL,byte ptr [R12] ADD CL,0xc6 CMP CL,0xf6 JC 0x0015242d INC R12 CMP R12,RAX JC 0x00152416 MOV R12,RAX LAB_0015242d: MOV qword ptr [RBP + -0x30],R12 JMP 0x001522ab
int8 parse_time(char *param_1,long param_2,ulong *param_3,long param_4) { char cVar1; long lVar2; ulong uVar3; ulong uVar4; int iVar5; long lVar6; char *pcVar7; int8 uVar8; int8 uVar9; char *local_38; int local_2c; local_2c = 0; pcVar7 = param_1 + param_2; if (param_2 < 1) { uVar4 = 0; LAB_001521be: local_2c = 0x22; iVar5 = 0x22; } else { iVar5 = 0; lVar6 = 0; uVar4 = 0; do { cVar1 = param_1[lVar6]; if ((byte)(cVar1 - 0x3aU) < 0xf6) { LAB_001521b4: if (lVar6 == 0) goto LAB_001521be; param_1 = param_1 + lVar6; goto LAB_001521ca; } if ((0x1999999999999999 < uVar4) || (0x2fU - (long)cVar1 < uVar4 * 10)) { local_2c = 0x22; iVar5 = 0x22; goto LAB_001521b4; } uVar4 = (uVar4 * 10 + (long)cVar1) - 0x30; lVar2 = lVar6 + 1; lVar6 = lVar6 + 1; } while (param_1 + lVar2 < pcVar7); param_1 = param_1 + lVar6; iVar5 = 0; } LAB_001521ca: *(uint *)(param_4 + 0xc) = (uint)uVar4; uVar8 = 1; local_38 = param_1; if (((uVar4 >> 0x20 == 0) && (local_38 = param_1, param_1 != pcVar7 && ((uint)uVar4 < 0x347 && iVar5 == 0))) && (local_38 = param_1, *param_1 == ':')) { local_38 = param_1 + 1; if (pcVar7 == local_38 || (long)pcVar7 - (long)local_38 < 0) { uVar4 = 0; LAB_0015228e: local_2c = 0x22; iVar5 = 0x22; } else { iVar5 = 0; lVar6 = 0; uVar4 = 0; do { cVar1 = local_38[lVar6]; if ((byte)(cVar1 - 0x3aU) < 0xf6) { LAB_00152286: local_38 = local_38 + lVar6; if (lVar6 == 0) goto LAB_0015228e; goto LAB_0015229a; } if ((0x1999999999999999 < uVar4) || (0x2fU - (long)cVar1 < uVar4 * 10)) { local_2c = 0x22; iVar5 = 0x22; goto LAB_00152286; } uVar4 = (uVar4 * 10 + (long)cVar1) - 0x30; lVar2 = lVar6 + 1; lVar6 = lVar6 + 1; } while (local_38 + lVar2 < pcVar7); local_38 = local_38 + lVar6; iVar5 = 0; } LAB_0015229a: *(uint *)(param_4 + 0x10) = (uint)uVar4; if (((uVar4 >> 0x20 == 0) && ((uint)uVar4 < 0x3c)) && ((iVar5 == 0 && ((local_38 != pcVar7 && (*local_38 == ':')))))) { local_38 = local_38 + 1; if (pcVar7 == local_38 || (long)pcVar7 - (long)local_38 < 0) { uVar4 = 0; LAB_00152357: local_2c = 0x22; iVar5 = 0x22; } else { iVar5 = 0; lVar6 = 0; uVar4 = 0; do { cVar1 = local_38[lVar6]; if ((byte)(cVar1 - 0x3aU) < 0xf6) { LAB_0015234f: local_38 = local_38 + lVar6; if (lVar6 == 0) goto LAB_00152357; goto LAB_00152363; } if ((0x1999999999999999 < uVar4) || (0x2fU - (long)cVar1 < uVar4 * 10)) { local_2c = 0x22; iVar5 = 0x22; goto LAB_0015234f; } uVar4 = (uVar4 * 10 + (long)cVar1) - 0x30; lVar2 = lVar6 + 1; lVar6 = lVar6 + 1; } while (local_38 + lVar2 < pcVar7); local_38 = local_38 + lVar6; iVar5 = 0; } LAB_00152363: *(uint *)(param_4 + 0x14) = (uint)uVar4; if ((uVar4 >> 0x20 == 0) && ((uint)uVar4 < 0x3c && iVar5 == 0)) { *(int8 *)(param_4 + 0x18) = 0; uVar8 = 0; uVar9 = 0; if ((local_38 != pcVar7) && (*local_38 == '.')) { local_38 = local_38 + 1; uVar4 = 6; if ((long)pcVar7 - (long)local_38 < 6) { uVar4 = (long)pcVar7 - (long)local_38; } uVar3 = my_strtoull(local_38,uVar4,&local_38,&local_2c); if (uVar3 >> 0x20 == 0) { *(ulong *)(param_4 + 0x18) = uVar3; uVar8 = uVar9; if (local_2c == 0) { if (uVar4 < 6) { *(ulong *)(param_4 + 0x18) = uVar3 * *(uint *)(frac_mul + uVar4 * 4); } pcVar7 = local_38 + uVar4; local_38 = pcVar7; for (; (pcVar7 < (char *)*param_3 && (local_38 = pcVar7, 0xf5 < (byte)(*pcVar7 - 0x3aU))); pcVar7 = pcVar7 + 1) { local_38 = (char *)*param_3; } } } else { *(ulong *)(param_4 + 0x18) = uVar3 & 0xffffffff; } } } } } *param_3 = (ulong)local_38; return uVar8; }
11,690
my_thread_destroy_common_mutex
eloqsql/mysys/my_thr_init.c
void my_thread_destroy_common_mutex(void) { mysql_mutex_destroy(&THR_LOCK_open); mysql_mutex_destroy(&THR_LOCK_lock); mysql_mutex_destroy(&THR_LOCK_myisam); mysql_mutex_destroy(&THR_LOCK_myisam_mmap); mysql_mutex_destroy(&THR_LOCK_heap); mysql_mutex_destroy(&THR_LOCK_net); mysql_mutex_destroy(&THR_LOCK_charset); #if !defined(HAVE_LOCALTIME_R) || !defined(HAVE_GMTIME_R) mysql_mutex_destroy(&LOCK_localtime_r); #endif }
O0
c
my_thread_destroy_common_mutex: pushq %rbp movq %rsp, %rbp leaq 0x35f4bd(%rip), %rdi # 0x385968 callq 0x26500 leaq 0x35f4f9(%rip), %rdi # 0x3859b0 callq 0x26500 leaq 0x35f535(%rip), %rdi # 0x3859f8 callq 0x26500 leaq 0x35f571(%rip), %rdi # 0x385a40 callq 0x26500 leaq 0x35f5ad(%rip), %rdi # 0x385a88 callq 0x26500 leaq 0x35f5e9(%rip), %rdi # 0x385ad0 callq 0x26500 leaq 0x35f625(%rip), %rdi # 0x385b18 callq 0x26500 popq %rbp retq nopw (%rax,%rax)
my_thread_destroy_common_mutex: push rbp mov rbp, rsp lea rdi, THR_LOCK_open call inline_mysql_mutex_destroy lea rdi, THR_LOCK_lock call inline_mysql_mutex_destroy lea rdi, THR_LOCK_myisam call inline_mysql_mutex_destroy lea rdi, THR_LOCK_myisam_mmap call inline_mysql_mutex_destroy lea rdi, THR_LOCK_heap call inline_mysql_mutex_destroy lea rdi, THR_LOCK_net call inline_mysql_mutex_destroy lea rdi, THR_LOCK_charset call inline_mysql_mutex_destroy pop rbp retn
long long my_thread_destroy_common_mutex() { inline_mysql_mutex_destroy(&THR_LOCK_open); inline_mysql_mutex_destroy(&THR_LOCK_lock); inline_mysql_mutex_destroy(&THR_LOCK_myisam); inline_mysql_mutex_destroy(&THR_LOCK_myisam_mmap); inline_mysql_mutex_destroy(&THR_LOCK_heap); inline_mysql_mutex_destroy(&THR_LOCK_net); return inline_mysql_mutex_destroy(&THR_LOCK_charset); }
my_thread_destroy_common_mutex: PUSH RBP MOV RBP,RSP LEA RDI,[0x485968] CALL 0x00126500 LEA RDI,[0x4859b0] CALL 0x00126500 LEA RDI,[0x4859f8] CALL 0x00126500 LEA RDI,[0x485a40] CALL 0x00126500 LEA RDI,[0x485a88] CALL 0x00126500 LEA RDI,[0x485ad0] CALL 0x00126500 LEA RDI,[0x485b18] CALL 0x00126500 POP RBP RET
void my_thread_destroy_common_mutex(void) { inline_mysql_mutex_destroy(THR_LOCK_open); inline_mysql_mutex_destroy(THR_LOCK_lock); inline_mysql_mutex_destroy(THR_LOCK_myisam); inline_mysql_mutex_destroy(THR_LOCK_myisam_mmap); inline_mysql_mutex_destroy(THR_LOCK_heap); inline_mysql_mutex_destroy(THR_LOCK_net); inline_mysql_mutex_destroy(THR_LOCK_charset); return; }
11,691
my_strxfrm_pad_nweights_unicode
eloqsql/strings/ctype-utf8.c
size_t my_strxfrm_pad_nweights_unicode(uchar *str, uchar *strend, size_t nweights) { uchar *str0; DBUG_ASSERT(str && str <= strend); for (str0= str; str < strend && nweights; nweights--) { *str++= 0x00; if (str < strend) *str++= 0x20; } return str - str0; }
O3
c
my_strxfrm_pad_nweights_unicode: cmpq %rsi, %rdi setae %al testq %rdx, %rdx sete %cl orb %al, %cl movq %rdi, %rax jne 0x6e465 pushq %rbp movq %rsp, %rbp decq %rdx movq %rdi, %rcx leaq 0x1(%rcx), %rax movb $0x0, (%rcx) cmpq %rsi, %rax jae 0x6e44f movb $0x20, 0x1(%rcx) addq $0x2, %rcx movq %rcx, %rax addq $-0x1, %rdx setb %r8b cmpq %rsi, %rax jae 0x6e464 movq %rax, %rcx testb %r8b, %r8b jne 0x6e438 popq %rbp subq %rdi, %rax retq
my_strxfrm_pad_nweights_unicode: cmp rdi, rsi setnb al test rdx, rdx setz cl or cl, al mov rax, rdi jnz short loc_6E465 push rbp mov rbp, rsp dec rdx mov rcx, rdi loc_6E438: lea rax, [rcx+1] mov byte ptr [rcx], 0 cmp rax, rsi jnb short loc_6E44F mov byte ptr [rcx+1], 20h ; ' ' add rcx, 2 mov rax, rcx loc_6E44F: add rdx, 0FFFFFFFFFFFFFFFFh setb r8b cmp rax, rsi jnb short loc_6E464 mov rcx, rax test r8b, r8b jnz short loc_6E438 loc_6E464: pop rbp loc_6E465: sub rax, rdi retn
long long my_strxfrm_pad_nweights_unicode(_BYTE *a1, unsigned long long a2, long long a3) { _BYTE *v3; // rax long long v4; // rdx _BYTE *v5; // rcx bool v6; // cf v3 = a1; if ( (unsigned long long)a1 < a2 && a3 != 0 ) { v4 = a3 - 1; v5 = a1; do { v3 = v5 + 1; *v5 = 0; if ( (unsigned long long)(v5 + 1) < a2 ) { v5[1] = 32; v3 = v5 + 2; } v6 = v4-- != 0; if ( (unsigned long long)v3 >= a2 ) break; v5 = v3; } while ( v6 ); } return v3 - a1; }
my_strxfrm_pad_nweights_unicode: CMP RDI,RSI SETNC AL TEST RDX,RDX SETZ CL OR CL,AL MOV RAX,RDI JNZ 0x0016e465 PUSH RBP MOV RBP,RSP DEC RDX MOV RCX,RDI LAB_0016e438: LEA RAX,[RCX + 0x1] MOV byte ptr [RCX],0x0 CMP RAX,RSI JNC 0x0016e44f MOV byte ptr [RCX + 0x1],0x20 ADD RCX,0x2 MOV RAX,RCX LAB_0016e44f: ADD RDX,-0x1 SETC R8B CMP RAX,RSI JNC 0x0016e464 MOV RCX,RAX TEST R8B,R8B JNZ 0x0016e438 LAB_0016e464: POP RBP LAB_0016e465: SUB RAX,RDI RET
long my_strxfrm_pad_nweights_unicode(int1 *param_1,int1 *param_2,long param_3) { int1 *puVar1; int1 *puVar2; bool bVar3; puVar2 = param_1; if (param_3 != 0 && param_1 < param_2) { param_3 = param_3 + -1; puVar1 = param_1; do { puVar2 = puVar1 + 1; *puVar1 = 0; if (puVar2 < param_2) { puVar1[1] = 0x20; puVar2 = puVar1 + 2; } bVar3 = param_3 != 0; param_3 = param_3 + -1; } while ((puVar2 < param_2) && (puVar1 = puVar2, bVar3)); } return (long)puVar2 - (long)param_1; }
11,692
minja::Value::operator-() const
monkey531[P]llama/common/minja.hpp
Value operator-() const { if (is_number_integer()) return -get<int64_t>(); else return -get<double>(); }
O3
cpp
minja::Value::operator-() const: pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movb 0x40(%rsi), %al addb $-0x5, %al leaq 0x40(%rdi), %r14 movq %rsi, %rdi cmpb $0x1, %al ja 0xaa224 callq 0xaa3e6 negq %rax xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movups %xmm0, 0x10(%rbx) movups %xmm0, 0x20(%rbx) movups %xmm0, 0x30(%rbx) movups %xmm0, 0x40(%rbx) movq %r14, %rdi movq %rax, %rsi callq 0x9132c jmp 0xaa24e callq 0xaa530 xorps 0x69cb0(%rip), %xmm0 # 0x113ee0 xorps %xmm1, %xmm1 movups %xmm1, (%rbx) movups %xmm1, 0x10(%rbx) movups %xmm1, 0x20(%rbx) movups %xmm1, 0x30(%rbx) movups %xmm1, 0x40(%rbx) movq %r14, %rdi callq 0x908f4 movq %r14, %rdi movl $0x1, %esi callq 0x89876 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_ZNK5minja5ValuengEv: push r14 push rbx push rax mov rbx, rdi mov al, [rsi+40h] add al, 0FBh lea r14, [rdi+40h] mov rdi, rsi cmp al, 1 ja short loc_AA224 call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void) neg rax xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 movups xmmword ptr [rbx+10h], xmm0 movups xmmword ptr [rbx+20h], xmm0 movups xmmword ptr [rbx+30h], xmm0 movups xmmword ptr [rbx+40h], xmm0 mov rdi, r14 mov rsi, rax call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE5EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_16number_integer_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<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> &,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>::number_integer_t) jmp short loc_AA24E loc_AA224: call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) xorps xmm0, cs:xmmword_113EE0 xorps xmm1, xmm1 movups xmmword ptr [rbx], xmm1 movups xmmword ptr [rbx+10h], xmm1 movups xmmword ptr [rbx+20h], xmm1 movups xmmword ptr [rbx+30h], xmm1 movups xmmword ptr [rbx+40h], xmm1 mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE7EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_14number_float_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<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> &,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>::number_float_t) loc_AA24E: mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rax, rbx add rsp, 8 pop rbx pop r14 retn
_OWORD * minja::Value::operator-(_OWORD *a1, long long a2) { unsigned __int8 *v2; // r14 long long v3; // rax double v4; // xmm0_8 v2 = (unsigned __int8 *)(a1 + 4); if ( (unsigned __int8)(*(_BYTE *)(a2 + 64) - 5) > 1u ) { v4 = minja::Value::get<double>(a2); *a1 = 0LL; a1[1] = 0LL; a1[2] = 0LL; a1[3] = 0LL; a1[4] = 0LL; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::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>>( v2, -v4); } else { v3 = minja::Value::get<long>(a2); *a1 = 0LL; a1[1] = 0LL; a1[2] = 0LL; a1[3] = 0LL; a1[4] = 0LL; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::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>>( v2, -v3); } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v2); return a1; }
operator-: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV AL,byte ptr [RSI + 0x40] ADD AL,0xfb LEA R14,[RDI + 0x40] MOV RDI,RSI CMP AL,0x1 JA 0x001aa224 CALL 0x001aa3e6 NEG RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOVUPS xmmword ptr [RBX + 0x10],XMM0 MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOVUPS xmmword ptr [RBX + 0x40],XMM0 MOV RDI,R14 MOV RSI,RAX CALL 0x0019132c JMP 0x001aa24e LAB_001aa224: CALL 0x001aa530 XORPS XMM0,xmmword ptr [0x00213ee0] XORPS XMM1,XMM1 MOVUPS xmmword ptr [RBX],XMM1 MOVUPS xmmword ptr [RBX + 0x10],XMM1 MOVUPS xmmword ptr [RBX + 0x20],XMM1 MOVUPS xmmword ptr [RBX + 0x30],XMM1 MOVUPS xmmword ptr [RBX + 0x40],XMM1 MOV RDI,R14 CALL 0x001908f4 LAB_001aa24e: MOV RDI,R14 MOV ESI,0x1 CALL 0x00189876 MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* minja::Value::TEMPNAMEPLACEHOLDERVALUE() const */ Value * __thiscall minja::Value::operator-(Value *this) { Value *pVVar1; double dVar2; long lVar3; Value *in_RSI; uint uVar4; pVVar1 = this + 0x40; if ((byte)((char)in_RSI[0x40] - 5U) < 2) { lVar3 = get<long>(in_RSI); *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; nlohmann::json_abi_v3_11_3::detail:: external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>:: 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>> (pVVar1,-lVar3); } else { dVar2 = get<double>(in_RSI); uVar4 = SUB84(dVar2,0) ^ _DAT_00213ee0; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; nlohmann::json_abi_v3_11_3::detail:: external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>:: 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>> (uVar4,pVVar1); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(pVVar1,0)); return this; }
11,693
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 (&) [5], 0>(char const (&) [5])
llama.cpp/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 (&) [5], 0>(char const (&) [5]): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0xb5dab movq %rsi, %r15 movq 0x8(%r14), %r12 movq (%r12), %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx je 0xb5d95 movq %rbx, %rdi movq %r15, %rsi callq 0x20f60 testl %eax, %eax je 0xb5d8a addq $0x30, %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx jne 0xb5d6b jmp 0xb5d8d movq %rbx, %rax movq 0x8(%r14), %rcx movq 0x8(%rcx), %rbx cmpq %rbx, %rax je 0xb5e09 addq $0x20, %rax addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x20650 movq %rax, %rbx movq %r14, %rdi callq 0x8a292 movq %rsp, %rdx movq %rax, (%rdx) leaq 0x657fb(%rip), %rsi # 0x11b5c8 leaq 0x20(%rsp), %rdi callq 0x7f80f movb $0x1, %bpl leaq 0x20(%rsp), %rdx movq %rbx, %rdi movl $0x130, %esi # imm = 0x130 movq %r14, %rcx callq 0x8a0ba xorl %ebp, %ebp leaq 0xab248(%rip), %rsi # 0x161040 leaq -0x3fc9d(%rip), %rdx # 0x76162 movq %rbx, %rdi callq 0x20a60 jmp 0xb5e82 movl $0x20, %edi callq 0x20650 movq %rax, %rbx leaq 0x10(%rsp), %r12 movq %r12, -0x10(%r12) movq %r15, %rdi callq 0x20680 leaq (%rax,%r15), %rdx movq %rsp, %rdi movq %r15, %rsi callq 0x287ce leaq 0x657a0(%rip), %rsi # 0x11b5de leaq 0x6579f(%rip), %rcx # 0x11b5e4 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x7f897 movb $0x1, %bpl leaq 0x20(%rsp), %rdx movq %rbx, %rdi movl $0x193, %esi # imm = 0x193 movq %r14, %rcx callq 0x8881e xorl %ebp, %ebp leaq 0xab14d(%rip), %rsi # 0x160fc0 leaq -0x3fd18(%rip), %rdx # 0x76162 movq %rbx, %rdi callq 0x20a60 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb5ea0 movq 0x30(%rsp), %rsi incq %rsi callq 0x20180 movq (%rsp), %rdi cmpq %r12, %rdi je 0xb5eeb movq 0x10(%rsp), %rsi jmp 0xb5ee3 movq %rax, %r14 movq (%rsp), %rdi cmpq %r12, %rdi je 0xb5ef5 movq 0x10(%rsp), %rsi incq %rsi callq 0x20180 jmp 0xb5ef5 jmp 0xb5ef2 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb5eeb movq 0x30(%rsp), %rsi incq %rsi callq 0x20180 testb %bpl, %bpl jne 0xb5ef5 jmp 0xb5efd movq %rax, %r14 movq %rbx, %rdi callq 0x20f00 movq %r14, %rdi callq 0x20b00 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_: push rbp; void * push r15; int push r14; __int64 push r12; int push rbx; void * sub rsp, 40h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_B5DAB mov r15, rsi mov r12, [r14+8] mov rbx, [r12] mov rax, [r12+8] cmp rbx, rax jz short loc_B5D95 loc_B5D6B: mov rdi, rbx mov rsi, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_B5D8A add rbx, 30h ; '0' mov rax, [r12+8] cmp rbx, rax jnz short loc_B5D6B jmp short loc_B5D8D loc_B5D8A: mov rax, rbx loc_B5D8D: mov rcx, [r14+8] mov rbx, [rcx+8] loc_B5D95: cmp rax, rbx jz short loc_B5E09 add rax, 20h ; ' ' add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_B5DAB: 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_B5E82 loc_B5E09: 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_B5E82: mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B5EA0 mov rsi, [rsp+68h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B5EA0: mov rdi, [rsp+68h+var_68] cmp rdi, r12 jz short loc_B5EEB mov rsi, [rsp+68h+var_58] jmp short loc_B5EE3 mov r14, rax mov rdi, [rsp+68h+var_68]; void * cmp rdi, r12 jz short loc_B5EF5 mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_B5EF5 jmp short loc_B5EF2 mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B5EEB mov rsi, [rsp+68h+var_38] loc_B5EE3: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B5EEB: test bpl, bpl jnz short loc_B5EF5 jmp short loc_B5EFD loc_B5EF2: mov r14, rax loc_B5EF5: mov rdi, rbx; void * call ___cxa_free_exception loc_B5EFD: mov rdi, r14 call __Unwind_Resume
long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_( long long a1, const char *a2) { long long *v2; // r12 long long v3; // rbx long long v4; // rax nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx long long v8; // rax void *v9[2]; // [rsp+0h] [rbp-68h] BYREF long long v10; // [rsp+10h] [rbp-58h] BYREF _QWORD v11[2]; // [rsp+20h] [rbp-48h] BYREF if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v9[0] = (void *)nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>( (long long)v11, (long long)"cannot use at() with ", v9); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 304, v11); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v2 = *(long long **)(a1 + 8); v3 = *v2; v4 = v2[1]; if ( *v2 != v4 ) { while ( (unsigned int)std::string::compare(v3, a2) ) { v3 += 48LL; v4 = v2[1]; if ( v3 == v4 ) goto LABEL_7; } v4 = v3; LABEL_7: v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL); } if ( v4 == v3 ) { v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v9[0] = &v10; v8 = strlen(a2); std::string::_M_construct<char const*>((long long)v9, a2, (long long)&a2[v8]); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( (long long)v11, (long long)"key '", v9, (long long)"' not found"); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v7, 403, v11); __cxa_throw( v7, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return v4 + 32; }
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_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 0x001b5dab MOV R15,RSI MOV R12,qword ptr [R14 + 0x8] MOV RBX,qword ptr [R12] MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JZ 0x001b5d95 LAB_001b5d6b: MOV RDI,RBX MOV RSI,R15 CALL 0x00120f60 TEST EAX,EAX JZ 0x001b5d8a ADD RBX,0x30 MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JNZ 0x001b5d6b JMP 0x001b5d8d LAB_001b5d8a: MOV RAX,RBX LAB_001b5d8d: MOV RCX,qword ptr [R14 + 0x8] MOV RBX,qword ptr [RCX + 0x8] LAB_001b5d95: CMP RAX,RBX JZ 0x001b5e09 ADD RAX,0x20 ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001b5dab: MOV EDI,0x20 CALL 0x00120650 MOV RBX,RAX MOV RDI,R14 CALL 0x0018a292 MOV RDX,RSP MOV qword ptr [RDX],RAX LAB_001b5dc6: LEA RSI,[0x21b5c8] LEA RDI,[RSP + 0x20] CALL 0x0017f80f MOV BPL,0x1 LAB_001b5dda: LEA RDX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x130 MOV RCX,R14 CALL 0x0018a0ba XOR EBP,EBP LEA RSI,[0x261040] LEA RDX,[0x176162] MOV RDI,RBX CALL 0x00120a60 LAB_001b5e09: MOV EDI,0x20 CALL 0x00120650 MOV RBX,RAX LEA R12,[RSP + 0x10] MOV qword ptr [R12 + -0x10],R12 MOV RDI,R15 CALL 0x00120680 LEA RDX,[RAX + R15*0x1] LAB_001b5e2c: MOV RDI,RSP MOV RSI,R15 CALL 0x001287ce LAB_001b5e37: LEA RSI,[0x21b5de] LEA RCX,[0x21b5e4] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x0017f897 MOV BPL,0x1 LAB_001b5e55: LEA RDX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x193 MOV RCX,R14 CALL 0x0018881e XOR EBP,EBP LEA RSI,[0x260fc0] LEA RDX,[0x176162] MOV RDI,RBX CALL 0x00120a60
char * _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_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 001b5dc6 to 001b5dd6 has its CatchHandler @ 001b5ef2 */ 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 001b5dda to 001b5e06 has its CatchHandler @ 001b5ecd */ _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 001b5e2c to 001b5e36 has its CatchHandler @ 001b5ecb */ std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5); /* try { // try from 001b5e37 to 001b5e51 has its CatchHandler @ 001b5eb0 */ 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 001b5e55 to 001b5e81 has its CatchHandler @ 001b5e82 */ _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; }
11,694
mi_update_status_with_lock
eloqsql/storage/myisam/mi_locking.c
static void mi_update_status_with_lock(MI_INFO *info) { my_bool locked= 0; if (info->state == &info->save_state) { locked= 1; mysql_mutex_lock(&info->s->lock.mutex); } mi_update_status(info); if (locked) mysql_mutex_unlock(&info->s->lock.mutex); }
O3
c
mi_update_status_with_lock: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x10(%rdi), %rax cmpq %rax, 0x8(%rdi) je 0x7db2d movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %rbp jmp 0x7dd0a movq (%rbx), %rax leaq 0x3a0(%rax), %rdi cmpq $0x0, 0x3e0(%rax) jne 0x7db72 callq 0x2a1f0 movq %rbx, %rdi callq 0x7dd0a movq (%rbx), %rbx movq 0x3e0(%rbx), %rdi addq $0x3a0, %rbx # imm = 0x3A0 testq %rdi, %rdi jne 0x7db85 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %rbp jmp 0x2a1c0 leaq 0x61efb(%rip), %rsi # 0xdfa74 movl $0x176, %edx # imm = 0x176 callq 0x306c5 jmp 0x7db46 leaq 0x30e83c(%rip), %rax # 0x38c3c8 movq (%rax), %rax callq *0x160(%rax) jmp 0x7db64
mi_update_status_with_lock: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi lea rax, [rdi+10h] cmp [rdi+8], rax jz short loc_7DB2D mov rdi, rbx add rsp, 8 pop rbx pop rbp jmp mi_update_status loc_7DB2D: mov rax, [rbx] lea rdi, [rax+3A0h] cmp qword ptr [rax+3E0h], 0 jnz short loc_7DB72 call _pthread_mutex_lock loc_7DB46: mov rdi, rbx call mi_update_status mov rbx, [rbx] mov rdi, [rbx+3E0h] add rbx, 3A0h test rdi, rdi jnz short loc_7DB85 loc_7DB64: mov rdi, rbx add rsp, 8 pop rbx pop rbp jmp _pthread_mutex_unlock loc_7DB72: lea rsi, aWorkspaceLlm4b_15; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 176h call psi_mutex_lock jmp short loc_7DB46 loc_7DB85: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_7DB64
long long mi_update_status_with_lock(_QWORD *a1) { long long v3; // rdi long long v4; // rbx long long v5; // rdi long long v6; // rbx if ( (_QWORD *)a1[1] != a1 + 2 ) return mi_update_status(a1); v3 = *a1 + 928LL; if ( *(_QWORD *)(*a1 + 992LL) ) psi_mutex_lock(v3, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_locking.c", 0x176u); else pthread_mutex_lock(v3); mi_update_status(a1); v4 = *a1; v5 = *(_QWORD *)(v4 + 992); v6 = v4 + 928; if ( v5 ) ((void ( *)(long long))PSI_server[44])(v5); return pthread_mutex_unlock(v6); }
mi_update_status_with_lock: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI LEA RAX,[RDI + 0x10] CMP qword ptr [RDI + 0x8],RAX JZ 0x0017db2d MOV RDI,RBX ADD RSP,0x8 POP RBX POP RBP JMP 0x0017dd0a LAB_0017db2d: MOV RAX,qword ptr [RBX] LEA RDI,[RAX + 0x3a0] CMP qword ptr [RAX + 0x3e0],0x0 JNZ 0x0017db72 CALL 0x0012a1f0 LAB_0017db46: MOV RDI,RBX CALL 0x0017dd0a MOV RBX,qword ptr [RBX] MOV RDI,qword ptr [RBX + 0x3e0] ADD RBX,0x3a0 TEST RDI,RDI JNZ 0x0017db85 LAB_0017db64: MOV RDI,RBX ADD RSP,0x8 POP RBX POP RBP JMP 0x0012a1c0 LAB_0017db72: LEA RSI,[0x1dfa74] MOV EDX,0x176 CALL 0x001306c5 JMP 0x0017db46 LAB_0017db85: LEA RAX,[0x48c3c8] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0017db64
void mi_update_status_with_lock(long *param_1) { pthread_mutex_t *__mutex; long lVar1; if ((long *)param_1[1] != param_1 + 2) { mi_update_status(param_1); return; } __mutex = (pthread_mutex_t *)(*param_1 + 0x3a0); if (*(long *)(*param_1 + 0x3e0) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_locking.c", 0x176); } mi_update_status(param_1); lVar1 = *param_1; if (*(long *)(lVar1 + 0x3e0) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)(lVar1 + 0x3a0)); return; }
11,695
string_indexof_char
bluesky950520[P]quickjs/quickjs.c
static int string_indexof_char(JSString *p, int c, int from) { /* assuming 0 <= from <= p->len */ int i, len = p->len; if (p->is_wide_char) { for (i = from; i < len; i++) { if (p->u.str16[i] == c) return i; } } else { if ((c & ~0xff) == 0) { for (i = from; i < len; i++) { if (p->u.str8[i] == (uint8_t)c) return i; } } } return -1; }
O0
c
string_indexof_char: movq %rdi, -0x10(%rsp) movl %esi, -0x14(%rsp) movl %edx, -0x18(%rsp) movq -0x10(%rsp), %rax movq 0x4(%rax), %rax andq $0x7fffffff, %rax # imm = 0x7FFFFFFF movl %eax, -0x20(%rsp) movq -0x10(%rsp), %rax movq 0x4(%rax), %rax shrq $0x1f, %rax andq $0x1, %rax cmpb $0x0, %al je 0x847f7 movl -0x18(%rsp), %eax movl %eax, -0x1c(%rsp) movl -0x1c(%rsp), %eax cmpl -0x20(%rsp), %eax jge 0x847f5 movq -0x10(%rsp), %rax movslq -0x1c(%rsp), %rcx movzwl 0x18(%rax,%rcx,2), %eax cmpl -0x14(%rsp), %eax jne 0x847e6 movl -0x1c(%rsp), %eax movl %eax, -0x4(%rsp) jmp 0x84856 jmp 0x847e8 movl -0x1c(%rsp), %eax addl $0x1, %eax movl %eax, -0x1c(%rsp) jmp 0x847bd jmp 0x8484e movl -0x14(%rsp), %eax andl $0xffffff00, %eax # imm = 0xFFFFFF00 cmpl $0x0, %eax jne 0x8484c movl -0x18(%rsp), %eax movl %eax, -0x1c(%rsp) movl -0x1c(%rsp), %eax cmpl -0x20(%rsp), %eax jge 0x8484a movq -0x10(%rsp), %rax movslq -0x1c(%rsp), %rcx movzbl 0x18(%rax,%rcx), %eax movl -0x14(%rsp), %ecx movzbl %cl, %ecx cmpl %ecx, %eax jne 0x8483b movl -0x1c(%rsp), %eax movl %eax, -0x4(%rsp) jmp 0x84856 jmp 0x8483d movl -0x1c(%rsp), %eax addl $0x1, %eax movl %eax, -0x1c(%rsp) jmp 0x8480d jmp 0x8484c jmp 0x8484e movl $0xffffffff, -0x4(%rsp) # imm = 0xFFFFFFFF movl -0x4(%rsp), %eax retq nopl (%rax,%rax)
string_indexof_char: mov [rsp+var_10], rdi mov [rsp+var_14], esi mov [rsp+var_18], edx mov rax, [rsp+var_10] mov rax, [rax+4] and rax, 7FFFFFFFh mov [rsp+var_20], eax mov rax, [rsp+var_10] mov rax, [rax+4] shr rax, 1Fh and rax, 1 cmp al, 0 jz short loc_847F7 mov eax, [rsp+var_18] mov [rsp+var_1C], eax loc_847BD: mov eax, [rsp+var_1C] cmp eax, [rsp+var_20] jge short loc_847F5 mov rax, [rsp+var_10] movsxd rcx, [rsp+var_1C] movzx eax, word ptr [rax+rcx*2+18h] cmp eax, [rsp+var_14] jnz short loc_847E6 mov eax, [rsp+var_1C] mov [rsp+var_4], eax jmp short loc_84856 loc_847E6: jmp short $+2 loc_847E8: mov eax, [rsp+var_1C] add eax, 1 mov [rsp+var_1C], eax jmp short loc_847BD loc_847F5: jmp short loc_8484E loc_847F7: mov eax, [rsp+var_14] and eax, 0FFFFFF00h cmp eax, 0 jnz short loc_8484C mov eax, [rsp+var_18] mov [rsp+var_1C], eax loc_8480D: mov eax, [rsp+var_1C] cmp eax, [rsp+var_20] jge short loc_8484A mov rax, [rsp+var_10] movsxd rcx, [rsp+var_1C] movzx eax, byte ptr [rax+rcx+18h] mov ecx, [rsp+var_14] movzx ecx, cl cmp eax, ecx jnz short loc_8483B mov eax, [rsp+var_1C] mov [rsp+var_4], eax jmp short loc_84856 loc_8483B: jmp short $+2 loc_8483D: mov eax, [rsp+var_1C] add eax, 1 mov [rsp+var_1C], eax jmp short loc_8480D loc_8484A: jmp short $+2 loc_8484C: jmp short $+2 loc_8484E: mov [rsp+var_4], 0FFFFFFFFh loc_84856: mov eax, [rsp+var_4] retn
long long string_indexof_char(long long a1, int a2, unsigned int a3) { int v4; // [rsp+0h] [rbp-20h] unsigned int i; // [rsp+4h] [rbp-1Ch] unsigned int j; // [rsp+4h] [rbp-1Ch] v4 = *(_QWORD *)(a1 + 4) & 0x7FFFFFFF; if ( (*(_QWORD *)(a1 + 4) & 0x80000000LL) != 0 ) { for ( i = a3; (int)i < v4; ++i ) { if ( *(unsigned __int16 *)(a1 + 2LL * (int)i + 24) == a2 ) return i; } } else if ( (a2 & 0xFFFFFF00) == 0 ) { for ( j = a3; (int)j < v4; ++j ) { if ( *(unsigned __int8 *)(a1 + (int)j + 24) == (unsigned __int8)a2 ) return j; } } return (unsigned int)-1; }
string_indexof_char: MOV qword ptr [RSP + -0x10],RDI MOV dword ptr [RSP + -0x14],ESI MOV dword ptr [RSP + -0x18],EDX MOV RAX,qword ptr [RSP + -0x10] MOV RAX,qword ptr [RAX + 0x4] AND RAX,0x7fffffff MOV dword ptr [RSP + -0x20],EAX MOV RAX,qword ptr [RSP + -0x10] MOV RAX,qword ptr [RAX + 0x4] SHR RAX,0x1f AND RAX,0x1 CMP AL,0x0 JZ 0x001847f7 MOV EAX,dword ptr [RSP + -0x18] MOV dword ptr [RSP + -0x1c],EAX LAB_001847bd: MOV EAX,dword ptr [RSP + -0x1c] CMP EAX,dword ptr [RSP + -0x20] JGE 0x001847f5 MOV RAX,qword ptr [RSP + -0x10] MOVSXD RCX,dword ptr [RSP + -0x1c] MOVZX EAX,word ptr [RAX + RCX*0x2 + 0x18] CMP EAX,dword ptr [RSP + -0x14] JNZ 0x001847e6 MOV EAX,dword ptr [RSP + -0x1c] MOV dword ptr [RSP + -0x4],EAX JMP 0x00184856 LAB_001847e6: JMP 0x001847e8 LAB_001847e8: MOV EAX,dword ptr [RSP + -0x1c] ADD EAX,0x1 MOV dword ptr [RSP + -0x1c],EAX JMP 0x001847bd LAB_001847f5: JMP 0x0018484e LAB_001847f7: MOV EAX,dword ptr [RSP + -0x14] AND EAX,0xffffff00 CMP EAX,0x0 JNZ 0x0018484c MOV EAX,dword ptr [RSP + -0x18] MOV dword ptr [RSP + -0x1c],EAX LAB_0018480d: MOV EAX,dword ptr [RSP + -0x1c] CMP EAX,dword ptr [RSP + -0x20] JGE 0x0018484a MOV RAX,qword ptr [RSP + -0x10] MOVSXD RCX,dword ptr [RSP + -0x1c] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x18] MOV ECX,dword ptr [RSP + -0x14] MOVZX ECX,CL CMP EAX,ECX JNZ 0x0018483b MOV EAX,dword ptr [RSP + -0x1c] MOV dword ptr [RSP + -0x4],EAX JMP 0x00184856 LAB_0018483b: JMP 0x0018483d LAB_0018483d: MOV EAX,dword ptr [RSP + -0x1c] ADD EAX,0x1 MOV dword ptr [RSP + -0x1c],EAX JMP 0x0018480d LAB_0018484a: JMP 0x0018484c LAB_0018484c: JMP 0x0018484e LAB_0018484e: MOV dword ptr [RSP + -0x4],0xffffffff LAB_00184856: MOV EAX,dword ptr [RSP + -0x4] RET
int string_indexof_char(long param_1,uint param_2,int param_3) { uint uVar1; int local_1c; uVar1 = (uint)*(int8 *)(param_1 + 4) & 0x7fffffff; local_1c = param_3; if ((*(ulong *)(param_1 + 4) >> 0x1f & 1) == 0) { if ((param_2 & 0xffffff00) == 0) { for (; local_1c < (int)uVar1; local_1c = local_1c + 1) { if ((uint)*(byte *)(param_1 + 0x18 + (long)local_1c) == (param_2 & 0xff)) { return local_1c; } } } } else { for (; local_1c < (int)uVar1; local_1c = local_1c + 1) { if (*(ushort *)(param_1 + 0x18 + (long)local_1c * 2) == param_2) { return local_1c; } } } return -1; }
11,696
string_indexof_char
bluesky950520[P]quickjs/quickjs.c
static int string_indexof_char(JSString *p, int c, int from) { /* assuming 0 <= from <= p->len */ int i, len = p->len; if (p->is_wide_char) { for (i = from; i < len; i++) { if (p->u.str16[i] == c) return i; } } else { if ((c & ~0xff) == 0) { for (i = from; i < len; i++) { if (p->u.str8[i] == (uint8_t)c) return i; } } } return -1; }
O1
c
string_indexof_char: movq 0x4(%rdi), %rcx movl %ecx, %r8d andl $0x7fffffff, %r8d # imm = 0x7FFFFFFF movl $0xffffffff, %eax # imm = 0xFFFFFFFF testl %ecx, %ecx js 0x4b9a5 cmpl $0xff, %esi ja 0x4b9a4 cmpl %edx, %r8d jle 0x4b9a4 movslq %edx, %r9 andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF leaq (%r9,%rdi), %r8 addq $0x18, %r8 subq %r9, %rcx xorl %edi, %edi movzbl (%r8,%rdi), %r9d cmpl %esi, %r9d je 0x4b9d4 incq %rdi cmpq %rdi, %rcx jne 0x4b992 retq cmpl %edx, %r8d jle 0x4b9a4 movslq %edx, %r9 andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF leaq (%rdi,%r9,2), %r8 addq $0x18, %r8 subq %r9, %rcx xorl %edi, %edi movzwl (%r8,%rdi,2), %r9d cmpl %esi, %r9d je 0x4b9d4 incq %rdi cmpq %rdi, %rcx jne 0x4b9c0 jmp 0x4b9a4 addl %edi, %edx movl %edx, %eax retq
string_indexof_char: mov rcx, [rdi+4] mov r8d, ecx and r8d, 7FFFFFFFh mov eax, 0FFFFFFFFh test ecx, ecx js short loc_4B9A5 cmp esi, 0FFh ja short locret_4B9A4 cmp r8d, edx jle short locret_4B9A4 movsxd r9, edx and ecx, 7FFFFFFFh lea r8, [r9+rdi] add r8, 18h sub rcx, r9 xor edi, edi loc_4B992: movzx r9d, byte ptr [r8+rdi] cmp r9d, esi jz short loc_4B9D4 inc rdi cmp rcx, rdi jnz short loc_4B992 locret_4B9A4: retn loc_4B9A5: cmp r8d, edx jle short locret_4B9A4 movsxd r9, edx and ecx, 7FFFFFFFh lea r8, [rdi+r9*2] add r8, 18h sub rcx, r9 xor edi, edi loc_4B9C0: movzx r9d, word ptr [r8+rdi*2] cmp r9d, esi jz short loc_4B9D4 inc rdi cmp rcx, rdi jnz short loc_4B9C0 jmp short locret_4B9A4 loc_4B9D4: add edx, edi mov eax, edx retn
long long string_indexof_char(long long a1, unsigned int a2, int a3) { long long v3; // rcx int v4; // r8d long long result; // rax long long v6; // r8 long long v7; // rcx long long v8; // rdi long long v9; // r8 long long v10; // rcx v3 = *(_QWORD *)(a1 + 4); v4 = v3 & 0x7FFFFFFF; result = 0xFFFFFFFFLL; if ( (int)v3 < 0 ) { if ( v4 > a3 ) { v9 = a1 + 2LL * a3 + 24; v10 = (v3 & 0x7FFFFFFF) - a3; v8 = 0LL; while ( *(unsigned __int16 *)(v9 + 2 * v8) != a2 ) { if ( v10 == ++v8 ) return result; } return (unsigned int)(v8 + a3); } } else if ( a2 <= 0xFF && v4 > a3 ) { v6 = a3 + a1 + 24; v7 = (v3 & 0x7FFFFFFF) - a3; v8 = 0LL; while ( *(unsigned __int8 *)(v6 + v8) != a2 ) { if ( v7 == ++v8 ) return result; } return (unsigned int)(v8 + a3); } return result; }
string_indexof_char: MOV RCX,qword ptr [RDI + 0x4] MOV R8D,ECX AND R8D,0x7fffffff MOV EAX,0xffffffff TEST ECX,ECX JS 0x0014b9a5 CMP ESI,0xff JA 0x0014b9a4 CMP R8D,EDX JLE 0x0014b9a4 MOVSXD R9,EDX AND ECX,0x7fffffff LEA R8,[R9 + RDI*0x1] ADD R8,0x18 SUB RCX,R9 XOR EDI,EDI LAB_0014b992: MOVZX R9D,byte ptr [R8 + RDI*0x1] CMP R9D,ESI JZ 0x0014b9d4 INC RDI CMP RCX,RDI JNZ 0x0014b992 LAB_0014b9a4: RET LAB_0014b9a5: CMP R8D,EDX JLE 0x0014b9a4 MOVSXD R9,EDX AND ECX,0x7fffffff LEA R8,[RDI + R9*0x2] ADD R8,0x18 SUB RCX,R9 XOR EDI,EDI LAB_0014b9c0: MOVZX R9D,word ptr [R8 + RDI*0x2] CMP R9D,ESI JZ 0x0014b9d4 INC RDI CMP RCX,RDI JNZ 0x0014b9c0 JMP 0x0014b9a4 LAB_0014b9d4: ADD EDX,EDI MOV EAX,EDX RET
int string_indexof_char(long param_1,uint param_2,int param_3) { uint uVar1; long lVar2; uVar1 = (uint)*(int8 *)(param_1 + 4); if ((int)uVar1 < 0) { if (param_3 < (int)(uVar1 & 0x7fffffff)) { lVar2 = 0; do { if (*(ushort *)(param_1 + (long)param_3 * 2 + 0x18 + lVar2 * 2) == param_2) goto LAB_0014b9d4; lVar2 = lVar2 + 1; } while ((ulong)(uVar1 & 0x7fffffff) - (long)param_3 != lVar2); } } else if ((param_2 < 0x100) && (param_3 < (int)(uVar1 & 0x7fffffff))) { lVar2 = 0; do { if (*(byte *)(param_3 + param_1 + 0x18 + lVar2) == param_2) { LAB_0014b9d4: return param_3 + (int)lVar2; } lVar2 = lVar2 + 1; } while ((ulong)(uVar1 & 0x7fffffff) - (long)param_3 != lVar2); } return -1; }
11,697
string_indexof_char
bluesky950520[P]quickjs/quickjs.c
static int string_indexof_char(JSString *p, int c, int from) { /* assuming 0 <= from <= p->len */ int i, len = p->len; if (p->is_wide_char) { for (i = from; i < len; i++) { if (p->u.str16[i] == c) return i; } } else { if ((c & ~0xff) == 0) { for (i = from; i < len; i++) { if (p->u.str8[i] == (uint8_t)c) return i; } } } return -1; }
O2
c
string_indexof_char: movq 0x4(%rdi), %rcx testl %ecx, %ecx js 0x4152d pushq $-0x1 popq %rax cmpl $0xff, %esi ja 0x41550 andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF movslq %edx, %rdx cmpq %rcx, %rdx jge 0x41550 movzbl 0x18(%rdi,%rdx), %r8d cmpl %esi, %r8d je 0x4154e incq %rdx jmp 0x41518 movslq %edx, %rdx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF pushq $-0x1 popq %rax cmpq %rcx, %rdx jge 0x41550 movzwl 0x18(%rdi,%rdx,2), %r8d cmpl %esi, %r8d je 0x4154e incq %rdx jmp 0x41539 movl %edx, %eax retq
string_indexof_char: mov rcx, [rdi+4] test ecx, ecx js short loc_4152D push 0FFFFFFFFFFFFFFFFh pop rax cmp esi, 0FFh ja short locret_41550 and ecx, 7FFFFFFFh movsxd rdx, edx loc_41518: cmp rdx, rcx jge short locret_41550 movzx r8d, byte ptr [rdi+rdx+18h] cmp r8d, esi jz short loc_4154E inc rdx jmp short loc_41518 loc_4152D: movsxd rdx, edx and ecx, 7FFFFFFFh push 0FFFFFFFFFFFFFFFFh pop rax loc_41539: cmp rdx, rcx jge short locret_41550 movzx r8d, word ptr [rdi+rdx*2+18h] cmp r8d, esi jz short loc_4154E inc rdx jmp short loc_41539 loc_4154E: mov eax, edx locret_41550: retn
long long string_indexof_char(long long a1, unsigned int a2, long long i) { long long v3; // rcx long long result; // rax unsigned int v5; // ecx unsigned int v6; // ecx v3 = *(_QWORD *)(a1 + 4); if ( (int)v3 < 0 ) { i = (int)i; v6 = v3 & 0x7FFFFFFF; result = -1LL; while ( i < v6 ) { if ( *(unsigned __int16 *)(a1 + 2 * i + 24) == a2 ) return (unsigned int)i; ++i; } } else { result = -1LL; if ( a2 <= 0xFF ) { v5 = v3 & 0x7FFFFFFF; for ( i = (int)i; i < v5; ++i ) { if ( *(unsigned __int8 *)(a1 + i + 24) == a2 ) return (unsigned int)i; } } } return result; }
string_indexof_char: MOV RCX,qword ptr [RDI + 0x4] TEST ECX,ECX JS 0x0014152d PUSH -0x1 POP RAX CMP ESI,0xff JA 0x00141550 AND ECX,0x7fffffff MOVSXD RDX,EDX LAB_00141518: CMP RDX,RCX JGE 0x00141550 MOVZX R8D,byte ptr [RDI + RDX*0x1 + 0x18] CMP R8D,ESI JZ 0x0014154e INC RDX JMP 0x00141518 LAB_0014152d: MOVSXD RDX,EDX AND ECX,0x7fffffff PUSH -0x1 POP RAX LAB_00141539: CMP RDX,RCX JGE 0x00141550 MOVZX R8D,word ptr [RDI + RDX*0x2 + 0x18] CMP R8D,ESI JZ 0x0014154e INC RDX JMP 0x00141539 LAB_0014154e: MOV EAX,EDX LAB_00141550: RET
ulong string_indexof_char(long param_1,uint param_2,int param_3) { uint uVar1; ulong uVar2; uVar1 = (uint)*(int8 *)(param_1 + 4); if ((int)uVar1 < 0) { for (uVar2 = (ulong)param_3; (long)uVar2 < (long)(ulong)(uVar1 & 0x7fffffff); uVar2 = uVar2 + 1) { if (*(ushort *)(param_1 + 0x18 + uVar2 * 2) == param_2) goto LAB_0014154e; } } else if (param_2 < 0x100) { for (uVar2 = (ulong)param_3; (long)uVar2 < (long)(ulong)(uVar1 & 0x7fffffff); uVar2 = uVar2 + 1) { if (*(byte *)(param_1 + 0x18 + uVar2) == param_2) { LAB_0014154e: return uVar2 & 0xffffffff; } } } return 0xffffffffffffffff; }
11,698
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>::operator[]<char const>(char const*)
monkey531[P]llama/common/json.hpp
reference operator[](T* key) { return operator[](typename object_t::key_type(key)); }
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>::operator[]<char const>(char const*): pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx leaq 0x8(%rsp), %r14 leaq 0x7(%rsp), %rdx movq %r14, %rdi callq 0x5333e movq %rbx, %rdi movq %r14, %rsi callq 0xabc64 movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa5207 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8e0 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa5230 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8e0 movq %rbx, %rdi callq 0x1afb0
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERSD_PT_: push r14 push rbx sub rsp, 28h mov rbx, rdi lea r14, [rsp+38h+var_30] lea rdx, [rsp+38h+var_31] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rdi, rbx mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixES9_; 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[](std::string) mov rbx, rax lea rax, [rsp+38h+var_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A5207 mov rsi, [rsp+38h+var_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A5207: mov rax, rbx add rsp, 28h pop rbx pop r14 retn mov rbx, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A5230 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A5230: mov rdi, rbx call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]<char const>( long long a1, _BYTE *a2) { long long v2; // rbx void *v4[2]; // [rsp+8h] [rbp-30h] BYREF long long v5; // [rsp+18h] [rbp-20h] BYREF std::string::basic_string<std::allocator<char>>(v4, a2); v2 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( a1, v4); if ( v4[0] != &v5 ) operator delete(v4[0], v5 + 1); return v2; }
operator[]<char_const>: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RDI LEA R14,[RSP + 0x8] LEA RDX,[RSP + 0x7] MOV RDI,R14 CALL 0x0015333e LAB_001a51de: MOV RDI,RBX MOV RSI,R14 CALL 0x001abc64 LAB_001a51e9: MOV RBX,RAX LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001a5207 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011a8e0 LAB_001a5207: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R14 RET
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>& 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>(char const*) */ basic_json * __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[]<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> *this,char *param_1) { basic_json *pbVar1; allocator local_31; long *local_30 [2]; long local_20 [2]; std::__cxx11::string::string<std::allocator<char>>((string *)local_30,param_1,&local_31); /* try { // try from 001a51de to 001a51e8 has its CatchHandler @ 001a5212 */ pbVar1 = (basic_json *)operator[](this,(string *)local_30); if (local_30[0] != local_20) { operator_delete(local_30[0],local_20[0] + 1); } return pbVar1; }
11,699
int ggml::cpu::aarch64::repack<block_iq4_nl, 4l, 4l>(ggml_tensor*, void const*, unsigned long)
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp
static int repack_iq4_nl_to_iq4_nl_4_bl(struct ggml_tensor * t, int interleave_block, const void * GGML_RESTRICT data, size_t data_size) { GGML_ASSERT(t->type == GGML_TYPE_IQ4_NL); //GGML_ASSERT(interleave_block == 4 || interleave_block == 8); GGML_ASSERT(interleave_block == 4); block_iq4_nlx4 * dst = (block_iq4_nlx4 *)t->data; const block_iq4_nl * src = (const block_iq4_nl *)data; block_iq4_nl dst_tmp[4]; int nrow = ggml_nrows(t); int nrows_interleaved = 4; int nblocks = t->ne[0] / QK4_0; GGML_ASSERT(data_size == nrow * nblocks * sizeof(block_iq4_nl)); if (t->ne[1] % nrows_interleaved != 0 || t->ne[0] % 8 != 0) { return -1; } for (int b = 0; b < nrow; b += nrows_interleaved) { for (int64_t x = 0; x < nblocks; x++) { for (int i = 0; i < nrows_interleaved; i++) { dst_tmp[i] = src[x + i * nblocks]; } *dst++ = make_block_iq4_nlx4(dst_tmp, interleave_block); } src += nrows_interleaved * nblocks; } return 0; GGML_UNUSED(data_size); }
O2
cpp
int ggml::cpu::aarch64::repack<block_iq4_nl, 4l, 4l>(ggml_tensor*, void const*, unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x98, %rsp cmpl $0x14, (%rdi) jne 0x12ed1 movq %rdx, %r15 movq %rsi, %rbx movq %rdi, %r14 movq 0xf8(%rdi), %r12 callq 0xbb10 movq %rax, %rcx movq 0x10(%r14), %rsi pushq $0x20 popq %rdi movq %rsi, %rax cqto idivq %rdi movl %ecx, %edx imull %eax, %edx movslq %edx, %rdx imulq $0x12, %rdx, %rdx cmpq %r15, %rdx jne 0x12eed movq 0x18(%r14), %rdx andl $0x3, %edx andl $0x7, %esi orq %rdx, %rsi je 0x12dd8 pushq $-0x1 popq %rax addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp vzeroupper retq movslq %eax, %rdi leal (,%rax,4), %eax cltq movq %rdi, %rdx sarq $0x3f, %rdx andnq %rdi, %rdx, %rdx imulq $0x12, %rax, %rsi imulq $0x12, %rdi, %rdi xorl %eax, %eax leaq 0x50(%rsp), %r8 xorl %r9d, %r9d cmpl %ecx, %r9d jge 0x12dc3 movq %rbx, %r10 xorl %r11d, %r11d cmpq %rdx, %r11 je 0x12ec5 movq %r10, %r14 xorl %r15d, %r15d cmpq $0x48, %r15 je 0x12e42 movzwl 0x10(%r14), %ebp movw %bp, 0x60(%rsp,%r15) vmovups (%r14), %xmm0 vmovups %xmm0, 0x50(%rsp,%r15) addq $0x12, %r15 addq %rdi, %r14 jmp 0x12e1c movq %r8, %r14 xorl %r15d, %r15d cmpq $0x4, %r15 je 0x12e61 movzwl (%r14), %ebp movw %bp, 0x8(%rsp,%r15,2) incq %r15 addq $0x12, %r14 jmp 0x12e48 xorl %r14d, %r14d cmpq $0x10, %r14 je 0x12e92 movl %r14d, %r15d andl $0x3, %r15d movl %r14d, %r13d andl $0xc, %r13d imulq $0x12, %r15, %r15 addq %rsp, %r15 addq $0x50, %r15 movl 0x2(%r13,%r15), %ebp movl %ebp, 0x10(%rsp,%r14,4) incq %r14 jmp 0x12e64 movq 0x48(%rsp), %r14 movq %r14, 0x40(%r12) vmovups 0x8(%rsp), %ymm0 vmovups 0x28(%rsp), %ymm1 vmovups %ymm1, 0x20(%r12) vmovups %ymm0, (%r12) addq $0x48, %r12 incq %r11 addq $0x12, %r10 jmp 0x12e0d addl $0x4, %r9d addq %rsi, %rbx jmp 0x12e02 leaq 0x32261(%rip), %rdi # 0x45139 leaq 0x315d3(%rip), %rdx # 0x444b2 leaq 0x32380(%rip), %rcx # 0x45266 movl $0x143f, %esi # imm = 0x143F jmp 0x12f07 leaq 0x32245(%rip), %rdi # 0x45139 leaq 0x315b7(%rip), %rdx # 0x444b2 leaq 0x32380(%rip), %rcx # 0x45282 movl $0x144a, %esi # imm = 0x144A xorl %eax, %eax callq 0xc040
_ZN4ggml3cpu7aarch646repackI12block_iq4_nlLl4ELl4EEEiP11ggml_tensorPKvm: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 98h cmp dword ptr [rdi], 14h jnz loc_12ED1 mov r15, rdx mov rbx, rsi mov r14, rdi mov r12, [rdi+0F8h] call _ggml_nrows mov rcx, rax mov rsi, [r14+10h] push 20h ; ' ' pop rdi mov rax, rsi cqo idiv rdi mov edx, ecx imul edx, eax movsxd rdx, edx imul rdx, 12h cmp rdx, r15 jnz loc_12EED mov rdx, [r14+18h] and edx, 3 and esi, 7 or rsi, rdx jz short loc_12DD8 push 0FFFFFFFFFFFFFFFFh pop rax loc_12DC3: add rsp, 98h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp vzeroupper retn loc_12DD8: movsxd rdi, eax lea eax, ds:0[rax*4] cdqe mov rdx, rdi sar rdx, 3Fh andn rdx, rdx, rdi imul rsi, rax, 12h imul rdi, 12h xor eax, eax lea r8, [rsp+0C8h+var_78] xor r9d, r9d loc_12E02: cmp r9d, ecx jge short loc_12DC3 mov r10, rbx xor r11d, r11d loc_12E0D: cmp r11, rdx jz loc_12EC5 mov r14, r10 xor r15d, r15d loc_12E1C: cmp r15, 48h ; 'H' jz short loc_12E42 movzx ebp, word ptr [r14+10h] mov [rsp+r15+0C8h+var_68], bp vmovups xmm0, xmmword ptr [r14] vmovups [rsp+r15+0C8h+var_78], xmm0 add r15, 12h add r14, rdi jmp short loc_12E1C loc_12E42: mov r14, r8 xor r15d, r15d loc_12E48: cmp r15, 4 jz short loc_12E61 movzx ebp, word ptr [r14] mov word ptr [rsp+r15*2+0C8h+var_C0], bp inc r15 add r14, 12h jmp short loc_12E48 loc_12E61: xor r14d, r14d loc_12E64: cmp r14, 10h jz short loc_12E92 mov r15d, r14d and r15d, 3 mov r13d, r14d and r13d, 0Ch imul r15, 12h add r15, rsp add r15, 50h ; 'P' mov ebp, [r13+r15+2] mov dword ptr [rsp+r14*4+0C8h+var_C0+8], ebp inc r14 jmp short loc_12E64 loc_12E92: mov r14, [rsp+0C8h+var_80] mov [r12+40h], r14 vmovups ymm0, [rsp+0C8h+var_C0] vmovups ymm1, [rsp+0C8h+var_A0] vmovups ymmword ptr [r12+20h], ymm1 vmovups ymmword ptr [r12], ymm0 add r12, 48h ; 'H' inc r11 add r10, 12h jmp loc_12E0D loc_12EC5: add r9d, 4 add rbx, rsi jmp loc_12E02 loc_12ED1: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTTypeGgmlTypeI; "t->type == GGML_TYPE_IQ4_NL" mov esi, 143Fh jmp short loc_12F07 loc_12EED: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aDataSizeNrowNb_1; "data_size == nrow * nblocks * sizeof(bl"... mov esi, 144Ah loc_12F07: xor eax, eax call _ggml_abort
long long ggml::cpu::aarch64::repack<block_iq4_nl,4l,4l>( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, int a7) { int v10; // ecx long long v11; // rsi long long v12; // rax long long result; // rax unsigned long long v14; // rdx long long v15; // rsi long long v16; // rdi int i; // r9d long long v18; // r10 long long j; // r11 _WORD *v23; // r14 long long k; // r15 long long m; // r14 int v28; // esi int v29; // edx int v30; // ecx int v31; // r8d int v32; // r9d __m256 v33; // [rsp+8h] [rbp-C0h] long long v35; // [rsp+48h] [rbp-80h] _OWORD v36[7]; // [rsp+50h] [rbp-78h] BYREF if ( *(_DWORD *)a1 != 20 ) { v28 = 5183; ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp", 5183LL, "GGML_ASSERT(%s) failed", "t->type == GGML_TYPE_IQ4_NL"); return ggml::cpu::aarch64::gemv<block_q4_0,4l,4l,(ggml_type)8>( (unsigned int)"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp", v28, v29, v30, v31, v32, a7); } _R12 = *(_QWORD *)(a1 + 248); v10 = ggml_nrows(a1); v11 = *(_QWORD *)(a1 + 16); v12 = v11 / 32; if ( 18LL * (int)(v11 / 32 * v10) != a3 ) { v28 = 5194; ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp", 5194LL, "GGML_ASSERT(%s) failed", "data_size == nrow * nblocks * sizeof(block_iq4_nl)"); return ggml::cpu::aarch64::gemv<block_q4_0,4l,4l,(ggml_type)8>( (unsigned int)"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp", v28, v29, v30, v31, v32, a7); } if ( *(_QWORD *)(a1 + 24) & 3LL | v11 & 7 ) { result = -1LL; } else { v14 = (int)v12 & (unsigned long long)~((long long)(int)v12 >> 63); v15 = 72LL * (_DWORD)v12; v16 = 18LL * (int)v12; result = 0LL; for ( i = 0; i < v10; i += 4 ) { v18 = a2; for ( j = 0LL; j != v14; ++j ) { _R14 = v18; for ( _R15 = 0LL; _R15 != 72; _R15 += 18LL ) { *(_WORD *)((char *)&v36[1] + _R15) = *(_WORD *)(_R14 + 16); __asm { vmovups xmm0, xmmword ptr [r14] vmovups [rsp+r15+0C8h+var_78], xmm0 } _R14 += v16; } v23 = v36; for ( k = 0LL; k != 4; ++k ) { *((_WORD *)v33.m256_f32 + k) = *v23; v23 += 9; } for ( m = 0LL; m != 16; ++m ) v33.m256_f32[m + 2] = *(float *)((char *)v36 + 18 * (m & 3) + (m & 0xC) + 2); *(_QWORD *)(_R12 + 64) = v35; __asm { vmovups ymm0, [rsp+0C8h+var_C0] vmovups ymm1, [rsp+0C8h+var_A0] vmovups ymmword ptr [r12+20h], ymm1 vmovups ymmword ptr [r12], ymm0 } _R12 += 72LL; v18 += 18LL; } a2 += v15; } } __asm { vzeroupper } return result; }
repack<block_iq4_nl,4l,4l>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x98 CMP dword ptr [RDI],0x14 JNZ 0x00112ed1 MOV R15,RDX MOV RBX,RSI MOV R14,RDI MOV R12,qword ptr [RDI + 0xf8] CALL 0x0010bb10 MOV RCX,RAX MOV RSI,qword ptr [R14 + 0x10] PUSH 0x20 POP RDI MOV RAX,RSI CQO IDIV RDI MOV EDX,ECX IMUL EDX,EAX MOVSXD RDX,EDX IMUL RDX,RDX,0x12 CMP RDX,R15 JNZ 0x00112eed MOV RDX,qword ptr [R14 + 0x18] AND EDX,0x3 AND ESI,0x7 OR RSI,RDX JZ 0x00112dd8 PUSH -0x1 POP RAX LAB_00112dc3: ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP VZEROUPPER RET LAB_00112dd8: MOVSXD RDI,EAX LEA EAX,[RAX*0x4] CDQE MOV RDX,RDI SAR RDX,0x3f ANDN RDX,RDX,RDI IMUL RSI,RAX,0x12 IMUL RDI,RDI,0x12 XOR EAX,EAX LEA R8,[RSP + 0x50] XOR R9D,R9D LAB_00112e02: CMP R9D,ECX JGE 0x00112dc3 MOV R10,RBX XOR R11D,R11D LAB_00112e0d: CMP R11,RDX JZ 0x00112ec5 MOV R14,R10 XOR R15D,R15D LAB_00112e1c: CMP R15,0x48 JZ 0x00112e42 MOVZX EBP,word ptr [R14 + 0x10] MOV word ptr [RSP + R15*0x1 + 0x60],BP VMOVUPS XMM0,xmmword ptr [R14] VMOVUPS xmmword ptr [RSP + R15*0x1 + 0x50],XMM0 ADD R15,0x12 ADD R14,RDI JMP 0x00112e1c LAB_00112e42: MOV R14,R8 XOR R15D,R15D LAB_00112e48: CMP R15,0x4 JZ 0x00112e61 MOVZX EBP,word ptr [R14] MOV word ptr [RSP + R15*0x2 + 0x8],BP INC R15 ADD R14,0x12 JMP 0x00112e48 LAB_00112e61: XOR R14D,R14D LAB_00112e64: CMP R14,0x10 JZ 0x00112e92 MOV R15D,R14D AND R15D,0x3 MOV R13D,R14D AND R13D,0xc IMUL R15,R15,0x12 ADD R15,RSP ADD R15,0x50 MOV EBP,dword ptr [R13 + R15*0x1 + 0x2] MOV dword ptr [RSP + R14*0x4 + 0x10],EBP INC R14 JMP 0x00112e64 LAB_00112e92: MOV R14,qword ptr [RSP + 0x48] MOV qword ptr [R12 + 0x40],R14 VMOVUPS YMM0,ymmword ptr [RSP + 0x8] VMOVUPS YMM1,ymmword ptr [RSP + 0x28] VMOVUPS ymmword ptr [R12 + 0x20],YMM1 VMOVUPS ymmword ptr [R12],YMM0 ADD R12,0x48 INC R11 ADD R10,0x12 JMP 0x00112e0d LAB_00112ec5: ADD R9D,0x4 ADD RBX,RSI JMP 0x00112e02 LAB_00112ed1: LEA RDI,[0x145139] LEA RDX,[0x1444b2] LEA RCX,[0x145266] MOV ESI,0x143f JMP 0x00112f07 LAB_00112eed: LEA RDI,[0x145139] LEA RDX,[0x1444b2] LEA RCX,[0x145282] MOV ESI,0x144a LAB_00112f07: XOR EAX,EAX CALL 0x0010c040
/* int ggml::cpu::aarch64::repack<block_iq4_nl, 4l, 4l>(ggml_tensor*, void const*, unsigned long) */ int ggml::cpu::aarch64::repack<block_iq4_nl,4l,4l>(ggml_tensor *param_1,void *param_2,ulong param_3) { int iVar1; int iVar2; int iVar3; char *pcVar4; int8 uVar5; ulong uVar6; int iVar7; int8 *puVar8; ulong uVar9; int8 *puVar10; int8 *puVar11; long lVar12; int8 local_c0; int8 uStack_b8; int8 uStack_b0; int8 uStack_a8; int8 local_a0; int8 uStack_98; int8 uStack_90; int8 uStack_88; int8 local_80; int8 local_78; int8 uStack_70; int2 auStack_68 [28]; if (*(int *)param_1 == 0x14) { puVar10 = *(int8 **)(param_1 + 0xf8); iVar1 = ggml_nrows(); iVar2 = (int)((long)*(ulong *)(param_1 + 0x10) / 0x20); if ((long)(iVar1 * iVar2) * 0x12 - param_3 == 0) { if ((*(ulong *)(param_1 + 0x10) & 7) == 0 && (*(ulong *)(param_1 + 0x18) & 3) == 0) { uVar6 = (ulong)iVar2; iVar3 = 0; for (iVar7 = 0; iVar7 < iVar1; iVar7 = iVar7 + 4) { puVar8 = (int8 *)param_2; for (uVar9 = 0; uVar9 != (~((long)uVar6 >> 0x3f) & uVar6); uVar9 = uVar9 + 1) { puVar11 = puVar8; for (lVar12 = 0; lVar12 != 0x48; lVar12 = lVar12 + 0x12) { *(int2 *)((long)auStack_68 + lVar12) = *(int2 *)(puVar11 + 2); uVar5 = puVar11[1]; *(int8 *)((long)&local_78 + lVar12) = *puVar11; *(int8 *)((long)&uStack_70 + lVar12) = uVar5; puVar11 = (int8 *)((long)puVar11 + uVar6 * 0x12); } puVar11 = &local_78; for (lVar12 = 0; lVar12 != 4; lVar12 = lVar12 + 1) { *(int2 *)((long)&local_c0 + lVar12 * 2) = *(int2 *)puVar11; puVar11 = (int8 *)((long)puVar11 + 0x12); } for (lVar12 = 0; lVar12 != 0x10; lVar12 = lVar12 + 1) { *(int4 *)((long)&uStack_b8 + lVar12 * 4) = *(int4 *) ((long)&local_78 + (ulong)((uint)lVar12 & 0xc) + (ulong)((uint)lVar12 & 3) * 0x12 + 2); } puVar10[8] = local_80; puVar10[4] = local_a0; puVar10[5] = uStack_98; puVar10[6] = uStack_90; puVar10[7] = uStack_88; *puVar10 = local_c0; puVar10[1] = uStack_b8; puVar10[2] = uStack_b0; puVar10[3] = uStack_a8; puVar10 = puVar10 + 9; puVar8 = (int8 *)((long)puVar8 + 0x12); } param_2 = (void *)((long)param_2 + (long)(iVar2 * 4) * 0x12); } } else { iVar3 = -1; } return iVar3; } pcVar4 = "data_size == nrow * nblocks * sizeof(block_iq4_nl)"; uVar5 = 0x144a; } else { pcVar4 = "t->type == GGML_TYPE_IQ4_NL"; uVar5 = 0x143f; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp" ,uVar5,"GGML_ASSERT(%s) failed",pcVar4); }