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
17,900
expect_tool_parameters(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
monkey531[P]llama/common/chat.cpp
static void expect_tool_parameters(const std::string & name, const json & parameters, const std::vector<std::string> & expected_properties) { if (!parameters.is_object() || !parameters.contains("type") || parameters["type"] != "object" || !parameters.contains("properties") || !parameters.contains("required")) { throw std::runtime_error("Parameters of tool " + name + " must be an object w/ required properties"); } const auto & parameters_properties = parameters.at("properties"); const auto & parameters_required = parameters.at("required"); for (const auto & prop : expected_properties) { if (!parameters_properties.contains(prop)) { throw std::runtime_error("Parameters of tool " + name + " is missing property: " + prop); } if (std::find(parameters_required.begin(), parameters_required.end(), json(prop)) == parameters_required.end()) { throw std::runtime_error("Parameters of tool " + name + " must have property marked as required: " + prop); } } if (parameters_properties.size() != expected_properties.size()) { throw std::runtime_error("Parameters of tool " + name + " must only have these properties:" + string_join(expected_properties, ", ")); } }
O2
cpp
expect_tool_parameters(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x108, %rsp # imm = 0x108 movq %rdi, 0x8(%rsp) cmpb $0x1, (%rsi) jne 0xa2a49 movq %rdx, %r14 movq %rsi, %rbx leaq 0x9538(%rip), %rsi # 0xabd21 movq %rbx, %rdi callq 0x79682 testb %al, %al je 0xa2a49 leaq 0x9521(%rip), %rsi # 0xabd21 movq %rbx, %rdi callq 0x7a460 leaq 0x11302(%rip), %rsi # 0xb3b11 movq %rax, %rdi callq 0x7a02a testb %al, %al jne 0xa2a49 leaq 0x17135(%rip), %rsi # 0xb995b movq %rbx, %rdi callq 0x7980a testb %al, %al je 0xa2a49 leaq 0xfd38(%rip), %rsi # 0xb2575 movq %rbx, %rdi callq 0x8fdc8 testb %al, %al je 0xa2a49 leaq 0x17107(%rip), %rsi # 0xb995b movq %rbx, %rdi callq 0xa7b68 movq %rax, 0x58(%rsp) leaq 0xfd0d(%rip), %rsi # 0xb2575 movq %rbx, %rdi callq 0x7a1b6 movq %rax, %r13 movq (%r14), %r15 movq %r14, 0x50(%rsp) movq 0x8(%r14), %rax movq %rax, 0x80(%rsp) leaq 0x60(%rsp), %r14 leaq 0x30(%rsp), %rbp cmpq 0x80(%rsp), %r15 je 0xa2928 movq 0x58(%rsp), %rdi movq %r15, %rsi callq 0x9591e testb %al, %al je 0xa29d3 leaq 0xe8(%rsp), %rbx movq %rbx, %rdi movq %r13, %rsi callq 0x672b4 leaq 0xc8(%rsp), %r12 movq %r12, %rdi movq %r13, %rsi callq 0x67520 movq %r14, %rdi movq %r15, %rsi callq 0x5bfd6 movq %rbp, %rdi movq %rbx, %rsi movq %r12, %rdx movq %r14, %rcx callq 0xa7cbc leaq 0x10(%rsp), %rbx movq %rbx, %rdi movq %r13, %rsi callq 0x67520 movq %rbp, %rdi movq %rbx, %rsi callq 0x67348 movl %eax, %ebx movq %r14, %rdi callq 0x417be testb %bl, %bl jne 0xa295d addq $0x20, %r15 jmp 0xa2891 movq 0x58(%rsp), %rdi callq 0x41202 movq 0x50(%rsp), %rdx movq 0x8(%rdx), %rcx subq (%rdx), %rcx sarq $0x5, %rcx cmpq %rcx, %rax jne 0xa2aad addq $0x108, %rsp # imm = 0x108 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x23450 movq %rax, %r14 leaq 0x16fb9(%rip), %rsi # 0xb9928 leaq 0x60(%rsp), %rdi movq 0x8(%rsp), %rdx callq 0x38b88 leaq 0x16ff8(%rip), %rdx # 0xb997d leaq 0x10(%rsp), %rdi leaq 0x60(%rsp), %rsi callq 0x37958 leaq 0x30(%rsp), %rdi leaq 0x10(%rsp), %rsi movq %r15, %rdx callq 0x3a1b4 movb $0x1, %bpl leaq 0x30(%rsp), %rsi movq %r14, %rdi callq 0x23dc0 xorl %ebp, %ebp movq 0x59631(%rip), %rsi # 0xfbff0 movq 0x59592(%rip), %rdx # 0xfbf58 movq %r14, %rdi callq 0x23e90 jmp 0xa2b56 pushq $0x10 popq %rdi callq 0x23450 movq %rax, %r14 leaq 0x16f43(%rip), %rsi # 0xb9928 leaq 0x60(%rsp), %rdi movq 0x8(%rsp), %rdx callq 0x38b88 leaq 0x16f6b(%rip), %rdx # 0xb9966 leaq 0x10(%rsp), %rdi leaq 0x60(%rsp), %rsi callq 0x37958 leaq 0x30(%rsp), %rdi leaq 0x10(%rsp), %rsi movq %r15, %rdx callq 0x3a1b4 movb $0x1, %bpl leaq 0x30(%rsp), %rsi movq %r14, %rdi callq 0x23dc0 xorl %ebp, %ebp movq 0x595bb(%rip), %rsi # 0xfbff0 movq 0x5951c(%rip), %rdx # 0xfbf58 movq %r14, %rdi callq 0x23e90 jmp 0xa2b56 pushq $0x10 popq %rdi callq 0x23450 movq %rax, %r14 leaq 0x16ecd(%rip), %rsi # 0xb9928 leaq 0x10(%rsp), %rdi movq 0x8(%rsp), %rdx callq 0x38b88 leaq 0x16ecb(%rip), %rdx # 0xb993c leaq 0x30(%rsp), %rdi leaq 0x10(%rsp), %rsi callq 0x37958 movb $0x1, %bpl leaq 0x30(%rsp), %rsi movq %r14, %rdi callq 0x23dc0 xorl %ebp, %ebp movq 0x59557(%rip), %rsi # 0xfbff0 movq 0x594b8(%rip), %rdx # 0xfbf58 movq %r14, %rdi callq 0x23e90 jmp 0xa2b56 pushq $0x10 popq %rdi callq 0x23450 movq %rax, %r15 leaq 0x16e69(%rip), %rsi # 0xb9928 leaq 0x60(%rsp), %rdi movq 0x8(%rsp), %rdx callq 0x38b88 leaq 0x16ed1(%rip), %rdx # 0xb99a6 leaq 0x10(%rsp), %rdi leaq 0x60(%rsp), %rsi callq 0x37958 leaq 0xf988(%rip), %rsi # 0xb2473 leaq 0x88(%rsp), %rdi leaq 0x7(%rsp), %rdx callq 0x25c26 leaq 0xa8(%rsp), %rdi leaq 0x88(%rsp), %rdx movq 0x50(%rsp), %rsi callq 0x5306a leaq 0x30(%rsp), %rdi leaq 0x10(%rsp), %rsi leaq 0xa8(%rsp), %rdx callq 0x389bb movb $0x1, %bpl leaq 0x30(%rsp), %rsi movq %r15, %rdi callq 0x23dc0 xorl %ebp, %ebp movq 0x594a9(%rip), %rsi # 0xfbff0 movq 0x5940a(%rip), %rdx # 0xfbf58 movq %r15, %rdi callq 0x23e90 movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x24158 jmp 0xa2b6b movq %rax, %rbx movb $0x1, %bpl leaq 0xa8(%rsp), %rdi callq 0x24158 jmp 0xa2b80 movq %rax, %rbx movb $0x1, %bpl leaq 0x88(%rsp), %rdi callq 0x24158 jmp 0xa2b95 movq %rax, %rbx movb $0x1, %bpl leaq 0x10(%rsp), %rdi callq 0x24158 jmp 0xa2ba7 movq %rax, %rbx movb $0x1, %bpl leaq 0x60(%rsp), %rdi callq 0x24158 testb %bpl, %bpl jne 0xa2bbe jmp 0xa2c3d movq %rax, %rbx movq %r15, %rdi jmp 0xa2c27 movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x24158 jmp 0xa2bd8 movq %rax, %rbx movb $0x1, %bpl leaq 0x10(%rsp), %rdi jmp 0xa2c13 jmp 0xa2c21 jmp 0xa2be5 jmp 0xa2bf4 movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x24158 jmp 0xa2bfa movq %rax, %rbx movb $0x1, %bpl leaq 0x10(%rsp), %rdi callq 0x24158 jmp 0xa2c0e jmp 0xa2c08 movq %rax, %rbx movb $0x1, %bpl leaq 0x60(%rsp), %rdi callq 0x24158 testb %bpl, %bpl jne 0xa2c24 jmp 0xa2c3d jmp 0xa2c21 movq %rax, %rbx movq %r14, %rdi callq 0x23660 jmp 0xa2c3d jmp 0xa2c30 movq %rax, %rbx leaq 0x60(%rsp), %rdi callq 0x417be movq %rbx, %rdi callq 0x23f10 nop
_ZL22expect_tool_parametersRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKN8nlohmann16json_abi_v3_11_310basic_jsonINS8_11ordered_mapESt6vectorS4_blmdSaNS8_14adl_serializerESB_IhSaIhEEvEERKSB_IS4_SaIS4_EE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 108h mov [rsp+138h+var_130], rdi cmp byte ptr [rsi], 1 jnz loc_A2A49 mov r14, rdx mov rbx, rsi lea rsi, aPplOutputType+0Dh; "type" mov rdi, rbx call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_ test al, al jz loc_A2A49 lea rsi, aPplOutputType+0Dh; "type" mov rdi, rbx call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERKSD_PT_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[]<char const>(char const *) lea rsi, aIsNotAnObject+0Ch; "object" mov rdi, rax call _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_ test al, al jnz loc_A2A49 lea rsi, aMustBeAnObject+1Fh; "properties" mov rdi, rbx call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_ test al, al jz loc_A2A49 lea rsi, aRequired; "required" mov rdi, rbx call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_ test al, al jz loc_A2A49 lea rsi, aMustBeAnObject+1Fh; "properties" mov rdi, rbx call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_ mov [rsp+138h+var_E0], rax lea rsi, aRequired; "required" mov rdi, rbx call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_ mov r13, rax mov r15, [r14] mov [rsp+138h+var_E8], r14 mov rax, [r14+8] mov [rsp+138h+var_B8], rax lea r14, [rsp+138h+var_D8] lea rbp, [rsp+138h+var_108] loc_A2891: cmp r15, [rsp+138h+var_B8] jz loc_A2928 mov rdi, [rsp+138h+var_E0] mov rsi, r15 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsERKS9_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::contains(std::string const&) test al, al jz loc_A29D3 lea rbx, [rsp+138h+var_50] mov rdi, rbx mov rsi, r13 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6cbeginEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::cbegin(void) lea r12, [rsp+138h+var_70] mov rdi, r12 mov rsi, r13 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4cendEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::cend(void) mov rdi, r14 mov rsi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRKS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SI_EE5valueEiE4typeELi0EEEOT_ mov rdi, rbp mov rsi, rbx mov rdx, r12 mov rcx, r14 call _ZSt4findIN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEESG_ET_SJ_SJ_RKT0_; std::find<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>,nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) lea rbx, [rsp+138h+var_128] mov rdi, rbx mov rsi, r13 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4cendEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::cend(void) mov rdi, rbp mov rsi, rbx call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_ mov ebx, eax mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() test bl, bl jnz short loc_A295D add r15, 20h ; ' ' jmp loc_A2891 loc_A2928: mov rdi, [rsp+138h+var_E0] call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4sizeEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::size(void) mov rdx, [rsp+138h+var_E8] mov rcx, [rdx+8] sub rcx, [rdx] sar rcx, 5 cmp rax, rcx jnz loc_A2AAD add rsp, 108h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_A295D: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aParametersOfTo; "Parameters of tool " lea rdi, [rsp+138h+var_D8] mov rdx, [rsp+138h+var_130] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) lea rdx, aMustHaveProper; " must have property marked as required:"... lea rdi, [rsp+138h+var_128] lea rsi, [rsp+138h+var_D8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) lea rdi, [rsp+138h+var_108] lea rsi, [rsp+138h+var_128] mov rdx, r15 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_; std::operator+<char>(std::string&&,std::string const&) mov bpl, 1 lea rsi, [rsp+138h+var_108] mov rdi, r14 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp loc_A2B56 loc_A29D3: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aParametersOfTo; "Parameters of tool " lea rdi, [rsp+138h+var_D8] mov rdx, [rsp+138h+var_130] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) lea rdx, aIsMissingPrope; " is missing property: " lea rdi, [rsp+138h+var_128] lea rsi, [rsp+138h+var_D8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) lea rdi, [rsp+138h+var_108] lea rsi, [rsp+138h+var_128] mov rdx, r15 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_; std::operator+<char>(std::string&&,std::string const&) mov bpl, 1 lea rsi, [rsp+138h+var_108] mov rdi, r14 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp loc_A2B56 loc_A2A49: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aParametersOfTo; "Parameters of tool " lea rdi, [rsp+138h+var_128] mov rdx, [rsp+138h+var_130] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) lea rdx, aMustBeAnObject; " must be an object w/ required properti"... lea rdi, [rsp+138h+var_108] lea rsi, [rsp+138h+var_128] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) mov bpl, 1 lea rsi, [rsp+138h+var_108] mov rdi, r14 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp loc_A2B56 loc_A2AAD: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aParametersOfTo; "Parameters of tool " lea rdi, [rsp+138h+var_D8] mov rdx, [rsp+138h+var_130] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) lea rdx, aMustOnlyHaveTh; " must only have these properties:" lea rdi, [rsp+138h+var_128] lea rsi, [rsp+138h+var_D8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) lea rsi, aZuD+6; ", " lea rdi, [rsp+138h+var_B0] lea rdx, [rsp+138h+var_131] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+138h+var_90] lea rdx, [rsp+138h+var_B0] mov rsi, [rsp+138h+var_E8] call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&) lea rdi, [rsp+138h+var_108] lea rsi, [rsp+138h+var_128] lea rdx, [rsp+138h+var_90] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) mov bpl, 1 lea rsi, [rsp+138h+var_108] mov rdi, r15 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r15; void * call ___cxa_throw loc_A2B56: mov rbx, rax lea rdi, [rsp+138h+var_108]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_A2B6B mov rbx, rax mov bpl, 1 loc_A2B6B: lea rdi, [rsp+138h+var_90]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_A2B80 mov rbx, rax mov bpl, 1 loc_A2B80: lea rdi, [rsp+138h+var_B0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_A2B95 mov rbx, rax mov bpl, 1 loc_A2B95: lea rdi, [rsp+138h+var_128]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_A2BA7 mov rbx, rax mov bpl, 1 loc_A2BA7: lea rdi, [rsp+138h+var_D8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_A2BBE jmp loc_A2C3D mov rbx, rax loc_A2BBE: mov rdi, r15 jmp short loc_A2C27 mov rbx, rax lea rdi, [rsp+138h+var_108]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_A2BD8 mov rbx, rax mov bpl, 1 loc_A2BD8: lea rdi, [rsp+138h+var_128] jmp short loc_A2C13 jmp short loc_A2C21 jmp short loc_A2BE5 jmp short loc_A2BF4 loc_A2BE5: mov rbx, rax lea rdi, [rsp+138h+var_108]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_A2BFA loc_A2BF4: mov rbx, rax mov bpl, 1 loc_A2BFA: lea rdi, [rsp+138h+var_128]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_A2C0E jmp short $+2 loc_A2C08: mov rbx, rax mov bpl, 1 loc_A2C0E: lea rdi, [rsp+138h+var_D8]; void * loc_A2C13: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_A2C24 jmp short loc_A2C3D jmp short $+2 loc_A2C21: mov rbx, rax loc_A2C24: mov rdi, r14; void * loc_A2C27: call ___cxa_free_exception jmp short loc_A2C3D jmp short $+2 loc_A2C30: mov rbx, rax lea rdi, [rsp+138h+var_D8] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() loc_A2C3D: mov rdi, rbx call __Unwind_Resume
long long expect_tool_parameters(long long a1, _BYTE *a2, long long *a3) { long long v4; // rax long long v5; // r13 _QWORD *v6; // r15 char v7; // bl long long result; // rax void *v9; // r14 void *v10; // r14 void *exception; // r14 void *v12; // r15 _QWORD v13[4]; // [rsp+10h] [rbp-128h] BYREF _BYTE v14[32]; // [rsp+30h] [rbp-108h] BYREF long long *v15; // [rsp+50h] [rbp-E8h] unsigned __int8 *v16; // [rsp+58h] [rbp-E0h] unsigned __int8 v17[32]; // [rsp+60h] [rbp-D8h] BYREF _QWORD *v18; // [rsp+80h] [rbp-B8h] _QWORD v19[4]; // [rsp+88h] [rbp-B0h] BYREF _QWORD v20[4]; // [rsp+A8h] [rbp-90h] BYREF _BYTE v21[32]; // [rsp+C8h] [rbp-70h] BYREF _BYTE v22[80]; // [rsp+E8h] [rbp-50h] BYREF if ( *a2 != 1 || !ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_((long long)a2) || (v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]<char const>( (long long)a2, (long long)"type"), (unsigned __int8)ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_( v4, (long long)"object")) || !ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_((long long)a2) || !ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_((long long)a2) ) { exception = __cxa_allocate_exception(0x10uLL); std::operator+<char>((long long)v13, (long long)"Parameters of tool ", a1); std::operator+<char>((long long)v14, (long long)v13, (long long)" must be an object w/ required properties"); std::runtime_error::runtime_error(exception, v14); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v16 = (unsigned __int8 *)ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_( a2, "properties"); v5 = ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_( (long long)a2, (long long)"required"); v6 = (_QWORD *)*a3; v15 = a3; v18 = (_QWORD *)a3[1]; while ( v6 != v18 ) { if ( !nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::contains( (long long)v16, v6) ) { v10 = __cxa_allocate_exception(0x10uLL); std::operator+<char>((long long)v17, (long long)"Parameters of tool ", a1); std::operator+<char>((long long)v13, (long long)v17, (long long)" is missing property: "); std::operator+<char>((long long)v14, (long long)v13, (long long)v6); std::runtime_error::runtime_error(v10, v14); __cxa_throw( v10, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::cbegin( (long long)v22, v5); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::cend( (long long)v21, v5); ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRKS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SI_EE5valueEiE4typeELi0EEEOT_( v17, (long long)v6); std::find<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( v14, v22, v21, v17); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::cend( (long long)v13, v5); v7 = ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_(v14); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v17); if ( v7 ) { v9 = __cxa_allocate_exception(0x10uLL); std::operator+<char>((long long)v17, (long long)"Parameters of tool ", a1); std::operator+<char>((long long)v13, (long long)v17, (long long)" must have property marked as required: "); std::operator+<char>((long long)v14, (long long)v13, (long long)v6); std::runtime_error::runtime_error(v9, v14); __cxa_throw( v9, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v6 += 4; } result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::size(v16); if ( result != (v15[1] - *v15) >> 5 ) { v12 = __cxa_allocate_exception(0x10uLL); std::operator+<char>((long long)v17, (long long)"Parameters of tool ", a1); std::operator+<char>((long long)v13, (long long)v17, (long long)" must only have these properties:"); std::string::basic_string<std::allocator<char>>(v19, (long long)", "); string_join((long long)v20, v15, (long long)v19); std::operator+<char>((long long)v14, v13, v20); std::runtime_error::runtime_error(v12, v14); __cxa_throw( v12, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return result; }
expect_tool_parameters: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x108 MOV qword ptr [RSP + 0x8],RDI CMP byte ptr [RSI],0x1 JNZ 0x001a2a49 MOV R14,RDX MOV RBX,RSI LEA RSI,[0x1abd21] MOV RDI,RBX CALL 0x00179682 TEST AL,AL JZ 0x001a2a49 LEA RSI,[0x1abd21] MOV RDI,RBX CALL 0x0017a460 LEA RSI,[0x1b3b11] MOV RDI,RAX CALL 0x0017a02a TEST AL,AL JNZ 0x001a2a49 LEA RSI,[0x1b995b] MOV RDI,RBX CALL 0x0017980a TEST AL,AL JZ 0x001a2a49 LEA RSI,[0x1b2575] MOV RDI,RBX CALL 0x0018fdc8 TEST AL,AL JZ 0x001a2a49 LEA RSI,[0x1b995b] MOV RDI,RBX CALL 0x001a7b68 MOV qword ptr [RSP + 0x58],RAX LEA RSI,[0x1b2575] MOV RDI,RBX CALL 0x0017a1b6 MOV R13,RAX MOV R15,qword ptr [R14] MOV qword ptr [RSP + 0x50],R14 MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RSP + 0x80],RAX LEA R14,[RSP + 0x60] LEA RBP,[RSP + 0x30] LAB_001a2891: CMP R15,qword ptr [RSP + 0x80] JZ 0x001a2928 MOV RDI,qword ptr [RSP + 0x58] MOV RSI,R15 CALL 0x0019591e TEST AL,AL JZ 0x001a29d3 LEA RBX,[RSP + 0xe8] MOV RDI,RBX MOV RSI,R13 CALL 0x001672b4 LEA R12,[RSP + 0xc8] MOV RDI,R12 MOV RSI,R13 CALL 0x00167520 MOV RDI,R14 MOV RSI,R15 CALL 0x0015bfd6 LAB_001a28e5: MOV RDI,RBP MOV RSI,RBX MOV RDX,R12 MOV RCX,R14 CALL 0x001a7cbc LEA RBX,[RSP + 0x10] MOV RDI,RBX MOV RSI,R13 CALL 0x00167520 LAB_001a2906: MOV RDI,RBP MOV RSI,RBX CALL 0x00167348 LAB_001a2911: MOV EBX,EAX MOV RDI,R14 CALL 0x001417be TEST BL,BL JNZ 0x001a295d ADD R15,0x20 JMP 0x001a2891 LAB_001a2928: MOV RDI,qword ptr [RSP + 0x58] CALL 0x00141202 MOV RDX,qword ptr [RSP + 0x50] MOV RCX,qword ptr [RDX + 0x8] SUB RCX,qword ptr [RDX] SAR RCX,0x5 CMP RAX,RCX JNZ 0x001a2aad ADD RSP,0x108 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001a295d: PUSH 0x10 POP RDI CALL 0x00123450 MOV R14,RAX LAB_001a2968: LEA RSI,[0x1b9928] LEA RDI,[RSP + 0x60] MOV RDX,qword ptr [RSP + 0x8] CALL 0x00138b88 LAB_001a297e: LEA RDX,[0x1b997d] LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x60] CALL 0x00137958 LAB_001a2994: LEA RDI,[RSP + 0x30] LEA RSI,[RSP + 0x10] MOV RDX,R15 CALL 0x0013a1b4 MOV BPL,0x1 LAB_001a29a9: LEA RSI,[RSP + 0x30] MOV RDI,R14 CALL 0x00123dc0 XOR EBP,EBP MOV RSI,qword ptr [0x001fbff0] MOV RDX,qword ptr [0x001fbf58] MOV RDI,R14 CALL 0x00123e90 LAB_001a29d3: PUSH 0x10 POP RDI CALL 0x00123450 MOV R14,RAX LAB_001a29de: LEA RSI,[0x1b9928] LEA RDI,[RSP + 0x60] MOV RDX,qword ptr [RSP + 0x8] CALL 0x00138b88 LAB_001a29f4: LEA RDX,[0x1b9966] LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x60] CALL 0x00137958 LAB_001a2a0a: LEA RDI,[RSP + 0x30] LEA RSI,[RSP + 0x10] MOV RDX,R15 CALL 0x0013a1b4 MOV BPL,0x1 LAB_001a2a1f: LEA RSI,[RSP + 0x30] MOV RDI,R14 CALL 0x00123dc0 XOR EBP,EBP MOV RSI,qword ptr [0x001fbff0] MOV RDX,qword ptr [0x001fbf58] MOV RDI,R14 CALL 0x00123e90 LAB_001a2a49: PUSH 0x10 POP RDI CALL 0x00123450 MOV R14,RAX LAB_001a2a54: LEA RSI,[0x1b9928] LEA RDI,[RSP + 0x10] MOV RDX,qword ptr [RSP + 0x8] CALL 0x00138b88 LAB_001a2a6a: LEA RDX,[0x1b993c] LEA RDI,[RSP + 0x30] LEA RSI,[RSP + 0x10] CALL 0x00137958 MOV BPL,0x1 LAB_001a2a83: LEA RSI,[RSP + 0x30] MOV RDI,R14 CALL 0x00123dc0 XOR EBP,EBP MOV RSI,qword ptr [0x001fbff0] MOV RDX,qword ptr [0x001fbf58] MOV RDI,R14 CALL 0x00123e90 LAB_001a2aad: PUSH 0x10 POP RDI CALL 0x00123450 MOV R15,RAX LAB_001a2ab8: LEA RSI,[0x1b9928] LEA RDI,[RSP + 0x60] MOV RDX,qword ptr [RSP + 0x8] CALL 0x00138b88 LAB_001a2ace: LEA RDX,[0x1b99a6] LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x60] CALL 0x00137958 LAB_001a2ae4: LEA RSI,[0x1b2473] LEA RDI,[RSP + 0x88] LEA RDX,[RSP + 0x7] CALL 0x00125c26 LAB_001a2afd: LEA RDI,[RSP + 0xa8] LEA RDX,[RSP + 0x88] MOV RSI,qword ptr [RSP + 0x50] CALL 0x0015306a LAB_001a2b17: LEA RDI,[RSP + 0x30] LEA RSI,[RSP + 0x10] LEA RDX,[RSP + 0xa8] CALL 0x001389bb MOV BPL,0x1 LAB_001a2b31: LEA RSI,[RSP + 0x30] MOV RDI,R15 CALL 0x00123dc0 XOR EBP,EBP MOV RSI,qword ptr [0x001fbff0] MOV RDX,qword ptr [0x001fbf58] MOV RDI,R15 CALL 0x00123e90
/* expect_tool_parameters(std::__cxx11::string const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&) */ void expect_tool_parameters(string *param_1,basic_json *param_2,vector *param_3) { char cVar1; basic_json *pbVar2; long lVar3; runtime_error *prVar4; string *psVar5; allocator local_131; string *local_130; string local_128 [32]; string local_108 [32]; vector *local_e8; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *local_e0; data local_d8 [32]; string *local_b8; string local_b0 [32]; vector local_90 [32]; int1 local_70 [32]; int1 local_50 [32]; local_130 = param_1; if (*param_2 == '\x01') { cVar1 = _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_ (param_2,"type"); if (cVar1 != '\0') { pbVar2 = nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[]<char_const> ((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)param_2,"type"); cVar1 = _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_ (pbVar2,"object"); if (cVar1 == '\0') { cVar1 = _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_ (param_2,"properties"); if (cVar1 != '\0') { cVar1 = _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_ (param_2,"required"); if (cVar1 != '\0') { local_e0 = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_ (param_2,"properties"); _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_ (param_2,"required"); psVar5 = *(string **)param_3; local_b8 = *(string **)(param_3 + 8); local_e8 = param_3; while( true ) { if (psVar5 == local_b8) { lVar3 = nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::size(local_e0); if (lVar3 == *(long *)(local_e8 + 8) - *(long *)local_e8 >> 5) { return; } prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001a2ab8 to 001a2acd has its CatchHandler @ 001a2bbb */ std::operator+((char *)local_d8,(string *)"Parameters of tool "); /* try { // try from 001a2ace to 001a2ae3 has its CatchHandler @ 001a2ba1 */ std::operator+(local_128,(char *)local_d8); /* try { // try from 001a2ae4 to 001a2afc has its CatchHandler @ 001a2b8f */ std::__cxx11::string::string<std::allocator<char>>(local_b0,", ",&local_131); /* try { // try from 001a2afd to 001a2b16 has its CatchHandler @ 001a2b7a */ string_join(local_90,(string *)local_e8); /* try { // try from 001a2b17 to 001a2b2d has its CatchHandler @ 001a2b65 */ std::operator+(local_108,local_128); /* try { // try from 001a2b31 to 001a2b55 has its CatchHandler @ 001a2b56 */ std::runtime_error::runtime_error(prVar4,local_108); /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_001fbff0,PTR__runtime_error_001fbf58); } cVar1 = nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::contains(local_e0,psVar5); if (cVar1 == '\0') break; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::cbegin(); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::cend(); _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRKS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SI_EE5valueEiE4typeELi0EEEOT_ (local_d8,psVar5); /* try { // try from 001a28e5 to 001a28f5 has its CatchHandler @ 001a2c2e */ std:: find<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (local_108,local_50,local_70,local_d8); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::cend(); /* try { // try from 001a2906 to 001a2910 has its CatchHandler @ 001a2c30 */ cVar1 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_ (local_108,local_128); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_d8); if (cVar1 != '\0') { prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001a2968 to 001a297d has its CatchHandler @ 001a2c21 */ std::operator+((char *)local_d8,(string *)"Parameters of tool "); /* try { // try from 001a297e to 001a2993 has its CatchHandler @ 001a2c08 */ std::operator+(local_128,(char *)local_d8); /* try { // try from 001a2994 to 001a29a5 has its CatchHandler @ 001a2bf4 */ std::operator+(local_108,local_128); /* try { // try from 001a29a9 to 001a29cd has its CatchHandler @ 001a2be5 */ std::runtime_error::runtime_error(prVar4,local_108); /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_001fbff0,PTR__runtime_error_001fbf58); } psVar5 = psVar5 + 0x20; } prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001a29de to 001a29f3 has its CatchHandler @ 001a2c1f */ std::operator+((char *)local_d8,(string *)"Parameters of tool "); /* try { // try from 001a29f4 to 001a2a09 has its CatchHandler @ 001a2c06 */ std::operator+(local_128,(char *)local_d8); /* try { // try from 001a2a0a to 001a2a1b has its CatchHandler @ 001a2be3 */ std::operator+(local_108,local_128); /* try { // try from 001a2a1f to 001a2a43 has its CatchHandler @ 001a2be1 */ std::runtime_error::runtime_error(prVar4,local_108); /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_001fbff0,PTR__runtime_error_001fbf58); } } } } } prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001a2a54 to 001a2a69 has its CatchHandler @ 001a2bdf */ std::operator+((char *)local_128,(string *)"Parameters of tool "); /* try { // try from 001a2a6a to 001a2a7f has its CatchHandler @ 001a2bd2 */ std::operator+(local_108,(char *)local_128); /* try { // try from 001a2a83 to 001a2aa7 has its CatchHandler @ 001a2bc3 */ std::runtime_error::runtime_error(prVar4,local_108); /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_001fbff0,PTR__runtime_error_001fbf58); }
17,901
pfs_end_stage_v1
eloqsql/storage/perfschema/pfs.cc
void pfs_end_stage_v1() { ulonglong timer_value= 0; PFS_thread *pfs_thread= my_thread_get_THR_PFS(); if (unlikely(pfs_thread == NULL)) return; pfs_thread->m_stage= 0; pfs_thread->m_stage_progress= NULL; if (psi_unlikely(! flag_global_instrumentation)) return; if (flag_thread_instrumentation && ! pfs_thread->m_enabled) return; PFS_events_stages *pfs= & pfs_thread->m_stage_current; PFS_instr_class *old_class= pfs->m_class; if (old_class != NULL) { PFS_stage_stat *event_name_array; event_name_array= pfs_thread->write_instr_class_stages_stats(); uint index= old_class->m_event_name_index; /* Finish old event */ if (old_class->m_timed) { timer_value= get_timer_raw_value(stage_timer);; pfs->m_timer_end= timer_value; /* Aggregate to EVENTS_STAGES_SUMMARY_BY_THREAD_BY_EVENT_NAME (timed) */ ulonglong stage_time= timer_value - pfs->m_timer_start; event_name_array[index].aggregate_value(stage_time); } else { /* Aggregate to EVENTS_STAGES_SUMMARY_BY_THREAD_BY_EVENT_NAME (counted) */ event_name_array[index].aggregate_counted(); } if (flag_events_stages_current) { pfs->m_end_event_id= pfs_thread->m_event_id; if (pfs_thread->m_flag_events_stages_history) insert_events_stages_history(pfs_thread, pfs); if (pfs_thread->m_flag_events_stages_history_long) insert_events_stages_history_long(pfs); } /* New waits will now be attached directly to the parent statement. */ PFS_events_waits *child_wait= & pfs_thread->m_events_waits_stack[0]; PFS_events_statements *parent_statement= & pfs_thread->m_statement_stack[0]; child_wait->m_event_id= parent_statement->m_event.m_event_id; child_wait->m_event_type= parent_statement->m_event.m_event_type; /* This stage is completed */ pfs->m_class= NULL; } }
O3
cpp
pfs_end_stage_v1: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl 0x3a66a3(%rip), %edi # 0x3d026c callq 0x26540 testq %rax, %rax je 0x29bf1 movq %rax, %rbx andl $0x0, 0x103c(%rax) andq $0x0, 0x1040(%rax) leaq 0x3a7014(%rip), %rax # 0x3d0c00 cmpb $0x1, (%rax) je 0x29bfa popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x3a703f(%rip), %rax # 0x3d0c40 cmpb $0x1, (%rax) jne 0x29c0f cmpb $0x1, 0x7e0(%rbx) jne 0x29bf1 movq 0x1480(%rbx), %r12 testq %r12, %r12 je 0x29bf1 cmpb $0x0, 0x1(%rbx) jne 0x29c2d movq %rbx, %rdi callq 0x401ea movb $0x1, 0x1(%rbx) movq 0x10(%rbx), %r14 movl 0x10(%r12), %r15d cmpb $0x1, 0x5(%r12) jne 0x29c9a leaq 0x2ed473(%rip), %rax # 0x3170b8 movl (%rax), %edi callq 0x3a74d movq %rax, 0x1490(%rbx) subq 0x1488(%rbx), %rax shlq $0x5, %r15 leaq (%r14,%r15), %rcx movdqu (%r14,%r15), %xmm0 movq %rax, %xmm1 movdqa 0x56fbb(%rip), %xmm2 # 0x80c30 punpcklqdq %xmm1, %xmm2 # xmm2 = xmm2[0],xmm1[0] paddq %xmm0, %xmm2 movdqu %xmm2, (%r14,%r15) cmpq %rax, 0x10(%r14,%r15) ja 0x29d13 cmpq %rax, 0x18(%rcx) jae 0x29ca2 movq %rax, 0x18(%rcx) jmp 0x29ca2 shlq $0x5, %r15 incq (%r14,%r15) leaq 0x3a6957(%rip), %rax # 0x3d0600 cmpb $0x1, (%rax) jne 0x29ceb movq %rbx, %r14 addq $0x1450, %r14 # imm = 0x1450 movq 0x7f8(%rbx), %rax movq %rax, 0x1460(%rbx) cmpb $0x1, 0x7e4(%rbx) jne 0x29cda movq %rbx, %rdi movq %r14, %rsi callq 0x2b074 cmpb $0x1, 0x7e5(%rbx) jne 0x29ceb movq %r14, %rdi callq 0x2b0cb movq 0x14c0(%rbx), %rax movq 0x8(%rax), %rcx movq %rcx, 0x880(%rbx) movl 0x18(%rax), %eax movl %eax, 0x890(%rbx) andq $0x0, 0x1480(%rbx) jmp 0x29bf1 movq %rax, 0x10(%rcx) jmp 0x29c8e
pfs_end_stage_v1: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov edi, cs:THR_PFS call _pthread_getspecific test rax, rax jz short loc_29BF1 mov rbx, rax and dword ptr [rax+103Ch], 0 and qword ptr [rax+1040h], 0 lea rax, flag_global_instrumentation cmp byte ptr [rax], 1 jz short loc_29BFA loc_29BF1: pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_29BFA: lea rax, flag_thread_instrumentation cmp byte ptr [rax], 1 jnz short loc_29C0F cmp byte ptr [rbx+7E0h], 1 jnz short loc_29BF1 loc_29C0F: mov r12, [rbx+1480h] test r12, r12 jz short loc_29BF1 cmp byte ptr [rbx+1], 0 jnz short loc_29C2D mov rdi, rbx; this call _ZN20PFS_connection_slice18reset_stages_statsEv; PFS_connection_slice::reset_stages_stats(void) mov byte ptr [rbx+1], 1 loc_29C2D: mov r14, [rbx+10h] mov r15d, [r12+10h] cmp byte ptr [r12+5], 1 jnz short loc_29C9A lea rax, stage_timer mov edi, [rax] call _Z19get_timer_raw_value15enum_timer_name; get_timer_raw_value(enum_timer_name) mov [rbx+1490h], rax sub rax, [rbx+1488h] shl r15, 5 lea rcx, [r14+r15] movdqu xmm0, xmmword ptr [r14+r15] movq xmm1, rax movdqa xmm2, cs:xmmword_80C30 punpcklqdq xmm2, xmm1 paddq xmm2, xmm0 movdqu xmmword ptr [r14+r15], xmm2 cmp [r14+r15+10h], rax ja loc_29D13 loc_29C8E: cmp [rcx+18h], rax jnb short loc_29CA2 mov [rcx+18h], rax jmp short loc_29CA2 loc_29C9A: shl r15, 5 inc qword ptr [r14+r15] loc_29CA2: lea rax, flag_events_stages_current cmp byte ptr [rax], 1 jnz short loc_29CEB mov r14, rbx add r14, 1450h mov rax, [rbx+7F8h] mov [rbx+1460h], rax cmp byte ptr [rbx+7E4h], 1 jnz short loc_29CDA mov rdi, rbx mov rsi, r14 call _Z28insert_events_stages_historyP10PFS_threadP17PFS_events_stages; insert_events_stages_history(PFS_thread *,PFS_events_stages *) loc_29CDA: cmp byte ptr [rbx+7E5h], 1 jnz short loc_29CEB mov rdi, r14 call _Z33insert_events_stages_history_longP17PFS_events_stages; insert_events_stages_history_long(PFS_events_stages *) loc_29CEB: mov rax, [rbx+14C0h] mov rcx, [rax+8] mov [rbx+880h], rcx mov eax, [rax+18h] mov [rbx+890h], eax and qword ptr [rbx+1480h], 0 jmp loc_29BF1 loc_29D13: mov [rcx+10h], rax jmp loc_29C8E
long long pfs_end_stage_v1() { long long result; // rax long long v1; // rbx long long v2; // r12 long long v3; // r14 long long v4; // r15 long long timer_raw_value; // rax unsigned long long v6; // rax __m128i *v7; // rcx long long v8; // rax result = pthread_getspecific((unsigned int)THR_PFS); if ( result ) { v1 = result; *(_DWORD *)(result + 4156) = 0; *(_QWORD *)(result + 4160) = 0LL; result = (long long)flag_global_instrumentation; if ( flag_global_instrumentation[0] == 1 ) { result = (long long)flag_thread_instrumentation; if ( flag_thread_instrumentation[0] != 1 || *(_BYTE *)(v1 + 2016) == 1 ) { v2 = *(_QWORD *)(v1 + 5248); if ( v2 ) { if ( !*(_BYTE *)(v1 + 1) ) { PFS_connection_slice::reset_stages_stats((PFS_connection_slice *)v1); *(_BYTE *)(v1 + 1) = 1; } v3 = *(_QWORD *)(v1 + 16); v4 = *(unsigned int *)(v2 + 16); if ( *(_BYTE *)(v2 + 5) == 1 ) { timer_raw_value = get_timer_raw_value((unsigned int)stage_timer); *(_QWORD *)(v1 + 5264) = timer_raw_value; v6 = timer_raw_value - *(_QWORD *)(v1 + 5256); v7 = (__m128i *)(v3 + 32 * v4); *v7 = _mm_add_epi64( _mm_unpacklo_epi64(_mm_load_si128((const __m128i *)&xmmword_80C30), (__m128i)v6), _mm_loadu_si128(v7)); if ( v7[1].m128i_i64[0] > v6 ) v7[1].m128i_i64[0] = v6; if ( v7[1].m128i_i64[1] < v6 ) v7[1].m128i_i64[1] = v6; } else { ++*(_QWORD *)(v3 + 32 * v4); } if ( flag_events_stages_current == 1 ) { *(_QWORD *)(v1 + 5216) = *(_QWORD *)(v1 + 2040); if ( *(_BYTE *)(v1 + 2020) == 1 ) insert_events_stages_history(v1, v1 + 5200); if ( *(_BYTE *)(v1 + 2021) == 1 ) insert_events_stages_history_long(v1 + 5200); } v8 = *(_QWORD *)(v1 + 5312); *(_QWORD *)(v1 + 2176) = *(_QWORD *)(v8 + 8); result = *(unsigned int *)(v8 + 24); *(_DWORD *)(v1 + 2192) = result; *(_QWORD *)(v1 + 5248) = 0LL; } } } } return result; }
pfs_end_stage_v1: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV EDI,dword ptr [0x004d026c] CALL 0x00126540 TEST RAX,RAX JZ 0x00129bf1 MOV RBX,RAX AND dword ptr [RAX + 0x103c],0x0 AND qword ptr [RAX + 0x1040],0x0 LEA RAX,[0x4d0c00] CMP byte ptr [RAX],0x1 JZ 0x00129bfa LAB_00129bf1: POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00129bfa: LEA RAX,[0x4d0c40] CMP byte ptr [RAX],0x1 JNZ 0x00129c0f CMP byte ptr [RBX + 0x7e0],0x1 JNZ 0x00129bf1 LAB_00129c0f: MOV R12,qword ptr [RBX + 0x1480] TEST R12,R12 JZ 0x00129bf1 CMP byte ptr [RBX + 0x1],0x0 JNZ 0x00129c2d MOV RDI,RBX CALL 0x001401ea MOV byte ptr [RBX + 0x1],0x1 LAB_00129c2d: MOV R14,qword ptr [RBX + 0x10] MOV R15D,dword ptr [R12 + 0x10] CMP byte ptr [R12 + 0x5],0x1 JNZ 0x00129c9a LEA RAX,[0x4170b8] MOV EDI,dword ptr [RAX] CALL 0x0013a74d MOV qword ptr [RBX + 0x1490],RAX SUB RAX,qword ptr [RBX + 0x1488] SHL R15,0x5 LEA RCX,[R14 + R15*0x1] MOVDQU XMM0,xmmword ptr [R14 + R15*0x1] MOVQ XMM1,RAX MOVDQA XMM2,xmmword ptr [0x00180c30] PUNPCKLQDQ XMM2,XMM1 PADDQ XMM2,XMM0 MOVDQU xmmword ptr [R14 + R15*0x1],XMM2 CMP qword ptr [R14 + R15*0x1 + 0x10],RAX JA 0x00129d13 LAB_00129c8e: CMP qword ptr [RCX + 0x18],RAX JNC 0x00129ca2 MOV qword ptr [RCX + 0x18],RAX JMP 0x00129ca2 LAB_00129c9a: SHL R15,0x5 INC qword ptr [R14 + R15*0x1] LAB_00129ca2: LEA RAX,[0x4d0600] CMP byte ptr [RAX],0x1 JNZ 0x00129ceb MOV R14,RBX ADD R14,0x1450 MOV RAX,qword ptr [RBX + 0x7f8] MOV qword ptr [RBX + 0x1460],RAX CMP byte ptr [RBX + 0x7e4],0x1 JNZ 0x00129cda MOV RDI,RBX MOV RSI,R14 CALL 0x0012b074 LAB_00129cda: CMP byte ptr [RBX + 0x7e5],0x1 JNZ 0x00129ceb MOV RDI,R14 CALL 0x0012b0cb LAB_00129ceb: MOV RAX,qword ptr [RBX + 0x14c0] MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RBX + 0x880],RCX MOV EAX,dword ptr [RAX + 0x18] MOV dword ptr [RBX + 0x890],EAX AND qword ptr [RBX + 0x1480],0x0 JMP 0x00129bf1 LAB_00129d13: MOV qword ptr [RCX + 0x10],RAX JMP 0x00129c8e
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void pfs_end_stage_v1(void) { long *plVar1; uint uVar2; long lVar3; long lVar4; PFS_connection_slice *this; long lVar5; ulong uVar6; long lVar7; this = (PFS_connection_slice *)pthread_getspecific(THR_PFS); if (this != (PFS_connection_slice *)0x0) { *(int4 *)(this + 0x103c) = 0; *(int8 *)(this + 0x1040) = 0; if ((flag_global_instrumentation == '\x01') && (((flag_thread_instrumentation != '\x01' || (this[0x7e0] == (PFS_connection_slice)0x1)) && (lVar5 = *(long *)(this + 0x1480), lVar5 != 0)))) { if (this[1] == (PFS_connection_slice)0x0) { PFS_connection_slice::reset_stages_stats(this); this[1] = (PFS_connection_slice)0x1; } lVar3 = *(long *)(this + 0x10); uVar2 = *(uint *)(lVar5 + 0x10); if (*(char *)(lVar5 + 5) == '\x01') { lVar5 = get_timer_raw_value(stage_timer); *(long *)(this + 0x1490) = lVar5; uVar6 = lVar5 - *(long *)(this + 0x1488); lVar7 = (ulong)uVar2 * 0x20; lVar5 = lVar3 + lVar7; lVar4 = ((long *)(lVar3 + lVar7))[1]; *(long *)(lVar3 + lVar7) = _DAT_00180c30 + *(long *)(lVar3 + lVar7); ((long *)(lVar3 + lVar7))[1] = uVar6 + lVar4; if (uVar6 < *(ulong *)(lVar3 + 0x10 + lVar7)) { *(ulong *)(lVar5 + 0x10) = uVar6; } if (*(ulong *)(lVar5 + 0x18) < uVar6) { *(ulong *)(lVar5 + 0x18) = uVar6; } } else { plVar1 = (long *)(lVar3 + (ulong)uVar2 * 0x20); *plVar1 = *plVar1 + 1; } if (flag_events_stages_current == '\x01') { *(int8 *)(this + 0x1460) = *(int8 *)(this + 0x7f8); if (this[0x7e4] == (PFS_connection_slice)0x1) { insert_events_stages_history((PFS_thread *)this,(PFS_events_stages *)(this + 0x1450)); } if (this[0x7e5] == (PFS_connection_slice)0x1) { insert_events_stages_history_long((PFS_events_stages *)(this + 0x1450)); } } *(int8 *)(this + 0x880) = *(int8 *)(*(long *)(this + 0x14c0) + 8); *(int4 *)(this + 0x890) = *(int4 *)(*(long *)(this + 0x14c0) + 0x18); *(int8 *)(this + 0x1480) = 0; } } return; }
17,902
bitmap_is_overlapping
eloqsql/mysys/my_bitmap.c
my_bool bitmap_is_overlapping(const MY_BITMAP *map1, const MY_BITMAP *map2) { my_bitmap_map *m1= map1->bitmap, *m2= map2->bitmap, *end; DBUG_ASSERT(map1->bitmap); DBUG_ASSERT(map2->bitmap); DBUG_ASSERT(map1->n_bits==map2->n_bits); end= map1->last_word_ptr; while (m1 < end) { if ((*m1++) & (*m2++)) return 1; } /* here both maps have the same number of bits - see assert above */ return ((*m1 & *m2 & ~map1->last_word_mask) ? 1 : 0); }
O3
c
bitmap_is_overlapping: pushq %rbp movq %rsp, %rbp movq (%rdi), %rax movq 0x8(%rdi), %rdx movq (%rsi), %rcx cmpq %rdx, %rax jae 0x9e96e leaq 0x4(%rax), %rsi movl (%rcx), %r8d addq $0x4, %rcx testl %r8d, (%rax) movq %rsi, %rax je 0x9e952 movb $0x1, %al jmp 0x9e97c movl (%rcx), %ecx andl (%rax), %ecx movl 0x18(%rdi), %eax notl %eax testl %eax, %ecx setne %al popq %rbp retq
bitmap_is_overlapping: push rbp mov rbp, rsp mov rax, [rdi] mov rdx, [rdi+8] mov rcx, [rsi] loc_9E952: cmp rax, rdx jnb short loc_9E96E lea rsi, [rax+4] mov r8d, [rcx] add rcx, 4 test [rax], r8d mov rax, rsi jz short loc_9E952 mov al, 1 jmp short loc_9E97C loc_9E96E: mov ecx, [rcx] and ecx, [rax] mov eax, [rdi+18h] not eax test ecx, eax setnz al loc_9E97C: pop rbp retn
bool bitmap_is_overlapping(long long a1, int **a2) { _DWORD *v2; // rax int *v3; // rcx int v4; // r8d v2 = *(_DWORD **)a1; v3 = *a2; while ( (unsigned long long)v2 < *(_QWORD *)(a1 + 8) ) { v4 = *v3++; if ( (v4 & *v2++) != 0 ) return 1; } return (~*(_DWORD *)(a1 + 24) & *v2 & *v3) != 0; }
bitmap_is_overlapping: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI] MOV RDX,qword ptr [RDI + 0x8] MOV RCX,qword ptr [RSI] LAB_0019e952: CMP RAX,RDX JNC 0x0019e96e LEA RSI,[RAX + 0x4] MOV R8D,dword ptr [RCX] ADD RCX,0x4 TEST dword ptr [RAX],R8D MOV RAX,RSI JZ 0x0019e952 MOV AL,0x1 JMP 0x0019e97c LAB_0019e96e: MOV ECX,dword ptr [RCX] AND ECX,dword ptr [RAX] MOV EAX,dword ptr [RDI + 0x18] NOT EAX TEST ECX,EAX SETNZ AL LAB_0019e97c: POP RBP RET
ulong bitmap_is_overlapping(int8 *param_1,int8 *param_2) { uint *puVar1; uint uVar2; uint uVar3; uint *puVar4; uint *puVar5; puVar5 = (uint *)*param_2; puVar4 = (uint *)*param_1; do { if ((uint *)param_1[1] <= puVar4) { return (ulong)CONCAT31((int3)(~*(uint *)(param_1 + 3) >> 8), (*puVar5 & *puVar4 & ~*(uint *)(param_1 + 3)) != 0); } puVar1 = puVar4 + 1; uVar2 = *puVar5; puVar5 = puVar5 + 1; uVar3 = *puVar4; puVar4 = puVar1; } while ((uVar3 & uVar2) == 0); return CONCAT71((int7)((ulong)puVar1 >> 8),1); }
17,903
write_rest_of_head
eloqsql/storage/maria/ma_bitmap.c
static my_bool write_rest_of_head(MARIA_HA *info, uint position, ulong rest_length) { MARIA_SHARE *share= info->s; uint full_page_size= FULL_PAGE_SIZE(share); MARIA_BITMAP_BLOCK *block; DBUG_ENTER("write_rest_of_head"); DBUG_PRINT("enter", ("position: %u rest_length: %lu", position, rest_length)); if (position == 0) { /* Write out full pages */ uint pages= rest_length / full_page_size; rest_length%= full_page_size; if (rest_length >= MAX_TAIL_SIZE(share->block_size)) { /* Put tail on a full page */ pages++; rest_length= 0; } if (find_mid(info, pages, 1)) DBUG_RETURN(1); /* Insert empty block after full pages, to allow write_block_record() to split segment into used + free page */ block= dynamic_element(&info->bitmap_blocks, 2, MARIA_BITMAP_BLOCK*); block->page_count= 0; block->used= 0; } if (rest_length) { if (find_tail(info, rest_length, ELEMENTS_RESERVED_FOR_MAIN_PART - 1)) DBUG_RETURN(1); } else { /* Empty tail block */ block= dynamic_element(&info->bitmap_blocks, ELEMENTS_RESERVED_FOR_MAIN_PART - 1, MARIA_BITMAP_BLOCK *); block->page_count= 0; block->used= 0; } DBUG_RETURN(0); }
O3
c
write_rest_of_head: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movq %rdi, %rbx testl %esi, %esi jne 0x4f166 movq (%rbx), %r15 movl 0x7bc(%r15), %ecx movl 0xc18(%r15), %eax negl %eax leal (%rcx,%rax), %esi addl $-0xc, %esi movq %r14, %rax xorl %edx, %edx divq %rsi movq %rax, %r12 xorl %eax, %eax leal (%rcx,%rcx,2), %ecx shrl $0x2, %ecx movq %rdx, %r14 cmpq %rcx, %rdx cmovaeq %rax, %r14 sbbl $-0x1, %r12d addq $0xa10, %r15 # imm = 0xA10 movq 0x2c0(%rbx), %r13 addq $0x18, %r13 movq %r15, %rdi movq %r12, %rsi movq %r13, %rdx movl $0x1, %ecx callq 0x5055b testq %rax, %rax jne 0x4f154 movq %rbx, %rdi movq %r15, %rsi callq 0x50518 testb %al, %al je 0x4f129 movb $0x1, %al jmp 0x4f199 movq 0x2c0(%rbx), %rax movl $0x0, 0x38(%rax) movb $0x0, 0x44(%rax) testq %r14, %r14 je 0x4f185 movq %rbx, %rdi movl %r14d, %esi movl $0x3, %edx callq 0x50828 movl %eax, %ecx movb $0x1, %al testb %cl, %cl jne 0x4f199 jmp 0x4f197 movq 0x2c0(%rbx), %rax movl $0x0, 0x50(%rax) movb $0x0, 0x5c(%rax) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
write_rest_of_head: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rdx mov rbx, rdi test esi, esi jnz loc_4F166 mov r15, [rbx] mov ecx, [r15+7BCh] mov eax, [r15+0C18h] neg eax lea esi, [rcx+rax] add esi, 0FFFFFFF4h mov rax, r14 xor edx, edx div rsi mov r12, rax xor eax, eax lea ecx, [rcx+rcx*2] shr ecx, 2 mov r14, rdx cmp rdx, rcx cmovnb r14, rax sbb r12d, 0FFFFFFFFh add r15, 0A10h mov r13, [rbx+2C0h] add r13, 18h loc_4F129: mov rdi, r15 mov rsi, r12 mov rdx, r13 mov ecx, 1 call allocate_full_pages test rax, rax jnz short loc_4F154 mov rdi, rbx mov rsi, r15 call move_to_next_bitmap test al, al jz short loc_4F129 mov al, 1 jmp short loc_4F199 loc_4F154: mov rax, [rbx+2C0h] mov dword ptr [rax+38h], 0 mov byte ptr [rax+44h], 0 loc_4F166: test r14, r14 jz short loc_4F185 mov rdi, rbx mov esi, r14d mov edx, 3 call find_tail mov ecx, eax mov al, 1 test cl, cl jnz short loc_4F199 jmp short loc_4F197 loc_4F185: mov rax, [rbx+2C0h] mov dword ptr [rax+50h], 0 mov byte ptr [rax+5Ch], 0 loc_4F197: xor eax, eax loc_4F199: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char write_rest_of_head(_QWORD *a1, int a2, unsigned long long a3) { unsigned long long v3; // r14 int v4; // ecx unsigned long long v5; // rdx unsigned long long v6; // r12 unsigned long long v7; // rcx long long v8; // r12 long long v9; // r15 long long v10; // r13 long long v11; // rdx long long v12; // rcx long long v13; // r8 long long v14; // r9 char result; // al long long v16; // rax char tail; // cl long long v18; // rax v3 = a3; if ( !a2 ) { v4 = *(_DWORD *)(*a1 + 1980LL); v5 = a3 % (unsigned int)(v4 - *(_DWORD *)(*a1 + 3096LL) - 12); v6 = v3 / (unsigned int)(v4 - *(_DWORD *)(*a1 + 3096LL) - 12); v7 = (unsigned int)(3 * v4) >> 2; v3 = v5; if ( v5 >= v7 ) v3 = 0LL; v8 = (unsigned int)v6 - ((v5 < v7) - 1); v9 = *a1 + 2576LL; v10 = a1[88] + 24LL; while ( !allocate_full_pages(v9, v8, v10, 1LL) ) { if ( (unsigned __int8)move_to_next_bitmap(a1, v9, v11, v12, v13, v14) ) return 1; } v16 = a1[88]; *(_DWORD *)(v16 + 56) = 0; *(_BYTE *)(v16 + 68) = 0; } if ( v3 ) { tail = find_tail(a1); result = 1; if ( tail ) return result; } else { v18 = a1[88]; *(_DWORD *)(v18 + 80) = 0; *(_BYTE *)(v18 + 92) = 0; } return 0; }
write_rest_of_head: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDX MOV RBX,RDI TEST ESI,ESI JNZ 0x0014f166 MOV R15,qword ptr [RBX] MOV ECX,dword ptr [R15 + 0x7bc] MOV EAX,dword ptr [R15 + 0xc18] NEG EAX LEA ESI,[RCX + RAX*0x1] ADD ESI,-0xc MOV RAX,R14 XOR EDX,EDX DIV RSI MOV R12,RAX XOR EAX,EAX LEA ECX,[RCX + RCX*0x2] SHR ECX,0x2 MOV R14,RDX CMP RDX,RCX CMOVNC R14,RAX SBB R12D,-0x1 ADD R15,0xa10 MOV R13,qword ptr [RBX + 0x2c0] ADD R13,0x18 LAB_0014f129: MOV RDI,R15 MOV RSI,R12 MOV RDX,R13 MOV ECX,0x1 CALL 0x0015055b TEST RAX,RAX JNZ 0x0014f154 MOV RDI,RBX MOV RSI,R15 CALL 0x00150518 TEST AL,AL JZ 0x0014f129 MOV AL,0x1 JMP 0x0014f199 LAB_0014f154: MOV RAX,qword ptr [RBX + 0x2c0] MOV dword ptr [RAX + 0x38],0x0 MOV byte ptr [RAX + 0x44],0x0 LAB_0014f166: TEST R14,R14 JZ 0x0014f185 MOV RDI,RBX MOV ESI,R14D MOV EDX,0x3 CALL 0x00150828 MOV ECX,EAX MOV AL,0x1 TEST CL,CL JNZ 0x0014f199 JMP 0x0014f197 LAB_0014f185: MOV RAX,qword ptr [RBX + 0x2c0] MOV dword ptr [RAX + 0x50],0x0 MOV byte ptr [RAX + 0x5c],0x0 LAB_0014f197: XOR EAX,EAX LAB_0014f199: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 write_rest_of_head(long *param_1,int param_2,ulong param_3) { long lVar1; long lVar2; ulong uVar3; char cVar4; long lVar5; int8 uVar6; uint uVar7; bool bVar8; if (param_2 == 0) { lVar1 = *param_1; uVar7 = (*(int *)(lVar1 + 0x7bc) - *(int *)(lVar1 + 0xc18)) - 0xc; uVar3 = param_3 / uVar7; param_3 = param_3 % (ulong)uVar7; bVar8 = param_3 < (uint)(*(int *)(lVar1 + 0x7bc) * 3) >> 2; if (!bVar8) { param_3 = 0; } lVar2 = param_1[0x58]; do { lVar5 = allocate_full_pages(lVar1 + 0xa10,((int)uVar3 + 1) - (uint)bVar8,lVar2 + 0x18,1); if (lVar5 != 0) { lVar1 = param_1[0x58]; *(int4 *)(lVar1 + 0x38) = 0; *(int1 *)(lVar1 + 0x44) = 0; goto LAB_0014f166; } cVar4 = move_to_next_bitmap(param_1,lVar1 + 0xa10); } while (cVar4 == '\0'); uVar6 = 1; } else { LAB_0014f166: if (param_3 == 0) { lVar1 = param_1[0x58]; *(int4 *)(lVar1 + 0x50) = 0; *(int1 *)(lVar1 + 0x5c) = 0; } else { cVar4 = find_tail(param_1,param_3 & 0xffffffff,3); if (cVar4 != '\0') { return 1; } } uVar6 = 0; } return uVar6; }
17,904
get_charset_number
eloqsql/mysys/charset.c
uint get_charset_number(const char *charset_name, uint cs_flags, myf flags) { uint id; const char *new_charset_name= flags & MY_UTF8_IS_UTF8MB3 ? "utf8mb3" : "utf8mb4"; my_pthread_once(&charsets_initialized, init_available_charsets); if ((id= get_charset_number_internal(charset_name, cs_flags))) return id; if ((charset_name= !my_strcasecmp(&my_charset_latin1, charset_name, "utf8") ? new_charset_name : NULL)) return get_charset_number_internal(charset_name, cs_flags); return 0; }
O0
c
get_charset_number: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq -0x20(%rbp), %rdx andq $0x400, %rdx # imm = 0x400 leaq 0x53080(%rip), %rax # 0x7fe15 leaq 0x53071(%rip), %rcx # 0x7fe0d cmpq $0x0, %rdx cmovneq %rcx, %rax movq %rax, -0x30(%rbp) leaq 0x3689f5(%rip), %rdi # 0x3957a4 leaq -0x306(%rip), %rsi # 0x2cab0 callq 0x24280 movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi callq 0x2ce50 movl %eax, -0x24(%rbp) cmpl $0x0, %eax je 0x2cdd7 movl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x2ce3a leaq 0x24ec82(%rip), %rax # 0x27ba60 movq 0xc0(%rax), %rax movq 0x40(%rax), %rax movq -0x10(%rbp), %rsi leaq 0x24ec6c(%rip), %rdi # 0x27ba60 leaq 0x53022(%rip), %rdx # 0x7fe1d callq *%rax cmpl $0x0, %eax jne 0x2ce0c movq -0x30(%rbp), %rax movq %rax, -0x38(%rbp) jmp 0x2ce14 xorl %eax, %eax movq %rax, -0x38(%rbp) jmp 0x2ce14 movq -0x38(%rbp), %rax movq %rax, -0x10(%rbp) cmpq $0x0, %rax je 0x2ce33 movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi callq 0x2ce50 movl %eax, -0x4(%rbp) jmp 0x2ce3a movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
get_charset_number: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov rdx, [rbp+var_20] and rdx, 400h lea rax, aUtf8mb4; "utf8mb4" lea rcx, aUtf8mb3; "utf8mb3" cmp rdx, 0 cmovnz rax, rcx mov [rbp+var_30], rax lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once mov rdi, [rbp+var_10] mov esi, [rbp+var_14] call get_charset_number_internal mov [rbp+var_24], eax cmp eax, 0 jz short loc_2CDD7 mov eax, [rbp+var_24] mov [rbp+var_4], eax jmp short loc_2CE3A loc_2CDD7: lea rax, my_charset_latin1 mov rax, [rax+0C0h] mov rax, [rax+40h] mov rsi, [rbp+var_10] lea rdi, my_charset_latin1 lea rdx, aUtf8; "utf8" call rax cmp eax, 0 jnz short loc_2CE0C mov rax, [rbp+var_30] mov [rbp+var_38], rax jmp short loc_2CE14 loc_2CE0C: xor eax, eax mov [rbp+var_38], rax jmp short $+2 loc_2CE14: mov rax, [rbp+var_38] mov [rbp+var_10], rax cmp rax, 0 jz short loc_2CE33 mov rdi, [rbp+var_10] mov esi, [rbp+var_14] call get_charset_number_internal mov [rbp+var_4], eax jmp short loc_2CE3A loc_2CE33: mov [rbp+var_4], 0 loc_2CE3A: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long get_charset_number(long long a1, unsigned int a2, __int16 a3) { const char *v3; // rax const char *v5; // [rsp+8h] [rbp-38h] const char *v6; // [rsp+10h] [rbp-30h] unsigned int charset_number_internal; // [rsp+1Ch] [rbp-24h] v3 = "utf8mb4"; if ( (a3 & 0x400) != 0 ) v3 = "utf8mb3"; v6 = v3; pthread_once(&charsets_initialized, init_available_charsets); charset_number_internal = get_charset_number_internal(a1, a2); if ( charset_number_internal ) { return charset_number_internal; } else { if ( (*(unsigned int ( **)(void *, long long, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, a1, "utf8") ) { v5 = 0LL; } else { v5 = v6; } if ( v5 ) return (unsigned int)get_charset_number_internal(v5, a2); else return 0; } }
get_charset_number: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV RDX,qword ptr [RBP + -0x20] AND RDX,0x400 LEA RAX,[0x17fe15] LEA RCX,[0x17fe0d] CMP RDX,0x0 CMOVNZ RAX,RCX MOV qword ptr [RBP + -0x30],RAX LEA RDI,[0x4957a4] LEA RSI,[0x12cab0] CALL 0x00124280 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] CALL 0x0012ce50 MOV dword ptr [RBP + -0x24],EAX CMP EAX,0x0 JZ 0x0012cdd7 MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4],EAX JMP 0x0012ce3a LAB_0012cdd7: LEA RAX,[0x37ba60] MOV RAX,qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RAX + 0x40] MOV RSI,qword ptr [RBP + -0x10] LEA RDI,[0x37ba60] LEA RDX,[0x17fe1d] CALL RAX CMP EAX,0x0 JNZ 0x0012ce0c MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x38],RAX JMP 0x0012ce14 LAB_0012ce0c: XOR EAX,EAX MOV qword ptr [RBP + -0x38],RAX JMP 0x0012ce14 LAB_0012ce14: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x10],RAX CMP RAX,0x0 JZ 0x0012ce33 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] CALL 0x0012ce50 MOV dword ptr [RBP + -0x4],EAX JMP 0x0012ce3a LAB_0012ce33: MOV dword ptr [RBP + -0x4],0x0 LAB_0012ce3a: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
int get_charset_number(int8 param_1,int4 param_2,ulong param_3) { int iVar1; char *local_40; int local_c; local_40 = "utf8mb4"; if ((param_3 & 0x400) != 0) { local_40 = "utf8mb3"; } pthread_once(&charsets_initialized,init_available_charsets); local_c = get_charset_number_internal(param_1,param_2); if (local_c == 0) { iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_0037bb20 + 0x40)) (&my_charset_latin1,param_1,&DAT_0017fe1d); if (iVar1 != 0) { local_40 = (char *)0x0; } if (local_40 == (char *)0x0) { local_c = 0; } else { local_c = get_charset_number_internal(local_40,param_2); } } return local_c; }
17,905
JS_GetFunctionRealm
bluesky950520[P]quickjs/quickjs.c
static JSContext *JS_GetFunctionRealm(JSContext *ctx, JSValue func_obj) { JSObject *p; JSContext *realm; if (JS_VALUE_GET_TAG(func_obj) != JS_TAG_OBJECT) return ctx; p = JS_VALUE_GET_OBJ(func_obj); switch(p->class_id) { case JS_CLASS_C_FUNCTION: realm = p->u.cfunc.realm; break; case JS_CLASS_BYTECODE_FUNCTION: case JS_CLASS_GENERATOR_FUNCTION: case JS_CLASS_ASYNC_FUNCTION: case JS_CLASS_ASYNC_GENERATOR_FUNCTION: { JSFunctionBytecode *b; b = p->u.func.function_bytecode; realm = b->realm; } break; case JS_CLASS_PROXY: { JSProxyData *s = p->u.opaque; if (!s) return ctx; if (s->is_revoked) { JS_ThrowTypeErrorRevokedProxy(ctx); return NULL; } else { realm = JS_GetFunctionRealm(ctx, s->target); } } break; case JS_CLASS_BOUND_FUNCTION: { JSBoundFunction *bf = p->u.bound_function; realm = JS_GetFunctionRealm(ctx, bf->func_obj); } break; default: realm = ctx; break; } return realm; }
O2
c
JS_GetFunctionRealm: pushq %rax leaq 0x3a761(%rip), %rax # 0x86fec cmpl $-0x1, %edx jne 0x4c8e8 movzwl 0x6(%rsi), %ecx leal -0xc(%rcx), %edx cmpl $0x4, %edx ja 0x4c8ab movslq (%rax,%rdx,4), %rcx addq %rax, %rcx jmpq *%rcx movq 0x30(%rsi), %rcx jmp 0x4c8bf cmpl $0x30, %ecx jne 0x4c8c7 movq 0x30(%rsi), %rcx testq %rcx, %rcx je 0x4c8e8 cmpb $0x0, 0x21(%rcx) jne 0x4c8e1 movl 0x8(%rcx), %edx movq (%rcx), %rsi jmp 0x4c88b cmpl $0x34, %ecx je 0x4c8d1 cmpl $0x38, %ecx jne 0x4c8e8 movq 0x30(%rsi), %rax movq 0x48(%rax), %rdi jmp 0x4c8e8 movq 0x30(%rsi), %rdi jmp 0x4c8e8 callq 0x3994f xorl %edi, %edi movq %rdi, %rax popq %rcx retq
JS_GetFunctionRealm: push rax lea rax, jpt_4C8A3 loc_4C88B: cmp edx, 0FFFFFFFFh jnz short loc_4C8E8; jumptable 000000000004C8A3 case 15 movzx ecx, word ptr [rsi+6] lea edx, [rcx-0Ch]; switch 5 cases cmp edx, 4 ja short def_4C8A3; jumptable 000000000004C8A3 default case movsxd rcx, ds:(jpt_4C8A3 - 86FECh)[rax+rdx*4] add rcx, rax jmp rcx; switch jump loc_4C8A5: mov rcx, [rsi+30h]; jumptable 000000000004C8A3 case 14 jmp short loc_4C8BF def_4C8A3: cmp ecx, 30h ; '0'; jumptable 000000000004C8A3 default case jnz short loc_4C8C7 mov rcx, [rsi+30h] test rcx, rcx jz short loc_4C8E8; jumptable 000000000004C8A3 case 15 cmp byte ptr [rcx+21h], 0 jnz short loc_4C8E1 loc_4C8BF: mov edx, [rcx+8] mov rsi, [rcx] jmp short loc_4C88B loc_4C8C7: cmp ecx, 34h ; '4' jz short loc_4C8D1; jumptable 000000000004C8A3 cases 13,16 cmp ecx, 38h ; '8' jnz short loc_4C8E8; jumptable 000000000004C8A3 case 15 loc_4C8D1: mov rax, [rsi+30h]; jumptable 000000000004C8A3 cases 13,16 mov rdi, [rax+48h] jmp short loc_4C8E8; jumptable 000000000004C8A3 case 15 loc_4C8DB: mov rdi, [rsi+30h]; jumptable 000000000004C8A3 case 12 jmp short loc_4C8E8; jumptable 000000000004C8A3 case 15 loc_4C8E1: call JS_ThrowTypeErrorRevokedProxy xor edi, edi loc_4C8E8: mov rax, rdi; jumptable 000000000004C8A3 case 15 pop rcx retn
long long JS_GetFunctionRealm( long long a1, long long a2, int a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, long long a12, long long a13, long long a14) { char v14; // al int v15; // ecx long long v16; // rdx long long v17; // rcx while ( 2 ) { if ( a3 != -1 ) return a1; v15 = *(unsigned __int16 *)(a2 + 6); v16 = (unsigned int)(v15 - 12); switch ( *(_WORD *)(a2 + 6) ) { case 0xC: return *(_QWORD *)(a2 + 48); case 0xD: case 0x10: return *(_QWORD *)(*(_QWORD *)(a2 + 48) + 72LL); case 0xE: v17 = *(_QWORD *)(a2 + 48); goto LABEL_7; case 0xF: return a1; default: if ( v15 == 48 ) { v17 = *(_QWORD *)(a2 + 48); if ( !v17 ) return a1; if ( *(_BYTE *)(v17 + 33) ) { JS_ThrowTypeErrorRevokedProxy(a1, a4, a5, a6, a7, a8, a9, a10, a11, a2, v16, v17, a13, a14, v14); return 0LL; } LABEL_7: a3 = *(_DWORD *)(v17 + 8); a2 = *(_QWORD *)v17; continue; } if ( v15 == 52 || v15 == 56 ) return *(_QWORD *)(*(_QWORD *)(a2 + 48) + 72LL); return a1; } } }
JS_GetFunctionRealm: PUSH RAX LEA RAX,[0x186fec] LAB_0014c88b: CMP EDX,-0x1 JNZ 0x0014c8e8 MOVZX ECX,word ptr [RSI + 0x6] LEA EDX,[RCX + -0xc] CMP EDX,0x4 JA 0x0014c8ab MOVSXD RCX,dword ptr [RAX + RDX*0x4] ADD RCX,RAX switchD: JMP RCX caseD_e: MOV RCX,qword ptr [RSI + 0x30] JMP 0x0014c8bf default: CMP ECX,0x30 JNZ 0x0014c8c7 MOV RCX,qword ptr [RSI + 0x30] TEST RCX,RCX JZ 0x0014c8e8 CMP byte ptr [RCX + 0x21],0x0 JNZ 0x0014c8e1 LAB_0014c8bf: MOV EDX,dword ptr [RCX + 0x8] MOV RSI,qword ptr [RCX] JMP 0x0014c88b LAB_0014c8c7: CMP ECX,0x34 JZ 0x0014c8d1 CMP ECX,0x38 JNZ 0x0014c8e8 caseD_d: MOV RAX,qword ptr [RSI + 0x30] MOV RDI,qword ptr [RAX + 0x48] JMP 0x0014c8e8 caseD_c: MOV RDI,qword ptr [RSI + 0x30] JMP 0x0014c8e8 LAB_0014c8e1: CALL 0x0013994f XOR EDI,EDI caseD_f: MOV RAX,RDI POP RCX RET
int8 JS_GetFunctionRealm(int8 param_1,long param_2,int param_3) { short sVar1; long *plVar2; while (param_3 == -1) { sVar1 = *(short *)(param_2 + 6); switch(sVar1) { case 0xc: return *(int8 *)(param_2 + 0x30); case 0xd: case 0x10: switchD_0014c8a3_caseD_d: return *(int8 *)(*(long *)(param_2 + 0x30) + 0x48); case 0xe: plVar2 = *(long **)(param_2 + 0x30); break; case 0xf: goto switchD_0014c8a3_caseD_f; default: if (sVar1 != 0x30) { if ((sVar1 != 0x34) && (sVar1 != 0x38)) { return param_1; } goto switchD_0014c8a3_caseD_d; } plVar2 = *(long **)(param_2 + 0x30); if (plVar2 == (long *)0x0) { return param_1; } if (*(char *)((long)plVar2 + 0x21) != '\0') { JS_ThrowTypeErrorRevokedProxy(); return 0; } } param_2 = *plVar2; param_3 = (int)plVar2[1]; } switchD_0014c8a3_caseD_f: return param_1; }
17,906
my_charpos_mb
eloqsql/strings/ctype-mb.c
size_t my_charpos_mb(CHARSET_INFO *cs __attribute__((unused)), const char *pos, const char *end, size_t length) { const char *start= pos; while (length && pos < end) { uint mb_len; pos+= (mb_len= my_ismbchar(cs, pos, end)) ? mb_len : 1; length--; } return (size_t) (length ? end+2-start : pos-start); }
O3
c
my_charpos_mb: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %r15 movq %rdx, %rbx testq %rcx, %rcx setne %cl sete %al cmpq %rdx, %rsi setae %dl orb %al, %dl movq %rsi, -0x30(%rbp) movq %rsi, %rax jne 0x3bac2 movq %rdi, %r12 decq %r15 movl $0x1, %r14d movq -0x30(%rbp), %rax movq %rax, %r13 movq 0xb8(%r12), %rax movq %r12, %rdi movq %r13, %rsi movq %rbx, %rdx callq *0xc0(%rax) cmpl $0x2, %eax cmovbl %r14d, %eax cmovll %r14d, %eax addq %r13, %rax addq $-0x1, %r15 setb %cl jae 0x3bac2 cmpq %rbx, %rax jb 0x3ba8c addq $0x2, %rbx testb %cl, %cl cmoveq %rax, %rbx subq -0x30(%rbp), %rbx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_charpos_mb: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r15, rcx mov rbx, rdx test rcx, rcx setnz cl setz al cmp rsi, rdx setnb dl or dl, al mov [rbp+var_30], rsi mov rax, rsi jnz short loc_3BAC2 mov r12, rdi dec r15 mov r14d, 1 mov rax, [rbp+var_30] loc_3BA8C: mov r13, rax mov rax, [r12+0B8h] mov rdi, r12 mov rsi, r13 mov rdx, rbx call qword ptr [rax+0C0h] cmp eax, 2 cmovb eax, r14d cmovl eax, r14d add rax, r13 add r15, 0FFFFFFFFFFFFFFFFh setb cl jnb short loc_3BAC2 cmp rax, rbx jb short loc_3BA8C loc_3BAC2: add rbx, 2 test cl, cl cmovz rbx, rax sub rbx, [rbp+var_30] mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long my_charpos_mb(long long a1, unsigned long long a2, unsigned long long a3, long long a4) { long long v4; // r15 bool v6; // zf unsigned long long v7; // rax long long v8; // r15 unsigned long long v9; // r13 long long v10; // rax bool v11; // cc bool v12; // cf unsigned long long v13; // rbx v4 = a4; v6 = a4 == 0; LOBYTE(a4) = a4 != 0; v7 = a2; if ( !v6 && a2 < a3 ) { v8 = v4 - 1; v7 = a2; do { v9 = v7; v10 = (*(long long ( **)(long long, unsigned long long, unsigned long long, long long))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v7, a3, a4); v11 = (int)v10 < 2; if ( (unsigned int)v10 < 2 ) v10 = 1LL; if ( v11 ) v10 = 1LL; v7 = v9 + v10; v12 = v8-- != 0; LOBYTE(a4) = v12; } while ( v12 && v7 < a3 ); } v13 = a3 + 2; if ( !(_BYTE)a4 ) v13 = v7; return v13 - a2; }
my_charpos_mb: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15,RCX MOV RBX,RDX TEST RCX,RCX SETNZ CL SETZ AL CMP RSI,RDX SETNC DL OR DL,AL MOV qword ptr [RBP + -0x30],RSI MOV RAX,RSI JNZ 0x0013bac2 MOV R12,RDI DEC R15 MOV R14D,0x1 MOV RAX,qword ptr [RBP + -0x30] LAB_0013ba8c: MOV R13,RAX MOV RAX,qword ptr [R12 + 0xb8] MOV RDI,R12 MOV RSI,R13 MOV RDX,RBX CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 CMOVC EAX,R14D CMOVL EAX,R14D ADD RAX,R13 ADD R15,-0x1 SETC CL JNC 0x0013bac2 CMP RAX,RBX JC 0x0013ba8c LAB_0013bac2: ADD RBX,0x2 TEST CL,CL CMOVZ RBX,RAX SUB RBX,qword ptr [RBP + -0x30] MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_charpos_mb(long param_1,ulong param_2,ulong param_3,long param_4) { uint uVar1; ulong uVar2; ulong uVar3; bool bVar4; bVar4 = param_4 != 0; uVar3 = param_2; if (param_2 < param_3 && bVar4) { do { param_4 = param_4 + -1; uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,uVar3,param_3); uVar2 = (ulong)uVar1; if (uVar1 < 2) { uVar2 = 1; } if ((int)uVar1 < 2) { uVar2 = 1; } uVar3 = uVar2 + uVar3; bVar4 = param_4 != 0; } while ((bVar4) && (uVar3 < param_3)); } uVar2 = param_3 + 2; if (!bVar4) { uVar2 = uVar3; } return uVar2 - param_2; }
17,907
gguf_reader::read(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) const
ngxson[P]ggml-easy/ggml/src/gguf.cpp
bool read(std::string & dst) const { uint64_t size = -1; if (!read(size)) { return false; } dst.resize(size); return fread(dst.data(), 1, dst.length(), file) == dst.length(); }
O1
cpp
gguf_reader::read(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) const: pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movq %rsp, %rdi movq $-0x1, (%rdi) movq (%r14), %rcx movl $0x1, %esi movl $0x8, %edx callq 0x17940 cmpq $0x8, %rax jne 0x3f8db movq (%rsp), %rsi movq %rbx, %rdi xorl %edx, %edx callq 0x164a0 movq (%rbx), %rdi movq 0x8(%rbx), %rdx movq (%r14), %rcx movl $0x1, %esi callq 0x17940 cmpq 0x8(%rbx), %rax sete %al jmp 0x3f8dd xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq
_ZNK11gguf_reader4readERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r14 push rbx push rax mov rbx, rsi mov r14, rdi mov rdi, rsp mov qword ptr [rdi], 0FFFFFFFFFFFFFFFFh mov rcx, [r14] mov esi, 1 mov edx, 8 call _fread cmp rax, 8 jnz short loc_3F8DB mov rsi, [rsp+18h+var_18] mov rdi, rbx xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char) mov rdi, [rbx] mov rdx, [rbx+8] mov rcx, [r14] mov esi, 1 call _fread cmp rax, [rbx+8] setz al jmp short loc_3F8DD loc_3F8DB: xor eax, eax loc_3F8DD: add rsp, 8 pop rbx pop r14 retn
bool gguf_reader::read(_QWORD *a1, _QWORD *a2) { long long v3[3]; // [rsp+0h] [rbp-18h] BYREF v3[0] = -1LL; if ( fread(v3, 1LL, 8LL, *a1) != 8 ) return 0; std::string::resize(a2, v3[0], 0LL); return fread(*a2, 1LL, a2[1], *a1) == a2[1]; }
read: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV RDI,RSP MOV qword ptr [RDI],-0x1 MOV RCX,qword ptr [R14] MOV ESI,0x1 MOV EDX,0x8 CALL 0x00117940 CMP RAX,0x8 JNZ 0x0013f8db MOV RSI,qword ptr [RSP] MOV RDI,RBX XOR EDX,EDX CALL 0x001164a0 MOV RDI,qword ptr [RBX] MOV RDX,qword ptr [RBX + 0x8] MOV RCX,qword ptr [R14] MOV ESI,0x1 CALL 0x00117940 CMP RAX,qword ptr [RBX + 0x8] SETZ AL JMP 0x0013f8dd LAB_0013f8db: XOR EAX,EAX LAB_0013f8dd: ADD RSP,0x8 POP RBX POP R14 RET
/* gguf_reader::read(std::__cxx11::string&) const */ bool __thiscall gguf_reader::read(gguf_reader *this,string *param_1) { size_t sVar1; bool bVar2; int8 local_18; local_18 = 0xffffffffffffffff; sVar1 = fread(&local_18,1,8,*(FILE **)this); if (sVar1 == 8) { std::__cxx11::string::resize((ulong)param_1,(char)local_18); sVar1 = fread(*(void **)param_1,1,*(size_t *)(param_1 + 8),*(FILE **)this); bVar2 = sVar1 == *(size_t *)(param_1 + 8); } else { bVar2 = false; } return bVar2; }
17,908
gguf_reader::read(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) const
ngxson[P]ggml-easy/ggml/src/gguf.cpp
bool read(std::string & dst) const { uint64_t size = -1; if (!read(size)) { return false; } dst.resize(size); return fread(dst.data(), 1, dst.length(), file) == dst.length(); }
O2
cpp
gguf_reader::read(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) const: pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movq %rsp, %rsi orq $-0x1, (%rsi) callq 0x1e000 testb %al, %al je 0x410f1 movq (%rsp), %rsi movq %rbx, %rdi callq 0x1e030 movq (%rbx), %rdi movq 0x8(%rbx), %rdx movq (%r14), %rcx pushq $0x1 popq %rsi callq 0x1e2f0 cmpq 0x8(%rbx), %rax sete %al jmp 0x410f3 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq
_ZNK11gguf_reader4readERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r14 push rbx push rax mov rbx, rsi mov r14, rdi mov rsi, rsp or qword ptr [rsi], 0FFFFFFFFFFFFFFFFh call __ZNK11gguf_reader4readImEEbRT_; gguf_reader::read<ulong>(ulong &) test al, al jz short loc_410F1 mov rsi, [rsp+18h+var_18] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm; std::string::resize(ulong) mov rdi, [rbx] mov rdx, [rbx+8] mov rcx, [r14] push 1 pop rsi call _fread cmp rax, [rbx+8] setz al jmp short loc_410F3 loc_410F1: xor eax, eax loc_410F3: add rsp, 8 pop rbx pop r14 retn
bool gguf_reader::read(_QWORD *a1, _QWORD *a2) { long long v3[3]; // [rsp+0h] [rbp-18h] BYREF v3[0] = -1LL; if ( !(unsigned __int8)gguf_reader::read<unsigned long>(a1, v3) ) return 0; std::string::resize(a2, v3[0]); return fread(*a2, 1LL, a2[1], *a1) == a2[1]; }
read: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV RSI,RSP OR qword ptr [RSI],-0x1 CALL 0x0011e000 TEST AL,AL JZ 0x001410f1 MOV RSI,qword ptr [RSP] MOV RDI,RBX CALL 0x0011e030 MOV RDI,qword ptr [RBX] MOV RDX,qword ptr [RBX + 0x8] MOV RCX,qword ptr [R14] PUSH 0x1 POP RSI CALL 0x0011e2f0 CMP RAX,qword ptr [RBX + 0x8] SETZ AL JMP 0x001410f3 LAB_001410f1: XOR EAX,EAX LAB_001410f3: ADD RSP,0x8 POP RBX POP R14 RET
/* gguf_reader::read(std::__cxx11::string&) const */ bool __thiscall gguf_reader::read(gguf_reader *this,string *param_1) { bool bVar1; size_t sVar2; ulong local_18; local_18 = 0xffffffffffffffff; bVar1 = read<unsigned_long>(this,&local_18); if (bVar1) { std::__cxx11::string::resize((ulong)param_1); sVar2 = fread(*(void **)param_1,1,*(size_t *)(param_1 + 8),*(FILE **)this); bVar1 = sVar2 == *(size_t *)(param_1 + 8); } else { bVar1 = false; } return bVar1; }
17,909
google::protobuf::internal::ExtensionSet::UnsafeArenaReleaseMessage(google::protobuf::FieldDescriptor const*, google::protobuf::MessageFactory*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/extension_set_heavy.cc
MessageLite* ExtensionSet::UnsafeArenaReleaseMessage( const FieldDescriptor* descriptor, MessageFactory* factory) { Extension* extension = FindOrNull(descriptor->number()); if (extension == nullptr) { // Not present. Return nullptr. return nullptr; } else { GOOGLE_DCHECK_TYPE(*extension, OPTIONAL, MESSAGE); MessageLite* ret = nullptr; if (extension->is_lazy) { ret = extension->lazymessage_value->UnsafeArenaReleaseMessage( *factory->GetPrototype(descriptor->message_type()), arena_); if (arena_ == nullptr) { delete extension->lazymessage_value; } } else { ret = extension->message_value; } Erase(descriptor->number()); return ret; } }
O0
cpp
google::protobuf::internal::ExtensionSet::UnsafeArenaReleaseMessage(google::protobuf::FieldDescriptor const*, google::protobuf::MessageFactory*): subq $0x108, %rsp # imm = 0x108 movq %rdi, 0xf8(%rsp) movq %rsi, 0xf0(%rsp) movq %rdx, 0xe8(%rsp) movq 0xf8(%rsp), %rax movq %rax, 0x40(%rsp) movq 0xf0(%rsp), %rdi callq 0x1bab30 movq 0x40(%rsp), %rdi movl %eax, %esi callq 0x215220 movq %rax, 0xe0(%rsp) cmpq $0x0, 0xe0(%rsp) jne 0x30a0e9 movq $0x0, 0x100(%rsp) jmp 0x30a362 jmp 0x30a0eb xorl %eax, %eax testb $0x1, %al jne 0x30a0f6 jmp 0x30a1c9 movq 0xe0(%rsp), %rax movb 0x9(%rax), %dl movl $0x1, %eax movl $0x3, %ecx testb $0x1, %dl cmovnel %ecx, %eax movb $0x0, 0xa7(%rsp) cmpl $0x1, %eax jne 0x30a120 jmp 0x30a179 leaq 0xe5dc5(%rip), %rdx # 0x3efeec leaq 0xa8(%rsp), %rdi movq %rdi, 0x30(%rsp) movl $0x3, %esi movl $0xcd, %ecx callq 0x19a670 movq 0x30(%rsp), %rdi movb $0x1, 0xa7(%rsp) leaq 0xe5e05(%rip), %rsi # 0x3eff5c callq 0x199f30 movq %rax, 0x38(%rsp) jmp 0x30a163 movq 0x38(%rsp), %rsi leaq 0x93(%rsp), %rdi callq 0x19a0e0 jmp 0x30a177 jmp 0x30a179 testb $0x1, 0xa7(%rsp) jne 0x30a185 jmp 0x30a192 leaq 0xa8(%rsp), %rdi callq 0x19a6b0 jmp 0x30a0eb movq %rax, %rcx movl %edx, %eax movq %rcx, 0x98(%rsp) movl %eax, 0x94(%rsp) testb $0x1, 0xa7(%rsp) jne 0x30a1b7 jmp 0x30a1c4 leaq 0xa8(%rsp), %rdi callq 0x19a6b0 jmp 0x30a372 jmp 0x30a1cb xorl %eax, %eax testb $0x1, %al jne 0x30a1d6 jmp 0x30a287 movq 0xe0(%rsp), %rax movzbl 0x8(%rax), %edi callq 0x30b7d0 movb $0x0, 0x57(%rsp) cmpl $0xa, %eax jne 0x30a1f3 jmp 0x30a243 leaq 0xe5cf2(%rip), %rdx # 0x3efeec leaq 0x58(%rsp), %rdi movq %rdi, 0x20(%rsp) movl $0x3, %esi movl $0xcd, %ecx callq 0x19a670 movq 0x20(%rsp), %rdi movb $0x1, 0x57(%rsp) leaq 0xe5dcc(%rip), %rsi # 0x3efff0 callq 0x199f30 movq %rax, 0x28(%rsp) jmp 0x30a230 movq 0x28(%rsp), %rsi leaq 0x56(%rsp), %rdi callq 0x19a0e0 jmp 0x30a241 jmp 0x30a243 testb $0x1, 0x57(%rsp) jne 0x30a24c jmp 0x30a256 leaq 0x58(%rsp), %rdi callq 0x19a6b0 jmp 0x30a1cb movq %rax, %rcx movl %edx, %eax movq %rcx, 0x98(%rsp) movl %eax, 0x94(%rsp) testb $0x1, 0x57(%rsp) jne 0x30a278 jmp 0x30a282 leaq 0x58(%rsp), %rdi callq 0x19a6b0 jmp 0x30a372 movq $0x0, 0x48(%rsp) movq 0xe0(%rsp), %rax movb 0xa(%rax), %al shrb $0x4, %al testb $0x1, %al je 0x30a32c movq 0xe0(%rsp), %rax movq (%rax), %rax movq %rax, 0x18(%rsp) movq 0xe8(%rsp), %rax movq %rax, 0x10(%rsp) movq 0xf0(%rsp), %rdi callq 0x243e40 movq 0x10(%rsp), %rdi movq %rax, %rsi movq (%rdi), %rax callq *0x10(%rax) movq 0x18(%rsp), %rdi movq %rax, %rsi movq 0x40(%rsp), %rax movq (%rax), %rdx movq (%rdi), %rax callq *0x40(%rax) movq %rax, %rcx movq 0x40(%rsp), %rax movq %rcx, 0x48(%rsp) cmpq $0x0, (%rax) jne 0x30a32a movq 0xe0(%rsp), %rax movq (%rax), %rax movq %rax, 0x8(%rsp) cmpq $0x0, %rax je 0x30a328 movq 0x8(%rsp), %rdi movq (%rdi), %rax callq *0x8(%rax) jmp 0x30a32a jmp 0x30a33c movq 0xe0(%rsp), %rax movq (%rax), %rax movq %rax, 0x48(%rsp) movq 0xf0(%rsp), %rdi callq 0x1bab30 movq 0x40(%rsp), %rdi movl %eax, %esi callq 0x225020 movq 0x48(%rsp), %rax movq %rax, 0x100(%rsp) movq 0x100(%rsp), %rax addq $0x108, %rsp # imm = 0x108 retq movq 0x98(%rsp), %rdi callq 0x90db0 nop
_ZN6google8protobuf8internal12ExtensionSet25UnsafeArenaReleaseMessageEPKNS0_15FieldDescriptorEPNS0_14MessageFactoryE: sub rsp, 108h mov [rsp+108h+var_10], rdi mov [rsp+108h+var_18], rsi mov [rsp+108h+var_20], rdx mov rax, [rsp+108h+var_10] mov [rsp+108h+var_C8], rax mov rdi, [rsp+108h+var_18]; this call _ZNK6google8protobuf15FieldDescriptor6numberEv; google::protobuf::FieldDescriptor::number(void) mov rdi, [rsp+108h+var_C8]; this mov esi, eax; unsigned __int8 call _ZN6google8protobuf8internal12ExtensionSet10FindOrNullEi; google::protobuf::internal::ExtensionSet::FindOrNull(int) mov [rsp+108h+var_28], rax cmp [rsp+108h+var_28], 0 jnz short loc_30A0E9 mov [rsp+108h+var_8], 0 jmp loc_30A362 loc_30A0E9: jmp short $+2 loc_30A0EB: xor eax, eax test al, 1 jnz short loc_30A0F6 jmp loc_30A1C9 loc_30A0F6: mov rax, [rsp+108h+var_28] mov dl, [rax+9] mov eax, 1 mov ecx, 3 test dl, 1 cmovnz eax, ecx mov [rsp+108h+var_61], 0 cmp eax, 1 jnz short loc_30A120 jmp short loc_30A179 loc_30A120: lea rdx, aWorkspaceLlm4b_59; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+108h+var_60] mov [rsp+108h+var_D8], rdi mov esi, 3 mov ecx, 0CDh call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+108h+var_D8] mov [rsp+108h+var_61], 1 lea rsi, aCheckFailedExt_9; "CHECK failed: ((*extension).is_repeated"... call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+108h+var_D0], rax jmp short $+2 loc_30A163: mov rsi, [rsp+108h+var_D0] lea rdi, [rsp+108h+var_75] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_30A177: jmp short $+2 loc_30A179: test [rsp+108h+var_61], 1 jnz short loc_30A185 jmp short loc_30A192 loc_30A185: lea rdi, [rsp+108h+var_60]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_30A192: jmp loc_30A0EB mov rcx, rax mov eax, edx mov [rsp+arg_90], rcx mov [rsp+arg_8C], eax test [rsp+arg_9F], 1 jnz short loc_30A1B7 jmp short loc_30A1C4 loc_30A1B7: lea rdi, [rsp+arg_A0]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_30A1C4: jmp loc_30A372 loc_30A1C9: jmp short $+2 loc_30A1CB: xor eax, eax test al, 1 jnz short loc_30A1D6 jmp loc_30A287 loc_30A1D6: mov rax, [rsp+108h+var_28] movzx edi, byte ptr [rax+8]; this call _ZN6google8protobuf8internal8cpp_typeEh; google::protobuf::internal::cpp_type(uchar) mov [rsp+108h+var_B1], 0 cmp eax, 0Ah jnz short loc_30A1F3 jmp short loc_30A243 loc_30A1F3: lea rdx, aWorkspaceLlm4b_59; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+108h+var_B0] mov [rsp+108h+var_E8], rdi mov esi, 3 mov ecx, 0CDh call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+108h+var_E8] mov [rsp+108h+var_B1], 1 lea rsi, aCheckFailedCpp_20; "CHECK failed: (cpp_type((*extension).ty"... call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+108h+var_E0], rax jmp short $+2 loc_30A230: mov rsi, [rsp+108h+var_E0] lea rdi, [rsp+108h+var_B2] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_30A241: jmp short $+2 loc_30A243: test [rsp+108h+var_B1], 1 jnz short loc_30A24C jmp short loc_30A256 loc_30A24C: lea rdi, [rsp+108h+var_B0]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_30A256: jmp loc_30A1CB mov rcx, rax mov eax, edx mov [rsp+arg_90], rcx mov [rsp+arg_8C], eax test [rsp+arg_4F], 1 jnz short loc_30A278 jmp short loc_30A282 loc_30A278: lea rdi, [rsp+arg_50]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_30A282: jmp loc_30A372 loc_30A287: mov [rsp+108h+var_C0], 0 mov rax, [rsp+108h+var_28] mov al, [rax+0Ah] shr al, 4 test al, 1 jz loc_30A32C mov rax, [rsp+108h+var_28] mov rax, [rax] mov [rsp+108h+var_F0], rax mov rax, [rsp+108h+var_20] mov [rsp+108h+var_F8], rax mov rdi, [rsp+108h+var_18]; this call _ZNK6google8protobuf15FieldDescriptor12message_typeEv; google::protobuf::FieldDescriptor::message_type(void) mov rdi, [rsp+108h+var_F8] mov rsi, rax mov rax, [rdi] call qword ptr [rax+10h] mov rdi, [rsp+108h+var_F0] mov rsi, rax mov rax, [rsp+108h+var_C8] mov rdx, [rax] mov rax, [rdi] call qword ptr [rax+40h] mov rcx, rax mov rax, [rsp+108h+var_C8] mov [rsp+108h+var_C0], rcx cmp qword ptr [rax], 0 jnz short loc_30A32A mov rax, [rsp+108h+var_28] mov rax, [rax] mov [rsp+108h+var_100], rax cmp rax, 0 jz short loc_30A328 mov rdi, [rsp+108h+var_100] mov rax, [rdi] call qword ptr [rax+8] loc_30A328: jmp short $+2 loc_30A32A: jmp short loc_30A33C loc_30A32C: mov rax, [rsp+108h+var_28] mov rax, [rax] mov [rsp+108h+var_C0], rax loc_30A33C: mov rdi, [rsp+108h+var_18]; this call _ZNK6google8protobuf15FieldDescriptor6numberEv; google::protobuf::FieldDescriptor::number(void) mov rdi, [rsp+108h+var_C8]; this mov esi, eax; int call _ZN6google8protobuf8internal12ExtensionSet5EraseEi; google::protobuf::internal::ExtensionSet::Erase(int) mov rax, [rsp+108h+var_C0] mov [rsp+108h+var_8], rax loc_30A362: mov rax, [rsp+108h+var_8] add rsp, 108h retn loc_30A372: mov rdi, [rsp+arg_90] call __Unwind_Resume
long long google::protobuf::internal::ExtensionSet::UnsafeArenaReleaseMessage( google::protobuf::internal::ExtensionSet *this, const google::protobuf::FieldDescriptor *a2, google::protobuf::MessageFactory *a3) { int v3; // eax long long v4; // rax long long v5; // rax int v6; // eax long long v8; // [rsp+18h] [rbp-F0h] long long v9; // [rsp+48h] [rbp-C0h] _BYTE *v10; // [rsp+E0h] [rbp-28h] v3 = google::protobuf::FieldDescriptor::number(a2); v10 = google::protobuf::internal::ExtensionSet::FindOrNull(this, v3); if ( !v10 ) return 0LL; if ( (v10[10] & 0x10) != 0 ) { v8 = *(_QWORD *)v10; v4 = google::protobuf::FieldDescriptor::message_type(a2); v5 = (*(long long ( **)(google::protobuf::MessageFactory *, long long))(*(_QWORD *)a3 + 16LL))(a3, v4); v9 = (*(long long ( **)(long long, long long, _QWORD))(*(_QWORD *)v8 + 64LL))(v8, v5, *(_QWORD *)this); if ( !*(_QWORD *)this && *(_QWORD *)v10 ) (*(void ( **)(_QWORD))(**(_QWORD **)v10 + 8LL))(*(_QWORD *)v10); } else { v9 = *(_QWORD *)v10; } v6 = google::protobuf::FieldDescriptor::number(a2); google::protobuf::internal::ExtensionSet::Erase(this, v6); return v9; }
__move_merge<__gnu_cxx::__normal_iterator<google::protobuf::Message_const**,std::vector<google::protobuf::Message_const*,std::allocator<google::protobuf::Message_const*>>>,google::protobuf::Message_const**,__gnu_cxx::__ops::_Iter_comp_iter<google::protobuf::DynamicMapSorter::MapEntryMessageComparator>>: SUB RSP,0x68 MOV qword ptr [RSP + 0x60],RDI MOV qword ptr [RSP + 0x58],RSI MOV qword ptr [RSP + 0x50],RDX MOV qword ptr [RSP + 0x48],RCX MOV qword ptr [RSP + 0x40],R9 MOV qword ptr [RSP + 0x38],R8 LAB_0030a0a2: LEA RDI,[RSP + 0x60] LEA RSI,[RSP + 0x58] CALL 0x00308040 MOV CL,AL XOR EAX,EAX TEST CL,0x1 MOV byte ptr [RSP + 0x7],AL JNZ 0x0030a0c0 JMP 0x0030a0d3 LAB_0030a0c0: LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0x48] CALL 0x00308040 MOV byte ptr [RSP + 0x7],AL LAB_0030a0d3: MOV AL,byte ptr [RSP + 0x7] TEST AL,0x1 JNZ 0x0030a0e0 JMP 0x0030a161 LAB_0030a0e0: MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x28],RAX MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x28] LEA RDI,[RSP + 0x40] CALL 0x00308080 TEST AL,0x1 JNZ 0x0030a10e JMP 0x0030a12f LAB_0030a10e: LEA RDI,[RSP + 0x50] CALL 0x003080d0 MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RAX],RCX LEA RDI,[RSP + 0x50] CALL 0x00308240 JMP 0x0030a14e LAB_0030a12f: LEA RDI,[RSP + 0x60] CALL 0x003080d0 MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RAX],RCX LEA RDI,[RSP + 0x60] CALL 0x00308240 LAB_0030a14e: MOV RAX,qword ptr [RSP + 0x38] ADD RAX,0x8 MOV qword ptr [RSP + 0x38],RAX JMP 0x0030a0a2 LAB_0030a161: MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x8],RAX MOV RDX,qword ptr [RSP + 0x38] MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x8] CALL 0x0030a200 MOV RDX,RAX MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] CALL 0x0030a200 ADD RSP,0x68 RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* google::protobuf::Message const** std::__move_merge<__gnu_cxx::__normal_iterator<google::protobuf::Message const**, std::vector<google::protobuf::Message const*, std::allocator<google::protobuf::Message const*> > >, google::protobuf::Message const**, __gnu_cxx::__ops::_Iter_comp_iter<google::protobuf::DynamicMapSorter::MapEntryMessageComparator> >(__gnu_cxx::__normal_iterator<google::protobuf::Message const**, std::vector<google::protobuf::Message const*, std::allocator<google::protobuf::Message const*> > >, __gnu_cxx::__normal_iterator<google::protobuf::Message const**, std::vector<google::protobuf::Message const*, std::allocator<google::protobuf::Message const*> > >, __gnu_cxx::__normal_iterator<google::protobuf::Message const**, std::vector<google::protobuf::Message const*, std::allocator<google::protobuf::Message const*> > >, __gnu_cxx::__normal_iterator<google::protobuf::Message const**, std::vector<google::protobuf::Message const*, std::allocator<google::protobuf::Message const*> > >, google::protobuf::Message const**, __gnu_cxx::__ops::_Iter_comp_iter<google::protobuf::DynamicMapSorter::MapEntryMessageComparator>) */ Message ** std:: __move_merge<__gnu_cxx::__normal_iterator<google::protobuf::Message_const**,std::vector<google::protobuf::Message_const*,std::allocator<google::protobuf::Message_const*>>>,google::protobuf::Message_const**,__gnu_cxx::__ops::_Iter_comp_iter<google::protobuf::DynamicMapSorter::MapEntryMessageComparator>> (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 *param_5,int8 param_6) { int8 uVar1; int8 uVar2; bool bVar3; int8 *puVar4; Message **ppMVar5; bool local_61; int8 *local_30; int8 local_28; int8 local_20; int8 local_18; int8 local_10; int8 local_8; local_30 = param_5; local_28 = param_6; local_20 = param_4; local_18 = param_3; local_10 = param_2; local_8 = param_1; while( true ) { bVar3 = __gnu_cxx::operator!=((__normal_iterator *)&local_8,(__normal_iterator *)&local_10); local_61 = false; if (bVar3) { local_61 = __gnu_cxx::operator!= ((__normal_iterator *)&local_18,(__normal_iterator *)&local_20); } uVar2 = local_18; uVar1 = local_20; if (local_61 == false) break; bVar3 = __gnu_cxx::__ops:: _Iter_comp_iter<google::protobuf::DynamicMapSorter::MapEntryMessageComparator>:: operator()((_Iter_comp_iter<google::protobuf::DynamicMapSorter::MapEntryMessageComparator> *)&local_28,local_18,local_8); if (bVar3) { puVar4 = (int8 *) __gnu_cxx:: __normal_iterator<google::protobuf::Message_const**,std::vector<google::protobuf::Message_const*,std::allocator<google::protobuf::Message_const*>>> ::operator*((__normal_iterator<google::protobuf::Message_const**,std::vector<google::protobuf::Message_const*,std::allocator<google::protobuf::Message_const*>>> *)&local_18); *local_30 = *puVar4; __gnu_cxx:: __normal_iterator<google::protobuf::Message_const**,std::vector<google::protobuf::Message_const*,std::allocator<google::protobuf::Message_const*>>> ::operator++((__normal_iterator<google::protobuf::Message_const**,std::vector<google::protobuf::Message_const*,std::allocator<google::protobuf::Message_const*>>> *)&local_18); } else { puVar4 = (int8 *) __gnu_cxx:: __normal_iterator<google::protobuf::Message_const**,std::vector<google::protobuf::Message_const*,std::allocator<google::protobuf::Message_const*>>> ::operator*((__normal_iterator<google::protobuf::Message_const**,std::vector<google::protobuf::Message_const*,std::allocator<google::protobuf::Message_const*>>> *)&local_8); *local_30 = *puVar4; __gnu_cxx:: __normal_iterator<google::protobuf::Message_const**,std::vector<google::protobuf::Message_const*,std::allocator<google::protobuf::Message_const*>>> ::operator++((__normal_iterator<google::protobuf::Message_const**,std::vector<google::protobuf::Message_const*,std::allocator<google::protobuf::Message_const*>>> *)&local_8); } local_30 = local_30 + 1; } ppMVar5 = move<__gnu_cxx::__normal_iterator<google::protobuf::Message_const**,std::vector<google::protobuf::Message_const*,std::allocator<google::protobuf::Message_const*>>>,google::protobuf::Message_const**> (local_8,local_10,local_30); ppMVar5 = move<__gnu_cxx::__normal_iterator<google::protobuf::Message_const**,std::vector<google::protobuf::Message_const*,std::allocator<google::protobuf::Message_const*>>>,google::protobuf::Message_const**> (uVar2,uVar1,ppMVar5); return ppMVar5; }
17,910
google::protobuf::internal::ExtensionSet::UnsafeArenaReleaseMessage(google::protobuf::FieldDescriptor const*, google::protobuf::MessageFactory*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/extension_set_heavy.cc
MessageLite* ExtensionSet::UnsafeArenaReleaseMessage( const FieldDescriptor* descriptor, MessageFactory* factory) { Extension* extension = FindOrNull(descriptor->number()); if (extension == nullptr) { // Not present. Return nullptr. return nullptr; } else { GOOGLE_DCHECK_TYPE(*extension, OPTIONAL, MESSAGE); MessageLite* ret = nullptr; if (extension->is_lazy) { ret = extension->lazymessage_value->UnsafeArenaReleaseMessage( *factory->GetPrototype(descriptor->message_type()), arena_); if (arena_ == nullptr) { delete extension->lazymessage_value; } } else { ret = extension->message_value; } Erase(descriptor->number()); return ret; } }
O3
cpp
google::protobuf::internal::ExtensionSet::UnsafeArenaReleaseMessage(google::protobuf::FieldDescriptor const*, google::protobuf::MessageFactory*): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %r13 movq %rsi, %r14 movq %rdi, %rbx movl 0x4(%rsi), %esi callq 0xb3438 testq %rax, %rax je 0x103bb3 movq %rax, %r12 testb $0x10, 0xa(%rax) movq (%rax), %r15 je 0x103ba5 movq %r14, %rdi callq 0xc0cee movq (%r13), %rcx movq %r13, %rdi movq %rax, %rsi callq *0x10(%rcx) movq (%rbx), %rdx movq (%r15), %rcx movq %r15, %rdi movq %rax, %rsi callq *0x40(%rcx) movq %rax, %r15 cmpq $0x0, (%rbx) jne 0x103ba5 movq (%r12), %rdi testq %rdi, %rdi je 0x103ba5 movq (%rdi), %rax callq *0x8(%rax) movl 0x4(%r14), %esi movq %rbx, %rdi callq 0xb5634 jmp 0x103bb6 xorl %r15d, %r15d movq %r15, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq nop
_ZN6google8protobuf8internal12ExtensionSet25UnsafeArenaReleaseMessageEPKNS0_15FieldDescriptorEPNS0_14MessageFactoryE: push r15 push r14 push r13 push r12 push rbx mov r13, rdx mov r14, rsi mov rbx, rdi mov esi, [rsi+4]; int call _ZN6google8protobuf8internal12ExtensionSet10FindOrNullEi; google::protobuf::internal::ExtensionSet::FindOrNull(int) test rax, rax jz short loc_103BB3 mov r12, rax test byte ptr [rax+0Ah], 10h mov r15, [rax] jz short loc_103BA5 mov rdi, r14; this call _ZNK6google8protobuf15FieldDescriptor12message_typeEv; google::protobuf::FieldDescriptor::message_type(void) mov rcx, [r13+0] mov rdi, r13 mov rsi, rax call qword ptr [rcx+10h] mov rdx, [rbx] mov rcx, [r15] mov rdi, r15 mov rsi, rax call qword ptr [rcx+40h] mov r15, rax cmp qword ptr [rbx], 0 jnz short loc_103BA5 mov rdi, [r12] test rdi, rdi jz short loc_103BA5 mov rax, [rdi] call qword ptr [rax+8] loc_103BA5: mov esi, [r14+4]; int mov rdi, rbx; this call _ZN6google8protobuf8internal12ExtensionSet5EraseEi; google::protobuf::internal::ExtensionSet::Erase(int) jmp short loc_103BB6 loc_103BB3: xor r15d, r15d loc_103BB6: mov rax, r15 pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long google::protobuf::internal::ExtensionSet::UnsafeArenaReleaseMessage( google::protobuf::internal::ExtensionSet *this, const google::protobuf::FieldDescriptor *a2, google::protobuf::MessageFactory *a3) { long long v4; // rax _QWORD *v5; // r12 long long v6; // r15 long long v7; // rax long long v8; // rax v4 = google::protobuf::internal::ExtensionSet::FindOrNull(this, *((_DWORD *)a2 + 1)); if ( !v4 ) return 0LL; v5 = (_QWORD *)v4; v6 = *(_QWORD *)v4; if ( (*(_BYTE *)(v4 + 10) & 0x10) != 0 ) { v7 = google::protobuf::FieldDescriptor::message_type(a2); v8 = (*(long long ( **)(google::protobuf::MessageFactory *, long long))(*(_QWORD *)a3 + 16LL))(a3, v7); v6 = (*(long long ( **)(long long, long long, _QWORD))(*(_QWORD *)v6 + 64LL))(v6, v8, *(_QWORD *)this); if ( !*(_QWORD *)this ) { if ( *v5 ) (*(void ( **)(_QWORD))(*(_QWORD *)*v5 + 8LL))(*v5); } } google::protobuf::internal::ExtensionSet::Erase(this, *((_DWORD *)a2 + 1)); return v6; }
17,911
get_first_nonspace
eloqsql/strings/json_lib.c
static void get_first_nonspace(json_string_t *js, int *t_next, int *c_len) { do { if ((*c_len= json_next_char(js)) <= 0) *t_next= json_eos(js) ? C_EOS : C_BAD; else { *t_next= (js->c_next < 128) ? json_chr_map[js->c_next] : C_ETC; js->c_str+= *c_len; } } while (*t_next == C_SPACE); }
O0
c
get_first_nonspace: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movq 0x28(%rax), %rax movq -0x8(%rbp), %rcx movq 0x20(%rcx), %rdi movq -0x8(%rbp), %rsi addq $0x10, %rsi movq -0x8(%rbp), %rcx movq (%rcx), %rdx movq -0x8(%rbp), %rcx movq 0x8(%rcx), %rcx callq *%rax movq -0x18(%rbp), %rcx movl %eax, (%rcx) cmpl $0x0, %eax jg 0x2720c movq -0x8(%rbp), %rax movq (%rax), %rdx movq -0x8(%rbp), %rax movq 0x8(%rax), %rsi movl $0xe, %ecx xorl %eax, %eax cmpq %rsi, %rdx cmovael %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) jmp 0x2725a movq -0x8(%rbp), %rax cmpq $0x80, 0x10(%rax) jae 0x27231 movq -0x8(%rbp), %rax movq 0x10(%rax), %rcx leaq 0x1ab0c7(%rip), %rax # 0x1d22f0 movl (%rax,%rcx,4), %eax movl %eax, -0x1c(%rbp) jmp 0x2723b movl $0xc, %eax movl %eax, -0x1c(%rbp) jmp 0x2723b movl -0x1c(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movq -0x18(%rbp), %rax movl (%rax), %edx movq -0x8(%rbp), %rax movq (%rax), %rcx movslq %edx, %rdx addq %rdx, %rcx movq %rcx, (%rax) jmp 0x2725c movq -0x10(%rbp), %rax cmpl $0x10, (%rax) je 0x271b4 addq $0x20, %rsp popq %rbp retq nop
get_first_nonspace: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx loc_271B4: mov rax, [rbp+var_8] mov rax, [rax+28h] mov rcx, [rbp+var_8] mov rdi, [rcx+20h] mov rsi, [rbp+var_8] add rsi, 10h mov rcx, [rbp+var_8] mov rdx, [rcx] mov rcx, [rbp+var_8] mov rcx, [rcx+8] call rax mov rcx, [rbp+var_18] mov [rcx], eax cmp eax, 0 jg short loc_2720C mov rax, [rbp+var_8] mov rdx, [rax] mov rax, [rbp+var_8] mov rsi, [rax+8] mov ecx, 0Eh xor eax, eax cmp rdx, rsi cmovnb ecx, eax mov rax, [rbp+var_10] mov [rax], ecx jmp short loc_2725A loc_2720C: mov rax, [rbp+var_8] cmp qword ptr [rax+10h], 80h jnb short loc_27231 mov rax, [rbp+var_8] mov rcx, [rax+10h] lea rax, json_chr_map mov eax, [rax+rcx*4] mov [rbp+var_1C], eax jmp short loc_2723B loc_27231: mov eax, 0Ch mov [rbp+var_1C], eax jmp short $+2 loc_2723B: mov ecx, [rbp+var_1C] mov rax, [rbp+var_10] mov [rax], ecx mov rax, [rbp+var_18] mov edx, [rax] mov rax, [rbp+var_8] mov rcx, [rax] movsxd rdx, edx add rcx, rdx mov [rax], rcx loc_2725A: jmp short $+2 loc_2725C: mov rax, [rbp+var_10] cmp dword ptr [rax], 10h jz loc_271B4 add rsp, 20h pop rbp retn
int * get_first_nonspace(long long a1, int *a2, int *a3) { int v3; // eax int v4; // ecx int *result; // rax int v6; // [rsp+4h] [rbp-1Ch] do { v3 = (*(long long ( **)(_QWORD, long long, _QWORD, _QWORD))(a1 + 40))( *(_QWORD *)(a1 + 32), a1 + 16, *(_QWORD *)a1, *(_QWORD *)(a1 + 8)); *a3 = v3; if ( v3 > 0 ) { if ( *(_QWORD *)(a1 + 16) >= 0x80uLL ) v6 = 12; else v6 = json_chr_map[*(_QWORD *)(a1 + 16)]; *a2 = v6; *(_QWORD *)a1 += *a3; } else { v4 = 14; if ( *(_QWORD *)a1 >= *(_QWORD *)(a1 + 8) ) v4 = 0; *a2 = v4; } result = a2; } while ( *a2 == 16 ); return result; }
get_first_nonspace: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX LAB_001271b4: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x28] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x20] MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0x10 MOV RCX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RCX] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x8] CALL RAX MOV RCX,qword ptr [RBP + -0x18] MOV dword ptr [RCX],EAX CMP EAX,0x0 JG 0x0012720c MOV RAX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RAX + 0x8] MOV ECX,0xe XOR EAX,EAX CMP RDX,RSI CMOVNC ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX JMP 0x0012725a LAB_0012720c: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x10],0x80 JNC 0x00127231 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x10] LEA RAX,[0x2d22f0] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RBP + -0x1c],EAX JMP 0x0012723b LAB_00127231: MOV EAX,0xc MOV dword ptr [RBP + -0x1c],EAX JMP 0x0012723b LAB_0012723b: MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX] MOVSXD RDX,EDX ADD RCX,RDX MOV qword ptr [RAX],RCX LAB_0012725a: JMP 0x0012725c LAB_0012725c: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX],0x10 JZ 0x001271b4 ADD RSP,0x20 POP RBP RET
void get_first_nonspace(ulong *param_1,int *param_2,int *param_3) { int iVar1; int local_24; do { iVar1 = (*(code *)param_1[5])(param_1[4],param_1 + 2,*param_1,param_1[1]); *param_3 = iVar1; if (iVar1 < 1) { iVar1 = 0xe; if (param_1[1] <= *param_1) { iVar1 = 0; } *param_2 = iVar1; } else { if (param_1[2] < 0x80) { local_24 = *(int *)(json_chr_map + param_1[2] * 4); } else { local_24 = 0xc; } *param_2 = local_24; *param_1 = *param_1 + (long)*param_3; } } while (*param_2 == 0x10); return; }
17,912
nglog::FlagSaver::~FlagSaver()
ng-log[P]ng-log/src/googletest.h
~FlagSaver() { FLAGS_v = v_; FLAGS_stderrthreshold = stderrthreshold_; FLAGS_logtostderr = logtostderr_; FLAGS_alsologtostderr = alsologtostderr_; FLAGS_logmailer = logmailer_; }
O1
c
nglog::FlagSaver::~FlagSaver(): pushq %rbx movq %rdi, %rbx movl (%rdi), %eax leaq 0x2646d(%rip), %rcx # 0x2fc2c movl %eax, (%rcx) movl 0x4(%rdi), %eax leaq 0x2635d(%rip), %rcx # 0x2fb28 movl %eax, (%rcx) movb 0x8(%rdi), %al leaq 0x26343(%rip), %rcx # 0x2fb1a movb %al, (%rcx) movb 0x9(%rdi), %al leaq 0x26339(%rip), %rcx # 0x2fb1c movb %al, (%rcx) leaq 0x10(%rdi), %rsi leaq 0x24d48(%rip), %rax # 0x2e538 movq (%rax), %rdi callq 0x7290 movq 0x10(%rbx), %rdi addq $0x20, %rbx cmpq %rbx, %rdi je 0x980b popq %rbx jmp 0x7620 popq %rbx retq movq %rax, %rdi callq 0x9275 nopl (%rax)
_ZN5nglog9FlagSaverD2Ev: push rbx mov rbx, rdi mov eax, [rdi] lea rcx, _ZN3fLI7FLAGS_vE; fLI::FLAGS_v mov [rcx], eax mov eax, [rdi+4] lea rcx, _ZN3fLI21FLAGS_stderrthresholdE; fLI::FLAGS_stderrthreshold mov [rcx], eax mov al, [rdi+8] lea rcx, _ZN3fLB17FLAGS_logtostderrE; fLB::FLAGS_logtostderr mov [rcx], al mov al, [rdi+9] lea rcx, _ZN3fLB21FLAGS_alsologtostderrE; fLB::FLAGS_alsologtostderr mov [rcx], al lea rsi, [rdi+10h] lea rax, _ZN3fLS15FLAGS_logmailerB5cxx11E; fLS::FLAGS_logmailer mov rdi, [rax] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov rdi, [rbx+10h] add rbx, 20h ; ' ' cmp rdi, rbx jz short loc_980B pop rbx jmp _free loc_980B: pop rbx retn mov rdi, rax call __clang_call_terminate
void nglog::FlagSaver::~FlagSaver(nglog::FlagSaver *this) { char *v2; // rdi fLI::FLAGS_v = *(_DWORD *)this; fLI::FLAGS_stderrthreshold = *((_DWORD *)this + 1); fLB::FLAGS_logtostderr = *((_BYTE *)this + 8); fLB::FLAGS_alsologtostderr = *((_BYTE *)this + 9); std::string::_M_assign(&fLS::FLAGS_logmailer_buf[abi:cxx11], (char *)this + 16); v2 = (char *)*((_QWORD *)this + 2); if ( v2 != (char *)this + 32 ) free(v2); }
~FlagSaver: PUSH RBX MOV RBX,RDI MOV EAX,dword ptr [RDI] LEA RCX,[0x12fc2c] MOV dword ptr [RCX],EAX MOV EAX,dword ptr [RDI + 0x4] LEA RCX,[0x12fb28] MOV dword ptr [RCX],EAX MOV AL,byte ptr [RDI + 0x8] LEA RCX,[0x12fb1a] MOV byte ptr [RCX],AL MOV AL,byte ptr [RDI + 0x9] LEA RCX,[0x12fb1c] MOV byte ptr [RCX],AL LEA RSI,[RDI + 0x10] LEA RAX,[0x12e538] MOV RDI,qword ptr [RAX] LAB_001097f3: CALL 0x00107290 MOV RDI,qword ptr [RBX + 0x10] ADD RBX,0x20 CMP RDI,RBX JZ 0x0010980b POP RBX JMP 0x00107620 LAB_0010980b: POP RBX RET
/* nglog::FlagSaver::~FlagSaver() */ void __thiscall nglog::FlagSaver::~FlagSaver(FlagSaver *this) { fLI::FLAGS_v = *(int4 *)this; fLI::FLAGS_stderrthreshold = *(int4 *)(this + 4); fLB::FLAGS_logtostderr = this[8]; fLB::FLAGS_alsologtostderr = this[9]; /* try { // try from 001097f3 to 001097f7 has its CatchHandler @ 0010980d */ std::__cxx11::string::_M_assign((string *)fLS::FLAGS_logmailer_abi_cxx11_); if (*(FlagSaver **)(this + 0x10) != this + 0x20) { free(*(FlagSaver **)(this + 0x10)); return; } return; }
17,913
ggml_compute_forward_mean
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
static void ggml_compute_forward_mean( const struct ggml_compute_params * params, struct ggml_tensor * dst) { const struct ggml_tensor * src0 = dst->src[0]; switch (src0->type) { case GGML_TYPE_F32: { ggml_compute_forward_mean_f32(params, dst); } break; default: { GGML_ABORT("fatal error"); } } }
O0
c
ggml_compute_forward_mean: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x98(%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movl (%rax), %eax testl %eax, %eax jne 0x1483a jmp 0x1482b movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x26370 jmp 0x14854 leaq 0x5f321(%rip), %rdi # 0x73b62 movl $0x1655, %esi # imm = 0x1655 leaq 0x5f570(%rip), %rdx # 0x73dbd movb $0x0, %al callq 0xe270 addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
ggml_compute_forward_mean: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov rax, [rax+98h] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov eax, [rax] test eax, eax jnz short loc_1483A jmp short $+2 loc_1482B: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call ggml_compute_forward_mean_f32 jmp short loc_14854 loc_1483A: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 1655h lea rdx, aFatalError; "fatal error" mov al, 0 call _ggml_abort loc_14854: add rsp, 20h pop rbp retn
double ggml_compute_forward_mean(long long a1, long long a2) { double result; // xmm0_8 if ( **(_DWORD **)(a2 + 152) ) return ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 5717LL, "fatal error"); ggml_compute_forward_mean_f32(a1, a2); return result; }
ggml_compute_forward_mean: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x98] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] TEST EAX,EAX JNZ 0x0011483a JMP 0x0011482b LAB_0011482b: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x00126370 JMP 0x00114854 LAB_0011483a: LEA RDI,[0x173b62] MOV ESI,0x1655 LEA RDX,[0x173dbd] MOV AL,0x0 CALL 0x0010e270 LAB_00114854: ADD RSP,0x20 POP RBP RET
void ggml_compute_forward_mean(int8 param_1,long param_2) { if (**(int **)(param_2 + 0x98) == 0) { ggml_compute_forward_mean_f32(param_1,param_2); } else { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x1655,"fatal error"); } return; }
17,914
testing::internal::ExecDeathTest::AssumeRole() (.cold.1)
seiftnesse[P]memoryallocator/build_O3/_deps/googletest-src/googletest/src/gtest-death-test.cc
static pid_t ExecDeathTestSpawnChild(char* const* argv, int close_fd) { ExecDeathTestArgs args = {argv, close_fd}; pid_t child_pid = -1; #if GTEST_OS_QNX // Obtains the current directory and sets it to be closed in the child // process. const int cwd_fd = open(".", O_RDONLY); GTEST_DEATH_TEST_CHECK_(cwd_fd != -1); GTEST_DEATH_TEST_CHECK_SYSCALL_(fcntl(cwd_fd, F_SETFD, FD_CLOEXEC)); // We need to execute the test program in the same environment where // it was originally invoked. Therefore we change to the original // working directory first. const char* const original_dir = UnitTest::GetInstance()->original_working_dir(); // We can safely call chdir() as it's a direct system call. if (chdir(original_dir) != 0) { DeathTestAbort(std::string("chdir(\"") + original_dir + "\") failed: " + GetLastErrnoDescription()); return EXIT_FAILURE; } int fd_flags; // Set close_fd to be closed after spawn. GTEST_DEATH_TEST_CHECK_SYSCALL_(fd_flags = fcntl(close_fd, F_GETFD)); GTEST_DEATH_TEST_CHECK_SYSCALL_( fcntl(close_fd, F_SETFD, fd_flags | FD_CLOEXEC)); struct inheritance inherit = {0}; // spawn is a system call. child_pid = spawn(args.argv[0], 0, nullptr, &inherit, args.argv, environ); // Restores the current working directory. GTEST_DEATH_TEST_CHECK_(fchdir(cwd_fd) != -1); GTEST_DEATH_TEST_CHECK_SYSCALL_(close(cwd_fd)); #else // GTEST_OS_QNX #if GTEST_OS_LINUX // When a SIGPROF signal is received while fork() or clone() are executing, // the process may hang. To avoid this, we ignore SIGPROF here and re-enable // it after the call to fork()/clone() is complete. struct sigaction saved_sigprof_action; struct sigaction ignore_sigprof_action; memset(&ignore_sigprof_action, 0, sizeof(ignore_sigprof_action)); sigemptyset(&ignore_sigprof_action.sa_mask); ignore_sigprof_action.sa_handler = SIG_IGN; GTEST_DEATH_TEST_CHECK_SYSCALL_( sigaction(SIGPROF, &ignore_sigprof_action, &saved_sigprof_action)); #endif // GTEST_OS_LINUX #if GTEST_HAS_CLONE const bool use_fork = GTEST_FLAG_GET(death_test_use_fork); if (!use_fork) { static const bool stack_grows_down = StackGrowsDown(); const auto stack_size = static_cast<size_t>(getpagesize() * 2); // MMAP_ANONYMOUS is not defined on Mac, so we use MAP_ANON instead. void* const stack = mmap(nullptr, stack_size, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, -1, 0); GTEST_DEATH_TEST_CHECK_(stack != MAP_FAILED); // Maximum stack alignment in bytes: For a downward-growing stack, this // amount is subtracted from size of the stack space to get an address // that is within the stack space and is aligned on all systems we care // about. As far as I know there is no ABI with stack alignment greater // than 64. We assume stack and stack_size already have alignment of // kMaxStackAlignment. const size_t kMaxStackAlignment = 64; void* const stack_top = static_cast<char*>(stack) + (stack_grows_down ? stack_size - kMaxStackAlignment : 0); GTEST_DEATH_TEST_CHECK_( static_cast<size_t>(stack_size) > kMaxStackAlignment && reinterpret_cast<uintptr_t>(stack_top) % kMaxStackAlignment == 0); child_pid = clone(&ExecDeathTestChildMain, stack_top, SIGCHLD, &args); GTEST_DEATH_TEST_CHECK_(munmap(stack, stack_size) != -1); } #else const bool use_fork = true; #endif // GTEST_HAS_CLONE if (use_fork && (child_pid = fork()) == 0) { ExecDeathTestChildMain(&args); _exit(0); } #endif // GTEST_OS_QNX #if GTEST_OS_LINUX GTEST_DEATH_TEST_CHECK_SYSCALL_( sigaction(SIGPROF, &saved_sigprof_action, nullptr)); #endif // GTEST_OS_LINUX GTEST_DEATH_TEST_CHECK_(child_pid != -1); return child_pid; }
O3
cpp
testing::internal::ExecDeathTest::AssumeRole() (.cold.1): pushq %rbx subq $0x10, %rsp leaq 0x41542a7(%rip), %rdi # 0x415df78 callq 0x99f0 testl %eax, %eax je 0x9d00 leaq 0xc(%rsp), %rdi leaq 0xb(%rsp), %rbx movq %rbx, %rsi callq 0x3384d movb (%rbx), %al movb %al, 0x415427c(%rip) # 0x415df70 leaq 0x415427d(%rip), %rdi # 0x415df78 callq 0x92f0 addq $0x10, %rsp popq %rbx retq
_ZN7testing8internal13ExecDeathTest10AssumeRoleEv_cold_1: push rbx sub rsp, 10h lea rdi, _ZGVZN7testing8internalL23ExecDeathTestSpawnChildEPKPciE16stack_grows_down; __guard * call ___cxa_guard_acquire test eax, eax jz short loc_9D00 lea rdi, [rsp+18h+var_C]; this lea rbx, [rsp+18h+var_D] mov rsi, rbx; void * call _ZN7testing8internalL21StackLowerThanAddressEPKvPb; testing::internal::StackLowerThanAddress(void const*,bool *) mov al, [rbx] mov cs:_ZZN7testing8internalL23ExecDeathTestSpawnChildEPKPciE16stack_grows_down, al; testing::internal::ExecDeathTestSpawnChild(char * const*,int)::stack_grows_down lea rdi, _ZGVZN7testing8internalL23ExecDeathTestSpawnChildEPKPciE16stack_grows_down; __guard * call ___cxa_guard_release loc_9D00: add rsp, 10h pop rbx retn
void testing::internal::ExecDeathTest::AssumeRole() { bool *v0; // rdx char v1; // [rsp+Bh] [rbp-Dh] BYREF _BYTE v2[12]; // [rsp+Ch] [rbp-Ch] BYREF if ( __cxa_guard_acquire(&`guard variable for'testing::internal::ExecDeathTestSpawnChild(char * const*,int)::stack_grows_down) ) { testing::internal::StackLowerThanAddress((testing::internal *)v2, &v1, v0); testing::internal::ExecDeathTestSpawnChild(char * const*,int)::stack_grows_down = v1; __cxa_guard_release(&`guard variable for'testing::internal::ExecDeathTestSpawnChild(char * const*,int)::stack_grows_down); } }
AssumeRole: PUSH RBX SUB RSP,0x10 LEA RDI,[0x425df78] CALL 0x001099f0 TEST EAX,EAX JZ 0x00109d00 LEA RDI,[RSP + 0xc] LEA RBX,[RSP + 0xb] MOV RSI,RBX CALL 0x0013384d MOV AL,byte ptr [RBX] MOV byte ptr [0x0425df70],AL LEA RDI,[0x425df78] CALL 0x001092f0 LAB_00109d00: ADD RSP,0x10 POP RBX RET
/* testing::internal::ExecDeathTest::AssumeRole() [clone .cold.1] */ void testing::internal::ExecDeathTest::AssumeRole(void) { int iVar1; bool local_d; int1 local_c [4]; iVar1 = __cxa_guard_acquire(&ExecDeathTestSpawnChild(char_const**,int)::stack_grows_down); if (iVar1 != 0) { StackLowerThanAddress(local_c,&local_d); ExecDeathTestSpawnChild(char_const**,int)::stack_grows_down = local_d; __cxa_guard_release(&ExecDeathTestSpawnChild(char_const**,int)::stack_grows_down); } return; }
17,915
store_page_range
eloqsql/storage/maria/ma_blockrec.c
static uchar *store_page_range(MARIA_SHARE *share, uchar *to, MARIA_BITMAP_BLOCK *block, ulong length, uint *tot_ranges) { uint data_size= FULL_PAGE_SIZE(share); ulong pages_left= (length + data_size -1) / data_size; uint page_count, ranges, empty_space; uchar *to_start; DBUG_ENTER("store_page_range"); to_start= to; to+= SUB_RANGE_SIZE; /* Store number of unused bytes at last page */ empty_space= (uint) (pages_left * data_size - length); int2store(to, empty_space); to+= BLOCK_FILLER_SIZE; ranges= 0; do { pgcache_page_no_t page; page= block->page; page_count= block->page_count; block++; if (page_count > pages_left) page_count= pages_left; page_store(to, page); to+= PAGE_STORE_SIZE; pagerange_store(to, page_count); to+= PAGERANGE_STORE_SIZE; ranges++; } while ((pages_left-= page_count)); /* Store number of ranges for this block */ int2store(to_start, ranges); (*tot_ranges)+= ranges; DBUG_RETURN(to); }
O0
c
store_page_range: 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 -0x8(%rbp), %rax movl 0x7bc(%rax), %eax movq -0x8(%rbp), %rcx movl 0xc18(%rcx), %ecx addl $0x8, %ecx subl %ecx, %eax subl $0x4, %eax movl %eax, -0x2c(%rbp) movq -0x20(%rbp), %rax movl -0x2c(%rbp), %ecx addq %rcx, %rax subq $0x1, %rax movl -0x2c(%rbp), %ecx xorl %edx, %edx divq %rcx movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x10(%rbp), %rax addq $0x2, %rax movq %rax, -0x10(%rbp) movq -0x38(%rbp), %rax movl -0x2c(%rbp), %ecx imulq %rcx, %rax subq -0x20(%rbp), %rax movl %eax, -0x44(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x58(%rbp) movl -0x44(%rbp), %eax movw %ax, %cx movq -0x58(%rbp), %rax movw %cx, (%rax) movq -0x10(%rbp), %rax addq $0x2, %rax movq %rax, -0x10(%rbp) movl $0x0, -0x40(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x60(%rbp) movq -0x18(%rbp), %rax movl 0x8(%rax), %eax movl %eax, -0x3c(%rbp) movq -0x18(%rbp), %rax addq $0x18, %rax movq %rax, -0x18(%rbp) movl -0x3c(%rbp), %eax cmpq -0x38(%rbp), %rax jbe 0x80c30 movq -0x38(%rbp), %rax movl %eax, -0x3c(%rbp) jmp 0x80c32 movq -0x10(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x60(%rbp), %rax movl %eax, %ecx movq -0x68(%rbp), %rax movl %ecx, (%rax) movq -0x60(%rbp), %rax shrq $0x20, %rax movb %al, %cl movq -0x68(%rbp), %rax movb %cl, 0x4(%rax) movq -0x10(%rbp), %rax addq $0x5, %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x70(%rbp) movl -0x3c(%rbp), %eax movw %ax, %cx movq -0x70(%rbp), %rax movw %cx, (%rax) movq -0x10(%rbp), %rax addq $0x2, %rax movq %rax, -0x10(%rbp) movl -0x40(%rbp), %eax addl $0x1, %eax movl %eax, -0x40(%rbp) movl -0x3c(%rbp), %eax movl %eax, %ecx movq -0x38(%rbp), %rax subq %rcx, %rax movq %rax, -0x38(%rbp) cmpq $0x0, %rax jne 0x80bff jmp 0x80ca9 movq -0x50(%rbp), %rax movq %rax, -0x78(%rbp) movl -0x40(%rbp), %eax movw %ax, %cx movq -0x78(%rbp), %rax movw %cx, (%rax) movl -0x40(%rbp), %ecx movq -0x28(%rbp), %rax addl (%rax), %ecx movl %ecx, (%rax) movq -0x10(%rbp), %rax movq %rax, -0x80(%rbp) movq -0x80(%rbp), %rax popq %rbp retq nopw (%rax,%rax)
store_page_range: 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 rax, [rbp+var_8] mov eax, [rax+7BCh] mov rcx, [rbp+var_8] mov ecx, [rcx+0C18h] add ecx, 8 sub eax, ecx sub eax, 4 mov [rbp+var_2C], eax mov rax, [rbp+var_20] mov ecx, [rbp+var_2C] add rax, rcx sub rax, 1 mov ecx, [rbp+var_2C] xor edx, edx div rcx mov [rbp+var_38], rax mov rax, [rbp+var_10] mov [rbp+var_50], rax mov rax, [rbp+var_10] add rax, 2 mov [rbp+var_10], rax mov rax, [rbp+var_38] mov ecx, [rbp+var_2C] imul rax, rcx sub rax, [rbp+var_20] mov [rbp+var_44], eax mov rax, [rbp+var_10] mov [rbp+var_58], rax mov eax, [rbp+var_44] mov cx, ax mov rax, [rbp+var_58] mov [rax], cx mov rax, [rbp+var_10] add rax, 2 mov [rbp+var_10], rax mov [rbp+var_40], 0 loc_80BFF: mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_60], rax mov rax, [rbp+var_18] mov eax, [rax+8] mov [rbp+var_3C], eax mov rax, [rbp+var_18] add rax, 18h mov [rbp+var_18], rax mov eax, [rbp+var_3C] cmp rax, [rbp+var_38] jbe short loc_80C30 mov rax, [rbp+var_38] mov [rbp+var_3C], eax loc_80C30: jmp short $+2 loc_80C32: mov rax, [rbp+var_10] mov [rbp+var_68], rax mov rax, [rbp+var_60] mov ecx, eax mov rax, [rbp+var_68] mov [rax], ecx mov rax, [rbp+var_60] shr rax, 20h mov cl, al mov rax, [rbp+var_68] mov [rax+4], cl mov rax, [rbp+var_10] add rax, 5 mov [rbp+var_10], rax mov rax, [rbp+var_10] mov [rbp+var_70], rax mov eax, [rbp+var_3C] mov cx, ax mov rax, [rbp+var_70] mov [rax], cx mov rax, [rbp+var_10] add rax, 2 mov [rbp+var_10], rax mov eax, [rbp+var_40] add eax, 1 mov [rbp+var_40], eax mov eax, [rbp+var_3C] mov ecx, eax mov rax, [rbp+var_38] sub rax, rcx mov [rbp+var_38], rax cmp rax, 0 jnz loc_80BFF jmp short $+2 loc_80CA9: mov rax, [rbp+var_50] mov [rbp+var_78], rax mov eax, [rbp+var_40] mov cx, ax mov rax, [rbp+var_78] mov [rax], cx mov ecx, [rbp+var_40] mov rax, [rbp+var_28] add ecx, [rax] mov [rax], ecx mov rax, [rbp+var_10] mov [rbp+var_80], rax mov rax, [rbp+var_80] pop rbp retn
_WORD * store_page_range(long long a1, _WORD *a2, long long *a3, long long a4, _DWORD *a5) { long long v6; // [rsp+20h] [rbp-60h] int v7; // [rsp+40h] [rbp-40h] unsigned int v8; // [rsp+44h] [rbp-3Ch] unsigned long long v9; // [rsp+48h] [rbp-38h] unsigned int v10; // [rsp+54h] [rbp-2Ch] _WORD *v12; // [rsp+70h] [rbp-10h] v10 = *(_DWORD *)(a1 + 1980) - (*(_DWORD *)(a1 + 3096) + 8) - 4; v9 = ((unsigned long long)v10 + a4 - 1) / v10; a2[1] = v10 * v9 - a4; v12 = a2 + 2; v7 = 0; do { v6 = *a3; v8 = *((_DWORD *)a3 + 2); a3 += 3; if ( v8 > v9 ) v8 = v9; *(_DWORD *)v12 = v6; *((_BYTE *)v12 + 4) = BYTE4(v6); *(_WORD *)((char *)v12 + 5) = v8; v12 = (_WORD *)((char *)v12 + 7); ++v7; v9 -= v8; } while ( v9 ); *a2 = v7; *a5 += v7; return v12; }
store_page_range: 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 RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x7bc] MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0xc18] ADD ECX,0x8 SUB EAX,ECX SUB EAX,0x4 MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x2c] ADD RAX,RCX SUB RAX,0x1 MOV ECX,dword ptr [RBP + -0x2c] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x2c] IMUL RAX,RCX SUB RAX,qword ptr [RBP + -0x20] MOV dword ptr [RBP + -0x44],EAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x58],RAX MOV EAX,dword ptr [RBP + -0x44] MOV CX,AX MOV RAX,qword ptr [RBP + -0x58] MOV word ptr [RAX],CX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 MOV qword ptr [RBP + -0x10],RAX MOV dword ptr [RBP + -0x40],0x0 LAB_00180bff: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x18 MOV qword ptr [RBP + -0x18],RAX MOV EAX,dword ptr [RBP + -0x3c] CMP RAX,qword ptr [RBP + -0x38] JBE 0x00180c30 MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RBP + -0x3c],EAX LAB_00180c30: JMP 0x00180c32 LAB_00180c32: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x60] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x68] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x60] SHR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0x68] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x5 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x70],RAX MOV EAX,dword ptr [RBP + -0x3c] MOV CX,AX MOV RAX,qword ptr [RBP + -0x70] MOV word ptr [RAX],CX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 MOV qword ptr [RBP + -0x10],RAX MOV EAX,dword ptr [RBP + -0x40] ADD EAX,0x1 MOV dword ptr [RBP + -0x40],EAX MOV EAX,dword ptr [RBP + -0x3c] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x38] SUB RAX,RCX MOV qword ptr [RBP + -0x38],RAX CMP RAX,0x0 JNZ 0x00180bff JMP 0x00180ca9 LAB_00180ca9: MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x78],RAX MOV EAX,dword ptr [RBP + -0x40] MOV CX,AX MOV RAX,qword ptr [RBP + -0x78] MOV word ptr [RAX],CX MOV ECX,dword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x28] ADD ECX,dword ptr [RAX] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x80] POP RBP RET
int4 * store_page_range(long param_1,int2 *param_2,int8 *param_3,long param_4,int *param_5) { int8 uVar1; uint uVar2; int local_48; uint local_44; ulong local_40; int8 *local_20; int4 *local_18; uVar2 = (*(int *)(param_1 + 0x7bc) - (*(int *)(param_1 + 0xc18) + 8)) - 4; local_40 = ((param_4 + (ulong)uVar2) - 1) / (ulong)uVar2; param_2[1] = (short)local_40 * (short)uVar2 - (short)param_4; local_18 = (int4 *)(param_2 + 2); local_48 = 0; local_20 = param_3; do { uVar1 = *local_20; local_44 = *(uint *)(local_20 + 1); local_20 = local_20 + 3; if (local_40 < local_44) { local_44 = (uint)local_40; } *local_18 = (int)uVar1; *(char *)(local_18 + 1) = (char)((ulong)uVar1 >> 0x20); *(short *)((long)local_18 + 5) = (short)local_44; local_18 = (int4 *)((long)local_18 + 7); local_48 = local_48 + 1; local_40 = local_40 - local_44; } while (local_40 != 0); *param_2 = (short)local_48; *param_5 = local_48 + *param_5; return local_18; }
17,916
testing::TestEventListeners::SetDefaultResultPrinter(testing::TestEventListener*)
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
void TestEventListeners::SetDefaultResultPrinter(TestEventListener* listener) { if (default_result_printer_ != listener) { // It is an error to pass this method a listener that is already in the // list. delete Release(default_result_printer_); default_result_printer_ = listener; if (listener != nullptr) Append(listener); } }
O0
cpp
testing::TestEventListeners::SetDefaultResultPrinter(testing::TestEventListener*): subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x8(%rax), %rax cmpq 0x18(%rsp), %rax je 0xe15fe movq 0x10(%rsp), %rdi movq 0x8(%rdi), %rsi callq 0xe1520 movq %rax, 0x8(%rsp) cmpq $0x0, %rax je 0xe15d7 movq 0x8(%rsp), %rdi movq (%rdi), %rax callq *0x8(%rax) movq 0x10(%rsp), %rax movq 0x18(%rsp), %rcx movq %rcx, 0x8(%rax) cmpq $0x0, 0x18(%rsp) je 0xe15fc movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0xe14f0 jmp 0xe15fe addq $0x28, %rsp retq nopw %cs:(%rax,%rax)
_ZN7testing18TestEventListeners23SetDefaultResultPrinterEPNS_17TestEventListenerE: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_10], rsi mov rax, [rsp+28h+var_8] mov [rsp+28h+var_18], rax mov rax, [rax+8] cmp rax, [rsp+28h+var_10] jz short loc_E15FE mov rdi, [rsp+28h+var_18]; this mov rsi, [rdi+8]; testing::TestEventListener * call _ZN7testing18TestEventListeners7ReleaseEPNS_17TestEventListenerE; testing::TestEventListeners::Release(testing::TestEventListener *) mov [rsp+28h+var_20], rax cmp rax, 0 jz short loc_E15D7 mov rdi, [rsp+28h+var_20] mov rax, [rdi] call qword ptr [rax+8] loc_E15D7: mov rax, [rsp+28h+var_18] mov rcx, [rsp+28h+var_10] mov [rax+8], rcx cmp [rsp+28h+var_10], 0 jz short loc_E15FC mov rdi, [rsp+28h+var_18]; this mov rsi, [rsp+28h+var_10]; testing::TestEventListener * call _ZN7testing18TestEventListeners6AppendEPNS_17TestEventListenerE; testing::TestEventListeners::Append(testing::TestEventListener *) loc_E15FC: jmp short $+2 loc_E15FE: add rsp, 28h retn
testing::TestEventListener * testing::TestEventListeners::SetDefaultResultPrinter( testing::TestEventListeners *this, testing::TestEventListener *a2) { testing::TestEventListener *result; // rax testing::TestEventListener *v3; // [rsp+8h] [rbp-20h] result = (testing::TestEventListener *)*((_QWORD *)this + 1); if ( result != a2 ) { v3 = testing::TestEventListeners::Release(this, *((testing::TestEventListener **)this + 1)); if ( v3 ) (*(void ( **)(testing::TestEventListener *))(*(_QWORD *)v3 + 8LL))(v3); result = this; *((_QWORD *)this + 1) = a2; if ( a2 ) return (testing::TestEventListener *)testing::TestEventListeners::Append( (testing::internal::TestEventRepeater **)this, a2); } return result; }
SetDefaultResultPrinter: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RAX + 0x8] CMP RAX,qword ptr [RSP + 0x18] JZ 0x001e15fe MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RDI + 0x8] CALL 0x001e1520 MOV qword ptr [RSP + 0x8],RAX CMP RAX,0x0 JZ 0x001e15d7 MOV RDI,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_001e15d7: MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x18] MOV qword ptr [RAX + 0x8],RCX CMP qword ptr [RSP + 0x18],0x0 JZ 0x001e15fc MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x18] CALL 0x001e14f0 LAB_001e15fc: JMP 0x001e15fe LAB_001e15fe: ADD RSP,0x28 RET
/* testing::TestEventListeners::SetDefaultResultPrinter(testing::TestEventListener*) */ void __thiscall testing::TestEventListeners::SetDefaultResultPrinter (TestEventListeners *this,TestEventListener *param_1) { long *plVar1; if (*(TestEventListener **)(this + 8) != param_1) { plVar1 = (long *)Release(this,*(TestEventListener **)(this + 8)); if (plVar1 != (long *)0x0) { (**(code **)(*plVar1 + 8))(); } *(TestEventListener **)(this + 8) = param_1; if (param_1 != (TestEventListener *)0x0) { Append(this,param_1); } } return; }
17,917
mi_mempack_get_block_info
eloqsql/storage/myisam/mi_packrec.c
static uchar *_mi_mempack_get_block_info(MI_INFO *myisam, MI_BIT_BUFF *bit_buff, MI_BLOCK_INFO *info, uchar **rec_buff_p, uchar *header) { header+= read_pack_length((uint) myisam->s->pack.version, header, &info->rec_len); if (myisam->s->base.blobs) { header+= read_pack_length((uint) myisam->s->pack.version, header, &info->blob_len); /* mi_alloc_rec_buff sets my_errno on error */ if (!(mi_alloc_rec_buff(myisam, info->blob_len , rec_buff_p))) return 0; /* not enough memory */ bit_buff->blob_pos= (uchar*) *rec_buff_p; bit_buff->blob_end= (uchar*) *rec_buff_p + info->blob_len; } return header; }
O3
c
mi_mempack_get_block_info: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %rbx movq %rcx, %r12 movq %rdx, %r15 movq %rsi, %r14 movzbl (%r8), %eax cmpq $0xfd, %rax ja 0x3b9e7 movl $0x1, %ecx jmp 0x3ba22 cmpl $0xfe, %eax jne 0x3b9f9 movzwl 0x1(%rbx), %eax movl $0x3, %ecx jmp 0x3ba22 movq (%rdi), %rax cmpb $0x1, 0x244(%rax) jne 0x3ba1a movzwl 0x1(%rbx), %ecx movzbl 0x3(%rbx), %eax shll $0x10, %eax orq %rcx, %rax movl $0x4, %ecx jmp 0x3ba22 movl 0x1(%rbx), %eax movl $0x5, %ecx movq %rax, 0x18(%r15) addq %rcx, %rbx movq (%rdi), %rax cmpl $0x0, 0x188(%rax) je 0x3baad movzbl (%rbx), %esi cmpq $0xfd, %rsi ja 0x3ba49 movl $0x1, %r13d jmp 0x3ba85 cmpl $0xfe, %esi jne 0x3ba5d movzwl 0x1(%rbx), %esi movl $0x3, %r13d jmp 0x3ba85 cmpb $0x1, 0x244(%rax) jne 0x3ba7c movzwl 0x1(%rbx), %eax movzbl 0x3(%rbx), %esi shll $0x10, %esi orq %rax, %rsi movl $0x4, %r13d jmp 0x3ba85 movl 0x1(%rbx), %esi movl $0x5, %r13d movq %rsi, 0x30(%r15) movq %r12, %rdx callq 0x37ae5 testq %rax, %rax je 0x3baab addq %r13, %rbx movq (%r12), %rax movq %rax, 0x18(%r14) addq 0x30(%r15), %rax movq %rax, 0x20(%r14) jmp 0x3baad xorl %ebx, %ebx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_mi_mempack_get_block_info: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, r8 mov r12, rcx mov r15, rdx mov r14, rsi movzx eax, byte ptr [r8] cmp rax, 0FDh ja short loc_3B9E7 mov ecx, 1 jmp short loc_3BA22 loc_3B9E7: cmp eax, 0FEh jnz short loc_3B9F9 movzx eax, word ptr [rbx+1] mov ecx, 3 jmp short loc_3BA22 loc_3B9F9: mov rax, [rdi] cmp byte ptr [rax+244h], 1 jnz short loc_3BA1A movzx ecx, word ptr [rbx+1] movzx eax, byte ptr [rbx+3] shl eax, 10h or rax, rcx mov ecx, 4 jmp short loc_3BA22 loc_3BA1A: mov eax, [rbx+1] mov ecx, 5 loc_3BA22: mov [r15+18h], rax add rbx, rcx mov rax, [rdi] cmp dword ptr [rax+188h], 0 jz short loc_3BAAD movzx esi, byte ptr [rbx] cmp rsi, 0FDh ja short loc_3BA49 mov r13d, 1 jmp short loc_3BA85 loc_3BA49: cmp esi, 0FEh jnz short loc_3BA5D movzx esi, word ptr [rbx+1] mov r13d, 3 jmp short loc_3BA85 loc_3BA5D: cmp byte ptr [rax+244h], 1 jnz short loc_3BA7C movzx eax, word ptr [rbx+1] movzx esi, byte ptr [rbx+3] shl esi, 10h or rsi, rax mov r13d, 4 jmp short loc_3BA85 loc_3BA7C: mov esi, [rbx+1] mov r13d, 5 loc_3BA85: mov [r15+30h], rsi mov rdx, r12 call mi_alloc_rec_buff test rax, rax jz short loc_3BAAB add rbx, r13 mov rax, [r12] mov [r14+18h], rax add rax, [r15+30h] mov [r14+20h], rax jmp short loc_3BAAD loc_3BAAB: xor ebx, ebx loc_3BAAD: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned __int8 * mi_mempack_get_block_info( long long *a1, long long a2, long long a3, long long *a4, unsigned __int8 *a5) { unsigned long long v8; // rax long long v9; // rcx unsigned __int8 *v10; // rbx unsigned long long v11; // rsi long long v12; // r13 long long v13; // rax v8 = *a5; if ( v8 > 0xFD ) { if ( (_DWORD)v8 == 254 ) { v8 = *(unsigned __int16 *)(a5 + 1); v9 = 3LL; } else if ( *(_BYTE *)(*a1 + 580) == 1 ) { v8 = *(unsigned __int16 *)(a5 + 1) | (unsigned long long)(a5[3] << 16); v9 = 4LL; } else { v8 = *(unsigned int *)(a5 + 1); v9 = 5LL; } } else { v9 = 1LL; } *(_QWORD *)(a3 + 24) = v8; v10 = &a5[v9]; if ( *(_DWORD *)(*a1 + 392) ) { v11 = *v10; if ( v11 > 0xFD ) { if ( (_DWORD)v11 == 254 ) { v11 = *(unsigned __int16 *)(v10 + 1); v12 = 3LL; } else if ( *(_BYTE *)(*a1 + 580) == 1 ) { v11 = *(unsigned __int16 *)(v10 + 1) | (unsigned long long)(v10[3] << 16); v12 = 4LL; } else { v11 = *(unsigned int *)(v10 + 1); v12 = 5LL; } } else { v12 = 1LL; } *(_QWORD *)(a3 + 48) = v11; if ( mi_alloc_rec_buff(a1, v11, a4) ) { v10 += v12; v13 = *a4; *(_QWORD *)(a2 + 24) = *a4; *(_QWORD *)(a2 + 32) = *(_QWORD *)(a3 + 48) + v13; } else { return 0LL; } } return v10; }
_mi_mempack_get_block_info: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,R8 MOV R12,RCX MOV R15,RDX MOV R14,RSI MOVZX EAX,byte ptr [R8] CMP RAX,0xfd JA 0x0013b9e7 MOV ECX,0x1 JMP 0x0013ba22 LAB_0013b9e7: CMP EAX,0xfe JNZ 0x0013b9f9 MOVZX EAX,word ptr [RBX + 0x1] MOV ECX,0x3 JMP 0x0013ba22 LAB_0013b9f9: MOV RAX,qword ptr [RDI] CMP byte ptr [RAX + 0x244],0x1 JNZ 0x0013ba1a MOVZX ECX,word ptr [RBX + 0x1] MOVZX EAX,byte ptr [RBX + 0x3] SHL EAX,0x10 OR RAX,RCX MOV ECX,0x4 JMP 0x0013ba22 LAB_0013ba1a: MOV EAX,dword ptr [RBX + 0x1] MOV ECX,0x5 LAB_0013ba22: MOV qword ptr [R15 + 0x18],RAX ADD RBX,RCX MOV RAX,qword ptr [RDI] CMP dword ptr [RAX + 0x188],0x0 JZ 0x0013baad MOVZX ESI,byte ptr [RBX] CMP RSI,0xfd JA 0x0013ba49 MOV R13D,0x1 JMP 0x0013ba85 LAB_0013ba49: CMP ESI,0xfe JNZ 0x0013ba5d MOVZX ESI,word ptr [RBX + 0x1] MOV R13D,0x3 JMP 0x0013ba85 LAB_0013ba5d: CMP byte ptr [RAX + 0x244],0x1 JNZ 0x0013ba7c MOVZX EAX,word ptr [RBX + 0x1] MOVZX ESI,byte ptr [RBX + 0x3] SHL ESI,0x10 OR RSI,RAX MOV R13D,0x4 JMP 0x0013ba85 LAB_0013ba7c: MOV ESI,dword ptr [RBX + 0x1] MOV R13D,0x5 LAB_0013ba85: MOV qword ptr [R15 + 0x30],RSI MOV RDX,R12 CALL 0x00137ae5 TEST RAX,RAX JZ 0x0013baab ADD RBX,R13 MOV RAX,qword ptr [R12] MOV qword ptr [R14 + 0x18],RAX ADD RAX,qword ptr [R15 + 0x30] MOV qword ptr [R14 + 0x20],RAX JMP 0x0013baad LAB_0013baab: XOR EBX,EBX LAB_0013baad: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
byte * _mi_mempack_get_block_info (long *param_1,long param_2,long param_3,long *param_4,byte *param_5) { long lVar1; long lVar2; ulong uVar3; uVar3 = (ulong)*param_5; if (uVar3 < 0xfe) { lVar2 = 1; } else if (*param_5 == 0xfe) { uVar3 = (ulong)*(ushort *)(param_5 + 1); lVar2 = 3; } else if (*(char *)(*param_1 + 0x244) == '\x01') { uVar3 = (ulong)*(uint3 *)(param_5 + 1); lVar2 = 4; } else { uVar3 = (ulong)*(uint *)(param_5 + 1); lVar2 = 5; } *(ulong *)(param_3 + 0x18) = uVar3; param_5 = param_5 + lVar2; if (*(int *)(*param_1 + 0x188) != 0) { uVar3 = (ulong)*param_5; if (uVar3 < 0xfe) { lVar2 = 1; } else if (*param_5 == 0xfe) { uVar3 = (ulong)*(ushort *)(param_5 + 1); lVar2 = 3; } else if (*(char *)(*param_1 + 0x244) == '\x01') { uVar3 = (ulong)*(uint3 *)(param_5 + 1); lVar2 = 4; } else { uVar3 = (ulong)*(uint *)(param_5 + 1); lVar2 = 5; } *(ulong *)(param_3 + 0x30) = uVar3; lVar1 = mi_alloc_rec_buff(param_1,uVar3,param_4); if (lVar1 == 0) { param_5 = (byte *)0x0; } else { param_5 = param_5 + lVar2; lVar2 = *param_4; *(long *)(param_2 + 0x18) = lVar2; *(long *)(param_2 + 0x20) = lVar2 + *(long *)(param_3 + 0x30); } } return param_5; }
17,918
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_float(double)
monkey531[P]llama/common/json.hpp
void dump_float(number_float_t x) { // NaN / inf if (!std::isfinite(x)) { o->write_characters("null", 4); return; } // If number_float_t is an IEEE-754 single or double precision number, // use the Grisu2 algorithm to produce short numbers which are // guaranteed to round-trip, using strtof and strtod, resp. // // NB: The test below works if <long double> == <double>. static constexpr bool is_ieee_single_or_double = (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 24 && std::numeric_limits<number_float_t>::max_exponent == 128) || (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 53 && std::numeric_limits<number_float_t>::max_exponent == 1024); dump_float(x, std::integral_constant<bool, is_ieee_single_or_double>()); }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::dump_float(double): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq %xmm0, %rax btrq $0x3f, %rax movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000 cmpq %rcx, %rax jl 0xb764f movq (%rbx), %rdi movq (%rdi), %rax movq 0x8(%rax), %rax leaq 0x39116(%rip), %rsi # 0xf0757 movl $0x4, %edx addq $0x8, %rsp popq %rbx popq %r14 jmpq *%rax leaq 0x10(%rbx), %r14 leaq 0x50(%rbx), %rsi movq %r14, %rdi callq 0xb7893 movq (%rbx), %rdi subq %r14, %rax movq (%rdi), %rcx movq 0x8(%rcx), %rcx movq %r14, %rsi movq %rax, %rdx addq $0x8, %rsp popq %rbx popq %r14 jmpq *%rcx nop
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10dump_floatEd: push r14 push rbx push rax mov rbx, rdi movq rax, xmm0 btr rax, 3Fh ; '?' mov rcx, 7FF0000000000000h cmp rax, rcx jl short loc_B764F mov rdi, [rbx] mov rax, [rdi] mov rax, [rax+8] lea rsi, aOnNull_0+5; "null" mov edx, 4 add rsp, 8 pop rbx pop r14 jmp rax loc_B764F: lea r14, [rbx+10h] lea rsi, [rbx+50h] mov rdi, r14; this call _ZN8nlohmann16json_abi_v3_11_36detail8to_charsIdEEPcS3_PKcT_; nlohmann::json_abi_v3_11_3::detail::to_chars<double>(char *,char const*,double) mov rdi, [rbx] sub rax, r14 mov rcx, [rdi] mov rcx, [rcx+8] mov rsi, r14 mov rdx, rax add rsp, 8 pop rbx pop r14 jmp rcx
long long nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::dump_float( _QWORD *a1, double a2) { long long v3; // rax if ( (*(_QWORD *)&a2 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL ) return (*(long long ( **)(_QWORD, char *, long long))(*(_QWORD *)*a1 + 8LL))(*a1, "null", 4LL); v3 = nlohmann::json_abi_v3_11_3::detail::to_chars<double>((nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)(a1 + 2)); return (*(long long ( **)(_QWORD, _QWORD *, long long))(*(_QWORD *)*a1 + 8LL))( *a1, a1 + 2, v3 - (_QWORD)(a1 + 2)); }
dump_float: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOVQ RAX,XMM0 BTR RAX,0x3f MOV RCX,0x7ff0000000000000 CMP RAX,RCX JL 0x001b764f MOV RDI,qword ptr [RBX] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x8] LEA RSI,[0x1f0757] MOV EDX,0x4 ADD RSP,0x8 POP RBX POP R14 JMP RAX LAB_001b764f: LEA R14,[RBX + 0x10] LEA RSI,[RBX + 0x50] MOV RDI,R14 CALL 0x001b7893 MOV RDI,qword ptr [RBX] SUB RAX,R14 MOV RCX,qword ptr [RDI] MOV RCX,qword ptr [RCX + 0x8] MOV RSI,R14 MOV RDX,RAX ADD RSP,0x8 POP RBX POP R14 JMP RCX
/* nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::dump_float(double) */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::dump_float(serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,double param_1) { serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *psVar1; code *UNRECOVERED_JUMPTABLE; char *pcVar2; if (0x7fefffffffffffff < (ulong)ABS(param_1)) { /* WARNING: Could not recover jumptable at 0x001b764d. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(**(long **)this + 8))(*(long **)this,"null",4); return; } psVar1 = this + 0x10; pcVar2 = to_chars<double>((char *)psVar1,(char *)(this + 0x50),param_1); UNRECOVERED_JUMPTABLE = *(code **)(**(long **)this + 8); /* WARNING: Could not recover jumptable at 0x001b7679. Too many branches */ /* WARNING: Treating indirect jump as call */ (*UNRECOVERED_JUMPTABLE)(*(long **)this,psVar1,(long)pcVar2 - (long)psVar1,UNRECOVERED_JUMPTABLE); return; }
17,919
allocate_tail
eloqsql/storage/maria/ma_bitmap.c
static my_bool allocate_tail(MARIA_FILE_BITMAP *bitmap, uint size, MARIA_BITMAP_BLOCK *block) { uint min_bits= size_to_tail_pattern(bitmap, size); uchar *data, *end, *best_data= 0; my_bool first_found= 1; uint best_bits= (uint) -1, UNINIT_VAR(best_pos); DBUG_ENTER("allocate_tail"); DBUG_PRINT("enter", ("size: %u", size)); data= bitmap->map + (bitmap->full_tail_size/6)*6; end= bitmap->map + bitmap->used_size; /* We have to add DIR_ENTRY_SIZE here as this is not part of the data size See call to allocate_tail() in find_tail(). */ DBUG_ASSERT(size <= MAX_TAIL_SIZE(bitmap->block_size) + DIR_ENTRY_SIZE); for (; data < end; data += 6) { ulonglong bits= uint6korr(data); /* 6 bytes = 6*8/3= 16 patterns */ uint i; /* Skip common patterns We can skip empty pages (if we already found a match) or the following patterns: 1-4 (head pages, not suitable for tail) or 7 (full tail page). See 'Dynamic size records' comment at start of file. At the moment we only skip full head and tail pages (ie, all bits are set) as this is easy to detect with one simple test and is a quite common case if we have blobs. */ if ((!bits && best_data) || bits == 0xffffffffffffLL || bits == 04444444444444444LL) continue; for (i= 0; i < 16; i++, bits >>= 3) { uint pattern= (uint) (bits & 7); if (pattern == 0 || (pattern > FULL_HEAD_PAGE && pattern < FULL_TAIL_PAGE)) { /* There is room for tail data */ if (first_found) { first_found= 0; bitmap->full_tail_size= (uint)(data - bitmap->map); } } if (pattern <= min_bits && (!pattern || pattern > FULL_HEAD_PAGE)) { if ((int) pattern > (int) best_bits) { best_bits= pattern; best_data= data; best_pos= i; if (pattern == min_bits) goto found; /* Can't be better */ } } } } if (!best_data) { if (data >= bitmap->map + bitmap->total_size) DBUG_RETURN(1); DBUG_ASSERT(uint6korr(data) == 0); /* Allocate data at end of bitmap */ best_data= data; bitmap->used_size= (uint) (data - bitmap->map) + 6; DBUG_ASSERT(bitmap->used_size <= bitmap->total_size); best_pos= best_bits= 0; } found: fill_block(bitmap, block, best_data, best_pos, best_bits, FULL_TAIL_PAGE); DBUG_RETURN(0); }
O0
c
allocate_tail: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi callq 0x42320 movl %eax, -0x24(%rbp) movq $0x0, -0x40(%rbp) movb $0x1, -0x41(%rbp) movl $0xffffffff, -0x48(%rbp) # imm = 0xFFFFFFFF movl -0x4c(%rbp), %eax movl %eax, -0x4c(%rbp) jmp 0x4212d movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x68(%rbp) movq -0x10(%rbp), %rax movl 0x2c(%rax), %eax movl $0x6, %ecx xorl %edx, %edx divl %ecx movl %eax, %ecx movq -0x68(%rbp), %rax imull $0x6, %ecx, %ecx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq -0x10(%rbp), %rcx movl 0x24(%rcx), %ecx addq %rcx, %rax movq %rax, -0x38(%rbp) jmp 0x42173 jmp 0x42175 movq -0x30(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0x42285 movq -0x30(%rbp), %rdi callq 0x3f4f0 movq %rax, -0x58(%rbp) cmpq $0x0, -0x58(%rbp) jne 0x4219e cmpq $0x0, -0x40(%rbp) jne 0x421be movabsq $0xffffffffffff, %rax # imm = 0xFFFFFFFFFFFF cmpq %rax, -0x58(%rbp) je 0x421be movabsq $0x924924924924, %rax # imm = 0x924924924924 cmpq %rax, -0x58(%rbp) jne 0x421c3 jmp 0x42274 movl $0x0, -0x5c(%rbp) cmpl $0x10, -0x5c(%rbp) jae 0x42272 movq -0x58(%rbp), %rax andq $0x7, %rax movl %eax, -0x60(%rbp) cmpl $0x0, -0x60(%rbp) je 0x421f1 cmpl $0x4, -0x60(%rbp) jbe 0x42215 cmpl $0x7, -0x60(%rbp) jae 0x42215 cmpb $0x0, -0x41(%rbp) je 0x42213 movb $0x0, -0x41(%rbp) movq -0x30(%rbp), %rax movq -0x10(%rbp), %rcx movq 0x8(%rcx), %rcx subq %rcx, %rax movl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x2c(%rax) jmp 0x42215 movl -0x60(%rbp), %eax cmpl -0x24(%rbp), %eax ja 0x42256 cmpl $0x0, -0x60(%rbp) je 0x42229 cmpl $0x4, -0x60(%rbp) jbe 0x42256 movl -0x60(%rbp), %eax cmpl -0x48(%rbp), %eax jle 0x42254 movl -0x60(%rbp), %eax movl %eax, -0x48(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x40(%rbp) movl -0x5c(%rbp), %eax movl %eax, -0x4c(%rbp) movl -0x60(%rbp), %eax cmpl -0x24(%rbp), %eax jne 0x42252 jmp 0x422eb jmp 0x42254 jmp 0x42256 jmp 0x42258 movl -0x5c(%rbp), %eax addl $0x1, %eax movl %eax, -0x5c(%rbp) movq -0x58(%rbp), %rax shrq $0x3, %rax movq %rax, -0x58(%rbp) jmp 0x421ca jmp 0x42274 movq -0x30(%rbp), %rax addq $0x6, %rax movq %rax, -0x30(%rbp) jmp 0x42175 cmpq $0x0, -0x40(%rbp) jne 0x422e9 movq -0x30(%rbp), %rax movq -0x10(%rbp), %rcx movq 0x8(%rcx), %rcx movq -0x10(%rbp), %rdx movl 0x128(%rdx), %edx addq %rdx, %rcx cmpq %rcx, %rax jb 0x422b2 jmp 0x422ac movb $0x1, -0x1(%rbp) jmp 0x4230d jmp 0x422b4 jmp 0x422b6 movq -0x30(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x30(%rbp), %rax movq -0x10(%rbp), %rcx movq 0x8(%rcx), %rcx subq %rcx, %rax movl %eax, %ecx addl $0x6, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x24(%rax) jmp 0x422db movl $0x0, -0x48(%rbp) movl $0x0, -0x4c(%rbp) jmp 0x422eb movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x40(%rbp), %rdx movl -0x4c(%rbp), %ecx movl -0x48(%rbp), %r8d movl $0x7, %r9d callq 0x41790 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x70, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
allocate_tail: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov rdi, [rbp+var_10] mov esi, [rbp+var_14] call size_to_tail_pattern mov [rbp+var_24], eax mov [rbp+var_40], 0 mov [rbp+var_41], 1 mov [rbp+var_48], 0FFFFFFFFh mov eax, [rbp+var_4C] mov [rbp+var_4C], eax jmp short $+2 loc_4212D: mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_68], rax mov rax, [rbp+var_10] mov eax, [rax+2Ch] mov ecx, 6 xor edx, edx div ecx mov ecx, eax mov rax, [rbp+var_68] imul ecx, 6 mov ecx, ecx add rax, rcx mov [rbp+var_30], rax mov rax, [rbp+var_10] mov rax, [rax+8] mov rcx, [rbp+var_10] mov ecx, [rcx+24h] add rax, rcx mov [rbp+var_38], rax jmp short $+2 loc_42173: jmp short $+2 loc_42175: mov rax, [rbp+var_30] cmp rax, [rbp+var_38] jnb loc_42285 mov rdi, [rbp+var_30] call uint6korr_0 mov [rbp+var_58], rax cmp [rbp+var_58], 0 jnz short loc_4219E cmp [rbp+var_40], 0 jnz short loc_421BE loc_4219E: mov rax, 0FFFFFFFFFFFFh cmp [rbp+var_58], rax jz short loc_421BE mov rax, 924924924924h cmp [rbp+var_58], rax jnz short loc_421C3 loc_421BE: jmp loc_42274 loc_421C3: mov [rbp+var_5C], 0 loc_421CA: cmp [rbp+var_5C], 10h jnb loc_42272 mov rax, [rbp+var_58] and rax, 7 mov [rbp+var_60], eax cmp [rbp+var_60], 0 jz short loc_421F1 cmp [rbp+var_60], 4 jbe short loc_42215 cmp [rbp+var_60], 7 jnb short loc_42215 loc_421F1: cmp [rbp+var_41], 0 jz short loc_42213 mov [rbp+var_41], 0 mov rax, [rbp+var_30] mov rcx, [rbp+var_10] mov rcx, [rcx+8] sub rax, rcx mov ecx, eax mov rax, [rbp+var_10] mov [rax+2Ch], ecx loc_42213: jmp short $+2 loc_42215: mov eax, [rbp+var_60] cmp eax, [rbp+var_24] ja short loc_42256 cmp [rbp+var_60], 0 jz short loc_42229 cmp [rbp+var_60], 4 jbe short loc_42256 loc_42229: mov eax, [rbp+var_60] cmp eax, [rbp+var_48] jle short loc_42254 mov eax, [rbp+var_60] mov [rbp+var_48], eax mov rax, [rbp+var_30] mov [rbp+var_40], rax mov eax, [rbp+var_5C] mov [rbp+var_4C], eax mov eax, [rbp+var_60] cmp eax, [rbp+var_24] jnz short loc_42252 jmp loc_422EB loc_42252: jmp short $+2 loc_42254: jmp short $+2 loc_42256: jmp short $+2 loc_42258: mov eax, [rbp+var_5C] add eax, 1 mov [rbp+var_5C], eax mov rax, [rbp+var_58] shr rax, 3 mov [rbp+var_58], rax jmp loc_421CA loc_42272: jmp short $+2 loc_42274: mov rax, [rbp+var_30] add rax, 6 mov [rbp+var_30], rax jmp loc_42175 loc_42285: cmp [rbp+var_40], 0 jnz short loc_422E9 mov rax, [rbp+var_30] mov rcx, [rbp+var_10] mov rcx, [rcx+8] mov rdx, [rbp+var_10] mov edx, [rdx+128h] add rcx, rdx cmp rax, rcx jb short loc_422B2 jmp short $+2 loc_422AC: mov [rbp+var_1], 1 jmp short loc_4230D loc_422B2: jmp short $+2 loc_422B4: jmp short $+2 loc_422B6: mov rax, [rbp+var_30] mov [rbp+var_40], rax mov rax, [rbp+var_30] mov rcx, [rbp+var_10] mov rcx, [rcx+8] sub rax, rcx mov ecx, eax add ecx, 6 mov rax, [rbp+var_10] mov [rax+24h], ecx jmp short $+2 loc_422DB: mov [rbp+var_48], 0 mov [rbp+var_4C], 0 loc_422E9: jmp short $+2 loc_422EB: mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] mov rdx, [rbp+var_40] mov ecx, [rbp+var_4C] mov r8d, [rbp+var_48] mov r9d, 7 call fill_block mov [rbp+var_1], 0 loc_4230D: mov al, [rbp+var_1] add rsp, 70h pop rbp retn
char allocate_tail(long long a1, unsigned int a2, long long a3) { unsigned int v4; // [rsp+10h] [rbp-60h] unsigned int i; // [rsp+14h] [rbp-5Ch] unsigned long long v6; // [rsp+18h] [rbp-58h] int v7; // [rsp+24h] [rbp-4Ch] signed int v8; // [rsp+28h] [rbp-48h] char v9; // [rsp+2Fh] [rbp-41h] long long v10; // [rsp+30h] [rbp-40h] unsigned long long v11; // [rsp+38h] [rbp-38h] unsigned int *v12; // [rsp+40h] [rbp-30h] unsigned int v13; // [rsp+4Ch] [rbp-24h] v13 = size_to_tail_pattern(a1, a2); v10 = 0LL; v9 = 1; v8 = -1; v12 = (unsigned int *)(6 * (*(_DWORD *)(a1 + 44) / 6u) + *(_QWORD *)(a1 + 8)); v11 = *(unsigned int *)(a1 + 36) + *(_QWORD *)(a1 + 8); while ( (unsigned long long)v12 < v11 ) { v6 = uint6korr_0(v12); if ( (v6 || !v10) && v6 != 0xFFFFFFFFFFFFLL && v6 != 0x924924924924LL ) { for ( i = 0; i < 0x10; ++i ) { v4 = v6 & 7; if ( ((v6 & 7) == 0 || v4 > 4 && v4 < 7) && v9 ) { v9 = 0; *(_DWORD *)(a1 + 44) = (_DWORD)v12 - *(_QWORD *)(a1 + 8); } if ( v4 <= v13 && ((v6 & 7) == 0 || v4 > 4) && (int)v4 > v8 ) { v8 = v6 & 7; v10 = (long long)v12; v7 = i; if ( v4 == v13 ) goto LABEL_26; } v6 >>= 3; } } v12 = (unsigned int *)((char *)v12 + 6); } if ( v10 ) goto LABEL_26; if ( (unsigned long long)v12 < (unsigned long long)*(unsigned int *)(a1 + 296) + *(_QWORD *)(a1 + 8) ) { v10 = (long long)v12; *(_DWORD *)(a1 + 36) = (_DWORD)v12 - *(_QWORD *)(a1 + 8) + 6; v8 = 0; v7 = 0; LABEL_26: fill_block(a1, a3, v10, v7, v8, 7); return 0; } return 1; }
allocate_tail: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] CALL 0x00142320 MOV dword ptr [RBP + -0x24],EAX MOV qword ptr [RBP + -0x40],0x0 MOV byte ptr [RBP + -0x41],0x1 MOV dword ptr [RBP + -0x48],0xffffffff MOV EAX,dword ptr [RBP + -0x4c] MOV dword ptr [RBP + -0x4c],EAX JMP 0x0014212d LAB_0014212d: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x2c] MOV ECX,0x6 XOR EDX,EDX DIV ECX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x68] IMUL ECX,ECX,0x6 MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x24] ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX JMP 0x00142173 LAB_00142173: JMP 0x00142175 LAB_00142175: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x38] JNC 0x00142285 MOV RDI,qword ptr [RBP + -0x30] CALL 0x0013f4f0 MOV qword ptr [RBP + -0x58],RAX CMP qword ptr [RBP + -0x58],0x0 JNZ 0x0014219e CMP qword ptr [RBP + -0x40],0x0 JNZ 0x001421be LAB_0014219e: MOV RAX,0xffffffffffff CMP qword ptr [RBP + -0x58],RAX JZ 0x001421be MOV RAX,0x924924924924 CMP qword ptr [RBP + -0x58],RAX JNZ 0x001421c3 LAB_001421be: JMP 0x00142274 LAB_001421c3: MOV dword ptr [RBP + -0x5c],0x0 LAB_001421ca: CMP dword ptr [RBP + -0x5c],0x10 JNC 0x00142272 MOV RAX,qword ptr [RBP + -0x58] AND RAX,0x7 MOV dword ptr [RBP + -0x60],EAX CMP dword ptr [RBP + -0x60],0x0 JZ 0x001421f1 CMP dword ptr [RBP + -0x60],0x4 JBE 0x00142215 CMP dword ptr [RBP + -0x60],0x7 JNC 0x00142215 LAB_001421f1: CMP byte ptr [RBP + -0x41],0x0 JZ 0x00142213 MOV byte ptr [RBP + -0x41],0x0 MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x8] SUB RAX,RCX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x2c],ECX LAB_00142213: JMP 0x00142215 LAB_00142215: MOV EAX,dword ptr [RBP + -0x60] CMP EAX,dword ptr [RBP + -0x24] JA 0x00142256 CMP dword ptr [RBP + -0x60],0x0 JZ 0x00142229 CMP dword ptr [RBP + -0x60],0x4 JBE 0x00142256 LAB_00142229: MOV EAX,dword ptr [RBP + -0x60] CMP EAX,dword ptr [RBP + -0x48] JLE 0x00142254 MOV EAX,dword ptr [RBP + -0x60] MOV dword ptr [RBP + -0x48],EAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x40],RAX MOV EAX,dword ptr [RBP + -0x5c] MOV dword ptr [RBP + -0x4c],EAX MOV EAX,dword ptr [RBP + -0x60] CMP EAX,dword ptr [RBP + -0x24] JNZ 0x00142252 JMP 0x001422eb LAB_00142252: JMP 0x00142254 LAB_00142254: JMP 0x00142256 LAB_00142256: JMP 0x00142258 LAB_00142258: MOV EAX,dword ptr [RBP + -0x5c] ADD EAX,0x1 MOV dword ptr [RBP + -0x5c],EAX MOV RAX,qword ptr [RBP + -0x58] SHR RAX,0x3 MOV qword ptr [RBP + -0x58],RAX JMP 0x001421ca LAB_00142272: JMP 0x00142274 LAB_00142274: MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x6 MOV qword ptr [RBP + -0x30],RAX JMP 0x00142175 LAB_00142285: CMP qword ptr [RBP + -0x40],0x0 JNZ 0x001422e9 MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x8] MOV RDX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RDX + 0x128] ADD RCX,RDX CMP RAX,RCX JC 0x001422b2 JMP 0x001422ac LAB_001422ac: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014230d LAB_001422b2: JMP 0x001422b4 LAB_001422b4: JMP 0x001422b6 LAB_001422b6: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x8] SUB RAX,RCX MOV ECX,EAX ADD ECX,0x6 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x24],ECX JMP 0x001422db LAB_001422db: MOV dword ptr [RBP + -0x48],0x0 MOV dword ptr [RBP + -0x4c],0x0 LAB_001422e9: JMP 0x001422eb LAB_001422eb: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RBP + -0x4c] MOV R8D,dword ptr [RBP + -0x48] MOV R9D,0x7 CALL 0x00141790 MOV byte ptr [RBP + -0x1],0x0 LAB_0014230d: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x70 POP RBP RET
int1 allocate_tail(long param_1,int4 param_2,int8 param_3) { uint uVar1; long lVar2; bool bVar3; uint uVar4; uint uVar5; uint local_64; ulong local_60; uint local_54; uint local_50; ulong local_48; ulong local_38; uVar4 = size_to_tail_pattern(param_1,param_2); local_48 = 0; bVar3 = true; local_50 = 0xffffffff; lVar2 = *(long *)(param_1 + 8); uVar1 = *(uint *)(param_1 + 0x24); for (local_38 = *(long *)(param_1 + 8) + (ulong)((*(uint *)(param_1 + 0x2c) / 6) * 6); local_38 < lVar2 + (ulong)uVar1; local_38 = local_38 + 6) { local_60 = uint6korr(local_38); if ((((local_60 != 0) || (local_48 == 0)) && (local_60 != 0xffffffffffff)) && (local_60 != 0x924924924924)) { for (local_64 = 0; local_64 < 0x10; local_64 = local_64 + 1) { uVar5 = (uint)local_60 & 7; if ((((local_60 & 7) == 0) || ((4 < uVar5 && (uVar5 < 7)))) && (bVar3)) { bVar3 = false; *(int *)(param_1 + 0x2c) = (int)local_38 - (int)*(int8 *)(param_1 + 8); } if (((uVar5 <= uVar4) && (((local_60 & 7) == 0 || (4 < uVar5)))) && ((int)local_50 < (int)uVar5)) { local_48 = local_38; local_54 = local_64; local_50 = uVar5; if (uVar5 == uVar4) goto LAB_001422eb; } local_60 = local_60 >> 3; } } } if (local_48 == 0) { if (*(long *)(param_1 + 8) + (ulong)*(uint *)(param_1 + 0x128) <= local_38) { return 1; } local_48 = local_38; *(int *)(param_1 + 0x24) = ((int)local_38 - (int)*(int8 *)(param_1 + 8)) + 6; local_50 = 0; local_54 = 0; } LAB_001422eb: fill_block(param_1,param_3,local_48,local_54,local_50,7); return 0; }
17,920
init_partitioned_key_cache
eloqsql/mysys/mf_keycache.c
static int init_partitioned_key_cache(PARTITIONED_KEY_CACHE_CB *keycache, uint key_cache_block_size, size_t use_mem, uint division_limit, uint age_threshold, uint changed_blocks_hash_size) { int i; size_t mem_per_cache; size_t mem_decr; int cnt; SIMPLE_KEY_CACHE_CB *partition; SIMPLE_KEY_CACHE_CB **partition_ptr; uint partitions= keycache->partitions; int blocks= 0; DBUG_ENTER("partitioned_init_key_cache"); keycache->key_cache_block_size = key_cache_block_size; if (keycache->key_cache_inited) partition_ptr= keycache->partition_array; else { if(!(partition_ptr= (SIMPLE_KEY_CACHE_CB **) my_malloc(key_memory_KEY_CACHE, sizeof(SIMPLE_KEY_CACHE_CB *) * partitions, MYF(MY_WME)))) DBUG_RETURN(-1); bzero(partition_ptr, sizeof(SIMPLE_KEY_CACHE_CB *) * partitions); keycache->partition_array= partition_ptr; } mem_per_cache = use_mem / partitions; mem_decr= mem_per_cache / 5; for (i= 0; i < (int) partitions; i++) { my_bool key_cache_inited= keycache->key_cache_inited; if (key_cache_inited) partition= *partition_ptr; else { if (!(partition= (SIMPLE_KEY_CACHE_CB *) my_malloc(key_memory_KEY_CACHE, sizeof(SIMPLE_KEY_CACHE_CB), MYF(MY_WME)))) continue; partition->key_cache_inited= 0; } cnt= init_simple_key_cache(partition, key_cache_block_size, mem_per_cache, division_limit, age_threshold, changed_blocks_hash_size); if (cnt <= 0) { end_simple_key_cache(partition, 1); if (!key_cache_inited) { my_free(partition); partition= 0; } if ((i == 0 && cnt < 0) || i > 0) { /* Here we have two cases: 1. i == 0 and cnt < 0 cnt < 0 => mem_per_cache is not big enough to allocate minimal number of key blocks in the key cache of the partition. Decrease the the number of the partitions by 1 and start again. 2. i > 0 There is not enough memory for one of the succeeding partitions. Just skip this partition decreasing the number of partitions in the key cache by one. Do not change the value of mem_per_cache in both cases. */ if (key_cache_inited) { my_free(partition); partition= 0; if(key_cache_inited) memmove(partition_ptr, partition_ptr+1, sizeof(partition_ptr)*(partitions-i-1)); } if (!--partitions) break; } else { /* We come here when i == 0 && cnt == 0. cnt == 0 => the memory allocator fails to allocate a block of memory of the size mem_per_cache. Decrease the value of mem_per_cache without changing the current number of partitions and start again. Make sure that such a decrease may happen not more than 5 times in total. */ if (use_mem <= mem_decr) break; use_mem-= mem_decr; } i--; mem_per_cache= use_mem/partitions; continue; } else { blocks+= cnt; *partition_ptr++= partition; } } keycache->partitions= partitions= (uint) (partition_ptr-keycache->partition_array); keycache->key_cache_mem_size= mem_per_cache * partitions; for (i= 0; i < (int) partitions; i++) keycache->partition_array[i]->hash_factor= partitions; keycache->key_cache_inited= 1; if (!partitions) blocks= -1; DBUG_RETURN(blocks); }
O3
c
init_partitioned_key_cache: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movl %r9d, -0x60(%rbp) movl %r8d, -0x5c(%rbp) movl %ecx, -0x58(%rbp) movl 0x1c(%rdi), %r14d movl %esi, -0x54(%rbp) movl %esi, 0x18(%rdi) cmpb $0x0, (%rdi) movq %rdi, -0x38(%rbp) je 0x9a1cc movq %rdi, %r15 movq 0x8(%rdi), %r12 jmp 0x9a211 movq %rdx, %rbx leaq 0xb6e4e2(%rip), %rax # 0xc086b8 movl (%rax), %edi leaq (,%r14,8), %r15 movl $0x10, %edx movq %r15, %rsi callq 0x9f901 testq %rax, %rax je 0x9a3da movq %rax, %r12 movq %rax, %rdi xorl %esi, %esi movq %r15, %rdx callq 0x292c0 movq -0x38(%rbp), %r15 movq %r12, 0x8(%r15) movq %rbx, %rdx xorl %edi, %edi movq %rdx, -0x40(%rbp) movq %rdx, %rax xorl %edx, %edx divq %r14 movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD movq %rax, -0x50(%rbp) mulq %rcx testl %r14d, %r14d jle 0x9a382 shrq $0x2, %rdx movq %rdx, -0x68(%rbp) movq $0x0, -0x48(%rbp) xorl %ebx, %ebx movb (%r15), %r13b testb %r13b, %r13b movq %r12, -0x30(%rbp) je 0x9a25d movq (%r12), %r12 jmp 0x9a284 leaq 0xb6e454(%rip), %rax # 0xc086b8 movl (%rax), %edi movl $0x170, %esi # imm = 0x170 movl $0x10, %edx callq 0x9f901 testq %rax, %rax je 0x9a30e movq %rax, %r12 movb $0x0, (%rax) movq %r12, %rdi movl -0x54(%rbp), %esi movq -0x50(%rbp), %rdx movl -0x58(%rbp), %ecx movl -0x5c(%rbp), %r8d movl -0x60(%rbp), %r9d callq 0x987b9 movl %eax, %r15d testl %eax, %eax jle 0x9a2c7 movq -0x48(%rbp), %rax addl %r15d, %eax movq %rax, -0x48(%rbp) movq -0x30(%rbp), %rax movq %r12, (%rax) movq %rax, %r12 addq $0x8, %r12 movq -0x38(%rbp), %r15 jmp 0x9a36a movq %r12, %rdi movl $0x1, %esi callq 0x996ba testb %r13b, %r13b je 0x9a314 testl %ebx, %ebx sete %al testl %r15d, %r15d setne %cl testl %ebx, %ebx jg 0x9a2ec andb %cl, %al je 0x9a32f movq %r12, %rdi callq 0x9fb2e movq -0x30(%rbp), %rdi leaq 0x8(%rdi), %rsi movl %ebx, %edx notl %edx addl %r14d, %edx shlq $0x3, %rdx callq 0x29120 jmp 0x9a347 movq -0x30(%rbp), %r12 jmp 0x9a36a movq %r12, %rdi callq 0x9fb2e testl %ebx, %ebx sete %al testl %r15d, %r15d setne %cl testl %ebx, %ebx jg 0x9a347 andb %cl, %al jne 0x9a347 movq -0x40(%rbp), %rax subq -0x68(%rbp), %rax movq -0x38(%rbp), %r15 jbe 0x9a3e1 movq -0x30(%rbp), %r12 jmp 0x9a358 decl %r14d movq -0x38(%rbp), %r15 movq -0x40(%rbp), %rax movq -0x30(%rbp), %r12 je 0x9a375 decl %ebx movl %r14d, %ecx movq %rax, -0x40(%rbp) xorl %edx, %edx divq %rcx movq %rax, -0x50(%rbp) incl %ebx cmpl %r14d, %ebx jl 0x9a24b movq %r12, %rcx movq 0x8(%r15), %r12 movq -0x48(%rbp), %rdi jmp 0x9a385 movq %r12, %rcx subq %r12, %rcx shrq $0x3, %rcx movl %ecx, 0x1c(%r15) movl %ecx, %eax imulq -0x50(%rbp), %rax movq %rax, 0x10(%r15) testl %ecx, %ecx jle 0x9a3be movl %ecx, %eax andl $0x7fffffff, %eax # imm = 0x7FFFFFFF xorl %edx, %edx movq 0x8(%r15), %rsi movq (%rsi,%rdx,8), %rsi movl %ecx, 0x164(%rsi) incq %rdx cmpq %rdx, %rax jne 0x9a3a8 movb $0x1, (%r15) xorl %eax, %eax cmpl $0x1, %ecx sbbl %eax, %eax orl %edi, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x9a3cb movq -0x30(%rbp), %r12 jmp 0x9a375
init_partitioned_key_cache: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov [rbp+var_60], r9d mov [rbp+var_5C], r8d mov [rbp+var_58], ecx mov r14d, [rdi+1Ch] mov [rbp+var_54], esi mov [rdi+18h], esi cmp byte ptr [rdi], 0 mov [rbp+var_38], rdi jz short loc_9A1CC mov r15, rdi mov r12, [rdi+8] jmp short loc_9A211 loc_9A1CC: mov rbx, rdx lea rax, key_memory_KEY_CACHE mov edi, [rax] lea r15, ds:0[r14*8] mov edx, 10h mov rsi, r15 call my_malloc test rax, rax jz loc_9A3DA mov r12, rax mov rdi, rax xor esi, esi mov rdx, r15 call _memset mov r15, [rbp+var_38] mov [r15+8], r12 mov rdx, rbx loc_9A211: xor edi, edi mov [rbp+var_40], rdx mov rax, rdx xor edx, edx div r14 mov rcx, 0CCCCCCCCCCCCCCCDh mov [rbp+var_50], rax mul rcx test r14d, r14d jle loc_9A382 shr rdx, 2 mov [rbp+var_68], rdx mov [rbp+var_48], 0 xor ebx, ebx loc_9A24B: mov r13b, [r15] test r13b, r13b mov [rbp+var_30], r12 jz short loc_9A25D mov r12, [r12] jmp short loc_9A284 loc_9A25D: lea rax, key_memory_KEY_CACHE mov edi, [rax] mov esi, 170h mov edx, 10h call my_malloc test rax, rax jz loc_9A30E mov r12, rax mov byte ptr [rax], 0 loc_9A284: mov rdi, r12 mov esi, [rbp+var_54] mov rdx, [rbp+var_50] mov ecx, [rbp+var_58] mov r8d, [rbp+var_5C] mov r9d, [rbp+var_60] call init_simple_key_cache mov r15d, eax test eax, eax jle short loc_9A2C7 mov rax, [rbp+var_48] add eax, r15d mov [rbp+var_48], rax mov rax, [rbp+var_30] mov [rax], r12 mov r12, rax add r12, 8 mov r15, [rbp+var_38] jmp loc_9A36A loc_9A2C7: mov rdi, r12 mov esi, 1 call end_simple_key_cache test r13b, r13b jz short loc_9A314 test ebx, ebx setz al test r15d, r15d setnz cl test ebx, ebx jg short loc_9A2EC and al, cl jz short loc_9A32F loc_9A2EC: mov rdi, r12 call my_free mov rdi, [rbp+var_30] lea rsi, [rdi+8] mov edx, ebx not edx add edx, r14d shl rdx, 3 call _memmove jmp short loc_9A347 loc_9A30E: mov r12, [rbp+var_30] jmp short loc_9A36A loc_9A314: mov rdi, r12 call my_free test ebx, ebx setz al test r15d, r15d setnz cl test ebx, ebx jg short loc_9A347 and al, cl jnz short loc_9A347 loc_9A32F: mov rax, [rbp+var_40] sub rax, [rbp+var_68] mov r15, [rbp+var_38] jbe loc_9A3E1 mov r12, [rbp+var_30] jmp short loc_9A358 loc_9A347: dec r14d mov r15, [rbp+var_38] mov rax, [rbp+var_40] mov r12, [rbp+var_30] jz short loc_9A375 loc_9A358: dec ebx mov ecx, r14d mov [rbp+var_40], rax xor edx, edx div rcx mov [rbp+var_50], rax loc_9A36A: inc ebx cmp ebx, r14d jl loc_9A24B loc_9A375: mov rcx, r12 mov r12, [r15+8] mov rdi, [rbp+var_48] jmp short loc_9A385 loc_9A382: mov rcx, r12 loc_9A385: sub rcx, r12 shr rcx, 3 mov [r15+1Ch], ecx mov eax, ecx imul rax, [rbp+var_50] mov [r15+10h], rax test ecx, ecx jle short loc_9A3BE mov eax, ecx and eax, 7FFFFFFFh xor edx, edx loc_9A3A8: mov rsi, [r15+8] mov rsi, [rsi+rdx*8] mov [rsi+164h], ecx inc rdx cmp rax, rdx jnz short loc_9A3A8 loc_9A3BE: mov byte ptr [r15], 1 xor eax, eax cmp ecx, 1 sbb eax, eax or eax, edi loc_9A3CB: add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_9A3DA: mov eax, 0FFFFFFFFh jmp short loc_9A3CB loc_9A3E1: mov r12, [rbp+var_30] jmp short loc_9A375
long long init_partitioned_key_cache( char *a1, unsigned int a2, unsigned long long a3, unsigned int a4, unsigned int a5, unsigned int a6) { unsigned long long v6; // r14 char *v7; // r15 char **v8; // r12 unsigned long long v9; // rbx long long v10; // rax int v11; // edi unsigned __int128 v12; // rax int v13; // ebx char v14; // r13 char *v15; // r12 char *v16; // rax int inited; // r15d unsigned long long v18; // rax char **v19; // rcx unsigned long long v20; // rcx long long v21; // rdx unsigned long long v23; // [rsp+8h] [rbp-68h] unsigned long long v27; // [rsp+20h] [rbp-50h] int v28; // [rsp+28h] [rbp-48h] unsigned long long v29; // [rsp+30h] [rbp-40h] char **v31; // [rsp+40h] [rbp-30h] v6 = *((unsigned int *)a1 + 7); *((_DWORD *)a1 + 6) = a2; if ( *a1 ) { v7 = a1; v8 = (char **)*((_QWORD *)a1 + 1); } else { v9 = a3; v10 = my_malloc(key_memory_KEY_CACHE, 8 * v6, 16LL); if ( !v10 ) return 0xFFFFFFFFLL; v8 = (char **)v10; memset(v10, 0LL, 8 * v6); v7 = a1; *((_QWORD *)a1 + 1) = v8; a3 = v9; } v11 = 0; v29 = a3; v27 = a3 / v6; v12 = 0xCCCCCCCCCCCCCCCDLL * (unsigned __int128)(a3 / v6); if ( (int)v6 <= 0 ) { v19 = v8; goto LABEL_27; } v23 = *((_QWORD *)&v12 + 1) >> 2; v28 = 0; v13 = 0; while ( 1 ) { v14 = *v7; v31 = v8; if ( *v7 ) { v15 = *v8; } else { v16 = (char *)my_malloc(key_memory_KEY_CACHE, 368LL, 16LL); if ( !v16 ) goto LABEL_24; v15 = v16; *v16 = 0; } inited = init_simple_key_cache(v15, a2, v27, a4, a5, a6); if ( inited <= 0 ) break; v28 += inited; *v31 = v15; v8 = v31 + 1; v7 = a1; LABEL_24: if ( ++v13 >= (int)v6 ) goto LABEL_25; } end_simple_key_cache((long long)v15, 1); if ( v14 ) { if ( v13 > 0 || inited != 0 && v13 == 0 ) { my_free(v15); memmove(v31, v31 + 1, 8LL * (unsigned int)(v6 + ~v13)); goto LABEL_22; } } else { my_free(v15); if ( v13 > 0 || inited != 0 && v13 == 0 ) { LABEL_22: LODWORD(v6) = v6 - 1; v7 = a1; v18 = v29; v8 = v31; if ( !(_DWORD)v6 ) goto LABEL_25; goto LABEL_23; } } v18 = v29 - v23; v7 = a1; if ( v29 > v23 ) { v8 = v31; LABEL_23: --v13; v29 = v18; v27 = v18 / (unsigned int)v6; goto LABEL_24; } v8 = v31; LABEL_25: v19 = v8; v8 = (char **)*((_QWORD *)v7 + 1); v11 = v28; LABEL_27: v20 = (unsigned long long)((char *)v19 - (char *)v8) >> 3; *((_DWORD *)v7 + 7) = v20; *((_QWORD *)v7 + 2) = v27 * (unsigned int)v20; if ( (int)v20 > 0 ) { v21 = 0LL; do *(_DWORD *)(*(_QWORD *)(*((_QWORD *)v7 + 1) + 8 * v21++) + 356LL) = v20; while ( (v20 & 0x7FFFFFFF) != v21 ); } *v7 = 1; return v11 | (unsigned int)-((_DWORD)v20 == 0); }
init_partitioned_key_cache: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV dword ptr [RBP + -0x60],R9D MOV dword ptr [RBP + -0x5c],R8D MOV dword ptr [RBP + -0x58],ECX MOV R14D,dword ptr [RDI + 0x1c] MOV dword ptr [RBP + -0x54],ESI MOV dword ptr [RDI + 0x18],ESI CMP byte ptr [RDI],0x0 MOV qword ptr [RBP + -0x38],RDI JZ 0x0019a1cc MOV R15,RDI MOV R12,qword ptr [RDI + 0x8] JMP 0x0019a211 LAB_0019a1cc: MOV RBX,RDX LEA RAX,[0xd086b8] MOV EDI,dword ptr [RAX] LEA R15,[R14*0x8] MOV EDX,0x10 MOV RSI,R15 CALL 0x0019f901 TEST RAX,RAX JZ 0x0019a3da MOV R12,RAX MOV RDI,RAX XOR ESI,ESI MOV RDX,R15 CALL 0x001292c0 MOV R15,qword ptr [RBP + -0x38] MOV qword ptr [R15 + 0x8],R12 MOV RDX,RBX LAB_0019a211: XOR EDI,EDI MOV qword ptr [RBP + -0x40],RDX MOV RAX,RDX XOR EDX,EDX DIV R14 MOV RCX,-0x3333333333333333 MOV qword ptr [RBP + -0x50],RAX MUL RCX TEST R14D,R14D JLE 0x0019a382 SHR RDX,0x2 MOV qword ptr [RBP + -0x68],RDX MOV qword ptr [RBP + -0x48],0x0 XOR EBX,EBX LAB_0019a24b: MOV R13B,byte ptr [R15] TEST R13B,R13B MOV qword ptr [RBP + -0x30],R12 JZ 0x0019a25d MOV R12,qword ptr [R12] JMP 0x0019a284 LAB_0019a25d: LEA RAX,[0xd086b8] MOV EDI,dword ptr [RAX] MOV ESI,0x170 MOV EDX,0x10 CALL 0x0019f901 TEST RAX,RAX JZ 0x0019a30e MOV R12,RAX MOV byte ptr [RAX],0x0 LAB_0019a284: MOV RDI,R12 MOV ESI,dword ptr [RBP + -0x54] MOV RDX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x58] MOV R8D,dword ptr [RBP + -0x5c] MOV R9D,dword ptr [RBP + -0x60] CALL 0x001987b9 MOV R15D,EAX TEST EAX,EAX JLE 0x0019a2c7 MOV RAX,qword ptr [RBP + -0x48] ADD EAX,R15D MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],R12 MOV R12,RAX ADD R12,0x8 MOV R15,qword ptr [RBP + -0x38] JMP 0x0019a36a LAB_0019a2c7: MOV RDI,R12 MOV ESI,0x1 CALL 0x001996ba TEST R13B,R13B JZ 0x0019a314 TEST EBX,EBX SETZ AL TEST R15D,R15D SETNZ CL TEST EBX,EBX JG 0x0019a2ec AND AL,CL JZ 0x0019a32f LAB_0019a2ec: MOV RDI,R12 CALL 0x0019fb2e MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[RDI + 0x8] MOV EDX,EBX NOT EDX ADD EDX,R14D SHL RDX,0x3 CALL 0x00129120 JMP 0x0019a347 LAB_0019a30e: MOV R12,qword ptr [RBP + -0x30] JMP 0x0019a36a LAB_0019a314: MOV RDI,R12 CALL 0x0019fb2e TEST EBX,EBX SETZ AL TEST R15D,R15D SETNZ CL TEST EBX,EBX JG 0x0019a347 AND AL,CL JNZ 0x0019a347 LAB_0019a32f: MOV RAX,qword ptr [RBP + -0x40] SUB RAX,qword ptr [RBP + -0x68] MOV R15,qword ptr [RBP + -0x38] JBE 0x0019a3e1 MOV R12,qword ptr [RBP + -0x30] JMP 0x0019a358 LAB_0019a347: DEC R14D MOV R15,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x40] MOV R12,qword ptr [RBP + -0x30] JZ 0x0019a375 LAB_0019a358: DEC EBX MOV ECX,R14D MOV qword ptr [RBP + -0x40],RAX XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x50],RAX LAB_0019a36a: INC EBX CMP EBX,R14D JL 0x0019a24b LAB_0019a375: MOV RCX,R12 MOV R12,qword ptr [R15 + 0x8] MOV RDI,qword ptr [RBP + -0x48] JMP 0x0019a385 LAB_0019a382: MOV RCX,R12 LAB_0019a385: SUB RCX,R12 SHR RCX,0x3 MOV dword ptr [R15 + 0x1c],ECX MOV EAX,ECX IMUL RAX,qword ptr [RBP + -0x50] MOV qword ptr [R15 + 0x10],RAX TEST ECX,ECX JLE 0x0019a3be MOV EAX,ECX AND EAX,0x7fffffff XOR EDX,EDX LAB_0019a3a8: MOV RSI,qword ptr [R15 + 0x8] MOV RSI,qword ptr [RSI + RDX*0x8] MOV dword ptr [RSI + 0x164],ECX INC RDX CMP RAX,RDX JNZ 0x0019a3a8 LAB_0019a3be: MOV byte ptr [R15],0x1 XOR EAX,EAX CMP ECX,0x1 SBB EAX,EAX OR EAX,EDI LAB_0019a3cb: ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0019a3da: MOV EAX,0xffffffff JMP 0x0019a3cb LAB_0019a3e1: MOV R12,qword ptr [RBP + -0x30] JMP 0x0019a375
uint init_partitioned_key_cache (char *param_1,int4 param_2,ulong param_3,int4 param_4,int4 param_5 ,int4 param_6) { char cVar1; int iVar2; uint uVar3; int8 *__s; int1 *puVar4; ulong uVar5; ulong uVar6; uint uVar7; int8 *puVar8; uint uVar9; bool bVar10; ulong local_58; ulong local_48; uVar7 = *(uint *)(param_1 + 0x1c); uVar5 = (ulong)uVar7; *(int4 *)(param_1 + 0x18) = param_2; if (*param_1 == '\0') { __s = (int8 *)my_malloc(key_memory_KEY_CACHE,uVar5 * 8,0x10); if (__s == (int8 *)0x0) { return 0xffffffff; } memset(__s,0,uVar5 * 8); *(int8 **)(param_1 + 8) = __s; } else { __s = *(int8 **)(param_1 + 8); } uVar3 = 0; local_58 = param_3 / uVar5; puVar8 = __s; if (0 < (int)uVar7) { uVar6 = local_58 / 5; uVar3 = 0; uVar7 = 0; local_48 = param_3; do { cVar1 = *param_1; if (cVar1 == '\0') { puVar4 = (int1 *)my_malloc(key_memory_KEY_CACHE,0x170,0x10); if (puVar4 != (int1 *)0x0) { *puVar4 = 0; goto LAB_0019a284; } } else { puVar4 = (int1 *)*__s; LAB_0019a284: iVar2 = init_simple_key_cache(puVar4,param_2,local_58,param_4,param_5,param_6); if (iVar2 < 1) { end_simple_key_cache(puVar4,1); if (cVar1 == '\0') { my_free(puVar4); if (((int)uVar7 < 1) && (uVar7 != 0 || iVar2 == 0)) goto LAB_0019a32f; LAB_0019a347: uVar9 = (int)uVar5 - 1; uVar5 = (ulong)uVar9; if (uVar9 == 0) break; } else { if ((0 < (int)uVar7) || (uVar7 == 0 && iVar2 != 0)) { my_free(puVar4); memmove(__s,__s + 1,(ulong)(~uVar7 + (int)uVar5) << 3); goto LAB_0019a347; } LAB_0019a32f: bVar10 = local_48 < uVar6; local_48 = local_48 - uVar6; if (bVar10 || local_48 == 0) break; } uVar7 = uVar7 - 1; local_58 = local_48 / uVar5; } else { uVar3 = uVar3 + iVar2; *__s = puVar4; __s = __s + 1; } } uVar7 = uVar7 + 1; } while ((int)uVar7 < (int)uVar5); puVar8 = *(int8 **)(param_1 + 8); } uVar5 = (ulong)((long)__s - (long)puVar8) >> 3; uVar7 = (uint)uVar5; *(uint *)(param_1 + 0x1c) = uVar7; *(ulong *)(param_1 + 0x10) = (uVar5 & 0xffffffff) * local_58; if (0 < (int)uVar7) { uVar5 = 0; do { *(uint *)(*(long *)(*(long *)(param_1 + 8) + uVar5 * 8) + 0x164) = uVar7; uVar5 = uVar5 + 1; } while ((uVar7 & 0x7fffffff) != uVar5); } *param_1 = '\x01'; return -(uint)(uVar7 == 0) | uVar3; }
17,921
translog_mark_file_finished
eloqsql/storage/maria/ma_loghandler.c
static void translog_mark_file_finished(uint32 file) { int i; struct st_file_counter *UNINIT_VAR(fc_ptr); DBUG_ENTER("translog_mark_file_finished"); DBUG_PRINT("enter", ("file: %lu", (ulong) file)); mysql_mutex_lock(&log_descriptor.unfinished_files_lock); DBUG_ASSERT(log_descriptor.unfinished_files.elements > 0); for (i= 0; i < (int) log_descriptor.unfinished_files.elements; i++) { fc_ptr= dynamic_element(&log_descriptor.unfinished_files, i, struct st_file_counter *); if (fc_ptr->file == file) { break; } } DBUG_ASSERT(i < (int) log_descriptor.unfinished_files.elements); if (! --fc_ptr->counter) delete_dynamic_element(&log_descriptor.unfinished_files, i); mysql_mutex_unlock(&log_descriptor.unfinished_files_lock); DBUG_VOID_RETURN; }
O3
c
translog_mark_file_finished: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movl %edi, %ebx cmpq $0x0, 0xbcbb26(%rip) # 0xc07fc8 jne 0x3c506 leaq 0xbcbadd(%rip), %rdi # 0xc07f88 callq 0x2a220 movl 0xbcbb22(%rip), %esi # 0xc07fd8 movq 0xbcbb13(%rip), %rax # 0xc07fd0 leal -0x1(%rsi), %edx xorl %ecx, %ecx cmpl %ebx, (%rax,%rcx,8) je 0x3c4d4 incq %rcx cmpq %rcx, %rsi jne 0x3c4c2 movq %rdx, %rcx jmp 0x3c4d6 movl %ecx, %esi decl 0x4(%rax,%rcx,8) jne 0x3c4e8 leaq 0xbcbaed(%rip), %rdi # 0xc07fd0 callq 0x94ba5 movq 0xbcbad9(%rip), %rdi # 0xc07fc8 testq %rdi, %rdi jne 0x3c50d leaq 0xbcba8d(%rip), %rdi # 0xc07f88 addq $0x8, %rsp popq %rbx popq %rbp jmp 0x2a1e0 callq 0x2d346 jmp 0x3c4b0 leaq 0x352d44(%rip), %rax # 0x38f258 movq (%rax), %rax callq *0x160(%rax) jmp 0x3c4f4
translog_mark_file_finished: push rbp mov rbp, rsp push rbx push rax mov ebx, edi cmp cs:qword_C07FC8, 0 jnz short loc_3C506 lea rdi, unk_C07F88 call _pthread_mutex_lock loc_3C4B0: mov esi, cs:dword_C07FD8 mov rax, cs:qword_C07FD0 lea edx, [rsi-1] xor ecx, ecx loc_3C4C2: cmp [rax+rcx*8], ebx jz short loc_3C4D4 inc rcx cmp rsi, rcx jnz short loc_3C4C2 mov rcx, rdx jmp short loc_3C4D6 loc_3C4D4: mov esi, ecx loc_3C4D6: dec dword ptr [rax+rcx*8+4] jnz short loc_3C4E8 lea rdi, qword_C07FD0 call delete_dynamic_element loc_3C4E8: mov rdi, cs:qword_C07FC8 test rdi, rdi jnz short loc_3C50D loc_3C4F4: lea rdi, unk_C07F88 add rsp, 8 pop rbx pop rbp jmp _pthread_mutex_unlock loc_3C506: call translog_mark_file_finished_cold_1 jmp short loc_3C4B0 loc_3C50D: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_3C4F4
long long translog_mark_file_finished(long long a1) { long long v1; // rsi long long v2; // rdx long long v3; // rcx if ( qword_C07FC8 ) translog_mark_file_finished_cold_1(a1); else pthread_mutex_lock(&unk_C07F88); v1 = (unsigned int)dword_C07FD8; v2 = (unsigned int)(dword_C07FD8 - 1); v3 = 0LL; while ( *(_DWORD *)(qword_C07FD0 + 8 * v3) != (_DWORD)a1 ) { if ( dword_C07FD8 == ++v3 ) { v3 = (unsigned int)(dword_C07FD8 - 1); goto LABEL_8; } } v1 = (unsigned int)v3; LABEL_8: if ( (*(_DWORD *)(qword_C07FD0 + 8 * v3 + 4))-- == 1 ) delete_dynamic_element(&qword_C07FD0, v1, v2); if ( qword_C07FC8 ) ((void ( *)(long long, long long, long long))PSI_server[44])(qword_C07FC8, v1, v2); return pthread_mutex_unlock(&unk_C07F88); }
translog_mark_file_finished: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV EBX,EDI CMP qword ptr [0x00d07fc8],0x0 JNZ 0x0013c506 LEA RDI,[0xd07f88] CALL 0x0012a220 LAB_0013c4b0: MOV ESI,dword ptr [0x00d07fd8] MOV RAX,qword ptr [0x00d07fd0] LEA EDX,[RSI + -0x1] XOR ECX,ECX LAB_0013c4c2: CMP dword ptr [RAX + RCX*0x8],EBX JZ 0x0013c4d4 INC RCX CMP RSI,RCX JNZ 0x0013c4c2 MOV RCX,RDX JMP 0x0013c4d6 LAB_0013c4d4: MOV ESI,ECX LAB_0013c4d6: DEC dword ptr [RAX + RCX*0x8 + 0x4] JNZ 0x0013c4e8 LEA RDI,[0xd07fd0] CALL 0x00194ba5 LAB_0013c4e8: MOV RDI,qword ptr [0x00d07fc8] TEST RDI,RDI JNZ 0x0013c50d LAB_0013c4f4: LEA RDI,[0xd07f88] ADD RSP,0x8 POP RBX POP RBP JMP 0x0012a1e0 LAB_0013c506: CALL 0x0012d346 JMP 0x0013c4b0 LAB_0013c50d: LEA RAX,[0x48f258] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0013c4f4
void translog_mark_file_finished(int param_1) { int *piVar1; ulong uVar2; ulong uVar3; ulong uVar4; if (DAT_00d07fc8 == 0) { pthread_mutex_lock((pthread_mutex_t *)&DAT_00d07f88); } else { translog_mark_file_finished_cold_1(); } uVar4 = (ulong)DAT_00d07fd8; uVar3 = (ulong)(DAT_00d07fd8 - 1); uVar2 = 0; do { if (*(int *)(DAT_00d07fd0 + uVar2 * 8) == param_1) { uVar4 = uVar2 & 0xffffffff; uVar3 = uVar2; break; } uVar2 = uVar2 + 1; } while (uVar4 != uVar2); piVar1 = (int *)(DAT_00d07fd0 + 4 + uVar3 * 8); *piVar1 = *piVar1 + -1; if (*piVar1 == 0) { delete_dynamic_element(&DAT_00d07fd0,uVar4); } if (DAT_00d07fc8 != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)&DAT_00d07f88); return; }
17,922
fill_uint16
eloqsql/strings/ctype.c
static int fill_uint16(uint16 *a,uint size,const char *str, size_t len) { uint i= 0; const char *s, *b, *e=str+len; for (s=str ; s < e ; i++) { for ( ; (s < e) && strchr(" \t\r\n",s[0]); s++) ; b=s; for ( ; (s < e) && !strchr(" \t\r\n",s[0]); s++) ; if (s == b || i > size) break; a[i]= (uint16) strtol(b,NULL,16); } return 0; }
O0
c
fill_uint16: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movl $0x0, -0x24(%rbp) movq -0x18(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x7c2a8 jmp 0x7c1d2 movq -0x30(%rbp), %rcx xorl %eax, %eax cmpq -0x40(%rbp), %rcx movb %al, -0x41(%rbp) jae 0x7c1fe movq -0x30(%rbp), %rax movsbl (%rax), %esi leaq 0xf369(%rip), %rdi # 0x8b558 callq 0x24100 cmpq $0x0, %rax setne %al movb %al, -0x41(%rbp) movb -0x41(%rbp), %al testb $0x1, %al jne 0x7c207 jmp 0x7c217 jmp 0x7c209 movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) jmp 0x7c1d2 movq -0x30(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rcx xorl %eax, %eax cmpq -0x40(%rbp), %rcx movb %al, -0x42(%rbp) jae 0x7c24d movq -0x30(%rbp), %rax movsbl (%rax), %esi leaq 0xf31c(%rip), %rdi # 0x8b558 callq 0x24100 cmpq $0x0, %rax setne %al xorb $-0x1, %al movb %al, -0x42(%rbp) movb -0x42(%rbp), %al testb $0x1, %al jne 0x7c256 jmp 0x7c266 jmp 0x7c258 movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) jmp 0x7c21f movq -0x30(%rbp), %rax cmpq -0x38(%rbp), %rax je 0x7c278 movl -0x24(%rbp), %eax cmpl -0xc(%rbp), %eax jbe 0x7c27a jmp 0x7c2a8 movq -0x38(%rbp), %rdi xorl %eax, %eax movl %eax, %esi movl $0x10, %edx callq 0x24560 movw %ax, %dx movq -0x8(%rbp), %rax movl -0x24(%rbp), %ecx movw %dx, (%rax,%rcx,2) movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0x7c1c2 xorl %eax, %eax addq $0x50, %rsp popq %rbp retq
fill_uint16: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_24], 0 mov rax, [rbp+var_18] add rax, [rbp+var_20] mov [rbp+var_40], rax mov rax, [rbp+var_18] mov [rbp+var_30], rax loc_7C1C2: mov rax, [rbp+var_30] cmp rax, [rbp+var_40] jnb loc_7C2A8 jmp short $+2 loc_7C1D2: mov rcx, [rbp+var_30] xor eax, eax cmp rcx, [rbp+var_40] mov [rbp+var_41], al jnb short loc_7C1FE mov rax, [rbp+var_30] movsx esi, byte ptr [rax] lea rdi, asc_8B558; " \t\r\n" call _strchr cmp rax, 0 setnz al mov [rbp+var_41], al loc_7C1FE: mov al, [rbp+var_41] test al, 1 jnz short loc_7C207 jmp short loc_7C217 loc_7C207: jmp short $+2 loc_7C209: mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax jmp short loc_7C1D2 loc_7C217: mov rax, [rbp+var_30] mov [rbp+var_38], rax loc_7C21F: mov rcx, [rbp+var_30] xor eax, eax cmp rcx, [rbp+var_40] mov [rbp+var_42], al jnb short loc_7C24D mov rax, [rbp+var_30] movsx esi, byte ptr [rax] lea rdi, asc_8B558; " \t\r\n" call _strchr cmp rax, 0 setnz al xor al, 0FFh mov [rbp+var_42], al loc_7C24D: mov al, [rbp+var_42] test al, 1 jnz short loc_7C256 jmp short loc_7C266 loc_7C256: jmp short $+2 loc_7C258: mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax jmp short loc_7C21F loc_7C266: mov rax, [rbp+var_30] cmp rax, [rbp+var_38] jz short loc_7C278 mov eax, [rbp+var_24] cmp eax, [rbp+var_C] jbe short loc_7C27A loc_7C278: jmp short loc_7C2A8 loc_7C27A: mov rdi, [rbp+var_38] xor eax, eax mov esi, eax mov edx, 10h call ___isoc23_strtol mov dx, ax mov rax, [rbp+var_8] mov ecx, [rbp+var_24] mov [rax+rcx*2], dx mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp loc_7C1C2 loc_7C2A8: xor eax, eax add rsp, 50h pop rbp retn
long long fill_uint16(long long a1, unsigned int a2, char *a3, long long a4) { char v5; // [rsp+Eh] [rbp-42h] bool v6; // [rsp+Fh] [rbp-41h] unsigned long long v7; // [rsp+10h] [rbp-40h] char *v8; // [rsp+18h] [rbp-38h] char *v9; // [rsp+20h] [rbp-30h] unsigned int v10; // [rsp+2Ch] [rbp-24h] v10 = 0; v7 = (unsigned long long)&a3[a4]; v9 = a3; while ( (unsigned long long)v9 < v7 ) { while ( 1 ) { v6 = 0; if ( (unsigned long long)v9 < v7 ) v6 = strchr(" \t\r\n", (unsigned int)*v9) != 0; if ( !v6 ) break; ++v9; } v8 = v9; while ( 1 ) { v5 = 0; if ( (unsigned long long)v9 < v7 ) v5 = ~(strchr(" \t\r\n", (unsigned int)*v9) != 0); if ( (v5 & 1) == 0 ) break; ++v9; } if ( v9 == v8 || v10 > a2 ) break; *(_WORD *)(a1 + 2LL * v10++) = __isoc23_strtol(v8, 0LL, 16LL); } return 0LL; }
fill_uint16: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],0x0 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX LAB_0017c1c2: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x40] JNC 0x0017c2a8 JMP 0x0017c1d2 LAB_0017c1d2: MOV RCX,qword ptr [RBP + -0x30] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x40] MOV byte ptr [RBP + -0x41],AL JNC 0x0017c1fe MOV RAX,qword ptr [RBP + -0x30] MOVSX ESI,byte ptr [RAX] LEA RDI,[0x18b558] CALL 0x00124100 CMP RAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x41],AL LAB_0017c1fe: MOV AL,byte ptr [RBP + -0x41] TEST AL,0x1 JNZ 0x0017c207 JMP 0x0017c217 LAB_0017c207: JMP 0x0017c209 LAB_0017c209: MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX JMP 0x0017c1d2 LAB_0017c217: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x38],RAX LAB_0017c21f: MOV RCX,qword ptr [RBP + -0x30] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x40] MOV byte ptr [RBP + -0x42],AL JNC 0x0017c24d MOV RAX,qword ptr [RBP + -0x30] MOVSX ESI,byte ptr [RAX] LEA RDI,[0x18b558] CALL 0x00124100 CMP RAX,0x0 SETNZ AL XOR AL,0xff MOV byte ptr [RBP + -0x42],AL LAB_0017c24d: MOV AL,byte ptr [RBP + -0x42] TEST AL,0x1 JNZ 0x0017c256 JMP 0x0017c266 LAB_0017c256: JMP 0x0017c258 LAB_0017c258: MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX JMP 0x0017c21f LAB_0017c266: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x38] JZ 0x0017c278 MOV EAX,dword ptr [RBP + -0x24] CMP EAX,dword ptr [RBP + -0xc] JBE 0x0017c27a LAB_0017c278: JMP 0x0017c2a8 LAB_0017c27a: MOV RDI,qword ptr [RBP + -0x38] XOR EAX,EAX MOV ESI,EAX MOV EDX,0x10 CALL 0x00124560 MOV DX,AX MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x24] MOV word ptr [RAX + RCX*0x2],DX MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x0017c1c2 LAB_0017c2a8: XOR EAX,EAX ADD RSP,0x50 POP RBP RET
int8 fill_uint16(long param_1,uint param_2,char *param_3,long param_4) { char *pcVar1; int2 uVar2; char *pcVar3; char *pcVar4; bool bVar5; char *local_38; uint local_2c; local_2c = 0; pcVar3 = param_3 + param_4; local_38 = param_3; while( true ) { if (pcVar3 <= local_38) { return 0; } while( true ) { pcVar1 = local_38; bVar5 = false; if (local_38 < pcVar3) { pcVar4 = strchr(" \t\r\n",(int)*local_38); bVar5 = pcVar4 != (char *)0x0; } if (!bVar5) break; local_38 = local_38 + 1; } while( true ) { bVar5 = false; if (local_38 < pcVar3) { pcVar4 = strchr(" \t\r\n",(int)*local_38); bVar5 = pcVar4 == (char *)0x0; } if (!bVar5) break; local_38 = local_38 + 1; } if (local_38 == pcVar1) break; if (param_2 < local_2c) { return 0; } uVar2 = __isoc23_strtol(pcVar1,0,0x10); *(int2 *)(param_1 + (ulong)local_2c * 2) = uVar2; local_2c = local_2c + 1; } return 0; }
17,923
long minja::Value::get<long>() const
monkey531[P]llama/common/minja.hpp
T get() const { if (is_primitive()) return primitive_.get<T>(); throw std::runtime_error("get<T> not defined for this value type: " + dump()); }
O1
cpp
long minja::Value::get<long>() const: pushq %rbp pushq %r14 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 cmpq $0x0, 0x10(%rdi) jne 0x75ea1 cmpq $0x0, 0x20(%r14) jne 0x75ea1 cmpq $0x0, 0x30(%r14) jne 0x75ea1 addq $0x40, %r14 movq %rsp, %rbx movl $0x0, (%rbx) movq %r14, %rdi movq %rbx, %rsi callq 0x50ee6 movl (%rbx), %eax addq $0x40, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x10, %edi callq 0x19370 movq %rax, %rbx leaq 0x20(%rsp), %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x6c964 leaq 0x47ff1(%rip), %rsi # 0xbdeba movq %rsp, %rdi leaq 0x20(%rsp), %rdx callq 0x3779b movb $0x1, %bpl movq %rsp, %rsi movq %rbx, %rdi callq 0x19ac0 xorl %ebp, %ebp movq 0x790fb(%rip), %rsi # 0xeefe8 movq 0x79074(%rip), %rdx # 0xeef68 movq %rbx, %rdi callq 0x19b70 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x75f22 movq 0x10(%rsp), %rsi incq %rsi callq 0x196b0 jmp 0x75f22 movq %rax, %r14 movb $0x1, %bpl leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x75f45 movq 0x30(%rsp), %rsi incq %rsi callq 0x196b0 jmp 0x75f45 movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0x75f52 movq %rbx, %rdi callq 0x19510 movq %r14, %rdi callq 0x19be0
_ZNK5minja5Value3getIiEET_v: push rbp push r14 push rbx sub rsp, 40h mov r14, rdi cmp qword ptr [rdi+10h], 0 jnz short loc_75EA1 cmp qword ptr [r14+20h], 0 jnz short loc_75EA1 cmp qword ptr [r14+30h], 0 jnz short loc_75EA1 add r14, 40h ; '@' mov rbx, rsp mov dword ptr [rbx], 0 mov rdi, r14 mov rsi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_ mov eax, [rbx] add rsp, 40h pop rbx pop r14 pop rbp retn loc_75EA1: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+58h+var_38] mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aGetTNotDefined; "get<T> not defined for this value type:"... mov rdi, rsp lea rdx, [rsp+58h+var_38] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 mov rsi, rsp mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+58h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_75F22 mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_75F22 mov r14, rax mov bpl, 1 loc_75F22: lea rax, [rsp+58h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_75F45 mov rsi, [rsp+58h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_75F45 mov r14, rax mov bpl, 1 loc_75F45: test bpl, bpl jz short loc_75F52 mov rdi, rbx; void * call ___cxa_free_exception loc_75F52: mov rdi, r14 call __Unwind_Resume
long long minja::Value::get<int>(long long a1) { void *exception; // rbx _DWORD v3[4]; // [rsp+0h] [rbp-58h] BYREF _BYTE v4[16]; // [rsp+20h] [rbp-38h] BYREF if ( *(_QWORD *)(a1 + 16) || *(_QWORD *)(a1 + 32) || *(_QWORD *)(a1 + 48) ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v4, a1, 0xFFFFFFFF, 0); std::operator+<char>((long long)v3, (long long)"get<T> not defined for this value type: ", (long long)v4); std::runtime_error::runtime_error(exception, v3); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v3[0] = 0; ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_( (unsigned __int8 *)(a1 + 64), v3); return v3[0]; }
get<int>: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RDI CMP qword ptr [RDI + 0x10],0x0 JNZ 0x00175ea1 CMP qword ptr [R14 + 0x20],0x0 JNZ 0x00175ea1 CMP qword ptr [R14 + 0x30],0x0 JNZ 0x00175ea1 ADD R14,0x40 MOV RBX,RSP MOV dword ptr [RBX],0x0 MOV RDI,R14 MOV RSI,RBX CALL 0x00150ee6 MOV EAX,dword ptr [RBX] ADD RSP,0x40 POP RBX POP R14 POP RBP RET LAB_00175ea1: MOV EDI,0x10 CALL 0x00119370 MOV RBX,RAX LAB_00175eae: LEA RDI,[RSP + 0x20] MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x0016c964 LAB_00175ec2: LEA RSI,[0x1bdeba] MOV RDI,RSP LEA RDX,[RSP + 0x20] CALL 0x0013779b MOV BPL,0x1 LAB_00175ed9: MOV RSI,RSP MOV RDI,RBX CALL 0x00119ac0 XOR EBP,EBP MOV RSI,qword ptr [0x001eefe8] MOV RDX,qword ptr [0x001eef68] MOV RDI,RBX CALL 0x00119b70
/* int minja::Value::get<int>() const */ int __thiscall minja::Value::get<int>(Value *this) { runtime_error *this_00; int local_58 [8]; int1 local_38 [32]; if (((*(long *)(this + 0x10) == 0) && (*(long *)(this + 0x20) == 0)) && (*(long *)(this + 0x30) == 0)) { local_58[0] = 0; _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_ (this + 0x40,local_58); return local_58[0]; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00175eae to 00175ec1 has its CatchHandler @ 00175f3f */ dump_abi_cxx11_((int)local_38,SUB81(this,0)); /* try { // try from 00175ec2 to 00175ed5 has its CatchHandler @ 00175f1c */ std::operator+((char *)local_58,(string *)"get<T> not defined for this value type: "); /* try { // try from 00175ed9 to 00175efb has its CatchHandler @ 00175efc */ std::runtime_error::runtime_error(this_00,(string *)local_58); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_001eefe8,PTR__runtime_error_001eef68); }
17,924
long minja::Value::get<long>() const
monkey531[P]llama/common/minja.hpp
T get() const { if (is_primitive()) return primitive_.get<T>(); throw std::runtime_error("get<T> not defined for this value type: " + dump()); }
O2
cpp
long minja::Value::get<long>() const: pushq %rbp pushq %r14 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 callq 0x5feb6 testb %al, %al je 0x5fd36 addq $0x40, %r14 movq %r14, %rdi addq $0x40, %rsp popq %rbx popq %r14 popq %rbp jmp 0x5ff40 pushq $0x10 popq %rdi callq 0x213a0 movq %rax, %rbx movq %rsp, %rdi pushq $-0x1 popq %rdx movq %r14, %rsi xorl %ecx, %ecx callq 0x5fec6 leaq 0x3d1a2(%rip), %rsi # 0x9cefa leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x368bc movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x21ae0 xorl %ebp, %ebp movq 0x7c26a(%rip), %rsi # 0xdbfe8 movq 0x7c1e3(%rip), %rdx # 0xdbf68 movq %rbx, %rdi callq 0x21b70 movq %rax, %r14 leaq 0x20(%rsp), %rdi callq 0x21dc8 jmp 0x5fda2 movq %rax, %r14 movb $0x1, %bpl movq %rsp, %rdi callq 0x21dc8 testb %bpl, %bpl jne 0x5fdb4 jmp 0x5fdbc movq %rax, %r14 movq %rbx, %rdi callq 0x21530 movq %r14, %rdi callq 0x21be0
_ZNK5minja5Value3getIlEET_v: push rbp push r14 push rbx sub rsp, 40h mov r14, rdi call _ZNK5minja5Value12is_primitiveEv; minja::Value::is_primitive(void) test al, al jz short loc_5FD36 add r14, 40h ; '@' mov rdi, r14 add rsp, 40h pop rbx pop r14 pop rbp jmp _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIlTnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE loc_5FD36: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, rsp push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, r14 xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aGetTNotDefined; "get<T> not defined for this value type:"... lea rdi, [rsp+58h+var_38] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+58h+var_38] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+58h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_5FDA2 mov r14, rax mov bpl, 1 loc_5FDA2: mov rdi, rsp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_5FDB4 jmp short loc_5FDBC mov r14, rax loc_5FDB4: mov rdi, rbx; void * call ___cxa_free_exception loc_5FDBC: mov rdi, r14 call __Unwind_Resume
long long minja::Value::get<long>(minja::Value *a1) { void *exception; // rbx int v3; // r8d int v4; // r9d char v5[32]; // [rsp+0h] [rbp-58h] BYREF _BYTE v6[56]; // [rsp+20h] [rbp-38h] BYREF if ( !(unsigned __int8)minja::Value::is_primitive(a1) ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((unsigned int)v5, (_DWORD)a1, -1, 0, v3, v4, v5[0]); std::operator+<char>((long long)v6, (long long)"get<T> not defined for this value type: ", (long long)v5); std::runtime_error::runtime_error(exception, v6); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIlTnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE((char *)a1 + 64); }
get<long>: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RDI CALL 0x0015feb6 TEST AL,AL JZ 0x0015fd36 ADD R14,0x40 MOV RDI,R14 ADD RSP,0x40 POP RBX POP R14 POP RBP JMP 0x0015ff40 LAB_0015fd36: PUSH 0x10 POP RDI CALL 0x001213a0 MOV RBX,RAX LAB_0015fd41: MOV RDI,RSP PUSH -0x1 POP RDX MOV RSI,R14 XOR ECX,ECX CALL 0x0015fec6 LAB_0015fd51: LEA RSI,[0x19cefa] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x001368bc MOV BPL,0x1 LAB_0015fd68: LEA RSI,[RSP + 0x20] MOV RDI,RBX CALL 0x00121ae0 XOR EBP,EBP MOV RSI,qword ptr [0x001dbfe8] MOV RDX,qword ptr [0x001dbf68] MOV RDI,RBX CALL 0x00121b70
/* long minja::Value::get<long>() const */ long __thiscall minja::Value::get<long>(Value *this) { runtime_error *this_00; long lVar1; char cVar2; int1 auStack_58 [32]; string local_38 [32]; cVar2 = is_primitive(this); if (cVar2 != '\0') { lVar1 = _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIlTnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE (this + 0x40); return lVar1; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0015fd41 to 0015fd50 has its CatchHandler @ 0015fdb1 */ dump_abi_cxx11_((int)auStack_58,SUB81(this,0)); /* try { // try from 0015fd51 to 0015fd64 has its CatchHandler @ 0015fd9c */ std::operator+((char *)local_38,(string *)"get<T> not defined for this value type: "); /* try { // try from 0015fd68 to 0015fd8c has its CatchHandler @ 0015fd8d */ std::runtime_error::runtime_error(this_00,local_38); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_001dbfe8,PTR__runtime_error_001dbf68); }
17,925
Catch::TextFlow::Columns::iterator::operator++()
AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp
Columns::iterator& Columns::iterator::operator++() { for ( size_t i = 0; i < m_columns.size(); ++i ) { if ( m_iterators[i] != m_columns[i].end() ) { ++m_iterators[i]; } } return *this; }
O3
cpp
Catch::TextFlow::Columns::iterator::operator++(): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdi, %rbx movq (%rdi), %rax movq (%rax), %rcx cmpq %rcx, 0x8(%rax) je 0x63db4 xorl %r14d, %r14d movabsq $0x6db6db6db6db6db7, %r15 # imm = 0x6DB6DB6DB6DB6DB7 xorl %r12d, %r12d xorl %r13d, %r13d movq 0x8(%rbx), %rdi movq 0x8(%rdi,%r12), %rdx cmpq 0x8(%rcx,%r14), %rdx jne 0x63d87 leaq (%rcx,%r14), %rdx cmpq (%rdi,%r12), %rdx je 0x63d95 addq %r12, %rdi callq 0x63928 movq (%rbx), %rax movq (%rax), %rcx incq %r13 movq 0x8(%rax), %rdx subq %rcx, %rdx sarq $0x3, %rdx imulq %r15, %rdx addq $0x28, %r12 addq $0x38, %r14 cmpq %rdx, %r13 jb 0x63d6d movq %rbx, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq nop
_ZN5Catch8TextFlow7Columns8iteratorppEv: push r15 push r14 push r13 push r12 push rbx mov rbx, rdi mov rax, [rdi] mov rcx, [rax] cmp [rax+8], rcx jz short loc_63DB4 xor r14d, r14d mov r15, 6DB6DB6DB6DB6DB7h xor r12d, r12d xor r13d, r13d loc_63D6D: mov rdi, [rbx+8] mov rdx, [rdi+r12+8] cmp rdx, [rcx+r14+8] jnz short loc_63D87 lea rdx, [rcx+r14] cmp rdx, [rdi+r12] jz short loc_63D95 loc_63D87: add rdi, r12; this call _ZN5Catch8TextFlow6Column14const_iteratorppEv; Catch::TextFlow::Column::const_iterator::operator++(void) mov rax, [rbx] mov rcx, [rax] loc_63D95: inc r13 mov rdx, [rax+8] sub rdx, rcx sar rdx, 3 imul rdx, r15 add r12, 28h ; '(' add r14, 38h ; '8' cmp r13, rdx jb short loc_63D6D loc_63DB4: mov rax, rbx pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long ** Catch::TextFlow::Columns::iterator::operator++(long long **a1) { long long *v2; // rax long long v3; // rcx long long v4; // r14 long long v5; // r12 unsigned long long v6; // r13 long long *v7; // rdi v2 = *a1; v3 = **a1; if ( (*a1)[1] != v3 ) { v4 = 0LL; v5 = 0LL; v6 = 0LL; do { v7 = a1[1]; if ( v7[v5 + 1] != *(_QWORD *)(v3 + v4 + 8) || v3 + v4 != v7[v5] ) { Catch::TextFlow::Column::const_iterator::operator++((Catch::TextFlow::Column::const_iterator *)&v7[v5]); v2 = *a1; v3 = **a1; } ++v6; v5 += 5LL; v4 += 56LL; } while ( v6 < 0x6DB6DB6DB6DB6DB7LL * ((v2[1] - v3) >> 3) ); } return a1; }
operator++: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV RBX,RDI MOV RAX,qword ptr [RDI] MOV RCX,qword ptr [RAX] CMP qword ptr [RAX + 0x8],RCX JZ 0x00163db4 XOR R14D,R14D MOV R15,0x6db6db6db6db6db7 XOR R12D,R12D XOR R13D,R13D LAB_00163d6d: MOV RDI,qword ptr [RBX + 0x8] MOV RDX,qword ptr [RDI + R12*0x1 + 0x8] CMP RDX,qword ptr [RCX + R14*0x1 + 0x8] JNZ 0x00163d87 LEA RDX,[RCX + R14*0x1] CMP RDX,qword ptr [RDI + R12*0x1] JZ 0x00163d95 LAB_00163d87: ADD RDI,R12 CALL 0x00163928 MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RAX] LAB_00163d95: INC R13 MOV RDX,qword ptr [RAX + 0x8] SUB RDX,RCX SAR RDX,0x3 IMUL RDX,R15 ADD R12,0x28 ADD R14,0x38 CMP R13,RDX JC 0x00163d6d LAB_00163db4: MOV RAX,RBX POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* Catch::TextFlow::Columns::iterator::TEMPNAMEPLACEHOLDERVALUE() */ iterator * __thiscall Catch::TextFlow::Columns::iterator::operator++(iterator *this) { long lVar1; long *plVar2; long lVar3; long lVar4; ulong uVar5; long lVar6; plVar2 = *(long **)this; lVar3 = *plVar2; if (plVar2[1] != lVar3) { lVar6 = 0; lVar4 = 0; uVar5 = 0; do { lVar1 = *(long *)(this + 8); if ((*(long *)(lVar1 + 8 + lVar4) != *(long *)(lVar3 + 8 + lVar6)) || (lVar3 + lVar6 != *(long *)(lVar1 + lVar4))) { Column::const_iterator::operator++((const_iterator *)(lVar1 + lVar4)); plVar2 = *(long **)this; lVar3 = *plVar2; } uVar5 = uVar5 + 1; lVar4 = lVar4 + 0x28; lVar6 = lVar6 + 0x38; } while (uVar5 < (ulong)((plVar2[1] - lVar3 >> 3) * 0x6db6db6db6db6db7)); } return this; }
17,926
ma_zlib_decompress
eloqsql/libmariadb/plugins/compress/c_zlib.c
my_bool ma_zlib_decompress(ma_compress_ctx *ctx, void *dst, size_t *dst_len, void *source, size_t *source_len) { int rc; if (!ctx) return 1; rc= uncompress((Bytef*) dst, (uLongf *)dst_len, (Bytef*) source, (uLongf)*source_len); if (rc != Z_OK) return 1; return 0; }
O0
c
ma_zlib_decompress: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) cmpq $0x0, -0x10(%rbp) jne 0x9bb29 movb $0x1, -0x1(%rbp) jmp 0x9bb54 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rax movq (%rax), %rcx callq 0x3bba0 movl %eax, -0x34(%rbp) cmpl $0x0, -0x34(%rbp) je 0x9bb50 movb $0x1, -0x1(%rbp) jmp 0x9bb54 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x40, %rsp popq %rbp retq nopl (%rax)
ma_zlib_decompress: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 cmp [rbp+var_10], 0 jnz short loc_9BB29 mov [rbp+var_1], 1 jmp short loc_9BB54 loc_9BB29: mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rax, [rbp+var_30] mov rcx, [rax] call _uncompress mov [rbp+var_34], eax cmp [rbp+var_34], 0 jz short loc_9BB50 mov [rbp+var_1], 1 jmp short loc_9BB54 loc_9BB50: mov [rbp+var_1], 0 loc_9BB54: mov al, [rbp+var_1] add rsp, 40h pop rbp retn
bool ma_zlib_decompress(long long a1, long long a2, long long a3, long long a4, _QWORD *a5) { return !a1 || (unsigned int)uncompress(a2, a3, a4, *a5) != 0; }
ma_zlib_decompress: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 CMP qword ptr [RBP + -0x10],0x0 JNZ 0x0019bb29 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0019bb54 LAB_0019bb29: MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RAX] CALL 0x0013bba0 MOV dword ptr [RBP + -0x34],EAX CMP dword ptr [RBP + -0x34],0x0 JZ 0x0019bb50 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0019bb54 LAB_0019bb50: MOV byte ptr [RBP + -0x1],0x0 LAB_0019bb54: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x40 POP RBP RET
int1 ma_zlib_decompress(long param_1,int8 param_2,int8 param_3,int8 param_4, int8 *param_5) { int iVar1; int1 local_9; if (param_1 == 0) { local_9 = 1; } else { iVar1 = uncompress(param_2,param_3,param_4,*param_5); if (iVar1 == 0) { local_9 = 0; } else { local_9 = 1; } } return local_9; }
17,927
ma_feof
eloqsql/libmariadb/libmariadb/ma_io.c
int ma_feof(MA_FILE *file) { if (!file) return -1; switch (file->type) { case MA_FILE_LOCAL: return feof((FILE *)file->ptr); break; #ifdef HAVE_REMOTEIO case MA_FILE_REMOTE: return rio_plugin->methods->mfeof(file); break; #endif default: return -1; } }
O0
c
ma_feof: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) jne 0x3c19c movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x3c1ec movq -0x10(%rbp), %rax movl (%rax), %eax movl %eax, -0x14(%rbp) subl $0x1, %eax je 0x3c1b6 jmp 0x3c1ac movl -0x14(%rbp), %eax subl $0x2, %eax je 0x3c1c8 jmp 0x3c1e5 movq -0x10(%rbp), %rax movq 0x8(%rax), %rdi callq 0x136a0 movl %eax, -0x4(%rbp) jmp 0x3c1ec leaq 0x2cea1(%rip), %rax # 0x69070 movq (%rax), %rax movq 0x58(%rax), %rax movq 0x10(%rax), %rax movq -0x10(%rbp), %rdi callq *%rax movl %eax, -0x4(%rbp) jmp 0x3c1ec movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_feof: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi cmp [rbp+var_10], 0 jnz short loc_3C19C mov [rbp+var_4], 0FFFFFFFFh jmp short loc_3C1EC loc_3C19C: mov rax, [rbp+var_10] mov eax, [rax] mov [rbp+var_14], eax sub eax, 1 jz short loc_3C1B6 jmp short $+2 loc_3C1AC: mov eax, [rbp+var_14] sub eax, 2 jz short loc_3C1C8 jmp short loc_3C1E5 loc_3C1B6: mov rax, [rbp+var_10] mov rdi, [rax+8] call _feof mov [rbp+var_4], eax jmp short loc_3C1EC loc_3C1C8: lea rax, rio_plugin mov rax, [rax] mov rax, [rax+58h] mov rax, [rax+10h] mov rdi, [rbp+var_10] call rax mov [rbp+var_4], eax jmp short loc_3C1EC loc_3C1E5: mov [rbp+var_4], 0FFFFFFFFh loc_3C1EC: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long ma_feof(long long a1) { if ( a1 ) { if ( *(_DWORD *)a1 == 1 ) { return (unsigned int)feof(*(_QWORD *)(a1 + 8)); } else if ( *(_DWORD *)a1 == 2 ) { return (unsigned int)(*(long long ( **)(long long))(*(_QWORD *)(rio_plugin + 88LL) + 16LL))(a1); } else { return (unsigned int)-1; } } else { return (unsigned int)-1; } }
ma_feof: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI CMP qword ptr [RBP + -0x10],0x0 JNZ 0x0013c19c MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0013c1ec LAB_0013c19c: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x14],EAX SUB EAX,0x1 JZ 0x0013c1b6 JMP 0x0013c1ac LAB_0013c1ac: MOV EAX,dword ptr [RBP + -0x14] SUB EAX,0x2 JZ 0x0013c1c8 JMP 0x0013c1e5 LAB_0013c1b6: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x8] CALL 0x001136a0 MOV dword ptr [RBP + -0x4],EAX JMP 0x0013c1ec LAB_0013c1c8: LEA RAX,[0x169070] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x58] MOV RAX,qword ptr [RAX + 0x10] MOV RDI,qword ptr [RBP + -0x10] CALL RAX MOV dword ptr [RBP + -0x4],EAX JMP 0x0013c1ec LAB_0013c1e5: MOV dword ptr [RBP + -0x4],0xffffffff LAB_0013c1ec: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int ma_feof(int *param_1) { int local_c; if (param_1 == (int *)0x0) { local_c = -1; } else if (*param_1 == 1) { local_c = feof(*(FILE **)(param_1 + 2)); } else if (*param_1 == 2) { local_c = (**(code **)(*(long *)(rio_plugin + 0x58) + 0x10))(param_1); } else { local_c = -1; } return local_c; }
17,928
translog_read_record_header_scan
eloqsql/storage/maria/ma_loghandler.c
int translog_read_record_header_scan(TRANSLOG_SCANNER_DATA *scanner, TRANSLOG_HEADER_BUFFER *buff, my_bool move_scanner) { translog_size_t res; DBUG_ENTER("translog_read_record_header_scan"); DBUG_PRINT("enter", ("Scanner: Cur: " LSN_FMT " Hrz: " LSN_FMT " " "Lst: " LSN_FMT " Offset: %u(%x) fixed %d", LSN_IN_PARTS(scanner->page_addr), LSN_IN_PARTS(scanner->horizon), LSN_IN_PARTS(scanner->last_file_page), (uint) scanner->page_offset, (uint) scanner->page_offset, scanner->fixed_horizon)); DBUG_ASSERT(translog_status == TRANSLOG_OK || translog_status == TRANSLOG_READONLY); buff->groups_no= 0; buff->lsn= scanner->page_addr; buff->lsn+= scanner->page_offset; /* offset increasing */ res= translog_read_record_header_from_buffer(scanner->page, scanner->page_offset, buff, (move_scanner ? scanner : 0)); DBUG_RETURN(res); }
O0
c
translog_read_record_header_scan: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movb %dl, %al movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movb %al, -0x11(%rbp) jmp 0x558c7 jmp 0x558c9 jmp 0x558cb movq -0x10(%rbp), %rax movl $0x0, 0x418(%rax) movq -0x8(%rbp), %rax movq 0x2000(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x8(%rbp), %rax movl 0x2028(%rax), %eax movl %eax, %ecx movq -0x10(%rbp), %rax addq (%rax), %rcx movq %rcx, (%rax) movq -0x8(%rbp), %rax movq 0x2018(%rax), %rax movq %rax, -0x30(%rbp) movq -0x8(%rbp), %rax movl 0x2028(%rax), %eax movw %ax, -0x22(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x20(%rbp) movsbl -0x11(%rbp), %eax cmpl $0x0, %eax je 0x55939 movq -0x8(%rbp), %rax movq %rax, -0x38(%rbp) jmp 0x55941 xorl %eax, %eax movq %rax, -0x38(%rbp) jmp 0x55941 movq -0x20(%rbp), %rdx movw -0x22(%rbp), %ax movq -0x30(%rbp), %rdi movq -0x38(%rbp), %rcx movzwl %ax, %esi callq 0x54dd0 movl %eax, -0x18(%rbp) movl -0x18(%rbp), %eax movl %eax, -0x3c(%rbp) movl -0x3c(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopl (%rax,%rax)
translog_read_record_header_scan: push rbp mov rbp, rsp sub rsp, 40h mov al, dl mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_11], al jmp short $+2 loc_558C7: jmp short $+2 loc_558C9: jmp short $+2 loc_558CB: mov rax, [rbp+var_10] mov dword ptr [rax+418h], 0 mov rax, [rbp+var_8] mov rcx, [rax+2000h] mov rax, [rbp+var_10] mov [rax], rcx mov rax, [rbp+var_8] mov eax, [rax+2028h] mov ecx, eax mov rax, [rbp+var_10] add rcx, [rax] mov [rax], rcx mov rax, [rbp+var_8] mov rax, [rax+2018h] mov [rbp+var_30], rax mov rax, [rbp+var_8] mov eax, [rax+2028h] mov [rbp+var_22], ax mov rax, [rbp+var_10] mov [rbp+var_20], rax movsx eax, [rbp+var_11] cmp eax, 0 jz short loc_55939 mov rax, [rbp+var_8] mov [rbp+var_38], rax jmp short loc_55941 loc_55939: xor eax, eax mov [rbp+var_38], rax jmp short $+2 loc_55941: mov rdx, [rbp+var_20] mov ax, [rbp+var_22] mov rdi, [rbp+var_30] mov rcx, [rbp+var_38] movzx esi, ax call translog_read_record_header_from_buffer mov [rbp+var_18], eax mov eax, [rbp+var_18] mov [rbp+var_3C], eax mov eax, [rbp+var_3C] add rsp, 40h pop rbp retn
long long translog_read_record_header_scan(long long a1, long long a2, char a3) { long long result; // rax long long v4; // [rsp+10h] [rbp-30h] unsigned __int16 v5; // [rsp+1Eh] [rbp-22h] *(_DWORD *)(a2 + 1048) = 0; *(_QWORD *)a2 = *(_QWORD *)(a1 + 0x2000); *(_QWORD *)a2 += *(unsigned int *)(a1 + 8232); v4 = *(_QWORD *)(a1 + 8216); v5 = *(_DWORD *)(a1 + 8232); if ( a3 ) LODWORD(result) = translog_read_record_header_from_buffer(v4, v5, a2, a1); else LODWORD(result) = translog_read_record_header_from_buffer(v4, v5, a2, 0LL); return (unsigned int)result; }
translog_read_record_header_scan: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV AL,DL MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV byte ptr [RBP + -0x11],AL JMP 0x001558c7 LAB_001558c7: JMP 0x001558c9 LAB_001558c9: JMP 0x001558cb LAB_001558cb: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x418],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x2000] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x2028] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] ADD RCX,qword ptr [RAX] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x2018] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x2028] MOV word ptr [RBP + -0x22],AX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x20],RAX MOVSX EAX,byte ptr [RBP + -0x11] CMP EAX,0x0 JZ 0x00155939 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x38],RAX JMP 0x00155941 LAB_00155939: XOR EAX,EAX MOV qword ptr [RBP + -0x38],RAX JMP 0x00155941 LAB_00155941: MOV RDX,qword ptr [RBP + -0x20] MOV AX,word ptr [RBP + -0x22] MOV RDI,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x38] MOVZX ESI,AX CALL 0x00154dd0 MOV dword ptr [RBP + -0x18],EAX MOV EAX,dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x3c],EAX MOV EAX,dword ptr [RBP + -0x3c] ADD RSP,0x40 POP RBP RET
int4 translog_read_record_header_scan(long param_1,long *param_2,char param_3) { int4 uVar1; long local_40; *(int4 *)(param_2 + 0x83) = 0; *param_2 = *(long *)(param_1 + 0x2000); *param_2 = (ulong)*(uint *)(param_1 + 0x2028) + *param_2; local_40 = param_1; if (param_3 == '\0') { local_40 = 0; } uVar1 = translog_read_record_header_from_buffer (*(int8 *)(param_1 + 0x2018),(short)*(int4 *)(param_1 + 0x2028), param_2,local_40); return uVar1; }
17,929
google::protobuf::internal::ReadSizeFallback(char const*, unsigned int)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/parse_context.cc
std::pair<const char*, int32_t> ReadSizeFallback(const char* p, uint32_t res) { for (std::uint32_t i = 1; i < 4; i++) { uint32_t byte = static_cast<uint8_t>(p[i]); res += (byte - 1) << (7 * i); if (PROTOBUF_PREDICT_TRUE(byte < 128)) { return {p + i + 1, res}; } } std::uint32_t byte = static_cast<uint8_t>(p[4]); if (PROTOBUF_PREDICT_FALSE(byte >= 8)) return {nullptr, 0}; // size >= 2gb res += (byte - 1) << 28; // Protect against sign integer overflow in PushLimit. Limits are relative // to buffer ends and ptr could potential be kSlopBytes beyond a buffer end. // To protect against overflow we reject limits absurdly close to INT_MAX. if (PROTOBUF_PREDICT_FALSE(res > INT_MAX - ParseContext::kSlopBytes)) { return {nullptr, 0}; } return {p + 5, res}; }
O0
cpp
google::protobuf::internal::ReadSizeFallback(char const*, unsigned int): subq $0x68, %rsp movq %rdi, 0x50(%rsp) movl %esi, 0x4c(%rsp) movl $0x1, 0x48(%rsp) cmpl $0x4, 0x48(%rsp) jae 0x3cdc1a movq 0x50(%rsp), %rax movl 0x48(%rsp), %ecx movzbl (%rax,%rcx), %eax movl %eax, 0x44(%rsp) movl 0x44(%rsp), %eax subl $0x1, %eax imull $0x7, 0x48(%rsp), %ecx shll %cl, %eax addl 0x4c(%rsp), %eax movl %eax, 0x4c(%rsp) cmpl $0x80, 0x44(%rsp) jae 0x3cdc0b movq 0x50(%rsp), %rax movl 0x48(%rsp), %ecx addq %rcx, %rax addq $0x1, %rax movq %rax, 0x38(%rsp) leaq 0x58(%rsp), %rdi leaq 0x38(%rsp), %rsi leaq 0x4c(%rsp), %rdx callq 0x1a5290 jmp 0x3cdcba jmp 0x3cdc0d movl 0x48(%rsp), %eax addl $0x1, %eax movl %eax, 0x48(%rsp) jmp 0x3cdba5 movq 0x50(%rsp), %rax movzbl 0x4(%rax), %eax movl %eax, 0x34(%rsp) cmpl $0x8, 0x34(%rsp) jb 0x3cdc55 movq $0x0, 0x28(%rsp) movl $0x0, 0x24(%rsp) leaq 0x58(%rsp), %rdi leaq 0x28(%rsp), %rsi leaq 0x24(%rsp), %rdx callq 0x1a0460 jmp 0x3cdcba movl 0x34(%rsp), %eax subl $0x1, %eax shll $0x1c, %eax addl 0x4c(%rsp), %eax movl %eax, 0x4c(%rsp) cmpl $0x7fffffef, 0x4c(%rsp) # imm = 0x7FFFFFEF jbe 0x3cdc98 movq $0x0, 0x18(%rsp) movl $0x0, 0x14(%rsp) leaq 0x58(%rsp), %rdi leaq 0x18(%rsp), %rsi leaq 0x14(%rsp), %rdx callq 0x1a0460 jmp 0x3cdcba movq 0x50(%rsp), %rax addq $0x5, %rax movq %rax, 0x8(%rsp) leaq 0x58(%rsp), %rdi leaq 0x8(%rsp), %rsi leaq 0x4c(%rsp), %rdx callq 0x1a5290 movq 0x58(%rsp), %rax movl 0x60(%rsp), %edx addq $0x68, %rsp retq nopl (%rax,%rax)
_ZN6google8protobuf8internal16ReadSizeFallbackEPKcj: sub rsp, 68h mov [rsp+68h+var_18], rdi mov [rsp+68h+var_1C], esi mov [rsp+68h+var_20], 1 loc_3CDBA5: cmp [rsp+68h+var_20], 4 jnb short loc_3CDC1A mov rax, [rsp+68h+var_18] mov ecx, [rsp+68h+var_20] movzx eax, byte ptr [rax+rcx] mov [rsp+68h+var_24], eax mov eax, [rsp+68h+var_24] sub eax, 1 imul ecx, [rsp+68h+var_20], 7 shl eax, cl add eax, [rsp+68h+var_1C] mov [rsp+68h+var_1C], eax cmp [rsp+68h+var_24], 80h jnb short loc_3CDC0B mov rax, [rsp+68h+var_18] mov ecx, [rsp+68h+var_20] add rax, rcx add rax, 1 mov [rsp+68h+var_30], rax lea rdi, [rsp+68h+var_10] lea rsi, [rsp+68h+var_30] lea rdx, [rsp+68h+var_1C] call __ZNSt4pairIPKciEC2IS1_RjTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS6_S7_EEEbE4typeELb1EEEOS6_OS7_ jmp loc_3CDCBA loc_3CDC0B: jmp short $+2 loc_3CDC0D: mov eax, [rsp+68h+var_20] add eax, 1 mov [rsp+68h+var_20], eax jmp short loc_3CDBA5 loc_3CDC1A: mov rax, [rsp+68h+var_18] movzx eax, byte ptr [rax+4] mov [rsp+68h+var_34], eax cmp [rsp+68h+var_34], 8 jb short loc_3CDC55 mov [rsp+68h+var_40], 0 mov [rsp+68h+var_44], 0 lea rdi, [rsp+68h+var_10] lea rsi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_44] call __ZNSt4pairIPKciEC2IDniTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_ jmp short loc_3CDCBA loc_3CDC55: mov eax, [rsp+68h+var_34] sub eax, 1 shl eax, 1Ch add eax, [rsp+68h+var_1C] mov [rsp+68h+var_1C], eax cmp [rsp+68h+var_1C], 7FFFFFEFh jbe short loc_3CDC98 mov [rsp+68h+var_50], 0 mov [rsp+68h+var_54], 0 lea rdi, [rsp+68h+var_10] lea rsi, [rsp+68h+var_50] lea rdx, [rsp+68h+var_54] call __ZNSt4pairIPKciEC2IDniTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_ jmp short loc_3CDCBA loc_3CDC98: mov rax, [rsp+68h+var_18] add rax, 5 mov [rsp+68h+var_60], rax lea rdi, [rsp+68h+var_10] lea rsi, [rsp+68h+var_60] lea rdx, [rsp+68h+var_1C] call __ZNSt4pairIPKciEC2IS1_RjTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS6_S7_EEEbE4typeELb1EEEOS6_OS7_ loc_3CDCBA: mov rax, [rsp+68h+var_10] mov edx, [rsp+68h+var_8] add rsp, 68h retn
long long google::protobuf::internal::ReadSizeFallback(google::protobuf::internal *this, const char *a2) { char *v3; // [rsp+8h] [rbp-60h] BYREF int v4; // [rsp+14h] [rbp-54h] BYREF long long v5; // [rsp+18h] [rbp-50h] BYREF int v6; // [rsp+24h] [rbp-44h] BYREF long long v7; // [rsp+28h] [rbp-40h] BYREF unsigned int v8; // [rsp+34h] [rbp-34h] long long v9; // [rsp+38h] [rbp-30h] BYREF unsigned int v10; // [rsp+44h] [rbp-24h] unsigned int i; // [rsp+48h] [rbp-20h] unsigned int v12; // [rsp+4Ch] [rbp-1Ch] BYREF google::protobuf::internal *v13; // [rsp+50h] [rbp-18h] long long v14; // [rsp+58h] [rbp-10h] BYREF v13 = this; v12 = (unsigned int)a2; for ( i = 1; i < 4; ++i ) { v10 = *((unsigned __int8 *)v13 + i); v12 += (v10 - 1) << (7 * i); if ( v10 < 0x80 ) { v9 = (long long)v13 + i + 1; _ZNSt4pairIPKciEC2IS1_RjTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS6_S7_EEEbE4typeELb1EEEOS6_OS7_( &v14, &v9, &v12); return v14; } } v8 = *((unsigned __int8 *)v13 + 4); if ( v8 < 8 ) { v12 += (v8 - 1) << 28; if ( v12 <= 0x7FFFFFEF ) { v3 = (char *)v13 + 5; _ZNSt4pairIPKciEC2IS1_RjTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS6_S7_EEEbE4typeELb1EEEOS6_OS7_( &v14, &v3, &v12); } else { v5 = 0LL; v4 = 0; _ZNSt4pairIPKciEC2IDniTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_( &v14, &v5, &v4); } } else { v7 = 0LL; v6 = 0; _ZNSt4pairIPKciEC2IDniTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_( &v14, &v7, &v6); } return v14; }
17,930
google::protobuf::internal::ReadSizeFallback(char const*, unsigned int)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/parse_context.cc
std::pair<const char*, int32_t> ReadSizeFallback(const char* p, uint32_t res) { for (std::uint32_t i = 1; i < 4; i++) { uint32_t byte = static_cast<uint8_t>(p[i]); res += (byte - 1) << (7 * i); if (PROTOBUF_PREDICT_TRUE(byte < 128)) { return {p + i + 1, res}; } } std::uint32_t byte = static_cast<uint8_t>(p[4]); if (PROTOBUF_PREDICT_FALSE(byte >= 8)) return {nullptr, 0}; // size >= 2gb res += (byte - 1) << 28; // Protect against sign integer overflow in PushLimit. Limits are relative // to buffer ends and ptr could potential be kSlopBytes beyond a buffer end. // To protect against overflow we reject limits absurdly close to INT_MAX. if (PROTOBUF_PREDICT_FALSE(res > INT_MAX - ParseContext::kSlopBytes)) { return {nullptr, 0}; } return {p + 5, res}; }
O3
cpp
google::protobuf::internal::ReadSizeFallback(char const*, unsigned int): movl %esi, %edx leaq 0x2(%rdi), %rax pushq $-0x15 popq %rsi movl %edx, %r8d movzbl -0x1(%rax), %r9d movl %r9d, %edx decl %edx leal 0x1c(%rsi), %ecx shll %cl, %edx addl %r8d, %edx testb %r9b, %r9b jns 0x87560 incq %rax addq $0x7, %rsi jne 0x87511 movzbl 0x4(%rdi), %eax cmpl $0x7, %eax ja 0x87561 shll $0x1c, %eax addl %eax, %edx addl $0xf0000000, %edx # imm = 0xF0000000 addq $0x5, %rdi xorl %ecx, %ecx cmpl $0x7ffffff0, %edx # imm = 0x7FFFFFF0 movl $0x0, %eax cmovbq %rdi, %rax cmovael %ecx, %edx retq xorl %eax, %eax xorl %edx, %edx retq
_ZN6google8protobuf8internal16ReadSizeFallbackEPKcj: mov edx, esi lea rax, [rdi+2] push 0FFFFFFFFFFFFFFEBh pop rsi loc_87511: mov r8d, edx movzx r9d, byte ptr [rax-1] mov edx, r9d dec edx lea ecx, [rsi+1Ch] shl edx, cl add edx, r8d test r9b, r9b jns short locret_87560 inc rax add rsi, 7 jnz short loc_87511 movzx eax, byte ptr [rdi+4] cmp eax, 7 ja short loc_87561 shl eax, 1Ch add edx, eax add edx, 0F0000000h add rdi, 5 xor ecx, ecx cmp edx, 7FFFFFF0h mov eax, 0 cmovb rax, rdi cmovnb edx, ecx locret_87560: retn loc_87561: xor eax, eax xor edx, edx retn
char * google::protobuf::internal::ReadSizeFallback(google::protobuf::internal *this, const char *a2) { int v2; // edx char *result; // rax long long v4; // rsi unsigned int v5; // eax unsigned int v6; // edx char *v7; // rdi v2 = (int)a2; result = (char *)this + 2; v4 = -21LL; while ( 1 ) { v2 += ((unsigned __int8)*(result - 1) - 1) << (v4 + 28); if ( *(result - 1) >= 0 ) break; ++result; v4 += 7LL; if ( !v4 ) { v5 = *((unsigned __int8 *)this + 4); if ( v5 > 7 ) return 0LL; v6 = (v5 << 28) + v2 - 0x10000000; v7 = (char *)this + 5; result = 0LL; if ( v6 < 0x7FFFFFF0 ) return v7; return result; } } return result; }
ReadSizeFallback: MOV EDX,ESI LEA RAX,[RDI + 0x2] PUSH -0x15 POP RSI LAB_00187511: MOV R8D,EDX MOVZX R9D,byte ptr [RAX + -0x1] MOV EDX,R9D DEC EDX LEA ECX,[RSI + 0x1c] SHL EDX,CL ADD EDX,R8D TEST R9B,R9B JNS 0x00187560 INC RAX ADD RSI,0x7 JNZ 0x00187511 MOVZX EAX,byte ptr [RDI + 0x4] CMP EAX,0x7 JA 0x00187561 SHL EAX,0x1c ADD EDX,EAX ADD EDX,0xf0000000 ADD RDI,0x5 XOR ECX,ECX CMP EDX,0x7ffffff0 MOV EAX,0x0 CMOVC RAX,RDI CMOVNC EDX,ECX LAB_00187560: RET LAB_00187561: XOR EAX,EAX XOR EDX,EDX RET
/* google::protobuf::internal::ReadSizeFallback(char const*, unsigned int) */ int1 [16] google::protobuf::internal::ReadSizeFallback(char *param_1,uint param_2) { char *pcVar1; uint uVar2; ulong uVar3; long lVar4; int1 auVar5 [16]; uVar3 = (ulong)param_2; pcVar1 = param_1 + 2; lVar4 = -0x15; do { uVar2 = ((byte)pcVar1[-1] - 1 << ((char)lVar4 + 0x1cU & 0x1f)) + (int)uVar3; uVar3 = (ulong)uVar2; if (-1 < pcVar1[-1]) goto LAB_00187560; pcVar1 = pcVar1 + 1; lVar4 = lVar4 + 7; } while (lVar4 != 0); if (7 < (byte)param_1[4]) { return ZEXT816(0); } uVar2 = uVar2 + (uint)(byte)param_1[4] * 0x10000000 + 0xf0000000; pcVar1 = (char *)0x0; if (uVar2 < 0x7ffffff0) { pcVar1 = param_1 + 5; } uVar3 = (ulong)uVar2; if (uVar2 >= 0x7ffffff0) { uVar3 = 0; } LAB_00187560: auVar5._8_8_ = uVar3; auVar5._0_8_ = pcVar1; return auVar5; }
17,931
bf_tan_internal
bluesky950520[P]quickjs/libbf.c
static int bf_tan_internal(bf_t *r, const bf_t *a, limb_t prec, void *opaque) { bf_context_t *s = r->ctx; bf_t T_s, *T = &T_s; limb_t prec1; /* XXX: precision analysis */ prec1 = prec + 8; bf_init(s, T); bf_sincos(r, T, a, prec1); bf_div(r, r, T, prec1, BF_RNDF); bf_delete(T); return BF_ST_INEXACT; }
O2
c
bf_tan_internal: pushq %r15 pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %rax movq %rdi, %rbx movq (%rdi), %rcx leaq 0x8(%rdx), %r14 leaq 0x8(%rsp), %r15 movq %rcx, (%r15) andl $0x0, 0x8(%r15) movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 movq %rcx, 0x10(%r15) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%r15) movq %r15, %rsi movq %rax, %rdx movq %r14, %rcx callq 0x79e51 pushq $0x6 popq %r8 movq %rbx, %rdi movq %rbx, %rsi movq %r15, %rdx movq %r14, %rcx callq 0x71cf2 movq %r15, %rdi callq 0x7145e pushq $0x10 popq %rax addq $0x30, %rsp popq %rbx popq %r14 popq %r15 retq
bf_tan_internal: push r15 push r14 push rbx sub rsp, 30h mov rax, rsi mov rbx, rdi mov rcx, [rdi] lea r14, [rdx+8] lea r15, [rsp+48h+var_40] mov [r15], rcx and dword ptr [r15+8], 0 mov rcx, 8000000000000000h mov [r15+10h], rcx xorps xmm0, xmm0 movups xmmword ptr [r15+18h], xmm0 mov rsi, r15 mov rdx, rax mov rcx, r14 call bf_sincos push 6 pop r8 mov rdi, rbx mov rsi, rbx mov rdx, r15 mov rcx, r14 call bf_div mov rdi, r15 call bf_delete_0 push 10h pop rax add rsp, 30h pop rbx pop r14 pop r15 retn
long long bf_tan_internal(__int128 *a1, long long a2, long long a3) { long long v3; // r14 __int128 v5; // [rsp+8h] [rbp-40h] BYREF unsigned long long v6; // [rsp+18h] [rbp-30h] __int128 v7; // [rsp+20h] [rbp-28h] v3 = a3 + 8; *(_QWORD *)&v5 = *(_QWORD *)a1; DWORD2(v5) = 0; v6 = 0x8000000000000000LL; v7 = 0LL; bf_sincos(a1, &v5, a2, a3 + 8); bf_div(a1, a1, &v5, v3, 6LL); bf_delete_0((long long *)&v5); return 16LL; }
bf_tan_internal: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x30 MOV RAX,RSI MOV RBX,RDI MOV RCX,qword ptr [RDI] LEA R14,[RDX + 0x8] LEA R15,[RSP + 0x8] MOV qword ptr [R15],RCX AND dword ptr [R15 + 0x8],0x0 MOV RCX,-0x8000000000000000 MOV qword ptr [R15 + 0x10],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [R15 + 0x18],XMM0 MOV RSI,R15 MOV RDX,RAX MOV RCX,R14 CALL 0x00179e51 PUSH 0x6 POP R8 MOV RDI,RBX MOV RSI,RBX MOV RDX,R15 MOV RCX,R14 CALL 0x00171cf2 MOV RDI,R15 CALL 0x0017145e PUSH 0x10 POP RAX ADD RSP,0x30 POP RBX POP R14 POP R15 RET
int8 bf_tan_internal(int8 *param_1,int8 param_2,long param_3) { int8 local_40; int4 local_38; int8 local_30; int8 local_28; int8 uStack_20; local_40 = *param_1; local_38 = 0; local_30 = 0x8000000000000000; local_28 = 0; uStack_20 = 0; bf_sincos(param_1,&local_40,param_2,param_3 + 8); bf_div(param_1,param_1,&local_40,param_3 + 8,6); bf_delete(&local_40); return 0x10; }
17,932
stbi__is_16_main(stbi__context*)
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
static int stbi__is_16_main(stbi__context *s) { #ifndef STBI_NO_PNG if (stbi__png_is16(s)) return 1; #endif #ifndef STBI_NO_PSD if (stbi__psd_is16(s)) return 1; #endif #ifndef STBI_NO_PNM if (stbi__pnm_is16(s)) return 1; #endif return 0; }
O0
c
stbi__is_16_main(stbi__context*): subq $0x18, %rsp movq %rdi, 0x8(%rsp) movq 0x8(%rsp), %rdi callq 0x2db60 cmpl $0x0, %eax je 0xfbb2 movl $0x1, 0x14(%rsp) jmp 0xfbec movq 0x8(%rsp), %rdi callq 0x2dbc0 cmpl $0x0, %eax je 0xfbcb movl $0x1, 0x14(%rsp) jmp 0xfbec movq 0x8(%rsp), %rdi callq 0x2dc90 cmpl $0x0, %eax je 0xfbe4 movl $0x1, 0x14(%rsp) jmp 0xfbec movl $0x0, 0x14(%rsp) movl 0x14(%rsp), %eax addq $0x18, %rsp retq nopw %cs:(%rax,%rax)
_ZL16stbi__is_16_mainP13stbi__context: sub rsp, 18h mov [rsp+18h+var_10], rdi mov rdi, [rsp+18h+var_10] call _ZL14stbi__png_is16P13stbi__context; stbi__png_is16(stbi__context *) cmp eax, 0 jz short loc_FBB2 mov [rsp+18h+var_4], 1 jmp short loc_FBEC loc_FBB2: mov rdi, [rsp+18h+var_10] call _ZL14stbi__psd_is16P13stbi__context; stbi__psd_is16(stbi__context *) cmp eax, 0 jz short loc_FBCB mov [rsp+18h+var_4], 1 jmp short loc_FBEC loc_FBCB: mov rdi, [rsp+18h+var_10] call _ZL14stbi__pnm_is16P13stbi__context; stbi__pnm_is16(stbi__context *) cmp eax, 0 jz short loc_FBE4 mov [rsp+18h+var_4], 1 jmp short loc_FBEC loc_FBE4: mov [rsp+18h+var_4], 0 loc_FBEC: mov eax, [rsp+18h+var_4] add rsp, 18h retn
_BOOL8 stbi__is_16_main(long long a1) { if ( (unsigned int)stbi__png_is16(a1) ) return 1; else return (unsigned int)stbi__psd_is16(a1) || stbi__pnm_is16(a1) != 0; }
stbi__is_16_main: SUB RSP,0x18 MOV qword ptr [RSP + 0x8],RDI MOV RDI,qword ptr [RSP + 0x8] CALL 0x0012db60 CMP EAX,0x0 JZ 0x0010fbb2 MOV dword ptr [RSP + 0x14],0x1 JMP 0x0010fbec LAB_0010fbb2: MOV RDI,qword ptr [RSP + 0x8] CALL 0x0012dbc0 CMP EAX,0x0 JZ 0x0010fbcb MOV dword ptr [RSP + 0x14],0x1 JMP 0x0010fbec LAB_0010fbcb: MOV RDI,qword ptr [RSP + 0x8] CALL 0x0012dc90 CMP EAX,0x0 JZ 0x0010fbe4 MOV dword ptr [RSP + 0x14],0x1 JMP 0x0010fbec LAB_0010fbe4: MOV dword ptr [RSP + 0x14],0x0 LAB_0010fbec: MOV EAX,dword ptr [RSP + 0x14] ADD RSP,0x18 RET
/* stbi__is_16_main(stbi__context*) */ int4 stbi__is_16_main(stbi__context *param_1) { int iVar1; int4 local_4; iVar1 = stbi__png_is16(param_1); if (iVar1 == 0) { iVar1 = stbi__psd_is16(param_1); if (iVar1 == 0) { iVar1 = stbi__pnm_is16(param_1); if (iVar1 == 0) { local_4 = 0; } else { local_4 = 1; } } else { local_4 = 1; } } else { local_4 = 1; } return local_4; }
17,933
stbi__is_16_main(stbi__context*)
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
static int stbi__is_16_main(stbi__context *s) { #ifndef STBI_NO_PNG if (stbi__png_is16(s)) return 1; #endif #ifndef STBI_NO_PSD if (stbi__psd_is16(s)) return 1; #endif #ifndef STBI_NO_PNM if (stbi__pnm_is16(s)) return 1; #endif return 0; }
O1
c
stbi__is_16_main(stbi__context*): pushq %rbp pushq %rbx subq $0x28, %rsp movq %rdi, %rbx movq %rsp, %rdi movq %rbx, (%rdi) movl $0x2, %esi xorl %edx, %edx callq 0x269d4 testl %eax, %eax je 0x1c03e cmpl $0x10, 0x20(%rsp) jne 0x1c03e movl $0x1, %eax jmp 0x1c0fe movq (%rsp), %rax movups 0xd0(%rax), %xmm0 movups %xmm0, 0xc0(%rax) movq %rbx, %rdi callq 0x2837b movl %eax, %ebp shll $0x10, %ebp movq %rbx, %rdi callq 0x2837b orl %ebp, %eax cmpl $0x38425053, %eax # imm = 0x38425053 jne 0x1c0d8 movq %rbx, %rdi callq 0x2837b cmpl $0x1, %eax jne 0x1c0d8 cmpq $0x0, 0x10(%rbx) je 0x1c0af movq 0xc8(%rbx), %rcx movl 0xc0(%rbx), %edx movl %ecx, %eax subl %edx, %eax cmpl $0x5, %eax jg 0x1c0af movq %rcx, 0xc0(%rbx) movq 0x28(%rbx), %rdi movl $0x6, %esi subl %eax, %esi callq *0x18(%rbx) jmp 0x1c0b7 addq $0x6, 0xc0(%rbx) movq %rbx, %rdi callq 0x2837b cmpl $0x10, %eax ja 0x1c0d8 movq %rbx, %rdi callq 0x2837b movl %eax, %ecx movl $0x1, %eax cmpl $0x10, %ecx je 0x1c0fe movups 0xd0(%rbx), %xmm0 movups %xmm0, 0xc0(%rbx) movq %rbx, %rdi xorl %esi, %esi xorl %edx, %edx xorl %ecx, %ecx callq 0x2d528 movl %eax, %ecx xorl %eax, %eax cmpl $0x10, %ecx sete %al addq $0x28, %rsp popq %rbx popq %rbp retq
_ZL16stbi__is_16_mainP13stbi__context: push rbp push rbx sub rsp, 28h mov rbx, rdi mov rdi, rsp mov [rdi], rbx mov esi, 2 xor edx, edx call _ZL20stbi__parse_png_fileP9stbi__pngii; stbi__parse_png_file(stbi__png *,int,int) test eax, eax jz short loc_1C03E cmp [rsp+38h+var_18], 10h jnz short loc_1C03E mov eax, 1 jmp loc_1C0FE loc_1C03E: mov rax, [rsp+38h+var_38] movups xmm0, xmmword ptr [rax+0D0h] movups xmmword ptr [rax+0C0h], xmm0 mov rdi, rbx call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *) mov ebp, eax shl ebp, 10h mov rdi, rbx call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *) or eax, ebp cmp eax, 38425053h jnz short loc_1C0D8 mov rdi, rbx call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *) cmp eax, 1 jnz short loc_1C0D8 cmp qword ptr [rbx+10h], 0 jz short loc_1C0AF mov rcx, [rbx+0C8h] mov edx, [rbx+0C0h] mov eax, ecx sub eax, edx cmp eax, 5 jg short loc_1C0AF mov [rbx+0C0h], rcx mov rdi, [rbx+28h] mov esi, 6 sub esi, eax call qword ptr [rbx+18h] jmp short loc_1C0B7 loc_1C0AF: add qword ptr [rbx+0C0h], 6 loc_1C0B7: mov rdi, rbx call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *) cmp eax, 10h ja short loc_1C0D8 mov rdi, rbx call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *) mov ecx, eax mov eax, 1 cmp ecx, 10h jz short loc_1C0FE loc_1C0D8: movups xmm0, xmmword ptr [rbx+0D0h] movups xmmword ptr [rbx+0C0h], xmm0 mov rdi, rbx xor esi, esi xor edx, edx xor ecx, ecx call _ZL14stbi__pnm_infoP13stbi__contextPiS1_S1_; stbi__pnm_info(stbi__context *,int *,int *,int *) mov ecx, eax xor eax, eax cmp ecx, 10h setz al loc_1C0FE: add rsp, 28h pop rbx pop rbp retn
_BOOL8 stbi__is_16_main(long long a1) { _BOOL8 result; // rax unsigned int v2; // ebp int v3; // eax int v4; // ecx _QWORD v5[4]; // [rsp+0h] [rbp-38h] BYREF int v6; // [rsp+20h] [rbp-18h] v5[0] = a1; if ( (unsigned int)stbi__parse_png_file(v5, 2LL, 0LL) && v6 == 16 ) return 1LL; *(_OWORD *)(v5[0] + 192LL) = *(_OWORD *)(v5[0] + 208LL); v2 = (unsigned int)stbi__get16be(a1) << 16; if ( (v2 | (unsigned int)stbi__get16be(a1)) != 0x38425053 || (unsigned int)stbi__get16be(a1) != 1 ) goto LABEL_12; if ( *(_QWORD *)(a1 + 16) && (v3 = *(_QWORD *)(a1 + 200) - *(_DWORD *)(a1 + 192), v3 <= 5) ) { *(_QWORD *)(a1 + 192) = *(_QWORD *)(a1 + 200); (*(void ( **)(_QWORD, _QWORD))(a1 + 24))(*(_QWORD *)(a1 + 40), (unsigned int)(6 - v3)); } else { *(_QWORD *)(a1 + 192) += 6LL; } if ( (unsigned int)stbi__get16be(a1) > 0x10 || (v4 = stbi__get16be(a1), result = 1LL, v4 != 16) ) { LABEL_12: *(_OWORD *)(a1 + 192) = *(_OWORD *)(a1 + 208); return (unsigned int)stbi__pnm_info(a1, 0LL, 0LL, 0LL) == 16; } return result; }
17,934
stbi__is_16_main(stbi__context*)
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
static int stbi__is_16_main(stbi__context *s) { #ifndef STBI_NO_PNG if (stbi__png_is16(s)) return 1; #endif #ifndef STBI_NO_PSD if (stbi__psd_is16(s)) return 1; #endif #ifndef STBI_NO_PNM if (stbi__pnm_is16(s)) return 1; #endif return 0; }
O2
c
stbi__is_16_main(stbi__context*): pushq %rbx subq $0x30, %rsp movq %rdi, %rbx leaq 0x8(%rsp), %rdi movq %rbx, (%rdi) xorl %esi, %esi xorl %edx, %edx xorl %ecx, %ecx callq 0x19a08 testl %eax, %eax je 0xd93f cmpl $0x10, 0x28(%rsp) jne 0xd92c pushq $0x1 popq %rax jmp 0xd9a6 movq 0x8(%rsp), %rax movups 0xd0(%rax), %xmm0 movups %xmm0, 0xc0(%rax) movq %rbx, %rdi callq 0x157f2 cmpl $0x38425053, %eax # imm = 0x38425053 jne 0xd980 movq %rbx, %rdi callq 0x15813 cmpl $0x1, %eax jne 0xd980 pushq $0x6 popq %rsi movq %rbx, %rdi callq 0x1579a movq %rbx, %rdi callq 0x15813 cmpl $0x10, %eax ja 0xd980 movq %rbx, %rdi callq 0x15813 cmpl $0x10, %eax je 0xd927 movups 0xd0(%rbx), %xmm0 movups %xmm0, 0xc0(%rbx) movq %rbx, %rdi xorl %esi, %esi xorl %edx, %edx xorl %ecx, %ecx callq 0x190d5 movl %eax, %ecx xorl %eax, %eax cmpl $0x10, %ecx sete %al addq $0x30, %rsp popq %rbx retq
_ZL16stbi__is_16_mainP13stbi__context: push rbx sub rsp, 30h mov rbx, rdi lea rdi, [rsp+38h+var_30] mov [rdi], rbx xor esi, esi xor edx, edx xor ecx, ecx call _ZL18stbi__png_info_rawP9stbi__pngPiS1_S1_; stbi__png_info_raw(stbi__png *,int *,int *,int *) test eax, eax jz short loc_D93F cmp [rsp+38h+var_10], 10h jnz short loc_D92C loc_D927: push 1 pop rax jmp short loc_D9A6 loc_D92C: mov rax, [rsp+38h+var_30] movups xmm0, xmmword ptr [rax+0D0h] movups xmmword ptr [rax+0C0h], xmm0 loc_D93F: mov rdi, rbx call _ZL13stbi__get32beP13stbi__context; stbi__get32be(stbi__context *) cmp eax, 38425053h jnz short loc_D980 mov rdi, rbx call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *) cmp eax, 1 jnz short loc_D980 push 6 pop rsi mov rdi, rbx call _ZL10stbi__skipP13stbi__contexti; stbi__skip(stbi__context *,int) mov rdi, rbx call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *) cmp eax, 10h ja short loc_D980 mov rdi, rbx call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *) cmp eax, 10h jz short loc_D927 loc_D980: movups xmm0, xmmword ptr [rbx+0D0h] movups xmmword ptr [rbx+0C0h], xmm0 mov rdi, rbx xor esi, esi xor edx, edx xor ecx, ecx call _ZL14stbi__pnm_infoP13stbi__contextPiS1_S1_; stbi__pnm_info(stbi__context *,int *,int *,int *) mov ecx, eax xor eax, eax cmp ecx, 10h setz al loc_D9A6: add rsp, 30h pop rbx retn
_BOOL8 stbi__is_16_main(long long a1) { _QWORD v2[4]; // [rsp+8h] [rbp-30h] BYREF int v3; // [rsp+28h] [rbp-10h] v2[0] = a1; if ( (unsigned int)stbi__png_info_raw(v2, 0LL, 0LL, 0LL) ) { if ( v3 == 16 ) return 1LL; *(_OWORD *)(v2[0] + 192LL) = *(_OWORD *)(v2[0] + 208LL); } if ( (unsigned int)stbi__get32be(a1) == 943870035 && (unsigned int)stbi__get16be(a1) == 1 ) { stbi__skip(a1, 6LL); if ( (unsigned int)stbi__get16be(a1) <= 0x10 && (unsigned int)stbi__get16be(a1) == 16 ) return 1LL; } *(_OWORD *)(a1 + 192) = *(_OWORD *)(a1 + 208); return (unsigned int)stbi__pnm_info(a1, 0LL, 0LL, 0LL) == 16; }
stbi__is_16_main: PUSH RBX SUB RSP,0x30 MOV RBX,RDI LEA RDI,[RSP + 0x8] MOV qword ptr [RDI],RBX XOR ESI,ESI XOR EDX,EDX XOR ECX,ECX CALL 0x00119a08 TEST EAX,EAX JZ 0x0010d93f CMP dword ptr [RSP + 0x28],0x10 JNZ 0x0010d92c LAB_0010d927: PUSH 0x1 POP RAX JMP 0x0010d9a6 LAB_0010d92c: MOV RAX,qword ptr [RSP + 0x8] MOVUPS XMM0,xmmword ptr [RAX + 0xd0] MOVUPS xmmword ptr [RAX + 0xc0],XMM0 LAB_0010d93f: MOV RDI,RBX CALL 0x001157f2 CMP EAX,0x38425053 JNZ 0x0010d980 MOV RDI,RBX CALL 0x00115813 CMP EAX,0x1 JNZ 0x0010d980 PUSH 0x6 POP RSI MOV RDI,RBX CALL 0x0011579a MOV RDI,RBX CALL 0x00115813 CMP EAX,0x10 JA 0x0010d980 MOV RDI,RBX CALL 0x00115813 CMP EAX,0x10 JZ 0x0010d927 LAB_0010d980: MOVUPS XMM0,xmmword ptr [RBX + 0xd0] MOVUPS xmmword ptr [RBX + 0xc0],XMM0 MOV RDI,RBX XOR ESI,ESI XOR EDX,EDX XOR ECX,ECX CALL 0x001190d5 MOV ECX,EAX XOR EAX,EAX CMP ECX,0x10 SETZ AL LAB_0010d9a6: ADD RSP,0x30 POP RBX RET
/* stbi__is_16_main(stbi__context*) */ bool stbi__is_16_main(stbi__context *param_1) { int iVar1; uint uVar2; bool bVar3; stbi__context *local_30 [4]; int local_10; local_30[0] = param_1; iVar1 = stbi__png_info_raw((stbi__png *)local_30,(int *)0x0,(int *)0x0,(int *)0x0); if (iVar1 == 0) { LAB_0010d93f: iVar1 = stbi__get32be(param_1); if (iVar1 == 0x38425053) { iVar1 = stbi__get16be(param_1); if (iVar1 == 1) { stbi__skip(param_1,6); uVar2 = stbi__get16be(param_1); if (uVar2 < 0x11) { iVar1 = stbi__get16be(param_1); if (iVar1 == 0x10) goto LAB_0010d927; } } } *(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 0xd0); *(int8 *)(param_1 + 200) = *(int8 *)(param_1 + 0xd8); iVar1 = stbi__pnm_info(param_1,(int *)0x0,(int *)0x0,(int *)0x0); bVar3 = iVar1 == 0x10; } else { if (local_10 != 0x10) { *(int8 *)(local_30[0] + 0xc0) = *(int8 *)(local_30[0] + 0xd0); *(int8 *)(local_30[0] + 200) = *(int8 *)(local_30[0] + 0xd8); goto LAB_0010d93f; } LAB_0010d927: bVar3 = true; } return bVar3; }
17,935
stbi__is_16_main(stbi__context*)
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
static int stbi__is_16_main(stbi__context *s) { #ifndef STBI_NO_PNG if (stbi__png_is16(s)) return 1; #endif #ifndef STBI_NO_PSD if (stbi__psd_is16(s)) return 1; #endif #ifndef STBI_NO_PNM if (stbi__pnm_is16(s)) return 1; #endif return 0; }
O3
c
stbi__is_16_main(stbi__context*): pushq %rbp pushq %rbx subq $0x28, %rsp movq %rdi, %rbx movq %rsp, %rdi movq %rbx, (%rdi) movl $0x2, %esi xorl %edx, %edx callq 0x26268 testl %eax, %eax je 0x1babd cmpl $0x10, 0x20(%rsp) jne 0x1babd movl $0x1, %eax jmp 0x1bb88 movq (%rsp), %rax movups 0xd0(%rax), %xmm0 movups %xmm0, 0xc0(%rax) movq %rbx, %rdi callq 0x278d0 movl %eax, %ebp shll $0x10, %ebp movq %rbx, %rdi callq 0x278d0 orl %ebp, %eax cmpl $0x38425053, %eax # imm = 0x38425053 jne 0x1bb62 movq %rbx, %rdi callq 0x278d0 cmpl $0x1, %eax jne 0x1bb62 cmpq $0x0, 0x10(%rbx) je 0x1bb2f movq 0xc0(%rbx), %rax movq 0xc8(%rbx), %rdx movl %edx, %ecx subl %eax, %ecx cmpl $0x5, %ecx jg 0x1bb36 movq %rdx, 0xc0(%rbx) movq 0x28(%rbx), %rdi movl $0x6, %esi subl %ecx, %esi callq *0x18(%rbx) jmp 0x1bb41 movq 0xc0(%rbx), %rax addq $0x6, %rax movq %rax, 0xc0(%rbx) movq %rbx, %rdi callq 0x278d0 cmpl $0x10, %eax ja 0x1bb62 movq %rbx, %rdi callq 0x278d0 movl %eax, %ecx movl $0x1, %eax cmpl $0x10, %ecx je 0x1bb88 movups 0xd0(%rbx), %xmm0 movups %xmm0, 0xc0(%rbx) movq %rbx, %rdi xorl %esi, %esi xorl %edx, %edx xorl %ecx, %ecx callq 0x2c797 movl %eax, %ecx xorl %eax, %eax cmpl $0x10, %ecx sete %al addq $0x28, %rsp popq %rbx popq %rbp retq
_ZL16stbi__is_16_mainP13stbi__context: push rbp push rbx sub rsp, 28h mov rbx, rdi mov rdi, rsp mov [rdi], rbx mov esi, 2 xor edx, edx call _ZL20stbi__parse_png_fileP9stbi__pngii; stbi__parse_png_file(stbi__png *,int,int) test eax, eax jz short loc_1BABD cmp [rsp+38h+var_18], 10h jnz short loc_1BABD mov eax, 1 jmp loc_1BB88 loc_1BABD: mov rax, [rsp+38h+var_38] movups xmm0, xmmword ptr [rax+0D0h] movups xmmword ptr [rax+0C0h], xmm0 mov rdi, rbx call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *) mov ebp, eax shl ebp, 10h mov rdi, rbx call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *) or eax, ebp cmp eax, 38425053h jnz short loc_1BB62 mov rdi, rbx call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *) cmp eax, 1 jnz short loc_1BB62 cmp qword ptr [rbx+10h], 0 jz short loc_1BB2F mov rax, [rbx+0C0h] mov rdx, [rbx+0C8h] mov ecx, edx sub ecx, eax cmp ecx, 5 jg short loc_1BB36 mov [rbx+0C0h], rdx mov rdi, [rbx+28h] mov esi, 6 sub esi, ecx call qword ptr [rbx+18h] jmp short loc_1BB41 loc_1BB2F: mov rax, [rbx+0C0h] loc_1BB36: add rax, 6 mov [rbx+0C0h], rax loc_1BB41: mov rdi, rbx call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *) cmp eax, 10h ja short loc_1BB62 mov rdi, rbx call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *) mov ecx, eax mov eax, 1 cmp ecx, 10h jz short loc_1BB88 loc_1BB62: movups xmm0, xmmword ptr [rbx+0D0h] movups xmmword ptr [rbx+0C0h], xmm0 mov rdi, rbx xor esi, esi xor edx, edx xor ecx, ecx call _ZL14stbi__pnm_infoP13stbi__contextPiS1_S1_; stbi__pnm_info(stbi__context *,int *,int *,int *) mov ecx, eax xor eax, eax cmp ecx, 10h setz al loc_1BB88: add rsp, 28h pop rbx pop rbp retn
_BOOL8 stbi__is_16_main(long long a1) { _BOOL8 result; // rax unsigned int v2; // ebp long long v3; // rax int v4; // ecx int v5; // ecx _QWORD v6[4]; // [rsp+0h] [rbp-38h] BYREF int v7; // [rsp+20h] [rbp-18h] v6[0] = a1; if ( (unsigned int)stbi__parse_png_file(v6, 2LL, 0LL) && v7 == 16 ) return 1LL; *(_OWORD *)(v6[0] + 192LL) = *(_OWORD *)(v6[0] + 208LL); v2 = (unsigned int)stbi__get16be(a1) << 16; if ( (v2 | (unsigned int)stbi__get16be(a1)) != 0x38425053 || (unsigned int)stbi__get16be(a1) != 1 ) goto LABEL_13; if ( !*(_QWORD *)(a1 + 16) ) { v3 = *(_QWORD *)(a1 + 192); goto LABEL_10; } v3 = *(_QWORD *)(a1 + 192); v4 = *(_QWORD *)(a1 + 200) - v3; if ( v4 > 5 ) { LABEL_10: *(_QWORD *)(a1 + 192) = v3 + 6; goto LABEL_11; } *(_QWORD *)(a1 + 192) = *(_QWORD *)(a1 + 200); (*(void ( **)(_QWORD, _QWORD))(a1 + 24))(*(_QWORD *)(a1 + 40), (unsigned int)(6 - v4)); LABEL_11: if ( (unsigned int)stbi__get16be(a1) > 0x10 || (v5 = stbi__get16be(a1), result = 1LL, v5 != 16) ) { LABEL_13: *(_OWORD *)(a1 + 192) = *(_OWORD *)(a1 + 208); return (unsigned int)stbi__pnm_info(a1, 0LL, 0LL, 0LL) == 16; } return result; }
17,936
bc_atom_to_idx
bluesky950520[P]quickjs/quickjs.c
static int bc_atom_to_idx(BCWriterState *s, uint32_t *pres, JSAtom atom) { uint32_t v; if (atom < s->first_atom || __JS_AtomIsTaggedInt(atom)) { *pres = atom; return 0; } atom -= s->first_atom; if (atom < s->atom_to_idx_size && s->atom_to_idx[atom] != 0) { *pres = s->atom_to_idx[atom]; return 0; } if (atom >= s->atom_to_idx_size) { int old_size, i; old_size = s->atom_to_idx_size; if (js_resize_array(s->ctx, (void **)&s->atom_to_idx, sizeof(s->atom_to_idx[0]), &s->atom_to_idx_size, atom + 1)) return -1; /* XXX: could add a specific js_resize_array() function to do it */ for(i = old_size; i < s->atom_to_idx_size; i++) s->atom_to_idx[i] = 0; } if (js_resize_array(s->ctx, (void **)&s->idx_to_atom, sizeof(s->idx_to_atom[0]), &s->idx_to_atom_size, s->idx_to_atom_count + 1)) goto fail; v = s->idx_to_atom_count++; s->idx_to_atom[v] = atom + s->first_atom; v += s->first_atom; s->atom_to_idx[atom] = v; *pres = v; return 0; fail: *pres = 0; return -1; }
O1
c
bc_atom_to_idx: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movl %edx, %r13d subl 0x3c(%rdi), %r13d setb %al testl %edx, %edx sets %cl xorl %ebp, %ebp orb %al, %cl jne 0x4594d movq %rdi, %r14 movslq 0x48(%rdi), %r12 cmpl %r12d, %r13d jae 0x458e1 movq 0x40(%r14), %rax movl %r13d, %ecx movl (%rax,%rcx,4), %edx testl %edx, %edx jne 0x4594d cmpl %r12d, %r13d jb 0x4591c leaq 0x48(%r14), %r15 leaq 0x40(%r14), %rdx leal 0x1(%r13), %r8d movb $0x1, %cl cmpl %r8d, %r12d jl 0x45960 movl $0xffffffff, %eax # imm = 0xFFFFFFFF testb %cl, %cl je 0x45951 cmpl (%r15), %r12d jge 0x45918 movq (%rdx), %rdx movl $0x0, (%rdx,%r12,4) incq %r12 movslq (%r15), %rsi cmpq %rsi, %r12 jl 0x45905 testb %cl, %cl je 0x45951 movl 0x58(%r14), %r8d cmpl %r8d, 0x5c(%r14) jle 0x45986 movl 0x58(%r14), %eax leal 0x1(%rax), %ecx movl %ecx, 0x58(%r14) movl %r13d, %ecx addl 0x3c(%r14), %r13d movq 0x50(%r14), %rdx movl %r13d, (%rdx,%rax,4) movl 0x3c(%r14), %edx addl %eax, %edx movq 0x40(%r14), %rax movl %edx, (%rax,%rcx,4) movl %edx, (%rbx) movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq (%r14), %rdi movq %rdx, (%rsp) movq (%rsp), %rsi movl $0x4, %edx movq %r15, %rcx callq 0x434ef movq (%rsp), %rdx testl %eax, %eax sete %cl jmp 0x458f4 leaq 0x50(%r14), %rsi leaq 0x5c(%r14), %rcx incl %r8d movq (%r14), %rdi movl $0x4, %edx callq 0x434ef testl %eax, %eax je 0x45926 movl $0xffffffff, %ebp # imm = 0xFFFFFFFF xorl %edx, %edx jmp 0x4594d
bc_atom_to_idx: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi mov r13d, edx sub r13d, [rdi+3Ch] setb al test edx, edx sets cl xor ebp, ebp or cl, al jnz loc_4594D mov r14, rdi movsxd r12, dword ptr [rdi+48h] cmp r13d, r12d jnb short loc_458E1 mov rax, [r14+40h] mov ecx, r13d mov edx, [rax+rcx*4] test edx, edx jnz short loc_4594D cmp r13d, r12d jb short loc_4591C loc_458E1: lea r15, [r14+48h] lea rdx, [r14+40h] lea r8d, [r13+1] mov cl, 1 cmp r12d, r8d jl short loc_45960 loc_458F4: mov eax, 0FFFFFFFFh test cl, cl jz short loc_45951 cmp r12d, [r15] jge short loc_45918 mov rdx, [rdx] loc_45905: mov dword ptr [rdx+r12*4], 0 inc r12 movsxd rsi, dword ptr [r15] cmp r12, rsi jl short loc_45905 loc_45918: test cl, cl jz short loc_45951 loc_4591C: mov r8d, [r14+58h] cmp [r14+5Ch], r8d jle short loc_45986 loc_45926: mov eax, [r14+58h] lea ecx, [rax+1] mov [r14+58h], ecx mov ecx, r13d add r13d, [r14+3Ch] mov rdx, [r14+50h] mov [rdx+rax*4], r13d mov edx, [r14+3Ch] add edx, eax mov rax, [r14+40h] mov [rax+rcx*4], edx loc_4594D: mov [rbx], edx mov eax, ebp loc_45951: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_45960: mov rdi, [r14] mov [rsp+38h+var_38], rdx mov rsi, [rsp+38h+var_38] mov edx, 4 mov rcx, r15 call js_realloc_array mov rdx, [rsp+38h+var_38] test eax, eax setz cl jmp loc_458F4 loc_45986: lea rsi, [r14+50h] lea rcx, [r14+5Ch] inc r8d mov rdi, [r14] mov edx, 4 call js_realloc_array test eax, eax jz short loc_45926 mov ebp, 0FFFFFFFFh xor edx, edx jmp short loc_4594D
long long bc_atom_to_idx(long long a1, int *a2, int a3) { unsigned int v3; // r13d unsigned int v4; // ebp long long v5; // r12 int *v6; // r15 long long *v7; // rdx bool v8; // cl long long result; // rax long long v10; // rdx int v11; // r8d long long v12; // rax int v13; // eax v3 = a3 - *(_DWORD *)(a1 + 60); v4 = 0; if ( (unsigned int)a3 < *(_DWORD *)(a1 + 60) || a3 < 0 ) goto LABEL_13; v5 = *(int *)(a1 + 72); if ( v3 >= (unsigned int)v5 ) goto LABEL_5; a3 = *(_DWORD *)(*(_QWORD *)(a1 + 64) + 4LL * v3); if ( a3 ) { LABEL_13: *a2 = a3; return v4; } if ( v3 < (unsigned int)v5 ) { LABEL_11: v11 = *(_DWORD *)(a1 + 88); if ( *(_DWORD *)(a1 + 92) <= v11 && (unsigned int)js_realloc_array(*(_QWORD *)a1, (long long *)(a1 + 80), 4u, (_DWORD *)(a1 + 92), v11 + 1) ) { v4 = -1; a3 = 0; } else { v12 = *(unsigned int *)(a1 + 88); *(_DWORD *)(a1 + 88) = v12 + 1; *(_DWORD *)(*(_QWORD *)(a1 + 80) + 4 * v12) = *(_DWORD *)(a1 + 60) + v3; a3 = v12 + *(_DWORD *)(a1 + 60); *(_DWORD *)(*(_QWORD *)(a1 + 64) + 4LL * v3) = a3; } goto LABEL_13; } LABEL_5: v6 = (int *)(a1 + 72); v7 = (long long *)(a1 + 64); v8 = 1; if ( (int)v5 < (int)(v3 + 1) ) { v13 = js_realloc_array(*(_QWORD *)a1, (long long *)(a1 + 64), 4u, (_DWORD *)(a1 + 72), v3 + 1); v7 = (long long *)(a1 + 64); v8 = v13 == 0; } result = 0xFFFFFFFFLL; if ( v8 ) { if ( (int)v5 < *v6 ) { v10 = *v7; do *(_DWORD *)(v10 + 4 * v5++) = 0; while ( v5 < *v6 ); } goto LABEL_11; } return result; }
17,937
bc_atom_to_idx
bluesky950520[P]quickjs/quickjs.c
static int bc_atom_to_idx(BCWriterState *s, uint32_t *pres, JSAtom atom) { uint32_t v; if (atom < s->first_atom || __JS_AtomIsTaggedInt(atom)) { *pres = atom; return 0; } atom -= s->first_atom; if (atom < s->atom_to_idx_size && s->atom_to_idx[atom] != 0) { *pres = s->atom_to_idx[atom]; return 0; } if (atom >= s->atom_to_idx_size) { int old_size, i; old_size = s->atom_to_idx_size; if (js_resize_array(s->ctx, (void **)&s->atom_to_idx, sizeof(s->atom_to_idx[0]), &s->atom_to_idx_size, atom + 1)) return -1; /* XXX: could add a specific js_resize_array() function to do it */ for(i = old_size; i < s->atom_to_idx_size; i++) s->atom_to_idx[i] = 0; } if (js_resize_array(s->ctx, (void **)&s->idx_to_atom, sizeof(s->idx_to_atom[0]), &s->idx_to_atom_size, s->idx_to_atom_count + 1)) goto fail; v = s->idx_to_atom_count++; s->idx_to_atom[v] = atom + s->first_atom; v += s->first_atom; s->atom_to_idx[atom] = v; *pres = v; return 0; fail: *pres = 0; return -1; }
O2
c
bc_atom_to_idx: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movl %edx, %r13d subl 0x3c(%rdi), %r13d setb %cl testl %edx, %edx sets %sil xorl %eax, %eax orb %cl, %sil jne 0x3d0b3 movq %rdi, %r14 movslq 0x48(%rdi), %rbp movl %r13d, %edx cmpl %ebp, %r13d movq %rdx, (%rsp) jae 0x3d02b movq 0x40(%r14), %rcx movl (%rcx,%rdx,4), %edx testl %edx, %edx jne 0x3d0b3 jmp 0x3d064 leaq 0x48(%r14), %r15 movq (%r14), %rdi leaq 0x40(%r14), %r12 leal 0x1(%r13), %r8d pushq $0x4 popq %rdx movq %r12, %rsi movq %r15, %rcx callq 0x3b0ef testl %eax, %eax je 0x3d05c pushq $-0x1 popq %rax jmp 0x3d0b5 movq (%r12), %rax andl $0x0, (%rax,%rbp,4) incq %rbp movslq (%r15), %rax cmpq %rax, %rbp jl 0x3d051 movq (%r14), %rdi leaq 0x50(%r14), %rsi leaq 0x5c(%r14), %rcx movl 0x58(%r14), %r8d incl %r8d pushq $0x4 popq %rdx callq 0x3b0ef testl %eax, %eax je 0x3d089 pushq $-0x1 popq %rax xorl %edx, %edx jmp 0x3d0b3 movl 0x58(%r14), %eax leal 0x1(%rax), %ecx movl %ecx, 0x58(%r14) addl 0x3c(%r14), %r13d movq 0x50(%r14), %rcx movl %r13d, (%rcx,%rax,4) movl 0x3c(%r14), %edx addl %eax, %edx movq 0x40(%r14), %rax movq (%rsp), %rcx movl %edx, (%rax,%rcx,4) xorl %eax, %eax movl %edx, (%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
bc_atom_to_idx: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi mov r13d, edx sub r13d, [rdi+3Ch] setb cl test edx, edx sets sil xor eax, eax or sil, cl jnz loc_3D0B3 mov r14, rdi movsxd rbp, dword ptr [rdi+48h] mov edx, r13d cmp r13d, ebp mov [rsp+38h+var_38], rdx jnb short loc_3D02B mov rcx, [r14+40h] mov edx, [rcx+rdx*4] test edx, edx jnz loc_3D0B3 jmp short loc_3D064 loc_3D02B: lea r15, [r14+48h] mov rdi, [r14] lea r12, [r14+40h] lea r8d, [r13+1] push 4 pop rdx mov rsi, r12 mov rcx, r15 call js_resize_array test eax, eax jz short loc_3D05C push 0FFFFFFFFFFFFFFFFh pop rax jmp short loc_3D0B5 loc_3D051: mov rax, [r12] and dword ptr [rax+rbp*4], 0 inc rbp loc_3D05C: movsxd rax, dword ptr [r15] cmp rbp, rax jl short loc_3D051 loc_3D064: mov rdi, [r14] lea rsi, [r14+50h] lea rcx, [r14+5Ch] mov r8d, [r14+58h] inc r8d push 4 pop rdx call js_resize_array test eax, eax jz short loc_3D089 push 0FFFFFFFFFFFFFFFFh pop rax xor edx, edx jmp short loc_3D0B3 loc_3D089: mov eax, [r14+58h] lea ecx, [rax+1] mov [r14+58h], ecx add r13d, [r14+3Ch] mov rcx, [r14+50h] mov [rcx+rax*4], r13d mov edx, [r14+3Ch] add edx, eax mov rax, [r14+40h] mov rcx, [rsp+38h+var_38] mov [rax+rcx*4], edx xor eax, eax loc_3D0B3: mov [rbx], edx loc_3D0B5: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long bc_atom_to_idx(long long a1, int *a2, int a3) { unsigned int v3; // r13d long long result; // rax long long v5; // rbp long long v6; // rax v3 = a3 - *(_DWORD *)(a1 + 60); result = 0LL; if ( (unsigned int)a3 < *(_DWORD *)(a1 + 60) || a3 < 0 ) goto LABEL_12; v5 = *(int *)(a1 + 72); if ( v3 >= (unsigned int)v5 ) { if ( (unsigned int)js_resize_array(*(_QWORD *)a1, a1 + 64, 4LL, (_DWORD *)(a1 + 72), v3 + 1) ) return -1LL; while ( v5 < *(int *)(a1 + 72) ) *(_DWORD *)(*(_QWORD *)(a1 + 64) + 4 * v5++) = 0; goto LABEL_9; } a3 = *(_DWORD *)(*(_QWORD *)(a1 + 64) + 4LL * v3); if ( !a3 ) { LABEL_9: if ( (unsigned int)js_resize_array(*(_QWORD *)a1, a1 + 80, 4LL, (_DWORD *)(a1 + 92), *(_DWORD *)(a1 + 88) + 1) ) { result = -1LL; a3 = 0; } else { v6 = *(unsigned int *)(a1 + 88); *(_DWORD *)(a1 + 88) = v6 + 1; *(_DWORD *)(*(_QWORD *)(a1 + 80) + 4 * v6) = *(_DWORD *)(a1 + 60) + v3; a3 = v6 + *(_DWORD *)(a1 + 60); *(_DWORD *)(*(_QWORD *)(a1 + 64) + 4LL * v3) = a3; result = 0LL; } } LABEL_12: *a2 = a3; return result; }
bc_atom_to_idx: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV R13D,EDX SUB R13D,dword ptr [RDI + 0x3c] SETC CL TEST EDX,EDX SETS SIL XOR EAX,EAX OR SIL,CL JNZ 0x0013d0b3 MOV R14,RDI MOVSXD RBP,dword ptr [RDI + 0x48] MOV EDX,R13D CMP R13D,EBP MOV qword ptr [RSP],RDX JNC 0x0013d02b MOV RCX,qword ptr [R14 + 0x40] MOV EDX,dword ptr [RCX + RDX*0x4] TEST EDX,EDX JNZ 0x0013d0b3 JMP 0x0013d064 LAB_0013d02b: LEA R15,[R14 + 0x48] MOV RDI,qword ptr [R14] LEA R12,[R14 + 0x40] LEA R8D,[R13 + 0x1] PUSH 0x4 POP RDX MOV RSI,R12 MOV RCX,R15 CALL 0x0013b0ef TEST EAX,EAX JZ 0x0013d05c PUSH -0x1 POP RAX JMP 0x0013d0b5 LAB_0013d051: MOV RAX,qword ptr [R12] AND dword ptr [RAX + RBP*0x4],0x0 INC RBP LAB_0013d05c: MOVSXD RAX,dword ptr [R15] CMP RBP,RAX JL 0x0013d051 LAB_0013d064: MOV RDI,qword ptr [R14] LEA RSI,[R14 + 0x50] LEA RCX,[R14 + 0x5c] MOV R8D,dword ptr [R14 + 0x58] INC R8D PUSH 0x4 POP RDX CALL 0x0013b0ef TEST EAX,EAX JZ 0x0013d089 PUSH -0x1 POP RAX XOR EDX,EDX JMP 0x0013d0b3 LAB_0013d089: MOV EAX,dword ptr [R14 + 0x58] LEA ECX,[RAX + 0x1] MOV dword ptr [R14 + 0x58],ECX ADD R13D,dword ptr [R14 + 0x3c] MOV RCX,qword ptr [R14 + 0x50] MOV dword ptr [RCX + RAX*0x4],R13D MOV EDX,dword ptr [R14 + 0x3c] ADD EDX,EAX MOV RAX,qword ptr [R14 + 0x40] MOV RCX,qword ptr [RSP] MOV dword ptr [RAX + RCX*0x4],EDX XOR EAX,EAX LAB_0013d0b3: MOV dword ptr [RBX],EDX LAB_0013d0b5: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 bc_atom_to_idx(int8 *param_1,uint *param_2,uint param_3) { int iVar1; int8 uVar2; long lVar3; uint uVar4; uVar4 = param_3 - *(uint *)((long)param_1 + 0x3c); uVar2 = 0; if (-1 < (int)param_3 && *(uint *)((long)param_1 + 0x3c) <= param_3) { lVar3 = (long)(int)*(uint *)(param_1 + 9); if (uVar4 < *(uint *)(param_1 + 9)) { param_3 = *(uint *)(param_1[8] + (ulong)uVar4 * 4); if (param_3 != 0) goto LAB_0013d0b3; } else { iVar1 = js_resize_array(*param_1,param_1 + 8,4,param_1 + 9,uVar4 + 1); if (iVar1 != 0) { return 0xffffffffffffffff; } for (; lVar3 < *(int *)(param_1 + 9); lVar3 = lVar3 + 1) { *(int4 *)(param_1[8] + lVar3 * 4) = 0; } } iVar1 = js_resize_array(*param_1,param_1 + 10,4,(long)param_1 + 0x5c,*(int *)(param_1 + 0xb) + 1 ); if (iVar1 == 0) { param_3 = *(uint *)(param_1 + 0xb); *(uint *)(param_1 + 0xb) = param_3 + 1; *(uint *)(param_1[10] + (ulong)param_3 * 4) = uVar4 + *(int *)((long)param_1 + 0x3c); param_3 = *(int *)((long)param_1 + 0x3c) + param_3; *(uint *)(param_1[8] + (ulong)uVar4 * 4) = param_3; uVar2 = 0; } else { uVar2 = 0xffffffffffffffff; param_3 = 0; } } LAB_0013d0b3: *param_2 = param_3; return uVar2; }
17,938
common_arg::common_arg(std::initializer_list<char const*> const&, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&))
llama.cpp/common/arg.h
common_arg( const std::initializer_list<const char *> & args, const char * value_hint, const char * value_hint_2, const std::string & help, void (*handler)(common_params & params, const std::string &, const std::string &) ) : args(args), value_hint(value_hint), value_hint_2(value_hint_2), help(help), handler_str_str(handler) {}
O3
c
common_arg::common_arg(std::initializer_list<char const*> const&, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r9, 0x8(%rsp) movq %r8, %r15 movq %rcx, %r12 movq %rdx, %r13 movq %rsi, %r14 movq %rdi, %rbx leaq 0x14(%rsp), %rsi movl $0x0, (%rsi) leaq 0x7(%rsp), %rcx leaq 0x6(%rsp), %r8 movl $0x1, %edx callq 0x875f0 leaq 0x38(%rbx), %rax xorl %ecx, %ecx movq %rcx, 0x40(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x30(%rbx) movq %rax, 0x48(%rbx) movq %rax, 0x50(%rbx) movq %rcx, 0x58(%rbx) leaq 0x60(%rbx), %rbp movq (%r14), %rsi movq 0x8(%r14), %rdx leaq 0x5(%rsp), %rcx movq %rbp, %rdi callq 0x87672 movq %r13, 0x78(%rbx) movq %r12, 0x80(%rbx) movq $0x0, 0x88(%rbx) leaq 0x90(%rbx), %rdi leaq 0xa0(%rbx), %rax movq %rax, 0x90(%rbx) movq (%r15), %rsi movq 0x8(%r15), %rdx addq %rsi, %rdx callq 0x2c6a6 movb $0x0, 0xb0(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0xb8(%rbx) movq 0x8(%rsp), %rax movq %rax, 0xc8(%rbx) movq $0x0, 0xd0(%rbx) addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq (%rbp), %rdi testq %rdi, %rdi je 0x68696 movq 0x70(%rbx), %rsi subq %rdi, %rsi callq 0x211a0 jmp 0x68696 movq %rax, %r14 leaq 0x30(%rbx), %rdi callq 0x876b8 movq %rbx, %rdi callq 0x876b8 movq %r14, %rdi callq 0x21c10
_ZN10common_argC2ERKSt16initializer_listIPKcES2_S2_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPFvR13common_paramsSD_SD_E: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rsp+48h+var_40], r9 mov r15, r8 mov r12, rcx mov r13, rdx mov r14, rsi mov rbx, rdi lea rsi, [rsp+48h+var_34] mov dword ptr [rsi], 0 lea rcx, [rsp+48h+var_41] lea r8, [rsp+48h+var_42] mov edx, 1 call _ZNSt3setI13llama_exampleSt4lessIS0_ESaIS0_EEC2ESt16initializer_listIS0_ERKS2_RKS3_; std::set<llama_example>::set(std::initializer_list<llama_example>,std::less<llama_example> const&,std::allocator<llama_example> const&) lea rax, [rbx+38h] xor ecx, ecx mov [rbx+40h], rcx xorps xmm0, xmm0 movups xmmword ptr [rbx+30h], xmm0 mov [rbx+48h], rax mov [rbx+50h], rax mov [rbx+58h], rcx lea rbp, [rbx+60h] mov rsi, [r14] mov rdx, [r14+8] lea rcx, [rsp+48h+var_43] mov rdi, rbp call _ZNSt6vectorIPKcSaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<char const*>::vector(std::initializer_list<char const*>,std::allocator<char const*> const&) mov [rbx+78h], r13 mov [rbx+80h], r12 mov qword ptr [rbx+88h], 0 lea rdi, [rbx+90h] lea rax, [rbx+0A0h] mov [rbx+90h], rax mov rsi, [r15] mov rdx, [r15+8] add rdx, rsi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov byte ptr [rbx+0B0h], 0 xorps xmm0, xmm0 movups xmmword ptr [rbx+0B8h], xmm0 mov rax, [rsp+48h+var_40] mov [rbx+0C8h], rax mov qword ptr [rbx+0D0h], 0 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, [rbp+0]; void * test rdi, rdi jz short loc_68696 mov rsi, [rbx+70h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_68696 mov r14, rax loc_68696: lea rdi, [rbx+30h] call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree() mov rdi, rbx call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree() mov rdi, r14 call __Unwind_Resume
long long common_arg::common_arg(long long a1, _QWORD *a2, long long a3, long long a4, long long a5, long long a6) { long long result; // rax char v10; // [rsp+5h] [rbp-43h] BYREF char v11; // [rsp+6h] [rbp-42h] BYREF char v12; // [rsp+7h] [rbp-41h] BYREF long long v13; // [rsp+8h] [rbp-40h] _DWORD v14[13]; // [rsp+14h] [rbp-34h] BYREF v13 = a6; v14[0] = 0; std::set<llama_example>::set(a1, v14, 1LL, &v12, &v11); *(_QWORD *)(a1 + 64) = 0LL; *(_OWORD *)(a1 + 48) = 0LL; *(_QWORD *)(a1 + 72) = a1 + 56; *(_QWORD *)(a1 + 80) = a1 + 56; *(_QWORD *)(a1 + 88) = 0LL; std::vector<char const*>::vector(a1 + 96, *a2, a2[1], &v10); *(_QWORD *)(a1 + 120) = a3; *(_QWORD *)(a1 + 128) = a4; *(_QWORD *)(a1 + 136) = 0LL; *(_QWORD *)(a1 + 144) = a1 + 160; std::string::_M_construct<char *>(a1 + 144, *(_BYTE **)a5, *(_QWORD *)a5 + *(_QWORD *)(a5 + 8)); *(_BYTE *)(a1 + 176) = 0; *(_OWORD *)(a1 + 184) = 0LL; result = v13; *(_QWORD *)(a1 + 200) = v13; *(_QWORD *)(a1 + 208) = 0LL; return result; }
common_arg: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RSP + 0x8],R9 MOV R15,R8 MOV R12,RCX MOV R13,RDX MOV R14,RSI MOV RBX,RDI LEA RSI,[RSP + 0x14] MOV dword ptr [RSI],0x0 LEA RCX,[RSP + 0x7] LEA R8,[RSP + 0x6] MOV EDX,0x1 CALL 0x001875f0 LEA RAX,[RBX + 0x38] XOR ECX,ECX MOV qword ptr [RBX + 0x40],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOV qword ptr [RBX + 0x48],RAX MOV qword ptr [RBX + 0x50],RAX MOV qword ptr [RBX + 0x58],RCX LEA RBP,[RBX + 0x60] MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] LAB_001685fb: LEA RCX,[RSP + 0x5] MOV RDI,RBP CALL 0x00187672 MOV qword ptr [RBX + 0x78],R13 MOV qword ptr [RBX + 0x80],R12 MOV qword ptr [RBX + 0x88],0x0 LEA RDI,[RBX + 0x90] LEA RAX,[RBX + 0xa0] MOV qword ptr [RBX + 0x90],RAX MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] ADD RDX,RSI LAB_0016863d: CALL 0x0012c6a6 LAB_00168642: MOV byte ptr [RBX + 0xb0],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0xb8],XMM0 MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RBX + 0xc8],RAX MOV qword ptr [RBX + 0xd0],0x0 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_arg::common_arg(std::initializer_list<char const*> const&, char const*, char const*, std::__cxx11::string const&, void (*)(common_params&, std::__cxx11::string const&, std::__cxx11::string const&)) */ void __thiscall common_arg::common_arg (common_arg *this,initializer_list *param_1,char *param_2,char *param_3,string *param_4, _func_void_common_params_ptr_string_ptr_string_ptr *param_5) { int1 local_43; int1 local_42; int1 local_41; _func_void_common_params_ptr_string_ptr_string_ptr *local_40; int4 local_34; local_34 = 0; local_40 = param_5; std::set<llama_example,std::less<llama_example>,std::allocator<llama_example>>::set (this,&local_34,1,&local_41,&local_42); *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(common_arg **)(this + 0x48) = this + 0x38; *(common_arg **)(this + 0x50) = this + 0x38; *(int8 *)(this + 0x58) = 0; /* try { // try from 001685fb to 00168607 has its CatchHandler @ 00168693 */ std::vector<char_const*,std::allocator<char_const*>>::vector ((vector<char_const*,std::allocator<char_const*>> *)(this + 0x60),*(int8 *)param_1 ,*(int8 *)(param_1 + 8),&local_43); *(char **)(this + 0x78) = param_2; *(char **)(this + 0x80) = param_3; *(int8 *)(this + 0x88) = 0; *(common_arg **)(this + 0x90) = this + 0xa0; /* try { // try from 0016863d to 00168641 has its CatchHandler @ 00168679 */ std::__cxx11::string::_M_construct<char*> (this + 0x90,*(long *)param_4,*(long *)(param_4 + 8) + *(long *)param_4); this[0xb0] = (common_arg)0x0; *(int8 *)(this + 0xb8) = 0; *(int8 *)(this + 0xc0) = 0; *(_func_void_common_params_ptr_string_ptr_string_ptr **)(this + 200) = local_40; *(int8 *)(this + 0xd0) = 0; return; }
17,939
my_uca_scanner_next_implicit
eloqsql/strings/ctype-uca.c
static inline int my_uca_scanner_next_implicit(my_uca_scanner *scanner) { switch (scanner->level->levelno) { case 0: return my_uca_scanner_next_implicit_primary(scanner);/* Primary level*/ case 1: scanner->wbeg= nochar; return 0x0020; /* Secondary level */ case 2: scanner->wbeg= nochar; return 0x0002; /* Tertiary level */ default: scanner->wbeg= nochar; break; } DBUG_ASSERT(0); return 0; }
O0
c
my_uca_scanner_next_implicit: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movl 0x30(%rax), %eax movl %eax, -0x14(%rbp) testl %eax, %eax je 0x51ac4 jmp 0x51ab0 movl -0x14(%rbp), %eax subl $0x1, %eax je 0x51ad2 jmp 0x51aba movl -0x14(%rbp), %eax subl $0x2, %eax je 0x51ae9 jmp 0x51b00 movq -0x10(%rbp), %rdi callq 0x51e10 movl %eax, -0x4(%rbp) jmp 0x51b19 movq -0x10(%rbp), %rax leaq 0x15faf3(%rip), %rcx # 0x1b15d0 movq %rcx, (%rax) movl $0x20, -0x4(%rbp) jmp 0x51b19 movq -0x10(%rbp), %rax leaq 0x15fadc(%rip), %rcx # 0x1b15d0 movq %rcx, (%rax) movl $0x2, -0x4(%rbp) jmp 0x51b19 movq -0x10(%rbp), %rax leaq 0x15fac5(%rip), %rcx # 0x1b15d0 movq %rcx, (%rax) jmp 0x51b10 jmp 0x51b12 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_uca_scanner_next_implicit: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax+18h] mov eax, [rax+30h] mov [rbp+var_14], eax test eax, eax jz short loc_51AC4 jmp short $+2 loc_51AB0: mov eax, [rbp+var_14] sub eax, 1 jz short loc_51AD2 jmp short $+2 loc_51ABA: mov eax, [rbp+var_14] sub eax, 2 jz short loc_51AE9 jmp short loc_51B00 loc_51AC4: mov rdi, [rbp+var_10] call my_uca_scanner_next_implicit_primary mov [rbp+var_4], eax jmp short loc_51B19 loc_51AD2: mov rax, [rbp+var_10] lea rcx, nochar mov [rax], rcx mov [rbp+var_4], 20h ; ' ' jmp short loc_51B19 loc_51AE9: mov rax, [rbp+var_10] lea rcx, nochar mov [rax], rcx mov [rbp+var_4], 2 jmp short loc_51B19 loc_51B00: mov rax, [rbp+var_10] lea rcx, nochar mov [rax], rcx jmp short $+2 loc_51B10: jmp short $+2 loc_51B12: mov [rbp+var_4], 0 loc_51B19: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long my_uca_scanner_next_implicit(_QWORD *a1) { int v2; // [rsp+Ch] [rbp-14h] v2 = *(_DWORD *)(a1[3] + 48LL); if ( v2 ) { if ( v2 == 1 ) { *a1 = &nochar; return 32; } else { *a1 = &nochar; if ( v2 == 2 ) return 2; else return 0; } } else { return (unsigned int)my_uca_scanner_next_implicit_primary(a1); } }
my_uca_scanner_next_implicit: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV EAX,dword ptr [RAX + 0x30] MOV dword ptr [RBP + -0x14],EAX TEST EAX,EAX JZ 0x00151ac4 JMP 0x00151ab0 LAB_00151ab0: MOV EAX,dword ptr [RBP + -0x14] SUB EAX,0x1 JZ 0x00151ad2 JMP 0x00151aba LAB_00151aba: MOV EAX,dword ptr [RBP + -0x14] SUB EAX,0x2 JZ 0x00151ae9 JMP 0x00151b00 LAB_00151ac4: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00151e10 MOV dword ptr [RBP + -0x4],EAX JMP 0x00151b19 LAB_00151ad2: MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x2b15d0] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x20 JMP 0x00151b19 LAB_00151ae9: MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x2b15d0] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x2 JMP 0x00151b19 LAB_00151b00: MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x2b15d0] MOV qword ptr [RAX],RCX JMP 0x00151b10 LAB_00151b10: JMP 0x00151b12 LAB_00151b12: MOV dword ptr [RBP + -0x4],0x0 LAB_00151b19: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 my_uca_scanner_next_implicit(int8 *param_1) { int iVar1; int4 local_c; iVar1 = *(int *)(param_1[3] + 0x30); if (iVar1 == 0) { local_c = my_uca_scanner_next_implicit_primary(param_1); } else if (iVar1 == 1) { *param_1 = &nochar; local_c = 0x20; } else if (iVar1 == 2) { *param_1 = &nochar; local_c = 2; } else { *param_1 = &nochar; local_c = 0; } return local_c; }
17,940
mysql_stmt_free_result_start
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_stmt_free_result_start(my_bool *ret, MYSQL_STMT *stmt) { MK_ASYNC_START_BODY( mysql_stmt_free_result, stmt->mysql, { WIN_SET_NONBLOCKING(stmt->mysql) parms.stmt= stmt; }, TRUE, r_my_bool, /* If stmt->mysql==NULL then we will not block so can call directly. */ if (!stmt->mysql) { *ret= mysql_stmt_free_result(stmt); return 0; }) }
O3
c
mysql_stmt_free_result_start: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq 0x38(%rsi), %rax testq %rax, %rax je 0x2cbf9 movq 0x480(%rax), %rax movq 0x28(%rax), %r15 leaq -0x20(%rbp), %rdx movq %r14, (%rdx) movb $0x1, 0x14(%r15) leaq 0x38(%r15), %rdi leaq 0x9f(%rip), %rsi # 0x2cc7e callq 0x2da54 movw $0x0, 0x14(%r15) testl %eax, %eax jle 0x2cc03 movb $0x1, 0x15(%r15) movl (%r15), %eax jmp 0x2cc73 movq %r14, %rdi callq 0x20b04 jmp 0x2cc6f js 0x2cc0b movb 0x8(%r15), %al jmp 0x2cc6f movq 0x38(%r14), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movl $0x297, %edi # imm = 0x297 addq 0x38(%r14), %rdi leaq 0x1be97(%rip), %rax # 0x48ac0 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 movq 0x38(%r14), %rax xorl %r15d, %r15d movb %r15b, 0x29c(%rax) movl $0x97, %edi addq 0x38(%r14), %rdi leaq 0x1be7c(%rip), %rax # 0x48ad0 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13220 movq 0x38(%r14), %rax movb %r15b, 0x296(%rax) movb $0x1, %al movb %al, (%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
mysql_stmt_free_result_start: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, rsi mov rbx, rdi mov rax, [rsi+38h] test rax, rax jz short loc_2CBF9 mov rax, [rax+480h] mov r15, [rax+28h] lea rdx, [rbp+var_20] mov [rdx], r14 mov byte ptr [r15+14h], 1 lea rdi, [r15+38h] lea rsi, mysql_stmt_free_result_start_internal call my_context_spawn mov word ptr [r15+14h], 0 test eax, eax jle short loc_2CC03 mov byte ptr [r15+15h], 1 mov eax, [r15] jmp short loc_2CC73 loc_2CBF9: mov rdi, r14 call mysql_stmt_free_result jmp short loc_2CC6F loc_2CC03: js short loc_2CC0B mov al, [r15+8] jmp short loc_2CC6F loc_2CC0B: 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 al, 1 loc_2CC6F: mov [rbx], al xor eax, eax loc_2CC73: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long mysql_stmt_free_result_start(char *a1, long long a2) { long long v2; // rax long long v3; // rax _BYTE *v4; // r15 int v5; // eax char v7; // al long long v8[4]; // [rsp+0h] [rbp-20h] BYREF v8[0] = v2; v3 = *(_QWORD *)(a2 + 56); if ( v3 ) { v4 = *(_BYTE **)(*(_QWORD *)(v3 + 1152) + 40LL); v8[0] = a2; v4[20] = 1; v5 = my_context_spawn(v4 + 56, mysql_stmt_free_result_start_internal, v8); *((_WORD *)v4 + 10) = 0; if ( v5 > 0 ) { v4[21] = 1; return *(unsigned int *)v4; } if ( v5 < 0 ) { *(_DWORD *)(*(_QWORD *)(a2 + 56) + 144LL) = 2008; strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[8], 511LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0; v7 = 1; } else { v7 = v4[8]; } } else { v7 = mysql_stmt_free_result(a2); } *a1 = v7; return 0LL; }
mysql_stmt_free_result_start: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr [RSI + 0x38] TEST RAX,RAX JZ 0x0012cbf9 MOV RAX,qword ptr [RAX + 0x480] MOV R15,qword ptr [RAX + 0x28] LEA RDX,[RBP + -0x20] MOV qword ptr [RDX],R14 MOV byte ptr [R15 + 0x14],0x1 LEA RDI,[R15 + 0x38] LEA RSI,[0x12cc7e] CALL 0x0012da54 MOV word ptr [R15 + 0x14],0x0 TEST EAX,EAX JLE 0x0012cc03 MOV byte ptr [R15 + 0x15],0x1 MOV EAX,dword ptr [R15] JMP 0x0012cc73 LAB_0012cbf9: MOV RDI,R14 CALL 0x00120b04 JMP 0x0012cc6f LAB_0012cc03: JS 0x0012cc0b MOV AL,byte ptr [R15 + 0x8] JMP 0x0012cc6f LAB_0012cc0b: MOV RAX,qword ptr [R14 + 0x38] MOV dword ptr [RAX + 0x90],0x7d8 MOV EDI,0x297 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x148ac0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 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,[0x148ad0] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x00113220 MOV RAX,qword ptr [R14 + 0x38] MOV byte ptr [RAX + 0x296],R15B MOV AL,0x1 LAB_0012cc6f: MOV byte ptr [RBX],AL XOR EAX,EAX LAB_0012cc73: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int4 mysql_stmt_free_result_start(int1 *param_1,long param_2) { int4 *puVar1; int1 uVar2; int iVar3; if (*(long *)(param_2 + 0x38) == 0) { uVar2 = mysql_stmt_free_result(param_2); } else { puVar1 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28); *(int1 *)(puVar1 + 5) = 1; iVar3 = my_context_spawn(puVar1 + 0xe,mysql_stmt_free_result_start_internal); *(int2 *)(puVar1 + 5) = 0; if (0 < iVar3) { *(int1 *)((long)puVar1 + 0x15) = 1; return *puVar1; } if (iVar3 < 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_00148b10, 0x1ff); *(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0; uVar2 = 1; } else { uVar2 = *(int1 *)(puVar1 + 2); } } *param_1 = uVar2; return 0; }
17,941
translog_buffer_destroy
eloqsql/storage/maria/ma_loghandler.c
static void translog_buffer_destroy(struct st_translog_buffer *buffer) { DBUG_ENTER("translog_buffer_destroy"); DBUG_PRINT("enter", ("Buffer #%u: %p file: %d offset: " LSN_FMT " size: %lu", (uint) buffer->buffer_no, buffer, (buffer->file ? buffer->file->handler.file : -1), LSN_IN_PARTS(buffer->offset), (ulong) buffer->size)); if (buffer->file != NULL) { /* We ignore errors here, because we can't do something about it (it is shutting down) We also have to take the locks even if there can't be any other threads running, because translog_buffer_flush() requires that we have the buffer locked. */ translog_buffer_lock(buffer); translog_buffer_flush(buffer); translog_buffer_unlock(buffer); } DBUG_PRINT("info", ("Destroy mutex: %p", &buffer->mutex)); mysql_mutex_destroy(&buffer->mutex); mysql_cond_destroy(&buffer->waiting_filling_buffer); DBUG_VOID_RETURN; }
O0
c
translog_buffer_destroy: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) jmp 0x8b9ee movq -0x8(%rbp), %rax cmpq $0x0, 0x100038(%rax) je 0x8ba17 movq -0x8(%rbp), %rdi callq 0x87dc0 movq -0x8(%rbp), %rdi callq 0x8dff0 movq -0x8(%rbp), %rdi callq 0x87e00 jmp 0x8ba19 jmp 0x8ba1b movq -0x8(%rbp), %rdi addq $0x100090, %rdi # imm = 0x100090 callq 0x8bb10 movq -0x8(%rbp), %rdi addq $0x100040, %rdi # imm = 0x100040 callq 0x8bb60 jmp 0x8ba3d addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
translog_buffer_destroy: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi jmp short $+2 loc_8B9EE: mov rax, [rbp+var_8] cmp qword ptr [rax+100038h], 0 jz short loc_8BA17 mov rdi, [rbp+var_8] call translog_buffer_lock mov rdi, [rbp+var_8] call translog_buffer_flush mov rdi, [rbp+var_8] call translog_buffer_unlock loc_8BA17: jmp short $+2 loc_8BA19: jmp short $+2 loc_8BA1B: mov rdi, [rbp+var_8] add rdi, 100090h call inline_mysql_mutex_destroy_3 mov rdi, [rbp+var_8] add rdi, 100040h call inline_mysql_cond_destroy_1 jmp short $+2 loc_8BA3D: add rsp, 10h pop rbp retn
long long translog_buffer_destroy(long long a1) { if ( *(_QWORD *)(a1 + 1048632) ) { translog_buffer_lock(a1); translog_buffer_flush(a1); translog_buffer_unlock(a1); } inline_mysql_mutex_destroy_3(a1 + 1048720); return inline_mysql_cond_destroy_1(a1 + 1048640); }
translog_buffer_destroy: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI JMP 0x0018b9ee LAB_0018b9ee: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x100038],0x0 JZ 0x0018ba17 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00187dc0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x0018dff0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00187e00 LAB_0018ba17: JMP 0x0018ba19 LAB_0018ba19: JMP 0x0018ba1b LAB_0018ba1b: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x100090 CALL 0x0018bb10 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x100040 CALL 0x0018bb60 JMP 0x0018ba3d LAB_0018ba3d: ADD RSP,0x10 POP RBP RET
void translog_buffer_destroy(long param_1) { if (*(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f) != 0) { translog_buffer_lock(param_1); translog_buffer_flush(param_1); translog_buffer_unlock(param_1); } inline_mysql_mutex_destroy(param_1 + 0x100090); inline_mysql_cond_destroy((long)&Elf64_Phdr_ARRAY_00100040[0].p_type + param_1); return; }
17,942
exchange_bytes
bluesky950520[P]quickjs/cutils.c
static void exchange_bytes(void *a, void *b, size_t size) { uint8_t *ap = (uint8_t *)a; uint8_t *bp = (uint8_t *)b; while (size-- != 0) { uint8_t t = *ap; *ap++ = *bp; *bp++ = t; } }
O0
c
exchange_bytes: movq %rdi, -0x8(%rsp) movq %rsi, -0x10(%rsp) movq %rdx, -0x18(%rsp) movq -0x8(%rsp), %rax movq %rax, -0x20(%rsp) movq -0x10(%rsp), %rax movq %rax, -0x28(%rsp) movq -0x18(%rsp), %rax movq %rax, %rcx addq $-0x1, %rcx movq %rcx, -0x18(%rsp) cmpq $0x0, %rax je 0x215d8 movq -0x20(%rsp), %rax movb (%rax), %al movb %al, -0x29(%rsp) movq -0x28(%rsp), %rax movb (%rax), %cl movq -0x20(%rsp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rsp) movb %cl, (%rax) movb -0x29(%rsp), %cl movq -0x28(%rsp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x28(%rsp) movb %cl, (%rax) jmp 0x21583 retq nopl (%rax)
exchange_bytes: mov [rsp+var_8], rdi mov [rsp+var_10], rsi mov [rsp+var_18], rdx mov rax, [rsp+var_8] mov [rsp+var_20], rax mov rax, [rsp+var_10] mov [rsp+var_28], rax loc_21583: mov rax, [rsp+var_18] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFFFh mov [rsp+var_18], rcx cmp rax, 0 jz short locret_215D8 mov rax, [rsp+var_20] mov al, [rax] mov [rsp+var_29], al mov rax, [rsp+var_28] mov cl, [rax] mov rax, [rsp+var_20] mov rdx, rax add rdx, 1 mov [rsp+var_20], rdx mov [rax], cl mov cl, [rsp+var_29] mov rax, [rsp+var_28] mov rdx, rax add rdx, 1 mov [rsp+var_28], rdx mov [rax], cl jmp short loc_21583 locret_215D8: retn
long long exchange_bytes(char *a1, char *a2, long long a3) { long long result; // rax char *v4; // rax char *v5; // rax char v6; // [rsp+1h] [rbp-29h] while ( 1 ) { result = a3--; if ( !result ) break; v6 = *a1; v4 = a1++; *v4 = *a2; v5 = a2++; *v5 = v6; } return result; }
exchange_bytes: MOV qword ptr [RSP + -0x8],RDI MOV qword ptr [RSP + -0x10],RSI MOV qword ptr [RSP + -0x18],RDX MOV RAX,qword ptr [RSP + -0x8] MOV qword ptr [RSP + -0x20],RAX MOV RAX,qword ptr [RSP + -0x10] MOV qword ptr [RSP + -0x28],RAX LAB_00121583: MOV RAX,qword ptr [RSP + -0x18] MOV RCX,RAX ADD RCX,-0x1 MOV qword ptr [RSP + -0x18],RCX CMP RAX,0x0 JZ 0x001215d8 MOV RAX,qword ptr [RSP + -0x20] MOV AL,byte ptr [RAX] MOV byte ptr [RSP + -0x29],AL MOV RAX,qword ptr [RSP + -0x28] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RSP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RSP + -0x20],RDX MOV byte ptr [RAX],CL MOV CL,byte ptr [RSP + -0x29] MOV RAX,qword ptr [RSP + -0x28] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RSP + -0x28],RDX MOV byte ptr [RAX],CL JMP 0x00121583 LAB_001215d8: RET
void exchange_bytes(int1 *param_1,int1 *param_2,long param_3) { int1 uVar1; int1 *local_28; int1 *local_20; long local_18; local_28 = param_2; local_20 = param_1; local_18 = param_3; while (local_18 != 0) { uVar1 = *local_20; *local_20 = *local_28; *local_28 = uVar1; local_28 = local_28 + 1; local_20 = local_20 + 1; local_18 = local_18 + -1; } return; }
17,943
exchange_bytes
bluesky950520[P]quickjs/cutils.c
static void exchange_bytes(void *a, void *b, size_t size) { uint8_t *ap = (uint8_t *)a; uint8_t *bp = (uint8_t *)b; while (size-- != 0) { uint8_t t = *ap; *ap++ = *bp; *bp++ = t; } }
O1
c
exchange_bytes: testq %rdx, %rdx je 0x1c990 xorl %eax, %eax movb (%rdi,%rax), %cl movb (%rsi,%rax), %r8b movb %r8b, (%rdi,%rax) movb %cl, (%rsi,%rax) incq %rax cmpq %rax, %rdx jne 0x1c97a retq nopl (%rax)
exchange_bytes: test rdx, rdx jz short locret_1C990 xor eax, eax loc_1C97A: mov cl, [rdi+rax] mov r8b, [rsi+rax] mov [rdi+rax], r8b mov [rsi+rax], cl inc rax cmp rdx, rax jnz short loc_1C97A locret_1C990: retn
void exchange_bytes(long long a1, long long a2, long long a3) { long long i; // rax char v4; // cl if ( a3 ) { for ( i = 0LL; i != a3; ++i ) { v4 = *(_BYTE *)(a1 + i); *(_BYTE *)(a1 + i) = *(_BYTE *)(a2 + i); *(_BYTE *)(a2 + i) = v4; } } }
exchange_bytes: TEST RDX,RDX JZ 0x0011c990 XOR EAX,EAX LAB_0011c97a: MOV CL,byte ptr [RDI + RAX*0x1] MOV R8B,byte ptr [RSI + RAX*0x1] MOV byte ptr [RDI + RAX*0x1],R8B MOV byte ptr [RSI + RAX*0x1],CL INC RAX CMP RDX,RAX JNZ 0x0011c97a LAB_0011c990: RET
void exchange_bytes(long param_1,long param_2,long param_3) { int1 uVar1; long lVar2; if (param_3 != 0) { lVar2 = 0; do { uVar1 = *(int1 *)(param_1 + lVar2); *(int1 *)(param_1 + lVar2) = *(int1 *)(param_2 + lVar2); *(int1 *)(param_2 + lVar2) = uVar1; lVar2 = lVar2 + 1; } while (param_3 != lVar2); } return; }
17,944
LefDefParser::lefwEndVia(char const*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwEndVia(const char *viaName) { if (!lefwFile) return LEFW_UNINITIALIZED; if (lefwState != LEFW_VIA_START && lefwState != LEFW_VIA && lefwState != LEFW_VIAVIARULE) return LEFW_BAD_ORDER; if (lefwWriteEncrypt) encPrint(lefwFile, (char*) "END %s\n\n", viaName); else fprintf(lefwFile, "END %s\n\n", viaName); lefwLines++; lefwState = LEFW_VIA_END; lefwDidLayer = 0; return LEFW_OK; }
O3
cpp
LefDefParser::lefwEndVia(char const*): pushq %rbx movq %rdi, %rdx leaq 0x15d10(%rip), %rax # 0x24e00 movq (%rax), %rdi testq %rdi, %rdi je 0xf137 leaq 0x15f51(%rip), %rbx # 0x25050 movl (%rbx), %ecx movl $0x2, %eax addl $-0xf, %ecx cmpl $0x3f, %ecx ja 0xf16a movabsq $-0x7dffffffffffffff, %rsi # imm = 0x8200000000000001 btq %rcx, %rsi jae 0xf16a cmpb $0x1, 0x15fc7(%rip) # 0x250ec jne 0xf13e leaq 0xc2ad(%rip), %rsi # 0x1b3db xorl %eax, %eax callq 0x18c35 jmp 0xf14c movl $0x1, %eax jmp 0xf16a leaq 0xc296(%rip), %rsi # 0x1b3db xorl %eax, %eax callq 0x10f0 leaq 0x15ef9(%rip), %rax # 0x2504c incl (%rax) movl $0x5d, (%rbx) leaq 0x15ef6(%rip), %rax # 0x25058 movl $0x0, (%rax) xorl %eax, %eax popq %rbx retq
_ZN12LefDefParser10lefwEndViaEPKc: push rbx mov rdx, rdi lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] test rdi, rdi jz short loc_F137 lea rbx, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov ecx, [rbx] mov eax, 2 add ecx, 0FFFFFFF1h cmp ecx, 3Fh ; '?' ja short loc_F16A mov rsi, 8200000000000001h bt rsi, rcx jnb short loc_F16A cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt jnz short loc_F13E lea rsi, aEndS+3; "END %s\n\n" xor eax, eax call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_F14C loc_F137: mov eax, 1 jmp short loc_F16A loc_F13E: lea rsi, aEndS+3; "END %s\n\n" xor eax, eax call _fprintf loc_F14C: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines inc dword ptr [rax] mov dword ptr [rbx], 5Dh ; ']' lea rax, _ZN12LefDefParser12lefwDidLayerE; LefDefParser::lefwDidLayer mov dword ptr [rax], 0 xor eax, eax loc_F16A: pop rbx retn
long long LefDefParser::lefwEndVia(LefDefParser *this, const char *a2, long long a3, long long a4, int a5, int a6) { long long result; // rax unsigned long long v7; // rcx unsigned long long v8; // rsi if ( !*(_QWORD *)&LefDefParser::lefwFile ) return 1LL; result = 2LL; v7 = LefDefParser::lefwState - 15; if ( (unsigned int)v7 <= 0x3F ) { v8 = 0x8200000000000001LL; if ( _bittest64((const long long *)&v8, v7) ) { if ( LefDefParser::lefwWriteEncrypt == 1 ) LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)"END %s\n\n", (_DWORD)this, v7, a5, a6); else fprintf(*(_QWORD *)&LefDefParser::lefwFile, "END %s\n\n", (const char *)this); ++LefDefParser::lefwLines; LefDefParser::lefwState = 93; LefDefParser::lefwDidLayer = 0; return 0LL; } } return result; }
lefwEndVia: PUSH RBX MOV RDX,RDI LEA RAX,[0x124e00] MOV RDI,qword ptr [RAX] TEST RDI,RDI JZ 0x0010f137 LEA RBX,[0x125050] MOV ECX,dword ptr [RBX] MOV EAX,0x2 ADD ECX,-0xf CMP ECX,0x3f JA 0x0010f16a MOV RSI,-0x7dffffffffffffff BT RSI,RCX JNC 0x0010f16a CMP byte ptr [0x001250ec],0x1 JNZ 0x0010f13e LEA RSI,[0x11b3db] XOR EAX,EAX CALL 0x00118c35 JMP 0x0010f14c LAB_0010f137: MOV EAX,0x1 JMP 0x0010f16a LAB_0010f13e: LEA RSI,[0x11b3db] XOR EAX,EAX CALL 0x001010f0 LAB_0010f14c: LEA RAX,[0x12504c] INC dword ptr [RAX] MOV dword ptr [RBX],0x5d LEA RAX,[0x125058] MOV dword ptr [RAX],0x0 XOR EAX,EAX LAB_0010f16a: POP RBX RET
/* LefDefParser::lefwEndVia(char const*) */ int8 LefDefParser::lefwEndVia(char *param_1) { int8 uVar1; if (lefwFile == (_IO_FILE *)0x0) { uVar1 = 1; } else { uVar1 = 2; if ((lefwState - 0xfU < 0x40) && ((0x8200000000000001U >> ((ulong)(lefwState - 0xfU) & 0x3f) & 1) != 0)) { if (lefwWriteEncrypt == '\x01') { encPrint(lefwFile,"END %s\n\n"); } else { fprintf(lefwFile,"END %s\n\n",param_1); } lefwLines = lefwLines + 1; lefwState = 0x5d; lefwDidLayer = 0; uVar1 = 0; } } return uVar1; }
17,945
mysql_local_infile_end
eloqsql/libmariadb/libmariadb/ma_loaddata.c
static void mysql_local_infile_end(void *ptr) { MYSQL_INFILE_INFO *info = (MYSQL_INFILE_INFO *)ptr; if (info) { if (info->fp) ma_close(info->fp); free(ptr); } return; }
O3
c
mysql_local_infile_end: testq %rdi, %rdi je 0x25019 pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx movq (%rdi), %rdi testq %rdi, %rdi je 0x2500b callq 0x2a14c movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %rbp jmp 0x13570 retq
mysql_local_infile_end: test rdi, rdi jz short locret_25019 push rbp mov rbp, rsp push rbx push rax mov rbx, rdi mov rdi, [rdi] test rdi, rdi jz short loc_2500B call ma_close loc_2500B: mov rdi, rbx add rsp, 8 pop rbx pop rbp jmp _free locret_25019: retn
long long mysql_local_infile_end(long long *a1) { long long v2; // rdi long long result; // rax if ( a1 ) { v2 = *a1; if ( v2 ) ma_close(v2); return free(a1); } return result; }
mysql_local_infile_end: TEST RDI,RDI JZ 0x00125019 PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI MOV RDI,qword ptr [RDI] TEST RDI,RDI JZ 0x0012500b CALL 0x0012a14c LAB_0012500b: MOV RDI,RBX ADD RSP,0x8 POP RBX POP RBP JMP 0x00113570 LAB_00125019: RET
void mysql_local_infile_end(long *param_1) { if (param_1 != (long *)0x0) { if (*param_1 != 0) { ma_close(); } free(param_1); return; } return; }
17,946
minja::Parser::parseLogicalNot()
monkey531[P]llama/common/minja.hpp
std::shared_ptr<Expression> parseLogicalNot() { static std::regex not_tok(R"(not\b)"); auto location = get_location(); if (!consumeToken(not_tok).empty()) { auto sub = parseLogicalNot(); if (!sub) throw std::runtime_error("Expected expression after 'not' keyword"); return std::make_shared<UnaryOpExpr>(location, std::move(sub), UnaryOpExpr::Op::LogicalNot); } return parseLogicalCompare(); }
O3
cpp
minja::Parser::parseLogicalNot(): pushq %r15 pushq %r14 pushq %rbx subq $0x60, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0xa9172(%rip), %rax # 0x13c078 movb (%rax), %al testb %al, %al je 0x93010 movq (%r14), %rax movq %rax, 0x30(%rsp) movq 0x8(%r14), %rax movq %rax, 0x38(%rsp) testq %rax, %rax je 0x92f3b movq 0xa8053(%rip), %rcx # 0x13af80 cmpb $0x0, (%rcx) je 0x92f37 incl 0x8(%rax) jmp 0x92f3b lock incl 0x8(%rax) movq 0x20(%r14), %rax subq 0x10(%r14), %rax movq %rax, 0x40(%rsp) leaq 0xa9109(%rip), %rdx # 0x13c058 leaq 0x10(%rsp), %rdi movq %r14, %rsi movl $0x1, %ecx callq 0x91696 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi movq -0x8(%rax), %r15 cmpq %rax, %rdi je 0x92f80 movq 0x20(%rsp), %rsi incq %rsi callq 0x1b8f0 testq %r15, %r15 je 0x92fe9 leaq 0x10(%rsp), %rdi movq %r14, %rsi callq 0x92ef0 cmpq $0x0, 0x10(%rsp) je 0x93067 leaq 0x4c(%rsp), %r9 movl $0x2, (%r9) leaq 0x58(%rsp), %rdi movq $0x0, -0x8(%rdi) leaq 0x50(%rsp), %rsi leaq 0xf(%rsp), %rdx leaq 0x30(%rsp), %rcx leaq 0x10(%rsp), %r8 callq 0x937bc movaps 0x50(%rsp), %xmm0 movups %xmm0, (%rbx) movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x92ff4 callq 0x7b578 jmp 0x92ff4 movq %rbx, %rdi movq %r14, %rsi callq 0x930ec movq 0x38(%rsp), %rdi testq %rdi, %rdi je 0x93003 callq 0x7b578 movq %rbx, %rax addq $0x60, %rsp popq %rbx popq %r14 popq %r15 retq leaq 0xa9061(%rip), %rdi # 0x13c078 callq 0x1c090 testl %eax, %eax je 0x92f10 leaq 0xa902d(%rip), %rdi # 0x13c058 leaq 0x6aca4(%rip), %rsi # 0xfdcd6 movl $0x10, %edx callq 0x70506 leaq -0x22839(%rip), %rdi # 0x7080a leaq 0xa900e(%rip), %rsi # 0x13c058 leaq 0xa88e7(%rip), %rdx # 0x13b938 callq 0x1b7d0 leaq 0xa901b(%rip), %rdi # 0x13c078 callq 0x1b5c0 jmp 0x92f10 movl $0x10, %edi callq 0x1b450 movq %rax, %r14 leaq 0x6ac61(%rip), %rsi # 0xfdcdc movq %rax, %rdi callq 0x1b330 movq 0xa7f5e(%rip), %rsi # 0x13afe8 movq 0xa7ec7(%rip), %rdx # 0x13af58 movq %r14, %rdi callq 0x1bf90 movq %rax, %rbx leaq 0xa8fd5(%rip), %rdi # 0x13c078 callq 0x1b5b0 jmp 0x930e3 jmp 0x930bb movq %rax, %rbx movq %r14, %rdi callq 0x1b680 jmp 0x930be jmp 0x930d1 movq %rax, %rbx movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x930d4 callq 0x7b578 jmp 0x930d4 jmp 0x930d1 movq %rax, %rbx movq 0x38(%rsp), %rdi testq %rdi, %rdi je 0x930e3 callq 0x7b578 movq %rbx, %rdi callq 0x1c020 nop
_ZN5minja6Parser15parseLogicalNotEv: push r15 push r14 push rbx sub rsp, 60h mov r14, rsi mov rbx, rdi lea rax, _ZGVZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; `guard variable for'minja::Parser::parseLogicalNot(void)::not_tok mov al, [rax] test al, al jz loc_93010 loc_92F10: mov rax, [r14] mov [rsp+78h+var_48], rax mov rax, [r14+8] mov [rsp+78h+var_40], rax test rax, rax jz short loc_92F3B mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_92F37 inc dword ptr [rax+8] jmp short loc_92F3B loc_92F37: lock inc dword ptr [rax+8] loc_92F3B: mov rax, [r14+20h] sub rax, [r14+10h] mov [rsp+78h+var_38], rax lea rdx, _ZZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; minja::Parser::parseLogicalNot(void)::not_tok lea rdi, [rsp+78h+var_68] mov rsi, r14 mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) lea rax, [rsp+78h+var_58] mov rdi, [rax-10h]; void * mov r15, [rax-8] cmp rdi, rax jz short loc_92F80 mov rsi, [rsp+78h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_92F80: test r15, r15 jz short loc_92FE9 lea rdi, [rsp+78h+var_68]; this mov rsi, r14 call _ZN5minja6Parser15parseLogicalNotEv; minja::Parser::parseLogicalNot(void) cmp [rsp+78h+var_68], 0 jz loc_93067 lea r9, [rsp+78h+var_2C] mov dword ptr [r9], 2 lea rdi, [rsp+78h+var_28+8] mov qword ptr [rdi-8], 0 lea rsi, [rsp+78h+var_28] lea rdx, [rsp+78h+var_69] lea rcx, [rsp+78h+var_48] lea r8, [rsp+78h+var_68] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN5minja11UnaryOpExprESaIS5_EJRNS4_8LocationESt10shared_ptrINS4_10ExpressionEENS5_2OpEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location &,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>(minja::UnaryOpExpr *&,std::_Sp_alloc_shared_tag<std::allocator<minja::UnaryOpExpr>>,minja::Location &,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &&) movaps xmm0, [rsp+78h+var_28] movups xmmword ptr [rbx], xmm0 mov rdi, [rsp+78h+var_60] test rdi, rdi jz short loc_92FF4 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp short loc_92FF4 loc_92FE9: mov rdi, rbx; this mov rsi, r14 call _ZN5minja6Parser19parseLogicalCompareEv; minja::Parser::parseLogicalCompare(void) loc_92FF4: mov rdi, [rsp+78h+var_40] test rdi, rdi jz short loc_93003 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_93003: mov rax, rbx add rsp, 60h pop rbx pop r14 pop r15 retn loc_93010: lea rdi, _ZGVZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_92F10 lea rdi, _ZZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; minja::Parser::parseLogicalNot(void)::not_tok lea rsi, aNotB; "not\\b" mov edx, 10h call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; __guard * call ___cxa_guard_release jmp loc_92F10 loc_93067: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpectedExpres_2; "Expected expression after 'not' keyword" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw mov rbx, rax lea rdi, _ZGVZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_930E3 jmp short loc_930BB mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_930BE jmp short loc_930D1 loc_930BB: mov rbx, rax loc_930BE: mov rdi, [rsp+78h+var_60] test rdi, rdi jz short loc_930D4 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp short loc_930D4 jmp short $+2 loc_930D1: mov rbx, rax loc_930D4: mov rdi, [rsp+78h+var_40] test rdi, rdi jz short loc_930E3 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_930E3: mov rdi, rbx call __Unwind_Resume
minja::Parser * minja::Parser::parseLogicalNot(minja::Parser *this, long long *a2) { volatile signed __int32 *v2; // rax volatile signed __int32 *v3; // r15 std::runtime_error *exception; // r14 char v6; // [rsp+Fh] [rbp-69h] BYREF long long *v7; // [rsp+10h] [rbp-68h] BYREF volatile signed __int32 *v8; // [rsp+18h] [rbp-60h] long long v9; // [rsp+20h] [rbp-58h] BYREF long long v10; // [rsp+30h] [rbp-48h] BYREF volatile signed __int32 *v11; // [rsp+38h] [rbp-40h] long long v12; // [rsp+40h] [rbp-38h] int v13; // [rsp+4Ch] [rbp-2Ch] _OWORD v14[2]; // [rsp+50h] [rbp-28h] BYREF if ( !(_BYTE)`guard variable for'minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11], (long long)"not\\b", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11]); } v10 = *a2; v2 = (volatile signed __int32 *)a2[1]; v11 = v2; if ( v2 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v2 + 2); else _InterlockedIncrement(v2 + 2); } v12 = a2[4] - a2[2]; minja::Parser::consumeToken( (long long)&v7, (long long)a2, (long long)&minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11], 1u); v3 = v8; if ( v7 != &v9 ) operator delete(v7, v9 + 1); if ( v3 ) { minja::Parser::parseLogicalNot((minja::Parser *)&v7); if ( !v7 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected expression after 'not' keyword"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v13 = 2; *(_QWORD *)&v14[0] = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location &,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>( (char *)v14 + 8, v14, &v6, &v10, &v7); *(_OWORD *)this = v14[0]; if ( v8 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v8); } else { minja::Parser::parseLogicalCompare(this); } if ( v11 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11); return this; }
parseLogicalNot: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x60 MOV R14,RSI MOV RBX,RDI LEA RAX,[0x23c078] MOV AL,byte ptr [RAX] TEST AL,AL JZ 0x00193010 LAB_00192f10: MOV RAX,qword ptr [R14] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RSP + 0x38],RAX TEST RAX,RAX JZ 0x00192f3b MOV RCX,qword ptr [0x0023af80] CMP byte ptr [RCX],0x0 JZ 0x00192f37 INC dword ptr [RAX + 0x8] JMP 0x00192f3b LAB_00192f37: INC.LOCK dword ptr [RAX + 0x8] LAB_00192f3b: MOV RAX,qword ptr [R14 + 0x20] SUB RAX,qword ptr [R14 + 0x10] MOV qword ptr [RSP + 0x40],RAX LAB_00192f48: LEA RDX,[0x23c058] LEA RDI,[RSP + 0x10] MOV RSI,R14 MOV ECX,0x1 CALL 0x00191696 LEA RAX,[RSP + 0x20] MOV RDI,qword ptr [RAX + -0x10] MOV R15,qword ptr [RAX + -0x8] CMP RDI,RAX JZ 0x00192f80 MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x0011b8f0 LAB_00192f80: TEST R15,R15 JZ 0x00192fe9 LAB_00192f85: LEA RDI,[RSP + 0x10] MOV RSI,R14 CALL 0x00192ef0 CMP qword ptr [RSP + 0x10],0x0 JZ 0x00193067 LEA R9,[RSP + 0x4c] MOV dword ptr [R9],0x2 LEA RDI,[RSP + 0x58] MOV qword ptr [RDI + -0x8],0x0 LAB_00192fb7: LEA RSI,[RSP + 0x50] LEA RDX,[RSP + 0xf] LEA RCX,[RSP + 0x30] LEA R8,[RSP + 0x10] CALL 0x001937bc MOVAPS XMM0,xmmword ptr [RSP + 0x50] MOVUPS xmmword ptr [RBX],XMM0 MOV RDI,qword ptr [RSP + 0x18] TEST RDI,RDI JZ 0x00192ff4 CALL 0x0017b578 JMP 0x00192ff4 LAB_00192fe9: MOV RDI,RBX MOV RSI,R14 CALL 0x001930ec LAB_00192ff4: MOV RDI,qword ptr [RSP + 0x38] TEST RDI,RDI JZ 0x00193003 CALL 0x0017b578 LAB_00193003: MOV RAX,RBX ADD RSP,0x60 POP RBX POP R14 POP R15 RET LAB_00193010: LEA RDI,[0x23c078] CALL 0x0011c090 TEST EAX,EAX JZ 0x00192f10 LAB_00193024: LEA RDI,[0x23c058] LEA RSI,[0x1fdcd6] MOV EDX,0x10 CALL 0x00170506 LAB_0019303c: LEA RDI,[0x17080a] LEA RSI,[0x23c058] LEA RDX,[0x23b938] CALL 0x0011b7d0 LEA RDI,[0x23c078] CALL 0x0011b5c0 JMP 0x00192f10 LAB_00193067: MOV EDI,0x10 CALL 0x0011b450 MOV R14,RAX LAB_00193074: LEA RSI,[0x1fdcdc] MOV RDI,RAX CALL 0x0011b330 LAB_00193083: MOV RSI,qword ptr [0x0023afe8] MOV RDX,qword ptr [0x0023af58] MOV RDI,R14 CALL 0x0011bf90
/* minja::Parser::parseLogicalNot() */ void minja::Parser::parseLogicalNot(void) { _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1; int iVar2; runtime_error *this; int8 *in_RSI; int8 *in_RDI; int1 local_69; long *local_68; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_60; long local_58 [2]; int8 local_48; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40; long local_38; int4 local_2c; int8 local_28; int8 uStack_20; if (parseLogicalNot()::not_tok_abi_cxx11_ == '\0') { iVar2 = __cxa_guard_acquire(&parseLogicalNot()::not_tok_abi_cxx11_); if (iVar2 != 0) { /* try { // try from 00193024 to 0019303b has its CatchHandler @ 00193099 */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseLogicalNot()::not_tok_abi_cxx11_,"not\\b",0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseLogicalNot()::not_tok_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseLogicalNot()::not_tok_abi_cxx11_); } } local_48 = *in_RSI; local_40 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1]; if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_0023af80 == '\0') { LOCK(); *(int *)(local_40 + 8) = *(int *)(local_40 + 8) + 1; UNLOCK(); } else { *(int *)(local_40 + 8) = *(int *)(local_40 + 8) + 1; } } local_38 = in_RSI[4] - in_RSI[2]; /* try { // try from 00192f48 to 00192f60 has its CatchHandler @ 001930d1 */ consumeToken(&local_68); p_Var1 = local_60; if (local_68 != local_58) { operator_delete(local_68,local_58[0] + 1); } if (p_Var1 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { /* try { // try from 00192fe9 to 00192ff3 has its CatchHandler @ 001930b9 */ parseLogicalCompare(); } else { /* try { // try from 00192f85 to 00192f91 has its CatchHandler @ 001930cf */ parseLogicalNot(); if (local_68 == (long *)0x0) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00193074 to 00193082 has its CatchHandler @ 001930ac */ std::runtime_error::runtime_error(this,"Expected expression after \'not\' keyword"); /* try { // try from 00193083 to 00193098 has its CatchHandler @ 001930aa */ /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_0023afe8,PTR__runtime_error_0023af58); } local_2c = 2; local_28 = 0; /* try { // try from 00192fb7 to 00192fcf has its CatchHandler @ 001930bb */ std::__shared_count<(__gnu_cxx::_Lock_policy)2>:: __shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location&,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op> ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_20,&local_28,&local_69, &local_48,&local_68); *in_RDI = local_28; in_RDI[1] = uStack_20; if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_60); } } if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40); } return; }
17,947
CLI::Validator::description(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
MikePodsytnik[P]TCRtrie/build_O3/_deps/cli11-src/include/CLI/Validators.hpp
Validator &description(std::string validator_desc) { desc_function_ = [validator_desc]() { return validator_desc; }; return *this; }
O3
cpp
CLI::Validator::description(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>): pushq %r15 pushq %r14 pushq %rbx subq $0x20, %rsp movq %rdi, %rbx leaq 0x10(%rsp), %r15 movq %r15, -0x10(%r15) movq (%rsi), %rax movq 0x8(%rsi), %rdx addq %rax, %rdx movq %rsp, %r14 movq %r14, %rdi movq %rax, %rsi callq 0x177be movq %rbx, %rdi movq %r14, %rsi callq 0x2db90 movq (%rsp), %rdi cmpq %r15, %rdi je 0x2db02 movq 0x10(%rsp), %rsi incq %rsi callq 0x7430 movq %rbx, %rax addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq (%rsp), %rdi cmpq %r15, %rdi je 0x2db28 movq 0x10(%rsp), %rsi incq %rsi callq 0x7430 movq %rbx, %rdi callq 0x7780
_ZN3CLI9Validator11descriptionENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push rbx sub rsp, 20h mov rbx, rdi lea r15, [rsp+38h+var_28] mov [r15-10h], r15 mov rax, [rsi] mov rdx, [rsi+8] add rdx, rax mov r14, rsp mov rdi, r14 mov rsi, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov rdi, rbx mov rsi, r14 call _ZNSt8functionIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEvEEaSIZN3CLI9Validator11descriptionES5_EUlvE_EENSt9enable_ifIXsrNS7_9_CallableIT_NSC_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISE_E4typeEE4typeES7_EE5valueESt5decayISE_EE4type4typeESt15__invoke_resultIRSP_JEEEE5valueERS7_E4typeEOSE_ mov rdi, [rsp+38h+var_38]; void * cmp rdi, r15 jz short loc_2DB02 mov rsi, [rsp+38h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2DB02: mov rax, rbx add rsp, 20h pop rbx pop r14 pop r15 retn mov rbx, rax mov rdi, [rsp+0]; void * cmp rdi, r15 jz short loc_2DB28 mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2DB28: mov rdi, rbx call __Unwind_Resume
long long CLI::Validator::description(long long a1, long long a2) { void *v3[2]; // [rsp+0h] [rbp-38h] BYREF _QWORD v4[5]; // [rsp+10h] [rbp-28h] BYREF v3[0] = v4; std::string::_M_construct<char *>((long long)v3, *(_BYTE **)a2, *(_QWORD *)a2 + *(_QWORD *)(a2 + 8)); std::function<std::string ()(void)>::operator=<CLI::Validator::description(std::string)::{lambda(void)#1}>(a1, v3); if ( v3[0] != v4 ) operator delete(v3[0], v4[0] + 1LL); return a1; }
description: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x20 MOV RBX,RDI LEA R15,[RSP + 0x10] MOV qword ptr [R15 + -0x10],R15 MOV RAX,qword ptr [RSI] MOV RDX,qword ptr [RSI + 0x8] ADD RDX,RAX MOV R14,RSP MOV RDI,R14 MOV RSI,RAX CALL 0x001177be LAB_0012dae1: MOV RDI,RBX MOV RSI,R14 CALL 0x0012db90 LAB_0012daec: MOV RDI,qword ptr [RSP] CMP RDI,R15 JZ 0x0012db02 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x00107430 LAB_0012db02: MOV RAX,RBX ADD RSP,0x20 POP RBX POP R14 POP R15 RET
/* CLI::Validator::description(std::__cxx11::string) */ Validator * __thiscall CLI::Validator::description(Validator *this,long *param_2) { long *local_38 [2]; long local_28 [2]; local_38[0] = local_28; std::__cxx11::string::_M_construct<char*>(local_38,*param_2,param_2[1] + *param_2); /* try { // try from 0012dae1 to 0012daeb has its CatchHandler @ 0012db0f */ std::function<std::__cxx11::string()>::operator= ((function<std::__cxx11::string()> *)this,(_lambda___1_ *)local_38); if (local_38[0] != local_28) { operator_delete(local_38[0],local_28[0] + 1); } return this; }
17,948
Binary_string::free()
eloqsql/sql/sql_string.h
inline void free() { free_buffer(); /* We have to clear the values as some Strings, like in Field, are reused after free(). Because of this we cannot use MEM_UNDEFINED() here. */ Ptr= 0; str_length= 0; Alloced_length= extra_alloc= 0; }
O0
c
Binary_string::free(): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x10(%rbp) callq 0x58bd0 movq -0x10(%rbp), %rax movq $0x0, (%rax) movl $0x0, 0x8(%rax) movl $0x0, 0x10(%rax) movl $0x0, 0xc(%rax) addq $0x10, %rsp popq %rbp retq nop
_ZN13Binary_string4freeEv: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8]; this mov [rbp+var_10], rdi call _ZN13Binary_string11free_bufferEv; Binary_string::free_buffer(void) mov rax, [rbp+var_10] mov qword ptr [rax], 0 mov dword ptr [rax+8], 0 mov dword ptr [rax+10h], 0 mov dword ptr [rax+0Ch], 0 add rsp, 10h pop rbp retn
Binary_string * Binary_string::free(Binary_string *this) { Binary_string *result; // rax Binary_string::free_buffer(this); result = this; *(_QWORD *)this = 0LL; *((_DWORD *)this + 2) = 0; *((_DWORD *)this + 4) = 0; *((_DWORD *)this + 3) = 0; return result; }
free: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RDI CALL 0x00158bd0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],0x0 MOV dword ptr [RAX + 0x8],0x0 MOV dword ptr [RAX + 0x10],0x0 MOV dword ptr [RAX + 0xc],0x0 ADD RSP,0x10 POP RBP RET
/* Binary_string::free() */ void __thiscall Binary_string::free(Binary_string *this) { free_buffer(this); *(int8 *)this = 0; *(int4 *)(this + 8) = 0; *(int4 *)(this + 0x10) = 0; *(int4 *)(this + 0xc) = 0; return; }
17,949
crypto_sign_ed25519_ref10_ge_madd
eloqsql/plugin/auth_ed25519/ref10/ge_madd.c
void ge_madd(ge_p1p1 *r,const ge_p3 *p,const ge_precomp *q) { fe t0; #include "ge_madd.h" }
O0
c
crypto_sign_ed25519_ref10_ge_madd: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi addq $0x28, %rsi movq -0x10(%rbp), %rdx callq 0x8530 movq -0x8(%rbp), %rdi addq $0x28, %rdi movq -0x10(%rbp), %rsi addq $0x28, %rsi movq -0x10(%rbp), %rdx callq 0xbea0 movq -0x8(%rbp), %rdi addq $0x50, %rdi movq -0x8(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x9300 movq -0x8(%rbp), %rdi addq $0x28, %rdi movq -0x8(%rbp), %rsi addq $0x28, %rsi movq -0x18(%rbp), %rdx addq $0x28, %rdx callq 0x9300 movq -0x8(%rbp), %rdi addq $0x78, %rdi movq -0x18(%rbp), %rsi addq $0x50, %rsi movq -0x10(%rbp), %rdx addq $0x78, %rdx callq 0x9300 leaq -0x40(%rbp), %rdi movq -0x10(%rbp), %rsi addq $0x50, %rsi movq -0x10(%rbp), %rdx addq $0x50, %rdx callq 0x8530 movq -0x8(%rbp), %rdi movq -0x8(%rbp), %rsi addq $0x50, %rsi movq -0x8(%rbp), %rdx addq $0x28, %rdx callq 0xbea0 movq -0x8(%rbp), %rdi addq $0x28, %rdi movq -0x8(%rbp), %rsi addq $0x50, %rsi movq -0x8(%rbp), %rdx addq $0x28, %rdx callq 0x8530 movq -0x8(%rbp), %rdi addq $0x50, %rdi leaq -0x40(%rbp), %rsi movq -0x8(%rbp), %rdx addq $0x78, %rdx callq 0x8530 movq -0x8(%rbp), %rdi addq $0x78, %rdi leaq -0x40(%rbp), %rsi movq -0x8(%rbp), %rdx addq $0x78, %rdx callq 0xbea0 addq $0x40, %rsp popq %rbp retq nopl (%rax,%rax)
crypto_sign_ed25519_ref10_ge_madd: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] add rsi, 28h ; '(' mov rdx, [rbp+var_10] call crypto_sign_ed25519_ref10_fe_add mov rdi, [rbp+var_8] add rdi, 28h ; '(' mov rsi, [rbp+var_10] add rsi, 28h ; '(' mov rdx, [rbp+var_10] call crypto_sign_ed25519_ref10_fe_sub mov rdi, [rbp+var_8] add rdi, 50h ; 'P' mov rsi, [rbp+var_8] mov rdx, [rbp+var_18] call crypto_sign_ed25519_ref10_fe_mul mov rdi, [rbp+var_8] add rdi, 28h ; '(' mov rsi, [rbp+var_8] add rsi, 28h ; '(' mov rdx, [rbp+var_18] add rdx, 28h ; '(' call crypto_sign_ed25519_ref10_fe_mul mov rdi, [rbp+var_8] add rdi, 78h ; 'x' mov rsi, [rbp+var_18] add rsi, 50h ; 'P' mov rdx, [rbp+var_10] add rdx, 78h ; 'x' call crypto_sign_ed25519_ref10_fe_mul lea rdi, [rbp+var_40] mov rsi, [rbp+var_10] add rsi, 50h ; 'P' mov rdx, [rbp+var_10] add rdx, 50h ; 'P' call crypto_sign_ed25519_ref10_fe_add mov rdi, [rbp+var_8] mov rsi, [rbp+var_8] add rsi, 50h ; 'P' mov rdx, [rbp+var_8] add rdx, 28h ; '(' call crypto_sign_ed25519_ref10_fe_sub mov rdi, [rbp+var_8] add rdi, 28h ; '(' mov rsi, [rbp+var_8] add rsi, 50h ; 'P' mov rdx, [rbp+var_8] add rdx, 28h ; '(' call crypto_sign_ed25519_ref10_fe_add mov rdi, [rbp+var_8] add rdi, 50h ; 'P' lea rsi, [rbp+var_40] mov rdx, [rbp+var_8] add rdx, 78h ; 'x' call crypto_sign_ed25519_ref10_fe_add mov rdi, [rbp+var_8] add rdi, 78h ; 'x' lea rsi, [rbp+var_40] mov rdx, [rbp+var_8] add rdx, 78h ; 'x' call crypto_sign_ed25519_ref10_fe_sub add rsp, 40h pop rbp retn
long long crypto_sign_ed25519_ref10_ge_madd(long long a1, long long a2, long long a3) { _BYTE v4[40]; // [rsp+0h] [rbp-40h] BYREF long long v5; // [rsp+28h] [rbp-18h] long long v6; // [rsp+30h] [rbp-10h] long long v7; // [rsp+38h] [rbp-8h] v7 = a1; v6 = a2; v5 = a3; crypto_sign_ed25519_ref10_fe_add(a1, a2 + 40, a2); crypto_sign_ed25519_ref10_fe_sub(a1 + 40, v6 + 40, v6); crypto_sign_ed25519_ref10_fe_mul(v7 + 80, v7, v5); crypto_sign_ed25519_ref10_fe_mul(v7 + 40, v7 + 40, v5 + 40); crypto_sign_ed25519_ref10_fe_mul(a1 + 120, v5 + 80, a2 + 120); crypto_sign_ed25519_ref10_fe_add(v4, v6 + 80, v6 + 80); crypto_sign_ed25519_ref10_fe_sub(v7, v7 + 80, v7 + 40); crypto_sign_ed25519_ref10_fe_add(v7 + 40, v7 + 80, v7 + 40); crypto_sign_ed25519_ref10_fe_add(v7 + 80, v4, v7 + 120); return crypto_sign_ed25519_ref10_fe_sub(v7 + 120, v4, v7 + 120); }
crypto_sign_ed25519_ref10_ge_madd: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x28 MOV RDX,qword ptr [RBP + -0x10] CALL 0x00108530 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x28 MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x28 MOV RDX,qword ptr [RBP + -0x10] CALL 0x0010bea0 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x50 MOV RSI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x18] CALL 0x00109300 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x28 MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0x28 MOV RDX,qword ptr [RBP + -0x18] ADD RDX,0x28 CALL 0x00109300 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x78 MOV RSI,qword ptr [RBP + -0x18] ADD RSI,0x50 MOV RDX,qword ptr [RBP + -0x10] ADD RDX,0x78 CALL 0x00109300 LEA RDI,[RBP + -0x40] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x50 MOV RDX,qword ptr [RBP + -0x10] ADD RDX,0x50 CALL 0x00108530 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0x50 MOV RDX,qword ptr [RBP + -0x8] ADD RDX,0x28 CALL 0x0010bea0 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x28 MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0x50 MOV RDX,qword ptr [RBP + -0x8] ADD RDX,0x28 CALL 0x00108530 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x50 LEA RSI,[RBP + -0x40] MOV RDX,qword ptr [RBP + -0x8] ADD RDX,0x78 CALL 0x00108530 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x78 LEA RSI,[RBP + -0x40] MOV RDX,qword ptr [RBP + -0x8] ADD RDX,0x78 CALL 0x0010bea0 ADD RSP,0x40 POP RBP RET
void crypto_sign_ed25519_ref10_ge_madd(long param_1,long param_2,long param_3) { int1 local_48 [40]; long local_20; long local_18; long local_10; local_20 = param_3; local_18 = param_2; local_10 = param_1; crypto_sign_ed25519_ref10_fe_add(param_1,param_2 + 0x28,param_2); crypto_sign_ed25519_ref10_fe_sub(local_10 + 0x28,local_18 + 0x28,local_18); crypto_sign_ed25519_ref10_fe_mul(local_10 + 0x50,local_10,local_20); crypto_sign_ed25519_ref10_fe_mul(local_10 + 0x28,local_10 + 0x28,local_20 + 0x28); crypto_sign_ed25519_ref10_fe_mul(local_10 + 0x78,local_20 + 0x50,local_18 + 0x78); crypto_sign_ed25519_ref10_fe_add(local_48,local_18 + 0x50,local_18 + 0x50); crypto_sign_ed25519_ref10_fe_sub(local_10,local_10 + 0x50,local_10 + 0x28); crypto_sign_ed25519_ref10_fe_add(local_10 + 0x28,local_10 + 0x50,local_10 + 0x28); crypto_sign_ed25519_ref10_fe_add(local_10 + 0x50,local_48,local_10 + 0x78); crypto_sign_ed25519_ref10_fe_sub(local_10 + 0x78,local_48,local_10 + 0x78); return; }
17,950
mi_search_last
eloqsql/storage/myisam/mi_search.c
int _mi_search_last(register MI_INFO *info, register MI_KEYDEF *keyinfo, register my_off_t pos) { uint nod_flag; uchar *buff,*page; DBUG_ENTER("_mi_search_last"); if (pos == HA_OFFSET_ERROR) { my_errno=HA_ERR_KEY_NOT_FOUND; /* Didn't find key */ info->lastpos= HA_OFFSET_ERROR; DBUG_RETURN(-1); } buff=info->buff; do { if (!_mi_fetch_keypage(info,keyinfo,pos,DFLT_INIT_HITS,buff,0)) { info->lastpos= HA_OFFSET_ERROR; DBUG_RETURN(-1); } page= buff+mi_getint(buff); nod_flag=mi_test_if_nod(buff); } while ((pos=_mi_kpos(nod_flag,page)) != HA_OFFSET_ERROR); if (!_mi_get_last_key(info,keyinfo,buff,info->lastkey,page, &info->lastkey_length)) DBUG_RETURN(-1); info->lastpos=_mi_dpos(info,0,info->lastkey+info->lastkey_length); info->int_keypos=info->int_maxpos=page; info->int_nod_flag=nod_flag; info->int_keytree_version=keyinfo->version; info->last_search_keypage=info->last_keypage; info->page_changed=info->buff_used=0; DBUG_PRINT("exit",("found key at %lu",(ulong) info->lastpos)); DBUG_RETURN(0); }
O0
c
mi_search_last: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) cmpq $-0x1, -0x20(%rbp) jne 0xc2551 callq 0xf6090 movl $0x78, (%rax) movq -0x10(%rbp), %rax movq $-0x1, 0x170(%rax) movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xc26f7 movq -0x10(%rbp), %rax movq 0x100(%rax), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x30(%rbp), %r8 movl $0x3, %ecx xorl %r9d, %r9d callq 0xbe020 cmpq $0x0, %rax jne 0xc259e movq -0x10(%rbp), %rax movq $-0x1, 0x170(%rax) movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xc26f7 movq -0x30(%rbp), %rax movq -0x30(%rbp), %rcx movzbl 0x1(%rcx), %ecx movzwl %cx, %ecx movq -0x30(%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, -0x38(%rbp) movq -0x30(%rbp), %rax movzbl (%rax), %eax andl $0x80, %eax cmpl $0x0, %eax je 0xc25f1 movq -0x10(%rbp), %rax movq (%rax), %rax movl 0x17c(%rax), %eax movl %eax, -0x3c(%rbp) jmp 0xc25f8 xorl %eax, %eax movl %eax, -0x3c(%rbp) jmp 0xc25f8 movl -0x3c(%rbp), %eax movl %eax, -0x24(%rbp) movl -0x24(%rbp), %edi movq -0x38(%rbp), %rsi callq 0xbef90 movq %rax, -0x20(%rbp) cmpq $-0x1, %rax jne 0xc2560 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x30(%rbp), %rdx movq -0x10(%rbp), %rax movq 0x108(%rax), %rcx movq -0x38(%rbp), %r8 movq -0x10(%rbp), %r9 addq $0x1d8, %r9 # imm = 0x1D8 callq 0xc19b0 cmpq $0x0, %rax jne 0xc2657 jmp 0xc264b movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xc26f7 movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rax movq 0x108(%rax), %rdx movq -0x10(%rbp), %rax movl 0x1d8(%rax), %eax addq %rax, %rdx xorl %esi, %esi callq 0xbf210 movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x170(%rax) movq -0x38(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x130(%rax) movq -0x10(%rbp), %rax movq %rcx, 0x128(%rax) movl -0x24(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x138(%rax) movq -0x18(%rbp), %rax movl 0x1c(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x13c(%rax) movq -0x10(%rbp), %rax movq 0x190(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x198(%rax) movq -0x10(%rbp), %rax movb $0x0, 0x33d(%rax) movq -0x10(%rbp), %rax movb $0x0, 0x33c(%rax) jmp 0xc26ee jmp 0xc26f0 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq
_mi_search_last: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx cmp [rbp+var_20], 0FFFFFFFFFFFFFFFFh jnz short loc_C2551 call _my_thread_var mov dword ptr [rax], 78h ; 'x' mov rax, [rbp+var_10] mov qword ptr [rax+170h], 0FFFFFFFFFFFFFFFFh mov [rbp+var_4], 0FFFFFFFFh jmp loc_C26F7 loc_C2551: mov rax, [rbp+var_10] mov rax, [rax+100h] mov [rbp+var_30], rax loc_C2560: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] mov r8, [rbp+var_30] mov ecx, 3 xor r9d, r9d call _mi_fetch_keypage cmp rax, 0 jnz short loc_C259E mov rax, [rbp+var_10] mov qword ptr [rax+170h], 0FFFFFFFFFFFFFFFFh mov [rbp+var_4], 0FFFFFFFFh jmp loc_C26F7 loc_C259E: mov rax, [rbp+var_30] mov rcx, [rbp+var_30] movzx ecx, byte ptr [rcx+1] movzx ecx, cx mov rdx, [rbp+var_30] 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_38], rax mov rax, [rbp+var_30] movzx eax, byte ptr [rax] and eax, 80h cmp eax, 0 jz short loc_C25F1 mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax+17Ch] mov [rbp+var_3C], eax jmp short loc_C25F8 loc_C25F1: xor eax, eax mov [rbp+var_3C], eax jmp short $+2 loc_C25F8: mov eax, [rbp+var_3C] mov [rbp+var_24], eax mov edi, [rbp+var_24] mov rsi, [rbp+var_38] call _mi_kpos mov [rbp+var_20], rax cmp rax, 0FFFFFFFFFFFFFFFFh jnz loc_C2560 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_30] mov rax, [rbp+var_10] mov rcx, [rax+108h] mov r8, [rbp+var_38] mov r9, [rbp+var_10] add r9, 1D8h call _mi_get_last_key cmp rax, 0 jnz short loc_C2657 jmp short $+2 loc_C264B: mov [rbp+var_4], 0FFFFFFFFh jmp loc_C26F7 loc_C2657: mov rdi, [rbp+var_10] mov rax, [rbp+var_10] mov rdx, [rax+108h] mov rax, [rbp+var_10] mov eax, [rax+1D8h] add rdx, rax xor esi, esi call _mi_dpos mov rcx, rax mov rax, [rbp+var_10] mov [rax+170h], rcx mov rcx, [rbp+var_38] mov rax, [rbp+var_10] mov [rax+130h], rcx mov rax, [rbp+var_10] mov [rax+128h], rcx mov ecx, [rbp+var_24] mov rax, [rbp+var_10] mov [rax+138h], ecx mov rax, [rbp+var_18] mov ecx, [rax+1Ch] mov rax, [rbp+var_10] mov [rax+13Ch], ecx mov rax, [rbp+var_10] mov rcx, [rax+190h] mov rax, [rbp+var_10] mov [rax+198h], rcx mov rax, [rbp+var_10] mov byte ptr [rax+33Dh], 0 mov rax, [rbp+var_10] mov byte ptr [rax+33Ch], 0 jmp short $+2 loc_C26EE: jmp short $+2 loc_C26F0: mov [rbp+var_4], 0 loc_C26F7: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long mi_search_last(long long a1, long long a2, long long a3) { unsigned int v4; // [rsp+4h] [rbp-3Ch] unsigned long long v5; // [rsp+8h] [rbp-38h] unsigned __int16 *v6; // [rsp+10h] [rbp-30h] long long v7; // [rsp+20h] [rbp-20h] v7 = a3; if ( a3 == -1 ) { *(_DWORD *)my_thread_var(a1, (const char *)a2) = 120; *(_QWORD *)(a1 + 368) = -1LL; return (unsigned int)-1; } else { v6 = *(unsigned __int16 **)(a1 + 256); do { if ( !mi_fetch_keypage((_QWORD *)a1, a2, v7, 3, (int)v6, 0) ) { *(_QWORD *)(a1 + 368) = -1LL; return (unsigned int)-1; } v5 = (unsigned long long)v6 + (_byteswap_ushort(*v6) & 0x7FFF); if ( (*(_BYTE *)v6 & 0x80) != 0 ) v4 = *(_DWORD *)(*(_QWORD *)a1 + 380LL); else v4 = 0; v7 = mi_kpos(v4, v5); } while ( v7 != -1 ); if ( mi_get_last_key(a1, a2, v6, *(_BYTE **)(a1 + 264), v5, (_DWORD *)(a1 + 472)) ) { *(_QWORD *)(a1 + 368) = mi_dpos(a1, 0, *(unsigned int *)(a1 + 472) + *(_QWORD *)(a1 + 264)); *(_QWORD *)(a1 + 304) = v5; *(_QWORD *)(a1 + 296) = v5; *(_DWORD *)(a1 + 312) = v4; *(_DWORD *)(a1 + 316) = *(_DWORD *)(a2 + 28); *(_QWORD *)(a1 + 408) = *(_QWORD *)(a1 + 400); *(_BYTE *)(a1 + 829) = 0; *(_BYTE *)(a1 + 828) = 0; return 0; } else { return (unsigned int)-1; } } }
_mi_search_last: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX CMP qword ptr [RBP + -0x20],-0x1 JNZ 0x001c2551 CALL 0x001f6090 MOV dword ptr [RAX],0x78 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x170],-0x1 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001c26f7 LAB_001c2551: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x100] MOV qword ptr [RBP + -0x30],RAX LAB_001c2560: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x30] MOV ECX,0x3 XOR R9D,R9D CALL 0x001be020 CMP RAX,0x0 JNZ 0x001c259e MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x170],-0x1 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001c26f7 LAB_001c259e: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x30] MOVZX ECX,byte ptr [RCX + 0x1] MOVZX ECX,CX MOV RDX,qword ptr [RBP + -0x30] 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 + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX] AND EAX,0x80 CMP EAX,0x0 JZ 0x001c25f1 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x17c] MOV dword ptr [RBP + -0x3c],EAX JMP 0x001c25f8 LAB_001c25f1: XOR EAX,EAX MOV dword ptr [RBP + -0x3c],EAX JMP 0x001c25f8 LAB_001c25f8: MOV EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x24],EAX MOV EDI,dword ptr [RBP + -0x24] MOV RSI,qword ptr [RBP + -0x38] CALL 0x001bef90 MOV qword ptr [RBP + -0x20],RAX CMP RAX,-0x1 JNZ 0x001c2560 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x108] MOV R8,qword ptr [RBP + -0x38] MOV R9,qword ptr [RBP + -0x10] ADD R9,0x1d8 CALL 0x001c19b0 CMP RAX,0x0 JNZ 0x001c2657 JMP 0x001c264b LAB_001c264b: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001c26f7 LAB_001c2657: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x108] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x1d8] ADD RDX,RAX XOR ESI,ESI CALL 0x001bf210 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x170],RCX MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x130],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x128],RCX MOV ECX,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x138],ECX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RAX + 0x1c] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x13c],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x190] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x198],RCX MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x33d],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x33c],0x0 JMP 0x001c26ee LAB_001c26ee: JMP 0x001c26f0 LAB_001c26f0: MOV dword ptr [RBP + -0x4],0x0 LAB_001c26f7: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
int4 _mi_search_last(long *param_1,long param_2,long param_3) { byte *pbVar1; int4 *puVar2; long lVar3; byte *pbVar4; int4 local_44; long local_28; int4 local_c; if (param_3 == -1) { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x78; param_1[0x2e] = -1; local_c = 0xffffffff; } else { pbVar1 = (byte *)param_1[0x20]; local_28 = param_3; do { lVar3 = _mi_fetch_keypage(param_1,param_2,local_28,3,pbVar1,0); if (lVar3 == 0) { param_1[0x2e] = -1; return 0xffffffff; } pbVar4 = pbVar1 + ((uint)pbVar1[1] | (*pbVar1 & 0x7f) << 8); if ((*pbVar1 & 0x80) == 0) { local_44 = 0; } else { local_44 = *(int4 *)(*param_1 + 0x17c); } local_28 = _mi_kpos(local_44,pbVar4); } while (local_28 != -1); lVar3 = _mi_get_last_key(param_1,param_2,pbVar1,param_1[0x21],pbVar4,param_1 + 0x3b); if (lVar3 == 0) { local_c = 0xffffffff; } else { lVar3 = _mi_dpos(param_1,0,param_1[0x21] + (ulong)*(uint *)(param_1 + 0x3b)); param_1[0x2e] = lVar3; param_1[0x26] = (long)pbVar4; param_1[0x25] = (long)pbVar4; *(int4 *)(param_1 + 0x27) = local_44; *(int4 *)((long)param_1 + 0x13c) = *(int4 *)(param_2 + 0x1c); param_1[0x33] = param_1[0x32]; *(int1 *)((long)param_1 + 0x33d) = 0; *(int1 *)((long)param_1 + 0x33c) = 0; local_c = 0; } } return local_c; }
17,951
my_hash_sort_simple_nopad
eloqsql/strings/ctype-simple.c
void my_hash_sort_simple_nopad(CHARSET_INFO *cs, const uchar *key, size_t len, ulong *nr1, ulong *nr2) { register const uchar *sort_order=cs->sort_order; const uchar *end= key + len; register ulong m1= *nr1, m2= *nr2; for (; key < (uchar*) end ; key++) { MY_HASH_ADD(m1, m2, (uint) sort_order[(uint) *key]); } *nr1= m1; *nr2= m2; }
O3
c
my_hash_sort_simple_nopad: movq (%rcx), %rax movq (%r8), %r9 testq %rdx, %rdx jle 0x57f7c pushq %rbp movq %rsp, %rbp movq 0x58(%rdi), %rdi addq %rsi, %rdx movl %eax, %r10d andl $0x3f, %r10d addq %r9, %r10 movzbl (%rsi), %r11d movzbl (%rdi,%r11), %r11d imulq %r10, %r11 movq %rax, %r10 shlq $0x8, %r10 addq %r11, %r10 xorq %r10, %rax addq $0x3, %r9 incq %rsi cmpq %rdx, %rsi jb 0x57f4b popq %rbp movq %rax, (%rcx) movq %r9, (%r8) retq
my_hash_sort_simple_nopad: mov rax, [rcx] mov r9, [r8] test rdx, rdx jle short loc_57F7C push rbp mov rbp, rsp mov rdi, [rdi+58h] add rdx, rsi loc_57F4B: mov r10d, eax and r10d, 3Fh add r10, r9 movzx r11d, byte ptr [rsi] movzx r11d, byte ptr [rdi+r11] imul r11, r10 mov r10, rax shl r10, 8 add r10, r11 xor rax, r10 add r9, 3 inc rsi cmp rsi, rdx jb short loc_57F4B pop rbp loc_57F7C: mov [rcx], rax mov [r8], r9 retn
long long my_hash_sort_simple_nopad(long long a1, unsigned __int8 *a2, long long a3, long long *a4, long long *a5) { long long result; // rax long long v6; // r9 long long v7; // rdi unsigned __int8 *v8; // rdx result = *a4; v6 = *a5; if ( a3 > 0 ) { v7 = *(_QWORD *)(a1 + 88); v8 = &a2[a3]; do { result ^= (v6 + (result & 0x3F)) * *(unsigned __int8 *)(v7 + *a2) + (result << 8); v6 += 3LL; ++a2; } while ( a2 < v8 ); } *a4 = result; *a5 = v6; return result; }
my_hash_sort_simple_nopad: MOV RAX,qword ptr [RCX] MOV R9,qword ptr [R8] TEST RDX,RDX JLE 0x00157f7c PUSH RBP MOV RBP,RSP MOV RDI,qword ptr [RDI + 0x58] ADD RDX,RSI LAB_00157f4b: MOV R10D,EAX AND R10D,0x3f ADD R10,R9 MOVZX R11D,byte ptr [RSI] MOVZX R11D,byte ptr [RDI + R11*0x1] IMUL R11,R10 MOV R10,RAX SHL R10,0x8 ADD R10,R11 XOR RAX,R10 ADD R9,0x3 INC RSI CMP RSI,RDX JC 0x00157f4b POP RBP LAB_00157f7c: MOV qword ptr [RCX],RAX MOV qword ptr [R8],R9 RET
void my_hash_sort_simple_nopad(long param_1,byte *param_2,long param_3,ulong *param_4,long *param_5) { ulong uVar1; byte *pbVar2; long lVar3; uVar1 = *param_4; lVar3 = *param_5; if (0 < param_3) { pbVar2 = param_2 + param_3; do { uVar1 = uVar1 ^ uVar1 * 0x100 + (ulong)*(byte *)(*(long *)(param_1 + 0x58) + (ulong)*param_2) * ((ulong)((uint)uVar1 & 0x3f) + lVar3); lVar3 = lVar3 + 3; param_2 = param_2 + 1; } while (param_2 < pbVar2); } *param_4 = uVar1; *param_5 = lVar3; return; }
17,952
my_test_connect
eloqsql/libmariadb/unittest/libmariadb/my_test.h
MYSQL *my_test_connect(MYSQL *mysql, const char *host, const char *user, const char *passwd, const char *db, unsigned int port, const char *unix_socket, unsigned long clientflag) { if (force_tls) mysql_options(mysql, MYSQL_OPT_SSL_ENFORCE, &force_tls); if (!mysql_real_connect(mysql, host, user, passwd, db, port, unix_socket, clientflag)) { diag("error: %s", mysql_error(mysql)); return NULL; } if (mysql && force_tls && !mysql_get_ssl_cipher(mysql)) { diag("Error: TLS connection not established"); return NULL; } if (!this_host) get_this_host(mysql); return mysql; }
O3
c
my_test_connect: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq 0x18(%rbp), %r10 movq 0x10(%rbp), %rax cmpl $0x0, 0x34c60(%rip) # 0x48e60 je 0x14238 movq %rdx, -0x30(%rbp) leaq 0x34c53(%rip), %rdx # 0x48e60 movq %rbx, %rdi movl $0x26, %esi movl %r9d, %r15d movq %r8, %r12 movq %rcx, %r13 callq 0x1c291 movq -0x30(%rbp), %rdx movq 0x18(%rbp), %r10 movq 0x10(%rbp), %rax movq %r13, %rcx movq %r12, %r8 movl %r15d, %r9d movq %rbx, %rdi movq %r14, %rsi pushq %r10 pushq %rax callq 0x1835e addq $0x10, %rsp testq %rax, %rax je 0x1427e testq %rbx, %rbx je 0x1426a cmpl $0x0, 0x34c05(%rip) # 0x48e60 je 0x1426a movq %rbx, %rdi callq 0x18250 testq %rax, %rax je 0x1429b cmpq $0x0, 0x34a86(%rip) # 0x48cf8 jne 0x142ab movq %rbx, %rdi callq 0x13ada jmp 0x142ab movq %rbx, %rdi callq 0x1c382 leaq 0x20231(%rip), %rdi # 0x344be xorl %ebx, %ebx movq %rax, %rsi xorl %eax, %eax callq 0x14bff jmp 0x142ab leaq 0x20226(%rip), %rdi # 0x344c8 xorl %ebx, %ebx xorl %eax, %eax callq 0x14bff movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_test_connect: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rsi mov rbx, rdi mov r10, [rbp+arg_8] mov rax, [rbp+arg_0] cmp cs:force_tls, 0 jz short loc_14238 mov [rbp+var_30], rdx lea rdx, force_tls mov rdi, rbx mov esi, 26h ; '&' mov r15d, r9d mov r12, r8 mov r13, rcx call mysql_options mov rdx, [rbp+var_30] mov r10, [rbp+arg_8] mov rax, [rbp+arg_0] mov rcx, r13 mov r8, r12 mov r9d, r15d loc_14238: mov rdi, rbx mov rsi, r14 push r10 push rax call mysql_real_connect add rsp, 10h test rax, rax jz short loc_1427E test rbx, rbx jz short loc_1426A cmp cs:force_tls, 0 jz short loc_1426A mov rdi, rbx call mysql_get_ssl_cipher test rax, rax jz short loc_1429B loc_1426A: cmp cs:this_host, 0 jnz short loc_142AB mov rdi, rbx call get_this_host jmp short loc_142AB loc_1427E: mov rdi, rbx call mysql_error lea rdi, aErrorS; "error: %s" xor ebx, ebx mov rsi, rax xor eax, eax call diag jmp short loc_142AB loc_1429B: lea rdi, aErrorTlsConnec; "Error: TLS connection not established" xor ebx, ebx xor eax, eax call diag loc_142AB: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_test_connect(long long a1, int a2, int a3, int a4, int a5, int a6, long long a7, long long a8) { long long v8; // rbx long long v9; // r10 long long v10; // rax int v11; // r15d int v12; // r12d int v13; // r13d int v14; // edx int v15; // ecx int v16; // r8d int v17; // r9d int v18; // eax int v19; // edx int v20; // ecx int v21; // r8d int v22; // r9d int v24; // [rsp+0h] [rbp-30h] v8 = a1; v9 = a8; v10 = a7; if ( force_tls ) { v24 = a3; v11 = a6; v12 = a5; v13 = a4; mysql_options(a1, 38LL, &force_tls); a3 = v24; v9 = a8; v10 = a7; a4 = v13; a5 = v12; a6 = v11; } if ( mysql_real_connect(a1, a2, a3, a4, a5, a6, v10, v9) ) { if ( a1 && force_tls && !mysql_get_ssl_cipher(a1) ) { v8 = 0LL; diag((unsigned int)"Error: TLS connection not established", a2, v14, v15, v16, v17); } else if ( !this_host ) { get_this_host(a1); } } else { v18 = mysql_error(a1); v8 = 0LL; diag((unsigned int)"error: %s", v18, v19, v20, v21, v22); } return v8; }
my_test_connect: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV R10,qword ptr [RBP + 0x18] MOV RAX,qword ptr [RBP + 0x10] CMP dword ptr [0x00148e60],0x0 JZ 0x00114238 MOV qword ptr [RBP + -0x30],RDX LEA RDX,[0x148e60] MOV RDI,RBX MOV ESI,0x26 MOV R15D,R9D MOV R12,R8 MOV R13,RCX CALL 0x0011c291 MOV RDX,qword ptr [RBP + -0x30] MOV R10,qword ptr [RBP + 0x18] MOV RAX,qword ptr [RBP + 0x10] MOV RCX,R13 MOV R8,R12 MOV R9D,R15D LAB_00114238: MOV RDI,RBX MOV RSI,R14 PUSH R10 PUSH RAX CALL 0x0011835e ADD RSP,0x10 TEST RAX,RAX JZ 0x0011427e TEST RBX,RBX JZ 0x0011426a CMP dword ptr [0x00148e60],0x0 JZ 0x0011426a MOV RDI,RBX CALL 0x00118250 TEST RAX,RAX JZ 0x0011429b LAB_0011426a: CMP qword ptr [0x00148cf8],0x0 JNZ 0x001142ab MOV RDI,RBX CALL 0x00113ada JMP 0x001142ab LAB_0011427e: MOV RDI,RBX CALL 0x0011c382 LEA RDI,[0x1344be] XOR EBX,EBX MOV RSI,RAX XOR EAX,EAX CALL 0x00114bff JMP 0x001142ab LAB_0011429b: LEA RDI,[0x1344c8] XOR EBX,EBX XOR EAX,EAX CALL 0x00114bff LAB_001142ab: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_test_connect(long param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,ulong param_6,int8 param_7,int8 param_8) { long lVar1; int8 uVar2; if (force_tls != 0) { param_6 = param_6 & 0xffffffff; mysql_options(param_1,0x26,&force_tls); } lVar1 = mysql_real_connect(param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8); if (lVar1 == 0) { uVar2 = mysql_error(param_1); param_1 = 0; diag("error: %s",uVar2); } else { if (((param_1 != 0) && (force_tls != 0)) && (lVar1 = mysql_get_ssl_cipher(param_1), lVar1 == 0)) { diag("Error: TLS connection not established"); return 0; } if (this_host == 0) { get_this_host(param_1); } } return param_1; }
17,953
map_to_g1
corpus-core[P]colibri-stateless/build_O2/_deps/blst-src/src/map_to_g1.c
static void map_to_g1(POINTonE1 *out, const vec384 u, const vec384 v) { POINTonE1 p; map_to_isogenous_E1(&p, u); if (v != NULL) { map_to_isogenous_E1(out, v); /* borrow |out| */ POINTonE1_dadd(&p, &p, out, Aprime_E1); } isogeny_map_to_E1(&p, &p); /* sprinkle isogenous powder */ /* clear the cofactor by multiplying |p| by 1-z, 0xd201000000010001 */ POINTonE1_times_minus_z(out, &p); POINTonE1_dadd(out, out, &p, NULL); }
O2
c
map_to_g1: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x6f8, %rsp # imm = 0x6F8 movq %rdx, %rbx movq %rdi, %r14 leaq -0x150(%rbp), %rdi callq 0x5bd46 testq %rbx, %rbx je 0x5302c movq %r14, %rdi movq %rbx, %rsi callq 0x5bd46 leaq 0x2d046(%rip), %rcx # 0x80060 leaq -0x150(%rbp), %rdi movq %rdi, %rsi movq %r14, %rdx callq 0x51a8a movq %r14, -0x30(%rbp) leaq -0x480(%rbp), %r12 leaq -0xf0(%rbp), %rsi movq %r12, %rdi callq 0x582c9 pushq $-0xe popq %r14 movq %r12, %rsi testq %r14, %r14 je 0x53069 leaq -0x30(%rsi), %rbx movq %rbx, %rdi movq %r12, %rdx callq 0x5aad8 incq %r14 movq %rbx, %rsi jmp 0x5304d leaq -0x660(%rbp), %rdx leaq 0x2d139(%rip), %rsi # 0x801b0 leaq -0x450(%rbp), %rdi pushq $0xb popq %rcx movq %rdi, %r13 callq 0x5c0a8 leaq 0x2d330(%rip), %rdx # 0x803c0 leaq -0xc0(%rbp), %r14 leaq -0x150(%rbp), %r15 movq %r14, %rdi movq %r15, %rsi callq 0x5aad8 leaq -0x270(%rbp), %rdx movq %r14, %rdi movq %r14, %rsi callq 0x56a78 pushq $0xa popq %rbx movq %r14, %rdi movq %r15, %rsi movq %r13, %r14 movq %r13, %rdx movq %rbx, %rcx callq 0x5c0fd leaq -0x630(%rbp), %rdx leaq 0x2d310(%rip), %rsi # 0x803f0 movq %r13, %rdi movq %rbx, %rcx callq 0x5c0a8 leaq -0x2a0(%rbp), %rdx leaq -0x90(%rbp), %rbx movq %rbx, %rdi movq %r15, %rsi callq 0x56a78 pushq $0x9 popq %rcx movq %rbx, %rdi movq %r15, %rsi movq %r13, %rdx callq 0x5c0fd movq %rbx, %rdi movq %rbx, %rsi movq %r12, %rdx callq 0x5aad8 leaq 0x2d4a6(%rip), %rsi # 0x805d0 leaq -0x720(%rbp), %rdx pushq $0xf popq %rcx movq %r13, %rdi callq 0x5c0a8 leaq 0x2d75d(%rip), %rdx # 0x808a0 leaq -0x60(%rbp), %rbx movq %rbx, %rdi movq %r15, %rsi callq 0x5aad8 leaq -0x1b0(%rbp), %rdx movq %rbx, %rdi movq %rbx, %rsi callq 0x56a78 pushq $0xe popq %rcx movq %rbx, %rdi movq %r15, %rsi movq %r13, %rdx callq 0x5c0fd leaq -0x120(%rbp), %r13 movq %rbx, %rdi movq %rbx, %rsi movq %r13, %rdx callq 0x5aad8 leaq 0x2d73f(%rip), %rsi # 0x808d0 movq %r14, %rbx movq %r14, %rdi leaq -0x720(%rbp), %rdx pushq $0xf popq %rcx callq 0x5c0a8 leaq -0x180(%rbp), %r14 movq %r14, %rdi movq %r15, %rsi leaq -0x1b0(%rbp), %rdx callq 0x56a78 movq %r14, %rdi movq %r15, %rsi movq %rbx, %rdx pushq $0xe popq %rcx callq 0x5c0fd movq %r12, %rdi movq %r12, %rsi leaq -0xf0(%rbp), %rbx movq %rbx, %rdx callq 0x5aad8 movq %r14, %rdi movq %r14, %rsi movq %r12, %rdx callq 0x5aad8 movq %rbx, %rdi leaq -0x90(%rbp), %r12 movq %r12, %rsi movq %r14, %rdx callq 0x5aad8 movq %r15, %rdi leaq -0xc0(%rbp), %rsi movq %r14, %rdx callq 0x5aad8 movq %r15, %rdi movq %r15, %rsi movq %rbx, %rdx callq 0x5aad8 movq %r13, %rdi movq %rbx, %rsi callq 0x582c9 movq %r13, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x5aad8 movq %r13, %rdi movq %r13, %rsi leaq -0x60(%rbp), %rdx callq 0x5aad8 movq -0x30(%rbp), %rbx movq %rbx, %rdi movq %r15, %rsi callq 0x5bfbe movq %rbx, %rdi movq %rbx, %rsi movq %r15, %rdx xorl %ecx, %ecx callq 0x51a8a addq $0x6f8, %rsp # imm = 0x6F8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
map_to_g1: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 6F8h mov rbx, rdx mov r14, rdi lea rdi, [rbp+var_150] call map_to_isogenous_E1 test rbx, rbx jz short loc_5302C mov rdi, r14 mov rsi, rbx call map_to_isogenous_E1 lea rcx, Aprime_E1 lea rdi, [rbp+var_150] mov rsi, rdi mov rdx, r14 call POINTonE1_dadd loc_5302C: mov [rbp+var_30], r14 lea r12, [rbp+var_480] lea rsi, [rbp+var_F0] mov rdi, r12 call sqr_fp push 0FFFFFFFFFFFFFFF2h pop r14 mov rsi, r12 loc_5304D: test r14, r14 jz short loc_53069 lea rbx, [rsi-30h] mov rdi, rbx mov rdx, r12 call mul_fp inc r14 mov rsi, rbx jmp short loc_5304D loc_53069: lea rdx, [rbp+var_660] lea rsi, isogeny_map_to_E1_isogeny_map_x_num lea rdi, [rbp+var_450] push 0Bh pop rcx mov r13, rdi call map_fp_times_Zz lea rdx, unk_803C0 lea r14, [rbp+var_C0] lea r15, [rbp+var_150] mov rdi, r14 mov rsi, r15 call mul_fp lea rdx, [rbp+var_270] mov rdi, r14 mov rsi, r14 call add_fp push 0Ah pop rbx mov rdi, r14 mov rsi, r15 mov r14, r13 mov rdx, r13 mov rcx, rbx call map_fp lea rdx, [rbp+var_630] lea rsi, isogeny_map_to_E1_isogeny_map_x_den mov rdi, r13 mov rcx, rbx call map_fp_times_Zz lea rdx, [rbp+var_2A0] lea rbx, [rbp+var_90] mov rdi, rbx mov rsi, r15 call add_fp push 9 pop rcx mov rdi, rbx mov rsi, r15 mov rdx, r13 call map_fp mov rdi, rbx mov rsi, rbx mov rdx, r12 call mul_fp lea rsi, isogeny_map_to_E1_isogeny_map_y_num lea rdx, [rbp+var_720] push 0Fh pop rcx mov rdi, r13 call map_fp_times_Zz lea rdx, unk_808A0 lea rbx, [rbp+var_60] mov rdi, rbx mov rsi, r15 call mul_fp lea rdx, [rbp+var_1B0] mov rdi, rbx mov rsi, rbx call add_fp push 0Eh pop rcx mov rdi, rbx mov rsi, r15 mov rdx, r13 call map_fp lea r13, [rbp+var_120] mov rdi, rbx mov rsi, rbx mov rdx, r13 call mul_fp lea rsi, isogeny_map_to_E1_isogeny_map_y_den mov rbx, r14 mov rdi, r14 lea rdx, [rbp+var_720] push 0Fh pop rcx call map_fp_times_Zz lea r14, [rbp+var_180] mov rdi, r14 mov rsi, r15 lea rdx, [rbp+var_1B0] call add_fp mov rdi, r14 mov rsi, r15 mov rdx, rbx push 0Eh pop rcx call map_fp mov rdi, r12 mov rsi, r12 lea rbx, [rbp+var_F0] mov rdx, rbx call mul_fp mov rdi, r14 mov rsi, r14 mov rdx, r12 call mul_fp mov rdi, rbx lea r12, [rbp+var_90] mov rsi, r12 mov rdx, r14 call mul_fp mov rdi, r15 lea rsi, [rbp+var_C0] mov rdx, r14 call mul_fp mov rdi, r15 mov rsi, r15 mov rdx, rbx call mul_fp mov rdi, r13 mov rsi, rbx call sqr_fp mov rdi, r13 mov rsi, r13 mov rdx, r12 call mul_fp mov rdi, r13 mov rsi, r13 lea rdx, [rbp+var_60] call mul_fp mov rbx, [rbp+var_30] mov rdi, rbx mov rsi, r15 call POINTonE1_times_minus_z mov rdi, rbx mov rsi, rbx mov rdx, r15 xor ecx, ecx call POINTonE1_dadd add rsp, 6F8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long map_to_g1(long long a1, long long a2, long long a3) { long long v4; // r14 _BYTE *v5; // rsi long long v6; // rbx _BYTE v8[192]; // [rsp+0h] [rbp-720h] BYREF _BYTE v9[48]; // [rsp+C0h] [rbp-660h] BYREF _BYTE v10[432]; // [rsp+F0h] [rbp-630h] BYREF _BYTE v11[48]; // [rsp+2A0h] [rbp-480h] BYREF _BYTE v12[432]; // [rsp+2D0h] [rbp-450h] BYREF _BYTE v13[48]; // [rsp+480h] [rbp-2A0h] BYREF _BYTE v14[192]; // [rsp+4B0h] [rbp-270h] BYREF _BYTE v15[48]; // [rsp+570h] [rbp-1B0h] BYREF _BYTE v16[48]; // [rsp+5A0h] [rbp-180h] BYREF _BYTE v17[48]; // [rsp+5D0h] [rbp-150h] BYREF _BYTE v18[48]; // [rsp+600h] [rbp-120h] BYREF _BYTE v19[48]; // [rsp+630h] [rbp-F0h] BYREF _BYTE v20[48]; // [rsp+660h] [rbp-C0h] BYREF _BYTE v21[48]; // [rsp+690h] [rbp-90h] BYREF _BYTE v22[48]; // [rsp+6C0h] [rbp-60h] BYREF long long v23; // [rsp+6F0h] [rbp-30h] map_to_isogenous_E1(v17); if ( a3 ) { map_to_isogenous_E1(a1); POINTonE1_dadd((long long)v17, (long long)v17, a1, (long long)&Aprime_E1); } v23 = a1; sqr_fp(v11, v19); v4 = -14LL; v5 = v11; while ( v4 ) { mul_fp(v5 - 48, v5, v11); ++v4; v5 -= 48; } map_fp_times_Zz(v12, &isogeny_map_to_E1_isogeny_map_x_num, v9, 11LL); mul_fp(v20, v17, &unk_803C0); add_fp(v20, v20, v14); map_fp(v20, v17, v12, 10LL); map_fp_times_Zz(v12, &isogeny_map_to_E1_isogeny_map_x_den, v10, 10LL); add_fp(v21, v17, v13); map_fp(v21, v17, v12, 9LL); mul_fp(v21, v21, v11); map_fp_times_Zz(v12, &isogeny_map_to_E1_isogeny_map_y_num, v8, 15LL); mul_fp(v22, v17, &unk_808A0); add_fp(v22, v22, v15); map_fp(v22, v17, v12, 14LL); mul_fp(v22, v22, v18); map_fp_times_Zz(v12, &isogeny_map_to_E1_isogeny_map_y_den, v8, 15LL); add_fp(v16, v17, v15); map_fp(v16, v17, v12, 14LL); mul_fp(v11, v11, v19); mul_fp(v16, v16, v11); mul_fp(v19, v21, v16); mul_fp(v17, v20, v16); mul_fp(v17, v17, v19); sqr_fp(v18, v19); mul_fp(v18, v18, v21); mul_fp(v18, v18, v22); v6 = v23; POINTonE1_times_minus_z(v23, v17); return POINTonE1_dadd(v6, v6, (long long)v17, 0LL); }
map_to_g1: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x6f8 MOV RBX,RDX MOV R14,RDI LEA RDI,[RBP + -0x150] CALL 0x0015bd46 TEST RBX,RBX JZ 0x0015302c MOV RDI,R14 MOV RSI,RBX CALL 0x0015bd46 LEA RCX,[0x180060] LEA RDI,[RBP + -0x150] MOV RSI,RDI MOV RDX,R14 CALL 0x00151a8a LAB_0015302c: MOV qword ptr [RBP + -0x30],R14 LEA R12,[RBP + -0x480] LEA RSI,[RBP + -0xf0] MOV RDI,R12 CALL 0x001582c9 PUSH -0xe POP R14 MOV RSI,R12 LAB_0015304d: TEST R14,R14 JZ 0x00153069 LEA RBX,[RSI + -0x30] MOV RDI,RBX MOV RDX,R12 CALL 0x0015aad8 INC R14 MOV RSI,RBX JMP 0x0015304d LAB_00153069: LEA RDX,[RBP + -0x660] LEA RSI,[0x1801b0] LEA RDI,[RBP + -0x450] PUSH 0xb POP RCX MOV R13,RDI CALL 0x0015c0a8 LEA RDX,[0x1803c0] LEA R14,[RBP + -0xc0] LEA R15,[RBP + -0x150] MOV RDI,R14 MOV RSI,R15 CALL 0x0015aad8 LEA RDX,[RBP + -0x270] MOV RDI,R14 MOV RSI,R14 CALL 0x00156a78 PUSH 0xa POP RBX MOV RDI,R14 MOV RSI,R15 MOV R14,R13 MOV RDX,R13 MOV RCX,RBX CALL 0x0015c0fd LEA RDX,[RBP + -0x630] LEA RSI,[0x1803f0] MOV RDI,R13 MOV RCX,RBX CALL 0x0015c0a8 LEA RDX,[RBP + -0x2a0] LEA RBX,[RBP + -0x90] MOV RDI,RBX MOV RSI,R15 CALL 0x00156a78 PUSH 0x9 POP RCX MOV RDI,RBX MOV RSI,R15 MOV RDX,R13 CALL 0x0015c0fd MOV RDI,RBX MOV RSI,RBX MOV RDX,R12 CALL 0x0015aad8 LEA RSI,[0x1805d0] LEA RDX,[RBP + -0x720] PUSH 0xf POP RCX MOV RDI,R13 CALL 0x0015c0a8 LEA RDX,[0x1808a0] LEA RBX,[RBP + -0x60] MOV RDI,RBX MOV RSI,R15 CALL 0x0015aad8 LEA RDX,[RBP + -0x1b0] MOV RDI,RBX MOV RSI,RBX CALL 0x00156a78 PUSH 0xe POP RCX MOV RDI,RBX MOV RSI,R15 MOV RDX,R13 CALL 0x0015c0fd LEA R13,[RBP + -0x120] MOV RDI,RBX MOV RSI,RBX MOV RDX,R13 CALL 0x0015aad8 LEA RSI,[0x1808d0] MOV RBX,R14 MOV RDI,R14 LEA RDX,[RBP + -0x720] PUSH 0xf POP RCX CALL 0x0015c0a8 LEA R14,[RBP + -0x180] MOV RDI,R14 MOV RSI,R15 LEA RDX,[RBP + -0x1b0] CALL 0x00156a78 MOV RDI,R14 MOV RSI,R15 MOV RDX,RBX PUSH 0xe POP RCX CALL 0x0015c0fd MOV RDI,R12 MOV RSI,R12 LEA RBX,[RBP + -0xf0] MOV RDX,RBX CALL 0x0015aad8 MOV RDI,R14 MOV RSI,R14 MOV RDX,R12 CALL 0x0015aad8 MOV RDI,RBX LEA R12,[RBP + -0x90] MOV RSI,R12 MOV RDX,R14 CALL 0x0015aad8 MOV RDI,R15 LEA RSI,[RBP + -0xc0] MOV RDX,R14 CALL 0x0015aad8 MOV RDI,R15 MOV RSI,R15 MOV RDX,RBX CALL 0x0015aad8 MOV RDI,R13 MOV RSI,RBX CALL 0x001582c9 MOV RDI,R13 MOV RSI,R13 MOV RDX,R12 CALL 0x0015aad8 MOV RDI,R13 MOV RSI,R13 LEA RDX,[RBP + -0x60] CALL 0x0015aad8 MOV RBX,qword ptr [RBP + -0x30] MOV RDI,RBX MOV RSI,R15 CALL 0x0015bfbe MOV RDI,RBX MOV RSI,RBX MOV RDX,R15 XOR ECX,ECX CALL 0x00151a8a ADD RSP,0x6f8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void map_to_g1(int8 param_1,int8 param_2,long param_3) { int8 uVar1; int1 *puVar2; long lVar3; int1 local_728 [192]; int1 local_668 [48]; int1 local_638 [432]; int1 local_488 [48]; int1 local_458 [432]; int1 local_2a8 [48]; int1 local_278 [192]; int1 local_1b8 [48]; int1 local_188 [48]; int1 local_158 [48]; int1 local_128 [48]; int1 local_f8 [48]; int1 local_c8 [48]; int1 local_98 [48]; int1 local_68 [48]; int8 local_38; map_to_isogenous_E1(local_158); if (param_3 != 0) { map_to_isogenous_E1(param_1,param_3); POINTonE1_dadd(local_158,local_158,param_1,Aprime_E1); } local_38 = param_1; sqr_fp(local_488,local_f8); puVar2 = local_488; for (lVar3 = -0xe; lVar3 != 0; lVar3 = lVar3 + 1) { mul_fp(puVar2 + -0x30,puVar2,local_488); puVar2 = puVar2 + -0x30; } map_fp_times_Zz(local_458,isogeny_map_to_E1_isogeny_map_x_num,local_668,0xb); mul_fp(local_c8,local_158,0x1803c0); add_fp(local_c8,local_c8,local_278); map_fp(local_c8,local_158,local_458,10); map_fp_times_Zz(local_458,isogeny_map_to_E1_isogeny_map_x_den,local_638,10); add_fp(local_98,local_158,local_2a8); map_fp(local_98,local_158,local_458,9); mul_fp(local_98,local_98,local_488); map_fp_times_Zz(local_458,isogeny_map_to_E1_isogeny_map_y_num,local_728,0xf); mul_fp(local_68,local_158,0x1808a0); add_fp(local_68,local_68,local_1b8); map_fp(local_68,local_158,local_458,0xe); mul_fp(local_68,local_68,local_128); map_fp_times_Zz(local_458,isogeny_map_to_E1_isogeny_map_y_den,local_728,0xf); add_fp(local_188,local_158,local_1b8); map_fp(local_188,local_158,local_458,0xe); mul_fp(local_488,local_488,local_f8); mul_fp(local_188,local_188,local_488); mul_fp(local_f8,local_98,local_188); mul_fp(local_158,local_c8,local_188); mul_fp(local_158,local_158,local_f8); sqr_fp(local_128,local_f8); mul_fp(local_128,local_128,local_98); mul_fp(local_128,local_128,local_68); uVar1 = local_38; POINTonE1_times_minus_z(local_38,local_158); POINTonE1_dadd(uVar1,uVar1,local_158,0); return; }
17,954
google::protobuf::compiler::java::(anonymous namespace)::ClassNameWithoutPackage[abi:cxx11](google::protobuf::EnumDescriptor const*, bool)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/name_resolver.cc
std::string ClassNameWithoutPackage(const EnumDescriptor* descriptor, bool immutable) { // Doesn't append "Mutable" for enum type's name. const Descriptor* message_descriptor = descriptor->containing_type(); if (message_descriptor == NULL) { return descriptor->name(); } else { return ClassNameWithoutPackage(message_descriptor, immutable) + "." + descriptor->name(); } }
O0
cpp
google::protobuf::compiler::java::(anonymous namespace)::ClassNameWithoutPackage[abi:cxx11](google::protobuf::EnumDescriptor const*, bool): subq $0x88, %rsp movq %rdi, 0x8(%rsp) movb %dl, %al movq %rdi, %rcx movq %rcx, 0x10(%rsp) movq %rdi, 0x80(%rsp) movq %rsi, 0x78(%rsp) andb $0x1, %al movb %al, 0x77(%rsp) movq 0x78(%rsp), %rdi callq 0x58150 movq %rax, 0x68(%rsp) cmpq $0x0, 0x68(%rsp) jne 0x7cd5c movq 0x78(%rsp), %rdi callq 0x58160 movq 0x8(%rsp), %rdi movq %rax, %rsi callq 0x21160 jmp 0x7cdf6 movq 0x68(%rsp), %rsi movzbl 0x77(%rsp), %edx andl $0x1, %edx leaq 0x28(%rsp), %rdi movq %rdi, (%rsp) callq 0x7cb30 movq (%rsp), %rsi leaq 0x384084(%rip), %rdx # 0x400e06 leaq 0x48(%rsp), %rdi callq 0x38840 jmp 0x7cd8e movq 0x78(%rsp), %rdi callq 0x58160 movq 0x8(%rsp), %rdi movq %rax, %rdx leaq 0x48(%rsp), %rsi callq 0x288b0 jmp 0x7cdac leaq 0x48(%rsp), %rdi callq 0x21cc8 leaq 0x28(%rsp), %rdi callq 0x21cc8 jmp 0x7cdf6 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x20(%rsp) movl %eax, 0x1c(%rsp) jmp 0x7cdea movq %rax, %rcx movl %edx, %eax movq %rcx, 0x20(%rsp) movl %eax, 0x1c(%rsp) leaq 0x48(%rsp), %rdi callq 0x21cc8 leaq 0x28(%rsp), %rdi callq 0x21cc8 jmp 0x7ce03 movq 0x10(%rsp), %rax addq $0x88, %rsp retq movq 0x20(%rsp), %rdi callq 0x21700 nopl (%rax)
_ZN6google8protobuf8compiler4java12_GLOBAL__N_123ClassNameWithoutPackageB5cxx11EPKNS0_14EnumDescriptorEb: sub rsp, 88h mov [rsp+88h+var_80], rdi mov al, dl mov rcx, rdi mov [rsp+88h+var_78], rcx mov [rsp+88h+var_8], rdi mov [rsp+88h+var_10], rsi and al, 1 mov [rsp+88h+var_11], al mov rdi, [rsp+88h+var_10]; this call _ZNK6google8protobuf14EnumDescriptor15containing_typeEv; google::protobuf::EnumDescriptor::containing_type(void) mov [rsp+88h+var_20], rax cmp [rsp+88h+var_20], 0 jnz short loc_7CD5C mov rdi, [rsp+88h+var_10] call _ZNK6google8protobuf14EnumDescriptor4nameB5cxx11Ev; google::protobuf::EnumDescriptor::name(void) mov rdi, [rsp+88h+var_80] mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&) jmp loc_7CDF6 loc_7CD5C: mov rsi, [rsp+88h+var_20] movzx edx, [rsp+88h+var_11] and edx, 1 lea rdi, [rsp+88h+var_60] mov [rsp+88h+var_88], rdi call _ZN6google8protobuf8compiler4java12_GLOBAL__N_123ClassNameWithoutPackageB5cxx11EPKNS0_10DescriptorEb; google::protobuf::compiler::java::`anonymous namespace'::ClassNameWithoutPackage(google::protobuf::Descriptor const*,bool) mov rsi, [rsp+88h+var_88] lea rdx, aWhichIsNotDefi+77h; "." lea rdi, [rsp+88h+var_40] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_7CD8E: mov rdi, [rsp+88h+var_10] call _ZNK6google8protobuf14EnumDescriptor4nameB5cxx11Ev; google::protobuf::EnumDescriptor::name(void) mov rdi, [rsp+88h+var_80] mov rdx, rax lea rsi, [rsp+88h+var_40] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_; std::operator+<char>(std::string&&,std::string const&) jmp short $+2 loc_7CDAC: lea rdi, [rsp+88h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+88h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_7CDF6 mov rcx, rax mov eax, edx mov [rsp+arg_18], rcx mov [rsp+arg_14], eax jmp short loc_7CDEA mov rcx, rax mov eax, edx mov [rsp+arg_18], rcx mov [rsp+arg_14], eax lea rdi, [rsp+arg_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_7CDEA: lea rdi, [rsp+arg_20]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_7CE03 loc_7CDF6: mov rax, [rsp+88h+var_78] add rsp, 88h retn loc_7CE03: mov rdi, [rsp+arg_18] call __Unwind_Resume
long long google::protobuf::compiler::java::`anonymous namespace'::ClassNameWithoutPackage[abi:cxx11]( long long a1, google::protobuf::EnumDescriptor *a2, char a3) { long long v3; // rax long long v4; // rax _BYTE v6[32]; // [rsp+28h] [rbp-60h] BYREF _BYTE v7[32]; // [rsp+48h] [rbp-40h] BYREF google::protobuf::Descriptor *v8; // [rsp+68h] [rbp-20h] char v9; // [rsp+77h] [rbp-11h] google::protobuf::EnumDescriptor *v10; // [rsp+78h] [rbp-10h] long long v11; // [rsp+80h] [rbp-8h] v11 = a1; v10 = a2; v9 = a3 & 1; v8 = (google::protobuf::Descriptor *)google::protobuf::EnumDescriptor::containing_type(a2); if ( v8 ) { google::protobuf::compiler::java::`anonymous namespace'::ClassNameWithoutPackage[abi:cxx11]((long long)v6, v8); std::operator+<char>((long long)v7, (long long)v6, (long long)"."); v4 = google::protobuf::EnumDescriptor::name[abi:cxx11]((long long)v10); std::operator+<char>(a1, (long long)v7, v4); std::string::~string(v7); std::string::~string(v6); } else { v3 = google::protobuf::EnumDescriptor::name[abi:cxx11]((long long)v10); std::string::basic_string(a1, v3); } return a1; }
ClassNameWithoutPackage[abi:cxx11]: SUB RSP,0x88 MOV qword ptr [RSP + 0x8],RDI MOV AL,DL MOV RCX,RDI MOV qword ptr [RSP + 0x10],RCX MOV qword ptr [RSP + 0x80],RDI MOV qword ptr [RSP + 0x78],RSI AND AL,0x1 MOV byte ptr [RSP + 0x77],AL MOV RDI,qword ptr [RSP + 0x78] CALL 0x00158150 MOV qword ptr [RSP + 0x68],RAX CMP qword ptr [RSP + 0x68],0x0 JNZ 0x0017cd5c MOV RDI,qword ptr [RSP + 0x78] CALL 0x00158160 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,RAX CALL 0x00121160 JMP 0x0017cdf6 LAB_0017cd5c: MOV RSI,qword ptr [RSP + 0x68] MOVZX EDX,byte ptr [RSP + 0x77] AND EDX,0x1 LEA RDI,[RSP + 0x28] MOV qword ptr [RSP],RDI CALL 0x0017cb30 MOV RSI,qword ptr [RSP] LAB_0017cd7b: LEA RDX,[0x500e06] LEA RDI,[RSP + 0x48] CALL 0x00138840 JMP 0x0017cd8e LAB_0017cd8e: MOV RDI,qword ptr [RSP + 0x78] CALL 0x00158160 MOV RDI,qword ptr [RSP + 0x8] MOV RDX,RAX LAB_0017cda0: LEA RSI,[RSP + 0x48] CALL 0x001288b0 LAB_0017cdaa: JMP 0x0017cdac LAB_0017cdac: LEA RDI,[RSP + 0x48] CALL 0x00121cc8 LEA RDI,[RSP + 0x28] CALL 0x00121cc8 JMP 0x0017cdf6 LAB_0017cdf6: MOV RAX,qword ptr [RSP + 0x10] ADD RSP,0x88 RET
/* google::protobuf::compiler::java::(anonymous namespace)::ClassNameWithoutPackage[abi:cxx11](google::protobuf::EnumDescriptor const*, bool) */ _anonymous_namespace_ * __thiscall google::protobuf::compiler::java::(anonymous_namespace)::ClassNameWithoutPackage_abi_cxx11_ (_anonymous_namespace_ *this,EnumDescriptor *param_1,bool param_2) { string *psVar1; Descriptor local_60 [32]; string local_40 [32]; long local_20; int1 local_11; EnumDescriptor *local_10; _anonymous_namespace_ *local_8; local_11 = param_2; local_10 = param_1; local_8 = this; local_20 = EnumDescriptor::containing_type(param_1); if (local_20 == 0) { psVar1 = (string *)EnumDescriptor::name_abi_cxx11_(local_10); std::__cxx11::string::string((string *)this,psVar1); } else { ClassNameWithoutPackage_abi_cxx11_(local_60,SUB81(local_20,0)); /* try { // try from 0017cd7b to 0017cd8b has its CatchHandler @ 0017cdc2 */ std::operator+(local_40,(char *)local_60); EnumDescriptor::name_abi_cxx11_(local_10); /* try { // try from 0017cda0 to 0017cda9 has its CatchHandler @ 0017cdd2 */ std::operator+((string *)this,local_40); std::__cxx11::string::~string(local_40); std::__cxx11::string::~string((string *)local_60); } return this; }
17,955
maria_init_bulk_insert
eloqsql/storage/maria/ma_write.c
int maria_init_bulk_insert(MARIA_HA *info, size_t cache_size, ha_rows rows) { MARIA_SHARE *share= info->s; MARIA_KEYDEF *key=share->keyinfo; bulk_insert_param *params; uint i, num_keys, total_keylength; ulonglong key_map; DBUG_ENTER("_ma_init_bulk_insert"); DBUG_PRINT("enter",("cache_size: %lu", (ulong) cache_size)); DBUG_ASSERT(!info->bulk_insert && (!rows || rows >= MARIA_MIN_ROWS_TO_USE_BULK_INSERT)); maria_clear_all_keys_active(key_map); for (i=total_keylength=num_keys=0 ; i < share->base.keys ; i++) { if (! (key[i].flag & HA_NOSAME) && (share->base.auto_key != i + 1) && maria_is_key_active(share->state.key_map, i)) { num_keys++; maria_set_key_active(key_map, i); total_keylength+=key[i].maxlength+TREE_ELEMENT_EXTRA_SIZE; } } if (num_keys==0 || num_keys * (size_t) MARIA_MIN_SIZE_BULK_INSERT_TREE > cache_size) DBUG_RETURN(0); if (rows && rows*total_keylength < cache_size) cache_size= (size_t)rows; else cache_size/=total_keylength*16; info->bulk_insert=(TREE *) my_malloc(PSI_INSTRUMENT_ME, (sizeof(TREE)*share->base.keys+ sizeof(bulk_insert_param)*num_keys),MYF(0)); if (!info->bulk_insert) DBUG_RETURN(HA_ERR_OUT_OF_MEM); params=(bulk_insert_param *)(info->bulk_insert+share->base.keys); for (i=0 ; i < share->base.keys ; i++) { if (maria_is_key_active(key_map, i)) { params->info=info; params->keynr=i; /* Only allocate a 16'th of the buffer at a time */ init_tree(&info->bulk_insert[i], cache_size * key[i].maxlength, cache_size * key[i].maxlength, 0, (qsort_cmp2) keys_compare, keys_free, (void *)params++, MYF(0)); } else info->bulk_insert[i].root=0; } DBUG_RETURN(0); }
O3
c
maria_init_bulk_insert: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, -0x30(%rbp) movq (%rdi), %r13 movl 0x3e8(%r13), %edi testq %rdi, %rdi je 0x58a6a movq %rdx, %rbx movq 0x570(%r13), %r14 xorl %ecx, %ecx xorl %r15d, %r15d xorl %r8d, %r8d xorl %eax, %eax imulq $0x118, %rcx, %r9 # imm = 0x118 testb $0x1, 0xa2(%r14,%r9) jne 0x5893f movl 0x3ec(%r13), %r10d leaq 0x1(%rcx), %rdx cmpq %r10, %rdx je 0x58945 movq 0x140(%r13), %r11 movl $0x1, %r10d shlq %cl, %r10 btq %rcx, %r11 jae 0x58945 addq %r14, %r9 incl %eax orq %r10, %r15 movzwl 0xae(%r9), %ecx addl %ecx, %r8d addl $0x20, %r8d jmp 0x58945 incq %rcx movq %rcx, %rdx movq %rdx, %rcx cmpq %rdi, %rdx jne 0x588ee xorl %r12d, %r12d testl %eax, %eax je 0x58a6d movq %r15, -0x40(%rbp) movl %eax, %ecx movq %rcx, %rax shlq $0xe, %rax cmpq %rsi, %rax ja 0x58a6d testq %rbx, %rbx je 0x5897f movl %r8d, %eax imulq %rbx, %rax cmpq %rsi, %rax jb 0x5898e shll $0x4, %r8d movq %rsi, %rax xorl %edx, %edx divq %r8 movq %rax, %rbx imulq $0x298, %rdi, %rax # imm = 0x298 shlq $0x4, %rcx addq %rax, %rcx xorl %r12d, %r12d xorl %edi, %edi movq %rcx, %rsi xorl %edx, %edx callq 0xa46f9 movq %rax, %r15 movq -0x30(%rbp), %rax movq %r15, 0x310(%rax) testq %r15, %r15 je 0x58a7f movl 0x3e8(%r13), %eax testq %rax, %rax je 0x58a6d movq %rbx, -0x38(%rbp) imulq $0x298, %rax, %rax # imm = 0x298 addq %rax, %r15 addq $0xae, %r14 xorl %r12d, %r12d xorl %ebx, %ebx movq -0x40(%rbp), %rax btq %rbx, %rax jae 0x58a3a movq -0x30(%rbp), %rax movq %rax, (%r15) movl %ebx, 0x8(%r15) movq 0x310(%rax), %rdi addq %r12, %rdi movzwl (%r14), %edx imulq -0x38(%rbp), %rdx movq %rdx, %rsi xorl %ecx, %ecx leaq 0x67(%rip), %r8 # 0x58a87 leaq 0xa1(%rip), %r9 # 0x58ac8 pushq $0x0 pushq %r15 addq $0x10, %r15 callq 0xa8f1c addq $0x10, %rsp jmp 0x58a4d movq -0x30(%rbp), %rax movq 0x310(%rax), %rax movq $0x0, (%rax,%r12) incq %rbx movl 0x3e8(%r13), %eax addq $0x298, %r12 # imm = 0x298 addq $0x118, %r14 # imm = 0x118 cmpq %rax, %rbx jb 0x589ec xorl %r12d, %r12d movl %r12d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x80, %r12d jmp 0x58a6d
maria_init_bulk_insert: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_30], rdi mov r13, [rdi] mov edi, [r13+3E8h] test rdi, rdi jz loc_58A6A mov rbx, rdx mov r14, [r13+570h] xor ecx, ecx xor r15d, r15d xor r8d, r8d xor eax, eax loc_588EE: imul r9, rcx, 118h test byte ptr [r14+r9+0A2h], 1 jnz short loc_5893F mov r10d, [r13+3ECh] lea rdx, [rcx+1] cmp rdx, r10 jz short loc_58945 mov r11, [r13+140h] mov r10d, 1 shl r10, cl bt r11, rcx jnb short loc_58945 add r9, r14 inc eax or r15, r10 movzx ecx, word ptr [r9+0AEh] add r8d, ecx add r8d, 20h ; ' ' jmp short loc_58945 loc_5893F: inc rcx mov rdx, rcx loc_58945: mov rcx, rdx cmp rdx, rdi jnz short loc_588EE xor r12d, r12d test eax, eax jz loc_58A6D mov [rbp+var_40], r15 mov ecx, eax mov rax, rcx shl rax, 0Eh cmp rax, rsi ja loc_58A6D test rbx, rbx jz short loc_5897F mov eax, r8d imul rax, rbx cmp rax, rsi jb short loc_5898E loc_5897F: shl r8d, 4 mov rax, rsi xor edx, edx div r8 mov rbx, rax loc_5898E: imul rax, rdi, 298h shl rcx, 4 add rcx, rax xor r12d, r12d xor edi, edi mov rsi, rcx xor edx, edx call my_malloc mov r15, rax mov rax, [rbp+var_30] mov [rax+310h], r15 test r15, r15 jz loc_58A7F mov eax, [r13+3E8h] test rax, rax jz loc_58A6D mov [rbp+var_38], rbx imul rax, 298h add r15, rax add r14, 0AEh xor r12d, r12d xor ebx, ebx loc_589EC: mov rax, [rbp+var_40] bt rax, rbx jnb short loc_58A3A mov rax, [rbp+var_30] mov [r15], rax mov [r15+8], ebx mov rdi, [rax+310h] add rdi, r12 movzx edx, word ptr [r14] imul rdx, [rbp+var_38] mov rsi, rdx xor ecx, ecx lea r8, keys_compare lea r9, keys_free push 0 push r15 add r15, 10h call init_tree add rsp, 10h jmp short loc_58A4D loc_58A3A: mov rax, [rbp+var_30] mov rax, [rax+310h] mov qword ptr [rax+r12], 0 loc_58A4D: inc rbx mov eax, [r13+3E8h] add r12, 298h add r14, 118h cmp rbx, rax jb short loc_589EC loc_58A6A: xor r12d, r12d loc_58A6D: mov eax, r12d add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_58A7F: mov r12d, 80h jmp short loc_58A6D
long long maria_init_bulk_insert(_QWORD *a1, unsigned long long a2, unsigned long long a3) { long long v3; // r13 long long v4; // rdi long long v6; // r14 unsigned long long v7; // rcx long long v8; // r15 unsigned int v9; // r8d unsigned int v10; // eax unsigned long long v11; // rdx long long v12; // r11 unsigned int v13; // r12d long long v14; // r15 long long v15; // r15 unsigned __int16 *v16; // r14 long long v17; // r12 unsigned long long v18; // rbx long long v19; // rax long long v21; // [rsp-10h] [rbp-50h] long long v22; // [rsp+0h] [rbp-40h] int v23; // [rsp+8h] [rbp-38h] v3 = *a1; v4 = *(unsigned int *)(*a1 + 1000LL); if ( !v4 ) return 0; v6 = *(_QWORD *)(v3 + 1392); v7 = 0LL; v8 = 0LL; v9 = 0; v10 = 0; do { if ( (*(_BYTE *)(v6 + 280 * v7 + 162) & 1) != 0 ) { v11 = v7 + 1; } else { v11 = v7 + 1; if ( v7 + 1 != *(_DWORD *)(v3 + 1004) ) { v12 = *(_QWORD *)(v3 + 320); if ( _bittest64(&v12, v7) ) { ++v10; v8 |= 1LL << v7; v9 += *(unsigned __int16 *)(v6 + 280 * v7 + 174) + 32; } } } v7 = v11; } while ( v11 != v4 ); v13 = 0; if ( v10 ) { v22 = v8; if ( (unsigned long long)v10 << 14 <= a2 ) { if ( !a3 || a3 * v9 >= a2 ) a3 = a2 / (16 * v9); v13 = 0; v14 = my_malloc(0LL, 664 * v4 + 16LL * v10, 0LL); a1[98] = v14; if ( !v14 ) return 128; if ( *(_DWORD *)(v3 + 1000) ) { v23 = a3; v15 = 664LL * *(unsigned int *)(v3 + 1000) + v14; v16 = (unsigned __int16 *)(v6 + 174); v17 = 0LL; v18 = 0LL; do { v19 = v22; if ( _bittest64(&v19, v18) ) { *(_QWORD *)v15 = a1; *(_DWORD *)(v15 + 8) = v18; v21 = v15; v15 += 16LL; init_tree( v17 + *((_DWORD *)a1 + 196), v23 * *v16, v23 * *v16, 0, (unsigned int)keys_compare, (unsigned int)keys_free, v21, 0LL); } else { *(_QWORD *)(a1[98] + v17) = 0LL; } ++v18; v17 += 664LL; v16 += 140; } while ( v18 < *(unsigned int *)(v3 + 1000) ); return 0; } } } return v13; }
maria_init_bulk_insert: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x30],RDI MOV R13,qword ptr [RDI] MOV EDI,dword ptr [R13 + 0x3e8] TEST RDI,RDI JZ 0x00158a6a MOV RBX,RDX MOV R14,qword ptr [R13 + 0x570] XOR ECX,ECX XOR R15D,R15D XOR R8D,R8D XOR EAX,EAX LAB_001588ee: IMUL R9,RCX,0x118 TEST byte ptr [R14 + R9*0x1 + 0xa2],0x1 JNZ 0x0015893f MOV R10D,dword ptr [R13 + 0x3ec] LEA RDX,[RCX + 0x1] CMP RDX,R10 JZ 0x00158945 MOV R11,qword ptr [R13 + 0x140] MOV R10D,0x1 SHL R10,CL BT R11,RCX JNC 0x00158945 ADD R9,R14 INC EAX OR R15,R10 MOVZX ECX,word ptr [R9 + 0xae] ADD R8D,ECX ADD R8D,0x20 JMP 0x00158945 LAB_0015893f: INC RCX MOV RDX,RCX LAB_00158945: MOV RCX,RDX CMP RDX,RDI JNZ 0x001588ee XOR R12D,R12D TEST EAX,EAX JZ 0x00158a6d MOV qword ptr [RBP + -0x40],R15 MOV ECX,EAX MOV RAX,RCX SHL RAX,0xe CMP RAX,RSI JA 0x00158a6d TEST RBX,RBX JZ 0x0015897f MOV EAX,R8D IMUL RAX,RBX CMP RAX,RSI JC 0x0015898e LAB_0015897f: SHL R8D,0x4 MOV RAX,RSI XOR EDX,EDX DIV R8 MOV RBX,RAX LAB_0015898e: IMUL RAX,RDI,0x298 SHL RCX,0x4 ADD RCX,RAX XOR R12D,R12D XOR EDI,EDI MOV RSI,RCX XOR EDX,EDX CALL 0x001a46f9 MOV R15,RAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x310],R15 TEST R15,R15 JZ 0x00158a7f MOV EAX,dword ptr [R13 + 0x3e8] TEST RAX,RAX JZ 0x00158a6d MOV qword ptr [RBP + -0x38],RBX IMUL RAX,RAX,0x298 ADD R15,RAX ADD R14,0xae XOR R12D,R12D XOR EBX,EBX LAB_001589ec: MOV RAX,qword ptr [RBP + -0x40] BT RAX,RBX JNC 0x00158a3a MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [R15],RAX MOV dword ptr [R15 + 0x8],EBX MOV RDI,qword ptr [RAX + 0x310] ADD RDI,R12 MOVZX EDX,word ptr [R14] IMUL RDX,qword ptr [RBP + -0x38] MOV RSI,RDX XOR ECX,ECX LEA R8,[0x158a87] LEA R9,[0x158ac8] PUSH 0x0 PUSH R15 ADD R15,0x10 CALL 0x001a8f1c ADD RSP,0x10 JMP 0x00158a4d LAB_00158a3a: MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x310] MOV qword ptr [RAX + R12*0x1],0x0 LAB_00158a4d: INC RBX MOV EAX,dword ptr [R13 + 0x3e8] ADD R12,0x298 ADD R14,0x118 CMP RBX,RAX JC 0x001589ec LAB_00158a6a: XOR R12D,R12D LAB_00158a6d: MOV EAX,R12D ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00158a7f: MOV R12D,0x80 JMP 0x00158a6d
int8 maria_init_bulk_insert(long *param_1,ulong param_2,ulong param_3) { long lVar1; uint uVar2; long lVar3; ulong uVar4; ulong uVar5; ulong uVar6; long lVar7; ushort *puVar8; ulong uVar9; int8 *puVar10; lVar1 = *param_1; uVar5 = (ulong)*(uint *)(lVar1 + 1000); if (uVar5 != 0) { lVar7 = *(long *)(lVar1 + 0x570); uVar4 = 0; uVar9 = 0; uVar6 = 0; uVar2 = 0; do { if ((((*(byte *)(lVar7 + 0xa2 + uVar4 * 0x118) & 1) == 0) && (uVar4 + 1 != (ulong)*(uint *)(lVar1 + 0x3ec))) && ((*(ulong *)(lVar1 + 0x140) >> (uVar4 & 0x3f) & 1) != 0)) { uVar2 = uVar2 + 1; uVar9 = uVar9 | 1L << ((byte)uVar4 & 0x3f); uVar6 = (ulong)((int)uVar6 + (uint)*(ushort *)(uVar4 * 0x118 + lVar7 + 0xae) + 0x20); } uVar4 = uVar4 + 1; } while (uVar4 != uVar5); if (uVar2 == 0) { return 0; } if (param_2 < (ulong)uVar2 << 0xe) { return 0; } if ((param_3 == 0) || (param_2 <= uVar6 * param_3)) { param_3 = param_2 / (uint)((int)uVar6 << 4); } lVar3 = my_malloc(0,(ulong)uVar2 * 0x10 + uVar5 * 0x298,0); param_1[0x62] = lVar3; if (lVar3 == 0) { return 0x80; } if ((ulong)*(uint *)(lVar1 + 1000) == 0) { return 0; } puVar10 = (int8 *)(lVar3 + (ulong)*(uint *)(lVar1 + 1000) * 0x298); puVar8 = (ushort *)(lVar7 + 0xae); lVar7 = 0; uVar5 = 0; do { if ((uVar9 >> (uVar5 & 0x3f) & 1) == 0) { *(int8 *)(param_1[0x62] + lVar7) = 0; } else { *puVar10 = param_1; *(int *)(puVar10 + 1) = (int)uVar5; init_tree(param_1[0x62] + lVar7,*puVar8 * param_3,*puVar8 * param_3,0,keys_compare,keys_free ,puVar10,0,uVar9,param_3); puVar10 = puVar10 + 2; } uVar5 = uVar5 + 1; lVar7 = lVar7 + 0x298; puVar8 = puVar8 + 0x8c; } while (uVar5 < *(uint *)(lVar1 + 1000)); } return 0; }
17,956
my_numcells_eucjp
eloqsql/strings/ctype-ujis.c
static size_t my_numcells_eucjp(CHARSET_INFO *cs __attribute__((unused)), const char *str, const char *str_end) { size_t clen; const uchar *b= (const uchar *) str; const uchar *e= (const uchar *) str_end; for (clen= 0; b < e; ) { if (*b == 0x8E) { clen++; b+= 2; } else if (*b == 0x8F) { clen+= 2; b+= 3; } else if (*b & 0x80) { clen+= 2; b+= 2; } else { clen++; b++; } } return clen; }
O3
c
my_numcells_eucjp: cmpq %rdx, %rsi jae 0xca8fa pushq %rbp movq %rsp, %rbp xorl %eax, %eax movzbl (%rsi), %edi cmpl $0x8e, %edi je 0xca8d3 cmpl $0x8f, %edi jne 0xca8df movl $0x3, %edi movl $0x2, %ecx jmp 0xca8ed movl $0x2, %edi movl $0x1, %ecx jmp 0xca8ed xorl %ecx, %ecx testb %dil, %dil sets %cl incq %rcx movq %rcx, %rdi addq %rcx, %rax addq %rdi, %rsi cmpq %rdx, %rsi jb 0xca8b4 popq %rbp retq xorl %eax, %eax retq
my_numcells_eucjp: cmp rsi, rdx jnb short loc_CA8FA push rbp mov rbp, rsp xor eax, eax loc_CA8B4: movzx edi, byte ptr [rsi] cmp edi, 8Eh jz short loc_CA8D3 cmp edi, 8Fh jnz short loc_CA8DF mov edi, 3 mov ecx, 2 jmp short loc_CA8ED loc_CA8D3: mov edi, 2 mov ecx, 1 jmp short loc_CA8ED loc_CA8DF: xor ecx, ecx test dil, dil sets cl inc rcx mov rdi, rcx loc_CA8ED: add rax, rcx add rsi, rdi cmp rsi, rdx jb short loc_CA8B4 pop rbp retn loc_CA8FA: xor eax, eax retn
long long my_numcells_eucjp(long long a1, unsigned __int8 *a2, unsigned long long a3) { long long result; // rax int v4; // edi long long v5; // rdi long long v6; // rcx if ( (unsigned long long)a2 >= a3 ) return 0LL; result = 0LL; do { v4 = *a2; if ( v4 == 142 ) { v5 = 2LL; v6 = 1LL; } else if ( v4 == 143 ) { v5 = 3LL; v6 = 2LL; } else { v6 = ((v4 & 0x80u) != 0) + 1LL; v5 = v6; } result += v6; a2 += v5; } while ( (unsigned long long)a2 < a3 ); return result; }
my_numcells_eucjp: CMP RSI,RDX JNC 0x001ca8fa PUSH RBP MOV RBP,RSP XOR EAX,EAX LAB_001ca8b4: MOVZX EDI,byte ptr [RSI] CMP EDI,0x8e JZ 0x001ca8d3 CMP EDI,0x8f JNZ 0x001ca8df MOV EDI,0x3 MOV ECX,0x2 JMP 0x001ca8ed LAB_001ca8d3: MOV EDI,0x2 MOV ECX,0x1 JMP 0x001ca8ed LAB_001ca8df: XOR ECX,ECX TEST DIL,DIL SETS CL INC RCX MOV RDI,RCX LAB_001ca8ed: ADD RAX,RCX ADD RSI,RDI CMP RSI,RDX JC 0x001ca8b4 POP RBP RET LAB_001ca8fa: XOR EAX,EAX RET
long my_numcells_eucjp(int8 param_1,char *param_2,char *param_3) { char cVar1; long lVar2; long lVar3; long lVar4; if (param_2 < param_3) { lVar2 = 0; do { cVar1 = *param_2; if (cVar1 == -0x72) { lVar4 = 2; lVar3 = 1; } else if (cVar1 == -0x71) { lVar3 = 2; lVar4 = 3; } else { lVar3 = (ulong)(cVar1 < '\0') + 1; lVar4 = lVar3; } lVar2 = lVar2 + lVar3; param_2 = param_2 + lVar4; } while (param_2 < param_3); return lVar2; } return 0; }
17,957
ftb_parse_query
eloqsql/storage/myisam/ft_boolean_search.c
static int _ftb_parse_query(FTB *ftb, uchar *query, uint len, struct st_mysql_ftparser *parser) { MYSQL_FTPARSER_PARAM *param; MY_FTB_PARAM ftb_param; DBUG_ENTER("_ftb_parse_query"); DBUG_ASSERT(parser); if (ftb->state != UNINITIALIZED) DBUG_RETURN(0); if (! (param= ftparser_call_initializer(ftb->info, ftb->keynr, 0))) DBUG_RETURN(1); ftb_param.ftb= ftb; ftb_param.depth= 0; ftb_param.ftbe= ftb->root; ftb_param.up_quot= 0; param->mysql_parse= ftb_parse_query_internal; param->mysql_add_word= ftb_query_add_word; param->mysql_ftparam= (void *)&ftb_param; param->cs= ftb->charset; param->doc= (char*) query; param->length= len; param->flags= 0; param->mode= MYSQL_FTPARSER_FULL_BOOLEAN_INFO; DBUG_RETURN(parser->parse(param)); }
O0
c
ftb_parse_query: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq %rcx, -0x28(%rbp) jmp 0x9dcb9 movq -0x10(%rbp), %rax cmpl $0x0, 0x348(%rax) je 0x9dcd4 jmp 0x9dcc8 movl $0x0, -0x4(%rbp) jmp 0x9dd9e movq -0x10(%rbp), %rax movq 0x8(%rax), %rdi movq -0x10(%rbp), %rax movl 0x340(%rax), %esi xorl %edx, %edx callq 0xa1e90 movq %rax, -0x30(%rbp) cmpq $0x0, %rax jne 0x9dd05 jmp 0x9dcf9 movl $0x1, -0x4(%rbp) jmp 0x9dd9e movq -0x10(%rbp), %rax movq %rax, -0x50(%rbp) movl $0x0, -0x38(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x48(%rbp) movq $0x0, -0x40(%rbp) movq -0x30(%rbp), %rax leaq 0x118d(%rip), %rcx # 0x9eec0 movq %rcx, (%rax) movq -0x30(%rbp), %rax leaq 0x121f(%rip), %rcx # 0x9ef60 movq %rcx, 0x8(%rax) movq -0x30(%rbp), %rax leaq -0x50(%rbp), %rcx movq %rcx, 0x18(%rax) movq -0x10(%rbp), %rax movq 0x10(%rax), %rcx movq -0x30(%rbp), %rax movq %rcx, 0x20(%rax) movq -0x18(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, 0x28(%rax) movl -0x1c(%rbp), %ecx movq -0x30(%rbp), %rax movl %ecx, 0x30(%rax) movq -0x30(%rbp), %rax movl $0x0, 0x34(%rax) movq -0x30(%rbp), %rax movl $0x2, 0x38(%rax) movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq -0x30(%rbp), %rdi callq *%rax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw (%rax,%rax)
_ftb_parse_query: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_28], rcx jmp short $+2 loc_9DCB9: mov rax, [rbp+var_10] cmp dword ptr [rax+348h], 0 jz short loc_9DCD4 jmp short $+2 loc_9DCC8: mov [rbp+var_4], 0 jmp loc_9DD9E loc_9DCD4: mov rax, [rbp+var_10] mov rdi, [rax+8] mov rax, [rbp+var_10] mov esi, [rax+340h] xor edx, edx call ftparser_call_initializer mov [rbp+var_30], rax cmp rax, 0 jnz short loc_9DD05 jmp short $+2 loc_9DCF9: mov [rbp+var_4], 1 jmp loc_9DD9E loc_9DD05: mov rax, [rbp+var_10] mov [rbp+var_50], rax mov [rbp+var_38], 0 mov rax, [rbp+var_10] mov rax, [rax+18h] mov [rbp+var_48], rax mov [rbp+var_40], 0 mov rax, [rbp+var_30] lea rcx, ftb_parse_query_internal mov [rax], rcx mov rax, [rbp+var_30] lea rcx, ftb_query_add_word mov [rax+8], rcx mov rax, [rbp+var_30] lea rcx, [rbp+var_50] mov [rax+18h], rcx mov rax, [rbp+var_10] mov rcx, [rax+10h] mov rax, [rbp+var_30] mov [rax+20h], rcx mov rcx, [rbp+var_18] mov rax, [rbp+var_30] mov [rax+28h], rcx mov ecx, [rbp+var_1C] mov rax, [rbp+var_30] mov [rax+30h], ecx mov rax, [rbp+var_30] mov dword ptr [rax+34h], 0 mov rax, [rbp+var_30] mov dword ptr [rax+38h], 2 mov rax, [rbp+var_28] mov rax, [rax+8] mov rdi, [rbp+var_30] call rax mov [rbp+var_4], eax loc_9DD9E: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long ftb_parse_query(long long a1, long long a2, unsigned int a3, long long a4) { long long v4; // rsi long long v5; // rdx long long v6; // r8 long long v7; // r9 long long v8; // rcx long long v10; // [rsp+0h] [rbp-50h] BYREF long long v11; // [rsp+8h] [rbp-48h] long long v12; // [rsp+10h] [rbp-40h] int v13; // [rsp+18h] [rbp-38h] long long v14; // [rsp+20h] [rbp-30h] long long v15; // [rsp+28h] [rbp-28h] unsigned int v16; // [rsp+34h] [rbp-1Ch] long long v17; // [rsp+38h] [rbp-18h] long long v18; // [rsp+40h] [rbp-10h] v18 = a1; v17 = a2; v16 = a3; v15 = a4; if ( *(_DWORD *)(a1 + 840) ) { return 0; } else { v4 = *(unsigned int *)(v18 + 832); v14 = ftparser_call_initializer(*(_QWORD *)(v18 + 8), v4, 0LL); if ( v14 ) { v10 = v18; v13 = 0; v11 = *(_QWORD *)(v18 + 24); v12 = 0LL; *(_QWORD *)v14 = ftb_parse_query_internal; *(_QWORD *)(v14 + 8) = ftb_query_add_word; *(_QWORD *)(v14 + 24) = &v10; *(_QWORD *)(v14 + 32) = *(_QWORD *)(v18 + 16); *(_QWORD *)(v14 + 40) = v17; v8 = v16; *(_DWORD *)(v14 + 48) = v16; *(_DWORD *)(v14 + 52) = 0; *(_DWORD *)(v14 + 56) = 2; return (unsigned int)(*(long long ( **)(long long, long long, long long, long long, long long, long long, long long, long long, long long, int))(v15 + 8))( v14, v4, v5, v8, v6, v7, v10, v11, v12, v13); } else { return 1; } } }
_ftb_parse_query: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV qword ptr [RBP + -0x28],RCX JMP 0x0019dcb9 LAB_0019dcb9: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x348],0x0 JZ 0x0019dcd4 JMP 0x0019dcc8 LAB_0019dcc8: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0019dd9e LAB_0019dcd4: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RAX + 0x340] XOR EDX,EDX CALL 0x001a1e90 MOV qword ptr [RBP + -0x30],RAX CMP RAX,0x0 JNZ 0x0019dd05 JMP 0x0019dcf9 LAB_0019dcf9: MOV dword ptr [RBP + -0x4],0x1 JMP 0x0019dd9e LAB_0019dd05: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x50],RAX MOV dword ptr [RBP + -0x38],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x48],RAX MOV qword ptr [RBP + -0x40],0x0 MOV RAX,qword ptr [RBP + -0x30] LEA RCX,[0x19eec0] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x30] LEA RCX,[0x19ef60] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x30] LEA RCX,[RBP + -0x50] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x20],RCX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x28],RCX MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x30],ECX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x34],0x0 MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x38],0x2 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RDI,qword ptr [RBP + -0x30] CALL RAX MOV dword ptr [RBP + -0x4],EAX LAB_0019dd9e: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int4 _ftb_parse_query(long param_1,int8 param_2,int4 param_3,long param_4) { long local_58; int8 local_50; int8 local_48; int4 local_40; int8 *local_38; long local_30; int4 local_24; int8 local_20; long local_18; int4 local_c; if (*(int *)(param_1 + 0x348) == 0) { local_30 = param_4; local_24 = param_3; local_20 = param_2; local_18 = param_1; local_38 = (int8 *) ftparser_call_initializer (*(int8 *)(param_1 + 8),*(int4 *)(param_1 + 0x340),0); if (local_38 == (int8 *)0x0) { local_c = 1; } else { local_58 = local_18; local_40 = 0; local_50 = *(int8 *)(local_18 + 0x18); local_48 = 0; *local_38 = ftb_parse_query_internal; local_38[1] = ftb_query_add_word; local_38[3] = &local_58; local_38[4] = *(int8 *)(local_18 + 0x10); local_38[5] = local_20; *(int4 *)(local_38 + 6) = local_24; *(int4 *)((long)local_38 + 0x34) = 0; *(int4 *)(local_38 + 7) = 2; local_c = (**(code **)(local_30 + 8))(local_38); } } else { local_c = 0; } return local_c; }
17,958
minja::SetNode::SetNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Expression>&&)
monkey531[P]llama/common/minja.hpp
SetNode(const Location & location, const std::string & ns, const std::vector<std::string> & vns, std::shared_ptr<Expression> && v) : TemplateNode(location), ns(ns), var_names(vns), value(std::move(v)) {}
O2
cpp
minja::SetNode::SetNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Expression>&&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %r8, %r14 movq %rcx, %r15 movq %rdx, %r13 movq %rdi, %rbx callq 0x765b4 leaq 0x880f5(%rip), %rax # 0x101338 addq $0x10, %rax movq %rax, (%rbx) leaq 0x20(%rbx), %r12 movq %r12, %rdi movq %r13, %rsi callq 0x24e40 leaq 0x40(%rbx), %rdi movq %r15, %rsi callq 0x3d6d8 andq $0x0, 0x60(%rbx) movups (%r14), %xmm0 andq $0x0, 0x8(%r14) movups %xmm0, 0x58(%rbx) andq $0x0, (%r14) popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r14 movq %r12, %rdi callq 0x254d8 jmp 0x79295 movq %rax, %r14 movq %rbx, %rdi callq 0x7b22e movq %r14, %rdi callq 0x25250 nop
_ZN5minja7SetNodeC2ERKNS_8LocationERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS9_SaIS9_EEOSt10shared_ptrINS_10ExpressionEE: push r15 push r14 push r13 push r12 push rbx mov r14, r8 mov r15, rcx mov r13, rdx mov rbx, rdi call _ZN5minja12TemplateNodeC2ERKNS_8LocationE; minja::TemplateNode::TemplateNode(minja::Location const&) lea rax, _ZTVN5minja7SetNodeE; `vtable for'minja::SetNode add rax, 10h mov [rbx], rax lea r12, [rbx+20h] mov rdi, r12 mov rsi, r13 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) lea rdi, [rbx+40h] mov rsi, r15 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) and qword ptr [rbx+60h], 0 movups xmm0, xmmword ptr [r14] and qword ptr [r14+8], 0 movups xmmword ptr [rbx+58h], xmm0 and qword ptr [r14], 0 pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r14, rax mov rdi, r12; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_79295 mov r14, rax loc_79295: mov rdi, rbx; this call _ZN5minja12TemplateNodeD2Ev; minja::TemplateNode::~TemplateNode() mov rdi, r14 call __Unwind_Resume
long long minja::SetNode::SetNode(long long a1, _QWORD *a2, long long a3, long long *a4, __int128 *a5) { long long result; // rax __int128 v9; // xmm0 minja::TemplateNode::TemplateNode((_QWORD *)a1, a2); *(_QWORD *)a1 = &`vtable for'minja::SetNode + 2; std::string::basic_string(a1 + 32, a3); result = std::vector<std::string>::vector((long long *)(a1 + 64), a4); *(_QWORD *)(a1 + 96) = 0LL; v9 = *a5; *((_QWORD *)a5 + 1) = 0LL; *(_OWORD *)(a1 + 88) = v9; *(_QWORD *)a5 = 0LL; return result; }
SetNode: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R14,R8 MOV R15,RCX MOV R13,RDX MOV RBX,RDI CALL 0x001765b4 LEA RAX,[0x201338] ADD RAX,0x10 MOV qword ptr [RBX],RAX LEA R12,[RBX + 0x20] LAB_0017924e: MOV RDI,R12 MOV RSI,R13 CALL 0x00124e40 LEA RDI,[RBX + 0x40] LAB_0017925d: MOV RSI,R15 CALL 0x0013d6d8 LAB_00179265: AND qword ptr [RBX + 0x60],0x0 MOVUPS XMM0,xmmword ptr [R14] AND qword ptr [R14 + 0x8],0x0 MOVUPS xmmword ptr [RBX + 0x58],XMM0 AND qword ptr [R14],0x0 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* minja::SetNode::SetNode(minja::Location const&, std::__cxx11::string const&, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, std::shared_ptr<minja::Expression>&&) */ void __thiscall minja::SetNode::SetNode (SetNode *this,Location *param_1,string *param_2,vector *param_3,shared_ptr *param_4) { int8 uVar1; TemplateNode::TemplateNode((TemplateNode *)this,param_1); *(int ***)this = &PTR_do_render_00201348; /* try { // try from 0017924e to 00179258 has its CatchHandler @ 00179292 */ std::__cxx11::string::string((string *)(this + 0x20),param_2); /* try { // try from 0017925d to 00179264 has its CatchHandler @ 00179285 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x40), param_3); *(int8 *)(this + 0x60) = 0; uVar1 = *(int8 *)(param_4 + 8); *(int8 *)(param_4 + 8) = 0; *(int8 *)(this + 0x58) = *(int8 *)param_4; *(int8 *)(this + 0x60) = uVar1; *(int8 *)param_4 = 0; return; }
17,959
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; }
17,960
find_blob
eloqsql/storage/maria/ma_bitmap.c
static my_bool find_blob(MARIA_HA *info, ulong length) { MARIA_FILE_BITMAP *bitmap= &info->s->bitmap; uint full_page_size= FULL_PAGE_SIZE(info->s); ulong pages; uint rest_length, used; uint UNINIT_VAR(first_block_pos); MARIA_BITMAP_BLOCK *first_block= 0; DBUG_ENTER("find_blob"); DBUG_PRINT("enter", ("length: %lu", length)); pages= length / full_page_size; rest_length= (uint) (length - pages * full_page_size); if (rest_length >= MAX_TAIL_SIZE(info->s->block_size)) { pages++; rest_length= 0; } first_block_pos= info->bitmap_blocks.elements; if (pages) { MARIA_BITMAP_BLOCK *block; if (allocate_dynamic(&info->bitmap_blocks, info->bitmap_blocks.elements + pages / BLOB_SEGMENT_MIN_SIZE + 2)) DBUG_RETURN(1); block= dynamic_element(&info->bitmap_blocks, info->bitmap_blocks.elements, MARIA_BITMAP_BLOCK*); do { /* We use 0x3fff here as the two upmost bits are reserved for TAIL_BIT and START_EXTENT_BIT */ used= allocate_full_pages(bitmap, (pages >= 0x3fff ? 0x3fff : (uint) pages), block, 0); if (!used) { if (move_to_next_bitmap(info, bitmap)) DBUG_RETURN(1); } else { pages-= used; info->bitmap_blocks.elements++; block++; } } while (pages != 0); } if (rest_length && find_tail(info, rest_length, info->bitmap_blocks.elements++)) DBUG_RETURN(1); first_block= dynamic_element(&info->bitmap_blocks, first_block_pos, MARIA_BITMAP_BLOCK*); first_block->sub_blocks= info->bitmap_blocks.elements - first_block_pos; DBUG_RETURN(0); }
O0
c
find_blob: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax addq $0xa10, %rax # imm = 0xA10 movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movl 0x7bc(%rax), %eax movq -0x10(%rbp), %rcx movq (%rcx), %rcx movl 0xc18(%rcx), %ecx addl $0x8, %ecx subl %ecx, %eax subl $0x4, %eax movl %eax, -0x24(%rbp) movl -0x3c(%rbp), %eax movl %eax, -0x3c(%rbp) movq $0x0, -0x48(%rbp) jmp 0x63a46 movq -0x18(%rbp), %rax movl -0x24(%rbp), %ecx xorl %edx, %edx divq %rcx movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rax movq -0x30(%rbp), %rcx movl -0x24(%rbp), %edx imulq %rdx, %rcx subq %rcx, %rax movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax movq -0x10(%rbp), %rcx movq (%rcx), %rcx imull $0x3, 0x7bc(%rcx), %ecx shrl $0x2, %ecx cmpl %ecx, %eax jb 0x63a96 movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) movl $0x0, -0x34(%rbp) movq -0x10(%rbp), %rax movl 0x2c8(%rax), %eax movl %eax, -0x3c(%rbp) cmpq $0x0, -0x30(%rbp) je 0x63ba6 movq -0x10(%rbp), %rdi addq $0x2c0, %rdi # imm = 0x2C0 movq -0x10(%rbp), %rax movl 0x2c8(%rax), %eax movq -0x30(%rbp), %rcx shrq $0x7, %rcx addq %rcx, %rax addq $0x2, %rax movl %eax, %esi callq 0xda610 cmpb $0x0, %al je 0x63ae8 jmp 0x63adf movb $0x1, -0x1(%rbp) jmp 0x63c0e movq -0x10(%rbp), %rax movq 0x2c0(%rax), %rax movq -0x10(%rbp), %rcx movl 0x2c8(%rcx), %ecx imulq $0x18, %rcx, %rcx addq %rcx, %rax movq %rax, -0x50(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x58(%rbp) cmpq $0x3fff, -0x30(%rbp) # imm = 0x3FFF jb 0x63b24 movl $0x3fff, %eax # imm = 0x3FFF movl %eax, -0x5c(%rbp) jmp 0x63b2b movq -0x30(%rbp), %rax movl %eax, -0x5c(%rbp) movq -0x58(%rbp), %rdi movl -0x5c(%rbp), %eax movl %eax, %eax movl %eax, %esi movq -0x50(%rbp), %rdx xorl %ecx, %ecx callq 0x63c20 movl %eax, -0x38(%rbp) cmpl $0x0, -0x38(%rbp) jne 0x63b68 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x637a0 cmpb $0x0, %al je 0x63b66 jmp 0x63b5d movb $0x1, -0x1(%rbp) jmp 0x63c0e jmp 0x63b97 movl -0x38(%rbp), %eax movl %eax, %ecx movq -0x30(%rbp), %rax subq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movl 0x2c8(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x2c8(%rax) movq -0x50(%rbp), %rax addq $0x18, %rax movq %rax, -0x50(%rbp) jmp 0x63b99 cmpq $0x0, -0x30(%rbp) jne 0x63b08 jmp 0x63ba6 cmpl $0x0, -0x34(%rbp) je 0x63bdd movq -0x10(%rbp), %rdi movl -0x34(%rbp), %esi movq -0x10(%rbp), %rax movl 0x2c8(%rax), %edx movl %edx, %ecx addl $0x1, %ecx movl %ecx, 0x2c8(%rax) callq 0x64170 movsbl %al, %eax cmpl $0x0, %eax je 0x63bdd jmp 0x63bd7 movb $0x1, -0x1(%rbp) jmp 0x63c0e movq -0x10(%rbp), %rax movq 0x2c0(%rax), %rax movl -0x3c(%rbp), %ecx imulq $0x18, %rcx, %rcx addq %rcx, %rax movq %rax, -0x48(%rbp) movq -0x10(%rbp), %rax movl 0x2c8(%rax), %ecx subl -0x3c(%rbp), %ecx movq -0x48(%rbp), %rax movl %ecx, 0x10(%rax) movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x60, %rsp popq %rbp retq nopw (%rax,%rax)
find_blob: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov rax, [rax] add rax, 0A10h mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax+7BCh] mov rcx, [rbp+var_10] mov rcx, [rcx] mov ecx, [rcx+0C18h] add ecx, 8 sub eax, ecx sub eax, 4 mov [rbp+var_24], eax mov eax, [rbp+var_3C] mov [rbp+var_3C], eax mov [rbp+var_48], 0 jmp short $+2 loc_63A46: mov rax, [rbp+var_18] mov ecx, [rbp+var_24] xor edx, edx div rcx mov [rbp+var_30], rax mov rax, [rbp+var_18] mov rcx, [rbp+var_30] mov edx, [rbp+var_24] imul rcx, rdx sub rax, rcx mov [rbp+var_34], eax mov eax, [rbp+var_34] mov rcx, [rbp+var_10] mov rcx, [rcx] imul ecx, [rcx+7BCh], 3 shr ecx, 2 cmp eax, ecx jb short loc_63A96 mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax mov [rbp+var_34], 0 loc_63A96: mov rax, [rbp+var_10] mov eax, [rax+2C8h] mov [rbp+var_3C], eax cmp [rbp+var_30], 0 jz loc_63BA6 mov rdi, [rbp+var_10] add rdi, 2C0h mov rax, [rbp+var_10] mov eax, [rax+2C8h] mov rcx, [rbp+var_30] shr rcx, 7 add rax, rcx add rax, 2 mov esi, eax call allocate_dynamic cmp al, 0 jz short loc_63AE8 jmp short $+2 loc_63ADF: mov [rbp+var_1], 1 jmp loc_63C0E loc_63AE8: mov rax, [rbp+var_10] mov rax, [rax+2C0h] mov rcx, [rbp+var_10] mov ecx, [rcx+2C8h] imul rcx, 18h add rax, rcx mov [rbp+var_50], rax loc_63B08: mov rax, [rbp+var_20] mov [rbp+var_58], rax cmp [rbp+var_30], 3FFFh jb short loc_63B24 mov eax, 3FFFh mov [rbp+var_5C], eax jmp short loc_63B2B loc_63B24: mov rax, [rbp+var_30] mov [rbp+var_5C], eax loc_63B2B: mov rdi, [rbp+var_58] mov eax, [rbp+var_5C] mov eax, eax mov esi, eax mov rdx, [rbp+var_50] xor ecx, ecx call allocate_full_pages mov [rbp+var_38], eax cmp [rbp+var_38], 0 jnz short loc_63B68 mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] call move_to_next_bitmap cmp al, 0 jz short loc_63B66 jmp short $+2 loc_63B5D: mov [rbp+var_1], 1 jmp loc_63C0E loc_63B66: jmp short loc_63B97 loc_63B68: mov eax, [rbp+var_38] mov ecx, eax mov rax, [rbp+var_30] sub rax, rcx mov [rbp+var_30], rax mov rax, [rbp+var_10] mov ecx, [rax+2C8h] add ecx, 1 mov [rax+2C8h], ecx mov rax, [rbp+var_50] add rax, 18h mov [rbp+var_50], rax loc_63B97: jmp short $+2 loc_63B99: cmp [rbp+var_30], 0 jnz loc_63B08 jmp short $+2 loc_63BA6: cmp [rbp+var_34], 0 jz short loc_63BDD mov rdi, [rbp+var_10] mov esi, [rbp+var_34] mov rax, [rbp+var_10] mov edx, [rax+2C8h] mov ecx, edx add ecx, 1 mov [rax+2C8h], ecx call find_tail movsx eax, al cmp eax, 0 jz short loc_63BDD jmp short $+2 loc_63BD7: mov [rbp+var_1], 1 jmp short loc_63C0E loc_63BDD: mov rax, [rbp+var_10] mov rax, [rax+2C0h] mov ecx, [rbp+var_3C] imul rcx, 18h add rax, rcx mov [rbp+var_48], rax mov rax, [rbp+var_10] mov ecx, [rax+2C8h] sub ecx, [rbp+var_3C] mov rax, [rbp+var_48] mov [rax+10h], ecx mov [rbp+var_1], 0 loc_63C0E: mov al, [rbp+var_1] add rsp, 60h pop rbp retn
char find_blob(long long a1, unsigned long long a2) { long long v2; // rdx unsigned int v4; // [rsp+4h] [rbp-5Ch] long long v5; // [rsp+10h] [rbp-50h] unsigned int v6; // [rsp+24h] [rbp-3Ch] unsigned int full_pages; // [rsp+28h] [rbp-38h] unsigned int v8; // [rsp+2Ch] [rbp-34h] unsigned long long v9; // [rsp+30h] [rbp-30h] unsigned int v10; // [rsp+3Ch] [rbp-24h] long long v11; // [rsp+40h] [rbp-20h] v11 = *(_QWORD *)a1 + 2576LL; v10 = *(_DWORD *)(*(_QWORD *)a1 + 1980LL) - (*(_DWORD *)(*(_QWORD *)a1 + 3096LL) + 8) - 4; v9 = a2 / v10; v8 = a2 % v10; if ( v8 >= (unsigned int)(3 * *(_DWORD *)(*(_QWORD *)a1 + 1980LL)) >> 2 ) { ++v9; v8 = 0; } v6 = *(_DWORD *)(a1 + 712); if ( v9 ) { if ( !(unsigned __int8)allocate_dynamic(a1 + 704, (unsigned int)(v9 >> 7) + *(_DWORD *)(a1 + 712) + 2) ) { v5 = 24LL * *(unsigned int *)(a1 + 712) + *(_QWORD *)(a1 + 704); while ( 1 ) { if ( v9 < 0x3FFF ) v4 = v9; else v4 = 0x3FFF; full_pages = allocate_full_pages(v11, v4, v5, 0LL); if ( full_pages ) { v9 -= full_pages; ++*(_DWORD *)(a1 + 712); v5 += 24LL; } else if ( move_to_next_bitmap((long long *)a1, v11) ) { return 1; } if ( !v9 ) goto LABEL_16; } } return 1; } else { LABEL_16: if ( v8 && (v2 = *(unsigned int *)(a1 + 712), ++*(_DWORD *)(a1 + 712), (unsigned __int8)find_tail(a1, v8, v2)) ) { return 1; } else { *(_DWORD *)(24LL * v6 + *(_QWORD *)(a1 + 704) + 16) = *(_DWORD *)(a1 + 712) - v6; return 0; } } }
find_blob: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] ADD RAX,0xa10 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x7bc] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] MOV ECX,dword ptr [RCX + 0xc18] ADD ECX,0x8 SUB EAX,ECX SUB EAX,0x4 MOV dword ptr [RBP + -0x24],EAX MOV EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x3c],EAX MOV qword ptr [RBP + -0x48],0x0 JMP 0x00163a46 LAB_00163a46: MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x24] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x30] MOV EDX,dword ptr [RBP + -0x24] IMUL RCX,RDX SUB RAX,RCX MOV dword ptr [RBP + -0x34],EAX MOV EAX,dword ptr [RBP + -0x34] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] IMUL ECX,dword ptr [RCX + 0x7bc],0x3 SHR ECX,0x2 CMP EAX,ECX JC 0x00163a96 MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX MOV dword ptr [RBP + -0x34],0x0 LAB_00163a96: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x2c8] MOV dword ptr [RBP + -0x3c],EAX CMP qword ptr [RBP + -0x30],0x0 JZ 0x00163ba6 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x2c0 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x2c8] MOV RCX,qword ptr [RBP + -0x30] SHR RCX,0x7 ADD RAX,RCX ADD RAX,0x2 MOV ESI,EAX CALL 0x001da610 CMP AL,0x0 JZ 0x00163ae8 JMP 0x00163adf LAB_00163adf: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00163c0e LAB_00163ae8: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x2c0] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x2c8] IMUL RCX,RCX,0x18 ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX LAB_00163b08: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x58],RAX CMP qword ptr [RBP + -0x30],0x3fff JC 0x00163b24 MOV EAX,0x3fff MOV dword ptr [RBP + -0x5c],EAX JMP 0x00163b2b LAB_00163b24: MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x5c],EAX LAB_00163b2b: MOV RDI,qword ptr [RBP + -0x58] MOV EAX,dword ptr [RBP + -0x5c] MOV EAX,EAX MOV ESI,EAX MOV RDX,qword ptr [RBP + -0x50] XOR ECX,ECX CALL 0x00163c20 MOV dword ptr [RBP + -0x38],EAX CMP dword ptr [RBP + -0x38],0x0 JNZ 0x00163b68 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] CALL 0x001637a0 CMP AL,0x0 JZ 0x00163b66 JMP 0x00163b5d LAB_00163b5d: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00163c0e LAB_00163b66: JMP 0x00163b97 LAB_00163b68: MOV EAX,dword ptr [RBP + -0x38] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] SUB RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x2c8] ADD ECX,0x1 MOV dword ptr [RAX + 0x2c8],ECX MOV RAX,qword ptr [RBP + -0x50] ADD RAX,0x18 MOV qword ptr [RBP + -0x50],RAX LAB_00163b97: JMP 0x00163b99 LAB_00163b99: CMP qword ptr [RBP + -0x30],0x0 JNZ 0x00163b08 JMP 0x00163ba6 LAB_00163ba6: CMP dword ptr [RBP + -0x34],0x0 JZ 0x00163bdd MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0x2c8] MOV ECX,EDX ADD ECX,0x1 MOV dword ptr [RAX + 0x2c8],ECX CALL 0x00164170 MOVSX EAX,AL CMP EAX,0x0 JZ 0x00163bdd JMP 0x00163bd7 LAB_00163bd7: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00163c0e LAB_00163bdd: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x2c0] MOV ECX,dword ptr [RBP + -0x3c] IMUL RCX,RCX,0x18 ADD RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x2c8] SUB ECX,dword ptr [RBP + -0x3c] MOV RAX,qword ptr [RBP + -0x48] MOV dword ptr [RAX + 0x10],ECX MOV byte ptr [RBP + -0x1],0x0 LAB_00163c0e: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x60 POP RBP RET
int1 find_blob(long *param_1,ulong param_2) { long lVar1; char cVar2; uint uVar3; uint uVar4; int4 local_64; long local_58; uint local_3c; ulong local_38; lVar1 = *param_1; uVar3 = (*(int *)(*param_1 + 0x7bc) - (*(int *)(*param_1 + 0xc18) + 8)) - 4; local_38 = param_2 / uVar3; local_3c = (int)param_2 - (int)local_38 * uVar3; if ((uint)(*(int *)(*param_1 + 0x7bc) * 3) >> 2 <= local_3c) { local_38 = local_38 + 1; local_3c = 0; } uVar3 = *(uint *)(param_1 + 0x59); if (local_38 != 0) { cVar2 = allocate_dynamic(param_1 + 0x58,(int)param_1[0x59] + (int)(local_38 >> 7) + 2); if (cVar2 != '\0') { return 1; } local_58 = param_1[0x58] + (ulong)*(uint *)(param_1 + 0x59) * 0x18; do { if (local_38 < 0x3fff) { local_64 = (int4)local_38; } else { local_64 = 0x3fff; } uVar4 = allocate_full_pages(lVar1 + 0xa10,local_64,local_58,0); if (uVar4 == 0) { cVar2 = move_to_next_bitmap(param_1,lVar1 + 0xa10); if (cVar2 != '\0') { return 1; } } else { local_38 = local_38 - uVar4; *(int *)(param_1 + 0x59) = (int)param_1[0x59] + 1; local_58 = local_58 + 0x18; } } while (local_38 != 0); } if (local_3c != 0) { *(int *)(param_1 + 0x59) = (int)param_1[0x59] + 1; cVar2 = find_tail(param_1,local_3c); if (cVar2 != '\0') { return 1; } } *(uint *)(param_1[0x58] + (ulong)uVar3 * 0x18 + 0x10) = (int)param_1[0x59] - uVar3; return 0; }
17,961
minja::IfExpr::IfExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&)
monkey531[P]llama/common/minja.hpp
IfExpr(const Location & location, std::shared_ptr<Expression> && c, std::shared_ptr<Expression> && t, std::shared_ptr<Expression> && e) : Expression(location), condition(std::move(c)), then_expr(std::move(t)), else_expr(std::move(e)) {}
O2
cpp
minja::IfExpr::IfExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %r8, %rbx movq %rcx, %r14 movq %rdx, %r15 movq %rdi, %r12 callq 0x62b30 leaq 0x8b6e4(%rip), %rax # 0xfcac8 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) andq $0x0, 0x48(%r12) movups (%rbx), %xmm0 andq $0x0, 0x8(%rbx) movups %xmm0, 0x40(%r12) andq $0x0, (%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
_ZN5minja6IfExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_S7_: 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, _ZTVN5minja6IfExprE; `vtable for'minja::IfExpr 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 and qword ptr [r12+48h], 0 movups xmm0, xmmword ptr [rbx] and qword ptr [rbx+8], 0 movups xmmword ptr [r12+40h], xmm0 and qword ptr [rbx], 0 add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long * minja::IfExpr::IfExpr(long long a1, _QWORD *a2, __int128 *a3, __int128 *a4, __int128 *a5) { long long *result; // rax __int128 v9; // xmm0 __int128 v10; // xmm0 __int128 v11; // xmm0 minja::Expression::Expression((_QWORD *)a1, a2); result = &`vtable for'minja::IfExpr + 2; *(_QWORD *)a1 = &`vtable for'minja::IfExpr + 2; *(_QWORD *)(a1 + 40) = 0LL; v9 = *a3; *((_QWORD *)a3 + 1) = 0LL; *(_OWORD *)(a1 + 32) = v9; *(_QWORD *)a3 = 0LL; *(_QWORD *)(a1 + 56) = 0LL; v10 = *a4; *((_QWORD *)a4 + 1) = 0LL; *(_OWORD *)(a1 + 48) = v10; *(_QWORD *)a4 = 0LL; *(_QWORD *)(a1 + 72) = 0LL; v11 = *a5; *((_QWORD *)a5 + 1) = 0LL; *(_OWORD *)(a1 + 64) = v11; *(_QWORD *)a5 = 0LL; return result; }
IfExpr: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,R8 MOV R14,RCX MOV R15,RDX MOV R12,RDI CALL 0x00162b30 LEA RAX,[0x1fcac8] 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 AND qword ptr [R12 + 0x48],0x0 MOVUPS XMM0,xmmword ptr [RBX] AND qword ptr [RBX + 0x8],0x0 MOVUPS xmmword ptr [R12 + 0x40],XMM0 AND qword ptr [RBX],0x0 ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* minja::IfExpr::IfExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&) */ void __thiscall minja::IfExpr::IfExpr (IfExpr *this,Location *param_1,shared_ptr *param_2,shared_ptr *param_3, shared_ptr *param_4) { int8 uVar1; Expression::Expression((Expression *)this,param_1); *(int ***)this = &PTR_do_evaluate_001fcad8; *(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; *(int8 *)(this + 0x48) = 0; uVar1 = *(int8 *)(param_4 + 8); *(int8 *)(param_4 + 8) = 0; *(int8 *)(this + 0x40) = *(int8 *)param_4; *(int8 *)(this + 0x48) = uVar1; *(int8 *)param_4 = 0; return; }
17,962
nglog::AddLogSink(nglog::LogSink*)
ng-log[P]ng-log/src/logging.cc
void AddLogSink(LogSink* destination) { LogDestination::AddLogSink(destination); }
O1
cpp
nglog::AddLogSink(nglog::LogSink*): pushq %rbx subq $0x10, %rsp movq %rdi, 0x8(%rsp) leaq 0x24347(%rip), %rdi # 0x2fb58 callq 0x7820 cmpl $0x23, %eax je 0xb880 cmpq $0x0, 0x2432d(%rip) # 0x2fb50 jne 0xb844 movl $0x18, %edi callq 0x7530 xorps %xmm0, %xmm0 movups %xmm0, (%rax) movq $0x0, 0x10(%rax) movq %rax, 0x2430c(%rip) # 0x2fb50 movq 0x24305(%rip), %rdi # 0x2fb50 movq 0x8(%rdi), %rsi cmpq 0x10(%rdi), %rsi je 0xb864 movq 0x8(%rsp), %rax movq %rax, (%rsi) addq $0x8, 0x8(%rdi) jmp 0xb86e leaq 0x8(%rsp), %rdx callq 0x11dda leaq 0x242e3(%rip), %rdi # 0x2fb58 callq 0x7710 addq $0x10, %rsp popq %rbx retq movl $0x23, %edi callq 0x7350 jmp 0xb88c movq %rax, %rbx leaq 0x242c2(%rip), %rdi # 0x2fb58 callq 0x7710 movq %rbx, %rdi callq 0x7970
_ZN5nglog10AddLogSinkEPNS_7LogSinkE: push rbx sub rsp, 10h mov [rsp+18h+var_10], rdi lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_ call _pthread_rwlock_wrlock cmp eax, 23h ; '#' jz short loc_B880 cmp cs:_ZN5nglog14LogDestination6sinks_E, 0; nglog::LogDestination::sinks_ jnz short loc_B844 mov edi, 18h; unsigned __int64 call __Znwm; operator new(ulong) xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 mov qword ptr [rax+10h], 0 mov cs:_ZN5nglog14LogDestination6sinks_E, rax; nglog::LogDestination::sinks_ loc_B844: mov rdi, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_ mov rsi, [rdi+8] cmp rsi, [rdi+10h] jz short loc_B864 mov rax, [rsp+18h+var_10] mov [rsi], rax add qword ptr [rdi+8], 8 jmp short loc_B86E loc_B864: lea rdx, [rsp+18h+var_10] call _ZNSt6vectorIPN5nglog7LogSinkESaIS2_EE17_M_realloc_insertIJRKS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_; std::vector<nglog::LogSink *>::_M_realloc_insert<nglog::LogSink * const&>(__gnu_cxx::__normal_iterator<nglog::LogSink **,std::vector<nglog::LogSink *>>,nglog::LogSink * const&) loc_B86E: lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_ call _pthread_rwlock_unlock add rsp, 10h pop rbx retn loc_B880: mov edi, 23h ; '#'; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) jmp short $+2 loc_B88C: mov rbx, rax lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_ call _pthread_rwlock_unlock mov rdi, rbx call __Unwind_Resume
long long nglog::AddLogSink(nglog *this, nglog::LogSink *a2) { long long v2; // rax long long v3; // rdi nglog **v4; // rsi nglog *v6; // [rsp+8h] [rbp-10h] BYREF v6 = this; if ( (unsigned int)pthread_rwlock_wrlock(&nglog::LogDestination::sink_mutex_) == 35 ) std::__throw_system_error(35); if ( !nglog::LogDestination::sinks_ ) { v2 = operator new(0x18uLL); *(_OWORD *)v2 = 0LL; *(_QWORD *)(v2 + 16) = 0LL; nglog::LogDestination::sinks_ = v2; } v3 = nglog::LogDestination::sinks_; v4 = *(nglog ***)(nglog::LogDestination::sinks_ + 8); if ( v4 == *(nglog ***)(nglog::LogDestination::sinks_ + 16) ) { std::vector<nglog::LogSink *>::_M_realloc_insert<nglog::LogSink * const&>(nglog::LogDestination::sinks_, v4, &v6); } else { *v4 = v6; *(_QWORD *)(v3 + 8) += 8LL; } return pthread_rwlock_unlock(&nglog::LogDestination::sink_mutex_); }
AddLogSink: PUSH RBX SUB RSP,0x10 MOV qword ptr [RSP + 0x8],RDI LEA RDI,[0x12fb58] CALL 0x00107820 CMP EAX,0x23 JZ 0x0010b880 CMP qword ptr [0x0012fb50],0x0 JNZ 0x0010b844 LAB_0010b825: MOV EDI,0x18 CALL 0x00107530 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],0x0 MOV qword ptr [0x0012fb50],RAX LAB_0010b844: MOV RDI,qword ptr [0x0012fb50] MOV RSI,qword ptr [RDI + 0x8] CMP RSI,qword ptr [RDI + 0x10] JZ 0x0010b864 MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSI],RAX ADD qword ptr [RDI + 0x8],0x8 JMP 0x0010b86e LAB_0010b864: LEA RDX,[RSP + 0x8] CALL 0x00111dda LAB_0010b86e: LEA RDI,[0x12fb58] CALL 0x00107710 ADD RSP,0x10 POP RBX RET LAB_0010b880: MOV EDI,0x23 CALL 0x00107350
/* nglog::AddLogSink(nglog::LogSink*) */ void nglog::AddLogSink(LogSink *param_1) { int8 *puVar1; vector<nglog::LogSink*,std::allocator<nglog::LogSink*>> *pvVar2; int iVar3; LogSink *local_10; local_10 = param_1; iVar3 = pthread_rwlock_wrlock((pthread_rwlock_t *)LogDestination::sink_mutex_); if (iVar3 != 0x23) { if (LogDestination::sinks_ == (vector<nglog::LogSink*,std::allocator<nglog::LogSink*>> *)0x0) { /* try { // try from 0010b825 to 0010b82e has its CatchHandler @ 0010b88c */ LogDestination::sinks_ = (vector<nglog::LogSink*,std::allocator<nglog::LogSink*>> *)operator_new(0x18); *(int8 *)LogDestination::sinks_ = 0; *(int8 *)(LogDestination::sinks_ + 8) = 0; *(int8 *)(LogDestination::sinks_ + 0x10) = 0; } pvVar2 = LogDestination::sinks_; puVar1 = *(int8 **)(LogDestination::sinks_ + 8); if (puVar1 == *(int8 **)(LogDestination::sinks_ + 0x10)) { /* try { // try from 0010b864 to 0010b86d has its CatchHandler @ 0010b88a */ std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>:: _M_realloc_insert<nglog::LogSink*const&>(LogDestination::sinks_,puVar1,&local_10); } else { *puVar1 = local_10; *(long *)(pvVar2 + 8) = *(long *)(pvVar2 + 8) + 8; } pthread_rwlock_unlock((pthread_rwlock_t *)LogDestination::sink_mutex_); return; } /* WARNING: Subroutine does not return */ std::__throw_system_error(0x23); }
17,963
ftxui::window(std::shared_ptr<ftxui::Node>, std::shared_ptr<ftxui::Node>)
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/dom/border.cpp
Element window(Element title, Element content) { return std::make_shared<Border>(unpack(std::move(content), std::move(title)), ROUNDED); }
O2
cpp
ftxui::window(std::shared_ptr<ftxui::Node>, std::shared_ptr<ftxui::Node>): pushq %r15 pushq %r14 pushq %rbx subq $0x50, %rsp movq %rdi, %r15 leaq 0x38(%rsp), %rbx movups (%rdx), %xmm0 andq $0x0, 0x8(%rdx) movaps %xmm0, -0x8(%rbx) andq $0x0, (%rdx) leaq 0x28(%rsp), %r14 movups (%rsi), %xmm0 andq $0x0, 0x8(%rsi) movaps %xmm0, -0x8(%r14) andq $0x0, (%rsi) leaq 0x8(%rsp), %rdi leaq 0x30(%rsp), %rsi leaq 0x20(%rsp), %rdx callq 0x13bcc leaq 0x4(%rsp), %rdx movl $0x4, (%rdx) leaq 0x40(%rsp), %rdi leaq 0x8(%rsp), %rsi callq 0x1c48a leaq 0x48(%rsp), %rdi movaps -0x8(%rdi), %xmm0 andq $0x0, (%rdi) movups %xmm0, (%r15) andq $0x0, -0x8(%rdi) callq 0x13452 leaq 0x8(%rsp), %rdi callq 0x13b2c movq %r14, %rdi callq 0x13452 movq %rbx, %rdi callq 0x13452 movq %r15, %rax addq $0x50, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %r15 leaq 0x8(%rsp), %rdi callq 0x13b2c jmp 0x1cade movq %rax, %r15 movq %r14, %rdi callq 0x13452 movq %rbx, %rdi callq 0x13452 movq %r15, %rdi callq 0xc7f0
_ZN5ftxui6windowESt10shared_ptrINS_4NodeEES2_: push r15 push r14 push rbx sub rsp, 50h mov r15, rdi lea rbx, [rsp+68h+var_30] movups xmm0, xmmword ptr [rdx] and qword ptr [rdx+8], 0 movaps xmmword ptr [rbx-8], xmm0 and qword ptr [rdx], 0 lea r14, [rsp+68h+var_40] movups xmm0, xmmword ptr [rsi] and qword ptr [rsi+8], 0 movaps xmmword ptr [r14-8], xmm0 and qword ptr [rsi], 0 lea rdi, [rsp+68h+var_60] lea rsi, [rsp+68h+var_38] lea rdx, [rsp+68h+var_48] call _ZN5ftxui6unpackIJSt10shared_ptrINS_4NodeEES3_EEESt6vectorIS3_SaIS3_EEDpT_; ftxui::unpack<std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>>(std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>) lea rdx, [rsp+68h+var_64] mov dword ptr [rdx], 4 lea rdi, [rsp+68h+var_28] lea rsi, [rsp+68h+var_60] call _ZSt11make_sharedIN5ftxui12_GLOBAL__N_16BorderEJSt6vectorISt10shared_ptrINS0_4NodeEESaIS6_EENS0_11BorderStyleEEES4_IT_EDpOT0_; std::make_shared<ftxui::`anonymous namespace'::Border,std::vector<std::shared_ptr<ftxui::Node>>,ftxui::BorderStyle>(std::vector<std::shared_ptr<ftxui::Node>>,ftxui::BorderStyle &&) lea rdi, [rsp+68h+var_20] movaps xmm0, xmmword ptr [rdi-8] and qword ptr [rdi], 0 movups xmmword ptr [r15], 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+68h+var_60] call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() mov rdi, r14 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, rbx call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rax, r15 add rsp, 50h pop rbx pop r14 pop r15 retn mov r15, rax lea rdi, [rsp+arg_0] call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() jmp short loc_1CADE mov r15, rax loc_1CADE: mov rdi, r14 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, rbx call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, r15 call __Unwind_Resume
_OWORD * ftxui::window(_OWORD *a1, long long a2, long long a3) { __int128 v3; // xmm0 __int128 v4; // xmm0 __int128 v5; // xmm0 unsigned int v7; // [rsp+4h] [rbp-64h] BYREF __int128 v8; // [rsp+8h] [rbp-60h] BYREF __int128 v9; // [rsp+20h] [rbp-48h] BYREF __int128 v10; // [rsp+30h] [rbp-38h] BYREF _OWORD v11[2]; // [rsp+40h] [rbp-28h] BYREF v3 = *(_OWORD *)a3; *(_QWORD *)(a3 + 8) = 0LL; v10 = v3; *(_QWORD *)a3 = 0LL; v4 = *(_OWORD *)a2; *(_QWORD *)(a2 + 8) = 0LL; v9 = v4; *(_QWORD *)a2 = 0LL; ftxui::unpack<std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>>((long long)&v8, &v10, &v9); v7 = 4; std::make_shared<ftxui::`anonymous namespace'::Border,std::vector<std::shared_ptr<ftxui::Node>>,ftxui::BorderStyle>( v11, &v8, &v7); v5 = v11[0]; *((_QWORD *)&v11[0] + 1) = 0LL; *a1 = v5; *(_QWORD *)&v11[0] = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)v11 + 1); std::vector<std::shared_ptr<ftxui::Node>>::~vector(&v8); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v9 + 1); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v10 + 1); return a1; }
window: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x50 MOV R15,RDI LEA RBX,[RSP + 0x38] MOVUPS XMM0,xmmword ptr [RDX] AND qword ptr [RDX + 0x8],0x0 MOVAPS xmmword ptr [RBX + -0x8],XMM0 AND qword ptr [RDX],0x0 LEA R14,[RSP + 0x28] MOVUPS XMM0,xmmword ptr [RSI] AND qword ptr [RSI + 0x8],0x0 MOVAPS xmmword ptr [R14 + -0x8],XMM0 AND qword ptr [RSI],0x0 LAB_0011ca5c: LEA RDI,[RSP + 0x8] LEA RSI,[RSP + 0x30] LEA RDX,[RSP + 0x20] CALL 0x00113bcc LEA RDX,[RSP + 0x4] MOV dword ptr [RDX],0x4 LAB_0011ca7b: LEA RDI,[RSP + 0x40] LEA RSI,[RSP + 0x8] CALL 0x0011c48a LAB_0011ca8a: LEA RDI,[RSP + 0x48] MOVAPS XMM0,xmmword ptr [RDI + -0x8] AND qword ptr [RDI],0x0 MOVUPS xmmword ptr [R15],XMM0 AND qword ptr [RDI + -0x8],0x0 CALL 0x00113452 LEA RDI,[RSP + 0x8] CALL 0x00113b2c MOV RDI,R14 CALL 0x00113452 MOV RDI,RBX CALL 0x00113452 MOV RAX,R15 ADD RSP,0x50 POP RBX POP R14 POP R15 RET
/* ftxui::window(std::shared_ptr<ftxui::Node>, std::shared_ptr<ftxui::Node>) */ ftxui * __thiscall ftxui::window(ftxui *this,int8 *param_2,int8 *param_3) { int8 uVar1; ftxui local_60 [24]; int4 local_48; int4 uStack_44; int4 uStack_40; int4 uStack_3c; int8 local_38; int8 uStack_30; int8 local_28; int8 uStack_20; local_38 = *param_3; uStack_30 = param_3[1]; param_3[1] = 0; *param_3 = 0; local_48 = *(int4 *)param_2; uStack_44 = *(int4 *)((long)param_2 + 4); uStack_40 = *(int4 *)(param_2 + 1); uStack_3c = *(int4 *)((long)param_2 + 0xc); param_2[1] = 0; *param_2 = 0; /* try { // try from 0011ca5c to 0011ca6f has its CatchHandler @ 0011cadb */ unpack<std::shared_ptr<ftxui::Node>,std::shared_ptr<ftxui::Node>>(local_60,&local_38,&local_48); /* try { // try from 0011ca7b to 0011ca89 has its CatchHandler @ 0011cacc */ std:: make_shared<ftxui::(anonymous_namespace)::Border,std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>,ftxui::BorderStyle> ((vector *)&local_28,(BorderStyle *)local_60); uVar1 = uStack_20; uStack_20 = 0; *(int8 *)this = local_28; *(int8 *)(this + 8) = uVar1; local_28 = 0; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_20); std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector ((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *) local_60); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_40); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_30); return this; }
17,964
translog_write_variable_record_chunk3_page
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_write_variable_record_chunk3_page(struct st_translog_parts *parts, uint16 length, TRANSLOG_ADDRESS *horizon, struct st_buffer_cursor *cursor) { LEX_CUSTRING *part; uchar chunk3_header[1 + 2]; DBUG_ENTER("translog_write_variable_record_chunk3_page"); if (translog_chaser_page_next(horizon, cursor)) DBUG_RETURN(1); if (length == 0) { /* It was call to write page header only (no data for chunk 3) */ DBUG_PRINT("info", ("It is a call to make page header only")); DBUG_RETURN(0); } DBUG_ASSERT(parts->current != 0); /* first part is left for header */ part= parts->parts + (--parts->current); parts->total_record_length+= (translog_size_t) (part->length= 1 + 2); part->str= chunk3_header; /* Puts chunk type */ *chunk3_header= (uchar) (TRANSLOG_CHUNK_LNGTH); /* Puts chunk length */ int2store(chunk3_header + 1, length); translog_write_parts_on_page(horizon, cursor, length + 1 + 2, parts); DBUG_RETURN(0); }
O0
c
translog_write_variable_record_chunk3_page: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movw %si, %ax movq %rdi, -0x10(%rbp) movw %ax, -0x12(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rdi movq -0x28(%rbp), %rsi callq 0x93c50 cmpb $0x0, %al je 0x93917 jmp 0x9390e movb $0x1, -0x1(%rbp) jmp 0x939b3 movzwl -0x12(%rbp), %eax cmpl $0x0, %eax jne 0x9392f jmp 0x93922 jmp 0x93924 jmp 0x93926 movb $0x0, -0x1(%rbp) jmp 0x939b3 jmp 0x93931 jmp 0x93933 movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq -0x10(%rbp), %rdx movl 0x8(%rdx), %ecx addl $-0x1, %ecx movl %ecx, 0x8(%rdx) movl %ecx, %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq $0x3, 0x8(%rax) movq -0x10(%rbp), %rax movl 0x4(%rax), %ecx addl $0x3, %ecx movl %ecx, 0x4(%rax) leaq -0x33(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movb $-0x40, -0x33(%rbp) leaq -0x33(%rbp), %rax addq $0x1, %rax movq %rax, -0x40(%rbp) movw -0x12(%rbp), %cx movq -0x40(%rbp), %rax movw %cx, (%rax) movq -0x20(%rbp), %rdi movq -0x28(%rbp), %rsi movzwl -0x12(%rbp), %edx addl $0x1, %edx addl $0x2, %edx movq -0x10(%rbp), %rcx callq 0x93210 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x40, %rsp popq %rbp retq nopl (%rax)
translog_write_variable_record_chunk3_page: push rbp mov rbp, rsp sub rsp, 40h mov ax, si mov [rbp+var_10], rdi mov [rbp+var_12], ax mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rdi, [rbp+var_20] mov rsi, [rbp+var_28] call translog_chaser_page_next cmp al, 0 jz short loc_93917 jmp short $+2 loc_9390E: mov [rbp+var_1], 1 jmp loc_939B3 loc_93917: movzx eax, [rbp+var_12] cmp eax, 0 jnz short loc_9392F jmp short $+2 loc_93922: jmp short $+2 loc_93924: jmp short $+2 loc_93926: mov [rbp+var_1], 0 jmp loc_939B3 loc_9392F: jmp short $+2 loc_93931: jmp short $+2 loc_93933: mov rax, [rbp+var_10] mov rax, [rax+10h] mov rdx, [rbp+var_10] mov ecx, [rdx+8] add ecx, 0FFFFFFFFh mov [rdx+8], ecx mov ecx, ecx shl rcx, 4 add rax, rcx mov [rbp+var_30], rax mov rax, [rbp+var_30] mov qword ptr [rax+8], 3 mov rax, [rbp+var_10] mov ecx, [rax+4] add ecx, 3 mov [rax+4], ecx lea rcx, [rbp+var_33] mov rax, [rbp+var_30] mov [rax], rcx mov [rbp+var_33], 0C0h lea rax, [rbp+var_33] add rax, 1 mov [rbp+var_40], rax mov cx, [rbp+var_12] mov rax, [rbp+var_40] mov [rax], cx mov rdi, [rbp+var_20] mov rsi, [rbp+var_28] movzx edx, [rbp+var_12] add edx, 1 add edx, 2 mov rcx, [rbp+var_10] call translog_write_parts_on_page mov [rbp+var_1], 0 loc_939B3: mov al, [rbp+var_1] add rsp, 40h pop rbp retn
char translog_write_variable_record_chunk3_page(long long a1, unsigned __int16 a2, _QWORD *a3, long long a4) { long long v4; // rax unsigned int v5; // ecx char v7; // [rsp+Dh] [rbp-33h] BYREF unsigned __int16 v8; // [rsp+Eh] [rbp-32h] char **v9; // [rsp+10h] [rbp-30h] long long v10; // [rsp+18h] [rbp-28h] _QWORD *v11; // [rsp+20h] [rbp-20h] unsigned __int16 v12; // [rsp+2Eh] [rbp-12h] long long v13; // [rsp+30h] [rbp-10h] v13 = a1; v12 = a2; v11 = a3; v10 = a4; if ( (unsigned __int8)translog_chaser_page_next(a3, a4) ) return 1; if ( v12 ) { v4 = *(_QWORD *)(v13 + 16); v5 = *(_DWORD *)(v13 + 8) - 1; *(_DWORD *)(v13 + 8) = v5; v9 = (char **)(16LL * v5 + v4); v9[1] = (_BYTE *)(&dword_0 + 3); *(_DWORD *)(v13 + 4) += 3; *v9 = &v7; v7 = -64; v8 = v12; translog_write_parts_on_page(v11, v10, v12 + 3, v13); } return 0; }
translog_write_variable_record_chunk3_page: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV AX,SI MOV qword ptr [RBP + -0x10],RDI MOV word ptr [RBP + -0x12],AX MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x28] CALL 0x00193c50 CMP AL,0x0 JZ 0x00193917 JMP 0x0019390e LAB_0019390e: MOV byte ptr [RBP + -0x1],0x1 JMP 0x001939b3 LAB_00193917: MOVZX EAX,word ptr [RBP + -0x12] CMP EAX,0x0 JNZ 0x0019392f JMP 0x00193922 LAB_00193922: JMP 0x00193924 LAB_00193924: JMP 0x00193926 LAB_00193926: MOV byte ptr [RBP + -0x1],0x0 JMP 0x001939b3 LAB_0019392f: JMP 0x00193931 LAB_00193931: JMP 0x00193933 LAB_00193933: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x8] ADD ECX,-0x1 MOV dword ptr [RDX + 0x8],ECX MOV ECX,ECX SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x8],0x3 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x4] ADD ECX,0x3 MOV dword ptr [RAX + 0x4],ECX LEA RCX,[RBP + -0x33] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX MOV byte ptr [RBP + -0x33],0xc0 LEA RAX,[RBP + -0x33] ADD RAX,0x1 MOV qword ptr [RBP + -0x40],RAX MOV CX,word ptr [RBP + -0x12] MOV RAX,qword ptr [RBP + -0x40] MOV word ptr [RAX],CX MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x28] MOVZX EDX,word ptr [RBP + -0x12] ADD EDX,0x1 ADD EDX,0x2 MOV RCX,qword ptr [RBP + -0x10] CALL 0x00193210 MOV byte ptr [RBP + -0x1],0x0 LAB_001939b3: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x40 POP RBP RET
int1 translog_write_variable_record_chunk3_page (long param_1,ushort param_2,int8 param_3,int8 param_4) { char cVar1; uint uVar2; int1 local_3b; ushort local_3a; long *local_38; int8 local_30; int8 local_28; ushort local_1a; long local_18; int1 local_9; local_30 = param_4; local_28 = param_3; local_1a = param_2; local_18 = param_1; cVar1 = translog_chaser_page_next(param_3,param_4); if (cVar1 == '\0') { if (local_1a == 0) { local_9 = 0; } else { uVar2 = *(int *)(local_18 + 8) - 1; *(uint *)(local_18 + 8) = uVar2; local_38 = (long *)(*(long *)(local_18 + 0x10) + (ulong)uVar2 * 0x10); local_38[1] = 3; *(int *)(local_18 + 4) = *(int *)(local_18 + 4) + 3; *local_38 = (long)&local_3b; local_3b = 0xc0; local_3a = local_1a; translog_write_parts_on_page(local_28,local_30,local_1a + 3,local_18); local_9 = 0; } } else { local_9 = 1; } return local_9; }
17,965
ma_delete_dynamic_element
eloqsql/libmariadb/libmariadb/ma_array.c
void ma_delete_dynamic_element(DYNAMIC_ARRAY *array, uint idx) { char *ptr=array->buffer+array->size_of_element*idx; array->elements--; memmove(ptr,ptr+array->size_of_element, (array->elements-idx)*array->size_of_element); }
O3
c
ma_delete_dynamic_element: pushq %rbp movq %rsp, %rbp movl 0x8(%rdi), %edx movl 0x14(%rdi), %ecx movl %ecx, %eax imull %esi, %eax addq (%rdi), %rax decl %edx movl %edx, 0x8(%rdi) subl %esi, %edx imull %ecx, %edx movq %rcx, %rsi addq %rax, %rsi movq %rax, %rdi popq %rbp jmp 0x13730
ma_delete_dynamic_element: push rbp mov rbp, rsp mov edx, [rdi+8] mov ecx, [rdi+14h] mov eax, ecx imul eax, esi add rax, [rdi] dec edx mov [rdi+8], edx sub edx, esi imul edx, ecx mov rsi, rcx add rsi, rax mov rdi, rax pop rbp jmp _memmove
long long ma_delete_dynamic_element(long long a1, int a2) { long long v2; // rcx long long v3; // rax int v4; // edx v2 = *(unsigned int *)(a1 + 20); v3 = *(_QWORD *)a1 + (unsigned int)(a2 * *(_DWORD *)(a1 + 20)); v4 = *(_DWORD *)(a1 + 8) - 1; *(_DWORD *)(a1 + 8) = v4; return memmove(v3, v3 + v2, (unsigned int)(v2 * (v4 - a2))); }
ma_delete_dynamic_element: PUSH RBP MOV RBP,RSP MOV EDX,dword ptr [RDI + 0x8] MOV ECX,dword ptr [RDI + 0x14] MOV EAX,ECX IMUL EAX,ESI ADD RAX,qword ptr [RDI] DEC EDX MOV dword ptr [RDI + 0x8],EDX SUB EDX,ESI IMUL EDX,ECX MOV RSI,RCX ADD RSI,RAX MOV RDI,RAX POP RBP JMP 0x00113730
void ma_delete_dynamic_element(long *param_1,int param_2) { uint uVar1; void *__dest; int iVar2; uVar1 = *(uint *)((long)param_1 + 0x14); __dest = (void *)((ulong)(uVar1 * param_2) + *param_1); iVar2 = (int)param_1[1] + -1; *(int *)(param_1 + 1) = iVar2; memmove(__dest,(void *)((ulong)uVar1 + (long)__dest),(ulong)((iVar2 - param_2) * uVar1)); return; }
17,966
verify_storage
corpus-core[P]colibri-stateless/src/chains/eth/verifier/eth_account.c
static bool verify_storage(verify_ctx_t* ctx, ssz_ob_t storage_proofs, bytes32_t storage_hash, bytes_t values) { if (values.data) memset(values.data, 0, 32); int len = ssz_len(storage_proofs); if (len != 0 && memcmp(storage_hash, EMPTY_ROOT_HASH, 32) == 0) RETURN_VERIFY_ERROR(ctx, "invalid storage proof because an empty storage hash can not have values!"); for (int i = 0; i < len; i++) { bytes32_t path = {0}; bytes32_t root = {0}; ssz_ob_t storage = ssz_at(storage_proofs, i); ssz_ob_t proof = ssz_get(&storage, "proof"); ssz_ob_t key = ssz_get(&storage, "key"); bytes_t leaf = {0}; keccak(key.bytes, path); if (patricia_verify(root, bytes(path, 32), proof, &leaf) == PATRICIA_INVALID) RETURN_VERIFY_ERROR(ctx, "invalid storage proof!"); if (memcmp(root, storage_hash, 32) != 0) RETURN_VERIFY_ERROR(ctx, "invalid storage root!"); if (values.data && values.len >= (i + 1) * 32 && rlp_decode(&leaf, 0, &leaf) == RLP_ITEM) memcpy(values.data + (i + 1) * 32 - leaf.len, leaf.data, leaf.len); } return true; }
O0
c
verify_storage: pushq %rbp movq %rsp, %rbp subq $0x100, %rsp # imm = 0x100 leaq 0x10(%rbp), %rax movq %rax, -0xe0(%rbp) movl %edx, -0x18(%rbp) movq %rcx, -0x10(%rbp) movq %rdi, -0x20(%rbp) movq %rsi, -0x28(%rbp) cmpq $0x0, -0x10(%rbp) je 0x3332c movq -0x10(%rbp), %rdi xorl %esi, %esi movl $0x20, %edx callq 0x231c0 movq -0xe0(%rbp), %rax movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0xa0830 movl %eax, -0x2c(%rbp) cmpl $0x0, -0x2c(%rbp) je 0x3339b movq -0x28(%rbp), %rdi movq 0x106113(%rip), %rsi # 0x139478 movl $0x20, %edx callq 0x23540 cmpl $0x0, %eax jne 0x3339b jmp 0x33376 movq -0x20(%rbp), %rdi addq $0x70, %rdi leaq 0xaad6d(%rip), %rsi # 0xde0f2 callq 0xa79c0 movq -0x20(%rbp), %rax movb $0x0, 0x68(%rax) movb $0x0, -0x1(%rbp) jmp 0x3358a movl $0x0, -0x30(%rbp) movl -0x30(%rbp), %eax cmpl -0x2c(%rbp), %eax jge 0x33586 leaq -0x50(%rbp), %rdi xorl %esi, %esi movl $0x20, %edx callq 0x231c0 leaq -0x70(%rbp), %rdi xorl %esi, %esi movl $0x20, %edx callq 0x231c0 movq -0xe0(%rbp), %rax movl -0x30(%rbp), %esi leaq -0x88(%rbp), %rdi movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0xa0580 leaq -0xa0(%rbp), %rdi leaq -0x88(%rbp), %rsi leaq 0xa91de(%rip), %rdx # 0xdc5f0 callq 0xa1c10 leaq -0xb8(%rbp), %rdi leaq -0x88(%rbp), %rsi leaq 0xaa65f(%rip), %rdx # 0xdda8b callq 0xa1c10 leaq -0xc8(%rbp), %rdi xorl %esi, %esi movl $0x10, %edx callq 0x231c0 leaq -0x50(%rbp), %rdx movl -0xb8(%rbp), %edi movq -0xb0(%rbp), %rsi callq 0xa4990 leaq -0x70(%rbp), %rdi movl $0x20, -0xd8(%rbp) leaq -0x50(%rbp), %rax movq %rax, -0xd0(%rbp) movl -0xd8(%rbp), %esi movq -0xd0(%rbp), %rdx leaq -0xa0(%rbp), %rax leaq -0xc8(%rbp), %rcx movq (%rax), %r8 movq %r8, (%rsp) movq 0x8(%rax), %r8 movq %r8, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0x35950 cmpl $0x0, %eax jne 0x334d8 jmp 0x334b3 movq -0x20(%rbp), %rdi addq $0x70, %rdi leaq 0xaab10(%rip), %rsi # 0xddfd2 callq 0xa79c0 movq -0x20(%rbp), %rax movb $0x0, 0x68(%rax) movb $0x0, -0x1(%rbp) jmp 0x3358a leaq -0x70(%rbp), %rdi movq -0x28(%rbp), %rsi movl $0x20, %edx callq 0x23540 cmpl $0x0, %eax je 0x33513 jmp 0x334f1 movq -0x20(%rbp), %rdi addq $0x70, %rdi leaq 0xaac3b(%rip), %rsi # 0xde13b callq 0xa79c0 movq -0x20(%rbp), %rax movb $0x0, 0x68(%rax) movb $0x0, -0x1(%rbp) jmp 0x3358a cmpq $0x0, -0x10(%rbp) je 0x33576 movl -0x18(%rbp), %eax movl -0x30(%rbp), %ecx addl $0x1, %ecx shll $0x5, %ecx cmpl %ecx, %eax jb 0x33576 leaq -0xc8(%rbp), %rdx xorl %esi, %esi movq %rdx, %rdi callq 0x36280 cmpl $0x1, %eax jne 0x33576 movq -0x10(%rbp), %rdi movl -0x30(%rbp), %eax addl $0x1, %eax shll $0x5, %eax cltq addq %rax, %rdi movl -0xc8(%rbp), %eax movl %eax, %ecx xorl %eax, %eax subq %rcx, %rax addq %rax, %rdi movq -0xc0(%rbp), %rsi movl -0xc8(%rbp), %eax movl %eax, %edx callq 0x230a0 jmp 0x33578 movl -0x30(%rbp), %eax addl $0x1, %eax movl %eax, -0x30(%rbp) jmp 0x333a2 movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x100, %rsp # imm = 0x100 popq %rbp retq nopl (%rax,%rax)
verify_storage: push rbp mov rbp, rsp sub rsp, 100h lea rax, [rbp+arg_0] mov [rbp+var_E0], rax mov [rbp+var_18], edx mov [rbp+var_10], rcx mov [rbp+var_20], rdi mov [rbp+var_28], rsi cmp [rbp+var_10], 0 jz short loc_3332C mov rdi, [rbp+var_10] xor esi, esi mov edx, 20h ; ' ' call _memset loc_3332C: mov rax, [rbp+var_E0] mov rcx, [rax] mov [rsp+100h+var_100], rcx mov rcx, [rax+8] mov [rsp+100h+var_F8], rcx mov rax, [rax+10h] mov [rsp+100h+var_F0], rax call ssz_len mov [rbp+var_2C], eax cmp [rbp+var_2C], 0 jz short loc_3339B mov rdi, [rbp+var_28] mov rsi, cs:EMPTY_ROOT_HASH mov edx, 20h ; ' ' call _memcmp cmp eax, 0 jnz short loc_3339B jmp short $+2 loc_33376: mov rdi, [rbp+var_20] add rdi, 70h ; 'p' lea rsi, aInvalidStorage_0; "invalid storage proof because an empty "... call c4_state_add_error mov rax, [rbp+var_20] mov byte ptr [rax+68h], 0 mov [rbp+var_1], 0 jmp loc_3358A loc_3339B: mov [rbp+var_30], 0 loc_333A2: mov eax, [rbp+var_30] cmp eax, [rbp+var_2C] jge loc_33586 lea rdi, [rbp+var_50] xor esi, esi mov edx, 20h ; ' ' call _memset lea rdi, [rbp+var_70] xor esi, esi mov edx, 20h ; ' ' call _memset mov rax, [rbp+var_E0] mov esi, [rbp+var_30] lea rdi, [rbp+var_88] mov rcx, [rax] mov [rsp+100h+var_100], rcx mov rcx, [rax+8] mov [rsp+100h+var_F8], rcx mov rax, [rax+10h] mov [rsp+100h+var_F0], rax call ssz_at lea rdi, [rbp+var_A0] lea rsi, [rbp+var_88] lea rdx, aChainTypeDoesN+1Eh; "proof" call ssz_get lea rdi, [rbp+var_B8] lea rsi, [rbp+var_88] lea rdx, aAccessStorageK+0Fh; "key" call ssz_get lea rdi, [rbp+var_C8] xor esi, esi mov edx, 10h call _memset lea rdx, [rbp+var_50] mov edi, [rbp+var_B8] mov rsi, [rbp+var_B0] call keccak lea rdi, [rbp+var_70] mov [rbp+var_D8], 20h ; ' ' lea rax, [rbp+var_50] mov [rbp+var_D0], rax mov esi, [rbp+var_D8] mov rdx, [rbp+var_D0] lea rax, [rbp+var_A0] lea rcx, [rbp+var_C8] mov r8, [rax] mov [rsp+100h+var_100], r8 mov r8, [rax+8] mov [rsp+100h+var_F8], r8 mov rax, [rax+10h] mov [rsp+100h+var_F0], rax call patricia_verify cmp eax, 0 jnz short loc_334D8 jmp short $+2 loc_334B3: mov rdi, [rbp+var_20] add rdi, 70h ; 'p' lea rsi, aInvalidStorage; "invalid storage proof!" call c4_state_add_error mov rax, [rbp+var_20] mov byte ptr [rax+68h], 0 mov [rbp+var_1], 0 jmp loc_3358A loc_334D8: lea rdi, [rbp+var_70] mov rsi, [rbp+var_28] mov edx, 20h ; ' ' call _memcmp cmp eax, 0 jz short loc_33513 jmp short $+2 loc_334F1: mov rdi, [rbp+var_20] add rdi, 70h ; 'p' lea rsi, aInvalidStorage_1; "invalid storage root!" call c4_state_add_error mov rax, [rbp+var_20] mov byte ptr [rax+68h], 0 mov [rbp+var_1], 0 jmp short loc_3358A loc_33513: cmp [rbp+var_10], 0 jz short loc_33576 mov eax, [rbp+var_18] mov ecx, [rbp+var_30] add ecx, 1 shl ecx, 5 cmp eax, ecx jb short loc_33576 lea rdx, [rbp+var_C8] xor esi, esi mov rdi, rdx call rlp_decode cmp eax, 1 jnz short loc_33576 mov rdi, [rbp+var_10] mov eax, [rbp+var_30] add eax, 1 shl eax, 5 cdqe add rdi, rax mov eax, [rbp+var_C8] mov ecx, eax xor eax, eax sub rax, rcx add rdi, rax mov rsi, [rbp+var_C0] mov eax, [rbp+var_C8] mov edx, eax call _memcpy loc_33576: jmp short $+2 loc_33578: mov eax, [rbp+var_30] add eax, 1 mov [rbp+var_30], eax jmp loc_333A2 loc_33586: mov [rbp+var_1], 1 loc_3358A: mov al, [rbp+var_1] and al, 1 add rsp, 100h pop rbp retn
char verify_storage( long long a1, long long a2, unsigned int a3, long long a4, int a5, int a6, long long a7, long long a8, long long a9) { int v9; // edx int v10; // r8d int v11; // r9d int v12; // r9d unsigned int v14; // [rsp+38h] [rbp-C8h] BYREF long long v15; // [rsp+40h] [rbp-C0h] unsigned int v16; // [rsp+48h] [rbp-B8h] BYREF long long v17; // [rsp+50h] [rbp-B0h] long long v18; // [rsp+60h] [rbp-A0h] BYREF long long v19; // [rsp+68h] [rbp-98h] long long v20; // [rsp+70h] [rbp-90h] _BYTE v21[24]; // [rsp+78h] [rbp-88h] BYREF _BYTE v22[32]; // [rsp+90h] [rbp-70h] BYREF _BYTE v23[32]; // [rsp+B0h] [rbp-50h] BYREF int i; // [rsp+D0h] [rbp-30h] int v25; // [rsp+D4h] [rbp-2Ch] long long v26; // [rsp+D8h] [rbp-28h] long long v27; // [rsp+E0h] [rbp-20h] unsigned int v28; // [rsp+E8h] [rbp-18h] long long v29; // [rsp+F0h] [rbp-10h] v28 = a3; v29 = a4; v27 = a1; v26 = a2; if ( a4 ) { LODWORD(a1) = v29; LODWORD(a2) = 0; memset(v29, 0LL, 32LL); } v25 = ssz_len(a1, a2, a3, a8, a5, a6, a7, a8, a9); if ( v25 && !(unsigned int)memcmp(v26, EMPTY_ROOT_HASH, 32LL) ) { c4_state_add_error(v27 + 112, "invalid storage proof because an empty storage hash can not have values!"); *(_BYTE *)(v27 + 104) = 0; return 0; } else { for ( i = 0; i < v25; ++i ) { memset(v23, 0LL, sizeof(v23)); memset(v22, 0LL, sizeof(v22)); ssz_at((unsigned int)v21, i, v9, a8, v10, v11, a7, a8, a9); ssz_get(&v18, v21, "proof"); ssz_get(&v16, v21, "key"); memset(&v14, 0LL, 16LL); keccak(v16, v17, v23); if ( !(unsigned int)patricia_verify( (unsigned int)v22, 32, (unsigned int)v23, (unsigned int)&v14, v19, v12, v18, v19, v20) ) { c4_state_add_error(v27 + 112, "invalid storage proof!"); *(_BYTE *)(v27 + 104) = 0; return 0; } if ( (unsigned int)memcmp(v22, v26, 32LL) ) { c4_state_add_error(v27 + 112, "invalid storage root!"); *(_BYTE *)(v27 + 104) = 0; return 0; } if ( v29 && v28 >= 32 * (i + 1) && (unsigned int)rlp_decode(&v14, 0LL) == 1 ) memcpy(32 * (i + 1) + v29 - v14, v15, v14); } return 1; } }
verify_storage: PUSH RBP MOV RBP,RSP SUB RSP,0x100 LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0xe0],RAX MOV dword ptr [RBP + -0x18],EDX MOV qword ptr [RBP + -0x10],RCX MOV qword ptr [RBP + -0x20],RDI MOV qword ptr [RBP + -0x28],RSI CMP qword ptr [RBP + -0x10],0x0 JZ 0x0013332c MOV RDI,qword ptr [RBP + -0x10] XOR ESI,ESI MOV EDX,0x20 CALL 0x001231c0 LAB_0013332c: MOV RAX,qword ptr [RBP + -0xe0] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x001a0830 MOV dword ptr [RBP + -0x2c],EAX CMP dword ptr [RBP + -0x2c],0x0 JZ 0x0013339b MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [0x00239478] MOV EDX,0x20 CALL 0x00123540 CMP EAX,0x0 JNZ 0x0013339b JMP 0x00133376 LAB_00133376: MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x70 LEA RSI,[0x1de0f2] CALL 0x001a79c0 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x68],0x0 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0013358a LAB_0013339b: MOV dword ptr [RBP + -0x30],0x0 LAB_001333a2: MOV EAX,dword ptr [RBP + -0x30] CMP EAX,dword ptr [RBP + -0x2c] JGE 0x00133586 LEA RDI,[RBP + -0x50] XOR ESI,ESI MOV EDX,0x20 CALL 0x001231c0 LEA RDI,[RBP + -0x70] XOR ESI,ESI MOV EDX,0x20 CALL 0x001231c0 MOV RAX,qword ptr [RBP + -0xe0] MOV ESI,dword ptr [RBP + -0x30] LEA RDI,[RBP + -0x88] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x001a0580 LEA RDI,[RBP + -0xa0] LEA RSI,[RBP + -0x88] LEA RDX,[0x1dc5f0] CALL 0x001a1c10 LEA RDI,[RBP + -0xb8] LEA RSI,[RBP + -0x88] LEA RDX,[0x1dda8b] CALL 0x001a1c10 LEA RDI,[RBP + -0xc8] XOR ESI,ESI MOV EDX,0x10 CALL 0x001231c0 LEA RDX,[RBP + -0x50] MOV EDI,dword ptr [RBP + -0xb8] MOV RSI,qword ptr [RBP + -0xb0] CALL 0x001a4990 LEA RDI,[RBP + -0x70] MOV dword ptr [RBP + -0xd8],0x20 LEA RAX,[RBP + -0x50] MOV qword ptr [RBP + -0xd0],RAX MOV ESI,dword ptr [RBP + -0xd8] MOV RDX,qword ptr [RBP + -0xd0] LEA RAX,[RBP + -0xa0] LEA RCX,[RBP + -0xc8] MOV R8,qword ptr [RAX] MOV qword ptr [RSP],R8 MOV R8,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],R8 MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x00135950 CMP EAX,0x0 JNZ 0x001334d8 JMP 0x001334b3 LAB_001334b3: MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x70 LEA RSI,[0x1ddfd2] CALL 0x001a79c0 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x68],0x0 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0013358a LAB_001334d8: LEA RDI,[RBP + -0x70] MOV RSI,qword ptr [RBP + -0x28] MOV EDX,0x20 CALL 0x00123540 CMP EAX,0x0 JZ 0x00133513 JMP 0x001334f1 LAB_001334f1: MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x70 LEA RSI,[0x1de13b] CALL 0x001a79c0 MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x68],0x0 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0013358a LAB_00133513: CMP qword ptr [RBP + -0x10],0x0 JZ 0x00133576 MOV EAX,dword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x30] ADD ECX,0x1 SHL ECX,0x5 CMP EAX,ECX JC 0x00133576 LEA RDX,[RBP + -0xc8] XOR ESI,ESI MOV RDI,RDX CALL 0x00136280 CMP EAX,0x1 JNZ 0x00133576 MOV RDI,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RBP + -0x30] ADD EAX,0x1 SHL EAX,0x5 CDQE ADD RDI,RAX MOV EAX,dword ptr [RBP + -0xc8] MOV ECX,EAX XOR EAX,EAX SUB RAX,RCX ADD RDI,RAX MOV RSI,qword ptr [RBP + -0xc0] MOV EAX,dword ptr [RBP + -0xc8] MOV EDX,EAX CALL 0x001230a0 LAB_00133576: JMP 0x00133578 LAB_00133578: MOV EAX,dword ptr [RBP + -0x30] ADD EAX,0x1 MOV dword ptr [RBP + -0x30],EAX JMP 0x001333a2 LAB_00133586: MOV byte ptr [RBP + -0x1],0x1 LAB_0013358a: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x100 POP RBP RET
int1 verify_storage(long param_1,void *param_2,uint param_3,void *param_4,int8 param_5, int8 param_6) { int iVar1; uint local_d0 [2]; void *local_c8; int4 local_c0 [2]; int8 local_b8; int8 local_a8; int8 local_a0; int8 local_98; int1 local_90 [24]; int1 local_78 [32]; int1 local_58 [32]; int local_38; int local_34; void *local_30; long local_28; uint local_20; void *local_18; local_30 = param_2; local_28 = param_1; local_20 = param_3; local_18 = param_4; if (param_4 != (void *)0x0) { memset(param_4,0,0x20); } local_34 = ssz_len(); if ((local_34 != 0) && (iVar1 = memcmp(local_30,EMPTY_ROOT_HASH,0x20), iVar1 == 0)) { c4_state_add_error(local_28 + 0x70, "invalid storage proof because an empty storage hash can not have values!"); *(int1 *)(local_28 + 0x68) = 0; return 0; } local_38 = 0; while( true ) { if (local_34 <= local_38) { return 1; } memset(local_58,0,0x20); memset(local_78,0,0x20); ssz_at(local_90,local_38); ssz_get(&local_a8,local_90,"proof"); ssz_get(local_c0,local_90,"key"); memset(local_d0,0,0x10); keccak(local_c0[0],local_b8,local_58); iVar1 = patricia_verify(local_78,0x20,local_58,local_d0,local_a0,param_6,local_a8,local_a0, local_98); if (iVar1 == 0) break; iVar1 = memcmp(local_78,local_30,0x20); if (iVar1 != 0) { c4_state_add_error(local_28 + 0x70,"invalid storage root!"); *(int1 *)(local_28 + 0x68) = 0; return 0; } if (((local_18 != (void *)0x0) && ((uint)((local_38 + 1) * 0x20) <= local_20)) && (iVar1 = rlp_decode(local_d0), iVar1 == 1)) { memcpy((void *)((long)local_18 + ((long)((local_38 + 1) * 0x20) - (ulong)local_d0[0])), local_c8,(ulong)local_d0[0]); } local_38 = local_38 + 1; } c4_state_add_error(local_28 + 0x70,"invalid storage proof!"); *(int1 *)(local_28 + 0x68) = 0; return 0; }
17,967
mp_sub_dec
bluesky950520[P]quickjs/libbf.c
limb_t mp_sub_dec(limb_t *res, const limb_t *op1, const limb_t *op2, mp_size_t n, limb_t carry) { limb_t base = BF_DEC_BASE; mp_size_t i; limb_t k, v, a; k=carry; for(i=0;i<n;i++) { v = op1[i]; a = v - op2[i] - k; k = a > v; if (k) a += base; res[i] = a; } return k; }
O1
c
mp_sub_dec: testq %rcx, %rcx jle 0x8d937 xorl %r9d, %r9d movabsq $-0x7538dcfb76180000, %r10 # imm = 0x8AC7230489E80000 movq (%rsi,%r9,8), %r11 addq (%rdx,%r9,8), %r8 xorl %eax, %eax subq %r8, %r11 setb %al leaq (%r11,%r10), %r8 cmovaeq %r11, %r8 movq %r8, (%rdi,%r9,8) incq %r9 movq %rax, %r8 cmpq %r9, %rcx jne 0x8d90f retq movq %r8, %rax retq
mp_sub_dec: test rcx, rcx jle short loc_8D937 xor r9d, r9d mov r10, 8AC7230489E80000h loc_8D90F: mov r11, [rsi+r9*8] add r8, [rdx+r9*8] xor eax, eax sub r11, r8 setb al lea r8, [r11+r10] cmovnb r8, r11 mov [rdi+r9*8], r8 inc r9 mov r8, rax cmp rcx, r9 jnz short loc_8D90F retn loc_8D937: mov rax, r8 retn
_BOOL8 mp_sub_dec(long long a1, long long a2, long long a3, long long a4, _BOOL8 a5) { long long i; // r9 unsigned long long v6; // r11 unsigned long long v7; // r8 bool v8; // cf unsigned long long v9; // r11 _BOOL8 result; // rax unsigned long long v11; // r8 if ( a4 <= 0 ) return a5; for ( i = 0LL; i != a4; ++i ) { v6 = *(_QWORD *)(a2 + 8 * i); v7 = *(_QWORD *)(a3 + 8 * i) + a5; v8 = v6 < v7; v9 = v6 - v7; result = v8; v11 = v9 - 0x7538DCFB76180000LL; if ( !v8 ) v11 = v9; *(_QWORD *)(a1 + 8 * i) = v11; a5 = v8; } return result; }
17,968
mp_sub_dec
bluesky950520[P]quickjs/libbf.c
limb_t mp_sub_dec(limb_t *res, const limb_t *op1, const limb_t *op2, mp_size_t n, limb_t carry) { limb_t base = BF_DEC_BASE; mp_size_t i; limb_t k, v, a; k=carry; for(i=0;i<n;i++) { v = op1[i]; a = v - op2[i] - k; k = a > v; if (k) a += base; res[i] = a; } return k; }
O2
c
mp_sub_dec: movq %r8, %rax xorl %r8d, %r8d testq %rcx, %rcx cmovleq %r8, %rcx movabsq $-0x7538dcfb76180000, %r9 # imm = 0x8AC7230489E80000 cmpq %r8, %rcx je 0x763b7 movq (%rsi,%r8,8), %r10 addq (%rdx,%r8,8), %rax xorl %r11d, %r11d subq %rax, %r10 leaq (%r10,%r9), %rax cmovaeq %r10, %rax setb %r11b movq %rax, (%rdi,%r8,8) incq %r8 movq %r11, %rax jmp 0x7638c retq
mp_sub_dec: mov rax, r8 xor r8d, r8d test rcx, rcx cmovle rcx, r8 mov r9, 8AC7230489E80000h loc_7638C: cmp rcx, r8 jz short locret_763B7 mov r10, [rsi+r8*8] add rax, [rdx+r8*8] xor r11d, r11d sub r10, rax lea rax, [r10+r9] cmovnb rax, r10 setb r11b mov [rdi+r8*8], rax inc r8 mov rax, r11 jmp short loc_7638C locret_763B7: retn
long long mp_sub_dec(long long a1, long long a2, long long a3, long long a4, long long a5) { long long result; // rax long long v6; // r8 unsigned long long v7; // r10 unsigned long long v8; // rax long long v9; // r11 bool v10; // cf unsigned long long v11; // r10 unsigned long long v12; // rax result = a5; v6 = 0LL; if ( a4 <= 0 ) a4 = 0LL; while ( a4 != v6 ) { v7 = *(_QWORD *)(a2 + 8 * v6); v8 = *(_QWORD *)(a3 + 8 * v6) + result; v9 = 0LL; v10 = v7 < v8; v11 = v7 - v8; v12 = v11 - 0x7538DCFB76180000LL; if ( !v10 ) v12 = v11; LOBYTE(v9) = v10; *(_QWORD *)(a1 + 8 * v6++) = v12; result = v9; } return result; }
mp_sub_dec: MOV RAX,R8 XOR R8D,R8D TEST RCX,RCX CMOVLE RCX,R8 MOV R9,-0x7538dcfb76180000 LAB_0017638c: CMP RCX,R8 JZ 0x001763b7 MOV R10,qword ptr [RSI + R8*0x8] ADD RAX,qword ptr [RDX + R8*0x8] XOR R11D,R11D SUB R10,RAX LEA RAX,[R10 + R9*0x1] CMOVNC RAX,R10 SETC R11B MOV qword ptr [RDI + R8*0x8],RAX INC R8 MOV RAX,R11 JMP 0x0017638c LAB_001763b7: RET
void mp_sub_dec(long param_1,long param_2,long param_3,long param_4,ulong param_5) { ulong uVar1; long lVar2; long lVar3; lVar3 = 0; if (param_4 < 1) { param_4 = lVar3; } for (; param_4 != lVar3; lVar3 = lVar3 + 1) { uVar1 = *(ulong *)(param_2 + lVar3 * 8); param_5 = param_5 + *(long *)(param_3 + lVar3 * 8); lVar2 = (uVar1 - param_5) + -0x7538dcfb76180000; if (uVar1 >= param_5) { lVar2 = uVar1 - param_5; } param_5 = (ulong)(uVar1 < param_5); *(long *)(param_1 + lVar3 * 8) = lVar2; } return; }
17,969
ma_set_share_data_file_length
eloqsql/storage/maria/ma_state.c
void _ma_set_share_data_file_length(MARIA_SHARE *share, ulonglong new_length) { if (!share->internal_table) mysql_mutex_lock(&share->intern_lock); if (share->state.state.data_file_length < new_length) { share->state.state.data_file_length= new_length; if (new_length >= share->base.max_data_file_length) { /* Give an error on next insert */ share->state.changed|= STATE_DATA_FILE_FULL; } } if (!share->internal_table) mysql_mutex_unlock(&share->intern_lock); }
O3
c
ma_set_share_data_file_length: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx cmpb $0x0, 0x7e2(%rdi) jne 0x43cac leaq 0x8f0(%rbx), %rdi cmpq $0x0, 0x930(%rbx) jne 0x43cf3 callq 0x2a200 cmpq %r14, 0x40(%rbx) jae 0x43cc6 movq %r14, 0x40(%rbx) cmpq %r14, 0x368(%rbx) ja 0x43cc6 orb $0x10, 0x171(%rbx) cmpb $0x0, 0x7e2(%rbx) je 0x43cd4 popq %rbx popq %r14 popq %rbp retq movq 0x930(%rbx), %rdi addq $0x8f0, %rbx # imm = 0x8F0 testq %rdi, %rdi jne 0x43d06 movq %rbx, %rdi popq %rbx popq %r14 popq %rbp jmp 0x2a1d0 leaq 0xa1497(%rip), %rsi # 0xe5191 movl $0x313, %edx # imm = 0x313 callq 0x308cf jmp 0x43cac leaq 0x34fd4b(%rip), %rax # 0x393a58 movq (%rax), %rax callq *0x160(%rax) jmp 0x43ce7
_ma_set_share_data_file_length: push rbp mov rbp, rsp push r14 push rbx mov r14, rsi mov rbx, rdi cmp byte ptr [rdi+7E2h], 0 jnz short loc_43CAC lea rdi, [rbx+8F0h] cmp qword ptr [rbx+930h], 0 jnz short loc_43CF3 call _pthread_mutex_lock loc_43CAC: cmp [rbx+40h], r14 jnb short loc_43CC6 mov [rbx+40h], r14 cmp [rbx+368h], r14 ja short loc_43CC6 or byte ptr [rbx+171h], 10h loc_43CC6: cmp byte ptr [rbx+7E2h], 0 jz short loc_43CD4 pop rbx pop r14 pop rbp retn loc_43CD4: mov rdi, [rbx+930h] add rbx, 8F0h test rdi, rdi jnz short loc_43D06 loc_43CE7: mov rdi, rbx pop rbx pop r14 pop rbp jmp _pthread_mutex_unlock loc_43CF3: lea rsi, aWorkspaceLlm4b_32; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 313h call psi_mutex_lock jmp short loc_43CAC loc_43D06: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_43CE7
long long ma_set_share_data_file_length(long long a1, unsigned long long a2) { long long v3; // rdi long long result; // rax long long v5; // rdi long long v6; // rbx if ( !*(_BYTE *)(a1 + 2018) ) { v3 = a1 + 2288; if ( *(_QWORD *)(a1 + 2352) ) result = psi_mutex_lock(v3, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c", 0x313u); else result = pthread_mutex_lock(v3); } if ( *(_QWORD *)(a1 + 64) < a2 ) { *(_QWORD *)(a1 + 64) = a2; if ( *(_QWORD *)(a1 + 872) <= a2 ) *(_BYTE *)(a1 + 369) |= 0x10u; } if ( !*(_BYTE *)(a1 + 2018) ) { v5 = *(_QWORD *)(a1 + 2352); v6 = a1 + 2288; if ( v5 ) PSI_server[44](); return pthread_mutex_unlock(v6); } return result; }
_ma_set_share_data_file_length: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV R14,RSI MOV RBX,RDI CMP byte ptr [RDI + 0x7e2],0x0 JNZ 0x00143cac LEA RDI,[RBX + 0x8f0] CMP qword ptr [RBX + 0x930],0x0 JNZ 0x00143cf3 CALL 0x0012a200 LAB_00143cac: CMP qword ptr [RBX + 0x40],R14 JNC 0x00143cc6 MOV qword ptr [RBX + 0x40],R14 CMP qword ptr [RBX + 0x368],R14 JA 0x00143cc6 OR byte ptr [RBX + 0x171],0x10 LAB_00143cc6: CMP byte ptr [RBX + 0x7e2],0x0 JZ 0x00143cd4 POP RBX POP R14 POP RBP RET LAB_00143cd4: MOV RDI,qword ptr [RBX + 0x930] ADD RBX,0x8f0 TEST RDI,RDI JNZ 0x00143d06 LAB_00143ce7: MOV RDI,RBX POP RBX POP R14 POP RBP JMP 0x0012a1d0 LAB_00143cf3: LEA RSI,[0x1e5191] MOV EDX,0x313 CALL 0x001308cf JMP 0x00143cac LAB_00143d06: LEA RAX,[0x493a58] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00143ce7
void _ma_set_share_data_file_length(long param_1,ulong param_2) { if (*(char *)(param_1 + 0x7e2) == '\0') { if (*(long *)(param_1 + 0x930) == 0) { pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x8f0)); } else { psi_mutex_lock((pthread_mutex_t *)(param_1 + 0x8f0), "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c",0x313); } } if ((*(ulong *)(param_1 + 0x40) < param_2) && (*(ulong *)(param_1 + 0x40) = param_2, *(ulong *)(param_1 + 0x368) <= param_2)) { *(byte *)(param_1 + 0x171) = *(byte *)(param_1 + 0x171) | 0x10; } if (*(char *)(param_1 + 0x7e2) != '\0') { return; } if (*(long *)(param_1 + 0x930) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x8f0)); return; }
17,970
common_chat_format_name[abi:cxx11](common_chat_format)
monkey531[P]llama/common/chat.cpp
std::string common_chat_format_name(common_chat_format format) { switch (format) { case COMMON_CHAT_FORMAT_CONTENT_ONLY: return "Content-only"; case COMMON_CHAT_FORMAT_GENERIC: return "Generic"; case COMMON_CHAT_FORMAT_MISTRAL_NEMO: return "Mistral Nemo"; case COMMON_CHAT_FORMAT_LLAMA_3_X: return "Llama 3.x"; case COMMON_CHAT_FORMAT_LLAMA_3_X_WITH_BUILTIN_TOOLS: return "Llama 3.x with builtin tools"; case COMMON_CHAT_FORMAT_DEEPSEEK_R1: return "DeepSeek R1"; case COMMON_CHAT_FORMAT_FIREFUNCTION_V2: return "FireFunction v2"; case COMMON_CHAT_FORMAT_FUNCTIONARY_V3_2: return "Functionary v3.2"; case COMMON_CHAT_FORMAT_FUNCTIONARY_V3_1_LLAMA_3_1: return "Functionary v3.1 Llama 3.1"; case COMMON_CHAT_FORMAT_HERMES_2_PRO: return "Hermes 2 Pro"; case COMMON_CHAT_FORMAT_COMMAND_R7B: return "Command R7B"; default: throw std::runtime_error("Unknown chat format"); } }
O1
cpp
common_chat_format_name[abi:cxx11](common_chat_format): pushq %r14 pushq %rbx pushq %rax cmpl $0xa, %esi ja 0x92e57 movq %rdi, %rbx movl %esi, %eax leaq 0x31937(%rip), %rcx # 0xc4668 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x32968(%rip), %rsi # 0xc56b0 leaq 0x3296d(%rip), %rdx # 0xc56bc jmp 0x92e44 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x3297a(%rip), %rsi # 0xc56dc leaq 0x3298f(%rip), %rdx # 0xc56f8 jmp 0x92e44 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x329c5(%rip), %rsi # 0xc5741 leaq 0x329ca(%rip), %rdx # 0xc574d jmp 0x92e44 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x3292f(%rip), %rsi # 0xc56c5 leaq 0x32934(%rip), %rdx # 0xc56d1 jmp 0x92e44 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x32922(%rip), %rsi # 0xc56d2 leaq 0x32924(%rip), %rdx # 0xc56db jmp 0x92e44 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x3294b(%rip), %rsi # 0xc5715 leaq 0x32954(%rip), %rdx # 0xc5725 jmp 0x92e44 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x328dc(%rip), %rsi # 0xc56bd leaq 0x328dc(%rip), %rdx # 0xc56c4 jmp 0x92e44 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x32901(%rip), %rsi # 0xc56f9 leaq 0x32905(%rip), %rdx # 0xc5704 jmp 0x92e44 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x328f6(%rip), %rsi # 0xc5705 leaq 0x328fe(%rip), %rdx # 0xc5714 jmp 0x92e44 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x32928(%rip), %rsi # 0xc574e leaq 0x3292c(%rip), %rdx # 0xc5759 jmp 0x92e44 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x328e9(%rip), %rsi # 0xc5726 leaq 0x328fc(%rip), %rdx # 0xc5740 movq %rbx, %rdi callq 0x26294 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq movl $0x10, %edi callq 0x1a3b0 movq %rax, %rbx leaq 0x328ef(%rip), %rsi # 0xc575a movq %rax, %rdi callq 0x1a2a0 movq 0x62176(%rip), %rsi # 0xf4ff0 movq 0x620ef(%rip), %rdx # 0xf4f70 movq %rbx, %rdi callq 0x1ad60 movq %rax, %r14 movq %rbx, %rdi callq 0x1a5a0 movq %r14, %rdi callq 0x1adc0
_Z23common_chat_format_nameB5cxx1118common_chat_format: push r14 push rbx push rax cmp esi, 0Ah; switch 11 cases ja def_92D38; jumptable 0000000000092D38 default case mov rbx, rdi mov eax, esi lea rcx, jpt_92D38 movsxd rax, ds:(jpt_92D38 - 0C4668h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_92D3A: lea rax, [rbx+10h]; jumptable 0000000000092D38 case 0 mov [rbx], rax lea rsi, aContentOnly; "Content-only" lea rdx, aContentOnly+0Ch; "" jmp loc_92E44 loc_92D54: lea rax, [rbx+10h]; jumptable 0000000000092D38 case 4 mov [rbx], rax lea rsi, aLlama3XWithBui; "Llama 3.x with builtin tools" lea rdx, aLlama3XWithBui+1Ch; "" jmp loc_92E44 loc_92D6E: lea rax, [rbx+10h]; jumptable 0000000000092D38 case 9 mov [rbx], rax lea rsi, aHermes2Pro; "Hermes 2 Pro" lea rdx, aHermes2Pro+0Ch; "" jmp loc_92E44 loc_92D88: lea rax, [rbx+10h]; jumptable 0000000000092D38 case 2 mov [rbx], rax lea rsi, aMistralNemo; "Mistral Nemo" lea rdx, aMistralNemo+0Ch; "" jmp loc_92E44 loc_92DA2: lea rax, [rbx+10h]; jumptable 0000000000092D38 case 3 mov [rbx], rax lea rsi, aLlama3X; "Llama 3.x" lea rdx, aLlama3X+9; "" jmp loc_92E44 loc_92DBC: lea rax, [rbx+10h]; jumptable 0000000000092D38 case 7 mov [rbx], rax lea rsi, aFunctionaryV32; "Functionary v3.2" lea rdx, aFunctionaryV32+10h; "" jmp short loc_92E44 loc_92DD3: lea rax, [rbx+10h]; jumptable 0000000000092D38 case 1 mov [rbx], rax lea rsi, aGeneric; "Generic" lea rdx, aGeneric+7; "" jmp short loc_92E44 loc_92DEA: lea rax, [rbx+10h]; jumptable 0000000000092D38 case 5 mov [rbx], rax lea rsi, aDeepseekR1; "DeepSeek R1" lea rdx, aDeepseekR1+0Bh; "" jmp short loc_92E44 loc_92E01: lea rax, [rbx+10h]; jumptable 0000000000092D38 case 6 mov [rbx], rax lea rsi, aFirefunctionV2; "FireFunction v2" lea rdx, aFirefunctionV2+0Fh; "" jmp short loc_92E44 loc_92E18: lea rax, [rbx+10h]; jumptable 0000000000092D38 case 10 mov [rbx], rax lea rsi, aCommandR7b; "Command R7B" lea rdx, aCommandR7b+0Bh; "" jmp short loc_92E44 loc_92E2F: lea rax, [rbx+10h]; jumptable 0000000000092D38 case 8 mov [rbx], rax lea rsi, aFunctionaryV31; "Functionary v3.1 Llama 3.1" lea rdx, aFunctionaryV31+1Ah; "" loc_92E44: mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rax, rbx add rsp, 8 pop rbx pop r14 retn def_92D38: mov edi, 10h; jumptable 0000000000092D38 default case call ___cxa_allocate_exception mov rbx, rax lea rsi, aUnknownChatFor; "Unknown chat format" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception mov rdi, r14 call __Unwind_Resume
_QWORD * common_chat_format_name[abi:cxx11](_QWORD *a1, int a2) { char *v2; // rsi char *v3; // rdx std::runtime_error *exception; // rbx switch ( a2 ) { case 0: *a1 = a1 + 2; v2 = "Content-only"; v3 = ""; break; case 1: *a1 = a1 + 2; v2 = "Generic"; v3 = ""; break; case 2: *a1 = a1 + 2; v2 = "Mistral Nemo"; v3 = ""; break; case 3: *a1 = a1 + 2; v2 = "Llama 3.x"; v3 = ""; break; case 4: *a1 = a1 + 2; v2 = "Llama 3.x with builtin tools"; v3 = ""; break; case 5: *a1 = a1 + 2; v2 = "DeepSeek R1"; v3 = ""; break; case 6: *a1 = a1 + 2; v2 = "FireFunction v2"; v3 = ""; break; case 7: *a1 = a1 + 2; v2 = "Functionary v3.2"; v3 = ""; break; case 8: *a1 = a1 + 2; v2 = "Functionary v3.1 Llama 3.1"; v3 = ""; break; case 9: *a1 = a1 + 2; v2 = "Hermes 2 Pro"; v3 = ""; break; case 10: *a1 = a1 + 2; v2 = "Command R7B"; v3 = ""; break; default: exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Unknown chat format"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } std::string::_M_construct<char const*>(a1, v2, (long long)v3); return a1; }
common_chat_format_name[abi:cxx11]: PUSH R14 PUSH RBX PUSH RAX CMP ESI,0xa JA 0x00192e57 MOV RBX,RDI MOV EAX,ESI LEA RCX,[0x1c4668] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1c56b0] LEA RDX,[0x1c56bc] JMP 0x00192e44 caseD_4: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1c56dc] LEA RDX,[0x1c56f8] JMP 0x00192e44 caseD_9: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1c5741] LEA RDX,[0x1c574d] JMP 0x00192e44 caseD_2: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1c56c5] LEA RDX,[0x1c56d1] JMP 0x00192e44 caseD_3: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1c56d2] LEA RDX,[0x1c56db] JMP 0x00192e44 caseD_7: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1c5715] LEA RDX,[0x1c5725] JMP 0x00192e44 caseD_1: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1c56bd] LEA RDX,[0x1c56c4] JMP 0x00192e44 caseD_5: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1c56f9] LEA RDX,[0x1c5704] JMP 0x00192e44 caseD_6: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1c5705] LEA RDX,[0x1c5714] JMP 0x00192e44 caseD_a: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1c574e] LEA RDX,[0x1c5759] JMP 0x00192e44 caseD_8: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1c5726] LEA RDX,[0x1c5740] LAB_00192e44: MOV RDI,RBX CALL 0x00126294 MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET default: MOV EDI,0x10 CALL 0x0011a3b0 MOV RBX,RAX LAB_00192e64: LEA RSI,[0x1c575a] MOV RDI,RAX CALL 0x0011a2a0 LAB_00192e73: MOV RSI,qword ptr [0x001f4ff0] MOV RDX,qword ptr [0x001f4f70] MOV RDI,RBX CALL 0x0011ad60
/* common_chat_format_name[abi:cxx11](common_chat_format) */ long * common_chat_format_name_abi_cxx11_(long *param_1,int4 param_2) { runtime_error *this; char *pcVar1; char *pcVar2; switch(param_2) { case 0: *param_1 = (long)(param_1 + 2); pcVar2 = "Content-only"; pcVar1 = ""; break; case 1: *param_1 = (long)(param_1 + 2); pcVar2 = "Generic"; pcVar1 = ""; break; case 2: *param_1 = (long)(param_1 + 2); pcVar2 = "Mistral Nemo"; pcVar1 = ""; break; case 3: *param_1 = (long)(param_1 + 2); pcVar2 = "Llama 3.x"; pcVar1 = ""; break; case 4: *param_1 = (long)(param_1 + 2); pcVar2 = "Llama 3.x with builtin tools"; pcVar1 = ""; break; case 5: *param_1 = (long)(param_1 + 2); pcVar2 = "DeepSeek R1"; pcVar1 = ""; break; case 6: *param_1 = (long)(param_1 + 2); pcVar2 = "FireFunction v2"; pcVar1 = ""; break; case 7: *param_1 = (long)(param_1 + 2); pcVar2 = "Functionary v3.2"; pcVar1 = ""; break; case 8: *param_1 = (long)(param_1 + 2); pcVar2 = "Functionary v3.1 Llama 3.1"; pcVar1 = ""; break; case 9: *param_1 = (long)(param_1 + 2); pcVar2 = "Hermes 2 Pro"; pcVar1 = ""; break; case 10: *param_1 = (long)(param_1 + 2); pcVar2 = "Command R7B"; pcVar1 = ""; break; default: this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00192e64 to 00192e72 has its CatchHandler @ 00192e89 */ std::runtime_error::runtime_error(this,"Unknown chat format"); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001f4ff0,PTR__runtime_error_001f4f70); } std::__cxx11::string::_M_construct<char_const*>(param_1,pcVar2,pcVar1); return param_1; }
17,971
common_chat_format_name[abi:cxx11](common_chat_format)
monkey531[P]llama/common/chat.cpp
std::string common_chat_format_name(common_chat_format format) { switch (format) { case COMMON_CHAT_FORMAT_CONTENT_ONLY: return "Content-only"; case COMMON_CHAT_FORMAT_GENERIC: return "Generic"; case COMMON_CHAT_FORMAT_MISTRAL_NEMO: return "Mistral Nemo"; case COMMON_CHAT_FORMAT_LLAMA_3_X: return "Llama 3.x"; case COMMON_CHAT_FORMAT_LLAMA_3_X_WITH_BUILTIN_TOOLS: return "Llama 3.x with builtin tools"; case COMMON_CHAT_FORMAT_DEEPSEEK_R1: return "DeepSeek R1"; case COMMON_CHAT_FORMAT_FIREFUNCTION_V2: return "FireFunction v2"; case COMMON_CHAT_FORMAT_FUNCTIONARY_V3_2: return "Functionary v3.2"; case COMMON_CHAT_FORMAT_FUNCTIONARY_V3_1_LLAMA_3_1: return "Functionary v3.1 Llama 3.1"; case COMMON_CHAT_FORMAT_HERMES_2_PRO: return "Hermes 2 Pro"; case COMMON_CHAT_FORMAT_COMMAND_R7B: return "Command R7B"; default: throw std::runtime_error("Unknown chat format"); } }
O2
cpp
common_chat_format_name[abi:cxx11](common_chat_format): pushq %r14 pushq %rbx subq $0x18, %rsp cmpl $0xa, %esi ja 0x7f39f movq %rdi, %rbx movl %esi, %eax leaq 0x24340(%rip), %rcx # 0xa3628 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x25378(%rip), %rsi # 0xa4670 leaq 0x17(%rsp), %rdx jmp 0x7f38c leaq 0x25393(%rip), %rsi # 0xa469c leaq 0x13(%rsp), %rdx jmp 0x7f38c leaq 0x253ea(%rip), %rsi # 0xa4701 leaq 0xe(%rsp), %rdx jmp 0x7f38c leaq 0x25360(%rip), %rsi # 0xa4685 leaq 0x15(%rsp), %rdx jmp 0x7f38c leaq 0x2535f(%rip), %rsi # 0xa4692 leaq 0x14(%rsp), %rdx jmp 0x7f38c leaq 0x25394(%rip), %rsi # 0xa46d5 leaq 0x10(%rsp), %rdx jmp 0x7f38c leaq 0x2532e(%rip), %rsi # 0xa467d leaq 0x16(%rsp), %rdx jmp 0x7f38c leaq 0x2535c(%rip), %rsi # 0xa46b9 leaq 0x12(%rsp), %rdx jmp 0x7f38c leaq 0x2535a(%rip), %rsi # 0xa46c5 leaq 0x11(%rsp), %rdx jmp 0x7f38c leaq 0x25395(%rip), %rsi # 0xa470e leaq 0xd(%rsp), %rdx jmp 0x7f38c leaq 0x2535f(%rip), %rsi # 0xa46e6 leaq 0xf(%rsp), %rdx movq %rbx, %rdi callq 0x29014 movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r14 retq pushq $0x10 popq %rdi callq 0x223e0 movq %rax, %rbx leaq 0x25369(%rip), %rsi # 0xa471a movq %rax, %rdi callq 0x222b0 movq 0x63c30(%rip), %rsi # 0xe2ff0 movq 0x63ba1(%rip), %rdx # 0xe2f68 movq %rbx, %rdi callq 0x22d40 movq %rax, %r14 movq %rbx, %rdi callq 0x225c0 movq %r14, %rdi callq 0x22da0
_Z23common_chat_format_nameB5cxx1118common_chat_format: push r14 push rbx sub rsp, 18h cmp esi, 0Ah; switch 11 cases ja def_7F2EF; jumptable 000000000007F2EF default case mov rbx, rdi mov eax, esi lea rcx, jpt_7F2EF movsxd rax, ds:(jpt_7F2EF - 0A3628h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_7F2F1: lea rsi, aContentOnly; jumptable 000000000007F2EF case 0 lea rdx, [rsp+28h+var_11] jmp loc_7F38C loc_7F302: lea rsi, aLlama3XWithBui; jumptable 000000000007F2EF case 4 lea rdx, [rsp+28h+var_15] jmp short loc_7F38C loc_7F310: lea rsi, aHermes2Pro; jumptable 000000000007F2EF case 9 lea rdx, [rsp+28h+var_1A] jmp short loc_7F38C loc_7F31E: lea rsi, aMistralNemo; jumptable 000000000007F2EF case 2 lea rdx, [rsp+28h+var_13] jmp short loc_7F38C loc_7F32C: lea rsi, aLlama3X; jumptable 000000000007F2EF case 3 lea rdx, [rsp+28h+var_14] jmp short loc_7F38C loc_7F33A: lea rsi, aFunctionaryV32; jumptable 000000000007F2EF case 7 lea rdx, [rsp+28h+var_18] jmp short loc_7F38C loc_7F348: lea rsi, aGeneric; jumptable 000000000007F2EF case 1 lea rdx, [rsp+28h+var_12] jmp short loc_7F38C loc_7F356: lea rsi, aDeepseekR1; jumptable 000000000007F2EF case 5 lea rdx, [rsp+28h+var_16] jmp short loc_7F38C loc_7F364: lea rsi, aFirefunctionV2; jumptable 000000000007F2EF case 6 lea rdx, [rsp+28h+var_17] jmp short loc_7F38C loc_7F372: lea rsi, aCommandR7b; jumptable 000000000007F2EF case 10 lea rdx, [rsp+28h+var_1B] jmp short loc_7F38C loc_7F380: lea rsi, aFunctionaryV31; jumptable 000000000007F2EF case 8 lea rdx, [rsp+28h+var_19] loc_7F38C: mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rax, rbx add rsp, 18h pop rbx pop r14 retn def_7F2EF: push 10h; jumptable 000000000007F2EF default case pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aUnknownChatFor; "Unknown chat format" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception mov rdi, r14 call __Unwind_Resume
_QWORD * common_chat_format_name[abi:cxx11](_QWORD *a1, int a2) { const char *v2; // rsi std::runtime_error *exception; // rbx switch ( a2 ) { case 0: v2 = "Content-only"; break; case 1: v2 = "Generic"; break; case 2: v2 = "Mistral Nemo"; break; case 3: v2 = "Llama 3.x"; break; case 4: v2 = "Llama 3.x with builtin tools"; break; case 5: v2 = "DeepSeek R1"; break; case 6: v2 = "FireFunction v2"; break; case 7: v2 = "Functionary v3.2"; break; case 8: v2 = "Functionary v3.1 Llama 3.1"; break; case 9: v2 = "Hermes 2 Pro"; break; case 10: v2 = "Command R7B"; break; default: exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Unknown chat format"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } std::string::basic_string<std::allocator<char>>(a1, (long long)v2); return a1; }
common_chat_format_name[abi:cxx11]: PUSH R14 PUSH RBX SUB RSP,0x18 CMP ESI,0xa JA 0x0017f39f MOV RBX,RDI MOV EAX,ESI LEA RCX,[0x1a3628] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: LEA RSI,[0x1a4670] LEA RDX,[RSP + 0x17] JMP 0x0017f38c caseD_4: LEA RSI,[0x1a469c] LEA RDX,[RSP + 0x13] JMP 0x0017f38c caseD_9: LEA RSI,[0x1a4701] LEA RDX,[RSP + 0xe] JMP 0x0017f38c caseD_2: LEA RSI,[0x1a4685] LEA RDX,[RSP + 0x15] JMP 0x0017f38c caseD_3: LEA RSI,[0x1a4692] LEA RDX,[RSP + 0x14] JMP 0x0017f38c caseD_7: LEA RSI,[0x1a46d5] LEA RDX,[RSP + 0x10] JMP 0x0017f38c caseD_1: LEA RSI,[0x1a467d] LEA RDX,[RSP + 0x16] JMP 0x0017f38c caseD_5: LEA RSI,[0x1a46b9] LEA RDX,[RSP + 0x12] JMP 0x0017f38c caseD_6: LEA RSI,[0x1a46c5] LEA RDX,[RSP + 0x11] JMP 0x0017f38c caseD_a: LEA RSI,[0x1a470e] LEA RDX,[RSP + 0xd] JMP 0x0017f38c caseD_8: LEA RSI,[0x1a46e6] LEA RDX,[RSP + 0xf] LAB_0017f38c: MOV RDI,RBX CALL 0x00129014 MOV RAX,RBX ADD RSP,0x18 POP RBX POP R14 RET default: PUSH 0x10 POP RDI CALL 0x001223e0 MOV RBX,RAX LAB_0017f3aa: LEA RSI,[0x1a471a] MOV RDI,RAX CALL 0x001222b0 LAB_0017f3b9: MOV RSI,qword ptr [0x001e2ff0] MOV RDX,qword ptr [0x001e2f68] MOV RDI,RBX CALL 0x00122d40
/* common_chat_format_name[abi:cxx11](common_chat_format) */ string * common_chat_format_name_abi_cxx11_(string *param_1,int4 param_2) { runtime_error *this; allocator *paVar1; char *pcVar2; allocator local_1b; allocator local_1a; allocator local_19; allocator local_18; allocator local_17; allocator local_16; allocator local_15; allocator local_14; allocator local_13; allocator local_12; allocator local_11; switch(param_2) { case 0: pcVar2 = "Content-only"; paVar1 = &local_11; break; case 1: pcVar2 = "Generic"; paVar1 = &local_12; break; case 2: pcVar2 = "Mistral Nemo"; paVar1 = &local_13; break; case 3: pcVar2 = "Llama 3.x"; paVar1 = &local_14; break; case 4: pcVar2 = "Llama 3.x with builtin tools"; paVar1 = &local_15; break; case 5: pcVar2 = "DeepSeek R1"; paVar1 = &local_16; break; case 6: pcVar2 = "FireFunction v2"; paVar1 = &local_17; break; case 7: pcVar2 = "Functionary v3.2"; paVar1 = &local_18; break; case 8: pcVar2 = "Functionary v3.1 Llama 3.1"; paVar1 = &local_19; break; case 9: pcVar2 = "Hermes 2 Pro"; paVar1 = &local_1a; break; case 10: pcVar2 = "Command R7B"; paVar1 = &local_1b; break; default: this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0017f3aa to 0017f3b8 has its CatchHandler @ 0017f3cf */ std::runtime_error::runtime_error(this,"Unknown chat format"); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001e2ff0,PTR__runtime_error_001e2f68); } std::__cxx11::string::string<std::allocator<char>>(param_1,pcVar2,paVar1); return param_1; }
17,972
plutovg_path_traverse_dashed
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-path.c
void plutovg_path_traverse_dashed(const plutovg_path_t* path, float offset, const float* dashes, int ndashes, plutovg_path_traverse_func_t traverse_func, void* closure) { float dash_sum = 0.f; for(int i = 0; i < ndashes; ++i) dash_sum += dashes[i]; if(ndashes % 2 == 1) dash_sum *= 2.f; if(dash_sum <= 0.f) { plutovg_path_traverse(path, traverse_func, closure); return; } dasher_t dasher; dasher.dashes = dashes; dasher.ndashes = ndashes; dasher.start_phase = fmodf(offset, dash_sum); if(dasher.start_phase < 0.f) dasher.start_phase += dash_sum; dasher.start_index = 0; dasher.start_toggle = true; while(dasher.start_phase > 0.f && dasher.start_phase >= dasher.dashes[dasher.start_index % dasher.ndashes]) { dasher.start_phase -= dashes[dasher.start_index % dasher.ndashes]; dasher.start_toggle = !dasher.start_toggle; dasher.start_index++; } dasher.phase = dasher.start_phase; dasher.index = dasher.start_index; dasher.toggle = dasher.start_toggle; dasher.current_point = PLUTOVG_EMPTY_POINT; dasher.traverse_func = traverse_func; dasher.closure = closure; plutovg_path_traverse_flatten(path, dash_traverse_func, &dasher); }
O1
c
plutovg_path_traverse_dashed: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x58, %rsp movq %r8, %rbx movq %rcx, %r14 movq %rsi, %r12 movq %rdi, %r15 testl %edx, %edx jle 0xbadb movl %edx, %eax xorps %xmm1, %xmm1 xorl %ecx, %ecx addss (%r12,%rcx,4), %xmm1 incq %rcx cmpq %rcx, %rax jne 0xbacb jmp 0xbade xorps %xmm1, %xmm1 movl %edx, %eax andl $0x80000001, %eax # imm = 0x80000001 cmpl $0x1, %eax jne 0xbaee addss %xmm1, %xmm1 xorps %xmm2, %xmm2 ucomiss %xmm1, %xmm2 jae 0xbb75 movq %r12, 0x8(%rsp) movl %edx, 0x10(%rsp) movaps %xmm1, 0x40(%rsp) callq 0x3290 movaps 0x40(%rsp), %xmm3 addss %xmm0, %xmm3 movaps %xmm0, %xmm1 xorps %xmm2, %xmm2 cmpltss %xmm2, %xmm1 andps %xmm1, %xmm3 andnps %xmm0, %xmm1 orps %xmm3, %xmm1 movss %xmm1, 0x14(%rsp) movl $0x0, 0x1c(%rsp) movb $0x1, 0x24(%rsp) ucomiss %xmm2, %xmm1 jbe 0xbb8e movq 0x8(%rsp), %rdi movb $0x1, %sil xorl %ecx, %ecx movl 0x10(%rsp), %r8d xorps %xmm0, %xmm0 movl %ecx, %eax cltd idivl %r8d ucomiss (%rdi,%rdx,4), %xmm1 jb 0xbb93 subss (%r12,%rdx,4), %xmm1 movss %xmm1, 0x14(%rsp) xorb $0x1, %sil incl %ecx ucomiss %xmm0, %xmm1 ja 0xbb50 jmp 0xbb93 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx addq $0x58, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0xb699 xorl %ecx, %ecx movb $0x1, %sil leaq 0x8(%rsp), %rdx movl %ecx, 0x14(%rdx) movb %sil, 0x1c(%rdx) movss %xmm1, 0x10(%rdx) movl %ecx, 0x18(%rdx) movb %sil, 0x1d(%rdx) movq $0x0, 0x20(%rdx) movq %r14, 0x28(%rdx) movq %rbx, 0x30(%rdx) leaq 0x14(%rip), %rsi # 0xbbd6 movq %r15, %rdi callq 0xb76b addq $0x58, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
plutovg_path_traverse_dashed: push r15 push r14 push r12 push rbx sub rsp, 58h mov rbx, r8 mov r14, rcx mov r12, rsi mov r15, rdi test edx, edx jle short loc_BADB mov eax, edx xorps xmm1, xmm1 xor ecx, ecx loc_BACB: addss xmm1, dword ptr [r12+rcx*4] inc rcx cmp rax, rcx jnz short loc_BACB jmp short loc_BADE loc_BADB: xorps xmm1, xmm1 loc_BADE: mov eax, edx and eax, 80000001h cmp eax, 1 jnz short loc_BAEE addss xmm1, xmm1 loc_BAEE: xorps xmm2, xmm2 ucomiss xmm2, xmm1 jnb short loc_BB75 mov [rsp+78h+var_70], r12 mov [rsp+78h+var_68], edx movaps [rsp+78h+var_38], xmm1 call _fmodf movaps xmm3, [rsp+78h+var_38] addss xmm3, xmm0 movaps xmm1, xmm0 xorps xmm2, xmm2 cmpltss xmm1, xmm2 andps xmm3, xmm1 andnps xmm1, xmm0 orps xmm1, xmm3 movss [rsp+78h+var_64], xmm1 mov [rsp+78h+var_5C], 0 mov [rsp+78h+var_54], 1 ucomiss xmm1, xmm2 jbe short loc_BB8E mov rdi, [rsp+78h+var_70] mov sil, 1 xor ecx, ecx mov r8d, [rsp+78h+var_68] xorps xmm0, xmm0 loc_BB50: mov eax, ecx cdq idiv r8d ucomiss xmm1, dword ptr [rdi+rdx*4] jb short loc_BB93 subss xmm1, dword ptr [r12+rdx*4] movss [rsp+78h+var_64], xmm1 xor sil, 1 inc ecx ucomiss xmm1, xmm0 ja short loc_BB50 jmp short loc_BB93 loc_BB75: mov rdi, r15 mov rsi, r14 mov rdx, rbx add rsp, 58h pop rbx pop r12 pop r14 pop r15 jmp plutovg_path_traverse loc_BB8E: xor ecx, ecx mov sil, 1 loc_BB93: lea rdx, [rsp+78h+var_70] mov [rdx+14h], ecx mov [rdx+1Ch], sil movss dword ptr [rdx+10h], xmm1 mov [rdx+18h], ecx mov [rdx+1Dh], sil mov qword ptr [rdx+20h], 0 mov [rdx+28h], r14 mov [rdx+30h], rbx lea rsi, dash_traverse_func mov rdi, r15 call plutovg_path_traverse_flatten add rsp, 58h pop rbx pop r12 pop r14 pop r15 retn
void plutovg_path_traverse_dashed( long long a1, long long a2, int a3, long long i, long long a5, long long a6, __m128 a7) { void ( *v8)(long long, long long, long long *, long long, long long, long long, long long, long long, long long); // r14 __int128 v10; // xmm1 long long v11; // r8 long long v12; // r9 float v13; // xmm3_4 __m128 v14; // xmm1 float v15; // xmm1_4 char v16; // si long long v17; // rcx long long v18; // rdx long long v19; // [rsp+8h] [rbp-70h] BYREF int v20; // [rsp+10h] [rbp-68h] float v21; // [rsp+14h] [rbp-64h] float v22; // [rsp+18h] [rbp-60h] int v23; // [rsp+1Ch] [rbp-5Ch] int v24; // [rsp+20h] [rbp-58h] char v25; // [rsp+24h] [rbp-54h] char v26; // [rsp+25h] [rbp-53h] long long v27; // [rsp+28h] [rbp-50h] void ( *v28)(long long, long long, long long *, long long, long long, long long, long long, long long, long long); // [rsp+30h] [rbp-48h] long long v29; // [rsp+38h] [rbp-40h] __int128 v30; // [rsp+40h] [rbp-38h] v8 = (void ( *)(long long, long long, long long *, long long, long long, long long, long long, long long, long long))i; if ( a3 <= 0 ) { v10 = 0LL; } else { v10 = 0LL; for ( i = 0LL; i != a3; *(float *)&v10 = *(float *)&v10 + *(float *)(a2 + 4 * i++) ) ; } if ( (a3 & 0x80000001) == 1 ) *(float *)&v10 = *(float *)&v10 + *(float *)&v10; if ( *(float *)&v10 <= 0.0 ) { plutovg_path_traverse(a1, v8, a5, i, a5, a6); } else { v19 = a2; v20 = a3; v30 = v10; *(double *)a7.m128_u64 = fmodf(*(double *)a7.m128_u64, *(float *)&v10); v13 = *(float *)&v10; v14 = _mm_cmplt_ss(a7, (__m128)0LL); LODWORD(v15) = _mm_andnot_ps(v14, a7).m128_u32[0] | COERCE_UNSIGNED_INT(v13 + a7.m128_f32[0]) & v14.m128_i32[0]; v21 = v15; v23 = 0; v25 = 1; if ( v15 <= 0.0 ) { v17 = 0LL; v16 = 1; } else { v16 = 1; v17 = 0LL; v11 = (unsigned int)v20; do { v18 = (unsigned int)((int)v17 >> 31); LODWORD(v18) = (int)v17 % v20; if ( v15 < *(float *)(v19 + 4 * v18) ) break; v15 = v15 - *(float *)(a2 + 4 * v18); v21 = v15; v16 ^= 1u; v17 = (unsigned int)(v17 + 1); } while ( v15 > 0.0 ); } v23 = v17; v25 = v16; v22 = v15; v24 = v17; v26 = v16; v27 = 0LL; v28 = v8; v29 = a5; plutovg_path_traverse_flatten( a1, (void ( *)(long long, long long, long long *, long long, double, double))dash_traverse_func, (long long)&v19, v17, v11, v12); } }
plutovg_path_traverse_dashed: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x58 MOV RBX,R8 MOV R14,RCX MOV R12,RSI MOV R15,RDI TEST EDX,EDX JLE 0x0010badb MOV EAX,EDX XORPS XMM1,XMM1 XOR ECX,ECX LAB_0010bacb: ADDSS XMM1,dword ptr [R12 + RCX*0x4] INC RCX CMP RAX,RCX JNZ 0x0010bacb JMP 0x0010bade LAB_0010badb: XORPS XMM1,XMM1 LAB_0010bade: MOV EAX,EDX AND EAX,0x80000001 CMP EAX,0x1 JNZ 0x0010baee ADDSS XMM1,XMM1 LAB_0010baee: XORPS XMM2,XMM2 UCOMISS XMM2,XMM1 JNC 0x0010bb75 MOV qword ptr [RSP + 0x8],R12 MOV dword ptr [RSP + 0x10],EDX MOVAPS xmmword ptr [RSP + 0x40],XMM1 CALL 0x00103290 MOVAPS XMM3,xmmword ptr [RSP + 0x40] ADDSS XMM3,XMM0 MOVAPS XMM1,XMM0 XORPS XMM2,XMM2 CMPLTSS XMM1,XMM2 ANDPS XMM3,XMM1 ANDNPS XMM1,XMM0 ORPS XMM1,XMM3 MOVSS dword ptr [RSP + 0x14],XMM1 MOV dword ptr [RSP + 0x1c],0x0 MOV byte ptr [RSP + 0x24],0x1 UCOMISS XMM1,XMM2 JBE 0x0010bb8e MOV RDI,qword ptr [RSP + 0x8] MOV SIL,0x1 XOR ECX,ECX MOV R8D,dword ptr [RSP + 0x10] XORPS XMM0,XMM0 LAB_0010bb50: MOV EAX,ECX CDQ IDIV R8D UCOMISS XMM1,dword ptr [RDI + RDX*0x4] JC 0x0010bb93 SUBSS XMM1,dword ptr [R12 + RDX*0x4] MOVSS dword ptr [RSP + 0x14],XMM1 XOR SIL,0x1 INC ECX UCOMISS XMM1,XMM0 JA 0x0010bb50 JMP 0x0010bb93 LAB_0010bb75: MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX ADD RSP,0x58 POP RBX POP R12 POP R14 POP R15 JMP 0x0010b699 LAB_0010bb8e: XOR ECX,ECX MOV SIL,0x1 LAB_0010bb93: LEA RDX,[RSP + 0x8] MOV dword ptr [RDX + 0x14],ECX MOV byte ptr [RDX + 0x1c],SIL MOVSS dword ptr [RDX + 0x10],XMM1 MOV dword ptr [RDX + 0x18],ECX MOV byte ptr [RDX + 0x1d],SIL MOV qword ptr [RDX + 0x20],0x0 MOV qword ptr [RDX + 0x28],R14 MOV qword ptr [RDX + 0x30],RBX LEA RSI,[0x10bbd6] MOV RDI,R15 CALL 0x0010b76b ADD RSP,0x58 POP RBX POP R12 POP R14 POP R15 RET
void plutovg_path_traverse_dashed (float param_1,int8 param_2,long param_3,uint param_4,int8 param_5, int8 param_6) { int iVar1; ulong uVar2; float fVar3; float fVar4; if ((int)param_4 < 1) { fVar4 = 0.0; } else { fVar4 = 0.0; uVar2 = 0; do { fVar4 = fVar4 + *(float *)(param_3 + uVar2 * 4); uVar2 = uVar2 + 1; } while (param_4 != uVar2); } if ((param_4 & 0x80000001) == 1) { fVar4 = fVar4 + fVar4; } if (fVar4 <= 0.0) { plutovg_path_traverse(param_2,param_5,param_6); return; } fVar3 = fmodf(param_1,fVar4); fVar4 = (float)(~-(uint)(fVar3 < 0.0) & (uint)fVar3 | (uint)(fVar4 + fVar3) & -(uint)(fVar3 < 0.0) ); if (0.0 < fVar4) { iVar1 = 0; do { uVar2 = (long)iVar1 % (long)(int)param_4 & 0xffffffff; if (fVar4 < *(float *)(param_3 + uVar2 * 4)) break; fVar4 = fVar4 - *(float *)(param_3 + uVar2 * 4); iVar1 = iVar1 + 1; } while (0.0 < fVar4); } plutovg_path_traverse_flatten(param_2,dash_traverse_func); return; }
17,973
my_multi_malloc
eloqsql/mysys/mulalloc.c
void* my_multi_malloc(PSI_memory_key key, myf myFlags, ...) { va_list args; char **ptr,*start,*res; size_t tot_length,length; DBUG_ENTER("my_multi_malloc"); va_start(args,myFlags); tot_length=0; while ((ptr=va_arg(args, char **))) { length=va_arg(args,uint); tot_length+=ALIGN_SIZE(length); } va_end(args); if (!(start=(char *) my_malloc(key, tot_length,myFlags))) DBUG_RETURN(0); /* purecov: inspected */ va_start(args,myFlags); res=start; while ((ptr=va_arg(args, char **))) { *ptr=res; length=va_arg(args,uint); res+=ALIGN_SIZE(length); } va_end(args); DBUG_RETURN((void*) start); }
O3
c
my_multi_malloc: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0xc8, %rsp movq %rdx, %r10 movq %rsi, %rdx leaq -0xe0(%rbp), %r14 movq %r10, 0x10(%r14) movq %rcx, 0x18(%r14) movq %r8, 0x20(%r14) movq %r9, 0x28(%r14) testb %al, %al je 0x57a62 movaps %xmm0, -0xb0(%rbp) movaps %xmm1, -0xa0(%rbp) movaps %xmm2, -0x90(%rbp) movaps %xmm3, -0x80(%rbp) movaps %xmm4, -0x70(%rbp) movaps %xmm5, -0x60(%rbp) movaps %xmm6, -0x50(%rbp) movaps %xmm7, -0x40(%rbp) movabsq $0x1fffffff8, %rbx # imm = 0x1FFFFFFF8 movq %r14, -0x20(%rbp) leaq 0x10(%rbp), %rcx movq %rcx, -0x28(%rbp) movabsq $0x3000000010, %r15 # imm = 0x3000000010 movq %r15, -0x30(%rbp) movl $0x10, %eax xorl %esi, %esi cmpl $0x28, %eax ja 0x57aa2 movq %rcx, %r8 movl %eax, %ecx addq %r14, %rcx addl $0x8, %eax movl %eax, -0x30(%rbp) jmp 0x57aaa leaq 0x8(%rcx), %r8 movq %r8, -0x28(%rbp) cmpq $0x0, (%rcx) je 0x57add cmpl $0x28, %eax ja 0x57ac6 movq %r8, %rcx movl %eax, %r8d addq %r14, %r8 addl $0x8, %eax movl %eax, -0x30(%rbp) jmp 0x57ace leaq 0x8(%r8), %rcx movq %rcx, -0x28(%rbp) movl (%r8), %r8d addq $0x7, %r8 andq %rbx, %r8 addq %r8, %rsi jmp 0x57a8d callq 0x5a1cd testq %rax, %rax je 0x57b5b movq %r14, -0x20(%rbp) leaq 0x10(%rbp), %rcx movq %rcx, -0x28(%rbp) movq %r15, -0x30(%rbp) movl $0x10, %edx movq %rax, %rcx cmpl $0x28, %edx ja 0x57b12 movl %edx, %esi addq -0x20(%rbp), %rsi addl $0x8, %edx movl %edx, -0x30(%rbp) jmp 0x57b1e movq -0x28(%rbp), %rsi leaq 0x8(%rsi), %rdx movq %rdx, -0x28(%rbp) movq (%rsi), %rdx testq %rdx, %rdx je 0x57b5b movq %rcx, (%rdx) movl -0x30(%rbp), %edx cmpq $0x28, %rdx ja 0x57b41 movq %rdx, %rsi addq -0x20(%rbp), %rsi addl $0x8, %edx movl %edx, -0x30(%rbp) jmp 0x57b4d movq -0x28(%rbp), %rsi leaq 0x8(%rsi), %rdi movq %rdi, -0x28(%rbp) movl (%rsi), %esi addq $0x7, %rsi andq %rbx, %rsi addq %rsi, %rcx jmp 0x57aff addq $0xc8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
my_multi_malloc: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 0C8h mov r10, rdx mov rdx, rsi lea r14, [rbp+var_E0] mov [r14+10h], r10 mov [r14+18h], rcx mov [r14+20h], r8 mov [r14+28h], r9 test al, al jz short loc_57A62 movaps [rbp+var_B0], xmm0 movaps [rbp+var_A0], xmm1 movaps [rbp+var_90], xmm2 movaps [rbp+var_80], xmm3 movaps [rbp+var_70], xmm4 movaps [rbp+var_60], xmm5 movaps [rbp+var_50], xmm6 movaps [rbp+var_40], xmm7 loc_57A62: mov rbx, 1FFFFFFF8h mov [rbp+var_20], r14 lea rcx, [rbp+arg_0] mov [rbp+var_28], rcx mov r15, 3000000010h mov [rbp+var_30], r15 mov eax, 10h xor esi, esi loc_57A8D: cmp eax, 28h ; '(' ja short loc_57AA2 mov r8, rcx mov ecx, eax add rcx, r14 add eax, 8 mov dword ptr [rbp+var_30], eax jmp short loc_57AAA loc_57AA2: lea r8, [rcx+8] mov [rbp+var_28], r8 loc_57AAA: cmp qword ptr [rcx], 0 jz short loc_57ADD cmp eax, 28h ; '(' ja short loc_57AC6 mov rcx, r8 mov r8d, eax add r8, r14 add eax, 8 mov dword ptr [rbp+var_30], eax jmp short loc_57ACE loc_57AC6: lea rcx, [r8+8] mov [rbp+var_28], rcx loc_57ACE: mov r8d, [r8] add r8, 7 and r8, rbx add rsi, r8 jmp short loc_57A8D loc_57ADD: call my_malloc test rax, rax jz short loc_57B5B mov [rbp+var_20], r14 lea rcx, [rbp+arg_0] mov [rbp+var_28], rcx mov [rbp+var_30], r15 mov edx, 10h mov rcx, rax loc_57AFF: cmp edx, 28h ; '(' ja short loc_57B12 mov esi, edx add rsi, [rbp+var_20] add edx, 8 mov dword ptr [rbp+var_30], edx jmp short loc_57B1E loc_57B12: mov rsi, [rbp+var_28] lea rdx, [rsi+8] mov [rbp+var_28], rdx loc_57B1E: mov rdx, [rsi] test rdx, rdx jz short loc_57B5B mov [rdx], rcx mov edx, dword ptr [rbp+var_30] cmp rdx, 28h ; '(' ja short loc_57B41 mov rsi, rdx add rsi, [rbp+var_20] add edx, 8 mov dword ptr [rbp+var_30], edx jmp short loc_57B4D loc_57B41: mov rsi, [rbp+var_28] lea rdi, [rsi+8] mov [rbp+var_28], rdi loc_57B4D: mov esi, [rsi] add rsi, 7 and rsi, rbx add rcx, rsi jmp short loc_57AFF loc_57B5B: add rsp, 0C8h pop rbx pop r14 pop r15 pop rbp retn
long long my_multi_malloc( 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) { unsigned int *v17; // rcx unsigned int v18; // eax long long i; // rsi unsigned int *v20; // r8 long long result; // rax unsigned int v22; // edx long long j; // rcx char *v24; // rsi char *v25; // rsi _BYTE v26[16]; // [rsp+0h] [rbp-E0h] BYREF long long v27; // [rsp+10h] [rbp-D0h] long long v28; // [rsp+18h] [rbp-C8h] long long v29; // [rsp+20h] [rbp-C0h] long long v30; // [rsp+28h] [rbp-B8h] __m128 v31; // [rsp+30h] [rbp-B0h] __m128 v32; // [rsp+40h] [rbp-A0h] __m128 v33; // [rsp+50h] [rbp-90h] __m128 v34; // [rsp+60h] [rbp-80h] __m128 v35; // [rsp+70h] [rbp-70h] __m128 v36; // [rsp+80h] [rbp-60h] __m128 v37; // [rsp+90h] [rbp-50h] __m128 v38; // [rsp+A0h] [rbp-40h] long long v39; // [rsp+B0h] [rbp-30h] char *v40; // [rsp+B8h] [rbp-28h] _BYTE *v41; // [rsp+C0h] [rbp-20h] v31 = a7; v32 = a8; v33 = a9; v34 = a10; v35 = a11; v36 = a12; v37 = a13; v38 = a14; v27 = a3; v28 = a4; v29 = a5; v30 = a6; v41 = v26; v17 = (unsigned int *)&a15; v40 = &a15; v39 = 0x3000000010LL; v18 = 16; for ( i = 0LL; ; i += (*v20 + 7LL) & 0x1FFFFFFF8LL ) { if ( v18 > 0x28 ) { v20 = v17 + 2; v40 = (char *)(v17 + 2); } else { v20 = v17; v17 = (unsigned int *)&v26[v18]; v18 += 8; LODWORD(v39) = v18; } if ( !*(_QWORD *)v17 ) break; if ( v18 > 0x28 ) { v17 = v20 + 2; v40 = (char *)(v20 + 2); } else { v17 = v20; v20 = (unsigned int *)&v26[v18]; v18 += 8; LODWORD(v39) = v18; } } result = my_malloc(a1, i, a2, v17); if ( result ) { v41 = v26; v40 = &a15; v39 = 0x3000000010LL; v22 = 16; for ( j = result; ; j += (*(unsigned int *)v25 + 7LL) & 0x1FFFFFFF8LL ) { if ( v22 > 0x28 ) { v24 = v40; v40 += 8; } else { v24 = &v41[v22]; LODWORD(v39) = v22 + 8; } if ( !*(_QWORD *)v24 ) break; **(_QWORD **)v24 = j; v22 = v39; if ( (unsigned int)v39 > 0x28uLL ) { v25 = v40; v40 += 8; } else { v25 = &v41[(unsigned int)v39]; v22 = v39 + 8; LODWORD(v39) = v39 + 8; } } } return result; }
my_multi_malloc: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0xc8 MOV R10,RDX MOV RDX,RSI LEA R14,[RBP + -0xe0] MOV qword ptr [R14 + 0x10],R10 MOV qword ptr [R14 + 0x18],RCX MOV qword ptr [R14 + 0x20],R8 MOV qword ptr [R14 + 0x28],R9 TEST AL,AL JZ 0x00157a62 MOVAPS xmmword ptr [RBP + -0xb0],XMM0 MOVAPS xmmword ptr [RBP + -0xa0],XMM1 MOVAPS xmmword ptr [RBP + -0x90],XMM2 MOVAPS xmmword ptr [RBP + -0x80],XMM3 MOVAPS xmmword ptr [RBP + -0x70],XMM4 MOVAPS xmmword ptr [RBP + -0x60],XMM5 MOVAPS xmmword ptr [RBP + -0x50],XMM6 MOVAPS xmmword ptr [RBP + -0x40],XMM7 LAB_00157a62: MOV RBX,0x1fffffff8 MOV qword ptr [RBP + -0x20],R14 LEA RCX,[RBP + 0x10] MOV qword ptr [RBP + -0x28],RCX MOV R15,0x3000000010 MOV qword ptr [RBP + -0x30],R15 MOV EAX,0x10 XOR ESI,ESI LAB_00157a8d: CMP EAX,0x28 JA 0x00157aa2 MOV R8,RCX MOV ECX,EAX ADD RCX,R14 ADD EAX,0x8 MOV dword ptr [RBP + -0x30],EAX JMP 0x00157aaa LAB_00157aa2: LEA R8,[RCX + 0x8] MOV qword ptr [RBP + -0x28],R8 LAB_00157aaa: CMP qword ptr [RCX],0x0 JZ 0x00157add CMP EAX,0x28 JA 0x00157ac6 MOV RCX,R8 MOV R8D,EAX ADD R8,R14 ADD EAX,0x8 MOV dword ptr [RBP + -0x30],EAX JMP 0x00157ace LAB_00157ac6: LEA RCX,[R8 + 0x8] MOV qword ptr [RBP + -0x28],RCX LAB_00157ace: MOV R8D,dword ptr [R8] ADD R8,0x7 AND R8,RBX ADD RSI,R8 JMP 0x00157a8d LAB_00157add: CALL 0x0015a1cd TEST RAX,RAX JZ 0x00157b5b MOV qword ptr [RBP + -0x20],R14 LEA RCX,[RBP + 0x10] MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R15 MOV EDX,0x10 MOV RCX,RAX LAB_00157aff: CMP EDX,0x28 JA 0x00157b12 MOV ESI,EDX ADD RSI,qword ptr [RBP + -0x20] ADD EDX,0x8 MOV dword ptr [RBP + -0x30],EDX JMP 0x00157b1e LAB_00157b12: MOV RSI,qword ptr [RBP + -0x28] LEA RDX,[RSI + 0x8] MOV qword ptr [RBP + -0x28],RDX LAB_00157b1e: MOV RDX,qword ptr [RSI] TEST RDX,RDX JZ 0x00157b5b MOV qword ptr [RDX],RCX MOV EDX,dword ptr [RBP + -0x30] CMP RDX,0x28 JA 0x00157b41 MOV RSI,RDX ADD RSI,qword ptr [RBP + -0x20] ADD EDX,0x8 MOV dword ptr [RBP + -0x30],EDX JMP 0x00157b4d LAB_00157b41: MOV RSI,qword ptr [RBP + -0x28] LEA RDI,[RSI + 0x8] MOV qword ptr [RBP + -0x28],RDI LAB_00157b4d: MOV ESI,dword ptr [RSI] ADD RSI,0x7 AND RSI,RBX ADD RCX,RSI JMP 0x00157aff LAB_00157b5b: ADD RSP,0xc8 POP RBX POP R14 POP R15 POP RBP RET
void my_multi_malloc(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; uint uVar1; uint *puVar2; ulong uVar3; long lVar4; uint *puVar5; uint *puVar6; uint local_e8 [4]; int8 local_d8; int8 local_d0; int8 local_c8; int8 local_c0; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; uint local_38; int4 uStack_34; uint *local_30; uint *local_28; local_d8 = param_11; local_d0 = param_12; local_c8 = param_13; local_c0 = param_14; if (in_AL != '\0') { local_b8 = param_1; local_a8 = param_2; local_98 = param_3; local_88 = param_4; local_78 = param_5; local_68 = param_6; local_58 = param_7; local_48 = param_8; } local_28 = local_e8; puVar5 = (uint *)&stack0x00000008; local_30 = puVar5; local_38 = 0x10; uStack_34 = 0x30; uVar1 = 0x10; lVar4 = 0; while( true ) { if (uVar1 < 0x29) { uVar3 = (ulong)uVar1; uVar1 = uVar1 + 8; local_38 = uVar1; puVar2 = (uint *)((long)local_e8 + uVar3); puVar6 = puVar5; } else { puVar6 = puVar5 + 2; local_30 = puVar6; puVar2 = puVar5; } if (*(long *)puVar2 == 0) break; if (uVar1 < 0x29) { uVar3 = (ulong)uVar1; uVar1 = uVar1 + 8; local_38 = uVar1; puVar5 = puVar6; puVar6 = (uint *)((long)local_e8 + uVar3); } else { puVar5 = puVar6 + 2; local_30 = puVar5; } lVar4 = lVar4 + ((ulong)*puVar6 + 7 & 0x1fffffff8); } lVar4 = my_malloc(param_9,lVar4,param_10); if (lVar4 != 0) { local_30 = (uint *)&stack0x00000008; uVar1 = 0x10; uVar3 = 0x10; while( true ) { if ((uint)uVar3 < 0x29) { uVar1 = (uint)uVar3 + 8; puVar5 = (uint *)((long)local_e8 + uVar3); } else { puVar5 = local_30; local_30 = local_30 + 2; } if (*(long **)puVar5 == (long *)0x0) break; **(long **)puVar5 = lVar4; uVar3 = (ulong)uVar1; if (uVar3 < 0x29) { puVar5 = (uint *)((long)local_e8 + uVar3); uVar1 = uVar1 + 8; uVar3 = (ulong)uVar1; } else { puVar5 = local_30; local_30 = local_30 + 2; } lVar4 = lVar4 + ((ulong)*puVar5 + 7 & 0x1fffffff8); } } return; }
17,974
lre_is_space
bluesky950520[P]quickjs/libregexp.c
BOOL lre_is_space(int c) { int i, n, low, high; n = (countof(char_range_s) - 1) / 2; for(i = 0; i < n; i++) { low = char_range_s[2 * i + 1]; if (c < low) return FALSE; high = char_range_s[2 * i + 2]; if (c < high) return TRUE; } return FALSE; }
O1
c
lre_is_space: movl $0x1, %ecx leaq 0xee44(%rip), %rdx # 0xa3360 xorl %eax, %eax movzwl -0x2(%rdx,%rcx,4), %esi cmpl %edi, %esi jg 0x94538 movzwl (%rdx,%rcx,4), %esi cmpl %edi, %esi jg 0x94539 incq %rcx cmpq $0xb, %rcx jne 0x9451e retq movl $0x1, %eax retq
lre_is_space: mov ecx, 1 lea rdx, char_range_s xor eax, eax loc_9451E: movzx esi, word ptr [rdx+rcx*4-2] cmp esi, edi jg short locret_94538 movzx esi, word ptr [rdx+rcx*4] cmp esi, edi jg short loc_94539 inc rcx cmp rcx, 0Bh jnz short loc_9451E locret_94538: retn loc_94539: mov eax, 1 retn
long long lre_is_space(int a1) { long long v1; // rcx long long result; // rax v1 = 1LL; result = 0LL; while ( char_range_s[2 * v1 - 1] <= a1 ) { if ( char_range_s[2 * v1] > a1 ) return 1LL; if ( ++v1 == 11 ) return result; } return result; }
17,975
lre_is_space
bluesky950520[P]quickjs/libregexp.c
BOOL lre_is_space(int c) { int i, n, low, high; n = (countof(char_range_s) - 1) / 2; for(i = 0; i < n; i++) { low = char_range_s[2 * i + 1]; if (c < low) return FALSE; high = char_range_s[2 * i + 2]; if (c < high) return TRUE; } return FALSE; }
O2
c
lre_is_space: pushq $0x1 popq %rcx leaq 0xe98e(%rip), %rsi # 0x8a2a0 pushq $0x1 popq %rdx xorl %eax, %eax cmpq $0xb, %rcx je 0x7b935 movzwl -0x2(%rsi,%rcx,4), %r8d cmpl %edi, %r8d jg 0x7b935 movzwl (%rsi,%rcx,4), %eax incq %rcx cmpl %edi, %eax jbe 0x7b915 movl %edx, %eax retq
lre_is_space: push 1 pop rcx lea rsi, char_range_s push 1 pop rdx loc_7B915: xor eax, eax cmp rcx, 0Bh jz short locret_7B935 movzx r8d, word ptr [rsi+rcx*4-2] cmp r8d, edi jg short locret_7B935 movzx eax, word ptr [rsi+rcx*4] inc rcx cmp eax, edi jbe short loc_7B915 mov eax, edx locret_7B935: retn
long long lre_is_space(int a1) { long long v1; // rcx long long result; // rax unsigned int v3; // eax v1 = 1LL; while ( 1 ) { result = 0LL; if ( v1 == 11 || char_range_s[2 * v1 - 1] > a1 ) break; v3 = char_range_s[2 * v1++]; if ( v3 > a1 ) return 1LL; } return result; }
lre_is_space: PUSH 0x1 POP RCX LEA RSI,[0x18a2a0] PUSH 0x1 POP RDX LAB_0017b915: XOR EAX,EAX CMP RCX,0xb JZ 0x0017b935 MOVZX R8D,word ptr [RSI + RCX*0x4 + -0x2] CMP R8D,EDI JG 0x0017b935 MOVZX EAX,word ptr [RSI + RCX*0x4] INC RCX CMP EAX,EDI JBE 0x0017b915 MOV EAX,EDX LAB_0017b935: RET
int8 lre_is_space(uint param_1) { long lVar1; long lVar2; lVar2 = 1; while( true ) { if (lVar2 == 0xb) { return 0; } if ((int)param_1 < (int)(uint)*(ushort *)(&UNK_0018a29e + lVar2 * 4)) break; lVar1 = lVar2 * 2; lVar2 = lVar2 + 1; if (param_1 < (ushort)(&char_range_s)[lVar1]) { return 1; } } return 0; }
17,976
my_strerror
eloqsql/strings/my_vsnprintf.c
const char* my_strerror(char *buf, size_t len, int nr) { char *msg= NULL; buf[0]= '\0'; /* failsafe */ if (nr <= 0) { strmake(buf, (nr == 0 ? "Internal error/check (Not system error)" : "Internal error < 0 (Not system error)"), len-1); return buf; } /* These (handler-) error messages are shared by perror, as required by the principle of least surprise. */ if ((nr >= HA_ERR_FIRST) && (nr <= HA_ERR_LAST)) { msg= (char *) handler_error_messages[nr - HA_ERR_FIRST]; strmake(buf, msg, len - 1); } else { /* On Windows, do things the Windows way. On a system that supports both the GNU and the XSI variant, use whichever was configured (GNU); if this choice is not advertised, use the default (POSIX/XSI). Testing for __GNUC__ is not sufficient to determine whether this choice exists. */ #if defined(_WIN32) strerror_s(buf, len, nr); #elif ((defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE >= 200112L)) || \ (defined _XOPEN_SOURCE && (_XOPEN_SOURCE >= 600))) && \ ! defined _GNU_SOURCE strerror_r(nr, buf, len); /* I can build with or without GNU */ #elif defined(__GLIBC__) && defined (_GNU_SOURCE) char *r= strerror_r(nr, buf, len); if (r != buf) /* Want to help, GNU? */ strmake(buf, r, len - 1); /* Then don't. */ #else strerror_r(nr, buf, len); #endif } /* strerror() return values are implementation-dependent, so let's be pragmatic. */ if (!buf[0]) strmake(buf, "unknown error", len - 1); return buf; }
O0
c
my_strerror: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq $0x0, -0x28(%rbp) movq -0x10(%rbp), %rax movb $0x0, (%rax) cmpl $0x0, -0x1c(%rbp) jg 0x7d1ee movq -0x10(%rbp), %rdi movl -0x1c(%rbp), %ecx leaq 0x6bfc(%rip), %rsi # 0x83dc2 leaq 0x6bcd(%rip), %rax # 0x83d9a cmpl $0x0, %ecx cmoveq %rax, %rsi movq -0x18(%rbp), %rdx subq $0x1, %rdx callq 0x7de10 movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x7d28a cmpl $0x78, -0x1c(%rbp) jl 0x7d22c cmpl $0xc6, -0x1c(%rbp) jg 0x7d22c movl -0x1c(%rbp), %eax subl $0x78, %eax movslq %eax, %rcx leaq 0x310233(%rip), %rax # 0x38d440 movq (%rax,%rcx,8), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x18(%rbp), %rdx subq $0x1, %rdx callq 0x7de10 jmp 0x7d261 movl -0x1c(%rbp), %edi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x240d0 movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax cmpq -0x10(%rbp), %rax je 0x7d25f movq -0x10(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x18(%rbp), %rdx subq $0x1, %rdx callq 0x7de10 jmp 0x7d261 movq -0x10(%rbp), %rax cmpb $0x0, (%rax) jne 0x7d282 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rdx subq $0x1, %rdx leaq 0x6b6b(%rip), %rsi # 0x83de8 callq 0x7de10 movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_strerror: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_28], 0 mov rax, [rbp+var_10] mov byte ptr [rax], 0 cmp [rbp+var_1C], 0 jg short loc_7D1EE mov rdi, [rbp+var_10] mov ecx, [rbp+var_1C] lea rsi, aInternalError0; "Internal error < 0 (Not system error)" lea rax, aInternalErrorC; "Internal error/check (Not system error)" cmp ecx, 0 cmovz rsi, rax mov rdx, [rbp+var_18] sub rdx, 1 call strmake mov rax, [rbp+var_10] mov [rbp+var_8], rax jmp loc_7D28A loc_7D1EE: cmp [rbp+var_1C], 78h ; 'x' jl short loc_7D22C cmp [rbp+var_1C], 0C6h jg short loc_7D22C mov eax, [rbp+var_1C] sub eax, 78h ; 'x' movsxd rcx, eax lea rax, handler_error_messages mov rax, [rax+rcx*8] mov [rbp+var_28], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] mov rdx, [rbp+var_18] sub rdx, 1 call strmake jmp short loc_7D261 loc_7D22C: mov edi, [rbp+var_1C] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] call _strerror_r mov [rbp+var_30], rax mov rax, [rbp+var_30] cmp rax, [rbp+var_10] jz short loc_7D25F mov rdi, [rbp+var_10] mov rsi, [rbp+var_30] mov rdx, [rbp+var_18] sub rdx, 1 call strmake loc_7D25F: jmp short $+2 loc_7D261: mov rax, [rbp+var_10] cmp byte ptr [rax], 0 jnz short loc_7D282 mov rdi, [rbp+var_10] mov rdx, [rbp+var_18] sub rdx, 1 lea rsi, aUnknownError; "unknown error" call strmake loc_7D282: mov rax, [rbp+var_10] mov [rbp+var_8], rax loc_7D28A: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
_BYTE * my_strerror(_BYTE *a1, long long a2, int a3) { const char *v3; // rsi long long v5; // [rsp+0h] [rbp-30h] *a1 = 0; if ( a3 > 0 ) { if ( a3 < 120 || a3 > 198 ) { v5 = strerror_r((unsigned int)a3, a1, a2); if ( (_BYTE *)v5 != a1 ) strmake(a1, v5, a2 - 1); } else { strmake(a1, handler_error_messages[a3 - 120], a2 - 1); } if ( !*a1 ) strmake(a1, "unknown error", a2 - 1); return a1; } else { v3 = "Internal error < 0 (Not system error)"; if ( !a3 ) v3 = "Internal error/check (Not system error)"; strmake(a1, v3, a2 - 1); return a1; } }
my_strerror: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV qword ptr [RBP + -0x28],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0x0 CMP dword ptr [RBP + -0x1c],0x0 JG 0x0017d1ee MOV RDI,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x1c] LEA RSI,[0x183dc2] LEA RAX,[0x183d9a] CMP ECX,0x0 CMOVZ RSI,RAX MOV RDX,qword ptr [RBP + -0x18] SUB RDX,0x1 CALL 0x0017de10 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX JMP 0x0017d28a LAB_0017d1ee: CMP dword ptr [RBP + -0x1c],0x78 JL 0x0017d22c CMP dword ptr [RBP + -0x1c],0xc6 JG 0x0017d22c MOV EAX,dword ptr [RBP + -0x1c] SUB EAX,0x78 MOVSXD RCX,EAX LEA RAX,[0x48d440] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x18] SUB RDX,0x1 CALL 0x0017de10 JMP 0x0017d261 LAB_0017d22c: MOV EDI,dword ptr [RBP + -0x1c] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] CALL 0x001240d0 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x10] JZ 0x0017d25f MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x18] SUB RDX,0x1 CALL 0x0017de10 LAB_0017d25f: JMP 0x0017d261 LAB_0017d261: MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX],0x0 JNZ 0x0017d282 MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] SUB RDX,0x1 LEA RSI,[0x183de8] CALL 0x0017de10 LAB_0017d282: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX LAB_0017d28a: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
char * my_strerror(char *param_1,size_t param_2,int param_3) { char *pcVar1; *param_1 = '\0'; if (param_3 < 1) { pcVar1 = "Internal error < 0 (Not system error)"; if (param_3 == 0) { pcVar1 = "Internal error/check (Not system error)"; } strmake(param_1,pcVar1,param_2 - 1); } else { if ((param_3 < 0x78) || (0xc6 < param_3)) { pcVar1 = strerror_r(param_3,param_1,param_2); if (pcVar1 != param_1) { strmake(param_1,pcVar1,param_2 - 1); } } else { strmake(param_1,*(int8 *)(handler_error_messages + (long)(param_3 + -0x78) * 8), param_2 - 1); } if (*param_1 == '\0') { strmake(param_1,"unknown error",param_2 - 1); } } return param_1; }
17,977
bitmap_copy
eloqsql/mysys/my_bitmap.c
void bitmap_copy(MY_BITMAP *map, const MY_BITMAP *map2) { my_bitmap_map *to= map->bitmap, *from= map2->bitmap, *end; DBUG_ASSERT(map->bitmap); DBUG_ASSERT(map2->bitmap); DBUG_ASSERT(map->n_bits == map2->n_bits); end= map->last_word_ptr; while (to <= end) *to++ = *from++; }
O0
c
bitmap_copy: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) jmp 0xeeff4 jmp 0xeeff6 jmp 0xeeff8 jmp 0xeeffa jmp 0xeeffc movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax cmpq -0x28(%rbp), %rax ja 0xef036 movq -0x20(%rbp), %rax movq %rax, %rcx addq $0x4, %rcx movq %rcx, -0x20(%rbp) movl (%rax), %ecx movq -0x18(%rbp), %rax movq %rax, %rdx addq $0x4, %rdx movq %rdx, -0x18(%rbp) movl %ecx, (%rax) jmp 0xef008 popq %rbp retq nopl (%rax,%rax)
bitmap_copy: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_20], rax jmp short $+2 loc_EEFF4: jmp short $+2 loc_EEFF6: jmp short $+2 loc_EEFF8: jmp short $+2 loc_EEFFA: jmp short $+2 loc_EEFFC: mov rax, [rbp+var_8] mov rax, [rax+8] mov [rbp+var_28], rax loc_EF008: mov rax, [rbp+var_18] cmp rax, [rbp+var_28] ja short loc_EF036 mov rax, [rbp+var_20] mov rcx, rax add rcx, 4 mov [rbp+var_20], rcx mov ecx, [rax] mov rax, [rbp+var_18] mov rdx, rax add rdx, 4 mov [rbp+var_18], rdx mov [rax], ecx jmp short loc_EF008 loc_EF036: pop rbp retn
_DWORD * bitmap_copy(_QWORD *a1, int **a2) { _DWORD *result; // rax int *v3; // rax int v4; // ecx _DWORD *v5; // rax unsigned long long v6; // [rsp+0h] [rbp-28h] int *v7; // [rsp+8h] [rbp-20h] _DWORD *v8; // [rsp+10h] [rbp-18h] v8 = (_DWORD *)*a1; v7 = *a2; v6 = a1[1]; while ( 1 ) { result = v8; if ( (unsigned long long)v8 > v6 ) break; v3 = v7++; v4 = *v3; v5 = v8++; *v5 = v4; } return result; }
bitmap_copy: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX JMP 0x001eeff4 LAB_001eeff4: JMP 0x001eeff6 LAB_001eeff6: JMP 0x001eeff8 LAB_001eeff8: JMP 0x001eeffa LAB_001eeffa: JMP 0x001eeffc LAB_001eeffc: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x28],RAX LAB_001ef008: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x28] JA 0x001ef036 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,0x4 MOV qword ptr [RBP + -0x20],RCX MOV ECX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x18] MOV RDX,RAX ADD RDX,0x4 MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RAX],ECX JMP 0x001ef008 LAB_001ef036: POP RBP RET
void bitmap_copy(int8 *param_1,int8 *param_2) { int4 *puVar1; int4 *local_28; int4 *local_20; puVar1 = (int4 *)param_1[1]; local_28 = (int4 *)*param_2; local_20 = (int4 *)*param_1; while (local_20 <= puVar1) { *local_20 = *local_28; local_28 = local_28 + 1; local_20 = local_20 + 1; } return; }
17,978
parse_path_coordinates
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-path.c
static inline bool parse_path_coordinates(const char** begin, const char* end, float values[6], int offset, int count) { for(int i = 0; i < count; i++) { if(!plutovg_parse_number(begin, end, values + offset + i)) return false; plutovg_skip_ws_or_comma(begin, end, NULL); } return true; }
O0
c
parse_path_coordinates: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movl %r8d, -0x28(%rbp) movl $0x0, -0x2c(%rbp) movl -0x2c(%rbp), %eax cmpl -0x28(%rbp), %eax jge 0x63517 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movslq -0x24(%rbp), %rax shlq $0x2, %rax addq %rax, %rdx movslq -0x2c(%rbp), %rax shlq $0x2, %rax addq %rax, %rdx callq 0x635b0 testb $0x1, %al jne 0x634fb movb $0x0, -0x1(%rbp) jmp 0x6351b movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi xorl %eax, %eax movl %eax, %edx callq 0x639d0 movl -0x2c(%rbp), %eax addl $0x1, %eax movl %eax, -0x2c(%rbp) jmp 0x634c2 movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
parse_path_coordinates: 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_24], ecx mov [rbp+var_28], r8d mov [rbp+var_2C], 0 loc_634C2: mov eax, [rbp+var_2C] cmp eax, [rbp+var_28] jge short loc_63517 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] movsxd rax, [rbp+var_24] shl rax, 2 add rdx, rax movsxd rax, [rbp+var_2C] shl rax, 2 add rdx, rax call plutovg_parse_number_1 test al, 1 jnz short loc_634FB mov [rbp+var_1], 0 jmp short loc_6351B loc_634FB: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] xor eax, eax mov edx, eax call plutovg_skip_ws_or_comma_0 mov eax, [rbp+var_2C] add eax, 1 mov [rbp+var_2C], eax jmp short loc_634C2 loc_63517: mov [rbp+var_1], 1 loc_6351B: mov al, [rbp+var_1] and al, 1 add rsp, 30h pop rbp retn
char parse_path_coordinates(long long a1, long long a2, long long a3, int a4, int a5) { int i; // [rsp+4h] [rbp-2Ch] for ( i = 0; i < a5; ++i ) { if ( (plutovg_parse_number_1(a1, a2, 4LL * i + 4LL * a4 + a3) & 1) == 0 ) return 0; plutovg_skip_ws_or_comma_0(a1, a2, 0LL); } return 1; }
parse_path_coordinates: 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 dword ptr [RBP + -0x24],ECX MOV dword ptr [RBP + -0x28],R8D MOV dword ptr [RBP + -0x2c],0x0 LAB_001634c2: MOV EAX,dword ptr [RBP + -0x2c] CMP EAX,dword ptr [RBP + -0x28] JGE 0x00163517 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOVSXD RAX,dword ptr [RBP + -0x24] SHL RAX,0x2 ADD RDX,RAX MOVSXD RAX,dword ptr [RBP + -0x2c] SHL RAX,0x2 ADD RDX,RAX CALL 0x001635b0 TEST AL,0x1 JNZ 0x001634fb MOV byte ptr [RBP + -0x1],0x0 JMP 0x0016351b LAB_001634fb: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] XOR EAX,EAX MOV EDX,EAX CALL 0x001639d0 MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x001634c2 LAB_00163517: MOV byte ptr [RBP + -0x1],0x1 LAB_0016351b: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x30 POP RBP RET
int1 parse_path_coordinates(int8 param_1,int8 param_2,long param_3,int param_4,int param_5) { ulong uVar1; int local_34; local_34 = 0; while( true ) { if (param_5 <= local_34) { return 1; } uVar1 = plutovg_parse_number(param_1,param_2,param_3 + (long)param_4 * 4 + (long)local_34 * 4); if ((uVar1 & 1) == 0) break; plutovg_skip_ws_or_comma(param_1,param_2,0); local_34 = local_34 + 1; } return 0; }
17,979
parse_path_coordinates
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-path.c
static inline bool parse_path_coordinates(const char** begin, const char* end, float values[6], int offset, int count) { for(int i = 0; i < count; i++) { if(!plutovg_parse_number(begin, end, values + offset + i)) return false; plutovg_skip_ws_or_comma(begin, end, NULL); } return true; }
O1
c
parse_path_coordinates: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp testl %r8d, %r8d setle %bpl jle 0x2cb87 movq %rsi, %rbx movq %rdi, %r14 movl %ecx, %eax leaq (%rdx,%rax,4), %r15 movl %r8d, %eax movq %rax, 0x10(%rsp) leaq -0x2(%rsi), %rax movq %rax, 0x8(%rsp) xorl %r13d, %r13d movss 0x16817(%rip), %xmm6 # 0x430f4 movss 0x17077(%rip), %xmm7 # 0x4395c movabsq $0x100002600, %r12 # imm = 0x100002600 movq (%r14), %rax cmpq %rbx, %rax jae 0x2c90b movzbl (%rax), %ecx cmpl $0x2d, %ecx je 0x2c9dd cmpl $0x2b, %ecx jne 0x2c90b incq %rax movaps %xmm6, %xmm0 cmpq %rbx, %rax jae 0x2cb87 movb (%rax), %cl cmpb $0x2e, %cl setne %dl addb $-0x30, %cl cmpb $0xa, %cl setae %sil testb %sil, %dl jne 0x2cb87 xorps %xmm3, %xmm3 cmpb $0x9, %cl ja 0x2c973 movq %rax, %rcx notq %rcx addq %rbx, %rcx xorps %xmm2, %xmm2 movsbl (%rax), %edx addl $-0x30, %edx xorps %xmm1, %xmm1 cvtsi2ss %edx, %xmm1 mulss %xmm7, %xmm2 addss %xmm1, %xmm2 testq %rcx, %rcx je 0x2c978 movb 0x1(%rax), %dl incq %rax addb $-0x30, %dl decq %rcx cmpb $0xa, %dl jb 0x2c946 jmp 0x2c97b xorps %xmm2, %xmm2 jmp 0x2c97b movq %rbx, %rax cmpq %rbx, %rax jae 0x2c9f7 cmpb $0x2e, (%rax) jne 0x2c9f7 leaq 0x1(%rax), %rcx cmpq %rbx, %rcx jae 0x2cb87 movb (%rcx), %dl addb $-0x30, %dl cmpb $0x9, %dl ja 0x2cb87 movq 0x8(%rsp), %rdx subq %rax, %rdx xorps %xmm3, %xmm3 movaps %xmm6, %xmm1 movsbl (%rcx), %eax addl $-0x30, %eax xorps %xmm4, %xmm4 cvtsi2ss %eax, %xmm4 mulss %xmm7, %xmm3 addss %xmm4, %xmm3 mulss %xmm7, %xmm1 testq %rdx, %rdx je 0x2c9ed movb 0x1(%rcx), %al incq %rcx addb $-0x30, %al decq %rdx cmpb $0xa, %al jb 0x2c9ae jmp 0x2c9f0 incq %rax movss 0x16b48(%rip), %xmm0 # 0x43530 jmp 0x2c90e movq %rbx, %rcx divss %xmm1, %xmm3 movq %rcx, %rax xorps %xmm1, %xmm1 cmpq %rbx, %rax jae 0x2ca2d movzbl (%rax), %ecx orl $0x20, %ecx cmpl $0x65, %ecx jne 0x2ca2d leaq 0x1(%rax), %rcx cmpq %rbx, %rcx jae 0x2ca25 movb (%rcx), %dl addq $0x2, %rax cmpb $0x2b, %dl jne 0x2cb1d movq %rax, %rcx movaps %xmm6, %xmm4 jmp 0x2cb36 movaps %xmm6, %xmm4 movq %rax, (%r14) addss %xmm3, %xmm2 mulss %xmm2, %xmm0 movss %xmm0, (%r15,%r13,4) ucomiss 0x16ae4(%rip), %xmm1 # 0x4352c jne 0x2ca4c jnp 0x2ca74 mulss %xmm4, %xmm1 movaps %xmm7, %xmm0 callq 0xa500 movss 0x16efc(%rip), %xmm7 # 0x4395c movss 0x1668c(%rip), %xmm6 # 0x430f4 mulss (%r15,%r13,4), %xmm0 movss %xmm0, (%r15,%r13,4) movss (%r15,%r13,4), %xmm0 andps 0x16def(%rip), %xmm0 # 0x43870 movss 0x16ed7(%rip), %xmm1 # 0x43960 ucomiss %xmm0, %xmm1 jb 0x2cb87 movq (%r14), %rax movq %rax, %rcx cmpq %rbx, %rax setb %dl jae 0x2cac2 movb $0x1, %dl movq %rax, %rcx movzbl (%rcx), %esi cmpq $0x20, %rsi ja 0x2cac2 btq %rsi, %r12 jae 0x2cac2 incq %rcx cmpq %rbx, %rcx setb %dl jne 0x2caa5 movq %rbx, %rcx testb $0x1, %dl je 0x2cb01 xorl %edx, %edx cmpq %rbx, %rcx jae 0x2cad7 cmpb $0x2c, (%rcx) sete %dl addq %rdx, %rcx cmpq %rbx, %rcx setb %sil andb %dl, %sil cmpb $0x1, %sil jne 0x2cb01 movzbl (%rcx), %edx cmpq $0x20, %rdx ja 0x2cb01 btq %rdx, %r12 jae 0x2cb01 incq %rcx cmpq %rbx, %rcx jne 0x2cae7 movq %rbx, %rcx cmpq %rax, %rcx je 0x2cb09 movq %rcx, (%r14) incq %r13 cmpq 0x10(%rsp), %r13 setae %bpl jne 0x2c8ef jmp 0x2cb87 xorl %esi, %esi cmpb $0x2d, %dl sete %sil cmoveq %rax, %rcx leaq 0x1859f(%rip), %rax # 0x450d0 movss (%rax,%rsi,4), %xmm4 cmpq %rbx, %rcx jae 0x2cb87 movb (%rcx), %al addb $-0x30, %al cmpb $0x9, %al ja 0x2cb87 movq %rcx, %rax notq %rax addq %rbx, %rax movsbl (%rcx), %edx addl $-0x30, %edx xorps %xmm5, %xmm5 cvtsi2ss %edx, %xmm5 mulss %xmm7, %xmm1 addss %xmm5, %xmm1 testq %rax, %rax je 0x2cb7f movb 0x1(%rcx), %dl incq %rcx addb $-0x30, %dl decq %rax cmpb $0xa, %dl jb 0x2cb4c movq %rcx, %rax jmp 0x2ca30 movq %rbx, %rax jmp 0x2ca30 andb $0x1, %bpl movl %ebp, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
parse_path_coordinates: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h test r8d, r8d setle bpl jle loc_2CB87 mov rbx, rsi mov r14, rdi mov eax, ecx lea r15, [rdx+rax*4] mov eax, r8d mov [rsp+48h+var_38], rax lea rax, [rsi-2] mov [rsp+48h+var_40], rax xor r13d, r13d movss xmm6, cs:flt_430F4 movss xmm7, cs:dword_4395C mov r12, 100002600h loc_2C8EF: mov rax, [r14] cmp rax, rbx jnb short loc_2C90B movzx ecx, byte ptr [rax] cmp ecx, 2Dh ; '-' jz loc_2C9DD cmp ecx, 2Bh ; '+' jnz short loc_2C90B inc rax loc_2C90B: movaps xmm0, xmm6 loc_2C90E: cmp rax, rbx jnb loc_2CB87 mov cl, [rax] cmp cl, 2Eh ; '.' setnz dl add cl, 0D0h cmp cl, 0Ah setnb sil test dl, sil jnz loc_2CB87 xorps xmm3, xmm3 cmp cl, 9 ja short loc_2C973 mov rcx, rax not rcx add rcx, rbx xorps xmm2, xmm2 loc_2C946: movsx edx, byte ptr [rax] add edx, 0FFFFFFD0h xorps xmm1, xmm1 cvtsi2ss xmm1, edx mulss xmm2, xmm7 addss xmm2, xmm1 test rcx, rcx jz short loc_2C978 mov dl, [rax+1] inc rax add dl, 0D0h dec rcx cmp dl, 0Ah jb short loc_2C946 jmp short loc_2C97B loc_2C973: xorps xmm2, xmm2 jmp short loc_2C97B loc_2C978: mov rax, rbx loc_2C97B: cmp rax, rbx jnb short loc_2C9F7 cmp byte ptr [rax], 2Eh ; '.' jnz short loc_2C9F7 lea rcx, [rax+1] cmp rcx, rbx jnb loc_2CB87 mov dl, [rcx] add dl, 0D0h cmp dl, 9 ja loc_2CB87 mov rdx, [rsp+48h+var_40] sub rdx, rax xorps xmm3, xmm3 movaps xmm1, xmm6 loc_2C9AE: movsx eax, byte ptr [rcx] add eax, 0FFFFFFD0h xorps xmm4, xmm4 cvtsi2ss xmm4, eax mulss xmm3, xmm7 addss xmm3, xmm4 mulss xmm1, xmm7 test rdx, rdx jz short loc_2C9ED mov al, [rcx+1] inc rcx add al, 0D0h dec rdx cmp al, 0Ah jb short loc_2C9AE jmp short loc_2C9F0 loc_2C9DD: inc rax movss xmm0, cs:dword_43530 jmp loc_2C90E loc_2C9ED: mov rcx, rbx loc_2C9F0: divss xmm3, xmm1 mov rax, rcx loc_2C9F7: xorps xmm1, xmm1 cmp rax, rbx jnb short loc_2CA2D movzx ecx, byte ptr [rax] or ecx, 20h cmp ecx, 65h ; 'e' jnz short loc_2CA2D lea rcx, [rax+1] cmp rcx, rbx jnb short loc_2CA25 mov dl, [rcx] add rax, 2 cmp dl, 2Bh ; '+' jnz loc_2CB1D mov rcx, rax loc_2CA25: movaps xmm4, xmm6 jmp loc_2CB36 loc_2CA2D: movaps xmm4, xmm6 loc_2CA30: mov [r14], rax addss xmm2, xmm3 mulss xmm0, xmm2 movss dword ptr [r15+r13*4], xmm0 ucomiss xmm1, cs:dword_4352C jnz short loc_2CA4C jnp short loc_2CA74 loc_2CA4C: mulss xmm1, xmm4 movaps xmm0, xmm7 call _powf movss xmm7, cs:dword_4395C movss xmm6, cs:flt_430F4 mulss xmm0, dword ptr [r15+r13*4] movss dword ptr [r15+r13*4], xmm0 loc_2CA74: movss xmm0, dword ptr [r15+r13*4] andps xmm0, cs:xmmword_43870 movss xmm1, cs:dword_43960 ucomiss xmm1, xmm0 jb loc_2CB87 mov rax, [r14] mov rcx, rax cmp rax, rbx setb dl jnb short loc_2CAC2 mov dl, 1 mov rcx, rax loc_2CAA5: movzx esi, byte ptr [rcx] cmp rsi, 20h ; ' ' ja short loc_2CAC2 bt r12, rsi jnb short loc_2CAC2 inc rcx cmp rcx, rbx setb dl jnz short loc_2CAA5 mov rcx, rbx loc_2CAC2: test dl, 1 jz short loc_2CB01 xor edx, edx cmp rcx, rbx jnb short loc_2CAD7 cmp byte ptr [rcx], 2Ch ; ',' setz dl add rcx, rdx loc_2CAD7: cmp rcx, rbx setb sil and sil, dl cmp sil, 1 jnz short loc_2CB01 loc_2CAE7: movzx edx, byte ptr [rcx] cmp rdx, 20h ; ' ' ja short loc_2CB01 bt r12, rdx jnb short loc_2CB01 inc rcx cmp rcx, rbx jnz short loc_2CAE7 mov rcx, rbx loc_2CB01: cmp rcx, rax jz short loc_2CB09 mov [r14], rcx loc_2CB09: inc r13 cmp r13, [rsp+48h+var_38] setnb bpl jnz loc_2C8EF jmp short loc_2CB87 loc_2CB1D: xor esi, esi cmp dl, 2Dh ; '-' setz sil cmovz rcx, rax lea rax, flt_450D0 movss xmm4, dword ptr [rax+rsi*4] loc_2CB36: cmp rcx, rbx jnb short loc_2CB87 mov al, [rcx] add al, 0D0h cmp al, 9 ja short loc_2CB87 mov rax, rcx not rax add rax, rbx loc_2CB4C: movsx edx, byte ptr [rcx] add edx, 0FFFFFFD0h xorps xmm5, xmm5 cvtsi2ss xmm5, edx mulss xmm1, xmm7 addss xmm1, xmm5 test rax, rax jz short loc_2CB7F mov dl, [rcx+1] inc rcx add dl, 0D0h dec rax cmp dl, 0Ah jb short loc_2CB4C mov rax, rcx jmp loc_2CA30 loc_2CB7F: mov rax, rbx jmp loc_2CA30 loc_2CB87: and bpl, 1 mov eax, ebp add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long parse_path_coordinates( unsigned long long *a1, unsigned long long a2, unsigned long long a3, unsigned long long a4, int a5) { unsigned int v5; // ebp unsigned long long v6; // rbx unsigned long long v7; // r15 long long v8; // r13 long long v9; // r12 unsigned long long v10; // rax float v11; // xmm0_4 float v12; // xmm3_4 float v13; // xmm2_4 char v14; // dl float v15; // xmm3_4 float v16; // xmm1_4 char v17; // al float v18; // xmm1_4 char v19; // dl _BYTE *v20; // rax float v21; // xmm4_4 bool v22; // dl unsigned long long v23; // rax char v24; // dl unsigned long long v26; // [rsp+8h] [rbp-40h] unsigned long long v27; // [rsp+10h] [rbp-38h] LOBYTE(v5) = a5 <= 0; if ( a5 > 0 ) { v6 = a2; v7 = a3 + 4LL * (unsigned int)a4; v27 = (unsigned int)a5; v26 = a2 - 2; v8 = 0LL; v9 = 0x100002600LL; while ( 1 ) { v10 = *a1; if ( *a1 < v6 ) { a4 = *(unsigned __int8 *)v10; if ( (_DWORD)a4 == 45 ) { ++v10; v11 = -1.0; goto LABEL_8; } if ( (_DWORD)a4 == 43 ) ++v10; } v11 = 1.0; LABEL_8: if ( v10 >= v6 ) break; LOBYTE(a3) = *(_BYTE *)v10 != 46; LOBYTE(a4) = *(_BYTE *)v10 - 48; LOBYTE(a2) = (unsigned __int8)a4 >= 0xAu; if ( (((unsigned __int8)a4 >= 0xAu) & (unsigned __int8)a3) != 0 ) break; v12 = 0.0; if ( (unsigned __int8)a4 > 9u ) { v13 = 0.0; } else { a4 = v6 + ~v10; v13 = 0.0; while ( 1 ) { a3 = (unsigned int)(*(char *)v10 - 48); v13 = (float)(v13 * 10.0) + (float)(int)a3; if ( !a4 ) break; v14 = *(_BYTE *)++v10; LOBYTE(a3) = v14 - 48; --a4; if ( (unsigned __int8)a3 >= 0xAu ) goto LABEL_17; } v10 = v6; } LABEL_17: if ( v10 < v6 && *(_BYTE *)v10 == 46 ) { a4 = v10 + 1; if ( v10 + 1 >= v6 || (unsigned __int8)(*(_BYTE *)a4 - 48) > 9u ) break; a3 = v26 - v10; v15 = 0.0; v16 = 1.0; while ( 1 ) { v15 = (float)(v15 * 10.0) + (float)(*(char *)a4 - 48); v16 = v16 * 10.0; if ( !a3 ) break; v17 = *(_BYTE *)++a4; --a3; if ( (unsigned __int8)(v17 - 48) >= 0xAu ) goto LABEL_27; } a4 = v6; LABEL_27: v12 = v15 / v16; v10 = a4; } v18 = 0.0; if ( v10 < v6 ) { a4 = *(unsigned __int8 *)v10 | 0x20u; if ( (_DWORD)a4 == 101 ) { a4 = v10 + 1; if ( v10 + 1 >= v6 ) goto LABEL_33; v19 = *(_BYTE *)a4; v20 = (_BYTE *)(v10 + 2); if ( *(_BYTE *)a4 == 43 ) { a4 = (unsigned long long)v20; LABEL_33: v21 = 1.0; } else { a2 = v19 == 45; if ( v19 == 45 ) a4 = (unsigned long long)v20; v21 = flt_450D0[a2]; } if ( a4 >= v6 || (unsigned __int8)(*(_BYTE *)a4 - 48) > 9u ) break; v23 = v6 + ~a4; while ( 1 ) { a3 = (unsigned int)(*(char *)a4 - 48); v18 = (float)(v18 * 10.0) + (float)(int)a3; if ( !v23 ) break; v24 = *(_BYTE *)++a4; LOBYTE(a3) = v24 - 48; --v23; if ( (unsigned __int8)a3 >= 0xAu ) { v10 = a4; goto LABEL_35; } } v10 = v6; goto LABEL_35; } } v21 = 1.0; LABEL_35: *a1 = v10; *(float *)(v7 + 4 * v8) = v11 * (float)(v13 + v12); if ( v18 != 0.0 ) *(float *)(v7 + 4 * v8) = powf(a1, a2, a3, a4, COERCE_DOUBLE(1092616192LL), v18 * v21) * *(float *)(v7 + 4 * v8); if ( fabs(*(float *)(v7 + 4 * v8)) <= 3.4028235e38 ) { a4 = *a1; v22 = *a1 < v6; if ( *a1 < v6 ) { v22 = 1; a4 = *a1; while ( 1 ) { a2 = *(unsigned __int8 *)a4; if ( a2 > 0x20 || !_bittest64(&v9, a2) ) break; v22 = ++a4 < v6; if ( a4 == v6 ) { a4 = v6; break; } } } if ( v22 ) { a3 = 0LL; if ( a4 < v6 ) { LOBYTE(a3) = *(_BYTE *)a4 == 44; a4 += a3; } if ( ((unsigned __int8)a3 & (a4 < v6)) == 1 ) { while ( 1 ) { a3 = *(unsigned __int8 *)a4; if ( a3 > 0x20 || !_bittest64(&v9, a3) ) break; if ( ++a4 == v6 ) { a4 = v6; break; } } } } if ( a4 != *a1 ) *a1 = a4; LOBYTE(v5) = ++v8 >= v27; if ( v8 != v27 ) continue; } break; } } LOBYTE(v5) = v5 & 1; return v5; }
parse_path_coordinates: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 TEST R8D,R8D SETLE BPL JLE 0x0012cb87 MOV RBX,RSI MOV R14,RDI MOV EAX,ECX LEA R15,[RDX + RAX*0x4] MOV EAX,R8D MOV qword ptr [RSP + 0x10],RAX LEA RAX,[RSI + -0x2] MOV qword ptr [RSP + 0x8],RAX XOR R13D,R13D MOVSS XMM6,dword ptr [0x001430f4] MOVSS XMM7,dword ptr [0x0014395c] MOV R12,0x100002600 LAB_0012c8ef: MOV RAX,qword ptr [R14] CMP RAX,RBX JNC 0x0012c90b MOVZX ECX,byte ptr [RAX] CMP ECX,0x2d JZ 0x0012c9dd CMP ECX,0x2b JNZ 0x0012c90b INC RAX LAB_0012c90b: MOVAPS XMM0,XMM6 LAB_0012c90e: CMP RAX,RBX JNC 0x0012cb87 MOV CL,byte ptr [RAX] CMP CL,0x2e SETNZ DL ADD CL,0xd0 CMP CL,0xa SETNC SIL TEST DL,SIL JNZ 0x0012cb87 XORPS XMM3,XMM3 CMP CL,0x9 JA 0x0012c973 MOV RCX,RAX NOT RCX ADD RCX,RBX XORPS XMM2,XMM2 LAB_0012c946: MOVSX EDX,byte ptr [RAX] ADD EDX,-0x30 XORPS XMM1,XMM1 CVTSI2SS XMM1,EDX MULSS XMM2,XMM7 ADDSS XMM2,XMM1 TEST RCX,RCX JZ 0x0012c978 MOV DL,byte ptr [RAX + 0x1] INC RAX ADD DL,0xd0 DEC RCX CMP DL,0xa JC 0x0012c946 JMP 0x0012c97b LAB_0012c973: XORPS XMM2,XMM2 JMP 0x0012c97b LAB_0012c978: MOV RAX,RBX LAB_0012c97b: CMP RAX,RBX JNC 0x0012c9f7 CMP byte ptr [RAX],0x2e JNZ 0x0012c9f7 LEA RCX,[RAX + 0x1] CMP RCX,RBX JNC 0x0012cb87 MOV DL,byte ptr [RCX] ADD DL,0xd0 CMP DL,0x9 JA 0x0012cb87 MOV RDX,qword ptr [RSP + 0x8] SUB RDX,RAX XORPS XMM3,XMM3 MOVAPS XMM1,XMM6 LAB_0012c9ae: MOVSX EAX,byte ptr [RCX] ADD EAX,-0x30 XORPS XMM4,XMM4 CVTSI2SS XMM4,EAX MULSS XMM3,XMM7 ADDSS XMM3,XMM4 MULSS XMM1,XMM7 TEST RDX,RDX JZ 0x0012c9ed MOV AL,byte ptr [RCX + 0x1] INC RCX ADD AL,0xd0 DEC RDX CMP AL,0xa JC 0x0012c9ae JMP 0x0012c9f0 LAB_0012c9dd: INC RAX MOVSS XMM0,dword ptr [0x00143530] JMP 0x0012c90e LAB_0012c9ed: MOV RCX,RBX LAB_0012c9f0: DIVSS XMM3,XMM1 MOV RAX,RCX LAB_0012c9f7: XORPS XMM1,XMM1 CMP RAX,RBX JNC 0x0012ca2d MOVZX ECX,byte ptr [RAX] OR ECX,0x20 CMP ECX,0x65 JNZ 0x0012ca2d LEA RCX,[RAX + 0x1] CMP RCX,RBX JNC 0x0012ca25 MOV DL,byte ptr [RCX] ADD RAX,0x2 CMP DL,0x2b JNZ 0x0012cb1d MOV RCX,RAX LAB_0012ca25: MOVAPS XMM4,XMM6 JMP 0x0012cb36 LAB_0012ca2d: MOVAPS XMM4,XMM6 LAB_0012ca30: MOV qword ptr [R14],RAX ADDSS XMM2,XMM3 MULSS XMM0,XMM2 MOVSS dword ptr [R15 + R13*0x4],XMM0 UCOMISS XMM1,dword ptr [0x0014352c] JNZ 0x0012ca4c JNP 0x0012ca74 LAB_0012ca4c: MULSS XMM1,XMM4 MOVAPS XMM0,XMM7 CALL 0x0010a500 MOVSS XMM7,dword ptr [0x0014395c] MOVSS XMM6,dword ptr [0x001430f4] MULSS XMM0,dword ptr [R15 + R13*0x4] MOVSS dword ptr [R15 + R13*0x4],XMM0 LAB_0012ca74: MOVSS XMM0,dword ptr [R15 + R13*0x4] ANDPS XMM0,xmmword ptr [0x00143870] MOVSS XMM1,dword ptr [0x00143960] UCOMISS XMM1,XMM0 JC 0x0012cb87 MOV RAX,qword ptr [R14] MOV RCX,RAX CMP RAX,RBX SETC DL JNC 0x0012cac2 MOV DL,0x1 MOV RCX,RAX LAB_0012caa5: MOVZX ESI,byte ptr [RCX] CMP RSI,0x20 JA 0x0012cac2 BT R12,RSI JNC 0x0012cac2 INC RCX CMP RCX,RBX SETC DL JNZ 0x0012caa5 MOV RCX,RBX LAB_0012cac2: TEST DL,0x1 JZ 0x0012cb01 XOR EDX,EDX CMP RCX,RBX JNC 0x0012cad7 CMP byte ptr [RCX],0x2c SETZ DL ADD RCX,RDX LAB_0012cad7: CMP RCX,RBX SETC SIL AND SIL,DL CMP SIL,0x1 JNZ 0x0012cb01 LAB_0012cae7: MOVZX EDX,byte ptr [RCX] CMP RDX,0x20 JA 0x0012cb01 BT R12,RDX JNC 0x0012cb01 INC RCX CMP RCX,RBX JNZ 0x0012cae7 MOV RCX,RBX LAB_0012cb01: CMP RCX,RAX JZ 0x0012cb09 MOV qword ptr [R14],RCX LAB_0012cb09: INC R13 CMP R13,qword ptr [RSP + 0x10] SETNC BPL JNZ 0x0012c8ef JMP 0x0012cb87 LAB_0012cb1d: XOR ESI,ESI CMP DL,0x2d SETZ SIL CMOVZ RCX,RAX LEA RAX,[0x1450d0] MOVSS XMM4,dword ptr [RAX + RSI*0x4] LAB_0012cb36: CMP RCX,RBX JNC 0x0012cb87 MOV AL,byte ptr [RCX] ADD AL,0xd0 CMP AL,0x9 JA 0x0012cb87 MOV RAX,RCX NOT RAX ADD RAX,RBX LAB_0012cb4c: MOVSX EDX,byte ptr [RCX] ADD EDX,-0x30 XORPS XMM5,XMM5 CVTSI2SS XMM5,EDX MULSS XMM1,XMM7 ADDSS XMM1,XMM5 TEST RAX,RAX JZ 0x0012cb7f MOV DL,byte ptr [RCX + 0x1] INC RCX ADD DL,0xd0 DEC RAX CMP DL,0xa JC 0x0012cb4c MOV RAX,RCX JMP 0x0012ca30 LAB_0012cb7f: MOV RAX,RBX JMP 0x0012ca30 LAB_0012cb87: AND BPL,0x1 MOV EAX,EBP ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ ulong parse_path_coordinates (int8 *param_1,byte *param_2,long param_3,ulong param_4,uint param_5) { byte *pbVar1; byte *pbVar2; byte *pbVar3; byte bVar4; byte *pbVar5; int8 unaff_RBP; ulong uVar6; bool bVar7; float fVar8; float fVar9; float fVar10; float fVar11; float fVar12; float fVar13; float __x; bVar7 = (int)param_5 < 1; if ((int)param_5 < 1) { LAB_0012cb87: return CONCAT71((int7)((ulong)unaff_RBP >> 8),bVar7) & 0xffffffff; } param_3 = param_3 + (param_4 & 0xffffffff) * 4; uVar6 = 0; fVar13 = DAT_001430f4; __x = DAT_0014395c; do { pbVar2 = (byte *)*param_1; fVar8 = fVar13; if (pbVar2 < param_2) { if (*pbVar2 == 0x2d) { pbVar2 = pbVar2 + 1; fVar8 = DAT_00143530; } else if (*pbVar2 == 0x2b) { pbVar2 = pbVar2 + 1; } } if ((param_2 <= pbVar2) || (bVar4 = *pbVar2 - 0x30, *pbVar2 != 0x2e && 9 < bVar4)) goto LAB_0012cb87; fVar12 = 0.0; if (bVar4 < 10) { pbVar5 = param_2 + ~(ulong)pbVar2; fVar11 = 0.0; pbVar3 = pbVar2; do { fVar11 = fVar11 * __x + (float)((char)*pbVar3 + -0x30); pbVar2 = param_2; if (pbVar5 == (byte *)0x0) break; pbVar1 = pbVar3 + 1; pbVar2 = pbVar3 + 1; pbVar5 = pbVar5 + -1; pbVar3 = pbVar2; } while ((byte)(*pbVar1 - 0x30) < 10); } else { fVar11 = 0.0; } if ((pbVar2 < param_2) && (*pbVar2 == 0x2e)) { pbVar3 = pbVar2 + 1; if ((param_2 <= pbVar3) || (9 < (byte)(*pbVar3 - 0x30))) goto LAB_0012cb87; pbVar5 = param_2 + (-2 - (long)pbVar2); fVar12 = 0.0; fVar9 = fVar13; do { fVar12 = fVar12 * __x + (float)((char)*pbVar3 + -0x30); fVar9 = fVar9 * __x; pbVar2 = param_2; if (pbVar5 == (byte *)0x0) break; pbVar1 = pbVar3 + 1; pbVar2 = pbVar3 + 1; pbVar5 = pbVar5 + -1; pbVar3 = pbVar2; } while ((byte)(*pbVar1 - 0x30) < 10); fVar12 = fVar12 / fVar9; } fVar10 = 0.0; fVar9 = fVar13; if ((pbVar2 < param_2) && ((*pbVar2 | 0x20) == 0x65)) { pbVar3 = pbVar2 + 1; pbVar5 = pbVar3; if (pbVar3 < param_2) { bVar4 = *pbVar3; pbVar5 = pbVar2 + 2; if (bVar4 != 0x2b) { if (bVar4 == 0x2d) { pbVar3 = pbVar5; } pbVar5 = pbVar3; fVar9 = *(float *)(&DAT_001450d0 + (ulong)(bVar4 == 0x2d) * 4); } } if ((param_2 <= pbVar5) || (9 < (byte)(*pbVar5 - 0x30))) goto LAB_0012cb87; pbVar3 = param_2 + ~(ulong)pbVar5; do { fVar10 = fVar10 * __x + (float)((char)*pbVar5 + -0x30); pbVar2 = param_2; if (pbVar3 == (byte *)0x0) break; pbVar1 = pbVar5 + 1; pbVar2 = pbVar5 + 1; pbVar3 = pbVar3 + -1; pbVar5 = pbVar2; } while ((byte)(*pbVar1 - 0x30) < 10); } *param_1 = pbVar2; *(float *)(param_3 + uVar6 * 4) = fVar8 * (fVar11 + fVar12); if ((fVar10 != DAT_0014352c) || (NAN(fVar10) || NAN(DAT_0014352c))) { fVar8 = powf(__x,fVar10 * fVar9); __x = DAT_0014395c; fVar13 = DAT_001430f4; *(float *)(param_3 + uVar6 * 4) = fVar8 * *(float *)(param_3 + uVar6 * 4); } if (DAT_00143960 < (float)(*(uint *)(param_3 + uVar6 * 4) & _DAT_00143870)) goto LAB_0012cb87; pbVar2 = (byte *)*param_1; bVar7 = pbVar2 < param_2; pbVar3 = pbVar2; if (bVar7) { bVar7 = true; pbVar5 = pbVar2; do { pbVar3 = pbVar5; if ((0x20 < (ulong)*pbVar5) || ((0x100002600U >> ((ulong)*pbVar5 & 0x3f) & 1) == 0)) break; pbVar5 = pbVar5 + 1; bVar7 = pbVar5 < param_2; pbVar3 = param_2; } while (pbVar5 != param_2); } pbVar5 = pbVar3; if (bVar7) { bVar7 = false; if (pbVar3 < param_2) { bVar7 = *pbVar3 == 0x2c; pbVar3 = pbVar3 + bVar7; } pbVar5 = pbVar3; if ((bool)(pbVar3 < param_2 & bVar7)) { do { pbVar5 = pbVar3; if ((0x20 < (ulong)*pbVar3) || ((0x100002600U >> ((ulong)*pbVar3 & 0x3f) & 1) == 0)) break; pbVar3 = pbVar3 + 1; pbVar5 = param_2; } while (pbVar3 != param_2); } } if (pbVar5 != pbVar2) { *param_1 = pbVar5; } uVar6 = uVar6 + 1; bVar7 = param_5 <= uVar6; if (uVar6 == param_5) goto LAB_0012cb87; } while( true ); }
17,980
print_defaults
eloqsql/mysys/my_default.c
void print_defaults(const char *conf_file, const char **groups) { const char **groups_save= groups; my_print_default_files(conf_file); fputs("The following groups are read:",stdout); for ( ; *groups ; groups++) { fputc(' ',stdout); fputs(*groups,stdout); } if (my_defaults_group_suffix) { groups= groups_save; for ( ; *groups ; groups++) { fputc(' ',stdout); fputs(*groups,stdout); fputs(my_defaults_group_suffix,stdout); } } puts("\nThe following options may be given as the first argument:\n\ --print-defaults Print the program argument list and exit.\n\ --no-defaults Don't read default options from any option file.\n\ The following specify which files/extra groups are read (specified before remaining options):\n\ --defaults-file=# Only read default options from the given file #.\n\ --defaults-extra-file=# Read this file after the global files are read.\n\ --defaults-group-suffix=# Additionally read default groups with # appended as a suffix."); }
O3
c
print_defaults: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx callq 0x63bc3 movq 0x2ce1b1(%rip), %r14 # 0x331f90 movq (%r14), %rsi leaq 0x32c56(%rip), %rdi # 0x96a3f callq 0x28460 cmpq $0x0, (%rbx) je 0x63e1b leaq 0x8(%rbx), %r15 movq (%r14), %rsi movl $0x20, %edi callq 0x28510 movq -0x8(%r15), %rdi movq (%r14), %rsi callq 0x28460 cmpq $0x0, (%r15) leaq 0x8(%r15), %r15 jne 0x63df8 leaq 0x34fc6e(%rip), %r15 # 0x3b3a90 cmpq $0x0, (%r15) je 0x63e60 cmpq $0x0, (%rbx) je 0x63e60 addq $0x8, %rbx movq (%r14), %rsi movl $0x20, %edi callq 0x28510 movq -0x8(%rbx), %rdi movq (%r14), %rsi callq 0x28460 movq (%r15), %rdi movq (%r14), %rsi callq 0x28460 cmpq $0x0, (%rbx) leaq 0x8(%rbx), %rbx jne 0x63e32 leaq 0x32bf7(%rip), %rdi # 0x96a5e addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x28670
print_defaults: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rsi call my_print_default_files mov r14, cs:stdout_ptr mov rsi, [r14] lea rdi, aTheFollowingGr; "The following groups are read:" call _fputs cmp qword ptr [rbx], 0 jz short loc_63E1B lea r15, [rbx+8] loc_63DF8: mov rsi, [r14] mov edi, 20h ; ' ' call _fputc mov rdi, [r15-8] mov rsi, [r14] call _fputs cmp qword ptr [r15], 0 lea r15, [r15+8] jnz short loc_63DF8 loc_63E1B: lea r15, my_defaults_group_suffix cmp qword ptr [r15], 0 jz short loc_63E60 cmp qword ptr [rbx], 0 jz short loc_63E60 add rbx, 8 loc_63E32: mov rsi, [r14] mov edi, 20h ; ' ' call _fputc mov rdi, [rbx-8] mov rsi, [r14] call _fputs mov rdi, [r15] mov rsi, [r14] call _fputs cmp qword ptr [rbx], 0 lea rbx, [rbx+8] jnz short loc_63E32 loc_63E60: lea rdi, aTheFollowingOp; "\nThe following options may be given as"... add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _puts
long long print_defaults(_BYTE *a1, _QWORD *a2) { _QWORD *v2; // r15 bool v3; // zf _QWORD *v4; // rbx my_print_default_files(a1); fputs("The following groups are read:", stdout); if ( *a2 ) { v2 = a2 + 1; do { fputc(32LL, stdout); fputs(*(v2 - 1), stdout); v3 = *v2++ == 0LL; } while ( !v3 ); } if ( my_defaults_group_suffix && *a2 ) { v4 = a2 + 1; do { fputc(32LL, stdout); fputs(*(v4 - 1), stdout); fputs(my_defaults_group_suffix, stdout); v3 = *v4++ == 0LL; } while ( !v3 ); } return puts( "\n" "The following options may be given as the first argument:\n" "--print-defaults Print the program argument list and exit.\n" "--no-defaults Don't read default options from any option file.\n" "The following specify which files/extra groups are read (specified before remaining options):\n" "--defaults-file=# Only read default options from the given file #.\n" "--defaults-extra-file=# Read this file after the global files are read.\n" "--defaults-group-suffix=# Additionally read default groups with # appended as a suffix."); }
print_defaults: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI CALL 0x00163bc3 MOV R14,qword ptr [0x00431f90] MOV RSI,qword ptr [R14] LEA RDI,[0x196a3f] CALL 0x00128460 CMP qword ptr [RBX],0x0 JZ 0x00163e1b LEA R15,[RBX + 0x8] LAB_00163df8: MOV RSI,qword ptr [R14] MOV EDI,0x20 CALL 0x00128510 MOV RDI,qword ptr [R15 + -0x8] MOV RSI,qword ptr [R14] CALL 0x00128460 CMP qword ptr [R15],0x0 LEA R15,[R15 + 0x8] JNZ 0x00163df8 LAB_00163e1b: LEA R15,[0x4b3a90] CMP qword ptr [R15],0x0 JZ 0x00163e60 CMP qword ptr [RBX],0x0 JZ 0x00163e60 ADD RBX,0x8 LAB_00163e32: MOV RSI,qword ptr [R14] MOV EDI,0x20 CALL 0x00128510 MOV RDI,qword ptr [RBX + -0x8] MOV RSI,qword ptr [R14] CALL 0x00128460 MOV RDI,qword ptr [R15] MOV RSI,qword ptr [R14] CALL 0x00128460 CMP qword ptr [RBX],0x0 LEA RBX,[RBX + 0x8] JNZ 0x00163e32 LAB_00163e60: LEA RDI,[0x196a5e] ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x00128670
void print_defaults(int8 param_1,long *param_2) { long lVar1; int *puVar2; long *plVar3; my_print_default_files(); puVar2 = PTR_stdout_00431f90; fputs("The following groups are read:",*(FILE **)PTR_stdout_00431f90); if (*param_2 != 0) { plVar3 = param_2 + 1; do { fputc(0x20,*(FILE **)puVar2); fputs((char *)plVar3[-1],*(FILE **)puVar2); lVar1 = *plVar3; plVar3 = plVar3 + 1; } while (lVar1 != 0); } if ((my_defaults_group_suffix != (char *)0x0) && (*param_2 != 0)) { param_2 = param_2 + 1; do { fputc(0x20,*(FILE **)puVar2); fputs((char *)param_2[-1],*(FILE **)puVar2); fputs(my_defaults_group_suffix,*(FILE **)puVar2); lVar1 = *param_2; param_2 = param_2 + 1; } while (lVar1 != 0); } puts( "\nThe following options may be given as the first argument:\n--print-defaults Print the program argument list and exit.\n--no-defaults Don\'t read default options from any option file.\nThe following specify which files/extra groups are read (specified before remaining options):\n--defaults-file=# Only read default options from the given file #.\n--defaults-extra-file=# Read this file after the global files are read.\n--defaults-group-suffix=# Additionally read default groups with # appended as a suffix." ); return; }
17,981
mariadb_compression_algorithm_str
eloqsql/libmariadb/libmariadb/ma_compress.c
const char *_mariadb_compression_algorithm_str(enum enum_ma_compression_algorithm algorithm) { switch(algorithm) { case COMPRESSION_NONE: case COMPRESSION_ZLIB: case COMPRESSION_ZSTD: return compression_algorithms[algorithm] ; default: return compression_algorithms[COMPRESSION_UNKNOWN]; } }
O3
c
mariadb_compression_algorithm_str: pushq %rbp movq %rsp, %rbp movl %edi, %eax shlq $0x3, %rax cmpl $0x3, %edi leaq 0x2bca8(%rip), %rcx # 0x4cda0 movl $0x18, %edx cmovbq %rax, %rdx movq (%rcx,%rdx), %rax popq %rbp retq
_mariadb_compression_algorithm_str: push rbp mov rbp, rsp mov eax, edi shl rax, 3 cmp edi, 3 lea rcx, compression_algorithms mov edx, 18h cmovb rdx, rax mov rax, [rcx+rdx] pop rbp retn
char * mariadb_compression_algorithm_str(unsigned int a1) { long long v1; // rdx v1 = 3LL; if ( a1 < 3 ) v1 = a1; return compression_algorithms[v1]; }
_mariadb_compression_algorithm_str: PUSH RBP MOV RBP,RSP MOV EAX,EDI SHL RAX,0x3 CMP EDI,0x3 LEA RCX,[0x14cda0] MOV EDX,0x18 CMOVC RDX,RAX MOV RAX,qword ptr [RCX + RDX*0x1] POP RBP RET
int8 _mariadb_compression_algorithm_str(uint param_1) { long lVar1; lVar1 = 0x18; if (param_1 < 3) { lVar1 = (ulong)param_1 << 3; } return *(int8 *)(compression_algorithms + lVar1); }
17,982
bootrom_func_lookup(memory_access&, unsigned short)
msxemulator/build_O0/_deps/picotool-src/main.cpp
uint32_t bootrom_func_lookup(memory_access& access, uint16_t tag) { model_t model = get_model(access); // we are only used on RP2040 if (model != rp2040) { fail(ERROR_INCOMPATIBLE, "RP2040 BOOT ROM not found"); } // dereference the table pointer uint32_t table_entry = access.read_short(BOOTROM_MAGIC_ADDR + 4); uint16_t entry_tag; do { entry_tag = access.read_short(table_entry); if (entry_tag == tag) { // 16 bit symbol is next return access.read_short(table_entry+2); } table_entry += 4; } while (entry_tag); fail(ERROR_INCOMPATIBLE, "Function not found in BOOT ROM"); return 0; }
O0
cpp
bootrom_func_lookup(memory_access&, unsigned short): subq $0x28, %rsp movw %si, %ax movq %rdi, 0x18(%rsp) movw %ax, 0x16(%rsp) movq 0x18(%rsp), %rdi callq 0x33130 movl %eax, 0x10(%rsp) cmpl $0x0, 0x10(%rsp) je 0x330a9 movl $0xfffffffd, %edi # imm = 0xFFFFFFFD leaq 0x13ce31(%rip), %rsi # 0x16fed3 movb $0x0, %al callq 0x118b80 movq 0x18(%rsp), %rdi movl $0x14, %esi callq 0x5ace0 movl %eax, 0xc(%rsp) movq 0x18(%rsp), %rdi movl 0xc(%rsp), %esi callq 0x5ace0 movw %ax, 0xa(%rsp) movzwl 0xa(%rsp), %eax movzwl 0x16(%rsp), %ecx cmpl %ecx, %eax jne 0x330f4 movq 0x18(%rsp), %rdi movl 0xc(%rsp), %esi addl $0x2, %esi callq 0x5ace0 movl %eax, 0x24(%rsp) jmp 0x33122 movl 0xc(%rsp), %eax addl $0x4, %eax movl %eax, 0xc(%rsp) cmpw $0x0, 0xa(%rsp) jne 0x330bc movl $0xfffffffd, %edi # imm = 0xFFFFFFFD leaq 0x13cdda(%rip), %rsi # 0x16feed movb $0x0, %al callq 0x118b80 movl $0x0, 0x24(%rsp) movl 0x24(%rsp), %eax addq $0x28, %rsp retq nopl (%rax,%rax)
_Z19bootrom_func_lookupR13memory_accesst: sub rsp, 28h mov ax, si mov [rsp+28h+var_10], rdi mov [rsp+28h+var_12], ax mov rdi, [rsp+28h+var_10]; memory_access * call _ZL9get_modelR13memory_access; get_model(memory_access &) mov [rsp+28h+var_18], eax cmp [rsp+28h+var_18], 0 jz short loc_330A9 mov edi, 0FFFFFFFDh; int lea rsi, aRp2040BootRomN; "RP2040 BOOT ROM not found" mov al, 0 call _Z4failiPKcz; fail(int,char const*,...) loc_330A9: mov rdi, [rsp+28h+var_10]; this mov esi, 14h; unsigned int call _ZN13memory_access10read_shortEj; memory_access::read_short(uint) mov [rsp+28h+var_1C], eax loc_330BC: mov rdi, [rsp+28h+var_10]; this mov esi, [rsp+28h+var_1C]; unsigned int call _ZN13memory_access10read_shortEj; memory_access::read_short(uint) mov [rsp+28h+var_1E], ax movzx eax, [rsp+28h+var_1E] movzx ecx, [rsp+28h+var_12] cmp eax, ecx jnz short loc_330F4 mov rdi, [rsp+28h+var_10]; this mov esi, [rsp+28h+var_1C] add esi, 2; unsigned int call _ZN13memory_access10read_shortEj; memory_access::read_short(uint) mov [rsp+28h+var_4], eax jmp short loc_33122 loc_330F4: mov eax, [rsp+28h+var_1C] add eax, 4 mov [rsp+28h+var_1C], eax cmp [rsp+28h+var_1E], 0 jnz short loc_330BC mov edi, 0FFFFFFFDh; int lea rsi, aFunctionNotFou; "Function not found in BOOT ROM" mov al, 0 call _Z4failiPKcz; fail(int,char const*,...) mov [rsp+28h+var_4], 0 loc_33122: mov eax, [rsp+28h+var_4] add rsp, 28h retn
long long bootrom_func_lookup(memory_access *a1, __int16 a2) { __int16 v3; // [rsp+Ah] [rbp-1Eh] unsigned int i; // [rsp+Ch] [rbp-1Ch] if ( (unsigned int)get_model(a1) ) fail(-3, "RP2040 BOOT ROM not found"); for ( i = memory_access::read_short(a1, 0x14u); ; i += 4 ) { v3 = memory_access::read_short(a1, i); if ( v3 == a2 ) break; if ( !v3 ) fail(-3, "Function not found in BOOT ROM"); } return (unsigned int)memory_access::read_short(a1, i + 2); }
bootrom_func_lookup: SUB RSP,0x28 MOV AX,SI MOV qword ptr [RSP + 0x18],RDI MOV word ptr [RSP + 0x16],AX MOV RDI,qword ptr [RSP + 0x18] CALL 0x00133130 MOV dword ptr [RSP + 0x10],EAX CMP dword ptr [RSP + 0x10],0x0 JZ 0x001330a9 MOV EDI,0xfffffffd LEA RSI,[0x26fed3] MOV AL,0x0 CALL 0x00218b80 LAB_001330a9: MOV RDI,qword ptr [RSP + 0x18] MOV ESI,0x14 CALL 0x0015ace0 MOV dword ptr [RSP + 0xc],EAX LAB_001330bc: MOV RDI,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RSP + 0xc] CALL 0x0015ace0 MOV word ptr [RSP + 0xa],AX MOVZX EAX,word ptr [RSP + 0xa] MOVZX ECX,word ptr [RSP + 0x16] CMP EAX,ECX JNZ 0x001330f4 MOV RDI,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RSP + 0xc] ADD ESI,0x2 CALL 0x0015ace0 MOV dword ptr [RSP + 0x24],EAX JMP 0x00133122 LAB_001330f4: MOV EAX,dword ptr [RSP + 0xc] ADD EAX,0x4 MOV dword ptr [RSP + 0xc],EAX CMP word ptr [RSP + 0xa],0x0 JNZ 0x001330bc MOV EDI,0xfffffffd LEA RSI,[0x26feed] MOV AL,0x0 CALL 0x00218b80 MOV dword ptr [RSP + 0x24],0x0 LAB_00133122: MOV EAX,dword ptr [RSP + 0x24] ADD RSP,0x28 RET
/* bootrom_func_lookup(memory_access&, unsigned short) */ int4 bootrom_func_lookup(memory_access *param_1,ushort param_2) { ushort uVar1; int iVar2; int4 uVar3; uint local_1c; iVar2 = get_model(param_1); if (iVar2 != 0) { fail(-3,"RP2040 BOOT ROM not found"); } local_1c = memory_access::read_short(param_1,0x14); do { uVar1 = memory_access::read_short(param_1,local_1c); if (uVar1 == param_2) { uVar3 = memory_access::read_short(param_1,local_1c + 2); return uVar3; } local_1c = local_1c + 4; } while (uVar1 != 0); fail(-3,"Function not found in BOOT ROM"); return 0; }
17,983
common_arg::common_arg(std::initializer_list<char const*> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&))
llama.cpp/common/arg.h
common_arg( const std::initializer_list<const char *> & args, const std::string & help, void (*handler)(common_params & params) ) : args(args), help(help), handler_void(handler) {}
O3
c
common_arg::common_arg(std::initializer_list<char const*> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&)): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r13 movq %rdi, %rbx leaq 0xc(%rsp), %rsi movl $0x0, (%rsi) leaq 0xb(%rsp), %rcx leaq 0xa(%rsp), %r8 movl $0x1, %edx callq 0x82f10 leaq 0x38(%rbx), %rax xorl %ecx, %ecx movq %rcx, 0x40(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x30(%rbx) movq %rax, 0x48(%rbx) movq %rax, 0x50(%rbx) movq %rcx, 0x58(%rbx) leaq 0x60(%rbx), %r12 movq (%r13), %rsi movq 0x8(%r13), %rdx leaq 0x9(%rsp), %rcx movq %r12, %rdi callq 0x82f92 leaq 0x90(%rbx), %rdi leaq 0xa0(%rbx), %rax xorps %xmm0, %xmm0 movups %xmm0, 0x78(%rbx) movq $0x0, 0x88(%rbx) movq %rax, 0x90(%rbx) movq (%r15), %rsi movq 0x8(%r15), %rdx addq %rsi, %rdx callq 0x2784c movb $0x0, 0xb0(%rbx) movq %r14, 0xb8(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0xc0(%rbx) movq $0x0, 0xd0(%rbx) addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r14 movq (%r12), %rdi testq %rdi, %rdi je 0x63596 movq 0x70(%rbx), %rsi subq %rdi, %rsi callq 0x20190 jmp 0x63596 movq %rax, %r14 leaq 0x30(%rbx), %rdi callq 0x82fd8 movq %rbx, %rdi callq 0x82fd8 movq %r14, %rdi callq 0x20b00 nop
_ZN10common_argC2ERKSt16initializer_listIPKcERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPFvR13common_paramsE: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov r14, rcx mov r15, rdx mov r13, rsi mov rbx, rdi lea rsi, [rsp+38h+var_2C] mov dword ptr [rsi], 0 lea rcx, [rsp+38h+var_2D] lea r8, [rsp+38h+var_2E] mov edx, 1 call _ZNSt3setI13llama_exampleSt4lessIS0_ESaIS0_EEC2ESt16initializer_listIS0_ERKS2_RKS3_; std::set<llama_example>::set(std::initializer_list<llama_example>,std::less<llama_example> const&,std::allocator<llama_example> const&) lea rax, [rbx+38h] xor ecx, ecx mov [rbx+40h], rcx xorps xmm0, xmm0 movups xmmword ptr [rbx+30h], xmm0 mov [rbx+48h], rax mov [rbx+50h], rax mov [rbx+58h], rcx lea r12, [rbx+60h] mov rsi, [r13+0] mov rdx, [r13+8] lea rcx, [rsp+38h+var_2F] mov rdi, r12 call _ZNSt6vectorIPKcSaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<char const*>::vector(std::initializer_list<char const*>,std::allocator<char const*> const&) lea rdi, [rbx+90h] lea rax, [rbx+0A0h] xorps xmm0, xmm0 movups xmmword ptr [rbx+78h], xmm0 mov qword ptr [rbx+88h], 0 mov [rbx+90h], rax mov rsi, [r15] mov rdx, [r15+8] add rdx, rsi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov byte ptr [rbx+0B0h], 0 mov [rbx+0B8h], r14 xorps xmm0, xmm0 movups xmmword ptr [rbx+0C0h], xmm0 mov qword ptr [rbx+0D0h], 0 add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r14, rax mov rdi, [r12]; void * test rdi, rdi jz short loc_63596 mov rsi, [rbx+70h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_63596 mov r14, rax loc_63596: lea rdi, [rbx+30h] call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree() mov rdi, rbx call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree() mov rdi, r14 call __Unwind_Resume
long long common_arg::common_arg(long long a1, _QWORD *a2, long long a3, long long a4) { long long result; // rax char v7; // [rsp+9h] [rbp-2Fh] BYREF char v8; // [rsp+Ah] [rbp-2Eh] BYREF char v9; // [rsp+Bh] [rbp-2Dh] BYREF _DWORD v10[11]; // [rsp+Ch] [rbp-2Ch] BYREF v10[0] = 0; std::set<llama_example>::set(a1, v10, 1LL, &v9, &v8); *(_QWORD *)(a1 + 64) = 0LL; *(_OWORD *)(a1 + 48) = 0LL; *(_QWORD *)(a1 + 72) = a1 + 56; *(_QWORD *)(a1 + 80) = a1 + 56; *(_QWORD *)(a1 + 88) = 0LL; std::vector<char const*>::vector(a1 + 96, *a2, a2[1], &v7); *(_OWORD *)(a1 + 120) = 0LL; *(_QWORD *)(a1 + 136) = 0LL; *(_QWORD *)(a1 + 144) = a1 + 160; result = std::string::_M_construct<char *>(a1 + 144, *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8)); *(_BYTE *)(a1 + 176) = 0; *(_QWORD *)(a1 + 184) = a4; *(_OWORD *)(a1 + 192) = 0LL; *(_QWORD *)(a1 + 208) = 0LL; return result; }
common_arg: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R14,RCX MOV R15,RDX MOV R13,RSI MOV RBX,RDI LEA RSI,[RSP + 0xc] MOV dword ptr [RSI],0x0 LEA RCX,[RSP + 0xb] LEA R8,[RSP + 0xa] MOV EDX,0x1 CALL 0x00182f10 LEA RAX,[RBX + 0x38] XOR ECX,ECX MOV qword ptr [RBX + 0x40],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOV qword ptr [RBX + 0x48],RAX MOV qword ptr [RBX + 0x50],RAX MOV qword ptr [RBX + 0x58],RCX LEA R12,[RBX + 0x60] MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] LAB_00163505: LEA RCX,[RSP + 0x9] MOV RDI,R12 CALL 0x00182f92 LEA RDI,[RBX + 0x90] LEA RAX,[RBX + 0xa0] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x78],XMM0 MOV qword ptr [RBX + 0x88],0x0 MOV qword ptr [RBX + 0x90],RAX MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] ADD RDX,RSI LAB_00163543: CALL 0x0012784c LAB_00163548: MOV byte ptr [RBX + 0xb0],0x0 MOV qword ptr [RBX + 0xb8],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0xc0],XMM0 MOV qword ptr [RBX + 0xd0],0x0 ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* common_arg::common_arg(std::initializer_list<char const*> const&, std::__cxx11::string const&, void (*)(common_params&)) */ void __thiscall common_arg::common_arg (common_arg *this,initializer_list *param_1,string *param_2, _func_void_common_params_ptr *param_3) { int1 local_2f; int1 local_2e; int1 local_2d; int4 local_2c; local_2c = 0; std::set<llama_example,std::less<llama_example>,std::allocator<llama_example>>::set (this,&local_2c,1,&local_2d,&local_2e); *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(common_arg **)(this + 0x48) = this + 0x38; *(common_arg **)(this + 0x50) = this + 0x38; *(int8 *)(this + 0x58) = 0; /* try { // try from 00163505 to 00163511 has its CatchHandler @ 00163593 */ std::vector<char_const*,std::allocator<char_const*>>::vector ((vector<char_const*,std::allocator<char_const*>> *)(this + 0x60),*(int8 *)param_1 ,*(int8 *)(param_1 + 8),&local_2f); *(int8 *)(this + 0x78) = 0; *(int8 *)(this + 0x80) = 0; *(int8 *)(this + 0x88) = 0; *(common_arg **)(this + 0x90) = this + 0xa0; /* try { // try from 00163543 to 00163547 has its CatchHandler @ 00163579 */ std::__cxx11::string::_M_construct<char*> (this + 0x90,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2); this[0xb0] = (common_arg)0x0; *(_func_void_common_params_ptr **)(this + 0xb8) = param_3; *(int8 *)(this + 0xc0) = 0; *(int8 *)(this + 200) = 0; *(int8 *)(this + 0xd0) = 0; return; }
17,984
minja::Value::set(minja::Value const&, minja::Value const&)
llama.cpp/common/minja/minja.hpp
void set(const Value& key, const Value& value) { if (!object_) throw std::runtime_error("Value is not an object: " + dump()); if (!key.is_hashable()) throw std::runtime_error("Unashable type: " + dump()); (*object_)[key.primitive_] = value; }
O3
cpp
minja::Value::set(minja::Value const&, minja::Value const&): pushq %rbp pushq %r14 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 movq 0x20(%rdi), %rdi testq %rdi, %rdi je 0xc0997 cmpq $0x0, 0x10(%rsi) jne 0xc09f4 cmpq $0x0, 0x20(%rsi) jne 0xc09f4 cmpq $0x0, 0x30(%rsi) jne 0xc09f4 movq %rdx, %rbx addq $0x40, %rsi callq 0xc0ad0 movq %rax, %r14 movq 0x10(%rbx), %rax movq %rax, 0x10(%r14) leaq 0x18(%r14), %rdi leaq 0x18(%rbx), %rsi callq 0xbe352 movq 0x20(%rbx), %rax movq %rax, 0x20(%r14) leaq 0x28(%r14), %rdi leaq 0x28(%rbx), %rsi callq 0xbe352 movq 0x30(%rbx), %rax movq %rax, 0x30(%r14) leaq 0x38(%r14), %rdi leaq 0x38(%rbx), %rsi callq 0xbe352 addq $0x40, %rbx leaq 0x20(%rsp), %rdi movq %rbx, %rsi callq 0x8944c addq $0x40, %r14 leaq 0x20(%rsp), %rbx movq %r14, %rdi movq %rbx, %rsi callq 0x8736a movq %rbx, %rdi xorl %esi, %esi callq 0x851fe movq %rbx, %rdi callq 0x89918 addq $0x40, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x10, %edi callq 0x21630 movq %rax, %rbx movq %rsp, %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0xb6084 leaq 0x60e1b(%rip), %rsi # 0x1217d8 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0xaf924 movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x21450 xorl %ebp, %ebp movq 0xa45dd(%rip), %rsi # 0x164fc0 movq 0xa458e(%rip), %rdx # 0x164f78 movq %rbx, %rdi callq 0x21a50 jmp 0xc0a4f movl $0x10, %edi callq 0x21630 movq %rax, %rbx movq %rsp, %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0xb6084 leaq 0x60d34(%rip), %rsi # 0x12174e leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0xaf924 movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x21450 xorl %ebp, %ebp movq 0xa4580(%rip), %rsi # 0x164fc0 movq 0xa4531(%rip), %rdx # 0x164f78 movq %rbx, %rdi callq 0x21a50 jmp 0xc0a53 jmp 0xc0a93 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xc0a71 movq 0x30(%rsp), %rsi incq %rsi callq 0x21170 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xc0a8c movq 0x10(%rsp), %rsi incq %rsi callq 0x21170 testb %bpl, %bpl jne 0xc0ab8 jmp 0xc0ac0 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xc0ab8 movq 0x10(%rsp), %rsi incq %rsi callq 0x21170 jmp 0xc0ab8 jmp 0xc0ab5 movq %rax, %r14 movq %rbx, %rdi callq 0x21f00 movq %r14, %rdi callq 0x21af0 movq %rax, %rdi callq 0x27a0f
_ZN5minja5Value3setERKS0_S2_: push rbp push r14 push rbx sub rsp, 40h mov r14, rdi mov rdi, [rdi+20h] test rdi, rdi jz loc_C0997 cmp qword ptr [rsi+10h], 0 jnz loc_C09F4 cmp qword ptr [rsi+20h], 0 jnz loc_C09F4 cmp qword ptr [rsi+30h], 0 jnz loc_C09F4 mov rbx, rdx add rsi, 40h ; '@' call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixERSJ_; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::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&) mov r14, rax mov rax, [rbx+10h] mov [r14+10h], rax lea rdi, [r14+18h] lea rsi, [rbx+18h] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEaSERKS2_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(std::__shared_count<(__gnu_cxx::_Lock_policy)2> const&) mov rax, [rbx+20h] mov [r14+20h], rax lea rdi, [r14+28h] lea rsi, [rbx+28h] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEaSERKS2_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(std::__shared_count<(__gnu_cxx::_Lock_policy)2> const&) mov rax, [rbx+30h] mov [r14+30h], rax lea rdi, [r14+38h] lea rsi, [rbx+38h] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEaSERKS2_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(std::__shared_count<(__gnu_cxx::_Lock_policy)2> const&) add rbx, 40h ; '@' lea rdi, [rsp+58h+var_38] mov rsi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) add r14, 40h ; '@' lea rbx, [rsp+58h+var_38] mov rdi, r14 mov rsi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>) mov rdi, rbx xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() add rsp, 40h pop rbx pop r14 pop rbp retn loc_C0997: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, rsp mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aValueIsNotAnOb; "Value is not an object: " lea rdi, [rsp+58h+var_38] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+58h+var_38] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_C0A4F loc_C09F4: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, rsp mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aUnashableType; "Unashable type: " lea rdi, [rsp+58h+var_38] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+58h+var_38] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_C0A4F: jmp short loc_C0A53 jmp short loc_C0A93 loc_C0A53: mov r14, rax lea rax, [rsp+58h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_C0A71 mov rsi, [rsp+58h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C0A71: lea rax, [rsp+58h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_C0A8C mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C0A8C: test bpl, bpl jnz short loc_C0AB8 jmp short loc_C0AC0 loc_C0A93: mov r14, rax lea rax, [rsp+58h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_C0AB8 mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_C0AB8 jmp short $+2 loc_C0AB5: mov r14, rax loc_C0AB8: mov rdi, rbx; void * call ___cxa_free_exception loc_C0AC0: mov rdi, r14 call __Unwind_Resume mov rdi, rax call __clang_call_terminate
long long minja::Value::set(minja::Value *this, const minja::Value *a2, const minja::Value *a3) { long long v4; // rdi long long v6; // r14 void *exception; // rbx void *v9; // rbx _BYTE v10[16]; // [rsp+0h] [rbp-58h] BYREF _QWORD v11[2]; // [rsp+20h] [rbp-38h] BYREF v4 = *((_QWORD *)this + 4); if ( !v4 ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v10, (long long)this, 0xFFFFFFFF, 0); std::operator+<char>(v11, (long long)"Value is not an object: ", (long long)v10); std::runtime_error::runtime_error(exception, v11); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( *((_QWORD *)a2 + 2) || *((_QWORD *)a2 + 4) || *((_QWORD *)a2 + 6) ) { v9 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v10, (long long)this, 0xFFFFFFFF, 0); std::operator+<char>(v11, (long long)"Unashable type: ", (long long)v10); std::runtime_error::runtime_error(v9, v11); __cxa_throw( v9, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v6 = 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>>>::operator[]( v4, (char *)a2 + 64); *(_QWORD *)(v6 + 16) = *((_QWORD *)a3 + 2); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=( (volatile signed __int32 **)(v6 + 24), (volatile signed __int32 **)a3 + 3); *(_QWORD *)(v6 + 32) = *((_QWORD *)a3 + 4); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=( (volatile signed __int32 **)(v6 + 40), (volatile signed __int32 **)a3 + 5); *(_QWORD *)(v6 + 48) = *((_QWORD *)a3 + 6); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=( (volatile signed __int32 **)(v6 + 56), (volatile signed __int32 **)a3 + 7); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( (unsigned __int8 *)v11, (unsigned __int8 *)a3 + 64); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=( v6 + 64, (long long)v11); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v11); return nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v11); }
set: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RDI MOV RDI,qword ptr [RDI + 0x20] TEST RDI,RDI JZ 0x001c0997 CMP qword ptr [RSI + 0x10],0x0 JNZ 0x001c09f4 CMP qword ptr [RSI + 0x20],0x0 JNZ 0x001c09f4 CMP qword ptr [RSI + 0x30],0x0 JNZ 0x001c09f4 MOV RBX,RDX ADD RSI,0x40 CALL 0x001c0ad0 MOV R14,RAX MOV RAX,qword ptr [RBX + 0x10] MOV qword ptr [R14 + 0x10],RAX LEA RDI,[R14 + 0x18] LEA RSI,[RBX + 0x18] CALL 0x001be352 MOV RAX,qword ptr [RBX + 0x20] MOV qword ptr [R14 + 0x20],RAX LEA RDI,[R14 + 0x28] LEA RSI,[RBX + 0x28] CALL 0x001be352 MOV RAX,qword ptr [RBX + 0x30] MOV qword ptr [R14 + 0x30],RAX LEA RDI,[R14 + 0x38] LEA RSI,[RBX + 0x38] CALL 0x001be352 ADD RBX,0x40 LAB_001c095b: LEA RDI,[RSP + 0x20] MOV RSI,RBX CALL 0x0018944c LAB_001c0968: ADD R14,0x40 LEA RBX,[RSP + 0x20] MOV RDI,R14 MOV RSI,RBX CALL 0x0018736a MOV RDI,RBX XOR ESI,ESI CALL 0x001851fe MOV RDI,RBX CALL 0x00189918 ADD RSP,0x40 POP RBX POP R14 POP RBP RET LAB_001c0997: MOV EDI,0x10 CALL 0x00121630 MOV RBX,RAX LAB_001c09a4: MOV RDI,RSP MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x001b6084 LAB_001c09b6: LEA RSI,[0x2217d8] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x001af924 MOV BPL,0x1 LAB_001c09cd: LEA RSI,[RSP + 0x20] MOV RDI,RBX CALL 0x00121450 XOR EBP,EBP MOV RSI,qword ptr [0x00264fc0] MOV RDX,qword ptr [0x00264f78] MOV RDI,RBX CALL 0x00121a50 LAB_001c09f4: MOV EDI,0x10 CALL 0x00121630 MOV RBX,RAX LAB_001c0a01: MOV RDI,RSP MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x001b6084 LAB_001c0a13: LEA RSI,[0x22174e] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x001af924 MOV BPL,0x1 LAB_001c0a2a: LEA RSI,[RSP + 0x20] MOV RDI,RBX CALL 0x00121450 XOR EBP,EBP MOV RSI,qword ptr [0x00264fc0] MOV RDX,qword ptr [0x00264f78] MOV RDI,RBX CALL 0x00121a50
/* minja::Value::set(minja::Value const&, minja::Value const&) */ void __thiscall minja::Value::set(Value *this,Value *param_1,Value *param_2) { long lVar1; runtime_error *prVar2; int1 auStack_58 [32]; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> local_38 [32]; if (*(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 + 0x20) == (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>>> *)0x0) { prVar2 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001c09a4 to 001c09b5 has its CatchHandler @ 001c0ab5 */ dump_abi_cxx11_((int)auStack_58,SUB81(this,0)); /* try { // try from 001c09b6 to 001c09c9 has its CatchHandler @ 001c0a93 */ std::operator+((char *)local_38,(string *)"Value is not an object: "); /* try { // try from 001c09cd to 001c09f1 has its CatchHandler @ 001c0a53 */ std::runtime_error::runtime_error(prVar2,(string *)local_38); /* WARNING: Subroutine does not return */ __cxa_throw(prVar2,PTR_typeinfo_00264fc0,PTR__runtime_error_00264f78); } if (((*(long *)(param_1 + 0x10) == 0) && (*(long *)(param_1 + 0x20) == 0)) && (*(long *)(param_1 + 0x30) == 0)) { lVar1 = 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>>> ::operator[](*(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 + 0x20),(basic_json *)(param_1 + 0x40)); *(int8 *)(lVar1 + 0x10) = *(int8 *)(param_2 + 0x10); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator= ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(lVar1 + 0x18), (__shared_count *)(param_2 + 0x18)); *(int8 *)(lVar1 + 0x20) = *(int8 *)(param_2 + 0x20); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator= ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(lVar1 + 0x28), (__shared_count *)(param_2 + 0x28)); *(int8 *)(lVar1 + 0x30) = *(int8 *)(param_2 + 0x30); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator= ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(lVar1 + 0x38), (__shared_count *)(param_2 + 0x38)); /* try { // try from 001c095b to 001c0967 has its CatchHandler @ 001c0ac8 */ nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(local_38,(basic_json *)(param_2 + 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> ::operator=((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)(lVar1 + 0x40),(data *)local_38); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81((data *)local_38,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)local_38); return; } prVar2 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001c0a01 to 001c0a12 has its CatchHandler @ 001c0ab3 */ dump_abi_cxx11_((int)auStack_58,SUB81(this,0)); /* try { // try from 001c0a13 to 001c0a26 has its CatchHandler @ 001c0a51 */ std::operator+((char *)local_38,(string *)"Unashable type: "); /* try { // try from 001c0a2a to 001c0a4e has its CatchHandler @ 001c0a4f */ std::runtime_error::runtime_error(prVar2,(string *)local_38); /* WARNING: Subroutine does not return */ __cxa_throw(prVar2,PTR_typeinfo_00264fc0,PTR__runtime_error_00264f78); }
17,985
inline_mysql_file_sync
eloqsql/include/mysql/psi/mysql_file.h
static inline int inline_mysql_file_sync( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File fd, myf flags) { int result= 0; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, fd, PSI_FILE_SYNC); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); result= my_sync(fd, flags); PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); return result; } #endif result= my_sync(fd, flags); return result; }
O3
c
inline_mysql_file_sync: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, %rbx movl %esi, %r14d movl %edi, %r12d leaq 0x350dda(%rip), %r13 # 0x3880c0 movq (%r13), %rax leaq -0x70(%rbp), %rdi movl $0x10, %edx callq *0x158(%rax) testq %rax, %rax jne 0x3731c movl %r14d, %edi movq %rbx, %rsi callq 0xa2380 movl %eax, %ebx movl %ebx, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r15 movq (%r13), %rax leaq 0xa35be(%rip), %rdx # 0xda8e8 movq %r15, %rdi xorl %esi, %esi movl %r12d, %ecx callq *0x210(%rax) movl %r14d, %edi movq %rbx, %rsi callq 0xa2380 movl %eax, %ebx movq (%r13), %rax movq %r15, %rdi xorl %esi, %esi callq *0x218(%rax) jmp 0x3730b
inline_mysql_file_sync: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov rbx, rdx mov r14d, esi mov r12d, edi lea r13, PSI_server mov rax, [r13+0] lea rdi, [rbp+var_70] mov edx, 10h call qword ptr [rax+158h] test rax, rax jnz short loc_3731C mov edi, r14d mov rsi, rbx call my_sync mov ebx, eax loc_3730B: mov eax, ebx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3731C: mov r15, rax mov rax, [r13+0] lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r15 xor esi, esi mov ecx, r12d call qword ptr [rax+210h] mov edi, r14d mov rsi, rbx call my_sync mov ebx, eax mov rax, [r13+0] mov rdi, r15 xor esi, esi call qword ptr [rax+218h] jmp short loc_3730B
long long inline_mysql_file_sync(unsigned int a1, long long a2, long long a3) { long long v4; // rax unsigned int v5; // ebx long long v7; // r15 _BYTE v8[112]; // [rsp+0h] [rbp-70h] BYREF v4 = ((long long ( *)(_BYTE *, long long, long long))PSI_server[43])(v8, a2, 16LL); if ( v4 ) { v7 = v4; ((void ( *)(long long, _QWORD, const char *, _QWORD))PSI_server[66])( v4, 0LL, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_extra.c", a1); v5 = my_sync((unsigned int)a2, a3); ((void ( *)(long long, _QWORD))PSI_server[67])(v7, 0LL); } else { return (unsigned int)my_sync((unsigned int)a2, a3); } return v5; }
inline_mysql_file_sync: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV RBX,RDX MOV R14D,ESI MOV R12D,EDI LEA R13,[0x4880c0] MOV RAX,qword ptr [R13] LEA RDI,[RBP + -0x70] MOV EDX,0x10 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0013731c MOV EDI,R14D MOV RSI,RBX CALL 0x001a2380 MOV EBX,EAX LAB_0013730b: MOV EAX,EBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013731c: MOV R15,RAX MOV RAX,qword ptr [R13] LEA RDX,[0x1da8e8] MOV RDI,R15 XOR ESI,ESI MOV ECX,R12D CALL qword ptr [RAX + 0x210] MOV EDI,R14D MOV RSI,RBX CALL 0x001a2380 MOV EBX,EAX MOV RAX,qword ptr [R13] MOV RDI,R15 XOR ESI,ESI CALL qword ptr [RAX + 0x218] JMP 0x0013730b
int4 inline_mysql_file_sync(int4 param_1,ulong param_2,int8 param_3) { int4 uVar1; long lVar2; int1 local_78 [72]; lVar2 = (**(code **)(PSI_server + 0x158))(local_78,param_2,0x10); if (lVar2 == 0) { uVar1 = my_sync(param_2 & 0xffffffff,param_3); } else { (**(code **)(PSI_server + 0x210)) (lVar2,0,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_extra.c",param_1); uVar1 = my_sync(param_2 & 0xffffffff,param_3); (**(code **)(PSI_server + 0x218))(lVar2,0); } return uVar1; }
17,986
func_uni_big5_onechar
eloqsql/strings/ctype-big5.c
static int func_uni_big5_onechar(int code){ if ((code>=0x00A2)&&(code<=0x00F7)) return(tab_uni_big50[code-0x00A2]); if ((code>=0x02C7)&&(code<=0x0451)) return(tab_uni_big51[code-0x02C7]); if ((code>=0x2013)&&(code<=0x22BF)) return(tab_uni_big52[code-0x2013]); if ((code>=0x2460)&&(code<=0x2642)) return(tab_uni_big53[code-0x2460]); if ((code>=0x3000)&&(code<=0x3129)) return(tab_uni_big54[code-0x3000]); if ((code>=0x32A3)&&(code<=0x32A3)) return(tab_uni_big55[code-0x32A3]); if ((code>=0x338E)&&(code<=0x33D5)) return(tab_uni_big56[code-0x338E]); if ((code>=0x4E00)&&(code<=0x9483)) return(tab_uni_big57[code-0x4E00]); if ((code>=0x9577)&&(code<=0x9FA4)) return(tab_uni_big58[code-0x9577]); if ((code>=0xFA0C)&&(code<=0xFA0D)) return(tab_uni_big59[code-0xFA0C]); if ((code>=0xFE30)&&(code<=0xFFFD)) return(tab_uni_big510[code-0xFE30]); return(0); }
O0
c
func_uni_big5_onechar: pushq %rbp movq %rsp, %rbp movl %edi, -0x8(%rbp) cmpl $0xa2, -0x8(%rbp) jl 0xd88a7 cmpl $0xf7, -0x8(%rbp) jg 0xd88a7 movl -0x8(%rbp), %eax subl $0xa2, %eax movslq %eax, %rcx leaq 0x5ae45(%rip), %rax # 0x1336e0 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0xd8a85 cmpl $0x2c7, -0x8(%rbp) # imm = 0x2C7 jl 0xd88d7 cmpl $0x451, -0x8(%rbp) # imm = 0x451 jg 0xd88d7 movl -0x8(%rbp), %eax subl $0x2c7, %eax # imm = 0x2C7 movslq %eax, %rcx leaq 0x5aec5(%rip), %rax # 0x133790 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0xd8a85 cmpl $0x2013, -0x8(%rbp) # imm = 0x2013 jl 0xd8907 cmpl $0x22bf, -0x8(%rbp) # imm = 0x22BF jg 0xd8907 movl -0x8(%rbp), %eax subl $0x2013, %eax # imm = 0x2013 movslq %eax, %rcx leaq 0x5b1b5(%rip), %rax # 0x133ab0 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0xd8a85 cmpl $0x2460, -0x8(%rbp) # imm = 0x2460 jl 0xd8937 cmpl $0x2642, -0x8(%rbp) # imm = 0x2642 jg 0xd8937 movl -0x8(%rbp), %eax subl $0x2460, %eax # imm = 0x2460 movslq %eax, %rcx leaq 0x5b6e5(%rip), %rax # 0x134010 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0xd8a85 cmpl $0x3000, -0x8(%rbp) # imm = 0x3000 jl 0xd8967 cmpl $0x3129, -0x8(%rbp) # imm = 0x3129 jg 0xd8967 movl -0x8(%rbp), %eax subl $0x3000, %eax # imm = 0x3000 movslq %eax, %rcx leaq 0x5ba85(%rip), %rax # 0x1343e0 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0xd8a85 cmpl $0x32a3, -0x8(%rbp) # imm = 0x32A3 jl 0xd8997 cmpl $0x32a3, -0x8(%rbp) # imm = 0x32A3 jg 0xd8997 movl -0x8(%rbp), %eax subl $0x32a3, %eax # imm = 0x32A3 movslq %eax, %rcx leaq 0x5bca9(%rip), %rax # 0x134634 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0xd8a85 cmpl $0x338e, -0x8(%rbp) # imm = 0x338E jl 0xd89c7 cmpl $0x33d5, -0x8(%rbp) # imm = 0x33D5 jg 0xd89c7 movl -0x8(%rbp), %eax subl $0x338e, %eax # imm = 0x338E movslq %eax, %rcx leaq 0x5bc85(%rip), %rax # 0x134640 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0xd8a85 cmpl $0x4e00, -0x8(%rbp) # imm = 0x4E00 jl 0xd89f7 cmpl $0x9483, -0x8(%rbp) # imm = 0x9483 jg 0xd89f7 movl -0x8(%rbp), %eax subl $0x4e00, %eax # imm = 0x4E00 movslq %eax, %rcx leaq 0x5bce5(%rip), %rax # 0x1346d0 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0xd8a85 cmpl $0x9577, -0x8(%rbp) # imm = 0x9577 jl 0xd8a24 cmpl $0x9fa4, -0x8(%rbp) # imm = 0x9FA4 jg 0xd8a24 movl -0x8(%rbp), %eax subl $0x9577, %eax # imm = 0x9577 movslq %eax, %rcx leaq 0x649c5(%rip), %rax # 0x13d3e0 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0xd8a85 cmpl $0xfa0c, -0x8(%rbp) # imm = 0xFA0C jl 0xd8a51 cmpl $0xfa0d, -0x8(%rbp) # imm = 0xFA0D jg 0xd8a51 movl -0x8(%rbp), %eax subl $0xfa0c, %eax # imm = 0xFA0C movslq %eax, %rcx leaq 0x65df4(%rip), %rax # 0x13e83c movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0xd8a85 cmpl $0xfe30, -0x8(%rbp) # imm = 0xFE30 jl 0xd8a7e cmpl $0xfffd, -0x8(%rbp) # imm = 0xFFFD jg 0xd8a7e movl -0x8(%rbp), %eax subl $0xfe30, %eax # imm = 0xFE30 movslq %eax, %rcx leaq 0x65dcb(%rip), %rax # 0x13e840 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0xd8a85 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
func_uni_big5_onechar: push rbp mov rbp, rsp mov [rbp+var_8], edi cmp [rbp+var_8], 0A2h jl short loc_D88A7 cmp [rbp+var_8], 0F7h jg short loc_D88A7 mov eax, [rbp+var_8] sub eax, 0A2h movsxd rcx, eax lea rax, tab_uni_big50 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_D8A85 loc_D88A7: cmp [rbp+var_8], 2C7h jl short loc_D88D7 cmp [rbp+var_8], 451h jg short loc_D88D7 mov eax, [rbp+var_8] sub eax, 2C7h movsxd rcx, eax lea rax, tab_uni_big51 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_D8A85 loc_D88D7: cmp [rbp+var_8], 2013h jl short loc_D8907 cmp [rbp+var_8], 22BFh jg short loc_D8907 mov eax, [rbp+var_8] sub eax, 2013h movsxd rcx, eax lea rax, tab_uni_big52 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_D8A85 loc_D8907: cmp [rbp+var_8], 2460h jl short loc_D8937 cmp [rbp+var_8], 2642h jg short loc_D8937 mov eax, [rbp+var_8] sub eax, 2460h movsxd rcx, eax lea rax, tab_uni_big53 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_D8A85 loc_D8937: cmp [rbp+var_8], 3000h jl short loc_D8967 cmp [rbp+var_8], 3129h jg short loc_D8967 mov eax, [rbp+var_8] sub eax, 3000h movsxd rcx, eax lea rax, tab_uni_big54 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_D8A85 loc_D8967: cmp [rbp+var_8], 32A3h jl short loc_D8997 cmp [rbp+var_8], 32A3h jg short loc_D8997 mov eax, [rbp+var_8] sub eax, 32A3h movsxd rcx, eax lea rax, tab_uni_big55 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_D8A85 loc_D8997: cmp [rbp+var_8], 338Eh jl short loc_D89C7 cmp [rbp+var_8], 33D5h jg short loc_D89C7 mov eax, [rbp+var_8] sub eax, 338Eh movsxd rcx, eax lea rax, tab_uni_big56 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_D8A85 loc_D89C7: cmp [rbp+var_8], 4E00h jl short loc_D89F7 cmp [rbp+var_8], 9483h jg short loc_D89F7 mov eax, [rbp+var_8] sub eax, 4E00h movsxd rcx, eax lea rax, tab_uni_big57 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_D8A85 loc_D89F7: cmp [rbp+var_8], 9577h jl short loc_D8A24 cmp [rbp+var_8], 9FA4h jg short loc_D8A24 mov eax, [rbp+var_8] sub eax, 9577h movsxd rcx, eax lea rax, tab_uni_big58 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp short loc_D8A85 loc_D8A24: cmp [rbp+var_8], 0FA0Ch jl short loc_D8A51 cmp [rbp+var_8], 0FA0Dh jg short loc_D8A51 mov eax, [rbp+var_8] sub eax, 0FA0Ch movsxd rcx, eax lea rax, tab_uni_big59 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp short loc_D8A85 loc_D8A51: cmp [rbp+var_8], 0FE30h jl short loc_D8A7E cmp [rbp+var_8], 0FFFDh jg short loc_D8A7E mov eax, [rbp+var_8] sub eax, 0FE30h movsxd rcx, eax lea rax, tab_uni_big510 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp short loc_D8A85 loc_D8A7E: mov [rbp+var_4], 0 loc_D8A85: mov eax, [rbp+var_4] pop rbp retn
long long func_uni_big5_onechar(int a1) { if ( a1 < 162 || a1 > 247 ) { if ( a1 < 711 || a1 > 1105 ) { if ( a1 < 8211 || a1 > 8895 ) { if ( a1 < 9312 || a1 > 9794 ) { if ( a1 < 12288 || a1 > 12585 ) { if ( a1 == 12963 ) { return tab_uni_big55; } else if ( a1 < 13198 || a1 > 13269 ) { if ( a1 < 19968 || a1 > 38019 ) { if ( a1 < 38263 || a1 > 40868 ) { if ( a1 < 64012 || a1 > 64013 ) { if ( a1 < 65072 || a1 > 65533 ) return 0; else return tab_uni_big510[a1 - 65072]; } else { return tab_uni_big59[a1 - 64012]; } } else { return tab_uni_big58[a1 - 38263]; } } else { return tab_uni_big57[a1 - 19968]; } } else { return tab_uni_big56[a1 - 13198]; } } else { return tab_uni_big54[a1 - 12288]; } } else { return tab_uni_big53[a1 - 9312]; } } else { return tab_uni_big52[a1 - 8211]; } } else { return tab_uni_big51[a1 - 711]; } } else { return tab_uni_big50[a1 - 162]; } }
func_uni_big5_onechar: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x8],EDI CMP dword ptr [RBP + -0x8],0xa2 JL 0x001d88a7 CMP dword ptr [RBP + -0x8],0xf7 JG 0x001d88a7 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0xa2 MOVSXD RCX,EAX LEA RAX,[0x2336e0] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x001d8a85 LAB_001d88a7: CMP dword ptr [RBP + -0x8],0x2c7 JL 0x001d88d7 CMP dword ptr [RBP + -0x8],0x451 JG 0x001d88d7 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x2c7 MOVSXD RCX,EAX LEA RAX,[0x233790] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x001d8a85 LAB_001d88d7: CMP dword ptr [RBP + -0x8],0x2013 JL 0x001d8907 CMP dword ptr [RBP + -0x8],0x22bf JG 0x001d8907 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x2013 MOVSXD RCX,EAX LEA RAX,[0x233ab0] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x001d8a85 LAB_001d8907: CMP dword ptr [RBP + -0x8],0x2460 JL 0x001d8937 CMP dword ptr [RBP + -0x8],0x2642 JG 0x001d8937 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x2460 MOVSXD RCX,EAX LEA RAX,[0x234010] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x001d8a85 LAB_001d8937: CMP dword ptr [RBP + -0x8],0x3000 JL 0x001d8967 CMP dword ptr [RBP + -0x8],0x3129 JG 0x001d8967 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x3000 MOVSXD RCX,EAX LEA RAX,[0x2343e0] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x001d8a85 LAB_001d8967: CMP dword ptr [RBP + -0x8],0x32a3 JL 0x001d8997 CMP dword ptr [RBP + -0x8],0x32a3 JG 0x001d8997 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x32a3 MOVSXD RCX,EAX LEA RAX,[0x234634] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x001d8a85 LAB_001d8997: CMP dword ptr [RBP + -0x8],0x338e JL 0x001d89c7 CMP dword ptr [RBP + -0x8],0x33d5 JG 0x001d89c7 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x338e MOVSXD RCX,EAX LEA RAX,[0x234640] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x001d8a85 LAB_001d89c7: CMP dword ptr [RBP + -0x8],0x4e00 JL 0x001d89f7 CMP dword ptr [RBP + -0x8],0x9483 JG 0x001d89f7 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x4e00 MOVSXD RCX,EAX LEA RAX,[0x2346d0] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x001d8a85 LAB_001d89f7: CMP dword ptr [RBP + -0x8],0x9577 JL 0x001d8a24 CMP dword ptr [RBP + -0x8],0x9fa4 JG 0x001d8a24 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x9577 MOVSXD RCX,EAX LEA RAX,[0x23d3e0] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x001d8a85 LAB_001d8a24: CMP dword ptr [RBP + -0x8],0xfa0c JL 0x001d8a51 CMP dword ptr [RBP + -0x8],0xfa0d JG 0x001d8a51 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0xfa0c MOVSXD RCX,EAX LEA RAX,[0x23e83c] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x001d8a85 LAB_001d8a51: CMP dword ptr [RBP + -0x8],0xfe30 JL 0x001d8a7e CMP dword ptr [RBP + -0x8],0xfffd JG 0x001d8a7e MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0xfe30 MOVSXD RCX,EAX LEA RAX,[0x23e840] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x001d8a85 LAB_001d8a7e: MOV dword ptr [RBP + -0x4],0x0 LAB_001d8a85: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int2 func_uni_big5_onechar(int param_1) { int2 uVar1; if ((param_1 < 0xa2) || (0xf7 < param_1)) { if ((param_1 < 0x2c7) || (0x451 < param_1)) { if ((param_1 < 0x2013) || (0x22bf < param_1)) { if ((param_1 < 0x2460) || (0x2642 < param_1)) { if ((param_1 < 0x3000) || (0x3129 < param_1)) { if ((param_1 < 0x32a3) || (0x32a3 < param_1)) { if ((param_1 < 0x338e) || (0x33d5 < param_1)) { if ((param_1 < 0x4e00) || (0x9483 < param_1)) { if ((param_1 < 0x9577) || (0x9fa4 < param_1)) { if ((param_1 < 0xfa0c) || (0xfa0d < param_1)) { if ((param_1 < 0xfe30) || (0xfffd < param_1)) { uVar1 = 0; } else { uVar1 = *(int2 *)(tab_uni_big510 + (long)(param_1 + -0xfe30) * 2); } } else { uVar1 = *(int2 *)((long)&tab_uni_big59 + (long)(param_1 + -0xfa0c) * 2); } } else { uVar1 = *(int2 *)(tab_uni_big58 + (long)(param_1 + -0x9577) * 2); } } else { uVar1 = *(int2 *)(tab_uni_big57 + (long)(param_1 + -0x4e00) * 2); } } else { uVar1 = *(int2 *)(tab_uni_big56 + (long)(param_1 + -0x338e) * 2); } } else { uVar1 = (&tab_uni_big55)[param_1 + -0x32a3]; } } else { uVar1 = *(int2 *)(tab_uni_big54 + (long)(param_1 + -0x3000) * 2); } } else { uVar1 = *(int2 *)(tab_uni_big53 + (long)(param_1 + -0x2460) * 2); } } else { uVar1 = *(int2 *)(tab_uni_big52 + (long)(param_1 + -0x2013) * 2); } } else { uVar1 = *(int2 *)(tab_uni_big51 + (long)(param_1 + -0x2c7) * 2); } } else { uVar1 = *(int2 *)(tab_uni_big50 + (long)(param_1 + -0xa2) * 2); } return uVar1; }
17,987
common_chat_params_init_mistral_nemo(minja::chat_template const&, common_chat_inputs const&)
monkey531[P]llama/common/chat.cpp
static common_chat_params common_chat_params_init_mistral_nemo(const common_chat_template & tmpl, const struct common_chat_inputs & inputs) { common_chat_params data; data.grammar_lazy = inputs.tool_choice != "required"; data.grammar = build_grammar([&](const common_grammar_builder & builder) { auto schemas = json::array(); foreach_function(inputs.tools, [&](const json & tool) { const auto & function = tool["function"]; schemas.push_back({ {"type", "object"}, {"properties", { // Important note: the model is probably trained to take a JSON stringified arguments value. // It's hard to constrain that for now (while reusing the JSON schema conversion), so we're just expecting a plain object. {"name", { {"type", "string"}, {"const", function["name"]}, }}, {"arguments", function["parameters"]}, {"id", { {"type", "string"}, // Nemo's template expects a 9-character alphanumeric ID. {"pattern", "^[a-zA-Z0-9]{9}$"}, }}, }}, {"required", json::array({"name", "arguments", "id"})}, }); }); auto schema = json { {"type", "array"}, {"items", schemas.size() == 1 ? schemas[0] : json {{"anyOf", schemas}}}, {"minItems", 1}, }; if (!inputs.parallel_tool_calls) { schema["maxItems"] = 1; } builder.add_rule("root", "\"[TOOL_CALLS]\" " + builder.add_schema("tool_calls", schema)); }, grammar_options); data.grammar_triggers.push_back({"[TOOL_CALLS]", /* .at_start = */ true}); data.prompt = tmpl.apply(inputs.messages, inputs.tools.empty() ? json() : inputs.tools, inputs.add_generation_prompt); data.format = COMMON_CHAT_FORMAT_MISTRAL_NEMO; return data; }
O0
cpp
common_chat_params_init_mistral_nemo(minja::chat_template const&, common_chat_inputs const&): subq $0x158, %rsp # imm = 0x158 movq %rdi, 0x50(%rsp) movq %rdi, %rax movq %rax, 0x48(%rsp) movq %rdi, 0x150(%rsp) movq %rsi, 0x148(%rsp) movq %rdx, 0x140(%rsp) movb $0x0, 0x13f(%rsp) callq 0x203140 movq 0x140(%rsp), %rdi addq $0x20, %rdi leaq 0x44188(%rip), %rsi # 0x217ec4 callq 0x169640 movq 0x50(%rsp), %rdi movb %al, 0x38(%rdi) movq 0x140(%rsp), %rax movq %rax, 0xf0(%rsp) leaq 0xf8(%rsp), %rdi movq %rdi, 0x58(%rsp) leaq 0xf0(%rsp), %rsi callq 0x1ea3a0 movq 0x58(%rsp), %rsi leaq 0x4b07d(%rip), %rdx # 0x21edfc leaq 0x118(%rsp), %rdi callq 0x1a3d40 jmp 0x1d3d8e movq 0x50(%rsp), %rdi addq $0x18, %rdi leaq 0x118(%rsp), %rsi movq %rsi, 0x30(%rsp) callq 0x5a9e0 movq 0x30(%rsp), %rdi callq 0x5b6f8 leaq 0xf8(%rsp), %rdi callq 0x1a8d10 movq 0x50(%rsp), %rax addq $0x40, %rax movq %rax, 0x38(%rsp) leaq 0xb7(%rsp), %rdi movq %rdi, 0x40(%rsp) callq 0x5b260 movq 0x40(%rsp), %rdx leaq 0x4c8d3(%rip), %rsi # 0x2206bf leaq 0xb8(%rsp), %rdi callq 0x66cc0 jmp 0x1d3dfb movq 0x38(%rsp), %rdi movb $0x1, 0xd8(%rsp) leaq 0xb8(%rsp), %rsi callq 0x203270 jmp 0x1d3e17 leaq 0xb8(%rsp), %rdi callq 0x6aaa0 leaq 0xb7(%rsp), %rdi callq 0x5b6d0 movq 0x148(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x140(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x140(%rsp), %rdi addq $0x10, %rdi callq 0x11c1c0 testb $0x1, %al jne 0x1d3e62 jmp 0x1d3e72 leaq 0x70(%rsp), %rdi xorl %eax, %eax movl %eax, %esi callq 0xa87a0 jmp 0x1d3e8c movq 0x140(%rsp), %rsi addq $0x10, %rsi leaq 0x70(%rsp), %rdi callq 0xb9120 jmp 0x1d3e8a jmp 0x1d3e8c movq 0x140(%rsp), %rax movzbl 0x68(%rax), %eax movl %eax, 0x14(%rsp) xorl %eax, %eax movl %eax, %esi leaq 0x60(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0xa87a0 movl 0x14(%rsp), %r8d movq 0x20(%rsp), %rsi movq 0x28(%rsp), %rdx movq 0x18(%rsp), %r9 movq %rsp, %rax movl $0x1, (%rax) andl $0x1, %r8d leaq 0x80(%rsp), %rdi leaq 0x70(%rsp), %rcx callq 0x164230 jmp 0x1d3ee4 leaq 0xa0(%rsp), %rdi leaq 0x80(%rsp), %rsi callq 0x10c620 jmp 0x1d3efb movq 0x50(%rsp), %rdi addq $0x8, %rdi leaq 0xa0(%rsp), %rsi callq 0xb19a0 leaq 0xa0(%rsp), %rdi callq 0xa8760 leaq 0x80(%rsp), %rdi callq 0x5b6f8 leaq 0x60(%rsp), %rdi callq 0xa8760 leaq 0x70(%rsp), %rdi callq 0xa8760 movq 0x50(%rsp), %rax movl $0x2, (%rax) movb $0x1, 0x13f(%rsp) testb $0x1, 0x13f(%rsp) jne 0x1d403e jmp 0x1d4034 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xe8(%rsp) movl %eax, 0xe4(%rsp) leaq 0xf8(%rsp), %rdi callq 0x1a8d10 jmp 0x1d404b movq %rax, %rcx movl %edx, %eax movq %rcx, 0xe8(%rsp) movl %eax, 0xe4(%rsp) jmp 0x1d3fc2 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xe8(%rsp) movl %eax, 0xe4(%rsp) leaq 0xb8(%rsp), %rdi callq 0x6aaa0 leaq 0xb7(%rsp), %rdi callq 0x5b6d0 jmp 0x1d404b movq %rax, %rcx movl %edx, %eax movq %rcx, 0xe8(%rsp) movl %eax, 0xe4(%rsp) jmp 0x1d404b movq %rax, %rcx movl %edx, %eax movq %rcx, 0xe8(%rsp) movl %eax, 0xe4(%rsp) jmp 0x1d401e movq %rax, %rcx movl %edx, %eax movq %rcx, 0xe8(%rsp) movl %eax, 0xe4(%rsp) leaq 0x80(%rsp), %rdi callq 0x5b6f8 leaq 0x60(%rsp), %rdi callq 0xa8760 leaq 0x70(%rsp), %rdi callq 0xa8760 jmp 0x1d404b movq 0x50(%rsp), %rdi callq 0x108d10 movq 0x48(%rsp), %rax addq $0x158, %rsp # imm = 0x158 retq movq 0x50(%rsp), %rdi callq 0x108d10 movq 0xe8(%rsp), %rdi callq 0x5ac70 nopw %cs:(%rax,%rax)
_ZL36common_chat_params_init_mistral_nemoRKN5minja13chat_templateERK18common_chat_inputs: sub rsp, 158h mov [rsp+158h+var_108], rdi mov rax, rdi mov [rsp+158h+var_110], rax mov [rsp+158h+var_8], rdi mov [rsp+158h+var_10], rsi mov [rsp+158h+var_18], rdx mov [rsp+158h+var_19], 0 call _ZN18common_chat_paramsC2Ev; common_chat_params::common_chat_params(void) mov rdi, [rsp+158h+var_18] add rdi, 20h ; ' ' lea rsi, aRequired; "required" call _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_ mov rdi, [rsp+158h+var_108] mov [rdi+38h], al mov rax, [rsp+158h+var_18] mov [rsp+158h+var_68], rax lea rdi, [rsp+158h+var_60] mov [rsp+158h+var_100], rdi lea rsi, [rsp+158h+var_68] call _ZNSt8functionIFvRK22common_grammar_builderEEC2IZL36common_chat_params_init_mistral_nemoRKN5minja13chat_templateERK18common_chat_inputsE3$_0vEEOT_; std::function<void ()(common_grammar_builder const&)>::function<common_chat_params_init_mistral_nemo(minja::chat_template const&,common_chat_inputs const&)::$_0,void>(common_chat_params_init_mistral_nemo(minja::chat_template const&,common_chat_inputs const&)::$_0 &&) mov rsi, [rsp+158h+var_100] lea rdx, _ZL15grammar_options; grammar_options lea rdi, [rsp+158h+var_40] call _Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options; build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&) jmp short $+2 loc_1D3D8E: mov rdi, [rsp+158h+var_108] add rdi, 18h lea rsi, [rsp+158h+var_40] mov [rsp+158h+var_128], rsi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [rsp+158h+var_128]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+158h+var_60] call _ZNSt8functionIFvRK22common_grammar_builderEED2Ev; std::function<void ()(common_grammar_builder const&)>::~function() mov rax, [rsp+158h+var_108] add rax, 40h ; '@' mov [rsp+158h+var_120], rax lea rdi, [rsp+158h+var_A1] mov [rsp+158h+var_118], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rsp+158h+var_118] lea rsi, aToolCalls_0; "[TOOL_CALLS]" lea rdi, [rsp+158h+var_A0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_1D3DFB: mov rdi, [rsp+158h+var_120] mov [rsp+158h+var_80], 1 lea rsi, [rsp+158h+var_A0] call _ZNSt6vectorI22common_grammar_triggerSaIS0_EE9push_backEOS0_; std::vector<common_grammar_trigger>::push_back(common_grammar_trigger&&) jmp short $+2 loc_1D3E17: lea rdi, [rsp+158h+var_A0]; this call _ZN22common_grammar_triggerD2Ev; common_grammar_trigger::~common_grammar_trigger() lea rdi, [rsp+158h+var_A1] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rax, [rsp+158h+var_10] mov [rsp+158h+var_138], rax mov rax, [rsp+158h+var_18] mov [rsp+158h+var_130], rax mov rdi, [rsp+158h+var_18] add rdi, 10h call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5emptyEv; 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>::empty(void) test al, 1 jnz short loc_1D3E62 jmp short loc_1D3E72 loc_1D3E62: lea rdi, [rsp+158h+var_E8] xor eax, eax mov esi, eax call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EDn; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(decltype(nullptr)) jmp short loc_1D3E8C loc_1D3E72: mov rsi, [rsp+158h+var_18] add rsi, 10h lea rdi, [rsp+158h+var_E8] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) jmp short $+2 loc_1D3E8A: jmp short $+2 loc_1D3E8C: mov rax, [rsp+158h+var_18] movzx eax, byte ptr [rax+68h] mov [rsp+158h+var_144], eax xor eax, eax mov esi, eax lea rdi, [rsp+158h+var_F8] mov [rsp+158h+var_140], rdi call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EDn; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(decltype(nullptr)) mov r8d, [rsp+158h+var_144] mov rsi, [rsp+158h+var_138] mov rdx, [rsp+158h+var_130] mov r9, [rsp+158h+var_140] mov rax, rsp mov dword ptr [rax], 1 and r8d, 1 lea rdi, [rsp+158h+var_D8] lea rcx, [rsp+158h+var_E8] call _ZNK5minja13chat_template5applyERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESH_bSH_b; minja::chat_template::apply(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&,bool,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&,bool) jmp short $+2 loc_1D3EE4: lea rdi, [rsp+158h+var_B8] lea rsi, [rsp+158h+var_D8] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_ jmp short $+2 loc_1D3EFB: mov rdi, [rsp+158h+var_108] add rdi, 8 lea rsi, [rsp+158h+var_B8] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>) lea rdi, [rsp+158h+var_B8] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() lea rdi, [rsp+158h+var_D8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+158h+var_F8] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() lea rdi, [rsp+158h+var_E8] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() mov rax, [rsp+158h+var_108] mov dword ptr [rax], 2 mov [rsp+158h+var_19], 1 test [rsp+158h+var_19], 1 jnz loc_1D403E jmp loc_1D4034 mov rcx, rax mov eax, edx mov [rsp+arg_E0], rcx mov [rsp+arg_DC], eax lea rdi, [rsp+arg_F0] call _ZNSt8functionIFvRK22common_grammar_builderEED2Ev; std::function<void ()(common_grammar_builder const&)>::~function() jmp loc_1D404B mov rcx, rax mov eax, edx mov [rsp+arg_E0], rcx mov [rsp+arg_DC], eax jmp short loc_1D3FC2 mov rcx, rax mov eax, edx mov [rsp+arg_E0], rcx mov [rsp+arg_DC], eax lea rdi, [rsp+arg_B0]; this call _ZN22common_grammar_triggerD2Ev; common_grammar_trigger::~common_grammar_trigger() loc_1D3FC2: lea rdi, [rsp+arg_AF] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_1D404B mov rcx, rax mov eax, edx mov [rsp+arg_E0], rcx mov [rsp+arg_DC], eax jmp short loc_1D404B mov rcx, rax mov eax, edx mov [rsp+arg_E0], rcx mov [rsp+arg_DC], eax jmp short loc_1D401E mov rcx, rax mov eax, edx mov [rsp+arg_E0], rcx mov [rsp+arg_DC], eax lea rdi, [rsp+arg_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1D401E: lea rdi, [rsp+arg_58] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() lea rdi, [rsp+arg_68] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() jmp short loc_1D404B loc_1D4034: mov rdi, [rsp+158h+var_108]; this call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params() loc_1D403E: mov rax, [rsp+158h+var_110] add rsp, 158h retn loc_1D404B: mov rdi, [rsp+arg_48]; this call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params() mov rdi, [rsp+arg_E0] call __Unwind_Resume
const minja::chat_template * common_chat_params_init_mistral_nemo( const minja::chat_template *a1, const common_chat_inputs *a2, long long a3) { int v3; // edx int v4; // ecx int v5; // r8d int v6; // r9d char v8; // [rsp+14h] [rbp-144h] const common_chat_inputs *v9; // [rsp+20h] [rbp-138h] long long v10; // [rsp+28h] [rbp-130h] _BYTE v11[16]; // [rsp+60h] [rbp-F8h] BYREF _BYTE v12[16]; // [rsp+70h] [rbp-E8h] BYREF _BYTE v13[32]; // [rsp+80h] [rbp-D8h] BYREF _BYTE v14[23]; // [rsp+A0h] [rbp-B8h] BYREF char v15; // [rsp+B7h] [rbp-A1h] BYREF _BYTE v16[56]; // [rsp+B8h] [rbp-A0h] BYREF long long v17; // [rsp+F0h] [rbp-68h] BYREF _BYTE v18[32]; // [rsp+F8h] [rbp-60h] BYREF _BYTE v19[40]; // [rsp+118h] [rbp-40h] BYREF long long v20; // [rsp+140h] [rbp-18h] const common_chat_inputs *v21; // [rsp+148h] [rbp-10h] const minja::chat_template *v22; // [rsp+150h] [rbp-8h] v22 = a1; v21 = a2; v20 = a3; v19[39] = 0; common_chat_params::common_chat_params(a1); *((_BYTE *)a1 + 56) = ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_( v20 + 32, (long long)"required", v3, v4, v5, v6); v17 = v20; std::function<void ()(common_grammar_builder const&)>::function<common_chat_params_init_mistral_nemo(minja::chat_template const&,common_chat_inputs const&)::$_0,void>( v18, &v17); build_grammar[abi:cxx11]((long long)v19, (long long)v18, grammar_options); std::string::operator=((char *)a1 + 24, v19); std::string::~string(v19); std::function<void ()(common_grammar_builder const&)>::~function((std::_Function_base *)v18); std::allocator<char>::allocator(&v15, v19); std::string::basic_string<std::allocator<char>>((long long)v16, (long long)"[TOOL_CALLS]", (long long)&v15); v16[32] = 1; std::vector<common_grammar_trigger>::push_back((char *)a1 + 64, v16); common_grammar_trigger::~common_grammar_trigger((common_grammar_trigger *)v16); std::allocator<char>::~allocator(&v15); v9 = v21; v10 = v20; if ( (nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::empty(v20 + 16) & 1) != 0 ) nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json((long long)v12); else nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( (long long)v12, v20 + 16); v8 = *(_BYTE *)(v20 + 104); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json((long long)v11); minja::chat_template::apply((long long)v13, v9, v10, (long long)v12, v8 & 1, v11, 1); ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_( v14, (long long)v13); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=( (long long)a1 + 8, (long long)v14); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v14); std::string::~string(v13); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v11); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v12); *(_DWORD *)a1 = 2; return a1; }
17,988
common_chat_params_init_mistral_nemo(minja::chat_template const&, common_chat_inputs const&)
monkey531[P]llama/common/chat.cpp
static common_chat_params common_chat_params_init_mistral_nemo(const common_chat_template & tmpl, const struct common_chat_inputs & inputs) { common_chat_params data; data.grammar_lazy = inputs.tool_choice != "required"; data.grammar = build_grammar([&](const common_grammar_builder & builder) { auto schemas = json::array(); foreach_function(inputs.tools, [&](const json & tool) { const auto & function = tool["function"]; schemas.push_back({ {"type", "object"}, {"properties", { // Important note: the model is probably trained to take a JSON stringified arguments value. // It's hard to constrain that for now (while reusing the JSON schema conversion), so we're just expecting a plain object. {"name", { {"type", "string"}, {"const", function["name"]}, }}, {"arguments", function["parameters"]}, {"id", { {"type", "string"}, // Nemo's template expects a 9-character alphanumeric ID. {"pattern", "^[a-zA-Z0-9]{9}$"}, }}, }}, {"required", json::array({"name", "arguments", "id"})}, }); }); auto schema = json { {"type", "array"}, {"items", schemas.size() == 1 ? schemas[0] : json {{"anyOf", schemas}}}, {"minItems", 1}, }; if (!inputs.parallel_tool_calls) { schema["maxItems"] = 1; } builder.add_rule("root", "\"[TOOL_CALLS]\" " + builder.add_schema("tool_calls", schema)); }, grammar_options); data.grammar_triggers.push_back({"[TOOL_CALLS]", /* .at_start = */ true}); data.prompt = tmpl.apply(inputs.messages, inputs.tools.empty() ? json() : inputs.tools, inputs.add_generation_prompt); data.format = COMMON_CHAT_FORMAT_MISTRAL_NEMO; return data; }
O3
cpp
common_chat_params_init_mistral_nemo(minja::chat_template const&, common_chat_inputs const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movl $0x0, (%rdi) xorl %r12d, %r12d movb %r12b, 0x8(%rdi) movq %r12, 0x10(%rdi) leaq 0x28(%rdi), %rax movq %rax, 0x18(%rdi) movq %r12, 0x20(%rdi) movb %r12b, 0x28(%rdi) movb %r12b, 0x38(%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x40(%rdi) movups %xmm0, 0x50(%rdi) movups %xmm0, 0x60(%rdi) movups %xmm0, 0x70(%rdi) movq %r12, 0x80(%rdi) leaq 0x20(%rdx), %rdi leaq 0x1e3e0(%rip), %rsi # 0xf44c9 callq 0xa9b4f movb %al, 0x38(%rbx) leaq 0x38(%rsp), %rsi movq %r12, 0x8(%rsi) movq %r14, (%rsi) leaq 0xd25e(%rip), %rax # 0xe3362 movq %rax, 0x18(%rsi) leaq 0xda2d(%rip), %rax # 0xe3b3c movq %rax, 0x10(%rsi) leaq 0x2436e(%rip), %rdx # 0xfa488 leaq 0x10(%rsp), %rdi callq 0xbff14 leaq 0x18(%rbx), %rdi leaq 0x10(%rsp), %r12 movq %r12, %rsi callq 0x1bb20 movq (%r12), %rdi leaq 0x20(%rsp), %r12 cmpq %r12, %rdi je 0xd6150 movq 0x20(%rsp), %rsi incq %rsi callq 0x1b930 movq 0x48(%rsp), %rax testq %rax, %rax je 0xd6169 leaq 0x38(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax leaq 0x10(%rsp), %rdi movq %r12, (%rdi) leaq 0x253df(%rip), %rsi # 0xfb557 leaq 0x253e4(%rip), %rdx # 0xfb563 callq 0x2695a leaq 0x40(%rbx), %rdi leaq 0x10(%rsp), %rsi movb $0x1, 0x20(%rsi) callq 0xe8e0c movq 0x10(%rsp), %rdi cmpq %r12, %rdi je 0xd61ad movq 0x20(%rsp), %rsi incq %rsi callq 0x1b930 movzbl 0x10(%r14), %eax testl %eax, %eax je 0xd61dd cmpl $0x2, %eax je 0xd61c0 cmpl $0x1, %eax jne 0xd61cd movq 0x18(%r14), %rax movq (%rax), %rcx cmpq 0x8(%rax), %rcx je 0xd61dd leaq 0x10(%r14), %rsi leaq 0x38(%rsp), %rdi callq 0x6272a jmp 0xd61eb movb $0x0, 0x38(%rsp) movq $0x0, 0x40(%rsp) movzbl 0x68(%r14), %r8d leaq 0x58(%rsp), %r9 movb $0x0, (%r9) movq $0x0, 0x8(%r9) movl $0x1, (%rsp) leaq 0x10(%rsp), %rdi leaq 0x38(%rsp), %rcx movq %r15, %rsi movq %r14, %rdx callq 0xa626e leaq 0x68(%rsp), %rdi leaq 0x10(%rsp), %rsi callq 0x84550 movb 0x8(%rbx), %al leaq 0x68(%rsp), %rdi movb (%rdi), %cl movb %cl, 0x8(%rbx) movb %al, (%rdi) movq 0x10(%rbx), %rax movq 0x8(%rdi), %rcx movq %rcx, 0x10(%rbx) movq %rax, 0x8(%rdi) callq 0x62bf6 movq 0x10(%rsp), %rdi cmpq %r12, %rdi je 0xd6267 movq 0x20(%rsp), %rsi incq %rsi callq 0x1b930 leaq 0x58(%rsp), %rdi callq 0x62bf6 leaq 0x38(%rsp), %rdi callq 0x62bf6 movl $0x2, (%rbx) addq $0x78, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq jmp 0xd62e5 jmp 0xd6316 movq %rax, %r14 movq 0x10(%rsp), %rdi cmpq %r12, %rdi je 0xd62b3 movq 0x20(%rsp), %rsi incq %rsi callq 0x1b930 jmp 0xd62b3 movq %rax, %r14 leaq 0x58(%rsp), %rdi callq 0x62bf6 leaq 0x38(%rsp), %rdi callq 0x62bf6 jmp 0xd6306 movq %rax, %r14 movq 0x10(%rsp), %rdi cmpq %r12, %rdi je 0xd6306 movq 0x20(%rsp), %rsi incq %rsi callq 0x1b930 jmp 0xd6306 movq %rax, %r14 jmp 0xd6306 movq %rax, %r14 movq 0x48(%rsp), %rax testq %rax, %rax je 0xd6306 leaq 0x38(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbx, %rdi callq 0x831c6 movq %r14, %rdi callq 0x1c0d0 movq %rax, %rdi callq 0x26123
_ZL36common_chat_params_init_mistral_nemoRKN5minja13chat_templateERK18common_chat_inputs: push r15 push r14 push r12 push rbx sub rsp, 78h mov r14, rdx mov r15, rsi mov rbx, rdi mov dword ptr [rdi], 0 xor r12d, r12d mov [rdi+8], r12b mov [rdi+10h], r12 lea rax, [rdi+28h] mov [rdi+18h], rax mov [rdi+20h], r12 mov [rdi+28h], r12b mov [rdi+38h], r12b xorps xmm0, xmm0 movups xmmword ptr [rdi+40h], xmm0 movups xmmword ptr [rdi+50h], xmm0 movups xmmword ptr [rdi+60h], xmm0 movups xmmword ptr [rdi+70h], xmm0 mov [rdi+80h], r12 lea rdi, [rdx+20h] lea rsi, aRequired; "required" call _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_ mov [rbx+38h], al lea rsi, [rsp+98h+var_60] mov [rsi+8], r12 mov [rsi], r14 lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL36common_chat_params_init_mistral_nemoRKN5minja13chat_templateERK18common_chat_inputsE3$_0E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_mistral_nemo(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_invoke(std::_Any_data const&,common_grammar_builder const&) mov [rsi+18h], rax lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL36common_chat_params_init_mistral_nemoRKN5minja13chat_templateERK18common_chat_inputsE3$_0E10_M_managerERSt9_Any_dataRKSD_St18_Manager_operation; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_mistral_nemo(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsi+10h], rax lea rdx, _ZL15grammar_options; grammar_options lea rdi, [rsp+98h+var_88] call _Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options; build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&) lea rdi, [rbx+18h] lea r12, [rsp+98h+var_88] mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r12]; void * lea r12, [rsp+98h+var_78] cmp rdi, r12 jz short loc_D6150 mov rsi, [rsp+98h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D6150: mov rax, [rsp+98h+var_50] test rax, rax jz short loc_D6169 lea rdi, [rsp+98h+var_60] mov rsi, rdi mov edx, 3 call rax loc_D6169: lea rdi, [rsp+98h+var_88] mov [rdi], r12 lea rsi, aToolCalls_0; "[TOOL_CALLS]" lea rdx, aToolCalls_0+0Ch; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rbx+40h] lea rsi, [rsp+98h+var_88] mov byte ptr [rsi+20h], 1 call _ZNSt6vectorI22common_grammar_triggerSaIS0_EE12emplace_backIJS0_EEERS0_DpOT_; std::vector<common_grammar_trigger>::emplace_back<common_grammar_trigger>(common_grammar_trigger &&) mov rdi, [rsp+98h+var_88]; void * cmp rdi, r12 jz short loc_D61AD mov rsi, [rsp+98h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D61AD: movzx eax, byte ptr [r14+10h] test eax, eax jz short loc_D61DD cmp eax, 2 jz short loc_D61C0 cmp eax, 1 jnz short loc_D61CD loc_D61C0: mov rax, [r14+18h] mov rcx, [rax] cmp rcx, [rax+8] jz short loc_D61DD loc_D61CD: lea rsi, [r14+10h] lea rdi, [rsp+98h+var_60] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) jmp short loc_D61EB loc_D61DD: mov [rsp+98h+var_60], 0 mov [rsp+98h+var_58], 0 loc_D61EB: movzx r8d, byte ptr [r14+68h] lea r9, [rsp+98h+var_40] mov byte ptr [r9], 0 mov qword ptr [r9+8], 0 mov [rsp+98h+var_98], 1 lea rdi, [rsp+98h+var_88] lea rcx, [rsp+98h+var_60] mov rsi, r15 mov rdx, r14 call _ZNK5minja13chat_template5applyERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESH_bSH_b; minja::chat_template::apply(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&,bool,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&,bool) lea rdi, [rsp+98h+var_30] lea rsi, [rsp+98h+var_88] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_ mov al, [rbx+8] lea rdi, [rsp+98h+var_30] mov cl, [rdi] mov [rbx+8], cl mov [rdi], al mov rax, [rbx+10h] mov rcx, [rdi+8] mov [rbx+10h], rcx mov [rdi+8], rax call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rsp+98h+var_88]; void * cmp rdi, r12 jz short loc_D6267 mov rsi, [rsp+98h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D6267: lea rdi, [rsp+98h+var_40] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea rdi, [rsp+98h+var_60] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov dword ptr [rbx], 2 add rsp, 78h pop rbx pop r12 pop r14 pop r15 retn jmp short loc_D62E5 jmp loc_D6316 mov r14, rax mov rdi, [rsp+98h+var_88]; void * cmp rdi, r12 jz short loc_D62B3 mov rsi, [rsp+98h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_D62B3 mov r14, rax loc_D62B3: lea rdi, [rsp+98h+var_40] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea rdi, [rsp+98h+var_60] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() jmp short loc_D6306 mov r14, rax mov rdi, [rsp+98h+var_88]; void * cmp rdi, r12 jz short loc_D6306 mov rsi, [rsp+98h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_D6306 loc_D62E5: mov r14, rax jmp short loc_D6306 mov r14, rax mov rax, [rsp+98h+var_50] test rax, rax jz short loc_D6306 lea rdi, [rsp+98h+var_60] mov rsi, rdi mov edx, 3 call rax loc_D6306: mov rdi, rbx; this call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params() mov rdi, r14 call __Unwind_Resume loc_D6316: mov rdi, rax call __clang_call_terminate
long long common_chat_params_init_mistral_nemo( const minja::chat_template *a1, const common_chat_inputs *a2, long long a3) { long long v4; // rcx int v5; // r8d int v6; // r9d int v7; // eax int v8; // r8d char v9; // al long long v10; // rax long long result; // rax void *v12[2]; // [rsp+10h] [rbp-88h] BYREF _QWORD v13[2]; // [rsp+20h] [rbp-78h] BYREF char v14; // [rsp+30h] [rbp-68h] long long v15; // [rsp+38h] [rbp-60h] BYREF long long v16; // [rsp+40h] [rbp-58h] long long ( *v17)(); // [rsp+48h] [rbp-50h] long long ( *v18)(); // [rsp+50h] [rbp-48h] _BYTE v19[8]; // [rsp+58h] [rbp-40h] BYREF long long v20; // [rsp+60h] [rbp-38h] char v21[8]; // [rsp+68h] [rbp-30h] BYREF long long v22; // [rsp+70h] [rbp-28h] *(_DWORD *)a1 = 0; *((_BYTE *)a1 + 8) = 0; *((_QWORD *)a1 + 2) = 0LL; *((_QWORD *)a1 + 3) = (char *)a1 + 40; *((_QWORD *)a1 + 4) = 0LL; *((_BYTE *)a1 + 40) = 0; *((_BYTE *)a1 + 56) = 0; *((_OWORD *)a1 + 4) = 0LL; *((_OWORD *)a1 + 5) = 0LL; *((_OWORD *)a1 + 6) = 0LL; *((_OWORD *)a1 + 7) = 0LL; *((_QWORD *)a1 + 16) = 0LL; *((_BYTE *)a1 + 56) = ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_( a3 + 32, (long long)"required"); v16 = 0LL; v15 = a3; v18 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_mistral_nemo(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_invoke; v17 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_mistral_nemo(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_manager; build_grammar[abi:cxx11]((long long)v12, (long long)&v15, grammar_options, v4, v5, v6); std::string::operator=((char *)a1 + 24, v12); if ( v12[0] != v13 ) operator delete(v12[0], v13[0] + 1LL); if ( v17 ) ((void ( *)(long long *, long long *, long long))v17)(&v15, &v15, 3LL); v12[0] = v13; std::string::_M_construct<char const*>((long long)v12, "[TOOL_CALLS]", (long long)""); v14 = 1; std::vector<common_grammar_trigger>::emplace_back<common_grammar_trigger>((char *)a1 + 64); if ( v12[0] != v13 ) operator delete(v12[0], v13[0] + 1LL); v7 = *(unsigned __int8 *)(a3 + 16); if ( !*(_BYTE *)(a3 + 16) || (v7 == 2 || v7 == 1) && **(_QWORD **)(a3 + 24) == *(_QWORD *)(*(_QWORD *)(a3 + 24) + 8LL) ) { LOBYTE(v15) = 0; v16 = 0LL; } else { nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( (unsigned __int8 *)&v15, (unsigned __int8 *)(a3 + 16)); } v8 = *(unsigned __int8 *)(a3 + 104); v19[0] = 0; v20 = 0LL; minja::chat_template::apply((long long)v12, a2, (unsigned __int8 *)a3, (unsigned __int8 *)&v15, v8, v19, 1); ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_(v21); v9 = *((_BYTE *)a1 + 8); *((_BYTE *)a1 + 8) = v21[0]; v21[0] = v9; v10 = *((_QWORD *)a1 + 2); *((_QWORD *)a1 + 2) = v22; v22 = v10; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v21); if ( v12[0] != v13 ) operator delete(v12[0], v13[0] + 1LL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v19); result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v15); *(_DWORD *)a1 = 2; return result; }
common_chat_params_init_mistral_nemo: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x78 MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV dword ptr [RDI],0x0 XOR R12D,R12D MOV byte ptr [RDI + 0x8],R12B MOV qword ptr [RDI + 0x10],R12 LEA RAX,[RDI + 0x28] MOV qword ptr [RDI + 0x18],RAX MOV qword ptr [RDI + 0x20],R12 MOV byte ptr [RDI + 0x28],R12B MOV byte ptr [RDI + 0x38],R12B XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x40],XMM0 MOVUPS xmmword ptr [RDI + 0x50],XMM0 MOVUPS xmmword ptr [RDI + 0x60],XMM0 MOVUPS xmmword ptr [RDI + 0x70],XMM0 MOV qword ptr [RDI + 0x80],R12 LEA RDI,[RDX + 0x20] LEA RSI,[0x1f44c9] CALL 0x001a9b4f MOV byte ptr [RBX + 0x38],AL LEA RSI,[RSP + 0x38] MOV qword ptr [RSI + 0x8],R12 MOV qword ptr [RSI],R14 LEA RAX,[0x1e3362] MOV qword ptr [RSI + 0x18],RAX LEA RAX,[0x1e3b3c] MOV qword ptr [RSI + 0x10],RAX LAB_001d6113: LEA RDX,[0x1fa488] LEA RDI,[RSP + 0x10] CALL 0x001bff14 LEA RDI,[RBX + 0x18] LEA R12,[RSP + 0x10] MOV RSI,R12 CALL 0x0011bb20 MOV RDI,qword ptr [R12] LEA R12,[RSP + 0x20] CMP RDI,R12 JZ 0x001d6150 MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x0011b930 LAB_001d6150: MOV RAX,qword ptr [RSP + 0x48] TEST RAX,RAX JZ 0x001d6169 LAB_001d615a: LEA RDI,[RSP + 0x38] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001d6169: LEA RDI,[RSP + 0x10] MOV qword ptr [RDI],R12 LAB_001d6171: LEA RSI,[0x1fb557] LEA RDX,[0x1fb563] CALL 0x0012695a LEA RDI,[RBX + 0x40] LEA RSI,[RSP + 0x10] MOV byte ptr [RSI + 0x20],0x1 LAB_001d6191: CALL 0x001e8e0c MOV RDI,qword ptr [RSP + 0x10] CMP RDI,R12 JZ 0x001d61ad MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x0011b930 LAB_001d61ad: MOVZX EAX,byte ptr [R14 + 0x10] TEST EAX,EAX JZ 0x001d61dd CMP EAX,0x2 JZ 0x001d61c0 CMP EAX,0x1 JNZ 0x001d61cd LAB_001d61c0: MOV RAX,qword ptr [R14 + 0x18] MOV RCX,qword ptr [RAX] CMP RCX,qword ptr [RAX + 0x8] JZ 0x001d61dd LAB_001d61cd: LEA RSI,[R14 + 0x10] LEA RDI,[RSP + 0x38] CALL 0x0016272a JMP 0x001d61eb LAB_001d61dd: MOV byte ptr [RSP + 0x38],0x0 MOV qword ptr [RSP + 0x40],0x0 LAB_001d61eb: MOVZX R8D,byte ptr [R14 + 0x68] LEA R9,[RSP + 0x58] MOV byte ptr [R9],0x0 MOV qword ptr [R9 + 0x8],0x0 LAB_001d6201: MOV dword ptr [RSP],0x1 LEA RDI,[RSP + 0x10] LEA RCX,[RSP + 0x38] MOV RSI,R15 MOV RDX,R14 CALL 0x001a626e LAB_001d621d: LEA RDI,[RSP + 0x68] LEA RSI,[RSP + 0x10] CALL 0x00184550 MOV AL,byte ptr [RBX + 0x8] LEA RDI,[RSP + 0x68] MOV CL,byte ptr [RDI] MOV byte ptr [RBX + 0x8],CL MOV byte ptr [RDI],AL MOV RAX,qword ptr [RBX + 0x10] MOV RCX,qword ptr [RDI + 0x8] MOV qword ptr [RBX + 0x10],RCX MOV qword ptr [RDI + 0x8],RAX CALL 0x00162bf6 MOV RDI,qword ptr [RSP + 0x10] CMP RDI,R12 JZ 0x001d6267 MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x0011b930 LAB_001d6267: LEA RDI,[RSP + 0x58] CALL 0x00162bf6 LEA RDI,[RSP + 0x38] CALL 0x00162bf6 MOV dword ptr [RBX],0x2 ADD RSP,0x78 POP RBX POP R12 POP R14 POP R15 RET
/* common_chat_params_init_mistral_nemo(minja::chat_template const&, common_chat_inputs const&) */ void common_chat_params_init_mistral_nemo(chat_template *param_1,common_chat_inputs *param_2) { char cVar1; int8 uVar2; chat_template cVar3; ulong in_RDX; long *local_88 [2]; long local_78 [2]; int1 local_68; ulong local_60 [2]; code *local_50; code *local_48; data local_40 [8]; int8 local_38; chat_template local_30 [8]; int8 local_28; *(int4 *)param_1 = 0; param_1[8] = (chat_template)0x0; *(int8 *)(param_1 + 0x10) = 0; *(chat_template **)(param_1 + 0x18) = param_1 + 0x28; *(int8 *)(param_1 + 0x20) = 0; param_1[0x28] = (chat_template)0x0; param_1[0x38] = (chat_template)0x0; *(int8 *)(param_1 + 0x40) = 0; *(int8 *)(param_1 + 0x48) = 0; *(int8 *)(param_1 + 0x50) = 0; *(int8 *)(param_1 + 0x58) = 0; *(int8 *)(param_1 + 0x60) = 0; *(int8 *)(param_1 + 0x68) = 0; *(int8 *)(param_1 + 0x70) = 0; *(int8 *)(param_1 + 0x78) = 0; *(int8 *)(param_1 + 0x80) = 0; cVar3 = (chat_template) _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_ (in_RDX + 0x20,"required"); param_1[0x38] = cVar3; local_60[1] = 0; local_48 = std:: _Function_handler<void(common_grammar_builder_const&),common_chat_params_init_mistral_nemo(minja::chat_template_const&,common_chat_inputs_const&)::$_0> ::_M_invoke; local_50 = std:: _Function_handler<void(common_grammar_builder_const&),common_chat_params_init_mistral_nemo(minja::chat_template_const&,common_chat_inputs_const&)::$_0> ::_M_manager; /* try { // try from 001d6113 to 001d6123 has its CatchHandler @ 001d62ea */ local_60[0] = in_RDX; build_grammar_abi_cxx11_((function *)local_88,(common_grammar_options *)local_60); std::__cxx11::string::operator=((string *)(param_1 + 0x18),(string *)local_88); if (local_88[0] != local_78) { operator_delete(local_88[0],local_78[0] + 1); } if (local_50 != (code *)0x0) { /* try { // try from 001d615a to 001d6168 has its CatchHandler @ 001d628f */ (*local_50)(local_60,local_60,3); } local_88[0] = local_78; /* try { // try from 001d6171 to 001d6183 has its CatchHandler @ 001d62e5 */ std::__cxx11::string::_M_construct<char_const*>(local_88,"[TOOL_CALLS]",""); local_68 = 1; /* try { // try from 001d6191 to 001d6195 has its CatchHandler @ 001d62c9 */ std::vector<common_grammar_trigger,std::allocator<common_grammar_trigger>>:: emplace_back<common_grammar_trigger> ((vector<common_grammar_trigger,std::allocator<common_grammar_trigger>> *) (param_1 + 0x40),(common_grammar_trigger *)local_88); if (local_88[0] != local_78) { operator_delete(local_88[0],local_78[0] + 1); } cVar1 = *(char *)(in_RDX + 0x10); if ((cVar1 == '\0') || (((cVar1 == '\x02' || (cVar1 == '\x01')) && (**(long **)(in_RDX + 0x18) == (*(long **)(in_RDX + 0x18))[1])))) { local_60[0] = local_60[0] & 0xffffffffffffff00; local_60[1] = 0; } else { /* try { // try from 001d61cd to 001d61da has its CatchHandler @ 001d628d */ nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)local_60,(basic_json *)(in_RDX + 0x10)); } local_40[0] = (data)0x0; local_38 = 0; /* try { // try from 001d6201 to 001d621c has its CatchHandler @ 001d62b0 */ minja::chat_template::apply ((basic_json *)local_88,(basic_json *)param_2,SUB81(in_RDX,0),(basic_json *)local_60, *(bool *)(in_RDX + 0x68)); /* try { // try from 001d621d to 001d622b has its CatchHandler @ 001d6294 */ _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_ (local_30,local_88); cVar3 = param_1[8]; param_1[8] = local_30[0]; uVar2 = *(int8 *)(param_1 + 0x10); *(int8 *)(param_1 + 0x10) = local_28; local_30[0] = cVar3; local_28 = uVar2; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)local_30); if (local_88[0] != local_78) { operator_delete(local_88[0],local_78[0] + 1); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_40); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)local_60); *(int4 *)param_1 = 2; return; }
17,989
sessions::find(char const*)
untodesu[P]voxelius/game/server/sessions.cc
Session *sessions::find(const char *client_username) { const auto it = username_map.find(client_username); if(it != username_map.cend()) return it->second; return nullptr; }
O2
cpp
sessions::find(char const*): pushq %rax movq %rsp, %rsi movq %rdi, (%rsi) leaq 0xe6b03(%rip), %rdi # 0x10dbb0 callq 0x281cc movslq 0xe6b17(%rip), %rcx # 0x10dbd0 imulq $0x28, %rcx, %rcx addq 0xe6af4(%rip), %rcx # 0x10dbb8 cmpq %rcx, %rax je 0x270cf movq 0x20(%rax), %rax jmp 0x270d1 xorl %eax, %eax popq %rcx retq
_ZN8sessions4findEPKc: push rax mov rsi, rsp mov [rsi], rdi lea rdi, _ZL12username_mapB5cxx11; username_map call _ZN7emhash87HashMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7SessionSt4hashIS6_ESt8equal_toIS6_EE4findIPKcEENSD_8iteratorERKT_; emhash8::HashMap<std::string,Session *,std::hash<std::string>,std::equal_to<std::string>>::find<char const*>(char const* const&) movsxd rcx, cs:dword_10DBD0 imul rcx, 28h ; '(' add rcx, cs:qword_10DBB8 cmp rax, rcx jz short loc_270CF mov rax, [rax+20h] jmp short loc_270D1 loc_270CF: xor eax, eax loc_270D1: pop rcx retn
long long sessions::find(sessions *this, const char *a2) { long long v2; // rax v2 = emhash8::HashMap<std::string,Session *,std::hash<std::string>,std::equal_to<std::string>>::find<char const*>(&username_map[abi:cxx11]); if ( v2 == qword_10DBB8 + 40LL * dword_10DBD0 ) return 0LL; else return *(_QWORD *)(v2 + 32); }
find: PUSH RAX MOV RSI,RSP MOV qword ptr [RSI],RDI LEA RDI,[0x20dbb0] CALL 0x001281cc MOVSXD RCX,dword ptr [0x0020dbd0] IMUL RCX,RCX,0x28 ADD RCX,qword ptr [0x0020dbb8] CMP RAX,RCX JZ 0x001270cf MOV RAX,qword ptr [RAX + 0x20] JMP 0x001270d1 LAB_001270cf: XOR EAX,EAX LAB_001270d1: POP RCX RET
/* sessions::find(char const*) */ int8 sessions::find(char *param_1) { long lVar1; int8 uVar2; char *local_8; local_8 = param_1; lVar1 = emhash8:: HashMap<std::__cxx11::string,Session*,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>> ::find<char_const*>((HashMap<std::__cxx11::string,Session*,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>> *)username_map_abi_cxx11_,&local_8); if (lVar1 == (long)(int)username_map_abi_cxx11_._32_4_ * 0x28 + username_map_abi_cxx11_._8_8_) { uVar2 = 0; } else { uVar2 = *(int8 *)(lVar1 + 0x20); } return uVar2; }
17,990
Engine::evaluateMaterial(chess::Board const&)
Razamindset[P]pawnstar-chess-engine/src/engine/eval.cpp
int Engine::evaluateMaterial(const Board& board) { constexpr int PAWN_VALUE = 100; constexpr int KNIGHT_VALUE = 300; constexpr int BISHOP_VALUE = 320; constexpr int ROOK_VALUE = 500; constexpr int QUEEN_VALUE = 900; auto countMaterial = [&](Color color) { return board.pieces(PieceType::PAWN, color).count() * PAWN_VALUE + board.pieces(PieceType::KNIGHT, color).count() * KNIGHT_VALUE + board.pieces(PieceType::BISHOP, color).count() * BISHOP_VALUE + board.pieces(PieceType::ROOK, color).count() * ROOK_VALUE + board.pieces(PieceType::QUEEN, color).count() * QUEEN_VALUE; }; return countMaterial(Color::WHITE) - countMaterial(Color::BLACK); }
O0
cpp
Engine::evaluateMaterial(chess::Board const&): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl $0x64, -0x14(%rbp) movl $0x12c, -0x18(%rbp) # imm = 0x12C movl $0x140, -0x1c(%rbp) # imm = 0x140 movl $0x1f4, -0x20(%rbp) # imm = 0x1F4 movl $0x384, -0x24(%rbp) # imm = 0x384 movq -0x10(%rbp), %rax movq %rax, -0x30(%rbp) leaq -0x31(%rbp), %rdi xorl %esi, %esi callq 0x5e10 leaq -0x30(%rbp), %rdi movzbl -0x31(%rbp), %esi callq 0x1f400 movl %eax, -0x38(%rbp) leaq -0x32(%rbp), %rdi movl $0x1, %esi callq 0x5e10 leaq -0x30(%rbp), %rdi movzbl -0x32(%rbp), %esi callq 0x1f400 movl %eax, %ecx movl -0x38(%rbp), %eax subl %ecx, %eax addq $0x40, %rsp popq %rbp retq nop
_ZN6Engine16evaluateMaterialERKN5chess5BoardE: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], 64h ; 'd' mov [rbp+var_18], 12Ch mov [rbp+var_1C], 140h mov [rbp+var_20], 1F4h mov [rbp+var_24], 384h mov rax, [rbp+var_10] mov [rbp+var_30], rax lea rdi, [rbp+var_31] xor esi, esi call _ZN5chess5ColorC2ENS0_10underlyingE; chess::Color::Color(chess::Color::underlying) lea rdi, [rbp+var_30] movzx esi, [rbp+var_31] call _ZZN6Engine16evaluateMaterialERKN5chess5BoardEENK3$_0clENS0_5ColorE; Engine::evaluateMaterial(chess::Board const&)::$_0::operator()(chess::Color) mov [rbp+var_38], eax lea rdi, [rbp+var_32] mov esi, 1 call _ZN5chess5ColorC2ENS0_10underlyingE; chess::Color::Color(chess::Color::underlying) lea rdi, [rbp+var_30] movzx esi, [rbp+var_32] call _ZZN6Engine16evaluateMaterialERKN5chess5BoardEENK3$_0clENS0_5ColorE; Engine::evaluateMaterial(chess::Board const&)::$_0::operator()(chess::Color) mov ecx, eax mov eax, [rbp+var_38] sub eax, ecx add rsp, 40h pop rbp retn
long long Engine::evaluateMaterial(Engine *this, const chess::Board *a2) { int v3; // [rsp+8h] [rbp-38h] unsigned __int8 v4; // [rsp+Eh] [rbp-32h] BYREF unsigned __int8 v5; // [rsp+Fh] [rbp-31h] BYREF const chess::Board *v6; // [rsp+10h] [rbp-30h] BYREF int v7; // [rsp+1Ch] [rbp-24h] int v8; // [rsp+20h] [rbp-20h] int v9; // [rsp+24h] [rbp-1Ch] int v10; // [rsp+28h] [rbp-18h] int v11; // [rsp+2Ch] [rbp-14h] const chess::Board *v12; // [rsp+30h] [rbp-10h] Engine *v13; // [rsp+38h] [rbp-8h] v13 = this; v12 = a2; v11 = 100; v10 = 300; v9 = 320; v8 = 500; v7 = 900; v6 = a2; chess::Color::Color(&v5, 0); v3 = Engine::evaluateMaterial(chess::Board const&)::$_0::operator()(&v6, v5); chess::Color::Color(&v4, 1); return v3 - (unsigned int)Engine::evaluateMaterial(chess::Board const&)::$_0::operator()(&v6, v4); }
evaluateMaterial: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],0x64 MOV dword ptr [RBP + -0x18],0x12c MOV dword ptr [RBP + -0x1c],0x140 MOV dword ptr [RBP + -0x20],0x1f4 MOV dword ptr [RBP + -0x24],0x384 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x30],RAX LEA RDI,[RBP + -0x31] XOR ESI,ESI CALL 0x00105e10 LEA RDI,[RBP + -0x30] MOVZX ESI,byte ptr [RBP + -0x31] CALL 0x0011f400 MOV dword ptr [RBP + -0x38],EAX LEA RDI,[RBP + -0x32] MOV ESI,0x1 CALL 0x00105e10 LEA RDI,[RBP + -0x30] MOVZX ESI,byte ptr [RBP + -0x32] CALL 0x0011f400 MOV ECX,EAX MOV EAX,dword ptr [RBP + -0x38] SUB EAX,ECX ADD RSP,0x40 POP RBP RET
/* Engine::evaluateMaterial(chess::Board const&) */ int __thiscall Engine::evaluateMaterial(Engine *this,Board *param_1) { int iVar1; int iVar2; Color local_3a; Color local_39; Board *local_38; int4 local_2c; int4 local_28; int4 local_24; int4 local_20; int4 local_1c; Board *local_18; Engine *local_10; local_1c = 100; local_20 = 300; local_24 = 0x140; local_28 = 500; local_2c = 900; local_38 = param_1; local_18 = param_1; local_10 = this; chess::Color::Color(&local_39,0); iVar1 = evaluateMaterial(chess::Board_const&)::$_0::operator()((__0 *)&local_38,local_39); chess::Color::Color(&local_3a,1); iVar2 = evaluateMaterial(chess::Board_const&)::$_0::operator()((__0 *)&local_38,local_3a); return iVar1 - iVar2; }
17,991
ft_init_stopwords
eloqsql/storage/myisam/ft_stopwords.c
int ft_init_stopwords() { DBUG_ENTER("ft_init_stopwords"); if (!stopwords3) { if (!(stopwords3=(TREE *)my_malloc(mi_key_memory_ft_stopwords, sizeof(TREE), MYF(0)))) DBUG_RETURN(-1); init_tree(stopwords3,0,0,sizeof(FT_STOPWORD),(qsort_cmp2)&FT_STOPWORD_cmp, (ft_stopword_file ? (tree_element_free)&FT_STOPWORD_free : 0), NULL, MYF(0)); /* Stopword engine currently does not support tricky character sets UCS2, UTF16, UTF32. Use latin1 to compare stopwords in case of these character sets. It's also fine to use latin1 with the built-in stopwords. */ ft_stopword_cs= default_charset_info->mbminlen == 1 ? default_charset_info : &my_charset_latin1; } if (ft_stopword_file) { File fd; size_t len; uchar *buffer, *start, *end; FT_WORD w; int error=-1; if (!*ft_stopword_file) DBUG_RETURN(0); if ((fd=my_open(ft_stopword_file, O_RDONLY, MYF(MY_WME))) == -1) DBUG_RETURN(-1); len=(size_t)my_seek(fd, 0L, MY_SEEK_END, MYF(0)); my_seek(fd, 0L, MY_SEEK_SET, MYF(0)); if (!(start= buffer= my_malloc(mi_key_memory_ft_stopwords, len+1, MYF(MY_WME)))) goto err0; len=my_read(fd, buffer, len, MYF(MY_WME)); end=start+len; while (ft_simple_get_word(ft_stopword_cs, &start, end, &w, TRUE)) { if (ft_add_stopword(my_strndup(mi_key_memory_ft_stopwords, (char*) w.pos, w.len, MYF(0)))) goto err1; } error=0; err1: my_free(buffer); err0: my_close(fd, MYF(MY_WME)); DBUG_RETURN(error); } else { /* compatibility mode: to be removed */ char **sws=(char **)ft_precompiled_stopwords; for (;*sws;sws++) { if (ft_add_stopword(*sws)) DBUG_RETURN(-1); } ft_stopword_file="(built-in)"; /* for SHOW VARIABLES */ } DBUG_RETURN(0); }
O0
c
ft_init_stopwords: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp cmpq $0x0, 0xbe3d80(%rip) # 0xc81340 jne 0x9d681 leaq 0xbe3dbf(%rip), %rax # 0xc8138c movl (%rax), %edi movl $0x298, %esi # imm = 0x298 xorl %eax, %eax movl %eax, %edx callq 0xf99f0 movq %rax, 0xbe3d5c(%rip) # 0xc81340 cmpq $0x0, %rax jne 0x9d5f8 jmp 0x9d5ec movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x9d82b movq 0xbe3d41(%rip), %rdi # 0xc81340 leaq 0xbe3d32(%rip), %rax # 0xc81338 movq (%rax), %rcx xorl %eax, %eax movl %eax, %r9d leaq 0x27b(%rip), %rax # 0x9d890 cmpq $0x0, %rcx cmovneq %rax, %r9 xorl %eax, %eax movl %eax, %edx movl $0x10, %ecx leaq 0x213(%rip), %r8 # 0x9d840 movq %rdx, %rsi movq $0x0, (%rsp) movq $0x0, 0x8(%rsp) callq 0x1004b0 leaq 0x229553(%rip), %rax # 0x2c6ba0 movq (%rax), %rax cmpl $0x1, 0x98(%rax) jne 0x9d669 leaq 0x229540(%rip), %rax # 0x2c6ba0 movq (%rax), %rax movq %rax, -0x58(%rbp) jmp 0x9d676 leaq 0x2cfe40(%rip), %rax # 0x36d4b0 movq %rax, -0x58(%rbp) jmp 0x9d676 movq -0x58(%rbp), %rax movq %rax, 0xbe3cc7(%rip) # 0xc81348 leaq 0xbe3cb0(%rip), %rax # 0xc81338 cmpq $0x0, (%rax) je 0x9d7d0 movl $0xffffffff, -0x44(%rbp) # imm = 0xFFFFFFFF leaq 0xbe3c98(%rip), %rax # 0xc81338 movq (%rax), %rax cmpb $0x0, (%rax) jne 0x9d6b6 jmp 0x9d6aa movl $0x0, -0x4(%rbp) jmp 0x9d82b leaq 0xbe3c7b(%rip), %rax # 0xc81338 movq (%rax), %rdi xorl %esi, %esi movl $0x10, %edx callq 0xfa360 movl %eax, -0x8(%rbp) cmpl $-0x1, %eax jne 0x9d6e2 jmp 0x9d6d6 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x9d82b movl -0x8(%rbp), %edi xorl %eax, %eax movl %eax, %ecx movl $0x2, %edx movq %rcx, %rsi callq 0xfad90 movq %rax, -0x10(%rbp) movl -0x8(%rbp), %edi xorl %eax, %eax movl %eax, %ecx xorl %edx, %edx movq %rcx, %rsi callq 0xfad90 leaq 0xbe3c7a(%rip), %rax # 0xc8138c movl (%rax), %edi movq -0x10(%rbp), %rsi addq $0x1, %rsi movl $0x10, %edx callq 0xf99f0 movq %rax, -0x18(%rbp) movq %rax, -0x20(%rbp) cmpq $0x0, %rax jne 0x9d739 jmp 0x9d7bb movl -0x8(%rbp), %edi movq -0x18(%rbp), %rsi movq -0x10(%rbp), %rdx movl $0x10, %ecx callq 0xfab70 movq %rax, -0x10(%rbp) movq -0x20(%rbp), %rax addq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) movq 0xbe3be3(%rip), %rdi # 0xc81348 movq -0x28(%rbp), %rdx leaq -0x20(%rbp), %rsi leaq -0x40(%rbp), %rcx movl $0x1, %r8d callq 0xa1c40 cmpb $0x0, %al je 0x9d7ab leaq 0xbe3c05(%rip), %rax # 0xc8138c movl (%rax), %edi movq -0x40(%rbp), %rsi movq -0x30(%rbp), %rdx xorl %eax, %eax movl %eax, %ecx callq 0xf9ee0 movq %rax, %rdi callq 0x9d8c0 cmpl $0x0, %eax je 0x9d7a9 jmp 0x9d7b2 jmp 0x9d75e movl $0x0, -0x44(%rbp) movq -0x18(%rbp), %rdi callq 0xf9d70 movl -0x8(%rbp), %edi movl $0x10, %esi callq 0xfa5f0 movl -0x44(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x9d82b leaq 0x227d49(%rip), %rax # 0x2c5520 movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax cmpq $0x0, (%rax) je 0x9d811 movq -0x50(%rbp), %rax movq (%rax), %rdi callq 0x9d8c0 cmpl $0x0, %eax je 0x9d801 jmp 0x9d7f8 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x9d82b jmp 0x9d803 movq -0x50(%rbp), %rax addq $0x8, %rax movq %rax, -0x50(%rbp) jmp 0x9d7db leaq 0xbe3b20(%rip), %rax # 0xc81338 leaq 0xbbeb2(%rip), %rcx # 0x1596d1 movq %rcx, (%rax) jmp 0x9d824 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x70, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ft_init_stopwords: push rbp mov rbp, rsp sub rsp, 70h cmp cs:stopwords3, 0 jnz loc_9D681 lea rax, mi_key_memory_ft_stopwords mov edi, [rax] mov esi, 298h xor eax, eax mov edx, eax call my_malloc mov cs:stopwords3, rax cmp rax, 0 jnz short loc_9D5F8 jmp short $+2 loc_9D5EC: mov [rbp+var_4], 0FFFFFFFFh jmp loc_9D82B loc_9D5F8: mov rdi, cs:stopwords3 lea rax, ft_stopword_file mov rcx, [rax] xor eax, eax mov r9d, eax lea rax, FT_STOPWORD_free cmp rcx, 0 cmovnz r9, rax xor eax, eax mov edx, eax mov ecx, 10h lea r8, FT_STOPWORD_cmp mov rsi, rdx mov [rsp+70h+var_70], 0 mov [rsp+70h+var_68], 0 call init_tree lea rax, default_charset_info mov rax, [rax] cmp dword ptr [rax+98h], 1 jnz short loc_9D669 lea rax, default_charset_info mov rax, [rax] mov [rbp+var_58], rax jmp short loc_9D676 loc_9D669: lea rax, my_charset_latin1 mov [rbp+var_58], rax jmp short $+2 loc_9D676: mov rax, [rbp+var_58] mov cs:ft_stopword_cs, rax loc_9D681: lea rax, ft_stopword_file cmp qword ptr [rax], 0 jz loc_9D7D0 mov [rbp+var_44], 0FFFFFFFFh lea rax, ft_stopword_file mov rax, [rax] cmp byte ptr [rax], 0 jnz short loc_9D6B6 jmp short $+2 loc_9D6AA: mov [rbp+var_4], 0 jmp loc_9D82B loc_9D6B6: lea rax, ft_stopword_file mov rdi, [rax] xor esi, esi mov edx, 10h call my_open mov [rbp+var_8], eax cmp eax, 0FFFFFFFFh jnz short loc_9D6E2 jmp short $+2 loc_9D6D6: mov [rbp+var_4], 0FFFFFFFFh jmp loc_9D82B loc_9D6E2: mov edi, [rbp+var_8] xor eax, eax mov ecx, eax mov edx, 2 mov rsi, rcx call my_seek mov [rbp+var_10], rax mov edi, [rbp+var_8] xor eax, eax mov ecx, eax xor edx, edx mov rsi, rcx call my_seek lea rax, mi_key_memory_ft_stopwords mov edi, [rax] mov rsi, [rbp+var_10] add rsi, 1 mov edx, 10h call my_malloc mov [rbp+var_18], rax mov [rbp+var_20], rax cmp rax, 0 jnz short loc_9D739 jmp loc_9D7BB loc_9D739: mov edi, [rbp+var_8] mov rsi, [rbp+var_18] mov rdx, [rbp+var_10] mov ecx, 10h call my_read mov [rbp+var_10], rax mov rax, [rbp+var_20] add rax, [rbp+var_10] mov [rbp+var_28], rax loc_9D75E: mov rdi, cs:ft_stopword_cs mov rdx, [rbp+var_28] lea rsi, [rbp+var_20] lea rcx, [rbp+var_40] mov r8d, 1 call ft_simple_get_word cmp al, 0 jz short loc_9D7AB lea rax, mi_key_memory_ft_stopwords mov edi, [rax] mov rsi, [rbp+var_40] mov rdx, [rbp+var_30] xor eax, eax mov ecx, eax call my_strndup mov rdi, rax call ft_add_stopword cmp eax, 0 jz short loc_9D7A9 jmp short loc_9D7B2 loc_9D7A9: jmp short loc_9D75E loc_9D7AB: mov [rbp+var_44], 0 loc_9D7B2: mov rdi, [rbp+var_18] call my_free loc_9D7BB: mov edi, [rbp+var_8] mov esi, 10h call my_close mov eax, [rbp+var_44] mov [rbp+var_4], eax jmp short loc_9D82B loc_9D7D0: lea rax, ft_precompiled_stopwords mov [rbp+var_50], rax loc_9D7DB: mov rax, [rbp+var_50] cmp qword ptr [rax], 0 jz short loc_9D811 mov rax, [rbp+var_50] mov rdi, [rax] call ft_add_stopword cmp eax, 0 jz short loc_9D801 jmp short $+2 loc_9D7F8: mov [rbp+var_4], 0FFFFFFFFh jmp short loc_9D82B loc_9D801: jmp short $+2 loc_9D803: mov rax, [rbp+var_50] add rax, 8 mov [rbp+var_50], rax jmp short loc_9D7DB loc_9D811: lea rax, ft_stopword_file lea rcx, aBuiltIn; "(built-in)" mov [rax], rcx jmp short $+2 loc_9D824: mov [rbp+var_4], 0 loc_9D82B: mov eax, [rbp+var_4] add rsp, 70h pop rbp retn
long long ft_init_stopwords() { long long ( *v0)(); // r9 long long v1; // rax void *v3; // [rsp+18h] [rbp-58h] char **i; // [rsp+20h] [rbp-50h] unsigned int v5; // [rsp+2Ch] [rbp-44h] _QWORD v6[3]; // [rsp+30h] [rbp-40h] BYREF long long v7; // [rsp+48h] [rbp-28h] long long v8; // [rsp+50h] [rbp-20h] BYREF long long v9; // [rsp+58h] [rbp-18h] long long v10; // [rsp+60h] [rbp-10h] unsigned int v11; // [rsp+68h] [rbp-8h] if ( !stopwords3 ) { stopwords3 = my_malloc(mi_key_memory_ft_stopwords, 664LL, 0LL); if ( !stopwords3 ) return (unsigned int)-1; LODWORD(v0) = 0; if ( ft_stopword_file ) v0 = FT_STOPWORD_free; init_tree(stopwords3, 0, 0, 16, (unsigned int)FT_STOPWORD_cmp, (_DWORD)v0, 0LL, 0LL); if ( *((_DWORD *)default_charset_info + 38) == 1 ) v3 = default_charset_info; else v3 = &my_charset_latin1; ft_stopword_cs = (long long)v3; } if ( ft_stopword_file ) { v5 = -1; if ( *ft_stopword_file ) { v11 = my_open(ft_stopword_file, 0LL, 16LL); if ( v11 == -1 ) { return (unsigned int)-1; } else { v10 = my_seek(v11, 0LL, 2LL, 0LL); my_seek(v11, 0LL, 0LL, 0LL); v9 = my_malloc(mi_key_memory_ft_stopwords, v10 + 1, 16LL); v8 = v9; if ( v9 ) { v10 = my_read(v11, v9, v10, 16LL); v7 = v10 + v8; while ( (unsigned __int8)ft_simple_get_word(ft_stopword_cs, &v8, v7, v6, 1LL) ) { v1 = my_strndup(mi_key_memory_ft_stopwords, v6[0], v6[2], 0LL); if ( (unsigned int)ft_add_stopword(v1) ) goto LABEL_21; } v5 = 0; LABEL_21: my_free(v9); } my_close(v11, 16LL); return v5; } } else { return 0; } } else { for ( i = &ft_precompiled_stopwords; *i; ++i ) { if ( (unsigned int)ft_add_stopword(*i) ) return (unsigned int)-1; } ft_stopword_file = "(built-in)"; return 0; } }
ft_init_stopwords: PUSH RBP MOV RBP,RSP SUB RSP,0x70 CMP qword ptr [0x00d81340],0x0 JNZ 0x0019d681 LEA RAX,[0xd8138c] MOV EDI,dword ptr [RAX] MOV ESI,0x298 XOR EAX,EAX MOV EDX,EAX CALL 0x001f99f0 MOV qword ptr [0x00d81340],RAX CMP RAX,0x0 JNZ 0x0019d5f8 JMP 0x0019d5ec LAB_0019d5ec: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0019d82b LAB_0019d5f8: MOV RDI,qword ptr [0x00d81340] LEA RAX,[0xd81338] MOV RCX,qword ptr [RAX] XOR EAX,EAX MOV R9D,EAX LEA RAX,[0x19d890] CMP RCX,0x0 CMOVNZ R9,RAX XOR EAX,EAX MOV EDX,EAX MOV ECX,0x10 LEA R8,[0x19d840] MOV RSI,RDX MOV qword ptr [RSP],0x0 MOV qword ptr [RSP + 0x8],0x0 CALL 0x002004b0 LEA RAX,[0x3c6ba0] MOV RAX,qword ptr [RAX] CMP dword ptr [RAX + 0x98],0x1 JNZ 0x0019d669 LEA RAX,[0x3c6ba0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x58],RAX JMP 0x0019d676 LAB_0019d669: LEA RAX,[0x46d4b0] MOV qword ptr [RBP + -0x58],RAX JMP 0x0019d676 LAB_0019d676: MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [0x00d81348],RAX LAB_0019d681: LEA RAX,[0xd81338] CMP qword ptr [RAX],0x0 JZ 0x0019d7d0 MOV dword ptr [RBP + -0x44],0xffffffff LEA RAX,[0xd81338] MOV RAX,qword ptr [RAX] CMP byte ptr [RAX],0x0 JNZ 0x0019d6b6 JMP 0x0019d6aa LAB_0019d6aa: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0019d82b LAB_0019d6b6: LEA RAX,[0xd81338] MOV RDI,qword ptr [RAX] XOR ESI,ESI MOV EDX,0x10 CALL 0x001fa360 MOV dword ptr [RBP + -0x8],EAX CMP EAX,-0x1 JNZ 0x0019d6e2 JMP 0x0019d6d6 LAB_0019d6d6: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0019d82b LAB_0019d6e2: MOV EDI,dword ptr [RBP + -0x8] XOR EAX,EAX MOV ECX,EAX MOV EDX,0x2 MOV RSI,RCX CALL 0x001fad90 MOV qword ptr [RBP + -0x10],RAX MOV EDI,dword ptr [RBP + -0x8] XOR EAX,EAX MOV ECX,EAX XOR EDX,EDX MOV RSI,RCX CALL 0x001fad90 LEA RAX,[0xd8138c] MOV EDI,dword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x1 MOV EDX,0x10 CALL 0x001f99f0 MOV qword ptr [RBP + -0x18],RAX MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JNZ 0x0019d739 JMP 0x0019d7bb LAB_0019d739: MOV EDI,dword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,0x10 CALL 0x001fab70 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x28],RAX LAB_0019d75e: MOV RDI,qword ptr [0x00d81348] MOV RDX,qword ptr [RBP + -0x28] LEA RSI,[RBP + -0x20] LEA RCX,[RBP + -0x40] MOV R8D,0x1 CALL 0x001a1c40 CMP AL,0x0 JZ 0x0019d7ab LEA RAX,[0xd8138c] MOV EDI,dword ptr [RAX] MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x30] XOR EAX,EAX MOV ECX,EAX CALL 0x001f9ee0 MOV RDI,RAX CALL 0x0019d8c0 CMP EAX,0x0 JZ 0x0019d7a9 JMP 0x0019d7b2 LAB_0019d7a9: JMP 0x0019d75e LAB_0019d7ab: MOV dword ptr [RBP + -0x44],0x0 LAB_0019d7b2: MOV RDI,qword ptr [RBP + -0x18] CALL 0x001f9d70 LAB_0019d7bb: MOV EDI,dword ptr [RBP + -0x8] MOV ESI,0x10 CALL 0x001fa5f0 MOV EAX,dword ptr [RBP + -0x44] MOV dword ptr [RBP + -0x4],EAX JMP 0x0019d82b LAB_0019d7d0: LEA RAX,[0x3c5520] MOV qword ptr [RBP + -0x50],RAX LAB_0019d7db: MOV RAX,qword ptr [RBP + -0x50] CMP qword ptr [RAX],0x0 JZ 0x0019d811 MOV RAX,qword ptr [RBP + -0x50] MOV RDI,qword ptr [RAX] CALL 0x0019d8c0 CMP EAX,0x0 JZ 0x0019d801 JMP 0x0019d7f8 LAB_0019d7f8: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0019d82b LAB_0019d801: JMP 0x0019d803 LAB_0019d803: MOV RAX,qword ptr [RBP + -0x50] ADD RAX,0x8 MOV qword ptr [RBP + -0x50],RAX JMP 0x0019d7db LAB_0019d811: LEA RAX,[0xd81338] LEA RCX,[0x2596d1] MOV qword ptr [RAX],RCX JMP 0x0019d824 LAB_0019d824: MOV dword ptr [RBP + -0x4],0x0 LAB_0019d82b: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x70 POP RBP RET
int4 ft_init_stopwords(void) { char cVar1; int iVar2; int8 uVar3; code *pcVar4; int4 *local_60; int **local_58; int4 local_4c; int8 local_48 [2]; int8 local_38; long local_30; long local_28; long local_20; long local_18; int local_10; int4 local_c; if (stopwords3 == 0) { stopwords3 = my_malloc(mi_key_memory_ft_stopwords,0x298,0); if (stopwords3 == 0) { return 0xffffffff; } pcVar4 = (code *)0x0; if (ft_stopword_file != (char *)0x0) { pcVar4 = FT_STOPWORD_free; } init_tree(stopwords3,0,0,0x10,FT_STOPWORD_cmp,pcVar4,0,0); if (*(int *)(default_charset_info + 0x98) == 1) { local_60 = (int4 *)default_charset_info; } else { local_60 = &my_charset_latin1; } ft_stopword_cs = local_60; } if (ft_stopword_file == (char *)0x0) { for (local_58 = &ft_precompiled_stopwords; *local_58 != (int *)0x0; local_58 = local_58 + 1) { iVar2 = ft_add_stopword(*local_58); if (iVar2 != 0) { return 0xffffffff; } } ft_stopword_file = "(built-in)"; local_c = 0; } else { local_4c = 0xffffffff; if (*ft_stopword_file == '\0') { local_c = 0; } else { local_10 = my_open(ft_stopword_file,0,0x10); if (local_10 == -1) { local_c = 0xffffffff; } else { local_18 = my_seek(local_10,0,2); my_seek(local_10,0,0); local_28 = my_malloc(mi_key_memory_ft_stopwords,local_18 + 1,0x10); local_20 = local_28; if (local_28 != 0) { local_18 = my_read(local_10,local_28,local_18,0x10); local_30 = local_28 + local_18; do { cVar1 = ft_simple_get_word(ft_stopword_cs,&local_28,local_30,local_48,1); if (cVar1 == '\0') { local_4c = 0; break; } uVar3 = my_strndup(mi_key_memory_ft_stopwords,local_48[0],local_38,0); iVar2 = ft_add_stopword(uVar3); } while (iVar2 == 0); my_free(local_20); } my_close(local_10,0x10); local_c = local_4c; } } } return local_c; }
17,992
ft_init_stopwords
eloqsql/storage/myisam/ft_stopwords.c
int ft_init_stopwords() { DBUG_ENTER("ft_init_stopwords"); if (!stopwords3) { if (!(stopwords3=(TREE *)my_malloc(mi_key_memory_ft_stopwords, sizeof(TREE), MYF(0)))) DBUG_RETURN(-1); init_tree(stopwords3,0,0,sizeof(FT_STOPWORD),(qsort_cmp2)&FT_STOPWORD_cmp, (ft_stopword_file ? (tree_element_free)&FT_STOPWORD_free : 0), NULL, MYF(0)); /* Stopword engine currently does not support tricky character sets UCS2, UTF16, UTF32. Use latin1 to compare stopwords in case of these character sets. It's also fine to use latin1 with the built-in stopwords. */ ft_stopword_cs= default_charset_info->mbminlen == 1 ? default_charset_info : &my_charset_latin1; } if (ft_stopword_file) { File fd; size_t len; uchar *buffer, *start, *end; FT_WORD w; int error=-1; if (!*ft_stopword_file) DBUG_RETURN(0); if ((fd=my_open(ft_stopword_file, O_RDONLY, MYF(MY_WME))) == -1) DBUG_RETURN(-1); len=(size_t)my_seek(fd, 0L, MY_SEEK_END, MYF(0)); my_seek(fd, 0L, MY_SEEK_SET, MYF(0)); if (!(start= buffer= my_malloc(mi_key_memory_ft_stopwords, len+1, MYF(MY_WME)))) goto err0; len=my_read(fd, buffer, len, MYF(MY_WME)); end=start+len; while (ft_simple_get_word(ft_stopword_cs, &start, end, &w, TRUE)) { if (ft_add_stopword(my_strndup(mi_key_memory_ft_stopwords, (char*) w.pos, w.len, MYF(0)))) goto err1; } error=0; err1: my_free(buffer); err0: my_close(fd, MYF(MY_WME)); DBUG_RETURN(error); } else { /* compatibility mode: to be removed */ char **sws=(char **)ft_precompiled_stopwords; for (;*sws;sws++) { if (ft_add_stopword(*sws)) DBUG_RETURN(-1); } ft_stopword_file="(built-in)"; /* for SHOW VARIABLES */ } DBUG_RETURN(0); }
O3
c
ft_init_stopwords: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp cmpq $0x0, 0xb92a57(%rip) # 0xc05620 jne 0x72c48 leaq 0xb92a9a(%rip), %rax # 0xc0566c movl (%rax), %edi movl $0x298, %esi # imm = 0x298 xorl %edx, %edx callq 0xa46f9 movq %rax, 0xb92a39(%rip) # 0xc05620 testq %rax, %rax je 0x72d7a leaq 0xb92a21(%rip), %rcx # 0xc05618 movq (%rcx), %rcx testq %rcx, %rcx leaq 0x1cb(%rip), %r9 # 0x72dcf cmoveq %rcx, %r9 xorps %xmm0, %xmm0 movups %xmm0, (%rsp) leaq 0x191(%rip), %r8 # 0x72da7 movq %rax, %rdi xorl %esi, %esi xorl %edx, %edx movl $0x10, %ecx callq 0xa8f1c leaq 0x318e12(%rip), %rax # 0x38ba40 movq (%rax), %rax cmpl $0x1, 0x98(%rax) je 0x72c41 leaq 0x33f69f(%rip), %rax # 0x3b22e0 movq %rax, 0xb929e0(%rip) # 0xc05628 leaq 0xb929c9(%rip), %rbx # 0xc05618 movq (%rbx), %rdi testq %rdi, %rdi je 0x72d43 cmpb $0x0, (%rdi) je 0x72d75 movl $0x10, %edx xorl %esi, %esi callq 0xa4cbc cmpl $-0x1, %eax je 0x72d7a movl %eax, %r12d movl %eax, %edi xorl %esi, %esi movl $0x2, %edx xorl %ecx, %ecx callq 0xa547c movq %rax, %rbx movl %r12d, %edi xorl %esi, %esi xorl %edx, %edx xorl %ecx, %ecx callq 0xa547c leaq 0xb929c8(%rip), %r15 # 0xc0566c movl (%r15), %edi leaq 0x1(%rbx), %rsi movl $0x10, %edx callq 0xa46f9 movq %rax, -0x40(%rbp) testq %rax, %rax je 0x72d82 movq %rax, %r14 movl $0x10, %ecx movl %r12d, -0x2c(%rbp) movl %r12d, %edi movq %rax, %rsi movq %rbx, %rdx callq 0xa527c movq %rax, %r12 movq %r14, -0x38(%rbp) addq %r14, %r12 leaq -0x40(%rbp), %r13 leaq -0x58(%rbp), %rbx xorl %r14d, %r14d movq 0xb92930(%rip), %rdi # 0xc05628 movq %r13, %rsi movq %r12, %rdx movq %rbx, %rcx movl $0x1, %r8d callq 0x751d9 testb %al, %al je 0x72d34 movl (%r15), %edi movq -0x58(%rbp), %rsi movq -0x48(%rbp), %rdx xorl %ecx, %ecx callq 0xa4a10 movq %rax, %rdi callq 0x72de4 testl %eax, %eax je 0x72cf1 movl $0xffffffff, %r14d # imm = 0xFFFFFFFF movq -0x38(%rbp), %rdi callq 0xa4926 movl -0x2c(%rbp), %r12d jmp 0x72d88 leaq 0x3177d6(%rip), %r14 # 0x38a520 movq (%r14), %rdi testq %rdi, %rdi je 0x72d6b addq $0x8, %r14 callq 0x72de4 testl %eax, %eax jne 0x72d7a movq (%r14), %rdi addq $0x8, %r14 testq %rdi, %rdi jne 0x72d56 leaq 0x6c963(%rip), %rax # 0xdf6d5 movq %rax, (%rbx) xorl %r14d, %r14d jmp 0x72d95 movl $0xffffffff, %r14d # imm = 0xFFFFFFFF jmp 0x72d95 movl $0xffffffff, %r14d # imm = 0xFFFFFFFF movl $0x10, %esi movl %r12d, %edi callq 0xa4e61 movl %r14d, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ft_init_stopwords: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h cmp cs:stopwords3, 0 jnz short loc_72C48 lea rax, mi_key_memory_ft_stopwords mov edi, [rax] mov esi, 298h xor edx, edx call my_malloc mov cs:stopwords3, rax test rax, rax jz loc_72D7A lea rcx, ft_stopword_file mov rcx, [rcx] test rcx, rcx lea r9, FT_STOPWORD_free cmovz r9, rcx xorps xmm0, xmm0 movups [rsp+70h+var_70], xmm0 lea r8, FT_STOPWORD_cmp mov rdi, rax xor esi, esi xor edx, edx mov ecx, 10h call init_tree lea rax, default_charset_info mov rax, [rax] cmp dword ptr [rax+98h], 1 jz short loc_72C41 lea rax, my_charset_latin1 loc_72C41: mov cs:ft_stopword_cs, rax loc_72C48: lea rbx, ft_stopword_file mov rdi, [rbx] test rdi, rdi jz loc_72D43 cmp byte ptr [rdi], 0 jz loc_72D75 mov edx, 10h xor esi, esi call my_open cmp eax, 0FFFFFFFFh jz loc_72D7A mov r12d, eax mov edi, eax xor esi, esi mov edx, 2 xor ecx, ecx call my_seek mov rbx, rax mov edi, r12d xor esi, esi xor edx, edx xor ecx, ecx call my_seek lea r15, mi_key_memory_ft_stopwords mov edi, [r15] lea rsi, [rbx+1] mov edx, 10h call my_malloc mov [rbp+var_40], rax test rax, rax jz loc_72D82 mov r14, rax mov ecx, 10h mov [rbp+var_2C], r12d mov edi, r12d mov rsi, rax mov rdx, rbx call my_read mov r12, rax mov [rbp+var_38], r14 add r12, r14 lea r13, [rbp+var_40] lea rbx, [rbp+var_58] xor r14d, r14d loc_72CF1: mov rdi, cs:ft_stopword_cs mov rsi, r13 mov rdx, r12 mov rcx, rbx mov r8d, 1 call ft_simple_get_word test al, al jz short loc_72D34 mov edi, [r15] mov rsi, [rbp+var_58] mov rdx, [rbp+var_48] xor ecx, ecx call my_strndup mov rdi, rax call ft_add_stopword test eax, eax jz short loc_72CF1 mov r14d, 0FFFFFFFFh loc_72D34: mov rdi, [rbp+var_38] call my_free mov r12d, [rbp+var_2C] jmp short loc_72D88 loc_72D43: lea r14, ft_precompiled_stopwords mov rdi, [r14] test rdi, rdi jz short loc_72D6B add r14, 8 loc_72D56: call ft_add_stopword test eax, eax jnz short loc_72D7A mov rdi, [r14] add r14, 8 test rdi, rdi jnz short loc_72D56 loc_72D6B: lea rax, aBuiltIn; "(built-in)" mov [rbx], rax loc_72D75: xor r14d, r14d jmp short loc_72D95 loc_72D7A: mov r14d, 0FFFFFFFFh jmp short loc_72D95 loc_72D82: mov r14d, 0FFFFFFFFh loc_72D88: mov esi, 10h mov edi, r12d call my_close loc_72D95: mov eax, r14d add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ft_init_stopwords() { long long v0; // rax long long ( *v1)(); // r9 void *v2; // rax unsigned int v3; // eax unsigned int v4; // r12d long long v5; // rbx long long v6; // rax long long v7; // r12 unsigned int v8; // r14d long long v9; // rax char **v10; // r14 _QWORD v13[3]; // [rsp+18h] [rbp-58h] BYREF long long v14; // [rsp+30h] [rbp-40h] BYREF long long v15; // [rsp+38h] [rbp-38h] unsigned int v16; // [rsp+44h] [rbp-2Ch] if ( !stopwords3 ) { v0 = my_malloc(mi_key_memory_ft_stopwords, 664LL, 0LL); stopwords3 = v0; if ( !v0 ) return (unsigned int)-1; v1 = FT_STOPWORD_free; if ( !ft_stopword_file ) LODWORD(v1) = 0; init_tree(v0, 0, 0, 16, (unsigned int)FT_STOPWORD_cmp, (_DWORD)v1, 0LL, 0LL); v2 = default_charset_info; if ( *((_DWORD *)default_charset_info + 38) != 1 ) v2 = &my_charset_latin1; ft_stopword_cs = (long long)v2; } if ( !ft_stopword_file ) { if ( ft_precompiled_stopwords ) { v10 = &ft_precompiled_stopwords + 1; while ( !(unsigned int)((long long (*)(void))ft_add_stopword)() ) { if ( !*v10++ ) goto LABEL_21; } return (unsigned int)-1; } LABEL_21: ft_stopword_file = "(built-in)"; return 0; } if ( !*ft_stopword_file ) return 0; v3 = my_open(ft_stopword_file, 0LL, 16LL); if ( v3 == -1 ) return (unsigned int)-1; v4 = v3; v5 = my_seek(v3, 0LL, 2LL, 0LL); my_seek(v4, 0LL, 0LL, 0LL); v6 = my_malloc(mi_key_memory_ft_stopwords, v5 + 1, 16LL); v14 = v6; if ( v6 ) { v16 = v4; v15 = v6; v7 = v6 + my_read(v4, v6, v5, 16LL); v8 = 0; while ( (unsigned __int8)ft_simple_get_word(ft_stopword_cs, &v14, v7, v13, 1LL) ) { v9 = my_strndup(mi_key_memory_ft_stopwords, v13[0], v13[2], 0LL); if ( (unsigned int)ft_add_stopword(v9) ) { v8 = -1; break; } } my_free(v15); v4 = v16; } else { v8 = -1; } my_close(v4, 16LL); return v8; }
ft_init_stopwords: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 CMP qword ptr [0x00d05620],0x0 JNZ 0x00172c48 LEA RAX,[0xd0566c] MOV EDI,dword ptr [RAX] MOV ESI,0x298 XOR EDX,EDX CALL 0x001a46f9 MOV qword ptr [0x00d05620],RAX TEST RAX,RAX JZ 0x00172d7a LEA RCX,[0xd05618] MOV RCX,qword ptr [RCX] TEST RCX,RCX LEA R9,[0x172dcf] CMOVZ R9,RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP],XMM0 LEA R8,[0x172da7] MOV RDI,RAX XOR ESI,ESI XOR EDX,EDX MOV ECX,0x10 CALL 0x001a8f1c LEA RAX,[0x48ba40] MOV RAX,qword ptr [RAX] CMP dword ptr [RAX + 0x98],0x1 JZ 0x00172c41 LEA RAX,[0x4b22e0] LAB_00172c41: MOV qword ptr [0x00d05628],RAX LAB_00172c48: LEA RBX,[0xd05618] MOV RDI,qword ptr [RBX] TEST RDI,RDI JZ 0x00172d43 CMP byte ptr [RDI],0x0 JZ 0x00172d75 MOV EDX,0x10 XOR ESI,ESI CALL 0x001a4cbc CMP EAX,-0x1 JZ 0x00172d7a MOV R12D,EAX MOV EDI,EAX XOR ESI,ESI MOV EDX,0x2 XOR ECX,ECX CALL 0x001a547c MOV RBX,RAX MOV EDI,R12D XOR ESI,ESI XOR EDX,EDX XOR ECX,ECX CALL 0x001a547c LEA R15,[0xd0566c] MOV EDI,dword ptr [R15] LEA RSI,[RBX + 0x1] MOV EDX,0x10 CALL 0x001a46f9 MOV qword ptr [RBP + -0x40],RAX TEST RAX,RAX JZ 0x00172d82 MOV R14,RAX MOV ECX,0x10 MOV dword ptr [RBP + -0x2c],R12D MOV EDI,R12D MOV RSI,RAX MOV RDX,RBX CALL 0x001a527c MOV R12,RAX MOV qword ptr [RBP + -0x38],R14 ADD R12,R14 LEA R13,[RBP + -0x40] LEA RBX,[RBP + -0x58] XOR R14D,R14D LAB_00172cf1: MOV RDI,qword ptr [0x00d05628] MOV RSI,R13 MOV RDX,R12 MOV RCX,RBX MOV R8D,0x1 CALL 0x001751d9 TEST AL,AL JZ 0x00172d34 MOV EDI,dword ptr [R15] MOV RSI,qword ptr [RBP + -0x58] MOV RDX,qword ptr [RBP + -0x48] XOR ECX,ECX CALL 0x001a4a10 MOV RDI,RAX CALL 0x00172de4 TEST EAX,EAX JZ 0x00172cf1 MOV R14D,0xffffffff LAB_00172d34: MOV RDI,qword ptr [RBP + -0x38] CALL 0x001a4926 MOV R12D,dword ptr [RBP + -0x2c] JMP 0x00172d88 LAB_00172d43: LEA R14,[0x48a520] MOV RDI,qword ptr [R14] TEST RDI,RDI JZ 0x00172d6b ADD R14,0x8 LAB_00172d56: CALL 0x00172de4 TEST EAX,EAX JNZ 0x00172d7a MOV RDI,qword ptr [R14] ADD R14,0x8 TEST RDI,RDI JNZ 0x00172d56 LAB_00172d6b: LEA RAX,[0x1df6d5] MOV qword ptr [RBX],RAX LAB_00172d75: XOR R14D,R14D JMP 0x00172d95 LAB_00172d7a: MOV R14D,0xffffffff JMP 0x00172d95 LAB_00172d82: MOV R14D,0xffffffff LAB_00172d88: MOV ESI,0x10 MOV EDI,R12D CALL 0x001a4e61 LAB_00172d95: MOV EAX,R14D ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 ft_init_stopwords(void) { int *puVar1; char cVar2; int iVar3; long lVar4; long lVar5; int8 uVar6; code *pcVar7; int8 uVar8; int **ppuVar9; int8 local_60 [2]; int8 local_50; long local_48; long local_40; int local_34; if (stopwords3 == 0) { stopwords3 = my_malloc(mi_key_memory_ft_stopwords,0x298,0); if (stopwords3 != 0) { pcVar7 = FT_STOPWORD_free; if (ft_stopword_file == (char *)0x0) { pcVar7 = (code *)0x0; } init_tree(stopwords3,0,0,0x10,FT_STOPWORD_cmp,pcVar7,0,0); ft_stopword_cs = (int4 *)default_charset_info; if (*(int *)(default_charset_info + 0x98) != 1) { ft_stopword_cs = &my_charset_latin1; } goto LAB_00172c48; } LAB_00172d7a: uVar8 = 0xffffffff; } else { LAB_00172c48: if (ft_stopword_file == (char *)0x0) { if (ft_precompiled_stopwords != (int *)0x0) { ppuVar9 = &PTR_s_able_0048a528; do { iVar3 = ft_add_stopword(); if (iVar3 != 0) goto LAB_00172d7a; puVar1 = *ppuVar9; ppuVar9 = ppuVar9 + 1; } while (puVar1 != (int *)0x0); } ft_stopword_file = "(built-in)"; } else if (*ft_stopword_file != '\0') { iVar3 = my_open(ft_stopword_file,0,0x10); if (iVar3 != -1) { lVar4 = my_seek(iVar3,0,2,0); my_seek(iVar3,0,0,0); lVar5 = my_malloc(mi_key_memory_ft_stopwords,lVar4 + 1,0x10); local_48 = lVar5; if (lVar5 == 0) { uVar8 = 0xffffffff; } else { local_34 = iVar3; lVar4 = my_read(iVar3,lVar5,lVar4,0x10); uVar8 = 0; local_40 = lVar5; do { cVar2 = ft_simple_get_word(ft_stopword_cs,&local_48,lVar4 + lVar5,local_60,1); if (cVar2 == '\0') goto LAB_00172d34; uVar6 = my_strndup(mi_key_memory_ft_stopwords,local_60[0],local_50,0); iVar3 = ft_add_stopword(uVar6); } while (iVar3 == 0); uVar8 = 0xffffffff; LAB_00172d34: my_free(local_40); iVar3 = local_34; } my_close(iVar3,0x10); return uVar8; } goto LAB_00172d7a; } uVar8 = 0; } return uVar8; }
17,993
qdevtools::registerBuildinEditor()
HuaiminNotSleepYet[P]QDevTools/qdevtools.cpp
void registerBuildinEditor() { registerBuiltinEditor<QSizeEdit>(); registerBuiltinEditor<QRectEdit>(); registerBuiltinEditor<QMarginsEdit>(); registerBuildinEditor<StyleSheetEdit>("styleSheet"); registerEditor<bool, QAbstractButton, &QCheckBox::isChecked, &QCheckBox::setChecked, &QCheckBox::toggled>( []() -> QWidget* { return new QCheckBox; }); registerEditor<int, QSpinBox, &QSpinBox::value, &QSpinBox::setValue, &QSpinBox::valueChanged>( []() -> QWidget* { auto box = new QSpinBox; box->setRange(std::numeric_limits<int>::min(), std::numeric_limits<int>::max()); return box; }); registerEditor<QString, QLineEdit, &QLineEdit::text, &QLineEdit::setText, &QLineEdit::textChanged>(); registerEditor( "windowOpacity", []() -> QWidget* { auto slider = new QSlider(Qt::Horizontal); slider->setRange(0, 100); return slider; }, [](QWidget* w) -> QVariant { return static_cast<QSlider*>(w)->value() / 100.0; }, [](QWidget* w, const QVariant& v) { static_cast<QSlider*>(w)->setValue(v.value<qreal>() * 100); }, QMetaMethod::fromSignal(&QSlider::valueChanged)); }
O0
cpp
qdevtools::registerBuildinEditor(): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp callq 0x1b740 callq 0x1b7c0 callq 0x1b840 leaq 0x27fe9(%rip), %rdi # 0x3b877 callq 0x1b8c0 leaq -0x1(%rbp), %rdi callq 0x13940 movq %rax, %rdi callq 0x1b950 leaq -0x2(%rbp), %rdi callq 0x13960 movq %rax, %rdi callq 0x1b9e0 callq 0x1ba70 leaq -0x3(%rbp), %rdi callq 0x13980 movq %rax, -0x40(%rbp) leaq -0x4(%rbp), %rdi callq 0x139a0 movq %rax, -0x30(%rbp) leaq -0x5(%rbp), %rdi callq 0x139c0 movq %rax, -0x38(%rbp) movq 0x3d620(%rip), %rax # 0x50f08 movq %rax, -0x28(%rbp) movq $0x0, -0x20(%rbp) movq -0x28(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x1ba90 movq -0x40(%rbp), %rsi movq -0x38(%rbp), %rcx movq %rax, %rdi movq %rdx, %rax movq -0x30(%rbp), %rdx movq %rdi, -0x18(%rbp) movq %rax, -0x10(%rbp) leaq 0x27f60(%rip), %rdi # 0x3b882 leaq -0x18(%rbp), %r8 callq 0x136f0 addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN9qdevtools21registerBuildinEditorEv: push rbp mov rbp, rsp sub rsp, 40h call _ZN9qdevtools21registerBuiltinEditorINS_9QSizeEditEEEvv; qdevtools::registerBuiltinEditor<qdevtools::QSizeEdit>(void) call _ZN9qdevtools21registerBuiltinEditorINS_9QRectEditEEEvv; qdevtools::registerBuiltinEditor<qdevtools::QRectEdit>(void) call _ZN9qdevtools21registerBuiltinEditorINS_12QMarginsEditEEEvv; qdevtools::registerBuiltinEditor<qdevtools::QMarginsEdit>(void) lea rdi, aStylesheet; "styleSheet" call _ZN9qdevtools21registerBuildinEditorINS_14StyleSheetEditEEEvPKc; qdevtools::registerBuildinEditor<qdevtools::StyleSheetEdit>(char const*) lea rdi, [rbp+var_1] call _ZZN9qdevtools21registerBuildinEditorEvENK3$_0cvPFP7QWidgetvEEv; qdevtools::registerBuildinEditor(void)::$_0::operator QWidget * (*)(void)(void) mov rdi, rax call _ZN9qdevtools14registerEditorIb15QAbstractButtonTnMT0_KFT_vEXadL_ZNKS1_9isCheckedEvEETnMS2_FvS3_EXadL_ZNS1_10setCheckedEbEETnS7_XadL_ZNS1_7toggledEbEEEEvPFP7QWidgetvE lea rdi, [rbp+var_2] call _ZZN9qdevtools21registerBuildinEditorEvENK3$_1cvPFP7QWidgetvEEv; qdevtools::registerBuildinEditor(void)::$_1::operator QWidget * (*)(void)(void) mov rdi, rax call _ZN9qdevtools14registerEditorIi8QSpinBoxTnMT0_KFT_vEXadL_ZNKS1_5valueEvEETnMS2_FvS3_EXadL_ZNS1_8setValueEiEETnS7_XadL_ZNS1_12valueChangedEiEEEEvPFP7QWidgetvE call _ZN9qdevtools14registerEditorI7QString9QLineEditTnMT0_KFT_vEXadL_ZNKS2_4textEvEETnMS3_FvRKS4_EXadL_ZNS2_7setTextERKS1_EETnSA_XadL_ZNS2_11textChangedESC_EEEEvv lea rdi, [rbp+var_3] call _ZZN9qdevtools21registerBuildinEditorEvENK3$_2cvPFP7QWidgetvEEv; qdevtools::registerBuildinEditor(void)::$_2::operator QWidget * (*)(void)(void) mov [rbp+var_40], rax lea rdi, [rbp+var_4] call _ZZN9qdevtools21registerBuildinEditorEvENK3$_3cvPF8QVariantP7QWidgetEEv; qdevtools::registerBuildinEditor(void)::$_3::operator QVariant (*)(QWidget *)(void) mov [rbp+var_30], rax lea rdi, [rbp+var_5] call _ZZN9qdevtools21registerBuildinEditorEvENK3$_4cvPFvP7QWidgetRK8QVariantEEv; qdevtools::registerBuildinEditor(void)::$_4::operator void (*)(QWidget *,QVariant const&)(void) mov [rbp+var_38], rax mov rax, cs:_ZN15QAbstractSlider12valueChangedEi_ptr mov [rbp+var_28], rax mov [rbp+var_20], 0 mov rdi, [rbp+var_28] mov rsi, [rbp+var_20] call _ZN11QMetaMethod10fromSignalIM15QAbstractSliderFviEEES_T_; QMetaMethod::fromSignal<void (QAbstractSlider::*)(int)>(void (QAbstractSlider::*)(int)) mov rsi, [rbp+var_40] mov rcx, [rbp+var_38] mov rdi, rax mov rax, rdx mov rdx, [rbp+var_30] mov [rbp+var_18], rdi mov [rbp+var_10], rax lea rdi, aWindowopacity; "windowOpacity" lea r8, [rbp+var_18] call _ZN9qdevtools14registerEditorEPKcPFP7QWidgetvEPF8QVariantS3_EPFvS3_RKS6_ERK11QMetaMethod; qdevtools::registerEditor(char const*,QWidget * (*)(void),QVariant (*)(QWidget *),void (*)(QWidget *,QVariant const&),QMetaMethod const&) add rsp, 40h pop rbp retn
void qdevtools::registerBuildinEditor(qdevtools *this) { long long v1; // rax long long v2; // rax long long v3; // rdx long long v4; // [rsp+0h] [rbp-40h] long long v5; // [rsp+8h] [rbp-38h] long long v6; // [rsp+10h] [rbp-30h] __int128 v7; // [rsp+28h] [rbp-18h] BYREF char v8; // [rsp+3Bh] [rbp-5h] BYREF char v9; // [rsp+3Ch] [rbp-4h] BYREF char v10; // [rsp+3Dh] [rbp-3h] BYREF char v11; // [rsp+3Eh] [rbp-2h] BYREF char v12; // [rsp+3Fh] [rbp-1h] BYREF qdevtools::registerBuiltinEditor<qdevtools::QSizeEdit>(this); qdevtools::registerBuiltinEditor<qdevtools::QRectEdit>(); qdevtools::registerBuiltinEditor<qdevtools::QMarginsEdit>(); qdevtools::registerBuildinEditor<qdevtools::StyleSheetEdit>("styleSheet"); v1 = qdevtools::registerBuildinEditor(void)::$_0::operator QWidget * (*)(void)(&v12); ZN9qdevtools14registerEditorIb15QAbstractButtonTnMT0_KFT_vEXadL_ZNKS1_9isCheckedEvEETnMS2_FvS3_EXadL_ZNS1_10setCheckedEbEETnS7_XadL_ZNS1_7toggledEbEEEEvPFP7QWidgetvE(v1); v2 = qdevtools::registerBuildinEditor(void)::$_1::operator QWidget * (*)(void)(&v11); ZN9qdevtools14registerEditorIi8QSpinBoxTnMT0_KFT_vEXadL_ZNKS1_5valueEvEETnMS2_FvS3_EXadL_ZNS1_8setValueEiEETnS7_XadL_ZNS1_12valueChangedEiEEEEvPFP7QWidgetvE(v2); ZN9qdevtools14registerEditorI7QString9QLineEditTnMT0_KFT_vEXadL_ZNKS2_4textEvEETnMS3_FvRKS4_EXadL_ZNS2_7setTextERKS1_EETnSA_XadL_ZNS2_11textChangedESC_EEEEvv(); v4 = qdevtools::registerBuildinEditor(void)::$_2::operator QWidget * (*)(void)(&v10); v6 = qdevtools::registerBuildinEditor(void)::$_3::operator QVariant (*)(QWidget *)(&v9); v5 = qdevtools::registerBuildinEditor(void)::$_4::operator void (*)(QWidget *,QVariant const&)(&v8); *(_QWORD *)&v7 = QMetaMethod::fromSignal<void (QAbstractSlider::*)(int)>(&QAbstractSlider::valueChanged, 0LL); *((_QWORD *)&v7 + 1) = v3; qdevtools::registerEditor("windowOpacity", v4, v6, v5, &v7); }
registerBuildinEditor: PUSH RBP MOV RBP,RSP SUB RSP,0x40 CALL 0x0011b740 CALL 0x0011b7c0 CALL 0x0011b840 LEA RDI,[0x13b877] CALL 0x0011b8c0 LEA RDI,[RBP + -0x1] CALL 0x00113940 MOV RDI,RAX CALL 0x0011b950 LEA RDI,[RBP + -0x2] CALL 0x00113960 MOV RDI,RAX CALL 0x0011b9e0 CALL 0x0011ba70 LEA RDI,[RBP + -0x3] CALL 0x00113980 MOV qword ptr [RBP + -0x40],RAX LEA RDI,[RBP + -0x4] CALL 0x001139a0 MOV qword ptr [RBP + -0x30],RAX LEA RDI,[RBP + -0x5] CALL 0x001139c0 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [0x00150f08] MOV qword ptr [RBP + -0x28],RAX MOV qword ptr [RBP + -0x20],0x0 MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x20] CALL 0x0011ba90 MOV RSI,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x38] MOV RDI,RAX MOV RAX,RDX MOV RDX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x10],RAX LEA RDI,[0x13b882] LEA R8,[RBP + -0x18] CALL 0x001136f0 ADD RSP,0x40 POP RBP RET
/* qdevtools::registerBuildinEditor() */ void qdevtools::registerBuildinEditor(void) { _func_QWidget_ptr *p_Var1; _func_QVariant_QWidget_ptr_conflict *p_Var2; _func_void_QWidget_ptr_QVariant_ptr *p_Var3; QMetaMethod local_20 [19]; __4 local_d; __3 local_c; __2 local_b; __1 local_a; __0 local_9; registerBuiltinEditor<qdevtools::QSizeEdit>(); registerBuiltinEditor<qdevtools::QRectEdit>(); registerBuiltinEditor<qdevtools::QMarginsEdit>(); registerBuildinEditor<qdevtools::StyleSheetEdit>("styleSheet"); p_Var1 = registerBuildinEditor()::$_0::operator_cast_to_function_pointer(&local_9); _ZN9qdevtools14registerEditorIb15QAbstractButtonTnMT0_KFT_vEXadL_ZNKS1_9isCheckedEvEETnMS2_FvS3_EXadL_ZNS1_10setCheckedEbEETnS7_XadL_ZNS1_7toggledEbEEEEvPFP7QWidgetvE (p_Var1); p_Var1 = registerBuildinEditor()::$_1::operator_cast_to_function_pointer(&local_a); _ZN9qdevtools14registerEditorIi8QSpinBoxTnMT0_KFT_vEXadL_ZNKS1_5valueEvEETnMS2_FvS3_EXadL_ZNS1_8setValueEiEETnS7_XadL_ZNS1_12valueChangedEiEEEEvPFP7QWidgetvE (p_Var1); _ZN9qdevtools14registerEditorI7QString9QLineEditTnMT0_KFT_vEXadL_ZNKS2_4textEvEETnMS3_FvRKS4_EXadL_ZNS2_7setTextERKS1_EETnSA_XadL_ZNS2_11textChangedESC_EEEEvv (); p_Var1 = registerBuildinEditor()::$_2::operator_cast_to_function_pointer(&local_b); p_Var2 = registerBuildinEditor()::$_3::operator_cast_to_function_pointer(&local_c); p_Var3 = registerBuildinEditor()::$_4::operator_cast_to_function_pointer(&local_d); local_20._0_16_ = QMetaMethod::fromSignal<void(QAbstractSlider::*)(int)> ((QMetaMethod *)PTR_valueChanged_00150f08,(_func_void_int *)0x0); registerEditor("windowOpacity",p_Var1,(_func_QVariant_QWidget_ptr *)p_Var2,p_Var3,local_20); return; }
17,994
qdevtools::registerBuildinEditor()
HuaiminNotSleepYet[P]QDevTools/qdevtools.cpp
void registerBuildinEditor() { registerBuiltinEditor<QSizeEdit>(); registerBuiltinEditor<QRectEdit>(); registerBuiltinEditor<QMarginsEdit>(); registerBuildinEditor<StyleSheetEdit>("styleSheet"); registerEditor<bool, QAbstractButton, &QCheckBox::isChecked, &QCheckBox::setChecked, &QCheckBox::toggled>( []() -> QWidget* { return new QCheckBox; }); registerEditor<int, QSpinBox, &QSpinBox::value, &QSpinBox::setValue, &QSpinBox::valueChanged>( []() -> QWidget* { auto box = new QSpinBox; box->setRange(std::numeric_limits<int>::min(), std::numeric_limits<int>::max()); return box; }); registerEditor<QString, QLineEdit, &QLineEdit::text, &QLineEdit::setText, &QLineEdit::textChanged>(); registerEditor( "windowOpacity", []() -> QWidget* { auto slider = new QSlider(Qt::Horizontal); slider->setRange(0, 100); return slider; }, [](QWidget* w) -> QVariant { return static_cast<QSlider*>(w)->value() / 100.0; }, [](QWidget* w, const QVariant& v) { static_cast<QSlider*>(w)->setValue(v.value<qreal>() * 100); }, QMetaMethod::fromSignal(&QSlider::valueChanged)); }
O1
cpp
qdevtools::registerBuildinEditor(): pushq %rbx subq $0x10, %rsp callq 0x15e66 callq 0x15ebe callq 0x15f16 leaq 0x11af0(%rip), %rdi # 0x23887 callq 0x15f69 leaq 0x2e7b(%rip), %rdi # 0x14c1e callq 0x15fca leaq 0x2ead(%rip), %rdi # 0x14c5c callq 0x16029 leaq 0xfc2f(%rip), %rdi # 0x219ea callq 0x216f5 movq 0x1c171(%rip), %rax # 0x2df38 movq %rsp, %rbx movq %rax, (%rbx) movq $0x0, 0x8(%rbx) movq 0x1c1cc(%rip), %rdi # 0x2dfa8 movq %rbx, %rsi callq 0xfb40 movq %rax, (%rbx) movq %rdx, 0x8(%rbx) leaq 0x11aa0(%rip), %rdi # 0x23892 leaq 0x2eb3(%rip), %rsi # 0x14cac leaq 0x2efe(%rip), %rdx # 0x14cfe leaq 0x2f1d(%rip), %rcx # 0x14d24 movq %rsp, %r8 callq 0x11c04 addq $0x10, %rsp popq %rbx retq nop
_ZN9qdevtools21registerBuildinEditorEv: push rbx sub rsp, 10h call _ZN9qdevtools21registerBuiltinEditorINS_9QSizeEditEEEvv; qdevtools::registerBuiltinEditor<qdevtools::QSizeEdit>(void) call _ZN9qdevtools21registerBuiltinEditorINS_9QRectEditEEEvv; qdevtools::registerBuiltinEditor<qdevtools::QRectEdit>(void) call _ZN9qdevtools21registerBuiltinEditorINS_12QMarginsEditEEEvv; qdevtools::registerBuiltinEditor<qdevtools::QMarginsEdit>(void) lea rdi, aStylesheet; "styleSheet" call _ZN9qdevtools21registerBuildinEditorINS_14StyleSheetEditEEEvPKc; qdevtools::registerBuildinEditor<qdevtools::StyleSheetEdit>(char const*) lea rdi, _ZZN9qdevtools21registerBuildinEditorEvEN3$_08__invokeEv; qdevtools::registerBuildinEditor(void)::$_0::__invoke(void) call _ZN9qdevtools14registerEditorIb15QAbstractButtonTnMT0_KFT_vEXadL_ZNKS1_9isCheckedEvEETnMS2_FvS3_EXadL_ZNS1_10setCheckedEbEETnS7_XadL_ZNS1_7toggledEbEEEEvPFP7QWidgetvE lea rdi, _ZZN9qdevtools21registerBuildinEditorEvEN3$_18__invokeEv; qdevtools::registerBuildinEditor(void)::$_1::__invoke(void) call _ZN9qdevtools14registerEditorIi8QSpinBoxTnMT0_KFT_vEXadL_ZNKS1_5valueEvEETnMS2_FvS3_EXadL_ZNS1_8setValueEiEETnS7_XadL_ZNS1_12valueChangedEiEEEEvPFP7QWidgetvE lea rdi, _ZZN9qdevtools14registerEditorI7QString9QLineEditTnMT0_KFT_vEXadL_ZNKS2_4textEvEETnMS3_FvRKS4_EXadL_ZNS2_7setTextERKS1_EETnSA_XadL_ZNS2_11textChangedESC_EEEEvvENUlvE_8__invokeEv call _ZN9qdevtools14registerEditorI7QString9QLineEditTnMT0_KFT_vEXadL_ZNKS2_4textEvEETnMS3_FvRKS4_EXadL_ZNS2_7setTextERKS1_EETnSA_XadL_ZNS2_11textChangedESC_EEEEvPFP7QWidgetvE mov rax, cs:_ZN15QAbstractSlider12valueChangedEi_ptr mov rbx, rsp mov [rbx], rax mov qword ptr [rbx+8], 0 mov rdi, cs:_ZN15QAbstractSlider16staticMetaObjectE_ptr; this mov rsi, rbx; QMetaObject * call __ZN11QMetaMethod14fromSignalImplEPK11QMetaObjectPPv; QMetaMethod::fromSignalImpl(QMetaObject const*,void **) mov [rbx], rax mov [rbx+8], rdx lea rdi, aWindowopacity; "windowOpacity" lea rsi, _ZZN9qdevtools21registerBuildinEditorEvEN3$_28__invokeEv; qdevtools::registerBuildinEditor(void)::$_2::__invoke(void) lea rdx, _ZZN9qdevtools21registerBuildinEditorEvEN3$_38__invokeEP7QWidget; qdevtools::registerBuildinEditor(void)::$_3::__invoke(QWidget *) lea rcx, _ZZN9qdevtools21registerBuildinEditorEvEN3$_48__invokeEP7QWidgetRK8QVariant; qdevtools::registerBuildinEditor(void)::$_4::__invoke(QWidget *,QVariant const&) mov r8, rsp call _ZN9qdevtools14registerEditorEPKcPFP7QWidgetvEPF8QVariantS3_EPFvS3_RKS6_ERK11QMetaMethod; qdevtools::registerEditor(char const*,QWidget * (*)(void),QVariant (*)(QWidget *),void (*)(QWidget *,QVariant const&),QMetaMethod const&) add rsp, 10h pop rbx retn
long long qdevtools::registerBuildinEditor(qdevtools *this) { void **v1; // rdx long long v2; // rdx __int128 v4; // [rsp+0h] [rbp-18h] BYREF qdevtools::registerBuiltinEditor<qdevtools::QSizeEdit>(this); qdevtools::registerBuiltinEditor<qdevtools::QRectEdit>(); qdevtools::registerBuiltinEditor<qdevtools::QMarginsEdit>(); qdevtools::registerBuildinEditor<qdevtools::StyleSheetEdit>("styleSheet"); ZN9qdevtools14registerEditorIb15QAbstractButtonTnMT0_KFT_vEXadL_ZNKS1_9isCheckedEvEETnMS2_FvS3_EXadL_ZNS1_10setCheckedEbEETnS7_XadL_ZNS1_7toggledEbEEEEvPFP7QWidgetvE(qdevtools::registerBuildinEditor(void)::$_0::__invoke); ZN9qdevtools14registerEditorIi8QSpinBoxTnMT0_KFT_vEXadL_ZNKS1_5valueEvEETnMS2_FvS3_EXadL_ZNS1_8setValueEiEETnS7_XadL_ZNS1_12valueChangedEiEEEEvPFP7QWidgetvE(qdevtools::registerBuildinEditor(void)::$_1::__invoke); ZN9qdevtools14registerEditorI7QString9QLineEditTnMT0_KFT_vEXadL_ZNKS2_4textEvEETnMS3_FvRKS4_EXadL_ZNS2_7setTextERKS1_EETnSA_XadL_ZNS2_11textChangedESC_EEEEvPFP7QWidgetvE(ZZN9qdevtools14registerEditorI7QString9QLineEditTnMT0_KFT_vEXadL_ZNKS2_4textEvEETnMS3_FvRKS4_EXadL_ZNS2_7setTextERKS1_EETnSA_XadL_ZNS2_11textChangedESC_EEEEvvENUlvE_8__invokeEv); *(_QWORD *)&v4 = &QAbstractSlider::valueChanged; *((_QWORD *)&v4 + 1) = 0LL; *(_QWORD *)&v4 = QMetaMethod::fromSignalImpl( (QMetaMethod *)&QAbstractSlider::staticMetaObject, (const QMetaObject *)&v4, v1); *((_QWORD *)&v4 + 1) = v2; return qdevtools::registerEditor( (long long)"windowOpacity", (long long)qdevtools::registerBuildinEditor(void)::$_2::__invoke, (long long)qdevtools::registerBuildinEditor(void)::$_3::__invoke, (long long)qdevtools::registerBuildinEditor(void)::$_4::__invoke, &v4); }
registerBuildinEditor: PUSH RBX SUB RSP,0x10 CALL 0x00115e66 CALL 0x00115ebe CALL 0x00115f16 LEA RDI,[0x123887] CALL 0x00115f69 LEA RDI,[0x114c1e] CALL 0x00115fca LEA RDI,[0x114c5c] CALL 0x00116029 LEA RDI,[0x1219ea] CALL 0x001216f5 MOV RAX,qword ptr [0x0012df38] MOV RBX,RSP MOV qword ptr [RBX],RAX MOV qword ptr [RBX + 0x8],0x0 MOV RDI,qword ptr [0x0012dfa8] MOV RSI,RBX CALL 0x0010fb40 MOV qword ptr [RBX],RAX MOV qword ptr [RBX + 0x8],RDX LEA RDI,[0x123892] LEA RSI,[0x114cac] LEA RDX,[0x114cfe] LEA RCX,[0x114d24] MOV R8,RSP CALL 0x00111c04 ADD RSP,0x10 POP RBX RET
/* qdevtools::registerBuildinEditor() */ void qdevtools::registerBuildinEditor(void) { int1 local_18 [16]; registerBuiltinEditor<qdevtools::QSizeEdit>(); registerBuiltinEditor<qdevtools::QRectEdit>(); registerBuiltinEditor<qdevtools::QMarginsEdit>(); registerBuildinEditor<qdevtools::StyleSheetEdit>("styleSheet"); _ZN9qdevtools14registerEditorIb15QAbstractButtonTnMT0_KFT_vEXadL_ZNKS1_9isCheckedEvEETnMS2_FvS3_EXadL_ZNS1_10setCheckedEbEETnS7_XadL_ZNS1_7toggledEbEEEEvPFP7QWidgetvE (registerBuildinEditor()::$_0::__invoke); _ZN9qdevtools14registerEditorIi8QSpinBoxTnMT0_KFT_vEXadL_ZNKS1_5valueEvEETnMS2_FvS3_EXadL_ZNS1_8setValueEiEETnS7_XadL_ZNS1_12valueChangedEiEEEEvPFP7QWidgetvE (registerBuildinEditor()::$_1::__invoke); _ZN9qdevtools14registerEditorI7QString9QLineEditTnMT0_KFT_vEXadL_ZNKS2_4textEvEETnMS3_FvRKS4_EXadL_ZNS2_7setTextERKS1_EETnSA_XadL_ZNS2_11textChangedESC_EEEEvPFP7QWidgetvE ( _ZZN9qdevtools14registerEditorI7QString9QLineEditTnMT0_KFT_vEXadL_ZNKS2_4textEvEETnMS3_FvRKS4_EXadL_ZNS2_7setTextERKS1_EETnSA_XadL_ZNS2_11textChangedESC_EEEEvvENUlvE_8__invokeEv ); local_18._0_8_ = PTR_valueChanged_0012df38; local_18._8_8_ = 0; local_18 = QMetaMethod::fromSignalImpl ((QMetaObject *)PTR_staticMetaObject_0012dfa8,(void **)local_18); registerEditor("windowOpacity",registerBuildinEditor()::$_2::__invoke, registerBuildinEditor()::$_3::__invoke,registerBuildinEditor()::$_4::__invoke, (QMetaMethod *)local_18); return; }
17,995
qdevtools::registerBuildinEditor()
HuaiminNotSleepYet[P]QDevTools/qdevtools.cpp
void registerBuildinEditor() { registerBuiltinEditor<QSizeEdit>(); registerBuiltinEditor<QRectEdit>(); registerBuiltinEditor<QMarginsEdit>(); registerBuildinEditor<StyleSheetEdit>("styleSheet"); registerEditor<bool, QAbstractButton, &QCheckBox::isChecked, &QCheckBox::setChecked, &QCheckBox::toggled>( []() -> QWidget* { return new QCheckBox; }); registerEditor<int, QSpinBox, &QSpinBox::value, &QSpinBox::setValue, &QSpinBox::valueChanged>( []() -> QWidget* { auto box = new QSpinBox; box->setRange(std::numeric_limits<int>::min(), std::numeric_limits<int>::max()); return box; }); registerEditor<QString, QLineEdit, &QLineEdit::text, &QLineEdit::setText, &QLineEdit::textChanged>(); registerEditor( "windowOpacity", []() -> QWidget* { auto slider = new QSlider(Qt::Horizontal); slider->setRange(0, 100); return slider; }, [](QWidget* w) -> QVariant { return static_cast<QSlider*>(w)->value() / 100.0; }, [](QWidget* w, const QVariant& v) { static_cast<QSlider*>(w)->setValue(v.value<qreal>() * 100); }, QMetaMethod::fromSignal(&QSlider::valueChanged)); }
O2
cpp
qdevtools::registerBuildinEditor(): subq $0x18, %rsp callq 0x146ea callq 0x14727 callq 0x14764 leaq 0xf3c9(%rip), %rdi # 0x20887 callq 0x147a1 leaq 0x2330(%rip), %rdi # 0x137fa callq 0x147e4 leaq 0x235e(%rip), %rdi # 0x13834 callq 0x14823 callq 0x14862 movq 0x1ba51(%rip), %rdi # 0x2cf38 xorl %esi, %esi callq 0x1486e leaq 0x8(%rsp), %r8 movq %rax, (%r8) movq %rdx, 0x8(%r8) leaq 0xf391(%rip), %rdi # 0x20892 leaq 0x2378(%rip), %rsi # 0x13880 leaq 0x23bb(%rip), %rdx # 0x138ca leaq 0x23da(%rip), %rcx # 0x138f0 callq 0x11315 addq $0x18, %rsp retq
_ZN9qdevtools21registerBuildinEditorEv: sub rsp, 18h call _ZN9qdevtools21registerBuiltinEditorINS_9QSizeEditEEEvv; qdevtools::registerBuiltinEditor<qdevtools::QSizeEdit>(void) call _ZN9qdevtools21registerBuiltinEditorINS_9QRectEditEEEvv; qdevtools::registerBuiltinEditor<qdevtools::QRectEdit>(void) call _ZN9qdevtools21registerBuiltinEditorINS_12QMarginsEditEEEvv; qdevtools::registerBuiltinEditor<qdevtools::QMarginsEdit>(void) lea rdi, aStylesheet; "styleSheet" call _ZN9qdevtools21registerBuildinEditorINS_14StyleSheetEditEEEvPKc; qdevtools::registerBuildinEditor<qdevtools::StyleSheetEdit>(char const*) lea rdi, _ZZN9qdevtools21registerBuildinEditorEvEN3$_08__invokeEv; qdevtools::registerBuildinEditor(void)::$_0::__invoke(void) call _ZN9qdevtools14registerEditorIb15QAbstractButtonTnMT0_KFT_vEXadL_ZNKS1_9isCheckedEvEETnMS2_FvS3_EXadL_ZNS1_10setCheckedEbEETnS7_XadL_ZNS1_7toggledEbEEEEvPFP7QWidgetvE lea rdi, _ZZN9qdevtools21registerBuildinEditorEvEN3$_18__invokeEv; qdevtools::registerBuildinEditor(void)::$_1::__invoke(void) call _ZN9qdevtools14registerEditorIi8QSpinBoxTnMT0_KFT_vEXadL_ZNKS1_5valueEvEETnMS2_FvS3_EXadL_ZNS1_8setValueEiEETnS7_XadL_ZNS1_12valueChangedEiEEEEvPFP7QWidgetvE call _ZN9qdevtools14registerEditorI7QString9QLineEditTnMT0_KFT_vEXadL_ZNKS2_4textEvEETnMS3_FvRKS4_EXadL_ZNS2_7setTextERKS1_EETnSA_XadL_ZNS2_11textChangedESC_EEEEvv mov rdi, cs:_ZN15QAbstractSlider12valueChangedEi_ptr xor esi, esi call _ZN11QMetaMethod10fromSignalIM15QAbstractSliderFviEEES_T_; QMetaMethod::fromSignal<void (QAbstractSlider::*)(int)>(void (QAbstractSlider::*)(int)) lea r8, [rsp+18h+var_10] mov [r8], rax mov [r8+8], rdx lea rdi, aWindowopacity; "windowOpacity" lea rsi, _ZZN9qdevtools21registerBuildinEditorEvEN3$_28__invokeEv; qdevtools::registerBuildinEditor(void)::$_2::__invoke(void) lea rdx, _ZZN9qdevtools21registerBuildinEditorEvEN3$_38__invokeEP7QWidget; qdevtools::registerBuildinEditor(void)::$_3::__invoke(QWidget *) lea rcx, _ZZN9qdevtools21registerBuildinEditorEvEN3$_48__invokeEP7QWidgetRK8QVariant; qdevtools::registerBuildinEditor(void)::$_4::__invoke(QWidget *,QVariant const&) call _ZN9qdevtools14registerEditorEPKcPFP7QWidgetvEPF8QVariantS3_EPFvS3_RKS6_ERK11QMetaMethod; qdevtools::registerEditor(char const*,QWidget * (*)(void),QVariant (*)(QWidget *),void (*)(QWidget *,QVariant const&),QMetaMethod const&) add rsp, 18h retn
long long qdevtools::registerBuildinEditor(qdevtools *this) { long long v1; // rdx __int128 v3; // [rsp+8h] [rbp-10h] BYREF qdevtools::registerBuiltinEditor<qdevtools::QSizeEdit>(this); qdevtools::registerBuiltinEditor<qdevtools::QRectEdit>(); qdevtools::registerBuiltinEditor<qdevtools::QMarginsEdit>(); qdevtools::registerBuildinEditor<qdevtools::StyleSheetEdit>("styleSheet"); ZN9qdevtools14registerEditorIb15QAbstractButtonTnMT0_KFT_vEXadL_ZNKS1_9isCheckedEvEETnMS2_FvS3_EXadL_ZNS1_10setCheckedEbEETnS7_XadL_ZNS1_7toggledEbEEEEvPFP7QWidgetvE(qdevtools::registerBuildinEditor(void)::$_0::__invoke); ZN9qdevtools14registerEditorIi8QSpinBoxTnMT0_KFT_vEXadL_ZNKS1_5valueEvEETnMS2_FvS3_EXadL_ZNS1_8setValueEiEETnS7_XadL_ZNS1_12valueChangedEiEEEEvPFP7QWidgetvE(qdevtools::registerBuildinEditor(void)::$_1::__invoke); ZN9qdevtools14registerEditorI7QString9QLineEditTnMT0_KFT_vEXadL_ZNKS2_4textEvEETnMS3_FvRKS4_EXadL_ZNS2_7setTextERKS1_EETnSA_XadL_ZNS2_11textChangedESC_EEEEvv(); *(_QWORD *)&v3 = QMetaMethod::fromSignal<void (QAbstractSlider::*)(int)>(&QAbstractSlider::valueChanged, 0LL); *((_QWORD *)&v3 + 1) = v1; return qdevtools::registerEditor( "windowOpacity", (long long)qdevtools::registerBuildinEditor(void)::$_2::__invoke, (long long)qdevtools::registerBuildinEditor(void)::$_3::__invoke, (long long)qdevtools::registerBuildinEditor(void)::$_4::__invoke, &v3); }
registerBuildinEditor: SUB RSP,0x18 CALL 0x001146ea CALL 0x00114727 CALL 0x00114764 LEA RDI,[0x120887] CALL 0x001147a1 LEA RDI,[0x1137fa] CALL 0x001147e4 LEA RDI,[0x113834] CALL 0x00114823 CALL 0x00114862 MOV RDI,qword ptr [0x0012cf38] XOR ESI,ESI CALL 0x0011486e LEA R8,[RSP + 0x8] MOV qword ptr [R8],RAX MOV qword ptr [R8 + 0x8],RDX LEA RDI,[0x120892] LEA RSI,[0x113880] LEA RDX,[0x1138ca] LEA RCX,[0x1138f0] CALL 0x00111315 ADD RSP,0x18 RET
/* qdevtools::registerBuildinEditor() */ void qdevtools::registerBuildinEditor(void) { QMetaMethod local_10 [16]; registerBuiltinEditor<qdevtools::QSizeEdit>(); registerBuiltinEditor<qdevtools::QRectEdit>(); registerBuiltinEditor<qdevtools::QMarginsEdit>(); registerBuildinEditor<qdevtools::StyleSheetEdit>("styleSheet"); _ZN9qdevtools14registerEditorIb15QAbstractButtonTnMT0_KFT_vEXadL_ZNKS1_9isCheckedEvEETnMS2_FvS3_EXadL_ZNS1_10setCheckedEbEETnS7_XadL_ZNS1_7toggledEbEEEEvPFP7QWidgetvE (registerBuildinEditor()::$_0::__invoke); _ZN9qdevtools14registerEditorIi8QSpinBoxTnMT0_KFT_vEXadL_ZNKS1_5valueEvEETnMS2_FvS3_EXadL_ZNS1_8setValueEiEETnS7_XadL_ZNS1_12valueChangedEiEEEEvPFP7QWidgetvE (registerBuildinEditor()::$_1::__invoke); _ZN9qdevtools14registerEditorI7QString9QLineEditTnMT0_KFT_vEXadL_ZNKS2_4textEvEETnMS3_FvRKS4_EXadL_ZNS2_7setTextERKS1_EETnSA_XadL_ZNS2_11textChangedESC_EEEEvv (); local_10 = (QMetaMethod [16]) QMetaMethod::fromSignal<void(QAbstractSlider::*)(int)> ((QMetaMethod *)PTR_valueChanged_0012cf38,(_func_void_int *)0x0); registerEditor("windowOpacity",registerBuildinEditor()::$_2::__invoke, registerBuildinEditor()::$_3::__invoke,registerBuildinEditor()::$_4::__invoke, local_10); return; }
17,996
qdevtools::registerBuildinEditor()
HuaiminNotSleepYet[P]QDevTools/qdevtools.cpp
void registerBuildinEditor() { registerBuiltinEditor<QSizeEdit>(); registerBuiltinEditor<QRectEdit>(); registerBuiltinEditor<QMarginsEdit>(); registerBuildinEditor<StyleSheetEdit>("styleSheet"); registerEditor<bool, QAbstractButton, &QCheckBox::isChecked, &QCheckBox::setChecked, &QCheckBox::toggled>( []() -> QWidget* { return new QCheckBox; }); registerEditor<int, QSpinBox, &QSpinBox::value, &QSpinBox::setValue, &QSpinBox::valueChanged>( []() -> QWidget* { auto box = new QSpinBox; box->setRange(std::numeric_limits<int>::min(), std::numeric_limits<int>::max()); return box; }); registerEditor<QString, QLineEdit, &QLineEdit::text, &QLineEdit::setText, &QLineEdit::textChanged>(); registerEditor( "windowOpacity", []() -> QWidget* { auto slider = new QSlider(Qt::Horizontal); slider->setRange(0, 100); return slider; }, [](QWidget* w) -> QVariant { return static_cast<QSlider*>(w)->value() / 100.0; }, [](QWidget* w, const QVariant& v) { static_cast<QSlider*>(w)->setValue(v.value<qreal>() * 100); }, QMetaMethod::fromSignal(&QSlider::valueChanged)); }
O3
cpp
qdevtools::registerBuildinEditor(): pushq %rbx subq $0x10, %rsp callq 0x15e08 callq 0x15e60 callq 0x15eb8 leaq 0x10b12(%rip), %rdi # 0x22887 callq 0x15f0b leaq 0x2e8b(%rip), %rdi # 0x14c0c callq 0x15f6c leaq 0x2ebd(%rip), %rdi # 0x14c4a callq 0x15fcb leaq 0xf919(%rip), %rdi # 0x216b2 callq 0x213c1 movq 0x1b193(%rip), %rax # 0x2cf38 movq %rsp, %rbx movq %rax, (%rbx) movq $0x0, 0x8(%rbx) movq 0x1b1ee(%rip), %rdi # 0x2cfa8 movq %rbx, %rsi callq 0xfb40 movq %rax, (%rbx) movq %rdx, 0x8(%rbx) leaq 0x10ac2(%rip), %rdi # 0x22892 leaq 0x2ec3(%rip), %rsi # 0x14c9a leaq 0x2f0e(%rip), %rdx # 0x14cec leaq 0x2f2d(%rip), %rcx # 0x14d12 movq %rsp, %r8 callq 0x11be1 addq $0x10, %rsp popq %rbx retq nop
_ZN9qdevtools21registerBuildinEditorEv: push rbx sub rsp, 10h call _ZN9qdevtools21registerBuiltinEditorINS_9QSizeEditEEEvv; qdevtools::registerBuiltinEditor<qdevtools::QSizeEdit>(void) call _ZN9qdevtools21registerBuiltinEditorINS_9QRectEditEEEvv; qdevtools::registerBuiltinEditor<qdevtools::QRectEdit>(void) call _ZN9qdevtools21registerBuiltinEditorINS_12QMarginsEditEEEvv; qdevtools::registerBuiltinEditor<qdevtools::QMarginsEdit>(void) lea rdi, aStylesheet; "styleSheet" call _ZN9qdevtools21registerBuildinEditorINS_14StyleSheetEditEEEvPKc; qdevtools::registerBuildinEditor<qdevtools::StyleSheetEdit>(char const*) lea rdi, _ZZN9qdevtools21registerBuildinEditorEvEN3$_08__invokeEv; qdevtools::registerBuildinEditor(void)::$_0::__invoke(void) call _ZN9qdevtools14registerEditorIb15QAbstractButtonTnMT0_KFT_vEXadL_ZNKS1_9isCheckedEvEETnMS2_FvS3_EXadL_ZNS1_10setCheckedEbEETnS7_XadL_ZNS1_7toggledEbEEEEvPFP7QWidgetvE lea rdi, _ZZN9qdevtools21registerBuildinEditorEvEN3$_18__invokeEv; qdevtools::registerBuildinEditor(void)::$_1::__invoke(void) call _ZN9qdevtools14registerEditorIi8QSpinBoxTnMT0_KFT_vEXadL_ZNKS1_5valueEvEETnMS2_FvS3_EXadL_ZNS1_8setValueEiEETnS7_XadL_ZNS1_12valueChangedEiEEEEvPFP7QWidgetvE lea rdi, _ZZN9qdevtools14registerEditorI7QString9QLineEditTnMT0_KFT_vEXadL_ZNKS2_4textEvEETnMS3_FvRKS4_EXadL_ZNS2_7setTextERKS1_EETnSA_XadL_ZNS2_11textChangedESC_EEEEvvENUlvE_8__invokeEv call _ZN9qdevtools14registerEditorI7QString9QLineEditTnMT0_KFT_vEXadL_ZNKS2_4textEvEETnMS3_FvRKS4_EXadL_ZNS2_7setTextERKS1_EETnSA_XadL_ZNS2_11textChangedESC_EEEEvPFP7QWidgetvE mov rax, cs:_ZN15QAbstractSlider12valueChangedEi_ptr mov rbx, rsp mov [rbx], rax mov qword ptr [rbx+8], 0 mov rdi, cs:_ZN15QAbstractSlider16staticMetaObjectE_ptr; this mov rsi, rbx; QMetaObject * call __ZN11QMetaMethod14fromSignalImplEPK11QMetaObjectPPv; QMetaMethod::fromSignalImpl(QMetaObject const*,void **) mov [rbx], rax mov [rbx+8], rdx lea rdi, aWindowopacity; "windowOpacity" lea rsi, _ZZN9qdevtools21registerBuildinEditorEvEN3$_28__invokeEv; qdevtools::registerBuildinEditor(void)::$_2::__invoke(void) lea rdx, _ZZN9qdevtools21registerBuildinEditorEvEN3$_38__invokeEP7QWidget; qdevtools::registerBuildinEditor(void)::$_3::__invoke(QWidget *) lea rcx, _ZZN9qdevtools21registerBuildinEditorEvEN3$_48__invokeEP7QWidgetRK8QVariant; qdevtools::registerBuildinEditor(void)::$_4::__invoke(QWidget *,QVariant const&) mov r8, rsp call _ZN9qdevtools14registerEditorEPKcPFP7QWidgetvEPF8QVariantS3_EPFvS3_RKS6_ERK11QMetaMethod; qdevtools::registerEditor(char const*,QWidget * (*)(void),QVariant (*)(QWidget *),void (*)(QWidget *,QVariant const&),QMetaMethod const&) add rsp, 10h pop rbx retn
long long qdevtools::registerBuildinEditor(qdevtools *this) { void **v1; // rdx long long v2; // rdx __int128 v4; // [rsp+0h] [rbp-18h] BYREF qdevtools::registerBuiltinEditor<qdevtools::QSizeEdit>(this); qdevtools::registerBuiltinEditor<qdevtools::QRectEdit>(); qdevtools::registerBuiltinEditor<qdevtools::QMarginsEdit>(); qdevtools::registerBuildinEditor<qdevtools::StyleSheetEdit>("styleSheet"); ZN9qdevtools14registerEditorIb15QAbstractButtonTnMT0_KFT_vEXadL_ZNKS1_9isCheckedEvEETnMS2_FvS3_EXadL_ZNS1_10setCheckedEbEETnS7_XadL_ZNS1_7toggledEbEEEEvPFP7QWidgetvE(qdevtools::registerBuildinEditor(void)::$_0::__invoke); ZN9qdevtools14registerEditorIi8QSpinBoxTnMT0_KFT_vEXadL_ZNKS1_5valueEvEETnMS2_FvS3_EXadL_ZNS1_8setValueEiEETnS7_XadL_ZNS1_12valueChangedEiEEEEvPFP7QWidgetvE(qdevtools::registerBuildinEditor(void)::$_1::__invoke); ZN9qdevtools14registerEditorI7QString9QLineEditTnMT0_KFT_vEXadL_ZNKS2_4textEvEETnMS3_FvRKS4_EXadL_ZNS2_7setTextERKS1_EETnSA_XadL_ZNS2_11textChangedESC_EEEEvPFP7QWidgetvE(ZZN9qdevtools14registerEditorI7QString9QLineEditTnMT0_KFT_vEXadL_ZNKS2_4textEvEETnMS3_FvRKS4_EXadL_ZNS2_7setTextERKS1_EETnSA_XadL_ZNS2_11textChangedESC_EEEEvvENUlvE_8__invokeEv); *(_QWORD *)&v4 = &QAbstractSlider::valueChanged; *((_QWORD *)&v4 + 1) = 0LL; *(_QWORD *)&v4 = QMetaMethod::fromSignalImpl( (QMetaMethod *)&QAbstractSlider::staticMetaObject, (const QMetaObject *)&v4, v1); *((_QWORD *)&v4 + 1) = v2; return qdevtools::registerEditor( (long long)"windowOpacity", (long long)qdevtools::registerBuildinEditor(void)::$_2::__invoke, (long long)qdevtools::registerBuildinEditor(void)::$_3::__invoke, (long long)qdevtools::registerBuildinEditor(void)::$_4::__invoke, &v4); }
registerBuildinEditor: PUSH RBX SUB RSP,0x10 CALL 0x00115e08 CALL 0x00115e60 CALL 0x00115eb8 LEA RDI,[0x122887] CALL 0x00115f0b LEA RDI,[0x114c0c] CALL 0x00115f6c LEA RDI,[0x114c4a] CALL 0x00115fcb LEA RDI,[0x1216b2] CALL 0x001213c1 MOV RAX,qword ptr [0x0012cf38] MOV RBX,RSP MOV qword ptr [RBX],RAX MOV qword ptr [RBX + 0x8],0x0 MOV RDI,qword ptr [0x0012cfa8] MOV RSI,RBX CALL 0x0010fb40 MOV qword ptr [RBX],RAX MOV qword ptr [RBX + 0x8],RDX LEA RDI,[0x122892] LEA RSI,[0x114c9a] LEA RDX,[0x114cec] LEA RCX,[0x114d12] MOV R8,RSP CALL 0x00111be1 ADD RSP,0x10 POP RBX RET
/* qdevtools::registerBuildinEditor() */ void qdevtools::registerBuildinEditor(void) { int1 local_18 [16]; registerBuiltinEditor<qdevtools::QSizeEdit>(); registerBuiltinEditor<qdevtools::QRectEdit>(); registerBuiltinEditor<qdevtools::QMarginsEdit>(); registerBuildinEditor<qdevtools::StyleSheetEdit>("styleSheet"); _ZN9qdevtools14registerEditorIb15QAbstractButtonTnMT0_KFT_vEXadL_ZNKS1_9isCheckedEvEETnMS2_FvS3_EXadL_ZNS1_10setCheckedEbEETnS7_XadL_ZNS1_7toggledEbEEEEvPFP7QWidgetvE (registerBuildinEditor()::$_0::__invoke); _ZN9qdevtools14registerEditorIi8QSpinBoxTnMT0_KFT_vEXadL_ZNKS1_5valueEvEETnMS2_FvS3_EXadL_ZNS1_8setValueEiEETnS7_XadL_ZNS1_12valueChangedEiEEEEvPFP7QWidgetvE (registerBuildinEditor()::$_1::__invoke); _ZN9qdevtools14registerEditorI7QString9QLineEditTnMT0_KFT_vEXadL_ZNKS2_4textEvEETnMS3_FvRKS4_EXadL_ZNS2_7setTextERKS1_EETnSA_XadL_ZNS2_11textChangedESC_EEEEvPFP7QWidgetvE ( _ZZN9qdevtools14registerEditorI7QString9QLineEditTnMT0_KFT_vEXadL_ZNKS2_4textEvEETnMS3_FvRKS4_EXadL_ZNS2_7setTextERKS1_EETnSA_XadL_ZNS2_11textChangedESC_EEEEvvENUlvE_8__invokeEv ); local_18._0_8_ = PTR_valueChanged_0012cf38; local_18._8_8_ = 0; local_18 = QMetaMethod::fromSignalImpl ((QMetaObject *)PTR_staticMetaObject_0012cfa8,(void **)local_18); registerEditor("windowOpacity",registerBuildinEditor()::$_2::__invoke, registerBuildinEditor()::$_3::__invoke,registerBuildinEditor()::$_4::__invoke, (QMetaMethod *)local_18); return; }
17,997
plutovg_text_iterator_init
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-font.c
void plutovg_text_iterator_init(plutovg_text_iterator_t* it, const void* text, int length, plutovg_text_encoding_t encoding) { if(length == -1) length = plutovg_text_iterator_length(text, encoding); it->text = text; it->length = length; it->encoding = encoding; it->index = 0; }
O1
c
plutovg_text_iterator_init: cmpl $-0x1, %edx je 0x244da movq %rsi, (%rdi) movl %edx, 0x8(%rdi) movl %ecx, 0xc(%rdi) movl $0x0, 0x10(%rdi) retq cmpl $0x2, %ecx jb 0x244fa je 0x2450e cmpl $0x3, %ecx jne 0x24528 cmpl $0x0, (%rsi) je 0x24524 xorl %edx, %edx cmpl $0x0, 0x4(%rsi,%rdx,4) leaq 0x1(%rdx), %rdx jne 0x244ed jmp 0x244c9 cmpb $0x0, (%rsi) je 0x24524 xorl %edx, %edx cmpb $0x0, 0x1(%rsi,%rdx) leaq 0x1(%rdx), %rdx jne 0x24501 jmp 0x244c9 cmpw $0x0, (%rsi) je 0x24524 xorl %edx, %edx cmpw $0x0, 0x2(%rsi,%rdx,2) leaq 0x1(%rdx), %rdx jne 0x24516 jmp 0x244c9 xorl %edx, %edx jmp 0x244c9 pushq %rax leaq 0x1f0b9(%rip), %rdi # 0x435e9 leaq 0x20691(%rip), %rsi # 0x44bc8 leaq 0x207ce(%rip), %rcx # 0x44d0c movl $0x20, %edx callq 0xa200
plutovg_text_iterator_init: cmp edx, 0FFFFFFFFh jz short loc_244DA loc_244C9: mov [rdi], rsi mov [rdi+8], edx mov [rdi+0Ch], ecx mov dword ptr [rdi+10h], 0 retn loc_244DA: cmp ecx, 2 jb short loc_244FA jz short loc_2450E cmp ecx, 3 jnz short loc_24528 cmp dword ptr [rsi], 0 jz short loc_24524 xor edx, edx loc_244ED: cmp dword ptr [rsi+rdx*4+4], 0 lea rdx, [rdx+1] jnz short loc_244ED jmp short loc_244C9 loc_244FA: cmp byte ptr [rsi], 0 jz short loc_24524 xor edx, edx loc_24501: cmp byte ptr [rsi+rdx+1], 0 lea rdx, [rdx+1] jnz short loc_24501 jmp short loc_244C9 loc_2450E: cmp word ptr [rsi], 0 jz short loc_24524 xor edx, edx loc_24516: cmp word ptr [rsi+rdx*2+2], 0 lea rdx, [rdx+1] jnz short loc_24516 jmp short loc_244C9 loc_24524: xor edx, edx jmp short loc_244C9 loc_24528: push rax lea rdi, aFalse; "false" lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rcx, aIntPlutovgText; "int plutovg_text_iterator_length(const "... mov edx, 20h ; ' ' call ___assert_fail
void plutovg_text_iterator_init(long long a1, _BYTE *a2, long long a3, unsigned int a4) { bool v4; // zf if ( (_DWORD)a3 == -1 ) { if ( a4 < 2 ) { if ( *a2 ) { a3 = 0LL; do v4 = a2[++a3] == 0; while ( !v4 ); goto LABEL_2; } } else if ( a4 == 2 ) { if ( *(_WORD *)a2 ) { a3 = 0LL; do v4 = *(_WORD *)&a2[2 * a3++ + 2] == 0; while ( !v4 ); goto LABEL_2; } } else { if ( a4 != 3 ) __assert_fail( "false", "/workspace/llm4binary/github/2025_star3/dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-font.c", 32LL, "int plutovg_text_iterator_length(const void *, plutovg_text_encoding_t)"); if ( *(_DWORD *)a2 ) { a3 = 0LL; do v4 = *(_DWORD *)&a2[4 * a3++ + 4] == 0; while ( !v4 ); goto LABEL_2; } } LODWORD(a3) = 0; } LABEL_2: *(_QWORD *)a1 = a2; *(_DWORD *)(a1 + 8) = a3; *(_DWORD *)(a1 + 12) = a4; *(_DWORD *)(a1 + 16) = 0; }
plutovg_text_iterator_init: CMP EDX,-0x1 JZ 0x001244da LAB_001244c9: MOV qword ptr [RDI],RSI MOV dword ptr [RDI + 0x8],EDX MOV dword ptr [RDI + 0xc],ECX MOV dword ptr [RDI + 0x10],0x0 RET LAB_001244da: CMP ECX,0x2 JC 0x001244fa JZ 0x0012450e CMP ECX,0x3 JNZ 0x00124528 CMP dword ptr [RSI],0x0 JZ 0x00124524 XOR EDX,EDX LAB_001244ed: CMP dword ptr [RSI + RDX*0x4 + 0x4],0x0 LEA RDX,[RDX + 0x1] JNZ 0x001244ed JMP 0x001244c9 LAB_001244fa: CMP byte ptr [RSI],0x0 JZ 0x00124524 XOR EDX,EDX LAB_00124501: CMP byte ptr [RSI + RDX*0x1 + 0x1],0x0 LEA RDX,[RDX + 0x1] JNZ 0x00124501 JMP 0x001244c9 LAB_0012450e: CMP word ptr [RSI],0x0 JZ 0x00124524 XOR EDX,EDX LAB_00124516: CMP word ptr [RSI + RDX*0x2 + 0x2],0x0 LEA RDX,[RDX + 0x1] JNZ 0x00124516 JMP 0x001244c9 LAB_00124524: XOR EDX,EDX JMP 0x001244c9 LAB_00124528: PUSH RAX LEA RDI,[0x1435e9] LEA RSI,[0x144bc8] LEA RCX,[0x144d0c] MOV EDX,0x20 CALL 0x0010a200
void plutovg_text_iterator_init(int8 *param_1,int *param_2,long param_3,uint param_4) { long lVar1; if ((int)param_3 == -1) { if (param_4 < 2) { if ((char)*param_2 != '\0') { param_3 = 0; do { lVar1 = param_3 + 1; param_3 = param_3 + 1; } while (*(char *)((long)param_2 + lVar1) != '\0'); goto LAB_001244c9; } } else if (param_4 == 2) { if ((short)*param_2 != 0) { param_3 = 0; do { lVar1 = param_3 * 2; param_3 = param_3 + 1; } while (*(short *)((long)param_2 + lVar1 + 2) != 0); goto LAB_001244c9; } } else { if (param_4 != 3) { /* WARNING: Subroutine does not return */ __assert_fail("false", "/workspace/llm4binary/github/2025_star3/dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-font.c" ,0x20, "int plutovg_text_iterator_length(const void *, plutovg_text_encoding_t)"); } if (*param_2 != 0) { param_3 = 0; do { lVar1 = param_3 + 1; param_3 = param_3 + 1; } while (param_2[lVar1] != 0); goto LAB_001244c9; } } param_3 = 0; } LAB_001244c9: *param_1 = param_2; *(int *)(param_1 + 1) = (int)param_3; *(uint *)((long)param_1 + 0xc) = param_4; *(int4 *)(param_1 + 2) = 0; return; }
17,998
PFS_buffer_scalable_container<PFS_file, 4096, 4096, PFS_buffer_default_array<PFS_file>, PFS_buffer_default_allocator<PFS_file>>::apply_all(void (*)(PFS_file*))
eloqsql/storage/perfschema/pfs_buffer_container.h
void apply_all(function_type fct) { uint i; array_type *page; value_type *pfs; value_type *pfs_last; for (i=0 ; i < PFS_PAGE_COUNT; i++) { page= m_pages[i]; if (page != NULL) { pfs= page->get_first(); pfs_last= page->get_last(); while (pfs < pfs_last) { fct(pfs); pfs++; } } } }
O0
c
PFS_buffer_scalable_container<PFS_file, 4096, 4096, PFS_buffer_default_array<PFS_file>, PFS_buffer_default_allocator<PFS_file>>::apply_all(void (*)(PFS_file*)): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x38(%rbp) movl $0x0, -0x14(%rbp) cmpl $0x80, -0x14(%rbp) jae 0x465bf movq -0x38(%rbp), %rax movl -0x14(%rbp), %ecx movq 0xa8(%rax,%rcx,8), %rax movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) je 0x465b2 movq -0x20(%rbp), %rdi callq 0x46650 movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rdi callq 0x46670 movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x465b0 movq -0x10(%rbp), %rax movq -0x28(%rbp), %rdi callq *%rax movq -0x28(%rbp), %rax addq $0x940, %rax # imm = 0x940 movq %rax, -0x28(%rbp) jmp 0x4658c jmp 0x465b2 jmp 0x465b4 movl -0x14(%rbp), %eax addl $0x1, %eax movl %eax, -0x14(%rbp) jmp 0x4654f addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nop
_ZN29PFS_buffer_scalable_containerI8PFS_hostLi128ELi128E14PFS_host_array18PFS_host_allocatorE9apply_allEPFvPS0_E: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_38], rax mov [rbp+var_14], 0 loc_4654F: cmp [rbp+var_14], 80h jnb short loc_465BF mov rax, [rbp+var_38] mov ecx, [rbp+var_14] mov rax, [rax+rcx*8+0A8h] mov [rbp+var_20], rax cmp [rbp+var_20], 0 jz short loc_465B2 mov rdi, [rbp+var_20] call _ZN24PFS_buffer_default_arrayI8PFS_hostE9get_firstEv; PFS_buffer_default_array<PFS_host>::get_first(void) mov [rbp+var_28], rax mov rdi, [rbp+var_20] call _ZN24PFS_buffer_default_arrayI8PFS_hostE8get_lastEv; PFS_buffer_default_array<PFS_host>::get_last(void) mov [rbp+var_30], rax loc_4658C: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jnb short loc_465B0 mov rax, [rbp+var_10] mov rdi, [rbp+var_28] call rax mov rax, [rbp+var_28] add rax, 940h mov [rbp+var_28], rax jmp short loc_4658C loc_465B0: jmp short $+2 loc_465B2: jmp short $+2 loc_465B4: mov eax, [rbp+var_14] add eax, 1 mov [rbp+var_14], eax jmp short loc_4654F loc_465BF: add rsp, 40h pop rbp retn
long long PFS_buffer_scalable_container<PFS_host,128,128,PFS_host_array,PFS_host_allocator>::apply_all( long long a1, void ( *a2)(unsigned long long)) { long long result; // rax unsigned long long last; // [rsp+10h] [rbp-30h] unsigned long long first; // [rsp+18h] [rbp-28h] long long v5; // [rsp+20h] [rbp-20h] unsigned int i; // [rsp+2Ch] [rbp-14h] result = a1; for ( i = 0; i < 0x80; ++i ) { v5 = *(_QWORD *)(a1 + 8LL * i + 168); if ( v5 ) { first = PFS_buffer_default_array<PFS_host>::get_first(v5); last = PFS_buffer_default_array<PFS_host>::get_last(v5); while ( first < last ) { a2(first); first += 2368LL; } } result = i + 1; } return result; }
apply_all: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x38],RAX MOV dword ptr [RBP + -0x14],0x0 LAB_0014654f: CMP dword ptr [RBP + -0x14],0x80 JNC 0x001465bf MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RAX + RCX*0x8 + 0xa8] MOV qword ptr [RBP + -0x20],RAX CMP qword ptr [RBP + -0x20],0x0 JZ 0x001465b2 MOV RDI,qword ptr [RBP + -0x20] CALL 0x00146650 MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x20] CALL 0x00146670 MOV qword ptr [RBP + -0x30],RAX LAB_0014658c: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JNC 0x001465b0 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RBP + -0x28] CALL RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x940 MOV qword ptr [RBP + -0x28],RAX JMP 0x0014658c LAB_001465b0: JMP 0x001465b2 LAB_001465b2: JMP 0x001465b4 LAB_001465b4: MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 MOV dword ptr [RBP + -0x14],EAX JMP 0x0014654f LAB_001465bf: ADD RSP,0x40 POP RBP RET
/* PFS_buffer_scalable_container<PFS_host, 128, 128, PFS_host_array, PFS_host_allocator>::apply_all(void (*)(PFS_host*)) */ void __thiscall PFS_buffer_scalable_container<PFS_host,128,128,PFS_host_array,PFS_host_allocator>::apply_all (PFS_buffer_scalable_container<PFS_host,128,128,PFS_host_array,PFS_host_allocator> *this, _func_void_PFS_host_ptr *param_1) { PFS_buffer_default_array<PFS_host> *this_00; PFS_host *pPVar1; PFS_host *local_30; uint local_1c; for (local_1c = 0; local_1c < 0x80; local_1c = local_1c + 1) { this_00 = *(PFS_buffer_default_array<PFS_host> **)(this + (ulong)local_1c * 8 + 0xa8); if (this_00 != (PFS_buffer_default_array<PFS_host> *)0x0) { local_30 = (PFS_host *)PFS_buffer_default_array<PFS_host>::get_first(this_00); pPVar1 = (PFS_host *)PFS_buffer_default_array<PFS_host>::get_last(this_00); for (; local_30 < pPVar1; local_30 = local_30 + 0x940) { (*param_1)(local_30); } } } return; }
17,999
escape_string_for_mysql
eloqsql/mysys/charset.c
size_t escape_string_for_mysql(CHARSET_INFO *charset_info, char *to, size_t to_length, const char *from, size_t length, my_bool *overflow) { const char *to_start= to; const char *end, *to_end=to_start + (to_length ? to_length-1 : 2*length); *overflow= FALSE; for (end= from + length; from < end; from++) { char escape= 0; #ifdef USE_MB int tmp_length= my_ci_charlen(charset_info, (const uchar *) from, (const uchar *) end); if (tmp_length > 1) { if (to + tmp_length > to_end) { *overflow= TRUE; break; } while (tmp_length--) *to++= *from++; from--; continue; } /* If the next character appears to begin a multi-byte character, we escape that first byte of that apparent multi-byte character. (The character just looks like a multi-byte character -- if it were actually a multi-byte character, it would have been passed through in the test above.) Without this check, we can create a problem by converting an invalid multi-byte character into a valid one. For example, 0xbf27 is not a valid GBK character, but 0xbf5c is. (0x27 = ', 0x5c = \) */ if (tmp_length < 1) /* Bad byte sequence */ escape= *from; else #endif switch (*from) { case 0: /* Must be escaped for 'mysql' */ escape= '0'; break; case '\n': /* Must be escaped for logs */ escape= 'n'; break; case '\r': escape= 'r'; break; case '\\': escape= '\\'; break; case '\'': escape= '\''; break; case '"': /* Better safe than sorry */ escape= '"'; break; case '\032': /* This gives problems on Win32 */ escape= 'Z'; break; } if (escape) { if (to + 2 > to_end) { *overflow= TRUE; break; } *to++= '\\'; *to++= escape; } else { if (to + 1 > to_end) { *overflow= TRUE; break; } *to++= *from; } } *to= 0; return (size_t) (to - to_start); }
O0
c
escape_string_for_mysql: 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 %r9, -0x30(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x58(%rbp) cmpq $0x0, -0x18(%rbp) je 0x2f855 movq -0x18(%rbp), %rax subq $0x1, %rax movq %rax, -0x60(%rbp) jmp 0x2f860 movq -0x28(%rbp), %rax shlq %rax movq %rax, -0x60(%rbp) movq -0x58(%rbp), %rax movq -0x60(%rbp), %rcx addq %rcx, %rax movq %rax, -0x48(%rbp) movq -0x30(%rbp), %rax movb $0x0, (%rax) movq -0x20(%rbp), %rax addq -0x28(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x20(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x2fa1f movb $0x0, -0x49(%rbp) movq -0x8(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x40(%rbp), %rdx callq 0x2fa40 movl %eax, -0x50(%rbp) cmpl $0x1, -0x50(%rbp) jle 0x2f912 movq -0x10(%rbp), %rax movslq -0x50(%rbp), %rcx addq %rcx, %rax cmpq -0x48(%rbp), %rax jbe 0x2f8cb movq -0x30(%rbp), %rax movb $0x1, (%rax) jmp 0x2fa1f jmp 0x2f8cd movl -0x50(%rbp), %eax movl %eax, %ecx addl $-0x1, %ecx movl %ecx, -0x50(%rbp) cmpl $0x0, %eax je 0x2f901 movq -0x20(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x20(%rbp) movb (%rax), %cl movq -0x10(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movb %cl, (%rax) jmp 0x2f8cd movq -0x20(%rbp), %rax addq $-0x1, %rax movq %rax, -0x20(%rbp) jmp 0x2fa0e cmpl $0x1, -0x50(%rbp) jge 0x2f923 movq -0x20(%rbp), %rax movb (%rax), %al movb %al, -0x49(%rbp) jmp 0x2f999 movq -0x20(%rbp), %rax movsbl (%rax), %eax movl %eax, -0x64(%rbp) testl %eax, %eax je 0x2f96f jmp 0x2f933 movl -0x64(%rbp), %eax subl $0xa, %eax je 0x2f975 jmp 0x2f93d movl -0x64(%rbp), %eax subl $0xd, %eax je 0x2f97b jmp 0x2f947 movl -0x64(%rbp), %eax subl $0x1a, %eax je 0x2f993 jmp 0x2f951 movl -0x64(%rbp), %eax subl $0x22, %eax je 0x2f98d jmp 0x2f95b movl -0x64(%rbp), %eax subl $0x27, %eax je 0x2f987 jmp 0x2f965 movl -0x64(%rbp), %eax subl $0x5c, %eax je 0x2f981 jmp 0x2f997 movb $0x30, -0x49(%rbp) jmp 0x2f997 movb $0x6e, -0x49(%rbp) jmp 0x2f997 movb $0x72, -0x49(%rbp) jmp 0x2f997 movb $0x5c, -0x49(%rbp) jmp 0x2f997 movb $0x27, -0x49(%rbp) jmp 0x2f997 movb $0x22, -0x49(%rbp) jmp 0x2f997 movb $0x5a, -0x49(%rbp) jmp 0x2f999 cmpb $0x0, -0x49(%rbp) je 0x2f9de movq -0x10(%rbp), %rax addq $0x2, %rax cmpq -0x48(%rbp), %rax jbe 0x2f9b6 movq -0x30(%rbp), %rax movb $0x1, (%rax) jmp 0x2fa1f movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movb $0x5c, (%rax) movb -0x49(%rbp), %cl movq -0x10(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movb %cl, (%rax) jmp 0x2fa0c movq -0x10(%rbp), %rax addq $0x1, %rax cmpq -0x48(%rbp), %rax jbe 0x2f9f5 movq -0x30(%rbp), %rax movb $0x1, (%rax) jmp 0x2fa1f movq -0x20(%rbp), %rax movb (%rax), %cl movq -0x10(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movb %cl, (%rax) jmp 0x2fa0e movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) jmp 0x2f882 movq -0x10(%rbp), %rax movb $0x0, (%rax) movq -0x10(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax addq $0x70, %rsp popq %rbp retq nopw (%rax,%rax)
escape_string_for_mysql: 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 [rbp+var_30], r9 mov rax, [rbp+var_10] mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_58], rax cmp [rbp+var_18], 0 jz short loc_2F855 mov rax, [rbp+var_18] sub rax, 1 mov [rbp+var_60], rax jmp short loc_2F860 loc_2F855: mov rax, [rbp+var_28] shl rax, 1 mov [rbp+var_60], rax loc_2F860: mov rax, [rbp+var_58] mov rcx, [rbp+var_60] add rax, rcx mov [rbp+var_48], rax mov rax, [rbp+var_30] mov byte ptr [rax], 0 mov rax, [rbp+var_20] add rax, [rbp+var_28] mov [rbp+var_40], rax loc_2F882: mov rax, [rbp+var_20] cmp rax, [rbp+var_40] jnb loc_2FA1F mov [rbp+var_49], 0 mov rdi, [rbp+var_8] mov rsi, [rbp+var_20] mov rdx, [rbp+var_40] call my_ci_charlen mov [rbp+var_50], eax cmp [rbp+var_50], 1 jle short loc_2F912 mov rax, [rbp+var_10] movsxd rcx, [rbp+var_50] add rax, rcx cmp rax, [rbp+var_48] jbe short loc_2F8CB mov rax, [rbp+var_30] mov byte ptr [rax], 1 jmp loc_2FA1F loc_2F8CB: jmp short $+2 loc_2F8CD: mov eax, [rbp+var_50] mov ecx, eax add ecx, 0FFFFFFFFh mov [rbp+var_50], ecx cmp eax, 0 jz short loc_2F901 mov rax, [rbp+var_20] mov rcx, rax add rcx, 1 mov [rbp+var_20], rcx mov cl, [rax] mov rax, [rbp+var_10] mov rdx, rax add rdx, 1 mov [rbp+var_10], rdx mov [rax], cl jmp short loc_2F8CD loc_2F901: mov rax, [rbp+var_20] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_20], rax jmp loc_2FA0E loc_2F912: cmp [rbp+var_50], 1 jge short loc_2F923 mov rax, [rbp+var_20] mov al, [rax] mov [rbp+var_49], al jmp short loc_2F999 loc_2F923: mov rax, [rbp+var_20] movsx eax, byte ptr [rax] mov [rbp+var_64], eax test eax, eax jz short loc_2F96F jmp short $+2 loc_2F933: mov eax, [rbp+var_64] sub eax, 0Ah jz short loc_2F975 jmp short $+2 loc_2F93D: mov eax, [rbp+var_64] sub eax, 0Dh jz short loc_2F97B jmp short $+2 loc_2F947: mov eax, [rbp+var_64] sub eax, 1Ah jz short loc_2F993 jmp short $+2 loc_2F951: mov eax, [rbp+var_64] sub eax, 22h ; '"' jz short loc_2F98D jmp short $+2 loc_2F95B: mov eax, [rbp+var_64] sub eax, 27h ; ''' jz short loc_2F987 jmp short $+2 loc_2F965: mov eax, [rbp+var_64] sub eax, 5Ch ; '\' jz short loc_2F981 jmp short loc_2F997 loc_2F96F: mov [rbp+var_49], 30h ; '0' jmp short loc_2F997 loc_2F975: mov [rbp+var_49], 6Eh ; 'n' jmp short loc_2F997 loc_2F97B: mov [rbp+var_49], 72h ; 'r' jmp short loc_2F997 loc_2F981: mov [rbp+var_49], 5Ch ; '\' jmp short loc_2F997 loc_2F987: mov [rbp+var_49], 27h ; ''' jmp short loc_2F997 loc_2F98D: mov [rbp+var_49], 22h ; '"' jmp short loc_2F997 loc_2F993: mov [rbp+var_49], 5Ah ; 'Z' loc_2F997: jmp short $+2 loc_2F999: cmp [rbp+var_49], 0 jz short loc_2F9DE mov rax, [rbp+var_10] add rax, 2 cmp rax, [rbp+var_48] jbe short loc_2F9B6 mov rax, [rbp+var_30] mov byte ptr [rax], 1 jmp short loc_2FA1F loc_2F9B6: mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx mov byte ptr [rax], 5Ch ; '\' mov cl, [rbp+var_49] mov rax, [rbp+var_10] mov rdx, rax add rdx, 1 mov [rbp+var_10], rdx mov [rax], cl jmp short loc_2FA0C loc_2F9DE: mov rax, [rbp+var_10] add rax, 1 cmp rax, [rbp+var_48] jbe short loc_2F9F5 mov rax, [rbp+var_30] mov byte ptr [rax], 1 jmp short loc_2FA1F loc_2F9F5: mov rax, [rbp+var_20] mov cl, [rax] mov rax, [rbp+var_10] mov rdx, rax add rdx, 1 mov [rbp+var_10], rdx mov [rax], cl loc_2FA0C: jmp short $+2 loc_2FA0E: mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax jmp loc_2F882 loc_2FA1F: mov rax, [rbp+var_10] mov byte ptr [rax], 0 mov rax, [rbp+var_10] mov rcx, [rbp+var_38] sub rax, rcx add rsp, 70h pop rbp retn
_BYTE * escape_string_for_mysql(long long a1, char *a2, long long a3, char *a4, long long a5, _BYTE *a6) { char *v7; // rax char v8; // cl char *v9; // rax char *v10; // rax char *v11; // rax int v13; // [rsp+Ch] [rbp-64h] long long v14; // [rsp+10h] [rbp-60h] int v15; // [rsp+20h] [rbp-50h] char v16; // [rsp+27h] [rbp-49h] unsigned long long v17; // [rsp+28h] [rbp-48h] unsigned long long v18; // [rsp+30h] [rbp-40h] char *v20; // [rsp+50h] [rbp-20h] char *v21; // [rsp+60h] [rbp-10h] v21 = a2; v20 = a4; if ( a3 ) v14 = a3 - 1; else v14 = 2 * a5; v17 = (unsigned long long)&a2[v14]; *a6 = 0; v18 = (unsigned long long)&a4[a5]; while ( (unsigned long long)v20 < v18 ) { v16 = 0; v15 = my_ci_charlen(a1, v20, v18); if ( v15 <= 1 ) { if ( v15 >= 1 ) { v13 = *v20; if ( *v20 ) { switch ( v13 ) { case 10: v16 = 110; break; case 13: v16 = 114; break; case 26: v16 = 90; break; case 34: v16 = 34; break; case 39: v16 = 39; break; case 92: v16 = 92; break; } } else { v16 = 48; } } else { v16 = *v20; } if ( v16 ) { if ( (unsigned long long)(v21 + 2) > v17 ) { *a6 = 1; break; } *v21 = 92; v10 = v21 + 1; v21 += 2; *v10 = v16; } else { if ( (unsigned long long)(v21 + 1) > v17 ) { *a6 = 1; break; } v11 = v21++; *v11 = *v20; } } else { if ( (unsigned long long)&v21[v15] > v17 ) { *a6 = 1; break; } while ( v15-- ) { v7 = v20++; v8 = *v7; v9 = v21++; *v9 = v8; } --v20; } ++v20; } *v21 = 0; return (_BYTE *)(v21 - a2); }
escape_string_for_mysql: 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 qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x58],RAX CMP qword ptr [RBP + -0x18],0x0 JZ 0x0012f855 MOV RAX,qword ptr [RBP + -0x18] SUB RAX,0x1 MOV qword ptr [RBP + -0x60],RAX JMP 0x0012f860 LAB_0012f855: MOV RAX,qword ptr [RBP + -0x28] SHL RAX,0x1 MOV qword ptr [RBP + -0x60],RAX LAB_0012f860: MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x60] ADD RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x40],RAX LAB_0012f882: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x40] JNC 0x0012fa1f MOV byte ptr [RBP + -0x49],0x0 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x40] CALL 0x0012fa40 MOV dword ptr [RBP + -0x50],EAX CMP dword ptr [RBP + -0x50],0x1 JLE 0x0012f912 MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x50] ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x48] JBE 0x0012f8cb MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],0x1 JMP 0x0012fa1f LAB_0012f8cb: JMP 0x0012f8cd LAB_0012f8cd: MOV EAX,dword ptr [RBP + -0x50] MOV ECX,EAX ADD ECX,-0x1 MOV dword ptr [RBP + -0x50],ECX CMP EAX,0x0 JZ 0x0012f901 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x20],RCX MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RAX],CL JMP 0x0012f8cd LAB_0012f901: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,-0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x0012fa0e LAB_0012f912: CMP dword ptr [RBP + -0x50],0x1 JGE 0x0012f923 MOV RAX,qword ptr [RBP + -0x20] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x49],AL JMP 0x0012f999 LAB_0012f923: MOV RAX,qword ptr [RBP + -0x20] MOVSX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x64],EAX TEST EAX,EAX JZ 0x0012f96f JMP 0x0012f933 LAB_0012f933: MOV EAX,dword ptr [RBP + -0x64] SUB EAX,0xa JZ 0x0012f975 JMP 0x0012f93d LAB_0012f93d: MOV EAX,dword ptr [RBP + -0x64] SUB EAX,0xd JZ 0x0012f97b JMP 0x0012f947 LAB_0012f947: MOV EAX,dword ptr [RBP + -0x64] SUB EAX,0x1a JZ 0x0012f993 JMP 0x0012f951 LAB_0012f951: MOV EAX,dword ptr [RBP + -0x64] SUB EAX,0x22 JZ 0x0012f98d JMP 0x0012f95b LAB_0012f95b: MOV EAX,dword ptr [RBP + -0x64] SUB EAX,0x27 JZ 0x0012f987 JMP 0x0012f965 LAB_0012f965: MOV EAX,dword ptr [RBP + -0x64] SUB EAX,0x5c JZ 0x0012f981 JMP 0x0012f997 LAB_0012f96f: MOV byte ptr [RBP + -0x49],0x30 JMP 0x0012f997 LAB_0012f975: MOV byte ptr [RBP + -0x49],0x6e JMP 0x0012f997 LAB_0012f97b: MOV byte ptr [RBP + -0x49],0x72 JMP 0x0012f997 LAB_0012f981: MOV byte ptr [RBP + -0x49],0x5c JMP 0x0012f997 LAB_0012f987: MOV byte ptr [RBP + -0x49],0x27 JMP 0x0012f997 LAB_0012f98d: MOV byte ptr [RBP + -0x49],0x22 JMP 0x0012f997 LAB_0012f993: MOV byte ptr [RBP + -0x49],0x5a LAB_0012f997: JMP 0x0012f999 LAB_0012f999: CMP byte ptr [RBP + -0x49],0x0 JZ 0x0012f9de MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x48] JBE 0x0012f9b6 MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],0x1 JMP 0x0012fa1f LAB_0012f9b6: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOV byte ptr [RAX],0x5c MOV CL,byte ptr [RBP + -0x49] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RAX],CL JMP 0x0012fa0c LAB_0012f9de: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 CMP RAX,qword ptr [RBP + -0x48] JBE 0x0012f9f5 MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],0x1 JMP 0x0012fa1f LAB_0012f9f5: MOV RAX,qword ptr [RBP + -0x20] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RAX],CL LAB_0012fa0c: JMP 0x0012fa0e LAB_0012fa0e: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x0012f882 LAB_0012fa1f: MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX ADD RSP,0x70 POP RBP RET
long escape_string_for_mysql (int8 param_1,char *param_2,long param_3,char *param_4,long param_5, int1 *param_6) { char cVar1; char *pcVar2; long local_68; int local_58; char local_51; char *local_28; char *local_18; if (param_3 == 0) { local_68 = param_5 << 1; } else { local_68 = param_3 + -1; } pcVar2 = param_2 + local_68; *param_6 = 0; local_28 = param_4; local_18 = param_2; do { if (param_4 + param_5 <= local_28) { LAB_0012fa1f: *local_18 = '\0'; return (long)local_18 - (long)param_2; } local_51 = '\0'; local_58 = my_ci_charlen(param_1,local_28,param_4 + param_5); if (local_58 < 2) { if (local_58 < 1) { local_51 = *local_28; } else { cVar1 = *local_28; if (cVar1 == '\0') { local_51 = '0'; } else if (cVar1 == '\n') { local_51 = 'n'; } else if (cVar1 == '\r') { local_51 = 'r'; } else if (cVar1 == '\x1a') { local_51 = 'Z'; } else if (cVar1 == '\"') { local_51 = '\"'; } else if (cVar1 == '\'') { local_51 = '\''; } else if (cVar1 == '\\') { local_51 = '\\'; } } if (local_51 == '\0') { if (pcVar2 < local_18 + 1) { *param_6 = 1; goto LAB_0012fa1f; } *local_18 = *local_28; local_18 = local_18 + 1; } else { if (pcVar2 < local_18 + 2) { *param_6 = 1; goto LAB_0012fa1f; } *local_18 = '\\'; local_18[1] = local_51; local_18 = local_18 + 2; } } else { if (pcVar2 < local_18 + local_58) { *param_6 = 1; goto LAB_0012fa1f; } while (local_58 != 0) { *local_18 = *local_28; local_58 = local_58 + -1; local_28 = local_28 + 1; local_18 = local_18 + 1; } local_28 = local_28 + -1; } local_28 = local_28 + 1; } while( true ); }