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
61,600
blst_core_verify_pk_in_g1
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/aggregate.c
BLST_ERROR blst_core_verify_pk_in_g1(const POINTonE1_affine *pk, const POINTonE2_affine *signature, int hash_or_encode, const void *msg, size_t msg_len, const void *DST, size_t DST_len, const void *aug, size_t aug_len) { PAIRING ctx; BLST_ERROR ret; ctx.ctrl = AGGR_UNDEFINED | (hash_or_encode ? AGGR_HASH_OR_ENCODE : 0); ctx.nelems = 0; ctx.DST = DST; ctx.DST_len = DST_len; ret = PAIRING_Aggregate_PK_in_G1(&ctx, pk, 1, signature, 1, NULL, 0, msg, msg_len, aug, aug_len); if (ret != BLST_SUCCESS) return ret; PAIRING_Commit(&ctx); return PAIRING_FinalVerify(&ctx, NULL) ? BLST_SUCCESS : BLST_VERIFY_FAIL; }
O3
c
blst_core_verify_pk_in_g1: pushq %rbp movq %rsp, %rbp pushq %rbx subq $0xca8, %rsp # imm = 0xCA8 movq %rcx, %rax movq %rsi, %rcx movq %rdi, %rsi xorl %r10d, %r10d testl %edx, %edx setne %r10b movups 0x18(%rbp), %xmm0 movq 0x10(%rbp), %rdx shll $0x6, %r10d leaq -0xc80(%rbp), %rdi movl %r10d, (%rdi) movl $0x0, 0x4(%rdi) movq %r9, 0x8(%rdi) movq %rdx, 0x10(%rdi) movups %xmm0, 0x18(%rsp) movq %r8, 0x10(%rsp) movq %rax, 0x8(%rsp) movq $0x0, (%rsp) movl $0x1, %edx movl $0x1, %r8d xorl %r9d, %r9d callq 0x5f6ff testl %eax, %eax jne 0x60203 leaq -0xc80(%rbp), %rbx movq %rbx, %rdi callq 0x5fb35 movq %rbx, %rdi xorl %esi, %esi callq 0x5fcf3 xorl %ecx, %ecx testq %rax, %rax sete %cl leal (%rcx,%rcx,4), %eax addq $0xca8, %rsp # imm = 0xCA8 popq %rbx popq %rbp retq
blst_core_verify_pk_in_g1: push rbp mov rbp, rsp push rbx sub rsp, 0CA8h mov rax, rcx mov rcx, rsi mov rsi, rdi xor r10d, r10d test edx, edx setnz r10b movups xmm0, [rbp+arg_8] mov rdx, [rbp+arg_0] shl r10d, 6 lea rdi, [rbp+var_C80] mov [rdi], r10d mov dword ptr [rdi+4], 0 mov [rdi+8], r9 mov [rdi+10h], rdx movups [rsp+0CB0h+var_C98], xmm0 mov [rsp+0CB0h+var_CA0], r8 mov [rsp+0CB0h+var_CA8], rax mov [rsp+0CB0h+var_CB0], 0 mov edx, 1 mov r8d, 1 xor r9d, r9d call PAIRING_Aggregate_PK_in_G1 test eax, eax jnz short loc_60203 lea rbx, [rbp+var_C80] mov rdi, rbx call PAIRING_Commit mov rdi, rbx xor esi, esi call PAIRING_FinalVerify xor ecx, ecx test rax, rax setz cl lea eax, [rcx+rcx*4] loc_60203: add rsp, 0CA8h pop rbx pop rbp retn
long long blst_core_verify_pk_in_g1( _BYTE *a1, long long a2, int a3, long long a4, long long a5, long long a6, long long a7, __int128 a8) { long long result; // rax _QWORD v9[400]; // [rsp+30h] [rbp-C80h] BYREF v9[0] = (unsigned __int8)(a3 != 0) << 6; v9[1] = a6; v9[2] = a7; result = PAIRING_Aggregate_PK_in_G1((long long)v9, a1, 1LL, a2, 1LL, 0LL, 0LL, a4, a5, a8, *((long long *)&a8 + 1)); if ( !(_DWORD)result ) { PAIRING_Commit((long long)v9); return 5 * (unsigned int)(PAIRING_FinalVerify(v9, 0LL) == 0); } return result; }
blst_core_verify_pk_in_g1: PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0xca8 MOV RAX,RCX MOV RCX,RSI MOV RSI,RDI XOR R10D,R10D TEST EDX,EDX SETNZ R10B MOVUPS XMM0,xmmword ptr [RBP + 0x18] MOV RDX,qword ptr [RBP + 0x10] SHL R10D,0x6 LEA RDI,[RBP + -0xc80] MOV dword ptr [RDI],R10D MOV dword ptr [RDI + 0x4],0x0 MOV qword ptr [RDI + 0x8],R9 MOV qword ptr [RDI + 0x10],RDX MOVUPS xmmword ptr [RSP + 0x18],XMM0 MOV qword ptr [RSP + 0x10],R8 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP],0x0 MOV EDX,0x1 MOV R8D,0x1 XOR R9D,R9D CALL 0x0015f6ff TEST EAX,EAX JNZ 0x00160203 LEA RBX,[RBP + -0xc80] MOV RDI,RBX CALL 0x0015fb35 MOV RDI,RBX XOR ESI,ESI CALL 0x0015fcf3 XOR ECX,ECX TEST RAX,RAX SETZ CL LEA EAX,[RCX + RCX*0x4] LAB_00160203: ADD RSP,0xca8 POP RBX POP RBP RET
ulong blst_core_verify_pk_in_g1 (int8 param_1,int8 param_2,int param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int4 param_8, int4 param_9) { ulong uVar1; long lVar2; int local_c88 [2]; int8 local_c80; int8 local_c78; local_c88[0] = (uint)(param_3 != 0) << 6; local_c88[1] = 0; local_c78 = param_7; local_c80 = param_6; uVar1 = PAIRING_Aggregate_PK_in_G1 (local_c88,param_1,1,param_2,1,0,0,param_4,param_5,param_8,param_9); if ((int)uVar1 == 0) { PAIRING_Commit(local_c88); lVar2 = PAIRING_FinalVerify(local_c88,0); uVar1 = (ulong)((uint)(lVar2 == 0) * 5); } return uVar1; }
61,601
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_float(double)
monkey531[P]llama/common/./json.hpp
void dump_float(number_float_t x) { // NaN / inf if (!std::isfinite(x)) { o->write_characters("null", 4); return; } // If number_float_t is an IEEE-754 single or double precision number, // use the Grisu2 algorithm to produce short numbers which are // guaranteed to round-trip, using strtof and strtod, resp. // // NB: The test below works if <long double> == <double>. static constexpr bool is_ieee_single_or_double = (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 24 && std::numeric_limits<number_float_t>::max_exponent == 128) || (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 53 && std::numeric_limits<number_float_t>::max_exponent == 1024); dump_float(x, std::integral_constant<bool, is_ieee_single_or_double>()); }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_float(double): subq $0x28, %rsp movq %rdi, 0x20(%rsp) movsd %xmm0, 0x18(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x8(%rsp) movsd 0x18(%rsp), %xmm0 callq 0xb8c30 testb $0x1, %al jne 0x1183d9 movq 0x8(%rsp), %rdi callq 0x116c30 movq %rax, %rdi movq (%rdi), %rax leaq 0xb9530(%rip), %rsi # 0x1d18ff movl $0x4, %edx callq *0x8(%rax) jmp 0x1183e9 movq 0x8(%rsp), %rdi movsd 0x18(%rsp), %xmm0 callq 0x118eb0 addq $0x28, %rsp retq nop
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10dump_floatEd: sub rsp, 28h mov [rsp+28h+var_8], rdi movsd [rsp+28h+var_10], xmm0 mov rax, [rsp+28h+var_8] mov [rsp+28h+var_20], rax movsd xmm0, [rsp+28h+var_10]; double call _ZSt8isfinited; std::isfinite(double) test al, 1 jnz short loc_1183D9 mov rdi, [rsp+28h+var_20] call _ZNKSt19__shared_ptr_accessIN8nlohmann16json_abi_v3_11_36detail23output_adapter_protocolIcEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, rax mov rax, [rdi] lea rsi, aOnNull_0+5; "null" mov edx, 4 call qword ptr [rax+8] jmp short loc_1183E9 loc_1183D9: mov rdi, [rsp+28h+var_20] movsd xmm0, [rsp+28h+var_10] call _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10dump_floatEdSt17integral_constantIbLb1EE; nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::dump_float(double,std::integral_constant<bool,true>) loc_1183E9: add rsp, 28h retn
long long nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::dump_float( long long a1, double a2) { long long v2; // rax if ( std::isfinite(a2) ) return nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::dump_float( a1, a2); v2 = std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a1); return (*(long long ( **)(long long, char *, long long))(*(_QWORD *)v2 + 8LL))(v2, "null", 4LL); }
61,602
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_float(double)
monkey531[P]llama/common/./json.hpp
void dump_float(number_float_t x) { // NaN / inf if (!std::isfinite(x)) { o->write_characters("null", 4); return; } // If number_float_t is an IEEE-754 single or double precision number, // use the Grisu2 algorithm to produce short numbers which are // guaranteed to round-trip, using strtof and strtod, resp. // // NB: The test below works if <long double> == <double>. static constexpr bool is_ieee_single_or_double = (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 24 && std::numeric_limits<number_float_t>::max_exponent == 128) || (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 53 && std::numeric_limits<number_float_t>::max_exponent == 1024); dump_float(x, std::integral_constant<bool, is_ieee_single_or_double>()); }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_float(double): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq %xmm0, %rax btrq $0x3f, %rax movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000 cmpq %rcx, %rax jl 0x66f7d movq (%rbx), %rdi movq (%rdi), %rax movq 0x8(%rax), %rax leaq 0x541da(%rip), %rsi # 0xbb149 movl $0x4, %edx addq $0x8, %rsp popq %rbx popq %r14 jmpq *%rax leaq 0x10(%rbx), %r14 leaq 0x50(%rbx), %rsi movq %r14, %rdi callq 0x671b7 movq (%rbx), %rdi subq %r14, %rax movq (%rdi), %rcx movq 0x8(%rcx), %rcx movq %r14, %rsi movq %rax, %rdx addq $0x8, %rsp popq %rbx popq %r14 jmpq *%rcx nop
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10dump_floatEd: push r14 push rbx push rax mov rbx, rdi movq rax, xmm0 btr rax, 3Fh ; '?' mov rcx, 7FF0000000000000h cmp rax, rcx jl short loc_66F7D mov rdi, [rbx] mov rax, [rdi] mov rax, [rax+8] lea rsi, aOnNull_0+5; "null" mov edx, 4 add rsp, 8 pop rbx pop r14 jmp rax loc_66F7D: lea r14, [rbx+10h] lea rsi, [rbx+50h] mov rdi, r14; this call _ZN8nlohmann16json_abi_v3_11_36detail8to_charsIdEEPcS3_PKcT_; nlohmann::json_abi_v3_11_3::detail::to_chars<double>(char *,char const*,double) mov rdi, [rbx] sub rax, r14 mov rcx, [rdi] mov rcx, [rcx+8] mov rsi, r14 mov rdx, rax add rsp, 8 pop rbx pop r14 jmp rcx
long long nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::dump_float( _QWORD *a1, double a2) { long long v3; // rax if ( (*(_QWORD *)&a2 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL ) return (*(long long ( **)(_QWORD, char *, long long))(*(_QWORD *)*a1 + 8LL))(*a1, "null", 4LL); v3 = nlohmann::json_abi_v3_11_3::detail::to_chars<double>((nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)(a1 + 2)); return (*(long long ( **)(_QWORD, _QWORD *, long long))(*(_QWORD *)*a1 + 8LL))( *a1, a1 + 2, v3 - (_QWORD)(a1 + 2)); }
dump_float: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOVQ RAX,XMM0 BTR RAX,0x3f MOV RCX,0x7ff0000000000000 CMP RAX,RCX JL 0x00166f7d MOV RDI,qword ptr [RBX] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x8] LEA RSI,[0x1bb149] MOV EDX,0x4 ADD RSP,0x8 POP RBX POP R14 JMP RAX LAB_00166f7d: LEA R14,[RBX + 0x10] LEA RSI,[RBX + 0x50] MOV RDI,R14 CALL 0x001671b7 MOV RDI,qword ptr [RBX] SUB RAX,R14 MOV RCX,qword ptr [RDI] MOV RCX,qword ptr [RCX + 0x8] MOV RSI,R14 MOV RDX,RAX ADD RSP,0x8 POP RBX POP R14 JMP RCX
/* nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::dump_float(double) */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::dump_float(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,double param_1) { serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *psVar1; code *UNRECOVERED_JUMPTABLE; char *pcVar2; if (0x7fefffffffffffff < (ulong)ABS(param_1)) { /* WARNING: Could not recover jumptable at 0x00166f7b. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(**(long **)this + 8))(*(long **)this,"null",4); return; } psVar1 = this + 0x10; pcVar2 = to_chars<double>((char *)psVar1,(char *)(this + 0x50),param_1); UNRECOVERED_JUMPTABLE = *(code **)(**(long **)this + 8); /* WARNING: Could not recover jumptable at 0x00166fa7. Too many branches */ /* WARNING: Treating indirect jump as call */ (*UNRECOVERED_JUMPTABLE)(*(long **)this,psVar1,(long)pcVar2 - (long)psVar1,UNRECOVERED_JUMPTABLE); return; }
61,603
my_strnncoll_binary
eloqsql/strings/ctype-bin.c
static int my_strnncoll_binary(CHARSET_INFO * cs __attribute__((unused)), const uchar *s, size_t slen, const uchar *t, size_t tlen, my_bool t_is_prefix) { size_t len=MY_MIN(slen,tlen); int cmp= memcmp(s,t,len); return cmp ? cmp : (int)((t_is_prefix ? len : slen) - tlen); }
O0
c
my_strnncoll_binary: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movb %r9b, %al movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movb %al, -0x29(%rbp) movq -0x18(%rbp), %rax cmpq -0x28(%rbp), %rax jae 0x95726 movq -0x18(%rbp), %rax movq %rax, -0x48(%rbp) jmp 0x9572e movq -0x28(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x38(%rbp), %rdx callq 0x38b10 movl %eax, -0x3c(%rbp) cmpl $0x0, -0x3c(%rbp) je 0x95758 movl -0x3c(%rbp), %eax movl %eax, -0x4c(%rbp) jmp 0x9577e movsbl -0x29(%rbp), %eax cmpl $0x0, %eax je 0x9576b movq -0x38(%rbp), %rax movq %rax, -0x58(%rbp) jmp 0x95773 movq -0x18(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax subq -0x28(%rbp), %rax movl %eax, -0x4c(%rbp) movl -0x4c(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopw (%rax,%rax)
my_strnncoll_binary: push rbp mov rbp, rsp sub rsp, 60h mov al, r9b mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_29], al mov rax, [rbp+var_18] cmp rax, [rbp+var_28] jnb short loc_95726 mov rax, [rbp+var_18] mov [rbp+var_48], rax jmp short loc_9572E loc_95726: mov rax, [rbp+var_28] mov [rbp+var_48], rax loc_9572E: mov rax, [rbp+var_48] mov [rbp+var_38], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] mov rdx, [rbp+var_38] call _memcmp mov [rbp+var_3C], eax cmp [rbp+var_3C], 0 jz short loc_95758 mov eax, [rbp+var_3C] mov [rbp+var_4C], eax jmp short loc_9577E loc_95758: movsx eax, [rbp+var_29] cmp eax, 0 jz short loc_9576B mov rax, [rbp+var_38] mov [rbp+var_58], rax jmp short loc_95773 loc_9576B: mov rax, [rbp+var_18] mov [rbp+var_58], rax loc_95773: mov rax, [rbp+var_58] sub rax, [rbp+var_28] mov [rbp+var_4C], eax loc_9577E: mov eax, [rbp+var_4C] add rsp, 60h pop rbp retn
long long my_strnncoll_binary( long long a1, long long a2, unsigned long long a3, long long a4, unsigned long long a5, char a6) { int v7; // [rsp+8h] [rbp-58h] unsigned long long v9; // [rsp+18h] [rbp-48h] unsigned int v10; // [rsp+24h] [rbp-3Ch] int v12; // [rsp+38h] [rbp-28h] int v13; // [rsp+48h] [rbp-18h] v13 = a3; v12 = a5; if ( a3 >= a5 ) v9 = a5; else v9 = a3; v10 = memcmp(a2, a4, v9); if ( v10 ) { return v10; } else { if ( a6 ) v7 = v9; else v7 = v13; return (unsigned int)(v7 - v12); } }
my_strnncoll_binary: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV AL,R9B MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV byte ptr [RBP + -0x29],AL MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x28] JNC 0x00195726 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x48],RAX JMP 0x0019572e LAB_00195726: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x48],RAX LAB_0019572e: MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x38] CALL 0x00138b10 MOV dword ptr [RBP + -0x3c],EAX CMP dword ptr [RBP + -0x3c],0x0 JZ 0x00195758 MOV EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x4c],EAX JMP 0x0019577e LAB_00195758: MOVSX EAX,byte ptr [RBP + -0x29] CMP EAX,0x0 JZ 0x0019576b MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x58],RAX JMP 0x00195773 LAB_0019576b: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x58],RAX LAB_00195773: MOV RAX,qword ptr [RBP + -0x58] SUB RAX,qword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x4c],EAX LAB_0019577e: MOV EAX,dword ptr [RBP + -0x4c] ADD RSP,0x60 POP RBP RET
int my_strnncoll_binary(int8 param_1,void *param_2,ulong param_3,void *param_4,ulong param_5, char param_6) { ulong local_60; int local_54; size_t local_50; local_50 = param_5; if (param_3 < param_5) { local_50 = param_3; } local_54 = memcmp(param_2,param_4,local_50); if (local_54 == 0) { local_60 = param_3; if (param_6 != '\0') { local_60 = local_50; } local_54 = (int)local_60 - (int)param_5; } return local_54; }
61,604
ggml_compute_forward_cos
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
static void ggml_compute_forward_cos( const struct ggml_compute_params * params, struct ggml_tensor * dst) { const struct ggml_tensor * src0 = dst->src[0]; switch (src0->type) { case GGML_TYPE_F32: { ggml_compute_forward_cos_f32(params, dst); } break; default: { GGML_ABORT("fatal error"); } } }
O0
c
ggml_compute_forward_cos: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x98(%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movl (%rax), %eax testl %eax, %eax jne 0x146ea jmp 0x146db movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x25700 jmp 0x14704 leaq 0x5f471(%rip), %rdi # 0x73b62 movl $0x1569, %esi # imm = 0x1569 leaq 0x5f6c0(%rip), %rdx # 0x73dbd movb $0x0, %al callq 0xe270 addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
ggml_compute_forward_cos: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov rax, [rax+98h] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov eax, [rax] test eax, eax jnz short loc_146EA jmp short $+2 loc_146DB: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call ggml_compute_forward_cos_f32 jmp short loc_14704 loc_146EA: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 1569h lea rdx, aFatalError; "fatal error" mov al, 0 call _ggml_abort loc_14704: add rsp, 20h pop rbp retn
double ggml_compute_forward_cos(long long a1, long long a2) { double result; // xmm0_8 if ( **(_DWORD **)(a2 + 152) ) return ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 5481LL, "fatal error"); ggml_compute_forward_cos_f32(a1, a2); return result; }
ggml_compute_forward_cos: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x98] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] TEST EAX,EAX JNZ 0x001146ea JMP 0x001146db LAB_001146db: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x00125700 JMP 0x00114704 LAB_001146ea: LEA RDI,[0x173b62] MOV ESI,0x1569 LEA RDX,[0x173dbd] MOV AL,0x0 CALL 0x0010e270 LAB_00114704: ADD RSP,0x20 POP RBP RET
void ggml_compute_forward_cos(int8 param_1,long param_2) { if (**(int **)(param_2 + 0x98) == 0) { ggml_compute_forward_cos_f32(param_1,param_2); } else { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x1569,"fatal error"); } return; }
61,605
common_log::add(ggml_log_level, char const*, __va_list_tag*)
monkey531[P]llama/common/log.cpp
void add(enum ggml_log_level level, const char * fmt, va_list args) { std::lock_guard<std::mutex> lock(mtx); if (!running) { // discard messages while the worker thread is paused return; } auto & entry = entries[tail]; { // cannot use args twice, so make a copy in case we need to expand the buffer va_list args_copy; va_copy(args_copy, args); #if 1 const size_t n = vsnprintf(entry.msg.data(), entry.msg.size(), fmt, args); if (n >= entry.msg.size()) { entry.msg.resize(n + 1); vsnprintf(entry.msg.data(), entry.msg.size(), fmt, args_copy); } #else // hack for bolding arguments std::stringstream ss; for (int i = 0; fmt[i] != 0; i++) { if (fmt[i] == '%') { ss << LOG_COL_BOLD; while (fmt[i] != ' ' && fmt[i] != ')' && fmt[i] != ']' && fmt[i] != 0) ss << fmt[i++]; ss << LOG_COL_DEFAULT; if (fmt[i] == 0) break; } ss << fmt[i]; } const size_t n = vsnprintf(entry.msg.data(), entry.msg.size(), ss.str().c_str(), args); if (n >= entry.msg.size()) { entry.msg.resize(n + 1); vsnprintf(entry.msg.data(), entry.msg.size(), ss.str().c_str(), args_copy); } #endif va_end(args_copy); } entry.level = level; entry.prefix = prefix; entry.timestamp = 0; if (timestamps) { entry.timestamp = t_us() - t_start; } entry.is_end = false; tail = (tail + 1) % entries.size(); if (tail == head) { // expand the buffer std::vector<common_log_entry> new_entries(2*entries.size()); size_t new_tail = 0; do { new_entries[new_tail] = std::move(entries[head]); head = (head + 1) % entries.size(); new_tail = (new_tail + 1); } while (head != tail); head = 0; tail = new_tail; for (size_t i = tail; i < new_entries.size(); i++) { new_entries[i].msg.resize(256); } entries = std::move(new_entries); } cv.notify_one(); }
O1
cpp
common_log::add(ggml_log_level, char const*, __va_list_tag*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rcx, %r15 movq %rdx, %r14 movl %esi, %ebp movq %rdi, %rbx callq 0x1bd00 testl %eax, %eax jne 0xce829 cmpb $0x1, 0x6a(%rbx) jne 0xce812 movl %ebp, 0xc(%rsp) movq 0x78(%rbx), %r13 movq 0x98(%rbx), %rax leaq (%rax,%rax,2), %rbp shlq $0x4, %rbp movq %r13, %r12 addq %rbp, %r12 movq 0x10(%r15), %rax movq %rax, 0x40(%rsp) movups (%r15), %xmm0 movaps %xmm0, 0x30(%rsp) movq 0x10(%r13,%rbp), %rdi movq 0x18(%r13,%rbp), %rsi subq %rdi, %rsi movq %r14, %rdx movq %r15, %rcx callq 0x1c1b8 movslq %eax, %rsi movq 0x18(%r13,%rbp), %rax subq 0x10(%r13,%rbp), %rax cmpq %rsi, %rax ja 0xce614 leaq 0x10(,%rbp), %rdi addq %r13, %rdi incq %rsi callq 0x80382 movq 0x10(%r12), %rdi movq 0x18(%r12), %rsi subq %rdi, %rsi leaq 0x30(%rsp), %rcx movq %r14, %rdx callq 0x1c1b8 movl 0xc(%rsp), %eax movl %eax, (%r12) movb 0x68(%rbx), %al movb %al, 0x4(%r12) movq $0x0, 0x8(%r12) cmpb $0x1, 0x69(%rbx) jne 0xce65c callq 0x1b090 movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF imulq %rcx movq %rdx, %rax shrq $0x3f, %rax sarq $0x7, %rdx addq %rax, %rdx subq 0x70(%rbx), %rdx movq %rdx, 0x8(%r12) movb $0x0, 0x28(%r12) movq 0x80(%rbx), %rsi movq 0x98(%rbx), %rax incq %rax subq 0x78(%rbx), %rsi sarq $0x4, %rsi movabsq $-0x5555555555555555, %r14 # imm = 0xAAAAAAAAAAAAAAAB imulq %r14, %rsi xorl %edx, %edx divq %rsi movq %rdx, 0x98(%rbx) cmpq 0x90(%rbx), %rdx jne 0xce809 addq %rsi, %rsi leaq 0x10(%rsp), %rdi leaq 0x30(%rsp), %rdx movq %rbx, (%rsp) callq 0xcf2a2 movl $0x10, %r12d xorl %ebp, %ebp xorl %r13d, %r13d movq 0x78(%rbx), %rax movq 0x90(%rbx), %rcx leaq (%rcx,%rcx,2), %rcx shlq $0x4, %rcx movq 0x10(%rsp), %r15 movq %r14, %rbx leaq (%rax,%rcx), %r14 addq $0x10, %r14 movups -0x10(%r14), %xmm0 movups %xmm0, (%r15,%rbp) leaq (%r15,%r12), %rdi movq %r14, %rsi callq 0xcf32e movb 0x18(%r14), %al movq %rbx, %r14 movq (%rsp), %rbx movb %al, 0x28(%r15,%rbp) movq 0x80(%rbx), %rcx movq 0x90(%rbx), %rax incq %rax subq 0x78(%rbx), %rcx sarq $0x4, %rcx imulq %r14, %rcx xorl %edx, %edx divq %rcx movq %rdx, 0x90(%rbx) incq %r13 addq $0x30, %r12 addq $0x30, %rbp cmpq 0x98(%rbx), %rdx jne 0xce6c3 movq $0x0, 0x90(%rbx) movq %r13, 0x98(%rbx) movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rcx movq %rcx, %rax subq %rdi, %rax sarq $0x4, %rax imulq %r14, %rax cmpq %rax, %r13 jae 0xce7aa addq %r12, %rdi movl $0x100, %esi # imm = 0x100 callq 0x80382 incq %r13 movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rcx movq %rcx, %rax subq %rdi, %rax sarq $0x4, %rax imulq %r14, %rax addq $0x30, %r12 jmp 0xce777 xorps %xmm0, %xmm0 leaq 0x30(%rsp), %rax movaps %xmm0, (%rax) movq $0x0, 0x10(%rax) movups 0x78(%rbx), %xmm0 movq 0x88(%rbx), %rdx movq %rdi, 0x78(%rbx) movq %rcx, 0x80(%rbx) leaq 0x10(%rsp), %r14 movq 0x10(%r14), %rcx movq %rcx, 0x88(%rbx) movq 0x10(%rax), %rcx movq %rdx, 0x10(%rax) movaps (%rax), %xmm1 movaps %xmm0, (%rax) movaps %xmm1, (%r14) movq %rcx, 0x10(%r14) movq %rax, %rdi callq 0xceb12 movq %r14, %rdi callq 0xceb12 leaq 0x30(%rbx), %rdi callq 0x1b450 movq %rbx, %rdi callq 0x1b6c0 addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %eax, %edi callq 0x1b5f0 jmp 0xce836 movq %rbx, (%rsp) movq %rax, %r14 jmp 0xce848 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0xceb12 movq (%rsp), %rdi callq 0x1b6c0 movq %r14, %rdi callq 0x1bfc0 nop
_ZN10common_log3addE14ggml_log_levelPKcP13__va_list_tag: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r15, rcx mov r14, rdx mov ebp, esi mov rbx, rdi call _pthread_mutex_lock test eax, eax jnz loc_CE829 cmp byte ptr [rbx+6Ah], 1 jnz loc_CE812 mov [rsp+78h+var_6C], ebp mov r13, [rbx+78h] mov rax, [rbx+98h] lea rbp, [rax+rax*2] shl rbp, 4 mov r12, r13 add r12, rbp mov rax, [r15+10h] mov [rsp+78h+var_38], rax movups xmm0, xmmword ptr [r15] movaps [rsp+78h+var_48], xmm0 mov rdi, [r13+rbp+10h] mov rsi, [r13+rbp+18h] sub rsi, rdi mov rdx, r14 mov rcx, r15 call vsnprintf movsxd rsi, eax mov rax, [r13+rbp+18h] sub rax, [r13+rbp+10h] cmp rax, rsi ja short loc_CE614 lea rdi, ds:10h[rbp] add rdi, r13 inc rsi call _ZNSt6vectorIcSaIcEE6resizeEm; std::vector<char>::resize(ulong) mov rdi, [r12+10h]; this mov rsi, [r12+18h] sub rsi, rdi lea rcx, [rsp+78h+var_48] mov rdx, r14 call vsnprintf loc_CE614: mov eax, [rsp+78h+var_6C] mov [r12], eax mov al, [rbx+68h] mov [r12+4], al mov qword ptr [r12+8], 0 cmp byte ptr [rbx+69h], 1 jnz short loc_CE65C call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void) mov rcx, 20C49BA5E353F7CFh imul rcx mov rax, rdx shr rax, 3Fh sar rdx, 7 add rdx, rax sub rdx, [rbx+70h] mov [r12+8], rdx loc_CE65C: mov byte ptr [r12+28h], 0 mov rsi, [rbx+80h] mov rax, [rbx+98h] inc rax sub rsi, [rbx+78h] sar rsi, 4 mov r14, 0AAAAAAAAAAAAAAABh imul rsi, r14 xor edx, edx div rsi mov [rbx+98h], rdx cmp rdx, [rbx+90h] jnz loc_CE809 add rsi, rsi lea rdi, [rsp+78h+var_68] lea rdx, [rsp+78h+var_48] mov [rsp+78h+var_78], rbx call _ZNSt6vectorI16common_log_entrySaIS0_EEC2EmRKS1_; std::vector<common_log_entry>::vector(ulong,std::allocator<common_log_entry> const&) mov r12d, 10h xor ebp, ebp xor r13d, r13d loc_CE6C3: mov rax, [rbx+78h] mov rcx, [rbx+90h] lea rcx, [rcx+rcx*2] shl rcx, 4 mov r15, [rsp+78h+var_68] mov rbx, r14 lea r14, [rax+rcx] add r14, 10h movups xmm0, xmmword ptr [r14-10h] movups xmmword ptr [r15+rbp], xmm0 lea rdi, [r15+r12] mov rsi, r14 call _ZNSt6vectorIcSaIcEE14_M_move_assignEOS1_St17integral_constantIbLb1EE; std::vector<char>::_M_move_assign(std::vector<char>&&,std::integral_constant<bool,true>) mov al, [r14+18h] mov r14, rbx mov rbx, [rsp+78h+var_78] mov [r15+rbp+28h], al mov rcx, [rbx+80h] mov rax, [rbx+90h] inc rax sub rcx, [rbx+78h] sar rcx, 4 imul rcx, r14 xor edx, edx div rcx mov [rbx+90h], rdx inc r13 add r12, 30h ; '0' add rbp, 30h ; '0' cmp rdx, [rbx+98h] jnz loc_CE6C3 mov qword ptr [rbx+90h], 0 mov [rbx+98h], r13 mov rdi, [rsp+78h+var_68] mov rcx, [rsp+78h+var_60] mov rax, rcx sub rax, rdi sar rax, 4 imul rax, r14 loc_CE777: cmp r13, rax jnb short loc_CE7AA add rdi, r12 mov esi, 100h call _ZNSt6vectorIcSaIcEE6resizeEm; std::vector<char>::resize(ulong) inc r13 mov rdi, [rsp+78h+var_68] mov rcx, [rsp+78h+var_60] mov rax, rcx sub rax, rdi sar rax, 4 imul rax, r14 add r12, 30h ; '0' jmp short loc_CE777 loc_CE7AA: xorps xmm0, xmm0 lea rax, [rsp+78h+var_48] movaps xmmword ptr [rax], xmm0 mov qword ptr [rax+10h], 0 movups xmm0, xmmword ptr [rbx+78h] mov rdx, [rbx+88h] mov [rbx+78h], rdi mov [rbx+80h], rcx lea r14, [rsp+78h+var_68] mov rcx, [r14+10h] mov [rbx+88h], rcx mov rcx, [rax+10h] mov [rax+10h], rdx movaps xmm1, xmmword ptr [rax] movaps xmmword ptr [rax], xmm0 movaps xmmword ptr [r14], xmm1 mov [r14+10h], rcx mov rdi, rax call _ZNSt6vectorI16common_log_entrySaIS0_EED2Ev; std::vector<common_log_entry>::~vector() mov rdi, r14 call _ZNSt6vectorI16common_log_entrySaIS0_EED2Ev; std::vector<common_log_entry>::~vector() loc_CE809: lea rdi, [rbx+30h]; this call __ZNSt18condition_variable10notify_oneEv; std::condition_variable::notify_one(void) loc_CE812: mov rdi, rbx call _pthread_mutex_unlock add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_CE829: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) jmp short loc_CE836 mov [rsp+78h+var_78], rbx loc_CE836: mov r14, rax jmp short loc_CE848 mov r14, rax lea rdi, [rsp+78h+var_68] call _ZNSt6vectorI16common_log_entrySaIS0_EED2Ev; std::vector<common_log_entry>::~vector() loc_CE848: mov rdi, [rsp+78h+var_78] call _pthread_mutex_unlock mov rdi, r14 call __Unwind_Resume
long long common_log::add(long long a1, int a2, long long a3, __int128 *a4) { long long v6; // rbx int v7; // eax long long v8; // r13 long long v9; // rbp long long v10; // r12 std::chrono::_V2::system_clock *v11; // rdi unsigned long long v12; // rsi unsigned long long v13; // r14 unsigned long long v14; // rsi unsigned long long v15; // rdx long long v16; // r12 long long v17; // rbp unsigned long long v18; // r13 long long v19; // rax long long v20; // rcx long long v21; // r15 unsigned long long v22; // rbx long long v23; // r14 char v24; // al unsigned long long v25; // rdx __int128 v26; // kr00_16 unsigned long long v27; // rax __int128 v28; // xmm0 long long v29; // rdx long long v30; // rcx __int128 v31; // xmm1 long long v33; // [rsp+0h] [rbp-78h] __int128 v35; // [rsp+10h] [rbp-68h] BYREF long long v36; // [rsp+20h] [rbp-58h] __int128 v37; // [rsp+30h] [rbp-48h] BYREF long long v38; // [rsp+40h] [rbp-38h] v6 = a1; v7 = pthread_mutex_lock(); if ( v7 ) std::__throw_system_error(v7); if ( *(_BYTE *)(a1 + 106) == 1 ) { v8 = *(_QWORD *)(a1 + 120); v9 = 48LL * *(_QWORD *)(a1 + 152); v10 = v9 + v8; v38 = *((_QWORD *)a4 + 2); v37 = *a4; v11 = *(std::chrono::_V2::system_clock **)(v8 + v9 + 16); v12 = (int)vsnprintf(v11, *(_QWORD *)(v8 + v9 + 24) - (_QWORD)v11, a3, a4); if ( *(_QWORD *)(v8 + v9 + 24) - *(_QWORD *)(v8 + v9 + 16) <= v12 ) { std::vector<char>::resize((_QWORD *)(v8 + v9 + 16), v12 + 1); v11 = *(std::chrono::_V2::system_clock **)(v10 + 16); vsnprintf(v11, *(_QWORD *)(v10 + 24) - (_QWORD)v11, a3, &v37); } *(_DWORD *)v10 = a2; *(_BYTE *)(v10 + 4) = *(_BYTE *)(v6 + 104); *(_QWORD *)(v10 + 8) = 0LL; if ( *(_BYTE *)(v6 + 105) == 1 ) *(_QWORD *)(v10 + 8) = std::chrono::_V2::system_clock::now(v11) / 1000LL - *(_QWORD *)(v6 + 112); *(_BYTE *)(v10 + 40) = 0; v13 = 0xAAAAAAAAAAAAAAABLL; v14 = 0xAAAAAAAAAAAAAAABLL * ((long long)(*(_QWORD *)(v6 + 128) - *(_QWORD *)(v6 + 120)) >> 4); v15 = (*(_QWORD *)(v6 + 152) + 1LL) % v14; *(_QWORD *)(v6 + 152) = v15; if ( v15 == *(_QWORD *)(v6 + 144) ) { v33 = v6; std::vector<common_log_entry>::vector(&v35, 2 * v14, &v37); v16 = 16LL; v17 = 0LL; v18 = 0LL; do { v19 = *(_QWORD *)(v6 + 120); v20 = 48LL * *(_QWORD *)(v6 + 144); v21 = v35; v22 = v13; v23 = v19 + v20 + 16; *(_OWORD *)(v35 + v17) = *(_OWORD *)(v19 + v20); std::vector<char>::_M_move_assign(v21 + v16, v23); v24 = *(_BYTE *)(v23 + 24); v13 = v22; v6 = v33; *(_BYTE *)(v21 + v17 + 40) = v24; v25 = (*(_QWORD *)(v33 + 144) + 1LL) % (v13 * ((long long)(*(_QWORD *)(v6 + 128) - *(_QWORD *)(v6 + 120)) >> 4)); *(_QWORD *)(v33 + 144) = v25; ++v18; v16 += 48LL; v17 += 48LL; } while ( v25 != *(_QWORD *)(v33 + 152) ); *(_QWORD *)(v33 + 144) = 0LL; *(_QWORD *)(v33 + 152) = v18; v26 = v35; v27 = v13 * ((long long)(*((_QWORD *)&v35 + 1) - v35) >> 4); while ( v18 < v27 ) { std::vector<char>::resize((_QWORD *)(v16 + v26), 0x100uLL); ++v18; v27 = v13 * ((long long)(*((_QWORD *)&v35 + 1) - v35) >> 4); v16 += 48LL; v26 = v35; } v37 = 0LL; v38 = 0LL; v28 = *(_OWORD *)(v33 + 120); v29 = *(_QWORD *)(v33 + 136); *(_OWORD *)(v33 + 120) = v26; *(_QWORD *)(v33 + 136) = v36; v30 = v38; v38 = v29; v31 = v37; v37 = v28; v35 = v31; v36 = v30; std::vector<common_log_entry>::~vector(&v37); std::vector<common_log_entry>::~vector(&v35); } std::condition_variable::notify_one((std::condition_variable *)(v6 + 48)); } return pthread_mutex_unlock(v6); }
add: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R15,RCX MOV R14,RDX MOV EBP,ESI MOV RBX,RDI CALL 0x0011bd00 TEST EAX,EAX JNZ 0x001ce829 CMP byte ptr [RBX + 0x6a],0x1 JNZ 0x001ce812 MOV dword ptr [RSP + 0xc],EBP MOV R13,qword ptr [RBX + 0x78] MOV RAX,qword ptr [RBX + 0x98] LEA RBP,[RAX + RAX*0x2] SHL RBP,0x4 MOV R12,R13 ADD R12,RBP MOV RAX,qword ptr [R15 + 0x10] MOV qword ptr [RSP + 0x40],RAX MOVUPS XMM0,xmmword ptr [R15] MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOV RDI,qword ptr [R13 + RBP*0x1 + 0x10] MOV RSI,qword ptr [R13 + RBP*0x1 + 0x18] SUB RSI,RDI MOV RDX,R14 MOV RCX,R15 CALL 0x0011c1b8 MOVSXD RSI,EAX MOV RAX,qword ptr [R13 + RBP*0x1 + 0x18] SUB RAX,qword ptr [R13 + RBP*0x1 + 0x10] CMP RAX,RSI JA 0x001ce614 LEA RDI,[0x10 + RBP*0x1] ADD RDI,R13 INC RSI LAB_001ce5f5: CALL 0x00180382 MOV RDI,qword ptr [R12 + 0x10] MOV RSI,qword ptr [R12 + 0x18] SUB RSI,RDI LEA RCX,[RSP + 0x30] MOV RDX,R14 CALL 0x0011c1b8 LAB_001ce614: MOV EAX,dword ptr [RSP + 0xc] MOV dword ptr [R12],EAX MOV AL,byte ptr [RBX + 0x68] MOV byte ptr [R12 + 0x4],AL MOV qword ptr [R12 + 0x8],0x0 CMP byte ptr [RBX + 0x69],0x1 JNZ 0x001ce65c CALL 0x0011b090 MOV RCX,0x20c49ba5e353f7cf IMUL RCX MOV RAX,RDX SHR RAX,0x3f SAR RDX,0x7 ADD RDX,RAX SUB RDX,qword ptr [RBX + 0x70] MOV qword ptr [R12 + 0x8],RDX LAB_001ce65c: MOV byte ptr [R12 + 0x28],0x0 MOV RSI,qword ptr [RBX + 0x80] MOV RAX,qword ptr [RBX + 0x98] INC RAX SUB RSI,qword ptr [RBX + 0x78] SAR RSI,0x4 MOV R14,-0x5555555555555555 IMUL RSI,R14 XOR EDX,EDX DIV RSI MOV qword ptr [RBX + 0x98],RDX CMP RDX,qword ptr [RBX + 0x90] JNZ 0x001ce809 ADD RSI,RSI LAB_001ce6a5: LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0x30] MOV qword ptr [RSP],RBX CALL 0x001cf2a2 MOV R12D,0x10 XOR EBP,EBP XOR R13D,R13D LAB_001ce6c3: MOV RAX,qword ptr [RBX + 0x78] MOV RCX,qword ptr [RBX + 0x90] LEA RCX,[RCX + RCX*0x2] SHL RCX,0x4 MOV R15,qword ptr [RSP + 0x10] MOV RBX,R14 LEA R14,[RAX + RCX*0x1] ADD R14,0x10 MOVUPS XMM0,xmmword ptr [R14 + -0x10] MOVUPS xmmword ptr [R15 + RBP*0x1],XMM0 LEA RDI,[R15 + R12*0x1] MOV RSI,R14 CALL 0x001cf32e MOV AL,byte ptr [R14 + 0x18] MOV R14,RBX MOV RBX,qword ptr [RSP] MOV byte ptr [R15 + RBP*0x1 + 0x28],AL MOV RCX,qword ptr [RBX + 0x80] MOV RAX,qword ptr [RBX + 0x90] INC RAX SUB RCX,qword ptr [RBX + 0x78] SAR RCX,0x4 IMUL RCX,R14 XOR EDX,EDX DIV RCX MOV qword ptr [RBX + 0x90],RDX INC R13 ADD R12,0x30 ADD RBP,0x30 CMP RDX,qword ptr [RBX + 0x98] JNZ 0x001ce6c3 MOV qword ptr [RBX + 0x90],0x0 MOV qword ptr [RBX + 0x98],R13 MOV RDI,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x18] MOV RAX,RCX SUB RAX,RDI SAR RAX,0x4 IMUL RAX,R14 LAB_001ce777: CMP R13,RAX JNC 0x001ce7aa ADD RDI,R12 LAB_001ce77f: MOV ESI,0x100 CALL 0x00180382 LAB_001ce789: INC R13 MOV RDI,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x18] MOV RAX,RCX SUB RAX,RDI SAR RAX,0x4 IMUL RAX,R14 ADD R12,0x30 JMP 0x001ce777 LAB_001ce7aa: XORPS XMM0,XMM0 LEA RAX,[RSP + 0x30] MOVAPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],0x0 MOVUPS XMM0,xmmword ptr [RBX + 0x78] MOV RDX,qword ptr [RBX + 0x88] MOV qword ptr [RBX + 0x78],RDI MOV qword ptr [RBX + 0x80],RCX LEA R14,[RSP + 0x10] MOV RCX,qword ptr [R14 + 0x10] MOV qword ptr [RBX + 0x88],RCX MOV RCX,qword ptr [RAX + 0x10] MOV qword ptr [RAX + 0x10],RDX MOVAPS XMM1,xmmword ptr [RAX] MOVAPS xmmword ptr [RAX],XMM0 MOVAPS xmmword ptr [R14],XMM1 MOV qword ptr [R14 + 0x10],RCX MOV RDI,RAX CALL 0x001ceb12 MOV RDI,R14 CALL 0x001ceb12 LAB_001ce809: LEA RDI,[RBX + 0x30] CALL 0x0011b450 LAB_001ce812: MOV RDI,RBX CALL 0x0011b6c0 ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001ce829: MOV EDI,EAX CALL 0x0011b5f0
/* common_log::add(ggml_log_level, char const*, __va_list_tag*) */ void __thiscall common_log::add(common_log *this,int4 param_2,char *param_3,int8 *param_4) { int4 *puVar1; char *__s; int4 uVar2; int4 uVar3; int4 uVar4; long lVar5; int iVar6; long lVar7; ulong uVar8; ulong uVar9; long lVar10; int4 *puVar11; long local_68; long lStack_60; int8 local_58; int8 local_48; int8 uStack_40; int8 local_38; iVar6 = pthread_mutex_lock((pthread_mutex_t *)this); if (iVar6 == 0) { if (this[0x6a] == (common_log)0x1) { lVar7 = *(long *)(this + 0x78); lVar10 = *(long *)(this + 0x98) * 0x30; puVar11 = (int4 *)(lVar7 + lVar10); local_38 = param_4[2]; local_48 = *param_4; uStack_40 = param_4[1]; __s = *(char **)(lVar7 + 0x10 + lVar10); iVar6 = vsnprintf(__s,*(long *)(lVar7 + 0x18 + lVar10) - (long)__s,param_3,param_4); if ((ulong)(*(long *)(lVar7 + 0x18 + lVar10) - *(long *)(lVar7 + 0x10 + lVar10)) <= (ulong)(long)iVar6) { /* try { // try from 001ce5f5 to 001ce5f9 has its CatchHandler @ 001ce832 */ std::vector<char,std::allocator<char>>::resize ((vector<char,std::allocator<char>> *)(lVar10 + 0x10 + lVar7),(long)iVar6 + 1); vsnprintf(*(char **)(puVar11 + 4),*(long *)(puVar11 + 6) - (long)*(char **)(puVar11 + 4), param_3,&local_48); } *puVar11 = param_2; *(common_log *)(puVar11 + 1) = this[0x68]; *(int8 *)(puVar11 + 2) = 0; if (this[0x69] == (common_log)0x1) { lVar7 = std::chrono::_V2::system_clock::now(); *(long *)(puVar11 + 2) = lVar7 / 1000 - *(long *)(this + 0x70); } *(int1 *)(puVar11 + 10) = 0; lVar7 = *(long *)(this + 0x80) - *(long *)(this + 0x78) >> 4; uVar8 = (*(long *)(this + 0x98) + 1U) % (ulong)(lVar7 * -0x5555555555555555); *(ulong *)(this + 0x98) = uVar8; if (uVar8 == *(ulong *)(this + 0x90)) { /* try { // try from 001ce6a5 to 001ce6b7 has its CatchHandler @ 001ce830 */ std::vector<common_log_entry,std::allocator<common_log_entry>>::vector ((ulong)&local_68,(allocator *)(lVar7 * 0x5555555555555556)); lVar10 = 0x10; lVar7 = 0; uVar8 = 0; do { lVar5 = local_68; puVar11 = (int4 *)(*(long *)(this + 0x78) + *(long *)(this + 0x90) * 0x30); uVar2 = puVar11[1]; uVar3 = puVar11[2]; uVar4 = puVar11[3]; puVar1 = (int4 *)(local_68 + lVar7); *puVar1 = *puVar11; puVar1[1] = uVar2; puVar1[2] = uVar3; puVar1[3] = uVar4; std::vector<char,std::allocator<char>>::_M_move_assign(local_68 + lVar10,puVar11 + 4); *(int1 *)(lVar5 + 0x28 + lVar7) = *(int1 *)(puVar11 + 10); uVar9 = (*(long *)(this + 0x90) + 1U) % (ulong)((*(long *)(this + 0x80) - *(long *)(this + 0x78) >> 4) * -0x5555555555555555); *(ulong *)(this + 0x90) = uVar9; uVar8 = uVar8 + 1; lVar10 = lVar10 + 0x30; lVar7 = lVar7 + 0x30; } while (uVar9 != *(ulong *)(this + 0x98)); *(int8 *)(this + 0x90) = 0; *(ulong *)(this + 0x98) = uVar8; lVar7 = lStack_60 - local_68; for (; uVar8 < (ulong)((lVar7 >> 4) * -0x5555555555555555); uVar8 = uVar8 + 1) { /* try { // try from 001ce77f to 001ce788 has its CatchHandler @ 001ce83b */ std::vector<char,std::allocator<char>>::resize ((vector<char,std::allocator<char>> *)(local_68 + lVar10),0x100); lVar7 = lStack_60 - local_68; lVar10 = lVar10 + 0x30; } local_48 = *(int8 *)(this + 0x78); uStack_40 = *(int8 *)(this + 0x80); local_38 = *(int8 *)(this + 0x88); *(long *)(this + 0x78) = local_68; *(long *)(this + 0x80) = lStack_60; *(int8 *)(this + 0x88) = local_58; local_68 = 0; lStack_60 = 0; local_58 = 0; std::vector<common_log_entry,std::allocator<common_log_entry>>::~vector ((vector<common_log_entry,std::allocator<common_log_entry>> *)&local_48); std::vector<common_log_entry,std::allocator<common_log_entry>>::~vector ((vector<common_log_entry,std::allocator<common_log_entry>> *)&local_68); } std::condition_variable::notify_one(); } pthread_mutex_unlock((pthread_mutex_t *)this); return; } /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar6); }
61,606
my_strntoull10rnd_8bit
eloqsql/strings/ctype-simple.c
ulonglong my_strntoull10rnd_8bit(CHARSET_INFO *cs __attribute__((unused)), const char *str, size_t length, int unsigned_flag, char **endptr, int *error) { const char *dot, *end9, *beg, *end= str + length; ulonglong ull; ulong ul; uchar ch; int shift= 0, digits= 0, negative, addon; /* Skip leading spaces and tabs */ for ( ; str < end && my_isspace(&my_charset_latin1, *str) ; ) str++; if (str >= end) goto ret_edom; if ((negative= (*str == '-')) || *str=='+') /* optional sign */ { if (++str == end) goto ret_edom; } beg= str; end9= (str + 9) > end ? end : (str + 9); /* Accumulate small number into ulong, for performance purposes */ for (ul= 0 ; str < end9 && (ch= (uchar) (*str - '0')) < 10; str++) { ul= ul * 10 + ch; } if (str >= end) /* Small number without dots and expanents */ { *endptr= (char*) str; if (negative) { if (unsigned_flag) { *error= ul ? MY_ERRNO_ERANGE : 0; return 0; } else { *error= 0; return (ulonglong) (longlong) -(long) ul; } } else { *error=0; return (ulonglong) ul; } } digits= (int) (str - beg); /* Continue to accumulate into ulonglong */ for (dot= NULL, ull= ul; str < end; str++) { if ((ch= (uchar) (*str - '0')) < 10) { if (ull < CUTOFF || (ull == CUTOFF && ch <= CUTLIM)) { ull= ull * 10 + ch; digits++; continue; } /* Adding the next digit would overflow. Remember the next digit in "addon", for rounding. Scan all digits with an optional single dot. */ if (ull == CUTOFF) { ull= ULONGLONG_MAX; addon= 1; str++; } else addon= (*str >= '5'); if (!dot) { for ( ; str < end && (ch= (uchar) (*str - '0')) < 10; shift++, str++); if (str < end && *str == '.') { str++; for ( ; str < end && (ch= (uchar) (*str - '0')) < 10; str++); } } else { shift= (int) (dot - str); for ( ; str < end && (ch= (uchar) (*str - '0')) < 10; str++); } goto exp; } if (*str == '.') { if (dot) { /* The second dot character */ addon= 0; goto exp; } else { dot= str + 1; } continue; } /* Unknown character, exit the loop */ break; } shift= dot ? (int)(dot - str) : 0; /* Right shift */ addon= 0; exp: /* [ E [ <sign> ] <unsigned integer> ] */ if (!digits) { str= beg; goto ret_edom; } if (str < end && (*str == 'e' || *str == 'E')) { str++; if (str < end) { int negative_exp, exponent; if ((negative_exp= (*str == '-')) || *str=='+') { if (++str == end) { str-= 2; /* 'e-' or 'e+' not followed by digits */ goto ret_sign; } } if (shift > 0 && !negative_exp) goto ret_too_big; for (exponent= 0 ; str < end && (ch= (uchar) (*str - '0')) < 10; str++) { if (negative_exp) { if (exponent - shift > DIGITS_IN_ULONGLONG) goto ret_zero; } else { if (exponent + shift > DIGITS_IN_ULONGLONG) goto ret_too_big; } exponent= exponent * 10 + ch; } shift+= negative_exp ? -exponent : exponent; } else str--; /* 'e' not followed by digits */ } if (shift == 0) /* No shift, check addon digit */ { if (addon) { if (ull == ULONGLONG_MAX) goto ret_too_big; ull++; } goto ret_sign; } if (shift < 0) /* Right shift */ { ulonglong d, r; if (-shift >= DIGITS_IN_ULONGLONG) goto ret_zero; /* Exponent is a big negative number, return 0 */ d= d10[-shift]; r= (ull % d) * 2; ull /= d; if (r >= d) ull++; goto ret_sign; } if (shift > DIGITS_IN_ULONGLONG) /* Huge left shift */ { if (!ull) goto ret_sign; goto ret_too_big; } for ( ; shift > 0; shift--, ull*= 10) /* Left shift */ { if (ull > CUTOFF) goto ret_too_big; /* Overflow, number too big */ } ret_sign: *endptr= (char*) str; if (!unsigned_flag) { if (negative) { if (ull >= (ulonglong) LONGLONG_MIN) { if (ull != (ulonglong) LONGLONG_MIN) *error= MY_ERRNO_ERANGE; return (ulonglong) LONGLONG_MIN; } *error= 0; return (ulonglong) -(longlong) ull; } else { if (ull > (ulonglong) LONGLONG_MAX) { *error= MY_ERRNO_ERANGE; return (ulonglong) LONGLONG_MAX; } *error= 0; return ull; } } /* Unsigned number */ if (negative && ull) { *error= MY_ERRNO_ERANGE; return 0; } *error= 0; return ull; ret_zero: *endptr= (char*) str; *error= 0; return 0; ret_edom: *endptr= (char*) str; *error= MY_ERRNO_EDOM; return 0; ret_too_big: *endptr= (char*) str; *error= MY_ERRNO_ERANGE; return unsigned_flag ? ULONGLONG_MAX : negative ? (ulonglong) LONGLONG_MIN : (ulonglong) LONGLONG_MAX; }
O3
c
my_strntoull10rnd_8bit: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx testq %rdx, %rdx jle 0x39f6f leaq (%rsi,%rdx), %r11 leaq 0x2dbacb(%rip), %rax # 0x315780 movq 0x40(%rax), %rax decq %rdx movzbl (%rsi), %r10d testb $0x8, 0x1(%rax,%r10) je 0x39cd8 incq %rsi decq %rdx cmpq %r11, %rsi jb 0x39cbc jmp 0x39f6f cmpl $0x2b, %r10d je 0x39ce4 cmpl $0x2d, %r10d jne 0x39cf0 testq %rdx, %rdx je 0x39dc7 incq %rsi leaq 0x9(%rsi), %rax cmpq %r11, %rax cmovaq %r11, %rax xorl %edi, %edi movq %rsi, %r14 cmpq %rax, %rsi jae 0x39d23 movb (%r14), %dl addb $-0x30, %dl cmpb $0x9, %dl ja 0x39d23 leaq (%rdi,%rdi,4), %rdi movzbl %dl, %edx leaq (%rdx,%rdi,2), %rdi incq %r14 cmpq %rax, %r14 jb 0x39d05 cmpq %r11, %r14 jae 0x39d9d movabsq $0x1999999999999999, %r15 # imm = 0x1999999999999999 movl %r14d, %r12d subl %esi, %r12d xorl %ebx, %ebx movl %r14d, %r13d movb (%r14), %al leal -0x30(%rax), %edx cmpb $0x9, %dl ja 0x39d6c cmpq %r15, %rdi jb 0x39d5c jne 0x39ddc cmpb $0x5, %dl ja 0x39ddc leaq (%rdi,%rdi,4), %rax movzbl %dl, %edx leaq (%rdx,%rax,2), %rdi incl %r12d jmp 0x39d79 cmpb $0x2e, %al jne 0x39d84 testq %rbx, %rbx jne 0x39dcf leaq 0x1(%r14), %rbx incq %r14 incl %r13d cmpq %r11, %r14 jb 0x39d3d movl %ebx, %eax subl %r14d, %eax xorl %r13d, %r13d testq %rbx, %rbx cmovel %r13d, %eax movl %eax, %ebx movq %rdi, %rax jmp 0x39e9a movq %r14, (%r8) cmpl $0x2d, %r10d jne 0x3a052 testl %ecx, %ecx je 0x3a03e xorl %eax, %eax testq %rdi, %rdi movl $0x22, %ecx cmovel %eax, %ecx movl %ecx, (%r9) jmp 0x39f79 movq %r11, %rsi jmp 0x39f6f xorl %ebx, %ebx movq %rdi, %rax xorl %r13d, %r13d jmp 0x39e9a movl %ecx, -0x30(%rbp) cmpb $0x35, %al setae %al movl %eax, -0x2c(%rbp) xorl %ecx, %ecx cmpq %r15, %rdi movq $-0x1, %rax cmovneq %rdi, %rax sete %cl movl -0x2c(%rbp), %edx orb %cl, %dl movl %edx, -0x2c(%rbp) movq %rcx, %rdx movq %r15, %rcx leaq (%r14,%rdx), %r15 testq %rbx, %rbx je 0x39e4c xorl %edx, %edx cmpq %rcx, %rdi sete %dl subl %edx, %ebx subl %r13d, %ebx cmpq %r11, %r15 movl -0x30(%rbp), %ecx jae 0x39e89 movl -0x2c(%rbp), %r13d movb (%r15), %dl addb $-0x30, %dl cmpb $0x9, %dl ja 0x39e3d incq %r15 cmpq %r11, %r15 jb 0x39e2a movq %r15, %r14 movabsq $0x1999999999999999, %r15 # imm = 0x1999999999999999 jmp 0x39e9a xorl %ebx, %ebx cmpq %r11, %r15 movl -0x30(%rbp), %ecx jae 0x39e89 leaq (%r14,%rdx), %rdi xorl %ebx, %ebx leaq (%rdx,%rbx), %r15 movb (%r14,%r15), %r15b leal -0x30(%r15), %r13d cmpb $0x9, %r13b ja 0x3a095 leaq (%rbx,%rdi), %r15 incq %r15 incq %rbx cmpq %r11, %r15 jb 0x39e5c addq %rbx, %rdi movq %rdi, %r14 jmp 0x39e8c movq %r15, %r14 movabsq $0x1999999999999999, %r15 # imm = 0x1999999999999999 movl -0x2c(%rbp), %r13d testl %r12d, %r12d je 0x39f6f cmpq %r11, %r14 jae 0x39f58 movzbl (%r14), %edx orl $0x20, %edx cmpl $0x65, %edx jne 0x39f58 leaq 0x1(%r14), %rsi cmpq %r11, %rsi jae 0x39f58 movzbl (%rsi), %edi cmpl $0x2d, %edi je 0x39ed6 cmpl $0x2b, %edi jne 0x39ee3 leaq 0x2(%r14), %rsi cmpq %r11, %rsi je 0x39fc2 testl %ebx, %ebx jle 0x39ef1 cmpb $0x2d, %dil jne 0x39fca xorl %r14d, %r14d cmpq %r11, %rsi jae 0x39f44 xorl %r14d, %r14d movb (%rsi), %dl addb $-0x30, %dl cmpb $0x9, %dl ja 0x39f44 movq %r15, %r12 cmpb $0x2d, %dil jne 0x39f20 movl %r14d, %r15d subl %ebx, %r15d cmpl $0x14, %r15d jle 0x39f2e jmp 0x39fa1 leal (%r14,%rbx), %r15d cmpl $0x14, %r15d jg 0x39fca movzbl %dl, %edx leal (%r14,%r14,4), %r14d leal (%rdx,%r14,2), %r14d incq %rsi cmpq %r11, %rsi movq %r12, %r15 jb 0x39efc movl %r14d, %edx negl %edx cmpb $0x2d, %dil cmovnel %r14d, %edx addl %ebx, %edx movl %edx, %ebx movq %rsi, %r14 testl %ebx, %ebx je 0x39f89 js 0x39f99 cmpl $0x14, %ebx jbe 0x39fad testq %rax, %rax jne 0x39fc7 xorl %edi, %edi jmp 0x3a015 movq %rsi, (%r8) movl $0x21, (%r9) xorl %edi, %edi movq %rdi, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq testb %r13b, %r13b je 0x39fc2 cmpq $-0x1, %rax je 0x39fc7 incq %rax jmp 0x39fc2 cmpl $-0x13, %ebx jae 0x39ff6 movq %r14, %rsi movq %rsi, (%r8) movl $0x0, (%r9) jmp 0x39f79 incl %ebx cmpq %r15, %rax ja 0x39fc7 addq %rax, %rax leaq (%rax,%rax,4), %rax decl %ebx cmpl $0x1, %ebx jg 0x39faf movq %rax, %rdi jmp 0x3a015 movq %r14, %rsi movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 leaq -0x1(%rax), %rdx cmpl $0x2d, %r10d movq %rsi, (%r8) movl $0x22, (%r9) cmoveq %rax, %rdx xorl %edi, %edi negl %ecx sbbq %rdi, %rdi orq %rdx, %rdi jmp 0x39f7b negl %ebx leaq 0x169081(%rip), %rdx # 0x1a3080 movq (%rdx,%rbx,8), %rsi xorl %edx, %edx divq %rsi movq %rax, %rdi addq %rdx, %rdx cmpq %rsi, %rdx sbbq $-0x1, %rdi movq %r14, (%r8) testl %ecx, %ecx je 0x3a033 cmpl $0x2d, %r10d jne 0x3a052 testq %rdi, %rdi je 0x3a052 movl $0x22, (%r9) jmp 0x39f79 cmpl $0x2d, %r10d jne 0x3a04d testq %rdi, %rdi js 0x3a05e movl $0x0, (%r9) negq %rdi jmp 0x39f7b testq %rdi, %rdi js 0x3a07c movl $0x0, (%r9) jmp 0x39f7b movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 negq %rdi jo 0x3a074 movl $0x22, (%r9) movq %rax, %rdi jmp 0x39f7b movl $0x22, (%r9) movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000 decq %rdi jmp 0x39f7b cmpb $0x2e, %r15b movl -0x2c(%rbp), %r13d jne 0x3a0d2 leaq (%rbx,%rdi), %rdx incq %rdx movabsq $0x1999999999999999, %r15 # imm = 0x1999999999999999 movq %rdx, %r14 cmpq %r11, %rdx jae 0x39e9a movb (%r14), %dil addb $-0x30, %dil leaq 0x1(%r14), %rdx cmpb $0xa, %dil jb 0x3a0b0 jmp 0x39e9a addq %rbx, %rdi movq %rdi, %r14 jmp 0x39e40
my_strntoull10rnd_8bit: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx test rdx, rdx jle loc_39F6F lea r11, [rsi+rdx] lea rax, my_charset_latin1 mov rax, [rax+40h] dec rdx loc_39CBC: movzx r10d, byte ptr [rsi] test byte ptr [rax+r10+1], 8 jz short loc_39CD8 inc rsi dec rdx cmp rsi, r11 jb short loc_39CBC jmp loc_39F6F loc_39CD8: cmp r10d, 2Bh ; '+' jz short loc_39CE4 cmp r10d, 2Dh ; '-' jnz short loc_39CF0 loc_39CE4: test rdx, rdx jz loc_39DC7 inc rsi loc_39CF0: lea rax, [rsi+9] cmp rax, r11 cmova rax, r11 xor edi, edi mov r14, rsi cmp rsi, rax jnb short loc_39D23 loc_39D05: mov dl, [r14] add dl, 0D0h cmp dl, 9 ja short loc_39D23 lea rdi, [rdi+rdi*4] movzx edx, dl lea rdi, [rdx+rdi*2] inc r14 cmp r14, rax jb short loc_39D05 loc_39D23: cmp r14, r11 jnb short loc_39D9D mov r15, 1999999999999999h mov r12d, r14d sub r12d, esi xor ebx, ebx mov r13d, r14d loc_39D3D: mov al, [r14] lea edx, [rax-30h] cmp dl, 9 ja short loc_39D6C cmp rdi, r15 jb short loc_39D5C jnz loc_39DDC cmp dl, 5 ja loc_39DDC loc_39D5C: lea rax, [rdi+rdi*4] movzx edx, dl lea rdi, [rdx+rax*2] inc r12d jmp short loc_39D79 loc_39D6C: cmp al, 2Eh ; '.' jnz short loc_39D84 test rbx, rbx jnz short loc_39DCF lea rbx, [r14+1] loc_39D79: inc r14 inc r13d cmp r14, r11 jb short loc_39D3D loc_39D84: mov eax, ebx sub eax, r14d xor r13d, r13d test rbx, rbx cmovz eax, r13d mov ebx, eax mov rax, rdi jmp loc_39E9A loc_39D9D: mov [r8], r14 cmp r10d, 2Dh ; '-' jnz loc_3A052 test ecx, ecx jz loc_3A03E xor eax, eax test rdi, rdi mov ecx, 22h ; '"' cmovz ecx, eax mov [r9], ecx jmp loc_39F79 loc_39DC7: mov rsi, r11 jmp loc_39F6F loc_39DCF: xor ebx, ebx mov rax, rdi xor r13d, r13d jmp loc_39E9A loc_39DDC: mov [rbp+var_30], ecx cmp al, 35h ; '5' setnb al mov [rbp+var_2C], eax xor ecx, ecx cmp rdi, r15 mov rax, 0FFFFFFFFFFFFFFFFh cmovnz rax, rdi setz cl mov edx, [rbp+var_2C] or dl, cl mov [rbp+var_2C], edx mov rdx, rcx mov rcx, r15 lea r15, [r14+rdx] test rbx, rbx jz short loc_39E4C xor edx, edx cmp rdi, rcx setz dl sub ebx, edx sub ebx, r13d cmp r15, r11 mov ecx, [rbp+var_30] jnb short loc_39E89 mov r13d, [rbp+var_2C] loc_39E2A: mov dl, [r15] add dl, 0D0h cmp dl, 9 ja short loc_39E3D inc r15 cmp r15, r11 jb short loc_39E2A loc_39E3D: mov r14, r15 loc_39E40: mov r15, 1999999999999999h jmp short loc_39E9A loc_39E4C: xor ebx, ebx cmp r15, r11 mov ecx, [rbp+var_30] jnb short loc_39E89 lea rdi, [r14+rdx] xor ebx, ebx loc_39E5C: lea r15, [rdx+rbx] mov r15b, [r14+r15] lea r13d, [r15-30h] cmp r13b, 9 ja loc_3A095 lea r15, [rbx+rdi] inc r15 inc rbx cmp r15, r11 jb short loc_39E5C add rdi, rbx mov r14, rdi jmp short loc_39E8C loc_39E89: mov r14, r15 loc_39E8C: mov r15, 1999999999999999h mov r13d, [rbp+var_2C] loc_39E9A: test r12d, r12d jz loc_39F6F cmp r14, r11 jnb loc_39F58 movzx edx, byte ptr [r14] or edx, 20h cmp edx, 65h ; 'e' jnz loc_39F58 lea rsi, [r14+1] cmp rsi, r11 jnb loc_39F58 movzx edi, byte ptr [rsi] cmp edi, 2Dh ; '-' jz short loc_39ED6 cmp edi, 2Bh ; '+' jnz short loc_39EE3 loc_39ED6: lea rsi, [r14+2] cmp rsi, r11 jz loc_39FC2 loc_39EE3: test ebx, ebx jle short loc_39EF1 cmp dil, 2Dh ; '-' jnz loc_39FCA loc_39EF1: xor r14d, r14d cmp rsi, r11 jnb short loc_39F44 xor r14d, r14d loc_39EFC: mov dl, [rsi] add dl, 0D0h cmp dl, 9 ja short loc_39F44 mov r12, r15 cmp dil, 2Dh ; '-' jnz short loc_39F20 mov r15d, r14d sub r15d, ebx cmp r15d, 14h jle short loc_39F2E jmp loc_39FA1 loc_39F20: lea r15d, [r14+rbx] cmp r15d, 14h jg loc_39FCA loc_39F2E: movzx edx, dl lea r14d, [r14+r14*4] lea r14d, [rdx+r14*2] inc rsi cmp rsi, r11 mov r15, r12 jb short loc_39EFC loc_39F44: mov edx, r14d neg edx cmp dil, 2Dh ; '-' cmovnz edx, r14d add edx, ebx mov ebx, edx mov r14, rsi loc_39F58: test ebx, ebx jz short loc_39F89 js short loc_39F99 cmp ebx, 14h jbe short loc_39FAD test rax, rax jnz short loc_39FC7 xor edi, edi jmp loc_3A015 loc_39F6F: mov [r8], rsi mov dword ptr [r9], 21h ; '!' loc_39F79: xor edi, edi loc_39F7B: mov rax, rdi pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_39F89: test r13b, r13b jz short loc_39FC2 cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_39FC7 inc rax jmp short loc_39FC2 loc_39F99: cmp ebx, 0FFFFFFEDh jnb short loc_39FF6 mov rsi, r14 loc_39FA1: mov [r8], rsi mov dword ptr [r9], 0 jmp short loc_39F79 loc_39FAD: inc ebx loc_39FAF: cmp rax, r15 ja short loc_39FC7 add rax, rax lea rax, [rax+rax*4] dec ebx cmp ebx, 1 jg short loc_39FAF loc_39FC2: mov rdi, rax jmp short loc_3A015 loc_39FC7: mov rsi, r14 loc_39FCA: mov rax, 8000000000000000h lea rdx, [rax-1] cmp r10d, 2Dh ; '-' mov [r8], rsi mov dword ptr [r9], 22h ; '"' cmovz rdx, rax xor edi, edi neg ecx sbb rdi, rdi or rdi, rdx jmp short loc_39F7B loc_39FF6: neg ebx lea rdx, d10 mov rsi, [rdx+rbx*8] xor edx, edx div rsi mov rdi, rax add rdx, rdx cmp rdx, rsi sbb rdi, 0FFFFFFFFFFFFFFFFh loc_3A015: mov [r8], r14 test ecx, ecx jz short loc_3A033 cmp r10d, 2Dh ; '-' jnz short loc_3A052 test rdi, rdi jz short loc_3A052 mov dword ptr [r9], 22h ; '"' jmp loc_39F79 loc_3A033: cmp r10d, 2Dh ; '-' jnz short loc_3A04D test rdi, rdi js short loc_3A05E loc_3A03E: mov dword ptr [r9], 0 neg rdi jmp loc_39F7B loc_3A04D: test rdi, rdi js short loc_3A07C loc_3A052: mov dword ptr [r9], 0 jmp loc_39F7B loc_3A05E: mov rax, 8000000000000000h neg rdi jo short loc_3A074 mov dword ptr [r9], 22h ; '"' loc_3A074: mov rdi, rax jmp loc_39F7B loc_3A07C: mov dword ptr [r9], 22h ; '"' mov rdi, 8000000000000000h dec rdi jmp loc_39F7B loc_3A095: cmp r15b, 2Eh ; '.' mov r13d, [rbp+var_2C] jnz short loc_3A0D2 lea rdx, [rbx+rdi] inc rdx mov r15, 1999999999999999h loc_3A0B0: mov r14, rdx cmp rdx, r11 jnb loc_39E9A mov dil, [r14] add dil, 0D0h lea rdx, [r14+1] cmp dil, 0Ah jb short loc_3A0B0 jmp loc_39E9A loc_3A0D2: add rdi, rbx mov r14, rdi jmp loc_39E40
long long my_strntoull10rnd_8bit( long long a1, unsigned __int8 *a2, long long a3, int a4, unsigned __int8 **a5, int *a6) { unsigned long long v6; // r11 long long v7; // rdx long long v8; // r10 unsigned __int8 *v9; // rax long long v10; // rdi unsigned __int8 *i; // r14 unsigned __int8 v12; // dl int v13; // r12d _BYTE *v14; // rbx int v15; // r13d unsigned __int8 v16; // al unsigned __int8 v17; // dl int v18; // eax bool v19; // r13 unsigned long long v20; // rax int v21; // ecx long long v22; // rcx long long v23; // rdx unsigned __int8 *v24; // r15 unsigned __int8 *v25; // rdi char v26; // r15 unsigned long long v27; // r15 unsigned __int8 *v28; // rsi int v29; // edi int v30; // r14d unsigned __int8 v31; // dl int v32; // edx int v34; // ebx unsigned long long v35; // rdx unsigned long long v36; // rsi unsigned __int8 *v37; // rdx unsigned __int8 v38; // di int v39; // [rsp+0h] [rbp-30h] bool v40; // [rsp+4h] [rbp-2Ch] bool v41; // [rsp+4h] [rbp-2Ch] if ( a3 <= 0 ) goto LABEL_76; v6 = (unsigned long long)&a2[a3]; v7 = a3 - 1; while ( 1 ) { v8 = *a2; if ( (*(_BYTE *)(*(_QWORD *)&my_charset_latin1[16] + v8 + 1) & 8) == 0 ) break; ++a2; --v7; if ( (unsigned long long)a2 >= v6 ) goto LABEL_76; } if ( (_DWORD)v8 == 43 || (_DWORD)v8 == 45 ) { if ( !v7 ) { a2 = (unsigned __int8 *)v6; goto LABEL_76; } ++a2; } v9 = a2 + 9; if ( (unsigned long long)(a2 + 9) > v6 ) v9 = (unsigned __int8 *)v6; v10 = 0LL; for ( i = a2; i < v9; ++i ) { v12 = *i - 48; if ( v12 > 9u ) break; v10 = v12 + 10 * v10; } if ( (unsigned long long)i >= v6 ) { *a5 = i; if ( (_DWORD)v8 != 45 ) goto LABEL_102; if ( a4 ) { v21 = 34; if ( !v10 ) v21 = 0; *a6 = v21; return 0LL; } goto LABEL_100; } v13 = (_DWORD)i - (_DWORD)a2; v14 = 0LL; v15 = (int)i; while ( 1 ) { v16 = *i; v17 = *i - 48; if ( v17 <= 9u ) break; if ( v16 != 46 ) goto LABEL_26; if ( v14 ) { LODWORD(v14) = 0; v20 = v10; v19 = 0; goto LABEL_51; } v14 = i + 1; LABEL_25: ++i; ++v15; if ( (unsigned long long)i >= v6 ) { LABEL_26: v18 = (_DWORD)v14 - (_DWORD)i; v19 = 0; if ( !v14 ) v18 = 0; LODWORD(v14) = v18; v20 = v10; goto LABEL_51; } } if ( (unsigned long long)v10 < 0x1999999999999999LL || v10 == 0x1999999999999999LL && v17 <= 5u ) { v10 = v17 + 10 * v10; ++v13; goto LABEL_25; } v39 = a4; v40 = v16 >= 0x35u; v22 = 0LL; v20 = -1LL; if ( v10 != 0x1999999999999999LL ) v20 = v10; LOBYTE(v22) = v10 == 0x1999999999999999LL; v41 = v10 == 0x1999999999999999LL || v40; v23 = v22; v24 = &i[v22]; if ( v14 ) { LODWORD(v14) = (_DWORD)v14 - (v10 == 0x1999999999999999LL) - v15; a4 = v39; if ( (unsigned long long)v24 < v6 ) { v19 = v41; do { if ( (unsigned __int8)(*v24 - 48) > 9u ) break; ++v24; } while ( (unsigned long long)v24 < v6 ); i = v24; goto LABEL_51; } LABEL_49: i = v24; LABEL_50: v19 = v41; } else { LODWORD(v14) = 0; a4 = v39; if ( (unsigned long long)v24 >= v6 ) goto LABEL_49; v25 = &i[v23]; v14 = 0LL; while ( 1 ) { v26 = v14[v23 + (_QWORD)i]; if ( (unsigned __int8)(v26 - 48) > 9u ) break; v27 = (unsigned long long)&v25[(_QWORD)v14++ + 1]; if ( v27 >= v6 ) { i = &v25[(_QWORD)v14]; goto LABEL_50; } } v19 = v41; if ( v26 == 46 ) { v37 = &v25[(_QWORD)v14 + 1]; do { i = v37; if ( (unsigned long long)v37 >= v6 ) break; v38 = *v37++ - 48; } while ( v38 < 0xAu ); } else { i = &v25[(_QWORD)v14]; } } LABEL_51: if ( !v13 ) { LABEL_76: *a5 = a2; *a6 = 33; return 0LL; } if ( (unsigned long long)i >= v6 ) goto LABEL_71; if ( (*i | 0x20) != 0x65 ) goto LABEL_71; v28 = i + 1; if ( (unsigned long long)(i + 1) >= v6 ) goto LABEL_71; v29 = *v28; if ( v29 == 45 || v29 == 43 ) { v28 = i + 2; if ( i + 2 == (unsigned __int8 *)v6 ) { LABEL_88: v10 = v20; LABEL_94: *a5 = i; if ( a4 ) { if ( (_DWORD)v8 == 45 && v10 ) { *a6 = 34; return 0LL; } LABEL_102: *a6 = 0; return v10; } if ( (_DWORD)v8 != 45 ) { if ( v10 < 0 ) { *a6 = 34; return 0x7FFFFFFFFFFFFFFFLL; } goto LABEL_102; } if ( v10 < 0 ) { if ( !__OFSUB__(-v10, 1LL) ) *a6 = 34; return 0x8000000000000000LL; } LABEL_100: *a6 = 0; return -v10; } } if ( (int)v14 > 0 && (_BYTE)v29 != 45 ) goto LABEL_90; v30 = 0; if ( (unsigned long long)v28 < v6 ) { v30 = 0; do { v31 = *v28 - 48; if ( v31 > 9u ) break; if ( (_BYTE)v29 == 45 ) { if ( v30 - (int)v14 > 20 ) goto LABEL_84; } else if ( v30 + (int)v14 > 20 ) { goto LABEL_90; } v30 = v31 + 10 * v30; ++v28; } while ( (unsigned long long)v28 < v6 ); } v32 = -v30; if ( (_BYTE)v29 != 45 ) v32 = v30; LODWORD(v14) = (_DWORD)v14 + v32; i = v28; LABEL_71: if ( !(_DWORD)v14 ) { if ( v19 ) { if ( v20 == -1LL ) goto LABEL_89; ++v20; } goto LABEL_88; } if ( (int)v14 < 0 ) { if ( (unsigned int)v14 < 0xFFFFFFED ) { v28 = i; LABEL_84: *a5 = v28; *a6 = 0; return 0LL; } v36 = d10[-(int)v14]; v10 = v20 / v36 - ((2 * (v20 % v36) < v36) - 1LL); goto LABEL_94; } if ( (unsigned int)v14 <= 0x14 ) { v34 = (_DWORD)v14 + 1; while ( v20 <= 0x1999999999999999LL ) { v20 *= 10LL; if ( --v34 <= 1 ) goto LABEL_88; } } else if ( !v20 ) { v10 = 0LL; goto LABEL_94; } LABEL_89: v28 = i; LABEL_90: v35 = 0x7FFFFFFFFFFFFFFFLL; *a5 = v28; *a6 = 34; if ( (_DWORD)v8 == 45 ) v35 = 0x8000000000000000LL; return v35 | -(long long)(a4 != 0); }
my_strntoull10rnd_8bit: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX TEST RDX,RDX JLE 0x00139f6f LEA R11,[RSI + RDX*0x1] LEA RAX,[0x415780] MOV RAX,qword ptr [RAX + 0x40] DEC RDX LAB_00139cbc: MOVZX R10D,byte ptr [RSI] TEST byte ptr [RAX + R10*0x1 + 0x1],0x8 JZ 0x00139cd8 INC RSI DEC RDX CMP RSI,R11 JC 0x00139cbc JMP 0x00139f6f LAB_00139cd8: CMP R10D,0x2b JZ 0x00139ce4 CMP R10D,0x2d JNZ 0x00139cf0 LAB_00139ce4: TEST RDX,RDX JZ 0x00139dc7 INC RSI LAB_00139cf0: LEA RAX,[RSI + 0x9] CMP RAX,R11 CMOVA RAX,R11 XOR EDI,EDI MOV R14,RSI CMP RSI,RAX JNC 0x00139d23 LAB_00139d05: MOV DL,byte ptr [R14] ADD DL,0xd0 CMP DL,0x9 JA 0x00139d23 LEA RDI,[RDI + RDI*0x4] MOVZX EDX,DL LEA RDI,[RDX + RDI*0x2] INC R14 CMP R14,RAX JC 0x00139d05 LAB_00139d23: CMP R14,R11 JNC 0x00139d9d MOV R15,0x1999999999999999 MOV R12D,R14D SUB R12D,ESI XOR EBX,EBX MOV R13D,R14D LAB_00139d3d: MOV AL,byte ptr [R14] LEA EDX,[RAX + -0x30] CMP DL,0x9 JA 0x00139d6c CMP RDI,R15 JC 0x00139d5c JNZ 0x00139ddc CMP DL,0x5 JA 0x00139ddc LAB_00139d5c: LEA RAX,[RDI + RDI*0x4] MOVZX EDX,DL LEA RDI,[RDX + RAX*0x2] INC R12D JMP 0x00139d79 LAB_00139d6c: CMP AL,0x2e JNZ 0x00139d84 TEST RBX,RBX JNZ 0x00139dcf LEA RBX,[R14 + 0x1] LAB_00139d79: INC R14 INC R13D CMP R14,R11 JC 0x00139d3d LAB_00139d84: MOV EAX,EBX SUB EAX,R14D XOR R13D,R13D TEST RBX,RBX CMOVZ EAX,R13D MOV EBX,EAX MOV RAX,RDI JMP 0x00139e9a LAB_00139d9d: MOV qword ptr [R8],R14 CMP R10D,0x2d JNZ 0x0013a052 TEST ECX,ECX JZ 0x0013a03e XOR EAX,EAX TEST RDI,RDI MOV ECX,0x22 CMOVZ ECX,EAX MOV dword ptr [R9],ECX JMP 0x00139f79 LAB_00139dc7: MOV RSI,R11 JMP 0x00139f6f LAB_00139dcf: XOR EBX,EBX MOV RAX,RDI XOR R13D,R13D JMP 0x00139e9a LAB_00139ddc: MOV dword ptr [RBP + -0x30],ECX CMP AL,0x35 SETNC AL MOV dword ptr [RBP + -0x2c],EAX XOR ECX,ECX CMP RDI,R15 MOV RAX,-0x1 CMOVNZ RAX,RDI SETZ CL MOV EDX,dword ptr [RBP + -0x2c] OR DL,CL MOV dword ptr [RBP + -0x2c],EDX MOV RDX,RCX MOV RCX,R15 LEA R15,[R14 + RDX*0x1] TEST RBX,RBX JZ 0x00139e4c XOR EDX,EDX CMP RDI,RCX SETZ DL SUB EBX,EDX SUB EBX,R13D CMP R15,R11 MOV ECX,dword ptr [RBP + -0x30] JNC 0x00139e89 MOV R13D,dword ptr [RBP + -0x2c] LAB_00139e2a: MOV DL,byte ptr [R15] ADD DL,0xd0 CMP DL,0x9 JA 0x00139e3d INC R15 CMP R15,R11 JC 0x00139e2a LAB_00139e3d: MOV R14,R15 LAB_00139e40: MOV R15,0x1999999999999999 JMP 0x00139e9a LAB_00139e4c: XOR EBX,EBX CMP R15,R11 MOV ECX,dword ptr [RBP + -0x30] JNC 0x00139e89 LEA RDI,[R14 + RDX*0x1] XOR EBX,EBX LAB_00139e5c: LEA R15,[RDX + RBX*0x1] MOV R15B,byte ptr [R14 + R15*0x1] LEA R13D,[R15 + -0x30] CMP R13B,0x9 JA 0x0013a095 LEA R15,[RBX + RDI*0x1] INC R15 INC RBX CMP R15,R11 JC 0x00139e5c ADD RDI,RBX MOV R14,RDI JMP 0x00139e8c LAB_00139e89: MOV R14,R15 LAB_00139e8c: MOV R15,0x1999999999999999 MOV R13D,dword ptr [RBP + -0x2c] LAB_00139e9a: TEST R12D,R12D JZ 0x00139f6f CMP R14,R11 JNC 0x00139f58 MOVZX EDX,byte ptr [R14] OR EDX,0x20 CMP EDX,0x65 JNZ 0x00139f58 LEA RSI,[R14 + 0x1] CMP RSI,R11 JNC 0x00139f58 MOVZX EDI,byte ptr [RSI] CMP EDI,0x2d JZ 0x00139ed6 CMP EDI,0x2b JNZ 0x00139ee3 LAB_00139ed6: LEA RSI,[R14 + 0x2] CMP RSI,R11 JZ 0x00139fc2 LAB_00139ee3: TEST EBX,EBX JLE 0x00139ef1 CMP DIL,0x2d JNZ 0x00139fca LAB_00139ef1: XOR R14D,R14D CMP RSI,R11 JNC 0x00139f44 XOR R14D,R14D LAB_00139efc: MOV DL,byte ptr [RSI] ADD DL,0xd0 CMP DL,0x9 JA 0x00139f44 MOV R12,R15 CMP DIL,0x2d JNZ 0x00139f20 MOV R15D,R14D SUB R15D,EBX CMP R15D,0x14 JLE 0x00139f2e JMP 0x00139fa1 LAB_00139f20: LEA R15D,[R14 + RBX*0x1] CMP R15D,0x14 JG 0x00139fca LAB_00139f2e: MOVZX EDX,DL LEA R14D,[R14 + R14*0x4] LEA R14D,[RDX + R14*0x2] INC RSI CMP RSI,R11 MOV R15,R12 JC 0x00139efc LAB_00139f44: MOV EDX,R14D NEG EDX CMP DIL,0x2d CMOVNZ EDX,R14D ADD EDX,EBX MOV EBX,EDX MOV R14,RSI LAB_00139f58: TEST EBX,EBX JZ 0x00139f89 JS 0x00139f99 CMP EBX,0x14 JBE 0x00139fad TEST RAX,RAX JNZ 0x00139fc7 XOR EDI,EDI JMP 0x0013a015 LAB_00139f6f: MOV qword ptr [R8],RSI MOV dword ptr [R9],0x21 LAB_00139f79: XOR EDI,EDI LAB_00139f7b: MOV RAX,RDI POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00139f89: TEST R13B,R13B JZ 0x00139fc2 CMP RAX,-0x1 JZ 0x00139fc7 INC RAX JMP 0x00139fc2 LAB_00139f99: CMP EBX,-0x13 JNC 0x00139ff6 MOV RSI,R14 LAB_00139fa1: MOV qword ptr [R8],RSI MOV dword ptr [R9],0x0 JMP 0x00139f79 LAB_00139fad: INC EBX LAB_00139faf: CMP RAX,R15 JA 0x00139fc7 ADD RAX,RAX LEA RAX,[RAX + RAX*0x4] DEC EBX CMP EBX,0x1 JG 0x00139faf LAB_00139fc2: MOV RDI,RAX JMP 0x0013a015 LAB_00139fc7: MOV RSI,R14 LAB_00139fca: MOV RAX,-0x8000000000000000 LEA RDX,[RAX + -0x1] CMP R10D,0x2d MOV qword ptr [R8],RSI MOV dword ptr [R9],0x22 CMOVZ RDX,RAX XOR EDI,EDI NEG ECX SBB RDI,RDI OR RDI,RDX JMP 0x00139f7b LAB_00139ff6: NEG EBX LEA RDX,[0x2a3080] MOV RSI,qword ptr [RDX + RBX*0x8] XOR EDX,EDX DIV RSI MOV RDI,RAX ADD RDX,RDX CMP RDX,RSI SBB RDI,-0x1 LAB_0013a015: MOV qword ptr [R8],R14 TEST ECX,ECX JZ 0x0013a033 CMP R10D,0x2d JNZ 0x0013a052 TEST RDI,RDI JZ 0x0013a052 MOV dword ptr [R9],0x22 JMP 0x00139f79 LAB_0013a033: CMP R10D,0x2d JNZ 0x0013a04d TEST RDI,RDI JS 0x0013a05e LAB_0013a03e: MOV dword ptr [R9],0x0 NEG RDI JMP 0x00139f7b LAB_0013a04d: TEST RDI,RDI JS 0x0013a07c LAB_0013a052: MOV dword ptr [R9],0x0 JMP 0x00139f7b LAB_0013a05e: MOV RAX,-0x8000000000000000 NEG RDI JO 0x0013a074 MOV dword ptr [R9],0x22 LAB_0013a074: MOV RDI,RAX JMP 0x00139f7b LAB_0013a07c: MOV dword ptr [R9],0x22 MOV RDI,-0x8000000000000000 DEC RDI JMP 0x00139f7b LAB_0013a095: CMP R15B,0x2e MOV R13D,dword ptr [RBP + -0x2c] JNZ 0x0013a0d2 LEA RDX,[RBX + RDI*0x1] INC RDX MOV R15,0x1999999999999999 LAB_0013a0b0: MOV R14,RDX CMP RDX,R11 JNC 0x00139e9a MOV DIL,byte ptr [R14] ADD DIL,0xd0 LEA RDX,[R14 + 0x1] CMP DIL,0xa JC 0x0013a0b0 JMP 0x00139e9a LAB_0013a0d2: ADD RDI,RBX MOV R14,RDI JMP 0x00139e40
ulong my_strntoull10rnd_8bit (int8 param_1,byte *param_2,long param_3,int param_4,ulong *param_5, int4 *param_6) { byte *pbVar1; byte bVar2; byte bVar3; long lVar4; uint uVar5; byte *pbVar6; int4 uVar7; ulong uVar8; byte bVar9; int iVar10; ulong uVar11; ulong uVar12; byte *pbVar13; ulong uVar14; int iVar15; byte *pbVar16; byte *pbVar17; bool bVar18; if (param_3 < 1) { LAB_00139f6f: *param_5 = (ulong)param_2; *param_6 = 0x21; return 0; } pbVar1 = param_2 + param_3; param_3 = param_3 + -1; pbVar13 = param_2; while (bVar3 = *pbVar13, (PTR_ctype_latin1_004157c0[(ulong)bVar3 + 1] & 8) != 0) { param_2 = pbVar13 + 1; param_3 = param_3 + -1; pbVar13 = param_2; if (pbVar1 <= param_2) goto LAB_00139f6f; } if ((bVar3 == 0x2b) || (bVar3 == 0x2d)) { param_2 = pbVar1; if (param_3 == 0) goto LAB_00139f6f; pbVar13 = pbVar13 + 1; } pbVar6 = pbVar13 + 9; if (pbVar1 < pbVar13 + 9) { pbVar6 = pbVar1; } uVar11 = 0; for (pbVar16 = pbVar13; (pbVar16 < pbVar6 && ((byte)(*pbVar16 - 0x30) < 10)); pbVar16 = pbVar16 + 1) { uVar11 = (ulong)(byte)(*pbVar16 - 0x30) + uVar11 * 10; } if (pbVar1 <= pbVar16) { *param_5 = (ulong)pbVar16; if (bVar3 == 0x2d) { if (param_4 != 0) { uVar7 = 0x22; if (uVar11 == 0) { uVar7 = 0; } *param_6 = uVar7; return 0; } goto LAB_0013a03e; } goto LAB_0013a052; } iVar15 = (int)pbVar16 - (int)pbVar13; pbVar6 = (byte *)0x0; uVar12 = (ulong)pbVar16 & 0xffffffff; uVar14 = uVar11; LAB_00139d3d: bVar2 = *pbVar16; bVar9 = bVar2 - 0x30; if (9 < bVar9) { if (bVar2 != 0x2e) goto LAB_00139d84; if (pbVar6 == (byte *)0x0) { pbVar6 = pbVar16 + 1; goto LAB_00139d79; } uVar12 = 0; bVar18 = false; uVar11 = uVar14; pbVar17 = pbVar16; goto LAB_00139e9a; } if ((uVar14 < 0x1999999999999999) || ((uVar14 == 0x1999999999999999 && (bVar9 < 6)))) goto LAB_00139d5c; bVar18 = uVar14 == 0x1999999999999999; uVar11 = 0xffffffffffffffff; if (!bVar18) { uVar11 = uVar14; } uVar8 = (ulong)bVar18; bVar18 = 0x34 < bVar2 || bVar18; pbVar17 = pbVar16 + uVar8; if (pbVar6 != (byte *)0x0) { uVar12 = (ulong)(((int)pbVar6 - (uint)(uVar14 == 0x1999999999999999)) - (int)uVar12); for (; (pbVar17 < pbVar1 && ((byte)(*pbVar17 - 0x30) < 10)); pbVar17 = pbVar17 + 1) { } goto LAB_00139e9a; } uVar12 = 0; if (pbVar1 <= pbVar17) goto LAB_00139e9a; uVar12 = 0; goto LAB_00139e5c; while (lVar4 = uVar12 + uVar8, uVar12 = uVar12 + 1, pbVar16 + lVar4 + 1 < pbVar1) { LAB_00139e5c: if (9 < (byte)(pbVar16[uVar8 + uVar12] - 0x30)) { if (pbVar16[uVar8 + uVar12] != 0x2e) { pbVar17 = pbVar16 + uVar12 + uVar8; goto LAB_00139e9a; } pbVar17 = pbVar16 + uVar12 + uVar8; goto LAB_0013a0b0; } } pbVar17 = pbVar16 + uVar12 + uVar8; goto LAB_00139e9a; LAB_00139d5c: uVar14 = (ulong)bVar9 + uVar14 * 10; iVar15 = iVar15 + 1; LAB_00139d79: pbVar16 = pbVar16 + 1; uVar12 = (ulong)((int)uVar12 + 1); if (pbVar1 <= pbVar16) goto LAB_00139d84; goto LAB_00139d3d; LAB_00139d84: uVar5 = (int)pbVar6 - (int)pbVar16; bVar18 = false; if (pbVar6 == (byte *)0x0) { uVar5 = 0; } uVar12 = (ulong)uVar5; uVar11 = uVar14; pbVar17 = pbVar16; goto LAB_00139e9a; while ((byte)(*pbVar17 - 0x30) < 10) { LAB_0013a0b0: pbVar17 = pbVar17 + 1; if (pbVar1 <= pbVar17) break; } LAB_00139e9a: uVar5 = (uint)uVar12; param_2 = pbVar13; if (iVar15 == 0) goto LAB_00139f6f; if (((pbVar17 < pbVar1) && ((*pbVar17 | 0x20) == 0x65)) && (pbVar13 = pbVar17 + 1, pbVar13 < pbVar1)) { bVar2 = *pbVar13; if (((bVar2 != 0x2d) && (bVar2 != 0x2b)) || (pbVar13 = pbVar17 + 2, pbVar13 != pbVar1)) { if ((0 < (int)uVar5) && (bVar2 != 0x2d)) goto LAB_00139fca; iVar15 = 0; if (pbVar13 < pbVar1) { iVar15 = 0; do { if (9 < (byte)(*pbVar13 - 0x30)) break; if (bVar2 == 0x2d) { if (0x14 < (int)(iVar15 - uVar5)) goto LAB_00139fa1; } else if (0x14 < (int)(iVar15 + uVar5)) goto LAB_00139fca; iVar15 = (uint)(byte)(*pbVar13 - 0x30) + iVar15 * 10; pbVar13 = pbVar13 + 1; } while (pbVar13 < pbVar1); } iVar10 = -iVar15; if (bVar2 != 0x2d) { iVar10 = iVar15; } uVar5 = iVar10 + uVar5; pbVar17 = pbVar13; goto LAB_00139f58; } } else { LAB_00139f58: pbVar13 = pbVar17; pbVar17 = pbVar13; if (uVar5 == 0) { if (bVar18) { if (uVar11 == 0xffffffffffffffff) goto LAB_00139fca; uVar11 = uVar11 + 1; } } else if ((int)uVar5 < 0) { if (uVar5 < 0xffffffed) { LAB_00139fa1: *param_5 = (ulong)pbVar13; *param_6 = 0; return 0; } uVar14 = *(ulong *)(d10 + (ulong)-uVar5 * 8); uVar11 = (uVar11 / uVar14 + 1) - (ulong)((uVar11 % uVar14) * 2 < uVar14); } else if (uVar5 < 0x15) { iVar15 = uVar5 + 1; do { if (0x1999999999999999 < uVar11) goto LAB_00139fca; uVar11 = uVar11 * 10; iVar15 = iVar15 + -1; } while (1 < iVar15); } else { if (uVar11 != 0) { LAB_00139fca: uVar11 = 0x7fffffffffffffff; *param_5 = (ulong)pbVar13; *param_6 = 0x22; if (bVar3 == 0x2d) { uVar11 = 0x8000000000000000; } return -(ulong)(param_4 != 0) | uVar11; } uVar11 = 0; } } *param_5 = (ulong)pbVar17; if (param_4 == 0) { if (bVar3 == 0x2d) { if ((long)uVar11 < 0) { *param_6 = 0x22; return 0x8000000000000000; } LAB_0013a03e: *param_6 = 0; return -uVar11; } if ((long)uVar11 < 0) { *param_6 = 0x22; return 0x7fffffffffffffff; } } else if ((bVar3 == 0x2d) && (uVar11 != 0)) { *param_6 = 0x22; return 0; } LAB_0013a052: *param_6 = 0; return uVar11; }
61,607
tailoring_append2
eloqsql/strings/ctype.c
static int tailoring_append2(MY_XML_PARSER *st, const char *fmt, size_t len1, const char *attr1, size_t len2, const char *attr2) { struct my_cs_file_info *i= (struct my_cs_file_info *) st->user_data; size_t newlen= i->tailoring_length + len1 + len2 + 64; /* 64 for format */ if (MY_XML_OK == my_charset_file_tailoring_realloc(i, newlen)) { char *dst= i->tailoring + i->tailoring_length; sprintf(dst, fmt, (int) len1, attr1, (int) len2, attr2); i->tailoring_length+= strlen(dst); return MY_XML_OK; } return MY_XML_ERROR; }
O0
c
tailoring_append2: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) movq -0x10(%rbp), %rax movq 0x140(%rax), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq 0x690(%rax), %rax addq -0x20(%rbp), %rax addq -0x30(%rbp), %rax addq $0x40, %rax movq %rax, -0x48(%rbp) movq -0x40(%rbp), %rdi movq -0x48(%rbp), %rsi callq 0x7bf80 movl %eax, %ecx xorl %eax, %eax cmpl %ecx, %eax jne 0x7c374 movq -0x40(%rbp), %rax movq 0x688(%rax), %rax movq -0x40(%rbp), %rcx addq 0x690(%rcx), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rax movl %eax, %edx movq -0x28(%rbp), %rcx movq -0x30(%rbp), %rax movl %eax, %r8d movq -0x38(%rbp), %r9 movb $0x0, %al callq 0x240a0 movq -0x50(%rbp), %rdi callq 0x24120 movq %rax, %rcx movq -0x40(%rbp), %rax addq 0x690(%rax), %rcx movq %rcx, 0x690(%rax) movl $0x0, -0x4(%rbp) jmp 0x7c37b movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
tailoring_append2: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_38], r9 mov rax, [rbp+var_10] mov rax, [rax+140h] mov [rbp+var_40], rax mov rax, [rbp+var_40] mov rax, [rax+690h] add rax, [rbp+var_20] add rax, [rbp+var_30] add rax, 40h ; '@' mov [rbp+var_48], rax mov rdi, [rbp+var_40] mov rsi, [rbp+var_48] call my_charset_file_tailoring_realloc mov ecx, eax xor eax, eax cmp eax, ecx jnz short loc_7C374 mov rax, [rbp+var_40] mov rax, [rax+688h] mov rcx, [rbp+var_40] add rax, [rcx+690h] mov [rbp+var_50], rax mov rdi, [rbp+var_50] mov rsi, [rbp+var_18] mov rax, [rbp+var_20] mov edx, eax mov rcx, [rbp+var_28] mov rax, [rbp+var_30] mov r8d, eax mov r9, [rbp+var_38] mov al, 0 call _sprintf mov rdi, [rbp+var_50] call _strlen mov rcx, rax mov rax, [rbp+var_40] add rcx, [rax+690h] mov [rax+690h], rcx mov [rbp+var_4], 0 jmp short loc_7C37B loc_7C374: mov [rbp+var_4], 1 loc_7C37B: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long tailoring_append2(long long a1, const char *a2, long long a3, long long a4, long long a5, long long a6) { long long v7; // [rsp+0h] [rbp-50h] _QWORD *v8; // [rsp+10h] [rbp-40h] unsigned int v10; // [rsp+20h] [rbp-30h] unsigned int v12; // [rsp+30h] [rbp-20h] v12 = a3; v10 = a5; v8 = *(_QWORD **)(a1 + 320); if ( (unsigned int)my_charset_file_tailoring_realloc(v8, a5 + a3 + v8[210] + 64) ) { return 1; } else { v7 = v8[210] + v8[209]; sprintf(v7, a2, v12, a4, v10, a6); v8[210] += strlen(v7); return 0; } }
tailoring_append2: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],R9 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x140] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x690] ADD RAX,qword ptr [RBP + -0x20] ADD RAX,qword ptr [RBP + -0x30] ADD RAX,0x40 MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x48] CALL 0x0017bf80 MOV ECX,EAX XOR EAX,EAX CMP EAX,ECX JNZ 0x0017c374 MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x688] MOV RCX,qword ptr [RBP + -0x40] ADD RAX,qword ptr [RCX + 0x690] MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x50] MOV RSI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] MOV EDX,EAX MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x30] MOV R8D,EAX MOV R9,qword ptr [RBP + -0x38] MOV AL,0x0 CALL 0x001240a0 MOV RDI,qword ptr [RBP + -0x50] CALL 0x00124120 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x40] ADD RCX,qword ptr [RAX + 0x690] MOV qword ptr [RAX + 0x690],RCX MOV dword ptr [RBP + -0x4],0x0 JMP 0x0017c37b LAB_0017c374: MOV dword ptr [RBP + -0x4],0x1 LAB_0017c37b: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
bool tailoring_append2(long param_1,char *param_2,ulong param_3,int8 param_4,ulong param_5, int8 param_6) { long lVar1; int iVar2; char *__s; size_t sVar3; lVar1 = *(long *)(param_1 + 0x140); iVar2 = my_charset_file_tailoring_realloc (lVar1,*(long *)(lVar1 + 0x690) + param_3 + param_5 + 0x40); if (iVar2 == 0) { __s = (char *)(*(long *)(lVar1 + 0x688) + *(long *)(lVar1 + 0x690)); sprintf(__s,param_2,param_3 & 0xffffffff,param_4,param_5 & 0xffffffff,param_6); sVar3 = strlen(__s); *(size_t *)(lVar1 + 0x690) = sVar3 + *(long *)(lVar1 + 0x690); } return iVar2 != 0; }
61,608
google::protobuf::util::(anonymous namespace)::StatusErrorListener::GetLocString[abi:cxx11](google::protobuf::util::converter::LocationTrackerInterface const&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/util/json_util.cc
std::string GetLocString(const converter::LocationTrackerInterface& loc) { std::string loc_string = loc.ToString(); StripWhitespace(&loc_string); if (!loc_string.empty()) { loc_string = StrCat("(", loc_string, ")"); } return loc_string; }
O0
cpp
google::protobuf::util::(anonymous namespace)::StatusErrorListener::GetLocString[abi:cxx11](google::protobuf::util::converter::LocationTrackerInterface const&): subq $0xf8, %rsp movq %rdi, 0x10(%rsp) movq %rdi, %rax movq %rax, 0x8(%rsp) movq %rdi, 0xf0(%rsp) movq %rsi, 0xe8(%rsp) movq %rdx, 0xe0(%rsp) movb $0x0, 0xdf(%rsp) movq 0xe0(%rsp), %rsi movq (%rsi), %rax movq 0x10(%rax), %rax callq *%rax movq 0x10(%rsp), %rdi callq 0x19dd50 jmp 0x1ec1c1 movq 0x10(%rsp), %rdi callq 0x8cff0 testb $0x1, %al jne 0x1ec269 leaq 0x205331(%rip), %rsi # 0x3f150b leaq 0x78(%rsp), %rdi callq 0x176530 jmp 0x1ec1e6 movq 0x10(%rsp), %rsi leaq 0x48(%rsp), %rdi callq 0x1abbc0 jmp 0x1ec1f7 leaq 0x1f328a(%rip), %rsi # 0x3df488 leaq 0x18(%rsp), %rdi callq 0x176530 jmp 0x1ec20a leaq 0xa8(%rsp), %rdi leaq 0x78(%rsp), %rsi leaq 0x48(%rsp), %rdx leaq 0x18(%rsp), %rcx callq 0x1a2830 jmp 0x1ec228 movq 0x10(%rsp), %rdi leaq 0xa8(%rsp), %rsi callq 0x901e0 leaq 0xa8(%rsp), %rdi callq 0x921e0 jmp 0x1ec269 movq 0x10(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0xd0(%rsp) movl %eax, 0xcc(%rsp) callq 0x921e0 jmp 0x1ec292 movb $0x1, 0xdf(%rsp) testb $0x1, 0xdf(%rsp) jne 0x1ec285 movq 0x10(%rsp), %rdi callq 0x921e0 movq 0x8(%rsp), %rax addq $0xf8, %rsp retq movq 0xd0(%rsp), %rdi callq 0x90db0 nop
_ZN6google8protobuf4util12_GLOBAL__N_119StatusErrorListener12GetLocStringB5cxx11ERKNS1_9converter24LocationTrackerInterfaceE: sub rsp, 0F8h mov [rsp+0F8h+var_E8], rdi mov rax, rdi mov [rsp+0F8h+var_F0], rax mov [rsp+0F8h+var_8], rdi mov [rsp+0F8h+var_10], rsi mov [rsp+0F8h+var_18], rdx mov [rsp+0F8h+var_19], 0 mov rsi, [rsp+0F8h+var_18] mov rax, [rsi] mov rax, [rax+10h] call rax mov rdi, [rsp+0F8h+var_E8] call _ZN6google8protobuf15StripWhitespaceEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::StripWhitespace(std::string *) jmp short $+2 loc_1EC1C1: mov rdi, [rsp+0F8h+var_E8] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz loc_1EC269 lea rsi, aIntegerOutOfRa+15h; char * lea rdi, [rsp+0F8h+var_80]; this call _ZN6google8protobuf7strings8AlphaNumC2EPKc; google::protobuf::strings::AlphaNum::AlphaNum(char const*) jmp short $+2 loc_1EC1E6: mov rsi, [rsp+0F8h+var_E8] lea rdi, [rsp+0F8h+var_B0] call _ZN6google8protobuf7strings8AlphaNumC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::strings::AlphaNum::AlphaNum(std::string const&) jmp short $+2 loc_1EC1F7: lea rsi, asc_3DF487+1; char * lea rdi, [rsp+0F8h+var_E0]; this call _ZN6google8protobuf7strings8AlphaNumC2EPKc; google::protobuf::strings::AlphaNum::AlphaNum(char const*) jmp short $+2 loc_1EC20A: lea rdi, [rsp+0F8h+var_50] lea rsi, [rsp+0F8h+var_80] lea rdx, [rsp+0F8h+var_B0] lea rcx, [rsp+0F8h+var_E0] call _ZN6google8protobuf6StrCatB5cxx11ERKNS0_7strings8AlphaNumES4_S4_; google::protobuf::StrCat(google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&) jmp short $+2 loc_1EC228: mov rdi, [rsp+0F8h+var_E8] lea rsi, [rsp+0F8h+var_50] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rsp+0F8h+var_50] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_1EC269 mov rdi, [rsp+arg_8] mov rcx, rax mov eax, edx mov [rsp+arg_C8], rcx mov [rsp+arg_C4], eax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_1EC292 loc_1EC269: mov [rsp+0F8h+var_19], 1 test [rsp+0F8h+var_19], 1 jnz short loc_1EC285 mov rdi, [rsp+0F8h+var_E8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1EC285: mov rax, [rsp+0F8h+var_F0] add rsp, 0F8h retn loc_1EC292: mov rdi, [rsp+arg_C8] call __Unwind_Resume
long long google::protobuf::util::`anonymous namespace'::StatusErrorListener::GetLocString[abi:cxx11]( long long a1, long long a2, long long a3) { _BYTE v4[48]; // [rsp+18h] [rbp-E0h] BYREF _QWORD v5[6]; // [rsp+48h] [rbp-B0h] BYREF _BYTE v6[48]; // [rsp+78h] [rbp-80h] BYREF _BYTE v7[56]; // [rsp+A8h] [rbp-50h] BYREF long long v8; // [rsp+E0h] [rbp-18h] long long v9; // [rsp+E8h] [rbp-10h] long long v10; // [rsp+F0h] [rbp-8h] v10 = a1; v9 = a2; v8 = a3; v7[55] = 0; (*(void (**)(void))(*(_QWORD *)a3 + 16LL))(); google::protobuf::StripWhitespace(a1); if ( (std::string::empty(a1) & 1) == 0 ) { google::protobuf::strings::AlphaNum::AlphaNum((google::protobuf::strings::AlphaNum *)v6, "("); google::protobuf::strings::AlphaNum::AlphaNum(v5, a1); google::protobuf::strings::AlphaNum::AlphaNum((google::protobuf::strings::AlphaNum *)v4, ")"); google::protobuf::StrCat[abi:cxx11]( (long long)v7, (google::protobuf::strings::AlphaNum *)v6, (google::protobuf::strings::AlphaNum *)v5, (google::protobuf::strings::AlphaNum *)v4); std::string::operator=(a1, v7); std::string::~string(v7); } return a1; }
61,609
google::protobuf::util::(anonymous namespace)::StatusErrorListener::GetLocString[abi:cxx11](google::protobuf::util::converter::LocationTrackerInterface const&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/util/json_util.cc
std::string GetLocString(const converter::LocationTrackerInterface& loc) { std::string loc_string = loc.ToString(); StripWhitespace(&loc_string); if (!loc_string.empty()) { loc_string = StrCat("(", loc_string, ")"); } return loc_string; }
O3
cpp
google::protobuf::util::(anonymous namespace)::StatusErrorListener::GetLocString[abi:cxx11](google::protobuf::util::converter::LocationTrackerInterface const&): pushq %r14 pushq %rbx subq $0xb8, %rsp movq %rdi, %rbx movq (%rsi), %rax callq *0x10(%rax) movq %rbx, %rdi callq 0x86b17 movq 0x8(%rbx), %rax testq %rax, %rax je 0xa50bf leaq 0xcb43a(%rip), %rcx # 0x170497 leaq 0x88(%rsp), %rsi movq %rcx, (%rsi) movl $0x1, %edi movq %rdi, 0x8(%rsi) movq (%rbx), %rcx leaq 0x58(%rsp), %rdx movq %rcx, (%rdx) movq %rax, 0x8(%rdx) leaq 0xbdece(%rip), %rax # 0x162f55 leaq 0x28(%rsp), %rcx movq %rax, (%rcx) movq %rdi, 0x8(%rcx) leaq 0x8(%rsp), %rdi callq 0x88b1e leaq 0x8(%rsp), %r14 movq %rbx, %rdi movq %r14, %rsi callq 0x2c6a0 movq (%r14), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0xa50bf callq 0x2d160 addq $0xb8, %rsp popq %rbx popq %r14 retq jmp 0xa50cc movq %rax, %r14 movq (%rbx), %rdi addq $0x10, %rbx cmpq %rbx, %rdi je 0xa50e0 callq 0x2d160 movq %r14, %rdi callq 0x2e220
_ZN6google8protobuf4util12_GLOBAL__N_119StatusErrorListener12GetLocStringB5cxx11ERKNS1_9converter24LocationTrackerInterfaceE: push r14 push rbx sub rsp, 0B8h mov rbx, rdi mov rax, [rsi] call qword ptr [rax+10h] mov rdi, rbx call _ZN6google8protobuf15StripWhitespaceEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::StripWhitespace(std::string *) mov rax, [rbx+8] test rax, rax jz short loc_A50BF lea rcx, aIntegerOutOfRa+15h; "(" lea rsi, [rsp+0C8h+var_40] mov [rsi], rcx mov edi, 1 mov [rsi+8], rdi mov rcx, [rbx] lea rdx, [rsp+0C8h+var_70] mov [rdx], rcx mov [rdx+8], rax lea rax, asc_162F54+1; ")" lea rcx, [rsp+0C8h+var_A0] mov [rcx], rax mov [rcx+8], rdi lea rdi, [rsp+0C8h+var_C0] call _ZN6google8protobuf6StrCatB5cxx11ERKNS0_7strings8AlphaNumES4_S4_; google::protobuf::StrCat(google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&,google::protobuf::strings::AlphaNum const&) lea r14, [rsp+0C8h+var_C0] mov rdi, rbx mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r14]; void * lea rax, [rsp+0C8h+var_B0] cmp rdi, rax jz short loc_A50BF call __ZdlPv; operator delete(void *) loc_A50BF: add rsp, 0B8h pop rbx pop r14 retn jmp short $+2 loc_A50CC: mov r14, rax mov rdi, [rbx]; void * add rbx, 10h cmp rdi, rbx jz short loc_A50E0 call __ZdlPv; operator delete(void *) loc_A50E0: mov rdi, r14 call __Unwind_Resume
void google::protobuf::util::`anonymous namespace'::StatusErrorListener::GetLocString[abi:cxx11]( _QWORD *a1, long long a2) { long long v2; // rax void *v3[2]; // [rsp+8h] [rbp-C0h] BYREF char v4; // [rsp+18h] [rbp-B0h] BYREF _QWORD v5[6]; // [rsp+28h] [rbp-A0h] BYREF _QWORD v6[6]; // [rsp+58h] [rbp-70h] BYREF _QWORD v7[8]; // [rsp+88h] [rbp-40h] BYREF (*(void (**)(void))(*(_QWORD *)a2 + 16LL))(); google::protobuf::StripWhitespace(a1); v2 = a1[1]; if ( v2 ) { v7[0] = "("; v7[1] = 1LL; v6[0] = *a1; v6[1] = v2; v5[0] = ")"; v5[1] = 1LL; google::protobuf::StrCat[abi:cxx11]((long long *)v3, (long long)v7, (long long)v6, (long long)v5); std::string::operator=(a1, (long long)v3); if ( v3[0] != &v4 ) operator delete(v3[0]); } }
GetLocString[abi:cxx11]: PUSH R14 PUSH RBX SUB RSP,0xb8 MOV RBX,RDI MOV RAX,qword ptr [RSI] CALL qword ptr [RAX + 0x10] LAB_001a5045: MOV RDI,RBX CALL 0x00186b17 MOV RAX,qword ptr [RBX + 0x8] TEST RAX,RAX JZ 0x001a50bf LEA RCX,[0x270497] LEA RSI,[RSP + 0x88] MOV qword ptr [RSI],RCX MOV EDI,0x1 MOV qword ptr [RSI + 0x8],RDI MOV RCX,qword ptr [RBX] LEA RDX,[RSP + 0x58] MOV qword ptr [RDX],RCX MOV qword ptr [RDX + 0x8],RAX LEA RAX,[0x262f55] LEA RCX,[RSP + 0x28] MOV qword ptr [RCX],RAX MOV qword ptr [RCX + 0x8],RDI LAB_001a5093: LEA RDI,[RSP + 0x8] CALL 0x00188b1e LAB_001a509d: LEA R14,[RSP + 0x8] MOV RDI,RBX MOV RSI,R14 CALL 0x0012c6a0 MOV RDI,qword ptr [R14] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x001a50bf CALL 0x0012d160 LAB_001a50bf: ADD RSP,0xb8 POP RBX POP R14 RET
/* google::protobuf::util::(anonymous namespace)::StatusErrorListener::GetLocString[abi:cxx11](google::protobuf::util::converter::LocationTrackerInterface const&) */ void __thiscall google::protobuf::util::(anonymous_namespace)::StatusErrorListener::GetLocString_abi_cxx11_ (StatusErrorListener *this,LocationTrackerInterface *param_1) { int1 *local_c0 [2]; int1 local_b0 [16]; int *local_a0; int8 local_98; int8 local_70; long local_68; char *local_40; int8 local_38; (**(code **)(*(long *)param_1 + 0x10))(); /* try { // try from 001a5045 to 001a504c has its CatchHandler @ 001a50cc */ StripWhitespace((string *)this); local_68 = *(long *)(this + 8); if (local_68 != 0) { local_40 = "("; local_38 = 1; local_70 = *(int8 *)this; local_a0 = &DAT_00262f55; local_98 = 1; /* try { // try from 001a5093 to 001a509c has its CatchHandler @ 001a50ca */ StrCat_abi_cxx11_((protobuf *)local_c0,(AlphaNum *)&local_40,(AlphaNum *)&local_70, (AlphaNum *)&local_a0); std::__cxx11::string::operator=((string *)this,(string *)local_c0); if (local_c0[0] != local_b0) { operator_delete(local_c0[0]); } } return; }
61,610
set_leaf
corpus-core[P]colibri-stateless/src/util/ssz_merkle.c
static void set_leaf(ssz_ob_t ob, int index, uint8_t* out, merkle_ctx_t* ctx) { memset(out, 0, 32); const ssz_def_t* def = ob.def; switch (def->type) { case SSZ_TYPE_NONE: break; case SSZ_TYPE_CONTAINER: { if (index < def->def.container.len) hash_tree_root( ssz_get(&ob, (char*) def->def.container.elements[index].name), out, ctx); break; } case SSZ_TYPE_BIT_LIST: { uint32_t bit_len = ssz_len(ob); uint32_t chunks = (bit_len + 255) >> 8; if (index < chunks) { uint32_t rest = ob.bytes.len - (index << 5) - (bit_len % 8 ? 0 : 1); if (rest > 32) rest = 32; memcpy(out, ob.bytes.data + (index << 5), rest); if (index == chunks - 1 && bit_len % 8) out[rest - 1] -= 1 << (bit_len % 8); } return; } case SSZ_TYPE_VECTOR: case SSZ_TYPE_LIST: case SSZ_TYPE_BIT_VECTOR: { // handle complex types if ((def->type == SSZ_TYPE_VECTOR || def->type == SSZ_TYPE_LIST) && !is_basic_type(def->def.vector.type)) { uint32_t len = ssz_len(ob); if (index < len) hash_tree_root(ssz_at(ob, index), out, ctx); return; } int offset = index * BYTES_PER_CHUNK; int len = ob.bytes.len - offset; if (len > BYTES_PER_CHUNK) len = BYTES_PER_CHUNK; if (offset < ob.bytes.len) memcpy(out, ob.bytes.data + offset, len); break; } case SSZ_TYPE_UINT: case SSZ_TYPE_BOOLEAN: if (ob.bytes.len <= BYTES_PER_CHUNK) memcpy(out, ob.bytes.data, ob.bytes.len); break; case SSZ_TYPE_UNION: // TODO imoplement it break; } }
O0
c
set_leaf: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp leaq 0x10(%rbp), %rax movq %rax, -0x78(%rbp) movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rcx xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rcx) movups %xmm0, (%rcx) movq 0x10(%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movl 0x8(%rax), %eax movq %rax, -0x70(%rbp) subq $0x8, %rax ja 0xa2f70 movq -0x70(%rbp), %rax leaq 0x44db4(%rip), %rcx # 0xe7ac8 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax jmp 0xa2f70 movl -0x4(%rbp), %eax movq -0x20(%rbp), %rcx cmpl 0x18(%rcx), %eax jae 0xa2d7b movq -0x78(%rbp), %rsi movq -0x20(%rbp), %rax movq 0x10(%rax), %rax movslq -0x4(%rbp), %rcx shlq $0x5, %rcx addq %rcx, %rax movq (%rax), %rdx leaq -0x38(%rbp), %rdi callq 0xa1c10 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi leaq -0x38(%rbp), %rax movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0xa20e0 jmp 0xa2f70 movq -0x78(%rbp), %rax movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0xa0830 movl %eax, -0x3c(%rbp) movl -0x3c(%rbp), %eax addl $0xff, %eax shrl $0x8, %eax movl %eax, -0x40(%rbp) movl -0x4(%rbp), %eax cmpl -0x40(%rbp), %eax jae 0xa2e4f movq -0x78(%rbp), %rax movl (%rax), %eax movl -0x4(%rbp), %ecx shll $0x5, %ecx subl %ecx, %eax movl -0x3c(%rbp), %esi andl $0x7, %esi movl $0x1, %ecx xorl %edx, %edx cmpl $0x0, %esi cmovnel %edx, %ecx subl %ecx, %eax movl %eax, -0x44(%rbp) cmpl $0x20, -0x44(%rbp) jbe 0xa2df2 movl $0x20, -0x44(%rbp) movq -0x78(%rbp), %rax movq -0x10(%rbp), %rdi movq 0x8(%rax), %rsi movl -0x4(%rbp), %eax shll $0x5, %eax cltq addq %rax, %rsi movl -0x44(%rbp), %eax movl %eax, %edx callq 0x230a0 movl -0x4(%rbp), %eax movl -0x40(%rbp), %ecx subl $0x1, %ecx cmpl %ecx, %eax jne 0xa2e4d movl -0x3c(%rbp), %eax andl $0x7, %eax cmpl $0x0, %eax je 0xa2e4d movl -0x3c(%rbp), %ecx andl $0x7, %ecx movl $0x1, %esi shll %cl, %esi movq -0x10(%rbp), %rax movl -0x44(%rbp), %ecx subl $0x1, %ecx movl %ecx, %ecx movzbl (%rax,%rcx), %edx subl %esi, %edx movb %dl, (%rax,%rcx) jmp 0xa2e4f jmp 0xa2f70 movq -0x20(%rbp), %rax cmpl $0x3, 0x8(%rax) je 0xa2e6c movq -0x20(%rbp), %rax cmpl $0x4, 0x8(%rax) jne 0xa2f03 movq -0x20(%rbp), %rax movq 0x10(%rax), %rdi callq 0xa1a10 testb $0x1, %al jne 0xa2f03 movq -0x78(%rbp), %rax movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0xa0830 movl %eax, -0x48(%rbp) movl -0x4(%rbp), %eax cmpl -0x48(%rbp), %eax jae 0xa2f01 movq -0x78(%rbp), %rax movl -0x4(%rbp), %esi leaq -0x60(%rbp), %rdi movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0xa0580 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi leaq -0x60(%rbp), %rax movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0xa20e0 jmp 0xa2f70 movq -0x78(%rbp), %rax movl -0x4(%rbp), %ecx shll $0x5, %ecx movl %ecx, -0x64(%rbp) movl (%rax), %eax subl -0x64(%rbp), %eax movl %eax, -0x68(%rbp) cmpl $0x20, -0x68(%rbp) jle 0xa2f25 movl $0x20, -0x68(%rbp) movq -0x78(%rbp), %rcx movl -0x64(%rbp), %eax cmpl (%rcx), %eax jae 0xa2f4c movq -0x78(%rbp), %rax movq -0x10(%rbp), %rdi movq 0x8(%rax), %rsi movslq -0x64(%rbp), %rax addq %rax, %rsi movslq -0x68(%rbp), %rdx callq 0x230a0 jmp 0xa2f70 movq -0x78(%rbp), %rax cmpl $0x20, (%rax) ja 0xa2f6c movq -0x78(%rbp), %rax movq -0x10(%rbp), %rdi movq 0x8(%rax), %rsi movl (%rax), %eax movl %eax, %edx callq 0x230a0 jmp 0xa2f70 jmp 0xa2f70 addq $0x90, %rsp popq %rbp retq nopl (%rax)
set_leaf: push rbp mov rbp, rsp sub rsp, 90h lea rax, [rbp+arg_0] mov [rbp+var_78], rax mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rcx, [rbp+var_10] xorps xmm0, xmm0 movups xmmword ptr [rcx+10h], xmm0 movups xmmword ptr [rcx], xmm0 mov rax, [rax+10h] mov [rbp+var_20], rax mov rax, [rbp+var_20] mov eax, [rax+8] mov [rbp+var_70], rax sub rax, 8; switch 9 cases ja def_A2D1B; jumptable 00000000000A2D1B default case mov rax, [rbp+var_70] lea rcx, jpt_A2D1B movsxd rax, ds:(jpt_A2D1B - 0E7AC8h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_A2D1D: jmp def_A2D1B; jumptable 00000000000A2D1B case 8 loc_A2D22: mov eax, [rbp+var_4]; jumptable 00000000000A2D1B case 2 mov rcx, [rbp+var_20] cmp eax, [rcx+18h] jnb short loc_A2D7B mov rsi, [rbp+var_78] mov rax, [rbp+var_20] mov rax, [rax+10h] movsxd rcx, [rbp+var_4] shl rcx, 5 add rax, rcx mov rdx, [rax] lea rdi, [rbp+var_38] call ssz_get mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] lea rax, [rbp+var_38] mov rcx, [rax] mov [rsp+90h+var_90], rcx mov rcx, [rax+8] mov [rsp+90h+var_88], rcx mov rax, [rax+10h] mov [rsp+90h+var_80], rax call hash_tree_root loc_A2D7B: jmp def_A2D1B; jumptable 00000000000A2D1B default case loc_A2D80: mov rax, [rbp+var_78]; jumptable 00000000000A2D1B case 6 mov rcx, [rax] mov [rsp+90h+var_90], rcx mov rcx, [rax+8] mov [rsp+90h+var_88], rcx mov rax, [rax+10h] mov [rsp+90h+var_80], rax call ssz_len mov [rbp+var_3C], eax mov eax, [rbp+var_3C] add eax, 0FFh shr eax, 8 mov [rbp+var_40], eax mov eax, [rbp+var_4] cmp eax, [rbp+var_40] jnb loc_A2E4F mov rax, [rbp+var_78] mov eax, [rax] mov ecx, [rbp+var_4] shl ecx, 5 sub eax, ecx mov esi, [rbp+var_3C] and esi, 7 mov ecx, 1 xor edx, edx cmp esi, 0 cmovnz ecx, edx sub eax, ecx mov [rbp+var_44], eax cmp [rbp+var_44], 20h ; ' ' jbe short loc_A2DF2 mov [rbp+var_44], 20h ; ' ' loc_A2DF2: mov rax, [rbp+var_78] mov rdi, [rbp+var_10] mov rsi, [rax+8] mov eax, [rbp+var_4] shl eax, 5 cdqe add rsi, rax mov eax, [rbp+var_44] mov edx, eax call _memcpy mov eax, [rbp+var_4] mov ecx, [rbp+var_40] sub ecx, 1 cmp eax, ecx jnz short loc_A2E4D mov eax, [rbp+var_3C] and eax, 7 cmp eax, 0 jz short loc_A2E4D mov ecx, [rbp+var_3C] and ecx, 7 mov esi, 1 shl esi, cl mov rax, [rbp+var_10] mov ecx, [rbp+var_44] sub ecx, 1 mov ecx, ecx movzx edx, byte ptr [rax+rcx] sub edx, esi mov [rax+rcx], dl loc_A2E4D: jmp short $+2 loc_A2E4F: jmp def_A2D1B; jumptable 00000000000A2D1B default case loc_A2E54: mov rax, [rbp+var_20]; jumptable 00000000000A2D1B cases 3-5 cmp dword ptr [rax+8], 3 jz short loc_A2E6C mov rax, [rbp+var_20] cmp dword ptr [rax+8], 4 jnz loc_A2F03 loc_A2E6C: mov rax, [rbp+var_20] mov rdi, [rax+10h] call is_basic_type test al, 1 jnz loc_A2F03 mov rax, [rbp+var_78] mov rcx, [rax] mov [rsp+90h+var_90], rcx mov rcx, [rax+8] mov [rsp+90h+var_88], rcx mov rax, [rax+10h] mov [rsp+90h+var_80], rax call ssz_len mov [rbp+var_48], eax mov eax, [rbp+var_4] cmp eax, [rbp+var_48] jnb short loc_A2F01 mov rax, [rbp+var_78] mov esi, [rbp+var_4] lea rdi, [rbp+var_60] mov rcx, [rax] mov [rsp+90h+var_90], rcx mov rcx, [rax+8] mov [rsp+90h+var_88], rcx mov rax, [rax+10h] mov [rsp+90h+var_80], rax call ssz_at mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] lea rax, [rbp+var_60] mov rcx, [rax] mov [rsp+90h+var_90], rcx mov rcx, [rax+8] mov [rsp+90h+var_88], rcx mov rax, [rax+10h] mov [rsp+90h+var_80], rax call hash_tree_root loc_A2F01: jmp short def_A2D1B; jumptable 00000000000A2D1B default case loc_A2F03: mov rax, [rbp+var_78] mov ecx, [rbp+var_4] shl ecx, 5 mov [rbp+var_64], ecx mov eax, [rax] sub eax, [rbp+var_64] mov [rbp+var_68], eax cmp [rbp+var_68], 20h ; ' ' jle short loc_A2F25 mov [rbp+var_68], 20h ; ' ' loc_A2F25: mov rcx, [rbp+var_78] mov eax, [rbp+var_64] cmp eax, [rcx] jnb short loc_A2F4C mov rax, [rbp+var_78] mov rdi, [rbp+var_10] mov rsi, [rax+8] movsxd rax, [rbp+var_64] add rsi, rax movsxd rdx, [rbp+var_68] call _memcpy loc_A2F4C: jmp short def_A2D1B; jumptable 00000000000A2D1B default case loc_A2F4E: mov rax, [rbp+var_78]; jumptable 00000000000A2D1B cases 0,1 cmp dword ptr [rax], 20h ; ' ' ja short loc_A2F6C mov rax, [rbp+var_78] mov rdi, [rbp+var_10] mov rsi, [rax+8] mov eax, [rax] mov edx, eax call _memcpy loc_A2F6C: jmp short def_A2D1B; jumptable 00000000000A2D1B default case loc_A2F6E: jmp short $+2; jumptable 00000000000A2D1B case 7 def_A2D1B: add rsp, 90h; jumptable 00000000000A2D1B default case pop rbp retn
long long * set_leaf( unsigned int a1, long long *a2, long long a3, _DWORD a4, int a5, int a6, double a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14, long long a15, unsigned __int8 *a16, long long a17) { long long *result; // rax int v18; // edx int v19; // r8d int v20; // r9d long long v21; // rdi int v22; // edx int v23; // r8d int v24; // r9d int v25; // edx int v26; // r8d int v27; // r9d int v28; // edx int v29; // r8d int v30; // r9d int v31; // [rsp+28h] [rbp-68h] unsigned int v32; // [rsp+2Ch] [rbp-64h] long long v33; // [rsp+30h] [rbp-60h] BYREF unsigned __int8 *v34; // [rsp+38h] [rbp-58h] long long v35; // [rsp+40h] [rbp-50h] unsigned int v36; // [rsp+48h] [rbp-48h] unsigned int v37; // [rsp+4Ch] [rbp-44h] unsigned int v38; // [rsp+50h] [rbp-40h] int v39; // [rsp+54h] [rbp-3Ch] long long v40; // [rsp+58h] [rbp-38h] BYREF unsigned __int8 *v41; // [rsp+60h] [rbp-30h] long long v42; // [rsp+68h] [rbp-28h] long long v43; // [rsp+70h] [rbp-20h] long long v44; // [rsp+78h] [rbp-18h] long long *v45; // [rsp+80h] [rbp-10h] unsigned int v46; // [rsp+8Ch] [rbp-4h] v46 = a1; v45 = a2; v44 = a3; *((_OWORD *)a2 + 1) = 0LL; *(_OWORD *)a2 = 0LL; v43 = a17; result = (long long *)*(unsigned int *)(a17 + 8); switch ( *(_DWORD *)(a17 + 8) ) { case 0: case 1: result = &a15; if ( (unsigned int)a15 <= 0x20 ) result = (long long *)memcpy(v45, a16, (unsigned int)a15); break; case 2: result = (long long *)v46; if ( v46 < *(_DWORD *)(v43 + 24) ) { ssz_get( (long long)&v40, (long long)&a15, *(_QWORD *)(32LL * (int)v46 + *(_QWORD *)(v43 + 16)), (__m128)0LL, a8, a9, a10, a11, a12, a13, a14); result = hash_tree_root((long long)v45, v44, v18, (_DWORD)v41, v19, v20, v40, v41, v42); } break; case 3: case 4: case 5: if ( (*(_DWORD *)(v43 + 8) == 3 || *(_DWORD *)(v43 + 8) == 4) && (v21 = *(_QWORD *)(v43 + 16), !is_basic_type(v21)) ) { v36 = ssz_len(v21, (_DWORD)a2, v22, (_DWORD)a16, v23, v24, a15, a16, a17); result = (long long *)v46; if ( v46 < v36 ) { ssz_at((long long)&v33, v46, v25, (_DWORD)a16, v26, v27, a15, (long long)a16, a17); result = hash_tree_root((long long)v45, v44, v28, (_DWORD)v34, v29, v30, v33, v34, v35); } } else { v32 = 32 * v46; v31 = a15 - 32 * v46; if ( v31 > 32 ) v31 = 32; result = (long long *)v32; if ( v32 < (unsigned int)a15 ) result = (long long *)memcpy(v45, &a16[v32], v31); } break; case 6: v39 = ssz_len(a1, (_DWORD)a2, a3, (_DWORD)a16, a5, a6, a15, a16, a17); v38 = (unsigned int)(v39 + 255) >> 8; result = (long long *)v46; if ( v46 < v38 ) { v37 = a15 - 32 * v46 - ((v39 & 7) == 0); if ( v37 > 0x20 ) v37 = 32; memcpy(v45, &a16[32 * v46], v37); result = (long long *)v46; if ( v46 == v38 - 1 ) { result = (long long *)(v39 & 7); if ( (v39 & 7) != 0 ) { result = v45; *((_BYTE *)v45 + v37 - 1) -= 1 << (v39 & 7); } } } break; default: return result; } return result; }
set_leaf: PUSH RBP MOV RBP,RSP SUB RSP,0x90 LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x78],RAX MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RCX,qword ptr [RBP + -0x10] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RCX + 0x10],XMM0 MOVUPS xmmword ptr [RCX],XMM0 MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x70],RAX SUB RAX,0x8 JA 0x001a2f70 MOV RAX,qword ptr [RBP + -0x70] LEA RCX,[0x1e7ac8] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_8: JMP 0x001a2f70 caseD_2: MOV EAX,dword ptr [RBP + -0x4] MOV RCX,qword ptr [RBP + -0x20] CMP EAX,dword ptr [RCX + 0x18] JNC 0x001a2d7b MOV RSI,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x10] MOVSXD RCX,dword ptr [RBP + -0x4] SHL RCX,0x5 ADD RAX,RCX MOV RDX,qword ptr [RAX] LEA RDI,[RBP + -0x38] CALL 0x001a1c10 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] LEA RAX,[RBP + -0x38] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x001a20e0 LAB_001a2d7b: JMP 0x001a2f70 caseD_6: MOV RAX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x001a0830 MOV dword ptr [RBP + -0x3c],EAX MOV EAX,dword ptr [RBP + -0x3c] ADD EAX,0xff SHR EAX,0x8 MOV dword ptr [RBP + -0x40],EAX MOV EAX,dword ptr [RBP + -0x4] CMP EAX,dword ptr [RBP + -0x40] JNC 0x001a2e4f MOV RAX,qword ptr [RBP + -0x78] MOV EAX,dword ptr [RAX] MOV ECX,dword ptr [RBP + -0x4] SHL ECX,0x5 SUB EAX,ECX MOV ESI,dword ptr [RBP + -0x3c] AND ESI,0x7 MOV ECX,0x1 XOR EDX,EDX CMP ESI,0x0 CMOVNZ ECX,EDX SUB EAX,ECX MOV dword ptr [RBP + -0x44],EAX CMP dword ptr [RBP + -0x44],0x20 JBE 0x001a2df2 MOV dword ptr [RBP + -0x44],0x20 LAB_001a2df2: MOV RAX,qword ptr [RBP + -0x78] MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x8] MOV EAX,dword ptr [RBP + -0x4] SHL EAX,0x5 CDQE ADD RSI,RAX MOV EAX,dword ptr [RBP + -0x44] MOV EDX,EAX CALL 0x001230a0 MOV EAX,dword ptr [RBP + -0x4] MOV ECX,dword ptr [RBP + -0x40] SUB ECX,0x1 CMP EAX,ECX JNZ 0x001a2e4d MOV EAX,dword ptr [RBP + -0x3c] AND EAX,0x7 CMP EAX,0x0 JZ 0x001a2e4d MOV ECX,dword ptr [RBP + -0x3c] AND ECX,0x7 MOV ESI,0x1 SHL ESI,CL MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x44] SUB ECX,0x1 MOV ECX,ECX MOVZX EDX,byte ptr [RAX + RCX*0x1] SUB EDX,ESI MOV byte ptr [RAX + RCX*0x1],DL LAB_001a2e4d: JMP 0x001a2e4f LAB_001a2e4f: JMP 0x001a2f70 caseD_3: MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0x8],0x3 JZ 0x001a2e6c MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0x8],0x4 JNZ 0x001a2f03 LAB_001a2e6c: MOV RAX,qword ptr [RBP + -0x20] MOV RDI,qword ptr [RAX + 0x10] CALL 0x001a1a10 TEST AL,0x1 JNZ 0x001a2f03 MOV RAX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x001a0830 MOV dword ptr [RBP + -0x48],EAX MOV EAX,dword ptr [RBP + -0x4] CMP EAX,dword ptr [RBP + -0x48] JNC 0x001a2f01 MOV RAX,qword ptr [RBP + -0x78] MOV ESI,dword ptr [RBP + -0x4] LEA RDI,[RBP + -0x60] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x001a0580 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] LEA RAX,[RBP + -0x60] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x001a20e0 LAB_001a2f01: JMP 0x001a2f70 LAB_001a2f03: MOV RAX,qword ptr [RBP + -0x78] MOV ECX,dword ptr [RBP + -0x4] SHL ECX,0x5 MOV dword ptr [RBP + -0x64],ECX MOV EAX,dword ptr [RAX] SUB EAX,dword ptr [RBP + -0x64] MOV dword ptr [RBP + -0x68],EAX CMP dword ptr [RBP + -0x68],0x20 JLE 0x001a2f25 MOV dword ptr [RBP + -0x68],0x20 LAB_001a2f25: MOV RCX,qword ptr [RBP + -0x78] MOV EAX,dword ptr [RBP + -0x64] CMP EAX,dword ptr [RCX] JNC 0x001a2f4c MOV RAX,qword ptr [RBP + -0x78] MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x8] MOVSXD RAX,dword ptr [RBP + -0x64] ADD RSI,RAX MOVSXD RDX,dword ptr [RBP + -0x68] CALL 0x001230a0 LAB_001a2f4c: JMP 0x001a2f70 caseD_0: MOV RAX,qword ptr [RBP + -0x78] CMP dword ptr [RAX],0x20 JA 0x001a2f6c MOV RAX,qword ptr [RBP + -0x78] MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x8] MOV EAX,dword ptr [RAX] MOV EDX,EAX CALL 0x001230a0 LAB_001a2f6c: JMP 0x001a2f70 caseD_7: JMP 0x001a2f70 default: ADD RSP,0x90 POP RBP RET
void set_leaf(uint param_1,int8 *param_2,int8 param_3) { ulong uVar1; uint in_stack_00000008; void *in_stack_00000010; long in_stack_00000018; int local_70; int1 local_68 [24]; uint local_50; uint local_4c; uint local_48; uint local_44; int1 local_40 [24]; long local_28; int8 local_20; int8 *local_18; uint local_c; param_2[2] = 0; param_2[3] = 0; *param_2 = 0; param_2[1] = 0; local_28 = in_stack_00000018; local_20 = param_3; local_18 = param_2; local_c = param_1; switch(*(int4 *)(in_stack_00000018 + 8)) { case 0: case 1: if (in_stack_00000008 < 0x21) { memcpy(param_2,in_stack_00000010,(ulong)in_stack_00000008); } break; case 2: if (param_1 < *(uint *)(in_stack_00000018 + 0x18)) { ssz_get(local_40,&stack0x00000008, *(int8 *)(*(long *)(in_stack_00000018 + 0x10) + (long)(int)param_1 * 0x20)); hash_tree_root(local_18,local_20); } break; case 3: case 4: case 5: if (((*(int *)(in_stack_00000018 + 8) == 3) || (*(int *)(in_stack_00000018 + 8) == 4)) && (uVar1 = is_basic_type(*(int8 *)(in_stack_00000018 + 0x10)), (uVar1 & 1) == 0)) { local_50 = ssz_len(); if (local_c < local_50) { ssz_at(local_68,local_c); hash_tree_root(local_18,local_20); } } else { local_70 = in_stack_00000008 + local_c * -0x20; if (0x20 < local_70) { local_70 = 0x20; } if (local_c * 0x20 < in_stack_00000008) { memcpy(local_18,(void *)((long)in_stack_00000010 + (long)(int)(local_c * 0x20)), (long)local_70); } } break; case 6: local_44 = ssz_len(); local_48 = local_44 + 0xff >> 8; if (local_c < local_48) { local_4c = (in_stack_00000008 + local_c * -0x20) - (uint)((local_44 & 7) == 0); if (0x20 < local_4c) { local_4c = 0x20; } memcpy(local_18,(void *)((long)in_stack_00000010 + (long)(int)(local_c << 5)),(ulong)local_4c) ; if ((local_c == local_48 - 1) && ((local_44 & 7) != 0)) { *(char *)((long)local_18 + (ulong)(local_4c - 1)) = *(char *)((long)local_18 + (ulong)(local_4c - 1)) - (char)(1 << ((byte)local_44 & 7)); } } break; case 7: break; case 8: } return; }
61,611
set_leaf
corpus-core[P]colibri-stateless/src/util/ssz_merkle.c
static void set_leaf(ssz_ob_t ob, int index, uint8_t* out, merkle_ctx_t* ctx) { memset(out, 0, 32); const ssz_def_t* def = ob.def; switch (def->type) { case SSZ_TYPE_NONE: break; case SSZ_TYPE_CONTAINER: { if (index < def->def.container.len) hash_tree_root( ssz_get(&ob, (char*) def->def.container.elements[index].name), out, ctx); break; } case SSZ_TYPE_BIT_LIST: { uint32_t bit_len = ssz_len(ob); uint32_t chunks = (bit_len + 255) >> 8; if (index < chunks) { uint32_t rest = ob.bytes.len - (index << 5) - (bit_len % 8 ? 0 : 1); if (rest > 32) rest = 32; memcpy(out, ob.bytes.data + (index << 5), rest); if (index == chunks - 1 && bit_len % 8) out[rest - 1] -= 1 << (bit_len % 8); } return; } case SSZ_TYPE_VECTOR: case SSZ_TYPE_LIST: case SSZ_TYPE_BIT_VECTOR: { // handle complex types if ((def->type == SSZ_TYPE_VECTOR || def->type == SSZ_TYPE_LIST) && !is_basic_type(def->def.vector.type)) { uint32_t len = ssz_len(ob); if (index < len) hash_tree_root(ssz_at(ob, index), out, ctx); return; } int offset = index * BYTES_PER_CHUNK; int len = ob.bytes.len - offset; if (len > BYTES_PER_CHUNK) len = BYTES_PER_CHUNK; if (offset < ob.bytes.len) memcpy(out, ob.bytes.data + offset, len); break; } case SSZ_TYPE_UINT: case SSZ_TYPE_BOOLEAN: if (ob.bytes.len <= BYTES_PER_CHUNK) memcpy(out, ob.bytes.data, ob.bytes.len); break; case SSZ_TYPE_UNION: // TODO imoplement it break; } }
O3
c
set_leaf: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rsi) movups %xmm0, (%rsi) movq 0xa0(%rsp), %rax movl 0x8(%rax), %ecx cmpq $0x6, %rcx ja 0x55e8c movq %rdx, %r15 movq %rsi, %rbx movl %edi, %ebp leaq 0x90(%rsp), %r14 leaq 0x3671e(%rip), %rdx # 0x8c418 movslq (%rdx,%rcx,4), %rsi addq %rdx, %rsi jmpq *%rsi addl $-0x3, %ecx cmpl $0x1, %ecx ja 0x55d29 movq 0x10(%rax), %rax movl 0x8(%rax), %eax cmpl $0x8, %eax ja 0x55e36 movl $0x103, %ecx # imm = 0x103 btl %eax, %ecx jae 0x55e36 shll $0x5, %ebp movl (%r14), %eax subl %ebp, %eax jbe 0x55e8c cmpl $0x20, %eax movl $0x20, %ecx cmovll %eax, %ecx movslq %ebp, %rsi addq 0x8(%r14), %rsi movslq %ecx, %rdx jmp 0x55d5f movl (%r14), %edx cmpq $0x20, %rdx ja 0x55e8c movq 0x8(%r14), %rsi movq %rbx, %rdi addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x22090 cmpl %ebp, 0x18(%rax) jbe 0x55e8c movq 0x10(%rax), %rax movslq %ebp, %rcx shlq $0x5, %rcx movq (%rax,%rcx), %rdx leaq 0x40(%rsp), %r12 movq %r12, %rdi movq %r14, %rsi callq 0x5525d movq 0x10(%r12), %rax movq %rax, 0x10(%rsp) movups (%r12), %xmm0 jmp 0x55e7d movq 0x10(%r14), %rax movq %rax, 0x10(%rsp) movups (%r14), %xmm0 movups %xmm0, (%rsp) callq 0x547b8 leal 0xff(%rax), %r13d shrl $0x8, %r13d cmpl %ebp, %r13d jbe 0x55e8c movl (%r14), %edx movl %ebp, %esi shll $0x5, %esi xorl %r15d, %r15d andl $0x7, %eax movq %rax, 0x20(%rsp) sete %r15b subl %r15d, %edx subl %esi, %edx cmpl $0x20, %edx movl $0x20, %r12d cmovbl %edx, %r12d addq 0x8(%r14), %rsi movq %rbx, %rdi movq %r12, %rdx callq 0x22090 movq 0x20(%rsp), %rcx decl %r13d cmpl %ebp, %r13d setne %al orb %al, %r15b jne 0x55e8c movl $0xffffffff, %eax # imm = 0xFFFFFFFF shll %cl, %eax decl %r12d addb %al, (%rbx,%r12) jmp 0x55e8c movq 0x10(%r14), %rax movq %rax, 0x10(%rsp) movups (%r14), %xmm0 movups %xmm0, (%rsp) callq 0x547b8 cmpl %ebp, %eax jbe 0x55e8c movq 0x10(%r14), %rax movq %rax, 0x10(%rsp) movups (%r14), %xmm0 movups %xmm0, (%rsp) leaq 0x28(%rsp), %r14 movq %r14, %rdi movl %ebp, %esi callq 0x5463d movq 0x10(%r14), %rax movq %rax, 0x10(%rsp) movups (%r14), %xmm0 movups %xmm0, (%rsp) movq %rbx, %rdi movq %r15, %rsi callq 0x554e6 addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
set_leaf: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h xorps xmm0, xmm0 movups xmmword ptr [rsi+10h], xmm0 movups xmmword ptr [rsi], xmm0 mov rax, [rsp+88h+arg_10] mov ecx, [rax+8] cmp rcx, 6; switch 7 cases ja def_55D01; jumptable 0000000000055D01 default case mov r15, rdx mov rbx, rsi mov ebp, edi lea r14, [rsp+88h+arg_0] lea rdx, jpt_55D01 movsxd rsi, ds:(jpt_55D01 - 8C418h)[rdx+rcx*4] add rsi, rdx jmp rsi; switch jump loc_55D03: add ecx, 0FFFFFFFDh; jumptable 0000000000055D01 cases 3-5 cmp ecx, 1 ja short loc_55D29 mov rax, [rax+10h] mov eax, [rax+8] cmp eax, 8 ja loc_55E36 mov ecx, 103h bt ecx, eax jnb loc_55E36 loc_55D29: shl ebp, 5 mov eax, [r14] sub eax, ebp jbe def_55D01; jumptable 0000000000055D01 default case cmp eax, 20h ; ' ' mov ecx, 20h ; ' ' cmovl ecx, eax movsxd rsi, ebp add rsi, [r14+8] movsxd rdx, ecx jmp short loc_55D5F loc_55D4E: mov edx, [r14]; jumptable 0000000000055D01 cases 0,1 cmp rdx, 20h ; ' ' ja def_55D01; jumptable 0000000000055D01 default case mov rsi, [r14+8] loc_55D5F: mov rdi, rbx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _memcpy loc_55D75: cmp [rax+18h], ebp; jumptable 0000000000055D01 case 2 jbe def_55D01; jumptable 0000000000055D01 default case mov rax, [rax+10h] movsxd rcx, ebp shl rcx, 5 mov rdx, [rax+rcx] lea r12, [rsp+88h+var_48] mov rdi, r12 mov rsi, r14 call ssz_get mov rax, [r12+10h] mov [rsp+88h+var_78], rax movups xmm0, xmmword ptr [r12] jmp loc_55E7D loc_55DB1: mov rax, [r14+10h]; jumptable 0000000000055D01 case 6 mov [rsp+88h+var_78], rax movups xmm0, xmmword ptr [r14] movups [rsp+88h+var_88], xmm0 call ssz_len lea r13d, [rax+0FFh] shr r13d, 8 cmp r13d, ebp jbe def_55D01; jumptable 0000000000055D01 default case mov edx, [r14] mov esi, ebp shl esi, 5 xor r15d, r15d and eax, 7 mov [rsp+88h+var_68], rax setz r15b sub edx, r15d sub edx, esi cmp edx, 20h ; ' ' mov r12d, 20h ; ' ' cmovb r12d, edx add rsi, [r14+8] mov rdi, rbx mov rdx, r12 call _memcpy mov rcx, [rsp+88h+var_68] dec r13d cmp r13d, ebp setnz al or r15b, al jnz short def_55D01; jumptable 0000000000055D01 default case mov eax, 0FFFFFFFFh shl eax, cl dec r12d add [rbx+r12], al jmp short def_55D01; jumptable 0000000000055D01 default case loc_55E36: mov rax, [r14+10h] mov [rsp+88h+var_78], rax movups xmm0, xmmword ptr [r14] movups [rsp+88h+var_88], xmm0 call ssz_len cmp eax, ebp jbe short def_55D01; jumptable 0000000000055D01 default case mov rax, [r14+10h] mov [rsp+88h+var_78], rax movups xmm0, xmmword ptr [r14] movups [rsp+88h+var_88], xmm0 lea r14, [rsp+88h+var_60] mov rdi, r14 mov esi, ebp call ssz_at mov rax, [r14+10h] mov [rsp+88h+var_78], rax movups xmm0, xmmword ptr [r14] loc_55E7D: movups [rsp+88h+var_88], xmm0 mov rdi, rbx mov rsi, r15 call hash_tree_root def_55D01: add rsp, 58h; jumptable 0000000000055D01 default case pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
void set_leaf( long long a1, _OWORD *a2, long long a3, long long a4, long long a5, long long a6, unsigned int a7, unsigned int *a8, long long a9) { long long v9; // rcx long long v11; // rcx unsigned int v12; // eax long long v13; // rdx long long v14; // rcx long long v15; // r8 long long v16; // r9 int v17; // eax unsigned int v18; // r13d int v19; // eax bool v20; // r15 int v21; // r12d int v22; // edx long long v23; // rcx int v24; // r8d int v25; // r9d long long v26; // rdx long long v27; // rcx long long v28; // r8 long long v29; // r9 char v30; // [rsp+20h] [rbp-68h] __int128 v31; // [rsp+28h] [rbp-60h] BYREF long long v32; // [rsp+38h] [rbp-50h] __int128 v33; // [rsp+40h] [rbp-48h] BYREF long long v34; // [rsp+50h] [rbp-38h] a2[1] = 0LL; *a2 = 0LL; v9 = *(unsigned int *)(a9 + 8); switch ( *(_DWORD *)(a9 + 8) ) { case 0: case 1: if ( a7 <= 0x20uLL ) goto LABEL_8; break; case 2: if ( *(_DWORD *)(a9 + 24) > (unsigned int)a1 ) { ssz_get((long long)&v33, &a7, *(_QWORD *)(*(_QWORD *)(a9 + 16) + 32LL * (int)a1)); hash_tree_root(a2, a3, v13, v14, v15, v16, v33, v34); } break; case 3: case 4: case 5: v11 = (unsigned int)(v9 - 3); if ( (unsigned int)v11 > 1 || (v12 = *(_DWORD *)(*(_QWORD *)(a9 + 16) + 8LL), v12 <= 8) && (v11 = 259LL, _bittest((const int *)&v11, v12)) ) { if ( a7 > 32 * (int)a1 ) LABEL_8: memcpy(a2); } else if ( (unsigned int)ssz_len(a1, (long long)a2, a3, v11, a5, a6, a7, a8, a9) > (unsigned int)a1 ) { ssz_at((long long)&v31, a1, v22, v23, v24, v25, a7, (long long)a8, a9); hash_tree_root(a2, a3, v26, v27, v28, v29, v31, v32); } break; case 6: v17 = ssz_len(a1, (long long)a2, a3, v9, a5, a6, a7, a8, a9); v18 = (unsigned int)(v17 + 255) >> 8; if ( v18 > (unsigned int)a1 ) { v19 = v17 & 7; v30 = v19; v20 = v19 == 0; v21 = 32; if ( (unsigned int)(((__PAIR64__(a7, v19) - 1) >> 32) - 32 * a1) < 0x20 ) v21 = ((__PAIR64__(a7, v19) - 1) >> 32) - 32 * a1; memcpy(a2); if ( v18 - 1 == (_DWORD)a1 && !v20 ) *((_BYTE *)a2 + (unsigned int)(v21 - 1)) += -1 << v30; } break; default: return; } }
set_leaf: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI + 0x10],XMM0 MOVUPS xmmword ptr [RSI],XMM0 MOV RAX,qword ptr [RSP + 0xa0] MOV ECX,dword ptr [RAX + 0x8] CMP RCX,0x6 JA 0x00155e8c MOV R15,RDX MOV RBX,RSI MOV EBP,EDI LEA R14,[RSP + 0x90] LEA RDX,[0x18c418] MOVSXD RSI,dword ptr [RDX + RCX*0x4] ADD RSI,RDX switchD: JMP RSI caseD_3: ADD ECX,-0x3 CMP ECX,0x1 JA 0x00155d29 MOV RAX,qword ptr [RAX + 0x10] MOV EAX,dword ptr [RAX + 0x8] CMP EAX,0x8 JA 0x00155e36 MOV ECX,0x103 BT ECX,EAX JNC 0x00155e36 LAB_00155d29: SHL EBP,0x5 MOV EAX,dword ptr [R14] SUB EAX,EBP JBE 0x00155e8c CMP EAX,0x20 MOV ECX,0x20 CMOVL ECX,EAX MOVSXD RSI,EBP ADD RSI,qword ptr [R14 + 0x8] MOVSXD RDX,ECX JMP 0x00155d5f caseD_0: MOV EDX,dword ptr [R14] CMP RDX,0x20 JA 0x00155e8c MOV RSI,qword ptr [R14 + 0x8] LAB_00155d5f: MOV RDI,RBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00122090 caseD_2: CMP dword ptr [RAX + 0x18],EBP JBE 0x00155e8c MOV RAX,qword ptr [RAX + 0x10] MOVSXD RCX,EBP SHL RCX,0x5 MOV RDX,qword ptr [RAX + RCX*0x1] LEA R12,[RSP + 0x40] MOV RDI,R12 MOV RSI,R14 CALL 0x0015525d MOV RAX,qword ptr [R12 + 0x10] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [R12] JMP 0x00155e7d caseD_6: MOV RAX,qword ptr [R14 + 0x10] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [R14] MOVUPS xmmword ptr [RSP],XMM0 CALL 0x001547b8 LEA R13D,[RAX + 0xff] SHR R13D,0x8 CMP R13D,EBP JBE 0x00155e8c MOV EDX,dword ptr [R14] MOV ESI,EBP SHL ESI,0x5 XOR R15D,R15D AND EAX,0x7 MOV qword ptr [RSP + 0x20],RAX SETZ R15B SUB EDX,R15D SUB EDX,ESI CMP EDX,0x20 MOV R12D,0x20 CMOVC R12D,EDX ADD RSI,qword ptr [R14 + 0x8] MOV RDI,RBX MOV RDX,R12 CALL 0x00122090 MOV RCX,qword ptr [RSP + 0x20] DEC R13D CMP R13D,EBP SETNZ AL OR R15B,AL JNZ 0x00155e8c MOV EAX,0xffffffff SHL EAX,CL DEC R12D ADD byte ptr [RBX + R12*0x1],AL JMP 0x00155e8c LAB_00155e36: MOV RAX,qword ptr [R14 + 0x10] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [R14] MOVUPS xmmword ptr [RSP],XMM0 CALL 0x001547b8 CMP EAX,EBP JBE 0x00155e8c MOV RAX,qword ptr [R14 + 0x10] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [R14] MOVUPS xmmword ptr [RSP],XMM0 LEA R14,[RSP + 0x28] MOV RDI,R14 MOV ESI,EBP CALL 0x0015463d MOV RAX,qword ptr [R14 + 0x10] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [R14] LAB_00155e7d: MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,RBX MOV RSI,R15 CALL 0x001554e6 LAB_00155e8c: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void set_leaf(uint param_1,int8 *param_2,int8 param_3) { char *pcVar1; int iVar2; uint uVar3; int iVar4; uint uVar5; void *__src; size_t sVar6; uint uVar7; uint in_stack_00000008; int4 uStack0000000000000010; int4 uStack0000000000000014; long in_stack_00000018; int1 local_60 [24]; int1 local_48 [24]; param_2[2] = 0; param_2[3] = 0; *param_2 = 0; param_2[1] = 0; uVar3 = *(uint *)(in_stack_00000018 + 8); if (6 < uVar3) { return; } switch(uVar3) { case 0: case 1: sVar6 = (size_t)in_stack_00000008; __src = _uStack0000000000000010; if (0x20 < sVar6) { return; } break; case 2: if (*(uint *)(in_stack_00000018 + 0x18) <= param_1) { return; } ssz_get(local_48,&stack0x00000008, *(int8 *)(*(long *)(in_stack_00000018 + 0x10) + (long)(int)param_1 * 0x20)); LAB_00155e7d: hash_tree_root(param_2,param_3); return; default: if ((uVar3 - 3 < 2) && ((uVar3 = *(uint *)(*(long *)(in_stack_00000018 + 0x10) + 8), 8 < uVar3 || ((0x103U >> (uVar3 & 0x1f) & 1) == 0)))) { uVar3 = ssz_len(); if (uVar3 <= param_1) { return; } ssz_at(local_60,param_1); goto LAB_00155e7d; } iVar2 = in_stack_00000008 + param_1 * -0x20; if (in_stack_00000008 < param_1 * 0x20 || iVar2 == 0) { return; } iVar4 = 0x20; if (iVar2 < 0x20) { iVar4 = iVar2; } sVar6 = (size_t)iVar4; __src = (void *)((long)(int)(param_1 * 0x20) + (long)_uStack0000000000000010); break; case 6: uVar3 = ssz_len(); uVar7 = uVar3 + 0xff >> 8; if (uVar7 <= param_1) { return; } uVar3 = uVar3 & 7; uVar5 = (in_stack_00000008 - (uVar3 == 0)) + param_1 * -0x20; sVar6 = 0x20; if (uVar5 < 0x20) { sVar6 = (size_t)uVar5; } memcpy(param_2,(void *)((ulong)(param_1 * 0x20) + CONCAT44(uStack0000000000000014,uStack0000000000000010)),sVar6); if (uVar3 != 0 && uVar7 - 1 == param_1) { pcVar1 = (char *)((long)param_2 + (ulong)((int)sVar6 - 1)); *pcVar1 = *pcVar1 + (char)(-1 << (sbyte)uVar3); return; } return; } memcpy(param_2,__src,sVar6); return; }
61,612
Vector3RotateByAxisAngle
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h
RMAPI Vector3 Vector3RotateByAxisAngle(Vector3 v, Vector3 axis, float angle) { // Using Euler-Rodrigues Formula // Ref.: https://en.wikipedia.org/w/index.php?title=Euler%E2%80%93Rodrigues_formula Vector3 result = v; // Vector3Normalize(axis); float length = sqrtf(axis.x*axis.x + axis.y*axis.y + axis.z*axis.z); if (length == 0.0f) length = 1.0f; float ilength = 1.0f/length; axis.x *= ilength; axis.y *= ilength; axis.z *= ilength; angle /= 2.0f; float a = sinf(angle); float b = axis.x*a; float c = axis.y*a; float d = axis.z*a; a = cosf(angle); Vector3 w = { b, c, d }; // Vector3CrossProduct(w, v) Vector3 wv = { w.y*v.z - w.z*v.y, w.z*v.x - w.x*v.z, w.x*v.y - w.y*v.x }; // Vector3CrossProduct(w, wv) Vector3 wwv = { w.y*wv.z - w.z*wv.y, w.z*wv.x - w.x*wv.z, w.x*wv.y - w.y*wv.x }; // Vector3Scale(wv, 2*a) a *= 2; wv.x *= a; wv.y *= a; wv.z *= a; // Vector3Scale(wwv, 2) wwv.x *= 2; wwv.y *= 2; wwv.z *= 2; result.x += wv.x; result.y += wv.y; result.z += wv.z; result.x += wwv.x; result.y += wwv.y; result.z += wwv.z; return result; }
O3
c
Vector3RotateByAxisAngle: subq $0x88, %rsp movaps %xmm3, 0x50(%rsp) movaps %xmm1, 0x70(%rsp) movaps %xmm0, 0x60(%rsp) movaps %xmm2, %xmm0 mulps %xmm2, %xmm0 shufps $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1] movaps %xmm2, %xmm1 movaps %xmm2, %xmm5 movaps %xmm2, 0x30(%rsp) mulss %xmm2, %xmm1 addss %xmm0, %xmm1 movaps %xmm3, %xmm0 mulss %xmm3, %xmm0 addss %xmm1, %xmm0 sqrtss %xmm0, %xmm0 movss 0x6d0e2(%rip), %xmm1 # 0xd3b1c xorps %xmm3, %xmm3 cmpeqss %xmm0, %xmm3 movaps %xmm3, %xmm2 andps %xmm1, %xmm3 divss %xmm0, %xmm1 andnps %xmm1, %xmm2 orps %xmm2, %xmm3 movaps %xmm3, 0x40(%rsp) movaps %xmm3, %xmm0 mulss %xmm5, %xmm0 movaps %xmm0, 0x10(%rsp) movaps %xmm4, %xmm0 mulss 0x6d0ea(%rip), %xmm0 # 0xd3b58 movss %xmm0, 0xc(%rsp) callq 0xa420 movaps %xmm0, %xmm1 movaps %xmm0, 0x20(%rsp) movaps 0x10(%rsp), %xmm0 mulss %xmm1, %xmm0 movaps %xmm0, 0x10(%rsp) movss 0xc(%rsp), %xmm0 callq 0xa3b0 addss %xmm0, %xmm0 movaps 0x50(%rsp), %xmm1 movaps 0x30(%rsp), %xmm2 shufps $0xd4, %xmm2, %xmm1 # xmm1 = xmm1[0,1],xmm2[1,3] shufps $0x52, %xmm2, %xmm1 # xmm1 = xmm1[2,0],xmm2[1,1] movaps 0x40(%rsp), %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] mulps %xmm1, %xmm2 movaps 0x20(%rsp), %xmm10 shufps $0x0, %xmm10, %xmm10 # xmm10 = xmm10[0,0,0,0] mulps %xmm2, %xmm10 movaps 0x10(%rsp), %xmm9 movaps %xmm9, %xmm3 shufps $0xd4, %xmm10, %xmm3 # xmm3 = xmm3[0,1],xmm10[1,3] shufps $0x52, %xmm10, %xmm3 # xmm3 = xmm3[2,0],xmm10[1,1] movaps 0x60(%rsp), %xmm8 movaps %xmm8, %xmm2 shufps $0xe1, %xmm8, %xmm2 # xmm2 = xmm2[1,0],xmm8[2,3] movaps 0x70(%rsp), %xmm4 movaps %xmm4, %xmm1 shufps $0xd4, %xmm8, %xmm1 # xmm1 = xmm1[0,1],xmm8[1,3] shufps $0xe2, %xmm8, %xmm1 # xmm1 = xmm1[2,0],xmm8[2,3] mulps %xmm3, %xmm1 movss %xmm4, %xmm2 # xmm2 = xmm4[0],xmm2[1,2,3] movaps %xmm4, %xmm7 mulps %xmm10, %xmm2 subps %xmm1, %xmm2 movaps %xmm2, %xmm4 shufps $0x55, %xmm2, %xmm4 # xmm4 = xmm4[1,1],xmm2[1,1] movaps 0x76891(%rip), %xmm1 # 0xdd3b0 movss %xmm0, %xmm1 # xmm1 = xmm0[0],xmm1[1,2,3] shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] mulps %xmm2, %xmm0 movaps %xmm8, %xmm5 unpcklps %xmm2, %xmm5 # xmm5 = xmm5[0],xmm2[0],xmm5[1],xmm2[1] movaps %xmm10, %xmm6 shufps $0x0, %xmm10, %xmm6 # xmm6 = xmm6[0,0],xmm10[0,0] mulps %xmm5, %xmm6 shufps $0x0, %xmm9, %xmm9 # xmm9 = xmm9[0,0,0,0] movaps %xmm2, %xmm5 shufps $0x11, %xmm8, %xmm5 # xmm5 = xmm5[1,0],xmm8[1,0] shufps $0xe2, %xmm8, %xmm5 # xmm5 = xmm5[2,0],xmm8[2,3] mulps %xmm9, %xmm5 subps %xmm6, %xmm5 unpcklps %xmm5, %xmm4 # xmm4 = xmm4[0],xmm5[0],xmm4[1],xmm5[1] mulps %xmm4, %xmm3 movlhps %xmm5, %xmm2 # xmm2 = xmm2[0],xmm5[0] shufps $0xe2, %xmm4, %xmm2 # xmm2 = xmm2[2,0],xmm4[2,3] mulps %xmm10, %xmm2 subps %xmm3, %xmm2 addps %xmm2, %xmm2 mulps %xmm5, %xmm1 addps %xmm8, %xmm0 addps %xmm2, %xmm0 addss %xmm1, %xmm7 shufps $0x55, %xmm1, %xmm1 # xmm1 = xmm1[1,1,1,1] addss %xmm7, %xmm1 addq $0x88, %rsp retq
Vector3RotateByAxisAngle: sub rsp, 88h movaps [rsp+88h+var_38], xmm3 movaps [rsp+88h+var_18], xmm1 movaps [rsp+88h+var_28], xmm0 movaps xmm0, xmm2 mulps xmm0, xmm2 shufps xmm0, xmm0, 55h ; 'U' movaps xmm1, xmm2 movaps xmm5, xmm2 movaps [rsp+88h+var_58], xmm2 mulss xmm1, xmm2 addss xmm1, xmm0 movaps xmm0, xmm3 mulss xmm0, xmm3 addss xmm0, xmm1 sqrtss xmm0, xmm0 movss xmm1, cs:dword_D3B1C xorps xmm3, xmm3 cmpeqss xmm3, xmm0 movaps xmm2, xmm3 andps xmm3, xmm1 divss xmm1, xmm0 andnps xmm2, xmm1 orps xmm3, xmm2 movaps [rsp+88h+var_48], xmm3 movaps xmm0, xmm3 mulss xmm0, xmm5 movaps [rsp+88h+var_78], xmm0 movaps xmm0, xmm4 mulss xmm0, cs:dword_D3B58 movss [rsp+88h+var_7C], xmm0 call _sinf movaps xmm1, xmm0 movaps [rsp+88h+var_68], xmm0 movaps xmm0, [rsp+88h+var_78] mulss xmm0, xmm1 movaps [rsp+88h+var_78], xmm0 movss xmm0, [rsp+88h+var_7C] call _cosf addss xmm0, xmm0 movaps xmm1, [rsp+88h+var_38] movaps xmm2, [rsp+88h+var_58] shufps xmm1, xmm2, 0D4h shufps xmm1, xmm2, 52h ; 'R' movaps xmm2, [rsp+88h+var_48] shufps xmm2, xmm2, 0 mulps xmm2, xmm1 movaps xmm10, [rsp+88h+var_68] shufps xmm10, xmm10, 0 mulps xmm10, xmm2 movaps xmm9, [rsp+88h+var_78] movaps xmm3, xmm9 shufps xmm3, xmm10, 0D4h shufps xmm3, xmm10, 52h ; 'R' movaps xmm8, [rsp+88h+var_28] movaps xmm2, xmm8 shufps xmm2, xmm8, 0E1h movaps xmm4, [rsp+88h+var_18] movaps xmm1, xmm4 shufps xmm1, xmm8, 0D4h shufps xmm1, xmm8, 0E2h mulps xmm1, xmm3 movss xmm2, xmm4 movaps xmm7, xmm4 mulps xmm2, xmm10 subps xmm2, xmm1 movaps xmm4, xmm2 shufps xmm4, xmm2, 55h ; 'U' movaps xmm1, cs:xmmword_DD3B0 movss xmm1, xmm0 shufps xmm0, xmm0, 0 mulps xmm0, xmm2 movaps xmm5, xmm8 unpcklps xmm5, xmm2 movaps xmm6, xmm10 shufps xmm6, xmm10, 0 mulps xmm6, xmm5 shufps xmm9, xmm9, 0 movaps xmm5, xmm2 shufps xmm5, xmm8, 11h shufps xmm5, xmm8, 0E2h mulps xmm5, xmm9 subps xmm5, xmm6 unpcklps xmm4, xmm5 mulps xmm3, xmm4 movlhps xmm2, xmm5 shufps xmm2, xmm4, 0E2h mulps xmm2, xmm10 subps xmm2, xmm3 addps xmm2, xmm2 mulps xmm1, xmm5 addps xmm0, xmm8 addps xmm0, xmm2 addss xmm7, xmm1 shufps xmm1, xmm1, 55h ; 'U' addss xmm1, xmm7 add rsp, 88h retn
__m128 Vector3RotateByAxisAngle(__m128 a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5) { __m128 v5; // xmm0 float v6; // xmm5_4 __m128 v7; // xmm1 __m128 v8; // xmm2 __m128 v9; // xmm0 __m128 v10; // xmm0 __m128 v11; // xmm0 __m128 v12; // xmm10 __m128 v13; // xmm3 __m128 v14; // xmm2 __m128 v15; // xmm2 __m128 v16; // xmm0 __m128 v17; // xmm5 __m128 v18; // xmm4 __m128 v19; // xmm2 float v21; // [rsp+Ch] [rbp-7Ch] __m128 v22; // [rsp+10h] [rbp-78h] __m128 v23; // [rsp+10h] [rbp-78h] __m128 v24; // [rsp+20h] [rbp-68h] __m128 v26; // [rsp+40h] [rbp-48h] v5 = _mm_mul_ps(a3, a3); v6 = a3.m128_f32[0]; v5.m128_f32[0] = fsqrt( (float)(a4.m128_f32[0] * a4.m128_f32[0]) + (float)((float)(a3.m128_f32[0] * a3.m128_f32[0]) + _mm_shuffle_ps(v5, v5, 85).m128_f32[0])); v7 = (__m128)0x3F800000u; v8 = _mm_cmpeq_ss((__m128)0LL, v5); v7.m128_f32[0] = 1.0 / v5.m128_f32[0]; v26 = _mm_or_ps(_mm_and_ps(v8, (__m128)0x3F800000u), _mm_andnot_ps(v8, v7)); v9 = v26; v9.m128_f32[0] = v26.m128_f32[0] * v6; v22 = v9; v9.m128_u64[1] = a5.m128_u64[1]; v21 = a5.m128_f32[0] * 0.5; *(double *)v9.m128_u64 = sinf(a5.m128_f32[0] * 0.5); v7.m128_i32[0] = v9.m128_i32[0]; v24 = v9; v10 = v22; v10.m128_f32[0] = v22.m128_f32[0] * v7.m128_f32[0]; v23 = v10; v11 = (__m128)LODWORD(v21); *(double *)v11.m128_u64 = cosf(v21); v11.m128_f32[0] = v11.m128_f32[0] + v11.m128_f32[0]; v12 = _mm_mul_ps( _mm_shuffle_ps(v24, v24, 0), _mm_mul_ps(_mm_shuffle_ps(v26, v26, 0), _mm_shuffle_ps(_mm_shuffle_ps(a4, a3, 212), a3, 82))); v13 = _mm_shuffle_ps(_mm_shuffle_ps(v23, v12, 212), v12, 82); v14 = _mm_shuffle_ps(a1, a1, 225); v14.m128_f32[0] = a2.m128_f32[0]; v15 = _mm_sub_ps(_mm_mul_ps(v14, v12), _mm_mul_ps(_mm_shuffle_ps(_mm_shuffle_ps(a2, a1, 212), a1, 226), v13)); v16 = _mm_mul_ps(_mm_shuffle_ps(v11, v11, 0), v15); v17 = _mm_sub_ps( _mm_mul_ps(_mm_shuffle_ps(_mm_shuffle_ps(v15, a1, 17), a1, 226), _mm_shuffle_ps(v23, v23, 0)), _mm_mul_ps(_mm_shuffle_ps(v12, v12, 0), _mm_unpacklo_ps(a1, v15))); v18 = _mm_unpacklo_ps(_mm_shuffle_ps(v15, v15, 85), v17); v19 = _mm_sub_ps(_mm_mul_ps(_mm_shuffle_ps(_mm_movelh_ps(v15, v17), v18, 226), v12), _mm_mul_ps(v13, v18)); return _mm_add_ps(_mm_add_ps(v16, a1), _mm_add_ps(v19, v19)); }
Vector3RotateByAxisAngle: SUB RSP,0x88 MOVAPS xmmword ptr [RSP + 0x50],XMM3 MOVAPS xmmword ptr [RSP + 0x70],XMM1 MOVAPS xmmword ptr [RSP + 0x60],XMM0 MOVAPS XMM0,XMM2 MULPS XMM0,XMM2 SHUFPS XMM0,XMM0,0x55 MOVAPS XMM1,XMM2 MOVAPS XMM5,XMM2 MOVAPS xmmword ptr [RSP + 0x30],XMM2 MULSS XMM1,XMM2 ADDSS XMM1,XMM0 MOVAPS XMM0,XMM3 MULSS XMM0,XMM3 ADDSS XMM0,XMM1 SQRTSS XMM0,XMM0 MOVSS XMM1,dword ptr [0x001d3b1c] XORPS XMM3,XMM3 CMPEQSS XMM3,XMM0 MOVAPS XMM2,XMM3 ANDPS XMM3,XMM1 DIVSS XMM1,XMM0 ANDNPS XMM2,XMM1 ORPS XMM3,XMM2 MOVAPS xmmword ptr [RSP + 0x40],XMM3 MOVAPS XMM0,XMM3 MULSS XMM0,XMM5 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOVAPS XMM0,XMM4 MULSS XMM0,dword ptr [0x001d3b58] MOVSS dword ptr [RSP + 0xc],XMM0 CALL 0x0010a420 MOVAPS XMM1,XMM0 MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOVAPS XMM0,xmmword ptr [RSP + 0x10] MULSS XMM0,XMM1 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOVSS XMM0,dword ptr [RSP + 0xc] CALL 0x0010a3b0 ADDSS XMM0,XMM0 MOVAPS XMM1,xmmword ptr [RSP + 0x50] MOVAPS XMM2,xmmword ptr [RSP + 0x30] SHUFPS XMM1,XMM2,0xd4 SHUFPS XMM1,XMM2,0x52 MOVAPS XMM2,xmmword ptr [RSP + 0x40] SHUFPS XMM2,XMM2,0x0 MULPS XMM2,XMM1 MOVAPS XMM10,xmmword ptr [RSP + 0x20] SHUFPS XMM10,XMM10,0x0 MULPS XMM10,XMM2 MOVAPS XMM9,xmmword ptr [RSP + 0x10] MOVAPS XMM3,XMM9 SHUFPS XMM3,XMM10,0xd4 SHUFPS XMM3,XMM10,0x52 MOVAPS XMM8,xmmword ptr [RSP + 0x60] MOVAPS XMM2,XMM8 SHUFPS XMM2,XMM8,0xe1 MOVAPS XMM4,xmmword ptr [RSP + 0x70] MOVAPS XMM1,XMM4 SHUFPS XMM1,XMM8,0xd4 SHUFPS XMM1,XMM8,0xe2 MULPS XMM1,XMM3 MOVSS XMM2,XMM4 MOVAPS XMM7,XMM4 MULPS XMM2,XMM10 SUBPS XMM2,XMM1 MOVAPS XMM4,XMM2 SHUFPS XMM4,XMM2,0x55 MOVAPS XMM1,xmmword ptr [0x001dd3b0] MOVSS XMM1,XMM0 SHUFPS XMM0,XMM0,0x0 MULPS XMM0,XMM2 MOVAPS XMM5,XMM8 UNPCKLPS XMM5,XMM2 MOVAPS XMM6,XMM10 SHUFPS XMM6,XMM10,0x0 MULPS XMM6,XMM5 SHUFPS XMM9,XMM9,0x0 MOVAPS XMM5,XMM2 SHUFPS XMM5,XMM8,0x11 SHUFPS XMM5,XMM8,0xe2 MULPS XMM5,XMM9 SUBPS XMM5,XMM6 UNPCKLPS XMM4,XMM5 MULPS XMM3,XMM4 MOVLHPS XMM2,XMM5 SHUFPS XMM2,XMM4,0xe2 MULPS XMM2,XMM10 SUBPS XMM2,XMM3 ADDPS XMM2,XMM2 MULPS XMM1,XMM5 ADDPS XMM0,XMM8 ADDPS XMM0,XMM2 ADDSS XMM7,XMM1 SHUFPS XMM1,XMM1,0x55 ADDSS XMM1,XMM7 ADD RSP,0x88 RET
int8 Vector3RotateByAxisAngle (int8 param_1,float param_2,int8 param_3,float param_4,float param_5) { uint uVar1; float fVar2; float fVar3; float fVar4; float fVar5; float fVar6; float fVar7; float fVar8; float fVar9; float fVar10; fVar10 = (float)((ulong)param_3 >> 0x20); fVar5 = (float)param_3; fVar7 = (float)((ulong)param_1 >> 0x20); fVar2 = (float)param_1; fVar3 = SQRT(param_4 * param_4 + fVar5 * fVar5 + fVar10 * fVar10); uVar1 = -(uint)(fVar3 == 0.0); fVar3 = (float)(uVar1 & (uint)DAT_001d3b1c | ~uVar1 & (uint)(DAT_001d3b1c / fVar3)); param_5 = param_5 * DAT_001d3b58; fVar4 = sinf(param_5); fVar5 = fVar3 * fVar5 * fVar4; fVar6 = cosf(param_5); fVar10 = fVar4 * fVar3 * fVar10; fVar4 = fVar4 * fVar3 * param_4; fVar3 = param_2 * fVar10 - fVar7 * fVar4; fVar8 = fVar2 * fVar4 - param_2 * fVar5; fVar9 = fVar7 * fVar5 - fVar10 * fVar2; fVar10 = fVar9 * fVar10 - fVar4 * fVar8; fVar4 = fVar3 * fVar4 - fVar5 * fVar9; return CONCAT44((fVar6 + fVar6) * fVar8 + fVar7 + fVar4 + fVar4, (fVar6 + fVar6) * fVar3 + fVar2 + fVar10 + fVar10); }
61,613
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFaceRelation()
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/triRefinement.cpp
void TriRefinement::populateVertexFaceRelation() { // // Unlike quad-splitting, we don't have to consider vertices originating from // faces. We also have to consider 3 faces for every incident face for vertices // originating from edges. // int childVertFaceIndexSizeEstimate = (int)_parent->_edgeFaceIndices.size() * 3 + (int)_parent->_vertFaceIndices.size(); _child->_vertFaceCountsAndOffsets.resize(_child->getNumVertices() * 2); _child->_vertFaceIndices.resize( childVertFaceIndexSizeEstimate); _child->_vertFaceLocalIndices.resize( childVertFaceIndexSizeEstimate); // Remember -- no vertices-from-faces to consider here (until N-gon support) if (getFirstChildVertexFromVertices() == 0) { populateVertexFacesFromParentVertices(); populateVertexFacesFromParentEdges(); } else { populateVertexFacesFromParentEdges(); populateVertexFacesFromParentVertices(); } // Revise the over-allocated estimate based on what is used (as indicated in the // count/offset for the last vertex) and trim the index vectors accordingly: childVertFaceIndexSizeEstimate = _child->getNumVertexFaces(_child->getNumVertices()-1) + _child->getOffsetOfVertexFaces(_child->getNumVertices()-1); _child->_vertFaceIndices.resize( childVertFaceIndexSizeEstimate); _child->_vertFaceLocalIndices.resize(childVertFaceIndexSizeEstimate); }
O1
cpp
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFaceRelation(): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x8(%rdi), %rax movq 0x10(%rdi), %rdi movq 0xb0(%rax), %rcx movq 0x128(%rax), %r14 subq 0xa8(%rax), %rcx shrq $0x2, %rcx leal (%rcx,%rcx,2), %ecx subq 0x120(%rax), %r14 shrq $0x2, %r14 addl %ecx, %r14d movslq 0x8(%rdi), %rsi addq $0x108, %rdi # imm = 0x108 addq %rsi, %rsi callq 0x39690 movl $0x120, %edi # imm = 0x120 addq 0x10(%rbx), %rdi movslq %r14d, %r14 movq %r14, %rsi callq 0x39690 movl $0x138, %edi # imm = 0x138 addq 0x10(%rbx), %rdi movq %r14, %rsi callq 0x39160 cmpl $0x0, 0x54(%rbx) je 0x4bd6b movq %rbx, %rdi callq 0x3b6d0 movq %rbx, %rdi callq 0x395f0 jmp 0x4bd7b movq %rbx, %rdi callq 0x395f0 movq %rbx, %rdi callq 0x3b6d0 movq 0x10(%rbx), %rdi movl 0x8(%rdi), %eax leal -0x2(,%rax,2), %ecx movslq %ecx, %rcx movq 0x108(%rdi), %rdx movslq (%rdx,%rcx,4), %rcx leal -0x1(,%rax,2), %eax cltq movslq (%rdx,%rax,4), %r14 addq %rcx, %r14 addq $0x120, %rdi # imm = 0x120 movq %r14, %rsi callq 0x39690 movl $0x138, %edi # imm = 0x138 addq 0x10(%rbx), %rdi movq %r14, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x39160
_ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement26populateVertexFaceRelationEv: push r14 push rbx push rax mov rbx, rdi mov rax, [rdi+8] mov rdi, [rdi+10h] mov rcx, [rax+0B0h] mov r14, [rax+128h] sub rcx, [rax+0A8h] shr rcx, 2 lea ecx, [rcx+rcx*2] sub r14, [rax+120h] shr r14, 2 add r14d, ecx movsxd rsi, dword ptr [rdi+8] add rdi, 108h add rsi, rsi call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong) mov edi, 120h add rdi, [rbx+10h] movsxd r14, r14d mov rsi, r14 call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong) mov edi, 138h add rdi, [rbx+10h] mov rsi, r14 call __ZNSt6vectorItSaItEE6resizeEm; std::vector<ushort>::resize(ulong) cmp dword ptr [rbx+54h], 0 jz short loc_4BD6B mov rdi, rbx; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement34populateVertexFacesFromParentEdgesEv; OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFacesFromParentEdges(void) mov rdi, rbx; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement37populateVertexFacesFromParentVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFacesFromParentVertices(void) jmp short loc_4BD7B loc_4BD6B: mov rdi, rbx; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement37populateVertexFacesFromParentVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFacesFromParentVertices(void) mov rdi, rbx; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement34populateVertexFacesFromParentEdgesEv; OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFacesFromParentEdges(void) loc_4BD7B: mov rdi, [rbx+10h] mov eax, [rdi+8] lea ecx, ds:0FFFFFFFFFFFFFFFEh[rax*2] movsxd rcx, ecx mov rdx, [rdi+108h] movsxd rcx, dword ptr [rdx+rcx*4] lea eax, ds:0FFFFFFFFFFFFFFFFh[rax*2] cdqe movsxd r14, dword ptr [rdx+rax*4] add r14, rcx add rdi, 120h mov rsi, r14 call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong) mov edi, 138h add rdi, [rbx+10h] mov rsi, r14 add rsp, 8 pop rbx pop r14 jmp __ZNSt6vectorItSaItEE6resizeEm; std::vector<ushort>::resize(ulong)
long long OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFaceRelation( OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement *this) { int v2; // r14d long long v3; // rdi long long v4; // r14 v2 = 3 * ((*(_QWORD *)(*((_QWORD *)this + 1) + 176LL) - *(_QWORD *)(*((_QWORD *)this + 1) + 168LL)) >> 2) + ((*(_QWORD *)(*((_QWORD *)this + 1) + 296LL) - *(_QWORD *)(*((_QWORD *)this + 1) + 288LL)) >> 2); std::vector<int>::resize(*((_QWORD *)this + 2) + 264LL, 2LL * *(int *)(*((_QWORD *)this + 2) + 8LL)); std::vector<int>::resize(*((_QWORD *)this + 2) + 288LL, v2); std::vector<unsigned short>::resize(*((_QWORD *)this + 2) + 312LL, v2); if ( *((_DWORD *)this + 21) ) { OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFacesFromParentEdges(this); OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFacesFromParentVertices(this); } else { OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFacesFromParentVertices(this); OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFacesFromParentEdges(this); } v3 = *((_QWORD *)this + 2); v4 = *(int *)(*(_QWORD *)(v3 + 264) + 4LL * (2 * *(_DWORD *)(v3 + 8) - 2)) + (long long)*(int *)(*(_QWORD *)(v3 + 264) + 4LL * (2 * *(_DWORD *)(v3 + 8) - 1)); std::vector<int>::resize(v3 + 288, v4); return std::vector<unsigned short>::resize(*((_QWORD *)this + 2) + 312LL, v4); }
populateVertexFaceRelation: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x8] MOV RDI,qword ptr [RDI + 0x10] MOV RCX,qword ptr [RAX + 0xb0] MOV R14,qword ptr [RAX + 0x128] SUB RCX,qword ptr [RAX + 0xa8] SHR RCX,0x2 LEA ECX,[RCX + RCX*0x2] SUB R14,qword ptr [RAX + 0x120] SHR R14,0x2 ADD R14D,ECX MOVSXD RSI,dword ptr [RDI + 0x8] ADD RDI,0x108 ADD RSI,RSI CALL 0x00139690 MOV EDI,0x120 ADD RDI,qword ptr [RBX + 0x10] MOVSXD R14,R14D MOV RSI,R14 CALL 0x00139690 MOV EDI,0x138 ADD RDI,qword ptr [RBX + 0x10] MOV RSI,R14 CALL 0x00139160 CMP dword ptr [RBX + 0x54],0x0 JZ 0x0014bd6b MOV RDI,RBX CALL 0x0013b6d0 MOV RDI,RBX CALL 0x001395f0 JMP 0x0014bd7b LAB_0014bd6b: MOV RDI,RBX CALL 0x001395f0 MOV RDI,RBX CALL 0x0013b6d0 LAB_0014bd7b: MOV RDI,qword ptr [RBX + 0x10] MOV EAX,dword ptr [RDI + 0x8] LEA ECX,[-0x2 + RAX*0x2] MOVSXD RCX,ECX MOV RDX,qword ptr [RDI + 0x108] MOVSXD RCX,dword ptr [RDX + RCX*0x4] LEA EAX,[-0x1 + RAX*0x2] CDQE MOVSXD R14,dword ptr [RDX + RAX*0x4] ADD R14,RCX ADD RDI,0x120 MOV RSI,R14 CALL 0x00139690 MOV EDI,0x138 ADD RDI,qword ptr [RBX + 0x10] MOV RSI,R14 ADD RSP,0x8 POP RBX POP R14 JMP 0x00139160
/* OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFaceRelation() */ void __thiscall OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFaceRelation(TriRefinement *this) { long lVar1; long lVar2; long lVar3; long lVar4; ulong uVar5; lVar1 = *(long *)(this + 8); lVar2 = *(long *)(lVar1 + 0xb0); lVar3 = *(long *)(lVar1 + 0x128); lVar4 = *(long *)(lVar1 + 0xa8); lVar1 = *(long *)(lVar1 + 0x120); std::vector<int,std::allocator<int>>::resize ((vector<int,std::allocator<int>> *)(*(long *)(this + 0x10) + 0x108), (long)*(int *)(*(long *)(this + 0x10) + 8) * 2); uVar5 = (ulong)((int)((ulong)(lVar3 - lVar1) >> 2) + (int)((ulong)(lVar2 - lVar4) >> 2) * 3); std::vector<int,std::allocator<int>>::resize ((vector<int,std::allocator<int>> *)(*(long *)(this + 0x10) + 0x120),uVar5); std::vector<unsigned_short,std::allocator<unsigned_short>>::resize ((vector<unsigned_short,std::allocator<unsigned_short>> *) (*(long *)(this + 0x10) + 0x138),uVar5); if (*(int *)(this + 0x54) == 0) { populateVertexFacesFromParentVertices(this); populateVertexFacesFromParentEdges(this); } else { populateVertexFacesFromParentEdges(this); populateVertexFacesFromParentVertices(this); } lVar1 = *(long *)(this + 0x10); uVar5 = (long)*(int *)(*(long *)(lVar1 + 0x108) + (long)(*(int *)(lVar1 + 8) * 2 + -1) * 4) + (long)*(int *)(*(long *)(lVar1 + 0x108) + (long)(*(int *)(lVar1 + 8) * 2 + -2) * 4); std::vector<int,std::allocator<int>>::resize ((vector<int,std::allocator<int>> *)(lVar1 + 0x120),uVar5); std::vector<unsigned_short,std::allocator<unsigned_short>>::resize ((vector<unsigned_short,std::allocator<unsigned_short>> *) (*(long *)(this + 0x10) + 0x138),uVar5); return; }
61,614
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFaceRelation()
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/triRefinement.cpp
void TriRefinement::populateVertexFaceRelation() { // // Unlike quad-splitting, we don't have to consider vertices originating from // faces. We also have to consider 3 faces for every incident face for vertices // originating from edges. // int childVertFaceIndexSizeEstimate = (int)_parent->_edgeFaceIndices.size() * 3 + (int)_parent->_vertFaceIndices.size(); _child->_vertFaceCountsAndOffsets.resize(_child->getNumVertices() * 2); _child->_vertFaceIndices.resize( childVertFaceIndexSizeEstimate); _child->_vertFaceLocalIndices.resize( childVertFaceIndexSizeEstimate); // Remember -- no vertices-from-faces to consider here (until N-gon support) if (getFirstChildVertexFromVertices() == 0) { populateVertexFacesFromParentVertices(); populateVertexFacesFromParentEdges(); } else { populateVertexFacesFromParentEdges(); populateVertexFacesFromParentVertices(); } // Revise the over-allocated estimate based on what is used (as indicated in the // count/offset for the last vertex) and trim the index vectors accordingly: childVertFaceIndexSizeEstimate = _child->getNumVertexFaces(_child->getNumVertices()-1) + _child->getOffsetOfVertexFaces(_child->getNumVertices()-1); _child->_vertFaceIndices.resize( childVertFaceIndexSizeEstimate); _child->_vertFaceLocalIndices.resize(childVertFaceIndexSizeEstimate); }
O2
cpp
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFaceRelation(): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x8(%rdi), %rax movq 0x10(%rdi), %rdi movq 0xb0(%rax), %rcx movq 0x128(%rax), %r14 subq 0xa8(%rax), %rcx shrq $0x2, %rcx leal (%rcx,%rcx,2), %ecx subq 0x120(%rax), %r14 shrq $0x2, %r14 addl %ecx, %r14d movslq 0x8(%rdi), %rsi addq $0x108, %rdi # imm = 0x108 addq %rsi, %rsi callq 0x514b0 movl $0x120, %edi # imm = 0x120 addq 0x10(%rbx), %rdi movslq %r14d, %r14 movq %r14, %rsi callq 0x514b0 movl $0x138, %edi # imm = 0x138 addq 0x10(%rbx), %rdi movq %r14, %rsi callq 0x50b30 cmpl $0x0, 0x54(%rbx) je 0x63967 movq %rbx, %rdi callq 0x54900 movq %rbx, %rdi callq 0x513d0 jmp 0x63977 movq %rbx, %rdi callq 0x513d0 movq %rbx, %rdi callq 0x54900 movq 0x10(%rbx), %rdi movl 0x8(%rdi), %eax leal -0x2(,%rax,2), %ecx movslq %ecx, %rcx movq 0x108(%rdi), %rdx movslq (%rdx,%rcx,4), %rcx leal -0x1(,%rax,2), %eax cltq movslq (%rdx,%rax,4), %r14 addq %rcx, %r14 addq $0x120, %rdi # imm = 0x120 movq %r14, %rsi callq 0x514b0 movl $0x138, %edi # imm = 0x138 addq 0x10(%rbx), %rdi movq %r14, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x50b30
_ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement26populateVertexFaceRelationEv: push r14 push rbx push rax mov rbx, rdi mov rax, [rdi+8] mov rdi, [rdi+10h] mov rcx, [rax+0B0h] mov r14, [rax+128h] sub rcx, [rax+0A8h] shr rcx, 2 lea ecx, [rcx+rcx*2] sub r14, [rax+120h] shr r14, 2 add r14d, ecx movsxd rsi, dword ptr [rdi+8] add rdi, 108h add rsi, rsi call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong) mov edi, 120h add rdi, [rbx+10h] movsxd r14, r14d mov rsi, r14 call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong) mov edi, 138h add rdi, [rbx+10h] mov rsi, r14 call __ZNSt6vectorItSaItEE6resizeEm; std::vector<ushort>::resize(ulong) cmp dword ptr [rbx+54h], 0 jz short loc_63967 mov rdi, rbx; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement34populateVertexFacesFromParentEdgesEv; OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFacesFromParentEdges(void) mov rdi, rbx; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement37populateVertexFacesFromParentVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFacesFromParentVertices(void) jmp short loc_63977 loc_63967: mov rdi, rbx; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement37populateVertexFacesFromParentVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFacesFromParentVertices(void) mov rdi, rbx; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement34populateVertexFacesFromParentEdgesEv; OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFacesFromParentEdges(void) loc_63977: mov rdi, [rbx+10h] mov eax, [rdi+8] lea ecx, ds:0FFFFFFFFFFFFFFFEh[rax*2] movsxd rcx, ecx mov rdx, [rdi+108h] movsxd rcx, dword ptr [rdx+rcx*4] lea eax, ds:0FFFFFFFFFFFFFFFFh[rax*2] cdqe movsxd r14, dword ptr [rdx+rax*4] add r14, rcx add rdi, 120h mov rsi, r14 call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong) mov edi, 138h add rdi, [rbx+10h] mov rsi, r14 add rsp, 8 pop rbx pop r14 jmp __ZNSt6vectorItSaItEE6resizeEm; std::vector<ushort>::resize(ulong)
long long OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFaceRelation( OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement *this) { int v2; // r14d long long v3; // rdi long long v4; // r14 v2 = 3 * ((*(_QWORD *)(*((_QWORD *)this + 1) + 176LL) - *(_QWORD *)(*((_QWORD *)this + 1) + 168LL)) >> 2) + ((*(_QWORD *)(*((_QWORD *)this + 1) + 296LL) - *(_QWORD *)(*((_QWORD *)this + 1) + 288LL)) >> 2); std::vector<int>::resize(*((_QWORD *)this + 2) + 264LL, 2LL * *(int *)(*((_QWORD *)this + 2) + 8LL)); std::vector<int>::resize(*((_QWORD *)this + 2) + 288LL, v2); std::vector<unsigned short>::resize(*((_QWORD *)this + 2) + 312LL, v2); if ( *((_DWORD *)this + 21) ) { OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFacesFromParentEdges(this); OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFacesFromParentVertices(this); } else { OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFacesFromParentVertices(this); OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFacesFromParentEdges(this); } v3 = *((_QWORD *)this + 2); v4 = *(int *)(*(_QWORD *)(v3 + 264) + 4LL * (2 * *(_DWORD *)(v3 + 8) - 2)) + (long long)*(int *)(*(_QWORD *)(v3 + 264) + 4LL * (2 * *(_DWORD *)(v3 + 8) - 1)); std::vector<int>::resize(v3 + 288, v4); return std::vector<unsigned short>::resize(*((_QWORD *)this + 2) + 312LL, v4); }
populateVertexFaceRelation: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x8] MOV RDI,qword ptr [RDI + 0x10] MOV RCX,qword ptr [RAX + 0xb0] MOV R14,qword ptr [RAX + 0x128] SUB RCX,qword ptr [RAX + 0xa8] SHR RCX,0x2 LEA ECX,[RCX + RCX*0x2] SUB R14,qword ptr [RAX + 0x120] SHR R14,0x2 ADD R14D,ECX MOVSXD RSI,dword ptr [RDI + 0x8] ADD RDI,0x108 ADD RSI,RSI CALL 0x001514b0 MOV EDI,0x120 ADD RDI,qword ptr [RBX + 0x10] MOVSXD R14,R14D MOV RSI,R14 CALL 0x001514b0 MOV EDI,0x138 ADD RDI,qword ptr [RBX + 0x10] MOV RSI,R14 CALL 0x00150b30 CMP dword ptr [RBX + 0x54],0x0 JZ 0x00163967 MOV RDI,RBX CALL 0x00154900 MOV RDI,RBX CALL 0x001513d0 JMP 0x00163977 LAB_00163967: MOV RDI,RBX CALL 0x001513d0 MOV RDI,RBX CALL 0x00154900 LAB_00163977: MOV RDI,qword ptr [RBX + 0x10] MOV EAX,dword ptr [RDI + 0x8] LEA ECX,[-0x2 + RAX*0x2] MOVSXD RCX,ECX MOV RDX,qword ptr [RDI + 0x108] MOVSXD RCX,dword ptr [RDX + RCX*0x4] LEA EAX,[-0x1 + RAX*0x2] CDQE MOVSXD R14,dword ptr [RDX + RAX*0x4] ADD R14,RCX ADD RDI,0x120 MOV RSI,R14 CALL 0x001514b0 MOV EDI,0x138 ADD RDI,qword ptr [RBX + 0x10] MOV RSI,R14 ADD RSP,0x8 POP RBX POP R14 JMP 0x00150b30
/* OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFaceRelation() */ void __thiscall OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFaceRelation(TriRefinement *this) { long lVar1; long lVar2; long lVar3; long lVar4; ulong uVar5; lVar1 = *(long *)(this + 8); lVar2 = *(long *)(lVar1 + 0xb0); lVar3 = *(long *)(lVar1 + 0x128); lVar4 = *(long *)(lVar1 + 0xa8); lVar1 = *(long *)(lVar1 + 0x120); std::vector<int,std::allocator<int>>::resize ((vector<int,std::allocator<int>> *)(*(long *)(this + 0x10) + 0x108), (long)*(int *)(*(long *)(this + 0x10) + 8) * 2); uVar5 = (ulong)((int)((ulong)(lVar3 - lVar1) >> 2) + (int)((ulong)(lVar2 - lVar4) >> 2) * 3); std::vector<int,std::allocator<int>>::resize ((vector<int,std::allocator<int>> *)(*(long *)(this + 0x10) + 0x120),uVar5); std::vector<unsigned_short,std::allocator<unsigned_short>>::resize ((vector<unsigned_short,std::allocator<unsigned_short>> *) (*(long *)(this + 0x10) + 0x138),uVar5); if (*(int *)(this + 0x54) == 0) { populateVertexFacesFromParentVertices(this); populateVertexFacesFromParentEdges(this); } else { populateVertexFacesFromParentEdges(this); populateVertexFacesFromParentVertices(this); } lVar1 = *(long *)(this + 0x10); uVar5 = (long)*(int *)(*(long *)(lVar1 + 0x108) + (long)(*(int *)(lVar1 + 8) * 2 + -1) * 4) + (long)*(int *)(*(long *)(lVar1 + 0x108) + (long)(*(int *)(lVar1 + 8) * 2 + -2) * 4); std::vector<int,std::allocator<int>>::resize ((vector<int,std::allocator<int>> *)(lVar1 + 0x120),uVar5); std::vector<unsigned_short,std::allocator<unsigned_short>>::resize ((vector<unsigned_short,std::allocator<unsigned_short>> *) (*(long *)(this + 0x10) + 0x138),uVar5); return; }
61,615
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFaceRelation()
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/triRefinement.cpp
void TriRefinement::populateVertexFaceRelation() { // // Unlike quad-splitting, we don't have to consider vertices originating from // faces. We also have to consider 3 faces for every incident face for vertices // originating from edges. // int childVertFaceIndexSizeEstimate = (int)_parent->_edgeFaceIndices.size() * 3 + (int)_parent->_vertFaceIndices.size(); _child->_vertFaceCountsAndOffsets.resize(_child->getNumVertices() * 2); _child->_vertFaceIndices.resize( childVertFaceIndexSizeEstimate); _child->_vertFaceLocalIndices.resize( childVertFaceIndexSizeEstimate); // Remember -- no vertices-from-faces to consider here (until N-gon support) if (getFirstChildVertexFromVertices() == 0) { populateVertexFacesFromParentVertices(); populateVertexFacesFromParentEdges(); } else { populateVertexFacesFromParentEdges(); populateVertexFacesFromParentVertices(); } // Revise the over-allocated estimate based on what is used (as indicated in the // count/offset for the last vertex) and trim the index vectors accordingly: childVertFaceIndexSizeEstimate = _child->getNumVertexFaces(_child->getNumVertices()-1) + _child->getOffsetOfVertexFaces(_child->getNumVertices()-1); _child->_vertFaceIndices.resize( childVertFaceIndexSizeEstimate); _child->_vertFaceLocalIndices.resize(childVertFaceIndexSizeEstimate); }
O3
cpp
OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFaceRelation(): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x8(%rdi), %rax movq 0x10(%rdi), %rdi movq 0xb0(%rax), %rcx movq 0x128(%rax), %r14 subq 0xa8(%rax), %rcx shrq $0x2, %rcx leal (%rcx,%rcx,2), %ecx subq 0x120(%rax), %r14 shrq $0x2, %r14 addl %ecx, %r14d movslq 0x8(%rdi), %rsi addq $0x108, %rdi # imm = 0x108 addq %rsi, %rsi callq 0x39670 movl $0x120, %edi # imm = 0x120 addq 0x10(%rbx), %rdi movslq %r14d, %r14 movq %r14, %rsi callq 0x39670 movl $0x138, %edi # imm = 0x138 addq 0x10(%rbx), %rdi movq %r14, %rsi callq 0x39150 cmpl $0x0, 0x54(%rbx) je 0x4e35f movq %rbx, %rdi callq 0x3b690 movq %rbx, %rdi callq 0x395d0 jmp 0x4e36f movq %rbx, %rdi callq 0x395d0 movq %rbx, %rdi callq 0x3b690 movq 0x10(%rbx), %rdi movl 0x8(%rdi), %eax leal -0x2(,%rax,2), %ecx movslq %ecx, %rcx movq 0x108(%rdi), %rdx movslq (%rdx,%rcx,4), %rcx leal -0x1(,%rax,2), %eax cltq movslq (%rdx,%rax,4), %r14 addq %rcx, %r14 addq $0x120, %rdi # imm = 0x120 movq %r14, %rsi callq 0x39670 movl $0x138, %edi # imm = 0x138 addq 0x10(%rbx), %rdi movq %r14, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x39150
_ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement26populateVertexFaceRelationEv: push r14 push rbx push rax mov rbx, rdi mov rax, [rdi+8] mov rdi, [rdi+10h] mov rcx, [rax+0B0h] mov r14, [rax+128h] sub rcx, [rax+0A8h] shr rcx, 2 lea ecx, [rcx+rcx*2] sub r14, [rax+120h] shr r14, 2 add r14d, ecx movsxd rsi, dword ptr [rdi+8] add rdi, 108h add rsi, rsi call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong) mov edi, 120h add rdi, [rbx+10h] movsxd r14, r14d mov rsi, r14 call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong) mov edi, 138h add rdi, [rbx+10h] mov rsi, r14 call __ZNSt6vectorItSaItEE6resizeEm; std::vector<ushort>::resize(ulong) cmp dword ptr [rbx+54h], 0 jz short loc_4E35F mov rdi, rbx; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement34populateVertexFacesFromParentEdgesEv; OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFacesFromParentEdges(void) mov rdi, rbx; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement37populateVertexFacesFromParentVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFacesFromParentVertices(void) jmp short loc_4E36F loc_4E35F: mov rdi, rbx; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement37populateVertexFacesFromParentVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFacesFromParentVertices(void) mov rdi, rbx; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal13TriRefinement34populateVertexFacesFromParentEdgesEv; OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFacesFromParentEdges(void) loc_4E36F: mov rdi, [rbx+10h] mov eax, [rdi+8] lea ecx, ds:0FFFFFFFFFFFFFFFEh[rax*2] movsxd rcx, ecx mov rdx, [rdi+108h] movsxd rcx, dword ptr [rdx+rcx*4] lea eax, ds:0FFFFFFFFFFFFFFFFh[rax*2] cdqe movsxd r14, dword ptr [rdx+rax*4] add r14, rcx add rdi, 120h mov rsi, r14 call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong) mov edi, 138h add rdi, [rbx+10h] mov rsi, r14 add rsp, 8 pop rbx pop r14 jmp __ZNSt6vectorItSaItEE6resizeEm; std::vector<ushort>::resize(ulong)
long long OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFaceRelation( OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement *this) { int v2; // r14d long long v3; // rdi long long v4; // r14 v2 = 3 * ((*(_QWORD *)(*((_QWORD *)this + 1) + 176LL) - *(_QWORD *)(*((_QWORD *)this + 1) + 168LL)) >> 2) + ((*(_QWORD *)(*((_QWORD *)this + 1) + 296LL) - *(_QWORD *)(*((_QWORD *)this + 1) + 288LL)) >> 2); std::vector<int>::resize(*((_QWORD *)this + 2) + 264LL, 2LL * *(int *)(*((_QWORD *)this + 2) + 8LL)); std::vector<int>::resize(*((_QWORD *)this + 2) + 288LL, v2); std::vector<unsigned short>::resize(*((_QWORD *)this + 2) + 312LL, v2); if ( *((_DWORD *)this + 21) ) { OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFacesFromParentEdges(this); OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFacesFromParentVertices(this); } else { OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFacesFromParentVertices(this); OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFacesFromParentEdges(this); } v3 = *((_QWORD *)this + 2); v4 = *(int *)(*(_QWORD *)(v3 + 264) + 4LL * (2 * *(_DWORD *)(v3 + 8) - 2)) + (long long)*(int *)(*(_QWORD *)(v3 + 264) + 4LL * (2 * *(_DWORD *)(v3 + 8) - 1)); std::vector<int>::resize(v3 + 288, v4); return std::vector<unsigned short>::resize(*((_QWORD *)this + 2) + 312LL, v4); }
populateVertexFaceRelation: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x8] MOV RDI,qword ptr [RDI + 0x10] MOV RCX,qword ptr [RAX + 0xb0] MOV R14,qword ptr [RAX + 0x128] SUB RCX,qword ptr [RAX + 0xa8] SHR RCX,0x2 LEA ECX,[RCX + RCX*0x2] SUB R14,qword ptr [RAX + 0x120] SHR R14,0x2 ADD R14D,ECX MOVSXD RSI,dword ptr [RDI + 0x8] ADD RDI,0x108 ADD RSI,RSI CALL 0x00139670 MOV EDI,0x120 ADD RDI,qword ptr [RBX + 0x10] MOVSXD R14,R14D MOV RSI,R14 CALL 0x00139670 MOV EDI,0x138 ADD RDI,qword ptr [RBX + 0x10] MOV RSI,R14 CALL 0x00139150 CMP dword ptr [RBX + 0x54],0x0 JZ 0x0014e35f MOV RDI,RBX CALL 0x0013b690 MOV RDI,RBX CALL 0x001395d0 JMP 0x0014e36f LAB_0014e35f: MOV RDI,RBX CALL 0x001395d0 MOV RDI,RBX CALL 0x0013b690 LAB_0014e36f: MOV RDI,qword ptr [RBX + 0x10] MOV EAX,dword ptr [RDI + 0x8] LEA ECX,[-0x2 + RAX*0x2] MOVSXD RCX,ECX MOV RDX,qword ptr [RDI + 0x108] MOVSXD RCX,dword ptr [RDX + RCX*0x4] LEA EAX,[-0x1 + RAX*0x2] CDQE MOVSXD R14,dword ptr [RDX + RAX*0x4] ADD R14,RCX ADD RDI,0x120 MOV RSI,R14 CALL 0x00139670 MOV EDI,0x138 ADD RDI,qword ptr [RBX + 0x10] MOV RSI,R14 ADD RSP,0x8 POP RBX POP R14 JMP 0x00139150
/* OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFaceRelation() */ void __thiscall OpenSubdiv::v3_6_0::Vtr::internal::TriRefinement::populateVertexFaceRelation(TriRefinement *this) { long lVar1; long lVar2; long lVar3; long lVar4; ulong uVar5; lVar1 = *(long *)(this + 8); lVar2 = *(long *)(lVar1 + 0xb0); lVar3 = *(long *)(lVar1 + 0x128); lVar4 = *(long *)(lVar1 + 0xa8); lVar1 = *(long *)(lVar1 + 0x120); std::vector<int,std::allocator<int>>::resize ((vector<int,std::allocator<int>> *)(*(long *)(this + 0x10) + 0x108), (long)*(int *)(*(long *)(this + 0x10) + 8) * 2); uVar5 = (ulong)((int)((ulong)(lVar3 - lVar1) >> 2) + (int)((ulong)(lVar2 - lVar4) >> 2) * 3); std::vector<int,std::allocator<int>>::resize ((vector<int,std::allocator<int>> *)(*(long *)(this + 0x10) + 0x120),uVar5); std::vector<unsigned_short,std::allocator<unsigned_short>>::resize ((vector<unsigned_short,std::allocator<unsigned_short>> *) (*(long *)(this + 0x10) + 0x138),uVar5); if (*(int *)(this + 0x54) == 0) { populateVertexFacesFromParentVertices(this); populateVertexFacesFromParentEdges(this); } else { populateVertexFacesFromParentEdges(this); populateVertexFacesFromParentVertices(this); } lVar1 = *(long *)(this + 0x10); uVar5 = (long)*(int *)(*(long *)(lVar1 + 0x108) + (long)(*(int *)(lVar1 + 8) * 2 + -1) * 4) + (long)*(int *)(*(long *)(lVar1 + 0x108) + (long)(*(int *)(lVar1 + 8) * 2 + -2) * 4); std::vector<int,std::allocator<int>>::resize ((vector<int,std::allocator<int>> *)(lVar1 + 0x120),uVar5); std::vector<unsigned_short,std::allocator<unsigned_short>>::resize ((vector<unsigned_short,std::allocator<unsigned_short>> *) (*(long *)(this + 0x10) + 0x138),uVar5); return; }
61,616
mysql_stmt_next_result
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
int STDCALL mysql_stmt_next_result(MYSQL_STMT *stmt) { int rc= 0; if (!stmt->mysql) { SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); return(1); } if (stmt->state < MYSQL_STMT_EXECUTED) { SET_CLIENT_ERROR(stmt->mysql, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); SET_CLIENT_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); return(1); } if (!mysql_stmt_more_results(stmt)) return(-1); if (stmt->state > MYSQL_STMT_EXECUTED && stmt->state < MYSQL_STMT_FETCH_DONE) madb_reset_stmt(stmt, MADB_RESET_ERROR | MADB_RESET_BUFFER | MADB_RESET_LONGDATA); stmt->state= MYSQL_STMT_WAITING_USE_OR_STORE; if (mysql_next_result(stmt->mysql)) { stmt->state= MYSQL_STMT_FETCH_DONE; SET_CLIENT_STMT_ERROR(stmt, stmt->mysql->net.last_errno, stmt->mysql->net.sqlstate, stmt->mysql->net.last_error); return(1); } if (stmt->mysql->status == MYSQL_STATUS_GET_RESULT) stmt->mysql->status= MYSQL_STATUS_STMT_RESULT; if (stmt->mysql->field_count) rc= madb_alloc_stmt_fields(stmt); else { stmt->upsert_status.affected_rows= stmt->mysql->affected_rows; stmt->upsert_status.last_insert_id= stmt->mysql->insert_id; stmt->upsert_status.server_status= stmt->mysql->server_status; stmt->upsert_status.warning_count= stmt->mysql->warning_count; } stmt->field_count= stmt->mysql->field_count; stmt->result.rows= 0; return(rc); }
O0
c
mysql_stmt_next_result: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl $0x0, -0x14(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x38(%rax) jne 0x2ec7f jmp 0x2ec10 movq -0x10(%rbp), %rax movl $0x7dd, 0x108(%rax) # imm = 0x7DD movq -0x10(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D leaq 0x333a0(%rip), %rax # 0x61fd0 movq (%rax), %rsi movl $0x5, %edx callq 0x13210 movq -0x10(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x10(%rbp), %rdi addq $0x10c, %rdi # imm = 0x10C leaq 0x33386(%rip), %rax # 0x61fe0 movq 0x68(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x13210 movq -0x10(%rbp), %rax movb $0x0, 0x30b(%rax) movl $0x1, -0x4(%rbp) jmp 0x2ef7a movq -0x10(%rbp), %rax cmpl $0x2, 0x50(%rax) jae 0x2ed77 jmp 0x2ec8f movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movl $0x7de, 0x90(%rax) # imm = 0x7DE movq -0x10(%rbp), %rax movq 0x38(%rax), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x33319(%rip), %rax # 0x61fd0 movq (%rax), %rsi movl $0x5, %edx callq 0x13210 movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x29c(%rax) movq -0x10(%rbp), %rax movq 0x38(%rax), %rdi addq $0x97, %rdi leaq 0x332f7(%rip), %rax # 0x61fe0 movq 0x70(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13210 movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x296(%rax) jmp 0x2ed08 movq -0x10(%rbp), %rax movl $0x7de, 0x108(%rax) # imm = 0x7DE movq -0x10(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D leaq 0x332a8(%rip), %rax # 0x61fd0 movq (%rax), %rsi movl $0x5, %edx callq 0x13210 movq -0x10(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x10(%rbp), %rdi addq $0x10c, %rdi # imm = 0x10C leaq 0x3328e(%rip), %rax # 0x61fe0 movq 0x70(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x13210 movq -0x10(%rbp), %rax movb $0x0, 0x30b(%rax) movl $0x1, -0x4(%rbp) jmp 0x2ef7a movq -0x10(%rbp), %rdi callq 0x2e5b0 cmpb $0x0, %al jne 0x2ed90 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x2ef7a movq -0x10(%rbp), %rax cmpl $0x2, 0x50(%rax) jbe 0x2edb2 movq -0x10(%rbp), %rax cmpl $0x6, 0x50(%rax) jae 0x2edb2 movq -0x10(%rbp), %rdi movl $0xb, %esi callq 0x2c070 movq -0x10(%rbp), %rax movl $0x3, 0x50(%rax) movq -0x10(%rbp), %rax movq 0x38(%rax), %rdi callq 0x1f640 cmpl $0x0, %eax je 0x2eeaa movq -0x10(%rbp), %rax movl $0x6, 0x50(%rax) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movl 0x90(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x108(%rax) movq -0x10(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D movq -0x10(%rbp), %rax movq 0x38(%rax), %rsi addq $0x297, %rsi # imm = 0x297 movl $0x5, %edx callq 0x13210 movq -0x10(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x10(%rbp), %rax addq $0x10c, %rax # imm = 0x10C movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax addq $0x97, %rax cmpq $0x0, %rax je 0x2ee5b movq -0x10(%rbp), %rax movq 0x38(%rax), %rax addq $0x97, %rax movq %rax, -0x28(%rbp) jmp 0x2ee81 movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movl 0x90(%rax), %eax subl $0x7d0, %eax # imm = 0x7D0 movl %eax, %eax movl %eax, %ecx leaq 0x33167(%rip), %rax # 0x61fe0 movq (%rax,%rcx,8), %rax movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rdi movq -0x28(%rbp), %rsi movl $0x200, %edx # imm = 0x200 callq 0x13210 movq -0x10(%rbp), %rax movb $0x0, 0x30b(%rax) movl $0x1, -0x4(%rbp) jmp 0x2ef7a movq -0x10(%rbp), %rax movq 0x38(%rax), %rax cmpl $0x1, 0x488(%rax) jne 0x2eecd movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movl $0x8, 0x488(%rax) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax cmpl $0x0, 0x37c(%rax) je 0x2eeec movq -0x10(%rbp), %rdi callq 0x2ef90 movl %eax, -0x14(%rbp) jmp 0x2ef50 movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq 0x338(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0xf8(%rax) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq 0x340(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x100(%rax) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movl 0x380(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0xf4(%rax) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movl 0x388(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0xf0(%rax) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movl 0x37c(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x60(%rax) movq -0x10(%rbp), %rax movq $0x0, 0xc8(%rax) movl -0x14(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mysql_stmt_next_result: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_14], 0 mov rax, [rbp+var_10] cmp qword ptr [rax+38h], 0 jnz short loc_2EC7F jmp short $+2 loc_2EC10: mov rax, [rbp+var_10] mov dword ptr [rax+108h], 7DDh mov rdi, [rbp+var_10] add rdi, 30Dh lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+312h], 0 mov rdi, [rbp+var_10] add rdi, 10Ch lea rax, client_errors mov rsi, [rax+68h] mov edx, 200h call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+30Bh], 0 mov [rbp+var_4], 1 jmp loc_2EF7A loc_2EC7F: mov rax, [rbp+var_10] cmp dword ptr [rax+50h], 2 jnb loc_2ED77 jmp short $+2 loc_2EC8F: mov rax, [rbp+var_10] mov rax, [rax+38h] mov dword ptr [rax+90h], 7DEh mov rax, [rbp+var_10] mov rdi, [rax+38h] add rdi, 297h lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_10] mov rax, [rax+38h] mov byte ptr [rax+29Ch], 0 mov rax, [rbp+var_10] mov rdi, [rax+38h] add rdi, 97h lea rax, client_errors mov rsi, [rax+70h] mov edx, 1FFh call _strncpy mov rax, [rbp+var_10] mov rax, [rax+38h] mov byte ptr [rax+296h], 0 jmp short $+2 loc_2ED08: mov rax, [rbp+var_10] mov dword ptr [rax+108h], 7DEh mov rdi, [rbp+var_10] add rdi, 30Dh lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+312h], 0 mov rdi, [rbp+var_10] add rdi, 10Ch lea rax, client_errors mov rsi, [rax+70h] mov edx, 200h call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+30Bh], 0 mov [rbp+var_4], 1 jmp loc_2EF7A loc_2ED77: mov rdi, [rbp+var_10] call mysql_stmt_more_results cmp al, 0 jnz short loc_2ED90 mov [rbp+var_4], 0FFFFFFFFh jmp loc_2EF7A loc_2ED90: mov rax, [rbp+var_10] cmp dword ptr [rax+50h], 2 jbe short loc_2EDB2 mov rax, [rbp+var_10] cmp dword ptr [rax+50h], 6 jnb short loc_2EDB2 mov rdi, [rbp+var_10] mov esi, 0Bh call madb_reset_stmt loc_2EDB2: mov rax, [rbp+var_10] mov dword ptr [rax+50h], 3 mov rax, [rbp+var_10] mov rdi, [rax+38h] call mysql_next_result cmp eax, 0 jz loc_2EEAA mov rax, [rbp+var_10] mov dword ptr [rax+50h], 6 mov rax, [rbp+var_10] mov rax, [rax+38h] mov ecx, [rax+90h] mov rax, [rbp+var_10] mov [rax+108h], ecx mov rdi, [rbp+var_10] add rdi, 30Dh mov rax, [rbp+var_10] mov rsi, [rax+38h] add rsi, 297h mov edx, 5 call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+312h], 0 mov rax, [rbp+var_10] add rax, 10Ch mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rax, [rax+38h] add rax, 97h cmp rax, 0 jz short loc_2EE5B mov rax, [rbp+var_10] mov rax, [rax+38h] add rax, 97h mov [rbp+var_28], rax jmp short loc_2EE81 loc_2EE5B: mov rax, [rbp+var_10] mov rax, [rax+38h] mov eax, [rax+90h] sub eax, 7D0h mov eax, eax mov ecx, eax lea rax, client_errors mov rax, [rax+rcx*8] mov [rbp+var_28], rax loc_2EE81: mov rdi, [rbp+var_20] mov rsi, [rbp+var_28] mov edx, 200h call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+30Bh], 0 mov [rbp+var_4], 1 jmp loc_2EF7A loc_2EEAA: mov rax, [rbp+var_10] mov rax, [rax+38h] cmp dword ptr [rax+488h], 1 jnz short loc_2EECD mov rax, [rbp+var_10] mov rax, [rax+38h] mov dword ptr [rax+488h], 8 loc_2EECD: mov rax, [rbp+var_10] mov rax, [rax+38h] cmp dword ptr [rax+37Ch], 0 jz short loc_2EEEC mov rdi, [rbp+var_10] call madb_alloc_stmt_fields mov [rbp+var_14], eax jmp short loc_2EF50 loc_2EEEC: mov rax, [rbp+var_10] mov rax, [rax+38h] mov rcx, [rax+338h] mov rax, [rbp+var_10] mov [rax+0F8h], rcx mov rax, [rbp+var_10] mov rax, [rax+38h] mov rcx, [rax+340h] mov rax, [rbp+var_10] mov [rax+100h], rcx mov rax, [rbp+var_10] mov rax, [rax+38h] mov ecx, [rax+380h] mov rax, [rbp+var_10] mov [rax+0F4h], ecx mov rax, [rbp+var_10] mov rax, [rax+38h] mov ecx, [rax+388h] mov rax, [rbp+var_10] mov [rax+0F0h], ecx loc_2EF50: mov rax, [rbp+var_10] mov rax, [rax+38h] mov ecx, [rax+37Ch] mov rax, [rbp+var_10] mov [rax+60h], ecx mov rax, [rbp+var_10] mov qword ptr [rax+0C8h], 0 mov eax, [rbp+var_14] mov [rbp+var_4], eax loc_2EF7A: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long mysql_stmt_next_result(long long a1) { char *v1; // rax unsigned int v3; // [rsp+1Ch] [rbp-14h] v3 = 0; if ( *(_QWORD *)(a1 + 56) ) { if ( *(_DWORD *)(a1 + 80) >= 2u ) { if ( mysql_stmt_more_results(a1) ) { if ( *(_DWORD *)(a1 + 80) > 2u && *(_DWORD *)(a1 + 80) < 6u ) madb_reset_stmt(a1, 11); *(_DWORD *)(a1 + 80) = 3; if ( (unsigned int)mysql_next_result(*(_QWORD *)(a1 + 56)) ) { *(_DWORD *)(a1 + 80) = 6; *(_DWORD *)(a1 + 264) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL); strncpy(a1 + 781, *(_QWORD *)(a1 + 56) + 663LL, 5LL); *(_BYTE *)(a1 + 786) = 0; if ( *(_QWORD *)(a1 + 56) == -151LL ) v1 = client_errors[*(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL) - 2000]; else v1 = (char *)(*(_QWORD *)(a1 + 56) + 151LL); strncpy(a1 + 268, v1, 512LL); *(_BYTE *)(a1 + 779) = 0; return 1; } else { if ( *(_DWORD *)(*(_QWORD *)(a1 + 56) + 1160LL) == 1 ) *(_DWORD *)(*(_QWORD *)(a1 + 56) + 1160LL) = 8; if ( *(_DWORD *)(*(_QWORD *)(a1 + 56) + 892LL) ) { v3 = madb_alloc_stmt_fields(a1); } else { *(_QWORD *)(a1 + 248) = *(_QWORD *)(*(_QWORD *)(a1 + 56) + 824LL); *(_QWORD *)(a1 + 256) = *(_QWORD *)(*(_QWORD *)(a1 + 56) + 832LL); *(_DWORD *)(a1 + 244) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 896LL); *(_DWORD *)(a1 + 240) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 904LL); } *(_DWORD *)(a1 + 96) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 892LL); *(_QWORD *)(a1 + 200) = 0LL; return v3; } } else { return (unsigned int)-1; } } else { *(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL) = 2014; strncpy(*(_QWORD *)(a1 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(*(_QWORD *)(a1 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(a1 + 56) + 151LL, client_errors[14], 511LL); *(_BYTE *)(*(_QWORD *)(a1 + 56) + 662LL) = 0; *(_DWORD *)(a1 + 264) = 2014; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; strncpy(a1 + 268, client_errors[14], 512LL); *(_BYTE *)(a1 + 779) = 0; return 1; } } else { *(_DWORD *)(a1 + 264) = 2013; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; strncpy(a1 + 268, client_errors[13], 512LL); *(_BYTE *)(a1 + 779) = 0; return 1; } }
mysql_stmt_next_result: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],0x0 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x38],0x0 JNZ 0x0012ec7f JMP 0x0012ec10 LAB_0012ec10: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x108],0x7dd MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x30d LEA RAX,[0x161fd0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x312],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x10c LEA RAX,[0x161fe0] MOV RSI,qword ptr [RAX + 0x68] MOV EDX,0x200 CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x30b],0x0 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0012ef7a LAB_0012ec7f: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x50],0x2 JNC 0x0012ed77 JMP 0x0012ec8f LAB_0012ec8f: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV dword ptr [RAX + 0x90],0x7de MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x297 LEA RAX,[0x161fd0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV byte ptr [RAX + 0x29c],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x97 LEA RAX,[0x161fe0] MOV RSI,qword ptr [RAX + 0x70] MOV EDX,0x1ff CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV byte ptr [RAX + 0x296],0x0 JMP 0x0012ed08 LAB_0012ed08: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x108],0x7de MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x30d LEA RAX,[0x161fd0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x312],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x10c LEA RAX,[0x161fe0] MOV RSI,qword ptr [RAX + 0x70] MOV EDX,0x200 CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x30b],0x0 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0012ef7a LAB_0012ed77: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0012e5b0 CMP AL,0x0 JNZ 0x0012ed90 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0012ef7a LAB_0012ed90: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x50],0x2 JBE 0x0012edb2 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x50],0x6 JNC 0x0012edb2 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0xb CALL 0x0012c070 LAB_0012edb2: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x50],0x3 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x38] CALL 0x0011f640 CMP EAX,0x0 JZ 0x0012eeaa MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x50],0x6 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV ECX,dword ptr [RAX + 0x90] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x108],ECX MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x30d MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x38] ADD RSI,0x297 MOV EDX,0x5 CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x312],0x0 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x10c MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] ADD RAX,0x97 CMP RAX,0x0 JZ 0x0012ee5b MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] ADD RAX,0x97 MOV qword ptr [RBP + -0x28],RAX JMP 0x0012ee81 LAB_0012ee5b: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV EAX,dword ptr [RAX + 0x90] SUB EAX,0x7d0 MOV EAX,EAX MOV ECX,EAX LEA RAX,[0x161fe0] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x28],RAX LAB_0012ee81: MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x28] MOV EDX,0x200 CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x30b],0x0 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0012ef7a LAB_0012eeaa: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] CMP dword ptr [RAX + 0x488],0x1 JNZ 0x0012eecd MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV dword ptr [RAX + 0x488],0x8 LAB_0012eecd: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] CMP dword ptr [RAX + 0x37c],0x0 JZ 0x0012eeec MOV RDI,qword ptr [RBP + -0x10] CALL 0x0012ef90 MOV dword ptr [RBP + -0x14],EAX JMP 0x0012ef50 LAB_0012eeec: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV RCX,qword ptr [RAX + 0x338] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xf8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV RCX,qword ptr [RAX + 0x340] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x100],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV ECX,dword ptr [RAX + 0x380] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xf4],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV ECX,dword ptr [RAX + 0x388] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xf0],ECX LAB_0012ef50: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV ECX,dword ptr [RAX + 0x37c] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x60],ECX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xc8],0x0 MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x4],EAX LAB_0012ef7a: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 mysql_stmt_next_result(long param_1) { char cVar1; int iVar2; char *local_30; int4 local_1c; int4 local_c; local_1c = 0; if (*(long *)(param_1 + 0x38) == 0) { *(int4 *)(param_1 + 0x108) = 0x7dd; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; strncpy((char *)(param_1 + 0x10c),PTR_s_Lost_connection_to_server_during_00162048,0x200); *(int1 *)(param_1 + 0x30b) = 0; local_c = 1; } else if (*(uint *)(param_1 + 0x50) < 2) { *(int4 *)(*(long *)(param_1 + 0x38) + 0x90) = 0x7de; strncpy((char *)(*(long *)(param_1 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(param_1 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(param_1 + 0x38) + 0x97), PTR_s_Commands_out_of_sync__you_can_t_r_00162050,0x1ff); *(int1 *)(*(long *)(param_1 + 0x38) + 0x296) = 0; *(int4 *)(param_1 + 0x108) = 0x7de; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; strncpy((char *)(param_1 + 0x10c),PTR_s_Commands_out_of_sync__you_can_t_r_00162050,0x200); *(int1 *)(param_1 + 0x30b) = 0; local_c = 1; } else { cVar1 = mysql_stmt_more_results(param_1); if (cVar1 == '\0') { local_c = 0xffffffff; } else { if ((2 < *(uint *)(param_1 + 0x50)) && (*(uint *)(param_1 + 0x50) < 6)) { madb_reset_stmt(param_1,0xb); } *(int4 *)(param_1 + 0x50) = 3; iVar2 = mysql_next_result(*(int8 *)(param_1 + 0x38)); if (iVar2 == 0) { if (*(int *)(*(long *)(param_1 + 0x38) + 0x488) == 1) { *(int4 *)(*(long *)(param_1 + 0x38) + 0x488) = 8; } if (*(int *)(*(long *)(param_1 + 0x38) + 0x37c) == 0) { *(int8 *)(param_1 + 0xf8) = *(int8 *)(*(long *)(param_1 + 0x38) + 0x338); *(int8 *)(param_1 + 0x100) = *(int8 *)(*(long *)(param_1 + 0x38) + 0x340); *(int4 *)(param_1 + 0xf4) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x380); *(int4 *)(param_1 + 0xf0) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x388); } else { local_1c = madb_alloc_stmt_fields(param_1); } *(int4 *)(param_1 + 0x60) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x37c); *(int8 *)(param_1 + 200) = 0; local_c = local_1c; } else { *(int4 *)(param_1 + 0x50) = 6; *(int4 *)(param_1 + 0x108) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x90); strncpy((char *)(param_1 + 0x30d),(char *)(*(long *)(param_1 + 0x38) + 0x297),5); *(int1 *)(param_1 + 0x312) = 0; if (*(long *)(param_1 + 0x38) == -0x97) { local_30 = (&client_errors)[*(int *)(*(long *)(param_1 + 0x38) + 0x90) - 2000]; } else { local_30 = (char *)(*(long *)(param_1 + 0x38) + 0x97); } strncpy((char *)(param_1 + 0x10c),local_30,0x200); *(int1 *)(param_1 + 0x30b) = 0; local_c = 1; } } } return local_c; }
61,617
qdevtools::WidgetSelectionBox::qt_metacall(QMetaObject::Call, int, void**)
HuaiminNotSleepYet[P]QDevTools/build_O2/QDevTools_autogen/EWIEGA46WW/moc_qdevtools.cpp
int qdevtools::WidgetSelectionBox::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 1) qt_static_metacall(this, _c, _id, _a); _id -= 1; } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { if (_id < 1) qt_static_metacall(this, _c, _id, _a); _id -= 1; } return _id; }
O2
cpp
qdevtools::WidgetSelectionBox::qt_metacall(QMetaObject::Call, int, void**): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rcx, %r14 movl %esi, %ebp movq %rdi, %r15 callq 0xfac0 movl %eax, %ebx testl %eax, %eax js 0x104fc cmpl $0x7, %ebp je 0x104da testl %ebp, %ebp jne 0x104fc testl %ebx, %ebx jne 0x104fa movq 0x8(%r14), %rax movq (%rax), %rsi movq %r15, %rdi callq 0x12e7e jmp 0x104fa testl %ebx, %ebx jne 0x104fa movq (%r14), %rax movq 0x8(%r14), %rcx cmpl $0x0, (%rcx) je 0x104f0 andq $0x0, (%rax) jmp 0x104fa leaq 0x1d4e1(%rip), %rcx # 0x2d9d8 movq %rcx, (%rax) decl %ebx movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq nop
_ZN9qdevtools18WidgetSelectionBox11qt_metacallEN11QMetaObject4CallEiPPv: push rbp push r15 push r14 push rbx push rax mov r14, rcx mov ebp, esi mov r15, rdi call __ZN7QWidget11qt_metacallEN11QMetaObject4CallEiPPv; QWidget::qt_metacall(QMetaObject::Call,int,void **) mov ebx, eax test eax, eax js short loc_104FC cmp ebp, 7 jz short loc_104DA test ebp, ebp jnz short loc_104FC test ebx, ebx jnz short loc_104FA mov rax, [r14+8] mov rsi, [rax]; QWidget * mov rdi, r15; this call _ZN9qdevtools18WidgetSelectionBox9setTargetEP7QWidget; qdevtools::WidgetSelectionBox::setTarget(QWidget *) jmp short loc_104FA loc_104DA: test ebx, ebx jnz short loc_104FA mov rax, [r14] mov rcx, [r14+8] cmp dword ptr [rcx], 0 jz short loc_104F0 and qword ptr [rax], 0 jmp short loc_104FA loc_104F0: lea rcx, _ZN9QtPrivate25QMetaTypeInterfaceWrapperIP7QWidgetE8metaTypeE; QtPrivate::QMetaTypeInterfaceWrapper<QWidget *>::metaType mov [rax], rcx loc_104FA: dec ebx loc_104FC: mov eax, ebx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long qdevtools::WidgetSelectionBox::qt_metacall( qdevtools::WidgetSelectionBox *this, int a2, long long a3, long long a4) { int v5; // ebx _QWORD *v6; // rax v5 = QWidget::qt_metacall(this); if ( v5 >= 0 ) { if ( a2 == 7 ) { if ( !v5 ) { v6 = *(_QWORD **)a4; if ( **(_DWORD **)(a4 + 8) ) *v6 = 0LL; else *v6 = &QtPrivate::QMetaTypeInterfaceWrapper<QWidget *>::metaType; } goto LABEL_10; } if ( !a2 ) { if ( !v5 ) qdevtools::WidgetSelectionBox::setTarget(this, **(QWidget ***)(a4 + 8)); LABEL_10: --v5; } } return (unsigned int)v5; }
qt_metacall: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RCX MOV EBP,ESI MOV R15,RDI CALL 0x0010fac0 MOV EBX,EAX TEST EAX,EAX JS 0x001104fc CMP EBP,0x7 JZ 0x001104da TEST EBP,EBP JNZ 0x001104fc TEST EBX,EBX JNZ 0x001104fa MOV RAX,qword ptr [R14 + 0x8] MOV RSI,qword ptr [RAX] MOV RDI,R15 CALL 0x00112e7e JMP 0x001104fa LAB_001104da: TEST EBX,EBX JNZ 0x001104fa MOV RAX,qword ptr [R14] MOV RCX,qword ptr [R14 + 0x8] CMP dword ptr [RCX],0x0 JZ 0x001104f0 AND qword ptr [RAX],0x0 JMP 0x001104fa LAB_001104f0: LEA RCX,[0x12d9d8] MOV qword ptr [RAX],RCX LAB_001104fa: DEC EBX LAB_001104fc: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
/* qdevtools::WidgetSelectionBox::qt_metacall(QMetaObject::Call, int, void**) */ int __thiscall qdevtools::WidgetSelectionBox::qt_metacall (WidgetSelectionBox *this,int param_2,int8 param_3,int8 *param_4) { int iVar1; iVar1 = QWidget::qt_metacall(); if (-1 < iVar1) { if (param_2 == 7) { if (iVar1 == 0) { if (*(int *)param_4[1] == 0) { *(int8 *)*param_4 = QtPrivate::QMetaTypeInterfaceWrapper<QWidget*>::metaType; } else { *(int8 *)*param_4 = 0; } } } else { if (param_2 != 0) { return iVar1; } if (iVar1 == 0) { setTarget(this,*(QWidget **)param_4[1]); } } iVar1 = iVar1 + -1; } return iVar1; }
61,618
bf_rem
bluesky950520[P]quickjs/libbf.c
int bf_rem(bf_t *r, const bf_t *a, const bf_t *b, limb_t prec, bf_flags_t flags, int rnd_mode) { bf_t q_s, *q = &q_s; int ret; bf_init(r->ctx, q); ret = bf_divrem(q, r, a, b, prec, flags, rnd_mode); bf_delete(q); return ret; }
O1
c
bf_rem: pushq %r14 pushq %rbx subq $0x38, %rsp movl %r8d, %eax movq %rcx, %r8 movq %rdx, %rcx movq %rsi, %rdx movq %rdi, %rsi movq (%rdi), %rdi leaq 0x10(%rsp), %r14 movq %rdi, (%r14) movl $0x0, 0x8(%r14) movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000 movq %rdi, 0x10(%r14) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%r14) movl %r9d, (%rsp) movq %r14, %rdi movl %eax, %r9d callq 0x86acf movl %eax, %ebx movq (%r14), %rax testq %rax, %rax je 0x87070 movq 0x30(%rsp), %rsi testq %rsi, %rsi je 0x87070 movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movl %ebx, %eax addq $0x38, %rsp popq %rbx popq %r14 retq
bf_rem: push r14 push rbx sub rsp, 38h mov eax, r8d mov r8, rcx mov rcx, rdx mov rdx, rsi mov rsi, rdi mov rdi, [rdi] lea r14, [rsp+48h+var_38] mov [r14], rdi mov dword ptr [r14+8], 0 mov rdi, 8000000000000000h mov [r14+10h], rdi xorps xmm0, xmm0 movups xmmword ptr [r14+18h], xmm0 mov [rsp+48h+var_48], r9d mov rdi, r14 mov r9d, eax call bf_divrem mov ebx, eax mov rax, [r14] test rax, rax jz short loc_87070 mov rsi, [rsp+48h+var_18] test rsi, rsi jz short loc_87070 mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_87070: mov eax, ebx add rsp, 38h pop rbx pop r14 retn
long long bf_rem(__int128 *a1, long long a2, long long a3, long long a4, unsigned int a5, int a6) { unsigned int v6; // ebx _QWORD *v8; // [rsp+10h] [rbp-38h] BYREF int v9; // [rsp+18h] [rbp-30h] unsigned long long v10; // [rsp+20h] [rbp-28h] __int128 v11; // [rsp+28h] [rbp-20h] v8 = *(_QWORD **)a1; v9 = 0; v10 = 0x8000000000000000LL; v11 = 0LL; v6 = bf_divrem(&v8, a1, a2, a3, a4, a5, a6); if ( v8 && *((_QWORD *)&v11 + 1) ) ((void ( *)(_QWORD, _QWORD, _QWORD))v8[1])(*v8, *((_QWORD *)&v11 + 1), 0LL); return v6; }
bf_rem: PUSH R14 PUSH RBX SUB RSP,0x38 MOV EAX,R8D MOV R8,RCX MOV RCX,RDX MOV RDX,RSI MOV RSI,RDI MOV RDI,qword ptr [RDI] LEA R14,[RSP + 0x10] MOV qword ptr [R14],RDI MOV dword ptr [R14 + 0x8],0x0 MOV RDI,-0x8000000000000000 MOV qword ptr [R14 + 0x10],RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0x18],XMM0 MOV dword ptr [RSP],R9D MOV RDI,R14 MOV R9D,EAX CALL 0x00186acf MOV EBX,EAX MOV RAX,qword ptr [R14] TEST RAX,RAX JZ 0x00187070 MOV RSI,qword ptr [RSP + 0x30] TEST RSI,RSI JZ 0x00187070 MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_00187070: MOV EAX,EBX ADD RSP,0x38 POP RBX POP R14 RET
int4 bf_rem(int8 *param_1,int8 param_2,int8 param_3,int8 param_4, int4 param_5,int4 param_6) { int4 uVar1; int8 *local_38; int4 local_30; int8 local_28; int8 local_20; long lStack_18; local_38 = (int8 *)*param_1; local_30 = 0; local_28 = 0x8000000000000000; local_20 = 0; lStack_18 = 0; uVar1 = bf_divrem(&local_38,param_1,param_2,param_3,param_4,param_5,param_6); if ((local_38 != (int8 *)0x0) && (lStack_18 != 0)) { (*(code *)local_38[1])(*local_38,lStack_18,0); } return uVar1; }
61,619
uf_space_endspace
eloqsql/storage/myisam/mi_packrec.c
static void uf_space_endspace(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to, uchar *end) { uint spaces; if (get_bit(bit_buff)) bfill((uchar*) 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((uchar*) 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 0xbca37 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 0xbca5b jmp 0xbca79 movq -0x10(%rbp), %rdi callq 0xbbca0 movq -0x10(%rbp), %rax movl $0x1f, 0x4(%rax) movq -0x10(%rbp), %rax movl (%rax), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax je 0xbca79 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rdx movq -0x18(%rbp), %rax subq %rax, %rdx movl $0x20, %esi callq 0x2a2a0 jmp 0xbcb44 movq -0x10(%rbp), %rax movl 0x4(%rax), %eax movq -0x8(%rbp), %rcx cmpl 0x1c(%rcx), %eax jb 0xbcabc movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x8(%rbp), %rcx movl 0x1c(%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 0x1c(%rcx), %ecx movl %ecx, %edx leaq 0x20a02c(%rip), %rcx # 0x2c6ae0 andl (%rcx,%rdx,4), %eax movl %eax, -0x28(%rbp) jmp 0xbcacf movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rax movl 0x1c(%rax), %esi callq 0xba450 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 0xbcaf1 movq -0x10(%rbp), %rax movl $0x1, 0x28(%rax) jmp 0xbcb44 movq -0x18(%rbp), %rax movl -0x24(%rbp), %ecx addq %rcx, %rax cmpq -0x20(%rbp), %rax je 0xbcb24 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 0xbc3b0 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_0: 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_BCA37 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_BCA5B jmp short loc_BCA79 loc_BCA37: mov rdi, [rbp+var_10] call fill_buffer_0 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_BCA79 loc_BCA5B: 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_BCB44 loc_BCA79: mov rax, [rbp+var_10] mov eax, [rax+4] mov rcx, [rbp+var_8] cmp eax, [rcx+1Ch] jb short loc_BCABC mov rax, [rbp+var_10] mov eax, [rax] mov rcx, [rbp+var_8] mov esi, [rcx+1Ch] 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+1Ch] mov edx, ecx lea rcx, mask_0 and eax, [rcx+rdx*4] mov [rbp+var_28], eax jmp short loc_BCACF loc_BCABC: mov rdi, [rbp+var_10] mov rax, [rbp+var_8] mov esi, [rax+1Ch] call fill_and_get_bits_0 mov [rbp+var_28], eax loc_BCACF: 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_BCAF1 mov rax, [rbp+var_10] mov dword ptr [rax+28h], 1 jmp short loc_BCB44 loc_BCAF1: mov rax, [rbp+var_18] mov ecx, [rbp+var_24] add rax, rcx cmp rax, [rbp+var_20] jz short loc_BCB24 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_0 loc_BCB24: 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_BCB44: add rsp, 30h pop rbp retn
long long uf_space_endspace_0(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_0; // [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_0((long long)a2); a2[1] = 31; if ( *a2 < 0 ) return memset(a3, 32LL, a4 - a3); LABEL_6: if ( (unsigned int)a2[1] < *(_DWORD *)(a1 + 28) ) { bits_0 = fill_and_get_bits_0(a2, *(_DWORD *)(a1 + 28)); } else { v7 = *a2; v8 = a2[1] - *(_DWORD *)(a1 + 28); a2[1] = v8; bits_0 = mask_0[*(unsigned int *)(a1 + 28)] & (v7 >> v8); } if ( &a3[bits_0] <= a4 ) { if ( &a3[bits_0] != a4 ) decode_bytes_0(a1, (long long)a2, a3, &a4[-bits_0]); return memset(&a4[-bits_0], 32LL, bits_0); } 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 0x001bca37 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 0x001bca5b JMP 0x001bca79 LAB_001bca37: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001bbca0 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 0x001bca79 LAB_001bca5b: 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 0x001bcb44 LAB_001bca79: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x4] MOV RCX,qword ptr [RBP + -0x8] CMP EAX,dword ptr [RCX + 0x1c] JC 0x001bcabc MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RCX + 0x1c] 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 + 0x1c] MOV EDX,ECX LEA RCX,[0x3c6ae0] AND EAX,dword ptr [RCX + RDX*0x4] MOV dword ptr [RBP + -0x28],EAX JMP 0x001bcacf LAB_001bcabc: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RAX + 0x1c] CALL 0x001ba450 MOV dword ptr [RBP + -0x28],EAX LAB_001bcacf: 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 0x001bcaf1 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x28],0x1 JMP 0x001bcb44 LAB_001bcaf1: MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x24] ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x20] JZ 0x001bcb24 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 0x001bc3b0 LAB_001bcb24: 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_001bcb44: 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 + 0x1c)) { local_30 = fill_and_get_bits(param_2,*(int4 *)(param_1 + 0x1c)); } else { uVar1 = param_2[1] - *(int *)(param_1 + 0x1c); param_2[1] = uVar1; local_30 = *param_2 >> ((byte)uVar1 & 0x1f) & *(uint *)(mask + (ulong)*(uint *)(param_1 + 0x1c) * 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; }
61,620
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>::empty() const
llama.cpp/common/json.hpp
bool empty() const noexcept { switch (m_data.m_type) { case value_t::null: { // null values are empty return true; } case value_t::array: { // delegate call to array_t::empty() return m_data.m_value.array->empty(); } case value_t::object: { // delegate call to object_t::empty() return m_data.m_value.object->empty(); } case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: { // all other types are nonempty return false; } } }
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>::empty() const: movzbl (%rdi), %eax testl %eax, %eax je 0xc19ca cmpl $0x1, %eax je 0xc19bb cmpl $0x2, %eax jne 0xc19cd movq 0x8(%rdi), %rax movq (%rax), %rcx cmpq 0x8(%rax), %rcx sete %al retq movb $0x1, %al retq xorl %eax, %eax retq
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5emptyEv: movzx eax, byte ptr [rdi] test eax, eax jz short loc_C19CA cmp eax, 1 jz short loc_C19BB cmp eax, 2 jnz short loc_C19CD loc_C19BB: mov rax, [rdi+8] mov rcx, [rax] cmp rcx, [rax+8] setz al retn loc_C19CA: mov al, 1 retn loc_C19CD: xor eax, eax retn
bool 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>::empty( unsigned __int8 *a1) { int v1; // eax v1 = *a1; if ( !*a1 ) return 1; if ( v1 == 1 || v1 == 2 ) return **((_QWORD **)a1 + 1) == *(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL); return 0; }
empty: MOVZX EAX,byte ptr [RDI] TEST EAX,EAX JZ 0x001c19ca CMP EAX,0x1 JZ 0x001c19bb CMP EAX,0x2 JNZ 0x001c19cd LAB_001c19bb: MOV RAX,qword ptr [RDI + 0x8] MOV RCX,qword ptr [RAX] CMP RCX,qword ptr [RAX + 0x8] SETZ AL RET LAB_001c19ca: MOV AL,0x1 RET LAB_001c19cd: XOR EAX,EAX 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>::empty() const */ int8 __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> ::empty(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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; long *plVar2; bVar1 = *this; if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0) { return 1; } if ((bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) && (bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2)) { return 0; } plVar2 = *(long **)(this + 8); return CONCAT71((int7)((ulong)plVar2 >> 8),*plVar2 == plVar2[1]); }
61,621
corofx::check(bool, std::source_location)
corofx/src/check.cpp
auto check(bool pred, std::source_location loc) noexcept -> void { if (pred) return; trace(loc.file_name(), ":", loc.line(), ": ", loc.function_name(), ": check failed"); std::terminate(); }
O3
cpp
corofx::check(bool, std::source_location): endbr64 pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) testl %edi, %edi je 0x1b8e movq %fs:0x28, %rax cmpq -0x8(%rbp), %rax jne 0x1ba1 addq $0x20, %rsp popq %rbp retq testq %rsi, %rsi jne 0x1ba6 xorl %eax, %eax leaq 0x5d8(%rip), %rcx # 0x2174 movq %rcx, %rsi jmp 0x1bb0 callq 0x11b0 movq (%rsi), %rcx movl 0x10(%rsi), %eax movq 0x8(%rsi), %rsi leaq -0x10(%rbp), %rdi movq %rcx, (%rdi) leaq -0x14(%rbp), %rdx movl %eax, (%rdx) leaq -0x20(%rbp), %r8 movq %rsi, (%r8) leaq 0x61d(%rip), %rsi # 0x21e8 leaq 0x618(%rip), %rcx # 0x21ea leaq 0x614(%rip), %r9 # 0x21ed callq 0x1cb1 callq 0x1130 endbr64 movq %rax, %rdi callq 0x1aea
_ZN6corofx5checkEbSt15source_location: endbr64 push rbp mov rbp, rsp sub rsp, 20h mov rax, fs:28h mov [rbp+var_8], rax test edi, edi jz short loc_1B8E mov rax, fs:28h cmp rax, [rbp+var_8] jnz short loc_1BA1 add rsp, 20h pop rbp retn loc_1B8E: test rsi, rsi jnz short loc_1BA6 xor eax, eax lea rcx, aSDSAssertionSF+22h; "" mov rsi, rcx jmp short loc_1BB0 loc_1BA1: call ___stack_chk_fail loc_1BA6: mov rcx, [rsi] mov eax, [rsi+10h] mov rsi, [rsi+8] loc_1BB0: lea rdi, [rbp+var_10] mov [rdi], rcx lea rdx, [rbp+var_14] mov [rdx], eax lea r8, [rbp+var_20] mov [r8], rsi lea rsi, asc_21E8; ":" lea rcx, asc_21EA; ": " lea r9, aCheckFailed; ": check failed" call _ZN6corofx5traceIJPKcRA2_S1_jRA3_S1_S2_RA15_S1_EEEvDpOT_; corofx::trace<char const*,char const(&)[2],uint,char const(&)[3],char const*,char const(&)[15]>(char const*,char const(&)[2],uint,char const(&)[3],char const*,char const(&)[15] &&) call __ZSt9terminatev; std::terminate(void) endbr64 mov rdi, rax call __clang_call_terminate
unsigned long long corofx::check(int a1, long long a2) { int v3; // eax char *v4; // rcx char *v5; // rsi _BYTE v6[12]; // [rsp+0h] [rbp-20h] BYREF int v7; // [rsp+Ch] [rbp-14h] BYREF _QWORD v8[2]; // [rsp+10h] [rbp-10h] BYREF v8[1] = __readfsqword(0x28u); if ( !a1 ) { if ( a2 ) { v4 = *(char **)a2; v3 = *(_DWORD *)(a2 + 16); v5 = *(char **)(a2 + 8); } else { v3 = 0; v4 = ""; v5 = ""; } v8[0] = v4; v7 = v3; corofx::trace<char const*,char const(&)[2],unsigned int,char const(&)[3],char const*,char const(&)[15]>( v8, ":", &v7, ": ", v6, ": check failed", v5); std::terminate(); } return __readfsqword(0x28u); }
check: ENDBR64 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX TEST EDI,EDI JZ 0x00101b8e MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x8] JNZ 0x00101ba1 ADD RSP,0x20 POP RBP RET LAB_00101b8e: TEST RSI,RSI JNZ 0x00101ba6 XOR EAX,EAX LEA RCX,[0x102174] MOV RSI,RCX JMP 0x00101bb0 LAB_00101ba1: CALL 0x001011b0 LAB_00101ba6: MOV RCX,qword ptr [RSI] MOV EAX,dword ptr [RSI + 0x10] MOV RSI,qword ptr [RSI + 0x8] LAB_00101bb0: LEA RDI,[RBP + -0x10] MOV qword ptr [RDI],RCX LEA RDX,[RBP + -0x14] MOV dword ptr [RDX],EAX LEA R8,[RBP + -0x20] MOV qword ptr [R8],RSI LAB_00101bc4: LEA RSI,[0x1021e8] LEA RCX,[0x1021ea] LEA R9,[0x1021ed] CALL 0x00101cb1 LAB_00101bde: CALL 0x00101130
/* corofx::check(bool, std::source_location) */ void corofx::check(int param_1,int8 *param_2) { long in_FS_OFFSET; char *local_28; uint local_1c; char *local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); if (param_1 == 0) { if (param_2 == (int8 *)0x0) { local_1c = 0; local_18 = ""; local_28 = ""; } else { local_18 = (char *)*param_2; local_1c = *(uint *)(param_2 + 2); local_28 = (char *)param_2[1]; } /* try { // try from 00101bc4 to 00101bdd has its CatchHandler @ 00101be3 */ trace<char_const*,char_const(&)[2],unsigned_int,char_const(&)[3],char_const*,char_const(&)[15]> (&local_18,":",&local_1c,": ",&local_28,": check failed"); /* WARNING: Subroutine does not return */ std::terminate(); } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
61,622
check_mb_eucjpms
eloqsql/libmariadb/libmariadb/ma_charset.c
static unsigned int check_mb_eucjpms(const char *start, const char *end) { if (*((uchar *)start) < 0x80) { return 0; /* invalid eucjpms character */ } if (valid_eucjpms(start[0]) && (end - start) > 1 && valid_eucjpms(start[1])) { return 2; } if (valid_eucjpms_ss2(start[0]) && (end - start) > 1 && valid_eucjpms_kata(start[1])) { return 2; } if (valid_eucjpms_ss3(start[0]) && (end - start) > 2 && valid_eucjpms(start[1]) && valid_eucjpms(start[2])) { return 2; } return 0; }
O3
c
check_mb_eucjpms: pushq %rbp movq %rsp, %rbp movb (%rdi), %cl xorl %eax, %eax testb %cl, %cl jns 0x54b81 leal 0x5f(%rcx), %eax cmpb $0x5e, %al setae %al subq %rdi, %rsi cmpq $0x2, %rsi setl %dl orb %al, %dl jne 0x54b33 movb 0x1(%rdi), %cl incb %cl movl $0x2, %eax cmpb $-0x5e, %cl jb 0x54b7f jmp 0x54b81 cmpq $0x2, %rsi setl %al cmpb $-0x72, %cl setne %dl orb %al, %dl jne 0x54b56 movb 0x1(%rdi), %cl addb $0x5f, %cl movl $0x2, %eax cmpb $0x3f, %cl jae 0x54b7f jmp 0x54b81 cmpb $-0x71, %cl setne %al cmpq $0x3, %rsi setl %cl orb %al, %cl jne 0x54b7f movb 0x1(%rdi), %al incb %al cmpb $-0x5e, %al jb 0x54b7f movb 0x2(%rdi), %cl incb %cl movl $0x2, %eax cmpb $-0x5f, %cl ja 0x54b81 xorl %eax, %eax popq %rbp retq
check_mb_eucjpms: push rbp mov rbp, rsp mov cl, [rdi] xor eax, eax test cl, cl jns short loc_54B81 lea eax, [rcx+5Fh] cmp al, 5Eh ; '^' setnb al sub rsi, rdi cmp rsi, 2 setl dl or dl, al jnz short loc_54B33 mov cl, [rdi+1] inc cl mov eax, 2 cmp cl, 0A2h jb short loc_54B7F jmp short loc_54B81 loc_54B33: cmp rsi, 2 setl al cmp cl, 8Eh setnz dl or dl, al jnz short loc_54B56 mov cl, [rdi+1] add cl, 5Fh ; '_' mov eax, 2 cmp cl, 3Fh ; '?' jnb short loc_54B7F jmp short loc_54B81 loc_54B56: cmp cl, 8Fh setnz al cmp rsi, 3 setl cl or cl, al jnz short loc_54B7F mov al, [rdi+1] inc al cmp al, 0A2h jb short loc_54B7F mov cl, [rdi+2] inc cl mov eax, 2 cmp cl, 0A1h ja short loc_54B81 loc_54B7F: xor eax, eax loc_54B81: pop rbp retn
long long check_mb_eucjpms(char *a1, long long a2) { char v2; // cl long long result; // rax long long v4; // rsi v2 = *a1; result = 0LL; if ( *a1 < 0 ) { v4 = a2 - (_QWORD)a1; if ( (unsigned __int8)(v2 + 95) < 0x5Eu && v4 >= 2 ) { result = 2LL; if ( (unsigned __int8)(a1[1] + 1) >= 0xA2u ) return result; return 0LL; } if ( v4 < 2 || v2 != -114 ) { if ( v2 != -113 || v4 < 3 ) return 0LL; if ( (unsigned __int8)(a1[1] + 1) < 0xA2u ) return 0LL; result = 2LL; if ( (unsigned __int8)(a1[2] + 1) <= 0xA1u ) return 0LL; } else { result = 2LL; if ( (unsigned __int8)(a1[1] + 95) >= 0x3Fu ) return 0LL; } } return result; }
check_mb_eucjpms: PUSH RBP MOV RBP,RSP MOV CL,byte ptr [RDI] XOR EAX,EAX TEST CL,CL JNS 0x00154b81 LEA EAX,[RCX + 0x5f] CMP AL,0x5e SETNC AL SUB RSI,RDI CMP RSI,0x2 SETL DL OR DL,AL JNZ 0x00154b33 MOV CL,byte ptr [RDI + 0x1] INC CL MOV EAX,0x2 CMP CL,0xa2 JC 0x00154b7f JMP 0x00154b81 LAB_00154b33: CMP RSI,0x2 SETL AL CMP CL,0x8e SETNZ DL OR DL,AL JNZ 0x00154b56 MOV CL,byte ptr [RDI + 0x1] ADD CL,0x5f MOV EAX,0x2 CMP CL,0x3f JNC 0x00154b7f JMP 0x00154b81 LAB_00154b56: CMP CL,0x8f SETNZ AL CMP RSI,0x3 SETL CL OR CL,AL JNZ 0x00154b7f MOV AL,byte ptr [RDI + 0x1] INC AL CMP AL,0xa2 JC 0x00154b7f MOV CL,byte ptr [RDI + 0x2] INC CL MOV EAX,0x2 CMP CL,0xa1 JA 0x00154b81 LAB_00154b7f: XOR EAX,EAX LAB_00154b81: POP RBP RET
int8 check_mb_eucjpms(char *param_1,long param_2) { char cVar1; cVar1 = *param_1; if (-1 < cVar1) { return 0; } param_2 = param_2 - (long)param_1; if (param_2 < 2 || 0x5d < (byte)(cVar1 + 0x5fU)) { if (cVar1 == -0x72 && 1 < param_2) { if (0x3e < (byte)(param_1[1] + 0x5fU)) { return 0; } return 2; } if (param_2 < 3 || cVar1 != -0x71) { return 0; } if ((byte)(param_1[1] + 1U) < 0xa2) { return 0; } cVar1 = param_1[2]; } else { cVar1 = param_1[1]; } if ((byte)(cVar1 + 1U) < 0xa2) { return 0; } return 2; }
61,623
zip_strrpl
7CodeWizard[P]stablediffusion/thirdparty/zip.c
static char *zip_strrpl(const char *str, size_t n, char oldchar, char newchar) { char c; size_t i; char *rpl = (char *)calloc((1 + n), sizeof(char)); char *begin = rpl; if (!rpl) { return NULL; } for (i = 0; (i < n) && (c = *str++); ++i) { if (c == oldchar) { c = newchar; } *rpl++ = c; } return begin; }
O2
c
zip_strrpl: pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 leaq 0x1(%rsi), %rdi pushq $0x1 popq %rsi callq 0xa390 testq %rax, %rax je 0x64fae xorl %ecx, %ecx cmpq %rcx, %rbx je 0x64fae movzbl (%r14,%rcx), %edx cmpl $0x5c, %edx je 0x64fa4 testl %edx, %edx jne 0x64fa6 jmp 0x64fae movb $0x2f, %dl movb %dl, (%rax,%rcx) incq %rcx jmp 0x64f8f addq $0x8, %rsp popq %rbx popq %r14 retq
zip_strrpl: push r14 push rbx push rax mov rbx, rsi mov r14, rdi lea rdi, [rsi+1] push 1 pop rsi call _calloc test rax, rax jz short loc_64FAE xor ecx, ecx loc_64F8F: cmp rbx, rcx jz short loc_64FAE movzx edx, byte ptr [r14+rcx] cmp edx, 5Ch ; '\' jz short loc_64FA4 test edx, edx jnz short loc_64FA6 jmp short loc_64FAE loc_64FA4: mov dl, 2Fh ; '/' loc_64FA6: mov [rax+rcx], dl inc rcx jmp short loc_64F8F loc_64FAE: add rsp, 8 pop rbx pop r14 retn
long long zip_strrpl(long long a1, long long a2) { long long result; // rax long long i; // rcx int v4; // edx result = calloc(a2 + 1, 1LL); if ( result ) { for ( i = 0LL; a2 != i; ++i ) { v4 = *(unsigned __int8 *)(a1 + i); if ( v4 == 92 ) { LOBYTE(v4) = 47; } else if ( !*(_BYTE *)(a1 + i) ) { return result; } *(_BYTE *)(result + i) = v4; } } return result; }
zip_strrpl: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI LEA RDI,[RSI + 0x1] PUSH 0x1 POP RSI CALL 0x0010a390 TEST RAX,RAX JZ 0x00164fae XOR ECX,ECX LAB_00164f8f: CMP RBX,RCX JZ 0x00164fae MOVZX EDX,byte ptr [R14 + RCX*0x1] CMP EDX,0x5c JZ 0x00164fa4 TEST EDX,EDX JNZ 0x00164fa6 JMP 0x00164fae LAB_00164fa4: MOV DL,0x2f LAB_00164fa6: MOV byte ptr [RAX + RCX*0x1],DL INC RCX JMP 0x00164f8f LAB_00164fae: ADD RSP,0x8 POP RBX POP R14 RET
void zip_strrpl(long param_1,long param_2) { void *pvVar1; long lVar2; char cVar3; pvVar1 = calloc(param_2 + 1,1); if (pvVar1 != (void *)0x0) { for (lVar2 = 0; param_2 != lVar2; lVar2 = lVar2 + 1) { cVar3 = *(char *)(param_1 + lVar2); if (cVar3 == '\\') { cVar3 = '/'; } else if (cVar3 == '\0') { return; } *(char *)((long)pvVar1 + lVar2) = cVar3; } } return; }
61,624
ggml_backend_cpu_init
monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.cpp
ggml_backend_t ggml_backend_cpu_init(void) { // initialize CPU backend now to avoid slowing the first graph computation ggml_cpu_init(); struct ggml_backend_cpu_context * ctx = new ggml_backend_cpu_context; if (ctx == NULL) { return NULL; } ctx->n_threads = GGML_DEFAULT_N_THREADS; ctx->threadpool = NULL; ctx->work_data = NULL; ctx->work_size = 0; ctx->abort_callback = NULL; ctx->abort_callback_data = NULL; ggml_backend_t cpu_backend = new ggml_backend { /* .guid = */ ggml_backend_cpu_guid(), /* .interface = */ ggml_backend_cpu_i, /* .device = */ ggml_backend_reg_dev_get(ggml_backend_cpu_reg(), 0), /* .context = */ ctx, }; if (cpu_backend == NULL) { delete ctx; return NULL; } return cpu_backend; }
O3
cpp
ggml_backend_cpu_init: pushq %r14 pushq %rbx pushq %rax callq 0x8770 movl $0x30, %edi callq 0x85b0 movq %rax, %rbx movl $0x4, (%rax) vxorps %xmm0, %xmm0, %xmm0 vmovups %ymm0, 0x8(%rax) movq $0x0, 0x28(%rax) movl $0x80, %edi vzeroupper callq 0x85b0 movq %rax, %r14 leaq 0x3e959(%rip), %rax # 0x65630 movq %rax, (%r14) vmovups 0x3dd4e(%rip), %ymm0 # 0x64a30 vmovups %ymm0, 0x8(%r14) vmovups 0x3dd60(%rip), %ymm0 # 0x64a50 vmovups %ymm0, 0x28(%r14) vmovups 0x3dd72(%rip), %ymm0 # 0x64a70 vmovups %ymm0, 0x48(%r14) movq 0x3dd85(%rip), %rax # 0x64a90 movq %rax, 0x68(%r14) vzeroupper callq 0x8770 leaq 0x3e8e2(%rip), %rdi # 0x65600 xorl %esi, %esi callq 0x8990 movq %rax, 0x70(%r14) movq %rbx, 0x78(%r14) movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movl $0x80, %esi movq %r14, %rdi callq 0x85d0 movq %rbx, %rdi callq 0x8a00
ggml_backend_cpu_init: push r14 push rbx push rax call _ggml_cpu_init mov edi, 30h ; '0'; unsigned __int64 call __Znwm; operator new(ulong) mov rbx, rax mov dword ptr [rax], 4 vxorps xmm0, xmm0, xmm0 vmovups ymmword ptr [rax+8], ymm0 mov qword ptr [rax+28h], 0 mov edi, 80h; unsigned __int64 vzeroupper call __Znwm; operator new(ulong) mov r14, rax lea rax, _ZZL21ggml_backend_cpu_guidvE4guid; ggml_backend_cpu_guid(void)::guid mov [r14], rax vmovups ymm0, ymmword ptr cs:_ZL18ggml_backend_cpu_i; ggml_backend_cpu_i vmovups ymmword ptr [r14+8], ymm0 vmovups ymm0, ymmword ptr cs:unk_64A50 vmovups ymmword ptr [r14+28h], ymm0 vmovups ymm0, ymmword ptr cs:unk_64A70 vmovups ymmword ptr [r14+48h], ymm0 mov rax, cs:qword_64A90 mov [r14+68h], rax vzeroupper call _ggml_cpu_init lea rdi, _ZZ20ggml_backend_cpu_regE20ggml_backend_cpu_reg; ggml_backend_cpu_reg::ggml_backend_cpu_reg xor esi, esi call _ggml_backend_reg_dev_get mov [r14+70h], rax mov [r14+78h], rbx mov rax, r14 add rsp, 8 pop rbx pop r14 retn mov rbx, rax mov esi, 80h; unsigned __int64 mov rdi, r14; void * call __ZdlPvm; operator delete(void *,ulong) mov rdi, rbx call __Unwind_Resume
_QWORD * ggml_backend_cpu_init(long long a1, __m128 _XMM0) { ggml_cpu_init(a1); _RBX = operator new(0x30uLL); *(_DWORD *)_RBX = 4; __asm { vxorps xmm0, xmm0, xmm0 vmovups ymmword ptr [rax+8], ymm0 } *(_QWORD *)(_RBX + 40) = 0LL; __asm { vzeroupper } _R14 = (_QWORD *)operator new(0x80uLL); *_R14 = &ggml_backend_cpu_guid(void)::guid; __asm { vmovups ymm0, ymmword ptr cs:_ZL18ggml_backend_cpu_i; ggml_backend_cpu_i vmovups ymmword ptr [r14+8], ymm0 vmovups ymm0, ymmword ptr cs:unk_64A50 vmovups ymmword ptr [r14+28h], ymm0 vmovups ymm0, ymmword ptr cs:unk_64A70 vmovups ymmword ptr [r14+48h], ymm0 } _R14[13] = &dword_0; __asm { vzeroupper } ggml_cpu_init(128LL); _R14[14] = ggml_backend_reg_dev_get(&ggml_backend_cpu_reg::ggml_backend_cpu_reg, 0LL, *(double *)&_XMM0); _R14[15] = _RBX; return _R14; }
ggml_backend_cpu_init: PUSH R14 PUSH RBX PUSH RAX CALL 0x00108770 MOV EDI,0x30 CALL 0x001085b0 MOV RBX,RAX MOV dword ptr [RAX],0x4 VXORPS XMM0,XMM0,XMM0 VMOVUPS ymmword ptr [RAX + 0x8],YMM0 MOV qword ptr [RAX + 0x28],0x0 MOV EDI,0x80 VZEROUPPER CALL 0x001085b0 MOV R14,RAX LEA RAX,[0x165630] MOV qword ptr [R14],RAX VMOVUPS YMM0,ymmword ptr [0x00164a30] VMOVUPS ymmword ptr [R14 + 0x8],YMM0 VMOVUPS YMM0,ymmword ptr [0x00164a50] VMOVUPS ymmword ptr [R14 + 0x28],YMM0 VMOVUPS YMM0,ymmword ptr [0x00164a70] VMOVUPS ymmword ptr [R14 + 0x48],YMM0 MOV RAX,qword ptr [0x00164a90] MOV qword ptr [R14 + 0x68],RAX LAB_00126d0f: VZEROUPPER CALL 0x00108770 LEA RDI,[0x165600] XOR ESI,ESI CALL 0x00108990 LAB_00126d25: MOV qword ptr [R14 + 0x70],RAX MOV qword ptr [R14 + 0x78],RBX MOV RAX,R14 ADD RSP,0x8 POP RBX POP R14 RET
int8 * ggml_backend_cpu_init(void) { int8 uVar1; int8 uVar2; int4 *puVar3; int8 *puVar4; int8 uVar5; ggml_cpu_init(); puVar3 = (int4 *)operator_new(0x30); *puVar3 = 4; *(int8 *)(puVar3 + 2) = 0; *(int8 *)(puVar3 + 4) = 0; *(int8 *)(puVar3 + 6) = 0; *(int8 *)(puVar3 + 8) = 0; *(int8 *)(puVar3 + 10) = 0; puVar4 = (int8 *)operator_new(0x80); *puVar4 = ggml_backend_cpu_guid()::guid; uVar2 = ggml_backend_cpu_i._24_8_; uVar1 = ggml_backend_cpu_i._16_8_; uVar5 = ggml_backend_cpu_i._8_8_; puVar4[1] = ggml_backend_cpu_i._0_8_; puVar4[2] = uVar5; puVar4[3] = uVar1; puVar4[4] = uVar2; uVar2 = ggml_backend_cpu_i._56_8_; uVar1 = ggml_backend_cpu_i._48_8_; uVar5 = ggml_backend_cpu_i._40_8_; puVar4[5] = ggml_backend_cpu_i._32_8_; puVar4[6] = uVar5; puVar4[7] = uVar1; puVar4[8] = uVar2; uVar2 = ggml_backend_cpu_i._88_8_; uVar1 = ggml_backend_cpu_i._80_8_; uVar5 = ggml_backend_cpu_i._72_8_; puVar4[9] = ggml_backend_cpu_i._64_8_; puVar4[10] = uVar5; puVar4[0xb] = uVar1; puVar4[0xc] = uVar2; puVar4[0xd] = ggml_backend_cpu_i._96_8_; /* try { // try from 00126d0f to 00126d24 has its CatchHandler @ 00126d38 */ ggml_cpu_init(); uVar5 = ggml_backend_reg_dev_get(ggml_backend_cpu_reg::ggml_backend_cpu_reg,0); puVar4[0xe] = uVar5; puVar4[0xf] = puVar3; return puVar4; }
61,625
minja::IfExpr::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 { if (!condition) throw std::runtime_error("IfExpr.condition is null"); if (!then_expr) throw std::runtime_error("IfExpr.then_expr is null"); if (condition->evaluate(context).to_bool()) { return then_expr->evaluate(context); } if (else_expr) { return else_expr->evaluate(context); } return nullptr; }
O3
cpp
minja::IfExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x50, %rsp movq %rsi, %r15 movq 0x20(%rsi), %rsi testq %rsi, %rsi je 0x59343 cmpq $0x0, 0x30(%r15) je 0x59361 movq %rdx, %r14 movq %rdi, %rbx movq %rsp, %r12 movq %r12, %rdi callq 0x3d5f2 movq %r12, %rdi callq 0x3d7f0 movl %eax, %ebp leaq 0x40(%rsp), %r12 movq %r12, %rdi xorl %esi, %esi callq 0x3d970 movq %r12, %rdi callq 0x4a5c0 movq -0x8(%r12), %rdi testq %rdi, %rdi je 0x59282 callq 0x2f80e movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x59291 callq 0x2f80e movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x592a0 callq 0x2f80e movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x592d6 movq 0x96cef(%rip), %rax # 0xeffa0 cmpb $0x0, (%rax) je 0x592c1 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x592cb movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x592d6 movq (%rdi), %rax callq *0x18(%rax) testb %bpl, %bpl je 0x592e1 movq 0x30(%r15), %rsi jmp 0x592ea movq 0x40(%r15), %rsi testq %rsi, %rsi je 0x59305 movq %rbx, %rdi movq %r14, %rdx callq 0x3d5f2 movq %rbx, %rax addq $0x50, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x40(%rbx), %r14 movq $0x0, 0x48(%rbx) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movups %xmm0, 0x10(%rbx) movups %xmm0, 0x20(%rbx) movups %xmm0, 0x30(%rbx) movb $0x0, 0x40(%rbx) movq %r14, %rdi movl $0x1, %esi callq 0x3d970 movq %r14, %rdi movl $0x1, %esi callq 0x3d970 jmp 0x592f5 movl $0x10, %edi callq 0x18360 movq %rax, %r14 leaq 0x6218f(%rip), %rsi # 0xbb4e6 movq %rax, %rdi callq 0x18270 jmp 0x5937d movl $0x10, %edi callq 0x18360 movq %rax, %r14 leaq 0x6218a(%rip), %rsi # 0xbb4ff movq %rax, %rdi callq 0x18270 movq 0x96c6c(%rip), %rsi # 0xefff0 movq 0x96bf5(%rip), %rdx # 0xeff80 movq %r14, %rdi callq 0x18b30 jmp 0x59395 movq %rax, %rbx movq %r14, %rdi callq 0x18500 jmp 0x593ad movq %rax, %rbx movq %rsp, %rdi callq 0x3d8e4 movq %rbx, %rdi callq 0x18b90 nop
_ZNK5minja6IfExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE: push rbp push r15 push r14 push r12 push rbx sub rsp, 50h mov r15, rsi mov rsi, [rsi+20h] test rsi, rsi jz loc_59343 cmp qword ptr [r15+30h], 0 jz loc_59361 mov r14, rdx mov rbx, rdi mov r12, rsp mov rdi, r12 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov rdi, r12; this call _ZNK5minja5Value7to_boolEv; minja::Value::to_bool(void) mov ebp, eax lea r12, [rsp+78h+var_38] 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, [r12-8] test rdi, rdi jz short loc_59282 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_59282: mov rdi, [rsp+78h+var_50] test rdi, rdi jz short loc_59291 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_59291: mov rdi, [rsp+78h+var_60] test rdi, rdi jz short loc_592A0 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_592A0: mov rdi, [rsp+78h+var_70] test rdi, rdi jz short loc_592D6 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_592C1 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_592CB loc_592C1: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_592CB: cmp eax, 1 jnz short loc_592D6 mov rax, [rdi] call qword ptr [rax+18h] loc_592D6: test bpl, bpl jz short loc_592E1 mov rsi, [r15+30h] jmp short loc_592EA loc_592E1: mov rsi, [r15+40h] test rsi, rsi jz short loc_59305 loc_592EA: mov rdi, rbx mov rdx, r14 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) loc_592F5: mov rax, rbx add rsp, 50h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_59305: lea r14, [rbx+40h] mov qword ptr [rbx+48h], 0 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 mov byte ptr [rbx+40h], 0 mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) jmp short loc_592F5 loc_59343: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aIfexprConditio; "IfExpr.condition is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_5937D loc_59361: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aIfexprThenExpr; "IfExpr.then_expr is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_5937D: mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short $+2 loc_59395: mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_593AD mov rbx, rax mov rdi, rsp; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_593AD: mov rdi, rbx call __Unwind_Resume
long long minja::IfExpr::do_evaluate(long long a1, _QWORD *a2) { void (***v3)(void); // rsi char v5; // bp long long v6; // rdi signed __int32 v7; // eax void (***v8)(void); // rsi std::runtime_error *exception; // r14 long long v11; // [rsp+0h] [rbp-78h] BYREF long long v12; // [rsp+8h] [rbp-70h] volatile signed __int32 *v13; // [rsp+18h] [rbp-60h] volatile signed __int32 *v14; // [rsp+28h] [rbp-50h] volatile signed __int32 *v15; // [rsp+38h] [rbp-40h] void **v16[7]; // [rsp+40h] [rbp-38h] BYREF v3 = (void (***)(void))a2[4]; if ( !v3 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "IfExpr.condition is null"); goto LABEL_23; } if ( !a2[6] ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "IfExpr.then_expr is null"); LABEL_23: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)&v11, v3); v5 = minja::Value::to_bool((minja::Value *)&v11); 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 *)v16); 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(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); if ( v13 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v13); v6 = v12; if ( v12 ) { if ( _libc_single_threaded ) { v7 = *(_DWORD *)(v12 + 12); *(_DWORD *)(v12 + 12) = v7 - 1; } else { v7 = _InterlockedExchangeAdd((volatile signed __int32 *)(v12 + 12), 0xFFFFFFFF); } if ( v7 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v6 + 24LL))(v6, 0LL); } if ( v5 ) { v8 = (void (***)(void))a2[6]; } else { v8 = (void (***)(void))a2[8]; if ( !v8 ) { *(_QWORD *)(a1 + 72) = 0LL; *(_OWORD *)a1 = 0LL; *(_OWORD *)(a1 + 16) = 0LL; *(_OWORD *)(a1 + 32) = 0LL; *(_OWORD *)(a1 + 48) = 0LL; *(_BYTE *)(a1 + 64) = 0; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a1 + 64)); 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 + 64)); return a1; } } minja::Expression::evaluate(a1, v8); return a1; }
do_evaluate: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x50 MOV R15,RSI MOV RSI,qword ptr [RSI + 0x20] TEST RSI,RSI JZ 0x00159343 CMP qword ptr [R15 + 0x30],0x0 JZ 0x00159361 MOV R14,RDX MOV RBX,RDI MOV R12,RSP MOV RDI,R12 CALL 0x0013d5f2 LAB_00159252: MOV RDI,R12 CALL 0x0013d7f0 LAB_0015925a: MOV EBP,EAX LEA R12,[RSP + 0x40] MOV RDI,R12 XOR ESI,ESI CALL 0x0013d970 MOV RDI,R12 CALL 0x0014a5c0 MOV RDI,qword ptr [R12 + -0x8] TEST RDI,RDI JZ 0x00159282 CALL 0x0012f80e LAB_00159282: MOV RDI,qword ptr [RSP + 0x28] TEST RDI,RDI JZ 0x00159291 CALL 0x0012f80e LAB_00159291: MOV RDI,qword ptr [RSP + 0x18] TEST RDI,RDI JZ 0x001592a0 CALL 0x0012f80e LAB_001592a0: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x001592d6 MOV RAX,qword ptr [0x001effa0] CMP byte ptr [RAX],0x0 JZ 0x001592c1 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001592cb LAB_001592c1: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001592cb: CMP EAX,0x1 JNZ 0x001592d6 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001592d6: TEST BPL,BPL JZ 0x001592e1 MOV RSI,qword ptr [R15 + 0x30] JMP 0x001592ea LAB_001592e1: MOV RSI,qword ptr [R15 + 0x40] TEST RSI,RSI JZ 0x00159305 LAB_001592ea: MOV RDI,RBX MOV RDX,R14 CALL 0x0013d5f2 LAB_001592f5: MOV RAX,RBX ADD RSP,0x50 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00159305: LEA R14,[RBX + 0x40] MOV qword ptr [RBX + 0x48],0x0 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 MOV byte ptr [RBX + 0x40],0x0 MOV RDI,R14 MOV ESI,0x1 CALL 0x0013d970 MOV RDI,R14 MOV ESI,0x1 CALL 0x0013d970 JMP 0x001592f5 LAB_00159343: MOV EDI,0x10 CALL 0x00118360 MOV R14,RAX LAB_00159350: LEA RSI,[0x1bb4e6] MOV RDI,RAX CALL 0x00118270 LAB_0015935f: JMP 0x0015937d LAB_00159361: MOV EDI,0x10 CALL 0x00118360 MOV R14,RAX LAB_0015936e: LEA RSI,[0x1bb4ff] MOV RDI,RAX CALL 0x00118270 LAB_0015937d: MOV RSI,qword ptr [0x001efff0] MOV RDX,qword ptr [0x001eff80] MOV RDI,R14 CALL 0x00118b30
/* minja::IfExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */ IfExpr * __thiscall minja::IfExpr::do_evaluate(IfExpr *this,shared_ptr *param_1) { int *piVar1; char cVar2; int iVar3; runtime_error *this_00; shared_ptr *psVar4; bool bVar5; Expression aEStack_78 [8]; long *local_70; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_60; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_50; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40; data local_38 [16]; if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) { this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00159350 to 0015935e has its CatchHandler @ 00159395 */ std::runtime_error::runtime_error(this_00,"IfExpr.condition is null"); } else { if (*(long *)(param_1 + 0x30) != 0) { Expression::evaluate(aEStack_78,*(shared_ptr **)(param_1 + 0x20)); /* try { // try from 00159252 to 00159259 has its CatchHandler @ 001593a2 */ cVar2 = minja::Value::to_bool((Value *)aEStack_78); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_38,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_38); if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40); } if (local_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_50); } if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_60); } if (local_70 != (long *)0x0) { if (*PTR___libc_single_threaded_001effa0 == '\0') { LOCK(); piVar1 = (int *)((long)local_70 + 0xc); iVar3 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar3 = *(int *)((long)local_70 + 0xc); *(int *)((long)local_70 + 0xc) = iVar3 + -1; } if (iVar3 == 1) { (**(code **)(*local_70 + 0x18))(); } } if (cVar2 == '\0') { psVar4 = *(shared_ptr **)(param_1 + 0x40); if (psVar4 == (shared_ptr *)0x0) { bVar5 = (bool)((char)this + '@'); *(int8 *)(this + 0x48) = 0; *(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; this[0x40] = (IfExpr)0x0; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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(bVar5); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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(bVar5); return this; } } else { psVar4 = *(shared_ptr **)(param_1 + 0x30); } Expression::evaluate((Expression *)this,psVar4); return this; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0015936e to 0015937c has its CatchHandler @ 00159393 */ std::runtime_error::runtime_error(this_00,"IfExpr.then_expr is null"); } /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_001efff0,PTR__runtime_error_001eff80); }
61,626
translog_free_link
eloqsql/storage/maria/ma_loghandler.c
static void translog_free_link(PAGECACHE_BLOCK_LINK *direct_link) { DBUG_ENTER("translog_free_link"); DBUG_PRINT("info", ("Direct link: %p", direct_link)); if (direct_link) pagecache_unlock_by_link(log_descriptor.pagecache, direct_link, PAGECACHE_LOCK_READ_UNLOCK, PAGECACHE_UNPIN, LSN_IMPOSSIBLE, LSN_IMPOSSIBLE, 0, FALSE); DBUG_VOID_RETURN; }
O3
c
translog_free_link: testq %rdi, %rdi je 0x4c03f pushq %rbp movq %rsp, %rbp movq %rdi, %rsi movq 0x3b279f(%rip), %rdi # 0x3fe7c0 xorl %eax, %eax movl $0x5, %edx movl $0x3, %ecx xorl %r8d, %r8d xorl %r9d, %r9d pushq %rax pushq %rax callq 0x3232d addq $0x10, %rsp popq %rbp retq
translog_free_link: test rdi, rdi jz short locret_4C03F push rbp mov rbp, rsp mov rsi, rdi mov rdi, cs:log_descriptor xor eax, eax mov edx, 5 mov ecx, 3 xor r8d, r8d xor r9d, r9d push rax push rax call pagecache_unlock_by_link add rsp, 10h pop rbp locret_4C03F: retn
long long translog_free_link(long long a1) { long long result; // rax if ( a1 ) return pagecache_unlock_by_link(log_descriptor[0], a1, 5, 3, 0LL, 0LL, 0); return result; }
translog_free_link: TEST RDI,RDI JZ 0x0014c03f PUSH RBP MOV RBP,RSP MOV RSI,RDI MOV RDI,qword ptr [0x004fe7c0] XOR EAX,EAX MOV EDX,0x5 MOV ECX,0x3 XOR R8D,R8D XOR R9D,R9D PUSH RAX PUSH RAX CALL 0x0013232d ADD RSP,0x10 POP RBP LAB_0014c03f: RET
void translog_free_link(long param_1) { if (param_1 != 0) { pagecache_unlock_by_link(log_descriptor,param_1,5,3,0,0,0,0); } return; }
61,627
mysql_close_slow_part
eloqsql/libmariadb/libmariadb/mariadb_lib.c
void mysql_close_slow_part(MYSQL *mysql) { if (mysql->net.pvio) { free_old_query(mysql); mysql->status=MYSQL_STATUS_READY; /* Force command */ mysql->options.reconnect=0; if (mysql->net.pvio && mysql->net.buff) ma_simple_command(mysql, COM_QUIT,NullS,0,1,0); end_server(mysql); } /* there is an ongoing async operation */ else if (mysql->options.extension && mysql->options.extension->async_context) { if (mysql->options.extension->async_context->pending_gai_res) { freeaddrinfo(mysql->options.extension->async_context->pending_gai_res); mysql->options.extension->async_context->pending_gai_res = 0; } if (mysql->options.extension->async_context->pvio) { ma_pvio_close(mysql->options.extension->async_context->pvio); mysql->options.extension->async_context->pvio = 0; } } }
O3
c
mysql_close_slow_part: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx cmpq $0x0, (%rdi) je 0x21829 movq %rbx, %rdi callq 0x21892 movl $0x0, 0x488(%rbx) movb $0x0, 0x43b(%rbx) cmpq $0x0, (%rbx) je 0x2181b cmpq $0x0, 0x8(%rbx) je 0x2181b movq 0x4d0(%rbx), %rax movq %rbx, %rdi movl $0x1, %esi xorl %edx, %edx xorl %ecx, %ecx movl $0x1, %r8d xorl %r9d, %r9d callq *0x10(%rax) movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %rbp jmp 0x1cba2 movq 0x480(%rbx), %rax testq %rax, %rax je 0x2188b movq 0x28(%rax), %rax testq %rax, %rax je 0x2188b movq 0x30(%rax), %rdi testq %rdi, %rdi je 0x2186a callq 0x177a0 movq 0x480(%rbx), %rax movq 0x28(%rax), %rax movq $0x0, 0x30(%rax) movq 0x480(%rbx), %rax movq 0x28(%rax), %rax movq 0x18(%rax), %rdi testq %rdi, %rdi je 0x2188b callq 0x24a8f movq 0x480(%rbx), %rax movq 0x28(%rax), %rax movq $0x0, 0x18(%rax) addq $0x8, %rsp popq %rbx popq %rbp retq
mysql_close_slow_part: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi cmp qword ptr [rdi], 0 jz short loc_21829 mov rdi, rbx call free_old_query mov dword ptr [rbx+488h], 0 mov byte ptr [rbx+43Bh], 0 cmp qword ptr [rbx], 0 jz short loc_2181B cmp qword ptr [rbx+8], 0 jz short loc_2181B mov rax, [rbx+4D0h] mov rdi, rbx mov esi, 1 xor edx, edx xor ecx, ecx mov r8d, 1 xor r9d, r9d call qword ptr [rax+10h] loc_2181B: mov rdi, rbx add rsp, 8 pop rbx pop rbp jmp end_server loc_21829: mov rax, [rbx+480h] test rax, rax jz short loc_2188B mov rax, [rax+28h] test rax, rax jz short loc_2188B mov rdi, [rax+30h] test rdi, rdi jz short loc_2186A call _freeaddrinfo mov rax, [rbx+480h] mov rax, [rax+28h] mov qword ptr [rax+30h], 0 mov rax, [rbx+480h] mov rax, [rax+28h] loc_2186A: mov rdi, [rax+18h] test rdi, rdi jz short loc_2188B call ma_pvio_close mov rax, [rbx+480h] mov rax, [rax+28h] mov qword ptr [rax+18h], 0 loc_2188B: add rsp, 8 pop rbx pop rbp retn
_QWORD * mysql_close_slow_part(long long a1) { long long v1; // rax _QWORD *result; // rax long long v4; // rdi long long v5; // rdi long long v6; // [rsp-8h] [rbp-10h] v6 = v1; if ( *(_QWORD *)a1 ) { free_old_query(a1); *(_DWORD *)(a1 + 1160) = 0; *(_BYTE *)(a1 + 1083) = 0; if ( *(_QWORD *)a1 ) { if ( *(_QWORD *)(a1 + 8) ) (*(void ( **)(long long, long long, _QWORD, _QWORD, long long, _QWORD, long long))(*(_QWORD *)(a1 + 1232) + 16LL))( a1, 1LL, 0LL, 0LL, 1LL, 0LL, v6); } return (_QWORD *)end_server((long long *)a1); } else { result = *(_QWORD **)(a1 + 1152); if ( result ) { result = (_QWORD *)result[5]; if ( result ) { v4 = result[6]; if ( v4 ) { freeaddrinfo(v4); *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 40LL) + 48LL) = 0LL; result = *(_QWORD **)(*(_QWORD *)(a1 + 1152) + 40LL); } v5 = result[3]; if ( v5 ) { ma_pvio_close(v5); result = *(_QWORD **)(*(_QWORD *)(a1 + 1152) + 40LL); result[3] = 0LL; } } } } return result; }
mysql_close_slow_part: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI CMP qword ptr [RDI],0x0 JZ 0x00121829 MOV RDI,RBX CALL 0x00121892 MOV dword ptr [RBX + 0x488],0x0 MOV byte ptr [RBX + 0x43b],0x0 CMP qword ptr [RBX],0x0 JZ 0x0012181b CMP qword ptr [RBX + 0x8],0x0 JZ 0x0012181b MOV RAX,qword ptr [RBX + 0x4d0] MOV RDI,RBX MOV ESI,0x1 XOR EDX,EDX XOR ECX,ECX MOV R8D,0x1 XOR R9D,R9D CALL qword ptr [RAX + 0x10] LAB_0012181b: MOV RDI,RBX ADD RSP,0x8 POP RBX POP RBP JMP 0x0011cba2 LAB_00121829: MOV RAX,qword ptr [RBX + 0x480] TEST RAX,RAX JZ 0x0012188b MOV RAX,qword ptr [RAX + 0x28] TEST RAX,RAX JZ 0x0012188b MOV RDI,qword ptr [RAX + 0x30] TEST RDI,RDI JZ 0x0012186a CALL 0x001177a0 MOV RAX,qword ptr [RBX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RAX + 0x30],0x0 MOV RAX,qword ptr [RBX + 0x480] MOV RAX,qword ptr [RAX + 0x28] LAB_0012186a: MOV RDI,qword ptr [RAX + 0x18] TEST RDI,RDI JZ 0x0012188b CALL 0x00124a8f MOV RAX,qword ptr [RBX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RAX + 0x18],0x0 LAB_0012188b: ADD RSP,0x8 POP RBX POP RBP RET
void mysql_close_slow_part(long *param_1) { long lVar1; if (*param_1 != 0) { free_old_query(param_1); *(int4 *)(param_1 + 0x91) = 0; *(int1 *)((long)param_1 + 0x43b) = 0; if ((*param_1 != 0) && (param_1[1] != 0)) { (**(code **)(param_1[0x9a] + 0x10))(param_1,1,0,0,1,0); } end_server(param_1); return; } if ((param_1[0x90] != 0) && (lVar1 = *(long *)(param_1[0x90] + 0x28), lVar1 != 0)) { if (*(addrinfo **)(lVar1 + 0x30) != (addrinfo *)0x0) { freeaddrinfo(*(addrinfo **)(lVar1 + 0x30)); *(int8 *)(*(long *)(param_1[0x90] + 0x28) + 0x30) = 0; lVar1 = *(long *)(param_1[0x90] + 0x28); } if (*(long *)(lVar1 + 0x18) != 0) { ma_pvio_close(); *(int8 *)(*(long *)(param_1[0x90] + 0x28) + 0x18) = 0; } } return; }
61,628
write_header
eloqsql/client/mysqldump.c
static void write_header(FILE *sql_file, const char *db_name) { if (opt_xml) { fputs("<?xml version=\"1.0\"?>\n", sql_file); /* Schema reference. Allows use of xsi:nil for NULL values and xsi:type to define an element's data type. */ fputs("<mysqldump ", sql_file); fputs("xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"", sql_file); fputs(">\n", sql_file); check_io(sql_file); } else if (!opt_compact) { print_comment(sql_file, 0, "-- MariaDB dump %s Distrib %s, for %s (%s)\n--\n", DUMP_VERSION, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE); print_comment(sql_file, 0, "-- Host: %s ", fix_for_comment(current_host ? current_host : "localhost")); print_comment(sql_file, 0, "Database: %s\n", fix_for_comment(db_name ? db_name : "")); print_comment(sql_file, 0, "-- ------------------------------------------------------\n" ); print_comment(sql_file, 0, "-- Server version\t%s\n", mysql_get_server_info(&mysql_connection)); if (!opt_logging) fprintf(sql_file, "\n/*M!100101 SET LOCAL SQL_LOG_OFF=0, LOCAL SLOW_QUERY_LOG=0 */;"); if (opt_set_charset) fprintf(sql_file, "\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;" "\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;" "\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;" "\n/*!40101 SET NAMES %s */;\n",default_charset); if (opt_tz_utc) { fprintf(sql_file, "/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n"); fprintf(sql_file, "/*!40103 SET TIME_ZONE='+00:00' */;\n"); } if (!path) { if (!opt_no_create_info) { /* We don't need unique checks as the table is created just before */ fprintf(md_result_file,"\ /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n"); } fprintf(md_result_file,"\ /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n\ "); } fprintf(sql_file, "/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='%s%s%s' */;\n" "/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n", path?"":"NO_AUTO_VALUE_ON_ZERO",compatible_mode_normal_str[0]==0?"":",", compatible_mode_normal_str); check_io(sql_file); } }
O0
c
write_header: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) cmpb $0x0, 0x3c6ad1(%rip) # 0x4015e8 je 0x3ab67 movq -0x8(%rbp), %rsi leaq 0xa0963(%rip), %rdi # 0xdb487 callq 0x38340 movq -0x8(%rbp), %rsi leaq 0xa096a(%rip), %rdi # 0xdb49e callq 0x38340 movq -0x8(%rbp), %rsi leaq 0xa0966(%rip), %rdi # 0xdb4aa callq 0x38340 movq -0x8(%rbp), %rsi leaq 0xa0cd2(%rip), %rdi # 0xdb826 callq 0x38340 movq -0x8(%rbp), %rdi callq 0x38d60 jmp 0x3ad7d cmpb $0x0, 0x3c6cc2(%rip) # 0x401830 jne 0x3ad7b movq -0x8(%rbp), %rdi xorl %esi, %esi leaq 0xa095f(%rip), %rdx # 0xdb4e0 leaq 0xa0677(%rip), %rcx # 0xdb1ff leaq 0xa0676(%rip), %r8 # 0xdb205 leaq 0xa067f(%rip), %r9 # 0xdb215 leaq 0xa067e(%rip), %rax # 0xdb21b movq %rax, (%rsp) movb $0x0, %al callq 0x3dca0 movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) cmpq $0x0, 0x3c6a40(%rip) # 0x4015f8 je 0x3abc7 movq 0x3c6a37(%rip), %rax # 0x4015f8 movq %rax, -0x20(%rbp) jmp 0x3abd4 leaq 0xa0787(%rip), %rax # 0xdb355 movq %rax, -0x20(%rbp) jmp 0x3abd4 movq -0x20(%rbp), %rdi callq 0x3ddb0 movq -0x18(%rbp), %rdi movq %rax, %rcx xorl %esi, %esi leaq 0xa0923(%rip), %rdx # 0xdb510 movb $0x0, %al callq 0x3dca0 movq -0x8(%rbp), %rax movq %rax, -0x28(%rbp) cmpq $0x0, -0x10(%rbp) je 0x3ac0d movq -0x10(%rbp), %rax movq %rax, -0x30(%rbp) jmp 0x3ac1a leaq 0xa1f38(%rip), %rax # 0xdcb4c movq %rax, -0x30(%rbp) jmp 0x3ac1a movq -0x30(%rbp), %rdi callq 0x3ddb0 movq -0x28(%rbp), %rdi movq %rax, %rcx xorl %esi, %esi leaq 0xa08ed(%rip), %rdx # 0xdb520 movb $0x0, %al callq 0x3dca0 movq -0x8(%rbp), %rdi xorl %esi, %esi leaq 0xa08e7(%rip), %rdx # 0xdb52e movb $0x0, %al callq 0x3dca0 movq -0x8(%rbp), %rax movq %rax, -0x38(%rbp) leaq 0x3c6d33(%rip), %rdi # 0x401990 callq 0x52390 movq -0x38(%rbp), %rdi movq %rax, %rcx xorl %esi, %esi leaq 0xa08f7(%rip), %rdx # 0xdb569 movb $0x0, %al callq 0x3dca0 cmpb $0x0, 0x3c6bb8(%rip) # 0x401838 jne 0x3ac94 movq -0x8(%rbp), %rdi leaq 0xa08f2(%rip), %rsi # 0xdb57f movb $0x0, %al callq 0x381d0 cmpb $0x0, 0x3c6bab(%rip) # 0x401846 je 0x3acb6 movq -0x8(%rbp), %rdi movq 0x3c6938(%rip), %rdx # 0x4015e0 leaq 0xa0910(%rip), %rsi # 0xdb5bf movb $0x0, %al callq 0x381d0 cmpb $0x0, 0x20cedb(%rip) # 0x247b98 je 0x3ace3 movq -0x8(%rbp), %rdi leaq 0xa09d9(%rip), %rsi # 0xdb6a3 movb $0x0, %al callq 0x381d0 movq -0x8(%rbp), %rdi leaq 0xa09f4(%rip), %rsi # 0xdb6d0 movb $0x0, %al callq 0x381d0 cmpq $0x0, 0x3c6925(%rip) # 0x401610 jne 0x3ad20 cmpb $0x0, 0x3c6b47(%rip) # 0x40183b jne 0x3ad0b movq 0x3c67b3(%rip), %rdi # 0x4014b0 leaq 0xa09f1(%rip), %rsi # 0xdb6f5 movb $0x0, %al callq 0x381d0 movq 0x3c679e(%rip), %rdi # 0x4014b0 leaq 0xa0a22(%rip), %rsi # 0xdb73b movb $0x0, %al callq 0x381d0 movq -0x8(%rbp), %rdi movq 0x3c68e5(%rip), %rcx # 0x401610 leaq 0xa0ad5(%rip), %rdx # 0xdb807 leaq 0xa1e13(%rip), %rax # 0xdcb4c cmpq $0x0, %rcx cmovneq %rax, %rdx movsbl 0x3c6798(%rip), %esi # 0x4014e0 leaq 0xa355c(%rip), %rcx # 0xde2ab leaq 0xa1df6(%rip), %rax # 0xdcb4c cmpl $0x0, %esi cmoveq %rax, %rcx leaq 0xa0a2c(%rip), %rsi # 0xdb790 leaq 0x3c6775(%rip), %r8 # 0x4014e0 movb $0x0, %al callq 0x381d0 movq -0x8(%rbp), %rdi callq 0x38d60 jmp 0x3ad7d addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
write_header: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi cmp cs:opt_xml, 0 jz short loc_3AB67 mov rsi, [rbp+var_8] lea rdi, aXmlVersion10; "<?xml version=\"1.0\"?>\n" call _fputs mov rsi, [rbp+var_8] lea rdi, aMysqldump_0; "<mysqldump " call _fputs mov rsi, [rbp+var_8] lea rdi, aXmlnsXsiHttpWw; "xmlns:xsi=\"http://www.w3.org/2001/XMLS"... call _fputs mov rsi, [rbp+var_8] lea rdi, asc_DB823+3; ">\n" call _fputs mov rdi, [rbp+var_8] call check_io jmp loc_3AD7D loc_3AB67: cmp cs:opt_compact, 0 jnz loc_3AD7B mov rdi, [rbp+var_8] xor esi, esi lea rdx, aMariadbDumpSDi; "-- MariaDB dump %s Distrib %s, for %s "... lea rcx, a1019; "10.19" lea r8, a10610Mariadb; "10.6.10-MariaDB" lea r9, aLinux; "Linux" lea rax, aX8664; "x86_64" mov [rsp+40h+var_40], rax mov al, 0 call print_comment mov rax, [rbp+var_8] mov [rbp+var_18], rax cmp cs:current_host, 0 jz short loc_3ABC7 mov rax, cs:current_host mov [rbp+var_20], rax jmp short loc_3ABD4 loc_3ABC7: lea rax, aLocalhost; "localhost" mov [rbp+var_20], rax jmp short $+2 loc_3ABD4: mov rdi, [rbp+var_20] call fix_for_comment mov rdi, [rbp+var_18] mov rcx, rax xor esi, esi lea rdx, aHostS; "-- Host: %s " mov al, 0 call print_comment mov rax, [rbp+var_8] mov [rbp+var_28], rax cmp [rbp+var_10], 0 jz short loc_3AC0D mov rax, [rbp+var_10] mov [rbp+var_30], rax jmp short loc_3AC1A loc_3AC0D: lea rax, asc_DCB4A+2; "" mov [rbp+var_30], rax jmp short $+2 loc_3AC1A: mov rdi, [rbp+var_30] call fix_for_comment mov rdi, [rbp+var_28] mov rcx, rax xor esi, esi lea rdx, aDatabaseS; "Database: %s\n" mov al, 0 call print_comment mov rdi, [rbp+var_8] xor esi, esi lea rdx, asc_DB52E; "-- ------------------------------------"... mov al, 0 call print_comment mov rax, [rbp+var_8] mov [rbp+var_38], rax lea rdi, mysql_connection call mysql_get_server_info mov rdi, [rbp+var_38] mov rcx, rax xor esi, esi lea rdx, aServerVersionS; "-- Server version\t%s\n" mov al, 0 call print_comment cmp cs:opt_logging, 0 jnz short loc_3AC94 mov rdi, [rbp+var_8] lea rsi, aM100101SetLoca; "\n/*M!100101 SET LOCAL SQL_LOG_OFF=0, L"... mov al, 0 call _fprintf loc_3AC94: cmp cs:opt_set_charset, 0 jz short loc_3ACB6 mov rdi, [rbp+var_8] mov rdx, cs:default_charset lea rsi, a40101SetOldCha; "\n/*!40101 SET @OLD_CHARACTER_SET_CLIEN"... mov al, 0 call _fprintf loc_3ACB6: cmp cs:opt_tz_utc, 0 jz short loc_3ACE3 mov rdi, [rbp+var_8] lea rsi, a40103SetOldTim; "/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE"... mov al, 0 call _fprintf mov rdi, [rbp+var_8] lea rsi, a40103SetTimeZo_0; "/*!40103 SET TIME_ZONE='+00:00' */;\n" mov al, 0 call _fprintf loc_3ACE3: cmp cs:path, 0 jnz short loc_3AD20 cmp cs:opt_no_create_info, 0 jnz short loc_3AD0B mov rdi, cs:md_result_file lea rsi, a40014SetOldUni; "/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQU"... mov al, 0 call _fprintf loc_3AD0B: mov rdi, cs:md_result_file lea rsi, a40014SetOldFor; "/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@"... mov al, 0 call _fprintf loc_3AD20: mov rdi, [rbp+var_8] mov rcx, cs:path lea rdx, aNoAutoValueOnZ; "NO_AUTO_VALUE_ON_ZERO" lea rax, asc_DCB4A+2; "" cmp rcx, 0 cmovnz rdx, rax movsx esi, cs:compatible_mode_normal_str lea rcx, asc_DE2AA+1; "," lea rax, asc_DCB4A+2; "" cmp esi, 0 cmovz rcx, rax lea rsi, a40101SetOldSql; "/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, "... lea r8, compatible_mode_normal_str mov al, 0 call _fprintf mov rdi, [rbp+var_8] call check_io loc_3AD7B: jmp short $+2 loc_3AD7D: add rsp, 40h pop rbp retn
void write_header(long long a1, long long a2) { int v2; // eax int v3; // r8d int v4; // r9d int v5; // eax int v6; // r8d int v7; // r9d int v8; // ecx int v9; // r8d int v10; // r9d int server_info; // eax int v12; // r8d int v13; // r9d const char *v14; // rdx const char *v15; // rcx char v16; // [rsp+0h] [rbp-40h] char v17; // [rsp+0h] [rbp-40h] char v18; // [rsp+0h] [rbp-40h] char v19; // [rsp+0h] [rbp-40h] if ( opt_xml ) { fputs("<?xml version=\"1.0\"?>\n", a1); fputs("<mysqldump ", a1); fputs("xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"", a1); fputs(">\n", a1); check_io(a1); } else if ( !opt_compact ) { print_comment( a1, 0, (unsigned int)"-- MariaDB dump %s Distrib %s, for %s (%s)\n--\n", (unsigned int)"10.19", (unsigned int)"10.6.10-MariaDB", (unsigned int)"Linux", (char)"x86_64"); if ( current_host ) v2 = fix_for_comment(current_host); else v2 = fix_for_comment("localhost"); print_comment(a1, 0, (unsigned int)"-- Host: %s ", v2, v3, v4, v16); if ( a2 ) v5 = fix_for_comment(a2); else v5 = fix_for_comment(""); print_comment(a1, 0, (unsigned int)"Database: %s\n", v5, v6, v7, v17); print_comment(a1, 0, (unsigned int)"-- ------------------------------------------------------\n", v8, v9, v10, v18); server_info = mysql_get_server_info(&mysql_connection); print_comment(a1, 0, (unsigned int)"-- Server version\t%s\n", server_info, v12, v13, v19); if ( !opt_logging ) fprintf(a1, "\n/*M!100101 SET LOCAL SQL_LOG_OFF=0, LOCAL SLOW_QUERY_LOG=0 */;"); if ( opt_set_charset ) fprintf( a1, "\n" "/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n" "/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n" "/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n" "/*!40101 SET NAMES %s */;\n", (const char *)default_charset); if ( opt_tz_utc ) { fprintf(a1, "/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n"); fprintf(a1, "/*!40103 SET TIME_ZONE='+00:00' */;\n"); } if ( !path ) { if ( !opt_no_create_info ) fprintf(md_result_file, "/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n"); fprintf(md_result_file, "/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n"); } v14 = "NO_AUTO_VALUE_ON_ZERO"; if ( path ) v14 = ""; v15 = ","; if ( !compatible_mode_normal_str ) v15 = ""; fprintf( a1, "/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='%s%s%s' */;\n" "/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n", v14, v15, &compatible_mode_normal_str); check_io(a1); } }
write_header: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI CMP byte ptr [0x005015e8],0x0 JZ 0x0013ab67 MOV RSI,qword ptr [RBP + -0x8] LEA RDI,[0x1db487] CALL 0x00138340 MOV RSI,qword ptr [RBP + -0x8] LEA RDI,[0x1db49e] CALL 0x00138340 MOV RSI,qword ptr [RBP + -0x8] LEA RDI,[0x1db4aa] CALL 0x00138340 MOV RSI,qword ptr [RBP + -0x8] LEA RDI,[0x1db826] CALL 0x00138340 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00138d60 JMP 0x0013ad7d LAB_0013ab67: CMP byte ptr [0x00501830],0x0 JNZ 0x0013ad7b MOV RDI,qword ptr [RBP + -0x8] XOR ESI,ESI LEA RDX,[0x1db4e0] LEA RCX,[0x1db1ff] LEA R8,[0x1db205] LEA R9,[0x1db215] LEA RAX,[0x1db21b] MOV qword ptr [RSP],RAX MOV AL,0x0 CALL 0x0013dca0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [0x005015f8],0x0 JZ 0x0013abc7 MOV RAX,qword ptr [0x005015f8] MOV qword ptr [RBP + -0x20],RAX JMP 0x0013abd4 LAB_0013abc7: LEA RAX,[0x1db355] MOV qword ptr [RBP + -0x20],RAX JMP 0x0013abd4 LAB_0013abd4: MOV RDI,qword ptr [RBP + -0x20] CALL 0x0013ddb0 MOV RDI,qword ptr [RBP + -0x18] MOV RCX,RAX XOR ESI,ESI LEA RDX,[0x1db510] MOV AL,0x0 CALL 0x0013dca0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x28],RAX CMP qword ptr [RBP + -0x10],0x0 JZ 0x0013ac0d MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x30],RAX JMP 0x0013ac1a LAB_0013ac0d: LEA RAX,[0x1dcb4c] MOV qword ptr [RBP + -0x30],RAX JMP 0x0013ac1a LAB_0013ac1a: MOV RDI,qword ptr [RBP + -0x30] CALL 0x0013ddb0 MOV RDI,qword ptr [RBP + -0x28] MOV RCX,RAX XOR ESI,ESI LEA RDX,[0x1db520] MOV AL,0x0 CALL 0x0013dca0 MOV RDI,qword ptr [RBP + -0x8] XOR ESI,ESI LEA RDX,[0x1db52e] MOV AL,0x0 CALL 0x0013dca0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x38],RAX LEA RDI,[0x501990] CALL 0x00152390 MOV RDI,qword ptr [RBP + -0x38] MOV RCX,RAX XOR ESI,ESI LEA RDX,[0x1db569] MOV AL,0x0 CALL 0x0013dca0 CMP byte ptr [0x00501838],0x0 JNZ 0x0013ac94 MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x1db57f] MOV AL,0x0 CALL 0x001381d0 LAB_0013ac94: CMP byte ptr [0x00501846],0x0 JZ 0x0013acb6 MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [0x005015e0] LEA RSI,[0x1db5bf] MOV AL,0x0 CALL 0x001381d0 LAB_0013acb6: CMP byte ptr [0x00347b98],0x0 JZ 0x0013ace3 MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x1db6a3] MOV AL,0x0 CALL 0x001381d0 MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x1db6d0] MOV AL,0x0 CALL 0x001381d0 LAB_0013ace3: CMP qword ptr [0x00501610],0x0 JNZ 0x0013ad20 CMP byte ptr [0x0050183b],0x0 JNZ 0x0013ad0b MOV RDI,qword ptr [0x005014b0] LEA RSI,[0x1db6f5] MOV AL,0x0 CALL 0x001381d0 LAB_0013ad0b: MOV RDI,qword ptr [0x005014b0] LEA RSI,[0x1db73b] MOV AL,0x0 CALL 0x001381d0 LAB_0013ad20: MOV RDI,qword ptr [RBP + -0x8] MOV RCX,qword ptr [0x00501610] LEA RDX,[0x1db807] LEA RAX,[0x1dcb4c] CMP RCX,0x0 CMOVNZ RDX,RAX MOVSX ESI,byte ptr [0x005014e0] LEA RCX,[0x1de2ab] LEA RAX,[0x1dcb4c] CMP ESI,0x0 CMOVZ RCX,RAX LEA RSI,[0x1db790] LEA R8,[0x5014e0] MOV AL,0x0 CALL 0x001381d0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00138d60 LAB_0013ad7b: JMP 0x0013ad7d LAB_0013ad7d: ADD RSP,0x40 POP RBP RET
void write_header(FILE *param_1,int1 *param_2) { int8 uVar1; int1 *puVar2; char *pcVar3; int1 *local_38; char *local_28; if (opt_xml == '\0') { if (opt_compact == '\0') { print_comment(param_1,0,"-- MariaDB dump %s Distrib %s, for %s (%s)\n--\n","10.19", "10.6.10-MariaDB","Linux","x86_64"); if (current_host == (char *)0x0) { local_28 = "localhost"; } else { local_28 = current_host; } uVar1 = fix_for_comment(local_28); print_comment(param_1,0,"-- Host: %s ",uVar1); local_38 = param_2; if (param_2 == (int1 *)0x0) { local_38 = &DAT_001dcb4c; } uVar1 = fix_for_comment(local_38); print_comment(param_1,0,"Database: %s\n",uVar1); print_comment(param_1,0,"-- ------------------------------------------------------\n"); uVar1 = mysql_get_server_info(mysql_connection); print_comment(param_1,0,"-- Server version\t%s\n",uVar1); if (opt_logging == '\0') { fprintf(param_1,"\n/*M!100101 SET LOCAL SQL_LOG_OFF=0, LOCAL SLOW_QUERY_LOG=0 */;"); } if (opt_set_charset != '\0') { fprintf(param_1, "\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!40101 SET NAMES %s */;\n" ,default_charset); } if (opt_tz_utc != '\0') { fprintf(param_1,"/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n"); fprintf(param_1,"/*!40103 SET TIME_ZONE=\'+00:00\' */;\n"); } if (path == 0) { if (opt_no_create_info == '\0') { fprintf(md_result_file, "/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n"); } fprintf(md_result_file, "/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n" ); } pcVar3 = "NO_AUTO_VALUE_ON_ZERO"; if (path != 0) { pcVar3 = &DAT_001dcb4c; } puVar2 = &DAT_001de2ab; if (compatible_mode_normal_str == '\0') { puVar2 = &DAT_001dcb4c; } fprintf(param_1, "/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=\'%s%s%s\' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n" ,pcVar3,puVar2,&compatible_mode_normal_str); check_io(param_1); } } else { fputs("<?xml version=\"1.0\"?>\n",param_1); fputs("<mysqldump ",param_1); fputs("xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"",param_1); fputs(">\n",param_1); check_io(param_1); } return; }
61,629
write_header
eloqsql/client/mysqldump.c
static void write_header(FILE *sql_file, const char *db_name) { if (opt_xml) { fputs("<?xml version=\"1.0\"?>\n", sql_file); /* Schema reference. Allows use of xsi:nil for NULL values and xsi:type to define an element's data type. */ fputs("<mysqldump ", sql_file); fputs("xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"", sql_file); fputs(">\n", sql_file); check_io(sql_file); } else if (!opt_compact) { print_comment(sql_file, 0, "-- MariaDB dump %s Distrib %s, for %s (%s)\n--\n", DUMP_VERSION, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE); print_comment(sql_file, 0, "-- Host: %s ", fix_for_comment(current_host ? current_host : "localhost")); print_comment(sql_file, 0, "Database: %s\n", fix_for_comment(db_name ? db_name : "")); print_comment(sql_file, 0, "-- ------------------------------------------------------\n" ); print_comment(sql_file, 0, "-- Server version\t%s\n", mysql_get_server_info(&mysql_connection)); if (!opt_logging) fprintf(sql_file, "\n/*M!100101 SET LOCAL SQL_LOG_OFF=0, LOCAL SLOW_QUERY_LOG=0 */;"); if (opt_set_charset) fprintf(sql_file, "\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;" "\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;" "\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;" "\n/*!40101 SET NAMES %s */;\n",default_charset); if (opt_tz_utc) { fprintf(sql_file, "/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n"); fprintf(sql_file, "/*!40103 SET TIME_ZONE='+00:00' */;\n"); } if (!path) { if (!opt_no_create_info) { /* We don't need unique checks as the table is created just before */ fprintf(md_result_file,"\ /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n"); } fprintf(md_result_file,"\ /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n\ "); } fprintf(sql_file, "/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='%s%s%s' */;\n" "/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n", path?"":"NO_AUTO_VALUE_ON_ZERO",compatible_mode_normal_str[0]==0?"":",", compatible_mode_normal_str); check_io(sql_file); } }
O3
c
write_header: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx cmpb $0x1, 0x3897dc(%rip) # 0x3c45b8 jne 0x3ae1f leaq 0x656d4(%rip), %rdi # 0xa04b9 movq %rbx, %rsi callq 0x37340 leaq 0x656dc(%rip), %rdi # 0xa04d0 movq %rbx, %rsi callq 0x37340 leaq 0x656d9(%rip), %rdi # 0xa04dc movq %rbx, %rsi callq 0x37340 leaq 0x65a46(%rip), %rdi # 0xa0858 movq %rbx, %rsi callq 0x37340 jmp 0x3b0c2 cmpb $0x0, 0x3899da(%rip) # 0x3c4800 je 0x3ae35 addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq %rsi, %r14 leaq 0x6540e(%rip), %rax # 0xa024d movq %rax, (%rsp) leaq 0x656c8(%rip), %rdx # 0xa0512 leaq 0x653e0(%rip), %rcx # 0xa0231 leaq 0x653df(%rip), %r8 # 0xa0237 leaq 0x653e8(%rip), %r9 # 0xa0247 movq %rbx, %rdi xorl %esi, %esi xorl %eax, %eax callq 0x3cac7 movq 0x389756(%rip), %rcx # 0x3c45c8 testq %rcx, %rcx leaq 0x6550b(%rip), %rax # 0xa0387 cmovneq %rcx, %rax movb (%rax), %cl movb %cl, 0x38a7d8(%rip) # 0x3c5660 testb %cl, %cl je 0x3aee1 incq %rax movl $0x1, %r8d leaq 0x38a7c5(%rip), %rdi # 0x3c5661 xorl %esi, %esi leaq 0x38a7bb(%rip), %rdx # 0x3c5660 cmpq $0x3f5, %rsi # imm = 0x3F5 jge 0x3aedb cmpb $0xa, %cl jne 0x3aec0 addq $0x4, %rsi movl $0x202d2d, (%rdi) # imm = 0x202D2D movq %rsi, %r8 movq %r8, %rsi movb (%rax), %cl incq %r8 leaq (%rsi,%rdx), %rdi incq %rdi movb %cl, -0x1(%rdi) incq %rax testb %cl, %cl jne 0x3aea5 jmp 0x3aee1 movl $0x2e2e2e, (%rdi) # imm = 0x2E2E2E leaq 0x6565a(%rip), %rdx # 0xa0542 leaq 0x38a771(%rip), %r15 # 0x3c5660 movq %rbx, %rdi xorl %esi, %esi movq %r15, %rcx xorl %eax, %eax callq 0x3cac7 testq %r14, %r14 leaq 0x66c6f(%rip), %r12 # 0xa1b77 cmoveq %r12, %r14 movb (%r14), %al movb %al, 0x38a74b(%rip) # 0x3c5660 testb %al, %al je 0x3af66 incq %r14 movl $0x1, %esi leaq 0x38a739(%rip), %rdx # 0x3c5661 xorl %ecx, %ecx cmpq $0x3f5, %rcx # imm = 0x3F5 jge 0x3af60 cmpb $0xa, %al jne 0x3af44 addq $0x4, %rcx movl $0x202d2d, (%rdx) # imm = 0x202D2D movq %rcx, %rsi movq %rsi, %rcx movb (%r14), %al incq %rsi leaq (%rcx,%r15), %rdx incq %rdx movb %al, -0x1(%rdx) incq %r14 testb %al, %al jne 0x3af2a jmp 0x3af66 movl $0x2e2e2e, (%rdx) # imm = 0x2E2E2E leaq 0x655e5(%rip), %rdx # 0xa0552 leaq 0x38a6ec(%rip), %rcx # 0x3c5660 movq %rbx, %rdi xorl %esi, %esi xorl %eax, %eax callq 0x3cac7 leaq 0x655d9(%rip), %rdx # 0xa0560 movq %rbx, %rdi xorl %esi, %esi xorl %eax, %eax callq 0x3cac7 leaq 0x3899c6(%rip), %rdi # 0x3c4960 callq 0x4ab1a leaq 0x655f5(%rip), %rdx # 0xa059b movq %rbx, %rdi xorl %esi, %esi movq %rax, %rcx xorl %eax, %eax callq 0x3cac7 cmpb $0x0, 0x38984c(%rip) # 0x3c4808 jne 0x3afd4 leaq 0x655ec(%rip), %rdx # 0xa05b1 movq %rbx, %rdi movl $0x1, %esi xorl %eax, %eax callq 0x37260 cmpb $0x0, 0x38983b(%rip) # 0x3c4816 je 0x3affa movq 0x3895cc(%rip), %rcx # 0x3c45b0 leaq 0x65606(%rip), %rdx # 0xa05f1 movq %rbx, %rdi movl $0x1, %esi xorl %eax, %eax callq 0x37260 cmpb $0x0, 0x310b87(%rip) # 0x34bb88 je 0x3b02f leaq 0x656cb(%rip), %rdx # 0xa06d5 movq %rbx, %rdi movl $0x1, %esi xorl %eax, %eax callq 0x37260 leaq 0x656e2(%rip), %rdx # 0xa0702 movq %rbx, %rdi movl $0x1, %esi xorl %eax, %eax callq 0x37260 cmpq $0x0, 0x3895a9(%rip) # 0x3c45e0 movq %r12, %rcx jne 0x3b093 cmpb $0x0, 0x3897c8(%rip) # 0x3c480b jne 0x3b05f movq 0x389434(%rip), %rdi # 0x3c4480 leaq 0x656d4(%rip), %rdx # 0xa0727 movl $0x1, %esi xorl %eax, %eax callq 0x37260 movq 0x38941a(%rip), %rdi # 0x3c4480 leaq 0x65700(%rip), %rdx # 0xa076d movl $0x1, %esi xorl %eax, %eax callq 0x37260 cmpq $0x0, 0x38955f(%rip) # 0x3c45e0 leaq 0x657b1(%rip), %rax # 0xa0839 leaq 0x66ae8(%rip), %rcx # 0xa1b77 cmoveq %rax, %rcx cmpb $0x0, 0x389416(%rip) # 0x3c44b0 leaq 0x38940f(%rip), %r9 # 0x3c44b0 leaq 0x681fa(%rip), %r8 # 0xa32a2 cmoveq %r12, %r8 leaq 0x6570f(%rip), %rdx # 0xa07c2 movq %rbx, %rdi movl $0x1, %esi xorl %eax, %eax callq 0x37260 movq %rbx, %rdi addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x38cfc
write_header: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 10h mov rbx, rdi cmp cs:opt_xml, 1 jnz short loc_3AE1F lea rdi, aXmlVersion10; "<?xml version=\"1.0\"?>\n" mov rsi, rbx call _fputs lea rdi, aMysqldump_0; "<mysqldump " mov rsi, rbx call _fputs lea rdi, aXmlnsXsiHttpWw; "xmlns:xsi=\"http://www.w3.org/2001/XMLS"... mov rsi, rbx call _fputs lea rdi, asc_A0855+3; ">\n" mov rsi, rbx call _fputs jmp loc_3B0C2 loc_3AE1F: cmp cs:opt_compact, 0 jz short loc_3AE35 add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_3AE35: mov r14, rsi lea rax, aX8664; "x86_64" mov [rsp+30h+var_30], rax lea rdx, aMariadbDumpSDi; "-- MariaDB dump %s Distrib %s, for %s "... lea rcx, a1019; "10.19" lea r8, a10610Mariadb; "10.6.10-MariaDB" lea r9, aLinux; "Linux" mov rdi, rbx xor esi, esi xor eax, eax call print_comment mov rcx, cs:current_host test rcx, rcx lea rax, aLocalhost; "localhost" cmovnz rax, rcx mov cl, [rax] mov cs:fix_for_comment_buf, cl test cl, cl jz short loc_3AEE1 inc rax mov r8d, 1 lea rdi, unk_3C5661 xor esi, esi lea rdx, fix_for_comment_buf loc_3AEA5: cmp rsi, 3F5h jge short loc_3AEDB cmp cl, 0Ah jnz short loc_3AEC0 add rsi, 4 mov dword ptr [rdi], offset unk_202D2D mov r8, rsi loc_3AEC0: mov rsi, r8 mov cl, [rax] inc r8 lea rdi, [rsi+rdx] inc rdi mov [rdi-1], cl inc rax test cl, cl jnz short loc_3AEA5 jmp short loc_3AEE1 loc_3AEDB: mov dword ptr [rdi], offset unk_2E2E2E loc_3AEE1: lea rdx, aHostS; "-- Host: %s " lea r15, fix_for_comment_buf mov rdi, rbx xor esi, esi mov rcx, r15 xor eax, eax call print_comment test r14, r14 lea r12, asc_A1B75+2; "" cmovz r14, r12 mov al, [r14] mov cs:fix_for_comment_buf, al test al, al jz short loc_3AF66 inc r14 mov esi, 1 lea rdx, unk_3C5661 xor ecx, ecx loc_3AF2A: cmp rcx, 3F5h jge short loc_3AF60 cmp al, 0Ah jnz short loc_3AF44 add rcx, 4 mov dword ptr [rdx], offset unk_202D2D mov rsi, rcx loc_3AF44: mov rcx, rsi mov al, [r14] inc rsi lea rdx, [rcx+r15] inc rdx mov [rdx-1], al inc r14 test al, al jnz short loc_3AF2A jmp short loc_3AF66 loc_3AF60: mov dword ptr [rdx], offset unk_2E2E2E loc_3AF66: lea rdx, aDatabaseS; "Database: %s\n" lea rcx, fix_for_comment_buf mov rdi, rbx xor esi, esi xor eax, eax call print_comment lea rdx, asc_A0560; "-- ------------------------------------"... mov rdi, rbx xor esi, esi xor eax, eax call print_comment lea rdi, mysql_connection call mysql_get_server_info lea rdx, aServerVersionS; "-- Server version\t%s\n" mov rdi, rbx xor esi, esi mov rcx, rax xor eax, eax call print_comment cmp cs:opt_logging, 0 jnz short loc_3AFD4 lea rdx, aM100101SetLoca; "\n/*M!100101 SET LOCAL SQL_LOG_OFF=0, L"... mov rdi, rbx mov esi, 1 xor eax, eax call ___fprintf_chk loc_3AFD4: cmp cs:opt_set_charset, 0 jz short loc_3AFFA mov rcx, cs:default_charset lea rdx, a40101SetOldCha; "\n/*!40101 SET @OLD_CHARACTER_SET_CLIEN"... mov rdi, rbx mov esi, 1 xor eax, eax call ___fprintf_chk loc_3AFFA: cmp cs:opt_tz_utc, 0 jz short loc_3B02F lea rdx, a40103SetOldTim; "/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE"... mov rdi, rbx mov esi, 1 xor eax, eax call ___fprintf_chk lea rdx, a40103SetTimeZo_0; "/*!40103 SET TIME_ZONE='+00:00' */;\n" mov rdi, rbx mov esi, 1 xor eax, eax call ___fprintf_chk loc_3B02F: cmp cs:path, 0 mov rcx, r12 jnz short loc_3B093 cmp cs:opt_no_create_info, 0 jnz short loc_3B05F mov rdi, cs:md_result_file lea rdx, a40014SetOldUni; "/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQU"... mov esi, 1 xor eax, eax call ___fprintf_chk loc_3B05F: mov rdi, cs:md_result_file lea rdx, a40014SetOldFor; "/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@"... mov esi, 1 xor eax, eax call ___fprintf_chk cmp cs:path, 0 lea rax, aNoAutoValueOnZ; "NO_AUTO_VALUE_ON_ZERO" lea rcx, asc_A1B75+2; "" cmovz rcx, rax loc_3B093: cmp cs:compatible_mode_normal_str, 0 lea r9, compatible_mode_normal_str lea r8, asc_A32A1+1; "," cmovz r8, r12 lea rdx, a40101SetOldSql; "/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, "... mov rdi, rbx mov esi, 1 xor eax, eax call ___fprintf_chk loc_3B0C2: mov rdi, rbx add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp jmp check_io
void write_header(long long a1, char *a2, long long a3, long long a4, long long a5, long long a6, char a7) { long long v8; // rdx long long v9; // rdx long long v10; // rsi long long v11; // rdx long long v12; // rdx long long v13; // rcx long long v14; // r8 long long v15; // r9 long long v17; // r8 int v18; // r9d const char *v19; // rax char v20; // cl char *v21; // rax char *v22; // rdi long long v23; // rsi int v24; // r8d int v25; // r9d char v26; // al char *v27; // r14 long long v28; // rsi char *v29; // rdx long long v30; // rcx int v31; // ecx int v32; // r8d int v33; // r9d int server_info; // eax int v35; // r8d int v36; // r9d const char *v37; // rcx const char *v38; // r8 char v39; // [rsp+0h] [rbp-30h] char v40; // [rsp+0h] [rbp-30h] char v41; // [rsp+0h] [rbp-30h] char v42; // [rsp+0h] [rbp-30h] if ( opt_xml == 1 ) { fputs("<?xml version=\"1.0\"?>\n", a1, a3); fputs("<mysqldump ", a1, v8); fputs("xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"", a1, v9); v10 = a1; fputs(">\n", a1, v11); } else { if ( opt_compact ) return; print_comment( a1, 0, (unsigned int)"-- MariaDB dump %s Distrib %s, for %s (%s)\n--\n", (unsigned int)"10.19", (unsigned int)"10.6.10-MariaDB", (unsigned int)"Linux", (char)"x86_64"); v19 = "localhost"; if ( current_host ) v19 = (const char *)current_host; v20 = *v19; fix_for_comment_buf[0] = v20; if ( v20 ) { v21 = (char *)(v19 + 1); v17 = 1LL; v22 = (char *)&unk_3C5661; v23 = 0LL; while ( v23 < 1013 ) { if ( v20 == 10 ) { *(_DWORD *)v22 = (_DWORD)&unk_202D2D; v17 = v23 + 4; } v23 = v17; v20 = *v21; ++v17; v22 = &fix_for_comment_buf[v23 + 1]; fix_for_comment_buf[v23] = *v21++; if ( !v20 ) goto LABEL_14; } *(_DWORD *)v22 = (_DWORD)&unk_2E2E2E; } LABEL_14: print_comment(a1, 0, (unsigned int)"-- Host: %s ", (unsigned int)fix_for_comment_buf, v17, v18, v39); if ( !a2 ) a2 = ""; v26 = *a2; fix_for_comment_buf[0] = v26; if ( v26 ) { v27 = a2 + 1; v28 = 1LL; v29 = (char *)&unk_3C5661; v30 = 0LL; while ( v30 < 1013 ) { if ( v26 == 10 ) { *(_DWORD *)v29 = (_DWORD)&unk_202D2D; v28 = v30 + 4; } v30 = v28; v26 = *v27; ++v28; v29 = &fix_for_comment_buf[v30 + 1]; fix_for_comment_buf[v30] = *v27++; if ( !v26 ) goto LABEL_24; } *(_DWORD *)v29 = (_DWORD)&unk_2E2E2E; } LABEL_24: print_comment(a1, 0, (unsigned int)"Database: %s\n", (unsigned int)fix_for_comment_buf, v24, v25, v40); print_comment( a1, 0, (unsigned int)"-- ------------------------------------------------------\n", v31, v32, v33, v41); server_info = mysql_get_server_info(&mysql_connection); print_comment(a1, 0, (unsigned int)"-- Server version\t%s\n", server_info, v35, v36, v42); if ( !opt_logging ) __fprintf_chk(a1, 1LL, "\n/*M!100101 SET LOCAL SQL_LOG_OFF=0, LOCAL SLOW_QUERY_LOG=0 */;"); if ( opt_set_charset ) __fprintf_chk( a1, 1LL, "\n" "/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n" "/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n" "/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n" "/*!40101 SET NAMES %s */;\n", (const char *)default_charset); if ( opt_tz_utc ) { __fprintf_chk(a1, 1LL, "/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n"); __fprintf_chk(a1, 1LL, "/*!40103 SET TIME_ZONE='+00:00' */;\n"); } v37 = ""; if ( !path ) { if ( !opt_no_create_info ) __fprintf_chk(md_result_file, 1LL, "/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n", ""); __fprintf_chk( md_result_file, 1LL, "/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n", v37); v37 = ""; if ( !path ) v37 = "NO_AUTO_VALUE_ON_ZERO"; } v38 = ","; if ( !compatible_mode_normal_str ) v38 = ""; v10 = 1LL; __fprintf_chk( a1, 1LL, "/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='%s%s%s' */;\n" "/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n", v37, v38, &compatible_mode_normal_str); } check_io(a1, v10, v12, v13, v14, v15, a7); }
write_header: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV RBX,RDI CMP byte ptr [0x004c45b8],0x1 JNZ 0x0013ae1f LEA RDI,[0x1a04b9] MOV RSI,RBX CALL 0x00137340 LEA RDI,[0x1a04d0] MOV RSI,RBX CALL 0x00137340 LEA RDI,[0x1a04dc] MOV RSI,RBX CALL 0x00137340 LEA RDI,[0x1a0858] MOV RSI,RBX CALL 0x00137340 JMP 0x0013b0c2 LAB_0013ae1f: CMP byte ptr [0x004c4800],0x0 JZ 0x0013ae35 ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0013ae35: MOV R14,RSI LEA RAX,[0x1a024d] MOV qword ptr [RSP],RAX LEA RDX,[0x1a0512] LEA RCX,[0x1a0231] LEA R8,[0x1a0237] LEA R9,[0x1a0247] MOV RDI,RBX XOR ESI,ESI XOR EAX,EAX CALL 0x0013cac7 MOV RCX,qword ptr [0x004c45c8] TEST RCX,RCX LEA RAX,[0x1a0387] CMOVNZ RAX,RCX MOV CL,byte ptr [RAX] MOV byte ptr [0x004c5660],CL TEST CL,CL JZ 0x0013aee1 INC RAX MOV R8D,0x1 LEA RDI,[0x4c5661] XOR ESI,ESI LEA RDX,[0x4c5660] LAB_0013aea5: CMP RSI,0x3f5 JGE 0x0013aedb CMP CL,0xa JNZ 0x0013aec0 ADD RSI,0x4 MOV dword ptr [RDI],0x202d2d MOV R8,RSI LAB_0013aec0: MOV RSI,R8 MOV CL,byte ptr [RAX] INC R8 LEA RDI,[RSI + RDX*0x1] INC RDI MOV byte ptr [RDI + -0x1],CL INC RAX TEST CL,CL JNZ 0x0013aea5 JMP 0x0013aee1 LAB_0013aedb: MOV dword ptr [RDI],0x2e2e2e LAB_0013aee1: LEA RDX,[0x1a0542] LEA R15,[0x4c5660] MOV RDI,RBX XOR ESI,ESI MOV RCX,R15 XOR EAX,EAX CALL 0x0013cac7 TEST R14,R14 LEA R12,[0x1a1b77] CMOVZ R14,R12 MOV AL,byte ptr [R14] MOV byte ptr [0x004c5660],AL TEST AL,AL JZ 0x0013af66 INC R14 MOV ESI,0x1 LEA RDX,[0x4c5661] XOR ECX,ECX LAB_0013af2a: CMP RCX,0x3f5 JGE 0x0013af60 CMP AL,0xa JNZ 0x0013af44 ADD RCX,0x4 MOV dword ptr [RDX],0x202d2d MOV RSI,RCX LAB_0013af44: MOV RCX,RSI MOV AL,byte ptr [R14] INC RSI LEA RDX,[RCX + R15*0x1] INC RDX MOV byte ptr [RDX + -0x1],AL INC R14 TEST AL,AL JNZ 0x0013af2a JMP 0x0013af66 LAB_0013af60: MOV dword ptr [RDX],0x2e2e2e LAB_0013af66: LEA RDX,[0x1a0552] LEA RCX,[0x4c5660] MOV RDI,RBX XOR ESI,ESI XOR EAX,EAX CALL 0x0013cac7 LEA RDX,[0x1a0560] MOV RDI,RBX XOR ESI,ESI XOR EAX,EAX CALL 0x0013cac7 LEA RDI,[0x4c4960] CALL 0x0014ab1a LEA RDX,[0x1a059b] MOV RDI,RBX XOR ESI,ESI MOV RCX,RAX XOR EAX,EAX CALL 0x0013cac7 CMP byte ptr [0x004c4808],0x0 JNZ 0x0013afd4 LEA RDX,[0x1a05b1] MOV RDI,RBX MOV ESI,0x1 XOR EAX,EAX CALL 0x00137260 LAB_0013afd4: CMP byte ptr [0x004c4816],0x0 JZ 0x0013affa MOV RCX,qword ptr [0x004c45b0] LEA RDX,[0x1a05f1] MOV RDI,RBX MOV ESI,0x1 XOR EAX,EAX CALL 0x00137260 LAB_0013affa: CMP byte ptr [0x0044bb88],0x0 JZ 0x0013b02f LEA RDX,[0x1a06d5] MOV RDI,RBX MOV ESI,0x1 XOR EAX,EAX CALL 0x00137260 LEA RDX,[0x1a0702] MOV RDI,RBX MOV ESI,0x1 XOR EAX,EAX CALL 0x00137260 LAB_0013b02f: CMP qword ptr [0x004c45e0],0x0 MOV RCX,R12 JNZ 0x0013b093 CMP byte ptr [0x004c480b],0x0 JNZ 0x0013b05f MOV RDI,qword ptr [0x004c4480] LEA RDX,[0x1a0727] MOV ESI,0x1 XOR EAX,EAX CALL 0x00137260 LAB_0013b05f: MOV RDI,qword ptr [0x004c4480] LEA RDX,[0x1a076d] MOV ESI,0x1 XOR EAX,EAX CALL 0x00137260 CMP qword ptr [0x004c45e0],0x0 LEA RAX,[0x1a0839] LEA RCX,[0x1a1b77] CMOVZ RCX,RAX LAB_0013b093: CMP byte ptr [0x004c44b0],0x0 LEA R9,[0x4c44b0] LEA R8,[0x1a32a2] CMOVZ R8,R12 LEA RDX,[0x1a07c2] MOV RDI,RBX MOV ESI,0x1 XOR EAX,EAX CALL 0x00137260 LAB_0013b0c2: MOV RDI,RBX ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x00138cfc
void write_header(FILE *param_1,char *param_2) { char *pcVar1; int8 uVar2; char cVar3; long lVar4; int4 *puVar5; long lVar6; int *puVar7; if (opt_xml == '\x01') { fputs("<?xml version=\"1.0\"?>\n",param_1); fputs("<mysqldump ",param_1); fputs("xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"",param_1); fputs(">\n",param_1); } else { if (opt_compact != '\0') { return; } print_comment(param_1,0,"-- MariaDB dump %s Distrib %s, for %s (%s)\n--\n","10.19", "10.6.10-MariaDB","Linux","x86_64"); pcVar1 = "localhost"; if (current_host != (char *)0x0) { pcVar1 = current_host; } cVar3 = *pcVar1; fix_for_comment_buf[0] = cVar3; if (cVar3 != '\0') { lVar6 = 1; puVar5 = (int4 *)(fix_for_comment_buf + 1); lVar4 = 0; do { pcVar1 = pcVar1 + 1; if (0x3f4 < lVar4) { *puVar5 = 0x2e2e2e; break; } if (cVar3 == '\n') { *puVar5 = 0x202d2d; lVar6 = lVar4 + 4; } lVar4 = lVar6; cVar3 = *pcVar1; lVar6 = lVar4 + 1; puVar5 = (int4 *)(fix_for_comment_buf + lVar4 + 1); fix_for_comment_buf[lVar4] = cVar3; } while (cVar3 != '\0'); } print_comment(param_1,0,"-- Host: %s "); if (param_2 == (char *)0x0) { param_2 = ""; } cVar3 = *param_2; fix_for_comment_buf[0] = cVar3; if (cVar3 != '\0') { lVar6 = 1; puVar5 = (int4 *)(fix_for_comment_buf + 1); lVar4 = 0; do { param_2 = param_2 + 1; if (0x3f4 < lVar4) { *puVar5 = 0x2e2e2e; break; } if (cVar3 == '\n') { *puVar5 = 0x202d2d; lVar6 = lVar4 + 4; } lVar4 = lVar6; cVar3 = *param_2; lVar6 = lVar4 + 1; puVar5 = (int4 *)(fix_for_comment_buf + lVar4 + 1); fix_for_comment_buf[lVar4] = cVar3; } while (cVar3 != '\0'); } print_comment(param_1,0,"Database: %s\n",fix_for_comment_buf); print_comment(param_1,0,"-- ------------------------------------------------------\n"); uVar2 = mysql_get_server_info(mysql_connection); print_comment(param_1,0,"-- Server version\t%s\n",uVar2); if (opt_logging == '\0') { __fprintf_chk(param_1,1,"\n/*M!100101 SET LOCAL SQL_LOG_OFF=0, LOCAL SLOW_QUERY_LOG=0 */;"); } if (opt_set_charset != '\0') { __fprintf_chk(param_1,1, "\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n/*!40101 SET NAMES %s */;\n" ,default_charset); } if (opt_tz_utc != '\0') { __fprintf_chk(param_1,1,"/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;\n"); __fprintf_chk(param_1,1,"/*!40103 SET TIME_ZONE=\'+00:00\' */;\n"); } pcVar1 = ""; if (path == 0) { if (opt_no_create_info == '\0') { __fprintf_chk(md_result_file,1, "/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n", &DAT_001a1b77); } __fprintf_chk(md_result_file,1, "/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n" ); pcVar1 = ""; if (path == 0) { pcVar1 = "NO_AUTO_VALUE_ON_ZERO"; } } puVar7 = &DAT_001a32a2; if (compatible_mode_normal_str == '\0') { puVar7 = &DAT_001a1b77; } __fprintf_chk(param_1,1, "/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=\'%s%s%s\' */;\n/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n" ,pcVar1,puVar7,&compatible_mode_normal_str); } check_io(param_1); return; }
61,630
get_collation_number_internal
eloqsql/mysys/charset.c
static uint get_collation_number_internal(const char *name) { CHARSET_INFO **cs; for (cs= all_charsets; cs < all_charsets + array_elements(all_charsets); cs++) { if (cs[0] && cs[0]->coll_name.str && !my_strcasecmp(&my_charset_latin1, cs[0]->coll_name.str, name)) return cs[0]->number; } return 0; }
O3
c
get_collation_number_internal: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdi, %rbx movq $-0x8, %r15 leaq 0xb6d2f5(%rip), %r12 # 0xbffac0 leaq 0x31974e(%rip), %r14 # 0x3abf20 movq 0x8(%r12,%r15), %rax testq %rax, %rax je 0x927f9 movq 0x20(%rax), %rsi testq %rsi, %rsi je 0x927f9 movq 0xc0(%r14), %rax movq %r14, %rdi movq %rbx, %rdx callq *0x40(%rax) testl %eax, %eax je 0x9280a addq $0x8, %r15 cmpq $0x3ff8, %r15 # imm = 0x3FF8 jb 0x927d2 xorl %eax, %eax jmp 0x92811 movq 0x8(%r12,%r15), %rax movl (%rax), %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
get_collation_number_internal: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rdi mov r15, 0FFFFFFFFFFFFFFF8h lea r12, all_charsets lea r14, my_charset_latin1 loc_927D2: mov rax, [r12+r15+8] test rax, rax jz short loc_927F9 mov rsi, [rax+20h] test rsi, rsi jz short loc_927F9 mov rax, [r14+0C0h] mov rdi, r14 mov rdx, rbx call qword ptr [rax+40h] test eax, eax jz short loc_9280A loc_927F9: add r15, 8 cmp r15, 3FF8h jb short loc_927D2 xor eax, eax jmp short loc_92811 loc_9280A: mov rax, [r12+r15+8] mov eax, [rax] loc_92811: pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long get_collation_number_internal(long long a1) { long long v1; // r15 long long v2; // rax long long v3; // rsi v1 = 0x1FFFFFFFFFFFFFFFLL; while ( 1 ) { v2 = all_charsets[v1 + 1]; if ( v2 ) { v3 = *(_QWORD *)(v2 + 32); if ( v3 ) { if ( !(*(unsigned int ( **)(void *, long long, long long))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, v3, a1) ) break; } } if ( (unsigned long long)++v1 >= 2047 ) return 0LL; } return *(unsigned int *)all_charsets[v1 + 1]; }
get_collation_number_internal: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDI MOV R15,-0x8 LEA R12,[0xcffac0] LEA R14,[0x4abf20] LAB_001927d2: MOV RAX,qword ptr [R12 + R15*0x1 + 0x8] TEST RAX,RAX JZ 0x001927f9 MOV RSI,qword ptr [RAX + 0x20] TEST RSI,RSI JZ 0x001927f9 MOV RAX,qword ptr [R14 + 0xc0] MOV RDI,R14 MOV RDX,RBX CALL qword ptr [RAX + 0x40] TEST EAX,EAX JZ 0x0019280a LAB_001927f9: ADD R15,0x8 CMP R15,0x3ff8 JC 0x001927d2 XOR EAX,EAX JMP 0x00192811 LAB_0019280a: MOV RAX,qword ptr [R12 + R15*0x1 + 0x8] MOV EAX,dword ptr [RAX] LAB_00192811: POP RBX POP R12 POP R14 POP R15 POP RBP RET
int4 get_collation_number_internal(int8 param_1) { long lVar1; int iVar2; ulong uVar3; uVar3 = 0xfffffffffffffff8; while (((*(long *)((long)&DAT_00cffac8 + uVar3) == 0 || (lVar1 = *(long *)(*(long *)((long)&DAT_00cffac8 + uVar3) + 0x20), lVar1 == 0)) || (iVar2 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_004abfe0 + 0x40)) (&my_charset_latin1,lVar1,param_1), iVar2 != 0))) { uVar3 = uVar3 + 8; if (0x3ff7 < uVar3) { return 0; } } return **(int4 **)((long)&DAT_00cffac8 + uVar3); }
61,631
_JS_NewAtomInit
bluesky950520[P]quickjs/quickjs.c
static JSAtom __JS_NewAtomInit(JSRuntime *rt, const char *str, int len, int atom_type) { JSString *p; p = js_alloc_string_rt(rt, len, 0); if (!p) return JS_ATOM_NULL; memcpy(p->u.str8, str, len); p->u.str8[len] = '\0'; return __JS_NewAtom(rt, p, atom_type); }
O0
c
_JS_NewAtomInit: subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq %rsi, 0x10(%rsp) movl %edx, 0xc(%rsp) movl %ecx, 0x8(%rsp) movq 0x18(%rsp), %rdi movl 0xc(%rsp), %esi xorl %edx, %edx callq 0x5d520 movq %rax, (%rsp) cmpq $0x0, (%rsp) jne 0x2937b movl $0x0, 0x24(%rsp) jmp 0x293b6 movq (%rsp), %rdi addq $0x18, %rdi movq 0x10(%rsp), %rsi movslq 0xc(%rsp), %rdx callq 0xe5b0 movq (%rsp), %rax movslq 0xc(%rsp), %rcx movb $0x0, 0x18(%rax,%rcx) movq 0x18(%rsp), %rdi movq (%rsp), %rsi movl 0x8(%rsp), %edx callq 0x28650 movl %eax, 0x24(%rsp) movl 0x24(%rsp), %eax addq $0x28, %rsp retq nop
__JS_NewAtomInit: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_18], rsi mov [rsp+28h+var_1C], edx mov [rsp+28h+var_20], ecx mov rdi, [rsp+28h+var_10] mov esi, [rsp+28h+var_1C] xor edx, edx call js_alloc_string_rt mov [rsp+28h+var_28], rax cmp [rsp+28h+var_28], 0 jnz short loc_2937B mov [rsp+28h+var_4], 0 jmp short loc_293B6 loc_2937B: mov rdi, [rsp+28h+var_28] add rdi, 18h mov rsi, [rsp+28h+var_18] movsxd rdx, [rsp+28h+var_1C] call _memcpy mov rax, [rsp+28h+var_28] movsxd rcx, [rsp+28h+var_1C] mov byte ptr [rax+rcx+18h], 0 mov rdi, [rsp+28h+var_10] mov rsi, [rsp+28h+var_28] mov edx, [rsp+28h+var_20] call __JS_NewAtom mov [rsp+28h+var_4], eax loc_293B6: mov eax, [rsp+28h+var_4] add rsp, 28h retn
long long _JS_NewAtomInit(long long a1, long long a2, unsigned int a3, int a4) { long long v5; // [rsp+0h] [rbp-28h] v5 = js_alloc_string_rt(a1, a3, 0LL); if ( v5 ) { memcpy(v5 + 24, a2, (int)a3); *(_BYTE *)(v5 + (int)a3 + 24) = 0; return (unsigned int)_JS_NewAtom(a1, v5, a4); } else { return 0; } }
__JS_NewAtomInit: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV qword ptr [RSP + 0x10],RSI MOV dword ptr [RSP + 0xc],EDX MOV dword ptr [RSP + 0x8],ECX MOV RDI,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RSP + 0xc] XOR EDX,EDX CALL 0x0015d520 MOV qword ptr [RSP],RAX CMP qword ptr [RSP],0x0 JNZ 0x0012937b MOV dword ptr [RSP + 0x24],0x0 JMP 0x001293b6 LAB_0012937b: MOV RDI,qword ptr [RSP] ADD RDI,0x18 MOV RSI,qword ptr [RSP + 0x10] MOVSXD RDX,dword ptr [RSP + 0xc] CALL 0x0010e5b0 MOV RAX,qword ptr [RSP] MOVSXD RCX,dword ptr [RSP + 0xc] MOV byte ptr [RAX + RCX*0x1 + 0x18],0x0 MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP] MOV EDX,dword ptr [RSP + 0x8] CALL 0x00128650 MOV dword ptr [RSP + 0x24],EAX LAB_001293b6: MOV EAX,dword ptr [RSP + 0x24] ADD RSP,0x28 RET
int4 __JS_NewAtomInit(int8 param_1,void *param_2,int param_3,int4 param_4) { long lVar1; int4 local_4; lVar1 = js_alloc_string_rt(param_1,param_3,0); if (lVar1 == 0) { local_4 = 0; } else { memcpy((void *)(lVar1 + 0x18),param_2,(long)param_3); *(int1 *)(lVar1 + 0x18 + (long)param_3) = 0; local_4 = __JS_NewAtom(param_1,lVar1,param_4); } return local_4; }
61,632
_JS_NewAtomInit
bluesky950520[P]quickjs/quickjs.c
static JSAtom __JS_NewAtomInit(JSRuntime *rt, const char *str, int len, int atom_type) { JSString *p; p = js_alloc_string_rt(rt, len, 0); if (!p) return JS_ATOM_NULL; memcpy(p->u.str8, str, len); p->u.str8[len] = '\0'; return __JS_NewAtom(rt, p, atom_type); }
O2
c
_JS_NewAtomInit: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %ecx, %ebx movl %edx, %ebp movq %rsi, %r15 movq %rdi, %r14 movl %edx, %esi xorl %edx, %edx callq 0x34a65 testq %rax, %rax je 0x1ab2a movq %rax, %r12 movq %rax, %rdi addq $0x18, %rdi movslq %ebp, %r13 movq %r15, %rsi movq %r13, %rdx callq 0xe5c0 movb $0x0, 0x18(%r12,%r13) movq %r14, %rdi movq %r12, %rsi movl %ebx, %edx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x1a53b xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
__JS_NewAtomInit: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov ebx, ecx mov ebp, edx mov r15, rsi mov r14, rdi mov esi, edx xor edx, edx call js_alloc_string_rt test rax, rax jz short loc_1AB2A mov r12, rax mov rdi, rax add rdi, 18h movsxd r13, ebp mov rsi, r15 mov rdx, r13 call _memcpy mov byte ptr [r12+r13+18h], 0 mov rdi, r14 mov rsi, r12 mov edx, ebx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp __JS_NewAtom loc_1AB2A: xor eax, eax add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long _JS_NewAtomInit(long long a1, long long a2, unsigned int a3, unsigned int a4) { long long v6; // rax _QWORD *v7; // r12 v6 = js_alloc_string_rt(a1, a3, 0LL); if ( !v6 ) return 0LL; v7 = (_QWORD *)v6; memcpy(v6 + 24, a2, (int)a3); *((_BYTE *)v7 + (int)a3 + 24) = 0; return _JS_NewAtom(a1, v7, a4); }
__JS_NewAtomInit: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV EBX,ECX MOV EBP,EDX MOV R15,RSI MOV R14,RDI MOV ESI,EDX XOR EDX,EDX CALL 0x00134a65 TEST RAX,RAX JZ 0x0011ab2a MOV R12,RAX MOV RDI,RAX ADD RDI,0x18 MOVSXD R13,EBP MOV RSI,R15 MOV RDX,R13 CALL 0x0010e5c0 MOV byte ptr [R12 + R13*0x1 + 0x18],0x0 MOV RDI,R14 MOV RSI,R12 MOV EDX,EBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0011a53b LAB_0011ab2a: XOR EAX,EAX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 __JS_NewAtomInit(int8 param_1,void *param_2,int param_3,int4 param_4) { long lVar1; int8 uVar2; lVar1 = js_alloc_string_rt(param_1,param_3,0); if (lVar1 != 0) { memcpy((void *)(lVar1 + 0x18),param_2,(long)param_3); *(int1 *)(lVar1 + 0x18 + (long)param_3) = 0; uVar2 = __JS_NewAtom(param_1,lVar1,param_4); return uVar2; } return 0; }
61,633
my_casedn_str_mb
eloqsql/strings/ctype-mb.c
size_t my_casedn_str_mb(CHARSET_INFO * cs, char *str) { register uint32 l; register const uchar *map= cs->to_lower; char *str_orig= str; while (*str) { /* Pointing after the '\0' is safe here. */ if ((l= my_ismbchar(cs, str, str + cs->mbmaxlen))) str+= l; else { *str= (char) map[(uchar)*str]; str++; } } return (size_t) (str - str_orig); }
O3
c
my_casedn_str_mb: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rsi, %rbx cmpb $0x0, (%rsi) movq %rsi, %rax je 0x6e234 movq %rdi, %r14 movq 0x48(%rdi), %r12 movq %rbx, %r15 movl 0x9c(%r14), %edx addq %r15, %rdx movq 0xb8(%r14), %rax movq %r14, %rdi movq %r15, %rsi callq *0xc0(%rax) cmpl $0x2, %eax jge 0x6e224 movzbl (%r15), %eax movb (%r12,%rax), %al movb %al, (%r15) movl $0x1, %ecx jmp 0x6e226 movl %eax, %ecx leaq (%r15,%rcx), %rax cmpb $0x0, (%r15,%rcx) movq %rax, %r15 jne 0x6e1f0 subq %rbx, %rax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
my_casedn_str_mb: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rsi cmp byte ptr [rsi], 0 mov rax, rsi jz short loc_6E234 mov r14, rdi mov r12, [rdi+48h] mov r15, rbx loc_6E1F0: mov edx, [r14+9Ch] add rdx, r15 mov rax, [r14+0B8h] mov rdi, r14 mov rsi, r15 call qword ptr [rax+0C0h] cmp eax, 2 jge short loc_6E224 movzx eax, byte ptr [r15] mov al, [r12+rax] mov [r15], al mov ecx, 1 jmp short loc_6E226 loc_6E224: mov ecx, eax loc_6E226: lea rax, [r15+rcx] cmp byte ptr [r15+rcx], 0 mov r15, rax jnz short loc_6E1F0 loc_6E234: sub rax, rbx pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long my_casedn_str_mb(long long a1, _BYTE *a2) { _BYTE *v2; // rax long long v3; // r12 _BYTE *v4; // r15 int v5; // eax long long v6; // rcx bool v7; // zf v2 = a2; if ( *a2 ) { v3 = *(_QWORD *)(a1 + 72); v4 = a2; do { v5 = (*(long long ( **)(long long, _BYTE *, _BYTE *))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v4, &v4[*(unsigned int *)(a1 + 156)]); if ( v5 >= 2 ) { v6 = (unsigned int)v5; } else { *v4 = *(_BYTE *)(v3 + (unsigned __int8)*v4); v6 = 1LL; } v2 = &v4[v6]; v7 = v4[v6] == 0; v4 += v6; } while ( !v7 ); } return v2 - a2; }
my_casedn_str_mb: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RSI CMP byte ptr [RSI],0x0 MOV RAX,RSI JZ 0x0016e234 MOV R14,RDI MOV R12,qword ptr [RDI + 0x48] MOV R15,RBX LAB_0016e1f0: MOV EDX,dword ptr [R14 + 0x9c] ADD RDX,R15 MOV RAX,qword ptr [R14 + 0xb8] MOV RDI,R14 MOV RSI,R15 CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 JGE 0x0016e224 MOVZX EAX,byte ptr [R15] MOV AL,byte ptr [R12 + RAX*0x1] MOV byte ptr [R15],AL MOV ECX,0x1 JMP 0x0016e226 LAB_0016e224: MOV ECX,EAX LAB_0016e226: LEA RAX,[R15 + RCX*0x1] CMP byte ptr [R15 + RCX*0x1],0x0 MOV R15,RAX JNZ 0x0016e1f0 LAB_0016e234: SUB RAX,RBX POP RBX POP R12 POP R14 POP R15 POP RBP RET
long my_casedn_str_mb(long param_1,byte *param_2) { byte *pbVar1; long lVar2; uint uVar3; byte *pbVar4; ulong uVar5; byte *pbVar6; pbVar4 = param_2; if (*param_2 != 0) { lVar2 = *(long *)(param_1 + 0x48); pbVar6 = param_2; do { uVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0)) (param_1,pbVar6,pbVar6 + *(uint *)(param_1 + 0x9c)); if ((int)uVar3 < 2) { *pbVar6 = *(byte *)(lVar2 + (ulong)*pbVar6); uVar5 = 1; } else { uVar5 = (ulong)uVar3; } pbVar4 = pbVar6 + uVar5; pbVar1 = pbVar6 + uVar5; pbVar6 = pbVar4; } while (*pbVar1 != 0); } return (long)pbVar4 - (long)param_2; }
61,634
ggml_barrier
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
void ggml_barrier(struct ggml_threadpool * tp) { int n_threads = atomic_load_explicit(&tp->n_threads_cur, memory_order_relaxed); if (n_threads == 1) { return; } #ifdef GGML_USE_OPENMP #pragma omp barrier #else int n_passed = atomic_load_explicit(&tp->n_barrier_passed, memory_order_relaxed); // enter barrier (full seq-cst fence) int n_barrier = atomic_fetch_add_explicit(&tp->n_barrier, 1, memory_order_seq_cst); if (n_barrier == (n_threads - 1)) { // last thread atomic_store_explicit(&tp->n_barrier, 0, memory_order_relaxed); // exit barrier (fill seq-cst fence) atomic_fetch_add_explicit(&tp->n_barrier_passed, 1, memory_order_seq_cst); return; } // wait for other threads while (atomic_load_explicit(&tp->n_barrier_passed, memory_order_relaxed) == n_passed) { ggml_thread_cpu_relax(); } // exit barrier (full seq-cst fence) // TSAN doesn't support standalone fence yet, we use a dummy read-modify-write instead #ifdef GGML_TSAN_ENABLED atomic_fetch_add_explicit(&tp->n_barrier_passed, 0, memory_order_seq_cst); #else atomic_thread_fence(memory_order_seq_cst); #endif #endif }
O0
c
ggml_barrier: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movl 0xdc(%rax), %eax movl %eax, -0x10(%rbp) movl -0x10(%rbp), %eax movl %eax, -0xc(%rbp) cmpl $0x1, -0xc(%rbp) jne 0xe8ea jmp 0xe979 movq -0x8(%rbp), %rax movl 0xc0(%rax), %eax movl %eax, -0x18(%rbp) movl -0x18(%rbp), %eax movl %eax, -0x14(%rbp) movq -0x8(%rbp), %rcx movl $0x1, -0x20(%rbp) movl -0x20(%rbp), %eax lock xaddl %eax, 0x80(%rcx) movl %eax, -0x24(%rbp) movl -0x24(%rbp), %eax movl %eax, -0x1c(%rbp) movl -0x1c(%rbp), %eax movl -0xc(%rbp), %ecx subl $0x1, %ecx cmpl %ecx, %eax jne 0xe958 movq -0x8(%rbp), %rax movl $0x0, -0x28(%rbp) movl -0x28(%rbp), %ecx movl %ecx, 0x80(%rax) movq -0x8(%rbp), %rcx movl $0x1, -0x2c(%rbp) movl -0x2c(%rbp), %eax lock xaddl %eax, 0xc0(%rcx) movl %eax, -0x30(%rbp) jmp 0xe979 jmp 0xe95a movq -0x8(%rbp), %rax movl 0xc0(%rax), %eax movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax cmpl -0x14(%rbp), %eax jne 0xe976 callq 0xe980 jmp 0xe95a mfence addq $0x40, %rsp popq %rbp retq nop
ggml_barrier: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov eax, [rax+0DCh] mov [rbp+var_10], eax mov eax, [rbp+var_10] mov [rbp+var_C], eax cmp [rbp+var_C], 1 jnz short loc_E8EA jmp loc_E979 loc_E8EA: mov rax, [rbp+var_8] mov eax, [rax+0C0h] mov [rbp+var_18], eax mov eax, [rbp+var_18] mov [rbp+var_14], eax mov rcx, [rbp+var_8] mov [rbp+var_20], 1 mov eax, [rbp+var_20] lock xadd [rcx+80h], eax mov [rbp+var_24], eax mov eax, [rbp+var_24] mov [rbp+var_1C], eax mov eax, [rbp+var_1C] mov ecx, [rbp+var_C] sub ecx, 1 cmp eax, ecx jnz short loc_E958 mov rax, [rbp+var_8] mov [rbp+var_28], 0 mov ecx, [rbp+var_28] mov [rax+80h], ecx mov rcx, [rbp+var_8] mov [rbp+var_2C], 1 mov eax, [rbp+var_2C] lock xadd [rcx+0C0h], eax mov [rbp+var_30], eax jmp short loc_E979 loc_E958: jmp short $+2 loc_E95A: mov rax, [rbp+var_8] mov eax, [rax+0C0h] mov [rbp+var_34], eax mov eax, [rbp+var_34] cmp eax, [rbp+var_14] jnz short loc_E976 call ggml_thread_cpu_relax jmp short loc_E95A loc_E976: mfence loc_E979: add rsp, 40h pop rbp retn
long long ggml_barrier(long long a1) { long long result; // rax unsigned int v2; // [rsp+Ch] [rbp-34h] int v3; // [rsp+2Ch] [rbp-14h] unsigned int v4; // [rsp+30h] [rbp-10h] int v5; // [rsp+34h] [rbp-Ch] v4 = *(_DWORD *)(a1 + 220); result = v4; if ( v4 != 1 ) { v3 = *(_DWORD *)(a1 + 192); v5 = *(_DWORD *)(a1 + 220); if ( _InterlockedExchangeAdd((volatile signed __int32 *)(a1 + 128), 1u) == v5 - 1 ) { *(_DWORD *)(a1 + 128) = 0; return (unsigned int)_InterlockedExchangeAdd((volatile signed __int32 *)(a1 + 192), 1u); } else { while ( 1 ) { v2 = *(_DWORD *)(a1 + 192); result = v2; if ( v2 != v3 ) break; ggml_thread_cpu_relax(); } _mm_mfence(); } } return result; }
ggml_barrier: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0xdc] MOV dword ptr [RBP + -0x10],EAX MOV EAX,dword ptr [RBP + -0x10] MOV dword ptr [RBP + -0xc],EAX CMP dword ptr [RBP + -0xc],0x1 JNZ 0x0010e8ea JMP 0x0010e979 LAB_0010e8ea: MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0xc0] MOV dword ptr [RBP + -0x18],EAX MOV EAX,dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x14],EAX MOV RCX,qword ptr [RBP + -0x8] MOV dword ptr [RBP + -0x20],0x1 MOV EAX,dword ptr [RBP + -0x20] XADD.LOCK dword ptr [RCX + 0x80],EAX MOV dword ptr [RBP + -0x24],EAX MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x1c],EAX MOV EAX,dword ptr [RBP + -0x1c] MOV ECX,dword ptr [RBP + -0xc] SUB ECX,0x1 CMP EAX,ECX JNZ 0x0010e958 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RBP + -0x28],0x0 MOV ECX,dword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x80],ECX MOV RCX,qword ptr [RBP + -0x8] MOV dword ptr [RBP + -0x2c],0x1 MOV EAX,dword ptr [RBP + -0x2c] XADD.LOCK dword ptr [RCX + 0xc0],EAX MOV dword ptr [RBP + -0x30],EAX JMP 0x0010e979 LAB_0010e958: JMP 0x0010e95a LAB_0010e95a: MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0xc0] MOV dword ptr [RBP + -0x34],EAX MOV EAX,dword ptr [RBP + -0x34] CMP EAX,dword ptr [RBP + -0x14] JNZ 0x0010e976 CALL 0x0010e980 JMP 0x0010e95a LAB_0010e976: MFENCE LAB_0010e979: ADD RSP,0x40 POP RBP RET
void ggml_barrier(long param_1) { int *piVar1; int iVar2; int iVar3; if (*(int *)(param_1 + 0xdc) != 1) { iVar3 = *(int *)(param_1 + 0xc0); LOCK(); piVar1 = (int *)(param_1 + 0x80); iVar2 = *piVar1; *piVar1 = *piVar1 + 1; UNLOCK(); if (iVar2 == *(int *)(param_1 + 0xdc) + -1) { *(int4 *)(param_1 + 0x80) = 0; LOCK(); *(int *)(param_1 + 0xc0) = *(int *)(param_1 + 0xc0) + 1; UNLOCK(); } else { while (*(int *)(param_1 + 0xc0) == iVar3) { ggml_thread_cpu_relax(); } } } return; }
61,635
ggml_barrier
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
void ggml_barrier(struct ggml_threadpool * tp) { int n_threads = atomic_load_explicit(&tp->n_threads_cur, memory_order_relaxed); if (n_threads == 1) { return; } #ifdef GGML_USE_OPENMP #pragma omp barrier #else int n_passed = atomic_load_explicit(&tp->n_barrier_passed, memory_order_relaxed); // enter barrier (full seq-cst fence) int n_barrier = atomic_fetch_add_explicit(&tp->n_barrier, 1, memory_order_seq_cst); if (n_barrier == (n_threads - 1)) { // last thread atomic_store_explicit(&tp->n_barrier, 0, memory_order_relaxed); // exit barrier (fill seq-cst fence) atomic_fetch_add_explicit(&tp->n_barrier_passed, 1, memory_order_seq_cst); return; } // wait for other threads while (atomic_load_explicit(&tp->n_barrier_passed, memory_order_relaxed) == n_passed) { ggml_thread_cpu_relax(); } // exit barrier (full seq-cst fence) // TSAN doesn't support standalone fence yet, we use a dummy read-modify-write instead #ifdef GGML_TSAN_ENABLED atomic_fetch_add_explicit(&tp->n_barrier_passed, 0, memory_order_seq_cst); #else atomic_thread_fence(memory_order_seq_cst); #endif #endif }
O1
c
ggml_barrier: movl 0xdc(%rdi), %ecx cmpl $0x1, %ecx je 0x8fe4 movl 0xc0(%rdi), %eax movl $0x1, %edx lock xaddl %edx, 0x80(%rdi) decl %ecx cmpl %ecx, %edx jne 0x8fd3 movl $0x0, 0x80(%rdi) lock incl 0xc0(%rdi) retq movl 0xc0(%rdi), %ecx cmpl %eax, %ecx jne 0x8fe1 pause jmp 0x8fd3 mfence retq
ggml_barrier: mov ecx, [rdi+0DCh] cmp ecx, 1 jz short locret_8FE4 mov eax, [rdi+0C0h] mov edx, 1 lock xadd [rdi+80h], edx dec ecx cmp edx, ecx jnz short loc_8FD3 mov dword ptr [rdi+80h], 0 lock inc dword ptr [rdi+0C0h] retn loc_8FD3: mov ecx, [rdi+0C0h] cmp ecx, eax jnz short loc_8FE1 pause jmp short loc_8FD3 loc_8FE1: mfence locret_8FE4: retn
void ggml_barrier(long long a1) { int v1; // ecx int v2; // eax v1 = *(_DWORD *)(a1 + 220); if ( v1 != 1 ) { v2 = *(_DWORD *)(a1 + 192); if ( _InterlockedExchangeAdd((volatile signed __int32 *)(a1 + 128), 1u) == v1 - 1 ) { *(_DWORD *)(a1 + 128) = 0; _InterlockedIncrement((volatile signed __int32 *)(a1 + 192)); } else { while ( *(_DWORD *)(a1 + 192) == v2 ) _mm_pause(); _mm_mfence(); } } }
ggml_barrier: MOV ECX,dword ptr [RDI + 0xdc] CMP ECX,0x1 JZ 0x00108fe4 MOV EAX,dword ptr [RDI + 0xc0] MOV EDX,0x1 XADD.LOCK dword ptr [RDI + 0x80],EDX DEC ECX CMP EDX,ECX JNZ 0x00108fd3 MOV dword ptr [RDI + 0x80],0x0 INC.LOCK dword ptr [RDI + 0xc0] RET LAB_00108fd3: MOV ECX,dword ptr [RDI + 0xc0] CMP ECX,EAX JNZ 0x00108fe1 PAUSE JMP 0x00108fd3 LAB_00108fe1: MFENCE LAB_00108fe4: RET
void ggml_barrier(long param_1) { int *piVar1; int iVar2; if (*(int *)(param_1 + 0xdc) != 1) { LOCK(); piVar1 = (int *)(param_1 + 0x80); iVar2 = *piVar1; *piVar1 = *piVar1 + 1; UNLOCK(); if (iVar2 == *(int *)(param_1 + 0xdc) + -1) { *(int4 *)(param_1 + 0x80) = 0; LOCK(); *(int *)(param_1 + 0xc0) = *(int *)(param_1 + 0xc0) + 1; UNLOCK(); return; } do { } while (*(int *)(param_1 + 0xc0) == *(int *)(param_1 + 0xc0)); } return; }
61,636
ggml_barrier
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
void ggml_barrier(struct ggml_threadpool * tp) { int n_threads = atomic_load_explicit(&tp->n_threads_cur, memory_order_relaxed); if (n_threads == 1) { return; } #ifdef GGML_USE_OPENMP #pragma omp barrier #else int n_passed = atomic_load_explicit(&tp->n_barrier_passed, memory_order_relaxed); // enter barrier (full seq-cst fence) int n_barrier = atomic_fetch_add_explicit(&tp->n_barrier, 1, memory_order_seq_cst); if (n_barrier == (n_threads - 1)) { // last thread atomic_store_explicit(&tp->n_barrier, 0, memory_order_relaxed); // exit barrier (fill seq-cst fence) atomic_fetch_add_explicit(&tp->n_barrier_passed, 1, memory_order_seq_cst); return; } // wait for other threads while (atomic_load_explicit(&tp->n_barrier_passed, memory_order_relaxed) == n_passed) { ggml_thread_cpu_relax(); } // exit barrier (full seq-cst fence) // TSAN doesn't support standalone fence yet, we use a dummy read-modify-write instead #ifdef GGML_TSAN_ENABLED atomic_fetch_add_explicit(&tp->n_barrier_passed, 0, memory_order_seq_cst); #else atomic_thread_fence(memory_order_seq_cst); #endif #endif }
O2
c
ggml_barrier: movl 0xdc(%rdi), %ecx cmpl $0x1, %ecx je 0x8f72 movl 0xc0(%rdi), %eax pushq $0x1 popq %rdx lock xaddl %edx, 0x80(%rdi) decl %ecx cmpl %ecx, %edx jne 0x8f61 movl $0x0, 0x80(%rdi) lock incl 0xc0(%rdi) retq movl 0xc0(%rdi), %ecx cmpl %eax, %ecx jne 0x8f6f pause jmp 0x8f61 mfence retq
ggml_barrier: mov ecx, [rdi+0DCh] cmp ecx, 1 jz short locret_8F72 mov eax, [rdi+0C0h] push 1 pop rdx lock xadd [rdi+80h], edx dec ecx cmp edx, ecx jnz short loc_8F61 mov dword ptr [rdi+80h], 0 lock inc dword ptr [rdi+0C0h] retn loc_8F61: mov ecx, [rdi+0C0h] cmp ecx, eax jnz short loc_8F6F pause jmp short loc_8F61 loc_8F6F: mfence locret_8F72: retn
void ggml_barrier(long long a1) { int v1; // ecx int v2; // eax v1 = *(_DWORD *)(a1 + 220); if ( v1 != 1 ) { v2 = *(_DWORD *)(a1 + 192); if ( _InterlockedExchangeAdd((volatile signed __int32 *)(a1 + 128), 1u) == v1 - 1 ) { *(_DWORD *)(a1 + 128) = 0; _InterlockedIncrement((volatile signed __int32 *)(a1 + 192)); } else { while ( *(_DWORD *)(a1 + 192) == v2 ) _mm_pause(); _mm_mfence(); } } }
ggml_barrier: MOV ECX,dword ptr [RDI + 0xdc] CMP ECX,0x1 JZ 0x00108f72 MOV EAX,dword ptr [RDI + 0xc0] PUSH 0x1 POP RDX XADD.LOCK dword ptr [RDI + 0x80],EDX DEC ECX CMP EDX,ECX JNZ 0x00108f61 MOV dword ptr [RDI + 0x80],0x0 INC.LOCK dword ptr [RDI + 0xc0] RET LAB_00108f61: MOV ECX,dword ptr [RDI + 0xc0] CMP ECX,EAX JNZ 0x00108f6f PAUSE JMP 0x00108f61 LAB_00108f6f: MFENCE LAB_00108f72: RET
void ggml_barrier(long param_1) { int *piVar1; int iVar2; if (*(int *)(param_1 + 0xdc) != 1) { LOCK(); piVar1 = (int *)(param_1 + 0x80); iVar2 = *piVar1; *piVar1 = *piVar1 + 1; UNLOCK(); if (iVar2 == *(int *)(param_1 + 0xdc) + -1) { *(int4 *)(param_1 + 0x80) = 0; LOCK(); *(int *)(param_1 + 0xc0) = *(int *)(param_1 + 0xc0) + 1; UNLOCK(); return; } do { } while (*(int *)(param_1 + 0xc0) == *(int *)(param_1 + 0xc0)); } return; }
61,637
ggml_barrier
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
void ggml_barrier(struct ggml_threadpool * tp) { int n_threads = atomic_load_explicit(&tp->n_threads_cur, memory_order_relaxed); if (n_threads == 1) { return; } #ifdef GGML_USE_OPENMP #pragma omp barrier #else int n_passed = atomic_load_explicit(&tp->n_barrier_passed, memory_order_relaxed); // enter barrier (full seq-cst fence) int n_barrier = atomic_fetch_add_explicit(&tp->n_barrier, 1, memory_order_seq_cst); if (n_barrier == (n_threads - 1)) { // last thread atomic_store_explicit(&tp->n_barrier, 0, memory_order_relaxed); // exit barrier (fill seq-cst fence) atomic_fetch_add_explicit(&tp->n_barrier_passed, 1, memory_order_seq_cst); return; } // wait for other threads while (atomic_load_explicit(&tp->n_barrier_passed, memory_order_relaxed) == n_passed) { ggml_thread_cpu_relax(); } // exit barrier (full seq-cst fence) // TSAN doesn't support standalone fence yet, we use a dummy read-modify-write instead #ifdef GGML_TSAN_ENABLED atomic_fetch_add_explicit(&tp->n_barrier_passed, 0, memory_order_seq_cst); #else atomic_thread_fence(memory_order_seq_cst); #endif #endif }
O3
c
ggml_barrier: movl 0xdc(%rdi), %ecx cmpl $0x1, %ecx je 0x8fe4 movl 0xc0(%rdi), %eax movl $0x1, %edx lock xaddl %edx, 0x80(%rdi) decl %ecx cmpl %ecx, %edx jne 0x8fd3 movl $0x0, 0x80(%rdi) lock incl 0xc0(%rdi) retq movl 0xc0(%rdi), %ecx cmpl %eax, %ecx jne 0x8fe1 pause jmp 0x8fd3 mfence retq
ggml_barrier: mov ecx, [rdi+0DCh] cmp ecx, 1 jz short locret_8FE4 mov eax, [rdi+0C0h] mov edx, 1 lock xadd [rdi+80h], edx dec ecx cmp edx, ecx jnz short loc_8FD3 mov dword ptr [rdi+80h], 0 lock inc dword ptr [rdi+0C0h] retn loc_8FD3: mov ecx, [rdi+0C0h] cmp ecx, eax jnz short loc_8FE1 pause jmp short loc_8FD3 loc_8FE1: mfence locret_8FE4: retn
void ggml_barrier(long long a1) { int v1; // ecx int v2; // eax v1 = *(_DWORD *)(a1 + 220); if ( v1 != 1 ) { v2 = *(_DWORD *)(a1 + 192); if ( _InterlockedExchangeAdd((volatile signed __int32 *)(a1 + 128), 1u) == v1 - 1 ) { *(_DWORD *)(a1 + 128) = 0; _InterlockedIncrement((volatile signed __int32 *)(a1 + 192)); } else { while ( *(_DWORD *)(a1 + 192) == v2 ) _mm_pause(); _mm_mfence(); } } }
ggml_barrier: MOV ECX,dword ptr [RDI + 0xdc] CMP ECX,0x1 JZ 0x00108fe4 MOV EAX,dword ptr [RDI + 0xc0] MOV EDX,0x1 XADD.LOCK dword ptr [RDI + 0x80],EDX DEC ECX CMP EDX,ECX JNZ 0x00108fd3 MOV dword ptr [RDI + 0x80],0x0 INC.LOCK dword ptr [RDI + 0xc0] RET LAB_00108fd3: MOV ECX,dword ptr [RDI + 0xc0] CMP ECX,EAX JNZ 0x00108fe1 PAUSE JMP 0x00108fd3 LAB_00108fe1: MFENCE LAB_00108fe4: RET
void ggml_barrier(long param_1) { int *piVar1; int iVar2; if (*(int *)(param_1 + 0xdc) != 1) { LOCK(); piVar1 = (int *)(param_1 + 0x80); iVar2 = *piVar1; *piVar1 = *piVar1 + 1; UNLOCK(); if (iVar2 == *(int *)(param_1 + 0xdc) + -1) { *(int4 *)(param_1 + 0x80) = 0; LOCK(); *(int *)(param_1 + 0xc0) = *(int *)(param_1 + 0xc0) + 1; UNLOCK(); return; } do { } while (*(int *)(param_1 + 0xc0) == *(int *)(param_1 + 0xc0)); } return; }
61,638
translog_variable_record_length_bytes
eloqsql/storage/maria/ma_loghandler.c
static uint translog_variable_record_length_bytes(translog_size_t length) { if (length < 250) return 1; if (length < 0xFFFF) return 3; if (length < (ulong) 0xFFFFFF) return 4; return 5; }
O0
c
translog_variable_record_length_bytes: pushq %rbp movq %rsp, %rbp movl %edi, -0x8(%rbp) cmpl $0xfa, -0x8(%rbp) jae 0x599f9 movl $0x1, -0x4(%rbp) jmp 0x59a26 cmpl $0xffff, -0x8(%rbp) # imm = 0xFFFF jae 0x59a0b movl $0x3, -0x4(%rbp) jmp 0x59a26 movl -0x8(%rbp), %eax cmpq $0xffffff, %rax # imm = 0xFFFFFF jae 0x59a1f movl $0x4, -0x4(%rbp) jmp 0x59a26 movl $0x5, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
translog_variable_record_length_bytes: push rbp mov rbp, rsp mov [rbp+var_8], edi cmp [rbp+var_8], 0FAh jnb short loc_599F9 mov [rbp+var_4], 1 jmp short loc_59A26 loc_599F9: cmp [rbp+var_8], 0FFFFh jnb short loc_59A0B mov [rbp+var_4], 3 jmp short loc_59A26 loc_59A0B: mov eax, [rbp+var_8] cmp rax, 0FFFFFFh jnb short loc_59A1F mov [rbp+var_4], 4 jmp short loc_59A26 loc_59A1F: mov [rbp+var_4], 5 loc_59A26: mov eax, [rbp+var_4] pop rbp retn
long long translog_variable_record_length_bytes(unsigned int a1) { if ( a1 >= 0xFA ) { if ( a1 >= 0xFFFF ) { if ( a1 >= 0xFFFFFFuLL ) return 5; else return 4; } else { return 3; } } else { return 1; } }
translog_variable_record_length_bytes: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x8],EDI CMP dword ptr [RBP + -0x8],0xfa JNC 0x001599f9 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00159a26 LAB_001599f9: CMP dword ptr [RBP + -0x8],0xffff JNC 0x00159a0b MOV dword ptr [RBP + -0x4],0x3 JMP 0x00159a26 LAB_00159a0b: MOV EAX,dword ptr [RBP + -0x8] CMP RAX,0xffffff JNC 0x00159a1f MOV dword ptr [RBP + -0x4],0x4 JMP 0x00159a26 LAB_00159a1f: MOV dword ptr [RBP + -0x4],0x5 LAB_00159a26: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 translog_variable_record_length_bytes(uint param_1) { int4 local_c; if (param_1 < 0xfa) { local_c = 1; } else if (param_1 < 0xffff) { local_c = 3; } else if (param_1 < 0xffffff) { local_c = 4; } else { local_c = 5; } return local_c; }
61,639
limb_to_ntt
bluesky950520[P]quickjs/libbf.c
static no_inline void limb_to_ntt(BFNTTState *s, NTTLimb *tabr, limb_t fft_len, const limb_t *taba, limb_t a_len, int dpl, int first_m_idx, int nb_mods) { slimb_t i, n; dlimb_t a, b; int j, shift; limb_t base_mask1, a0, a1, a2, r, m, m_inv; memset(tabr, 0, sizeof(NTTLimb) * fft_len * nb_mods); shift = dpl & (LIMB_BITS - 1); if (shift == 0) base_mask1 = -1; else base_mask1 = ((limb_t)1 << shift) - 1; n = bf_min(fft_len, (a_len * LIMB_BITS + dpl - 1) / dpl); for(i = 0; i < n; i++) { a0 = get_bits(taba, a_len, i * dpl); if (dpl <= LIMB_BITS) { a0 &= base_mask1; a = a0; } else { a1 = get_bits(taba, a_len, i * dpl + LIMB_BITS); if (dpl <= (LIMB_BITS + NTT_MOD_LOG2_MIN)) { a = a0 | ((dlimb_t)(a1 & base_mask1) << LIMB_BITS); } else { if (dpl > 2 * LIMB_BITS) { a2 = get_bits(taba, a_len, i * dpl + LIMB_BITS * 2) & base_mask1; } else { a1 &= base_mask1; a2 = 0; } // printf("a=0x%016lx%016lx%016lx\n", a2, a1, a0); a = (a0 >> (LIMB_BITS - NTT_MOD_LOG2_MAX + NTT_MOD_LOG2_MIN)) | ((dlimb_t)a1 << (NTT_MOD_LOG2_MAX - NTT_MOD_LOG2_MIN)) | ((dlimb_t)a2 << (LIMB_BITS + NTT_MOD_LOG2_MAX - NTT_MOD_LOG2_MIN)); a0 &= ((limb_t)1 << (LIMB_BITS - NTT_MOD_LOG2_MAX + NTT_MOD_LOG2_MIN)) - 1; } } for(j = 0; j < nb_mods; j++) { m = ntt_mods[first_m_idx + j]; m_inv = s->ntt_mods_div[first_m_idx + j]; r = mod_fast(a, m, m_inv); if (dpl > (LIMB_BITS + NTT_MOD_LOG2_MIN)) { b = ((dlimb_t)r << (LIMB_BITS - NTT_MOD_LOG2_MAX + NTT_MOD_LOG2_MIN)) | a0; r = mod_fast(b, m, m_inv); } tabr[i + j * fft_len] = int_to_ntt_limb(r, m); } } }
O3
c
limb_to_ntt: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movl %r9d, %ebx movq %r8, %r14 movq %rcx, 0x8(%rsp) movq %rdx, %r15 movq %rdi, %r13 movslq 0x98(%rsp), %rcx movq %rcx, 0x18(%rsp) imulq %rcx, %rdx shlq $0x3, %rdx xorl %r12d, %r12d movq %rsi, 0x20(%rsp) movq %rsi, %rdi xorl %esi, %esi callq 0xe340 movl %ebx, %ecx andl $0x3f, %ecx movq $-0x1, %rsi shlq %cl, %rsi cmpl $0x1, %ecx sbbq %r12, %r12 movq %r12, 0x10(%rsp) movq %r14, %rax shlq $0x6, %rax movslq %ebx, %rcx addq %rcx, %rax decq %rax xorl %edx, %edx movq %rcx, 0x38(%rsp) divq %rcx cmpq %rax, %r15 cmovlq %r15, %rax movq %rax, 0x30(%rsp) testq %rax, %rax jle 0x95444 movq %r15, %r9 notq %rsi orq %rsi, 0x10(%rsp) movslq 0x90(%rsp), %r8 movl 0x18(%rsp), %r10d leaq 0x8(,%r8,8), %rax addq %r13, %rax movq %rax, 0x50(%rsp) shlq $0x3, %r8 shlq $0x3, %r9 xorl %r11d, %r11d movq %r14, 0x28(%rsp) movq %r11, %rax imulq 0x38(%rsp), %rax movq %rax, %rcx sarq $0x6, %rcx cmpq %r14, %rcx jae 0x95208 movq 0x8(%rsp), %rdx movq (%rdx,%rcx,8), %rdx movq %rdx, (%rsp) jmp 0x95210 movq $0x0, (%rsp) movl %eax, %edx andl $0x3f, %edx je 0x95245 leaq 0x1(%rcx), %rsi cmpq %r14, %rsi jae 0x9522c movq 0x8(%rsp), %rsi movq 0x8(%rsi,%rcx,8), %rsi jmp 0x9522e xorl %esi, %esi movl %eax, %ecx movq (%rsp), %rdi shrq %cl, %rdi movl %edx, %ecx negb %cl shlq %cl, %rsi orq %rsi, %rdi movq %rdi, (%rsp) cmpl $0x40, %ebx movq %r11, 0x40(%rsp) jg 0x95266 movq (%rsp), %rcx andq 0x10(%rsp), %rcx movq %rcx, (%rsp) movq %rcx, %rsi xorl %ebp, %ebp jmp 0x95331 leaq 0x40(%rax), %rcx shrq $0x6, %rcx cmpq %r14, %rcx jae 0x9527e movq 0x8(%rsp), %rsi movq (%rsi,%rcx,8), %rsi jmp 0x95280 xorl %esi, %esi testl %edx, %edx je 0x952aa leaq 0x1(%rcx), %rdi cmpq %r14, %rdi jae 0x95299 movq 0x8(%rsp), %rdi movq 0x8(%rdi,%rcx,8), %rdi jmp 0x9529b xorl %edi, %edi movl %eax, %ecx shrq %cl, %rsi movl %edx, %ecx negb %cl shlq %cl, %rdi orq %rdi, %rsi cmpl $0x7d, %ebx ja 0x952bd movq %rsi, %rbp andq 0x10(%rsp), %rbp movq (%rsp), %rsi jmp 0x95331 cmpl $0x81, %ebx jb 0x952e0 leaq 0x80(%rax), %rcx shrq $0x6, %rcx cmpq %r14, %rcx jae 0x952e9 movq 0x8(%rsp), %rdi movq (%rdi,%rcx,8), %rbp jmp 0x952eb andq 0x10(%rsp), %rsi xorl %ebp, %ebp jmp 0x9531a xorl %ebp, %ebp testl %edx, %edx je 0x95315 leaq 0x1(%rcx), %rdi cmpq %r14, %rdi jae 0x95304 movq 0x8(%rsp), %rdi movq 0x8(%rdi,%rcx,8), %rdi jmp 0x95306 xorl %edi, %edi movl %eax, %ecx shrq %cl, %rbp negb %dl movl %edx, %ecx shlq %cl, %rdi orq %rdi, %rbp andq 0x10(%rsp), %rbp shldq $0x1, %rsi, %rbp movq (%rsp), %rax shldq $0x1, %rax, %rsi btrq $0x3f, %rax movq %rax, (%rsp) cmpl $0x0, 0x18(%rsp) jle 0x95426 movq %rbp, %rcx shldq $0x3, %rsi, %rcx movq 0x20(%rsp), %r13 xorl %r14d, %r14d movq %rcx, 0x48(%rsp) leaq (%r8,%r14,8), %rax leaq 0xf5b4(%rip), %rdx # 0xa4910 movq (%rdx,%rax), %r11 movq 0x50(%rsp), %rax movq (%rax,%r14,8), %r15 movq %rcx, %rax mulq %r15 movq %rdx, %rax mulq %r11 leaq (%r11,%r11), %r12 addq %r12, %rax adcq $0x0, %rdx movq %rsi, %rdi subq %rax, %rdi movq %rbp, %rax sbbq %rdx, %rax movq %rax, %rdx sarq %rdx andq %r11, %rdx addq %rdi, %rdx adcq $0x0, %rax andq %r11, %rax leaq (%rax,%rdx), %rdi cmpl $0x7e, %ebx jl 0x95413 movq %rbp, %rcx movq %rsi, %rbp movq %r10, %rsi movq %r8, %r10 movq %r9, %r8 movl %ebx, %r9d movq %rdi, %rbx shlq $0x3f, %rbx orq (%rsp), %rbx shrq %rdi movq %rdi, %rax shldq $0x3, %rbx, %rax mulq %r15 movq %rdx, %rax mulq %r11 addq %r12, %rax adcq $0x0, %rdx subq %rax, %rbx sbbq %rdx, %rdi movq %rdi, %rax sarq %rax andq %r11, %rax addq %rbx, %rax movl %r9d, %ebx movq %r8, %r9 movq %r10, %r8 movq %rsi, %r10 movq %rbp, %rsi movq %rcx, %rbp movq 0x48(%rsp), %rcx adcq $0x0, %rdi andq %r11, %rdi addq %rax, %rdi movq %rdi, (%r13) incq %r14 addq %r9, %r13 cmpq %r14, %r10 jne 0x95351 movq 0x40(%rsp), %r11 incq %r11 addq $0x8, 0x20(%rsp) cmpq 0x30(%rsp), %r11 movq 0x28(%rsp), %r14 jl 0x951e4 addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
limb_to_ntt: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov ebx, r9d mov r14, r8 mov [rsp+88h+var_80], rcx mov r15, rdx mov r13, rdi movsxd rcx, [rsp+88h+arg_8] mov [rsp+88h+var_70], rcx imul rdx, rcx shl rdx, 3 xor r12d, r12d mov [rsp+88h+var_68], rsi mov rdi, rsi xor esi, esi call _memset mov ecx, ebx and ecx, 3Fh mov rsi, 0FFFFFFFFFFFFFFFFh shl rsi, cl cmp ecx, 1 sbb r12, r12 mov [rsp+88h+var_78], r12 mov rax, r14 shl rax, 6 movsxd rcx, ebx add rax, rcx dec rax xor edx, edx mov [rsp+88h+var_50], rcx div rcx cmp r15, rax cmovl rax, r15 mov [rsp+88h+var_58], rax test rax, rax jle loc_95444 mov r9, r15 not rsi or [rsp+88h+var_78], rsi movsxd r8, [rsp+88h+arg_0] mov r10d, dword ptr [rsp+88h+var_70] lea rax, ds:8[r8*8] add rax, r13 mov [rsp+88h+var_38], rax shl r8, 3 shl r9, 3 xor r11d, r11d mov [rsp+88h+var_60], r14 loc_951E4: mov rax, r11 imul rax, [rsp+88h+var_50] mov rcx, rax sar rcx, 6 cmp rcx, r14 jnb short loc_95208 mov rdx, [rsp+88h+var_80] mov rdx, [rdx+rcx*8] mov [rsp+88h+var_88], rdx jmp short loc_95210 loc_95208: mov [rsp+88h+var_88], 0 loc_95210: mov edx, eax and edx, 3Fh jz short loc_95245 lea rsi, [rcx+1] cmp rsi, r14 jnb short loc_9522C mov rsi, [rsp+88h+var_80] mov rsi, [rsi+rcx*8+8] jmp short loc_9522E loc_9522C: xor esi, esi loc_9522E: mov ecx, eax mov rdi, [rsp+88h+var_88] shr rdi, cl mov ecx, edx neg cl shl rsi, cl or rdi, rsi mov [rsp+88h+var_88], rdi loc_95245: cmp ebx, 40h ; '@' mov [rsp+88h+var_48], r11 jg short loc_95266 mov rcx, [rsp+88h+var_88] and rcx, [rsp+88h+var_78] mov [rsp+88h+var_88], rcx mov rsi, rcx xor ebp, ebp jmp loc_95331 loc_95266: lea rcx, [rax+40h] shr rcx, 6 cmp rcx, r14 jnb short loc_9527E mov rsi, [rsp+88h+var_80] mov rsi, [rsi+rcx*8] jmp short loc_95280 loc_9527E: xor esi, esi loc_95280: test edx, edx jz short loc_952AA lea rdi, [rcx+1] cmp rdi, r14 jnb short loc_95299 mov rdi, [rsp+88h+var_80] mov rdi, [rdi+rcx*8+8] jmp short loc_9529B loc_95299: xor edi, edi loc_9529B: mov ecx, eax shr rsi, cl mov ecx, edx neg cl shl rdi, cl or rsi, rdi loc_952AA: cmp ebx, 7Dh ; '}' ja short loc_952BD mov rbp, rsi and rbp, [rsp+88h+var_78] mov rsi, [rsp+88h+var_88] jmp short loc_95331 loc_952BD: cmp ebx, 81h jb short loc_952E0 lea rcx, [rax+80h] shr rcx, 6 cmp rcx, r14 jnb short loc_952E9 mov rdi, [rsp+88h+var_80] mov rbp, [rdi+rcx*8] jmp short loc_952EB loc_952E0: and rsi, [rsp+88h+var_78] xor ebp, ebp jmp short loc_9531A loc_952E9: xor ebp, ebp loc_952EB: test edx, edx jz short loc_95315 lea rdi, [rcx+1] cmp rdi, r14 jnb short loc_95304 mov rdi, [rsp+88h+var_80] mov rdi, [rdi+rcx*8+8] jmp short loc_95306 loc_95304: xor edi, edi loc_95306: mov ecx, eax shr rbp, cl neg dl mov ecx, edx shl rdi, cl or rbp, rdi loc_95315: and rbp, [rsp+88h+var_78] loc_9531A: shld rbp, rsi, 1 mov rax, [rsp+88h+var_88] shld rsi, rax, 1 btr rax, 3Fh ; '?' mov [rsp+88h+var_88], rax loc_95331: cmp dword ptr [rsp+88h+var_70], 0 jle loc_95426 mov rcx, rbp shld rcx, rsi, 3 mov r13, [rsp+88h+var_68] xor r14d, r14d mov [rsp+88h+var_40], rcx loc_95351: lea rax, [r8+r14*8] lea rdx, ntt_mods mov r11, [rdx+rax] mov rax, [rsp+88h+var_38] mov r15, [rax+r14*8] mov rax, rcx mul r15 mov rax, rdx mul r11 lea r12, [r11+r11] add rax, r12 adc rdx, 0 mov rdi, rsi sub rdi, rax mov rax, rbp sbb rax, rdx mov rdx, rax sar rdx, 1 and rdx, r11 add rdx, rdi adc rax, 0 and rax, r11 lea rdi, [rax+rdx] cmp ebx, 7Eh ; '~' jl short loc_95413 mov rcx, rbp mov rbp, rsi mov rsi, r10 mov r10, r8 mov r8, r9 mov r9d, ebx mov rbx, rdi shl rbx, 3Fh or rbx, [rsp+88h+var_88] shr rdi, 1 mov rax, rdi shld rax, rbx, 3 mul r15 mov rax, rdx mul r11 add rax, r12 adc rdx, 0 sub rbx, rax sbb rdi, rdx mov rax, rdi sar rax, 1 and rax, r11 add rax, rbx mov ebx, r9d mov r9, r8 mov r8, r10 mov r10, rsi mov rsi, rbp mov rbp, rcx mov rcx, [rsp+88h+var_40] adc rdi, 0 and rdi, r11 add rdi, rax loc_95413: mov [r13+0], rdi inc r14 add r13, r9 cmp r10, r14 jnz loc_95351 loc_95426: mov r11, [rsp+88h+var_48] inc r11 add [rsp+88h+var_68], 8 cmp r11, [rsp+88h+var_58] mov r14, [rsp+88h+var_60] jl loc_951E4 loc_95444: add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long limb_to_ntt( long long a1, unsigned long long *a2, long long a3, long long a4, unsigned long long a5, int a6, int a7, int a8) { long long result; // rax long long v12; // r10 long long v13; // r8 long long v14; // r9 long long v15; // r11 unsigned long long v16; // rcx char v17; // dl long long v18; // rsi unsigned long long v19; // rsi unsigned long long v20; // rbp unsigned long long v21; // rcx unsigned long long v22; // rsi long long v23; // rdi unsigned long long v24; // rcx unsigned long long v25; // rbp long long v26; // rbp long long v27; // rdi __int128 v28; // rt0 unsigned long long v29; // rcx __int128 v30; // rt0 unsigned long long *v31; // r13 long long v32; // r14 unsigned long long v33; // r11 unsigned long long v34; // r15 unsigned long long v35; // rdi unsigned long long v36; // rcx unsigned long long v37; // rbp long long v38; // rsi long long v39; // r10 long long v40; // r8 int v41; // r9d unsigned long long v42; // rbx unsigned long long v43; // rdi __int128 v44; // rt0 long long v45; // rdi unsigned long long v46; // kr30_8 unsigned long long v47; // [rsp+0h] [rbp-88h] long long v49; // [rsp+10h] [rbp-78h] unsigned long long *v50; // [rsp+20h] [rbp-68h] unsigned long long v51; // [rsp+28h] [rbp-60h] long long v52; // [rsp+30h] [rbp-58h] long long v53; // [rsp+38h] [rbp-50h] long long v54; // [rsp+40h] [rbp-48h] unsigned long long v55; // [rsp+48h] [rbp-40h] long long v56; // [rsp+50h] [rbp-38h] v50 = a2; memset(a2, 0LL, 8 * a8 * a3); v53 = a6; result = (a6 + (a5 << 6) - 1) / a6; if ( a3 < result ) result = a3; v52 = result; if ( result > 0 ) { v49 = ~(-1LL << (a6 & 0x3F)) | -(long long)((a6 & 0x3F) == 0); v12 = (unsigned int)a8; v56 = a1 + 8LL * a7 + 8; v13 = 8LL * a7; v14 = 8 * a3; v15 = 0LL; v51 = a5; do { result = v53 * v15; v16 = (v53 * v15) >> 6; if ( v16 >= a5 ) v47 = 0LL; else v47 = *(_QWORD *)(a4 + 8 * v16); v17 = result & 0x3F; if ( (result & 0x3F) != 0 ) { if ( v16 + 1 >= a5 ) v18 = 0LL; else v18 = *(_QWORD *)(a4 + 8 * v16 + 8); v47 = (v18 << -v17) | (v47 >> result); } v54 = v15; if ( a6 > 64 ) { v21 = (unsigned long long)(result + 64) >> 6; if ( v21 >= a5 ) v22 = 0LL; else v22 = *(_QWORD *)(a4 + 8 * v21); if ( (result & 0x3F) != 0 ) { if ( v21 + 1 >= a5 ) v23 = 0LL; else v23 = *(_QWORD *)(a4 + 8 * v21 + 8); v22 = (v23 << -v17) | (v22 >> result); } if ( (unsigned int)a6 > 0x7D ) { if ( (unsigned int)a6 < 0x81 ) { v22 &= v49; v26 = 0LL; } else { v24 = (unsigned long long)(result + 128) >> 6; if ( v24 >= a5 ) v25 = 0LL; else v25 = *(_QWORD *)(a4 + 8 * v24); if ( (result & 0x3F) != 0 ) { if ( v24 + 1 >= a5 ) v27 = 0LL; else v27 = *(_QWORD *)(a4 + 8 * v24 + 8); v25 = (v27 << -v17) | (v25 >> result); } v26 = v49 & v25; } *((_QWORD *)&v28 + 1) = v26; *(_QWORD *)&v28 = v22; v20 = v28 >> 63; *((_QWORD *)&v28 + 1) = v22; *(_QWORD *)&v28 = v47; v19 = v28 >> 63; result = v47 & 0x7FFFFFFFFFFFFFFFLL; v47 &= ~0x8000000000000000LL; } else { v20 = v49 & v22; v19 = v47; } } else { v47 &= v49; v19 = v47; v20 = 0LL; } if ( a8 > 0 ) { *((_QWORD *)&v30 + 1) = v20; *(_QWORD *)&v30 = v19; v29 = v30 >> 61; v31 = v50; v32 = 0LL; v55 = v29; do { v33 = *(_QWORD *)((char *)&ntt_mods[v32] + v13); v34 = *(_QWORD *)(v56 + 8 * v32); result = v33 & ((__PAIR128__(v20, v19) - (2 * v33 + v33 * ((v34 * (unsigned __int128)v29) >> 64)) + (v33 & ((long long)((__PAIR128__(v20, v19) - (2 * v33 + v33 * ((v34 * (unsigned __int128)v29) >> 64))) >> 64) >> 1))) >> 64); v35 = result + v19 - (2 * v33 + v33 * ((v34 * (unsigned __int128)v29) >> 64)) + (v33 & ((long long)((__PAIR128__(v20, v19) - (2 * v33 + v33 * ((v34 * (unsigned __int128)v29) >> 64))) >> 64) >> 1)); if ( a6 >= 126 ) { v36 = v20; v37 = v19; v38 = v12; v39 = v13; v40 = v14; v41 = a6; v42 = v47 | (v35 << 63); v43 = v35 >> 1; *((_QWORD *)&v44 + 1) = v43; *(_QWORD *)&v44 = v42; v46 = v42 - (2 * v33 + v33 * ((v34 * (unsigned __int128)(unsigned long long)(v44 >> 61)) >> 64)); v45 = (__PAIR128__(v43, v42) - (2 * v33 + v33 * ((v34 * (unsigned __int128)(unsigned long long)(v44 >> 61)) >> 64))) >> 64; a6 = v41; v14 = v40; v13 = v39; v12 = v38; v19 = v37; v20 = v36; v29 = v55; result = v46 + (v33 & (v45 >> 1)); v35 = result + (v33 & ((__PAIR128__(v45, v46) + (v33 & (v45 >> 1))) >> 64)); } *v31 = v35; ++v32; v31 = (unsigned long long *)((char *)v31 + v14); } while ( v12 != v32 ); } v15 = v54 + 1; ++v50; a5 = v51; } while ( v54 + 1 < v52 ); } return result; }
limb_to_ntt: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV EBX,R9D MOV R14,R8 MOV qword ptr [RSP + 0x8],RCX MOV R15,RDX MOV R13,RDI MOVSXD RCX,dword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x18],RCX IMUL RDX,RCX SHL RDX,0x3 XOR R12D,R12D MOV qword ptr [RSP + 0x20],RSI MOV RDI,RSI XOR ESI,ESI CALL 0x0010e340 MOV ECX,EBX AND ECX,0x3f MOV RSI,-0x1 SHL RSI,CL CMP ECX,0x1 SBB R12,R12 MOV qword ptr [RSP + 0x10],R12 MOV RAX,R14 SHL RAX,0x6 MOVSXD RCX,EBX ADD RAX,RCX DEC RAX XOR EDX,EDX MOV qword ptr [RSP + 0x38],RCX DIV RCX CMP R15,RAX CMOVL RAX,R15 MOV qword ptr [RSP + 0x30],RAX TEST RAX,RAX JLE 0x00195444 MOV R9,R15 NOT RSI OR qword ptr [RSP + 0x10],RSI MOVSXD R8,dword ptr [RSP + 0x90] MOV R10D,dword ptr [RSP + 0x18] LEA RAX,[0x8 + R8*0x8] ADD RAX,R13 MOV qword ptr [RSP + 0x50],RAX SHL R8,0x3 SHL R9,0x3 XOR R11D,R11D MOV qword ptr [RSP + 0x28],R14 LAB_001951e4: MOV RAX,R11 IMUL RAX,qword ptr [RSP + 0x38] MOV RCX,RAX SAR RCX,0x6 CMP RCX,R14 JNC 0x00195208 MOV RDX,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RDX + RCX*0x8] MOV qword ptr [RSP],RDX JMP 0x00195210 LAB_00195208: MOV qword ptr [RSP],0x0 LAB_00195210: MOV EDX,EAX AND EDX,0x3f JZ 0x00195245 LEA RSI,[RCX + 0x1] CMP RSI,R14 JNC 0x0019522c MOV RSI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSI + RCX*0x8 + 0x8] JMP 0x0019522e LAB_0019522c: XOR ESI,ESI LAB_0019522e: MOV ECX,EAX MOV RDI,qword ptr [RSP] SHR RDI,CL MOV ECX,EDX NEG CL SHL RSI,CL OR RDI,RSI MOV qword ptr [RSP],RDI LAB_00195245: CMP EBX,0x40 MOV qword ptr [RSP + 0x40],R11 JG 0x00195266 MOV RCX,qword ptr [RSP] AND RCX,qword ptr [RSP + 0x10] MOV qword ptr [RSP],RCX MOV RSI,RCX XOR EBP,EBP JMP 0x00195331 LAB_00195266: LEA RCX,[RAX + 0x40] SHR RCX,0x6 CMP RCX,R14 JNC 0x0019527e MOV RSI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSI + RCX*0x8] JMP 0x00195280 LAB_0019527e: XOR ESI,ESI LAB_00195280: TEST EDX,EDX JZ 0x001952aa LEA RDI,[RCX + 0x1] CMP RDI,R14 JNC 0x00195299 MOV RDI,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RDI + RCX*0x8 + 0x8] JMP 0x0019529b LAB_00195299: XOR EDI,EDI LAB_0019529b: MOV ECX,EAX SHR RSI,CL MOV ECX,EDX NEG CL SHL RDI,CL OR RSI,RDI LAB_001952aa: CMP EBX,0x7d JA 0x001952bd MOV RBP,RSI AND RBP,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP] JMP 0x00195331 LAB_001952bd: CMP EBX,0x81 JC 0x001952e0 LEA RCX,[RAX + 0x80] SHR RCX,0x6 CMP RCX,R14 JNC 0x001952e9 MOV RDI,qword ptr [RSP + 0x8] MOV RBP,qword ptr [RDI + RCX*0x8] JMP 0x001952eb LAB_001952e0: AND RSI,qword ptr [RSP + 0x10] XOR EBP,EBP JMP 0x0019531a LAB_001952e9: XOR EBP,EBP LAB_001952eb: TEST EDX,EDX JZ 0x00195315 LEA RDI,[RCX + 0x1] CMP RDI,R14 JNC 0x00195304 MOV RDI,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RDI + RCX*0x8 + 0x8] JMP 0x00195306 LAB_00195304: XOR EDI,EDI LAB_00195306: MOV ECX,EAX SHR RBP,CL NEG DL MOV ECX,EDX SHL RDI,CL OR RBP,RDI LAB_00195315: AND RBP,qword ptr [RSP + 0x10] LAB_0019531a: SHLD RBP,RSI,0x1 MOV RAX,qword ptr [RSP] SHLD RSI,RAX,0x1 BTR RAX,0x3f MOV qword ptr [RSP],RAX LAB_00195331: CMP dword ptr [RSP + 0x18],0x0 JLE 0x00195426 MOV RCX,RBP SHLD RCX,RSI,0x3 MOV R13,qword ptr [RSP + 0x20] XOR R14D,R14D MOV qword ptr [RSP + 0x48],RCX LAB_00195351: LEA RAX,[R8 + R14*0x8] LEA RDX,[0x1a4910] MOV R11,qword ptr [RDX + RAX*0x1] MOV RAX,qword ptr [RSP + 0x50] MOV R15,qword ptr [RAX + R14*0x8] MOV RAX,RCX MUL R15 MOV RAX,RDX MUL R11 LEA R12,[R11 + R11*0x1] ADD RAX,R12 ADC RDX,0x0 MOV RDI,RSI SUB RDI,RAX MOV RAX,RBP SBB RAX,RDX MOV RDX,RAX SAR RDX,0x1 AND RDX,R11 ADD RDX,RDI ADC RAX,0x0 AND RAX,R11 LEA RDI,[RAX + RDX*0x1] CMP EBX,0x7e JL 0x00195413 MOV RCX,RBP MOV RBP,RSI MOV RSI,R10 MOV R10,R8 MOV R8,R9 MOV R9D,EBX MOV RBX,RDI SHL RBX,0x3f OR RBX,qword ptr [RSP] SHR RDI,0x1 MOV RAX,RDI SHLD RAX,RBX,0x3 MUL R15 MOV RAX,RDX MUL R11 ADD RAX,R12 ADC RDX,0x0 SUB RBX,RAX SBB RDI,RDX MOV RAX,RDI SAR RAX,0x1 AND RAX,R11 ADD RAX,RBX MOV EBX,R9D MOV R9,R8 MOV R8,R10 MOV R10,RSI MOV RSI,RBP MOV RBP,RCX MOV RCX,qword ptr [RSP + 0x48] ADC RDI,0x0 AND RDI,R11 ADD RDI,RAX LAB_00195413: MOV qword ptr [R13],RDI INC R14 ADD R13,R9 CMP R10,R14 JNZ 0x00195351 LAB_00195426: MOV R11,qword ptr [RSP + 0x40] INC R11 ADD qword ptr [RSP + 0x20],0x8 CMP R11,qword ptr [RSP + 0x30] MOV R14,qword ptr [RSP + 0x28] JL 0x001951e4 LAB_00195444: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void limb_to_ntt(long param_1,ulong *param_2,ulong param_3,long param_4,ulong param_5,uint param_6, int param_7,uint param_8) { ulong uVar1; ulong uVar2; int1 auVar3 [16]; int1 auVar4 [16]; int1 auVar5 [16]; int1 auVar6 [16]; int1 auVar7 [16]; int1 auVar8 [16]; int1 auVar9 [16]; int1 auVar10 [16]; int1 auVar11 [16]; int1 auVar12 [16]; byte bVar13; ulong uVar14; ulong uVar15; ulong uVar16; long lVar17; ulong uVar18; byte bVar19; ulong uVar20; ulong uVar21; ulong uVar22; ulong uVar23; long lVar24; ulong *puVar25; ulong uVar26; ulong local_88; ulong *local_68; memset(param_2,0,param_3 * (long)(int)param_8 * 8); uVar20 = (ulong)(int)param_6; uVar14 = ((param_5 * 0x40 + uVar20) - 1) / uVar20; if ((long)param_3 < (long)uVar14) { uVar14 = param_3; } if (0 < (long)uVar14) { uVar1 = -(ulong)((param_6 & 0x3f) == 0) | ~(-1L << (sbyte)(param_6 & 0x3f)); lVar24 = 0; local_68 = param_2; do { uVar15 = lVar24 * uVar20; uVar21 = (long)uVar15 >> 6; if (uVar21 < param_5) { local_88 = *(ulong *)(param_4 + uVar21 * 8); } else { local_88 = 0; } bVar13 = (byte)uVar15; bVar19 = bVar13 & 0x3f; if ((uVar15 & 0x3f) != 0) { if (uVar21 + 1 < param_5) { lVar17 = *(long *)(param_4 + 8 + uVar21 * 8); } else { lVar17 = 0; } local_88 = local_88 >> (bVar13 & 0x3f) | lVar17 << (-bVar19 & 0x3f); } if ((int)param_6 < 0x41) { local_88 = local_88 & uVar1; uVar21 = 0; uVar15 = local_88; } else { uVar21 = uVar15 + 0x40 >> 6; if (uVar21 < param_5) { uVar26 = *(ulong *)(param_4 + uVar21 * 8); } else { uVar26 = 0; } if ((uVar15 & 0x3f) != 0) { if (uVar21 + 1 < param_5) { lVar17 = *(long *)(param_4 + 8 + uVar21 * 8); } else { lVar17 = 0; } uVar26 = uVar26 >> (bVar13 & 0x3f) | lVar17 << (-bVar19 & 0x3f); } if (param_6 < 0x7e) { uVar21 = uVar26 & uVar1; uVar15 = local_88; } else { if (param_6 < 0x81) { uVar26 = uVar26 & uVar1; uVar21 = 0; } else { uVar16 = uVar15 + 0x80 >> 6; if (uVar16 < param_5) { uVar21 = *(ulong *)(param_4 + uVar16 * 8); } else { uVar21 = 0; } if ((uVar15 & 0x3f) != 0) { if (uVar16 + 1 < param_5) { lVar17 = *(long *)(param_4 + 8 + uVar16 * 8); } else { lVar17 = 0; } uVar21 = uVar21 >> (bVar13 & 0x3f) | lVar17 << (-bVar19 & 0x3f); } uVar21 = uVar21 & uVar1; } uVar21 = uVar21 << 1 | uVar26 >> 0x3f; uVar15 = uVar26 << 1 | local_88 >> 0x3f; local_88 = local_88 & 0x7fffffffffffffff; } } if (0 < (int)param_8) { uVar26 = 0; puVar25 = local_68; do { uVar2 = (&ntt_mods)[uVar26 + (long)param_7]; uVar18 = *(ulong *)((long)param_7 * 8 + 8 + param_1 + uVar26 * 8); auVar3._8_8_ = 0; auVar3._0_8_ = uVar21 << 3 | uVar15 >> 0x3d; auVar7._8_8_ = 0; auVar7._0_8_ = uVar18; auVar4._8_8_ = 0; auVar4._0_8_ = SUB168(auVar3 * auVar7,8); auVar8._8_8_ = 0; auVar8._0_8_ = uVar2; auVar12._8_8_ = 0; auVar12._0_8_ = uVar2 * 2; auVar11._8_8_ = 0; auVar11._0_8_ = uVar2 * 2; auVar11 = auVar4 * auVar8 + auVar11; uVar16 = auVar11._0_8_; uVar23 = uVar15 - uVar16; lVar17 = (uVar21 - auVar11._8_8_) - (ulong)(uVar15 < uVar16); uVar16 = lVar17 >> 1 & uVar2; uVar16 = (lVar17 + (ulong)CARRY8(uVar16,uVar23) & uVar2) + uVar16 + uVar23; if (0x7d < (int)param_6) { uVar23 = uVar16 << 0x3f | local_88; auVar5._8_8_ = 0; auVar5._0_8_ = (uVar16 >> 1) << 3 | uVar23 >> 0x3d; auVar9._8_8_ = 0; auVar9._0_8_ = uVar18; auVar6._8_8_ = 0; auVar6._0_8_ = SUB168(auVar5 * auVar9,8); auVar10._8_8_ = 0; auVar10._0_8_ = uVar2; auVar12 = auVar6 * auVar10 + auVar12; uVar18 = auVar12._0_8_; uVar22 = uVar23 - uVar18; lVar17 = ((uVar16 >> 1) - auVar12._8_8_) - (ulong)(uVar23 < uVar18); uVar16 = lVar17 >> 1 & uVar2; uVar16 = (lVar17 + (ulong)CARRY8(uVar16,uVar22) & uVar2) + uVar16 + uVar22; } *puVar25 = uVar16; uVar26 = uVar26 + 1; puVar25 = puVar25 + param_3; } while (param_8 != uVar26); } lVar24 = lVar24 + 1; local_68 = local_68 + 1; } while (lVar24 < (long)uVar14); } return; }
61,640
SchemaConverter::_resolve_ref(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string _resolve_ref(const std::string & ref) { std::string ref_name = ref.substr(ref.find_last_of('/') + 1); if (_rules.find(ref_name) == _rules.end() && _refs_being_resolved.find(ref) == _refs_being_resolved.end()) { _refs_being_resolved.insert(ref); json resolved = _refs[ref]; ref_name = visit(resolved, ref_name); _refs_being_resolved.erase(ref); } return ref_name; }
O0
cpp
SchemaConverter::_resolve_ref(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): subq $0xf8, %rsp movq %rdi, 0x58(%rsp) movq %rdi, %rax movq %rax, 0x38(%rsp) movq %rdi, 0xf0(%rsp) movq %rsi, 0xe8(%rsp) movq %rdx, 0xe0(%rsp) movq 0xe8(%rsp), %rax movq %rax, 0x50(%rsp) movb $0x0, 0xdf(%rsp) movq 0xe0(%rsp), %rdi movq %rdi, 0x40(%rsp) movl $0x2f, %esi movq $-0x1, %rdx movq %rdx, 0x48(%rsp) callq 0x5e4a0 movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rcx movq 0x58(%rsp), %rdi movq %rax, %rdx incq %rdx callq 0x5f1a0 movq 0x50(%rsp), %rdi movq 0x58(%rsp), %rsi addq $0x28, %rdi callq 0x1b6cc0 movq %rax, 0x60(%rsp) jmp 0x1ba7d8 movq 0x50(%rsp), %rdi movq 0x60(%rsp), %rax movq %rax, 0xd0(%rsp) addq $0x28, %rdi callq 0x1b16e0 movq %rax, 0xb8(%rsp) leaq 0xd0(%rsp), %rdi leaq 0xb8(%rsp), %rsi callq 0x1b16c0 movb %al, %cl xorl %eax, %eax testb $0x1, %cl movb %al, 0x37(%rsp) jne 0x1ba81f jmp 0x1ba87e movq 0x50(%rsp), %rdi addq $0x90, %rdi movq 0xe0(%rsp), %rsi callq 0x1bd320 movq %rax, 0x28(%rsp) jmp 0x1ba83f movq 0x50(%rsp), %rdi movq 0x28(%rsp), %rax movq %rax, 0xb0(%rsp) addq $0x90, %rdi callq 0x1bd350 movq %rax, 0xa8(%rsp) leaq 0xb0(%rsp), %rdi leaq 0xa8(%rsp), %rsi callq 0x1bd490 movb %al, 0x37(%rsp) movb 0x37(%rsp), %al testb $0x1, %al jne 0x1ba88b jmp 0x1ba997 movq 0x50(%rsp), %rdi addq $0x90, %rdi movq 0xe0(%rsp), %rsi callq 0x108450 movb %dl, 0x1f(%rsp) movq %rax, 0x20(%rsp) jmp 0x1ba8af movq 0x50(%rsp), %rdi movb 0x1f(%rsp), %al movq 0x20(%rsp), %rcx movq %rcx, 0x98(%rsp) movb %al, 0xa0(%rsp) addq $0x58, %rdi movq 0xe0(%rsp), %rsi callq 0x1bd4b0 movq %rax, 0x10(%rsp) jmp 0x1ba8e4 movq 0x10(%rsp), %rsi leaq 0x88(%rsp), %rdi callq 0xe98a0 jmp 0x1ba8f8 movq 0x58(%rsp), %rcx movq 0x50(%rsp), %rsi leaq 0x68(%rsp), %rdi leaq 0x88(%rsp), %rdx callq 0x1b7230 jmp 0x1ba916 movq 0x58(%rsp), %rdi leaq 0x68(%rsp), %rsi movq %rsi, 0x8(%rsp) callq 0x5e980 movq 0x8(%rsp), %rdi callq 0x5f5d8 movq 0x50(%rsp), %rdi addq $0x90, %rdi movq 0xe0(%rsp), %rsi callq 0x1bd4e0 jmp 0x1ba94f leaq 0x88(%rsp), %rdi callq 0xd9d90 jmp 0x1ba997 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xc8(%rsp) movl %eax, 0xc4(%rsp) jmp 0x1ba9c0 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xc8(%rsp) movl %eax, 0xc4(%rsp) leaq 0x88(%rsp), %rdi callq 0xd9d90 jmp 0x1ba9c0 movb $0x1, 0xdf(%rsp) testb $0x1, 0xdf(%rsp) jne 0x1ba9b3 movq 0x58(%rsp), %rdi callq 0x5f5d8 movq 0x38(%rsp), %rax addq $0xf8, %rsp retq movq 0x58(%rsp), %rdi callq 0x5f5d8 movq 0xc8(%rsp), %rdi callq 0x5ebf0 nopw (%rax,%rax)
_ZN15SchemaConverter12_resolve_refERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: sub rsp, 0F8h mov [rsp+0F8h+var_A0], rdi mov rax, rdi mov [rsp+0F8h+var_C0], rax mov [rsp+0F8h+var_8], rdi mov [rsp+0F8h+var_10], rsi mov [rsp+0F8h+var_18], rdx mov rax, [rsp+0F8h+var_10] mov [rsp+0F8h+var_A8], rax mov [rsp+0F8h+var_19], 0 mov rdi, [rsp+0F8h+var_18] mov [rsp+0F8h+var_B8], rdi mov esi, 2Fh ; '/' mov rdx, 0FFFFFFFFFFFFFFFFh mov [rsp+0F8h+var_B0], rdx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12find_last_ofEcm; std::string::find_last_of(char,ulong) mov rsi, [rsp+0F8h+var_B8] mov rcx, [rsp+0F8h+var_B0] mov rdi, [rsp+0F8h+var_A0] mov rdx, rax inc rdx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rdi, [rsp+0F8h+var_A8] mov rsi, [rsp+0F8h+var_A0] add rdi, 28h ; '(' call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEE4findERS9_; std::map<std::string,std::string>::find(std::string const&) mov [rsp+0F8h+var_98], rax jmp short $+2 loc_1BA7D8: mov rdi, [rsp+0F8h+var_A8] mov rax, [rsp+0F8h+var_98] mov [rsp+0F8h+var_28], rax add rdi, 28h ; '(' call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEE3endEv; std::map<std::string,std::string>::end(void) mov [rsp+0F8h+var_40], rax lea rdi, [rsp+0F8h+var_28] lea rsi, [rsp+0F8h+var_40] call _ZSteqRKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EESB_; std::operator==(std::_Rb_tree_iterator<std::pair<std::string const,std::string>> const&,std::_Rb_tree_iterator<std::pair<std::string const,std::string>> const&) mov cl, al xor eax, eax test cl, 1 mov [rsp+0F8h+var_C1], al jnz short loc_1BA81F jmp short loc_1BA87E loc_1BA81F: mov rdi, [rsp+0F8h+var_A8] add rdi, 90h mov rsi, [rsp+0F8h+var_18] call _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE4findERKS5_; std::unordered_set<std::string>::find(std::string const&) mov [rsp+0F8h+var_D0], rax jmp short $+2 loc_1BA83F: mov rdi, [rsp+0F8h+var_A8] mov rax, [rsp+0F8h+var_D0] mov [rsp+0F8h+var_48], rax add rdi, 90h call _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE3endEv; std::unordered_set<std::string>::end(void) mov [rsp+0F8h+var_50], rax lea rdi, [rsp+0F8h+var_48] lea rsi, [rsp+0F8h+var_50] call _ZNSt8__detaileqERKNS_19_Node_iterator_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb1EEES9_; std::__detail::operator==(std::__detail::_Node_iterator_base<std::string,true> const&,std::__detail::_Node_iterator_base<std::string,true> const&) mov [rsp+0F8h+var_C1], al loc_1BA87E: mov al, [rsp+0F8h+var_C1] test al, 1 jnz short loc_1BA88B jmp loc_1BA997 loc_1BA88B: mov rdi, [rsp+0F8h+var_A8] add rdi, 90h mov rsi, [rsp+0F8h+var_18] call _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE6insertERKS5_; std::unordered_set<std::string>::insert(std::string const&) mov [rsp+0F8h+var_D9], dl mov [rsp+0F8h+var_D8], rax jmp short $+2 loc_1BA8AF: mov rdi, [rsp+0F8h+var_A8] mov al, [rsp+0F8h+var_D9] mov rcx, [rsp+0F8h+var_D8] mov [rsp+0F8h+var_60], rcx mov [rsp+0F8h+var_58], al add rdi, 58h ; 'X' mov rsi, [rsp+0F8h+var_18] call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS7_11ordered_mapESt6vectorS5_blmdSaNS7_14adl_serializerESA_IhSaIhEEvEESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_SE_EEEixERSK_; std::unordered_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>>::operator[](std::string const&) mov [rsp+0F8h+var_E8], rax jmp short $+2 loc_1BA8E4: mov rsi, [rsp+0F8h+var_E8] lea rdi, [rsp+0F8h+var_70] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) jmp short $+2 loc_1BA8F8: mov rcx, [rsp+0F8h+var_A0] mov rsi, [rsp+0F8h+var_A8] lea rdi, [rsp+0F8h+var_90] lea rdx, [rsp+0F8h+var_70] call _ZN15SchemaConverter5visitERKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_; SchemaConverter::visit(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::string const&) jmp short $+2 loc_1BA916: mov rdi, [rsp+0F8h+var_A0] lea rsi, [rsp+0F8h+var_90] mov [rsp+0F8h+var_F0], rsi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [rsp+0F8h+var_F0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rsp+0F8h+var_A8] add rdi, 90h mov rsi, [rsp+0F8h+var_18] call _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE5eraseERKS5_; std::unordered_set<std::string>::erase(std::string const&) jmp short $+2 loc_1BA94F: lea rdi, [rsp+0F8h+var_70] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() jmp short loc_1BA997 mov rcx, rax mov eax, edx mov [rsp+arg_C0], rcx mov [rsp+arg_BC], eax jmp short loc_1BA9C0 mov rcx, rax mov eax, edx mov [rsp+arg_C0], rcx mov [rsp+arg_BC], eax lea rdi, [rsp+arg_80] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() jmp short loc_1BA9C0 loc_1BA997: mov [rsp+0F8h+var_19], 1 test [rsp+0F8h+var_19], 1 jnz short loc_1BA9B3 mov rdi, [rsp+0F8h+var_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1BA9B3: mov rax, [rsp+0F8h+var_C0] add rsp, 0F8h retn loc_1BA9C0: mov rdi, [rsp+arg_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rsp+arg_C0] call __Unwind_Resume
long long SchemaConverter::_resolve_ref(long long a1, long long a2, long long a3) { long long last_of; // rax char v4; // dl long long v6; // [rsp+10h] [rbp-E8h] char v7; // [rsp+37h] [rbp-C1h] _BYTE v9[32]; // [rsp+68h] [rbp-90h] BYREF _BYTE v10[16]; // [rsp+88h] [rbp-70h] BYREF long long v11; // [rsp+98h] [rbp-60h] char v12; // [rsp+A0h] [rbp-58h] long long v13; // [rsp+A8h] [rbp-50h] BYREF long long v14; // [rsp+B0h] [rbp-48h] BYREF long long v15[3]; // [rsp+B8h] [rbp-40h] BYREF long long v16; // [rsp+D0h] [rbp-28h] BYREF char v17; // [rsp+DFh] [rbp-19h] long long v18; // [rsp+E0h] [rbp-18h] long long v19; // [rsp+E8h] [rbp-10h] long long v20; // [rsp+F0h] [rbp-8h] v20 = a1; v19 = a2; v18 = a3; v17 = 0; last_of = std::string::find_last_of(a3, 47LL); std::string::substr(a1, a3, last_of + 1, -1LL); v16 = std::map<std::string,std::string>::find(a2 + 40, a1); v15[0] = std::map<std::string,std::string>::end(a2 + 40); v7 = 0; if ( std::operator==(&v16, v15) ) { v14 = std::unordered_set<std::string>::find(a2 + 144, v18); v13 = std::unordered_set<std::string>::end(a2 + 144); v7 = std::__detail::operator==(&v14, &v13); } if ( (v7 & 1) != 0 ) { v11 = std::unordered_set<std::string>::insert(a2 + 144, v18); v12 = v4; v6 = std::unordered_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>>::operator[]( a2 + 88, v18); 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)v10, v6); SchemaConverter::visit((long long)v9, a2, (long long)v10, a1); std::string::operator=(a1); std::string::~string(v9); std::unordered_set<std::string>::erase(a2 + 144, v18); 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)v10); } return a1; }
61,641
SchemaConverter::_resolve_ref(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string _resolve_ref(const std::string & ref) { std::string ref_name = ref.substr(ref.find_last_of('/') + 1); if (_rules.find(ref_name) == _rules.end() && _refs_being_resolved.find(ref) == _refs_being_resolved.end()) { _refs_being_resolved.insert(ref); json resolved = _refs[ref]; ref_name = visit(resolved, ref_name); _refs_being_resolved.erase(ref); } return ref_name; }
O3
cpp
SchemaConverter::_resolve_ref(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movq %rdx, %rdi movl $0x2f, %esi movq $-0x1, %rdx callq 0x1c1c0 leaq 0x1(%rax), %rdx movq %rbx, %rdi movq %r14, %rsi movq $-0x1, %rcx callq 0x1b960 leaq 0x28(%r15), %rdi movq %rbx, %rsi callq 0xc5690 leaq 0x30(%r15), %rcx cmpq %rcx, %rax jne 0xc8509 leaq 0x90(%r15), %r12 movq %r12, %rdi movq %r14, %rsi callq 0xca72a testq %rax, %rax jne 0xc8509 leaq 0x18(%rsp), %rdx movq %r12, (%rdx) movq %r12, %rdi movq %r14, %rsi callq 0xbdfb4 leaq 0x58(%r15), %rdi movq %r14, %rsi callq 0xca764 leaq 0x8(%rsp), %rdi movq %rax, %rsi callq 0x706e0 leaq 0x18(%rsp), %rdi leaq 0x8(%rsp), %rdx movq %r15, %rsi movq %rbx, %rcx callq 0xc5812 leaq 0x18(%rsp), %r15 movq %rbx, %rdi movq %r15, %rsi callq 0x1bae0 movq (%r15), %rdi leaq 0x28(%rsp), %rax cmpq %rax, %rdi je 0xc84e7 movq 0x28(%rsp), %rsi incq %rsi callq 0x1b910 movq %r12, %rdi movq %r14, %rsi callq 0xcabba leaq 0x8(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x6b800 movq %r14, %rdi callq 0x70bac movq %rbx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq jmp 0xc851a movq %rax, %r14 leaq 0x8(%rsp), %r15 movq %r15, %rdi xorl %esi, %esi callq 0x6b800 movq %r15, %rdi callq 0x70bac jmp 0xc853f jmp 0xc853c jmp 0xc853c jmp 0xc853c movq %rax, %r14 movq (%rbx), %rdi addq $0x10, %rbx cmpq %rbx, %rdi je 0xc8556 movq (%rbx), %rsi incq %rsi callq 0x1b910 movq %r14, %rdi callq 0x1bff0
_ZN15SchemaConverter12_resolve_refERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push r12 push rbx sub rsp, 38h mov r14, rdx mov r15, rsi mov rbx, rdi mov rdi, rdx mov esi, 2Fh ; '/' mov rdx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEcm; std::string::rfind(char,ulong) lea rdx, [rax+1] mov rdi, rbx mov rsi, r14 mov rcx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) lea rdi, [r15+28h] mov rsi, rbx call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE4findERS7_; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::find(std::string const&) lea rcx, [r15+30h] cmp rax, rcx jnz loc_C8509 lea r12, [r15+90h] mov rdi, r12 mov rsi, r14 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_traitsILb1ELb1ELb1EEEE4findERKS5_; 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>>::find(std::string const&) test rax, rax jnz loc_C8509 lea rdx, [rsp+58h+var_40] mov [rdx], r12 mov rdi, r12 mov rsi, r14 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_traitsILb1ELb1ELb1EEEE9_M_insertIRKS5_NS7_10_AllocNodeISaINS7_10_Hash_nodeIS5_Lb1EEEEEEEESt4pairINS7_14_Node_iteratorIS5_Lb1ELb1EEEbEOT_RKT0_St17integral_constantIbLb1EE; 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>>::_M_insert<std::string const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::string,true>>>>(std::string const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::string,true>>> const&,std::integral_constant<bool,true>) lea rdi, [r15+58h] mov rsi, r14 call _ZNSt8__detail9_Map_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS6_N8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS6_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESaISI_ENS_10_Select1stESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb0ELb1EEELb1EEixERS8_; std::__detail::_Map_base<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>,true>::operator[](std::string const&) lea rdi, [rsp+58h+var_50] mov rsi, rax call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) lea rdi, [rsp+58h+var_40] lea rdx, [rsp+58h+var_50] mov rsi, r15 mov rcx, rbx call _ZN15SchemaConverter5visitERKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_; SchemaConverter::visit(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::string const&) lea r15, [rsp+58h+var_40] mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r15]; void * lea rax, [rsp+58h+var_30] cmp rdi, rax jz short loc_C84E7 mov rsi, [rsp+58h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C84E7: mov rdi, r12 mov rsi, r14 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_traitsILb1ELb1ELb1EEEE8_M_eraseESt17integral_constantIbLb1EERKS5_; 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>>::_M_erase(std::integral_constant<bool,true>,std::string const&) lea r14, [rsp+58h+var_50] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() loc_C8509: mov rax, rbx add rsp, 38h pop rbx pop r12 pop r14 pop r15 retn jmp short $+2 loc_C851A: mov r14, rax lea r15, [rsp+arg_0] mov rdi, r15 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, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() jmp short loc_C853F jmp short loc_C853C jmp short loc_C853C jmp short $+2 loc_C853C: mov r14, rax loc_C853F: mov rdi, [rbx]; void * add rbx, 10h cmp rdi, rbx jz short loc_C8556 mov rsi, [rbx] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C8556: mov rdi, r14 call __Unwind_Resume
long long SchemaConverter::_resolve_ref(long long a1, long long a2, long long a3, __m128d a4) { long long v5; // rax int v6; // edx int v7; // ecx int v8; // r8d int v9; // r9d unsigned __int8 *v10; // rax unsigned __int8 v12[16]; // [rsp+8h] [rbp-50h] BYREF void *v13[2]; // [rsp+18h] [rbp-40h] BYREF long long v14; // [rsp+28h] [rbp-30h] BYREF v5 = std::string::rfind(a3, 47LL, -1LL); std::string::substr(a1, a3, v5 + 1, -1LL); if ( std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::find( a2 + 40, a1) == a2 + 48 && !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>>::find( a2 + 144, a3) ) { v13[0] = (void *)(a2 + 144); 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>>::_M_insert<std::string const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::string,true>>>>( a2 + 144, a3, v13); v10 = (unsigned __int8 *)std::__detail::_Map_base<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>,true>::operator[]( (int)a2 + 88, a3, v6, v7, v8, v9); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( v12, v10); SchemaConverter::visit(v13, a2, (long long)v12, a1, a4); std::string::operator=(a1, v13); if ( v13[0] != &v14 ) operator delete(v13[0], v14 + 1); 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>>::_M_erase( a2 + 144, a3); 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 *)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>::data::~data(v12); } return a1; }
_resolve_ref: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV RDI,RDX MOV ESI,0x2f MOV RDX,-0x1 CALL 0x0011c1c0 LEA RDX,[RAX + 0x1] MOV RDI,RBX MOV RSI,R14 MOV RCX,-0x1 CALL 0x0011b960 LEA RDI,[R15 + 0x28] LAB_001c844c: MOV RSI,RBX CALL 0x001c5690 LEA RCX,[R15 + 0x30] CMP RAX,RCX JNZ 0x001c8509 LEA R12,[R15 + 0x90] LAB_001c8468: MOV RDI,R12 MOV RSI,R14 CALL 0x001ca72a TEST RAX,RAX JNZ 0x001c8509 LEA RDX,[RSP + 0x18] MOV qword ptr [RDX],R12 LAB_001c8484: MOV RDI,R12 MOV RSI,R14 CALL 0x001bdfb4 LEA RDI,[R15 + 0x58] LAB_001c8493: MOV RSI,R14 CALL 0x001ca764 LEA RDI,[RSP + 0x8] MOV RSI,RAX CALL 0x001706e0 LAB_001c84a8: LEA RDI,[RSP + 0x18] LEA RDX,[RSP + 0x8] MOV RSI,R15 MOV RCX,RBX CALL 0x001c5812 LEA R15,[RSP + 0x18] MOV RDI,RBX MOV RSI,R15 CALL 0x0011bae0 MOV RDI,qword ptr [R15] LEA RAX,[RSP + 0x28] CMP RDI,RAX JZ 0x001c84e7 MOV RSI,qword ptr [RSP + 0x28] INC RSI CALL 0x0011b910 LAB_001c84e7: MOV RDI,R12 MOV RSI,R14 CALL 0x001cabba LAB_001c84f2: LEA R14,[RSP + 0x8] MOV RDI,R14 XOR ESI,ESI CALL 0x0016b800 MOV RDI,R14 CALL 0x00170bac LAB_001c8509: MOV RAX,RBX ADD RSP,0x38 POP RBX POP R12 POP R14 POP R15 RET
/* SchemaConverter::_resolve_ref(std::__cxx11::string const&) */ string * SchemaConverter::_resolve_ref(string *param_1) { _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>> *this; string *psVar1; long lVar2; basic_json *pbVar3; string *in_RDX; string *in_RSI; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> local_50 [16]; _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_40 [2]; long local_30 [2]; std::__cxx11::string::rfind((char)in_RDX,0x2f); std::__cxx11::string::substr((ulong)param_1,(ulong)in_RDX); /* try { // try from 001c844c to 001c8453 has its CatchHandler @ 001c853c */ psVar1 = (string *) std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::find((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *)(in_RSI + 0x28),param_1); if (psVar1 == in_RSI + 0x30) { this = (_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>> *)(in_RSI + 0x90); /* try { // try from 001c8468 to 001c8472 has its CatchHandler @ 001c853a */ lVar2 = 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>> ::find(this,in_RDX); if (lVar2 == 0) { local_40[0] = this; /* try { // try from 001c8484 to 001c848e has its CatchHandler @ 001c8536 */ 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>> :: _M_insert<std::__cxx11::string_const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::__cxx11::string,true>>>> (this); /* try { // try from 001c8493 to 001c84a7 has its CatchHandler @ 001c8538 */ pbVar3 = (basic_json *) std::__detail:: _Map_base<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>,true> ::operator[]((_Map_base<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>,true> *)(in_RSI + 0x58),in_RDX); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(local_50,pbVar3); /* try { // try from 001c84a8 to 001c84bc has its CatchHandler @ 001c851a */ visit((basic_json *)local_40,in_RSI); std::__cxx11::string::operator=(param_1,(string *)local_40); if (local_40[0] != (_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_30) { operator_delete(local_40[0],local_30[0] + 1); } /* try { // try from 001c84e7 to 001c84f1 has its CatchHandler @ 001c8518 */ 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>> ::_M_erase(this); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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((data *)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((data *)local_50); } } return param_1; }
61,642
ma_trnman_end_trans_hook
eloqsql/storage/maria/ma_state.c
my_bool _ma_trnman_end_trans_hook(TRN *trn, my_bool commit, my_bool active_transactions) { my_bool error= 0; MARIA_USED_TABLES *tables, *next; DBUG_ENTER("_ma_trnman_end_trans_hook"); DBUG_PRINT("enter", ("trn: %p used_tables: %p", trn, trn->used_tables)); for (tables= (MARIA_USED_TABLES*) trn->used_tables; tables; tables= next) { MARIA_SHARE *share= tables->share; next= tables->next; if (commit) { MARIA_STATE_HISTORY *history; mysql_mutex_lock(&share->intern_lock); /* We only have to update history state if something changed */ if (tables->state_current.changed) { if (tables->state_current.no_transid) { /* The change was done without using transid on rows (like in bulk insert). In this case this thread is the only one that is using the table and all rows will be visible for all transactions. */ _ma_reset_history(share); } else { if (active_transactions && share->now_transactional && trnman_exists_active_transactions(share->state_history->trid, trn->commit_trid, 1)) { /* There exist transactions that are still using the current share->state_history. Create a new history item for this commit and add it first in the state_history list. This ensures that all history items are stored in the list in decresing trid order. */ if (!(history= my_malloc(PSI_INSTRUMENT_ME, sizeof(*history), MYF(MY_WME)))) { /* purecov: begin inspected */ error= 1; mysql_mutex_unlock(&share->intern_lock); my_free(tables); continue; /* purecov: end */ } history->state= share->state_history->state; history->next= share->state_history; share->state_history= history; } else { /* Previous history can't be seen by anyone, reuse old memory */ history= share->state_history; DBUG_PRINT("info", ("removing history->trid: %lu new: %lu", (ulong) history->trid, (ulong) trn->commit_trid)); } history->state.records+= (tables->state_current.records - tables->state_start.records); history->state.checksum+= (tables->state_current.checksum - tables->state_start.checksum); history->trid= trn->commit_trid; share->state.last_change_trn= trn->commit_trid; if (history->next) { /* Remove not visible states */ share->state_history= _ma_remove_not_visible_states(history, 0, 1); } DBUG_PRINT("info", ("share: %p in_trans: %d", share, share->in_trans)); } } /* The following calls frees &share->intern_lock */ decrement_share_in_trans(share); } else { /* We need to keep share->in_trans correct because of the check in free_maria_share() */ mysql_mutex_lock(&share->intern_lock); decrement_share_in_trans(share); } my_free(tables); } trn->used_tables= 0; trn->used_instances= 0; DBUG_RETURN(error); }
O3
c
ma_trnman_end_trans_hook: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %edx, -0x30(%rbp) leaq 0x58(%rdi), %rax movq %rax, -0x40(%rbp) movq %rdi, -0x38(%rbp) movq 0x58(%rdi), %r15 testq %r15, %r15 je 0x38a88 movl %esi, %r14d movl $0x0, -0x2c(%rbp) movq %r15, %r12 movq (%r15), %r15 movq 0x8(%r12), %rbx leaq 0x8f0(%rbx), %r13 movq 0x930(%rbx), %rax movq %r13, %rdi testb %r14b, %r14b je 0x38979 testq %rax, %rax jne 0x38a38 callq 0x29220 movb 0x44(%r12), %al testb $0x1, %al je 0x389e4 testb $0x2, %al jne 0x38989 cmpb $0x0, -0x30(%rbp) je 0x38993 cmpb $0x0, 0x7e7(%rbx) je 0x38993 movq 0x450(%rbx), %rax movq 0x8(%rax), %rdi movq -0x38(%rbp), %rax movq 0x88(%rax), %rsi movl $0x1, %edx callq 0x47641 testb %al, %al je 0x38993 movl $0x48, %esi movl $0x10, %edx xorl %edi, %edi callq 0x9fdb1 testq %rax, %rax je 0x38a1d movq %rax, %rdi movq 0x450(%rbx), %rax movq 0x40(%rax), %rcx movq %rcx, 0x40(%rdi) movups 0x10(%rax), %xmm0 movups 0x20(%rax), %xmm1 movups 0x30(%rax), %xmm2 movups %xmm2, 0x30(%rdi) movups %xmm1, 0x20(%rdi) movups %xmm0, 0x10(%rdi) movq 0x450(%rbx), %rax movq %rax, (%rdi) movq %rdi, 0x450(%rbx) jmp 0x3899a testq %rax, %rax jne 0x38a60 callq 0x29220 jmp 0x389e4 movq %rbx, %rdi callq 0x38aab jmp 0x389e4 movq 0x450(%rbx), %rdi movq 0x10(%r12), %rax subq 0x48(%r12), %rax addq %rax, 0x10(%rdi) movl 0x40(%r12), %eax subl 0x78(%r12), %eax addl %eax, 0x40(%rdi) movq -0x38(%rbp), %rax movq 0x88(%rax), %rax movq %rax, 0x8(%rdi) movq %rax, 0xe8(%rbx) cmpq $0x0, (%rdi) je 0x389e4 xorl %esi, %esi movl $0x1, %edx callq 0x38426 movq %rax, 0x450(%rbx) decl 0x7ac(%rbx) je 0x38a02 movq 0x930(%rbx), %rdi testq %rdi, %rdi jne 0x38a4e movq %r13, %rdi callq 0x291e0 jmp 0x38a0a movq %rbx, %rdi callq 0x431f8 movq %r12, %rdi callq 0x9ffde testq %r15, %r15 jne 0x3889f jmp 0x38a8f movq 0x930(%rbx), %rdi testq %rdi, %rdi jne 0x38a76 movq %r13, %rdi callq 0x291e0 movb $0x1, %al movl %eax, -0x2c(%rbp) jmp 0x38a0a leaq 0xa0caf(%rip), %rsi # 0xd96ee movl $0x1d7, %edx # imm = 0x1D7 callq 0x2eb8f jmp 0x388d2 leaq 0x34d5bb(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x389f8 leaq 0xa0c87(%rip), %rsi # 0xd96ee movl $0x224, %edx # imm = 0x224 callq 0x2eb8f jmp 0x389e4 leaq 0x34d593(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x38a29 movl $0x0, -0x2c(%rbp) xorps %xmm0, %xmm0 movq -0x40(%rbp), %rax movups %xmm0, (%rax) movl -0x2c(%rbp), %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ma_trnman_end_trans_hook: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_30], edx lea rax, [rdi+58h] mov [rbp+var_40], rax mov [rbp+var_38], rdi mov r15, [rdi+58h] test r15, r15 jz loc_38A88 mov r14d, esi mov [rbp+var_2C], 0 loc_3889F: mov r12, r15 mov r15, [r15] mov rbx, [r12+8] lea r13, [rbx+8F0h] mov rax, [rbx+930h] mov rdi, r13 test r14b, r14b jz loc_38979 test rax, rax jnz loc_38A38 call _pthread_mutex_lock loc_388D2: mov al, [r12+44h] test al, 1 jz loc_389E4 test al, 2 jnz loc_38989 cmp byte ptr [rbp+var_30], 0 jz loc_38993 cmp byte ptr [rbx+7E7h], 0 jz loc_38993 mov rax, [rbx+450h] mov rdi, [rax+8] mov rax, [rbp+var_38] mov rsi, [rax+88h] mov edx, 1 call trnman_exists_active_transactions test al, al jz short loc_38993 mov esi, 48h ; 'H' mov edx, 10h xor edi, edi call my_malloc test rax, rax jz loc_38A1D mov rdi, rax mov rax, [rbx+450h] mov rcx, [rax+40h] mov [rdi+40h], rcx movups xmm0, xmmword ptr [rax+10h] movups xmm1, xmmword ptr [rax+20h] movups xmm2, xmmword ptr [rax+30h] movups xmmword ptr [rdi+30h], xmm2 movups xmmword ptr [rdi+20h], xmm1 movups xmmword ptr [rdi+10h], xmm0 mov rax, [rbx+450h] mov [rdi], rax mov [rbx+450h], rdi jmp short loc_3899A loc_38979: test rax, rax jnz loc_38A60 call _pthread_mutex_lock jmp short loc_389E4 loc_38989: mov rdi, rbx call _ma_reset_history jmp short loc_389E4 loc_38993: mov rdi, [rbx+450h] loc_3899A: mov rax, [r12+10h] sub rax, [r12+48h] add [rdi+10h], rax mov eax, [r12+40h] sub eax, [r12+78h] add [rdi+40h], eax mov rax, [rbp+var_38] mov rax, [rax+88h] mov [rdi+8], rax mov [rbx+0E8h], rax cmp qword ptr [rdi], 0 jz short loc_389E4 xor esi, esi mov edx, 1 call _ma_remove_not_visible_states mov [rbx+450h], rax loc_389E4: dec dword ptr [rbx+7ACh] jz short loc_38A02 mov rdi, [rbx+930h] test rdi, rdi jnz short loc_38A4E loc_389F8: mov rdi, r13 call _pthread_mutex_unlock jmp short loc_38A0A loc_38A02: mov rdi, rbx call free_maria_share loc_38A0A: mov rdi, r12 call my_free test r15, r15 jnz loc_3889F jmp short loc_38A8F loc_38A1D: mov rdi, [rbx+930h] test rdi, rdi jnz short loc_38A76 loc_38A29: mov rdi, r13 call _pthread_mutex_unlock mov al, 1 mov [rbp+var_2C], eax jmp short loc_38A0A loc_38A38: lea rsi, aWorkspaceLlm4b_28; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 1D7h call psi_mutex_lock jmp loc_388D2 loc_38A4E: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_389F8 loc_38A60: lea rsi, aWorkspaceLlm4b_28; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 224h call psi_mutex_lock jmp loc_389E4 loc_38A76: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_38A29 loc_38A88: mov [rbp+var_2C], 0 loc_38A8F: xorps xmm0, xmm0 mov rax, [rbp+var_40] movups xmmword ptr [rax], xmm0 mov eax, [rbp+var_2C] add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ma_trnman_end_trans_hook(long long a1, char a2, char a3) { _QWORD *v3; // r15 _QWORD *v4; // r12 long long v5; // rbx long long v6; // rax long long v7; // rdi char v8; // al long long v9; // rax long long v10; // rdi long long v11; // rax __int128 v12; // xmm0 __int128 v13; // xmm1 long long v14; // rax long long v16; // rax _OWORD *v18; // [rsp+0h] [rbp-40h] unsigned int v21; // [rsp+14h] [rbp-2Ch] v18 = (_OWORD *)(a1 + 88); v3 = *(_QWORD **)(a1 + 88); if ( v3 ) { v21 = 0; while ( 1 ) { v4 = v3; v3 = (_QWORD *)*v3; v5 = v4[1]; v6 = *(_QWORD *)(v5 + 2352); v7 = v5 + 2288; if ( a2 ) { if ( v6 ) psi_mutex_lock(v7, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c", 0x1D7u); else pthread_mutex_lock(v7); v8 = *((_BYTE *)v4 + 68); if ( (v8 & 1) != 0 ) { if ( (v8 & 2) != 0 ) { ma_reset_history(v5); } else { if ( a3 && *(_BYTE *)(v5 + 2023) && (unsigned __int8)trnman_exists_active_transactions( *(_QWORD *)(*(_QWORD *)(v5 + 1104) + 8LL), *(_QWORD *)(a1 + 136), 1LL) ) { v9 = my_malloc(0LL, 72LL, 16LL); if ( !v9 ) { if ( *(_QWORD *)(v5 + 2352) ) PSI_server[44](); v16 = pthread_mutex_unlock(v5 + 2288); LOBYTE(v16) = 1; v21 = v16; goto LABEL_24; } v10 = v9; v11 = *(_QWORD *)(v5 + 1104); *(_QWORD *)(v10 + 64) = *(_QWORD *)(v11 + 64); v12 = *(_OWORD *)(v11 + 16); v13 = *(_OWORD *)(v11 + 32); *(_OWORD *)(v10 + 48) = *(_OWORD *)(v11 + 48); *(_OWORD *)(v10 + 32) = v13; *(_OWORD *)(v10 + 16) = v12; *(_QWORD *)v10 = *(_QWORD *)(v5 + 1104); *(_QWORD *)(v5 + 1104) = v10; } else { v10 = *(_QWORD *)(v5 + 1104); } *(_QWORD *)(v10 + 16) += v4[2] - v4[9]; *(_DWORD *)(v10 + 64) += *((_DWORD *)v4 + 16) - *((_DWORD *)v4 + 30); v14 = *(_QWORD *)(a1 + 136); *(_QWORD *)(v10 + 8) = v14; *(_QWORD *)(v5 + 232) = v14; if ( *(_QWORD *)v10 ) *(_QWORD *)(v5 + 1104) = ma_remove_not_visible_states((_QWORD *)v10, 0, 1); } } } else if ( v6 ) { psi_mutex_lock(v7, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c", 0x224u); } else { pthread_mutex_lock(v7); } if ( (*(_DWORD *)(v5 + 1964))-- == 1 ) { free_maria_share(v5); } else { if ( *(_QWORD *)(v5 + 2352) ) PSI_server[44](); pthread_mutex_unlock(v5 + 2288); } LABEL_24: my_free(v4); if ( !v3 ) goto LABEL_32; } } v21 = 0; LABEL_32: *v18 = 0LL; return v21; }
_ma_trnman_end_trans_hook: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV dword ptr [RBP + -0x30],EDX LEA RAX,[RDI + 0x58] MOV qword ptr [RBP + -0x40],RAX MOV qword ptr [RBP + -0x38],RDI MOV R15,qword ptr [RDI + 0x58] TEST R15,R15 JZ 0x00138a88 MOV R14D,ESI MOV dword ptr [RBP + -0x2c],0x0 LAB_0013889f: MOV R12,R15 MOV R15,qword ptr [R15] MOV RBX,qword ptr [R12 + 0x8] LEA R13,[RBX + 0x8f0] MOV RAX,qword ptr [RBX + 0x930] MOV RDI,R13 TEST R14B,R14B JZ 0x00138979 TEST RAX,RAX JNZ 0x00138a38 CALL 0x00129220 LAB_001388d2: MOV AL,byte ptr [R12 + 0x44] TEST AL,0x1 JZ 0x001389e4 TEST AL,0x2 JNZ 0x00138989 CMP byte ptr [RBP + -0x30],0x0 JZ 0x00138993 CMP byte ptr [RBX + 0x7e7],0x0 JZ 0x00138993 MOV RAX,qword ptr [RBX + 0x450] MOV RDI,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RAX + 0x88] MOV EDX,0x1 CALL 0x00147641 TEST AL,AL JZ 0x00138993 MOV ESI,0x48 MOV EDX,0x10 XOR EDI,EDI CALL 0x0019fdb1 TEST RAX,RAX JZ 0x00138a1d MOV RDI,RAX MOV RAX,qword ptr [RBX + 0x450] MOV RCX,qword ptr [RAX + 0x40] MOV qword ptr [RDI + 0x40],RCX MOVUPS XMM0,xmmword ptr [RAX + 0x10] MOVUPS XMM1,xmmword ptr [RAX + 0x20] MOVUPS XMM2,xmmword ptr [RAX + 0x30] MOVUPS xmmword ptr [RDI + 0x30],XMM2 MOVUPS xmmword ptr [RDI + 0x20],XMM1 MOVUPS xmmword ptr [RDI + 0x10],XMM0 MOV RAX,qword ptr [RBX + 0x450] MOV qword ptr [RDI],RAX MOV qword ptr [RBX + 0x450],RDI JMP 0x0013899a LAB_00138979: TEST RAX,RAX JNZ 0x00138a60 CALL 0x00129220 JMP 0x001389e4 LAB_00138989: MOV RDI,RBX CALL 0x00138aab JMP 0x001389e4 LAB_00138993: MOV RDI,qword ptr [RBX + 0x450] LAB_0013899a: MOV RAX,qword ptr [R12 + 0x10] SUB RAX,qword ptr [R12 + 0x48] ADD qword ptr [RDI + 0x10],RAX MOV EAX,dword ptr [R12 + 0x40] SUB EAX,dword ptr [R12 + 0x78] ADD dword ptr [RDI + 0x40],EAX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x88] MOV qword ptr [RDI + 0x8],RAX MOV qword ptr [RBX + 0xe8],RAX CMP qword ptr [RDI],0x0 JZ 0x001389e4 XOR ESI,ESI MOV EDX,0x1 CALL 0x00138426 MOV qword ptr [RBX + 0x450],RAX LAB_001389e4: DEC dword ptr [RBX + 0x7ac] JZ 0x00138a02 MOV RDI,qword ptr [RBX + 0x930] TEST RDI,RDI JNZ 0x00138a4e LAB_001389f8: MOV RDI,R13 CALL 0x001291e0 JMP 0x00138a0a LAB_00138a02: MOV RDI,RBX CALL 0x001431f8 LAB_00138a0a: MOV RDI,R12 CALL 0x0019ffde TEST R15,R15 JNZ 0x0013889f JMP 0x00138a8f LAB_00138a1d: MOV RDI,qword ptr [RBX + 0x930] TEST RDI,RDI JNZ 0x00138a76 LAB_00138a29: MOV RDI,R13 CALL 0x001291e0 MOV AL,0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x00138a0a LAB_00138a38: LEA RSI,[0x1d96ee] MOV EDX,0x1d7 CALL 0x0012eb8f JMP 0x001388d2 LAB_00138a4e: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x001389f8 LAB_00138a60: LEA RSI,[0x1d96ee] MOV EDX,0x224 CALL 0x0012eb8f JMP 0x001389e4 LAB_00138a76: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00138a29 LAB_00138a88: MOV dword ptr [RBP + -0x2c],0x0 LAB_00138a8f: XORPS XMM0,XMM0 MOV RAX,qword ptr [RBP + -0x40] MOVUPS xmmword ptr [RAX],XMM0 MOV EAX,dword ptr [RBP + -0x2c] ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int4 _ma_trnman_end_trans_hook(long param_1,char param_2,char param_3) { pthread_mutex_t *__mutex; int *piVar1; long *plVar2; long lVar3; long lVar4; int4 uVar5; int4 uVar6; int4 uVar7; int4 uVar8; long lVar9; long lVar10; long lVar11; char cVar12; int iVar13; long *plVar14; int8 uVar15; long *plVar16; int4 local_34; if (*(long **)(param_1 + 0x58) == (long *)0x0) { local_34 = 0; } else { local_34 = 0; plVar16 = *(long **)(param_1 + 0x58); do { plVar2 = (long *)*plVar16; lVar3 = plVar16[1]; __mutex = (pthread_mutex_t *)(lVar3 + 0x8f0); if (param_2 == '\0') { if (*(long *)(lVar3 + 0x930) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c" ,0x224); } LAB_001389e4: piVar1 = (int *)(lVar3 + 0x7ac); *piVar1 = *piVar1 + -1; if (*piVar1 == 0) { free_maria_share(lVar3); } else { if (*(long *)(lVar3 + 0x930) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); } } else { if (*(long *)(lVar3 + 0x930) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c" ,0x1d7); } if ((*(byte *)((long)plVar16 + 0x44) & 1) == 0) goto LAB_001389e4; if ((*(byte *)((long)plVar16 + 0x44) & 2) != 0) { _ma_reset_history(lVar3); goto LAB_001389e4; } if (((param_3 == '\0') || (*(char *)(lVar3 + 0x7e7) == '\0')) || (cVar12 = trnman_exists_active_transactions (*(int8 *)(*(long *)(lVar3 + 0x450) + 8), *(int8 *)(param_1 + 0x88),1), cVar12 == '\0')) { plVar14 = *(long **)(lVar3 + 0x450); LAB_0013899a: plVar14[2] = plVar14[2] + (plVar16[2] - plVar16[9]); *(int *)(plVar14 + 8) = (int)plVar14[8] + ((int)plVar16[8] - (int)plVar16[0xf]); lVar4 = *(long *)(param_1 + 0x88); plVar14[1] = lVar4; *(long *)(lVar3 + 0xe8) = lVar4; if (*plVar14 != 0) { uVar15 = _ma_remove_not_visible_states(plVar14,0,1); *(int8 *)(lVar3 + 0x450) = uVar15; } goto LAB_001389e4; } plVar14 = (long *)my_malloc(0,0x48,0x10); if (plVar14 != (long *)0x0) { lVar4 = *(long *)(lVar3 + 0x450); plVar14[8] = *(long *)(lVar4 + 0x40); uVar5 = *(int4 *)(lVar4 + 0x10); uVar6 = *(int4 *)(lVar4 + 0x14); uVar7 = *(int4 *)(lVar4 + 0x18); uVar8 = *(int4 *)(lVar4 + 0x1c); lVar9 = *(long *)(lVar4 + 0x20); lVar10 = *(long *)(lVar4 + 0x28); lVar11 = *(long *)(lVar4 + 0x38); plVar14[6] = *(long *)(lVar4 + 0x30); plVar14[7] = lVar11; plVar14[4] = lVar9; plVar14[5] = lVar10; *(int4 *)(plVar14 + 2) = uVar5; *(int4 *)((long)plVar14 + 0x14) = uVar6; *(int4 *)(plVar14 + 3) = uVar7; *(int4 *)((long)plVar14 + 0x1c) = uVar8; *plVar14 = *(long *)(lVar3 + 0x450); *(long **)(lVar3 + 0x450) = plVar14; goto LAB_0013899a; } if (*(long *)(lVar3 + 0x930) != 0) { (**(code **)(PSI_server + 0x160))(); } iVar13 = pthread_mutex_unlock(__mutex); local_34 = (int4)CONCAT71((uint7)(uint3)((uint)iVar13 >> 8),1); } my_free(plVar16); plVar16 = plVar2; } while (plVar2 != (long *)0x0); } *(int8 *)(param_1 + 0x58) = 0; *(int8 *)(param_1 + 0x60) = 0; return local_34; }
61,643
pagecache_delete
eloqsql/storage/maria/ma_pagecache.c
my_bool pagecache_delete(PAGECACHE *pagecache, PAGECACHE_FILE *file, pgcache_page_no_t pageno, enum pagecache_page_lock lock, my_bool flush) { my_bool error= 0; enum pagecache_page_pin pin= lock_to_pin_one_phase[lock]; DBUG_ENTER("pagecache_delete"); DBUG_PRINT("enter", ("fd: %u page: %lu %s %s", (uint) file->file, (ulong) pageno, page_cache_page_lock_str[lock], page_cache_page_pin_str[pin])); DBUG_ASSERT(lock == PAGECACHE_LOCK_WRITE || lock == PAGECACHE_LOCK_LEFT_WRITELOCKED); DBUG_ASSERT(pin == PAGECACHE_PIN || pin == PAGECACHE_PIN_LEFT_PINNED); restart: DBUG_ASSERT(pageno < ((1ULL) << 40)); if (pagecache->can_be_used) { /* Key cache is used */ reg1 PAGECACHE_BLOCK_LINK *block; PAGECACHE_HASH_LINK **unused_start, *page_link; pagecache_pthread_mutex_lock(&pagecache->cache_lock); if (!pagecache->can_be_used) goto end; inc_counter_for_resize_op(pagecache); page_link= get_present_hash_link(pagecache, file, pageno, &unused_start); if (!page_link) { DBUG_PRINT("info", ("There is no such page in the cache")); dec_counter_for_resize_op(pagecache); pagecache_pthread_mutex_unlock(&pagecache->cache_lock); DBUG_RETURN(0); } block= page_link->block; if (block->status & (PCBLOCK_REASSIGNED | PCBLOCK_IN_SWITCH)) { DBUG_PRINT("info", ("Block %p already is %s", block, ((block->status & PCBLOCK_REASSIGNED) ? "reassigned" : "in switch"))); PCBLOCK_INFO(block); page_link->requests--; dec_counter_for_resize_op(pagecache); goto end; } /* See NOTE for pagecache_unlock about registering requests. */ if (pin == PAGECACHE_PIN) reg_requests(pagecache, block, 1); if (make_lock_and_pin(pagecache, block, lock, pin, FALSE)) { /* We failed to writelock the block, cache is unlocked, and last write lock is released, we will try to get the block again. */ if (pin == PAGECACHE_PIN) unreg_request(pagecache, block, 1); dec_counter_for_resize_op(pagecache); pagecache_pthread_mutex_unlock(&pagecache->cache_lock); dec_counter_for_resize_op(pagecache); DBUG_PRINT("info", ("restarting...")); goto restart; } /* we can't delete with opened direct link for write */ DBUG_ASSERT((block->status & PCBLOCK_DIRECT_W) == 0); error= pagecache_delete_internal(pagecache, block, page_link, flush); end: pagecache_pthread_mutex_unlock(&pagecache->cache_lock); } DBUG_RETURN(error); }
O0
c
pagecache_delete: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movb %r8b, %al movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movb %al, -0x25(%rbp) movb $0x0, -0x26(%rbp) movl -0x24(%rbp), %eax movl %eax, %ecx leaq 0x28e453(%rip), %rax # 0x2bd150 movl (%rax,%rcx,4), %eax movl %eax, -0x2c(%rbp) jmp 0x2ed05 jmp 0x2ed07 jmp 0x2ed09 jmp 0x2ed0b jmp 0x2ed0d jmp 0x2ed0f jmp 0x2ed11 jmp 0x2ed13 movq -0x10(%rbp), %rax cmpb $0x0, 0x1aa(%rax) je 0x2ee7f movq -0x10(%rbp), %rdi addq $0xc8, %rdi leaq 0x1226eb(%rip), %rsi # 0x151421 movl $0x107a, %edx # imm = 0x107A callq 0x2c4a0 movq -0x10(%rbp), %rax cmpb $0x0, 0x1aa(%rax) jne 0x2ed52 jmp 0x2ee6f movq -0x10(%rbp), %rdi callq 0x2c850 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx leaq -0x40(%rbp), %rcx callq 0x2ee90 movq %rax, -0x48(%rbp) cmpq $0x0, -0x48(%rbp) jne 0x2eda1 jmp 0x2ed7d jmp 0x2ed7f movq -0x10(%rbp), %rdi callq 0x2d580 movq -0x10(%rbp), %rdi addq $0xc8, %rdi callq 0x2c510 movb $0x0, -0x1(%rbp) jmp 0x2ee87 movq -0x48(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movzwl 0x74(%rax), %eax andl $0xc, %eax cmpl $0x0, %eax je 0x2ede0 jmp 0x2edbf jmp 0x2edc1 jmp 0x2edc3 jmp 0x2edc5 movq -0x48(%rbp), %rax movl 0x68(%rax), %ecx addl $-0x1, %ecx movl %ecx, 0x68(%rax) movq -0x10(%rbp), %rdi callq 0x2d580 jmp 0x2ee6f cmpl $0x2, -0x2c(%rbp) jne 0x2edf8 movq -0x10(%rbp), %rdi movq -0x38(%rbp), %rsi movl $0x1, %edx callq 0x2ef70 movq -0x10(%rbp), %rdi movq -0x38(%rbp), %rsi movl -0x24(%rbp), %edx movl -0x2c(%rbp), %ecx xorl %r8d, %r8d callq 0x2d260 cmpb $0x0, %al je 0x2ee53 cmpl $0x2, -0x2c(%rbp) jne 0x2ee2a movq -0x10(%rbp), %rdi movq -0x38(%rbp), %rsi movl $0x1, %edx callq 0x2d400 movq -0x10(%rbp), %rdi callq 0x2d580 movq -0x10(%rbp), %rdi addq $0xc8, %rdi callq 0x2c510 movq -0x10(%rbp), %rdi callq 0x2d580 jmp 0x2ee4e jmp 0x2ed0f jmp 0x2ee55 jmp 0x2ee57 movq -0x10(%rbp), %rdi movq -0x38(%rbp), %rsi movq -0x48(%rbp), %rdx movsbl -0x25(%rbp), %ecx callq 0x2ea10 movb %al, -0x26(%rbp) movq -0x10(%rbp), %rdi addq $0xc8, %rdi callq 0x2c510 jmp 0x2ee81 movb -0x26(%rbp), %al movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x50, %rsp popq %rbp retq
pagecache_delete: push rbp mov rbp, rsp sub rsp, 50h mov al, r8b mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov [rbp+var_25], al mov [rbp+var_26], 0 mov eax, [rbp+var_24] mov ecx, eax lea rax, lock_to_pin_one_phase mov eax, [rax+rcx*4] mov [rbp+var_2C], eax jmp short $+2 loc_2ED05: jmp short $+2 loc_2ED07: jmp short $+2 loc_2ED09: jmp short $+2 loc_2ED0B: jmp short $+2 loc_2ED0D: jmp short $+2 loc_2ED0F: jmp short $+2 loc_2ED11: jmp short $+2 loc_2ED13: mov rax, [rbp+var_10] cmp byte ptr [rax+1AAh], 0 jz loc_2EE7F mov rdi, [rbp+var_10] add rdi, 0C8h lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 107Ah call inline_mysql_mutex_lock mov rax, [rbp+var_10] cmp byte ptr [rax+1AAh], 0 jnz short loc_2ED52 jmp loc_2EE6F loc_2ED52: mov rdi, [rbp+var_10] call inc_counter_for_resize_op mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] lea rcx, [rbp+var_40] call get_present_hash_link mov [rbp+var_48], rax cmp [rbp+var_48], 0 jnz short loc_2EDA1 jmp short $+2 loc_2ED7D: jmp short $+2 loc_2ED7F: mov rdi, [rbp+var_10] call dec_counter_for_resize_op mov rdi, [rbp+var_10] add rdi, 0C8h call inline_mysql_mutex_unlock mov [rbp+var_1], 0 jmp loc_2EE87 loc_2EDA1: mov rax, [rbp+var_48] mov rax, [rax+10h] mov [rbp+var_38], rax mov rax, [rbp+var_38] movzx eax, word ptr [rax+74h] and eax, 0Ch cmp eax, 0 jz short loc_2EDE0 jmp short $+2 loc_2EDBF: jmp short $+2 loc_2EDC1: jmp short $+2 loc_2EDC3: jmp short $+2 loc_2EDC5: mov rax, [rbp+var_48] mov ecx, [rax+68h] add ecx, 0FFFFFFFFh mov [rax+68h], ecx mov rdi, [rbp+var_10] call dec_counter_for_resize_op jmp loc_2EE6F loc_2EDE0: cmp [rbp+var_2C], 2 jnz short loc_2EDF8 mov rdi, [rbp+var_10] mov rsi, [rbp+var_38] mov edx, 1 call reg_requests loc_2EDF8: mov rdi, [rbp+var_10] mov rsi, [rbp+var_38] mov edx, [rbp+var_24] mov ecx, [rbp+var_2C] xor r8d, r8d call make_lock_and_pin cmp al, 0 jz short loc_2EE53 cmp [rbp+var_2C], 2 jnz short loc_2EE2A mov rdi, [rbp+var_10] mov rsi, [rbp+var_38] mov edx, 1 call unreg_request loc_2EE2A: mov rdi, [rbp+var_10] call dec_counter_for_resize_op mov rdi, [rbp+var_10] add rdi, 0C8h call inline_mysql_mutex_unlock mov rdi, [rbp+var_10] call dec_counter_for_resize_op jmp short $+2 loc_2EE4E: jmp loc_2ED0F loc_2EE53: jmp short $+2 loc_2EE55: jmp short $+2 loc_2EE57: mov rdi, [rbp+var_10] mov rsi, [rbp+var_38] mov rdx, [rbp+var_48] movsx ecx, [rbp+var_25] call pagecache_delete_internal mov [rbp+var_26], al loc_2EE6F: mov rdi, [rbp+var_10] add rdi, 0C8h call inline_mysql_mutex_unlock loc_2EE7F: jmp short $+2 loc_2EE81: mov al, [rbp+var_26] mov [rbp+var_1], al loc_2EE87: mov al, [rbp+var_1] add rsp, 50h pop rbp retn
char pagecache_delete(_QWORD *a1, long long a2, long long a3, unsigned int a4, bool a5) { long long present_hash_link; // [rsp+8h] [rbp-48h] _BYTE v7[8]; // [rsp+10h] [rbp-40h] BYREF long long v8; // [rsp+18h] [rbp-38h] int v9; // [rsp+24h] [rbp-2Ch] char v10; // [rsp+2Ah] [rbp-26h] bool v11; // [rsp+2Bh] [rbp-25h] unsigned int v12; // [rsp+2Ch] [rbp-24h] long long v13; // [rsp+30h] [rbp-20h] long long v14; // [rsp+38h] [rbp-18h] _QWORD *v15; // [rsp+40h] [rbp-10h] v15 = a1; v14 = a2; v13 = a3; v12 = a4; v11 = a5; v10 = 0; v9 = lock_to_pin_one_phase[a4]; while ( *((_BYTE *)v15 + 426) ) { inline_mysql_mutex_lock( (long long)(v15 + 25), (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0x107Au); if ( !*((_BYTE *)v15 + 426) ) goto LABEL_15; inc_counter_for_resize_op((long long)v15); present_hash_link = get_present_hash_link(v15, v14, v13, v7); if ( !present_hash_link ) { dec_counter_for_resize_op((long long)v15); inline_mysql_mutex_unlock((long long)(v15 + 25)); return 0; } v8 = *(_QWORD *)(present_hash_link + 16); if ( (*(_WORD *)(v8 + 116) & 0xC) != 0 ) { --*(_DWORD *)(present_hash_link + 104); dec_counter_for_resize_op((long long)v15); LABEL_15: inline_mysql_mutex_unlock((long long)(v15 + 25)); return v10; } if ( v9 == 2 ) reg_requests(v15, v8, 1LL); if ( !make_lock_and_pin((long long)v15, v8, v12, v9, 0) ) { v10 = pagecache_delete_internal(v15, v8, present_hash_link, v11); goto LABEL_15; } if ( v9 == 2 ) unreg_request(v15, v8, 1); dec_counter_for_resize_op((long long)v15); inline_mysql_mutex_unlock((long long)(v15 + 25)); dec_counter_for_resize_op((long long)v15); } return v10; }
pagecache_delete: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV AL,R8B MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV byte ptr [RBP + -0x25],AL MOV byte ptr [RBP + -0x26],0x0 MOV EAX,dword ptr [RBP + -0x24] MOV ECX,EAX LEA RAX,[0x3bd150] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RBP + -0x2c],EAX JMP 0x0012ed05 LAB_0012ed05: JMP 0x0012ed07 LAB_0012ed07: JMP 0x0012ed09 LAB_0012ed09: JMP 0x0012ed0b LAB_0012ed0b: JMP 0x0012ed0d LAB_0012ed0d: JMP 0x0012ed0f LAB_0012ed0f: JMP 0x0012ed11 LAB_0012ed11: JMP 0x0012ed13 LAB_0012ed13: MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x1aa],0x0 JZ 0x0012ee7f MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0xc8 LEA RSI,[0x251421] MOV EDX,0x107a CALL 0x0012c4a0 MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x1aa],0x0 JNZ 0x0012ed52 JMP 0x0012ee6f LAB_0012ed52: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0012c850 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] LEA RCX,[RBP + -0x40] CALL 0x0012ee90 MOV qword ptr [RBP + -0x48],RAX CMP qword ptr [RBP + -0x48],0x0 JNZ 0x0012eda1 JMP 0x0012ed7d LAB_0012ed7d: JMP 0x0012ed7f LAB_0012ed7f: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0012d580 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0xc8 CALL 0x0012c510 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0012ee87 LAB_0012eda1: MOV RAX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,word ptr [RAX + 0x74] AND EAX,0xc CMP EAX,0x0 JZ 0x0012ede0 JMP 0x0012edbf LAB_0012edbf: JMP 0x0012edc1 LAB_0012edc1: JMP 0x0012edc3 LAB_0012edc3: JMP 0x0012edc5 LAB_0012edc5: MOV RAX,qword ptr [RBP + -0x48] MOV ECX,dword ptr [RAX + 0x68] ADD ECX,-0x1 MOV dword ptr [RAX + 0x68],ECX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0012d580 JMP 0x0012ee6f LAB_0012ede0: CMP dword ptr [RBP + -0x2c],0x2 JNZ 0x0012edf8 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x38] MOV EDX,0x1 CALL 0x0012ef70 LAB_0012edf8: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x38] MOV EDX,dword ptr [RBP + -0x24] MOV ECX,dword ptr [RBP + -0x2c] XOR R8D,R8D CALL 0x0012d260 CMP AL,0x0 JZ 0x0012ee53 CMP dword ptr [RBP + -0x2c],0x2 JNZ 0x0012ee2a MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x38] MOV EDX,0x1 CALL 0x0012d400 LAB_0012ee2a: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0012d580 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0xc8 CALL 0x0012c510 MOV RDI,qword ptr [RBP + -0x10] CALL 0x0012d580 JMP 0x0012ee4e LAB_0012ee4e: JMP 0x0012ed0f LAB_0012ee53: JMP 0x0012ee55 LAB_0012ee55: JMP 0x0012ee57 LAB_0012ee57: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x48] MOVSX ECX,byte ptr [RBP + -0x25] CALL 0x0012ea10 MOV byte ptr [RBP + -0x26],AL LAB_0012ee6f: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0xc8 CALL 0x0012c510 LAB_0012ee7f: JMP 0x0012ee81 LAB_0012ee81: MOV AL,byte ptr [RBP + -0x26] MOV byte ptr [RBP + -0x1],AL LAB_0012ee87: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x50 POP RBP RET
int8 pagecache_delete(long param_1,int8 param_2,int8 param_3,uint param_4,char param_5) { char cVar1; long lVar2; int7 extraout_var; int7 uVar3; int1 local_48 [8]; long local_40; int local_34; int1 local_2e; char local_2d; uint local_2c; int8 local_28; int8 local_20; long local_18; int1 local_9; local_2e = 0; local_34 = *(int *)(lock_to_pin_one_phase + (ulong)param_4 * 4); local_2d = param_5; local_2c = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; do { if (*(char *)(local_18 + 0x1aa) == '\0') { LAB_0012ee7f: uVar3 = (int7)((ulong)local_18 >> 8); local_9 = local_2e; LAB_0012ee87: return CONCAT71(uVar3,local_9); } inline_mysql_mutex_lock (local_18 + 200, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",0x107a); if (*(char *)(local_18 + 0x1aa) == '\0') goto LAB_0012ee6f; inc_counter_for_resize_op(local_18); lVar2 = get_present_hash_link(local_18,local_20,local_28,local_48); if (lVar2 == 0) { dec_counter_for_resize_op(local_18); inline_mysql_mutex_unlock(local_18 + 200); local_9 = 0; uVar3 = extraout_var; goto LAB_0012ee87; } local_40 = *(long *)(lVar2 + 0x10); if ((*(ushort *)(local_40 + 0x74) & 0xc) != 0) { *(int *)(lVar2 + 0x68) = *(int *)(lVar2 + 0x68) + -1; dec_counter_for_resize_op(local_18); LAB_0012ee6f: local_18 = inline_mysql_mutex_unlock(local_18 + 200); goto LAB_0012ee7f; } if (local_34 == 2) { reg_requests(local_18,local_40,1); } cVar1 = make_lock_and_pin(local_18,local_40,local_2c,local_34,0); if (cVar1 == '\0') { local_2e = pagecache_delete_internal(local_18,local_40,lVar2,(int)local_2d); goto LAB_0012ee6f; } if (local_34 == 2) { unreg_request(local_18,local_40,1); } dec_counter_for_resize_op(local_18); inline_mysql_mutex_unlock(local_18 + 200); dec_counter_for_resize_op(local_18); } while( true ); }
61,644
pagecache_delete
eloqsql/storage/maria/ma_pagecache.c
my_bool pagecache_delete(PAGECACHE *pagecache, PAGECACHE_FILE *file, pgcache_page_no_t pageno, enum pagecache_page_lock lock, my_bool flush) { my_bool error= 0; enum pagecache_page_pin pin= lock_to_pin_one_phase[lock]; DBUG_ENTER("pagecache_delete"); DBUG_PRINT("enter", ("fd: %u page: %lu %s %s", (uint) file->file, (ulong) pageno, page_cache_page_lock_str[lock], page_cache_page_pin_str[pin])); DBUG_ASSERT(lock == PAGECACHE_LOCK_WRITE || lock == PAGECACHE_LOCK_LEFT_WRITELOCKED); DBUG_ASSERT(pin == PAGECACHE_PIN || pin == PAGECACHE_PIN_LEFT_PINNED); restart: DBUG_ASSERT(pageno < ((1ULL) << 40)); if (pagecache->can_be_used) { /* Key cache is used */ reg1 PAGECACHE_BLOCK_LINK *block; PAGECACHE_HASH_LINK **unused_start, *page_link; pagecache_pthread_mutex_lock(&pagecache->cache_lock); if (!pagecache->can_be_used) goto end; inc_counter_for_resize_op(pagecache); page_link= get_present_hash_link(pagecache, file, pageno, &unused_start); if (!page_link) { DBUG_PRINT("info", ("There is no such page in the cache")); dec_counter_for_resize_op(pagecache); pagecache_pthread_mutex_unlock(&pagecache->cache_lock); DBUG_RETURN(0); } block= page_link->block; if (block->status & (PCBLOCK_REASSIGNED | PCBLOCK_IN_SWITCH)) { DBUG_PRINT("info", ("Block %p already is %s", block, ((block->status & PCBLOCK_REASSIGNED) ? "reassigned" : "in switch"))); PCBLOCK_INFO(block); page_link->requests--; dec_counter_for_resize_op(pagecache); goto end; } /* See NOTE for pagecache_unlock about registering requests. */ if (pin == PAGECACHE_PIN) reg_requests(pagecache, block, 1); if (make_lock_and_pin(pagecache, block, lock, pin, FALSE)) { /* We failed to writelock the block, cache is unlocked, and last write lock is released, we will try to get the block again. */ if (pin == PAGECACHE_PIN) unreg_request(pagecache, block, 1); dec_counter_for_resize_op(pagecache); pagecache_pthread_mutex_unlock(&pagecache->cache_lock); dec_counter_for_resize_op(pagecache); DBUG_PRINT("info", ("restarting...")); goto restart; } /* we can't delete with opened direct link for write */ DBUG_ASSERT((block->status & PCBLOCK_DIRECT_W) == 0); error= pagecache_delete_internal(pagecache, block, page_link, flush); end: pagecache_pthread_mutex_unlock(&pagecache->cache_lock); } DBUG_RETURN(error); }
O3
c
pagecache_delete: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, -0x40(%rbp) cmpb $0x0, 0x1aa(%rdi) je 0x3387e movq %rdx, %r13 movq %rdi, %r14 movl %r8d, -0x2c(%rbp) movl %ecx, -0x34(%rbp) movl %ecx, %eax leaq 0xad7d9(%rip), %rcx # 0xe0e30 movl (%rcx,%rax,4), %eax movl %eax, -0x30(%rbp) leaq 0xc8(%rdi), %r15 leaq 0x3529a5(%rip), %r12 # 0x386010 cmpq $0x0, 0x108(%r14) jne 0x337ed movq %r15, %rdi callq 0x29220 cmpb $0x0, 0x1aa(%r14) je 0x338f0 movq 0x20(%r14), %rdx movq 0x68(%r14), %rax leaq 0x1(%rax), %rcx movq %rcx, 0x68(%r14) movq 0x88(%r14), %rsi movq -0x40(%rbp), %rcx movslq 0x10(%rcx), %rcx leaq (%rcx,%r13), %rdi decq %rdx andq %rdi, %rdx movq (%rsi,%rdx,8), %rbx testq %rbx, %rbx je 0x3382d cmpq %r13, 0x60(%rbx) jne 0x336d0 cmpl %ecx, 0x28(%rbx) je 0x336d5 movq (%rbx), %rbx jmp 0x336bc movq %r15, %r12 movl 0x68(%rbx), %eax leal 0x1(%rax), %ecx movl %ecx, 0x68(%rbx) movq 0x10(%rbx), %r15 testb $0xc, 0x74(%r15) jne 0x33891 movl -0x34(%rbp), %edx cmpl $0x4, %edx jne 0x33744 movl 0x60(%r15), %eax testl %eax, %eax jne 0x3370f movq %r14, %rdi movq %r15, %rsi callq 0x34e4d movl 0x60(%r15), %eax incl %eax movl %eax, 0x60(%r15) movq %r14, %rdi movq %r15, %rsi movl $0x4, %edx movl $0x2, %ecx callq 0x31e6b testb %al, %al je 0x3389e movq %r14, %rdi movq %r15, %rsi movl $0x1, %edx callq 0x31fdb jmp 0x3375a movq %r14, %rdi movq %r15, %rsi movl -0x30(%rbp), %ecx callq 0x31e6b testb %al, %al je 0x3389e decq 0x68(%r14) movq %r12, %r15 leaq 0x3528a8(%rip), %r12 # 0x386010 jne 0x33796 movq 0x110(%r14), %rax testq %rax, %rax je 0x33796 movq 0x88(%rax), %rbx movq 0x38(%rbx), %rdi testq %rdi, %rdi jne 0x33812 addq $0x8, %rbx movq %rbx, %rdi callq 0x295c0 movq 0x108(%r14), %rdi testq %rdi, %rdi jne 0x33806 movq %r15, %rdi callq 0x291e0 decq 0x68(%r14) jne 0x337d8 movq 0x110(%r14), %rax testq %rax, %rax je 0x337d8 movq 0x88(%rax), %rbx movq 0x38(%rbx), %rdi testq %rdi, %rdi jne 0x33821 addq $0x8, %rbx movq %rbx, %rdi callq 0x295c0 xorl %ebx, %ebx cmpb $0x0, 0x1aa(%r14) jne 0x3366b jmp 0x33880 movq %r15, %rdi leaq 0xa5da3(%rip), %rsi # 0xd959a movl $0x107a, %edx # imm = 0x107A callq 0x2eb8f jmp 0x33681 movq (%r12), %rax callq *0x160(%rax) jmp 0x337a2 movq (%r12), %rax callq *0x170(%rax) jmp 0x3378a movq (%r12), %rax callq *0x170(%rax) jmp 0x337cc movq %rax, 0x68(%r14) testq %rax, %rax jne 0x33862 movq 0x110(%r14), %rax testq %rax, %rax je 0x33862 movq 0x88(%rax), %rbx movq 0x38(%rbx), %rdi addq $0x8, %rbx testq %rdi, %rdi jne 0x33911 movq %rbx, %rdi callq 0x295c0 movq 0x108(%r14), %rdi xorl %ebx, %ebx testq %rdi, %rdi jne 0x33902 movq %r15, %rdi callq 0x291e0 jmp 0x33880 xorl %ebx, %ebx movl %ebx, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %eax, 0x68(%rbx) decq 0x68(%r14) je 0x338be xorl %ebx, %ebx jmp 0x338b2 movsbl -0x2c(%rbp), %ecx movq %r14, %rdi movq %r15, %rsi movq %rbx, %rdx callq 0x3340d movl %eax, %ebx movq %r12, %r15 leaq 0x352754(%rip), %r12 # 0x386010 jmp 0x338f2 movq 0x110(%r14), %rax testq %rax, %rax movq %r12, %r15 je 0x338fe movq 0x88(%rax), %rbx movq 0x38(%rbx), %rdi addq $0x8, %rbx testq %rdi, %rdi leaq 0x35272a(%rip), %r12 # 0x386010 jne 0x33920 movq %rbx, %rdi callq 0x295c0 xorl %ebx, %ebx movq 0x108(%r14), %rdi jmp 0x3386b xorl %ebx, %ebx jmp 0x338b5 movq (%r12), %rax callq *0x160(%rax) jmp 0x33874 movq (%r12), %rax callq *0x170(%rax) jmp 0x3385a movq (%r12), %rax callq *0x170(%rax) jmp 0x338e8
pagecache_delete: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_40], rsi cmp byte ptr [rdi+1AAh], 0 jz loc_3387E mov r13, rdx mov r14, rdi mov [rbp+var_2C], r8d mov [rbp+var_34], ecx mov eax, ecx lea rcx, lock_to_pin_one_phase mov eax, [rcx+rax*4] mov [rbp+var_30], eax lea r15, [rdi+0C8h] lea r12, PSI_server loc_3366B: cmp qword ptr [r14+108h], 0 jnz loc_337ED mov rdi, r15 call _pthread_mutex_lock loc_33681: cmp byte ptr [r14+1AAh], 0 jz loc_338F0 mov rdx, [r14+20h] mov rax, [r14+68h] lea rcx, [rax+1] mov [r14+68h], rcx mov rsi, [r14+88h] mov rcx, [rbp+var_40] movsxd rcx, dword ptr [rcx+10h] lea rdi, [rcx+r13] dec rdx and rdx, rdi mov rbx, [rsi+rdx*8] loc_336BC: test rbx, rbx jz loc_3382D cmp [rbx+60h], r13 jnz short loc_336D0 cmp [rbx+28h], ecx jz short loc_336D5 loc_336D0: mov rbx, [rbx] jmp short loc_336BC loc_336D5: mov r12, r15 mov eax, [rbx+68h] lea ecx, [rax+1] mov [rbx+68h], ecx mov r15, [rbx+10h] test byte ptr [r15+74h], 0Ch jnz loc_33891 mov edx, [rbp+var_34] cmp edx, 4 jnz short loc_33744 mov eax, [r15+60h] test eax, eax jnz short loc_3370F mov rdi, r14 mov rsi, r15 call unlink_block mov eax, [r15+60h] loc_3370F: inc eax mov [r15+60h], eax mov rdi, r14 mov rsi, r15 mov edx, 4 mov ecx, 2 call make_lock_and_pin test al, al jz loc_3389E mov rdi, r14 mov rsi, r15 mov edx, 1 call unreg_request jmp short loc_3375A loc_33744: mov rdi, r14 mov rsi, r15 mov ecx, [rbp+var_30] call make_lock_and_pin test al, al jz loc_3389E loc_3375A: dec qword ptr [r14+68h] mov r15, r12 lea r12, PSI_server jnz short loc_33796 mov rax, [r14+110h] test rax, rax jz short loc_33796 mov rbx, [rax+88h] mov rdi, [rbx+38h] test rdi, rdi jnz loc_33812 loc_3378A: add rbx, 8 mov rdi, rbx call _pthread_cond_signal loc_33796: mov rdi, [r14+108h] test rdi, rdi jnz short loc_33806 loc_337A2: mov rdi, r15 call _pthread_mutex_unlock dec qword ptr [r14+68h] jnz short loc_337D8 mov rax, [r14+110h] test rax, rax jz short loc_337D8 mov rbx, [rax+88h] mov rdi, [rbx+38h] test rdi, rdi jnz short loc_33821 loc_337CC: add rbx, 8 mov rdi, rbx call _pthread_cond_signal loc_337D8: xor ebx, ebx cmp byte ptr [r14+1AAh], 0 jnz loc_3366B jmp loc_33880 loc_337ED: mov rdi, r15 lea rsi, aWorkspaceLlm4b_25; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 107Ah call psi_mutex_lock jmp loc_33681 loc_33806: mov rax, [r12] call qword ptr [rax+160h] jmp short loc_337A2 loc_33812: mov rax, [r12] call qword ptr [rax+170h] jmp loc_3378A loc_33821: mov rax, [r12] call qword ptr [rax+170h] jmp short loc_337CC loc_3382D: mov [r14+68h], rax test rax, rax jnz short loc_33862 mov rax, [r14+110h] test rax, rax jz short loc_33862 mov rbx, [rax+88h] mov rdi, [rbx+38h] add rbx, 8 test rdi, rdi jnz loc_33911 loc_3385A: mov rdi, rbx call _pthread_cond_signal loc_33862: mov rdi, [r14+108h] xor ebx, ebx loc_3386B: test rdi, rdi jnz loc_33902 loc_33874: mov rdi, r15 call _pthread_mutex_unlock jmp short loc_33880 loc_3387E: xor ebx, ebx loc_33880: mov eax, ebx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_33891: mov [rbx+68h], eax dec qword ptr [r14+68h] jz short loc_338BE xor ebx, ebx jmp short loc_338B2 loc_3389E: movsx ecx, byte ptr [rbp+var_2C] mov rdi, r14 mov rsi, r15 mov rdx, rbx call pagecache_delete_internal mov ebx, eax loc_338B2: mov r15, r12 loc_338B5: lea r12, PSI_server jmp short loc_338F2 loc_338BE: mov rax, [r14+110h] test rax, rax mov r15, r12 jz short loc_338FE mov rbx, [rax+88h] mov rdi, [rbx+38h] add rbx, 8 test rdi, rdi lea r12, PSI_server jnz short loc_33920 loc_338E8: mov rdi, rbx call _pthread_cond_signal loc_338F0: xor ebx, ebx loc_338F2: mov rdi, [r14+108h] jmp loc_3386B loc_338FE: xor ebx, ebx jmp short loc_338B5 loc_33902: mov rax, [r12] call qword ptr [rax+160h] jmp loc_33874 loc_33911: mov rax, [r12] call qword ptr [rax+170h] jmp loc_3385A loc_33920: mov rax, [r12] call qword ptr [rax+170h] jmp short loc_338E8
long long pagecache_delete(long long a1, long long a2, long long a3, unsigned int a4, char a5) { long long v7; // r15 long long v8; // rdx long long v9; // rax long long v10; // rcx long long i; // rbx long long v12; // r12 int v13; // eax long long v14; // r15 int v15; // eax bool v16; // zf long long v17; // rax long long v18; // rbx long long v19; // rax long long v20; // rbx unsigned int v21; // ebx long long v22; // rax long long v23; // rbx long long v24; // rdi long long v25; // rbx long long v26; // rdi long long v28; // rax long long v29; // rbx long long v30; // rdi long long v31; // rbx int v33; // [rsp+10h] [rbp-30h] if ( !*(_BYTE *)(a1 + 426) ) return 0; v33 = lock_to_pin_one_phase[a4]; v7 = a1 + 200; do { if ( *(_QWORD *)(a1 + 264) ) psi_mutex_lock(v7, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0x107Au); else pthread_mutex_lock(v7); if ( !*(_BYTE *)(a1 + 426) ) goto LABEL_52; v8 = *(_QWORD *)(a1 + 32); v9 = *(_QWORD *)(a1 + 104); *(_QWORD *)(a1 + 104) = v9 + 1; v10 = *(int *)(a2 + 16); for ( i = *(_QWORD *)(*(_QWORD *)(a1 + 136) + 8 * ((v10 + a3) & (v8 - 1))); ; i = *(_QWORD *)i ) { if ( !i ) { *(_QWORD *)(a1 + 104) = v9; if ( !v9 ) { v22 = *(_QWORD *)(a1 + 272); if ( v22 ) { v23 = *(_QWORD *)(v22 + 136); v24 = *(_QWORD *)(v23 + 56); v25 = v23 + 8; if ( v24 ) PSI_server[46](); pthread_cond_signal(v25); } } v26 = *(_QWORD *)(a1 + 264); v21 = 0; goto LABEL_39; } if ( *(_QWORD *)(i + 96) == a3 && *(_DWORD *)(i + 40) == (_DWORD)v10 ) break; } v12 = v7; v13 = *(_DWORD *)(i + 104); *(_DWORD *)(i + 104) = v13 + 1; v14 = *(_QWORD *)(i + 16); if ( (*(_BYTE *)(v14 + 116) & 0xC) != 0 ) { *(_DWORD *)(i + 104) = v13; v16 = (*(_QWORD *)(a1 + 104))-- == 1LL; if ( !v16 ) { v21 = 0; goto LABEL_47; } v28 = *(_QWORD *)(a1 + 272); v7 = v12; if ( v28 ) { v29 = *(_QWORD *)(v28 + 136); v30 = *(_QWORD *)(v29 + 56); v31 = v29 + 8; if ( v30 ) PSI_server[46](); pthread_cond_signal(v31); LABEL_52: v21 = 0; } else { v21 = 0; } LABEL_53: v26 = *(_QWORD *)(a1 + 264); LABEL_39: if ( v26 ) PSI_server[44](); pthread_mutex_unlock(v7); return v21; } if ( a4 != 4 ) { if ( make_lock_and_pin(a1, *(_QWORD *)(i + 16), a4, v33) ) goto LABEL_18; LABEL_46: v21 = pagecache_delete_internal((_QWORD *)a1, v14, i, a5); LABEL_47: v7 = v12; goto LABEL_53; } v15 = *(_DWORD *)(v14 + 96); if ( !v15 ) { unlink_block(a1, *(_QWORD *)(i + 16)); v15 = *(_DWORD *)(v14 + 96); } *(_DWORD *)(v14 + 96) = v15 + 1; if ( !make_lock_and_pin(a1, v14, 4, 2) ) goto LABEL_46; unreg_request((_QWORD *)a1, v14, 1); LABEL_18: v16 = (*(_QWORD *)(a1 + 104))-- == 1LL; v7 = v12; if ( v16 ) { v17 = *(_QWORD *)(a1 + 272); if ( v17 ) { v18 = *(_QWORD *)(v17 + 136); if ( *(_QWORD *)(v18 + 56) ) PSI_server[46](); pthread_cond_signal(v18 + 8); } } if ( *(_QWORD *)(a1 + 264) ) PSI_server[44](); pthread_mutex_unlock(v12); v16 = (*(_QWORD *)(a1 + 104))-- == 1LL; if ( v16 ) { v19 = *(_QWORD *)(a1 + 272); if ( v19 ) { v20 = *(_QWORD *)(v19 + 136); if ( *(_QWORD *)(v20 + 56) ) PSI_server[46](); pthread_cond_signal(v20 + 8); } } v21 = 0; } while ( *(_BYTE *)(a1 + 426) ); return v21; }
pagecache_delete: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x40],RSI CMP byte ptr [RDI + 0x1aa],0x0 JZ 0x0013387e MOV R13,RDX MOV R14,RDI MOV dword ptr [RBP + -0x2c],R8D MOV dword ptr [RBP + -0x34],ECX MOV EAX,ECX LEA RCX,[0x1e0e30] MOV EAX,dword ptr [RCX + RAX*0x4] MOV dword ptr [RBP + -0x30],EAX LEA R15,[RDI + 0xc8] LEA R12,[0x486010] LAB_0013366b: CMP qword ptr [R14 + 0x108],0x0 JNZ 0x001337ed MOV RDI,R15 CALL 0x00129220 LAB_00133681: CMP byte ptr [R14 + 0x1aa],0x0 JZ 0x001338f0 MOV RDX,qword ptr [R14 + 0x20] MOV RAX,qword ptr [R14 + 0x68] LEA RCX,[RAX + 0x1] MOV qword ptr [R14 + 0x68],RCX MOV RSI,qword ptr [R14 + 0x88] MOV RCX,qword ptr [RBP + -0x40] MOVSXD RCX,dword ptr [RCX + 0x10] LEA RDI,[RCX + R13*0x1] DEC RDX AND RDX,RDI MOV RBX,qword ptr [RSI + RDX*0x8] LAB_001336bc: TEST RBX,RBX JZ 0x0013382d CMP qword ptr [RBX + 0x60],R13 JNZ 0x001336d0 CMP dword ptr [RBX + 0x28],ECX JZ 0x001336d5 LAB_001336d0: MOV RBX,qword ptr [RBX] JMP 0x001336bc LAB_001336d5: MOV R12,R15 MOV EAX,dword ptr [RBX + 0x68] LEA ECX,[RAX + 0x1] MOV dword ptr [RBX + 0x68],ECX MOV R15,qword ptr [RBX + 0x10] TEST byte ptr [R15 + 0x74],0xc JNZ 0x00133891 MOV EDX,dword ptr [RBP + -0x34] CMP EDX,0x4 JNZ 0x00133744 MOV EAX,dword ptr [R15 + 0x60] TEST EAX,EAX JNZ 0x0013370f MOV RDI,R14 MOV RSI,R15 CALL 0x00134e4d MOV EAX,dword ptr [R15 + 0x60] LAB_0013370f: INC EAX MOV dword ptr [R15 + 0x60],EAX MOV RDI,R14 MOV RSI,R15 MOV EDX,0x4 MOV ECX,0x2 CALL 0x00131e6b TEST AL,AL JZ 0x0013389e MOV RDI,R14 MOV RSI,R15 MOV EDX,0x1 CALL 0x00131fdb JMP 0x0013375a LAB_00133744: MOV RDI,R14 MOV RSI,R15 MOV ECX,dword ptr [RBP + -0x30] CALL 0x00131e6b TEST AL,AL JZ 0x0013389e LAB_0013375a: DEC qword ptr [R14 + 0x68] MOV R15,R12 LEA R12,[0x486010] JNZ 0x00133796 MOV RAX,qword ptr [R14 + 0x110] TEST RAX,RAX JZ 0x00133796 MOV RBX,qword ptr [RAX + 0x88] MOV RDI,qword ptr [RBX + 0x38] TEST RDI,RDI JNZ 0x00133812 LAB_0013378a: ADD RBX,0x8 MOV RDI,RBX CALL 0x001295c0 LAB_00133796: MOV RDI,qword ptr [R14 + 0x108] TEST RDI,RDI JNZ 0x00133806 LAB_001337a2: MOV RDI,R15 CALL 0x001291e0 DEC qword ptr [R14 + 0x68] JNZ 0x001337d8 MOV RAX,qword ptr [R14 + 0x110] TEST RAX,RAX JZ 0x001337d8 MOV RBX,qword ptr [RAX + 0x88] MOV RDI,qword ptr [RBX + 0x38] TEST RDI,RDI JNZ 0x00133821 LAB_001337cc: ADD RBX,0x8 MOV RDI,RBX CALL 0x001295c0 LAB_001337d8: XOR EBX,EBX CMP byte ptr [R14 + 0x1aa],0x0 JNZ 0x0013366b JMP 0x00133880 LAB_001337ed: MOV RDI,R15 LEA RSI,[0x1d959a] MOV EDX,0x107a CALL 0x0012eb8f JMP 0x00133681 LAB_00133806: MOV RAX,qword ptr [R12] CALL qword ptr [RAX + 0x160] JMP 0x001337a2 LAB_00133812: MOV RAX,qword ptr [R12] CALL qword ptr [RAX + 0x170] JMP 0x0013378a LAB_00133821: MOV RAX,qword ptr [R12] CALL qword ptr [RAX + 0x170] JMP 0x001337cc LAB_0013382d: MOV qword ptr [R14 + 0x68],RAX TEST RAX,RAX JNZ 0x00133862 MOV RAX,qword ptr [R14 + 0x110] TEST RAX,RAX JZ 0x00133862 MOV RBX,qword ptr [RAX + 0x88] MOV RDI,qword ptr [RBX + 0x38] ADD RBX,0x8 TEST RDI,RDI JNZ 0x00133911 LAB_0013385a: MOV RDI,RBX CALL 0x001295c0 LAB_00133862: MOV RDI,qword ptr [R14 + 0x108] XOR EBX,EBX LAB_0013386b: TEST RDI,RDI JNZ 0x00133902 LAB_00133874: MOV RDI,R15 CALL 0x001291e0 JMP 0x00133880 LAB_0013387e: XOR EBX,EBX LAB_00133880: MOV EAX,EBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00133891: MOV dword ptr [RBX + 0x68],EAX DEC qword ptr [R14 + 0x68] JZ 0x001338be XOR EBX,EBX JMP 0x001338b2 LAB_0013389e: MOVSX ECX,byte ptr [RBP + -0x2c] MOV RDI,R14 MOV RSI,R15 MOV RDX,RBX CALL 0x0013340d MOV EBX,EAX LAB_001338b2: MOV R15,R12 LAB_001338b5: LEA R12,[0x486010] JMP 0x001338f2 LAB_001338be: MOV RAX,qword ptr [R14 + 0x110] TEST RAX,RAX MOV R15,R12 JZ 0x001338fe MOV RBX,qword ptr [RAX + 0x88] MOV RDI,qword ptr [RBX + 0x38] ADD RBX,0x8 TEST RDI,RDI LEA R12,[0x486010] JNZ 0x00133920 LAB_001338e8: MOV RDI,RBX CALL 0x001295c0 LAB_001338f0: XOR EBX,EBX LAB_001338f2: MOV RDI,qword ptr [R14 + 0x108] JMP 0x0013386b LAB_001338fe: XOR EBX,EBX JMP 0x001338b5 LAB_00133902: MOV RAX,qword ptr [R12] CALL qword ptr [RAX + 0x160] JMP 0x00133874 LAB_00133911: MOV RAX,qword ptr [R12] CALL qword ptr [RAX + 0x170] JMP 0x0013385a LAB_00133920: MOV RAX,qword ptr [R12] CALL qword ptr [RAX + 0x170] JMP 0x001338e8
int4 pagecache_delete(long param_1,long param_2,long param_3,uint param_4,char param_5) { long *plVar1; pthread_mutex_t *__mutex; char cVar2; int iVar3; int4 uVar4; int8 *puVar5; long lVar6; if (*(char *)(param_1 + 0x1aa) != '\0') { uVar4 = *(int4 *)(lock_to_pin_one_phase + (ulong)param_4 * 4); __mutex = (pthread_mutex_t *)(param_1 + 200); do { if (*(long *)(param_1 + 0x108) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0x107a); } if (*(char *)(param_1 + 0x1aa) == '\0') { LAB_001338f0: uVar4 = 0; LAB_001338f2: lVar6 = *(long *)(param_1 + 0x108); LAB_0013386b: if (lVar6 != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); return uVar4; } lVar6 = *(long *)(param_1 + 0x68); *(long *)(param_1 + 0x68) = lVar6 + 1; puVar5 = *(int8 **) (*(long *)(param_1 + 0x88) + (*(long *)(param_1 + 0x20) - 1U & *(int *)(param_2 + 0x10) + param_3) * 8); while( true ) { if (puVar5 == (int8 *)0x0) { *(long *)(param_1 + 0x68) = lVar6; if ((lVar6 == 0) && (*(long *)(param_1 + 0x110) != 0)) { lVar6 = *(long *)(*(long *)(param_1 + 0x110) + 0x88); if (*(long *)(lVar6 + 0x38) != 0) { (**(code **)(PSI_server + 0x170))(); } pthread_cond_signal((pthread_cond_t *)(lVar6 + 8)); } lVar6 = *(long *)(param_1 + 0x108); uVar4 = 0; goto LAB_0013386b; } if ((puVar5[0xc] == param_3) && (*(int *)(puVar5 + 5) == *(int *)(param_2 + 0x10))) break; puVar5 = (int8 *)*puVar5; } iVar3 = *(int *)(puVar5 + 0xd); *(int *)(puVar5 + 0xd) = iVar3 + 1; lVar6 = puVar5[2]; if ((*(byte *)(lVar6 + 0x74) & 0xc) != 0) { *(int *)(puVar5 + 0xd) = iVar3; plVar1 = (long *)(param_1 + 0x68); *plVar1 = *plVar1 + -1; if (*plVar1 != 0) { uVar4 = 0; goto LAB_001338f2; } if (*(long *)(param_1 + 0x110) == 0) { uVar4 = 0; goto LAB_001338f2; } lVar6 = *(long *)(*(long *)(param_1 + 0x110) + 0x88); if (*(long *)(lVar6 + 0x38) != 0) { (**(code **)(PSI_server + 0x170))(); } pthread_cond_signal((pthread_cond_t *)(lVar6 + 8)); goto LAB_001338f0; } if (param_4 == 4) { iVar3 = *(int *)(lVar6 + 0x60); if (iVar3 == 0) { unlink_block(param_1,lVar6); iVar3 = *(int *)(lVar6 + 0x60); } *(int *)(lVar6 + 0x60) = iVar3 + 1; cVar2 = make_lock_and_pin(param_1,lVar6,4,2); if (cVar2 == '\0') { LAB_0013389e: uVar4 = pagecache_delete_internal(param_1,lVar6,puVar5,(int)param_5); goto LAB_001338f2; } unreg_request(param_1,lVar6,1); } else { cVar2 = make_lock_and_pin(param_1,lVar6,param_4,uVar4); if (cVar2 == '\0') goto LAB_0013389e; } plVar1 = (long *)(param_1 + 0x68); *plVar1 = *plVar1 + -1; if ((*plVar1 == 0) && (*(long *)(param_1 + 0x110) != 0)) { lVar6 = *(long *)(*(long *)(param_1 + 0x110) + 0x88); if (*(long *)(lVar6 + 0x38) != 0) { (**(code **)(PSI_server + 0x170))(); } pthread_cond_signal((pthread_cond_t *)(lVar6 + 8)); } if (*(long *)(param_1 + 0x108) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); plVar1 = (long *)(param_1 + 0x68); *plVar1 = *plVar1 + -1; if ((*plVar1 == 0) && (*(long *)(param_1 + 0x110) != 0)) { lVar6 = *(long *)(*(long *)(param_1 + 0x110) + 0x88); if (*(long *)(lVar6 + 0x38) != 0) { (**(code **)(PSI_server + 0x170))(); } pthread_cond_signal((pthread_cond_t *)(lVar6 + 8)); } } while (*(char *)(param_1 + 0x1aa) != '\0'); } return 0; }
61,645
fill_uint16
eloqsql/strings/ctype.c
static int fill_uint16(uint16 *a,uint size,const char *str, size_t len) { uint i= 0; const char *s, *b, *e=str+len; for (s=str ; s < e ; i++) { for ( ; (s < e) && strchr(" \t\r\n",s[0]); s++) ; b=s; for ( ; (s < e) && !strchr(" \t\r\n",s[0]); s++) ; if (s == b || i > size) break; a[i]= (uint16) strtol(b,NULL,16); } return 0; }
O0
c
fill_uint16: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movl $0x0, -0x24(%rbp) movq -0x18(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x36518 jmp 0x36442 movq -0x30(%rbp), %rcx xorl %eax, %eax cmpq -0x40(%rbp), %rcx movb %al, -0x41(%rbp) jae 0x3646e movq -0x30(%rbp), %rax movsbl (%rax), %esi leaq 0x456de(%rip), %rdi # 0x7bb3d callq 0x24100 cmpq $0x0, %rax setne %al movb %al, -0x41(%rbp) movb -0x41(%rbp), %al testb $0x1, %al jne 0x36477 jmp 0x36487 jmp 0x36479 movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) jmp 0x36442 movq -0x30(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rcx xorl %eax, %eax cmpq -0x40(%rbp), %rcx movb %al, -0x42(%rbp) jae 0x364bd movq -0x30(%rbp), %rax movsbl (%rax), %esi leaq 0x45691(%rip), %rdi # 0x7bb3d callq 0x24100 cmpq $0x0, %rax setne %al xorb $-0x1, %al movb %al, -0x42(%rbp) movb -0x42(%rbp), %al testb $0x1, %al jne 0x364c6 jmp 0x364d6 jmp 0x364c8 movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) jmp 0x3648f movq -0x30(%rbp), %rax cmpq -0x38(%rbp), %rax je 0x364e8 movl -0x24(%rbp), %eax cmpl -0xc(%rbp), %eax jbe 0x364ea jmp 0x36518 movq -0x38(%rbp), %rdi xorl %eax, %eax movl %eax, %esi movl $0x10, %edx callq 0x24570 movw %ax, %dx movq -0x8(%rbp), %rax movl -0x24(%rbp), %ecx movw %dx, (%rax,%rcx,2) movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0x36432 xorl %eax, %eax addq $0x50, %rsp popq %rbp retq
fill_uint16: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_24], 0 mov rax, [rbp+var_18] add rax, [rbp+var_20] mov [rbp+var_40], rax mov rax, [rbp+var_18] mov [rbp+var_30], rax loc_36432: mov rax, [rbp+var_30] cmp rax, [rbp+var_40] jnb loc_36518 jmp short $+2 loc_36442: mov rcx, [rbp+var_30] xor eax, eax cmp rcx, [rbp+var_40] mov [rbp+var_41], al jnb short loc_3646E mov rax, [rbp+var_30] movsx esi, byte ptr [rax] lea rdi, asc_7BB3D; " \t\r\n" call _strchr cmp rax, 0 setnz al mov [rbp+var_41], al loc_3646E: mov al, [rbp+var_41] test al, 1 jnz short loc_36477 jmp short loc_36487 loc_36477: jmp short $+2 loc_36479: mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax jmp short loc_36442 loc_36487: mov rax, [rbp+var_30] mov [rbp+var_38], rax loc_3648F: mov rcx, [rbp+var_30] xor eax, eax cmp rcx, [rbp+var_40] mov [rbp+var_42], al jnb short loc_364BD mov rax, [rbp+var_30] movsx esi, byte ptr [rax] lea rdi, asc_7BB3D; " \t\r\n" call _strchr cmp rax, 0 setnz al xor al, 0FFh mov [rbp+var_42], al loc_364BD: mov al, [rbp+var_42] test al, 1 jnz short loc_364C6 jmp short loc_364D6 loc_364C6: jmp short $+2 loc_364C8: mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax jmp short loc_3648F loc_364D6: mov rax, [rbp+var_30] cmp rax, [rbp+var_38] jz short loc_364E8 mov eax, [rbp+var_24] cmp eax, [rbp+var_C] jbe short loc_364EA loc_364E8: jmp short loc_36518 loc_364EA: mov rdi, [rbp+var_38] xor eax, eax mov esi, eax mov edx, 10h call ___isoc23_strtol mov dx, ax mov rax, [rbp+var_8] mov ecx, [rbp+var_24] mov [rax+rcx*2], dx mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp loc_36432 loc_36518: xor eax, eax add rsp, 50h pop rbp retn
long long fill_uint16(long long a1, unsigned int a2, char *a3, long long a4) { char v5; // [rsp+Eh] [rbp-42h] bool v6; // [rsp+Fh] [rbp-41h] unsigned long long v7; // [rsp+10h] [rbp-40h] char *v8; // [rsp+18h] [rbp-38h] char *v9; // [rsp+20h] [rbp-30h] unsigned int v10; // [rsp+2Ch] [rbp-24h] v10 = 0; v7 = (unsigned long long)&a3[a4]; v9 = a3; while ( (unsigned long long)v9 < v7 ) { while ( 1 ) { v6 = 0; if ( (unsigned long long)v9 < v7 ) v6 = strchr(" \t\r\n", (unsigned int)*v9) != 0; if ( !v6 ) break; ++v9; } v8 = v9; while ( 1 ) { v5 = 0; if ( (unsigned long long)v9 < v7 ) v5 = ~(strchr(" \t\r\n", (unsigned int)*v9) != 0); if ( (v5 & 1) == 0 ) break; ++v9; } if ( v9 == v8 || v10 > a2 ) break; *(_WORD *)(a1 + 2LL * v10++) = __isoc23_strtol(v8, 0LL, 16LL); } return 0LL; }
fill_uint16: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],0x0 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX LAB_00136432: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x40] JNC 0x00136518 JMP 0x00136442 LAB_00136442: MOV RCX,qword ptr [RBP + -0x30] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x40] MOV byte ptr [RBP + -0x41],AL JNC 0x0013646e MOV RAX,qword ptr [RBP + -0x30] MOVSX ESI,byte ptr [RAX] LEA RDI,[0x17bb3d] CALL 0x00124100 CMP RAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x41],AL LAB_0013646e: MOV AL,byte ptr [RBP + -0x41] TEST AL,0x1 JNZ 0x00136477 JMP 0x00136487 LAB_00136477: JMP 0x00136479 LAB_00136479: MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX JMP 0x00136442 LAB_00136487: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x38],RAX LAB_0013648f: MOV RCX,qword ptr [RBP + -0x30] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x40] MOV byte ptr [RBP + -0x42],AL JNC 0x001364bd MOV RAX,qword ptr [RBP + -0x30] MOVSX ESI,byte ptr [RAX] LEA RDI,[0x17bb3d] CALL 0x00124100 CMP RAX,0x0 SETNZ AL XOR AL,0xff MOV byte ptr [RBP + -0x42],AL LAB_001364bd: MOV AL,byte ptr [RBP + -0x42] TEST AL,0x1 JNZ 0x001364c6 JMP 0x001364d6 LAB_001364c6: JMP 0x001364c8 LAB_001364c8: MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX JMP 0x0013648f LAB_001364d6: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x38] JZ 0x001364e8 MOV EAX,dword ptr [RBP + -0x24] CMP EAX,dword ptr [RBP + -0xc] JBE 0x001364ea LAB_001364e8: JMP 0x00136518 LAB_001364ea: MOV RDI,qword ptr [RBP + -0x38] XOR EAX,EAX MOV ESI,EAX MOV EDX,0x10 CALL 0x00124570 MOV DX,AX MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x24] MOV word ptr [RAX + RCX*0x2],DX MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x00136432 LAB_00136518: XOR EAX,EAX ADD RSP,0x50 POP RBP RET
int8 fill_uint16(long param_1,uint param_2,char *param_3,long param_4) { char *pcVar1; int2 uVar2; char *pcVar3; char *pcVar4; bool bVar5; char *local_38; uint local_2c; local_2c = 0; pcVar3 = param_3 + param_4; local_38 = param_3; while( true ) { if (pcVar3 <= local_38) { return 0; } while( true ) { pcVar1 = local_38; bVar5 = false; if (local_38 < pcVar3) { pcVar4 = strchr(" \t\r\n",(int)*local_38); bVar5 = pcVar4 != (char *)0x0; } if (!bVar5) break; local_38 = local_38 + 1; } while( true ) { bVar5 = false; if (local_38 < pcVar3) { pcVar4 = strchr(" \t\r\n",(int)*local_38); bVar5 = pcVar4 == (char *)0x0; } if (!bVar5) break; local_38 = local_38 + 1; } if (local_38 == pcVar1) break; if (param_2 < local_2c) { return 0; } uVar2 = __isoc23_strtol(pcVar1,0,0x10); *(int2 *)(param_1 + (ulong)local_2c * 2) = uVar2; local_2c = local_2c + 1; } return 0; }
61,646
inline_mysql_start_table_lock_wait
eloqsql/include/mysql/psi/mysql_table.h
static inline struct PSI_table_locker * inline_mysql_start_table_lock_wait(PSI_table_locker_state *state, struct PSI_table *psi, enum PSI_table_lock_operation op, ulong flags, const char *src_file, uint src_line) { if (psi_likely(psi != NULL)) { struct PSI_table_locker *locker; locker= PSI_TABLE_CALL(start_table_lock_wait) (state, psi, op, flags, src_file, src_line); return locker; } return NULL; }
O0
c
inline_mysql_start_table_lock_wait: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movl %r9d, -0x34(%rbp) cmpq $0x0, -0x18(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0xfb6b7 leaq 0x1c6bb2(%rip), %rax # 0x2c2238 movq (%rax), %rax movq 0x1e0(%rax), %rax movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x1c(%rbp), %edx movq -0x28(%rbp), %rcx movq -0x30(%rbp), %r8 movl -0x34(%rbp), %r9d callq *%rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0xfb6bf movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopl (%rax)
inline_mysql_start_table_lock_wait: 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], rcx mov [rbp+var_30], r8 mov [rbp+var_34], r9d cmp [rbp+var_18], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_FB6B7 lea rax, PSI_server mov rax, [rax] mov rax, [rax+1E0h] mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov edx, [rbp+var_1C] mov rcx, [rbp+var_28] mov r8, [rbp+var_30] mov r9d, [rbp+var_34] call rax mov [rbp+var_40], rax mov rax, [rbp+var_40] mov [rbp+var_8], rax jmp short loc_FB6BF loc_FB6B7: mov [rbp+var_8], 0 loc_FB6BF: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long inline_mysql_start_table_lock_wait( long long a1, long long a2, unsigned int a3, long long a4, long long a5, unsigned int a6) { if ( a2 ) return ((long long ( *)(long long, long long, _QWORD, long long, long long, _QWORD))PSI_server[60])( a1, a2, a3, a4, a5, a6); else return 0LL; }
inline_mysql_start_table_lock_wait: 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],RCX MOV qword ptr [RBP + -0x30],R8 MOV dword ptr [RBP + -0x34],R9D CMP qword ptr [RBP + -0x18],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001fb6b7 LEA RAX,[0x3c2238] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1e0] MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] MOV RCX,qword ptr [RBP + -0x28] MOV R8,qword ptr [RBP + -0x30] MOV R9D,dword ptr [RBP + -0x34] CALL RAX MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x8],RAX JMP 0x001fb6bf LAB_001fb6b7: MOV qword ptr [RBP + -0x8],0x0 LAB_001fb6bf: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
int8 inline_mysql_start_table_lock_wait (int8 param_1,long param_2,int4 param_3,int8 param_4,int8 param_5, int4 param_6) { int8 local_10; if (param_2 == 0) { local_10 = 0; } else { local_10 = (**(code **)(PSI_server + 0x1e0))(param_1,param_2,param_3,param_4,param_5,param_6); } return local_10; }
61,647
fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender, int, 0>(fmt::v10::appender, int)
aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h
FMT_CONSTEXPR auto write(OutputIt out, T value) -> OutputIt { auto abs_value = static_cast<uint32_or_64_or_128_t<T>>(value); bool negative = is_negative(value); // Don't do -abs_value since it trips unsigned-integer-overflow sanitizer. if (negative) abs_value = ~abs_value + 1; int num_digits = count_digits(abs_value); auto size = (negative ? 1 : 0) + static_cast<size_t>(num_digits); auto it = reserve(out, size); if (auto ptr = to_pointer<Char>(it, size)) { if (negative) *ptr++ = static_cast<Char>('-'); format_decimal<Char>(ptr, abs_value, num_digits); return out; } if (negative) *it++ = static_cast<Char>('-'); it = format_decimal<Char>(it, abs_value, num_digits).end; return base_iterator(out, it); }
O0
c
fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender, int, 0>(fmt::v10::appender, int): subq $0x98, %rsp movq %rdi, 0x88(%rsp) movq %rsi, 0x80(%rsp) movq 0x80(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x80(%rsp), %rdi callq 0x1d0d80 andb $0x1, %al movb %al, 0x77(%rsp) testb $0x1, 0x77(%rsp) je 0x1d08f0 movq 0x78(%rsp), %rax xorq $-0x1, %rax addq $0x1, %rax movq %rax, 0x78(%rsp) movq 0x78(%rsp), %rdi callq 0x1ac7a0 movl %eax, 0x70(%rsp) movb 0x77(%rsp), %dl xorl %eax, %eax movl $0x1, %ecx testb $0x1, %dl cmovnel %ecx, %eax cltq movslq 0x70(%rsp), %rcx addq %rcx, %rax movq %rax, 0x68(%rsp) movq 0x68(%rsp), %rsi leaq 0x88(%rsp), %rdi callq 0x1abba0 movq (%rax), %rax movq %rax, 0x60(%rsp) movq 0x60(%rsp), %rax movq %rax, 0x50(%rsp) movq 0x68(%rsp), %rsi movq 0x50(%rsp), %rdi callq 0x1abbb0 movq %rax, 0x58(%rsp) cmpq $0x0, 0x58(%rsp) je 0x1d09ab testb $0x1, 0x77(%rsp) je 0x1d0979 movq 0x58(%rsp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, 0x58(%rsp) movb $0x2d, (%rax) movq 0x58(%rsp), %rdi movq 0x78(%rsp), %rsi movl 0x70(%rsp), %edx callq 0x1ac7b0 movq %rax, 0x40(%rsp) movq %rdx, 0x48(%rsp) movq 0x88(%rsp), %rax movq %rax, 0x90(%rsp) jmp 0x1d0a3e testb $0x1, 0x77(%rsp) je 0x1d09df movb $0x2d, 0x3f(%rsp) leaq 0x60(%rsp), %rdi xorl %esi, %esi callq 0x1abdb0 movq %rax, 0x30(%rsp) leaq 0x30(%rsp), %rdi callq 0x1abdd0 movq %rax, %rdi leaq 0x3f(%rsp), %rsi callq 0x1abde0 movq 0x60(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x78(%rsp), %rsi movl 0x70(%rsp), %edx movq 0x18(%rsp), %rdi callq 0x1ac920 movq %rax, 0x20(%rsp) movq %rdx, 0x28(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x88(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x60(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x10(%rsp), %rdi movq 0x8(%rsp), %rsi callq 0x1abea0 movq %rax, 0x90(%rsp) movq 0x90(%rsp), %rax addq $0x98, %rsp retq nop
_ZN3fmt3v106detail5writeIcNS0_8appenderEmTnNSt9enable_ifIXaaaasr11is_integralIT1_EE5valuentsr3std7is_sameIS5_bEE5valuentsr3std7is_sameIS5_T_EE5valueEiE4typeELi0EEET0_S9_S5_: sub rsp, 98h mov [rsp+98h+var_10], rdi mov [rsp+98h+var_18], rsi mov rax, [rsp+98h+var_18] mov [rsp+98h+var_20], rax mov rdi, [rsp+98h+var_18] call _ZN3fmt3v106detail11is_negativeImTnNSt9enable_ifIXntsr9is_signedIT_EE5valueEiE4typeELi0EEEbS4_ and al, 1 mov [rsp+98h+var_21], al test [rsp+98h+var_21], 1 jz short loc_1D08F0 mov rax, [rsp+98h+var_20] xor rax, 0FFFFFFFFFFFFFFFFh add rax, 1 mov [rsp+98h+var_20], rax loc_1D08F0: mov rdi, [rsp+98h+var_20]; this call _ZN3fmt3v106detail12count_digitsEm; fmt::v10::detail::count_digits(ulong) mov [rsp+98h+var_28], eax mov dl, [rsp+98h+var_21] xor eax, eax mov ecx, 1 test dl, 1 cmovnz eax, ecx cdqe movsxd rcx, [rsp+98h+var_28] add rax, rcx mov [rsp+98h+var_30], rax mov rsi, [rsp+98h+var_30] lea rdi, [rsp+98h+var_10] call _ZN3fmt3v106detail7reserveINS0_8appenderEEERT_S5_m; fmt::v10::detail::reserve<fmt::v10::appender>(fmt::v10::appender &,ulong) mov rax, [rax] mov [rsp+98h+var_38], rax mov rax, [rsp+98h+var_38] mov [rsp+98h+var_48], rax mov rsi, [rsp+98h+var_30] mov rdi, [rsp+98h+var_48] call _ZN3fmt3v106detail10to_pointerIcEEPT_NSt11conditionalIXsr3std7is_sameIS3_cEE5valueENS0_8appenderESt20back_insert_iteratorINS1_6bufferIS3_EEEE4typeEm mov [rsp+98h+var_40], rax cmp [rsp+98h+var_40], 0 jz short loc_1D09AB test [rsp+98h+var_21], 1 jz short loc_1D0979 mov rax, [rsp+98h+var_40] mov rcx, rax add rcx, 1 mov [rsp+98h+var_40], rcx mov byte ptr [rax], 2Dh ; '-' loc_1D0979: mov rdi, [rsp+98h+var_40] mov rsi, [rsp+98h+var_20] mov edx, [rsp+98h+var_28] call _ZN3fmt3v106detail14format_decimalIcmEENS1_21format_decimal_resultIPT_EES5_T0_i; fmt::v10::detail::format_decimal<char,ulong>(char *,ulong,int) mov [rsp+98h+var_58], rax mov [rsp+98h+var_50], rdx mov rax, [rsp+98h+var_10] mov [rsp+98h+var_8], rax jmp loc_1D0A3E loc_1D09AB: test [rsp+98h+var_21], 1 jz short loc_1D09DF mov [rsp+98h+var_59], 2Dh ; '-' lea rdi, [rsp+98h+var_38] xor esi, esi call _ZN3fmt3v108appenderppEi; fmt::v10::appender::operator++(int) mov [rsp+98h+var_68], rax lea rdi, [rsp+98h+var_68] call _ZNSt20back_insert_iteratorIN3fmt3v106detail6bufferIcEEEdeEv; std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator*(void) mov rdi, rax lea rsi, [rsp+98h+var_59] call _ZNSt20back_insert_iteratorIN3fmt3v106detail6bufferIcEEEaSEOc; std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator=(char &&) loc_1D09DF: mov rax, [rsp+98h+var_38] mov [rsp+98h+var_80], rax mov rsi, [rsp+98h+var_20] mov edx, [rsp+98h+var_28] mov rdi, [rsp+98h+var_80] call _ZN3fmt3v106detail14format_decimalIcmNS0_8appenderETnNSt9enable_ifIXntsr3std10is_pointerINSt9remove_cvINSt16remove_referenceIT1_E4typeEE4typeEEE5valueEiE4typeELi0EEENS1_21format_decimal_resultIS7_EES7_T0_i mov [rsp+98h+var_78], rax mov [rsp+98h+var_70], rdx mov rax, [rsp+98h+var_70] mov [rsp+98h+var_38], rax mov rax, [rsp+98h+var_10] mov [rsp+98h+var_88], rax mov rax, [rsp+98h+var_38] mov [rsp+98h+var_90], rax mov rdi, [rsp+98h+var_88] mov rsi, [rsp+98h+var_90] call _ZN3fmt3v106detail13base_iteratorINS0_8appenderEEET_S4_S4_; fmt::v10::detail::base_iterator<fmt::v10::appender>(fmt::v10::appender,fmt::v10::appender) mov [rsp+98h+var_8], rax loc_1D0A3E: mov rax, [rsp+98h+var_8] add rsp, 98h retn
long long ZN3fmt3v106detail5writeIcNS0_8appenderEmTnNSt9enable_ifIXaaaasr11is_integralIT1_EE5valuentsr3std7is_sameIS5_bEE5valuentsr3std7is_sameIS5_T_EE5valueEiE4typeELi0EEET0_S9_S5_( long long a1, fmt::v10::detail *a2) { _BYTE *v2; // rax long long v3; // rdx _QWORD *v4; // rax long long v5; // rdx long long v7; // [rsp+30h] [rbp-68h] BYREF char v8; // [rsp+3Fh] [rbp-59h] BYREF _WORD *v9; // [rsp+40h] [rbp-58h] long long v10; // [rsp+48h] [rbp-50h] long long v11; // [rsp+50h] [rbp-48h] _BYTE *v12; // [rsp+58h] [rbp-40h] long long v13; // [rsp+60h] [rbp-38h] BYREF long long v14; // [rsp+68h] [rbp-30h] int v15; // [rsp+70h] [rbp-28h] char v16; // [rsp+77h] [rbp-21h] fmt::v10::detail *v17; // [rsp+78h] [rbp-20h] fmt::v10::detail *v18; // [rsp+80h] [rbp-18h] long long v19; // [rsp+88h] [rbp-10h] BYREF v19 = a1; v18 = a2; v17 = a2; v16 = ZN3fmt3v106detail11is_negativeImTnNSt9enable_ifIXntsr9is_signedIT_EE5valueEiE4typeELi0EEEbS4_(a2) & 1; if ( v16 ) v17 = (fmt::v10::detail *)-(long long)v17; v15 = fmt::v10::detail::count_digits(v17, (unsigned long long)a2); v14 = v15 + (unsigned long long)((v16 & 1) != 0); v13 = *(_QWORD *)fmt::v10::detail::reserve<fmt::v10::appender>((long long)&v19); v11 = v13; v12 = (_BYTE *)fmt::v10::detail::to_pointer<char>(v13, v14); if ( v12 ) { if ( (v16 & 1) != 0 ) { v2 = v12++; *v2 = 45; } v9 = fmt::v10::detail::format_decimal<char,unsigned long>((long long)v12, v17, v15); v10 = v3; return v19; } else { if ( (v16 & 1) != 0 ) { v8 = 45; v7 = fmt::v10::appender::operator++((long long)&v13); v4 = (_QWORD *)std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator*((long long)&v7); std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator=(v4, (long long)&v8); } ZN3fmt3v106detail14format_decimalIcmNS0_8appenderETnNSt9enable_ifIXntsr3std10is_pointerINSt9remove_cvINSt16remove_referenceIT1_E4typeEE4typeEEE5valueEiE4typeELi0EEENS1_21format_decimal_resultIS7_EES7_T0_i( v13, v17, v15); v13 = v5; return fmt::v10::detail::base_iterator<fmt::v10::appender>(v19, v5); } }
61,648
fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender, int, 0>(fmt::v10::appender, int)
aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h
FMT_CONSTEXPR auto write(OutputIt out, T value) -> OutputIt { auto abs_value = static_cast<uint32_or_64_or_128_t<T>>(value); bool negative = is_negative(value); // Don't do -abs_value since it trips unsigned-integer-overflow sanitizer. if (negative) abs_value = ~abs_value + 1; int num_digits = count_digits(abs_value); auto size = (negative ? 1 : 0) + static_cast<size_t>(num_digits); auto it = reserve(out, size); if (auto ptr = to_pointer<Char>(it, size)) { if (negative) *ptr++ = static_cast<Char>('-'); format_decimal<Char>(ptr, abs_value, num_digits); return out; } if (negative) *it++ = static_cast<Char>('-'); it = format_decimal<Char>(it, abs_value, num_digits).end; return base_iterator(out, it); }
O3
c
fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender, int, 0>(fmt::v10::appender, int): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %r14 negq %r14 cmovsq %rsi, %r14 movq %r14, %rax orq $0x1, %rax bsrq %rax, %rax leaq 0x165815(%rip), %rcx # 0x1efa60 movzbl (%rax,%rcx), %r15d leaq 0x165849(%rip), %rax # 0x1efaa0 cmpq (%rax,%r15,8), %r14 sbbq $0x0, %r15 movq %rdi, %rbx movq %rsi, %rax shrq $0x3f, %rax movq 0x10(%rdi), %rdx movq 0x18(%rdi), %rcx addq %rdx, %rax addq %r15, %rax cmpq %rax, %rcx jae 0x8a281 movq %rdx, %rax jmp 0x8a2a9 movq %rax, 0x10(%rbx) movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x8a2a9 addq %rdx, %rdi testq %rsi, %rsi jns 0x8a29c movb $0x2d, (%rdi) incq %rdi movq %r14, %rsi movl %r15d, %edx callq 0x8a315 jmp 0x8a306 testq %rsi, %rsi jns 0x8a2d3 leaq 0x1(%rax), %rsi cmpq %rsi, %rcx jae 0x8a2c7 movq (%rbx), %rax movq %rbx, %rdi callq *(%rax) movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi movq 0x8(%rbx), %rcx movq %rsi, 0x10(%rbx) movb $0x2d, (%rcx,%rax) xorps %xmm0, %xmm0 movq %rsp, %r12 movaps %xmm0, (%r12) movl $0x0, 0x10(%r12) movq %r12, %rdi movq %r14, %rsi movl %r15d, %edx callq 0x8a315 movq %r12, %rdi movq %rdx, %rsi movq %rbx, %rdx callq 0x8a10e movq %rax, %rbx movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
_ZN3fmt3v106detail5writeIcNS0_8appenderExTnNSt9enable_ifIXaaaasr11is_integralIT1_EE5valuentsr3std7is_sameIS5_bEE5valuentsr3std7is_sameIS5_T_EE5valueEiE4typeELi0EEET0_S9_S5_: push r15 push r14 push r12 push rbx sub rsp, 18h mov r14, rsi neg r14 cmovs r14, rsi mov rax, r14 or rax, 1 bsr rax, rax lea rcx, _ZZN3fmt3v106detail15do_count_digitsEmE9bsr2log10; fmt::v10::detail::do_count_digits(ulong)::bsr2log10 movzx r15d, byte ptr [rax+rcx] lea rax, _ZZN3fmt3v106detail15do_count_digitsEmE20zero_or_powers_of_10 cmp r14, [rax+r15*8] sbb r15, 0 mov rbx, rdi mov rax, rsi shr rax, 3Fh mov rdx, [rdi+10h] mov rcx, [rdi+18h] add rax, rdx add rax, r15 cmp rcx, rax jnb short loc_8A281 mov rax, rdx jmp short loc_8A2A9 loc_8A281: mov [rbx+10h], rax mov rdi, [rbx+8] test rdi, rdi jz short loc_8A2A9 add rdi, rdx test rsi, rsi jns short loc_8A29C mov byte ptr [rdi], 2Dh ; '-' inc rdi loc_8A29C: mov rsi, r14 mov edx, r15d call _ZN3fmt3v106detail14format_decimalIcmEENS1_21format_decimal_resultIPT_EES5_T0_i; fmt::v10::detail::format_decimal<char,ulong>(char *,ulong,int) jmp short loc_8A306 loc_8A2A9: test rsi, rsi jns short loc_8A2D3 lea rsi, [rax+1] cmp rcx, rsi jnb short loc_8A2C7 mov rax, [rbx] mov rdi, rbx call qword ptr [rax] mov rax, [rbx+10h] lea rsi, [rax+1] loc_8A2C7: mov rcx, [rbx+8] mov [rbx+10h], rsi mov byte ptr [rcx+rax], 2Dh ; '-' loc_8A2D3: xorps xmm0, xmm0 mov r12, rsp movaps xmmword ptr [r12], xmm0 mov dword ptr [r12+10h], 0 mov rdi, r12 mov rsi, r14 mov edx, r15d call _ZN3fmt3v106detail14format_decimalIcmEENS1_21format_decimal_resultIPT_EES5_T0_i; fmt::v10::detail::format_decimal<char,ulong>(char *,ulong,int) mov rdi, r12 mov rsi, rdx mov rdx, rbx call _ZN3fmt3v106detail17copy_str_noinlineIcPcNS0_8appenderEEET1_T0_S6_S5_; fmt::v10::detail::copy_str_noinline<char,char *,fmt::v10::appender>(char *,char *,fmt::v10::appender) mov rbx, rax loc_8A306: mov rax, rbx add rsp, 18h pop rbx pop r12 pop r14 pop r15 retn
long long ZN3fmt3v106detail5writeIcNS0_8appenderExTnNSt9enable_ifIXaaaasr11is_integralIT1_EE5valuentsr3std7is_sameIS5_bEE5valuentsr3std7is_sameIS5_T_EE5valueEiE4typeELi0EEET0_S9_S5_( _QWORD *a1, long long a2) { long long v2; // r14 unsigned long long v3; // rax long long v4; // r15 long long v5; // rbx long long v6; // rdx unsigned long long v7; // rcx unsigned long long v8; // rax long long v9; // rdi _BYTE *v10; // rdi unsigned long long v11; // rsi long long v12; // rcx long long v13; // rdx __int128 v15; // [rsp+0h] [rbp-38h] BYREF int v16; // [rsp+10h] [rbp-28h] v2 = -a2; if ( a2 > 0 ) v2 = a2; _BitScanReverse64(&v3, v2 | 1); v4 = (__PAIR128__(fmt::v10::detail::do_count_digits(unsigned long)::bsr2log10[v3], v2) - fmt::v10::detail::do_count_digits(unsigned long)::zero_or_powers_of_10[fmt::v10::detail::do_count_digits(unsigned long)::bsr2log10[v3]]) >> 64; v5 = (long long)a1; v6 = a1[2]; v7 = a1[3]; v8 = v4 + v6 + ((unsigned long long)a2 >> 63); if ( v7 < v8 ) { v8 = a1[2]; LABEL_9: if ( a2 < 0 ) { v11 = v8 + 1; if ( v7 < v8 + 1 ) { (**(void ( ***)(long long))v5)(v5); v8 = *(_QWORD *)(v5 + 16); v11 = v8 + 1; } v12 = *(_QWORD *)(v5 + 8); *(_QWORD *)(v5 + 16) = v11; *(_BYTE *)(v12 + v8) = 45; } v15 = 0LL; v16 = 0; fmt::v10::detail::format_decimal<char,unsigned long>(&v15, v2, (unsigned int)v4); return fmt::v10::detail::copy_str_noinline<char,char *,fmt::v10::appender>((long long)&v15, v13, v5); } a1[2] = v8; v9 = a1[1]; if ( !v9 ) goto LABEL_9; v10 = (_BYTE *)(v6 + v9); if ( a2 < 0 ) *v10++ = 45; fmt::v10::detail::format_decimal<char,unsigned long>(v10, v2, (unsigned int)v4); return v5; }
_ZN3fmt3v106detail5writeIcNS0_8appenderExTnNSt9enable_ifIXaaaasr11is_integralIT1_EE5valuentsr3std7is_sameIS5_bEE5valuentsr3std7is_sameIS5_T_EE5valueEiE4typeELi0EEET0_S9_S5_: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14,RSI NEG R14 CMOVS R14,RSI MOV RAX,R14 OR RAX,0x1 BSR RAX,RAX LEA RCX,[0x2efa60] MOVZX R15D,byte ptr [RAX + RCX*0x1] LEA RAX,[0x2efaa0] CMP R14,qword ptr [RAX + R15*0x8] SBB R15,0x0 MOV RBX,RDI MOV RAX,RSI SHR RAX,0x3f MOV RDX,qword ptr [RDI + 0x10] MOV RCX,qword ptr [RDI + 0x18] ADD RAX,RDX ADD RAX,R15 CMP RCX,RAX JNC 0x0018a281 MOV RAX,RDX JMP 0x0018a2a9 LAB_0018a281: MOV qword ptr [RBX + 0x10],RAX MOV RDI,qword ptr [RBX + 0x8] TEST RDI,RDI JZ 0x0018a2a9 ADD RDI,RDX TEST RSI,RSI JNS 0x0018a29c MOV byte ptr [RDI],0x2d INC RDI LAB_0018a29c: MOV RSI,R14 MOV EDX,R15D CALL 0x0018a315 JMP 0x0018a306 LAB_0018a2a9: TEST RSI,RSI JNS 0x0018a2d3 LEA RSI,[RAX + 0x1] CMP RCX,RSI JNC 0x0018a2c7 MOV RAX,qword ptr [RBX] MOV RDI,RBX CALL qword ptr [RAX] MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] LAB_0018a2c7: MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x10],RSI MOV byte ptr [RCX + RAX*0x1],0x2d LAB_0018a2d3: XORPS XMM0,XMM0 MOV R12,RSP MOVAPS xmmword ptr [R12],XMM0 MOV dword ptr [R12 + 0x10],0x0 MOV RDI,R12 MOV RSI,R14 MOV EDX,R15D CALL 0x0018a315 MOV RDI,R12 MOV RSI,RDX MOV RDX,RBX CALL 0x0018a10e MOV RBX,RAX LAB_0018a306: MOV RAX,RBX ADD RSP,0x18 POP RBX POP R12 POP R14 POP R15 RET
int8 * _ZN3fmt3v106detail5writeIcNS0_8appenderExTnNSt9enable_ifIXaaaasr11is_integralIT1_EE5valuentsr3std7is_sameIS5_bEE5valuentsr3std7is_sameIS5_T_EE5valueEiE4typeELi0EEET0_S9_S5_ (int8 *param_1,ulong param_2) { ulong uVar1; ulong uVar2; int8 *puVar3; int8 extraout_RDX; ulong uVar4; char *pcVar5; ulong uVar6; int iVar7; long lVar8; char acStack_38 [24]; uVar6 = -param_2; if (0 < (long)param_2) { uVar6 = param_2; } lVar8 = 0x3f; if ((uVar6 | 1) != 0) { for (; (uVar6 | 1) >> lVar8 == 0; lVar8 = lVar8 + -1) { } } lVar8 = (ulong)(byte)fmt::v10::detail::do_count_digits(unsigned_long)::bsr2log10[lVar8] - (ulong)(uVar6 < *(ulong *)(fmt::v10::detail::do_count_digits(unsigned_long):: zero_or_powers_of_10 + (ulong)(byte)fmt::v10::detail::do_count_digits(unsigned_long):: bsr2log10[lVar8] * 8)); uVar4 = param_1[2]; uVar1 = (uVar4 - ((long)param_2 >> 0x3f)) + lVar8; iVar7 = (int)lVar8; uVar2 = uVar4; if (uVar1 <= (ulong)param_1[3]) { param_1[2] = uVar1; uVar2 = uVar1; if (param_1[1] != 0) { pcVar5 = (char *)(param_1[1] + uVar4); if ((long)param_2 < 0) { *pcVar5 = '-'; pcVar5 = pcVar5 + 1; } fmt::v10::detail::format_decimal<char,unsigned_long>(pcVar5,uVar6,iVar7); return param_1; } } if ((long)param_2 < 0) { uVar4 = uVar2 + 1; if ((ulong)param_1[3] < uVar4) { (**(code **)*param_1)(param_1); uVar2 = param_1[2]; uVar4 = uVar2 + 1; } param_1[2] = uVar4; *(int1 *)(param_1[1] + uVar2) = 0x2d; } acStack_38[0] = '\0'; acStack_38[1] = '\0'; acStack_38[2] = '\0'; acStack_38[3] = '\0'; acStack_38[4] = '\0'; acStack_38[5] = '\0'; acStack_38[6] = '\0'; acStack_38[7] = '\0'; acStack_38[8] = '\0'; acStack_38[9] = '\0'; acStack_38[10] = '\0'; acStack_38[0xb] = '\0'; acStack_38[0xc] = '\0'; acStack_38[0xd] = '\0'; acStack_38[0xe] = '\0'; acStack_38[0xf] = '\0'; acStack_38[0x10] = '\0'; acStack_38[0x11] = '\0'; acStack_38[0x12] = '\0'; acStack_38[0x13] = '\0'; fmt::v10::detail::format_decimal<char,unsigned_long>(acStack_38,uVar6,iVar7); puVar3 = (int8 *) fmt::v10::detail::copy_str_noinline<char,char*,fmt::v10::appender> (acStack_38,extraout_RDX,param_1); return puVar3; }
61,649
nglog::base::SetLogger(nglog::LogSeverity, nglog::base::Logger*)
ng-log[P]ng-log/src/logging.cc
void base::SetLogger(LogSeverity severity, base::Logger* logger) { std::lock_guard<std::mutex> l{log_mutex}; LogDestination::log_destination(severity)->SetLoggerImpl(logger); }
O3
cpp
nglog::base::SetLogger(nglog::LogSeverity, nglog::base::Logger*): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rsi, %rbx movl %edi, %ebp leaq 0x33af2(%rip), %rdi # 0x3ede8 callq 0x77e0 testl %eax, %eax jne 0xb398 movl %ebp, %r15d leaq 0x24a23(%rip), %r12 # 0x2fd30 movq (%r12,%r15,8), %r14 testq %r14, %r14 jne 0xb356 movl $0xd0, %edi callq 0x8e60 movq %rax, %r14 movq %rax, %rdi movl %ebp, %esi xorl %edx, %edx callq 0x9914 leaq (%r12,%r15,8), %r15 leaq 0x8(%rsp), %r12 movq $0x0, (%r12) movq %r15, %rdi movq %r14, %rsi callq 0x11c0a movq %r12, %rdi callq 0x10824 movq (%r15), %r14 movq 0xc8(%r14), %rdi cmpq %rbx, %rdi je 0xb37f testq %rdi, %rdi sete %al cmpq %r14, %rdi sete %cl orb %al, %cl jne 0xb378 movq (%rdi), %rax callq *0x8(%rax) movq %rbx, 0xc8(%r14) leaq 0x33a62(%rip), %rdi # 0x3ede8 callq 0x73d0 addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl %eax, %edi callq 0x7340 movq %rax, %rbx movl $0xd0, %esi movq %r14, %rdi callq 0x8eac jmp 0xb3b4 movq %rax, %rbx leaq 0x33a2d(%rip), %rdi # 0x3ede8 callq 0x73d0 movq %rbx, %rdi callq 0x7930
_ZN5nglog4base9SetLoggerENS_11LogSeverityEPNS0_6LoggerE: push rbp push r15 push r14 push r12 push rbx sub rsp, 10h mov rbx, rsi mov ebp, edi lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex call _pthread_mutex_lock test eax, eax jnz loc_B398 mov r15d, ebp lea r12, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_ mov r14, [r12+r15*8] test r14, r14 jnz short loc_B356 mov edi, 0D0h; unsigned __int64 call _Znwm; operator new(ulong) mov r14, rax mov rdi, rax mov esi, ebp xor edx, edx call _ZN5nglog14LogDestinationC2ENS_11LogSeverityEPKc; nglog::LogDestination::LogDestination(nglog::LogSeverity,char const*) lea r15, [r12+r15*8] lea r12, [rsp+38h+var_30] mov qword ptr [r12], 0 mov rdi, r15 mov rsi, r14 call _ZNSt15__uniq_ptr_implIN5nglog14LogDestinationESt14default_deleteIS1_EE5resetEPS1_; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(nglog::LogDestination*) mov rdi, r12 call _ZNSt10unique_ptrIN5nglog14LogDestinationESt14default_deleteIS1_EED2Ev; std::unique_ptr<nglog::LogDestination>::~unique_ptr() mov r14, [r15] loc_B356: mov rdi, [r14+0C8h] cmp rdi, rbx jz short loc_B37F test rdi, rdi setz al cmp rdi, r14 setz cl or cl, al jnz short loc_B378 mov rax, [rdi] call qword ptr [rax+8] loc_B378: mov [r14+0C8h], rbx loc_B37F: lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex call _pthread_mutex_unlock add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_B398: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) mov rbx, rax mov esi, 0D0h; unsigned __int64 mov rdi, r14; void * call _ZdlPvm; operator delete(void *,ulong) jmp short loc_B3B4 mov rbx, rax loc_B3B4: lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex call _pthread_mutex_unlock mov rdi, rbx call __Unwind_Resume
long long nglog::base::SetLogger(int a1, long long a2) { int v2; // eax long long v3; // r14 long long v4; // r14 long long v5; // rdi _QWORD v7[6]; // [rsp+8h] [rbp-30h] BYREF v2 = pthread_mutex_lock(&nglog::log_mutex); if ( v2 ) std::__throw_system_error(v2); v3 = nglog::LogDestination::log_destinations_[a1]; if ( !v3 ) { v4 = operator new(208LL); nglog::LogDestination::LogDestination(v4, a1, 0LL); v7[0] = 0LL; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset( &nglog::LogDestination::log_destinations_[a1], v4); std::unique_ptr<nglog::LogDestination>::~unique_ptr(v7); v3 = nglog::LogDestination::log_destinations_[a1]; } v5 = *(_QWORD *)(v3 + 200); if ( v5 != a2 ) { if ( v5 != 0 && v5 != v3 ) (*(void ( **)(long long))(*(_QWORD *)v5 + 8LL))(v5); *(_QWORD *)(v3 + 200) = a2; } return pthread_mutex_unlock(&nglog::log_mutex); }
SetLogger: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV RBX,RSI MOV EBP,EDI LEA RDI,[0x13ede8] CALL 0x001077e0 TEST EAX,EAX JNZ 0x0010b398 MOV R15D,EBP LEA R12,[0x12fd30] MOV R14,qword ptr [R12 + R15*0x8] TEST R14,R14 JNZ 0x0010b356 LAB_0010b316: MOV EDI,0xd0 CALL 0x00108e60 LAB_0010b320: MOV R14,RAX MOV RDI,RAX MOV ESI,EBP XOR EDX,EDX CALL 0x00109914 LAB_0010b32f: LEA R15,[R12 + R15*0x8] LEA R12,[RSP + 0x8] MOV qword ptr [R12],0x0 MOV RDI,R15 MOV RSI,R14 CALL 0x00111c0a MOV RDI,R12 CALL 0x00110824 MOV R14,qword ptr [R15] LAB_0010b356: MOV RDI,qword ptr [R14 + 0xc8] CMP RDI,RBX JZ 0x0010b37f TEST RDI,RDI SETZ AL CMP RDI,R14 SETZ CL OR CL,AL JNZ 0x0010b378 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0010b378: MOV qword ptr [R14 + 0xc8],RBX LAB_0010b37f: LEA RDI,[0x13ede8] CALL 0x001073d0 ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0010b398: MOV EDI,EAX CALL 0x00107340
/* nglog::base::SetLogger(nglog::LogSeverity, nglog::base::Logger*) */ void nglog::base::SetLogger(uint param_1,long *param_2) { long *plVar1; int iVar2; LogDestination *pLVar3; long *plVar4; int8 local_30; iVar2 = pthread_mutex_lock((pthread_mutex_t *)log_mutex); if (iVar2 == 0) { plVar4 = (long *)(&LogDestination::log_destinations_)[param_1]; if (plVar4 == (long *)0x0) { /* try { // try from 0010b316 to 0010b31f has its CatchHandler @ 0010b3b1 */ pLVar3 = (LogDestination *)operator_new(0xd0); /* try { // try from 0010b320 to 0010b32e has its CatchHandler @ 0010b39f */ LogDestination::LogDestination(pLVar3,param_1,0); local_30 = 0; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset ((__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *)(&LogDestination::log_destinations_ + param_1),pLVar3); std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::~unique_ptr ((unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *) &local_30); plVar4 = *(long **)(&LogDestination::log_destinations_ + param_1); } plVar1 = (long *)plVar4[0x19]; if (plVar1 != param_2) { if (plVar1 != plVar4 && plVar1 != (long *)0x0) { (**(code **)(*plVar1 + 8))(); } plVar4[0x19] = (long)param_2; } pthread_mutex_unlock((pthread_mutex_t *)log_mutex); return; } /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar2); }
61,650
elf_file::content(elf32_ph_entry const&, std::vector<unsigned char, std::allocator<unsigned char>> const&)
msxemulator/build_O3/_deps/picotool-src/elf/elf_file.cpp
void elf_file::content(const elf32_ph_entry &ph, const std::vector<uint8_t> &content) { if (!editable) return; assert(content.size() <= ph.filez); if (verbose) printf("Update segment content offset %x content size %zx physical size %x\n", ph.offset, content.size(), ph.filez); memcpy(&elf_bytes[ph.offset], &content[0], std::min(content.size(), (size_t) ph.filez)); read_sh_data(); // Extract the sections after modifying the content }
O3
cpp
elf_file::content(elf32_ph_entry const&, std::vector<unsigned char, std::allocator<unsigned char>> const&): cmpb $0x1, (%rdi) jne 0xa1eea pushq %r15 pushq %r14 pushq %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx cmpb $0x1, 0x98(%rdi) jne 0xa1ebb movq 0x8(%r14), %rdx subq (%r14), %rdx movl 0x4(%r15), %esi movl 0x10(%r15), %ecx leaq 0x14fd0(%rip), %rdi # 0xb6e84 xorl %eax, %eax callq 0xf070 movl 0x4(%r15), %edi movl 0x10(%r15), %eax addq 0x38(%rbx), %rdi movq (%r14), %rsi movq 0x8(%r14), %rdx subq %rsi, %rdx cmpq %rax, %rdx cmovaeq %rax, %rdx callq 0xf3a0 movq %rbx, %rdi popq %rbx popq %r14 popq %r15 jmp 0xa14d0 retq nop
_ZN8elf_file7contentERK14elf32_ph_entryRKSt6vectorIhSaIhEE: cmp byte ptr [rdi], 1 jnz short locret_A1EEA push r15 push r14 push rbx mov r14, rdx mov r15, rsi mov rbx, rdi cmp byte ptr [rdi+98h], 1 jnz short loc_A1EBB mov rdx, [r14+8] sub rdx, [r14] mov esi, [r15+4] mov ecx, [r15+10h] lea rdi, aUpdateSegmentC; "Update segment content offset %x conten"... xor eax, eax call _printf loc_A1EBB: mov edi, [r15+4] mov eax, [r15+10h] add rdi, [rbx+38h] mov rsi, [r14] mov rdx, [r14+8] sub rdx, rsi cmp rdx, rax cmovnb rdx, rax call _memcpy mov rdi, rbx; this pop rbx pop r14 pop r15 jmp _ZN8elf_file12read_sh_dataEv; elf_file::read_sh_data(void) locret_A1EEA: retn
_DWORD * elf_file::content( elf_file *this, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14) { long long v14; // rbx long long v15; // r14 long long v16; // r15 unsigned long long v18; // rdx double v19; // xmm4_8 double v20; // xmm5_8 _DWORD *result; // rax long long v22; // [rsp-10h] [rbp-10h] if ( *(_BYTE *)this == 1 ) { v22 = v15; if ( *((_BYTE *)this + 152) == 1 ) printf( "Update segment content offset %x content size %zx physical size %x\n", *(_DWORD *)(a2 + 4), *(_QWORD *)(a3 + 8) - *(_QWORD *)a3, *(_DWORD *)(a2 + 16)); v18 = *(_QWORD *)(a3 + 8) - *(_QWORD *)a3; if ( v18 >= *(unsigned int *)(a2 + 16) ) v18 = *(unsigned int *)(a2 + 16); *(double *)a7.m128_u64 = memcpy( *((_QWORD *)this + 7) + *(unsigned int *)(a2 + 4), *(const char **)a3, v18, a4, a5, a6, v14, v22, v16); return elf_file::read_sh_data(this, a7, a8, a9, a10, v19, v20, a13, a14); } return result; }
content: CMP byte ptr [RDI],0x1 JNZ 0x001a1eea PUSH R15 PUSH R14 PUSH RBX MOV R14,RDX MOV R15,RSI MOV RBX,RDI CMP byte ptr [RDI + 0x98],0x1 JNZ 0x001a1ebb MOV RDX,qword ptr [R14 + 0x8] SUB RDX,qword ptr [R14] MOV ESI,dword ptr [R15 + 0x4] MOV ECX,dword ptr [R15 + 0x10] LEA RDI,[0x1b6e84] XOR EAX,EAX CALL 0x0010f070 LAB_001a1ebb: MOV EDI,dword ptr [R15 + 0x4] MOV EAX,dword ptr [R15 + 0x10] ADD RDI,qword ptr [RBX + 0x38] MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] SUB RDX,RSI CMP RDX,RAX CMOVNC RDX,RAX CALL 0x0010f3a0 MOV RDI,RBX POP RBX POP R14 POP R15 JMP 0x001a14d0 LAB_001a1eea: RET
/* elf_file::content(elf32_ph_entry const&, std::vector<unsigned char, std::allocator<unsigned char> > const&) */ void __thiscall elf_file::content(elf_file *this,elf32_ph_entry *param_1,vector *param_2) { ulong __n; if (*this == (elf_file)0x1) { if (this[0x98] == (elf_file)0x1) { printf("Update segment content offset %x content size %zx physical size %x\n", (ulong)*(uint *)(param_1 + 4),*(long *)(param_2 + 8) - *(long *)param_2, (ulong)*(uint *)(param_1 + 0x10)); } __n = *(long *)(param_2 + 8) - (long)*(void **)param_2; if (*(uint *)(param_1 + 0x10) <= __n) { __n = (ulong)*(uint *)(param_1 + 0x10); } memcpy((void *)((ulong)*(uint *)(param_1 + 4) + *(long *)(this + 0x38)),*(void **)param_2,__n); read_sh_data(this); return; } return; }
61,651
minja::ForNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override { // https://jinja.palletsprojects.com/en/3.0.x/templates/#for if (!iterable) throw std::runtime_error("ForNode.iterable is null"); if (!body) throw std::runtime_error("ForNode.body is null"); auto iterable_value = iterable->evaluate(context); Value::CallableType loop_function; std::function<void(Value&)> visit = [&](Value& iter) { auto filtered_items = Value::array(); if (!iter.is_null()) { if (!iterable_value.is_iterable()) { throw std::runtime_error("For loop iterable must be iterable: " + iterable_value.dump()); } iterable_value.for_each([&](Value & item) { destructuring_assign(var_names, context, item); if (!condition || condition->evaluate(context).to_bool()) { filtered_items.push_back(item); } }); } if (filtered_items.empty()) { if (else_body) { else_body->render(out, context); } } else { auto loop = recursive ? Value::callable(loop_function) : Value::object(); loop.set("length", (int64_t) filtered_items.size()); size_t cycle_index = 0; loop.set("cycle", Value::callable([&](const std::shared_ptr<Context> &, ArgumentsValue & args) { if (args.args.empty() || !args.kwargs.empty()) { throw std::runtime_error("cycle() expects at least 1 positional argument and no named arg"); } auto item = args.args[cycle_index]; cycle_index = (cycle_index + 1) % args.args.size(); return item; })); auto loop_context = Context::make(Value::object(), context); loop_context->set("loop", loop); for (size_t i = 0, n = filtered_items.size(); i < n; ++i) { auto & item = filtered_items.at(i); destructuring_assign(var_names, loop_context, item); loop.set("index", (int64_t) i + 1); loop.set("index0", (int64_t) i); loop.set("revindex", (int64_t) (n - i)); loop.set("revindex0", (int64_t) (n - i - 1)); loop.set("length", (int64_t) n); loop.set("first", i == 0); loop.set("last", i == (n - 1)); loop.set("previtem", i > 0 ? filtered_items.at(i - 1) : Value()); loop.set("nextitem", i < n - 1 ? filtered_items.at(i + 1) : Value()); try { body->render(out, loop_context); } catch (const LoopControlException & e) { if (e.control_type == LoopControlType::Break) break; if (e.control_type == LoopControlType::Continue) continue; } } } }; if (recursive) { loop_function = [&](const std::shared_ptr<Context> &, ArgumentsValue & args) { if (args.args.size() != 1 || !args.kwargs.empty() || !args.args[0].is_array()) { throw std::runtime_error("loop() expects exactly 1 positional iterable argument"); } auto & items = args.args[0]; visit(items); return Value(); }; } visit(iterable_value); }
O2
cpp
minja::ForNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0xb8, %rsp movq %rsi, %r14 movq 0x38(%rdi), %rsi testq %rsi, %rsi je 0x734d6 movq %rdi, %rbx cmpq $0x0, 0x58(%rdi) je 0x734f2 movq %rdx, %r15 leaq 0x68(%rsp), %r12 movq %r12, %rdi callq 0x6298e xorps %xmm0, %xmm0 movq %rsp, %rax movaps %xmm0, 0x10(%rax) movaps %xmm0, (%rax) leaq 0x40(%rsp), %rsi movq %r12, (%rsi) movq %rbx, 0x8(%rsi) movq %r15, 0x10(%rsi) movq %r14, 0x18(%rsi) movq %rax, 0x20(%rsi) leaq 0x20(%rsp), %r14 movq %r14, %rdi callq 0x735be cmpb $0x1, 0x68(%rbx) jne 0x7349c leaq 0x40(%rsp), %rsi movq %r14, (%rsi) movq %rsp, %rdi callq 0x73606 leaq 0x20(%rsp), %rdi leaq 0x68(%rsp), %rsi callq 0x6d768 leaq 0x20(%rsp), %rdi callq 0x47a12 movq %rsp, %rdi callq 0x47a12 leaq 0x68(%rsp), %rdi callq 0x62c1e addq $0xb8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq pushq $0x10 popq %rdi callq 0x23450 movq %rax, %r14 leaq 0x4066a(%rip), %rsi # 0xb3b52 movq %rax, %rdi callq 0x23310 jmp 0x7350c pushq $0x10 popq %rdi callq 0x23450 movq %rax, %r14 leaq 0x40667(%rip), %rsi # 0xb3b6b movq %rax, %rdi callq 0x23310 movq 0x88add(%rip), %rsi # 0xfbff0 movq 0x88a3e(%rip), %rdx # 0xfbf58 movq %r14, %rdi callq 0x23ef0 jmp 0x73524 movq %rax, %rbx movq %r14, %rdi callq 0x23680 jmp 0x73555 movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x47a12 jmp 0x73543 movq %rax, %rbx movq %rsp, %rdi callq 0x47a12 leaq 0x68(%rsp), %rdi callq 0x62c1e movq %rbx, %rdi callq 0x23f80 nop
_ZNK5minja7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE: push r15 push r14 push r12 push rbx sub rsp, 0B8h mov r14, rsi mov rsi, [rdi+38h] test rsi, rsi jz loc_734D6 mov rbx, rdi cmp qword ptr [rdi+58h], 0 jz loc_734F2 mov r15, rdx lea r12, [rsp+0D8h+var_70] mov rdi, r12 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) xorps xmm0, xmm0 mov rax, rsp movaps xmmword ptr [rax+10h], xmm0 movaps xmmword ptr [rax], xmm0 lea rsi, [rsp+0D8h+var_98] mov [rsi], r12 mov [rsi+8], rbx mov [rsi+10h], r15 mov [rsi+18h], r14 mov [rsi+20h], rax lea r14, [rsp+0D8h+var_B8] mov rdi, r14 call _ZNSt8functionIFvRN5minja5ValueEEEC2IZNKS0_7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS0_7ContextEEEUlS2_E_vEEOT_; std::function<void ()(minja::Value &)>::function<minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1},void>(minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1} &&) cmp byte ptr [rbx+68h], 1 jnz short loc_7349C lea rsi, [rsp+0D8h+var_98] mov [rsi], r14 mov rdi, rsp call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEaSIZNKS0_7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEES6_EUlS6_S8_E_EENSt9enable_ifIXsrNSA_9_CallableIT_NSL_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISN_E4typeEE4typeESA_EE5valueESt5decayISN_EE4type4typeESt15__invoke_resultIRSY_JS6_S8_EEEE5valueERSA_E4typeEOSN_ loc_7349C: lea rdi, [rsp+0D8h+var_B8] lea rsi, [rsp+0D8h+var_70] call _ZNKSt8functionIFvRN5minja5ValueEEEclES2_; std::function<void ()(minja::Value &)>::operator()(minja::Value &) lea rdi, [rsp+0D8h+var_B8]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() mov rdi, rsp; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() lea rdi, [rsp+0D8h+var_70]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() add rsp, 0B8h pop rbx pop r12 pop r14 pop r15 retn loc_734D6: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aFornodeIterabl; "ForNode.iterable is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_7350C loc_734F2: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aFornodeBodyIsN; "ForNode.body is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_7350C: mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short $+2 loc_73524: mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_73555 mov rbx, rax lea rdi, [rsp+0D8h+var_B8]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() jmp short loc_73543 mov rbx, rax loc_73543: mov rdi, rsp; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() lea rdi, [rsp+0D8h+var_70]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_73555: mov rdi, rbx call __Unwind_Resume
void minja::ForNode::do_render(long long a1, long long a2, long long a3) { void (***v4)(void); // rsi long long v6; // rdx long long v7; // rcx long long v8; // r8 long long v9; // r9 std::runtime_error *exception; // r14 _BYTE v11[32]; // [rsp+0h] [rbp-D8h] BYREF _BYTE v12[32]; // [rsp+20h] [rbp-B8h] BYREF _QWORD v13[5]; // [rsp+40h] [rbp-98h] BYREF _BYTE v14[112]; // [rsp+68h] [rbp-70h] BYREF v4 = *(void (****)(void))(a1 + 56); if ( !v4 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "ForNode.iterable is null"); goto LABEL_8; } if ( !*(_QWORD *)(a1 + 88) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "ForNode.body is null"); LABEL_8: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)v14, v4); v13[0] = v14; v13[1] = a1; v13[2] = a3; v13[3] = a2; v13[4] = v11; std::function<void ()(minja::Value &)>::function<minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1},void>( v12, v13, v6, v7, v8, v9, 0LL, 0LL, 0LL, 0LL); if ( *(_BYTE *)(a1 + 104) == 1 ) { v13[0] = v12; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::operator=<minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1}>(v11); } std::function<void ()(minja::Value &)>::operator()((long long)v12); std::_Function_base::~_Function_base((std::_Function_base *)v12); std::_Function_base::~_Function_base((std::_Function_base *)v11); minja::Value::~Value((minja::Value *)v14); }
do_render: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0xb8 MOV R14,RSI MOV RSI,qword ptr [RDI + 0x38] TEST RSI,RSI JZ 0x001734d6 MOV RBX,RDI CMP qword ptr [RDI + 0x58],0x0 JZ 0x001734f2 MOV R15,RDX LEA R12,[RSP + 0x68] MOV RDI,R12 CALL 0x0016298e XORPS XMM0,XMM0 MOV RAX,RSP MOVAPS xmmword ptr [RAX + 0x10],XMM0 MOVAPS xmmword ptr [RAX],XMM0 LEA RSI,[RSP + 0x40] MOV qword ptr [RSI],R12 MOV qword ptr [RSI + 0x8],RBX MOV qword ptr [RSI + 0x10],R15 MOV qword ptr [RSI + 0x18],R14 MOV qword ptr [RSI + 0x20],RAX LAB_00173479: LEA R14,[RSP + 0x20] MOV RDI,R14 CALL 0x001735be CMP byte ptr [RBX + 0x68],0x1 JNZ 0x0017349c LEA RSI,[RSP + 0x40] MOV qword ptr [RSI],R14 MOV RDI,RSP CALL 0x00173606 LAB_0017349c: LEA RDI,[RSP + 0x20] LEA RSI,[RSP + 0x68] CALL 0x0016d768 LAB_001734ab: LEA RDI,[RSP + 0x20] CALL 0x00147a12 MOV RDI,RSP CALL 0x00147a12 LEA RDI,[RSP + 0x68] CALL 0x00162c1e ADD RSP,0xb8 POP RBX POP R12 POP R14 POP R15 RET LAB_001734d6: PUSH 0x10 POP RDI CALL 0x00123450 MOV R14,RAX LAB_001734e1: LEA RSI,[0x1b3b52] MOV RDI,RAX CALL 0x00123310 LAB_001734f0: JMP 0x0017350c LAB_001734f2: PUSH 0x10 POP RDI CALL 0x00123450 MOV R14,RAX LAB_001734fd: LEA RSI,[0x1b3b6b] MOV RDI,RAX CALL 0x00123310 LAB_0017350c: MOV RSI,qword ptr [0x001fbff0] MOV RDX,qword ptr [0x001fbf58] MOV RDI,R14 CALL 0x00123ef0
/* minja::ForNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&) const */ void __thiscall minja::ForNode::do_render(ForNode *this,ostringstream *param_1,shared_ptr *param_2) { runtime_error *this_00; int8 local_d8; int8 uStack_d0; int8 local_c8; int8 uStack_c0; _lambda_minja__Value___1_ local_b8 [32]; Expression *local_98; ForNode *local_90; shared_ptr *local_88; ostringstream *local_80; int1 *local_78; Expression local_70 [80]; if (*(shared_ptr **)(this + 0x38) == (shared_ptr *)0x0) { this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001734e1 to 001734ef has its CatchHandler @ 00173524 */ std::runtime_error::runtime_error(this_00,"ForNode.iterable is null"); } else { if (*(long *)(this + 0x58) != 0) { Expression::evaluate(local_70,*(shared_ptr **)(this + 0x38)); local_c8 = 0; uStack_c0 = 0; local_d8 = 0; uStack_d0 = 0; /* try { // try from 00173479 to 00173485 has its CatchHandler @ 00173540 */ local_98 = local_70; local_90 = this; local_88 = param_2; local_80 = param_1; local_78 = (int1 *)&local_d8; std::function<void(minja::Value&)>:: function<minja::ForNode::do_render(std::__cxx11::ostringstream&,std::shared_ptr<minja::Context>const&)const::_lambda(minja::Value&)_1_,void> (local_b8); if (this[0x68] == (ForNode)0x1) { local_98 = (Expression *)local_b8; std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>:: operator=((function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)> *)&local_d8, (_lambda_std__shared_ptr<minja::Context>_const__minja__ArgumentsValue___1_ *) &local_98); } /* try { // try from 0017349c to 001734aa has its CatchHandler @ 00173531 */ std::function<void(minja::Value&)>::operator() ((function<void(minja::Value&)> *)local_b8,(Value *)local_70); std::_Function_base::~_Function_base((_Function_base *)local_b8); std::_Function_base::~_Function_base((_Function_base *)&local_d8); Value::~Value((Value *)local_70); return; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001734fd to 0017350b has its CatchHandler @ 00173522 */ std::runtime_error::runtime_error(this_00,"ForNode.body is null"); } /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_001fbff0,PTR__runtime_error_001fbf58); }
61,652
inline_mysql_mutex_init
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_mutex_init( #ifdef HAVE_PSI_MUTEX_INTERFACE PSI_mutex_key key, #endif mysql_mutex_t *that, const pthread_mutexattr_t *attr #ifdef SAFE_MUTEX , const char *src_name, const char *src_file, uint src_line #endif ) { #ifdef HAVE_PSI_MUTEX_INTERFACE that->m_psi= PSI_MUTEX_CALL(init_mutex)(key, &that->m_mutex); #else that->m_psi= NULL; #endif #ifdef COROUTINE_ENABLED that->l.data= that; that->l.prev= that->l.next= NULL; #endif #ifdef SAFE_MUTEX return safe_mutex_init(&that->m_mutex, attr, src_name, src_file, src_line); #else return pthread_mutex_init(&that->m_mutex, attr); #endif }
O0
c
inline_mysql_mutex_init: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) leaq 0x1ce8b6(%rip), %rax # 0x2cdee0 movq (%rax), %rax movq 0x40(%rax), %rax movl -0x4(%rbp), %edi movq -0x10(%rbp), %rsi callq *%rax movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x40(%rax) movq -0x10(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x38(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x30(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x28(%rax) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x2a320 addq $0x20, %rsp popq %rbp retq nopl (%rax)
inline_mysql_mutex_init_11: 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+40h] mov edi, [rbp+var_4] mov rsi, [rbp+var_10] call rax mov rcx, rax mov rax, [rbp+var_10] mov [rax+40h], rcx mov rcx, [rbp+var_10] mov rax, [rbp+var_10] mov [rax+38h], rcx mov rax, [rbp+var_10] mov qword ptr [rax+30h], 0 mov rax, [rbp+var_10] mov qword ptr [rax+28h], 0 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call _pthread_mutex_init add rsp, 20h pop rbp retn
long long inline_mysql_mutex_init_11(unsigned int a1, _QWORD *a2, long long a3) { a2[8] = ((long long ( *)(_QWORD, _QWORD *))PSI_server[8])(a1, a2); a2[7] = a2; a2[6] = 0LL; a2[5] = 0LL; return pthread_mutex_init(a2, a3); }
inline_mysql_mutex_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,[0x3cdee0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x40] 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 + 0x40],RCX MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x38],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x30],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x28],0x0 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0012a320 ADD RSP,0x20 POP RBP RET
void inline_mysql_mutex_init (int4 param_1,pthread_mutex_t *param_2,pthread_mutexattr_t *param_3) { int8 uVar1; uVar1 = (**(code **)(PSI_server + 0x40))(param_1,param_2); *(int8 *)((long)param_2 + 0x40) = uVar1; *(pthread_mutex_t **)((long)param_2 + 0x38) = param_2; *(int8 *)((long)param_2 + 0x30) = 0; param_2[1].__align = 0; pthread_mutex_init(param_2,param_3); return; }
61,653
ma_net_write
eloqsql/libmariadb/libmariadb/ma_net.c
int ma_net_write(NET *net, const uchar *packet, size_t len) { uchar buff[NET_HEADER_SIZE]; while (len >= MAX_PACKET_LENGTH) { const ulong max_len= MAX_PACKET_LENGTH; int3store(buff,max_len); buff[3]= (uchar)net->pkt_nr++; if (ma_net_write_buff(net,(char*) buff,NET_HEADER_SIZE) || ma_net_write_buff(net, (char *)packet, max_len)) return 1; packet+= max_len; len-= max_len; } /* write last remaining packet, size can be zero */ int3store(buff, len); buff[3]= (uchar)net->pkt_nr++; if (ma_net_write_buff(net,(char*) buff,NET_HEADER_SIZE) || ma_net_write_buff(net, (char *)packet, len)) return 1; return 0; }
O3
c
ma_net_write: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) cmpq $0xffffff, %rdx # imm = 0xFFFFFF jb 0x35d9c leaq -0x34(%rbp), %r12 movl $0x1, %r13d movw $0xffff, -0x34(%rbp) # imm = 0xFFFF movb $-0x1, -0x32(%rbp) movl 0x60(%r15), %eax leal 0x1(%rax), %ecx movl %ecx, 0x60(%r15) movb %al, -0x31(%rbp) movl $0x4, %edx movq %r15, %rdi movq %r12, %rsi callq 0x35e09 testl %eax, %eax jne 0x35de3 movl $0xffffff, %edx # imm = 0xFFFFFF movq %r15, %rdi movq %r14, %rsi callq 0x35e09 testl %eax, %eax jne 0x35de3 addq $0xffffff, %r14 # imm = 0xFFFFFF addq $-0xffffff, %rbx # imm = 0xFF000001 cmpq $0xfffffe, %rbx # imm = 0xFFFFFE ja 0x35d45 leaq -0x34(%rbp), %rsi movb %bl, (%rsi) movb %bh, -0x33(%rbp) movl %ebx, %eax shrl $0x10, %eax movb %al, 0x2(%rsi) movl 0x60(%r15), %eax leal 0x1(%rax), %ecx movl %ecx, 0x60(%r15) movb %al, 0x3(%rsi) movl $0x4, %edx movq %r15, %rdi callq 0x35e09 movl $0x1, %r13d testl %eax, %eax jne 0x35de3 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x35e09 movl %eax, %r13d movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x35e04 movl %r13d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x13510
ma_net_write: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdx mov r14, rsi mov r15, rdi mov rax, fs:28h mov [rbp+var_30], rax cmp rdx, 0FFFFFFh jb short loc_35D9C lea r12, [rbp+var_34] mov r13d, 1 loc_35D45: mov [rbp+var_34], 0FFFFh mov [rbp+var_32], 0FFh mov eax, [r15+60h] lea ecx, [rax+1] mov [r15+60h], ecx mov [rbp+var_31], al mov edx, 4 mov rdi, r15 mov rsi, r12 call ma_net_write_buff test eax, eax jnz short loc_35DE3 mov edx, 0FFFFFFh mov rdi, r15 mov rsi, r14 call ma_net_write_buff test eax, eax jnz short loc_35DE3 add r14, 0FFFFFFh add rbx, 0FFFFFFFFFF000001h cmp rbx, 0FFFFFEh ja short loc_35D45 loc_35D9C: lea rsi, [rbp+var_34] mov [rsi], bl mov byte ptr [rbp+var_34+1], bh mov eax, ebx shr eax, 10h mov [rsi+2], al mov eax, [r15+60h] lea ecx, [rax+1] mov [r15+60h], ecx mov [rsi+3], al mov edx, 4 mov rdi, r15 call ma_net_write_buff mov r13d, 1 test eax, eax jnz short loc_35DE3 mov rdi, r15 mov rsi, r14 mov rdx, rbx call ma_net_write_buff mov r13d, eax loc_35DE3: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_35E04 mov eax, r13d add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_35E04: call ___stack_chk_fail
long long ma_net_write(long long a1, long long a2, unsigned long long a3) { unsigned long long v3; // rbx unsigned int v5; // r13d int v6; // eax int v7; // eax __int16 v9; // [rsp+Ch] [rbp-34h] BYREF char v10; // [rsp+Eh] [rbp-32h] char v11; // [rsp+Fh] [rbp-31h] unsigned long long v12; // [rsp+10h] [rbp-30h] v3 = a3; v12 = __readfsqword(0x28u); if ( a3 < 0xFFFFFF ) { LABEL_6: v9 = v3; v10 = BYTE2(v3); v7 = *(_DWORD *)(a1 + 96); *(_DWORD *)(a1 + 96) = v7 + 1; v11 = v7; v5 = 1; if ( !(unsigned int)ma_net_write_buff(a1, &v9, 4LL) ) return (unsigned int)ma_net_write_buff(a1, a2, v3); } else { v5 = 1; while ( 1 ) { v9 = -1; v10 = -1; v6 = *(_DWORD *)(a1 + 96); *(_DWORD *)(a1 + 96) = v6 + 1; v11 = v6; if ( (unsigned int)ma_net_write_buff(a1, &v9, 4LL) || (unsigned int)ma_net_write_buff(a1, a2, 0xFFFFFFLL) ) break; a2 += 0xFFFFFFLL; v3 -= 0xFFFFFFLL; if ( v3 <= 0xFFFFFE ) goto LABEL_6; } } return v5; }
ma_net_write: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDX MOV R14,RSI MOV R15,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX CMP RDX,0xffffff JC 0x00135d9c LEA R12,[RBP + -0x34] MOV R13D,0x1 LAB_00135d45: MOV word ptr [RBP + -0x34],0xffff MOV byte ptr [RBP + -0x32],0xff MOV EAX,dword ptr [R15 + 0x60] LEA ECX,[RAX + 0x1] MOV dword ptr [R15 + 0x60],ECX MOV byte ptr [RBP + -0x31],AL MOV EDX,0x4 MOV RDI,R15 MOV RSI,R12 CALL 0x00135e09 TEST EAX,EAX JNZ 0x00135de3 MOV EDX,0xffffff MOV RDI,R15 MOV RSI,R14 CALL 0x00135e09 TEST EAX,EAX JNZ 0x00135de3 ADD R14,0xffffff ADD RBX,-0xffffff CMP RBX,0xfffffe JA 0x00135d45 LAB_00135d9c: LEA RSI,[RBP + -0x34] MOV byte ptr [RSI],BL MOV byte ptr [RBP + -0x33],BH MOV EAX,EBX SHR EAX,0x10 MOV byte ptr [RSI + 0x2],AL MOV EAX,dword ptr [R15 + 0x60] LEA ECX,[RAX + 0x1] MOV dword ptr [R15 + 0x60],ECX MOV byte ptr [RSI + 0x3],AL MOV EDX,0x4 MOV RDI,R15 CALL 0x00135e09 MOV R13D,0x1 TEST EAX,EAX JNZ 0x00135de3 MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL 0x00135e09 MOV R13D,EAX LAB_00135de3: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00135e04 MOV EAX,R13D ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00135e04: CALL 0x00113510
int4 ma_net_write(long param_1,long param_2,ulong param_3) { int iVar1; int4 uVar2; long in_FS_OFFSET; int2 local_3c; int1 local_3a; int1 local_39; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); if (0xfffffe < param_3) { uVar2 = 1; do { local_3c = 0xffff; local_3a = 0xff; iVar1 = *(int *)(param_1 + 0x60); *(int *)(param_1 + 0x60) = iVar1 + 1; local_39 = (int1)iVar1; iVar1 = ma_net_write_buff(param_1,&local_3c,4); if (iVar1 != 0) goto LAB_00135de3; iVar1 = ma_net_write_buff(param_1,param_2,0xffffff); if (iVar1 != 0) goto LAB_00135de3; param_2 = param_2 + 0xffffff; param_3 = param_3 - 0xffffff; } while (0xfffffe < param_3); } local_3c = (int2)param_3; local_3a = (int1)(param_3 >> 0x10); iVar1 = *(int *)(param_1 + 0x60); *(int *)(param_1 + 0x60) = iVar1 + 1; local_39 = (int1)iVar1; iVar1 = ma_net_write_buff(param_1,&local_3c,4); uVar2 = 1; if (iVar1 == 0) { uVar2 = ma_net_write_buff(param_1,param_2,param_3); } LAB_00135de3: if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return uVar2; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
61,654
minja::FilterNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override { if (!filter) throw std::runtime_error("FilterNode.filter is null"); if (!body) throw std::runtime_error("FilterNode.body is null"); auto filter_value = filter->evaluate(context); if (!filter_value.is_callable()) { throw std::runtime_error("Filter must be a callable: " + filter_value.dump()); } std::string rendered_body = body->render(context); ArgumentsValue filter_args = {{Value(rendered_body)}, {}}; auto result = filter_value.call(context, filter_args); out << result.to_str(); }
O2
cpp
minja::FilterNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x110, %rsp # imm = 0x110 movq %rsi, %rbx movq 0x20(%rdi), %rsi testq %rsi, %rsi je 0x770e1 movq %rdi, %r15 cmpq $0x0, 0x30(%rdi) je 0x770fd movq %rdx, %r14 leaq 0xc0(%rsp), %r12 movq %r12, %rdi callq 0x625b2 cmpq $0x0, 0x30(%r12) je 0x7712d movq 0x30(%r15), %rsi leaq 0xa0(%rsp), %rdi movq %r14, %rdx callq 0x75c2c leaq 0x50(%rsp), %rdi leaq 0xa0(%rsp), %rsi callq 0x65820 leaq 0x20(%rsp), %rdi leaq 0x50(%rsp), %rsi pushq $0x1 popq %rdx movq %rsp, %rcx callq 0x6cd18 xorps %xmm0, %xmm0 leaq 0x20(%rsp), %r15 movups %xmm0, 0x18(%r15) andq $0x0, 0x28(%r15) leaq 0x50(%rsp), %rdi callq 0x62842 leaq 0x50(%rsp), %rdi leaq 0xc0(%rsp), %rsi movq %r14, %rdx movq %r15, %rcx callq 0x6cfd4 movq %rsp, %rdi leaq 0x50(%rsp), %rsi callq 0x6fd2c movq %rsp, %rsi movq %rbx, %rdi callq 0x237f0 movq %rsp, %rdi callq 0x241d8 leaq 0x50(%rsp), %rdi callq 0x62842 leaq 0x20(%rsp), %rdi callq 0x6d0b8 leaq 0xa0(%rsp), %rdi callq 0x241d8 leaq 0xc0(%rsp), %rdi callq 0x62842 addq $0x110, %rsp # imm = 0x110 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x23460 movq %rax, %r14 leaq 0x3cbf5(%rip), %rsi # 0xb3ce8 movq %rax, %rdi callq 0x23320 jmp 0x77117 pushq $0x10 popq %rdi callq 0x23460 movq %rax, %r14 leaq 0x3cbf3(%rip), %rsi # 0xb3d02 movq %rax, %rdi callq 0x23320 movq 0x84ed2(%rip), %rsi # 0xfbff0 movq 0x84e33(%rip), %rdx # 0xfbf58 movq %r14, %rdi callq 0x23f20 pushq $0x10 popq %rdi callq 0x23460 movq %rax, %r14 leaq 0x20(%rsp), %rdi leaq 0xc0(%rsp), %rsi pushq $-0x1 popq %rdx xorl %ecx, %ecx callq 0x62a30 leaq 0x3cbc4(%rip), %rsi # 0xb3d1a leaq 0x50(%rsp), %rdi leaq 0x20(%rsp), %rdx callq 0x58156 movb $0x1, %bpl leaq 0x50(%rsp), %rsi movq %r14, %rdi callq 0x23e50 xorl %ebp, %ebp movq 0x84e72(%rip), %rsi # 0xfbff0 movq 0x84dd3(%rip), %rdx # 0xfbf58 movq %r14, %rdi callq 0x23f20 movq %rax, %rbx leaq 0x50(%rsp), %rdi callq 0x241d8 jmp 0x771a2 movq %rax, %rbx movb $0x1, %bpl leaq 0x20(%rsp), %rdi callq 0x241d8 testb %bpl, %bpl jne 0x771b6 jmp 0x77219 movq %rax, %rbx movq %r14, %rdi callq 0x236b0 jmp 0x77219 jmp 0x771c2 movq %rax, %rbx movq %r14, %rdi callq 0x236b0 jmp 0x77226 movq %rax, %rbx movq %rsp, %rdi callq 0x241d8 jmp 0x771df movq %rax, %rbx leaq 0x50(%rsp), %rdi callq 0x62842 jmp 0x771ee movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x6d0b8 jmp 0x7720c movq %rax, %rbx leaq 0x50(%rsp), %rdi callq 0x62842 jmp 0x7720c movq %rax, %rbx leaq 0xa0(%rsp), %rdi callq 0x241d8 leaq 0xc0(%rsp), %rdi callq 0x62842 movq %rbx, %rdi callq 0x23fa0 movq %rax, %rbx jmp 0x77219 nop
_ZNK5minja10FilterNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE: push rbp push r15 push r14 push r12 push rbx sub rsp, 110h mov rbx, rsi mov rsi, [rdi+20h] test rsi, rsi jz loc_770E1 mov r15, rdi cmp qword ptr [rdi+30h], 0 jz loc_770FD mov r14, rdx lea r12, [rsp+138h+var_78] mov rdi, r12 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) cmp qword ptr [r12+30h], 0 jz loc_7712D mov rsi, [r15+30h] lea rdi, [rsp+138h+var_98] mov rdx, r14 call _ZNK5minja12TemplateNode6renderB5cxx11ERKSt10shared_ptrINS_7ContextEE; minja::TemplateNode::render(std::shared_ptr<minja::Context> const&) lea rdi, [rsp+138h+var_E8] lea rsi, [rsp+138h+var_98] call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) lea rdi, [rsp+138h+var_118] lea rsi, [rsp+138h+var_E8] push 1 pop rdx mov rcx, rsp call _ZNSt6vectorIN5minja5ValueESaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<minja::Value>::vector(std::initializer_list<minja::Value>,std::allocator<minja::Value> const&) xorps xmm0, xmm0 lea r15, [rsp+138h+var_118] movups xmmword ptr [r15+18h], xmm0 and qword ptr [r15+28h], 0 lea rdi, [rsp+138h+var_E8]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() lea rdi, [rsp+138h+var_E8] lea rsi, [rsp+138h+var_78] mov rdx, r14 mov rcx, r15 call _ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE; minja::Value::call(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &) mov rdi, rsp; this lea rsi, [rsp+138h+var_E8]; minja::Value * call _ZNK5minja5Value6to_strB5cxx11Ev; minja::Value::to_str(void) mov rsi, rsp mov rdi, rbx call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov rdi, rsp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+138h+var_E8]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() lea rdi, [rsp+138h+var_118]; this call _ZN5minja14ArgumentsValueD2Ev; minja::ArgumentsValue::~ArgumentsValue() lea rdi, [rsp+138h+var_98]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+138h+var_78]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() add rsp, 110h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_770E1: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aFilternodeFilt; "FilterNode.filter is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_77117 loc_770FD: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aFilternodeBody; "FilterNode.body is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_77117: mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_7712D: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rdi, [rsp+138h+var_118] lea rsi, [rsp+138h+var_78] push 0FFFFFFFFFFFFFFFFh pop rdx xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aFilterMustBeAC; "Filter must be a callable: " lea rdi, [rsp+138h+var_E8] lea rdx, [rsp+138h+var_118] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+138h+var_E8] mov rdi, r14 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw mov rbx, rax lea rdi, [rsp+138h+var_E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_771A2 mov rbx, rax mov bpl, 1 loc_771A2: lea rdi, [rsp+138h+var_118]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_771B6 jmp short loc_77219 mov rbx, rax loc_771B6: mov rdi, r14; void * call ___cxa_free_exception jmp short loc_77219 jmp short $+2 loc_771C2: mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_77226 mov rbx, rax mov rdi, rsp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_771DF mov rbx, rax loc_771DF: lea rdi, [rsp+138h+var_E8]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_771EE mov rbx, rax loc_771EE: lea rdi, [rsp+138h+var_118]; this call _ZN5minja14ArgumentsValueD2Ev; minja::ArgumentsValue::~ArgumentsValue() jmp short loc_7720C mov rbx, rax lea rdi, [rsp+138h+var_E8]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_7720C mov rbx, rax loc_7720C: lea rdi, [rsp+138h+var_98]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_77219: lea rdi, [rsp+138h+var_78]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_77226: mov rdi, rbx call __Unwind_Resume mov rbx, rax jmp short loc_77219
void minja::FilterNode::do_render(long long a1, long long a2) { void (***v3)(void); // rsi std::runtime_error *exception; // r14 void *v5; // r14 _BYTE v6[32]; // [rsp+0h] [rbp-138h] BYREF _BYTE v7[24]; // [rsp+20h] [rbp-118h] BYREF __int128 v8; // [rsp+38h] [rbp-100h] long long v9; // [rsp+48h] [rbp-F0h] _BYTE v10[80]; // [rsp+50h] [rbp-E8h] BYREF _BYTE v11[32]; // [rsp+A0h] [rbp-98h] BYREF _BYTE v12[48]; // [rsp+C0h] [rbp-78h] BYREF long long v13; // [rsp+F0h] [rbp-48h] v3 = *(void (****)(void))(a1 + 32); if ( !v3 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "FilterNode.filter is null"); goto LABEL_7; } if ( !*(_QWORD *)(a1 + 48) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "FilterNode.body is null"); LABEL_7: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)v12, v3); if ( !v13 ) { v5 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v7, (long long)v12, 0xFFFFFFFF, 0); std::operator+<char>((long long)v10, (long long)"Filter must be a callable: ", (long long)v7); std::runtime_error::runtime_error(v5, v10); __cxa_throw( v5, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::TemplateNode::render[abi:cxx11]((long long)v11, *(long long ( ****)(_QWORD))(a1 + 48)); minja::Value::Value((long long)v10, (long long)v11); std::vector<minja::Value>::vector((long long)v7, (long long)v10, 1LL); v8 = 0LL; v9 = 0LL; minja::Value::~Value((minja::Value *)v10); minja::Value::call((long long)v10, (long long)v12); minja::Value::to_str[abi:cxx11]((std::__cxx11 *)v6, (minja::Value *)v10, 0.0); std::operator<<<char>(a2, v6); std::string::~string(v6); minja::Value::~Value((minja::Value *)v10); minja::ArgumentsValue::~ArgumentsValue((minja::ArgumentsValue *)v7); std::string::~string(v11); minja::Value::~Value((minja::Value *)v12); }
do_render: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x110 MOV RBX,RSI MOV RSI,qword ptr [RDI + 0x20] TEST RSI,RSI JZ 0x001770e1 MOV R15,RDI CMP qword ptr [RDI + 0x30],0x0 JZ 0x001770fd MOV R14,RDX LEA R12,[RSP + 0xc0] MOV RDI,R12 CALL 0x001625b2 CMP qword ptr [R12 + 0x30],0x0 JZ 0x0017712d MOV RSI,qword ptr [R15 + 0x30] LAB_00177018: LEA RDI,[RSP + 0xa0] MOV RDX,R14 CALL 0x00175c2c LAB_00177028: LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0xa0] CALL 0x00165820 LAB_0017703a: LEA RDI,[RSP + 0x20] LEA RSI,[RSP + 0x50] PUSH 0x1 POP RDX MOV RCX,RSP CALL 0x0016cd18 XORPS XMM0,XMM0 LEA R15,[RSP + 0x20] MOVUPS xmmword ptr [R15 + 0x18],XMM0 AND qword ptr [R15 + 0x28],0x0 LEA RDI,[RSP + 0x50] CALL 0x00162842 LAB_0017706b: LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0xc0] MOV RDX,R14 MOV RCX,R15 CALL 0x0016cfd4 LAB_00177083: MOV RDI,RSP LEA RSI,[RSP + 0x50] CALL 0x0016fd2c LAB_00177090: MOV RSI,RSP MOV RDI,RBX CALL 0x001237f0 LAB_0017709b: MOV RDI,RSP CALL 0x001241d8 LEA RDI,[RSP + 0x50] CALL 0x00162842 LEA RDI,[RSP + 0x20] CALL 0x0016d0b8 LEA RDI,[RSP + 0xa0] CALL 0x001241d8 LEA RDI,[RSP + 0xc0] CALL 0x00162842 ADD RSP,0x110 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001770e1: PUSH 0x10 POP RDI CALL 0x00123460 MOV R14,RAX LAB_001770ec: LEA RSI,[0x1b3ce8] MOV RDI,RAX CALL 0x00123320 LAB_001770fb: JMP 0x00177117 LAB_001770fd: PUSH 0x10 POP RDI CALL 0x00123460 MOV R14,RAX LAB_00177108: LEA RSI,[0x1b3d02] MOV RDI,RAX CALL 0x00123320 LAB_00177117: MOV RSI,qword ptr [0x001fbff0] MOV RDX,qword ptr [0x001fbf58] MOV RDI,R14 CALL 0x00123f20 LAB_0017712d: PUSH 0x10 POP RDI CALL 0x00123460 MOV R14,RAX LAB_00177138: LEA RDI,[RSP + 0x20] LEA RSI,[RSP + 0xc0] PUSH -0x1 POP RDX XOR ECX,ECX CALL 0x00162a30 LAB_0017714f: LEA RSI,[0x1b3d1a] LEA RDI,[RSP + 0x50] LEA RDX,[RSP + 0x20] CALL 0x00158156 MOV BPL,0x1 LAB_00177168: LEA RSI,[RSP + 0x50] MOV RDI,R14 CALL 0x00123e50 XOR EBP,EBP MOV RSI,qword ptr [0x001fbff0] MOV RDX,qword ptr [0x001fbf58] MOV RDI,R14 CALL 0x00123f20
/* minja::FilterNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&) const */ void minja::FilterNode::do_render(ostringstream *param_1,shared_ptr *param_2) { runtime_error *prVar1; string asStack_138 [32]; vector<minja::Value,std::allocator<minja::Value>> local_118 [24]; int8 local_100; int8 uStack_f8; int8 local_f0; Value local_e8 [80]; TemplateNode local_98 [32]; Expression local_78 [48]; long local_48; if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) { prVar1 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001770ec to 001770fa has its CatchHandler @ 001771c2 */ std::runtime_error::runtime_error(prVar1,"FilterNode.filter is null"); } else { if (*(long *)(param_1 + 0x30) != 0) { Expression::evaluate(local_78,*(shared_ptr **)(param_1 + 0x20)); if (local_48 != 0) { /* try { // try from 00177018 to 00177027 has its CatchHandler @ 0017722e */ TemplateNode::render_abi_cxx11_(local_98,*(shared_ptr **)(param_1 + 0x30)); /* try { // try from 00177028 to 00177039 has its CatchHandler @ 00177209 */ Value::Value(local_e8,(string *)local_98); /* try { // try from 0017703a to 0017704e has its CatchHandler @ 001771fa */ std::vector<minja::Value,std::allocator<minja::Value>>::vector (local_118,local_e8,1,asStack_138); local_100 = 0; uStack_f8 = 0; local_f0 = 0; Value::~Value(local_e8); /* try { // try from 0017706b to 00177082 has its CatchHandler @ 001771eb */ Value::call(local_e8,(ArgumentsValue *)local_78); /* try { // try from 00177083 to 0017708f has its CatchHandler @ 001771dc */ Value::to_str_abi_cxx11_(); /* try { // try from 00177090 to 0017709a has its CatchHandler @ 001771cf */ std::operator<<((ostream *)param_2,asStack_138); std::__cxx11::string::~string(asStack_138); Value::~Value(local_e8); ArgumentsValue::~ArgumentsValue((ArgumentsValue *)local_118); std::__cxx11::string::~string((string *)local_98); Value::~Value((Value *)local_78); return; } prVar1 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00177138 to 0017714e has its CatchHandler @ 001771b3 */ Value::dump_abi_cxx11_((int)local_118,SUB81(local_78,0)); /* try { // try from 0017714f to 00177164 has its CatchHandler @ 0017719c */ std::operator+((char *)local_e8,(string *)"Filter must be a callable: "); /* try { // try from 00177168 to 0017718c has its CatchHandler @ 0017718d */ std::runtime_error::runtime_error(prVar1,(string *)local_e8); /* WARNING: Subroutine does not return */ __cxa_throw(prVar1,PTR_typeinfo_001fbff0,PTR__runtime_error_001fbf58); } prVar1 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00177108 to 00177116 has its CatchHandler @ 001771c0 */ std::runtime_error::runtime_error(prVar1,"FilterNode.body is null"); } /* WARNING: Subroutine does not return */ __cxa_throw(prVar1,PTR_typeinfo_001fbff0,PTR__runtime_error_001fbf58); }
61,655
PFS_buffer_scalable_container<PFS_user, 128, 128, PFS_user_array, PFS_user_allocator>::cleanup()
eloqsql/storage/perfschema/pfs_buffer_container.h
void cleanup() { int i; array_type *page; if (! m_initialized) return; pthread_mutex_lock(& m_critical_section); for (i=0 ; i < PFS_PAGE_COUNT; i++) { page= m_pages[i]; if (page != NULL) { m_allocator->free_array(page); delete page; m_pages[i]= NULL; } } pthread_mutex_unlock(& m_critical_section); pthread_mutex_destroy(& m_critical_section); m_initialized= false; }
O0
c
PFS_buffer_scalable_container<PFS_user, 128, 128, PFS_user_array, PFS_user_allocator>::cleanup(): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x20(%rbp) testb $0x1, 0x8(%rax) jne 0x572ef jmp 0x573a3 movq -0x20(%rbp), %rdi addq $0x4b0, %rdi # imm = 0x4B0 callq 0x264b0 movl $0x0, -0xc(%rbp) cmpl $0x80, -0xc(%rbp) jge 0x5737b movq -0x20(%rbp), %rax movslq -0xc(%rbp), %rcx movq 0xa8(%rax,%rcx,8), %rax movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x5736e movq -0x20(%rbp), %rax movq 0x4a8(%rax), %rdi movq -0x18(%rbp), %rsi callq 0x3b620 movq -0x18(%rbp), %rax movq %rax, -0x28(%rbp) cmpq $0x0, %rax je 0x5735a movq -0x28(%rbp), %rdi movl $0x88, %esi callq 0x26320 movq -0x20(%rbp), %rax movslq -0xc(%rbp), %rcx movq $0x0, 0xa8(%rax,%rcx,8) jmp 0x57370 movl -0xc(%rbp), %eax addl $0x1, %eax movl %eax, -0xc(%rbp) jmp 0x57306 movq -0x20(%rbp), %rdi addq $0x4b0, %rdi # imm = 0x4B0 callq 0x26260 movq -0x20(%rbp), %rdi addq $0x4b0, %rdi # imm = 0x4B0 callq 0x26390 movq -0x20(%rbp), %rax movb $0x0, 0x8(%rax) addq $0x30, %rsp popq %rbp retq nopl (%rax)
_ZN29PFS_buffer_scalable_containerI8PFS_userLi128ELi128E14PFS_user_array18PFS_user_allocatorE7cleanupEv: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_20], rax test byte ptr [rax+8], 1 jnz short loc_572EF jmp loc_573A3 loc_572EF: mov rdi, [rbp+var_20] add rdi, 4B0h call _pthread_mutex_lock mov [rbp+var_C], 0 loc_57306: cmp [rbp+var_C], 80h jge short loc_5737B mov rax, [rbp+var_20] movsxd rcx, [rbp+var_C] mov rax, [rax+rcx*8+0A8h] mov [rbp+var_18], rax cmp [rbp+var_18], 0 jz short loc_5736E mov rax, [rbp+var_20] mov rdi, [rax+4A8h] mov rsi, [rbp+var_18] call _ZN18PFS_user_allocator10free_arrayEP14PFS_user_array; PFS_user_allocator::free_array(PFS_user_array *) mov rax, [rbp+var_18] mov [rbp+var_28], rax cmp rax, 0 jz short loc_5735A mov rdi, [rbp+var_28]; void * mov esi, 88h; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5735A: mov rax, [rbp+var_20] movsxd rcx, [rbp+var_C] mov qword ptr [rax+rcx*8+0A8h], 0 loc_5736E: jmp short $+2 loc_57370: mov eax, [rbp+var_C] add eax, 1 mov [rbp+var_C], eax jmp short loc_57306 loc_5737B: mov rdi, [rbp+var_20] add rdi, 4B0h call _pthread_mutex_unlock mov rdi, [rbp+var_20] add rdi, 4B0h call _pthread_mutex_destroy mov rax, [rbp+var_20] mov byte ptr [rax+8], 0 loc_573A3: add rsp, 30h pop rbp retn
long long PFS_buffer_scalable_container<PFS_user,128,128,PFS_user_array,PFS_user_allocator>::cleanup( long long a1) { long long result; // rax PFS_user_array *v2; // [rsp+18h] [rbp-18h] int i; // [rsp+24h] [rbp-Ch] result = a1; if ( (*(_BYTE *)(a1 + 8) & 1) != 0 ) { pthread_mutex_lock(a1 + 1200); for ( i = 0; i < 128; ++i ) { v2 = *(PFS_user_array **)(a1 + 8LL * i + 168); if ( v2 ) { PFS_user_allocator::free_array(*(PFS_user_allocator **)(a1 + 1192), v2); operator delete(v2, 0x88uLL); *(_QWORD *)(a1 + 8LL * i + 168) = 0LL; } } pthread_mutex_unlock(a1 + 1200); pthread_mutex_destroy(a1 + 1200); result = a1; *(_BYTE *)(a1 + 8) = 0; } return result; }
cleanup: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x20],RAX TEST byte ptr [RAX + 0x8],0x1 JNZ 0x001572ef JMP 0x001573a3 LAB_001572ef: MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x4b0 CALL 0x001264b0 MOV dword ptr [RBP + -0xc],0x0 LAB_00157306: CMP dword ptr [RBP + -0xc],0x80 JGE 0x0015737b MOV RAX,qword ptr [RBP + -0x20] MOVSXD RCX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RAX + RCX*0x8 + 0xa8] MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],0x0 JZ 0x0015736e MOV RAX,qword ptr [RBP + -0x20] MOV RDI,qword ptr [RAX + 0x4a8] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0013b620 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x28],RAX CMP RAX,0x0 JZ 0x0015735a MOV RDI,qword ptr [RBP + -0x28] MOV ESI,0x88 CALL 0x00126320 LAB_0015735a: MOV RAX,qword ptr [RBP + -0x20] MOVSXD RCX,dword ptr [RBP + -0xc] MOV qword ptr [RAX + RCX*0x8 + 0xa8],0x0 LAB_0015736e: JMP 0x00157370 LAB_00157370: MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x1 MOV dword ptr [RBP + -0xc],EAX JMP 0x00157306 LAB_0015737b: MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x4b0 CALL 0x00126260 MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x4b0 CALL 0x00126390 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x8],0x0 LAB_001573a3: ADD RSP,0x30 POP RBP RET
/* PFS_buffer_scalable_container<PFS_user, 128, 128, PFS_user_array, PFS_user_allocator>::cleanup() */ void __thiscall PFS_buffer_scalable_container<PFS_user,128,128,PFS_user_array,PFS_user_allocator>::cleanup (PFS_buffer_scalable_container<PFS_user,128,128,PFS_user_array,PFS_user_allocator> *this) { PFS_user_array *pPVar1; int local_14; if (((byte)this[8] & 1) != 0) { pthread_mutex_lock((pthread_mutex_t *)(this + 0x4b0)); for (local_14 = 0; local_14 < 0x80; local_14 = local_14 + 1) { pPVar1 = *(PFS_user_array **)(this + (long)local_14 * 8 + 0xa8); if (pPVar1 != (PFS_user_array *)0x0) { PFS_user_allocator::free_array(*(PFS_user_allocator **)(this + 0x4a8),pPVar1); if (pPVar1 != (PFS_user_array *)0x0) { operator_delete(pPVar1,0x88); } *(int8 *)(this + (long)local_14 * 8 + 0xa8) = 0; } } pthread_mutex_unlock((pthread_mutex_t *)(this + 0x4b0)); pthread_mutex_destroy((pthread_mutex_t *)(this + 0x4b0)); this[8] = (PFS_buffer_scalable_container<PFS_user,128,128,PFS_user_array,PFS_user_allocator>)0x0 ; } return; }
61,656
PFS_buffer_scalable_container<PFS_user, 128, 128, PFS_user_array, PFS_user_allocator>::cleanup()
eloqsql/storage/perfschema/pfs_buffer_container.h
void cleanup() { int i; array_type *page; if (! m_initialized) return; pthread_mutex_lock(& m_critical_section); for (i=0 ; i < PFS_PAGE_COUNT; i++) { page= m_pages[i]; if (page != NULL) { m_allocator->free_array(page); delete page; m_pages[i]= NULL; } } pthread_mutex_unlock(& m_critical_section); pthread_mutex_destroy(& m_critical_section); m_initialized= false; }
O3
c
PFS_buffer_scalable_container<PFS_user, 128, 128, PFS_user_array, PFS_user_allocator>::cleanup(): cmpb $0x1, 0x8(%rdi) jne 0x4459d pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdi, %rbx leaq 0x4b0(%rdi), %r14 movq %r14, %rdi callq 0x264d0 xorl %r12d, %r12d movq 0xa8(%rbx,%r12,8), %r15 testq %r15, %r15 je 0x44575 movq 0x4a8(%rbx), %rdi movq %r15, %rsi callq 0x33f26 movl $0x88, %esi movq %r15, %rdi callq 0x26340 movq $0x0, 0xa8(%rbx,%r12,8) incq %r12 cmpq $0x80, %r12 jne 0x44540 movq %r14, %rdi callq 0x26250 movq %r14, %rdi callq 0x263d0 movb $0x0, 0x8(%rbx) popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_ZN29PFS_buffer_scalable_containerI8PFS_userLi128ELi128E14PFS_user_array18PFS_user_allocatorE7cleanupEv: cmp byte ptr [rdi+8], 1 jnz short locret_4459D push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rdi lea r14, [rdi+4B0h] mov rdi, r14 call _pthread_mutex_lock xor r12d, r12d loc_44540: mov r15, [rbx+r12*8+0A8h] test r15, r15 jz short loc_44575 mov rdi, [rbx+4A8h] mov rsi, r15 call _ZN18PFS_user_allocator10free_arrayEP14PFS_user_array; PFS_user_allocator::free_array(PFS_user_array *) mov esi, 88h; unsigned __int64 mov rdi, r15; void * call __ZdlPvm; operator delete(void *,ulong) mov qword ptr [rbx+r12*8+0A8h], 0 loc_44575: inc r12 cmp r12, 80h jnz short loc_44540 mov rdi, r14 call _pthread_mutex_unlock mov rdi, r14 call _pthread_mutex_destroy mov byte ptr [rbx+8], 0 pop rbx pop r12 pop r14 pop r15 pop rbp locret_4459D: retn
long long PFS_buffer_scalable_container<PFS_user,128,128,PFS_user_array,PFS_user_allocator>::cleanup( long long a1) { long long v1; // r14 long long i; // r12 void *v3; // r15 long long result; // rax if ( *(_BYTE *)(a1 + 8) == 1 ) { v1 = a1 + 1200; pthread_mutex_lock(a1 + 1200); for ( i = 0LL; i != 128; ++i ) { v3 = *(void **)(a1 + 8 * i + 168); if ( v3 ) { PFS_user_allocator::free_array(*(_QWORD *)(a1 + 1192), *(_QWORD **)(a1 + 8 * i + 168)); operator delete(v3, 0x88uLL); *(_QWORD *)(a1 + 8 * i + 168) = 0LL; } } pthread_mutex_unlock(v1); result = pthread_mutex_destroy(v1); *(_BYTE *)(a1 + 8) = 0; } return result; }
cleanup: CMP byte ptr [RDI + 0x8],0x1 JNZ 0x0014459d PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDI LEA R14,[RDI + 0x4b0] MOV RDI,R14 CALL 0x001264d0 XOR R12D,R12D LAB_00144540: MOV R15,qword ptr [RBX + R12*0x8 + 0xa8] TEST R15,R15 JZ 0x00144575 MOV RDI,qword ptr [RBX + 0x4a8] MOV RSI,R15 CALL 0x00133f26 MOV ESI,0x88 MOV RDI,R15 CALL 0x00126340 MOV qword ptr [RBX + R12*0x8 + 0xa8],0x0 LAB_00144575: INC R12 CMP R12,0x80 JNZ 0x00144540 MOV RDI,R14 CALL 0x00126250 MOV RDI,R14 CALL 0x001263d0 MOV byte ptr [RBX + 0x8],0x0 POP RBX POP R12 POP R14 POP R15 POP RBP LAB_0014459d: RET
/* PFS_buffer_scalable_container<PFS_user, 128, 128, PFS_user_array, PFS_user_allocator>::cleanup() */ void __thiscall PFS_buffer_scalable_container<PFS_user,128,128,PFS_user_array,PFS_user_allocator>::cleanup (PFS_buffer_scalable_container<PFS_user,128,128,PFS_user_array,PFS_user_allocator> *this) { pthread_mutex_t *__mutex; PFS_user_array *pPVar1; long lVar2; if (this[8] == (PFS_buffer_scalable_container<PFS_user,128,128,PFS_user_array,PFS_user_allocator>)0x1) { __mutex = (pthread_mutex_t *)(this + 0x4b0); pthread_mutex_lock(__mutex); lVar2 = 0; do { pPVar1 = *(PFS_user_array **)(this + lVar2 * 8 + 0xa8); if (pPVar1 != (PFS_user_array *)0x0) { PFS_user_allocator::free_array(*(PFS_user_allocator **)(this + 0x4a8),pPVar1); operator_delete(pPVar1,0x88); *(int8 *)(this + lVar2 * 8 + 0xa8) = 0; } lVar2 = lVar2 + 1; } while (lVar2 != 0x80); pthread_mutex_unlock(__mutex); pthread_mutex_destroy(__mutex); this[8] = (PFS_buffer_scalable_container<PFS_user,128,128,PFS_user_array,PFS_user_allocator>)0x0 ; } return; }
61,657
graph_copy_init_tensor(ggml_hash_set*, ggml_tensor**, bool*, ggml_tensor*)
ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp
static void graph_copy_init_tensor(struct ggml_hash_set * hash_set, struct ggml_tensor ** node_copies, bool * node_init, struct ggml_tensor * src) { size_t id = ggml_hash_find(hash_set, src); if (node_init[id]) { return; } node_init[id] = true; struct ggml_tensor * dst = node_copies[id]; if (dst->view_src != NULL) { graph_copy_init_tensor(hash_set, node_copies, node_init, src->view_src); enum ggml_status status = ggml_backend_view_init(dst); GGML_ASSERT(status == GGML_STATUS_SUCCESS); } else { ggml_backend_tensor_copy(src, dst); } // init src for (int i = 0; i < GGML_MAX_SRC; i++) { struct ggml_tensor * s = src->src[i]; if (s == NULL) { continue; } graph_copy_init_tensor(hash_set, node_copies, node_init, s); } }
O0
cpp
graph_copy_init_tensor(ggml_hash_set*, ggml_tensor**, bool*, ggml_tensor*): subq $0x48, %rsp movq %rdi, 0x40(%rsp) movq %rsi, 0x38(%rsp) movq %rdx, 0x30(%rsp) movq %rcx, 0x28(%rsp) movq 0x40(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x638e0 movq %rax, 0x20(%rsp) movq 0x30(%rsp), %rax movq 0x20(%rsp), %rcx testb $0x1, (%rax,%rcx) je 0x637e1 jmp 0x638ce movq 0x30(%rsp), %rax movq 0x20(%rsp), %rcx movb $0x1, (%rax,%rcx) movq 0x38(%rsp), %rax movq 0x20(%rsp), %rcx movq (%rax,%rcx,8), %rax movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rax cmpq $0x0, 0xe8(%rax) je 0x63869 movq 0x40(%rsp), %rdi movq 0x38(%rsp), %rsi movq 0x30(%rsp), %rdx movq 0x28(%rsp), %rax movq 0xe8(%rax), %rcx callq 0x637a0 movq 0x18(%rsp), %rdi callq 0x45910 movl %eax, 0x14(%rsp) cmpl $0x0, 0x14(%rsp) je 0x63867 leaq 0x53ddc(%rip), %rdi # 0xb7629 movl $0x6b2, %esi # imm = 0x6B2 leaq 0x50da9(%rip), %rdx # 0xb4602 leaq 0x5470c(%rip), %rcx # 0xb7f6c movb $0x0, %al callq 0x46780 jmp 0x63878 movq 0x28(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x41c90 movl $0x0, 0x10(%rsp) cmpl $0xa, 0x10(%rsp) jge 0x638ce movq 0x28(%rsp), %rax movslq 0x10(%rsp), %rcx movq 0x98(%rax,%rcx,8), %rax movq %rax, 0x8(%rsp) cmpq $0x0, 0x8(%rsp) jne 0x638a8 jmp 0x638c1 movq 0x40(%rsp), %rdi movq 0x38(%rsp), %rsi movq 0x30(%rsp), %rdx movq 0x8(%rsp), %rcx callq 0x637a0 movl 0x10(%rsp), %eax addl $0x1, %eax movl %eax, 0x10(%rsp) jmp 0x63880 addq $0x48, %rsp retq nopw %cs:(%rax,%rax)
_ZL22graph_copy_init_tensorP13ggml_hash_setPP11ggml_tensorPbS2_: sub rsp, 48h mov [rsp+48h+var_8], rdi mov [rsp+48h+var_10], rsi mov [rsp+48h+var_18], rdx mov [rsp+48h+var_20], rcx mov rdi, [rsp+48h+var_8] mov rsi, [rsp+48h+var_20] call _ZL14ggml_hash_findPK13ggml_hash_setPK11ggml_tensor; ggml_hash_find(ggml_hash_set const*,ggml_tensor const*) mov [rsp+48h+var_28], rax mov rax, [rsp+48h+var_18] mov rcx, [rsp+48h+var_28] test byte ptr [rax+rcx], 1 jz short loc_637E1 jmp loc_638CE loc_637E1: mov rax, [rsp+48h+var_18] mov rcx, [rsp+48h+var_28] mov byte ptr [rax+rcx], 1 mov rax, [rsp+48h+var_10] mov rcx, [rsp+48h+var_28] mov rax, [rax+rcx*8] mov [rsp+48h+var_30], rax mov rax, [rsp+48h+var_30] cmp qword ptr [rax+0E8h], 0 jz short loc_63869 mov rdi, [rsp+48h+var_8] mov rsi, [rsp+48h+var_10] mov rdx, [rsp+48h+var_18] mov rax, [rsp+48h+var_20] mov rcx, [rax+0E8h] call _ZL22graph_copy_init_tensorP13ggml_hash_setPP11ggml_tensorPbS2_; graph_copy_init_tensor(ggml_hash_set *,ggml_tensor **,bool *,ggml_tensor *) mov rdi, [rsp+48h+var_30] call _ggml_backend_view_init mov [rsp+48h+var_34], eax cmp [rsp+48h+var_34], 0 jz short loc_63867 lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... mov esi, 6B2h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aStatusGgmlStat; "status == GGML_STATUS_SUCCESS" mov al, 0 call _ggml_abort loc_63867: jmp short loc_63878 loc_63869: mov rdi, [rsp+48h+var_20] mov rsi, [rsp+48h+var_30] call _ggml_backend_tensor_copy loc_63878: mov [rsp+48h+var_38], 0 loc_63880: cmp [rsp+48h+var_38], 0Ah jge short loc_638CE mov rax, [rsp+48h+var_20] movsxd rcx, [rsp+48h+var_38] mov rax, [rax+rcx*8+98h] mov [rsp+48h+var_40], rax cmp [rsp+48h+var_40], 0 jnz short loc_638A8 jmp short loc_638C1 loc_638A8: mov rdi, [rsp+48h+var_8] mov rsi, [rsp+48h+var_10] mov rdx, [rsp+48h+var_18] mov rcx, [rsp+48h+var_40] call _ZL22graph_copy_init_tensorP13ggml_hash_setPP11ggml_tensorPbS2_; graph_copy_init_tensor(ggml_hash_set *,ggml_tensor **,bool *,ggml_tensor *) loc_638C1: mov eax, [rsp+48h+var_38] add eax, 1 mov [rsp+48h+var_38], eax jmp short loc_63880 loc_638CE: add rsp, 48h retn
char graph_copy_init_tensor(long long a1, long long a2, long long a3, long long a4) { int v4; // eax long long v6; // [rsp+8h] [rbp-40h] int i; // [rsp+10h] [rbp-38h] long long v8; // [rsp+18h] [rbp-30h] long long v9; // [rsp+20h] [rbp-28h] v9 = ggml_hash_find(a1, a4); LOBYTE(v4) = a3; if ( (*(_BYTE *)(a3 + v9) & 1) == 0 ) { *(_BYTE *)(a3 + v9) = 1; v8 = *(_QWORD *)(a2 + 8 * v9); if ( *(_QWORD *)(v8 + 232) ) { graph_copy_init_tensor(a1, a2, a3, *(_QWORD *)(a4 + 232)); v4 = ggml_backend_view_init(v8); if ( v4 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp", 1714, (long long)"GGML_ASSERT(%s) failed", "status == GGML_STATUS_SUCCESS"); } else { LOBYTE(v4) = ggml_backend_tensor_copy(a4, v8); } for ( i = 0; i < 10; ++i ) { v6 = *(_QWORD *)(a4 + 8LL * i + 152); if ( v6 ) graph_copy_init_tensor(a1, a2, a3, v6); LOBYTE(v4) = i + 1; } } return v4; }
graph_copy_init_tensor: SUB RSP,0x48 MOV qword ptr [RSP + 0x40],RDI MOV qword ptr [RSP + 0x38],RSI MOV qword ptr [RSP + 0x30],RDX MOV qword ptr [RSP + 0x28],RCX MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x28] CALL 0x001638e0 MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RSP + 0x20] TEST byte ptr [RAX + RCX*0x1],0x1 JZ 0x001637e1 JMP 0x001638ce LAB_001637e1: MOV RAX,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RSP + 0x20] MOV byte ptr [RAX + RCX*0x1],0x1 MOV RAX,qword ptr [RSP + 0x38] MOV RCX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x18] CMP qword ptr [RAX + 0xe8],0x0 JZ 0x00163869 MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RAX + 0xe8] CALL 0x001637a0 MOV RDI,qword ptr [RSP + 0x18] CALL 0x00145910 MOV dword ptr [RSP + 0x14],EAX CMP dword ptr [RSP + 0x14],0x0 JZ 0x00163867 LEA RDI,[0x1b7629] MOV ESI,0x6b2 LEA RDX,[0x1b4602] LEA RCX,[0x1b7f6c] MOV AL,0x0 CALL 0x00146780 LAB_00163867: JMP 0x00163878 LAB_00163869: MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x18] CALL 0x00141c90 LAB_00163878: MOV dword ptr [RSP + 0x10],0x0 LAB_00163880: CMP dword ptr [RSP + 0x10],0xa JGE 0x001638ce MOV RAX,qword ptr [RSP + 0x28] MOVSXD RCX,dword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + RCX*0x8 + 0x98] MOV qword ptr [RSP + 0x8],RAX CMP qword ptr [RSP + 0x8],0x0 JNZ 0x001638a8 JMP 0x001638c1 LAB_001638a8: MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RSP + 0x8] CALL 0x001637a0 LAB_001638c1: MOV EAX,dword ptr [RSP + 0x10] ADD EAX,0x1 MOV dword ptr [RSP + 0x10],EAX JMP 0x00163880 LAB_001638ce: ADD RSP,0x48 RET
/* graph_copy_init_tensor(ggml_hash_set*, ggml_tensor**, bool*, ggml_tensor*) */ void graph_copy_init_tensor (ggml_hash_set *param_1,ggml_tensor **param_2,bool *param_3,ggml_tensor *param_4) { ggml_tensor *pgVar1; int iVar2; long lVar3; int local_38; lVar3 = ggml_hash_find(param_1,param_4); if ((param_3[lVar3] & 1U) == 0) { param_3[lVar3] = true; pgVar1 = param_2[lVar3]; if (*(long *)(pgVar1 + 0xe8) == 0) { ggml_backend_tensor_copy(param_4,pgVar1); } else { graph_copy_init_tensor(param_1,param_2,param_3,*(ggml_tensor **)(param_4 + 0xe8)); iVar2 = ggml_backend_view_init(pgVar1); if (iVar2 != 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp" ,0x6b2,"GGML_ASSERT(%s) failed","status == GGML_STATUS_SUCCESS"); } } for (local_38 = 0; local_38 < 10; local_38 = local_38 + 1) { if (*(ggml_tensor **)(param_4 + (long)local_38 * 8 + 0x98) != (ggml_tensor *)0x0) { graph_copy_init_tensor (param_1,param_2,param_3,*(ggml_tensor **)(param_4 + (long)local_38 * 8 + 0x98)); } } } return; }
61,658
get_store_length
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static size_t get_store_length(size_t length) { #define MAX_STORE_SIZE 9 unsigned char buffer[MAX_STORE_SIZE], *p; /* We just store the length and subtract offset of our buffer to determine the length */ p= mysql_net_store_length(buffer, length); return p - buffer; }
O0
c
get_store_length: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x20(%rbp) movq -0x20(%rbp), %rsi leaq -0x11(%rbp), %rdi movq %rdi, -0x38(%rbp) callq 0x2ce00 movq -0x38(%rbp), %rcx movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax subq %rcx, %rax movq %rax, -0x30(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x270f9 movq -0x30(%rbp), %rax addq $0x40, %rsp popq %rbp retq callq 0x134c0 nop
get_store_length: push rbp mov rbp, rsp sub rsp, 40h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_20], rdi mov rsi, [rbp+var_20] lea rdi, [rbp+var_11] mov [rbp+var_38], rdi call mysql_net_store_length mov rcx, [rbp+var_38] mov [rbp+var_28], rax mov rax, [rbp+var_28] sub rax, rcx mov [rbp+var_30], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_270F9 mov rax, [rbp+var_30] add rsp, 40h pop rbp retn loc_270F9: call ___stack_chk_fail
long long get_store_length(long long a1) { _BYTE v2[9]; // [rsp+2Fh] [rbp-11h] BYREF unsigned long long v3; // [rsp+38h] [rbp-8h] v3 = __readfsqword(0x28u); return mysql_net_store_length(v2, a1) - (_QWORD)v2; }
get_store_length: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x20],RDI MOV RSI,qword ptr [RBP + -0x20] LEA RDI,[RBP + -0x11] MOV qword ptr [RBP + -0x38],RDI CALL 0x0012ce00 MOV RCX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] SUB RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001270f9 MOV RAX,qword ptr [RBP + -0x30] ADD RSP,0x40 POP RBP RET LAB_001270f9: CALL 0x001134c0
long get_store_length(int8 param_1) { long lVar1; long in_FS_OFFSET; int1 local_19 [9]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); lVar1 = mysql_net_store_length(local_19,param_1); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return lVar1 - (long)local_19; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
61,659
find_line
bluesky950520[P]quickjs/run-test262.c
char *find_line(const char *str, const char *line) { if (str) { const char *p; int len = strlen(line); for (p = str; (p = strstr(p, line)) != NULL; p += len + 1) { if ((p == str || is_line_sep(p[-1])) && is_line_sep(p[len])) return (char *)p; } } return NULL; }
O2
c
find_line: testq %rdi, %rdi je 0xf3c8 pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 movq %rsi, %rdi callq 0xe280 movslq %eax, %r15 leal 0x1(%r15), %eax movslq %eax, %r12 movl $0x2401, %ebp # imm = 0x2401 movq %r14, %rax movq %rax, %rdi movq %rbx, %rsi callq 0xea30 testq %rax, %rax je 0xf3cb cmpq %r14, %rax je 0xf3b4 movzbl -0x1(%rax), %ecx cmpl $0xd, %ecx ja 0xf3c3 btl %ecx, %ebp jae 0xf3c3 movzbl (%rax,%r15), %ecx cmpl $0xd, %ecx ja 0xf3c3 btl %ecx, %ebp jb 0xf3cd addq %r12, %rax jmp 0xf391 xorl %eax, %eax retq xorl %eax, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
find_line: test rdi, rdi jz short loc_F3C8 push rbp push r15 push r14 push r12 push rbx mov rbx, rsi mov r14, rdi mov rdi, rsi call _strlen movsxd r15, eax lea eax, [r15+1] movsxd r12, eax mov ebp, 2401h mov rax, r14 loc_F391: mov rdi, rax mov rsi, rbx call _strstr test rax, rax jz short loc_F3CB cmp rax, r14 jz short loc_F3B4 movzx ecx, byte ptr [rax-1] cmp ecx, 0Dh ja short loc_F3C3 bt ebp, ecx jnb short loc_F3C3 loc_F3B4: movzx ecx, byte ptr [rax+r15] cmp ecx, 0Dh ja short loc_F3C3 bt ebp, ecx jb short loc_F3CD loc_F3C3: add rax, r12 jmp short loc_F391 loc_F3C8: xor eax, eax retn loc_F3CB: xor eax, eax loc_F3CD: pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long find_line(long long a1, long long a2) { int v2; // eax long long v3; // r15 long long v4; // r12 int v5; // ebp long long i; // rax long long result; // rax unsigned int v8; // ecx unsigned int v9; // ecx if ( !a1 ) return 0LL; v2 = strlen(a2); v3 = v2; v4 = v2 + 1; v5 = 9217; for ( i = a1; ; i = v4 + result ) { result = strstr(i, a2); if ( !result ) break; if ( result != a1 ) { v8 = *(unsigned __int8 *)(result - 1); if ( v8 > 0xD || !_bittest(&v5, v8) ) continue; } v9 = *(unsigned __int8 *)(result + v3); if ( v9 <= 0xD ) { if ( _bittest(&v5, v9) ) return result; } } return 0LL; }
find_line: TEST RDI,RDI JZ 0x0010f3c8 PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RSI MOV R14,RDI MOV RDI,RSI CALL 0x0010e280 MOVSXD R15,EAX LEA EAX,[R15 + 0x1] MOVSXD R12,EAX MOV EBP,0x2401 MOV RAX,R14 LAB_0010f391: MOV RDI,RAX MOV RSI,RBX CALL 0x0010ea30 TEST RAX,RAX JZ 0x0010f3cb CMP RAX,R14 JZ 0x0010f3b4 MOVZX ECX,byte ptr [RAX + -0x1] CMP ECX,0xd JA 0x0010f3c3 BT EBP,ECX JNC 0x0010f3c3 LAB_0010f3b4: MOVZX ECX,byte ptr [RAX + R15*0x1] CMP ECX,0xd JA 0x0010f3c3 BT EBP,ECX JC 0x0010f3cd LAB_0010f3c3: ADD RAX,R12 JMP 0x0010f391 LAB_0010f3c8: XOR EAX,EAX RET LAB_0010f3cb: XOR EAX,EAX LAB_0010f3cd: POP RBX POP R12 POP R14 POP R15 POP RBP RET
char * find_line(char *param_1,char *param_2) { size_t sVar1; char *pcVar2; if (param_1 == (char *)0x0) { return (char *)0x0; } sVar1 = strlen(param_2); pcVar2 = param_1; while( true ) { pcVar2 = strstr(pcVar2,param_2); if (pcVar2 == (char *)0x0) { return (char *)0x0; } if ((((pcVar2 == param_1) || (((byte)pcVar2[-1] < 0xe && ((0x2401U >> ((byte)pcVar2[-1] & 0x1f) & 1) != 0)))) && ((byte)pcVar2[(int)sVar1] < 0xe)) && ((0x2401U >> ((byte)pcVar2[(int)sVar1] & 0x1f) & 1) != 0)) break; pcVar2 = pcVar2 + ((int)sVar1 + 1); } return pcVar2; }
61,660
google::protobuf::ExtensionRangeOptions::_InternalParse(char const*, google::protobuf::internal::ParseContext*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
const char* ExtensionRangeOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure while (!ctx->Done(&ptr)) { uint32_t tag; ptr = ::_pbi::ReadTag(ptr, &tag); switch (tag >> 3) { // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; case 999: if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) { ptr -= 2; do { ptr += 2; ptr = ctx->ParseMessage(_internal_add_uninterpreted_option(), ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<7994>(ptr)); } else goto handle_unusual; continue; default: goto handle_unusual; } // switch handle_unusual: if ((tag == 0) || ((tag & 7) == 4)) { CHK_(ptr); ctx->SetLastTag(tag); goto message_done; } if ((8000u <= tag)) { ptr = _impl_._extensions_.ParseField(tag, ptr, internal_default_instance(), &_internal_metadata_, ctx); CHK_(ptr != nullptr); continue; } ptr = UnknownFieldParse( tag, _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), ptr, ctx); CHK_(ptr != nullptr); } // while message_done: return ptr; failure: ptr = nullptr; goto message_done; #undef CHK_ }
O3
cpp
google::protobuf::ExtensionRangeOptions::_InternalParse(char const*, google::protobuf::internal::ParseContext*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rbx movq %rdi, %r14 movq %rsp, %rax movq %rsi, (%rax) movl 0x5c(%rdx), %edx movq %rbx, %rdi movq %rax, %rsi callq 0x7347e testb %al, %al jne 0xedd9d leaq 0x8(%r14), %r15 leaq 0x10(%r14), %r12 addq $0x28, %r14 movq %rsp, %rbp movq (%rsp), %rdi movzbl (%rdi), %edx leaq 0x1(%rdi), %rax testb %dl, %dl js 0xedccb movq %rax, (%rsp) testl %edx, %edx je 0xedd93 movl %edx, %ecx andl $0x7, %ecx cmpl $0x4, %ecx je 0xedd93 movl %edx, %r13d cmpl $0x1f40, %edx # imm = 0x1F40 jb 0xedce5 movq %r12, %rdi movq %r13, %rsi movq %rax, %rdx leaq 0x124022(%rip), %rcx # 0x211ce0 movq %r15, %r8 movq %rbx, %r9 callq 0x103f5e jmp 0xedd08 movzbl (%rax), %eax movl %eax, %ecx shll $0x7, %ecx addl %ecx, %edx addl $-0x80, %edx testb %al, %al js 0xedd16 addq $0x2, %rdi movq %rdi, %rax jmp 0xedd1d movq (%r15), %rsi testb $0x1, %sil je 0xedd7f andq $-0x4, %rsi addq $0x8, %rsi movq %r13, %rdi movq %rax, %rdx movq %rbx, %rcx callq 0xa3709 movq %rax, (%rsp) testq %rax, %rax jne 0xedd67 jmp 0xeddb0 movl %edx, %esi callq 0x7ce8e movq %rax, (%rsp) cmpl $0x1f3a, %edx # imm = 0x1F3A jne 0xedc8d addq $-0x2, %rax addq $0x2, %rax movq %rax, (%rsp) movq %r14, %rdi xorl %esi, %esi callq 0xfb2aa movq (%rsp), %rdx movq %rbx, %rdi movq %rax, %rsi callq 0x2fce4 movq %rax, (%rsp) testq %rax, %rax je 0xeddb0 cmpq %rax, (%rbx) jbe 0xedd67 cmpw $0x3eba, (%rax) # imm = 0x3EBA je 0xedd31 movl 0x5c(%rbx), %edx movq %rbx, %rdi movq %rbp, %rsi callq 0x7347e testb %al, %al je 0xedc7a jmp 0xedd9d movq %r15, %rdi callq 0x735aa movq %rax, %rsi movq (%rsp), %rax jmp 0xedcfa testq %rax, %rax je 0xeddb0 decl %edx movl %edx, 0x50(%rbx) movq (%rsp), %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq $0x0, (%rsp) jmp 0xedd9d
_ZN6google8protobuf21ExtensionRangeOptions14_InternalParseEPKcPNS0_8internal12ParseContextE: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdx mov r14, rdi mov rax, rsp mov [rax], rsi mov edx, [rdx+5Ch]; int mov rdi, rbx; this mov rsi, rax; char ** call _ZN6google8protobuf8internal18EpsCopyInputStream13DoneWithCheckEPPKci; google::protobuf::internal::EpsCopyInputStream::DoneWithCheck(char const**,int) test al, al jnz loc_EDD9D lea r15, [r14+8] lea r12, [r14+10h] add r14, 28h ; '(' mov rbp, rsp loc_EDC7A: mov rdi, [rsp+38h+var_38]; this movzx edx, byte ptr [rdi] lea rax, [rdi+1] test dl, dl js short loc_EDCCB mov [rsp+38h+var_38], rax loc_EDC8D: test edx, edx jz loc_EDD93 mov ecx, edx and ecx, 7 cmp ecx, 4 jz loc_EDD93 mov r13d, edx cmp edx, 1F40h jb short loc_EDCE5 mov rdi, r12; this mov rsi, r13; google::protobuf::internal * mov rdx, rax; google::protobuf::UnknownFieldSet * lea rcx, _ZN6google8protobuf40_ExtensionRangeOptions_default_instance_E; google::protobuf::Message * mov r8, r15; google::protobuf::internal::InternalMetadata * mov r9, rbx; google::protobuf::internal::ParseContext * call _ZN6google8protobuf8internal12ExtensionSet10ParseFieldEmPKcPKNS0_7MessageEPNS1_16InternalMetadataEPNS1_12ParseContextE; google::protobuf::internal::ExtensionSet::ParseField(ulong,char const*,google::protobuf::Message const*,google::protobuf::internal::InternalMetadata *,google::protobuf::internal::ParseContext *) jmp short loc_EDD08 loc_EDCCB: movzx eax, byte ptr [rax] mov ecx, eax shl ecx, 7 add edx, ecx add edx, 0FFFFFF80h; unsigned int test al, al js short loc_EDD16 add rdi, 2 mov rax, rdi jmp short loc_EDD1D loc_EDCE5: mov rsi, [r15] test sil, 1 jz loc_EDD7F and rsi, 0FFFFFFFFFFFFFFFCh add rsi, 8; unsigned __int64 loc_EDCFA: mov rdi, r13; this mov rdx, rax; google::protobuf::UnknownFieldSet * mov rcx, rbx; char * call _ZN6google8protobuf8internal17UnknownFieldParseEmPNS0_15UnknownFieldSetEPKcPNS1_12ParseContextE; google::protobuf::internal::UnknownFieldParse(ulong,google::protobuf::UnknownFieldSet *,char const*,google::protobuf::internal::ParseContext *) loc_EDD08: mov [rsp+38h+var_38], rax test rax, rax jnz short loc_EDD67 jmp loc_EDDB0 loc_EDD16: mov esi, edx; char * call _ZN6google8protobuf8internal15ReadTagFallbackEPKcj; google::protobuf::internal::ReadTagFallback(char const*,uint) loc_EDD1D: mov [rsp+38h+var_38], rax cmp edx, 1F3Ah jnz loc_EDC8D add rax, 0FFFFFFFFFFFFFFFEh loc_EDD31: add rax, 2 mov [rsp+38h+var_38], rax mov rdi, r14; this xor esi, esi call _ZN6google8protobuf8internal20RepeatedPtrFieldBase3AddINS0_16RepeatedPtrFieldINS0_19UninterpretedOptionEE11TypeHandlerEEEPNT_4TypeEPKS9_; google::protobuf::internal::RepeatedPtrFieldBase::Add<google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::TypeHandler>(google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::TypeHandler::Type * const*) mov rdx, [rsp+38h+var_38]; char * mov rdi, rbx; this mov rsi, rax; google::protobuf::MessageLite * call _ZN6google8protobuf8internal12ParseContext12ParseMessageEPNS0_11MessageLiteEPKc; google::protobuf::internal::ParseContext::ParseMessage(google::protobuf::MessageLite *,char const*) mov [rsp+38h+var_38], rax test rax, rax jz short loc_EDDB0 cmp [rbx], rax jbe short loc_EDD67 cmp word ptr [rax], 3EBAh jz short loc_EDD31 loc_EDD67: mov edx, [rbx+5Ch]; int mov rdi, rbx; this mov rsi, rbp; char ** call _ZN6google8protobuf8internal18EpsCopyInputStream13DoneWithCheckEPPKci; google::protobuf::internal::EpsCopyInputStream::DoneWithCheck(char const**,int) test al, al jz loc_EDC7A jmp short loc_EDD9D loc_EDD7F: mov rdi, r15 call _ZN6google8protobuf8internal16InternalMetadata27mutable_unknown_fields_slowINS0_15UnknownFieldSetEEEPT_v; google::protobuf::internal::InternalMetadata::mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>(void) mov rsi, rax mov rax, [rsp+38h+var_38] jmp loc_EDCFA loc_EDD93: test rax, rax jz short loc_EDDB0 dec edx mov [rbx+50h], edx loc_EDD9D: mov rax, [rsp+38h+var_38] add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_EDDB0: mov [rsp+38h+var_38], 0 jmp short loc_EDD9D
google::protobuf::internal * google::protobuf::ExtensionRangeOptions::_InternalParse( google::protobuf::ExtensionRangeOptions *this, google::protobuf::internal *a2, google::protobuf::internal::ParseContext *a3) { google::protobuf::internal::ParseContext *v4; // r8 long long *v5; // r15 unsigned int v6; // edx google::protobuf::internal *TagFallback; // rax google::protobuf::internal *v8; // r13 google::protobuf::internal *v9; // rax int v10; // eax unsigned long long v11; // rsi unsigned long long v12; // rax google::protobuf::MessageLite *v13; // rax google::protobuf::internal *v15[7]; // [rsp+0h] [rbp-38h] BYREF v15[0] = a2; if ( !google::protobuf::internal::EpsCopyInputStream::DoneWithCheck(a3, (const char **)v15, *((_DWORD *)a3 + 23)) ) { v5 = (long long *)((char *)this + 8); while ( 1 ) { v6 = *(unsigned __int8 *)v15[0]; TagFallback = (google::protobuf::internal *)((char *)v15[0] + 1); if ( (v6 & 0x80u) != 0 ) { v10 = *(unsigned __int8 *)TagFallback; v6 = (v10 << 7) + v6 - 128; if ( (v10 & 0x80u) != 0 ) TagFallback = (google::protobuf::internal *)google::protobuf::internal::ReadTagFallback( v15[0], (const char *)v6); else TagFallback = (google::protobuf::internal *)((char *)v15[0] + 2); v15[0] = TagFallback; if ( v6 == 7994 ) { v12 = (unsigned long long)TagFallback - 2; while ( 1 ) { v15[0] = (google::protobuf::internal *)(v12 + 2); v13 = (google::protobuf::MessageLite *)google::protobuf::internal::RepeatedPtrFieldBase::Add<google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::TypeHandler>((google::protobuf::ExtensionRangeOptions *)((char *)this + 40)); v12 = google::protobuf::internal::ParseContext::ParseMessage(a3, v13, (const char *)v15[0]); v15[0] = (google::protobuf::internal *)v12; if ( !v12 ) goto LABEL_28; if ( *(_QWORD *)a3 <= v12 || *(_WORD *)v12 != 16058 ) goto LABEL_22; } } } else { ++v15[0]; } if ( !v6 || (v6 & 7) == 4 ) break; v8 = (google::protobuf::internal *)v6; if ( v6 < 0x1F40 ) { if ( (*v5 & 1) != 0 ) { v11 = (*v5 & 0xFFFFFFFFFFFFFFFCLL) + 8; } else { v11 = google::protobuf::internal::InternalMetadata::mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>(v5); TagFallback = v15[0]; } v9 = (google::protobuf::internal *)google::protobuf::internal::UnknownFieldParse( v8, v11, TagFallback, (const char *)a3, v4); } else { v9 = (google::protobuf::internal *)google::protobuf::internal::ExtensionSet::ParseField( (google::protobuf::ExtensionRangeOptions *)((char *)this + 16), (google::protobuf::internal *)v6, TagFallback, (const google::protobuf::Message *)&google::protobuf::_ExtensionRangeOptions_default_instance_, (google::protobuf::internal::InternalMetadata *)v5, a3); } v15[0] = v9; if ( !v9 ) goto LABEL_28; LABEL_22: if ( google::protobuf::internal::EpsCopyInputStream::DoneWithCheck(a3, (const char **)v15, *((_DWORD *)a3 + 23)) ) return v15[0]; } if ( TagFallback ) { *((_DWORD *)a3 + 20) = v6 - 1; return v15[0]; } LABEL_28: v15[0] = 0LL; } return v15[0]; }
_InternalParse: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RDI MOV RAX,RSP MOV qword ptr [RAX],RSI MOV EDX,dword ptr [RDX + 0x5c] MOV RDI,RBX MOV RSI,RAX CALL 0x0017347e TEST AL,AL JNZ 0x001edd9d LEA R15,[R14 + 0x8] LEA R12,[R14 + 0x10] ADD R14,0x28 MOV RBP,RSP LAB_001edc7a: MOV RDI,qword ptr [RSP] MOVZX EDX,byte ptr [RDI] LEA RAX,[RDI + 0x1] TEST DL,DL JS 0x001edccb MOV qword ptr [RSP],RAX LAB_001edc8d: TEST EDX,EDX JZ 0x001edd93 MOV ECX,EDX AND ECX,0x7 CMP ECX,0x4 JZ 0x001edd93 MOV R13D,EDX CMP EDX,0x1f40 JC 0x001edce5 MOV RDI,R12 MOV RSI,R13 MOV RDX,RAX LEA RCX,[0x311ce0] MOV R8,R15 MOV R9,RBX CALL 0x00203f5e JMP 0x001edd08 LAB_001edccb: MOVZX EAX,byte ptr [RAX] MOV ECX,EAX SHL ECX,0x7 ADD EDX,ECX ADD EDX,-0x80 TEST AL,AL JS 0x001edd16 ADD RDI,0x2 MOV RAX,RDI JMP 0x001edd1d LAB_001edce5: MOV RSI,qword ptr [R15] TEST SIL,0x1 JZ 0x001edd7f AND RSI,-0x4 ADD RSI,0x8 LAB_001edcfa: MOV RDI,R13 MOV RDX,RAX MOV RCX,RBX CALL 0x001a3709 LAB_001edd08: MOV qword ptr [RSP],RAX TEST RAX,RAX JNZ 0x001edd67 JMP 0x001eddb0 LAB_001edd16: MOV ESI,EDX CALL 0x0017ce8e LAB_001edd1d: MOV qword ptr [RSP],RAX CMP EDX,0x1f3a JNZ 0x001edc8d ADD RAX,-0x2 LAB_001edd31: ADD RAX,0x2 MOV qword ptr [RSP],RAX MOV RDI,R14 XOR ESI,ESI CALL 0x001fb2aa MOV RDX,qword ptr [RSP] MOV RDI,RBX MOV RSI,RAX CALL 0x0012fce4 MOV qword ptr [RSP],RAX TEST RAX,RAX JZ 0x001eddb0 CMP qword ptr [RBX],RAX JBE 0x001edd67 CMP word ptr [RAX],0x3eba JZ 0x001edd31 LAB_001edd67: MOV EDX,dword ptr [RBX + 0x5c] MOV RDI,RBX MOV RSI,RBP CALL 0x0017347e TEST AL,AL JZ 0x001edc7a JMP 0x001edd9d LAB_001edd7f: MOV RDI,R15 CALL 0x001735aa MOV RSI,RAX MOV RAX,qword ptr [RSP] JMP 0x001edcfa LAB_001edd93: TEST RAX,RAX JZ 0x001eddb0 DEC EDX MOV dword ptr [RBX + 0x50],EDX LAB_001edd9d: MOV RAX,qword ptr [RSP] ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001eddb0: MOV qword ptr [RSP],0x0 JMP 0x001edd9d
/* google::protobuf::ExtensionRangeOptions::_InternalParse(char const*, google::protobuf::internal::ParseContext*) */ byte * __thiscall google::protobuf::ExtensionRangeOptions::_InternalParse (ExtensionRangeOptions *this,char *param_1,ParseContext *param_2) { InternalMetadata *this_00; byte bVar1; byte bVar2; char cVar3; uint uVar5; Type *pTVar4; UnknownFieldSet *pUVar6; int1 auVar7 [12]; byte *local_38; local_38 = (byte *)param_1; cVar3 = internal::EpsCopyInputStream::DoneWithCheck ((EpsCopyInputStream *)param_2,(char **)&local_38,*(int *)(param_2 + 0x5c)); if (cVar3 == '\0') { this_00 = (InternalMetadata *)(this + 8); do { bVar1 = *local_38; auVar7[8] = bVar1; auVar7._0_8_ = local_38 + 1; auVar7._9_3_ = 0; if ((char)bVar1 < '\0') { bVar2 = local_38[1]; uVar5 = ((uint)bVar1 + (uint)bVar2 * 0x80) - 0x80; if ((char)bVar2 < '\0') { auVar7 = internal::ReadTagFallback((char *)local_38,uVar5); } else { auVar7._8_4_ = uVar5; auVar7._0_8_ = local_38 + 2; } if (auVar7._8_4_ != 0x1f3a) goto LAB_001edc8d; local_38 = (byte *)(auVar7._0_8_ + -2); do { local_38 = local_38 + 2; pTVar4 = internal::RepeatedPtrFieldBase:: Add<google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::TypeHandler> ((Type *)(this + 0x28)); local_38 = (byte *)internal::ParseContext::ParseMessage (param_2,(MessageLite *)pTVar4,(char *)local_38); if (local_38 == (byte *)0x0) { return (byte *)0x0; } } while ((local_38 < *(byte **)param_2) && (*(short *)local_38 == 0x3eba)); } else { LAB_001edc8d: uVar5 = auVar7._8_4_; local_38 = auVar7._0_8_; if ((uVar5 == 0) || ((uVar5 & 7) == 4)) { if (local_38 == (byte *)0x0) { return (byte *)0x0; } *(uint *)(param_2 + 0x50) = uVar5 - 1; return local_38; } if (uVar5 < 8000) { if ((*(ulong *)this_00 & 1) == 0) { pUVar6 = internal::InternalMetadata:: mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>(this_00); } else { pUVar6 = (UnknownFieldSet *)((*(ulong *)this_00 & 0xfffffffffffffffc) + 8); } local_38 = (byte *)internal::UnknownFieldParse ((ulong)uVar5,pUVar6,(char *)local_38,param_2); } else { local_38 = (byte *)internal::ExtensionSet::ParseField ((ExtensionSet *)(this + 0x10),(ulong)uVar5,(char *)local_38, (Message *)_ExtensionRangeOptions_default_instance_,this_00, param_2); } if (local_38 == (byte *)0x0) { return (byte *)0x0; } } cVar3 = internal::EpsCopyInputStream::DoneWithCheck ((EpsCopyInputStream *)param_2,(char **)&local_38,*(int *)(param_2 + 0x5c)); } while (cVar3 == '\0'); } return local_38; }
61,661
dequantize_row_q4_1
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c
void dequantize_row_q4_1(const block_q4_1 * restrict x, float * restrict y, int64_t k) { static const int qk = QK4_1; assert(k % qk == 0); const int nb = k / qk; for (int i = 0; i < nb; i++) { const float d = GGML_FP16_TO_FP32(x[i].d); const float m = GGML_FP16_TO_FP32(x[i].m); for (int j = 0; j < qk/2; ++j) { const int x0 = (x[i].qs[j] & 0x0F); const int x1 = (x[i].qs[j] >> 4); y[i*qk + j + 0 ] = x0*d + m; y[i*qk + j + qk/2] = x1*d + m; } } }
O0
c
dequantize_row_q4_1: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x18(%rbp), %rax movl $0x20, %ecx cqto idivq %rcx cmpq $0x0, %rdx jne 0x6e73a jmp 0x6e759 leaq 0x5260f(%rip), %rdi # 0xc0d50 leaq 0x52614(%rip), %rsi # 0xc0d5c movl $0x116, %edx # imm = 0x116 leaq 0x528b4(%rip), %rcx # 0xc1008 callq 0x44810 movq -0x18(%rbp), %rax movl $0x20, %ecx cqto idivq %rcx movl %eax, -0x1c(%rbp) movl $0x0, -0x20(%rbp) movl -0x20(%rbp), %eax cmpl -0x1c(%rbp), %eax jge 0x6e87f movq -0x8(%rbp), %rax movslq -0x20(%rbp), %rcx imulq $0x14, %rcx, %rcx addq %rcx, %rax movzwl (%rax), %edi callq 0x6e6e0 movss %xmm0, -0x24(%rbp) movq -0x8(%rbp), %rax movslq -0x20(%rbp), %rcx imulq $0x14, %rcx, %rcx addq %rcx, %rax movzwl 0x2(%rax), %edi callq 0x6e6e0 movss %xmm0, -0x28(%rbp) movl $0x0, -0x2c(%rbp) cmpl $0x10, -0x2c(%rbp) jge 0x6e86f movq -0x8(%rbp), %rax movslq -0x20(%rbp), %rcx imulq $0x14, %rcx, %rcx addq %rcx, %rax movslq -0x2c(%rbp), %rcx movzbl 0x4(%rax,%rcx), %eax andl $0xf, %eax movl %eax, -0x30(%rbp) movq -0x8(%rbp), %rax movslq -0x20(%rbp), %rcx imulq $0x14, %rcx, %rcx addq %rcx, %rax movslq -0x2c(%rbp), %rcx movzbl 0x4(%rax,%rcx), %eax sarl $0x4, %eax movl %eax, -0x34(%rbp) cvtsi2ssl -0x30(%rbp), %xmm0 movss -0x24(%rbp), %xmm2 movss -0x28(%rbp), %xmm1 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 movq -0x10(%rbp), %rax movl -0x20(%rbp), %ecx shll $0x5, %ecx addl -0x2c(%rbp), %ecx addl $0x0, %ecx movslq %ecx, %rcx movss %xmm0, (%rax,%rcx,4) cvtsi2ssl -0x34(%rbp), %xmm0 movss -0x24(%rbp), %xmm2 movss -0x28(%rbp), %xmm1 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 movq -0x10(%rbp), %rax movl -0x20(%rbp), %ecx shll $0x5, %ecx addl -0x2c(%rbp), %ecx addl $0x10, %ecx movslq %ecx, %rcx movss %xmm0, (%rax,%rcx,4) movl -0x2c(%rbp), %eax addl $0x1, %eax movl %eax, -0x2c(%rbp) jmp 0x6e7bd jmp 0x6e871 movl -0x20(%rbp), %eax addl $0x1, %eax movl %eax, -0x20(%rbp) jmp 0x6e771 addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
dequantize_row_q4_1: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_18] mov ecx, 20h ; ' ' cqo idiv rcx cmp rdx, 0 jnz short loc_6E73A jmp short loc_6E759 loc_6E73A: lea rdi, aKQk0; "k % qk == 0" lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"... mov edx, 116h lea rcx, aVoidDequantize_0; "void dequantize_row_q4_1(const block_q4"... call ___assert_fail loc_6E759: mov rax, [rbp+var_18] mov ecx, 20h ; ' ' cqo idiv rcx mov [rbp+var_1C], eax mov [rbp+var_20], 0 loc_6E771: mov eax, [rbp+var_20] cmp eax, [rbp+var_1C] jge loc_6E87F mov rax, [rbp+var_8] movsxd rcx, [rbp+var_20] imul rcx, 14h add rax, rcx movzx edi, word ptr [rax] call ggml_lookup_fp16_to_fp32_0 movss [rbp+var_24], xmm0 mov rax, [rbp+var_8] movsxd rcx, [rbp+var_20] imul rcx, 14h add rax, rcx movzx edi, word ptr [rax+2] call ggml_lookup_fp16_to_fp32_0 movss [rbp+var_28], xmm0 mov [rbp+var_2C], 0 loc_6E7BD: cmp [rbp+var_2C], 10h jge loc_6E86F mov rax, [rbp+var_8] movsxd rcx, [rbp+var_20] imul rcx, 14h add rax, rcx movsxd rcx, [rbp+var_2C] movzx eax, byte ptr [rax+rcx+4] and eax, 0Fh mov [rbp+var_30], eax mov rax, [rbp+var_8] movsxd rcx, [rbp+var_20] imul rcx, 14h add rax, rcx movsxd rcx, [rbp+var_2C] movzx eax, byte ptr [rax+rcx+4] sar eax, 4 mov [rbp+var_34], eax cvtsi2ss xmm0, [rbp+var_30] movss xmm2, [rbp+var_24] movss xmm1, [rbp+var_28] mulss xmm0, xmm2 addss xmm0, xmm1 mov rax, [rbp+var_10] mov ecx, [rbp+var_20] shl ecx, 5 add ecx, [rbp+var_2C] add ecx, 0 movsxd rcx, ecx movss dword ptr [rax+rcx*4], xmm0 cvtsi2ss xmm0, [rbp+var_34] movss xmm2, [rbp+var_24] movss xmm1, [rbp+var_28] mulss xmm0, xmm2 addss xmm0, xmm1 mov rax, [rbp+var_10] mov ecx, [rbp+var_20] shl ecx, 5 add ecx, [rbp+var_2C] add ecx, 10h movsxd rcx, ecx movss dword ptr [rax+rcx*4], xmm0 mov eax, [rbp+var_2C] add eax, 1 mov [rbp+var_2C], eax jmp loc_6E7BD loc_6E86F: jmp short $+2 loc_6E871: mov eax, [rbp+var_20] add eax, 1 mov [rbp+var_20], eax jmp loc_6E771 loc_6E87F: add rsp, 40h pop rbp retn
long long dequantize_row_q4_1(long long a1, long long a2, long long a3) { long long result; // rax int v4; // [rsp+Ch] [rbp-34h] int j; // [rsp+14h] [rbp-2Ch] float v6; // [rsp+18h] [rbp-28h] float v7; // [rsp+1Ch] [rbp-24h] int i; // [rsp+20h] [rbp-20h] if ( a3 % 32 ) __assert_fail( "k % qk == 0", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c", 278LL, "void dequantize_row_q4_1(const block_q4_1 *restrict, float *restrict, int64_t)"); for ( i = 0; ; ++i ) { result = (unsigned int)i; if ( i >= (int)(a3 / 32) ) break; v7 = ggml_lookup_fp16_to_fp32_0(*(_WORD *)(20LL * i + a1)); v6 = ggml_lookup_fp16_to_fp32_0(*(_WORD *)(20LL * i + a1 + 2)); for ( j = 0; j < 16; ++j ) { v4 = (int)*(unsigned __int8 *)(20LL * i + a1 + j + 4) >> 4; *(float *)(a2 + 4LL * (j + 32 * i)) = (float)((float)(*(_BYTE *)(20LL * i + a1 + j + 4) & 0xF) * v7) + v6; *(float *)(a2 + 4LL * (j + 32 * i + 16)) = (float)((float)v4 * v7) + v6; } } return result; }
dequantize_row_q4_1: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,0x20 CQO IDIV RCX CMP RDX,0x0 JNZ 0x0016e73a JMP 0x0016e759 LAB_0016e73a: LEA RDI,[0x1c0d50] LEA RSI,[0x1c0d5c] MOV EDX,0x116 LEA RCX,[0x1c1008] CALL 0x00144810 LAB_0016e759: MOV RAX,qword ptr [RBP + -0x18] MOV ECX,0x20 CQO IDIV RCX MOV dword ptr [RBP + -0x1c],EAX MOV dword ptr [RBP + -0x20],0x0 LAB_0016e771: MOV EAX,dword ptr [RBP + -0x20] CMP EAX,dword ptr [RBP + -0x1c] JGE 0x0016e87f MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x20] IMUL RCX,RCX,0x14 ADD RAX,RCX MOVZX EDI,word ptr [RAX] CALL 0x0016e6e0 MOVSS dword ptr [RBP + -0x24],XMM0 MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x20] IMUL RCX,RCX,0x14 ADD RAX,RCX MOVZX EDI,word ptr [RAX + 0x2] CALL 0x0016e6e0 MOVSS dword ptr [RBP + -0x28],XMM0 MOV dword ptr [RBP + -0x2c],0x0 LAB_0016e7bd: CMP dword ptr [RBP + -0x2c],0x10 JGE 0x0016e86f MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x20] IMUL RCX,RCX,0x14 ADD RAX,RCX MOVSXD RCX,dword ptr [RBP + -0x2c] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x4] AND EAX,0xf MOV dword ptr [RBP + -0x30],EAX MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x20] IMUL RCX,RCX,0x14 ADD RAX,RCX MOVSXD RCX,dword ptr [RBP + -0x2c] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x4] SAR EAX,0x4 MOV dword ptr [RBP + -0x34],EAX CVTSI2SS XMM0,dword ptr [RBP + -0x30] MOVSS XMM2,dword ptr [RBP + -0x24] MOVSS XMM1,dword ptr [RBP + -0x28] MULSS XMM0,XMM2 ADDSS XMM0,XMM1 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x20] SHL ECX,0x5 ADD ECX,dword ptr [RBP + -0x2c] ADD ECX,0x0 MOVSXD RCX,ECX MOVSS dword ptr [RAX + RCX*0x4],XMM0 CVTSI2SS XMM0,dword ptr [RBP + -0x34] MOVSS XMM2,dword ptr [RBP + -0x24] MOVSS XMM1,dword ptr [RBP + -0x28] MULSS XMM0,XMM2 ADDSS XMM0,XMM1 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x20] SHL ECX,0x5 ADD ECX,dword ptr [RBP + -0x2c] ADD ECX,0x10 MOVSXD RCX,ECX MOVSS dword ptr [RAX + RCX*0x4],XMM0 MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x0016e7bd LAB_0016e86f: JMP 0x0016e871 LAB_0016e871: MOV EAX,dword ptr [RBP + -0x20] ADD EAX,0x1 MOV dword ptr [RBP + -0x20],EAX JMP 0x0016e771 LAB_0016e87f: ADD RSP,0x40 POP RBP RET
void dequantize_row_q4_1(long param_1,long param_2,long param_3) { byte bVar1; float fVar2; float fVar3; int local_34; int local_28; if (param_3 % 0x20 == 0) { for (local_28 = 0; local_28 < (int)(param_3 / 0x20); local_28 = local_28 + 1) { fVar2 = (float)ggml_lookup_fp16_to_fp32(*(int2 *)(param_1 + (long)local_28 * 0x14)); fVar3 = (float)ggml_lookup_fp16_to_fp32(*(int2 *)(param_1 + (long)local_28 * 0x14 + 2)); for (local_34 = 0; local_34 < 0x10; local_34 = local_34 + 1) { bVar1 = *(byte *)(param_1 + (long)local_28 * 0x14 + 4 + (long)local_34); *(float *)(param_2 + (long)(local_28 * 0x20 + local_34) * 4) = (float)(*(byte *)(param_1 + (long)local_28 * 0x14 + 4 + (long)local_34) & 0xf) * fVar2 + fVar3; *(float *)(param_2 + (long)(local_28 * 0x20 + local_34 + 0x10) * 4) = (float)((int)(uint)bVar1 >> 4) * fVar2 + fVar3; } } return; } /* WARNING: Subroutine does not return */ __assert_fail("k % qk == 0", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c" ,0x116, "void dequantize_row_q4_1(const block_q4_1 *restrict, float *restrict, int64_t)"); }
61,662
decode_pos
eloqsql/storage/myisam/mi_packrec.c
static uint decode_pos(MI_BIT_BUFF *bit_buff, MI_DECODE_TREE *decode_tree) { uint16 *pos=decode_tree->table; for (;;) { if (get_bit(bit_buff)) pos++; if (*pos & IS_CHAR) return (uint) (*pos & ~IS_CHAR); pos+= *pos; } }
O0
c
decode_pos: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax cmpl $0x0, 0x4(%rax) je 0xc2e3a movq -0x8(%rbp), %rax movl (%rax), %eax movq -0x8(%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 0xc2e5e jmp 0xc2e6a movq -0x8(%rbp), %rdi callq 0xc12f0 movq -0x8(%rbp), %rax movl $0x1f, 0x4(%rax) movq -0x8(%rbp), %rax movl (%rax), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax je 0xc2e6a movq -0x18(%rbp), %rax addq $0x2, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movzwl (%rax), %eax andl $0x8000, %eax # imm = 0x8000 cmpl $0x0, %eax je 0xc2e8d movq -0x18(%rbp), %rax movzwl (%rax), %eax andl $0xffff7fff, %eax # imm = 0xFFFF7FFF addq $0x20, %rsp popq %rbp retq movq -0x18(%rbp), %rax movzwl (%rax), %ecx movq -0x18(%rbp), %rax movslq %ecx, %rcx shlq %rcx addq %rcx, %rax movq %rax, -0x18(%rbp) jmp 0xc2e0b nopw (%rax,%rax)
decode_pos_0: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_18], rax loc_C2E0B: mov rax, [rbp+var_8] cmp dword ptr [rax+4], 0 jz short loc_C2E3A mov rax, [rbp+var_8] mov eax, [rax] mov rdx, [rbp+var_8] 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_C2E5E jmp short loc_C2E6A loc_C2E3A: mov rdi, [rbp+var_8] call fill_buffer_0 mov rax, [rbp+var_8] mov dword ptr [rax+4], 1Fh mov rax, [rbp+var_8] mov eax, [rax] and eax, 80000000h cmp eax, 0 jz short loc_C2E6A loc_C2E5E: mov rax, [rbp+var_18] add rax, 2 mov [rbp+var_18], rax loc_C2E6A: mov rax, [rbp+var_18] movzx eax, word ptr [rax] and eax, 8000h cmp eax, 0 jz short loc_C2E8D mov rax, [rbp+var_18] movzx eax, word ptr [rax] and eax, 0FFFF7FFFh add rsp, 20h pop rbp retn loc_C2E8D: mov rax, [rbp+var_18] movzx ecx, word ptr [rax] mov rax, [rbp+var_18] movsxd rcx, ecx shl rcx, 1 add rax, rcx mov [rbp+var_18], rax jmp loc_C2E0B
long long decode_pos_0(int *a1, _WORD **a2) { int v2; // eax int v3; // ecx _WORD *i; // [rsp+8h] [rbp-18h] for ( i = *a2; ; i += (unsigned __int16)*i ) { if ( !a1[1] ) { fill_buffer_0((long long)a1); a1[1] = 31; if ( *a1 >= 0 ) goto LABEL_7; LABEL_6: ++i; goto LABEL_7; } v2 = *a1; v3 = a1[1] - 1; a1[1] = v3; if ( ((1 << v3) & v2) != 0 ) goto LABEL_6; LABEL_7: if ( (*i & 0x8000) != 0 ) break; } return *i & 0x7FFF; }
decode_pos: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX LAB_001c2e0b: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x4],0x0 JZ 0x001c2e3a MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x8] 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 0x001c2e5e JMP 0x001c2e6a LAB_001c2e3a: MOV RDI,qword ptr [RBP + -0x8] CALL 0x001c12f0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x4],0x1f MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX] AND EAX,0x80000000 CMP EAX,0x0 JZ 0x001c2e6a LAB_001c2e5e: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x2 MOV qword ptr [RBP + -0x18],RAX LAB_001c2e6a: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX] AND EAX,0x8000 CMP EAX,0x0 JZ 0x001c2e8d MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX] AND EAX,0xffff7fff ADD RSP,0x20 POP RBP RET LAB_001c2e8d: MOV RAX,qword ptr [RBP + -0x18] MOVZX ECX,word ptr [RAX] MOV RAX,qword ptr [RBP + -0x18] MOVSXD RCX,ECX SHL RCX,0x1 ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX JMP 0x001c2e0b
ushort decode_pos(uint *param_1,int8 *param_2) { uint uVar1; ushort *local_20; local_20 = (ushort *)*param_2; while( true ) { if (param_1[1] == 0) { fill_buffer(param_1); param_1[1] = 0x1f; uVar1 = *param_1 & 0x80000000; } else { uVar1 = param_1[1]; param_1[1] = uVar1 - 1; uVar1 = *param_1 & 1 << ((byte)(uVar1 - 1) & 0x1f); } if (uVar1 != 0) { local_20 = local_20 + 1; } if ((*local_20 & 0x8000) != 0) break; local_20 = local_20 + (int)(uint)*local_20; } return *local_20 & 0x7fff; }
61,663
minja::ArgumentsValue::expectArgs(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::pair<unsigned long, unsigned long> const&, std::pair<unsigned long, unsigned long> const&)
llama.cpp/common/minja/minja.hpp
void expectArgs(const std::string & method_name, const std::pair<size_t, size_t> & pos_count, const std::pair<size_t, size_t> & kw_count) { if (args.size() < pos_count.first || args.size() > pos_count.second || kwargs.size() < kw_count.first || kwargs.size() > kw_count.second) { std::ostringstream out; out << method_name << " must have between " << pos_count.first << " and " << pos_count.second << " positional arguments and between " << kw_count.first << " and " << kw_count.second << " keyword arguments"; throw std::runtime_error(out.str()); } }
O3
cpp
minja::ArgumentsValue::expectArgs(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::pair<unsigned long, unsigned long> const&, std::pair<unsigned long, unsigned long> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x1a0, %rsp # imm = 0x1A0 movq %rcx, %rbx movq %rdx, %r14 movq %rsi, %r15 movq 0x8(%rdi), %rcx subq (%rdi), %rcx sarq $0x4, %rcx movabsq $-0x3333333333333333, %rax # imm = 0xCCCCCCCCCCCCCCCD imulq %rcx, %rax cmpq (%rdx), %rax jb 0xcd99f cmpq 0x8(%r14), %rax ja 0xcd99f movq 0x20(%rdi), %rcx subq 0x18(%rdi), %rcx sarq $0x4, %rcx movabsq $0x6db6db6db6db6db7, %rax # imm = 0x6DB6DB6DB6DB6DB7 imulq %rcx, %rax cmpq (%rbx), %rax jb 0xcd99f cmpq 0x8(%rbx), %rax ja 0xcd99f addq $0x1a0, %rsp # imm = 0x1A0 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x28(%rsp), %r12 movq %r12, %rdi callq 0x22070 movq (%r15), %rsi movq 0x8(%r15), %rdx movq %r12, %rdi callq 0x220d0 movq %rax, %r15 leaq 0x5c469(%rip), %rsi # 0x129e2e movl $0x13, %edx movq %rax, %rdi callq 0x220d0 movq (%r14), %rsi movq %r15, %rdi callq 0x218a0 movq %rax, %r15 leaq 0x5c45b(%rip), %rsi # 0x129e42 movl $0x5, %edx movq %rax, %rdi callq 0x220d0 movq 0x8(%r14), %rsi movq %r15, %rdi callq 0x218a0 movq %rax, %r14 leaq 0x5c43e(%rip), %rsi # 0x129e48 movl $0x22, %edx movq %rax, %rdi callq 0x220d0 movq (%rbx), %rsi movq %r14, %rdi callq 0x218a0 movq %rax, %r14 leaq 0x5c416(%rip), %rsi # 0x129e42 movl $0x5, %edx movq %rax, %rdi callq 0x220d0 movq 0x8(%rbx), %rsi movq %r14, %rdi callq 0x218a0 leaq 0x5c41f(%rip), %rsi # 0x129e6b movl $0x12, %edx movq %rax, %rdi callq 0x220d0 movl $0x10, %edi callq 0x21660 movq %rax, %rbx leaq 0x30(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x21670 movb $0x1, %bpl leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x21480 xorl %ebp, %ebp movq 0xa0532(%rip), %rsi # 0x16dfc0 movq 0xa04eb(%rip), %rdx # 0x16df80 movq %rbx, %rdi callq 0x21a80 movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xcdabb movq 0x18(%rsp), %rsi incq %rsi callq 0x21180 testb %bpl, %bpl jne 0xcdac5 jmp 0xcdad2 movq %rax, %r14 movq %rbx, %rdi callq 0x21f50 jmp 0xcdad2 movq %rax, %r14 movq 0xa047f(%rip), %rsi # 0x16df58 leaq 0x28(%rsp), %rdi callq 0x21cb0 leaq 0x98(%rsp), %rdi callq 0x21c80 movq %r14, %rdi callq 0x21b20
_ZN5minja14ArgumentsValue10expectArgsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt4pairImmESC_: push rbp push r15 push r14 push r12 push rbx sub rsp, 1A0h mov rbx, rcx mov r14, rdx mov r15, rsi mov rcx, [rdi+8] sub rcx, [rdi] sar rcx, 4 mov rax, 0CCCCCCCCCCCCCCCDh imul rax, rcx cmp rax, [rdx] jb short loc_CD99F cmp rax, [r14+8] ja short loc_CD99F mov rcx, [rdi+20h] sub rcx, [rdi+18h] sar rcx, 4 mov rax, 6DB6DB6DB6DB6DB7h imul rax, rcx cmp rax, [rbx] jb short loc_CD99F cmp rax, [rbx+8] ja short loc_CD99F add rsp, 1A0h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_CD99F: lea r12, [rsp+1C8h+var_1A0] mov rdi, r12 call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) mov rsi, [r15] mov rdx, [r15+8] mov rdi, r12 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov r15, rax lea rsi, aMustHaveBetwee; " must have between " mov edx, 13h mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rsi, [r14] mov rdi, r15 call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong) mov r15, rax lea rsi, aAnd; " and " mov edx, 5 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rsi, [r14+8] mov rdi, r15 call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong) mov r14, rax lea rsi, aPositionalArgu; " positional arguments and between " mov edx, 22h ; '"' mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rsi, [rbx] mov rdi, r14 call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong) mov r14, rax lea rsi, aAnd; " and " mov edx, 5 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rsi, [rbx+8] mov rdi, r14 call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong) lea rsi, aKeywordArgumen; " keyword arguments" mov edx, 12h mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, [rsp+1C8h+var_198] lea rdi, [rsp+1C8h+var_1C0] call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov bpl, 1 lea rsi, [rsp+1C8h+var_1C0] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+1C8h+var_1B0] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_CDABB mov rsi, [rsp+1C8h+var_1B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_CDABB: test bpl, bpl jnz short loc_CDAC5 jmp short loc_CDAD2 mov r14, rax loc_CDAC5: mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_CDAD2 mov r14, rax loc_CDAD2: mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+1C8h+var_1A0] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+1C8h+var_130]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, r14 call __Unwind_Resume
unsigned long long minja::ArgumentsValue::expectArgs( _QWORD *a1, _QWORD *a2, unsigned long long *a3, unsigned long long *a4) { unsigned long long v6; // rax unsigned long long result; // rax long long v8; // r15 long long v9; // r15 long long v10; // r14 long long v11; // r14 long long v12; // rax void *exception; // rbx _BYTE v14[16]; // [rsp+8h] [rbp-1C0h] BYREF _BYTE v15[8]; // [rsp+28h] [rbp-1A0h] BYREF _BYTE v16[104]; // [rsp+30h] [rbp-198h] BYREF v6 = 0xCCCCCCCCCCCCCCCDLL * ((long long)(a1[1] - *a1) >> 4); if ( v6 < *a3 || v6 > a3[1] || (result = 0x6DB6DB6DB6DB6DB7LL * ((long long)(a1[4] - a1[3]) >> 4), result < *a4) || result > a4[1] ) { std::ostringstream::basic_ostringstream(v15); v8 = std::__ostream_insert<char,std::char_traits<char>>(v15, *a2, a2[1]); std::__ostream_insert<char,std::char_traits<char>>(v8, " must have between ", 19LL); v9 = std::ostream::_M_insert<unsigned long>(v8, *a3); std::__ostream_insert<char,std::char_traits<char>>(v9, " and ", 5LL); v10 = std::ostream::_M_insert<unsigned long>(v9, a3[1]); std::__ostream_insert<char,std::char_traits<char>>(v10, " positional arguments and between ", 34LL); v11 = std::ostream::_M_insert<unsigned long>(v10, *a4); std::__ostream_insert<char,std::char_traits<char>>(v11, " and ", 5LL); v12 = std::ostream::_M_insert<unsigned long>(v11, a4[1]); std::__ostream_insert<char,std::char_traits<char>>(v12, " keyword arguments", 18LL); exception = __cxa_allocate_exception(0x10uLL); std::stringbuf::str(v14, v16); std::runtime_error::runtime_error(exception, v14); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return result; }
expectArgs: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x1a0 MOV RBX,RCX MOV R14,RDX MOV R15,RSI MOV RCX,qword ptr [RDI + 0x8] SUB RCX,qword ptr [RDI] SAR RCX,0x4 MOV RAX,-0x3333333333333333 IMUL RAX,RCX CMP RAX,qword ptr [RDX] JC 0x001cd99f CMP RAX,qword ptr [R14 + 0x8] JA 0x001cd99f MOV RCX,qword ptr [RDI + 0x20] SUB RCX,qword ptr [RDI + 0x18] SAR RCX,0x4 MOV RAX,0x6db6db6db6db6db7 IMUL RAX,RCX CMP RAX,qword ptr [RBX] JC 0x001cd99f CMP RAX,qword ptr [RBX + 0x8] JA 0x001cd99f ADD RSP,0x1a0 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001cd99f: LEA R12,[RSP + 0x28] MOV RDI,R12 CALL 0x00122070 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] LAB_001cd9b3: MOV RDI,R12 CALL 0x001220d0 MOV R15,RAX LEA RSI,[0x229e2e] MOV EDX,0x13 MOV RDI,RAX CALL 0x001220d0 MOV RSI,qword ptr [R14] MOV RDI,R15 CALL 0x001218a0 MOV R15,RAX LEA RSI,[0x229e42] MOV EDX,0x5 MOV RDI,RAX CALL 0x001220d0 MOV RSI,qword ptr [R14 + 0x8] MOV RDI,R15 CALL 0x001218a0 MOV R14,RAX LEA RSI,[0x229e48] MOV EDX,0x22 MOV RDI,RAX CALL 0x001220d0 MOV RSI,qword ptr [RBX] MOV RDI,R14 CALL 0x001218a0 MOV R14,RAX LEA RSI,[0x229e42] MOV EDX,0x5 MOV RDI,RAX CALL 0x001220d0 MOV RSI,qword ptr [RBX + 0x8] MOV RDI,R14 CALL 0x001218a0 LEA RSI,[0x229e6b] MOV EDX,0x12 MOV RDI,RAX CALL 0x001220d0 LAB_001cda59: MOV EDI,0x10 CALL 0x00121660 MOV RBX,RAX LEA RSI,[RSP + 0x30] LAB_001cda6b: LEA RDI,[RSP + 0x8] CALL 0x00121670 MOV BPL,0x1 LAB_001cda78: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x00121480 XOR EBP,EBP MOV RSI,qword ptr [0x0026dfc0] MOV RDX,qword ptr [0x0026df80] MOV RDI,RBX CALL 0x00121a80
/* minja::ArgumentsValue::expectArgs(std::__cxx11::string const&, std::pair<unsigned long, unsigned long> const&, std::pair<unsigned long, unsigned long> const&) */ void __thiscall minja::ArgumentsValue::expectArgs(ArgumentsValue *this,string *param_1,pair *param_2,pair *param_3) { ulong uVar1; ostream *poVar2; runtime_error *this_00; string local_1c0 [32]; ostringstream local_1a0 [376]; uVar1 = (*(long *)(this + 8) - *(long *)this >> 4) * -0x3333333333333333; if ((((*(ulong *)param_2 <= uVar1) && (uVar1 < *(ulong *)(param_2 + 8) || uVar1 - *(ulong *)(param_2 + 8) == 0)) && (uVar1 = (*(long *)(this + 0x20) - *(long *)(this + 0x18) >> 4) * 0x6db6db6db6db6db7, *(ulong *)param_3 <= uVar1)) && (uVar1 < *(ulong *)(param_3 + 8) || uVar1 - *(ulong *)(param_3 + 8) == 0)) { return; } std::__cxx11::ostringstream::ostringstream(local_1a0); /* try { // try from 001cd9b3 to 001cda58 has its CatchHandler @ 001cdacf */ poVar2 = std::__ostream_insert<char,std::char_traits<char>> ((ostream *)local_1a0,*(char **)param_1,*(long *)(param_1 + 8)); std::__ostream_insert<char,std::char_traits<char>>(poVar2," must have between ",0x13); poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2); std::__ostream_insert<char,std::char_traits<char>>(poVar2," and ",5); poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2); std::__ostream_insert<char,std::char_traits<char>> (poVar2," positional arguments and between ",0x22); poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2); std::__ostream_insert<char,std::char_traits<char>>(poVar2," and ",5); poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2); std::__ostream_insert<char,std::char_traits<char>>(poVar2," keyword arguments",0x12); this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001cda6b to 001cda74 has its CatchHandler @ 001cdac2 */ std::__cxx11::stringbuf::str(); /* try { // try from 001cda78 to 001cda9c has its CatchHandler @ 001cda9d */ std::runtime_error::runtime_error(this_00,local_1c0); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_0026dfc0,PTR__runtime_error_0026df80); }
61,664
pagecache_collect_changed_blocks_with_lsn
eloqsql/storage/maria/ma_pagecache.c
my_bool pagecache_collect_changed_blocks_with_lsn(PAGECACHE *pagecache, LEX_STRING *str, LSN *min_rec_lsn) { my_bool error= 0; size_t stored_list_size= 0; uint file_hash; char *ptr; LSN minimum_rec_lsn= LSN_MAX; DBUG_ENTER("pagecache_collect_changed_blocks_with_LSN"); DBUG_ASSERT(NULL == str->str); /* We lock the entire cache but will be quick, just reading/writing a few MBs of memory at most. */ pagecache_pthread_mutex_lock(&pagecache->cache_lock); for (;;) { struct st_file_in_flush *other_flusher; for (file_hash= 0; (other_flusher= (struct st_file_in_flush *) my_hash_element(&pagecache->files_in_flush, file_hash)) != NULL && !other_flusher->first_in_switch; file_hash++) {} if (other_flusher == NULL) break; /* other_flusher.first_in_switch is true: some thread is flushing a file and has removed dirty blocks from changed_blocks[] while they were still dirty (they were being evicted (=>flushed) by yet another thread, which may not have flushed the block yet so it may still be dirty). If Checkpoint proceeds now, it will not see the page. If there is a crash right after writing the checkpoint record, before the page is flushed, at recovery the page will be wrongly ignored because it won't be in the dirty pages list in the checkpoint record. So wait. */ { struct st_my_thread_var *thread= my_thread_var; wqueue_add_to_queue(&other_flusher->flush_queue, thread); do { DBUG_PRINT("wait", ("suspend thread %s %ld", thread->name, (ulong) thread->id)); pagecache_pthread_cond_wait(&thread->suspend, &pagecache->cache_lock); } while (thread->next); } } /* Count how many dirty pages are interesting */ for (file_hash= 0; file_hash < pagecache->changed_blocks_hash_size; file_hash++) { PAGECACHE_BLOCK_LINK *block; for (block= pagecache->changed_blocks[file_hash] ; block; block= block->next_changed) { /* Q: is there something subtle with block->hash_link: can it be NULL? does it have to be == hash_link->block... ? */ DBUG_ASSERT(block->hash_link != NULL); DBUG_ASSERT(block->status & PCBLOCK_CHANGED); /* Note that we don't store bitmap pages, or pages from non-transactional (like temporary) tables. Don't checkpoint during Recovery which uses PAGECACHE_PLAIN_PAGE. */ if (block->type != PAGECACHE_LSN_PAGE) continue; /* no need to store it */ stored_list_size++; } } compile_time_assert(sizeof(pagecache->blocks) <= 8); str->length= 8 + /* number of dirty pages */ (2 + /* table id */ 1 + /* data or index file */ 5 + /* pageno */ LSN_STORE_SIZE /* rec_lsn */ ) * stored_list_size; if (NULL == (str->str= my_malloc(PSI_INSTRUMENT_ME, str->length, MYF(MY_WME)))) goto err; ptr= str->str; int8store(ptr, (ulonglong)stored_list_size); ptr+= 8; DBUG_PRINT("info", ("found %zu dirty pages", stored_list_size)); if (stored_list_size == 0) goto end; for (file_hash= 0; file_hash < pagecache->changed_blocks_hash_size; file_hash++) { PAGECACHE_BLOCK_LINK *block; for (block= pagecache->changed_blocks[file_hash] ; block; block= block->next_changed) { uint16 table_id; MARIA_SHARE *share; if (block->type != PAGECACHE_LSN_PAGE) continue; /* no need to store it in the checkpoint record */ share= (MARIA_SHARE *)(block->hash_link->file.callback_data); table_id= share->id; int2store(ptr, table_id); ptr+= 2; ptr[0]= (share->kfile.file == block->hash_link->file.file); ptr++; DBUG_ASSERT(block->hash_link->pageno < ((1ULL) << 40)); page_store(ptr, block->hash_link->pageno); ptr+= PAGE_STORE_SIZE; lsn_store(ptr, block->rec_lsn); ptr+= LSN_STORE_SIZE; if (block->rec_lsn != LSN_MAX) { DBUG_ASSERT(LSN_VALID(block->rec_lsn)); if (cmp_translog_addr(block->rec_lsn, minimum_rec_lsn) < 0) minimum_rec_lsn= block->rec_lsn; } /* otherwise, some trn->rec_lsn should hold the correct info */ } } end: pagecache_pthread_mutex_unlock(&pagecache->cache_lock); *min_rec_lsn= minimum_rec_lsn; DBUG_RETURN(error); err: error= 1; goto end; }
O0
c
pagecache_collect_changed_blocks_with_lsn: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movb $0x0, -0x19(%rbp) movq $0x0, -0x28(%rbp) movabsq $0xffffffffffffff, %rax # imm = 0xFFFFFFFFFFFFFF movq %rax, -0x40(%rbp) jmp 0x313e3 movq -0x8(%rbp), %rdi addq $0xc8, %rdi leaq 0x121317(%rip), %rsi # 0x15270c movl $0x14c2, %edx # imm = 0x14C2 callq 0x2d850 movl $0x0, -0x2c(%rbp) movq -0x8(%rbp), %rdi addq $0x1b0, %rdi # imm = 0x1B0 movl -0x2c(%rbp), %eax movl %eax, %esi callq 0xe0600 movq %rax, %rcx movq %rcx, -0x48(%rbp) xorl %eax, %eax cmpq $0x0, %rcx movb %al, -0x91(%rbp) je 0x31443 movq -0x48(%rbp), %rax cmpb $0x0, 0x10(%rax) setne %al xorb $-0x1, %al movb %al, -0x91(%rbp) movb -0x91(%rbp), %al testb $0x1, %al jne 0x3144f jmp 0x3145c jmp 0x31451 movl -0x2c(%rbp), %eax addl $0x1, %eax movl %eax, -0x2c(%rbp) jmp 0x31406 cmpq $0x0, -0x48(%rbp) jne 0x31465 jmp 0x314ba callq 0xf7440 movq %rax, -0x50(%rbp) movq -0x48(%rbp), %rdi addq $0x8, %rdi movq -0x50(%rbp), %rsi callq 0x1009a0 jmp 0x31481 jmp 0x31483 movq -0x50(%rbp), %rdi addq $0x8, %rdi movq -0x8(%rbp), %rsi addq $0xc8, %rsi leaq 0x12126f(%rip), %rdx # 0x15270c movl $0x14e1, %ecx # imm = 0x14E1 callq 0x317d0 movq -0x50(%rbp), %rax cmpq $0x0, 0x88(%rax) jne 0x3147f jmp 0x313ff movl $0x0, -0x2c(%rbp) movl -0x2c(%rbp), %eax movq -0x8(%rbp), %rcx cmpq 0x28(%rcx), %rax jae 0x31526 movq -0x8(%rbp), %rax movq 0x128(%rax), %rax movl -0x2c(%rbp), %ecx movq (%rax,%rcx,8), %rax movq %rax, -0x58(%rbp) cmpq $0x0, -0x58(%rbp) je 0x31519 jmp 0x314ed jmp 0x314ef jmp 0x314f1 jmp 0x314f3 movq -0x58(%rbp), %rax cmpl $0x2, 0x7c(%rax) je 0x314ff jmp 0x3150b movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movq -0x58(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x58(%rbp) jmp 0x314e4 jmp 0x3151b movl -0x2c(%rbp), %eax addl $0x1, %eax movl %eax, -0x2c(%rbp) jmp 0x314c1 jmp 0x31528 jmp 0x3152a imulq $0xf, -0x28(%rbp), %rcx addq $0x8, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax movq 0x8(%rax), %rsi xorl %edi, %edi movl $0x10, %edx callq 0xf4be0 movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) xorl %eax, %eax cmpq %rcx, %rax jne 0x31565 jmp 0x317bd movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x28(%rbp), %rcx movq -0x60(%rbp), %rax movq %rcx, (%rax) movq -0x38(%rbp), %rax addq $0x8, %rax movq %rax, -0x38(%rbp) jmp 0x31591 cmpq $0x0, -0x28(%rbp) jne 0x3159d jmp 0x31796 movl $0x0, -0x2c(%rbp) movl -0x2c(%rbp), %eax movq -0x8(%rbp), %rcx cmpq 0x28(%rcx), %rax jae 0x31794 movq -0x8(%rbp), %rax movq 0x128(%rax), %rax movl -0x2c(%rbp), %ecx movq (%rax,%rcx,8), %rax movq %rax, -0x68(%rbp) cmpq $0x0, -0x68(%rbp) je 0x31784 movq -0x68(%rbp), %rax cmpl $0x2, 0x7c(%rax) je 0x315e5 jmp 0x31773 movq -0x68(%rbp), %rax movq 0x20(%rax), %rax movq 0x58(%rax), %rax movq %rax, -0x78(%rbp) movq -0x78(%rbp), %rax movw 0x620(%rax), %ax movw %ax, -0x6a(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x80(%rbp) movw -0x6a(%rbp), %cx movq -0x80(%rbp), %rax movw %cx, (%rax) movq -0x38(%rbp), %rax addq $0x2, %rax movq %rax, -0x38(%rbp) movq -0x78(%rbp), %rax movl 0x760(%rax), %eax movq -0x68(%rbp), %rcx movq 0x20(%rcx), %rcx cmpl 0x28(%rcx), %eax sete %al andb $0x1, %al movzbl %al, %eax movb %al, %cl movq -0x38(%rbp), %rax movb %cl, (%rax) movq -0x38(%rbp), %rax addq $0x1, %rax movq %rax, -0x38(%rbp) jmp 0x31656 jmp 0x31658 movq -0x38(%rbp), %rax movq %rax, -0x88(%rbp) movq -0x68(%rbp), %rax movq 0x20(%rax), %rax movq 0x60(%rax), %rax movl %eax, %ecx movq -0x88(%rbp), %rax movl %ecx, (%rax) movq -0x68(%rbp), %rax movq 0x20(%rax), %rax movq 0x60(%rax), %rax shrq $0x20, %rax movb %al, %cl movq -0x88(%rbp), %rax movb %cl, 0x4(%rax) movq -0x38(%rbp), %rax addq $0x5, %rax movq %rax, -0x38(%rbp) jmp 0x316a4 movq -0x68(%rbp), %rax movq 0x88(%rax), %rax sarq $0x20, %rax movb %al, %cl movq -0x38(%rbp), %rax movb %cl, (%rax) movq -0x68(%rbp), %rax movq 0x88(%rax), %rax sarq $0x20, %rax shrl $0x8, %eax movb %al, %cl movq -0x38(%rbp), %rax movb %cl, 0x1(%rax) movq -0x68(%rbp), %rax movq 0x88(%rax), %rax sarq $0x20, %rax shrl $0x10, %eax movb %al, %cl movq -0x38(%rbp), %rax movb %cl, 0x2(%rax) jmp 0x316f3 movq -0x38(%rbp), %rax addq $0x3, %rax movq %rax, -0x90(%rbp) movq -0x68(%rbp), %rcx movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq 0x88(%rcx), %rax movl %eax, %ecx movq -0x90(%rbp), %rax movl %ecx, (%rax) jmp 0x31724 movq -0x38(%rbp), %rax addq $0x7, %rax movq %rax, -0x38(%rbp) movq -0x68(%rbp), %rax movabsq $0xffffffffffffff, %rcx # imm = 0xFFFFFFFFFFFFFF cmpq %rcx, 0x88(%rax) je 0x31771 jmp 0x31749 jmp 0x3174b movq -0x68(%rbp), %rax movq 0x88(%rax), %rax subq -0x40(%rbp), %rax cmpq $0x0, %rax jge 0x3176f movq -0x68(%rbp), %rax movq 0x88(%rax), %rax movq %rax, -0x40(%rbp) jmp 0x31771 jmp 0x31773 movq -0x68(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x68(%rbp) jmp 0x315cb jmp 0x31786 movl -0x2c(%rbp), %eax addl $0x1, %eax movl %eax, -0x2c(%rbp) jmp 0x315a4 jmp 0x31796 movq -0x8(%rbp), %rdi addq $0xc8, %rdi callq 0x2d8c0 movq -0x40(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movb -0x19(%rbp), %al addq $0xa0, %rsp popq %rbp retq movb $0x1, -0x19(%rbp) jmp 0x31796 nopw %cs:(%rax,%rax)
pagecache_collect_changed_blocks_with_lsn: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_19], 0 mov [rbp+var_28], 0 mov rax, 0FFFFFFFFFFFFFFh mov [rbp+var_40], rax jmp short $+2 loc_313E3: mov rdi, [rbp+var_8] add rdi, 0C8h lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 14C2h call inline_mysql_mutex_lock loc_313FF: mov [rbp+var_2C], 0 loc_31406: mov rdi, [rbp+var_8] add rdi, 1B0h mov eax, [rbp+var_2C] mov esi, eax call my_hash_element mov rcx, rax mov [rbp+var_48], rcx xor eax, eax cmp rcx, 0 mov [rbp+var_91], al jz short loc_31443 mov rax, [rbp+var_48] cmp byte ptr [rax+10h], 0 setnz al xor al, 0FFh mov [rbp+var_91], al loc_31443: mov al, [rbp+var_91] test al, 1 jnz short loc_3144F jmp short loc_3145C loc_3144F: jmp short $+2 loc_31451: mov eax, [rbp+var_2C] add eax, 1 mov [rbp+var_2C], eax jmp short loc_31406 loc_3145C: cmp [rbp+var_48], 0 jnz short loc_31465 jmp short loc_314BA loc_31465: call _my_thread_var mov [rbp+var_50], rax mov rdi, [rbp+var_48] add rdi, 8 mov rsi, [rbp+var_50] call wqueue_add_to_queue loc_3147F: jmp short $+2 loc_31481: jmp short $+2 loc_31483: mov rdi, [rbp+var_50] add rdi, 8 mov rsi, [rbp+var_8] add rsi, 0C8h lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 14E1h call inline_mysql_cond_wait mov rax, [rbp+var_50] cmp qword ptr [rax+88h], 0 jnz short loc_3147F jmp loc_313FF loc_314BA: mov [rbp+var_2C], 0 loc_314C1: mov eax, [rbp+var_2C] mov rcx, [rbp+var_8] cmp rax, [rcx+28h] jnb short loc_31526 mov rax, [rbp+var_8] mov rax, [rax+128h] mov ecx, [rbp+var_2C] mov rax, [rax+rcx*8] mov [rbp+var_58], rax loc_314E4: cmp [rbp+var_58], 0 jz short loc_31519 jmp short $+2 loc_314ED: jmp short $+2 loc_314EF: jmp short $+2 loc_314F1: jmp short $+2 loc_314F3: mov rax, [rbp+var_58] cmp dword ptr [rax+7Ch], 2 jz short loc_314FF jmp short loc_3150B loc_314FF: mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax loc_3150B: mov rax, [rbp+var_58] mov rax, [rax+10h] mov [rbp+var_58], rax jmp short loc_314E4 loc_31519: jmp short $+2 loc_3151B: mov eax, [rbp+var_2C] add eax, 1 mov [rbp+var_2C], eax jmp short loc_314C1 loc_31526: jmp short $+2 loc_31528: jmp short $+2 loc_3152A: imul rcx, [rbp+var_28], 0Fh add rcx, 8 mov rax, [rbp+var_10] mov [rax+8], rcx mov rax, [rbp+var_10] mov rsi, [rax+8] xor edi, edi mov edx, 10h call my_malloc mov rcx, rax mov rax, [rbp+var_10] mov [rax], rcx xor eax, eax cmp rax, rcx jnz short loc_31565 jmp loc_317BD loc_31565: mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_60], rax mov rcx, [rbp+var_28] mov rax, [rbp+var_60] mov [rax], rcx mov rax, [rbp+var_38] add rax, 8 mov [rbp+var_38], rax jmp short $+2 loc_31591: cmp [rbp+var_28], 0 jnz short loc_3159D jmp loc_31796 loc_3159D: mov [rbp+var_2C], 0 loc_315A4: mov eax, [rbp+var_2C] mov rcx, [rbp+var_8] cmp rax, [rcx+28h] jnb loc_31794 mov rax, [rbp+var_8] mov rax, [rax+128h] mov ecx, [rbp+var_2C] mov rax, [rax+rcx*8] mov [rbp+var_68], rax loc_315CB: cmp [rbp+var_68], 0 jz loc_31784 mov rax, [rbp+var_68] cmp dword ptr [rax+7Ch], 2 jz short loc_315E5 jmp loc_31773 loc_315E5: mov rax, [rbp+var_68] mov rax, [rax+20h] mov rax, [rax+58h] mov [rbp+var_78], rax mov rax, [rbp+var_78] mov ax, [rax+620h] mov [rbp+var_6A], ax mov rax, [rbp+var_38] mov [rbp+var_80], rax mov cx, [rbp+var_6A] mov rax, [rbp+var_80] mov [rax], cx mov rax, [rbp+var_38] add rax, 2 mov [rbp+var_38], rax mov rax, [rbp+var_78] mov eax, [rax+760h] mov rcx, [rbp+var_68] mov rcx, [rcx+20h] cmp eax, [rcx+28h] setz al and al, 1 movzx eax, al mov cl, al mov rax, [rbp+var_38] mov [rax], cl mov rax, [rbp+var_38] add rax, 1 mov [rbp+var_38], rax jmp short $+2 loc_31656: jmp short $+2 loc_31658: mov rax, [rbp+var_38] mov [rbp+var_88], rax mov rax, [rbp+var_68] mov rax, [rax+20h] mov rax, [rax+60h] mov ecx, eax mov rax, [rbp+var_88] mov [rax], ecx mov rax, [rbp+var_68] mov rax, [rax+20h] mov rax, [rax+60h] shr rax, 20h mov cl, al mov rax, [rbp+var_88] mov [rax+4], cl mov rax, [rbp+var_38] add rax, 5 mov [rbp+var_38], rax jmp short $+2 loc_316A4: mov rax, [rbp+var_68] mov rax, [rax+88h] sar rax, 20h mov cl, al mov rax, [rbp+var_38] mov [rax], cl mov rax, [rbp+var_68] mov rax, [rax+88h] sar rax, 20h shr eax, 8 mov cl, al mov rax, [rbp+var_38] mov [rax+1], cl mov rax, [rbp+var_68] mov rax, [rax+88h] sar rax, 20h shr eax, 10h mov cl, al mov rax, [rbp+var_38] mov [rax+2], cl jmp short $+2 loc_316F3: mov rax, [rbp+var_38] add rax, 3 mov [rbp+var_90], rax mov rcx, [rbp+var_68] mov rax, 0FFFFFFFFh and rax, [rcx+88h] mov ecx, eax mov rax, [rbp+var_90] mov [rax], ecx jmp short $+2 loc_31724: mov rax, [rbp+var_38] add rax, 7 mov [rbp+var_38], rax mov rax, [rbp+var_68] mov rcx, 0FFFFFFFFFFFFFFh cmp [rax+88h], rcx jz short loc_31771 jmp short $+2 loc_31749: jmp short $+2 loc_3174B: mov rax, [rbp+var_68] mov rax, [rax+88h] sub rax, [rbp+var_40] cmp rax, 0 jge short loc_3176F mov rax, [rbp+var_68] mov rax, [rax+88h] mov [rbp+var_40], rax loc_3176F: jmp short $+2 loc_31771: jmp short $+2 loc_31773: mov rax, [rbp+var_68] mov rax, [rax+10h] mov [rbp+var_68], rax jmp loc_315CB loc_31784: jmp short $+2 loc_31786: mov eax, [rbp+var_2C] add eax, 1 mov [rbp+var_2C], eax jmp loc_315A4 loc_31794: jmp short $+2 loc_31796: mov rdi, [rbp+var_8] add rdi, 0C8h call inline_mysql_mutex_unlock mov rcx, [rbp+var_40] mov rax, [rbp+var_18] mov [rax], rcx mov al, [rbp+var_19] add rsp, 0A0h pop rbp retn loc_317BD: mov [rbp+var_19], 1 jmp short loc_31796
char pagecache_collect_changed_blocks_with_lsn(long long a1, long long *a2, long long *a3) { long long v3; // rax char v5; // [rsp+Fh] [rbp-91h] long long v6; // [rsp+28h] [rbp-78h] long long n; // [rsp+38h] [rbp-68h] _QWORD *v8; // [rsp+40h] [rbp-60h] long long k; // [rsp+48h] [rbp-58h] long long v10; // [rsp+50h] [rbp-50h] long long v11; // [rsp+58h] [rbp-48h] long long v12; // [rsp+60h] [rbp-40h] _WORD *v13; // [rsp+68h] [rbp-38h] _WORD *v14; // [rsp+68h] [rbp-38h] unsigned int i; // [rsp+74h] [rbp-2Ch] unsigned int j; // [rsp+74h] [rbp-2Ch] unsigned int m; // [rsp+74h] [rbp-2Ch] long long v18; // [rsp+78h] [rbp-28h] char v19; // [rsp+87h] [rbp-19h] v19 = 0; v18 = 0LL; v12 = 0xFFFFFFFFFFFFFFLL; inline_mysql_mutex_lock( a1 + 200, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0x14C2u); while ( 1 ) { for ( i = 0; ; ++i ) { v11 = my_hash_element(a1 + 432, i); v5 = 0; if ( v11 ) v5 = ~(*(_BYTE *)(v11 + 16) != 0); if ( (v5 & 1) == 0 ) break; } if ( !v11 ) break; v10 = my_thread_var(); wqueue_add_to_queue(v11 + 8, v10); do inline_mysql_cond_wait( v10 + 8, a1 + 200, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 5345LL); while ( *(_QWORD *)(v10 + 136) ); } for ( j = 0; (unsigned long long)j < *(_QWORD *)(a1 + 40); ++j ) { for ( k = *(_QWORD *)(*(_QWORD *)(a1 + 296) + 8LL * j); k; k = *(_QWORD *)(k + 16) ) { if ( *(_DWORD *)(k + 124) == 2 ) ++v18; } } a2[1] = 15 * v18 + 8; v3 = my_malloc(0LL, a2[1], 16LL); *a2 = v3; if ( v3 ) { v8 = (_QWORD *)*a2; *v8 = v18; v13 = v8 + 1; if ( v18 ) { for ( m = 0; (unsigned long long)m < *(_QWORD *)(a1 + 40); ++m ) { for ( n = *(_QWORD *)(*(_QWORD *)(a1 + 296) + 8LL * m); n; n = *(_QWORD *)(n + 16) ) { if ( *(_DWORD *)(n + 124) == 2 ) { v6 = *(_QWORD *)(*(_QWORD *)(n + 32) + 88LL); *v13 = *(_WORD *)(v6 + 1568); v14 = v13 + 1; *(_BYTE *)v14 = *(_DWORD *)(v6 + 1888) == *(_DWORD *)(*(_QWORD *)(n + 32) + 40LL); *(_DWORD *)((char *)v14 + 1) = *(_QWORD *)(*(_QWORD *)(n + 32) + 96LL); *((_BYTE *)v14 + 5) = BYTE4(*(_QWORD *)(*(_QWORD *)(n + 32) + 96LL)); v14 += 3; *v14 = WORD2(*(_QWORD *)(n + 136)); *((_BYTE *)v14 + 2) = BYTE6(*(_QWORD *)(n + 136)); *(_DWORD *)((char *)v14 + 3) = *(_QWORD *)(n + 136); v13 = (_WORD *)((char *)v14 + 7); if ( *(_QWORD *)(n + 136) != 0xFFFFFFFFFFFFFFLL && *(_QWORD *)(n + 136) - v12 < 0 ) v12 = *(_QWORD *)(n + 136); } } } } } else { v19 = 1; } inline_mysql_mutex_unlock(a1 + 200); *a3 = v12; return v19; }
pagecache_collect_changed_blocks_with_lsn: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV byte ptr [RBP + -0x19],0x0 MOV qword ptr [RBP + -0x28],0x0 MOV RAX,0xffffffffffffff MOV qword ptr [RBP + -0x40],RAX JMP 0x001313e3 LAB_001313e3: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc8 LEA RSI,[0x25270c] MOV EDX,0x14c2 CALL 0x0012d850 LAB_001313ff: MOV dword ptr [RBP + -0x2c],0x0 LAB_00131406: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x1b0 MOV EAX,dword ptr [RBP + -0x2c] MOV ESI,EAX CALL 0x001e0600 MOV RCX,RAX MOV qword ptr [RBP + -0x48],RCX XOR EAX,EAX CMP RCX,0x0 MOV byte ptr [RBP + -0x91],AL JZ 0x00131443 MOV RAX,qword ptr [RBP + -0x48] CMP byte ptr [RAX + 0x10],0x0 SETNZ AL XOR AL,0xff MOV byte ptr [RBP + -0x91],AL LAB_00131443: MOV AL,byte ptr [RBP + -0x91] TEST AL,0x1 JNZ 0x0013144f JMP 0x0013145c LAB_0013144f: JMP 0x00131451 LAB_00131451: MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x00131406 LAB_0013145c: CMP qword ptr [RBP + -0x48],0x0 JNZ 0x00131465 JMP 0x001314ba LAB_00131465: CALL 0x001f7440 MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x48] ADD RDI,0x8 MOV RSI,qword ptr [RBP + -0x50] CALL 0x002009a0 LAB_0013147f: JMP 0x00131481 LAB_00131481: JMP 0x00131483 LAB_00131483: MOV RDI,qword ptr [RBP + -0x50] ADD RDI,0x8 MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0xc8 LEA RDX,[0x25270c] MOV ECX,0x14e1 CALL 0x001317d0 MOV RAX,qword ptr [RBP + -0x50] CMP qword ptr [RAX + 0x88],0x0 JNZ 0x0013147f JMP 0x001313ff LAB_001314ba: MOV dword ptr [RBP + -0x2c],0x0 LAB_001314c1: MOV EAX,dword ptr [RBP + -0x2c] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x28] JNC 0x00131526 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x128] MOV ECX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x58],RAX LAB_001314e4: CMP qword ptr [RBP + -0x58],0x0 JZ 0x00131519 JMP 0x001314ed LAB_001314ed: JMP 0x001314ef LAB_001314ef: JMP 0x001314f1 LAB_001314f1: JMP 0x001314f3 LAB_001314f3: MOV RAX,qword ptr [RBP + -0x58] CMP dword ptr [RAX + 0x7c],0x2 JZ 0x001314ff JMP 0x0013150b LAB_001314ff: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX LAB_0013150b: MOV RAX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x58],RAX JMP 0x001314e4 LAB_00131519: JMP 0x0013151b LAB_0013151b: MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x001314c1 LAB_00131526: JMP 0x00131528 LAB_00131528: JMP 0x0013152a LAB_0013152a: IMUL RCX,qword ptr [RBP + -0x28],0xf ADD RCX,0x8 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x8] XOR EDI,EDI MOV EDX,0x10 CALL 0x001f4be0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX XOR EAX,EAX CMP RAX,RCX JNZ 0x00131565 JMP 0x001317bd LAB_00131565: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x60],RAX MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x8 MOV qword ptr [RBP + -0x38],RAX JMP 0x00131591 LAB_00131591: CMP qword ptr [RBP + -0x28],0x0 JNZ 0x0013159d JMP 0x00131796 LAB_0013159d: MOV dword ptr [RBP + -0x2c],0x0 LAB_001315a4: MOV EAX,dword ptr [RBP + -0x2c] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x28] JNC 0x00131794 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x128] MOV ECX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x68],RAX LAB_001315cb: CMP qword ptr [RBP + -0x68],0x0 JZ 0x00131784 MOV RAX,qword ptr [RBP + -0x68] CMP dword ptr [RAX + 0x7c],0x2 JZ 0x001315e5 JMP 0x00131773 LAB_001315e5: MOV RAX,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RAX + 0x20] MOV RAX,qword ptr [RAX + 0x58] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x78] MOV AX,word ptr [RAX + 0x620] MOV word ptr [RBP + -0x6a],AX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x80],RAX MOV CX,word ptr [RBP + -0x6a] MOV RAX,qword ptr [RBP + -0x80] MOV word ptr [RAX],CX MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x2 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x78] MOV EAX,dword ptr [RAX + 0x760] MOV RCX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RCX + 0x20] CMP EAX,dword ptr [RCX + 0x28] SETZ AL AND AL,0x1 MOVZX EAX,AL MOV CL,AL MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x38],RAX JMP 0x00131656 LAB_00131656: JMP 0x00131658 LAB_00131658: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RAX + 0x20] MOV RAX,qword ptr [RAX + 0x60] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x88] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RAX + 0x20] MOV RAX,qword ptr [RAX + 0x60] SHR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0x88] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x5 MOV qword ptr [RBP + -0x38],RAX JMP 0x001316a4 LAB_001316a4: MOV RAX,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RAX + 0x88] SAR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RAX + 0x88] SAR RAX,0x20 SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RAX + 0x88] SAR RAX,0x20 SHR EAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x2],CL JMP 0x001316f3 LAB_001316f3: MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x3 MOV qword ptr [RBP + -0x90],RAX MOV RCX,qword ptr [RBP + -0x68] MOV RAX,0xffffffff AND RAX,qword ptr [RCX + 0x88] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x90] MOV dword ptr [RAX],ECX JMP 0x00131724 LAB_00131724: MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x7 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x68] MOV RCX,0xffffffffffffff CMP qword ptr [RAX + 0x88],RCX JZ 0x00131771 JMP 0x00131749 LAB_00131749: JMP 0x0013174b LAB_0013174b: MOV RAX,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RAX + 0x88] SUB RAX,qword ptr [RBP + -0x40] CMP RAX,0x0 JGE 0x0013176f MOV RAX,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RAX + 0x88] MOV qword ptr [RBP + -0x40],RAX LAB_0013176f: JMP 0x00131771 LAB_00131771: JMP 0x00131773 LAB_00131773: MOV RAX,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x68],RAX JMP 0x001315cb LAB_00131784: JMP 0x00131786 LAB_00131786: MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x001315a4 LAB_00131794: JMP 0x00131796 LAB_00131796: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc8 CALL 0x0012d8c0 MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV AL,byte ptr [RBP + -0x19] ADD RSP,0xa0 POP RBP RET LAB_001317bd: MOV byte ptr [RBP + -0x19],0x1 JMP 0x00131796
int1 pagecache_collect_changed_blocks_with_lsn(long param_1,long *param_2,long *param_3) { long lVar1; long lVar2; bool bVar3; long local_70; long local_60; long local_48; long *local_40; uint local_34; long local_30; int1 local_21; local_21 = 0; local_30 = 0; local_48 = 0xffffffffffffff; inline_mysql_mutex_lock (param_1 + 200,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0x14c2); while( true ) { local_34 = 0; while( true ) { lVar1 = my_hash_element(param_1 + 0x1b0,local_34); bVar3 = false; if (lVar1 != 0) { bVar3 = *(char *)(lVar1 + 0x10) == '\0'; } if (!bVar3) break; local_34 = local_34 + 1; } if (lVar1 == 0) break; lVar2 = _my_thread_var(); wqueue_add_to_queue(lVar1 + 8,lVar2); do { inline_mysql_cond_wait (lVar2 + 8,param_1 + 200, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",0x14e1); } while (*(long *)(lVar2 + 0x88) != 0); } for (local_34 = 0; (ulong)local_34 < *(ulong *)(param_1 + 0x28); local_34 = local_34 + 1) { for (local_60 = *(long *)(*(long *)(param_1 + 0x128) + (ulong)local_34 * 8); local_60 != 0; local_60 = *(long *)(local_60 + 0x10)) { if (*(int *)(local_60 + 0x7c) == 2) { local_30 = local_30 + 1; } } } param_2[1] = local_30 * 0xf + 8; lVar1 = my_malloc(0,param_2[1],0x10); *param_2 = lVar1; if (lVar1 == 0) { local_21 = 1; } else { param_2 = (long *)*param_2; *param_2 = local_30; local_40 = param_2 + 1; if (local_30 != 0) { for (local_34 = 0; (ulong)local_34 < *(ulong *)(param_1 + 0x28); local_34 = local_34 + 1) { for (local_70 = *(long *)(*(long *)(param_1 + 0x128) + (ulong)local_34 * 8); local_70 != 0; local_70 = *(long *)(local_70 + 0x10)) { if (*(int *)(local_70 + 0x7c) == 2) { lVar1 = *(long *)(*(long *)(local_70 + 0x20) + 0x58); *(int2 *)local_40 = *(int2 *)(lVar1 + 0x620); *(bool *)((long)local_40 + 2) = *(int *)(lVar1 + 0x760) == *(int *)(*(long *)(local_70 + 0x20) + 0x28); *(int *)((long)local_40 + 3) = (int)*(int8 *)(*(long *)(local_70 + 0x20) + 0x60); *(char *)((long)local_40 + 7) = (char)((ulong)*(int8 *)(*(long *)(local_70 + 0x20) + 0x60) >> 0x20); *(char *)(local_40 + 1) = (char)((ulong)*(int8 *)(local_70 + 0x88) >> 0x20); *(char *)((long)local_40 + 9) = (char)((ulong)*(int8 *)(local_70 + 0x88) >> 0x28); *(char *)((long)local_40 + 10) = (char)((ulong)*(int8 *)(local_70 + 0x88) >> 0x30) ; *(int *)((long)local_40 + 0xb) = (int)*(int8 *)(local_70 + 0x88); local_40 = (long *)((long)local_40 + 0xf); if ((*(long *)(local_70 + 0x88) != 0xffffffffffffff) && (*(long *)(local_70 + 0x88) - local_48 < 0)) { local_48 = *(long *)(local_70 + 0x88); } } } } } } inline_mysql_mutex_unlock(param_1 + 200); *param_3 = local_48; return local_21; }
61,665
minja::Parser::parseDictionary()
monkey531[P]llama/common/minja.hpp
std::shared_ptr<Expression> parseDictionary() { if (consumeToken("{").empty()) return nullptr; std::vector<std::pair<std::shared_ptr<Expression>, std::shared_ptr<Expression>>> elements; if (!consumeToken("}").empty()) { return std::make_shared<DictExpr>(get_location(), std::move(elements)); } auto parseKeyValuePair = [&]() { auto key = parseExpression(); if (!key) throw std::runtime_error("Expected key in dictionary"); if (consumeToken(":").empty()) throw std::runtime_error("Expected colon betweek key & value in dictionary"); auto value = parseExpression(); if (!value) throw std::runtime_error("Expected value in dictionary"); elements.emplace_back(std::pair(std::move(key), std::move(value))); }; parseKeyValuePair(); while (it != end) { if (!consumeToken(",").empty()) { parseKeyValuePair(); } else if (!consumeToken("}").empty()) { return std::make_shared<DictExpr>(get_location(), std::move(elements)); } else { throw std::runtime_error("Expected comma or closing brace in dictionary"); } } throw std::runtime_error("Expected closing brace"); }
O3
cpp
minja::Parser::parseDictionary(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rsi, %r14 movq %rdi, %r12 leaq 0x10(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x6500d(%rip), %rsi # 0xf03ed leaq 0x65007(%rip), %rdx # 0xf03ee movq %rsp, %rdi callq 0x22338 leaq 0x20(%rsp), %rdi movq %rsp, %rdx movq %r14, %rsi movl $0x1, %ecx callq 0x84068 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi movq -0x8(%rax), %rbx cmpq %rax, %rdi je 0x8b423 movq 0x30(%rsp), %rsi incq %rsi callq 0x1a8f0 movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x8b43e movq 0x10(%rsp), %rsi incq %rsi callq 0x1a8f0 xorps %xmm0, %xmm0 testq %rbx, %rbx je 0x8b4f8 movaps %xmm0, 0x40(%rsp) movq $0x0, 0x50(%rsp) movq %rsp, %rdi leaq 0x10(%rsp), %rax movq %rax, (%rdi) leaq 0x69765(%rip), %rsi # 0xf4bcf leaq 0x6975f(%rip), %rdx # 0xf4bd0 callq 0x22338 leaq 0x20(%rsp), %rdi movq %rsp, %rdx movq %r14, %rsi movl $0x1, %ecx callq 0x84068 movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rbx leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0x8b4ac movq 0x30(%rsp), %rsi incq %rsi callq 0x1a8f0 movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x8b4c7 movq 0x10(%rsp), %rsi incq %rsi callq 0x1a8f0 testq %rbx, %rbx je 0x8b502 movq %r12, %r13 movq (%r14), %r12 movq 0x8(%r14), %r15 testq %r15, %r15 je 0x8b656 movq 0xa0aa2(%rip), %rax # 0x12bf88 cmpb $0x0, (%rax) je 0x8b651 incl 0x8(%r15) jmp 0x8b656 movups %xmm0, (%r12) jmp 0x8b774 movq %r12, 0x60(%rsp) leaq 0x68(%rsp), %rdi movq %r14, (%rdi) leaq 0x40(%rsp), %rax movq %rax, 0x8(%rdi) callq 0x8e722 leaq 0x653c3(%rip), %r12 # 0xf08e7 movq %rsp, %r13 leaq 0x20(%rsp), %rbp leaq 0x68(%rsp), %rbx movq 0x20(%r14), %rax cmpq 0x18(%r14), %rax je 0x8b786 leaq 0x10(%rsp), %rax movq %rax, (%rsp) movq %r13, %rdi leaq 0x65394(%rip), %rsi # 0xf08e6 movq %r12, %rdx callq 0x22338 movq %rbp, %rdi movq %r14, %rsi movq %r13, %rdx movl $0x1, %ecx callq 0x84068 movq 0x20(%rsp), %rdi movq 0x28(%rsp), %r15 leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0x8b58e movq 0x30(%rsp), %rsi incq %rsi callq 0x1a8f0 movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x8b5a9 movq 0x10(%rsp), %rsi incq %rsi callq 0x1a8f0 testq %r15, %r15 je 0x8b5bb movq %rbx, %rdi callq 0x8e722 jmp 0x8b531 movq %rsp, %rdi leaq 0x10(%rsp), %rax movq %rax, (%rdi) leaq 0x69602(%rip), %rsi # 0xf4bcf leaq 0x695fc(%rip), %rdx # 0xf4bd0 callq 0x22338 leaq 0x20(%rsp), %rdi movq %rsp, %rdx movq %r14, %rsi movl $0x1, %ecx callq 0x84068 movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rbx leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0x8b60f movq 0x30(%rsp), %rsi incq %rsi callq 0x1a8f0 movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x8b62a movq 0x10(%rsp), %rsi incq %rsi callq 0x1a8f0 testq %rbx, %rbx je 0x8b7b8 movq (%r14), %r12 movq 0x8(%r14), %r15 testq %r15, %r15 je 0x8b6b1 movq 0xa0942(%rip), %rax # 0x12bf88 cmpb $0x0, (%rax) je 0x8b6ac incl 0x8(%r15) jmp 0x8b6b1 lock incl 0x8(%r15) movq 0x20(%r14), %rbx subq 0x10(%r14), %rbx movl $0x48, %edi callq 0x1a8d0 leaq 0x9ef99(%rip), %rdx # 0x12a608 addq $0x10, %rdx movq %rax, %rcx addq $0x10, %rcx leaq 0x9ed37(%rip), %rsi # 0x12a3b8 addq $0x10, %rsi movabsq $0x100000001, %rdi # imm = 0x100000001 movq %rdi, 0x8(%rax) movq %rdx, (%rax) movq %rsi, 0x10(%rax) movq %r12, 0x18(%rax) movq %r15, 0x20(%rax) testq %r15, %r15 movq %r13, %r12 jne 0x8b707 jmp 0x8b71e lock incl 0x8(%r15) movq 0x20(%r14), %rbx subq 0x10(%r14), %rbx movl $0x48, %edi callq 0x1a8d0 leaq 0x9ef3e(%rip), %rdx # 0x12a608 addq $0x10, %rdx movq %rax, %rcx addq $0x10, %rcx leaq 0x9ecdc(%rip), %rsi # 0x12a3b8 addq $0x10, %rsi movabsq $0x100000001, %rdi # imm = 0x100000001 movq %rdi, 0x8(%rax) movq %rdx, (%rax) movq %rsi, 0x10(%rax) movq %r12, 0x18(%rax) movq %r15, 0x20(%rax) testq %r15, %r15 movq 0x60(%rsp), %r12 je 0x8b71e movq 0xa087a(%rip), %rdx # 0x12bf88 cmpb $0x0, (%rdx) je 0x8b719 incl 0x8(%r15) jmp 0x8b71e lock incl 0x8(%r15) leaq 0x9ef33(%rip), %rdx # 0x12a658 addq $0x10, %rdx movq %rbx, 0x28(%rax) movq %rdx, 0x10(%rax) movaps 0x40(%rsp), %xmm0 movups %xmm0, 0x30(%rax) movq 0x50(%rsp), %rdx movq %rdx, 0x40(%rax) xorps %xmm0, %xmm0 movaps %xmm0, 0x40(%rsp) movq $0x0, 0x50(%rsp) movq %rcx, (%r12) movq %rax, 0x8(%r12) testq %r15, %r15 je 0x8b76a movq %r15, %rdi callq 0x6d9b6 leaq 0x40(%rsp), %rdi callq 0x8e95a movq %r12, %rax addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x1a450 movq %rax, %r14 leaq 0x65280(%rip), %rsi # 0xf0a1a movq %rax, %rdi callq 0x1a330 movq 0xa0847(%rip), %rsi # 0x12bff0 movq 0xa07b0(%rip), %rdx # 0x12bf60 movq %r14, %rdi callq 0x1af30 movl $0x10, %edi callq 0x1a450 movq %rax, %r14 leaq 0x65220(%rip), %rsi # 0xf09ec movq %rax, %rdi callq 0x1a330 jmp 0x8b7a2 jmp 0x8b819 jmp 0x8b7de jmp 0x8b83f jmp 0x8b82a movq %rax, %rbx testq %r15, %r15 je 0x8b82d movq %r15, %rdi callq 0x6d9b6 jmp 0x8b82d jmp 0x8b83f jmp 0x8b82a movq %rax, %rbx movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x8b837 movq 0x10(%rsp), %rsi incq %rsi callq 0x1a8f0 jmp 0x8b837 movq %rax, %rbx jmp 0x8b837 movq %rax, %rbx movq %r14, %rdi callq 0x1a690 jmp 0x8b82d jmp 0x8b82a jmp 0x8b82a movq %rax, %rbx leaq 0x40(%rsp), %rdi callq 0x8e95a movq %rbx, %rdi callq 0x1afb0 movq %rax, %rbx movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x8b82d movq 0x10(%rsp), %rsi incq %rsi callq 0x1a8f0 jmp 0x8b82d nop
_ZN5minja6Parser15parseDictionaryEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov r14, rsi mov r12, rdi lea rax, [rsp+0A8h+var_98] mov [rax-10h], rax lea rsi, asc_F03ED; "{" lea rdx, asc_F03ED+1; "" mov rdi, rsp call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+0A8h+var_88] mov rdx, rsp mov rsi, r14 mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) lea rax, [rsp+0A8h+var_78] mov rdi, [rax-10h]; void * mov rbx, [rax-8] cmp rdi, rax jz short loc_8B423 mov rsi, [rsp+0A8h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8B423: mov rdi, [rsp+0A8h+var_A8]; void * lea rax, [rsp+0A8h+var_98] cmp rdi, rax jz short loc_8B43E mov rsi, [rsp+0A8h+var_98] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8B43E: xorps xmm0, xmm0 test rbx, rbx jz loc_8B4F8 movaps [rsp+0A8h+var_68], xmm0 mov [rsp+0A8h+var_58], 0 mov rdi, rsp lea rax, [rsp+0A8h+var_98] mov [rdi], rax lea rsi, aT020+7; "}" lea rdx, aT020+8; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+0A8h+var_88] mov rdx, rsp mov rsi, r14 mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) mov rdi, [rsp+0A8h+var_88]; void * mov rbx, [rsp+0A8h+var_80] lea rax, [rsp+0A8h+var_78] cmp rdi, rax jz short loc_8B4AC mov rsi, [rsp+0A8h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8B4AC: mov rdi, [rsp+0A8h+var_A8]; void * lea rax, [rsp+0A8h+var_98] cmp rdi, rax jz short loc_8B4C7 mov rsi, [rsp+0A8h+var_98] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8B4C7: test rbx, rbx jz short loc_8B502 mov r13, r12 mov r12, [r14] mov r15, [r14+8] test r15, r15 jz loc_8B656 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz loc_8B651 inc dword ptr [r15+8] jmp loc_8B656 loc_8B4F8: movups xmmword ptr [r12], xmm0 jmp loc_8B774 loc_8B502: mov [rsp+0A8h+var_48], r12 lea rdi, [rsp+0A8h+var_40] mov [rdi], r14 lea rax, [rsp+0A8h+var_68] mov [rdi+8], rax call _ZZN5minja6Parser15parseDictionaryEvENKUlvE_clEv; minja::Parser::parseDictionary(void)::{lambda(void)#1}::operator()(void) lea r12, asc_F08E6+1; "" mov r13, rsp lea rbp, [rsp+0A8h+var_88] lea rbx, [rsp+0A8h+var_40] loc_8B531: mov rax, [r14+20h] cmp rax, [r14+18h] jz loc_8B786 lea rax, [rsp+0A8h+var_98] mov [rsp+0A8h+var_A8], rax mov rdi, r13 lea rsi, asc_F08E6; "," mov rdx, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rdi, rbp mov rsi, r14 mov rdx, r13 mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) mov rdi, [rsp+0A8h+var_88]; void * mov r15, [rsp+0A8h+var_80] lea rax, [rsp+0A8h+var_78] cmp rdi, rax jz short loc_8B58E mov rsi, [rsp+0A8h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8B58E: mov rdi, [rsp+0A8h+var_A8]; void * lea rax, [rsp+0A8h+var_98] cmp rdi, rax jz short loc_8B5A9 mov rsi, [rsp+0A8h+var_98] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8B5A9: test r15, r15 jz short loc_8B5BB mov rdi, rbx call _ZZN5minja6Parser15parseDictionaryEvENKUlvE_clEv; minja::Parser::parseDictionary(void)::{lambda(void)#1}::operator()(void) jmp loc_8B531 loc_8B5BB: mov rdi, rsp lea rax, [rsp+0A8h+var_98] mov [rdi], rax lea rsi, aT020+7; "}" lea rdx, aT020+8; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+0A8h+var_88] mov rdx, rsp mov rsi, r14 mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) mov rdi, [rsp+0A8h+var_88]; void * mov rbx, [rsp+0A8h+var_80] lea rax, [rsp+0A8h+var_78] cmp rdi, rax jz short loc_8B60F mov rsi, [rsp+0A8h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8B60F: mov rdi, [rsp+0A8h+var_A8]; void * lea rax, [rsp+0A8h+var_98] cmp rdi, rax jz short loc_8B62A mov rsi, [rsp+0A8h+var_98] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8B62A: test rbx, rbx jz loc_8B7B8 mov r12, [r14] mov r15, [r14+8] test r15, r15 jz short loc_8B6B1 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_8B6AC inc dword ptr [r15+8] jmp short loc_8B6B1 loc_8B651: lock inc dword ptr [r15+8] loc_8B656: mov rbx, [r14+20h] sub rbx, [r14+10h] mov edi, 48h ; 'H'; unsigned __int64 call __Znwm; operator new(ulong) lea rdx, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja8DictExprESaIS1_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::DictExpr,std::allocator<minja::DictExpr>,(__gnu_cxx::_Lock_policy)2> add rdx, 10h mov rcx, rax add rcx, 10h lea rsi, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression add rsi, 10h mov rdi, 100000001h mov [rax+8], rdi mov [rax], rdx mov [rax+10h], rsi mov [rax+18h], r12 mov [rax+20h], r15 test r15, r15 mov r12, r13 jnz short loc_8B707 jmp short loc_8B71E loc_8B6AC: lock inc dword ptr [r15+8] loc_8B6B1: mov rbx, [r14+20h] sub rbx, [r14+10h] mov edi, 48h ; 'H'; unsigned __int64 call __Znwm; operator new(ulong) lea rdx, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja8DictExprESaIS1_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::DictExpr,std::allocator<minja::DictExpr>,(__gnu_cxx::_Lock_policy)2> add rdx, 10h mov rcx, rax add rcx, 10h lea rsi, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression add rsi, 10h mov rdi, 100000001h mov [rax+8], rdi mov [rax], rdx mov [rax+10h], rsi mov [rax+18h], r12 mov [rax+20h], r15 test r15, r15 mov r12, [rsp+0A8h+var_48] jz short loc_8B71E loc_8B707: mov rdx, cs:__libc_single_threaded_ptr cmp byte ptr [rdx], 0 jz short loc_8B719 inc dword ptr [r15+8] jmp short loc_8B71E loc_8B719: lock inc dword ptr [r15+8] loc_8B71E: lea rdx, _ZTVN5minja8DictExprE; `vtable for'minja::DictExpr add rdx, 10h mov [rax+28h], rbx mov [rax+10h], rdx movaps xmm0, [rsp+0A8h+var_68] movups xmmword ptr [rax+30h], xmm0 mov rdx, [rsp+0A8h+var_58] mov [rax+40h], rdx xorps xmm0, xmm0 movaps [rsp+0A8h+var_68], xmm0 mov [rsp+0A8h+var_58], 0 mov [r12], rcx mov [r12+8], rax test r15, r15 jz short loc_8B76A mov rdi, r15 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_8B76A: lea rdi, [rsp+0A8h+var_68] call _ZNSt6vectorISt4pairISt10shared_ptrIN5minja10ExpressionEES4_ESaIS5_EED2Ev; std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>::~vector() loc_8B774: mov rax, r12 add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8B786: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpectedClosin_5; "Expected closing brace" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_8B7A2: mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_8B7B8: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpectedCommaO_0; "Expected comma or closing brace in dict"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_8B7A2 jmp short loc_8B819 jmp short loc_8B7DE jmp short loc_8B83F jmp short loc_8B82A loc_8B7DE: mov rbx, rax test r15, r15 jz short loc_8B82D mov rdi, r15 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp short loc_8B82D jmp short loc_8B83F jmp short loc_8B82A mov rbx, rax mov rdi, [rsp+0]; void * lea rax, [rsp+arg_8] cmp rdi, rax jz short loc_8B837 mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_8B837 mov rbx, rax jmp short loc_8B837 loc_8B819: mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_8B82D jmp short loc_8B82A jmp short $+2 loc_8B82A: mov rbx, rax loc_8B82D: lea rdi, [rsp+arg_38] call _ZNSt6vectorISt4pairISt10shared_ptrIN5minja10ExpressionEES4_ESaIS5_EED2Ev; std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>::~vector() loc_8B837: mov rdi, rbx call __Unwind_Resume loc_8B83F: mov rbx, rax mov rdi, [rsp+0]; void * lea rax, [rsp+arg_8] cmp rdi, rax jz short loc_8B82D mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_8B82D
minja::Parser * minja::Parser::parseDictionary(minja::Parser *this, _QWORD *a2) { minja::Parser *v2; // r12 long long v3; // rbx long long v4; // rbx long long v5; // r12 volatile signed __int32 *v6; // r15 long long v7; // r15 long long v8; // rbx long long v9; // r12 long long v10; // rbx long long v11; // rax long long v12; // rcx std::runtime_error *exception; // r14 void *v15[2]; // [rsp+0h] [rbp-A8h] BYREF _QWORD v16[2]; // [rsp+10h] [rbp-98h] BYREF void *v17; // [rsp+20h] [rbp-88h] BYREF long long v18; // [rsp+28h] [rbp-80h] _QWORD v19[2]; // [rsp+30h] [rbp-78h] BYREF __int128 v20; // [rsp+40h] [rbp-68h] BYREF long long v21; // [rsp+50h] [rbp-58h] minja::Parser *v22; // [rsp+60h] [rbp-48h] _QWORD *v23; // [rsp+68h] [rbp-40h] __int128 *v24; // [rsp+70h] [rbp-38h] v2 = this; v15[0] = v16; std::string::_M_construct<char const*>((long long)v15, "{", (long long)""); minja::Parser::consumeToken(&v17, (long long)a2, (_BYTE **)v15, 1u); v3 = v18; if ( v17 != v19 ) operator delete(v17, v19[0] + 1LL); if ( v15[0] != v16 ) operator delete(v15[0], v16[0] + 1LL); if ( !v3 ) { *(_OWORD *)this = 0LL; return v2; } v20 = 0LL; v21 = 0LL; v15[0] = v16; std::string::_M_construct<char const*>((long long)v15, "}", (long long)""); minja::Parser::consumeToken(&v17, (long long)a2, (_BYTE **)v15, 1u); v4 = v18; if ( v17 != v19 ) operator delete(v17, v19[0] + 1LL); if ( v15[0] != v16 ) operator delete(v15[0], v16[0] + 1LL); if ( v4 ) { v5 = *a2; v6 = (volatile signed __int32 *)a2[1]; if ( v6 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v6 + 2); else _InterlockedIncrement(v6 + 2); } v10 = a2[4] - a2[2]; v11 = operator new(0x48uLL); v12 = v11 + 16; *(_QWORD *)(v11 + 8) = 0x100000001LL; *(_QWORD *)v11 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::DictExpr,std::allocator<minja::DictExpr>,(__gnu_cxx::_Lock_policy)2> + 2; *(_QWORD *)(v11 + 16) = &`vtable for'minja::Expression + 2; *(_QWORD *)(v11 + 24) = v5; *(_QWORD *)(v11 + 32) = v6; v2 = this; if ( v6 ) goto LABEL_36; goto LABEL_39; } v22 = this; v23 = a2; v24 = &v20; minja::Parser::parseDictionary(void)::{lambda(void)#1}::operator()(0.0); while ( 1 ) { if ( a2[4] == a2[3] ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected closing brace"); goto LABEL_44; } v15[0] = v16; std::string::_M_construct<char const*>((long long)v15, ",", (long long)""); minja::Parser::consumeToken(&v17, (long long)a2, (_BYTE **)v15, 1u); v7 = v18; if ( v17 != v19 ) operator delete(v17, v19[0] + 1LL); if ( v15[0] != v16 ) operator delete(v15[0], v16[0] + 1LL); if ( !v7 ) break; minja::Parser::parseDictionary(void)::{lambda(void)#1}::operator()(0.0); } v15[0] = v16; std::string::_M_construct<char const*>((long long)v15, "}", (long long)""); minja::Parser::consumeToken(&v17, (long long)a2, (_BYTE **)v15, 1u); v8 = v18; if ( v17 != v19 ) operator delete(v17, v19[0] + 1LL); if ( v15[0] != v16 ) operator delete(v15[0], v16[0] + 1LL); if ( !v8 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected comma or closing brace in dictionary"); LABEL_44: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v9 = *a2; v6 = (volatile signed __int32 *)a2[1]; if ( v6 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v6 + 2); else _InterlockedIncrement(v6 + 2); } v10 = a2[4] - a2[2]; v11 = operator new(0x48uLL); v12 = v11 + 16; *(_QWORD *)(v11 + 8) = 0x100000001LL; *(_QWORD *)v11 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::DictExpr,std::allocator<minja::DictExpr>,(__gnu_cxx::_Lock_policy)2> + 2; *(_QWORD *)(v11 + 16) = &`vtable for'minja::Expression + 2; *(_QWORD *)(v11 + 24) = v9; *(_QWORD *)(v11 + 32) = v6; v2 = v22; if ( v6 ) { LABEL_36: if ( _libc_single_threaded ) ++*((_DWORD *)v6 + 2); else _InterlockedIncrement(v6 + 2); } LABEL_39: *(_QWORD *)(v11 + 40) = v10; *(_QWORD *)(v11 + 16) = &`vtable for'minja::DictExpr + 2; *(_OWORD *)(v11 + 48) = v20; *(_QWORD *)(v11 + 64) = v21; v20 = 0LL; v21 = 0LL; *(_QWORD *)v2 = v12; *((_QWORD *)v2 + 1) = v11; if ( v6 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v6); std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>::~vector(&v20); return v2; }
parseDictionary: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV R14,RSI MOV R12,RDI LEA RAX,[RSP + 0x10] MOV qword ptr [RAX + -0x10],RAX LAB_0018b3d9: LEA RSI,[0x1f03ed] LEA RDX,[0x1f03ee] MOV RDI,RSP CALL 0x00122338 LAB_0018b3ef: LEA RDI,[RSP + 0x20] MOV RDX,RSP MOV RSI,R14 MOV ECX,0x1 CALL 0x00184068 LEA RAX,[RSP + 0x30] MOV RDI,qword ptr [RAX + -0x10] MOV RBX,qword ptr [RAX + -0x8] CMP RDI,RAX JZ 0x0018b423 MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x0011a8f0 LAB_0018b423: MOV RDI,qword ptr [RSP] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x0018b43e MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x0011a8f0 LAB_0018b43e: XORPS XMM0,XMM0 TEST RBX,RBX JZ 0x0018b4f8 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOV qword ptr [RSP + 0x50],0x0 MOV RDI,RSP LEA RAX,[RSP + 0x10] MOV qword ptr [RDI],RAX LAB_0018b463: LEA RSI,[0x1f4bcf] LEA RDX,[0x1f4bd0] CALL 0x00122338 LAB_0018b476: LEA RDI,[RSP + 0x20] MOV RDX,RSP MOV RSI,R14 MOV ECX,0x1 CALL 0x00184068 MOV RDI,qword ptr [RSP + 0x20] MOV RBX,qword ptr [RSP + 0x28] LEA RAX,[RSP + 0x30] CMP RDI,RAX JZ 0x0018b4ac MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x0011a8f0 LAB_0018b4ac: MOV RDI,qword ptr [RSP] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x0018b4c7 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x0011a8f0 LAB_0018b4c7: TEST RBX,RBX JZ 0x0018b502 MOV R13,R12 MOV R12,qword ptr [R14] MOV R15,qword ptr [R14 + 0x8] TEST R15,R15 JZ 0x0018b656 MOV RAX,qword ptr [0x0022bf88] CMP byte ptr [RAX],0x0 JZ 0x0018b651 INC dword ptr [R15 + 0x8] JMP 0x0018b656 LAB_0018b4f8: MOVUPS xmmword ptr [R12],XMM0 JMP 0x0018b774 LAB_0018b502: MOV qword ptr [RSP + 0x60],R12 LEA RDI,[RSP + 0x68] MOV qword ptr [RDI],R14 LEA RAX,[RSP + 0x40] MOV qword ptr [RDI + 0x8],RAX LAB_0018b518: CALL 0x0018e722 LEA R12,[0x1f08e7] MOV R13,RSP LEA RBP,[RSP + 0x20] LEA RBX,[RSP + 0x68] LAB_0018b531: MOV RAX,qword ptr [R14 + 0x20] CMP RAX,qword ptr [R14 + 0x18] JZ 0x0018b786 LEA RAX,[RSP + 0x10] MOV qword ptr [RSP],RAX LAB_0018b548: MOV RDI,R13 LEA RSI,[0x1f08e6] MOV RDX,R12 CALL 0x00122338 LAB_0018b55a: MOV RDI,RBP MOV RSI,R14 MOV RDX,R13 MOV ECX,0x1 CALL 0x00184068 MOV RDI,qword ptr [RSP + 0x20] MOV R15,qword ptr [RSP + 0x28] LEA RAX,[RSP + 0x30] CMP RDI,RAX JZ 0x0018b58e MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x0011a8f0 LAB_0018b58e: MOV RDI,qword ptr [RSP] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x0018b5a9 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x0011a8f0 LAB_0018b5a9: TEST R15,R15 JZ 0x0018b5bb LAB_0018b5ae: MOV RDI,RBX CALL 0x0018e722 JMP 0x0018b531 LAB_0018b5bb: MOV RDI,RSP LEA RAX,[RSP + 0x10] MOV qword ptr [RDI],RAX LAB_0018b5c6: LEA RSI,[0x1f4bcf] LEA RDX,[0x1f4bd0] CALL 0x00122338 LAB_0018b5d9: LEA RDI,[RSP + 0x20] MOV RDX,RSP MOV RSI,R14 MOV ECX,0x1 CALL 0x00184068 MOV RDI,qword ptr [RSP + 0x20] MOV RBX,qword ptr [RSP + 0x28] LEA RAX,[RSP + 0x30] CMP RDI,RAX JZ 0x0018b60f MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x0011a8f0 LAB_0018b60f: MOV RDI,qword ptr [RSP] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x0018b62a MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x0011a8f0 LAB_0018b62a: TEST RBX,RBX JZ 0x0018b7b8 MOV R12,qword ptr [R14] MOV R15,qword ptr [R14 + 0x8] TEST R15,R15 JZ 0x0018b6b1 MOV RAX,qword ptr [0x0022bf88] CMP byte ptr [RAX],0x0 JZ 0x0018b6ac INC dword ptr [R15 + 0x8] JMP 0x0018b6b1 LAB_0018b651: INC.LOCK dword ptr [R15 + 0x8] LAB_0018b656: MOV RBX,qword ptr [R14 + 0x20] SUB RBX,qword ptr [R14 + 0x10] LAB_0018b65e: MOV EDI,0x48 CALL 0x0011a8d0 LEA RDX,[0x22a608] ADD RDX,0x10 MOV RCX,RAX ADD RCX,0x10 LEA RSI,[0x22a3b8] ADD RSI,0x10 MOV RDI,0x100000001 MOV qword ptr [RAX + 0x8],RDI MOV qword ptr [RAX],RDX MOV qword ptr [RAX + 0x10],RSI MOV qword ptr [RAX + 0x18],R12 MOV qword ptr [RAX + 0x20],R15 TEST R15,R15 MOV R12,R13 JNZ 0x0018b707 JMP 0x0018b71e LAB_0018b6ac: INC.LOCK dword ptr [R15 + 0x8] LAB_0018b6b1: MOV RBX,qword ptr [R14 + 0x20] SUB RBX,qword ptr [R14 + 0x10] LAB_0018b6b9: MOV EDI,0x48 CALL 0x0011a8d0 LAB_0018b6c3: LEA RDX,[0x22a608] ADD RDX,0x10 MOV RCX,RAX ADD RCX,0x10 LEA RSI,[0x22a3b8] ADD RSI,0x10 MOV RDI,0x100000001 MOV qword ptr [RAX + 0x8],RDI MOV qword ptr [RAX],RDX MOV qword ptr [RAX + 0x10],RSI MOV qword ptr [RAX + 0x18],R12 MOV qword ptr [RAX + 0x20],R15 TEST R15,R15 MOV R12,qword ptr [RSP + 0x60] JZ 0x0018b71e LAB_0018b707: MOV RDX,qword ptr [0x0022bf88] CMP byte ptr [RDX],0x0 JZ 0x0018b719 INC dword ptr [R15 + 0x8] JMP 0x0018b71e LAB_0018b719: INC.LOCK dword ptr [R15 + 0x8] LAB_0018b71e: LEA RDX,[0x22a658] ADD RDX,0x10 MOV qword ptr [RAX + 0x28],RBX MOV qword ptr [RAX + 0x10],RDX MOVAPS XMM0,xmmword ptr [RSP + 0x40] MOVUPS xmmword ptr [RAX + 0x30],XMM0 MOV RDX,qword ptr [RSP + 0x50] MOV qword ptr [RAX + 0x40],RDX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOV qword ptr [RSP + 0x50],0x0 MOV qword ptr [R12],RCX MOV qword ptr [R12 + 0x8],RAX TEST R15,R15 JZ 0x0018b76a MOV RDI,R15 CALL 0x0016d9b6 LAB_0018b76a: LEA RDI,[RSP + 0x40] CALL 0x0018e95a LAB_0018b774: MOV RAX,R12 ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0018b786: MOV EDI,0x10 CALL 0x0011a450 MOV R14,RAX LAB_0018b793: LEA RSI,[0x1f0a1a] MOV RDI,RAX CALL 0x0011a330 LAB_0018b7a2: MOV RSI,qword ptr [0x0022bff0] MOV RDX,qword ptr [0x0022bf60] MOV RDI,R14 CALL 0x0011af30 LAB_0018b7b8: MOV EDI,0x10 CALL 0x0011a450 MOV R14,RAX LAB_0018b7c5: LEA RSI,[0x1f09ec] MOV RDI,RAX CALL 0x0011a330 LAB_0018b7d4: JMP 0x0018b7a2
/* minja::Parser::parseDictionary() */ int8 * minja::Parser::parseDictionary(void) { int8 uVar1; int8 *puVar2; runtime_error *this; int8 *puVar3; long lVar4; int8 *in_RSI; int8 *in_RDI; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *this_00; long *local_a8 [2]; long local_98 [2]; long *local_88; long local_80; long local_78 [2]; int8 local_68; int8 uStack_60; int8 local_58; int8 *local_48; _lambda___1_ local_40 [8]; int8 *local_38; local_a8[0] = local_98; /* try { // try from 0018b3d9 to 0018b3ee has its CatchHandler @ 0018b814 */ std::__cxx11::string::_M_construct<char_const*>(local_a8,&DAT_001f03ed,&DAT_001f03ee); /* try { // try from 0018b3ef to 0018b403 has its CatchHandler @ 0018b7f4 */ consumeToken(&local_88); lVar4 = local_80; if (local_88 != local_78) { operator_delete(local_88,local_78[0] + 1); } if (local_a8[0] != local_98) { operator_delete(local_a8[0],local_98[0] + 1); } if (lVar4 == 0) { *in_RDI = 0; in_RDI[1] = 0; } else { local_68 = 0; uStack_60 = 0; local_58 = 0; local_a8[0] = local_98; /* try { // try from 0018b463 to 0018b475 has its CatchHandler @ 0018b7f2 */ std::__cxx11::string::_M_construct<char_const*>(local_a8,&DAT_001f4bcf,&DAT_001f4bd0); /* try { // try from 0018b476 to 0018b48a has its CatchHandler @ 0018b7f0 */ consumeToken(&local_88); lVar4 = local_80; if (local_88 != local_78) { operator_delete(local_88,local_78[0] + 1); } if (local_a8[0] != local_98) { operator_delete(local_a8[0],local_98[0] + 1); } if (lVar4 == 0) { local_38 = &local_68; local_48 = in_RDI; /* try { // try from 0018b518 to 0018b51c has its CatchHandler @ 0018b826 */ parseDictionary()::{lambda()#1}::operator()(local_40); do { if (in_RSI[4] == in_RSI[3]) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0018b793 to 0018b7a1 has its CatchHandler @ 0018b819 */ std::runtime_error::runtime_error(this,"Expected closing brace"); LAB_0018b7a2: /* try { // try from 0018b7a2 to 0018b7b7 has its CatchHandler @ 0018b826 */ /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60); } local_a8[0] = local_98; /* try { // try from 0018b548 to 0018b559 has its CatchHandler @ 0018b82a */ std::__cxx11::string::_M_construct<char_const*>(local_a8,&DAT_001f08e6,&DAT_001f08e7); /* try { // try from 0018b55a to 0018b56c has its CatchHandler @ 0018b83f */ consumeToken(&local_88); lVar4 = local_80; if (local_88 != local_78) { operator_delete(local_88,local_78[0] + 1); } if (local_a8[0] != local_98) { operator_delete(local_a8[0],local_98[0] + 1); } if (lVar4 == 0) { local_a8[0] = local_98; /* try { // try from 0018b5c6 to 0018b5d8 has its CatchHandler @ 0018b7dc */ std::__cxx11::string::_M_construct<char_const*>(local_a8,&DAT_001f4bcf,&DAT_001f4bd0); /* try { // try from 0018b5d9 to 0018b5ed has its CatchHandler @ 0018b7da */ consumeToken(&local_88); if (local_88 != local_78) { operator_delete(local_88,local_78[0] + 1); } if (local_a8[0] != local_98) { operator_delete(local_a8[0],local_98[0] + 1); } if (local_80 == 0) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0018b7c5 to 0018b7d3 has its CatchHandler @ 0018b7d6 */ std::runtime_error::runtime_error(this,"Expected comma or closing brace in dictionary"); goto LAB_0018b7a2; } uVar1 = *in_RSI; this_00 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1]; if (this_00 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_0022bf88 == '\0') { LOCK(); *(int *)(this_00 + 8) = *(int *)(this_00 + 8) + 1; UNLOCK(); } else { *(int *)(this_00 + 8) = *(int *)(this_00 + 8) + 1; } } lVar4 = in_RSI[4] - in_RSI[2]; /* try { // try from 0018b6b9 to 0018b6c2 has its CatchHandler @ 0018b7d8 */ puVar2 = (int8 *)operator_new(0x48); puVar3 = puVar2 + 2; puVar2[1] = 0x100000001; *puVar2 = &PTR___Sp_counted_ptr_inplace_0022a618; puVar2[2] = &PTR___cxa_pure_virtual_0022a3c8; puVar2[3] = uVar1; puVar2[4] = this_00; in_RDI = local_48; if (this_00 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) goto LAB_0018b71e; goto LAB_0018b707; } /* try { // try from 0018b5ae to 0018b5b5 has its CatchHandler @ 0018b828 */ parseDictionary()::{lambda()#1}::operator()(local_40); } while( true ); } uVar1 = *in_RSI; this_00 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1]; if (this_00 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_0022bf88 == '\0') { LOCK(); *(int *)(this_00 + 8) = *(int *)(this_00 + 8) + 1; UNLOCK(); } else { *(int *)(this_00 + 8) = *(int *)(this_00 + 8) + 1; } } lVar4 = in_RSI[4] - in_RSI[2]; /* try { // try from 0018b65e to 0018b667 has its CatchHandler @ 0018b7de */ puVar2 = (int8 *)operator_new(0x48); puVar3 = puVar2 + 2; puVar2[1] = 0x100000001; *puVar2 = &PTR___Sp_counted_ptr_inplace_0022a618; puVar2[2] = &PTR___cxa_pure_virtual_0022a3c8; puVar2[3] = uVar1; puVar2[4] = this_00; if (this_00 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { LAB_0018b707: if (*PTR___libc_single_threaded_0022bf88 == '\0') { LOCK(); *(int *)(this_00 + 8) = *(int *)(this_00 + 8) + 1; UNLOCK(); } else { *(int *)(this_00 + 8) = *(int *)(this_00 + 8) + 1; } } LAB_0018b71e: puVar2[5] = lVar4; puVar2[2] = &PTR_do_evaluate_0022a668; puVar2[6] = local_68; puVar2[7] = uStack_60; puVar2[8] = local_58; local_68 = 0; uStack_60 = 0; local_58 = 0; *in_RDI = puVar3; in_RDI[1] = puVar2; if (this_00 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(this_00); } std:: vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>,std::allocator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>> ::~vector((vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>,std::allocator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>>>> *)&local_68); } return in_RDI; }
61,666
_js_poll_interrupts
bluesky950520[P]quickjs/quickjs.c
int __js_poll_interrupts(JSContext *ctx) { JSRuntime *rt = ctx->rt; ctx->interrupt_counter = JS_INTERRUPT_COUNTER_INIT; if (rt->interrupt_handler) { if (rt->interrupt_handler(rt, rt->interrupt_opaque)) { /* XXX: should set a specific flag to avoid catching */ JS_ThrowInternalError(ctx, "interrupted"); JS_SetUncatchableError(ctx, ctx->rt->current_exception, TRUE); return -1; } } return 0; }
O0
c
_js_poll_interrupts: subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq 0x18(%rsp), %rax movq 0x18(%rax), %rax movq %rax, 0x10(%rsp) movq 0x18(%rsp), %rax movl $0x2710, 0x1d8(%rax) # imm = 0x2710 movq 0x10(%rsp), %rax cmpq $0x0, 0x110(%rax) je 0x666b7 movq 0x10(%rsp), %rax movq 0x110(%rax), %rax movq 0x10(%rsp), %rdi movq 0x10(%rsp), %rcx movq 0x118(%rcx), %rsi callq *%rax cmpl $0x0, %eax je 0x666b5 movq 0x18(%rsp), %rdi leaq 0xadc22(%rip), %rsi # 0x114297 movb $0x0, %al callq 0x337d0 movq %rax, (%rsp) movq %rdx, 0x8(%rsp) movq 0x18(%rsp), %rdi movq 0x18(%rsp), %rax movq 0x18(%rax), %rax movq 0xf0(%rax), %rsi movq 0xf8(%rax), %rdx movl $0x1, %ecx callq 0x3e550 movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF jmp 0x666bf jmp 0x666b7 movl $0x0, 0x24(%rsp) movl 0x24(%rsp), %eax addq $0x28, %rsp retq nopl (%rax,%rax)
__js_poll_interrupts: sub rsp, 28h mov [rsp+28h+var_10], rdi mov rax, [rsp+28h+var_10] mov rax, [rax+18h] mov [rsp+28h+var_18], rax mov rax, [rsp+28h+var_10] mov dword ptr [rax+1D8h], 2710h mov rax, [rsp+28h+var_18] cmp qword ptr [rax+110h], 0 jz short loc_666B7 mov rax, [rsp+28h+var_18] mov rax, [rax+110h] mov rdi, [rsp+28h+var_18] mov rcx, [rsp+28h+var_18] mov rsi, [rcx+118h] call rax cmp eax, 0 jz short loc_666B5 mov rdi, [rsp+28h+var_10] lea rsi, aInterrupted; "interrupted" mov al, 0 call JS_ThrowInternalError mov [rsp+28h+var_28], rax mov [rsp+28h+var_20], rdx mov rdi, [rsp+28h+var_10] mov rax, [rsp+28h+var_10] mov rax, [rax+18h] mov rsi, [rax+0F0h] mov rdx, [rax+0F8h] mov ecx, 1 call JS_SetUncatchableError mov [rsp+28h+var_4], 0FFFFFFFFh jmp short loc_666BF loc_666B5: jmp short $+2 loc_666B7: mov [rsp+28h+var_4], 0 loc_666BF: mov eax, [rsp+28h+var_4] add rsp, 28h retn
long long _js_poll_interrupts( long long a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, double a6, double a7, __m128 a8, __m128 a9) { long long v9; // rdx long long v10; // rcx long long v11; // r8 long long v12; // r9 __m128 v13; // xmm4 __m128 v14; // xmm5 char v16; // [rsp+0h] [rbp-28h] long long v17; // [rsp+10h] [rbp-18h] v17 = *(_QWORD *)(a1 + 24); *(_DWORD *)(a1 + 472) = 10000; if ( *(_QWORD *)(v17 + 272) && (*(unsigned int ( **)(long long, _QWORD))(v17 + 272))(v17, *(_QWORD *)(v17 + 280)) ) { JS_ThrowInternalError(a1, (long long)"interrupted", v9, v10, v11, v12, a2, a3, a4, a5, v13, v14, a8, a9, v16); JS_SetUncatchableError(a1, *(_QWORD *)(*(_QWORD *)(a1 + 24) + 240LL), *(_QWORD *)(*(_QWORD *)(a1 + 24) + 248LL), 1); return (unsigned int)-1; } else { return 0; } }
__js_poll_interrupts: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x18] MOV dword ptr [RAX + 0x1d8],0x2710 MOV RAX,qword ptr [RSP + 0x10] CMP qword ptr [RAX + 0x110],0x0 JZ 0x001666b7 MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0x110] MOV RDI,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RCX + 0x118] CALL RAX CMP EAX,0x0 JZ 0x001666b5 MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[0x214297] MOV AL,0x0 CALL 0x001337d0 MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x8],RDX MOV RDI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x18] MOV RSI,qword ptr [RAX + 0xf0] MOV RDX,qword ptr [RAX + 0xf8] MOV ECX,0x1 CALL 0x0013e550 MOV dword ptr [RSP + 0x24],0xffffffff JMP 0x001666bf LAB_001666b5: JMP 0x001666b7 LAB_001666b7: MOV dword ptr [RSP + 0x24],0x0 LAB_001666bf: MOV EAX,dword ptr [RSP + 0x24] ADD RSP,0x28 RET
int4 __js_poll_interrupts(long param_1) { long lVar1; int iVar2; int8 in_R8; int8 in_R9; int1 auVar3 [16]; int4 local_4; lVar1 = *(long *)(param_1 + 0x18); *(int4 *)(param_1 + 0x1d8) = 10000; if ((*(long *)(lVar1 + 0x110) == 0) || (iVar2 = (**(code **)(lVar1 + 0x110))(lVar1,*(int8 *)(lVar1 + 0x118)), iVar2 == 0)) { local_4 = 0; } else { auVar3 = JS_ThrowInternalError(param_1,"interrupted"); JS_SetUncatchableError (param_1,*(int8 *)(*(long *)(param_1 + 0x18) + 0xf0), *(int8 *)(*(long *)(param_1 + 0x18) + 0xf8),1,in_R8,in_R9,auVar3); local_4 = 0xffffffff; } return local_4; }
61,667
_js_poll_interrupts
bluesky950520[P]quickjs/quickjs.c
int __js_poll_interrupts(JSContext *ctx) { JSRuntime *rt = ctx->rt; ctx->interrupt_counter = JS_INTERRUPT_COUNTER_INIT; if (rt->interrupt_handler) { if (rt->interrupt_handler(rt, rt->interrupt_opaque)) { /* XXX: should set a specific flag to avoid catching */ JS_ThrowInternalError(ctx, "interrupted"); JS_SetUncatchableError(ctx, ctx->rt->current_exception, TRUE); return -1; } } return 0; }
O2
c
_js_poll_interrupts: pushq %r14 pushq %rbx pushq %rax movq %rdi, %r14 movq 0x18(%rdi), %rdi movl $0x2710, 0x1d8(%r14) # imm = 0x2710 movq 0x110(%rdi), %rax xorl %ebx, %ebx testq %rax, %rax je 0x39a13 movq 0x118(%rdi), %rsi callq *%rax testl %eax, %eax je 0x39a13 leaq 0x4f814(%rip), %rsi # 0x891fb movq %r14, %rdi xorl %eax, %eax callq 0x20321 movq 0x18(%r14), %rax pushq $-0x1 popq %rbx cmpl $-0x1, 0xf8(%rax) jne 0x39a13 movq 0xf0(%rax), %rax cmpw $0x3, 0x6(%rax) jne 0x39a13 orb $0x20, 0x5(%rax) movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r14 retq
__js_poll_interrupts: push r14 push rbx push rax mov r14, rdi mov rdi, [rdi+18h] mov dword ptr [r14+1D8h], 2710h mov rax, [rdi+110h] xor ebx, ebx test rax, rax jz short loc_39A13 mov rsi, [rdi+118h] call rax test eax, eax jz short loc_39A13 lea rsi, aInterrupted; "interrupted" mov rdi, r14 xor eax, eax call JS_ThrowInternalError mov rax, [r14+18h] push 0FFFFFFFFFFFFFFFFh pop rbx cmp dword ptr [rax+0F8h], 0FFFFFFFFh jnz short loc_39A13 mov rax, [rax+0F0h] cmp word ptr [rax+6], 3 jnz short loc_39A13 or byte ptr [rax+5], 20h loc_39A13: mov eax, ebx add rsp, 8 pop rbx pop r14 retn
long long _js_poll_interrupts( long long a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, double a6, double a7, __m128 a8, __m128 a9) { char v9; // al long long v11; // rdi unsigned int ( *v12)(long long, _QWORD); // rax unsigned int v13; // ebx long long v14; // rdx long long v15; // rcx long long v16; // r8 long long v17; // r9 __m128 v18; // xmm4 __m128 v19; // xmm5 long long v20; // rax long long v21; // rax char v23; // [rsp-8h] [rbp-18h] v23 = v9; v11 = *(_QWORD *)(a1 + 24); *(_DWORD *)(a1 + 472) = 10000; v12 = *(unsigned int ( **)(long long, _QWORD))(v11 + 272); v13 = 0; if ( v12 ) { if ( v12(v11, *(_QWORD *)(v11 + 280)) ) { JS_ThrowInternalError(a1, (long long)"interrupted", v14, v15, v16, v17, a2, a3, a4, a5, v18, v19, a8, a9, v23); v20 = *(_QWORD *)(a1 + 24); v13 = -1; if ( *(_DWORD *)(v20 + 248) == -1 ) { v21 = *(_QWORD *)(v20 + 240); if ( *(_WORD *)(v21 + 6) == 3 ) *(_BYTE *)(v21 + 5) |= 0x20u; } } } return v13; }
__js_poll_interrupts: PUSH R14 PUSH RBX PUSH RAX MOV R14,RDI MOV RDI,qword ptr [RDI + 0x18] MOV dword ptr [R14 + 0x1d8],0x2710 MOV RAX,qword ptr [RDI + 0x110] XOR EBX,EBX TEST RAX,RAX JZ 0x00139a13 MOV RSI,qword ptr [RDI + 0x118] CALL RAX TEST EAX,EAX JZ 0x00139a13 LEA RSI,[0x1891fb] MOV RDI,R14 XOR EAX,EAX CALL 0x00120321 MOV RAX,qword ptr [R14 + 0x18] PUSH -0x1 POP RBX CMP dword ptr [RAX + 0xf8],-0x1 JNZ 0x00139a13 MOV RAX,qword ptr [RAX + 0xf0] CMP word ptr [RAX + 0x6],0x3 JNZ 0x00139a13 OR byte ptr [RAX + 0x5],0x20 LAB_00139a13: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R14 RET
int4 __js_poll_interrupts(long param_1) { byte *pbVar1; long lVar2; int iVar3; int4 uVar4; lVar2 = *(long *)(param_1 + 0x18); *(int4 *)(param_1 + 0x1d8) = 10000; uVar4 = 0; if (*(code **)(lVar2 + 0x110) != (code *)0x0) { iVar3 = (**(code **)(lVar2 + 0x110))(lVar2,*(int8 *)(lVar2 + 0x118)); if (iVar3 != 0) { JS_ThrowInternalError(param_1,"interrupted"); uVar4 = 0xffffffff; if ((*(int *)(*(long *)(param_1 + 0x18) + 0xf8) == -1) && (lVar2 = *(long *)(*(long *)(param_1 + 0x18) + 0xf0), *(short *)(lVar2 + 6) == 3)) { pbVar1 = (byte *)(lVar2 + 5); *pbVar1 = *pbVar1 | 0x20; } } } return uVar4; }
61,668
minja::IfExpr::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 { if (!condition) throw std::runtime_error("IfExpr.condition is null"); if (!then_expr) throw std::runtime_error("IfExpr.then_expr is null"); if (condition->evaluate(context).to_bool()) { return then_expr->evaluate(context); } if (else_expr) { return else_expr->evaluate(context); } return nullptr; }
O3
cpp
minja::IfExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x50, %rsp movq %rsi, %r15 movq 0x20(%rsi), %rsi testq %rsi, %rsi je 0x7645b cmpq $0x0, 0x30(%r15) je 0x76479 movq %rdx, %r14 movq %rdi, %rbx movq %rsp, %r12 movq %r12, %rdi callq 0x65552 movq %r12, %rdi callq 0x65750 movl %eax, %ebp leaq 0x40(%rsp), %r12 movq %r12, %rdi xorl %esi, %esi callq 0x31156 movq %r12, %rdi callq 0x364a4 movq -0x8(%r12), %rdi testq %rdi, %rdi je 0x7639a callq 0x309ec movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x763a9 callq 0x309ec movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x763b8 callq 0x309ec movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x763ee movq 0x74bcf(%rip), %rax # 0xeaf98 cmpb $0x0, (%rax) je 0x763d9 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x763e3 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x763ee movq (%rdi), %rax callq *0x18(%rax) testb %bpl, %bpl je 0x763f9 movq 0x30(%r15), %rsi jmp 0x76402 movq 0x40(%r15), %rsi testq %rsi, %rsi je 0x7641d movq %rbx, %rdi movq %r14, %rdx callq 0x65552 movq %rbx, %rax addq $0x50, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x40(%rbx), %r14 movq $0x0, 0x48(%rbx) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movups %xmm0, 0x10(%rbx) movups %xmm0, 0x20(%rbx) movups %xmm0, 0x30(%rbx) movb $0x0, 0x40(%rbx) movq %r14, %rdi movl $0x1, %esi callq 0x31156 movq %r14, %rdi movl $0x1, %esi callq 0x31156 jmp 0x7640d movl $0x10, %edi callq 0x19370 movq %rax, %r14 leaq 0x44c74(%rip), %rsi # 0xbb0e3 movq %rax, %rdi callq 0x19280 jmp 0x76495 movl $0x10, %edi callq 0x19370 movq %rax, %r14 leaq 0x44c6f(%rip), %rsi # 0xbb0fc movq %rax, %rdi callq 0x19280 movq 0x74b54(%rip), %rsi # 0xeaff0 movq 0x74acd(%rip), %rdx # 0xeaf70 movq %r14, %rdi callq 0x19ba0 jmp 0x764ad movq %rax, %rbx movq %r14, %rdi callq 0x19510 jmp 0x764c5 movq %rax, %rbx movq %rsp, %rdi callq 0x65844 movq %rbx, %rdi callq 0x19c00 nop
_ZNK5minja6IfExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE: push rbp push r15 push r14 push r12 push rbx sub rsp, 50h mov r15, rsi mov rsi, [rsi+20h] test rsi, rsi jz loc_7645B cmp qword ptr [r15+30h], 0 jz loc_76479 mov r14, rdx mov rbx, rdi mov r12, rsp mov rdi, r12 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov rdi, r12; this call _ZNK5minja5Value7to_boolEv; minja::Value::to_bool(void) mov ebp, eax lea r12, [rsp+78h+var_38] 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, [r12-8] test rdi, rdi jz short loc_7639A call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_7639A: mov rdi, [rsp+78h+var_50] test rdi, rdi jz short loc_763A9 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_763A9: mov rdi, [rsp+78h+var_60] test rdi, rdi jz short loc_763B8 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_763B8: mov rdi, [rsp+78h+var_70] test rdi, rdi jz short loc_763EE mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_763D9 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_763E3 loc_763D9: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_763E3: cmp eax, 1 jnz short loc_763EE mov rax, [rdi] call qword ptr [rax+18h] loc_763EE: test bpl, bpl jz short loc_763F9 mov rsi, [r15+30h] jmp short loc_76402 loc_763F9: mov rsi, [r15+40h] test rsi, rsi jz short loc_7641D loc_76402: mov rdi, rbx mov rdx, r14 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) loc_7640D: mov rax, rbx add rsp, 50h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_7641D: lea r14, [rbx+40h] mov qword ptr [rbx+48h], 0 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 mov byte ptr [rbx+40h], 0 mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) jmp short loc_7640D loc_7645B: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aIfexprConditio; "IfExpr.condition is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_76495 loc_76479: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aIfexprThenExpr; "IfExpr.then_expr is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_76495: mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short $+2 loc_764AD: mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_764C5 mov rbx, rax mov rdi, rsp; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_764C5: mov rdi, rbx call __Unwind_Resume
long long minja::IfExpr::do_evaluate(long long a1, _QWORD *a2) { void (***v3)(void); // rsi char v5; // bp long long v6; // rdi signed __int32 v7; // eax void (***v8)(void); // rsi std::runtime_error *exception; // r14 long long v11; // [rsp+0h] [rbp-78h] BYREF long long v12; // [rsp+8h] [rbp-70h] volatile signed __int32 *v13; // [rsp+18h] [rbp-60h] volatile signed __int32 *v14; // [rsp+28h] [rbp-50h] volatile signed __int32 *v15; // [rsp+38h] [rbp-40h] char v16[56]; // [rsp+40h] [rbp-38h] BYREF v3 = (void (***)(void))a2[4]; if ( !v3 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "IfExpr.condition is null"); goto LABEL_23; } if ( !a2[6] ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "IfExpr.then_expr is null"); LABEL_23: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)&v11, v3); v5 = minja::Value::to_bool((minja::Value *)&v11); 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(v16); 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(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); if ( v13 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v13); v6 = v12; if ( v12 ) { if ( _libc_single_threaded ) { v7 = *(_DWORD *)(v12 + 12); *(_DWORD *)(v12 + 12) = v7 - 1; } else { v7 = _InterlockedExchangeAdd((volatile signed __int32 *)(v12 + 12), 0xFFFFFFFF); } if ( v7 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v6 + 24LL))(v6, 0LL); } if ( v5 ) { v8 = (void (***)(void))a2[6]; } else { v8 = (void (***)(void))a2[8]; if ( !v8 ) { *(_QWORD *)(a1 + 72) = 0LL; *(_OWORD *)a1 = 0LL; *(_OWORD *)(a1 + 16) = 0LL; *(_OWORD *)(a1 + 32) = 0LL; *(_OWORD *)(a1 + 48) = 0LL; *(_BYTE *)(a1 + 64) = 0; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a1 + 64)); 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 + 64)); return a1; } } minja::Expression::evaluate(a1, v8); return a1; }
do_evaluate: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x50 MOV R15,RSI MOV RSI,qword ptr [RSI + 0x20] TEST RSI,RSI JZ 0x0017645b CMP qword ptr [R15 + 0x30],0x0 JZ 0x00176479 MOV R14,RDX MOV RBX,RDI MOV R12,RSP MOV RDI,R12 CALL 0x00165552 LAB_0017636a: MOV RDI,R12 CALL 0x00165750 LAB_00176372: MOV EBP,EAX LEA R12,[RSP + 0x40] MOV RDI,R12 XOR ESI,ESI CALL 0x00131156 MOV RDI,R12 CALL 0x001364a4 MOV RDI,qword ptr [R12 + -0x8] TEST RDI,RDI JZ 0x0017639a CALL 0x001309ec LAB_0017639a: MOV RDI,qword ptr [RSP + 0x28] TEST RDI,RDI JZ 0x001763a9 CALL 0x001309ec LAB_001763a9: MOV RDI,qword ptr [RSP + 0x18] TEST RDI,RDI JZ 0x001763b8 CALL 0x001309ec LAB_001763b8: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x001763ee MOV RAX,qword ptr [0x001eaf98] CMP byte ptr [RAX],0x0 JZ 0x001763d9 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001763e3 LAB_001763d9: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001763e3: CMP EAX,0x1 JNZ 0x001763ee MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001763ee: TEST BPL,BPL JZ 0x001763f9 MOV RSI,qword ptr [R15 + 0x30] JMP 0x00176402 LAB_001763f9: MOV RSI,qword ptr [R15 + 0x40] TEST RSI,RSI JZ 0x0017641d LAB_00176402: MOV RDI,RBX MOV RDX,R14 CALL 0x00165552 LAB_0017640d: MOV RAX,RBX ADD RSP,0x50 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0017641d: LEA R14,[RBX + 0x40] MOV qword ptr [RBX + 0x48],0x0 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 MOV byte ptr [RBX + 0x40],0x0 MOV RDI,R14 MOV ESI,0x1 CALL 0x00131156 MOV RDI,R14 MOV ESI,0x1 CALL 0x00131156 JMP 0x0017640d LAB_0017645b: MOV EDI,0x10 CALL 0x00119370 MOV R14,RAX LAB_00176468: LEA RSI,[0x1bb0e3] MOV RDI,RAX CALL 0x00119280 LAB_00176477: JMP 0x00176495 LAB_00176479: MOV EDI,0x10 CALL 0x00119370 MOV R14,RAX LAB_00176486: LEA RSI,[0x1bb0fc] MOV RDI,RAX CALL 0x00119280 LAB_00176495: MOV RSI,qword ptr [0x001eaff0] MOV RDX,qword ptr [0x001eaf70] MOV RDI,R14 CALL 0x00119ba0
/* minja::IfExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */ IfExpr * __thiscall minja::IfExpr::do_evaluate(IfExpr *this,shared_ptr *param_1) { int *piVar1; char cVar2; int iVar3; runtime_error *this_00; shared_ptr *psVar4; bool bVar5; Expression aEStack_78 [8]; long *local_70; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_60; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_50; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40; data local_38 [16]; if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) { this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00176468 to 00176476 has its CatchHandler @ 001764ad */ std::runtime_error::runtime_error(this_00,"IfExpr.condition is null"); } else { if (*(long *)(param_1 + 0x30) != 0) { Expression::evaluate(aEStack_78,*(shared_ptr **)(param_1 + 0x20)); /* try { // try from 0017636a to 00176371 has its CatchHandler @ 001764ba */ cVar2 = Value::to_bool((Value *)aEStack_78); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_38,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_38); if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40); } if (local_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_50); } if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_60); } if (local_70 != (long *)0x0) { if (*PTR___libc_single_threaded_001eaf98 == '\0') { LOCK(); piVar1 = (int *)((long)local_70 + 0xc); iVar3 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar3 = *(int *)((long)local_70 + 0xc); *(int *)((long)local_70 + 0xc) = iVar3 + -1; } if (iVar3 == 1) { (**(code **)(*local_70 + 0x18))(); } } if (cVar2 == '\0') { psVar4 = *(shared_ptr **)(param_1 + 0x40); if (psVar4 == (shared_ptr *)0x0) { bVar5 = (bool)((char)this + '@'); *(int8 *)(this + 0x48) = 0; *(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; this[0x40] = (IfExpr)0x0; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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(bVar5); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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(bVar5); return this; } } else { psVar4 = *(shared_ptr **)(param_1 + 0x30); } Expression::evaluate((Expression *)this,psVar4); return this; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00176486 to 00176494 has its CatchHandler @ 001764ab */ std::runtime_error::runtime_error(this_00,"IfExpr.then_expr is null"); } /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_001eaff0,PTR__runtime_error_001eaf70); }
61,669
CLI::Option::_add_result(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, 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
MikePodsytnik[P]TCRtrie/build_O0/_deps/cli11-src/include/CLI/impl/Option_inl.hpp
CLI11_INLINE int Option::_add_result(std::string &&result, std::vector<std::string> &res) const { int result_count = 0; if(allow_extra_args_ && !result.empty() && result.front() == '[' && result.back() == ']') { // this is now a vector string likely from the default or user entry result.pop_back(); for(auto &var : CLI::detail::split(result.substr(1), ',')) { if(!var.empty()) { result_count += _add_result(std::move(var), res); } } return result_count; } if(delimiter_ == '\0') { res.push_back(std::move(result)); ++result_count; } else { if((result.find_first_of(delimiter_) != std::string::npos)) { for(const auto &var : CLI::detail::split(result, delimiter_)) { if(!var.empty()) { res.push_back(var); ++result_count; } } } else { res.push_back(std::move(result)); ++result_count; } } return result_count; }
O0
cpp
CLI::Option::_add_result(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&) const: pushq %rbp movq %rsp, %rbp subq $0xe0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq %rax, -0xd0(%rbp) movl $0x0, -0x24(%rbp) testb $0x1, 0x249(%rax) je 0x3d3cd movq -0x18(%rbp), %rdi callq 0x99c0 testb $0x1, %al jne 0x3d3cd movq -0x18(%rbp), %rdi callq 0x9160 movsbl (%rax), %eax cmpl $0x5b, %eax jne 0x3d3cd movq -0x18(%rbp), %rdi callq 0x9450 movsbl (%rax), %eax cmpl $0x5d, %eax jne 0x3d3cd movq -0x18(%rbp), %rdi callq 0x9780 movq -0x18(%rbp), %rsi leaq -0x68(%rbp), %rdi movq %rdi, -0xd8(%rbp) movl $0x1, %edx movq $-0x1, %rcx callq 0x9640 movq -0xd8(%rbp), %rsi leaq -0x48(%rbp), %rdi movl $0x2c, %edx callq 0x182b0 jmp 0x3d2e1 leaq -0x68(%rbp), %rdi callq 0x9b90 leaq -0x48(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rdi callq 0xd5a0 movq %rax, -0x80(%rbp) movq -0x30(%rbp), %rdi callq 0xd890 movq %rax, -0x88(%rbp) leaq -0x80(%rbp), %rdi leaq -0x88(%rbp), %rsi callq 0xd8c0 testb $0x1, %al jne 0x3d34b leaq -0x48(%rbp), %rdi callq 0xe270 jmp 0x3d3c2 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x70(%rbp) movl %eax, -0x74(%rbp) leaq -0x68(%rbp), %rdi callq 0x9b90 jmp 0x3d527 leaq -0x80(%rbp), %rdi callq 0xd900 movq %rax, -0x90(%rbp) movq -0x90(%rbp), %rdi callq 0x99c0 testb $0x1, %al jne 0x3d3b2 movq -0xd0(%rbp), %rdi movq -0x90(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x3d230 movl %eax, -0xdc(%rbp) jmp 0x3d38a movl -0xdc(%rbp), %eax addl -0x24(%rbp), %eax movl %eax, -0x24(%rbp) jmp 0x3d3b2 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x70(%rbp) movl %eax, -0x74(%rbp) leaq -0x48(%rbp), %rdi callq 0xe270 jmp 0x3d527 jmp 0x3d3b4 leaq -0x80(%rbp), %rdi callq 0xf1b0 jmp 0x3d30f movl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x3d51b movq -0xd0(%rbp), %rax movsbl 0x25(%rax), %eax cmpl $0x0, %eax jne 0x3d3f8 movq -0x20(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x1e130 movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0x3d515 movq -0xd0(%rbp), %rax movq -0x18(%rbp), %rdi xorl %ecx, %ecx movl %ecx, %edx movsbl 0x25(%rax), %esi callq 0x93b0 cmpq $-0x1, %rax je 0x3d4fd movq -0xd0(%rbp), %rax movq -0x18(%rbp), %rsi leaq -0xb0(%rbp), %rdi movsbl 0x25(%rax), %edx callq 0x182b0 leaq -0xb0(%rbp), %rax movq %rax, -0x98(%rbp) movq -0x98(%rbp), %rdi callq 0xd5a0 movq %rax, -0xb8(%rbp) movq -0x98(%rbp), %rdi callq 0xd890 movq %rax, -0xc0(%rbp) leaq -0xb8(%rbp), %rdi leaq -0xc0(%rbp), %rsi callq 0xd8c0 testb $0x1, %al jne 0x3d48e leaq -0xb0(%rbp), %rdi callq 0xe270 jmp 0x3d4fb leaq -0xb8(%rbp), %rdi callq 0xd900 movq %rax, -0xc8(%rbp) movq -0xc8(%rbp), %rdi callq 0x99c0 testb $0x1, %al jne 0x3d4e8 movq -0x20(%rbp), %rdi movq -0xc8(%rbp), %rsi callq 0x18510 jmp 0x3d4c3 movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0x3d4e8 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x70(%rbp) movl %eax, -0x74(%rbp) leaq -0xb0(%rbp), %rdi callq 0xe270 jmp 0x3d527 jmp 0x3d4ea leaq -0xb8(%rbp), %rdi callq 0xf1b0 jmp 0x3d469 jmp 0x3d513 movq -0x20(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x1e130 movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0x3d515 movl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0xe0, %rsp popq %rbp retq movq -0x70(%rbp), %rdi callq 0x9a70
_ZNK3CLI6Option11_add_resultEONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIS6_SaIS6_EE: push rbp mov rbp, rsp sub rsp, 0E0h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov [rbp+var_D0], rax mov [rbp+var_24], 0 test byte ptr [rax+249h], 1 jz loc_3D3CD mov rdi, [rbp+var_18] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz loc_3D3CD mov rdi, [rbp+var_18] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5frontEv; std::string::front(void) movsx eax, byte ptr [rax] cmp eax, 5Bh ; '[' jnz loc_3D3CD mov rdi, [rbp+var_18] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4backEv; std::string::back(void) movsx eax, byte ptr [rax] cmp eax, 5Dh ; ']' jnz loc_3D3CD mov rdi, [rbp+var_18] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8pop_backEv; std::string::pop_back(void) mov rsi, [rbp+var_18] lea rdi, [rbp+var_68] mov [rbp+var_D8], rdi mov edx, 1 mov rcx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rsi, [rbp+var_D8] lea rdi, [rbp+var_48] mov edx, 2Ch ; ',' call _ZN3CLI6detail5splitERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc; CLI::detail::split(std::string const&,char) jmp short $+2 loc_3D2E1: lea rdi, [rbp+var_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rax, [rbp+var_48] mov [rbp+var_30], rax mov rdi, [rbp+var_30] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void) mov [rbp+var_80], rax mov rdi, [rbp+var_30] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void) mov [rbp+var_88], rax loc_3D30F: lea rdi, [rbp+var_80] lea rsi, [rbp+var_88] call _ZN9__gnu_cxxneIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_; __gnu_cxx::operator!=<std::string *,std::vector<std::string>>(__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>> const&,__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>> const&) test al, 1 jnz short loc_3D34B lea rdi, [rbp+var_48] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp loc_3D3C2 mov rcx, rax mov eax, edx mov [rbp+var_70], rcx mov [rbp+var_74], eax lea rdi, [rbp+var_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_3D527 loc_3D34B: lea rdi, [rbp+var_80] call _ZNK9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEdeEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator*(void) mov [rbp+var_90], rax mov rdi, [rbp+var_90] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz short loc_3D3B2 mov rdi, [rbp+var_D0] mov rsi, [rbp+var_90] mov rdx, [rbp+var_20] call _ZNK3CLI6Option11_add_resultEONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIS6_SaIS6_EE; CLI::Option::_add_result(std::string &&,std::vector<std::string> &) mov [rbp+var_DC], eax jmp short $+2 loc_3D38A: mov eax, [rbp+var_DC] add eax, [rbp+var_24] mov [rbp+var_24], eax jmp short loc_3D3B2 mov rcx, rax mov eax, edx mov [rbp+var_70], rcx mov [rbp+var_74], eax lea rdi, [rbp+var_48] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp loc_3D527 loc_3D3B2: jmp short $+2 loc_3D3B4: lea rdi, [rbp+var_80] call _ZN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEppEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(void) jmp loc_3D30F loc_3D3C2: mov eax, [rbp+var_24] mov [rbp+var_4], eax jmp loc_3D51B loc_3D3CD: mov rax, [rbp+var_D0] movsx eax, byte ptr [rax+25h] cmp eax, 0 jnz short loc_3D3F8 mov rdi, [rbp+var_20] mov rsi, [rbp+var_18] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_; std::vector<std::string>::push_back(std::string&&) mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp loc_3D515 loc_3D3F8: mov rax, [rbp+var_D0] mov rdi, [rbp+var_18] xor ecx, ecx mov edx, ecx movsx esi, byte ptr [rax+25h] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE13find_first_ofEcm; std::string::find_first_of(char,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jz loc_3D4FD mov rax, [rbp+var_D0] mov rsi, [rbp+var_18] lea rdi, [rbp+var_B0] movsx edx, byte ptr [rax+25h] call _ZN3CLI6detail5splitERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc; CLI::detail::split(std::string const&,char) lea rax, [rbp+var_B0] mov [rbp+var_98], rax mov rdi, [rbp+var_98] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void) mov [rbp+var_B8], rax mov rdi, [rbp+var_98] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void) mov [rbp+var_C0], rax loc_3D469: lea rdi, [rbp+var_B8] lea rsi, [rbp+var_C0] call _ZN9__gnu_cxxneIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_; __gnu_cxx::operator!=<std::string *,std::vector<std::string>>(__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>> const&,__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>> const&) test al, 1 jnz short loc_3D48E lea rdi, [rbp+var_B0] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp short loc_3D4FB loc_3D48E: lea rdi, [rbp+var_B8] call _ZNK9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEdeEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator*(void) mov [rbp+var_C8], rax mov rdi, [rbp+var_C8] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz short loc_3D4E8 mov rdi, [rbp+var_20] mov rsi, [rbp+var_C8] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_; std::vector<std::string>::push_back(std::string const&) jmp short $+2 loc_3D4C3: mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp short loc_3D4E8 mov rcx, rax mov eax, edx mov [rbp+var_70], rcx mov [rbp+var_74], eax lea rdi, [rbp+var_B0] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp short loc_3D527 loc_3D4E8: jmp short $+2 loc_3D4EA: lea rdi, [rbp+var_B8] call _ZN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEppEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(void) jmp loc_3D469 loc_3D4FB: jmp short loc_3D513 loc_3D4FD: mov rdi, [rbp+var_20] mov rsi, [rbp+var_18] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_; std::vector<std::string>::push_back(std::string&&) mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax loc_3D513: jmp short $+2 loc_3D515: mov eax, [rbp+var_24] mov [rbp+var_4], eax loc_3D51B: mov eax, [rbp+var_4] add rsp, 0E0h pop rbp retn loc_3D527: mov rdi, [rbp+var_70] call __Unwind_Resume
long long CLI::Option::_add_result(long long a1, long long a2, long long a3) { int v4; // [rsp+4h] [rbp-DCh] long long v5; // [rsp+18h] [rbp-C8h] long long v6; // [rsp+20h] [rbp-C0h] BYREF long long v7; // [rsp+28h] [rbp-B8h] BYREF long long v8[3]; // [rsp+30h] [rbp-B0h] BYREF long long *v9; // [rsp+48h] [rbp-98h] long long v10; // [rsp+50h] [rbp-90h] long long v11; // [rsp+58h] [rbp-88h] BYREF long long v12; // [rsp+60h] [rbp-80h] BYREF _BYTE v13[32]; // [rsp+78h] [rbp-68h] BYREF long long v14[3]; // [rsp+98h] [rbp-48h] BYREF long long *v15; // [rsp+B0h] [rbp-30h] unsigned int v16; // [rsp+BCh] [rbp-24h] long long v17; // [rsp+C0h] [rbp-20h] long long v18; // [rsp+C8h] [rbp-18h] long long v19; // [rsp+D0h] [rbp-10h] v19 = a1; v18 = a2; v17 = a3; v16 = 0; if ( (*(_BYTE *)(a1 + 585) & 1) != 0 && (std::string::empty(v18) & 1) == 0 && *(_BYTE *)std::string::front(v18) == 91 && *(_BYTE *)std::string::back(v18) == 93 ) { std::string::pop_back(v18); std::string::substr(v13, v18, 1LL, -1LL); CLI::detail::split((long long)v14, (long long)v13, 44); std::string::~string(v13); v15 = v14; v12 = std::vector<std::string>::begin((long long)v14); v11 = std::vector<std::string>::end((long long)v15); while ( __gnu_cxx::operator!=<std::string *,std::vector<std::string>>((long long)&v12, (long long)&v11) ) { v10 = __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator*((long long)&v12); if ( (std::string::empty(v10) & 1) == 0 ) { v4 = CLI::Option::_add_result(a1, v10, v17); v16 += v4; } __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(&v12); } std::vector<std::string>::~vector(v14); return v16; } else { if ( !*(_BYTE *)(a1 + 37) || std::string::find_first_of(v18, (unsigned int)*(char *)(a1 + 37), 0LL) == -1 ) { std::vector<std::string>::push_back(v17, v18); ++v16; } else { CLI::detail::split((long long)v8, v18, *(_BYTE *)(a1 + 37)); v9 = v8; v7 = std::vector<std::string>::begin((long long)v8); v6 = std::vector<std::string>::end((long long)v9); while ( __gnu_cxx::operator!=<std::string *,std::vector<std::string>>((long long)&v7, (long long)&v6) ) { v5 = __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator*((long long)&v7); if ( (std::string::empty(v5) & 1) == 0 ) { std::vector<std::string>::push_back(v17, v5); ++v16; } __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(&v7); } std::vector<std::string>::~vector(v8); } return v16; } }
_add_result: PUSH RBP MOV RBP,RSP SUB RSP,0xe0 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0xd0],RAX MOV dword ptr [RBP + -0x24],0x0 TEST byte ptr [RAX + 0x249],0x1 JZ 0x0013d3cd MOV RDI,qword ptr [RBP + -0x18] CALL 0x001099c0 TEST AL,0x1 JNZ 0x0013d3cd MOV RDI,qword ptr [RBP + -0x18] CALL 0x00109160 MOVSX EAX,byte ptr [RAX] CMP EAX,0x5b JNZ 0x0013d3cd MOV RDI,qword ptr [RBP + -0x18] CALL 0x00109450 MOVSX EAX,byte ptr [RAX] CMP EAX,0x5d JNZ 0x0013d3cd MOV RDI,qword ptr [RBP + -0x18] CALL 0x00109780 MOV RSI,qword ptr [RBP + -0x18] LEA RDI,[RBP + -0x68] MOV qword ptr [RBP + -0xd8],RDI MOV EDX,0x1 MOV RCX,-0x1 CALL 0x00109640 MOV RSI,qword ptr [RBP + -0xd8] LAB_0013d2d1: LEA RDI,[RBP + -0x48] MOV EDX,0x2c CALL 0x001182b0 JMP 0x0013d2e1 LAB_0013d2e1: LEA RDI,[RBP + -0x68] CALL 0x00109b90 LEA RAX,[RBP + -0x48] MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x30] CALL 0x0010d5a0 MOV qword ptr [RBP + -0x80],RAX MOV RDI,qword ptr [RBP + -0x30] CALL 0x0010d890 MOV qword ptr [RBP + -0x88],RAX LAB_0013d30f: LEA RDI,[RBP + -0x80] LEA RSI,[RBP + -0x88] CALL 0x0010d8c0 TEST AL,0x1 JNZ 0x0013d34b LEA RDI,[RBP + -0x48] CALL 0x0010e270 JMP 0x0013d3c2 LAB_0013d34b: LEA RDI,[RBP + -0x80] CALL 0x0010d900 MOV qword ptr [RBP + -0x90],RAX MOV RDI,qword ptr [RBP + -0x90] CALL 0x001099c0 TEST AL,0x1 JNZ 0x0013d3b2 MOV RDI,qword ptr [RBP + -0xd0] MOV RSI,qword ptr [RBP + -0x90] MOV RDX,qword ptr [RBP + -0x20] LAB_0013d37d: CALL 0x0013d230 LAB_0013d382: MOV dword ptr [RBP + -0xdc],EAX JMP 0x0013d38a LAB_0013d38a: MOV EAX,dword ptr [RBP + -0xdc] ADD EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x24],EAX JMP 0x0013d3b2 LAB_0013d3b2: JMP 0x0013d3b4 LAB_0013d3b4: LEA RDI,[RBP + -0x80] CALL 0x0010f1b0 JMP 0x0013d30f LAB_0013d3c2: MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4],EAX JMP 0x0013d51b LAB_0013d3cd: MOV RAX,qword ptr [RBP + -0xd0] MOVSX EAX,byte ptr [RAX + 0x25] CMP EAX,0x0 JNZ 0x0013d3f8 MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0011e130 MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x0013d515 LAB_0013d3f8: MOV RAX,qword ptr [RBP + -0xd0] MOV RDI,qword ptr [RBP + -0x18] XOR ECX,ECX MOV EDX,ECX MOVSX ESI,byte ptr [RAX + 0x25] CALL 0x001093b0 CMP RAX,-0x1 JZ 0x0013d4fd MOV RAX,qword ptr [RBP + -0xd0] MOV RSI,qword ptr [RBP + -0x18] LEA RDI,[RBP + -0xb0] MOVSX EDX,byte ptr [RAX + 0x25] CALL 0x001182b0 LEA RAX,[RBP + -0xb0] MOV qword ptr [RBP + -0x98],RAX MOV RDI,qword ptr [RBP + -0x98] CALL 0x0010d5a0 MOV qword ptr [RBP + -0xb8],RAX MOV RDI,qword ptr [RBP + -0x98] CALL 0x0010d890 MOV qword ptr [RBP + -0xc0],RAX LAB_0013d469: LEA RDI,[RBP + -0xb8] LEA RSI,[RBP + -0xc0] CALL 0x0010d8c0 TEST AL,0x1 JNZ 0x0013d48e LEA RDI,[RBP + -0xb0] CALL 0x0010e270 JMP 0x0013d4fb LAB_0013d48e: LEA RDI,[RBP + -0xb8] CALL 0x0010d900 MOV qword ptr [RBP + -0xc8],RAX MOV RDI,qword ptr [RBP + -0xc8] CALL 0x001099c0 TEST AL,0x1 JNZ 0x0013d4e8 MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0xc8] LAB_0013d4bc: CALL 0x00118510 LAB_0013d4c1: JMP 0x0013d4c3 LAB_0013d4c3: MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x0013d4e8 LAB_0013d4e8: JMP 0x0013d4ea LAB_0013d4ea: LEA RDI,[RBP + -0xb8] CALL 0x0010f1b0 JMP 0x0013d469 LAB_0013d4fb: JMP 0x0013d513 LAB_0013d4fd: MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0011e130 MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX LAB_0013d513: JMP 0x0013d515 LAB_0013d515: MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4],EAX LAB_0013d51b: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0xe0 POP RBP RET
/* CLI::Option::_add_result(std::__cxx11::string&&, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >&) const */ int __thiscall CLI::Option::_add_result(Option *this,string *param_1,vector *param_2) { bool bVar1; int iVar2; ulong uVar3; char *pcVar4; long lVar5; string *psVar6; int8 local_c8; int8 local_c0; detail local_b8 [24]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_a0; string *local_98; int8 local_90; int8 local_88 [3]; string local_70 [32]; detail local_50 [24]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_38; int local_2c; vector *local_28; string *local_20; Option *local_18; int local_c; local_2c = 0; local_28 = param_2; local_20 = param_1; local_18 = this; if ((((((byte)this[0x249] & 1) == 0) || (uVar3 = std::__cxx11::string::empty(), (uVar3 & 1) != 0)) || (pcVar4 = (char *)std::__cxx11::string::front(), *pcVar4 != '[')) || (pcVar4 = (char *)std::__cxx11::string::back(), *pcVar4 != ']')) { if (this[0x25] == (Option)0x0) { std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_28, local_20); local_2c = local_2c + 1; } else { lVar5 = std::__cxx11::string::find_first_of((char)local_20,(ulong)(uint)(int)(char)this[0x25]) ; if (lVar5 == -1) { std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_28, local_20); local_2c = local_2c + 1; } else { detail::split(local_b8,local_20,(char)this[0x25]); local_a0 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_b8; local_c0 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin (local_a0); local_c8 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end (local_a0); while (bVar1 = __gnu_cxx::operator!= ((__normal_iterator *)&local_c0,(__normal_iterator *)&local_c8), bVar1) { psVar6 = (string *) __gnu_cxx:: __normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator*((__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)&local_c0); uVar3 = std::__cxx11::string::empty(); if ((uVar3 & 1) == 0) { /* try { // try from 0013d4bc to 0013d4c0 has its CatchHandler @ 0013d4ce */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_28 ,psVar6); local_2c = local_2c + 1; } __gnu_cxx:: __normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator++((__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)&local_c0); } std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_b8); } } local_c = local_2c; } else { std::__cxx11::string::pop_back(); std::__cxx11::string::substr((ulong)local_70,(ulong)local_20); /* try { // try from 0013d2d1 to 0013d2de has its CatchHandler @ 0013d331 */ detail::split(local_50,local_70,','); std::__cxx11::string::~string(local_70); local_38 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_50; local_88[0] = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin (local_38); local_90 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end(local_38) ; while (bVar1 = __gnu_cxx::operator!= ((__normal_iterator *)local_88,(__normal_iterator *)&local_90), bVar1) { local_98 = (string *) __gnu_cxx:: __normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator*((__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)local_88); uVar3 = std::__cxx11::string::empty(); if ((uVar3 & 1) == 0) { /* try { // try from 0013d37d to 0013d381 has its CatchHandler @ 0013d398 */ iVar2 = _add_result(this,local_98,local_28); local_2c = iVar2 + local_2c; } __gnu_cxx:: __normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator++((__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)local_88); } std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_50); local_c = local_2c; } return local_c; }
61,670
SchemaConverter::_resolve_ref(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string _resolve_ref(const std::string & ref) { std::string ref_name = ref.substr(ref.find_last_of('/') + 1); if (_rules.find(ref_name) == _rules.end() && _refs_being_resolved.find(ref) == _refs_being_resolved.end()) { _refs_being_resolved.insert(ref); json resolved = _refs[ref]; ref_name = visit(resolved, ref_name); _refs_being_resolved.erase(ref); } return ref_name; }
O2
cpp
SchemaConverter::_resolve_ref(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx pushq $0x2f popq %rsi pushq $-0x1 popq %r12 movq %rdx, %rdi movq %r12, %rdx callq 0x24170 leaq 0x1(%rax), %rdx movq %rbx, %rdi movq %r14, %rsi movq %r12, %rcx callq 0x23960 leaq 0x28(%r15), %rdi movq %rbx, %rsi callq 0x8e81e leaq 0x30(%r15), %rcx cmpq %rcx, %rax jne 0x907b4 leaq 0x90(%r15), %r12 movq %r12, %rdi movq %r14, %rsi callq 0x91a9a testq %rax, %rax jne 0x907b4 movq %r12, %rdi movq %r14, %rsi callq 0x88ffe leaq 0x58(%r15), %rdi movq %r14, %rsi callq 0x91ac8 leaq 0x8(%rsp), %rdi movq %rax, %rsi callq 0x42224 leaq 0x18(%rsp), %rdi leaq 0x8(%rsp), %rdx movq %r15, %rsi movq %rbx, %rcx callq 0x8e9a4 leaq 0x18(%rsp), %r15 movq %rbx, %rdi movq %r15, %rsi callq 0x23b00 movq %r15, %rdi callq 0x241e8 movq %r12, %rdi movq %r14, %rsi callq 0x91ec6 leaq 0x8(%rsp), %rdi callq 0x3d4cc movq %rbx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq jmp 0x907c5 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x3d4cc jmp 0x907dd jmp 0x907da jmp 0x907da jmp 0x907da movq %rax, %r14 movq %rbx, %rdi callq 0x241e8 movq %r14, %rdi callq 0x23fb0 nop
_ZN15SchemaConverter12_resolve_refERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push r12 push rbx sub rsp, 38h mov r14, rdx mov r15, rsi mov rbx, rdi push 2Fh ; '/' pop rsi push 0FFFFFFFFFFFFFFFFh pop r12 mov rdi, rdx mov rdx, r12 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEcm; std::string::rfind(char,ulong) lea rdx, [rax+1] mov rdi, rbx mov rsi, r14 mov rcx, r12 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) lea rdi, [r15+28h] mov rsi, rbx call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE4findERS7_; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::find(std::string const&) lea rcx, [r15+30h] cmp rax, rcx jnz short loc_907B4 lea r12, [r15+90h] mov rdi, r12 mov rsi, r14 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_traitsILb1ELb1ELb1EEEE4findERKS5_; 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>>::find(std::string const&) test rax, rax jnz short loc_907B4 mov rdi, r12 mov rsi, r14 call _ZNSt8__detail12_Insert_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_SaIS6_ENS_9_IdentityESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb1ELb1EEEE6insertERKS6_; std::__detail::_Insert_base<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>>::insert(std::string const&) lea rdi, [r15+58h] mov rsi, r14 call _ZNSt8__detail9_Map_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS6_N8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS6_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESaISI_ENS_10_Select1stESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb0ELb1EEELb1EEixERS8_; std::__detail::_Map_base<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>,true>::operator[](std::string const&) lea rdi, [rsp+58h+var_50] mov rsi, rax call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) lea rdi, [rsp+58h+var_40] lea rdx, [rsp+58h+var_50] mov rsi, r15 mov rcx, rbx call _ZN15SchemaConverter5visitERKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_; SchemaConverter::visit(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::string const&) lea r15, [rsp+58h+var_40] mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, r15; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r12 mov rsi, r14 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_traitsILb1ELb1ELb1EEEE8_M_eraseESt17integral_constantIbLb1EERKS5_; 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>>::_M_erase(std::integral_constant<bool,true>,std::string const&) lea rdi, [rsp+58h+var_50] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() loc_907B4: mov rax, rbx add rsp, 38h pop rbx pop r12 pop r14 pop r15 retn jmp short $+2 loc_907C5: mov r14, rax lea rdi, [rsp+arg_0] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() jmp short loc_907DD jmp short loc_907DA jmp short loc_907DA jmp short $+2 loc_907DA: mov r14, rax loc_907DD: mov rdi, rbx; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14 call __Unwind_Resume
long long SchemaConverter::_resolve_ref(long long a1, long long a2, long long a3, __m128d a4) { long long v5; // rax long long v6; // rdx int v7; // ecx int v8; // r8d int v9; // r9d int v10; // edx int v11; // ecx int v12; // r8d int v13; // r9d unsigned __int8 *v14; // rax unsigned __int8 v16[16]; // [rsp+8h] [rbp-50h] BYREF _QWORD v17[8]; // [rsp+18h] [rbp-40h] BYREF v5 = std::string::rfind(a3, 47LL, -1LL); std::string::substr(a1, a3, v5 + 1, -1LL); if ( std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::find( a2 + 40, a1) == a2 + 48 && !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>>::find( a2 + 144, a3) ) { std::__detail::_Insert_base<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>>::insert( a2 + 144, a3, v6, v7, v8, v9); v14 = (unsigned __int8 *)std::__detail::_Map_base<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>,true>::operator[]( (int)a2 + 88, a3, v10, v11, v12, v13); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( v16, v14); SchemaConverter::visit(v17, a2, v16, a1, a4); std::string::operator=(a1, v17); std::string::~string(v17); 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>>::_M_erase( a2 + 144, a3); 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)v16); } return a1; }
_resolve_ref: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R14,RDX MOV R15,RSI MOV RBX,RDI PUSH 0x2f POP RSI PUSH -0x1 POP R12 MOV RDI,RDX MOV RDX,R12 CALL 0x00124170 LEA RDX,[RAX + 0x1] MOV RDI,RBX MOV RSI,R14 MOV RCX,R12 CALL 0x00123960 LEA RDI,[R15 + 0x28] LAB_00190726: MOV RSI,RBX CALL 0x0018e81e LEA RCX,[R15 + 0x30] CMP RAX,RCX JNZ 0x001907b4 LEA R12,[R15 + 0x90] LAB_0019073e: MOV RDI,R12 MOV RSI,R14 CALL 0x00191a9a TEST RAX,RAX JNZ 0x001907b4 LAB_0019074e: MOV RDI,R12 MOV RSI,R14 CALL 0x00188ffe LEA RDI,[R15 + 0x58] LAB_0019075d: MOV RSI,R14 CALL 0x00191ac8 LEA RDI,[RSP + 0x8] MOV RSI,RAX CALL 0x00142224 LAB_00190772: LEA RDI,[RSP + 0x18] LEA RDX,[RSP + 0x8] MOV RSI,R15 MOV RCX,RBX CALL 0x0018e9a4 LEA R15,[RSP + 0x18] MOV RDI,RBX MOV RSI,R15 CALL 0x00123b00 MOV RDI,R15 CALL 0x001241e8 LAB_0019079f: MOV RDI,R12 MOV RSI,R14 CALL 0x00191ec6 LAB_001907aa: LEA RDI,[RSP + 0x8] CALL 0x0013d4cc LAB_001907b4: MOV RAX,RBX ADD RSP,0x38 POP RBX POP R12 POP R14 POP R15 RET
/* SchemaConverter::_resolve_ref(std::__cxx11::string const&) */ string * SchemaConverter::_resolve_ref(string *param_1) { _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>> *this; string *psVar1; long lVar2; basic_json *pbVar3; string *in_RDX; string *in_RSI; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> local_50 [16]; string local_40 [32]; std::__cxx11::string::rfind((char)in_RDX,0x2f); std::__cxx11::string::substr((ulong)param_1,(ulong)in_RDX); /* try { // try from 00190726 to 0019072d has its CatchHandler @ 001907da */ psVar1 = (string *) std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::find((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *)(in_RSI + 0x28),param_1); if (psVar1 == in_RSI + 0x30) { this = (_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>> *)(in_RSI + 0x90); /* try { // try from 0019073e to 00190748 has its CatchHandler @ 001907d8 */ lVar2 = 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>> ::find(this,in_RDX); if (lVar2 == 0) { /* try { // try from 0019074e to 00190758 has its CatchHandler @ 001907d4 */ std::__detail:: _Insert_base<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>> ::insert((string *)this); /* try { // try from 0019075d to 00190771 has its CatchHandler @ 001907d6 */ pbVar3 = (basic_json *) std::__detail:: _Map_base<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>,true> ::operator[]((_Map_base<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>,true> *)(in_RSI + 0x58),in_RDX); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(local_50,pbVar3); /* try { // try from 00190772 to 00190786 has its CatchHandler @ 001907c5 */ visit(local_40,in_RSI); std::__cxx11::string::operator=(param_1,local_40); std::__cxx11::string::~string(local_40); /* try { // try from 0019079f to 001907a9 has its CatchHandler @ 001907c3 */ 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>> ::_M_erase(this); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::~basic_json(local_50); } } return param_1; }
61,671
SchemaConverter::_resolve_ref(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string _resolve_ref(const std::string & ref) { std::string ref_name = ref.substr(ref.find_last_of('/') + 1); if (_rules.find(ref_name) == _rules.end() && _refs_being_resolved.find(ref) == _refs_being_resolved.end()) { _refs_being_resolved.insert(ref); json resolved = _refs[ref]; ref_name = visit(resolved, ref_name); _refs_being_resolved.erase(ref); } return ref_name; }
O3
cpp
SchemaConverter::_resolve_ref(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movq %rdx, %rdi movl $0x2f, %esi movq $-0x1, %rdx callq 0x1b140 leaq 0x1(%rax), %rdx movq %rbx, %rdi movq %r14, %rsi movq $-0x1, %rcx callq 0x1a940 leaq 0x28(%r15), %rdi movq %rbx, %rsi callq 0xc0ac8 leaq 0x30(%r15), %rcx cmpq %rcx, %rax jne 0xc3941 leaq 0x90(%r15), %r12 movq %r12, %rdi movq %r14, %rsi callq 0xc5b62 testq %rax, %rax jne 0xc3941 leaq 0x18(%rsp), %rdx movq %r12, (%rdx) movq %r12, %rdi movq %r14, %rsi callq 0xb8df8 leaq 0x58(%r15), %rdi movq %r14, %rsi callq 0xc5b9c leaq 0x8(%rsp), %rdi movq %rax, %rsi callq 0x5dac6 leaq 0x18(%rsp), %rdi leaq 0x8(%rsp), %rdx movq %r15, %rsi movq %rbx, %rcx callq 0xc0c4a leaq 0x18(%rsp), %r15 movq %rbx, %rdi movq %r15, %rsi callq 0x1aad0 movq (%r15), %rdi leaq 0x28(%rsp), %rax cmpq %rax, %rdi je 0xc391f movq 0x28(%rsp), %rsi incq %rsi callq 0x1a8f0 movq %r12, %rdi movq %r14, %rsi callq 0xc5ff2 leaq 0x8(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x58aa4 movq %r14, %rdi callq 0x5df92 movq %rbx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq jmp 0xc3952 movq %rax, %r14 leaq 0x8(%rsp), %r15 movq %r15, %rdi xorl %esi, %esi callq 0x58aa4 movq %r15, %rdi callq 0x5df92 jmp 0xc3977 jmp 0xc3974 jmp 0xc3974 jmp 0xc3974 movq %rax, %r14 movq (%rbx), %rdi addq $0x10, %rbx cmpq %rbx, %rdi je 0xc398e movq (%rbx), %rsi incq %rsi callq 0x1a8f0 movq %r14, %rdi callq 0x1afb0
_ZN15SchemaConverter12_resolve_refERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push r12 push rbx sub rsp, 38h mov r14, rdx mov r15, rsi mov rbx, rdi mov rdi, rdx mov esi, 2Fh ; '/' mov rdx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEcm; std::string::rfind(char,ulong) lea rdx, [rax+1] mov rdi, rbx mov rsi, r14 mov rcx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) lea rdi, [r15+28h] mov rsi, rbx call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE4findERS7_; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::find(std::string const&) lea rcx, [r15+30h] cmp rax, rcx jnz loc_C3941 lea r12, [r15+90h] mov rdi, r12 mov rsi, r14 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_traitsILb1ELb1ELb1EEEE4findERKS5_; 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>>::find(std::string const&) test rax, rax jnz loc_C3941 lea rdx, [rsp+58h+var_40] mov [rdx], r12 mov rdi, r12 mov rsi, r14 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_traitsILb1ELb1ELb1EEEE9_M_insertIRKS5_NS7_10_AllocNodeISaINS7_10_Hash_nodeIS5_Lb1EEEEEEEESt4pairINS7_14_Node_iteratorIS5_Lb1ELb1EEEbEOT_RKT0_St17integral_constantIbLb1EE; 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>>::_M_insert<std::string const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::string,true>>>>(std::string const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::string,true>>> const&,std::integral_constant<bool,true>) lea rdi, [r15+58h] mov rsi, r14 call _ZNSt8__detail9_Map_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS6_N8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS6_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESaISI_ENS_10_Select1stESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb0ELb1EEELb1EEixERS8_; std::__detail::_Map_base<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>,true>::operator[](std::string const&) lea rdi, [rsp+58h+var_50] mov rsi, rax call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) lea rdi, [rsp+58h+var_40] lea rdx, [rsp+58h+var_50] mov rsi, r15 mov rcx, rbx call _ZN15SchemaConverter5visitERKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_; SchemaConverter::visit(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::string const&) lea r15, [rsp+58h+var_40] mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r15]; void * lea rax, [rsp+58h+var_30] cmp rdi, rax jz short loc_C391F mov rsi, [rsp+58h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C391F: mov rdi, r12 mov rsi, r14 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_traitsILb1ELb1ELb1EEEE8_M_eraseESt17integral_constantIbLb1EERKS5_; 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>>::_M_erase(std::integral_constant<bool,true>,std::string const&) lea r14, [rsp+58h+var_50] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() loc_C3941: mov rax, rbx add rsp, 38h pop rbx pop r12 pop r14 pop r15 retn jmp short $+2 loc_C3952: mov r14, rax lea r15, [rsp+arg_0] mov rdi, r15 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, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() jmp short loc_C3977 jmp short loc_C3974 jmp short loc_C3974 jmp short $+2 loc_C3974: mov r14, rax loc_C3977: mov rdi, [rbx]; void * add rbx, 10h cmp rdi, rbx jz short loc_C398E mov rsi, [rbx] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C398E: mov rdi, r14 call __Unwind_Resume
long long SchemaConverter::_resolve_ref(long long a1, long long a2, long long a3, __m128d a4) { long long v5; // rax int v6; // edx int v7; // ecx int v8; // r8d int v9; // r9d unsigned __int8 *v10; // rax unsigned __int8 v12[16]; // [rsp+8h] [rbp-50h] BYREF void *v13[2]; // [rsp+18h] [rbp-40h] BYREF long long v14; // [rsp+28h] [rbp-30h] BYREF v5 = std::string::rfind(a3, 47LL, -1LL); std::string::substr(a1, a3, v5 + 1, -1LL); if ( std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::find( a2 + 40, a1) == a2 + 48 && !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>>::find( a2 + 144, a3) ) { v13[0] = (void *)(a2 + 144); 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>>::_M_insert<std::string const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::string,true>>>>( a2 + 144, a3, v13); v10 = (unsigned __int8 *)std::__detail::_Map_base<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>,true>::operator[]( (int)a2 + 88, a3, v6, v7, v8, v9); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( v12, v10); SchemaConverter::visit(v13, a2, (long long)v12, a1, a4); std::string::operator=(a1, v13); if ( v13[0] != &v14 ) operator delete(v13[0], v14 + 1); 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>>::_M_erase( a2 + 144, a3); 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 *)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>::data::~data(v12); } return a1; }
_resolve_ref: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV RDI,RDX MOV ESI,0x2f MOV RDX,-0x1 CALL 0x0011b140 LEA RDX,[RAX + 0x1] MOV RDI,RBX MOV RSI,R14 MOV RCX,-0x1 CALL 0x0011a940 LEA RDI,[R15 + 0x28] LAB_001c3884: MOV RSI,RBX CALL 0x001c0ac8 LEA RCX,[R15 + 0x30] CMP RAX,RCX JNZ 0x001c3941 LEA R12,[R15 + 0x90] LAB_001c38a0: MOV RDI,R12 MOV RSI,R14 CALL 0x001c5b62 TEST RAX,RAX JNZ 0x001c3941 LEA RDX,[RSP + 0x18] MOV qword ptr [RDX],R12 LAB_001c38bc: MOV RDI,R12 MOV RSI,R14 CALL 0x001b8df8 LEA RDI,[R15 + 0x58] LAB_001c38cb: MOV RSI,R14 CALL 0x001c5b9c LEA RDI,[RSP + 0x8] MOV RSI,RAX CALL 0x0015dac6 LAB_001c38e0: LEA RDI,[RSP + 0x18] LEA RDX,[RSP + 0x8] MOV RSI,R15 MOV RCX,RBX CALL 0x001c0c4a LEA R15,[RSP + 0x18] MOV RDI,RBX MOV RSI,R15 CALL 0x0011aad0 MOV RDI,qword ptr [R15] LEA RAX,[RSP + 0x28] CMP RDI,RAX JZ 0x001c391f MOV RSI,qword ptr [RSP + 0x28] INC RSI CALL 0x0011a8f0 LAB_001c391f: MOV RDI,R12 MOV RSI,R14 CALL 0x001c5ff2 LAB_001c392a: LEA R14,[RSP + 0x8] MOV RDI,R14 XOR ESI,ESI CALL 0x00158aa4 MOV RDI,R14 CALL 0x0015df92 LAB_001c3941: MOV RAX,RBX ADD RSP,0x38 POP RBX POP R12 POP R14 POP R15 RET
/* SchemaConverter::_resolve_ref(std::__cxx11::string const&) */ string * SchemaConverter::_resolve_ref(string *param_1) { _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>> *this; string *psVar1; long lVar2; basic_json *pbVar3; string *in_RDX; string *in_RSI; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> local_50 [16]; _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_40 [2]; long local_30 [2]; std::__cxx11::string::rfind((char)in_RDX,0x2f); std::__cxx11::string::substr((ulong)param_1,(ulong)in_RDX); /* try { // try from 001c3884 to 001c388b has its CatchHandler @ 001c3974 */ psVar1 = (string *) std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::find((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *)(in_RSI + 0x28),param_1); if (psVar1 == in_RSI + 0x30) { this = (_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>> *)(in_RSI + 0x90); /* try { // try from 001c38a0 to 001c38aa has its CatchHandler @ 001c3972 */ lVar2 = 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>> ::find(this,in_RDX); if (lVar2 == 0) { local_40[0] = this; /* try { // try from 001c38bc to 001c38c6 has its CatchHandler @ 001c396e */ 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>> :: _M_insert<std::__cxx11::string_const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::__cxx11::string,true>>>> (this); /* try { // try from 001c38cb to 001c38df has its CatchHandler @ 001c3970 */ pbVar3 = (basic_json *) std::__detail:: _Map_base<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>,true> ::operator[]((_Map_base<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>,true> *)(in_RSI + 0x58),in_RDX); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(local_50,pbVar3); /* try { // try from 001c38e0 to 001c38f4 has its CatchHandler @ 001c3952 */ visit((basic_json *)local_40,in_RSI); std::__cxx11::string::operator=(param_1,(string *)local_40); if (local_40[0] != (_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_30) { operator_delete(local_40[0],local_30[0] + 1); } /* try { // try from 001c391f to 001c3929 has its CatchHandler @ 001c3950 */ 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>> ::_M_erase(this); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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((data *)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((data *)local_50); } } return param_1; }
61,672
my_mb_wc_utf8mb4_quick
eloqsql/strings/ctype-utf8.h
static inline int my_mb_wc_utf8mb4_quick(my_wc_t *pwc, const uchar *s, const uchar *e) { uchar c; if (s >= e) return MY_CS_TOOSMALL; c= s[0]; if (c < 0x80) { *pwc= c; return 1; } else if (c < 0xc2) return MY_CS_ILSEQ; else if (c < 0xe0) { if (s + 2 > e) /* We need 2 characters */ return MY_CS_TOOSMALL2; if (!(IS_CONTINUATION_BYTE(s[1]))) return MY_CS_ILSEQ; *pwc= UTF8MB2_CODE(c, s[1]); return 2; } else if (c < 0xf0) { if (s + 3 > e) /* We need 3 characters */ return MY_CS_TOOSMALL3; if (!IS_UTF8MB3_STEP2(c, s[1], s[2])) return MY_CS_ILSEQ; *pwc= UTF8MB3_CODE(c, s[1], s[2]); return 3; } else if (c < 0xf5) { if (s + 4 > e) /* We need 4 characters */ return MY_CS_TOOSMALL4; if (!IS_UTF8MB4_STEP2(c, s[1], s[2], s[3])) return MY_CS_ILSEQ; *pwc= UTF8MB4_CODE(c, s[1], s[2], s[3]); return 4; } return MY_CS_ILSEQ; }
O3
c
my_mb_wc_utf8mb4_quick: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rdx, %rsi jae 0xc0693 movzbl (%rsi), %ecx testb %cl, %cl js 0xc068c movl $0x1, %eax movq %rcx, (%rdi) jmp 0xc0693 cmpb $-0x3e, %cl jae 0xc0695 xorl %eax, %eax popq %rbp retq cmpb $-0x21, %cl ja 0xc06cb leaq 0x2(%rsi), %r8 movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rdx, %r8 ja 0xc0693 movzbl 0x1(%rsi), %edx xorl $0x80, %edx movl $0x0, %eax cmpb $0x3f, %dl ja 0xc0693 andl $0x1f, %ecx shll $0x6, %ecx orl %edx, %ecx movl $0x2, %eax jmp 0xc0687 cmpb $-0x11, %cl ja 0xc072d leaq 0x3(%rsi), %r8 movl $0xffffff99, %eax # imm = 0xFFFFFF99 cmpq %rdx, %r8 ja 0xc0693 movzbl 0x1(%rsi), %edx cmpb $-0x41, %dl jg 0xc0691 movzbl 0x2(%rsi), %esi cmpb $-0x41, %sil jg 0xc0691 cmpl $0xe0, %ecx sete %r8b cmpb $-0x60, %dl setb %r9b movl $0x0, %eax testb %r9b, %r8b jne 0xc0693 shll $0xc, %ecx movzwl %cx, %eax andl $0x3f, %edx shll $0x6, %edx orl %eax, %edx andl $0x3f, %esi orq %rdx, %rsi movl $0x3, %eax movq %rsi, %rcx jmp 0xc0687 cmpb $-0xc, %cl ja 0xc0691 leaq 0x4(%rsi), %r8 movl $0xffffff98, %eax # imm = 0xFFFFFF98 cmpq %rdx, %r8 ja 0xc0693 movzbl 0x1(%rsi), %r8d cmpb $-0x41, %r8b jg 0xc0691 movzbl 0x2(%rsi), %edx cmpb $-0x41, %dl jg 0xc0691 movzbl 0x3(%rsi), %esi cmpb $-0x41, %sil jg 0xc0691 cmpl $0xf0, %ecx sete %al cmpb $-0x70, %r8b setb %r9b testb %r9b, %al jne 0xc0691 cmpl $0xf4, %ecx sete %r9b cmpb $-0x70, %r8b setae %r10b movl $0x0, %eax testb %r10b, %r9b jne 0xc0693 andl $0x7, %ecx shll $0x12, %ecx andl $0x3f, %r8d shll $0xc, %r8d orl %ecx, %r8d andl $0x3f, %edx shll $0x6, %edx orl %r8d, %edx andl $0x3f, %esi orq %rdx, %rsi movl $0x4, %eax jmp 0xc0725
my_mb_wc_utf8mb4_quick: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rsi, rdx jnb short loc_C0693 movzx ecx, byte ptr [rsi] test cl, cl js short loc_C068C mov eax, 1 loc_C0687: mov [rdi], rcx jmp short loc_C0693 loc_C068C: cmp cl, 0C2h jnb short loc_C0695 loc_C0691: xor eax, eax loc_C0693: pop rbp retn loc_C0695: cmp cl, 0DFh ja short loc_C06CB lea r8, [rsi+2] mov eax, 0FFFFFF9Ah cmp r8, rdx ja short loc_C0693 movzx edx, byte ptr [rsi+1] xor edx, 80h mov eax, 0 cmp dl, 3Fh ; '?' ja short loc_C0693 and ecx, 1Fh shl ecx, 6 or ecx, edx mov eax, 2 jmp short loc_C0687 loc_C06CB: cmp cl, 0EFh ja short loc_C072D lea r8, [rsi+3] mov eax, 0FFFFFF99h cmp r8, rdx ja short loc_C0693 movzx edx, byte ptr [rsi+1] cmp dl, 0BFh jg short loc_C0691 movzx esi, byte ptr [rsi+2] cmp sil, 0BFh jg short loc_C0691 cmp ecx, 0E0h setz r8b cmp dl, 0A0h setb r9b mov eax, 0 test r8b, r9b jnz short loc_C0693 shl ecx, 0Ch movzx eax, cx and edx, 3Fh shl edx, 6 or edx, eax and esi, 3Fh or rsi, rdx mov eax, 3 loc_C0725: mov rcx, rsi jmp loc_C0687 loc_C072D: cmp cl, 0F4h ja loc_C0691 lea r8, [rsi+4] mov eax, 0FFFFFF98h cmp r8, rdx ja loc_C0693 movzx r8d, byte ptr [rsi+1] cmp r8b, 0BFh jg loc_C0691 movzx edx, byte ptr [rsi+2] cmp dl, 0BFh jg loc_C0691 movzx esi, byte ptr [rsi+3] cmp sil, 0BFh jg loc_C0691 cmp ecx, 0F0h setz al cmp r8b, 90h setb r9b test al, r9b jnz loc_C0691 cmp ecx, 0F4h setz r9b cmp r8b, 90h setnb r10b mov eax, 0 test r9b, r10b jnz loc_C0693 and ecx, 7 shl ecx, 12h and r8d, 3Fh shl r8d, 0Ch or r8d, ecx and edx, 3Fh shl edx, 6 or edx, r8d and esi, 3Fh or rsi, rdx mov eax, 4 jmp loc_C0725
long long my_mb_wc_utf8mb4_quick(unsigned long long *a1, unsigned __int8 *a2, unsigned long long a3) { long long result; // rax unsigned long long v4; // rcx char v5; // dl char v6; // si unsigned long long v7; // rsi char v8; // r8 char v9; // dl char v10; // si result = 4294967195LL; if ( (unsigned long long)a2 >= a3 ) return result; v4 = *a2; if ( (v4 & 0x80u) == 0LL ) { result = 1LL; LABEL_4: *a1 = v4; return result; } if ( (unsigned __int8)v4 < 0xC2u ) return 0LL; if ( (unsigned __int8)v4 > 0xDFu ) { if ( (unsigned __int8)v4 > 0xEFu ) { if ( (unsigned __int8)v4 <= 0xF4u ) { result = 4294967192LL; if ( (unsigned long long)(a2 + 4) > a3 ) return result; v8 = a2[1]; if ( v8 <= -65 ) { v9 = a2[2]; if ( v9 <= -65 ) { v10 = a2[3]; if ( v10 <= -65 && ((unsigned __int8)v8 >= 0x90u || (_DWORD)v4 != 240) ) { result = 0LL; if ( (unsigned __int8)v8 >= 0x90u && (_DWORD)v4 == 244 ) return result; v7 = ((v4 & 7) << 18) | ((unsigned __int8)(v8 & 0x3F) << 12) | ((unsigned __int8)(v9 & 0x3F) << 6) | v10 & 0x3F; result = 4LL; LABEL_18: v4 = v7; goto LABEL_4; } } } } } else { result = 4294967193LL; if ( (unsigned long long)(a2 + 3) > a3 ) return result; v5 = a2[1]; if ( v5 <= -65 ) { v6 = a2[2]; if ( v6 <= -65 ) { result = 0LL; if ( (unsigned __int8)v5 < 0xA0u && (_DWORD)v4 == 224 ) return result; v7 = (unsigned __int16)((_WORD)v4 << 12) | ((unsigned __int8)(v5 & 0x3F) << 6) | (unsigned long long)(v6 & 0x3F); result = 3LL; goto LABEL_18; } } } return 0LL; } result = 4294967194LL; if ( (unsigned long long)(a2 + 2) <= a3 ) { result = 0LL; if ( (a2[1] ^ 0x80u) <= 0x3F ) { v4 = a2[1] ^ 0x80 | ((unsigned __int8)(v4 & 0x1F) << 6); result = 2LL; goto LABEL_4; } } return result; }
my_mb_wc_utf8mb4_quick: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RSI,RDX JNC 0x001c0693 MOVZX ECX,byte ptr [RSI] TEST CL,CL JS 0x001c068c MOV EAX,0x1 LAB_001c0687: MOV qword ptr [RDI],RCX JMP 0x001c0693 LAB_001c068c: CMP CL,0xc2 JNC 0x001c0695 LAB_001c0691: XOR EAX,EAX LAB_001c0693: POP RBP RET LAB_001c0695: CMP CL,0xdf JA 0x001c06cb LEA R8,[RSI + 0x2] MOV EAX,0xffffff9a CMP R8,RDX JA 0x001c0693 MOVZX EDX,byte ptr [RSI + 0x1] XOR EDX,0x80 MOV EAX,0x0 CMP DL,0x3f JA 0x001c0693 AND ECX,0x1f SHL ECX,0x6 OR ECX,EDX MOV EAX,0x2 JMP 0x001c0687 LAB_001c06cb: CMP CL,0xef JA 0x001c072d LEA R8,[RSI + 0x3] MOV EAX,0xffffff99 CMP R8,RDX JA 0x001c0693 MOVZX EDX,byte ptr [RSI + 0x1] CMP DL,0xbf JG 0x001c0691 MOVZX ESI,byte ptr [RSI + 0x2] CMP SIL,0xbf JG 0x001c0691 CMP ECX,0xe0 SETZ R8B CMP DL,0xa0 SETC R9B MOV EAX,0x0 TEST R8B,R9B JNZ 0x001c0693 SHL ECX,0xc MOVZX EAX,CX AND EDX,0x3f SHL EDX,0x6 OR EDX,EAX AND ESI,0x3f OR RSI,RDX MOV EAX,0x3 LAB_001c0725: MOV RCX,RSI JMP 0x001c0687 LAB_001c072d: CMP CL,0xf4 JA 0x001c0691 LEA R8,[RSI + 0x4] MOV EAX,0xffffff98 CMP R8,RDX JA 0x001c0693 MOVZX R8D,byte ptr [RSI + 0x1] CMP R8B,0xbf JG 0x001c0691 MOVZX EDX,byte ptr [RSI + 0x2] CMP DL,0xbf JG 0x001c0691 MOVZX ESI,byte ptr [RSI + 0x3] CMP SIL,0xbf JG 0x001c0691 CMP ECX,0xf0 SETZ AL CMP R8B,0x90 SETC R9B TEST AL,R9B JNZ 0x001c0691 CMP ECX,0xf4 SETZ R9B CMP R8B,0x90 SETNC R10B MOV EAX,0x0 TEST R9B,R10B JNZ 0x001c0693 AND ECX,0x7 SHL ECX,0x12 AND R8D,0x3f SHL R8D,0xc OR R8D,ECX AND EDX,0x3f SHL EDX,0x6 OR EDX,R8D AND ESI,0x3f OR RSI,RDX MOV EAX,0x4 JMP 0x001c0725
int8 my_mb_wc_utf8mb4_quick(ulong *param_1,byte *param_2,byte *param_3) { byte bVar1; byte bVar2; int8 uVar3; uint uVar4; ulong uVar5; if (param_3 <= param_2) { return 0xffffff9b; } bVar1 = *param_2; uVar5 = (ulong)bVar1; if ((char)bVar1 < '\0') { if (0xc1 < bVar1) { uVar4 = (uint)bVar1; if (bVar1 < 0xe0) { if (param_3 < param_2 + 2) { return 0xffffff9a; } if (0x3f < (byte)(param_2[1] ^ 0x80)) { return 0; } uVar5 = (ulong)((uVar4 & 0x1f) << 6 | param_2[1] ^ 0x80); uVar3 = 2; goto LAB_001c0687; } if (bVar1 < 0xf0) { if (param_3 < param_2 + 3) { return 0xffffff99; } bVar2 = param_2[1]; if (((char)bVar2 < -0x40) && ((char)param_2[2] < -0x40)) { if (uVar4 == 0xe0 && bVar2 < 0xa0) { return 0; } uVar4 = param_2[2] & 0x3f | (bVar2 & 0x3f) << 6 | (bVar1 & 0xf) << 0xc; uVar3 = 3; LAB_001c0725: uVar5 = (ulong)uVar4; goto LAB_001c0687; } } else if (bVar1 < 0xf5) { if (param_3 < param_2 + 4) { return 0xffffff98; } bVar1 = param_2[1]; if (((((char)bVar1 < -0x40) && ((char)param_2[2] < -0x40)) && ((char)param_2[3] < -0x40)) && (uVar4 != 0xf0 || 0x8f < bVar1)) { if (uVar4 == 0xf4 && 0x8f < bVar1) { return 0; } uVar4 = param_2[3] & 0x3f | (param_2[2] & 0x3f) << 6 | (bVar1 & 0x3f) << 0xc | (uVar4 & 7) << 0x12; uVar3 = 4; goto LAB_001c0725; } } } uVar3 = 0; } else { uVar3 = 1; LAB_001c0687: *param_1 = uVar5; } return uVar3; }
61,673
composition_source_out
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-blend.c
static void composition_source_out(uint32_t* dest, int length, const uint32_t* src, uint32_t const_alpha) { if(const_alpha == 255) { for(int i = 0; i < length; i++) { dest[i] = BYTE_MUL(src[i], plutovg_alpha(~dest[i])); } } else { uint32_t cia = 255 - const_alpha; for(int i = 0; i < length; i++) { uint32_t s = BYTE_MUL(src[i], const_alpha); uint32_t d = dest[i]; dest[i] = INTERPOLATE_PIXEL(s, plutovg_alpha(~d), d, cia); } } }
O2
c
composition_source_out: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rbx movl %esi, %r14d movq %rdi, %r15 cmpl $0xff, %ecx jne 0x3917e xorl %r12d, %r12d testl %r14d, %r14d cmovlel %r12d, %r14d cmpq %r12, %r14 je 0x391c1 movl (%rbx,%r12,4), %edi movl (%r15,%r12,4), %esi notl %esi shrl $0x18, %esi callq 0x38d7d movl %eax, (%r15,%r12,4) incq %r12 jmp 0x3915e movl %ecx, %ebp movl $0xff, %r12d subl %ecx, %r12d xorl %r13d, %r13d testl %r14d, %r14d cmovlel %r13d, %r14d cmpq %r13, %r14 je 0x391c1 movl (%rbx,%r13,4), %edi movl %ebp, %esi callq 0x38d7d movl (%r15,%r13,4), %edx movl %edx, %esi notl %esi shrl $0x18, %esi movl %eax, %edi movl %r12d, %ecx callq 0x38dbb movl %eax, (%r15,%r13,4) incq %r13 jmp 0x39193 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
composition_source_out: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdx mov r14d, esi mov r15, rdi cmp ecx, 0FFh jnz short loc_3917E xor r12d, r12d test r14d, r14d cmovle r14d, r12d loc_3915E: cmp r14, r12 jz short loc_391C1 mov edi, [rbx+r12*4] mov esi, [r15+r12*4] not esi shr esi, 18h call BYTE_MUL mov [r15+r12*4], eax inc r12 jmp short loc_3915E loc_3917E: mov ebp, ecx mov r12d, 0FFh sub r12d, ecx xor r13d, r13d test r14d, r14d cmovle r14d, r13d loc_39193: cmp r14, r13 jz short loc_391C1 mov edi, [rbx+r13*4] mov esi, ebp call BYTE_MUL mov edx, [r15+r13*4] mov esi, edx not esi shr esi, 18h mov edi, eax mov ecx, r12d call INTERPOLATE_PIXEL mov [r15+r13*4], eax inc r13 jmp short loc_39193 loc_391C1: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long composition_source_out(long long a1, int a2, long long a3, int a4) { long long v5; // r14 long long v6; // r12 long long result; // rax int v9; // r12d long long v10; // r13 unsigned int v11; // eax v5 = (unsigned int)a2; if ( a4 == 255 ) { v6 = 0LL; if ( a2 <= 0 ) v5 = 0LL; while ( v5 != v6 ) { result = BYTE_MUL(*(_DWORD *)(a3 + 4 * v6), (unsigned int)~*(_DWORD *)(a1 + 4 * v6) >> 24); *(_DWORD *)(a1 + 4 * v6++) = result; } } else { v9 = 255 - a4; v10 = 0LL; if ( a2 <= 0 ) v5 = 0LL; while ( v5 != v10 ) { v11 = BYTE_MUL(*(_DWORD *)(a3 + 4 * v10), a4); result = INTERPOLATE_PIXEL(v11, (unsigned int)~*(_DWORD *)(a1 + 4 * v10) >> 24, *(_DWORD *)(a1 + 4 * v10), v9); *(_DWORD *)(a1 + 4 * v10++) = result; } } return result; }
composition_source_out: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14D,ESI MOV R15,RDI CMP ECX,0xff JNZ 0x0013917e XOR R12D,R12D TEST R14D,R14D CMOVLE R14D,R12D LAB_0013915e: CMP R14,R12 JZ 0x001391c1 MOV EDI,dword ptr [RBX + R12*0x4] MOV ESI,dword ptr [R15 + R12*0x4] NOT ESI SHR ESI,0x18 CALL 0x00138d7d MOV dword ptr [R15 + R12*0x4],EAX INC R12 JMP 0x0013915e LAB_0013917e: MOV EBP,ECX MOV R12D,0xff SUB R12D,ECX XOR R13D,R13D TEST R14D,R14D CMOVLE R14D,R13D LAB_00139193: CMP R14,R13 JZ 0x001391c1 MOV EDI,dword ptr [RBX + R13*0x4] MOV ESI,EBP CALL 0x00138d7d MOV EDX,dword ptr [R15 + R13*0x4] MOV ESI,EDX NOT ESI SHR ESI,0x18 MOV EDI,EAX MOV ECX,R12D CALL 0x00138dbb MOV dword ptr [R15 + R13*0x4],EAX INC R13 JMP 0x00139193 LAB_001391c1: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void composition_source_out(long param_1,uint param_2,long param_3,int param_4) { uint uVar1; int4 uVar2; ulong uVar3; ulong uVar4; if (param_4 == 0xff) { uVar3 = 0; uVar4 = (ulong)param_2; if ((int)param_2 < 1) { uVar4 = uVar3; } for (; uVar4 != uVar3; uVar3 = uVar3 + 1) { uVar2 = BYTE_MUL(*(int4 *)(param_3 + uVar3 * 4),~*(uint *)(param_1 + uVar3 * 4) >> 0x18) ; *(int4 *)(param_1 + uVar3 * 4) = uVar2; } } else { uVar3 = 0; uVar4 = (ulong)param_2; if ((int)param_2 < 1) { uVar4 = uVar3; } for (; uVar4 != uVar3; uVar3 = uVar3 + 1) { uVar2 = BYTE_MUL(*(int4 *)(param_3 + uVar3 * 4),param_4); uVar1 = *(uint *)(param_1 + uVar3 * 4); uVar2 = INTERPOLATE_PIXEL(uVar2,~uVar1 >> 0x18,uVar1,0xff - param_4); *(int4 *)(param_1 + uVar3 * 4) = uVar2; } } return; }
61,674
composition_source_out
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-blend.c
static void composition_source_out(uint32_t* dest, int length, const uint32_t* src, uint32_t const_alpha) { if(const_alpha == 255) { for(int i = 0; i < length; i++) { dest[i] = BYTE_MUL(src[i], plutovg_alpha(~dest[i])); } } else { uint32_t cia = 255 - const_alpha; for(int i = 0; i < length; i++) { uint32_t s = BYTE_MUL(src[i], const_alpha); uint32_t d = dest[i]; dest[i] = INTERPOLATE_PIXEL(s, plutovg_alpha(~d), d, cia); } } }
O3
c
composition_source_out: pushq %rbp pushq %r15 pushq %r14 pushq %rbx cmpl $0xff, %ecx jne 0x417ad testl %esi, %esi jle 0x4187d movl %esi, %eax xorl %ecx, %ecx movl $0xff00ff, %esi # imm = 0xFF00FF movl $0x800080, %r8d # imm = 0x800080 movl (%rdx,%rcx,4), %r9d movl (%rdi,%rcx,4), %r11d notl %r11d shrl $0x18, %r11d movl %r9d, %r10d andl %esi, %r10d imull %r11d, %r10d movl %r10d, %ebx shrl $0x8, %ebx andl %esi, %ebx addl %r8d, %r10d addl %ebx, %r10d shrl $0x8, %r10d andl %esi, %r10d shrl $0x8, %r9d andl %esi, %r9d imull %r11d, %r9d movl %r9d, %r11d shrl $0x8, %r11d andl %esi, %r11d addl %r8d, %r9d addl %r11d, %r9d andl $0xff00ff00, %r9d # imm = 0xFF00FF00 orl %r10d, %r9d movl %r9d, (%rdi,%rcx,4) incq %rcx cmpq %rcx, %rax jne 0x41749 jmp 0x4187d testl %esi, %esi jle 0x4187d movl $0xff, %eax subl %ecx, %eax movl %esi, %esi xorl %r8d, %r8d movl $0xff00ff, %r9d # imm = 0xFF00FF movl $0x800080, %r10d # imm = 0x800080 movl (%rdx,%r8,4), %r11d movl %r11d, %r14d andl %r9d, %r14d imull %ecx, %r14d movl %r14d, %ebx shrl $0x8, %ebx andl %r9d, %ebx addl %r10d, %r14d addl %ebx, %r14d shrl $0x8, %r14d andl %r9d, %r14d shrl $0x8, %r11d andl %r9d, %r11d imull %ecx, %r11d movl %r11d, %ebx shrl $0x8, %ebx andl %r9d, %ebx addl %r10d, %r11d addl %ebx, %r11d movl (%rdi,%r8,4), %ebx movl %ebx, %r15d notl %r15d shrl $0x18, %r15d imull %r15d, %r14d movl %ebx, %ebp andl %r9d, %ebp imull %eax, %ebp addl %r14d, %ebp movl %ebp, %r14d shrl $0x8, %r14d andl %r9d, %r14d addl %r10d, %ebp addl %r14d, %ebp shrl $0x8, %ebp andl %r9d, %ebp shrl $0x8, %r11d andl %r9d, %r11d imull %r15d, %r11d shrl $0x8, %ebx andl %r9d, %ebx imull %eax, %ebx addl %r11d, %ebx movl %ebx, %r11d shrl $0x8, %r11d andl %r9d, %r11d addl %r10d, %ebx addl %r11d, %ebx andl $0xff00ff00, %ebx # imm = 0xFF00FF00 orl %ebp, %ebx movl %ebx, (%rdi,%r8,4) incq %r8 cmpq %r8, %rsi jne 0x417cd popq %rbx popq %r14 popq %r15 popq %rbp retq
composition_source_out: push rbp push r15 push r14 push rbx cmp ecx, 0FFh jnz short loc_417AD test esi, esi jle loc_4187D mov eax, esi xor ecx, ecx mov esi, 0FF00FFh mov r8d, 800080h loc_41749: mov r9d, [rdx+rcx*4] mov r11d, [rdi+rcx*4] not r11d shr r11d, 18h mov r10d, r9d and r10d, esi imul r10d, r11d mov ebx, r10d shr ebx, 8 and ebx, esi add r10d, r8d add r10d, ebx shr r10d, 8 and r10d, esi shr r9d, 8 and r9d, esi imul r9d, r11d mov r11d, r9d shr r11d, 8 and r11d, esi add r9d, r8d add r9d, r11d and r9d, 0FF00FF00h or r9d, r10d mov [rdi+rcx*4], r9d inc rcx cmp rax, rcx jnz short loc_41749 jmp loc_4187D loc_417AD: test esi, esi jle loc_4187D mov eax, 0FFh sub eax, ecx mov esi, esi xor r8d, r8d mov r9d, 0FF00FFh mov r10d, 800080h loc_417CD: mov r11d, [rdx+r8*4] mov r14d, r11d and r14d, r9d imul r14d, ecx mov ebx, r14d shr ebx, 8 and ebx, r9d add r14d, r10d add r14d, ebx shr r14d, 8 and r14d, r9d shr r11d, 8 and r11d, r9d imul r11d, ecx mov ebx, r11d shr ebx, 8 and ebx, r9d add r11d, r10d add r11d, ebx mov ebx, [rdi+r8*4] mov r15d, ebx not r15d shr r15d, 18h imul r14d, r15d mov ebp, ebx and ebp, r9d imul ebp, eax add ebp, r14d mov r14d, ebp shr r14d, 8 and r14d, r9d add ebp, r10d add ebp, r14d shr ebp, 8 and ebp, r9d shr r11d, 8 and r11d, r9d imul r11d, r15d shr ebx, 8 and ebx, r9d imul ebx, eax add ebx, r11d mov r11d, ebx shr r11d, 8 and r11d, r9d add ebx, r10d add ebx, r11d and ebx, 0FF00FF00h or ebx, ebp mov [rdi+r8*4], ebx inc r8 cmp rsi, r8 jnz loc_417CD loc_4187D: pop rbx pop r14 pop r15 pop rbp retn
void composition_source_out(long long a1, int a2, long long a3, int a4) { long long i; // rcx unsigned int v5; // r11d int v6; // eax long long j; // r8 unsigned int v8; // r15d if ( a4 == 255 ) { if ( a2 > 0 ) { for ( i = 0LL; i != a2; ++i ) { v5 = (unsigned int)~*(_DWORD *)(a1 + 4 * i) >> 24; *(_DWORD *)(a1 + 4 * i) = (((((v5 * (*(_DWORD *)(a3 + 4 * i) & 0xFF00FF)) >> 8) & 0xFF00FF) + v5 * (*(_DWORD *)(a3 + 4 * i) & 0xFF00FF) + 8388736) >> 8) & 0xFF00FF | ((((v5 * ((*(_DWORD *)(a3 + 4 * i) >> 8) & 0xFF00FF)) >> 8) & 0xFF00FF) + v5 * ((*(_DWORD *)(a3 + 4 * i) >> 8) & 0xFF00FF) + 8388736) & 0xFF00FF00; } } } else if ( a2 > 0 ) { for ( j = 0LL; j != a2; ++j ) { v8 = (unsigned int)~*(_DWORD *)(a1 + 4 * j) >> 24; v6 = 255 - a4; *(_DWORD *)(a1 + 4 * j) = (((((v8 * ((((((a4 * (*(_DWORD *)(a3 + 4 * j) & 0xFF00FFu)) >> 8) & 0xFF00FF) + a4 * (*(_DWORD *)(a3 + 4 * j) & 0xFF00FF) + 8388736) >> 8) & 0xFF00FF) + v6 * (*(_DWORD *)(a1 + 4 * j) & 0xFF00FF)) >> 8) & 0xFF00FF) + v8 * ((((((a4 * (*(_DWORD *)(a3 + 4 * j) & 0xFF00FFu)) >> 8) & 0xFF00FF) + a4 * (*(_DWORD *)(a3 + 4 * j) & 0xFF00FF) + 8388736) >> 8) & 0xFF00FF) + v6 * (*(_DWORD *)(a1 + 4 * j) & 0xFF00FF) + 8388736) >> 8) & 0xFF00FF | ((((v8 * ((((((a4 * ((*(_DWORD *)(a3 + 4 * j) >> 8) & 0xFF00FFu)) >> 8) & 0xFF00FF) + a4 * ((*(_DWORD *)(a3 + 4 * j) >> 8) & 0xFF00FF) + 8388736) >> 8) & 0xFF00FF) + v6 * ((*(_DWORD *)(a1 + 4 * j) >> 8) & 0xFF00FF)) >> 8) & 0xFF00FF) + v8 * ((((((a4 * ((*(_DWORD *)(a3 + 4 * j) >> 8) & 0xFF00FFu)) >> 8) & 0xFF00FF) + a4 * ((*(_DWORD *)(a3 + 4 * j) >> 8) & 0xFF00FF) + 8388736) >> 8) & 0xFF00FF) + v6 * ((*(_DWORD *)(a1 + 4 * j) >> 8) & 0xFF00FF) + 8388736) & 0xFF00FF00; } } }
composition_source_out: PUSH RBP PUSH R15 PUSH R14 PUSH RBX CMP ECX,0xff JNZ 0x001417ad TEST ESI,ESI JLE 0x0014187d MOV EAX,ESI XOR ECX,ECX MOV ESI,0xff00ff MOV R8D,0x800080 LAB_00141749: MOV R9D,dword ptr [RDX + RCX*0x4] MOV R11D,dword ptr [RDI + RCX*0x4] NOT R11D SHR R11D,0x18 MOV R10D,R9D AND R10D,ESI IMUL R10D,R11D MOV EBX,R10D SHR EBX,0x8 AND EBX,ESI ADD R10D,R8D ADD R10D,EBX SHR R10D,0x8 AND R10D,ESI SHR R9D,0x8 AND R9D,ESI IMUL R9D,R11D MOV R11D,R9D SHR R11D,0x8 AND R11D,ESI ADD R9D,R8D ADD R9D,R11D AND R9D,0xff00ff00 OR R9D,R10D MOV dword ptr [RDI + RCX*0x4],R9D INC RCX CMP RAX,RCX JNZ 0x00141749 JMP 0x0014187d LAB_001417ad: TEST ESI,ESI JLE 0x0014187d MOV EAX,0xff SUB EAX,ECX MOV ESI,ESI XOR R8D,R8D MOV R9D,0xff00ff MOV R10D,0x800080 LAB_001417cd: MOV R11D,dword ptr [RDX + R8*0x4] MOV R14D,R11D AND R14D,R9D IMUL R14D,ECX MOV EBX,R14D SHR EBX,0x8 AND EBX,R9D ADD R14D,R10D ADD R14D,EBX SHR R14D,0x8 AND R14D,R9D SHR R11D,0x8 AND R11D,R9D IMUL R11D,ECX MOV EBX,R11D SHR EBX,0x8 AND EBX,R9D ADD R11D,R10D ADD R11D,EBX MOV EBX,dword ptr [RDI + R8*0x4] MOV R15D,EBX NOT R15D SHR R15D,0x18 IMUL R14D,R15D MOV EBP,EBX AND EBP,R9D IMUL EBP,EAX ADD EBP,R14D MOV R14D,EBP SHR R14D,0x8 AND R14D,R9D ADD EBP,R10D ADD EBP,R14D SHR EBP,0x8 AND EBP,R9D SHR R11D,0x8 AND R11D,R9D IMUL R11D,R15D SHR EBX,0x8 AND EBX,R9D IMUL EBX,EAX ADD EBX,R11D MOV R11D,EBX SHR R11D,0x8 AND R11D,R9D ADD EBX,R10D ADD EBX,R11D AND EBX,0xff00ff00 OR EBX,EBP MOV dword ptr [RDI + R8*0x4],EBX INC R8 CMP RSI,R8 JNZ 0x001417cd LAB_0014187d: POP RBX POP R14 POP R15 POP RBP RET
void composition_source_out(long param_1,uint param_2,long param_3,int param_4) { ulong uVar1; uint uVar2; uint uVar3; uint uVar4; if (param_4 == 0xff) { if (0 < (int)param_2) { uVar1 = 0; do { uVar2 = *(uint *)(param_3 + uVar1 * 4); uVar4 = ~*(uint *)(param_1 + uVar1 * 4) >> 0x18; uVar3 = (uVar2 & 0xff00ff) * uVar4; uVar4 = (uVar2 >> 8 & 0xff00ff) * uVar4; *(uint *)(param_1 + uVar1 * 4) = uVar4 + 0x800080 + (uVar4 >> 8 & 0xff00ff) & 0xff00ff00 | uVar3 + 0x800080 + (uVar3 >> 8 & 0xff00ff) >> 8 & 0xff00ff; uVar1 = uVar1 + 1; } while (param_2 != uVar1); } } else if (0 < (int)param_2) { uVar1 = 0; do { uVar2 = *(uint *)(param_3 + uVar1 * 4); uVar4 = (uVar2 & 0xff00ff) * param_4; uVar3 = (uVar2 >> 8 & 0xff00ff) * param_4; uVar2 = *(uint *)(param_1 + uVar1 * 4); uVar4 = (uVar2 & 0xff00ff) * (0xff - param_4) + (uVar4 + 0x800080 + (uVar4 >> 8 & 0xff00ff) >> 8 & 0xff00ff) * (~uVar2 >> 0x18); uVar2 = (uVar2 >> 8 & 0xff00ff) * (0xff - param_4) + (uVar3 + 0x800080 + (uVar3 >> 8 & 0xff00ff) >> 8 & 0xff00ff) * (~uVar2 >> 0x18); *(uint *)(param_1 + uVar1 * 4) = uVar2 + 0x800080 + (uVar2 >> 8 & 0xff00ff) & 0xff00ff00 | uVar4 + 0x800080 + (uVar4 >> 8 & 0xff00ff) >> 8 & 0xff00ff; uVar1 = uVar1 + 1; } while (param_2 != uVar1); } return; }
61,675
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>>>>>::next_byte_in_range(std::initializer_list<int>)
monkey531[P]llama/common/json.hpp
bool next_byte_in_range(std::initializer_list<char_int_type> ranges) { JSON_ASSERT(ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6); add(current); for (auto range = ranges.begin(); range != ranges.end(); ++range) { get(); if (JSON_HEDLEY_LIKELY(*range <= current && current <= *(++range))) // NOLINT(bugprone-inc-dec-in-conditions) { add(current); } else { error_message = "invalid string: ill-formed UTF-8 byte"; return false; } } return true; }
O0
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>>>>>::next_byte_in_range(std::initializer_list<int>): subq $0x48, %rsp movq %rsi, 0x30(%rsp) movq %rdx, 0x38(%rsp) movq %rdi, 0x28(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x18(%rsp) leaq 0x30(%rsp), %rdi callq 0xa7a20 cmpq $0x2, %rax je 0xa77ce leaq 0x30(%rsp), %rdi callq 0xa7a20 cmpq $0x4, %rax je 0xa77ce leaq 0x30(%rsp), %rdi callq 0xa7a20 cmpq $0x6, %rax je 0xa77ce leaq 0x16d9ca(%rip), %rdi # 0x21517e movl $0x1da8, %esi # imm = 0x1DA8 leaq 0x1678b0(%rip), %rdx # 0x20f070 leaq 0x16e724(%rip), %rcx # 0x215eeb movb $0x0, %al callq 0x5def0 movq 0x18(%rsp), %rdi movl 0x14(%rdi), %esi callq 0xa7570 leaq 0x30(%rsp), %rdi callq 0xa7a30 movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x10(%rsp) leaq 0x30(%rsp), %rdi callq 0xa7a40 movq %rax, %rcx movq 0x10(%rsp), %rax cmpq %rcx, %rax je 0xa789c movq 0x18(%rsp), %rdi callq 0xa6750 movq 0x18(%rsp), %rdx movq 0x20(%rsp), %rax movl (%rax), %ecx xorl %eax, %eax cmpl 0x14(%rdx), %ecx movb %al, 0xf(%rsp) jg 0xa7853 movq 0x18(%rsp), %rax movl 0x14(%rax), %eax movq 0x20(%rsp), %rcx movq %rcx, %rdx addq $0x4, %rdx movq %rdx, 0x20(%rsp) cmpl 0x4(%rcx), %eax setle %al movb %al, 0xf(%rsp) movb 0xf(%rsp), %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xa7861 jmp 0xa7870 movq 0x18(%rsp), %rdi movl 0x14(%rdi), %esi callq 0xa7570 jmp 0xa7887 movq 0x18(%rsp), %rax leaq 0x16e60f(%rip), %rcx # 0x215e8b movq %rcx, 0x70(%rax) movb $0x0, 0x47(%rsp) jmp 0xa78a1 jmp 0xa7889 movq 0x20(%rsp), %rax addq $0x4, %rax movq %rax, 0x20(%rsp) jmp 0xa77ea movb $0x1, 0x47(%rsp) movb 0x47(%rsp), %al andb $0x1, %al addq $0x48, %rsp retq nopl (%rax)
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE18next_byte_in_rangeESt16initializer_listIiE: sub rsp, 48h mov [rsp+48h+var_18], rsi mov [rsp+48h+var_10], rdx mov [rsp+48h+var_20], rdi mov rax, [rsp+48h+var_20] mov [rsp+48h+var_30], rax lea rdi, [rsp+48h+var_18] call _ZNKSt16initializer_listIiE4sizeEv; std::initializer_list<int>::size(void) cmp rax, 2 jz short loc_A77CE lea rdi, [rsp+48h+var_18] call _ZNKSt16initializer_listIiE4sizeEv; std::initializer_list<int>::size(void) cmp rax, 4 jz short loc_A77CE lea rdi, [rsp+48h+var_18] call _ZNKSt16initializer_listIiE4sizeEv; std::initializer_list<int>::size(void) cmp rax, 6 jz short loc_A77CE lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov esi, 1DA8h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRangesSize2Ran; "ranges.size() == 2 || ranges.size() == "... mov al, 0 call _ggml_abort loc_A77CE: mov rdi, [rsp+48h+var_30] mov esi, [rdi+14h] call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3addEi; 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>>>::add(int) lea rdi, [rsp+48h+var_18] call _ZNKSt16initializer_listIiE5beginEv; std::initializer_list<int>::begin(void) mov [rsp+48h+var_28], rax loc_A77EA: mov rax, [rsp+48h+var_28] mov [rsp+48h+var_38], rax lea rdi, [rsp+48h+var_18] call _ZNKSt16initializer_listIiE3endEv; std::initializer_list<int>::end(void) mov rcx, rax mov rax, [rsp+48h+var_38] cmp rax, rcx jz loc_A789C mov rdi, [rsp+48h+var_30] 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) mov rdx, [rsp+48h+var_30] mov rax, [rsp+48h+var_28] mov ecx, [rax] xor eax, eax cmp ecx, [rdx+14h] mov [rsp+48h+var_39], al jg short loc_A7853 mov rax, [rsp+48h+var_30] mov eax, [rax+14h] mov rcx, [rsp+48h+var_28] mov rdx, rcx add rdx, 4 mov [rsp+48h+var_28], rdx cmp eax, [rcx+4] setle al mov [rsp+48h+var_39], al loc_A7853: mov al, [rsp+48h+var_39] xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_A7861 jmp short loc_A7870 loc_A7861: mov rdi, [rsp+48h+var_30] mov esi, [rdi+14h] call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3addEi; 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>>>::add(int) jmp short loc_A7887 loc_A7870: mov rax, [rsp+48h+var_30] lea rcx, aInvalidStringI; "invalid string: ill-formed UTF-8 byte" mov [rax+70h], rcx mov [rsp+48h+var_1], 0 jmp short loc_A78A1 loc_A7887: jmp short $+2 loc_A7889: mov rax, [rsp+48h+var_28] add rax, 4 mov [rsp+48h+var_28], rax jmp loc_A77EA loc_A789C: mov [rsp+48h+var_1], 1 loc_A78A1: mov al, [rsp+48h+var_1] and al, 1 add rsp, 48h retn
char 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>>>::next_byte_in_range( long long a1, long long a2, long long a3) { _DWORD *v3; // rcx bool v5; // [rsp+Fh] [rbp-39h] _DWORD *i; // [rsp+20h] [rbp-28h] _QWORD v7[2]; // [rsp+30h] [rbp-18h] BYREF v7[0] = a2; v7[1] = a3; if ( std::initializer_list<int>::size(v7) != 2 && std::initializer_list<int>::size(v7) != 4 && std::initializer_list<int>::size(v7) != 6 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7592LL, "GGML_ASSERT(%s) failed", "ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6"); } 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>>>::add( a1, *(_DWORD *)(a1 + 20)); for ( i = (_DWORD *)std::initializer_list<int>::begin(v7); i != (_DWORD *)std::initializer_list<int>::end(v7); ++i ) { 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); v5 = 0; if ( *i <= *(_DWORD *)(a1 + 20) ) { v3 = i++; v5 = *(_DWORD *)(a1 + 20) <= v3[1]; } if ( !v5 ) { *(_QWORD *)(a1 + 112) = "invalid string: ill-formed UTF-8 byte"; return 0; } 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>>>::add( a1, *(_DWORD *)(a1 + 20)); } return 1; }
next_byte_in_range: SUB RSP,0x48 MOV qword ptr [RSP + 0x30],RSI MOV qword ptr [RSP + 0x38],RDX MOV qword ptr [RSP + 0x28],RDI MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x18],RAX LEA RDI,[RSP + 0x30] CALL 0x001a7a20 CMP RAX,0x2 JZ 0x001a77ce LEA RDI,[RSP + 0x30] CALL 0x001a7a20 CMP RAX,0x4 JZ 0x001a77ce LEA RDI,[RSP + 0x30] CALL 0x001a7a20 CMP RAX,0x6 JZ 0x001a77ce LEA RDI,[0x31517e] MOV ESI,0x1da8 LEA RDX,[0x30f070] LEA RCX,[0x315eeb] MOV AL,0x0 CALL 0x0015def0 LAB_001a77ce: MOV RDI,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RDI + 0x14] CALL 0x001a7570 LEA RDI,[RSP + 0x30] CALL 0x001a7a30 MOV qword ptr [RSP + 0x20],RAX LAB_001a77ea: MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x10],RAX LEA RDI,[RSP + 0x30] CALL 0x001a7a40 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x10] CMP RAX,RCX JZ 0x001a789c MOV RDI,qword ptr [RSP + 0x18] CALL 0x001a6750 MOV RDX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x20] MOV ECX,dword ptr [RAX] XOR EAX,EAX CMP ECX,dword ptr [RDX + 0x14] MOV byte ptr [RSP + 0xf],AL JG 0x001a7853 MOV RAX,qword ptr [RSP + 0x18] MOV EAX,dword ptr [RAX + 0x14] MOV RCX,qword ptr [RSP + 0x20] MOV RDX,RCX ADD RDX,0x4 MOV qword ptr [RSP + 0x20],RDX CMP EAX,dword ptr [RCX + 0x4] SETLE AL MOV byte ptr [RSP + 0xf],AL LAB_001a7853: MOV AL,byte ptr [RSP + 0xf] XOR AL,0xff XOR AL,0xff TEST AL,0x1 JNZ 0x001a7861 JMP 0x001a7870 LAB_001a7861: MOV RDI,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RDI + 0x14] CALL 0x001a7570 JMP 0x001a7887 LAB_001a7870: MOV RAX,qword ptr [RSP + 0x18] LEA RCX,[0x315e8b] MOV qword ptr [RAX + 0x70],RCX MOV byte ptr [RSP + 0x47],0x0 JMP 0x001a78a1 LAB_001a7887: JMP 0x001a7889 LAB_001a7889: MOV RAX,qword ptr [RSP + 0x20] ADD RAX,0x4 MOV qword ptr [RSP + 0x20],RAX JMP 0x001a77ea LAB_001a789c: MOV byte ptr [RSP + 0x47],0x1 LAB_001a78a1: MOV AL,byte ptr [RSP + 0x47] AND AL,0x1 ADD RSP,0x48 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 > > >::next_byte_in_range(std::initializer_list<int>) */ int1 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>>> ::next_byte_in_range (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>>> *param_1,int8 param_2,int8 param_3) { bool bVar1; long lVar2; int *piVar3; int *local_28; int8 local_18; int8 local_10; local_18 = param_2; local_10 = param_3; lVar2 = std::initializer_list<int>::size((initializer_list<int> *)&local_18); if (((lVar2 != 2) && (lVar2 = std::initializer_list<int>::size((initializer_list<int> *)&local_18), lVar2 != 4)) && (lVar2 = std::initializer_list<int>::size((initializer_list<int> *)&local_18), lVar2 != 6)) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1da8, "GGML_ASSERT(%s) failed", "ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6"); } add((int)param_1); local_28 = (int *)std::initializer_list<int>::begin((initializer_list<int> *)&local_18); while( true ) { piVar3 = (int *)std::initializer_list<int>::end((initializer_list<int> *)&local_18); if (local_28 == piVar3) { return 1; } get(param_1); bVar1 = false; if (*local_28 <= *(int *)(param_1 + 0x14)) { bVar1 = *(int *)(param_1 + 0x14) <= local_28[1]; local_28 = local_28 + 1; } if (!bVar1) break; add((int)param_1); local_28 = local_28 + 1; } *(char **)(param_1 + 0x70) = "invalid string: ill-formed UTF-8 byte"; return 0; }
61,676
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>>>>>::next_byte_in_range(std::initializer_list<int>)
monkey531[P]llama/common/json.hpp
bool next_byte_in_range(std::initializer_list<char_int_type> ranges) { JSON_ASSERT(ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6); add(current); for (auto range = ranges.begin(); range != ranges.end(); ++range) { get(); if (JSON_HEDLEY_LIKELY(*range <= current && current <= *(++range))) // NOLINT(bugprone-inc-dec-in-conditions) { add(current); } else { error_message = "invalid string: ill-formed UTF-8 byte"; return false; } } return true; }
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>>>>>::next_byte_in_range(std::initializer_list<int>): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax cmpq $0x6, %rdx ja 0x3f0ea movq %rdx, %rbx pushq $0x54 popq %rax btq %rdx, %rax jae 0x3f0ea movq %rsi, %r15 movq %rdi, %r14 movsbl 0x14(%rdi), %esi leaq 0x50(%rdi), %r12 movq %r12, %rdi callq 0x24750 shlq $0x2, %rbx testq %rbx, %rbx je 0x3f0d8 movq %r14, %rdi callq 0x3ed24 movl 0x14(%r14), %eax cmpl %eax, (%r15) jg 0x3f0cd cmpl 0x4(%r15), %eax jg 0x3f0cd movsbl %al, %esi movq %r12, %rdi callq 0x24750 addq $0x8, %r15 addq $-0x8, %rbx jmp 0x3f09c leaq 0x73813(%rip), %rax # 0xb28e7 movq %rax, 0x70(%r14) testq %rbx, %rbx sete %al addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq leaq 0x72af5(%rip), %rdi # 0xb1be6 leaq 0x6d048(%rip), %rdx # 0xac140 leaq 0x73848(%rip), %rcx # 0xb2947 movl $0x1da8, %esi # imm = 0x1DA8 xorl %eax, %eax callq 0x24e90 nop
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE18next_byte_in_rangeESt16initializer_listIiE: push r15 push r14 push r12 push rbx push rax cmp rdx, 6 ja short loc_3F0EA mov rbx, rdx push 54h ; 'T' pop rax bt rax, rdx jnb short loc_3F0EA mov r15, rsi mov r14, rdi movsx esi, byte ptr [rdi+14h] lea r12, [rdi+50h] mov rdi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) shl rbx, 2 loc_3F09C: test rbx, rbx jz short loc_3F0D8 mov rdi, r14 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) mov eax, [r14+14h] cmp [r15], eax jg short loc_3F0CD cmp eax, [r15+4] jg short loc_3F0CD movsx esi, al mov rdi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) add r15, 8 add rbx, 0FFFFFFFFFFFFFFF8h jmp short loc_3F09C loc_3F0CD: lea rax, aInvalidStringI; "invalid string: ill-formed UTF-8 byte" mov [r14+70h], rax loc_3F0D8: test rbx, rbx setz al add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn loc_3F0EA: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRangesSize2Ran; "ranges.size() == 2 || ranges.size() == "... mov esi, 1DA8h xor eax, eax call _ggml_abort nop
char 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>>>::next_byte_in_range( __m128i *a1, __int32 *a2, unsigned long long a3) { long long v4; // rax long long i; // rbx __int32 v7; // eax if ( a3 <= 6 && (v4 = 84LL, _bittest64(&v4, a3)) ) { std::string::push_back(&a1[5], (unsigned int)a1[1].m128i_i8[4]); for ( i = 4 * a3; i; i -= 8LL ) { 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); v7 = a1[1].m128i_i32[1]; if ( *a2 > v7 || v7 > a2[1] ) { a1[7].m128i_i64[0] = (long long)"invalid string: ill-formed UTF-8 byte"; return i == 0; } std::string::push_back(&a1[5], (unsigned int)(char)v7); a2 += 2; } return i == 0; } else { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7592LL, "GGML_ASSERT(%s) failed", "ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6"); return std::_Vector_base<char>::~_Vector_base("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp"); } }
next_byte_in_range: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX CMP RDX,0x6 JA 0x0013f0ea MOV RBX,RDX PUSH 0x54 POP RAX BT RAX,RDX JNC 0x0013f0ea MOV R15,RSI MOV R14,RDI MOVSX ESI,byte ptr [RDI + 0x14] LEA R12,[RDI + 0x50] MOV RDI,R12 CALL 0x00124750 SHL RBX,0x2 LAB_0013f09c: TEST RBX,RBX JZ 0x0013f0d8 MOV RDI,R14 CALL 0x0013ed24 MOV EAX,dword ptr [R14 + 0x14] CMP dword ptr [R15],EAX JG 0x0013f0cd CMP EAX,dword ptr [R15 + 0x4] JG 0x0013f0cd MOVSX ESI,AL MOV RDI,R12 CALL 0x00124750 ADD R15,0x8 ADD RBX,-0x8 JMP 0x0013f09c LAB_0013f0cd: LEA RAX,[0x1b28e7] MOV qword ptr [R14 + 0x70],RAX LAB_0013f0d8: TEST RBX,RBX SETZ AL ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET LAB_0013f0ea: LEA RDI,[0x1b1be6] LEA RDX,[0x1ac140] LEA RCX,[0x1b2947] MOV ESI,0x1da8 XOR EAX,EAX CALL 0x00124e90
/* 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 > > >::next_byte_in_range(std::initializer_list<int>) */ bool 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>>> ::next_byte_in_range (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>>> *param_1,int *param_2,ulong param_3) { long lVar1; char cVar2; if ((6 < param_3) || ((0x54UL >> (param_3 & 0x3f) & 1) == 0)) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1da8, "GGML_ASSERT(%s) failed", "ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6"); } cVar2 = (char)param_1 + 'P'; std::__cxx11::string::push_back(cVar2); lVar1 = param_3 << 2; do { if (lVar1 == 0) { LAB_0013f0d8: return lVar1 == 0; } get(param_1); if ((*(int *)(param_1 + 0x14) < *param_2) || (param_2[1] < *(int *)(param_1 + 0x14))) { *(char **)(param_1 + 0x70) = "invalid string: ill-formed UTF-8 byte"; goto LAB_0013f0d8; } std::__cxx11::string::push_back(cVar2); param_2 = param_2 + 2; lVar1 = lVar1 + -8; } while( true ); }
61,677
nlohmann::json_abi_v3_11_3::detail::type_error nlohmann::json_abi_v3_11_3::detail::type_error::create<std::nullptr_t, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t)
hkr04[P]cpp-mcp/common/json.hpp
static type_error create(int id_, const std::string& what_arg, BasicJsonContext context) { const std::string w = concat(exception::name("type_error", id_), exception::diagnostics(context), what_arg); return {id_, w.c_str()}; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::type_error nlohmann::json_abi_v3_11_3::detail::type_error::create<std::nullptr_t, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x98, %rsp movq %rdx, %r15 movl %esi, %ebp movq %rdi, %rbx leaq 0x38(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0x45d96(%rip), %rsi # 0x562e1 leaq 0x45d99(%rip), %rdx # 0x562eb leaq 0x28(%rsp), %rdi callq 0xf902 leaq 0x48(%rsp), %rdi leaq 0x28(%rsp), %rsi movl %ebp, %edx callq 0xf1b8 leaq 0x78(%rsp), %r14 movq %r14, -0x10(%r14) xorl %eax, %eax movq %rax, -0x8(%r14) movb %al, (%r14) leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) movq %rax, -0x8(%r12) movb %al, (%r12) movq 0x8(%r15), %rsi addq 0x50(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0xa900 movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx leaq 0x8(%rsp), %rdi callq 0xa1c0 movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx leaq 0x8(%rsp), %rdi callq 0xa1c0 movq (%r15), %rsi movq 0x8(%r15), %rdx leaq 0x8(%rsp), %rdi callq 0xa1c0 movq 0x68(%rsp), %rdi cmpq %r14, %rdi je 0x105f5 movq 0x78(%rsp), %rsi incq %rsi callq 0xa630 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x10610 movq 0x58(%rsp), %rsi incq %rsi callq 0xa630 movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x10627 movq 0x38(%rsp), %rsi incq %rsi callq 0xa630 movq 0x8(%rsp), %rdx movq %rbx, %rdi movl %ebp, %esi callq 0xf420 leaq 0x6a49b(%rip), %rax # 0x7aad8 movq %rax, (%rbx) movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x10657 movq 0x18(%rsp), %rsi incq %rsi callq 0xa630 movq %rbx, %rax addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x106e5 movq 0x18(%rsp), %rsi jmp 0x106dd movq %rax, %rbx jmp 0x106ce movq %rax, %rbx jmp 0x106e5 movq %rdx, %rbx movq %rax, %r15 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x106a7 movq 0x18(%rsp), %rsi incq %rsi callq 0xa630 leaq 0x68(%rsp), %rdi leaq 0x48(%rsp), %rdx leaq 0x88(%rsp), %r12 movq %r14, %rsi movq %r15, %rcx movl %ebx, %r8d movq %r12, %r9 callq 0xac09 movq (%r12), %rbx movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x106e5 movq 0x38(%rsp), %rsi incq %rsi callq 0xa630 movq %rbx, %rdi callq 0xaa50 nop
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 98h mov r15, rdx mov ebp, esi mov rbx, rdi lea r13, [rsp+0C8h+var_90] mov [r13-10h], r13 lea rsi, aTypeError; "type_error" lea rdx, aTypeError+0Ah; "" lea rdi, [rsp+0C8h+var_A0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+0C8h+var_80]; int lea rsi, [rsp+0C8h+var_A0]; int mov edx, ebp; int call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int) lea r14, [rsp+0C8h+var_50] mov [r14-10h], r14 xor eax, eax mov [r14-8], rax mov [r14], al lea r12, [rsp+0C8h+var_B0] mov [r12-10h], r12 mov [r12-8], rax mov [r12], al mov rsi, [r15+8] add rsi, [rsp+0C8h+var_78] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rsi, qword ptr [rsp+0C8h+var_80] mov rdx, [rsp+0C8h+var_78] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rsi, [rsp+0C8h+var_60] mov rdx, [rsp+0C8h+var_58] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rsi, [r15] mov rdx, [r15+8] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, [rsp+0C8h+var_60]; void * cmp rdi, r14 jz short loc_105F5 mov rsi, [rsp+0C8h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_105F5: lea rax, [rsp+0C8h+var_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_10610 mov rsi, [rsp+0C8h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_10610: mov rdi, [rsp+0C8h+var_A0]; void * cmp rdi, r13 jz short loc_10627 mov rsi, [rsp+0C8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_10627: mov rdx, [rsp+0C8h+var_C0]; char * mov rdi, rbx; this mov esi, ebp; int call _ZN8nlohmann16json_abi_v3_11_36detail9exceptionC2EiPKc; nlohmann::json_abi_v3_11_3::detail::exception::exception(int,char const*) lea rax, off_7AAD8 mov [rbx], rax mov rdi, [rsp+0C8h+var_C0]; void * cmp rdi, r12 jz short loc_10657 mov rsi, [rsp+0C8h+var_B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_10657: mov rax, rbx add rsp, 98h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_0] cmp rdi, r12 jz short loc_106E5 mov rsi, [rsp+arg_10] jmp short loc_106DD mov rbx, rax jmp short loc_106CE mov rbx, rax jmp short loc_106E5 mov rbx, rdx mov r15, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r12 jz short loc_106A7 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_106A7: lea rdi, [rsp+arg_60] lea rdx, [rsp+arg_40] lea r12, [rsp+arg_80] mov rsi, r14 mov rcx, r15 mov r8d, ebx mov r9, r12 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5__cold_1 mov rbx, [r12] loc_106CE: mov rdi, [rsp+arg_20]; void * cmp rdi, r13 jz short loc_106E5 mov rsi, [rsp+arg_30] loc_106DD: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_106E5: mov rdi, rbx call __Unwind_Resume
nlohmann::json_abi_v3_11_3::detail::exception * ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_( nlohmann::json_abi_v3_11_3::detail::exception *this, int a2, _QWORD *a3) { char *v5[2]; // [rsp+8h] [rbp-C0h] BYREF _QWORD v6[2]; // [rsp+18h] [rbp-B0h] BYREF void *v7[2]; // [rsp+28h] [rbp-A0h] BYREF _QWORD v8[2]; // [rsp+38h] [rbp-90h] BYREF int v9[2]; // [rsp+48h] [rbp-80h] BYREF long long v10; // [rsp+50h] [rbp-78h] long long v11; // [rsp+58h] [rbp-70h] BYREF void *v12; // [rsp+68h] [rbp-60h] long long v13; // [rsp+70h] [rbp-58h] _QWORD v14[10]; // [rsp+78h] [rbp-50h] BYREF v7[0] = v8; std::string::_M_construct<char const*>((long long)v7, "type_error", (long long)""); nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v9, (long long)v7, a2); v12 = v14; v13 = 0LL; LOBYTE(v14[0]) = 0; v5[0] = (char *)v6; v5[1] = 0LL; LOBYTE(v6[0]) = 0; std::string::reserve(v5, v10 + a3[1]); std::string::_M_append(v5, *(_QWORD *)v9, v10); std::string::_M_append(v5, v12, v13); std::string::_M_append(v5, *a3, a3[1]); if ( v12 != v14 ) operator delete(v12, v14[0] + 1LL); if ( *(long long **)v9 != &v11 ) operator delete(*(void **)v9, v11 + 1); if ( v7[0] != v8 ) operator delete(v7[0], v8[0] + 1LL); nlohmann::json_abi_v3_11_3::detail::exception::exception(this, a2, v5[0]); *(_QWORD *)this = off_7AAD8; if ( (_QWORD *)v5[0] != v6 ) operator delete(v5[0], v6[0] + 1LL); return this; }
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x98 MOV R15,RDX MOV EBP,ESI MOV RBX,RDI LEA R13,[RSP + 0x38] MOV qword ptr [R13 + -0x10],R13 LAB_00110544: LEA RSI,[0x1562e1] LEA RDX,[0x1562eb] LEA RDI,[RSP + 0x28] CALL 0x0010f902 LAB_0011055c: LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x28] MOV EDX,EBP CALL 0x0010f1b8 LEA R14,[RSP + 0x78] MOV qword ptr [R14 + -0x10],R14 XOR EAX,EAX MOV qword ptr [R14 + -0x8],RAX MOV byte ptr [R14],AL LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 MOV qword ptr [R12 + -0x8],RAX MOV byte ptr [R12],AL MOV RSI,qword ptr [R15 + 0x8] ADD RSI,qword ptr [RSP + 0x50] LAB_0011059b: LEA RDI,[RSP + 0x8] CALL 0x0010a900 MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] LEA RDI,[RSP + 0x8] CALL 0x0010a1c0 MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] LEA RDI,[RSP + 0x8] CALL 0x0010a1c0 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] LEA RDI,[RSP + 0x8] CALL 0x0010a1c0 MOV RDI,qword ptr [RSP + 0x68] CMP RDI,R14 JZ 0x001105f5 MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x0010a630 LAB_001105f5: LEA RAX,[RSP + 0x58] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00110610 MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x0010a630 LAB_00110610: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R13 JZ 0x00110627 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x0010a630 LAB_00110627: MOV RDX,qword ptr [RSP + 0x8] LAB_0011062c: MOV RDI,RBX MOV ESI,EBP CALL 0x0010f420 LAB_00110636: LEA RAX,[0x17aad8] MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x00110657 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0010a630 LAB_00110657: MOV RAX,RBX ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
exception * _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ (exception *param_1,int param_2,ulong *param_3) { char *local_c0; int8 local_b8; char local_b0; int7 uStack_af; long *local_a0 [2]; long local_90 [2]; long *local_80 [2]; long local_70 [2]; int1 *local_60; int8 local_58; int1 local_50; int7 uStack_4f; /* try { // try from 00110544 to 0011055b has its CatchHandler @ 00110685 */ local_a0[0] = local_90; std::__cxx11::string::_M_construct<char_const*>(local_a0,"type_error",""); /* try { // try from 0011055c to 0011056c has its CatchHandler @ 00110680 */ nlohmann::json_abi_v3_11_3::detail::exception::name ((exception *)local_80,(string *)local_a0,param_2); local_58 = 0; local_50 = 0; local_b8 = 0; local_b0 = '\0'; /* try { // try from 0011059b to 001105dd has its CatchHandler @ 0011068a */ local_c0 = &local_b0; local_60 = &local_50; std::__cxx11::string::reserve((ulong)&local_c0); std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_80[0]); std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_60); std::__cxx11::string::_M_append((char *)&local_c0,*param_3); if (local_60 != &local_50) { operator_delete(local_60,CONCAT71(uStack_4f,local_50) + 1); } if (local_80[0] != local_70) { operator_delete(local_80[0],local_70[0] + 1); } if (local_a0[0] != local_90) { operator_delete(local_a0[0],local_90[0] + 1); } /* try { // try from 0011062c to 00110635 has its CatchHandler @ 0011066c */ nlohmann::json_abi_v3_11_3::detail::exception::exception(param_1,param_2,local_c0); *(int ***)param_1 = &PTR__exception_0017aad8; if (local_c0 != &local_b0) { operator_delete(local_c0,CONCAT71(uStack_af,local_b0) + 1); } return param_1; }
61,678
testing::ScopedFakeTestPartResultReporter::Init()
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
void ScopedFakeTestPartResultReporter::Init() { internal::UnitTestImpl* const impl = internal::GetUnitTestImpl(); if (intercept_mode_ == INTERCEPT_ALL_THREADS) { old_reporter_ = impl->GetGlobalTestPartResultReporter(); impl->SetGlobalTestPartResultReporter(this); } else { old_reporter_ = impl->GetTestPartResultReporterForCurrentThread(); impl->SetTestPartResultReporterForCurrentThread(this); } }
O0
cpp
testing::ScopedFakeTestPartResultReporter::Init(): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rax movq %rax, (%rsp) callq 0xe2720 movq %rax, %rcx movq (%rsp), %rax movq %rcx, 0x8(%rsp) cmpl $0x1, 0x8(%rax) jne 0xbf4a7 movq 0x8(%rsp), %rdi callq 0xbf550 movq (%rsp), %rsi movq %rax, 0x10(%rsi) movq 0x8(%rsp), %rdi callq 0xbf5a0 jmp 0xbf4c3 movq 0x8(%rsp), %rdi callq 0xbb820 movq (%rsp), %rsi movq %rax, 0x10(%rsi) movq 0x8(%rsp), %rdi callq 0xbb840 addq $0x18, %rsp retq nopl (%rax,%rax)
_ZN7testing32ScopedFakeTestPartResultReporter4InitEv: sub rsp, 18h mov [rsp+18h+var_8], rdi mov rax, [rsp+18h+var_8] mov [rsp+18h+var_18], rax call _ZN7testing8internal15GetUnitTestImplEv; testing::internal::GetUnitTestImpl(void) mov rcx, rax mov rax, [rsp+18h+var_18] mov [rsp+18h+var_10], rcx cmp dword ptr [rax+8], 1 jnz short loc_BF4A7 mov rdi, [rsp+18h+var_10]; this call _ZN7testing8internal12UnitTestImpl31GetGlobalTestPartResultReporterEv; testing::internal::UnitTestImpl::GetGlobalTestPartResultReporter(void) mov rsi, [rsp+18h+var_18]; testing::TestPartResultReporterInterface * mov [rsi+10h], rax mov rdi, [rsp+18h+var_10]; this call _ZN7testing8internal12UnitTestImpl31SetGlobalTestPartResultReporterEPNS_31TestPartResultReporterInterfaceE; testing::internal::UnitTestImpl::SetGlobalTestPartResultReporter(testing::TestPartResultReporterInterface *) jmp short loc_BF4C3 loc_BF4A7: mov rdi, [rsp+18h+var_10]; this call _ZN7testing8internal12UnitTestImpl41GetTestPartResultReporterForCurrentThreadEv; testing::internal::UnitTestImpl::GetTestPartResultReporterForCurrentThread(void) mov rsi, [rsp+18h+var_18]; testing::TestPartResultReporterInterface * mov [rsi+10h], rax mov rdi, [rsp+18h+var_10]; this call _ZN7testing8internal12UnitTestImpl41SetTestPartResultReporterForCurrentThreadEPNS_31TestPartResultReporterInterfaceE; testing::internal::UnitTestImpl::SetTestPartResultReporterForCurrentThread(testing::TestPartResultReporterInterface *) loc_BF4C3: add rsp, 18h retn
long long testing::ScopedFakeTestPartResultReporter::Init(testing::ScopedFakeTestPartResultReporter *this) { testing::internal::UnitTestImpl *UnitTestImpl; // [rsp+8h] [rbp-10h] UnitTestImpl = (testing::internal::UnitTestImpl *)testing::internal::GetUnitTestImpl(this); if ( *((_DWORD *)this + 2) == 1 ) { *((_QWORD *)this + 2) = testing::internal::UnitTestImpl::GetGlobalTestPartResultReporter(UnitTestImpl); return testing::internal::UnitTestImpl::SetGlobalTestPartResultReporter(UnitTestImpl, this); } else { *((_QWORD *)this + 2) = testing::internal::UnitTestImpl::GetTestPartResultReporterForCurrentThread(UnitTestImpl); return testing::internal::UnitTestImpl::SetTestPartResultReporterForCurrentThread(UnitTestImpl, this); } }
Init: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP],RAX CALL 0x001e2720 MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV qword ptr [RSP + 0x8],RCX CMP dword ptr [RAX + 0x8],0x1 JNZ 0x001bf4a7 MOV RDI,qword ptr [RSP + 0x8] CALL 0x001bf550 MOV RSI,qword ptr [RSP] MOV qword ptr [RSI + 0x10],RAX MOV RDI,qword ptr [RSP + 0x8] CALL 0x001bf5a0 JMP 0x001bf4c3 LAB_001bf4a7: MOV RDI,qword ptr [RSP + 0x8] CALL 0x001bb820 MOV RSI,qword ptr [RSP] MOV qword ptr [RSI + 0x10],RAX MOV RDI,qword ptr [RSP + 0x8] CALL 0x001bb840 LAB_001bf4c3: ADD RSP,0x18 RET
/* testing::ScopedFakeTestPartResultReporter::Init() */ void __thiscall testing::ScopedFakeTestPartResultReporter::Init(ScopedFakeTestPartResultReporter *this) { UnitTestImpl *this_00; int8 uVar1; this_00 = (UnitTestImpl *)internal::GetUnitTestImpl(); if (*(int *)(this + 8) == 1) { uVar1 = internal::UnitTestImpl::GetGlobalTestPartResultReporter(this_00); *(int8 *)(this + 0x10) = uVar1; internal::UnitTestImpl::SetGlobalTestPartResultReporter (this_00,(TestPartResultReporterInterface *)this); } else { uVar1 = internal::UnitTestImpl::GetTestPartResultReporterForCurrentThread(this_00); *(int8 *)(this + 0x10) = uVar1; internal::UnitTestImpl::SetTestPartResultReporterForCurrentThread (this_00,(TestPartResultReporterInterface *)this); } return; }
61,679
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>::set_parents()
monkey531[P]llama/common/json.hpp
void set_parents() { #if JSON_DIAGNOSTICS switch (m_data.m_type) { case value_t::array: { for (auto& element : *m_data.m_value.array) { element.m_parent = this; } break; } case value_t::object: { for (auto& element : *m_data.m_value.object) { element.second.m_parent = this; } break; } case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: break; } #endif }
O0
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>::set_parents(): movq %rdi, -0x8(%rsp) retq nopw %cs:(%rax,%rax)
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE11set_parentsEv: mov [rsp+var_8], rdi retn
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>::set_parents() { ; }
set_parents: MOV qword ptr [RSP + -0x8],RDI 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>::set_parents() */ 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> ::set_parents(void) { return; }
61,680
non-virtual thunk to (anonymous namespace)::msgpack23_array_arrayTest_Test::~msgpack23_array_arrayTest_Test()
msgpack23/tests/array_tests.cpp
TEST_P(msgpack23_array, arrayTest) { std::vector<std::size_t> expected{}; for (std::size_t i = 0; i < GetParam(); ++i) { expected.emplace_back(i); } msgpack23::Packer packer{}; auto data = packer(expected); msgpack23::Unpacker unpacker{data}; std::vector<std::size_t> actual{}; unpacker(actual); EXPECT_EQ(actual, expected); }
O0
cpp
non-virtual thunk to (anonymous namespace)::msgpack23_array_arrayTest_Test::~msgpack23_array_arrayTest_Test(): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi callq 0x258f0 addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
_ZN12_GLOBAL__N_115msgpack23_arrayD2Ev: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] call _ZN7testing13TestWithParamImED2Ev; testing::TestWithParam<ulong>::~TestWithParam() add rsp, 10h pop rbp retn
void `anonymous namespace'::msgpack23_array::~msgpack23_array(_anonymous_namespace_::msgpack23_array *this) { testing::TestWithParam<unsigned long>::~TestWithParam(this); }
~msgpack23_array: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] CALL 0x001258f0 ADD RSP,0x10 POP RBP RET
/* (anonymous namespace)::msgpack23_array::~msgpack23_array() */ void __thiscall (anonymous_namespace)::msgpack23_array::~msgpack23_array(msgpack23_array *this) { testing::TestWithParam<unsigned_long>::~TestWithParam((TestWithParam<unsigned_long> *)this); return; }
61,681
ft_simple_get_word
eloqsql/storage/myisam/ft_parser.c
uchar ft_simple_get_word(CHARSET_INFO *cs, uchar **start, const uchar *end, FT_WORD *word, my_bool skip_stopwords) { uchar *doc= *start; uint mwc, length; int mbl; int ctype; DBUG_ENTER("ft_simple_get_word"); do { for (;; doc+= (mbl > 0 ? mbl : (mbl < 0 ? -mbl : 1))) { if (doc >= end) DBUG_RETURN(0); mbl= my_ci_ctype(cs, &ctype, (uchar*)doc, (uchar*)end); if (true_word_char(ctype, *doc)) break; } mwc= length= 0; for (word->pos= doc; doc < end; length++, doc+= (mbl > 0 ? mbl : (mbl < 0 ? -mbl : 1))) { mbl= my_ci_ctype(cs, &ctype, (uchar*)doc, (uchar*)end); if (true_word_char(ctype, *doc)) mwc= 0; else if (!misc_word_char(*doc) || mwc) break; else mwc++; } word->len= (uint)(doc-word->pos) - mwc; if (skip_stopwords == FALSE || (length >= ft_min_word_len && length < ft_max_word_len && !is_stopword((char*) word->pos, word->len))) { *start= doc; DBUG_RETURN(1); } } while (doc < end); DBUG_RETURN(0); }
O3
c
ft_simple_get_word: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %r8d, -0x30(%rbp) movq %rcx, -0x38(%rbp) movq %rdx, %r12 movq %rdi, %r13 movq %rsi, -0x40(%rbp) movq (%rsi), %r15 leaq -0x2c(%rbp), %rbx movl $0x1, %r14d cmpq %r12, %r15 jae 0x8eb9e movq 0xb8(%r13), %rax movq %r13, %rdi movq %rbx, %rsi movq %r15, %rdx movq %r12, %rcx callq *0x38(%rax) testb $0x7, -0x2c(%rbp) jne 0x8eaf6 cmpb $0x5f, (%r15) je 0x8eaf6 movl %eax, %ecx negl %ecx testl %eax, %eax cmovel %r14d, %ecx cmovgl %eax, %ecx addq %rcx, %r15 jmp 0x8eab9 movq -0x38(%rbp), %rax movq %r15, (%rax) xorl %r14d, %r14d cmpq %r12, %r15 jae 0x8eb47 movq 0xb8(%r13), %rax movq %r13, %rdi movq %rbx, %rsi movq %r15, %rdx movq %r12, %rcx callq *0x38(%rax) testb $0x7, -0x2c(%rbp) jne 0x8eb27 cmpb $0x5f, (%r15) jne 0x8eb4e incl %r14d movl %eax, %ecx negl %ecx testl %eax, %eax movl $0x1, %edx cmovel %edx, %ecx cmovgl %eax, %ecx addq %rcx, %r15 cmpq %r12, %r15 jb 0x8eb05 xorl %ecx, %ecx jmp 0x8eb50 movq %r15, %rdi xorl %ecx, %ecx jmp 0x8eb5a movb $0x1, %cl movq -0x38(%rbp), %rax movq (%rax), %rdi movl %r14d, %r14d movl %r15d, %esi subl %edi, %esi movq %rsi, 0x10(%rax) cmpb $0x0, -0x30(%rbp) je 0x8ebaf leaq 0x31dfe0(%rip), %rax # 0x3acb50 cmpq %r14, (%rax) ja 0x8eb90 leaq 0x31dfdc(%rip), %rax # 0x3acb58 cmpq %r14, (%rax) jbe 0x8eb90 movq %rcx, %r14 callq 0x8c6ed movq %r14, %rcx testl %eax, %eax je 0x8ebaf testb %cl, %cl movl $0x1, %r14d jne 0x8eab9 xorl %eax, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq -0x40(%rbp), %rax movq %r15, (%rax) movb $0x1, %al jmp 0x8eba0
ft_simple_get_word: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_30], r8d mov [rbp+var_38], rcx mov r12, rdx mov r13, rdi mov [rbp+var_40], rsi mov r15, [rsi] lea rbx, [rbp+var_2C] mov r14d, 1 loc_8EAB9: cmp r15, r12 jnb loc_8EB9E mov rax, [r13+0B8h] mov rdi, r13 mov rsi, rbx mov rdx, r15 mov rcx, r12 call qword ptr [rax+38h] test [rbp+var_2C], 7 jnz short loc_8EAF6 cmp byte ptr [r15], 5Fh ; '_' jz short loc_8EAF6 mov ecx, eax neg ecx test eax, eax cmovz ecx, r14d cmovg ecx, eax add r15, rcx jmp short loc_8EAB9 loc_8EAF6: mov rax, [rbp+var_38] mov [rax], r15 xor r14d, r14d cmp r15, r12 jnb short loc_8EB47 loc_8EB05: mov rax, [r13+0B8h] mov rdi, r13 mov rsi, rbx mov rdx, r15 mov rcx, r12 call qword ptr [rax+38h] test [rbp+var_2C], 7 jnz short loc_8EB27 cmp byte ptr [r15], 5Fh ; '_' jnz short loc_8EB4E loc_8EB27: inc r14d mov ecx, eax neg ecx test eax, eax mov edx, 1 cmovz ecx, edx cmovg ecx, eax add r15, rcx cmp r15, r12 jb short loc_8EB05 xor ecx, ecx jmp short loc_8EB50 loc_8EB47: mov rdi, r15 xor ecx, ecx jmp short loc_8EB5A loc_8EB4E: mov cl, 1 loc_8EB50: mov rax, [rbp+var_38] mov rdi, [rax] mov r14d, r14d loc_8EB5A: mov esi, r15d sub esi, edi mov [rax+10h], rsi cmp byte ptr [rbp+var_30], 0 jz short loc_8EBAF lea rax, ft_min_word_len cmp [rax], r14 ja short loc_8EB90 lea rax, ft_max_word_len cmp [rax], r14 jbe short loc_8EB90 mov r14, rcx call is_stopword mov rcx, r14 test eax, eax jz short loc_8EBAF loc_8EB90: test cl, cl mov r14d, 1 jnz loc_8EAB9 loc_8EB9E: xor eax, eax loc_8EBA0: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8EBAF: mov rax, [rbp+var_40] mov [rax], r15 mov al, 1 jmp short loc_8EBA0
char ft_simple_get_word(long long a1, _BYTE **a2, unsigned long long a3, long long *a4, char a5) { _BYTE *v7; // r15 int v8; // eax long long v9; // rcx long long *v10; // rax unsigned long long v11; // r14 int v12; // eax long long v13; // rcx char v14; // cl long long v15; // rdi long long v16; // rsi char v17; // r14 BOOL v18; // eax _BYTE v23[44]; // [rsp+14h] [rbp-2Ch] BYREF v7 = *a2; while ( 1 ) { while ( 1 ) { if ( (unsigned long long)v7 >= a3 ) return 0; v8 = (*(long long ( **)(long long, _BYTE *, _BYTE *, unsigned long long))(*(_QWORD *)(a1 + 184) + 56LL))( a1, v23, v7, a3); if ( (v23[0] & 7) != 0 || *v7 == 95 ) break; v9 = (unsigned int)-v8; if ( !v8 ) v9 = 1LL; if ( v8 > 0 ) v9 = (unsigned int)v8; v7 += v9; } v10 = a4; *a4 = (long long)v7; v11 = 0LL; if ( (unsigned long long)v7 >= a3 ) { v15 = (long long)v7; v14 = 0; } else { while ( 1 ) { v12 = (*(long long ( **)(long long, _BYTE *, _BYTE *, unsigned long long))(*(_QWORD *)(a1 + 184) + 56LL))( a1, v23, v7, a3); if ( (v23[0] & 7) == 0 && *v7 != 95 ) break; LODWORD(v11) = v11 + 1; v13 = (unsigned int)-v12; if ( !v12 ) v13 = 1LL; if ( v12 > 0 ) v13 = (unsigned int)v12; v7 += v13; if ( (unsigned long long)v7 >= a3 ) { v14 = 0; goto LABEL_21; } } v14 = 1; LABEL_21: v10 = a4; v15 = *a4; v11 = (unsigned int)v11; } v16 = (unsigned int)((_DWORD)v7 - v15); v10[2] = v16; if ( !a5 ) break; if ( ft_min_word_len <= v11 && ft_max_word_len > v11 ) { v17 = v14; v18 = is_stopword(v15, v16); v14 = v17; if ( !v18 ) break; } if ( !v14 ) return 0; } *a2 = v7; return 1; }
ft_simple_get_word: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV dword ptr [RBP + -0x30],R8D MOV qword ptr [RBP + -0x38],RCX MOV R12,RDX MOV R13,RDI MOV qword ptr [RBP + -0x40],RSI MOV R15,qword ptr [RSI] LEA RBX,[RBP + -0x2c] MOV R14D,0x1 LAB_0018eab9: CMP R15,R12 JNC 0x0018eb9e MOV RAX,qword ptr [R13 + 0xb8] MOV RDI,R13 MOV RSI,RBX MOV RDX,R15 MOV RCX,R12 CALL qword ptr [RAX + 0x38] TEST byte ptr [RBP + -0x2c],0x7 JNZ 0x0018eaf6 CMP byte ptr [R15],0x5f JZ 0x0018eaf6 MOV ECX,EAX NEG ECX TEST EAX,EAX CMOVZ ECX,R14D CMOVG ECX,EAX ADD R15,RCX JMP 0x0018eab9 LAB_0018eaf6: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],R15 XOR R14D,R14D CMP R15,R12 JNC 0x0018eb47 LAB_0018eb05: MOV RAX,qword ptr [R13 + 0xb8] MOV RDI,R13 MOV RSI,RBX MOV RDX,R15 MOV RCX,R12 CALL qword ptr [RAX + 0x38] TEST byte ptr [RBP + -0x2c],0x7 JNZ 0x0018eb27 CMP byte ptr [R15],0x5f JNZ 0x0018eb4e LAB_0018eb27: INC R14D MOV ECX,EAX NEG ECX TEST EAX,EAX MOV EDX,0x1 CMOVZ ECX,EDX CMOVG ECX,EAX ADD R15,RCX CMP R15,R12 JC 0x0018eb05 XOR ECX,ECX JMP 0x0018eb50 LAB_0018eb47: MOV RDI,R15 XOR ECX,ECX JMP 0x0018eb5a LAB_0018eb4e: MOV CL,0x1 LAB_0018eb50: MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RAX] MOV R14D,R14D LAB_0018eb5a: MOV ESI,R15D SUB ESI,EDI MOV qword ptr [RAX + 0x10],RSI CMP byte ptr [RBP + -0x30],0x0 JZ 0x0018ebaf LEA RAX,[0x4acb50] CMP qword ptr [RAX],R14 JA 0x0018eb90 LEA RAX,[0x4acb58] CMP qword ptr [RAX],R14 JBE 0x0018eb90 MOV R14,RCX CALL 0x0018c6ed MOV RCX,R14 TEST EAX,EAX JZ 0x0018ebaf LAB_0018eb90: TEST CL,CL MOV R14D,0x1 JNZ 0x0018eab9 LAB_0018eb9e: XOR EAX,EAX LAB_0018eba0: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0018ebaf: MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RAX],R15 MOV AL,0x1 JMP 0x0018eba0
int8 ft_simple_get_word(long param_1,int8 *param_2,char *param_3,int8 *param_4,char param_5) { bool bVar1; uint uVar2; int iVar3; ulong uVar4; ulong uVar5; uint uVar6; char *pcVar7; char *pcVar8; byte local_34 [4]; pcVar7 = (char *)*param_2; do { while( true ) { if (param_3 <= pcVar7) { return 0; } uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x38))(param_1,local_34,pcVar7); if (((local_34[0] & 7) != 0) || (*pcVar7 == '_')) break; uVar4 = (ulong)-uVar2; if (uVar2 == 0) { uVar4 = 1; } if (0 < (int)uVar2) { uVar4 = (ulong)uVar2; } pcVar7 = pcVar7 + uVar4; } *param_4 = pcVar7; uVar4 = 0; if (pcVar7 < param_3) { do { uVar6 = (uint)uVar4; uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x38))(param_1,local_34,pcVar7,param_3); if (((local_34[0] & 7) == 0) && (*pcVar7 != '_')) { bVar1 = true; pcVar8 = pcVar7; goto LAB_0018eb50; } uVar6 = uVar6 + 1; uVar4 = (ulong)uVar6; uVar5 = (ulong)-uVar2; if (uVar2 == 0) { uVar5 = 1; } if (0 < (int)uVar2) { uVar5 = (ulong)uVar2; } pcVar7 = pcVar7 + uVar5; } while (pcVar7 < param_3); bVar1 = false; pcVar8 = pcVar7; LAB_0018eb50: pcVar7 = (char *)*param_4; uVar4 = (ulong)uVar6; } else { bVar1 = false; pcVar8 = pcVar7; } param_4[2] = (ulong)(uint)((int)pcVar8 - (int)pcVar7); if ((param_5 == '\0') || (((ft_min_word_len <= uVar4 && (uVar4 < ft_max_word_len)) && (iVar3 = is_stopword(), iVar3 == 0)))) { *param_2 = pcVar8; return 1; } pcVar7 = pcVar8; if (!bVar1) { return 0; } } while( true ); }
61,682
print_xml_comment
eloqsql/client/mysqldump.c
static void print_xml_comment(FILE *xml_file, size_t len, const char *comment_string) { const char* end; fputs("<!-- ", xml_file); for (end= comment_string + len; comment_string != end; comment_string++) { /* The string "--" (double-hyphen) MUST NOT occur within xml comments. */ switch (*comment_string) { case '-': if (*(comment_string + 1) == '-') /* Only one hyphen allowed. */ break; /* fall through */ default: fputc(*comment_string, xml_file); break; } } fputs(" -->\n", xml_file); check_io(xml_file); }
O0
c
print_xml_comment: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rsi leaq 0x9d9ae(%rip), %rdi # 0xdb81d callq 0x38340 movq -0x18(%rbp), %rax addq -0x10(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax je 0x3dec7 movq -0x18(%rbp), %rax movb (%rax), %al subb $0x2d, %al jne 0x3dea7 jmp 0x3de96 movq -0x18(%rbp), %rax movsbl 0x1(%rax), %eax cmpl $0x2d, %eax jne 0x3dea5 jmp 0x3deb7 jmp 0x3dea7 movq -0x18(%rbp), %rax movsbl (%rax), %edi movq -0x8(%rbp), %rsi callq 0x388b0 jmp 0x3deb9 movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) jmp 0x3de80 movq -0x8(%rbp), %rsi leaq 0x9d951(%rip), %rdi # 0xdb823 callq 0x38340 movq -0x8(%rbp), %rdi callq 0x38d60 addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
print_xml_comment: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rsi, [rbp+var_8] lea rdi, asc_DB81D; "<!-- " call _fputs mov rax, [rbp+var_18] add rax, [rbp+var_10] mov [rbp+var_20], rax loc_3DE80: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jz short loc_3DEC7 mov rax, [rbp+var_18] mov al, [rax] sub al, 2Dh ; '-' jnz short loc_3DEA7 jmp short $+2 loc_3DE96: mov rax, [rbp+var_18] movsx eax, byte ptr [rax+1] cmp eax, 2Dh ; '-' jnz short loc_3DEA5 jmp short loc_3DEB7 loc_3DEA5: jmp short $+2 loc_3DEA7: mov rax, [rbp+var_18] movsx edi, byte ptr [rax] mov rsi, [rbp+var_8] call _fputc loc_3DEB7: jmp short $+2 loc_3DEB9: mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax jmp short loc_3DE80 loc_3DEC7: mov rsi, [rbp+var_8] lea rdi, asc_DB823; " -->\n" call _fputs mov rdi, [rbp+var_8] call check_io add rsp, 20h pop rbp retn
long long print_xml_comment(long long a1, long long a2, char *a3) { char *v4; // [rsp+0h] [rbp-20h] fputs("<!-- ", a1); v4 = &a3[a2]; while ( a3 != v4 ) { if ( *a3 != 45 || a3[1] != 45 ) fputc((unsigned int)*a3, a1); ++a3; } fputs(" -->\n", a1); return check_io(a1); }
print_xml_comment: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RSI,qword ptr [RBP + -0x8] LEA RDI,[0x1db81d] CALL 0x00138340 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x20],RAX LAB_0013de80: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JZ 0x0013dec7 MOV RAX,qword ptr [RBP + -0x18] MOV AL,byte ptr [RAX] SUB AL,0x2d JNZ 0x0013dea7 JMP 0x0013de96 LAB_0013de96: MOV RAX,qword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX + 0x1] CMP EAX,0x2d JNZ 0x0013dea5 JMP 0x0013deb7 LAB_0013dea5: JMP 0x0013dea7 LAB_0013dea7: MOV RAX,qword ptr [RBP + -0x18] MOVSX EDI,byte ptr [RAX] MOV RSI,qword ptr [RBP + -0x8] CALL 0x001388b0 LAB_0013deb7: JMP 0x0013deb9 LAB_0013deb9: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x0013de80 LAB_0013dec7: MOV RSI,qword ptr [RBP + -0x8] LEA RDI,[0x1db823] CALL 0x00138340 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00138d60 ADD RSP,0x20 POP RBP RET
void print_xml_comment(FILE *param_1,long param_2,char *param_3) { char *local_20; fputs("<!-- ",param_1); for (local_20 = param_3; local_20 != param_3 + param_2; local_20 = local_20 + 1) { if ((*local_20 != '-') || (local_20[1] != '-')) { fputc((int)*local_20,param_1); } } fputs(" -->\n",param_1); check_io(param_1); return; }
61,683
vec_is_equal
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/vect.h
static inline bool_t vec_is_equal(const void *a, const void *b, size_t num) { const limb_t *ap = (const limb_t *)a; const limb_t *bp = (const limb_t *)b; limb_t acc; size_t i; #ifndef __BLST_NO_ASM__ bool_t vec_is_equal_16x(const void *a, const void *b, size_t num); if ((num & 15) == 0) return vec_is_equal_16x(a, b, num); #endif num /= sizeof(limb_t); for (acc = 0, i = 0; i < num; i++) acc |= ap[i] ^ bp[i]; return is_zero(acc); }
O0
c
vec_is_equal: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x20(%rbp), %rax andq $0xf, %rax cmpq $0x0, %rax jne 0x26059 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x41b40 movq %rax, -0x8(%rbp) jmp 0x260ba movq -0x20(%rbp), %rax shrq $0x3, %rax movq %rax, -0x20(%rbp) movq $0x0, -0x38(%rbp) movq $0x0, -0x40(%rbp) movq -0x40(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0x260ad movq -0x28(%rbp), %rax movq -0x40(%rbp), %rcx movq (%rax,%rcx,8), %rax movq -0x30(%rbp), %rcx movq -0x40(%rbp), %rdx xorq (%rcx,%rdx,8), %rax orq -0x38(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x40(%rbp), %rax addq $0x1, %rax movq %rax, -0x40(%rbp) jmp 0x26075 movq -0x38(%rbp), %rdi callq 0x233e0 movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nop
vec_is_equal: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov [rbp+var_28], rax mov rax, [rbp+var_18] mov [rbp+var_30], rax mov rax, [rbp+var_20] and rax, 0Fh cmp rax, 0 jnz short loc_26059 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call vec_is_equal_16x mov [rbp+var_8], rax jmp short loc_260BA loc_26059: mov rax, [rbp+var_20] shr rax, 3 mov [rbp+var_20], rax mov [rbp+var_38], 0 mov [rbp+var_40], 0 loc_26075: mov rax, [rbp+var_40] cmp rax, [rbp+var_20] jnb short loc_260AD mov rax, [rbp+var_28] mov rcx, [rbp+var_40] mov rax, [rax+rcx*8] mov rcx, [rbp+var_30] mov rdx, [rbp+var_40] xor rax, [rcx+rdx*8] or rax, [rbp+var_38] mov [rbp+var_38], rax mov rax, [rbp+var_40] add rax, 1 mov [rbp+var_40], rax jmp short loc_26075 loc_260AD: mov rdi, [rbp+var_38] call is_zero mov [rbp+var_8], rax loc_260BA: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
unsigned long long vec_is_equal(long long a1, long long a2, unsigned long long a3) { unsigned long long i; // [rsp+0h] [rbp-40h] long long v5; // [rsp+8h] [rbp-38h] if ( (a3 & 0xF) == 0 ) return vec_is_equal_16x(a1, a2, a3); v5 = 0LL; for ( i = 0LL; i < a3 >> 3; ++i ) v5 |= *(_QWORD *)(a2 + 8 * i) ^ *(_QWORD *)(a1 + 8 * i); return is_zero(v5); }
vec_is_equal: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x20] AND RAX,0xf CMP RAX,0x0 JNZ 0x00126059 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x00141b40 MOV qword ptr [RBP + -0x8],RAX JMP 0x001260ba LAB_00126059: MOV RAX,qword ptr [RBP + -0x20] SHR RAX,0x3 MOV qword ptr [RBP + -0x20],RAX MOV qword ptr [RBP + -0x38],0x0 MOV qword ptr [RBP + -0x40],0x0 LAB_00126075: MOV RAX,qword ptr [RBP + -0x40] CMP RAX,qword ptr [RBP + -0x20] JNC 0x001260ad MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + RCX*0x8] MOV RCX,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x40] XOR RAX,qword ptr [RCX + RDX*0x8] OR RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x40] ADD RAX,0x1 MOV qword ptr [RBP + -0x40],RAX JMP 0x00126075 LAB_001260ad: MOV RDI,qword ptr [RBP + -0x38] CALL 0x001233e0 MOV qword ptr [RBP + -0x8],RAX LAB_001260ba: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
int8 vec_is_equal(long param_1,long param_2,ulong param_3) { int8 local_48; int8 local_40; int8 local_10; if ((param_3 & 0xf) == 0) { local_10 = vec_is_equal_16x(param_1,param_2,param_3); } else { local_40 = 0; for (local_48 = 0; local_48 < param_3 >> 3; local_48 = local_48 + 1) { local_40 = *(ulong *)(param_1 + local_48 * 8) ^ *(ulong *)(param_2 + local_48 * 8) | local_40; } local_10 = is_zero(local_40); } return local_10; }
61,684
my_fprintf
eloqsql/strings/my_vsnprintf.c
int my_fprintf(FILE *stream, const char* format, ...) { int result; va_list args; va_start(args, format); result= my_vfprintf(stream, format, args); va_end(args); return result; }
O3
c
my_fprintf: pushq %rbp movq %rsp, %rbp subq $0xd0, %rsp leaq -0xd0(%rbp), %r10 movq %rdx, 0x10(%r10) movq %rcx, 0x18(%r10) movq %r8, 0x20(%r10) movq %r9, 0x28(%r10) testb %al, %al je 0x7bb48 movaps %xmm0, -0xa0(%rbp) movaps %xmm1, -0x90(%rbp) movaps %xmm2, -0x80(%rbp) movaps %xmm3, -0x70(%rbp) movaps %xmm4, -0x60(%rbp) movaps %xmm5, -0x50(%rbp) movaps %xmm6, -0x40(%rbp) movaps %xmm7, -0x30(%rbp) leaq -0x20(%rbp), %rdx movq %r10, 0x10(%rdx) leaq 0x10(%rbp), %rax movq %rax, 0x8(%rdx) movabsq $0x3000000010, %rax # imm = 0x3000000010 movq %rax, (%rdx) callq 0x7ba0c addq $0xd0, %rsp popq %rbp retq nop
my_fprintf: push rbp mov rbp, rsp sub rsp, 0D0h lea r10, [rbp+var_D0] mov [r10+10h], rdx mov [r10+18h], rcx mov [r10+20h], r8 mov [r10+28h], r9 test al, al jz short loc_7BB48 movaps [rbp+var_A0], xmm0 movaps [rbp+var_90], xmm1 movaps [rbp+var_80], xmm2 movaps [rbp+var_70], xmm3 movaps [rbp+var_60], xmm4 movaps [rbp+var_50], xmm5 movaps [rbp+var_40], xmm6 movaps [rbp+var_30], xmm7 loc_7BB48: lea rdx, [rbp+var_20] mov [rdx+10h], r10 lea rax, [rbp+arg_0] mov [rdx+8], rax mov rax, 3000000010h mov [rdx], rax call my_vfprintf add rsp, 0D0h pop rbp retn
long long my_fprintf( long long a1, unsigned __int8 *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, char a15) { char v16; // [rsp+0h] [rbp-D0h] BYREF long long v17; // [rsp+10h] [rbp-C0h] long long v18; // [rsp+18h] [rbp-B8h] long long v19; // [rsp+20h] [rbp-B0h] long long v20; // [rsp+28h] [rbp-A8h] __m128 v21; // [rsp+30h] [rbp-A0h] __m128 v22; // [rsp+40h] [rbp-90h] __m128 v23; // [rsp+50h] [rbp-80h] __m128 v24; // [rsp+60h] [rbp-70h] __m128 v25; // [rsp+70h] [rbp-60h] __m128 v26; // [rsp+80h] [rbp-50h] __m128 v27; // [rsp+90h] [rbp-40h] __m128 v28; // [rsp+A0h] [rbp-30h] _QWORD v29[4]; // [rsp+B0h] [rbp-20h] BYREF v21 = a7; v22 = a8; v23 = a9; v24 = a10; v25 = a11; v26 = a12; v27 = a13; v28 = a14; v17 = a3; v18 = a4; v19 = a5; v20 = a6; v29[2] = &v16; v29[1] = &a15; v29[0] = 0x3000000010LL; return my_vfprintf(a1, a2, (unsigned int *)v29); }
my_fprintf: PUSH RBP MOV RBP,RSP SUB RSP,0xd0 LEA R10,[RBP + -0xd0] MOV qword ptr [R10 + 0x10],RDX MOV qword ptr [R10 + 0x18],RCX MOV qword ptr [R10 + 0x20],R8 MOV qword ptr [R10 + 0x28],R9 TEST AL,AL JZ 0x0017bb48 MOVAPS xmmword ptr [RBP + -0xa0],XMM0 MOVAPS xmmword ptr [RBP + -0x90],XMM1 MOVAPS xmmword ptr [RBP + -0x80],XMM2 MOVAPS xmmword ptr [RBP + -0x70],XMM3 MOVAPS xmmword ptr [RBP + -0x60],XMM4 MOVAPS xmmword ptr [RBP + -0x50],XMM5 MOVAPS xmmword ptr [RBP + -0x40],XMM6 MOVAPS xmmword ptr [RBP + -0x30],XMM7 LAB_0017bb48: LEA RDX,[RBP + -0x20] MOV qword ptr [RDX + 0x10],R10 LEA RAX,[RBP + 0x10] MOV qword ptr [RDX + 0x8],RAX MOV RAX,0x3000000010 MOV qword ptr [RDX],RAX CALL 0x0017ba0c ADD RSP,0xd0 POP RBP RET
void my_fprintf(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int8 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; int1 local_d8 [16]; int8 local_c8; int8 local_c0; int8 local_b8; int8 local_b0; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int8 local_38; int8 local_28; int1 *local_20; int1 *local_18; local_18 = local_d8; if (in_AL != '\0') { local_a8 = param_1; local_98 = param_2; local_88 = param_3; local_78 = param_4; local_68 = param_5; local_58 = param_6; local_48 = param_7; local_38 = param_8; } local_20 = &stack0x00000008; local_28 = 0x3000000010; local_c8 = param_11; local_c0 = param_12; local_b8 = param_13; local_b0 = param_14; my_vfprintf(); return; }
61,685
JS_NewClass
bluesky950520[P]quickjs/quickjs.c
int JS_NewClass(JSRuntime *rt, JSClassID class_id, const JSClassDef *class_def) { int ret, len; JSAtom name; // XXX: class_def->class_name must be raw 8-bit contents. No UTF-8 encoded strings len = strlen(class_def->class_name); name = __JS_FindAtom(rt, class_def->class_name, len, JS_ATOM_TYPE_STRING); if (name == JS_ATOM_NULL) { name = __JS_NewAtomInit(rt, class_def->class_name, len, JS_ATOM_TYPE_STRING); if (name == JS_ATOM_NULL) return -1; } ret = JS_NewClass1(rt, class_id, class_def, name); JS_FreeAtomRT(rt, name); return ret; }
O1
c
JS_NewClass: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdx, %r14 movl %esi, %ebp movq %rdi, %rbx movq (%rdx), %r15 movq %r15, %rdi callq 0xe240 movq %rax, %r12 movslq %r12d, %rdx movq %rbx, %rdi movq %r15, %rsi callq 0x1fe30 testl %eax, %eax je 0x20916 movl %eax, %r15d movq %rbx, %rdi movl %ebp, %esi movq %r14, %rdx movl %eax, %ecx callq 0x20934 movl %eax, %ebp cmpl $0xe0, %r15d jl 0x2090b movq 0x68(%rbx), %rax movl %r15d, %ecx movq (%rax,%rcx,8), %rsi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x2090b movq %rbx, %rdi callq 0x3b863 movl %ebp, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq (%r14), %rsi movq %rbx, %rdi movl %r12d, %edx movl $0x1, %ecx callq 0xf48e testl %eax, %eax jne 0x208cf movl $0xffffffff, %ebp # imm = 0xFFFFFFFF jmp 0x2090b
JS_NewClass: push rbp push r15 push r14 push r12 push rbx mov r14, rdx mov ebp, esi mov rbx, rdi mov r15, [rdx] mov rdi, r15 call _strlen mov r12, rax movsxd rdx, r12d mov rdi, rbx mov rsi, r15 call __JS_FindAtom test eax, eax jz short loc_20916 loc_208CF: mov r15d, eax mov rdi, rbx mov esi, ebp mov rdx, r14 mov ecx, eax call JS_NewClass1 mov ebp, eax cmp r15d, 0E0h jl short loc_2090B mov rax, [rbx+68h] mov ecx, r15d mov rsi, [rax+rcx*8] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_2090B mov rdi, rbx call JS_FreeAtomStruct loc_2090B: mov eax, ebp pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_20916: mov rsi, [r14] mov rdi, rbx mov edx, r12d mov ecx, 1 call __JS_NewAtomInit test eax, eax jnz short loc_208CF mov ebp, 0FFFFFFFFh jmp short loc_2090B
long long JS_NewClass(long long a1, unsigned int a2, long long *a3) { long long v4; // r15 int v5; // r12d unsigned int Atom; // eax long long v7; // r8 long long v8; // r9 int v9; // r15d unsigned int v10; // ebp _DWORD *v11; // rsi int v12; // eax v4 = *a3; v5 = strlen(*a3); Atom = _JS_FindAtom(a1, v4, v5); if ( Atom || (Atom = _JS_NewAtomInit(a1, *a3, v5, 1u)) != 0 ) { v9 = Atom; v10 = JS_NewClass1(a1, a2, a3, Atom, v7, v8); if ( v9 >= 224 ) { v11 = *(_DWORD **)(*(_QWORD *)(a1 + 104) + 8LL * (unsigned int)v9); v12 = (*v11)--; if ( v12 <= 1 ) JS_FreeAtomStruct(a1); } } else { return (unsigned int)-1; } return v10; }
JS_NewClass: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R14,RDX MOV EBP,ESI MOV RBX,RDI MOV R15,qword ptr [RDX] MOV RDI,R15 CALL 0x0010e240 MOV R12,RAX MOVSXD RDX,R12D MOV RDI,RBX MOV RSI,R15 CALL 0x0011fe30 TEST EAX,EAX JZ 0x00120916 LAB_001208cf: MOV R15D,EAX MOV RDI,RBX MOV ESI,EBP MOV RDX,R14 MOV ECX,EAX CALL 0x00120934 MOV EBP,EAX CMP R15D,0xe0 JL 0x0012090b MOV RAX,qword ptr [RBX + 0x68] MOV ECX,R15D MOV RSI,qword ptr [RAX + RCX*0x8] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x0012090b MOV RDI,RBX CALL 0x0013b863 LAB_0012090b: MOV EAX,EBP POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00120916: MOV RSI,qword ptr [R14] MOV RDI,RBX MOV EDX,R12D MOV ECX,0x1 CALL 0x0010f48e TEST EAX,EAX JNZ 0x001208cf MOV EBP,0xffffffff JMP 0x0012090b
int4 JS_NewClass(long param_1,int4 param_2,int8 *param_3) { int iVar1; char *__s; int *piVar2; uint uVar3; int4 uVar4; size_t sVar5; __s = (char *)*param_3; sVar5 = strlen(__s); uVar3 = __JS_FindAtom(param_1,__s,(long)(int)sVar5); if ((uVar3 == 0) && (uVar3 = __JS_NewAtomInit(param_1,*param_3,sVar5 & 0xffffffff,1), uVar3 == 0)) { return 0xffffffff; } uVar4 = JS_NewClass1(param_1,param_2,param_3,uVar3); if ((0xdf < (int)uVar3) && (piVar2 = *(int **)(*(long *)(param_1 + 0x68) + (ulong)uVar3 * 8), iVar1 = *piVar2, *piVar2 = iVar1 + -1, iVar1 < 2)) { JS_FreeAtomStruct(param_1); } return uVar4; }
61,686
JS_NewClass
bluesky950520[P]quickjs/quickjs.c
int JS_NewClass(JSRuntime *rt, JSClassID class_id, const JSClassDef *class_def) { int ret, len; JSAtom name; // XXX: class_def->class_name must be raw 8-bit contents. No UTF-8 encoded strings len = strlen(class_def->class_name); name = __JS_FindAtom(rt, class_def->class_name, len, JS_ATOM_TYPE_STRING); if (name == JS_ATOM_NULL) { name = __JS_NewAtomInit(rt, class_def->class_name, len, JS_ATOM_TYPE_STRING); if (name == JS_ATOM_NULL) return -1; } ret = JS_NewClass1(rt, class_id, class_def, name); JS_FreeAtomRT(rt, name); return ret; }
O2
c
JS_NewClass: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdx, %r14 movl %esi, %ebp movq %rdi, %rbx movq (%rdx), %r15 movq %r15, %rdi callq 0xe250 movq %rax, %r12 movslq %r12d, %rdx movq %rbx, %rdi movq %r15, %rsi callq 0x1a224 testl %eax, %eax jne 0x1aa9f movq (%r14), %rsi pushq $0x1 popq %rcx movq %rbx, %rdi movl %r12d, %edx callq 0x1aace testl %eax, %eax je 0x1aac9 movl %eax, %r15d movq %rbx, %rdi movl %ebp, %esi movq %r14, %rdx movl %eax, %ecx callq 0x1ab3b movl %eax, %ebp movq %rbx, %rdi movl %r15d, %esi callq 0x182d0 movl %ebp, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq pushq $-0x1 popq %rax jmp 0x1aac0
JS_NewClass: push rbp push r15 push r14 push r12 push rbx mov r14, rdx mov ebp, esi mov rbx, rdi mov r15, [rdx] mov rdi, r15 call _strlen mov r12, rax movsxd rdx, r12d mov rdi, rbx mov rsi, r15 call __JS_FindAtom test eax, eax jnz short loc_1AA9F mov rsi, [r14] push 1 pop rcx mov rdi, rbx mov edx, r12d call __JS_NewAtomInit test eax, eax jz short loc_1AAC9 loc_1AA9F: mov r15d, eax mov rdi, rbx mov esi, ebp mov rdx, r14 mov ecx, eax call JS_NewClass1 mov ebp, eax mov rdi, rbx mov esi, r15d call JS_FreeAtomRT mov eax, ebp loc_1AAC0: pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_1AAC9: push 0FFFFFFFFFFFFFFFFh pop rax jmp short loc_1AAC0
long long JS_NewClass(long long a1, unsigned int a2, long long *a3) { long long v4; // r15 unsigned int v5; // r12d unsigned int Atom; // eax long long v7; // r8 long long v8; // r9 int v9; // r15d unsigned int v10; // ebp v4 = *a3; v5 = strlen(*a3); Atom = _JS_FindAtom(a1, v4, (int)v5); if ( !Atom ) { Atom = _JS_NewAtomInit(a1, *a3, v5, 1LL); if ( !Atom ) return -1LL; } v9 = Atom; v10 = JS_NewClass1(a1, a2, a3, Atom, v7, v8); JS_FreeAtomRT(a1, v9); return v10; }
JS_NewClass: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R14,RDX MOV EBP,ESI MOV RBX,RDI MOV R15,qword ptr [RDX] MOV RDI,R15 CALL 0x0010e250 MOV R12,RAX MOVSXD RDX,R12D MOV RDI,RBX MOV RSI,R15 CALL 0x0011a224 TEST EAX,EAX JNZ 0x0011aa9f MOV RSI,qword ptr [R14] PUSH 0x1 POP RCX MOV RDI,RBX MOV EDX,R12D CALL 0x0011aace TEST EAX,EAX JZ 0x0011aac9 LAB_0011aa9f: MOV R15D,EAX MOV RDI,RBX MOV ESI,EBP MOV RDX,R14 MOV ECX,EAX CALL 0x0011ab3b MOV EBP,EAX MOV RDI,RBX MOV ESI,R15D CALL 0x001182d0 MOV EAX,EBP LAB_0011aac0: POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0011aac9: PUSH -0x1 POP RAX JMP 0x0011aac0
ulong JS_NewClass(int8 param_1,int4 param_2,int8 *param_3) { char *__s; int iVar1; uint uVar2; size_t sVar3; __s = (char *)*param_3; sVar3 = strlen(__s); iVar1 = __JS_FindAtom(param_1,__s,(long)(int)sVar3); if ((iVar1 == 0) && (iVar1 = __JS_NewAtomInit(param_1,*param_3,sVar3 & 0xffffffff,1), iVar1 == 0)) { return 0xffffffffffffffff; } uVar2 = JS_NewClass1(param_1,param_2,param_3,iVar1); JS_FreeAtomRT(param_1,iVar1); return (ulong)uVar2; }
61,687
minja::Parser::parseLogicalOr()
monkey531[P]llama/common/minja.hpp
std::shared_ptr<Expression> parseLogicalOr() { auto left = parseLogicalAnd(); if (!left) throw std::runtime_error("Expected left side of 'logical or' expression"); static std::regex or_tok(R"(or\b)"); auto location = get_location(); while (!consumeToken(or_tok).empty()) { auto right = parseLogicalAnd(); if (!right) throw std::runtime_error("Expected right side of 'or' expression"); left = std::make_shared<BinaryOpExpr>(location, std::move(left), std::move(right), BinaryOpExpr::Op::Or); } return left; }
O3
cpp
minja::Parser::parseLogicalOr(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rsi, %r14 movq %rdi, %rbx callq 0x845be cmpq $0x0, (%rbx) je 0x842d5 leaq 0xa7e4e(%rip), %rax # 0x12bfb8 movb (%rax), %al testb %al, %al je 0x84307 movq (%r14), %rax movq %rax, 0x20(%rsp) movq 0x8(%r14), %rax movq %rax, 0x28(%rsp) testq %rax, %rax je 0x8419f movq 0xa6df7(%rip), %rcx # 0x12af88 cmpb $0x0, (%rcx) je 0x8419b incl 0x8(%rax) jmp 0x8419f lock incl 0x8(%rax) movq 0x20(%r14), %rax subq 0x10(%r14), %rax leaq 0x20(%rsp), %rcx movq %rax, 0x10(%rcx) movq %rsp, %r13 leaq 0xa57ce(%rip), %r12 # 0x129988 addq $0x10, %r12 movq %r13, %rdi movq %r14, %rsi leaq 0xa7dcd(%rip), %rdx # 0x12bf98 movl $0x1, %ecx callq 0x82ff2 movq (%rsp), %rdi movq 0x8(%rsp), %r15 leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x841f5 movq 0x10(%rsp), %rsi incq %rsi callq 0x1a8e0 testq %r15, %r15 je 0x84280 movq %r13, %rdi movq %r14, %rsi callq 0x845be cmpq $0x0, (%rsp) je 0x842a1 movl $0x58, %edi callq 0x1a8c0 movq %rax, %rbp movabsq $0x100000001, %rax # imm = 0x100000001 movq %rax, 0x8(%rbp) movq %r12, (%rbp) movq %rbp, %r15 addq $0x10, %r15 movq %r15, %rdi leaq 0x20(%rsp), %rsi movq %rbx, %rdx movq %r13, %rcx movl $0xf, %r8d callq 0x94f30 movq %r15, (%rbx) movq 0x8(%rbx), %rdi movq %rbp, 0x8(%rbx) testq %rdi, %rdi je 0x84268 callq 0x6cd76 movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x841be callq 0x6cd76 jmp 0x841be movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x8428f callq 0x6cd76 movq %rbx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x1a440 movq %rax, %r15 leaq 0x6a7a9(%rip), %rsi # 0xeea5e movq %rax, %rdi callq 0x1a320 movq 0xa6d2c(%rip), %rsi # 0x12aff0 movq 0xa6c95(%rip), %rdx # 0x12af60 movq %r15, %rdi callq 0x1af20 jmp 0x84307 movl $0x10, %edi callq 0x1a440 movq %rax, %r15 leaq 0x6a742(%rip), %rsi # 0xeea2b movq %rax, %rdi callq 0x1a320 movq 0xa6cf8(%rip), %rsi # 0x12aff0 movq 0xa6c61(%rip), %rdx # 0x12af60 movq %r15, %rdi callq 0x1af20 leaq 0xa7caa(%rip), %rdi # 0x12bfb8 callq 0x1b000 testl %eax, %eax je 0x84174 leaq 0xa7c76(%rip), %rdi # 0x12bf98 leaq 0x6a730(%rip), %rsi # 0xeea59 movl $0x10, %edx callq 0x61d04 leaq -0x22332(%rip), %rdi # 0x62008 leaq 0xa7c57(%rip), %rsi # 0x12bf98 leaq 0xa7580(%rip), %rdx # 0x12b8c8 callq 0x1a7c0 leaq 0xa7c64(%rip), %rdi # 0x12bfb8 callq 0x1a5c0 jmp 0x84174 movq %rax, %r14 leaq 0xa7c50(%rip), %rdi # 0x12bfb8 callq 0x1a5b0 jmp 0x843b8 movq %rax, %r14 jmp 0x843b8 movq %rax, %r14 movq %r15, %rdi callq 0x1a690 jmp 0x843b8 jmp 0x84392 movq %rax, %r14 movq %r15, %rdi callq 0x1a690 jmp 0x84395 jmp 0x843a6 movq %rax, %r14 movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x843a9 callq 0x6cd76 jmp 0x843a9 movq %rax, %r14 movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x843b8 callq 0x6cd76 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x843c6 callq 0x6cd76 movq %r14, %rdi callq 0x1afa0
_ZN5minja6Parser14parseLogicalOrEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r14, rsi mov rbx, rdi call _ZN5minja6Parser15parseLogicalAndEv; minja::Parser::parseLogicalAnd(void) cmp qword ptr [rbx], 0 jz loc_842D5 lea rax, _ZGVZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; `guard variable for'minja::Parser::parseLogicalOr(void)::or_tok mov al, [rax] test al, al jz loc_84307 loc_84174: mov rax, [r14] mov [rsp+68h+var_48], rax mov rax, [r14+8] mov [rsp+68h+var_40], rax test rax, rax jz short loc_8419F mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_8419B inc dword ptr [rax+8] jmp short loc_8419F loc_8419B: lock inc dword ptr [rax+8] loc_8419F: mov rax, [r14+20h] sub rax, [r14+10h] lea rcx, [rsp+68h+var_48] mov [rcx+10h], rax mov r13, rsp lea r12, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja12BinaryOpExprESaIS1_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<minja::BinaryOpExpr>,(__gnu_cxx::_Lock_policy)2> add r12, 10h loc_841BE: mov rdi, r13 mov rsi, r14 lea rdx, _ZZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; minja::Parser::parseLogicalOr(void)::or_tok mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) mov rdi, [rsp+68h+var_68]; void * mov r15, [rsp+68h+var_60] lea rax, [rsp+68h+var_58] cmp rdi, rax jz short loc_841F5 mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_841F5: test r15, r15 jz loc_84280 mov rdi, r13; this mov rsi, r14 call _ZN5minja6Parser15parseLogicalAndEv; minja::Parser::parseLogicalAnd(void) cmp [rsp+68h+var_68], 0 jz loc_842A1 mov edi, 58h ; 'X'; unsigned __int64 call __Znwm; operator new(ulong) mov rbp, rax mov rax, 100000001h mov [rbp+8], rax mov [rbp+0], r12 mov r15, rbp add r15, 10h mov rdi, r15 lea rsi, [rsp+68h+var_48] mov rdx, rbx mov rcx, r13 mov r8d, 0Fh call _ZN5minja12BinaryOpExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_NS0_2OpE; minja::BinaryOpExpr::BinaryOpExpr(minja::Location const&,std::shared_ptr<minja::Expression> &&,std::shared_ptr<minja::Expression> &,minja::BinaryOpExpr::Op) mov [rbx], r15 mov rdi, [rbx+8] mov [rbx+8], rbp test rdi, rdi jz short loc_84268 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_84268: mov rdi, [rsp+68h+var_60] test rdi, rdi jz loc_841BE call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp loc_841BE loc_84280: mov rdi, [rsp+68h+var_40] test rdi, rdi jz short loc_8428F call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_8428F: mov rax, rbx add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_842A1: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aExpectedRightS; "Expected right side of 'or' expression" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r15; void * call ___cxa_throw jmp short loc_84307 loc_842D5: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aExpectedLeftSi; "Expected left side of 'logical or' expr"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r15; void * call ___cxa_throw loc_84307: lea rdi, _ZGVZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_84174 lea rdi, _ZZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; minja::Parser::parseLogicalOr(void)::or_tok lea rsi, aOrB; "or\\b" mov edx, 10h call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; __guard * call ___cxa_guard_release jmp loc_84174 mov r14, rax lea rdi, _ZGVZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_843B8 mov r14, rax jmp short loc_843B8 mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_843B8 jmp short loc_84392 mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_84395 jmp short loc_843A6 loc_84392: mov r14, rax loc_84395: mov rdi, [rsp+arg_0] test rdi, rdi jz short loc_843A9 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp short loc_843A9 loc_843A6: mov r14, rax loc_843A9: mov rdi, [rsp+arg_20] test rdi, rdi jz short loc_843B8 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_843B8: mov rdi, [rbx+8] test rdi, rdi jz short loc_843C6 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_843C6: mov rdi, r14 call __Unwind_Resume
minja::Parser * minja::Parser::parseLogicalOr(volatile signed __int32 **this, long long *a2) { volatile signed __int32 *v3; // rax volatile signed __int32 *v4; // r15 volatile signed __int32 *v5; // rbp volatile signed __int32 *v6; // rdi std::runtime_error *v8; // r15 std::runtime_error *exception; // r15 void *v10; // [rsp+0h] [rbp-68h] BYREF volatile signed __int32 *v11; // [rsp+8h] [rbp-60h] long long v12; // [rsp+10h] [rbp-58h] BYREF long long v13; // [rsp+20h] [rbp-48h] BYREF volatile signed __int32 *v14; // [rsp+28h] [rbp-40h] long long v15; // [rsp+30h] [rbp-38h] minja::Parser::parseLogicalAnd((minja::Parser *)this); if ( !*this ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected left side of 'logical or' expression"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( !(_BYTE)`guard variable for'minja::Parser::parseLogicalOr(void)::or_tok[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseLogicalOr(void)::or_tok[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseLogicalOr(void)::or_tok[abi:cxx11], (long long)"or\\b", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseLogicalOr(void)::or_tok[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseLogicalOr(void)::or_tok[abi:cxx11]); } v13 = *a2; v3 = (volatile signed __int32 *)a2[1]; v14 = v3; if ( v3 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v3 + 2); else _InterlockedIncrement(v3 + 2); } v15 = a2[4] - a2[2]; while ( 1 ) { minja::Parser::consumeToken( (long long)&v10, (long long)a2, (long long)&minja::Parser::parseLogicalOr(void)::or_tok[abi:cxx11], 1u); v4 = v11; if ( v10 != &v12 ) operator delete(v10, v12 + 1); if ( !v4 ) break; minja::Parser::parseLogicalAnd((minja::Parser *)&v10); if ( !v10 ) { v8 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(v8, "Expected right side of 'or' expression"); __cxa_throw( v8, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v5 = (volatile signed __int32 *)operator new(0x58uLL); *((_QWORD *)v5 + 1) = 0x100000001LL; *(_QWORD *)v5 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<minja::BinaryOpExpr>,(__gnu_cxx::_Lock_policy)2> + 2; minja::BinaryOpExpr::BinaryOpExpr(v5 + 4, &v13, this, &v10, 15LL); *this = v5 + 4; v6 = this[1]; this[1] = v5; if ( v6 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v6); if ( v11 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11); } if ( v14 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14); return (minja::Parser *)this; }
parseLogicalOr: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R14,RSI MOV RBX,RDI CALL 0x001845be CMP qword ptr [RBX],0x0 JZ 0x001842d5 LEA RAX,[0x22bfb8] MOV AL,byte ptr [RAX] TEST AL,AL JZ 0x00184307 LAB_00184174: MOV RAX,qword ptr [R14] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RSP + 0x28],RAX TEST RAX,RAX JZ 0x0018419f MOV RCX,qword ptr [0x0022af88] CMP byte ptr [RCX],0x0 JZ 0x0018419b INC dword ptr [RAX + 0x8] JMP 0x0018419f LAB_0018419b: INC.LOCK dword ptr [RAX + 0x8] LAB_0018419f: MOV RAX,qword ptr [R14 + 0x20] SUB RAX,qword ptr [R14 + 0x10] LEA RCX,[RSP + 0x20] MOV qword ptr [RCX + 0x10],RAX MOV R13,RSP LEA R12,[0x229988] ADD R12,0x10 LAB_001841be: MOV RDI,R13 MOV RSI,R14 LEA RDX,[0x22bf98] MOV ECX,0x1 CALL 0x00182ff2 MOV RDI,qword ptr [RSP] MOV R15,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x001841f5 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x0011a8e0 LAB_001841f5: TEST R15,R15 JZ 0x00184280 LAB_001841fe: MOV RDI,R13 MOV RSI,R14 CALL 0x001845be CMP qword ptr [RSP],0x0 JZ 0x001842a1 LAB_00184214: MOV EDI,0x58 CALL 0x0011a8c0 LAB_0018421e: MOV RBP,RAX MOV RAX,0x100000001 MOV qword ptr [RBP + 0x8],RAX MOV qword ptr [RBP],R12 MOV R15,RBP ADD R15,0x10 MOV RDI,R15 LEA RSI,[RSP + 0x20] MOV RDX,RBX MOV RCX,R13 MOV R8D,0xf CALL 0x00194f30 MOV qword ptr [RBX],R15 MOV RDI,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x8],RBP TEST RDI,RDI JZ 0x00184268 CALL 0x0016cd76 LAB_00184268: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x001841be CALL 0x0016cd76 JMP 0x001841be LAB_00184280: MOV RDI,qword ptr [RSP + 0x28] TEST RDI,RDI JZ 0x0018428f CALL 0x0016cd76 LAB_0018428f: MOV RAX,RBX ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001842a1: MOV EDI,0x10 CALL 0x0011a440 MOV R15,RAX LAB_001842ae: LEA RSI,[0x1eea5e] MOV RDI,RAX CALL 0x0011a320 LAB_001842bd: MOV RSI,qword ptr [0x0022aff0] MOV RDX,qword ptr [0x0022af60] MOV RDI,R15 CALL 0x0011af20 LAB_001842d5: MOV EDI,0x10 CALL 0x0011a440 MOV R15,RAX LAB_001842e2: LEA RSI,[0x1eea2b] MOV RDI,RAX CALL 0x0011a320 LAB_001842f1: MOV RSI,qword ptr [0x0022aff0] MOV RDX,qword ptr [0x0022af60] MOV RDI,R15 CALL 0x0011af20 LAB_00184307: LEA RDI,[0x22bfb8] CALL 0x0011b000 TEST EAX,EAX JZ 0x00184174 LAB_0018431b: LEA RDI,[0x22bf98] LEA RSI,[0x1eea59] MOV EDX,0x10 CALL 0x00161d04 LAB_00184333: LEA RDI,[0x162008] LEA RSI,[0x22bf98] LEA RDX,[0x22b8c8] CALL 0x0011a7c0 LEA RDI,[0x22bfb8] CALL 0x0011a5c0 JMP 0x00184174
/* minja::Parser::parseLogicalOr() */ void minja::Parser::parseLogicalOr(void) { _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1; int iVar2; int8 *puVar3; runtime_error *prVar4; int8 *in_RSI; long *in_RDI; long *local_68; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_60; long local_58 [2]; int8 local_48; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40; long local_38; parseLogicalAnd(); if (*in_RDI == 0) { prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001842e2 to 001842f0 has its CatchHandler @ 00184374 */ std::runtime_error::runtime_error(prVar4,"Expected left side of \'logical or\' expression"); /* try { // try from 001842f1 to 00184306 has its CatchHandler @ 0018436f */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_0022aff0,PTR__runtime_error_0022af60); } if (parseLogicalOr()::or_tok_abi_cxx11_ == '\0') { iVar2 = __cxa_guard_acquire(&parseLogicalOr()::or_tok_abi_cxx11_); if (iVar2 != 0) { /* try { // try from 0018431b to 00184332 has its CatchHandler @ 0018435e */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseLogicalOr()::or_tok_abi_cxx11_,&DAT_001eea59,0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseLogicalOr()::or_tok_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseLogicalOr()::or_tok_abi_cxx11_); } } local_48 = *in_RSI; local_40 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1]; if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_0022af88 == '\0') { LOCK(); *(int *)(local_40 + 8) = *(int *)(local_40 + 8) + 1; UNLOCK(); } else { *(int *)(local_40 + 8) = *(int *)(local_40 + 8) + 1; } } local_38 = in_RSI[4] - in_RSI[2]; while( true ) { /* try { // try from 001841be to 001841d4 has its CatchHandler @ 001843a6 */ consumeToken(&local_68); p_Var1 = local_60; if (local_68 != local_58) { operator_delete(local_68,local_58[0] + 1); } if (p_Var1 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) break; /* try { // try from 001841fe to 00184208 has its CatchHandler @ 00184390 */ parseLogicalAnd(); if (local_68 == (long *)0x0) { prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001842ae to 001842bc has its CatchHandler @ 00184383 */ std::runtime_error::runtime_error(prVar4,"Expected right side of \'or\' expression"); /* try { // try from 001842bd to 001842d2 has its CatchHandler @ 00184381 */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_0022aff0,PTR__runtime_error_0022af60); } /* try { // try from 00184214 to 0018421d has its CatchHandler @ 00184392 */ puVar3 = (int8 *)operator_new(0x58); puVar3[1] = 0x100000001; *puVar3 = &PTR___Sp_counted_ptr_inplace_00229998; BinaryOpExpr::BinaryOpExpr((BinaryOpExpr *)(puVar3 + 2),&local_48); *in_RDI = (long)(puVar3 + 2); p_Var1 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RDI[1]; in_RDI[1] = (long)puVar3; if (p_Var1 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Var1); } if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_60); } } if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40); } return; }
61,688
Balloc
eloqsql/strings/dtoa.c
static Bigint *Balloc(int k, Stack_alloc *alloc) { Bigint *rv; DBUG_ASSERT(k <= Kmax); if (k <= Kmax && alloc->freelist[k]) { rv= alloc->freelist[k]; alloc->freelist[k]= rv->p.next; } else { int x, len; x= 1 << k; len= MY_ALIGN(sizeof(Bigint) + x * sizeof(ULong), SIZEOF_CHARP); if (alloc->free + len <= alloc->end) { rv= (Bigint*) alloc->free; alloc->free+= len; } else rv= (Bigint*) malloc(len); rv->k= k; rv->maxwds= x; } rv->sign= rv->wds= 0; rv->p.x= (ULong*) (rv + 1); return rv; }
O0
c
Balloc: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) jmp 0x72011 cmpl $0xf, -0x4(%rbp) jg 0x72051 movq -0x10(%rbp), %rax movslq -0x4(%rbp), %rcx cmpq $0x0, 0x18(%rax,%rcx,8) je 0x72051 movq -0x10(%rbp), %rax movslq -0x4(%rbp), %rcx movq 0x18(%rax,%rcx,8), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rdx movq -0x10(%rbp), %rax movslq -0x4(%rbp), %rcx movq %rdx, 0x18(%rax,%rcx,8) jmp 0x720d6 movl -0x4(%rbp), %ecx movl $0x1, %eax shll %cl, %eax movl %eax, -0x1c(%rbp) movslq -0x1c(%rbp), %rax shlq $0x2, %rax addq $0x18, %rax addq $0x8, %rax subq $0x1, %rax andq $-0x8, %rax movl %eax, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movslq -0x20(%rbp), %rcx addq %rcx, %rax movq -0x10(%rbp), %rcx cmpq 0x10(%rcx), %rax ja 0x720b5 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x18(%rbp) movl -0x20(%rbp), %edx movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx movslq %edx, %rdx addq %rdx, %rcx movq %rcx, 0x8(%rax) jmp 0x720c2 movslq -0x20(%rbp), %rdi callq 0x243c0 movq %rax, -0x18(%rbp) movl -0x4(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, 0x8(%rax) movl -0x1c(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, 0xc(%rax) movq -0x18(%rbp), %rax movl $0x0, 0x14(%rax) movq -0x18(%rbp), %rax movl $0x0, 0x10(%rax) movq -0x18(%rbp), %rcx addq $0x18, %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movq -0x18(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
Balloc: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov [rbp+var_10], rsi jmp short $+2 loc_72011: cmp [rbp+var_4], 0Fh jg short loc_72051 mov rax, [rbp+var_10] movsxd rcx, [rbp+var_4] cmp qword ptr [rax+rcx*8+18h], 0 jz short loc_72051 mov rax, [rbp+var_10] movsxd rcx, [rbp+var_4] mov rax, [rax+rcx*8+18h] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov rdx, [rax] mov rax, [rbp+var_10] movsxd rcx, [rbp+var_4] mov [rax+rcx*8+18h], rdx jmp loc_720D6 loc_72051: mov ecx, [rbp+var_4] mov eax, 1 shl eax, cl mov [rbp+var_1C], eax movsxd rax, [rbp+var_1C] shl rax, 2 add rax, 18h add rax, 8 sub rax, 1 and rax, 0FFFFFFFFFFFFFFF8h mov [rbp+var_20], eax mov rax, [rbp+var_10] mov rax, [rax+8] movsxd rcx, [rbp+var_20] add rax, rcx mov rcx, [rbp+var_10] cmp rax, [rcx+10h] ja short loc_720B5 mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_18], rax mov edx, [rbp+var_20] mov rax, [rbp+var_10] mov rcx, [rax+8] movsxd rdx, edx add rcx, rdx mov [rax+8], rcx jmp short loc_720C2 loc_720B5: movsxd rdi, [rbp+var_20] call _malloc mov [rbp+var_18], rax loc_720C2: mov ecx, [rbp+var_4] mov rax, [rbp+var_18] mov [rax+8], ecx mov ecx, [rbp+var_1C] mov rax, [rbp+var_18] mov [rax+0Ch], ecx loc_720D6: mov rax, [rbp+var_18] mov dword ptr [rax+14h], 0 mov rax, [rbp+var_18] mov dword ptr [rax+10h], 0 mov rcx, [rbp+var_18] add rcx, 18h mov rax, [rbp+var_18] mov [rax], rcx mov rax, [rbp+var_18] add rsp, 20h pop rbp retn
long long Balloc(int a1, long long a2) { signed int v3; // [rsp+0h] [rbp-20h] long long v4; // [rsp+8h] [rbp-18h] if ( a1 <= 15 && *(_QWORD *)(a2 + 8LL * a1 + 24) ) { v4 = *(_QWORD *)(a2 + 8LL * a1 + 24); *(_QWORD *)(a2 + 8LL * a1 + 24) = *(_QWORD *)v4; } else { v3 = (4 * (1 << a1) + 31) & 0xFFFFFFF8; if ( (unsigned long long)(v3 + *(_QWORD *)(a2 + 8)) > *(_QWORD *)(a2 + 16) ) { v4 = malloc(v3); } else { v4 = *(_QWORD *)(a2 + 8); *(_QWORD *)(a2 + 8) = v3 + v4; } *(_DWORD *)(v4 + 8) = a1; *(_DWORD *)(v4 + 12) = 1 << a1; } *(_DWORD *)(v4 + 20) = 0; *(_DWORD *)(v4 + 16) = 0; *(_QWORD *)v4 = v4 + 24; return v4; }
Balloc: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI JMP 0x00172011 LAB_00172011: CMP dword ptr [RBP + -0x4],0xf JG 0x00172051 MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x4] CMP qword ptr [RAX + RCX*0x8 + 0x18],0x0 JZ 0x00172051 MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x4] MOV RAX,qword ptr [RAX + RCX*0x8 + 0x18] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x4] MOV qword ptr [RAX + RCX*0x8 + 0x18],RDX JMP 0x001720d6 LAB_00172051: MOV ECX,dword ptr [RBP + -0x4] MOV EAX,0x1 SHL EAX,CL MOV dword ptr [RBP + -0x1c],EAX MOVSXD RAX,dword ptr [RBP + -0x1c] SHL RAX,0x2 ADD RAX,0x18 ADD RAX,0x8 SUB RAX,0x1 AND RAX,-0x8 MOV dword ptr [RBP + -0x20],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOVSXD RCX,dword ptr [RBP + -0x20] ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x10] JA 0x001720b5 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x18],RAX MOV EDX,dword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] MOVSXD RDX,EDX ADD RCX,RDX MOV qword ptr [RAX + 0x8],RCX JMP 0x001720c2 LAB_001720b5: MOVSXD RDI,dword ptr [RBP + -0x20] CALL 0x001243c0 MOV qword ptr [RBP + -0x18],RAX LAB_001720c2: MOV ECX,dword ptr [RBP + -0x4] MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x8],ECX MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0xc],ECX LAB_001720d6: MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x14],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x10],0x0 MOV RCX,qword ptr [RBP + -0x18] ADD RCX,0x18 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x18] ADD RSP,0x20 POP RBP RET
int8 * Balloc(int param_1,long param_2) { int iVar1; uint uVar2; int8 *local_20; if ((param_1 < 0x10) && (*(long *)(param_2 + 0x18 + (long)param_1 * 8) != 0)) { local_20 = *(int8 **)(param_2 + 0x18 + (long)param_1 * 8); *(int8 *)(param_2 + 0x18 + (long)param_1 * 8) = *local_20; } else { iVar1 = 1 << ((byte)param_1 & 0x1f); uVar2 = iVar1 * 4 + 0x1fU & 0xfffffff8; if (*(ulong *)(param_2 + 0x10) < (ulong)(*(long *)(param_2 + 8) + (long)(int)uVar2)) { local_20 = (int8 *)malloc((long)(int)uVar2); } else { local_20 = *(int8 **)(param_2 + 8); *(long *)(param_2 + 8) = *(long *)(param_2 + 8) + (long)(int)uVar2; } *(int *)(local_20 + 1) = param_1; *(int *)((long)local_20 + 0xc) = iVar1; } *(int4 *)((long)local_20 + 0x14) = 0; *(int4 *)(local_20 + 2) = 0; *local_20 = local_20 + 3; return local_20; }
61,689
Balloc
eloqsql/strings/dtoa.c
static Bigint *Balloc(int k, Stack_alloc *alloc) { Bigint *rv; DBUG_ASSERT(k <= Kmax); if (k <= Kmax && alloc->freelist[k]) { rv= alloc->freelist[k]; alloc->freelist[k]= rv->p.next; } else { int x, len; x= 1 << k; len= MY_ALIGN(sizeof(Bigint) + x * sizeof(ULong), SIZEOF_CHARP); if (alloc->free + len <= alloc->end) { rv= (Bigint*) alloc->free; alloc->free+= len; } else rv= (Bigint*) malloc(len); rv->k= k; rv->maxwds= x; } rv->sign= rv->wds= 0; rv->p.x= (ULong*) (rv + 1); return rv; }
O3
c
Balloc: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movl %edi, %ebx cmpl $0xf, %edi jg 0x57e35 movslq %ebx, %rcx movq 0x18(%rsi,%rcx,8), %rax testq %rax, %rax je 0x57e35 movq (%rax), %rdx movq %rdx, 0x18(%rsi,%rcx,8) jmp 0x57e70 movl $0x1, %r14d movl %ebx, %ecx shll %cl, %r14d movl $0x4, %edx shll %cl, %edx addl $0x1f, %edx andl $-0x8, %edx movq 0x8(%rsi), %rax movslq %edx, %rdi leaq (%rax,%rdi), %rcx cmpq 0x10(%rsi), %rcx jbe 0x57e65 callq 0x24410 jmp 0x57e69 movq %rcx, 0x8(%rsi) movl %ebx, 0x8(%rax) movl %r14d, 0xc(%rax) movq $0x0, 0x10(%rax) leaq 0x18(%rax), %rcx movq %rcx, (%rax) popq %rbx popq %r14 popq %rbp retq
Balloc: push rbp mov rbp, rsp push r14 push rbx mov ebx, edi cmp edi, 0Fh jg short loc_57E35 movsxd rcx, ebx mov rax, [rsi+rcx*8+18h] test rax, rax jz short loc_57E35 mov rdx, [rax] mov [rsi+rcx*8+18h], rdx jmp short loc_57E70 loc_57E35: mov r14d, 1 mov ecx, ebx shl r14d, cl mov edx, 4 shl edx, cl add edx, 1Fh and edx, 0FFFFFFF8h mov rax, [rsi+8] movsxd rdi, edx lea rcx, [rax+rdi] cmp rcx, [rsi+10h] jbe short loc_57E65 call _malloc jmp short loc_57E69 loc_57E65: mov [rsi+8], rcx loc_57E69: mov [rax+8], ebx mov [rax+0Ch], r14d loc_57E70: mov qword ptr [rax+10h], 0 lea rcx, [rax+18h] mov [rax], rcx pop rbx pop r14 pop rbp retn
long long Balloc(int a1, long long a2) { long long result; // rax long long v4; // rdi if ( a1 <= 15 && (result = *(_QWORD *)(a2 + 8LL * a1 + 24)) != 0 ) { *(_QWORD *)(a2 + 8LL * a1 + 24) = *(_QWORD *)result; } else { result = *(_QWORD *)(a2 + 8); v4 = (int)(((4 << a1) + 31) & 0xFFFFFFF8); if ( (unsigned long long)(result + v4) <= *(_QWORD *)(a2 + 16) ) *(_QWORD *)(a2 + 8) = result + v4; else result = malloc(v4); *(_DWORD *)(result + 8) = a1; *(_DWORD *)(result + 12) = 1 << a1; } *(_QWORD *)(result + 16) = 0LL; *(_QWORD *)result = result + 24; return result; }
Balloc: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV EBX,EDI CMP EDI,0xf JG 0x00157e35 MOVSXD RCX,EBX MOV RAX,qword ptr [RSI + RCX*0x8 + 0x18] TEST RAX,RAX JZ 0x00157e35 MOV RDX,qword ptr [RAX] MOV qword ptr [RSI + RCX*0x8 + 0x18],RDX JMP 0x00157e70 LAB_00157e35: MOV R14D,0x1 MOV ECX,EBX SHL R14D,CL MOV EDX,0x4 SHL EDX,CL ADD EDX,0x1f AND EDX,0xfffffff8 MOV RAX,qword ptr [RSI + 0x8] MOVSXD RDI,EDX LEA RCX,[RAX + RDI*0x1] CMP RCX,qword ptr [RSI + 0x10] JBE 0x00157e65 CALL 0x00124410 JMP 0x00157e69 LAB_00157e65: MOV qword ptr [RSI + 0x8],RCX LAB_00157e69: MOV dword ptr [RAX + 0x8],EBX MOV dword ptr [RAX + 0xc],R14D LAB_00157e70: MOV qword ptr [RAX + 0x10],0x0 LEA RCX,[RAX + 0x18] MOV qword ptr [RAX],RCX POP RBX POP R14 POP RBP RET
void Balloc(int param_1,long param_2) { ulong uVar1; long *plVar2; size_t __size; if (param_1 < 0x10) { plVar2 = *(long **)(param_2 + 0x18 + (long)param_1 * 8); if (plVar2 != (long *)0x0) { *(long *)(param_2 + 0x18 + (long)param_1 * 8) = *plVar2; goto LAB_00157e70; } } plVar2 = *(long **)(param_2 + 8); __size = (size_t)(int)((4 << ((byte)param_1 & 0x1f)) + 0x1fU & 0xfffffff8); uVar1 = (long)plVar2 + __size; if (*(ulong *)(param_2 + 0x10) < uVar1) { plVar2 = (long *)malloc(__size); } else { *(ulong *)(param_2 + 8) = uVar1; } *(int *)(plVar2 + 1) = param_1; *(int *)((long)plVar2 + 0xc) = 1 << ((byte)param_1 & 0x1f); LAB_00157e70: plVar2[2] = 0; *plVar2 = (long)(plVar2 + 3); return; }
61,690
js_promise_mark
bluesky950520[P]quickjs/quickjs.c
static void js_promise_mark(JSRuntime *rt, JSValue val, JS_MarkFunc *mark_func) { JSPromiseData *s = JS_GetOpaque(val, JS_CLASS_PROMISE); struct list_head *el; int i; if (!s) return; for(i = 0; i < 2; i++) { list_for_each(el, &s->promise_reactions[i]) { JSPromiseReactionData *rd = list_entry(el, JSPromiseReactionData, link); JS_MarkValue(rt, rd->resolving_funcs[0], mark_func); JS_MarkValue(rt, rd->resolving_funcs[1], mark_func); JS_MarkValue(rt, rd->handler, mark_func); } } JS_MarkValue(rt, s->promise_result, mark_func); }
O0
c
js_promise_mark: subq $0x48, %rsp movq %rsi, 0x38(%rsp) movq %rdx, 0x40(%rsp) movq %rdi, 0x30(%rsp) movq %rcx, 0x28(%rsp) movq 0x38(%rsp), %rdi movq 0x40(%rsp), %rsi movl $0x31, %edx callq 0x38350 movq %rax, 0x20(%rsp) cmpq $0x0, 0x20(%rsp) jne 0x916ce jmp 0x917bd movl $0x0, 0x14(%rsp) cmpl $0x2, 0x14(%rsp) jge 0x917a1 movq 0x20(%rsp), %rax addq $0x8, %rax movslq 0x14(%rsp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq 0x8(%rax), %rax movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rax movq 0x20(%rsp), %rcx addq $0x8, %rcx movslq 0x14(%rsp), %rdx shlq $0x4, %rdx addq %rdx, %rcx cmpq %rcx, %rax je 0x9178f movq 0x18(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x30(%rsp), %rdi movq 0x8(%rsp), %rax movq 0x28(%rsp), %rcx movq 0x10(%rax), %rsi movq 0x18(%rax), %rdx callq 0x2abe0 movq 0x30(%rsp), %rdi movq 0x8(%rsp), %rax movq 0x28(%rsp), %rcx movq 0x20(%rax), %rsi movq 0x28(%rax), %rdx callq 0x2abe0 movq 0x30(%rsp), %rdi movq 0x8(%rsp), %rax movq 0x28(%rsp), %rcx movq 0x30(%rax), %rsi movq 0x38(%rax), %rdx callq 0x2abe0 movq 0x18(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x18(%rsp) jmp 0x916ff jmp 0x91791 movl 0x14(%rsp), %eax addl $0x1, %eax movl %eax, 0x14(%rsp) jmp 0x916d6 movq 0x30(%rsp), %rdi movq 0x20(%rsp), %rax movq 0x28(%rsp), %rcx movq 0x30(%rax), %rsi movq 0x38(%rax), %rdx callq 0x2abe0 addq $0x48, %rsp retq nopw %cs:(%rax,%rax)
js_promise_mark: sub rsp, 48h mov [rsp+48h+var_10], rsi mov [rsp+48h+var_8], rdx mov [rsp+48h+var_18], rdi mov [rsp+48h+var_20], rcx mov rdi, [rsp+48h+var_10] mov rsi, [rsp+48h+var_8] mov edx, 31h ; '1' call JS_GetOpaque mov [rsp+48h+var_28], rax cmp [rsp+48h+var_28], 0 jnz short loc_916CE jmp loc_917BD loc_916CE: mov [rsp+48h+var_34], 0 loc_916D6: cmp [rsp+48h+var_34], 2 jge loc_917A1 mov rax, [rsp+48h+var_28] add rax, 8 movsxd rcx, [rsp+48h+var_34] shl rcx, 4 add rax, rcx mov rax, [rax+8] mov [rsp+48h+var_30], rax loc_916FF: mov rax, [rsp+48h+var_30] mov rcx, [rsp+48h+var_28] add rcx, 8 movsxd rdx, [rsp+48h+var_34] shl rdx, 4 add rcx, rdx cmp rax, rcx jz short loc_9178F mov rax, [rsp+48h+var_30] mov [rsp+48h+var_40], rax mov rdi, [rsp+48h+var_18] mov rax, [rsp+48h+var_40] mov rcx, [rsp+48h+var_20] mov rsi, [rax+10h] mov rdx, [rax+18h] call JS_MarkValue mov rdi, [rsp+48h+var_18] mov rax, [rsp+48h+var_40] mov rcx, [rsp+48h+var_20] mov rsi, [rax+20h] mov rdx, [rax+28h] call JS_MarkValue mov rdi, [rsp+48h+var_18] mov rax, [rsp+48h+var_40] mov rcx, [rsp+48h+var_20] mov rsi, [rax+30h] mov rdx, [rax+38h] call JS_MarkValue mov rax, [rsp+48h+var_30] mov rax, [rax+8] mov [rsp+48h+var_30], rax jmp loc_916FF loc_9178F: jmp short $+2 loc_91791: mov eax, [rsp+48h+var_34] add eax, 1 mov [rsp+48h+var_34], eax jmp loc_916D6 loc_917A1: mov rdi, [rsp+48h+var_18] mov rax, [rsp+48h+var_28] mov rcx, [rsp+48h+var_20] mov rsi, [rax+30h] mov rdx, [rax+38h] call JS_MarkValue loc_917BD: add rsp, 48h retn
long long js_promise_mark(long long a1, long long a2, int a3, long long ( *a4)(long long, long long)) { long long result; // rax long long *v5; // [rsp+8h] [rbp-40h] int i; // [rsp+14h] [rbp-34h] long long *j; // [rsp+18h] [rbp-30h] long long v8; // [rsp+20h] [rbp-28h] result = JS_GetOpaque(a2, a3, 49); v8 = result; if ( result ) { for ( i = 0; i < 2; ++i ) { for ( j = *(long long **)(16LL * i + v8 + 8 + 8); j != (long long *)(16LL * i + v8 + 8); j = (long long *)j[1] ) { v5 = j; JS_MarkValue(a1, j[2], j[3], a4); JS_MarkValue(a1, v5[4], v5[5], a4); JS_MarkValue(a1, v5[6], v5[7], a4); } } return JS_MarkValue(a1, *(_QWORD *)(v8 + 48), *(_QWORD *)(v8 + 56), a4); } return result; }
js_promise_mark: SUB RSP,0x48 MOV qword ptr [RSP + 0x38],RSI MOV qword ptr [RSP + 0x40],RDX MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RCX MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x40] MOV EDX,0x31 CALL 0x00138350 MOV qword ptr [RSP + 0x20],RAX CMP qword ptr [RSP + 0x20],0x0 JNZ 0x001916ce JMP 0x001917bd LAB_001916ce: MOV dword ptr [RSP + 0x14],0x0 LAB_001916d6: CMP dword ptr [RSP + 0x14],0x2 JGE 0x001917a1 MOV RAX,qword ptr [RSP + 0x20] ADD RAX,0x8 MOVSXD RCX,dword ptr [RSP + 0x14] SHL RCX,0x4 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x18],RAX LAB_001916ff: MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x20] ADD RCX,0x8 MOVSXD RDX,dword ptr [RSP + 0x14] SHL RDX,0x4 ADD RCX,RDX CMP RAX,RCX JZ 0x0019178f MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RAX + 0x18] CALL 0x0012abe0 MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RAX + 0x20] MOV RDX,qword ptr [RAX + 0x28] CALL 0x0012abe0 MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RAX + 0x30] MOV RDX,qword ptr [RAX + 0x38] CALL 0x0012abe0 MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x18],RAX JMP 0x001916ff LAB_0019178f: JMP 0x00191791 LAB_00191791: MOV EAX,dword ptr [RSP + 0x14] ADD EAX,0x1 MOV dword ptr [RSP + 0x14],EAX JMP 0x001916d6 LAB_001917a1: MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RAX + 0x30] MOV RDX,qword ptr [RAX + 0x38] CALL 0x0012abe0 LAB_001917bd: ADD RSP,0x48 RET
void js_promise_mark(int8 param_1,int8 param_2,int8 param_3,int8 param_4) { long lVar1; int4 local_34; int8 local_30; lVar1 = JS_GetOpaque(param_2,param_3,0x31); if (lVar1 != 0) { for (local_34 = 0; local_34 < 2; local_34 = local_34 + 1) { for (local_30 = *(long *)(lVar1 + (long)local_34 * 0x10 + 0x10); local_30 != lVar1 + 8 + (long)local_34 * 0x10; local_30 = *(long *)(local_30 + 8)) { JS_MarkValue(param_1,*(int8 *)(local_30 + 0x10),*(int8 *)(local_30 + 0x18), param_4); JS_MarkValue(param_1,*(int8 *)(local_30 + 0x20),*(int8 *)(local_30 + 0x28), param_4); JS_MarkValue(param_1,*(int8 *)(local_30 + 0x30),*(int8 *)(local_30 + 0x38), param_4); } } JS_MarkValue(param_1,*(int8 *)(lVar1 + 0x30),*(int8 *)(lVar1 + 0x38),param_4); } return; }
61,691
js_promise_mark
bluesky950520[P]quickjs/quickjs.c
static void js_promise_mark(JSRuntime *rt, JSValue val, JS_MarkFunc *mark_func) { JSPromiseData *s = JS_GetOpaque(val, JS_CLASS_PROMISE); struct list_head *el; int i; if (!s) return; for(i = 0; i < 2; i++) { list_for_each(el, &s->promise_reactions[i]) { JSPromiseReactionData *rd = list_entry(el, JSPromiseReactionData, link); JS_MarkValue(rt, rd->resolving_funcs[0], mark_func); JS_MarkValue(rt, rd->resolving_funcs[1], mark_func); JS_MarkValue(rt, rd->handler, mark_func); } } JS_MarkValue(rt, s->promise_result, mark_func); }
O2
c
js_promise_mark: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp cmpl $-0x1, %edx jne 0x46d1a cmpw $0x31, 0x6(%rsi) jne 0x46d1a movq 0x30(%rsi), %rax testq %rax, %rax je 0x46d1a movq %rcx, %r12 movq %rdi, %rbx movl $0xfffffffe, %r15d # imm = 0xFFFFFFFE movq %rax, 0x8(%rsp) addq $0x8, %rax movq %rax, 0x10(%rsp) xorl %r14d, %r14d cmpq $0x2, %r14 je 0x46cf0 movq %r14, %r13 shlq $0x4, %r13 addq 0x10(%rsp), %r13 movq %r13, %rbp movq 0x8(%rbp), %rbp cmpq %r13, %rbp je 0x46ceb movl 0x18(%rbp), %eax andl $-0x2, %eax cmpl %r15d, %eax jne 0x46cbf movq 0x10(%rbp), %rsi movq %rbx, %rdi callq *%r12 movl 0x28(%rbp), %eax andl $-0x2, %eax cmpl %r15d, %eax jne 0x46cd4 movq 0x20(%rbp), %rsi movq %rbx, %rdi callq *%r12 movl 0x38(%rbp), %eax andl $-0x2, %eax cmpl %r15d, %eax jne 0x46ca1 movq 0x30(%rbp), %rsi movq %rbx, %rdi callq *%r12 jmp 0x46ca1 incq %r14 jmp 0x46c8c movq 0x8(%rsp), %rcx movl 0x38(%rcx), %eax andl $-0x2, %eax cmpl %r15d, %eax jne 0x46d1a movq 0x30(%rcx), %rsi movq %rbx, %rdi movq %r12, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmpq *%rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_promise_mark: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h cmp edx, 0FFFFFFFFh jnz loc_46D1A cmp word ptr [rsi+6], 31h ; '1' jnz loc_46D1A mov rax, [rsi+30h] test rax, rax jz loc_46D1A mov r12, rcx mov rbx, rdi mov r15d, 0FFFFFFFEh mov [rsp+48h+var_40], rax add rax, 8 mov [rsp+48h+var_38], rax xor r14d, r14d loc_46C8C: cmp r14, 2 jz short loc_46CF0 mov r13, r14 shl r13, 4 add r13, [rsp+48h+var_38] mov rbp, r13 loc_46CA1: mov rbp, [rbp+8] cmp rbp, r13 jz short loc_46CEB mov eax, [rbp+18h] and eax, 0FFFFFFFEh cmp eax, r15d jnz short loc_46CBF mov rsi, [rbp+10h] mov rdi, rbx call r12 loc_46CBF: mov eax, [rbp+28h] and eax, 0FFFFFFFEh cmp eax, r15d jnz short loc_46CD4 mov rsi, [rbp+20h] mov rdi, rbx call r12 loc_46CD4: mov eax, [rbp+38h] and eax, 0FFFFFFFEh cmp eax, r15d jnz short loc_46CA1 mov rsi, [rbp+30h] mov rdi, rbx call r12 jmp short loc_46CA1 loc_46CEB: inc r14 jmp short loc_46C8C loc_46CF0: mov rcx, [rsp+48h+var_40] mov eax, [rcx+38h] and eax, 0FFFFFFFEh cmp eax, r15d jnz short loc_46D1A mov rsi, [rcx+30h] mov rdi, rbx mov rax, r12 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp rax loc_46D1A: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
void js_promise_mark(long long a1, long long a2, int a3, void ( *a4)(long long, _QWORD)) { long long v4; // rax long long i; // r14 long long v7; // rbp long long v8; // [rsp+8h] [rbp-40h] long long v9; // [rsp+10h] [rbp-38h] if ( a3 == -1 && *(_WORD *)(a2 + 6) == 49 ) { v4 = *(_QWORD *)(a2 + 48); if ( v4 ) { v8 = *(_QWORD *)(a2 + 48); v9 = v4 + 8; for ( i = 0LL; i != 2; ++i ) { v7 = v9 + 16 * i; while ( 1 ) { v7 = *(_QWORD *)(v7 + 8); if ( v7 == v9 + 16 * i ) break; if ( (*(_DWORD *)(v7 + 24) & 0xFFFFFFFE) == 0xFFFFFFFE ) a4(a1, *(_QWORD *)(v7 + 16)); if ( (*(_DWORD *)(v7 + 40) & 0xFFFFFFFE) == 0xFFFFFFFE ) a4(a1, *(_QWORD *)(v7 + 32)); if ( (*(_DWORD *)(v7 + 56) & 0xFFFFFFFE) == 0xFFFFFFFE ) a4(a1, *(_QWORD *)(v7 + 48)); } } if ( (*(_DWORD *)(v8 + 56) & 0xFFFFFFFE) == 0xFFFFFFFE ) a4(a1, *(_QWORD *)(v8 + 48)); } } }
js_promise_mark: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 CMP EDX,-0x1 JNZ 0x00146d1a CMP word ptr [RSI + 0x6],0x31 JNZ 0x00146d1a MOV RAX,qword ptr [RSI + 0x30] TEST RAX,RAX JZ 0x00146d1a MOV R12,RCX MOV RBX,RDI MOV R15D,0xfffffffe MOV qword ptr [RSP + 0x8],RAX ADD RAX,0x8 MOV qword ptr [RSP + 0x10],RAX XOR R14D,R14D LAB_00146c8c: CMP R14,0x2 JZ 0x00146cf0 MOV R13,R14 SHL R13,0x4 ADD R13,qword ptr [RSP + 0x10] MOV RBP,R13 LAB_00146ca1: MOV RBP,qword ptr [RBP + 0x8] CMP RBP,R13 JZ 0x00146ceb MOV EAX,dword ptr [RBP + 0x18] AND EAX,0xfffffffe CMP EAX,R15D JNZ 0x00146cbf MOV RSI,qword ptr [RBP + 0x10] MOV RDI,RBX CALL R12 LAB_00146cbf: MOV EAX,dword ptr [RBP + 0x28] AND EAX,0xfffffffe CMP EAX,R15D JNZ 0x00146cd4 MOV RSI,qword ptr [RBP + 0x20] MOV RDI,RBX CALL R12 LAB_00146cd4: MOV EAX,dword ptr [RBP + 0x38] AND EAX,0xfffffffe CMP EAX,R15D JNZ 0x00146ca1 MOV RSI,qword ptr [RBP + 0x30] MOV RDI,RBX CALL R12 JMP 0x00146ca1 LAB_00146ceb: INC R14 JMP 0x00146c8c LAB_00146cf0: MOV RCX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RCX + 0x38] AND EAX,0xfffffffe CMP EAX,R15D JNZ 0x00146d1a MOV RSI,qword ptr [RCX + 0x30] MOV RDI,RBX MOV RAX,R12 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP RAX LAB_00146d1a: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void js_promise_mark(int8 param_1,long param_2,int param_3,code *UNRECOVERED_JUMPTABLE) { long lVar1; long lVar2; long lVar3; long lVar4; if (((param_3 == -1) && (*(short *)(param_2 + 6) == 0x31)) && (lVar1 = *(long *)(param_2 + 0x30), lVar1 != 0)) { for (lVar4 = 0; lVar4 != 2; lVar4 = lVar4 + 1) { lVar3 = lVar4 * 0x10 + lVar1 + 8; lVar2 = lVar3; while (lVar2 = *(long *)(lVar2 + 8), lVar2 != lVar3) { if ((*(uint *)(lVar2 + 0x18) & 0xfffffffe) == 0xfffffffe) { (*UNRECOVERED_JUMPTABLE)(param_1,*(int8 *)(lVar2 + 0x10)); } if ((*(uint *)(lVar2 + 0x28) & 0xfffffffe) == 0xfffffffe) { (*UNRECOVERED_JUMPTABLE)(param_1,*(int8 *)(lVar2 + 0x20)); } if ((*(uint *)(lVar2 + 0x38) & 0xfffffffe) == 0xfffffffe) { (*UNRECOVERED_JUMPTABLE)(param_1,*(int8 *)(lVar2 + 0x30)); } } } if ((*(uint *)(lVar1 + 0x38) & 0xfffffffe) == 0xfffffffe) { /* WARNING: Could not recover jumptable at 0x00146d18. Too many branches */ /* WARNING: Treating indirect jump as call */ (*UNRECOVERED_JUMPTABLE)(param_1,*(int8 *)(lVar1 + 0x30)); return; } } return; }
61,692
SEMANTICANALYZER::AstStatementParser::serializeNote(AST::ASTTree::DSFIterator&, SEMANTICANALYZER::Note&)
11AgReS1SoR11[P]Graph/Common/SemanticAnalyzer/src/AstStatementParser.cpp
void SEMANTICANALYZER::AstStatementParser::serializeNote(AST::ASTTree::DSFIterator &noteIter, Note &note) noexcept { for(auto& it = noteIter; it != AST::ASTTree::DSFIterator(); ++it) { if(it->value == GRAMMERCONSTANTS::ID) { ++it; ++astIter; note.id = it->value; } else if(it->value == GRAMMERCONSTANTS::PROPERTY) { Property property; AST::ASTTree::DSFIterator propertyIter(it.get()); serializeProperty(propertyIter, property); note.properties.push_back(std::move(property)); while(it.get() != astIter.get()) { ++it; } } auto nextIt = it; ++nextIt; if(nextIt != AST::ASTTree::DSFIterator()) { ++astIter; } } }
O0
cpp
SEMANTICANALYZER::AstStatementParser::serializeNote(AST::ASTTree::DSFIterator&, SEMANTICANALYZER::Note&): pushq %rbp movq %rsp, %rbp subq $0x200, %rsp # imm = 0x200 movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x1a8(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x1b0(%rbp) xorps %xmm0, %xmm0 movaps %xmm0, -0x30(%rbp) movaps %xmm0, -0x40(%rbp) movaps %xmm0, -0x50(%rbp) movaps %xmm0, -0x60(%rbp) movaps %xmm0, -0x70(%rbp) leaq -0x70(%rbp), %rdi callq 0x2f660 jmp 0x46637 movq -0x1b0(%rbp), %rdi leaq -0x70(%rbp), %rsi callq 0x2f500 movb %al, -0x1b1(%rbp) leaq -0x70(%rbp), %rdi callq 0x307d0 movb -0x1b1(%rbp), %al testb $0x1, %al jne 0x46665 jmp 0x4688a movq -0x20(%rbp), %rdi callq 0x2f900 movq %rax, -0x1c0(%rbp) jmp 0x46677 movq -0x1c0(%rbp), %rdi leaq 0x7115(%rip), %rsi # 0x4d79a callq 0x31710 movb %al, -0x1c1(%rbp) jmp 0x46692 movb -0x1c1(%rbp), %al testb $0x1, %al jne 0x4669e jmp 0x466e4 movq -0x20(%rbp), %rdi callq 0x30780 jmp 0x466a9 movq -0x1a8(%rbp), %rdi addq $0x8, %rdi callq 0x30780 jmp 0x466bb movq -0x20(%rbp), %rdi callq 0x2f900 movq %rax, -0x1d0(%rbp) jmp 0x466cd movq -0x1d0(%rbp), %rsi movq -0x18(%rbp), %rdi callq 0x2d130 jmp 0x466df jmp 0x467d5 movq -0x20(%rbp), %rdi callq 0x2f900 movq %rax, -0x1d8(%rbp) jmp 0x466f6 movq -0x1d8(%rbp), %rdi leaq 0x7099(%rip), %rsi # 0x4d79d callq 0x31710 movb %al, -0x1d9(%rbp) jmp 0x46711 movb -0x1d9(%rbp), %al testb $0x1, %al jne 0x46720 jmp 0x467d3 leaq -0xb0(%rbp), %rdi callq 0x2f480 movq -0x20(%rbp), %rdi callq 0x2d780 movq %rax, %rsi leaq -0x100(%rbp), %rdi callq 0x2d6b0 jmp 0x46746 movq -0x1a8(%rbp), %rdi leaq -0x100(%rbp), %rsi leaq -0xb0(%rbp), %rdx movq %rdx, -0x1e8(%rbp) callq 0x2edf0 movq -0x1e8(%rbp), %rsi movq -0x18(%rbp), %rdi addq $0x20, %rdi callq 0x2fab0 jmp 0x4677d jmp 0x4677f movq -0x20(%rbp), %rdi callq 0x2d780 movq -0x1a8(%rbp), %rdi movq %rax, -0x1f0(%rbp) addq $0x8, %rdi callq 0x2d780 movq %rax, %rcx movq -0x1f0(%rbp), %rax cmpq %rcx, %rax je 0x467bb movq -0x20(%rbp), %rdi callq 0x30780 jmp 0x467b9 jmp 0x4677f leaq -0x100(%rbp), %rdi callq 0x307d0 leaq -0xb0(%rbp), %rdi callq 0x2dee0 jmp 0x467d5 movq -0x20(%rbp), %rsi leaq -0x150(%rbp), %rdi callq 0x30c90 jmp 0x467e7 leaq -0x150(%rbp), %rdi callq 0x30780 jmp 0x467f5 xorps %xmm0, %xmm0 movaps %xmm0, -0x160(%rbp) movaps %xmm0, -0x170(%rbp) movaps %xmm0, -0x180(%rbp) movaps %xmm0, -0x190(%rbp) movaps %xmm0, -0x1a0(%rbp) leaq -0x1a0(%rbp), %rdi callq 0x2f660 jmp 0x46829 leaq -0x150(%rbp), %rdi leaq -0x1a0(%rbp), %rsi callq 0x2f500 movb %al, -0x1f1(%rbp) leaq -0x1a0(%rbp), %rdi callq 0x307d0 movb -0x1f1(%rbp), %al testb $0x1, %al jne 0x4685a jmp 0x4686e movq -0x1a8(%rbp), %rdi addq $0x8, %rdi callq 0x30780 jmp 0x4686c jmp 0x4686e leaq -0x150(%rbp), %rdi callq 0x307d0 movq -0x20(%rbp), %rdi callq 0x30780 jmp 0x46885 jmp 0x4660a addq $0x200, %rsp # imm = 0x200 popq %rbp retq movq %rax, %rdi callq 0x39830 nopl (%rax,%rax)
_ZN16SEMANTICANALYZER18AstStatementParser13serializeNoteERN3AST7ASTTree11DSFIteratorERNS_4NoteE: push rbp mov rbp, rsp sub rsp, 200h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov [rbp+var_1A8], rax mov rax, [rbp+var_10] mov [rbp+var_20], rax loc_4660A: mov rax, [rbp+var_20] mov [rbp+var_1B0], rax xorps xmm0, xmm0 movaps [rbp+var_30], xmm0 movaps [rbp+var_40], xmm0 movaps [rbp+var_50], xmm0 movaps [rbp+var_60], xmm0 movaps [rbp+var_70], xmm0 lea rdi, [rbp+var_70]; this call __ZN3AST7ASTTree11DSFIteratorC2Ev; AST::ASTTree::DSFIterator::DSFIterator(void) jmp short $+2 loc_46637: mov rdi, [rbp+var_1B0] lea rsi, [rbp+var_70] call __ZNK3AST7ASTTree11DSFIteratorneERKS1_; AST::ASTTree::DSFIterator::operator!=(AST::ASTTree::DSFIterator const&) mov [rbp+var_1B1], al lea rdi, [rbp+var_70]; this call __ZN3AST7ASTTree11DSFIteratorD2Ev; AST::ASTTree::DSFIterator::~DSFIterator() mov al, [rbp+var_1B1] test al, 1 jnz short loc_46665 jmp loc_4688A loc_46665: mov rdi, [rbp+var_20] call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void) mov [rbp+var_1C0], rax jmp short $+2 loc_46677: mov rdi, [rbp+var_1C0] lea rsi, aId; "ID" call __ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) mov [rbp+var_1C1], al jmp short $+2 loc_46692: mov al, [rbp+var_1C1] test al, 1 jnz short loc_4669E jmp short loc_466E4 loc_4669E: mov rdi, [rbp+var_20] call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) jmp short $+2 loc_466A9: mov rdi, [rbp+var_1A8] add rdi, 8 call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) jmp short $+2 loc_466BB: mov rdi, [rbp+var_20] call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void) mov [rbp+var_1D0], rax jmp short $+2 loc_466CD: mov rsi, [rbp+var_1D0] mov rdi, [rbp+var_18] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&) jmp short $+2 loc_466DF: jmp loc_467D5 loc_466E4: mov rdi, [rbp+var_20] call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void) mov [rbp+var_1D8], rax jmp short $+2 loc_466F6: mov rdi, [rbp+var_1D8] lea rsi, aProperty; "property" call __ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) mov [rbp+var_1D9], al jmp short $+2 loc_46711: mov al, [rbp+var_1D9] test al, 1 jnz short loc_46720 jmp loc_467D3 loc_46720: lea rdi, [rbp+var_B0]; this call __ZN16SEMANTICANALYZER8PropertyC2Ev; SEMANTICANALYZER::Property::Property(void) mov rdi, [rbp+var_20]; this call __ZNK3AST7ASTTree11DSFIterator3getEv; AST::ASTTree::DSFIterator::get(void) mov rsi, rax lea rdi, [rbp+var_100] call __ZN3AST7ASTTree11DSFIteratorC1EPNS_4NodeE; AST::ASTTree::DSFIterator::DSFIterator(AST::Node *) jmp short $+2 loc_46746: mov rdi, [rbp+var_1A8]; this lea rsi, [rbp+var_100]; AST::ASTTree::DSFIterator * lea rdx, [rbp+var_B0]; SEMANTICANALYZER::Property * mov [rbp+var_1E8], rdx call __ZN16SEMANTICANALYZER18AstStatementParser17serializePropertyERN3AST7ASTTree11DSFIteratorERNS_8PropertyE; SEMANTICANALYZER::AstStatementParser::serializeProperty(AST::ASTTree::DSFIterator &,SEMANTICANALYZER::Property &) mov rsi, [rbp+var_1E8] mov rdi, [rbp+var_18] add rdi, 20h ; ' ' call __ZNSt6vectorIN16SEMANTICANALYZER8PropertyESaIS1_EE9push_backEOS1_; std::vector<SEMANTICANALYZER::Property>::push_back(SEMANTICANALYZER::Property&&) jmp short $+2 loc_4677D: jmp short $+2 loc_4677F: mov rdi, [rbp+var_20]; this call __ZNK3AST7ASTTree11DSFIterator3getEv; AST::ASTTree::DSFIterator::get(void) mov rdi, [rbp+var_1A8] mov [rbp+var_1F0], rax add rdi, 8; this call __ZNK3AST7ASTTree11DSFIterator3getEv; AST::ASTTree::DSFIterator::get(void) mov rcx, rax mov rax, [rbp+var_1F0] cmp rax, rcx jz short loc_467BB mov rdi, [rbp+var_20] call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) jmp short $+2 loc_467B9: jmp short loc_4677F loc_467BB: lea rdi, [rbp+var_100]; this call __ZN3AST7ASTTree11DSFIteratorD2Ev; AST::ASTTree::DSFIterator::~DSFIterator() lea rdi, [rbp+var_B0]; this call __ZN16SEMANTICANALYZER8PropertyD2Ev; SEMANTICANALYZER::Property::~Property() loc_467D3: jmp short $+2 loc_467D5: mov rsi, [rbp+var_20]; AST::ASTTree::DSFIterator * lea rdi, [rbp+var_150]; this call __ZN3AST7ASTTree11DSFIteratorC2ERKS1_; AST::ASTTree::DSFIterator::DSFIterator(AST::ASTTree::DSFIterator const&) jmp short $+2 loc_467E7: lea rdi, [rbp+var_150] call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) jmp short $+2 loc_467F5: xorps xmm0, xmm0 movaps [rbp+var_160], xmm0 movaps [rbp+var_170], xmm0 movaps [rbp+var_180], xmm0 movaps [rbp+var_190], xmm0 movaps [rbp+var_1A0], xmm0 lea rdi, [rbp+var_1A0]; this call __ZN3AST7ASTTree11DSFIteratorC2Ev; AST::ASTTree::DSFIterator::DSFIterator(void) jmp short $+2 loc_46829: lea rdi, [rbp+var_150] lea rsi, [rbp+var_1A0] call __ZNK3AST7ASTTree11DSFIteratorneERKS1_; AST::ASTTree::DSFIterator::operator!=(AST::ASTTree::DSFIterator const&) mov [rbp+var_1F1], al lea rdi, [rbp+var_1A0]; this call __ZN3AST7ASTTree11DSFIteratorD2Ev; AST::ASTTree::DSFIterator::~DSFIterator() mov al, [rbp+var_1F1] test al, 1 jnz short loc_4685A jmp short loc_4686E loc_4685A: mov rdi, [rbp+var_1A8] add rdi, 8 call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) jmp short $+2 loc_4686C: jmp short $+2 loc_4686E: lea rdi, [rbp+var_150]; this call __ZN3AST7ASTTree11DSFIteratorD2Ev; AST::ASTTree::DSFIterator::~DSFIterator() mov rdi, [rbp+var_20] call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) jmp short $+2 loc_46885: jmp loc_4660A loc_4688A: add rsp, 200h pop rbp retn mov rdi, rax call __clang_call_terminate
char SEMANTICANALYZER::AstStatementParser::serializeNote( SEMANTICANALYZER::AstStatementParser *this, AST::ASTTree::DSFIterator *a2, SEMANTICANALYZER::Note *a3) { char result; // al long long v4; // rax char v5; // [rsp+Fh] [rbp-1F1h] long long v6; // [rsp+10h] [rbp-1F0h] long long v7; // [rsp+28h] [rbp-1D8h] long long v8; // [rsp+30h] [rbp-1D0h] long long v9; // [rsp+40h] [rbp-1C0h] char v10; // [rsp+4Fh] [rbp-1B1h] AST::ASTTree::DSFIterator *v11; // [rsp+50h] [rbp-1B0h] _OWORD v12[5]; // [rsp+60h] [rbp-1A0h] BYREF _BYTE v13[80]; // [rsp+B0h] [rbp-150h] BYREF _BYTE v14[80]; // [rsp+100h] [rbp-100h] BYREF _BYTE v15[64]; // [rsp+150h] [rbp-B0h] BYREF _OWORD v16[5]; // [rsp+190h] [rbp-70h] BYREF AST::ASTTree::DSFIterator *i; // [rsp+1E0h] [rbp-20h] SEMANTICANALYZER::Note *v18; // [rsp+1E8h] [rbp-18h] AST::ASTTree::DSFIterator *v19; // [rsp+1F0h] [rbp-10h] SEMANTICANALYZER::AstStatementParser *v20; // [rsp+1F8h] [rbp-8h] v20 = this; v19 = a2; v18 = a3; for ( i = a2; ; AST::ASTTree::DSFIterator::operator++(i) ) { v11 = i; memset(v16, 0, sizeof(v16)); AST::ASTTree::DSFIterator::DSFIterator((AST::ASTTree::DSFIterator *)v16); v10 = AST::ASTTree::DSFIterator::operator!=(v11, v16); AST::ASTTree::DSFIterator::~DSFIterator((AST::ASTTree::DSFIterator *)v16); result = v10; if ( (v10 & 1) == 0 ) break; v9 = AST::ASTTree::DSFIterator::operator->(i); if ( (std::operator==<char>(v9, "ID") & 1) != 0 ) { AST::ASTTree::DSFIterator::operator++(i); AST::ASTTree::DSFIterator::operator++((char *)this + 8); v8 = AST::ASTTree::DSFIterator::operator->(i); std::string::operator=(v18, v8); } else { v7 = AST::ASTTree::DSFIterator::operator->(i); if ( (std::operator==<char>(v7, "property") & 1) != 0 ) { SEMANTICANALYZER::Property::Property((SEMANTICANALYZER::Property *)v15); v4 = AST::ASTTree::DSFIterator::get(i); AST::ASTTree::DSFIterator::DSFIterator(v14, v4); SEMANTICANALYZER::AstStatementParser::serializeProperty( this, (AST::ASTTree::DSFIterator *)v14, (SEMANTICANALYZER::Property *)v15); std::vector<SEMANTICANALYZER::Property>::push_back((char *)v18 + 32, v15); while ( 1 ) { v6 = AST::ASTTree::DSFIterator::get(i); if ( v6 == AST::ASTTree::DSFIterator::get((SEMANTICANALYZER::AstStatementParser *)((char *)this + 8)) ) break; AST::ASTTree::DSFIterator::operator++(i); } AST::ASTTree::DSFIterator::~DSFIterator((AST::ASTTree::DSFIterator *)v14); SEMANTICANALYZER::Property::~Property((SEMANTICANALYZER::Property *)v15); } } AST::ASTTree::DSFIterator::DSFIterator((AST::ASTTree::DSFIterator *)v13, i); AST::ASTTree::DSFIterator::operator++(v13); memset(v12, 0, sizeof(v12)); AST::ASTTree::DSFIterator::DSFIterator((AST::ASTTree::DSFIterator *)v12); v5 = AST::ASTTree::DSFIterator::operator!=(v13, v12); AST::ASTTree::DSFIterator::~DSFIterator((AST::ASTTree::DSFIterator *)v12); if ( (v5 & 1) != 0 ) AST::ASTTree::DSFIterator::operator++((char *)this + 8); AST::ASTTree::DSFIterator::~DSFIterator((AST::ASTTree::DSFIterator *)v13); } return result; }
serializeNote: PUSH RBP MOV RBP,RSP SUB RSP,0x200 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x1a8],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x20],RAX LAB_0014660a: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x1b0],RAX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RBP + -0x30],XMM0 MOVAPS xmmword ptr [RBP + -0x40],XMM0 MOVAPS xmmword ptr [RBP + -0x50],XMM0 MOVAPS xmmword ptr [RBP + -0x60],XMM0 MOVAPS xmmword ptr [RBP + -0x70],XMM0 LAB_0014662c: LEA RDI,[RBP + -0x70] CALL 0x0012f660 JMP 0x00146637 LAB_00146637: MOV RDI,qword ptr [RBP + -0x1b0] LEA RSI,[RBP + -0x70] CALL 0x0012f500 MOV byte ptr [RBP + -0x1b1],AL LEA RDI,[RBP + -0x70] CALL 0x001307d0 MOV AL,byte ptr [RBP + -0x1b1] TEST AL,0x1 JNZ 0x00146665 JMP 0x0014688a LAB_00146665: MOV RDI,qword ptr [RBP + -0x20] CALL 0x0012f900 MOV qword ptr [RBP + -0x1c0],RAX JMP 0x00146677 LAB_00146677: MOV RDI,qword ptr [RBP + -0x1c0] LEA RSI,[0x14d79a] CALL 0x00131710 MOV byte ptr [RBP + -0x1c1],AL JMP 0x00146692 LAB_00146692: MOV AL,byte ptr [RBP + -0x1c1] TEST AL,0x1 JNZ 0x0014669e JMP 0x001466e4 LAB_0014669e: MOV RDI,qword ptr [RBP + -0x20] CALL 0x00130780 JMP 0x001466a9 LAB_001466a9: MOV RDI,qword ptr [RBP + -0x1a8] ADD RDI,0x8 CALL 0x00130780 JMP 0x001466bb LAB_001466bb: MOV RDI,qword ptr [RBP + -0x20] CALL 0x0012f900 MOV qword ptr [RBP + -0x1d0],RAX JMP 0x001466cd LAB_001466cd: MOV RSI,qword ptr [RBP + -0x1d0] MOV RDI,qword ptr [RBP + -0x18] CALL 0x0012d130 JMP 0x001466df LAB_001466df: JMP 0x001467d5 LAB_001466e4: MOV RDI,qword ptr [RBP + -0x20] CALL 0x0012f900 MOV qword ptr [RBP + -0x1d8],RAX JMP 0x001466f6 LAB_001466f6: MOV RDI,qword ptr [RBP + -0x1d8] LEA RSI,[0x14d79d] CALL 0x00131710 MOV byte ptr [RBP + -0x1d9],AL JMP 0x00146711 LAB_00146711: MOV AL,byte ptr [RBP + -0x1d9] TEST AL,0x1 JNZ 0x00146720 JMP 0x001467d3 LAB_00146720: LEA RDI,[RBP + -0xb0] CALL 0x0012f480 MOV RDI,qword ptr [RBP + -0x20] CALL 0x0012d780 MOV RSI,RAX LEA RDI,[RBP + -0x100] CALL 0x0012d6b0 JMP 0x00146746 LAB_00146746: MOV RDI,qword ptr [RBP + -0x1a8] LEA RSI,[RBP + -0x100] LEA RDX,[RBP + -0xb0] MOV qword ptr [RBP + -0x1e8],RDX CALL 0x0012edf0 MOV RSI,qword ptr [RBP + -0x1e8] MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x20 CALL 0x0012fab0 JMP 0x0014677d LAB_0014677d: JMP 0x0014677f LAB_0014677f: MOV RDI,qword ptr [RBP + -0x20] CALL 0x0012d780 MOV RDI,qword ptr [RBP + -0x1a8] MOV qword ptr [RBP + -0x1f0],RAX ADD RDI,0x8 CALL 0x0012d780 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x1f0] CMP RAX,RCX JZ 0x001467bb MOV RDI,qword ptr [RBP + -0x20] CALL 0x00130780 JMP 0x001467b9 LAB_001467b9: JMP 0x0014677f LAB_001467bb: LEA RDI,[RBP + -0x100] CALL 0x001307d0 LEA RDI,[RBP + -0xb0] CALL 0x0012dee0 LAB_001467d3: JMP 0x001467d5 LAB_001467d5: MOV RSI,qword ptr [RBP + -0x20] LEA RDI,[RBP + -0x150] CALL 0x00130c90 JMP 0x001467e7 LAB_001467e7: LEA RDI,[RBP + -0x150] CALL 0x00130780 JMP 0x001467f5 LAB_001467f5: XORPS XMM0,XMM0 MOVAPS xmmword ptr [RBP + -0x160],XMM0 MOVAPS xmmword ptr [RBP + -0x170],XMM0 MOVAPS xmmword ptr [RBP + -0x180],XMM0 MOVAPS xmmword ptr [RBP + -0x190],XMM0 MOVAPS xmmword ptr [RBP + -0x1a0],XMM0 LEA RDI,[RBP + -0x1a0] CALL 0x0012f660 JMP 0x00146829 LAB_00146829: LEA RDI,[RBP + -0x150] LEA RSI,[RBP + -0x1a0] CALL 0x0012f500 MOV byte ptr [RBP + -0x1f1],AL LEA RDI,[RBP + -0x1a0] CALL 0x001307d0 MOV AL,byte ptr [RBP + -0x1f1] TEST AL,0x1 JNZ 0x0014685a JMP 0x0014686e LAB_0014685a: MOV RDI,qword ptr [RBP + -0x1a8] ADD RDI,0x8 CALL 0x00130780 JMP 0x0014686c LAB_0014686c: JMP 0x0014686e LAB_0014686e: LEA RDI,[RBP + -0x150] CALL 0x001307d0 MOV RDI,qword ptr [RBP + -0x20] CALL 0x00130780 JMP 0x00146885 LAB_00146885: JMP 0x0014660a LAB_0014688a: ADD RSP,0x200 POP RBP RET
/* SEMANTICANALYZER::AstStatementParser::serializeNote(AST::ASTTree::DSFIterator&, SEMANTICANALYZER::Note&) */ void __thiscall SEMANTICANALYZER::AstStatementParser::serializeNote (AstStatementParser *this,DSFIterator *param_1,Note *param_2) { DSFIterator *this_00; byte bVar1; bool bVar2; string *psVar3; Node *pNVar4; long lVar5; long lVar6; int8 local_1a8; int8 uStack_1a0; int8 local_198; int8 uStack_190; int8 local_188; int8 uStack_180; int8 local_178; int8 uStack_170; int8 local_168; int8 uStack_160; DSFIterator local_158 [80]; DSFIterator local_108 [80]; Property local_b8 [64]; int8 local_78; int8 uStack_70; int8 local_68; int8 uStack_60; int8 local_58; int8 uStack_50; int8 local_48; int8 uStack_40; int8 local_38; int8 uStack_30; DSFIterator *local_28; Note *local_20; DSFIterator *local_18; AstStatementParser *local_10; local_28 = param_1; local_20 = param_2; local_18 = param_1; local_10 = this; while( true ) { this_00 = local_28; local_38 = 0; uStack_30 = 0; local_48 = 0; uStack_40 = 0; local_58 = 0; uStack_50 = 0; local_68 = 0; uStack_60 = 0; local_78 = 0; uStack_70 = 0; /* try { // try from 0014662c to 00146882 has its CatchHandler @ 00146893 */ AST::ASTTree::DSFIterator::DSFIterator((DSFIterator *)&local_78); bVar1 = AST::ASTTree::DSFIterator::operator!=(this_00,(DSFIterator *)&local_78); AST::ASTTree::DSFIterator::~DSFIterator((DSFIterator *)&local_78); if ((bVar1 & 1) == 0) break; psVar3 = (string *)AST::ASTTree::DSFIterator::operator->(local_28); bVar2 = std::operator==(psVar3,"ID"); if (bVar2) { AST::ASTTree::DSFIterator::operator++(local_28); AST::ASTTree::DSFIterator::operator++((DSFIterator *)(this + 8)); psVar3 = (string *)AST::ASTTree::DSFIterator::operator->(local_28); std::__cxx11::string::operator=((string *)local_20,psVar3); } else { psVar3 = (string *)AST::ASTTree::DSFIterator::operator->(local_28); bVar2 = std::operator==(psVar3,"property"); if (bVar2) { Property::Property(local_b8); pNVar4 = (Node *)AST::ASTTree::DSFIterator::get(); AST::ASTTree::DSFIterator::DSFIterator(local_108,pNVar4); serializeProperty(this,local_108,local_b8); std::vector<SEMANTICANALYZER::Property,std::allocator<SEMANTICANALYZER::Property>>:: push_back((vector<SEMANTICANALYZER::Property,std::allocator<SEMANTICANALYZER::Property>> *) (local_20 + 0x20),local_b8); while( true ) { lVar5 = AST::ASTTree::DSFIterator::get(); lVar6 = AST::ASTTree::DSFIterator::get(); if (lVar5 == lVar6) break; AST::ASTTree::DSFIterator::operator++(local_28); } AST::ASTTree::DSFIterator::~DSFIterator(local_108); Property::~Property(local_b8); } } AST::ASTTree::DSFIterator::DSFIterator(local_158,local_28); AST::ASTTree::DSFIterator::operator++(local_158); local_168 = 0; uStack_160 = 0; local_178 = 0; uStack_170 = 0; local_188 = 0; uStack_180 = 0; local_198 = 0; uStack_190 = 0; local_1a8 = 0; uStack_1a0 = 0; AST::ASTTree::DSFIterator::DSFIterator((DSFIterator *)&local_1a8); bVar1 = AST::ASTTree::DSFIterator::operator!=(local_158,(DSFIterator *)&local_1a8); AST::ASTTree::DSFIterator::~DSFIterator((DSFIterator *)&local_1a8); if ((bVar1 & 1) != 0) { AST::ASTTree::DSFIterator::operator++((DSFIterator *)(this + 8)); } AST::ASTTree::DSFIterator::~DSFIterator(local_158); AST::ASTTree::DSFIterator::operator++(local_28); } return; }
61,693
SEMANTICANALYZER::AstStatementParser::serializeNote(AST::ASTTree::DSFIterator&, SEMANTICANALYZER::Note&)
11AgReS1SoR11[P]Graph/Common/SemanticAnalyzer/src/AstStatementParser.cpp
void SEMANTICANALYZER::AstStatementParser::serializeNote(AST::ASTTree::DSFIterator &noteIter, Note &note) noexcept { for(auto& it = noteIter; it != AST::ASTTree::DSFIterator(); ++it) { if(it->value == GRAMMERCONSTANTS::ID) { ++it; ++astIter; note.id = it->value; } else if(it->value == GRAMMERCONSTANTS::PROPERTY) { Property property; AST::ASTTree::DSFIterator propertyIter(it.get()); serializeProperty(propertyIter, property); note.properties.push_back(std::move(property)); while(it.get() != astIter.get()) { ++it; } } auto nextIt = it; ++nextIt; if(nextIt != AST::ASTTree::DSFIterator()) { ++astIter; } } }
O1
cpp
SEMANTICANALYZER::AstStatementParser::serializeNote(AST::ASTTree::DSFIterator&, SEMANTICANALYZER::Note&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movq %rsi, %r14 movq %rdx, 0x68(%rsp) leaq 0x20(%rdx), %rax movq %rax, 0x58(%rsp) movq %rdi, 0x60(%rsp) leaq 0x8(%rdi), %r13 leaq 0x70(%rsp), %rbp leaq 0x3147(%rip), %r12 # 0x1777a movq %rsp, %r15 xorps %xmm0, %xmm0 movaps %xmm0, 0xb0(%rsp) movaps %xmm0, 0xa0(%rsp) movaps %xmm0, 0x90(%rsp) movaps %xmm0, 0x80(%rsp) movaps %xmm0, 0x70(%rsp) movq %rbp, %rdi xorl %esi, %esi callq 0xb600 movq %r14, %rdi movq %rbp, %rsi callq 0xb740 movl %eax, %ebx movq %rbp, %rdi callq 0xbd20 testb %bl, %bl je 0x1480c movq %r14, %rdi callq 0xb840 movq %rax, %rdi movq %r12, %rsi callq 0xb1f0 testl %eax, %eax je 0x14738 movq %r14, %rdi callq 0xb840 movq %rax, %rdi leaq 0x30cb(%rip), %rsi # 0x1777d callq 0xb1f0 testl %eax, %eax jne 0x1479e leaq 0x10(%rsp), %rax movq %rax, (%rsp) xorl %ecx, %ecx movq %rcx, 0x8(%rsp) movb %cl, 0x10(%rsp) leaq 0x30(%rsp), %rax movq %rax, 0x20(%rsp) movq %rcx, 0x28(%rsp) movb %cl, 0x30(%rsp) movq %r14, %rdi callq 0xb1a0 movq %rbp, %rdi movq %rax, %rsi callq 0xb180 movq 0x60(%rsp), %rdi movq %rbp, %rsi movq %r15, %rdx callq 0xb5a0 movq 0x58(%rsp), %rdi movq %r15, %rsi callq 0xbd30 movq %r14, %rdi callq 0xb1a0 movq %rax, %rbx movq %r13, %rdi callq 0xb1a0 cmpq %rax, %rbx je 0x1475f movq %r14, %rdi callq 0xbaf0 jmp 0x14716 movq %r14, %rdi callq 0xbaf0 movq %r13, %rdi callq 0xbaf0 movq %r14, %rdi callq 0xb840 movq 0x68(%rsp), %rdi movq %rax, %rsi callq 0xb390 jmp 0x1479e movq %rbp, %rdi callq 0xbd20 movq 0x20(%rsp), %rdi leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0x14783 movq 0x30(%rsp), %rsi incq %rsi callq 0xb6a0 movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x1479e movq 0x10(%rsp), %rsi incq %rsi callq 0xb6a0 movq %rbp, %rdi movq %r14, %rsi callq 0xb660 movq %rbp, %rdi callq 0xbaf0 xorps %xmm0, %xmm0 movaps %xmm0, 0x40(%rsp) movaps %xmm0, 0x30(%rsp) movaps %xmm0, 0x20(%rsp) movaps %xmm0, 0x10(%rsp) movaps %xmm0, (%rsp) movq %r15, %rdi xorl %esi, %esi callq 0xb600 movq %rbp, %rdi movq %r15, %rsi callq 0xb740 movl %eax, %ebx movq %r15, %rdi callq 0xbd20 testb %bl, %bl je 0x147f7 movq %r13, %rdi callq 0xbaf0 movq %rbp, %rdi callq 0xbd20 movq %r14, %rdi callq 0xbaf0 jmp 0x14636 addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x14820 movq %rax, %rdi callq 0x10969
_ZN16SEMANTICANALYZER18AstStatementParser13serializeNoteERN3AST7ASTTree11DSFIteratorERNS_4NoteE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C8h mov r14, rsi mov [rsp+0F8h+var_90], rdx lea rax, [rdx+20h] mov [rsp+0F8h+var_A0], rax mov [rsp+0F8h+var_98], rdi lea r13, [rdi+8] lea rbp, [rsp+0F8h+var_88] lea r12, aId; "ID" mov r15, rsp loc_14636: xorps xmm0, xmm0 movaps [rsp+0F8h+var_48], xmm0 movaps [rsp+0F8h+var_58], xmm0 movaps [rsp+0F8h+var_68], xmm0 movaps [rsp+0F8h+var_78], xmm0 movaps [rsp+0F8h+var_88], xmm0 mov rdi, rbp xor esi, esi call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EE17_M_initialize_mapEm; std::_Deque_base<AST::Node *>::_M_initialize_map(ulong) mov rdi, r14 mov rsi, rbp call __ZNK3AST7ASTTree11DSFIteratorneERKS1_; AST::ASTTree::DSFIterator::operator!=(AST::ASTTree::DSFIterator const&) mov ebx, eax mov rdi, rbp call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EED2Ev; std::_Deque_base<AST::Node *>::~_Deque_base() test bl, bl jz loc_1480C mov rdi, r14 call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void) mov rdi, rax mov rsi, r12 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz loc_14738 mov rdi, r14 call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void) mov rdi, rax lea rsi, aProperty; "property" call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jnz loc_1479E lea rax, [rsp+0F8h+var_E8] mov [rsp+0F8h+var_F8], rax xor ecx, ecx mov [rsp+0F8h+var_F8+8], rcx mov byte ptr [rsp+0F8h+var_E8], cl lea rax, [rsp+0F8h+var_C8] mov [rsp+0F8h+var_D8], rax mov [rsp+0F8h+var_D8+8], rcx mov byte ptr [rsp+0F8h+var_C8], cl mov rdi, r14; this call __ZNK3AST7ASTTree11DSFIterator3getEv; AST::ASTTree::DSFIterator::get(void) mov rdi, rbp mov rsi, rax call __ZN3AST7ASTTree11DSFIteratorC1EPNS_4NodeE; AST::ASTTree::DSFIterator::DSFIterator(AST::Node *) mov rdi, [rsp+0F8h+var_98] mov rsi, rbp mov rdx, r15 call __ZN16SEMANTICANALYZER18AstStatementParser17serializePropertyERN3AST7ASTTree11DSFIteratorERNS_8PropertyE; SEMANTICANALYZER::AstStatementParser::serializeProperty(AST::ASTTree::DSFIterator &,SEMANTICANALYZER::Property &) mov rdi, [rsp+0F8h+var_A0] mov rsi, r15 call __ZNSt6vectorIN16SEMANTICANALYZER8PropertyESaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<SEMANTICANALYZER::Property>::emplace_back<SEMANTICANALYZER::Property>(SEMANTICANALYZER::Property &&) loc_14716: mov rdi, r14; this call __ZNK3AST7ASTTree11DSFIterator3getEv; AST::ASTTree::DSFIterator::get(void) mov rbx, rax mov rdi, r13; this call __ZNK3AST7ASTTree11DSFIterator3getEv; AST::ASTTree::DSFIterator::get(void) cmp rbx, rax jz short loc_1475F mov rdi, r14 call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) jmp short loc_14716 loc_14738: mov rdi, r14 call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) mov rdi, r13 call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) mov rdi, r14 call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void) mov rdi, [rsp+0F8h+var_90] mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) jmp short loc_1479E loc_1475F: mov rdi, rbp call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EED2Ev; std::_Deque_base<AST::Node *>::~_Deque_base() mov rdi, [rsp+0F8h+var_D8]; void * lea rax, [rsp+0F8h+var_C8] cmp rdi, rax jz short loc_14783 mov rsi, qword ptr [rsp+0F8h+var_C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_14783: mov rdi, [rsp+0F8h+var_F8]; void * lea rax, [rsp+0F8h+var_E8] cmp rdi, rax jz short loc_1479E mov rsi, qword ptr [rsp+0F8h+var_E8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1479E: mov rdi, rbp mov rsi, r14 call __ZNSt5dequeIPN3AST4NodeESaIS2_EEC2ERKS4_; std::deque<AST::Node *>::deque(std::deque<AST::Node *> const&) mov rdi, rbp call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) xorps xmm0, xmm0 movaps [rsp+0F8h+var_B8], xmm0 movaps [rsp+0F8h+var_C8], xmm0 movaps xmmword ptr [rsp+0F8h+var_D8], xmm0 movaps [rsp+0F8h+var_E8], xmm0 movaps xmmword ptr [rsp+0F8h+var_F8], xmm0 mov rdi, r15 xor esi, esi call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EE17_M_initialize_mapEm; std::_Deque_base<AST::Node *>::_M_initialize_map(ulong) mov rdi, rbp mov rsi, r15 call __ZNK3AST7ASTTree11DSFIteratorneERKS1_; AST::ASTTree::DSFIterator::operator!=(AST::ASTTree::DSFIterator const&) mov ebx, eax mov rdi, r15 call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EED2Ev; std::_Deque_base<AST::Node *>::~_Deque_base() test bl, bl jz short loc_147F7 mov rdi, r13 call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) loc_147F7: mov rdi, rbp call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EED2Ev; std::_Deque_base<AST::Node *>::~_Deque_base() mov rdi, r14 call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) jmp loc_14636 loc_1480C: add rsp, 0C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_14820: mov rdi, rax call __clang_call_terminate
long long SEMANTICANALYZER::AstStatementParser::serializeNote( long long a1, AST::ASTTree::DSFIterator *a2, long long a3) { AST::ASTTree::DSFIterator *v3; // r13 char v4; // bl long long result; // rax long long v6; // rax long long v7; // rax long long v8; // rax long long v9; // rbx long long v10; // rax char v11; // bl void *v12[2]; // [rsp+0h] [rbp-F8h] BYREF __int128 v13; // [rsp+10h] [rbp-E8h] BYREF void *v14[2]; // [rsp+20h] [rbp-D8h] _OWORD v15[2]; // [rsp+30h] [rbp-C8h] BYREF long long v16; // [rsp+58h] [rbp-A0h] long long v17; // [rsp+60h] [rbp-98h] long long v18; // [rsp+68h] [rbp-90h] _OWORD v19[8]; // [rsp+70h] [rbp-88h] BYREF v18 = a3; v16 = a3 + 32; v17 = a1; v3 = (AST::ASTTree::DSFIterator *)(a1 + 8); while ( 1 ) { memset(v19, 0, 80); std::_Deque_base<AST::Node *>::_M_initialize_map(v19, 0LL); v4 = AST::ASTTree::DSFIterator::operator!=(a2, v19); result = std::_Deque_base<AST::Node *>::~_Deque_base(v19); if ( !v4 ) break; v6 = AST::ASTTree::DSFIterator::operator->(a2); if ( !(unsigned int)std::string::compare(v6, "ID") ) { AST::ASTTree::DSFIterator::operator++(a2); AST::ASTTree::DSFIterator::operator++(v3); v10 = AST::ASTTree::DSFIterator::operator->(a2); std::string::_M_assign(v18, v10); } else { v7 = AST::ASTTree::DSFIterator::operator->(a2); if ( !(unsigned int)std::string::compare(v7, "property") ) { v12[0] = &v13; v12[1] = 0LL; LOBYTE(v13) = 0; v14[0] = v15; v14[1] = 0LL; LOBYTE(v15[0]) = 0; v8 = AST::ASTTree::DSFIterator::get(a2); AST::ASTTree::DSFIterator::DSFIterator(v19, v8); SEMANTICANALYZER::AstStatementParser::serializeProperty(v17, v19, v12); std::vector<SEMANTICANALYZER::Property>::emplace_back<SEMANTICANALYZER::Property>(v16, v12); while ( 1 ) { v9 = AST::ASTTree::DSFIterator::get(a2); if ( v9 == AST::ASTTree::DSFIterator::get(v3) ) break; AST::ASTTree::DSFIterator::operator++(a2); } std::_Deque_base<AST::Node *>::~_Deque_base(v19); if ( v14[0] != v15 ) operator delete(v14[0], *(_QWORD *)&v15[0] + 1LL); if ( v12[0] != &v13 ) operator delete(v12[0], v13 + 1); } } std::deque<AST::Node *>::deque(v19, a2); AST::ASTTree::DSFIterator::operator++(v19); memset(v15, 0, sizeof(v15)); *(_OWORD *)v14 = 0LL; v13 = 0LL; *(_OWORD *)v12 = 0LL; std::_Deque_base<AST::Node *>::_M_initialize_map(v12, 0LL); v11 = AST::ASTTree::DSFIterator::operator!=(v19, v12); std::_Deque_base<AST::Node *>::~_Deque_base(v12); if ( v11 ) AST::ASTTree::DSFIterator::operator++(v3); std::_Deque_base<AST::Node *>::~_Deque_base(v19); AST::ASTTree::DSFIterator::operator++(a2); } return result; }
serializeNote: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc8 MOV R14,RSI MOV qword ptr [RSP + 0x68],RDX LEA RAX,[RDX + 0x20] MOV qword ptr [RSP + 0x58],RAX MOV qword ptr [RSP + 0x60],RDI LEA R13,[RDI + 0x8] LEA RBP,[RSP + 0x70] LEA R12,[0x11777a] MOV R15,RSP LAB_00114636: XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0xb0],XMM0 MOVAPS xmmword ptr [RSP + 0xa0],XMM0 MOVAPS xmmword ptr [RSP + 0x90],XMM0 MOVAPS xmmword ptr [RSP + 0x80],XMM0 MOVAPS xmmword ptr [RSP + 0x70],XMM0 LAB_0011465e: MOV RDI,RBP XOR ESI,ESI CALL 0x0010b600 MOV RDI,R14 MOV RSI,RBP CALL 0x0010b740 MOV EBX,EAX MOV RDI,RBP CALL 0x0010bd20 TEST BL,BL JZ 0x0011480c MOV RDI,R14 CALL 0x0010b840 MOV RDI,RAX MOV RSI,R12 CALL 0x0010b1f0 TEST EAX,EAX JZ 0x00114738 MOV RDI,R14 CALL 0x0010b840 MOV RDI,RAX LEA RSI,[0x11777d] CALL 0x0010b1f0 TEST EAX,EAX JNZ 0x0011479e LEA RAX,[RSP + 0x10] MOV qword ptr [RSP],RAX XOR ECX,ECX MOV qword ptr [RSP + 0x8],RCX MOV byte ptr [RSP + 0x10],CL LEA RAX,[RSP + 0x30] MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x28],RCX MOV byte ptr [RSP + 0x30],CL MOV RDI,R14 CALL 0x0010b1a0 MOV RDI,RBP MOV RSI,RAX CALL 0x0010b180 MOV RDI,qword ptr [RSP + 0x60] MOV RSI,RBP MOV RDX,R15 CALL 0x0010b5a0 MOV RDI,qword ptr [RSP + 0x58] MOV RSI,R15 CALL 0x0010bd30 LAB_00114716: MOV RDI,R14 CALL 0x0010b1a0 MOV RBX,RAX MOV RDI,R13 CALL 0x0010b1a0 CMP RBX,RAX JZ 0x0011475f LAB_0011472e: MOV RDI,R14 CALL 0x0010baf0 JMP 0x00114716 LAB_00114738: MOV RDI,R14 CALL 0x0010baf0 MOV RDI,R13 CALL 0x0010baf0 MOV RDI,R14 CALL 0x0010b840 MOV RDI,qword ptr [RSP + 0x68] MOV RSI,RAX CALL 0x0010b390 JMP 0x0011479e LAB_0011475f: MOV RDI,RBP CALL 0x0010bd20 MOV RDI,qword ptr [RSP + 0x20] LEA RAX,[RSP + 0x30] CMP RDI,RAX JZ 0x00114783 MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x0010b6a0 LAB_00114783: MOV RDI,qword ptr [RSP] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x0011479e MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x0010b6a0 LAB_0011479e: MOV RDI,RBP MOV RSI,R14 CALL 0x0010b660 MOV RDI,RBP CALL 0x0010baf0 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOVAPS xmmword ptr [RSP],XMM0 MOV RDI,R15 XOR ESI,ESI CALL 0x0010b600 MOV RDI,RBP MOV RSI,R15 CALL 0x0010b740 MOV EBX,EAX MOV RDI,R15 CALL 0x0010bd20 TEST BL,BL JZ 0x001147f7 MOV RDI,R13 CALL 0x0010baf0 LAB_001147f7: MOV RDI,RBP CALL 0x0010bd20 MOV RDI,R14 CALL 0x0010baf0 JMP 0x00114636 LAB_0011480c: ADD RSP,0xc8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* SEMANTICANALYZER::AstStatementParser::serializeNote(AST::ASTTree::DSFIterator&, SEMANTICANALYZER::Note&) */ void __thiscall SEMANTICANALYZER::AstStatementParser::serializeNote (AstStatementParser *this,DSFIterator *param_1,Note *param_2) { char cVar1; int iVar2; char *pcVar3; Node *pNVar4; long lVar5; long lVar6; ulong *local_f8; int8 uStack_f0; ulong local_e8 [2]; ulong *local_d8; int8 uStack_d0; ulong local_c8 [5]; Note *local_a0; AstStatementParser *local_98; Note *local_90; int8 local_88; int8 uStack_80; int8 local_78; int8 uStack_70; int8 local_68; int8 uStack_60; int8 local_58; int8 uStack_50; int8 local_48; int8 uStack_40; local_a0 = param_2 + 0x20; local_98 = this; local_90 = param_2; while( true ) { local_48 = 0; uStack_40 = 0; local_58 = 0; uStack_50 = 0; local_68 = 0; uStack_60 = 0; local_78 = 0; uStack_70 = 0; local_88 = 0; uStack_80 = 0; /* try { // try from 0011465e to 00114715 has its CatchHandler @ 00114820 */ std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::_M_initialize_map ((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_88,0); cVar1 = AST::ASTTree::DSFIterator::operator!=(param_1,(DSFIterator *)&local_88); std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::~_Deque_base ((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_88); if (cVar1 == '\0') break; pcVar3 = (char *)AST::ASTTree::DSFIterator::operator->(param_1); iVar2 = std::__cxx11::string::compare(pcVar3); if (iVar2 == 0) { /* try { // try from 00114738 to 00114806 has its CatchHandler @ 00114820 */ AST::ASTTree::DSFIterator::operator++(param_1); AST::ASTTree::DSFIterator::operator++((DSFIterator *)(this + 8)); AST::ASTTree::DSFIterator::operator->(param_1); std::__cxx11::string::_M_assign((string *)local_90); } else { pcVar3 = (char *)AST::ASTTree::DSFIterator::operator->(param_1); iVar2 = std::__cxx11::string::compare(pcVar3); if (iVar2 == 0) { local_f8 = local_e8; uStack_f0 = 0; local_e8[0] = local_e8[0] & 0xffffffffffffff00; local_d8 = local_c8; uStack_d0 = 0; local_c8[0] = local_c8[0] & 0xffffffffffffff00; pNVar4 = (Node *)AST::ASTTree::DSFIterator::get(); AST::ASTTree::DSFIterator::DSFIterator((DSFIterator *)&local_88,pNVar4); serializeProperty(local_98,(DSFIterator *)&local_88,(Property *)&local_f8); std::vector<SEMANTICANALYZER::Property,std::allocator<SEMANTICANALYZER::Property>>:: emplace_back<SEMANTICANALYZER::Property> ((vector<SEMANTICANALYZER::Property,std::allocator<SEMANTICANALYZER::Property>> *) local_a0,(Property *)&local_f8); while( true ) { lVar5 = AST::ASTTree::DSFIterator::get(); lVar6 = AST::ASTTree::DSFIterator::get(); if (lVar5 == lVar6) break; /* try { // try from 0011472e to 00114735 has its CatchHandler @ 0011481e */ AST::ASTTree::DSFIterator::operator++(param_1); } std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::~_Deque_base ((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_88); if (local_d8 != local_c8) { operator_delete(local_d8,local_c8[0] + 1); } if (local_f8 != local_e8) { operator_delete(local_f8,local_e8[0] + 1); } } } std::deque<AST::Node*,std::allocator<AST::Node*>>::deque ((deque<AST::Node*,std::allocator<AST::Node*>> *)&local_88,(deque *)param_1); AST::ASTTree::DSFIterator::operator++((DSFIterator *)&local_88); local_c8[2] = 0; local_c8[3] = 0; local_c8[0] = 0; local_c8[1] = 0; local_d8 = (ulong *)0x0; uStack_d0 = 0; local_e8[0] = 0; local_e8[1] = 0; local_f8 = (ulong *)0x0; uStack_f0 = 0; std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::_M_initialize_map ((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_f8,0); cVar1 = AST::ASTTree::DSFIterator::operator!=((DSFIterator *)&local_88,(DSFIterator *)&local_f8) ; std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::~_Deque_base ((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_f8); if (cVar1 != '\0') { AST::ASTTree::DSFIterator::operator++((DSFIterator *)(this + 8)); } std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::~_Deque_base ((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_88); AST::ASTTree::DSFIterator::operator++(param_1); } return; }
61,694
SEMANTICANALYZER::AstStatementParser::serializeNote(AST::ASTTree::DSFIterator&, SEMANTICANALYZER::Note&)
11AgReS1SoR11[P]Graph/Common/SemanticAnalyzer/src/AstStatementParser.cpp
void SEMANTICANALYZER::AstStatementParser::serializeNote(AST::ASTTree::DSFIterator &noteIter, Note &note) noexcept { for(auto& it = noteIter; it != AST::ASTTree::DSFIterator(); ++it) { if(it->value == GRAMMERCONSTANTS::ID) { ++it; ++astIter; note.id = it->value; } else if(it->value == GRAMMERCONSTANTS::PROPERTY) { Property property; AST::ASTTree::DSFIterator propertyIter(it.get()); serializeProperty(propertyIter, property); note.properties.push_back(std::move(property)); while(it.get() != astIter.get()) { ++it; } } auto nextIt = it; ++nextIt; if(nextIt != AST::ASTTree::DSFIterator()) { ++astIter; } } }
O2
cpp
SEMANTICANALYZER::AstStatementParser::serializeNote(AST::ASTTree::DSFIterator&, SEMANTICANALYZER::Note&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb8, %rsp movq %rdx, %rbx movq %rsi, %r14 leaq 0x20(%rdx), %rax movq %rax, (%rsp) movq %rdi, 0x8(%rsp) leaq 0x8(%rdi), %r13 leaq 0x60(%rsp), %rbp leaq 0x10(%rsp), %r15 xorps %xmm0, %xmm0 movaps %xmm0, 0xa0(%rsp) movaps %xmm0, 0x90(%rsp) movaps %xmm0, 0x80(%rsp) movaps %xmm0, 0x70(%rsp) movaps %xmm0, 0x60(%rsp) movq %rbp, %rdi callq 0x107f0 movq %r14, %rdi movq %rbp, %rsi callq 0x10b40 movl %eax, %r12d movq %rbp, %rdi callq 0x115a0 testb %r12b, %r12b je 0x185ee movq %r14, %rdi callq 0x10ca0 movq %rax, %rdi leaq 0x32e2(%rip), %rsi # 0x1b786 callq 0x116e0 testb %al, %al je 0x184d5 movq %r14, %rdi callq 0x11200 movq %r13, %rdi callq 0x11200 movq %r14, %rdi callq 0x10ca0 movq %rbx, %rdi movq %rax, %rsi callq 0x105f0 jmp 0x1857f movq %r14, %rdi callq 0x10ca0 movq %rax, %rdi leaq 0x32a2(%rip), %rsi # 0x1b789 callq 0x116e0 testb %al, %al je 0x1857f leaq 0x20(%rsp), %rax movq %rax, 0x10(%rsp) andq $0x0, 0x18(%rsp) xorl %ecx, %ecx movb %cl, 0x20(%rsp) leaq 0x40(%rsp), %rax movq %rax, 0x30(%rsp) andq $0x0, 0x38(%rsp) movb %cl, 0x40(%rsp) movq %r14, %rdi callq 0x102b0 movq %rbp, %rdi movq %rax, %rsi callq 0x10260 movq 0x8(%rsp), %rdi movq %rbp, %rsi movq %r15, %rdx callq 0x10930 movq (%rsp), %rdi movq %r15, %rsi callq 0x115d0 movq %r14, %rdi callq 0x102b0 movq %rax, %r12 movq %r13, %rdi callq 0x102b0 cmpq %rax, %r12 je 0x1856f movq %r14, %rdi callq 0x11200 jmp 0x1854d movq %rbp, %rdi callq 0x115a0 movq %r15, %rdi callq 0x10520 movq %rbp, %rdi movq %r14, %rsi callq 0x10a40 movq %rbp, %rdi callq 0x11200 xorps %xmm0, %xmm0 movaps %xmm0, 0x50(%rsp) movaps %xmm0, 0x40(%rsp) movaps %xmm0, 0x30(%rsp) movaps %xmm0, 0x20(%rsp) movaps %xmm0, 0x10(%rsp) movq %r15, %rdi callq 0x107f0 movq %rbp, %rdi movq %r15, %rsi callq 0x10b40 movl %eax, %r12d movq %r15, %rdi callq 0x115a0 testb %r12b, %r12b je 0x185d9 movq %r13, %rdi callq 0x11200 movq %rbp, %rdi callq 0x115a0 movq %r14, %rdi callq 0x11200 jmp 0x18446 addq $0xb8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x18602 movq %rax, %rdi callq 0x14ce1
_ZN16SEMANTICANALYZER18AstStatementParser13serializeNoteERN3AST7ASTTree11DSFIteratorERNS_4NoteE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0B8h mov rbx, rdx mov r14, rsi lea rax, [rdx+20h] mov [rsp+0E8h+var_E8], rax mov [rsp+0E8h+var_E0], rdi lea r13, [rdi+8] lea rbp, [rsp+0E8h+var_88] lea r15, [rsp+0E8h+var_D8] loc_18446: xorps xmm0, xmm0 movaps [rsp+0E8h+var_48], xmm0 movaps [rsp+0E8h+var_58], xmm0 movaps [rsp+0E8h+var_68], xmm0 movaps [rsp+0E8h+var_78], xmm0 movaps [rsp+0E8h+var_88], xmm0 mov rdi, rbp call __ZNSt5stackIPN3AST4NodeESt5dequeIS2_SaIS2_EEEC2IS5_vEEv; std::stack<AST::Node *>::stack<std::deque<AST::Node *>,void>(void) mov rdi, r14 mov rsi, rbp call __ZNK3AST7ASTTree11DSFIteratorneERKS1_; AST::ASTTree::DSFIterator::operator!=(AST::ASTTree::DSFIterator const&) mov r12d, eax mov rdi, rbp call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EED2Ev; std::_Deque_base<AST::Node *>::~_Deque_base() test r12b, r12b jz loc_185EE mov rdi, r14 call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void) mov rdi, rax lea rsi, aId; "ID" call __ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jz short loc_184D5 mov rdi, r14 call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) mov rdi, r13 call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) mov rdi, r14 call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void) mov rdi, rbx mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) jmp loc_1857F loc_184D5: mov rdi, r14 call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void) mov rdi, rax lea rsi, aProperty; "property" call __ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jz loc_1857F lea rax, [rsp+0E8h+var_C8] mov qword ptr [rsp+0E8h+var_D8], rax and qword ptr [rsp+0E8h+var_D8+8], 0 xor ecx, ecx mov byte ptr [rsp+0E8h+var_C8], cl lea rax, [rsp+0E8h+var_A8] mov qword ptr [rsp+0E8h+var_B8], rax and qword ptr [rsp+0E8h+var_B8+8], 0 mov byte ptr [rsp+0E8h+var_A8], cl mov rdi, r14; this call __ZNK3AST7ASTTree11DSFIterator3getEv; AST::ASTTree::DSFIterator::get(void) mov rdi, rbp mov rsi, rax call __ZN3AST7ASTTree11DSFIteratorC1EPNS_4NodeE; AST::ASTTree::DSFIterator::DSFIterator(AST::Node *) mov rdi, [rsp+0E8h+var_E0]; this mov rsi, rbp; AST::ASTTree::DSFIterator * mov rdx, r15; SEMANTICANALYZER::Property * call __ZN16SEMANTICANALYZER18AstStatementParser17serializePropertyERN3AST7ASTTree11DSFIteratorERNS_8PropertyE; SEMANTICANALYZER::AstStatementParser::serializeProperty(AST::ASTTree::DSFIterator &,SEMANTICANALYZER::Property &) mov rdi, [rsp+0E8h+var_E8] mov rsi, r15 call __ZNSt6vectorIN16SEMANTICANALYZER8PropertyESaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<SEMANTICANALYZER::Property>::emplace_back<SEMANTICANALYZER::Property>(SEMANTICANALYZER::Property &&) loc_1854D: mov rdi, r14; this call __ZNK3AST7ASTTree11DSFIterator3getEv; AST::ASTTree::DSFIterator::get(void) mov r12, rax mov rdi, r13; this call __ZNK3AST7ASTTree11DSFIterator3getEv; AST::ASTTree::DSFIterator::get(void) cmp r12, rax jz short loc_1856F mov rdi, r14 call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) jmp short loc_1854D loc_1856F: mov rdi, rbp call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EED2Ev; std::_Deque_base<AST::Node *>::~_Deque_base() mov rdi, r15; this call __ZN16SEMANTICANALYZER8PropertyD2Ev; SEMANTICANALYZER::Property::~Property() loc_1857F: mov rdi, rbp mov rsi, r14 call __ZNSt5dequeIPN3AST4NodeESaIS2_EEC2ERKS4_; std::deque<AST::Node *>::deque(std::deque<AST::Node *> const&) mov rdi, rbp call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) xorps xmm0, xmm0 movaps [rsp+0E8h+var_98], xmm0 movaps [rsp+0E8h+var_A8], xmm0 movaps [rsp+0E8h+var_B8], xmm0 movaps [rsp+0E8h+var_C8], xmm0 movaps [rsp+0E8h+var_D8], xmm0 mov rdi, r15 call __ZNSt5stackIPN3AST4NodeESt5dequeIS2_SaIS2_EEEC2IS5_vEEv; std::stack<AST::Node *>::stack<std::deque<AST::Node *>,void>(void) mov rdi, rbp mov rsi, r15 call __ZNK3AST7ASTTree11DSFIteratorneERKS1_; AST::ASTTree::DSFIterator::operator!=(AST::ASTTree::DSFIterator const&) mov r12d, eax mov rdi, r15 call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EED2Ev; std::_Deque_base<AST::Node *>::~_Deque_base() test r12b, r12b jz short loc_185D9 mov rdi, r13 call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) loc_185D9: mov rdi, rbp call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EED2Ev; std::_Deque_base<AST::Node *>::~_Deque_base() mov rdi, r14 call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) jmp loc_18446 loc_185EE: add rsp, 0B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_18602: mov rdi, rax call __clang_call_terminate
long long SEMANTICANALYZER::AstStatementParser::serializeNote( SEMANTICANALYZER::AstStatementParser *this, AST::ASTTree::DSFIterator *a2, SEMANTICANALYZER::Note *a3) { AST::ASTTree::DSFIterator *v4; // r13 char v5; // r12 long long result; // rax long long v7; // rax long long v8; // rax long long v9; // rax long long v10; // rax long long v11; // r12 char v12; // r12 char *v13; // [rsp+0h] [rbp-E8h] __int128 v14; // [rsp+10h] [rbp-D8h] BYREF __int128 v15; // [rsp+20h] [rbp-C8h] BYREF __int128 v16; // [rsp+30h] [rbp-B8h] _OWORD v17[2]; // [rsp+40h] [rbp-A8h] BYREF _OWORD v18[8]; // [rsp+60h] [rbp-88h] BYREF v13 = (char *)a3 + 32; v4 = (SEMANTICANALYZER::AstStatementParser *)((char *)this + 8); while ( 1 ) { memset(v18, 0, 80); std::stack<AST::Node *>::stack<std::deque<AST::Node *>,void>(v18); v5 = AST::ASTTree::DSFIterator::operator!=(a2, v18); result = std::_Deque_base<AST::Node *>::~_Deque_base(v18); if ( !v5 ) break; v7 = AST::ASTTree::DSFIterator::operator->(a2); if ( (unsigned __int8)std::operator==<char>(v7, "ID") ) { AST::ASTTree::DSFIterator::operator++(a2); AST::ASTTree::DSFIterator::operator++(v4); v8 = AST::ASTTree::DSFIterator::operator->(a2); std::string::_M_assign(a3, v8); } else { v9 = AST::ASTTree::DSFIterator::operator->(a2); if ( (unsigned __int8)std::operator==<char>(v9, "property") ) { v14 = (unsigned long long)&v15; LOBYTE(v15) = 0; v16 = (unsigned long long)v17; LOBYTE(v17[0]) = 0; v10 = AST::ASTTree::DSFIterator::get(a2); AST::ASTTree::DSFIterator::DSFIterator(v18, v10); SEMANTICANALYZER::AstStatementParser::serializeProperty( this, (AST::ASTTree::DSFIterator *)v18, (SEMANTICANALYZER::Property *)&v14); std::vector<SEMANTICANALYZER::Property>::emplace_back<SEMANTICANALYZER::Property>(v13, &v14); while ( 1 ) { v11 = AST::ASTTree::DSFIterator::get(a2); if ( v11 == AST::ASTTree::DSFIterator::get(v4) ) break; AST::ASTTree::DSFIterator::operator++(a2); } std::_Deque_base<AST::Node *>::~_Deque_base(v18); SEMANTICANALYZER::Property::~Property((SEMANTICANALYZER::Property *)&v14); } } std::deque<AST::Node *>::deque(v18, a2); AST::ASTTree::DSFIterator::operator++(v18); memset(v17, 0, sizeof(v17)); v16 = 0LL; v15 = 0LL; v14 = 0LL; std::stack<AST::Node *>::stack<std::deque<AST::Node *>,void>(&v14); v12 = AST::ASTTree::DSFIterator::operator!=(v18, &v14); std::_Deque_base<AST::Node *>::~_Deque_base(&v14); if ( v12 ) AST::ASTTree::DSFIterator::operator++(v4); std::_Deque_base<AST::Node *>::~_Deque_base(v18); AST::ASTTree::DSFIterator::operator++(a2); } return result; }
serializeNote: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xb8 MOV RBX,RDX MOV R14,RSI LEA RAX,[RDX + 0x20] MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x8],RDI LEA R13,[RDI + 0x8] LEA RBP,[RSP + 0x60] LEA R15,[RSP + 0x10] LAB_00118446: XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0xa0],XMM0 MOVAPS xmmword ptr [RSP + 0x90],XMM0 MOVAPS xmmword ptr [RSP + 0x80],XMM0 MOVAPS xmmword ptr [RSP + 0x70],XMM0 MOVAPS xmmword ptr [RSP + 0x60],XMM0 LAB_0011846b: MOV RDI,RBP CALL 0x001107f0 MOV RDI,R14 MOV RSI,RBP CALL 0x00110b40 MOV R12D,EAX MOV RDI,RBP CALL 0x001115a0 TEST R12B,R12B JZ 0x001185ee MOV RDI,R14 CALL 0x00110ca0 MOV RDI,RAX LEA RSI,[0x11b786] CALL 0x001116e0 TEST AL,AL JZ 0x001184d5 MOV RDI,R14 CALL 0x00111200 MOV RDI,R13 CALL 0x00111200 MOV RDI,R14 CALL 0x00110ca0 MOV RDI,RBX MOV RSI,RAX CALL 0x001105f0 JMP 0x0011857f LAB_001184d5: MOV RDI,R14 CALL 0x00110ca0 MOV RDI,RAX LEA RSI,[0x11b789] CALL 0x001116e0 TEST AL,AL JZ 0x0011857f LEA RAX,[RSP + 0x20] MOV qword ptr [RSP + 0x10],RAX AND qword ptr [RSP + 0x18],0x0 XOR ECX,ECX MOV byte ptr [RSP + 0x20],CL LEA RAX,[RSP + 0x40] MOV qword ptr [RSP + 0x30],RAX AND qword ptr [RSP + 0x38],0x0 MOV byte ptr [RSP + 0x40],CL MOV RDI,R14 CALL 0x001102b0 MOV RDI,RBP MOV RSI,RAX CALL 0x00110260 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,RBP MOV RDX,R15 CALL 0x00110930 MOV RDI,qword ptr [RSP] MOV RSI,R15 CALL 0x001115d0 LAB_0011854d: MOV RDI,R14 CALL 0x001102b0 MOV R12,RAX MOV RDI,R13 CALL 0x001102b0 CMP R12,RAX JZ 0x0011856f LAB_00118565: MOV RDI,R14 CALL 0x00111200 JMP 0x0011854d LAB_0011856f: MOV RDI,RBP CALL 0x001115a0 MOV RDI,R15 CALL 0x00110520 LAB_0011857f: MOV RDI,RBP MOV RSI,R14 CALL 0x00110a40 MOV RDI,RBP CALL 0x00111200 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x50],XMM0 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOV RDI,R15 CALL 0x001107f0 MOV RDI,RBP MOV RSI,R15 CALL 0x00110b40 MOV R12D,EAX MOV RDI,R15 CALL 0x001115a0 TEST R12B,R12B JZ 0x001185d9 MOV RDI,R13 CALL 0x00111200 LAB_001185d9: MOV RDI,RBP CALL 0x001115a0 MOV RDI,R14 CALL 0x00111200 JMP 0x00118446 LAB_001185ee: ADD RSP,0xb8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* SEMANTICANALYZER::AstStatementParser::serializeNote(AST::ASTTree::DSFIterator&, SEMANTICANALYZER::Note&) */ void __thiscall SEMANTICANALYZER::AstStatementParser::serializeNote (AstStatementParser *this,DSFIterator *param_1,Note *param_2) { char cVar1; bool bVar2; string *psVar3; Node *pNVar4; long lVar5; long lVar6; ulong *local_d8; int8 uStack_d0; ulong local_c8 [2]; ulong *local_b8; int8 uStack_b0; ulong local_a8 [4]; int8 local_88; int8 uStack_80; int8 local_78; int8 uStack_70; int8 local_68; int8 uStack_60; int8 local_58; int8 uStack_50; int8 local_48; int8 uStack_40; while( true ) { local_48 = 0; uStack_40 = 0; local_58 = 0; uStack_50 = 0; local_68 = 0; uStack_60 = 0; local_78 = 0; uStack_70 = 0; local_88 = 0; uStack_80 = 0; /* try { // try from 0011846b to 0011854c has its CatchHandler @ 00118602 */ std::stack<AST::Node*,std::deque<AST::Node*,std::allocator<AST::Node*>>>:: stack<std::deque<AST::Node*,std::allocator<AST::Node*>>,void> ((stack<AST::Node*,std::deque<AST::Node*,std::allocator<AST::Node*>>> *)&local_88); cVar1 = AST::ASTTree::DSFIterator::operator!=(param_1,(DSFIterator *)&local_88); std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::~_Deque_base ((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_88); if (cVar1 == '\0') break; psVar3 = (string *)AST::ASTTree::DSFIterator::operator->(param_1); bVar2 = std::operator==(psVar3,"ID"); if (bVar2) { AST::ASTTree::DSFIterator::operator++(param_1); AST::ASTTree::DSFIterator::operator++((DSFIterator *)(this + 8)); AST::ASTTree::DSFIterator::operator->(param_1); std::__cxx11::string::_M_assign((string *)param_2); } else { psVar3 = (string *)AST::ASTTree::DSFIterator::operator->(param_1); bVar2 = std::operator==(psVar3,"property"); if (bVar2) { local_d8 = local_c8; uStack_d0 = 0; local_c8[0] = local_c8[0] & 0xffffffffffffff00; local_b8 = local_a8; uStack_b0 = 0; local_a8[0] = local_a8[0] & 0xffffffffffffff00; pNVar4 = (Node *)AST::ASTTree::DSFIterator::get(); AST::ASTTree::DSFIterator::DSFIterator((DSFIterator *)&local_88,pNVar4); serializeProperty(this,(DSFIterator *)&local_88,(Property *)&local_d8); std::vector<SEMANTICANALYZER::Property,std::allocator<SEMANTICANALYZER::Property>>:: emplace_back<SEMANTICANALYZER::Property> ((vector<SEMANTICANALYZER::Property,std::allocator<SEMANTICANALYZER::Property>> *) (param_2 + 0x20),(Property *)&local_d8); while( true ) { lVar5 = AST::ASTTree::DSFIterator::get(); lVar6 = AST::ASTTree::DSFIterator::get(); if (lVar5 == lVar6) break; /* try { // try from 00118565 to 0011856c has its CatchHandler @ 00118600 */ AST::ASTTree::DSFIterator::operator++(param_1); } std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::~_Deque_base ((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_88); Property::~Property((Property *)&local_d8); } } /* try { // try from 0011857f to 001185e8 has its CatchHandler @ 00118602 */ std::deque<AST::Node*,std::allocator<AST::Node*>>::deque ((deque<AST::Node*,std::allocator<AST::Node*>> *)&local_88,(deque *)param_1); AST::ASTTree::DSFIterator::operator++((DSFIterator *)&local_88); local_a8[2] = 0; local_a8[3] = 0; local_a8[0] = 0; local_a8[1] = 0; local_b8 = (ulong *)0x0; uStack_b0 = 0; local_c8[0] = 0; local_c8[1] = 0; local_d8 = (ulong *)0x0; uStack_d0 = 0; std::stack<AST::Node*,std::deque<AST::Node*,std::allocator<AST::Node*>>>:: stack<std::deque<AST::Node*,std::allocator<AST::Node*>>,void> ((stack<AST::Node*,std::deque<AST::Node*,std::allocator<AST::Node*>>> *)&local_d8); cVar1 = AST::ASTTree::DSFIterator::operator!=((DSFIterator *)&local_88,(DSFIterator *)&local_d8) ; std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::~_Deque_base ((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_d8); if (cVar1 != '\0') { AST::ASTTree::DSFIterator::operator++((DSFIterator *)(this + 8)); } std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::~_Deque_base ((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_88); AST::ASTTree::DSFIterator::operator++(param_1); } return; }
61,695
SEMANTICANALYZER::AstStatementParser::serializeNote(AST::ASTTree::DSFIterator&, SEMANTICANALYZER::Note&)
11AgReS1SoR11[P]Graph/Common/SemanticAnalyzer/src/AstStatementParser.cpp
void SEMANTICANALYZER::AstStatementParser::serializeNote(AST::ASTTree::DSFIterator &noteIter, Note &note) noexcept { for(auto& it = noteIter; it != AST::ASTTree::DSFIterator(); ++it) { if(it->value == GRAMMERCONSTANTS::ID) { ++it; ++astIter; note.id = it->value; } else if(it->value == GRAMMERCONSTANTS::PROPERTY) { Property property; AST::ASTTree::DSFIterator propertyIter(it.get()); serializeProperty(propertyIter, property); note.properties.push_back(std::move(property)); while(it.get() != astIter.get()) { ++it; } } auto nextIt = it; ++nextIt; if(nextIt != AST::ASTTree::DSFIterator()) { ++astIter; } } }
O3
cpp
SEMANTICANALYZER::AstStatementParser::serializeNote(AST::ASTTree::DSFIterator&, SEMANTICANALYZER::Note&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movq %rsi, %r14 movq %rdx, 0x68(%rsp) leaq 0x20(%rdx), %rax movq %rax, 0x58(%rsp) movq %rdi, 0x60(%rsp) leaq 0x8(%rdi), %r13 leaq 0x70(%rsp), %rbp leaq 0x30cb(%rip), %r12 # 0x1777a movq %rsp, %r15 xorps %xmm0, %xmm0 movaps %xmm0, 0xb0(%rsp) movaps %xmm0, 0xa0(%rsp) movaps %xmm0, 0x90(%rsp) movaps %xmm0, 0x80(%rsp) movaps %xmm0, 0x70(%rsp) movq %rbp, %rdi xorl %esi, %esi callq 0xb600 movq %r14, %rdi movq %rbp, %rsi callq 0xb740 movl %eax, %ebx movq %rbp, %rdi callq 0xbd20 testb %bl, %bl je 0x14888 movq %r14, %rdi callq 0xb840 movq %rax, %rdi movq %r12, %rsi callq 0xb1f0 testl %eax, %eax je 0x147b4 movq %r14, %rdi callq 0xb840 movq %rax, %rdi leaq 0x304f(%rip), %rsi # 0x1777d callq 0xb1f0 testl %eax, %eax jne 0x1481a leaq 0x10(%rsp), %rax movq %rax, (%rsp) xorl %ecx, %ecx movq %rcx, 0x8(%rsp) movb %cl, 0x10(%rsp) leaq 0x30(%rsp), %rax movq %rax, 0x20(%rsp) movq %rcx, 0x28(%rsp) movb %cl, 0x30(%rsp) movq %r14, %rdi callq 0xb1a0 movq %rbp, %rdi movq %rax, %rsi callq 0xb180 movq 0x60(%rsp), %rdi movq %rbp, %rsi movq %r15, %rdx callq 0xb5a0 movq 0x58(%rsp), %rdi movq %r15, %rsi callq 0xbd30 movq %r14, %rdi callq 0xb1a0 movq %rax, %rbx movq %r13, %rdi callq 0xb1a0 cmpq %rax, %rbx je 0x147db movq %r14, %rdi callq 0xbaf0 jmp 0x14792 movq %r14, %rdi callq 0xbaf0 movq %r13, %rdi callq 0xbaf0 movq %r14, %rdi callq 0xb840 movq 0x68(%rsp), %rdi movq %rax, %rsi callq 0xb390 jmp 0x1481a movq %rbp, %rdi callq 0xbd20 movq 0x20(%rsp), %rdi leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0x147ff movq 0x30(%rsp), %rsi incq %rsi callq 0xb6a0 movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x1481a movq 0x10(%rsp), %rsi incq %rsi callq 0xb6a0 movq %rbp, %rdi movq %r14, %rsi callq 0xb660 movq %rbp, %rdi callq 0xbaf0 xorps %xmm0, %xmm0 movaps %xmm0, 0x40(%rsp) movaps %xmm0, 0x30(%rsp) movaps %xmm0, 0x20(%rsp) movaps %xmm0, 0x10(%rsp) movaps %xmm0, (%rsp) movq %r15, %rdi xorl %esi, %esi callq 0xb600 movq %rbp, %rdi movq %r15, %rsi callq 0xb740 movl %eax, %ebx movq %r15, %rdi callq 0xbd20 testb %bl, %bl je 0x14873 movq %r13, %rdi callq 0xbaf0 movq %rbp, %rdi callq 0xbd20 movq %r14, %rdi callq 0xbaf0 jmp 0x146b2 addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x1489c movq %rax, %rdi callq 0x10aa5
_ZN16SEMANTICANALYZER18AstStatementParser13serializeNoteERN3AST7ASTTree11DSFIteratorERNS_4NoteE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C8h mov r14, rsi mov [rsp+0F8h+var_90], rdx lea rax, [rdx+20h] mov [rsp+0F8h+var_A0], rax mov [rsp+0F8h+var_98], rdi lea r13, [rdi+8] lea rbp, [rsp+0F8h+var_88] lea r12, aId; "ID" mov r15, rsp loc_146B2: xorps xmm0, xmm0 movaps [rsp+0F8h+var_48], xmm0 movaps [rsp+0F8h+var_58], xmm0 movaps [rsp+0F8h+var_68], xmm0 movaps [rsp+0F8h+var_78], xmm0 movaps [rsp+0F8h+var_88], xmm0 mov rdi, rbp xor esi, esi call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EE17_M_initialize_mapEm; std::_Deque_base<AST::Node *>::_M_initialize_map(ulong) mov rdi, r14 mov rsi, rbp call __ZNK3AST7ASTTree11DSFIteratorneERKS1_; AST::ASTTree::DSFIterator::operator!=(AST::ASTTree::DSFIterator const&) mov ebx, eax mov rdi, rbp call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EED2Ev; std::_Deque_base<AST::Node *>::~_Deque_base() test bl, bl jz loc_14888 mov rdi, r14 call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void) mov rdi, rax mov rsi, r12 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz loc_147B4 mov rdi, r14 call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void) mov rdi, rax lea rsi, aProperty; "property" call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jnz loc_1481A lea rax, [rsp+0F8h+var_E8] mov [rsp+0F8h+var_F8], rax xor ecx, ecx mov [rsp+0F8h+var_F8+8], rcx mov byte ptr [rsp+0F8h+var_E8], cl lea rax, [rsp+0F8h+var_C8] mov [rsp+0F8h+var_D8], rax mov [rsp+0F8h+var_D8+8], rcx mov byte ptr [rsp+0F8h+var_C8], cl mov rdi, r14; this call __ZNK3AST7ASTTree11DSFIterator3getEv; AST::ASTTree::DSFIterator::get(void) mov rdi, rbp mov rsi, rax call __ZN3AST7ASTTree11DSFIteratorC1EPNS_4NodeE; AST::ASTTree::DSFIterator::DSFIterator(AST::Node *) mov rdi, [rsp+0F8h+var_98] mov rsi, rbp mov rdx, r15 call __ZN16SEMANTICANALYZER18AstStatementParser17serializePropertyERN3AST7ASTTree11DSFIteratorERNS_8PropertyE; SEMANTICANALYZER::AstStatementParser::serializeProperty(AST::ASTTree::DSFIterator &,SEMANTICANALYZER::Property &) mov rdi, [rsp+0F8h+var_A0] mov rsi, r15 call __ZNSt6vectorIN16SEMANTICANALYZER8PropertyESaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<SEMANTICANALYZER::Property>::emplace_back<SEMANTICANALYZER::Property>(SEMANTICANALYZER::Property &&) loc_14792: mov rdi, r14; this call __ZNK3AST7ASTTree11DSFIterator3getEv; AST::ASTTree::DSFIterator::get(void) mov rbx, rax mov rdi, r13; this call __ZNK3AST7ASTTree11DSFIterator3getEv; AST::ASTTree::DSFIterator::get(void) cmp rbx, rax jz short loc_147DB mov rdi, r14 call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) jmp short loc_14792 loc_147B4: mov rdi, r14 call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) mov rdi, r13 call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) mov rdi, r14 call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void) mov rdi, [rsp+0F8h+var_90] mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) jmp short loc_1481A loc_147DB: mov rdi, rbp call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EED2Ev; std::_Deque_base<AST::Node *>::~_Deque_base() mov rdi, [rsp+0F8h+var_D8]; void * lea rax, [rsp+0F8h+var_C8] cmp rdi, rax jz short loc_147FF mov rsi, qword ptr [rsp+0F8h+var_C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_147FF: mov rdi, [rsp+0F8h+var_F8]; void * lea rax, [rsp+0F8h+var_E8] cmp rdi, rax jz short loc_1481A mov rsi, qword ptr [rsp+0F8h+var_E8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1481A: mov rdi, rbp mov rsi, r14 call __ZNSt5dequeIPN3AST4NodeESaIS2_EEC2ERKS4_; std::deque<AST::Node *>::deque(std::deque<AST::Node *> const&) mov rdi, rbp call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) xorps xmm0, xmm0 movaps [rsp+0F8h+var_B8], xmm0 movaps [rsp+0F8h+var_C8], xmm0 movaps xmmword ptr [rsp+0F8h+var_D8], xmm0 movaps [rsp+0F8h+var_E8], xmm0 movaps xmmword ptr [rsp+0F8h+var_F8], xmm0 mov rdi, r15 xor esi, esi call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EE17_M_initialize_mapEm; std::_Deque_base<AST::Node *>::_M_initialize_map(ulong) mov rdi, rbp mov rsi, r15 call __ZNK3AST7ASTTree11DSFIteratorneERKS1_; AST::ASTTree::DSFIterator::operator!=(AST::ASTTree::DSFIterator const&) mov ebx, eax mov rdi, r15 call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EED2Ev; std::_Deque_base<AST::Node *>::~_Deque_base() test bl, bl jz short loc_14873 mov rdi, r13 call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) loc_14873: mov rdi, rbp call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EED2Ev; std::_Deque_base<AST::Node *>::~_Deque_base() mov rdi, r14 call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) jmp loc_146B2 loc_14888: add rsp, 0C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_1489C: mov rdi, rax call __clang_call_terminate
long long SEMANTICANALYZER::AstStatementParser::serializeNote( long long a1, AST::ASTTree::DSFIterator *a2, long long a3) { AST::ASTTree::DSFIterator *v3; // r13 char v4; // bl long long result; // rax long long v6; // rax long long v7; // rax long long v8; // rax long long v9; // rbx long long v10; // rax char v11; // bl void *v12[2]; // [rsp+0h] [rbp-F8h] BYREF __int128 v13; // [rsp+10h] [rbp-E8h] BYREF void *v14[2]; // [rsp+20h] [rbp-D8h] _OWORD v15[2]; // [rsp+30h] [rbp-C8h] BYREF long long v16; // [rsp+58h] [rbp-A0h] long long v17; // [rsp+60h] [rbp-98h] long long v18; // [rsp+68h] [rbp-90h] _OWORD v19[8]; // [rsp+70h] [rbp-88h] BYREF v18 = a3; v16 = a3 + 32; v17 = a1; v3 = (AST::ASTTree::DSFIterator *)(a1 + 8); while ( 1 ) { memset(v19, 0, 80); std::_Deque_base<AST::Node *>::_M_initialize_map(v19, 0LL); v4 = AST::ASTTree::DSFIterator::operator!=(a2, v19); result = std::_Deque_base<AST::Node *>::~_Deque_base(v19); if ( !v4 ) break; v6 = AST::ASTTree::DSFIterator::operator->(a2); if ( !(unsigned int)std::string::compare(v6, "ID") ) { AST::ASTTree::DSFIterator::operator++(a2); AST::ASTTree::DSFIterator::operator++(v3); v10 = AST::ASTTree::DSFIterator::operator->(a2); std::string::_M_assign(v18, v10); } else { v7 = AST::ASTTree::DSFIterator::operator->(a2); if ( !(unsigned int)std::string::compare(v7, "property") ) { v12[0] = &v13; v12[1] = 0LL; LOBYTE(v13) = 0; v14[0] = v15; v14[1] = 0LL; LOBYTE(v15[0]) = 0; v8 = AST::ASTTree::DSFIterator::get(a2); AST::ASTTree::DSFIterator::DSFIterator(v19, v8); SEMANTICANALYZER::AstStatementParser::serializeProperty(v17, v19, v12); std::vector<SEMANTICANALYZER::Property>::emplace_back<SEMANTICANALYZER::Property>(v16, v12); while ( 1 ) { v9 = AST::ASTTree::DSFIterator::get(a2); if ( v9 == AST::ASTTree::DSFIterator::get(v3) ) break; AST::ASTTree::DSFIterator::operator++(a2); } std::_Deque_base<AST::Node *>::~_Deque_base(v19); if ( v14[0] != v15 ) operator delete(v14[0], *(_QWORD *)&v15[0] + 1LL); if ( v12[0] != &v13 ) operator delete(v12[0], v13 + 1); } } std::deque<AST::Node *>::deque(v19, a2); AST::ASTTree::DSFIterator::operator++(v19); memset(v15, 0, sizeof(v15)); *(_OWORD *)v14 = 0LL; v13 = 0LL; *(_OWORD *)v12 = 0LL; std::_Deque_base<AST::Node *>::_M_initialize_map(v12, 0LL); v11 = AST::ASTTree::DSFIterator::operator!=(v19, v12); std::_Deque_base<AST::Node *>::~_Deque_base(v12); if ( v11 ) AST::ASTTree::DSFIterator::operator++(v3); std::_Deque_base<AST::Node *>::~_Deque_base(v19); AST::ASTTree::DSFIterator::operator++(a2); } return result; }
serializeNote: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc8 MOV R14,RSI MOV qword ptr [RSP + 0x68],RDX LEA RAX,[RDX + 0x20] MOV qword ptr [RSP + 0x58],RAX MOV qword ptr [RSP + 0x60],RDI LEA R13,[RDI + 0x8] LEA RBP,[RSP + 0x70] LEA R12,[0x11777a] MOV R15,RSP LAB_001146b2: XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0xb0],XMM0 MOVAPS xmmword ptr [RSP + 0xa0],XMM0 MOVAPS xmmword ptr [RSP + 0x90],XMM0 MOVAPS xmmword ptr [RSP + 0x80],XMM0 MOVAPS xmmword ptr [RSP + 0x70],XMM0 LAB_001146da: MOV RDI,RBP XOR ESI,ESI CALL 0x0010b600 MOV RDI,R14 MOV RSI,RBP CALL 0x0010b740 MOV EBX,EAX MOV RDI,RBP CALL 0x0010bd20 TEST BL,BL JZ 0x00114888 MOV RDI,R14 CALL 0x0010b840 MOV RDI,RAX MOV RSI,R12 CALL 0x0010b1f0 TEST EAX,EAX JZ 0x001147b4 MOV RDI,R14 CALL 0x0010b840 MOV RDI,RAX LEA RSI,[0x11777d] CALL 0x0010b1f0 TEST EAX,EAX JNZ 0x0011481a LEA RAX,[RSP + 0x10] MOV qword ptr [RSP],RAX XOR ECX,ECX MOV qword ptr [RSP + 0x8],RCX MOV byte ptr [RSP + 0x10],CL LEA RAX,[RSP + 0x30] MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x28],RCX MOV byte ptr [RSP + 0x30],CL MOV RDI,R14 CALL 0x0010b1a0 MOV RDI,RBP MOV RSI,RAX CALL 0x0010b180 MOV RDI,qword ptr [RSP + 0x60] MOV RSI,RBP MOV RDX,R15 CALL 0x0010b5a0 MOV RDI,qword ptr [RSP + 0x58] MOV RSI,R15 CALL 0x0010bd30 LAB_00114792: MOV RDI,R14 CALL 0x0010b1a0 MOV RBX,RAX MOV RDI,R13 CALL 0x0010b1a0 CMP RBX,RAX JZ 0x001147db LAB_001147aa: MOV RDI,R14 CALL 0x0010baf0 JMP 0x00114792 LAB_001147b4: MOV RDI,R14 CALL 0x0010baf0 MOV RDI,R13 CALL 0x0010baf0 MOV RDI,R14 CALL 0x0010b840 MOV RDI,qword ptr [RSP + 0x68] MOV RSI,RAX CALL 0x0010b390 JMP 0x0011481a LAB_001147db: MOV RDI,RBP CALL 0x0010bd20 MOV RDI,qword ptr [RSP + 0x20] LEA RAX,[RSP + 0x30] CMP RDI,RAX JZ 0x001147ff MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x0010b6a0 LAB_001147ff: MOV RDI,qword ptr [RSP] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x0011481a MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x0010b6a0 LAB_0011481a: MOV RDI,RBP MOV RSI,R14 CALL 0x0010b660 MOV RDI,RBP CALL 0x0010baf0 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOVAPS xmmword ptr [RSP],XMM0 MOV RDI,R15 XOR ESI,ESI CALL 0x0010b600 MOV RDI,RBP MOV RSI,R15 CALL 0x0010b740 MOV EBX,EAX MOV RDI,R15 CALL 0x0010bd20 TEST BL,BL JZ 0x00114873 MOV RDI,R13 CALL 0x0010baf0 LAB_00114873: MOV RDI,RBP CALL 0x0010bd20 MOV RDI,R14 CALL 0x0010baf0 JMP 0x001146b2 LAB_00114888: ADD RSP,0xc8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* SEMANTICANALYZER::AstStatementParser::serializeNote(AST::ASTTree::DSFIterator&, SEMANTICANALYZER::Note&) */ void __thiscall SEMANTICANALYZER::AstStatementParser::serializeNote (AstStatementParser *this,DSFIterator *param_1,Note *param_2) { char cVar1; int iVar2; char *pcVar3; Node *pNVar4; long lVar5; long lVar6; ulong *local_f8; int8 uStack_f0; ulong local_e8 [2]; ulong *local_d8; int8 uStack_d0; ulong local_c8 [5]; Note *local_a0; AstStatementParser *local_98; Note *local_90; int8 local_88; int8 uStack_80; int8 local_78; int8 uStack_70; int8 local_68; int8 uStack_60; int8 local_58; int8 uStack_50; int8 local_48; int8 uStack_40; local_a0 = param_2 + 0x20; local_98 = this; local_90 = param_2; while( true ) { local_48 = 0; uStack_40 = 0; local_58 = 0; uStack_50 = 0; local_68 = 0; uStack_60 = 0; local_78 = 0; uStack_70 = 0; local_88 = 0; uStack_80 = 0; /* try { // try from 001146da to 00114791 has its CatchHandler @ 0011489c */ std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::_M_initialize_map ((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_88,0); cVar1 = AST::ASTTree::DSFIterator::operator!=(param_1,(DSFIterator *)&local_88); std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::~_Deque_base ((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_88); if (cVar1 == '\0') break; pcVar3 = (char *)AST::ASTTree::DSFIterator::operator->(param_1); iVar2 = std::__cxx11::string::compare(pcVar3); if (iVar2 == 0) { /* try { // try from 001147b4 to 00114882 has its CatchHandler @ 0011489c */ AST::ASTTree::DSFIterator::operator++(param_1); AST::ASTTree::DSFIterator::operator++((DSFIterator *)(this + 8)); AST::ASTTree::DSFIterator::operator->(param_1); std::__cxx11::string::_M_assign((string *)local_90); } else { pcVar3 = (char *)AST::ASTTree::DSFIterator::operator->(param_1); iVar2 = std::__cxx11::string::compare(pcVar3); if (iVar2 == 0) { local_f8 = local_e8; uStack_f0 = 0; local_e8[0] = local_e8[0] & 0xffffffffffffff00; local_d8 = local_c8; uStack_d0 = 0; local_c8[0] = local_c8[0] & 0xffffffffffffff00; pNVar4 = (Node *)AST::ASTTree::DSFIterator::get(); AST::ASTTree::DSFIterator::DSFIterator((DSFIterator *)&local_88,pNVar4); serializeProperty(local_98,(DSFIterator *)&local_88,(Property *)&local_f8); std::vector<SEMANTICANALYZER::Property,std::allocator<SEMANTICANALYZER::Property>>:: emplace_back<SEMANTICANALYZER::Property> ((vector<SEMANTICANALYZER::Property,std::allocator<SEMANTICANALYZER::Property>> *) local_a0,(Property *)&local_f8); while( true ) { lVar5 = AST::ASTTree::DSFIterator::get(); lVar6 = AST::ASTTree::DSFIterator::get(); if (lVar5 == lVar6) break; /* try { // try from 001147aa to 001147b1 has its CatchHandler @ 0011489a */ AST::ASTTree::DSFIterator::operator++(param_1); } std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::~_Deque_base ((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_88); if (local_d8 != local_c8) { operator_delete(local_d8,local_c8[0] + 1); } if (local_f8 != local_e8) { operator_delete(local_f8,local_e8[0] + 1); } } } std::deque<AST::Node*,std::allocator<AST::Node*>>::deque ((deque<AST::Node*,std::allocator<AST::Node*>> *)&local_88,(deque *)param_1); AST::ASTTree::DSFIterator::operator++((DSFIterator *)&local_88); local_c8[2] = 0; local_c8[3] = 0; local_c8[0] = 0; local_c8[1] = 0; local_d8 = (ulong *)0x0; uStack_d0 = 0; local_e8[0] = 0; local_e8[1] = 0; local_f8 = (ulong *)0x0; uStack_f0 = 0; std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::_M_initialize_map ((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_f8,0); cVar1 = AST::ASTTree::DSFIterator::operator!=((DSFIterator *)&local_88,(DSFIterator *)&local_f8) ; std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::~_Deque_base ((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_f8); if (cVar1 != '\0') { AST::ASTTree::DSFIterator::operator++((DSFIterator *)(this + 8)); } std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::~_Deque_base ((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_88); AST::ASTTree::DSFIterator::operator++(param_1); } return; }
61,696
common_arg::common_arg(std::initializer_list<char const*> const&, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, int))
monkey531[P]llama/common/arg.h
common_arg( const std::initializer_list<const char *> & args, const char * value_hint, const std::string & help, void (*handler)(common_params & params, int) ) : args(args), value_hint(value_hint), help(help), handler_int(handler) {}
O1
c
common_arg::common_arg(std::initializer_list<char const*> const&, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, int)): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %r14 movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %rbp movq %rdi, %rbx leaq 0x4(%rsp), %rsi movl $0x0, (%rsi) leaq 0x3(%rsp), %rcx leaq 0x2(%rsp), %r8 movl $0x1, %edx callq 0x579ce leaq 0x38(%rbx), %rax xorps %xmm0, %xmm0 movups %xmm0, 0x40(%rbx) movups %xmm0, 0x50(%rbx) movups %xmm0, 0x30(%rbx) movq %rax, 0x48(%rbx) movq %rax, 0x50(%rbx) movq $0x0, 0x58(%rbx) leaq 0x60(%rbx), %r13 movq (%rbp), %rsi movq 0x8(%rbp), %rdx leaq 0x1(%rsp), %rcx movq %r13, %rdi callq 0x57a50 movq %r12, 0x78(%rbx) leaq 0x90(%rbx), %rdi leaq 0xa0(%rbx), %rax xorps %xmm0, %xmm0 movups %xmm0, 0x80(%rbx) movq %rax, 0x90(%rbx) movq (%r15), %rsi movq 0x8(%r15), %rdx addq %rsi, %rdx callq 0x22a70 movb $0x0, 0xb0(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0xb8(%rbx) movq $0x0, 0xc8(%rbx) movq %r14, 0xd0(%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq (%r13), %rdi testq %rdi, %rdi je 0x5444e movq 0x70(%rbx), %rsi subq %rdi, %rsi callq 0x1b8f0 jmp 0x5444e movq %rax, %r14 leaq 0x30(%rbx), %rdi callq 0x57a96 movq %rbx, %rdi callq 0x57a96 movq %r14, %rdi callq 0x1bfd0 nop
_ZN10common_argC2ERKSt16initializer_listIPKcES2_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPFvR13common_paramsiE: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, r8 mov r15, rcx mov r12, rdx mov rbp, rsi mov rbx, rdi lea rsi, [rsp+38h+var_34] mov dword ptr [rsi], 0 lea rcx, [rsp+38h+var_35] lea r8, [rsp+38h+var_36] mov edx, 1 call _ZNSt3setI13llama_exampleSt4lessIS0_ESaIS0_EEC2ESt16initializer_listIS0_ERKS2_RKS3_; std::set<llama_example>::set(std::initializer_list<llama_example>,std::less<llama_example> const&,std::allocator<llama_example> const&) lea rax, [rbx+38h] xorps xmm0, xmm0 movups xmmword ptr [rbx+40h], xmm0 movups xmmword ptr [rbx+50h], xmm0 movups xmmword ptr [rbx+30h], xmm0 mov [rbx+48h], rax mov [rbx+50h], rax mov qword ptr [rbx+58h], 0 lea r13, [rbx+60h] mov rsi, [rbp+0] mov rdx, [rbp+8] lea rcx, [rsp+38h+var_37] mov rdi, r13 call _ZNSt6vectorIPKcSaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<char const*>::vector(std::initializer_list<char const*>,std::allocator<char const*> const&) mov [rbx+78h], r12 lea rdi, [rbx+90h] lea rax, [rbx+0A0h] xorps xmm0, xmm0 movups xmmword ptr [rbx+80h], xmm0 mov [rbx+90h], rax mov rsi, [r15] mov rdx, [r15+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) mov byte ptr [rbx+0B0h], 0 xorps xmm0, xmm0 movups xmmword ptr [rbx+0B8h], xmm0 mov qword ptr [rbx+0C8h], 0 mov [rbx+0D0h], r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, [r13+0]; void * test rdi, rdi jz short loc_5444E mov rsi, [rbx+70h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_5444E mov r14, rax loc_5444E: lea rdi, [rbx+30h] call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree() mov rdi, rbx call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree() mov rdi, r14 call __Unwind_Resume
long long common_arg::common_arg(long long a1, _QWORD *a2, long long a3, long long a4, long long a5) { int v5; // eax long long result; // rax int v10; // [rsp+0h] [rbp-38h] BYREF _DWORD v11[13]; // [rsp+4h] [rbp-34h] BYREF v10 = v5; v11[0] = 0; std::set<llama_example>::set(a1, v11, 1LL, (char *)&v10 + 3, (char *)&v10 + 2); *(_OWORD *)(a1 + 64) = 0LL; *(_OWORD *)(a1 + 80) = 0LL; *(_OWORD *)(a1 + 48) = 0LL; *(_QWORD *)(a1 + 72) = a1 + 56; *(_QWORD *)(a1 + 80) = a1 + 56; *(_QWORD *)(a1 + 88) = 0LL; std::vector<char const*>::vector(a1 + 96, *a2, a2[1], (char *)&v10 + 1); *(_QWORD *)(a1 + 120) = a3; *(_OWORD *)(a1 + 128) = 0LL; *(_QWORD *)(a1 + 144) = a1 + 160; result = std::string::_M_construct<char *>((_QWORD *)(a1 + 144), *(_BYTE **)a4, *(_QWORD *)a4 + *(_QWORD *)(a4 + 8)); *(_BYTE *)(a1 + 176) = 0; *(_OWORD *)(a1 + 184) = 0LL; *(_QWORD *)(a1 + 200) = 0LL; *(_QWORD *)(a1 + 208) = a5; return result; }
common_arg: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,R8 MOV R15,RCX MOV R12,RDX MOV RBP,RSI MOV RBX,RDI LEA RSI,[RSP + 0x4] MOV dword ptr [RSI],0x0 LEA RCX,[RSP + 0x3] LEA R8,[RSP + 0x2] MOV EDX,0x1 CALL 0x001579ce LEA RAX,[RBX + 0x38] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x40],XMM0 MOVUPS xmmword ptr [RBX + 0x50],XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOV qword ptr [RBX + 0x48],RAX MOV qword ptr [RBX + 0x50],RAX MOV qword ptr [RBX + 0x58],0x0 LEA R13,[RBX + 0x60] MOV RSI,qword ptr [RBP] MOV RDX,qword ptr [RBP + 0x8] LAB_001543c0: LEA RCX,[RSP + 0x1] MOV RDI,R13 CALL 0x00157a50 MOV qword ptr [RBX + 0x78],R12 LEA RDI,[RBX + 0x90] LEA RAX,[RBX + 0xa0] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x80],XMM0 MOV qword ptr [RBX + 0x90],RAX MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] ADD RDX,RSI LAB_001543fa: CALL 0x00122a70 LAB_001543ff: MOV byte ptr [RBX + 0xb0],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0xb8],XMM0 MOV qword ptr [RBX + 0xc8],0x0 MOV qword ptr [RBX + 0xd0],R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_arg::common_arg(std::initializer_list<char const*> const&, char const*, std::__cxx11::string const&, void (*)(common_params&, int)) */ void __thiscall common_arg::common_arg (common_arg *this,initializer_list *param_1,char *param_2,string *param_3, _func_void_common_params_ptr_int *param_4) { int4 in_EAX; int8 in_R9; std::set<llama_example,std::less<llama_example>,std::allocator<llama_example>>::set (this,&stack0xffffffffffffffcc,1,&stack0xffffffffffffffcb,&stack0xffffffffffffffca,in_R9 ,in_EAX); *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; *(int8 *)(this + 0x50) = 0; *(int8 *)(this + 0x58) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(common_arg **)(this + 0x48) = this + 0x38; *(common_arg **)(this + 0x50) = this + 0x38; *(int8 *)(this + 0x58) = 0; /* try { // try from 001543c0 to 001543cc has its CatchHandler @ 0015444b */ std::vector<char_const*,std::allocator<char_const*>>::vector ((vector<char_const*,std::allocator<char_const*>> *)(this + 0x60),*(int8 *)param_1 ,*(int8 *)(param_1 + 8),&stack0xffffffffffffffc9); *(char **)(this + 0x78) = param_2; *(int8 *)(this + 0x80) = 0; *(int8 *)(this + 0x88) = 0; *(common_arg **)(this + 0x90) = this + 0xa0; /* try { // try from 001543fa to 001543fe has its CatchHandler @ 00154431 */ std::__cxx11::string::_M_construct<char*> (this + 0x90,*(long *)param_3,*(long *)(param_3 + 8) + *(long *)param_3); this[0xb0] = (common_arg)0x0; *(int8 *)(this + 0xb8) = 0; *(int8 *)(this + 0xc0) = 0; *(int8 *)(this + 200) = 0; *(_func_void_common_params_ptr_int **)(this + 0xd0) = param_4; return; }
61,697
main
eloqsql/storage/maria/unittest/ma_test_loghandler_max_lsn-t.c
int main(int argc __attribute__((unused)), char *argv[]) { ulong i; uchar long_tr_id[6]; PAGECACHE pagecache; LSN lsn, max_lsn, last_lsn= LSN_IMPOSSIBLE; LEX_CUSTRING parts[TRANSLOG_INTERNAL_PARTS + 1]; MY_INIT(argv[0]); plan(2); bzero(&pagecache, sizeof(pagecache)); maria_data_root= create_tmpdir(argv[0]); if (maria_log_remove(0)) exit(1); bzero(long_tr_id, 6); #ifndef DBUG_OFF #if defined(_WIN32) default_dbug_option= "d:t:i:O,\\ma_test_loghandler.trace"; #else default_dbug_option= "d:t:i:o,/tmp/ma_test_loghandler.trace"; #endif if (argc > 1) { DBUG_SET(default_dbug_option); DBUG_SET_INITIAL(default_dbug_option); } #endif if (ma_control_file_open(TRUE, TRUE, TRUE)) { fprintf(stderr, "Can't init control file (%d)\n", errno); exit(1); } if (init_pagecache(&pagecache, PCACHE_SIZE, 0, 0, PCACHE_PAGE, 0, 0) == 0) { fprintf(stderr, "Got error: init_pagecache() (errno: %d)\n", errno); exit(1); } if (translog_init_with_table(maria_data_root, LOG_FILE_SIZE, 50112, 0, &pagecache, LOG_FLAGS, 0, &translog_example_table_init, 0)) { fprintf(stderr, "Can't init loghandler (%d)\n", errno); exit(1); } /* Suppressing of automatic record writing */ dummy_transaction_object.first_undo_lsn|= TRANSACTION_LOGGED_LONG_ID; max_lsn= translog_get_file_max_lsn_stored(1); if (max_lsn == 1) { fprintf(stderr, "Error reading the first log file."); translog_destroy(); exit(1); } if (max_lsn != LSN_IMPOSSIBLE) { fprintf(stderr, "Incorrect first lsn response " LSN_FMT ".", LSN_IN_PARTS(max_lsn)); translog_destroy(); exit(1); } ok(1, "Empty log response"); /* write more then 1 file */ int4store(long_tr_id, 0); parts[TRANSLOG_INTERNAL_PARTS + 0].str= long_tr_id; parts[TRANSLOG_INTERNAL_PARTS + 0].length= 6; for(i= 0; i < LOG_FILE_SIZE/6; i++) { if (translog_write_record(&lsn, LOGREC_FIXED_RECORD_0LSN_EXAMPLE, &dummy_transaction_object, NULL, 6, TRANSLOG_INTERNAL_PARTS + 1, parts, NULL, NULL)) { fprintf(stderr, "Can't write record #%lu\n", (ulong) 0); translog_destroy(); exit(1); } if (LSN_FILE_NO(lsn) == 1) last_lsn= lsn; } max_lsn= translog_get_file_max_lsn_stored(1); if (max_lsn == 1) { fprintf(stderr, "Error reading the first log file\n"); translog_destroy(); exit(1); } if (max_lsn == LSN_IMPOSSIBLE) { fprintf(stderr, "Isn't first file still finished?!!\n"); translog_destroy(); exit(1); } if (max_lsn != last_lsn) { fprintf(stderr, "Incorrect max lsn: " LSN_FMT " " " last lsn on first file: " LSN_FMT "\n", LSN_IN_PARTS(max_lsn), LSN_IN_PARTS(last_lsn)); translog_destroy(); exit(1); } ok(1, "First file max LSN"); translog_destroy(); end_pagecache(&pagecache, 1); ma_control_file_end(); if (maria_log_remove(maria_data_root)) exit(1); my_uuid_end(); my_free_open_file_info(); my_end(0); exit(0); }
O0
c
main: pushq %rbp movq %rsp, %rbp subq $0x2d0, %rsp # imm = 0x2D0 movl $0x0, -0x4(%rbp) movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq $0x0, -0x258(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx leaq 0xc57b8e(%rip), %rax # 0xc82660 movq %rcx, (%rax) callq 0xf26e0 movl $0x2, %edi callq 0xd9a00 leaq -0x240(%rbp), %rdi xorl %esi, %esi movl $0x220, %edx # imm = 0x220 callq 0x2a2a0 movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x2b740 movq %rax, %rcx leaq 0x44ccf3(%rip), %rax # 0x477800 movq %rcx, (%rax) xorl %eax, %eax movl %eax, %edi callq 0x2b400 cmpb $0x0, %al je 0x2ab27 movl $0x1, %edi callq 0x2a500 leaq -0x1e(%rbp), %rdi xorl %esi, %esi movl $0x6, %edx callq 0x2a2a0 movl $0x1, %edx movl %edx, %edi movl %edx, %esi callq 0x2b960 cmpl $0x0, %eax je 0x2ab81 movq 0x292487(%rip), %rax # 0x2bcfd8 movq (%rax), %rax movq %rax, -0x2a0(%rbp) callq 0x2a740 movq -0x2a0(%rbp), %rdi movl (%rax), %edx leaq 0x1264a8(%rip), %rsi # 0x151018 movb $0x0, %al callq 0x2a160 movl $0x1, %edi callq 0x2a500 leaq -0x240(%rbp), %rdi movl $0xa00000, %esi # imm = 0xA00000 xorl %r9d, %r9d movl $0x2000, %r8d # imm = 0x2000 xorl %eax, %eax movl %r9d, %edx movl %r9d, %ecx movq $0x0, (%rsp) callq 0x3b2a0 cmpq $0x0, %rax jne 0x2abe8 movq 0x292420(%rip), %rax # 0x2bcfd8 movq (%rax), %rax movq %rax, -0x2a8(%rbp) callq 0x2a740 movq -0x2a8(%rbp), %rdi movl (%rax), %edx leaq 0x12645f(%rip), %rsi # 0x151036 movb $0x0, %al callq 0x2a160 movl $0x1, %edi callq 0x2a500 leaq 0x44cc11(%rip), %rax # 0x477800 movq (%rax), %rdi movl $0x800000, %esi # imm = 0x800000 movl $0xc3c0, %edx # imm = 0xC3C0 xorl %r9d, %r9d leaq -0x240(%rbp), %r8 leaq 0xc43(%rip), %rax # 0x2b850 movl %r9d, %ecx movl $0x0, (%rsp) movq %rax, 0x8(%rsp) movl $0x0, 0x10(%rsp) callq 0x2e2a0 cmpb $0x0, %al je 0x2ac64 movq 0x2923a4(%rip), %rax # 0x2bcfd8 movq (%rax), %rax movq %rax, -0x2b0(%rbp) callq 0x2a740 movq -0x2b0(%rbp), %rdi movl (%rax), %edx leaq 0x12640c(%rip), %rsi # 0x15105f movb $0x0, %al callq 0x2a160 movl $0x1, %edi callq 0x2a500 leaq 0x44cc15(%rip), %rax # 0x477880 movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 orq 0xa0(%rax), %rcx leaq 0x44cbfd(%rip), %rax # 0x477880 movq %rcx, 0xa0(%rax) movl $0x1, %edi callq 0x2da40 movq %rax, -0x250(%rbp) cmpq $0x1, -0x250(%rbp) jne 0x2acce movq 0x29232c(%rip), %rax # 0x2bcfd8 movq (%rax), %rdi leaq 0x1263c5(%rip), %rsi # 0x15107b movb $0x0, %al callq 0x2a160 movb $0x0, %al callq 0x31810 movl $0x1, %edi callq 0x2a500 cmpq $0x0, -0x250(%rbp) je 0x2ad21 movq 0x2922f9(%rip), %rax # 0x2bcfd8 movq (%rax), %rdi movq -0x250(%rbp), %rax sarq $0x20, %rax movl %eax, %edx movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq -0x250(%rbp), %rax movl %eax, %ecx leaq 0x126394(%rip), %rsi # 0x15109d movb $0x0, %al callq 0x2a160 movb $0x0, %al callq 0x31810 movl $0x1, %edi callq 0x2a500 movl $0x1, %edi leaq 0x126398(%rip), %rsi # 0x1510c5 movb $0x0, %al callq 0xd9bf0 leaq -0x1e(%rbp), %rax movq %rax, -0x298(%rbp) movq -0x298(%rbp), %rax movl $0x0, (%rax) leaq -0x1e(%rbp), %rax movq %rax, -0x270(%rbp) movq $0x6, -0x268(%rbp) movq $0x0, -0x18(%rbp) cmpq $0x155555, -0x18(%rbp) # imm = 0x155555 jae 0x2ae1d leaq -0x290(%rbp), %rax leaq -0x248(%rbp), %rdi movl $0x1, %esi leaq 0x44caee(%rip), %rdx # 0x477880 xorl %ecx, %ecx movl $0x6, %r8d movl $0x3, %r9d movq %rax, (%rsp) movq $0x0, 0x8(%rsp) movq $0x0, 0x10(%rsp) callq 0x31e30 cmpb $0x0, %al je 0x2adec movq 0x292212(%rip), %rax # 0x2bcfd8 movq (%rax), %rdi leaq 0x126308(%rip), %rsi # 0x1510d8 xorl %eax, %eax movl %eax, %edx movb $0x0, %al callq 0x2a160 movb $0x0, %al callq 0x31810 movl $0x1, %edi callq 0x2a500 movq -0x248(%rbp), %rax sarq $0x20, %rax cmpl $0x1, %eax jne 0x2ae0a movq -0x248(%rbp), %rax movq %rax, -0x258(%rbp) jmp 0x2ae0c movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) jmp 0x2ad6a movl $0x1, %edi callq 0x2da40 movq %rax, -0x250(%rbp) cmpq $0x1, -0x250(%rbp) jne 0x2ae61 movq 0x292199(%rip), %rax # 0x2bcfd8 movq (%rax), %rdi leaq 0x1262a8(%rip), %rsi # 0x1510f1 movb $0x0, %al callq 0x2a160 movb $0x0, %al callq 0x31810 movl $0x1, %edi callq 0x2a500 cmpq $0x0, -0x250(%rbp) jne 0x2ae94 movq 0x292166(%rip), %rax # 0x2bcfd8 movq (%rax), %rdi leaq 0x126297(%rip), %rsi # 0x151113 movb $0x0, %al callq 0x2a160 movb $0x0, %al callq 0x31810 movl $0x1, %edi callq 0x2a500 movq -0x250(%rbp), %rax cmpq -0x258(%rbp), %rax je 0x2af0f movq 0x29212d(%rip), %rax # 0x2bcfd8 movq (%rax), %rdi movq -0x250(%rbp), %rax sarq $0x20, %rax movl %eax, %edx movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq -0x250(%rbp), %rax movl %eax, %ecx movq -0x258(%rbp), %rax sarq $0x20, %rax movl %eax, %r8d movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq -0x258(%rbp), %rax movl %eax, %r9d leaq 0x126240(%rip), %rsi # 0x151137 movb $0x0, %al callq 0x2a160 movb $0x0, %al callq 0x31810 movl $0x1, %edi callq 0x2a500 movl $0x1, %edi leaq 0x12625e(%rip), %rsi # 0x151179 movb $0x0, %al callq 0xd9bf0 movb $0x0, %al callq 0x31810 leaq -0x240(%rbp), %rdi movl $0x1, %esi callq 0x3bc10 callq 0x2c5e0 leaq 0x44c8ba(%rip), %rax # 0x477800 movq (%rax), %rdi callq 0x2b400 cmpb $0x0, %al je 0x2af5c movl $0x1, %edi callq 0x2a500 callq 0xff360 callq 0xeffd0 xorl %edi, %edi callq 0xf2920 xorl %edi, %edi callq 0x2a500 nopw %cs:(%rax,%rax)
main: push rbp mov rbp, rsp sub rsp, 2D0h mov [rbp+var_4], 0 mov [rbp+var_8], edi mov [rbp+var_10], rsi mov [rbp+var_258], 0 mov rax, [rbp+var_10] mov rcx, [rax] lea rax, my_progname mov [rax], rcx call my_init mov edi, 2 call plan lea rdi, [rbp+var_240] xor esi, esi mov edx, 220h call _memset mov rax, [rbp+var_10] mov rdi, [rax] call create_tmpdir mov rcx, rax lea rax, maria_data_root mov [rax], rcx xor eax, eax mov edi, eax call maria_log_remove cmp al, 0 jz short loc_2AB27 mov edi, 1 call _exit loc_2AB27: lea rdi, [rbp+var_1E] xor esi, esi mov edx, 6 call _memset mov edx, 1 mov edi, edx mov esi, edx call ma_control_file_open cmp eax, 0 jz short loc_2AB81 mov rax, cs:stderr_ptr mov rax, [rax] mov [rbp+var_2A0], rax call ___errno_location mov rdi, [rbp+var_2A0] mov edx, [rax] lea rsi, aCanTInitContro; "Can't init control file (%d)\n" mov al, 0 call _fprintf mov edi, 1 call _exit loc_2AB81: lea rdi, [rbp+var_240] mov esi, offset unk_A00000 xor r9d, r9d mov r8d, 2000h xor eax, eax mov edx, r9d mov ecx, r9d mov [rsp+2D0h+var_2D0], 0 call init_pagecache cmp rax, 0 jnz short loc_2ABE8 mov rax, cs:stderr_ptr mov rax, [rax] mov [rbp+var_2A8], rax call ___errno_location mov rdi, [rbp+var_2A8] mov edx, [rax] lea rsi, aGotErrorInitPa; "Got error: init_pagecache() (errno: %d)"... mov al, 0 call _fprintf mov edi, 1 call _exit loc_2ABE8: lea rax, maria_data_root mov rdi, [rax] mov esi, offset unk_800000 mov edx, 0C3C0h xor r9d, r9d lea r8, [rbp+var_240] lea rax, translog_example_table_init mov ecx, r9d mov dword ptr [rsp+2D0h+var_2D0], 0 mov [rsp+2D0h+var_2C8], rax mov dword ptr [rsp+2D0h+var_2C0], 0 call translog_init_with_table cmp al, 0 jz short loc_2AC64 mov rax, cs:stderr_ptr mov rax, [rax] mov [rbp+var_2B0], rax call ___errno_location mov rdi, [rbp+var_2B0] mov edx, [rax] lea rsi, aCanTInitLoghan; "Can't init loghandler (%d)\n" mov al, 0 call _fprintf mov edi, 1 call _exit loc_2AC64: lea rax, dummy_transaction_object mov rcx, 8000000000000000h or rcx, [rax+0A0h] lea rax, dummy_transaction_object mov [rax+0A0h], rcx mov edi, 1 call translog_get_file_max_lsn_stored mov [rbp+var_250], rax cmp [rbp+var_250], 1 jnz short loc_2ACCE mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aErrorReadingTh; "Error reading the first log file." mov al, 0 call _fprintf mov al, 0 call translog_destroy mov edi, 1 call _exit loc_2ACCE: cmp [rbp+var_250], 0 jz short loc_2AD21 mov rax, cs:stderr_ptr mov rdi, [rax] mov rax, [rbp+var_250] sar rax, 20h mov edx, eax mov rax, 0FFFFFFFFh and rax, [rbp+var_250] mov ecx, eax lea rsi, aIncorrectFirst; "Incorrect first lsn response (%u,0x%x)." mov al, 0 call _fprintf mov al, 0 call translog_destroy mov edi, 1 call _exit loc_2AD21: mov edi, 1 lea rsi, aEmptyLogRespon; "Empty log response" mov al, 0 call ok lea rax, [rbp+var_1E] mov [rbp+var_298], rax mov rax, [rbp+var_298] mov dword ptr [rax], 0 lea rax, [rbp+var_1E] mov [rbp+var_270], rax mov [rbp+var_268], 6 mov [rbp+var_18], 0 loc_2AD6A: cmp [rbp+var_18], (offset aKoi8uBin+7); "in" jnb loc_2AE1D lea rax, [rbp+var_290] lea rdi, [rbp+var_248] mov esi, 1 lea rdx, dummy_transaction_object xor ecx, ecx mov r8d, 6 mov r9d, 3 mov [rsp+2D0h+var_2D0], rax mov [rsp+2D0h+var_2C8], 0 mov [rsp+2D0h+var_2C0], 0 call translog_write_record cmp al, 0 jz short loc_2ADEC mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aCanTWriteRecor; "Can't write record #%lu\n" xor eax, eax mov edx, eax mov al, 0 call _fprintf mov al, 0 call translog_destroy mov edi, 1 call _exit loc_2ADEC: mov rax, [rbp+var_248] sar rax, 20h cmp eax, 1 jnz short loc_2AE0A mov rax, [rbp+var_248] mov [rbp+var_258], rax loc_2AE0A: jmp short $+2 loc_2AE0C: mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax jmp loc_2AD6A loc_2AE1D: mov edi, 1 call translog_get_file_max_lsn_stored mov [rbp+var_250], rax cmp [rbp+var_250], 1 jnz short loc_2AE61 mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aErrorReadingTh_0; "Error reading the first log file\n" mov al, 0 call _fprintf mov al, 0 call translog_destroy mov edi, 1 call _exit loc_2AE61: cmp [rbp+var_250], 0 jnz short loc_2AE94 mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aIsnTFirstFileS; "Isn't first file still finished?!!\n" mov al, 0 call _fprintf mov al, 0 call translog_destroy mov edi, 1 call _exit loc_2AE94: mov rax, [rbp+var_250] cmp rax, [rbp+var_258] jz short loc_2AF0F mov rax, cs:stderr_ptr mov rdi, [rax] mov rax, [rbp+var_250] sar rax, 20h mov edx, eax mov rax, 0FFFFFFFFh and rax, [rbp+var_250] mov ecx, eax mov rax, [rbp+var_258] sar rax, 20h mov r8d, eax mov rax, 0FFFFFFFFh and rax, [rbp+var_258] mov r9d, eax lea rsi, aIncorrectMaxLs; "Incorrect max lsn: (%u,0x%x) last lsn"... mov al, 0 call _fprintf mov al, 0 call translog_destroy mov edi, 1 call _exit loc_2AF0F: mov edi, 1 lea rsi, aFirstFileMaxLs; "First file max LSN" mov al, 0 call ok mov al, 0 call translog_destroy lea rdi, [rbp+var_240] mov esi, 1 call end_pagecache call ma_control_file_end lea rax, maria_data_root mov rdi, [rax] call maria_log_remove cmp al, 0 jz short loc_2AF5C mov edi, 1 call _exit loc_2AF5C: call my_uuid_end call my_free_open_file_info xor edi, edi call my_end xor edi, edi call _exit
int __noreturn main(int argc, const char **argv, const char **envp) { _DWORD *v3; // rax _DWORD *v4; // rax _DWORD *v5; // rax int v6; // edx int v7; // ecx int v8; // r8d int v9; // r9d int v10; // edx int v11; // ecx int v12; // r8d int v13; // r9d char v14; // [rsp+0h] [rbp-2D0h] char v15; // [rsp+0h] [rbp-2D0h] long long v16; // [rsp+20h] [rbp-2B0h] long long v17; // [rsp+28h] [rbp-2A8h] long long v18; // [rsp+30h] [rbp-2A0h] _BYTE v19[32]; // [rsp+40h] [rbp-290h] BYREF int *v20; // [rsp+60h] [rbp-270h] long long v21; // [rsp+68h] [rbp-268h] long long v22; // [rsp+78h] [rbp-258h] long long file_max_lsn_stored; // [rsp+80h] [rbp-250h] long long v24; // [rsp+88h] [rbp-248h] BYREF _BYTE v25[546]; // [rsp+90h] [rbp-240h] BYREF int v26; // [rsp+2B2h] [rbp-1Eh] BYREF unsigned long long i; // [rsp+2B8h] [rbp-18h] const char **v28; // [rsp+2C0h] [rbp-10h] int v29; // [rsp+2C8h] [rbp-8h] int v30; // [rsp+2CCh] [rbp-4h] v30 = 0; v29 = argc; v28 = argv; v22 = 0LL; my_progname = *argv; my_init(argc, argv, envp); plan(2LL); memset(v25, 0LL, 544LL); *(_QWORD *)&maria_data_root = create_tmpdir(*v28); if ( (unsigned __int8)maria_log_remove(0LL) ) exit(1LL); memset(&v26, 0LL, 6LL); if ( (unsigned int)ma_control_file_open(1LL, 1LL) ) { v18 = stderr; v3 = (_DWORD *)__errno_location(); fprintf(v18, "Can't init control file (%d)\n", *v3); exit(1LL); } if ( !init_pagecache((unsigned int)v25, (unsigned int)&unk_A00000, 0, 0, 0x2000, 0, 0LL) ) { v17 = stderr; v4 = (_DWORD *)__errno_location(); fprintf(v17, "Got error: init_pagecache() (errno: %d)\n", *v4); exit(1LL); } if ( (unsigned __int8)translog_init_with_table( maria_data_root, (unsigned int)&unk_800000, 50112, 0, (unsigned int)v25, 0, 0, (long long)translog_example_table_init, 0) ) { v16 = stderr; v5 = (_DWORD *)__errno_location(); fprintf(v16, "Can't init loghandler (%d)\n", *v5); exit(1LL); } dummy_transaction_object[20] |= 0x8000000000000000LL; file_max_lsn_stored = translog_get_file_max_lsn_stored(1LL); if ( file_max_lsn_stored == 1 ) { fprintf(stderr, "Error reading the first log file."); translog_destroy(); exit(1LL); } if ( file_max_lsn_stored ) { fprintf(stderr, "Incorrect first lsn response (%u,0x%x).", HIDWORD(file_max_lsn_stored), file_max_lsn_stored); translog_destroy(); exit(1LL); } ok(1, (unsigned int)"Empty log response", v6, v7, v8, v9, v14); v26 = 0; v20 = &v26; v21 = 6LL; for ( i = 0LL; i < (unsigned long long)"in"; ++i ) { if ( (unsigned __int8)translog_write_record( (unsigned int)&v24, 1, (unsigned int)dummy_transaction_object, 0, 6, 3, (long long)v19, 0LL, 0LL) ) { fprintf(stderr, "Can't write record #%lu\n", 0LL); translog_destroy(); exit(1LL); } if ( HIDWORD(v24) == 1 ) v22 = v24; } file_max_lsn_stored = translog_get_file_max_lsn_stored(1LL); if ( file_max_lsn_stored == 1 ) { fprintf(stderr, "Error reading the first log file\n"); translog_destroy(); exit(1LL); } if ( !file_max_lsn_stored ) { fprintf(stderr, "Isn't first file still finished?!!\n"); translog_destroy(); exit(1LL); } if ( file_max_lsn_stored != v22 ) { fprintf( stderr, "Incorrect max lsn: (%u,0x%x) last lsn on first file: (%u,0x%x)\n", HIDWORD(file_max_lsn_stored), file_max_lsn_stored, HIDWORD(v22), v22); translog_destroy(); exit(1LL); } ok(1, (unsigned int)"First file max LSN", v10, v11, v12, v13, v15); translog_destroy(); end_pagecache(v25, 1LL); ma_control_file_end(); if ( (unsigned __int8)maria_log_remove(*(_QWORD *)&maria_data_root) ) exit(1LL); my_uuid_end(); my_free_open_file_info(); my_end(0LL); exit(0LL); }
main: PUSH RBP MOV RBP,RSP SUB RSP,0x2d0 MOV dword ptr [RBP + -0x4],0x0 MOV dword ptr [RBP + -0x8],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x258],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] LEA RAX,[0xd82660] MOV qword ptr [RAX],RCX CALL 0x001f26e0 MOV EDI,0x2 CALL 0x001d9a00 LEA RDI,[RBP + -0x240] XOR ESI,ESI MOV EDX,0x220 CALL 0x0012a2a0 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x0012b740 MOV RCX,RAX LEA RAX,[0x577800] MOV qword ptr [RAX],RCX XOR EAX,EAX MOV EDI,EAX CALL 0x0012b400 CMP AL,0x0 JZ 0x0012ab27 MOV EDI,0x1 CALL 0x0012a500 LAB_0012ab27: LEA RDI,[RBP + -0x1e] XOR ESI,ESI MOV EDX,0x6 CALL 0x0012a2a0 MOV EDX,0x1 MOV EDI,EDX MOV ESI,EDX CALL 0x0012b960 CMP EAX,0x0 JZ 0x0012ab81 MOV RAX,qword ptr [0x003bcfd8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x2a0],RAX CALL 0x0012a740 MOV RDI,qword ptr [RBP + -0x2a0] MOV EDX,dword ptr [RAX] LEA RSI,[0x251018] MOV AL,0x0 CALL 0x0012a160 MOV EDI,0x1 CALL 0x0012a500 LAB_0012ab81: LEA RDI,[RBP + -0x240] MOV ESI,0xa00000 XOR R9D,R9D MOV R8D,0x2000 XOR EAX,EAX MOV EDX,R9D MOV ECX,R9D MOV qword ptr [RSP],0x0 CALL 0x0013b2a0 CMP RAX,0x0 JNZ 0x0012abe8 MOV RAX,qword ptr [0x003bcfd8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x2a8],RAX CALL 0x0012a740 MOV RDI,qword ptr [RBP + -0x2a8] MOV EDX,dword ptr [RAX] LEA RSI,[0x251036] MOV AL,0x0 CALL 0x0012a160 MOV EDI,0x1 CALL 0x0012a500 LAB_0012abe8: LEA RAX,[0x577800] MOV RDI,qword ptr [RAX] MOV ESI,0x800000 MOV EDX,0xc3c0 XOR R9D,R9D LEA R8,[RBP + -0x240] LEA RAX,[0x12b850] MOV ECX,R9D MOV dword ptr [RSP],0x0 MOV qword ptr [RSP + 0x8],RAX MOV dword ptr [RSP + 0x10],0x0 CALL 0x0012e2a0 CMP AL,0x0 JZ 0x0012ac64 MOV RAX,qword ptr [0x003bcfd8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x2b0],RAX CALL 0x0012a740 MOV RDI,qword ptr [RBP + -0x2b0] MOV EDX,dword ptr [RAX] LEA RSI,[0x25105f] MOV AL,0x0 CALL 0x0012a160 MOV EDI,0x1 CALL 0x0012a500 LAB_0012ac64: LEA RAX,[0x577880] MOV RCX,-0x8000000000000000 OR RCX,qword ptr [RAX + 0xa0] LEA RAX,[0x577880] MOV qword ptr [RAX + 0xa0],RCX MOV EDI,0x1 CALL 0x0012da40 MOV qword ptr [RBP + -0x250],RAX CMP qword ptr [RBP + -0x250],0x1 JNZ 0x0012acce MOV RAX,qword ptr [0x003bcfd8] MOV RDI,qword ptr [RAX] LEA RSI,[0x25107b] MOV AL,0x0 CALL 0x0012a160 MOV AL,0x0 CALL 0x00131810 MOV EDI,0x1 CALL 0x0012a500 LAB_0012acce: CMP qword ptr [RBP + -0x250],0x0 JZ 0x0012ad21 MOV RAX,qword ptr [0x003bcfd8] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x250] SAR RAX,0x20 MOV EDX,EAX MOV RAX,0xffffffff AND RAX,qword ptr [RBP + -0x250] MOV ECX,EAX LEA RSI,[0x25109d] MOV AL,0x0 CALL 0x0012a160 MOV AL,0x0 CALL 0x00131810 MOV EDI,0x1 CALL 0x0012a500 LAB_0012ad21: MOV EDI,0x1 LEA RSI,[0x2510c5] MOV AL,0x0 CALL 0x001d9bf0 LEA RAX,[RBP + -0x1e] MOV qword ptr [RBP + -0x298],RAX MOV RAX,qword ptr [RBP + -0x298] MOV dword ptr [RAX],0x0 LEA RAX,[RBP + -0x1e] MOV qword ptr [RBP + -0x270],RAX MOV qword ptr [RBP + -0x268],0x6 MOV qword ptr [RBP + -0x18],0x0 LAB_0012ad6a: CMP qword ptr [RBP + -0x18],0x155555 JNC 0x0012ae1d LEA RAX,[RBP + -0x290] LEA RDI,[RBP + -0x248] MOV ESI,0x1 LEA RDX,[0x577880] XOR ECX,ECX MOV R8D,0x6 MOV R9D,0x3 MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x8],0x0 MOV qword ptr [RSP + 0x10],0x0 CALL 0x00131e30 CMP AL,0x0 JZ 0x0012adec MOV RAX,qword ptr [0x003bcfd8] MOV RDI,qword ptr [RAX] LEA RSI,[0x2510d8] XOR EAX,EAX MOV EDX,EAX MOV AL,0x0 CALL 0x0012a160 MOV AL,0x0 CALL 0x00131810 MOV EDI,0x1 CALL 0x0012a500 LAB_0012adec: MOV RAX,qword ptr [RBP + -0x248] SAR RAX,0x20 CMP EAX,0x1 JNZ 0x0012ae0a MOV RAX,qword ptr [RBP + -0x248] MOV qword ptr [RBP + -0x258],RAX LAB_0012ae0a: JMP 0x0012ae0c LAB_0012ae0c: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x0012ad6a LAB_0012ae1d: MOV EDI,0x1 CALL 0x0012da40 MOV qword ptr [RBP + -0x250],RAX CMP qword ptr [RBP + -0x250],0x1 JNZ 0x0012ae61 MOV RAX,qword ptr [0x003bcfd8] MOV RDI,qword ptr [RAX] LEA RSI,[0x2510f1] MOV AL,0x0 CALL 0x0012a160 MOV AL,0x0 CALL 0x00131810 MOV EDI,0x1 CALL 0x0012a500 LAB_0012ae61: CMP qword ptr [RBP + -0x250],0x0 JNZ 0x0012ae94 MOV RAX,qword ptr [0x003bcfd8] MOV RDI,qword ptr [RAX] LEA RSI,[0x251113] MOV AL,0x0 CALL 0x0012a160 MOV AL,0x0 CALL 0x00131810 MOV EDI,0x1 CALL 0x0012a500 LAB_0012ae94: MOV RAX,qword ptr [RBP + -0x250] CMP RAX,qword ptr [RBP + -0x258] JZ 0x0012af0f MOV RAX,qword ptr [0x003bcfd8] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x250] SAR RAX,0x20 MOV EDX,EAX MOV RAX,0xffffffff AND RAX,qword ptr [RBP + -0x250] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x258] SAR RAX,0x20 MOV R8D,EAX MOV RAX,0xffffffff AND RAX,qword ptr [RBP + -0x258] MOV R9D,EAX LEA RSI,[0x251137] MOV AL,0x0 CALL 0x0012a160 MOV AL,0x0 CALL 0x00131810 MOV EDI,0x1 CALL 0x0012a500 LAB_0012af0f: MOV EDI,0x1 LEA RSI,[0x251179] MOV AL,0x0 CALL 0x001d9bf0 MOV AL,0x0 CALL 0x00131810 LEA RDI,[RBP + -0x240] MOV ESI,0x1 CALL 0x0013bc10 CALL 0x0012c5e0 LEA RAX,[0x577800] MOV RDI,qword ptr [RAX] CALL 0x0012b400 CMP AL,0x0 JZ 0x0012af5c MOV EDI,0x1 CALL 0x0012a500 LAB_0012af5c: CALL 0x001ff360 CALL 0x001effd0 XOR EDI,EDI CALL 0x001f2920 XOR EDI,EDI CALL 0x0012a500
void main(int4 param_1,int8 *param_2) { FILE *pFVar1; char cVar2; int iVar3; uint *puVar4; long lVar5; ulong uVar6; int8 in_stack_fffffffffffffd38; uint uVar7; int1 local_298 [32]; int4 *local_278; int8 local_270; ulong local_260; ulong local_258; ulong local_250; int1 local_248 [546]; int4 local_26; ulong local_20; int8 *local_18; int4 local_10; int4 local_c; uVar7 = (uint)((ulong)in_stack_fffffffffffffd38 >> 0x20); local_c = 0; local_260 = 0; my_progname = *param_2; local_18 = param_2; local_10 = param_1; my_init(); plan(2); memset(local_248,0,0x220); maria_data_root = create_tmpdir(*local_18); cVar2 = maria_log_remove(0); if (cVar2 != '\0') { /* WARNING: Subroutine does not return */ exit(1); } memset(&local_26,0,6); iVar3 = ma_control_file_open(1,1); if (iVar3 != 0) { pFVar1 = *(FILE **)PTR_stderr_003bcfd8; puVar4 = (uint *)__errno_location(); fprintf(pFVar1,"Can\'t init control file (%d)\n",(ulong)*puVar4); /* WARNING: Subroutine does not return */ exit(1); } uVar6 = 0; lVar5 = init_pagecache(local_248,&DAT_00a00000,0,0,0x2000,0,0); if (lVar5 == 0) { pFVar1 = *(FILE **)PTR_stderr_003bcfd8; puVar4 = (uint *)__errno_location(); fprintf(pFVar1,"Got error: init_pagecache() (errno: %d)\n",(ulong)*puVar4); /* WARNING: Subroutine does not return */ exit(1); } cVar2 = translog_init_with_table (maria_data_root,0x800000,0xc3c0,0,local_248,0,uVar6 & 0xffffffff00000000, translog_example_table_init,(ulong)uVar7 << 0x20); if (cVar2 != '\0') { pFVar1 = *(FILE **)PTR_stderr_003bcfd8; puVar4 = (uint *)__errno_location(); fprintf(pFVar1,"Can\'t init loghandler (%d)\n",(ulong)*puVar4); /* WARNING: Subroutine does not return */ exit(1); } dummy_transaction_object._160_8_ = dummy_transaction_object._160_8_ | 0x8000000000000000; local_258 = translog_get_file_max_lsn_stored(1); if (local_258 == 1) { fprintf(*(FILE **)PTR_stderr_003bcfd8,"Error reading the first log file."); translog_destroy(); /* WARNING: Subroutine does not return */ exit(1); } if (local_258 != 0) { fprintf(*(FILE **)PTR_stderr_003bcfd8,"Incorrect first lsn response (%u,0x%x).", (long)local_258 >> 0x20 & 0xffffffff,local_258 & 0xffffffff); translog_destroy(); /* WARNING: Subroutine does not return */ exit(1); } ok(1,"Empty log response"); local_26 = 0; local_278 = &local_26; local_270 = 6; for (local_20 = 0; local_20 < 0x155555; local_20 = local_20 + 1) { cVar2 = translog_write_record(&local_250,1,dummy_transaction_object,0,6,3,local_298,0,0); if (cVar2 != '\0') { fprintf(*(FILE **)PTR_stderr_003bcfd8,"Can\'t write record #%lu\n",0); translog_destroy(); /* WARNING: Subroutine does not return */ exit(1); } if ((int)(local_250 >> 0x20) == 1) { local_260 = local_250; } } local_258 = translog_get_file_max_lsn_stored(1); if (local_258 == 1) { fprintf(*(FILE **)PTR_stderr_003bcfd8,"Error reading the first log file\n"); translog_destroy(); /* WARNING: Subroutine does not return */ exit(1); } if (local_258 == 0) { fprintf(*(FILE **)PTR_stderr_003bcfd8,"Isn\'t first file still finished?!!\n"); translog_destroy(); /* WARNING: Subroutine does not return */ exit(1); } if (local_258 != local_260) { fprintf(*(FILE **)PTR_stderr_003bcfd8, "Incorrect max lsn: (%u,0x%x) last lsn on first file: (%u,0x%x)\n", (long)local_258 >> 0x20 & 0xffffffff,local_258 & 0xffffffff, (long)local_260 >> 0x20 & 0xffffffff,local_260 & 0xffffffff); translog_destroy(); /* WARNING: Subroutine does not return */ exit(1); } ok(1,"First file max LSN"); translog_destroy(); end_pagecache(local_248,1); ma_control_file_end(); cVar2 = maria_log_remove(); if (cVar2 != '\0') { /* WARNING: Subroutine does not return */ exit(1); } my_uuid_end(); my_free_open_file_info(); my_end(); /* WARNING: Subroutine does not return */ exit(0); }
61,698
Dimension::remove_chunk(glm::vec<3, int, (glm::qualifier)0> const&)
untodesu[P]voxelius/game/shared/dimension.cc
void Dimension::remove_chunk(const chunk_pos &cpos) { auto it = m_chunkmap.find(cpos); if(it != m_chunkmap.cend()) { chunks.destroy(it->second->get_entity()); m_chunkmap.erase(it); } }
O3
cpp
Dimension::remove_chunk(glm::vec<3, int, (glm::qualifier)0> const&): pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdi, %r14 leaq 0x2c8(%rdi), %rbx movq %rbx, %rdi callq 0x3c126 cmpl 0x2e8(%r14), %eax je 0x3b046 cltq movq 0x2d0(%r14), %rcx leaq (%rax,%rax,2), %rax leaq (%rcx,%rax,8), %r15 addq $0x8, %r14 movq 0x10(%r15), %rdi callq 0x37198 movq %r14, %rdi movl %eax, %esi callq 0x2ab9e leaq 0x8(%rsp), %rsi movq %r15, (%rsi) movq %rbx, %rdi callq 0x3b458 addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq
_ZN9Dimension12remove_chunkERKN3glm3vecILi3EiLNS0_9qualifierE0EEE: push r15 push r14 push rbx sub rsp, 10h mov r14, rdi lea rbx, [rdi+2C8h] mov rdi, rbx call _ZNK7emhash87HashMapIN3glm3vecILi3EiLNS1_9qualifierE0EEEP5ChunkSt4hashIS4_ESt8equal_toIS4_EE16find_filled_slotIS4_EEjRKT_; emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk *,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>::find_filled_slot<glm::vec<3,int,(glm::qualifier)0>>(glm::vec<3,int,(glm::qualifier)0> const&) cmp eax, [r14+2E8h] jz short loc_3B046 cdqe mov rcx, [r14+2D0h] lea rax, [rax+rax*2] lea r15, [rcx+rax*8] add r14, 8 mov rdi, [r15+10h]; this call _ZNK5Chunk10get_entityEv; Chunk::get_entity(void) mov rdi, r14 mov esi, eax call _ZN4entt14basic_registryINS_6entityESaIS1_EE7destroyES1_; entt::basic_registry<entt::entity,std::allocator<entt::entity>>::destroy(entt::entity) lea rsi, [rsp+28h+var_20] mov [rsi], r15 mov rdi, rbx call _ZN7emhash87HashMapIN3glm3vecILi3EiLNS1_9qualifierE0EEEP5ChunkSt4hashIS4_ESt8equal_toIS4_EE5eraseERKNSB_14const_iteratorE; emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk *,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>::erase(emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk *,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>::const_iterator const&) loc_3B046: add rsp, 10h pop rbx pop r14 pop r15 retn
long long Dimension::remove_chunk(long long a1) { long long result; // rax unsigned int entity; // eax result = emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk *,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>::find_filled_slot<glm::vec<3,int,(glm::qualifier)0>>(a1 + 712); if ( (_DWORD)result != *(_DWORD *)(a1 + 744) ) { entity = Chunk::get_entity(*(Chunk **)(*(_QWORD *)(a1 + 720) + 24LL * (int)result + 16)); entt::basic_registry<entt::entity,std::allocator<entt::entity>>::destroy((_QWORD *)(a1 + 8), entity); return emhash8::HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk *,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>>::erase(a1 + 712); } return result; }
remove_chunk: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV R14,RDI LEA RBX,[RDI + 0x2c8] MOV RDI,RBX CALL 0x0013c126 CMP EAX,dword ptr [R14 + 0x2e8] JZ 0x0013b046 CDQE MOV RCX,qword ptr [R14 + 0x2d0] LEA RAX,[RAX + RAX*0x2] LEA R15,[RCX + RAX*0x8] ADD R14,0x8 MOV RDI,qword ptr [R15 + 0x10] CALL 0x00137198 MOV RDI,R14 MOV ESI,EAX CALL 0x0012ab9e LEA RSI,[RSP + 0x8] MOV qword ptr [RSI],R15 MOV RDI,RBX CALL 0x0013b458 LAB_0013b046: ADD RSP,0x10 POP RBX POP R14 POP R15 RET
/* Dimension::remove_chunk(glm::vec<3, int, (glm::qualifier)0> const&) */ void __thiscall Dimension::remove_chunk(Dimension *this,vec *param_1) { long lVar1; uint uVar2; int4 uVar3; long local_20; uVar2 = emhash8:: HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk*,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>> ::find_filled_slot<glm::vec<3,int,(glm::qualifier)0>> ((HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk*,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>> *)(this + 0x2c8),param_1); if (uVar2 != *(uint *)(this + 0x2e8)) { lVar1 = *(long *)(this + 0x2d0) + (long)(int)uVar2 * 0x18; uVar3 = Chunk::get_entity(*(Chunk **)(lVar1 + 0x10)); entt::basic_registry<entt::entity,std::allocator<entt::entity>>::destroy ((basic_registry<entt::entity,std::allocator<entt::entity>> *)(this + 8),uVar3); local_20 = lVar1; emhash8:: HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk*,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>> ::erase((HashMap<glm::vec<3,int,(glm::qualifier)0>,Chunk*,std::hash<glm::vec<3,int,(glm::qualifier)0>>,std::equal_to<glm::vec<3,int,(glm::qualifier)0>>> *)(this + 0x2c8),(const_iterator *)&local_20); } return; }
61,699
my_caseup_8bit
eloqsql/strings/ctype-simple.c
size_t my_caseup_8bit(CHARSET_INFO * cs, const char *src, size_t srclen, char *dst, size_t dstlen __attribute__((unused))) { const char *end= src + srclen; register const uchar *map= cs->to_upper; DBUG_ASSERT(srclen <= dstlen); for ( ; src != end ; src++) *dst++= (char) map[(uchar) *src]; return srclen; }
O3
c
my_caseup_8bit: movq %rdx, %rax testq %rdx, %rdx je 0xb4b3b pushq %rbp movq %rsp, %rbp movq 0x50(%rdi), %rdx xorl %edi, %edi movzbl (%rsi,%rdi), %r8d movb (%rdx,%r8), %r8b movb %r8b, (%rcx,%rdi) incq %rdi cmpq %rdi, %rax jne 0xb4b25 popq %rbp retq
my_caseup_8bit: mov rax, rdx test rdx, rdx jz short locret_B4B3B push rbp mov rbp, rsp mov rdx, [rdi+50h] xor edi, edi loc_B4B25: movzx r8d, byte ptr [rsi+rdi] mov r8b, [rdx+r8] mov [rcx+rdi], r8b inc rdi cmp rax, rdi jnz short loc_B4B25 pop rbp locret_B4B3B: retn
long long my_caseup_8bit(long long a1, long long a2, long long a3, long long a4) { long long result; // rax long long v5; // rdx long long v6; // rdi result = a3; if ( a3 ) { v5 = *(_QWORD *)(a1 + 80); v6 = 0LL; do { *(_BYTE *)(a4 + v6) = *(_BYTE *)(v5 + *(unsigned __int8 *)(a2 + v6)); ++v6; } while ( result != v6 ); } return result; }
my_caseup_8bit: MOV RAX,RDX TEST RDX,RDX JZ 0x001b4b3b PUSH RBP MOV RBP,RSP MOV RDX,qword ptr [RDI + 0x50] XOR EDI,EDI LAB_001b4b25: MOVZX R8D,byte ptr [RSI + RDI*0x1] MOV R8B,byte ptr [RDX + R8*0x1] MOV byte ptr [RCX + RDI*0x1],R8B INC RDI CMP RAX,RDI JNZ 0x001b4b25 POP RBP LAB_001b4b3b: RET
void my_caseup_8bit(long param_1,long param_2,long param_3,long param_4) { long lVar1; long lVar2; if (param_3 != 0) { lVar1 = *(long *)(param_1 + 0x50); lVar2 = 0; do { *(int1 *)(param_4 + lVar2) = *(int1 *)(lVar1 + (ulong)*(byte *)(param_2 + lVar2)); lVar2 = lVar2 + 1; } while (param_3 != lVar2); } return; }