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
40,600
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [10], 0>(char const (&) [10]) const
monkey531[P]llama/common/json.hpp
const_reference at(KeyType && key) const { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return it->second; }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [10], 0>(char const (&) [10]) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0xa9097 movq %rsi, %r15 movq 0x8(%r14), %r12 movq (%r12), %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx je 0xa9081 movq %rbx, %rdi movq %r15, %rsi callq 0x1b250 testl %eax, %eax je 0xa9076 addq $0x30, %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx jne 0xa9057 jmp 0xa9079 movq %rbx, %rax movq 0x8(%r14), %rcx movq 0x8(%rcx), %rbx cmpq %rbx, %rax je 0xa90f5 addq $0x20, %rax addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x1b4d0 movq %rax, %rbx movq %r14, %rdi callq 0x62a40 movq %rsp, %rdx movq %rax, (%rdx) leaq 0x4b250(%rip), %rsi # 0xf4309 leaq 0x20(%rsp), %rdi callq 0xae8c9 movb $0x1, %bpl leaq 0x20(%rsp), %rdx movq %rbx, %rdi movl $0x130, %esi # imm = 0x130 movq %r14, %rcx callq 0x8a22e xorl %ebp, %ebp leaq 0x84e64(%rip), %rsi # 0x12df48 leaq -0x4a3f1(%rip), %rdx # 0x5ecfa movq %rbx, %rdi callq 0x1c1c0 jmp 0xa916e movl $0x20, %edi callq 0x1b4d0 movq %rax, %rbx leaq 0x10(%rsp), %r12 movq %r12, -0x10(%r12) movq %r15, %rdi callq 0x1b440 leaq (%rax,%r15), %rdx movq %rsp, %rdi movq %r15, %rsi callq 0x261e8 leaq 0x4b20f(%rip), %rsi # 0xf4339 leaq 0x4b20e(%rip), %rcx # 0xf433f leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0xaeea6 movb $0x1, %bpl leaq 0x20(%rsp), %rdx movq %rbx, %rdi movl $0x193, %esi # imm = 0x193 movq %r14, %rcx callq 0xaf21e xorl %ebp, %ebp leaq 0x84d69(%rip), %rsi # 0x12dec8 leaq -0x4a46c(%rip), %rdx # 0x5ecfa movq %rbx, %rdi callq 0x1c1c0 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa918c movq 0x30(%rsp), %rsi incq %rsi callq 0x1ba60 movq (%rsp), %rdi cmpq %r12, %rdi je 0xa91d7 movq 0x10(%rsp), %rsi jmp 0xa91cf movq %rax, %r14 movq (%rsp), %rdi cmpq %r12, %rdi je 0xa91e1 movq 0x10(%rsp), %rsi incq %rsi callq 0x1ba60 jmp 0xa91e1 jmp 0xa91de movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa91d7 movq 0x30(%rsp), %rsi incq %rsi callq 0x1ba60 testb %bpl, %bpl jne 0xa91e1 jmp 0xa91e9 movq %rax, %r14 movq %rbx, %rdi callq 0x1b760 movq %r14, %rdi callq 0x1c250 nop
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: push rbp; char push r15; int push r14; int push r12; int push rbx; char sub rsp, 40h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_A9097 mov r15, rsi mov r12, [r14+8] mov rbx, [r12] mov rax, [r12+8] cmp rbx, rax jz short loc_A9081 loc_A9057: mov rdi, rbx mov rsi, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_A9076 add rbx, 30h ; '0' mov rax, [r12+8] cmp rbx, rax jnz short loc_A9057 jmp short loc_A9079 loc_A9076: mov rax, rbx loc_A9079: mov rcx, [r14+8] mov rbx, [rcx+8] loc_A9081: cmp rax, rbx jz short loc_A90F5 add rax, 20h ; ' ' add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_A9097: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) mov rdx, rsp mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+68h+var_48] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) mov bpl, 1 lea rdx, [rsp+68h+var_48] mov rdi, rbx; this mov esi, 130h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_A916E loc_A90F5: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r12, [rsp+68h+var_58] mov [r12-10h], r12 mov rdi, r15 call _strlen lea rdx, [rax+r15] mov rdi, rsp mov rsi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+68h+var_48] mov rdx, rsp call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) mov bpl, 1 lea rdx, [rsp+68h+var_48] mov rdi, rbx; this mov esi, 193h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_A916E: mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A918C mov rsi, [rsp+68h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A918C: mov rdi, [rsp+68h+var_68] cmp rdi, r12 jz short loc_A91D7 mov rsi, [rsp+68h+var_58] jmp short loc_A91CF mov r14, rax mov rdi, [rsp+68h+var_68]; void * cmp rdi, r12 jz short loc_A91E1 mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_A91E1 jmp short loc_A91DE mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A91D7 mov rsi, [rsp+68h+var_38] loc_A91CF: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A91D7: test bpl, bpl jnz short loc_A91E1 jmp short loc_A91E9 loc_A91DE: mov r14, rax loc_A91E1: mov rdi, rbx; void * call ___cxa_free_exception loc_A91E9: mov rdi, r14 call __Unwind_Resume
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x001a9097 MOV R15,RSI MOV R12,qword ptr [R14 + 0x8] MOV RBX,qword ptr [R12] MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JZ 0x001a9081 LAB_001a9057: MOV RDI,RBX MOV RSI,R15 CALL 0x0011b250 TEST EAX,EAX JZ 0x001a9076 ADD RBX,0x30 MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JNZ 0x001a9057 JMP 0x001a9079 LAB_001a9076: MOV RAX,RBX LAB_001a9079: MOV RCX,qword ptr [R14 + 0x8] MOV RBX,qword ptr [RCX + 0x8] LAB_001a9081: CMP RAX,RBX JZ 0x001a90f5 ADD RAX,0x20 ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001a9097: MOV EDI,0x20 CALL 0x0011b4d0 MOV RBX,RAX MOV RDI,R14 CALL 0x00162a40 MOV RDX,RSP MOV qword ptr [RDX],RAX LAB_001a90b2: LEA RSI,[0x1f4309] LEA RDI,[RSP + 0x20] CALL 0x001ae8c9 MOV BPL,0x1 LAB_001a90c6: LEA RDX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x130 MOV RCX,R14 CALL 0x0018a22e XOR EBP,EBP LEA RSI,[0x22df48] LEA RDX,[0x15ecfa] MOV RDI,RBX CALL 0x0011c1c0 LAB_001a90f5: MOV EDI,0x20 CALL 0x0011b4d0 MOV RBX,RAX LEA R12,[RSP + 0x10] MOV qword ptr [R12 + -0x10],R12 MOV RDI,R15 CALL 0x0011b440 LEA RDX,[RAX + R15*0x1] LAB_001a9118: MOV RDI,RSP MOV RSI,R15 CALL 0x001261e8 LAB_001a9123: LEA RSI,[0x1f4339] LEA RCX,[0x1f433f] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x001aeea6 MOV BPL,0x1 LAB_001a9141: LEA RDX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x193 MOV RCX,R14 CALL 0x001af21e XOR EBP,EBP LEA RSI,[0x22dec8] LEA RDX,[0x15ecfa] MOV RDI,RBX CALL 0x0011c1c0
char * _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_ (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_1,char *param_2) { long *plVar1; int iVar2; char *pcVar3; int8 uVar4; size_t sVar5; char *pcVar6; char *local_68 [2]; char local_58 [16]; detail local_48 [32]; if (*param_1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar4 = __cxa_allocate_exception(0x20); local_68[0] = (char *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(param_1); /* try { // try from 001a90b2 to 001a90c2 has its CatchHandler @ 001a91de */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*> (local_48,"cannot use at() with ",local_68); /* try { // try from 001a90c6 to 001a90f2 has its CatchHandler @ 001a91b9 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar4,0x130,local_48,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } plVar1 = *(long **)(param_1 + 8); pcVar6 = (char *)*plVar1; pcVar3 = (char *)plVar1[1]; if (pcVar6 != pcVar3) { do { pcVar3 = pcVar6; iVar2 = std::__cxx11::string::compare(pcVar3); if (iVar2 == 0) break; pcVar6 = pcVar3 + 0x30; pcVar3 = (char *)plVar1[1]; } while (pcVar6 != pcVar3); pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8); } if (pcVar3 == pcVar6) { uVar4 = __cxa_allocate_exception(0x20); local_68[0] = local_58; sVar5 = strlen(param_2); /* try { // try from 001a9118 to 001a9122 has its CatchHandler @ 001a91b7 */ std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5); /* try { // try from 001a9123 to 001a913d has its CatchHandler @ 001a919c */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]> (local_48,"key \'",(string *)local_68,"\' not found"); /* try { // try from 001a9141 to 001a916d has its CatchHandler @ 001a916e */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar4,0x193,local_48,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return pcVar3 + 0x20; }
40,601
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan()
llama.cpp/common/json.hpp
token_type scan() { // initially, skip the BOM if (position.chars_read_total == 0 && !skip_bom()) { error_message = "invalid BOM; must be 0xEF 0xBB 0xBF if given"; return token_type::parse_error; } // read next character and ignore whitespace skip_whitespace(); // ignore comments while (ignore_comments && current == '/') { if (!scan_comment()) { return token_type::parse_error; } // skip following whitespace skip_whitespace(); } switch (current) { // structural characters case '[': return token_type::begin_array; case ']': return token_type::end_array; case '{': return token_type::begin_object; case '}': return token_type::end_object; case ':': return token_type::name_separator; case ',': return token_type::value_separator; // literals case 't': { std::array<char_type, 4> true_literal = {{static_cast<char_type>('t'), static_cast<char_type>('r'), static_cast<char_type>('u'), static_cast<char_type>('e')}}; return scan_literal(true_literal.data(), true_literal.size(), token_type::literal_true); } case 'f': { std::array<char_type, 5> false_literal = {{static_cast<char_type>('f'), static_cast<char_type>('a'), static_cast<char_type>('l'), static_cast<char_type>('s'), static_cast<char_type>('e')}}; return scan_literal(false_literal.data(), false_literal.size(), token_type::literal_false); } case 'n': { std::array<char_type, 4> null_literal = {{static_cast<char_type>('n'), static_cast<char_type>('u'), static_cast<char_type>('l'), static_cast<char_type>('l')}}; return scan_literal(null_literal.data(), null_literal.size(), token_type::literal_null); } // string case '\"': return scan_string(); // number case '-': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': return scan_number(); // end of input (the null byte is needed when parsing from // string literals) case '\0': case char_traits<char_type>::eof(): return token_type::end_of_input; // error default: error_message = "invalid literal"; return token_type::parse_error; } }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan(): pushq %r14 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx cmpq $0x0, 0x20(%rdi) jne 0x81fa3 movq %rbx, %rdi callq 0x8213a testb %al, %al je 0x82065 movabsq $0x100002600, %r14 # imm = 0x100002600 movq %rbx, %rdi callq 0x226b0 movl 0x14(%rbx), %eax cmpq $0x20, %rax ja 0x81fed btq %rax, %r14 jb 0x81fad jmp 0x81fed movq %rbx, %rdi callq 0x8217c testb %al, %al je 0x82070 movq %rbx, %rdi callq 0x226b0 movl 0x14(%rbx), %eax cmpq $0x20, %rax ja 0x81fed btq %rax, %r14 jb 0x81fd6 cmpl $0x2f, %eax jne 0x81ff8 cmpb $0x0, 0x10(%rbx) jne 0x81fc6 cmpl $0x5a, %eax jg 0x82028 leal -0x22(%rax), %ecx cmpl $0x18, %ecx ja 0x820b2 leaq 0x9e81c(%rip), %rax # 0x12082c movslq (%rax,%rcx,4), %rcx addq %rax, %rcx jmpq *%rcx movq %rbx, %rdi addq $0x18, %rsp popq %rbx popq %r14 jmp 0x826e6 cmpl $0x6d, %eax jle 0x8207d cmpl $0x7a, %eax jg 0x820c0 cmpl $0x6e, %eax je 0x820fa cmpl $0x74, %eax jne 0x820d1 leaq 0xc(%rsp), %rsi movl $0x65757274, (%rsi) # imm = 0x65757274 movl $0x4, %edx movq %rbx, %rdi movl $0x1, %ecx jmp 0x82112 leaq 0xa5a1a(%rip), %rax # 0x127a86 movq %rax, 0x70(%rbx) movl $0xe, %eax addq $0x18, %rsp popq %rbx popq %r14 retq cmpl $0x5b, %eax je 0x82126 cmpl $0x5d, %eax je 0x82130 cmpl $0x66, %eax jne 0x820d1 leaq 0x10(%rsp), %rsi movb $0x65, 0x4(%rsi) movl $0x736c6166, (%rsi) # imm = 0x736C6166 movl $0x5, %edx movq %rbx, %rdi movl $0x2, %ecx jmp 0x82112 incl %eax cmpl $0x2, %eax jae 0x820d1 movl $0xf, %eax jmp 0x82075 cmpl $0x7b, %eax je 0x8211c cmpl $0x7d, %eax jne 0x820d1 movl $0xb, %eax jmp 0x82075 leaq 0xa59db(%rip), %rax # 0x127ab3 jmp 0x8206c movl $0xc, %eax jmp 0x82075 movq %rbx, %rdi addq $0x18, %rsp popq %rbx popq %r14 jmp 0x82274 movl $0xd, %eax jmp 0x82075 leaq 0x8(%rsp), %rsi movl $0x6c6c756e, (%rsi) # imm = 0x6C6C756E movl $0x4, %edx movq %rbx, %rdi movl $0x3, %ecx callq 0x821f8 jmp 0x82075 movl $0x9, %eax jmp 0x82075 movl $0x8, %eax jmp 0x82075 movl $0xa, %eax jmp 0x82075
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE4scanEv: push r14 push rbx sub rsp, 18h mov rbx, rdi cmp qword ptr [rdi+20h], 0 jnz short loc_81FA3 mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE8skip_bomEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::skip_bom(void) test al, al jz loc_82065 loc_81FA3: mov r14, 100002600h loc_81FAD: mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::get(void) mov eax, [rbx+14h] cmp rax, 20h ; ' ' ja short loc_81FED bt r14, rax jb short loc_81FAD jmp short loc_81FED loc_81FC6: mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE12scan_commentEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::scan_comment(void) test al, al jz loc_82070 loc_81FD6: mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::get(void) mov eax, [rbx+14h] cmp rax, 20h ; ' ' ja short loc_81FED bt r14, rax jb short loc_81FD6 loc_81FED: cmp eax, 2Fh ; '/' jnz short loc_81FF8 cmp byte ptr [rbx+10h], 0 jnz short loc_81FC6 loc_81FF8: cmp eax, 5Ah ; 'Z' jg short loc_82028 lea ecx, [rax-22h]; switch 25 cases cmp ecx, 18h ja def_82017; jumptable 0000000000082017 default case lea rax, jpt_82017 movsxd rcx, ds:(jpt_82017 - 12082Ch)[rax+rcx*4] add rcx, rax jmp rcx; switch jump loc_82019: mov rdi, rbx; jumptable 0000000000082017 cases 45,48-57 add rsp, 18h pop rbx pop r14 jmp _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE11scan_numberEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::scan_number(void) loc_82028: cmp eax, 6Dh ; 'm' jle short loc_8207D cmp eax, 7Ah ; 'z' jg loc_820C0 cmp eax, 6Eh ; 'n' jz loc_820FA cmp eax, 74h ; 't' jnz loc_820D1; jumptable 0000000000082017 cases 35-43,46,47 lea rsi, [rsp+28h+var_1C] mov dword ptr [rsi], 65757274h mov edx, 4 mov rdi, rbx mov ecx, 1 jmp loc_82112 loc_82065: lea rax, aInvalidBomMust; "invalid BOM; must be 0xEF 0xBB 0xBF if "... loc_8206C: mov [rbx+70h], rax loc_82070: mov eax, 0Eh loc_82075: add rsp, 18h pop rbx pop r14 retn loc_8207D: cmp eax, 5Bh ; '[' jz loc_82126 cmp eax, 5Dh ; ']' jz loc_82130 cmp eax, 66h ; 'f' jnz short loc_820D1; jumptable 0000000000082017 cases 35-43,46,47 lea rsi, [rsp+28h+var_18] mov byte ptr [rsi+4], 65h ; 'e' mov dword ptr [rsi], 736C6166h mov edx, 5 mov rdi, rbx mov ecx, 2 jmp short loc_82112 def_82017: inc eax; jumptable 0000000000082017 default case cmp eax, 2 jnb short loc_820D1; jumptable 0000000000082017 cases 35-43,46,47 mov eax, 0Fh jmp short loc_82075 loc_820C0: cmp eax, 7Bh ; '{' jz short loc_8211C cmp eax, 7Dh ; '}' jnz short loc_820D1; jumptable 0000000000082017 cases 35-43,46,47 mov eax, 0Bh jmp short loc_82075 loc_820D1: lea rax, aInvalidLiteral; jumptable 0000000000082017 cases 35-43,46,47 jmp short loc_8206C loc_820DA: mov eax, 0Ch; jumptable 0000000000082017 case 58 jmp short loc_82075 loc_820E1: mov rdi, rbx; jumptable 0000000000082017 case 34 add rsp, 18h pop rbx pop r14 jmp _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE11scan_stringEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::scan_string(void) loc_820F0: mov eax, 0Dh; jumptable 0000000000082017 case 44 jmp loc_82075 loc_820FA: lea rsi, [rsp+28h+var_20] mov dword ptr [rsi], 6C6C756Eh mov edx, 4 mov rdi, rbx; this mov ecx, 3 loc_82112: call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE12scan_literalEPKcmNS1_10lexer_baseISF_E10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::scan_literal(char const*,ulong,nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type) jmp loc_82075 loc_8211C: mov eax, 9 jmp loc_82075 loc_82126: mov eax, 8 jmp loc_82075 loc_82130: mov eax, 0Ah jmp loc_82075
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan( __m128i *this) { long long v1; // r14 unsigned long long v2; // rax long long result; // rax const char *v4; // rax if ( this[2].m128i_i64[0] || (unsigned __int8)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::skip_bom((nlohmann::json_abi_v3_11_3::detail::input_stream_adapter *)this) ) { v1 = 0x100002600LL; do { nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(this); v2 = this[1].m128i_u32[1]; } while ( v2 <= 0x20 && _bittest64(&v1, v2) ); while ( (_DWORD)v2 == 47 && this[1].m128i_i8[0] ) { if ( !(unsigned __int8)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan_comment((nlohmann::json_abi_v3_11_3::detail::input_stream_adapter *)this) ) return 14LL; do { nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(this); v2 = this[1].m128i_u32[1]; } while ( v2 <= 0x20 && _bittest64(&v1, v2) ); } if ( (int)v2 <= 90 ) { switch ( (int)v2 ) { case '"': result = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan_string((nlohmann::json_abi_v3_11_3::detail::input_stream_adapter *)this); break; case '#': case '$': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case '.': case '/': goto LABEL_33; case ',': result = 13LL; break; case '-': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': result = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan_number((nlohmann::json_abi_v3_11_3::detail::input_stream_adapter *)this); break; case ':': result = 12LL; break; default: if ( (unsigned int)(v2 + 1) >= 2 ) goto LABEL_33; result = 15LL; break; } return result; } if ( (int)v2 <= 109 ) { switch ( (_DWORD)v2 ) { case '[': return 8LL; case ']': return 10LL; case 'f': return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan_literal((nlohmann::json_abi_v3_11_3::detail::input_stream_adapter *)this); } } else if ( (int)v2 > 122 ) { if ( (_DWORD)v2 == 123 ) return 9LL; if ( (_DWORD)v2 == 125 ) return 11LL; } else if ( (_DWORD)v2 == 110 || (_DWORD)v2 == 116 ) { return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan_literal((nlohmann::json_abi_v3_11_3::detail::input_stream_adapter *)this); } LABEL_33: v4 = "invalid literal"; } else { v4 = "invalid BOM; must be 0xEF 0xBB 0xBF if given"; } this[7].m128i_i64[0] = (long long)v4; return 14LL; }
scan: PUSH R14 PUSH RBX SUB RSP,0x18 MOV RBX,RDI CMP qword ptr [RDI + 0x20],0x0 JNZ 0x00181fa3 MOV RDI,RBX CALL 0x0018213a TEST AL,AL JZ 0x00182065 LAB_00181fa3: MOV R14,0x100002600 LAB_00181fad: MOV RDI,RBX CALL 0x001226b0 MOV EAX,dword ptr [RBX + 0x14] CMP RAX,0x20 JA 0x00181fed BT R14,RAX JC 0x00181fad JMP 0x00181fed LAB_00181fc6: MOV RDI,RBX CALL 0x0018217c TEST AL,AL JZ 0x00182070 LAB_00181fd6: MOV RDI,RBX CALL 0x001226b0 MOV EAX,dword ptr [RBX + 0x14] CMP RAX,0x20 JA 0x00181fed BT R14,RAX JC 0x00181fd6 LAB_00181fed: CMP EAX,0x2f JNZ 0x00181ff8 CMP byte ptr [RBX + 0x10],0x0 JNZ 0x00181fc6 LAB_00181ff8: CMP EAX,0x5a JG 0x00182028 LEA ECX,[RAX + -0x22] CMP ECX,0x18 JA 0x001820b2 LEA RAX,[0x22082c] MOVSXD RCX,dword ptr [RAX + RCX*0x4] ADD RCX,RAX switchD: JMP RCX caseD_2d: MOV RDI,RBX ADD RSP,0x18 POP RBX POP R14 JMP 0x001826e6 LAB_00182028: CMP EAX,0x6d JLE 0x0018207d CMP EAX,0x7a JG 0x001820c0 CMP EAX,0x6e JZ 0x001820fa CMP EAX,0x74 JNZ 0x001820d1 LEA RSI,[RSP + 0xc] MOV dword ptr [RSI],0x65757274 MOV EDX,0x4 MOV RDI,RBX MOV ECX,0x1 JMP 0x00182112 LAB_00182065: LEA RAX,[0x227a86] LAB_0018206c: MOV qword ptr [RBX + 0x70],RAX LAB_00182070: MOV EAX,0xe LAB_00182075: ADD RSP,0x18 POP RBX POP R14 RET LAB_0018207d: CMP EAX,0x5b JZ 0x00182126 CMP EAX,0x5d JZ 0x00182130 CMP EAX,0x66 JNZ 0x001820d1 LEA RSI,[RSP + 0x10] MOV byte ptr [RSI + 0x4],0x65 MOV dword ptr [RSI],0x736c6166 MOV EDX,0x5 MOV RDI,RBX MOV ECX,0x2 JMP 0x00182112 default: INC EAX CMP EAX,0x2 JNC 0x001820d1 MOV EAX,0xf JMP 0x00182075 LAB_001820c0: CMP EAX,0x7b JZ 0x0018211c CMP EAX,0x7d JNZ 0x001820d1 MOV EAX,0xb JMP 0x00182075 caseD_23: LEA RAX,[0x227ab3] JMP 0x0018206c caseD_3a: MOV EAX,0xc JMP 0x00182075 caseD_22: MOV RDI,RBX ADD RSP,0x18 POP RBX POP R14 JMP 0x00182274 caseD_2c: MOV EAX,0xd JMP 0x00182075 LAB_001820fa: LEA RSI,[RSP + 0x8] MOV dword ptr [RSI],0x6c6c756e MOV EDX,0x4 MOV RDI,RBX MOV ECX,0x3 LAB_00182112: CALL 0x001821f8 JMP 0x00182075 LAB_0018211c: MOV EAX,0x9 JMP 0x00182075 LAB_00182126: MOV EAX,0x8 JMP 0x00182075 LAB_00182130: MOV EAX,0xa JMP 0x00182075
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> ::scan(lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> *this) { char cVar1; int iVar2; ulong uVar3; int8 uVar4; char *pcVar5; int8 uVar6; int4 *puVar7; int4 local_20; int4 local_1c; int4 local_18; int1 local_14; if ((*(long *)(this + 0x20) != 0) || (cVar1 = skip_bom(this), cVar1 != '\0')) { do { get(this); uVar3 = (ulong)*(uint *)(this + 0x14); if (0x20 < uVar3) break; } while ((0x100002600U >> (uVar3 & 0x3f) & 1) != 0); do { iVar2 = (int)uVar3; if ((iVar2 != 0x2f) || (this[0x10] == (lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> )0x0)) goto LAB_00181ff8; cVar1 = scan_comment(this); if (cVar1 == '\0') goto LAB_00182070; do { get(this); uVar3 = (ulong)*(uint *)(this + 0x14); if (0x20 < uVar3) break; } while ((0x100002600U >> (uVar3 & 0x3f) & 1) != 0); } while( true ); } pcVar5 = "invalid BOM; must be 0xEF 0xBB 0xBF if given"; goto LAB_0018206c; LAB_00181ff8: if (0x5a < iVar2) { if (iVar2 < 0x6e) { if (iVar2 == 0x5b) { return 8; } if (iVar2 == 0x5d) { return 10; } if (iVar2 == 0x66) { puVar7 = &local_18; local_14 = 0x65; local_18 = 0x736c6166; uVar6 = 5; uVar4 = 2; goto LAB_00182112; } } else if (iVar2 < 0x7b) { if (iVar2 == 0x6e) { puVar7 = &local_20; local_20 = 0x6c6c756e; uVar6 = 4; uVar4 = 3; LAB_00182112: uVar4 = scan_literal(this,puVar7,uVar6,uVar4); return uVar4; } if (iVar2 == 0x74) { puVar7 = &local_1c; local_1c = 0x65757274; uVar6 = 4; uVar4 = 1; goto LAB_00182112; } } else { if (iVar2 == 0x7b) { return 9; } if (iVar2 == 0x7d) { return 0xb; } } goto switchD_00182017_caseD_23; } switch(iVar2) { case 0x22: uVar4 = scan_string(this); return uVar4; case 0x2c: uVar4 = 0xd; break; case 0x2d: case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: uVar4 = scan_number(this); return uVar4; case 0x3a: uVar4 = 0xc; break; default: if (iVar2 + 1U < 2) { return 0xf; } case 0x23: case 0x24: case 0x25: case 0x26: case 0x27: case 0x28: case 0x29: case 0x2a: case 0x2b: case 0x2e: case 0x2f: switchD_00182017_caseD_23: pcVar5 = "invalid literal"; LAB_0018206c: *(char **)(this + 0x70) = pcVar5; LAB_00182070: uVar4 = 0xe; } return uVar4; }
40,602
minja::Value::operator+(minja::Value const&) const
monkey531[P]llama/common/minja.hpp
Value operator+(const Value& rhs) const { if (is_string() || rhs.is_string()) { return to_str() + rhs.to_str(); } else if (is_number_integer() && rhs.is_number_integer()) { return get<int64_t>() + rhs.get<int64_t>(); } else if (is_array() && rhs.is_array()) { auto res = Value::array(); for (const auto& item : *array_) res.push_back(item); for (const auto& item : *rhs.array_) res.push_back(item); return res; } else { return get<double>() + rhs.get<double>(); } }
O2
cpp
minja::Value::operator+(minja::Value const&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movb 0x40(%rsi), %al cmpb $0x3, %al je 0x72f5d movb 0x40(%r14), %cl cmpb $0x3, %cl jne 0x72fc8 leaq 0x68(%rsp), %rdi movq %r15, %rsi callq 0x72e7a leaq 0x48(%rsp), %rdi movq %r14, %rsi callq 0x72e7a leaq 0x10(%rsp), %rdi leaq 0x68(%rsp), %rsi leaq 0x48(%rsp), %rdx callq 0x3bf63 leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0x6896e leaq 0x10(%rsp), %rdi callq 0x25478 leaq 0x48(%rsp), %rdi callq 0x25478 leaq 0x68(%rsp), %rdi callq 0x25478 movq %rbx, %rax addq $0x88, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq addb $-0x5, %al addb $-0x5, %cl orb %al, %cl cmpb $0x1, %cl ja 0x72ffc movq %r15, %rdi callq 0x659c6 movq %rax, %r15 movq %r14, %rdi callq 0x659c6 addq %r15, %rax leaq 0x10(%rsp), %rsi movq %rax, (%rsi) movq %rbx, %rdi callq 0x65a7c jmp 0x72fb6 cmpq $0x0, 0x10(%r15) je 0x7304f cmpq $0x0, 0x10(%r14) je 0x7304f xorpd %xmm0, %xmm0 leaq 0x30(%rsp), %rsi movapd %xmm0, (%rsi) andq $0x0, 0x10(%rsi) movq %rbx, %rdi callq 0x6bdd2 leaq 0x30(%rsp), %rdi callq 0x6b5e4 movq 0x10(%r15), %rax movq (%rax), %r15 movq 0x8(%rax), %r12 cmpq %r12, %r15 je 0x73081 movq %rbx, %rdi movq %r15, %rsi callq 0x6be3e addq $0x50, %r15 jmp 0x73039 movq %r15, %rdi callq 0x65a9a movsd %xmm0, 0x8(%rsp) movq %r14, %rdi callq 0x65a9a addsd 0x8(%rsp), %xmm0 leaq 0x10(%rsp), %rsi movsd %xmm0, (%rsi) movq %rbx, %rdi callq 0x65b50 jmp 0x72fb6 movq 0x10(%r14), %rax movq (%rax), %r14 movq 0x8(%rax), %r15 cmpq %r15, %r14 je 0x72fb6 movq %rbx, %rdi movq %r14, %rsi callq 0x6be3e addq $0x50, %r14 jmp 0x7308c movq %rax, %r14 leaq 0x30(%rsp), %rdi callq 0x6b5e4 jmp 0x730ef movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x25478 jmp 0x730c7 movq %rax, %r14 leaq 0x48(%rsp), %rdi callq 0x25478 jmp 0x730d6 movq %rax, %r14 leaq 0x68(%rsp), %rdi callq 0x25478 jmp 0x730ef jmp 0x730e4 movq %rax, %r14 movq %rbx, %rdi callq 0x65990 movq %r14, %rdi callq 0x251e0 nop
_ZNK5minja5ValueplERKS0_: push r15 push r14 push r12 push rbx sub rsp, 88h mov r14, rdx mov r15, rsi mov rbx, rdi mov al, [rsi+40h] cmp al, 3 jz short loc_72F5D mov cl, [r14+40h] cmp cl, 3 jnz short loc_72FC8 loc_72F5D: lea rdi, [rsp+0A8h+var_40]; this mov rsi, r15; minja::Value * call _ZNK5minja5Value6to_strB5cxx11Ev; minja::Value::to_str(void) lea rdi, [rsp+0A8h+var_60]; this mov rsi, r14; minja::Value * call _ZNK5minja5Value6to_strB5cxx11Ev; minja::Value::to_str(void) lea rdi, [rsp+0A8h+var_98] lea rsi, [rsp+0A8h+var_40] lea rdx, [rsp+0A8h+var_60] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) lea rsi, [rsp+0A8h+var_98] mov rdi, rbx call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) lea rdi, [rsp+0A8h+var_98]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0A8h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0A8h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_72FB6: mov rax, rbx add rsp, 88h pop rbx pop r12 pop r14 pop r15 retn loc_72FC8: add al, 0FBh add cl, 0FBh or cl, al cmp cl, 1 ja short loc_72FFC mov rdi, r15 call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void) mov r15, rax mov rdi, r14 call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void) add rax, r15 lea rsi, [rsp+0A8h+var_98]; __int64 * mov [rsi], rax mov rdi, rbx; this call _ZN5minja5ValueC2ERKl; minja::Value::Value(long const&) jmp short loc_72FB6 loc_72FFC: cmp qword ptr [r15+10h], 0 jz short loc_7304F cmp qword ptr [r14+10h], 0 jz short loc_7304F xorpd xmm0, xmm0 lea rsi, [rsp+0A8h+var_78] movapd xmmword ptr [rsi], xmm0 and qword ptr [rsi+10h], 0 mov rdi, rbx call _ZN5minja5Value5arrayESt6vectorIS0_SaIS0_EE; minja::Value::array(std::vector<minja::Value>) lea rdi, [rsp+0A8h+var_78] call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() mov rax, [r15+10h] mov r15, [rax] mov r12, [rax+8] loc_73039: cmp r15, r12 jz short loc_73081 mov rdi, rbx; this mov rsi, r15; minja::Value * call _ZN5minja5Value9push_backERKS0_; minja::Value::push_back(minja::Value const&) add r15, 50h ; 'P' jmp short loc_73039 loc_7304F: mov rdi, r15 call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) movsd [rsp+0A8h+var_A0], xmm0 mov rdi, r14 call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) addsd xmm0, [rsp+0A8h+var_A0] lea rsi, [rsp+0A8h+var_98]; double * movsd qword ptr [rsi], xmm0 mov rdi, rbx; this call _ZN5minja5ValueC2ERKd; minja::Value::Value(double const&) jmp loc_72FB6 loc_73081: mov rax, [r14+10h] mov r14, [rax] mov r15, [rax+8] loc_7308C: cmp r14, r15 jz loc_72FB6 mov rdi, rbx; this mov rsi, r14; minja::Value * call _ZN5minja5Value9push_backERKS0_; minja::Value::push_back(minja::Value const&) add r14, 50h ; 'P' jmp short loc_7308C mov r14, rax lea rdi, [rsp+arg_28] call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() jmp short loc_730EF mov r14, rax lea rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_730C7 mov r14, rax loc_730C7: lea rdi, [rsp+arg_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_730D6 mov r14, rax loc_730D6: lea rdi, [rsp+arg_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_730EF jmp short $+2 loc_730E4: mov r14, rax mov rdi, rbx; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_730EF: mov rdi, r14 call __Unwind_Resume
minja::Value * minja::Value::operator+( minja::Value *this, minja::Value *a2, const minja::Value ***a3, double a4) { char v5; // al char v6; // cl long long v8; // r15 const minja::Value **v9; // rax const minja::Value *v10; // r15 const minja::Value *v11; // r12 const minja::Value **v12; // rax const minja::Value *v13; // r14 const minja::Value *v14; // r15 long long v15[4]; // [rsp+10h] [rbp-98h] BYREF __int128 v16; // [rsp+30h] [rbp-78h] BYREF long long v17; // [rsp+40h] [rbp-68h] _QWORD v18[4]; // [rsp+48h] [rbp-60h] BYREF _QWORD v19[8]; // [rsp+68h] [rbp-40h] BYREF v5 = *((_BYTE *)a2 + 64); if ( v5 == 3 || (v6 = *((_BYTE *)a3 + 64), v6 == 3) ) { minja::Value::to_str[abi:cxx11]((std::__cxx11 *)v19, a2, a4); minja::Value::to_str[abi:cxx11]((std::__cxx11 *)v18, (minja::Value *)a3, a4); std::operator+<char>((long long)v15, v19, v18); minja::Value::Value((long long)this, (long long)v15); std::string::~string(v15); std::string::~string(v18); std::string::~string(v19); } else if ( (unsigned __int8)((v5 - 5) | (v6 - 5)) > 1u ) { if ( *((_QWORD *)a2 + 2) && a3[2] ) { v16 = 0LL; v17 = 0LL; minja::Value::array((long long)this, (long long *)&v16); std::vector<minja::Value>::~vector((long long)&v16); v9 = (const minja::Value **)*((_QWORD *)a2 + 2); v10 = *v9; v11 = v9[1]; while ( v10 != v11 ) { minja::Value::push_back(this, v10); v10 = (const minja::Value *)((char *)v10 + 80); } v12 = a3[2]; v13 = *v12; v14 = v12[1]; while ( v13 != v14 ) { minja::Value::push_back(this, v13); v13 = (const minja::Value *)((char *)v13 + 80); } } else { minja::Value::get<double>(a2); minja::Value::get<double>((minja::Value *)a3); *(double *)v15 = a4 + a4; minja::Value::Value(this, (const double *)v15); } } else { v8 = minja::Value::get<long>(a2); v15[0] = v8 + minja::Value::get<long>((minja::Value *)a3); minja::Value::Value(this, v15); } return this; }
operator+: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x88 MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV AL,byte ptr [RSI + 0x40] CMP AL,0x3 JZ 0x00172f5d MOV CL,byte ptr [R14 + 0x40] CMP CL,0x3 JNZ 0x00172fc8 LAB_00172f5d: LEA RDI,[RSP + 0x68] MOV RSI,R15 CALL 0x00172e7a LAB_00172f6a: LEA RDI,[RSP + 0x48] MOV RSI,R14 CALL 0x00172e7a LAB_00172f77: LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x68] LEA RDX,[RSP + 0x48] CALL 0x0013bf63 LAB_00172f8b: LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x0016896e LAB_00172f98: LEA RDI,[RSP + 0x10] CALL 0x00125478 LEA RDI,[RSP + 0x48] CALL 0x00125478 LEA RDI,[RSP + 0x68] CALL 0x00125478 LAB_00172fb6: MOV RAX,RBX ADD RSP,0x88 POP RBX POP R12 POP R14 POP R15 RET LAB_00172fc8: ADD AL,0xfb ADD CL,0xfb OR CL,AL CMP CL,0x1 JA 0x00172ffc MOV RDI,R15 CALL 0x001659c6 MOV R15,RAX MOV RDI,R14 CALL 0x001659c6 ADD RAX,R15 LEA RSI,[RSP + 0x10] MOV qword ptr [RSI],RAX MOV RDI,RBX CALL 0x00165a7c JMP 0x00172fb6 LAB_00172ffc: CMP qword ptr [R15 + 0x10],0x0 JZ 0x0017304f CMP qword ptr [R14 + 0x10],0x0 JZ 0x0017304f XORPD XMM0,XMM0 LEA RSI,[RSP + 0x30] MOVAPD xmmword ptr [RSI],XMM0 AND qword ptr [RSI + 0x10],0x0 LAB_0017301c: MOV RDI,RBX CALL 0x0016bdd2 LEA RDI,[RSP + 0x30] CALL 0x0016b5e4 MOV RAX,qword ptr [R15 + 0x10] MOV R15,qword ptr [RAX] MOV R12,qword ptr [RAX + 0x8] LAB_00173039: CMP R15,R12 JZ 0x00173081 LAB_0017303e: MOV RDI,RBX MOV RSI,R15 CALL 0x0016be3e LAB_00173049: ADD R15,0x50 JMP 0x00173039 LAB_0017304f: MOV RDI,R15 CALL 0x00165a9a MOVSD qword ptr [RSP + 0x8],XMM0 MOV RDI,R14 CALL 0x00165a9a ADDSD XMM0,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0x10] MOVSD qword ptr [RSI],XMM0 MOV RDI,RBX CALL 0x00165b50 JMP 0x00172fb6 LAB_00173081: MOV RAX,qword ptr [R14 + 0x10] MOV R14,qword ptr [RAX] MOV R15,qword ptr [RAX + 0x8] LAB_0017308c: CMP R14,R15 JZ 0x00172fb6 LAB_00173095: MOV RDI,RBX MOV RSI,R14 CALL 0x0016be3e LAB_001730a0: ADD R14,0x50 JMP 0x0017308c
/* minja::Value::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */ Value * __thiscall minja::Value::operator+(Value *this,Value *param_1) { Value *pVVar1; long lVar2; long lVar3; Value *in_RDX; Value *pVVar4; double dVar5; double local_98 [4]; int8 local_78; int8 uStack_70; int8 local_68; string local_60 [32]; string local_40 [32]; if ((param_1[0x40] == (Value)0x3) || (in_RDX[0x40] == (Value)0x3)) { to_str_abi_cxx11_(); /* try { // try from 00172f6a to 00172f76 has its CatchHandler @ 001730d3 */ to_str_abi_cxx11_(); /* try { // try from 00172f77 to 00172f8a has its CatchHandler @ 001730c4 */ std::operator+((string *)local_98,local_40); /* try { // try from 00172f8b to 00172f97 has its CatchHandler @ 001730b5 */ Value(this,(string *)local_98); std::__cxx11::string::~string((string *)local_98); std::__cxx11::string::~string(local_60); std::__cxx11::string::~string(local_40); } else if ((byte)((char)in_RDX[0x40] - 5U | (char)param_1[0x40] - 5U) < 2) { lVar2 = get<long>(param_1); lVar3 = get<long>(in_RDX); local_98[0] = (double)(lVar3 + lVar2); Value(this,(long *)local_98); } else if ((*(long *)(param_1 + 0x10) == 0) || (*(long *)(in_RDX + 0x10) == 0)) { dVar5 = get<double>(param_1); local_98[0] = get<double>(in_RDX); local_98[0] = local_98[0] + dVar5; Value(this,local_98); } else { local_78 = 0; uStack_70 = 0; local_68 = 0; /* try { // try from 0017301c to 00173023 has its CatchHandler @ 001730a6 */ array(this); std::vector<minja::Value,std::allocator<minja::Value>>::~vector ((vector<minja::Value,std::allocator<minja::Value>> *)&local_78); pVVar1 = (Value *)(*(int8 **)(param_1 + 0x10))[1]; for (pVVar4 = (Value *)**(int8 **)(param_1 + 0x10); pVVar4 != pVVar1; pVVar4 = pVVar4 + 0x50) { /* try { // try from 0017303e to 00173048 has its CatchHandler @ 001730e4 */ push_back(this,pVVar4); } pVVar1 = (Value *)(*(int8 **)(in_RDX + 0x10))[1]; for (pVVar4 = (Value *)**(int8 **)(in_RDX + 0x10); pVVar4 != pVVar1; pVVar4 = pVVar4 + 0x50) { /* try { // try from 00173095 to 0017309f has its CatchHandler @ 001730e2 */ push_back(this,pVVar4); } } return this; }
40,603
my_b_write_backtick_quote
eloqsql/mysys/mf_iocache2.c
my_bool my_b_write_backtick_quote(IO_CACHE *info, const char *str, size_t len) { const uchar *start; const uchar *p= (const uchar *)str; const uchar *end= p + len; size_t count; if (my_b_write(info, (uchar *)"`", 1)) return 1; for (;;) { start= p; while (p < end && *p != '`') ++p; count= p - start; if (count && my_b_write(info, start, count)) return 1; if (p >= end) break; if (my_b_write(info, (uchar *)"``", 2)) return 1; ++p; } return (my_b_write(info, (uchar *)"`", 1)); }
O3
c
my_b_write_backtick_quote: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movq %rsi, %r12 movq %rdi, %r8 movq 0x40(%rdi), %rax leaq 0x1(%rax), %rcx cmpq 0x48(%rdi), %rcx movq %rdi, -0x30(%rbp) jbe 0xb30e1 leaq 0x4cbaf(%rip), %rsi # 0xffc71 movl $0x1, %edx movq %r8, %rdi callq 0xb10ff movq -0x30(%rbp), %r8 movl %eax, %ecx movb $0x1, %al testl %ecx, %ecx jne 0xb31e2 jmp 0xb30e8 movb $0x60, (%rax) incq 0x40(%r8) testq %r14, %r14 jle 0xb31b1 addq %r12, %r14 xorl %eax, %eax movb (%r12,%rax), %bl cmpb $0x60, %bl je 0xb3116 leaq (%r12,%rax), %rcx incq %rcx incq %rax cmpq %r14, %rcx jb 0xb30f6 addq %r12, %rax movq %rax, %r15 jmp 0xb311f leaq (%r12,%rax), %r15 testq %rax, %rax je 0xb316c movq %r15, %r13 subq %r12, %r13 movq 0x40(%r8), %rdi leaq (%rdi,%r13), %rax cmpq 0x48(%r8), %rax jbe 0xb3154 movq %r8, %rdi movq %r12, %rsi movq %r13, %rdx callq 0xb10ff testl %eax, %eax jne 0xb31e0 cmpb $0x60, %bl movq -0x30(%rbp), %r8 je 0xb316c jmp 0xb31b1 movq %r12, %rsi movq %r13, %rdx callq 0x2a0b0 movq -0x30(%rbp), %r8 addq %r13, 0x40(%r8) cmpb $0x60, %bl jne 0xb31b1 movq 0x40(%r8), %rax leaq 0x2(%rax), %rcx cmpq 0x48(%r8), %rcx jbe 0xb3198 movl $0x2, %edx movq %r8, %rdi leaq 0x4cae7(%rip), %rsi # 0xffc70 callq 0xb10ff movq -0x30(%rbp), %r8 testl %eax, %eax je 0xb31a2 jmp 0xb31e0 movw $0x6060, (%rax) # imm = 0x6060 addq $0x2, 0x40(%r8) incq %r15 movq %r15, %r12 cmpq %r14, %r15 jb 0xb30f4 movq 0x40(%r8), %rax leaq 0x1(%rax), %rcx cmpq 0x48(%r8), %rcx jbe 0xb31d5 leaq 0x4caab(%rip), %rsi # 0xffc71 movl $0x1, %edx movq %r8, %rdi callq 0xb10ff jmp 0xb31e2 movb $0x60, (%rax) incq 0x40(%r8) xorl %eax, %eax jmp 0xb31e2 movb $0x1, %al addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_b_write_backtick_quote: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rdx mov r12, rsi mov r8, rdi mov rax, [rdi+40h] lea rcx, [rax+1] cmp rcx, [rdi+48h] mov [rbp+var_30], rdi jbe short loc_B30E1 lea rsi, asc_FFC70+1; "`" mov edx, 1 mov rdi, r8 call _my_b_write mov r8, [rbp+var_30] mov ecx, eax mov al, 1 test ecx, ecx jnz loc_B31E2 jmp short loc_B30E8 loc_B30E1: mov byte ptr [rax], 60h ; '`' inc qword ptr [r8+40h] loc_B30E8: test r14, r14 jle loc_B31B1 add r14, r12 loc_B30F4: xor eax, eax loc_B30F6: mov bl, [r12+rax] cmp bl, 60h ; '`' jz short loc_B3116 lea rcx, [r12+rax] inc rcx inc rax cmp rcx, r14 jb short loc_B30F6 add rax, r12 mov r15, rax jmp short loc_B311F loc_B3116: lea r15, [r12+rax] test rax, rax jz short loc_B316C loc_B311F: mov r13, r15 sub r13, r12 mov rdi, [r8+40h] lea rax, [rdi+r13] cmp rax, [r8+48h] jbe short loc_B3154 mov rdi, r8 mov rsi, r12 mov rdx, r13 call _my_b_write test eax, eax jnz loc_B31E0 cmp bl, 60h ; '`' mov r8, [rbp+var_30] jz short loc_B316C jmp short loc_B31B1 loc_B3154: mov rsi, r12 mov rdx, r13 call _memcpy mov r8, [rbp+var_30] add [r8+40h], r13 cmp bl, 60h ; '`' jnz short loc_B31B1 loc_B316C: mov rax, [r8+40h] lea rcx, [rax+2] cmp rcx, [r8+48h] jbe short loc_B3198 mov edx, 2 mov rdi, r8 lea rsi, asc_FFC70; "``" call _my_b_write mov r8, [rbp+var_30] test eax, eax jz short loc_B31A2 jmp short loc_B31E0 loc_B3198: mov word ptr [rax], 6060h add qword ptr [r8+40h], 2 loc_B31A2: inc r15 mov r12, r15 cmp r15, r14 jb loc_B30F4 loc_B31B1: mov rax, [r8+40h] lea rcx, [rax+1] cmp rcx, [r8+48h] jbe short loc_B31D5 lea rsi, asc_FFC70+1; "`" mov edx, 1 mov rdi, r8 call _my_b_write jmp short loc_B31E2 loc_B31D5: mov byte ptr [rax], 60h ; '`' inc qword ptr [r8+40h] xor eax, eax jmp short loc_B31E2 loc_B31E0: mov al, 1 loc_B31E2: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char my_b_write_backtick_quote(long long a1, long long a2, long long a3) { long long v4; // r12 long long v5; // r8 _BYTE *v6; // rax int v7; // eax int v8; // ecx char result; // al unsigned long long v10; // r14 long long v11; // rax char v12; // bl unsigned long long v13; // rcx long long v14; // r15 long long v15; // rdi _WORD *v16; // rax int v17; // eax _BYTE *v18; // rax v4 = a2; v5 = a1; v6 = *(_BYTE **)(a1 + 64); if ( (unsigned long long)(v6 + 1) <= *(_QWORD *)(a1 + 72) ) { *v6 = 96; ++*(_QWORD *)(a1 + 64); } else { v7 = my_b_write(a1, (long long)"`", 1LL); v5 = a1; v8 = v7; result = 1; if ( v8 ) return result; } if ( a3 > 0 ) { v10 = a2 + a3; while ( 2 ) { v11 = 0LL; while ( 1 ) { v12 = *(_BYTE *)(v4 + v11); if ( v12 == 96 ) break; v13 = v4 + v11++ + 1; if ( v13 >= v10 ) { v14 = v4 + v11; goto LABEL_12; } } v14 = v4 + v11; if ( v11 ) { LABEL_12: v15 = *(_QWORD *)(v5 + 64); if ( (unsigned long long)(v15 + v14 - v4) <= *(_QWORD *)(v5 + 72) ) { memcpy(v15, v4, v14 - v4); v5 = a1; *(_QWORD *)(a1 + 64) += v14 - v4; if ( v12 != 96 ) break; } else { if ( (unsigned int)my_b_write(v5, v4, v14 - v4) ) return 1; v5 = a1; if ( v12 != 96 ) break; } } v16 = *(_WORD **)(v5 + 64); if ( (unsigned long long)(v16 + 1) <= *(_QWORD *)(v5 + 72) ) { *v16 = 24672; *(_QWORD *)(v5 + 64) += 2LL; } else { v17 = my_b_write(v5, (long long)"``", 2LL); v5 = a1; if ( v17 ) return 1; } v4 = v14 + 1; if ( v14 + 1 < v10 ) continue; break; } } v18 = *(_BYTE **)(v5 + 64); if ( (unsigned long long)(v18 + 1) > *(_QWORD *)(v5 + 72) ) return my_b_write(v5, (long long)"`", 1LL); *v18 = 96; ++*(_QWORD *)(v5 + 64); return 0; }
my_b_write_backtick_quote: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDX MOV R12,RSI MOV R8,RDI MOV RAX,qword ptr [RDI + 0x40] LEA RCX,[RAX + 0x1] CMP RCX,qword ptr [RDI + 0x48] MOV qword ptr [RBP + -0x30],RDI JBE 0x001b30e1 LEA RSI,[0x1ffc71] MOV EDX,0x1 MOV RDI,R8 CALL 0x001b10ff MOV R8,qword ptr [RBP + -0x30] MOV ECX,EAX MOV AL,0x1 TEST ECX,ECX JNZ 0x001b31e2 JMP 0x001b30e8 LAB_001b30e1: MOV byte ptr [RAX],0x60 INC qword ptr [R8 + 0x40] LAB_001b30e8: TEST R14,R14 JLE 0x001b31b1 ADD R14,R12 LAB_001b30f4: XOR EAX,EAX LAB_001b30f6: MOV BL,byte ptr [R12 + RAX*0x1] CMP BL,0x60 JZ 0x001b3116 LEA RCX,[R12 + RAX*0x1] INC RCX INC RAX CMP RCX,R14 JC 0x001b30f6 ADD RAX,R12 MOV R15,RAX JMP 0x001b311f LAB_001b3116: LEA R15,[R12 + RAX*0x1] TEST RAX,RAX JZ 0x001b316c LAB_001b311f: MOV R13,R15 SUB R13,R12 MOV RDI,qword ptr [R8 + 0x40] LEA RAX,[RDI + R13*0x1] CMP RAX,qword ptr [R8 + 0x48] JBE 0x001b3154 MOV RDI,R8 MOV RSI,R12 MOV RDX,R13 CALL 0x001b10ff TEST EAX,EAX JNZ 0x001b31e0 CMP BL,0x60 MOV R8,qword ptr [RBP + -0x30] JZ 0x001b316c JMP 0x001b31b1 LAB_001b3154: MOV RSI,R12 MOV RDX,R13 CALL 0x0012a0b0 MOV R8,qword ptr [RBP + -0x30] ADD qword ptr [R8 + 0x40],R13 CMP BL,0x60 JNZ 0x001b31b1 LAB_001b316c: MOV RAX,qword ptr [R8 + 0x40] LEA RCX,[RAX + 0x2] CMP RCX,qword ptr [R8 + 0x48] JBE 0x001b3198 MOV EDX,0x2 MOV RDI,R8 LEA RSI,[0x1ffc70] CALL 0x001b10ff MOV R8,qword ptr [RBP + -0x30] TEST EAX,EAX JZ 0x001b31a2 JMP 0x001b31e0 LAB_001b3198: MOV word ptr [RAX],0x6060 ADD qword ptr [R8 + 0x40],0x2 LAB_001b31a2: INC R15 MOV R12,R15 CMP R15,R14 JC 0x001b30f4 LAB_001b31b1: MOV RAX,qword ptr [R8 + 0x40] LEA RCX,[RAX + 0x1] CMP RCX,qword ptr [R8 + 0x48] JBE 0x001b31d5 LEA RSI,[0x1ffc71] MOV EDX,0x1 MOV RDI,R8 CALL 0x001b10ff JMP 0x001b31e2 LAB_001b31d5: MOV byte ptr [RAX],0x60 INC qword ptr [R8 + 0x40] XOR EAX,EAX JMP 0x001b31e2 LAB_001b31e0: MOV AL,0x1 LAB_001b31e2: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 my_b_write_backtick_quote(long param_1,void *param_2,long param_3) { char cVar1; int iVar2; long lVar3; long lVar4; int8 uVar5; size_t __n; void *pvVar6; if (*(int1 **)(param_1 + 0x48) < *(int1 **)(param_1 + 0x40) + 1) { iVar2 = _my_b_write(param_1,&DAT_001ffc71,1); if (iVar2 != 0) { return 1; } } else { **(int1 **)(param_1 + 0x40) = 0x60; *(long *)(param_1 + 0x40) = *(long *)(param_1 + 0x40) + 1; } if (0 < param_3) { pvVar6 = (void *)(param_3 + (long)param_2); do { lVar3 = 0; do { cVar1 = *(char *)((long)param_2 + lVar3); if (cVar1 == '`') { lVar4 = (long)param_2 + lVar3; if (lVar3 == 0) goto LAB_001b316c; goto LAB_001b311f; } lVar4 = lVar3 + 1; lVar3 = lVar3 + 1; } while ((void *)((long)param_2 + lVar4) < pvVar6); lVar4 = lVar3 + (long)param_2; LAB_001b311f: __n = lVar4 - (long)param_2; if (*(ulong *)(param_1 + 0x48) < (long)*(void **)(param_1 + 0x40) + __n) { iVar2 = _my_b_write(param_1,param_2,__n); if (iVar2 != 0) { return 1; } } else { memcpy(*(void **)(param_1 + 0x40),param_2,__n); *(long *)(param_1 + 0x40) = *(long *)(param_1 + 0x40) + __n; } if (cVar1 != '`') break; LAB_001b316c: if (*(int2 **)(param_1 + 0x48) < *(int2 **)(param_1 + 0x40) + 1) { iVar2 = _my_b_write(param_1,&DAT_001ffc70,2); if (iVar2 != 0) { return 1; } } else { **(int2 **)(param_1 + 0x40) = 0x6060; *(long *)(param_1 + 0x40) = *(long *)(param_1 + 0x40) + 2; } param_2 = (void *)(lVar4 + 1); } while (param_2 < pvVar6); } if (*(int1 **)(param_1 + 0x48) < *(int1 **)(param_1 + 0x40) + 1) { uVar5 = _my_b_write(param_1,&DAT_001ffc71,1); } else { **(int1 **)(param_1 + 0x40) = 0x60; *(long *)(param_1 + 0x40) = *(long *)(param_1 + 0x40) + 1; uVar5 = 0; } return uVar5; }
40,604
atoi_octal
eloqsql/mysys/my_init.c
static ulong atoi_octal(const char *str) { long int tmp; while (*str && my_isspace(&my_charset_latin1, *str)) str++; str2int(str, (*str == '0' ? 8 : 10), /* Octalt or decimalt */ 0, INT_MAX, &tmp); return (ulong) tmp; }
O0
c
atoi_octal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x11(%rbp) je 0x36210 leaq 0x2518ec(%rip), %rax # 0x287ae0 movq 0x40(%rax), %rax movq -0x8(%rbp), %rcx movzbl (%rcx), %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x8, %eax cmpl $0x0, %eax setne %al movb %al, -0x11(%rbp) movb -0x11(%rbp), %al testb $0x1, %al jne 0x36219 jmp 0x36227 movq -0x8(%rbp), %rax addq $0x1, %rax movq %rax, -0x8(%rbp) jmp 0x361dc movq -0x8(%rbp), %rdi movq -0x8(%rbp), %rax movsbl (%rax), %ecx movl $0xa, %esi movl $0x8, %eax cmpl $0x30, %ecx cmovel %eax, %esi xorl %eax, %eax movl %eax, %edx movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF leaq -0x10(%rbp), %r8 callq 0x86a30 movq -0x10(%rbp), %rax addq $0x20, %rsp popq %rbp retq nop
atoi_octal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi loc_361DC: mov rax, [rbp+var_8] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, 0 mov [rbp+var_11], al jz short loc_36210 lea rax, my_charset_latin1 mov rax, [rax+40h] mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx+1] and eax, 8 cmp eax, 0 setnz al mov [rbp+var_11], al loc_36210: mov al, [rbp+var_11] test al, 1 jnz short loc_36219 jmp short loc_36227 loc_36219: mov rax, [rbp+var_8] add rax, 1 mov [rbp+var_8], rax jmp short loc_361DC loc_36227: mov rdi, [rbp+var_8] mov rax, [rbp+var_8] movsx ecx, byte ptr [rax] mov esi, 0Ah mov eax, 8 cmp ecx, 30h ; '0' cmovz esi, eax xor eax, eax mov edx, eax mov ecx, 7FFFFFFFh lea r8, [rbp+var_10] call str2int mov rax, [rbp+var_10] add rsp, 20h pop rbp retn
long long atoi_octal(_BYTE *a1) { long long v1; // rsi bool v3; // [rsp+Fh] [rbp-11h] long long v4; // [rsp+10h] [rbp-10h] BYREF _BYTE *i; // [rsp+18h] [rbp-8h] for ( i = a1; ; ++i ) { v3 = 0; if ( *i ) v3 = (*(_BYTE *)(*((_QWORD *)&my_charset_latin1 + 8) + (unsigned __int8)*i + 1LL) & 8) != 0; if ( !v3 ) break; } v1 = 10LL; if ( *i == 48 ) v1 = 8LL; str2int(i, v1, 0LL, 0x7FFFFFFFLL, &v4); return v4; }
atoi_octal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI LAB_001361dc: MOV RAX,qword ptr [RBP + -0x8] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x11],AL JZ 0x00136210 LEA RAX,[0x387ae0] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x8 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x11],AL LAB_00136210: MOV AL,byte ptr [RBP + -0x11] TEST AL,0x1 JNZ 0x00136219 JMP 0x00136227 LAB_00136219: MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x1 MOV qword ptr [RBP + -0x8],RAX JMP 0x001361dc LAB_00136227: MOV RDI,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x8] MOVSX ECX,byte ptr [RAX] MOV ESI,0xa MOV EAX,0x8 CMP ECX,0x30 CMOVZ ESI,EAX XOR EAX,EAX MOV EDX,EAX MOV ECX,0x7fffffff LEA R8,[RBP + -0x10] CALL 0x00186a30 MOV RAX,qword ptr [RBP + -0x10] ADD RSP,0x20 POP RBP RET
int8 atoi_octal(byte *param_1) { int8 uVar1; bool bVar2; int8 local_18; byte *local_10; local_10 = param_1; while( true ) { bVar2 = false; if (*local_10 != 0) { bVar2 = (PTR_ctype_latin1_00387b20[(ulong)*local_10 + 1] & 8) != 0; } if (!bVar2) break; local_10 = local_10 + 1; } uVar1 = 10; if (*local_10 == 0x30) { uVar1 = 8; } str2int(local_10,uVar1,0,0x7fffffff,&local_18); return local_18; }
40,605
ma_read_cache
eloqsql/storage/maria/ma_cache.c
my_bool _ma_read_cache(MARIA_HA *handler, IO_CACHE *info, uchar *buff, my_off_t pos, size_t length, uint flag) { size_t read_length,in_buff_length; my_off_t offset; uchar *in_buff_pos; DBUG_ENTER("_ma_read_cache"); DBUG_ASSERT(!(info->myflags & MY_ENCRYPT)); if (unlikely(pos >= info->end_of_file) && (flag & READING_HEADER)) DBUG_RETURN(-1); if (pos < info->pos_in_file) { read_length=length; if ((my_off_t) read_length > (my_off_t) (info->pos_in_file-pos)) read_length=(uint) (info->pos_in_file-pos); info->seek_not_done=1; if (mysql_file_pread(info->file,buff,read_length,pos,MYF(MY_NABP))) DBUG_RETURN(1); if (!(length-=read_length)) DBUG_RETURN(0); pos+=read_length; buff+=read_length; } if (pos >= info->pos_in_file && (offset= (my_off_t) (pos - info->pos_in_file)) < (my_off_t) (info->read_end - info->request_pos)) { in_buff_pos=info->request_pos+(uint) offset; in_buff_length= MY_MIN(length,(size_t) (info->read_end-in_buff_pos)); memcpy(buff,info->request_pos+(uint) offset,(size_t) in_buff_length); if (!(length-=in_buff_length)) DBUG_RETURN(0); pos+=in_buff_length; buff+=in_buff_length; } else in_buff_length=0; if (flag & READING_NEXT) { if (pos != (info->pos_in_file + (uint) (info->read_end - info->request_pos))) { info->pos_in_file=pos; /* Force start here */ info->read_pos=info->read_end=info->request_pos; /* Everything used */ info->seek_not_done=1; } else info->read_pos=info->read_end; /* All block used */ if (!_my_b_read(info,buff,length)) DBUG_RETURN(0); read_length=info->error; } else { info->seek_not_done=1; if ((read_length=mysql_file_pread(info->file,buff,length,pos,MYF(0))) == length) DBUG_RETURN(0); } if (!(flag & READING_HEADER) || (int) read_length == -1 || read_length+in_buff_length < 3) { if ((flag & READING_HEADER) && read_length + in_buff_length == 0) DBUG_RETURN(-1); /* End of file */ DBUG_PRINT("error", ("Error %d reading next-multi-part block (Got %d of %d bytes)", my_errno, (int) read_length, (int) length)); if (!my_errno || my_errno == HA_ERR_FILE_TOO_SHORT) { if (!handler->in_check_table) _ma_set_fatal_error(handler, HA_ERR_FILE_TOO_SHORT); if (!my_errno) my_errno= HA_ERR_WRONG_IN_RECORD; } DBUG_RETURN(1); } bzero(buff+read_length,MARIA_BLOCK_INFO_HEADER_LENGTH - in_buff_length - read_length); DBUG_RETURN(0); }
O3
c
ma_read_cache: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movl %r9d, -0x2c(%rbp) movq %rcx, %r13 movq %rdx, %r12 movq %rsi, %rbx movq %rdi, -0x50(%rbp) cmpq %rcx, 0x8(%rsi) jbe 0x5c1b9 movq (%rbx), %rax movq %rax, %rcx subq %r13, %rcx jbe 0x5c026 cmpq %r8, %rcx movl %ecx, %r15d movq %r8, -0x48(%rbp) cmovaeq %r8, %r15 movl $0x1, 0xe0(%rbx) movl 0xd4(%rbx), %r14d leaq 0x32c0ff(%rip), %rax # 0x3880c0 movq (%rax), %rax leaq -0x98(%rbp), %rdi movl %r14d, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax movq %r12, -0x38(%rbp) jne 0x5c1c8 movl $0x4, %r8d movl %r14d, %edi movq %r12, %rsi movq %r15, %rdx movq %r13, %rcx callq 0xa158c movq %rax, %r12 movb $0x1, %r14b testq %r12, %r12 movq -0x38(%rbp), %r12 movq -0x48(%rbp), %r8 jne 0x5c14b subq %r15, %r8 je 0x5c148 addq %r15, %r13 addq %r15, %r12 movq (%rbx), %rax movq %r13, %rcx subq %rax, %rcx jb 0x5c072 movq 0x18(%rbx), %r15 movq 0x28(%rbx), %rsi movq %r15, %rax subq %rsi, %rax cmpq %rax, %rcx jae 0x5c072 movl %ecx, %eax addq %rax, %rsi subq %rsi, %r15 cmpq %r15, %r8 cmovbq %r8, %r15 movq %r12, %rdi movq %r15, %rdx movq %r8, %r14 callq 0x29080 movq %r14, %r8 subq %r15, %r8 je 0x5c148 addq %r15, %r13 addq %r15, %r12 jmp 0x5c075 xorl %r15d, %r15d testb $0x1, -0x2c(%rbp) jne 0x5c0d2 movq %r8, %r14 movl $0x1, 0xe0(%rbx) movl 0xd4(%rbx), %ebx leaq 0x32c02b(%rip), %rax # 0x3880c0 movq (%rax), %rax leaq -0x98(%rbp), %rdi movl %ebx, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x5c22d movl %ebx, %edi movq %r12, %rsi movq %r14, %rdx movq %r13, %rcx xorl %r8d, %r8d callq 0xa158c movq %rax, %rbx cmpq %r14, %rbx jne 0x5c117 jmp 0x5c148 movq 0x18(%rbx), %rcx movq 0x28(%rbx), %rax movl %ecx, %edx subl %eax, %edx addq (%rbx), %rdx cmpq %rdx, %r13 je 0x5c0fa movq %r13, (%rbx) movq %rax, 0x18(%rbx) movl $0x1, 0xe0(%rbx) movq %rax, %rcx movq %rcx, 0x10(%rbx) movq %rbx, %rdi movq %r12, %rsi movq %r8, %rdx callq 0x966ee testl %eax, %eax je 0x5c148 movslq 0xe4(%rbx), %rbx testb $0x2, -0x2c(%rbp) je 0x5c15d movl %ebx, %eax cmpl $-0x1, %eax je 0x5c15d leaq (%rbx,%r15), %rax cmpq $0x2, %rax jbe 0x5c15d addq %rbx, %r12 movl $0x14, %edx subq %rax, %rdx xorl %r14d, %r14d movq %r12, %rdi xorl %esi, %esi callq 0x292c0 jmp 0x5c14b xorl %r14d, %r14d movl %r14d, %eax addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq testb $0x2, -0x2c(%rbp) je 0x5c16e negq %r15 movb $-0x1, %r14b cmpq %r15, %rbx je 0x5c14b callq 0xa2a4e cmpl $0x0, (%rax) je 0x5c188 callq 0xa2a4e movb $0x1, %r14b cmpl $0xaf, (%rax) jne 0x5c14b movq -0x50(%rbp), %rdi cmpb $0x0, 0x683(%rdi) jne 0x5c19f movl $0xaf, %esi callq 0x37978 callq 0xa2a4e movb $0x1, %r14b cmpl $0x0, (%rax) jne 0x5c14b callq 0xa2a4e movl $0x7f, (%rax) jmp 0x5c14b movb $-0x1, %r14b testb $0x2, -0x2c(%rbp) je 0x5bf8c jmp 0x5c14b movq %rax, %rcx leaq 0x32beee(%rip), %rax # 0x3880c0 movq (%rax), %rax leaq 0x7fc98(%rip), %rdx # 0xdbe74 movq %rcx, -0x40(%rbp) movq %rcx, %rdi movq %r15, %rsi movl $0x38, %ecx callq *0x210(%rax) movl $0x4, %r8d movl %r14d, %edi movq %r12, %rsi movq %r15, %rdx movq %r13, %rcx callq 0xa158c movq %rax, %r12 xorl %esi, %esi testq %rax, %rax cmoveq %r15, %rsi leaq 0x32bea5(%rip), %rax # 0x3880c0 movq (%rax), %rax movq -0x40(%rbp), %rdi callq *0x218(%rax) jmp 0x5c000 movq %rax, %rcx leaq 0x32be89(%rip), %rax # 0x3880c0 movq (%rax), %rax leaq 0x7fc33(%rip), %rdx # 0xdbe74 movq %rcx, -0x38(%rbp) movq %rcx, %rdi movq %r14, %rsi movl $0x5f, %ecx callq *0x210(%rax) movl %ebx, %edi movq %r12, %rsi movq %r14, %rdx movq %r13, %rcx xorl %r8d, %r8d callq 0xa158c movq %rax, %rbx cmpq $-0x1, %rax movl $0x0, %esi cmovneq %rax, %rsi leaq 0x32be40(%rip), %rax # 0x3880c0 movq (%rax), %rax movq -0x38(%rbp), %rdi callq *0x218(%rax) jmp 0x5c0cb nop
_ma_read_cache: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov [rbp+var_2C], r9d mov r13, rcx mov r12, rdx mov rbx, rsi mov [rbp+var_50], rdi cmp [rsi+8], rcx jbe loc_5C1B9 loc_5BF8C: mov rax, [rbx] mov rcx, rax sub rcx, r13 jbe loc_5C026 cmp rcx, r8 mov r15d, ecx mov [rbp+var_48], r8 cmovnb r15, r8 mov dword ptr [rbx+0E0h], 1 mov r14d, [rbx+0D4h] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_98] mov esi, r14d mov edx, 6 call qword ptr [rax+158h] test rax, rax mov [rbp+var_38], r12 jnz loc_5C1C8 mov r8d, 4 mov edi, r14d mov rsi, r12 mov rdx, r15 mov rcx, r13 call my_pread mov r12, rax loc_5C000: mov r14b, 1 test r12, r12 mov r12, [rbp+var_38] mov r8, [rbp+var_48] jnz loc_5C14B sub r8, r15 jz loc_5C148 add r13, r15 add r12, r15 mov rax, [rbx] loc_5C026: mov rcx, r13 sub rcx, rax jb short loc_5C072 mov r15, [rbx+18h] mov rsi, [rbx+28h] mov rax, r15 sub rax, rsi cmp rcx, rax jnb short loc_5C072 mov eax, ecx add rsi, rax sub r15, rsi cmp r8, r15 cmovb r15, r8 mov rdi, r12 mov rdx, r15 mov r14, r8 call _memcpy mov r8, r14 sub r8, r15 jz loc_5C148 add r13, r15 add r12, r15 jmp short loc_5C075 loc_5C072: xor r15d, r15d loc_5C075: test byte ptr [rbp+var_2C], 1 jnz short loc_5C0D2 mov r14, r8 mov dword ptr [rbx+0E0h], 1 mov ebx, [rbx+0D4h] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_98] mov esi, ebx mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz loc_5C22D mov edi, ebx mov rsi, r12 mov rdx, r14 mov rcx, r13 xor r8d, r8d call my_pread mov rbx, rax loc_5C0CB: cmp rbx, r14 jnz short loc_5C117 jmp short loc_5C148 loc_5C0D2: mov rcx, [rbx+18h] mov rax, [rbx+28h] mov edx, ecx sub edx, eax add rdx, [rbx] cmp r13, rdx jz short loc_5C0FA mov [rbx], r13 mov [rbx+18h], rax mov dword ptr [rbx+0E0h], 1 mov rcx, rax loc_5C0FA: mov [rbx+10h], rcx mov rdi, rbx mov rsi, r12 mov rdx, r8 call _my_b_read test eax, eax jz short loc_5C148 movsxd rbx, dword ptr [rbx+0E4h] loc_5C117: test byte ptr [rbp+var_2C], 2 jz short loc_5C15D mov eax, ebx cmp eax, 0FFFFFFFFh jz short loc_5C15D lea rax, [rbx+r15] cmp rax, 2 jbe short loc_5C15D add r12, rbx mov edx, 14h sub rdx, rax xor r14d, r14d mov rdi, r12 xor esi, esi call _memset jmp short loc_5C14B loc_5C148: xor r14d, r14d loc_5C14B: mov eax, r14d add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_5C15D: test byte ptr [rbp+var_2C], 2 jz short loc_5C16E neg r15 mov r14b, 0FFh cmp rbx, r15 jz short loc_5C14B loc_5C16E: call _my_thread_var cmp dword ptr [rax], 0 jz short loc_5C188 call _my_thread_var mov r14b, 1 cmp dword ptr [rax], 0AFh jnz short loc_5C14B loc_5C188: mov rdi, [rbp+var_50] cmp byte ptr [rdi+683h], 0 jnz short loc_5C19F mov esi, 0AFh call _ma_set_fatal_error loc_5C19F: call _my_thread_var mov r14b, 1 cmp dword ptr [rax], 0 jnz short loc_5C14B call _my_thread_var mov dword ptr [rax], 7Fh jmp short loc_5C14B loc_5C1B9: mov r14b, 0FFh test byte ptr [rbp+var_2C], 2 jz loc_5BF8C jmp short loc_5C14B loc_5C1C8: mov rcx, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_32; "/workspace/llm4binary/github2025/eloqsq"... mov [rbp+var_40], rcx mov rdi, rcx mov rsi, r15 mov ecx, 38h ; '8' call qword ptr [rax+210h] mov r8d, 4 mov edi, r14d mov rsi, r12 mov rdx, r15 mov rcx, r13 call my_pread mov r12, rax xor esi, esi test rax, rax cmovz rsi, r15 lea rax, PSI_server mov rax, [rax] mov rdi, [rbp+var_40] call qword ptr [rax+218h] jmp loc_5C000 loc_5C22D: mov rcx, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_32; "/workspace/llm4binary/github2025/eloqsq"... mov [rbp+var_38], rcx mov rdi, rcx mov rsi, r14 mov ecx, 5Fh ; '_' call qword ptr [rax+210h] mov edi, ebx mov rsi, r12 mov rdx, r14 mov rcx, r13 xor r8d, r8d call my_pread mov rbx, rax cmp rax, 0FFFFFFFFFFFFFFFFh mov esi, 0 cmovnz rsi, rax lea rax, PSI_server mov rax, [rax] mov rdi, [rbp+var_38] call qword ptr [rax+218h] jmp loc_5C0CB
long long ma_read_cache( _DWORD *a1, long long *a2, const char *a3, unsigned long long a4, unsigned long long a5, int a6) { unsigned long long v6; // r14 unsigned long long v7; // r13 unsigned long long v10; // rax unsigned long long v11; // rcx unsigned long long v12; // r15 long long v13; // rax long long v14; // r12 unsigned long long v15; // rcx long long v16; // rsi long long v17; // rsi unsigned long long v18; // r15 unsigned int v19; // ebx long long v20; // rax long long v21; // rdi const char *v22; // rsi long long v23; // rbx long long v24; // rcx long long v25; // rax long long v27; // rdx long long v28; // rcx long long v29; // r8 int v30; // r9d _DWORD *v31; // rdi unsigned long long v32; // rsi long long v33; // rax _BYTE v34[72]; // [rsp+8h] [rbp-98h] BYREF _DWORD *v35; // [rsp+50h] [rbp-50h] unsigned long long v36; // [rsp+58h] [rbp-48h] long long v37; // [rsp+60h] [rbp-40h] long long v38; // [rsp+68h] [rbp-38h] int v39; // [rsp+74h] [rbp-2Ch] v39 = a6; v7 = a4; v35 = a1; if ( a2[1] <= a4 ) { LOBYTE(v6) = -1; if ( (v39 & 2) != 0 ) return (unsigned int)v6; } v10 = *a2; v11 = *a2 - a4; if ( *a2 > v7 ) { v12 = (unsigned int)v11; v36 = a5; if ( v11 >= a5 ) v12 = a5; *((_DWORD *)a2 + 56) = 1; LODWORD(v6) = *((_DWORD *)a2 + 53); v13 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v34, (unsigned int)v6, 6LL); v38 = (long long)a3; if ( v13 ) { v37 = v13; ((void ( *)(long long, unsigned long long, const char *, long long))PSI_server[66])( v13, v12, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_cache.c", 56LL); v14 = my_pread((unsigned int)v6, a3, v12, v7, 4LL); v32 = 0LL; if ( !v14 ) v32 = v12; ((void ( *)(long long, unsigned long long))PSI_server[67])(v37, v32); } else { v14 = my_pread((unsigned int)v6, a3, v12, v7, 4LL); } LOBYTE(v6) = 1; if ( v14 ) return (unsigned int)v6; a5 = v36 - v12; if ( v36 == v12 ) { LABEL_30: LODWORD(v6) = 0; return (unsigned int)v6; } v7 += v12; a3 = (const char *)(v12 + v38); v10 = *a2; } v15 = v7 - v10; if ( v7 < v10 || (v16 = a2[5], v15 >= a2[3] - v16) ) { v18 = 0LL; } else { v17 = (unsigned int)v15 + v16; v18 = a2[3] - v17; if ( a5 < v18 ) v18 = a5; v6 = a5; memcpy(a3, v17, v18); a5 = v6 - v18; if ( v6 == v18 ) goto LABEL_30; v7 += v18; a3 += v18; } if ( (v39 & 1) != 0 ) { v24 = a2[3]; v25 = a2[5]; if ( v7 != *a2 + (unsigned int)(v24 - v25) ) { *a2 = v7; a2[3] = v25; *((_DWORD *)a2 + 56) = 1; v24 = v25; } a2[2] = v24; v21 = (long long)a2; v22 = a3; if ( !(unsigned int)my_b_read(a2, a3, a5) ) goto LABEL_30; v23 = *((int *)a2 + 57); } else { v6 = a5; *((_DWORD *)a2 + 56) = 1; v19 = *((_DWORD *)a2 + 53); v20 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v34, v19, 6LL); if ( v20 ) { v38 = v20; ((void ( *)(long long, unsigned long long, const char *, long long))PSI_server[66])( v20, v6, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_cache.c", 95LL); v33 = my_pread(v19, a3, v6, v7, 0LL); v23 = v33; v22 = 0LL; if ( v33 != -1 ) v22 = (const char *)v33; v21 = v38; ((void ( *)(long long, const char *))PSI_server[67])(v38, v22); } else { v21 = v19; v22 = a3; v23 = my_pread(v19, a3, v6, v7, 0LL); } if ( v23 == v6 ) goto LABEL_30; } if ( (v39 & 2) == 0 || (_DWORD)v23 == -1 || v23 + v18 <= 2 ) { if ( (v39 & 2) == 0 || (LOBYTE(v6) = -1, v23 != -(long long)v18) ) { if ( !*(_DWORD *)my_thread_var(v21, v22) || (LOBYTE(v6) = 1, *(_DWORD *)my_thread_var(v21, v22) == 175) ) { v31 = v35; if ( !*((_BYTE *)v35 + 1667) ) { v22 = (_BYTE *)(&qword_A8 + 7); ma_set_fatal_error(v35, 175LL, v27, v28, v29, v30); } LOBYTE(v6) = 1; if ( !*(_DWORD *)my_thread_var(v31, v22) ) *(_DWORD *)my_thread_var(v31, v22) = 127; } } } else { LODWORD(v6) = 0; memset(&a3[v23], 0LL, 20 - (v23 + v18)); } return (unsigned int)v6; }
_ma_read_cache: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV dword ptr [RBP + -0x2c],R9D MOV R13,RCX MOV R12,RDX MOV RBX,RSI MOV qword ptr [RBP + -0x50],RDI CMP qword ptr [RSI + 0x8],RCX JBE 0x0015c1b9 LAB_0015bf8c: MOV RAX,qword ptr [RBX] MOV RCX,RAX SUB RCX,R13 JBE 0x0015c026 CMP RCX,R8 MOV R15D,ECX MOV qword ptr [RBP + -0x48],R8 CMOVNC R15,R8 MOV dword ptr [RBX + 0xe0],0x1 MOV R14D,dword ptr [RBX + 0xd4] LEA RAX,[0x4880c0] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x98] MOV ESI,R14D MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX MOV qword ptr [RBP + -0x38],R12 JNZ 0x0015c1c8 MOV R8D,0x4 MOV EDI,R14D MOV RSI,R12 MOV RDX,R15 MOV RCX,R13 CALL 0x001a158c MOV R12,RAX LAB_0015c000: MOV R14B,0x1 TEST R12,R12 MOV R12,qword ptr [RBP + -0x38] MOV R8,qword ptr [RBP + -0x48] JNZ 0x0015c14b SUB R8,R15 JZ 0x0015c148 ADD R13,R15 ADD R12,R15 MOV RAX,qword ptr [RBX] LAB_0015c026: MOV RCX,R13 SUB RCX,RAX JC 0x0015c072 MOV R15,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RBX + 0x28] MOV RAX,R15 SUB RAX,RSI CMP RCX,RAX JNC 0x0015c072 MOV EAX,ECX ADD RSI,RAX SUB R15,RSI CMP R8,R15 CMOVC R15,R8 MOV RDI,R12 MOV RDX,R15 MOV R14,R8 CALL 0x00129080 MOV R8,R14 SUB R8,R15 JZ 0x0015c148 ADD R13,R15 ADD R12,R15 JMP 0x0015c075 LAB_0015c072: XOR R15D,R15D LAB_0015c075: TEST byte ptr [RBP + -0x2c],0x1 JNZ 0x0015c0d2 MOV R14,R8 MOV dword ptr [RBX + 0xe0],0x1 MOV EBX,dword ptr [RBX + 0xd4] LEA RAX,[0x4880c0] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x98] MOV ESI,EBX MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0015c22d MOV EDI,EBX MOV RSI,R12 MOV RDX,R14 MOV RCX,R13 XOR R8D,R8D CALL 0x001a158c MOV RBX,RAX LAB_0015c0cb: CMP RBX,R14 JNZ 0x0015c117 JMP 0x0015c148 LAB_0015c0d2: MOV RCX,qword ptr [RBX + 0x18] MOV RAX,qword ptr [RBX + 0x28] MOV EDX,ECX SUB EDX,EAX ADD RDX,qword ptr [RBX] CMP R13,RDX JZ 0x0015c0fa MOV qword ptr [RBX],R13 MOV qword ptr [RBX + 0x18],RAX MOV dword ptr [RBX + 0xe0],0x1 MOV RCX,RAX LAB_0015c0fa: MOV qword ptr [RBX + 0x10],RCX MOV RDI,RBX MOV RSI,R12 MOV RDX,R8 CALL 0x001966ee TEST EAX,EAX JZ 0x0015c148 MOVSXD RBX,dword ptr [RBX + 0xe4] LAB_0015c117: TEST byte ptr [RBP + -0x2c],0x2 JZ 0x0015c15d MOV EAX,EBX CMP EAX,-0x1 JZ 0x0015c15d LEA RAX,[RBX + R15*0x1] CMP RAX,0x2 JBE 0x0015c15d ADD R12,RBX MOV EDX,0x14 SUB RDX,RAX XOR R14D,R14D MOV RDI,R12 XOR ESI,ESI CALL 0x001292c0 JMP 0x0015c14b LAB_0015c148: XOR R14D,R14D LAB_0015c14b: MOV EAX,R14D ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0015c15d: TEST byte ptr [RBP + -0x2c],0x2 JZ 0x0015c16e NEG R15 MOV R14B,0xff CMP RBX,R15 JZ 0x0015c14b LAB_0015c16e: CALL 0x001a2a4e CMP dword ptr [RAX],0x0 JZ 0x0015c188 CALL 0x001a2a4e MOV R14B,0x1 CMP dword ptr [RAX],0xaf JNZ 0x0015c14b LAB_0015c188: MOV RDI,qword ptr [RBP + -0x50] CMP byte ptr [RDI + 0x683],0x0 JNZ 0x0015c19f MOV ESI,0xaf CALL 0x00137978 LAB_0015c19f: CALL 0x001a2a4e MOV R14B,0x1 CMP dword ptr [RAX],0x0 JNZ 0x0015c14b CALL 0x001a2a4e MOV dword ptr [RAX],0x7f JMP 0x0015c14b LAB_0015c1b9: MOV R14B,0xff TEST byte ptr [RBP + -0x2c],0x2 JZ 0x0015bf8c JMP 0x0015c14b LAB_0015c1c8: MOV RCX,RAX LEA RAX,[0x4880c0] MOV RAX,qword ptr [RAX] LEA RDX,[0x1dbe74] MOV qword ptr [RBP + -0x40],RCX MOV RDI,RCX MOV RSI,R15 MOV ECX,0x38 CALL qword ptr [RAX + 0x210] MOV R8D,0x4 MOV EDI,R14D MOV RSI,R12 MOV RDX,R15 MOV RCX,R13 CALL 0x001a158c MOV R12,RAX XOR ESI,ESI TEST RAX,RAX CMOVZ RSI,R15 LEA RAX,[0x4880c0] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x40] CALL qword ptr [RAX + 0x218] JMP 0x0015c000 LAB_0015c22d: MOV RCX,RAX LEA RAX,[0x4880c0] MOV RAX,qword ptr [RAX] LEA RDX,[0x1dbe74] MOV qword ptr [RBP + -0x38],RCX MOV RDI,RCX MOV RSI,R14 MOV ECX,0x5f CALL qword ptr [RAX + 0x210] MOV EDI,EBX MOV RSI,R12 MOV RDX,R14 MOV RCX,R13 XOR R8D,R8D CALL 0x001a158c MOV RBX,RAX CMP RAX,-0x1 MOV ESI,0x0 CMOVNZ RSI,RAX LEA RAX,[0x4880c0] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x38] CALL qword ptr [RAX + 0x218] JMP 0x0015c0cb
ulong _ma_read_cache(long param_1,ulong *param_2,void *param_3,ulong param_4,ulong param_5, uint param_6) { int4 uVar1; int iVar2; long lVar3; ulong uVar4; ulong uVar5; int *piVar6; int4 *puVar7; ulong uVar8; ulong uVar9; void *pvVar10; ulong unaff_R14; int1 local_a0 [72]; long local_58; ulong local_50; long local_48; void *local_40; uint local_34; if ((param_2[1] <= param_4) && (unaff_R14 = CONCAT71((int7)(unaff_R14 >> 8),0xff), (param_6 & 2) != 0)) goto LAB_0015c14b; uVar4 = *param_2; uVar8 = uVar4 - param_4; local_58 = param_1; local_34 = param_6; if (uVar4 < param_4 || uVar8 == 0) { LAB_0015c026: if (param_4 < uVar4) { LAB_0015c072: uVar8 = 0; uVar4 = param_5; } else { if (param_2[3] - param_2[5] <= param_4 - uVar4) goto LAB_0015c072; pvVar10 = (void *)(param_2[5] + (param_4 - uVar4 & 0xffffffff)); uVar8 = param_2[3] - (long)pvVar10; if (param_5 < uVar8) { uVar8 = param_5; } memcpy(param_3,pvVar10,uVar8); if (param_5 - uVar8 == 0) goto LAB_0015c148; param_4 = param_4 + uVar8; param_3 = (void *)((long)param_3 + uVar8); uVar4 = param_5 - uVar8; unaff_R14 = param_5; } if ((local_34 & 1) == 0) { *(int4 *)(param_2 + 0x1c) = 1; uVar1 = *(int4 *)((long)param_2 + 0xd4); pvVar10 = (void *)(**(code **)(PSI_server + 0x158))(local_a0,uVar1,6); if (pvVar10 == (void *)0x0) { uVar5 = my_pread(uVar1,param_3,uVar4,param_4,0); } else { local_40 = pvVar10; (**(code **)(PSI_server + 0x210)) (pvVar10,uVar4,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_cache.c" ,0x5f); uVar5 = my_pread(uVar1,param_3,uVar4,param_4,0); (**(code **)(PSI_server + 0x218))(local_40); } unaff_R14 = uVar4; if (uVar5 != uVar4) { LAB_0015c117: if ((((local_34 & 2) == 0) || ((int)uVar5 == -1)) || (uVar5 + uVar8 < 3)) { if (((local_34 & 2) == 0) || (unaff_R14 = CONCAT71((int7)(unaff_R14 >> 8),0xff), uVar5 != -uVar8)) { piVar6 = (int *)_my_thread_var(); if (*piVar6 != 0) { piVar6 = (int *)_my_thread_var(); unaff_R14 = CONCAT71((int7)(unaff_R14 >> 8),1); if (*piVar6 != 0xaf) goto LAB_0015c14b; } if (*(char *)(local_58 + 0x683) == '\0') { _ma_set_fatal_error(local_58,0xaf); } piVar6 = (int *)_my_thread_var(); unaff_R14 = CONCAT71((int7)(unaff_R14 >> 8),1); if (*piVar6 == 0) { puVar7 = (int4 *)_my_thread_var(); *puVar7 = 0x7f; } } } else { unaff_R14 = 0; memset((void *)((long)param_3 + uVar5),0,0x14 - (uVar5 + uVar8)); } goto LAB_0015c14b; } } else { uVar5 = param_2[5]; uVar9 = param_2[3]; if (param_4 != (ulong)(uint)((int)param_2[3] - (int)uVar5) + *param_2) { *param_2 = param_4; param_2[3] = uVar5; *(int4 *)(param_2 + 0x1c) = 1; uVar9 = uVar5; } param_2[2] = uVar9; iVar2 = _my_b_read(param_2,param_3,uVar4); if (iVar2 != 0) { uVar5 = (ulong)*(int *)((long)param_2 + 0xe4); goto LAB_0015c117; } } } else { uVar4 = uVar8 & 0xffffffff; if (param_5 <= uVar8) { uVar4 = param_5; } *(int4 *)(param_2 + 0x1c) = 1; uVar1 = *(int4 *)((long)param_2 + 0xd4); local_50 = param_5; lVar3 = (**(code **)(PSI_server + 0x158))(local_a0,uVar1,6); local_40 = param_3; if (lVar3 == 0) { lVar3 = my_pread(uVar1,param_3,uVar4,param_4,4); } else { local_48 = lVar3; (**(code **)(PSI_server + 0x210)) (lVar3,uVar4,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_cache.c", 0x38); lVar3 = my_pread(uVar1,param_3,uVar4,param_4,4); uVar8 = 0; if (lVar3 == 0) { uVar8 = uVar4; } (**(code **)(PSI_server + 0x218))(local_48,uVar8); } unaff_R14 = CONCAT71((uint7)(uint3)((uint)uVar1 >> 8),1); if (lVar3 != 0) goto LAB_0015c14b; param_5 = local_50 - uVar4; if (param_5 != 0) { param_4 = param_4 + uVar4; param_3 = (void *)((long)local_40 + uVar4); uVar4 = *param_2; goto LAB_0015c026; } } LAB_0015c148: unaff_R14 = 0; LAB_0015c14b: return unaff_R14 & 0xffffffff; }
40,606
my_wc_mb_8bit
eloqsql/strings/ctype-simple.c
int my_wc_mb_8bit(CHARSET_INFO *cs,my_wc_t wc, uchar *str, uchar *end) { MY_UNI_IDX *idx; if (str >= end) return MY_CS_TOOSMALL; for (idx=cs->tab_from_uni; idx->tab ; idx++) { if (idx->from <= wc && idx->to >= wc) { str[0]= idx->tab[wc - idx->from]; return (!str[0] && wc) ? MY_CS_ILUNI : 1; } } return MY_CS_ILUNI; }
O0
c
my_wc_mb_8bit: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x44e0a movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x44ea3 movq -0x10(%rbp), %rax movq 0x70(%rax), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax cmpq $0x0, 0x8(%rax) je 0x44e9c movq -0x30(%rbp), %rax movzwl (%rax), %eax cmpq -0x18(%rbp), %rax ja 0x44e89 movq -0x30(%rbp), %rax movzwl 0x2(%rax), %eax cmpq -0x18(%rbp), %rax jb 0x44e89 movq -0x30(%rbp), %rax movq 0x8(%rax), %rax movq -0x18(%rbp), %rcx movq -0x30(%rbp), %rdx movzwl (%rdx), %edx subq %rdx, %rcx movb (%rax,%rcx), %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movq -0x20(%rbp), %rcx xorl %eax, %eax cmpb $0x0, (%rcx) movb %al, -0x31(%rbp) jne 0x44e74 cmpq $0x0, -0x18(%rbp) setne %al movb %al, -0x31(%rbp) movb -0x31(%rbp), %dl movl $0x1, %eax xorl %ecx, %ecx testb $0x1, %dl cmovnel %ecx, %eax movl %eax, -0x4(%rbp) jmp 0x44ea3 jmp 0x44e8b movq -0x30(%rbp), %rax addq $0x10, %rax movq %rax, -0x30(%rbp) jmp 0x44e16 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
my_wc_mb_8bit: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_44E0A mov [rbp+var_4], 0FFFFFF9Bh jmp loc_44EA3 loc_44E0A: mov rax, [rbp+var_10] mov rax, [rax+70h] mov [rbp+var_30], rax loc_44E16: mov rax, [rbp+var_30] cmp qword ptr [rax+8], 0 jz short loc_44E9C mov rax, [rbp+var_30] movzx eax, word ptr [rax] cmp rax, [rbp+var_18] ja short loc_44E89 mov rax, [rbp+var_30] movzx eax, word ptr [rax+2] cmp rax, [rbp+var_18] jb short loc_44E89 mov rax, [rbp+var_30] mov rax, [rax+8] mov rcx, [rbp+var_18] mov rdx, [rbp+var_30] movzx edx, word ptr [rdx] sub rcx, rdx mov cl, [rax+rcx] mov rax, [rbp+var_20] mov [rax], cl mov rcx, [rbp+var_20] xor eax, eax cmp byte ptr [rcx], 0 mov [rbp+var_31], al jnz short loc_44E74 cmp [rbp+var_18], 0 setnz al mov [rbp+var_31], al loc_44E74: mov dl, [rbp+var_31] mov eax, 1 xor ecx, ecx test dl, 1 cmovnz eax, ecx mov [rbp+var_4], eax jmp short loc_44EA3 loc_44E89: jmp short $+2 loc_44E8B: mov rax, [rbp+var_30] add rax, 10h mov [rbp+var_30], rax jmp loc_44E16 loc_44E9C: mov [rbp+var_4], 0 loc_44EA3: mov eax, [rbp+var_4] pop rbp retn
long long my_wc_mb_8bit(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { bool v5; // [rsp+1h] [rbp-31h] unsigned __int16 *i; // [rsp+2h] [rbp-30h] if ( (unsigned long long)a3 < a4 ) { for ( i = *(unsigned __int16 **)(a1 + 112); ; i += 8 ) { if ( !*((_QWORD *)i + 1) ) return 0; if ( *i <= a2 && i[1] >= a2 ) break; } *a3 = *(_BYTE *)(*((_QWORD *)i + 1) + a2 - *i); v5 = 0; if ( !*a3 ) v5 = a2 != 0; return !v5; } else { return (unsigned int)-101; } }
my_wc_mb_8bit: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x00144e0a MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x00144ea3 LAB_00144e0a: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x70] MOV qword ptr [RBP + -0x30],RAX LAB_00144e16: MOV RAX,qword ptr [RBP + -0x30] CMP qword ptr [RAX + 0x8],0x0 JZ 0x00144e9c MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,word ptr [RAX] CMP RAX,qword ptr [RBP + -0x18] JA 0x00144e89 MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,word ptr [RAX + 0x2] CMP RAX,qword ptr [RBP + -0x18] JC 0x00144e89 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x30] MOVZX EDX,word ptr [RDX] SUB RCX,RDX MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV RCX,qword ptr [RBP + -0x20] XOR EAX,EAX CMP byte ptr [RCX],0x0 MOV byte ptr [RBP + -0x31],AL JNZ 0x00144e74 CMP qword ptr [RBP + -0x18],0x0 SETNZ AL MOV byte ptr [RBP + -0x31],AL LAB_00144e74: MOV DL,byte ptr [RBP + -0x31] MOV EAX,0x1 XOR ECX,ECX TEST DL,0x1 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x4],EAX JMP 0x00144ea3 LAB_00144e89: JMP 0x00144e8b LAB_00144e8b: MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x10 MOV qword ptr [RBP + -0x30],RAX JMP 0x00144e16 LAB_00144e9c: MOV dword ptr [RBP + -0x4],0x0 LAB_00144ea3: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
uint my_wc_mb_8bit(long param_1,ulong param_2,char *param_3,char *param_4) { ushort *local_38; uint local_c; if (param_3 < param_4) { for (local_38 = *(ushort **)(param_1 + 0x70); *(long *)(local_38 + 4) != 0; local_38 = local_38 + 8) { if ((*local_38 <= param_2) && (param_2 <= local_38[1])) { *param_3 = *(char *)(*(long *)(local_38 + 4) + (param_2 - *local_38)); return (uint)(*param_3 != '\0' || param_2 == 0); } } local_c = 0; } else { local_c = 0xffffff9b; } return local_c; }
40,607
my_caseup_utf16
eloqsql/strings/ctype-ucs2.c
static size_t my_caseup_utf16(CHARSET_INFO *cs, const char *src, size_t srclen, char *dst, size_t dstlen) { my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; my_charset_conv_wc_mb wc_mb= cs->cset->wc_mb; int res; const char *srcend= src + srclen; char *dstend= dst + dstlen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(srclen <= dstlen); while ((src < srcend) && (res= mb_wc(cs, &wc, (uchar *) src, (uchar *) srcend)) > 0) { my_toupper_utf16(uni_plane, &wc); if (res != wc_mb(cs, wc, (uchar *) dst, (uchar *) dstend)) break; src+= res; dst+= res; } return srclen; }
O0
c
my_caseup_utf16: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x8(%rbp), %rax movq 0xb8(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x38(%rbp) movq -0x8(%rbp), %rax movq 0xb8(%rax), %rax movq 0x30(%rax), %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x20(%rbp), %rax addq -0x28(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x8(%rbp), %rax movq 0x78(%rax), %rax movq %rax, -0x60(%rbp) jmp 0x68a48 jmp 0x68a4a movq -0x10(%rbp), %rcx xorl %eax, %eax cmpq -0x50(%rbp), %rcx movb %al, -0x61(%rbp) jae 0x68a7b movq -0x38(%rbp), %rax movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx movq -0x50(%rbp), %rcx leaq -0x30(%rbp), %rsi callq *%rax movl %eax, -0x44(%rbp) cmpl $0x0, %eax setg %al movb %al, -0x61(%rbp) movb -0x61(%rbp), %al testb $0x1, %al jne 0x68a84 jmp 0x68adf movq -0x60(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0x6bfd0 movl -0x44(%rbp), %eax movl %eax, -0x68(%rbp) movq -0x40(%rbp), %rax movq -0x8(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x58(%rbp), %rcx callq *%rax movl %eax, %ecx movl -0x68(%rbp), %eax cmpl %ecx, %eax je 0x68ab8 jmp 0x68adf movl -0x44(%rbp), %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) movl -0x44(%rbp), %ecx movq -0x20(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) jmp 0x68a4a movq -0x18(%rbp), %rax addq $0x70, %rsp popq %rbp retq nopl (%rax)
my_caseup_utf16: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_8] mov rax, [rax+0B8h] mov rax, [rax+28h] mov [rbp+var_38], rax mov rax, [rbp+var_8] mov rax, [rax+0B8h] mov rax, [rax+30h] mov [rbp+var_40], rax mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_50], rax mov rax, [rbp+var_20] add rax, [rbp+var_28] mov [rbp+var_58], rax mov rax, [rbp+var_8] mov rax, [rax+78h] mov [rbp+var_60], rax jmp short $+2 loc_68A48: jmp short $+2 loc_68A4A: mov rcx, [rbp+var_10] xor eax, eax cmp rcx, [rbp+var_50] mov [rbp+var_61], al jnb short loc_68A7B mov rax, [rbp+var_38] mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] mov rcx, [rbp+var_50] lea rsi, [rbp+var_30] call rax mov [rbp+var_44], eax cmp eax, 0 setnle al mov [rbp+var_61], al loc_68A7B: mov al, [rbp+var_61] test al, 1 jnz short loc_68A84 jmp short loc_68ADF loc_68A84: mov rdi, [rbp+var_60] lea rsi, [rbp+var_30] call my_toupper_utf16 mov eax, [rbp+var_44] mov [rbp+var_68], eax mov rax, [rbp+var_40] mov rdi, [rbp+var_8] mov rsi, [rbp+var_30] mov rdx, [rbp+var_20] mov rcx, [rbp+var_58] call rax mov ecx, eax mov eax, [rbp+var_68] cmp eax, ecx jz short loc_68AB8 jmp short loc_68ADF loc_68AB8: mov ecx, [rbp+var_44] mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax mov ecx, [rbp+var_44] mov rax, [rbp+var_20] movsxd rcx, ecx add rax, rcx mov [rbp+var_20], rax jmp loc_68A4A loc_68ADF: mov rax, [rbp+var_18] add rsp, 70h pop rbp retn
long long my_caseup_utf16(long long a1, unsigned long long a2, long long a3, long long a4, long long a5) { bool v6; // [rsp+Fh] [rbp-61h] long long v7; // [rsp+10h] [rbp-60h] long long v8; // [rsp+18h] [rbp-58h] unsigned long long v9; // [rsp+20h] [rbp-50h] int v10; // [rsp+2Ch] [rbp-44h] unsigned int ( *v11)(long long, _QWORD, long long, long long); // [rsp+30h] [rbp-40h] long long ( *v12)(long long, _QWORD *, unsigned long long, unsigned long long); // [rsp+38h] [rbp-38h] _QWORD v13[2]; // [rsp+40h] [rbp-30h] BYREF long long v14; // [rsp+50h] [rbp-20h] long long v15; // [rsp+58h] [rbp-18h] unsigned long long v16; // [rsp+60h] [rbp-10h] long long v17; // [rsp+68h] [rbp-8h] v17 = a1; v16 = a2; v15 = a3; v14 = a4; v13[1] = a5; v12 = *(long long ( **)(long long, _QWORD *, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 40LL); v11 = *(unsigned int ( **)(long long, _QWORD, long long, long long))(*(_QWORD *)(a1 + 184) + 48LL); v9 = a3 + a2; v8 = a5 + a4; v7 = *(_QWORD *)(a1 + 120); while ( 1 ) { v6 = 0; if ( v16 < v9 ) { v10 = v12(v17, v13, v16, v9); v6 = v10 > 0; } if ( !v6 ) break; my_toupper_utf16(v7, v13); if ( v10 != v11(v17, v13[0], v14, v8) ) break; v16 += v10; v14 += v10; } return v15; }
my_caseup_utf16: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RBP + -0x60],RAX JMP 0x00168a48 LAB_00168a48: JMP 0x00168a4a LAB_00168a4a: MOV RCX,qword ptr [RBP + -0x10] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x50] MOV byte ptr [RBP + -0x61],AL JNC 0x00168a7b MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x50] LEA RSI,[RBP + -0x30] CALL RAX MOV dword ptr [RBP + -0x44],EAX CMP EAX,0x0 SETG AL MOV byte ptr [RBP + -0x61],AL LAB_00168a7b: MOV AL,byte ptr [RBP + -0x61] TEST AL,0x1 JNZ 0x00168a84 JMP 0x00168adf LAB_00168a84: MOV RDI,qword ptr [RBP + -0x60] LEA RSI,[RBP + -0x30] CALL 0x0016bfd0 MOV EAX,dword ptr [RBP + -0x44] MOV dword ptr [RBP + -0x68],EAX MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x58] CALL RAX MOV ECX,EAX MOV EAX,dword ptr [RBP + -0x68] CMP EAX,ECX JZ 0x00168ab8 JMP 0x00168adf LAB_00168ab8: MOV ECX,dword ptr [RBP + -0x44] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX MOV ECX,dword ptr [RBP + -0x44] MOV RAX,qword ptr [RBP + -0x20] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX JMP 0x00168a4a LAB_00168adf: MOV RAX,qword ptr [RBP + -0x18] ADD RSP,0x70 POP RBP RET
long my_caseup_utf16(long param_1,ulong param_2,long param_3,long param_4,long param_5) { code *pcVar1; code *pcVar2; int8 uVar3; bool bVar4; int iVar5; int local_4c; int8 local_38; long local_30; long local_28; long local_20; ulong local_18; long local_10; pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); pcVar2 = *(code **)(*(long *)(param_1 + 0xb8) + 0x30); uVar3 = *(int8 *)(param_1 + 0x78); local_30 = param_5; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; while( true ) { bVar4 = false; if (local_18 < param_2 + param_3) { local_4c = (*pcVar1)(local_10,&local_38,local_18,param_2 + param_3); bVar4 = 0 < local_4c; } if (!bVar4) break; my_toupper_utf16(uVar3,&local_38); iVar5 = (*pcVar2)(local_10,local_38,local_28,param_4 + param_5); if (local_4c != iVar5) { return local_20; } local_18 = local_18 + (long)local_4c; local_28 = local_28 + local_4c; } return local_20; }
40,608
aggregate_thread_transactions(PFS_thread*, PFS_account*, PFS_user*, PFS_host*)
eloqsql/storage/perfschema/pfs_instr.cc
void aggregate_thread_transactions(PFS_thread *thread, PFS_account *safe_account, PFS_user *safe_user, PFS_host *safe_host) { if (thread->read_instr_class_transactions_stats() == NULL) return; if (likely(safe_account != NULL)) { /* Aggregate EVENTS_TRANSACTIONS_SUMMARY_BY_THREAD_BY_EVENT_NAME to EVENTS_TRANSACTIONS_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME. */ aggregate_all_transactions(thread->write_instr_class_transactions_stats(), safe_account->write_instr_class_transactions_stats()); return; } if ((safe_user != NULL) && (safe_host != NULL)) { /* Aggregate EVENTS_TRANSACTION_SUMMARY_BY_THREAD_BY_EVENT_NAME to: - EVENTS_TRANSACTION_SUMMARY_BY_USER_BY_EVENT_NAME - EVENTS_TRANSACTION_SUMMARY_BY_HOST_BY_EVENT_NAME in parallel. */ aggregate_all_transactions(thread->write_instr_class_transactions_stats(), safe_user->write_instr_class_transactions_stats(), safe_host->write_instr_class_transactions_stats()); return; } if (safe_user != NULL) { /* Aggregate EVENTS_TRANSACTIONS_SUMMARY_BY_THREAD_BY_EVENT_NAME to: - EVENTS_TRANSACTIONS_SUMMARY_BY_USER_BY_EVENT_NAME - EVENTS_TRANSACTIONS_SUMMARY_GLOBAL_BY_EVENT_NAME in parallel. */ aggregate_all_transactions(thread->write_instr_class_transactions_stats(), safe_user->write_instr_class_transactions_stats(), &global_transaction_stat); return; } if (safe_host != NULL) { /* Aggregate EVENTS_TRANSACTIONS_SUMMARY_BY_THREAD_BY_EVENT_NAME to EVENTS_TRANSACTIONS_SUMMARY_BY_HOST_BY_EVENT_NAME, directly. */ aggregate_all_transactions(thread->write_instr_class_transactions_stats(), safe_host->write_instr_class_transactions_stats()); return; } /* Aggregate EVENTS_TRANSACTIONS_SUMMARY_BY_THREAD_BY_EVENT_NAME to EVENTS_TRANSACTIONS_SUMMARY_GLOBAL_BY_EVENT_NAME. */ aggregate_all_transactions(thread->write_instr_class_transactions_stats(), &global_transaction_stat); }
O3
cpp
aggregate_thread_transactions(PFS_thread*, PFS_account*, PFS_user*, PFS_host*): pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq 0x20(%rdi), %rbx testq %rbx, %rbx setne %al andb 0x3(%rdi), %al cmpb $0x1, %al jne 0x3820f movq %rsi, %r14 testq %rsi, %rsi je 0x38201 testb $0x1, 0x3(%r14) jne 0x381f1 movq %r14, %rdi callq 0x464f6 movb $0x1, 0x3(%r14) movq 0x20(%r14), %rsi movq %rbx, %rdi popq %rbx popq %r14 popq %rbp jmp 0x37b4c movq %rdx, %rdi movq %rcx, %rsi movq %rbx, %rdx callq 0x27acd popq %rbx popq %r14 popq %rbp retq
_Z29aggregate_thread_transactionsP10PFS_threadP11PFS_accountP8PFS_userP8PFS_host: push rbp mov rbp, rsp push r14 push rbx mov rbx, [rdi+20h] test rbx, rbx setnz al and al, [rdi+3] cmp al, 1 jnz short loc_3820F mov r14, rsi test rsi, rsi jz short loc_38201 test byte ptr [r14+3], 1 jnz short loc_381F1 mov rdi, r14; this call _ZN20PFS_connection_slice24reset_transactions_statsEv; PFS_connection_slice::reset_transactions_stats(void) mov byte ptr [r14+3], 1 loc_381F1: mov rsi, [r14+20h] mov rdi, rbx pop rbx pop r14 pop rbp jmp _Z26aggregate_all_transactionsP20PFS_transaction_statS0_; aggregate_all_transactions(PFS_transaction_stat *,PFS_transaction_stat *) loc_38201: mov rdi, rdx; this mov rsi, rcx; PFS_connection_slice * mov rdx, rbx call _Z29aggregate_thread_transactionsP10PFS_threadP11PFS_accountP8PFS_userP8PFS_host_cold_1; aggregate_thread_transactions(PFS_thread *,PFS_account *,PFS_user *,PFS_host *) [clone] loc_3820F: pop rbx pop r14 pop rbp retn
char aggregate_thread_transactions(PFS_thread *a1, PFS_account *a2, PFS_user *a3, __int128 **a4) { _QWORD *v4; // rbx char result; // al v4 = (_QWORD *)*((_QWORD *)a1 + 4); result = *((_BYTE *)a1 + 3) & (v4 != 0LL); if ( result == 1 ) { if ( a2 ) { if ( (*((_BYTE *)a2 + 3) & 1) == 0 ) { PFS_connection_slice::reset_transactions_stats(a2); *((_BYTE *)a2 + 3) = 1; } return aggregate_all_transactions(v4, *((_QWORD **)a2 + 4)); } else { return aggregate_thread_transactions(a3, a4, (long long)v4); } } return result; }
aggregate_thread_transactions: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,qword ptr [RDI + 0x20] TEST RBX,RBX SETNZ AL AND AL,byte ptr [RDI + 0x3] CMP AL,0x1 JNZ 0x0013820f MOV R14,RSI TEST RSI,RSI JZ 0x00138201 TEST byte ptr [R14 + 0x3],0x1 JNZ 0x001381f1 MOV RDI,R14 CALL 0x001464f6 MOV byte ptr [R14 + 0x3],0x1 LAB_001381f1: MOV RSI,qword ptr [R14 + 0x20] MOV RDI,RBX POP RBX POP R14 POP RBP JMP 0x00137b4c LAB_00138201: MOV RDI,RDX MOV RSI,RCX MOV RDX,RBX CALL 0x00127acd LAB_0013820f: POP RBX POP R14 POP RBP RET
/* aggregate_thread_transactions(PFS_thread*, PFS_account*, PFS_user*, PFS_host*) */ void aggregate_thread_transactions (PFS_thread *param_1,PFS_account *param_2,PFS_user *param_3,PFS_host *param_4) { PFS_transaction_stat *pPVar1; pPVar1 = *(PFS_transaction_stat **)(param_1 + 0x20); if ((pPVar1 != (PFS_transaction_stat *)0x0 & (byte)param_1[3]) == 1) { if (param_2 != (PFS_account *)0x0) { if (((byte)param_2[3] & 1) == 0) { PFS_connection_slice::reset_transactions_stats((PFS_connection_slice *)param_2); param_2[3] = (PFS_account)0x1; } aggregate_all_transactions(pPVar1,*(PFS_transaction_stat **)(param_2 + 0x20)); return; } aggregate_thread_transactions ((PFS_thread *)param_3,(PFS_account *)param_4,(PFS_user *)pPVar1,param_4); } return; }
40,609
get_var_ref
bluesky950520[P]quickjs/quickjs.c
static JSVarRef *get_var_ref(JSContext *ctx, JSStackFrame *sf, int var_idx, BOOL is_arg) { JSVarRef *var_ref; struct list_head *el; list_for_each(el, &sf->var_ref_list) { var_ref = list_entry(el, JSVarRef, header.link); if (var_ref->var_idx == var_idx && var_ref->is_arg == is_arg) { var_ref->header.ref_count++; return var_ref; } } /* create a new one */ var_ref = js_malloc(ctx, sizeof(JSVarRef)); if (!var_ref) return NULL; var_ref->header.ref_count = 1; var_ref->is_detached = FALSE; var_ref->is_arg = is_arg; var_ref->var_idx = var_idx; list_add_tail(&var_ref->header.link, &sf->var_ref_list); if (is_arg) var_ref->pvalue = &sf->arg_buf[var_idx]; else var_ref->pvalue = &sf->var_buf[var_idx]; var_ref->value = JS_UNDEFINED; return var_ref; }
O0
c
get_var_ref: subq $0x48, %rsp movq %rdi, 0x38(%rsp) movq %rsi, 0x30(%rsp) movl %edx, 0x2c(%rsp) movl %ecx, 0x28(%rsp) movq 0x30(%rsp), %rax movq 0x30(%rax), %rax movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rax movq 0x30(%rsp), %rcx addq $0x28, %rcx cmpq %rcx, %rax je 0x6d5f6 movq 0x18(%rsp), %rax addq $-0x8, %rax movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax movzwl 0x6(%rax), %eax cmpl 0x2c(%rsp), %eax jne 0x6d5e4 movq 0x20(%rsp), %rax movb 0x5(%rax), %al shrb %al andb $0x1, %al movzbl %al, %eax cmpl 0x28(%rsp), %eax jne 0x6d5e4 movq 0x20(%rsp), %rax movl (%rax), %ecx addl $0x1, %ecx movl %ecx, (%rax) movq 0x20(%rsp), %rax movq %rax, 0x40(%rsp) jmp 0x6d6f5 jmp 0x6d5e6 movq 0x18(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x18(%rsp) jmp 0x6d584 movq 0x38(%rsp), %rdi movl $0x30, %esi callq 0x27fa0 movq %rax, 0x20(%rsp) cmpq $0x0, 0x20(%rsp) jne 0x6d620 movq $0x0, 0x40(%rsp) jmp 0x6d6f5 movq 0x20(%rsp), %rax movl $0x1, (%rax) movq 0x20(%rsp), %rax movb 0x5(%rax), %cl andb $-0x2, %cl orb $0x0, %cl movb %cl, 0x5(%rax) movl 0x28(%rsp), %eax movb %al, %dl movq 0x20(%rsp), %rax movb 0x5(%rax), %cl andb $0x1, %dl shlb %dl andb $-0x3, %cl orb %dl, %cl movb %cl, 0x5(%rax) movl 0x2c(%rsp), %eax movw %ax, %cx movq 0x20(%rsp), %rax movw %cx, 0x6(%rax) movq 0x20(%rsp), %rdi addq $0x8, %rdi movq 0x30(%rsp), %rsi addq $0x28, %rsi callq 0x29d40 cmpl $0x0, 0x28(%rsp) je 0x6d6a5 movq 0x30(%rsp), %rax movq 0x18(%rax), %rcx movslq 0x2c(%rsp), %rax shlq $0x4, %rax addq %rax, %rcx movq 0x20(%rsp), %rax movq %rcx, 0x18(%rax) jmp 0x6d6c3 movq 0x30(%rsp), %rax movq 0x20(%rax), %rcx movslq 0x2c(%rsp), %rax shlq $0x4, %rax addq %rax, %rcx movq 0x20(%rsp), %rax movq %rcx, 0x18(%rax) movq 0x20(%rsp), %rax movl $0x0, 0x8(%rsp) movq $0x3, 0x10(%rsp) movq 0x8(%rsp), %rcx movq %rcx, 0x20(%rax) movq 0x10(%rsp), %rcx movq %rcx, 0x28(%rax) movq 0x20(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x40(%rsp), %rax addq $0x48, %rsp retq nop
get_var_ref: sub rsp, 48h mov [rsp+48h+var_10], rdi mov [rsp+48h+var_18], rsi mov [rsp+48h+var_1C], edx mov [rsp+48h+var_20], ecx mov rax, [rsp+48h+var_18] mov rax, [rax+30h] mov [rsp+48h+var_30], rax loc_6D584: mov rax, [rsp+48h+var_30] mov rcx, [rsp+48h+var_18] add rcx, 28h ; '(' cmp rax, rcx jz short loc_6D5F6 mov rax, [rsp+48h+var_30] add rax, 0FFFFFFFFFFFFFFF8h mov [rsp+48h+var_28], rax mov rax, [rsp+48h+var_28] movzx eax, word ptr [rax+6] cmp eax, [rsp+48h+var_1C] jnz short loc_6D5E4 mov rax, [rsp+48h+var_28] mov al, [rax+5] shr al, 1 and al, 1 movzx eax, al cmp eax, [rsp+48h+var_20] jnz short loc_6D5E4 mov rax, [rsp+48h+var_28] mov ecx, [rax] add ecx, 1 mov [rax], ecx mov rax, [rsp+48h+var_28] mov [rsp+48h+var_8], rax jmp loc_6D6F5 loc_6D5E4: jmp short $+2 loc_6D5E6: mov rax, [rsp+48h+var_30] mov rax, [rax+8] mov [rsp+48h+var_30], rax jmp short loc_6D584 loc_6D5F6: mov rdi, [rsp+48h+var_10] mov esi, 30h ; '0' call js_malloc mov [rsp+48h+var_28], rax cmp [rsp+48h+var_28], 0 jnz short loc_6D620 mov [rsp+48h+var_8], 0 jmp loc_6D6F5 loc_6D620: mov rax, [rsp+48h+var_28] mov dword ptr [rax], 1 mov rax, [rsp+48h+var_28] mov cl, [rax+5] and cl, 0FEh or cl, 0 mov [rax+5], cl mov eax, [rsp+48h+var_20] mov dl, al mov rax, [rsp+48h+var_28] mov cl, [rax+5] and dl, 1 shl dl, 1 and cl, 0FDh or cl, dl mov [rax+5], cl mov eax, [rsp+48h+var_1C] mov cx, ax mov rax, [rsp+48h+var_28] mov [rax+6], cx mov rdi, [rsp+48h+var_28] add rdi, 8 mov rsi, [rsp+48h+var_18] add rsi, 28h ; '(' call list_add_tail_1 cmp [rsp+48h+var_20], 0 jz short loc_6D6A5 mov rax, [rsp+48h+var_18] mov rcx, [rax+18h] movsxd rax, [rsp+48h+var_1C] shl rax, 4 add rcx, rax mov rax, [rsp+48h+var_28] mov [rax+18h], rcx jmp short loc_6D6C3 loc_6D6A5: mov rax, [rsp+48h+var_18] mov rcx, [rax+20h] movsxd rax, [rsp+48h+var_1C] shl rax, 4 add rcx, rax mov rax, [rsp+48h+var_28] mov [rax+18h], rcx loc_6D6C3: mov rax, [rsp+48h+var_28] mov dword ptr [rsp+48h+var_40], 0 mov [rsp+48h+var_38], 3 mov rcx, [rsp+48h+var_40] mov [rax+20h], rcx mov rcx, [rsp+48h+var_38] mov [rax+28h], rcx mov rax, [rsp+48h+var_28] mov [rsp+48h+var_8], rax loc_6D6F5: mov rax, [rsp+48h+var_8] add rsp, 48h retn
long long get_var_ref(long long a1, _QWORD *a2, int a3, int a4) { long long v4; // rcx long long v6; // [rsp+8h] [rbp-40h] _QWORD *i; // [rsp+18h] [rbp-30h] _QWORD *v8; // [rsp+20h] [rbp-28h] long long v9; // [rsp+20h] [rbp-28h] for ( i = (_QWORD *)a2[6]; i != a2 + 5; i = (_QWORD *)i[1] ) { v8 = i - 1; if ( *((unsigned __int16 *)i - 1) == a3 && ((*((_BYTE *)v8 + 5) & 2) != 0) == a4 ) { ++*(_DWORD *)v8; return (long long)(i - 1); } } v9 = js_malloc(a1, 48LL); if ( !v9 ) return 0LL; *(_DWORD *)v9 = 1; *(_BYTE *)(v9 + 5) &= ~1u; *(_BYTE *)(v9 + 5) = (2 * (a4 & 1)) | *(_BYTE *)(v9 + 5) & 0xFD; *(_WORD *)(v9 + 6) = a3; list_add_tail_1(v9 + 8, a2 + 5); if ( a4 ) v4 = a2[3]; else v4 = a2[4]; *(_QWORD *)(v9 + 24) = 16LL * a3 + v4; LODWORD(v6) = 0; *(_QWORD *)(v9 + 32) = v6; *(_QWORD *)(v9 + 40) = 3LL; return v9; }
get_var_ref: SUB RSP,0x48 MOV qword ptr [RSP + 0x38],RDI MOV qword ptr [RSP + 0x30],RSI MOV dword ptr [RSP + 0x2c],EDX MOV dword ptr [RSP + 0x28],ECX MOV RAX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RSP + 0x18],RAX LAB_0016d584: MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x30] ADD RCX,0x28 CMP RAX,RCX JZ 0x0016d5f6 MOV RAX,qword ptr [RSP + 0x18] ADD RAX,-0x8 MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x20] MOVZX EAX,word ptr [RAX + 0x6] CMP EAX,dword ptr [RSP + 0x2c] JNZ 0x0016d5e4 MOV RAX,qword ptr [RSP + 0x20] MOV AL,byte ptr [RAX + 0x5] SHR AL,0x1 AND AL,0x1 MOVZX EAX,AL CMP EAX,dword ptr [RSP + 0x28] JNZ 0x0016d5e4 MOV RAX,qword ptr [RSP + 0x20] MOV ECX,dword ptr [RAX] ADD ECX,0x1 MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x40],RAX JMP 0x0016d6f5 LAB_0016d5e4: JMP 0x0016d5e6 LAB_0016d5e6: MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x18],RAX JMP 0x0016d584 LAB_0016d5f6: MOV RDI,qword ptr [RSP + 0x38] MOV ESI,0x30 CALL 0x00127fa0 MOV qword ptr [RSP + 0x20],RAX CMP qword ptr [RSP + 0x20],0x0 JNZ 0x0016d620 MOV qword ptr [RSP + 0x40],0x0 JMP 0x0016d6f5 LAB_0016d620: MOV RAX,qword ptr [RSP + 0x20] MOV dword ptr [RAX],0x1 MOV RAX,qword ptr [RSP + 0x20] MOV CL,byte ptr [RAX + 0x5] AND CL,0xfe OR CL,0x0 MOV byte ptr [RAX + 0x5],CL MOV EAX,dword ptr [RSP + 0x28] MOV DL,AL MOV RAX,qword ptr [RSP + 0x20] MOV CL,byte ptr [RAX + 0x5] AND DL,0x1 SHL DL,0x1 AND CL,0xfd OR CL,DL MOV byte ptr [RAX + 0x5],CL MOV EAX,dword ptr [RSP + 0x2c] MOV CX,AX MOV RAX,qword ptr [RSP + 0x20] MOV word ptr [RAX + 0x6],CX MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0x8 MOV RSI,qword ptr [RSP + 0x30] ADD RSI,0x28 CALL 0x00129d40 CMP dword ptr [RSP + 0x28],0x0 JZ 0x0016d6a5 MOV RAX,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RAX + 0x18] MOVSXD RAX,dword ptr [RSP + 0x2c] SHL RAX,0x4 ADD RCX,RAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x18],RCX JMP 0x0016d6c3 LAB_0016d6a5: MOV RAX,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RAX + 0x20] MOVSXD RAX,dword ptr [RSP + 0x2c] SHL RAX,0x4 ADD RCX,RAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x18],RCX LAB_0016d6c3: MOV RAX,qword ptr [RSP + 0x20] MOV dword ptr [RSP + 0x8],0x0 MOV qword ptr [RSP + 0x10],0x3 MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x20],RCX MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x28],RCX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x40],RAX LAB_0016d6f5: MOV RAX,qword ptr [RSP + 0x40] ADD RSP,0x48 RET
int * get_var_ref(int8 param_1,long param_2,uint param_3,uint param_4) { int *piVar1; uint uStack_3c; long local_30; int *local_8; local_30 = *(long *)(param_2 + 0x30); while( true ) { if (local_30 == param_2 + 0x28) { local_8 = (int *)js_malloc(param_1,0x30); if (local_8 == (int *)0x0) { local_8 = (int *)0x0; } else { *local_8 = 1; *(byte *)((long)local_8 + 5) = *(byte *)((long)local_8 + 5) & 0xfe; *(byte *)((long)local_8 + 5) = *(byte *)((long)local_8 + 5) & 0xfd | ((byte)param_4 & 1) << 1; *(short *)((long)local_8 + 6) = (short)param_3; list_add_tail(local_8 + 2,param_2 + 0x28); if (param_4 == 0) { *(long *)(local_8 + 6) = *(long *)(param_2 + 0x20) + (long)(int)param_3 * 0x10; } else { *(long *)(local_8 + 6) = *(long *)(param_2 + 0x18) + (long)(int)param_3 * 0x10; } *(ulong *)(local_8 + 8) = (ulong)uStack_3c << 0x20; local_8[10] = 3; local_8[0xb] = 0; } return local_8; } piVar1 = (int *)(local_30 + -8); if ((*(ushort *)(local_30 + -2) == param_3) && ((*(byte *)(local_30 + -3) >> 1 & 1) == param_4)) break; local_30 = *(long *)(local_30 + 8); } *piVar1 = *piVar1 + 1; return piVar1; }
40,610
my_wc_mb_gb2312
eloqsql/strings/ctype-gb2312.c
static int my_wc_mb_gb2312(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { int code; if (s >= e) return MY_CS_TOOSMALL; if ((uint) wc < 0x80) { s[0]= (uchar) wc; return 1; } if (!(code=func_uni_gb2312_onechar(wc))) return MY_CS_ILUNI; if (s+2>e) return MY_CS_TOOSMALL2; code|=0x8080; s[0]=code>>8; s[1]=code&0xFF; return 2; }
O0
c
my_wc_mb_gb2312: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x734ee movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x73572 movq -0x18(%rbp), %rax cmpl $0x80, %eax jae 0x7350e movq -0x18(%rbp), %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x1, -0x4(%rbp) jmp 0x73572 movq -0x18(%rbp), %rax movl %eax, %edi callq 0x73860 movl %eax, -0x2c(%rbp) cmpl $0x0, %eax jne 0x7352a movl $0x0, -0x4(%rbp) jmp 0x73572 movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x73541 movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x73572 movl -0x2c(%rbp), %eax orl $0x8080, %eax # imm = 0x8080 movl %eax, -0x2c(%rbp) movl -0x2c(%rbp), %eax sarl $0x8, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl -0x2c(%rbp), %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x1(%rax) movl $0x2, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
my_wc_mb_gb2312: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_734EE mov [rbp+var_4], 0FFFFFF9Bh jmp loc_73572 loc_734EE: mov rax, [rbp+var_18] cmp eax, 80h jnb short loc_7350E mov rax, [rbp+var_18] mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 1 jmp short loc_73572 loc_7350E: mov rax, [rbp+var_18] mov edi, eax call func_uni_gb2312_onechar mov [rbp+var_2C], eax cmp eax, 0 jnz short loc_7352A mov [rbp+var_4], 0 jmp short loc_73572 loc_7352A: mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_73541 mov [rbp+var_4], 0FFFFFF9Ah jmp short loc_73572 loc_73541: mov eax, [rbp+var_2C] or eax, 8080h mov [rbp+var_2C], eax mov eax, [rbp+var_2C] sar eax, 8 mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov eax, [rbp+var_2C] and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax+1], cl mov [rbp+var_4], 2 loc_73572: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long my_wc_mb_gb2312(long long a1, unsigned int a2, _BYTE *a3, unsigned long long a4) { int v5; // [rsp+4h] [rbp-2Ch] __int16 v6; // [rsp+4h] [rbp-2Ch] if ( (unsigned long long)a3 < a4 ) { if ( a2 >= 0x80 ) { v5 = func_uni_gb2312_onechar(a2); if ( v5 ) { if ( (unsigned long long)(a3 + 2) <= a4 ) { v6 = v5 | 0x8080; *a3 = HIBYTE(v6); a3[1] = v6; return 2; } else { return (unsigned int)-102; } } else { return 0; } } else { *a3 = a2; return 1; } } else { return (unsigned int)-101; } }
my_wc_mb_gb2312: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x001734ee MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x00173572 LAB_001734ee: MOV RAX,qword ptr [RBP + -0x18] CMP EAX,0x80 JNC 0x0017350e MOV RAX,qword ptr [RBP + -0x18] MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x1 JMP 0x00173572 LAB_0017350e: MOV RAX,qword ptr [RBP + -0x18] MOV EDI,EAX CALL 0x00173860 MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JNZ 0x0017352a MOV dword ptr [RBP + -0x4],0x0 JMP 0x00173572 LAB_0017352a: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x00173541 MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x00173572 LAB_00173541: MOV EAX,dword ptr [RBP + -0x2c] OR EAX,0x8080 MOV dword ptr [RBP + -0x2c],EAX MOV EAX,dword ptr [RBP + -0x2c] SAR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x2c] AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x1],CL MOV dword ptr [RBP + -0x4],0x2 LAB_00173572: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 my_wc_mb_gb2312(int8 param_1,uint param_2,int1 *param_3,int1 *param_4) { uint uVar1; int4 local_c; if (param_3 < param_4) { if (param_2 < 0x80) { *param_3 = (char)param_2; local_c = 1; } else { uVar1 = func_uni_gb2312_onechar(param_2); if (uVar1 == 0) { local_c = 0; } else if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else { *param_3 = (char)((uVar1 | 0x8080) >> 8); param_3[1] = (char)(uVar1 | 0x8080); local_c = 2; } } } else { local_c = 0xffffff9b; } return local_c; }
40,611
my_wc_mb_gb2312
eloqsql/strings/ctype-gb2312.c
static int my_wc_mb_gb2312(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { int code; if (s >= e) return MY_CS_TOOSMALL; if ((uint) wc < 0x80) { s[0]= (uchar) wc; return 1; } if (!(code=func_uni_gb2312_onechar(wc))) return MY_CS_ILUNI; if (s+2>e) return MY_CS_TOOSMALL2; code|=0x8080; s[0]=code>>8; s[1]=code&0xFF; return 2; }
O3
c
my_wc_mb_gb2312: movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x55880 cmpl $0x7f, %esi ja 0x55881 movb %sil, (%rdx) movl $0x1, %eax retq leal -0xa4(%rsi), %eax cmpl $0x138, %eax # imm = 0x138 ja 0x5589c movl %eax, %eax leaq 0x13c1b9(%rip), %rsi # 0x191a50 jmp 0x55977 leal -0x2c7(%rsi), %eax cmpl $0x18a, %eax # imm = 0x18A ja 0x558b7 movl %eax, %eax leaq 0x13c41e(%rip), %rsi # 0x191cd0 jmp 0x55977 leal -0x2015(%rsi), %eax cmpl $0x2fd, %eax # imm = 0x2FD ja 0x558d2 movl %eax, %eax leaq 0x13c723(%rip), %rsi # 0x191ff0 jmp 0x55977 leal -0x2460(%rsi), %eax cmpl $0x1e2, %eax # imm = 0x1E2 ja 0x558ed movl %eax, %eax leaq 0x13cd08(%rip), %rsi # 0x1925f0 jmp 0x55977 leal -0x3000(%rsi), %eax cmpl $0x129, %eax # imm = 0x129 ja 0x55905 movl %eax, %eax leaq 0x13d0bd(%rip), %rsi # 0x1929c0 jmp 0x55977 leal -0x3220(%rsi), %eax cmpl $0x9, %eax ja 0x5591b movl %eax, %eax leaq 0x13d307(%rip), %rsi # 0x192c20 jmp 0x55977 leal -0x4e00(%rsi), %eax cmpl $0x4d54, %eax # imm = 0x4D54 ja 0x55933 movl %eax, %eax leaq 0x13d30f(%rip), %rsi # 0x192c40 jmp 0x55977 leal -0x9c7c(%rsi), %eax cmpl $0x66, %eax ja 0x55949 movl %eax, %eax leaq 0x146da9(%rip), %rsi # 0x19c6f0 jmp 0x55977 leal -0x9e1f(%rsi), %eax cmpl $0x181, %eax # imm = 0x181 ja 0x55961 movl %eax, %eax leaq 0x146e61(%rip), %rsi # 0x19c7c0 jmp 0x55977 leal -0xff01(%rsi), %eax cmpl $0xe4, %eax ja 0x559ad movl %eax, %eax leaq 0x147159(%rip), %rsi # 0x19cad0 leaq (%rsi,%rax,2), %rax pushq %rbp movq %rsp, %rbp movzwl (%rax), %esi testw %si, %si je 0x559a9 leaq 0x2(%rdx), %rdi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rdi ja 0x559ab orl $0x8080, %esi # imm = 0x8080 rolw $0x8, %si movw %si, (%rdx) movl $0x2, %eax jmp 0x559ab xorl %eax, %eax popq %rbp retq xorl %eax, %eax retq
my_wc_mb_gb2312: mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short locret_55880 cmp esi, 7Fh ja short loc_55881 mov [rdx], sil mov eax, 1 locret_55880: retn loc_55881: lea eax, [rsi-0A4h] cmp eax, 138h ja short loc_5589C mov eax, eax lea rsi, tab_uni_gb23120 jmp loc_55977 loc_5589C: lea eax, [rsi-2C7h] cmp eax, 18Ah ja short loc_558B7 mov eax, eax lea rsi, tab_uni_gb23121 jmp loc_55977 loc_558B7: lea eax, [rsi-2015h] cmp eax, 2FDh ja short loc_558D2 mov eax, eax lea rsi, tab_uni_gb23122; "*!,!" jmp loc_55977 loc_558D2: lea eax, [rsi-2460h] cmp eax, 1E2h ja short loc_558ED mov eax, eax lea rsi, tab_uni_gb23123; "Y\"Z\"[\"\\\"]\"^\"_\"`\"a\"b\"" jmp loc_55977 loc_558ED: lea eax, [rsi-3000h] cmp eax, 129h ja short loc_55905 mov eax, eax lea rsi, tab_uni_gb23124; "!!\"!#!(!" jmp short loc_55977 loc_55905: lea eax, [rsi-3220h] cmp eax, 9 ja short loc_5591B mov eax, eax lea rsi, tab_uni_gb23125; "e\"f\"g\"h\"i\"j\"k\"l\"m\"n\"" jmp short loc_55977 loc_5591B: lea eax, [rsi-4E00h] cmp eax, 4D54h ja short loc_55933 mov eax, eax lea rsi, tab_uni_gb23126; ";R!6" jmp short loc_55977 loc_55933: lea eax, [rsi-9C7Ch] cmp eax, 66h ; 'f' ja short loc_55949 mov eax, eax lea rsi, tab_uni_gb23127 jmp short loc_55977 loc_55949: lea eax, [rsi-9E1Fh] cmp eax, 181h ja short loc_55961 mov eax, eax lea rsi, tab_uni_gb23128; "qD/p&<0pyC" jmp short loc_55977 loc_55961: lea eax, [rsi-0FF01h] cmp eax, 0E4h ja short loc_559AD mov eax, eax lea rsi, tab_uni_gb23129; "!#\"###g!%#&#'#(#)#*#+#,#-#.#/#0#1#2#3#"... loc_55977: lea rax, [rsi+rax*2] push rbp mov rbp, rsp movzx esi, word ptr [rax] test si, si jz short loc_559A9 lea rdi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rdi, rcx ja short loc_559AB or esi, 8080h rol si, 8 mov [rdx], si mov eax, 2 jmp short loc_559AB loc_559A9: xor eax, eax loc_559AB: pop rbp retn loc_559AD: xor eax, eax retn
long long my_wc_mb_gb2312(long long a1, unsigned int a2, _WORD *a3, unsigned long long a4) { long long result; // rax long long v5; // rax const char *v6; // rsi __int16 v7; // si result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { if ( a2 > 0x7F ) { LODWORD(v5) = a2 - 164; if ( a2 - 164 > 0x138 ) { LODWORD(v5) = a2 - 711; if ( a2 - 711 > 0x18A ) { LODWORD(v5) = a2 - 8213; if ( a2 - 8213 > 0x2FD ) { LODWORD(v5) = a2 - 9312; if ( a2 - 9312 > 0x1E2 ) { LODWORD(v5) = a2 - 12288; if ( a2 - 12288 > 0x129 ) { LODWORD(v5) = a2 - 12832; if ( a2 - 12832 > 9 ) { LODWORD(v5) = a2 - 19968; if ( a2 - 19968 > 0x4D54 ) { LODWORD(v5) = a2 - 40060; if ( a2 - 40060 > 0x66 ) { LODWORD(v5) = a2 - 40479; if ( a2 - 40479 > 0x181 ) { LODWORD(v5) = a2 - 65281; if ( a2 - 65281 > 0xE4 ) return 0LL; v5 = (unsigned int)v5; v6 = "!#\"###g!%#&#'#(#)#*#+#,#-#.#/#0#1#2#3#4#5#6#7#8#9#:#;#<#=#>#?#@#A#B#C#D#E#F#G#H#I#J#K#L#M#" "N#O#P#Q#R#S#T#U#V#W#X#Y#Z#[#\\#]#^#_#`#a#b#c#d#e#f#g#h#i#j#k#l#m#n#o#p#q#r#s#t#u#v#w#x#y#z#{#|#}#+!"; } else { v5 = (unsigned int)v5; v6 = "qD/p&<0pyC"; } } else { v5 = (unsigned int)v5; v6 = (const char *)&tab_uni_gb23127; } } else { v5 = (unsigned int)v5; v6 = ";R!6"; } } else { v5 = (unsigned int)v5; v6 = "e\"f\"g\"h\"i\"j\"k\"l\"m\"n\""; } } else { v5 = (unsigned int)v5; v6 = "!!\"!#!(!"; } } else { v5 = (unsigned int)v5; v6 = "Y\"Z\"[\"\\\"]\"^\"_\"`\"a\"b\""; } } else { v5 = (unsigned int)v5; v6 = "*!,!"; } } else { v5 = (unsigned int)v5; v6 = (const char *)&tab_uni_gb23121; } } else { v5 = (unsigned int)v5; v6 = (const char *)&tab_uni_gb23120; } v7 = *(_WORD *)&v6[2 * v5]; if ( v7 ) { result = 4294967194LL; if ( (unsigned long long)(a3 + 1) <= a4 ) { *a3 = __ROL2__(v7 | 0x8080, 8); return 2LL; } } else { return 0LL; } } else { *(_BYTE *)a3 = a2; return 1LL; } } return result; }
my_wc_mb_gb2312: MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x00155880 CMP ESI,0x7f JA 0x00155881 MOV byte ptr [RDX],SIL MOV EAX,0x1 LAB_00155880: RET LAB_00155881: LEA EAX,[RSI + -0xa4] CMP EAX,0x138 JA 0x0015589c MOV EAX,EAX LEA RSI,[0x291a50] JMP 0x00155977 LAB_0015589c: LEA EAX,[RSI + -0x2c7] CMP EAX,0x18a JA 0x001558b7 MOV EAX,EAX LEA RSI,[0x291cd0] JMP 0x00155977 LAB_001558b7: LEA EAX,[RSI + -0x2015] CMP EAX,0x2fd JA 0x001558d2 MOV EAX,EAX LEA RSI,[0x291ff0] JMP 0x00155977 LAB_001558d2: LEA EAX,[RSI + -0x2460] CMP EAX,0x1e2 JA 0x001558ed MOV EAX,EAX LEA RSI,[0x2925f0] JMP 0x00155977 LAB_001558ed: LEA EAX,[RSI + -0x3000] CMP EAX,0x129 JA 0x00155905 MOV EAX,EAX LEA RSI,[0x2929c0] JMP 0x00155977 LAB_00155905: LEA EAX,[RSI + -0x3220] CMP EAX,0x9 JA 0x0015591b MOV EAX,EAX LEA RSI,[0x292c20] JMP 0x00155977 LAB_0015591b: LEA EAX,[RSI + -0x4e00] CMP EAX,0x4d54 JA 0x00155933 MOV EAX,EAX LEA RSI,[0x292c40] JMP 0x00155977 LAB_00155933: LEA EAX,[RSI + -0x9c7c] CMP EAX,0x66 JA 0x00155949 MOV EAX,EAX LEA RSI,[0x29c6f0] JMP 0x00155977 LAB_00155949: LEA EAX,[RSI + -0x9e1f] CMP EAX,0x181 JA 0x00155961 MOV EAX,EAX LEA RSI,[0x29c7c0] JMP 0x00155977 LAB_00155961: LEA EAX,[RSI + -0xff01] CMP EAX,0xe4 JA 0x001559ad MOV EAX,EAX LEA RSI,[0x29cad0] LAB_00155977: LEA RAX,[RSI + RAX*0x2] PUSH RBP MOV RBP,RSP MOVZX ESI,word ptr [RAX] TEST SI,SI JZ 0x001559a9 LEA RDI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RDI,RCX JA 0x001559ab OR ESI,0x8080 ROL SI,0x8 MOV word ptr [RDX],SI MOV EAX,0x2 JMP 0x001559ab LAB_001559a9: XOR EAX,EAX LAB_001559ab: POP RBP RET LAB_001559ad: XOR EAX,EAX RET
int8 my_wc_mb_gb2312(int8 param_1,uint param_2,ushort *param_3,ushort *param_4) { int8 uVar1; ulong uVar2; ushort uVar3; int1 *puVar4; uVar1 = 0xffffff9b; if (param_3 < param_4) { if (0x7f < param_2) { if (param_2 - 0xa4 < 0x139) { uVar2 = (ulong)(param_2 - 0xa4); puVar4 = tab_uni_gb23120; } else if (param_2 - 0x2c7 < 0x18b) { uVar2 = (ulong)(param_2 - 0x2c7); puVar4 = tab_uni_gb23121; } else if (param_2 - 0x2015 < 0x2fe) { uVar2 = (ulong)(param_2 - 0x2015); puVar4 = tab_uni_gb23122; } else if (param_2 - 0x2460 < 0x1e3) { uVar2 = (ulong)(param_2 - 0x2460); puVar4 = tab_uni_gb23123; } else if (param_2 - 0x3000 < 0x12a) { uVar2 = (ulong)(param_2 - 0x3000); puVar4 = tab_uni_gb23124; } else if (param_2 - 0x3220 < 10) { uVar2 = (ulong)(param_2 - 0x3220); puVar4 = tab_uni_gb23125; } else if (param_2 - 0x4e00 < 0x4d55) { uVar2 = (ulong)(param_2 - 0x4e00); puVar4 = &tab_uni_gb23126; } else if (param_2 - 0x9c7c < 0x67) { uVar2 = (ulong)(param_2 - 0x9c7c); puVar4 = tab_uni_gb23127; } else if (param_2 - 0x9e1f < 0x182) { uVar2 = (ulong)(param_2 - 0x9e1f); puVar4 = tab_uni_gb23128; } else { uVar2 = (ulong)(param_2 - 0xff01); if (0xe4 < param_2 - 0xff01) { return 0; } puVar4 = tab_uni_gb23129; } if (*(ushort *)(puVar4 + uVar2 * 2) == 0) { uVar1 = 0; } else { uVar1 = 0xffffff9a; if (param_3 + 1 <= param_4) { uVar3 = *(ushort *)(puVar4 + uVar2 * 2) | 0x8080; *param_3 = uVar3 << 8 | uVar3 >> 8; uVar1 = 2; } } return uVar1; } *(char *)param_3 = (char)param_2; uVar1 = 1; } return uVar1; }
40,612
store_extent_info
eloqsql/storage/maria/ma_blockrec.c
static void store_extent_info(uchar *to, uchar *row_extents_second_part, MARIA_BITMAP_BLOCK *first_block, uint count) { MARIA_BITMAP_BLOCK *block, *end_block; uint copy_length; my_bool first_found= 0; DBUG_ENTER("store_extent_info"); DBUG_PRINT("enter", ("count: %u", count)); for (block= first_block, end_block= first_block+count ; block < end_block; block++) { /* The following is only false for marker (unused) blocks */ if (likely(block->used & BLOCKUSED_USED)) { uint page_count= block->page_count; DBUG_ASSERT(page_count != 0); page_store(to, block->page); if (block->sub_blocks) { /* Set a bit so that we later know that this was the first block for a blob */ page_count|= START_EXTENT_BIT; } pagerange_store(to + PAGE_STORE_SIZE, page_count); DBUG_DUMP("extent", to, ROW_EXTENT_SIZE); to+= ROW_EXTENT_SIZE; if (!first_found) { first_found= 1; to= row_extents_second_part; } } } copy_length= (count - 1) * ROW_EXTENT_SIZE; /* In some unlikely cases we have allocated to many blocks. Clear this data. */ bzero(to, (size_t) (row_extents_second_part + copy_length - to)); DBUG_VOID_RETURN; }
O3
c
store_extent_info: movq %rdx, %rax movq %rsi, %rdx testl %ecx, %ecx je 0x5243d pushq %rbp movq %rsp, %rbp movl %ecx, %esi leaq (%rsi,%rsi,2), %rsi leaq (%rax,%rsi,8), %rsi xorl %r8d, %r8d testb $0x1, 0x14(%rax) je 0x52433 movl (%rax), %r9d movl 0x8(%rax), %r10d movl %r9d, (%rdi) movb 0x4(%rax), %r9b movb %r9b, 0x4(%rdi) movl %r10d, %r9d orl $0x4000, %r9d # imm = 0x4000 cmpl $0x0, 0x10(%rax) cmovel %r10d, %r9d movw %r9w, 0x5(%rdi) addq $0x7, %rdi testb %r8b, %r8b cmoveq %rdx, %rdi movb $0x1, %r8b addq $0x18, %rax cmpq %rsi, %rax jb 0x523f6 popq %rbp leal (,%rcx,8), %eax subl %ecx, %eax addl $-0x7, %eax addq %rax, %rdx subq %rdi, %rdx xorl %esi, %esi jmp 0x292b0
store_extent_info: mov rax, rdx mov rdx, rsi test ecx, ecx jz short loc_5243D push rbp mov rbp, rsp mov esi, ecx lea rsi, [rsi+rsi*2] lea rsi, [rax+rsi*8] xor r8d, r8d loc_523F6: test byte ptr [rax+14h], 1 jz short loc_52433 mov r9d, [rax] mov r10d, [rax+8] mov [rdi], r9d mov r9b, [rax+4] mov [rdi+4], r9b mov r9d, r10d or r9d, 4000h cmp dword ptr [rax+10h], 0 cmovz r9d, r10d mov [rdi+5], r9w add rdi, 7 test r8b, r8b cmovz rdi, rdx mov r8b, 1 loc_52433: add rax, 18h cmp rax, rsi jb short loc_523F6 pop rbp loc_5243D: lea eax, ds:0[rcx*8] sub eax, ecx add eax, 0FFFFFFF9h add rdx, rax sub rdx, rdi xor esi, esi jmp _memset
long long store_extent_info(long long a1, long long a2, unsigned long long a3, unsigned int a4) { unsigned long long v6; // rsi char v7; // r8 int v8; // r10d __int16 v9; // r9 if ( a4 ) { v6 = a3 + 24LL * a4; v7 = 0; do { if ( (*(_BYTE *)(a3 + 20) & 1) != 0 ) { v8 = *(_DWORD *)(a3 + 8); *(_DWORD *)a1 = *(_DWORD *)a3; *(_BYTE *)(a1 + 4) = *(_BYTE *)(a3 + 4); v9 = v8 | 0x4000; if ( !*(_DWORD *)(a3 + 16) ) v9 = v8; *(_WORD *)(a1 + 5) = v9; a1 += 7LL; if ( !v7 ) a1 = a2; v7 = 1; } a3 += 24LL; } while ( a3 < v6 ); } return memset(a1, 0LL, 7 * a4 - 7 + a2 - a1); }
store_extent_info: MOV RAX,RDX MOV RDX,RSI TEST ECX,ECX JZ 0x0015243d PUSH RBP MOV RBP,RSP MOV ESI,ECX LEA RSI,[RSI + RSI*0x2] LEA RSI,[RAX + RSI*0x8] XOR R8D,R8D LAB_001523f6: TEST byte ptr [RAX + 0x14],0x1 JZ 0x00152433 MOV R9D,dword ptr [RAX] MOV R10D,dword ptr [RAX + 0x8] MOV dword ptr [RDI],R9D MOV R9B,byte ptr [RAX + 0x4] MOV byte ptr [RDI + 0x4],R9B MOV R9D,R10D OR R9D,0x4000 CMP dword ptr [RAX + 0x10],0x0 CMOVZ R9D,R10D MOV word ptr [RDI + 0x5],R9W ADD RDI,0x7 TEST R8B,R8B CMOVZ RDI,RDX MOV R8B,0x1 LAB_00152433: ADD RAX,0x18 CMP RAX,RSI JC 0x001523f6 POP RBP LAB_0015243d: LEA EAX,[RCX*0x8] SUB EAX,ECX ADD EAX,-0x7 ADD RDX,RAX SUB RDX,RDI XOR ESI,ESI JMP 0x001292b0
void store_extent_info(int4 *param_1,int4 *param_2,int4 *param_3,uint param_4) { int4 *puVar1; int4 uVar2; bool bVar3; ushort uVar4; if (param_4 != 0) { puVar1 = param_3 + (ulong)param_4 * 6; bVar3 = false; do { if ((*(byte *)(param_3 + 5) & 1) != 0) { uVar2 = param_3[2]; *param_1 = *param_3; *(int1 *)(param_1 + 1) = *(int1 *)(param_3 + 1); uVar4 = (ushort)uVar2 | 0x4000; if (param_3[4] == 0) { uVar4 = (ushort)uVar2; } *(ushort *)((long)param_1 + 5) = uVar4; param_1 = (int4 *)((long)param_1 + 7); if (!bVar3) { param_1 = param_2; } bVar3 = true; } param_3 = param_3 + 6; } while (param_3 < puVar1); } memset(param_1,0,(long)param_2 + ((ulong)(param_4 * 7 - 7) - (long)param_1)); return; }
40,613
load_4
eloqsql/plugin/auth_ed25519/ref10/sc_reduce.c
static crypto_uint64 load_4(const unsigned char *in) { crypto_uint64 result; result = (crypto_uint64) in[0]; result |= ((crypto_uint64) in[1]) << 8; result |= ((crypto_uint64) in[2]) << 16; result |= ((crypto_uint64) in[3]) << 24; return result; }
O0
c
load_4: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movzbl (%rax), %eax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movzbl 0x1(%rax), %eax shlq $0x8, %rax orq -0x10(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movzbl 0x2(%rax), %eax shlq $0x10, %rax orq -0x10(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movzbl 0x3(%rax), %eax shlq $0x18, %rax orq -0x10(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax popq %rbp retq nopw %cs:(%rax,%rax) nop
load_4: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] movzx eax, byte ptr [rax] mov [rbp+var_10], rax mov rax, [rbp+var_8] movzx eax, byte ptr [rax+1] shl rax, 8 or rax, [rbp+var_10] mov [rbp+var_10], rax mov rax, [rbp+var_8] movzx eax, byte ptr [rax+2] shl rax, 10h or rax, [rbp+var_10] mov [rbp+var_10], rax mov rax, [rbp+var_8] movzx eax, byte ptr [rax+3] shl rax, 18h or rax, [rbp+var_10] mov [rbp+var_10], rax mov rax, [rbp+var_10] pop rbp retn
unsigned long long load_4(unsigned __int16 *a1) { return *a1 | ((unsigned long long)*((unsigned __int8 *)a1 + 2) << 16) | ((unsigned long long)*((unsigned __int8 *)a1 + 3) << 24); }
load_4: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x1] SHL RAX,0x8 OR RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x2] SHL RAX,0x10 OR RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x3] SHL RAX,0x18 OR RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] POP RBP RET
int4 load_4(int4 *param_1) { return *param_1; }
40,614
testing::internal::FloatingPoint<float>::SignAndMagnitudeToBiased(unsigned int const&)
AlayaLite/build_O0/_deps/googletest-src/googletest/include/gtest/internal/gtest-internal.h
static Bits SignAndMagnitudeToBiased(const Bits& sam) { if (kSignBitMask & sam) { // sam represents a negative number. return ~sam + 1; } else { // sam represents a positive number. return kSignBitMask | sam; } }
O0
c
testing::internal::FloatingPoint<float>::SignAndMagnitudeToBiased(unsigned int const&): movq %rdi, -0x10(%rsp) movq -0x10(%rsp), %rax movl (%rax), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax je 0x2f489 movq -0x10(%rsp), %rax movl (%rax), %eax xorl $-0x1, %eax addl $0x1, %eax movl %eax, -0x4(%rsp) jmp 0x2f499 movq -0x10(%rsp), %rax movl (%rax), %eax orl $0x80000000, %eax # imm = 0x80000000 movl %eax, -0x4(%rsp) movl -0x4(%rsp), %eax retq nop
_ZN7testing8internal13FloatingPointIfE24SignAndMagnitudeToBiasedERKj: mov [rsp+var_10], rdi mov rax, [rsp+var_10] mov eax, [rax] and eax, 80000000h cmp eax, 0 jz short loc_2F489 mov rax, [rsp+var_10] mov eax, [rax] xor eax, 0FFFFFFFFh add eax, 1 mov [rsp+var_4], eax jmp short loc_2F499 loc_2F489: mov rax, [rsp+var_10] mov eax, [rax] or eax, 80000000h mov [rsp+var_4], eax loc_2F499: mov eax, [rsp+var_4] retn
long long testing::internal::FloatingPoint<float>::SignAndMagnitudeToBiased(int *a1) { if ( *a1 >= 0 ) return *a1 | 0x80000000; else return (unsigned int)-*a1; }
SignAndMagnitudeToBiased: MOV qword ptr [RSP + -0x10],RDI MOV RAX,qword ptr [RSP + -0x10] MOV EAX,dword ptr [RAX] AND EAX,0x80000000 CMP EAX,0x0 JZ 0x0012f489 MOV RAX,qword ptr [RSP + -0x10] MOV EAX,dword ptr [RAX] XOR EAX,0xffffffff ADD EAX,0x1 MOV dword ptr [RSP + -0x4],EAX JMP 0x0012f499 LAB_0012f489: MOV RAX,qword ptr [RSP + -0x10] MOV EAX,dword ptr [RAX] OR EAX,0x80000000 MOV dword ptr [RSP + -0x4],EAX LAB_0012f499: MOV EAX,dword ptr [RSP + -0x4] RET
/* testing::internal::FloatingPoint<float>::SignAndMagnitudeToBiased(unsigned int const&) */ uint testing::internal::FloatingPoint<float>::SignAndMagnitudeToBiased(uint *param_1) { int4 local_4; if ((*param_1 & 0x80000000) == 0) { local_4 = *param_1 | 0x80000000; } else { local_4 = (*param_1 ^ 0xffffffff) + 1; } return local_4; }
40,615
CLI::App::get_option_no_throw(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
MikePodsytnik[P]TCRtrie/build_O1/_deps/cli11-src/include/CLI/impl/App_inl.hpp
CLI11_INLINE Option *App::get_option_no_throw(std::string option_name) noexcept { for(Option_p &opt : options_) { if(opt->check_name(option_name)) { return opt.get(); } } for(auto &subc : subcommands_) { // also check down into nameless subcommands if(subc->get_name().empty()) { auto *opt = subc->get_option_no_throw(option_name); if(opt != nullptr) { return opt; } } } return nullptr; }
O1
cpp
CLI::App::get_option_no_throw(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rsi, %r14 movq %rdi, %r15 movq 0xd8(%rdi), %r12 movq 0xe0(%rdi), %r13 cmpq %r13, %r12 sete %bpl je 0x227a0 movq (%r12), %rdi movq %r14, %rsi callq 0x220e0 testb %al, %al je 0x2278f movq (%r12), %rbx testb %al, %al jne 0x227a0 addq $0x8, %r12 cmpq %r13, %r12 sete %bpl jne 0x2277b testb $0x1, %bpl je 0x22837 movq %r14, (%rsp) movq 0x280(%r15), %r13 movq 0x288(%r15), %r14 cmpq %r14, %r13 je 0x22835 leaq 0x18(%rsp), %r15 leaq 0x8(%rsp), %rbp movq (%r13), %r12 movb $0x1, %al cmpq $0x0, 0x10(%r12) jne 0x22828 movq %r15, 0x8(%rsp) movq (%rsp), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx addq %rsi, %rdx movq %rbp, %rdi callq 0x178c0 movq %r12, %rdi movq %rbp, %rsi callq 0x22750 movq %rax, %r12 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x22819 movq 0x18(%rsp), %rsi incq %rsi callq 0x7430 testq %r12, %r12 sete %al cmovneq %r12, %rbx leaq 0x8(%rsp), %rbp testb %al, %al je 0x22837 addq $0x10, %r13 cmpq %r14, %r13 jne 0x227cb xorl %ebx, %ebx movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x2284b movq %rax, %rdi callq 0xc892 nop
_ZN3CLI3App19get_option_no_throwENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp; __int64 push r15; int push r14; __int64 push r13; int push r12; __int64 push rbx; int sub rsp, 28h mov r14, rsi mov r15, rdi mov r12, [rdi+0D8h] mov r13, [rdi+0E0h] cmp r12, r13 setz bpl jz short loc_227A0 loc_2277B: mov rdi, [r12]; int mov rsi, r14; int call _ZNK3CLI6Option10check_nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::Option::check_name(std::string const&) test al, al jz short loc_2278F mov rbx, [r12] loc_2278F: test al, al jnz short loc_227A0 add r12, 8 cmp r12, r13 setz bpl jnz short loc_2277B loc_227A0: test bpl, 1 jz loc_22837 mov qword ptr [rsp+58h+var_58], r14; int mov r13, [r15+280h] mov r14, [r15+288h] cmp r13, r14 jz short loc_22835 lea r15, [rsp+58h+var_40] lea rbp, [rsp+58h+var_50] loc_227CB: mov r12, [r13+0] mov al, 1 cmp qword ptr [r12+10h], 0 jnz short loc_22828 mov [rsp+58h+var_50], r15; int mov rax, qword ptr [rsp+58h+var_58] mov rsi, [rax] mov rdx, [rax+8] add rdx, rsi mov rdi, rbp call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov rdi, r12 mov rsi, rbp call _ZN3CLI3App19get_option_no_throwENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::App::get_option_no_throw(std::string) mov r12, rax mov rdi, [rsp+58h+var_50]; void * cmp rdi, r15 jz short loc_22819 mov rsi, qword ptr [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_22819: test r12, r12 setz al cmovnz rbx, r12 lea rbp, [rsp+58h+var_50] loc_22828: test al, al jz short loc_22837 add r13, 10h cmp r13, r14 jnz short loc_227CB loc_22835: xor ebx, ebx loc_22837: mov rax, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_2284B: mov rdi, rax call __clang_call_terminate
long long CLI::App::get_option_no_throw(_QWORD *a1, _BYTE **a2) { long long v2; // rbx long long *v3; // r12 long long *v4; // r13 bool v5; // bp long long *v6; // r13 long long *v7; // r14 long long v8; // r12 bool v9; // al long long option_no_throw; // r12 void *v12[2]; // [rsp+8h] [rbp-50h] BYREF int v13[2]; // [rsp+18h] [rbp-40h] BYREF v3 = (long long *)a1[27]; v4 = (long long *)a1[28]; v5 = v3 == v4; if ( v3 != v4 ) { while ( !(unsigned __int8)CLI::Option::check_name(*v3, a2) ) { v5 = ++v3 == v4; if ( v3 == v4 ) goto LABEL_5; } v2 = *v3; } LABEL_5: if ( v5 ) { v6 = (long long *)a1[80]; v7 = (long long *)a1[81]; if ( v6 == v7 ) { return 0LL; } else { while ( 1 ) { v8 = *v6; v9 = 1; if ( !*(_QWORD *)(*v6 + 16) ) { v12[0] = v13; std::string::_M_construct<char *>(v12, *a2, (long long)&a2[1][(_QWORD)*a2]); option_no_throw = CLI::App::get_option_no_throw(v8, v12); if ( v12[0] != v13 ) operator delete(v12[0], *(_QWORD *)v13 + 1LL); v9 = option_no_throw == 0; if ( option_no_throw ) v2 = option_no_throw; } if ( !v9 ) break; v6 += 2; if ( v6 == v7 ) return 0LL; } } } return v2; }
get_option_no_throw: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14,RSI MOV R15,RDI MOV R12,qword ptr [RDI + 0xd8] MOV R13,qword ptr [RDI + 0xe0] CMP R12,R13 SETZ BPL JZ 0x001227a0 LAB_0012277b: MOV RDI,qword ptr [R12] LAB_0012277f: MOV RSI,R14 CALL 0x001220e0 TEST AL,AL JZ 0x0012278f MOV RBX,qword ptr [R12] LAB_0012278f: TEST AL,AL JNZ 0x001227a0 ADD R12,0x8 CMP R12,R13 SETZ BPL JNZ 0x0012277b LAB_001227a0: TEST BPL,0x1 JZ 0x00122837 MOV qword ptr [RSP],R14 MOV R13,qword ptr [R15 + 0x280] MOV R14,qword ptr [R15 + 0x288] CMP R13,R14 JZ 0x00122835 LEA R15,[RSP + 0x18] LEA RBP,[RSP + 0x8] LAB_001227cb: MOV R12,qword ptr [R13] MOV AL,0x1 CMP qword ptr [R12 + 0x10],0x0 JNZ 0x00122828 MOV qword ptr [RSP + 0x8],R15 MOV RAX,qword ptr [RSP] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] ADD RDX,RSI LAB_001227ec: MOV RDI,RBP CALL 0x001178c0 MOV RDI,R12 MOV RSI,RBP CALL 0x00122750 MOV R12,RAX MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R15 JZ 0x00122819 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00107430 LAB_00122819: TEST R12,R12 SETZ AL CMOVNZ RBX,R12 LEA RBP,[RSP + 0x8] LAB_00122828: TEST AL,AL JZ 0x00122837 ADD R13,0x10 CMP R13,R14 JNZ 0x001227cb LAB_00122835: XOR EBX,EBX LAB_00122837: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* CLI::App::get_option_no_throw(std::__cxx11::string) */ long __thiscall CLI::App::get_option_no_throw(App *this,string *param_2) { long *plVar1; char cVar2; long lVar3; long unaff_RBX; long *plVar4; bool bVar5; long *local_50 [2]; long local_40 [2]; plVar4 = *(long **)(this + 0xd8); plVar1 = *(long **)(this + 0xe0); do { if (plVar4 == plVar1) { LAB_001227a0: if (plVar4 == plVar1) { plVar4 = *(long **)(this + 0x280); plVar1 = *(long **)(this + 0x288); if (plVar4 != plVar1) { do { lVar3 = *plVar4; bVar5 = true; if (*(long *)(lVar3 + 0x10) == 0) { local_50[0] = local_40; /* try { // try from 001227ec to 001227f3 has its CatchHandler @ 00122849 */ std::__cxx11::string::_M_construct<char*> (local_50,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2); lVar3 = get_option_no_throw((App *)lVar3,local_50); if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } bVar5 = lVar3 == 0; if (!bVar5) { unaff_RBX = lVar3; } } if (!bVar5) { return unaff_RBX; } plVar4 = plVar4 + 2; } while (plVar4 != plVar1); } unaff_RBX = 0; } return unaff_RBX; } /* try { // try from 0012277f to 00122786 has its CatchHandler @ 0012284b */ cVar2 = Option::check_name((Option *)*plVar4,param_2); if (cVar2 != '\0') { unaff_RBX = *plVar4; goto LAB_001227a0; } plVar4 = plVar4 + 1; } while( true ); }
40,616
json_next_value
corpus-core[P]colibri-stateless/src/util/json.c
json_t json_next_value(json_t val, bytes_t* property_name, json_next_t type) { if (val.type == JSON_TYPE_INVALID || val.type == JSON_TYPE_NOT_FOUND) return val; const char* start = next_non_whitespace_token(val.start + (type == JSON_NEXT_FIRST ? 1 : val.len)); if (!start) return json(JSON_TYPE_INVALID, start, 0); if (type != JSON_NEXT_FIRST) { if (*start == ',') { start++; start = next_non_whitespace_token(start); if (!start) return json(JSON_TYPE_INVALID, val.start, 0); } } else type = val.type == JSON_TYPE_OBJECT ? JSON_NEXT_PROPERTY : JSON_NEXT_VALUE; if (*start == '}' || *start == ']') return json(JSON_TYPE_NOT_FOUND, start, 0); if (type == JSON_NEXT_PROPERTY) { if (*start != '"') return json(JSON_TYPE_INVALID, start, 0); const char* end_name = find_end(start + 1, '"', '"'); if (!end_name) return json(JSON_TYPE_INVALID, start, 0); if (property_name) { property_name->data = (uint8_t*) start + 1; property_name->len = end_name - start - 1; } start = next_non_whitespace_token(end_name + 1); if (!start || *start != ':') return json(JSON_TYPE_INVALID, start, 0); start = next_non_whitespace_token(start + 1); } return json_parse(start); }
O0
c
json_next_value: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x38(%rbp) movq %rdi, -0x30(%rbp) leaq 0x10(%rbp), %rax movq %rax, -0x28(%rbp) movq %rsi, -0x8(%rbp) movl %edx, -0xc(%rbp) cmpl $0x0, 0x10(%rax) je 0xa411f movq -0x28(%rbp), %rax cmpl $-0x1, 0x10(%rax) jne 0xa4142 movq -0x38(%rbp), %rax movq -0x28(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rdx movq %rdx, 0x8(%rax) movq 0x10(%rcx), %rcx movq %rcx, 0x10(%rax) jmp 0xa434c movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x40(%rbp) cmpl $0x0, -0xc(%rbp) jne 0xa415e movl $0x1, %eax movq %rax, -0x48(%rbp) jmp 0xa416a movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x48(%rbp) movq -0x40(%rbp), %rdi movq -0x48(%rbp), %rax addq %rax, %rdi callq 0xa3e90 movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) jne 0xa41a4 movq -0x38(%rbp), %rax movq -0x18(%rbp), %rcx movq %rcx, (%rax) movq $0x0, 0x8(%rax) movl $0x0, 0x10(%rax) jmp 0xa434c cmpl $0x0, -0xc(%rbp) je 0xa41fc movq -0x18(%rbp), %rax movsbl (%rax), %eax cmpl $0x2c, %eax jne 0xa41fa movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rdi callq 0xa3e90 movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) jne 0xa41f8 movq -0x38(%rbp), %rax movq -0x28(%rbp), %rcx movq (%rcx), %rcx movq %rcx, (%rax) movq $0x0, 0x8(%rax) movl $0x0, 0x10(%rax) jmp 0xa434c jmp 0xa41fa jmp 0xa4216 movq -0x28(%rbp), %rax movl 0x10(%rax), %edx movl $0x2, %eax movl $0x1, %ecx cmpl $0x3, %edx cmovel %ecx, %eax movl %eax, -0xc(%rbp) movq -0x18(%rbp), %rax movsbl (%rax), %eax cmpl $0x7d, %eax je 0xa422e movq -0x18(%rbp), %rax movsbl (%rax), %eax cmpl $0x5d, %eax jne 0xa424d movq -0x38(%rbp), %rax movq -0x18(%rbp), %rcx movq %rcx, (%rax) movq $0x0, 0x8(%rax) movl $0xffffffff, 0x10(%rax) # imm = 0xFFFFFFFF jmp 0xa434c cmpl $0x1, -0xc(%rbp) jne 0xa433f movq -0x18(%rbp), %rax movsbl (%rax), %eax cmpl $0x22, %eax je 0xa4282 movq -0x38(%rbp), %rax movq -0x18(%rbp), %rcx movq %rcx, (%rax) movq $0x0, 0x8(%rax) movl $0x0, 0x10(%rax) jmp 0xa434c movq -0x18(%rbp), %rdi addq $0x1, %rdi movl $0x22, %edx movl %edx, %esi callq 0xa3f10 movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) jne 0xa42c0 movq -0x38(%rbp), %rax movq -0x18(%rbp), %rcx movq %rcx, (%rax) movq $0x0, 0x8(%rax) movl $0x0, 0x10(%rax) jmp 0xa434c cmpq $0x0, -0x8(%rbp) je 0xa42ee movq -0x18(%rbp), %rcx addq $0x1, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x20(%rbp), %rax movq -0x18(%rbp), %rcx subq %rcx, %rax subq $0x1, %rax movl %eax, %ecx movq -0x8(%rbp), %rax movl %ecx, (%rax) movq -0x20(%rbp), %rdi addq $0x1, %rdi callq 0xa3e90 movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0xa4312 movq -0x18(%rbp), %rax movsbl (%rax), %eax cmpl $0x3a, %eax je 0xa432e movq -0x38(%rbp), %rax movq -0x18(%rbp), %rcx movq %rcx, (%rax) movq $0x0, 0x8(%rax) movl $0x0, 0x10(%rax) jmp 0xa434c movq -0x18(%rbp), %rdi addq $0x1, %rdi callq 0xa3e90 movq %rax, -0x18(%rbp) movq -0x38(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0xa3b90 movq -0x30(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
json_next_value: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_38], rdi mov [rbp+var_30], rdi lea rax, [rbp+arg_0] mov [rbp+var_28], rax mov [rbp+var_8], rsi mov [rbp+var_C], edx cmp dword ptr [rax+10h], 0 jz short loc_A411F mov rax, [rbp+var_28] cmp dword ptr [rax+10h], 0FFFFFFFFh jnz short loc_A4142 loc_A411F: mov rax, [rbp+var_38] mov rcx, [rbp+var_28] mov rdx, [rcx] mov [rax], rdx mov rdx, [rcx+8] mov [rax+8], rdx mov rcx, [rcx+10h] mov [rax+10h], rcx jmp loc_A434C loc_A4142: mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_40], rax cmp [rbp+var_C], 0 jnz short loc_A415E mov eax, 1 mov [rbp+var_48], rax jmp short loc_A416A loc_A415E: mov rax, [rbp+var_28] mov rax, [rax+8] mov [rbp+var_48], rax loc_A416A: mov rdi, [rbp+var_40] mov rax, [rbp+var_48] add rdi, rax call next_non_whitespace_token mov [rbp+var_18], rax cmp [rbp+var_18], 0 jnz short loc_A41A4 mov rax, [rbp+var_38] mov rcx, [rbp+var_18] mov [rax], rcx mov qword ptr [rax+8], 0 mov dword ptr [rax+10h], 0 jmp loc_A434C loc_A41A4: cmp [rbp+var_C], 0 jz short loc_A41FC mov rax, [rbp+var_18] movsx eax, byte ptr [rax] cmp eax, 2Ch ; ',' jnz short loc_A41FA mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax mov rdi, [rbp+var_18] call next_non_whitespace_token mov [rbp+var_18], rax cmp [rbp+var_18], 0 jnz short loc_A41F8 mov rax, [rbp+var_38] mov rcx, [rbp+var_28] mov rcx, [rcx] mov [rax], rcx mov qword ptr [rax+8], 0 mov dword ptr [rax+10h], 0 jmp loc_A434C loc_A41F8: jmp short $+2 loc_A41FA: jmp short loc_A4216 loc_A41FC: mov rax, [rbp+var_28] mov edx, [rax+10h] mov eax, 2 mov ecx, 1 cmp edx, 3 cmovz eax, ecx mov [rbp+var_C], eax loc_A4216: mov rax, [rbp+var_18] movsx eax, byte ptr [rax] cmp eax, 7Dh ; '}' jz short loc_A422E mov rax, [rbp+var_18] movsx eax, byte ptr [rax] cmp eax, 5Dh ; ']' jnz short loc_A424D loc_A422E: mov rax, [rbp+var_38] mov rcx, [rbp+var_18] mov [rax], rcx mov qword ptr [rax+8], 0 mov dword ptr [rax+10h], 0FFFFFFFFh jmp loc_A434C loc_A424D: cmp [rbp+var_C], 1 jnz loc_A433F mov rax, [rbp+var_18] movsx eax, byte ptr [rax] cmp eax, 22h ; '"' jz short loc_A4282 mov rax, [rbp+var_38] mov rcx, [rbp+var_18] mov [rax], rcx mov qword ptr [rax+8], 0 mov dword ptr [rax+10h], 0 jmp loc_A434C loc_A4282: mov rdi, [rbp+var_18] add rdi, 1 mov edx, 22h ; '"' mov esi, edx call find_end mov [rbp+var_20], rax cmp [rbp+var_20], 0 jnz short loc_A42C0 mov rax, [rbp+var_38] mov rcx, [rbp+var_18] mov [rax], rcx mov qword ptr [rax+8], 0 mov dword ptr [rax+10h], 0 jmp loc_A434C loc_A42C0: cmp [rbp+var_8], 0 jz short loc_A42EE mov rcx, [rbp+var_18] add rcx, 1 mov rax, [rbp+var_8] mov [rax+8], rcx mov rax, [rbp+var_20] mov rcx, [rbp+var_18] sub rax, rcx sub rax, 1 mov ecx, eax mov rax, [rbp+var_8] mov [rax], ecx loc_A42EE: mov rdi, [rbp+var_20] add rdi, 1 call next_non_whitespace_token mov [rbp+var_18], rax cmp [rbp+var_18], 0 jz short loc_A4312 mov rax, [rbp+var_18] movsx eax, byte ptr [rax] cmp eax, 3Ah ; ':' jz short loc_A432E loc_A4312: mov rax, [rbp+var_38] mov rcx, [rbp+var_18] mov [rax], rcx mov qword ptr [rax+8], 0 mov dword ptr [rax+10h], 0 jmp short loc_A434C loc_A432E: mov rdi, [rbp+var_18] add rdi, 1 call next_non_whitespace_token mov [rbp+var_18], rax loc_A433F: mov rdi, [rbp+var_38] mov rsi, [rbp+var_18] call json_parse loc_A434C: mov rax, [rbp+var_30] add rsp, 50h pop rbp retn
long long json_next_value( long long a1, long long a2, int a3, long long a4, long long a5, long long a6, long long a7, long long a8, long long a9) { int v9; // eax long long v11; // [rsp+8h] [rbp-48h] _BYTE *end; // [rsp+30h] [rbp-20h] _BYTE *non_whitespace_token; // [rsp+38h] [rbp-18h] _BYTE *v14; // [rsp+38h] [rbp-18h] int v15; // [rsp+44h] [rbp-Ch] v15 = a3; if ( (_DWORD)a9 && (_DWORD)a9 != -1 ) { if ( a3 ) v11 = a8; else v11 = 1LL; non_whitespace_token = next_non_whitespace_token((_BYTE *)(v11 + a7)); if ( non_whitespace_token ) { if ( v15 ) { if ( *non_whitespace_token == 44 ) { non_whitespace_token = next_non_whitespace_token(non_whitespace_token + 1); if ( !non_whitespace_token ) { *(_QWORD *)a1 = a7; *(_QWORD *)(a1 + 8) = 0LL; *(_DWORD *)(a1 + 16) = 0; return a1; } } } else { v9 = 2; if ( (_DWORD)a9 == 3 ) v9 = 1; v15 = v9; } if ( *non_whitespace_token != 125 && *non_whitespace_token != 93 ) { if ( v15 == 1 ) { if ( *non_whitespace_token != 34 ) { *(_QWORD *)a1 = non_whitespace_token; *(_QWORD *)(a1 + 8) = 0LL; *(_DWORD *)(a1 + 16) = 0; return a1; } end = find_end(non_whitespace_token + 1, 34, 34); if ( !end ) { *(_QWORD *)a1 = non_whitespace_token; *(_QWORD *)(a1 + 8) = 0LL; *(_DWORD *)(a1 + 16) = 0; return a1; } if ( a2 ) { *(_QWORD *)(a2 + 8) = non_whitespace_token + 1; *(_DWORD *)a2 = (_DWORD)end - (_DWORD)non_whitespace_token - 1; } v14 = next_non_whitespace_token(end + 1); if ( !v14 || *v14 != 58 ) { *(_QWORD *)a1 = v14; *(_QWORD *)(a1 + 8) = 0LL; *(_DWORD *)(a1 + 16) = 0; return a1; } non_whitespace_token = next_non_whitespace_token(v14 + 1); } json_parse(a1, (long long)non_whitespace_token); return a1; } *(_QWORD *)a1 = non_whitespace_token; *(_QWORD *)(a1 + 8) = 0LL; *(_DWORD *)(a1 + 16) = -1; } else { *(_QWORD *)a1 = 0LL; *(_QWORD *)(a1 + 8) = 0LL; *(_DWORD *)(a1 + 16) = 0; } } else { *(_QWORD *)a1 = a7; *(_QWORD *)(a1 + 8) = a8; *(_QWORD *)(a1 + 16) = a9; } return a1; }
json_next_value: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x38],RDI MOV qword ptr [RBP + -0x30],RDI LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x28],RAX MOV qword ptr [RBP + -0x8],RSI MOV dword ptr [RBP + -0xc],EDX CMP dword ptr [RAX + 0x10],0x0 JZ 0x001a411f MOV RAX,qword ptr [RBP + -0x28] CMP dword ptr [RAX + 0x10],-0x1 JNZ 0x001a4142 LAB_001a411f: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RDX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RDX MOV RCX,qword ptr [RCX + 0x10] MOV qword ptr [RAX + 0x10],RCX JMP 0x001a434c LAB_001a4142: MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x40],RAX CMP dword ptr [RBP + -0xc],0x0 JNZ 0x001a415e MOV EAX,0x1 MOV qword ptr [RBP + -0x48],RAX JMP 0x001a416a LAB_001a415e: MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x48],RAX LAB_001a416a: MOV RDI,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x48] ADD RDI,RAX CALL 0x001a3e90 MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],0x0 JNZ 0x001a41a4 MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV dword ptr [RAX + 0x10],0x0 JMP 0x001a434c LAB_001a41a4: CMP dword ptr [RBP + -0xc],0x0 JZ 0x001a41fc MOV RAX,qword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2c JNZ 0x001a41fa MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x001a3e90 MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],0x0 JNZ 0x001a41f8 MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RCX] MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV dword ptr [RAX + 0x10],0x0 JMP 0x001a434c LAB_001a41f8: JMP 0x001a41fa LAB_001a41fa: JMP 0x001a4216 LAB_001a41fc: MOV RAX,qword ptr [RBP + -0x28] MOV EDX,dword ptr [RAX + 0x10] MOV EAX,0x2 MOV ECX,0x1 CMP EDX,0x3 CMOVZ EAX,ECX MOV dword ptr [RBP + -0xc],EAX LAB_001a4216: MOV RAX,qword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX] CMP EAX,0x7d JZ 0x001a422e MOV RAX,qword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX] CMP EAX,0x5d JNZ 0x001a424d LAB_001a422e: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV dword ptr [RAX + 0x10],0xffffffff JMP 0x001a434c LAB_001a424d: CMP dword ptr [RBP + -0xc],0x1 JNZ 0x001a433f MOV RAX,qword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX] CMP EAX,0x22 JZ 0x001a4282 MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV dword ptr [RAX + 0x10],0x0 JMP 0x001a434c LAB_001a4282: MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x1 MOV EDX,0x22 MOV ESI,EDX CALL 0x001a3f10 MOV qword ptr [RBP + -0x20],RAX CMP qword ptr [RBP + -0x20],0x0 JNZ 0x001a42c0 MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV dword ptr [RAX + 0x10],0x0 JMP 0x001a434c LAB_001a42c0: CMP qword ptr [RBP + -0x8],0x0 JZ 0x001a42ee MOV RCX,qword ptr [RBP + -0x18] ADD RCX,0x1 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x18] SUB RAX,RCX SUB RAX,0x1 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX],ECX LAB_001a42ee: MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x1 CALL 0x001a3e90 MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],0x0 JZ 0x001a4312 MOV RAX,qword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX] CMP EAX,0x3a JZ 0x001a432e LAB_001a4312: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV dword ptr [RAX + 0x10],0x0 JMP 0x001a434c LAB_001a432e: MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x1 CALL 0x001a3e90 MOV qword ptr [RBP + -0x18],RAX LAB_001a433f: MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001a3b90 LAB_001a434c: MOV RAX,qword ptr [RBP + -0x30] ADD RSP,0x50 POP RBP RET
/* WARNING: Restarted to delay deadcode elimination for space: stack */ long * json_next_value(long *param_1,int *param_2,int param_3) { long lVar1; char *pcVar2; long in_stack_00000008; long in_stack_00000010; int iStack0000000000000018; long local_50; char *local_20; int local_14; if ((iStack0000000000000018 == 0) || (iStack0000000000000018 == -1)) { *param_1 = in_stack_00000008; param_1[1] = in_stack_00000010; param_1[2] = _iStack0000000000000018; } else { if (param_3 == 0) { local_50 = 1; } else { local_50 = in_stack_00000010; } local_20 = (char *)next_non_whitespace_token(in_stack_00000008 + local_50); if (local_20 == (char *)0x0) { *param_1 = 0; param_1[1] = 0; *(int4 *)(param_1 + 2) = 0; } else { if (param_3 == 0) { local_14 = 2; if (iStack0000000000000018 == 3) { local_14 = 1; } } else { local_14 = param_3; if ((*local_20 == ',') && (local_20 = (char *)next_non_whitespace_token(local_20 + 1), local_20 == (char *)0x0)) { *param_1 = in_stack_00000008; param_1[1] = 0; *(int4 *)(param_1 + 2) = 0; return param_1; } } if ((*local_20 == '}') || (*local_20 == ']')) { *param_1 = (long)local_20; param_1[1] = 0; *(int4 *)(param_1 + 2) = 0xffffffff; } else { if (local_14 == 1) { if (*local_20 != '\"') { *param_1 = (long)local_20; param_1[1] = 0; *(int4 *)(param_1 + 2) = 0; return param_1; } lVar1 = find_end(local_20 + 1,0x22); if (lVar1 == 0) { *param_1 = (long)local_20; param_1[1] = 0; *(int4 *)(param_1 + 2) = 0; return param_1; } if (param_2 != (int *)0x0) { *(char **)(param_2 + 2) = local_20 + 1; *param_2 = ((int)lVar1 - (int)local_20) + -1; } pcVar2 = (char *)next_non_whitespace_token(lVar1 + 1); if ((pcVar2 == (char *)0x0) || (*pcVar2 != ':')) { *param_1 = (long)pcVar2; param_1[1] = 0; *(int4 *)(param_1 + 2) = 0; return param_1; } local_20 = (char *)next_non_whitespace_token(pcVar2 + 1); } json_parse(param_1,local_20); } } } return param_1; }
40,617
rtree_estimate
eloqsql/storage/myisam/rt_index.c
ha_rows rtree_estimate(MI_INFO *info, uint keynr, uchar *key, uint key_length, uint flag) { MI_KEYDEF *keyinfo = info->s->keyinfo + keynr; my_off_t root; uint i = 0; uchar *k; uchar *last; uint nod_flag; uchar *page_buf; uint k_len; double area = 0; ha_rows res = 0; if (flag & MBR_DISJOINT) return HA_POS_ERROR; if ((root = info->s->state.key_root[keynr]) == HA_OFFSET_ERROR) return HA_POS_ERROR; if (!(page_buf = (uchar*)my_alloca((uint)keyinfo->block_length))) return HA_POS_ERROR; if (!_mi_fetch_keypage(info, keyinfo, root, DFLT_INIT_HITS, page_buf, 0)) goto err1; nod_flag = mi_test_if_nod(page_buf); k_len = keyinfo->keylength - info->s->base.rec_reflength; k = rt_PAGE_FIRST_KEY(page_buf, nod_flag); last = rt_PAGE_END(page_buf); for (; k < last; k = rt_PAGE_NEXT_KEY(k, k_len, nod_flag), ++i) { if (nod_flag) { double k_area = rtree_rect_volume(keyinfo->seg, k, key_length); /* The following should be safe, even if we compare doubles */ if (k_area == 0) { if (flag & (MBR_CONTAIN | MBR_INTERSECT)) { area += 1; } else if (flag & (MBR_WITHIN | MBR_EQUAL)) { if (!rtree_key_cmp(keyinfo->seg, key, k, key_length, MBR_WITHIN)) area += 1; } else goto err1; } else { if (flag & (MBR_CONTAIN | MBR_INTERSECT)) { area += rtree_overlapping_area(keyinfo->seg, key, k, key_length) / k_area; } else if (flag & (MBR_WITHIN | MBR_EQUAL)) { if (!rtree_key_cmp(keyinfo->seg, key, k, key_length, MBR_WITHIN)) area += rtree_rect_volume(keyinfo->seg, key, key_length) / k_area; } else goto err1; } } else { if (!rtree_key_cmp(keyinfo->seg, key, k, key_length, flag)) ++res; } } if (nod_flag) { if (i) res = (ha_rows) (area / i * info->state->records); else res = HA_POS_ERROR; } my_afree((uchar*)page_buf); return res; err1: my_afree((uchar*)page_buf); return HA_POS_ERROR; }
O0
c
rtree_estimate: pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x18(%rbp) movl %esi, -0x1c(%rbp) movq %rdx, -0x28(%rbp) movl %ecx, -0x2c(%rbp) movl %r8d, -0x30(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq 0x218(%rax), %rax movl -0x1c(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax movq %rax, -0x38(%rbp) movl $0x0, -0x44(%rbp) xorps %xmm0, %xmm0 movsd %xmm0, -0x78(%rbp) movq $0x0, -0x80(%rbp) movl -0x30(%rbp), %eax andl $0x1000, %eax # imm = 0x1000 cmpl $0x0, %eax je 0xcc267 movq $-0x1, -0x10(%rbp) jmp 0xcc5f3 movq -0x18(%rbp), %rax movq (%rax), %rax movq 0x98(%rax), %rax movl -0x1c(%rbp), %ecx movq (%rax,%rcx,8), %rax movq %rax, -0x40(%rbp) cmpq $-0x1, %rax jne 0xcc293 movq $-0x1, -0x10(%rbp) jmp 0xcc5f3 movq -0x38(%rbp), %rax movzwl 0xe(%rax), %eax addl $0xf, %eax andl $-0x10, %eax movl %eax, %ecx movq %rsp, %rax subq %rcx, %rax movq %rax, %rsp movq %rax, -0x68(%rbp) cmpq $0x0, %rax jne 0xcc2c3 movq $-0x1, -0x10(%rbp) jmp 0xcc5f3 movq -0x18(%rbp), %rdi movq -0x38(%rbp), %rsi movq -0x40(%rbp), %rdx movq -0x68(%rbp), %r8 movl $0x3, %ecx xorl %r9d, %r9d callq 0xbfe30 cmpq $0x0, %rax jne 0xcc2eb jmp 0xcc5eb movq -0x68(%rbp), %rax movzbl (%rax), %eax andl $0x80, %eax cmpl $0x0, %eax je 0xcc311 movq -0x18(%rbp), %rax movq (%rax), %rax movl 0x17c(%rax), %eax movl %eax, -0x8c(%rbp) jmp 0xcc31b xorl %eax, %eax movl %eax, -0x8c(%rbp) jmp 0xcc31b movl -0x8c(%rbp), %eax movl %eax, -0x5c(%rbp) movq -0x38(%rbp), %rax movzwl 0x12(%rax), %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx subl 0x178(%rcx), %eax movl %eax, -0x6c(%rbp) movq -0x68(%rbp), %rax addq $0x2, %rax movl -0x5c(%rbp), %ecx addq %rcx, %rax movq %rax, -0x50(%rbp) movq -0x68(%rbp), %rax movq -0x68(%rbp), %rcx movzbl 0x1(%rcx), %ecx movzwl %cx, %ecx movq -0x68(%rbp), %rdx movzbl (%rdx), %edx movzwl %dx, %edx shll $0x8, %edx orl %edx, %ecx movzwl %cx, %ecx andl $0x7fff, %ecx # imm = 0x7FFF movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x58(%rbp) movq -0x50(%rbp), %rax cmpq -0x58(%rbp), %rax jae 0xcc55c cmpl $0x0, -0x5c(%rbp) je 0xcc4d2 movq -0x38(%rbp), %rax movq 0x28(%rax), %rdi movq -0x50(%rbp), %rsi movl -0x2c(%rbp), %edx callq 0xce9c0 movsd %xmm0, -0x88(%rbp) movsd -0x88(%rbp), %xmm0 xorps %xmm1, %xmm1 ucomisd %xmm1, %xmm0 jne 0xcc436 jp 0xcc436 movl -0x30(%rbp), %eax andl $0x600, %eax # imm = 0x600 cmpl $0x0, %eax je 0xcc3e6 movsd 0x96cf6(%rip), %xmm0 # 0x1630d0 addsd -0x78(%rbp), %xmm0 movsd %xmm0, -0x78(%rbp) jmp 0xcc431 movl -0x30(%rbp), %eax andl $0x2800, %eax # imm = 0x2800 cmpl $0x0, %eax je 0xcc42a movq -0x38(%rbp), %rax movq 0x28(%rax), %rdi movq -0x28(%rbp), %rsi movq -0x50(%rbp), %rdx movl -0x2c(%rbp), %ecx movl $0x800, %r8d # imm = 0x800 callq 0xccf70 cmpl $0x0, %eax jne 0xcc428 movsd 0x96cb2(%rip), %xmm0 # 0x1630d0 addsd -0x78(%rbp), %xmm0 movsd %xmm0, -0x78(%rbp) jmp 0xcc42f jmp 0xcc5eb jmp 0xcc431 jmp 0xcc4d0 movl -0x30(%rbp), %eax andl $0x600, %eax # imm = 0x600 cmpl $0x0, %eax je 0xcc46f movq -0x38(%rbp), %rax movq 0x28(%rax), %rdi movq -0x28(%rbp), %rsi movq -0x50(%rbp), %rdx movl -0x2c(%rbp), %ecx callq 0xd11c0 divsd -0x88(%rbp), %xmm0 addsd -0x78(%rbp), %xmm0 movsd %xmm0, -0x78(%rbp) jmp 0xcc4ce movl -0x30(%rbp), %eax andl $0x2800, %eax # imm = 0x2800 cmpl $0x0, %eax je 0xcc4c7 movq -0x38(%rbp), %rax movq 0x28(%rax), %rdi movq -0x28(%rbp), %rsi movq -0x50(%rbp), %rdx movl -0x2c(%rbp), %ecx movl $0x800, %r8d # imm = 0x800 callq 0xccf70 cmpl $0x0, %eax jne 0xcc4c5 movq -0x38(%rbp), %rax movq 0x28(%rax), %rdi movq -0x28(%rbp), %rsi movl -0x2c(%rbp), %edx callq 0xce9c0 divsd -0x88(%rbp), %xmm0 addsd -0x78(%rbp), %xmm0 movsd %xmm0, -0x78(%rbp) jmp 0xcc4cc jmp 0xcc5eb jmp 0xcc4ce jmp 0xcc4d0 jmp 0xcc501 movq -0x38(%rbp), %rax movq 0x28(%rax), %rdi movq -0x28(%rbp), %rsi movq -0x50(%rbp), %rdx movl -0x2c(%rbp), %ecx movl -0x30(%rbp), %r8d callq 0xccf70 cmpl $0x0, %eax jne 0xcc4ff movq -0x80(%rbp), %rax addq $0x1, %rax movq %rax, -0x80(%rbp) jmp 0xcc501 jmp 0xcc503 movq -0x50(%rbp), %rax movl -0x6c(%rbp), %ecx addq %rcx, %rax movq %rax, -0x98(%rbp) cmpl $0x0, -0x5c(%rbp) je 0xcc525 movl -0x5c(%rbp), %eax movl %eax, -0x9c(%rbp) jmp 0xcc538 movq -0x18(%rbp), %rax movq (%rax), %rax movl 0x178(%rax), %eax movl %eax, -0x9c(%rbp) movq -0x98(%rbp), %rax movl -0x9c(%rbp), %ecx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x50(%rbp) movl -0x44(%rbp), %eax addl $0x1, %eax movl %eax, -0x44(%rbp) jmp 0xcc37e cmpl $0x0, -0x5c(%rbp) je 0xcc5e1 cmpl $0x0, -0x44(%rbp) je 0xcc5d7 movsd -0x78(%rbp), %xmm0 movl -0x44(%rbp), %eax cvtsi2sd %rax, %xmm1 divsd %xmm1, %xmm0 movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq (%rax), %xmm1 movaps 0x96e04(%rip), %xmm2 # 0x163390 punpckldq %xmm2, %xmm1 # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1] movapd 0x96e08(%rip), %xmm2 # 0x1633a0 subpd %xmm2, %xmm1 movaps %xmm1, %xmm2 unpckhpd %xmm1, %xmm1 # xmm1 = xmm1[1,1] addsd %xmm2, %xmm1 mulsd %xmm1, %xmm0 movaps %xmm0, %xmm1 cvttsd2si %xmm1, %rax movq %rax, %rdx sarq $0x3f, %rdx movsd 0x96b06(%rip), %xmm1 # 0x1630c8 subsd %xmm1, %xmm0 cvttsd2si %xmm0, %rcx andq %rdx, %rcx orq %rcx, %rax movq %rax, -0x80(%rbp) jmp 0xcc5df movq $-0x1, -0x80(%rbp) jmp 0xcc5e1 movq -0x80(%rbp), %rax movq %rax, -0x10(%rbp) jmp 0xcc5f3 movq $-0x1, -0x10(%rbp) movq -0x10(%rbp), %rax movq %rax, -0xa8(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xcc61c movq -0xa8(%rbp), %rax movq %rbp, %rsp popq %rbp retq callq 0x2a270 nopw %cs:(%rax,%rax)
rtree_estimate: push rbp mov rbp, rsp sub rsp, 0B0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov [rbp+var_28], rdx mov [rbp+var_2C], ecx mov [rbp+var_30], r8d mov rax, [rbp+var_18] mov rax, [rax] mov rax, [rax+218h] mov ecx, [rbp+var_1C] imul rcx, 70h ; 'p' add rax, rcx mov [rbp+var_38], rax mov [rbp+var_44], 0 xorps xmm0, xmm0 movsd [rbp+var_78], xmm0 mov [rbp+var_80], 0 mov eax, [rbp+var_30] and eax, 1000h cmp eax, 0 jz short loc_CC267 mov [rbp+var_10], 0FFFFFFFFFFFFFFFFh jmp loc_CC5F3 loc_CC267: mov rax, [rbp+var_18] mov rax, [rax] mov rax, [rax+98h] mov ecx, [rbp+var_1C] mov rax, [rax+rcx*8] mov [rbp+var_40], rax cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_CC293 mov [rbp+var_10], 0FFFFFFFFFFFFFFFFh jmp loc_CC5F3 loc_CC293: mov rax, [rbp+var_38] movzx eax, word ptr [rax+0Eh] add eax, 0Fh and eax, 0FFFFFFF0h mov ecx, eax mov rax, rsp sub rax, rcx mov rsp, rax mov [rbp+var_68], rax cmp rax, 0 jnz short loc_CC2C3 mov [rbp+var_10], 0FFFFFFFFFFFFFFFFh jmp loc_CC5F3 loc_CC2C3: mov rdi, [rbp+var_18] mov rsi, [rbp+var_38] mov rdx, [rbp+var_40] mov r8, [rbp+var_68] mov ecx, 3 xor r9d, r9d call _mi_fetch_keypage cmp rax, 0 jnz short loc_CC2EB jmp loc_CC5EB loc_CC2EB: mov rax, [rbp+var_68] movzx eax, byte ptr [rax] and eax, 80h cmp eax, 0 jz short loc_CC311 mov rax, [rbp+var_18] mov rax, [rax] mov eax, [rax+17Ch] mov [rbp+var_8C], eax jmp short loc_CC31B loc_CC311: xor eax, eax mov [rbp+var_8C], eax jmp short $+2 loc_CC31B: mov eax, [rbp+var_8C] mov [rbp+var_5C], eax mov rax, [rbp+var_38] movzx eax, word ptr [rax+12h] mov rcx, [rbp+var_18] mov rcx, [rcx] sub eax, [rcx+178h] mov [rbp+var_6C], eax mov rax, [rbp+var_68] add rax, 2 mov ecx, [rbp+var_5C] add rax, rcx mov [rbp+var_50], rax mov rax, [rbp+var_68] mov rcx, [rbp+var_68] movzx ecx, byte ptr [rcx+1] movzx ecx, cx mov rdx, [rbp+var_68] movzx edx, byte ptr [rdx] movzx edx, dx shl edx, 8 or ecx, edx movzx ecx, cx and ecx, 7FFFh mov ecx, ecx add rax, rcx mov [rbp+var_58], rax loc_CC37E: mov rax, [rbp+var_50] cmp rax, [rbp+var_58] jnb loc_CC55C cmp [rbp+var_5C], 0 jz loc_CC4D2 mov rax, [rbp+var_38] mov rdi, [rax+28h] mov rsi, [rbp+var_50] mov edx, [rbp+var_2C] call rtree_rect_volume movsd [rbp+var_88], xmm0 movsd xmm0, [rbp+var_88] xorps xmm1, xmm1 ucomisd xmm0, xmm1 jnz short loc_CC436 jp short loc_CC436 mov eax, [rbp+var_30] and eax, 600h cmp eax, 0 jz short loc_CC3E6 movsd xmm0, cs:qword_1630D0 addsd xmm0, [rbp+var_78] movsd [rbp+var_78], xmm0 jmp short loc_CC431 loc_CC3E6: mov eax, [rbp+var_30] and eax, 2800h cmp eax, 0 jz short loc_CC42A mov rax, [rbp+var_38] mov rdi, [rax+28h] mov rsi, [rbp+var_28] mov rdx, [rbp+var_50] mov ecx, [rbp+var_2C] mov r8d, 800h call rtree_key_cmp cmp eax, 0 jnz short loc_CC428 movsd xmm0, cs:qword_1630D0 addsd xmm0, [rbp+var_78] movsd [rbp+var_78], xmm0 loc_CC428: jmp short loc_CC42F loc_CC42A: jmp loc_CC5EB loc_CC42F: jmp short $+2 loc_CC431: jmp loc_CC4D0 loc_CC436: mov eax, [rbp+var_30] and eax, 600h cmp eax, 0 jz short loc_CC46F mov rax, [rbp+var_38] mov rdi, [rax+28h] mov rsi, [rbp+var_28] mov rdx, [rbp+var_50] mov ecx, [rbp+var_2C] call rtree_overlapping_area divsd xmm0, [rbp+var_88] addsd xmm0, [rbp+var_78] movsd [rbp+var_78], xmm0 jmp short loc_CC4CE loc_CC46F: mov eax, [rbp+var_30] and eax, 2800h cmp eax, 0 jz short loc_CC4C7 mov rax, [rbp+var_38] mov rdi, [rax+28h] mov rsi, [rbp+var_28] mov rdx, [rbp+var_50] mov ecx, [rbp+var_2C] mov r8d, 800h call rtree_key_cmp cmp eax, 0 jnz short loc_CC4C5 mov rax, [rbp+var_38] mov rdi, [rax+28h] mov rsi, [rbp+var_28] mov edx, [rbp+var_2C] call rtree_rect_volume divsd xmm0, [rbp+var_88] addsd xmm0, [rbp+var_78] movsd [rbp+var_78], xmm0 loc_CC4C5: jmp short loc_CC4CC loc_CC4C7: jmp loc_CC5EB loc_CC4CC: jmp short $+2 loc_CC4CE: jmp short $+2 loc_CC4D0: jmp short loc_CC501 loc_CC4D2: mov rax, [rbp+var_38] mov rdi, [rax+28h] mov rsi, [rbp+var_28] mov rdx, [rbp+var_50] mov ecx, [rbp+var_2C] mov r8d, [rbp+var_30] call rtree_key_cmp cmp eax, 0 jnz short loc_CC4FF mov rax, [rbp+var_80] add rax, 1 mov [rbp+var_80], rax loc_CC4FF: jmp short $+2 loc_CC501: jmp short $+2 loc_CC503: mov rax, [rbp+var_50] mov ecx, [rbp+var_6C] add rax, rcx mov [rbp+var_98], rax cmp [rbp+var_5C], 0 jz short loc_CC525 mov eax, [rbp+var_5C] mov [rbp+var_9C], eax jmp short loc_CC538 loc_CC525: mov rax, [rbp+var_18] mov rax, [rax] mov eax, [rax+178h] mov [rbp+var_9C], eax loc_CC538: mov rax, [rbp+var_98] mov ecx, [rbp+var_9C] mov ecx, ecx add rax, rcx mov [rbp+var_50], rax mov eax, [rbp+var_44] add eax, 1 mov [rbp+var_44], eax jmp loc_CC37E loc_CC55C: cmp [rbp+var_5C], 0 jz short loc_CC5E1 cmp [rbp+var_44], 0 jz short loc_CC5D7 movsd xmm0, [rbp+var_78] mov eax, [rbp+var_44] cvtsi2sd xmm1, rax divsd xmm0, xmm1 mov rax, [rbp+var_18] mov rax, [rax+8] movq xmm1, qword ptr [rax] movaps xmm2, cs:xmmword_163390 punpckldq xmm1, xmm2 movapd xmm2, cs:xmmword_1633A0 subpd xmm1, xmm2 movaps xmm2, xmm1 unpckhpd xmm1, xmm1 addsd xmm1, xmm2 mulsd xmm0, xmm1 movaps xmm1, xmm0 cvttsd2si rax, xmm1 mov rdx, rax sar rdx, 3Fh movsd xmm1, cs:qword_1630C8 subsd xmm0, xmm1 cvttsd2si rcx, xmm0 and rcx, rdx or rax, rcx mov [rbp+var_80], rax jmp short loc_CC5DF loc_CC5D7: mov [rbp+var_80], 0FFFFFFFFFFFFFFFFh loc_CC5DF: jmp short $+2 loc_CC5E1: mov rax, [rbp+var_80] mov [rbp+var_10], rax jmp short loc_CC5F3 loc_CC5EB: mov [rbp+var_10], 0FFFFFFFFFFFFFFFFh loc_CC5F3: mov rax, [rbp+var_10] mov [rbp+var_A8], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_CC61C mov rax, [rbp+var_A8] mov rsp, rbp pop rbp retn loc_CC61C: call ___stack_chk_fail
long long rtree_estimate(_QWORD *a1, unsigned int a2, long long a3, unsigned int a4, unsigned int a5) { char *v5; // rcx double v6; // xmm0_8 double v7; // xmm0_8 __m128d v8; // xmm2 long long v10; // [rsp+0h] [rbp-B0h] BYREF unsigned int v11; // [rsp+14h] [rbp-9Ch] unsigned long long v12; // [rsp+18h] [rbp-98h] unsigned int v13; // [rsp+24h] [rbp-8Ch] double v14; // [rsp+28h] [rbp-88h] long long v15; // [rsp+30h] [rbp-80h] double v16; // [rsp+38h] [rbp-78h] unsigned int v17; // [rsp+44h] [rbp-6Ch] unsigned __int16 *v18; // [rsp+48h] [rbp-68h] unsigned int v19; // [rsp+54h] [rbp-5Ch] char *v20; // [rsp+58h] [rbp-58h] unsigned long long v21; // [rsp+60h] [rbp-50h] int v22; // [rsp+6Ch] [rbp-44h] long long v23; // [rsp+70h] [rbp-40h] long long v24; // [rsp+78h] [rbp-38h] unsigned int v25; // [rsp+80h] [rbp-30h] unsigned int v26; // [rsp+84h] [rbp-2Ch] long long v27; // [rsp+88h] [rbp-28h] unsigned int v28; // [rsp+94h] [rbp-1Ch] _QWORD *v29; // [rsp+98h] [rbp-18h] unsigned long long v31; // [rsp+A8h] [rbp-8h] v31 = __readfsqword(0x28u); v29 = a1; v28 = a2; v27 = a3; v26 = a4; v25 = a5; v24 = 112LL * a2 + *(_QWORD *)(*a1 + 536LL); v22 = 0; v16 = 0.0; v15 = 0LL; if ( (a5 & 0x1000) != 0 ) return -1LL; v23 = *(_QWORD *)(*(_QWORD *)(*v29 + 152LL) + 8LL * v28); if ( v23 == -1 ) return -1LL; v5 = (char *)((*(unsigned __int16 *)(v24 + 14) + 15) & 0xFFFFFFF0); v18 = (unsigned __int16 *)((char *)&v10 - v5); if ( &v10 == (long long *)v5 ) return -1LL; if ( !mi_fetch_keypage(v29, v24, v23, 3, (int)v18, 0) ) return -1LL; if ( (*(_BYTE *)v18 & 0x80) != 0 ) v13 = *(_DWORD *)(*v29 + 380LL); else v13 = 0; v19 = v13; v17 = *(unsigned __int16 *)(v24 + 18) - *(_DWORD *)(*v29 + 376LL); v21 = (unsigned long long)v18 + v13 + 2; v20 = (char *)v18 + (_byteswap_ushort(*v18) & 0x7FFF); while ( v21 < (unsigned long long)v20 ) { if ( v19 ) { v14 = rtree_rect_volume(*(_QWORD *)(v24 + 40), v21, v26); if ( v14 == 0.0 ) { if ( (v25 & 0x600) != 0 ) { v16 = v16 + 1.0; } else { if ( (v25 & 0x2800) == 0 ) return -1LL; if ( !(unsigned int)rtree_key_cmp(*(_QWORD *)(v24 + 40), v27, v21, v26, 2048LL) ) v16 = v16 + 1.0; } } else if ( (v25 & 0x600) != 0 ) { v6 = rtree_overlapping_area(*(_QWORD *)(v24 + 40), v27, v21, v26); v16 = v6 / v14 + v16; } else { if ( (v25 & 0x2800) == 0 ) return -1LL; if ( !(unsigned int)rtree_key_cmp(*(_QWORD *)(v24 + 40), v27, v21, v26, 2048LL) ) { v7 = rtree_rect_volume(*(_QWORD *)(v24 + 40), v27, v26); v16 = v7 / v14 + v16; } } } else if ( !(unsigned int)rtree_key_cmp(*(_QWORD *)(v24 + 40), v27, v21, v26, v25) ) { ++v15; } v12 = v17 + v21; if ( v19 ) v11 = v19; else v11 = *(_DWORD *)(*v29 + 376LL); v21 = v11 + v12; ++v22; } if ( v19 ) { if ( v22 ) { v8 = _mm_sub_pd( (__m128d)_mm_unpacklo_epi32(_mm_loadl_epi64((const __m128i *)v29[1]), (__m128i)xmmword_163390), (__m128d)xmmword_1633A0); return (unsigned int)(int)(v16 / (double)v22 * (_mm_unpackhi_pd(v8, v8).m128d_f64[0] + v8.m128d_f64[0])); } else { return -1LL; } } return v15; }
rtree_estimate: PUSH RBP MOV RBP,RSP SUB RSP,0xb0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV qword ptr [RBP + -0x28],RDX MOV dword ptr [RBP + -0x2c],ECX MOV dword ptr [RBP + -0x30],R8D MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV ECX,dword ptr [RBP + -0x1c] IMUL RCX,RCX,0x70 ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX MOV dword ptr [RBP + -0x44],0x0 XORPS XMM0,XMM0 MOVSD qword ptr [RBP + -0x78],XMM0 MOV qword ptr [RBP + -0x80],0x0 MOV EAX,dword ptr [RBP + -0x30] AND EAX,0x1000 CMP EAX,0x0 JZ 0x001cc267 MOV qword ptr [RBP + -0x10],-0x1 JMP 0x001cc5f3 LAB_001cc267: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x98] MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x40],RAX CMP RAX,-0x1 JNZ 0x001cc293 MOV qword ptr [RBP + -0x10],-0x1 JMP 0x001cc5f3 LAB_001cc293: MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,word ptr [RAX + 0xe] ADD EAX,0xf AND EAX,0xfffffff0 MOV ECX,EAX MOV RAX,RSP SUB RAX,RCX MOV RSP,RAX MOV qword ptr [RBP + -0x68],RAX CMP RAX,0x0 JNZ 0x001cc2c3 MOV qword ptr [RBP + -0x10],-0x1 JMP 0x001cc5f3 LAB_001cc2c3: MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x40] MOV R8,qword ptr [RBP + -0x68] MOV ECX,0x3 XOR R9D,R9D CALL 0x001bfe30 CMP RAX,0x0 JNZ 0x001cc2eb JMP 0x001cc5eb LAB_001cc2eb: MOV RAX,qword ptr [RBP + -0x68] MOVZX EAX,byte ptr [RAX] AND EAX,0x80 CMP EAX,0x0 JZ 0x001cc311 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x17c] MOV dword ptr [RBP + -0x8c],EAX JMP 0x001cc31b LAB_001cc311: XOR EAX,EAX MOV dword ptr [RBP + -0x8c],EAX JMP 0x001cc31b LAB_001cc31b: MOV EAX,dword ptr [RBP + -0x8c] MOV dword ptr [RBP + -0x5c],EAX MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,word ptr [RAX + 0x12] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] SUB EAX,dword ptr [RCX + 0x178] MOV dword ptr [RBP + -0x6c],EAX MOV RAX,qword ptr [RBP + -0x68] ADD RAX,0x2 MOV ECX,dword ptr [RBP + -0x5c] ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x68] MOVZX ECX,byte ptr [RCX + 0x1] MOVZX ECX,CX MOV RDX,qword ptr [RBP + -0x68] MOVZX EDX,byte ptr [RDX] MOVZX EDX,DX SHL EDX,0x8 OR ECX,EDX MOVZX ECX,CX AND ECX,0x7fff MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x58],RAX LAB_001cc37e: MOV RAX,qword ptr [RBP + -0x50] CMP RAX,qword ptr [RBP + -0x58] JNC 0x001cc55c CMP dword ptr [RBP + -0x5c],0x0 JZ 0x001cc4d2 MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RAX + 0x28] MOV RSI,qword ptr [RBP + -0x50] MOV EDX,dword ptr [RBP + -0x2c] CALL 0x001ce9c0 MOVSD qword ptr [RBP + -0x88],XMM0 MOVSD XMM0,qword ptr [RBP + -0x88] XORPS XMM1,XMM1 UCOMISD XMM0,XMM1 JNZ 0x001cc436 JP 0x001cc436 MOV EAX,dword ptr [RBP + -0x30] AND EAX,0x600 CMP EAX,0x0 JZ 0x001cc3e6 MOVSD XMM0,qword ptr [0x002630d0] ADDSD XMM0,qword ptr [RBP + -0x78] MOVSD qword ptr [RBP + -0x78],XMM0 JMP 0x001cc431 LAB_001cc3e6: MOV EAX,dword ptr [RBP + -0x30] AND EAX,0x2800 CMP EAX,0x0 JZ 0x001cc42a MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RAX + 0x28] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x2c] MOV R8D,0x800 CALL 0x001ccf70 CMP EAX,0x0 JNZ 0x001cc428 MOVSD XMM0,qword ptr [0x002630d0] ADDSD XMM0,qword ptr [RBP + -0x78] MOVSD qword ptr [RBP + -0x78],XMM0 LAB_001cc428: JMP 0x001cc42f LAB_001cc42a: JMP 0x001cc5eb LAB_001cc42f: JMP 0x001cc431 LAB_001cc431: JMP 0x001cc4d0 LAB_001cc436: MOV EAX,dword ptr [RBP + -0x30] AND EAX,0x600 CMP EAX,0x0 JZ 0x001cc46f MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RAX + 0x28] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x2c] CALL 0x001d11c0 DIVSD XMM0,qword ptr [RBP + -0x88] ADDSD XMM0,qword ptr [RBP + -0x78] MOVSD qword ptr [RBP + -0x78],XMM0 JMP 0x001cc4ce LAB_001cc46f: MOV EAX,dword ptr [RBP + -0x30] AND EAX,0x2800 CMP EAX,0x0 JZ 0x001cc4c7 MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RAX + 0x28] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x2c] MOV R8D,0x800 CALL 0x001ccf70 CMP EAX,0x0 JNZ 0x001cc4c5 MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RAX + 0x28] MOV RSI,qword ptr [RBP + -0x28] MOV EDX,dword ptr [RBP + -0x2c] CALL 0x001ce9c0 DIVSD XMM0,qword ptr [RBP + -0x88] ADDSD XMM0,qword ptr [RBP + -0x78] MOVSD qword ptr [RBP + -0x78],XMM0 LAB_001cc4c5: JMP 0x001cc4cc LAB_001cc4c7: JMP 0x001cc5eb LAB_001cc4cc: JMP 0x001cc4ce LAB_001cc4ce: JMP 0x001cc4d0 LAB_001cc4d0: JMP 0x001cc501 LAB_001cc4d2: MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RAX + 0x28] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x2c] MOV R8D,dword ptr [RBP + -0x30] CALL 0x001ccf70 CMP EAX,0x0 JNZ 0x001cc4ff MOV RAX,qword ptr [RBP + -0x80] ADD RAX,0x1 MOV qword ptr [RBP + -0x80],RAX LAB_001cc4ff: JMP 0x001cc501 LAB_001cc501: JMP 0x001cc503 LAB_001cc503: MOV RAX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x6c] ADD RAX,RCX MOV qword ptr [RBP + -0x98],RAX CMP dword ptr [RBP + -0x5c],0x0 JZ 0x001cc525 MOV EAX,dword ptr [RBP + -0x5c] MOV dword ptr [RBP + -0x9c],EAX JMP 0x001cc538 LAB_001cc525: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x178] MOV dword ptr [RBP + -0x9c],EAX LAB_001cc538: MOV RAX,qword ptr [RBP + -0x98] MOV ECX,dword ptr [RBP + -0x9c] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV EAX,dword ptr [RBP + -0x44] ADD EAX,0x1 MOV dword ptr [RBP + -0x44],EAX JMP 0x001cc37e LAB_001cc55c: CMP dword ptr [RBP + -0x5c],0x0 JZ 0x001cc5e1 CMP dword ptr [RBP + -0x44],0x0 JZ 0x001cc5d7 MOVSD XMM0,qword ptr [RBP + -0x78] MOV EAX,dword ptr [RBP + -0x44] CVTSI2SD XMM1,RAX DIVSD XMM0,XMM1 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOVQ XMM1,qword ptr [RAX] MOVAPS XMM2,xmmword ptr [0x00263390] PUNPCKLDQ XMM1,XMM2 MOVAPD XMM2,xmmword ptr [0x002633a0] SUBPD XMM1,XMM2 MOVAPS XMM2,XMM1 UNPCKHPD XMM1,XMM1 ADDSD XMM1,XMM2 MULSD XMM0,XMM1 MOVAPS XMM1,XMM0 CVTTSD2SI RAX,XMM1 MOV RDX,RAX SAR RDX,0x3f MOVSD XMM1,qword ptr [0x002630c8] SUBSD XMM0,XMM1 CVTTSD2SI RCX,XMM0 AND RCX,RDX OR RAX,RCX MOV qword ptr [RBP + -0x80],RAX JMP 0x001cc5df LAB_001cc5d7: MOV qword ptr [RBP + -0x80],-0x1 LAB_001cc5df: JMP 0x001cc5e1 LAB_001cc5e1: MOV RAX,qword ptr [RBP + -0x80] MOV qword ptr [RBP + -0x10],RAX JMP 0x001cc5f3 LAB_001cc5eb: MOV qword ptr [RBP + -0x10],-0x1 LAB_001cc5f3: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0xa8],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001cc61c MOV RAX,qword ptr [RBP + -0xa8] MOV RSP,RBP POP RBP RET LAB_001cc61c: CALL 0x0012a270
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ ulong rtree_estimate(long *param_1,uint param_2,int8 param_3,int4 param_4,uint param_5) { long lVar1; int8 uVar2; int8 uVar3; long lVar4; byte *pbVar5; uint uVar6; int4 uVar7; int iVar8; long lVar9; byte *pbVar10; long in_FS_OFFSET; double dVar11; int1 auVar12 [16]; int8 uStack_c0; byte abStack_b8 [8]; ulong local_b0; uint local_a4; byte *local_a0; uint local_94; double local_90; ulong local_88; double local_80; uint local_74; byte *local_70; uint local_64; byte *local_60; byte *local_58; uint local_4c; long local_48; long local_40; uint local_38; int4 local_34; int8 local_30; uint local_24; long *local_20; ulong local_18; long local_10; pbVar10 = abStack_b8; local_10 = *(long *)(in_FS_OFFSET + 0x28); lVar9 = *(long *)(*param_1 + 0x218) + (ulong)param_2 * 0x70; local_4c = 0; local_80 = 0.0; local_88 = 0; local_40 = lVar9; local_38 = param_5; local_34 = param_4; local_30 = param_3; local_24 = param_2; local_20 = param_1; if ((param_5 & 0x1000) == 0) { lVar1 = *(long *)(*(long *)(*param_1 + 0x98) + (ulong)param_2 * 8); local_48 = lVar1; if (lVar1 == -1) { local_18 = 0xffffffffffffffff; } else { lVar4 = -(ulong)(*(ushort *)(lVar9 + 0xe) + 0xf & 0xfffffff0); pbVar10 = abStack_b8 + lVar4; local_70 = pbVar10; if (pbVar10 == (byte *)0x0) { local_18 = 0xffffffffffffffff; } else { *(int8 *)((long)&uStack_c0 + lVar4) = 0x1cc2e0; lVar9 = _mi_fetch_keypage(param_1,lVar9,lVar1,3,pbVar10,0); if (lVar9 == 0) { LAB_001cc5eb: local_18 = 0xffffffffffffffff; } else { if ((*local_70 & 0x80) == 0) { local_94 = 0; } else { local_94 = *(uint *)(*local_20 + 0x17c); } local_64 = local_94; local_74 = (uint)*(ushort *)(local_40 + 0x12) - *(int *)(*local_20 + 0x178); local_60 = local_70 + ((uint)local_70[1] | (*local_70 & 0x7f) << 8); local_58 = local_70 + (ulong)local_94 + 2; while (uVar2 = local_30, uVar7 = local_34, uVar6 = local_38, pbVar5 = local_58, local_58 < local_60) { if (local_64 == 0) { uVar3 = *(int8 *)(local_40 + 0x28); *(int8 *)((long)&uStack_c0 + lVar4) = 0x1cc4ee; iVar8 = rtree_key_cmp(uVar3,uVar2,pbVar5,uVar7,uVar6); if (iVar8 == 0) { local_88 = local_88 + 1; } } else { uVar2 = *(int8 *)(local_40 + 0x28); *(int8 *)((long)&uStack_c0 + lVar4) = 0x1cc3aa; local_90 = (double)rtree_rect_volume(uVar2,pbVar5,uVar7); uVar2 = local_30; uVar7 = local_34; pbVar5 = local_58; if ((local_90 != 0.0) || (NAN(local_90))) { if ((local_38 & 0x600) == 0) { if ((local_38 & 0x2800) == 0) goto LAB_001cc5eb; uVar3 = *(int8 *)(local_40 + 0x28); *(int8 *)((long)&uStack_c0 + lVar4) = 0x1cc49a; iVar8 = rtree_key_cmp(uVar3,uVar2,pbVar5,uVar7,0x800); uVar2 = local_30; uVar7 = local_34; if (iVar8 == 0) { uVar3 = *(int8 *)(local_40 + 0x28); *(int8 *)((long)&uStack_c0 + lVar4) = 0x1cc4b3; dVar11 = (double)rtree_rect_volume(uVar3,uVar2,uVar7); local_80 = dVar11 / local_90 + local_80; } } else { uVar3 = *(int8 *)(local_40 + 0x28); *(int8 *)((long)&uStack_c0 + lVar4) = 0x1cc45b; dVar11 = (double)rtree_overlapping_area(uVar3,uVar2,pbVar5,uVar7); local_80 = dVar11 / local_90 + local_80; } } else if ((local_38 & 0x600) == 0) { if ((local_38 & 0x2800) == 0) goto LAB_001cc5eb; uVar3 = *(int8 *)(local_40 + 0x28); *(int8 *)((long)&uStack_c0 + lVar4) = 0x1cc411; iVar8 = rtree_key_cmp(uVar3,uVar2,pbVar5,uVar7,0x800); if (iVar8 == 0) { local_80 = DAT_002630d0 + local_80; } } else { local_80 = DAT_002630d0 + local_80; } } local_a0 = local_58 + local_74; if (local_64 == 0) { local_a4 = *(uint *)(*local_20 + 0x178); } else { local_a4 = local_64; } local_4c = local_4c + 1; local_58 = local_a0 + local_a4; } if (local_64 != 0) { if (local_4c == 0) { local_88 = 0xffffffffffffffff; } else { uVar2 = *(int8 *)local_20[1]; auVar12._8_4_ = (int)((ulong)uVar2 >> 0x20); auVar12._0_8_ = uVar2; auVar12._12_4_ = _UNK_00263394; dVar11 = (local_80 / (double)local_4c) * ((auVar12._8_8_ - _UNK_002633a8) + ((double)CONCAT44(_DAT_00263390,(int)uVar2) - _DAT_002633a0)); local_88 = (ulong)dVar11; local_88 = local_88 | (long)(dVar11 - DAT_002630c8) & (long)local_88 >> 0x3f; } } local_18 = local_88; } } } } else { local_18 = 0xffffffffffffffff; pbVar10 = abStack_b8; } local_b0 = local_18; if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ pbVar10[-8] = 0x21; pbVar10[-7] = 0xc6; pbVar10[-6] = 0x1c; pbVar10[-5] = 0; pbVar10[-4] = 0; pbVar10[-3] = 0; pbVar10[-2] = 0; pbVar10[-1] = 0; __stack_chk_fail(); } return local_18; }
40,618
my_hash_first
eloqsql/mysys/hash.c
uchar* my_hash_first(const HASH *hash, const uchar *key, size_t length, HASH_SEARCH_STATE *current_record) { uchar *res; DBUG_ASSERT(my_hash_inited(hash)); res= my_hash_first_from_hash_value(hash, hash->hash_function(hash->charset, key, length ? length : hash->key_length), key, length, current_record); return res; }
O0
c
my_hash_first: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) jmp 0xe394a movq -0x8(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x8(%rbp), %rax movq 0x58(%rax), %rax movq %rax, -0x40(%rbp) movq -0x8(%rbp), %rax movq 0x68(%rax), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x30(%rbp) cmpq $0x0, -0x18(%rbp) je 0xe3983 movq -0x18(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0xe398f movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x50(%rbp) movq -0x40(%rbp), %rax movq -0x30(%rbp), %rsi movq -0x38(%rbp), %rdi movq -0x50(%rbp), %rdx callq *%rax movq -0x48(%rbp), %rdi movl %eax, %esi movq -0x10(%rbp), %rdx movq -0x18(%rbp), %rcx movq -0x20(%rbp), %r8 callq 0xe3a10 movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_hash_first: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx jmp short $+2 loc_E394A: mov rax, [rbp+var_8] mov [rbp+var_48], rax mov rax, [rbp+var_8] mov rax, [rax+58h] mov [rbp+var_40], rax mov rax, [rbp+var_8] mov rax, [rax+68h] mov [rbp+var_38], rax mov rax, [rbp+var_10] mov [rbp+var_30], rax cmp [rbp+var_18], 0 jz short loc_E3983 mov rax, [rbp+var_18] mov [rbp+var_50], rax jmp short loc_E398F loc_E3983: mov rax, [rbp+var_8] mov rax, [rax+8] mov [rbp+var_50], rax loc_E398F: mov rax, [rbp+var_40] mov rsi, [rbp+var_30] mov rdi, [rbp+var_38] mov rdx, [rbp+var_50] call rax mov rdi, [rbp+var_48] mov esi, eax mov rdx, [rbp+var_10] mov rcx, [rbp+var_18] mov r8, [rbp+var_20] call my_hash_first_from_hash_value mov [rbp+var_28], rax mov rax, [rbp+var_28] add rsp, 50h pop rbp retn
long long my_hash_first(_QWORD *a1, long long a2, long long a3, long long a4) { unsigned int v4; // eax long long ( *v6)(long long, long long, long long); // [rsp+10h] [rbp-40h] long long v7; // [rsp+18h] [rbp-38h] v6 = (long long ( *)(long long, long long, long long))a1[11]; v7 = a1[13]; if ( a3 ) v4 = v6(v7, a2, a3); else v4 = v6(v7, a2, a1[1]); return my_hash_first_from_hash_value(a1, v4, a2, a3, a4); }
my_hash_first: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX JMP 0x001e394a LAB_001e394a: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x58] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x68] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x18],0x0 JZ 0x001e3983 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x50],RAX JMP 0x001e398f LAB_001e3983: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x50],RAX LAB_001e398f: MOV RAX,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x30] MOV RDI,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x50] CALL RAX MOV RDI,qword ptr [RBP + -0x48] MOV ESI,EAX MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x18] MOV R8,qword ptr [RBP + -0x20] CALL 0x001e3a10 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RSP,0x50 POP RBP RET
int8 my_hash_first(long param_1,int8 param_2,long param_3,int8 param_4) { int4 uVar1; int8 uVar2; int8 local_58; local_58 = param_3; if (param_3 == 0) { local_58 = *(long *)(param_1 + 8); } uVar1 = (**(code **)(param_1 + 0x58))(*(int8 *)(param_1 + 0x68),param_2,local_58); uVar2 = my_hash_first_from_hash_value(param_1,uVar1,param_2,param_3,param_4); return uVar2; }
40,619
strxnmov
eloqsql/strings/strxnmov.c
char *strxnmov(char *dst, size_t len, const char *src, ...) { va_list pvar; char *end_of_dst=dst+len; va_start(pvar,src); while (src != NullS) { do { if (dst == end_of_dst) goto end; } while ((*dst++ = *src++)); dst--; src = va_arg(pvar, char *); } end: *dst=0; va_end(pvar); return dst; }
O0
c
strxnmov: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp testb %al, %al je 0xae2bb movaps %xmm0, -0xc0(%rbp) movaps %xmm1, -0xb0(%rbp) movaps %xmm2, -0xa0(%rbp) movaps %xmm3, -0x90(%rbp) movaps %xmm4, -0x80(%rbp) movaps %xmm5, -0x70(%rbp) movaps %xmm6, -0x60(%rbp) movaps %xmm7, -0x50(%rbp) movq %r9, -0xc8(%rbp) movq %r8, -0xd0(%rbp) movq %rcx, -0xd8(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax addq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) leaq -0x30(%rbp), %rax leaq -0xf0(%rbp), %rcx movq %rcx, 0x10(%rax) leaq 0x10(%rbp), %rcx movq %rcx, 0x8(%rax) movl $0x30, 0x4(%rax) movl $0x18, (%rax) cmpq $0x0, -0x18(%rbp) je 0xae3c7 jmp 0xae319 movq -0x8(%rbp), %rax cmpq -0x38(%rbp), %rax jne 0xae328 jmp 0xae3c9 jmp 0xae32a movq -0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x18(%rbp) movb (%rax), %al movq -0x8(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %al, (%rcx) cmpb $0x0, %al jne 0xae319 movq -0x8(%rbp), %rax addq $-0x1, %rax movq %rax, -0x8(%rbp) leaq -0x30(%rbp), %rax movq %rax, -0x100(%rbp) movl -0x30(%rbp), %eax movl %eax, -0xf4(%rbp) cmpl $0x28, %eax ja 0xae397 movq -0x100(%rbp), %rcx movl -0xf4(%rbp), %edx movslq %edx, %rax addq 0x10(%rcx), %rax addl $0x8, %edx movl %edx, (%rcx) movq %rax, -0x108(%rbp) jmp 0xae3b4 movq -0x100(%rbp), %rcx movq 0x8(%rcx), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, 0x8(%rcx) movq %rax, -0x108(%rbp) movq -0x108(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) jmp 0xae30c jmp 0xae3c9 movq -0x8(%rbp), %rax movb $0x0, (%rax) movq -0x8(%rbp), %rax addq $0x90, %rsp popq %rbp retq nopl (%rax)
strxnmov: push rbp mov rbp, rsp sub rsp, 90h test al, al jz short loc_AE2BB movaps [rbp+var_C0], xmm0 movaps [rbp+var_B0], xmm1 movaps [rbp+var_A0], xmm2 movaps [rbp+var_90], xmm3 movaps [rbp+var_80], xmm4 movaps [rbp+var_70], xmm5 movaps [rbp+var_60], xmm6 movaps [rbp+var_50], xmm7 loc_AE2BB: mov [rbp+var_C8], r9 mov [rbp+var_D0], r8 mov [rbp+var_D8], rcx mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] add rax, [rbp+var_10] mov [rbp+var_38], rax lea rax, [rbp+var_30] lea rcx, [rbp+var_F0] mov [rax+10h], rcx lea rcx, [rbp+arg_0] mov [rax+8], rcx mov dword ptr [rax+4], 30h ; '0' mov dword ptr [rax], 18h loc_AE30C: cmp [rbp+var_18], 0 jz loc_AE3C7 jmp short $+2 loc_AE319: mov rax, [rbp+var_8] cmp rax, [rbp+var_38] jnz short loc_AE328 jmp loc_AE3C9 loc_AE328: jmp short $+2 loc_AE32A: mov rax, [rbp+var_18] mov rcx, rax add rcx, 1 mov [rbp+var_18], rcx mov al, [rax] mov rcx, [rbp+var_8] mov rdx, rcx add rdx, 1 mov [rbp+var_8], rdx mov [rcx], al cmp al, 0 jnz short loc_AE319 mov rax, [rbp+var_8] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_8], rax lea rax, [rbp+var_30] mov [rbp+var_100], rax mov eax, [rbp+var_30] mov [rbp+var_F4], eax cmp eax, 28h ; '(' ja short loc_AE397 mov rcx, [rbp+var_100] mov edx, [rbp+var_F4] movsxd rax, edx add rax, [rcx+10h] add edx, 8 mov [rcx], edx mov [rbp+var_108], rax jmp short loc_AE3B4 loc_AE397: mov rcx, [rbp+var_100] mov rax, [rcx+8] mov rdx, rax add rdx, 8 mov [rcx+8], rdx mov [rbp+var_108], rax loc_AE3B4: mov rax, [rbp+var_108] mov rax, [rax] mov [rbp+var_18], rax jmp loc_AE30C loc_AE3C7: jmp short $+2 loc_AE3C9: mov rax, [rbp+var_8] mov byte ptr [rax], 0 mov rax, [rbp+var_8] add rsp, 90h pop rbp retn
_BYTE * strxnmov( _BYTE *a1, long long a2, _BYTE *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) { _BYTE *v15; // rax _BYTE *v16; // rcx char *v17; // rax char v19; // [rsp+18h] [rbp-F0h] BYREF long long v20; // [rsp+30h] [rbp-D8h] long long v21; // [rsp+38h] [rbp-D0h] long long v22; // [rsp+40h] [rbp-C8h] __m128 v23; // [rsp+48h] [rbp-C0h] __m128 v24; // [rsp+58h] [rbp-B0h] __m128 v25; // [rsp+68h] [rbp-A0h] __m128 v26; // [rsp+78h] [rbp-90h] __m128 v27; // [rsp+88h] [rbp-80h] __m128 v28; // [rsp+98h] [rbp-70h] __m128 v29; // [rsp+A8h] [rbp-60h] __m128 v30; // [rsp+B8h] [rbp-50h] _BYTE *v31; // [rsp+D0h] [rbp-38h] int v32; // [rsp+D8h] [rbp-30h] int v33; // [rsp+DCh] [rbp-2Ch] char *v34; // [rsp+E0h] [rbp-28h] char *v35; // [rsp+E8h] [rbp-20h] _BYTE *v36; // [rsp+F0h] [rbp-18h] long long v37; // [rsp+F8h] [rbp-10h] _BYTE *v38; // [rsp+100h] [rbp-8h] v23 = a7; v24 = a8; v25 = a9; v26 = a10; v27 = a11; v28 = a12; v29 = a13; v30 = a14; v22 = a6; v21 = a5; v20 = a4; v38 = a1; v37 = a2; v36 = a3; v31 = &a1[a2]; v35 = &v19; v34 = &a15; v33 = 48; v32 = 24; LABEL_2: if ( v36 ) { while ( v38 != v31 ) { v15 = v36++; LOBYTE(v15) = *v15; v16 = v38++; *v16 = (_BYTE)v15; if ( !(_BYTE)v15 ) { --v38; if ( (unsigned int)v32 > 0x28 ) { v17 = v34; v34 += 8; } else { v17 = &v35[v32]; v32 += 8; } v36 = *(_BYTE **)v17; goto LABEL_2; } } } *v38 = 0; return v38; }
strxnmov: PUSH RBP MOV RBP,RSP SUB RSP,0x90 TEST AL,AL JZ 0x001ae2bb MOVAPS xmmword ptr [RBP + -0xc0],XMM0 MOVAPS xmmword ptr [RBP + -0xb0],XMM1 MOVAPS xmmword ptr [RBP + -0xa0],XMM2 MOVAPS xmmword ptr [RBP + -0x90],XMM3 MOVAPS xmmword ptr [RBP + -0x80],XMM4 MOVAPS xmmword ptr [RBP + -0x70],XMM5 MOVAPS xmmword ptr [RBP + -0x60],XMM6 MOVAPS xmmword ptr [RBP + -0x50],XMM7 LAB_001ae2bb: MOV qword ptr [RBP + -0xc8],R9 MOV qword ptr [RBP + -0xd0],R8 MOV qword ptr [RBP + -0xd8],RCX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RAX LEA RAX,[RBP + -0x30] LEA RCX,[RBP + -0xf0] MOV qword ptr [RAX + 0x10],RCX LEA RCX,[RBP + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RAX + 0x4],0x30 MOV dword ptr [RAX],0x18 LAB_001ae30c: CMP qword ptr [RBP + -0x18],0x0 JZ 0x001ae3c7 JMP 0x001ae319 LAB_001ae319: MOV RAX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RBP + -0x38] JNZ 0x001ae328 JMP 0x001ae3c9 LAB_001ae328: JMP 0x001ae32a LAB_001ae32a: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x18],RCX MOV AL,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x8],RDX MOV byte ptr [RCX],AL CMP AL,0x0 JNZ 0x001ae319 MOV RAX,qword ptr [RBP + -0x8] ADD RAX,-0x1 MOV qword ptr [RBP + -0x8],RAX LEA RAX,[RBP + -0x30] MOV qword ptr [RBP + -0x100],RAX MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0xf4],EAX CMP EAX,0x28 JA 0x001ae397 MOV RCX,qword ptr [RBP + -0x100] MOV EDX,dword ptr [RBP + -0xf4] MOVSXD RAX,EDX ADD RAX,qword ptr [RCX + 0x10] ADD EDX,0x8 MOV dword ptr [RCX],EDX MOV qword ptr [RBP + -0x108],RAX JMP 0x001ae3b4 LAB_001ae397: MOV RCX,qword ptr [RBP + -0x100] MOV RAX,qword ptr [RCX + 0x8] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RCX + 0x8],RDX MOV qword ptr [RBP + -0x108],RAX LAB_001ae3b4: MOV RAX,qword ptr [RBP + -0x108] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX JMP 0x001ae30c LAB_001ae3c7: JMP 0x001ae3c9 LAB_001ae3c9: MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x90 POP RBP RET
/* WARNING: Restarted to delay deadcode elimination for space: stack */ char * strxnmov(char *param_1,long param_2,char *param_3) { char cVar1; char *pcVar2; int8 *local_110; int8 local_f8 [24]; uint local_38; int8 *local_30; char *local_20; char *local_10; local_30 = (int8 *)&stack0x00000008; local_38 = 0x18; local_20 = param_3; local_10 = param_1; while (pcVar2 = local_10, local_20 != (char *)0x0) { do { local_10 = pcVar2; if (local_10 == param_1 + param_2) goto LAB_001ae3c9; cVar1 = *local_20; *local_10 = cVar1; local_20 = local_20 + 1; pcVar2 = local_10 + 1; } while (cVar1 != '\0'); if (local_38 < 0x29) { local_110 = (int8 *)((long)local_f8 + (long)(int)local_38); local_38 = local_38 + 8; } else { local_110 = local_30; local_30 = local_30 + 1; } local_20 = (char *)*local_110; } LAB_001ae3c9: *local_10 = '\0'; return local_10; }
40,620
print_aria_log_control
eloqsql/storage/maria/ma_control_file.c
my_bool print_aria_log_control() { uchar buffer[CF_MAX_SIZE]; char name[FN_REFLEN], uuid_str[MY_UUID_STRING_LENGTH+1]; const char *errmsg; uint new_cf_create_time_size, new_cf_changeable_size; my_off_t file_size; ulong logno; ulonglong trid,checkpoint_lsn; int open_flags= O_BINARY | /*O_DIRECT |*/ O_RDWR | O_CLOEXEC; int error= CONTROL_FILE_UNKNOWN_ERROR; uint recovery_fails; File file; DBUG_ENTER("ma_control_file_open"); if (fn_format(name, CONTROL_FILE_BASE_NAME, maria_data_root, "", MYF(MY_WME)) == NullS) DBUG_RETURN(CONTROL_FILE_UNKNOWN_ERROR); if ((file= mysql_file_open(key_file_control, name, open_flags, MYF(MY_WME))) < 0) { errmsg= "Can't open file"; goto err; } file_size= mysql_file_seek(file, 0, SEEK_END, MYF(MY_WME)); if (file_size == MY_FILEPOS_ERROR) { errmsg= "Can't read size"; goto err; } if (file_size < CF_MIN_SIZE) { /* Given that normally we write only a sector and it's atomic, the only possibility for a file to be of too short size is if we crashed at the very first startup, between file creation and file write. Quite unlikely (and can be made even more unlikely by doing this: create a temp file, write it, and then rename it to be the control file). What's more likely is if someone forgot to restore the control file, just did a "touch control" to try to get Maria to start, or if the disk/filesystem has a problem. So let's be rigid. */ error= CONTROL_FILE_TOO_SMALL; errmsg= "Size of control file is smaller than expected"; goto err; } /* Check if control file is unexpectedly big */ if (file_size > CF_MAX_SIZE) { error= CONTROL_FILE_TOO_BIG; errmsg= "File size bigger than expected"; goto err; } if (mysql_file_pread(file, buffer, (size_t)file_size, 0, MYF(MY_FNABP))) { errmsg= "Can't read file"; goto err; } if (memcmp(buffer + CF_MAGIC_STRING_OFFSET, CF_MAGIC_STRING, CF_MAGIC_STRING_SIZE)) { error= CONTROL_FILE_BAD_MAGIC_STRING; errmsg= "Missing valid id at start of file. File is not a valid aria control file"; goto err; } printf("Aria file version: %u\n", buffer[CF_VERSION_OFFSET]); new_cf_create_time_size= uint2korr(buffer + CF_CREATE_TIME_SIZE_OFFSET); new_cf_changeable_size= uint2korr(buffer + CF_CHANGEABLE_SIZE_OFFSET); if (new_cf_create_time_size < CF_MIN_CREATE_TIME_TOTAL_SIZE || new_cf_changeable_size < CF_MIN_CHANGEABLE_TOTAL_SIZE || new_cf_create_time_size + new_cf_changeable_size != file_size) { error= CONTROL_FILE_INCONSISTENT_INFORMATION; errmsg= "Sizes stored in control file are inconsistent"; goto err; } checkpoint_lsn= lsn_korr(buffer + new_cf_create_time_size + CF_LSN_OFFSET); logno= uint4korr(buffer + new_cf_create_time_size + CF_FILENO_OFFSET); my_uuid2str(buffer + CF_UUID_OFFSET, uuid_str); uuid_str[MY_UUID_STRING_LENGTH]= 0; printf("Block size: %u\n", uint2korr(buffer + CF_BLOCKSIZE_OFFSET)); printf("maria_uuid: %s\n", uuid_str); printf("last_checkpoint_lsn: " LSN_FMT "\n", LSN_IN_PARTS(checkpoint_lsn)); printf("last_log_number: %lu\n", (ulong) logno); if (new_cf_changeable_size >= (CF_MAX_TRID_OFFSET + CF_MAX_TRID_SIZE)) { trid= transid_korr(buffer + new_cf_create_time_size + CF_MAX_TRID_OFFSET); printf("trid: %llu\n", (ulonglong) trid); } if (new_cf_changeable_size >= (CF_RECOV_FAIL_OFFSET + CF_RECOV_FAIL_SIZE)) { recovery_fails= (buffer + new_cf_create_time_size + CF_RECOV_FAIL_OFFSET)[0]; printf("recovery_failures: %u\n", recovery_fails); } DBUG_RETURN(0); err: my_printf_error(HA_ERR_INITIALIZATION, "Got error '%s' when trying to use aria control file " "'%s'", 0, errmsg, name); DBUG_RETURN(error); }
O0
c
print_aria_log_control: pushq %rbp movq %rsp, %rbp subq $0x4a0, %rsp # imm = 0x4A0 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movl $0x80002, -0x47c(%rbp) # imm = 0x80002 movl $0xb, -0x480(%rbp) leaq -0x410(%rbp), %rdi leaq 0x428dc6(%rip), %rax # 0x477b60 movq (%rax), %rdx leaq 0x102b0d(%rip), %rsi # 0x1518b1 leaq 0x108f02(%rip), %rcx # 0x157cad movl $0x10, %r8d callq 0xdf7c0 cmpq $0x0, %rax jne 0x4edca jmp 0x4edbe movb $0xb, -0x441(%rbp) jmp 0x4f14a leaq 0x428f4f(%rip), %rax # 0x477d20 movl (%rax), %edi leaq -0x410(%rbp), %rcx movl -0x47c(%rbp), %r8d leaq 0x102afc(%rip), %rsi # 0x1518e4 movl $0x280, %edx # imm = 0x280 movl $0x10, %r9d callq 0x4e420 movl %eax, -0x488(%rbp) cmpl $0x0, %eax jge 0x4ee16 leaq 0x102b23(%rip), %rax # 0x15192d movq %rax, -0x450(%rbp) jmp 0x4f119 movl -0x488(%rbp), %edx leaq 0x102ac1(%rip), %rdi # 0x1518e4 movl $0x286, %esi # imm = 0x286 xorl %eax, %eax movl %eax, %ecx movl $0x2, %r8d movl $0x10, %r9d callq 0x4e510 movq %rax, -0x460(%rbp) cmpq $-0x1, -0x460(%rbp) jne 0x4ee61 leaq 0x102ae8(%rip), %rax # 0x15193d movq %rax, -0x450(%rbp) jmp 0x4f119 cmpq $0x2d, -0x460(%rbp) jae 0x4ee88 movl $0x1, -0x480(%rbp) leaq 0x102ad1(%rip), %rax # 0x15194d movq %rax, -0x450(%rbp) jmp 0x4f119 cmpq $0x200, -0x460(%rbp) # imm = 0x200 jbe 0x4eeb2 movl $0x2, -0x480(%rbp) leaq 0x102ad5(%rip), %rax # 0x15197b movq %rax, -0x450(%rbp) jmp 0x4f119 movl -0x488(%rbp), %edx leaq -0x210(%rbp), %rcx movq -0x460(%rbp), %r8 leaq 0x102a17(%rip), %rdi # 0x1518e4 movl $0x2a6, %esi # imm = 0x2A6 xorl %eax, %eax movl %eax, %r9d movq $0x2, (%rsp) callq 0x4e600 cmpq $0x0, %rax je 0x4eefd leaq 0x102aa9(%rip), %rax # 0x15199a movq %rax, -0x450(%rbp) jmp 0x4f119 leaq -0x210(%rbp), %rdi leaq 0x102a9f(%rip), %rsi # 0x1519aa movl $0x3, %edx callq 0x2a830 cmpl $0x0, %eax je 0x4ef37 movl $0x3, -0x480(%rbp) leaq 0x102a83(%rip), %rax # 0x1519ae movq %rax, -0x450(%rbp) jmp 0x4f119 movzbl -0x20d(%rbp), %esi leaq 0x102c6e(%rip), %rdi # 0x151bb3 movb $0x0, %al callq 0x2a050 movzwl -0x1fc(%rbp), %eax movl %eax, -0x454(%rbp) movzwl -0x1fa(%rbp), %eax movl %eax, -0x458(%rbp) movl -0x454(%rbp), %eax cmpq $0x1e, %rax jb 0x4ef92 cmpl $0xf, -0x458(%rbp) jb 0x4ef92 movl -0x454(%rbp), %eax addl -0x458(%rbp), %eax movl %eax, %eax cmpq -0x460(%rbp), %rax je 0x4efaf movl $0x8, -0x480(%rbp) leaq 0x102a92(%rip), %rax # 0x151a35 movq %rax, -0x450(%rbp) jmp 0x4f119 movl -0x454(%rbp), %eax movzbl -0x20c(%rbp,%rax), %eax movl -0x454(%rbp), %ecx movzbl -0x20b(%rbp,%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movl -0x454(%rbp), %ecx movzbl -0x20a(%rbp,%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movl %eax, %eax shlq $0x20, %rax movl -0x454(%rbp), %ecx movl -0x209(%rbp,%rcx), %ecx orq %rcx, %rax movq %rax, -0x478(%rbp) movl -0x454(%rbp), %eax movl -0x205(%rbp,%rax), %eax movq %rax, -0x468(%rbp) leaq -0x210(%rbp), %rdi addq $0x4, %rdi leaq -0x440(%rbp), %rsi callq 0xff330 movb $0x0, -0x41c(%rbp) movzwl -0x1f8(%rbp), %esi leaq 0x102b8c(%rip), %rdi # 0x151bcc movb $0x0, %al callq 0x2a050 leaq -0x440(%rbp), %rsi leaq 0x102b90(%rip), %rdi # 0x151be5 movb $0x0, %al callq 0x2a050 movq -0x478(%rbp), %rax shrq $0x20, %rax movl %eax, %esi movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq -0x478(%rbp), %rax movl %eax, %edx leaq 0x102b7b(%rip), %rdi # 0x151bfe movb $0x0, %al callq 0x2a050 movq -0x468(%rbp), %rsi leaq 0x102b86(%rip), %rdi # 0x151c1e movb $0x0, %al callq 0x2a050 cmpl $0x15, -0x458(%rbp) jb 0x4f0dd leaq -0x210(%rbp), %rdi movl -0x454(%rbp), %eax addq %rax, %rdi addq $0xf, %rdi callq 0x4e770 movq %rax, -0x470(%rbp) movq -0x470(%rbp), %rsi leaq 0x102b62(%rip), %rdi # 0x151c38 movb $0x0, %al callq 0x2a050 cmpl $0x16, -0x458(%rbp) jb 0x4f10e movl -0x454(%rbp), %eax movzbl -0x1fb(%rbp,%rax), %eax movl %eax, -0x484(%rbp) movl -0x484(%rbp), %esi leaq 0x102b4c(%rip), %rdi # 0x151c53 movb $0x0, %al callq 0x2a050 jmp 0x4f110 movb $0x0, -0x441(%rbp) jmp 0x4f14a movq -0x450(%rbp), %rcx leaq -0x410(%rbp), %r8 movl $0xae, %edi leaq 0x1029d1(%rip), %rsi # 0x151b04 xorl %eax, %eax movl %eax, %edx movb $0x0, %al callq 0xefcc0 movl -0x480(%rbp), %eax movb %al, -0x441(%rbp) movb -0x441(%rbp), %al movb %al, -0x489(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x4f177 movb -0x489(%rbp), %al addq $0x4a0, %rsp # imm = 0x4A0 popq %rbp retq callq 0x2a270 nopl (%rax)
print_aria_log_control: push rbp mov rbp, rsp sub rsp, 4A0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_47C], 80002h mov [rbp+var_480], 0Bh lea rdi, [rbp+var_410] lea rax, maria_data_root mov rdx, [rax] lea rsi, aAriaLogControl; "aria_log_control" lea rcx, asc_157CA9+4; "" mov r8d, 10h call fn_format cmp rax, 0 jnz short loc_4EDCA jmp short $+2 loc_4EDBE: mov [rbp+var_441], 0Bh jmp loc_4F14A loc_4EDCA: lea rax, key_file_control mov edi, [rax] lea rcx, [rbp+var_410] mov r8d, [rbp+var_47C] lea rsi, aWorkspaceLlm4b_10; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 280h mov r9d, 10h call inline_mysql_file_open mov [rbp+var_488], eax cmp eax, 0 jge short loc_4EE16 lea rax, aCanTOpenFile; "Can't open file" mov [rbp+var_450], rax jmp loc_4F119 loc_4EE16: mov edx, [rbp+var_488] lea rdi, aWorkspaceLlm4b_10; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 286h xor eax, eax mov ecx, eax mov r8d, 2 mov r9d, 10h call inline_mysql_file_seek_1 mov [rbp+var_460], rax cmp [rbp+var_460], 0FFFFFFFFFFFFFFFFh jnz short loc_4EE61 lea rax, aCanTReadSize; "Can't read size" mov [rbp+var_450], rax jmp loc_4F119 loc_4EE61: cmp [rbp+var_460], 2Dh ; '-' jnb short loc_4EE88 mov [rbp+var_480], 1 lea rax, aSizeOfControlF; "Size of control file is smaller than ex"... mov [rbp+var_450], rax jmp loc_4F119 loc_4EE88: cmp [rbp+var_460], 200h jbe short loc_4EEB2 mov [rbp+var_480], 2 lea rax, aFileSizeBigger; "File size bigger than expected" mov [rbp+var_450], rax jmp loc_4F119 loc_4EEB2: mov edx, [rbp+var_488] lea rcx, [rbp+var_210] mov r8, [rbp+var_460] lea rdi, aWorkspaceLlm4b_10; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 2A6h xor eax, eax mov r9d, eax mov [rsp+4A0h+var_4A0], 2 call inline_mysql_file_pread_2 cmp rax, 0 jz short loc_4EEFD lea rax, aCanTReadFile; "Can't read file" mov [rbp+var_450], rax jmp loc_4F119 loc_4EEFD: lea rdi, [rbp+var_210] lea rsi, word_1519AA mov edx, 3 call _memcmp cmp eax, 0 jz short loc_4EF37 mov [rbp+var_480], 3 lea rax, aMissingValidId; "Missing valid id at start of file. File"... mov [rbp+var_450], rax jmp loc_4F119 loc_4EF37: movzx esi, [rbp+var_20D] lea rdi, aAriaFileVersio; "Aria file version: %u\n" mov al, 0 call _printf movzx eax, [rbp+var_1FC] mov [rbp+var_454], eax movzx eax, [rbp+var_1FA] mov [rbp+var_458], eax mov eax, [rbp+var_454] cmp rax, 1Eh jb short loc_4EF92 cmp [rbp+var_458], 0Fh jb short loc_4EF92 mov eax, [rbp+var_454] add eax, [rbp+var_458] mov eax, eax cmp rax, [rbp+var_460] jz short loc_4EFAF loc_4EF92: mov [rbp+var_480], 8 lea rax, aSizesStoredInC; "Sizes stored in control file are incons"... mov [rbp+var_450], rax jmp loc_4F119 loc_4EFAF: mov eax, [rbp+var_454] movzx eax, [rbp+rax+var_20C] mov ecx, [rbp+var_454] movzx ecx, [rbp+rcx+var_20B] shl ecx, 8 or eax, ecx mov ecx, [rbp+var_454] movzx ecx, [rbp+rcx+var_20A] shl ecx, 10h or eax, ecx mov eax, eax shl rax, 20h mov ecx, [rbp+var_454] mov ecx, [rbp+rcx+var_209] or rax, rcx mov [rbp+var_478], rax mov eax, [rbp+var_454] mov eax, [rbp+rax+var_205] mov [rbp+var_468], rax lea rdi, [rbp+var_210] add rdi, 4 lea rsi, [rbp+var_440] call my_uuid2str mov [rbp+var_41C], 0 movzx esi, [rbp+var_1F8] lea rdi, aBlockSizeU; "Block size: %u\n" mov al, 0 call _printf lea rsi, [rbp+var_440] lea rdi, aMariaUuidS; "maria_uuid: %s\n" mov al, 0 call _printf mov rax, [rbp+var_478] shr rax, 20h mov esi, eax mov rax, 0FFFFFFFFh and rax, [rbp+var_478] mov edx, eax lea rdi, aLastCheckpoint; "last_checkpoint_lsn: (%u,0x%x)\n" mov al, 0 call _printf mov rsi, [rbp+var_468] lea rdi, aLastLogNumberL; "last_log_number: %lu\n" mov al, 0 call _printf cmp [rbp+var_458], 15h jb short loc_4F0DD lea rdi, [rbp+var_210] mov eax, [rbp+var_454] add rdi, rax add rdi, 0Fh call uint6korr_0 mov [rbp+var_470], rax mov rsi, [rbp+var_470] lea rdi, aTridLlu; "trid: %llu\n" mov al, 0 call _printf loc_4F0DD: cmp [rbp+var_458], 16h jb short loc_4F10E mov eax, [rbp+var_454] movzx eax, byte ptr [rbp+rax+var_1FC+1] mov [rbp+var_484], eax mov esi, [rbp+var_484] lea rdi, aRecoveryFailur; "recovery_failures: %u\n" mov al, 0 call _printf loc_4F10E: jmp short $+2 loc_4F110: mov [rbp+var_441], 0 jmp short loc_4F14A loc_4F119: mov rcx, [rbp+var_450] lea r8, [rbp+var_410] mov edi, 0AEh lea rsi, aGotErrorSWhenT; "Got error '%s' when trying to use aria "... xor eax, eax mov edx, eax mov al, 0 call my_printf_error mov eax, [rbp+var_480] mov [rbp+var_441], al loc_4F14A: mov al, [rbp+var_441] mov [rbp+var_489], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_4F177 mov al, [rbp+var_489] add rsp, 4A0h pop rbp retn loc_4F177: call ___stack_chk_fail
char print_aria_log_control() { int v0; // r9d int v1; // r9d int v2; // r9d int v3; // r9d int v4; // r9d signed int v6; // [rsp+18h] [rbp-488h] char v7; // [rsp+20h] [rbp-480h] unsigned long long v8; // [rsp+28h] [rbp-478h] unsigned long long v9; // [rsp+30h] [rbp-470h] long long v10; // [rsp+38h] [rbp-468h] unsigned long long v11; // [rsp+40h] [rbp-460h] unsigned int v12; // [rsp+48h] [rbp-458h] unsigned int v13; // [rsp+4Ch] [rbp-454h] char v15[48]; // [rsp+60h] [rbp-440h] BYREF _BYTE v16[512]; // [rsp+90h] [rbp-410h] BYREF _BYTE v17[4]; // [rsp+290h] [rbp-210h] BYREF _BYTE v18[16]; // [rsp+294h] [rbp-20Ch] BYREF unsigned __int16 v19; // [rsp+2A4h] [rbp-1FCh] unsigned __int16 v20; // [rsp+2A6h] [rbp-1FAh] unsigned __int16 v21; // [rsp+2A8h] [rbp-1F8h] unsigned long long v22; // [rsp+498h] [rbp-8h] v22 = __readfsqword(0x28u); v7 = 11; if ( !fn_format(v16, "aria_log_control", maria_data_root, "", 16LL) ) return 11; v6 = inline_mysql_file_open( key_file_control, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_control_file.c", 0x280u, (long long)v16, 0x80002u, 16LL); if ( v6 < 0 ) { my_printf_error( 174, (unsigned int)"Got error '%s' when trying to use aria control file '%s'", 0, (unsigned int)"Can't open file", (unsigned int)v16, v0); return v7; } v11 = inline_mysql_file_seek_1( (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_control_file.c", 0x286u, v6, 0LL, 2u, 16LL); if ( v11 == -1LL ) { my_printf_error( 174, (unsigned int)"Got error '%s' when trying to use aria control file '%s'", 0, (unsigned int)"Can't read size", (unsigned int)v16, v1); return v7; } if ( v11 < 0x2D ) { v7 = 1; my_printf_error( 174, (unsigned int)"Got error '%s' when trying to use aria control file '%s'", 0, (unsigned int)"Size of control file is smaller than expected", (unsigned int)v16, v1); return v7; } if ( v11 > 0x200 ) { v7 = 2; my_printf_error( 174, (unsigned int)"Got error '%s' when trying to use aria control file '%s'", 0, (unsigned int)"File size bigger than expected", (unsigned int)v16, v1); return v7; } if ( inline_mysql_file_pread_2( (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_control_file.c", 0x2A6u, v6, (long long)v17, v11, 0LL, 2LL) ) { my_printf_error( 174, (unsigned int)"Got error '%s' when trying to use aria control file '%s'", 0, (unsigned int)"Can't read file", (unsigned int)v16, v2); return v7; } if ( (unsigned int)memcmp(v17, &word_1519AA, 3LL) ) { v7 = 3; my_printf_error( 174, (unsigned int)"Got error '%s' when trying to use aria control file '%s'", 0, (unsigned int)"Missing valid id at start of file. File is not a valid aria control file", (unsigned int)v16, v3); return v7; } printf("Aria file version: %u\n", v17[3]); v13 = v19; v12 = v20; if ( v19 < 0x1EuLL || v20 < 0xFu || v20 + v19 != v11 ) { v7 = 8; my_printf_error( 174, (unsigned int)"Got error '%s' when trying to use aria control file '%s'", 0, (unsigned int)"Sizes stored in control file are inconsistent", (unsigned int)v16, v4); return v7; } v8 = *(unsigned int *)&v18[v19 + 3] | ((unsigned long long)(((unsigned __int8)v18[v19 + 2] << 16) | ((unsigned __int8)v18[v19 + 1] << 8) | (unsigned int)(unsigned __int8)v18[v19]) << 32); v10 = *(unsigned int *)&v18[v19 + 7]; my_uuid2str(v18, v15); v15[36] = 0; printf("Block size: %u\n", v21); printf("maria_uuid: %s\n", v15); printf("last_checkpoint_lsn: (%u,0x%x)\n", HIDWORD(v8), v8); printf("last_log_number: %lu\n", v10); if ( v12 >= 0x15 ) { v9 = uint6korr_0((unsigned int *)&v17[v13 + 15]); printf("trid: %llu\n", v9); } if ( v12 >= 0x16 ) printf("recovery_failures: %u\n", *((unsigned __int8 *)&v19 + v13 + 1)); return 0; }
print_aria_log_control: PUSH RBP MOV RBP,RSP SUB RSP,0x4a0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x47c],0x80002 MOV dword ptr [RBP + -0x480],0xb LEA RDI,[RBP + -0x410] LEA RAX,[0x577b60] MOV RDX,qword ptr [RAX] LEA RSI,[0x2518b1] LEA RCX,[0x257cad] MOV R8D,0x10 CALL 0x001df7c0 CMP RAX,0x0 JNZ 0x0014edca JMP 0x0014edbe LAB_0014edbe: MOV byte ptr [RBP + -0x441],0xb JMP 0x0014f14a LAB_0014edca: LEA RAX,[0x577d20] MOV EDI,dword ptr [RAX] LEA RCX,[RBP + -0x410] MOV R8D,dword ptr [RBP + -0x47c] LEA RSI,[0x2518e4] MOV EDX,0x280 MOV R9D,0x10 CALL 0x0014e420 MOV dword ptr [RBP + -0x488],EAX CMP EAX,0x0 JGE 0x0014ee16 LEA RAX,[0x25192d] MOV qword ptr [RBP + -0x450],RAX JMP 0x0014f119 LAB_0014ee16: MOV EDX,dword ptr [RBP + -0x488] LEA RDI,[0x2518e4] MOV ESI,0x286 XOR EAX,EAX MOV ECX,EAX MOV R8D,0x2 MOV R9D,0x10 CALL 0x0014e510 MOV qword ptr [RBP + -0x460],RAX CMP qword ptr [RBP + -0x460],-0x1 JNZ 0x0014ee61 LEA RAX,[0x25193d] MOV qword ptr [RBP + -0x450],RAX JMP 0x0014f119 LAB_0014ee61: CMP qword ptr [RBP + -0x460],0x2d JNC 0x0014ee88 MOV dword ptr [RBP + -0x480],0x1 LEA RAX,[0x25194d] MOV qword ptr [RBP + -0x450],RAX JMP 0x0014f119 LAB_0014ee88: CMP qword ptr [RBP + -0x460],0x200 JBE 0x0014eeb2 MOV dword ptr [RBP + -0x480],0x2 LEA RAX,[0x25197b] MOV qword ptr [RBP + -0x450],RAX JMP 0x0014f119 LAB_0014eeb2: MOV EDX,dword ptr [RBP + -0x488] LEA RCX,[RBP + -0x210] MOV R8,qword ptr [RBP + -0x460] LEA RDI,[0x2518e4] MOV ESI,0x2a6 XOR EAX,EAX MOV R9D,EAX MOV qword ptr [RSP],0x2 CALL 0x0014e600 CMP RAX,0x0 JZ 0x0014eefd LEA RAX,[0x25199a] MOV qword ptr [RBP + -0x450],RAX JMP 0x0014f119 LAB_0014eefd: LEA RDI,[RBP + -0x210] LEA RSI,[0x2519aa] MOV EDX,0x3 CALL 0x0012a830 CMP EAX,0x0 JZ 0x0014ef37 MOV dword ptr [RBP + -0x480],0x3 LEA RAX,[0x2519ae] MOV qword ptr [RBP + -0x450],RAX JMP 0x0014f119 LAB_0014ef37: MOVZX ESI,byte ptr [RBP + -0x20d] LEA RDI,[0x251bb3] MOV AL,0x0 CALL 0x0012a050 MOVZX EAX,word ptr [RBP + -0x1fc] MOV dword ptr [RBP + -0x454],EAX MOVZX EAX,word ptr [RBP + -0x1fa] MOV dword ptr [RBP + -0x458],EAX MOV EAX,dword ptr [RBP + -0x454] CMP RAX,0x1e JC 0x0014ef92 CMP dword ptr [RBP + -0x458],0xf JC 0x0014ef92 MOV EAX,dword ptr [RBP + -0x454] ADD EAX,dword ptr [RBP + -0x458] MOV EAX,EAX CMP RAX,qword ptr [RBP + -0x460] JZ 0x0014efaf LAB_0014ef92: MOV dword ptr [RBP + -0x480],0x8 LEA RAX,[0x251a35] MOV qword ptr [RBP + -0x450],RAX JMP 0x0014f119 LAB_0014efaf: MOV EAX,dword ptr [RBP + -0x454] MOVZX EAX,byte ptr [RBP + RAX*0x1 + -0x20c] MOV ECX,dword ptr [RBP + -0x454] MOVZX ECX,byte ptr [RBP + RCX*0x1 + -0x20b] SHL ECX,0x8 OR EAX,ECX MOV ECX,dword ptr [RBP + -0x454] MOVZX ECX,byte ptr [RBP + RCX*0x1 + -0x20a] SHL ECX,0x10 OR EAX,ECX MOV EAX,EAX SHL RAX,0x20 MOV ECX,dword ptr [RBP + -0x454] MOV ECX,dword ptr [RBP + RCX*0x1 + -0x209] OR RAX,RCX MOV qword ptr [RBP + -0x478],RAX MOV EAX,dword ptr [RBP + -0x454] MOV EAX,dword ptr [RBP + RAX*0x1 + -0x205] MOV qword ptr [RBP + -0x468],RAX LEA RDI,[RBP + -0x210] ADD RDI,0x4 LEA RSI,[RBP + -0x440] CALL 0x001ff330 MOV byte ptr [RBP + -0x41c],0x0 MOVZX ESI,word ptr [RBP + -0x1f8] LEA RDI,[0x251bcc] MOV AL,0x0 CALL 0x0012a050 LEA RSI,[RBP + -0x440] LEA RDI,[0x251be5] MOV AL,0x0 CALL 0x0012a050 MOV RAX,qword ptr [RBP + -0x478] SHR RAX,0x20 MOV ESI,EAX MOV RAX,0xffffffff AND RAX,qword ptr [RBP + -0x478] MOV EDX,EAX LEA RDI,[0x251bfe] MOV AL,0x0 CALL 0x0012a050 MOV RSI,qword ptr [RBP + -0x468] LEA RDI,[0x251c1e] MOV AL,0x0 CALL 0x0012a050 CMP dword ptr [RBP + -0x458],0x15 JC 0x0014f0dd LEA RDI,[RBP + -0x210] MOV EAX,dword ptr [RBP + -0x454] ADD RDI,RAX ADD RDI,0xf CALL 0x0014e770 MOV qword ptr [RBP + -0x470],RAX MOV RSI,qword ptr [RBP + -0x470] LEA RDI,[0x251c38] MOV AL,0x0 CALL 0x0012a050 LAB_0014f0dd: CMP dword ptr [RBP + -0x458],0x16 JC 0x0014f10e MOV EAX,dword ptr [RBP + -0x454] MOVZX EAX,byte ptr [RBP + RAX*0x1 + -0x1fb] MOV dword ptr [RBP + -0x484],EAX MOV ESI,dword ptr [RBP + -0x484] LEA RDI,[0x251c53] MOV AL,0x0 CALL 0x0012a050 LAB_0014f10e: JMP 0x0014f110 LAB_0014f110: MOV byte ptr [RBP + -0x441],0x0 JMP 0x0014f14a LAB_0014f119: MOV RCX,qword ptr [RBP + -0x450] LEA R8,[RBP + -0x410] MOV EDI,0xae LEA RSI,[0x251b04] XOR EAX,EAX MOV EDX,EAX MOV AL,0x0 CALL 0x001efcc0 MOV EAX,dword ptr [RBP + -0x480] MOV byte ptr [RBP + -0x441],AL LAB_0014f14a: MOV AL,byte ptr [RBP + -0x441] MOV byte ptr [RBP + -0x489],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0014f177 MOV AL,byte ptr [RBP + -0x489] ADD RSP,0x4a0 POP RBP RET LAB_0014f177: CALL 0x0012a270
int8 print_aria_log_control(void) { int4 uVar1; uint uVar2; uint3 uVar3; int iVar4; uint uVar5; uint uVar6; long lVar7; ulong uVar8; int8 uVar9; long in_FS_OFFSET; int1 local_488; char *local_458; int1 local_449; int1 local_448 [36]; int1 local_424; int1 local_418 [512]; int1 local_218 [3]; byte local_215; int1 auStack_214 [3]; uint auStack_211 [2]; int1 auStack_209 [5]; int2 local_204; ushort local_202; ushort local_200; int1 auStack_1f6 [486]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_488 = 0xb; lVar7 = fn_format(local_418,"aria_log_control",maria_data_root,&DAT_00257cad,0x10); if (lVar7 == 0) { local_449 = 0xb; } else { iVar4 = inline_mysql_file_open (key_file_control, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_control_file.c", 0x280,local_418,0x80002,0x10); if (iVar4 < 0) { local_458 = "Can\'t open file"; } else { uVar8 = inline_mysql_file_seek ("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_control_file.c", 0x286,iVar4,0,2,0x10); if (uVar8 == 0xffffffffffffffff) { local_458 = "Can\'t read size"; } else if (uVar8 < 0x2d) { local_488 = 1; local_458 = "Size of control file is smaller than expected"; } else if (uVar8 < 0x201) { lVar7 = inline_mysql_file_pread ("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_control_file.c" ,0x2a6,iVar4,local_218,uVar8,0,2); if (lVar7 == 0) { iVar4 = memcmp(local_218,&DAT_002519aa,3); if (iVar4 == 0) { printf("Aria file version: %u\n",(ulong)local_215); uVar5 = (uint)local_204; uVar6 = (uint)local_202; if (((0x1d < uVar5) && (0xe < uVar6)) && (uVar5 + uVar6 == uVar8)) { uVar3 = CONCAT12(auStack_214[(ulong)uVar5 + 2], CONCAT11(auStack_214[(ulong)uVar5 + 1],auStack_214[uVar5])); uVar1 = *(int4 *)(auStack_214 + (ulong)uVar5 + 3); uVar2 = *(uint *)((long)auStack_211 + (ulong)uVar5 + 4); my_uuid2str(auStack_214,local_448); local_424 = 0; printf("Block size: %u\n",(ulong)local_200); printf("maria_uuid: %s\n",local_448); printf("last_checkpoint_lsn: (%u,0x%x)\n",(ulong)uVar3, (ulong)CONCAT34(uVar3,uVar1) & 0xffffffff); printf("last_log_number: %lu\n",(ulong)uVar2); if (0x14 < uVar6) { uVar9 = uint6korr(auStack_209 + uVar5); printf("trid: %llu\n",uVar9); } if (0x15 < uVar6) { printf("recovery_failures: %u\n", (ulong)*(byte *)((long)&local_204 + (ulong)uVar5 + 1)); } local_449 = 0; goto LAB_0014f14a; } local_488 = 8; local_458 = "Sizes stored in control file are inconsistent"; } else { local_488 = 3; local_458 = "Missing valid id at start of file. File is not a valid aria control file"; } } else { local_458 = "Can\'t read file"; } } else { local_488 = 2; local_458 = "File size bigger than expected"; } } my_printf_error(0xae,"Got error \'%s\' when trying to use aria control file \'%s\'",0,local_458, local_418); local_449 = local_488; } LAB_0014f14a: if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_449); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
40,621
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>, __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>)
monkey531[P]llama/common/json.hpp
iterator erase(iterator first, iterator last) { if (first == last) { return first; } const auto elements_affected = std::distance(first, last); const auto offset = std::distance(Container::begin(), first); // This is the start situation. We need to delete elements_affected // elements (3 in this example: e, f, g), and need to return an // iterator past the last deleted element (h in this example). // Note that offset is the distance from the start of the vector // to first. We will need this later. // [ a, b, c, d, e, f, g, h, i, j ] // ^ ^ // first last // Since we cannot move const Keys, we re-construct them in place. // We start at first and re-construct (viz. copy) the elements from // the back of the vector. Example for first iteration: // ,--------. // v | destroy e and re-construct with h // [ a, b, c, d, e, f, g, h, i, j ] // ^ ^ // it it + elements_affected for (auto it = first; std::next(it, elements_affected) != Container::end(); ++it) { it->~value_type(); // destroy but keep allocation new (&*it) value_type{std::move(*std::next(it, elements_affected))}; // "move" next element to it } // [ a, b, c, d, h, i, j, h, i, j ] // ^ ^ // first last // remove the unneeded elements at the end of the vector Container::resize(this->size() - static_cast<size_type>(elements_affected)); // [ a, b, c, d, h, i, j ] // ^ ^ // first last // first is now pointing past the last deleted element, but we cannot // use this iterator, because it may have been invalidated by the // resize call. Instead, we can return begin() + offset. return Container::begin() + offset; }
O2
cpp
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>, __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx cmpq %rdx, %rsi je 0x6e161 movq %rdi, %r14 subq %rbx, %rdx pushq $0x60 popq %rcx movq %rdx, %rax cqto idivq %rcx movq %rax, %r15 movq (%rdi), %rax movq %rax, (%rsp) imulq $0x60, %r15, %r13 addq %rbx, %r13 movq %r13, %r12 negq %r12 movq %rbx, %rbp cmpq 0x8(%r14), %r13 je 0x6e13b movq %rbp, %rdi callq 0x680bc movq %rbp, %rdi movq %r13, %rsi callq 0x6e174 addq $0x60, %rbp addq $0x60, %r13 addq $-0x60, %r12 jmp 0x6e114 subq (%rsp), %rbx addq (%r14), %r12 negq %r12 movq %r12, %rax cqto pushq $0x60 popq %rcx idivq %rcx subq %r15, %rax movq %r14, %rdi movq %rax, %rsi callq 0x6e19e addq (%r14), %rbx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEESR_: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi cmp rsi, rdx jz short loc_6E161 mov r14, rdi sub rdx, rbx push 60h ; '`' pop rcx mov rax, rdx cqo idiv rcx mov r15, rax mov rax, [rdi] mov [rsp+38h+var_38], rax imul r13, r15, 60h ; '`' add r13, rbx mov r12, r13 neg r12 mov rbp, rbx loc_6E114: cmp r13, [r14+8] jz short loc_6E13B mov rdi, rbp call _ZNSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueEED2Ev; std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>::~pair() mov rdi, rbp mov rsi, r13 call _ZNSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueEEC2EOSI_; std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>::pair(std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>&&) add rbp, 60h ; '`' add r13, 60h ; '`' add r12, 0FFFFFFFFFFFFFFA0h jmp short loc_6E114 loc_6E13B: sub rbx, [rsp+38h+var_38] add r12, [r14] neg r12 mov rax, r12 cqo push 60h ; '`' pop rcx idiv rcx sub rax, r15 mov rdi, r14 mov rsi, rax call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE6resizeEm; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::resize(ulong) add rbx, [r14] loc_6E161: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::erase( long long *a1, long long a2, long long a3) { long long v3; // rbx long long v4; // r15 long long v5; // r13 long long v6; // r12 long long v7; // rbp long long v9; // [rsp+0h] [rbp-38h] v3 = a2; if ( a2 != a3 ) { v4 = (a3 - a2) / 96; v9 = *a1; v5 = a2 + 96 * v4; v6 = -v5; v7 = a2; while ( v5 != a1[1] ) { std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>::~pair(v7); std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>::pair( v7, v5); v7 += 96LL; v5 += 96LL; v6 -= 96LL; } std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::resize( a1, -(*a1 + v6) / 96 - v4, -(*a1 + v6) % 96); return *a1 + a2 - v9; } return v3; }
erase: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI CMP RSI,RDX JZ 0x0016e161 MOV R14,RDI SUB RDX,RBX PUSH 0x60 POP RCX MOV RAX,RDX CQO IDIV RCX MOV R15,RAX MOV RAX,qword ptr [RDI] MOV qword ptr [RSP],RAX IMUL R13,R15,0x60 ADD R13,RBX MOV R12,R13 NEG R12 MOV RBP,RBX LAB_0016e114: CMP R13,qword ptr [R14 + 0x8] JZ 0x0016e13b MOV RDI,RBP CALL 0x001680bc MOV RDI,RBP MOV RSI,R13 CALL 0x0016e174 ADD RBP,0x60 ADD R13,0x60 ADD R12,-0x60 JMP 0x0016e114 LAB_0016e13b: SUB RBX,qword ptr [RSP] ADD R12,qword ptr [R14] NEG R12 MOV RAX,R12 CQO PUSH 0x60 POP RCX IDIV RCX SUB RAX,R15 MOV RDI,R14 MOV RSI,RAX CALL 0x0016e19e ADD RBX,qword ptr [R14] LAB_0016e161: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value> > >::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value> > > >, __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value> > > >) */ pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> * __thiscall nlohmann::json_abi_v3_11_3:: ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::erase(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *this,pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> *param_2, pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> *param_3) { long lVar1; long lVar2; pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> *this_00; long lVar3; pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> *ppVar4; if (param_2 != param_3) { lVar2 = ((long)param_3 - (long)param_2) / 0x60; lVar1 = *(long *)this; ppVar4 = param_2 + lVar2 * 0x60; lVar3 = -(long)ppVar4; this_00 = param_2; for (; ppVar4 != *(pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> **)(this + 8); ppVar4 = ppVar4 + 0x60) { std:: pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> ::~pair(this_00); std:: pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> ::pair(this_00,ppVar4); this_00 = this_00 + 0x60; lVar3 = lVar3 + -0x60; } std:: vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::resize((vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *)this,-(lVar3 + *(long *)this) / 0x60 - lVar2); param_2 = param_2 + (*(long *)this - lVar1); } return param_2; }
40,622
ma_read
eloqsql/libmariadb/libmariadb/ma_io.c
size_t ma_read(void *ptr, size_t size, size_t nmemb, MA_FILE *file) { size_t s= 0; if (!file) return -1; switch (file->type) { case MA_FILE_LOCAL: s= fread(ptr, size, nmemb, (FILE *)file->ptr); return s; break; #ifdef HAVE_REMOTEIO case MA_FILE_REMOTE: return rio_plugin->methods->mread(ptr, size, nmemb, file); break; #endif default: return -1; } }
O3
c
ma_read: pushq %rbp movq %rsp, %rbp testq %rcx, %rcx je 0x26521 movl (%rcx), %eax cmpl $0x2, %eax je 0x2652a cmpl $0x1, %eax jne 0x26521 movq 0x8(%rcx), %rcx popq %rbp jmp 0x13690 movq $-0x1, %rax popq %rbp retq leaq 0x2306f(%rip), %rax # 0x495a0 movq (%rax), %rax movq 0x58(%rax), %rax movq 0x18(%rax), %rax popq %rbp jmpq *%rax
ma_read: push rbp mov rbp, rsp test rcx, rcx jz short loc_26521 mov eax, [rcx] cmp eax, 2 jz short loc_2652A cmp eax, 1 jnz short loc_26521 mov rcx, [rcx+8] pop rbp jmp _fread loc_26521: mov rax, 0FFFFFFFFFFFFFFFFh pop rbp retn loc_2652A: lea rax, rio_plugin mov rax, [rax] mov rax, [rax+58h] mov rax, [rax+18h] pop rbp jmp rax
long long ma_read(long long a1, long long a2, long long a3, long long a4) { if ( !a4 ) return -1LL; if ( *(_DWORD *)a4 != 2 ) { if ( *(_DWORD *)a4 == 1 ) return fread(a1, a2, a3, *(_QWORD *)(a4 + 8)); return -1LL; } return (*(long long (**)(void))(*(_QWORD *)(rio_plugin + 88LL) + 24LL))(); }
ma_read: PUSH RBP MOV RBP,RSP TEST RCX,RCX JZ 0x00126521 MOV EAX,dword ptr [RCX] CMP EAX,0x2 JZ 0x0012652a CMP EAX,0x1 JNZ 0x00126521 MOV RCX,qword ptr [RCX + 0x8] POP RBP JMP 0x00113690 LAB_00126521: MOV RAX,-0x1 POP RBP RET LAB_0012652a: LEA RAX,[0x1495a0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x58] MOV RAX,qword ptr [RAX + 0x18] POP RBP JMP RAX
size_t ma_read(void *param_1,size_t param_2,size_t param_3,int *param_4) { size_t sVar1; if (param_4 != (int *)0x0) { if (*param_4 == 2) { /* WARNING: Could not recover jumptable at 0x0012653d. Too many branches */ /* WARNING: Treating indirect jump as call */ sVar1 = (**(code **)(*(long *)(rio_plugin + 0x58) + 0x18))(); return sVar1; } if (*param_4 == 1) { sVar1 = fread(param_1,param_2,param_3,*(FILE **)(param_4 + 2)); return sVar1; } } return 0xffffffffffffffff; }
40,623
exp_mont_384
corpus-core[P]colibri-stateless/build_O2/_deps/blst-src/src/exp.c
static void exp_mont_384(vec384 out, const vec384 inp, const byte *pow, size_t pow_bits, const vec384 p, limb_t n0) { #if 1 vec384 ret; vec_copy(ret, inp, sizeof(ret)); /* ret = inp^1 */ --pow_bits; /* most significant bit is set, skip over */ while (pow_bits--) { sqr_mont_384(ret, ret, p, n0); if (is_bit_set(pow, pow_bits)) mul_mont_384(ret, ret, inp, p, n0); } vec_copy(out, ret, sizeof(ret)); /* out = ret */ #else unsigned int i; vec384 sqr; vec_copy(sqr, inp, sizeof(sqr)); for (i = 0; !is_bit_set(pow, i++);) sqr_mont_384(sqr, sqr, sqr, p, n0); vec_copy(out, sqr, sizeof(sqr)); for (; i < pow_bits; i++) { sqr_mont_384(sqr, sqr, sqr, p, n0); if (is_bit_set(pow, i)) mul_mont_384(out, out, sqr, p, n0); } #endif }
O2
c
exp_mont_384: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rcx, %r14 movq %rdx, -0x40(%rbp) movq %rdi, -0x30(%rbp) movabsq $-0x760c000300030003, %r12 # imm = 0x89F3FFFCFFFCFFFD leaq -0x70(%rbp), %rbx pushq $0x30 popq %rdx movq %rbx, %rdi movq %rsi, -0x38(%rbp) callq 0x51055 leaq 0x24235(%rip), %r15 # 0x7fcb0 cmpq $0x1, %r14 je 0x5bad4 leaq -0x2(%r14), %r13 movq %rbx, %rdi movq %rbx, %rsi movq %r15, %rdx movq %r12, %rcx callq 0x689a0 shrq $0x3, %r13 movq -0x40(%rbp), %rax movzbl (%rax,%r13), %eax leal -0x2(%r14), %ecx movzbl %cl, %ecx andl $0x7, %ecx xorl %edx, %edx btl %ecx, %eax setb %dl testq %rdx, %rdx je 0x5bacf movq %rbx, %rdi movq %rbx, %rsi movq -0x38(%rbp), %rdx movq %r15, %rcx movq %r12, %r8 callq 0x69120 decq %r14 jmp 0x5ba7b leaq -0x70(%rbp), %rsi pushq $0x30 popq %rdx movq -0x30(%rbp), %rdi callq 0x51055 addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
exp_mont_384: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r14, rcx mov [rbp+var_40], rdx mov [rbp+var_30], rdi mov r12, 89F3FFFCFFFCFFFDh lea rbx, [rbp+var_70] push 30h ; '0' pop rdx mov rdi, rbx mov [rbp+var_38], rsi call vec_copy lea r15, BLS12_381_P loc_5BA7B: cmp r14, 1 jz short loc_5BAD4 lea r13, [r14-2] mov rdi, rbx mov rsi, rbx mov rdx, r15 mov rcx, r12 call sqr_mont_384 shr r13, 3 mov rax, [rbp+var_40] movzx eax, byte ptr [rax+r13] lea ecx, [r14-2] movzx ecx, cl and ecx, 7 xor edx, edx bt eax, ecx setb dl test rdx, rdx jz short loc_5BACF mov rdi, rbx mov rsi, rbx mov rdx, [rbp+var_38] mov rcx, r15 mov r8, r12 call mul_mont_384 loc_5BACF: dec r14 jmp short loc_5BA7B loc_5BAD4: lea rsi, [rbp+var_70] push 30h ; '0' pop rdx mov rdi, [rbp+var_30] call vec_copy add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long exp_mont_384(long long a1, long long a2, long long a3, long long a4) { int v5; // eax _BYTE v7[48]; // [rsp+0h] [rbp-70h] BYREF long long v8; // [rsp+30h] [rbp-40h] long long v9; // [rsp+38h] [rbp-38h] long long v10; // [rsp+40h] [rbp-30h] v8 = a3; v10 = a1; v9 = a2; vec_copy((long long)v7, a2, 0x30uLL); while ( a4 != 1 ) { sqr_mont_384(v7, v7, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); v5 = *(unsigned __int8 *)(v8 + ((unsigned long long)(a4 - 2) >> 3)); if ( _bittest(&v5, ((_BYTE)a4 - 2) & 7) ) mul_mont_384(v7, v7, v9, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); --a4; } return vec_copy(v10, (long long)v7, 0x30uLL); }
exp_mont_384: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R14,RCX MOV qword ptr [RBP + -0x40],RDX MOV qword ptr [RBP + -0x30],RDI MOV R12,-0x760c000300030003 LEA RBX,[RBP + -0x70] PUSH 0x30 POP RDX MOV RDI,RBX MOV qword ptr [RBP + -0x38],RSI CALL 0x00151055 LEA R15,[0x17fcb0] LAB_0015ba7b: CMP R14,0x1 JZ 0x0015bad4 LEA R13,[R14 + -0x2] MOV RDI,RBX MOV RSI,RBX MOV RDX,R15 MOV RCX,R12 CALL 0x001689a0 SHR R13,0x3 MOV RAX,qword ptr [RBP + -0x40] MOVZX EAX,byte ptr [RAX + R13*0x1] LEA ECX,[R14 + -0x2] MOVZX ECX,CL AND ECX,0x7 XOR EDX,EDX BT EAX,ECX SETC DL TEST RDX,RDX JZ 0x0015bacf MOV RDI,RBX MOV RSI,RBX MOV RDX,qword ptr [RBP + -0x38] MOV RCX,R15 MOV R8,R12 CALL 0x00169120 LAB_0015bacf: DEC R14 JMP 0x0015ba7b LAB_0015bad4: LEA RSI,[RBP + -0x70] PUSH 0x30 POP RDX MOV RDI,qword ptr [RBP + -0x30] CALL 0x00151055 ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void exp_mont_384(int8 param_1,int8 param_2,long param_3,long param_4) { int1 local_78 [48]; long local_48; int8 local_40; int8 local_38; local_48 = param_3; local_40 = param_2; local_38 = param_1; vec_copy(local_78,param_2,0x30); for (; param_4 != 1; param_4 = param_4 + -1) { sqr_mont_384(local_78,local_78,BLS12_381_P,0x89f3fffcfffcfffd); if ((*(byte *)(local_48 + (param_4 - 2U >> 3)) >> ((int)param_4 - 2U & 7) & 1) != 0) { mul_mont_384(local_78,local_78,local_40,BLS12_381_P,0x89f3fffcfffcfffd); } } vec_copy(local_38,local_78,0x30); return; }
40,624
my_lock
eloqsql/mysys/my_lock.c
int my_lock(File fd, int locktype, my_off_t start, my_off_t length, myf MyFlags) { #ifdef HAVE_FCNTL int value; ALARM_VARIABLES; #endif DBUG_ENTER("my_lock"); DBUG_PRINT("my",("fd: %d Op: %d start: %ld Length: %ld MyFlags: %lu", fd,locktype,(long) start,(long) length,MyFlags)); if (my_disable_locking && ! (MyFlags & MY_FORCE_LOCK)) DBUG_RETURN(0); #if defined(_WIN32) { int timeout_sec; if (MyFlags & MY_NO_WAIT) timeout_sec= 0; else timeout_sec= WIN_LOCK_INFINITE; if (win_lock(fd, locktype, start, length, timeout_sec) == 0) DBUG_RETURN(0); } #else #if defined(HAVE_FCNTL) { struct flock lock; lock.l_type= (short) locktype; lock.l_whence= SEEK_SET; lock.l_start= (off_t) start; lock.l_len= (off_t) length; if (MyFlags & (MY_NO_WAIT | MY_SHORT_WAIT)) { if (fcntl(fd,F_SETLK,&lock) != -1) /* Check if we can lock */ DBUG_RETURN(0); /* Ok, file locked */ if (MyFlags & MY_NO_WAIT) { my_errno= (errno == EACCES) ? EAGAIN : errno ? errno : -1; DBUG_RETURN(-1); } DBUG_PRINT("info",("Was locked, trying with alarm")); ALARM_INIT; while ((value=fcntl(fd,F_SETLKW,&lock)) && ! ALARM_TEST && errno == EINTR) { /* Setup again so we don`t miss it */ ALARM_REINIT; } ALARM_END; if (value != -1) DBUG_RETURN(0); if (errno == EINTR) errno=EAGAIN; } else if (fcntl(fd,F_SETLKW,&lock) != -1) /* Wait until a lock */ DBUG_RETURN(0); } #else if (MyFlags & MY_SEEK_NOT_DONE) { if (my_seek(fd,start,MY_SEEK_SET,MYF(MyFlags & ~MY_SEEK_NOT_DONE)) == MY_FILEPOS_ERROR) { /* If an error has occurred in my_seek then we will already have an error code in my_errno; Just return error code. */ DBUG_RETURN(-1); } } if (lockf(fd,locktype,length) != -1) DBUG_RETURN(0); #endif /* HAVE_FCNTL */ #endif /* _WIN32 */ /* We got an error. We don't want EACCES errors */ my_errno=(errno == EACCES) ? EAGAIN : errno ? errno : -1; if (MyFlags & MY_WME) { if (locktype == F_UNLCK) my_error(EE_CANTUNLOCK,MYF(ME_BELL),my_errno); else my_error(EE_CANTLOCK,MYF(ME_BELL),my_errno); } DBUG_PRINT("error",("my_errno: %d (%d)",my_errno,errno)); DBUG_RETURN(-1); }
O0
c
my_lock: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movl %edi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movl $0x0, -0x30(%rbp) movq $0x0, -0x38(%rbp) jmp 0xf36ee leaq 0xb8fcd3(%rip), %rax # 0xc833c8 movsbl (%rax), %eax cmpl $0x0, %eax je 0xf371b movq -0x28(%rbp), %rax andq $0x80, %rax cmpq $0x0, %rax jne 0xf371b jmp 0xf370f movl $0x0, -0x4(%rbp) jmp 0xf3986 movl -0xc(%rbp), %eax movw %ax, -0x58(%rbp) movw $0x0, -0x56(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rax andq $0x140, %rax # imm = 0x140 cmpq $0x0, %rax je 0xf38bf movl -0x8(%rbp), %edi movl $0x6, %esi leaq -0x58(%rbp), %rdx movb $0x0, %al callq 0x2a140 cmpl $-0x1, %eax je 0xf3772 jmp 0xf3766 movl $0x0, -0x4(%rbp) jmp 0xf3986 movq -0x28(%rbp), %rax andq $0x100, %rax # imm = 0x100 cmpq $0x0, %rax je 0xf37d8 callq 0x2a750 cmpl $0xd, (%rax) jne 0xf3796 movl $0xb, %eax movl %eax, -0x5c(%rbp) jmp 0xf37bc callq 0x2a750 cmpl $0x0, (%rax) je 0xf37ac callq 0x2a750 movl (%rax), %eax movl %eax, -0x60(%rbp) jmp 0xf37b6 movl $0xffffffff, %eax # imm = 0xFFFFFFFF movl %eax, -0x60(%rbp) jmp 0xf37b6 movl -0x60(%rbp), %eax movl %eax, -0x5c(%rbp) movl -0x5c(%rbp), %eax movl %eax, -0x64(%rbp) callq 0xf6250 movl -0x64(%rbp), %ecx movl %ecx, (%rax) movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xf3986 jmp 0xf37da jmp 0xf37dc leaq 0xb8fbd5(%rip), %rax # 0xc833b8 movl $0x0, (%rax) leaq 0x1cc578(%rip), %rax # 0x2bfd68 movq (%rax), %rax movl %eax, %edi callq 0x2a240 movl %eax, -0x30(%rbp) movl $0xe, %edi leaq 0xebe7(%rip), %rsi # 0x1023f0 callq 0x2a2f0 movq %rax, -0x38(%rbp) movl -0x8(%rbp), %edi movl $0x7, %esi leaq -0x58(%rbp), %rdx movb $0x0, %al callq 0x2a140 movl %eax, %ecx movl %ecx, -0x2c(%rbp) xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x65(%rbp) je 0xf3855 leaq 0xb8fb7d(%rip), %rax # 0xc833b8 movl (%rax), %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x65(%rbp) jne 0xf3855 callq 0x2a750 cmpl $0x4, (%rax) sete %al movb %al, -0x65(%rbp) movb -0x65(%rbp), %al testb $0x1, %al jne 0xf385e jmp 0xf387e leaq 0x1cc503(%rip), %rax # 0x2bfd68 movq (%rax), %rax movl %eax, %edi callq 0x2a240 leaq 0xb8fb42(%rip), %rax # 0xc833b8 movl $0x0, (%rax) jmp 0xf3812 movq -0x38(%rbp), %rsi movl $0xe, %edi callq 0x2a2f0 movl -0x30(%rbp), %edi callq 0x2a240 cmpl $-0x1, -0x2c(%rbp) je 0xf38a8 jmp 0xf389c movl $0x0, -0x4(%rbp) jmp 0xf3986 callq 0x2a750 cmpl $0x4, (%rax) jne 0xf38bd callq 0x2a750 movl $0xb, (%rax) jmp 0xf38e7 movl -0x8(%rbp), %edi movl $0x7, %esi leaq -0x58(%rbp), %rdx movb $0x0, %al callq 0x2a140 cmpl $-0x1, %eax je 0xf38e5 jmp 0xf38d9 movl $0x0, -0x4(%rbp) jmp 0xf3986 jmp 0xf38e7 callq 0x2a750 cmpl $0xd, (%rax) jne 0xf38fb movl $0xb, %eax movl %eax, -0x6c(%rbp) jmp 0xf3921 callq 0x2a750 cmpl $0x0, (%rax) je 0xf3911 callq 0x2a750 movl (%rax), %eax movl %eax, -0x70(%rbp) jmp 0xf391b movl $0xffffffff, %eax # imm = 0xFFFFFFFF movl %eax, -0x70(%rbp) jmp 0xf391b movl -0x70(%rbp), %eax movl %eax, -0x6c(%rbp) movl -0x6c(%rbp), %eax movl %eax, -0x74(%rbp) callq 0xf6250 movl -0x74(%rbp), %ecx movl %ecx, (%rax) movq -0x28(%rbp), %rax andq $0x10, %rax cmpq $0x0, %rax je 0xf3979 cmpl $0x2, -0xc(%rbp) jne 0xf395f callq 0xf6250 movl (%rax), %edx movl $0xb, %edi movl $0x4, %esi movb $0x0, %al callq 0xefa80 jmp 0xf3977 callq 0xf6250 movl (%rax), %edx movl $0xa, %edi movl $0x4, %esi movb $0x0, %al callq 0xefa80 jmp 0xf3979 jmp 0xf397b jmp 0xf397d jmp 0xf397f movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF movl -0x4(%rbp), %eax addq $0x80, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
my_lock: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_8], edi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], 0 mov [rbp+var_38], 0 jmp short $+2 loc_F36EE: lea rax, my_disable_locking movsx eax, byte ptr [rax] cmp eax, 0 jz short loc_F371B mov rax, [rbp+var_28] and rax, 80h cmp rax, 0 jnz short loc_F371B jmp short $+2 loc_F370F: mov [rbp+var_4], 0 jmp loc_F3986 loc_F371B: mov eax, [rbp+var_C] mov [rbp+var_58], ax mov [rbp+var_56], 0 mov rax, [rbp+var_18] mov [rbp+var_50], rax mov rax, [rbp+var_20] mov [rbp+var_48], rax mov rax, [rbp+var_28] and rax, 140h cmp rax, 0 jz loc_F38BF mov edi, [rbp+var_8] mov esi, 6 lea rdx, [rbp+var_58] mov al, 0 call _fcntl64 cmp eax, 0FFFFFFFFh jz short loc_F3772 jmp short $+2 loc_F3766: mov [rbp+var_4], 0 jmp loc_F3986 loc_F3772: mov rax, [rbp+var_28] and rax, 100h cmp rax, 0 jz short loc_F37D8 call ___errno_location cmp dword ptr [rax], 0Dh jnz short loc_F3796 mov eax, 0Bh mov [rbp+var_5C], eax jmp short loc_F37BC loc_F3796: call ___errno_location cmp dword ptr [rax], 0 jz short loc_F37AC call ___errno_location mov eax, [rax] mov [rbp+var_60], eax jmp short loc_F37B6 loc_F37AC: mov eax, 0FFFFFFFFh mov [rbp+var_60], eax jmp short $+2 loc_F37B6: mov eax, [rbp+var_60] mov [rbp+var_5C], eax loc_F37BC: mov eax, [rbp+var_5C] mov [rbp+var_64], eax call _my_thread_var mov ecx, [rbp+var_64] mov [rax], ecx mov [rbp+var_4], 0FFFFFFFFh jmp loc_F3986 loc_F37D8: jmp short $+2 loc_F37DA: jmp short $+2 loc_F37DC: lea rax, my_have_got_alarm mov dword ptr [rax], 0 lea rax, my_time_to_wait_for_lock mov rax, [rax] mov edi, eax call _alarm mov [rbp+var_30], eax mov edi, 0Eh lea rsi, my_set_alarm_variable call _signal mov [rbp+var_38], rax loc_F3812: mov edi, [rbp+var_8] mov esi, 7 lea rdx, [rbp+var_58] mov al, 0 call _fcntl64 mov ecx, eax mov [rbp+var_2C], ecx xor eax, eax cmp ecx, 0 mov [rbp+var_65], al jz short loc_F3855 lea rax, my_have_got_alarm mov ecx, [rax] xor eax, eax cmp ecx, 0 mov [rbp+var_65], al jnz short loc_F3855 call ___errno_location cmp dword ptr [rax], 4 setz al mov [rbp+var_65], al loc_F3855: mov al, [rbp+var_65] test al, 1 jnz short loc_F385E jmp short loc_F387E loc_F385E: lea rax, my_time_to_wait_for_lock mov rax, [rax] mov edi, eax call _alarm lea rax, my_have_got_alarm mov dword ptr [rax], 0 jmp short loc_F3812 loc_F387E: mov rsi, [rbp+var_38] mov edi, 0Eh call _signal mov edi, [rbp+var_30] call _alarm cmp [rbp+var_2C], 0FFFFFFFFh jz short loc_F38A8 jmp short $+2 loc_F389C: mov [rbp+var_4], 0 jmp loc_F3986 loc_F38A8: call ___errno_location cmp dword ptr [rax], 4 jnz short loc_F38BD call ___errno_location mov dword ptr [rax], 0Bh loc_F38BD: jmp short loc_F38E7 loc_F38BF: mov edi, [rbp+var_8] mov esi, 7 lea rdx, [rbp+var_58] mov al, 0 call _fcntl64 cmp eax, 0FFFFFFFFh jz short loc_F38E5 jmp short $+2 loc_F38D9: mov [rbp+var_4], 0 jmp loc_F3986 loc_F38E5: jmp short $+2 loc_F38E7: call ___errno_location cmp dword ptr [rax], 0Dh jnz short loc_F38FB mov eax, 0Bh mov [rbp+var_6C], eax jmp short loc_F3921 loc_F38FB: call ___errno_location cmp dword ptr [rax], 0 jz short loc_F3911 call ___errno_location mov eax, [rax] mov [rbp+var_70], eax jmp short loc_F391B loc_F3911: mov eax, 0FFFFFFFFh mov [rbp+var_70], eax jmp short $+2 loc_F391B: mov eax, [rbp+var_70] mov [rbp+var_6C], eax loc_F3921: mov eax, [rbp+var_6C] mov [rbp+var_74], eax call _my_thread_var mov ecx, [rbp+var_74] mov [rax], ecx mov rax, [rbp+var_28] and rax, 10h cmp rax, 0 jz short loc_F3979 cmp [rbp+var_C], 2 jnz short loc_F395F call _my_thread_var mov edx, [rax] mov edi, 0Bh mov esi, 4 mov al, 0 call my_error jmp short loc_F3977 loc_F395F: call _my_thread_var mov edx, [rax] mov edi, 0Ah mov esi, 4 mov al, 0 call my_error loc_F3977: jmp short $+2 loc_F3979: jmp short $+2 loc_F397B: jmp short $+2 loc_F397D: jmp short $+2 loc_F397F: mov [rbp+var_4], 0FFFFFFFFh loc_F3986: mov eax, [rbp+var_4] add rsp, 80h pop rbp retn
long long my_lock(unsigned int a1, int a2, long long a3, long long a4, long long a5) { long long v5; // rdi const char *v6; // rsi long long v7; // rdi unsigned int *v8; // rax unsigned int *v9; // rax int v11; // [rsp+10h] [rbp-70h] int v12; // [rsp+14h] [rbp-6Ch] bool v13; // [rsp+1Bh] [rbp-65h] int v14; // [rsp+20h] [rbp-60h] int v15; // [rsp+24h] [rbp-5Ch] _WORD v16[4]; // [rsp+28h] [rbp-58h] BYREF long long v17; // [rsp+30h] [rbp-50h] long long v18; // [rsp+38h] [rbp-48h] long long v19; // [rsp+48h] [rbp-38h] unsigned int v20; // [rsp+50h] [rbp-30h] int v21; // [rsp+54h] [rbp-2Ch] long long v22; // [rsp+58h] [rbp-28h] long long v23; // [rsp+60h] [rbp-20h] long long v24; // [rsp+68h] [rbp-18h] int v25; // [rsp+74h] [rbp-Ch] unsigned int v26; // [rsp+78h] [rbp-8h] v26 = a1; v25 = a2; v24 = a3; v23 = a4; v22 = a5; v20 = 0; v19 = 0LL; if ( my_disable_locking && (v22 & 0x80) == 0 ) return 0; v16[0] = v25; v16[1] = 0; v17 = v24; v18 = v23; if ( (v22 & 0x140) != 0 ) { v5 = v26; if ( (unsigned int)fcntl64(v26, 6LL, v16) != -1 ) return 0; if ( (v22 & 0x100) != 0 ) { if ( *(_DWORD *)__errno_location() == 13 ) { v15 = 11; } else { if ( *(_DWORD *)__errno_location() ) v14 = *(_DWORD *)__errno_location(); else v14 = -1; v15 = v14; } *(_DWORD *)my_thread_var(v5, &byte_6) = v15; return (unsigned int)-1; } my_have_got_alarm = 0; v20 = alarm((unsigned int)my_time_to_wait_for_lock); v19 = signal(14LL, my_set_alarm_variable); while ( 1 ) { v21 = fcntl64(v26, 7LL, v16); v13 = 0; if ( v21 ) { v13 = 0; if ( !my_have_got_alarm ) v13 = *(_DWORD *)__errno_location() == 4; } if ( !v13 ) break; alarm((unsigned int)my_time_to_wait_for_lock); my_have_got_alarm = 0; } v6 = (const char *)v19; signal(14LL, v19); v7 = v20; alarm(v20); if ( v21 != -1 ) return 0; if ( *(_DWORD *)__errno_location() == 4 ) *(_DWORD *)__errno_location() = 11; } else { v7 = v26; v6 = &byte_7; if ( (unsigned int)fcntl64(v26, 7LL, v16) != -1 ) return 0; } if ( *(_DWORD *)__errno_location() == 13 ) { v12 = 11; } else { if ( *(_DWORD *)__errno_location() ) v11 = *(_DWORD *)__errno_location(); else v11 = -1; v12 = v11; } *(_DWORD *)my_thread_var(v7, v6) = v12; if ( (v22 & 0x10) != 0 ) { if ( v25 == 2 ) { v8 = (unsigned int *)my_thread_var(v7, v6); my_error(0xBu, 4LL, *v8); } else { v9 = (unsigned int *)my_thread_var(v7, v6); my_error(0xAu, 4LL, *v9); } } return (unsigned int)-1; }
my_lock: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV dword ptr [RBP + -0x8],EDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV dword ptr [RBP + -0x30],0x0 MOV qword ptr [RBP + -0x38],0x0 JMP 0x001f36ee LAB_001f36ee: LEA RAX,[0xd833c8] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JZ 0x001f371b MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x80 CMP RAX,0x0 JNZ 0x001f371b JMP 0x001f370f LAB_001f370f: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001f3986 LAB_001f371b: MOV EAX,dword ptr [RBP + -0xc] MOV word ptr [RBP + -0x58],AX MOV word ptr [RBP + -0x56],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x140 CMP RAX,0x0 JZ 0x001f38bf MOV EDI,dword ptr [RBP + -0x8] MOV ESI,0x6 LEA RDX,[RBP + -0x58] MOV AL,0x0 CALL 0x0012a140 CMP EAX,-0x1 JZ 0x001f3772 JMP 0x001f3766 LAB_001f3766: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001f3986 LAB_001f3772: MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x100 CMP RAX,0x0 JZ 0x001f37d8 CALL 0x0012a750 CMP dword ptr [RAX],0xd JNZ 0x001f3796 MOV EAX,0xb MOV dword ptr [RBP + -0x5c],EAX JMP 0x001f37bc LAB_001f3796: CALL 0x0012a750 CMP dword ptr [RAX],0x0 JZ 0x001f37ac CALL 0x0012a750 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x60],EAX JMP 0x001f37b6 LAB_001f37ac: MOV EAX,0xffffffff MOV dword ptr [RBP + -0x60],EAX JMP 0x001f37b6 LAB_001f37b6: MOV EAX,dword ptr [RBP + -0x60] MOV dword ptr [RBP + -0x5c],EAX LAB_001f37bc: MOV EAX,dword ptr [RBP + -0x5c] MOV dword ptr [RBP + -0x64],EAX CALL 0x001f6250 MOV ECX,dword ptr [RBP + -0x64] MOV dword ptr [RAX],ECX MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001f3986 LAB_001f37d8: JMP 0x001f37da LAB_001f37da: JMP 0x001f37dc LAB_001f37dc: LEA RAX,[0xd833b8] MOV dword ptr [RAX],0x0 LEA RAX,[0x3bfd68] MOV RAX,qword ptr [RAX] MOV EDI,EAX CALL 0x0012a240 MOV dword ptr [RBP + -0x30],EAX MOV EDI,0xe LEA RSI,[0x2023f0] CALL 0x0012a2f0 MOV qword ptr [RBP + -0x38],RAX LAB_001f3812: MOV EDI,dword ptr [RBP + -0x8] MOV ESI,0x7 LEA RDX,[RBP + -0x58] MOV AL,0x0 CALL 0x0012a140 MOV ECX,EAX MOV dword ptr [RBP + -0x2c],ECX XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x65],AL JZ 0x001f3855 LEA RAX,[0xd833b8] MOV ECX,dword ptr [RAX] XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x65],AL JNZ 0x001f3855 CALL 0x0012a750 CMP dword ptr [RAX],0x4 SETZ AL MOV byte ptr [RBP + -0x65],AL LAB_001f3855: MOV AL,byte ptr [RBP + -0x65] TEST AL,0x1 JNZ 0x001f385e JMP 0x001f387e LAB_001f385e: LEA RAX,[0x3bfd68] MOV RAX,qword ptr [RAX] MOV EDI,EAX CALL 0x0012a240 LEA RAX,[0xd833b8] MOV dword ptr [RAX],0x0 JMP 0x001f3812 LAB_001f387e: MOV RSI,qword ptr [RBP + -0x38] MOV EDI,0xe CALL 0x0012a2f0 MOV EDI,dword ptr [RBP + -0x30] CALL 0x0012a240 CMP dword ptr [RBP + -0x2c],-0x1 JZ 0x001f38a8 JMP 0x001f389c LAB_001f389c: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001f3986 LAB_001f38a8: CALL 0x0012a750 CMP dword ptr [RAX],0x4 JNZ 0x001f38bd CALL 0x0012a750 MOV dword ptr [RAX],0xb LAB_001f38bd: JMP 0x001f38e7 LAB_001f38bf: MOV EDI,dword ptr [RBP + -0x8] MOV ESI,0x7 LEA RDX,[RBP + -0x58] MOV AL,0x0 CALL 0x0012a140 CMP EAX,-0x1 JZ 0x001f38e5 JMP 0x001f38d9 LAB_001f38d9: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001f3986 LAB_001f38e5: JMP 0x001f38e7 LAB_001f38e7: CALL 0x0012a750 CMP dword ptr [RAX],0xd JNZ 0x001f38fb MOV EAX,0xb MOV dword ptr [RBP + -0x6c],EAX JMP 0x001f3921 LAB_001f38fb: CALL 0x0012a750 CMP dword ptr [RAX],0x0 JZ 0x001f3911 CALL 0x0012a750 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x70],EAX JMP 0x001f391b LAB_001f3911: MOV EAX,0xffffffff MOV dword ptr [RBP + -0x70],EAX JMP 0x001f391b LAB_001f391b: MOV EAX,dword ptr [RBP + -0x70] MOV dword ptr [RBP + -0x6c],EAX LAB_001f3921: MOV EAX,dword ptr [RBP + -0x6c] MOV dword ptr [RBP + -0x74],EAX CALL 0x001f6250 MOV ECX,dword ptr [RBP + -0x74] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x10 CMP RAX,0x0 JZ 0x001f3979 CMP dword ptr [RBP + -0xc],0x2 JNZ 0x001f395f CALL 0x001f6250 MOV EDX,dword ptr [RAX] MOV EDI,0xb MOV ESI,0x4 MOV AL,0x0 CALL 0x001efa80 JMP 0x001f3977 LAB_001f395f: CALL 0x001f6250 MOV EDX,dword ptr [RAX] MOV EDI,0xa MOV ESI,0x4 MOV AL,0x0 CALL 0x001efa80 LAB_001f3977: JMP 0x001f3979 LAB_001f3979: JMP 0x001f397b LAB_001f397b: JMP 0x001f397d LAB_001f397d: JMP 0x001f397f LAB_001f397f: MOV dword ptr [RBP + -0x4],0xffffffff LAB_001f3986: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x80 POP RBP RET
int4 my_lock(int4 param_1,int param_2,int8 param_3,int8 param_4,ulong param_5) { int iVar1; int *piVar2; int4 *puVar3; bool bVar4; int local_78; int local_74; int local_68; int local_64; int2 local_60; int2 local_5e; int8 local_58; int8 local_50; __sighandler_t local_40; uint local_38; int local_34; ulong local_30; int8 local_28; int8 local_20; int local_14; int4 local_10; local_38 = 0; local_40 = (__sighandler_t)0x0; if ((my_disable_locking != '\0') && ((param_5 & 0x80) == 0)) { return 0; } local_60 = (int2)param_2; local_5e = 0; local_58 = param_3; local_50 = param_4; local_30 = param_5; local_28 = param_4; local_20 = param_3; local_14 = param_2; local_10 = param_1; if ((param_5 & 0x140) == 0) { iVar1 = fcntl64(param_1,7,&local_60); if (iVar1 != -1) { return 0; } } else { iVar1 = fcntl64(param_1,6,&local_60); if (iVar1 != -1) { return 0; } if ((local_30 & 0x100) != 0) { piVar2 = __errno_location(); if (*piVar2 == 0xd) { local_64 = 0xb; } else { piVar2 = __errno_location(); if (*piVar2 == 0) { local_68 = -1; } else { piVar2 = __errno_location(); local_68 = *piVar2; } local_64 = local_68; } piVar2 = (int *)_my_thread_var(); *piVar2 = local_64; return 0xffffffff; } my_have_got_alarm = 0; local_38 = alarm((uint)my_time_to_wait_for_lock); local_40 = signal(0xe,my_set_alarm_variable); while( true ) { local_34 = fcntl64(local_10,7,&local_60); bVar4 = false; if ((local_34 != 0) && (bVar4 = false, my_have_got_alarm == 0)) { piVar2 = __errno_location(); bVar4 = *piVar2 == 4; } if (!bVar4) break; alarm((uint)my_time_to_wait_for_lock); my_have_got_alarm = 0; } signal(0xe,local_40); alarm(local_38); if (local_34 != -1) { return 0; } piVar2 = __errno_location(); if (*piVar2 == 4) { piVar2 = __errno_location(); *piVar2 = 0xb; } } piVar2 = __errno_location(); if (*piVar2 == 0xd) { local_74 = 0xb; } else { piVar2 = __errno_location(); if (*piVar2 == 0) { local_78 = -1; } else { piVar2 = __errno_location(); local_78 = *piVar2; } local_74 = local_78; } piVar2 = (int *)_my_thread_var(); *piVar2 = local_74; if ((local_30 & 0x10) != 0) { if (local_14 == 2) { puVar3 = (int4 *)_my_thread_var(); my_error(0xb,4,*puVar3); } else { puVar3 = (int4 *)_my_thread_var(); my_error(10,4,*puVar3); } } return 0xffffffff; }
40,625
safe_hash_init
eloqsql/mysys/my_safehash.c
my_bool safe_hash_init(SAFE_HASH *hash, uint elements, uchar *default_value) { DBUG_ENTER("safe_hash_init"); if (my_hash_init(key_memory_SAFE_HASH_ENTRY, &hash->hash, &my_charset_bin, elements, 0, 0, (my_hash_get_key) safe_hash_entry_get, (void (*)(void*)) safe_hash_entry_free, 0)) { hash->default_value= 0; DBUG_RETURN(1); } mysql_rwlock_init(key_SAFEHASH_mutex, &hash->mutex); hash->default_value= default_value; hash->root= 0; DBUG_RETURN(0); }
O3
c
safe_hash_init: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdx, %r14 movq %rdi, %rbx leaq 0x353e3d(%rip), %rax # 0x3b6b94 movl (%rax), %edi leaq 0x98(%rbx), %rax movl %esi, %r8d subq $0x8, %rsp leaq 0x8d(%rip), %r10 # 0x62dfb xorl %r15d, %r15d leaq 0x74(%rip), %r11 # 0x62dec leaq 0x2d6bc1(%rip), %rcx # 0x339940 movq %rax, %rsi xorl %edx, %edx xorl %r9d, %r9d pushq $0x0 pushq %r10 pushq %r15 pushq %r11 pushq %r15 callq 0x4f7cd addq $0x30, %rsp movl %eax, %ecx movb $0x1, %al testb %cl, %cl jne 0x62dda leaq 0x35348f(%rip), %rax # 0x3b6238 movl (%rax), %edi leaq 0x2d3b16(%rip), %rax # 0x3368c8 movq (%rax), %rax movq %rbx, %rsi callq *0x50(%rax) movq %rax, 0x90(%rbx) movq %rbx, %rdi callq 0x6156c movq $0x0, 0x110(%rbx) xorl %eax, %eax movq %r14, %r15 movq %r15, 0x108(%rbx) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
safe_hash_init: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, rdx mov rbx, rdi lea rax, key_memory_SAFE_HASH_ENTRY mov edi, [rax] lea rax, [rbx+98h] mov r8d, esi sub rsp, 8 lea r10, safe_hash_entry_free xor r15d, r15d lea r11, safe_hash_entry_get lea rcx, my_charset_bin mov rsi, rax xor edx, edx xor r9d, r9d push 0 push r10 push r15 push r11 push r15 call my_hash_init2 add rsp, 30h mov ecx, eax mov al, 1 test cl, cl jnz short loc_62DDA lea rax, key_SAFEHASH_mutex mov edi, [rax] lea rax, PSI_server mov rax, [rax] mov rsi, rbx call qword ptr [rax+50h] mov [rbx+90h], rax mov rdi, rbx call my_rw_init mov qword ptr [rbx+110h], 0 xor eax, eax mov r15, r14 loc_62DDA: mov [rbx+108h], r15 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
char safe_hash_init(_QWORD *a1, unsigned int a2, long long a3) { long long v4; // r15 char v5; // cl char result; // al v4 = 0LL; v5 = my_hash_init2( key_memory_SAFE_HASH_ENTRY, (long long)(a1 + 19), 0, (long long)&my_charset_bin, a2, 0LL, 0LL, (long long)safe_hash_entry_get, 0LL, (long long)safe_hash_entry_free, 0); result = 1; if ( !v5 ) { a1[18] = (*((long long ( **)(_QWORD, _QWORD *))PSI_server + 10))(key_SAFEHASH_mutex, a1); my_rw_init((long long)a1); a1[34] = 0LL; result = 0; v4 = a3; } a1[33] = v4; return result; }
safe_hash_init: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RDX MOV RBX,RDI LEA RAX,[0x4b6b94] MOV EDI,dword ptr [RAX] LEA RAX,[RBX + 0x98] MOV R8D,ESI SUB RSP,0x8 LEA R10,[0x162dfb] XOR R15D,R15D LEA R11,[0x162dec] LEA RCX,[0x439940] MOV RSI,RAX XOR EDX,EDX XOR R9D,R9D PUSH 0x0 PUSH R10 PUSH R15 PUSH R11 PUSH R15 CALL 0x0014f7cd ADD RSP,0x30 MOV ECX,EAX MOV AL,0x1 TEST CL,CL JNZ 0x00162dda LEA RAX,[0x4b6238] MOV EDI,dword ptr [RAX] LEA RAX,[0x4368c8] MOV RAX,qword ptr [RAX] MOV RSI,RBX CALL qword ptr [RAX + 0x50] MOV qword ptr [RBX + 0x90],RAX MOV RDI,RBX CALL 0x0016156c MOV qword ptr [RBX + 0x110],0x0 XOR EAX,EAX MOV R15,R14 LAB_00162dda: MOV qword ptr [RBX + 0x108],R15 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
bool safe_hash_init(long param_1,int4 param_2,int8 param_3) { char cVar1; int8 uVar2; cVar1 = my_hash_init2(key_memory_SAFE_HASH_ENTRY,param_1 + 0x98,0,my_charset_bin,param_2,0,0, safe_hash_entry_get,0,safe_hash_entry_free,0); uVar2 = 0; if (cVar1 == '\0') { uVar2 = (**(code **)(PSI_server + 0x50))(key_SAFEHASH_mutex,param_1); *(int8 *)(param_1 + 0x90) = uVar2; my_rw_init(param_1); *(int8 *)(param_1 + 0x110) = 0; uVar2 = param_3; } *(int8 *)(param_1 + 0x108) = uVar2; return cVar1 != '\0'; }
40,626
google::protobuf::DescriptorPool::IsSubSymbolOfBuiltType(google::protobuf::stringpiece_internal::StringPiece) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
bool DescriptorPool::IsSubSymbolOfBuiltType(StringPiece name) const { auto prefix = std::string(name); for (;;) { std::string::size_type dot_pos = prefix.find_last_of('.'); if (dot_pos == std::string::npos) { break; } prefix = prefix.substr(0, dot_pos); Symbol symbol = tables_->FindSymbol(prefix); // If the symbol type is anything other than PACKAGE, then its complete // definition is already known. if (!symbol.IsNull() && !symbol.IsPackage()) { return true; } } if (underlay_ != nullptr) { // Check to see if any prefix of this symbol exists in the underlay. return underlay_->IsSubSymbolOfBuiltType(name); } return false; }
O0
cpp
google::protobuf::DescriptorPool::IsSubSymbolOfBuiltType(google::protobuf::stringpiece_internal::StringPiece) const: subq $0xd8, %rsp movq %rsi, 0xc0(%rsp) movq %rdx, 0xc8(%rsp) movq %rdi, 0xb8(%rsp) movq 0xb8(%rsp), %rax movq %rax, 0x28(%rsp) leaq 0x98(%rsp), %rdi leaq 0xc0(%rsp), %rsi callq 0x1a82c0 leaq 0x98(%rsp), %rdi movl $0x2e, %esi movq $-0x1, %rdx callq 0x8d280 movq %rax, 0x90(%rsp) cmpq $-0x1, 0x90(%rsp) jne 0x2452a2 jmp 0x24539f movq 0x90(%rsp), %rcx xorl %eax, %eax movl %eax, %edx leaq 0x70(%rsp), %rdi leaq 0x98(%rsp), %rsi callq 0x94ab0 jmp 0x2452c2 leaq 0x98(%rsp), %rdi movq %rdi, 0x18(%rsp) leaq 0x70(%rsp), %rsi movq %rsi, 0x10(%rsp) callq 0x901e0 movq 0x10(%rsp), %rdi callq 0x921e0 movq 0x28(%rsp), %rdi addq $0x20, %rdi callq 0x2812c0 movq 0x18(%rsp), %rsi movq %rax, 0x20(%rsp) leaq 0x48(%rsp), %rdi callq 0x158e50 jmp 0x24530c movq 0x20(%rsp), %rdi movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx callq 0x281180 movq %rax, 0x8(%rsp) jmp 0x245327 movq 0x8(%rsp), %rax movq %rax, 0x58(%rsp) leaq 0x58(%rsp), %rdi callq 0x281250 movb %al, 0x7(%rsp) jmp 0x245341 movb 0x7(%rsp), %al testb $0x1, %al jne 0x24539a jmp 0x24534b leaq 0x58(%rsp), %rdi callq 0x283540 movb %al, 0x6(%rsp) jmp 0x24535b movb 0x6(%rsp), %al testb $0x1, %al jne 0x24539a jmp 0x245365 movb $0x1, 0xd7(%rsp) movl $0x1, 0x44(%rsp) jmp 0x2453fd movq %rax, %rcx movl %edx, %eax movq %rcx, 0x68(%rsp) movl %eax, 0x64(%rsp) leaq 0x98(%rsp), %rdi callq 0x921e0 jmp 0x24541b jmp 0x245271 movq 0x28(%rsp), %rax cmpq $0x0, 0x18(%rax) je 0x2453ed movq 0x28(%rsp), %rax movq 0x18(%rax), %rdi movups 0xc0(%rsp), %xmm0 movaps %xmm0, 0x30(%rsp) movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rdx callq 0x245230 movb %al, 0x5(%rsp) jmp 0x2453d6 movb 0x5(%rsp), %al andb $0x1, %al movb %al, 0xd7(%rsp) movl $0x1, 0x44(%rsp) jmp 0x2453fd movb $0x0, 0xd7(%rsp) movl $0x1, 0x44(%rsp) leaq 0x98(%rsp), %rdi callq 0x921e0 movb 0xd7(%rsp), %al andb $0x1, %al addq $0xd8, %rsp retq movq 0x68(%rsp), %rdi callq 0x90db0 nopw %cs:(%rax,%rax)
_ZNK6google8protobuf14DescriptorPool22IsSubSymbolOfBuiltTypeENS0_20stringpiece_internal11StringPieceE: sub rsp, 0D8h mov qword ptr [rsp+0D8h+var_18], rsi mov qword ptr [rsp+0D8h+var_18+8], rdx mov [rsp+0D8h+var_20], rdi mov rax, [rsp+0D8h+var_20] mov [rsp+0D8h+var_B0], rax lea rdi, [rsp+0D8h+var_40] lea rsi, [rsp+0D8h+var_18] call _ZNK6google8protobuf20stringpiece_internal11StringPiececvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv; google::protobuf::stringpiece_internal::StringPiece::operator std::string(void) loc_245271: lea rdi, [rsp+0D8h+var_40] mov esi, 2Eh ; '.' mov rdx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12find_last_ofEcm; std::string::find_last_of(char,ulong) mov [rsp+0D8h+var_48], rax cmp [rsp+0D8h+var_48], 0FFFFFFFFFFFFFFFFh jnz short loc_2452A2 jmp loc_24539F loc_2452A2: mov rcx, [rsp+0D8h+var_48] xor eax, eax mov edx, eax lea rdi, [rsp+0D8h+var_68] lea rsi, [rsp+0D8h+var_40] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) jmp short $+2 loc_2452C2: lea rdi, [rsp+0D8h+var_40] mov [rsp+0D8h+var_C0], rdi lea rsi, [rsp+0D8h+var_68] mov [rsp+0D8h+var_C8], rsi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [rsp+0D8h+var_C8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rsp+0D8h+var_B0] add rdi, 20h ; ' ' call _ZNKSt10unique_ptrIN6google8protobuf14DescriptorPool6TablesESt14default_deleteIS3_EEptEv; std::unique_ptr<google::protobuf::DescriptorPool::Tables>::operator->(void) mov rsi, [rsp+0D8h+var_C0] mov [rsp+0D8h+var_B8], rax lea rdi, [rsp+0D8h+var_90] call _ZN6google8protobuf20stringpiece_internal11StringPieceC2ISaIcEEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcET_EE; google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(std::string const&) jmp short $+2 loc_24530C: mov rdi, [rsp+0D8h+var_B8] mov rsi, [rsp+0D8h+var_90] mov rdx, [rsp+0D8h+var_88] call _ZNK6google8protobuf14DescriptorPool6Tables10FindSymbolENS0_20stringpiece_internal11StringPieceE; google::protobuf::DescriptorPool::Tables::FindSymbol(google::protobuf::stringpiece_internal::StringPiece) mov [rsp+0D8h+var_D0], rax jmp short $+2 loc_245327: mov rax, [rsp+0D8h+var_D0] mov [rsp+0D8h+var_80], rax lea rdi, [rsp+0D8h+var_80]; this call _ZNK6google8protobuf6Symbol6IsNullEv; google::protobuf::Symbol::IsNull(void) mov [rsp+0D8h+var_D1], al jmp short $+2 loc_245341: mov al, [rsp+0D8h+var_D1] test al, 1 jnz short loc_24539A jmp short $+2 loc_24534B: lea rdi, [rsp+0D8h+var_80]; this call _ZNK6google8protobuf6Symbol9IsPackageEv; google::protobuf::Symbol::IsPackage(void) mov [rsp+0D8h+var_D2], al jmp short $+2 loc_24535B: mov al, [rsp+0D8h+var_D2] test al, 1 jnz short loc_24539A jmp short $+2 loc_245365: mov [rsp+0D8h+var_1], 1 mov [rsp+0D8h+var_94], 1 jmp loc_2453FD mov rcx, rax mov eax, edx mov [rsp+arg_60], rcx mov [rsp+arg_5C], eax lea rdi, [rsp+arg_90] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_24541B loc_24539A: jmp loc_245271 loc_24539F: mov rax, [rsp+0D8h+var_B0] cmp qword ptr [rax+18h], 0 jz short loc_2453ED mov rax, [rsp+0D8h+var_B0] mov rdi, [rax+18h] movups xmm0, [rsp+0D8h+var_18] movaps [rsp+0D8h+var_A8], xmm0 mov rsi, qword ptr [rsp+0D8h+var_A8] mov rdx, qword ptr [rsp+0D8h+var_A8+8] call _ZNK6google8protobuf14DescriptorPool22IsSubSymbolOfBuiltTypeENS0_20stringpiece_internal11StringPieceE; google::protobuf::DescriptorPool::IsSubSymbolOfBuiltType(google::protobuf::stringpiece_internal::StringPiece) mov [rsp+0D8h+var_D3], al jmp short $+2 loc_2453D6: mov al, [rsp+0D8h+var_D3] and al, 1 mov [rsp+0D8h+var_1], al mov [rsp+0D8h+var_94], 1 jmp short loc_2453FD loc_2453ED: mov [rsp+0D8h+var_1], 0 mov [rsp+0D8h+var_94], 1 loc_2453FD: lea rdi, [rsp+0D8h+var_40] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov al, [rsp+0D8h+var_1] and al, 1 add rsp, 0D8h retn loc_24541B: mov rdi, [rsp+arg_60] call __Unwind_Resume
char google::protobuf::DescriptorPool::IsSubSymbolOfBuiltType(long long a1, long long a2, long long a3) { long long v4; // [rsp+20h] [rbp-B8h] _QWORD v5[2]; // [rsp+48h] [rbp-90h] BYREF _QWORD v6[3]; // [rsp+58h] [rbp-80h] BYREF _BYTE v7[32]; // [rsp+70h] [rbp-68h] BYREF long long last_of; // [rsp+90h] [rbp-48h] _BYTE v9[32]; // [rsp+98h] [rbp-40h] BYREF long long v10; // [rsp+B8h] [rbp-20h] long long v11; // [rsp+C0h] [rbp-18h] BYREF long long v12; // [rsp+C8h] [rbp-10h] char v13; // [rsp+D7h] [rbp-1h] v11 = a2; v12 = a3; v10 = a1; google::protobuf::stringpiece_internal::StringPiece::operator std::string( (long long)v9, (google::protobuf::stringpiece_internal::StringPiece *)&v11); while ( 1 ) { last_of = std::string::find_last_of(v9, 46LL, -1LL); if ( last_of == -1 ) break; std::string::substr(v7, v9, 0LL, last_of); std::string::operator=(v9, v7); std::string::~string(v7); v4 = std::unique_ptr<google::protobuf::DescriptorPool::Tables>::operator->(a1 + 32); google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(v5, (long long)v9); v6[0] = google::protobuf::DescriptorPool::Tables::FindSymbol(v4, v5[0], v5[1]); if ( (google::protobuf::Symbol::IsNull((google::protobuf::Symbol *)v6) & 1) == 0 && (google::protobuf::Symbol::IsPackage((google::protobuf::Symbol *)v6) & 1) == 0 ) { v13 = 1; goto LABEL_10; } } if ( *(_QWORD *)(a1 + 24) ) v13 = google::protobuf::DescriptorPool::IsSubSymbolOfBuiltType(*(_QWORD *)(a1 + 24), v11, v12) & 1; else v13 = 0; LABEL_10: std::string::~string(v9); return v13 & 1; }
40,627
google::protobuf::DescriptorPool::IsSubSymbolOfBuiltType(google::protobuf::stringpiece_internal::StringPiece) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
bool DescriptorPool::IsSubSymbolOfBuiltType(StringPiece name) const { auto prefix = std::string(name); for (;;) { std::string::size_type dot_pos = prefix.find_last_of('.'); if (dot_pos == std::string::npos) { break; } prefix = prefix.substr(0, dot_pos); Symbol symbol = tables_->FindSymbol(prefix); // If the symbol type is anything other than PACKAGE, then its complete // definition is already known. if (!symbol.IsNull() && !symbol.IsPackage()) { return true; } } if (underlay_ != nullptr) { // Check to see if any prefix of this symbol exists in the underlay. return underlay_->IsSubSymbolOfBuiltType(name); } return false; }
O3
cpp
google::protobuf::DescriptorPool::IsSubSymbolOfBuiltType(google::protobuf::stringpiece_internal::StringPiece) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdi, %rbx leaq 0x10(%rsp), %rax movq %rsi, (%rax) movq %rdx, 0x8(%rax) leaq 0x20(%rsp), %r14 movq %r14, %rdi movq %rax, %rsi callq 0x85906 movq %r14, %rdi movl $0x2e, %esi movq $-0x1, %rdx callq 0x2e5c0 cmpq $-0x1, %rax je 0xc1bec leaq 0x40(%rsp), %r14 leaq 0x20(%rsp), %r15 leaq 0x8(%rsp), %r12 leaq 0xacc69(%rip), %rbp # 0x16e77e movq %r14, %rdi movq %r15, %rsi xorl %edx, %edx movq %rax, %rcx callq 0x2d300 movq %r15, %rdi movq %r14, %rsi callq 0x2c6a0 movq 0x40(%rsp), %rdi leaq 0x50(%rsp), %rax cmpq %rax, %rdi je 0xc1b44 callq 0x2d160 movq 0x20(%rbx), %r13 movups 0x20(%rsp), %xmm0 movups %xmm0, 0x48(%rsp) movq %r14, 0x8(%rsp) movb $0xb, 0x40(%rsp) movq %r12, %rdi callq 0xe01d2 testq %rdx, %rdx jle 0xc1b83 addq %rax, %rdx xorl %ecx, %ecx leaq (%rcx,%rcx,4), %rsi movsbq (%rax), %rcx addq %rsi, %rcx incq %rax cmpq %rdx, %rax jb 0xc1b6e jmp 0xc1b85 xorl %ecx, %ecx leaq 0x128(%r13), %rdi movq %rcx, %rax xorl %edx, %edx divq 0x130(%r13) movq %rdx, %rsi movq %r12, %rdx callq 0xdd414 testq %rax, %rax je 0xc1bb9 movq (%rax), %rcx movq %rbp, %rax testq %rcx, %rcx je 0xc1bbc movq 0x8(%rcx), %rax jmp 0xc1bbc movq %rbp, %rax movzbl (%rax), %eax cmpl $0xa, %eax ja 0xc1c0c movl $0x601, %ecx # imm = 0x601 btl %eax, %ecx jae 0xc1c0c movq %r15, %rdi movl $0x2e, %esi movq $-0x1, %rdx callq 0x2e5c0 cmpq $-0x1, %rax jne 0xc1b15 movq 0x18(%rbx), %rdi testq %rdi, %rdi je 0xc1c08 movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rdx callq 0xc1ab4 movl %eax, %ebx jmp 0xc1c0e xorl %ebx, %ebx jmp 0xc1c0e movb $0x1, %bl leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xc1c21 callq 0x2d160 movl %ebx, %eax addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xc1c36 jmp 0xc1c36 movq %rax, %rbx leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xc1c4c callq 0x2d160 movq %rbx, %rdi callq 0x2e220
_ZNK6google8protobuf14DescriptorPool22IsSubSymbolOfBuiltTypeENS0_20stringpiece_internal11StringPieceE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov rbx, rdi lea rax, [rsp+98h+var_88] mov [rax], rsi mov [rax+8], rdx lea r14, [rsp+98h+var_78] mov rdi, r14 mov rsi, rax call _ZNK6google8protobuf20stringpiece_internal11StringPiece8ToStringB5cxx11Ev; google::protobuf::stringpiece_internal::StringPiece::ToString(void) mov rdi, r14 mov esi, 2Eh ; '.' mov rdx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEcm; std::string::rfind(char,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jz loc_C1BEC lea r14, [rsp+98h+var_58] lea r15, [rsp+98h+var_78] lea r12, [rsp+98h+var_90] lea rbp, _ZZN6google8protobuf6SymbolC1EvE11null_symbol; google::protobuf::Symbol::Symbol(void)::null_symbol loc_C1B15: mov rdi, r14 mov rsi, r15 xor edx, edx mov rcx, rax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rdi, r15 mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [rsp+98h+var_58]; void * lea rax, [rsp+98h+var_48] cmp rdi, rax jz short loc_C1B44 call __ZdlPv; operator delete(void *) loc_C1B44: mov r13, [rbx+20h] movups xmm0, [rsp+98h+var_78] movups xmmword ptr [rsp+48h], xmm0 mov [rsp+98h+var_90], r14 mov byte ptr [rsp+98h+var_58], 0Bh mov rdi, r12; this call _ZNK6google8protobuf6Symbol9full_nameEv; google::protobuf::Symbol::full_name(void) test rdx, rdx jle short loc_C1B83 add rdx, rax xor ecx, ecx loc_C1B6E: lea rsi, [rcx+rcx*4] movsx rcx, byte ptr [rax] add rcx, rsi inc rax cmp rax, rdx jb short loc_C1B6E jmp short loc_C1B85 loc_C1B83: xor ecx, ecx loc_C1B85: lea rdi, [r13+128h] mov rax, rcx xor edx, edx div qword ptr [r13+130h] mov rsi, rdx mov rdx, r12 call _ZNKSt10_HashtableIN6google8protobuf6SymbolES2_SaIS2_ENSt8__detail9_IdentityENS1_12_GLOBAL__N_118SymbolByFullNameEqENS6_20SymbolByFullNameHashENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb1ELb1ELb1EEEE19_M_find_before_nodeEmRKS2_m; std::_Hashtable<google::protobuf::Symbol,google::protobuf::Symbol,std::allocator<google::protobuf::Symbol>,std::__detail::_Identity,google::protobuf::`anonymous namespace'::SymbolByFullNameEq,google::protobuf::`anonymous namespace'::SymbolByFullNameHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_find_before_node(ulong,google::protobuf::Symbol const&,ulong) test rax, rax jz short loc_C1BB9 mov rcx, [rax] mov rax, rbp test rcx, rcx jz short loc_C1BBC mov rax, [rcx+8] jmp short loc_C1BBC loc_C1BB9: mov rax, rbp loc_C1BBC: movzx eax, byte ptr [rax] cmp eax, 0Ah ja short loc_C1C0C mov ecx, 601h bt ecx, eax jnb short loc_C1C0C mov rdi, r15 mov esi, 2Eh ; '.' mov rdx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEcm; std::string::rfind(char,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jnz loc_C1B15 loc_C1BEC: mov rdi, [rbx+18h] test rdi, rdi jz short loc_C1C08 mov rsi, [rsp+98h+var_88] mov rdx, [rsp+98h+var_80] call _ZNK6google8protobuf14DescriptorPool22IsSubSymbolOfBuiltTypeENS0_20stringpiece_internal11StringPieceE; google::protobuf::DescriptorPool::IsSubSymbolOfBuiltType(google::protobuf::stringpiece_internal::StringPiece) mov ebx, eax jmp short loc_C1C0E loc_C1C08: xor ebx, ebx jmp short loc_C1C0E loc_C1C0C: mov bl, 1 loc_C1C0E: lea rax, [rsp+98h+var_68] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_C1C21 call __ZdlPv; operator delete(void *) loc_C1C21: mov eax, ebx add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_C1C36 jmp short $+2 loc_C1C36: mov rbx, rax lea rax, [rsp+arg_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_C1C4C call __ZdlPv; operator delete(void *) loc_C1C4C: mov rdi, rbx call __Unwind_Resume
long long google::protobuf::DescriptorPool::IsSubSymbolOfBuiltType(long long a1, long long a2, long long a3) { unsigned int IsSubSymbolOfBuiltType; // ebx long long v4; // rax long long v5; // r13 char *v6; // rax long long v7; // rdx char *v8; // rdx unsigned long long v9; // rcx long long *v10; // rax long long v11; // rcx unsigned __int8 *v12; // rax unsigned int v13; // eax int v14; // ecx long long v15; // rdi void **v17; // [rsp+8h] [rbp-90h] BYREF long long v18; // [rsp+10h] [rbp-88h] BYREF long long v19; // [rsp+18h] [rbp-80h] __int128 v20; // [rsp+20h] [rbp-78h] BYREF char v21; // [rsp+30h] [rbp-68h] BYREF void *v22; // [rsp+40h] [rbp-58h] BYREF __int128 v23; // [rsp+48h] [rbp-50h] BYREF IsSubSymbolOfBuiltType = a1; v18 = a2; v19 = a3; google::protobuf::stringpiece_internal::StringPiece::ToString[abi:cxx11](&v20, (long long)&v18); v4 = std::string::rfind(&v20, 46LL, -1LL); if ( v4 == -1 ) { LABEL_16: v15 = *(_QWORD *)(a1 + 24); if ( v15 ) IsSubSymbolOfBuiltType = google::protobuf::DescriptorPool::IsSubSymbolOfBuiltType(v15, v18, v19); else IsSubSymbolOfBuiltType = 0; } else { while ( 1 ) { std::string::substr(&v22, &v20, 0LL, v4); std::string::operator=(&v20, (long long)&v22); if ( v22 != (char *)&v23 + 8 ) operator delete(v22); v5 = *(_QWORD *)(a1 + 32); v23 = v20; v17 = &v22; LOBYTE(v22) = 11; v6 = (char *)google::protobuf::Symbol::full_name((google::protobuf::Symbol *)&v17); if ( v7 <= 0 ) { v9 = 0LL; } else { v8 = &v6[v7]; v9 = 0LL; do v9 = 5 * v9 + *v6++; while ( v6 < v8 ); } v10 = (long long *)std::_Hashtable<google::protobuf::Symbol,google::protobuf::Symbol,std::allocator<google::protobuf::Symbol>,std::__detail::_Identity,google::protobuf::`anonymous namespace'::SymbolByFullNameEq,google::protobuf::`anonymous namespace'::SymbolByFullNameHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_find_before_node( v5 + 296, v9 % *(_QWORD *)(v5 + 304), &v17); if ( v10 ) { v11 = *v10; v12 = (unsigned __int8 *)&google::protobuf::Symbol::Symbol(void)::null_symbol; if ( v11 ) v12 = *(unsigned __int8 **)(v11 + 8); } else { v12 = (unsigned __int8 *)&google::protobuf::Symbol::Symbol(void)::null_symbol; } v13 = *v12; if ( v13 > 0xA ) break; v14 = 1537; if ( !_bittest(&v14, v13) ) break; v4 = std::string::rfind(&v20, 46LL, -1LL); if ( v4 == -1 ) goto LABEL_16; } LOBYTE(IsSubSymbolOfBuiltType) = 1; } if ( (char *)v20 != &v21 ) operator delete((void *)v20); return IsSubSymbolOfBuiltType; }
IsSubSymbolOfBuiltType: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV RBX,RDI LEA RAX,[RSP + 0x10] MOV qword ptr [RAX],RSI MOV qword ptr [RAX + 0x8],RDX LEA R14,[RSP + 0x20] MOV RDI,R14 MOV RSI,RAX CALL 0x00185906 MOV RDI,R14 MOV ESI,0x2e MOV RDX,-0x1 CALL 0x0012e5c0 CMP RAX,-0x1 JZ 0x001c1bec LEA R14,[RSP + 0x40] LEA R15,[RSP + 0x20] LEA R12,[RSP + 0x8] LEA RBP,[0x26e77e] LAB_001c1b15: MOV RDI,R14 MOV RSI,R15 XOR EDX,EDX MOV RCX,RAX CALL 0x0012d300 MOV RDI,R15 MOV RSI,R14 CALL 0x0012c6a0 MOV RDI,qword ptr [RSP + 0x40] LEA RAX,[RSP + 0x50] CMP RDI,RAX JZ 0x001c1b44 CALL 0x0012d160 LAB_001c1b44: MOV R13,qword ptr [RBX + 0x20] MOVUPS XMM0,xmmword ptr [RSP + 0x20] MOVUPS xmmword ptr [RSP + 0x48],XMM0 MOV qword ptr [RSP + 0x8],R14 MOV byte ptr [RSP + 0x40],0xb LAB_001c1b5c: MOV RDI,R12 CALL 0x001e01d2 TEST RDX,RDX JLE 0x001c1b83 ADD RDX,RAX XOR ECX,ECX LAB_001c1b6e: LEA RSI,[RCX + RCX*0x4] MOVSX RCX,byte ptr [RAX] ADD RCX,RSI INC RAX CMP RAX,RDX JC 0x001c1b6e JMP 0x001c1b85 LAB_001c1b83: XOR ECX,ECX LAB_001c1b85: LEA RDI,[R13 + 0x128] MOV RAX,RCX XOR EDX,EDX DIV qword ptr [R13 + 0x130] MOV RSI,RDX MOV RDX,R12 CALL 0x001dd414 TEST RAX,RAX JZ 0x001c1bb9 MOV RCX,qword ptr [RAX] MOV RAX,RBP TEST RCX,RCX JZ 0x001c1bbc MOV RAX,qword ptr [RCX + 0x8] JMP 0x001c1bbc LAB_001c1bb9: MOV RAX,RBP LAB_001c1bbc: MOVZX EAX,byte ptr [RAX] CMP EAX,0xa JA 0x001c1c0c MOV ECX,0x601 BT ECX,EAX JNC 0x001c1c0c MOV RDI,R15 MOV ESI,0x2e MOV RDX,-0x1 CALL 0x0012e5c0 CMP RAX,-0x1 JNZ 0x001c1b15 LAB_001c1bec: MOV RDI,qword ptr [RBX + 0x18] TEST RDI,RDI JZ 0x001c1c08 MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x18] LAB_001c1bff: CALL 0x001c1ab4 LAB_001c1c04: MOV EBX,EAX JMP 0x001c1c0e LAB_001c1c08: XOR EBX,EBX JMP 0x001c1c0e LAB_001c1c0c: MOV BL,0x1 LAB_001c1c0e: LEA RAX,[RSP + 0x30] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001c1c21 CALL 0x0012d160 LAB_001c1c21: MOV EAX,EBX ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* google::protobuf::DescriptorPool::IsSubSymbolOfBuiltType(google::protobuf::stringpiece_internal::StringPiece) const */ ulong google::protobuf::DescriptorPool::IsSubSymbolOfBuiltType (long param_1,int8 param_2,int8 param_3) { uint uVar1; long lVar2; char *pcVar3; long *plVar4; byte *pbVar5; ulong uVar6; char *pcVar7; int1 auVar8 [16]; string *local_90; int8 local_88; int8 local_80; int1 *local_78; int8 uStack_70; int1 local_68 [16]; string local_58; int7 uStack_57; int1 *local_50; int8 auStack_48 [3]; local_88 = param_2; local_80 = param_3; stringpiece_internal::StringPiece::ToString_abi_cxx11_(); lVar2 = std::__cxx11::string::rfind((char)&local_78,0x2e); if (lVar2 != -1) { do { /* try { // try from 001c1b15 to 001c1b24 has its CatchHandler @ 001c1c34 */ std::__cxx11::string::substr((ulong)&local_58,(ulong)&local_78); std::__cxx11::string::operator=((string *)&local_78,&local_58); if ((int8 *)CONCAT71(uStack_57,local_58) != auStack_48) { operator_delete((int8 *)CONCAT71(uStack_57,local_58)); } lVar2 = *(long *)(param_1 + 0x20); local_50 = local_78; auStack_48[0] = uStack_70; local_58 = (string)0xb; local_90 = &local_58; /* try { // try from 001c1b5c to 001c1ba2 has its CatchHandler @ 001c1c36 */ auVar8 = Symbol::full_name((Symbol *)&local_90); pcVar3 = auVar8._0_8_; if (auVar8._8_8_ < 1) { uVar6 = 0; } else { pcVar7 = pcVar3 + auVar8._8_8_; uVar6 = 0; do { uVar6 = (long)*pcVar3 + uVar6 * 5; pcVar3 = pcVar3 + 1; } while (pcVar3 < pcVar7); } plVar4 = (long *)std:: _Hashtable<google::protobuf::Symbol,google::protobuf::Symbol,std::allocator<google::protobuf::Symbol>,std::__detail::_Identity,google::protobuf::(anonymous_namespace)::SymbolByFullNameEq,google::protobuf::(anonymous_namespace)::SymbolByFullNameHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> ::_M_find_before_node ((_Hashtable<google::protobuf::Symbol,google::protobuf::Symbol,std::allocator<google::protobuf::Symbol>,std::__detail::_Identity,google::protobuf::(anonymous_namespace)::SymbolByFullNameEq,google::protobuf::(anonymous_namespace)::SymbolByFullNameHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> *)(lVar2 + 0x128),uVar6 % *(ulong *)(lVar2 + 0x130), (Symbol *)&local_90,uVar6); if (plVar4 == (long *)0x0) { pbVar5 = &Symbol::Symbol()::null_symbol; } else { pbVar5 = &Symbol::Symbol()::null_symbol; if (*plVar4 != 0) { pbVar5 = *(byte **)(*plVar4 + 8); } } if ((10 < *pbVar5) || ((0x601U >> (*pbVar5 & 0x1f) & 1) == 0)) { uVar6 = CONCAT71((int7)((ulong)param_1 >> 8),1); goto LAB_001c1c0e; } lVar2 = std::__cxx11::string::rfind((char)(string *)&local_78,0x2e); } while (lVar2 != -1); } if (*(long *)(param_1 + 0x18) == 0) { uVar6 = 0; } else { /* try { // try from 001c1bff to 001c1c03 has its CatchHandler @ 001c1c32 */ uVar1 = IsSubSymbolOfBuiltType(*(long *)(param_1 + 0x18),local_88,local_80); uVar6 = (ulong)uVar1; } LAB_001c1c0e: if (local_78 != local_68) { operator_delete(local_78); } return uVar6 & 0xffffffff; }
40,628
my_mb_wc_utf8mb3_quick
eloqsql/strings/ctype-utf8.h
static inline int my_mb_wc_utf8mb3_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; } return MY_CS_ILSEQ; }
O0
c
my_mb_wc_utf8mb3_quick: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jb 0x8c626 movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x8c7a3 movq -0x18(%rbp), %rax movb (%rax), %al movb %al, -0x21(%rbp) movzbl -0x21(%rbp), %eax cmpl $0x80, %eax jge 0x8c653 movzbl -0x21(%rbp), %eax movl %eax, %ecx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl $0x1, -0x4(%rbp) jmp 0x8c7a3 movzbl -0x21(%rbp), %eax cmpl $0xc2, %eax jge 0x8c66a movl $0x0, -0x4(%rbp) jmp 0x8c7a3 movzbl -0x21(%rbp), %eax cmpl $0xe0, %eax jge 0x8c6e0 movq -0x18(%rbp), %rax addq $0x2, %rax cmpq -0x20(%rbp), %rax jbe 0x8c68f movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x8c7a3 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jl 0x8c6ad movl $0x0, -0x4(%rbp) jmp 0x8c7a3 movzbl -0x21(%rbp), %eax andl $0x1f, %eax movslq %eax, %rcx shlq $0x6, %rcx movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cltq orq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl $0x2, -0x4(%rbp) jmp 0x8c7a3 movzbl -0x21(%rbp), %eax cmpl $0xf0, %eax jge 0x8c796 movq -0x18(%rbp), %rax addq $0x3, %rax cmpq -0x20(%rbp), %rax jbe 0x8c709 movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99 jmp 0x8c7a3 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x8c747 movq -0x18(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x8c747 movzbl -0x21(%rbp), %eax cmpl $0xe1, %eax jge 0x8c750 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xa0, %eax jge 0x8c750 movl $0x0, -0x4(%rbp) jmp 0x8c7a3 movzbl -0x21(%rbp), %eax andl $0xf, %eax movslq %eax, %rcx shlq $0xc, %rcx movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cltq shlq $0x6, %rax orq %rax, %rcx movq -0x18(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cltq orq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl $0x3, -0x4(%rbp) jmp 0x8c7a3 jmp 0x8c798 jmp 0x8c79a jmp 0x8c79c movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
my_mb_wc_utf8mb3_quick: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jb short loc_8C626 mov [rbp+var_4], 0FFFFFF9Bh jmp loc_8C7A3 loc_8C626: mov rax, [rbp+var_18] mov al, [rax] mov [rbp+var_21], al movzx eax, [rbp+var_21] cmp eax, 80h jge short loc_8C653 movzx eax, [rbp+var_21] mov ecx, eax mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_4], 1 jmp loc_8C7A3 loc_8C653: movzx eax, [rbp+var_21] cmp eax, 0C2h jge short loc_8C66A mov [rbp+var_4], 0 jmp loc_8C7A3 loc_8C66A: movzx eax, [rbp+var_21] cmp eax, 0E0h jge short loc_8C6E0 mov rax, [rbp+var_18] add rax, 2 cmp rax, [rbp+var_20] jbe short loc_8C68F mov [rbp+var_4], 0FFFFFF9Ah jmp loc_8C7A3 loc_8C68F: mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jl short loc_8C6AD mov [rbp+var_4], 0 jmp loc_8C7A3 loc_8C6AD: movzx eax, [rbp+var_21] and eax, 1Fh movsxd rcx, eax shl rcx, 6 mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cdqe or rcx, rax mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_4], 2 jmp loc_8C7A3 loc_8C6E0: movzx eax, [rbp+var_21] cmp eax, 0F0h jge loc_8C796 mov rax, [rbp+var_18] add rax, 3 cmp rax, [rbp+var_20] jbe short loc_8C709 mov [rbp+var_4], 0FFFFFF99h jmp loc_8C7A3 loc_8C709: mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jge short loc_8C747 mov rax, [rbp+var_18] movzx eax, byte ptr [rax+2] xor eax, 80h cmp eax, 40h ; '@' jge short loc_8C747 movzx eax, [rbp+var_21] cmp eax, 0E1h jge short loc_8C750 mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] cmp eax, 0A0h jge short loc_8C750 loc_8C747: mov [rbp+var_4], 0 jmp short loc_8C7A3 loc_8C750: movzx eax, [rbp+var_21] and eax, 0Fh movsxd rcx, eax shl rcx, 0Ch mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cdqe shl rax, 6 or rcx, rax mov rax, [rbp+var_18] movzx eax, byte ptr [rax+2] xor eax, 80h cdqe or rcx, rax mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_4], 3 jmp short loc_8C7A3 loc_8C796: jmp short $+2 loc_8C798: jmp short $+2 loc_8C79A: jmp short $+2 loc_8C79C: mov [rbp+var_4], 0 loc_8C7A3: mov eax, [rbp+var_4] pop rbp retn
long long my_mb_wc_utf8mb3_quick(unsigned long long *a1, unsigned __int8 *a2, unsigned long long a3) { unsigned __int8 v4; // [rsp+1h] [rbp-21h] if ( (unsigned long long)a2 < a3 ) { v4 = *a2; if ( *a2 >= 0x80u ) { if ( v4 >= 0xC2u ) { if ( v4 >= 0xE0u ) { if ( v4 >= 0xF0u ) { return 0; } else if ( (unsigned long long)(a2 + 3) <= a3 ) { if ( (a2[1] ^ 0x80) < 64 && (a2[2] ^ 0x80) < 64 && (v4 >= 0xE1u || a2[1] >= 0xA0u) ) { *a1 = a2[2] ^ 0x80u | ((long long)(a2[1] ^ 0x80u) << 6) | ((unsigned long long)(v4 & 0xF) << 12); return 3; } else { return 0; } } else { return (unsigned int)-103; } } else if ( (unsigned long long)(a2 + 2) <= a3 ) { if ( (a2[1] ^ 0x80) < 64 ) { *a1 = a2[1] ^ 0x80u | ((unsigned long long)(v4 & 0x1F) << 6); return 2; } else { return 0; } } else { return (unsigned int)-102; } } else { return 0; } } else { *a1 = v4; return 1; } } else { return (unsigned int)-101; } }
my_mb_wc_utf8mb3_quick: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JC 0x0018c626 MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x0018c7a3 LAB_0018c626: MOV RAX,qword ptr [RBP + -0x18] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x21],AL MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0x80 JGE 0x0018c653 MOVZX EAX,byte ptr [RBP + -0x21] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x1 JMP 0x0018c7a3 LAB_0018c653: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xc2 JGE 0x0018c66a MOV dword ptr [RBP + -0x4],0x0 JMP 0x0018c7a3 LAB_0018c66a: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xe0 JGE 0x0018c6e0 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x20] JBE 0x0018c68f MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x0018c7a3 LAB_0018c68f: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JL 0x0018c6ad MOV dword ptr [RBP + -0x4],0x0 JMP 0x0018c7a3 LAB_0018c6ad: MOVZX EAX,byte ptr [RBP + -0x21] AND EAX,0x1f MOVSXD RCX,EAX SHL RCX,0x6 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CDQE OR RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x2 JMP 0x0018c7a3 LAB_0018c6e0: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xf0 JGE 0x0018c796 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x3 CMP RAX,qword ptr [RBP + -0x20] JBE 0x0018c709 MOV dword ptr [RBP + -0x4],0xffffff99 JMP 0x0018c7a3 LAB_0018c709: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JGE 0x0018c747 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CMP EAX,0x40 JGE 0x0018c747 MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xe1 JGE 0x0018c750 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xa0 JGE 0x0018c750 LAB_0018c747: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0018c7a3 LAB_0018c750: MOVZX EAX,byte ptr [RBP + -0x21] AND EAX,0xf MOVSXD RCX,EAX SHL RCX,0xc MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CDQE SHL RAX,0x6 OR RCX,RAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CDQE OR RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x3 JMP 0x0018c7a3 LAB_0018c796: JMP 0x0018c798 LAB_0018c798: JMP 0x0018c79a LAB_0018c79a: JMP 0x0018c79c LAB_0018c79c: MOV dword ptr [RBP + -0x4],0x0 LAB_0018c7a3: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_mb_wc_utf8mb3_quick(ulong *param_1,byte *param_2,byte *param_3) { byte bVar1; int4 local_c; if (param_2 < param_3) { bVar1 = *param_2; if (bVar1 < 0x80) { *param_1 = (ulong)bVar1; local_c = 1; } else if (bVar1 < 0xc2) { local_c = 0; } else if (bVar1 < 0xe0) { if (param_3 < param_2 + 2) { local_c = 0xffffff9a; } else if ((param_2[1] ^ 0x80) < 0x40) { *param_1 = (long)(int)(bVar1 & 0x1f) << 6 | (long)(int)(param_2[1] ^ 0x80); local_c = 2; } else { local_c = 0; } } else if (bVar1 < 0xf0) { if (param_3 < param_2 + 3) { local_c = 0xffffff99; } else if ((((param_2[1] ^ 0x80) < 0x40) && ((param_2[2] ^ 0x80) < 0x40)) && ((0xe0 < bVar1 || (0x9f < param_2[1])))) { *param_1 = (long)(int)(bVar1 & 0xf) << 0xc | (long)(int)(param_2[1] ^ 0x80) << 6 | (long)(int)(param_2[2] ^ 0x80); local_c = 3; } else { local_c = 0; } } else { local_c = 0; } } else { local_c = 0xffffff9b; } return local_c; }
40,629
my_rmtree
eloqsql/mysys/my_delete.c
int my_rmtree(const char *dir, myf MyFlags) { char path[FN_REFLEN]; char sep[] = { FN_LIBCHAR, 0 }; int err = 0; uint i; MY_DIR *dir_info = my_dir(dir, MYF(MY_DONT_SORT | MY_WANT_STAT)); if (!dir_info) return 1; for (i = 0; i < dir_info->number_of_files; i++) { FILEINFO *file = dir_info->dir_entry + i; /* Skip "." and ".." */ if (!strcmp(file->name, ".") || !strcmp(file->name, "..")) continue; strxnmov(path, sizeof(path), dir, sep, file->name, NULL); if (!MY_S_ISDIR(file->mystat->st_mode)) { err = my_delete(path, MyFlags); #ifdef _WIN32 /* On Windows, check and possible reset readonly attribute. my_delete(), or DeleteFile does not remove theses files. */ if (err) { DWORD attr = GetFileAttributes(path); if (attr != INVALID_FILE_ATTRIBUTES && (attr & FILE_ATTRIBUTE_READONLY)) { SetFileAttributes(path, attr &~FILE_ATTRIBUTE_READONLY); err = my_delete(path, MyFlags); } } #endif } else err = my_rmtree(path, MyFlags); if (err) break; } my_dirend(dir_info); if (!err) err = rmdir(dir); return err; }
O0
c
my_rmtree: pushq %rbp movq %rsp, %rbp subq $0x250, %rsp # imm = 0x250 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x220(%rbp) movq %rsi, -0x228(%rbp) movw 0xacee8(%rip), %ax # 0x1696e5 movw %ax, -0x22a(%rbp) movl $0x0, -0x230(%rbp) movq -0x220(%rbp), %rdi movl $0x4000, %esi # imm = 0x4000 callq 0xc1d70 movq %rax, -0x240(%rbp) cmpq $0x0, -0x240(%rbp) jne 0xbc83f movl $0x1, -0x214(%rbp) jmp 0xbc98a movl $0x0, -0x234(%rbp) movl -0x234(%rbp), %eax movq -0x240(%rbp), %rcx cmpl 0x8(%rcx), %eax jae 0xbc957 movq -0x240(%rbp), %rax movq (%rax), %rax movl -0x234(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x248(%rbp) movq -0x248(%rbp), %rax movq (%rax), %rdi leaq 0xa8a8c(%rip), %rsi # 0x16531a callq 0x609b0 cmpl $0x0, %eax je 0xbc8b3 movq -0x248(%rbp), %rax movq (%rax), %rdi leaq 0x913b2(%rip), %rsi # 0x14dc5b callq 0x609b0 cmpl $0x0, %eax jne 0xbc8b8 jmp 0xbc943 leaq -0x210(%rbp), %rdi movq -0x220(%rbp), %rdx leaq -0x22a(%rbp), %rcx movq -0x248(%rbp), %rax movq (%rax), %r8 movl $0x200, %esi # imm = 0x200 xorl %eax, %eax movl %eax, %r9d movb $0x0, %al callq 0x148d40 movq -0x248(%rbp), %rax movq 0x8(%rax), %rax movl 0x18(%rax), %eax andl $0xf000, %eax # imm = 0xF000 cmpl $0x4000, %eax # imm = 0x4000 je 0xbc91d leaq -0x210(%rbp), %rdi movq -0x228(%rbp), %rsi callq 0xbc680 movl %eax, -0x230(%rbp) jmp 0xbc936 leaq -0x210(%rbp), %rdi movq -0x228(%rbp), %rsi callq 0xbc7d0 movl %eax, -0x230(%rbp) cmpl $0x0, -0x230(%rbp) je 0xbc941 jmp 0xbc957 jmp 0xbc943 movl -0x234(%rbp), %eax addl $0x1, %eax movl %eax, -0x234(%rbp) jmp 0xbc849 movq -0x240(%rbp), %rdi callq 0xc1d20 cmpl $0x0, -0x230(%rbp) jne 0xbc97e movq -0x220(%rbp), %rdi callq 0x60490 movl %eax, -0x230(%rbp) movl -0x230(%rbp), %eax movl %eax, -0x214(%rbp) movl -0x214(%rbp), %eax movl %eax, -0x24c(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xbc9b7 movl -0x24c(%rbp), %eax addq $0x250, %rsp # imm = 0x250 popq %rbp retq callq 0x60310 nopl (%rax)
my_rmtree: push rbp mov rbp, rsp sub rsp, 250h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_220], rdi mov [rbp+var_228], rsi mov ax, word ptr cs:asc_1696E4+1; "/" mov [rbp+var_22A], ax mov [rbp+var_230], 0 mov rdi, [rbp+var_220] mov esi, 4000h call my_dir mov [rbp+var_240], rax cmp [rbp+var_240], 0 jnz short loc_BC83F mov [rbp+var_214], 1 jmp loc_BC98A loc_BC83F: mov [rbp+var_234], 0 loc_BC849: mov eax, [rbp+var_234] mov rcx, [rbp+var_240] cmp eax, [rcx+8] jnb loc_BC957 mov rax, [rbp+var_240] mov rax, [rax] mov ecx, [rbp+var_234] shl rcx, 4 add rax, rcx mov [rbp+var_248], rax mov rax, [rbp+var_248] mov rdi, [rax] lea rsi, aArgument2ToFun+32h; "." call _strcmp cmp eax, 0 jz short loc_BC8B3 mov rax, [rbp+var_248] mov rdi, [rax] lea rsi, aStartProcessin+2Ah; ".." call _strcmp cmp eax, 0 jnz short loc_BC8B8 loc_BC8B3: jmp loc_BC943 loc_BC8B8: lea rdi, [rbp+var_210] mov rdx, [rbp+var_220] lea rcx, [rbp+var_22A] mov rax, [rbp+var_248] mov r8, [rax] mov esi, 200h xor eax, eax mov r9d, eax mov al, 0 call strxnmov mov rax, [rbp+var_248] mov rax, [rax+8] mov eax, [rax+18h] and eax, 0F000h cmp eax, 4000h jz short loc_BC91D lea rdi, [rbp+var_210] mov rsi, [rbp+var_228] call my_delete mov [rbp+var_230], eax jmp short loc_BC936 loc_BC91D: lea rdi, [rbp+var_210] mov rsi, [rbp+var_228] call my_rmtree mov [rbp+var_230], eax loc_BC936: cmp [rbp+var_230], 0 jz short loc_BC941 jmp short loc_BC957 loc_BC941: jmp short $+2 loc_BC943: mov eax, [rbp+var_234] add eax, 1 mov [rbp+var_234], eax jmp loc_BC849 loc_BC957: mov rdi, [rbp+var_240] call my_dirend cmp [rbp+var_230], 0 jnz short loc_BC97E mov rdi, [rbp+var_220] call _rmdir mov [rbp+var_230], eax loc_BC97E: mov eax, [rbp+var_230] mov [rbp+var_214], eax loc_BC98A: mov eax, [rbp+var_214] mov [rbp+var_24C], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_BC9B7 mov eax, [rbp+var_24C] add rsp, 250h pop rbp retn loc_BC9B7: call ___stack_chk_fail
long long my_rmtree(long long a1, long long a2) { _QWORD *v3; // [rsp+8h] [rbp-248h] long long v4; // [rsp+10h] [rbp-240h] unsigned int i; // [rsp+1Ch] [rbp-234h] unsigned int v6; // [rsp+20h] [rbp-230h] __int16 v7; // [rsp+26h] [rbp-22Ah] BYREF long long v8; // [rsp+28h] [rbp-228h] long long v9; // [rsp+30h] [rbp-220h] _BYTE v11[520]; // [rsp+40h] [rbp-210h] BYREF unsigned long long v12; // [rsp+248h] [rbp-8h] v12 = __readfsqword(0x28u); v9 = a1; v8 = a2; strcpy((char *)&v7, "/"); v6 = 0; v4 = my_dir(a1, 0x4000LL); if ( v4 ) { for ( i = 0; i < *(_DWORD *)(v4 + 8); ++i ) { v3 = (_QWORD *)(16LL * i + *(_QWORD *)v4); if ( (unsigned int)strcmp(*v3, ".") && (unsigned int)strcmp(*v3, "..") ) { strxnmov((unsigned int)v11, 512, v9, (unsigned int)&v7, *v3, 0); v6 = (*(_DWORD *)(v3[1] + 24LL) & 0xF000) == 0x4000 ? my_rmtree(v11, v8) : my_delete((long long)v11, v8); if ( v6 ) break; } } my_dirend(v4); if ( !v6 ) return (unsigned int)rmdir(v9); return v6; } else { return 1; } }
my_rmtree: PUSH RBP MOV RBP,RSP SUB RSP,0x250 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x220],RDI MOV qword ptr [RBP + -0x228],RSI MOV AX,word ptr [0x002696e5] MOV word ptr [RBP + -0x22a],AX MOV dword ptr [RBP + -0x230],0x0 MOV RDI,qword ptr [RBP + -0x220] MOV ESI,0x4000 CALL 0x001c1d70 MOV qword ptr [RBP + -0x240],RAX CMP qword ptr [RBP + -0x240],0x0 JNZ 0x001bc83f MOV dword ptr [RBP + -0x214],0x1 JMP 0x001bc98a LAB_001bc83f: MOV dword ptr [RBP + -0x234],0x0 LAB_001bc849: MOV EAX,dword ptr [RBP + -0x234] MOV RCX,qword ptr [RBP + -0x240] CMP EAX,dword ptr [RCX + 0x8] JNC 0x001bc957 MOV RAX,qword ptr [RBP + -0x240] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x234] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x248],RAX MOV RAX,qword ptr [RBP + -0x248] MOV RDI,qword ptr [RAX] LEA RSI,[0x26531a] CALL 0x001609b0 CMP EAX,0x0 JZ 0x001bc8b3 MOV RAX,qword ptr [RBP + -0x248] MOV RDI,qword ptr [RAX] LEA RSI,[0x24dc5b] CALL 0x001609b0 CMP EAX,0x0 JNZ 0x001bc8b8 LAB_001bc8b3: JMP 0x001bc943 LAB_001bc8b8: LEA RDI,[RBP + -0x210] MOV RDX,qword ptr [RBP + -0x220] LEA RCX,[RBP + -0x22a] MOV RAX,qword ptr [RBP + -0x248] MOV R8,qword ptr [RAX] MOV ESI,0x200 XOR EAX,EAX MOV R9D,EAX MOV AL,0x0 CALL 0x00248d40 MOV RAX,qword ptr [RBP + -0x248] MOV RAX,qword ptr [RAX + 0x8] MOV EAX,dword ptr [RAX + 0x18] AND EAX,0xf000 CMP EAX,0x4000 JZ 0x001bc91d LEA RDI,[RBP + -0x210] MOV RSI,qword ptr [RBP + -0x228] CALL 0x001bc680 MOV dword ptr [RBP + -0x230],EAX JMP 0x001bc936 LAB_001bc91d: LEA RDI,[RBP + -0x210] MOV RSI,qword ptr [RBP + -0x228] CALL 0x001bc7d0 MOV dword ptr [RBP + -0x230],EAX LAB_001bc936: CMP dword ptr [RBP + -0x230],0x0 JZ 0x001bc941 JMP 0x001bc957 LAB_001bc941: JMP 0x001bc943 LAB_001bc943: MOV EAX,dword ptr [RBP + -0x234] ADD EAX,0x1 MOV dword ptr [RBP + -0x234],EAX JMP 0x001bc849 LAB_001bc957: MOV RDI,qword ptr [RBP + -0x240] CALL 0x001c1d20 CMP dword ptr [RBP + -0x230],0x0 JNZ 0x001bc97e MOV RDI,qword ptr [RBP + -0x220] CALL 0x00160490 MOV dword ptr [RBP + -0x230],EAX LAB_001bc97e: MOV EAX,dword ptr [RBP + -0x230] MOV dword ptr [RBP + -0x214],EAX LAB_001bc98a: MOV EAX,dword ptr [RBP + -0x214] MOV dword ptr [RBP + -0x24c],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001bc9b7 MOV EAX,dword ptr [RBP + -0x24c] ADD RSP,0x250 POP RBP RET LAB_001bc9b7: CALL 0x00160310
int my_rmtree(char *param_1,int8 param_2) { int iVar1; long *plVar2; int8 *puVar3; long in_FS_OFFSET; uint local_23c; int local_238; int2 local_232; int8 local_230; char *local_228; int local_21c; int1 local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_232 = DAT_002696e5; local_238 = 0; local_230 = param_2; local_228 = param_1; plVar2 = (long *)my_dir(param_1,0x4000); if (plVar2 == (long *)0x0) { local_21c = 1; } else { for (local_23c = 0; local_23c < *(uint *)(plVar2 + 1); local_23c = local_23c + 1) { puVar3 = (int8 *)(*plVar2 + (ulong)local_23c * 0x10); iVar1 = strcmp((char *)*puVar3,"."); if ((iVar1 != 0) && (iVar1 = strcmp((char *)*puVar3,".."), iVar1 != 0)) { strxnmov(local_218,0x200,local_228,&local_232,*puVar3,0); if ((*(uint *)(puVar3[1] + 0x18) & 0xf000) == 0x4000) { local_238 = my_rmtree(local_218,local_230); } else { local_238 = my_delete(local_218,local_230); } if (local_238 != 0) break; } } my_dirend(plVar2); if (local_238 == 0) { local_238 = rmdir(local_228); } local_21c = local_238; } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_21c; }
40,630
ma_mark_file_crashed
eloqsql/storage/maria/ma_locking.c
void _ma_mark_file_crashed(MARIA_SHARE *share) { uchar buff[2]; DBUG_ENTER("_ma_mark_file_crashed"); share->state.changed|= STATE_CRASHED; if (share->no_status_updates) DBUG_VOID_RETURN; /* Safety */ mi_int2store(buff, share->state.changed); /* We can ignore the errors, as if the mark failed, there isn't anything else we can do; The user should already have got an error that the table was crashed. */ (void) my_pwrite(share->kfile.file, buff, sizeof(buff), sizeof(share->state.header) + MARIA_FILE_CHANGED_OFFSET, MYF(MY_NABP)); DBUG_VOID_RETURN; }
O3
c
ma_mark_file_crashed: movl 0x170(%rdi), %eax movl %eax, %ecx orl $0x2, %ecx movl %ecx, 0x170(%rdi) cmpb $0x0, 0x7e1(%rdi) je 0x42d5d retq pushq %rbp movq %rsp, %rbp subq $0x10, %rsp leaq -0x2(%rbp), %rsi movb %cl, 0x1(%rsi) movb %ah, -0x2(%rbp) movl 0x760(%rdi), %edi movl $0x2, %edx movl $0x1a, %ecx movl $0x4, %r8d callq 0xa08fe addq $0x10, %rsp popq %rbp retq
_ma_mark_file_crashed: mov eax, [rdi+170h] mov ecx, eax or ecx, 2 mov [rdi+170h], ecx cmp byte ptr [rdi+7E1h], 0 jz short loc_42D5D retn loc_42D5D: push rbp mov rbp, rsp sub rsp, 10h lea rsi, [rbp-2] mov [rsi+1], cl mov [rbp-2], ah mov edi, [rdi+760h] mov edx, 2 mov ecx, 1Ah mov r8d, 4 call my_pwrite add rsp, 10h pop rbp retn
long long ma_mark_file_crashed(long long a1) { long long result; // rax int v2; // ecx _BYTE v3[10]; // [rsp-Ah] [rbp-Ah] BYREF result = *(unsigned int *)(a1 + 368); v2 = *(_DWORD *)(a1 + 368) | 2; *(_DWORD *)(a1 + 368) = v2; if ( !*(_BYTE *)(a1 + 2017) ) { v3[1] = v2; v3[0] = BYTE1(result); return my_pwrite(*(unsigned int *)(a1 + 1888), v3, 2LL, 26LL, 4LL); } return result; }
_ma_mark_file_crashed: MOV EAX,dword ptr [RDI + 0x170] MOV ECX,EAX OR ECX,0x2 MOV dword ptr [RDI + 0x170],ECX CMP byte ptr [RDI + 0x7e1],0x0 JZ 0x00142d5d RET LAB_00142d5d: PUSH RBP MOV RBP,RSP SUB RSP,0x10 LEA RSI,[RBP + -0x2] MOV byte ptr [RSI + 0x1],CL MOV byte ptr [RBP + -0x2],AH MOV EDI,dword ptr [RDI + 0x760] MOV EDX,0x2 MOV ECX,0x1a MOV R8D,0x4 CALL 0x001a08fe ADD RSP,0x10 POP RBP RET
void _ma_mark_file_crashed(long param_1) { uint uVar1; uint uVar2; int1 local_a; int1 local_9; uVar1 = *(uint *)(param_1 + 0x170); uVar2 = uVar1 | 2; *(uint *)(param_1 + 0x170) = uVar2; if (*(char *)(param_1 + 0x7e1) != '\0') { return; } local_9 = (int1)uVar2; local_a = (int1)(uVar1 >> 8); my_pwrite(*(int4 *)(param_1 + 0x760),&local_a,2,0x1a,4); return; }
40,631
js_object_list_add
bluesky950520[P]quickjs/quickjs.c
static int js_object_list_add(JSContext *ctx, JSObjectList *s, JSObject *obj) { JSObjectListEntry *e; uint32_t h, new_hash_size; if (js_resize_array(ctx, (void *)&s->object_tab, sizeof(s->object_tab[0]), &s->object_size, s->object_count + 1)) return -1; if (unlikely((s->object_count + 1) >= s->hash_size)) { new_hash_size = max_uint32(s->hash_size, 4); while (new_hash_size <= s->object_count) new_hash_size *= 2; if (js_object_list_resize_hash(ctx, s, new_hash_size)) return -1; } e = &s->object_tab[s->object_count++]; h = js_object_list_get_hash(obj, s->hash_size); e->obj = obj; e->hash_next = s->hash_table[h]; s->hash_table[h] = s->object_count - 1; return 0; }
O1
c
js_object_list_add: pushq %r15 pushq %r14 pushq %rbx movq %rdx, %r14 movq %rsi, %rbx movq %rdi, %r15 movl 0x8(%rsi), %r8d cmpl %r8d, 0xc(%rsi) jle 0x453fa movl 0x8(%rbx), %eax movl 0x18(%rbx), %ecx leal 0x1(%rax), %edx cmpl %ecx, %edx jae 0x4541e movq (%rbx), %rax movslq 0x8(%rbx), %rcx leal 0x1(%rcx), %edx movl %edx, 0x8(%rbx) movq %rcx, %rdx shlq $0x4, %rdx movl 0x18(%rbx), %esi decl %esi imull $0xc5b, %r14d, %edi # imm = 0xC5B andl %esi, %edi movq %r14, (%rax,%rdx) movq 0x10(%rbx), %rsi movl (%rsi,%rdi,4), %r8d movl %r8d, 0x8(%rax,%rdx) movl %ecx, (%rsi,%rdi,4) xorl %eax, %eax popq %rbx popq %r14 popq %r15 retq leaq 0xc(%rbx), %rcx incl %r8d movq %r15, %rdi movq %rbx, %rsi movl $0x10, %edx callq 0x434ef movl %eax, %ecx movl $0xffffffff, %eax # imm = 0xFFFFFFFF testl %ecx, %ecx jne 0x453f4 jmp 0x453af cmpl $0x5, %ecx movl $0x4, %esi cmovael %ecx, %esi movl %esi, %edx leal (%rdx,%rdx), %esi cmpl %eax, %edx jbe 0x45429 movq %r15, %rdi movq %rbx, %rsi callq 0x111d6 movl %eax, %ecx movl $0xffffffff, %eax # imm = 0xFFFFFFFF testl %ecx, %ecx jne 0x453f4 jmp 0x453bc
js_object_list_add: push r15 push r14 push rbx mov r14, rdx mov rbx, rsi mov r15, rdi mov r8d, [rsi+8] cmp [rsi+0Ch], r8d jle short loc_453FA loc_453AF: mov eax, [rbx+8] mov ecx, [rbx+18h] lea edx, [rax+1] cmp edx, ecx jnb short loc_4541E loc_453BC: mov rax, [rbx] movsxd rcx, dword ptr [rbx+8] lea edx, [rcx+1] mov [rbx+8], edx mov rdx, rcx shl rdx, 4 mov esi, [rbx+18h] dec esi imul edi, r14d, 0C5Bh and edi, esi mov [rax+rdx], r14 mov rsi, [rbx+10h] mov r8d, [rsi+rdi*4] mov [rax+rdx+8], r8d mov [rsi+rdi*4], ecx xor eax, eax loc_453F4: pop rbx pop r14 pop r15 retn loc_453FA: lea rcx, [rbx+0Ch] inc r8d mov rdi, r15 mov rsi, rbx mov edx, 10h call js_realloc_array mov ecx, eax mov eax, 0FFFFFFFFh test ecx, ecx jnz short loc_453F4 jmp short loc_453AF loc_4541E: cmp ecx, 5 mov esi, 4 cmovnb esi, ecx loc_45429: mov edx, esi lea esi, [rdx+rdx] cmp edx, eax jbe short loc_45429 mov rdi, r15 mov rsi, rbx call js_object_list_resize_hash mov ecx, eax mov eax, 0FFFFFFFFh test ecx, ecx jnz short loc_453F4 jmp loc_453BC
long long js_object_list_add(long long a1, long long a2, long long a3) { int v5; // r8d unsigned int v6; // eax unsigned int v7; // ecx long long v8; // rax long long v9; // rcx long long v10; // rdx long long v11; // rdi long long v12; // rsi long long result; // rax int v14; // ecx int v15; // esi unsigned int v16; // edx int v17; // ecx v5 = *(_DWORD *)(a2 + 8); if ( *(_DWORD *)(a2 + 12) > v5 || (v14 = js_realloc_array(a1, (long long *)a2, 0x10u, (_DWORD *)(a2 + 12), v5 + 1), result = 0xFFFFFFFFLL, !v14) ) { v6 = *(_DWORD *)(a2 + 8); v7 = *(_DWORD *)(a2 + 24); if ( v6 + 1 < v7 ) goto LABEL_3; v15 = 4; if ( v7 >= 5 ) v15 = v7; do { v16 = v15; v15 *= 2; } while ( v16 <= v6 ); v17 = js_object_list_resize_hash(a1, a2, v16); result = 0xFFFFFFFFLL; if ( !v17 ) { LABEL_3: v8 = *(_QWORD *)a2; v9 = *(int *)(a2 + 8); *(_DWORD *)(a2 + 8) = v9 + 1; v10 = 16 * v9; v11 = (*(_DWORD *)(a2 + 24) - 1) & (unsigned int)(3163 * a3); *(_QWORD *)(v8 + v10) = a3; v12 = *(_QWORD *)(a2 + 16); *(_DWORD *)(v8 + v10 + 8) = *(_DWORD *)(v12 + 4 * v11); *(_DWORD *)(v12 + 4 * v11) = v9; return 0LL; } } return result; }
js_object_list_add: PUSH R15 PUSH R14 PUSH RBX MOV R14,RDX MOV RBX,RSI MOV R15,RDI MOV R8D,dword ptr [RSI + 0x8] CMP dword ptr [RSI + 0xc],R8D JLE 0x001453fa LAB_001453af: MOV EAX,dword ptr [RBX + 0x8] MOV ECX,dword ptr [RBX + 0x18] LEA EDX,[RAX + 0x1] CMP EDX,ECX JNC 0x0014541e LAB_001453bc: MOV RAX,qword ptr [RBX] MOVSXD RCX,dword ptr [RBX + 0x8] LEA EDX,[RCX + 0x1] MOV dword ptr [RBX + 0x8],EDX MOV RDX,RCX SHL RDX,0x4 MOV ESI,dword ptr [RBX + 0x18] DEC ESI IMUL EDI,R14D,0xc5b AND EDI,ESI MOV qword ptr [RAX + RDX*0x1],R14 MOV RSI,qword ptr [RBX + 0x10] MOV R8D,dword ptr [RSI + RDI*0x4] MOV dword ptr [RAX + RDX*0x1 + 0x8],R8D MOV dword ptr [RSI + RDI*0x4],ECX XOR EAX,EAX LAB_001453f4: POP RBX POP R14 POP R15 RET LAB_001453fa: LEA RCX,[RBX + 0xc] INC R8D MOV RDI,R15 MOV RSI,RBX MOV EDX,0x10 CALL 0x001434ef MOV ECX,EAX MOV EAX,0xffffffff TEST ECX,ECX JNZ 0x001453f4 JMP 0x001453af LAB_0014541e: CMP ECX,0x5 MOV ESI,0x4 CMOVNC ESI,ECX LAB_00145429: MOV EDX,ESI LEA ESI,[RDX + RDX*0x1] CMP EDX,EAX JBE 0x00145429 MOV RDI,R15 MOV RSI,RBX CALL 0x001111d6 MOV ECX,EAX MOV EAX,0xffffffff TEST ECX,ECX JNZ 0x001453f4 JMP 0x001453bc
int8 js_object_list_add(int8 param_1,long *param_2,int8 param_3) { uint uVar1; long lVar2; long lVar3; bool bVar4; int iVar5; uint uVar6; ulong uVar7; if ((*(int *)((long)param_2 + 0xc) <= (int)param_2[1]) && (iVar5 = js_realloc_array(param_1,param_2,0x10,(long)param_2 + 0xc,(int)param_2[1] + 1), iVar5 != 0)) { return 0xffffffff; } uVar1 = *(uint *)(param_2 + 3); if (uVar1 <= *(uint *)(param_2 + 1) + 1) { uVar6 = 4; if (4 < uVar1) { uVar6 = uVar1; } do { bVar4 = uVar6 <= *(uint *)(param_2 + 1); uVar6 = uVar6 * 2; } while (bVar4); iVar5 = js_object_list_resize_hash(param_1,param_2); if (iVar5 != 0) { return 0xffffffff; } } lVar2 = *param_2; iVar5 = (int)param_2[1]; *(int *)(param_2 + 1) = iVar5 + 1; uVar7 = (ulong)((int)param_3 * 0xc5b & (int)param_2[3] - 1U); *(int8 *)(lVar2 + (long)iVar5 * 0x10) = param_3; lVar3 = param_2[2]; *(int4 *)(lVar2 + 8 + (long)iVar5 * 0x10) = *(int4 *)(lVar3 + uVar7 * 4); *(int *)(lVar3 + uVar7 * 4) = iVar5; return 0; }
40,632
initialize_bucket(st_lf_hash*, LF_SLIST**, unsigned int, LF_PINS*)
eloqsql/mysys/lf_hash.cc
static int initialize_bucket(LF_HASH *hash, LF_SLIST **node, uint bucket, LF_PINS *pins) { uint parent= my_clear_highest_bit(bucket); LF_SLIST *dummy= (LF_SLIST *)my_malloc(key_memory_lf_slist, sizeof(LF_SLIST), MYF(MY_WME)); LF_SLIST **tmp= 0, *cur; LF_SLIST **el= (LF_SLIST **)lf_dynarray_lvalue(&hash->array, parent); if (unlikely(!el || !dummy)) return -1; if (*el == NULL && bucket && unlikely(initialize_bucket(hash, el, parent, pins))) { my_free(dummy); return -1; } dummy->hashnr= my_reverse_bits(bucket) | 0; /* dummy node */ dummy->key= dummy_key; dummy->keylen= 0; if ((cur= l_insert(el, hash->charset, dummy, pins, LF_HASH_UNIQUE))) { my_free(dummy); dummy= cur; } my_atomic_casptr((void **)node, (void **)(char*) &tmp, dummy); /* note that if the CAS above failed (after l_insert() succeeded), it would mean that some other thread has executed l_insert() for the same dummy node, its l_insert() failed, it picked up our dummy node (in "dummy= cur") and executed the same CAS as above. Which means that even if CAS above failed we don't need to retry, and we should not free(dummy) - there's no memory leak here */ return 0; }
O0
cpp
initialize_bucket(st_lf_hash*, LF_SLIST**, unsigned int, LF_PINS*): pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq %rcx, -0x28(%rbp) movl -0x1c(%rbp), %edi callq 0x5e130 movl %eax, -0x2c(%rbp) leaq 0x3b1feb(%rip), %rax # 0x40fcb4 movl (%rax), %edi movl $0x20, %esi movl $0x10, %edx callq 0x59ed0 movq %rax, -0x38(%rbp) movq $0x0, -0x40(%rbp) movq -0x10(%rbp), %rdi movl -0x2c(%rbp), %esi callq 0x5d260 movq %rax, -0x50(%rbp) movb $0x1, %al cmpq $0x0, -0x50(%rbp) movb %al, -0x5a(%rbp) je 0x5dd0f cmpq $0x0, -0x38(%rbp) setne %al xorb $-0x1, %al movb %al, -0x5a(%rbp) movb -0x5a(%rbp), %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x5dd28 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x5de13 movq -0x50(%rbp), %rax cmpq $0x0, (%rax) jne 0x5dd66 cmpl $0x0, -0x1c(%rbp) je 0x5dd66 movq -0x10(%rbp), %rdi movq -0x50(%rbp), %rsi movl -0x2c(%rbp), %edx movq -0x28(%rbp), %rcx callq 0x5dca0 cmpl $0x0, %eax je 0x5dd66 movq -0x38(%rbp), %rdi callq 0x5a250 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x5de13 movl -0x1c(%rbp), %edi callq 0x5de20 movl %eax, %ecx orl $0x0, %ecx movq -0x38(%rbp), %rax movl %ecx, 0x18(%rax) movq 0x1b716f(%rip), %rcx # 0x214ef0 movq -0x38(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x38(%rbp), %rax movq $0x0, 0x10(%rax) movq -0x50(%rbp), %rdi movq -0x10(%rbp), %rax movq 0xa8(%rax), %rsi movq -0x38(%rbp), %rdx movq -0x28(%rbp), %rcx movl $0x1, %r8d callq 0x5dea0 movq %rax, -0x48(%rbp) cmpq $0x0, %rax je 0x5ddd2 movq -0x38(%rbp), %rdi callq 0x5a250 movq -0x48(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rcx movq -0x38(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x40(%rbp), %rax movq -0x58(%rbp), %rdx lock cmpxchgq %rdx, (%rcx) movq %rax, %rcx sete %al movb %al, -0x69(%rbp) movq %rcx, -0x68(%rbp) testb $0x1, %al jne 0x5de04 movq -0x68(%rbp), %rax movq %rax, -0x40(%rbp) movb -0x69(%rbp), %al andb $0x1, %al movb %al, -0x59(%rbp) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x70, %rsp popq %rbp retq nopl (%rax)
_ZL17initialize_bucketP10st_lf_hashPP8LF_SLISTjP7LF_PINS: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_28], rcx mov edi, [rbp+var_1C]; unsigned int call _ZL20my_clear_highest_bitj; my_clear_highest_bit(uint) mov [rbp+var_2C], eax lea rax, key_memory_lf_slist mov edi, [rax] mov esi, 20h ; ' ' mov edx, 10h call my_malloc mov [rbp+var_38], rax mov [rbp+var_40], 0 mov rdi, [rbp+var_10] mov esi, [rbp+var_2C] call lf_dynarray_lvalue mov [rbp+var_50], rax mov al, 1 cmp [rbp+var_50], 0 mov [rbp+var_5A], al jz short loc_5DD0F cmp [rbp+var_38], 0 setnz al xor al, 0FFh mov [rbp+var_5A], al loc_5DD0F: mov al, [rbp+var_5A] and al, 1 movzx eax, al cmp eax, 0 jz short loc_5DD28 mov [rbp+var_4], 0FFFFFFFFh jmp loc_5DE13 loc_5DD28: mov rax, [rbp+var_50] cmp qword ptr [rax], 0 jnz short loc_5DD66 cmp [rbp+var_1C], 0 jz short loc_5DD66 mov rdi, [rbp+var_10] mov rsi, [rbp+var_50] mov edx, [rbp+var_2C] mov rcx, [rbp+var_28] call _ZL17initialize_bucketP10st_lf_hashPP8LF_SLISTjP7LF_PINS; initialize_bucket(st_lf_hash *,LF_SLIST **,uint,LF_PINS *) cmp eax, 0 jz short loc_5DD66 mov rdi, [rbp+var_38] call my_free mov [rbp+var_4], 0FFFFFFFFh jmp loc_5DE13 loc_5DD66: mov edi, [rbp+var_1C]; unsigned int call _ZL15my_reverse_bitsj; my_reverse_bits(uint) mov ecx, eax or ecx, 0 mov rax, [rbp+var_38] mov [rax+18h], ecx mov rcx, cs:_ZL9dummy_key; dummy_key mov rax, [rbp+var_38] mov [rax+8], rcx mov rax, [rbp+var_38] mov qword ptr [rax+10h], 0 mov rdi, [rbp+var_50] mov rax, [rbp+var_10] mov rsi, [rax+0A8h] mov rdx, [rbp+var_38] mov rcx, [rbp+var_28] mov r8d, 1 call _ZL8l_insertPP8LF_SLISTPK15charset_info_stS0_P7LF_PINSj; l_insert(LF_SLIST **,charset_info_st const*,LF_SLIST *,LF_PINS *,uint) mov [rbp+var_48], rax cmp rax, 0 jz short loc_5DDD2 mov rdi, [rbp+var_38] call my_free mov rax, [rbp+var_48] mov [rbp+var_38], rax loc_5DDD2: mov rcx, [rbp+var_18] mov rax, [rbp+var_38] mov [rbp+var_58], rax mov rax, [rbp+var_40] mov rdx, [rbp+var_58] lock cmpxchg [rcx], rdx mov rcx, rax setz al mov [rbp+var_69], al mov [rbp+var_68], rcx test al, 1 jnz short loc_5DE04 mov rax, [rbp+var_68] mov [rbp+var_40], rax loc_5DE04: mov al, [rbp+var_69] and al, 1 mov [rbp+var_59], al mov [rbp+var_4], 0 loc_5DE13: mov eax, [rbp+var_4] add rsp, 70h pop rbp retn
long long initialize_bucket(long long a1, volatile signed long long *a2, unsigned int a3, long long a4) { char v5; // [rsp+16h] [rbp-5Ah] _QWORD *v6; // [rsp+20h] [rbp-50h] long long v7; // [rsp+28h] [rbp-48h] long long v8; // [rsp+38h] [rbp-38h] unsigned int v9; // [rsp+44h] [rbp-2Ch] v9 = my_clear_highest_bit(a3); v8 = my_malloc(key_memory_lf_slist, 0x20uLL, 16); v6 = (_QWORD *)lf_dynarray_lvalue(a1, v9); v5 = 1; if ( v6 ) v5 = ~(v8 != 0); if ( (v5 & 1) != 0 ) { return (unsigned int)-1; } else if ( !*v6 && a3 && (unsigned int)initialize_bucket(a1, v6, v9, a4) ) { my_free(v8); return (unsigned int)-1; } else { *(_DWORD *)(v8 + 24) = my_reverse_bits(a3); *(_QWORD *)(v8 + 8) = dummy_key; *(_QWORD *)(v8 + 16) = 0LL; v7 = l_insert(v6, *(_QWORD *)(a1 + 168), v8, a4, 1LL); if ( v7 ) { my_free(v8); v8 = v7; } _InterlockedCompareExchange64(a2, v8, 0LL); return 0; } }
initialize_bucket: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV qword ptr [RBP + -0x28],RCX MOV EDI,dword ptr [RBP + -0x1c] CALL 0x0015e130 MOV dword ptr [RBP + -0x2c],EAX LEA RAX,[0x50fcb4] MOV EDI,dword ptr [RAX] MOV ESI,0x20 MOV EDX,0x10 CALL 0x00159ed0 MOV qword ptr [RBP + -0x38],RAX MOV qword ptr [RBP + -0x40],0x0 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x2c] CALL 0x0015d260 MOV qword ptr [RBP + -0x50],RAX MOV AL,0x1 CMP qword ptr [RBP + -0x50],0x0 MOV byte ptr [RBP + -0x5a],AL JZ 0x0015dd0f CMP qword ptr [RBP + -0x38],0x0 SETNZ AL XOR AL,0xff MOV byte ptr [RBP + -0x5a],AL LAB_0015dd0f: MOV AL,byte ptr [RBP + -0x5a] AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x0015dd28 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0015de13 LAB_0015dd28: MOV RAX,qword ptr [RBP + -0x50] CMP qword ptr [RAX],0x0 JNZ 0x0015dd66 CMP dword ptr [RBP + -0x1c],0x0 JZ 0x0015dd66 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x50] MOV EDX,dword ptr [RBP + -0x2c] MOV RCX,qword ptr [RBP + -0x28] CALL 0x0015dca0 CMP EAX,0x0 JZ 0x0015dd66 MOV RDI,qword ptr [RBP + -0x38] CALL 0x0015a250 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0015de13 LAB_0015dd66: MOV EDI,dword ptr [RBP + -0x1c] CALL 0x0015de20 MOV ECX,EAX OR ECX,0x0 MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x18],ECX MOV RCX,qword ptr [0x00314ef0] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x10],0x0 MOV RDI,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0xa8] MOV RDX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x28] MOV R8D,0x1 CALL 0x0015dea0 MOV qword ptr [RBP + -0x48],RAX CMP RAX,0x0 JZ 0x0015ddd2 MOV RDI,qword ptr [RBP + -0x38] CALL 0x0015a250 MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x38],RAX LAB_0015ddd2: MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x58] CMPXCHG.LOCK qword ptr [RCX],RDX MOV RCX,RAX SETZ AL MOV byte ptr [RBP + -0x69],AL MOV qword ptr [RBP + -0x68],RCX TEST AL,0x1 JNZ 0x0015de04 MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x40],RAX LAB_0015de04: MOV AL,byte ptr [RBP + -0x69] AND AL,0x1 MOV byte ptr [RBP + -0x59],AL MOV dword ptr [RBP + -0x4],0x0 LAB_0015de13: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x70 POP RBP RET
/* initialize_bucket(st_lf_hash*, LF_SLIST**, unsigned int, LF_PINS*) */ int4 initialize_bucket(st_lf_hash *param_1,LF_SLIST **param_2,uint param_3,LF_PINS *param_4) { uint uVar1; int iVar2; int4 uVar3; LF_SLIST **ppLVar4; LF_SLIST *pLVar5; LF_SLIST *local_40; int4 local_c; uVar1 = my_clear_highest_bit(param_3); local_40 = (LF_SLIST *)my_malloc(key_memory_lf_slist,0x20,0x10); ppLVar4 = (LF_SLIST **)lf_dynarray_lvalue(param_1,uVar1); if (ppLVar4 == (LF_SLIST **)0x0 || local_40 == (LF_SLIST *)0x0) { local_c = 0xffffffff; } else if (((*ppLVar4 == (LF_SLIST *)0x0) && (param_3 != 0)) && (iVar2 = initialize_bucket(param_1,ppLVar4,uVar1,param_4), iVar2 != 0)) { my_free(local_40); local_c = 0xffffffff; } else { uVar3 = my_reverse_bits(param_3); *(int4 *)(local_40 + 0x18) = uVar3; *(int **)(local_40 + 8) = dummy_key; *(int8 *)(local_40 + 0x10) = 0; pLVar5 = (LF_SLIST *)l_insert(ppLVar4,*(charset_info_st **)(param_1 + 0xa8),local_40,param_4,1); if (pLVar5 != (LF_SLIST *)0x0) { my_free(local_40); local_40 = pLVar5; } LOCK(); if (*param_2 == (LF_SLIST *)0x0) { *param_2 = local_40; } UNLOCK(); local_c = 0; } return local_c; }
40,633
ma_writeinfo
eloqsql/storage/maria/ma_locking.c
int _ma_writeinfo(register MARIA_HA *info, uint operation) { int error,olderror; MARIA_SHARE *share= info->s; DBUG_ENTER("_ma_writeinfo"); DBUG_PRINT("info",("operation: %u tot_locks: %u", operation, share->tot_locks)); error=0; if (share->tot_locks == 0 && !share->base.born_transactional) { /* transactional tables flush their state at Checkpoint */ if (operation) { /* Two threads can't be here */ CRASH_IF_S3_TABLE(info->s); /* S3 readonly doesn't come here */ olderror= my_errno; /* Remember last error */ #ifdef MARIA_EXTERNAL_LOCKING /* The following only makes sense if we want to be allow two different processes access the same table at the same time */ share->state.process= share->last_process= share->this_process; share->state.unique= info->last_unique= info->this_unique; share->state.update_count= info->last_loop= ++info->this_loop; #endif if ((error= _ma_state_info_write_sub(share->kfile.file, &share->state, MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET))) olderror=my_errno; #ifdef _WIN32 if (maria_flush) { _commit(share->kfile.file); _commit(info->dfile.file); } #endif my_errno=olderror; } } else if (operation) share->changed= 1; /* Mark keyfile changed */ DBUG_RETURN(error); }
O0
c
ma_writeinfo: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) jmp 0x3700c movl $0x0, -0x10(%rbp) movq -0x20(%rbp), %rax cmpl $0x0, 0x7b8(%rax) jne 0x3707d movq -0x20(%rbp), %rax cmpb $0x0, 0x44c(%rax) jne 0x3707d cmpl $0x0, -0xc(%rbp) je 0x3707b jmp 0x37035 jmp 0x37037 callq 0xf7440 movl (%rax), %eax movl %eax, -0x14(%rbp) movq -0x20(%rbp), %rax movl 0x760(%rax), %edi movq -0x20(%rbp), %rsi movl $0x1, %edx callq 0x66a30 movl %eax, -0x10(%rbp) cmpl $0x0, %eax je 0x3706b callq 0xf7440 movl (%rax), %eax movl %eax, -0x14(%rbp) movl -0x14(%rbp), %eax movl %eax, -0x24(%rbp) callq 0xf7440 movl -0x24(%rbp), %ecx movl %ecx, (%rax) jmp 0x37090 cmpl $0x0, -0xc(%rbp) je 0x3708e movq -0x20(%rbp), %rax movb $0x1, 0x7de(%rax) jmp 0x37090 jmp 0x37092 movl -0x10(%rbp), %eax movl %eax, -0x28(%rbp) movl -0x28(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_writeinfo: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_20], rax jmp short $+2 loc_3700C: mov [rbp+var_10], 0 mov rax, [rbp+var_20] cmp dword ptr [rax+7B8h], 0 jnz short loc_3707D mov rax, [rbp+var_20] cmp byte ptr [rax+44Ch], 0 jnz short loc_3707D cmp [rbp+var_C], 0 jz short loc_3707B jmp short $+2 loc_37035: jmp short $+2 loc_37037: call _my_thread_var mov eax, [rax] mov [rbp+var_14], eax mov rax, [rbp+var_20] mov edi, [rax+760h] mov rsi, [rbp+var_20] mov edx, 1 call _ma_state_info_write_sub mov [rbp+var_10], eax cmp eax, 0 jz short loc_3706B call _my_thread_var mov eax, [rax] mov [rbp+var_14], eax loc_3706B: mov eax, [rbp+var_14] mov [rbp+var_24], eax call _my_thread_var mov ecx, [rbp+var_24] mov [rax], ecx loc_3707B: jmp short loc_37090 loc_3707D: cmp [rbp+var_C], 0 jz short loc_3708E mov rax, [rbp+var_20] mov byte ptr [rax+7DEh], 1 loc_3708E: jmp short $+2 loc_37090: jmp short $+2 loc_37092: mov eax, [rbp+var_10] mov [rbp+var_28], eax mov eax, [rbp+var_28] add rsp, 30h pop rbp retn
long long ma_writeinfo(long long *a1, int a2) { long long v3; // [rsp+10h] [rbp-20h] int v4; // [rsp+1Ch] [rbp-14h] unsigned int v5; // [rsp+20h] [rbp-10h] v3 = *a1; v5 = 0; if ( *(_DWORD *)(*a1 + 1976) || *(_BYTE *)(v3 + 1100) ) { if ( a2 ) *(_BYTE *)(v3 + 2014) = 1; } else if ( a2 ) { v4 = *(_DWORD *)my_thread_var(); v5 = ma_state_info_write_sub(*(unsigned int *)(v3 + 1888), v3, 1LL); if ( v5 ) v4 = *(_DWORD *)my_thread_var(); *(_DWORD *)my_thread_var() = v4; } return v5; }
_ma_writeinfo: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX JMP 0x0013700c LAB_0013700c: MOV dword ptr [RBP + -0x10],0x0 MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0x7b8],0x0 JNZ 0x0013707d MOV RAX,qword ptr [RBP + -0x20] CMP byte ptr [RAX + 0x44c],0x0 JNZ 0x0013707d CMP dword ptr [RBP + -0xc],0x0 JZ 0x0013707b JMP 0x00137035 LAB_00137035: JMP 0x00137037 LAB_00137037: CALL 0x001f7440 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x14],EAX MOV RAX,qword ptr [RBP + -0x20] MOV EDI,dword ptr [RAX + 0x760] MOV RSI,qword ptr [RBP + -0x20] MOV EDX,0x1 CALL 0x00166a30 MOV dword ptr [RBP + -0x10],EAX CMP EAX,0x0 JZ 0x0013706b CALL 0x001f7440 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x14],EAX LAB_0013706b: MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x24],EAX CALL 0x001f7440 MOV ECX,dword ptr [RBP + -0x24] MOV dword ptr [RAX],ECX LAB_0013707b: JMP 0x00137090 LAB_0013707d: CMP dword ptr [RBP + -0xc],0x0 JZ 0x0013708e MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x7de],0x1 LAB_0013708e: JMP 0x00137090 LAB_00137090: JMP 0x00137092 LAB_00137092: MOV EAX,dword ptr [RBP + -0x10] MOV dword ptr [RBP + -0x28],EAX MOV EAX,dword ptr [RBP + -0x28] ADD RSP,0x30 POP RBP RET
int _ma_writeinfo(long *param_1,int param_2) { long lVar1; int4 *puVar2; int4 local_1c; int4 local_18; lVar1 = *param_1; local_18 = 0; if ((*(int *)(lVar1 + 0x7b8) == 0) && (*(char *)(lVar1 + 0x44c) == '\0')) { if (param_2 != 0) { puVar2 = (int4 *)_my_thread_var(); local_1c = *puVar2; local_18 = _ma_state_info_write_sub(*(int4 *)(lVar1 + 0x760),lVar1,1); if (local_18 != 0) { puVar2 = (int4 *)_my_thread_var(); local_1c = *puVar2; } puVar2 = (int4 *)_my_thread_var(); *puVar2 = local_1c; } } else if (param_2 != 0) { *(int1 *)(lVar1 + 0x7de) = 1; } return local_18; }
40,634
vec_xor
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/hash_to_field.c
static void vec_xor(void *restrict ret, const void *restrict a, const void *restrict b, size_t num) { limb_t *rp = (limb_t *)ret; const limb_t *ap = (const limb_t *)a; const limb_t *bp = (const limb_t *)b; size_t i; num /= sizeof(limb_t); for (i = 0; i < num; i++) rp[i] = ap[i] ^ bp[i]; }
O0
c
vec_xor: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rax shrq $0x3, %rax movq %rax, -0x20(%rbp) movq $0x0, -0x40(%rbp) movq -0x40(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0x32e8c movq -0x30(%rbp), %rax movq -0x40(%rbp), %rcx movq (%rax,%rcx,8), %rdx movq -0x38(%rbp), %rax movq -0x40(%rbp), %rcx xorq (%rax,%rcx,8), %rdx movq -0x28(%rbp), %rax movq -0x40(%rbp), %rcx movq %rdx, (%rax,%rcx,8) movq -0x40(%rbp), %rax addq $0x1, %rax movq %rax, -0x40(%rbp) jmp 0x32e50 popq %rbp retq nop
vec_xor: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_8] mov [rbp+var_28], rax mov rax, [rbp+var_10] mov [rbp+var_30], rax mov rax, [rbp+var_18] mov [rbp+var_38], rax mov rax, [rbp+var_20] shr rax, 3 mov [rbp+var_20], rax mov [rbp+var_40], 0 loc_32E50: mov rax, [rbp+var_40] cmp rax, [rbp+var_20] jnb short loc_32E8C mov rax, [rbp+var_30] mov rcx, [rbp+var_40] mov rdx, [rax+rcx*8] mov rax, [rbp+var_38] mov rcx, [rbp+var_40] xor rdx, [rax+rcx*8] mov rax, [rbp+var_28] mov rcx, [rbp+var_40] mov [rax+rcx*8], rdx mov rax, [rbp+var_40] add rax, 1 mov [rbp+var_40], rax jmp short loc_32E50 loc_32E8C: pop rbp retn
unsigned long long vec_xor(long long a1, long long a2, long long a3, unsigned long long a4) { unsigned long long result; // rax unsigned long long i; // [rsp+0h] [rbp-40h] for ( i = 0LL; ; ++i ) { result = i; if ( i >= a4 >> 3 ) break; *(_QWORD *)(a1 + 8 * i) = *(_QWORD *)(a3 + 8 * i) ^ *(_QWORD *)(a2 + 8 * i); } return result; }
vec_xor: PUSH RBP MOV RBP,RSP 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 + -0x8] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x20] SHR RAX,0x3 MOV qword ptr [RBP + -0x20],RAX MOV qword ptr [RBP + -0x40],0x0 LAB_00132e50: MOV RAX,qword ptr [RBP + -0x40] CMP RAX,qword ptr [RBP + -0x20] JNC 0x00132e8c MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x40] XOR RDX,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x40] MOV qword ptr [RAX + RCX*0x8],RDX MOV RAX,qword ptr [RBP + -0x40] ADD RAX,0x1 MOV qword ptr [RBP + -0x40],RAX JMP 0x00132e50 LAB_00132e8c: POP RBP RET
void vec_xor(long param_1,long param_2,long param_3,ulong param_4) { int8 local_48; for (local_48 = 0; local_48 < param_4 >> 3; local_48 = local_48 + 1) { *(ulong *)(param_1 + local_48 * 8) = *(ulong *)(param_2 + local_48 * 8) ^ *(ulong *)(param_3 + local_48 * 8); } return; }
40,635
bool chess::movegen::isEpSquareValid<(chess::Color::underlying)0>(chess::Board const&, chess::Square)
Razamindset[P]pawnstar-chess-engine/src/./engine/../chess-library/include/chess.hpp
inline bool movegen::isEpSquareValid(const Board &board, Square ep) { const auto stm = board.sideToMove(); Bitboard occ_us = board.us(stm); Bitboard occ_opp = board.us(~stm); auto king_sq = board.kingSq(stm); const auto [checkmask, checks] = movegen::checkMask<c>(board, king_sq); const auto pin_hv = movegen::pinMaskRooks<c>(board, king_sq, occ_opp, occ_us); const auto pin_d = movegen::pinMaskBishops<c>(board, king_sq, occ_opp, occ_us); const auto pawns = board.pieces(PieceType::PAWN, stm); const auto pawns_lr = pawns & ~pin_hv; const auto m = movegen::generateEPMove(board, checkmask, pin_d, pawns_lr, ep, stm); bool found = false; for (const auto &move : m) { if (move != Move::NO_MOVE) { found = true; break; } } return found; }
O0
cpp
bool chess::movegen::isEpSquareValid<(chess::Color::underlying)0>(chess::Board const&, chess::Square): pushq %rbp movq %rsp, %rbp subq $0x140, %rsp # imm = 0x140 movl %esi, -0x4(%rbp) movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi callq 0xa770 movb %al, -0x11(%rbp) movq -0x10(%rbp), %rdi movb -0x11(%rbp), %al movb %al, -0x21(%rbp) movzbl -0x21(%rbp), %esi callq 0xa790 movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x138(%rbp) leaq -0x11(%rbp), %rdi callq 0xa7e0 movq -0x138(%rbp), %rdi movb %al, -0x31(%rbp) movzbl -0x31(%rbp), %esi callq 0xa790 movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rdi movb -0x11(%rbp), %al movb %al, -0x39(%rbp) movzbl -0x39(%rbp), %esi callq 0x8140 movl %eax, -0x38(%rbp) movq -0x10(%rbp), %rdi movl -0x38(%rbp), %eax movl %eax, -0x54(%rbp) movl -0x54(%rbp), %esi callq 0xbd40 movl %edx, -0x60(%rbp) movq %rax, -0x68(%rbp) movq -0x68(%rbp), %rax movq %rax, -0x50(%rbp) movl -0x60(%rbp), %eax movl %eax, -0x48(%rbp) leaq -0x50(%rbp), %rdi callq 0xacd0 movq %rax, -0x70(%rbp) leaq -0x50(%rbp), %rdi callq 0xacf0 movq %rax, -0x78(%rbp) movq -0x10(%rbp), %rdi movl -0x38(%rbp), %eax movl %eax, -0x84(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x90(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x98(%rbp) movl -0x84(%rbp), %esi movq -0x90(%rbp), %rdx movq -0x98(%rbp), %rcx callq 0xc200 movq %rax, -0x80(%rbp) movq -0x10(%rbp), %rdi movl -0x38(%rbp), %eax movl %eax, -0xa4(%rbp) movq -0x30(%rbp), %rax movq %rax, -0xb0(%rbp) movq -0x20(%rbp), %rax movq %rax, -0xb8(%rbp) movl -0xa4(%rbp), %esi movq -0xb0(%rbp), %rdx movq -0xb8(%rbp), %rcx callq 0xc3b0 movq %rax, -0xa0(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x130(%rbp) leaq -0xc1(%rbp), %rdi xorl %esi, %esi callq 0xa0b0 movq -0x130(%rbp), %rdi movb -0x11(%rbp), %al movb %al, -0xc2(%rbp) movb -0xc1(%rbp), %al movzbl %al, %esi movzbl -0xc2(%rbp), %edx callq 0xa280 movq %rax, -0xc0(%rbp) leaq -0x80(%rbp), %rdi callq 0x4c10 movq %rax, -0xd8(%rbp) leaq -0xc0(%rbp), %rdi leaq -0xd8(%rbp), %rsi callq 0x4b90 movq %rax, -0xd0(%rbp) movq -0x10(%rbp), %rdi movq -0x70(%rbp), %rax movq (%rax), %rax movq %rax, -0xe8(%rbp) movq -0xa0(%rbp), %rax movq %rax, -0xf0(%rbp) movq -0xd0(%rbp), %rax movq %rax, -0xf8(%rbp) movl -0x4(%rbp), %eax movl %eax, -0xfc(%rbp) movb -0x11(%rbp), %al movb %al, -0xfd(%rbp) movq -0xe8(%rbp), %rsi movq -0xf0(%rbp), %rdx movq -0xf8(%rbp), %rcx movl -0xfc(%rbp), %r8d movzbl -0xfd(%rbp), %r9d callq 0xb070 movq %rax, -0xe0(%rbp) movb $0x0, -0xfe(%rbp) leaq -0xe0(%rbp), %rax movq %rax, -0x108(%rbp) movq -0x108(%rbp), %rdi callq 0xb620 movq %rax, -0x110(%rbp) movq -0x108(%rbp), %rdi callq 0xb640 movq %rax, -0x118(%rbp) movq -0x110(%rbp), %rax cmpq -0x118(%rbp), %rax je 0x8a86 movq -0x110(%rbp), %rax movq %rax, -0x120(%rbp) movq -0x120(%rbp), %rax movq %rax, -0x140(%rbp) leaq -0x124(%rbp), %rdi xorl %esi, %esi callq 0xb690 movq -0x140(%rbp), %rdi leaq -0x124(%rbp), %rsi callq 0xb660 testb $0x1, %al jne 0x8a67 jmp 0x8a70 movb $0x1, -0xfe(%rbp) jmp 0x8a86 jmp 0x8a72 movq -0x110(%rbp), %rax addq $0x4, %rax movq %rax, -0x110(%rbp) jmp 0x8a14 movb -0xfe(%rbp), %al andb $0x1, %al addq $0x140, %rsp # imm = 0x140 popq %rbp retq nopw (%rax,%rax)
_ZN5chess7movegen15isEpSquareValidILNS_5Color10underlyingE1EEEbRKNS_5BoardENS_6SquareE: push rbp mov rbp, rsp sub rsp, 140h mov [rbp+var_4], esi mov [rbp+var_10], rdi mov rdi, [rbp+var_10]; this call _ZNK5chess5Board10sideToMoveEv; chess::Board::sideToMove(void) mov [rbp+var_11], al mov rdi, [rbp+var_10] mov al, [rbp+var_11] mov [rbp+var_21], al movzx esi, [rbp+var_21] call _ZNK5chess5Board2usENS_5ColorE; chess::Board::us(chess::Color) mov [rbp+var_20], rax mov rax, [rbp+var_10] mov [rbp+var_138], rax lea rdi, [rbp+var_11] call _ZNK5chess5ColorcoEv; chess::Color::operator~(void) mov rdi, [rbp+var_138] mov [rbp+var_31], al movzx esi, [rbp+var_31] call _ZNK5chess5Board2usENS_5ColorE; chess::Board::us(chess::Color) mov [rbp+var_30], rax mov rdi, [rbp+var_10] mov al, [rbp+var_11] mov [rbp+var_39], al movzx esi, [rbp+var_39] call _ZNK5chess5Board6kingSqENS_5ColorE; chess::Board::kingSq(chess::Color) mov [rbp+var_38], eax mov rdi, [rbp+var_10] mov eax, [rbp+var_38] mov [rbp+var_54], eax mov esi, [rbp+var_54] call _ZN5chess7movegen9checkMaskILNS_5Color10underlyingE1EEESt4pairINS_8BitboardEiERKNS_5BoardENS_6SquareE; chess::movegen::checkMask<(chess::Color::underlying)1>(chess::Board const&,chess::Square) mov [rbp+var_60], edx mov [rbp+var_68], rax mov rax, [rbp+var_68] mov [rbp+var_50], rax mov eax, [rbp+var_60] mov [rbp+var_48], eax lea rdi, [rbp+var_50] call _ZSt3getILm0EN5chess8BitboardEiEOKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOKS6_; std::get<0ul,chess::Bitboard,int>(std::pair<chess::Bitboard,int> const&&) mov [rbp+var_70], rax lea rdi, [rbp+var_50] call _ZSt3getILm1EN5chess8BitboardEiEOKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeEOKS6_; std::get<1ul,chess::Bitboard,int>(std::pair<chess::Bitboard,int> const&&) mov [rbp+var_78], rax mov rdi, [rbp+var_10] mov eax, [rbp+var_38] mov [rbp+var_84], eax mov rax, [rbp+var_30] mov [rbp+var_90], rax mov rax, [rbp+var_20] mov [rbp+var_98], rax mov esi, [rbp+var_84] mov rdx, [rbp+var_90] mov rcx, [rbp+var_98] call _ZN5chess7movegen12pinMaskRooksILNS_5Color10underlyingE1EEENS_8BitboardERKNS_5BoardENS_6SquareES4_S4_; chess::movegen::pinMaskRooks<(chess::Color::underlying)1>(chess::Board const&,chess::Square,chess::Bitboard,chess::Bitboard) mov [rbp+var_80], rax mov rdi, [rbp+var_10] mov eax, [rbp+var_38] mov [rbp+var_A4], eax mov rax, [rbp+var_30] mov [rbp+var_B0], rax mov rax, [rbp+var_20] mov [rbp+var_B8], rax mov esi, [rbp+var_A4] mov rdx, [rbp+var_B0] mov rcx, [rbp+var_B8] call _ZN5chess7movegen14pinMaskBishopsILNS_5Color10underlyingE1EEENS_8BitboardERKNS_5BoardENS_6SquareES4_S4_; chess::movegen::pinMaskBishops<(chess::Color::underlying)1>(chess::Board const&,chess::Square,chess::Bitboard,chess::Bitboard) mov [rbp+var_A0], rax mov rax, [rbp+var_10] mov [rbp+var_130], rax lea rdi, [rbp+var_C1] xor esi, esi call _ZN5chess9PieceTypeC2ENS0_10underlyingE; chess::PieceType::PieceType(chess::PieceType::underlying) mov rdi, [rbp+var_130] mov al, [rbp+var_11] mov [rbp+var_C2], al mov al, [rbp+var_C1] movzx esi, al movzx edx, [rbp+var_C2] call _ZNK5chess5Board6piecesENS_9PieceTypeENS_5ColorE; chess::Board::pieces(chess::PieceType,chess::Color) mov [rbp+var_C0], rax lea rdi, [rbp+var_80] call _ZNK5chess8BitboardcoEv; chess::Bitboard::operator~(void) mov [rbp+var_D8], rax lea rdi, [rbp+var_C0] lea rsi, [rbp+var_D8] call _ZNK5chess8BitboardanERKS0_; chess::Bitboard::operator&(chess::Bitboard const&) mov [rbp+var_D0], rax mov rdi, [rbp+var_10] mov rax, [rbp+var_70] mov rax, [rax] mov [rbp+var_E8], rax mov rax, [rbp+var_A0] mov [rbp+var_F0], rax mov rax, [rbp+var_D0] mov [rbp+var_F8], rax mov eax, [rbp+var_4] mov [rbp+var_FC], eax mov al, [rbp+var_11] mov [rbp+var_FD], al mov rsi, [rbp+var_E8] mov rdx, [rbp+var_F0] mov rcx, [rbp+var_F8] mov r8d, [rbp+var_FC] movzx r9d, [rbp+var_FD] call _ZN5chess7movegen14generateEPMoveERKNS_5BoardENS_8BitboardES4_S4_NS_6SquareENS_5ColorE; chess::movegen::generateEPMove(chess::Board const&,chess::Bitboard,chess::Bitboard,chess::Bitboard,chess::Square,chess::Color) mov [rbp+var_E0], rax mov [rbp+var_FE], 0 lea rax, [rbp+var_E0] mov [rbp+var_108], rax mov rdi, [rbp+var_108] call _ZNKSt5arrayIN5chess4MoveELm2EE5beginEv; std::array<chess::Move,2ul>::begin(void) mov [rbp+var_110], rax mov rdi, [rbp+var_108] call _ZNKSt5arrayIN5chess4MoveELm2EE3endEv; std::array<chess::Move,2ul>::end(void) mov [rbp+var_118], rax loc_8A14: mov rax, [rbp+var_110] cmp rax, [rbp+var_118] jz short loc_8A86 mov rax, [rbp+var_110] mov [rbp+var_120], rax mov rax, [rbp+var_120] mov [rbp+var_140], rax lea rdi, [rbp+var_124]; this xor esi, esi; unsigned __int16 call _ZN5chess4MoveC2Et; chess::Move::Move(ushort) mov rdi, [rbp+var_140] lea rsi, [rbp+var_124] call _ZNK5chess4MoveneERKS0_; chess::Move::operator!=(chess::Move const&) test al, 1 jnz short loc_8A67 jmp short loc_8A70 loc_8A67: mov [rbp+var_FE], 1 jmp short loc_8A86 loc_8A70: jmp short $+2 loc_8A72: mov rax, [rbp+var_110] add rax, 4 mov [rbp+var_110], rax jmp short loc_8A14 loc_8A86: mov al, [rbp+var_FE] and al, 1 add rsp, 140h pop rbp retn
char chess::movegen::isEpSquareValid<(chess::Color::underlying)1>(chess::Board *a1, unsigned int a2) { long long v2; // rax int v3; // edx long long v5; // [rsp+0h] [rbp-140h] chess::Board *v6; // [rsp+10h] [rbp-130h] _BYTE v7[4]; // [rsp+1Ch] [rbp-124h] BYREF long long v8; // [rsp+20h] [rbp-120h] long long v9; // [rsp+28h] [rbp-118h] long long v10; // [rsp+30h] [rbp-110h] long long *p_EPMove; // [rsp+38h] [rbp-108h] char v12; // [rsp+42h] [rbp-FEh] unsigned __int8 v13; // [rsp+43h] [rbp-FDh] unsigned int v14; // [rsp+44h] [rbp-FCh] long long v15; // [rsp+48h] [rbp-F8h] long long v16; // [rsp+50h] [rbp-F0h] long long v17; // [rsp+58h] [rbp-E8h] long long EPMove; // [rsp+60h] [rbp-E0h] BYREF long long v19; // [rsp+68h] [rbp-D8h] BYREF long long v20; // [rsp+70h] [rbp-D0h] unsigned __int8 v21; // [rsp+7Eh] [rbp-C2h] unsigned __int8 v22; // [rsp+7Fh] [rbp-C1h] BYREF _QWORD v23[3]; // [rsp+80h] [rbp-C0h] BYREF unsigned int v24; // [rsp+9Ch] [rbp-A4h] long long v25; // [rsp+A0h] [rbp-A0h] long long v26; // [rsp+A8h] [rbp-98h] long long v27; // [rsp+B0h] [rbp-90h] unsigned int v28; // [rsp+BCh] [rbp-84h] _QWORD v29[2]; // [rsp+C0h] [rbp-80h] BYREF long long *v30; // [rsp+D0h] [rbp-70h] long long v31; // [rsp+D8h] [rbp-68h] int v32; // [rsp+E0h] [rbp-60h] unsigned int v33; // [rsp+ECh] [rbp-54h] long long v34; // [rsp+F0h] [rbp-50h] BYREF int v35; // [rsp+F8h] [rbp-48h] unsigned __int8 v36; // [rsp+107h] [rbp-39h] unsigned int v37; // [rsp+108h] [rbp-38h] unsigned __int8 v38; // [rsp+10Fh] [rbp-31h] long long v39; // [rsp+110h] [rbp-30h] unsigned __int8 v40; // [rsp+11Fh] [rbp-21h] long long v41; // [rsp+120h] [rbp-20h] unsigned __int8 v42; // [rsp+12Fh] [rbp-11h] BYREF chess::Board *v43; // [rsp+130h] [rbp-10h] unsigned int v44; // [rsp+13Ch] [rbp-4h] v44 = a2; v43 = a1; v42 = chess::Board::sideToMove(a1); v40 = v42; v41 = chess::Board::us(a1, v42); v38 = chess::Color::operator~(&v42); v39 = chess::Board::us(a1, v38); v36 = v42; v37 = chess::Board::kingSq((long long)v43, v42); v33 = v37; v2 = chess::movegen::checkMask<(chess::Color::underlying)1>(v43, v37); v32 = v3; v31 = v2; v34 = v2; v35 = v3; v30 = (long long *)std::get<0ul,chess::Bitboard,int>(&v34); v29[1] = std::get<1ul,chess::Bitboard,int>(&v34); v28 = v37; v27 = v39; v26 = v41; v29[0] = chess::movegen::pinMaskRooks<(chess::Color::underlying)1>(v43, v37, v39, v41); v24 = v37; v23[2] = v39; v23[1] = v41; v25 = chess::movegen::pinMaskBishops<(chess::Color::underlying)1>(v43, v37, v39, v41); v6 = v43; chess::PieceType::PieceType(&v22, 0LL); v21 = v42; v23[0] = chess::Board::pieces(v6, v22, v42); v19 = chess::Bitboard::operator~(v29); v20 = chess::Bitboard::operator&(v23, &v19); v17 = *v30; v16 = v25; v15 = v20; v14 = v44; v13 = v42; EPMove = chess::movegen::generateEPMove(v43, v17, v25, v20, v44, v42); v12 = 0; p_EPMove = &EPMove; v10 = std::array<chess::Move,2ul>::begin(&EPMove); v9 = std::array<chess::Move,2ul>::end(&EPMove); while ( v10 != v9 ) { v8 = v10; v5 = v10; chess::Move::Move((chess::Move *)v7, 0); if ( (chess::Move::operator!=(v5, v7) & 1) != 0 ) { v12 = 1; return v12 & 1; } v10 += 4LL; } return v12 & 1; }
isEpSquareValid<(chess::Color::underlying)1>: PUSH RBP MOV RBP,RSP SUB RSP,0x140 MOV dword ptr [RBP + -0x4],ESI MOV qword ptr [RBP + -0x10],RDI MOV RDI,qword ptr [RBP + -0x10] CALL 0x0010a770 MOV byte ptr [RBP + -0x11],AL MOV RDI,qword ptr [RBP + -0x10] MOV AL,byte ptr [RBP + -0x11] MOV byte ptr [RBP + -0x21],AL MOVZX ESI,byte ptr [RBP + -0x21] CALL 0x0010a790 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x138],RAX LEA RDI,[RBP + -0x11] CALL 0x0010a7e0 MOV RDI,qword ptr [RBP + -0x138] MOV byte ptr [RBP + -0x31],AL MOVZX ESI,byte ptr [RBP + -0x31] CALL 0x0010a790 MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x10] MOV AL,byte ptr [RBP + -0x11] MOV byte ptr [RBP + -0x39],AL MOVZX ESI,byte ptr [RBP + -0x39] CALL 0x00108140 MOV dword ptr [RBP + -0x38],EAX MOV RDI,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RBP + -0x38] MOV dword ptr [RBP + -0x54],EAX MOV ESI,dword ptr [RBP + -0x54] CALL 0x0010bd40 MOV dword ptr [RBP + -0x60],EDX MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x50],RAX MOV EAX,dword ptr [RBP + -0x60] MOV dword ptr [RBP + -0x48],EAX LEA RDI,[RBP + -0x50] CALL 0x0010acd0 MOV qword ptr [RBP + -0x70],RAX LEA RDI,[RBP + -0x50] CALL 0x0010acf0 MOV qword ptr [RBP + -0x78],RAX MOV RDI,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RBP + -0x38] MOV dword ptr [RBP + -0x84],EAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x90],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x98],RAX MOV ESI,dword ptr [RBP + -0x84] MOV RDX,qword ptr [RBP + -0x90] MOV RCX,qword ptr [RBP + -0x98] CALL 0x0010c200 MOV qword ptr [RBP + -0x80],RAX MOV RDI,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RBP + -0x38] MOV dword ptr [RBP + -0xa4],EAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0xb0],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0xb8],RAX MOV ESI,dword ptr [RBP + -0xa4] MOV RDX,qword ptr [RBP + -0xb0] MOV RCX,qword ptr [RBP + -0xb8] CALL 0x0010c3b0 MOV qword ptr [RBP + -0xa0],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x130],RAX LEA RDI,[RBP + -0xc1] XOR ESI,ESI CALL 0x0010a0b0 MOV RDI,qword ptr [RBP + -0x130] MOV AL,byte ptr [RBP + -0x11] MOV byte ptr [RBP + -0xc2],AL MOV AL,byte ptr [RBP + -0xc1] MOVZX ESI,AL MOVZX EDX,byte ptr [RBP + -0xc2] CALL 0x0010a280 MOV qword ptr [RBP + -0xc0],RAX LEA RDI,[RBP + -0x80] CALL 0x00104c10 MOV qword ptr [RBP + -0xd8],RAX LEA RDI,[RBP + -0xc0] LEA RSI,[RBP + -0xd8] CALL 0x00104b90 MOV qword ptr [RBP + -0xd0],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0xe8],RAX MOV RAX,qword ptr [RBP + -0xa0] MOV qword ptr [RBP + -0xf0],RAX MOV RAX,qword ptr [RBP + -0xd0] MOV qword ptr [RBP + -0xf8],RAX MOV EAX,dword ptr [RBP + -0x4] MOV dword ptr [RBP + -0xfc],EAX MOV AL,byte ptr [RBP + -0x11] MOV byte ptr [RBP + -0xfd],AL MOV RSI,qword ptr [RBP + -0xe8] MOV RDX,qword ptr [RBP + -0xf0] MOV RCX,qword ptr [RBP + -0xf8] MOV R8D,dword ptr [RBP + -0xfc] MOVZX R9D,byte ptr [RBP + -0xfd] CALL 0x0010b070 MOV qword ptr [RBP + -0xe0],RAX MOV byte ptr [RBP + -0xfe],0x0 LEA RAX,[RBP + -0xe0] MOV qword ptr [RBP + -0x108],RAX MOV RDI,qword ptr [RBP + -0x108] CALL 0x0010b620 MOV qword ptr [RBP + -0x110],RAX MOV RDI,qword ptr [RBP + -0x108] CALL 0x0010b640 MOV qword ptr [RBP + -0x118],RAX LAB_00108a14: MOV RAX,qword ptr [RBP + -0x110] CMP RAX,qword ptr [RBP + -0x118] JZ 0x00108a86 MOV RAX,qword ptr [RBP + -0x110] MOV qword ptr [RBP + -0x120],RAX MOV RAX,qword ptr [RBP + -0x120] MOV qword ptr [RBP + -0x140],RAX LEA RDI,[RBP + -0x124] XOR ESI,ESI CALL 0x0010b690 MOV RDI,qword ptr [RBP + -0x140] LEA RSI,[RBP + -0x124] CALL 0x0010b660 TEST AL,0x1 JNZ 0x00108a67 JMP 0x00108a70 LAB_00108a67: MOV byte ptr [RBP + -0xfe],0x1 JMP 0x00108a86 LAB_00108a70: JMP 0x00108a72 LAB_00108a72: MOV RAX,qword ptr [RBP + -0x110] ADD RAX,0x4 MOV qword ptr [RBP + -0x110],RAX JMP 0x00108a14 LAB_00108a86: MOV AL,byte ptr [RBP + -0xfe] AND AL,0x1 ADD RSP,0x140 POP RBP RET
/* bool chess::movegen::isEpSquareValid<(chess::Color::underlying)1>(chess::Board const&, chess::Square) */ bool chess::movegen::isEpSquareValid<(chess::Color::underlying)1>(Board *param_1,int4 param_2) { Move *this; Board *pBVar1; ulong uVar2; Move local_12c [4]; Move *local_128; Move *local_120; Move *local_118; array<chess::Move,2ul> *local_110; byte local_106; Color local_105; int4 local_104; int8 local_100; int8 local_f8; int8 local_f0; int8 local_e8; int8 local_e0; int8 local_d8; Color local_ca; PieceType local_c9; int8 local_c8; int8 local_c0; int8 local_b8; int4 local_ac; int8 local_a8; int8 local_a0; int8 local_98; int4 local_8c; int8 local_88; type *local_80; type *local_78; int1 local_70 [12]; int4 local_5c; int1 local_58 [12]; Color local_41; int4 local_40; int1 local_39; int8 local_38; Color local_29; int8 local_28; Color local_19; Board *local_18; int4 local_c; local_18 = param_1; local_c = param_2; local_29 = (Color)Board::sideToMove(param_1); local_19 = local_29; local_28 = Board::us(local_18,local_29); pBVar1 = local_18; local_39 = Color::operator~(&local_19); local_38 = Board::us(pBVar1,local_39); local_41 = local_19; local_5c = Board::kingSq(local_18,local_19); local_40 = local_5c; local_70 = checkMask<(chess::Color::underlying)1>(local_18,local_5c); local_58 = local_70; local_78 = std::get<0ul,chess::Bitboard,int>(local_58); local_80 = std::get<1ul,chess::Bitboard,int>(local_58); local_8c = local_40; local_98 = local_38; local_a0 = local_28; local_88 = pinMaskRooks<(chess::Color::underlying)1>(local_18,local_40,local_38,local_28); local_ac = local_40; local_b8 = local_38; local_c0 = local_28; local_a8 = pinMaskBishops<(chess::Color::underlying)1>(local_18,local_40,local_38,local_28); pBVar1 = local_18; PieceType::PieceType(&local_c9,0); local_ca = local_19; local_c8 = Board::pieces(pBVar1,local_c9,local_19); local_e0 = Bitboard::operator~((Bitboard *)&local_88); local_100 = Bitboard::operator&((Bitboard *)&local_c8,(Bitboard *)&local_e0); local_f0 = *(int8 *)local_78; local_f8 = local_a8; local_104 = local_c; local_105 = local_19; local_d8 = local_100; local_e8 = generateEPMove(local_18,local_f0,local_a8,local_100,local_c,local_19); local_106 = 0; local_110 = (array<chess::Move,2ul> *)&local_e8; local_118 = (Move *)std::array<chess::Move,2ul>::begin(local_110); local_120 = (Move *)std::array<chess::Move,2ul>::end(local_110); do { this = local_118; if (local_118 == local_120) { LAB_00108a86: return (bool)(local_106 & 1); } local_128 = local_118; Move::Move(local_12c,0); uVar2 = Move::operator!=(this,local_12c); if ((uVar2 & 1) != 0) { local_106 = 1; goto LAB_00108a86; } local_118 = local_118 + 4; } while( true ); }
40,636
Test_SafeFNMatch_logging::Test_SafeFNMatch_logging()
ng-log[P]ng-log/src/logging_unittest.cc
TEST(SafeFNMatch, logging) { CHECK(WrapSafeFNMatch("foo", "foo")); CHECK(!WrapSafeFNMatch("foo", "bar")); CHECK(!WrapSafeFNMatch("foo", "fo")); CHECK(!WrapSafeFNMatch("foo", "foo2")); CHECK(WrapSafeFNMatch("bar/foo.ext", "bar/foo.ext")); CHECK(WrapSafeFNMatch("*ba*r/fo*o.ext*", "bar/foo.ext")); CHECK(!WrapSafeFNMatch("bar/foo.ext", "bar/baz.ext")); CHECK(!WrapSafeFNMatch("bar/foo.ext", "bar/foo")); CHECK(!WrapSafeFNMatch("bar/foo.ext", "bar/foo.ext.zip")); CHECK(WrapSafeFNMatch("ba?/*.ext", "bar/foo.ext")); CHECK(WrapSafeFNMatch("ba?/*.ext", "baZ/FOO.ext")); CHECK(!WrapSafeFNMatch("ba?/*.ext", "barr/foo.ext")); CHECK(!WrapSafeFNMatch("ba?/*.ext", "bar/foo.ext2")); CHECK(WrapSafeFNMatch("ba?/*", "bar/foo.ext2")); CHECK(WrapSafeFNMatch("ba?/*", "bar/")); CHECK(!WrapSafeFNMatch("ba?/?", "bar/")); CHECK(!WrapSafeFNMatch("ba?/*", "bar")); }
O0
cpp
Test_SafeFNMatch_logging::Test_SafeFNMatch_logging(): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) leaq 0x81ed(%rip), %rax # 0x2b390 movq %rax, -0x10(%rbp) leaq 0x78b9a(%rip), %rdi # 0x9bd48 leaq -0x10(%rbp), %rsi callq 0x28fb0 addq $0x10, %rsp popq %rbp retq nopl (%rax)
_ZN24Test_SafeFNMatch_loggingC2Ev: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi lea rax, _ZN24Test_SafeFNMatch_logging3RunEv; Test_SafeFNMatch_logging::Run(void) mov [rbp+var_10], rax lea rdi, _ZN5nglog10g_testlistE; nglog::g_testlist lea rsi, [rbp+var_10] call _ZNSt6vectorIPFvvESaIS1_EE9push_backEOS1_; std::vector<void (*)(void)>::push_back(void (*&&)(void)) add rsp, 10h pop rbp retn
void Test_SafeFNMatch_logging::Test_SafeFNMatch_logging(Test_SafeFNMatch_logging *this) { _QWORD v1[2]; // [rsp+0h] [rbp-10h] BYREF v1[1] = this; v1[0] = Test_SafeFNMatch_logging::Run; std::vector<void (*)(void)>::push_back(&nglog::g_testlist, v1); }
Test_SafeFNMatch_logging: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI LEA RAX,[0x12b390] MOV qword ptr [RBP + -0x10],RAX LEA RDI,[0x19bd48] LEA RSI,[RBP + -0x10] CALL 0x00128fb0 ADD RSP,0x10 POP RBP RET
/* Test_SafeFNMatch_logging::Test_SafeFNMatch_logging() */ void __thiscall Test_SafeFNMatch_logging::Test_SafeFNMatch_logging(Test_SafeFNMatch_logging *this) { std::vector<void(*)(),std::allocator<void(*)()>>::push_back((_func_void *)nglog::g_testlist); return; }
40,637
unreg_request
eloqsql/mysys/mf_keycache.c
static void unreg_request(SIMPLE_KEY_CACHE_CB *keycache, BLOCK_LINK *block, int at_end) { DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE)); DBUG_ASSERT(block->hash_link); /*backptr to block NULL from free_block()*/ DBUG_ASSERT(block->requests); DBUG_ASSERT(block->prev_changed && *block->prev_changed == block); DBUG_ASSERT(!block->next_used); DBUG_ASSERT(!block->prev_used); /* Unregister the request, but do not link erroneous blocks into the LRU ring. */ if (!--block->requests && !(block->status & BLOCK_ERROR)) { my_bool hot; if (block->hits_left) block->hits_left--; hot= !block->hits_left && at_end && keycache->warm_blocks > keycache->min_warm_blocks; if (hot) { if (block->temperature == BLOCK_WARM) keycache->warm_blocks--; block->temperature= BLOCK_HOT; KEYCACHE_DBUG_PRINT("unreg_request", ("#warm_blocks: %lu", keycache->warm_blocks)); } link_block(keycache, block, hot, (my_bool)at_end); block->last_hit_time= keycache->keycache_time; keycache->keycache_time++; /* At this place, the block might be in the LRU ring or not. If an evicter was waiting for a block, it was selected for eviction and not linked in the LRU ring. */ /* Check if we should link a hot block to the warm block sub-chain. It is possible that we select the same block as above. But it can also be another block. In any case a block from the LRU ring is selected. In other words it works even if the above block was selected for eviction and not linked in the LRU ring. Since this happens only if the LRU ring is empty, the block selected below would be NULL and the rest of the function skipped. */ block= keycache->used_ins; if (block && keycache->keycache_time - block->last_hit_time > keycache->age_threshold) { unlink_block(keycache, block); link_block(keycache, block, 0, 0); if (block->temperature != BLOCK_WARM) { keycache->warm_blocks++; block->temperature= BLOCK_WARM; } KEYCACHE_DBUG_PRINT("unreg_request", ("#warm_blocks: %lu", keycache->warm_blocks)); } } }
O0
c
unreg_request: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) jmp 0xe9265 jmp 0xe9267 jmp 0xe9269 jmp 0xe926b jmp 0xe926d jmp 0xe926f jmp 0xe9271 jmp 0xe9273 jmp 0xe9275 jmp 0xe9277 jmp 0xe9279 movq -0x10(%rbp), %rcx movl 0x38(%rcx), %eax addl $-0x1, %eax movl %eax, 0x38(%rcx) cmpl $0x0, %eax jne 0xe93d7 movq -0x10(%rbp), %rax movl 0x50(%rax), %eax andl $0x1, %eax cmpl $0x0, %eax jne 0xe93d7 movq -0x10(%rbp), %rax cmpl $0x0, 0x58(%rax) je 0xe92b9 movq -0x10(%rbp), %rax movl 0x58(%rax), %ecx addl $-0x1, %ecx movl %ecx, 0x58(%rax) movq -0x10(%rbp), %rcx xorl %eax, %eax cmpl $0x0, 0x58(%rcx) movb %al, -0x16(%rbp) jne 0xe92e9 xorl %eax, %eax cmpl $0x0, -0x14(%rbp) movb %al, -0x16(%rbp) je 0xe92e9 movq -0x8(%rbp), %rax movq 0x68(%rax), %rax movq -0x8(%rbp), %rcx cmpq 0x20(%rcx), %rax seta %al movb %al, -0x16(%rbp) movb -0x16(%rbp), %al andb $0x1, %al movzbl %al, %eax movb %al, -0x15(%rbp) cmpb $0x0, -0x15(%rbp) je 0xe9323 movq -0x10(%rbp), %rax cmpl $0x1, 0x54(%rax) jne 0xe9314 movq -0x8(%rbp), %rax movq 0x68(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x68(%rax) movq -0x10(%rbp), %rax movl $0x2, 0x54(%rax) jmp 0xe9321 jmp 0xe9323 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movb -0x15(%rbp), %cl movl -0x14(%rbp), %eax movsbl %cl, %edx movsbl %al, %ecx callq 0xea840 movq -0x8(%rbp), %rax movq 0x30(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x60(%rax) movq -0x8(%rbp), %rax movq 0x30(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x30(%rax) movq -0x8(%rbp), %rax movq 0xb8(%rax), %rax movq %rax, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) je 0xe93d5 movq -0x8(%rbp), %rax movq 0x30(%rax), %rax movq -0x10(%rbp), %rcx subq 0x60(%rcx), %rax movq -0x8(%rbp), %rcx cmpq 0x28(%rcx), %rax jbe 0xe93d5 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0xea710 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi xorl %ecx, %ecx movl %ecx, %edx callq 0xea840 movq -0x10(%rbp), %rax cmpl $0x1, 0x54(%rax) je 0xe93cf movq -0x8(%rbp), %rax movq 0x68(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x68(%rax) movq -0x10(%rbp), %rax movl $0x1, 0x54(%rax) jmp 0xe93d1 jmp 0xe93d3 jmp 0xe93d5 jmp 0xe93d7 addq $0x20, %rsp popq %rbp retq nopl (%rax)
unreg_request_0: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx jmp short $+2 loc_E9265: jmp short $+2 loc_E9267: jmp short $+2 loc_E9269: jmp short $+2 loc_E926B: jmp short $+2 loc_E926D: jmp short $+2 loc_E926F: jmp short $+2 loc_E9271: jmp short $+2 loc_E9273: jmp short $+2 loc_E9275: jmp short $+2 loc_E9277: jmp short $+2 loc_E9279: mov rcx, [rbp+var_10] mov eax, [rcx+38h] add eax, 0FFFFFFFFh mov [rcx+38h], eax cmp eax, 0 jnz loc_E93D7 mov rax, [rbp+var_10] mov eax, [rax+50h] and eax, 1 cmp eax, 0 jnz loc_E93D7 mov rax, [rbp+var_10] cmp dword ptr [rax+58h], 0 jz short loc_E92B9 mov rax, [rbp+var_10] mov ecx, [rax+58h] add ecx, 0FFFFFFFFh mov [rax+58h], ecx loc_E92B9: mov rcx, [rbp+var_10] xor eax, eax cmp dword ptr [rcx+58h], 0 mov [rbp+var_16], al jnz short loc_E92E9 xor eax, eax cmp [rbp+var_14], 0 mov [rbp+var_16], al jz short loc_E92E9 mov rax, [rbp+var_8] mov rax, [rax+68h] mov rcx, [rbp+var_8] cmp rax, [rcx+20h] setnbe al mov [rbp+var_16], al loc_E92E9: mov al, [rbp+var_16] and al, 1 movzx eax, al mov [rbp+var_15], al cmp [rbp+var_15], 0 jz short loc_E9323 mov rax, [rbp+var_10] cmp dword ptr [rax+54h], 1 jnz short loc_E9314 mov rax, [rbp+var_8] mov rcx, [rax+68h] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+68h], rcx loc_E9314: mov rax, [rbp+var_10] mov dword ptr [rax+54h], 2 jmp short $+2 loc_E9321: jmp short $+2 loc_E9323: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov cl, [rbp+var_15] mov eax, [rbp+var_14] movsx edx, cl movsx ecx, al call link_block_0 mov rax, [rbp+var_8] mov rcx, [rax+30h] mov rax, [rbp+var_10] mov [rax+60h], rcx mov rax, [rbp+var_8] mov rcx, [rax+30h] add rcx, 1 mov [rax+30h], rcx mov rax, [rbp+var_8] mov rax, [rax+0B8h] mov [rbp+var_10], rax cmp [rbp+var_10], 0 jz short loc_E93D5 mov rax, [rbp+var_8] mov rax, [rax+30h] mov rcx, [rbp+var_10] sub rax, [rcx+60h] mov rcx, [rbp+var_8] cmp rax, [rcx+28h] jbe short loc_E93D5 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call unlink_block_0 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] xor ecx, ecx mov edx, ecx call link_block_0 mov rax, [rbp+var_10] cmp dword ptr [rax+54h], 1 jz short loc_E93CF mov rax, [rbp+var_8] mov rcx, [rax+68h] add rcx, 1 mov [rax+68h], rcx mov rax, [rbp+var_10] mov dword ptr [rax+54h], 1 loc_E93CF: jmp short $+2 loc_E93D1: jmp short $+2 loc_E93D3: jmp short $+2 loc_E93D5: jmp short $+2 loc_E93D7: add rsp, 20h pop rbp retn
unsigned long long unreg_request_0(_QWORD *a1, long long a2, int a3) { unsigned long long result; // rax bool v4; // [rsp+Ah] [rbp-16h] unsigned long long v5; // [rsp+10h] [rbp-10h] result = (unsigned int)(*(_DWORD *)(a2 + 56) - 1); *(_DWORD *)(a2 + 56) = result; if ( !(_DWORD)result ) { result = *(_DWORD *)(a2 + 80) & 1; if ( !(_DWORD)result ) { if ( *(_DWORD *)(a2 + 88) ) --*(_DWORD *)(a2 + 88); v4 = 0; if ( !*(_DWORD *)(a2 + 88) ) { v4 = 0; if ( a3 ) v4 = a1[13] > a1[4]; } if ( v4 ) { if ( *(_DWORD *)(a2 + 84) == 1 ) --a1[13]; *(_DWORD *)(a2 + 84) = 2; } link_block_0(a1, a2, v4, (unsigned int)(char)a3); *(_QWORD *)(a2 + 96) = a1[6]++; result = a1[23]; v5 = result; if ( result ) { result = a1[6] - *(_QWORD *)(result + 96); if ( result > a1[5] ) { unlink_block_0(a1, v5); link_block_0(a1, v5, 0LL, 0LL); result = v5; if ( *(_DWORD *)(v5 + 84) != 1 ) { ++a1[13]; result = v5; *(_DWORD *)(v5 + 84) = 1; } } } } } return result; }
unreg_request: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX JMP 0x001e9265 LAB_001e9265: JMP 0x001e9267 LAB_001e9267: JMP 0x001e9269 LAB_001e9269: JMP 0x001e926b LAB_001e926b: JMP 0x001e926d LAB_001e926d: JMP 0x001e926f LAB_001e926f: JMP 0x001e9271 LAB_001e9271: JMP 0x001e9273 LAB_001e9273: JMP 0x001e9275 LAB_001e9275: JMP 0x001e9277 LAB_001e9277: JMP 0x001e9279 LAB_001e9279: MOV RCX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RCX + 0x38] ADD EAX,-0x1 MOV dword ptr [RCX + 0x38],EAX CMP EAX,0x0 JNZ 0x001e93d7 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x50] AND EAX,0x1 CMP EAX,0x0 JNZ 0x001e93d7 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x58],0x0 JZ 0x001e92b9 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x58] ADD ECX,-0x1 MOV dword ptr [RAX + 0x58],ECX LAB_001e92b9: MOV RCX,qword ptr [RBP + -0x10] XOR EAX,EAX CMP dword ptr [RCX + 0x58],0x0 MOV byte ptr [RBP + -0x16],AL JNZ 0x001e92e9 XOR EAX,EAX CMP dword ptr [RBP + -0x14],0x0 MOV byte ptr [RBP + -0x16],AL JZ 0x001e92e9 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x68] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x20] SETA AL MOV byte ptr [RBP + -0x16],AL LAB_001e92e9: MOV AL,byte ptr [RBP + -0x16] AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x15],AL CMP byte ptr [RBP + -0x15],0x0 JZ 0x001e9323 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x54],0x1 JNZ 0x001e9314 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x68] ADD RCX,-0x1 MOV qword ptr [RAX + 0x68],RCX LAB_001e9314: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x54],0x2 JMP 0x001e9321 LAB_001e9321: JMP 0x001e9323 LAB_001e9323: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV CL,byte ptr [RBP + -0x15] MOV EAX,dword ptr [RBP + -0x14] MOVSX EDX,CL MOVSX ECX,AL CALL 0x001ea840 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x30] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x60],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x30] ADD RCX,0x1 MOV qword ptr [RAX + 0x30],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0xb8] MOV qword ptr [RBP + -0x10],RAX CMP qword ptr [RBP + -0x10],0x0 JZ 0x001e93d5 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x30] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,qword ptr [RCX + 0x60] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x28] JBE 0x001e93d5 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x001ea710 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] XOR ECX,ECX MOV EDX,ECX CALL 0x001ea840 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x54],0x1 JZ 0x001e93cf MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x68] ADD RCX,0x1 MOV qword ptr [RAX + 0x68],RCX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x54],0x1 LAB_001e93cf: JMP 0x001e93d1 LAB_001e93d1: JMP 0x001e93d3 LAB_001e93d3: JMP 0x001e93d5 LAB_001e93d5: JMP 0x001e93d7 LAB_001e93d7: ADD RSP,0x20 POP RBP RET
void unreg_request(long param_1,long param_2,int param_3) { long lVar1; int iVar2; bool local_1e; iVar2 = *(int *)(param_2 + 0x38) + -1; *(int *)(param_2 + 0x38) = iVar2; if ((iVar2 == 0) && ((*(uint *)(param_2 + 0x50) & 1) == 0)) { if (*(int *)(param_2 + 0x58) != 0) { *(int *)(param_2 + 0x58) = *(int *)(param_2 + 0x58) + -1; } local_1e = false; if ((*(int *)(param_2 + 0x58) == 0) && (local_1e = false, param_3 != 0)) { local_1e = *(ulong *)(param_1 + 0x20) < *(ulong *)(param_1 + 0x68); } if (local_1e != false) { if (*(int *)(param_2 + 0x54) == 1) { *(long *)(param_1 + 0x68) = *(long *)(param_1 + 0x68) + -1; } *(int4 *)(param_2 + 0x54) = 2; } link_block(param_1,param_2,local_1e,(int)(char)param_3); *(int8 *)(param_2 + 0x60) = *(int8 *)(param_1 + 0x30); *(long *)(param_1 + 0x30) = *(long *)(param_1 + 0x30) + 1; lVar1 = *(long *)(param_1 + 0xb8); if ((lVar1 != 0) && (*(ulong *)(param_1 + 0x28) < (ulong)(*(long *)(param_1 + 0x30) - *(long *)(lVar1 + 0x60)))) { unlink_block(param_1,lVar1); link_block(param_1,lVar1,0); if (*(int *)(lVar1 + 0x54) != 1) { *(long *)(param_1 + 0x68) = *(long *)(param_1 + 0x68) + 1; *(int4 *)(lVar1 + 0x54) = 1; } } } return; }
40,638
unreg_request
eloqsql/mysys/mf_keycache.c
static void unreg_request(SIMPLE_KEY_CACHE_CB *keycache, BLOCK_LINK *block, int at_end) { DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE)); DBUG_ASSERT(block->hash_link); /*backptr to block NULL from free_block()*/ DBUG_ASSERT(block->requests); DBUG_ASSERT(block->prev_changed && *block->prev_changed == block); DBUG_ASSERT(!block->next_used); DBUG_ASSERT(!block->prev_used); /* Unregister the request, but do not link erroneous blocks into the LRU ring. */ if (!--block->requests && !(block->status & BLOCK_ERROR)) { my_bool hot; if (block->hits_left) block->hits_left--; hot= !block->hits_left && at_end && keycache->warm_blocks > keycache->min_warm_blocks; if (hot) { if (block->temperature == BLOCK_WARM) keycache->warm_blocks--; block->temperature= BLOCK_HOT; KEYCACHE_DBUG_PRINT("unreg_request", ("#warm_blocks: %lu", keycache->warm_blocks)); } link_block(keycache, block, hot, (my_bool)at_end); block->last_hit_time= keycache->keycache_time; keycache->keycache_time++; /* At this place, the block might be in the LRU ring or not. If an evicter was waiting for a block, it was selected for eviction and not linked in the LRU ring. */ /* Check if we should link a hot block to the warm block sub-chain. It is possible that we select the same block as above. But it can also be another block. In any case a block from the LRU ring is selected. In other words it works even if the above block was selected for eviction and not linked in the LRU ring. Since this happens only if the LRU ring is empty, the block selected below would be NULL and the rest of the function skipped. */ block= keycache->used_ins; if (block && keycache->keycache_time - block->last_hit_time > keycache->age_threshold) { unlink_block(keycache, block); link_block(keycache, block, 0, 0); if (block->temperature != BLOCK_WARM) { keycache->warm_blocks++; block->temperature= BLOCK_WARM; } KEYCACHE_DBUG_PRINT("unreg_request", ("#warm_blocks: %lu", keycache->warm_blocks)); } } }
O3
c
unreg_request: decl 0x38(%rsi) je 0x9cea6 retq pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %r14 testb $0x1, 0x50(%rsi) jne 0x9cf8c movq %rdi, %rbx movl 0x58(%r14), %eax testl %eax, %eax je 0x9ced0 decl %eax movl %eax, 0x58(%r14) sete %al jmp 0x9ced2 movb $0x1, %al testl %edx, %edx sete %cl xorb $0x1, %al orb %cl, %al jne 0x9cf2a movq 0x68(%rbx), %rax cmpq 0x20(%rbx), %rax jbe 0x9cf2a cmpl $0x1, 0x54(%r14) jne 0x9cef5 decq %rax movq %rax, 0x68(%rbx) movl $0x2, 0x54(%r14) movq 0xb8(%rbx), %rax testq %rax, %rax je 0x9cf91 movq (%rax), %rcx movq %r14, 0x8(%rcx) movq (%rax), %rcx movq %rcx, (%r14) movq %rax, 0x8(%r14) movq %r14, (%rax) movq %r14, 0xb8(%rbx) jmp 0x9cf3a movsbl %dl, %ecx movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx callq 0x9d907 movq 0x30(%rbx), %rax movq %rax, 0x60(%r14) incq %rax movq %rax, 0x30(%rbx) movq 0xb8(%rbx), %r14 testq %r14, %r14 je 0x9cf8c subq 0x60(%r14), %rax cmpq 0x28(%rbx), %rax jbe 0x9cf8c movq %rbx, %rdi movq %r14, %rsi callq 0x9d8b0 movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx xorl %ecx, %ecx callq 0x9d907 cmpl $0x1, 0x54(%r14) je 0x9cf8c incq 0x68(%rbx) movl $0x1, 0x54(%r14) popq %rbx popq %r14 popq %rbp retq movq %r14, (%r14) movq %r14, 0xb8(%rbx) movq %r14, 0xb0(%rbx) movq %r14, 0x8(%r14) jmp 0x9cf3a
unreg_request_0: dec dword ptr [rsi+38h] jz short loc_9CEA6 retn loc_9CEA6: push rbp mov rbp, rsp push r14 push rbx mov r14, rsi test byte ptr [rsi+50h], 1 jnz loc_9CF8C mov rbx, rdi mov eax, [r14+58h] test eax, eax jz short loc_9CED0 dec eax mov [r14+58h], eax setz al jmp short loc_9CED2 loc_9CED0: mov al, 1 loc_9CED2: test edx, edx setz cl xor al, 1 or al, cl jnz short loc_9CF2A mov rax, [rbx+68h] cmp rax, [rbx+20h] jbe short loc_9CF2A cmp dword ptr [r14+54h], 1 jnz short loc_9CEF5 dec rax mov [rbx+68h], rax loc_9CEF5: mov dword ptr [r14+54h], 2 mov rax, [rbx+0B8h] test rax, rax jz loc_9CF91 mov rcx, [rax] mov [rcx+8], r14 mov rcx, [rax] mov [r14], rcx mov [r14+8], rax mov [rax], r14 mov [rbx+0B8h], r14 jmp short loc_9CF3A loc_9CF2A: movsx ecx, dl mov rdi, rbx mov rsi, r14 xor edx, edx call link_block_0 loc_9CF3A: mov rax, [rbx+30h] mov [r14+60h], rax inc rax mov [rbx+30h], rax mov r14, [rbx+0B8h] test r14, r14 jz short loc_9CF8C sub rax, [r14+60h] cmp rax, [rbx+28h] jbe short loc_9CF8C mov rdi, rbx mov rsi, r14 call unlink_block_0 mov rdi, rbx mov rsi, r14 xor edx, edx xor ecx, ecx call link_block_0 cmp dword ptr [r14+54h], 1 jz short loc_9CF8C inc qword ptr [rbx+68h] mov dword ptr [r14+54h], 1 loc_9CF8C: pop rbx pop r14 pop rbp retn loc_9CF91: mov [r14], r14 mov [rbx+0B8h], r14 mov [rbx+0B0h], r14 mov [r14+8], r14 jmp short loc_9CF3A
void unreg_request_0(_QWORD *a1, long long a2, long long a3) { bool v3; // zf int v4; // eax int v5; // eax bool v6; // al unsigned long long v7; // rax long long v8; // rax long long v9; // rax long long v10; // rax long long v11; // r14 v3 = (*(_DWORD *)(a2 + 56))-- == 1; if ( v3 && (*(_BYTE *)(a2 + 80) & 1) == 0 ) { v4 = *(_DWORD *)(a2 + 88); if ( v4 ) { v5 = v4 - 1; *(_DWORD *)(a2 + 88) = v5; v6 = v5 == 0; } else { v6 = 1; } if ( (_DWORD)a3 == 0 || !v6 || (v7 = a1[13], v7 <= a1[4]) ) { link_block_0(a1, a2, 0LL, (unsigned int)(char)a3); } else { if ( *(_DWORD *)(a2 + 84) == 1 ) a1[13] = v7 - 1; *(_DWORD *)(a2 + 84) = 2; v8 = a1[23]; if ( v8 ) { *(_QWORD *)(*(_QWORD *)v8 + 8LL) = a2; *(_QWORD *)a2 = *(_QWORD *)v8; *(_QWORD *)(a2 + 8) = v8; *(_QWORD *)v8 = a2; a1[23] = a2; } else { *(_QWORD *)a2 = a2; a1[23] = a2; a1[22] = a2; *(_QWORD *)(a2 + 8) = a2; } } v9 = a1[6]; *(_QWORD *)(a2 + 96) = v9; v10 = v9 + 1; a1[6] = v10; v11 = a1[23]; if ( v11 && (unsigned long long)(v10 - *(_QWORD *)(v11 + 96)) > a1[5] ) { unlink_block_0(a1, a1[23], a3); link_block_0(a1, v11, 0LL, 0LL); if ( *(_DWORD *)(v11 + 84) != 1 ) { ++a1[13]; *(_DWORD *)(v11 + 84) = 1; } } } }
unreg_request: DEC dword ptr [RSI + 0x38] JZ 0x0019cea6 RET LAB_0019cea6: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV R14,RSI TEST byte ptr [RSI + 0x50],0x1 JNZ 0x0019cf8c MOV RBX,RDI MOV EAX,dword ptr [R14 + 0x58] TEST EAX,EAX JZ 0x0019ced0 DEC EAX MOV dword ptr [R14 + 0x58],EAX SETZ AL JMP 0x0019ced2 LAB_0019ced0: MOV AL,0x1 LAB_0019ced2: TEST EDX,EDX SETZ CL XOR AL,0x1 OR AL,CL JNZ 0x0019cf2a MOV RAX,qword ptr [RBX + 0x68] CMP RAX,qword ptr [RBX + 0x20] JBE 0x0019cf2a CMP dword ptr [R14 + 0x54],0x1 JNZ 0x0019cef5 DEC RAX MOV qword ptr [RBX + 0x68],RAX LAB_0019cef5: MOV dword ptr [R14 + 0x54],0x2 MOV RAX,qword ptr [RBX + 0xb8] TEST RAX,RAX JZ 0x0019cf91 MOV RCX,qword ptr [RAX] MOV qword ptr [RCX + 0x8],R14 MOV RCX,qword ptr [RAX] MOV qword ptr [R14],RCX MOV qword ptr [R14 + 0x8],RAX MOV qword ptr [RAX],R14 MOV qword ptr [RBX + 0xb8],R14 JMP 0x0019cf3a LAB_0019cf2a: MOVSX ECX,DL MOV RDI,RBX MOV RSI,R14 XOR EDX,EDX CALL 0x0019d907 LAB_0019cf3a: MOV RAX,qword ptr [RBX + 0x30] MOV qword ptr [R14 + 0x60],RAX INC RAX MOV qword ptr [RBX + 0x30],RAX MOV R14,qword ptr [RBX + 0xb8] TEST R14,R14 JZ 0x0019cf8c SUB RAX,qword ptr [R14 + 0x60] CMP RAX,qword ptr [RBX + 0x28] JBE 0x0019cf8c MOV RDI,RBX MOV RSI,R14 CALL 0x0019d8b0 MOV RDI,RBX MOV RSI,R14 XOR EDX,EDX XOR ECX,ECX CALL 0x0019d907 CMP dword ptr [R14 + 0x54],0x1 JZ 0x0019cf8c INC qword ptr [RBX + 0x68] MOV dword ptr [R14 + 0x54],0x1 LAB_0019cf8c: POP RBX POP R14 POP RBP RET LAB_0019cf91: MOV qword ptr [R14],R14 MOV qword ptr [RBX + 0xb8],R14 MOV qword ptr [RBX + 0xb0],R14 MOV qword ptr [R14 + 0x8],R14 JMP 0x0019cf3a
void unreg_request(long param_1,long *param_2,int param_3) { long *plVar1; long lVar2; int iVar3; long lVar4; bool bVar5; plVar1 = param_2 + 7; *(int *)plVar1 = (int)*plVar1 + -1; if ((int)*plVar1 != 0) { return; } if ((*(byte *)(param_2 + 10) & 1) == 0) { if ((int)param_2[0xb] == 0) { bVar5 = true; } else { iVar3 = (int)param_2[0xb] + -1; bVar5 = iVar3 == 0; *(int *)(param_2 + 0xb) = iVar3; } if (((bool)(bVar5 ^ 1U | param_3 == 0)) || (*(ulong *)(param_1 + 0x68) <= *(ulong *)(param_1 + 0x20))) { link_block(param_1,param_2,0,(int)(char)param_3); } else { if (*(int *)((long)param_2 + 0x54) == 1) { *(ulong *)(param_1 + 0x68) = *(ulong *)(param_1 + 0x68) - 1; } *(int4 *)((long)param_2 + 0x54) = 2; plVar1 = *(long **)(param_1 + 0xb8); if (plVar1 == (long *)0x0) { *param_2 = (long)param_2; *(long **)(param_1 + 0xb8) = param_2; *(long **)(param_1 + 0xb0) = param_2; param_2[1] = (long)param_2; } else { *(long **)(*plVar1 + 8) = param_2; *param_2 = *plVar1; param_2[1] = (long)plVar1; *plVar1 = (long)param_2; *(long **)(param_1 + 0xb8) = param_2; } } lVar4 = *(long *)(param_1 + 0x30); param_2[0xc] = lVar4; lVar4 = lVar4 + 1; *(long *)(param_1 + 0x30) = lVar4; lVar2 = *(long *)(param_1 + 0xb8); if ((lVar2 != 0) && (*(ulong *)(param_1 + 0x28) < (ulong)(lVar4 - *(long *)(lVar2 + 0x60)))) { unlink_block(param_1,lVar2); link_block(param_1,lVar2,0,0); if (*(int *)(lVar2 + 0x54) != 1) { *(long *)(param_1 + 0x68) = *(long *)(param_1 + 0x68) + 1; *(int4 *)(lVar2 + 0x54) = 1; } } } return; }
40,639
js_array_buffer_finalizer
bluesky950520[P]quickjs/quickjs.c
static void js_array_buffer_finalizer(JSRuntime *rt, JSValue val) { JSObject *p = JS_VALUE_GET_OBJ(val); JSArrayBuffer *abuf = p->u.array_buffer; struct list_head *el, *el1; if (abuf) { /* The ArrayBuffer finalizer may be called before the typed array finalizers using it, so abuf->array_list is not necessarily empty. */ list_for_each_safe(el, el1, &abuf->array_list) { JSTypedArray *ta; JSObject *p1; ta = list_entry(el, JSTypedArray, link); ta->link.prev = NULL; ta->link.next = NULL; p1 = ta->obj; /* Note: the typed array length and offset fields are not modified */ if (p1->class_id != JS_CLASS_DATAVIEW) { p1->u.array.count = 0; p1->u.array.u.ptr = NULL; } } if (abuf->shared && rt->sab_funcs.sab_free) { rt->sab_funcs.sab_free(rt->sab_funcs.sab_opaque, abuf->data); } else { if (abuf->free_func) abuf->free_func(rt, abuf->opaque, abuf->data); } js_free_rt(rt, abuf); } }
O0
c
js_array_buffer_finalizer: subq $0x48, %rsp movq %rsi, 0x38(%rsp) movq %rdx, 0x40(%rsp) movq %rdi, 0x30(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x28(%rsp), %rax movq 0x30(%rax), %rax movq %rax, 0x20(%rsp) cmpq $0x0, 0x20(%rsp) je 0x5b7da movq 0x20(%rsp), %rax movq 0x20(%rax), %rax movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x10(%rsp) movq 0x18(%rsp), %rax movq 0x20(%rsp), %rcx addq $0x18, %rcx cmpq %rcx, %rax je 0x5b759 movq 0x18(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax movq $0x0, (%rax) movq 0x8(%rsp), %rax movq $0x0, 0x8(%rax) movq 0x8(%rsp), %rax movq 0x10(%rax), %rax movq %rax, (%rsp) movq (%rsp), %rax movzwl 0x6(%rax), %eax cmpl $0x21, %eax je 0x5b73a movq (%rsp), %rax movl $0x0, 0x40(%rax) movq (%rsp), %rax movq $0x0, 0x38(%rax) jmp 0x5b73c movq 0x10(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x10(%rsp) jmp 0x5b6d3 movq 0x20(%rsp), %rax movzbl 0x9(%rax), %eax cmpl $0x0, %eax je 0x5b79b movq 0x30(%rsp), %rax cmpq $0x0, 0x168(%rax) je 0x5b79b movq 0x30(%rsp), %rax movq 0x168(%rax), %rax movq 0x30(%rsp), %rcx movq 0x178(%rcx), %rdi movq 0x20(%rsp), %rcx movq 0x10(%rcx), %rsi callq *%rax jmp 0x5b7cb movq 0x20(%rsp), %rax cmpq $0x0, 0x30(%rax) je 0x5b7c9 movq 0x20(%rsp), %rax movq 0x30(%rax), %rax movq 0x30(%rsp), %rdi movq 0x20(%rsp), %rcx movq 0x28(%rcx), %rsi movq 0x20(%rsp), %rcx movq 0x10(%rcx), %rdx callq *%rax jmp 0x5b7cb movq 0x30(%rsp), %rdi movq 0x20(%rsp), %rsi callq 0x21960 addq $0x48, %rsp retq nop
js_array_buffer_finalizer: sub rsp, 48h mov [rsp+48h+var_10], rsi mov [rsp+48h+var_8], rdx mov [rsp+48h+var_18], rdi mov rax, [rsp+48h+var_10] mov [rsp+48h+var_20], rax mov rax, [rsp+48h+var_20] mov rax, [rax+30h] mov [rsp+48h+var_28], rax cmp [rsp+48h+var_28], 0 jz loc_5B7DA mov rax, [rsp+48h+var_28] mov rax, [rax+20h] mov [rsp+48h+var_30], rax mov rax, [rsp+48h+var_30] mov rax, [rax+8] mov [rsp+48h+var_38], rax loc_5B6D3: mov rax, [rsp+48h+var_30] mov rcx, [rsp+48h+var_28] add rcx, 18h cmp rax, rcx jz short loc_5B759 mov rax, [rsp+48h+var_30] mov [rsp+48h+var_40], rax mov rax, [rsp+48h+var_40] mov qword ptr [rax], 0 mov rax, [rsp+48h+var_40] mov qword ptr [rax+8], 0 mov rax, [rsp+48h+var_40] mov rax, [rax+10h] mov [rsp+48h+var_48], rax mov rax, [rsp+48h+var_48] movzx eax, word ptr [rax+6] cmp eax, 21h ; '!' jz short loc_5B73A mov rax, [rsp+48h+var_48] mov dword ptr [rax+40h], 0 mov rax, [rsp+48h+var_48] mov qword ptr [rax+38h], 0 loc_5B73A: jmp short $+2 loc_5B73C: mov rax, [rsp+48h+var_38] mov [rsp+48h+var_30], rax mov rax, [rsp+48h+var_30] mov rax, [rax+8] mov [rsp+48h+var_38], rax jmp loc_5B6D3 loc_5B759: mov rax, [rsp+48h+var_28] movzx eax, byte ptr [rax+9] cmp eax, 0 jz short loc_5B79B mov rax, [rsp+48h+var_18] cmp qword ptr [rax+168h], 0 jz short loc_5B79B mov rax, [rsp+48h+var_18] mov rax, [rax+168h] mov rcx, [rsp+48h+var_18] mov rdi, [rcx+178h] mov rcx, [rsp+48h+var_28] mov rsi, [rcx+10h] call rax jmp short loc_5B7CB loc_5B79B: mov rax, [rsp+48h+var_28] cmp qword ptr [rax+30h], 0 jz short loc_5B7C9 mov rax, [rsp+48h+var_28] mov rax, [rax+30h] mov rdi, [rsp+48h+var_18] mov rcx, [rsp+48h+var_28] mov rsi, [rcx+28h] mov rcx, [rsp+48h+var_28] mov rdx, [rcx+10h] call rax loc_5B7C9: jmp short $+2 loc_5B7CB: mov rdi, [rsp+48h+var_18] mov rsi, [rsp+48h+var_28] call js_free_rt loc_5B7DA: add rsp, 48h retn
void js_array_buffer_finalizer(long long a1, long long a2) { long long v2; // [rsp+0h] [rbp-48h] _QWORD *v3; // [rsp+10h] [rbp-38h] _QWORD *v4; // [rsp+18h] [rbp-30h] long long v5; // [rsp+20h] [rbp-28h] v5 = *(_QWORD *)(a2 + 48); if ( v5 ) { v4 = *(_QWORD **)(v5 + 32); v3 = (_QWORD *)v4[1]; while ( v4 != (_QWORD *)(v5 + 24) ) { *v4 = 0LL; v4[1] = 0LL; v2 = v4[2]; if ( *(_WORD *)(v2 + 6) != 33 ) { *(_DWORD *)(v2 + 64) = 0; *(_QWORD *)(v2 + 56) = 0LL; } v4 = v3; v3 = (_QWORD *)v3[1]; } if ( *(_BYTE *)(v5 + 9) && *(_QWORD *)(a1 + 360) ) { (*(void ( **)(_QWORD, _QWORD))(a1 + 360))(*(_QWORD *)(a1 + 376), *(_QWORD *)(v5 + 16)); } else if ( *(_QWORD *)(v5 + 48) ) { (*(void ( **)(long long, _QWORD, _QWORD))(v5 + 48))(a1, *(_QWORD *)(v5 + 40), *(_QWORD *)(v5 + 16)); } js_free_rt(a1, v5); } }
js_array_buffer_finalizer: SUB RSP,0x48 MOV qword ptr [RSP + 0x38],RSI MOV qword ptr [RSP + 0x40],RDX MOV qword ptr [RSP + 0x30],RDI MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x28],RAX MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RSP + 0x20],RAX CMP qword ptr [RSP + 0x20],0x0 JZ 0x0015b7da MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RAX LAB_0015b6d3: MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x20] ADD RCX,0x18 CMP RAX,RCX JZ 0x0015b759 MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX],0x0 MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x8],0x0 MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP],RAX MOV RAX,qword ptr [RSP] MOVZX EAX,word ptr [RAX + 0x6] CMP EAX,0x21 JZ 0x0015b73a MOV RAX,qword ptr [RSP] MOV dword ptr [RAX + 0x40],0x0 MOV RAX,qword ptr [RSP] MOV qword ptr [RAX + 0x38],0x0 LAB_0015b73a: JMP 0x0015b73c LAB_0015b73c: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RAX JMP 0x0015b6d3 LAB_0015b759: MOV RAX,qword ptr [RSP + 0x20] MOVZX EAX,byte ptr [RAX + 0x9] CMP EAX,0x0 JZ 0x0015b79b MOV RAX,qword ptr [RSP + 0x30] CMP qword ptr [RAX + 0x168],0x0 JZ 0x0015b79b MOV RAX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX + 0x168] MOV RCX,qword ptr [RSP + 0x30] MOV RDI,qword ptr [RCX + 0x178] MOV RCX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RCX + 0x10] CALL RAX JMP 0x0015b7cb LAB_0015b79b: MOV RAX,qword ptr [RSP + 0x20] CMP qword ptr [RAX + 0x30],0x0 JZ 0x0015b7c9 MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0x30] MOV RDI,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RCX + 0x28] MOV RCX,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RCX + 0x10] CALL RAX LAB_0015b7c9: JMP 0x0015b7cb LAB_0015b7cb: MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x20] CALL 0x00121960 LAB_0015b7da: ADD RSP,0x48 RET
void js_array_buffer_finalizer(long param_1,long param_2) { long lVar1; long lVar2; int8 *local_38; int8 *local_30; lVar1 = *(long *)(param_2 + 0x30); if (lVar1 != 0) { local_30 = *(int8 **)(lVar1 + 0x20); local_38 = (int8 *)local_30[1]; while (local_30 != (int8 *)(lVar1 + 0x18)) { *local_30 = 0; local_30[1] = 0; lVar2 = local_30[2]; if (*(short *)(lVar2 + 6) != 0x21) { *(int4 *)(lVar2 + 0x40) = 0; *(int8 *)(lVar2 + 0x38) = 0; } local_30 = local_38; local_38 = (int8 *)local_38[1]; } if ((*(char *)(lVar1 + 9) == '\0') || (*(long *)(param_1 + 0x168) == 0)) { if (*(long *)(lVar1 + 0x30) != 0) { (**(code **)(lVar1 + 0x30)) (param_1,*(int8 *)(lVar1 + 0x28),*(int8 *)(lVar1 + 0x10)); } } else { (**(code **)(param_1 + 0x168))(*(int8 *)(param_1 + 0x178),*(int8 *)(lVar1 + 0x10)) ; } js_free_rt(param_1,lVar1); } return; }
40,640
js_array_buffer_finalizer
bluesky950520[P]quickjs/quickjs.c
static void js_array_buffer_finalizer(JSRuntime *rt, JSValue val) { JSObject *p = JS_VALUE_GET_OBJ(val); JSArrayBuffer *abuf = p->u.array_buffer; struct list_head *el, *el1; if (abuf) { /* The ArrayBuffer finalizer may be called before the typed array finalizers using it, so abuf->array_list is not necessarily empty. */ list_for_each_safe(el, el1, &abuf->array_list) { JSTypedArray *ta; JSObject *p1; ta = list_entry(el, JSTypedArray, link); ta->link.prev = NULL; ta->link.next = NULL; p1 = ta->obj; /* Note: the typed array length and offset fields are not modified */ if (p1->class_id != JS_CLASS_DATAVIEW) { p1->u.array.count = 0; p1->u.array.u.ptr = NULL; } } if (abuf->shared && rt->sab_funcs.sab_free) { rt->sab_funcs.sab_free(rt->sab_funcs.sab_opaque, abuf->data); } else { if (abuf->free_func) abuf->free_func(rt, abuf->opaque, abuf->data); } js_free_rt(rt, abuf); } }
O1
c
js_array_buffer_finalizer: pushq %r14 pushq %rbx pushq %rax movq 0x30(%rsi), %rbx testq %rbx, %rbx je 0x3ad56 movq %rdi, %r14 leaq 0x18(%rbx), %rax movq 0x20(%rbx), %rcx cmpq %rax, %rcx je 0x3acf1 xorps %xmm0, %xmm0 movq %rcx, %rsi movq 0x8(%rcx), %rcx movq 0x10(%rsi), %rdx movups %xmm0, (%rsi) cmpw $0x21, 0x6(%rdx) je 0x3acec movl $0x0, 0x40(%rdx) movq $0x0, 0x38(%rdx) cmpq %rax, %rcx jne 0x3acc8 cmpb $0x0, 0x9(%rbx) je 0x3ad12 movq 0x168(%r14), %rax testq %rax, %rax je 0x3ad12 movq 0x178(%r14), %rdi movq 0x10(%rbx), %rsi callq *%rax jmp 0x3ad28 movq 0x30(%rbx), %rax testq %rax, %rax je 0x3ad28 movq 0x10(%rbx), %rdx movq 0x28(%rbx), %rsi movq %r14, %rdi callq *%rax decq 0x28(%r14) movq %rbx, %rdi callq *0x20(%r14) movq 0x10(%r14), %rcx movq 0x30(%r14), %rdx subq %rax, %rdx addq $-0x8, %rdx movq %rdx, 0x30(%r14) movq 0x40(%r14), %rdi movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmpq *%rcx addq $0x8, %rsp popq %rbx popq %r14 retq
js_array_buffer_finalizer: push r14 push rbx push rax mov rbx, [rsi+30h] test rbx, rbx jz loc_3AD56 mov r14, rdi lea rax, [rbx+18h] mov rcx, [rbx+20h] cmp rcx, rax jz short loc_3ACF1 xorps xmm0, xmm0 loc_3ACC8: mov rsi, rcx mov rcx, [rcx+8] mov rdx, [rsi+10h] movups xmmword ptr [rsi], xmm0 cmp word ptr [rdx+6], 21h ; '!' jz short loc_3ACEC mov dword ptr [rdx+40h], 0 mov qword ptr [rdx+38h], 0 loc_3ACEC: cmp rcx, rax jnz short loc_3ACC8 loc_3ACF1: cmp byte ptr [rbx+9], 0 jz short loc_3AD12 mov rax, [r14+168h] test rax, rax jz short loc_3AD12 mov rdi, [r14+178h] mov rsi, [rbx+10h] call rax jmp short loc_3AD28 loc_3AD12: mov rax, [rbx+30h] test rax, rax jz short loc_3AD28 mov rdx, [rbx+10h] mov rsi, [rbx+28h] mov rdi, r14 call rax loc_3AD28: dec qword ptr [r14+28h] mov rdi, rbx call qword ptr [r14+20h] mov rcx, [r14+10h] mov rdx, [r14+30h] sub rdx, rax add rdx, 0FFFFFFFFFFFFFFF8h mov [r14+30h], rdx mov rdi, [r14+40h] mov rsi, rbx add rsp, 8 pop rbx pop r14 jmp rcx loc_3AD56: add rsp, 8 pop rbx pop r14 retn
long long js_array_buffer_finalizer(long long a1, long long a2) { long long result; // rax long long v3; // rbx long long v4; // rcx long long v5; // rsi long long v6; // rdx void ( *v7)(_QWORD, _QWORD); // rax void ( *v8)(long long, _QWORD, _QWORD); // rax long long v9; // rax long long ( *v10)(_QWORD, long long); // rcx v3 = *(_QWORD *)(a2 + 48); if ( v3 ) { v4 = *(_QWORD *)(v3 + 32); while ( v4 != v3 + 24 ) { v5 = v4; v4 = *(_QWORD *)(v4 + 8); v6 = *(_QWORD *)(v5 + 16); *(_OWORD *)v5 = 0LL; if ( *(_WORD *)(v6 + 6) != 33 ) { *(_DWORD *)(v6 + 64) = 0; *(_QWORD *)(v6 + 56) = 0LL; } } if ( *(_BYTE *)(v3 + 9) && (v7 = *(void ( **)(_QWORD, _QWORD))(a1 + 360)) != 0LL ) { v7(*(_QWORD *)(a1 + 376), *(_QWORD *)(v3 + 16)); } else { v8 = *(void ( **)(long long, _QWORD, _QWORD))(v3 + 48); if ( v8 ) v8(a1, *(_QWORD *)(v3 + 40), *(_QWORD *)(v3 + 16)); } --*(_QWORD *)(a1 + 40); v9 = (*(long long ( **)(long long))(a1 + 32))(v3); v10 = *(long long ( **)(_QWORD, long long))(a1 + 16); *(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v9 - 8; return v10(*(_QWORD *)(a1 + 64), v3); } return result; }
js_array_buffer_finalizer: PUSH R14 PUSH RBX PUSH RAX MOV RBX,qword ptr [RSI + 0x30] TEST RBX,RBX JZ 0x0013ad56 MOV R14,RDI LEA RAX,[RBX + 0x18] MOV RCX,qword ptr [RBX + 0x20] CMP RCX,RAX JZ 0x0013acf1 XORPS XMM0,XMM0 LAB_0013acc8: MOV RSI,RCX MOV RCX,qword ptr [RCX + 0x8] MOV RDX,qword ptr [RSI + 0x10] MOVUPS xmmword ptr [RSI],XMM0 CMP word ptr [RDX + 0x6],0x21 JZ 0x0013acec MOV dword ptr [RDX + 0x40],0x0 MOV qword ptr [RDX + 0x38],0x0 LAB_0013acec: CMP RCX,RAX JNZ 0x0013acc8 LAB_0013acf1: CMP byte ptr [RBX + 0x9],0x0 JZ 0x0013ad12 MOV RAX,qword ptr [R14 + 0x168] TEST RAX,RAX JZ 0x0013ad12 MOV RDI,qword ptr [R14 + 0x178] MOV RSI,qword ptr [RBX + 0x10] CALL RAX JMP 0x0013ad28 LAB_0013ad12: MOV RAX,qword ptr [RBX + 0x30] TEST RAX,RAX JZ 0x0013ad28 MOV RDX,qword ptr [RBX + 0x10] MOV RSI,qword ptr [RBX + 0x28] MOV RDI,R14 CALL RAX LAB_0013ad28: DEC qword ptr [R14 + 0x28] MOV RDI,RBX CALL qword ptr [R14 + 0x20] MOV RCX,qword ptr [R14 + 0x10] MOV RDX,qword ptr [R14 + 0x30] SUB RDX,RAX ADD RDX,-0x8 MOV qword ptr [R14 + 0x30],RDX MOV RDI,qword ptr [R14 + 0x40] MOV RSI,RBX ADD RSP,0x8 POP RBX POP R14 JMP RCX LAB_0013ad56: ADD RSP,0x8 POP RBX POP R14 RET
void js_array_buffer_finalizer(long param_1,long param_2) { long lVar1; int8 *puVar2; int8 *puVar3; long lVar4; lVar1 = *(long *)(param_2 + 0x30); if (lVar1 == 0) { return; } puVar3 = *(int8 **)(lVar1 + 0x20); while (puVar3 != (int8 *)(lVar1 + 0x18)) { puVar2 = (int8 *)puVar3[1]; lVar4 = puVar3[2]; *puVar3 = 0; puVar3[1] = 0; puVar3 = puVar2; if (*(short *)(lVar4 + 6) != 0x21) { *(int4 *)(lVar4 + 0x40) = 0; *(int8 *)(lVar4 + 0x38) = 0; } } if ((*(char *)(lVar1 + 9) == '\0') || (*(code **)(param_1 + 0x168) == (code *)0x0)) { if (*(code **)(lVar1 + 0x30) != (code *)0x0) { (**(code **)(lVar1 + 0x30)) (param_1,*(int8 *)(lVar1 + 0x28),*(int8 *)(lVar1 + 0x10)); } } else { (**(code **)(param_1 + 0x168))(*(int8 *)(param_1 + 0x178),*(int8 *)(lVar1 + 0x10)); } *(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1; lVar4 = (**(code **)(param_1 + 0x20))(lVar1); lVar4 = (*(long *)(param_1 + 0x30) - lVar4) + -8; *(long *)(param_1 + 0x30) = lVar4; /* WARNING: Could not recover jumptable at 0x0013ad54. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(param_1 + 0x10)) (*(int8 *)(param_1 + 0x40),lVar1,lVar4,*(code **)(param_1 + 0x10)); return; }
40,641
js_array_buffer_finalizer
bluesky950520[P]quickjs/quickjs.c
static void js_array_buffer_finalizer(JSRuntime *rt, JSValue val) { JSObject *p = JS_VALUE_GET_OBJ(val); JSArrayBuffer *abuf = p->u.array_buffer; struct list_head *el, *el1; if (abuf) { /* The ArrayBuffer finalizer may be called before the typed array finalizers using it, so abuf->array_list is not necessarily empty. */ list_for_each_safe(el, el1, &abuf->array_list) { JSTypedArray *ta; JSObject *p1; ta = list_entry(el, JSTypedArray, link); ta->link.prev = NULL; ta->link.next = NULL; p1 = ta->obj; /* Note: the typed array length and offset fields are not modified */ if (p1->class_id != JS_CLASS_DATAVIEW) { p1->u.array.count = 0; p1->u.array.u.ptr = NULL; } } if (abuf->shared && rt->sab_funcs.sab_free) { rt->sab_funcs.sab_free(rt->sab_funcs.sab_opaque, abuf->data); } else { if (abuf->free_func) abuf->free_func(rt, abuf->opaque, abuf->data); } js_free_rt(rt, abuf); } }
O2
c
js_array_buffer_finalizer: pushq %r14 pushq %rbx pushq %rax movq 0x30(%rsi), %rbx testq %rbx, %rbx je 0x33ce0 movq %rdi, %r14 leaq 0x18(%rbx), %rax movq 0x20(%rbx), %rcx xorps %xmm0, %xmm0 cmpq %rax, %rcx je 0x33c97 movq 0x8(%rcx), %rdx movups %xmm0, (%rcx) movq 0x10(%rcx), %rsi cmpw $0x21, 0x6(%rsi) movq %rdx, %rcx je 0x33c6f andl $0x0, 0x40(%rsi) andq $0x0, 0x38(%rsi) movq %rdx, %rcx jmp 0x33c6f cmpb $0x0, 0x9(%rbx) je 0x33cb8 movq 0x168(%r14), %rax testq %rax, %rax je 0x33cb8 movq 0x178(%r14), %rdi movq 0x10(%rbx), %rsi callq *%rax jmp 0x33cce movq 0x30(%rbx), %rax testq %rax, %rax je 0x33cce movq 0x10(%rbx), %rdx movq 0x28(%rbx), %rsi movq %r14, %rdi callq *%rax movq %r14, %rdi movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x170cb addq $0x8, %rsp popq %rbx popq %r14 retq
js_array_buffer_finalizer: push r14 push rbx push rax mov rbx, [rsi+30h] test rbx, rbx jz short loc_33CE0 mov r14, rdi lea rax, [rbx+18h] mov rcx, [rbx+20h] xorps xmm0, xmm0 loc_33C6F: cmp rcx, rax jz short loc_33C97 mov rdx, [rcx+8] movups xmmword ptr [rcx], xmm0 mov rsi, [rcx+10h] cmp word ptr [rsi+6], 21h ; '!' mov rcx, rdx jz short loc_33C6F and dword ptr [rsi+40h], 0 and qword ptr [rsi+38h], 0 mov rcx, rdx jmp short loc_33C6F loc_33C97: cmp byte ptr [rbx+9], 0 jz short loc_33CB8 mov rax, [r14+168h] test rax, rax jz short loc_33CB8 mov rdi, [r14+178h] mov rsi, [rbx+10h] call rax jmp short loc_33CCE loc_33CB8: mov rax, [rbx+30h] test rax, rax jz short loc_33CCE mov rdx, [rbx+10h] mov rsi, [rbx+28h] mov rdi, r14 call rax loc_33CCE: mov rdi, r14 mov rsi, rbx add rsp, 8 pop rbx pop r14 jmp js_free_rt loc_33CE0: add rsp, 8 pop rbx pop r14 retn
long long js_array_buffer_finalizer(long long a1, long long a2) { long long result; // rax long long v3; // rbx long long v4; // rcx long long v5; // rdx long long v6; // rsi void ( *v7)(_QWORD, _QWORD, double); // rax void ( *v8)(long long, _QWORD, _QWORD, double); // rax v3 = *(_QWORD *)(a2 + 48); if ( v3 ) { v4 = *(_QWORD *)(v3 + 32); while ( v4 != v3 + 24 ) { v5 = *(_QWORD *)(v4 + 8); *(_OWORD *)v4 = 0LL; v6 = *(_QWORD *)(v4 + 16); v4 = v5; if ( *(_WORD *)(v6 + 6) != 33 ) { *(_DWORD *)(v6 + 64) = 0; *(_QWORD *)(v6 + 56) = 0LL; v4 = v5; } } if ( *(_BYTE *)(v3 + 9) && (v7 = *(void ( **)(_QWORD, _QWORD, double))(a1 + 360)) != 0LL ) { v7(*(_QWORD *)(a1 + 376), *(_QWORD *)(v3 + 16), 0.0); } else { v8 = *(void ( **)(long long, _QWORD, _QWORD, double))(v3 + 48); if ( v8 ) v8(a1, *(_QWORD *)(v3 + 40), *(_QWORD *)(v3 + 16), 0.0); } return js_free_rt(a1, v3); } return result; }
js_array_buffer_finalizer: PUSH R14 PUSH RBX PUSH RAX MOV RBX,qword ptr [RSI + 0x30] TEST RBX,RBX JZ 0x00133ce0 MOV R14,RDI LEA RAX,[RBX + 0x18] MOV RCX,qword ptr [RBX + 0x20] XORPS XMM0,XMM0 LAB_00133c6f: CMP RCX,RAX JZ 0x00133c97 MOV RDX,qword ptr [RCX + 0x8] MOVUPS xmmword ptr [RCX],XMM0 MOV RSI,qword ptr [RCX + 0x10] CMP word ptr [RSI + 0x6],0x21 MOV RCX,RDX JZ 0x00133c6f AND dword ptr [RSI + 0x40],0x0 AND qword ptr [RSI + 0x38],0x0 MOV RCX,RDX JMP 0x00133c6f LAB_00133c97: CMP byte ptr [RBX + 0x9],0x0 JZ 0x00133cb8 MOV RAX,qword ptr [R14 + 0x168] TEST RAX,RAX JZ 0x00133cb8 MOV RDI,qword ptr [R14 + 0x178] MOV RSI,qword ptr [RBX + 0x10] CALL RAX JMP 0x00133cce LAB_00133cb8: MOV RAX,qword ptr [RBX + 0x30] TEST RAX,RAX JZ 0x00133cce MOV RDX,qword ptr [RBX + 0x10] MOV RSI,qword ptr [RBX + 0x28] MOV RDI,R14 CALL RAX LAB_00133cce: MOV RDI,R14 MOV RSI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x001170cb LAB_00133ce0: ADD RSP,0x8 POP RBX POP R14 RET
void js_array_buffer_finalizer(long param_1,long param_2) { long lVar1; int8 *puVar2; long lVar3; int8 *puVar4; lVar1 = *(long *)(param_2 + 0x30); if (lVar1 != 0) { puVar4 = *(int8 **)(lVar1 + 0x20); while (puVar4 != (int8 *)(lVar1 + 0x18)) { puVar2 = (int8 *)puVar4[1]; *puVar4 = 0; puVar4[1] = 0; lVar3 = puVar4[2]; puVar4 = puVar2; if (*(short *)(lVar3 + 6) != 0x21) { *(int4 *)(lVar3 + 0x40) = 0; *(int8 *)(lVar3 + 0x38) = 0; } } if ((*(char *)(lVar1 + 9) == '\0') || (*(code **)(param_1 + 0x168) == (code *)0x0)) { if (*(code **)(lVar1 + 0x30) != (code *)0x0) { (**(code **)(lVar1 + 0x30)) (param_1,*(int8 *)(lVar1 + 0x28),*(int8 *)(lVar1 + 0x10)); } } else { (**(code **)(param_1 + 0x168))(*(int8 *)(param_1 + 0x178),*(int8 *)(lVar1 + 0x10)) ; } js_free_rt(param_1,lVar1); return; } return; }
40,642
spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>::discard_counter()
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/details/mpmc_blocking_q.h
size_t discard_counter() { return discard_counter_.load(std::memory_order_relaxed); }
O0
c
spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>::discard_counter(): subq $0x38, %rsp movq %rdi, 0x18(%rsp) movq 0x18(%rsp), %rax addq $0xc0, %rax movq %rax, 0x30(%rsp) movl $0x0, 0x2c(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x8(%rsp) movl 0x2c(%rsp), %edi movl $0xffff, %esi # imm = 0xFFFF callq 0x29b30 movl %eax, 0x28(%rsp) movl 0x2c(%rsp), %eax movl %eax, 0x14(%rsp) decl %eax subl $0x2, %eax jb 0x89198 jmp 0x8917e movl 0x14(%rsp), %eax subl $0x5, %eax je 0x891a7 jmp 0x89189 movq 0x8(%rsp), %rax movq (%rax), %rax movq %rax, 0x20(%rsp) jmp 0x891b4 movq 0x8(%rsp), %rax movq (%rax), %rax movq %rax, 0x20(%rsp) jmp 0x891b4 movq 0x8(%rsp), %rax movq (%rax), %rax movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax addq $0x38, %rsp retq nop
_ZN6spdlog7details19mpmc_blocking_queueINS0_9async_msgEE15discard_counterEv: sub rsp, 38h mov [rsp+38h+var_20], rdi mov rax, [rsp+38h+var_20] add rax, 0C0h mov [rsp+38h+var_8], rax mov [rsp+38h+var_C], 0 mov rax, [rsp+38h+var_8] mov [rsp+38h+var_30], rax mov edi, [rsp+38h+var_C] mov esi, 0FFFFh call _ZStanSt12memory_orderSt23__memory_order_modifier; std::operator&(std::memory_order,std::__memory_order_modifier) mov [rsp+38h+var_10], eax mov eax, [rsp+38h+var_C] mov [rsp+38h+var_24], eax dec eax sub eax, 2 jb short loc_89198 jmp short $+2 loc_8917E: mov eax, [rsp+38h+var_24] sub eax, 5 jz short loc_891A7 jmp short $+2 loc_89189: mov rax, [rsp+38h+var_30] mov rax, [rax] mov [rsp+38h+var_18], rax jmp short loc_891B4 loc_89198: mov rax, [rsp+38h+var_30] mov rax, [rax] mov [rsp+38h+var_18], rax jmp short loc_891B4 loc_891A7: mov rax, [rsp+38h+var_30] mov rax, [rax] mov [rsp+38h+var_18], rax loc_891B4: mov rax, [rsp+38h+var_18] add rsp, 38h retn
long long spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>::discard_counter(long long a1) { std::operator&(0, 0xFFFF); return *(_QWORD *)(a1 + 192); }
discard_counter: SUB RSP,0x38 MOV qword ptr [RSP + 0x18],RDI MOV RAX,qword ptr [RSP + 0x18] ADD RAX,0xc0 MOV qword ptr [RSP + 0x30],RAX MOV dword ptr [RSP + 0x2c],0x0 MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x8],RAX MOV EDI,dword ptr [RSP + 0x2c] MOV ESI,0xffff CALL 0x00129b30 MOV dword ptr [RSP + 0x28],EAX MOV EAX,dword ptr [RSP + 0x2c] MOV dword ptr [RSP + 0x14],EAX DEC EAX SUB EAX,0x2 JC 0x00189198 JMP 0x0018917e LAB_0018917e: MOV EAX,dword ptr [RSP + 0x14] SUB EAX,0x5 JZ 0x001891a7 JMP 0x00189189 LAB_00189189: MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x20],RAX JMP 0x001891b4 LAB_00189198: MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x20],RAX JMP 0x001891b4 LAB_001891a7: MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x20],RAX LAB_001891b4: MOV RAX,qword ptr [RSP + 0x20] ADD RSP,0x38 RET
/* WARNING: Removing unreachable block (ram,0x001891a7) */ /* WARNING: Removing unreachable block (ram,0x00189198) */ /* spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>::discard_counter() */ int8 __thiscall spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>::discard_counter (mpmc_blocking_queue<spdlog::details::async_msg> *this) { std::operator&(0,0xffff); return *(int8 *)(this + 0xc0); }
40,643
my_hash_sort_simple
eloqsql/strings/ctype-simple.c
void my_hash_sort_simple(CHARSET_INFO *cs, const uchar *key, size_t len, ulong *nr1, ulong *nr2) { register const uchar *sort_order=cs->sort_order; const uchar *end; uint16 space_weight= sort_order[' ']; /* Remove all trailing characters that are equal to space. We have to do this to be able to compare 'A ' and 'A' as identical. If the key is long enough, cut the trailing spaces (0x20) using an optimized function implemented in skip_trailing_spaces(). "len > 16" is just some heuristic here. Calling skip_triling_space() for short values is not desirable, because its initialization block may be more expensive than the performance gained. */ end= len > 16 ? skip_trailing_space(key, len) : key + len; /* We removed all trailing characters that are binary equal to space 0x20. Now remove all trailing characters that have weights equal to space. Some 8bit simple collations may have such characters: - cp1250_general_ci 0xA0 NO-BREAK SPACE == 0x20 SPACE - cp1251_ukrainian_ci 0x60 GRAVE ACCENT == 0x20 SPACE - koi8u_general_ci 0x60 GRAVE ACCENT == 0x20 SPACE */ for ( ; key < end ; ) { if (sort_order[*--end] != space_weight) { end++; break; } } my_hash_sort_simple_nopad(cs, key, end - key, nr1, nr2); }
O0
c
my_hash_sort_simple: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x8(%rbp), %rax movq 0x58(%rax), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movzbl 0x20(%rax), %eax movw %ax, -0x3a(%rbp) cmpq $0x10, -0x18(%rbp) jbe 0x4393e movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x439c0 movq %rax, -0x48(%rbp) jmp 0x4394a movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0x4398f movq -0x30(%rbp), %rax movq -0x38(%rbp), %rcx movq %rcx, %rdx addq $-0x1, %rdx movq %rdx, -0x38(%rbp) movzbl -0x1(%rcx), %ecx movzbl (%rax,%rcx), %eax movzwl -0x3a(%rbp), %ecx cmpl %ecx, %eax je 0x4398d movq -0x38(%rbp), %rax addq $0x1, %rax movq %rax, -0x38(%rbp) jmp 0x4398f jmp 0x43952 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x38(%rbp), %rdx movq -0x10(%rbp), %rax subq %rax, %rdx movq -0x20(%rbp), %rcx movq -0x28(%rbp), %r8 callq 0x43830 addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_hash_sort_simple: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_8] mov rax, [rax+58h] mov [rbp+var_30], rax mov rax, [rbp+var_30] movzx eax, byte ptr [rax+20h] mov [rbp+var_3A], ax cmp [rbp+var_18], 10h jbe short loc_4393E mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call skip_trailing_space_2 mov [rbp+var_48], rax jmp short loc_4394A loc_4393E: mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_48], rax loc_4394A: mov rax, [rbp+var_48] mov [rbp+var_38], rax loc_43952: mov rax, [rbp+var_10] cmp rax, [rbp+var_38] jnb short loc_4398F mov rax, [rbp+var_30] mov rcx, [rbp+var_38] mov rdx, rcx add rdx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_38], rdx movzx ecx, byte ptr [rcx-1] movzx eax, byte ptr [rax+rcx] movzx ecx, [rbp+var_3A] cmp eax, ecx jz short loc_4398D mov rax, [rbp+var_38] add rax, 1 mov [rbp+var_38], rax jmp short loc_4398F loc_4398D: jmp short loc_43952 loc_4398F: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_38] mov rax, [rbp+var_10] sub rdx, rax mov rcx, [rbp+var_20] mov r8, [rbp+var_28] call my_hash_sort_simple_nopad add rsp, 50h pop rbp retn
_QWORD * my_hash_sort_simple(long long a1, unsigned __int8 *a2, unsigned long long a3, long long *a4, _QWORD *a5) { unsigned long long v5; // rcx long long v7; // [rsp+8h] [rbp-48h] __int16 v8; // [rsp+16h] [rbp-3Ah] unsigned long long v9; // [rsp+18h] [rbp-38h] long long v10; // [rsp+20h] [rbp-30h] v10 = *(_QWORD *)(a1 + 88); v8 = *(unsigned __int8 *)(v10 + 32); if ( a3 <= 0x10 ) v7 = (long long)&a2[a3]; else v7 = skip_trailing_space_2(a2, a3); v9 = v7; while ( (unsigned long long)a2 < v9 ) { v5 = v9--; if ( *(unsigned __int8 *)(v10 + *(unsigned __int8 *)(v5 - 1)) != v8 ) return my_hash_sort_simple_nopad(a1, a2, ++v9 - (_QWORD)a2, a4, a5); } return my_hash_sort_simple_nopad(a1, a2, v9 - (_QWORD)a2, a4, a5); }
my_hash_sort_simple: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x58] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX + 0x20] MOV word ptr [RBP + -0x3a],AX CMP qword ptr [RBP + -0x18],0x10 JBE 0x0014393e MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001439c0 MOV qword ptr [RBP + -0x48],RAX JMP 0x0014394a LAB_0014393e: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x48],RAX LAB_0014394a: MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x38],RAX LAB_00143952: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x38] JNC 0x0014398f MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x38] MOV RDX,RCX ADD RDX,-0x1 MOV qword ptr [RBP + -0x38],RDX MOVZX ECX,byte ptr [RCX + -0x1] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOVZX ECX,word ptr [RBP + -0x3a] CMP EAX,ECX JZ 0x0014398d MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x38],RAX JMP 0x0014398f LAB_0014398d: JMP 0x00143952 LAB_0014398f: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x10] SUB RDX,RAX MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x28] CALL 0x00143830 ADD RSP,0x50 POP RBP RET
void my_hash_sort_simple(long param_1,ulong param_2,ulong param_3,int8 param_4, int8 param_5) { char cVar1; long lVar2; ulong uVar3; ulong local_50; ulong local_40; lVar2 = *(long *)(param_1 + 0x58); cVar1 = *(char *)(lVar2 + 0x20); if (param_3 < 0x11) { local_50 = param_2 + param_3; } else { local_50 = skip_trailing_space(param_2,param_3); } local_40 = local_50; uVar3 = local_40; do { local_40 = uVar3; if (local_40 <= param_2) break; uVar3 = local_40 - 1; } while (*(char *)(lVar2 + (ulong)*(byte *)(local_40 - 1)) == cVar1); my_hash_sort_simple_nopad(param_1,param_2,local_40 - param_2,param_4,param_5); return; }
40,644
lf_alloc_new
eloqsql/mysys/lf_alloc-pin.c
void *lf_alloc_new(LF_PINS *pins) { LF_ALLOCATOR *allocator= (LF_ALLOCATOR *)(pins->pinbox->free_func_arg); uchar *node; for (;;) { do { node= allocator->top; lf_pin(pins, 0, node); } while (node != allocator->top && LF_BACKOFF()); if (!node) { node= (void *)my_malloc(key_memory_lf_node, allocator->element_size, MYF(MY_WME)); if (allocator->constructor) allocator->constructor(node); #ifdef MY_LF_EXTRA_DEBUG if (likely(node != 0)) my_atomic_add32(&allocator->mallocs, 1); #endif break; } if (my_atomic_casptr((void **)(char *)&allocator->top, (void *)&node, anext_node(node))) break; } lf_unpin(pins, 0); return node; }
O3
c
lf_alloc_new: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x20(%rdi), %rax movq 0x30(%rax), %r15 leaq 0x2e07cd(%rip), %rcx # 0x389058 movq 0x48(%r15), %r14 movq %r14, %rax xchgq %rax, (%rbx) cmpq 0x48(%r15), %r14 je 0xa88a9 movl (%rcx), %eax testl %eax, %eax je 0xa888b pause decl %eax jne 0xa88a1 jmp 0xa888b testq %r14, %r14 je 0xa88c3 movl 0x38(%r15), %eax movq (%r14,%rax), %rdx movq %r14, %rax lock cmpxchgq %rdx, 0x48(%r15) jne 0xa888b jmp 0xa88eb leaq 0xb62b76(%rip), %rax # 0xc0b440 movl (%rax), %edi movl 0x50(%r15), %esi movl $0x10, %edx callq 0xa2c71 movq %rax, %r14 movq 0x58(%r15), %rax testq %rax, %rax je 0xa88eb movq %r14, %rdi callq *%rax xorl %eax, %eax xchgq %rax, (%rbx) movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
lf_alloc_new: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi mov rax, [rdi+20h] mov r15, [rax+30h] lea rcx, my_cpu_relax_multiplier loc_A888B: mov r14, [r15+48h] mov rax, r14 xchg rax, [rbx] cmp r14, [r15+48h] jz short loc_A88A9 mov eax, [rcx] test eax, eax jz short loc_A888B loc_A88A1: pause dec eax jnz short loc_A88A1 jmp short loc_A888B loc_A88A9: test r14, r14 jz short loc_A88C3 mov eax, [r15+38h] mov rdx, [r14+rax] mov rax, r14 lock cmpxchg [r15+48h], rdx jnz short loc_A888B jmp short loc_A88EB loc_A88C3: lea rax, key_memory_lf_node mov edi, [rax] mov esi, [r15+50h] mov edx, 10h call my_malloc mov r14, rax mov rax, [r15+58h] test rax, rax jz short loc_A88EB mov rdi, r14 call rax loc_A88EB: xor eax, eax xchg rax, [rbx] mov rax, r14 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long lf_alloc_new(long long a1) { long long v1; // r15 long long v2; // r14 int i; // eax void ( *v4)(long long); // rax v1 = *(_QWORD *)(*(_QWORD *)(a1 + 32) + 48LL); while ( 1 ) { while ( 1 ) { v2 = *(_QWORD *)(v1 + 72); _InterlockedExchange64((volatile long long *)a1, v2); if ( v2 == *(_QWORD *)(v1 + 72) ) break; for ( i = my_cpu_relax_multiplier; i; --i ) _mm_pause(); } if ( !v2 ) break; if ( v2 == _InterlockedCompareExchange64( (volatile signed long long *)(v1 + 72), *(_QWORD *)(v2 + *(unsigned int *)(v1 + 56)), v2) ) goto LABEL_11; } v2 = my_malloc(key_memory_lf_node, *(unsigned int *)(v1 + 80), 16); v4 = *(void ( **)(long long))(v1 + 88); if ( v4 ) v4(v2); LABEL_11: _InterlockedExchange64((volatile long long *)a1, 0LL); return v2; }
lf_alloc_new: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x20] MOV R15,qword ptr [RAX + 0x30] LEA RCX,[0x489058] LAB_001a888b: MOV R14,qword ptr [R15 + 0x48] MOV RAX,R14 XCHG qword ptr [RBX],RAX CMP R14,qword ptr [R15 + 0x48] JZ 0x001a88a9 MOV EAX,dword ptr [RCX] TEST EAX,EAX JZ 0x001a888b LAB_001a88a1: PAUSE DEC EAX JNZ 0x001a88a1 JMP 0x001a888b LAB_001a88a9: TEST R14,R14 JZ 0x001a88c3 MOV EAX,dword ptr [R15 + 0x38] MOV RDX,qword ptr [R14 + RAX*0x1] MOV RAX,R14 CMPXCHG.LOCK qword ptr [R15 + 0x48],RDX JNZ 0x001a888b JMP 0x001a88eb LAB_001a88c3: LEA RAX,[0xd0b440] MOV EDI,dword ptr [RAX] MOV ESI,dword ptr [R15 + 0x50] MOV EDX,0x10 CALL 0x001a2c71 MOV R14,RAX MOV RAX,qword ptr [R15 + 0x58] TEST RAX,RAX JZ 0x001a88eb MOV RDI,R14 CALL RAX LAB_001a88eb: XOR EAX,EAX XCHG qword ptr [RBX],RAX MOV RAX,R14 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
long lf_alloc_new(long *param_1) { long lVar1; int iVar2; long lVar3; bool bVar4; lVar1 = *(long *)(param_1[4] + 0x30); do { while( true ) { lVar3 = *(long *)(lVar1 + 0x48); LOCK(); *param_1 = lVar3; UNLOCK(); iVar2 = my_cpu_relax_multiplier; if (lVar3 == *(long *)(lVar1 + 0x48)) break; for (; iVar2 != 0; iVar2 = iVar2 + -1) { } } if (lVar3 == 0) { lVar3 = my_malloc(key_memory_lf_node,*(int4 *)(lVar1 + 0x50),0x10); if (*(code **)(lVar1 + 0x58) != (code *)0x0) { (**(code **)(lVar1 + 0x58))(lVar3); } break; } LOCK(); bVar4 = lVar3 == *(long *)(lVar1 + 0x48); if (bVar4) { *(long *)(lVar1 + 0x48) = *(long *)(lVar3 + (ulong)*(uint *)(lVar1 + 0x38)); } UNLOCK(); } while (!bVar4); LOCK(); *param_1 = 0; UNLOCK(); return lVar3; }
40,645
OpenGL_Init_4_4
SDL3Lite/dependencies/OpenGL.h
void OpenGL_Init_4_4() { glBufferStorage = (PFNGLBUFFERSTORAGEPROC)OpenGL_Load("glBufferStorage"); glClearTexImage = (PFNGLCLEARTEXIMAGEPROC)OpenGL_Load("glClearTexImage"); glClearTexSubImage = (PFNGLCLEARTEXSUBIMAGEPROC)OpenGL_Load("glClearTexSubImage"); glBindBuffersBase = (PFNGLBINDBUFFERSBASEPROC)OpenGL_Load("glBindBuffersBase"); glBindBuffersRange = (PFNGLBINDBUFFERSRANGEPROC)OpenGL_Load("glBindBuffersRange"); glBindTextures = (PFNGLBINDTEXTURESPROC)OpenGL_Load("glBindTextures"); glBindSamplers = (PFNGLBINDSAMPLERSPROC)OpenGL_Load("glBindSamplers"); glBindImageTextures = (PFNGLBINDIMAGETEXTURESPROC)OpenGL_Load("glBindImageTextures"); glBindVertexBuffers = (PFNGLBINDVERTEXBUFFERSPROC)OpenGL_Load("glBindVertexBuffers"); }
O3
c
OpenGL_Init_4_4: pushq %rax leaq 0x10173(%rip), %rdi # 0x3a18b callq 0x220c0 movq %rax, %rcx movq 0x18d51(%rip), %rax # 0x42d78 movq %rcx, (%rax) leaq 0x1016a(%rip), %rdi # 0x3a19b callq 0x220c0 movq %rax, %rcx movq 0x188e8(%rip), %rax # 0x42928 movq %rcx, (%rax) leaq 0x10161(%rip), %rdi # 0x3a1ab callq 0x220c0 movq %rax, %rcx movq 0x1958f(%rip), %rax # 0x435e8 movq %rcx, (%rax) leaq 0x1015b(%rip), %rdi # 0x3a1be callq 0x220c0 movq %rax, %rcx movq 0x1877e(%rip), %rax # 0x427f0 movq %rcx, (%rax) leaq 0x10154(%rip), %rdi # 0x3a1d0 callq 0x220c0 movq %rax, %rcx movq 0x188ed(%rip), %rax # 0x42978 movq %rcx, (%rax) leaq 0x1014e(%rip), %rdi # 0x3a1e3 callq 0x220c0 movq %rax, %rcx movq 0x18cac(%rip), %rax # 0x42d50 movq %rcx, (%rax) leaq 0x10144(%rip), %rdi # 0x3a1f2 callq 0x220c0 movq %rax, %rcx movq 0x1905b(%rip), %rax # 0x43118 movq %rcx, (%rax) leaq 0x1013a(%rip), %rdi # 0x3a201 callq 0x220c0 movq %rax, %rcx movq 0x1973a(%rip), %rax # 0x43810 movq %rcx, (%rax) leaq 0x10135(%rip), %rdi # 0x3a215 callq 0x220c0 movq %rax, %rcx movq 0x18391(%rip), %rax # 0x42480 movq %rcx, (%rax) popq %rax retq nopw %cs:(%rax,%rax)
OpenGL_Init_4_4: push rax lea rdi, aGlbufferstorag_0; "glBufferStorage" call _OpenGL_Load mov rcx, rax mov rax, cs:glBufferStorage_ptr mov [rax], rcx lea rdi, aGlclearteximag_0; "glClearTexImage" call _OpenGL_Load mov rcx, rax mov rax, cs:glClearTexImage_ptr mov [rax], rcx lea rdi, aGlcleartexsubi_0; "glClearTexSubImage" call _OpenGL_Load mov rcx, rax mov rax, cs:glClearTexSubImage_ptr mov [rax], rcx lea rdi, aGlbindbuffersb_0; "glBindBuffersBase" call _OpenGL_Load mov rcx, rax mov rax, cs:glBindBuffersBase_ptr mov [rax], rcx lea rdi, aGlbindbuffersr_0; "glBindBuffersRange" call _OpenGL_Load mov rcx, rax mov rax, cs:glBindBuffersRange_ptr mov [rax], rcx lea rdi, aGlbindtextures_0; "glBindTextures" call _OpenGL_Load mov rcx, rax mov rax, cs:glBindTextures_ptr mov [rax], rcx lea rdi, aGlbindsamplers_0; "glBindSamplers" call _OpenGL_Load mov rcx, rax mov rax, cs:glBindSamplers_ptr mov [rax], rcx lea rdi, aGlbindimagetex_2; "glBindImageTextures" call _OpenGL_Load mov rcx, rax mov rax, cs:glBindImageTextures_ptr mov [rax], rcx lea rdi, aGlbindvertexbu_2; "glBindVertexBuffers" call _OpenGL_Load mov rcx, rax mov rax, cs:glBindVertexBuffers_ptr mov [rax], rcx pop rax retn
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> OpenGL_Init_4_4() { glBufferStorage = OpenGL_Load("glBufferStorage"); glClearTexImage = OpenGL_Load("glClearTexImage"); glClearTexSubImage = OpenGL_Load("glClearTexSubImage"); glBindBuffersBase = OpenGL_Load("glBindBuffersBase"); glBindBuffersRange = OpenGL_Load("glBindBuffersRange"); glBindTextures = OpenGL_Load("glBindTextures"); glBindSamplers = OpenGL_Load("glBindSamplers"); glBindImageTextures = OpenGL_Load("glBindImageTextures"); glBindVertexBuffers = OpenGL_Load("glBindVertexBuffers"); }
OpenGL_Init_4_4: PUSH RAX LEA RDI,[0x13a18b] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00142d78] MOV qword ptr [RAX],RCX LEA RDI,[0x13a19b] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00142928] MOV qword ptr [RAX],RCX LEA RDI,[0x13a1ab] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x001435e8] MOV qword ptr [RAX],RCX LEA RDI,[0x13a1be] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x001427f0] MOV qword ptr [RAX],RCX LEA RDI,[0x13a1d0] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00142978] MOV qword ptr [RAX],RCX LEA RDI,[0x13a1e3] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00142d50] MOV qword ptr [RAX],RCX LEA RDI,[0x13a1f2] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00143118] MOV qword ptr [RAX],RCX LEA RDI,[0x13a201] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00143810] MOV qword ptr [RAX],RCX LEA RDI,[0x13a215] CALL 0x001220c0 MOV RCX,RAX MOV RAX,qword ptr [0x00142480] MOV qword ptr [RAX],RCX POP RAX RET
int8 OpenGL_Init_4_4(void) { int8 in_RAX; int8 uVar1; uVar1 = OpenGL_Load("glBufferStorage"); *(int8 *)PTR_glBufferStorage_00142d78 = uVar1; uVar1 = OpenGL_Load("glClearTexImage"); *(int8 *)PTR_glClearTexImage_00142928 = uVar1; uVar1 = OpenGL_Load("glClearTexSubImage"); *(int8 *)PTR_glClearTexSubImage_001435e8 = uVar1; uVar1 = OpenGL_Load("glBindBuffersBase"); *(int8 *)PTR_glBindBuffersBase_001427f0 = uVar1; uVar1 = OpenGL_Load("glBindBuffersRange"); *(int8 *)PTR_glBindBuffersRange_00142978 = uVar1; uVar1 = OpenGL_Load("glBindTextures"); *(int8 *)PTR_glBindTextures_00142d50 = uVar1; uVar1 = OpenGL_Load("glBindSamplers"); *(int8 *)PTR_glBindSamplers_00143118 = uVar1; uVar1 = OpenGL_Load("glBindImageTextures"); *(int8 *)PTR_glBindImageTextures_00143810 = uVar1; uVar1 = OpenGL_Load("glBindVertexBuffers"); *(int8 *)PTR_glBindVertexBuffers_00142480 = uVar1; return in_RAX; }
40,646
SEMANTICANALYZER::SemanticAnalyzer::declareObject(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
11AgReS1SoR11[P]Graph/Common/SemanticAnalyzer/src/SemanticAnalyzer.cpp
void SEMANTICANALYZER::SemanticAnalyzer::declareObject(const std::string &id, int statementNumber) { if(scopeStack.empty()) enterScope(); if(scopeStack.back().count(id)) { throw SemanticError("Объект " + id + " уже объявлен в текущей области видимости.", statementNumber); } scopeStack.back().insert(id); }
O0
cpp
SEMANTICANALYZER::SemanticAnalyzer::declareObject(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int): pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x80(%rbp) callq 0x30300 testb $0x1, %al jne 0x383b9 jmp 0x383c2 movq -0x80(%rbp), %rdi callq 0x2edc0 movq -0x80(%rbp), %rdi callq 0x30cf0 movq %rax, %rdi movq -0x10(%rbp), %rsi callq 0x30a00 cmpq $0x0, %rax je 0x384a7 movb $0x1, -0x65(%rbp) movl $0x10, %edi callq 0x2df00 movq %rax, -0x88(%rbp) movq -0x10(%rbp), %rdx leaq 0x14d39(%rip), %rsi # 0x4d13a leaq -0x58(%rbp), %rdi callq 0x2ee40 jmp 0x3840c leaq 0x14d35(%rip), %rdx # 0x4d148 leaq -0x38(%rbp), %rdi leaq -0x58(%rbp), %rsi callq 0x2d6e0 jmp 0x38422 movq -0x88(%rbp), %rdi movl -0x14(%rbp), %edx leaq -0x38(%rbp), %rsi callq 0x2f4b0 jmp 0x38437 movq -0x88(%rbp), %rdi movb $0x0, -0x65(%rbp) movq 0x22aaf(%rip), %rsi # 0x5aef8 movq 0x22b08(%rip), %rdx # 0x5af58 callq 0x30cc0 jmp 0x384d5 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x60(%rbp) movl %eax, -0x64(%rbp) jmp 0x38491 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x60(%rbp) movl %eax, -0x64(%rbp) jmp 0x38488 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x60(%rbp) movl %eax, -0x64(%rbp) leaq -0x38(%rbp), %rdi callq 0x2e520 leaq -0x58(%rbp), %rdi callq 0x2e520 testb $0x1, -0x65(%rbp) jne 0x38499 jmp 0x384a5 movq -0x88(%rbp), %rdi callq 0x2e7c0 jmp 0x384cc movq -0x80(%rbp), %rdi callq 0x30cf0 movq %rax, %rdi movq -0x10(%rbp), %rsi callq 0x2f250 movq %rax, -0x78(%rbp) movb %dl, -0x70(%rbp) addq $0x90, %rsp popq %rbp retq movq -0x60(%rbp), %rdi callq 0x30ed0 nopw %cs:(%rax,%rax)
_ZN16SEMANTICANALYZER16SemanticAnalyzer13declareObjectERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov rdi, [rbp+var_8] mov [rbp+var_80], rdi call __ZNKSt6vectorISt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS6_ESaIS6_EESaISA_EE5emptyEv; std::vector<std::set<std::string>>::empty(void) test al, 1 jnz short loc_383B9 jmp short loc_383C2 loc_383B9: mov rdi, [rbp+var_80]; this call __ZN16SEMANTICANALYZER16SemanticAnalyzer10enterScopeEv; SEMANTICANALYZER::SemanticAnalyzer::enterScope(void) loc_383C2: mov rdi, [rbp+var_80] call __ZNSt6vectorISt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS6_ESaIS6_EESaISA_EE4backEv; std::vector<std::set<std::string>>::back(void) mov rdi, rax mov rsi, [rbp+var_10] call __ZNKSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EE5countERKS5_; std::set<std::string>::count(std::string const&) cmp rax, 0 jz loc_384A7 mov [rbp+var_65], 1 mov edi, 10h; thrown_size call ___cxa_allocate_exception mov [rbp+var_88], rax mov rdx, [rbp+var_10] lea rsi, unk_4D13A lea rdi, [rbp+var_58] call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) jmp short $+2 loc_3840C: lea rdx, unk_4D148 lea rdi, [rbp+var_38] lea rsi, [rbp+var_58] call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_38422: mov rdi, [rbp+var_88] mov edx, [rbp+var_14] lea rsi, [rbp+var_38] call __ZN16SEMANTICANALYZER13SemanticErrorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; SEMANTICANALYZER::SemanticError::SemanticError(std::string const&,int) jmp short $+2 loc_38437: mov rdi, [rbp+var_88]; void * mov [rbp+var_65], 0 mov rsi, cs:_ZTIN16SEMANTICANALYZER13SemanticErrorE_ptr; lptinfo mov rdx, cs:_ZN16SEMANTICANALYZER13SemanticErrorD2Ev_ptr; void (*)(void *) call ___cxa_throw jmp short loc_384D5 mov rcx, rax mov eax, edx mov [rbp+var_60], rcx mov [rbp+var_64], eax jmp short loc_38491 mov rcx, rax mov eax, edx mov [rbp+var_60], rcx mov [rbp+var_64], eax jmp short loc_38488 mov rcx, rax mov eax, edx mov [rbp+var_60], rcx mov [rbp+var_64], eax lea rdi, [rbp+var_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_38488: lea rdi, [rbp+var_58] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_38491: test [rbp+var_65], 1 jnz short loc_38499 jmp short loc_384A5 loc_38499: mov rdi, [rbp+var_88]; void * call ___cxa_free_exception loc_384A5: jmp short loc_384CC loc_384A7: mov rdi, [rbp+var_80] call __ZNSt6vectorISt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS6_ESaIS6_EESaISA_EE4backEv; std::vector<std::set<std::string>>::back(void) mov rdi, rax mov rsi, [rbp+var_10] call __ZNSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EE6insertERKS5_; std::set<std::string>::insert(std::string const&) mov [rbp+var_78], rax mov [rbp+var_70], dl add rsp, 90h pop rbp retn loc_384CC: mov rdi, [rbp+var_60] call __Unwind_Resume loc_384D5: nop word ptr [rax+rax+00000000h]
long long SEMANTICANALYZER::SemanticAnalyzer::declareObject( SEMANTICANALYZER::SemanticAnalyzer *a1, long long a2, unsigned int a3) { long long v3; // rax long long v4; // rax void *exception; // [rsp+8h] [rbp-88h] _BYTE v7[32]; // [rsp+38h] [rbp-58h] BYREF _BYTE v8[36]; // [rsp+58h] [rbp-38h] BYREF unsigned int v9; // [rsp+7Ch] [rbp-14h] long long v10; // [rsp+80h] [rbp-10h] SEMANTICANALYZER::SemanticAnalyzer *v11; // [rsp+88h] [rbp-8h] v11 = a1; v10 = a2; v9 = a3; if ( (std::vector<std::set<std::string>>::empty() & 1) != 0 ) SEMANTICANALYZER::SemanticAnalyzer::enterScope(a1); v3 = std::vector<std::set<std::string>>::back(a1); if ( std::set<std::string>::count(v3, v10) ) { exception = __cxa_allocate_exception(0x10uLL); std::operator+<char>(v7, &unk_4D13A, v10); std::operator+<char>(v8, v7, &unk_4D148); SEMANTICANALYZER::SemanticError::SemanticError(exception, v8, v9); __cxa_throw( exception, (struct type_info *)&`typeinfo for'SEMANTICANALYZER::SemanticError, (void (*)(void *))SEMANTICANALYZER::SemanticError::~SemanticError); } v4 = std::vector<std::set<std::string>>::back(a1); return std::set<std::string>::insert(v4, v10); }
declareObject: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x80],RDI CALL 0x00130300 TEST AL,0x1 JNZ 0x001383b9 JMP 0x001383c2 LAB_001383b9: MOV RDI,qword ptr [RBP + -0x80] CALL 0x0012edc0 LAB_001383c2: MOV RDI,qword ptr [RBP + -0x80] CALL 0x00130cf0 MOV RDI,RAX MOV RSI,qword ptr [RBP + -0x10] CALL 0x00130a00 CMP RAX,0x0 JZ 0x001384a7 MOV byte ptr [RBP + -0x65],0x1 MOV EDI,0x10 CALL 0x0012df00 MOV qword ptr [RBP + -0x88],RAX MOV RDX,qword ptr [RBP + -0x10] LAB_001383fa: LEA RSI,[0x14d13a] LEA RDI,[RBP + -0x58] CALL 0x0012ee40 JMP 0x0013840c LAB_0013840c: LEA RDX,[0x14d148] LEA RDI,[RBP + -0x38] LEA RSI,[RBP + -0x58] CALL 0x0012d6e0 JMP 0x00138422 LAB_00138422: MOV RDI,qword ptr [RBP + -0x88] MOV EDX,dword ptr [RBP + -0x14] LAB_0013842c: LEA RSI,[RBP + -0x38] CALL 0x0012f4b0 JMP 0x00138437 LAB_00138437: MOV RDI,qword ptr [RBP + -0x88] MOV byte ptr [RBP + -0x65],0x0 MOV RSI,qword ptr [0x0015aef8] MOV RDX,qword ptr [0x0015af58] CALL 0x00130cc0 LAB_001384a7: MOV RDI,qword ptr [RBP + -0x80] CALL 0x00130cf0 MOV RDI,RAX MOV RSI,qword ptr [RBP + -0x10] CALL 0x0012f250 MOV qword ptr [RBP + -0x78],RAX MOV byte ptr [RBP + -0x70],DL ADD RSP,0x90 POP RBP RET
/* SEMANTICANALYZER::SemanticAnalyzer::declareObject(std::__cxx11::string const&, int) */ void __thiscall SEMANTICANALYZER::SemanticAnalyzer::declareObject (SemanticAnalyzer *this,string *param_1,int param_2) { set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> *psVar1; long lVar2; SemanticError *this_00; byte bVar3; char local_60 [32]; string local_40 [36]; int local_1c; string *local_18; SemanticAnalyzer *local_10; local_1c = param_2; local_18 = param_1; local_10 = this; bVar3 = std:: vector<std::set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>,std::allocator<std::set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>>> ::empty((vector<std::set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>,std::allocator<std::set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>>> *)this); if ((bVar3 & 1) != 0) { enterScope(this); } psVar1 = (set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> *)std:: vector<std::set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>,std::allocator<std::set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>>> ::back((vector<std::set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>,std::allocator<std::set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>>> *)this); lVar2 = std:: set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> ::count(psVar1,local_18); if (lVar2 == 0) { psVar1 = (set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> *)std:: vector<std::set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>,std::allocator<std::set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>>> ::back((vector<std::set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>,std::allocator<std::set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>>> *)this); std:: set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>:: insert(psVar1,local_18); return; } this_00 = (SemanticError *)__cxa_allocate_exception(0x10); /* try { // try from 001383fa to 00138409 has its CatchHandler @ 00138457 */ std::operator+(local_60,(string *)&DAT_0014d13a); /* try { // try from 0013840c to 0013841f has its CatchHandler @ 00138465 */ std::operator+(local_40,local_60); /* try { // try from 0013842c to 00138454 has its CatchHandler @ 00138473 */ SemanticError::SemanticError(this_00,local_40,local_1c); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_0015aef8,PTR__SemanticError_0015af58); }
40,647
SEMANTICANALYZER::SemanticAnalyzer::declareObject(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
11AgReS1SoR11[P]Graph/Common/SemanticAnalyzer/src/SemanticAnalyzer.cpp
void SEMANTICANALYZER::SemanticAnalyzer::declareObject(const std::string &id, int statementNumber) { if(scopeStack.empty()) enterScope(); if(scopeStack.back().count(id)) { throw SemanticError("Объект " + id + " уже объявлен в текущей области видимости.", statementNumber); } scopeStack.back().insert(id); }
O1
cpp
SEMANTICANALYZER::SemanticAnalyzer::declareObject(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movl %edx, %ebp movq %rsi, %r14 movq %rdi, %rbx movq (%rdi), %rax cmpq 0x8(%rdi), %rax jne 0xfafc movq 0xd4a4(%rip), %rsi # 0x1cf98 movq %rbx, %rdi callq 0xb9c0 movq 0x8(%rbx), %r15 leaq -0x30(%r15), %rdi movq %r14, %rsi callq 0xbdb0 addq $-0x28, %r15 cmpq %r15, %rax jne 0xfb31 movq 0x8(%rbx), %rdi addq $-0x30, %rdi movq %r14, %rsi addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0xbad0 movl $0x10, %edi callq 0xb320 movq %rax, %rbx leaq 0x75db(%rip), %rsi # 0x17120 leaq 0x20(%rsp), %rdi movq %r14, %rdx callq 0xb5e0 leaq 0x75d5(%rip), %rsi # 0x1712e leaq 0x20(%rsp), %rdi callq 0xbd40 leaq 0x10(%rsp), %r12 movq %r12, -0x10(%r12) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx jne 0xfb86 movups (%rcx), %xmm0 movups %xmm0, (%r12) jmp 0xfb92 movq %rdx, (%rsp) movq (%rcx), %rdx movq %rdx, 0x10(%rsp) movq 0x8(%rax), %rdx movq %rsp, %rsi movq %rdx, 0x8(%rsi) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movb $0x1, %r15b movq %rbx, %rdi movl %ebp, %edx callq 0xb720 xorl %r15d, %r15d movq 0xd31d(%rip), %rsi # 0x1cee0 movq 0xd3b6(%rip), %rdx # 0x1cf80 movq %rbx, %rdi callq 0xbbd0 movq %rax, %r14 movq (%rsp), %rdi cmpq %r12, %rdi je 0xfbf3 movq 0x10(%rsp), %rsi incq %rsi callq 0xb6a0 jmp 0xfbf3 movq %rax, %r14 movb $0x1, %r15b leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xfc16 movq 0x30(%rsp), %rsi incq %rsi callq 0xb6a0 jmp 0xfc16 movq %rax, %r14 movb $0x1, %r15b testb %r15b, %r15b je 0xfc23 movq %rbx, %rdi callq 0xb470 movq %r14, %rdi callq 0xbc50 nop
_ZN16SEMANTICANALYZER16SemanticAnalyzer13declareObjectERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi: push rbp; int push r15; int push r14; __int64 push r12; int push rbx; void * sub rsp, 40h mov ebp, edx mov r14, rsi mov rbx, rdi mov rax, [rdi] cmp rax, [rdi+8] jnz short loc_FAFC mov rsi, cs:obj mov rdi, rbx call __ZNSt6vectorISt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS6_ESaIS6_EESaISA_EE9push_backERKSA_; std::vector<std::set<std::string>>::push_back(std::set<std::string> const&) loc_FAFC: mov r15, [rbx+8] lea rdi, [r15-30h] mov rsi, r14 call __ZNKSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EE4findERKS5_; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::find(std::string const&) add r15, 0FFFFFFFFFFFFFFD8h cmp rax, r15 jnz short loc_FB31 mov rdi, [rbx+8] add rdi, 0FFFFFFFFFFFFFFD0h mov rsi, r14 add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp jmp __ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EE16_M_insert_uniqueIRKS5_EESt4pairISt17_Rb_tree_iteratorIS5_EbEOT_; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::_M_insert_unique<std::string const&>(std::string const&) loc_FB31: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, unk_17120 lea rdi, [rsp+68h+var_48] mov rdx, r14 call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) lea rsi, unk_1712E lea rdi, [rsp+68h+var_48] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea r12, [rsp+68h+var_58] mov [r12-10h], r12 mov rdx, [rax] mov rcx, rax add rcx, 10h; int cmp rdx, rcx jnz short loc_FB86 movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r12], xmm0 jmp short loc_FB92 loc_FB86: mov [rsp+68h+var_68], rdx; int mov rdx, [rcx] mov [rsp+68h+var_58], rdx; __int64 loc_FB92: mov rdx, [rax+8] mov rsi, rsp; int mov [rsi+8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov r15b, 1 mov rdi, rbx; int mov edx, ebp; int call __ZN16SEMANTICANALYZER13SemanticErrorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; SEMANTICANALYZER::SemanticError::SemanticError(std::string const&,int) xor r15d, r15d mov rsi, cs:_ZTIN16SEMANTICANALYZER13SemanticErrorE_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD2Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rdi, [rsp+68h+var_68]; void * cmp rdi, r12 jz short loc_FBF3 mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_FBF3 mov r14, rax mov r15b, 1 loc_FBF3: lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_FC16 mov rsi, [rsp+68h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_FC16 mov r14, rax mov r15b, 1 loc_FC16: test r15b, r15b jz short loc_FC23 mov rdi, rbx; void * call ___cxa_free_exception loc_FC23: mov rdi, r14 call __Unwind_Resume
declareObject: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV EBP,EDX MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr [RDI] CMP RAX,qword ptr [RDI + 0x8] JNZ 0x0010fafc MOV RSI,qword ptr [0x0011cf98] MOV RDI,RBX CALL 0x0010b9c0 LAB_0010fafc: MOV R15,qword ptr [RBX + 0x8] LEA RDI,[R15 + -0x30] MOV RSI,R14 CALL 0x0010bdb0 ADD R15,-0x28 CMP RAX,R15 JNZ 0x0010fb31 MOV RDI,qword ptr [RBX + 0x8] ADD RDI,-0x30 MOV RSI,R14 ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x0010bad0 LAB_0010fb31: MOV EDI,0x10 CALL 0x0010b320 MOV RBX,RAX LAB_0010fb3e: LEA RSI,[0x117120] LEA RDI,[RSP + 0x20] MOV RDX,R14 CALL 0x0010b5e0 LAB_0010fb52: LEA RSI,[0x11712e] LEA RDI,[RSP + 0x20] CALL 0x0010bd40 LEA R12,[RSP + 0x10] MOV qword ptr [R12 + -0x10],R12 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JNZ 0x0010fb86 MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R12],XMM0 JMP 0x0010fb92 LAB_0010fb86: MOV qword ptr [RSP],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x10],RDX LAB_0010fb92: MOV RDX,qword ptr [RAX + 0x8] MOV RSI,RSP MOV qword ptr [RSI + 0x8],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 MOV R15B,0x1 LAB_0010fbaf: MOV RDI,RBX MOV EDX,EBP CALL 0x0010b720 XOR R15D,R15D MOV RSI,qword ptr [0x0011cee0] MOV RDX,qword ptr [0x0011cf80] MOV RDI,RBX CALL 0x0010bbd0
/* SEMANTICANALYZER::SemanticAnalyzer::declareObject(std::__cxx11::string const&, int) */ void __thiscall SEMANTICANALYZER::SemanticAnalyzer::declareObject (SemanticAnalyzer *this,string *param_1,int param_2) { long lVar1; long lVar2; SemanticError *this_00; long *plVar3; long *plVar4; long *local_68; long local_60; long local_58; long lStack_50; char local_48 [32]; if (*(long *)this == *(long *)(this + 8)) { std:: vector<std::set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>,std::allocator<std::set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>>> ::push_back((vector<std::set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>,std::allocator<std::set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>>> *)this,(set *)PTR_emptySet_abi_cxx11__0011cf98); } lVar1 = *(long *)(this + 8); lVar2 = std:: _Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> ::find((_Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> *)(lVar1 + -0x30),param_1); if (lVar2 == lVar1 + -0x28) { std:: _Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> ::_M_insert_unique<std::__cxx11::string_const&> ((_Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> *)(*(long *)(this + 8) + -0x30),param_1); return; } this_00 = (SemanticError *)__cxa_allocate_exception(0x10); /* try { // try from 0010fb3e to 0010fb51 has its CatchHandler @ 0010fc10 */ std::operator+(local_48,(string *)&DAT_00117120); /* try { // try from 0010fb52 to 0010fb62 has its CatchHandler @ 0010fbed */ plVar3 = (long *)std::__cxx11::string::append(local_48); local_68 = (long *)*plVar3; plVar4 = plVar3 + 2; if (local_68 == plVar4) { local_58 = *plVar4; lStack_50 = plVar3[3]; local_68 = &local_58; } else { local_58 = *plVar4; } local_60 = plVar3[1]; *plVar3 = (long)plVar4; plVar3[1] = 0; *(int1 *)(plVar3 + 2) = 0; /* try { // try from 0010fbaf to 0010fbd1 has its CatchHandler @ 0010fbd2 */ SemanticError::SemanticError(this_00,(string *)&local_68,param_2); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_0011cee0,PTR__runtime_error_0011cf80); }
40,648
SEMANTICANALYZER::SemanticAnalyzer::declareObject(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
11AgReS1SoR11[P]Graph/Common/SemanticAnalyzer/src/SemanticAnalyzer.cpp
void SEMANTICANALYZER::SemanticAnalyzer::declareObject(const std::string &id, int statementNumber) { if(scopeStack.empty()) enterScope(); if(scopeStack.back().count(id)) { throw SemanticError("Объект " + id + " уже объявлен в текущей области видимости.", statementNumber); } scopeStack.back().insert(id); }
O2
cpp
SEMANTICANALYZER::SemanticAnalyzer::declareObject(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movl %edx, %ebp movq %rsi, %r14 movq %rdi, %rbx movq 0x8(%rdi), %rdi cmpq %rdi, (%rbx) jne 0x143f5 movq %rbx, %rdi callq 0x10910 movq 0x8(%rbx), %rdi addq $-0x30, %rdi movq %r14, %rsi callq 0x112c0 testq %rax, %rax jne 0x14420 movq 0x8(%rbx), %rdi addq $-0x30, %rdi movq %r14, %rsi addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x111c0 pushq $0x10 popq %rdi callq 0x10530 movq %rax, %rbx leaq 0x6ce8(%rip), %rsi # 0x1b11a leaq 0x8(%rsp), %rdi movq %r14, %rdx callq 0x10970 leaq 0x6ce2(%rip), %rdx # 0x1b128 leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rsi callq 0x10270 movb $0x1, %r15b leaq 0x28(%rsp), %rsi movq %rbx, %rdi movl %ebp, %edx callq 0x10b20 xorl %r15d, %r15d movq 0xda8f(%rip), %rsi # 0x21f00 movq 0xdb08(%rip), %rdx # 0x21f80 movq %rbx, %rdi callq 0x11380 movq %rax, %r14 leaq 0x28(%rsp), %rdi callq 0x104a0 jmp 0x14495 movq %rax, %r14 movb $0x1, %r15b leaq 0x8(%rsp), %rdi callq 0x104a0 testb %r15b, %r15b jne 0x144a9 jmp 0x144b1 movq %rax, %r14 movq %rbx, %rdi callq 0x107b0 movq %r14, %rdi callq 0x11420 nop
_ZN16SEMANTICANALYZER16SemanticAnalyzer13declareObjectERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi: push rbp push r15 push r14 push rbx sub rsp, 48h mov ebp, edx mov r14, rsi mov rbx, rdi mov rdi, [rdi+8] cmp [rbx], rdi jnz short loc_143F5 mov rdi, rbx; this call __ZN16SEMANTICANALYZER16SemanticAnalyzer10enterScopeEv; SEMANTICANALYZER::SemanticAnalyzer::enterScope(void) mov rdi, [rbx+8] loc_143F5: add rdi, 0FFFFFFFFFFFFFFD0h mov rsi, r14 call __ZNKSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS5_ESaIS5_EE5countERKS5_; std::set<std::string>::count(std::string const&) test rax, rax jnz short loc_14420 mov rdi, [rbx+8] add rdi, 0FFFFFFFFFFFFFFD0h mov rsi, r14 add rsp, 48h pop rbx pop r14 pop r15 pop rbp jmp __ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EE16_M_insert_uniqueIRKS5_EESt4pairISt17_Rb_tree_iteratorIS5_EbEOT_; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::_M_insert_unique<std::string const&>(std::string const&) loc_14420: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, unk_1B11A lea rdi, [rsp+68h+var_60] mov rdx, r14 call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) lea rdx, unk_1B128 lea rdi, [rsp+68h+var_40] lea rsi, [rsp+68h+var_60] call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) mov r15b, 1 lea rsi, [rsp+68h+var_40] mov rdi, rbx mov edx, ebp call __ZN16SEMANTICANALYZER13SemanticErrorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; SEMANTICANALYZER::SemanticError::SemanticError(std::string const&,int) xor r15d, r15d mov rsi, cs:_ZTIN16SEMANTICANALYZER13SemanticErrorE_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD2Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+68h+var_40] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_14495 mov r14, rax mov r15b, 1 loc_14495: lea rdi, [rsp+68h+var_60] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test r15b, r15b jnz short loc_144A9 jmp short loc_144B1 mov r14, rax loc_144A9: mov rdi, rbx; void * call ___cxa_free_exception loc_144B1: mov rdi, r14 call __Unwind_Resume
long long SEMANTICANALYZER::SemanticAnalyzer::declareObject( SEMANTICANALYZER::SemanticAnalyzer *this, long long a2, unsigned int a3) { long long v5; // rdi void *exception; // rbx _BYTE v8[32]; // [rsp+8h] [rbp-60h] BYREF _BYTE v9[64]; // [rsp+28h] [rbp-40h] BYREF v5 = *((_QWORD *)this + 1); if ( *(_QWORD *)this == v5 ) { SEMANTICANALYZER::SemanticAnalyzer::enterScope(this); v5 = *((_QWORD *)this + 1); } if ( std::set<std::string>::count(v5 - 48, a2) ) { exception = __cxa_allocate_exception(0x10uLL); std::operator+<char>(v8, &unk_1B11A, a2); std::operator+<char>(v9, v8, &unk_1B128); SEMANTICANALYZER::SemanticError::SemanticError(exception, v9, a3); __cxa_throw( exception, (struct type_info *)&`typeinfo for'SEMANTICANALYZER::SemanticError, (void (*)(void *))&std::runtime_error::~runtime_error); } return std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::_M_insert_unique<std::string const&>( *((_QWORD *)this + 1) - 48LL, a2); }
declareObject: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV EBP,EDX MOV R14,RSI MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x8] CMP qword ptr [RBX],RDI JNZ 0x001143f5 MOV RDI,RBX CALL 0x00110910 MOV RDI,qword ptr [RBX + 0x8] LAB_001143f5: ADD RDI,-0x30 MOV RSI,R14 CALL 0x001112c0 TEST RAX,RAX JNZ 0x00114420 MOV RDI,qword ptr [RBX + 0x8] ADD RDI,-0x30 MOV RSI,R14 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP JMP 0x001111c0 LAB_00114420: PUSH 0x10 POP RDI CALL 0x00110530 MOV RBX,RAX LAB_0011442b: LEA RSI,[0x11b11a] LEA RDI,[RSP + 0x8] MOV RDX,R14 CALL 0x00110970 LAB_0011443f: LEA RDX,[0x11b128] LEA RDI,[RSP + 0x28] LEA RSI,[RSP + 0x8] CALL 0x00110270 MOV R15B,0x1 LAB_00114458: LEA RSI,[RSP + 0x28] MOV RDI,RBX MOV EDX,EBP CALL 0x00110b20 XOR R15D,R15D MOV RSI,qword ptr [0x00121f00] MOV RDX,qword ptr [0x00121f80] MOV RDI,RBX CALL 0x00111380
/* SEMANTICANALYZER::SemanticAnalyzer::declareObject(std::__cxx11::string const&, int) */ void __thiscall SEMANTICANALYZER::SemanticAnalyzer::declareObject (SemanticAnalyzer *this,string *param_1,int param_2) { long lVar1; SemanticError *this_00; char local_60 [32]; string local_40 [32]; lVar1 = *(long *)(this + 8); if (*(long *)this == lVar1) { enterScope(this); lVar1 = *(long *)(this + 8); } lVar1 = std:: set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> ::count((set<std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> *)(lVar1 + -0x30),param_1); if (lVar1 == 0) { std:: _Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> ::_M_insert_unique<std::__cxx11::string_const&> ((_Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> *)(*(long *)(this + 8) + -0x30),param_1); return; } this_00 = (SemanticError *)__cxa_allocate_exception(0x10); /* try { // try from 0011442b to 0011443e has its CatchHandler @ 001144a6 */ std::operator+(local_60,(string *)&DAT_0011b11a); /* try { // try from 0011443f to 00114454 has its CatchHandler @ 0011448f */ std::operator+(local_40,local_60); /* try { // try from 00114458 to 0011447f has its CatchHandler @ 00114480 */ SemanticError::SemanticError(this_00,local_40,param_2); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_00121f00,PTR__runtime_error_00121f80); }
40,649
js_json_parse
bluesky950520[P]quickjs/quickjs.c
static JSValue js_json_parse(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue obj, root; JSValue reviver; const char *str; size_t len; str = JS_ToCStringLen(ctx, &len, argv[0]); if (!str) return JS_EXCEPTION; obj = JS_ParseJSON(ctx, str, len, "<input>"); JS_FreeCString(ctx, str); if (JS_IsException(obj)) return obj; if (argc > 1 && JS_IsFunction(ctx, argv[1])) { reviver = argv[1]; root = JS_NewObject(ctx); if (JS_IsException(root)) { JS_FreeValue(ctx, obj); return JS_EXCEPTION; } if (JS_DefinePropertyValue(ctx, root, JS_ATOM_empty_string, obj, JS_PROP_C_W_E) < 0) { JS_FreeValue(ctx, root); return JS_EXCEPTION; } obj = internalize_json_property(ctx, root, JS_ATOM_empty_string, reviver); JS_FreeValue(ctx, root); } return obj; }
O0
c
js_json_parse: subq $0xb8, %rsp movq %rsi, 0x98(%rsp) movq %rdx, 0xa0(%rsp) movq %rdi, 0x90(%rsp) movl %ecx, 0x8c(%rsp) movq %r8, 0x80(%rsp) movq 0x90(%rsp), %rdi movq 0x80(%rsp), %rax movq (%rax), %rdx movq 0x8(%rax), %rcx leaq 0x40(%rsp), %rsi callq 0x62ed0 movq %rax, 0x48(%rsp) cmpq $0x0, 0x48(%rsp) jne 0x88738 movl $0x0, 0xa8(%rsp) movq $0x6, 0xb0(%rsp) jmp 0x88950 movq 0x90(%rsp), %rdi movq 0x48(%rsp), %rsi movq 0x40(%rsp), %rdx leaq 0x85d2e(%rip), %rcx # 0x10e47f callq 0x4ea20 movq %rax, 0x30(%rsp) movq %rdx, 0x38(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x70(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x90(%rsp), %rdi movq 0x48(%rsp), %rsi callq 0x29e50 movq 0x70(%rsp), %rdi movq 0x78(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0x887b9 movq 0x70(%rsp), %rax movq %rax, 0xa8(%rsp) movq 0x78(%rsp), %rax movq %rax, 0xb0(%rsp) jmp 0x88950 cmpl $0x1, 0x8c(%rsp) jle 0x88936 movq 0x90(%rsp), %rdi movq 0x80(%rsp), %rax movq 0x10(%rax), %rsi movq 0x18(%rax), %rdx callq 0x2e510 cmpl $0x0, %eax je 0x88936 movq 0x80(%rsp), %rax movq 0x10(%rax), %rcx movq %rcx, 0x50(%rsp) movq 0x18(%rax), %rax movq %rax, 0x58(%rsp) movq 0x90(%rsp), %rdi callq 0x2a570 movq %rax, 0x20(%rsp) movq %rdx, 0x28(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x68(%rsp) movq 0x60(%rsp), %rdi movq 0x68(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0x88879 movq 0x90(%rsp), %rdi movq 0x70(%rsp), %rsi movq 0x78(%rsp), %rdx callq 0x23c90 movl $0x0, 0xa8(%rsp) movq $0x6, 0xb0(%rsp) jmp 0x88950 movq 0x90(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x68(%rsp), %rdx movq 0x70(%rsp), %r8 movq 0x78(%rsp), %r9 movl $0x2f, %ecx movl $0x7, (%rsp) callq 0x371b0 cmpl $0x0, %eax jge 0x888db movq 0x90(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x68(%rsp), %rdx callq 0x23c90 movl $0x0, 0xa8(%rsp) movq $0x6, 0xb0(%rsp) jmp 0x88950 movq 0x90(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x68(%rsp), %rdx movq 0x50(%rsp), %r8 movq 0x58(%rsp), %r9 movl $0x2f, %ecx callq 0x889d0 movq %rax, 0x10(%rsp) movq %rdx, 0x18(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x70(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x90(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x68(%rsp), %rdx callq 0x23c90 movq 0x70(%rsp), %rax movq %rax, 0xa8(%rsp) movq 0x78(%rsp), %rax movq %rax, 0xb0(%rsp) movq 0xa8(%rsp), %rax movq 0xb0(%rsp), %rdx addq $0xb8, %rsp retq nopl (%rax,%rax)
js_json_parse: sub rsp, 0B8h mov [rsp+0B8h+var_20], rsi mov [rsp+0B8h+var_18], rdx mov [rsp+0B8h+var_28], rdi mov [rsp+0B8h+var_2C], ecx mov [rsp+0B8h+var_38], r8 mov rdi, [rsp+0B8h+var_28] mov rax, [rsp+0B8h+var_38] mov rdx, [rax] mov rcx, [rax+8] lea rsi, [rsp+0B8h+var_78] call JS_ToCStringLen_0 mov [rsp+0B8h+var_70], rax cmp [rsp+0B8h+var_70], 0 jnz short loc_88738 mov dword ptr [rsp+0B8h+var_10], 0 mov [rsp+0B8h+var_8], 6 jmp loc_88950 loc_88738: mov rdi, [rsp+0B8h+var_28] mov rsi, [rsp+0B8h+var_70] mov rdx, [rsp+0B8h+var_78] lea rcx, aInput; "<input>" call JS_ParseJSON mov [rsp+0B8h+var_88], rax mov [rsp+0B8h+var_80], rdx mov rax, [rsp+0B8h+var_88] mov [rsp+0B8h+var_48], rax mov rax, [rsp+0B8h+var_80] mov [rsp+0B8h+var_40], rax mov rdi, [rsp+0B8h+var_28] mov rsi, [rsp+0B8h+var_70] call JS_FreeCString mov rdi, [rsp+0B8h+var_48] mov rsi, [rsp+0B8h+var_40] call JS_IsException_1 cmp eax, 0 jz short loc_887B9 mov rax, [rsp+0B8h+var_48] mov [rsp+0B8h+var_10], rax mov rax, [rsp+0B8h+var_40] mov [rsp+0B8h+var_8], rax jmp loc_88950 loc_887B9: cmp [rsp+0B8h+var_2C], 1 jle loc_88936 mov rdi, [rsp+0B8h+var_28] mov rax, [rsp+0B8h+var_38] mov rsi, [rax+10h] mov rdx, [rax+18h] call JS_IsFunction cmp eax, 0 jz loc_88936 mov rax, [rsp+0B8h+var_38] mov rcx, [rax+10h] mov [rsp+0B8h+var_68], rcx mov rax, [rax+18h] mov [rsp+0B8h+var_60], rax mov rdi, [rsp+0B8h+var_28] call JS_NewObject mov [rsp+0B8h+var_98], rax mov [rsp+0B8h+var_90], rdx mov rax, [rsp+0B8h+var_98] mov [rsp+0B8h+var_58], rax mov rax, [rsp+0B8h+var_90] mov [rsp+0B8h+var_50], rax mov rdi, [rsp+0B8h+var_58] mov rsi, [rsp+0B8h+var_50] call JS_IsException_1 cmp eax, 0 jz short loc_88879 mov rdi, [rsp+0B8h+var_28] mov rsi, [rsp+0B8h+var_48] mov rdx, [rsp+0B8h+var_40] call JS_FreeValue mov dword ptr [rsp+0B8h+var_10], 0 mov [rsp+0B8h+var_8], 6 jmp loc_88950 loc_88879: mov rdi, [rsp+0B8h+var_28] mov rsi, [rsp+0B8h+var_58] mov rdx, [rsp+0B8h+var_50] mov r8, [rsp+0B8h+var_48] mov r9, [rsp+0B8h+var_40] mov ecx, 2Fh ; '/' mov [rsp+0B8h+var_B8], 7 call JS_DefinePropertyValue cmp eax, 0 jge short loc_888DB mov rdi, [rsp+0B8h+var_28] mov rsi, [rsp+0B8h+var_58] mov rdx, [rsp+0B8h+var_50] call JS_FreeValue mov dword ptr [rsp+0B8h+var_10], 0 mov [rsp+0B8h+var_8], 6 jmp short loc_88950 loc_888DB: mov rdi, [rsp+0B8h+var_28] mov rsi, [rsp+0B8h+var_58] mov rdx, [rsp+0B8h+var_50] mov r8, [rsp+0B8h+var_68] mov r9, [rsp+0B8h+var_60] mov ecx, 2Fh ; '/' call internalize_json_property mov [rsp+0B8h+var_A8], rax mov [rsp+0B8h+var_A0], rdx mov rax, [rsp+0B8h+var_A8] mov [rsp+0B8h+var_48], rax mov rax, [rsp+0B8h+var_A0] mov [rsp+0B8h+var_40], rax mov rdi, [rsp+0B8h+var_28] mov rsi, [rsp+0B8h+var_58] mov rdx, [rsp+0B8h+var_50] call JS_FreeValue loc_88936: mov rax, [rsp+0B8h+var_48] mov [rsp+0B8h+var_10], rax mov rax, [rsp+0B8h+var_40] mov [rsp+0B8h+var_8], rax loc_88950: mov rax, [rsp+0B8h+var_10] mov rdx, [rsp+0B8h+var_8] add rsp, 0B8h retn
_DWORD * js_json_parse( long long a1, long long a2, long long a3, int a4, long long *a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, double a10, double a11, __m128 a12, __m128 a13) { double v13; // xmm4_8 double v14; // xmm5_8 long long v15; // rdx long long v16; // rdx __m128 v17; // xmm4 __m128 v18; // xmm5 long long v19; // rdx long long v21; // [rsp+40h] [rbp-78h] BYREF _DWORD *v22; // [rsp+48h] [rbp-70h] long long v23; // [rsp+50h] [rbp-68h] long long v24; // [rsp+58h] [rbp-60h] long long v25; // [rsp+60h] [rbp-58h] long long v26; // [rsp+68h] [rbp-50h] _DWORD *v27; // [rsp+70h] [rbp-48h] long long v28; // [rsp+78h] [rbp-40h] long long *v29; // [rsp+80h] [rbp-38h] int v30; // [rsp+8Ch] [rbp-2Ch] long long v31; // [rsp+90h] [rbp-28h] long long v32; // [rsp+98h] [rbp-20h] long long v33; // [rsp+A0h] [rbp-18h] _DWORD *v34; // [rsp+A8h] [rbp-10h] long long v35; // [rsp+B0h] [rbp-8h] v32 = a2; v33 = a3; v31 = a1; v30 = a4; v29 = a5; v22 = JS_ToCStringLen_0(a1, &v21, *a5, a5[1]); if ( v22 ) { v27 = (_DWORD *)JS_ParseJSON(v31, (long long)v22, v21, (long long)"<input>", a6, a7, a8, a9, v13, v14, a12, a13); v28 = v15; JS_FreeCString(v31, (long long)v22); if ( !JS_IsException_1((long long)v27, v28) ) { if ( v30 > 1 && (unsigned int)JS_IsFunction(v31, v29[2], v29[3]) ) { v23 = v29[2]; v24 = v29[3]; v25 = JS_NewObject(v31); v26 = v16; if ( JS_IsException_1(v25, v16) ) { JS_FreeValue(v31, (long long)v27, v28); LODWORD(v34) = 0; v35 = 6LL; return v34; } if ( (int)JS_DefinePropertyValue(v31, v25, v26, 0x2Fu, v27, v28, a6, a7, a8, a9, v17, v18, a12, a13, 7) < 0 ) { JS_FreeValue(v31, v25, v26); LODWORD(v34) = 0; v35 = 6LL; return v34; } v27 = (_DWORD *)internalize_json_property(v31, v25, v26, 47LL, v23, v24); v28 = v19; JS_FreeValue(v31, v25, v26); } v34 = v27; v35 = v28; return v34; } v34 = v27; v35 = v28; } else { LODWORD(v34) = 0; v35 = 6LL; } return v34; }
js_json_parse: SUB RSP,0xb8 MOV qword ptr [RSP + 0x98],RSI MOV qword ptr [RSP + 0xa0],RDX MOV qword ptr [RSP + 0x90],RDI MOV dword ptr [RSP + 0x8c],ECX MOV qword ptr [RSP + 0x80],R8 MOV RDI,qword ptr [RSP + 0x90] MOV RAX,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x8] LEA RSI,[RSP + 0x40] CALL 0x00162ed0 MOV qword ptr [RSP + 0x48],RAX CMP qword ptr [RSP + 0x48],0x0 JNZ 0x00188738 MOV dword ptr [RSP + 0xa8],0x0 MOV qword ptr [RSP + 0xb0],0x6 JMP 0x00188950 LAB_00188738: MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x40] LEA RCX,[0x20e47f] CALL 0x0014ea20 MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0x38],RDX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x70],RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x78],RAX MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x48] CALL 0x00129e50 MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x78] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x001887b9 MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0xa8],RAX MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0xb0],RAX JMP 0x00188950 LAB_001887b9: CMP dword ptr [RSP + 0x8c],0x1 JLE 0x00188936 MOV RDI,qword ptr [RSP + 0x90] MOV RAX,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RAX + 0x18] CALL 0x0012e510 CMP EAX,0x0 JZ 0x00188936 MOV RAX,qword ptr [RSP + 0x80] MOV RCX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x50],RCX MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x58],RAX MOV RDI,qword ptr [RSP + 0x90] CALL 0x0012a570 MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x28],RDX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x60],RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x68],RAX MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x68] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x00188879 MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x70] MOV RDX,qword ptr [RSP + 0x78] CALL 0x00123c90 MOV dword ptr [RSP + 0xa8],0x0 MOV qword ptr [RSP + 0xb0],0x6 JMP 0x00188950 LAB_00188879: MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x68] MOV R8,qword ptr [RSP + 0x70] MOV R9,qword ptr [RSP + 0x78] MOV ECX,0x2f MOV dword ptr [RSP],0x7 CALL 0x001371b0 CMP EAX,0x0 JGE 0x001888db MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x68] CALL 0x00123c90 MOV dword ptr [RSP + 0xa8],0x0 MOV qword ptr [RSP + 0xb0],0x6 JMP 0x00188950 LAB_001888db: MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x68] MOV R8,qword ptr [RSP + 0x50] MOV R9,qword ptr [RSP + 0x58] MOV ECX,0x2f CALL 0x001889d0 MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],RDX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x70],RAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x78],RAX MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x68] CALL 0x00123c90 LAB_00188936: MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0xa8],RAX MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0xb0],RAX LAB_00188950: MOV RAX,qword ptr [RSP + 0xa8] MOV RDX,qword ptr [RSP + 0xb0] ADD RSP,0xb8 RET
int1 [16] js_json_parse(int8 param_1,int8 param_2,int8 param_3,int param_4, int8 *param_5) { int iVar1; int1 auVar2 [16]; int8 local_78; long local_70; int8 local_68; int8 local_60; int1 local_58 [16]; int1 local_48 [16]; int8 *local_38; int local_2c; int8 local_28; int8 local_20; int8 local_18; int4 local_10; int4 uStack_c; int8 local_8; local_38 = param_5; local_2c = param_4; local_28 = param_1; local_20 = param_2; local_18 = param_3; local_70 = JS_ToCStringLen(param_1,&local_78,*param_5,param_5[1]); if (local_70 == 0) { local_10 = 0; local_8 = 6; } else { local_48 = JS_ParseJSON(local_28,local_70,local_78,"<input>"); JS_FreeCString(local_28,local_70); iVar1 = JS_IsException(local_48._0_8_,local_48._8_8_); if (iVar1 == 0) { if (1 < local_2c) { iVar1 = JS_IsFunction(local_28,local_38[2],local_38[3]); if (iVar1 != 0) { local_68 = local_38[2]; local_60 = local_38[3]; local_58 = JS_NewObject(local_28); iVar1 = JS_IsException(local_58._0_8_,local_58._8_8_); if (iVar1 != 0) { JS_FreeValue(local_28,local_48._0_8_,local_48._8_8_); local_10 = 0; local_8 = 6; goto LAB_00188950; } iVar1 = JS_DefinePropertyValue (local_28,local_58._0_8_,local_58._8_8_,0x2f,local_48._0_8_, local_48._8_8_,7); if (iVar1 < 0) { JS_FreeValue(local_28,local_58._0_8_,local_58._8_8_); local_10 = 0; local_8 = 6; goto LAB_00188950; } auVar2 = internalize_json_property (local_28,local_58._0_8_,local_58._8_8_,0x2f,local_68,local_60); local_48 = auVar2; JS_FreeValue(local_28,local_58._0_8_,local_58._8_8_); } } local_10 = local_48._0_4_; uStack_c = local_48._4_4_; local_8 = local_48._8_8_; } else { local_10 = local_48._0_4_; uStack_c = local_48._4_4_; local_8 = local_48._8_8_; } } LAB_00188950: auVar2._4_4_ = uStack_c; auVar2._0_4_ = local_10; auVar2._8_8_ = local_8; return auVar2; }
40,650
js_json_parse
bluesky950520[P]quickjs/quickjs.c
static JSValue js_json_parse(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue obj, root; JSValue reviver; const char *str; size_t len; str = JS_ToCStringLen(ctx, &len, argv[0]); if (!str) return JS_EXCEPTION; obj = JS_ParseJSON(ctx, str, len, "<input>"); JS_FreeCString(ctx, str); if (JS_IsException(obj)) return obj; if (argc > 1 && JS_IsFunction(ctx, argv[1])) { reviver = argv[1]; root = JS_NewObject(ctx); if (JS_IsException(root)) { JS_FreeValue(ctx, obj); return JS_EXCEPTION; } if (JS_DefinePropertyValue(ctx, root, JS_ATOM_empty_string, obj, JS_PROP_C_W_E) < 0) { JS_FreeValue(ctx, root); return JS_EXCEPTION; } obj = internalize_json_property(ctx, root, JS_ATOM_empty_string, reviver); JS_FreeValue(ctx, root); } return obj; }
O1
c
js_json_parse: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %r8, %r13 movl %ecx, %ebp movq %rdi, %r15 movq (%r8), %rdx movq 0x8(%r8), %rcx leaq 0x20(%rsp), %rsi xorl %ebx, %ebx xorl %r8d, %r8d callq 0x20bf7 movl $0x6, %r14d testq %rax, %rax je 0x4dd85 movq %rax, %r12 movq 0x20(%rsp), %rdx leaq 0x517d4(%rip), %rcx # 0x9f41b movq %r15, %rdi movq %rax, %rsi callq 0x33ba9 movq %rax, %rbx movq 0x18(%r15), %rdi movl -0x18(%r12), %eax leal -0x1(%rax), %ecx movl %ecx, -0x18(%r12) cmpl $0x1, %eax jg 0x4dc84 addq $-0x18, %r12 movq %r12, %rsi movq %rdx, %r12 movq $-0x7, %rdx callq 0x21266 movq %r12, %rdx cmpl $0x6, %edx jne 0x4dc9e movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 movq %rbx, %rcx andq %rax, %rcx jmp 0x4dd6d cmpl $0x2, %ebp jl 0x4dd60 movq %rdx, %r12 movq 0x10(%r13), %rbp movq 0x18(%r13), %r13 movq %r15, %rdi movq %rbp, %rsi movq %r13, %rdx callq 0x22dbe testl %eax, %eax je 0x4dcfa movq %r13, 0x18(%rsp) movq 0x40(%r15), %rax movq 0x10(%rax), %rsi movq 0x18(%rax), %rdx movq %r15, %rdi movl $0x1, %ecx callq 0x20f05 movq %rdx, %r13 cmpl $0x6, %r13d jne 0x4dcff movq 0x18(%r15), %rdi movq %rbx, %rsi movq %r12, %rdx jmp 0x4dd7e movq %r12, %rdx jmp 0x4dd60 movl $0x7, (%rsp) movq %r15, %rdi movq %rax, 0x10(%rsp) movq %rax, %rsi movq %r13, %rdx movl $0x2f, %ecx movq %rbx, %r8 movq %r12, %r9 callq 0x26abb testl %eax, %eax js 0x4dd72 movq %r15, %rdi movq 0x10(%rsp), %r12 movq %r12, %rsi movq %r13, %rdx movl $0x2f, %ecx movq %rbp, %r8 movq 0x18(%rsp), %r9 callq 0x4dd9e movq %rax, %rbx movq %rdx, %r14 movq 0x18(%r15), %rdi movq %r12, %rsi movq %r13, %rdx callq 0x1d8c6 movq %r14, %rdx movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rbx, %rcx movq %rdx, %r14 jmp 0x4dd87 movq 0x18(%r15), %rdi movq 0x10(%rsp), %rsi movq %r13, %rdx callq 0x1d8c6 xorl %ebx, %ebx xorl %ecx, %ecx movl %ebx, %eax orq %rcx, %rax movq %r14, %rdx addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_json_parse: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r13, r8 mov ebp, ecx mov r15, rdi mov rdx, [r8] mov rcx, [r8+8] lea rsi, [rsp+58h+var_38] xor ebx, ebx xor r8d, r8d call JS_ToCStringLen2 mov r14d, 6 test rax, rax jz loc_4DD85 mov r12, rax mov rdx, [rsp+58h+var_38] lea rcx, aInput; "<input>" mov rdi, r15 mov rsi, rax call JS_ParseJSON mov rbx, rax mov rdi, [r15+18h] mov eax, [r12-18h] lea ecx, [rax-1] mov [r12-18h], ecx cmp eax, 1 jg short loc_4DC84 add r12, 0FFFFFFFFFFFFFFE8h mov rsi, r12 mov r12, rdx mov rdx, 0FFFFFFFFFFFFFFF9h call js_free_value_rt mov rdx, r12 loc_4DC84: cmp edx, 6 jnz short loc_4DC9E mov rax, 0FFFFFFFF00000000h mov rcx, rbx and rcx, rax jmp loc_4DD6D loc_4DC9E: cmp ebp, 2 jl loc_4DD60 mov r12, rdx mov rbp, [r13+10h] mov r13, [r13+18h] mov rdi, r15 mov rsi, rbp mov rdx, r13 call JS_IsFunction test eax, eax jz short loc_4DCFA mov [rsp+58h+var_40], r13 mov rax, [r15+40h] mov rsi, [rax+10h] mov rdx, [rax+18h] mov rdi, r15 mov ecx, 1 call JS_NewObjectProtoClass mov r13, rdx cmp r13d, 6 jnz short loc_4DCFF mov rdi, [r15+18h] mov rsi, rbx mov rdx, r12 jmp loc_4DD7E loc_4DCFA: mov rdx, r12 jmp short loc_4DD60 loc_4DCFF: mov [rsp+58h+var_58], 7 mov rdi, r15 mov [rsp+58h+var_48], rax mov rsi, rax mov rdx, r13 mov ecx, 2Fh ; '/' mov r8, rbx mov r9, r12 call JS_DefinePropertyValue test eax, eax js short loc_4DD72 mov rdi, r15 mov r12, [rsp+58h+var_48] mov rsi, r12 mov rdx, r13 mov ecx, 2Fh ; '/' mov r8, rbp mov r9, [rsp+58h+var_40] call internalize_json_property mov rbx, rax mov r14, rdx mov rdi, [r15+18h] mov rsi, r12 mov rdx, r13 call JS_FreeValueRT mov rdx, r14 loc_4DD60: mov rcx, 0FFFFFFFF00000000h and rcx, rbx loc_4DD6D: mov r14, rdx jmp short loc_4DD87 loc_4DD72: mov rdi, [r15+18h] mov rsi, [rsp+58h+var_48] mov rdx, r13 loc_4DD7E: call JS_FreeValueRT xor ebx, ebx loc_4DD85: xor ecx, ecx loc_4DD87: mov eax, ebx or rax, rcx mov rdx, r14 add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long js_json_parse( long long a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, double a6, double a7, __m128 a8, __m128 a9, long long a10, long long a11, int a12, long long *a13) { long long v16; // rbx long long v17; // rax double v18; // xmm4_8 double v19; // xmm5_8 long long v20; // r12 long long v21; // rdx long long v22; // rdi int v23; // eax _QWORD *v24; // rsi long long v25; // r12 unsigned long long v26; // rcx long long v27; // r12 long long v28; // rbp long long v29; // r13 unsigned long long v30; // rax long long v31; // rdx __m128 v32; // xmm4 __m128 v33; // xmm5 long long v34; // r13 long long v35; // rdi _DWORD *v36; // rsi long long v37; // rdx _DWORD *v39; // [rsp+10h] [rbp-48h] long long v40; // [rsp+18h] [rbp-40h] long long v41[7]; // [rsp+20h] [rbp-38h] BYREF LODWORD(v16) = 0; v17 = JS_ToCStringLen2(a1, v41, *a13, a13[1], 0); if ( !v17 ) goto LABEL_16; v20 = v17; v16 = (long long)JS_ParseJSON(a1, v17, v41[0], (long long)"<input>", a2, a3, a4, a5, v18, v19, a8, a9); v22 = *(_QWORD *)(a1 + 24); v23 = *(_DWORD *)(v20 - 24); *(_DWORD *)(v20 - 24) = v23 - 1; if ( v23 <= 1 ) { v24 = (_QWORD *)(v20 - 24); v25 = v21; js_free_value_rt(v22, v24, -7); v21 = v25; } if ( (_DWORD)v21 != 6 ) { if ( a12 >= 2 ) { v27 = v21; v28 = a13[2]; v29 = a13[3]; if ( (unsigned int)JS_IsFunction(a1, v28, v29) ) { v40 = v29; v30 = JS_NewObjectProtoClass( a1, *(_QWORD *)(*(_QWORD *)(a1 + 64) + 16LL), *(_QWORD *)(*(_QWORD *)(a1 + 64) + 24LL), 1u); v34 = v31; if ( (_DWORD)v31 == 6 ) { v35 = *(_QWORD *)(a1 + 24); v36 = (_DWORD *)v16; v37 = v27; LABEL_15: JS_FreeValueRT(v35, v36, v37); LODWORD(v16) = 0; LABEL_16: v26 = 0LL; return v26 | (unsigned int)v16; } v39 = (_DWORD *)v30; if ( (int)JS_DefinePropertyValue( a1, v30, v31, 47LL, (_DWORD *)v16, v27, *(double *)a2.m128_u64, a3, a4, a5, v32, v33, a8, a9, 7) < 0 ) { v35 = *(_QWORD *)(a1 + 24); v36 = v39; v37 = v34; goto LABEL_15; } v16 = internalize_json_property(a1, v39, v34, 47LL, v28, v40); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v39, v34); } } v26 = v16 & 0xFFFFFFFF00000000LL; return v26 | (unsigned int)v16; } v26 = v16 & 0xFFFFFFFF00000000LL; return v26 | (unsigned int)v16; }
js_json_parse: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R13,R8 MOV EBP,ECX MOV R15,RDI MOV RDX,qword ptr [R8] MOV RCX,qword ptr [R8 + 0x8] LEA RSI,[RSP + 0x20] XOR EBX,EBX XOR R8D,R8D CALL 0x00120bf7 MOV R14D,0x6 TEST RAX,RAX JZ 0x0014dd85 MOV R12,RAX MOV RDX,qword ptr [RSP + 0x20] LEA RCX,[0x19f41b] MOV RDI,R15 MOV RSI,RAX CALL 0x00133ba9 MOV RBX,RAX MOV RDI,qword ptr [R15 + 0x18] MOV EAX,dword ptr [R12 + -0x18] LEA ECX,[RAX + -0x1] MOV dword ptr [R12 + -0x18],ECX CMP EAX,0x1 JG 0x0014dc84 ADD R12,-0x18 MOV RSI,R12 MOV R12,RDX MOV RDX,-0x7 CALL 0x00121266 MOV RDX,R12 LAB_0014dc84: CMP EDX,0x6 JNZ 0x0014dc9e MOV RAX,-0x100000000 MOV RCX,RBX AND RCX,RAX JMP 0x0014dd6d LAB_0014dc9e: CMP EBP,0x2 JL 0x0014dd60 MOV R12,RDX MOV RBP,qword ptr [R13 + 0x10] MOV R13,qword ptr [R13 + 0x18] MOV RDI,R15 MOV RSI,RBP MOV RDX,R13 CALL 0x00122dbe TEST EAX,EAX JZ 0x0014dcfa MOV qword ptr [RSP + 0x18],R13 MOV RAX,qword ptr [R15 + 0x40] MOV RSI,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RAX + 0x18] MOV RDI,R15 MOV ECX,0x1 CALL 0x00120f05 MOV R13,RDX CMP R13D,0x6 JNZ 0x0014dcff MOV RDI,qword ptr [R15 + 0x18] MOV RSI,RBX MOV RDX,R12 JMP 0x0014dd7e LAB_0014dcfa: MOV RDX,R12 JMP 0x0014dd60 LAB_0014dcff: MOV dword ptr [RSP],0x7 MOV RDI,R15 MOV qword ptr [RSP + 0x10],RAX MOV RSI,RAX MOV RDX,R13 MOV ECX,0x2f MOV R8,RBX MOV R9,R12 CALL 0x00126abb TEST EAX,EAX JS 0x0014dd72 MOV RDI,R15 MOV R12,qword ptr [RSP + 0x10] MOV RSI,R12 MOV RDX,R13 MOV ECX,0x2f MOV R8,RBP MOV R9,qword ptr [RSP + 0x18] CALL 0x0014dd9e MOV RBX,RAX MOV R14,RDX MOV RDI,qword ptr [R15 + 0x18] MOV RSI,R12 MOV RDX,R13 CALL 0x0011d8c6 MOV RDX,R14 LAB_0014dd60: MOV RCX,-0x100000000 AND RCX,RBX LAB_0014dd6d: MOV R14,RDX JMP 0x0014dd87 LAB_0014dd72: MOV RDI,qword ptr [R15 + 0x18] MOV RSI,qword ptr [RSP + 0x10] MOV RDX,R13 LAB_0014dd7e: CALL 0x0011d8c6 XOR EBX,EBX LAB_0014dd85: XOR ECX,ECX LAB_0014dd87: MOV EAX,EBX OR RAX,RCX MOV RDX,R14 ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_json_parse(long param_1,int8 param_2,int8 param_3,int param_4,int8 *param_5) { int8 uVar1; int iVar2; long lVar3; int8 uVar4; ulong uVar5; int8 uVar7; int1 auVar8 [16]; int1 auVar9 [16]; int8 local_38; int8 uVar6; lVar3 = JS_ToCStringLen2(param_1,&local_38,*param_5,param_5[1],0); if (lVar3 == 0) { LAB_0014dd85: auVar8 = ZEXT816(6) << 0x40; uVar5 = 0; } else { auVar8 = JS_ParseJSON(param_1,lVar3,local_38,"<input>"); uVar7 = *(int8 *)(param_1 + 0x18); iVar2 = *(int *)(lVar3 + -0x18); *(int *)(lVar3 + -0x18) = iVar2 + -1; if (iVar2 < 2) { js_free_value_rt(uVar7,lVar3 + -0x18,0xfffffffffffffff9); } if ((auVar8._8_4_ != 6) && (1 < param_4)) { uVar7 = param_5[2]; uVar1 = param_5[3]; iVar2 = JS_IsFunction(param_1,uVar7,uVar1); if (iVar2 != 0) { auVar9 = JS_NewObjectProtoClass (param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x10), *(int8 *)(*(long *)(param_1 + 0x40) + 0x18),1); uVar6 = auVar9._8_8_; uVar4 = auVar9._0_8_; if (auVar9._8_4_ == 6) { uVar7 = *(int8 *)(param_1 + 0x18); auVar9 = auVar8; } else { iVar2 = JS_DefinePropertyValue(param_1,uVar4,uVar6,0x2f,auVar8._0_8_,auVar8._8_8_,7); if (-1 < iVar2) { auVar8 = internalize_json_property(param_1,uVar4,uVar6,0x2f,uVar7,uVar1); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar4,uVar6); goto LAB_0014dd6d; } uVar7 = *(int8 *)(param_1 + 0x18); } JS_FreeValueRT(uVar7,auVar9._0_8_,auVar9._8_8_); goto LAB_0014dd85; } } LAB_0014dd6d: uVar5 = auVar8._0_8_ & 0xffffffff00000000; } auVar9._0_8_ = auVar8._0_8_ & 0xffffffff | uVar5; auVar9._8_8_ = auVar8._8_8_; return auVar9; }
40,651
js_json_parse
bluesky950520[P]quickjs/quickjs.c
static JSValue js_json_parse(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue obj, root; JSValue reviver; const char *str; size_t len; str = JS_ToCStringLen(ctx, &len, argv[0]); if (!str) return JS_EXCEPTION; obj = JS_ParseJSON(ctx, str, len, "<input>"); JS_FreeCString(ctx, str); if (JS_IsException(obj)) return obj; if (argc > 1 && JS_IsFunction(ctx, argv[1])) { reviver = argv[1]; root = JS_NewObject(ctx); if (JS_IsException(root)) { JS_FreeValue(ctx, obj); return JS_EXCEPTION; } if (JS_DefinePropertyValue(ctx, root, JS_ATOM_empty_string, obj, JS_PROP_C_W_E) < 0) { JS_FreeValue(ctx, root); return JS_EXCEPTION; } obj = internalize_json_property(ctx, root, JS_ATOM_empty_string, reviver); JS_FreeValue(ctx, root); } return obj; }
O2
c
js_json_parse: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %r8, %rbp movl %ecx, %r13d movq %rdi, %r15 movq (%r8), %rdx movq 0x8(%r8), %rcx leaq 0x20(%rsp), %rsi callq 0x36bee pushq $0x6 popq %rbx testq %rax, %rax je 0x42bb1 movq %rax, %r12 movq 0x20(%rsp), %rdx leaq 0x438ae(%rip), %rcx # 0x8636b movq %r15, %rdi movq %rax, %rsi callq 0x2d105 movq %rax, %r14 movq %r15, %rdi movq %r12, %rsi movq %rdx, %r12 callq 0x1b057 cmpl $0x6, %r12d jne 0x42af4 movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 movq %r14, %rcx andq %rax, %rcx jmp 0x42b9a cmpl $0x2, %r13d jl 0x42b8d movq 0x10(%rbp), %r13 movq 0x18(%rbp), %rbp movq %r15, %rdi movq %r13, %rsi movq %rbp, %rdx callq 0x1ce7d testl %eax, %eax je 0x42b8d movq %r15, %rdi callq 0x1b2c9 cmpl $0x6, %edx jne 0x42b30 movq %r15, %rdi movq %r14, %rsi movq %r12, %rdx jmp 0x42bac movl $0x7, (%rsp) pushq $0x2f popq %rcx movq %r15, %rdi movq %rax, 0x10(%rsp) movq %rax, %rsi movq %rdx, 0x18(%rsp) movq %r14, %r8 movq %r12, %r9 callq 0x20872 testl %eax, %eax js 0x42b9f pushq $0x2f popq %rcx movq %r15, %rdi movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rbx movq %rbx, %rdx movq %r13, %r8 movq %rbp, %r9 callq 0x42bf7 movq %rax, %r14 movq %rdx, %r12 movq %r15, %rdi movq 0x10(%rsp), %rsi movq %rbx, %rdx callq 0x1801e movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %r14, %rcx movq %r12, %rbx jmp 0x42bb6 movq %r15, %rdi movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rdx callq 0x1801e xorl %r14d, %r14d xorl %ecx, %ecx movl %r14d, %eax orq %rcx, %rax movq %rbx, %rdx addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_json_parse: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbp, r8 mov r13d, ecx mov r15, rdi mov rdx, [r8] mov rcx, [r8+8] lea rsi, [rsp+58h+var_38] call JS_ToCStringLen_0 push 6 pop rbx test rax, rax jz loc_42BB1 mov r12, rax mov rdx, [rsp+58h+var_38] lea rcx, aInput; "<input>" mov rdi, r15 mov rsi, rax call JS_ParseJSON mov r14, rax mov rdi, r15 mov rsi, r12 mov r12, rdx call JS_FreeCString cmp r12d, 6 jnz short loc_42AF4 mov rax, 0FFFFFFFF00000000h mov rcx, r14 and rcx, rax jmp loc_42B9A loc_42AF4: cmp r13d, 2 jl loc_42B8D mov r13, [rbp+10h] mov rbp, [rbp+18h] mov rdi, r15 mov rsi, r13 mov rdx, rbp call JS_IsFunction test eax, eax jz short loc_42B8D mov rdi, r15 call JS_NewObject cmp edx, 6 jnz short loc_42B30 mov rdi, r15 mov rsi, r14 mov rdx, r12 jmp short loc_42BAC loc_42B30: mov [rsp+58h+var_58], 7 push 2Fh ; '/' pop rcx mov rdi, r15 mov [rsp+58h+var_48], rax mov rsi, rax mov [rsp+58h+var_40], rdx mov r8, r14 mov r9, r12 call JS_DefinePropertyValue test eax, eax js short loc_42B9F push 2Fh ; '/' pop rcx mov rdi, r15 mov rsi, [rsp+58h+var_48] mov rbx, [rsp+58h+var_40] mov rdx, rbx mov r8, r13 mov r9, rbp call internalize_json_property mov r14, rax mov r12, rdx mov rdi, r15 mov rsi, [rsp+58h+var_48] mov rdx, rbx call JS_FreeValue loc_42B8D: mov rcx, 0FFFFFFFF00000000h and rcx, r14 loc_42B9A: mov rbx, r12 jmp short loc_42BB6 loc_42B9F: mov rdi, r15 mov rsi, [rsp+58h+var_48] mov rdx, [rsp+58h+var_40] loc_42BAC: call JS_FreeValue loc_42BB1: xor r14d, r14d xor ecx, ecx loc_42BB6: mov eax, r14d or rax, rcx mov rdx, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long js_json_parse( long long a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, double a6, double a7, __m128 a8, __m128 a9, long long a10, long long a11, int a12, long long *a13) { long long v15; // rax double v16; // xmm4_8 double v17; // xmm5_8 long long v18; // r12 long long v19; // r14 long long v20; // rsi long long v21; // rdx long long v22; // r12 unsigned long long v23; // rcx long long v24; // r13 long long v25; // rbp long long v26; // rax long long v27; // rdx __m128 v28; // xmm4 __m128 v29; // xmm5 long long v30; // rsi long long v31; // rdx long long v33; // [rsp+10h] [rbp-48h] long long v34; // [rsp+18h] [rbp-40h] long long v35[7]; // [rsp+20h] [rbp-38h] BYREF v15 = JS_ToCStringLen_0(a1, v35, *a13, a13[1]); if ( !v15 ) goto LABEL_13; v18 = v15; v19 = JS_ParseJSON(a1, v15, v35[0], (long long)"<input>", a2, a3, a4, a5, v16, v17, a8, a9); v20 = v18; v22 = v21; JS_FreeCString(a1, v20); if ( (_DWORD)v22 != 6 ) { if ( a12 >= 2 ) { v24 = a13[2]; v25 = a13[3]; if ( (unsigned int)JS_IsFunction(a1, v24, v25) ) { v26 = JS_NewObject(a1); if ( (_DWORD)v27 == 6 ) { v30 = v19; v31 = v22; LABEL_12: JS_FreeValue(a1, v30, v31); LABEL_13: LODWORD(v19) = 0; v23 = 0LL; return v23 | (unsigned int)v19; } v33 = v26; v34 = v27; if ( (int)JS_DefinePropertyValue( a1, v26, v27, 47LL, (_DWORD *)v19, v22, *(double *)a2.m128_u64, a3, a4, a5, v28, v29, a8, a9, 7) < 0 ) { v30 = v33; v31 = v34; goto LABEL_12; } v19 = internalize_json_property(a1, v33, v34, 47LL, v24, v25); JS_FreeValue(a1, v33, v34); } } v23 = v19 & 0xFFFFFFFF00000000LL; return v23 | (unsigned int)v19; } v23 = v19 & 0xFFFFFFFF00000000LL; return v23 | (unsigned int)v19; }
js_json_parse: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBP,R8 MOV R13D,ECX MOV R15,RDI MOV RDX,qword ptr [R8] MOV RCX,qword ptr [R8 + 0x8] LEA RSI,[RSP + 0x20] CALL 0x00136bee PUSH 0x6 POP RBX TEST RAX,RAX JZ 0x00142bb1 MOV R12,RAX MOV RDX,qword ptr [RSP + 0x20] LEA RCX,[0x18636b] MOV RDI,R15 MOV RSI,RAX CALL 0x0012d105 MOV R14,RAX MOV RDI,R15 MOV RSI,R12 MOV R12,RDX CALL 0x0011b057 CMP R12D,0x6 JNZ 0x00142af4 MOV RAX,-0x100000000 MOV RCX,R14 AND RCX,RAX JMP 0x00142b9a LAB_00142af4: CMP R13D,0x2 JL 0x00142b8d MOV R13,qword ptr [RBP + 0x10] MOV RBP,qword ptr [RBP + 0x18] MOV RDI,R15 MOV RSI,R13 MOV RDX,RBP CALL 0x0011ce7d TEST EAX,EAX JZ 0x00142b8d MOV RDI,R15 CALL 0x0011b2c9 CMP EDX,0x6 JNZ 0x00142b30 MOV RDI,R15 MOV RSI,R14 MOV RDX,R12 JMP 0x00142bac LAB_00142b30: MOV dword ptr [RSP],0x7 PUSH 0x2f POP RCX MOV RDI,R15 MOV qword ptr [RSP + 0x10],RAX MOV RSI,RAX MOV qword ptr [RSP + 0x18],RDX MOV R8,R14 MOV R9,R12 CALL 0x00120872 TEST EAX,EAX JS 0x00142b9f PUSH 0x2f POP RCX MOV RDI,R15 MOV RSI,qword ptr [RSP + 0x10] MOV RBX,qword ptr [RSP + 0x18] MOV RDX,RBX MOV R8,R13 MOV R9,RBP CALL 0x00142bf7 MOV R14,RAX MOV R12,RDX MOV RDI,R15 MOV RSI,qword ptr [RSP + 0x10] MOV RDX,RBX CALL 0x0011801e LAB_00142b8d: MOV RCX,-0x100000000 AND RCX,R14 LAB_00142b9a: MOV RBX,R12 JMP 0x00142bb6 LAB_00142b9f: MOV RDI,R15 MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x18] LAB_00142bac: CALL 0x0011801e LAB_00142bb1: XOR R14D,R14D XOR ECX,ECX LAB_00142bb6: MOV EAX,R14D OR RAX,RCX MOV RDX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_json_parse(int8 param_1,int8 param_2,int8 param_3,int param_4, int8 *param_5) { int8 uVar1; int8 uVar2; int iVar3; long lVar4; int8 uVar5; ulong uVar6; int1 auVar8 [16]; int1 auVar9 [16]; int8 local_38; int8 uVar7; lVar4 = JS_ToCStringLen(param_1,&local_38,*param_5,param_5[1]); if (lVar4 == 0) { LAB_00142bb1: auVar8 = ZEXT816(6) << 0x40; uVar6 = 0; } else { auVar8 = JS_ParseJSON(param_1,lVar4,local_38,"<input>"); JS_FreeCString(param_1,lVar4); if ((auVar8._8_4_ != 6) && (1 < param_4)) { uVar1 = param_5[2]; uVar2 = param_5[3]; iVar3 = JS_IsFunction(param_1,uVar1,uVar2); if (iVar3 != 0) { auVar9 = JS_NewObject(param_1); uVar7 = auVar9._8_8_; uVar5 = auVar9._0_8_; if ((auVar9._8_4_ == 6) || (iVar3 = JS_DefinePropertyValue(param_1,uVar5,uVar7,0x2f,auVar8._0_8_,auVar8._8_8_,7), auVar8 = auVar9, iVar3 < 0)) { JS_FreeValue(param_1,auVar8._0_8_,auVar8._8_8_); goto LAB_00142bb1; } auVar8 = internalize_json_property(param_1,uVar5,uVar7,0x2f,uVar1,uVar2); JS_FreeValue(param_1,uVar5,uVar7); } } uVar6 = auVar8._0_8_ & 0xffffffff00000000; } auVar9._0_8_ = auVar8._0_8_ & 0xffffffff | uVar6; auVar9._8_8_ = auVar8._8_8_; return auVar9; }
40,652
add_compiled_extra_collation
eloqsql/mysys/charset.c
void add_compiled_extra_collation(struct charset_info_st *cs) { DBUG_ASSERT(cs->number < array_elements(all_charsets)); all_charsets[cs->number]= cs; cs->state|= MY_CS_AVAILABLE; if ((my_hash_insert(&charset_name_hash, (uchar*) cs))) { CHARSET_INFO *org= (CHARSET_INFO*) my_hash_search(&charset_name_hash, (uchar*) cs->cs_name.str, cs->cs_name.length); cs->cs_name= org->cs_name; } }
O0
c
add_compiled_extra_collation: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) jmp 0x7ca1e movq -0x8(%rbp), %rdx movq -0x8(%rbp), %rax movl (%rax), %eax movl %eax, %ecx leaq 0x387c2f(%rip), %rax # 0x404660 movq %rdx, (%rax,%rcx,8) movq -0x8(%rbp), %rax movl 0xc(%rax), %ecx orl $0x200, %ecx # imm = 0x200 movl %ecx, 0xc(%rax) movq -0x8(%rbp), %rsi leaq 0x38bc10(%rip), %rdi # 0x408660 callq 0x81c20 cmpb $0x0, %al je 0x7ca91 movq -0x8(%rbp), %rax movq 0x10(%rax), %rsi movq -0x8(%rbp), %rax movq 0x18(%rax), %rdx leaq 0x38bbf0(%rip), %rdi # 0x408660 callq 0x81830 movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movq -0x10(%rbp), %rcx movq 0x10(%rcx), %rdx movq %rdx, 0x10(%rax) movq 0x18(%rcx), %rcx movq %rcx, 0x18(%rax) addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
add_compiled_extra_collation: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi jmp short $+2 loc_7CA1E: mov rdx, [rbp+var_8] mov rax, [rbp+var_8] mov eax, [rax] mov ecx, eax lea rax, all_charsets mov [rax+rcx*8], rdx mov rax, [rbp+var_8] mov ecx, [rax+0Ch] or ecx, 200h mov [rax+0Ch], ecx mov rsi, [rbp+var_8] lea rdi, charset_name_hash call my_hash_insert cmp al, 0 jz short loc_7CA91 mov rax, [rbp+var_8] mov rsi, [rax+10h] mov rax, [rbp+var_8] mov rdx, [rax+18h] lea rdi, charset_name_hash call my_hash_search mov [rbp+var_10], rax mov rax, [rbp+var_8] mov rcx, [rbp+var_10] mov rdx, [rcx+10h] mov [rax+10h], rdx mov rcx, [rcx+18h] mov [rax+18h], rcx loc_7CA91: add rsp, 10h pop rbp retn
long long add_compiled_extra_collation(unsigned int *a1) { long long result; // rax long long v2; // [rsp+0h] [rbp-10h] all_charsets[*a1] = a1; a1[3] |= 0x200u; result = my_hash_insert(&charset_name_hash, a1); if ( (_BYTE)result ) { v2 = my_hash_search(&charset_name_hash, *((_QWORD *)a1 + 2), *((_QWORD *)a1 + 3)); result = (long long)a1; *((_QWORD *)a1 + 2) = *(_QWORD *)(v2 + 16); *((_QWORD *)a1 + 3) = *(_QWORD *)(v2 + 24); } return result; }
add_compiled_extra_collation: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI JMP 0x0017ca1e LAB_0017ca1e: MOV RDX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX] MOV ECX,EAX LEA RAX,[0x504660] MOV qword ptr [RAX + RCX*0x8],RDX MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0xc] OR ECX,0x200 MOV dword ptr [RAX + 0xc],ECX MOV RSI,qword ptr [RBP + -0x8] LEA RDI,[0x508660] CALL 0x00181c20 CMP AL,0x0 JZ 0x0017ca91 MOV RAX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RAX + 0x18] LEA RDI,[0x508660] CALL 0x00181830 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RCX + 0x10] MOV qword ptr [RAX + 0x10],RDX MOV RCX,qword ptr [RCX + 0x18] MOV qword ptr [RAX + 0x18],RCX LAB_0017ca91: ADD RSP,0x10 POP RBP RET
void add_compiled_extra_collation(uint *param_1) { char cVar1; long lVar2; (&all_charsets)[*param_1] = param_1; param_1[3] = param_1[3] | 0x200; cVar1 = my_hash_insert(charset_name_hash,param_1); if (cVar1 != '\0') { lVar2 = my_hash_search(charset_name_hash,*(int8 *)(param_1 + 4), *(int8 *)(param_1 + 6)); *(int8 *)(param_1 + 4) = *(int8 *)(lVar2 + 0x10); *(int8 *)(param_1 + 6) = *(int8 *)(lVar2 + 0x18); } return; }
40,653
LefDefParser::lefwEndViaRuleGen(char const*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwEndViaRuleGen(const char *viaRuleName) { if (!lefwFile) return LEFW_UNINITIALIZED; if (lefwState != LEFW_VIARULEGEN_START && lefwState != LEFW_VIARULEGEN) return LEFW_BAD_ORDER; if (lefwWriteEncrypt) encPrint(lefwFile, (char*) "END %s\n\n", viaRuleName); else fprintf(lefwFile, "END %s\n\n", viaRuleName); lefwLines++; lefwState = LEFW_VIARULEGEN_END; lefwDidLayer = 0; lefwNumViaRuleLayers = 0; return LEFW_OK; }
O3
cpp
LefDefParser::lefwEndViaRuleGen(char const*): pushq %rbx movq %rdi, %rdx leaq 0x15295(%rip), %rax # 0x24e00 movq (%rax), %rdi testq %rdi, %rdi je 0xfba4 leaq 0x154d6(%rip), %rbx # 0x25050 movl (%rbx), %ecx cmpl $0x4c, %ecx je 0xfb8b movl $0x2, %eax cmpl $0x11, %ecx jne 0xfbdc cmpb $0x1, 0x1555a(%rip) # 0x250ec jne 0xfbab leaq 0xb840(%rip), %rsi # 0x1b3db xorl %eax, %eax callq 0x18c35 jmp 0xfbb9 movl $0x1, %eax jmp 0xfbdc leaq 0xb829(%rip), %rsi # 0x1b3db xorl %eax, %eax callq 0x10f0 leaq 0x1548c(%rip), %rax # 0x2504c incl (%rax) movl $0x5f, (%rbx) leaq 0x15489(%rip), %rcx # 0x25058 xorl %eax, %eax movl %eax, (%rcx) leaq 0x154fe(%rip), %rcx # 0x250d8 movl %eax, (%rcx) popq %rbx retq
_ZN12LefDefParser17lefwEndViaRuleGenEPKc: push rbx mov rdx, rdi lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] test rdi, rdi jz short loc_FBA4 lea rbx, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov ecx, [rbx] cmp ecx, 4Ch ; 'L' jz short loc_FB8B mov eax, 2 cmp ecx, 11h jnz short loc_FBDC loc_FB8B: cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt jnz short loc_FBAB lea rsi, aEndS+3; "END %s\n\n" xor eax, eax call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_FBB9 loc_FBA4: mov eax, 1 jmp short loc_FBDC loc_FBAB: lea rsi, aEndS+3; "END %s\n\n" xor eax, eax call _fprintf loc_FBB9: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines inc dword ptr [rax] mov dword ptr [rbx], 5Fh ; '_' lea rcx, _ZN12LefDefParser12lefwDidLayerE; LefDefParser::lefwDidLayer xor eax, eax mov [rcx], eax lea rcx, _ZN12LefDefParser20lefwNumViaRuleLayersE; LefDefParser::lefwNumViaRuleLayers mov [rcx], eax loc_FBDC: pop rbx retn
long long LefDefParser::lefwEndViaRuleGen( LefDefParser *this, const char *a2, long long a3, long long a4, int a5, int a6) { long long result; // rax if ( !*(_QWORD *)&LefDefParser::lefwFile ) return 1LL; if ( LefDefParser::lefwState == 76 || (result = 2LL, LefDefParser::lefwState == 17) ) { if ( LefDefParser::lefwWriteEncrypt == 1 ) LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)"END %s\n\n", (_DWORD)this, LefDefParser::lefwState, a5, a6); else fprintf(*(_QWORD *)&LefDefParser::lefwFile, "END %s\n\n", (const char *)this); ++LefDefParser::lefwLines; LefDefParser::lefwState = 95; result = 0LL; LefDefParser::lefwDidLayer = 0; LefDefParser::lefwNumViaRuleLayers = 0; } return result; }
lefwEndViaRuleGen: PUSH RBX MOV RDX,RDI LEA RAX,[0x124e00] MOV RDI,qword ptr [RAX] TEST RDI,RDI JZ 0x0010fba4 LEA RBX,[0x125050] MOV ECX,dword ptr [RBX] CMP ECX,0x4c JZ 0x0010fb8b MOV EAX,0x2 CMP ECX,0x11 JNZ 0x0010fbdc LAB_0010fb8b: CMP byte ptr [0x001250ec],0x1 JNZ 0x0010fbab LEA RSI,[0x11b3db] XOR EAX,EAX CALL 0x00118c35 JMP 0x0010fbb9 LAB_0010fba4: MOV EAX,0x1 JMP 0x0010fbdc LAB_0010fbab: LEA RSI,[0x11b3db] XOR EAX,EAX CALL 0x001010f0 LAB_0010fbb9: LEA RAX,[0x12504c] INC dword ptr [RAX] MOV dword ptr [RBX],0x5f LEA RCX,[0x125058] XOR EAX,EAX MOV dword ptr [RCX],EAX LEA RCX,[0x1250d8] MOV dword ptr [RCX],EAX LAB_0010fbdc: POP RBX RET
/* LefDefParser::lefwEndViaRuleGen(char const*) */ int8 LefDefParser::lefwEndViaRuleGen(char *param_1) { int8 uVar1; if (lefwFile == (_IO_FILE *)0x0) { uVar1 = 1; } else if ((lefwState == 0x4c) || (uVar1 = 2, lefwState == 0x11)) { if (lefwWriteEncrypt == '\x01') { encPrint(lefwFile,"END %s\n\n"); } else { fprintf(lefwFile,"END %s\n\n",param_1); } lefwLines = lefwLines + 1; lefwState = 0x5f; uVar1 = 0; lefwDidLayer = 0; lefwNumViaRuleLayers = 0; } return uVar1; }
40,654
ma_read_rnd_mempack_record
eloqsql/storage/maria/ma_packrec.c
static int _ma_read_rnd_mempack_record(MARIA_HA *info, uchar *buf, register MARIA_RECORD_POS filepos, my_bool skip_deleted_blocks __attribute__((unused))) { MARIA_BLOCK_INFO block_info; MARIA_SHARE *share= info->s; uchar *pos,*start; DBUG_ENTER("_ma_read_rnd_mempack_record"); if (filepos >= share->state.state.data_file_length) { my_errno=HA_ERR_END_OF_FILE; goto err; } if (!(pos= (uchar*) _ma_mempack_get_block_info(info, &info->bit_buff, &block_info, &info->rec_buff, &info->rec_buff_size, (uchar*) (start= share->file_map + filepos)))) goto err; #ifndef DBUG_OFF if (block_info.rec_len > info->s->max_pack_length) { _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); goto err; } #endif info->packed_length=block_info.rec_len; info->cur_row.lastpos= filepos; info->cur_row.nextpos= filepos+(uint) (pos-start)+block_info.rec_len; info->update|= HA_STATE_AKTIV | HA_STATE_KEY_CHANGED; DBUG_RETURN (_ma_pack_rec_unpack(info, &info->bit_buff, buf, pos, block_info.rec_len)); err: DBUG_RETURN(my_errno); }
O3
c
ma_read_rnd_mempack_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdi, %r14 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq (%rdi), %rdi cmpq %rdx, 0x40(%rdi) jbe 0x4502d movq %rdx, %r15 movq %rsi, %rbx leaq 0x290(%r14), %r12 leaq 0x3a0(%r14), %rcx leaq 0x460(%r14), %r8 movq 0x5f0(%rdi), %r13 addq %rdx, %r13 leaq -0x88(%rbp), %rdx movq %r12, %rsi movq %r13, %r9 callq 0x4693d testq %rax, %rax je 0x45038 movq -0x70(%rbp), %r8 movq %r8, 0x450(%r14) movq %r15, 0x98(%r14) movl %eax, %ecx subl %r13d, %ecx addq %r8, %r15 addq %rcx, %r15 movq %r15, 0xa0(%r14) orb $-0x7e, 0x624(%r14) movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x4505d movq %r14, %rdi movq %r12, %rsi movq %rbx, %rdx movq %rax, %rcx addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x44a9d callq 0xa1ac2 movl $0x89, (%rax) callq 0xa1ac2 movl (%rax), %eax movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x4505d addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29250
_ma_read_rnd_mempack_record: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r14, rdi mov rax, fs:28h mov [rbp+var_30], rax mov rdi, [rdi] cmp [rdi+40h], rdx jbe loc_4502D mov r15, rdx mov rbx, rsi lea r12, [r14+290h] lea rcx, [r14+3A0h] lea r8, [r14+460h] mov r13, [rdi+5F0h] add r13, rdx lea rdx, [rbp+var_88] mov rsi, r12 mov r9, r13 call _ma_mempack_get_block_info test rax, rax jz short loc_45038 mov r8, [rbp+var_70] mov [r14+450h], r8 mov [r14+98h], r15 mov ecx, eax sub ecx, r13d add r15, r8 add r15, rcx mov [r14+0A0h], r15 or byte ptr [r14+624h], 82h mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz short loc_4505D mov rdi, r14 mov rsi, r12 mov rdx, rbx mov rcx, rax add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _ma_pack_rec_unpack loc_4502D: call _my_thread_var mov dword ptr [rax], 89h loc_45038: call _my_thread_var mov eax, [rax] mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz short loc_4505D add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4505D: call ___stack_chk_fail
long long ma_read_rnd_mempack_record(long long *a1, long long a2, unsigned long long a3) { long long v4; // rdi unsigned long long v6; // r13 long long block_info; // rax int v8; // r9d long long v9; // r8 _BYTE v11[24]; // [rsp+8h] [rbp-88h] BYREF long long v12; // [rsp+20h] [rbp-70h] unsigned long long v13; // [rsp+60h] [rbp-30h] v13 = __readfsqword(0x28u); v4 = *a1; if ( *(_QWORD *)(v4 + 64) <= a3 ) { *(_DWORD *)my_thread_var(v4) = 137; } else { v6 = a3 + *(_QWORD *)(v4 + 1520); block_info = ma_mempack_get_block_info(v4, a1 + 82, v11, a1 + 116, a1 + 140, v6); if ( block_info ) { v9 = v12; a1[138] = v12; a1[19] = a3; a1[20] = (unsigned int)(block_info - v6) + v9 + a3; *((_BYTE *)a1 + 1572) |= 0x82u; return ma_pack_rec_unpack(a1, (long long)(a1 + 82), a2, block_info, v9, v8); } } return *(unsigned int *)my_thread_var(v4); }
_ma_read_rnd_mempack_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R14,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RDI] CMP qword ptr [RDI + 0x40],RDX JBE 0x0014502d MOV R15,RDX MOV RBX,RSI LEA R12,[R14 + 0x290] LEA RCX,[R14 + 0x3a0] LEA R8,[R14 + 0x460] MOV R13,qword ptr [RDI + 0x5f0] ADD R13,RDX LEA RDX,[RBP + -0x88] MOV RSI,R12 MOV R9,R13 CALL 0x0014693d TEST RAX,RAX JZ 0x00145038 MOV R8,qword ptr [RBP + -0x70] MOV qword ptr [R14 + 0x450],R8 MOV qword ptr [R14 + 0x98],R15 MOV ECX,EAX SUB ECX,R13D ADD R15,R8 ADD R15,RCX MOV qword ptr [R14 + 0xa0],R15 OR byte ptr [R14 + 0x624],0x82 MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x0014505d MOV RDI,R14 MOV RSI,R12 MOV RDX,RBX MOV RCX,RAX ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00144a9d LAB_0014502d: CALL 0x001a1ac2 MOV dword ptr [RAX],0x89 LAB_00145038: CALL 0x001a1ac2 MOV EAX,dword ptr [RAX] MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x0014505d ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014505d: CALL 0x00129250
ulong _ma_read_rnd_mempack_record(long *param_1,int8 param_2,ulong param_3) { long lVar1; ulong uVar2; int4 *puVar3; uint *puVar4; long lVar5; long in_FS_OFFSET; int1 local_90 [24]; long local_78; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); lVar1 = *param_1; if (param_3 < *(ulong *)(lVar1 + 0x40)) { lVar5 = *(long *)(lVar1 + 0x5f0) + param_3; lVar1 = _ma_mempack_get_block_info (lVar1,param_1 + 0x52,local_90,param_1 + 0x74,param_1 + 0x8c,lVar5); if (lVar1 != 0) { param_1[0x8a] = local_78; param_1[0x13] = param_3; param_1[0x14] = param_3 + local_78 + (ulong)(uint)((int)lVar1 - (int)lVar5); *(byte *)((long)param_1 + 0x624) = *(byte *)((long)param_1 + 0x624) | 0x82; if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { uVar2 = _ma_pack_rec_unpack(param_1,param_1 + 0x52,param_2,lVar1); return uVar2; } goto LAB_0014505d; } } else { puVar3 = (int4 *)_my_thread_var(); *puVar3 = 0x89; } puVar4 = (uint *)_my_thread_var(); if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return (ulong)*puVar4; } LAB_0014505d: /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
40,655
testing::AssertionResult::~AssertionResult()
AlayaLite/build_O0/_deps/googletest-src/googletest/include/gtest/gtest-assertion-result.h
class GTEST_API_ AssertionResult { public: // Copy constructor. // Used in EXPECT_TRUE/FALSE(assertion_result). AssertionResult(const AssertionResult& other); // C4800 is a level 3 warning in Visual Studio 2015 and earlier. // This warning is not emitted in Visual Studio 2017. // This warning is off by default starting in Visual Studio 2019 but can be // enabled with command-line options. #if defined(_MSC_VER) && (_MSC_VER < 1910 || _MSC_VER >= 1920) GTEST_DISABLE_MSC_WARNINGS_PUSH_(4800 /* forcing value to bool */) #endif // Used in the EXPECT_TRUE/FALSE(bool_expression). // // T must be contextually convertible to bool. // // The second parameter prevents this overload from being considered if // the argument is implicitly convertible to AssertionResult. In that case // we want AssertionResult's copy constructor to be used. template <typename T> explicit AssertionResult( const T& success, typename std::enable_if< !std::is_convertible<T, AssertionResult>::value>::type* /*enabler*/ = nullptr) : success_(success) {} #if defined(_MSC_VER) && (_MSC_VER < 1910 || _MSC_VER >= 1920) GTEST_DISABLE_MSC_WARNINGS_POP_() #endif // Assignment operator. AssertionResult& operator=(AssertionResult other) { swap(other); return *this; } // Returns true if and only if the assertion succeeded. operator bool() const { return success_; } // NOLINT // Returns the assertion's negation. Used with EXPECT/ASSERT_FALSE. AssertionResult operator!() const; // Returns the text streamed into this AssertionResult. Test assertions // use it when they fail (i.e., the predicate's outcome doesn't match the // assertion's expectation). When nothing has been streamed into the // object, returns an empty string. const char* message() const { return message_ != nullptr ? message_->c_str() : ""; } // Deprecated; please use message() instead. const char* failure_message() const { return message(); } // Streams a custom failure message into this object. template <typename T> AssertionResult& operator<<(const T& value) { AppendMessage(Message() << value); return *this; } // Allows streaming basic output manipulators such as endl or flush into // this object. AssertionResult& operator<<( ::std::ostream& (*basic_manipulator)(::std::ostream& stream)) { AppendMessage(Message() << basic_manipulator); return *this; } private: // Appends the contents of message to message_. void AppendMessage(const Message& a_message) { if (message_ == nullptr) message_ = ::std::make_unique<::std::string>(); message_->append(a_message.GetString().c_str()); }
O0
c
testing::AssertionResult::~AssertionResult(): pushq %rax movq %rdi, (%rsp) movq (%rsp), %rdi addq $0x8, %rdi callq 0xfcd0 popq %rax retq nopw %cs:(%rax,%rax) nop
_ZN7testing15AssertionResultD2Ev: push rax mov [rsp+8+var_8], rdi mov rdi, [rsp+8+var_8] add rdi, 8 call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::string>::~unique_ptr() pop rax retn
void testing::AssertionResult::~AssertionResult(testing::AssertionResult *this) { std::unique_ptr<std::string>::~unique_ptr((char *)this + 8); }
~AssertionResult: PUSH RAX MOV qword ptr [RSP],RDI MOV RDI,qword ptr [RSP] ADD RDI,0x8 CALL 0x0010fcd0 POP RAX RET
/* testing::AssertionResult::~AssertionResult() */ AssertionResult * __thiscall testing::AssertionResult::~AssertionResult(AssertionResult *this) { std::unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>>::~unique_ptr ((unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>> *) (this + 8)); return this; }
40,656
rlp_add_uint
corpus-core[P]colibri-stateless/src/chains/eth/verifier/rlp.c
INTERNAL void rlp_add_uint(buffer_t* buf, bytes_t data) { while (data.len && data.data[0] == 0) { data.data++; data.len--; } rlp_add_item(buf, data); }
O0
c
rlp_add_uint: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %esi, -0x10(%rbp) movq %rdx, -0x8(%rbp) movq %rdi, -0x18(%rbp) xorl %eax, %eax cmpl $0x0, -0x10(%rbp) movb %al, -0x19(%rbp) je 0x368be movq -0x8(%rbp), %rax movzbl (%rax), %eax cmpl $0x0, %eax sete %al movb %al, -0x19(%rbp) movb -0x19(%rbp), %al testb $0x1, %al jne 0x368c7 jmp 0x368de movq -0x8(%rbp), %rax addq $0x1, %rax movq %rax, -0x8(%rbp) movl -0x10(%rbp), %eax addl $-0x1, %eax movl %eax, -0x10(%rbp) jmp 0x368a3 movq -0x18(%rbp), %rdi movl -0x10(%rbp), %esi movq -0x8(%rbp), %rdx callq 0x366c0 addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
rlp_add_uint: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], esi mov [rbp+var_8], rdx mov [rbp+var_18], rdi loc_368A3: xor eax, eax cmp [rbp+var_10], 0 mov [rbp+var_19], al jz short loc_368BE mov rax, [rbp+var_8] movzx eax, byte ptr [rax] cmp eax, 0 setz al mov [rbp+var_19], al loc_368BE: mov al, [rbp+var_19] test al, 1 jnz short loc_368C7 jmp short loc_368DE loc_368C7: mov rax, [rbp+var_8] add rax, 1 mov [rbp+var_8], rax mov eax, [rbp+var_10] add eax, 0FFFFFFFFh mov [rbp+var_10], eax jmp short loc_368A3 loc_368DE: mov rdi, [rbp+var_18] mov esi, [rbp+var_10] mov rdx, [rbp+var_8] call rlp_add_item add rsp, 20h pop rbp retn
long long rlp_add_uint(long long a1, unsigned int a2, unsigned __int8 *a3, int a4, int a5, int a6) { bool v7; // [rsp+7h] [rbp-19h] while ( 1 ) { v7 = 0; if ( a2 ) v7 = *a3 == 0; if ( !v7 ) break; ++a3; --a2; } return rlp_add_item(a1, a2, a3, a4, a5, a6); }
rlp_add_uint: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x10],ESI MOV qword ptr [RBP + -0x8],RDX MOV qword ptr [RBP + -0x18],RDI LAB_001368a3: XOR EAX,EAX CMP dword ptr [RBP + -0x10],0x0 MOV byte ptr [RBP + -0x19],AL JZ 0x001368be MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX] CMP EAX,0x0 SETZ AL MOV byte ptr [RBP + -0x19],AL LAB_001368be: MOV AL,byte ptr [RBP + -0x19] TEST AL,0x1 JNZ 0x001368c7 JMP 0x001368de LAB_001368c7: MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x1 MOV qword ptr [RBP + -0x8],RAX MOV EAX,dword ptr [RBP + -0x10] ADD EAX,-0x1 MOV dword ptr [RBP + -0x10],EAX JMP 0x001368a3 LAB_001368de: MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x8] CALL 0x001366c0 ADD RSP,0x20 POP RBP RET
void rlp_add_uint(int8 param_1,int param_2,char *param_3) { bool bVar1; int local_18; char *local_10; local_18 = param_2; local_10 = param_3; while( true ) { bVar1 = false; if (local_18 != 0) { bVar1 = *local_10 == '\0'; } if (!bVar1) break; local_10 = local_10 + 1; local_18 = local_18 + -1; } rlp_add_item(param_1,local_18,local_10); return; }
40,657
translog_variable_record_1group_decode_len
eloqsql/storage/maria/ma_loghandler.c
static translog_size_t translog_variable_record_1group_decode_len(uchar **src) { uint8 first= (uint8) (**src); switch (first) { case 251: (*src)+= 3; return (uint2korr((*src) - 2)); case 252: (*src)+= 4; return (uint3korr((*src) - 3)); case 253: (*src)+= 5; return (uint4korr((*src) - 4)); case 254: case 255: DBUG_ASSERT(0); /* reserved for future use */ return (0); default: (*src)++; return (first); } }
O0
c
translog_variable_record_1group_decode_len: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movb (%rax), %al movb %al, -0x11(%rbp) movzbl -0x11(%rbp), %eax addl $0xffffff05, %eax # imm = 0xFFFFFF05 movl %eax, %ecx movq %rcx, -0x20(%rbp) subl $0x4, %eax ja 0x59056 movq -0x20(%rbp), %rax leaq 0xffe51(%rip), %rcx # 0x158e18 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x3, %rcx movq %rcx, (%rax) movq -0x10(%rbp), %rax movq (%rax), %rax movzwl -0x2(%rax), %eax movl %eax, -0x4(%rbp) jmp 0x5906b movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) movq -0x10(%rbp), %rax movq (%rax), %rax movzbl -0x3(%rax), %eax movq -0x10(%rbp), %rcx movq (%rcx), %rcx movzbl -0x2(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x10(%rbp), %rcx movq (%rcx), %rcx movzbl -0x1(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movl %eax, -0x4(%rbp) jmp 0x5906b movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x5, %rcx movq %rcx, (%rax) movq -0x10(%rbp), %rax movq (%rax), %rax movl -0x4(%rax), %eax movl %eax, -0x4(%rbp) jmp 0x5906b jmp 0x5904b jmp 0x5904d movl $0x0, -0x4(%rbp) jmp 0x5906b movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x1, %rcx movq %rcx, (%rax) movzbl -0x11(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq
translog_variable_record_1group_decode_len: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax] mov al, [rax] mov [rbp+var_11], al movzx eax, [rbp+var_11] add eax, 0FFFFFF05h; switch 5 cases mov ecx, eax mov [rbp+var_20], rcx sub eax, 4 ja def_58FCE; jumptable 0000000000058FCE default case mov rax, [rbp+var_20] lea rcx, jpt_58FCE movsxd rax, ds:(jpt_58FCE - 158E18h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_58FD0: mov rax, [rbp+var_10]; jumptable 0000000000058FCE case 251 mov rcx, [rax] add rcx, 3 mov [rax], rcx mov rax, [rbp+var_10] mov rax, [rax] movzx eax, word ptr [rax-2] mov [rbp+var_4], eax jmp short loc_5906B loc_58FEE: mov rax, [rbp+var_10]; jumptable 0000000000058FCE case 252 mov rcx, [rax] add rcx, 4 mov [rax], rcx mov rax, [rbp+var_10] mov rax, [rax] movzx eax, byte ptr [rax-3] mov rcx, [rbp+var_10] mov rcx, [rcx] movzx ecx, byte ptr [rcx-2] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_10] mov rcx, [rcx] movzx ecx, byte ptr [rcx-1] shl ecx, 10h or eax, ecx mov [rbp+var_4], eax jmp short loc_5906B loc_5902C: mov rax, [rbp+var_10]; jumptable 0000000000058FCE case 253 mov rcx, [rax] add rcx, 5 mov [rax], rcx mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax-4] mov [rbp+var_4], eax jmp short loc_5906B loc_59049: jmp short $+2; jumptable 0000000000058FCE cases 254,255 loc_5904B: jmp short $+2 loc_5904D: mov [rbp+var_4], 0 jmp short loc_5906B def_58FCE: mov rax, [rbp+var_10]; jumptable 0000000000058FCE default case mov rcx, [rax] add rcx, 1 mov [rax], rcx movzx eax, [rbp+var_11] mov [rbp+var_4], eax loc_5906B: mov eax, [rbp+var_4] pop rbp retn
long long translog_variable_record_1group_decode_len(unsigned __int8 **a1) { unsigned __int8 v2; // [rsp+Fh] [rbp-11h] unsigned int v3; // [rsp+1Ch] [rbp-4h] v2 = **a1; switch ( v2 ) { case 0xFBu: *a1 += 3; v3 = *((unsigned __int16 *)*a1 - 1); break; case 0xFCu: *a1 += 4; v3 = (*(*a1 - 1) << 16) | *(unsigned __int16 *)(*a1 - 3); break; case 0xFDu: *a1 += 5; v3 = *((_DWORD *)*a1 - 1); break; case 0xFEu: case 0xFFu: v3 = 0; break; default: ++*a1; v3 = v2; break; } return v3; }
translog_variable_record_1group_decode_len: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x11],AL MOVZX EAX,byte ptr [RBP + -0x11] ADD EAX,0xffffff05 MOV ECX,EAX MOV qword ptr [RBP + -0x20],RCX SUB EAX,0x4 JA 0x00159056 MOV RAX,qword ptr [RBP + -0x20] LEA RCX,[0x258e18] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_fb: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x3 MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOVZX EAX,word ptr [RAX + -0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x0015906b caseD_fc: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x4 MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOVZX EAX,byte ptr [RAX + -0x3] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + -0x2] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + -0x1] SHL ECX,0x10 OR EAX,ECX MOV dword ptr [RBP + -0x4],EAX JMP 0x0015906b caseD_fd: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x5 MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + -0x4] MOV dword ptr [RBP + -0x4],EAX JMP 0x0015906b caseD_fe: JMP 0x0015904b LAB_0015904b: JMP 0x0015904d LAB_0015904d: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0015906b default: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x1 MOV qword ptr [RAX],RCX MOVZX EAX,byte ptr [RBP + -0x11] MOV dword ptr [RBP + -0x4],EAX LAB_0015906b: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
uint translog_variable_record_1group_decode_len(long *param_1) { byte bVar1; uint local_c; bVar1 = *(byte *)*param_1; switch(bVar1) { case 0xfb: *param_1 = *param_1 + 3; local_c = (uint)*(ushort *)(*param_1 + -2); break; case 0xfc: *param_1 = *param_1 + 4; local_c = (uint)CONCAT12(*(int1 *)(*param_1 + -1), CONCAT11(*(int1 *)(*param_1 + -2),*(int1 *)(*param_1 + -3)) ); break; case 0xfd: *param_1 = *param_1 + 5; local_c = *(uint *)(*param_1 + -4); break; case 0xfe: case 0xff: local_c = 0; break; default: *param_1 = *param_1 + 1; local_c = (uint)bVar1; } return local_c; }
40,658
keys_free
eloqsql/storage/myisam/mi_write.c
static int keys_free(void* key_arg, TREE_FREE mode, void *param_arg) { /* Probably I can use info->lastkey here, but I'm not sure, and to be safe I'd better use local lastkey. */ bulk_insert_param *param= (bulk_insert_param*)param_arg; uchar lastkey[HA_MAX_KEY_BUFF], *key= (uchar*)key_arg; uint keylen; MI_KEYDEF *keyinfo; switch (mode) { case free_init: if (param->info->s->concurrent_insert) { mysql_rwlock_wrlock(&param->info->s->key_root_lock[param->keynr]); param->info->s->keyinfo[param->keynr].version++; } return 0; case free_free: keyinfo=param->info->s->keyinfo+param->keynr; keylen=_mi_keylength(keyinfo, key); memcpy(lastkey, key, keylen); _mi_ck_write_btree(param->info, param->keynr, lastkey, keylen - param->info->s->rec_reflength); return 0; case free_end: if (param->info->s->concurrent_insert) mysql_rwlock_unlock(&param->info->s->key_root_lock[param->keynr]); return 0; } return 0; }
O0
c
keys_free: pushq %rbp movq %rsp, %rbp subq $0x510, %rsp # imm = 0x510 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x4d0(%rbp) movl %esi, -0x4d4(%rbp) movq %rdx, -0x4e0(%rbp) movq -0x4e0(%rbp), %rax movq %rax, -0x4e8(%rbp) movq -0x4d0(%rbp), %rax movq %rax, -0x4f0(%rbp) movl -0x4d4(%rbp), %eax movl %eax, -0x504(%rbp) testl %eax, %eax je 0xc7dff jmp 0xc7dda movl -0x504(%rbp), %eax subl $0x1, %eax je 0xc7e8b jmp 0xc7deb movl -0x504(%rbp), %eax subl $0x2, %eax je 0xc7f30 jmp 0xc7f7f movq -0x4e8(%rbp), %rax movq (%rax), %rax movq (%rax), %rax cmpb $0x0, 0x384(%rax) je 0xc7e7c movq -0x4e8(%rbp), %rax movq (%rax), %rax movq (%rax), %rax movq 0x4c8(%rax), %rdi movq -0x4e8(%rbp), %rax movl 0x8(%rax), %eax imulq $0x98, %rax, %rax addq %rax, %rdi leaq 0x91d43(%rip), %rsi # 0x159b87 movl $0x3b4, %edx # imm = 0x3B4 callq 0xc5430 movq -0x4e8(%rbp), %rax movq (%rax), %rax movq (%rax), %rax movq 0x218(%rax), %rax movq -0x4e8(%rbp), %rcx movl 0x8(%rcx), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax movl 0x1c(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x1c(%rax) movl $0x0, -0x4c4(%rbp) jmp 0xc7f89 movq -0x4e8(%rbp), %rax movq (%rax), %rax movq (%rax), %rax movq 0x218(%rax), %rax movq -0x4e8(%rbp), %rcx movl 0x8(%rcx), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax movq %rax, -0x500(%rbp) movq -0x500(%rbp), %rdi movq -0x4f0(%rbp), %rsi callq 0xc1450 movl %eax, -0x4f4(%rbp) leaq -0x4c0(%rbp), %rdi movq -0x4f0(%rbp), %rsi movl -0x4f4(%rbp), %eax movl %eax, %edx callq 0x2a0b0 movq -0x4e8(%rbp), %rax movq (%rax), %rdi movq -0x4e8(%rbp), %rax movl 0x8(%rax), %esi leaq -0x4c0(%rbp), %rdx movl -0x4f4(%rbp), %ecx movq -0x4e8(%rbp), %rax movq (%rax), %rax movq (%rax), %rax subl 0x338(%rax), %ecx callq 0xc5680 movl $0x0, -0x4c4(%rbp) jmp 0xc7f89 movq -0x4e8(%rbp), %rax movq (%rax), %rax movq (%rax), %rax cmpb $0x0, 0x384(%rax) je 0xc7f73 movq -0x4e8(%rbp), %rax movq (%rax), %rax movq (%rax), %rax movq 0x4c8(%rax), %rdi movq -0x4e8(%rbp), %rax movl 0x8(%rax), %eax imulq $0x98, %rax, %rax addq %rax, %rdi callq 0xc54a0 movl $0x0, -0x4c4(%rbp) jmp 0xc7f89 movl $0x0, -0x4c4(%rbp) movl -0x4c4(%rbp), %eax movl %eax, -0x508(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xc7fb6 movl -0x508(%rbp), %eax addq $0x510, %rsp # imm = 0x510 popq %rbp retq callq 0x2a250 nopl (%rax,%rax)
keys_free_0: push rbp mov rbp, rsp sub rsp, 510h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_4D0], rdi mov [rbp+var_4D4], esi mov [rbp+var_4E0], rdx mov rax, [rbp+var_4E0] mov [rbp+var_4E8], rax mov rax, [rbp+var_4D0] mov [rbp+var_4F0], rax mov eax, [rbp+var_4D4] mov [rbp+var_504], eax test eax, eax jz short loc_C7DFF jmp short $+2 loc_C7DDA: mov eax, [rbp+var_504] sub eax, 1 jz loc_C7E8B jmp short $+2 loc_C7DEB: mov eax, [rbp+var_504] sub eax, 2 jz loc_C7F30 jmp loc_C7F7F loc_C7DFF: mov rax, [rbp+var_4E8] mov rax, [rax] mov rax, [rax] cmp byte ptr [rax+384h], 0 jz short loc_C7E7C mov rax, [rbp+var_4E8] mov rax, [rax] mov rax, [rax] mov rdi, [rax+4C8h] mov rax, [rbp+var_4E8] mov eax, [rax+8] imul rax, 98h add rdi, rax lea rsi, aWorkspaceLlm4b_31; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 3B4h call inline_mysql_rwlock_wrlock_3 mov rax, [rbp+var_4E8] mov rax, [rax] mov rax, [rax] mov rax, [rax+218h] mov rcx, [rbp+var_4E8] mov ecx, [rcx+8] imul rcx, 70h ; 'p' add rax, rcx mov ecx, [rax+1Ch] add ecx, 1 mov [rax+1Ch], ecx loc_C7E7C: mov [rbp+var_4C4], 0 jmp loc_C7F89 loc_C7E8B: mov rax, [rbp+var_4E8] mov rax, [rax] mov rax, [rax] mov rax, [rax+218h] mov rcx, [rbp+var_4E8] mov ecx, [rcx+8] imul rcx, 70h ; 'p' add rax, rcx mov [rbp+var_500], rax mov rdi, [rbp+var_500] mov rsi, [rbp+var_4F0] call _mi_keylength mov [rbp+var_4F4], eax lea rdi, [rbp+var_4C0] mov rsi, [rbp+var_4F0] mov eax, [rbp+var_4F4] mov edx, eax call _memcpy mov rax, [rbp+var_4E8] mov rdi, [rax] mov rax, [rbp+var_4E8] mov esi, [rax+8] lea rdx, [rbp+var_4C0] mov ecx, [rbp+var_4F4] mov rax, [rbp+var_4E8] mov rax, [rax] mov rax, [rax] sub ecx, [rax+338h] call _mi_ck_write_btree mov [rbp+var_4C4], 0 jmp short loc_C7F89 loc_C7F30: mov rax, [rbp+var_4E8] mov rax, [rax] mov rax, [rax] cmp byte ptr [rax+384h], 0 jz short loc_C7F73 mov rax, [rbp+var_4E8] mov rax, [rax] mov rax, [rax] mov rdi, [rax+4C8h] mov rax, [rbp+var_4E8] mov eax, [rax+8] imul rax, 98h add rdi, rax call inline_mysql_rwlock_unlock_7 loc_C7F73: mov [rbp+var_4C4], 0 jmp short loc_C7F89 loc_C7F7F: mov [rbp+var_4C4], 0 loc_C7F89: mov eax, [rbp+var_4C4] mov [rbp+var_508], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_C7FB6 mov eax, [rbp+var_508] add rsp, 510h pop rbp retn loc_C7FB6: call ___stack_chk_fail
long long keys_free_0(unsigned __int8 *a1, int a2, unsigned int *a3) { long long v3; // rax unsigned int v5; // [rsp+1Ch] [rbp-4F4h] unsigned __int8 v7[1208]; // [rsp+50h] [rbp-4C0h] BYREF unsigned long long v8; // [rsp+508h] [rbp-8h] v8 = __readfsqword(0x28u); if ( a2 ) { if ( a2 == 1 ) { v5 = mi_keylength(112LL * a3[2] + *(_QWORD *)(**(_QWORD **)a3 + 536LL), a1); memcpy(v7, a1, v5); mi_ck_write_btree(*(_QWORD **)a3, a3[2], v7, v5 - *(_DWORD *)(**(_QWORD **)a3 + 824LL)); } else if ( a2 == 2 && *(_BYTE *)(**(_QWORD **)a3 + 900LL) ) { inline_mysql_rwlock_unlock_7(152LL * a3[2] + *(_QWORD *)(**(_QWORD **)a3 + 1224LL)); } } else if ( *(_BYTE *)(**(_QWORD **)a3 + 900LL) ) { inline_mysql_rwlock_wrlock_3( 152LL * a3[2] + *(_QWORD *)(**(_QWORD **)a3 + 1224LL), (long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_write.c", 0x3B4u); v3 = 112LL * a3[2] + *(_QWORD *)(**(_QWORD **)a3 + 536LL); ++*(_DWORD *)(v3 + 28); } return 0LL; }
keys_free: PUSH RBP MOV RBP,RSP SUB RSP,0x510 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x4d0],RDI MOV dword ptr [RBP + -0x4d4],ESI MOV qword ptr [RBP + -0x4e0],RDX MOV RAX,qword ptr [RBP + -0x4e0] MOV qword ptr [RBP + -0x4e8],RAX MOV RAX,qword ptr [RBP + -0x4d0] MOV qword ptr [RBP + -0x4f0],RAX MOV EAX,dword ptr [RBP + -0x4d4] MOV dword ptr [RBP + -0x504],EAX TEST EAX,EAX JZ 0x001c7dff JMP 0x001c7dda LAB_001c7dda: MOV EAX,dword ptr [RBP + -0x504] SUB EAX,0x1 JZ 0x001c7e8b JMP 0x001c7deb LAB_001c7deb: MOV EAX,dword ptr [RBP + -0x504] SUB EAX,0x2 JZ 0x001c7f30 JMP 0x001c7f7f LAB_001c7dff: MOV RAX,qword ptr [RBP + -0x4e8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX] CMP byte ptr [RAX + 0x384],0x0 JZ 0x001c7e7c MOV RAX,qword ptr [RBP + -0x4e8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + 0x4c8] MOV RAX,qword ptr [RBP + -0x4e8] MOV EAX,dword ptr [RAX + 0x8] IMUL RAX,RAX,0x98 ADD RDI,RAX LEA RSI,[0x259b87] MOV EDX,0x3b4 CALL 0x001c5430 MOV RAX,qword ptr [RBP + -0x4e8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RCX,qword ptr [RBP + -0x4e8] MOV ECX,dword ptr [RCX + 0x8] IMUL RCX,RCX,0x70 ADD RAX,RCX MOV ECX,dword ptr [RAX + 0x1c] ADD ECX,0x1 MOV dword ptr [RAX + 0x1c],ECX LAB_001c7e7c: MOV dword ptr [RBP + -0x4c4],0x0 JMP 0x001c7f89 LAB_001c7e8b: MOV RAX,qword ptr [RBP + -0x4e8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RCX,qword ptr [RBP + -0x4e8] MOV ECX,dword ptr [RCX + 0x8] IMUL RCX,RCX,0x70 ADD RAX,RCX MOV qword ptr [RBP + -0x500],RAX MOV RDI,qword ptr [RBP + -0x500] MOV RSI,qword ptr [RBP + -0x4f0] CALL 0x001c1450 MOV dword ptr [RBP + -0x4f4],EAX LEA RDI,[RBP + -0x4c0] MOV RSI,qword ptr [RBP + -0x4f0] MOV EAX,dword ptr [RBP + -0x4f4] MOV EDX,EAX CALL 0x0012a0b0 MOV RAX,qword ptr [RBP + -0x4e8] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x4e8] MOV ESI,dword ptr [RAX + 0x8] LEA RDX,[RBP + -0x4c0] MOV ECX,dword ptr [RBP + -0x4f4] MOV RAX,qword ptr [RBP + -0x4e8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX] SUB ECX,dword ptr [RAX + 0x338] CALL 0x001c5680 MOV dword ptr [RBP + -0x4c4],0x0 JMP 0x001c7f89 LAB_001c7f30: MOV RAX,qword ptr [RBP + -0x4e8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX] CMP byte ptr [RAX + 0x384],0x0 JZ 0x001c7f73 MOV RAX,qword ptr [RBP + -0x4e8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + 0x4c8] MOV RAX,qword ptr [RBP + -0x4e8] MOV EAX,dword ptr [RAX + 0x8] IMUL RAX,RAX,0x98 ADD RDI,RAX CALL 0x001c54a0 LAB_001c7f73: MOV dword ptr [RBP + -0x4c4],0x0 JMP 0x001c7f89 LAB_001c7f7f: MOV dword ptr [RBP + -0x4c4],0x0 LAB_001c7f89: MOV EAX,dword ptr [RBP + -0x4c4] MOV dword ptr [RBP + -0x508],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001c7fb6 MOV EAX,dword ptr [RBP + -0x508] ADD RSP,0x510 POP RBP RET LAB_001c7fb6: CALL 0x0012a250
int4 keys_free(void *param_1,int param_2,int8 *param_3) { uint uVar1; long lVar2; long in_FS_OFFSET; int1 local_4c8 [1208]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); if (param_2 == 0) { if (*(char *)(*(long *)*param_3 + 900) != '\0') { inline_mysql_rwlock_wrlock (*(long *)(*(long *)*param_3 + 0x4c8) + (ulong)*(uint *)(param_3 + 1) * 0x98, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_write.c",0x3b4); lVar2 = *(long *)(*(long *)*param_3 + 0x218) + (ulong)*(uint *)(param_3 + 1) * 0x70; *(int *)(lVar2 + 0x1c) = *(int *)(lVar2 + 0x1c) + 1; } } else if (param_2 == 1) { uVar1 = _mi_keylength(*(long *)(*(long *)*param_3 + 0x218) + (ulong)*(uint *)(param_3 + 1) * 0x70,param_1); memcpy(local_4c8,param_1,(ulong)uVar1); _mi_ck_write_btree(*param_3,*(int4 *)(param_3 + 1),local_4c8, uVar1 - *(int *)(*(long *)*param_3 + 0x338)); } else if ((param_2 == 2) && (*(char *)(*(long *)*param_3 + 900) != '\0')) { inline_mysql_rwlock_unlock (*(long *)(*(long *)*param_3 + 0x4c8) + (ulong)*(uint *)(param_3 + 1) * 0x98); } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return 0; }
40,659
my_thread_global_init
eloqsql/mysys/my_thr_init.c
my_bool my_thread_global_init(void) { int pth_ret; /* Normally this should never be called twice */ DBUG_ASSERT(my_thread_global_init_done == 0); if (my_thread_global_init_done) return 0; my_thread_global_init_done= 1; /* THR_KEY_mysys is deleted in my_end() as DBUG libraries are using it even after my_thread_global_end() is called. my_thr_key_mysys_exist is used to protect against application like QT that calls my_thread_global_init() + my_thread_global_end() multiple times without calling my_init() + my_end(). */ if (!my_thr_key_mysys_exists && (pth_ret= pthread_key_create(&THR_KEY_mysys, NULL)) != 0) { fprintf(stderr, "Can't initialize threads: error %d\n", pth_ret); return 1; } my_thr_key_mysys_exists= 1; /* Mutex used by my_thread_init() and after my_thread_destroy_mutex() */ my_thread_init_internal_mutex(); if (my_thread_init()) return 1; my_thread_init_common_mutex(); return 0; }
O3
c
my_thread_global_init: cmpb $0x0, 0x348285(%rip) # 0x379cc0 je 0x31a40 xorl %eax, %eax retq pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movb $0x1, 0x348273(%rip) # 0x379cc0 leaq 0x347fa8(%rip), %rbx # 0x3799fc cmpb $0x0, (%rbx) je 0x31a77 movb $0x1, (%rbx) callq 0x3188f callq 0x31ab1 movl %eax, %ecx movb $0x1, %al testb %cl, %cl jne 0x31aaa callq 0x31702 xorl %eax, %eax jmp 0x31aaa leaq 0x348246(%rip), %rdi # 0x379cc4 xorl %esi, %esi callq 0x245f0 testl %eax, %eax je 0x31a59 movq 0x2c8540(%rip), %rcx # 0x2f9fd0 movq (%rcx), %rdi leaq 0x33650(%rip), %rdx # 0x650ea movl $0x1, %esi movl %eax, %ecx xorl %eax, %eax callq 0x24640 movb $0x1, %al addq $0x8, %rsp popq %rbx popq %rbp retq
my_thread_global_init: cmp cs:my_thread_global_init_done, 0 jz short loc_31A40 xor eax, eax retn loc_31A40: push rbp mov rbp, rsp push rbx push rax mov cs:my_thread_global_init_done, 1 lea rbx, my_thr_key_mysys_exists cmp byte ptr [rbx], 0 jz short loc_31A77 loc_31A59: mov byte ptr [rbx], 1 call my_thread_init_internal_mutex call my_thread_init mov ecx, eax mov al, 1 test cl, cl jnz short loc_31AAA call my_thread_init_common_mutex xor eax, eax jmp short loc_31AAA loc_31A77: lea rdi, THR_KEY_mysys xor esi, esi call _pthread_key_create test eax, eax jz short loc_31A59 mov rcx, cs:stderr_ptr mov rdi, [rcx] lea rdx, aCanTInitialize; "Can't initialize threads: error %d\n" mov esi, 1 mov ecx, eax xor eax, eax call ___fprintf_chk mov al, 1 loc_31AAA: add rsp, 8 pop rbx pop rbp retn
char my_thread_global_init(void *a1) { char result; // al char v2; // cl int v3; // eax if ( my_thread_global_init_done ) return 0; my_thread_global_init_done = 1; if ( my_thr_key_mysys_exists || (a1 = &THR_KEY_mysys, (v3 = pthread_key_create(&THR_KEY_mysys, 0LL)) == 0) ) { my_thr_key_mysys_exists = 1; my_thread_init_internal_mutex(); v2 = my_thread_init(a1); result = 1; if ( !v2 ) { my_thread_init_common_mutex(); return 0; } } else { __fprintf_chk(stderr, 1LL, "Can't initialize threads: error %d\n", v3); return 1; } return result; }
my_thread_global_init: CMP byte ptr [0x00479cc0],0x0 JZ 0x00131a40 XOR EAX,EAX RET LAB_00131a40: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV byte ptr [0x00479cc0],0x1 LEA RBX,[0x4799fc] CMP byte ptr [RBX],0x0 JZ 0x00131a77 LAB_00131a59: MOV byte ptr [RBX],0x1 CALL 0x0013188f CALL 0x00131ab1 MOV ECX,EAX MOV AL,0x1 TEST CL,CL JNZ 0x00131aaa CALL 0x00131702 XOR EAX,EAX JMP 0x00131aaa LAB_00131a77: LEA RDI,[0x479cc4] XOR ESI,ESI CALL 0x001245f0 TEST EAX,EAX JZ 0x00131a59 MOV RCX,qword ptr [0x003f9fd0] MOV RDI,qword ptr [RCX] LEA RDX,[0x1650ea] MOV ESI,0x1 MOV ECX,EAX XOR EAX,EAX CALL 0x00124640 MOV AL,0x1 LAB_00131aaa: ADD RSP,0x8 POP RBX POP RBP RET
bool my_thread_global_init(void) { char cVar1; int iVar2; if (my_thread_global_init_done != '\0') { return false; } my_thread_global_init_done = 1; if ((my_thr_key_mysys_exists == '\0') && (iVar2 = pthread_key_create(&THR_KEY_mysys,(__destr_function *)0x0), iVar2 != 0)) { __fprintf_chk(*(int8 *)PTR_stderr_003f9fd0,1,"Can\'t initialize threads: error %d\n",iVar2 ); return true; } my_thr_key_mysys_exists = 1; my_thread_init_internal_mutex(); cVar1 = my_thread_init(); if (cVar1 == '\0') { my_thread_init_common_mutex(); } return cVar1 != '\0'; }
40,660
common_ngram_cache_save(std::unordered_map<common_ngram, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>, common_ngram_hash_function, std::equal_to<common_ngram>, std::allocator<std::pair<common_ngram const, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
monkey531[P]llama/common/ngram-cache.cpp
void common_ngram_cache_save(common_ngram_cache & ngram_cache, std::string & filename) { std::ofstream file_out(filename, std::ios::binary); for (std::pair<common_ngram, common_ngram_cache_part> item : ngram_cache) { const common_ngram ngram = item.first; common_ngram_cache_part token_counts = item.second; GGML_ASSERT(!token_counts.empty()); const int32_t ntokens = token_counts.size(); GGML_ASSERT(ntokens > 0); file_out.write(reinterpret_cast<const char *>(&ngram), sizeof(common_ngram)); file_out.write(reinterpret_cast<const char *>(&ntokens), sizeof(int32_t)); for (std::pair<llama_token, int32_t> item2 : token_counts) { const llama_token token = item2.first; const int32_t count = item2.second; GGML_ASSERT(count > 0); file_out.write(reinterpret_cast<const char *>(&token), sizeof(llama_token)); file_out.write(reinterpret_cast<const char *>(&count), sizeof(int32_t)); } } }
O2
cpp
common_ngram_cache_save(std::unordered_map<common_ngram, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>, common_ngram_hash_function, std::equal_to<common_ngram>, std::allocator<std::pair<common_ngram const, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x2a8, %rsp # imm = 0x2A8 movq %rdi, %r14 leaq 0xa8(%rsp), %r15 pushq $0x4 popq %rdx movq %r15, %rdi callq 0x25100 addq $0x10, %r14 leaq 0x28(%rsp), %r13 pushq $0x4 popq %r12 leaq 0x8(%rsp), %rbp leaq 0x4(%rsp), %rbx movq (%r14), %r14 testq %r14, %r14 je 0x98193 leaq 0x8(%r14), %rsi leaq 0x60(%rsp), %rdi callq 0x9873c movups 0x60(%rsp), %xmm0 movaps %xmm0, 0x10(%rsp) movq %r13, %rdi leaq 0x70(%rsp), %rsi callq 0x98a4c movq 0x40(%rsp), %rax testq %rax, %rax je 0x981d3 movl %eax, 0xc(%rsp) testl %eax, %eax jle 0x981f4 movq %r15, %rdi leaq 0x10(%rsp), %rsi pushq $0x10 popq %rdx callq 0x24b40 movq %r15, %rdi leaq 0xc(%rsp), %rsi movq %r12, %rdx callq 0x24b40 leaq 0x38(%rsp), %r13 movq (%r13), %r13 testq %r13, %r13 je 0x98177 movl 0x8(%r13), %eax movl 0xc(%r13), %ecx movl %eax, 0x8(%rsp) movl %ecx, 0x4(%rsp) testl %ecx, %ecx jle 0x981b2 movq %r15, %rdi movq %rbp, %rsi movq %r12, %rdx callq 0x24b40 movq %r15, %rdi movq %rbx, %rsi movq %r12, %rdx callq 0x24b40 jmp 0x9813c leaq 0x28(%rsp), %r13 movq %r13, %rdi callq 0x2800e leaq 0x70(%rsp), %rdi callq 0x2800e jmp 0x980cc leaq 0xa8(%rsp), %rdi callq 0x24cc0 addq $0x2a8, %rsp # imm = 0x2A8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x22d1b(%rip), %rdi # 0xbaed4 leaq 0x13f80(%rip), %rdx # 0xac140 leaq 0x22db0(%rip), %rcx # 0xbaf77 movl $0xd5, %esi xorl %eax, %eax callq 0x24e90 leaq 0x22cfa(%rip), %rdi # 0xbaed4 leaq 0x13f5f(%rip), %rdx # 0xac140 leaq 0x22d6d(%rip), %rcx # 0xbaf55 movl $0xcc, %esi xorl %eax, %eax callq 0x24e90 leaq 0x22cd9(%rip), %rdi # 0xbaed4 leaq 0x13f3e(%rip), %rdx # 0xac140 leaq 0x22d62(%rip), %rcx # 0xbaf6b movl $0xce, %esi xorl %eax, %eax callq 0x24e90 jmp 0x98227 jmp 0x98227 movq %rax, %rbx jmp 0x9823e movq %rax, %rbx jmp 0x98234 jmp 0x98227 jmp 0x98227 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x2800e leaq 0x70(%rsp), %rdi callq 0x2800e leaq 0xa8(%rsp), %rdi callq 0x24cc0 movq %rbx, %rdi callq 0x24f60
_Z23common_ngram_cache_saveRSt13unordered_mapI12common_ngramS_IiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE26common_ngram_hash_functionS3_IS0_ESaIS5_IKS0_S9_EEERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 2A8h mov r14, rdi lea r15, [rsp+2D8h+var_230] push 4 pop rdx mov rdi, r15 call __ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ofstream::basic_ofstream(std::string const&,std::_Ios_Openmode) add r14, 10h lea r13, [rsp+2D8h+var_2B0] push 4 pop r12 lea rbp, [rsp+2D8h+var_2D0] lea rbx, [rsp+2D8h+var_2D4] loc_980CC: mov r14, [r14] test r14, r14 jz loc_98193 lea rsi, [r14+8] lea rdi, [rsp+2D8h+var_278] call _ZNSt4pairI12common_ngramSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaIS_IKiiEEEEC2IKS0_S9_TnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE18_ConstructiblePairISE_SF_EEclsr6_PCCFPISE_SF_EE26_ImplicitlyConvertiblePairISE_SF_EEEbE4typeELb1EEERKS_ISE_SF_E movups xmm0, [rsp+2D8h+var_278] movaps xmmword ptr [rsp+2D8h+var_2C8], xmm0 mov rdi, r13 lea rsi, [rsp+2D8h+var_268] call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEEC2ERKSF_; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_Hashtable(std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> const&) mov rax, [rsp+2D8h+var_298] test rax, rax jz loc_981D3 mov dword ptr [rsp+2D8h+var_2CC], eax test eax, eax jle loc_981F4 mov rdi, r15; this lea rsi, [rsp+2D8h+var_2C8]; char * push 10h pop rdx; __int64 call __ZNSo5writeEPKcl; std::ostream::write(char const*,long) mov rdi, r15; this lea rsi, [rsp+2D8h+var_2CC]; char * mov rdx, r12; __int64 call __ZNSo5writeEPKcl; std::ostream::write(char const*,long) lea r13, [rsp+2D8h+var_2A0] loc_9813C: mov r13, [r13+0] test r13, r13 jz short loc_98177 mov eax, [r13+8] mov ecx, [r13+0Ch] mov dword ptr [rsp+2D8h+var_2D0], eax mov dword ptr [rsp+2D8h+var_2D4], ecx test ecx, ecx jle short loc_981B2 mov rdi, r15; this mov rsi, rbp; char * mov rdx, r12; __int64 call __ZNSo5writeEPKcl; std::ostream::write(char const*,long) mov rdi, r15; this mov rsi, rbx; char * mov rdx, r12; __int64 call __ZNSo5writeEPKcl; std::ostream::write(char const*,long) jmp short loc_9813C loc_98177: lea r13, [rsp+2D8h+var_2B0] mov rdi, r13 call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() lea rdi, [rsp+2D8h+var_268] call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() jmp loc_980CC loc_98193: lea rdi, [rsp+2D8h+var_230] call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream() add rsp, 2A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_981B2: lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCount0; "count > 0" mov esi, 0D5h xor eax, eax call _ggml_abort loc_981D3: lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTokenCountsEmp; "!token_counts.empty()" mov esi, 0CCh xor eax, eax call _ggml_abort loc_981F4: lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNtokens0; "ntokens > 0" mov esi, 0CEh xor eax, eax call _ggml_abort jmp short loc_98227 jmp short loc_98227 mov rbx, rax jmp short loc_9823E mov rbx, rax jmp short loc_98234 jmp short loc_98227 jmp short $+2 loc_98227: mov rbx, rax lea rdi, [rsp+2D8h+var_2B0] call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() loc_98234: lea rdi, [rsp+2D8h+var_268] call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() loc_9823E: lea rdi, [rsp+2D8h+var_230] call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream() mov rdi, rbx call __Unwind_Resume
long long common_ngram_cache_save(long long a1, long long a2) { _QWORD *v2; // r14 char *v3; // r13 int v4; // ecx long long v6; // rbx char v7[4]; // [rsp+4h] [rbp-2D4h] BYREF char v8[4]; // [rsp+8h] [rbp-2D0h] BYREF char v9[4]; // [rsp+Ch] [rbp-2CCh] BYREF char v10[24]; // [rsp+10h] [rbp-2C8h] BYREF _BYTE v11[16]; // [rsp+28h] [rbp-2B0h] BYREF char v12; // [rsp+38h] [rbp-2A0h] BYREF long long v13; // [rsp+40h] [rbp-298h] __int128 v14; // [rsp+60h] [rbp-278h] BYREF _BYTE v15[56]; // [rsp+70h] [rbp-268h] BYREF _BYTE v16[560]; // [rsp+A8h] [rbp-230h] BYREF std::ofstream::basic_ofstream(v16, a2, 4LL); v2 = (_QWORD *)(a1 + 16); while ( 1 ) { v2 = (_QWORD *)*v2; if ( !v2 ) return std::ofstream::~ofstream(v16); ZNSt4pairI12common_ngramSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaIS_IKiiEEEEC2IKS0_S9_TnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE18_ConstructiblePairISE_SF_EEclsr6_PCCFPISE_SF_EE26_ImplicitlyConvertiblePairISE_SF_EEEbE4typeELb1EEERKS_ISE_SF_E( &v14, v2 + 1); *(_OWORD *)v10 = v14; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_Hashtable( v11, v15); if ( !v13 ) goto LABEL_12; *(_DWORD *)v9 = v13; if ( (int)v13 <= 0 ) { LABEL_13: v6 = ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/ngram-cache.cpp", 206LL, "GGML_ASSERT(%s) failed", "ntokens > 0"); std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable((long long)v11); std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable((long long)v15); std::ofstream::~ofstream(v16); _Unwind_Resume(v6); } std::ostream::write((std::ostream *)v16, v10, 16LL); std::ostream::write((std::ostream *)v16, v9, 4LL); v3 = &v12; while ( 1 ) { v3 = *(char **)v3; if ( !v3 ) break; v4 = *((_DWORD *)v3 + 3); *(_DWORD *)v8 = *((_DWORD *)v3 + 2); *(_DWORD *)v7 = v4; if ( v4 <= 0 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/ngram-cache.cpp", 213LL, "GGML_ASSERT(%s) failed", "count > 0"); LABEL_12: ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/ngram-cache.cpp", 204LL, "GGML_ASSERT(%s) failed", "!token_counts.empty()"); goto LABEL_13; } std::ostream::write((std::ostream *)v16, v8, 4LL); std::ostream::write((std::ostream *)v16, v7, 4LL); } std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable((long long)v11); std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable((long long)v15); } }
common_ngram_cache_save: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x2a8 MOV R14,RDI LEA R15,[RSP + 0xa8] PUSH 0x4 POP RDX MOV RDI,R15 CALL 0x00125100 ADD R14,0x10 LEA R13,[RSP + 0x28] PUSH 0x4 POP R12 LEA RBP,[RSP + 0x8] LEA RBX,[RSP + 0x4] LAB_001980cc: MOV R14,qword ptr [R14] TEST R14,R14 JZ 0x00198193 LEA RSI,[R14 + 0x8] LAB_001980dc: LEA RDI,[RSP + 0x60] CALL 0x0019873c MOVUPS XMM0,xmmword ptr [RSP + 0x60] MOVAPS xmmword ptr [RSP + 0x10],XMM0 LAB_001980f0: MOV RDI,R13 LEA RSI,[RSP + 0x70] CALL 0x00198a4c MOV RAX,qword ptr [RSP + 0x40] TEST RAX,RAX JZ 0x001981d3 MOV dword ptr [RSP + 0xc],EAX TEST EAX,EAX JLE 0x001981f4 LAB_00198117: MOV RDI,R15 LEA RSI,[RSP + 0x10] PUSH 0x10 POP RDX CALL 0x00124b40 MOV RDI,R15 LEA RSI,[RSP + 0xc] MOV RDX,R12 CALL 0x00124b40 LEA R13,[RSP + 0x38] LAB_0019813c: MOV R13,qword ptr [R13] TEST R13,R13 JZ 0x00198177 MOV EAX,dword ptr [R13 + 0x8] MOV ECX,dword ptr [R13 + 0xc] MOV dword ptr [RSP + 0x8],EAX MOV dword ptr [RSP + 0x4],ECX TEST ECX,ECX JLE 0x001981b2 LAB_00198159: MOV RDI,R15 MOV RSI,RBP MOV RDX,R12 CALL 0x00124b40 MOV RDI,R15 MOV RSI,RBX MOV RDX,R12 CALL 0x00124b40 JMP 0x0019813c LAB_00198177: LEA R13,[RSP + 0x28] MOV RDI,R13 CALL 0x0012800e LEA RDI,[RSP + 0x70] CALL 0x0012800e JMP 0x001980cc LAB_00198193: LEA RDI,[RSP + 0xa8] CALL 0x00124cc0 ADD RSP,0x2a8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001981b2: LEA RDI,[0x1baed4] LEA RDX,[0x1ac140] LEA RCX,[0x1baf77] MOV ESI,0xd5 XOR EAX,EAX CALL 0x00124e90 LAB_001981d3: LEA RDI,[0x1baed4] LEA RDX,[0x1ac140] LEA RCX,[0x1baf55] MOV ESI,0xcc XOR EAX,EAX CALL 0x00124e90 LAB_001981f4: LEA RDI,[0x1baed4] LEA RDX,[0x1ac140] LEA RCX,[0x1baf6b] MOV ESI,0xce XOR EAX,EAX CALL 0x00124e90
/* common_ngram_cache_save(std::unordered_map<common_ngram, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int> > >, common_ngram_hash_function, std::equal_to<common_ngram>, std::allocator<std::pair<common_ngram const, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int> > > > > >&, std::__cxx11::string&) */ void common_ngram_cache_save(unordered_map *param_1,string *param_2) { long *plVar1; unordered_map *puVar2; int local_2d4; int4 local_2d0; int local_2cc; int8 local_2c8; int8 uStack_2c0; _Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> local_2b0 [16]; long local_2a0; long local_298; int8 local_278; int8 uStack_270; _Hashtable local_268 [56]; ofstream local_230 [512]; std::ofstream::ofstream(local_230,param_2,4); puVar2 = param_1 + 0x10; while( true ) { puVar2 = *(unordered_map **)puVar2; if (puVar2 == (unordered_map *)0x0) { std::ofstream::~ofstream(local_230); return; } /* try { // try from 001980dc to 001980e5 has its CatchHandler @ 00198219 */ _ZNSt4pairI12common_ngramSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaIS_IKiiEEEEC2IKS0_S9_TnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE18_ConstructiblePairISE_SF_EEclsr6_PCCFPISE_SF_EE26_ImplicitlyConvertiblePairISE_SF_EEEbE4typeELb1EEERKS_ISE_SF_E (&local_278,puVar2 + 8); local_2c8 = local_278; uStack_2c0 = uStack_270; /* try { // try from 001980f0 to 001980fc has its CatchHandler @ 0019821e */ std:: _Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> ::_Hashtable(local_2b0,local_268); if (local_298 == 0) break; local_2cc = (int)local_298; if (local_2cc < 1) { /* try { // try from 001981f4 to 00198214 has its CatchHandler @ 00198215 */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/ngram-cache.cpp", 0xce,"GGML_ASSERT(%s) failed","ntokens > 0"); } /* try { // try from 00198117 to 00198136 has its CatchHandler @ 00198223 */ std::ostream::write((char *)local_230,(long)&local_2c8); std::ostream::write((char *)local_230,(long)&local_2cc); plVar1 = &local_2a0; while (plVar1 = (long *)*plVar1, plVar1 != (long *)0x0) { local_2d0 = *(int4 *)(plVar1 + 1); local_2d4 = *(int *)((long)plVar1 + 0xc); if (local_2d4 < 1) { /* try { // try from 001981b2 to 001981d2 has its CatchHandler @ 00198225 */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/ngram-cache.cpp" ,0xd5,"GGML_ASSERT(%s) failed","count > 0"); } /* try { // try from 00198159 to 00198174 has its CatchHandler @ 00198227 */ std::ostream::write((char *)local_230,(long)&local_2d0); std::ostream::write((char *)local_230,(long)&local_2d4); } std:: _Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> ::~_Hashtable(local_2b0); std:: _Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> ::~_Hashtable((_Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> *)local_268); } /* try { // try from 001981d3 to 001981f3 has its CatchHandler @ 00198217 */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/ngram-cache.cpp",0xcc ,"GGML_ASSERT(%s) failed","!token_counts.empty()"); }
40,661
common_ngram_cache_save(std::unordered_map<common_ngram, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>, common_ngram_hash_function, std::equal_to<common_ngram>, std::allocator<std::pair<common_ngram const, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
monkey531[P]llama/common/ngram-cache.cpp
void common_ngram_cache_save(common_ngram_cache & ngram_cache, std::string & filename) { std::ofstream file_out(filename, std::ios::binary); for (std::pair<common_ngram, common_ngram_cache_part> item : ngram_cache) { const common_ngram ngram = item.first; common_ngram_cache_part token_counts = item.second; GGML_ASSERT(!token_counts.empty()); const int32_t ntokens = token_counts.size(); GGML_ASSERT(ntokens > 0); file_out.write(reinterpret_cast<const char *>(&ngram), sizeof(common_ngram)); file_out.write(reinterpret_cast<const char *>(&ntokens), sizeof(int32_t)); for (std::pair<llama_token, int32_t> item2 : token_counts) { const llama_token token = item2.first; const int32_t count = item2.second; GGML_ASSERT(count > 0); file_out.write(reinterpret_cast<const char *>(&token), sizeof(llama_token)); file_out.write(reinterpret_cast<const char *>(&count), sizeof(int32_t)); } } }
O3
cpp
common_ngram_cache_save(std::unordered_map<common_ngram, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>, common_ngram_hash_function, std::equal_to<common_ngram>, std::allocator<std::pair<common_ngram const, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x2b8, %rsp # imm = 0x2B8 movq %rdi, %rbx leaq 0xb8(%rsp), %rdi movl $0x4, %edx callq 0x1c0f0 movq 0x10(%rbx), %r15 testq %r15, %r15 je 0xcd65d leaq 0x60(%rsp), %rbx xorl %ebp, %ebp leaq 0x18(%rsp), %r14 leaq 0xb8(%rsp), %r12 leaq 0x8(%rsp), %r13 movups 0x8(%r15), %xmm0 movaps %xmm0, 0x50(%rsp) leaq 0x18(%r15), %rsi movq %rbp, 0x60(%rsp) movq 0x20(%r15), %rax movq %rax, 0x68(%rsp) movq %rbp, 0x70(%rsp) movq 0x30(%r15), %rax movq %rax, 0x78(%rsp) movups 0x38(%r15), %xmm0 movups %xmm0, 0x20(%rbx) movq %rbp, 0x90(%rsp) movq %rbx, 0x18(%rsp) movq %rbx, %rdi movq %r14, %rdx callq 0xcdf9a movaps 0x50(%rsp), %xmm0 movaps %xmm0, 0xa0(%rsp) movq %rbp, 0x18(%rsp) movq 0x68(%rsp), %rax movq %rax, 0x20(%rsp) movq %rbp, 0x28(%rsp) movq 0x78(%rsp), %rax movq %rax, 0x30(%rsp) movups 0x20(%rbx), %xmm0 leaq 0x38(%rsp), %rax movups %xmm0, (%rax) movq %rbp, 0x48(%rsp) movq %r14, 0x10(%rsp) movq %r14, %rdi movq %rbx, %rsi leaq 0x10(%rsp), %rbx movq %rbx, %rdx callq 0xcdf9a movq 0x30(%rsp), %rax testq %rax, %rax leaq 0xc(%rsp), %rbp je 0xcd6c8 movl %eax, 0x10(%rsp) testl %eax, %eax jle 0xcd6e9 movl $0x10, %edx movq %r12, %rdi leaq 0xa0(%rsp), %rsi callq 0x1bb10 movl $0x4, %edx movq %r12, %rdi movq %rbx, %rsi callq 0x1bb10 movq 0x28(%rsp), %r14 testq %r14, %r14 je 0xcd632 movl 0x8(%r14), %eax movl 0xc(%r14), %ecx movl %eax, 0xc(%rsp) movl %ecx, 0x8(%rsp) testl %ecx, %ecx jle 0xcd6a7 movl $0x4, %edx movq %r12, %rdi movq %rbp, %rsi callq 0x1bb10 movl $0x4, %edx movq %r12, %rdi movq %r13, %rsi callq 0x1bb10 movq (%r14), %r14 jmp 0xcd5f0 leaq 0x18(%rsp), %r14 movq %r14, %rdi callq 0x21ec2 leaq 0x60(%rsp), %rbx movq %rbx, %rdi callq 0x21ec2 movq (%r15), %r15 testq %r15, %r15 movl $0x0, %ebp jne 0xcd508 movq 0x608dc(%rip), %rax # 0x12df40 movq (%rax), %rcx movq 0x18(%rax), %rax leaq 0xc0(%rsp), %rdi movq %rcx, -0x8(%rdi) movq -0x18(%rcx), %rcx movq %rax, 0xb8(%rsp,%rcx) callq 0x1b720 leaq 0x1b0(%rsp), %rdi callq 0x1b2b0 addq $0x2b8, %rsp # imm = 0x2B8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x29850(%rip), %rdi # 0xf6efe leaq 0x1aa8b(%rip), %rdx # 0xe8140 leaq 0x298e5(%rip), %rcx # 0xf6fa1 movl $0xd5, %esi xorl %eax, %eax callq 0x1be80 leaq 0x2982f(%rip), %rdi # 0xf6efe leaq 0x1aa6a(%rip), %rdx # 0xe8140 leaq 0x298a2(%rip), %rcx # 0xf6f7f movl $0xcc, %esi xorl %eax, %eax callq 0x1be80 leaq 0x2980e(%rip), %rdi # 0xf6efe leaq 0x1aa49(%rip), %rdx # 0xe8140 leaq 0x29897(%rip), %rcx # 0xf6f95 movl $0xce, %esi xorl %eax, %eax callq 0x1be80 movq %rax, %r14 jmp 0xcd733 movq %rax, %r14 jmp 0xcd729 jmp 0xcd71c jmp 0xcd71c jmp 0xcd71c jmp 0xcd71c movq %rax, %r14 leaq 0x18(%rsp), %rdi callq 0x21ec2 leaq 0x60(%rsp), %rdi callq 0x21ec2 leaq 0xb8(%rsp), %rdi callq 0x1bcc0 movq %r14, %rdi callq 0x1bf70
_Z23common_ngram_cache_saveRSt13unordered_mapI12common_ngramS_IiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE26common_ngram_hash_functionS3_IS0_ESaIS5_IKS0_S9_EEERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 2B8h mov rbx, rdi lea rdi, [rsp+2E8h+var_230] mov edx, 4 call __ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ofstream::basic_ofstream(std::string const&,std::_Ios_Openmode) mov r15, [rbx+10h] test r15, r15 jz loc_CD65D lea rbx, [rsp+2E8h+var_288] xor ebp, ebp lea r14, [rsp+2E8h+var_2D0] lea r12, [rsp+2E8h+var_230] lea r13, [rsp+2E8h+var_2E0] loc_CD508: movups xmm0, xmmword ptr [r15+8] movaps [rsp+2E8h+var_298], xmm0 lea rsi, [r15+18h] mov [rsp+2E8h+var_288], rbp mov rax, [r15+20h] mov [rsp+2E8h+var_280], rax mov [rsp+2E8h+var_278], rbp mov rax, [r15+30h] mov [rsp+2E8h+var_270], rax movups xmm0, xmmword ptr [r15+38h] movups xmmword ptr [rbx+20h], xmm0 mov [rsp+2E8h+var_258], rbp mov [rsp+2E8h+var_2D0], rbx mov rdi, rbx mov rdx, r14 call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE9_M_assignIRKSF_NS4_10_AllocNodeISaINS4_10_Hash_nodeIS2_Lb0EEEEEEEEvOT_RKT0_; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_M_assign<std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::pair<int const,int>,false>>>>(std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::pair<int const,int>,false>>> const&) movaps xmm0, [rsp+2E8h+var_298] movaps xmmword ptr [rsp+2E8h+var_248], xmm0 mov [rsp+2E8h+var_2D0], rbp mov rax, [rsp+2E8h+var_280] mov [rsp+2E8h+var_2C8], rax mov [rsp+2E8h+var_2C0], rbp mov rax, [rsp+2E8h+var_270] mov [rsp+2E8h+var_2B8], rax movups xmm0, xmmword ptr [rbx+20h] lea rax, [rsp+2E8h+var_2B0] movups xmmword ptr [rax], xmm0 mov [rsp+2E8h+var_2A0], rbp mov qword ptr [rsp+2E8h+var_2D8], r14 mov rdi, r14 mov rsi, rbx lea rbx, [rsp+2E8h+var_2D8] mov rdx, rbx call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE9_M_assignIRKSF_NS4_10_AllocNodeISaINS4_10_Hash_nodeIS2_Lb0EEEEEEEEvOT_RKT0_; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_M_assign<std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::pair<int const,int>,false>>>>(std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::pair<int const,int>,false>>> const&) mov rax, [rsp+2E8h+var_2B8] test rax, rax lea rbp, [rsp+2E8h+var_2DC] jz loc_CD6C8 mov dword ptr [rsp+2E8h+var_2D8], eax test eax, eax jle loc_CD6E9 mov edx, 10h; __int64 mov rdi, r12; this lea rsi, [rsp+2E8h+var_248]; char * call __ZNSo5writeEPKcl; std::ostream::write(char const*,long) mov edx, 4; __int64 mov rdi, r12; this mov rsi, rbx; char * call __ZNSo5writeEPKcl; std::ostream::write(char const*,long) mov r14, [rsp+2E8h+var_2C0] loc_CD5F0: test r14, r14 jz short loc_CD632 mov eax, [r14+8] mov ecx, [r14+0Ch] mov dword ptr [rsp+2E8h+var_2DC], eax mov dword ptr [rsp+2E8h+var_2E0], ecx test ecx, ecx jle loc_CD6A7 mov edx, 4; __int64 mov rdi, r12; this mov rsi, rbp; char * call __ZNSo5writeEPKcl; std::ostream::write(char const*,long) mov edx, 4; __int64 mov rdi, r12; this mov rsi, r13; char * call __ZNSo5writeEPKcl; std::ostream::write(char const*,long) mov r14, [r14] jmp short loc_CD5F0 loc_CD632: lea r14, [rsp+2E8h+var_2D0] mov rdi, r14 call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() lea rbx, [rsp+2E8h+var_288] mov rdi, rbx call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() mov r15, [r15] test r15, r15 mov ebp, 0 jnz loc_CD508 loc_CD65D: mov rax, cs:_ZTTSt14basic_ofstreamIcSt11char_traitsIcEE_ptr mov rcx, [rax] mov rax, [rax+18h] lea rdi, [rsp+2E8h+var_228] mov [rdi-8], rcx mov rcx, [rcx-18h] mov [rsp+rcx+2E8h+var_230], rax call __ZNSt13basic_filebufIcSt11char_traitsIcEED2Ev; std::filebuf::~filebuf() lea rdi, [rsp+2E8h+var_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() add rsp, 2B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_CD6A7: lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCount0; "count > 0" mov esi, 0D5h xor eax, eax call _ggml_abort loc_CD6C8: lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTokenCountsEmp; "!token_counts.empty()" mov esi, 0CCh xor eax, eax call _ggml_abort loc_CD6E9: lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNtokens0; "ntokens > 0" mov esi, 0CEh xor eax, eax call _ggml_abort mov r14, rax jmp short loc_CD733 mov r14, rax jmp short loc_CD729 jmp short loc_CD71C jmp short loc_CD71C jmp short loc_CD71C jmp short $+2 loc_CD71C: mov r14, rax lea rdi, [rsp+2E8h+var_2D0] call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() loc_CD729: lea rdi, [rsp+2E8h+var_288] call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() loc_CD733: lea rdi, [rsp+2E8h+var_230] call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream() mov rdi, r14 call __Unwind_Resume
void common_ngram_cache_save(long long a1, long long a2) { long long *i; // r15 long long *j; // r14 int v4; // ecx long long v5; // rax double v6; // xmm0_8 long long v7; // rax long long v8; // r14 char v9[4]; // [rsp+8h] [rbp-2E0h] BYREF char v10[4]; // [rsp+Ch] [rbp-2DCh] BYREF char v11[8]; // [rsp+10h] [rbp-2D8h] BYREF _QWORD v12[2]; // [rsp+18h] [rbp-2D0h] BYREF long long *v13; // [rsp+28h] [rbp-2C0h] long long v14; // [rsp+30h] [rbp-2B8h] __int128 v15; // [rsp+38h] [rbp-2B0h] long long v16; // [rsp+48h] [rbp-2A0h] __int128 v17; // [rsp+50h] [rbp-298h] long long v18; // [rsp+60h] [rbp-288h] BYREF long long v19; // [rsp+68h] [rbp-280h] long long v20; // [rsp+70h] [rbp-278h] long long v21; // [rsp+78h] [rbp-270h] __int128 v22; // [rsp+80h] [rbp-268h] long long v23; // [rsp+90h] [rbp-258h] char v24[24]; // [rsp+A0h] [rbp-248h] BYREF long long v25; // [rsp+B8h] [rbp-230h] BYREF _BYTE v26[312]; // [rsp+1B0h] [rbp-138h] BYREF std::ofstream::basic_ofstream(&v25, a2, 4LL); for ( i = *(long long **)(a1 + 16); i; i = (long long *)*i ) { v17 = *(_OWORD *)(i + 1); v18 = 0LL; v19 = i[4]; v20 = 0LL; v21 = i[6]; v22 = *(_OWORD *)(i + 7); v23 = 0LL; v12[0] = &v18; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_M_assign<std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::pair<int const,int>,false>>>>( &v18, i + 3, v12); *(_OWORD *)v24 = v17; v12[0] = 0LL; v12[1] = v19; v13 = 0LL; v14 = v21; v15 = v22; v16 = 0LL; *(_QWORD *)v11 = v12; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_M_assign<std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::pair<int const,int>,false>>>>( v12, &v18, v11); if ( !v14 ) goto LABEL_11; *(_DWORD *)v11 = v14; if ( (int)v14 <= 0 ) { LABEL_12: v6 = ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/ngram-cache.cpp", 206LL, "GGML_ASSERT(%s) failed", "ntokens > 0"); v8 = v7; std::ofstream::~ofstream(&v25, v6); _Unwind_Resume(v8); } std::ostream::write((std::ostream *)&v25, v24, 16LL); std::ostream::write((std::ostream *)&v25, v11, 4LL); for ( j = v13; j; j = (long long *)*j ) { v4 = *((_DWORD *)j + 3); *(_DWORD *)v10 = *((_DWORD *)j + 2); *(_DWORD *)v9 = v4; if ( v4 <= 0 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/ngram-cache.cpp", 213LL, "GGML_ASSERT(%s) failed", "count > 0"); LABEL_11: ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/ngram-cache.cpp", 204LL, "GGML_ASSERT(%s) failed", "!token_counts.empty()"); goto LABEL_12; } std::ostream::write((std::ostream *)&v25, v10, 4LL); std::ostream::write((std::ostream *)&v25, v9, 4LL); } std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable((long long)v12); std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable((long long)&v18); } v5 = `VTT for'std::ofstream[3]; v25 = `VTT for'std::ofstream[0]; *(_QWORD *)(v26 + *(_QWORD *)(`VTT for'std::ofstream[0] - 24LL) + 232) = v5; std::filebuf::~filebuf(); std::ios_base::~ios_base((std::ios_base *)v26); }
common_ngram_cache_save: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x2b8 MOV RBX,RDI LEA RDI,[RSP + 0xb8] MOV EDX,0x4 CALL 0x0011c0f0 MOV R15,qword ptr [RBX + 0x10] TEST R15,R15 JZ 0x001cd65d LEA RBX,[RSP + 0x60] XOR EBP,EBP LEA R14,[RSP + 0x18] LEA R12,[RSP + 0xb8] LEA R13,[RSP + 0x8] LAB_001cd508: MOVUPS XMM0,xmmword ptr [R15 + 0x8] MOVAPS xmmword ptr [RSP + 0x50],XMM0 LEA RSI,[R15 + 0x18] MOV qword ptr [RSP + 0x60],RBP MOV RAX,qword ptr [R15 + 0x20] MOV qword ptr [RSP + 0x68],RAX MOV qword ptr [RSP + 0x70],RBP MOV RAX,qword ptr [R15 + 0x30] MOV qword ptr [RSP + 0x78],RAX MOVUPS XMM0,xmmword ptr [R15 + 0x38] MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOV qword ptr [RSP + 0x90],RBP MOV qword ptr [RSP + 0x18],RBX LAB_001cd548: MOV RDI,RBX MOV RDX,R14 CALL 0x001cdf9a MOVAPS XMM0,xmmword ptr [RSP + 0x50] MOVAPS xmmword ptr [RSP + 0xa0],XMM0 MOV qword ptr [RSP + 0x18],RBP MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x28],RBP MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x30],RAX MOVUPS XMM0,xmmword ptr [RBX + 0x20] LEA RAX,[RSP + 0x38] MOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RSP + 0x48],RBP MOV qword ptr [RSP + 0x10],R14 LAB_001cd594: MOV RDI,R14 MOV RSI,RBX LEA RBX,[RSP + 0x10] MOV RDX,RBX CALL 0x001cdf9a MOV RAX,qword ptr [RSP + 0x30] TEST RAX,RAX LEA RBP,[RSP + 0xc] JZ 0x001cd6c8 MOV dword ptr [RSP + 0x10],EAX TEST EAX,EAX JLE 0x001cd6e9 LAB_001cd5c6: MOV EDX,0x10 MOV RDI,R12 LEA RSI,[RSP + 0xa0] CALL 0x0011bb10 MOV EDX,0x4 MOV RDI,R12 MOV RSI,RBX CALL 0x0011bb10 MOV R14,qword ptr [RSP + 0x28] LAB_001cd5f0: TEST R14,R14 JZ 0x001cd632 MOV EAX,dword ptr [R14 + 0x8] MOV ECX,dword ptr [R14 + 0xc] MOV dword ptr [RSP + 0xc],EAX MOV dword ptr [RSP + 0x8],ECX TEST ECX,ECX JLE 0x001cd6a7 LAB_001cd60d: MOV EDX,0x4 MOV RDI,R12 MOV RSI,RBP CALL 0x0011bb10 MOV EDX,0x4 MOV RDI,R12 MOV RSI,R13 CALL 0x0011bb10 MOV R14,qword ptr [R14] JMP 0x001cd5f0 LAB_001cd632: LEA R14,[RSP + 0x18] MOV RDI,R14 CALL 0x00121ec2 LEA RBX,[RSP + 0x60] MOV RDI,RBX CALL 0x00121ec2 MOV R15,qword ptr [R15] TEST R15,R15 MOV EBP,0x0 JNZ 0x001cd508 LAB_001cd65d: MOV RAX,qword ptr [0x0022df40] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x18] LEA RDI,[RSP + 0xc0] MOV qword ptr [RDI + -0x8],RCX MOV RCX,qword ptr [RCX + -0x18] MOV qword ptr [RSP + RCX*0x1 + 0xb8],RAX CALL 0x0011b720 LEA RDI,[RSP + 0x1b0] CALL 0x0011b2b0 ADD RSP,0x2b8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001cd6a7: LEA RDI,[0x1f6efe] LEA RDX,[0x1e8140] LEA RCX,[0x1f6fa1] MOV ESI,0xd5 XOR EAX,EAX CALL 0x0011be80 LAB_001cd6c8: LEA RDI,[0x1f6efe] LEA RDX,[0x1e8140] LEA RCX,[0x1f6f7f] MOV ESI,0xcc XOR EAX,EAX CALL 0x0011be80 LAB_001cd6e9: LEA RDI,[0x1f6efe] LEA RDX,[0x1e8140] LEA RCX,[0x1f6f95] MOV ESI,0xce XOR EAX,EAX CALL 0x0011be80
/* common_ngram_cache_save(std::unordered_map<common_ngram, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int> > >, common_ngram_hash_function, std::equal_to<common_ngram>, std::allocator<std::pair<common_ngram const, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int> > > > > >&, std::__cxx11::string&) */ void common_ngram_cache_save(unordered_map *param_1,string *param_2) { int8 *puVar1; long *plVar2; int local_2e0; int4 local_2dc; _Hashtable *local_2d8; _Hashtable *local_2d0; long local_2c8; int8 *local_2c0; long local_2b8; long local_2b0; long lStack_2a8; int8 local_2a0; long local_298; long lStack_290; int8 local_288; long local_280; int8 local_278; long local_270; long local_268; long lStack_260; int8 local_258; long local_248; long lStack_240; long local_230; filebuf local_228 [240]; ios_base local_138 [264]; std::ofstream::ofstream((ofstream *)&local_230,param_2,4); plVar2 = *(long **)(param_1 + 0x10); if (plVar2 != (long *)0x0) { do { local_298 = plVar2[1]; lStack_290 = plVar2[2]; local_288 = 0; local_280 = plVar2[4]; local_278 = 0; local_270 = plVar2[6]; local_268 = plVar2[7]; lStack_260 = plVar2[8]; local_258 = 0; local_2d0 = (_Hashtable *)&local_288; /* try { // try from 001cd548 to 001cd552 has its CatchHandler @ 001cd70a */ std:: _Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> :: _M_assign<std::_Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::pair<int_const,int>,false>>>> ((_Hashtable *)&local_288,(_AllocNode *)(plVar2 + 3)); local_248 = local_298; lStack_240 = lStack_290; local_2d0 = (_Hashtable *)0x0; local_2c8 = local_280; local_2c0 = (int8 *)0x0; local_2b8 = local_270; local_2b0 = local_268; lStack_2a8 = lStack_260; local_2a0 = 0; /* try { // try from 001cd594 to 001cd5a6 has its CatchHandler @ 001cd70f */ local_2d8 = (_Hashtable *)&local_2d0; std:: _Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> :: _M_assign<std::_Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::pair<int_const,int>,false>>>> ((_Hashtable *)&local_2d0,(_AllocNode *)&local_288); if (local_2b8 == 0) { /* try { // try from 001cd6c8 to 001cd6e8 has its CatchHandler @ 001cd716 */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/ngram-cache.cpp" ,0xcc,"GGML_ASSERT(%s) failed","!token_counts.empty()"); } local_2d8 = (_Hashtable *)CONCAT44(local_2d8._4_4_,(int)local_2b8); if ((int)local_2b8 < 1) { /* try { // try from 001cd6e9 to 001cd709 has its CatchHandler @ 001cd714 */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/ngram-cache.cpp" ,0xce,"GGML_ASSERT(%s) failed","ntokens > 0"); } /* try { // try from 001cd5c6 to 001cd5ea has its CatchHandler @ 001cd718 */ std::ostream::write((char *)&local_230,(long)&local_248); std::ostream::write((char *)&local_230,(long)&local_2d8); for (puVar1 = local_2c0; puVar1 != (int8 *)0x0; puVar1 = (int8 *)*puVar1) { local_2dc = *(int4 *)(puVar1 + 1); local_2e0 = *(int *)((long)puVar1 + 0xc); if (local_2e0 < 1) { /* try { // try from 001cd6a7 to 001cd6c7 has its CatchHandler @ 001cd71a */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/ngram-cache.cpp" ,0xd5,"GGML_ASSERT(%s) failed","count > 0"); } /* try { // try from 001cd60d to 001cd62c has its CatchHandler @ 001cd71c */ std::ostream::write((char *)&local_230,(long)&local_2dc); std::ostream::write((char *)&local_230,(long)&local_2e0); } std:: _Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> ::~_Hashtable((_Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> *)&local_2d0); std:: _Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> ::~_Hashtable((_Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> *)&local_288); plVar2 = (long *)*plVar2; } while (plVar2 != (long *)0x0); } local_230 = *(long *)PTR_VTT_0022df40; *(int8 *)(local_228 + *(long *)(local_230 + -0x18) + -8) = *(int8 *)(PTR_VTT_0022df40 + 0x18); std::filebuf::~filebuf(local_228); std::ios_base::~ios_base(local_138); return; }
40,662
ftxui::vtext(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>>)
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/dom/text.cpp
Element vtext(std::wstring text) { // NOLINT return std::make_shared<VText>(to_string(text)); }
O2
cpp
ftxui::vtext(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>>): pushq %r14 pushq %rbx subq $0x38, %rsp movq %rdi, %rbx leaq 0x18(%rsp), %r14 movq %r14, %rdi callq 0x318ca movq %rsp, %rdi movq %r14, %rsi callq 0x20158 leaq 0x8(%rsp), %rdi movaps -0x8(%rdi), %xmm0 andq $0x0, (%rdi) movups %xmm0, (%rbx) andq $0x0, -0x8(%rdi) callq 0x13452 leaq 0x18(%rsp), %rdi callq 0xc8c8 movq %rbx, %rax addq $0x38, %rsp popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x18(%rsp), %rdi callq 0xc8c8 movq %rbx, %rdi callq 0xc7f0 nop
_ZN5ftxui5vtextENSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE: push r14 push rbx sub rsp, 38h mov rbx, rdi lea r14, [rsp+48h+var_30] mov rdi, r14 call _ZN5ftxui9to_stringERKNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE; ftxui::to_string(std::wstring const&) mov rdi, rsp mov rsi, r14 call _ZSt11make_sharedIN5ftxui12_GLOBAL__N_15VTextEJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESt10shared_ptrIT_EDpOT0_; std::make_shared<ftxui::`anonymous namespace'::VText,std::string>(std::string &&) lea rdi, [rsp+48h+var_40] movaps xmm0, xmmword ptr [rdi-8] and qword ptr [rdi], 0 movups xmmword ptr [rbx], xmm0 and qword ptr [rdi-8], 0 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+48h+var_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 38h pop rbx pop r14 retn mov rbx, rax lea rdi, [rsp+arg_10]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
_OWORD * ftxui::vtext(_OWORD *a1) { __int128 v1; // xmm0 __int128 v3; // [rsp+0h] [rbp-48h] BYREF _BYTE v4[48]; // [rsp+18h] [rbp-30h] BYREF ftxui::to_string(v4); std::make_shared<ftxui::`anonymous namespace'::VText,std::string>(&v3, (long long)v4); v1 = v3; *((_QWORD *)&v3 + 1) = 0LL; *a1 = v1; *(_QWORD *)&v3 = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v3 + 1); std::string::~string(v4); return a1; }
vtext: PUSH R14 PUSH RBX SUB RSP,0x38 MOV RBX,RDI LEA R14,[RSP + 0x18] MOV RDI,R14 CALL 0x001318ca LAB_001202a0: MOV RDI,RSP MOV RSI,R14 CALL 0x00120158 LAB_001202ab: LEA RDI,[RSP + 0x8] MOVAPS XMM0,xmmword ptr [RDI + -0x8] AND qword ptr [RDI],0x0 MOVUPS xmmword ptr [RBX],XMM0 AND qword ptr [RDI + -0x8],0x0 CALL 0x00113452 LEA RDI,[RSP + 0x18] CALL 0x0010c8c8 MOV RAX,RBX ADD RSP,0x38 POP RBX POP R14 RET
/* ftxui::vtext(std::__cxx11::wstring) */ ftxui * __thiscall ftxui::vtext(ftxui *this,wstring *param_2) { int8 uVar1; int8 local_48; int8 auStack_40 [2]; ftxui local_30 [32]; to_string(local_30,param_2); /* try { // try from 001202a0 to 001202aa has its CatchHandler @ 001202da */ std::make_shared<ftxui::(anonymous_namespace)::VText,std::__cxx11::string>((string *)&local_48); uVar1 = auStack_40[0]; auStack_40[0] = 0; *(int8 *)this = local_48; *(int8 *)(this + 8) = uVar1; local_48 = 0; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)auStack_40); std::__cxx11::string::~string((string *)local_30); return this; }
40,663
mz_zip_reader_init_mem
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
mz_bool mz_zip_reader_init_mem(mz_zip_archive *pZip, const void *pMem, size_t size, mz_uint flags) { if (!pMem) return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); if (size < MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) return mz_zip_set_error(pZip, MZ_ZIP_NOT_AN_ARCHIVE); if (!mz_zip_reader_init_internal(pZip, flags)) return MZ_FALSE; pZip->m_zip_type = MZ_ZIP_TYPE_MEMORY; pZip->m_archive_size = size; pZip->m_pRead = mz_zip_mem_read_func; pZip->m_pIO_opaque = pZip; pZip->m_pNeeds_keepalive = NULL; #ifdef __cplusplus pZip->m_pState->m_pMem = const_cast<void *>(pMem); #else pZip->m_pState->m_pMem = (void *)pMem; #endif pZip->m_pState->m_mem_size = size; if (!mz_zip_reader_read_central_dir(pZip, flags)) { mz_zip_reader_end_internal(pZip, MZ_FALSE); return MZ_FALSE; } return MZ_TRUE; }
O0
c
mz_zip_reader_init_mem: subq $0x48, %rsp movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq %rdx, 0x10(%rsp) movl %ecx, 0xc(%rsp) cmpq $0x0, 0x18(%rsp) jne 0xff5f2 movq 0x20(%rsp), %rax movq %rax, 0x40(%rsp) movl $0x18, 0x3c(%rsp) cmpq $0x0, 0x40(%rsp) je 0xff5e5 movl 0x3c(%rsp), %ecx movq 0x40(%rsp), %rax movl %ecx, 0x1c(%rax) movl $0x0, 0x28(%rsp) jmp 0xff6ec cmpq $0x16, 0x10(%rsp) jae 0xff62d movq 0x20(%rsp), %rax movq %rax, 0x30(%rsp) movl $0x8, 0x2c(%rsp) cmpq $0x0, 0x30(%rsp) je 0xff620 movl 0x2c(%rsp), %ecx movq 0x30(%rsp), %rax movl %ecx, 0x1c(%rax) movl $0x0, 0x28(%rsp) jmp 0xff6ec movq 0x20(%rsp), %rdi movl 0xc(%rsp), %esi callq 0xfe090 cmpl $0x0, %eax jne 0xff64d movl $0x0, 0x28(%rsp) jmp 0xff6ec movq 0x20(%rsp), %rax movl $0x2, 0x18(%rax) movq 0x10(%rsp), %rcx movq 0x20(%rsp), %rax movq %rcx, (%rax) movq 0x20(%rsp), %rax leaq 0x8e(%rip), %rcx # 0xff700 movq %rcx, 0x48(%rax) movq 0x20(%rsp), %rcx movq 0x20(%rsp), %rax movq %rcx, 0x60(%rax) movq 0x20(%rsp), %rax movq $0x0, 0x58(%rax) movq 0x18(%rsp), %rcx movq 0x20(%rsp), %rax movq 0x68(%rax), %rax movq %rcx, 0x80(%rax) movq 0x10(%rsp), %rcx movq 0x20(%rsp), %rax movq 0x68(%rax), %rax movq %rcx, 0x88(%rax) movq 0x20(%rsp), %rdi movl 0xc(%rsp), %esi callq 0xfe270 cmpl $0x0, %eax jne 0xff6e4 movq 0x20(%rsp), %rdi xorl %esi, %esi callq 0xfddc0 movl $0x0, 0x28(%rsp) jmp 0xff6ec movl $0x1, 0x28(%rsp) movl 0x28(%rsp), %eax addq $0x48, %rsp retq nopw %cs:(%rax,%rax)
mz_zip_reader_init_mem: sub rsp, 48h mov [rsp+48h+var_28], rdi mov [rsp+48h+var_30], rsi mov [rsp+48h+var_38], rdx mov [rsp+48h+var_3C], ecx cmp [rsp+48h+var_30], 0 jnz short loc_FF5F2 mov rax, [rsp+48h+var_28] mov [rsp+48h+var_8], rax mov [rsp+48h+var_C], 18h cmp [rsp+48h+var_8], 0 jz short loc_FF5E5 mov ecx, [rsp+48h+var_C] mov rax, [rsp+48h+var_8] mov [rax+1Ch], ecx loc_FF5E5: mov [rsp+48h+var_20], 0 jmp loc_FF6EC loc_FF5F2: cmp [rsp+48h+var_38], 16h jnb short loc_FF62D mov rax, [rsp+48h+var_28] mov [rsp+48h+var_18], rax mov [rsp+48h+var_1C], 8 cmp [rsp+48h+var_18], 0 jz short loc_FF620 mov ecx, [rsp+48h+var_1C] mov rax, [rsp+48h+var_18] mov [rax+1Ch], ecx loc_FF620: mov [rsp+48h+var_20], 0 jmp loc_FF6EC loc_FF62D: mov rdi, [rsp+48h+var_28] mov esi, [rsp+48h+var_3C] call mz_zip_reader_init_internal cmp eax, 0 jnz short loc_FF64D mov [rsp+48h+var_20], 0 jmp loc_FF6EC loc_FF64D: mov rax, [rsp+48h+var_28] mov dword ptr [rax+18h], 2 mov rcx, [rsp+48h+var_38] mov rax, [rsp+48h+var_28] mov [rax], rcx mov rax, [rsp+48h+var_28] lea rcx, mz_zip_mem_read_func mov [rax+48h], rcx mov rcx, [rsp+48h+var_28] mov rax, [rsp+48h+var_28] mov [rax+60h], rcx mov rax, [rsp+48h+var_28] mov qword ptr [rax+58h], 0 mov rcx, [rsp+48h+var_30] mov rax, [rsp+48h+var_28] mov rax, [rax+68h] mov [rax+80h], rcx mov rcx, [rsp+48h+var_38] mov rax, [rsp+48h+var_28] mov rax, [rax+68h] mov [rax+88h], rcx mov rdi, [rsp+48h+var_28] mov esi, [rsp+48h+var_3C] call mz_zip_reader_read_central_dir cmp eax, 0 jnz short loc_FF6E4 mov rdi, [rsp+48h+var_28] xor esi, esi call mz_zip_reader_end_internal mov [rsp+48h+var_20], 0 jmp short loc_FF6EC loc_FF6E4: mov [rsp+48h+var_20], 1 loc_FF6EC: mov eax, [rsp+48h+var_20] add rsp, 48h retn
long long mz_zip_reader_init_mem(long long a1, long long a2, unsigned long long a3, int a4) { if ( a2 ) { if ( a3 >= 0x16 ) { if ( (unsigned int)mz_zip_reader_init_internal(a1, a4) ) { *(_DWORD *)(a1 + 24) = 2; *(_QWORD *)a1 = a3; *(_QWORD *)(a1 + 72) = mz_zip_mem_read_func; *(_QWORD *)(a1 + 96) = a1; *(_QWORD *)(a1 + 88) = 0LL; *(_QWORD *)(*(_QWORD *)(a1 + 104) + 128LL) = a2; *(_QWORD *)(*(_QWORD *)(a1 + 104) + 136LL) = a3; if ( (unsigned int)mz_zip_reader_read_central_dir((_QWORD *)a1, a4) ) { return 1; } else { mz_zip_reader_end_internal(a1, 0); return 0; } } else { return 0; } } else { if ( a1 ) *(_DWORD *)(a1 + 28) = 8; return 0; } } else { if ( a1 ) *(_DWORD *)(a1 + 28) = 24; return 0; } }
mz_zip_reader_init_mem: SUB RSP,0x48 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOV qword ptr [RSP + 0x10],RDX MOV dword ptr [RSP + 0xc],ECX CMP qword ptr [RSP + 0x18],0x0 JNZ 0x001ff5f2 MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x40],RAX MOV dword ptr [RSP + 0x3c],0x18 CMP qword ptr [RSP + 0x40],0x0 JZ 0x001ff5e5 MOV ECX,dword ptr [RSP + 0x3c] MOV RAX,qword ptr [RSP + 0x40] MOV dword ptr [RAX + 0x1c],ECX LAB_001ff5e5: MOV dword ptr [RSP + 0x28],0x0 JMP 0x001ff6ec LAB_001ff5f2: CMP qword ptr [RSP + 0x10],0x16 JNC 0x001ff62d MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x30],RAX MOV dword ptr [RSP + 0x2c],0x8 CMP qword ptr [RSP + 0x30],0x0 JZ 0x001ff620 MOV ECX,dword ptr [RSP + 0x2c] MOV RAX,qword ptr [RSP + 0x30] MOV dword ptr [RAX + 0x1c],ECX LAB_001ff620: MOV dword ptr [RSP + 0x28],0x0 JMP 0x001ff6ec LAB_001ff62d: MOV RDI,qword ptr [RSP + 0x20] MOV ESI,dword ptr [RSP + 0xc] CALL 0x001fe090 CMP EAX,0x0 JNZ 0x001ff64d MOV dword ptr [RSP + 0x28],0x0 JMP 0x001ff6ec LAB_001ff64d: MOV RAX,qword ptr [RSP + 0x20] MOV dword ptr [RAX + 0x18],0x2 MOV RCX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RSP + 0x20] LEA RCX,[0x1ff700] MOV qword ptr [RAX + 0x48],RCX MOV RCX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x60],RCX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x58],0x0 MOV RCX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0x68] MOV qword ptr [RAX + 0x80],RCX MOV RCX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0x68] MOV qword ptr [RAX + 0x88],RCX MOV RDI,qword ptr [RSP + 0x20] MOV ESI,dword ptr [RSP + 0xc] CALL 0x001fe270 CMP EAX,0x0 JNZ 0x001ff6e4 MOV RDI,qword ptr [RSP + 0x20] XOR ESI,ESI CALL 0x001fddc0 MOV dword ptr [RSP + 0x28],0x0 JMP 0x001ff6ec LAB_001ff6e4: MOV dword ptr [RSP + 0x28],0x1 LAB_001ff6ec: MOV EAX,dword ptr [RSP + 0x28] ADD RSP,0x48 RET
int4 mz_zip_reader_init_mem(ulong *param_1,long param_2,ulong param_3,int4 param_4) { int iVar1; int4 local_20; if (param_2 == 0) { if (param_1 != (ulong *)0x0) { *(int4 *)((long)param_1 + 0x1c) = 0x18; } local_20 = 0; } else if (param_3 < 0x16) { if (param_1 != (ulong *)0x0) { *(int4 *)((long)param_1 + 0x1c) = 8; } local_20 = 0; } else { iVar1 = mz_zip_reader_init_internal(param_1,param_4); if (iVar1 == 0) { local_20 = 0; } else { *(int4 *)(param_1 + 3) = 2; *param_1 = param_3; param_1[9] = (ulong)mz_zip_mem_read_func; param_1[0xc] = (ulong)param_1; param_1[0xb] = 0; *(long *)(param_1[0xd] + 0x80) = param_2; *(ulong *)(param_1[0xd] + 0x88) = param_3; iVar1 = mz_zip_reader_read_central_dir(param_1,param_4); if (iVar1 == 0) { mz_zip_reader_end_internal(param_1,0); local_20 = 0; } else { local_20 = 1; } } } return local_20; }
40,664
mz_zip_reader_init_mem
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
mz_bool mz_zip_reader_init_mem(mz_zip_archive *pZip, const void *pMem, size_t size, mz_uint flags) { if (!pMem) return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); if (size < MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) return mz_zip_set_error(pZip, MZ_ZIP_NOT_AN_ARCHIVE); if (!mz_zip_reader_init_internal(pZip, flags)) return MZ_FALSE; pZip->m_zip_type = MZ_ZIP_TYPE_MEMORY; pZip->m_archive_size = size; pZip->m_pRead = mz_zip_mem_read_func; pZip->m_pIO_opaque = pZip; pZip->m_pNeeds_keepalive = NULL; #ifdef __cplusplus pZip->m_pState->m_pMem = const_cast<void *>(pMem); #else pZip->m_pState->m_pMem = (void *)pMem; #endif pZip->m_pState->m_mem_size = size; if (!mz_zip_reader_read_central_dir(pZip, flags)) { mz_zip_reader_end_internal(pZip, MZ_FALSE); return MZ_FALSE; } return MZ_TRUE; }
O2
c
mz_zip_reader_init_mem: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx testq %rsi, %rsi je 0x5e51f movq %rdx, %r14 cmpq $0x15, %rdx ja 0x5e52f xorl %ebp, %ebp testq %rbx, %rbx je 0x5e595 movl $0x8, 0x1c(%rbx) jmp 0x5e595 xorl %ebp, %ebp testq %rbx, %rbx je 0x5e595 movl $0x18, 0x1c(%rbx) jmp 0x5e595 movl %ecx, %ebp movq %rsi, %r15 movq %rbx, %rdi movl %ecx, %esi callq 0x5da80 testl %eax, %eax je 0x5e585 movl $0x2, 0x18(%rbx) movq %r14, (%rbx) leaq 0x4f(%rip), %rax # 0x5e5a2 movq %rax, 0x48(%rbx) movq %rbx, 0x60(%rbx) andq $0x0, 0x58(%rbx) movq 0x68(%rbx), %rax movq %r15, 0x80(%rax) movq %r14, 0x88(%rax) movq %rbx, %rdi movl %ebp, %esi callq 0x5db4d testl %eax, %eax je 0x5e589 pushq $0x1 popq %rbp jmp 0x5e595 xorl %ebp, %ebp jmp 0x5e595 xorl %ebp, %ebp movq %rbx, %rdi xorl %esi, %esi callq 0x5d92b movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
mz_zip_reader_init_mem: push rbp push r15 push r14 push rbx push rax mov rbx, rdi test rsi, rsi jz short loc_5E51F mov r14, rdx cmp rdx, 15h ja short loc_5E52F xor ebp, ebp test rbx, rbx jz short loc_5E595 mov dword ptr [rbx+1Ch], 8 jmp short loc_5E595 loc_5E51F: xor ebp, ebp test rbx, rbx jz short loc_5E595 mov dword ptr [rbx+1Ch], 18h jmp short loc_5E595 loc_5E52F: mov ebp, ecx mov r15, rsi mov rdi, rbx mov esi, ecx call mz_zip_reader_init_internal test eax, eax jz short loc_5E585 mov dword ptr [rbx+18h], 2 mov [rbx], r14 lea rax, mz_zip_mem_read_func mov [rbx+48h], rax mov [rbx+60h], rbx and qword ptr [rbx+58h], 0 mov rax, [rbx+68h] mov [rax+80h], r15 mov [rax+88h], r14 mov rdi, rbx mov esi, ebp call mz_zip_reader_read_central_dir test eax, eax jz short loc_5E589 push 1 pop rbp jmp short loc_5E595 loc_5E585: xor ebp, ebp jmp short loc_5E595 loc_5E589: xor ebp, ebp mov rdi, rbx xor esi, esi call mz_zip_reader_end_internal loc_5E595: mov eax, ebp add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long mz_zip_reader_init_mem(long long a1, long long a2, unsigned long long a3, int a4) { unsigned int v5; // ebp long long v7; // rax if ( a2 ) { if ( a3 > 0x15 ) { if ( (unsigned int)mz_zip_reader_init_internal(a1, a4) ) { *(_DWORD *)(a1 + 24) = 2; *(_QWORD *)a1 = a3; *(_QWORD *)(a1 + 72) = mz_zip_mem_read_func; *(_QWORD *)(a1 + 96) = a1; *(_QWORD *)(a1 + 88) = 0LL; v7 = *(_QWORD *)(a1 + 104); *(_QWORD *)(v7 + 128) = a2; *(_QWORD *)(v7 + 136) = a3; if ( (unsigned int)mz_zip_reader_read_central_dir(a1, a4) ) { return 1; } else { v5 = 0; mz_zip_reader_end_internal(a1, 0); } } else { return 0; } } else { v5 = 0; if ( a1 ) *(_DWORD *)(a1 + 28) = 8; } } else { v5 = 0; if ( a1 ) *(_DWORD *)(a1 + 28) = 24; } return v5; }
mz_zip_reader_init_mem: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI TEST RSI,RSI JZ 0x0015e51f MOV R14,RDX CMP RDX,0x15 JA 0x0015e52f XOR EBP,EBP TEST RBX,RBX JZ 0x0015e595 MOV dword ptr [RBX + 0x1c],0x8 JMP 0x0015e595 LAB_0015e51f: XOR EBP,EBP TEST RBX,RBX JZ 0x0015e595 MOV dword ptr [RBX + 0x1c],0x18 JMP 0x0015e595 LAB_0015e52f: MOV EBP,ECX MOV R15,RSI MOV RDI,RBX MOV ESI,ECX CALL 0x0015da80 TEST EAX,EAX JZ 0x0015e585 MOV dword ptr [RBX + 0x18],0x2 MOV qword ptr [RBX],R14 LEA RAX,[0x15e5a2] MOV qword ptr [RBX + 0x48],RAX MOV qword ptr [RBX + 0x60],RBX AND qword ptr [RBX + 0x58],0x0 MOV RAX,qword ptr [RBX + 0x68] MOV qword ptr [RAX + 0x80],R15 MOV qword ptr [RAX + 0x88],R14 MOV RDI,RBX MOV ESI,EBP CALL 0x0015db4d TEST EAX,EAX JZ 0x0015e589 PUSH 0x1 POP RBP JMP 0x0015e595 LAB_0015e585: XOR EBP,EBP JMP 0x0015e595 LAB_0015e589: XOR EBP,EBP MOV RDI,RBX XOR ESI,ESI CALL 0x0015d92b LAB_0015e595: MOV EAX,EBP ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int8 mz_zip_reader_init_mem(ulong *param_1,long param_2,ulong param_3,int4 param_4) { ulong uVar1; int iVar2; int8 uVar3; if (param_2 == 0) { uVar3 = 0; if (param_1 != (ulong *)0x0) { *(int4 *)((long)param_1 + 0x1c) = 0x18; } } else if (param_3 < 0x16) { uVar3 = 0; if (param_1 != (ulong *)0x0) { *(int4 *)((long)param_1 + 0x1c) = 8; } } else { iVar2 = mz_zip_reader_init_internal(param_1,param_4); if (iVar2 == 0) { uVar3 = 0; } else { *(int4 *)(param_1 + 3) = 2; *param_1 = param_3; param_1[9] = (ulong)mz_zip_mem_read_func; param_1[0xc] = (ulong)param_1; param_1[0xb] = 0; uVar1 = param_1[0xd]; *(long *)(uVar1 + 0x80) = param_2; *(ulong *)(uVar1 + 0x88) = param_3; iVar2 = mz_zip_reader_read_central_dir(param_1,param_4); if (iVar2 == 0) { uVar3 = 0; mz_zip_reader_end_internal(param_1,0); } else { uVar3 = 1; } } } return uVar3; }
40,665
mz_zip_reader_init_mem
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
mz_bool mz_zip_reader_init_mem(mz_zip_archive *pZip, const void *pMem, size_t size, mz_uint flags) { if (!pMem) return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); if (size < MZ_ZIP_END_OF_CENTRAL_DIR_HEADER_SIZE) return mz_zip_set_error(pZip, MZ_ZIP_NOT_AN_ARCHIVE); if (!mz_zip_reader_init_internal(pZip, flags)) return MZ_FALSE; pZip->m_zip_type = MZ_ZIP_TYPE_MEMORY; pZip->m_archive_size = size; pZip->m_pRead = mz_zip_mem_read_func; pZip->m_pIO_opaque = pZip; pZip->m_pNeeds_keepalive = NULL; #ifdef __cplusplus pZip->m_pState->m_pMem = const_cast<void *>(pMem); #else pZip->m_pState->m_pMem = (void *)pMem; #endif pZip->m_pState->m_mem_size = size; if (!mz_zip_reader_read_central_dir(pZip, flags)) { mz_zip_reader_end_internal(pZip, MZ_FALSE); return MZ_FALSE; } return MZ_TRUE; }
O3
c
mz_zip_reader_init_mem: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx testq %rsi, %rsi je 0x82e05 movq %rdx, %r14 cmpq $0x15, %rdx ja 0x82e15 xorl %ebp, %ebp testq %rbx, %rbx je 0x82e7e movl $0x8, 0x1c(%rbx) jmp 0x82e7e xorl %ebp, %ebp testq %rbx, %rbx je 0x82e7e movl $0x18, 0x1c(%rbx) jmp 0x82e7e movl %ecx, %ebp movq %rsi, %r15 movq %rbx, %rdi movl %ecx, %esi callq 0x82610 testl %eax, %eax je 0x82e7c movl $0x2, 0x18(%rbx) movq %r14, (%rbx) leaq 0x52(%rip), %rax # 0x82e8b movq %rax, 0x48(%rbx) movq %rbx, 0x60(%rbx) movq $0x0, 0x58(%rbx) movq 0x68(%rbx), %rax movq %r15, 0x80(%rax) movq %r14, 0x88(%rax) movq %rbx, %rdi movl %ebp, %esi callq 0x826e7 movl $0x1, %ebp testl %eax, %eax jne 0x82e7e xorl %ebp, %ebp movq %rbx, %rdi xorl %esi, %esi callq 0x824b0 jmp 0x82e7e xorl %ebp, %ebp movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
mz_zip_reader_init_mem: push rbp push r15 push r14 push rbx push rax mov rbx, rdi test rsi, rsi jz short loc_82E05 mov r14, rdx cmp rdx, 15h ja short loc_82E15 xor ebp, ebp test rbx, rbx jz loc_82E7E mov dword ptr [rbx+1Ch], 8 jmp short loc_82E7E loc_82E05: xor ebp, ebp test rbx, rbx jz short loc_82E7E mov dword ptr [rbx+1Ch], 18h jmp short loc_82E7E loc_82E15: mov ebp, ecx mov r15, rsi mov rdi, rbx mov esi, ecx call mz_zip_reader_init_internal test eax, eax jz short loc_82E7C mov dword ptr [rbx+18h], 2 mov [rbx], r14 lea rax, mz_zip_mem_read_func mov [rbx+48h], rax mov [rbx+60h], rbx mov qword ptr [rbx+58h], 0 mov rax, [rbx+68h] mov [rax+80h], r15 mov [rax+88h], r14 mov rdi, rbx mov esi, ebp call mz_zip_reader_read_central_dir mov ebp, 1 test eax, eax jnz short loc_82E7E xor ebp, ebp mov rdi, rbx xor esi, esi call mz_zip_reader_end_internal jmp short loc_82E7E loc_82E7C: xor ebp, ebp loc_82E7E: mov eax, ebp add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long mz_zip_reader_init_mem(long long a1, long long a2, unsigned long long a3, signed __int32 a4) { unsigned int v5; // ebp long long v7; // rax int central_dir; // eax if ( a2 ) { if ( a3 > 0x15 ) { if ( (unsigned int)mz_zip_reader_init_internal(a1, a4) ) { *(_DWORD *)(a1 + 24) = 2; *(_QWORD *)a1 = a3; *(_QWORD *)(a1 + 72) = mz_zip_mem_read_func; *(_QWORD *)(a1 + 96) = a1; *(_QWORD *)(a1 + 88) = 0LL; v7 = *(_QWORD *)(a1 + 104); *(_QWORD *)(v7 + 128) = a2; *(_QWORD *)(v7 + 136) = a3; central_dir = mz_zip_reader_read_central_dir(a1, a4); v5 = 1; if ( !central_dir ) { v5 = 0; mz_zip_reader_end_internal(a1, 0); } } else { return 0; } } else { v5 = 0; if ( a1 ) *(_DWORD *)(a1 + 28) = 8; } } else { v5 = 0; if ( a1 ) *(_DWORD *)(a1 + 28) = 24; } return v5; }
40,666
my_printf_error
eloqsql/mysys/my_error.c
void my_printf_error(uint error, const char *format, myf MyFlags, ...) { va_list args; char ebuff[ERRMSGSIZE]; DBUG_ENTER("my_printf_error"); DBUG_PRINT("my", ("nr: %d MyFlags: %lu errno: %d format: %s", error, MyFlags, errno, format)); va_start(args,MyFlags); (void) my_vsnprintf_ex(&my_charset_utf8mb3_general_ci, ebuff, sizeof(ebuff), format, args); va_end(args); (*error_handler_hook)(error, ebuff, MyFlags); DBUG_VOID_RETURN; }
O3
c
my_printf_error: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x2d8, %rsp # imm = 0x2D8 movq %rdx, %rbx movq %rsi, %r10 movl %edi, %r14d leaq -0x2f0(%rbp), %rdx movq %rcx, 0x18(%rdx) movq %r8, 0x20(%rdx) movq %r9, 0x28(%rdx) testb %al, %al je 0x9e155 movaps %xmm0, -0x2c0(%rbp) movaps %xmm1, -0x2b0(%rbp) movaps %xmm2, -0x2a0(%rbp) movaps %xmm3, -0x290(%rbp) movaps %xmm4, -0x280(%rbp) movaps %xmm5, -0x270(%rbp) movaps %xmm6, -0x260(%rbp) movaps %xmm7, -0x250(%rbp) movq %fs:0x28, %rax movq %rax, -0x20(%rbp) movabsq $0x3000000018, %rax # imm = 0x3000000018 leaq -0x240(%rbp), %r8 movq %rax, (%r8) leaq 0x10(%rbp), %rax movq %rax, 0x8(%r8) movq %rdx, 0x10(%r8) leaq 0x35aed7(%rip), %rdi # 0x3f9060 leaq -0x220(%rbp), %r15 movl $0x200, %edx # imm = 0x200 movq %r15, %rsi movq %r10, %rcx callq 0xd5b58 leaq 0x2e7999(%rip), %rax # 0x385b40 movl %r14d, %edi movq %r15, %rsi movq %rbx, %rdx callq *(%rax) movq %fs:0x28, %rax cmpq -0x20(%rbp), %rax jne 0x9e1cf addq $0x2d8, %rsp # imm = 0x2D8 popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x29250
my_printf_error: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 2D8h mov rbx, rdx mov r10, rsi mov r14d, edi lea rdx, [rbp+var_2F0] mov [rdx+18h], rcx mov [rdx+20h], r8 mov [rdx+28h], r9 test al, al jz short loc_9E155 movaps [rbp+var_2C0], xmm0 movaps [rbp+var_2B0], xmm1 movaps [rbp+var_2A0], xmm2 movaps [rbp+var_290], xmm3 movaps [rbp+var_280], xmm4 movaps [rbp+var_270], xmm5 movaps [rbp+var_260], xmm6 movaps [rbp+var_250], xmm7 loc_9E155: mov rax, fs:28h mov [rbp+var_20], rax mov rax, 3000000018h lea r8, [rbp+var_240] mov [r8], rax lea rax, [rbp+arg_0] mov [r8+8], rax mov [r8+10h], rdx lea rdi, my_charset_utf8mb3_general_ci lea r15, [rbp+var_220] mov edx, 200h mov rsi, r15 mov rcx, r10 call my_vsnprintf_ex lea rax, error_handler_hook mov edi, r14d mov rsi, r15 mov rdx, rbx call qword ptr [rax] mov rax, fs:28h cmp rax, [rbp+var_20] jnz short loc_9E1CF add rsp, 2D8h pop rbx pop r14 pop r15 pop rbp retn loc_9E1CF: call ___stack_chk_fail
unsigned long long my_printf_error( _DWORD a1, long long a2, _DWORD 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-2F0h] BYREF long long v17; // [rsp+18h] [rbp-2D8h] long long v18; // [rsp+20h] [rbp-2D0h] long long v19; // [rsp+28h] [rbp-2C8h] __m128 v20; // [rsp+30h] [rbp-2C0h] __m128 v21; // [rsp+40h] [rbp-2B0h] __m128 v22; // [rsp+50h] [rbp-2A0h] __m128 v23; // [rsp+60h] [rbp-290h] __m128 v24; // [rsp+70h] [rbp-280h] __m128 v25; // [rsp+80h] [rbp-270h] __m128 v26; // [rsp+90h] [rbp-260h] __m128 v27; // [rsp+A0h] [rbp-250h] _QWORD v28[4]; // [rsp+B0h] [rbp-240h] BYREF _BYTE v29[512]; // [rsp+D0h] [rbp-220h] BYREF unsigned long long v30; // [rsp+2D0h] [rbp-20h] v20 = a7; v21 = a8; v22 = a9; v23 = a10; v24 = a11; v25 = a12; v26 = a13; v27 = a14; v17 = a4; v18 = a5; v19 = a6; v30 = __readfsqword(0x28u); v28[0] = 0x3000000018LL; v28[1] = &a15; v28[2] = &v16; my_vsnprintf_ex(&my_charset_utf8mb3_general_ci, v29, 512LL, a2, v28); error_handler_hook(); return __readfsqword(0x28u); }
my_printf_error: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x2d8 MOV RBX,RDX MOV R10,RSI MOV R14D,EDI LEA RDX,[RBP + -0x2f0] MOV qword ptr [RDX + 0x18],RCX MOV qword ptr [RDX + 0x20],R8 MOV qword ptr [RDX + 0x28],R9 TEST AL,AL JZ 0x0019e155 MOVAPS xmmword ptr [RBP + -0x2c0],XMM0 MOVAPS xmmword ptr [RBP + -0x2b0],XMM1 MOVAPS xmmword ptr [RBP + -0x2a0],XMM2 MOVAPS xmmword ptr [RBP + -0x290],XMM3 MOVAPS xmmword ptr [RBP + -0x280],XMM4 MOVAPS xmmword ptr [RBP + -0x270],XMM5 MOVAPS xmmword ptr [RBP + -0x260],XMM6 MOVAPS xmmword ptr [RBP + -0x250],XMM7 LAB_0019e155: MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,0x3000000018 LEA R8,[RBP + -0x240] MOV qword ptr [R8],RAX LEA RAX,[RBP + 0x10] MOV qword ptr [R8 + 0x8],RAX MOV qword ptr [R8 + 0x10],RDX LEA RDI,[0x4f9060] LEA R15,[RBP + -0x220] MOV EDX,0x200 MOV RSI,R15 MOV RCX,R10 CALL 0x001d5b58 LEA RAX,[0x485b40] MOV EDI,R14D MOV RSI,R15 MOV RDX,RBX CALL qword ptr [RAX] MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x0019e1cf ADD RSP,0x2d8 POP RBX POP R14 POP R15 POP RBP RET LAB_0019e1cf: CALL 0x00129250
void my_printf_error(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int4 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; long in_FS_OFFSET; int1 local_2f8 [24]; int8 local_2e0; int8 local_2d8; int8 local_2d0; int8 local_2c8; int8 local_2b8; int8 local_2a8; int8 local_298; int8 local_288; int8 local_278; int8 local_268; int8 local_258; int8 local_248; int1 *local_240; int1 *local_238; int1 local_228 [512]; long local_28; local_238 = local_2f8; if (in_AL != '\0') { local_2c8 = param_1; local_2b8 = param_2; local_2a8 = param_3; local_298 = param_4; local_288 = param_5; local_278 = param_6; local_268 = param_7; local_258 = param_8; } local_28 = *(long *)(in_FS_OFFSET + 0x28); local_248 = 0x3000000018; local_240 = &stack0x00000008; local_2e0 = param_12; local_2d8 = param_13; local_2d0 = param_14; my_vsnprintf_ex(my_charset_utf8mb3_general_ci,local_228,0x200,param_10); (*(code *)error_handler_hook)(param_9,local_228,param_11); if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
40,667
ps_fetch_bin
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
static void ps_fetch_bin(MYSQL_BIND *r_param, const MYSQL_FIELD *field, unsigned char **row) { if (field->charsetnr == 63) { ulong field_length= *r_param->length= net_field_length(row); uchar *current_pos= (*row) + r_param->offset, *end= (*row) + field_length; size_t copylen= 0; if (current_pos < end) { copylen= end - current_pos; if (r_param->buffer_length) memcpy(r_param->buffer, current_pos, MIN(copylen, r_param->buffer_length)); } if (copylen < r_param->buffer_length && (r_param->buffer_type == MYSQL_TYPE_STRING || r_param->buffer_type == MYSQL_TYPE_JSON)) ((char *)r_param->buffer)[copylen]= 0; *r_param->error= copylen > r_param->buffer_length; (*row)+= field_length; } else ps_fetch_string(r_param, field, row); }
O0
c
ps_fetch_bin: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rax cmpl $0x3f, 0x6c(%rax) jne 0x2f7da movq -0x18(%rbp), %rdi callq 0x16400 movq -0x8(%rbp), %rcx movq (%rcx), %rcx movq %rax, (%rcx) movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq -0x8(%rbp), %rcx addq 0x48(%rcx), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax addq -0x20(%rbp), %rax movq %rax, -0x30(%rbp) movq $0x0, -0x38(%rbp) movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x2f772 movq -0x30(%rbp), %rax movq -0x28(%rbp), %rcx subq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x40(%rax) je 0x2f770 movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x38(%rbp), %rax movq -0x8(%rbp), %rcx cmpq 0x40(%rcx), %rax jae 0x2f753 movq -0x38(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0x2f75f movq -0x8(%rbp), %rax movq 0x40(%rax), %rax movq %rax, -0x50(%rbp) movq -0x40(%rbp), %rsi movq -0x48(%rbp), %rdi movq -0x50(%rbp), %rdx callq 0x13360 jmp 0x2f772 movq -0x38(%rbp), %rax movq -0x8(%rbp), %rcx cmpq 0x40(%rcx), %rax jae 0x2f7aa movq -0x8(%rbp), %rax cmpl $0xfe, 0x60(%rax) je 0x2f79a movq -0x8(%rbp), %rax cmpl $0xf5, 0x60(%rax) jne 0x2f7aa movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movq -0x38(%rbp), %rcx movb $0x0, (%rax,%rcx) movq -0x38(%rbp), %rax movq -0x8(%rbp), %rcx cmpq 0x40(%rcx), %rax seta %al andb $0x1, %al movzbl %al, %eax movb %al, %cl movq -0x8(%rbp), %rax movq 0x18(%rax), %rax movb %cl, (%rax) movq -0x20(%rbp), %rcx movq -0x18(%rbp), %rax addq (%rax), %rcx movq %rcx, (%rax) jmp 0x2f7eb movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x2f650 addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ps_fetch_bin: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_10] cmp dword ptr [rax+6Ch], 3Fh ; '?' jnz loc_2F7DA mov rdi, [rbp+var_18] call net_field_length mov rcx, [rbp+var_8] mov rcx, [rcx] mov [rcx], rax mov [rbp+var_20], rax mov rax, [rbp+var_18] mov rax, [rax] mov rcx, [rbp+var_8] add rax, [rcx+48h] mov [rbp+var_28], rax mov rax, [rbp+var_18] mov rax, [rax] add rax, [rbp+var_20] mov [rbp+var_30], rax mov [rbp+var_38], 0 mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jnb short loc_2F772 mov rax, [rbp+var_30] mov rcx, [rbp+var_28] sub rax, rcx mov [rbp+var_38], rax mov rax, [rbp+var_8] cmp qword ptr [rax+40h], 0 jz short loc_2F770 mov rax, [rbp+var_8] mov rax, [rax+10h] mov [rbp+var_48], rax mov rax, [rbp+var_28] mov [rbp+var_40], rax mov rax, [rbp+var_38] mov rcx, [rbp+var_8] cmp rax, [rcx+40h] jnb short loc_2F753 mov rax, [rbp+var_38] mov [rbp+var_50], rax jmp short loc_2F75F loc_2F753: mov rax, [rbp+var_8] mov rax, [rax+40h] mov [rbp+var_50], rax loc_2F75F: mov rsi, [rbp+var_40] mov rdi, [rbp+var_48] mov rdx, [rbp+var_50] call _memcpy loc_2F770: jmp short $+2 loc_2F772: mov rax, [rbp+var_38] mov rcx, [rbp+var_8] cmp rax, [rcx+40h] jnb short loc_2F7AA mov rax, [rbp+var_8] cmp dword ptr [rax+60h], 0FEh jz short loc_2F79A mov rax, [rbp+var_8] cmp dword ptr [rax+60h], 0F5h jnz short loc_2F7AA loc_2F79A: mov rax, [rbp+var_8] mov rax, [rax+10h] mov rcx, [rbp+var_38] mov byte ptr [rax+rcx], 0 loc_2F7AA: mov rax, [rbp+var_38] mov rcx, [rbp+var_8] cmp rax, [rcx+40h] setnbe al and al, 1 movzx eax, al mov cl, al mov rax, [rbp+var_8] mov rax, [rax+18h] mov [rax], cl mov rcx, [rbp+var_20] mov rax, [rbp+var_18] add rcx, [rax] mov [rax], rcx jmp short loc_2F7EB loc_2F7DA: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] call ps_fetch_string loc_2F7EB: add rsp, 50h pop rbp retn
unsigned __int8 ** ps_fetch_bin(long long a1, long long a2, unsigned __int8 **a3) { long long v3; // rax unsigned __int8 **result; // rax long long v5; // [rsp+8h] [rbp-48h] unsigned long long v6; // [rsp+18h] [rbp-38h] unsigned __int8 *v7; // [rsp+20h] [rbp-30h] unsigned __int8 *v8; // [rsp+28h] [rbp-28h] long long v9; // [rsp+30h] [rbp-20h] if ( *(_DWORD *)(a2 + 108) != 63 ) return ps_fetch_string(a1, a2, a3); v3 = net_field_length(a3); **(_QWORD **)a1 = v3; v9 = v3; v8 = &(*a3)[*(_QWORD *)(a1 + 72)]; v7 = &(*a3)[v3]; v6 = 0LL; if ( v8 < v7 ) { v6 = v7 - v8; if ( *(_QWORD *)(a1 + 64) ) { v5 = *(_QWORD *)(a1 + 16); if ( v6 >= *(_QWORD *)(a1 + 64) ) memcpy(v5, v8, *(_QWORD *)(a1 + 64)); else memcpy(v5, v8, v6); } } if ( v6 < *(_QWORD *)(a1 + 64) && (*(_DWORD *)(a1 + 96) == 254 || *(_DWORD *)(a1 + 96) == 245) ) *(_BYTE *)(*(_QWORD *)(a1 + 16) + v6) = 0; **(_BYTE **)(a1 + 24) = v6 > *(_QWORD *)(a1 + 64); result = a3; *a3 += v9; return result; }
ps_fetch_bin: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x6c],0x3f JNZ 0x0012f7da MOV RDI,qword ptr [RBP + -0x18] CALL 0x00116400 MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX] MOV qword ptr [RCX],RAX MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] ADD RAX,qword ptr [RCX + 0x48] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x30],RAX MOV qword ptr [RBP + -0x38],0x0 MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JNC 0x0012f772 MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x28] SUB RAX,RCX MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x40],0x0 JZ 0x0012f770 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x40] JNC 0x0012f753 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x50],RAX JMP 0x0012f75f LAB_0012f753: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RBP + -0x50],RAX LAB_0012f75f: MOV RSI,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x50] CALL 0x00113360 LAB_0012f770: JMP 0x0012f772 LAB_0012f772: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x40] JNC 0x0012f7aa MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x60],0xfe JZ 0x0012f79a MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x60],0xf5 JNZ 0x0012f7aa LAB_0012f79a: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + RCX*0x1],0x0 LAB_0012f7aa: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x40] SETA AL AND AL,0x1 MOVZX EAX,AL MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x18] MOV byte ptr [RAX],CL MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] ADD RCX,qword ptr [RAX] MOV qword ptr [RAX],RCX JMP 0x0012f7eb LAB_0012f7da: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] CALL 0x0012f650 LAB_0012f7eb: ADD RSP,0x50 POP RBP RET
void ps_fetch_bin(int8 *param_1,long param_2,long *param_3) { long lVar1; void *__src; size_t local_58; ulong local_40; if (*(int *)(param_2 + 0x6c) == 0x3f) { lVar1 = net_field_length(param_3); *(long *)*param_1 = lVar1; __src = (void *)(*param_3 + param_1[9]); local_40 = 0; if ((__src < (void *)(*param_3 + lVar1)) && (local_40 = (*param_3 + lVar1) - (long)__src, param_1[8] != 0)) { local_58 = local_40; if ((ulong)param_1[8] <= local_40) { local_58 = param_1[8]; } memcpy((void *)param_1[2],__src,local_58); } if ((local_40 < (ulong)param_1[8]) && ((*(int *)(param_1 + 0xc) == 0xfe || (*(int *)(param_1 + 0xc) == 0xf5)))) { *(int1 *)(param_1[2] + local_40) = 0; } *(bool *)param_1[3] = (ulong)param_1[8] < local_40; *param_3 = lVar1 + *param_3; } else { ps_fetch_string(param_1,param_2,param_3); } return; }
40,668
minja::MethodCallExpr::MethodCallExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::VariableExpr>&&, minja::ArgumentsExpression&&)
monkey531[P]llama/common/minja.hpp
MethodCallExpr(const Location & location, std::shared_ptr<Expression> && obj, std::shared_ptr<VariableExpr> && m, ArgumentsExpression && a) : Expression(location), object(std::move(obj)), method(std::move(m)), args(std::move(a)) {}
O2
cpp
minja::MethodCallExpr::MethodCallExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::VariableExpr>&&, minja::ArgumentsExpression&&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %r8, %rbx movq %rcx, %r14 movq %rdx, %r15 movq %rdi, %r12 callq 0x65d58 leaq 0x91c36(%rip), %rax # 0x100810 addq $0x10, %rax movq %rax, (%r12) andq $0x0, 0x28(%r12) movups (%r15), %xmm0 andq $0x0, 0x8(%r15) movups %xmm0, 0x20(%r12) andq $0x0, (%r15) andq $0x0, 0x38(%r12) movups (%r14), %xmm0 andq $0x0, 0x8(%r14) movups %xmm0, 0x30(%r12) andq $0x0, (%r14) addq $0x40, %r12 movq %r12, %rdi movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0x6ec2e
_ZN5minja14MethodCallExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEEOS4_INS_12VariableExprEEONS_19ArgumentsExpressionE: push r15 push r14 push r12 push rbx push rax mov rbx, r8 mov r14, rcx mov r15, rdx mov r12, rdi call _ZN5minja10ExpressionC2ERKNS_8LocationE; minja::Expression::Expression(minja::Location const&) lea rax, _ZTVN5minja14MethodCallExprE; `vtable for'minja::MethodCallExpr add rax, 10h mov [r12], rax and qword ptr [r12+28h], 0 movups xmm0, xmmword ptr [r15] and qword ptr [r15+8], 0 movups xmmword ptr [r12+20h], xmm0 and qword ptr [r15], 0 and qword ptr [r12+38h], 0 movups xmm0, xmmword ptr [r14] and qword ptr [r14+8], 0 movups xmmword ptr [r12+30h], xmm0 and qword ptr [r14], 0 add r12, 40h ; '@' mov rdi, r12 mov rsi, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp $+5; minja::ArgumentsExpression::ArgumentsExpression(minja::ArgumentsExpression&&)
long long minja::MethodCallExpr::MethodCallExpr( long long a1, _QWORD *a2, __int128 *a3, __int128 *a4, long long a5) { __int128 v8; // xmm0 __int128 v9; // xmm0 minja::Expression::Expression((_QWORD *)a1, a2); *(_QWORD *)a1 = &`vtable for'minja::MethodCallExpr + 2; *(_QWORD *)(a1 + 40) = 0LL; v8 = *a3; *((_QWORD *)a3 + 1) = 0LL; *(_OWORD *)(a1 + 32) = v8; *(_QWORD *)a3 = 0LL; *(_QWORD *)(a1 + 56) = 0LL; v9 = *a4; *((_QWORD *)a4 + 1) = 0LL; *(_OWORD *)(a1 + 48) = v9; *(_QWORD *)a4 = 0LL; return minja::ArgumentsExpression::ArgumentsExpression(a1 + 64, a5); }
MethodCallExpr: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,R8 MOV R14,RCX MOV R15,RDX MOV R12,RDI CALL 0x00165d58 LEA RAX,[0x200810] ADD RAX,0x10 MOV qword ptr [R12],RAX AND qword ptr [R12 + 0x28],0x0 MOVUPS XMM0,xmmword ptr [R15] AND qword ptr [R15 + 0x8],0x0 MOVUPS xmmword ptr [R12 + 0x20],XMM0 AND qword ptr [R15],0x0 AND qword ptr [R12 + 0x38],0x0 MOVUPS XMM0,xmmword ptr [R14] AND qword ptr [R14 + 0x8],0x0 MOVUPS xmmword ptr [R12 + 0x30],XMM0 AND qword ptr [R14],0x0 ADD R12,0x40 MOV RDI,R12 MOV RSI,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP 0x0016ec2e
/* minja::MethodCallExpr::MethodCallExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::VariableExpr>&&, minja::ArgumentsExpression&&) */ void __thiscall minja::MethodCallExpr::MethodCallExpr (MethodCallExpr *this,Location *param_1,shared_ptr *param_2,shared_ptr *param_3, ArgumentsExpression *param_4) { int8 uVar1; Expression::Expression((Expression *)this,param_1); *(int ***)this = &PTR_do_evaluate_00200820; *(int8 *)(this + 0x28) = 0; uVar1 = *(int8 *)(param_2 + 8); *(int8 *)(param_2 + 8) = 0; *(int8 *)(this + 0x20) = *(int8 *)param_2; *(int8 *)(this + 0x28) = uVar1; *(int8 *)param_2 = 0; *(int8 *)(this + 0x38) = 0; uVar1 = *(int8 *)(param_3 + 8); *(int8 *)(param_3 + 8) = 0; *(int8 *)(this + 0x30) = *(int8 *)param_3; *(int8 *)(this + 0x38) = uVar1; *(int8 *)param_3 = 0; ArgumentsExpression::ArgumentsExpression((ArgumentsExpression *)(this + 0x40),param_4); return; }
40,669
mysql_read_query_result_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_read_query_result_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_read_query_result, (parms->mysql), parms->mysql, my_bool, r_my_bool) }
O0
c
mysql_read_query_result_start_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x423b0 movb %al, -0x11(%rbp) movb -0x11(%rbp), %cl movq -0x20(%rbp), %rax movb %cl, 0x8(%rax) movq -0x20(%rbp), %rax movl $0x0, (%rax) addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mysql_read_query_result_start_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax] call mysql_read_query_result mov [rbp+var_11], al mov cl, [rbp+var_11] mov rax, [rbp+var_20] mov [rax+8], cl mov rax, [rbp+var_20] mov dword ptr [rax], 0 add rsp, 20h pop rbp retn
long long mysql_read_query_result_start_internal(long long *a1) { long long result; // rax long long v2; // [rsp+0h] [rbp-20h] v2 = *(_QWORD *)(*(_QWORD *)(*a1 + 1152) + 40LL); *(_BYTE *)(v2 + 8) = mysql_read_query_result(*a1); result = v2; *(_DWORD *)v2 = 0; return result; }
mysql_read_query_result_start_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x001423b0 MOV byte ptr [RBP + -0x11],AL MOV CL,byte ptr [RBP + -0x11] MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x8],CL MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x0 ADD RSP,0x20 POP RBP RET
void mysql_read_query_result_start_internal(long *param_1) { int4 *puVar1; int1 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_read_query_result(*param_1); *(int1 *)(puVar1 + 2) = uVar2; *puVar1 = 0; return; }
40,670
ma_ft_segiterator_dummy_init
eloqsql/storage/maria/ma_ft_update.c
void _ma_ft_segiterator_dummy_init(const uchar *record, uint len, FT_SEG_ITERATOR *ftsi) { DBUG_ENTER("_ma_ft_segiterator_dummy_init"); ftsi->num=1; ftsi->seg=0; ftsi->pos=record; ftsi->len=len; DBUG_VOID_RETURN; }
O3
c
ma_ft_segiterator_dummy_init: pushq %rbp movq %rsp, %rbp movl $0x1, (%rdx) movq $0x0, 0x8(%rdx) movq %rdi, 0x18(%rdx) movl %esi, 0x4(%rdx) popq %rbp retq
_ma_ft_segiterator_dummy_init: push rbp mov rbp, rsp mov dword ptr [rdx], 1 mov qword ptr [rdx+8], 0 mov [rdx+18h], rdi mov [rdx+4], esi pop rbp retn
void ma_ft_segiterator_dummy_init(long long a1, int a2, long long a3) { *(_DWORD *)a3 = 1; *(_QWORD *)(a3 + 8) = 0LL; *(_QWORD *)(a3 + 24) = a1; *(_DWORD *)(a3 + 4) = a2; }
_ma_ft_segiterator_dummy_init: PUSH RBP MOV RBP,RSP MOV dword ptr [RDX],0x1 MOV qword ptr [RDX + 0x8],0x0 MOV qword ptr [RDX + 0x18],RDI MOV dword ptr [RDX + 0x4],ESI POP RBP RET
void _ma_ft_segiterator_dummy_init(int8 param_1,int4 param_2,int4 *param_3) { *param_3 = 1; *(int8 *)(param_3 + 2) = 0; *(int8 *)(param_3 + 6) = param_1; param_3[1] = param_2; return; }
40,671
make_columns_old_format(THD*, st_schema_table*)
eloqsql/sql/sql_show.cc
int make_columns_old_format(THD *thd, ST_SCHEMA_TABLE *schema_table) { int fields_arr[]= {3, 15, 14, 6, 16, 5, 17, 18, 19, -1}; int *field_num= fields_arr; ST_FIELD_INFO *field_info; Name_resolution_context *context= &thd->lex->first_select_lex()->context; for (; *field_num >= 0; field_num++) { field_info= &schema_table->fields_info[*field_num]; if (!thd->lex->verbose && (*field_num == 14 || *field_num == 18 || *field_num == 19)) continue; Item_field *field= new (thd->mem_root) Item_field(thd, context, field_info->name()); if (field) { field->set_name(thd, field_info->old_name()); if (add_item_to_list(thd, field)) return 1; } } return 0; }
O0
cpp
make_columns_old_format(THD*, st_schema_table*): pushq %rbp movq %rsp, %rbp subq $0xd0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) leaq -0x40(%rbp), %rdi leaq 0xa1b892(%rip), %rsi # 0x14b1ac0 movl $0x28, %edx callq 0x776440 leaq -0x40(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x10(%rbp), %rax movq 0x58(%rax), %rdi callq 0x87e3a0 addq $0x48, %rax movq %rax, -0x58(%rbp) movq -0x48(%rbp), %rax cmpl $0x0, (%rax) jl 0xa9640e movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq -0x48(%rbp), %rcx movslq (%rcx), %rcx imulq $0x48, %rcx, %rcx addq %rcx, %rax movq %rax, -0x50(%rbp) movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movl 0x17c6(%rax), %eax shrl $0x9, %eax andl $0x1, %eax testl $0x1, %eax jne 0xa962b7 movq -0x48(%rbp), %rax cmpl $0xe, (%rax) je 0xa962b2 movq -0x48(%rbp), %rax cmpl $0x12, (%rax) je 0xa962b2 movq -0x48(%rbp), %rax cmpl $0x13, (%rax) jne 0xa962b7 jmp 0xa963fd movq -0x10(%rbp), %rax movq 0x28(%rax), %rsi movq %rsi, -0xa0(%rbp) movl $0x118, %edi # imm = 0x118 callq 0x87dea0 movq %rax, %rcx movq %rcx, -0x98(%rbp) movb $0x0, -0x71(%rbp) xorl %eax, %eax cmpq $0x0, %rcx movq %rax, -0x90(%rbp) je 0xa96362 movq -0xa0(%rbp), %rax movq -0x98(%rbp), %rcx movq %rcx, -0x68(%rbp) movq %rax, -0x70(%rbp) movb $0x1, -0x71(%rbp) movq -0x10(%rbp), %rax movq %rax, -0xb8(%rbp) movq -0x58(%rbp), %rax movq %rax, -0xb0(%rbp) movq -0x50(%rbp), %rdi callq 0xa7d470 movq %rax, -0xa8(%rbp) jmp 0xa9632f movq -0xa8(%rbp), %rcx movq -0xb0(%rbp), %rdx movq -0xb8(%rbp), %rsi movq -0x98(%rbp), %rdi callq 0x9ce540 jmp 0xa96352 movq -0x98(%rbp), %rax movq %rax, -0x90(%rbp) jmp 0xa96362 movq -0x90(%rbp), %rax movq %rax, -0x60(%rbp) cmpq $0x0, -0x60(%rbp) je 0xa963fb movq -0x60(%rbp), %rax movq %rax, -0xc8(%rbp) movq -0x10(%rbp), %rax movq %rax, -0xc0(%rbp) movq -0x50(%rbp), %rdi callq 0xaa1ef0 movq -0xc8(%rbp), %rdi movq -0xc0(%rbp), %rsi movq %rax, %rdx leaq 0x12b3f99(%rip), %rax # 0x1d4a348 movq (%rax), %rcx callq 0x883120 movq -0x10(%rbp), %rdi movq -0x60(%rbp), %rsi callq 0x9ce580 testb $0x1, %al jne 0xa963ca jmp 0xa963f9 movl $0x1, -0x4(%rbp) jmp 0xa96415 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x80(%rbp) movl %eax, -0x84(%rbp) testb $0x1, -0x71(%rbp) jne 0xa963ea jmp 0xa963f7 movq -0x68(%rbp), %rdi movq -0x70(%rbp), %rsi callq 0x87df70 jmp 0xa96421 jmp 0xa963fb jmp 0xa963fd movq -0x48(%rbp), %rax addq $0x4, %rax movq %rax, -0x48(%rbp) jmp 0xa96255 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0xd0, %rsp popq %rbp retq movq -0x80(%rbp), %rdi callq 0x775a20 nopw (%rax,%rax)
_Z23make_columns_old_formatP3THDP15st_schema_table: push rbp mov rbp, rsp sub rsp, 0D0h mov [rbp+var_10], rdi mov [rbp+var_18], rsi lea rdi, [rbp+var_40] lea rsi, unk_14B1AC0 mov edx, 28h ; '(' call _memcpy lea rax, [rbp+var_40] mov [rbp+var_48], rax mov rax, [rbp+var_10] mov rdi, [rax+58h]; this call _ZN3LEX16first_select_lexEv; LEX::first_select_lex(void) add rax, 48h ; 'H' mov [rbp+var_58], rax loc_A96255: mov rax, [rbp+var_48] cmp dword ptr [rax], 0 jl loc_A9640E mov rax, [rbp+var_18] mov rax, [rax+8] mov rcx, [rbp+var_48] movsxd rcx, dword ptr [rcx] imul rcx, 48h ; 'H' add rax, rcx mov [rbp+var_50], rax mov rax, [rbp+var_10] mov rax, [rax+58h] mov eax, [rax+17C6h] shr eax, 9 and eax, 1 test eax, 1 jnz short loc_A962B7 mov rax, [rbp+var_48] cmp dword ptr [rax], 0Eh jz short loc_A962B2 mov rax, [rbp+var_48] cmp dword ptr [rax], 12h jz short loc_A962B2 mov rax, [rbp+var_48] cmp dword ptr [rax], 13h jnz short loc_A962B7 loc_A962B2: jmp loc_A963FD loc_A962B7: mov rax, [rbp+var_10] mov rsi, [rax+28h] mov [rbp+var_A0], rsi mov edi, 118h call _ZN4ItemnwEmP11st_mem_root; Item::operator new(ulong,st_mem_root *) mov rcx, rax mov [rbp+var_98], rcx mov [rbp+var_71], 0 xor eax, eax cmp rcx, 0 mov [rbp+var_90], rax jz short loc_A96362 mov rax, [rbp+var_A0] mov rcx, [rbp+var_98] mov [rbp+var_68], rcx mov [rbp+var_70], rax mov [rbp+var_71], 1 mov rax, [rbp+var_10] mov [rbp+var_B8], rax mov rax, [rbp+var_58] mov [rbp+var_B0], rax mov rdi, [rbp+var_50]; this call _ZNK13ST_FIELD_INFO4nameEv; ST_FIELD_INFO::name(void) mov [rbp+var_A8], rax jmp short $+2 loc_A9632F: mov rcx, [rbp+var_A8] mov rdx, [rbp+var_B0] mov rsi, [rbp+var_B8] mov rdi, [rbp+var_98] call _ZN10Item_fieldC2EP3THDP23Name_resolution_contextRK25st_mysql_const_lex_string; Item_field::Item_field(THD *,Name_resolution_context *,st_mysql_const_lex_string const&) jmp short $+2 loc_A96352: mov rax, [rbp+var_98] mov [rbp+var_90], rax jmp short $+2 loc_A96362: mov rax, [rbp+var_90] mov [rbp+var_60], rax cmp [rbp+var_60], 0 jz loc_A963FB mov rax, [rbp+var_60] mov [rbp+var_C8], rax mov rax, [rbp+var_10] mov [rbp+var_C0], rax mov rdi, [rbp+var_50]; this call _ZNK13ST_FIELD_INFO8old_nameEv; ST_FIELD_INFO::old_name(void) mov rdi, [rbp+var_C8] mov rsi, [rbp+var_C0] mov rdx, rax lea rax, system_charset_info mov rcx, [rax] call _ZN4Item8set_nameEP3THDRK25st_mysql_const_lex_stringPK15charset_info_st; Item::set_name(THD *,st_mysql_const_lex_string const&,charset_info_st const*) mov rdi, [rbp+var_10]; THD * mov rsi, [rbp+var_60]; Item * call _Z16add_item_to_listP3THDP4Item; add_item_to_list(THD *,Item *) test al, 1 jnz short loc_A963CA jmp short loc_A963F9 loc_A963CA: mov [rbp+var_4], 1 jmp short loc_A96415 mov rcx, rax mov eax, edx mov [rbp+var_80], rcx mov [rbp+var_84], eax test [rbp+var_71], 1 jnz short loc_A963EA jmp short loc_A963F7 loc_A963EA: mov rdi, [rbp+var_68] mov rsi, [rbp+var_70] call _ZN4ItemdlEPvP11st_mem_root; Item::operator delete(void *,st_mem_root *) loc_A963F7: jmp short loc_A96421 loc_A963F9: jmp short $+2 loc_A963FB: jmp short $+2 loc_A963FD: mov rax, [rbp+var_48] add rax, 4 mov [rbp+var_48], rax jmp loc_A96255 loc_A9640E: mov [rbp+var_4], 0 loc_A96415: mov eax, [rbp+var_4] add rsp, 0D0h pop rbp retn loc_A96421: mov rdi, [rbp+var_80] call __Unwind_Resume
long long make_columns_old_format(THD *a1, long long a2) { long long v2; // rax THD *v4; // [rsp+10h] [rbp-C0h] THD *v5; // [rsp+18h] [rbp-B8h] long long v6; // [rsp+28h] [rbp-A8h] long long v7; // [rsp+38h] [rbp-98h] Item *v8; // [rsp+40h] [rbp-90h] long long v9; // [rsp+78h] [rbp-58h] ST_FIELD_INFO *v10; // [rsp+80h] [rbp-50h] int *v11; // [rsp+88h] [rbp-48h] _BYTE v12[40]; // [rsp+90h] [rbp-40h] BYREF long long v13; // [rsp+B8h] [rbp-18h] THD *v14; // [rsp+C0h] [rbp-10h] v14 = a1; v13 = a2; memcpy(v12, &unk_14B1AC0, sizeof(v12)); v11 = (int *)v12; v9 = LEX::first_select_lex(*((LEX **)v14 + 11)) + 72; while ( *v11 >= 0 ) { v10 = (ST_FIELD_INFO *)(72LL * *v11 + *(_QWORD *)(v13 + 8)); if ( ((*(_DWORD *)(*((_QWORD *)v14 + 11) + 6086LL) >> 9) & 1) != 0 || *v11 != 14 && *v11 != 18 && *v11 != 19 ) { v7 = Item::operator new(280LL, *((_QWORD *)v14 + 5)); v8 = 0LL; if ( v7 ) { v5 = v14; v6 = ST_FIELD_INFO::name(v10); Item_field::Item_field(v7, (long long)v5, v9, v6); v8 = (Item *)v7; } if ( v8 ) { v4 = v14; v2 = ST_FIELD_INFO::old_name(v10); Item::set_name(v8, v4, v2, (const charset_info_st *)system_charset_info); if ( (add_item_to_list(v14, v8) & 1) != 0 ) return 1; } } ++v11; } return 0; }
mysql_derived_merge_for_insert: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX JMP 0x00a96226 LAB_00a96226: JMP 0x00a96228 LAB_00a96228: JMP 0x00a9622a LAB_00a9622a: MOV RAX,qword ptr [RBP + -0x20] TEST byte ptr [RAX + 0x3c8],0x1 JZ 0x00a96242 JMP 0x00a96239 LAB_00a96239: MOV byte ptr [RBP + -0x1],0x0 JMP 0x00a96344 LAB_00a96242: MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x10] XOR EDX,EDX CALL 0x00c172d0 TEST AL,0x1 JNZ 0x00a96257 JMP 0x00a96262 LAB_00a96257: JMP 0x00a96259 LAB_00a96259: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00a96344 LAB_00a96262: MOV RDI,qword ptr [RBP + -0x20] CALL 0x009d36d0 TEST AL,0x1 JNZ 0x00a96271 JMP 0x00a9628e LAB_00a96271: JMP 0x00a96273 LAB_00a96273: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x00a94320 AND AL,0x1 MOV byte ptr [RBP + -0x1],AL JMP 0x00a96344 LAB_00a9628e: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x58] CMP dword ptr [RAX + 0x8],0x48 JZ 0x00a962aa MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x58] CMP dword ptr [RAX + 0x8],0x47 JNZ 0x00a962b5 LAB_00a962aa: JMP 0x00a962ac LAB_00a962ac: MOV byte ptr [RBP + -0x1],0x0 JMP 0x00a96344 LAB_00a962b5: MOV RDI,qword ptr [RBP + -0x20] CALL 0x00a5a4a0 TEST AL,0x1 JNZ 0x00a9633e MOV RDI,qword ptr [RBP + -0x20] CALL 0x00c10c40 TEST AL,0x1 JNZ 0x00a962e5 JMP 0x00a962d1 LAB_00a962d1: MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x10] CALL 0x00c102f0 AND AL,0x1 MOV byte ptr [RBP + -0x1],AL JMP 0x00a96344 LAB_00a962e5: MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX + 0x1b8],0x0 JZ 0x00a9633c MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x1b8] MOV RCX,qword ptr [RAX + 0x100] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x100],RCX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x1b8] MOV RCX,qword ptr [RAX + 0x170] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x170],RCX MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x3c8],0x1 JMP 0x00a9633a LAB_00a9633a: JMP 0x00a9633c LAB_00a9633c: JMP 0x00a9633e LAB_00a9633e: JMP 0x00a96340 LAB_00a96340: MOV byte ptr [RBP + -0x1],0x0 LAB_00a96344: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x20 POP RBP RET
/* mysql_derived_merge_for_insert(THD*, LEX*, TABLE_LIST*) */ byte mysql_derived_merge_for_insert(THD *param_1,LEX *param_2,TABLE_LIST *param_3) { byte bVar1; ulong uVar2; byte local_9; if (((byte)param_3[0x3c8] & 1) == 0) { uVar2 = TABLE_LIST::init_derived(param_3,param_1,false); if ((uVar2 & 1) == 0) { uVar2 = TABLE_LIST::is_materialized_derived(param_3); if ((uVar2 & 1) == 0) { if ((*(int *)(*(long *)(param_1 + 0x58) + 8) == 0x48) || (*(int *)(*(long *)(param_1 + 0x58) + 8) == 0x47)) { local_9 = 0; } else { uVar2 = TABLE_LIST::is_multitable(param_3); if ((uVar2 & 1) == 0) { uVar2 = TABLE_LIST::single_table_updatable(param_3); if ((uVar2 & 1) == 0) { bVar1 = TABLE_LIST::create_field_translation(param_3,param_1); return bVar1 & 1; } if (*(long *)(param_3 + 0x1b8) != 0) { *(int8 *)(param_3 + 0x100) = *(int8 *)(*(long *)(param_3 + 0x1b8) + 0x100) ; *(int8 *)(param_3 + 0x170) = *(int8 *)(*(long *)(param_3 + 0x1b8) + 0x170) ; param_3[0x3c8] = (TABLE_LIST)0x1; } } local_9 = 0; } } else { local_9 = mysql_derived_prepare(param_1,param_2,param_3); local_9 = local_9 & 1; } } else { local_9 = 1; } } else { local_9 = 0; } return local_9; }
40,672
mysql_stmt_execute
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
int STDCALL mysql_stmt_execute(MYSQL_STMT *stmt) { MYSQL *mysql= stmt->mysql; char *request; int ret; size_t request_len= 0; if (!stmt->mysql) { SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); return(1); } if (stmt->state < MYSQL_STMT_PREPARED) { SET_CLIENT_ERROR(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 (stmt->param_count && !stmt->bind_param_done) { SET_CLIENT_STMT_ERROR(stmt, CR_PARAMS_NOT_BOUND, SQLSTATE_UNKNOWN, 0); return(1); } if (stmt->state == MYSQL_STMT_WAITING_USE_OR_STORE) { stmt->default_rset_handler = _mysql_stmt_use_result; stmt->default_rset_handler(stmt); } if (stmt->state > MYSQL_STMT_WAITING_USE_OR_STORE && stmt->state < MYSQL_STMT_FETCH_DONE && !stmt->result.data) { if (!stmt->cursor_exists) do { stmt->mysql->methods->db_stmt_flush_unbuffered(stmt); } while(mysql_stmt_more_results(stmt)); stmt->state= MYSQL_STMT_PREPARED; stmt->mysql->status= MYSQL_STATUS_READY; } /* clear data, in case mysql_stmt_store_result was called */ if (stmt->result.data) { ma_free_root(&stmt->result.alloc, MYF(MY_KEEP_PREALLOC)); stmt->result_cursor= stmt->result.data= 0; } /* CONC-344: set row count to zero */ stmt->result.rows= 0; request= (char *)ma_stmt_execute_generate_request(stmt, &request_len, 0); if (!request) return 1; ret= stmt->mysql->methods->db_command(mysql, stmt->array_size > 0 ? COM_STMT_BULK_EXECUTE : COM_STMT_EXECUTE, request, request_len, 1, stmt); if (request) free(request); if (ret) { UPDATE_STMT_ERROR(stmt); return(1); } if (mysql->net.extension->multi_status > COM_MULTI_OFF || mysql->options.extension->skip_read_response) return(0); return(mthd_stmt_read_execute_response(stmt)); }
O0
c
mysql_stmt_execute: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq %rax, -0x18(%rbp) movq $0x0, -0x30(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x38(%rax) jne 0x4fcfc jmp 0x4fc8d movq -0x10(%rbp), %rax movl $0x7dd, 0x108(%rax) # imm = 0x7DD movq -0x10(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D leaq 0x1e3983(%rip), %rax # 0x233630 movq (%rax), %rsi movl $0x5, %edx callq 0x36140 movq -0x10(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x10(%rbp), %rdi addq $0x10c, %rdi # imm = 0x10C leaq 0x1e3969(%rip), %rax # 0x233640 movq 0x68(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x36140 movq -0x10(%rbp), %rax movb $0x0, 0x30b(%rax) movl $0x1, -0x4(%rbp) jmp 0x500f5 movq -0x10(%rbp), %rax cmpl $0x1, 0x50(%rax) jae 0x4fde0 jmp 0x4fd0c movq -0x18(%rbp), %rax movl $0x7de, 0x90(%rax) # imm = 0x7DE movq -0x18(%rbp), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x1e3904(%rip), %rax # 0x233630 movq (%rax), %rsi movl $0x5, %edx callq 0x36140 movq -0x18(%rbp), %rax movb $0x0, 0x29c(%rax) movq -0x18(%rbp), %rdi addq $0x97, %rdi leaq 0x1e38ea(%rip), %rax # 0x233640 movq 0x70(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x36140 movq -0x18(%rbp), %rax movb $0x0, 0x296(%rax) jmp 0x4fd71 movq -0x10(%rbp), %rax movl $0x7de, 0x108(%rax) # imm = 0x7DE movq -0x10(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D leaq 0x1e389f(%rip), %rax # 0x233630 movq (%rax), %rsi movl $0x5, %edx callq 0x36140 movq -0x10(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x10(%rbp), %rdi addq $0x10c, %rdi # imm = 0x10C leaq 0x1e3885(%rip), %rax # 0x233640 movq 0x70(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x36140 movq -0x10(%rbp), %rax movb $0x0, 0x30b(%rax) movl $0x1, -0x4(%rbp) jmp 0x500f5 movq -0x10(%rbp), %rax cmpl $0x0, 0x64(%rax) je 0x4fe6f movq -0x10(%rbp), %rax cmpb $0x0, 0xe9(%rax) jne 0x4fe6f jmp 0x4fdfd movq -0x10(%rbp), %rax movl $0x7ef, 0x108(%rax) # imm = 0x7EF movq -0x10(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D leaq 0x1e3813(%rip), %rax # 0x233630 movq (%rax), %rsi movl $0x5, %edx callq 0x36140 movq -0x10(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x10(%rbp), %rdi addq $0x10c, %rdi # imm = 0x10C leaq 0x1e37f9(%rip), %rax # 0x233640 movq 0xf8(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x36140 movq -0x10(%rbp), %rax movb $0x0, 0x30b(%rax) movl $0x1, -0x4(%rbp) jmp 0x500f5 movq -0x10(%rbp), %rax cmpl $0x3, 0x50(%rax) jne 0x4fe9c movq -0x10(%rbp), %rax leaq -0x5df4(%rip), %rcx # 0x4a090 movq %rcx, 0x358(%rax) movq -0x10(%rbp), %rax movq 0x358(%rax), %rax movq -0x10(%rbp), %rdi callq *%rax movq -0x10(%rbp), %rax cmpl $0x3, 0x50(%rax) jbe 0x4ff12 movq -0x10(%rbp), %rax cmpl $0x6, 0x50(%rax) jae 0x4ff12 movq -0x10(%rbp), %rax cmpq $0x0, 0x80(%rax) jne 0x4ff12 movq -0x10(%rbp), %rax cmpb $0x0, 0x338(%rax) jne 0x4fef5 jmp 0x4fecd movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq 0x4d0(%rax), %rax movq 0x78(%rax), %rax movq -0x10(%rbp), %rdi callq *%rax movq -0x10(%rbp), %rdi callq 0x50100 cmpb $0x0, %al jne 0x4fecd jmp 0x4fef5 movq -0x10(%rbp), %rax movl $0x1, 0x50(%rax) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movl $0x0, 0x488(%rax) movq -0x10(%rbp), %rax cmpq $0x0, 0x80(%rax) je 0x4ff57 movq -0x10(%rbp), %rdi addq $0x80, %rdi addq $0x10, %rdi movl $0x1, %esi callq 0x48b00 movq -0x10(%rbp), %rax movq $0x0, 0x80(%rax) movq -0x10(%rbp), %rax movq $0x0, 0xe0(%rax) movq -0x10(%rbp), %rax movq $0x0, 0xc8(%rax) movq -0x10(%rbp), %rdi leaq -0x30(%rbp), %rsi xorl %edx, %edx callq 0x4bf70 movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) jne 0x4ff8c movl $0x1, -0x4(%rbp) jmp 0x500f5 movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq 0x4d0(%rax), %rax movq 0x10(%rax), %rax movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rcx movl 0x368(%rcx), %edx movl $0x17, %esi movl $0xfa, %ecx cmpl $0x0, %edx cmoval %ecx, %esi movq -0x20(%rbp), %rdx movq -0x30(%rbp), %rcx movq -0x10(%rbp), %r9 movl $0x1, %r8d callq *%rax movl %eax, -0x24(%rbp) cmpq $0x0, -0x20(%rbp) je 0x4ffe4 movq -0x20(%rbp), %rdi callq 0x361a0 cmpl $0x0, -0x24(%rbp) je 0x500b9 jmp 0x4fff0 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 0x36140 movq -0x10(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x10(%rbp), %rax addq $0x10c, %rax # imm = 0x10C movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax addq $0x97, %rax cmpq $0x0, %rax je 0x5006d movq -0x10(%rbp), %rax movq 0x38(%rax), %rax addq $0x97, %rax movq %rax, -0x40(%rbp) jmp 0x50093 movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movl 0x90(%rax), %eax subl $0x7d0, %eax # imm = 0x7D0 movl %eax, %eax movl %eax, %ecx leaq 0x1e35b5(%rip), %rax # 0x233640 movq (%rax,%rcx,8), %rax movq %rax, -0x40(%rbp) movq -0x38(%rbp), %rdi movq -0x40(%rbp), %rsi movl $0x200, %edx # imm = 0x200 callq 0x36140 movq -0x10(%rbp), %rax movb $0x0, 0x30b(%rax) movl $0x1, -0x4(%rbp) jmp 0x500f5 movq -0x18(%rbp), %rax movq 0x2a0(%rax), %rax cmpl $0x0, (%rax) ja 0x500e0 movq -0x18(%rbp), %rax movq 0x480(%rax), %rax movsbl 0x148(%rax), %eax cmpl $0x0, %eax je 0x500e9 movl $0x0, -0x4(%rbp) jmp 0x500f5 movq -0x10(%rbp), %rdi callq 0x4f1f0 movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nop
mysql_stmt_execute: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax+38h] mov [rbp+var_18], rax mov [rbp+var_30], 0 mov rax, [rbp+var_10] cmp qword ptr [rax+38h], 0 jnz short loc_4FCFC jmp short $+2 loc_4FC8D: 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_500F5 loc_4FCFC: mov rax, [rbp+var_10] cmp dword ptr [rax+50h], 1 jnb loc_4FDE0 jmp short $+2 loc_4FD0C: mov rax, [rbp+var_18] mov dword ptr [rax+90h], 7DEh mov rdi, [rbp+var_18] add rdi, 297h lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_18] mov byte ptr [rax+29Ch], 0 mov rdi, [rbp+var_18] add rdi, 97h lea rax, client_errors mov rsi, [rax+70h] mov edx, 1FFh call _strncpy mov rax, [rbp+var_18] mov byte ptr [rax+296h], 0 jmp short $+2 loc_4FD71: 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_500F5 loc_4FDE0: mov rax, [rbp+var_10] cmp dword ptr [rax+64h], 0 jz loc_4FE6F mov rax, [rbp+var_10] cmp byte ptr [rax+0E9h], 0 jnz short loc_4FE6F jmp short $+2 loc_4FDFD: mov rax, [rbp+var_10] mov dword ptr [rax+108h], 7EFh 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+0F8h] mov edx, 200h call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+30Bh], 0 mov [rbp+var_4], 1 jmp loc_500F5 loc_4FE6F: mov rax, [rbp+var_10] cmp dword ptr [rax+50h], 3 jnz short loc_4FE9C mov rax, [rbp+var_10] lea rcx, _mysql_stmt_use_result mov [rax+358h], rcx mov rax, [rbp+var_10] mov rax, [rax+358h] mov rdi, [rbp+var_10] call rax loc_4FE9C: mov rax, [rbp+var_10] cmp dword ptr [rax+50h], 3 jbe short loc_4FF12 mov rax, [rbp+var_10] cmp dword ptr [rax+50h], 6 jnb short loc_4FF12 mov rax, [rbp+var_10] cmp qword ptr [rax+80h], 0 jnz short loc_4FF12 mov rax, [rbp+var_10] cmp byte ptr [rax+338h], 0 jnz short loc_4FEF5 jmp short $+2 loc_4FECD: mov rax, [rbp+var_10] mov rax, [rax+38h] mov rax, [rax+4D0h] mov rax, [rax+78h] mov rdi, [rbp+var_10] call rax mov rdi, [rbp+var_10] call mysql_stmt_more_results cmp al, 0 jnz short loc_4FECD jmp short $+2 loc_4FEF5: mov rax, [rbp+var_10] mov dword ptr [rax+50h], 1 mov rax, [rbp+var_10] mov rax, [rax+38h] mov dword ptr [rax+488h], 0 loc_4FF12: mov rax, [rbp+var_10] cmp qword ptr [rax+80h], 0 jz short loc_4FF57 mov rdi, [rbp+var_10] add rdi, 80h add rdi, 10h mov esi, 1 call ma_free_root mov rax, [rbp+var_10] mov qword ptr [rax+80h], 0 mov rax, [rbp+var_10] mov qword ptr [rax+0E0h], 0 loc_4FF57: mov rax, [rbp+var_10] mov qword ptr [rax+0C8h], 0 mov rdi, [rbp+var_10] lea rsi, [rbp+var_30] xor edx, edx call ma_stmt_execute_generate_request mov [rbp+var_20], rax cmp [rbp+var_20], 0 jnz short loc_4FF8C mov [rbp+var_4], 1 jmp loc_500F5 loc_4FF8C: mov rax, [rbp+var_10] mov rax, [rax+38h] mov rax, [rax+4D0h] mov rax, [rax+10h] mov rdi, [rbp+var_18] mov rcx, [rbp+var_10] mov edx, [rcx+368h] mov esi, 17h mov ecx, 0FAh cmp edx, 0 cmova esi, ecx mov rdx, [rbp+var_20] mov rcx, [rbp+var_30] mov r9, [rbp+var_10] mov r8d, 1 call rax mov [rbp+var_24], eax cmp [rbp+var_20], 0 jz short loc_4FFE4 mov rdi, [rbp+var_20] call _free loc_4FFE4: cmp [rbp+var_24], 0 jz loc_500B9 jmp short $+2 loc_4FFF0: 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_38], rax mov rax, [rbp+var_10] mov rax, [rax+38h] add rax, 97h cmp rax, 0 jz short loc_5006D mov rax, [rbp+var_10] mov rax, [rax+38h] add rax, 97h mov [rbp+var_40], rax jmp short loc_50093 loc_5006D: 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_40], rax loc_50093: mov rdi, [rbp+var_38] mov rsi, [rbp+var_40] mov edx, 200h call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+30Bh], 0 mov [rbp+var_4], 1 jmp short loc_500F5 loc_500B9: mov rax, [rbp+var_18] mov rax, [rax+2A0h] cmp dword ptr [rax], 0 ja short loc_500E0 mov rax, [rbp+var_18] mov rax, [rax+480h] movsx eax, byte ptr [rax+148h] cmp eax, 0 jz short loc_500E9 loc_500E0: mov [rbp+var_4], 0 jmp short loc_500F5 loc_500E9: mov rdi, [rbp+var_10] call mthd_stmt_read_execute_response mov [rbp+var_4], eax loc_500F5: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long mysql_stmt_execute(long long a1) { long long v1; // rsi char *v2; // rax long long v4; // [rsp+10h] [rbp-30h] BYREF int v5; // [rsp+1Ch] [rbp-24h] char *v6; // [rsp+20h] [rbp-20h] long long v7; // [rsp+28h] [rbp-18h] long long v8; // [rsp+30h] [rbp-10h] v8 = a1; v7 = *(_QWORD *)(a1 + 56); v4 = 0LL; if ( *(_QWORD *)(a1 + 56) ) { if ( *(_DWORD *)(v8 + 80) ) { if ( !*(_DWORD *)(v8 + 100) || *(_BYTE *)(v8 + 233) ) { if ( *(_DWORD *)(v8 + 80) == 3 ) { *(_QWORD *)(v8 + 856) = mysql_stmt_use_result; (*(void ( **)(long long))(v8 + 856))(v8); } if ( *(_DWORD *)(v8 + 80) > 3u && *(_DWORD *)(v8 + 80) < 6u && !*(_QWORD *)(v8 + 128) ) { if ( !*(_BYTE *)(v8 + 824) ) { do (*(void ( **)(long long))(*(_QWORD *)(*(_QWORD *)(v8 + 56) + 1232LL) + 120LL))(v8); while ( (unsigned __int8)mysql_stmt_more_results(v8) ); } *(_DWORD *)(v8 + 80) = 1; *(_DWORD *)(*(_QWORD *)(v8 + 56) + 1160LL) = 0; } if ( *(_QWORD *)(v8 + 128) ) { ma_free_root((_QWORD *)(v8 + 144), 1); *(_QWORD *)(v8 + 128) = 0LL; *(_QWORD *)(v8 + 224) = 0LL; } *(_QWORD *)(v8 + 200) = 0LL; v6 = ma_stmt_execute_generate_request(v8, &v4, 0); if ( v6 ) { v1 = 23LL; if ( *(_DWORD *)(v8 + 872) ) v1 = 250LL; v5 = (*(long long ( **)(long long, long long, char *, long long, long long, long long))(*(_QWORD *)(*(_QWORD *)(v8 + 56) + 1232LL) + 16LL))( v7, v1, v6, v4, 1LL, v8); if ( v6 ) free(v6); if ( v5 ) { *(_DWORD *)(v8 + 264) = *(_DWORD *)(*(_QWORD *)(v8 + 56) + 144LL); strncpy(v8 + 781, *(_QWORD *)(v8 + 56) + 663LL, 5LL); *(_BYTE *)(v8 + 786) = 0; if ( *(_QWORD *)(v8 + 56) == -151LL ) v2 = client_errors[*(_DWORD *)(*(_QWORD *)(v8 + 56) + 144LL) - 2000]; else v2 = (char *)(*(_QWORD *)(v8 + 56) + 151LL); strncpy(v8 + 268, v2, 512LL); *(_BYTE *)(v8 + 779) = 0; return 1; } else if ( **(_DWORD **)(v7 + 672) || *(_BYTE *)(*(_QWORD *)(v7 + 1152) + 328LL) ) { return 0; } else { return (unsigned int)mthd_stmt_read_execute_response(v8); } } else { return 1; } } else { *(_DWORD *)(v8 + 264) = 2031; strncpy(v8 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(v8 + 786) = 0; strncpy(v8 + 268, client_errors[31], 512LL); *(_BYTE *)(v8 + 779) = 0; return 1; } } else { *(_DWORD *)(v7 + 144) = 2014; strncpy(v7 + 663, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(v7 + 668) = 0; strncpy(v7 + 151, client_errors[14], 511LL); *(_BYTE *)(v7 + 662) = 0; *(_DWORD *)(v8 + 264) = 2014; strncpy(v8 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(v8 + 786) = 0; strncpy(v8 + 268, client_errors[14], 512LL); *(_BYTE *)(v8 + 779) = 0; return 1; } } else { *(_DWORD *)(v8 + 264) = 2013; strncpy(v8 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(v8 + 786) = 0; strncpy(v8 + 268, client_errors[13], 512LL); *(_BYTE *)(v8 + 779) = 0; return 1; } }
mysql_stmt_execute: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0x18],RAX MOV qword ptr [RBP + -0x30],0x0 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x38],0x0 JNZ 0x0014fcfc JMP 0x0014fc8d LAB_0014fc8d: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x108],0x7dd MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x30d LEA RAX,[0x333630] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00136140 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x312],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x10c LEA RAX,[0x333640] MOV RSI,qword ptr [RAX + 0x68] MOV EDX,0x200 CALL 0x00136140 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x30b],0x0 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001500f5 LAB_0014fcfc: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x50],0x1 JNC 0x0014fde0 JMP 0x0014fd0c LAB_0014fd0c: MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x90],0x7de MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x297 LEA RAX,[0x333630] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00136140 MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x29c],0x0 MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x97 LEA RAX,[0x333640] MOV RSI,qword ptr [RAX + 0x70] MOV EDX,0x1ff CALL 0x00136140 MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x296],0x0 JMP 0x0014fd71 LAB_0014fd71: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x108],0x7de MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x30d LEA RAX,[0x333630] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00136140 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x312],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x10c LEA RAX,[0x333640] MOV RSI,qword ptr [RAX + 0x70] MOV EDX,0x200 CALL 0x00136140 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x30b],0x0 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001500f5 LAB_0014fde0: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x64],0x0 JZ 0x0014fe6f MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0xe9],0x0 JNZ 0x0014fe6f JMP 0x0014fdfd LAB_0014fdfd: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x108],0x7ef MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x30d LEA RAX,[0x333630] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00136140 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x312],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x10c LEA RAX,[0x333640] MOV RSI,qword ptr [RAX + 0xf8] MOV EDX,0x200 CALL 0x00136140 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x30b],0x0 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001500f5 LAB_0014fe6f: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x50],0x3 JNZ 0x0014fe9c MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x14a090] MOV qword ptr [RAX + 0x358],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x358] MOV RDI,qword ptr [RBP + -0x10] CALL RAX LAB_0014fe9c: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x50],0x3 JBE 0x0014ff12 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x50],0x6 JNC 0x0014ff12 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x80],0x0 JNZ 0x0014ff12 MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x338],0x0 JNZ 0x0014fef5 JMP 0x0014fecd LAB_0014fecd: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x4d0] MOV RAX,qword ptr [RAX + 0x78] MOV RDI,qword ptr [RBP + -0x10] CALL RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00150100 CMP AL,0x0 JNZ 0x0014fecd JMP 0x0014fef5 LAB_0014fef5: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x50],0x1 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV dword ptr [RAX + 0x488],0x0 LAB_0014ff12: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x80],0x0 JZ 0x0014ff57 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x80 ADD RDI,0x10 MOV ESI,0x1 CALL 0x00148b00 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x80],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xe0],0x0 LAB_0014ff57: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xc8],0x0 MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0x30] XOR EDX,EDX CALL 0x0014bf70 MOV qword ptr [RBP + -0x20],RAX CMP qword ptr [RBP + -0x20],0x0 JNZ 0x0014ff8c MOV dword ptr [RBP + -0x4],0x1 JMP 0x001500f5 LAB_0014ff8c: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x4d0] MOV RAX,qword ptr [RAX + 0x10] MOV RDI,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RCX + 0x368] MOV ESI,0x17 MOV ECX,0xfa CMP EDX,0x0 CMOVA ESI,ECX MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x30] MOV R9,qword ptr [RBP + -0x10] MOV R8D,0x1 CALL RAX MOV dword ptr [RBP + -0x24],EAX CMP qword ptr [RBP + -0x20],0x0 JZ 0x0014ffe4 MOV RDI,qword ptr [RBP + -0x20] CALL 0x001361a0 LAB_0014ffe4: CMP dword ptr [RBP + -0x24],0x0 JZ 0x001500b9 JMP 0x0014fff0 LAB_0014fff0: 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 0x00136140 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 + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] ADD RAX,0x97 CMP RAX,0x0 JZ 0x0015006d MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] ADD RAX,0x97 MOV qword ptr [RBP + -0x40],RAX JMP 0x00150093 LAB_0015006d: 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,[0x333640] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x40],RAX LAB_00150093: MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x40] MOV EDX,0x200 CALL 0x00136140 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x30b],0x0 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001500f5 LAB_001500b9: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x2a0] CMP dword ptr [RAX],0x0 JA 0x001500e0 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x480] MOVSX EAX,byte ptr [RAX + 0x148] CMP EAX,0x0 JZ 0x001500e9 LAB_001500e0: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001500f5 LAB_001500e9: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0014f1f0 MOV dword ptr [RBP + -0x4],EAX LAB_001500f5: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
int4 mysql_stmt_execute(long param_1) { char cVar1; int8 uVar2; char *local_48; int8 local_38; int local_2c; void *local_28; long local_20; long local_18; int4 local_c; local_20 = *(long *)(param_1 + 0x38); local_38 = 0; local_18 = param_1; if (*(long *)(param_1 + 0x38) == 0) { *(int4 *)(param_1 + 0x108) = 0x7dd; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(local_18 + 0x312) = 0; strncpy((char *)(local_18 + 0x10c),PTR_s_Lost_connection_to_server_during_003336a8,0x200); *(int1 *)(local_18 + 0x30b) = 0; local_c = 1; } else if (*(int *)(param_1 + 0x50) == 0) { *(int4 *)(local_20 + 0x90) = 0x7de; strncpy((char *)(local_20 + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(local_20 + 0x29c) = 0; strncpy((char *)(local_20 + 0x97),PTR_s_Commands_out_of_sync__you_can_t_r_003336b0,0x1ff); *(int1 *)(local_20 + 0x296) = 0; *(int4 *)(local_18 + 0x108) = 0x7de; strncpy((char *)(local_18 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(local_18 + 0x312) = 0; strncpy((char *)(local_18 + 0x10c),PTR_s_Commands_out_of_sync__you_can_t_r_003336b0,0x200); *(int1 *)(local_18 + 0x30b) = 0; local_c = 1; } else if ((*(int *)(param_1 + 100) == 0) || (*(char *)(param_1 + 0xe9) != '\0')) { if (*(int *)(param_1 + 0x50) == 3) { *(code **)(param_1 + 0x358) = _mysql_stmt_use_result; (**(code **)(param_1 + 0x358))(param_1); } if (((3 < *(uint *)(local_18 + 0x50)) && (*(uint *)(local_18 + 0x50) < 6)) && (*(long *)(local_18 + 0x80) == 0)) { if (*(char *)(local_18 + 0x338) == '\0') { do { (**(code **)(*(long *)(*(long *)(local_18 + 0x38) + 0x4d0) + 0x78))(local_18); cVar1 = mysql_stmt_more_results(local_18); } while (cVar1 != '\0'); } *(int4 *)(local_18 + 0x50) = 1; *(int4 *)(*(long *)(local_18 + 0x38) + 0x488) = 0; } if (*(long *)(local_18 + 0x80) != 0) { ma_free_root(local_18 + 0x90,1); *(int8 *)(local_18 + 0x80) = 0; *(int8 *)(local_18 + 0xe0) = 0; } *(int8 *)(local_18 + 200) = 0; local_28 = (void *)ma_stmt_execute_generate_request(local_18,&local_38,0); if (local_28 == (void *)0x0) { local_c = 1; } else { uVar2 = 0x17; if (*(int *)(local_18 + 0x368) != 0) { uVar2 = 0xfa; } local_2c = (**(code **)(*(long *)(*(long *)(local_18 + 0x38) + 0x4d0) + 0x10)) (local_20,uVar2,local_28,local_38,1,local_18); if (local_28 != (void *)0x0) { free(local_28); } if (local_2c == 0) { if ((**(int **)(local_20 + 0x2a0) == 0) && (*(char *)(*(long *)(local_20 + 0x480) + 0x148) == '\0')) { local_c = mthd_stmt_read_execute_response(local_18); } else { local_c = 0; } } else { *(int4 *)(local_18 + 0x108) = *(int4 *)(*(long *)(local_18 + 0x38) + 0x90); strncpy((char *)(local_18 + 0x30d),(char *)(*(long *)(local_18 + 0x38) + 0x297),5); *(int1 *)(local_18 + 0x312) = 0; if (*(long *)(local_18 + 0x38) == -0x97) { local_48 = (&client_errors)[*(int *)(*(long *)(local_18 + 0x38) + 0x90) - 2000]; } else { local_48 = (char *)(*(long *)(local_18 + 0x38) + 0x97); } strncpy((char *)(local_18 + 0x10c),local_48,0x200); *(int1 *)(local_18 + 0x30b) = 0; local_c = 1; } } } else { *(int4 *)(param_1 + 0x108) = 0x7ef; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(local_18 + 0x312) = 0; strncpy((char *)(local_18 + 0x10c),PTR_s_No_data_supplied_for_parameters_i_00333738,0x200); *(int1 *)(local_18 + 0x30b) = 0; local_c = 1; } return local_c; }
40,673
mz_deflateInit2
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
int mz_deflateInit2(mz_streamp pStream, int level, int method, int window_bits, int mem_level, int strategy) { tdefl_compressor *pComp; mz_uint comp_flags = TDEFL_COMPUTE_ADLER32 | tdefl_create_comp_flags_from_zip_params(level, window_bits, strategy); if (!pStream) return MZ_STREAM_ERROR; if ((method != MZ_DEFLATED) || ((mem_level < 1) || (mem_level > 9)) || ((window_bits != MZ_DEFAULT_WINDOW_BITS) && (-window_bits != MZ_DEFAULT_WINDOW_BITS))) return MZ_PARAM_ERROR; pStream->data_type = 0; pStream->adler = MZ_ADLER32_INIT; pStream->msg = NULL; pStream->reserved = 0; pStream->total_in = 0; pStream->total_out = 0; if (!pStream->zalloc) pStream->zalloc = miniz_def_alloc_func; if (!pStream->zfree) pStream->zfree = miniz_def_free_func; pComp = (tdefl_compressor *)pStream->zalloc(pStream->opaque, 1, sizeof(tdefl_compressor)); if (!pComp) return MZ_MEM_ERROR; pStream->state = (struct mz_internal_state *)pComp; if (tdefl_init(pComp, NULL, NULL, comp_flags) != TDEFL_STATUS_OKAY) { mz_deflateEnd(pStream); return MZ_PARAM_ERROR; } return MZ_OK; }
O0
c
mz_deflateInit2: subq $0x38, %rsp movq %rdi, 0x28(%rsp) movl %esi, 0x24(%rsp) movl %edx, 0x20(%rsp) movl %ecx, 0x1c(%rsp) movl %r8d, 0x18(%rsp) movl %r9d, 0x14(%rsp) movl 0x24(%rsp), %edi movl 0x1c(%rsp), %esi movl 0x14(%rsp), %edx callq 0xf4670 orl $0x2000, %eax # imm = 0x2000 movl %eax, 0x4(%rsp) cmpq $0x0, 0x28(%rsp) jne 0xf452e movl $0xfffffffe, 0x34(%rsp) # imm = 0xFFFFFFFE jmp 0xf4660 cmpl $0x8, 0x20(%rsp) jne 0xf4555 cmpl $0x1, 0x18(%rsp) jl 0xf4555 cmpl $0x9, 0x18(%rsp) jg 0xf4555 cmpl $0xf, 0x1c(%rsp) je 0xf4562 xorl %eax, %eax subl 0x1c(%rsp), %eax cmpl $0xf, %eax je 0xf4562 movl $0xffffd8f0, 0x34(%rsp) # imm = 0xFFFFD8F0 jmp 0xf4660 movq 0x28(%rsp), %rax movl $0x0, 0x58(%rax) movq 0x28(%rsp), %rax movq $0x1, 0x60(%rax) movq 0x28(%rsp), %rax movq $0x0, 0x30(%rax) movq 0x28(%rsp), %rax movq $0x0, 0x68(%rax) movq 0x28(%rsp), %rax movq $0x0, 0x10(%rax) movq 0x28(%rsp), %rax movq $0x0, 0x28(%rax) movq 0x28(%rsp), %rax cmpq $0x0, 0x40(%rax) jne 0xf45cb movq 0x28(%rsp), %rax leaq -0x1c7(%rip), %rcx # 0xf4400 movq %rcx, 0x40(%rax) movq 0x28(%rsp), %rax cmpq $0x0, 0x48(%rax) jne 0xf45e7 movq 0x28(%rsp), %rax leaq -0x1b3(%rip), %rcx # 0xf4430 movq %rcx, 0x48(%rax) movq 0x28(%rsp), %rax movq 0x40(%rax), %rax movq 0x28(%rsp), %rcx movq 0x50(%rcx), %rdi movl $0x1, %esi movl $0x4df78, %edx # imm = 0x4DF78 callq *%rax movq %rax, 0x8(%rsp) cmpq $0x0, 0x8(%rsp) jne 0xf461c movl $0xfffffffc, 0x34(%rsp) # imm = 0xFFFFFFFC jmp 0xf4660 movq 0x8(%rsp), %rcx movq 0x28(%rsp), %rax movq %rcx, 0x38(%rax) movq 0x8(%rsp), %rdi movl 0x4(%rsp), %ecx xorl %eax, %eax movl %eax, %edx movq %rdx, %rsi callq 0xf4770 cmpl $0x0, %eax je 0xf4658 movq 0x28(%rsp), %rdi callq 0xf4a60 movl $0xffffd8f0, 0x34(%rsp) # imm = 0xFFFFD8F0 jmp 0xf4660 movl $0x0, 0x34(%rsp) movl 0x34(%rsp), %eax addq $0x38, %rsp retq nopl (%rax)
mz_deflateInit2: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_14], esi mov [rsp+38h+var_18], edx mov [rsp+38h+var_1C], ecx mov [rsp+38h+var_20], r8d mov [rsp+38h+var_24], r9d mov edi, [rsp+38h+var_14] mov esi, [rsp+38h+var_1C] mov edx, [rsp+38h+var_24] call tdefl_create_comp_flags_from_zip_params or eax, 2000h mov [rsp+38h+var_34], eax cmp [rsp+38h+var_10], 0 jnz short loc_F452E mov [rsp+38h+var_4], 0FFFFFFFEh jmp loc_F4660 loc_F452E: cmp [rsp+38h+var_18], 8 jnz short loc_F4555 cmp [rsp+38h+var_20], 1 jl short loc_F4555 cmp [rsp+38h+var_20], 9 jg short loc_F4555 cmp [rsp+38h+var_1C], 0Fh jz short loc_F4562 xor eax, eax sub eax, [rsp+38h+var_1C] cmp eax, 0Fh jz short loc_F4562 loc_F4555: mov [rsp+38h+var_4], 0FFFFD8F0h jmp loc_F4660 loc_F4562: mov rax, [rsp+38h+var_10] mov dword ptr [rax+58h], 0 mov rax, [rsp+38h+var_10] mov qword ptr [rax+60h], 1 mov rax, [rsp+38h+var_10] mov qword ptr [rax+30h], 0 mov rax, [rsp+38h+var_10] mov qword ptr [rax+68h], 0 mov rax, [rsp+38h+var_10] mov qword ptr [rax+10h], 0 mov rax, [rsp+38h+var_10] mov qword ptr [rax+28h], 0 mov rax, [rsp+38h+var_10] cmp qword ptr [rax+40h], 0 jnz short loc_F45CB mov rax, [rsp+38h+var_10] lea rcx, miniz_def_alloc_func mov [rax+40h], rcx loc_F45CB: mov rax, [rsp+38h+var_10] cmp qword ptr [rax+48h], 0 jnz short loc_F45E7 mov rax, [rsp+38h+var_10] lea rcx, miniz_def_free_func mov [rax+48h], rcx loc_F45E7: mov rax, [rsp+38h+var_10] mov rax, [rax+40h] mov rcx, [rsp+38h+var_10] mov rdi, [rcx+50h] mov esi, 1 mov edx, 4DF78h call rax mov [rsp+38h+var_30], rax cmp [rsp+38h+var_30], 0 jnz short loc_F461C mov [rsp+38h+var_4], 0FFFFFFFCh jmp short loc_F4660 loc_F461C: mov rcx, [rsp+38h+var_30] mov rax, [rsp+38h+var_10] mov [rax+38h], rcx mov rdi, [rsp+38h+var_30] mov ecx, [rsp+38h+var_34] xor eax, eax mov edx, eax mov rsi, rdx call tdefl_init cmp eax, 0 jz short loc_F4658 mov rdi, [rsp+38h+var_10] call mz_deflateEnd mov [rsp+38h+var_4], 0FFFFD8F0h jmp short loc_F4660 loc_F4658: mov [rsp+38h+var_4], 0 loc_F4660: mov eax, [rsp+38h+var_4] add rsp, 38h retn
long long mz_deflateInit2(long long a1, unsigned int a2, int a3, unsigned int a4, int a5, unsigned int a6) { unsigned int v7; // [rsp+4h] [rbp-34h] long long v8; // [rsp+8h] [rbp-30h] v7 = tdefl_create_comp_flags_from_zip_params(a2, a4, a6) | 0x2000; if ( a1 ) { if ( a3 == 8 && a5 >= 1 && a5 <= 9 && (a4 == 15 || -a4 == 15) ) { *(_DWORD *)(a1 + 88) = 0; *(_QWORD *)(a1 + 96) = 1LL; *(_QWORD *)(a1 + 48) = 0LL; *(_QWORD *)(a1 + 104) = 0LL; *(_QWORD *)(a1 + 16) = 0LL; *(_QWORD *)(a1 + 40) = 0LL; if ( !*(_QWORD *)(a1 + 64) ) *(_QWORD *)(a1 + 64) = miniz_def_alloc_func; if ( !*(_QWORD *)(a1 + 72) ) *(_QWORD *)(a1 + 72) = miniz_def_free_func; v8 = (*(long long ( **)(_QWORD, long long, long long))(a1 + 64))(*(_QWORD *)(a1 + 80), 1LL, 319352LL); if ( v8 ) { *(_QWORD *)(a1 + 56) = v8; if ( (unsigned int)tdefl_init(v8, 0LL, 0LL, v7) ) { mz_deflateEnd(a1); return (unsigned int)-10000; } else { return 0; } } else { return (unsigned int)-4; } } else { return (unsigned int)-10000; } } else { return (unsigned int)-2; } }
mz_deflateInit2: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RDI MOV dword ptr [RSP + 0x24],ESI MOV dword ptr [RSP + 0x20],EDX MOV dword ptr [RSP + 0x1c],ECX MOV dword ptr [RSP + 0x18],R8D MOV dword ptr [RSP + 0x14],R9D MOV EDI,dword ptr [RSP + 0x24] MOV ESI,dword ptr [RSP + 0x1c] MOV EDX,dword ptr [RSP + 0x14] CALL 0x001f4670 OR EAX,0x2000 MOV dword ptr [RSP + 0x4],EAX CMP qword ptr [RSP + 0x28],0x0 JNZ 0x001f452e MOV dword ptr [RSP + 0x34],0xfffffffe JMP 0x001f4660 LAB_001f452e: CMP dword ptr [RSP + 0x20],0x8 JNZ 0x001f4555 CMP dword ptr [RSP + 0x18],0x1 JL 0x001f4555 CMP dword ptr [RSP + 0x18],0x9 JG 0x001f4555 CMP dword ptr [RSP + 0x1c],0xf JZ 0x001f4562 XOR EAX,EAX SUB EAX,dword ptr [RSP + 0x1c] CMP EAX,0xf JZ 0x001f4562 LAB_001f4555: MOV dword ptr [RSP + 0x34],0xffffd8f0 JMP 0x001f4660 LAB_001f4562: MOV RAX,qword ptr [RSP + 0x28] MOV dword ptr [RAX + 0x58],0x0 MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RAX + 0x60],0x1 MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RAX + 0x30],0x0 MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RAX + 0x68],0x0 MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RAX + 0x10],0x0 MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RAX + 0x28],0x0 MOV RAX,qword ptr [RSP + 0x28] CMP qword ptr [RAX + 0x40],0x0 JNZ 0x001f45cb MOV RAX,qword ptr [RSP + 0x28] LEA RCX,[0x1f4400] MOV qword ptr [RAX + 0x40],RCX LAB_001f45cb: MOV RAX,qword ptr [RSP + 0x28] CMP qword ptr [RAX + 0x48],0x0 JNZ 0x001f45e7 MOV RAX,qword ptr [RSP + 0x28] LEA RCX,[0x1f4430] MOV qword ptr [RAX + 0x48],RCX LAB_001f45e7: MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RSP + 0x28] MOV RDI,qword ptr [RCX + 0x50] MOV ESI,0x1 MOV EDX,0x4df78 CALL RAX MOV qword ptr [RSP + 0x8],RAX CMP qword ptr [RSP + 0x8],0x0 JNZ 0x001f461c MOV dword ptr [RSP + 0x34],0xfffffffc JMP 0x001f4660 LAB_001f461c: MOV RCX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RAX + 0x38],RCX MOV RDI,qword ptr [RSP + 0x8] MOV ECX,dword ptr [RSP + 0x4] XOR EAX,EAX MOV EDX,EAX MOV RSI,RDX CALL 0x001f4770 CMP EAX,0x0 JZ 0x001f4658 MOV RDI,qword ptr [RSP + 0x28] CALL 0x001f4a60 MOV dword ptr [RSP + 0x34],0xffffd8f0 JMP 0x001f4660 LAB_001f4658: MOV dword ptr [RSP + 0x34],0x0 LAB_001f4660: MOV EAX,dword ptr [RSP + 0x34] ADD RSP,0x38 RET
int4 mz_deflateInit2(long param_1,int4 param_2,int param_3,int param_4,int param_5, int4 param_6) { uint uVar1; int iVar2; long lVar3; int4 local_4; uVar1 = tdefl_create_comp_flags_from_zip_params(param_2,param_4,param_6); if (param_1 == 0) { local_4 = 0xfffffffe; } else if ((((param_3 == 8) && (0 < param_5)) && (param_5 < 10)) && ((param_4 == 0xf || (param_4 == -0xf)))) { *(int4 *)(param_1 + 0x58) = 0; *(int8 *)(param_1 + 0x60) = 1; *(int8 *)(param_1 + 0x30) = 0; *(int8 *)(param_1 + 0x68) = 0; *(int8 *)(param_1 + 0x10) = 0; *(int8 *)(param_1 + 0x28) = 0; if (*(long *)(param_1 + 0x40) == 0) { *(code **)(param_1 + 0x40) = miniz_def_alloc_func; } if (*(long *)(param_1 + 0x48) == 0) { *(code **)(param_1 + 0x48) = miniz_def_free_func; } lVar3 = (**(code **)(param_1 + 0x40))(*(int8 *)(param_1 + 0x50),1,0x4df78); if (lVar3 == 0) { local_4 = 0xfffffffc; } else { *(long *)(param_1 + 0x38) = lVar3; iVar2 = tdefl_init(lVar3,0,0,uVar1 | 0x2000); if (iVar2 == 0) { local_4 = 0; } else { mz_deflateEnd(param_1); local_4 = 0xffffd8f0; } } } else { local_4 = 0xffffd8f0; } return local_4; }
40,674
mz_deflateInit2
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
int mz_deflateInit2(mz_streamp pStream, int level, int method, int window_bits, int mem_level, int strategy) { tdefl_compressor *pComp; mz_uint comp_flags = TDEFL_COMPUTE_ADLER32 | tdefl_create_comp_flags_from_zip_params(level, window_bits, strategy); if (!pStream) return MZ_STREAM_ERROR; if ((method != MZ_DEFLATED) || ((mem_level < 1) || (mem_level > 9)) || ((window_bits != MZ_DEFAULT_WINDOW_BITS) && (-window_bits != MZ_DEFAULT_WINDOW_BITS))) return MZ_PARAM_ERROR; pStream->data_type = 0; pStream->adler = MZ_ADLER32_INIT; pStream->msg = NULL; pStream->reserved = 0; pStream->total_in = 0; pStream->total_out = 0; if (!pStream->zalloc) pStream->zalloc = miniz_def_alloc_func; if (!pStream->zfree) pStream->zfree = miniz_def_free_func; pComp = (tdefl_compressor *)pStream->zalloc(pStream->opaque, 1, sizeof(tdefl_compressor)); if (!pComp) return MZ_MEM_ERROR; pStream->state = (struct mz_internal_state *)pComp; if (tdefl_init(pComp, NULL, NULL, comp_flags) != TDEFL_STATUS_OKAY) { mz_deflateEnd(pStream); return MZ_PARAM_ERROR; } return MZ_OK; }
O1
c
mz_deflateInit2: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl %r8d, %r14d movl %ecx, %r15d movl %edx, %r12d movq %rdi, %rbx movl %esi, %edi movl %ecx, %esi movl %r9d, %edx callq 0x7ecc7 testq %rbx, %rbx je 0x7ecad movl %eax, %ebp cmpl $0x8, %r12d setne %al addl $-0xa, %r14d cmpl $-0x9, %r14d setb %cl orb %al, %cl movl $0xffffd8f0, %r14d # imm = 0xFFFFD8F0 jne 0x7ecb3 cmpl $0xf, %r15d je 0x7ec37 cmpl $-0xf, %r15d jne 0x7ecb3 movl $0x0, 0x58(%rbx) movq $0x1, 0x60(%rbx) xorl %eax, %eax movq %rax, 0x68(%rbx) movq %rax, 0x10(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x28(%rbx) cmpq %rax, 0x40(%rbx) jne 0x7ec68 leaq -0xc7(%rip), %rax # 0x7eb9d movq %rax, 0x40(%rbx) cmpq $0x0, 0x48(%rbx) jne 0x7ec7a leaq -0xcd(%rip), %rax # 0x7eba9 movq %rax, 0x48(%rbx) movq 0x50(%rbx), %rdi movl $0x1, %esi movl $0x4df78, %edx # imm = 0x4DF78 callq *0x40(%rbx) testq %rax, %rax je 0x7ecbf orl $0x2000, %ebp # imm = 0x2000 movq %rax, 0x38(%rbx) xorl %r14d, %r14d movq %rax, %rdi xorl %esi, %esi xorl %edx, %edx movl %ebp, %ecx callq 0x7ed3f jmp 0x7ecb3 movl $0xfffffffe, %r14d # imm = 0xFFFFFFFE movl %r14d, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0xfffffffc, %r14d # imm = 0xFFFFFFFC jmp 0x7ecb3
mz_deflateInit2: push rbp push r15 push r14 push r12 push rbx mov r14d, r8d mov r15d, ecx mov r12d, edx mov rbx, rdi mov edi, esi mov esi, ecx mov edx, r9d call tdefl_create_comp_flags_from_zip_params test rbx, rbx jz loc_7ECAD mov ebp, eax cmp r12d, 8 setnz al add r14d, 0FFFFFFF6h cmp r14d, 0FFFFFFF7h setb cl or cl, al mov r14d, 0FFFFD8F0h jnz loc_7ECB3 cmp r15d, 0Fh jz short loc_7EC37 cmp r15d, 0FFFFFFF1h jnz short loc_7ECB3 loc_7EC37: mov dword ptr [rbx+58h], 0 mov qword ptr [rbx+60h], 1 xor eax, eax mov [rbx+68h], rax mov [rbx+10h], rax xorps xmm0, xmm0 movups xmmword ptr [rbx+28h], xmm0 cmp [rbx+40h], rax jnz short loc_7EC68 lea rax, miniz_def_alloc_func mov [rbx+40h], rax loc_7EC68: cmp qword ptr [rbx+48h], 0 jnz short loc_7EC7A lea rax, miniz_def_free_func mov [rbx+48h], rax loc_7EC7A: mov rdi, [rbx+50h] mov esi, 1 mov edx, 4DF78h call qword ptr [rbx+40h] test rax, rax jz short loc_7ECBF or ebp, 2000h mov [rbx+38h], rax xor r14d, r14d mov rdi, rax xor esi, esi xor edx, edx mov ecx, ebp call tdefl_init jmp short loc_7ECB3 loc_7ECAD: mov r14d, 0FFFFFFFEh loc_7ECB3: mov eax, r14d pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_7ECBF: mov r14d, 0FFFFFFFCh jmp short loc_7ECB3
long long mz_deflateInit2(long long a1, unsigned int a2, int a3, unsigned int a4, int a5, unsigned int a6) { int comp_flags_from_zip_params; // eax long long v10; // rcx int v11; // ebp unsigned int v12; // r14d long long v13; // rax comp_flags_from_zip_params = tdefl_create_comp_flags_from_zip_params(a2, a4, a6); if ( a1 ) { v11 = comp_flags_from_zip_params; LOBYTE(v10) = a3 != 8 || (unsigned int)(a5 - 10) < 0xFFFFFFF7; v12 = -10000; if ( !(_BYTE)v10 && (a4 == 15 || a4 == -15) ) { *(_DWORD *)(a1 + 88) = 0; *(_QWORD *)(a1 + 96) = 1LL; *(_QWORD *)(a1 + 104) = 0LL; *(_QWORD *)(a1 + 16) = 0LL; *(_OWORD *)(a1 + 40) = 0LL; if ( !*(_QWORD *)(a1 + 64) ) *(_QWORD *)(a1 + 64) = miniz_def_alloc_func; if ( !*(_QWORD *)(a1 + 72) ) *(_QWORD *)(a1 + 72) = miniz_def_free_func; v13 = (*(long long ( **)(_QWORD, long long, long long, long long))(a1 + 64))( *(_QWORD *)(a1 + 80), 1LL, 319352LL, v10); if ( v13 ) { *(_QWORD *)(a1 + 56) = v13; v12 = 0; tdefl_init(v13, 0LL, 0LL, v11 | 0x2000u); } else { return (unsigned int)-4; } } } else { return (unsigned int)-2; } return v12; }
40,675
mz_deflateInit2
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
int mz_deflateInit2(mz_streamp pStream, int level, int method, int window_bits, int mem_level, int strategy) { tdefl_compressor *pComp; mz_uint comp_flags = TDEFL_COMPUTE_ADLER32 | tdefl_create_comp_flags_from_zip_params(level, window_bits, strategy); if (!pStream) return MZ_STREAM_ERROR; if ((method != MZ_DEFLATED) || ((mem_level < 1) || (mem_level > 9)) || ((window_bits != MZ_DEFAULT_WINDOW_BITS) && (-window_bits != MZ_DEFAULT_WINDOW_BITS))) return MZ_PARAM_ERROR; pStream->data_type = 0; pStream->adler = MZ_ADLER32_INIT; pStream->msg = NULL; pStream->reserved = 0; pStream->total_in = 0; pStream->total_out = 0; if (!pStream->zalloc) pStream->zalloc = miniz_def_alloc_func; if (!pStream->zfree) pStream->zfree = miniz_def_free_func; pComp = (tdefl_compressor *)pStream->zalloc(pStream->opaque, 1, sizeof(tdefl_compressor)); if (!pComp) return MZ_MEM_ERROR; pStream->state = (struct mz_internal_state *)pComp; if (tdefl_init(pComp, NULL, NULL, comp_flags) != TDEFL_STATUS_OKAY) { mz_deflateEnd(pStream); return MZ_PARAM_ERROR; } return MZ_OK; }
O2
c
mz_deflateInit2: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl %r8d, %r14d movl %ecx, %r15d movl %edx, %r12d movq %rdi, %rbx movl %esi, %edi movl %ecx, %esi movl %r9d, %edx callq 0x598d5 testq %rbx, %rbx je 0x598c1 movl %eax, %ebp cmpl $0x8, %r12d setne %al addl $-0xa, %r14d cmpl $-0x9, %r14d setb %cl orb %al, %cl movl $0xffffd8f0, %r14d # imm = 0xFFFFD8F0 jne 0x598c5 cmpl $0xf, %r15d je 0x5984e cmpl $-0xf, %r15d jne 0x598c5 andl $0x0, 0x58(%rbx) movq $0x1, 0x60(%rbx) andq $0x0, 0x68(%rbx) andq $0x0, 0x10(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x28(%rbx) movq 0x40(%rbx), %rax testq %rax, %rax jne 0x5987f leaq -0xc1(%rip), %rax # 0x597ba movq %rax, 0x40(%rbx) cmpq $0x0, 0x48(%rbx) jne 0x59891 leaq -0xc7(%rip), %rcx # 0x597c6 movq %rcx, 0x48(%rbx) movq 0x50(%rbx), %rdi pushq $0x1 popq %rsi movl $0x4df78, %edx # imm = 0x4DF78 callq *%rax testq %rax, %rax je 0x598d1 orl $0x2000, %ebp # imm = 0x2000 movq %rax, 0x38(%rbx) xorl %r14d, %r14d movq %rax, %rdi xorl %esi, %esi xorl %edx, %edx movl %ebp, %ecx callq 0x59946 jmp 0x598c5 pushq $-0x2 popq %r14 movl %r14d, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq pushq $-0x4 jmp 0x598c3
mz_deflateInit2: push rbp push r15 push r14 push r12 push rbx mov r14d, r8d mov r15d, ecx mov r12d, edx mov rbx, rdi mov edi, esi mov esi, ecx mov edx, r9d call tdefl_create_comp_flags_from_zip_params test rbx, rbx jz loc_598C1 mov ebp, eax cmp r12d, 8 setnz al add r14d, 0FFFFFFF6h cmp r14d, 0FFFFFFF7h setb cl or cl, al mov r14d, 0FFFFD8F0h jnz loc_598C5 cmp r15d, 0Fh jz short loc_5984E cmp r15d, 0FFFFFFF1h jnz short loc_598C5 loc_5984E: and dword ptr [rbx+58h], 0 mov qword ptr [rbx+60h], 1 and qword ptr [rbx+68h], 0 and qword ptr [rbx+10h], 0 xorps xmm0, xmm0 movups xmmword ptr [rbx+28h], xmm0 mov rax, [rbx+40h] test rax, rax jnz short loc_5987F lea rax, miniz_def_alloc_func mov [rbx+40h], rax loc_5987F: cmp qword ptr [rbx+48h], 0 jnz short loc_59891 lea rcx, miniz_def_free_func mov [rbx+48h], rcx loc_59891: mov rdi, [rbx+50h] push 1 pop rsi mov edx, 4DF78h call rax test rax, rax jz short loc_598D1 or ebp, 2000h mov [rbx+38h], rax xor r14d, r14d mov rdi, rax xor esi, esi xor edx, edx mov ecx, ebp call tdefl_init jmp short loc_598C5 loc_598C1: push 0FFFFFFFFFFFFFFFEh loc_598C3: pop r14 loc_598C5: mov eax, r14d pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_598D1: push 0FFFFFFFFFFFFFFFCh jmp short loc_598C3
long long mz_deflateInit2(long long a1, unsigned int a2, int a3, unsigned int a4, int a5, unsigned int a6) { int comp_flags_from_zip_params; // eax long long ( *v10)(long long, long long); // rcx int v11; // ebp unsigned int v12; // r14d long long ( *v13)(long long, long long, long long); // rax long long v14; // rax comp_flags_from_zip_params = tdefl_create_comp_flags_from_zip_params(a2, a4, a6); if ( !a1 ) return (unsigned int)-2; v11 = comp_flags_from_zip_params; LOBYTE(v10) = a3 != 8 || (unsigned int)(a5 - 10) < 0xFFFFFFF7; v12 = -10000; if ( !(_BYTE)v10 && (a4 == 15 || a4 == -15) ) { *(_DWORD *)(a1 + 88) = 0; *(_QWORD *)(a1 + 96) = 1LL; *(_QWORD *)(a1 + 104) = 0LL; *(_QWORD *)(a1 + 16) = 0LL; *(_OWORD *)(a1 + 40) = 0LL; v13 = *(long long ( **)(long long, long long, long long))(a1 + 64); if ( !v13 ) { v13 = miniz_def_alloc_func; *(_QWORD *)(a1 + 64) = miniz_def_alloc_func; } if ( !*(_QWORD *)(a1 + 72) ) { v10 = miniz_def_free_func; *(_QWORD *)(a1 + 72) = miniz_def_free_func; } v14 = ((long long ( *)(_QWORD, long long, long long, long long ( *)(long long, long long)))v13)( *(_QWORD *)(a1 + 80), 1LL, 319352LL, v10); if ( v14 ) { *(_QWORD *)(a1 + 56) = v14; v12 = 0; tdefl_init(v14, 0LL, 0LL, v11 | 0x2000u); return v12; } return (unsigned int)-4; } return v12; }
mz_deflateInit2: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R14D,R8D MOV R15D,ECX MOV R12D,EDX MOV RBX,RDI MOV EDI,ESI MOV ESI,ECX MOV EDX,R9D CALL 0x001598d5 TEST RBX,RBX JZ 0x001598c1 MOV EBP,EAX CMP R12D,0x8 SETNZ AL ADD R14D,-0xa CMP R14D,-0x9 SETC CL OR CL,AL MOV R14D,0xffffd8f0 JNZ 0x001598c5 CMP R15D,0xf JZ 0x0015984e CMP R15D,-0xf JNZ 0x001598c5 LAB_0015984e: AND dword ptr [RBX + 0x58],0x0 MOV qword ptr [RBX + 0x60],0x1 AND qword ptr [RBX + 0x68],0x0 AND qword ptr [RBX + 0x10],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x28],XMM0 MOV RAX,qword ptr [RBX + 0x40] TEST RAX,RAX JNZ 0x0015987f LEA RAX,[0x1597ba] MOV qword ptr [RBX + 0x40],RAX LAB_0015987f: CMP qword ptr [RBX + 0x48],0x0 JNZ 0x00159891 LEA RCX,[0x1597c6] MOV qword ptr [RBX + 0x48],RCX LAB_00159891: MOV RDI,qword ptr [RBX + 0x50] PUSH 0x1 POP RSI MOV EDX,0x4df78 CALL RAX TEST RAX,RAX JZ 0x001598d1 OR EBP,0x2000 MOV qword ptr [RBX + 0x38],RAX XOR R14D,R14D MOV RDI,RAX XOR ESI,ESI XOR EDX,EDX MOV ECX,EBP CALL 0x00159946 JMP 0x001598c5 LAB_001598c1: PUSH -0x2 LAB_001598c3: POP R14 LAB_001598c5: MOV EAX,R14D POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001598d1: PUSH -0x4 JMP 0x001598c3
int4 mz_deflateInit2(long param_1,int4 param_2,int param_3,int param_4,int param_5, int4 param_6) { uint uVar1; code *pcVar2; long lVar3; int4 uVar4; uVar1 = tdefl_create_comp_flags_from_zip_params(param_2,param_4,param_6); if (param_1 == 0) { uVar4 = 0xfffffffe; } else { uVar4 = 0xffffd8f0; if ((0xfffffff6 < param_5 - 10U && param_3 == 8) && ((param_4 == 0xf || (param_4 == -0xf)))) { *(int4 *)(param_1 + 0x58) = 0; *(int8 *)(param_1 + 0x60) = 1; *(int8 *)(param_1 + 0x68) = 0; *(int8 *)(param_1 + 0x10) = 0; *(int8 *)(param_1 + 0x28) = 0; *(int8 *)(param_1 + 0x30) = 0; pcVar2 = *(code **)(param_1 + 0x40); if (pcVar2 == (code *)0x0) { pcVar2 = miniz_def_alloc_func; *(code **)(param_1 + 0x40) = miniz_def_alloc_func; } if (*(long *)(param_1 + 0x48) == 0) { *(code **)(param_1 + 0x48) = miniz_def_free_func; } lVar3 = (*pcVar2)(*(int8 *)(param_1 + 0x50),1,0x4df78); if (lVar3 == 0) { uVar4 = 0xfffffffc; } else { *(long *)(param_1 + 0x38) = lVar3; uVar4 = 0; tdefl_init(lVar3,0,0,uVar1 | 0x2000); } } } return uVar4; }
40,676
mz_deflateInit2
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
int mz_deflateInit2(mz_streamp pStream, int level, int method, int window_bits, int mem_level, int strategy) { tdefl_compressor *pComp; mz_uint comp_flags = TDEFL_COMPUTE_ADLER32 | tdefl_create_comp_flags_from_zip_params(level, window_bits, strategy); if (!pStream) return MZ_STREAM_ERROR; if ((method != MZ_DEFLATED) || ((mem_level < 1) || (mem_level > 9)) || ((window_bits != MZ_DEFAULT_WINDOW_BITS) && (-window_bits != MZ_DEFAULT_WINDOW_BITS))) return MZ_PARAM_ERROR; pStream->data_type = 0; pStream->adler = MZ_ADLER32_INIT; pStream->msg = NULL; pStream->reserved = 0; pStream->total_in = 0; pStream->total_out = 0; if (!pStream->zalloc) pStream->zalloc = miniz_def_alloc_func; if (!pStream->zfree) pStream->zfree = miniz_def_free_func; pComp = (tdefl_compressor *)pStream->zalloc(pStream->opaque, 1, sizeof(tdefl_compressor)); if (!pComp) return MZ_MEM_ERROR; pStream->state = (struct mz_internal_state *)pComp; if (tdefl_init(pComp, NULL, NULL, comp_flags) != TDEFL_STATUS_OKAY) { mz_deflateEnd(pStream); return MZ_PARAM_ERROR; } return MZ_OK; }
O3
c
mz_deflateInit2: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl %r8d, %r14d movl %ecx, %r15d movl %edx, %r12d movq %rdi, %rbx movl %esi, %edi movl %ecx, %esi movl %r9d, %edx callq 0x7dc51 testq %rbx, %rbx je 0x7dc37 movl %eax, %ebp cmpl $0x8, %r12d setne %al addl $-0xa, %r14d cmpl $-0x9, %r14d setb %cl orb %al, %cl movl $0xffffd8f0, %r14d # imm = 0xFFFFD8F0 jne 0x7dc3d cmpl $0xf, %r15d je 0x7dbbf cmpl $-0xf, %r15d jne 0x7dc3d movl $0x0, 0x58(%rbx) movq $0x1, 0x60(%rbx) xorl %eax, %eax movq %rax, 0x68(%rbx) movq %rax, 0x10(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x28(%rbx) movq 0x40(%rbx), %rax testq %rax, %rax jne 0x7dbf3 leaq -0xca(%rip), %rax # 0x7db25 movq %rax, 0x40(%rbx) cmpq $0x0, 0x48(%rbx) jne 0x7dc05 leaq -0xd0(%rip), %rcx # 0x7db31 movq %rcx, 0x48(%rbx) movq 0x50(%rbx), %rdi movl $0x1, %esi movl $0x4df78, %edx # imm = 0x4DF78 callq *%rax testq %rax, %rax je 0x7dc49 orl $0x2000, %ebp # imm = 0x2000 movq %rax, 0x38(%rbx) xorl %r14d, %r14d movq %rax, %rdi xorl %esi, %esi xorl %edx, %edx movl %ebp, %ecx callq 0x7dcc6 jmp 0x7dc3d movl $0xfffffffe, %r14d # imm = 0xFFFFFFFE movl %r14d, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0xfffffffc, %r14d # imm = 0xFFFFFFFC jmp 0x7dc3d
mz_deflateInit2: push rbp push r15 push r14 push r12 push rbx mov r14d, r8d mov r15d, ecx mov r12d, edx mov rbx, rdi mov edi, esi mov esi, ecx mov edx, r9d call tdefl_create_comp_flags_from_zip_params test rbx, rbx jz loc_7DC37 mov ebp, eax cmp r12d, 8 setnz al add r14d, 0FFFFFFF6h cmp r14d, 0FFFFFFF7h setb cl or cl, al mov r14d, 0FFFFD8F0h jnz loc_7DC3D cmp r15d, 0Fh jz short loc_7DBBF cmp r15d, 0FFFFFFF1h jnz short loc_7DC3D loc_7DBBF: mov dword ptr [rbx+58h], 0 mov qword ptr [rbx+60h], 1 xor eax, eax mov [rbx+68h], rax mov [rbx+10h], rax xorps xmm0, xmm0 movups xmmword ptr [rbx+28h], xmm0 mov rax, [rbx+40h] test rax, rax jnz short loc_7DBF3 lea rax, miniz_def_alloc_func mov [rbx+40h], rax loc_7DBF3: cmp qword ptr [rbx+48h], 0 jnz short loc_7DC05 lea rcx, miniz_def_free_func mov [rbx+48h], rcx loc_7DC05: mov rdi, [rbx+50h] mov esi, 1 mov edx, 4DF78h call rax test rax, rax jz short loc_7DC49 or ebp, 2000h mov [rbx+38h], rax xor r14d, r14d mov rdi, rax xor esi, esi xor edx, edx mov ecx, ebp call tdefl_init jmp short loc_7DC3D loc_7DC37: mov r14d, 0FFFFFFFEh loc_7DC3D: mov eax, r14d pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_7DC49: mov r14d, 0FFFFFFFCh jmp short loc_7DC3D
long long mz_deflateInit2(long long a1, unsigned int a2, int a3, unsigned int a4, int a5, unsigned int a6) { int comp_flags_from_zip_params; // eax long long ( *v10)(long long, long long); // rcx int v11; // ebp unsigned int v12; // r14d long long ( *v13)(long long, long long, long long); // rax long long v14; // rax comp_flags_from_zip_params = tdefl_create_comp_flags_from_zip_params(a2, a4, a6); if ( a1 ) { v11 = comp_flags_from_zip_params; LOBYTE(v10) = a3 != 8 || (unsigned int)(a5 - 10) < 0xFFFFFFF7; v12 = -10000; if ( !(_BYTE)v10 && (a4 == 15 || a4 == -15) ) { *(_DWORD *)(a1 + 88) = 0; *(_QWORD *)(a1 + 96) = 1LL; *(_QWORD *)(a1 + 104) = 0LL; *(_QWORD *)(a1 + 16) = 0LL; *(_OWORD *)(a1 + 40) = 0LL; v13 = *(long long ( **)(long long, long long, long long))(a1 + 64); if ( !v13 ) { v13 = miniz_def_alloc_func; *(_QWORD *)(a1 + 64) = miniz_def_alloc_func; } if ( !*(_QWORD *)(a1 + 72) ) { v10 = miniz_def_free_func; *(_QWORD *)(a1 + 72) = miniz_def_free_func; } v14 = ((long long ( *)(_QWORD, long long, long long, long long ( *)(long long, long long)))v13)( *(_QWORD *)(a1 + 80), 1LL, 319352LL, v10); if ( v14 ) { *(_QWORD *)(a1 + 56) = v14; v12 = 0; tdefl_init(v14, 0LL, 0LL, v11 | 0x2000u); } else { return (unsigned int)-4; } } } else { return (unsigned int)-2; } return v12; }
40,677
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [5], 0>(char const (&) [5]) const
llama.cpp/common/json.hpp
const_reference at(KeyType && key) const { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return it->second; }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [5], 0>(char const (&) [5]) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0xb3785 movq %rsi, %r15 movq 0x8(%r14), %r12 movq (%r12), %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx je 0xb376f movq %rbx, %rdi movq %r15, %rsi callq 0x20fc0 testl %eax, %eax je 0xb3764 addq $0x30, %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx jne 0xb3745 jmp 0xb3767 movq %rbx, %rax movq 0x8(%r14), %rcx movq 0x8(%rcx), %rbx cmpq %rbx, %rax je 0xb37e3 addq $0x20, %rax addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x20680 movq %rax, %rbx movq %r14, %rdi callq 0x8e128 movq %rsp, %rdx movq %rax, (%rdx) leaq 0x6acf2(%rip), %rsi # 0x11e499 leaq 0x20(%rsp), %rdi callq 0x836a5 movb $0x1, %bpl leaq 0x20(%rsp), %rdx movq %rbx, %rdi movl $0x130, %esi # imm = 0x130 movq %r14, %rcx callq 0xbfb0c xorl %ebp, %ebp leaq 0xb086e(%rip), %rsi # 0x164040 leaq -0x397e1(%rip), %rdx # 0x79ff8 movq %rbx, %rdi callq 0x20ab0 jmp 0xb385c movl $0x20, %edi callq 0x20680 movq %rax, %rbx leaq 0x10(%rsp), %r12 movq %r12, -0x10(%r12) movq %r15, %rdi callq 0x206b0 leaq (%rax,%r15), %rdx movq %rsp, %rdi movq %r15, %rsi callq 0x2a262 leaq 0x6ac97(%rip), %rsi # 0x11e4af leaq 0x6ac96(%rip), %rcx # 0x11e4b5 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x8372d movb $0x1, %bpl leaq 0x20(%rsp), %rdx movq %rbx, %rdi movl $0x193, %esi # imm = 0x193 movq %r14, %rcx callq 0xd49cc xorl %ebp, %ebp leaq 0xb0773(%rip), %rsi # 0x163fc0 leaq -0x3985c(%rip), %rdx # 0x79ff8 movq %rbx, %rdi callq 0x20ab0 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb387a movq 0x30(%rsp), %rsi incq %rsi callq 0x20180 movq (%rsp), %rdi cmpq %r12, %rdi je 0xb38c5 movq 0x10(%rsp), %rsi jmp 0xb38bd movq %rax, %r14 movq (%rsp), %rdi cmpq %r12, %rdi je 0xb38cf movq 0x10(%rsp), %rsi incq %rsi callq 0x20180 jmp 0xb38cf jmp 0xb38cc movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb38c5 movq 0x30(%rsp), %rsi incq %rsi callq 0x20180 testb %bpl, %bpl jne 0xb38cf jmp 0xb38d7 movq %rax, %r14 movq %rbx, %rdi callq 0x20f60 movq %r14, %rdi callq 0x20b50 nop
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: push rbp; void * push r15; int push r14; __int64 push r12; int push rbx; void * sub rsp, 40h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_B3785 mov r15, rsi mov r12, [r14+8] mov rbx, [r12] mov rax, [r12+8] cmp rbx, rax jz short loc_B376F loc_B3745: mov rdi, rbx mov rsi, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_B3764 add rbx, 30h ; '0' mov rax, [r12+8] cmp rbx, rax jnz short loc_B3745 jmp short loc_B3767 loc_B3764: mov rax, rbx loc_B3767: mov rcx, [r14+8] mov rbx, [rcx+8] loc_B376F: cmp rax, rbx jz short loc_B37E3 add rax, 20h ; ' ' add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_B3785: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) mov rdx, rsp mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+68h+var_48] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) mov bpl, 1 lea rdx, [rsp+68h+var_48] mov rdi, rbx; this mov esi, 130h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_B385C loc_B37E3: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r12, [rsp+68h+var_58] mov [r12-10h], r12 mov rdi, r15 call _strlen lea rdx, [rax+r15] mov rdi, rsp mov rsi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+68h+var_48] mov rdx, rsp call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) mov bpl, 1 lea rdx, [rsp+68h+var_48] mov rdi, rbx; this mov esi, 193h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_B385C: mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B387A mov rsi, [rsp+68h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B387A: mov rdi, [rsp+68h+var_68] cmp rdi, r12 jz short loc_B38C5 mov rsi, [rsp+68h+var_58] jmp short loc_B38BD mov r14, rax mov rdi, [rsp+68h+var_68]; void * cmp rdi, r12 jz short loc_B38CF mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_B38CF jmp short loc_B38CC mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B38C5 mov rsi, [rsp+68h+var_38] loc_B38BD: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B38C5: test bpl, bpl jnz short loc_B38CF jmp short loc_B38D7 loc_B38CC: mov r14, rax loc_B38CF: mov rdi, rbx; void * call ___cxa_free_exception loc_B38D7: mov rdi, r14 call __Unwind_Resume
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x001b3785 MOV R15,RSI MOV R12,qword ptr [R14 + 0x8] MOV RBX,qword ptr [R12] MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JZ 0x001b376f LAB_001b3745: MOV RDI,RBX MOV RSI,R15 CALL 0x00120fc0 TEST EAX,EAX JZ 0x001b3764 ADD RBX,0x30 MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JNZ 0x001b3745 JMP 0x001b3767 LAB_001b3764: MOV RAX,RBX LAB_001b3767: MOV RCX,qword ptr [R14 + 0x8] MOV RBX,qword ptr [RCX + 0x8] LAB_001b376f: CMP RAX,RBX JZ 0x001b37e3 ADD RAX,0x20 ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001b3785: MOV EDI,0x20 CALL 0x00120680 MOV RBX,RAX MOV RDI,R14 CALL 0x0018e128 MOV RDX,RSP MOV qword ptr [RDX],RAX LAB_001b37a0: LEA RSI,[0x21e499] LEA RDI,[RSP + 0x20] CALL 0x001836a5 MOV BPL,0x1 LAB_001b37b4: LEA RDX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x130 MOV RCX,R14 CALL 0x001bfb0c XOR EBP,EBP LEA RSI,[0x264040] LEA RDX,[0x179ff8] MOV RDI,RBX CALL 0x00120ab0 LAB_001b37e3: MOV EDI,0x20 CALL 0x00120680 MOV RBX,RAX LEA R12,[RSP + 0x10] MOV qword ptr [R12 + -0x10],R12 MOV RDI,R15 CALL 0x001206b0 LEA RDX,[RAX + R15*0x1] LAB_001b3806: MOV RDI,RSP MOV RSI,R15 CALL 0x0012a262 LAB_001b3811: LEA RSI,[0x21e4af] LEA RCX,[0x21e4b5] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x0018372d MOV BPL,0x1 LAB_001b382f: LEA RDX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x193 MOV RCX,R14 CALL 0x001d49cc XOR EBP,EBP LEA RSI,[0x263fc0] LEA RDX,[0x179ff8] MOV RDI,RBX CALL 0x00120ab0
char * _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_ (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_1,char *param_2) { long *plVar1; int iVar2; char *pcVar3; int8 uVar4; size_t sVar5; char *pcVar6; char *local_68 [2]; char local_58 [16]; detail local_48 [32]; if (*param_1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar4 = __cxa_allocate_exception(0x20); local_68[0] = (char *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(param_1); /* try { // try from 001b37a0 to 001b37b0 has its CatchHandler @ 001b38cc */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*> (local_48,"cannot use at() with ",local_68); /* try { // try from 001b37b4 to 001b37e0 has its CatchHandler @ 001b38a7 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar4,0x130,local_48,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } plVar1 = *(long **)(param_1 + 8); pcVar6 = (char *)*plVar1; pcVar3 = (char *)plVar1[1]; if (pcVar6 != pcVar3) { do { pcVar3 = pcVar6; iVar2 = std::__cxx11::string::compare(pcVar3); if (iVar2 == 0) break; pcVar6 = pcVar3 + 0x30; pcVar3 = (char *)plVar1[1]; } while (pcVar6 != pcVar3); pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8); } if (pcVar3 == pcVar6) { uVar4 = __cxa_allocate_exception(0x20); local_68[0] = local_58; sVar5 = strlen(param_2); /* try { // try from 001b3806 to 001b3810 has its CatchHandler @ 001b38a5 */ std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5); /* try { // try from 001b3811 to 001b382b has its CatchHandler @ 001b388a */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]> (local_48,"key \'",(string *)local_68,"\' not found"); /* try { // try from 001b382f to 001b385b has its CatchHandler @ 001b385c */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar4,0x193,local_48,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return pcVar3 + 0x20; }
40,678
testing::internal::(anonymous namespace)::IsValidUTF8(char const*, unsigned long)
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-printers.cc
bool IsValidUTF8(const char* str, size_t length) { const unsigned char* s = reinterpret_cast<const unsigned char*>(str); for (size_t i = 0; i < length;) { unsigned char lead = s[i++]; if (lead <= 0x7f) { continue; // single-byte character (ASCII) 0..7F } if (lead < 0xc2) { return false; // trail byte or non-shortest form } else if (lead <= 0xdf && (i + 1) <= length && IsUTF8TrailByte(s[i])) { ++i; // 2-byte character } else if (0xe0 <= lead && lead <= 0xef && (i + 2) <= length && IsUTF8TrailByte(s[i]) && IsUTF8TrailByte(s[i + 1]) && // check for non-shortest form and surrogate (lead != 0xe0 || s[i] >= 0xa0) && (lead != 0xed || s[i] < 0xa0)) { i += 2; // 3-byte character } else if (0xf0 <= lead && lead <= 0xf4 && (i + 3) <= length && IsUTF8TrailByte(s[i]) && IsUTF8TrailByte(s[i + 1]) && IsUTF8TrailByte(s[i + 2]) && // check for non-shortest form (lead != 0xf0 || s[i] >= 0x90) && (lead != 0xf4 || s[i] < 0x90)) { i += 3; // 4-byte character } else { return false; } } return true; }
O0
cpp
testing::internal::(anonymous namespace)::IsValidUTF8(char const*, unsigned long): subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x18(%rsp) movq $0x0, 0x10(%rsp) movq 0x10(%rsp), %rax cmpq 0x20(%rsp), %rax jae 0xe5ab0 movq 0x18(%rsp), %rax movq 0x10(%rsp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, 0x10(%rsp) movb (%rax,%rcx), %al movb %al, 0xf(%rsp) movzbl 0xf(%rsp), %eax cmpl $0x7f, %eax jg 0xe58aa jmp 0xe5871 movzbl 0xf(%rsp), %eax cmpl $0xc2, %eax jge 0xe58c0 movb $0x0, 0x37(%rsp) jmp 0xe5ab5 movzbl 0xf(%rsp), %eax cmpl $0xdf, %eax jg 0xe5908 movq 0x10(%rsp), %rax addq $0x1, %rax cmpq 0x20(%rsp), %rax ja 0xe5908 movq 0x18(%rsp), %rax movq 0x10(%rsp), %rcx movzbl (%rax,%rcx), %edi callq 0xe5ac0 testb $0x1, %al jne 0xe58f5 jmp 0xe5908 movq 0x10(%rsp), %rax addq $0x1, %rax movq %rax, 0x10(%rsp) jmp 0xe5aa9 movzbl 0xf(%rsp), %ecx movl $0xe0, %eax cmpl %ecx, %eax jg 0xe59c6 movzbl 0xf(%rsp), %eax cmpl $0xef, %eax jg 0xe59c6 movq 0x10(%rsp), %rax addq $0x2, %rax cmpq 0x20(%rsp), %rax ja 0xe59c6 movq 0x18(%rsp), %rax movq 0x10(%rsp), %rcx movzbl (%rax,%rcx), %edi callq 0xe5ac0 testb $0x1, %al jne 0xe5957 jmp 0xe59c6 movq 0x18(%rsp), %rax movq 0x10(%rsp), %rcx movzbl 0x1(%rax,%rcx), %edi callq 0xe5ac0 testb $0x1, %al jne 0xe5971 jmp 0xe59c6 movzbl 0xf(%rsp), %eax cmpl $0xe0, %eax jne 0xe5992 movq 0x18(%rsp), %rax movq 0x10(%rsp), %rcx movzbl (%rax,%rcx), %eax cmpl $0xa0, %eax jl 0xe59c6 movzbl 0xf(%rsp), %eax cmpl $0xed, %eax jne 0xe59b3 movq 0x18(%rsp), %rax movq 0x10(%rsp), %rcx movzbl (%rax,%rcx), %eax cmpl $0xa0, %eax jge 0xe59c6 movq 0x10(%rsp), %rax addq $0x2, %rax movq %rax, 0x10(%rsp) jmp 0xe5aa7 movzbl 0xf(%rsp), %ecx movl $0xf0, %eax cmpl %ecx, %eax jg 0xe5a9e movzbl 0xf(%rsp), %eax cmpl $0xf4, %eax jg 0xe5a9e movq 0x10(%rsp), %rax addq $0x3, %rax cmpq 0x20(%rsp), %rax ja 0xe5a9e movq 0x18(%rsp), %rax movq 0x10(%rsp), %rcx movzbl (%rax,%rcx), %edi callq 0xe5ac0 testb $0x1, %al jne 0xe5a18 jmp 0xe5a9e movq 0x18(%rsp), %rax movq 0x10(%rsp), %rcx movzbl 0x1(%rax,%rcx), %edi callq 0xe5ac0 testb $0x1, %al jne 0xe5a32 jmp 0xe5a9e movq 0x18(%rsp), %rax movq 0x10(%rsp), %rcx movzbl 0x2(%rax,%rcx), %edi callq 0xe5ac0 testb $0x1, %al jne 0xe5a4c jmp 0xe5a9e movzbl 0xf(%rsp), %eax cmpl $0xf0, %eax jne 0xe5a6d movq 0x18(%rsp), %rax movq 0x10(%rsp), %rcx movzbl (%rax,%rcx), %eax cmpl $0x90, %eax jl 0xe5a9e movzbl 0xf(%rsp), %eax cmpl $0xf4, %eax jne 0xe5a8e movq 0x18(%rsp), %rax movq 0x10(%rsp), %rcx movzbl (%rax,%rcx), %eax cmpl $0x90, %eax jge 0xe5a9e movq 0x10(%rsp), %rax addq $0x3, %rax movq %rax, 0x10(%rsp) jmp 0xe5aa5 movb $0x0, 0x37(%rsp) jmp 0xe5ab5 jmp 0xe5aa7 jmp 0xe5aa9 jmp 0xe5aab jmp 0xe5871 movb $0x1, 0x37(%rsp) movb 0x37(%rsp), %al andb $0x1, %al addq $0x38, %rsp retq
_ZN7testing8internal12_GLOBAL__N_111IsValidUTF8EPKcm: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_18], rsi mov rax, [rsp+38h+var_10] mov [rsp+38h+var_20], rax mov [rsp+38h+var_28], 0 loc_E5871: mov rax, [rsp+38h+var_28] cmp rax, [rsp+38h+var_18] jnb loc_E5AB0 mov rax, [rsp+38h+var_20] mov rcx, [rsp+38h+var_28] mov rdx, rcx add rdx, 1 mov [rsp+38h+var_28], rdx mov al, [rax+rcx] mov [rsp+38h+var_29], al movzx eax, [rsp+38h+var_29] cmp eax, 7Fh jg short loc_E58AA jmp short loc_E5871 loc_E58AA: movzx eax, [rsp+38h+var_29] cmp eax, 0C2h jge short loc_E58C0 mov [rsp+38h+var_1], 0 jmp loc_E5AB5 loc_E58C0: movzx eax, [rsp+38h+var_29] cmp eax, 0DFh jg short loc_E5908 mov rax, [rsp+38h+var_28] add rax, 1 cmp rax, [rsp+38h+var_18] ja short loc_E5908 mov rax, [rsp+38h+var_20] mov rcx, [rsp+38h+var_28] movzx edi, byte ptr [rax+rcx]; this call _ZN7testing8internal12_GLOBAL__N_115IsUTF8TrailByteEh; testing::internal::`anonymous namespace'::IsUTF8TrailByte(uchar) test al, 1 jnz short loc_E58F5 jmp short loc_E5908 loc_E58F5: mov rax, [rsp+38h+var_28] add rax, 1 mov [rsp+38h+var_28], rax jmp loc_E5AA9 loc_E5908: movzx ecx, [rsp+38h+var_29] mov eax, 0E0h cmp eax, ecx jg loc_E59C6 movzx eax, [rsp+38h+var_29] cmp eax, 0EFh jg loc_E59C6 mov rax, [rsp+38h+var_28] add rax, 2 cmp rax, [rsp+38h+var_18] ja loc_E59C6 mov rax, [rsp+38h+var_20] mov rcx, [rsp+38h+var_28] movzx edi, byte ptr [rax+rcx]; this call _ZN7testing8internal12_GLOBAL__N_115IsUTF8TrailByteEh; testing::internal::`anonymous namespace'::IsUTF8TrailByte(uchar) test al, 1 jnz short loc_E5957 jmp short loc_E59C6 loc_E5957: mov rax, [rsp+38h+var_20] mov rcx, [rsp+38h+var_28] movzx edi, byte ptr [rax+rcx+1]; this call _ZN7testing8internal12_GLOBAL__N_115IsUTF8TrailByteEh; testing::internal::`anonymous namespace'::IsUTF8TrailByte(uchar) test al, 1 jnz short loc_E5971 jmp short loc_E59C6 loc_E5971: movzx eax, [rsp+38h+var_29] cmp eax, 0E0h jnz short loc_E5992 mov rax, [rsp+38h+var_20] mov rcx, [rsp+38h+var_28] movzx eax, byte ptr [rax+rcx] cmp eax, 0A0h jl short loc_E59C6 loc_E5992: movzx eax, [rsp+38h+var_29] cmp eax, 0EDh jnz short loc_E59B3 mov rax, [rsp+38h+var_20] mov rcx, [rsp+38h+var_28] movzx eax, byte ptr [rax+rcx] cmp eax, 0A0h jge short loc_E59C6 loc_E59B3: mov rax, [rsp+38h+var_28] add rax, 2 mov [rsp+38h+var_28], rax jmp loc_E5AA7 loc_E59C6: movzx ecx, [rsp+38h+var_29] mov eax, 0F0h cmp eax, ecx jg loc_E5A9E movzx eax, [rsp+38h+var_29] cmp eax, 0F4h jg loc_E5A9E mov rax, [rsp+38h+var_28] add rax, 3 cmp rax, [rsp+38h+var_18] ja loc_E5A9E mov rax, [rsp+38h+var_20] mov rcx, [rsp+38h+var_28] movzx edi, byte ptr [rax+rcx]; this call _ZN7testing8internal12_GLOBAL__N_115IsUTF8TrailByteEh; testing::internal::`anonymous namespace'::IsUTF8TrailByte(uchar) test al, 1 jnz short loc_E5A18 jmp loc_E5A9E loc_E5A18: mov rax, [rsp+38h+var_20] mov rcx, [rsp+38h+var_28] movzx edi, byte ptr [rax+rcx+1]; this call _ZN7testing8internal12_GLOBAL__N_115IsUTF8TrailByteEh; testing::internal::`anonymous namespace'::IsUTF8TrailByte(uchar) test al, 1 jnz short loc_E5A32 jmp short loc_E5A9E loc_E5A32: mov rax, [rsp+38h+var_20] mov rcx, [rsp+38h+var_28] movzx edi, byte ptr [rax+rcx+2]; this call _ZN7testing8internal12_GLOBAL__N_115IsUTF8TrailByteEh; testing::internal::`anonymous namespace'::IsUTF8TrailByte(uchar) test al, 1 jnz short loc_E5A4C jmp short loc_E5A9E loc_E5A4C: movzx eax, [rsp+38h+var_29] cmp eax, 0F0h jnz short loc_E5A6D mov rax, [rsp+38h+var_20] mov rcx, [rsp+38h+var_28] movzx eax, byte ptr [rax+rcx] cmp eax, 90h jl short loc_E5A9E loc_E5A6D: movzx eax, [rsp+38h+var_29] cmp eax, 0F4h jnz short loc_E5A8E mov rax, [rsp+38h+var_20] mov rcx, [rsp+38h+var_28] movzx eax, byte ptr [rax+rcx] cmp eax, 90h jge short loc_E5A9E loc_E5A8E: mov rax, [rsp+38h+var_28] add rax, 3 mov [rsp+38h+var_28], rax jmp short loc_E5AA5 loc_E5A9E: mov [rsp+38h+var_1], 0 jmp short loc_E5AB5 loc_E5AA5: jmp short $+2 loc_E5AA7: jmp short $+2 loc_E5AA9: jmp short $+2 loc_E5AAB: jmp loc_E5871 loc_E5AB0: mov [rsp+38h+var_1], 1 loc_E5AB5: mov al, [rsp+38h+var_1] and al, 1 add rsp, 38h retn
char testing::internal::`anonymous namespace'::IsValidUTF8( testing::internal::_anonymous_namespace_ *this, const char *a2) { unsigned long long v2; // rcx unsigned __int8 v4; // [rsp+Fh] [rbp-29h] unsigned long long v5; // [rsp+10h] [rbp-28h] v5 = 0LL; while ( v5 < (unsigned long long)a2 ) { v2 = v5++; v4 = *((_BYTE *)this + v2); if ( v4 > 0x7Fu ) { if ( v4 < 0xC2u ) return 0; if ( v4 <= 0xDFu && v5 + 1 <= (unsigned long long)a2 && (testing::internal::`anonymous namespace'::IsUTF8TrailByte( (testing::internal::_anonymous_namespace_ *)*((unsigned __int8 *)this + v5), (unsigned __int8)a2) & 1) != 0 ) { ++v5; } else if ( v4 < 0xE0u || v4 > 0xEFu || v5 + 2 > (unsigned long long)a2 || (testing::internal::`anonymous namespace'::IsUTF8TrailByte( (testing::internal::_anonymous_namespace_ *)*((unsigned __int8 *)this + v5), (unsigned __int8)a2) & 1) == 0 || (testing::internal::`anonymous namespace'::IsUTF8TrailByte( (testing::internal::_anonymous_namespace_ *)*((unsigned __int8 *)this + v5 + 1), (unsigned __int8)a2) & 1) == 0 || v4 == 224 && *((unsigned __int8 *)this + v5) < 0xA0u || v4 == 237 && *((unsigned __int8 *)this + v5) >= 0xA0u ) { if ( v4 < 0xF0u || v4 > 0xF4u || v5 + 3 > (unsigned long long)a2 || (testing::internal::`anonymous namespace'::IsUTF8TrailByte( (testing::internal::_anonymous_namespace_ *)*((unsigned __int8 *)this + v5), (unsigned __int8)a2) & 1) == 0 || (testing::internal::`anonymous namespace'::IsUTF8TrailByte( (testing::internal::_anonymous_namespace_ *)*((unsigned __int8 *)this + v5 + 1), (unsigned __int8)a2) & 1) == 0 || (testing::internal::`anonymous namespace'::IsUTF8TrailByte( (testing::internal::_anonymous_namespace_ *)*((unsigned __int8 *)this + v5 + 2), (unsigned __int8)a2) & 1) == 0 || v4 == 240 && *((unsigned __int8 *)this + v5) < 0x90u || v4 == 244 && *((unsigned __int8 *)this + v5) >= 0x90u ) { return 0; } v5 += 3LL; } else { v5 += 2LL; } } } return 1; }
IsValidUTF8: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RDI MOV qword ptr [RSP + 0x20],RSI MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x10],0x0 LAB_001e5871: MOV RAX,qword ptr [RSP + 0x10] CMP RAX,qword ptr [RSP + 0x20] JNC 0x001e5ab0 MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x10] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RSP + 0x10],RDX MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RSP + 0xf],AL MOVZX EAX,byte ptr [RSP + 0xf] CMP EAX,0x7f JG 0x001e58aa JMP 0x001e5871 LAB_001e58aa: MOVZX EAX,byte ptr [RSP + 0xf] CMP EAX,0xc2 JGE 0x001e58c0 MOV byte ptr [RSP + 0x37],0x0 JMP 0x001e5ab5 LAB_001e58c0: MOVZX EAX,byte ptr [RSP + 0xf] CMP EAX,0xdf JG 0x001e5908 MOV RAX,qword ptr [RSP + 0x10] ADD RAX,0x1 CMP RAX,qword ptr [RSP + 0x20] JA 0x001e5908 MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x10] MOVZX EDI,byte ptr [RAX + RCX*0x1] CALL 0x001e5ac0 TEST AL,0x1 JNZ 0x001e58f5 JMP 0x001e5908 LAB_001e58f5: MOV RAX,qword ptr [RSP + 0x10] ADD RAX,0x1 MOV qword ptr [RSP + 0x10],RAX JMP 0x001e5aa9 LAB_001e5908: MOVZX ECX,byte ptr [RSP + 0xf] MOV EAX,0xe0 CMP EAX,ECX JG 0x001e59c6 MOVZX EAX,byte ptr [RSP + 0xf] CMP EAX,0xef JG 0x001e59c6 MOV RAX,qword ptr [RSP + 0x10] ADD RAX,0x2 CMP RAX,qword ptr [RSP + 0x20] JA 0x001e59c6 MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x10] MOVZX EDI,byte ptr [RAX + RCX*0x1] CALL 0x001e5ac0 TEST AL,0x1 JNZ 0x001e5957 JMP 0x001e59c6 LAB_001e5957: MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x10] MOVZX EDI,byte ptr [RAX + RCX*0x1 + 0x1] CALL 0x001e5ac0 TEST AL,0x1 JNZ 0x001e5971 JMP 0x001e59c6 LAB_001e5971: MOVZX EAX,byte ptr [RSP + 0xf] CMP EAX,0xe0 JNZ 0x001e5992 MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x10] MOVZX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0xa0 JL 0x001e59c6 LAB_001e5992: MOVZX EAX,byte ptr [RSP + 0xf] CMP EAX,0xed JNZ 0x001e59b3 MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x10] MOVZX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0xa0 JGE 0x001e59c6 LAB_001e59b3: MOV RAX,qword ptr [RSP + 0x10] ADD RAX,0x2 MOV qword ptr [RSP + 0x10],RAX JMP 0x001e5aa7 LAB_001e59c6: MOVZX ECX,byte ptr [RSP + 0xf] MOV EAX,0xf0 CMP EAX,ECX JG 0x001e5a9e MOVZX EAX,byte ptr [RSP + 0xf] CMP EAX,0xf4 JG 0x001e5a9e MOV RAX,qword ptr [RSP + 0x10] ADD RAX,0x3 CMP RAX,qword ptr [RSP + 0x20] JA 0x001e5a9e MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x10] MOVZX EDI,byte ptr [RAX + RCX*0x1] CALL 0x001e5ac0 TEST AL,0x1 JNZ 0x001e5a18 JMP 0x001e5a9e LAB_001e5a18: MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x10] MOVZX EDI,byte ptr [RAX + RCX*0x1 + 0x1] CALL 0x001e5ac0 TEST AL,0x1 JNZ 0x001e5a32 JMP 0x001e5a9e LAB_001e5a32: MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x10] MOVZX EDI,byte ptr [RAX + RCX*0x1 + 0x2] CALL 0x001e5ac0 TEST AL,0x1 JNZ 0x001e5a4c JMP 0x001e5a9e LAB_001e5a4c: MOVZX EAX,byte ptr [RSP + 0xf] CMP EAX,0xf0 JNZ 0x001e5a6d MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x10] MOVZX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x90 JL 0x001e5a9e LAB_001e5a6d: MOVZX EAX,byte ptr [RSP + 0xf] CMP EAX,0xf4 JNZ 0x001e5a8e MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x10] MOVZX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x90 JGE 0x001e5a9e LAB_001e5a8e: MOV RAX,qword ptr [RSP + 0x10] ADD RAX,0x3 MOV qword ptr [RSP + 0x10],RAX JMP 0x001e5aa5 LAB_001e5a9e: MOV byte ptr [RSP + 0x37],0x0 JMP 0x001e5ab5 LAB_001e5aa5: JMP 0x001e5aa7 LAB_001e5aa7: JMP 0x001e5aa9 LAB_001e5aa9: JMP 0x001e5aab LAB_001e5aab: JMP 0x001e5871 LAB_001e5ab0: MOV byte ptr [RSP + 0x37],0x1 LAB_001e5ab5: MOV AL,byte ptr [RSP + 0x37] AND AL,0x1 ADD RSP,0x38 RET
/* testing::internal::(anonymous namespace)::IsValidUTF8(char const*, unsigned long) */ int1 testing::internal::(anonymous_namespace)::IsValidUTF8(char *param_1,ulong param_2) { byte bVar1; ulong uVar2; ulong uVar3; ulong local_28; local_28 = 0; uVar3 = local_28; while( true ) { do { local_28 = uVar3; if (param_2 <= local_28) { return 1; } uVar3 = local_28 + 1; bVar1 = param_1[local_28]; } while (bVar1 < 0x80); if (bVar1 < 0xc2) break; if (((bVar1 < 0xe0) && (local_28 + 2 <= param_2)) && (uVar2 = IsUTF8TrailByte(param_1[uVar3]), (uVar2 & 1) != 0)) { uVar3 = local_28 + 2; } else if (((((bVar1 < 0xe0) || (0xef < bVar1)) || ((param_2 < local_28 + 3 || ((uVar2 = IsUTF8TrailByte(param_1[uVar3]), (uVar2 & 1) == 0 || (uVar2 = IsUTF8TrailByte(param_1[local_28 + 2]), (uVar2 & 1) == 0)))))) || ((bVar1 == 0xe0 && ((byte)param_1[uVar3] < 0xa0)))) || ((bVar1 == 0xed && (0x9f < (byte)param_1[uVar3])))) { if ((((bVar1 < 0xf0) || ((((0xf4 < bVar1 || (param_2 < local_28 + 4)) || (uVar2 = IsUTF8TrailByte(param_1[uVar3]), (uVar2 & 1) == 0)) || ((uVar2 = IsUTF8TrailByte(param_1[local_28 + 2]), (uVar2 & 1) == 0 || (uVar2 = IsUTF8TrailByte(param_1[local_28 + 3]), (uVar2 & 1) == 0)))))) || ((bVar1 == 0xf0 && ((byte)param_1[uVar3] < 0x90)))) || ((bVar1 == 0xf4 && (0x8f < (byte)param_1[uVar3])))) { return 0; } uVar3 = local_28 + 4; } else { uVar3 = local_28 + 3; } } return 0; }
40,679
insert_dynamic
eloqsql/mysys/array.c
my_bool insert_dynamic(DYNAMIC_ARRAY *array, const void * element) { void *buffer; if (array->elements == array->max_element) { /* Call only when necessary */ if (!(buffer=alloc_dynamic(array))) return TRUE; } else { buffer=array->buffer+(array->elements * array->size_of_element); array->elements++; } memcpy(buffer,element,(size_t) array->size_of_element); return FALSE; }
O0
c
insert_dynamic: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movl 0x8(%rax), %eax movq -0x10(%rbp), %rcx cmpl 0xc(%rcx), %eax jne 0x6e65b movq -0x10(%rbp), %rdi callq 0x6e6b0 movq %rax, -0x20(%rbp) cmpq $0x0, %rax jne 0x6e659 movb $0x1, -0x1(%rbp) jmp 0x6e6a1 jmp 0x6e687 movq -0x10(%rbp), %rax movq (%rax), %rax movq -0x10(%rbp), %rcx movl 0x8(%rcx), %ecx movq -0x10(%rbp), %rdx imull 0x14(%rdx), %ecx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movl 0x8(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x8(%rax) movq -0x20(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x10(%rbp), %rax movl 0x14(%rax), %eax movl %eax, %edx callq 0x360b0 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
insert_dynamic: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov eax, [rax+8] mov rcx, [rbp+var_10] cmp eax, [rcx+0Ch] jnz short loc_6E65B mov rdi, [rbp+var_10] call alloc_dynamic mov [rbp+var_20], rax cmp rax, 0 jnz short loc_6E659 mov [rbp+var_1], 1 jmp short loc_6E6A1 loc_6E659: jmp short loc_6E687 loc_6E65B: mov rax, [rbp+var_10] mov rax, [rax] mov rcx, [rbp+var_10] mov ecx, [rcx+8] mov rdx, [rbp+var_10] imul ecx, [rdx+14h] mov ecx, ecx add rax, rcx mov [rbp+var_20], rax mov rax, [rbp+var_10] mov ecx, [rax+8] add ecx, 1 mov [rax+8], ecx loc_6E687: mov rdi, [rbp+var_20] mov rsi, [rbp+var_18] mov rax, [rbp+var_10] mov eax, [rax+14h] mov edx, eax call _memcpy mov [rbp+var_1], 0 loc_6E6A1: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char insert_dynamic(long long a1, long long a2) { long long v3; // [rsp+0h] [rbp-20h] if ( *(_DWORD *)(a1 + 8) != *(_DWORD *)(a1 + 12) ) { v3 = (unsigned int)(*(_DWORD *)(a1 + 20) * (*(_DWORD *)(a1 + 8))++) + *(_QWORD *)a1; LABEL_6: memcpy(v3, a2, *(unsigned int *)(a1 + 20)); return 0; } v3 = alloc_dynamic(a1); if ( v3 ) goto LABEL_6; return 1; }
insert_dynamic: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0xc] JNZ 0x0016e65b MOV RDI,qword ptr [RBP + -0x10] CALL 0x0016e6b0 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JNZ 0x0016e659 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0016e6a1 LAB_0016e659: JMP 0x0016e687 LAB_0016e65b: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x8] MOV RDX,qword ptr [RBP + -0x10] IMUL ECX,dword ptr [RDX + 0x14] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x8] ADD ECX,0x1 MOV dword ptr [RAX + 0x8],ECX LAB_0016e687: MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x14] MOV EDX,EAX CALL 0x001360b0 MOV byte ptr [RBP + -0x1],0x0 LAB_0016e6a1: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 insert_dynamic(long *param_1,void *param_2) { void *local_28; if ((int)param_1[1] == *(int *)((long)param_1 + 0xc)) { local_28 = (void *)alloc_dynamic(param_1); if (local_28 == (void *)0x0) { return 1; } } else { local_28 = (void *)(*param_1 + (ulong)(uint)((int)param_1[1] * *(int *)((long)param_1 + 0x14))); *(int *)(param_1 + 1) = (int)param_1[1] + 1; } memcpy(local_28,param_2,(ulong)*(uint *)((long)param_1 + 0x14)); return 0; }
40,680
my_snprintf_mb2
eloqsql/strings/ctype-ucs2.c
static size_t my_snprintf_mb2(CHARSET_INFO *cs __attribute__((unused)), char* to, size_t n, const char* fmt, ...) { size_t ret; va_list args; va_start(args,fmt); ret= my_vsnprintf_mb2(to, n, fmt, args); va_end(args); return ret; }
O0
c
my_snprintf_mb2: pushq %rbp movq %rsp, %rbp subq $0xf0, %rsp testb %al, %al je 0x6d9ab movaps %xmm0, -0xc0(%rbp) movaps %xmm1, -0xb0(%rbp) movaps %xmm2, -0xa0(%rbp) movaps %xmm3, -0x90(%rbp) movaps %xmm4, -0x80(%rbp) movaps %xmm5, -0x70(%rbp) movaps %xmm6, -0x60(%rbp) movaps %xmm7, -0x50(%rbp) movq %r9, -0xc8(%rbp) movq %r8, -0xd0(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) leaq -0xf0(%rbp), %rax movq %rax, -0x30(%rbp) leaq 0x10(%rbp), %rax movq %rax, -0x38(%rbp) movl $0x30, -0x3c(%rbp) movl $0x20, -0x40(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx leaq -0x40(%rbp), %rcx callq 0x70e20 movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax addq $0xf0, %rsp popq %rbp retq
my_snprintf_mb2: push rbp mov rbp, rsp sub rsp, 0F0h test al, al jz short loc_6D9AB movaps [rbp+var_C0], xmm0 movaps [rbp+var_B0], xmm1 movaps [rbp+var_A0], xmm2 movaps [rbp+var_90], xmm3 movaps [rbp+var_80], xmm4 movaps [rbp+var_70], xmm5 movaps [rbp+var_60], xmm6 movaps [rbp+var_50], xmm7 loc_6D9AB: mov [rbp+var_C8], r9 mov [rbp+var_D0], r8 mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx lea rax, [rbp+var_F0] mov [rbp+var_30], rax lea rax, [rbp+arg_0] mov [rbp+var_38], rax mov [rbp+var_3C], 30h ; '0' mov [rbp+var_40], 20h ; ' ' mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] lea rcx, [rbp+var_40] call my_vsnprintf_mb2 mov [rbp+var_28], rax mov rax, [rbp+var_28] add rsp, 0F0h pop rbp retn
long long my_snprintf_mb2( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, char a15) { char v16; // [rsp+0h] [rbp-F0h] BYREF long long v17; // [rsp+20h] [rbp-D0h] long long v18; // [rsp+28h] [rbp-C8h] __m128 v19; // [rsp+30h] [rbp-C0h] __m128 v20; // [rsp+40h] [rbp-B0h] __m128 v21; // [rsp+50h] [rbp-A0h] __m128 v22; // [rsp+60h] [rbp-90h] __m128 v23; // [rsp+70h] [rbp-80h] __m128 v24; // [rsp+80h] [rbp-70h] __m128 v25; // [rsp+90h] [rbp-60h] __m128 v26; // [rsp+A0h] [rbp-50h] _DWORD v27[2]; // [rsp+B0h] [rbp-40h] BYREF char *v28; // [rsp+B8h] [rbp-38h] char *v29; // [rsp+C0h] [rbp-30h] long long v30; // [rsp+D0h] [rbp-20h] long long v31; // [rsp+D8h] [rbp-18h] long long v32; // [rsp+E0h] [rbp-10h] long long v33; // [rsp+E8h] [rbp-8h] v19 = a7; v20 = a8; v21 = a9; v22 = a10; v23 = a11; v24 = a12; v25 = a13; v26 = a14; v18 = a6; v17 = a5; v33 = a1; v32 = a2; v31 = a3; v30 = a4; v29 = &v16; v28 = &a15; v27[1] = 48; v27[0] = 32; return my_vsnprintf_mb2(a2, a3, a4, v27); }
my_snprintf_mb2: PUSH RBP MOV RBP,RSP SUB RSP,0xf0 TEST AL,AL JZ 0x0016d9ab MOVAPS xmmword ptr [RBP + -0xc0],XMM0 MOVAPS xmmword ptr [RBP + -0xb0],XMM1 MOVAPS xmmword ptr [RBP + -0xa0],XMM2 MOVAPS xmmword ptr [RBP + -0x90],XMM3 MOVAPS xmmword ptr [RBP + -0x80],XMM4 MOVAPS xmmword ptr [RBP + -0x70],XMM5 MOVAPS xmmword ptr [RBP + -0x60],XMM6 MOVAPS xmmword ptr [RBP + -0x50],XMM7 LAB_0016d9ab: MOV qword ptr [RBP + -0xc8],R9 MOV qword ptr [RBP + -0xd0],R8 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX LEA RAX,[RBP + -0xf0] MOV qword ptr [RBP + -0x30],RAX LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x38],RAX MOV dword ptr [RBP + -0x3c],0x30 MOV dword ptr [RBP + -0x40],0x20 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] LEA RCX,[RBP + -0x40] CALL 0x00170e20 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RSP,0xf0 POP RBP RET
int8 my_snprintf_mb2(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; int8 uVar1; int1 local_f8 [32]; int8 local_d8; int8 local_d0; int8 local_c8; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int4 local_48; int4 local_44; int1 *local_40; int1 *local_38; int8 local_28; int8 local_20; int8 local_18; int8 local_10; if (in_AL != '\0') { local_c8 = param_1; local_b8 = param_2; local_a8 = param_3; local_98 = param_4; local_88 = param_5; local_78 = param_6; local_68 = param_7; local_58 = param_8; } local_38 = local_f8; local_40 = &stack0x00000008; local_44 = 0x30; local_48 = 0x20; local_d8 = param_13; local_d0 = param_14; local_28 = param_12; local_20 = param_11; local_18 = param_10; local_10 = param_9; uVar1 = my_vsnprintf_mb2(param_10,param_11,param_12,&local_48); return uVar1; }
40,681
test_socket_registration()
eloqsql/storage/perfschema/unittest/pfs_instr_class-t.cc
void test_socket_registration() { int rc; PFS_socket_key key; PFS_socket_class *socket; rc= init_socket_class(5); ok(rc == 0, "room for 5 socket"); key= register_socket_class("FOO", 3, 0); ok(key == 1, "foo registered"); key= register_socket_class("BAR", 3, 0); ok(key == 2, "bar registered"); key= register_socket_class("FOO", 3, 0); ok(key == 1, "foo re registered"); key= register_socket_class("Socket-3", 8, 0); ok(key == 3, "Socket-3 registered"); key= register_socket_class("Socket-4", 8, 0); ok(key == 4, "Socket-4 registered"); key= register_socket_class("Socket-5", 8, 0); ok(key == 5, "Socket-5 registered"); ok(socket_class_lost == 0, "lost nothing"); key= register_socket_class("Socket-6", 8, 0); ok(key == 0, "Socket-6 not registered"); ok(socket_class_lost == 1, "lost 1 socket"); key= register_socket_class("Socket-7", 8, 0); ok(key == 0, "Socket-7 not registered"); ok(socket_class_lost == 2, "lost 2 socket"); key= register_socket_class("Socket-3", 8, 0); ok(key == 3, "Socket-3 re registered"); ok(socket_class_lost == 2, "lost 2 socket"); key= register_socket_class("Socket-5", 8, 0); ok(key == 5, "Socket-5 re registered"); ok(socket_class_lost == 2, "lost 2 socket"); socket= find_socket_class(0); ok(socket == NULL, "no key 0"); socket= find_socket_class(3); ok(socket != NULL, "found key 3"); ok(strncmp(socket->m_name, "Socket-3", 8) == 0, "key 3 is Socket-3"); ok(socket->m_name_length == 8, "name length 3"); socket= find_socket_class(9999); ok(socket == NULL, "no key 9999"); cleanup_socket_class(); }
O0
cpp
test_socket_registration(): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movl $0x5, %edi callq 0x2e160 movl %eax, -0x4(%rbp) cmpl $0x0, -0x4(%rbp) sete %al andb $0x1, %al movzbl %al, %edi leaq 0x8529a(%rip), %rsi # 0xb06b2 movb $0x0, %al callq 0x2c5a0 leaq 0x84c4b(%rip), %rdi # 0xb0071 movl $0x3, %esi xorl %edx, %edx callq 0x2f1f0 movl %eax, -0x8(%rbp) cmpl $0x1, -0x8(%rbp) sete %al andb $0x1, %al movzbl %al, %edi leaq 0x84e26(%rip), %rsi # 0xb026e movb $0x0, %al callq 0x2c5a0 leaq 0x84c33(%rip), %rdi # 0xb0089 movl $0x3, %esi xorl %edx, %edx callq 0x2f1f0 movl %eax, -0x8(%rbp) cmpl $0x2, -0x8(%rbp) sete %al andb $0x1, %al movzbl %al, %edi leaq 0x84e05(%rip), %rsi # 0xb027d movb $0x0, %al callq 0x2c5a0 leaq 0x84beb(%rip), %rdi # 0xb0071 movl $0x3, %esi xorl %edx, %edx callq 0x2f1f0 movl %eax, -0x8(%rbp) cmpl $0x1, -0x8(%rbp) sete %al andb $0x1, %al movzbl %al, %edi leaq 0x84de4(%rip), %rsi # 0xb028c movb $0x0, %al callq 0x2c5a0 leaq 0x852f1(%rip), %rdi # 0xb07a7 movl $0x8, %esi xorl %edx, %edx callq 0x2f1f0 movl %eax, -0x8(%rbp) cmpl $0x3, -0x8(%rbp) sete %al andb $0x1, %al movzbl %al, %edi leaq 0x851ec(%rip), %rsi # 0xb06c4 movb $0x0, %al callq 0x2c5a0 leaq 0x851f2(%rip), %rdi # 0xb06d8 movl $0x8, %esi xorl %edx, %edx callq 0x2f1f0 movl %eax, -0x8(%rbp) cmpl $0x4, -0x8(%rbp) sete %al andb $0x1, %al movzbl %al, %edi leaq 0x851d9(%rip), %rsi # 0xb06e1 movb $0x0, %al callq 0x2c5a0 leaq 0x851df(%rip), %rdi # 0xb06f5 movl $0x8, %esi xorl %edx, %edx callq 0x2f1f0 movl %eax, -0x8(%rbp) cmpl $0x5, -0x8(%rbp) sete %al andb $0x1, %al movzbl %al, %edi leaq 0x851c6(%rip), %rsi # 0xb06fe movb $0x0, %al callq 0x2c5a0 leaq 0x3a2e72(%rip), %rax # 0x3ce3b8 cmpq $0x0, (%rax) sete %al andb $0x1, %al movzbl %al, %edi leaq 0x84d7a(%rip), %rsi # 0xb02d3 movb $0x0, %al callq 0x2c5a0 leaq 0x851ab(%rip), %rdi # 0xb0712 movl $0x8, %esi xorl %edx, %edx callq 0x2f1f0 movl %eax, -0x8(%rbp) cmpl $0x0, -0x8(%rbp) sete %al andb $0x1, %al movzbl %al, %edi leaq 0x85192(%rip), %rsi # 0xb071b movb $0x0, %al callq 0x2c5a0 leaq 0x3a2e21(%rip), %rax # 0x3ce3b8 cmpq $0x1, (%rax) sete %al andb $0x1, %al movzbl %al, %edi leaq 0x85189(%rip), %rsi # 0xb0733 movb $0x0, %al callq 0x2c5a0 leaq 0x85189(%rip), %rdi # 0xb0741 movl $0x8, %esi xorl %edx, %edx callq 0x2f1f0 movl %eax, -0x8(%rbp) cmpl $0x0, -0x8(%rbp) sete %al andb $0x1, %al movzbl %al, %edi leaq 0x85170(%rip), %rsi # 0xb074a movb $0x0, %al callq 0x2c5a0 leaq 0x3a2dd0(%rip), %rax # 0x3ce3b8 cmpq $0x2, (%rax) sete %al andb $0x1, %al movzbl %al, %edi leaq 0x85167(%rip), %rsi # 0xb0762 movb $0x0, %al callq 0x2c5a0 leaq 0x8519e(%rip), %rdi # 0xb07a7 movl $0x8, %esi xorl %edx, %edx callq 0x2f1f0 movl %eax, -0x8(%rbp) cmpl $0x3, -0x8(%rbp) sete %al andb $0x1, %al movzbl %al, %edi leaq 0x85145(%rip), %rsi # 0xb0770 movb $0x0, %al callq 0x2c5a0 leaq 0x3a2d7f(%rip), %rax # 0x3ce3b8 cmpq $0x2, (%rax) sete %al andb $0x1, %al movzbl %al, %edi leaq 0x85116(%rip), %rsi # 0xb0762 movb $0x0, %al callq 0x2c5a0 leaq 0x8509b(%rip), %rdi # 0xb06f5 movl $0x8, %esi xorl %edx, %edx callq 0x2f1f0 movl %eax, -0x8(%rbp) cmpl $0x5, -0x8(%rbp) sete %al andb $0x1, %al movzbl %al, %edi leaq 0x8510b(%rip), %rsi # 0xb0787 movb $0x0, %al callq 0x2c5a0 leaq 0x3a2d2e(%rip), %rax # 0x3ce3b8 cmpq $0x2, (%rax) sete %al andb $0x1, %al movzbl %al, %edi leaq 0x850c5(%rip), %rsi # 0xb0762 movb $0x0, %al callq 0x2c5a0 xorl %edi, %edi callq 0x2f350 movq %rax, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) sete %al andb $0x1, %al movzbl %al, %edi leaq 0x84c89(%rip), %rsi # 0xb034c movb $0x0, %al callq 0x2c5a0 movl $0x3, %edi callq 0x2f350 movq %rax, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) setne %al andb $0x1, %al movzbl %al, %edi leaq 0x84c69(%rip), %rsi # 0xb0355 movb $0x0, %al callq 0x2c5a0 movq -0x10(%rbp), %rdi addq $0x14, %rdi leaq 0x850a5(%rip), %rsi # 0xb07a7 movl $0x8, %edx callq 0x26170 cmpl $0x0, %eax sete %al andb $0x1, %al movzbl %al, %edi leaq 0x85080(%rip), %rsi # 0xb079e movb $0x0, %al callq 0x2c5a0 movq -0x10(%rbp), %rax cmpl $0x8, 0x94(%rax) sete %al andb $0x1, %al movzbl %al, %edi leaq 0x84c2f(%rip), %rsi # 0xb036e movb $0x0, %al callq 0x2c5a0 movl $0x270f, %edi # imm = 0x270F callq 0x2f350 movq %rax, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) sete %al andb $0x1, %al movzbl %al, %edi leaq 0x84c14(%rip), %rsi # 0xb037c movb $0x0, %al callq 0x2c5a0 callq 0x2e210 addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
_Z24test_socket_registrationv: push rbp mov rbp, rsp sub rsp, 10h mov edi, 5; unsigned int call _Z17init_socket_classj; init_socket_class(uint) mov [rbp+var_4], eax cmp [rbp+var_4], 0 setz al and al, 1 movzx edi, al lea rsi, aRoomFor5Socket; "room for 5 socket" mov al, 0 call ok lea rdi, aFoo; "FOO" mov esi, 3; unsigned int xor edx, edx; int call _Z21register_socket_classPKcji; register_socket_class(char const*,uint,int) mov [rbp+var_8], eax cmp [rbp+var_8], 1 setz al and al, 1 movzx edi, al lea rsi, aFooRegistered; "foo registered" mov al, 0 call ok lea rdi, aBar; "BAR" mov esi, 3; unsigned int xor edx, edx; int call _Z21register_socket_classPKcji; register_socket_class(char const*,uint,int) mov [rbp+var_8], eax cmp [rbp+var_8], 2 setz al and al, 1 movzx edi, al lea rsi, aBarRegistered; "bar registered" mov al, 0 call ok lea rdi, aFoo; "FOO" mov esi, 3; unsigned int xor edx, edx; int call _Z21register_socket_classPKcji; register_socket_class(char const*,uint,int) mov [rbp+var_8], eax cmp [rbp+var_8], 1 setz al and al, 1 movzx edi, al lea rsi, aFooReRegistere; "foo re registered" mov al, 0 call ok lea rdi, aKey3IsSocket3+9; char * mov esi, 8; unsigned int xor edx, edx; int call _Z21register_socket_classPKcji; register_socket_class(char const*,uint,int) mov [rbp+var_8], eax cmp [rbp+var_8], 3 setz al and al, 1 movzx edi, al lea rsi, aSocket3Registe; "Socket-3 registered" mov al, 0 call ok lea rdi, aSocket4; "Socket-4" mov esi, 8; unsigned int xor edx, edx; int call _Z21register_socket_classPKcji; register_socket_class(char const*,uint,int) mov [rbp+var_8], eax cmp [rbp+var_8], 4 setz al and al, 1 movzx edi, al lea rsi, aSocket4Registe; "Socket-4 registered" mov al, 0 call ok lea rdi, aSocket5; "Socket-5" mov esi, 8; unsigned int xor edx, edx; int call _Z21register_socket_classPKcji; register_socket_class(char const*,uint,int) mov [rbp+var_8], eax cmp [rbp+var_8], 5 setz al and al, 1 movzx edi, al lea rsi, aSocket5Registe; "Socket-5 registered" mov al, 0 call ok lea rax, socket_class_lost cmp qword ptr [rax], 0 setz al and al, 1 movzx edi, al lea rsi, aLostNothing; "lost nothing" mov al, 0 call ok lea rdi, aSocket6; "Socket-6" mov esi, 8; unsigned int xor edx, edx; int call _Z21register_socket_classPKcji; register_socket_class(char const*,uint,int) mov [rbp+var_8], eax cmp [rbp+var_8], 0 setz al and al, 1 movzx edi, al lea rsi, aSocket6NotRegi; "Socket-6 not registered" mov al, 0 call ok lea rax, socket_class_lost cmp qword ptr [rax], 1 setz al and al, 1 movzx edi, al lea rsi, aLost1Socket; "lost 1 socket" mov al, 0 call ok lea rdi, aSocket7; "Socket-7" mov esi, 8; unsigned int xor edx, edx; int call _Z21register_socket_classPKcji; register_socket_class(char const*,uint,int) mov [rbp+var_8], eax cmp [rbp+var_8], 0 setz al and al, 1 movzx edi, al lea rsi, aSocket7NotRegi; "Socket-7 not registered" mov al, 0 call ok lea rax, socket_class_lost cmp qword ptr [rax], 2 setz al and al, 1 movzx edi, al lea rsi, aLost2Socket; "lost 2 socket" mov al, 0 call ok lea rdi, aKey3IsSocket3+9; char * mov esi, 8; unsigned int xor edx, edx; int call _Z21register_socket_classPKcji; register_socket_class(char const*,uint,int) mov [rbp+var_8], eax cmp [rbp+var_8], 3 setz al and al, 1 movzx edi, al lea rsi, aSocket3ReRegis; "Socket-3 re registered" mov al, 0 call ok lea rax, socket_class_lost cmp qword ptr [rax], 2 setz al and al, 1 movzx edi, al lea rsi, aLost2Socket; "lost 2 socket" mov al, 0 call ok lea rdi, aSocket5; "Socket-5" mov esi, 8; unsigned int xor edx, edx; int call _Z21register_socket_classPKcji; register_socket_class(char const*,uint,int) mov [rbp+var_8], eax cmp [rbp+var_8], 5 setz al and al, 1 movzx edi, al lea rsi, aSocket5ReRegis; "Socket-5 re registered" mov al, 0 call ok lea rax, socket_class_lost cmp qword ptr [rax], 2 setz al and al, 1 movzx edi, al lea rsi, aLost2Socket; "lost 2 socket" mov al, 0 call ok xor edi, edi; unsigned int call _Z17find_socket_classj; find_socket_class(uint) mov [rbp+var_10], rax cmp [rbp+var_10], 0 setz al and al, 1 movzx edi, al lea rsi, aNoKey0; "no key 0" mov al, 0 call ok mov edi, 3; unsigned int call _Z17find_socket_classj; find_socket_class(uint) mov [rbp+var_10], rax cmp [rbp+var_10], 0 setnz al and al, 1 movzx edi, al lea rsi, aFoundKey3; "found key 3" mov al, 0 call ok mov rdi, [rbp+var_10] add rdi, 14h lea rsi, aKey3IsSocket3+9; "Socket-3" mov edx, 8 call _strncmp cmp eax, 0 setz al and al, 1 movzx edi, al lea rsi, aKey3IsSocket3; "key 3 is Socket-3" mov al, 0 call ok mov rax, [rbp+var_10] cmp dword ptr [rax+94h], 8 setz al and al, 1 movzx edi, al lea rsi, aNameLength3; "name length 3" mov al, 0 call ok mov edi, 270Fh; unsigned int call _Z17find_socket_classj; find_socket_class(uint) mov [rbp+var_10], rax cmp [rbp+var_10], 0 setz al and al, 1 movzx edi, al lea rsi, aNoKey9999; "no key 9999" mov al, 0 call ok call _Z20cleanup_socket_classv; cleanup_socket_class(void) add rsp, 10h pop rbp retn
long long test_socket_registration(void) { int v0; // edx int v1; // ecx int v2; // r8d int v3; // r9d int v4; // eax int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d int v9; // eax int v10; // edx int v11; // ecx int v12; // r8d int v13; // r9d int v14; // eax int v15; // edx int v16; // ecx int v17; // r8d int v18; // r9d int v19; // eax int v20; // edx int v21; // ecx int v22; // r8d int v23; // r9d int v24; // eax int v25; // edx int v26; // ecx int v27; // r8d int v28; // r9d int v29; // eax int v30; // edx int v31; // ecx int v32; // r8d int v33; // r9d int v34; // edx int v35; // ecx int v36; // r8d int v37; // r9d int v38; // eax int v39; // edx int v40; // ecx int v41; // r8d int v42; // r9d int v43; // edx int v44; // ecx int v45; // r8d int v46; // r9d int v47; // eax int v48; // edx int v49; // ecx int v50; // r8d int v51; // r9d int v52; // edx int v53; // ecx int v54; // r8d int v55; // r9d int v56; // eax int v57; // edx int v58; // ecx int v59; // r8d int v60; // r9d int v61; // edx int v62; // ecx int v63; // r8d int v64; // r9d int v65; // edx int v66; // ecx int v67; // r8d int v68; // r9d int v69; // edx int v70; // ecx int v71; // r8d int v72; // r9d long long socket_class; // rax int v74; // edx int v75; // ecx int v76; // r8d int v77; // r9d int v78; // edx int v79; // ecx int v80; // r8d int v81; // r9d int v82; // eax int v83; // edx int v84; // ecx int v85; // r8d int v86; // r9d int v87; // edx int v88; // ecx int v89; // r8d int v90; // r9d int v91; // edx int v92; // ecx int v93; // r8d int v94; // r9d long long v96; // [rsp+0h] [rbp-10h] long long v97; // [rsp+0h] [rbp-10h] int v98; // [rsp+8h] [rbp-8h] int inited; // [rsp+Ch] [rbp-4h] inited = init_socket_class(5u); ok(inited == 0, (unsigned int)"room for 5 socket", v0, v1, v2, v3); v4 = register_socket_class("FOO", 3u, 0); ok(v4 == 1, (unsigned int)"foo registered", v5, v6, v7, v8); v9 = register_socket_class("BAR", 3u, 0); ok(v9 == 2, (unsigned int)"bar registered", v10, v11, v12, v13); v14 = register_socket_class("FOO", 3u, 0); ok(v14 == 1, (unsigned int)"foo re registered", v15, v16, v17, v18); v19 = register_socket_class("Socket-3", 8u, 0); ok(v19 == 3, (unsigned int)"Socket-3 registered", v20, v21, v22, v23); v24 = register_socket_class("Socket-4", 8u, 0); ok(v24 == 4, (unsigned int)"Socket-4 registered", v25, v26, v27, v28); v29 = register_socket_class("Socket-5", 8u, 0); ok(v29 == 5, (unsigned int)"Socket-5 registered", v30, v31, v32, v33); ok(socket_class_lost == 0, (unsigned int)"lost nothing", v34, v35, v36, v37); v38 = register_socket_class("Socket-6", 8u, 0); ok(v38 == 0, (unsigned int)"Socket-6 not registered", v39, v40, v41, v42); ok(socket_class_lost == 1, (unsigned int)"lost 1 socket", v43, v44, v45, v46); v47 = register_socket_class("Socket-7", 8u, 0); ok(v47 == 0, (unsigned int)"Socket-7 not registered", v48, v49, v50, v51); ok(socket_class_lost == 2, (unsigned int)"lost 2 socket", v52, v53, v54, v55); v56 = register_socket_class("Socket-3", 8u, 0); ok(v56 == 3, (unsigned int)"Socket-3 re registered", v57, v58, v59, v60); ok(socket_class_lost == 2, (unsigned int)"lost 2 socket", v61, v62, v63, v64); v98 = register_socket_class("Socket-5", 8u, 0); ok(v98 == 5, (unsigned int)"Socket-5 re registered", v65, v66, v67, v68); ok(socket_class_lost == 2, (unsigned int)"lost 2 socket", v69, v70, v71, v72); socket_class = find_socket_class(0); ok(socket_class == 0, (unsigned int)"no key 0", v74, v75, v76, v77); v96 = find_socket_class(3u); ok(v96 != 0, (unsigned int)"found key 3", v78, v79, v80, v81); v82 = strncmp(v96 + 20, "Socket-3", 8LL); ok(v82 == 0, (unsigned int)"key 3 is Socket-3", v83, v84, v85, v86); ok(*(_DWORD *)(v96 + 148) == 8, (unsigned int)"name length 3", v87, v88, v89, v90); v97 = find_socket_class(0x270Fu); ok(v97 == 0, (unsigned int)"no key 9999", v91, v92, v93, v94); return cleanup_socket_class(); }
test_socket_registration: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV EDI,0x5 CALL 0x0012e160 MOV dword ptr [RBP + -0x4],EAX CMP dword ptr [RBP + -0x4],0x0 SETZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x1b06b2] MOV AL,0x0 CALL 0x0012c5a0 LEA RDI,[0x1b0071] MOV ESI,0x3 XOR EDX,EDX CALL 0x0012f1f0 MOV dword ptr [RBP + -0x8],EAX CMP dword ptr [RBP + -0x8],0x1 SETZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x1b026e] MOV AL,0x0 CALL 0x0012c5a0 LEA RDI,[0x1b0089] MOV ESI,0x3 XOR EDX,EDX CALL 0x0012f1f0 MOV dword ptr [RBP + -0x8],EAX CMP dword ptr [RBP + -0x8],0x2 SETZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x1b027d] MOV AL,0x0 CALL 0x0012c5a0 LEA RDI,[0x1b0071] MOV ESI,0x3 XOR EDX,EDX CALL 0x0012f1f0 MOV dword ptr [RBP + -0x8],EAX CMP dword ptr [RBP + -0x8],0x1 SETZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x1b028c] MOV AL,0x0 CALL 0x0012c5a0 LEA RDI,[0x1b07a7] MOV ESI,0x8 XOR EDX,EDX CALL 0x0012f1f0 MOV dword ptr [RBP + -0x8],EAX CMP dword ptr [RBP + -0x8],0x3 SETZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x1b06c4] MOV AL,0x0 CALL 0x0012c5a0 LEA RDI,[0x1b06d8] MOV ESI,0x8 XOR EDX,EDX CALL 0x0012f1f0 MOV dword ptr [RBP + -0x8],EAX CMP dword ptr [RBP + -0x8],0x4 SETZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x1b06e1] MOV AL,0x0 CALL 0x0012c5a0 LEA RDI,[0x1b06f5] MOV ESI,0x8 XOR EDX,EDX CALL 0x0012f1f0 MOV dword ptr [RBP + -0x8],EAX CMP dword ptr [RBP + -0x8],0x5 SETZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x1b06fe] MOV AL,0x0 CALL 0x0012c5a0 LEA RAX,[0x4ce3b8] CMP qword ptr [RAX],0x0 SETZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x1b02d3] MOV AL,0x0 CALL 0x0012c5a0 LEA RDI,[0x1b0712] MOV ESI,0x8 XOR EDX,EDX CALL 0x0012f1f0 MOV dword ptr [RBP + -0x8],EAX CMP dword ptr [RBP + -0x8],0x0 SETZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x1b071b] MOV AL,0x0 CALL 0x0012c5a0 LEA RAX,[0x4ce3b8] CMP qword ptr [RAX],0x1 SETZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x1b0733] MOV AL,0x0 CALL 0x0012c5a0 LEA RDI,[0x1b0741] MOV ESI,0x8 XOR EDX,EDX CALL 0x0012f1f0 MOV dword ptr [RBP + -0x8],EAX CMP dword ptr [RBP + -0x8],0x0 SETZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x1b074a] MOV AL,0x0 CALL 0x0012c5a0 LEA RAX,[0x4ce3b8] CMP qword ptr [RAX],0x2 SETZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x1b0762] MOV AL,0x0 CALL 0x0012c5a0 LEA RDI,[0x1b07a7] MOV ESI,0x8 XOR EDX,EDX CALL 0x0012f1f0 MOV dword ptr [RBP + -0x8],EAX CMP dword ptr [RBP + -0x8],0x3 SETZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x1b0770] MOV AL,0x0 CALL 0x0012c5a0 LEA RAX,[0x4ce3b8] CMP qword ptr [RAX],0x2 SETZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x1b0762] MOV AL,0x0 CALL 0x0012c5a0 LEA RDI,[0x1b06f5] MOV ESI,0x8 XOR EDX,EDX CALL 0x0012f1f0 MOV dword ptr [RBP + -0x8],EAX CMP dword ptr [RBP + -0x8],0x5 SETZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x1b0787] MOV AL,0x0 CALL 0x0012c5a0 LEA RAX,[0x4ce3b8] CMP qword ptr [RAX],0x2 SETZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x1b0762] MOV AL,0x0 CALL 0x0012c5a0 XOR EDI,EDI CALL 0x0012f350 MOV qword ptr [RBP + -0x10],RAX CMP qword ptr [RBP + -0x10],0x0 SETZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x1b034c] MOV AL,0x0 CALL 0x0012c5a0 MOV EDI,0x3 CALL 0x0012f350 MOV qword ptr [RBP + -0x10],RAX CMP qword ptr [RBP + -0x10],0x0 SETNZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x1b0355] MOV AL,0x0 CALL 0x0012c5a0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x14 LEA RSI,[0x1b07a7] MOV EDX,0x8 CALL 0x00126170 CMP EAX,0x0 SETZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x1b079e] MOV AL,0x0 CALL 0x0012c5a0 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x94],0x8 SETZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x1b036e] MOV AL,0x0 CALL 0x0012c5a0 MOV EDI,0x270f CALL 0x0012f350 MOV qword ptr [RBP + -0x10],RAX CMP qword ptr [RBP + -0x10],0x0 SETZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x1b037c] MOV AL,0x0 CALL 0x0012c5a0 CALL 0x0012e210 ADD RSP,0x10 POP RBP RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* test_socket_registration() */ void test_socket_registration(void) { int iVar1; long lVar2; iVar1 = init_socket_class(5); ok(iVar1 == 0,"room for 5 socket"); iVar1 = register_socket_class("FOO",3,0); ok(iVar1 == 1,"foo registered"); iVar1 = register_socket_class("BAR",3,0); ok(iVar1 == 2,"bar registered"); iVar1 = register_socket_class("FOO",3,0); ok(iVar1 == 1,"foo re registered"); iVar1 = register_socket_class("Socket-3",8,0); ok(iVar1 == 3,"Socket-3 registered"); iVar1 = register_socket_class("Socket-4",8,0); ok(iVar1 == 4,"Socket-4 registered"); iVar1 = register_socket_class("Socket-5",8,0); ok(iVar1 == 5,"Socket-5 registered"); ok(socket_class_lost == 0,"lost nothing"); iVar1 = register_socket_class("Socket-6",8,0); ok(iVar1 == 0,"Socket-6 not registered"); ok(socket_class_lost == 1,"lost 1 socket"); iVar1 = register_socket_class("Socket-7",8,0); ok(iVar1 == 0,"Socket-7 not registered"); ok(socket_class_lost == 2,"lost 2 socket"); iVar1 = register_socket_class("Socket-3",8,0); ok(iVar1 == 3,"Socket-3 re registered"); ok(socket_class_lost == 2,"lost 2 socket"); iVar1 = register_socket_class("Socket-5",8,0); ok(iVar1 == 5,"Socket-5 re registered"); ok(socket_class_lost == 2,"lost 2 socket"); lVar2 = find_socket_class(0); ok(lVar2 == 0,"no key 0"); lVar2 = find_socket_class(3); ok(lVar2 != 0,"found key 3"); iVar1 = strncmp((char *)(lVar2 + 0x14),"Socket-3",8); ok(iVar1 == 0,"key 3 is Socket-3"); ok(*(int *)(lVar2 + 0x94) == 8,"name length 3"); lVar2 = find_socket_class(9999); ok(lVar2 == 0,"no key 9999"); cleanup_socket_class(); return; }
40,682
test_socket_registration()
eloqsql/storage/perfschema/unittest/pfs_instr_class-t.cc
void test_socket_registration() { int rc; PFS_socket_key key; PFS_socket_class *socket; rc= init_socket_class(5); ok(rc == 0, "room for 5 socket"); key= register_socket_class("FOO", 3, 0); ok(key == 1, "foo registered"); key= register_socket_class("BAR", 3, 0); ok(key == 2, "bar registered"); key= register_socket_class("FOO", 3, 0); ok(key == 1, "foo re registered"); key= register_socket_class("Socket-3", 8, 0); ok(key == 3, "Socket-3 registered"); key= register_socket_class("Socket-4", 8, 0); ok(key == 4, "Socket-4 registered"); key= register_socket_class("Socket-5", 8, 0); ok(key == 5, "Socket-5 registered"); ok(socket_class_lost == 0, "lost nothing"); key= register_socket_class("Socket-6", 8, 0); ok(key == 0, "Socket-6 not registered"); ok(socket_class_lost == 1, "lost 1 socket"); key= register_socket_class("Socket-7", 8, 0); ok(key == 0, "Socket-7 not registered"); ok(socket_class_lost == 2, "lost 2 socket"); key= register_socket_class("Socket-3", 8, 0); ok(key == 3, "Socket-3 re registered"); ok(socket_class_lost == 2, "lost 2 socket"); key= register_socket_class("Socket-5", 8, 0); ok(key == 5, "Socket-5 re registered"); ok(socket_class_lost == 2, "lost 2 socket"); socket= find_socket_class(0); ok(socket == NULL, "no key 0"); socket= find_socket_class(3); ok(socket != NULL, "found key 3"); ok(strncmp(socket->m_name, "Socket-3", 8) == 0, "key 3 is Socket-3"); ok(socket->m_name_length == 8, "name length 3"); socket= find_socket_class(9999); ok(socket == NULL, "no key 9999"); cleanup_socket_class(); }
O3
cpp
test_socket_registration(): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl $0x5, %edi callq 0x268cd xorl %edi, %edi testl %eax, %eax sete %dil leaq 0x4f590(%rip), %rsi # 0x7d6b2 xorl %eax, %eax callq 0x2ef93 leaq 0x4ef41(%rip), %rbx # 0x7d071 movq %rbx, %rdi movl $0x3, %esi xorl %edx, %edx callq 0x30df3 xorl %edi, %edi cmpl $0x1, %eax sete %dil leaq 0x4f11f(%rip), %rsi # 0x7d26e xorl %eax, %eax callq 0x2ef93 leaq 0x4ef2c(%rip), %rdi # 0x7d089 movl $0x3, %esi xorl %edx, %edx callq 0x30df3 xorl %edi, %edi cmpl $0x2, %eax sete %dil leaq 0x4f104(%rip), %rsi # 0x7d27d xorl %eax, %eax callq 0x2ef93 movq %rbx, %rdi movl $0x3, %esi xorl %edx, %edx callq 0x30df3 xorl %edi, %edi cmpl $0x1, %eax sete %dil leaq 0x4f0ed(%rip), %rsi # 0x7d28c xorl %eax, %eax callq 0x2ef93 leaq 0x4f5fa(%rip), %rbx # 0x7d7a7 movq %rbx, %rdi movl $0x8, %esi xorl %edx, %edx callq 0x30df3 xorl %edi, %edi cmpl $0x3, %eax sete %dil leaq 0x4f4f8(%rip), %rsi # 0x7d6c4 xorl %eax, %eax callq 0x2ef93 leaq 0x4f4fe(%rip), %rdi # 0x7d6d8 movl $0x8, %esi xorl %edx, %edx callq 0x30df3 xorl %edi, %edi cmpl $0x4, %eax sete %dil leaq 0x4f4eb(%rip), %rsi # 0x7d6e1 xorl %eax, %eax callq 0x2ef93 leaq 0x4f4f1(%rip), %r14 # 0x7d6f5 movq %r14, %rdi movl $0x8, %esi xorl %edx, %edx callq 0x30df3 xorl %edi, %edi cmpl $0x5, %eax sete %dil leaq 0x4f4db(%rip), %rsi # 0x7d6fe xorl %eax, %eax callq 0x2ef93 leaq 0x363207(%rip), %r12 # 0x391438 xorl %edi, %edi cmpq $0x0, (%r12) sete %dil leaq 0x4f090(%rip), %rsi # 0x7d2d3 xorl %eax, %eax callq 0x2ef93 leaq 0x4f4c1(%rip), %rdi # 0x7d712 movl $0x8, %esi xorl %edx, %edx callq 0x30df3 xorl %edi, %edi testl %eax, %eax sete %dil leaq 0x4f4af(%rip), %rsi # 0x7d71b xorl %eax, %eax callq 0x2ef93 xorl %edi, %edi cmpq $0x1, (%r12) sete %dil leaq 0x4f4ae(%rip), %rsi # 0x7d733 xorl %eax, %eax callq 0x2ef93 leaq 0x4f4ae(%rip), %rdi # 0x7d741 movl $0x8, %esi xorl %edx, %edx callq 0x30df3 xorl %edi, %edi testl %eax, %eax sete %dil leaq 0x4f49c(%rip), %rsi # 0x7d74a xorl %eax, %eax callq 0x2ef93 xorl %edi, %edi cmpq $0x2, (%r12) sete %dil leaq 0x4f49b(%rip), %r15 # 0x7d762 movq %r15, %rsi xorl %eax, %eax callq 0x2ef93 movq %rbx, %rdi movl $0x8, %esi xorl %edx, %edx callq 0x30df3 xorl %edi, %edi cmpl $0x3, %eax sete %dil leaq 0x4f480(%rip), %rsi # 0x7d770 xorl %eax, %eax callq 0x2ef93 xorl %edi, %edi cmpq $0x2, (%r12) sete %dil movq %r15, %rsi xorl %eax, %eax callq 0x2ef93 movq %r14, %rdi movl $0x8, %esi xorl %edx, %edx callq 0x30df3 xorl %edi, %edi cmpl $0x5, %eax sete %dil leaq 0x4f45c(%rip), %rsi # 0x7d787 xorl %eax, %eax callq 0x2ef93 xorl %edi, %edi cmpq $0x2, (%r12) sete %dil movq %r15, %rsi xorl %eax, %eax callq 0x2ef93 xorl %edi, %edi callq 0x30f43 xorl %edi, %edi testq %rax, %rax sete %dil leaq 0x4efee(%rip), %rsi # 0x7d34c xorl %eax, %eax callq 0x2ef93 movl $0x3, %edi callq 0x30f43 movq %rax, %r14 xorl %edi, %edi testq %rax, %rax setne %dil leaq 0x4efd3(%rip), %rsi # 0x7d355 xorl %eax, %eax callq 0x2ef93 leaq 0x14(%r14), %rdi movl $0x8, %edx movq %rbx, %rsi callq 0x26170 xorl %edi, %edi testl %eax, %eax sete %dil leaq 0x4f3f5(%rip), %rsi # 0x7d79e xorl %eax, %eax callq 0x2ef93 xorl %edi, %edi cmpl $0x8, 0x94(%r14) sete %dil leaq 0x4efa9(%rip), %rsi # 0x7d36e xorl %eax, %eax callq 0x2ef93 movl $0x270f, %edi # imm = 0x270F callq 0x30f43 xorl %edi, %edi testq %rax, %rax sete %dil leaq 0x4ef96(%rip), %rsi # 0x7d37c xorl %eax, %eax callq 0x2ef93 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x30220
_Z24test_socket_registrationv: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov edi, 5; unsigned int call _Z17init_socket_classj; init_socket_class(uint) xor edi, edi test eax, eax setz dil lea rsi, aRoomFor5Socket; "room for 5 socket" xor eax, eax call ok lea rbx, aFoo; "FOO" mov rdi, rbx; char * mov esi, 3; unsigned int xor edx, edx; int call _Z21register_socket_classPKcji; register_socket_class(char const*,uint,int) xor edi, edi cmp eax, 1 setz dil lea rsi, aFooRegistered; "foo registered" xor eax, eax call ok lea rdi, aBar; "BAR" mov esi, 3; unsigned int xor edx, edx; int call _Z21register_socket_classPKcji; register_socket_class(char const*,uint,int) xor edi, edi cmp eax, 2 setz dil lea rsi, aBarRegistered; "bar registered" xor eax, eax call ok mov rdi, rbx; char * mov esi, 3; unsigned int xor edx, edx; int call _Z21register_socket_classPKcji; register_socket_class(char const*,uint,int) xor edi, edi cmp eax, 1 setz dil lea rsi, aFooReRegistere; "foo re registered" xor eax, eax call ok lea rbx, aKey3IsSocket3+9; "Socket-3" mov rdi, rbx; char * mov esi, 8; unsigned int xor edx, edx; int call _Z21register_socket_classPKcji; register_socket_class(char const*,uint,int) xor edi, edi cmp eax, 3 setz dil lea rsi, aSocket3Registe; "Socket-3 registered" xor eax, eax call ok lea rdi, aSocket4; "Socket-4" mov esi, 8; unsigned int xor edx, edx; int call _Z21register_socket_classPKcji; register_socket_class(char const*,uint,int) xor edi, edi cmp eax, 4 setz dil lea rsi, aSocket4Registe; "Socket-4 registered" xor eax, eax call ok lea r14, aSocket5; "Socket-5" mov rdi, r14; char * mov esi, 8; unsigned int xor edx, edx; int call _Z21register_socket_classPKcji; register_socket_class(char const*,uint,int) xor edi, edi cmp eax, 5 setz dil lea rsi, aSocket5Registe; "Socket-5 registered" xor eax, eax call ok lea r12, socket_class_lost xor edi, edi cmp qword ptr [r12], 0 setz dil lea rsi, aLostNothing; "lost nothing" xor eax, eax call ok lea rdi, aSocket6; "Socket-6" mov esi, 8; unsigned int xor edx, edx; int call _Z21register_socket_classPKcji; register_socket_class(char const*,uint,int) xor edi, edi test eax, eax setz dil lea rsi, aSocket6NotRegi; "Socket-6 not registered" xor eax, eax call ok xor edi, edi cmp qword ptr [r12], 1 setz dil lea rsi, aLost1Socket; "lost 1 socket" xor eax, eax call ok lea rdi, aSocket7; "Socket-7" mov esi, 8; unsigned int xor edx, edx; int call _Z21register_socket_classPKcji; register_socket_class(char const*,uint,int) xor edi, edi test eax, eax setz dil lea rsi, aSocket7NotRegi; "Socket-7 not registered" xor eax, eax call ok xor edi, edi cmp qword ptr [r12], 2 setz dil lea r15, aLost2Socket; "lost 2 socket" mov rsi, r15 xor eax, eax call ok mov rdi, rbx; char * mov esi, 8; unsigned int xor edx, edx; int call _Z21register_socket_classPKcji; register_socket_class(char const*,uint,int) xor edi, edi cmp eax, 3 setz dil lea rsi, aSocket3ReRegis; "Socket-3 re registered" xor eax, eax call ok xor edi, edi cmp qword ptr [r12], 2 setz dil mov rsi, r15 xor eax, eax call ok mov rdi, r14; char * mov esi, 8; unsigned int xor edx, edx; int call _Z21register_socket_classPKcji; register_socket_class(char const*,uint,int) xor edi, edi cmp eax, 5 setz dil lea rsi, aSocket5ReRegis; "Socket-5 re registered" xor eax, eax call ok xor edi, edi cmp qword ptr [r12], 2 setz dil mov rsi, r15 xor eax, eax call ok xor edi, edi; unsigned int call _Z17find_socket_classj; find_socket_class(uint) xor edi, edi test rax, rax setz dil lea rsi, aNoKey0; "no key 0" xor eax, eax call ok mov edi, 3; unsigned int call _Z17find_socket_classj; find_socket_class(uint) mov r14, rax xor edi, edi test rax, rax setnz dil lea rsi, aFoundKey3; "found key 3" xor eax, eax call ok lea rdi, [r14+14h] mov edx, 8 mov rsi, rbx call _strncmp xor edi, edi test eax, eax setz dil lea rsi, aKey3IsSocket3; "key 3 is Socket-3" xor eax, eax call ok xor edi, edi cmp dword ptr [r14+94h], 8 setz dil lea rsi, aNameLength3; "name length 3" xor eax, eax call ok mov edi, 270Fh; unsigned int call _Z17find_socket_classj; find_socket_class(uint) xor edi, edi test rax, rax setz dil lea rsi, aNoKey9999; "no key 9999" xor eax, eax call ok pop rbx pop r12 pop r14 pop r15 pop rbp jmp _Z20cleanup_socket_classv; cleanup_socket_class(void)
long long test_socket_registration(void) { int inited; // eax int v1; // edx int v2; // ecx int v3; // r8d int v4; // r9d int v5; // eax int v6; // edx int v7; // ecx int v8; // r8d int v9; // r9d int v10; // eax int v11; // edx int v12; // ecx int v13; // r8d int v14; // r9d int v15; // eax int v16; // edx int v17; // ecx int v18; // r8d int v19; // r9d int v20; // eax int v21; // edx int v22; // ecx int v23; // r8d int v24; // r9d int v25; // eax int v26; // edx int v27; // ecx int v28; // r8d int v29; // r9d int v30; // eax int v31; // edx int v32; // ecx int v33; // r8d int v34; // r9d int v35; // edx int v36; // ecx int v37; // r8d int v38; // r9d int v39; // eax int v40; // edx int v41; // ecx int v42; // r8d int v43; // r9d int v44; // edx int v45; // ecx int v46; // r8d int v47; // r9d int v48; // eax int v49; // edx int v50; // ecx int v51; // r8d int v52; // r9d int v53; // edx int v54; // ecx int v55; // r8d int v56; // r9d int v57; // eax int v58; // edx int v59; // ecx int v60; // r8d int v61; // r9d int v62; // edx int v63; // ecx int v64; // r8d int v65; // r9d int v66; // eax int v67; // edx int v68; // ecx int v69; // r8d int v70; // r9d int v71; // edx int v72; // ecx int v73; // r8d int v74; // r9d long long socket_class; // rax int v76; // edx int v77; // ecx int v78; // r8d int v79; // r9d long long v80; // r14 int v81; // edx int v82; // ecx int v83; // r8d int v84; // r9d int v85; // eax int v86; // edx int v87; // ecx int v88; // r8d int v89; // r9d int v90; // edx int v91; // ecx int v92; // r8d int v93; // r9d long long v94; // rax int v95; // edx int v96; // ecx int v97; // r8d int v98; // r9d inited = init_socket_class(5u); ok(inited == 0, (unsigned int)"room for 5 socket", v1, v2, v3, v4); v5 = register_socket_class("FOO", 3u, 0); ok(v5 == 1, (unsigned int)"foo registered", v6, v7, v8, v9); v10 = register_socket_class("BAR", 3u, 0); ok(v10 == 2, (unsigned int)"bar registered", v11, v12, v13, v14); v15 = register_socket_class("FOO", 3u, 0); ok(v15 == 1, (unsigned int)"foo re registered", v16, v17, v18, v19); v20 = register_socket_class("Socket-3", 8u, 0); ok(v20 == 3, (unsigned int)"Socket-3 registered", v21, v22, v23, v24); v25 = register_socket_class("Socket-4", 8u, 0); ok(v25 == 4, (unsigned int)"Socket-4 registered", v26, v27, v28, v29); v30 = register_socket_class("Socket-5", 8u, 0); ok(v30 == 5, (unsigned int)"Socket-5 registered", v31, v32, v33, v34); ok(socket_class_lost == 0, (unsigned int)"lost nothing", v35, v36, v37, v38); v39 = register_socket_class("Socket-6", 8u, 0); ok(v39 == 0, (unsigned int)"Socket-6 not registered", v40, v41, v42, v43); ok(socket_class_lost == 1, (unsigned int)"lost 1 socket", v44, v45, v46, v47); v48 = register_socket_class("Socket-7", 8u, 0); ok(v48 == 0, (unsigned int)"Socket-7 not registered", v49, v50, v51, v52); ok(socket_class_lost == 2, (unsigned int)"lost 2 socket", v53, v54, v55, v56); v57 = register_socket_class("Socket-3", 8u, 0); ok(v57 == 3, (unsigned int)"Socket-3 re registered", v58, v59, v60, v61); ok(socket_class_lost == 2, (unsigned int)"lost 2 socket", v62, v63, v64, v65); v66 = register_socket_class("Socket-5", 8u, 0); ok(v66 == 5, (unsigned int)"Socket-5 re registered", v67, v68, v69, v70); ok(socket_class_lost == 2, (unsigned int)"lost 2 socket", v71, v72, v73, v74); socket_class = find_socket_class(0); ok(socket_class == 0, (unsigned int)"no key 0", v76, v77, v78, v79); v80 = find_socket_class(3u); ok(v80 != 0, (unsigned int)"found key 3", v81, v82, v83, v84); v85 = strncmp(v80 + 20, "Socket-3", 8LL); ok(v85 == 0, (unsigned int)"key 3 is Socket-3", v86, v87, v88, v89); ok(*(_DWORD *)(v80 + 148) == 8, (unsigned int)"name length 3", v90, v91, v92, v93); v94 = find_socket_class(0x270Fu); ok(v94 == 0, (unsigned int)"no key 9999", v95, v96, v97, v98); return cleanup_socket_class(); }
test_socket_registration: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV EDI,0x5 CALL 0x001268cd XOR EDI,EDI TEST EAX,EAX SETZ DIL LEA RSI,[0x17d6b2] XOR EAX,EAX CALL 0x0012ef93 LEA RBX,[0x17d071] MOV RDI,RBX MOV ESI,0x3 XOR EDX,EDX CALL 0x00130df3 XOR EDI,EDI CMP EAX,0x1 SETZ DIL LEA RSI,[0x17d26e] XOR EAX,EAX CALL 0x0012ef93 LEA RDI,[0x17d089] MOV ESI,0x3 XOR EDX,EDX CALL 0x00130df3 XOR EDI,EDI CMP EAX,0x2 SETZ DIL LEA RSI,[0x17d27d] XOR EAX,EAX CALL 0x0012ef93 MOV RDI,RBX MOV ESI,0x3 XOR EDX,EDX CALL 0x00130df3 XOR EDI,EDI CMP EAX,0x1 SETZ DIL LEA RSI,[0x17d28c] XOR EAX,EAX CALL 0x0012ef93 LEA RBX,[0x17d7a7] MOV RDI,RBX MOV ESI,0x8 XOR EDX,EDX CALL 0x00130df3 XOR EDI,EDI CMP EAX,0x3 SETZ DIL LEA RSI,[0x17d6c4] XOR EAX,EAX CALL 0x0012ef93 LEA RDI,[0x17d6d8] MOV ESI,0x8 XOR EDX,EDX CALL 0x00130df3 XOR EDI,EDI CMP EAX,0x4 SETZ DIL LEA RSI,[0x17d6e1] XOR EAX,EAX CALL 0x0012ef93 LEA R14,[0x17d6f5] MOV RDI,R14 MOV ESI,0x8 XOR EDX,EDX CALL 0x00130df3 XOR EDI,EDI CMP EAX,0x5 SETZ DIL LEA RSI,[0x17d6fe] XOR EAX,EAX CALL 0x0012ef93 LEA R12,[0x491438] XOR EDI,EDI CMP qword ptr [R12],0x0 SETZ DIL LEA RSI,[0x17d2d3] XOR EAX,EAX CALL 0x0012ef93 LEA RDI,[0x17d712] MOV ESI,0x8 XOR EDX,EDX CALL 0x00130df3 XOR EDI,EDI TEST EAX,EAX SETZ DIL LEA RSI,[0x17d71b] XOR EAX,EAX CALL 0x0012ef93 XOR EDI,EDI CMP qword ptr [R12],0x1 SETZ DIL LEA RSI,[0x17d733] XOR EAX,EAX CALL 0x0012ef93 LEA RDI,[0x17d741] MOV ESI,0x8 XOR EDX,EDX CALL 0x00130df3 XOR EDI,EDI TEST EAX,EAX SETZ DIL LEA RSI,[0x17d74a] XOR EAX,EAX CALL 0x0012ef93 XOR EDI,EDI CMP qword ptr [R12],0x2 SETZ DIL LEA R15,[0x17d762] MOV RSI,R15 XOR EAX,EAX CALL 0x0012ef93 MOV RDI,RBX MOV ESI,0x8 XOR EDX,EDX CALL 0x00130df3 XOR EDI,EDI CMP EAX,0x3 SETZ DIL LEA RSI,[0x17d770] XOR EAX,EAX CALL 0x0012ef93 XOR EDI,EDI CMP qword ptr [R12],0x2 SETZ DIL MOV RSI,R15 XOR EAX,EAX CALL 0x0012ef93 MOV RDI,R14 MOV ESI,0x8 XOR EDX,EDX CALL 0x00130df3 XOR EDI,EDI CMP EAX,0x5 SETZ DIL LEA RSI,[0x17d787] XOR EAX,EAX CALL 0x0012ef93 XOR EDI,EDI CMP qword ptr [R12],0x2 SETZ DIL MOV RSI,R15 XOR EAX,EAX CALL 0x0012ef93 XOR EDI,EDI CALL 0x00130f43 XOR EDI,EDI TEST RAX,RAX SETZ DIL LEA RSI,[0x17d34c] XOR EAX,EAX CALL 0x0012ef93 MOV EDI,0x3 CALL 0x00130f43 MOV R14,RAX XOR EDI,EDI TEST RAX,RAX SETNZ DIL LEA RSI,[0x17d355] XOR EAX,EAX CALL 0x0012ef93 LEA RDI,[R14 + 0x14] MOV EDX,0x8 MOV RSI,RBX CALL 0x00126170 XOR EDI,EDI TEST EAX,EAX SETZ DIL LEA RSI,[0x17d79e] XOR EAX,EAX CALL 0x0012ef93 XOR EDI,EDI CMP dword ptr [R14 + 0x94],0x8 SETZ DIL LEA RSI,[0x17d36e] XOR EAX,EAX CALL 0x0012ef93 MOV EDI,0x270f CALL 0x00130f43 XOR EDI,EDI TEST RAX,RAX SETZ DIL LEA RSI,[0x17d37c] XOR EAX,EAX CALL 0x0012ef93 POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x00130220
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* test_socket_registration() */ void test_socket_registration(void) { int iVar1; long lVar2; iVar1 = init_socket_class(5); ok(iVar1 == 0,"room for 5 socket"); iVar1 = register_socket_class("FOO",3,0); ok(iVar1 == 1,"foo registered"); iVar1 = register_socket_class("BAR",3,0); ok(iVar1 == 2,"bar registered"); iVar1 = register_socket_class("FOO",3,0); ok(iVar1 == 1,"foo re registered"); iVar1 = register_socket_class("Socket-3",8,0); ok(iVar1 == 3,"Socket-3 registered"); iVar1 = register_socket_class("Socket-4",8,0); ok(iVar1 == 4,"Socket-4 registered"); iVar1 = register_socket_class("Socket-5",8,0); ok(iVar1 == 5,"Socket-5 registered"); ok(socket_class_lost == 0,"lost nothing"); iVar1 = register_socket_class("Socket-6",8,0); ok(iVar1 == 0,"Socket-6 not registered"); ok(socket_class_lost == 1,"lost 1 socket"); iVar1 = register_socket_class("Socket-7",8,0); ok(iVar1 == 0,"Socket-7 not registered"); ok(socket_class_lost == 2,"lost 2 socket"); iVar1 = register_socket_class("Socket-3",8,0); ok(iVar1 == 3,"Socket-3 re registered"); ok(socket_class_lost == 2,"lost 2 socket"); iVar1 = register_socket_class("Socket-5",8,0); ok(iVar1 == 5,"Socket-5 re registered"); ok(socket_class_lost == 2,"lost 2 socket"); lVar2 = find_socket_class(0); ok(lVar2 == 0,"no key 0"); lVar2 = find_socket_class(3); ok(lVar2 != 0,"found key 3"); iVar1 = strncmp((char *)(lVar2 + 0x14),"Socket-3",8); ok(iVar1 == 0,"key 3 is Socket-3"); ok(*(int *)(lVar2 + 0x94) == 8,"name length 3"); lVar2 = find_socket_class(9999); ok(lVar2 == 0,"no key 9999"); cleanup_socket_class(); return; }
40,683
mi_write_keypage
eloqsql/storage/myisam/mi_page.c
int _mi_write_keypage(register MI_INFO *info, register MI_KEYDEF *keyinfo, my_off_t page, int level, uchar *buff) { reg3 uint length; DBUG_ENTER("_mi_write_keypage"); #ifndef FAST /* Safety check */ if (page < info->s->base.keystart || page+keyinfo->block_length > info->state->key_file_length || (page & (MI_MIN_KEY_BLOCK_LENGTH-1))) { DBUG_PRINT("error",("Trying to write inside key status region: key_start: %lu length: %lu page: %lu", (long) info->s->base.keystart, (long) info->state->key_file_length, (long) page)); my_errno=EINVAL; DBUG_RETURN((-1)); } DBUG_PRINT("page",("write page at: %lu",(long) page)); DBUG_DUMP("buff",(uchar*) buff,mi_getint(buff)); #endif if ((length=keyinfo->block_length) > IO_SIZE*2 && info->state->key_file_length != page+length) length= ((mi_getint(buff)+IO_SIZE-1) & (uint) ~(IO_SIZE-1)); DBUG_RETURN((key_cache_write(info->s->key_cache, info->s->kfile, &info->s->dirty_part_map, page, level, (uchar*) buff, length, (uint) keyinfo->block_length, (int) ((info->lock_type != F_UNLCK) || info->s->delay_key_write)))); }
O3
c
mi_write_keypage: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq (%rdi), %r11 cmpq %rdx, 0x108(%r11) jbe 0x838fc callq 0xa1672 movl $0x16, (%rax) movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x839a2 movq %r8, %r9 movl %ecx, %r8d movq %rdx, %rcx testl $0x3ff, %ecx # imm = 0x3FF jne 0x838e7 movzwl 0xe(%rsi), %r10d leaq (%r10,%rcx), %rax movq 0x8(%rdi), %rdx movq 0x20(%rdx), %rdx cmpq %rdx, %rax ja 0x838e7 cmpl $0x2001, %r10d # imm = 0x2001 setb %sil cmpq %rax, %rdx sete %al orb %sil, %al movl %r10d, %ebx jne 0x8395a movzbl 0x1(%r9), %eax movzbl (%r9), %edx andl $0x7f, %edx shll $0x8, %edx leal (%rax,%rdx), %ebx addl $0xfff, %ebx # imm = 0xFFF andl $0xf000, %ebx # imm = 0xF000 movq 0x278(%r11), %rax movl 0x350(%r11), %esi leaq 0x280(%r11), %rdx movl $0x1, %r14d cmpl $0x2, 0x1f4(%rdi) jne 0x8398d xorl %r14d, %r14d cmpb $0x0, 0x383(%r11) setne %r14b subq $0x8, %rsp movq %rax, %rdi pushq %r14 pushq %r10 pushq %rbx callq 0x9821e addq $0x20, %rsp popq %rbx popq %r14 popq %rbp retq
_mi_write_keypage: push rbp mov rbp, rsp push r14 push rbx mov r11, [rdi] cmp [r11+108h], rdx jbe short loc_838FC loc_838E7: call _my_thread_var mov dword ptr [rax], 16h mov eax, 0FFFFFFFFh jmp loc_839A2 loc_838FC: mov r9, r8 mov r8d, ecx mov rcx, rdx test ecx, 3FFh jnz short loc_838E7 movzx r10d, word ptr [rsi+0Eh] lea rax, [r10+rcx] mov rdx, [rdi+8] mov rdx, [rdx+20h] cmp rax, rdx ja short loc_838E7 cmp r10d, 2001h setb sil cmp rdx, rax setz al or al, sil mov ebx, r10d jnz short loc_8395A movzx eax, byte ptr [r9+1] movzx edx, byte ptr [r9] and edx, 7Fh shl edx, 8 lea ebx, [rax+rdx] add ebx, 0FFFh and ebx, 0F000h loc_8395A: mov rax, [r11+278h] mov esi, [r11+350h] lea rdx, [r11+280h] mov r14d, 1 cmp dword ptr [rdi+1F4h], 2 jnz short loc_8398D xor r14d, r14d cmp byte ptr [r11+383h], 0 setnz r14b loc_8398D: sub rsp, 8 mov rdi, rax push r14 push r10 push rbx call key_cache_write add rsp, 20h loc_839A2: pop rbx pop r14 pop rbp retn
long long mi_write_keypage(long long *a1, long long a2, unsigned long long a3, unsigned int a4, _BYTE *a5) { long long v5; // r11 long long v8; // r8 long long v10; // r10 long long v11; // rax unsigned long long v12; // rdx long long v13; // rbx _BOOL8 v14; // r14 v5 = *a1; if ( *(_QWORD *)(*a1 + 264) > a3 || (v8 = a4, (a3 & 0x3FF) != 0) || (v10 = *(unsigned __int16 *)(a2 + 14), v11 = v10 + a3, v12 = *(_QWORD *)(a1[1] + 32), v10 + a3 > v12) ) { *(_DWORD *)my_thread_var(a1, (const char *)a2) = 22; return 0xFFFFFFFFLL; } else { v13 = *(unsigned __int16 *)(a2 + 14); if ( (unsigned int)v10 >= 0x2001 && v12 != v11 ) v13 = (unsigned __int16)((unsigned __int8)a5[1] + ((*a5 & 0x7F) << 8) + 4095) & 0xF000; v14 = 1LL; if ( *((_DWORD *)a1 + 125) == 2 ) v14 = *(_BYTE *)(v5 + 899) != 0; return key_cache_write(*(_QWORD *)(v5 + 632), *(unsigned int *)(v5 + 848), v5 + 640, a3, v8, a5, v13, v10, v14); } }
_mi_write_keypage: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV R11,qword ptr [RDI] CMP qword ptr [R11 + 0x108],RDX JBE 0x001838fc LAB_001838e7: CALL 0x001a1672 MOV dword ptr [RAX],0x16 MOV EAX,0xffffffff JMP 0x001839a2 LAB_001838fc: MOV R9,R8 MOV R8D,ECX MOV RCX,RDX TEST ECX,0x3ff JNZ 0x001838e7 MOVZX R10D,word ptr [RSI + 0xe] LEA RAX,[R10 + RCX*0x1] MOV RDX,qword ptr [RDI + 0x8] MOV RDX,qword ptr [RDX + 0x20] CMP RAX,RDX JA 0x001838e7 CMP R10D,0x2001 SETC SIL CMP RDX,RAX SETZ AL OR AL,SIL MOV EBX,R10D JNZ 0x0018395a MOVZX EAX,byte ptr [R9 + 0x1] MOVZX EDX,byte ptr [R9] AND EDX,0x7f SHL EDX,0x8 LEA EBX,[RAX + RDX*0x1] ADD EBX,0xfff AND EBX,0xf000 LAB_0018395a: MOV RAX,qword ptr [R11 + 0x278] MOV ESI,dword ptr [R11 + 0x350] LEA RDX,[R11 + 0x280] MOV R14D,0x1 CMP dword ptr [RDI + 0x1f4],0x2 JNZ 0x0018398d XOR R14D,R14D CMP byte ptr [R11 + 0x383],0x0 SETNZ R14B LAB_0018398d: SUB RSP,0x8 MOV RDI,RAX PUSH R14 PUSH R10 PUSH RBX CALL 0x0019821e ADD RSP,0x20 LAB_001839a2: POP RBX POP R14 POP RBP RET
int8 _mi_write_keypage(long *param_1,long param_2,ulong param_3,int4 param_4,byte *param_5) { ulong uVar1; long lVar2; int4 *puVar3; int8 uVar4; ushort uVar5; ulong uVar6; bool bVar7; lVar2 = *param_1; if ((*(ulong *)(lVar2 + 0x108) <= param_3) && ((param_3 & 0x3ff) == 0)) { uVar5 = *(ushort *)(param_2 + 0xe); uVar6 = (ulong)uVar5; uVar1 = uVar6 + param_3; if (uVar1 <= *(ulong *)(param_1[1] + 0x20)) { if (*(ulong *)(param_1[1] + 0x20) != uVar1 && 0x2000 < uVar5) { uVar5 = (ushort)param_5[1] + (*param_5 & 0x7f) * 0x100 + 0xfff & 0xf000; } bVar7 = true; if (*(int *)((long)param_1 + 500) == 2) { bVar7 = *(char *)(lVar2 + 899) != '\0'; } uVar4 = key_cache_write(*(int8 *)(lVar2 + 0x278),*(int4 *)(lVar2 + 0x350), lVar2 + 0x280,param_3,param_4,param_5,uVar5,uVar6,bVar7); return uVar4; } } puVar3 = (int4 *)_my_thread_var(); *puVar3 = 0x16; return 0xffffffff; }
40,684
mysql_set_local_infile_handler
eloqsql/libmariadb/libmariadb/ma_loaddata.c
void STDCALL mysql_set_local_infile_handler(MYSQL *conn, int (*local_infile_init)(void **, const char *, void *), int (*local_infile_read)(void *, char *, uint), void (*local_infile_end)(void *), int (*local_infile_error)(void *, char *, uint), void *userdata) { conn->options.local_infile_init= local_infile_init; conn->options.local_infile_read= local_infile_read; conn->options.local_infile_end= local_infile_end; conn->options.local_infile_error= local_infile_error; conn->options.local_infile_userdata = userdata; return; }
O0
c
mysql_set_local_infile_handler: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x458(%rax) movq -0x18(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x460(%rax) movq -0x20(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x468(%rax) movq -0x28(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x470(%rax) movq -0x30(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x478(%rax) popq %rbp retq nopl (%rax)
mysql_set_local_infile_handler: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov [rax+458h], rcx mov rcx, [rbp+var_18] mov rax, [rbp+var_8] mov [rax+460h], rcx mov rcx, [rbp+var_20] mov rax, [rbp+var_8] mov [rax+468h], rcx mov rcx, [rbp+var_28] mov rax, [rbp+var_8] mov [rax+470h], rcx mov rcx, [rbp+var_30] mov rax, [rbp+var_8] mov [rax+478h], rcx pop rbp retn
_QWORD * mysql_set_local_infile_handler( _QWORD *a1, long long a2, long long a3, long long a4, long long a5, long long a6) { _QWORD *result; // rax a1[139] = a2; a1[140] = a3; a1[141] = a4; a1[142] = a5; result = a1; a1[143] = a6; return result; }
mysql_set_local_infile_handler: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x458],RCX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x460],RCX MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x468],RCX MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x470],RCX MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x478],RCX POP RBP RET
void mysql_set_local_infile_handler (long param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6) { *(int8 *)(param_1 + 0x458) = param_2; *(int8 *)(param_1 + 0x460) = param_3; *(int8 *)(param_1 + 0x468) = param_4; *(int8 *)(param_1 + 0x470) = param_5; *(int8 *)(param_1 + 0x478) = param_6; return; }
40,685
mysql_stmt_store_result_cont
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_stmt_store_result_cont(int *ret, MYSQL_STMT *stmt, int ready_status) { MK_ASYNC_CONT_BODY( stmt->mysql, 1, r_int) }
O3
c
mysql_stmt_store_result_cont: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq 0x38(%rsi), %rax movq 0x480(%rax), %rcx movq 0x28(%rcx), %r15 cmpb $0x0, 0x15(%r15) je 0x89a99 movb $0x1, 0x14(%r15) movl %edx, 0x4(%r15) leaq 0x38(%r15), %rdi callq 0x8aefb movb $0x0, 0x14(%r15) testl %eax, %eax jle 0x89aff movl (%r15), %r15d jmp 0x89b78 movl $0x7de, 0x90(%rax) # imm = 0x7DE movl $0x297, %edi # imm = 0x297 addq 0x38(%r14), %rdi leaq 0x35b46d(%rip), %rax # 0x3e4f20 movq (%rax), %rsi movl $0x5, %edx callq 0x5f180 movq 0x38(%r14), %rax xorl %r15d, %r15d movb %r15b, 0x29c(%rax) movl $0x97, %edi addq 0x38(%r14), %rdi leaq 0x35b452(%rip), %rax # 0x3e4f30 movq 0x70(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x5f180 movq 0x38(%r14), %rax movb %r15b, 0x296(%rax) movl $0x1, (%rbx) jmp 0x89b78 movb $0x0, 0x15(%r15) js 0x89b0c movl 0x8(%r15), %eax jmp 0x89b73 movq 0x38(%r14), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movl $0x297, %edi # imm = 0x297 addq 0x38(%r14), %rdi leaq 0x35b3f6(%rip), %rax # 0x3e4f20 movq (%rax), %rsi movl $0x5, %edx callq 0x5f180 movq 0x38(%r14), %rax xorl %r15d, %r15d movb %r15b, 0x29c(%rax) movl $0x97, %edi addq 0x38(%r14), %rdi leaq 0x35b3db(%rip), %rax # 0x3e4f30 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x5f180 movq 0x38(%r14), %rax movb %r15b, 0x296(%rax) movl $0x1, %eax movl %eax, (%rbx) xorl %r15d, %r15d movl %r15d, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
mysql_stmt_store_result_cont: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, rsi mov rbx, rdi mov rax, [rsi+38h] mov rcx, [rax+480h] mov r15, [rcx+28h] cmp byte ptr [r15+15h], 0 jz short loc_89A99 mov byte ptr [r15+14h], 1 mov [r15+4], edx lea rdi, [r15+38h] call my_context_continue mov byte ptr [r15+14h], 0 test eax, eax jle short loc_89AFF mov r15d, [r15] jmp loc_89B78 loc_89A99: mov dword ptr [rax+90h], 7DEh mov edi, 297h add rdi, [r14+38h] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [r14+38h] xor r15d, r15d mov [rax+29Ch], r15b mov edi, 97h add rdi, [r14+38h] lea rax, client_errors mov rsi, [rax+70h] mov edx, 1FFh call _strncpy mov rax, [r14+38h] mov [rax+296h], r15b mov dword ptr [rbx], 1 jmp short loc_89B78 loc_89AFF: mov byte ptr [r15+15h], 0 js short loc_89B0C mov eax, [r15+8] jmp short loc_89B73 loc_89B0C: mov rax, [r14+38h] mov dword ptr [rax+90h], 7D8h mov edi, 297h add rdi, [r14+38h] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [r14+38h] xor r15d, r15d mov [rax+29Ch], r15b mov edi, 97h add rdi, [r14+38h] lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy mov rax, [r14+38h] mov [rax+296h], r15b mov eax, 1 loc_89B73: mov [rbx], eax xor r15d, r15d loc_89B78: mov eax, r15d add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long mysql_stmt_store_result_cont(int *a1, long long a2, unsigned int a3) { long long v3; // rax unsigned int *v4; // r15 int v5; // eax unsigned int v6; // r15d int v7; // eax v3 = *(_QWORD *)(a2 + 56); v4 = *(unsigned int **)(*(_QWORD *)(v3 + 1152) + 40LL); if ( *((_BYTE *)v4 + 21) ) { *((_BYTE *)v4 + 20) = 1; v4[1] = a3; v5 = my_context_continue(v4 + 14); *((_BYTE *)v4 + 20) = 0; if ( v5 <= 0 ) { *((_BYTE *)v4 + 21) = 0; if ( v5 < 0 ) { *(_DWORD *)(*(_QWORD *)(a2 + 56) + 144LL) = 2008; strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[8], 511LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0; v7 = 1; } else { v7 = v4[2]; } *a1 = v7; return 0; } else { return *v4; } } else { *(_DWORD *)(v3 + 144) = 2014; strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); v6 = 0; *(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[14], 511LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0; *a1 = 1; } return v6; }
mysql_stmt_store_result_cont: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr [RSI + 0x38] MOV RCX,qword ptr [RAX + 0x480] MOV R15,qword ptr [RCX + 0x28] CMP byte ptr [R15 + 0x15],0x0 JZ 0x00189a99 MOV byte ptr [R15 + 0x14],0x1 MOV dword ptr [R15 + 0x4],EDX LEA RDI,[R15 + 0x38] CALL 0x0018aefb MOV byte ptr [R15 + 0x14],0x0 TEST EAX,EAX JLE 0x00189aff MOV R15D,dword ptr [R15] JMP 0x00189b78 LAB_00189a99: MOV dword ptr [RAX + 0x90],0x7de MOV EDI,0x297 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x4e4f20] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x0015f180 MOV RAX,qword ptr [R14 + 0x38] XOR R15D,R15D MOV byte ptr [RAX + 0x29c],R15B MOV EDI,0x97 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x4e4f30] MOV RSI,qword ptr [RAX + 0x70] MOV EDX,0x1ff CALL 0x0015f180 MOV RAX,qword ptr [R14 + 0x38] MOV byte ptr [RAX + 0x296],R15B MOV dword ptr [RBX],0x1 JMP 0x00189b78 LAB_00189aff: MOV byte ptr [R15 + 0x15],0x0 JS 0x00189b0c MOV EAX,dword ptr [R15 + 0x8] JMP 0x00189b73 LAB_00189b0c: MOV RAX,qword ptr [R14 + 0x38] MOV dword ptr [RAX + 0x90],0x7d8 MOV EDI,0x297 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x4e4f20] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x0015f180 MOV RAX,qword ptr [R14 + 0x38] XOR R15D,R15D MOV byte ptr [RAX + 0x29c],R15B MOV EDI,0x97 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x4e4f30] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x0015f180 MOV RAX,qword ptr [R14 + 0x38] MOV byte ptr [RAX + 0x296],R15B MOV EAX,0x1 LAB_00189b73: MOV dword ptr [RBX],EAX XOR R15D,R15D LAB_00189b78: MOV EAX,R15D ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int4 mysql_stmt_store_result_cont(int4 *param_1,long param_2,int4 param_3) { int4 *puVar1; int iVar2; int4 uVar3; puVar1 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28); if (*(char *)((long)puVar1 + 0x15) == '\0') { *(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7de; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); uVar3 = 0; *(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97), PTR_s_Commands_out_of_sync__you_can_t_r_004e4fa0,0x1ff); *(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0; *param_1 = 1; } else { *(int1 *)(puVar1 + 5) = 1; puVar1[1] = param_3; iVar2 = my_context_continue(puVar1 + 0xe); *(int1 *)(puVar1 + 5) = 0; if (iVar2 < 1) { *(int1 *)((long)puVar1 + 0x15) = 0; if (iVar2 < 0) { *(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7d8; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_004e4f70, 0x1ff); *(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0; uVar3 = 1; } else { uVar3 = puVar1[2]; } *param_1 = uVar3; uVar3 = 0; } else { uVar3 = *puVar1; } } return uVar3; }
40,686
translog_write_variable_record_1group
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_write_variable_record_1group(LSN *lsn, enum translog_record_type type, MARIA_HA *tbl_info, SHORT_TRANSACTION_ID short_trid, struct st_translog_parts *parts, struct st_translog_buffer *buffer_to_flush, uint16 header_length, TRN *trn, void *hook_arg) { TRANSLOG_ADDRESS horizon; struct st_buffer_cursor cursor; int rc= 0; uint i; translog_size_t record_rest, full_pages, first_page; uint additional_chunk3_page= 0; uchar chunk0_header[1 + 2 + 5 + 2]; DBUG_ENTER("translog_write_variable_record_1group"); translog_lock_assert_owner(); if (buffer_to_flush) translog_buffer_lock_assert_owner(buffer_to_flush); set_lsn(lsn, horizon= log_descriptor.horizon); if (translog_set_lsn_for_files(LSN_FILE_NO(*lsn), LSN_FILE_NO(*lsn), *lsn, TRUE) || (log_record_type_descriptor[type].inwrite_hook && (*log_record_type_descriptor[type].inwrite_hook)(type, trn, tbl_info, lsn, hook_arg))) { translog_unlock(); if (buffer_to_flush != NULL) { translog_buffer_flush(buffer_to_flush); translog_buffer_unlock(buffer_to_flush); } DBUG_RETURN(1); } cursor= log_descriptor.bc; cursor.chaser= 1; /* Advance pointer to be able unlock the loghandler */ first_page= translog_get_current_page_rest(); record_rest= parts->record_length - (first_page - header_length); full_pages= record_rest / log_descriptor.page_capacity_chunk_2; record_rest= (record_rest % log_descriptor.page_capacity_chunk_2); if (record_rest + 1 == log_descriptor.page_capacity_chunk_2) { DBUG_PRINT("info", ("2 chunks type 3 is needed")); /* We will write 2 chunks type 3 at the end of this group */ additional_chunk3_page= 1; record_rest= 1; } DBUG_PRINT("info", ("first_page: %u (%u) full_pages: %u (%lu) " "additional: %u (%u) rest %u = %u", first_page, first_page - header_length, full_pages, (ulong) full_pages * log_descriptor.page_capacity_chunk_2, additional_chunk3_page, additional_chunk3_page * (log_descriptor.page_capacity_chunk_2 - 1), record_rest, parts->record_length)); /* record_rest + 3 is chunk type 3 overhead + record_rest */ rc= translog_advance_pointer((int)(full_pages + additional_chunk3_page), (record_rest ? record_rest + 3 : 0), &cursor.buffs); log_descriptor.bc.buffer->last_lsn= *lsn; DBUG_PRINT("info", ("last_lsn set to " LSN_FMT " buffer: %p", LSN_IN_PARTS(log_descriptor.bc.buffer->last_lsn), log_descriptor.bc.buffer)); translog_unlock(); /* Check if we switched buffer and need process it (current buffer is unlocked already => we will not delay other threads */ if (buffer_to_flush != NULL) { if (!rc) rc= translog_buffer_flush(buffer_to_flush); translog_buffer_unlock(buffer_to_flush); } if (rc) { //translog_advance_pointer decreased writers so it is OK DBUG_ASSERT(cursor.buffs.unlck_ptr == cursor.buffs.wrt_ptr); DBUG_RETURN(1); } translog_write_variable_record_1group_header(parts, type, short_trid, header_length, chunk0_header); /* fill the pages */ translog_write_parts_on_page(&horizon, &cursor, first_page, parts); DBUG_PRINT("info", ("absolute horizon: " LSN_FMT " local: " LSN_FMT, LSN_IN_PARTS(log_descriptor.horizon), LSN_IN_PARTS(horizon))); for (i= 0; i < full_pages; i++) { if (translog_write_variable_record_chunk2_page(parts, &horizon, &cursor)) goto error; DBUG_PRINT("info", ("absolute horizon: " LSN_FMT " local: " LSN_FMT, LSN_IN_PARTS(log_descriptor.horizon), LSN_IN_PARTS(horizon))); } if (additional_chunk3_page) { if (translog_write_variable_record_chunk3_page(parts, log_descriptor. page_capacity_chunk_2 - 2, &horizon, &cursor)) goto error; DBUG_PRINT("info", ("absolute horizon: " LSN_FMT " local: " LSN_FMT, LSN_IN_PARTS(log_descriptor.horizon), LSN_IN_PARTS(horizon))); DBUG_ASSERT(cursor.current_page_fill == TRANSLOG_PAGE_SIZE); } if (translog_write_variable_record_chunk3_page(parts, record_rest, &horizon, &cursor)) goto error; DBUG_PRINT("info", ("absolute horizon: " LSN_FMT " local: " LSN_FMT, (uint) LSN_FILE_NO(log_descriptor.horizon), (uint) LSN_OFFSET(log_descriptor.horizon), (uint) LSN_FILE_NO(horizon), (uint) LSN_OFFSET(horizon))); translog_buffer_lock(cursor.buffer); translog_buffer_decrease_writers(cursor.buffer); used_buffs_register_unlock(&cursor.buffs, cursor.buffer); translog_buffer_unlock(cursor.buffer); DBUG_ASSERT(cursor.buffs.unlck_ptr == cursor.buffs.wrt_ptr); DBUG_RETURN(0); error: used_buffs_urgent_unlock(&cursor.buffs); DBUG_RETURN(1); }
O0
c
translog_write_variable_record_1group: pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movw %cx, %ax movq 0x20(%rbp), %rcx movq 0x18(%rbp), %rcx movw 0x10(%rbp), %cx movq %fs:0x28, %rcx movq %rcx, -0x8(%rbp) movq %rdi, -0x20(%rbp) movl %esi, -0x24(%rbp) movq %rdx, -0x30(%rbp) movw %ax, -0x32(%rbp) movq %r8, -0x40(%rbp) movq %r9, -0x48(%rbp) movl $0x0, -0x94(%rbp) movl $0x0, -0xa8(%rbp) cmpq $0x0, -0x48(%rbp) je 0x37eab jmp 0x37eab movq -0x20(%rbp), %rdi movq 0xc41a02(%rip), %rsi # 0xc798b8 movq %rsi, -0x50(%rbp) callq 0x39220 movq -0x20(%rbp), %rax movq (%rax), %rax sarq $0x20, %rax movl %eax, %edi movq -0x20(%rbp), %rax movq (%rax), %rax sarq $0x20, %rax movl %eax, %esi movq -0x20(%rbp), %rax movq (%rax), %rdx movl $0x1, %ecx callq 0x39250 movsbl %al, %eax cmpl $0x0, %eax jne 0x37f40 movl -0x24(%rbp), %eax movl %eax, %ecx leaq 0x43fb72(%rip), %rax # 0x477a70 imulq $0x48, %rcx, %rcx addq %rcx, %rax cmpq $0x0, 0x10(%rax) je 0x37f69 movl -0x24(%rbp), %eax movl %eax, %ecx leaq 0x43fb58(%rip), %rax # 0x477a70 imulq $0x48, %rcx, %rcx addq %rcx, %rax movq 0x10(%rax), %rax movl -0x24(%rbp), %edi movq 0x18(%rbp), %rsi movq -0x30(%rbp), %rdx movq -0x20(%rbp), %rcx movq 0x20(%rbp), %r8 callq *%rax movsbl %al, %eax cmpl $0x0, %eax je 0x37f69 callq 0x2e010 cmpq $0x0, -0x48(%rbp) je 0x37f5e movq -0x48(%rbp), %rdi callq 0x341d0 movq -0x48(%rbp), %rdi callq 0x2dfe0 jmp 0x37f60 movb $0x1, -0x13(%rbp) jmp 0x381f4 leaq -0x90(%rbp), %rdi leaq 0x440cf9(%rip), %rsi # 0x478c70 addq $0x800c50, %rsi # imm = 0x800C50 movl $0x40, %edx callq 0x2a090 movb $0x1, -0x59(%rbp) callq 0x39cb0 movl %eax, -0xa4(%rbp) movq -0x40(%rbp), %rax movl (%rax), %eax movl -0xa4(%rbp), %ecx movzwl 0x10(%rbp), %edx subl %edx, %ecx subl %ecx, %eax movl %eax, -0x9c(%rbp) movl -0x9c(%rbp), %eax movzwl 0x440cd8(%rip), %ecx # 0x478c96 xorl %edx, %edx divl %ecx movl %eax, -0xa0(%rbp) movl -0x9c(%rbp), %eax movzwl 0x440cc1(%rip), %ecx # 0x478c96 xorl %edx, %edx divl %ecx movl %edx, -0x9c(%rbp) movl -0x9c(%rbp), %eax addl $0x1, %eax movzwl 0x440ca7(%rip), %ecx # 0x478c96 cmpl %ecx, %eax jne 0x3800b jmp 0x37ff5 jmp 0x37ff7 movl $0x1, -0xa8(%rbp) movl $0x1, -0x9c(%rbp) jmp 0x3800d jmp 0x3800f movl -0xa0(%rbp), %eax addl -0xa8(%rbp), %eax movl %eax, -0xac(%rbp) cmpl $0x0, -0x9c(%rbp) je 0x3803b movl -0x9c(%rbp), %eax addl $0x3, %eax movl %eax, -0xb0(%rbp) jmp 0x38045 xorl %eax, %eax movl %eax, -0xb0(%rbp) jmp 0x38045 movl -0xac(%rbp), %edi movl -0xb0(%rbp), %eax leaq -0x90(%rbp), %rdx movzwl %ax, %esi callq 0x396d0 movsbl %al, %eax movl %eax, -0x94(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rcx movq 0xc41871(%rip), %rax # 0xc798e8 movq %rcx, 0x100000(%rax) jmp 0x38080 callq 0x2e010 cmpq $0x0, -0x48(%rbp) je 0x380b0 cmpl $0x0, -0x94(%rbp) jne 0x380a7 movq -0x48(%rbp), %rdi callq 0x341d0 movsbl %al, %eax movl %eax, -0x94(%rbp) movq -0x48(%rbp), %rdi callq 0x2dfe0 cmpl $0x0, -0x94(%rbp) je 0x380c8 jmp 0x380bb jmp 0x380bd jmp 0x380bf movb $0x1, -0x13(%rbp) jmp 0x381f4 movq -0x40(%rbp), %rdi movl -0x24(%rbp), %esi movw -0x32(%rbp), %cx movw 0x10(%rbp), %ax leaq -0x12(%rbp), %r8 movzwl %cx, %edx movzwl %ax, %ecx callq 0x39150 movl -0xa4(%rbp), %edx movq -0x40(%rbp), %rcx leaq -0x50(%rbp), %rdi leaq -0x90(%rbp), %rsi callq 0x393f0 jmp 0x38102 movl $0x0, -0x98(%rbp) movl -0x98(%rbp), %eax cmpl -0xa0(%rbp), %eax jae 0x3814e movq -0x40(%rbp), %rdi leaq -0x50(%rbp), %rsi leaq -0x90(%rbp), %rdx callq 0x39a50 cmpb $0x0, %al je 0x38137 jmp 0x381e4 jmp 0x38139 jmp 0x3813b jmp 0x3813d movl -0x98(%rbp), %eax addl $0x1, %eax movl %eax, -0x98(%rbp) jmp 0x3810c cmpl $0x0, -0xa8(%rbp) je 0x38188 movq -0x40(%rbp), %rdi movzwl 0x440b34(%rip), %eax # 0x478c96 subl $0x2, %eax leaq -0x50(%rbp), %rdx leaq -0x90(%rbp), %rcx movzwl %ax, %esi callq 0x39ac0 cmpb $0x0, %al je 0x3817e jmp 0x381e4 jmp 0x38180 jmp 0x38182 jmp 0x38184 jmp 0x38186 jmp 0x38188 movq -0x40(%rbp), %rdi movl -0x9c(%rbp), %eax leaq -0x50(%rbp), %rdx leaq -0x90(%rbp), %rcx movzwl %ax, %esi callq 0x39ac0 cmpb $0x0, %al je 0x381ab jmp 0x381e4 jmp 0x381ad jmp 0x381af movq -0x68(%rbp), %rdi callq 0x2dfa0 movq -0x68(%rbp), %rdi callq 0x39ba0 leaq -0x90(%rbp), %rdi movq -0x68(%rbp), %rsi callq 0x39bf0 movq -0x68(%rbp), %rdi callq 0x2dfe0 jmp 0x381dc jmp 0x381de movb $0x0, -0x13(%rbp) jmp 0x381f4 leaq -0x90(%rbp), %rdi callq 0x39c20 movb $0x1, -0x13(%rbp) movb -0x13(%rbp), %al movb %al, -0xb1(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x3821e movb -0xb1(%rbp), %al addq $0xc0, %rsp popq %rbp retq callq 0x2a250 nopw %cs:(%rax,%rax)
translog_write_variable_record_1group: push rbp mov rbp, rsp sub rsp, 0C0h mov ax, cx mov rcx, [rbp+arg_10] mov rcx, [rbp+arg_8] mov cx, [rbp+arg_0] mov rcx, fs:28h mov [rbp+var_8], rcx mov [rbp+var_20], rdi mov [rbp+var_24], esi mov [rbp+var_30], rdx mov [rbp+var_32], ax mov [rbp+var_40], r8 mov [rbp+var_48], r9 mov [rbp+var_94], 0 mov [rbp+var_A8], 0 cmp [rbp+var_48], 0 jz short loc_37EAB jmp short $+2 loc_37EAB: mov rdi, [rbp+var_20] mov rsi, cs:qword_C798B8 mov [rbp+var_50], rsi call set_lsn mov rax, [rbp+var_20] mov rax, [rax] sar rax, 20h mov edi, eax mov rax, [rbp+var_20] mov rax, [rax] sar rax, 20h mov esi, eax mov rax, [rbp+var_20] mov rdx, [rax] mov ecx, 1 call translog_set_lsn_for_files movsx eax, al cmp eax, 0 jnz short loc_37F40 mov eax, [rbp+var_24] mov ecx, eax lea rax, log_record_type_descriptor imul rcx, 48h ; 'H' add rax, rcx cmp qword ptr [rax+10h], 0 jz short loc_37F69 mov eax, [rbp+var_24] mov ecx, eax lea rax, log_record_type_descriptor imul rcx, 48h ; 'H' add rax, rcx mov rax, [rax+10h] mov edi, [rbp+var_24] mov rsi, [rbp+arg_8] mov rdx, [rbp+var_30] mov rcx, [rbp+var_20] mov r8, [rbp+arg_10] call rax movsx eax, al cmp eax, 0 jz short loc_37F69 loc_37F40: call translog_unlock cmp [rbp+var_48], 0 jz short loc_37F5E mov rdi, [rbp+var_48] call translog_buffer_flush mov rdi, [rbp+var_48] call translog_buffer_unlock loc_37F5E: jmp short $+2 loc_37F60: mov [rbp+var_13], 1 jmp loc_381F4 loc_37F69: lea rdi, [rbp+var_90] lea rsi, log_descriptor add rsi, 800C50h mov edx, 40h ; '@' call _memcpy mov [rbp+var_59], 1 call translog_get_current_page_rest mov [rbp+var_A4], eax mov rax, [rbp+var_40] mov eax, [rax] mov ecx, [rbp+var_A4] movzx edx, [rbp+arg_0] sub ecx, edx sub eax, ecx mov [rbp+var_9C], eax mov eax, [rbp+var_9C] movzx ecx, cs:word_478C96 xor edx, edx div ecx mov [rbp+var_A0], eax mov eax, [rbp+var_9C] movzx ecx, cs:word_478C96 xor edx, edx div ecx mov [rbp+var_9C], edx mov eax, [rbp+var_9C] add eax, 1 movzx ecx, cs:word_478C96 cmp eax, ecx jnz short loc_3800B jmp short $+2 loc_37FF5: jmp short $+2 loc_37FF7: mov [rbp+var_A8], 1 mov [rbp+var_9C], 1 loc_3800B: jmp short $+2 loc_3800D: jmp short $+2 loc_3800F: mov eax, [rbp+var_A0] add eax, [rbp+var_A8] mov [rbp+var_AC], eax cmp [rbp+var_9C], 0 jz short loc_3803B mov eax, [rbp+var_9C] add eax, 3 mov [rbp+var_B0], eax jmp short loc_38045 loc_3803B: xor eax, eax mov [rbp+var_B0], eax jmp short $+2 loc_38045: mov edi, [rbp+var_AC] mov eax, [rbp+var_B0] lea rdx, [rbp+var_90] movzx esi, ax call translog_advance_pointer movsx eax, al mov [rbp+var_94], eax mov rax, [rbp+var_20] mov rcx, [rax] mov rax, cs:qword_C798E8 mov [rax+100000h], rcx jmp short $+2 loc_38080: call translog_unlock cmp [rbp+var_48], 0 jz short loc_380B0 cmp [rbp+var_94], 0 jnz short loc_380A7 mov rdi, [rbp+var_48] call translog_buffer_flush movsx eax, al mov [rbp+var_94], eax loc_380A7: mov rdi, [rbp+var_48] call translog_buffer_unlock loc_380B0: cmp [rbp+var_94], 0 jz short loc_380C8 jmp short $+2 loc_380BB: jmp short $+2 loc_380BD: jmp short $+2 loc_380BF: mov [rbp+var_13], 1 jmp loc_381F4 loc_380C8: mov rdi, [rbp+var_40] mov esi, [rbp+var_24] mov cx, [rbp+var_32] mov ax, [rbp+arg_0] lea r8, [rbp+var_12] movzx edx, cx movzx ecx, ax call translog_write_variable_record_1group_header mov edx, [rbp+var_A4] mov rcx, [rbp+var_40] lea rdi, [rbp+var_50] lea rsi, [rbp+var_90] call translog_write_parts_on_page jmp short $+2 loc_38102: mov [rbp+var_98], 0 loc_3810C: mov eax, [rbp+var_98] cmp eax, [rbp+var_A0] jnb short loc_3814E mov rdi, [rbp+var_40] lea rsi, [rbp+var_50] lea rdx, [rbp+var_90] call translog_write_variable_record_chunk2_page cmp al, 0 jz short loc_38137 jmp loc_381E4 loc_38137: jmp short $+2 loc_38139: jmp short $+2 loc_3813B: jmp short $+2 loc_3813D: mov eax, [rbp+var_98] add eax, 1 mov [rbp+var_98], eax jmp short loc_3810C loc_3814E: cmp [rbp+var_A8], 0 jz short loc_38188 mov rdi, [rbp+var_40] movzx eax, cs:word_478C96 sub eax, 2 lea rdx, [rbp+var_50] lea rcx, [rbp+var_90] movzx esi, ax call translog_write_variable_record_chunk3_page cmp al, 0 jz short loc_3817E jmp short loc_381E4 loc_3817E: jmp short $+2 loc_38180: jmp short $+2 loc_38182: jmp short $+2 loc_38184: jmp short $+2 loc_38186: jmp short $+2 loc_38188: mov rdi, [rbp+var_40] mov eax, [rbp+var_9C] lea rdx, [rbp+var_50] lea rcx, [rbp+var_90] movzx esi, ax call translog_write_variable_record_chunk3_page cmp al, 0 jz short loc_381AB jmp short loc_381E4 loc_381AB: jmp short $+2 loc_381AD: jmp short $+2 loc_381AF: mov rdi, [rbp+var_68] call translog_buffer_lock mov rdi, [rbp+var_68] call translog_buffer_decrease_writers lea rdi, [rbp+var_90] mov rsi, [rbp+var_68] call used_buffs_register_unlock mov rdi, [rbp+var_68] call translog_buffer_unlock jmp short $+2 loc_381DC: jmp short $+2 loc_381DE: mov [rbp+var_13], 0 jmp short loc_381F4 loc_381E4: lea rdi, [rbp+var_90] call used_buffs_urgent_unlock mov [rbp+var_13], 1 loc_381F4: mov al, [rbp+var_13] mov [rbp+var_B1], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_3821E mov al, [rbp+var_B1] add rsp, 0C0h pop rbp retn loc_3821E: call ___stack_chk_fail
char translog_write_variable_record_1group( _QWORD *a1, unsigned int a2, long long a3, unsigned __int16 a4, _DWORD *a5, long long a6, unsigned __int16 a7, long long a8, long long a9) { unsigned __int16 v10; // [rsp+10h] [rbp-B0h] int v11; // [rsp+18h] [rbp-A8h] unsigned int current_page_rest; // [rsp+1Ch] [rbp-A4h] unsigned int v13; // [rsp+20h] [rbp-A0h] unsigned int v14; // [rsp+24h] [rbp-9Ch] unsigned int v15; // [rsp+24h] [rbp-9Ch] unsigned int i; // [rsp+28h] [rbp-98h] int v17; // [rsp+2Ch] [rbp-94h] _BYTE v18[40]; // [rsp+30h] [rbp-90h] BYREF long long v19; // [rsp+58h] [rbp-68h] char v20; // [rsp+67h] [rbp-59h] long long v21; // [rsp+70h] [rbp-50h] BYREF long long v22; // [rsp+78h] [rbp-48h] _DWORD *v23; // [rsp+80h] [rbp-40h] unsigned __int16 v24; // [rsp+8Eh] [rbp-32h] long long v25; // [rsp+90h] [rbp-30h] unsigned int v26; // [rsp+9Ch] [rbp-24h] _QWORD *v27; // [rsp+A0h] [rbp-20h] _BYTE v29[10]; // [rsp+AEh] [rbp-12h] BYREF unsigned long long v30; // [rsp+B8h] [rbp-8h] v30 = __readfsqword(0x28u); v27 = a1; v26 = a2; v25 = a3; v24 = a4; v23 = a5; v22 = a6; v11 = 0; v21 = qword_C798B8; set_lsn(a1, qword_C798B8); if ( (unsigned __int8)translog_set_lsn_for_files((unsigned int)HIDWORD(*v27), (unsigned int)HIDWORD(*v27), *v27, 1LL) || *(_QWORD *)&log_record_type_descriptor[18 * v26 + 4] && (*(unsigned __int8 ( **)(_QWORD, long long, long long, _QWORD *, long long))&log_record_type_descriptor[18 * v26 + 4])( v26, a8, v25, v27, a9) ) { translog_unlock(); if ( v22 ) { translog_buffer_flush(v22); translog_buffer_unlock(v22); } return 1; } else { memcpy(v18, &log_descriptor[1048970], 64LL); v20 = 1; current_page_rest = translog_get_current_page_rest(); v14 = *v23 - (current_page_rest - a7); v13 = v14 / (unsigned __int16)word_478C96; v15 = v14 % (unsigned __int16)word_478C96; if ( v15 + 1 == (unsigned __int16)word_478C96 ) { v11 = 1; v15 = 1; } if ( v15 ) v10 = v15 + 3; else v10 = 0; v17 = (char)translog_advance_pointer(v11 + v13, v10, v18); *(_QWORD *)(qword_C798E8 + 0x100000) = *v27; translog_unlock(); if ( v22 ) { if ( !v17 ) v17 = translog_buffer_flush(v22); translog_buffer_unlock(v22); } if ( v17 ) { return 1; } else { translog_write_variable_record_1group_header(v23, v26, v24, a7, v29); translog_write_parts_on_page(&v21, v18, current_page_rest, v23); for ( i = 0; i < v13; ++i ) { if ( (unsigned __int8)translog_write_variable_record_chunk2_page(v23, &v21, v18) ) goto LABEL_26; } if ( (!v11 || !(unsigned __int8)translog_write_variable_record_chunk3_page( v23, (unsigned __int16)(word_478C96 - 2), &v21, v18)) && !(unsigned __int8)translog_write_variable_record_chunk3_page(v23, (unsigned __int16)v15, &v21, v18) ) { translog_buffer_lock(v19); translog_buffer_decrease_writers(v19); used_buffs_register_unlock(v18, v19); translog_buffer_unlock(v19); return 0; } LABEL_26: used_buffs_urgent_unlock(v18); return 1; } } }
translog_write_variable_record_1group: PUSH RBP MOV RBP,RSP SUB RSP,0xc0 MOV AX,CX MOV RCX,qword ptr [RBP + 0x20] MOV RCX,qword ptr [RBP + 0x18] MOV CX,word ptr [RBP + 0x10] MOV RCX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RCX MOV qword ptr [RBP + -0x20],RDI MOV dword ptr [RBP + -0x24],ESI MOV qword ptr [RBP + -0x30],RDX MOV word ptr [RBP + -0x32],AX MOV qword ptr [RBP + -0x40],R8 MOV qword ptr [RBP + -0x48],R9 MOV dword ptr [RBP + -0x94],0x0 MOV dword ptr [RBP + -0xa8],0x0 CMP qword ptr [RBP + -0x48],0x0 JZ 0x00137eab JMP 0x00137eab LAB_00137eab: MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [0x00d798b8] MOV qword ptr [RBP + -0x50],RSI CALL 0x00139220 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] SAR RAX,0x20 MOV EDI,EAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] SAR RAX,0x20 MOV ESI,EAX MOV RAX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RAX] MOV ECX,0x1 CALL 0x00139250 MOVSX EAX,AL CMP EAX,0x0 JNZ 0x00137f40 MOV EAX,dword ptr [RBP + -0x24] MOV ECX,EAX LEA RAX,[0x577a70] IMUL RCX,RCX,0x48 ADD RAX,RCX CMP qword ptr [RAX + 0x10],0x0 JZ 0x00137f69 MOV EAX,dword ptr [RBP + -0x24] MOV ECX,EAX LEA RAX,[0x577a70] IMUL RCX,RCX,0x48 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x10] MOV EDI,dword ptr [RBP + -0x24] MOV RSI,qword ptr [RBP + 0x18] MOV RDX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + 0x20] CALL RAX MOVSX EAX,AL CMP EAX,0x0 JZ 0x00137f69 LAB_00137f40: CALL 0x0012e010 CMP qword ptr [RBP + -0x48],0x0 JZ 0x00137f5e MOV RDI,qword ptr [RBP + -0x48] CALL 0x001341d0 MOV RDI,qword ptr [RBP + -0x48] CALL 0x0012dfe0 LAB_00137f5e: JMP 0x00137f60 LAB_00137f60: MOV byte ptr [RBP + -0x13],0x1 JMP 0x001381f4 LAB_00137f69: LEA RDI,[RBP + -0x90] LEA RSI,[0x578c70] ADD RSI,0x800c50 MOV EDX,0x40 CALL 0x0012a090 MOV byte ptr [RBP + -0x59],0x1 CALL 0x00139cb0 MOV dword ptr [RBP + -0xa4],EAX MOV RAX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RAX] MOV ECX,dword ptr [RBP + -0xa4] MOVZX EDX,word ptr [RBP + 0x10] SUB ECX,EDX SUB EAX,ECX MOV dword ptr [RBP + -0x9c],EAX MOV EAX,dword ptr [RBP + -0x9c] MOVZX ECX,word ptr [0x00578c96] XOR EDX,EDX DIV ECX MOV dword ptr [RBP + -0xa0],EAX MOV EAX,dword ptr [RBP + -0x9c] MOVZX ECX,word ptr [0x00578c96] XOR EDX,EDX DIV ECX MOV dword ptr [RBP + -0x9c],EDX MOV EAX,dword ptr [RBP + -0x9c] ADD EAX,0x1 MOVZX ECX,word ptr [0x00578c96] CMP EAX,ECX JNZ 0x0013800b JMP 0x00137ff5 LAB_00137ff5: JMP 0x00137ff7 LAB_00137ff7: MOV dword ptr [RBP + -0xa8],0x1 MOV dword ptr [RBP + -0x9c],0x1 LAB_0013800b: JMP 0x0013800d LAB_0013800d: JMP 0x0013800f LAB_0013800f: MOV EAX,dword ptr [RBP + -0xa0] ADD EAX,dword ptr [RBP + -0xa8] MOV dword ptr [RBP + -0xac],EAX CMP dword ptr [RBP + -0x9c],0x0 JZ 0x0013803b MOV EAX,dword ptr [RBP + -0x9c] ADD EAX,0x3 MOV dword ptr [RBP + -0xb0],EAX JMP 0x00138045 LAB_0013803b: XOR EAX,EAX MOV dword ptr [RBP + -0xb0],EAX JMP 0x00138045 LAB_00138045: MOV EDI,dword ptr [RBP + -0xac] MOV EAX,dword ptr [RBP + -0xb0] LEA RDX,[RBP + -0x90] MOVZX ESI,AX CALL 0x001396d0 MOVSX EAX,AL MOV dword ptr [RBP + -0x94],EAX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [0x00d798e8] MOV qword ptr [RAX + 0x100000],RCX JMP 0x00138080 LAB_00138080: CALL 0x0012e010 CMP qword ptr [RBP + -0x48],0x0 JZ 0x001380b0 CMP dword ptr [RBP + -0x94],0x0 JNZ 0x001380a7 MOV RDI,qword ptr [RBP + -0x48] CALL 0x001341d0 MOVSX EAX,AL MOV dword ptr [RBP + -0x94],EAX LAB_001380a7: MOV RDI,qword ptr [RBP + -0x48] CALL 0x0012dfe0 LAB_001380b0: CMP dword ptr [RBP + -0x94],0x0 JZ 0x001380c8 JMP 0x001380bb LAB_001380bb: JMP 0x001380bd LAB_001380bd: JMP 0x001380bf LAB_001380bf: MOV byte ptr [RBP + -0x13],0x1 JMP 0x001381f4 LAB_001380c8: MOV RDI,qword ptr [RBP + -0x40] MOV ESI,dword ptr [RBP + -0x24] MOV CX,word ptr [RBP + -0x32] MOV AX,word ptr [RBP + 0x10] LEA R8,[RBP + -0x12] MOVZX EDX,CX MOVZX ECX,AX CALL 0x00139150 MOV EDX,dword ptr [RBP + -0xa4] MOV RCX,qword ptr [RBP + -0x40] LEA RDI,[RBP + -0x50] LEA RSI,[RBP + -0x90] CALL 0x001393f0 JMP 0x00138102 LAB_00138102: MOV dword ptr [RBP + -0x98],0x0 LAB_0013810c: MOV EAX,dword ptr [RBP + -0x98] CMP EAX,dword ptr [RBP + -0xa0] JNC 0x0013814e MOV RDI,qword ptr [RBP + -0x40] LEA RSI,[RBP + -0x50] LEA RDX,[RBP + -0x90] CALL 0x00139a50 CMP AL,0x0 JZ 0x00138137 JMP 0x001381e4 LAB_00138137: JMP 0x00138139 LAB_00138139: JMP 0x0013813b LAB_0013813b: JMP 0x0013813d LAB_0013813d: MOV EAX,dword ptr [RBP + -0x98] ADD EAX,0x1 MOV dword ptr [RBP + -0x98],EAX JMP 0x0013810c LAB_0013814e: CMP dword ptr [RBP + -0xa8],0x0 JZ 0x00138188 MOV RDI,qword ptr [RBP + -0x40] MOVZX EAX,word ptr [0x00578c96] SUB EAX,0x2 LEA RDX,[RBP + -0x50] LEA RCX,[RBP + -0x90] MOVZX ESI,AX CALL 0x00139ac0 CMP AL,0x0 JZ 0x0013817e JMP 0x001381e4 LAB_0013817e: JMP 0x00138180 LAB_00138180: JMP 0x00138182 LAB_00138182: JMP 0x00138184 LAB_00138184: JMP 0x00138186 LAB_00138186: JMP 0x00138188 LAB_00138188: MOV RDI,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RBP + -0x9c] LEA RDX,[RBP + -0x50] LEA RCX,[RBP + -0x90] MOVZX ESI,AX CALL 0x00139ac0 CMP AL,0x0 JZ 0x001381ab JMP 0x001381e4 LAB_001381ab: JMP 0x001381ad LAB_001381ad: JMP 0x001381af LAB_001381af: MOV RDI,qword ptr [RBP + -0x68] CALL 0x0012dfa0 MOV RDI,qword ptr [RBP + -0x68] CALL 0x00139ba0 LEA RDI,[RBP + -0x90] MOV RSI,qword ptr [RBP + -0x68] CALL 0x00139bf0 MOV RDI,qword ptr [RBP + -0x68] CALL 0x0012dfe0 JMP 0x001381dc LAB_001381dc: JMP 0x001381de LAB_001381de: MOV byte ptr [RBP + -0x13],0x0 JMP 0x001381f4 LAB_001381e4: LEA RDI,[RBP + -0x90] CALL 0x00139c20 MOV byte ptr [RBP + -0x13],0x1 LAB_001381f4: MOV AL,byte ptr [RBP + -0x13] MOV byte ptr [RBP + -0xb1],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0013821e MOV AL,byte ptr [RBP + -0xb1] ADD RSP,0xc0 POP RBP RET LAB_0013821e: CALL 0x0012a250
int8 translog_write_variable_record_1group (long *param_1,uint param_2,int8 param_3,int2 param_4,int *param_5, long param_6,ushort param_7,int8 param_8,int8 param_9) { char cVar1; int iVar2; uint uVar3; long in_FS_OFFSET; bool bVar4; uint local_b8; uint local_b0; uint local_a4; uint local_a0; int1 local_98 [40]; int8 local_70; int1 local_61; int8 local_58; long local_50; int *local_48; int2 local_3a; int8 local_38; uint local_2c; long *local_28; int1 local_1b; int1 local_1a [10]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_58 = DAT_00d798b8; local_50 = param_6; local_48 = param_5; local_3a = param_4; local_38 = param_3; local_2c = param_2; local_28 = param_1; set_lsn(param_1); cVar1 = translog_set_lsn_for_files (*local_28 >> 0x20 & 0xffffffff,*local_28 >> 0x20 & 0xffffffff,*local_28,1); if ((cVar1 == '\0') && ((*(long *)(log_record_type_descriptor + (ulong)local_2c * 0x48 + 0x10) == 0 || (cVar1 = (**(code **)(log_record_type_descriptor + (ulong)local_2c * 0x48 + 0x10)) (local_2c,param_8,local_38,local_28,param_9), cVar1 == '\0')))) { memcpy(local_98,&DAT_00d798c0,0x40); local_61 = 1; iVar2 = translog_get_current_page_rest(); local_a4 = *local_48 - (iVar2 - (uint)param_7); uVar3 = local_a4 / DAT_00578c96; local_a4 = local_a4 % (uint)DAT_00578c96; bVar4 = local_a4 + 1 == (uint)DAT_00578c96; if (bVar4) { local_a4 = 1; } local_b0 = (uint)bVar4; if (local_a4 == 0) { local_b8 = 0; } else { local_b8 = local_a4 + 3; } cVar1 = translog_advance_pointer(uVar3 + local_b0,local_b8 & 0xffff,local_98); *(long *)(DAT_00d798e8 + 0x100000) = *local_28; translog_unlock(); if (local_50 != 0) { if (cVar1 == '\0') { cVar1 = translog_buffer_flush(local_50); } translog_buffer_unlock(local_50); } if (cVar1 == '\0') { translog_write_variable_record_1group_header(local_48,local_2c,local_3a,param_7,local_1a); translog_write_parts_on_page(&local_58,local_98,iVar2,local_48); for (local_a0 = 0; local_a0 < uVar3; local_a0 = local_a0 + 1) { cVar1 = translog_write_variable_record_chunk2_page(local_48,&local_58,local_98); if (cVar1 != '\0') goto LAB_001381e4; } if (((local_b0 == 0) || (cVar1 = translog_write_variable_record_chunk3_page (local_48,DAT_00578c96 - 2,&local_58,local_98), cVar1 == '\0')) && (cVar1 = translog_write_variable_record_chunk3_page(local_48,local_a4,&local_58,local_98), cVar1 == '\0')) { translog_buffer_lock(local_70); translog_buffer_decrease_writers(local_70); used_buffs_register_unlock(local_98,local_70); translog_buffer_unlock(local_70); local_1b = 0; } else { LAB_001381e4: used_buffs_urgent_unlock(local_98); local_1b = 1; } } else { local_1b = 1; } } else { translog_unlock(); if (local_50 != 0) { translog_buffer_flush(local_50); translog_buffer_unlock(local_50); } local_1b = 1; } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_1b); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
40,687
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::emplace(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, minja::Value&&)
monkey531[P]llama/common/./json.hpp
std::pair<iterator, bool> emplace(const key_type& key, T&& t) { for (auto it = this->begin(); it != this->end(); ++it) { if (m_compare(it->first, key)) { return {it, false}; } } Container::emplace_back(key, std::forward<T>(t)); return {std::prev(this->end()), true}; }
O2
cpp
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::emplace(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, minja::Value&&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %r14 movq (%rdi), %rbx cmpq 0x8(%r14), %rbx je 0x3d543 movq %rbx, %rdi movq %r12, %rsi callq 0x35808 testb %al, %al jne 0x3d55d addq $0x60, %rbx jmp 0x3d528 movq %r14, %rdi movq %r12, %rsi movq %r15, %rdx callq 0x3d56e movq 0x8(%r14), %rbx addq $-0x60, %rbx movb $0x1, %dl jmp 0x3d55f xorl %edx, %edx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceERSJ_OSF_: push r15 push r14 push r12 push rbx push rax mov r15, rdx mov r12, rsi mov r14, rdi mov rbx, [rdi] loc_3D528: cmp rbx, [r14+8] jz short loc_3D543 mov rdi, rbx mov rsi, r12 call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) test al, al jnz short loc_3D55D add rbx, 60h ; '`' jmp short loc_3D528 loc_3D543: mov rdi, r14 mov rsi, r12 mov rdx, r15 call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE12emplace_backIJRSF_SH_EEERSI_DpOT_; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,minja::Value>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,minja::Value &&) mov rbx, [r14+8] add rbx, 0FFFFFFFFFFFFFFA0h mov dl, 1 jmp short loc_3D55F loc_3D55D: xor edx, edx loc_3D55F: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::emplace( char **a1, char *a2, long long a3, __m128d a4) { char *i; // rbx for ( i = *a1; i != a1[1]; i += 96 ) { if ( nlohmann::json_abi_v3_11_3::operator==(i, a2, a4) ) return (long long)i; } std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&,minja::Value>( a1, a2, a3); return (long long)(a1[1] - 96); }
emplace: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R15,RDX MOV R12,RSI MOV R14,RDI MOV RBX,qword ptr [RDI] LAB_0013d528: CMP RBX,qword ptr [R14 + 0x8] JZ 0x0013d543 MOV RDI,RBX MOV RSI,R12 CALL 0x00135808 TEST AL,AL JNZ 0x0013d55d ADD RBX,0x60 JMP 0x0013d528 LAB_0013d543: MOV RDI,R14 MOV RSI,R12 MOV RDX,R15 CALL 0x0013d56e MOV RBX,qword ptr [R14 + 0x8] ADD RBX,-0x60 MOV DL,0x1 JMP 0x0013d55f LAB_0013d55d: XOR EDX,EDX LAB_0013d55f: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value> > >::emplace(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&, minja::Value&&) */ int1 [16] __thiscall nlohmann::json_abi_v3_11_3:: ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::emplace(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *this,basic_json *param_1,Value *param_2) { char cVar1; int8 extraout_RDX; int8 uVar2; basic_json *pbVar3; int1 auVar4 [16]; pbVar3 = *(basic_json **)this; do { if (pbVar3 == *(basic_json **)(this + 8)) { std:: vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> :: emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&,minja::Value> ((vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *)this,param_1,param_2); pbVar3 = (basic_json *)(*(long *)(this + 8) + -0x60); uVar2 = CONCAT71((int7)((ulong)extraout_RDX >> 8),1); LAB_0013d55f: auVar4._8_8_ = uVar2; auVar4._0_8_ = pbVar3; return auVar4; } cVar1 = json_abi_v3_11_3::operator==(pbVar3,param_1); if (cVar1 != '\0') { uVar2 = 0; goto LAB_0013d55f; } pbVar3 = pbVar3 + 0x60; } while( true ); }
40,688
MemoryManager::getByte(unsigned int, unsigned int*)
DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/MemoryManager.cpp
uint8_t MemoryManager::getByte(uint32_t addr, uint32_t *cycles) { if (!this->isAddrExist(addr)) { dbgprintf("Byte read to invalid addr 0x%x!\n", addr); return false; } if (this->cache != nullptr) { return this->cache->getByte(addr, cycles); } uint32_t i = this->getFirstEntryId(addr); uint32_t j = this->getSecondEntryId(addr); uint32_t k = this->getPageOffset(addr); return this->memory[i][j][k]; }
O0
cpp
MemoryManager::getByte(unsigned int, unsigned int*): subq $0x38, %rsp movq %rdi, 0x28(%rsp) movl %esi, 0x24(%rsp) movq %rdx, 0x18(%rsp) movq 0x28(%rsp), %rdi movq %rdi, (%rsp) movl 0x24(%rsp), %esi callq 0x3430 testb $0x1, %al jne 0x3764 movl 0x24(%rsp), %esi leaq 0x4a2b(%rip), %rdi # 0x817e movb $0x0, %al callq 0x2f60 movb $0x0, 0x37(%rsp) jmp 0x37e5 movq (%rsp), %rax cmpq $0x0, 0x2000(%rax) je 0x3791 movq (%rsp), %rax movq 0x2000(%rax), %rdi movl 0x24(%rsp), %esi movq 0x18(%rsp), %rdx callq 0x4780 movb %al, 0x37(%rsp) jmp 0x37e5 movq (%rsp), %rdi movl 0x24(%rsp), %esi callq 0x33c0 movq (%rsp), %rdi movl %eax, 0x14(%rsp) movl 0x24(%rsp), %esi callq 0x33e0 movq (%rsp), %rdi movl %eax, 0x10(%rsp) movl 0x24(%rsp), %esi callq 0x3650 movl %eax, %ecx movq (%rsp), %rax movl %ecx, 0xc(%rsp) movl 0x14(%rsp), %ecx movq (%rax,%rcx,8), %rax movl 0x10(%rsp), %ecx movq (%rax,%rcx,8), %rax movl 0xc(%rsp), %ecx movb (%rax,%rcx), %al movb %al, 0x37(%rsp) movb 0x37(%rsp), %al addq $0x38, %rsp retq nop
_ZN13MemoryManager7getByteEjPj: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_14], esi mov [rsp+38h+var_20], rdx mov rdi, [rsp+38h+var_10]; this mov [rsp+38h+var_38], rdi mov esi, [rsp+38h+var_14]; unsigned int call _ZN13MemoryManager11isAddrExistEj; MemoryManager::isAddrExist(uint) test al, 1 jnz short loc_3764 mov esi, [rsp+38h+var_14] lea rdi, aByteReadToInva; "Byte read to invalid addr 0x%x!\n" mov al, 0 call _Z9dbgprintfPKcz; dbgprintf(char const*,...) mov [rsp+38h+var_1], 0 jmp loc_37E5 loc_3764: mov rax, [rsp+38h+var_38] cmp qword ptr [rax+2000h], 0 jz short loc_3791 mov rax, [rsp+38h+var_38] mov rdi, [rax+2000h]; this mov esi, [rsp+38h+var_14]; unsigned int mov rdx, [rsp+38h+var_20]; unsigned int * call _ZN5Cache7getByteEjPj; Cache::getByte(uint,uint *) mov [rsp+38h+var_1], al jmp short loc_37E5 loc_3791: mov rdi, [rsp+38h+var_38]; this mov esi, [rsp+38h+var_14]; unsigned int call _ZN13MemoryManager15getFirstEntryIdEj; MemoryManager::getFirstEntryId(uint) mov rdi, [rsp+38h+var_38]; this mov [rsp+38h+var_24], eax mov esi, [rsp+38h+var_14]; unsigned int call _ZN13MemoryManager16getSecondEntryIdEj; MemoryManager::getSecondEntryId(uint) mov rdi, [rsp+38h+var_38]; this mov [rsp+38h+var_28], eax mov esi, [rsp+38h+var_14]; unsigned int call _ZN13MemoryManager13getPageOffsetEj; MemoryManager::getPageOffset(uint) mov ecx, eax mov rax, [rsp+38h+var_38] mov [rsp+38h+var_2C], ecx mov ecx, [rsp+38h+var_24] mov rax, [rax+rcx*8] mov ecx, [rsp+38h+var_28] mov rax, [rax+rcx*8] mov ecx, [rsp+38h+var_2C] mov al, [rax+rcx] mov [rsp+38h+var_1], al loc_37E5: mov al, [rsp+38h+var_1] add rsp, 38h retn
char MemoryManager::getByte( Cache **this, unsigned int a2, unsigned int *a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { long long v11; // rdx long long v12; // rcx long long v13; // r8 long long v14; // r9 __m128 v15; // xmm4 __m128 v16; // xmm5 unsigned int SecondEntryId; // [rsp+10h] [rbp-28h] int FirstEntryId; // [rsp+14h] [rbp-24h] if ( MemoryManager::isAddrExist((MemoryManager *)this, a2) ) { if ( this[1024] ) { return Cache::getByte(this[1024], a2, a3); } else { FirstEntryId = MemoryManager::getFirstEntryId((MemoryManager *)this, a2); SecondEntryId = MemoryManager::getSecondEntryId((MemoryManager *)this, a2); return *(_BYTE *)(*((_QWORD *)this[FirstEntryId] + SecondEntryId) + (unsigned int)MemoryManager::getPageOffset((MemoryManager *)this, a2)); } } else { dbgprintf( "Byte read to invalid addr 0x%x!\n", a2, v11, v12, v13, v14, a4, a5, a6, a7, v15, v16, a10, a11, (char)this); return 0; } }
getByte: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RDI MOV dword ptr [RSP + 0x24],ESI MOV qword ptr [RSP + 0x18],RDX MOV RDI,qword ptr [RSP + 0x28] MOV qword ptr [RSP],RDI MOV ESI,dword ptr [RSP + 0x24] CALL 0x00103430 TEST AL,0x1 JNZ 0x00103764 MOV ESI,dword ptr [RSP + 0x24] LEA RDI,[0x10817e] MOV AL,0x0 CALL 0x00102f60 MOV byte ptr [RSP + 0x37],0x0 JMP 0x001037e5 LAB_00103764: MOV RAX,qword ptr [RSP] CMP qword ptr [RAX + 0x2000],0x0 JZ 0x00103791 MOV RAX,qword ptr [RSP] MOV RDI,qword ptr [RAX + 0x2000] MOV ESI,dword ptr [RSP + 0x24] MOV RDX,qword ptr [RSP + 0x18] CALL 0x00104780 MOV byte ptr [RSP + 0x37],AL JMP 0x001037e5 LAB_00103791: MOV RDI,qword ptr [RSP] MOV ESI,dword ptr [RSP + 0x24] CALL 0x001033c0 MOV RDI,qword ptr [RSP] MOV dword ptr [RSP + 0x14],EAX MOV ESI,dword ptr [RSP + 0x24] CALL 0x001033e0 MOV RDI,qword ptr [RSP] MOV dword ptr [RSP + 0x10],EAX MOV ESI,dword ptr [RSP + 0x24] CALL 0x00103650 MOV ECX,EAX MOV RAX,qword ptr [RSP] MOV dword ptr [RSP + 0xc],ECX MOV ECX,dword ptr [RSP + 0x14] MOV RAX,qword ptr [RAX + RCX*0x8] MOV ECX,dword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + RCX*0x8] MOV ECX,dword ptr [RSP + 0xc] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RSP + 0x37],AL LAB_001037e5: MOV AL,byte ptr [RSP + 0x37] ADD RSP,0x38 RET
/* MemoryManager::getByte(unsigned int, unsigned int*) */ int8 __thiscall MemoryManager::getByte(MemoryManager *this,uint param_1,uint *param_2) { long lVar1; int1 extraout_AL; uint uVar2; uint uVar3; uint uVar4; ulong uVar5; int7 extraout_var; int7 extraout_var_00; int7 uVar6; int1 local_1; uVar5 = isAddrExist(this,param_1); if ((uVar5 & 1) == 0) { dbgprintf("Byte read to invalid addr 0x%x!\n",(ulong)param_1); local_1 = 0; uVar6 = extraout_var; } else if (*(long *)(this + 0x2000) == 0) { uVar2 = getFirstEntryId(this,param_1); uVar3 = getSecondEntryId(this,param_1); uVar4 = getPageOffset(this,param_1); lVar1 = *(long *)(*(long *)(this + (ulong)uVar2 * 8) + (ulong)uVar3 * 8); local_1 = *(int1 *)(lVar1 + (ulong)uVar4); uVar6 = (int7)((ulong)lVar1 >> 8); } else { Cache::getByte(*(Cache **)(this + 0x2000),param_1,param_2); uVar6 = extraout_var_00; local_1 = extraout_AL; } return CONCAT71(uVar6,local_1); }
40,689
MemoryManager::getByte(unsigned int, unsigned int*)
DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/MemoryManager.cpp
uint8_t MemoryManager::getByte(uint32_t addr, uint32_t *cycles) { if (!this->isAddrExist(addr)) { dbgprintf("Byte read to invalid addr 0x%x!\n", addr); return false; } if (this->cache != nullptr) { return this->cache->getByte(addr, cycles); } uint32_t i = this->getFirstEntryId(addr); uint32_t j = this->getSecondEntryId(addr); uint32_t k = this->getPageOffset(addr); return this->memory[i][j][k]; }
O1
cpp
MemoryManager::getByte(unsigned int, unsigned int*): pushq %rbx movl %esi, %eax shrl $0x16, %eax movq (%rdi,%rax,8), %rax testq %rax, %rax je 0x2f94 movl %esi, %ecx shrl $0x9, %ecx andl $0x1ff8, %ecx # imm = 0x1FF8 cmpq $0x0, (%rax,%rcx) je 0x2f94 movq 0x2000(%rdi), %rdi testq %rdi, %rdi je 0x2f85 popq %rbx jmp 0x39b4 andl $0xfff, %esi # imm = 0xFFF movq (%rax,%rcx), %rax movb (%rax,%rsi), %bl jmp 0x2fa4 leaq 0x21de(%rip), %rdi # 0x5179 xorl %ebx, %ebx xorl %eax, %eax callq 0x22c0 movl %ebx, %eax popq %rbx retq
_ZN13MemoryManager7getByteEjPj: push rbx mov eax, esi shr eax, 16h mov rax, [rdi+rax*8] test rax, rax jz short loc_2F94 mov ecx, esi shr ecx, 9 and ecx, 1FF8h cmp qword ptr [rax+rcx], 0 jz short loc_2F94 mov rdi, [rdi+2000h]; this test rdi, rdi jz short loc_2F85 pop rbx jmp _ZN5Cache7getByteEjPj; Cache::getByte(uint,uint *) loc_2F85: and esi, 0FFFh mov rax, [rax+rcx] mov bl, [rax+rsi] jmp short loc_2FA4 loc_2F94: lea rdi, aByteReadToInva; "Byte read to invalid addr 0x%x!\n" xor ebx, ebx xor eax, eax call _Z9dbgprintfPKcz; dbgprintf(char const*,...) loc_2FA4: mov eax, ebx pop rbx retn
long long MemoryManager::getByte( MemoryManager *this, long long a2, unsigned int *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) { unsigned int v14; // ebx long long v15; // rax Cache *v16; // rdi char v18; // [rsp+0h] [rbp-8h] v15 = *((_QWORD *)this + ((unsigned int)a2 >> 22)); if ( v15 && (a4 = ((unsigned int)a2 >> 9) & 0x1FF8, *(_QWORD *)(v15 + a4)) ) { v16 = (Cache *)*((_QWORD *)this + 1024); if ( v16 ) return Cache::getByte(v16, a2, a3); LOBYTE(v14) = *(_BYTE *)(*(_QWORD *)(v15 + a4) + (a2 & 0xFFF)); } else { v14 = 0; dbgprintf( "Byte read to invalid addr 0x%x!\n", a2, (long long)a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v18); } return v14; }
getByte: PUSH RBX MOV EAX,ESI SHR EAX,0x16 MOV RAX,qword ptr [RDI + RAX*0x8] TEST RAX,RAX JZ 0x00102f94 MOV ECX,ESI SHR ECX,0x9 AND ECX,0x1ff8 CMP qword ptr [RAX + RCX*0x1],0x0 JZ 0x00102f94 MOV RDI,qword ptr [RDI + 0x2000] TEST RDI,RDI JZ 0x00102f85 POP RBX JMP 0x001039b4 LAB_00102f85: AND ESI,0xfff MOV RAX,qword ptr [RAX + RCX*0x1] MOV BL,byte ptr [RAX + RSI*0x1] JMP 0x00102fa4 LAB_00102f94: LEA RDI,[0x105179] XOR EBX,EBX XOR EAX,EAX CALL 0x001022c0 LAB_00102fa4: MOV EAX,EBX POP RBX RET
/* MemoryManager::getByte(unsigned int, unsigned int*) */ ulong __thiscall MemoryManager::getByte(MemoryManager *this,uint param_1,uint *param_2) { long lVar1; ulong uVar2; int8 unaff_RBX; lVar1 = *(long *)(this + (ulong)(param_1 >> 0x16) * 8); if ((lVar1 == 0) || (uVar2 = (ulong)(param_1 >> 9 & 0x1ff8), *(long *)(lVar1 + uVar2) == 0)) { uVar2 = 0; dbgprintf("Byte read to invalid addr 0x%x!\n"); } else { if (*(Cache **)(this + 0x2000) != (Cache *)0x0) { uVar2 = Cache::getByte(*(Cache **)(this + 0x2000),param_1,param_2); return uVar2; } uVar2 = CONCAT71((int7)((ulong)unaff_RBX >> 8), *(int1 *)(*(long *)(lVar1 + uVar2) + (ulong)(param_1 & 0xfff))); } return uVar2 & 0xffffffff; }
40,690
MemoryManager::getByte(unsigned int, unsigned int*)
DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/MemoryManager.cpp
uint8_t MemoryManager::getByte(uint32_t addr, uint32_t *cycles) { if (!this->isAddrExist(addr)) { dbgprintf("Byte read to invalid addr 0x%x!\n", addr); return false; } if (this->cache != nullptr) { return this->cache->getByte(addr, cycles); } uint32_t i = this->getFirstEntryId(addr); uint32_t j = this->getSecondEntryId(addr); uint32_t k = this->getPageOffset(addr); return this->memory[i][j][k]; }
O2
cpp
MemoryManager::getByte(unsigned int, unsigned int*): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdx, %r15 movl %esi, %ebx movq %rdi, %r14 callq 0x2b6c testb %al, %al je 0x2d24 movq 0x2000(%r14), %rdi testq %rdi, %rdi je 0x2d38 movl %ebx, %esi movq %r15, %rdx addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x36a2 leaq 0x244e(%rip), %rdi # 0x5179 xorl %ebp, %ebp movl %ebx, %esi xorl %eax, %eax callq 0x297d jmp 0x2d59 movl %ebx, %eax andl $0xfff, %eax # imm = 0xFFF movl %ebx, %ecx shrl $0x16, %ecx movq (%r14,%rcx,8), %rcx shrl $0x9, %ebx andl $0x1ff8, %ebx # imm = 0x1FF8 movq (%rcx,%rbx), %rcx movb (%rcx,%rax), %bpl movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
_ZN13MemoryManager7getByteEjPj: push rbp push r15 push r14 push rbx push rax mov r15, rdx mov ebx, esi mov r14, rdi call _ZN13MemoryManager11isAddrExistEj; MemoryManager::isAddrExist(uint) test al, al jz short loc_2D24 mov rdi, [r14+2000h]; this test rdi, rdi jz short loc_2D38 mov esi, ebx; unsigned int mov rdx, r15; unsigned int * add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _ZN5Cache7getByteEjPj; Cache::getByte(uint,uint *) loc_2D24: lea rdi, aByteReadToInva; "Byte read to invalid addr 0x%x!\n" xor ebp, ebp mov esi, ebx xor eax, eax call _Z9dbgprintfPKcz; dbgprintf(char const*,...) jmp short loc_2D59 loc_2D38: mov eax, ebx and eax, 0FFFh mov ecx, ebx shr ecx, 16h mov rcx, [r14+rcx*8] shr ebx, 9 and ebx, 1FF8h mov rcx, [rcx+rbx] mov bpl, [rcx+rax] loc_2D59: mov eax, ebp add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long MemoryManager::getByte( MemoryManager *this, unsigned int a2, unsigned int *a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { char v11; // al unsigned int v12; // ebp long long v15; // rdx long long v16; // rcx long long v17; // r8 long long v18; // r9 __m128 v19; // xmm4 __m128 v20; // xmm5 Cache *v21; // rdi char v23; // [rsp-8h] [rbp-28h] v23 = v11; if ( MemoryManager::isAddrExist(this, a2) ) { v21 = (Cache *)*((_QWORD *)this + 1024); if ( v21 ) return Cache::getByte(v21, a2, a3); LOBYTE(v12) = *(_BYTE *)(*(_QWORD *)(*((_QWORD *)this + (a2 >> 22)) + ((a2 >> 9) & 0x1FF8)) + (a2 & 0xFFF)); } else { v12 = 0; dbgprintf("Byte read to invalid addr 0x%x!\n", a2, v15, v16, v17, v18, a4, a5, a6, a7, v19, v20, a10, a11, v23); } return v12; }
getByte: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R15,RDX MOV EBX,ESI MOV R14,RDI CALL 0x00102b6c TEST AL,AL JZ 0x00102d24 MOV RDI,qword ptr [R14 + 0x2000] TEST RDI,RDI JZ 0x00102d38 MOV ESI,EBX MOV RDX,R15 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x001036a2 LAB_00102d24: LEA RDI,[0x105179] XOR EBP,EBP MOV ESI,EBX XOR EAX,EAX CALL 0x0010297d JMP 0x00102d59 LAB_00102d38: MOV EAX,EBX AND EAX,0xfff MOV ECX,EBX SHR ECX,0x16 MOV RCX,qword ptr [R14 + RCX*0x8] SHR EBX,0x9 AND EBX,0x1ff8 MOV RCX,qword ptr [RCX + RBX*0x1] MOV BPL,byte ptr [RCX + RAX*0x1] LAB_00102d59: MOV EAX,EBP ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
/* MemoryManager::getByte(unsigned int, unsigned int*) */ ulong __thiscall MemoryManager::getByte(MemoryManager *this,uint param_1,uint *param_2) { char cVar1; ulong uVar2; int8 unaff_RBP; cVar1 = isAddrExist(this,param_1); if (cVar1 == '\0') { uVar2 = 0; dbgprintf("Byte read to invalid addr 0x%x!\n",param_1); } else { if (*(Cache **)(this + 0x2000) != (Cache *)0x0) { uVar2 = Cache::getByte(*(Cache **)(this + 0x2000),param_1,param_2); return uVar2; } uVar2 = CONCAT71((int7)((ulong)unaff_RBP >> 8), *(int1 *) (*(long *)(*(long *)(this + (ulong)(param_1 >> 0x16) * 8) + (ulong)(param_1 >> 9 & 0x1ff8)) + (ulong)(param_1 & 0xfff))); } return uVar2 & 0xffffffff; }
40,691
MemoryManager::getByte(unsigned int, unsigned int*)
DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/MemoryManager.cpp
uint8_t MemoryManager::getByte(uint32_t addr, uint32_t *cycles) { if (!this->isAddrExist(addr)) { dbgprintf("Byte read to invalid addr 0x%x!\n", addr); return false; } if (this->cache != nullptr) { return this->cache->getByte(addr, cycles); } uint32_t i = this->getFirstEntryId(addr); uint32_t j = this->getSecondEntryId(addr); uint32_t k = this->getPageOffset(addr); return this->memory[i][j][k]; }
O3
cpp
MemoryManager::getByte(unsigned int, unsigned int*): pushq %rbx movl %esi, %eax shrl $0x16, %eax movq (%rdi,%rax,8), %rax testq %rax, %rax je 0x2f4c movl %esi, %ecx shrl $0x9, %ecx andl $0x1ff8, %ecx # imm = 0x1FF8 movq (%rax,%rcx), %rax testq %rax, %rax je 0x2f4c movq 0x2000(%rdi), %rdi testq %rdi, %rdi je 0x2f41 popq %rbx jmp 0x3902 andl $0xfff, %esi # imm = 0xFFF movb (%rax,%rsi), %bl jmp 0x2f5c leaq 0x2226(%rip), %rdi # 0x5179 xorl %ebx, %ebx xorl %eax, %eax callq 0x22c0 movl %ebx, %eax popq %rbx retq
_ZN13MemoryManager7getByteEjPj: push rbx mov eax, esi shr eax, 16h mov rax, [rdi+rax*8] test rax, rax jz short loc_2F4C mov ecx, esi shr ecx, 9 and ecx, 1FF8h mov rax, [rax+rcx] test rax, rax jz short loc_2F4C mov rdi, [rdi+2000h]; this test rdi, rdi jz short loc_2F41 pop rbx jmp _ZN5Cache7getByteEjPj; Cache::getByte(uint,uint *) loc_2F41: and esi, 0FFFh mov bl, [rax+rsi] jmp short loc_2F5C loc_2F4C: lea rdi, aByteReadToInva; "Byte read to invalid addr 0x%x!\n" xor ebx, ebx xor eax, eax call _Z9dbgprintfPKcz; dbgprintf(char const*,...) loc_2F5C: mov eax, ebx pop rbx retn
long long MemoryManager::getByte( MemoryManager *this, long long a2, unsigned int *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) { unsigned int v14; // ebx long long v15; // rax long long v16; // rax Cache *v17; // rdi char v19; // [rsp+0h] [rbp-8h] v15 = *((_QWORD *)this + ((unsigned int)a2 >> 22)); if ( v15 && (a4 = ((unsigned int)a2 >> 9) & 0x1FF8, (v16 = *(_QWORD *)(v15 + a4)) != 0) ) { v17 = (Cache *)*((_QWORD *)this + 1024); if ( v17 ) return Cache::getByte(v17, a2, a3); LOBYTE(v14) = *(_BYTE *)(v16 + (a2 & 0xFFF)); } else { v14 = 0; dbgprintf( "Byte read to invalid addr 0x%x!\n", a2, (long long)a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v19); } return v14; }
getByte: PUSH RBX MOV EAX,ESI SHR EAX,0x16 MOV RAX,qword ptr [RDI + RAX*0x8] TEST RAX,RAX JZ 0x00102f4c MOV ECX,ESI SHR ECX,0x9 AND ECX,0x1ff8 MOV RAX,qword ptr [RAX + RCX*0x1] TEST RAX,RAX JZ 0x00102f4c MOV RDI,qword ptr [RDI + 0x2000] TEST RDI,RDI JZ 0x00102f41 POP RBX JMP 0x00103902 LAB_00102f41: AND ESI,0xfff MOV BL,byte ptr [RAX + RSI*0x1] JMP 0x00102f5c LAB_00102f4c: LEA RDI,[0x105179] XOR EBX,EBX XOR EAX,EAX CALL 0x001022c0 LAB_00102f5c: MOV EAX,EBX POP RBX RET
/* MemoryManager::getByte(unsigned int, unsigned int*) */ ulong __thiscall MemoryManager::getByte(MemoryManager *this,uint param_1,uint *param_2) { long lVar1; ulong uVar2; int8 unaff_RBX; if ((*(long *)(this + (ulong)(param_1 >> 0x16) * 8) == 0) || (lVar1 = *(long *)(*(long *)(this + (ulong)(param_1 >> 0x16) * 8) + (ulong)(param_1 >> 9 & 0x1ff8)), lVar1 == 0)) { uVar2 = 0; dbgprintf("Byte read to invalid addr 0x%x!\n"); } else { if (*(Cache **)(this + 0x2000) != (Cache *)0x0) { uVar2 = Cache::getByte(*(Cache **)(this + 0x2000),param_1,param_2); return uVar2; } uVar2 = CONCAT71((int7)((ulong)unaff_RBX >> 8),*(int1 *)(lVar1 + (ulong)(param_1 & 0xfff)) ); } return uVar2 & 0xffffffff; }
40,692
str2int
eloqsql/strings/str2int.c
char *str2int(register const char *src, register int radix, long int lower, long int upper, long int *val) { int sign; /* is number negative (+1) or positive (-1) */ int n; /* number of digits yet to be converted */ long limit; /* "largest" possible valid input */ long scale; /* the amount to multiply next digit by */ long sofar; /* the running value */ register int d; /* (negative of) next digit */ char *start; int digits[32]; /* Room for numbers */ /* Make sure *val is sensible in case of error */ *val = 0; /* Check that the radix is in the range 2..36 */ #ifndef DBUG_OFF if (radix < 2 || radix > 36) { errno=EDOM; return NullS; } #endif /* The basic problem is: how do we handle the conversion of a number without resorting to machine-specific code to check for overflow? Obviously, we have to ensure that no calculation can overflow. We are guaranteed that the "lower" and "upper" arguments are valid machine integers. On sign-and-magnitude, twos-complement, and ones-complement machines all, if +|n| is representable, so is -|n|, but on twos complement machines the converse is not true. So the "maximum" representable number has a negative representative. Limit is set to MY_MIN(-|lower|,-|upper|); this is the "largest" number we are concerned with. */ /* Calculate Limit using Scale as a scratch variable */ if ((limit = lower) > 0) limit = -limit; if ((scale = upper) > 0) scale = -scale; if (scale < limit) limit = scale; /* Skip leading spaces and check for a sign. Note: because on a 2s complement machine MinLong is a valid integer but |MinLong| is not, we have to keep the current converted value (and the scale!) as *negative* numbers, so the sign is the opposite of what you might expect. */ while (my_isspace(&my_charset_latin1,*src)) src++; sign = -1; if (*src == '+') src++; else if (*src == '-') src++, sign = 1; /* Skip leading zeros so that we never compute a power of radix in scale that we won't have a need for. Otherwise sticking enough 0s in front of a number could cause the multiplication to overflow when it neededn't. */ start=(char*) src; while (*src == '0') src++; /* Move over the remaining digits. We have to convert from left to left in order to avoid overflow. Answer is after last digit. */ for (n = 0; (digits[n]=char_val(*src)) < radix && n < 20; n++,src++) ; /* Check that there is at least one digit */ if (start == src) { errno=EDOM; return NullS; } /* The invariant we want to maintain is that src is just to the right of n digits, we've converted k digits to sofar, scale = -radix**k, and scale < sofar < 0. Now if the final number is to be within the original Limit, we must have (to the left)*scale+sofar >= Limit, or (to the left)*scale >= Limit-sofar, i.e. the digits to the left of src must form an integer <= (Limit-sofar)/(scale). In particular, this is true of the next digit. In our incremental calculation of Limit, IT IS VITAL that (-|N|)/(-|D|) = |N|/|D| */ for (sofar = 0, scale = -1; --n >= 1;) { if ((long) -(d=digits[n]) < limit) { errno=ERANGE; return NullS; } limit = (limit+d)/radix, sofar += d*scale; scale *= radix; } if (n == 0) { if ((long) -(d=digits[n]) < limit) /* get last digit */ { errno=ERANGE; return NullS; } sofar+=d*scale; } /* Now it might still happen that sofar = -32768 or its equivalent, so we can't just multiply by the sign and check that the result is in the range lower..upper. All of this caution is a right pain in the neck. If only there were a standard routine which says generate thus and such a signal on integer overflow... But not enough machines can do it *SIGH*. */ if (sign < 0) { if (sofar < -LONG_MAX || (sofar= -sofar) > upper) { errno=ERANGE; return NullS; } } else if (sofar < lower) { errno=ERANGE; return NullS; } *val = sofar; errno=0; /* indicate that all went well */ return (char*) src; }
O3
c
str2int: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x80, %rsp movq %rdx, %r9 movq $0x0, (%r8) movq %rdx, %rax negq %rax cmovsq %rdx, %rax movq %rcx, %rdx negq %rdx cmovnsq %rcx, %rdx leaq 0x2d4fc1(%rip), %r10 # 0x3abf20 movq 0x40(%r10), %r11 movzbl (%rdi), %r10d incq %rdi testb $0x8, 0x1(%r11,%r10) jne 0xd6f63 negq %rax cmpq %rax, %rdx cmovlq %rdx, %rax cmpl $0x2b, %r10d je 0xd6f90 cmpl $0x2d, %r10d jne 0xd6f8d xorl %r10d, %r10d jmp 0xd6f93 decq %rdi movb $0x1, %r10b leaq -0x1(%rdi), %rbx movb 0x1(%rbx), %r14b incq %rbx cmpb $0x30, %r14b je 0xd6f97 xorl %r11d, %r11d xorl %edx, %edx leal -0x30(%r14), %r15d cmpb $0x9, %r15b ja 0xd6fb9 movzbl %r15b, %r15d jmp 0xd6fe5 leal -0x41(%r14), %r15d cmpb $0x19, %r15b ja 0xd6fcd movzbl %r14b, %r15d addl $-0x37, %r15d jmp 0xd6fe5 leal -0x61(%r14), %r12d movl $0x7f, %r15d cmpb $0x19, %r12b ja 0xd6fe5 movzbl %r14b, %r15d addl $-0x57, %r15d movl %r15d, -0xa0(%rbp,%rdx,4) cmpl %esi, %r15d jge 0xd7007 cmpq $0x13, %rdx ja 0xd7007 incq %rdx movb 0x1(%rbx), %r14b incq %rbx incl %r11d jmp 0xd6fa9 cmpq %rdi, %rbx je 0xd704f cmpq $0x2, %rdx jb 0xd7057 movslq %esi, %r14 movq $-0x1, %rdi xorl %esi, %esi decl %r11d movslq -0xa0(%rbp,%r11,4), %r15 movq %r15, %rdx negq %rdx cmpq %rdx, %rax jg 0xd7092 addq %r15, %rax cqto idivq %r14 imulq %rdi, %r15 addq %r15, %rsi imulq %r14, %rdi cmpl $0x1, %r11d jg 0xd701e jmp 0xd7064 movl $0x21, %r14d jmp 0xd7098 xorl %esi, %esi decl %edx jne 0xd707d movq $-0x1, %rdi movslq -0xa0(%rbp), %rdx movq %rdx, %r11 negq %r11 cmpq %r11, %rax jg 0xd7092 imulq %rdx, %rdi addq %rdi, %rsi testb %r10b, %r10b je 0xd70b5 negq %rsi seto %al cmpq %rcx, %rsi setg %cl orb %al, %cl je 0xd70ba movl $0x22, %r14d xorl %ebx, %ebx callq 0x29790 movl %r14d, (%rax) movq %rbx, %rax addq $0x80, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq cmpq %r9, %rsi jl 0xd7092 movq %rsi, (%r8) xorl %r14d, %r14d jmp 0xd709a nop
str2int: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 80h mov r9, rdx mov qword ptr [r8], 0 mov rax, rdx neg rax cmovs rax, rdx mov rdx, rcx neg rdx cmovns rdx, rcx lea r10, my_charset_latin1 mov r11, [r10+40h] loc_D6F63: movzx r10d, byte ptr [rdi] inc rdi test byte ptr [r11+r10+1], 8 jnz short loc_D6F63 neg rax cmp rdx, rax cmovl rax, rdx cmp r10d, 2Bh ; '+' jz short loc_D6F90 cmp r10d, 2Dh ; '-' jnz short loc_D6F8D xor r10d, r10d jmp short loc_D6F93 loc_D6F8D: dec rdi loc_D6F90: mov r10b, 1 loc_D6F93: lea rbx, [rdi-1] loc_D6F97: mov r14b, [rbx+1] inc rbx cmp r14b, 30h ; '0' jz short loc_D6F97 xor r11d, r11d xor edx, edx loc_D6FA9: lea r15d, [r14-30h] cmp r15b, 9 ja short loc_D6FB9 movzx r15d, r15b jmp short loc_D6FE5 loc_D6FB9: lea r15d, [r14-41h] cmp r15b, 19h ja short loc_D6FCD movzx r15d, r14b add r15d, 0FFFFFFC9h jmp short loc_D6FE5 loc_D6FCD: lea r12d, [r14-61h] mov r15d, 7Fh cmp r12b, 19h ja short loc_D6FE5 movzx r15d, r14b add r15d, 0FFFFFFA9h loc_D6FE5: mov [rbp+rdx*4+var_A0], r15d cmp r15d, esi jge short loc_D7007 cmp rdx, 13h ja short loc_D7007 inc rdx mov r14b, [rbx+1] inc rbx inc r11d jmp short loc_D6FA9 loc_D7007: cmp rbx, rdi jz short loc_D704F cmp rdx, 2 jb short loc_D7057 movsxd r14, esi mov rdi, 0FFFFFFFFFFFFFFFFh xor esi, esi loc_D701E: dec r11d movsxd r15, [rbp+r11*4+var_A0] mov rdx, r15 neg rdx cmp rax, rdx jg short loc_D7092 add rax, r15 cqo idiv r14 imul r15, rdi add rsi, r15 imul rdi, r14 cmp r11d, 1 jg short loc_D701E jmp short loc_D7064 loc_D704F: mov r14d, 21h ; '!' jmp short loc_D7098 loc_D7057: xor esi, esi dec edx jnz short loc_D707D mov rdi, 0FFFFFFFFFFFFFFFFh loc_D7064: movsxd rdx, [rbp+var_A0] mov r11, rdx neg r11 cmp rax, r11 jg short loc_D7092 imul rdi, rdx add rsi, rdi loc_D707D: test r10b, r10b jz short loc_D70B5 neg rsi seto al cmp rsi, rcx setnle cl or cl, al jz short loc_D70BA loc_D7092: mov r14d, 22h ; '"' loc_D7098: xor ebx, ebx loc_D709A: call ___errno_location mov [rax], r14d mov rax, rbx add rsp, 80h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_D70B5: cmp rsi, r9 jl short loc_D7092 loc_D70BA: mov [r8], rsi xor r14d, r14d jmp short loc_D709A
long long str2int(long long a1, int a2, long long a3, long long a4, long long *a5) { long long v6; // rax long long v7; // rdx long long v8; // r10 long long v9; // rax char v10; // r10 long long v11; // rbx unsigned __int8 v12; // r14 long long v13; // r11 unsigned long long i; // rdx int v15; // r15d long long v16; // r14 long long v17; // rsi long long v18; // r15 int v19; // r14d _DWORD v21[40]; // [rsp+0h] [rbp-A0h] *a5 = 0LL; v6 = -a3; if ( a3 > 0 ) v6 = a3; v7 = -a4; if ( a4 <= 0 ) v7 = a4; do v8 = *(unsigned __int8 *)a1++; while ( (*(_BYTE *)(*(_QWORD *)&my_charset_latin1[16] + v8 + 1) & 8) != 0 ); v9 = -v6; if ( v7 < v9 ) v9 = v7; if ( (_DWORD)v8 != 43 ) { if ( (_DWORD)v8 == 45 ) { v10 = 0; goto LABEL_13; } --a1; } v10 = 1; LABEL_13: v11 = a1 - 1; do v12 = *(_BYTE *)++v11; while ( v12 == 48 ); LODWORD(v13) = 0; for ( i = 0LL; ; ++i ) { LOBYTE(v15) = v12 - 48; if ( (unsigned __int8)(v12 - 48) > 9u ) { if ( (unsigned __int8)(v12 - 65) > 0x19u ) { v15 = 127; if ( (unsigned __int8)(v12 - 97) <= 0x19u ) v15 = v12 - 87; } else { v15 = v12 - 55; } } else { v15 = (unsigned __int8)v15; } v21[i] = v15; if ( v15 >= a2 || i > 0x13 ) break; v12 = *(_BYTE *)++v11; LODWORD(v13) = v13 + 1; } if ( v11 != a1 ) { if ( i >= 2 ) { v16 = a2; a1 = -1LL; v17 = 0LL; while ( 1 ) { v13 = (unsigned int)(v13 - 1); v18 = (int)v21[v13]; if ( v9 > -v18 ) goto LABEL_38; v9 = (v18 + v9) / v16; v17 += a1 * v18; a1 *= v16; if ( (int)v13 <= 1 ) goto LABEL_34; } } v17 = 0LL; if ( (_DWORD)i == 1 ) { a1 = -1LL; LABEL_34: if ( v9 > -(long long)v21[0] ) goto LABEL_38; a1 *= v21[0]; v17 += a1; } if ( v10 ) { v17 = -v17; if ( __OFSUB__(v17, 1LL) || v17 > a4 ) { LABEL_38: v19 = 34; goto LABEL_39; } } else if ( v17 < a3 ) { goto LABEL_38; } *a5 = v17; v19 = 0; goto LABEL_40; } v19 = 33; LABEL_39: v11 = 0LL; LABEL_40: *(_DWORD *)__errno_location(a1) = v19; return v11; }
str2int: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x80 MOV R9,RDX MOV qword ptr [R8],0x0 MOV RAX,RDX NEG RAX CMOVS RAX,RDX MOV RDX,RCX NEG RDX CMOVNS RDX,RCX LEA R10,[0x4abf20] MOV R11,qword ptr [R10 + 0x40] LAB_001d6f63: MOVZX R10D,byte ptr [RDI] INC RDI TEST byte ptr [R11 + R10*0x1 + 0x1],0x8 JNZ 0x001d6f63 NEG RAX CMP RDX,RAX CMOVL RAX,RDX CMP R10D,0x2b JZ 0x001d6f90 CMP R10D,0x2d JNZ 0x001d6f8d XOR R10D,R10D JMP 0x001d6f93 LAB_001d6f8d: DEC RDI LAB_001d6f90: MOV R10B,0x1 LAB_001d6f93: LEA RBX,[RDI + -0x1] LAB_001d6f97: MOV R14B,byte ptr [RBX + 0x1] INC RBX CMP R14B,0x30 JZ 0x001d6f97 XOR R11D,R11D XOR EDX,EDX LAB_001d6fa9: LEA R15D,[R14 + -0x30] CMP R15B,0x9 JA 0x001d6fb9 MOVZX R15D,R15B JMP 0x001d6fe5 LAB_001d6fb9: LEA R15D,[R14 + -0x41] CMP R15B,0x19 JA 0x001d6fcd MOVZX R15D,R14B ADD R15D,-0x37 JMP 0x001d6fe5 LAB_001d6fcd: LEA R12D,[R14 + -0x61] MOV R15D,0x7f CMP R12B,0x19 JA 0x001d6fe5 MOVZX R15D,R14B ADD R15D,-0x57 LAB_001d6fe5: MOV dword ptr [RBP + RDX*0x4 + -0xa0],R15D CMP R15D,ESI JGE 0x001d7007 CMP RDX,0x13 JA 0x001d7007 INC RDX MOV R14B,byte ptr [RBX + 0x1] INC RBX INC R11D JMP 0x001d6fa9 LAB_001d7007: CMP RBX,RDI JZ 0x001d704f CMP RDX,0x2 JC 0x001d7057 MOVSXD R14,ESI MOV RDI,-0x1 XOR ESI,ESI LAB_001d701e: DEC R11D MOVSXD R15,dword ptr [RBP + R11*0x4 + -0xa0] MOV RDX,R15 NEG RDX CMP RAX,RDX JG 0x001d7092 ADD RAX,R15 CQO IDIV R14 IMUL R15,RDI ADD RSI,R15 IMUL RDI,R14 CMP R11D,0x1 JG 0x001d701e JMP 0x001d7064 LAB_001d704f: MOV R14D,0x21 JMP 0x001d7098 LAB_001d7057: XOR ESI,ESI DEC EDX JNZ 0x001d707d MOV RDI,-0x1 LAB_001d7064: MOVSXD RDX,dword ptr [RBP + -0xa0] MOV R11,RDX NEG R11 CMP RAX,R11 JG 0x001d7092 IMUL RDI,RDX ADD RSI,RDI LAB_001d707d: TEST R10B,R10B JZ 0x001d70b5 NEG RSI SETO AL CMP RSI,RCX SETG CL OR CL,AL JZ 0x001d70ba LAB_001d7092: MOV R14D,0x22 LAB_001d7098: XOR EBX,EBX LAB_001d709a: CALL 0x00129790 MOV dword ptr [RAX],R14D MOV RAX,RBX ADD RSP,0x80 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001d70b5: CMP RSI,R9 JL 0x001d7092 LAB_001d70ba: MOV qword ptr [R8],RSI XOR R14D,R14D JMP 0x001d709a
byte * str2int(byte *param_1,int param_2,long param_3,long param_4,long *param_5) { long lVar1; int *piVar2; ulong uVar3; byte *pbVar4; long lVar5; byte *pbVar6; long lVar7; ulong uVar8; byte bVar9; int iVar10; uint uVar11; long lVar12; bool bVar13; uint local_a8 [32]; *param_5 = 0; lVar5 = -param_3; if (0 < param_3) { lVar5 = param_3; } lVar7 = -param_4; if (param_4 < 1) { lVar7 = param_4; } do { pbVar4 = param_1; bVar9 = *pbVar4; param_1 = pbVar4 + 1; } while ((PTR_ctype_latin1_004abf60[(ulong)bVar9 + 1] & 8) != 0); lVar1 = -lVar5; if (SBORROW8(lVar7,-lVar5) != lVar7 + lVar5 < 0) { lVar1 = lVar7; } pbVar6 = param_1; if ((bVar9 == 0x2b) || (pbVar6 = pbVar4, bVar9 != 0x2d)) { bVar13 = true; } else { bVar13 = false; pbVar6 = param_1; } pbVar4 = pbVar6 + -1; do { bVar9 = pbVar4[1]; pbVar4 = pbVar4 + 1; } while (bVar9 == 0x30); uVar8 = 0; uVar3 = 0; while( true ) { if ((byte)(bVar9 - 0x30) < 10) { uVar11 = (uint)(byte)(bVar9 - 0x30); } else if ((byte)(bVar9 + 0xbf) < 0x1a) { uVar11 = bVar9 - 0x37; } else { uVar11 = 0x7f; if ((byte)(bVar9 + 0x9f) < 0x1a) { uVar11 = bVar9 - 0x57; } } local_a8[uVar3] = uVar11; if ((param_2 <= (int)uVar11) || (0x13 < uVar3)) break; uVar3 = uVar3 + 1; bVar9 = pbVar4[1]; pbVar4 = pbVar4 + 1; uVar8 = (ulong)((int)uVar8 + 1); } if (pbVar4 == pbVar6) { iVar10 = 0x21; } else { if (uVar3 < 2) { lVar5 = 0; if ((int)uVar3 == 1) { lVar7 = -1; goto LAB_001d7064; } LAB_001d707d: if (bVar13) { lVar7 = -lVar5; bVar13 = -param_4 == lVar5; lVar5 = lVar7; if (bVar13 || lVar7 < param_4) { LAB_001d70ba: *param_5 = lVar5; iVar10 = 0; goto LAB_001d709a; } } else if (param_3 <= lVar5) goto LAB_001d70ba; } else { lVar7 = -1; lVar5 = 0; do { uVar11 = (int)uVar8 - 1; uVar8 = (ulong)uVar11; lVar12 = (long)(int)local_a8[uVar8]; if (lVar1 != -lVar12 && SBORROW8(lVar1,-lVar12) == lVar1 + lVar12 < 0) goto LAB_001d7092; lVar1 = (lVar1 + lVar12) / (long)param_2; lVar5 = lVar5 + lVar12 * lVar7; lVar7 = lVar7 * param_2; } while (1 < (int)uVar11); LAB_001d7064: lVar12 = (long)(int)local_a8[0]; if (lVar1 == -lVar12 || SBORROW8(lVar1,-lVar12) != lVar1 + lVar12 < 0) { lVar5 = lVar5 + lVar7 * lVar12; goto LAB_001d707d; } } LAB_001d7092: iVar10 = 0x22; } pbVar4 = (byte *)0x0; LAB_001d709a: piVar2 = __errno_location(); *piVar2 = iVar10; return pbVar4; }
40,693
ratio
eloqsql/strings/dtoa.c
static double ratio(Bigint *a, Bigint *b) { U da, db; int k, ka, kb; dval(&da)= b2d(a, &ka); dval(&db)= b2d(b, &kb); k= ka - kb + 32*(a->wds - b->wds); if (k > 0) word0(&da)+= (ULong)(k*Exp_msk1 * 1.0); else { k= -k; word0(&db)+= k*Exp_msk1; } return dval(&da) / dval(&db); }
O0
c
ratio: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rdi leaq -0x28(%rbp), %rsi callq 0xdd3e0 movsd %xmm0, -0x18(%rbp) movq -0x10(%rbp), %rdi leaq -0x2c(%rbp), %rsi callq 0xdd3e0 movsd %xmm0, -0x20(%rbp) movl -0x28(%rbp), %eax subl -0x2c(%rbp), %eax movq -0x8(%rbp), %rcx movl 0x14(%rcx), %ecx movq -0x10(%rbp), %rdx subl 0x14(%rdx), %ecx shll $0x5, %ecx addl %ecx, %eax movl %eax, -0x24(%rbp) cmpl $0x0, -0x24(%rbp) jle 0xdd084 movl -0x24(%rbp), %eax shll $0x14, %eax addl -0x14(%rbp), %eax movl %eax, -0x14(%rbp) jmp 0xdd098 xorl %eax, %eax subl -0x24(%rbp), %eax movl %eax, -0x24(%rbp) movl -0x24(%rbp), %eax shll $0x14, %eax addl -0x1c(%rbp), %eax movl %eax, -0x1c(%rbp) movsd -0x18(%rbp), %xmm0 divsd -0x20(%rbp), %xmm0 addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
ratio: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_8] lea rsi, [rbp+var_28] call b2d movsd [rbp+var_18], xmm0 mov rdi, [rbp+var_10] lea rsi, [rbp+var_2C] call b2d movsd [rbp+var_20], xmm0 mov eax, [rbp+var_28] sub eax, [rbp+var_2C] mov rcx, [rbp+var_8] mov ecx, [rcx+14h] mov rdx, [rbp+var_10] sub ecx, [rdx+14h] shl ecx, 5 add eax, ecx mov [rbp+var_24], eax cmp [rbp+var_24], 0 jle short loc_DD084 mov eax, [rbp+var_24] shl eax, 14h add eax, dword ptr [rbp+var_18+4] mov dword ptr [rbp+var_18+4], eax jmp short loc_DD098 loc_DD084: xor eax, eax sub eax, [rbp+var_24] mov [rbp+var_24], eax mov eax, [rbp+var_24] shl eax, 14h add eax, dword ptr [rbp+var_20+4] mov dword ptr [rbp+var_20+4], eax loc_DD098: movsd xmm0, [rbp+var_18] divsd xmm0, [rbp+var_20] add rsp, 30h pop rbp retn
double ratio(long long a1, long long a2) { int v3; // [rsp+4h] [rbp-2Ch] BYREF int v4; // [rsp+8h] [rbp-28h] BYREF int v5; // [rsp+Ch] [rbp-24h] double v6; // [rsp+10h] [rbp-20h] double v7; // [rsp+18h] [rbp-18h] long long v8; // [rsp+20h] [rbp-10h] long long v9; // [rsp+28h] [rbp-8h] v9 = a1; v8 = a2; v7 = b2d(a1, &v4); v6 = b2d(v8, &v3); v5 = 32 * (*(_DWORD *)(v9 + 20) - *(_DWORD *)(v8 + 20)) + v4 - v3; if ( v5 <= 0 ) { v5 = -v5; HIDWORD(v6) += v5 << 20; } else { HIDWORD(v7) += v5 << 20; } return v7 / v6; }
ratio: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[RBP + -0x28] CALL 0x001dd3e0 MOVSD qword ptr [RBP + -0x18],XMM0 MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0x2c] CALL 0x001dd3e0 MOVSD qword ptr [RBP + -0x20],XMM0 MOV EAX,dword ptr [RBP + -0x28] SUB EAX,dword ptr [RBP + -0x2c] MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0x14] MOV RDX,qword ptr [RBP + -0x10] SUB ECX,dword ptr [RDX + 0x14] SHL ECX,0x5 ADD EAX,ECX MOV dword ptr [RBP + -0x24],EAX CMP dword ptr [RBP + -0x24],0x0 JLE 0x001dd084 MOV EAX,dword ptr [RBP + -0x24] SHL EAX,0x14 ADD EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x14],EAX JMP 0x001dd098 LAB_001dd084: XOR EAX,EAX SUB EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x24],EAX MOV EAX,dword ptr [RBP + -0x24] SHL EAX,0x14 ADD EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x1c],EAX LAB_001dd098: MOVSD XMM0,qword ptr [RBP + -0x18] DIVSD XMM0,qword ptr [RBP + -0x20] ADD RSP,0x30 POP RBP RET
double ratio(long param_1,long param_2) { int iVar1; double dVar2; int local_34; int local_30 [2]; int8 local_28; int8 local_20; long local_18; long local_10; local_18 = param_2; local_10 = param_1; local_20 = (double)b2d(param_1,local_30); dVar2 = (double)b2d(local_18,&local_34); iVar1 = (local_30[0] - local_34) + (*(int *)(local_10 + 0x14) - *(int *)(local_18 + 0x14)) * 0x20; if (iVar1 < 1) { local_28._4_4_ = (int)((ulong)dVar2 >> 0x20); local_28 = (double)CONCAT44(iVar1 * -0x100000 + local_28._4_4_,SUB84(dVar2,0)); } else { local_20 = (double)CONCAT44(iVar1 * 0x100000 + local_20._4_4_,(int4)local_20); local_28 = dVar2; } return local_20 / local_28; }
40,694
minja::Value::operator-(minja::Value const&) const
monkey531[P]llama/common/./minja.hpp
Value operator-(const Value& rhs) const { if (is_number_integer() && rhs.is_number_integer()) return get<int64_t>() - rhs.get<int64_t>(); else return get<double>() - rhs.get<double>(); }
O3
cpp
minja::Value::operator-(minja::Value const&) const: pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdx, %r14 movq %rdi, %rbx movb 0x40(%rsi), %al addb $-0x5, %al cmpb $0x1, %al ja 0x5853f movb 0x40(%r14), %al addb $-0x5, %al cmpb $0x1, %al ja 0x5853f movq %rsi, %rdi callq 0x3da46 movq %rax, %r15 movq %r14, %rdi callq 0x3da46 subq %rax, %r15 leaq 0x40(%rbx), %r14 xorpd %xmm0, %xmm0 movupd %xmm0, (%rbx) movupd %xmm0, 0x10(%rbx) movupd %xmm0, 0x20(%rbx) movupd %xmm0, 0x30(%rbx) movupd %xmm0, 0x40(%rbx) movq %r14, %rdi movq %r15, %rsi callq 0x3ec0c jmp 0x5858b movq %rsi, %rdi callq 0x3db90 movsd %xmm0, 0x8(%rsp) movq %r14, %rdi callq 0x3db90 movsd 0x8(%rsp), %xmm1 subsd %xmm0, %xmm1 leaq 0x40(%rbx), %r14 xorpd %xmm0, %xmm0 movupd %xmm0, (%rbx) movupd %xmm0, 0x10(%rbx) movupd %xmm0, 0x20(%rbx) movupd %xmm0, 0x30(%rbx) movupd %xmm0, 0x40(%rbx) movq %r14, %rdi movapd %xmm1, %xmm0 callq 0x3f576 movq %r14, %rdi movl $0x1, %esi callq 0x3d970 movq %rbx, %rax addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq nop
_ZNK5minja5ValuemiERKS0_: push r15 push r14 push rbx sub rsp, 10h mov r14, rdx mov rbx, rdi mov al, [rsi+40h] add al, 0FBh cmp al, 1 ja short loc_5853F mov al, [r14+40h] add al, 0FBh cmp al, 1 ja short loc_5853F mov rdi, rsi call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void) mov r15, rax mov rdi, r14 call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void) sub r15, rax lea r14, [rbx+40h] xorpd xmm0, xmm0 movupd xmmword ptr [rbx], xmm0 movupd xmmword ptr [rbx+10h], xmm0 movupd xmmword ptr [rbx+20h], xmm0 movupd xmmword ptr [rbx+30h], xmm0 movupd xmmword ptr [rbx+40h], xmm0 mov rdi, r14 mov rsi, r15 call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE5EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_16number_integer_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::number_integer_t) jmp short loc_5858B loc_5853F: mov rdi, rsi call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) movsd [rsp+28h+var_20], xmm0 mov rdi, r14 call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) movsd xmm1, [rsp+28h+var_20] subsd xmm1, xmm0 lea r14, [rbx+40h] xorpd xmm0, xmm0 movupd xmmword ptr [rbx], xmm0 movupd xmmword ptr [rbx+10h], xmm0 movupd xmmword ptr [rbx+20h], xmm0 movupd xmmword ptr [rbx+30h], xmm0 movupd xmmword ptr [rbx+40h], xmm0 mov rdi, r14 movapd xmm0, xmm1 call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE7EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_14number_float_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::number_float_t) loc_5858B: mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rax, rbx add rsp, 10h pop rbx pop r14 pop r15 retn
long long minja::Value::operator-(long long a1, long long a2, long long a3) { long long v4; // r15 long long v5; // rax char *v6; // r14 double v7; // xmm1_8 double v9; // [rsp+8h] [rbp-20h] if ( (unsigned __int8)(*(_BYTE *)(a2 + 64) - 5) > 1u || (unsigned __int8)(*(_BYTE *)(a3 + 64) - 5) > 1u ) { v9 = minja::Value::get<double>(a2); v7 = v9 - minja::Value::get<double>(a3); v6 = (char *)(a1 + 64); *(_OWORD *)a1 = 0LL; *(_OWORD *)(a1 + 16) = 0LL; *(_OWORD *)(a1 + 32) = 0LL; *(_OWORD *)(a1 + 48) = 0LL; *(_OWORD *)(a1 + 64) = 0LL; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( (unsigned __int8 *)(a1 + 64), v7); } else { v4 = minja::Value::get<long>(a2); v5 = minja::Value::get<long>(a3); v6 = (char *)(a1 + 64); *(_OWORD *)a1 = 0LL; *(_OWORD *)(a1 + 16) = 0LL; *(_OWORD *)(a1 + 32) = 0LL; *(_OWORD *)(a1 + 48) = 0LL; *(_OWORD *)(a1 + 64) = 0LL; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( a1 + 64, v4 - v5); } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v6); return a1; }
operator-: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV R14,RDX MOV RBX,RDI MOV AL,byte ptr [RSI + 0x40] ADD AL,0xfb CMP AL,0x1 JA 0x0015853f MOV AL,byte ptr [R14 + 0x40] ADD AL,0xfb CMP AL,0x1 JA 0x0015853f MOV RDI,RSI CALL 0x0013da46 MOV R15,RAX MOV RDI,R14 CALL 0x0013da46 SUB R15,RAX LEA R14,[RBX + 0x40] XORPD XMM0,XMM0 MOVUPD xmmword ptr [RBX],XMM0 MOVUPD xmmword ptr [RBX + 0x10],XMM0 MOVUPD xmmword ptr [RBX + 0x20],XMM0 MOVUPD xmmword ptr [RBX + 0x30],XMM0 MOVUPD xmmword ptr [RBX + 0x40],XMM0 MOV RDI,R14 MOV RSI,R15 CALL 0x0013ec0c JMP 0x0015858b LAB_0015853f: MOV RDI,RSI CALL 0x0013db90 MOVSD qword ptr [RSP + 0x8],XMM0 MOV RDI,R14 CALL 0x0013db90 MOVSD XMM1,qword ptr [RSP + 0x8] SUBSD XMM1,XMM0 LEA R14,[RBX + 0x40] XORPD XMM0,XMM0 MOVUPD xmmword ptr [RBX],XMM0 MOVUPD xmmword ptr [RBX + 0x10],XMM0 MOVUPD xmmword ptr [RBX + 0x20],XMM0 MOVUPD xmmword ptr [RBX + 0x30],XMM0 MOVUPD xmmword ptr [RBX + 0x40],XMM0 MOV RDI,R14 MOVAPD XMM0,XMM1 CALL 0x0013f576 LAB_0015858b: MOV RDI,R14 MOV ESI,0x1 CALL 0x0013d970 MOV RAX,RBX ADD RSP,0x10 POP RBX POP R14 POP R15 RET
/* minja::Value::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */ Value * __thiscall minja::Value::operator-(Value *this,Value *param_1) { long lVar1; long lVar2; Value *in_RDX; double dVar3; double dVar4; if (((byte)((char)param_1[0x40] - 5U) < 2) && ((byte)((char)in_RDX[0x40] - 5U) < 2)) { lVar1 = get<long>(param_1); lVar2 = get<long>(in_RDX); *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; nlohmann::json_abi_v3_11_3::detail:: external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>:: construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (this + 0x40,lVar1 - lVar2); } else { dVar3 = get<double>(param_1); dVar4 = get<double>(in_RDX); *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; nlohmann::json_abi_v3_11_3::detail:: external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>:: construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (dVar3 - dVar4,this + 0x40); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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((bool)((char)this + '@')); return this; }
40,695
my_uni_utf16le
eloqsql/strings/ctype-ucs2.c
static int my_uni_utf16le(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { uint32 first, second, total; if (wc < MY_UTF16_SURROGATE_HIGH_FIRST || (wc > MY_UTF16_SURROGATE_LOW_LAST && wc <= 0xFFFF)) { if (s + 2 > e) return MY_CS_TOOSMALL2; int2store(s, wc); return 2; /* [0000-D7FF,E000-FFFF] */ } if (wc < 0xFFFF || wc > 0x10FFFF) return MY_CS_ILUNI; /* [D800-DFFF,10FFFF+] */ if (s + 4 > e) return MY_CS_TOOSMALL4; wc-= 0x10000; first= (0xD800 | ((wc >> 10) & 0x3FF)); second= (0xDC00 | (wc & 0x3FF)); total= first | (second << 16); int4store(s, total); return 4; /* [010000-10FFFF] */ }
O3
c
my_uni_utf16le: pushq %rbp movq %rsp, %rbp cmpq $0xd800, %rsi # imm = 0xD800 setae %al movq %rsi, %rdi andq $-0x2000, %rdi # imm = 0xE000 cmpq $0xe000, %rdi # imm = 0xE000 setne %dil testb %dil, %al jne 0x4a73b leaq 0x2(%rdx), %rdi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rdi ja 0x4a780 movw %si, (%rdx) movl $0x2, %eax jmp 0x4a780 leaq -0x110000(%rsi), %rdi xorl %eax, %eax cmpq $-0x100001, %rdi # imm = 0xFFEFFFFF jb 0x4a780 leaq 0x4(%rdx), %rdi movl $0xffffff98, %eax # imm = 0xFFFFFF98 cmpq %rcx, %rdi ja 0x4a780 leal 0xf0000(%rsi), %eax shrl $0xa, %eax andl $0x3ff, %eax # imm = 0x3FF shll $0x10, %esi andl $0x3ff0000, %esi # imm = 0x3FF0000 addl %esi, %eax addl $0xdc00d800, %eax # imm = 0xDC00D800 movl %eax, (%rdx) movl $0x4, %eax popq %rbp retq
my_uni_utf16le: push rbp mov rbp, rsp cmp rsi, 0D800h setnb al mov rdi, rsi and rdi, 0FFFFFFFFFFFFE000h cmp rdi, 0E000h setnz dil test al, dil jnz short loc_4A73B lea rdi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rdi, rcx ja short loc_4A780 mov [rdx], si mov eax, 2 jmp short loc_4A780 loc_4A73B: lea rdi, [rsi-110000h] xor eax, eax cmp rdi, 0FFFFFFFFFFEFFFFFh jb short loc_4A780 lea rdi, [rdx+4] mov eax, 0FFFFFF98h cmp rdi, rcx ja short loc_4A780 lea eax, unk_F0000[rsi] shr eax, 0Ah and eax, 3FFh shl esi, 10h and esi, 3FF0000h add eax, esi add eax, 0DC00D800h mov [rdx], eax mov eax, 4 loc_4A780: pop rbp retn
long long my_uni_utf16le(long long a1, unsigned long long a2, _DWORD *a3, unsigned long long a4) { long long result; // rax if ( (a2 & 0xFFFFFFFFFFFFE000LL) != 57344 && a2 >= 0xD800 ) { result = 0LL; if ( a2 - 1114112 >= 0xFFFFFFFFFFEFFFFFLL ) { result = 4294967192LL; if ( (unsigned long long)(a3 + 1) <= a4 ) { *a3 = (((_DWORD)a2 << 16) & 0x3FF0000) + (((unsigned int)((unsigned int)&unk_F0000 + a2) >> 10) & 0x3FF) - 603924480; return 4LL; } } } else { result = 4294967194LL; if ( (unsigned long long)a3 + 2 <= a4 ) { *(_WORD *)a3 = a2; return 2LL; } } return result; }
my_uni_utf16le: PUSH RBP MOV RBP,RSP CMP RSI,0xd800 SETNC AL MOV RDI,RSI AND RDI,-0x2000 CMP RDI,0xe000 SETNZ DIL TEST AL,DIL JNZ 0x0014a73b LEA RDI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RDI,RCX JA 0x0014a780 MOV word ptr [RDX],SI MOV EAX,0x2 JMP 0x0014a780 LAB_0014a73b: LEA RDI,[RSI + -0x110000] XOR EAX,EAX CMP RDI,-0x100001 JC 0x0014a780 LEA RDI,[RDX + 0x4] MOV EAX,0xffffff98 CMP RDI,RCX JA 0x0014a780 LEA EAX,[RSI + 0xf0000] SHR EAX,0xa AND EAX,0x3ff SHL ESI,0x10 AND ESI,0x3ff0000 ADD EAX,ESI ADD EAX,0xdc00d800 MOV dword ptr [RDX],EAX MOV EAX,0x4 LAB_0014a780: POP RBP RET
int8 my_uni_utf16le(int8 param_1,ulong param_2,int *param_3,int *param_4) { int8 uVar1; if (param_2 < 0xd800 || (param_2 & 0xffffffffffffe000) == 0xe000) { uVar1 = 0xffffff9a; if ((int *)((long)param_3 + 2U) <= param_4) { *(short *)param_3 = (short)param_2; uVar1 = 2; } } else { uVar1 = 0; if ((0xffffffffffeffffe < param_2 - 0x110000) && (uVar1 = 0xffffff98, param_3 + 1 <= param_4)) { *param_3 = ((uint)param_2 + 0xf0000 >> 10 & 0x3ff) + ((uint)param_2 & 0x3ff) * 0x10000 + -0x23ff2800; uVar1 = 4; } } return uVar1; }
40,696
release_table_share_index_stat(PFS_table_share_index*)
eloqsql/storage/perfschema/pfs_instr_class.cc
void release_table_share_index_stat(PFS_table_share_index *pfs) { pfs->m_owner= NULL; global_table_share_index_container.deallocate(pfs); return; }
O3
cpp
release_table_share_index_stat(PFS_table_share_index*): pushq %rbp movq %rsp, %rbp movq $0x0, 0x150(%rdi) movq 0x158(%rdi), %rax movl (%rdi), %ecx andl $-0x4, %ecx xchgl %ecx, (%rdi) xorl %ecx, %ecx movb %cl, (%rax) leaq 0x3737d5(%rip), %rax # 0x3aeb58 movb %cl, 0x9(%rax) popq %rbp retq
_Z30release_table_share_index_statP21PFS_table_share_index: push rbp mov rbp, rsp mov qword ptr [rdi+150h], 0 mov rax, [rdi+158h] mov ecx, [rdi] and ecx, 0FFFFFFFCh xchg ecx, [rdi] xor ecx, ecx mov [rax], cl lea rax, global_table_share_index_container mov [rax+9], cl pop rbp retn
long long * release_table_share_index_stat(long long a1) { _BYTE *v1; // rax long long *result; // rax *(_QWORD *)(a1 + 336) = 0LL; v1 = *(_BYTE **)(a1 + 344); _InterlockedExchange((volatile __int32 *)a1, *(_DWORD *)a1 & 0xFFFFFFFC); *v1 = 0; result = &global_table_share_index_container; *((_BYTE *)&global_table_share_index_container + 9) = 0; return result; }
release_table_share_index_stat: PUSH RBP MOV RBP,RSP MOV qword ptr [RDI + 0x150],0x0 MOV RAX,qword ptr [RDI + 0x158] MOV ECX,dword ptr [RDI] AND ECX,0xfffffffc XCHG dword ptr [RDI],ECX XOR ECX,ECX MOV byte ptr [RAX],CL LEA RAX,[0x4aeb58] MOV byte ptr [RAX + 0x9],CL POP RBP RET
/* release_table_share_index_stat(PFS_table_share_index*) */ void release_table_share_index_stat(PFS_table_share_index *param_1) { *(int8 *)(param_1 + 0x150) = 0; LOCK(); *(uint *)param_1 = *(uint *)param_1 & 0xfffffffc; UNLOCK(); **(int1 **)(param_1 + 0x158) = 0; global_table_share_index_container[9] = 0; return; }
40,697
stbi__bmp_info(stbi__context*, int*, int*, int*)
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
static int stbi__bmp_info(stbi__context *s, int *x, int *y, int *comp) { void *p; stbi__bmp_data info; info.all_a = 255; p = stbi__bmp_parse_header(s, &info); if (p == NULL) { stbi__rewind( s ); return 0; } if (x) *x = s->img_x; if (y) *y = s->img_y; if (comp) { if (info.bpp == 24 && info.ma == 0xff000000) *comp = 3; else *comp = info.ma ? 4 : 3; } return 1; }
O0
c
stbi__bmp_info(stbi__context*, int*, int*, int*): subq $0x58, %rsp movq %rdi, 0x48(%rsp) movq %rsi, 0x40(%rsp) movq %rdx, 0x38(%rsp) movq %rcx, 0x30(%rsp) movl $0xff, 0x20(%rsp) movq 0x48(%rsp), %rdi leaq 0x4(%rsp), %rsi callq 0x1ca90 movq %rax, 0x28(%rsp) cmpq $0x0, 0x28(%rsp) jne 0x2d000 movq 0x48(%rsp), %rdi callq 0x17f10 movl $0x0, 0x54(%rsp) jmp 0x2d078 cmpq $0x0, 0x40(%rsp) je 0x2d016 movq 0x48(%rsp), %rax movl (%rax), %ecx movq 0x40(%rsp), %rax movl %ecx, (%rax) cmpq $0x0, 0x38(%rsp) je 0x2d02d movq 0x48(%rsp), %rax movl 0x4(%rax), %ecx movq 0x38(%rsp), %rax movl %ecx, (%rax) cmpq $0x0, 0x30(%rsp) je 0x2d070 cmpl $0x18, 0x4(%rsp) jne 0x2d053 cmpl $0xff000000, 0x1c(%rsp) # imm = 0xFF000000 jne 0x2d053 movq 0x30(%rsp), %rax movl $0x3, (%rax) jmp 0x2d06e movl 0x1c(%rsp), %edx movl $0x3, %ecx movl $0x4, %eax cmpl $0x0, %edx cmovnel %eax, %ecx movq 0x30(%rsp), %rax movl %ecx, (%rax) jmp 0x2d070 movl $0x1, 0x54(%rsp) movl 0x54(%rsp), %eax addq $0x58, %rsp retq nopw %cs:(%rax,%rax)
_ZL14stbi__bmp_infoP13stbi__contextPiS1_S1_: sub rsp, 58h mov [rsp+58h+var_10], rdi mov [rsp+58h+var_18], rsi mov [rsp+58h+var_20], rdx mov [rsp+58h+var_28], rcx mov [rsp+58h+var_38], 0FFh mov rdi, [rsp+58h+var_10] lea rsi, [rsp+58h+var_54] call _ZL22stbi__bmp_parse_headerP13stbi__contextP14stbi__bmp_data; stbi__bmp_parse_header(stbi__context *,stbi__bmp_data *) mov [rsp+58h+var_30], rax cmp [rsp+58h+var_30], 0 jnz short loc_2D000 mov rdi, [rsp+58h+var_10] call _ZL12stbi__rewindP13stbi__context; stbi__rewind(stbi__context *) mov [rsp+58h+var_4], 0 jmp short loc_2D078 loc_2D000: cmp [rsp+58h+var_18], 0 jz short loc_2D016 mov rax, [rsp+58h+var_10] mov ecx, [rax] mov rax, [rsp+58h+var_18] mov [rax], ecx loc_2D016: cmp [rsp+58h+var_20], 0 jz short loc_2D02D mov rax, [rsp+58h+var_10] mov ecx, [rax+4] mov rax, [rsp+58h+var_20] mov [rax], ecx loc_2D02D: cmp [rsp+58h+var_28], 0 jz short loc_2D070 cmp [rsp+58h+var_54], 18h jnz short loc_2D053 cmp [rsp+58h+var_3C], 0FF000000h jnz short loc_2D053 mov rax, [rsp+58h+var_28] mov dword ptr [rax], 3 jmp short loc_2D06E loc_2D053: mov edx, [rsp+58h+var_3C] mov ecx, 3 mov eax, 4 cmp edx, 0 cmovnz ecx, eax mov rax, [rsp+58h+var_28] mov [rax], ecx loc_2D06E: jmp short $+2 loc_2D070: mov [rsp+58h+var_4], 1 loc_2D078: mov eax, [rsp+58h+var_4] add rsp, 58h retn
long long stbi__bmp_info(_QWORD *a1, _DWORD *a2, _DWORD *a3, int *a4) { int v4; // ecx int v6[6]; // [rsp+4h] [rbp-54h] BYREF int v7; // [rsp+1Ch] [rbp-3Ch] int v8; // [rsp+20h] [rbp-38h] int *v10; // [rsp+30h] [rbp-28h] _DWORD *v11; // [rsp+38h] [rbp-20h] _DWORD *v12; // [rsp+40h] [rbp-18h] _QWORD *v13; // [rsp+48h] [rbp-10h] v13 = a1; v12 = a2; v11 = a3; v10 = a4; v8 = 255; if ( stbi__bmp_parse_header(a1, v6) ) { if ( v12 ) *v12 = *(_DWORD *)v13; if ( v11 ) *v11 = *((_DWORD *)v13 + 1); if ( v10 ) { if ( v6[0] == 24 && v7 == -16777216 ) { *v10 = 3; } else { v4 = 3; if ( v7 ) v4 = 4; *v10 = v4; } } return 1; } else { stbi__rewind(v13); return 0; } }
stbi__bmp_info: SUB RSP,0x58 MOV qword ptr [RSP + 0x48],RDI MOV qword ptr [RSP + 0x40],RSI MOV qword ptr [RSP + 0x38],RDX MOV qword ptr [RSP + 0x30],RCX MOV dword ptr [RSP + 0x20],0xff MOV RDI,qword ptr [RSP + 0x48] LEA RSI,[RSP + 0x4] CALL 0x0011ca90 MOV qword ptr [RSP + 0x28],RAX CMP qword ptr [RSP + 0x28],0x0 JNZ 0x0012d000 MOV RDI,qword ptr [RSP + 0x48] CALL 0x00117f10 MOV dword ptr [RSP + 0x54],0x0 JMP 0x0012d078 LAB_0012d000: CMP qword ptr [RSP + 0x40],0x0 JZ 0x0012d016 MOV RAX,qword ptr [RSP + 0x48] MOV ECX,dword ptr [RAX] MOV RAX,qword ptr [RSP + 0x40] MOV dword ptr [RAX],ECX LAB_0012d016: CMP qword ptr [RSP + 0x38],0x0 JZ 0x0012d02d MOV RAX,qword ptr [RSP + 0x48] MOV ECX,dword ptr [RAX + 0x4] MOV RAX,qword ptr [RSP + 0x38] MOV dword ptr [RAX],ECX LAB_0012d02d: CMP qword ptr [RSP + 0x30],0x0 JZ 0x0012d070 CMP dword ptr [RSP + 0x4],0x18 JNZ 0x0012d053 CMP dword ptr [RSP + 0x1c],0xff000000 JNZ 0x0012d053 MOV RAX,qword ptr [RSP + 0x30] MOV dword ptr [RAX],0x3 JMP 0x0012d06e LAB_0012d053: MOV EDX,dword ptr [RSP + 0x1c] MOV ECX,0x3 MOV EAX,0x4 CMP EDX,0x0 CMOVNZ ECX,EAX MOV RAX,qword ptr [RSP + 0x30] MOV dword ptr [RAX],ECX LAB_0012d06e: JMP 0x0012d070 LAB_0012d070: MOV dword ptr [RSP + 0x54],0x1 LAB_0012d078: MOV EAX,dword ptr [RSP + 0x54] ADD RSP,0x58 RET
/* stbi__bmp_info(stbi__context*, int*, int*, int*) */ int4 stbi__bmp_info(stbi__context *param_1,int *param_2,int *param_3,int *param_4) { int iVar1; int local_54 [6]; int local_3c; int4 local_38; long local_30; int *local_28; int *local_20; int *local_18; stbi__context *local_10; int4 local_4; local_38 = 0xff; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; local_30 = stbi__bmp_parse_header(param_1,(stbi__bmp_data *)local_54); if (local_30 == 0) { stbi__rewind(local_10); local_4 = 0; } else { if (local_18 != (int *)0x0) { *local_18 = *(int *)local_10; } if (local_20 != (int *)0x0) { *local_20 = *(int *)(local_10 + 4); } if (local_28 != (int *)0x0) { if ((local_54[0] == 0x18) && (local_3c == -0x1000000)) { *local_28 = 3; } else { iVar1 = 3; if (local_3c != 0) { iVar1 = 4; } *local_28 = iVar1; } } local_4 = 1; } return local_4; }
40,698
mi_seq_search
eloqsql/storage/myisam/mi_search.c
int _mi_seq_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page, uchar *key, uint key_len, uint comp_flag, uchar **ret_pos, uchar *buff, my_bool *last_key) { int UNINIT_VAR(flag); uint nod_flag,UNINIT_VAR(length),not_used[2]; uchar t_buff[HA_MAX_KEY_BUFF],*end; DBUG_ENTER("_mi_seq_search"); end= page+mi_getint(page); nod_flag=mi_test_if_nod(page); page+=2+nod_flag; *ret_pos=page; t_buff[0]=0; /* Avoid bugs */ while (page < end) { length=(*keyinfo->get_key)(keyinfo,nod_flag,&page,t_buff); if (length == 0 || page > end) { mi_print_error(info->s, HA_ERR_CRASHED); my_errno=HA_ERR_CRASHED; DBUG_PRINT("error", ("Found wrong key: length: %u page: %p end: %p", length, page, end)); DBUG_RETURN(MI_FOUND_WRONG_KEY); } if ((flag=ha_key_cmp(keyinfo->seg,t_buff,key,key_len,comp_flag, not_used)) >= 0) break; #ifdef EXTRA_DEBUG DBUG_PRINT("loop",("page: 0x%lx key: '%s' flag: %d", (long) page, t_buff, flag)); #endif memcpy(buff,t_buff,length); *ret_pos=page; } if (flag == 0) memcpy(buff,t_buff,length); /* Result is first key */ *last_key= page == end; DBUG_PRINT("exit",("flag: %d ret_pos: %p", flag, *ret_pos)); DBUG_RETURN(flag); }
O0
c
mi_seq_search: pushq %rbp movq %rsp, %rbp subq $0x520, %rsp # imm = 0x520 movq 0x20(%rbp), %rax movq 0x18(%rbp), %rax movq 0x10(%rbp), %rax movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x4d0(%rbp) movq %rsi, -0x4d8(%rbp) movq %rdx, -0x4e0(%rbp) movq %rcx, -0x4e8(%rbp) movl %r8d, -0x4ec(%rbp) movl %r9d, -0x4f0(%rbp) movl -0x4f4(%rbp), %eax movl %eax, -0x4f4(%rbp) movl -0x4fc(%rbp), %eax movl %eax, -0x4fc(%rbp) movq -0x4e0(%rbp), %rax movq -0x4e0(%rbp), %rcx movzbl 0x1(%rcx), %ecx movzwl %cx, %ecx movq -0x4e0(%rbp), %rdx movzbl (%rdx), %edx movzwl %dx, %edx shll $0x8, %edx orl %edx, %ecx movzwl %cx, %ecx andl $0x7fff, %ecx # imm = 0x7FFF movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x510(%rbp) movq -0x4e0(%rbp), %rax movzbl (%rax), %eax andl $0x80, %eax cmpl $0x0, %eax je 0xbf05e movq -0x4d0(%rbp), %rax movq (%rax), %rax movl 0x17c(%rax), %eax movl %eax, -0x514(%rbp) jmp 0xbf068 xorl %eax, %eax movl %eax, -0x514(%rbp) jmp 0xbf068 movl -0x514(%rbp), %eax movl %eax, -0x4f8(%rbp) movl -0x4f8(%rbp), %ecx addl $0x2, %ecx movq -0x4e0(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x4e0(%rbp) movq -0x4e0(%rbp), %rcx movq 0x10(%rbp), %rax movq %rcx, (%rax) movb $0x0, -0x4c0(%rbp) movq -0x4e0(%rbp), %rax cmpq -0x510(%rbp), %rax jae 0xbf1a3 movq -0x4d8(%rbp), %rax movq 0x48(%rax), %rax movq -0x4d8(%rbp), %rdi movl -0x4f8(%rbp), %esi leaq -0x4c0(%rbp), %rcx leaq -0x4e0(%rbp), %rdx callq *%rax movl %eax, -0x4fc(%rbp) cmpl $0x0, -0x4fc(%rbp) je 0xbf100 movq -0x4e0(%rbp), %rax cmpq -0x510(%rbp), %rax jbe 0xbf139 movq -0x4d0(%rbp), %rax movq (%rax), %rax movq 0x268(%rax), %rsi movl $0x7e, %edi callq 0xadf20 callq 0xf5a70 movl $0x7e, (%rax) jmp 0xbf128 jmp 0xbf12a movl $0x7fffffff, -0x4c4(%rbp) # imm = 0x7FFFFFFF jmp 0xbf1f2 movq -0x4d8(%rbp), %rax movq 0x28(%rax), %rdi leaq -0x4c0(%rbp), %rsi movq -0x4e8(%rbp), %rdx movl -0x4ec(%rbp), %ecx movl -0x4f0(%rbp), %r8d leaq -0x504(%rbp), %r9 callq 0xeff80 movl %eax, -0x4f4(%rbp) cmpl $0x0, %eax jl 0xbf178 jmp 0xbf1a3 movq 0x18(%rbp), %rdi leaq -0x4c0(%rbp), %rsi movl -0x4fc(%rbp), %eax movl %eax, %edx callq 0x2a090 movq -0x4e0(%rbp), %rcx movq 0x10(%rbp), %rax movq %rcx, (%rax) jmp 0xbf0a5 cmpl $0x0, -0x4f4(%rbp) jne 0xbf1c4 movq 0x18(%rbp), %rdi leaq -0x4c0(%rbp), %rsi movl -0x4fc(%rbp), %eax movl %eax, %edx callq 0x2a090 movq -0x4e0(%rbp), %rax cmpq -0x510(%rbp), %rax sete %al andb $0x1, %al movzbl %al, %eax movb %al, %cl movq 0x20(%rbp), %rax movb %cl, (%rax) jmp 0xbf1e4 jmp 0xbf1e6 movl -0x4f4(%rbp), %eax movl %eax, -0x4c4(%rbp) movl -0x4c4(%rbp), %eax movl %eax, -0x518(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xbf21f movl -0x518(%rbp), %eax addq $0x520, %rsp # imm = 0x520 popq %rbp retq callq 0x2a270 nopw %cs:(%rax,%rax)
_mi_seq_search: push rbp mov rbp, rsp sub rsp, 520h mov rax, [rbp+arg_10] mov rax, [rbp+arg_8] mov rax, [rbp+arg_0] mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_4D0], rdi mov [rbp+var_4D8], rsi mov [rbp+var_4E0], rdx mov [rbp+var_4E8], rcx mov [rbp+var_4EC], r8d mov [rbp+var_4F0], r9d mov eax, [rbp+var_4F4] mov [rbp+var_4F4], eax mov eax, [rbp+var_4FC] mov [rbp+var_4FC], eax mov rax, [rbp+var_4E0] mov rcx, [rbp+var_4E0] movzx ecx, byte ptr [rcx+1] movzx ecx, cx mov rdx, [rbp+var_4E0] movzx edx, byte ptr [rdx] movzx edx, dx shl edx, 8 or ecx, edx movzx ecx, cx and ecx, 7FFFh mov ecx, ecx add rax, rcx mov [rbp+var_510], rax mov rax, [rbp+var_4E0] movzx eax, byte ptr [rax] and eax, 80h cmp eax, 0 jz short loc_BF05E mov rax, [rbp+var_4D0] mov rax, [rax] mov eax, [rax+17Ch] mov [rbp+var_514], eax jmp short loc_BF068 loc_BF05E: xor eax, eax mov [rbp+var_514], eax jmp short $+2 loc_BF068: mov eax, [rbp+var_514] mov [rbp+var_4F8], eax mov ecx, [rbp+var_4F8] add ecx, 2 mov rax, [rbp+var_4E0] mov ecx, ecx add rax, rcx mov [rbp+var_4E0], rax mov rcx, [rbp+var_4E0] mov rax, [rbp+arg_0] mov [rax], rcx mov [rbp+var_4C0], 0 loc_BF0A5: mov rax, [rbp+var_4E0] cmp rax, [rbp+var_510] jnb loc_BF1A3 mov rax, [rbp+var_4D8] mov rax, [rax+48h] mov rdi, [rbp+var_4D8] mov esi, [rbp+var_4F8] lea rcx, [rbp+var_4C0] lea rdx, [rbp+var_4E0] call rax mov [rbp+var_4FC], eax cmp [rbp+var_4FC], 0 jz short loc_BF100 mov rax, [rbp+var_4E0] cmp rax, [rbp+var_510] jbe short loc_BF139 loc_BF100: mov rax, [rbp+var_4D0] mov rax, [rax] mov rsi, [rax+268h] mov edi, 7Eh ; '~' call mi_report_error call _my_thread_var mov dword ptr [rax], 7Eh ; '~' jmp short $+2 loc_BF128: jmp short $+2 loc_BF12A: mov [rbp+var_4C4], 7FFFFFFFh jmp loc_BF1F2 loc_BF139: mov rax, [rbp+var_4D8] mov rdi, [rax+28h] lea rsi, [rbp+var_4C0] mov rdx, [rbp+var_4E8] mov ecx, [rbp+var_4EC] mov r8d, [rbp+var_4F0] lea r9, [rbp+var_504] call ha_key_cmp mov [rbp+var_4F4], eax cmp eax, 0 jl short loc_BF178 jmp short loc_BF1A3 loc_BF178: mov rdi, [rbp+arg_8] lea rsi, [rbp+var_4C0] mov eax, [rbp+var_4FC] mov edx, eax call _memcpy mov rcx, [rbp+var_4E0] mov rax, [rbp+arg_0] mov [rax], rcx jmp loc_BF0A5 loc_BF1A3: cmp [rbp+var_4F4], 0 jnz short loc_BF1C4 mov rdi, [rbp+arg_8] lea rsi, [rbp+var_4C0] mov eax, [rbp+var_4FC] mov edx, eax call _memcpy loc_BF1C4: mov rax, [rbp+var_4E0] cmp rax, [rbp+var_510] setz al and al, 1 movzx eax, al mov cl, al mov rax, [rbp+arg_10] mov [rax], cl jmp short $+2 loc_BF1E4: jmp short $+2 loc_BF1E6: mov eax, [rbp+var_4F4] mov [rbp+var_4C4], eax loc_BF1F2: mov eax, [rbp+var_4C4] mov [rbp+var_518], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_BF21F mov eax, [rbp+var_518] add rsp, 520h pop rbp retn loc_BF21F: call ___stack_chk_fail
long long mi_seq_search( long long a1, long long a2, unsigned __int16 *a3, long long a4, unsigned int a5, unsigned int a6, unsigned __int16 **a7, long long a8, bool *a9) { const char *v9; // rsi unsigned int v11; // [rsp+Ch] [rbp-514h] unsigned __int16 *v12; // [rsp+10h] [rbp-510h] char v13[8]; // [rsp+1Ch] [rbp-504h] BYREF unsigned int v14; // [rsp+24h] [rbp-4FCh] unsigned int v15; // [rsp+28h] [rbp-4F8h] int v16; // [rsp+2Ch] [rbp-4F4h] unsigned int v17; // [rsp+30h] [rbp-4F0h] unsigned int v18; // [rsp+34h] [rbp-4ECh] long long v19; // [rsp+38h] [rbp-4E8h] unsigned __int16 *v20; // [rsp+40h] [rbp-4E0h] BYREF long long v21; // [rsp+48h] [rbp-4D8h] long long v22; // [rsp+50h] [rbp-4D0h] _BYTE v24[1208]; // [rsp+60h] [rbp-4C0h] BYREF unsigned long long v25; // [rsp+518h] [rbp-8h] v25 = __readfsqword(0x28u); v22 = a1; v21 = a2; v20 = a3; v19 = a4; v18 = a5; v17 = a6; v12 = (unsigned __int16 *)((char *)a3 + (_byteswap_ushort(*a3) & 0x7FFF)); if ( (*(_BYTE *)a3 & 0x80) != 0 ) v11 = *(_DWORD *)(*(_QWORD *)v22 + 380LL); else v11 = 0; v15 = v11; v20 = (unsigned __int16 *)((char *)v20 + v11 + 2); *a7 = v20; v24[0] = 0; while ( v20 < v12 ) { v14 = (*(long long ( **)(long long, _QWORD, unsigned __int16 **, _BYTE *))(v21 + 72))(v21, v15, &v20, v24); if ( !v14 || v20 > v12 ) { v9 = *(const char **)(*(_QWORD *)v22 + 616LL); mi_report_error(126, (long long)v9); *(_DWORD *)my_thread_var(126LL, v9) = 126; return 0x7FFFFFFF; } v16 = ha_key_cmp(*(_QWORD *)(v21 + 40), v24, v19, v18, v17, v13); if ( v16 >= 0 ) break; memcpy(a8, v24, v14); *a7 = v20; } if ( !v16 ) memcpy(a8, v24, v14); *a9 = v20 == v12; return (unsigned int)v16; }
_mi_seq_search: PUSH RBP MOV RBP,RSP SUB RSP,0x520 MOV RAX,qword ptr [RBP + 0x20] MOV RAX,qword ptr [RBP + 0x18] MOV RAX,qword ptr [RBP + 0x10] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x4d0],RDI MOV qword ptr [RBP + -0x4d8],RSI MOV qword ptr [RBP + -0x4e0],RDX MOV qword ptr [RBP + -0x4e8],RCX MOV dword ptr [RBP + -0x4ec],R8D MOV dword ptr [RBP + -0x4f0],R9D MOV EAX,dword ptr [RBP + -0x4f4] MOV dword ptr [RBP + -0x4f4],EAX MOV EAX,dword ptr [RBP + -0x4fc] MOV dword ptr [RBP + -0x4fc],EAX MOV RAX,qword ptr [RBP + -0x4e0] MOV RCX,qword ptr [RBP + -0x4e0] MOVZX ECX,byte ptr [RCX + 0x1] MOVZX ECX,CX MOV RDX,qword ptr [RBP + -0x4e0] MOVZX EDX,byte ptr [RDX] MOVZX EDX,DX SHL EDX,0x8 OR ECX,EDX MOVZX ECX,CX AND ECX,0x7fff MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x510],RAX MOV RAX,qword ptr [RBP + -0x4e0] MOVZX EAX,byte ptr [RAX] AND EAX,0x80 CMP EAX,0x0 JZ 0x001bf05e MOV RAX,qword ptr [RBP + -0x4d0] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x17c] MOV dword ptr [RBP + -0x514],EAX JMP 0x001bf068 LAB_001bf05e: XOR EAX,EAX MOV dword ptr [RBP + -0x514],EAX JMP 0x001bf068 LAB_001bf068: MOV EAX,dword ptr [RBP + -0x514] MOV dword ptr [RBP + -0x4f8],EAX MOV ECX,dword ptr [RBP + -0x4f8] ADD ECX,0x2 MOV RAX,qword ptr [RBP + -0x4e0] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x4e0],RAX MOV RCX,qword ptr [RBP + -0x4e0] MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RAX],RCX MOV byte ptr [RBP + -0x4c0],0x0 LAB_001bf0a5: MOV RAX,qword ptr [RBP + -0x4e0] CMP RAX,qword ptr [RBP + -0x510] JNC 0x001bf1a3 MOV RAX,qword ptr [RBP + -0x4d8] MOV RAX,qword ptr [RAX + 0x48] MOV RDI,qword ptr [RBP + -0x4d8] MOV ESI,dword ptr [RBP + -0x4f8] LEA RCX,[RBP + -0x4c0] LEA RDX,[RBP + -0x4e0] CALL RAX MOV dword ptr [RBP + -0x4fc],EAX CMP dword ptr [RBP + -0x4fc],0x0 JZ 0x001bf100 MOV RAX,qword ptr [RBP + -0x4e0] CMP RAX,qword ptr [RBP + -0x510] JBE 0x001bf139 LAB_001bf100: MOV RAX,qword ptr [RBP + -0x4d0] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x268] MOV EDI,0x7e CALL 0x001adf20 CALL 0x001f5a70 MOV dword ptr [RAX],0x7e JMP 0x001bf128 LAB_001bf128: JMP 0x001bf12a LAB_001bf12a: MOV dword ptr [RBP + -0x4c4],0x7fffffff JMP 0x001bf1f2 LAB_001bf139: MOV RAX,qword ptr [RBP + -0x4d8] MOV RDI,qword ptr [RAX + 0x28] LEA RSI,[RBP + -0x4c0] MOV RDX,qword ptr [RBP + -0x4e8] MOV ECX,dword ptr [RBP + -0x4ec] MOV R8D,dword ptr [RBP + -0x4f0] LEA R9,[RBP + -0x504] CALL 0x001eff80 MOV dword ptr [RBP + -0x4f4],EAX CMP EAX,0x0 JL 0x001bf178 JMP 0x001bf1a3 LAB_001bf178: MOV RDI,qword ptr [RBP + 0x18] LEA RSI,[RBP + -0x4c0] MOV EAX,dword ptr [RBP + -0x4fc] MOV EDX,EAX CALL 0x0012a090 MOV RCX,qword ptr [RBP + -0x4e0] MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RAX],RCX JMP 0x001bf0a5 LAB_001bf1a3: CMP dword ptr [RBP + -0x4f4],0x0 JNZ 0x001bf1c4 MOV RDI,qword ptr [RBP + 0x18] LEA RSI,[RBP + -0x4c0] MOV EAX,dword ptr [RBP + -0x4fc] MOV EDX,EAX CALL 0x0012a090 LAB_001bf1c4: MOV RAX,qword ptr [RBP + -0x4e0] CMP RAX,qword ptr [RBP + -0x510] SETZ AL AND AL,0x1 MOVZX EAX,AL MOV CL,AL MOV RAX,qword ptr [RBP + 0x20] MOV byte ptr [RAX],CL JMP 0x001bf1e4 LAB_001bf1e4: JMP 0x001bf1e6 LAB_001bf1e6: MOV EAX,dword ptr [RBP + -0x4f4] MOV dword ptr [RBP + -0x4c4],EAX LAB_001bf1f2: MOV EAX,dword ptr [RBP + -0x4c4] MOV dword ptr [RBP + -0x518],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001bf21f MOV EAX,dword ptr [RBP + -0x518] ADD RSP,0x520 POP RBP RET LAB_001bf21f: CALL 0x0012a270
int _mi_seq_search(long *param_1,long param_2,byte *param_3,int8 param_4,int4 param_5, int4 param_6,int8 *param_7,void *param_8,int8 param_9) { byte *pbVar1; int4 *puVar2; long in_FS_OFFSET; int local_51c; int1 local_50c [8]; uint local_504; int local_500; int local_4fc; int4 local_4f8; int4 local_4f4; int8 local_4f0; byte *local_4e8; long local_4e0; long *local_4d8; int local_4cc; int1 local_4c8 [1208]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); pbVar1 = param_3 + ((uint)param_3[1] | (*param_3 & 0x7f) << 8); if ((*param_3 & 0x80) == 0) { local_51c = 0; } else { local_51c = *(int *)(*param_1 + 0x17c); } local_500 = local_51c; local_4e8 = param_3 + (local_51c + 2); *param_7 = local_4e8; local_4c8[0] = 0; local_4f8 = param_6; local_4f4 = param_5; local_4f0 = param_4; local_4e0 = param_2; local_4d8 = param_1; while (local_4e8 < pbVar1) { local_504 = (**(code **)(local_4e0 + 0x48))(local_4e0,local_500,&local_4e8,local_4c8); if ((local_504 == 0) || (pbVar1 < local_4e8)) { mi_report_error(0x7e,*(int8 *)(*local_4d8 + 0x268)); puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x7e; local_4cc = 0x7fffffff; goto LAB_001bf1f2; } local_4fc = ha_key_cmp(*(int8 *)(local_4e0 + 0x28),local_4c8,local_4f0,local_4f4,local_4f8 ,local_50c); if (-1 < local_4fc) break; memcpy(param_8,local_4c8,(ulong)local_504); *param_7 = local_4e8; } if (local_4fc == 0) { memcpy(param_8,local_4c8,(ulong)local_504); } *(bool *)param_9 = local_4e8 == pbVar1; local_4cc = local_4fc; LAB_001bf1f2: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_4cc; }
40,699
mi_seq_search
eloqsql/storage/myisam/mi_search.c
int _mi_seq_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page, uchar *key, uint key_len, uint comp_flag, uchar **ret_pos, uchar *buff, my_bool *last_key) { int UNINIT_VAR(flag); uint nod_flag,UNINIT_VAR(length),not_used[2]; uchar t_buff[HA_MAX_KEY_BUFF],*end; DBUG_ENTER("_mi_seq_search"); end= page+mi_getint(page); nod_flag=mi_test_if_nod(page); page+=2+nod_flag; *ret_pos=page; t_buff[0]=0; /* Avoid bugs */ while (page < end) { length=(*keyinfo->get_key)(keyinfo,nod_flag,&page,t_buff); if (length == 0 || page > end) { mi_print_error(info->s, HA_ERR_CRASHED); my_errno=HA_ERR_CRASHED; DBUG_PRINT("error", ("Found wrong key: length: %u page: %p end: %p", length, page, end)); DBUG_RETURN(MI_FOUND_WRONG_KEY); } if ((flag=ha_key_cmp(keyinfo->seg,t_buff,key,key_len,comp_flag, not_used)) >= 0) break; #ifdef EXTRA_DEBUG DBUG_PRINT("loop",("page: 0x%lx key: '%s' flag: %d", (long) page, t_buff, flag)); #endif memcpy(buff,t_buff,length); *ret_pos=page; } if (flag == 0) memcpy(buff,t_buff,length); /* Result is first key */ *last_key= page == end; DBUG_PRINT("exit",("flag: %d ret_pos: %p", flag, *ret_pos)); DBUG_RETURN(flag); }
O3
c
mi_seq_search: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x508, %rsp # imm = 0x508 movl %r9d, -0x508(%rbp) movl %r8d, -0x504(%rbp) movq %rcx, -0x520(%rbp) movq %rsi, -0x510(%rbp) movq 0x10(%rbp), %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movzbl 0x1(%rdx), %ecx movzbl (%rdx), %r9d movl %r9d, %eax andl $0x7f, %eax shll $0x8, %eax orq %rcx, %rax xorl %esi, %esi testb %r9b, %r9b jns 0x844d0 movq (%rdi), %rcx movl 0x17c(%rcx), %esi movq %rdi, -0x518(%rbp) leaq (%rdx,%rax), %rcx movq %rcx, -0x500(%rbp) leal 0x2(%rsi), %ecx addq %rcx, %rdx movq %rdx, -0x4f8(%rbp) movq %rdx, (%rbx) movb $0x0, -0x4f0(%rbp) cmpl %ecx, %eax jbe 0x845df leaq -0x4f0(%rbp), %rcx movq -0x510(%rbp), %rdi movq %rsi, %r12 leaq -0x4f8(%rbp), %rdx movq %rcx, %r13 callq *0x48(%rdi) testl %eax, %eax je 0x84599 movl %eax, %r15d movq -0x500(%rbp), %rax cmpq %rax, -0x4f8(%rbp) ja 0x84599 movq -0x510(%rbp), %rax movq 0x28(%rax), %rdi movq %r13, %rsi movq -0x520(%rbp), %rdx movl -0x504(%rbp), %ecx movl -0x508(%rbp), %r8d leaq -0x528(%rbp), %r9 callq 0x9e372 movl %eax, %r14d testl %eax, %eax jns 0x845c7 movl %r15d, %edx movq 0x18(%rbp), %rdi movq %r13, %rsi callq 0x29080 movq -0x4f8(%rbp), %rax movq %rax, (%rbx) cmpq -0x500(%rbp), %rax movq %r12, %rsi movq %r13, %rcx jb 0x84508 jmp 0x845df movq -0x518(%rbp), %rax movq (%rax), %rax movq 0x268(%rax), %rsi movl $0x7e, %edi callq 0x7aa9e callq 0xa1672 movl $0x7e, (%rax) movl $0x7fffffff, %r14d # imm = 0x7FFFFFFF jmp 0x845f4 jne 0x845df movl %r15d, %edx leaq -0x4f0(%rbp), %rsi movq 0x18(%rbp), %rdi callq 0x29080 xorl %r14d, %r14d movq -0x500(%rbp), %rax cmpq %rax, -0x4f8(%rbp) movq 0x20(%rbp), %rax sete (%rax) movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x84618 movl %r14d, %eax addq $0x508, %rsp # imm = 0x508 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29270
_mi_seq_search: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 508h mov [rbp+var_508], r9d mov [rbp+var_504], r8d mov [rbp+var_520], rcx mov [rbp+var_510], rsi mov rbx, [rbp+arg_0] mov rax, fs:28h mov [rbp+var_30], rax movzx ecx, byte ptr [rdx+1] movzx r9d, byte ptr [rdx] mov eax, r9d and eax, 7Fh shl eax, 8 or rax, rcx xor esi, esi test r9b, r9b jns short loc_844D0 mov rcx, [rdi] mov esi, [rcx+17Ch] loc_844D0: mov [rbp+var_518], rdi lea rcx, [rdx+rax] mov [rbp+var_500], rcx lea ecx, [rsi+2] add rdx, rcx mov [rbp+var_4F8], rdx mov [rbx], rdx mov [rbp+var_4F0], 0 cmp eax, ecx jbe loc_845DF lea rcx, [rbp+var_4F0] loc_84508: mov rdi, [rbp+var_510] mov r12, rsi lea rdx, [rbp+var_4F8] mov r13, rcx call qword ptr [rdi+48h] test eax, eax jz short loc_84599 mov r15d, eax mov rax, [rbp+var_500] cmp [rbp+var_4F8], rax ja short loc_84599 mov rax, [rbp+var_510] mov rdi, [rax+28h] mov rsi, r13 mov rdx, [rbp+var_520] mov ecx, [rbp+var_504] mov r8d, [rbp+var_508] lea r9, [rbp+var_528] call ha_key_cmp mov r14d, eax test eax, eax jns short loc_845C7 mov edx, r15d mov rdi, [rbp+arg_8] mov rsi, r13 call _memcpy mov rax, [rbp+var_4F8] mov [rbx], rax cmp rax, [rbp+var_500] mov rsi, r12 mov rcx, r13 jb loc_84508 jmp short loc_845DF loc_84599: mov rax, [rbp+var_518] mov rax, [rax] mov rsi, [rax+268h] mov edi, 7Eh ; '~' call mi_report_error call _my_thread_var mov dword ptr [rax], 7Eh ; '~' mov r14d, 7FFFFFFFh jmp short loc_845F4 loc_845C7: jnz short loc_845DF mov edx, r15d lea rsi, [rbp+var_4F0] mov rdi, [rbp+arg_8] call _memcpy xor r14d, r14d loc_845DF: mov rax, [rbp+var_500] cmp [rbp+var_4F8], rax mov rax, [rbp+arg_10] setz byte ptr [rax] loc_845F4: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_84618 mov eax, r14d add rsp, 508h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_84618: call ___stack_chk_fail
long long mi_seq_search( long long a1, long long a2, char *a3, long long a4, unsigned int a5, unsigned int a6, char **a7, long long a8, bool *a9) { unsigned int v9; // r14d unsigned long long v10; // rax long long v11; // rsi long long v12; // rcx _BYTE *v13; // rcx _BYTE *v14; // r13 unsigned int v15; // eax unsigned int v16; // r15d int v17; // eax char *v18; // rax const char *v19; // rsi char v21[8]; // [rsp+8h] [rbp-528h] BYREF long long v22; // [rsp+10h] [rbp-520h] long long v23; // [rsp+18h] [rbp-518h] long long v24; // [rsp+20h] [rbp-510h] unsigned int v25; // [rsp+28h] [rbp-508h] unsigned int v26; // [rsp+2Ch] [rbp-504h] char *v27; // [rsp+30h] [rbp-500h] char *v28; // [rsp+38h] [rbp-4F8h] BYREF _BYTE v29[1216]; // [rsp+40h] [rbp-4F0h] BYREF unsigned long long v30; // [rsp+500h] [rbp-30h] v25 = a6; v26 = a5; v22 = a4; v24 = a2; v30 = __readfsqword(0x28u); v10 = (unsigned __int8)a3[1] | (unsigned long long)((unsigned __int8)(*a3 & 0x7F) << 8); v11 = 0LL; if ( *a3 < 0 ) v11 = *(unsigned int *)(*(_QWORD *)a1 + 380LL); v23 = a1; v27 = &a3[v10]; v12 = (unsigned int)(v11 + 2); v28 = &a3[v12]; *a7 = &a3[v12]; v29[0] = 0; if ( (unsigned int)v10 > (unsigned int)v12 ) { v13 = v29; while ( 1 ) { v14 = v13; v15 = (*(long long ( **)(long long, long long, char **))(v24 + 72))(v24, v11, &v28); if ( !v15 || (v16 = v15, v28 > v27) ) { v19 = *(const char **)(*(_QWORD *)v23 + 616LL); mi_report_error(126, (long long)v19); *(_DWORD *)my_thread_var(126LL, v19) = 126; return 0x7FFFFFFF; } v17 = ha_key_cmp(*(_QWORD *)(v24 + 40), v14, v22, v26, v25, v21); v9 = v17; if ( v17 >= 0 ) break; memcpy(a8, v14, v16); v18 = v28; *a7 = v28; v13 = v14; if ( v18 >= v27 ) goto LABEL_13; } if ( !v17 ) { memcpy(a8, v29, v16); v9 = 0; } } LABEL_13: *a9 = v28 == v27; return v9; }
_mi_seq_search: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x508 MOV dword ptr [RBP + -0x508],R9D MOV dword ptr [RBP + -0x504],R8D MOV qword ptr [RBP + -0x520],RCX MOV qword ptr [RBP + -0x510],RSI MOV RBX,qword ptr [RBP + 0x10] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOVZX ECX,byte ptr [RDX + 0x1] MOVZX R9D,byte ptr [RDX] MOV EAX,R9D AND EAX,0x7f SHL EAX,0x8 OR RAX,RCX XOR ESI,ESI TEST R9B,R9B JNS 0x001844d0 MOV RCX,qword ptr [RDI] MOV ESI,dword ptr [RCX + 0x17c] LAB_001844d0: MOV qword ptr [RBP + -0x518],RDI LEA RCX,[RDX + RAX*0x1] MOV qword ptr [RBP + -0x500],RCX LEA ECX,[RSI + 0x2] ADD RDX,RCX MOV qword ptr [RBP + -0x4f8],RDX MOV qword ptr [RBX],RDX MOV byte ptr [RBP + -0x4f0],0x0 CMP EAX,ECX JBE 0x001845df LEA RCX,[RBP + -0x4f0] LAB_00184508: MOV RDI,qword ptr [RBP + -0x510] MOV R12,RSI LEA RDX,[RBP + -0x4f8] MOV R13,RCX CALL qword ptr [RDI + 0x48] TEST EAX,EAX JZ 0x00184599 MOV R15D,EAX MOV RAX,qword ptr [RBP + -0x500] CMP qword ptr [RBP + -0x4f8],RAX JA 0x00184599 MOV RAX,qword ptr [RBP + -0x510] MOV RDI,qword ptr [RAX + 0x28] MOV RSI,R13 MOV RDX,qword ptr [RBP + -0x520] MOV ECX,dword ptr [RBP + -0x504] MOV R8D,dword ptr [RBP + -0x508] LEA R9,[RBP + -0x528] CALL 0x0019e372 MOV R14D,EAX TEST EAX,EAX JNS 0x001845c7 MOV EDX,R15D MOV RDI,qword ptr [RBP + 0x18] MOV RSI,R13 CALL 0x00129080 MOV RAX,qword ptr [RBP + -0x4f8] MOV qword ptr [RBX],RAX CMP RAX,qword ptr [RBP + -0x500] MOV RSI,R12 MOV RCX,R13 JC 0x00184508 JMP 0x001845df LAB_00184599: MOV RAX,qword ptr [RBP + -0x518] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x268] MOV EDI,0x7e CALL 0x0017aa9e CALL 0x001a1672 MOV dword ptr [RAX],0x7e MOV R14D,0x7fffffff JMP 0x001845f4 LAB_001845c7: JNZ 0x001845df MOV EDX,R15D LEA RSI,[RBP + -0x4f0] MOV RDI,qword ptr [RBP + 0x18] CALL 0x00129080 XOR R14D,R14D LAB_001845df: MOV RAX,qword ptr [RBP + -0x500] CMP qword ptr [RBP + -0x4f8],RAX MOV RAX,qword ptr [RBP + 0x20] SETZ byte ptr [RAX] LAB_001845f4: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00184618 MOV EAX,R14D ADD RSP,0x508 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00184618: CALL 0x00129270
int _mi_seq_search(long *param_1,long param_2,byte *param_3,int8 param_4,int4 param_5, int4 param_6,int8 *param_7,void *param_8,int8 param_9) { uint uVar1; ulong uVar2; int4 *puVar3; int iVar4; int unaff_R14D; long in_FS_OFFSET; int1 local_530 [8]; int8 local_528; long *local_520; long local_518; int4 local_510; int4 local_50c; byte *local_508; byte *local_500; int1 local_4f8 [1216]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar2 = (ulong)((*param_3 & 0x7f) << 8) | (ulong)param_3[1]; iVar4 = 0; if ((char)*param_3 < '\0') { iVar4 = *(int *)(*param_1 + 0x17c); } local_508 = param_3 + uVar2; local_500 = param_3 + (iVar4 + 2U); *param_7 = local_500; local_4f8[0] = 0; local_528 = param_4; local_520 = param_1; local_518 = param_2; local_510 = param_6; local_50c = param_5; if (iVar4 + 2U < (uint)uVar2) { do { uVar1 = (**(code **)(local_518 + 0x48))(local_518,iVar4,&local_500); if ((uVar1 == 0) || (local_508 < local_500)) { mi_report_error(0x7e,*(int8 *)(*local_520 + 0x268)); puVar3 = (int4 *)_my_thread_var(); *puVar3 = 0x7e; unaff_R14D = 0x7fffffff; goto LAB_001845f4; } unaff_R14D = ha_key_cmp(*(int8 *)(local_518 + 0x28),local_4f8,local_528,local_50c, local_510,local_530); if (-1 < unaff_R14D) { if (unaff_R14D == 0) { memcpy(param_8,local_4f8,(ulong)uVar1); unaff_R14D = 0; } break; } memcpy(param_8,local_4f8,(ulong)uVar1); *param_7 = local_500; } while (local_500 < local_508); } *(bool *)param_9 = local_500 == local_508; LAB_001845f4: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return unaff_R14D; }