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
55,200
minja::chat_template::add_system(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::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/chat-template.hpp
static nlohmann::ordered_json add_system(const nlohmann::ordered_json & messages, const std::string & system_prompt) { json messages_with_system = messages; if (messages_with_system.size() > 0 && messages_with_system[0].at("role") == "system") { std::string existing_system = messages_with_system.at(0).at("content"); messages_with_system[0] = json { {"role", "system"}, {"content", existing_system + "\n" + system_prompt}, }; } else { messages_with_system.insert(messages_with_system.begin(), json { {"role", "system"}, {"content", system_prompt}, }); } return messages_with_system; }
O2
cpp
minja::chat_template::add_system(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::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x120, %rsp # imm = 0x120 movq %rdx, %r14 movq %rdi, %rbx callq 0x4228c movq %rbx, %rdi callq 0x42134 testq %rax, %rax je 0x7a184 movq %rbx, %rdi xorl %esi, %esi callq 0x7d954 leaq 0x3b121(%rip), %rsi # 0xb50ff movq %rax, %rdi callq 0x7a4fa leaq 0x3b18d(%rip), %rsi # 0xb517a movq %rax, %rdi callq 0x7a936 testb %al, %al je 0x7a184 movq %rbx, %rdi xorl %esi, %esi callq 0x7da4e leaq 0x3b0fb(%rip), %rsi # 0xb5109 movq %rax, %rdi callq 0x7ad1a leaq 0xe0(%rsp), %rdi movq %rax, %rsi callq 0x63fea leaq 0x3b0d2(%rip), %rsi # 0xb50ff leaq 0x50(%rsp), %rdi callq 0x5c53a leaq 0x68(%rsp), %rdi leaq 0x3b137(%rip), %rsi # 0xb517a callq 0x5cdfa leaq 0x80(%rsp), %r15 leaq 0x50(%rsp), %rsi pushq $0x2 popq %rdx movq %r15, %rdi callq 0x5c54a leaq 0x98(%rsp), %r15 leaq 0x3b09a(%rip), %rsi # 0xb5109 leaq 0x20(%rsp), %rdi callq 0x5c562 leaq 0x37858(%rip), %rdx # 0xb18d8 movq %rsp, %rdi leaq 0xe0(%rsp), %rsi callq 0x385b7 leaq 0xc0(%rsp), %rdi movq %rsp, %rsi movq %r14, %rdx callq 0x3ae20 leaq 0x38(%rsp), %rdi leaq 0xc0(%rsp), %rsi callq 0x7dbae leaq 0x20(%rsp), %rsi pushq $0x2 popq %rdx movq %r15, %rdi callq 0x5c54a leaq 0xb0(%rsp), %rdi leaq 0x80(%rsp), %rsi pushq $0x2 popq %rdx pushq $0x1 popq %rcx pushq $0x2 popq %r8 callq 0x5cbe6 movq %rbx, %rdi xorl %esi, %esi callq 0x7d954 leaq 0xb0(%rsp), %r14 movq %rax, %rdi movq %r14, %rsi callq 0x400ba movq %r14, %rdi callq 0x3d534 pushq $0x18 popq %r14 leaq (%rsp,%r14), %rdi addq $0x80, %rdi callq 0x3d534 addq $-0x18, %r14 cmpq $-0x18, %r14 jne 0x7a10d pushq $0x18 popq %r14 leaq (%rsp,%r14), %rdi addq $0x20, %rdi callq 0x3d534 addq $-0x18, %r14 cmpq $-0x18, %r14 jne 0x7a12b leaq 0xc0(%rsp), %rdi callq 0x251b8 movq %rsp, %rdi callq 0x251b8 pushq $0x18 popq %r14 leaq (%rsp,%r14), %rdi addq $0x50, %rdi callq 0x3d534 addq $-0x18, %r14 cmpq $-0x18, %r14 jne 0x7a15b leaq 0xe0(%rsp), %rdi callq 0x251b8 jmp 0x7a2bc leaq 0xe0(%rsp), %r15 movq %r15, %rdi movq %rbx, %rsi callq 0x4232c movq (%r15), %rax movq %rax, 0x100(%rsp) movups 0x8(%r15), %xmm0 movups %xmm0, 0x108(%rsp) movq 0x18(%r15), %rax movq %rax, 0x118(%rsp) leaq 0x3af3d(%rip), %rsi # 0xb50ff leaq 0x50(%rsp), %rdi callq 0x5c53a leaq 0x68(%rsp), %rdi leaq 0x3afa2(%rip), %rsi # 0xb517a callq 0x5cdfa leaq 0x80(%rsp), %r15 leaq 0x50(%rsp), %rsi pushq $0x2 popq %rdx movq %r15, %rdi callq 0x5c54a leaq 0x98(%rsp), %r15 leaq 0x3af05(%rip), %rsi # 0xb5109 leaq 0x20(%rsp), %rdi callq 0x5c562 leaq 0x38(%rsp), %rdi movq %r14, %rsi callq 0x5c708 leaq 0x20(%rsp), %rsi pushq $0x2 popq %rdx movq %r15, %rdi callq 0x5c54a movq %rsp, %rdi leaq 0x80(%rsp), %rsi pushq $0x2 popq %rdx pushq $0x1 popq %rcx pushq $0x2 popq %r8 callq 0x5cbe6 leaq 0xc0(%rsp), %rdi leaq 0x100(%rsp), %rdx movq %rsp, %rcx movq %rbx, %rsi callq 0x7dbbe movq %rsp, %rdi callq 0x3d534 pushq $0x18 popq %r14 leaq (%rsp,%r14), %rdi addq $0x80, %rdi callq 0x3d534 addq $-0x18, %r14 cmpq $-0x18, %r14 jne 0x7a26c pushq $0x18 popq %r14 leaq (%rsp,%r14), %rdi addq $0x20, %rdi callq 0x3d534 addq $-0x18, %r14 cmpq $-0x18, %r14 jne 0x7a28a pushq $0x18 popq %r14 leaq (%rsp,%r14), %rdi addq $0x50, %rdi callq 0x3d534 addq $-0x18, %r14 cmpq $-0x18, %r14 jne 0x7a2a5 movq %rbx, %rax addq $0x120, %rsp # imm = 0x120 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 leaq 0xb0(%rsp), %rdi callq 0x3d534 jmp 0x7a2e4 movq %rax, %r14 pushq $0x18 popq %r12 leaq (%rsp,%r12), %rdi addq $0x80, %rdi callq 0x3d534 addq $-0x18, %r12 cmpq $-0x18, %r12 jne 0x7a2e8 xorl %ebp, %ebp jmp 0x7a30c movq %rax, %r14 movb $0x1, %bpl pushq $0x18 popq %r12 leaq (%rsp,%r12), %rdi addq $0x20, %rdi callq 0x3d534 addq $-0x18, %r12 cmpq $-0x18, %r12 jne 0x7a310 movb $0x1, %r12b jmp 0x7a335 movq %rax, %r14 movb $0x1, %bpl xorl %r12d, %r12d leaq 0xc0(%rsp), %rdi callq 0x251b8 jmp 0x7a34d movq %rax, %r14 movb $0x1, %bpl xorl %r12d, %r12d movq %rsp, %rdi callq 0x251b8 testb %r12b, %r12b je 0x7a362 jmp 0x7a376 movq %rax, %r14 movb $0x1, %bpl leaq 0x20(%rsp), %rdi callq 0x3d534 jmp 0x7a376 jmp 0x7a370 movq %rax, %r14 movb $0x1, %bpl pushq $0x18 popq %r12 leaq (%rsp,%r12), %rdi addq $0x50, %rdi callq 0x3d534 addq $-0x18, %r12 cmpq $-0x18, %r12 jne 0x7a37a leaq 0x80(%rsp), %r12 cmpq %r15, %r12 setne %al andb %al, %bpl cmpb $0x1, %bpl jne 0x7a3cd addq $-0x18, %r15 movq %r15, %rdi callq 0x3d534 cmpq %r12, %r15 jne 0x7a3a8 jmp 0x7a3cd movq %rax, %r14 leaq 0x50(%rsp), %rdi callq 0x3d534 jmp 0x7a3cd movq %rax, %r14 leaq 0xe0(%rsp), %rdi callq 0x251b8 jmp 0x7a4a6 movq %rax, %r14 movq %rsp, %rdi callq 0x3d534 jmp 0x7a3ef movq %rax, %r14 pushq $0x18 popq %r12 leaq (%rsp,%r12), %rdi addq $0x80, %rdi callq 0x3d534 addq $-0x18, %r12 cmpq $-0x18, %r12 jne 0x7a3f3 xorl %ebp, %ebp jmp 0x7a417 movq %rax, %r14 movb $0x1, %bpl pushq $0x18 popq %r12 leaq (%rsp,%r12), %rdi addq $0x20, %rdi callq 0x3d534 addq $-0x18, %r12 cmpq $-0x18, %r12 jne 0x7a41b jmp 0x7a44b movq %rax, %r14 leaq 0x20(%rsp), %rdi callq 0x3d534 jmp 0x7a448 jmp 0x7a445 movq %rax, %r14 movb $0x1, %bpl pushq $0x18 popq %r12 leaq (%rsp,%r12), %rdi addq $0x50, %rdi callq 0x3d534 addq $-0x18, %r12 cmpq $-0x18, %r12 jne 0x7a44f leaq 0x80(%rsp), %r12 cmpq %r15, %r12 setne %al andb %al, %bpl cmpb $0x1, %bpl jne 0x7a4a6 addq $-0x18, %r15 movq %r15, %rdi callq 0x3d534 cmpq %r12, %r15 jne 0x7a47d jmp 0x7a4a6 movq %rax, %r14 leaq 0x50(%rsp), %rdi callq 0x3d534 jmp 0x7a4a6 jmp 0x7a4a3 jmp 0x7a4a3 movq %rax, %r14 movq %rbx, %rdi callq 0x3d534 movq %r14, %rdi callq 0x24f60
_ZN5minja13chat_template10add_systemERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEERKSB_: push rbp push r15 push r14 push r12 push rbx sub rsp, 120h mov r14, rdx mov rbx, rdi 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&) mov rdi, rbx 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) test rax, rax jz loc_7A184 mov rdi, rbx xor esi, esi call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::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[](ulong) lea rsi, aRole; "role" mov rdi, rax call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_ lea rsi, aSystem; "system" mov rdi, rax call _ZN8nlohmann16json_abi_v3_11_3eqIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_ test al, al jz loc_7A184 mov rdi, rbx xor esi, esi call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atEm; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::at(ulong) lea rsi, aContent; "content" mov rdi, rax call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_ lea rdi, [rsp+148h+var_68] mov rsi, rax call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE lea rsi, aRole; "role" lea rdi, [rsp+148h+var_F8] call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA5_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_ lea rdi, [rsp+148h+var_E0] lea rsi, aSystem; "system" call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA7_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_ lea r15, [rsp+148h+var_C8] lea rsi, [rsp+148h+var_F8] push 2 pop rdx mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ESt16initializer_listISG_E; nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::json_ref(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>) lea r15, [rsp+148h+var_B0] lea rsi, aContent; "content" lea rdi, [rsp+148h+var_128] call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA8_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_ lea rdx, aErrorWhileHand_0+33h; "\n" mov rdi, rsp lea rsi, [rsp+148h+var_68] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) lea rdi, [rsp+148h+var_88] mov rsi, rsp mov rdx, r14 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_; std::operator+<char>(std::string&&,std::string const&) lea rdi, [rsp+148h+var_110] lea rsi, [rsp+148h+var_88] call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJSB_ETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSJ_ lea rsi, [rsp+148h+var_128] push 2 pop rdx mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ESt16initializer_listISG_E; nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::json_ref(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>) lea rdi, [rsp+148h+var_98] lea rsi, [rsp+148h+var_C8] push 2 pop rdx push 1 pop rcx push 2 pop r8 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ESt16initializer_listINS0_6detail8json_refISD_EEEbNSF_7value_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t) mov rdi, rbx xor esi, esi call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::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[](ulong) lea r14, [rsp+148h+var_98] mov rdi, rax mov rsi, r14 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, r14 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() push 18h pop r14 loc_7A10D: lea rdi, [rsp+r14+148h+var_148] add rdi, 80h 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() add r14, 0FFFFFFFFFFFFFFE8h cmp r14, 0FFFFFFFFFFFFFFE8h jnz short loc_7A10D push 18h pop r14 loc_7A12B: lea rdi, [rsp+r14+148h+var_148] add rdi, 20h ; ' ' 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() add r14, 0FFFFFFFFFFFFFFE8h cmp r14, 0FFFFFFFFFFFFFFE8h jnz short loc_7A12B lea rdi, [rsp+148h+var_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rsp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() push 18h pop r14 loc_7A15B: lea rdi, [rsp+r14+148h+var_148] add rdi, 50h ; 'P' 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() add r14, 0FFFFFFFFFFFFFFE8h cmp r14, 0FFFFFFFFFFFFFFE8h jnz short loc_7A15B lea rdi, [rsp+148h+var_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp loc_7A2BC loc_7A184: lea r15, [rsp+148h+var_68] mov rdi, r15 mov rsi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5beginEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::begin(void) mov rax, [r15] mov [rsp+148h+var_48], rax movups xmm0, xmmword ptr [r15+8] movups [rsp+148h+var_40], xmm0 mov rax, [r15+18h] mov [rsp+148h+var_30], rax lea rsi, aRole; "role" lea rdi, [rsp+148h+var_F8] call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA5_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_ lea rdi, [rsp+148h+var_E0] lea rsi, aSystem; "system" call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA7_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_ lea r15, [rsp+148h+var_C8] lea rsi, [rsp+148h+var_F8] push 2 pop rdx mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ESt16initializer_listISG_E; nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::json_ref(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>) lea r15, [rsp+148h+var_B0] lea rsi, aContent; "content" lea rdi, [rsp+148h+var_128] call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA8_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_ lea rdi, [rsp+148h+var_110] mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRKSB_ETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSL_ lea rsi, [rsp+148h+var_128] push 2 pop rdx mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ESt16initializer_listISG_E; nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::json_ref(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>) mov rdi, rsp lea rsi, [rsp+148h+var_C8] push 2 pop rdx push 1 pop rcx push 2 pop r8 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ESt16initializer_listINS0_6detail8json_refISD_EEEbNSF_7value_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t) lea rdi, [rsp+148h+var_88] lea rdx, [rsp+148h+var_48] mov rcx, rsp mov rsi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6insertENS0_6detail9iter_implIKSD_EEOSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::insert(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>&&) mov rdi, rsp 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() push 18h pop r14 loc_7A26C: lea rdi, [rsp+r14+148h+var_148] add rdi, 80h 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() add r14, 0FFFFFFFFFFFFFFE8h cmp r14, 0FFFFFFFFFFFFFFE8h jnz short loc_7A26C push 18h pop r14 loc_7A28A: lea rdi, [rsp+r14+148h+var_148] add rdi, 20h ; ' ' 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() add r14, 0FFFFFFFFFFFFFFE8h cmp r14, 0FFFFFFFFFFFFFFE8h jnz short loc_7A28A push 18h pop r14 loc_7A2A5: lea rdi, [rsp+r14+148h+var_148] add rdi, 50h ; 'P' 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() add r14, 0FFFFFFFFFFFFFFE8h cmp r14, 0FFFFFFFFFFFFFFE8h jnz short loc_7A2A5 loc_7A2BC: mov rax, rbx add rsp, 120h pop rbx pop r12 pop r14 pop r15 pop rbp retn mov r14, rax lea rdi, [rsp+arg_A8] 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_7A2E4 mov r14, rax loc_7A2E4: push 18h pop r12 loc_7A2E8: lea rdi, [rsp+r12+0] add rdi, 80h 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() add r12, 0FFFFFFFFFFFFFFE8h cmp r12, 0FFFFFFFFFFFFFFE8h jnz short loc_7A2E8 xor ebp, ebp jmp short loc_7A30C mov r14, rax mov bpl, 1 loc_7A30C: push 18h pop r12 loc_7A310: lea rdi, [rsp+r12+0] add rdi, 20h ; ' ' 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() add r12, 0FFFFFFFFFFFFFFE8h cmp r12, 0FFFFFFFFFFFFFFE8h jnz short loc_7A310 mov r12b, 1 jmp short loc_7A335 mov r14, rax mov bpl, 1 xor r12d, r12d loc_7A335: lea rdi, [rsp+arg_B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_7A34D mov r14, rax mov bpl, 1 xor r12d, r12d loc_7A34D: mov rdi, rsp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test r12b, r12b jz short loc_7A362 jmp short loc_7A376 mov r14, rax mov bpl, 1 loc_7A362: lea rdi, [rsp+arg_18] 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_7A376 jmp short $+2 loc_7A370: mov r14, rax mov bpl, 1 loc_7A376: push 18h pop r12 loc_7A37A: lea rdi, [rsp+r12+0] add rdi, 50h ; 'P' 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() add r12, 0FFFFFFFFFFFFFFE8h cmp r12, 0FFFFFFFFFFFFFFE8h jnz short loc_7A37A lea r12, [rsp+arg_78] cmp r12, r15 setnz al and bpl, al cmp bpl, 1 jnz short loc_7A3CD loc_7A3A8: add r15, 0FFFFFFFFFFFFFFE8h mov rdi, r15 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() cmp r15, r12 jnz short loc_7A3A8 jmp short loc_7A3CD mov r14, rax lea rdi, [rsp+arg_48] 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_7A3CD mov r14, rax loc_7A3CD: lea rdi, [rsp+arg_D8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp loc_7A4A6 mov r14, rax mov rdi, rsp 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_7A3EF mov r14, rax loc_7A3EF: push 18h pop r12 loc_7A3F3: lea rdi, [rsp+r12+0] add rdi, 80h 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() add r12, 0FFFFFFFFFFFFFFE8h cmp r12, 0FFFFFFFFFFFFFFE8h jnz short loc_7A3F3 xor ebp, ebp jmp short loc_7A417 mov r14, rax mov bpl, 1 loc_7A417: push 18h pop r12 loc_7A41B: lea rdi, [rsp+r12+0] add rdi, 20h ; ' ' 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() add r12, 0FFFFFFFFFFFFFFE8h cmp r12, 0FFFFFFFFFFFFFFE8h jnz short loc_7A41B jmp short loc_7A44B mov r14, rax lea rdi, [rsp+arg_18] 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_7A448 jmp short $+2 loc_7A445: mov r14, rax loc_7A448: mov bpl, 1 loc_7A44B: push 18h pop r12 loc_7A44F: lea rdi, [rsp+r12+0] add rdi, 50h ; 'P' 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() add r12, 0FFFFFFFFFFFFFFE8h cmp r12, 0FFFFFFFFFFFFFFE8h jnz short loc_7A44F lea r12, [rsp+arg_78] cmp r12, r15 setnz al and bpl, al cmp bpl, 1 jnz short loc_7A4A6 loc_7A47D: add r15, 0FFFFFFFFFFFFFFE8h mov rdi, r15 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() cmp r15, r12 jnz short loc_7A47D jmp short loc_7A4A6 mov r14, rax lea rdi, [rsp+arg_48] 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_7A4A6 jmp short loc_7A4A3 jmp short $+2 loc_7A4A3: mov r14, rax loc_7A4A6: mov rdi, rbx 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 rdi, r14 call __Unwind_Resume
unsigned __int8 * minja::chat_template::add_system(unsigned __int8 *a1, unsigned __int8 *a2, long long a3) { long long v4; // rax long long v5; // rax long long v6; // rax long long v7; // rax long long v8; // rax long long i; // r14 long long j; // r14 long long k; // r14 long long m; // r14 long long n; // r14 long long ii; // r14 _BYTE v16[32]; // [rsp+0h] [rbp-148h] BYREF _BYTE v17[24]; // [rsp+20h] [rbp-128h] BYREF _BYTE v18[24]; // [rsp+38h] [rbp-110h] BYREF _BYTE v19[24]; // [rsp+50h] [rbp-F8h] BYREF _BYTE v20[24]; // [rsp+68h] [rbp-E0h] BYREF _BYTE v21[24]; // [rsp+80h] [rbp-C8h] BYREF _BYTE v22[24]; // [rsp+98h] [rbp-B0h] BYREF _BYTE v23[16]; // [rsp+B0h] [rbp-98h] BYREF _BYTE v24[32]; // [rsp+C0h] [rbp-88h] BYREF long long v25; // [rsp+E0h] [rbp-68h] BYREF __int128 v26; // [rsp+E8h] [rbp-60h] long long v27; // [rsp+F8h] [rbp-50h] long long v28; // [rsp+100h] [rbp-48h] BYREF __int128 v29; // [rsp+108h] [rbp-40h] long long v30; // [rsp+118h] [rbp-30h] nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( a1, a2); 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>::size(a1) && (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[]( a1, 0LL), v5 = ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_( v4, "role"), (unsigned __int8)ZN8nlohmann16json_abi_v3_11_3eqIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_( v5, "system")) ) { v6 = 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>::at( a1, 0LL); v7 = ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_( v6, "content"); ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE( (long long)&v25, v7); ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA5_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_((long long)v19); ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA7_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_((long long)v20); nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::json_ref( (long long)v21, (long long)v19, 2LL); ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA8_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_((long long)v17); std::operator+<char>((long long)v16, (long long)&v25, (long long)"\n"); std::operator+<char>((long long)v24, (long long)v16, a3); ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJSB_ETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSJ_( v18, v24); nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::json_ref( (long long)v22, (long long)v17, 2LL); 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( v23, v21, 2LL, 1LL, 2LL); v8 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( a1, 0LL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=( v8, (long long)v23); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v23); for ( i = 24LL; i != -24; i -= 24LL ) 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)&v21[i]); for ( j = 24LL; j != -24; j -= 24LL ) 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)&v17[j]); std::string::~string(v24); std::string::~string(v16); for ( k = 24LL; k != -24; k -= 24LL ) 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)&v19[k]); std::string::~string(&v25); } 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>::begin( (long long)&v25, (long long)a1); v28 = v25; v29 = v26; v30 = v27; ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA5_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_((long long)v19); ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA7_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_((long long)v20); nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::json_ref( (long long)v21, (long long)v19, 2LL); ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA8_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_((long long)v17); ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRKSB_ETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSL_( (long long)v18, a3); nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::json_ref( (long long)v22, (long long)v17, 2LL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( v16, v21, 2LL, 1LL, 2LL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::insert( v24, a1, &v28, v16); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v16); for ( m = 24LL; m != -24; m -= 24LL ) 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)&v21[m]); for ( n = 24LL; n != -24; n -= 24LL ) 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)&v17[n]); for ( ii = 24LL; ii != -24; ii -= 24LL ) 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)&v19[ii]); } return a1; }
add_system: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x120 MOV R14,RDX MOV RBX,RDI CALL 0x0014228c MOV RDI,RBX CALL 0x00142134 TEST RAX,RAX JZ 0x0017a184 LAB_00179fcd: MOV RDI,RBX XOR ESI,ESI CALL 0x0017d954 LEA RSI,[0x1b50ff] MOV RDI,RAX CALL 0x0017a4fa LEA RSI,[0x1b517a] MOV RDI,RAX CALL 0x0017a936 TEST AL,AL JZ 0x0017a184 LAB_00179ffd: MOV RDI,RBX XOR ESI,ESI CALL 0x0017da4e LEA RSI,[0x1b5109] MOV RDI,RAX CALL 0x0017ad1a LEA RDI,[RSP + 0xe0] MOV RSI,RAX CALL 0x00163fea LAB_0017a026: LEA RSI,[0x1b50ff] LEA RDI,[RSP + 0x50] CALL 0x0015c53a LEA RDI,[RSP + 0x68] LAB_0017a03c: LEA RSI,[0x1b517a] CALL 0x0015cdfa LAB_0017a048: LEA R15,[RSP + 0x80] LEA RSI,[RSP + 0x50] PUSH 0x2 POP RDX MOV RDI,R15 CALL 0x0015c54a LEA R15,[RSP + 0x98] LAB_0017a068: LEA RSI,[0x1b5109] LEA RDI,[RSP + 0x20] CALL 0x0015c562 LAB_0017a079: LEA RDX,[0x1b18d8] MOV RDI,RSP LEA RSI,[RSP + 0xe0] CALL 0x001385b7 LAB_0017a090: LEA RDI,[RSP + 0xc0] MOV RSI,RSP MOV RDX,R14 CALL 0x0013ae20 LAB_0017a0a3: LEA RDI,[RSP + 0x38] LEA RSI,[RSP + 0xc0] CALL 0x0017dbae LAB_0017a0b5: LEA RSI,[RSP + 0x20] PUSH 0x2 POP RDX MOV RDI,R15 CALL 0x0015c54a LAB_0017a0c5: LEA RDI,[RSP + 0xb0] LEA RSI,[RSP + 0x80] PUSH 0x2 POP RDX PUSH 0x1 POP RCX PUSH 0x2 POP R8 CALL 0x0015cbe6 LAB_0017a0e4: MOV RDI,RBX XOR ESI,ESI CALL 0x0017d954 LEA R14,[RSP + 0xb0] MOV RDI,RAX MOV RSI,R14 CALL 0x001400ba MOV RDI,R14 CALL 0x0013d534 PUSH 0x18 POP R14 LAB_0017a10d: LEA RDI,[RSP + R14*0x1] ADD RDI,0x80 CALL 0x0013d534 ADD R14,-0x18 CMP R14,-0x18 JNZ 0x0017a10d PUSH 0x18 POP R14 LAB_0017a12b: LEA RDI,[RSP + R14*0x1] ADD RDI,0x20 CALL 0x0013d534 ADD R14,-0x18 CMP R14,-0x18 JNZ 0x0017a12b LEA RDI,[RSP + 0xc0] CALL 0x001251b8 MOV RDI,RSP CALL 0x001251b8 PUSH 0x18 POP R14 LAB_0017a15b: LEA RDI,[RSP + R14*0x1] ADD RDI,0x50 CALL 0x0013d534 ADD R14,-0x18 CMP R14,-0x18 JNZ 0x0017a15b LEA RDI,[RSP + 0xe0] CALL 0x001251b8 JMP 0x0017a2bc LAB_0017a184: LEA R15,[RSP + 0xe0] MOV RDI,R15 MOV RSI,RBX CALL 0x0014232c MOV RAX,qword ptr [R15] MOV qword ptr [RSP + 0x100],RAX MOVUPS XMM0,xmmword ptr [R15 + 0x8] MOVUPS xmmword ptr [RSP + 0x108],XMM0 MOV RAX,qword ptr [R15 + 0x18] MOV qword ptr [RSP + 0x118],RAX LAB_0017a1bb: LEA RSI,[0x1b50ff] LEA RDI,[RSP + 0x50] CALL 0x0015c53a LEA RDI,[RSP + 0x68] LAB_0017a1d1: LEA RSI,[0x1b517a] CALL 0x0015cdfa LAB_0017a1dd: LEA R15,[RSP + 0x80] LEA RSI,[RSP + 0x50] PUSH 0x2 POP RDX MOV RDI,R15 CALL 0x0015c54a LEA R15,[RSP + 0x98] LAB_0017a1fd: LEA RSI,[0x1b5109] LEA RDI,[RSP + 0x20] CALL 0x0015c562 LEA RDI,[RSP + 0x38] LAB_0017a213: MOV RSI,R14 CALL 0x0015c708 LAB_0017a21b: LEA RSI,[RSP + 0x20] PUSH 0x2 POP RDX MOV RDI,R15 CALL 0x0015c54a LAB_0017a22b: MOV RDI,RSP LEA RSI,[RSP + 0x80] PUSH 0x2 POP RDX PUSH 0x1 POP RCX PUSH 0x2 POP R8 CALL 0x0015cbe6 LAB_0017a245: LEA RDI,[RSP + 0xc0] LEA RDX,[RSP + 0x100] MOV RCX,RSP MOV RSI,RBX CALL 0x0017dbbe LAB_0017a260: MOV RDI,RSP CALL 0x0013d534 PUSH 0x18 POP R14 LAB_0017a26c: LEA RDI,[RSP + R14*0x1] ADD RDI,0x80 CALL 0x0013d534 ADD R14,-0x18 CMP R14,-0x18 JNZ 0x0017a26c PUSH 0x18 POP R14 LAB_0017a28a: LEA RDI,[RSP + R14*0x1] ADD RDI,0x20 CALL 0x0013d534 ADD R14,-0x18 CMP R14,-0x18 JNZ 0x0017a28a PUSH 0x18 POP R14 LAB_0017a2a5: LEA RDI,[RSP + R14*0x1] ADD RDI,0x50 CALL 0x0013d534 ADD R14,-0x18 CMP R14,-0x18 JNZ 0x0017a2a5 LAB_0017a2bc: MOV RAX,RBX ADD RSP,0x120 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* minja::chat_template::add_system(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, 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::__cxx11::string const&) */ chat_template * __thiscall minja::chat_template::add_system(chat_template *this,basic_json *param_1,string *param_2) { char cVar1; long lVar2; int8 uVar3; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *pbVar4; string asStack_148 [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_128 [24]; int1 local_110 [24]; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_f8 [24]; int1 local_e0 [24]; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_c8 [24]; int1 local_b0 [24]; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_98 [16]; string local_88 [32]; int8 local_68; int4 local_60; int4 uStack_5c; int4 uStack_58; int4 uStack_54; int8 local_50; int8 local_48; int4 local_40; int4 uStack_3c; int4 uStack_38; int4 uStack_34; int8 local_30; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)this,param_1); lVar2 = nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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); if (lVar2 != 0) { /* try { // try from 00179fcd to 00179fe5 has its CatchHandler @ 0017a4a3 */ uVar3 = nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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> *)this,0); uVar3 = _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_ (uVar3,&DAT_001b50ff); cVar1 = _ZN8nlohmann16json_abi_v3_11_3eqIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_ (uVar3); if (cVar1 != '\0') { /* try { // try from 00179ffd to 0017a025 has its CatchHandler @ 0017a4a1 */ uVar3 = nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::at((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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,0); uVar3 = _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_ (uVar3,"content"); _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE (&local_68,uVar3); /* try { // try from 0017a026 to 0017a036 has its CatchHandler @ 0017a3ca */ _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA5_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_ (local_f8,&DAT_001b50ff); /* try { // try from 0017a03c to 0017a047 has its CatchHandler @ 0017a3bb */ _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA7_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_ (local_e0,"system"); /* try { // try from 0017a048 to 0017a05f has its CatchHandler @ 0017a370 */ nlohmann::json_abi_v3_11_3::detail:: json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::json_ref(local_c8,local_f8,2); /* try { // try from 0017a068 to 0017a078 has its CatchHandler @ 0017a36e */ _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA8_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_ (local_128,"content"); /* try { // try from 0017a079 to 0017a08f has its CatchHandler @ 0017a35c */ std::operator+(asStack_148,(char *)&local_68); /* try { // try from 0017a090 to 0017a0a2 has its CatchHandler @ 0017a344 */ std::operator+(local_88,asStack_148); /* try { // try from 0017a0a3 to 0017a0b4 has its CatchHandler @ 0017a32c */ _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJSB_ETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSJ_ (local_110,local_88); /* try { // try from 0017a0b5 to 0017a0c4 has its CatchHandler @ 0017a306 */ nlohmann::json_abi_v3_11_3::detail:: json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::json_ref(local_b0,local_128,2); /* try { // try from 0017a0c5 to 0017a0e3 has its CatchHandler @ 0017a2e1 */ nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_98,local_c8,2,1,2); /* try { // try from 0017a0e4 to 0017a0ed has its CatchHandler @ 0017a2cf */ pbVar4 = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[]((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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,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> ::operator=(pbVar4,local_98); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_98); lVar2 = 0x18; do { nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_c8 + lVar2); lVar2 = lVar2 + -0x18; } while (lVar2 != -0x18); lVar2 = 0x18; do { nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_128 + lVar2); lVar2 = lVar2 + -0x18; } while (lVar2 != -0x18); std::__cxx11::string::~string(local_88); std::__cxx11::string::~string(asStack_148); lVar2 = 0x18; do { nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_f8 + lVar2); lVar2 = lVar2 + -0x18; } while (lVar2 != -0x18); std::__cxx11::string::~string((string *)&local_68); return this; } } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::begin(); local_48 = local_68; local_40 = local_60; uStack_3c = uStack_5c; uStack_38 = uStack_58; uStack_34 = uStack_54; local_30 = local_50; /* try { // try from 0017a1bb to 0017a1cb has its CatchHandler @ 0017a49f */ _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA5_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_ (local_f8,&DAT_001b50ff); /* try { // try from 0017a1d1 to 0017a1dc has its CatchHandler @ 0017a490 */ _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA7_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_ (local_e0,"system"); /* try { // try from 0017a1dd to 0017a1f4 has its CatchHandler @ 0017a445 */ nlohmann::json_abi_v3_11_3::detail:: json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::json_ref(local_c8,local_f8,2); /* try { // try from 0017a1fd to 0017a20d has its CatchHandler @ 0017a443 */ _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA8_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_ (local_128,"content"); /* try { // try from 0017a213 to 0017a21a has its CatchHandler @ 0017a434 */ _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRKSB_ETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSL_ (local_110,param_2); /* try { // try from 0017a21b to 0017a22a has its CatchHandler @ 0017a411 */ nlohmann::json_abi_v3_11_3::detail:: json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::json_ref(local_b0,local_128,2); /* try { // try from 0017a22b to 0017a244 has its CatchHandler @ 0017a3ec */ nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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(asStack_148,local_c8,2,1,2); /* try { // try from 0017a245 to 0017a25f has its CatchHandler @ 0017a3df */ nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::insert((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)local_88,this,&local_48,asStack_148); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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> *)asStack_148); lVar2 = 0x18; do { nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_c8 + lVar2); lVar2 = lVar2 + -0x18; } while (lVar2 != -0x18); lVar2 = 0x18; do { nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_128 + lVar2); lVar2 = lVar2 + -0x18; } while (lVar2 != -0x18); lVar2 = 0x18; do { nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_f8 + lVar2); lVar2 = lVar2 + -0x18; } while (lVar2 != -0x18); return this; }
55,201
reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger, reaction::FieldStrategy, reaction::FieldIdentity<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::DataWeakRef(std::shared_ptr<reaction::DataSource<reaction::AlwaysTrigger, reaction::FieldStrategy, reaction::FieldIdentity<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>)
reaction/include/reaction/dataSource.h
DataWeakRef(std::shared_ptr<DataType> ptr) : m_weakPtr(ptr) { if (auto p = m_weakPtr.lock()) p->addWeakRef(); }
O3
c
reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger, reaction::FieldStrategy, reaction::FieldIdentity<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::DataWeakRef(std::shared_ptr<reaction::DataSource<reaction::AlwaysTrigger, reaction::FieldStrategy, reaction::FieldIdentity<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>): movq %rdi, %rcx movq (%rsi), %rax movq %rax, (%rdi) movq 0x8(%rsi), %rdi movq %rdi, 0x8(%rcx) testq %rdi, %rdi je 0x54a2 movq 0xeb6b(%rip), %rax # 0x13fc0 cmpb $0x0, (%rax) je 0x545f incl 0xc(%rdi) jmp 0x546c lock incl 0xc(%rdi) movq 0x8(%rcx), %rdi testq %rdi, %rdi je 0x54a2 movl 0x8(%rdi), %eax testl %eax, %eax je 0x54a2 leal 0x1(%rax), %edx lock cmpxchgl %edx, 0x8(%rdi) jne 0x546f movl 0x8(%rdi), %eax testl %eax, %eax setne %dl movq (%rcx), %rax testq %rax, %rax setne %cl andb %dl, %cl cmpb $0x1, %cl jne 0x4f16 lock incl 0x38(%rax) jmp 0x4f16 retq nop
_ZN8reaction11DataWeakRefINS_10DataSourceINS_13AlwaysTriggerENS_13FieldStrategyENS_13FieldIdentityIiEEJEEEEC2ESt10shared_ptrIS6_E: mov rcx, rdi mov rax, [rsi] mov [rdi], rax mov rdi, [rsi+8] mov [rcx+8], rdi test rdi, rdi jz short locret_54A2 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_545F inc dword ptr [rdi+0Ch] jmp short loc_546C loc_545F: lock inc dword ptr [rdi+0Ch] mov rdi, [rcx+8] test rdi, rdi jz short locret_54A2 loc_546C: mov eax, [rdi+8] loc_546F: test eax, eax jz short locret_54A2 lea edx, [rax+1] lock cmpxchg [rdi+8], edx jnz short loc_546F mov eax, [rdi+8] test eax, eax setnz dl mov rax, [rcx] test rax, rax setnz cl and cl, dl cmp cl, 1 jnz _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) lock inc dword ptr [rax+38h] jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) locret_54A2: retn
long long reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::FieldStrategy,reaction::FieldIdentity<int>>>::DataWeakRef( long long *a1, long long *a2) { long long result; // rax volatile signed __int32 *v4; // rdi int v5; // ett result = *a2; *a1 = *a2; v4 = (volatile signed __int32 *)a2[1]; a1[1] = (long long)v4; if ( v4 ) { result = (long long)&_libc_single_threaded; if ( _libc_single_threaded ) { ++*((_DWORD *)v4 + 3); } else { _InterlockedIncrement(v4 + 3); v4 = (volatile signed __int32 *)a1[1]; if ( !v4 ) return result; } result = *((unsigned int *)v4 + 2); while ( (_DWORD)result ) { v5 = result; result = (unsigned int)_InterlockedCompareExchange(v4 + 2, result + 1, result); if ( v5 == (_DWORD)result ) { if ( *((_DWORD *)v4 + 2) != 0 && *a1 != 0 ) _InterlockedIncrement((volatile signed __int32 *)(*a1 + 56)); return std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v4); } } } return result; }
DataWeakRef: MOV RCX,RDI MOV RAX,qword ptr [RSI] MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RSI + 0x8] MOV qword ptr [RCX + 0x8],RDI TEST RDI,RDI JZ 0x001054a2 MOV RAX,qword ptr [0x00113fc0] CMP byte ptr [RAX],0x0 JZ 0x0010545f INC dword ptr [RDI + 0xc] JMP 0x0010546c LAB_0010545f: INC.LOCK dword ptr [RDI + 0xc] MOV RDI,qword ptr [RCX + 0x8] TEST RDI,RDI JZ 0x001054a2 LAB_0010546c: MOV EAX,dword ptr [RDI + 0x8] LAB_0010546f: TEST EAX,EAX JZ 0x001054a2 LEA EDX,[RAX + 0x1] CMPXCHG.LOCK dword ptr [RDI + 0x8],EDX JNZ 0x0010546f MOV EAX,dword ptr [RDI + 0x8] TEST EAX,EAX SETNZ DL MOV RAX,qword ptr [RCX] TEST RAX,RAX SETNZ CL AND CL,DL CMP CL,0x1 JNZ 0x00104f16 INC.LOCK dword ptr [RAX + 0x38] JMP 0x00104f16 LAB_001054a2: RET
/* reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger, reaction::FieldStrategy, reaction::FieldIdentity<int>> >::DataWeakRef(std::shared_ptr<reaction::DataSource<reaction::AlwaysTrigger, reaction::FieldStrategy, reaction::FieldIdentity<int>> >) */ void __thiscall reaction:: DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::FieldStrategy,reaction::FieldIdentity<int>>> ::DataWeakRef(DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::FieldStrategy,reaction::FieldIdentity<int>>> *this,int8 *param_2) { _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1; int *piVar2; int iVar3; int *puVar4; int iVar5; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *this_00; bool bVar6; *(int8 *)this = *param_2; this_00 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_2[1]; *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 8) = this_00; if (this_00 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_00113fc0 == '\0') { LOCK(); *(int *)(this_00 + 0xc) = *(int *)(this_00 + 0xc) + 1; UNLOCK(); this_00 = *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 8); if (this_00 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { return; } } else { *(int *)(this_00 + 0xc) = *(int *)(this_00 + 0xc) + 1; } iVar5 = *(int *)(this_00 + 8); while (iVar5 != 0) { LOCK(); iVar3 = *(int *)(this_00 + 8); bVar6 = iVar5 == iVar3; if (bVar6) { *(int *)(this_00 + 8) = iVar5 + 1; iVar3 = iVar5; } iVar5 = iVar3; puVar4 = PTR___libc_single_threaded_00113fc0; UNLOCK(); if (bVar6) { if (*(long *)this != 0 && *(int *)(this_00 + 8) != 0) { LOCK(); piVar2 = (int *)(*(long *)this + 0x38); *piVar2 = *piVar2 + 1; UNLOCK(); std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(this_00); return; } if (*PTR___libc_single_threaded_00113fc0 == '\0') { LOCK(); p_Var1 = this_00 + 8; iVar5 = *(int *)p_Var1; *(int *)p_Var1 = *(int *)p_Var1 + -1; UNLOCK(); } else { iVar5 = *(int *)(this_00 + 8); *(int *)(this_00 + 8) = iVar5 + -1; } if (iVar5 == 1) { (**(code **)(*(long *)this_00 + 0x10))(this_00); if (*puVar4 == '\0') { LOCK(); p_Var1 = this_00 + 0xc; iVar5 = *(int *)p_Var1; *(int *)p_Var1 = *(int *)p_Var1 + -1; UNLOCK(); } else { iVar5 = *(int *)(this_00 + 0xc); *(int *)(this_00 + 0xc) = iVar5 + -1; } if (iVar5 == 1) { /* WARNING: Could not recover jumptable at 0x00104f7a. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(*(long *)this_00 + 0x18))(this_00); return; } } return; } } } return; }
55,202
pick_seeds
eloqsql/storage/maria/ma_rt_split.c
static void pick_seeds(SplitStruct *node, int n_entries, SplitStruct **seed_a, SplitStruct **seed_b, int n_dim) { SplitStruct *cur1; SplitStruct *lim1= node + (n_entries - 1); SplitStruct *cur2; SplitStruct *lim2= node + n_entries; double max_d= -DBL_MAX; double d; for (cur1= node; cur1 < lim1; cur1++) { for (cur2=cur1 + 1; cur2 < lim2; cur2++) { d= mbr_join_square(cur1->coords, cur2->coords, n_dim) - cur1->square - cur2->square; if (d > max_d) { max_d= d; *seed_a= cur1; *seed_b= cur2; } } } }
O0
c
pick_seeds: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movq -0x8(%rbp), %rax movl -0xc(%rbp), %ecx subl $0x1, %ecx movslq %ecx, %rcx shlq $0x5, %rcx addq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x8(%rbp), %rax movslq -0xc(%rbp), %rcx shlq $0x5, %rcx addq %rcx, %rax movq %rax, -0x48(%rbp) movsd 0xbd05a(%rip), %xmm0 # 0x158c88 movsd %xmm0, -0x50(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0x9bcdb movq -0x30(%rbp), %rax addq $0x20, %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax cmpq -0x48(%rbp), %rax jae 0x9bcc8 movq -0x30(%rbp), %rax movq 0x18(%rax), %rdi movq -0x40(%rbp), %rax movq 0x18(%rax), %rsi movl -0x24(%rbp), %edx callq 0x9bf50 movq -0x30(%rbp), %rax subsd (%rax), %xmm0 movq -0x40(%rbp), %rax subsd (%rax), %xmm0 movsd %xmm0, -0x58(%rbp) movsd -0x58(%rbp), %xmm0 ucomisd -0x50(%rbp), %xmm0 jbe 0x9bcb8 movsd -0x58(%rbp), %xmm0 movsd %xmm0, -0x50(%rbp) movq -0x30(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movq -0x40(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) jmp 0x9bcba movq -0x40(%rbp), %rax addq $0x20, %rax movq %rax, -0x40(%rbp) jmp 0x9bc55 jmp 0x9bcca movq -0x30(%rbp), %rax addq $0x20, %rax movq %rax, -0x30(%rbp) jmp 0x9bc3b addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
pick_seeds: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_24], r8d mov rax, [rbp+var_8] mov ecx, [rbp+var_C] sub ecx, 1 movsxd rcx, ecx shl rcx, 5 add rax, rcx mov [rbp+var_38], rax mov rax, [rbp+var_8] movsxd rcx, [rbp+var_C] shl rcx, 5 add rax, rcx mov [rbp+var_48], rax movsd xmm0, cs:qword_158C88 movsd [rbp+var_50], xmm0 mov rax, [rbp+var_8] mov [rbp+var_30], rax loc_9BC3B: mov rax, [rbp+var_30] cmp rax, [rbp+var_38] jnb loc_9BCDB mov rax, [rbp+var_30] add rax, 20h ; ' ' mov [rbp+var_40], rax loc_9BC55: mov rax, [rbp+var_40] cmp rax, [rbp+var_48] jnb short loc_9BCC8 mov rax, [rbp+var_30] mov rdi, [rax+18h] mov rax, [rbp+var_40] mov rsi, [rax+18h] mov edx, [rbp+var_24] call mbr_join_square mov rax, [rbp+var_30] subsd xmm0, qword ptr [rax] mov rax, [rbp+var_40] subsd xmm0, qword ptr [rax] movsd [rbp+var_58], xmm0 movsd xmm0, [rbp+var_58] ucomisd xmm0, [rbp+var_50] jbe short loc_9BCB8 movsd xmm0, [rbp+var_58] movsd [rbp+var_50], xmm0 mov rcx, [rbp+var_30] mov rax, [rbp+var_18] mov [rax], rcx mov rcx, [rbp+var_40] mov rax, [rbp+var_20] mov [rax], rcx loc_9BCB8: jmp short $+2 loc_9BCBA: mov rax, [rbp+var_40] add rax, 20h ; ' ' mov [rbp+var_40], rax jmp short loc_9BC55 loc_9BCC8: jmp short $+2 loc_9BCCA: mov rax, [rbp+var_30] add rax, 20h ; ' ' mov [rbp+var_30], rax jmp loc_9BC3B loc_9BCDB: add rsp, 60h pop rbp retn
unsigned long long pick_seeds( unsigned long long a1, int a2, unsigned long long *a3, unsigned long long *a4, unsigned int a5) { unsigned long long result; // rax double v6; // [rsp+8h] [rbp-58h] double v7; // [rsp+10h] [rbp-50h] unsigned long long j; // [rsp+20h] [rbp-40h] unsigned long long i; // [rsp+30h] [rbp-30h] v7 = -1.797693134862316e308; for ( i = a1; ; i += 32LL ) { result = i; if ( i >= 32LL * (a2 - 1) + a1 ) break; for ( j = i + 32; j < 32LL * a2 + a1; j += 32LL ) { v6 = mbr_join_square(*(_QWORD *)(i + 24), *(_QWORD *)(j + 24), a5) - *(double *)i - *(double *)j; if ( v6 > v7 ) { v7 = v6; *a3 = i; *a4 = j; } } } return result; }
pick_seeds: PUSH RBP MOV RBP,RSP SUB RSP,0x60 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],R8D MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0xc] SUB ECX,0x1 MOVSXD RCX,ECX SHL RCX,0x5 ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0xc] SHL RCX,0x5 ADD RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOVSD XMM0,qword ptr [0x00258c88] MOVSD qword ptr [RBP + -0x50],XMM0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x30],RAX LAB_0019bc3b: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x38] JNC 0x0019bcdb MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x20 MOV qword ptr [RBP + -0x40],RAX LAB_0019bc55: MOV RAX,qword ptr [RBP + -0x40] CMP RAX,qword ptr [RBP + -0x48] JNC 0x0019bcc8 MOV RAX,qword ptr [RBP + -0x30] MOV RDI,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RAX + 0x18] MOV EDX,dword ptr [RBP + -0x24] CALL 0x0019bf50 MOV RAX,qword ptr [RBP + -0x30] SUBSD XMM0,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x40] SUBSD XMM0,qword ptr [RAX] MOVSD qword ptr [RBP + -0x58],XMM0 MOVSD XMM0,qword ptr [RBP + -0x58] UCOMISD XMM0,qword ptr [RBP + -0x50] JBE 0x0019bcb8 MOVSD XMM0,qword ptr [RBP + -0x58] MOVSD qword ptr [RBP + -0x50],XMM0 MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX LAB_0019bcb8: JMP 0x0019bcba LAB_0019bcba: MOV RAX,qword ptr [RBP + -0x40] ADD RAX,0x20 MOV qword ptr [RBP + -0x40],RAX JMP 0x0019bc55 LAB_0019bcc8: JMP 0x0019bcca LAB_0019bcca: MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x20 MOV qword ptr [RBP + -0x30],RAX JMP 0x0019bc3b LAB_0019bcdb: ADD RSP,0x60 POP RBP RET
void pick_seeds(double *param_1,int param_2,int8 *param_3,int8 *param_4, int4 param_5) { double *pdVar1; double dVar2; double local_58; double *local_48; double *local_38; local_58 = DAT_00258c88; for (local_38 = param_1; pdVar1 = local_38, local_38 < param_1 + (long)(param_2 + -1) * 4; local_38 = local_38 + 4) { while (local_48 = pdVar1 + 4, local_48 < param_1 + (long)param_2 * 4) { dVar2 = (double)mbr_join_square(local_38[3],pdVar1[7],param_5); dVar2 = (dVar2 - *local_38) - *local_48; pdVar1 = local_48; if (local_58 < dVar2) { *param_3 = local_38; *param_4 = local_48; local_58 = dVar2; } } } return; }
55,203
deflate_stored
3fs/build_O3/src/apache-arrow-cpp/cpp/zlib_ep-prefix/src/zlib_ep/deflate.c
local block_state deflate_stored(s, flush) deflate_state *s; int flush; { /* Smallest worthy block size when not flushing or finishing. By default * this is 32K. This can be as small as 507 bytes for memLevel == 1. For * large input and output buffers, the stored block size will be larger. */ unsigned min_block = MIN(s->pending_buf_size - 5, s->w_size); /* Copy as many min_block or larger stored blocks directly to next_out as * possible. If flushing, copy the remaining available input to next_out as * stored blocks, if there is enough space. */ unsigned len, left, have, last = 0; unsigned used = s->strm->avail_in; do { /* Set len to the maximum size block that we can copy directly with the * available input data and output space. Set left to how much of that * would be copied from what's left in the window. */ len = MAX_STORED; /* maximum deflate stored block length */ have = (s->bi_valid + 42) >> 3; /* number of header bytes */ if (s->strm->avail_out < have) /* need room for header */ break; /* maximum stored block length that will fit in avail_out: */ have = s->strm->avail_out - have; left = s->strstart - s->block_start; /* bytes left in window */ if (len > (ulg)left + s->strm->avail_in) len = left + s->strm->avail_in; /* limit len to the input */ if (len > have) len = have; /* limit len to the output */ /* If the stored block would be less than min_block in length, or if * unable to copy all of the available input when flushing, then try * copying to the window and the pending buffer instead. Also don't * write an empty block when flushing -- deflate() does that. */ if (len < min_block && ((len == 0 && flush != Z_FINISH) || flush == Z_NO_FLUSH || len != left + s->strm->avail_in)) break; /* Make a dummy stored block in pending to get the header bytes, * including any pending bits. This also updates the debugging counts. */ last = flush == Z_FINISH && len == left + s->strm->avail_in ? 1 : 0; _tr_stored_block(s, (char *)0, 0L, last); /* Replace the lengths in the dummy stored block with len. */ s->pending_buf[s->pending - 4] = len; s->pending_buf[s->pending - 3] = len >> 8; s->pending_buf[s->pending - 2] = ~len; s->pending_buf[s->pending - 1] = ~len >> 8; /* Write the stored block header bytes. */ flush_pending(s->strm); #ifdef ZLIB_DEBUG /* Update debugging counts for the data about to be copied. */ s->compressed_len += len << 3; s->bits_sent += len << 3; #endif /* Copy uncompressed bytes from the window to next_out. */ if (left) { if (left > len) left = len; zmemcpy(s->strm->next_out, s->window + s->block_start, left); s->strm->next_out += left; s->strm->avail_out -= left; s->strm->total_out += left; s->block_start += left; len -= left; } /* Copy uncompressed bytes directly from next_in to next_out, updating * the check value. */ if (len) { read_buf(s->strm, s->strm->next_out, len); s->strm->next_out += len; s->strm->avail_out -= len; s->strm->total_out += len; } } while (last == 0); /* Update the sliding window with the last s->w_size bytes of the copied * data, or append all of the copied data to the existing window if less * than s->w_size bytes were copied. Also update the number of bytes to * insert in the hash tables, in the event that deflateParams() switches to * a non-zero compression level. */ used -= s->strm->avail_in; /* number of input bytes directly copied */ if (used) { /* If any input was used, then no unused input remains in the window, * therefore s->block_start == s->strstart. */ if (used >= s->w_size) { /* supplant the previous history */ s->matches = 2; /* clear hash */ zmemcpy(s->window, s->strm->next_in - s->w_size, s->w_size); s->strstart = s->w_size; s->insert = s->strstart; } else { if (s->window_size - s->strstart <= used) { /* Slide the window down. */ s->strstart -= s->w_size; zmemcpy(s->window, s->window + s->w_size, s->strstart); if (s->matches < 2) s->matches++; /* add a pending slide_hash() */ if (s->insert > s->strstart) s->insert = s->strstart; } zmemcpy(s->window + s->strstart, s->strm->next_in - used, used); s->strstart += used; s->insert += MIN(used, s->w_size - s->insert); } s->block_start = s->strstart; } if (s->high_water < s->strstart) s->high_water = s->strstart; /* If the last block was written to next_out, then done. */ if (last) return finish_done; /* If flushing and all input has been consumed, then done. */ if (flush != Z_NO_FLUSH && flush != Z_FINISH && s->strm->avail_in == 0 && (long)s->strstart == s->block_start) return block_done; /* Fill the window with any remaining input. */ have = s->window_size - s->strstart; if (s->strm->avail_in > have && s->block_start >= (long)s->w_size) { /* Slide the window down. */ s->block_start -= s->w_size; s->strstart -= s->w_size; zmemcpy(s->window, s->window + s->w_size, s->strstart); if (s->matches < 2) s->matches++; /* add a pending slide_hash() */ have += s->w_size; /* more space now */ if (s->insert > s->strstart) s->insert = s->strstart; } if (have > s->strm->avail_in) have = s->strm->avail_in; if (have) { read_buf(s->strm, s->window + s->strstart, have); s->strstart += have; s->insert += MIN(have, s->w_size - s->insert); } if (s->high_water < s->strstart) s->high_water = s->strstart; /* There was not enough avail_out to write a complete worthy or flushed * stored block to next_out. Write a stored block to pending instead, if we * have enough input for a worthy block, or if flushing and there is enough * room for the remaining input as a stored block in the pending buffer. */ have = (s->bi_valid + 42) >> 3; /* number of header bytes */ /* maximum stored block length that will fit in pending: */ have = MIN(s->pending_buf_size - have, MAX_STORED); min_block = MIN(have, s->w_size); left = s->strstart - s->block_start; if (left >= min_block || ((left || flush == Z_FINISH) && flush != Z_NO_FLUSH && s->strm->avail_in == 0 && left <= have)) { len = MIN(left, have); last = flush == Z_FINISH && s->strm->avail_in == 0 && len == left ? 1 : 0; _tr_stored_block(s, (charf *)s->window + s->block_start, len, last); s->block_start += len; flush_pending(s->strm); } /* We've done all we can with the available input and output. */ return last ? finish_started : need_more; }
O3
c
deflate_stored: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %r14 movq 0x18(%rdi), %rcx addq $-0x5, %rcx movl 0x50(%rdi), %eax cmpq %rax, %rcx cmoval %eax, %ecx movq %rcx, 0x10(%rsp) movq (%rdi), %rax movl 0x8(%rax), %eax movl %eax, 0x8(%rsp) movl %esi, 0x4(%rsp) xorl $0x4, %esi movl %esi, 0xc(%rsp) movl 0x1734(%r14), %ecx addl $0x2a, %ecx sarl $0x3, %ecx movq (%r14), %rax movl 0x20(%rax), %edx movb $0x1, %r12b subl %ecx, %edx jb 0x594d movl 0x98(%r14), %ebp movl 0xac(%r14), %r13d movl %r13d, %r15d subl %ebp, %r15d movl 0x8(%rax), %esi leal (%rsi,%r15), %ecx addq %r15, %rsi cmpq $0xffff, %rsi # imm = 0xFFFF movl $0xffff, %ebx # imm = 0xFFFF cmovbl %ecx, %ebx cmpl %edx, %ebx cmovael %edx, %ebx cmpl 0x10(%rsp), %ebx jae 0x5885 cmpl $0x4, 0x4(%rsp) setne %dl testl %ebx, %ebx sete %sil testb %sil, %dl jne 0x594d cmpl %ecx, %ebx jne 0x594d cmpl $0x0, 0x4(%rsp) je 0x594d xorl %ebx, %ecx xorl %r12d, %r12d orl 0xc(%rsp), %ecx sete %r12b movq %r14, %rdi xorl %esi, %esi xorl %edx, %edx movl %r12d, %ecx callq 0xce6c movq 0x10(%r14), %rax movq 0x28(%r14), %rcx movb %bl, -0x4(%rax,%rcx) movq 0x10(%r14), %rax movq 0x28(%r14), %rcx movb %bh, -0x3(%rax,%rcx) movl %ebx, %eax notl %eax movq 0x10(%r14), %rcx movq 0x28(%r14), %rdx movb %al, -0x2(%rcx,%rdx) movq 0x10(%r14), %rcx movq 0x28(%r14), %rdx movb %ah, -0x1(%rcx,%rdx) movq (%r14), %rdi callq 0x5767 cmpl %ebp, %r13d je 0x591c cmpl %ebx, %r15d cmovael %ebx, %r15d movq (%r14), %rax movq 0x60(%r14), %rsi movq 0x18(%rax), %rdi addq 0x98(%r14), %rsi movq %r15, %rdx callq 0x31b0 movq (%r14), %rax addq %r15, 0x18(%rax) subl %r15d, 0x20(%rax) addq %r15, 0x28(%rax) addq %r15, 0x98(%r14) subl %r15d, %ebx testl %ebx, %ebx je 0x593e movq (%r14), %rdi movq 0x18(%rdi), %rsi movl %ebx, %edx callq 0x6f79 movq (%r14), %rax movl %ebx, %ecx addq %rcx, 0x18(%rax) subl %ebx, 0x20(%rax) addq %rcx, 0x28(%rax) testb %r12b, %r12b je 0x5805 movq (%r14), %rax xorl %r12d, %r12d movl 0x8(%rsp), %esi subl 0x8(%rax), %esi jne 0x5964 movl 0xac(%r14), %eax movl %eax, %edx jmp 0x5a47 movl 0x50(%r14), %edx cmpl %edx, %esi jae 0x5a12 movq 0x68(%r14), %rcx movl 0xac(%r14), %eax subq %rax, %rcx movl %esi, %ebp movl %esi, %ebx cmpq %rbx, %rcx ja 0x59ce subl %edx, %eax movl %eax, 0xac(%r14) movq 0x60(%r14), %rdi addq %rdi, %rdx movq %rdx, %rsi movq %rax, %rdx callq 0x31b0 movl 0x1728(%r14), %eax cmpl $0x1, %eax ja 0x59b7 incl %eax movl %eax, 0x1728(%r14) movl 0xac(%r14), %eax cmpl %eax, 0x172c(%r14) jbe 0x59ce movl %eax, 0x172c(%r14) movl %eax, %edi addq 0x60(%r14), %rdi movq (%r14), %rax movq (%rax), %rsi subq %rbx, %rsi movq %rbx, %rdx callq 0x31b0 movl 0xac(%r14), %edx addl %ebp, %edx movl %edx, 0xac(%r14) movl 0x50(%r14), %eax movl 0x172c(%r14), %ecx subl %ecx, %eax cmpl %eax, %ebp cmovbl %ebp, %eax addl %ecx, %eax movl %eax, 0x172c(%r14) jmp 0x5a3e movl $0x2, 0x1728(%r14) movq 0x60(%r14), %rdi movq (%rax), %rsi subq %rdx, %rsi callq 0x31b0 movl 0x50(%r14), %edx movl %edx, 0xac(%r14) movl %edx, 0x172c(%r14) movl %edx, %eax movq %rax, 0x98(%r14) cmpq %rax, 0x1738(%r14) jae 0x5a57 movq %rax, 0x1738(%r14) movl $0x3, %ebx testb %r12b, %r12b je 0x5bf1 testl $0xfffffffb, 0x4(%rsp) # imm = 0xFFFFFFFB je 0x5a8a movq (%r14), %rcx cmpl $0x0, 0x8(%rcx) jne 0x5a8a movl $0x1, %ebx cmpq %rax, 0x98(%r14) je 0x5bf1 movl 0x68(%r14), %ebp subl %edx, %ebp movq (%r14), %rax cmpl %ebp, 0x8(%rax) jbe 0x5af4 movq 0x98(%r14), %rax movl 0x50(%r14), %esi subq %rsi, %rax jl 0x5af4 movq %rax, 0x98(%r14) subl %esi, %edx movl %edx, 0xac(%r14) movq 0x60(%r14), %rdi addq %rdi, %rsi callq 0x31b0 movl 0x1728(%r14), %eax cmpl $0x1, %eax ja 0x5ad9 incl %eax movl %eax, 0x1728(%r14) addl 0x50(%r14), %ebp movl 0xac(%r14), %edx cmpl %edx, 0x172c(%r14) jbe 0x5af4 movl %edx, 0x172c(%r14) movq (%r14), %rdi movl 0x8(%rdi), %ebx cmpl %ebx, %ebp cmovbl %ebp, %ebx testl %ebx, %ebx je 0x5b3b movl %edx, %esi addq 0x60(%r14), %rsi movl %ebx, %edx callq 0x6f79 movl 0xac(%r14), %edx addl %ebx, %edx movl %edx, 0xac(%r14) movl 0x50(%r14), %eax movl 0x172c(%r14), %ecx subl %ecx, %eax cmpl %eax, %ebx cmovbl %ebx, %eax addl %ecx, %eax movl %eax, 0x172c(%r14) movl %edx, %edx cmpq %rdx, 0x1738(%r14) jae 0x5b4d movq %rdx, 0x1738(%r14) movl 0x1734(%r14), %ecx addl $0x2a, %ecx sarl $0x3, %ecx movq 0x18(%r14), %rax subq %rcx, %rax movl $0xffff, %ecx # imm = 0xFFFF cmpq %rcx, %rax cmovaeq %rcx, %rax movl 0x50(%r14), %edi cmpl %eax, %edi cmovael %eax, %edi movq 0x98(%r14), %rsi movl %edx, %ecx subl %esi, %ecx cmpl %edi, %ecx jae 0x5bac movl 0x4(%rsp), %r8d cmpl $0x4, %r8d sete %dil cmpl %esi, %edx setne %dl xorl %ebx, %ebx testl %r8d, %r8d je 0x5bf1 orb %dl, %dil je 0x5bf1 movq (%r14), %rdx cmpl $0x0, 0x8(%rdx) jne 0x5bf1 cmpl %eax, %ecx movl %eax, %edx cmovbl %ecx, %edx xorl %ebx, %ebx cmpl $0x4, 0x4(%rsp) jne 0x5bcc movq (%r14), %rdi cmpl $0x0, 0x8(%rdi) jne 0x5bcc xorl %ebx, %ebx cmpl %eax, %ecx setbe %bl addq 0x60(%r14), %rsi movl %edx, %r15d movq %r14, %rdi movq %r15, %rdx movl %ebx, %ecx callq 0xce6c addq %r15, 0x98(%r14) movq (%r14), %rdi callq 0x5767 addl %ebx, %ebx movl %ebx, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
deflate_stored: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14, rdi mov rcx, [rdi+18h] add rcx, 0FFFFFFFFFFFFFFFBh mov eax, [rdi+50h] cmp rcx, rax cmova ecx, eax mov [rsp+48h+var_38], rcx mov rax, [rdi] mov eax, [rax+8] mov [rsp+48h+var_40], eax mov [rsp+48h+var_44], esi xor esi, 4 mov [rsp+48h+var_3C], esi loc_5805: mov ecx, [r14+1734h] add ecx, 2Ah ; '*' sar ecx, 3 mov rax, [r14] mov edx, [rax+20h] mov r12b, 1 sub edx, ecx jb loc_594D mov ebp, [r14+98h] mov r13d, [r14+0ACh] mov r15d, r13d sub r15d, ebp mov esi, [rax+8] lea ecx, [rsi+r15] add rsi, r15 cmp rsi, 0FFFFh mov ebx, 0FFFFh cmovb ebx, ecx cmp ebx, edx cmovnb ebx, edx cmp ebx, dword ptr [rsp+48h+var_38] jnb short loc_5885 cmp [rsp+48h+var_44], 4 setnz dl test ebx, ebx setz sil test dl, sil jnz loc_594D cmp ebx, ecx jnz loc_594D cmp [rsp+48h+var_44], 0 jz loc_594D loc_5885: xor ecx, ebx xor r12d, r12d or ecx, [rsp+48h+var_3C] setz r12b mov rdi, r14 xor esi, esi xor edx, edx mov ecx, r12d call _tr_stored_block mov rax, [r14+10h] mov rcx, [r14+28h] mov [rax+rcx-4], bl mov rax, [r14+10h] mov rcx, [r14+28h] mov [rax+rcx-3], bh mov eax, ebx not eax mov rcx, [r14+10h] mov rdx, [r14+28h] mov [rcx+rdx-2], al mov rcx, [r14+10h] mov rdx, [r14+28h] mov [rcx+rdx-1], ah mov rdi, [r14] call flush_pending cmp r13d, ebp jz short loc_591C cmp r15d, ebx cmovnb r15d, ebx mov rax, [r14] mov rsi, [r14+60h] mov rdi, [rax+18h] add rsi, [r14+98h] mov rdx, r15 call _memcpy mov rax, [r14] add [rax+18h], r15 sub [rax+20h], r15d add [rax+28h], r15 add [r14+98h], r15 sub ebx, r15d loc_591C: test ebx, ebx jz short loc_593E mov rdi, [r14] mov rsi, [rdi+18h] mov edx, ebx call read_buf mov rax, [r14] mov ecx, ebx add [rax+18h], rcx sub [rax+20h], ebx add [rax+28h], rcx loc_593E: test r12b, r12b jz loc_5805 mov rax, [r14] xor r12d, r12d loc_594D: mov esi, [rsp+48h+var_40] sub esi, [rax+8] jnz short loc_5964 mov eax, [r14+0ACh] mov edx, eax jmp loc_5A47 loc_5964: mov edx, [r14+50h] cmp esi, edx jnb loc_5A12 mov rcx, [r14+68h] mov eax, [r14+0ACh] sub rcx, rax mov ebp, esi mov ebx, esi cmp rcx, rbx ja short loc_59CE sub eax, edx mov [r14+0ACh], eax mov rdi, [r14+60h] add rdx, rdi mov rsi, rdx mov rdx, rax call _memcpy mov eax, [r14+1728h] cmp eax, 1 ja short loc_59B7 inc eax mov [r14+1728h], eax loc_59B7: mov eax, [r14+0ACh] cmp [r14+172Ch], eax jbe short loc_59CE mov [r14+172Ch], eax loc_59CE: mov edi, eax add rdi, [r14+60h] mov rax, [r14] mov rsi, [rax] sub rsi, rbx mov rdx, rbx call _memcpy mov edx, [r14+0ACh] add edx, ebp mov [r14+0ACh], edx mov eax, [r14+50h] mov ecx, [r14+172Ch] sub eax, ecx cmp ebp, eax cmovb eax, ebp add eax, ecx mov [r14+172Ch], eax jmp short loc_5A3E loc_5A12: mov dword ptr [r14+1728h], 2 mov rdi, [r14+60h] mov rsi, [rax] sub rsi, rdx call _memcpy mov edx, [r14+50h] mov [r14+0ACh], edx mov [r14+172Ch], edx loc_5A3E: mov eax, edx mov [r14+98h], rax loc_5A47: cmp [r14+1738h], rax jnb short loc_5A57 mov [r14+1738h], rax loc_5A57: mov ebx, 3 test r12b, r12b jz loc_5BF1 test [rsp+48h+var_44], 0FFFFFFFBh jz short loc_5A8A mov rcx, [r14] cmp dword ptr [rcx+8], 0 jnz short loc_5A8A mov ebx, 1 cmp [r14+98h], rax jz loc_5BF1 loc_5A8A: mov ebp, [r14+68h] sub ebp, edx mov rax, [r14] cmp [rax+8], ebp jbe short loc_5AF4 mov rax, [r14+98h] mov esi, [r14+50h] sub rax, rsi jl short loc_5AF4 mov [r14+98h], rax sub edx, esi mov [r14+0ACh], edx mov rdi, [r14+60h] add rsi, rdi call _memcpy mov eax, [r14+1728h] cmp eax, 1 ja short loc_5AD9 inc eax mov [r14+1728h], eax loc_5AD9: add ebp, [r14+50h] mov edx, [r14+0ACh] cmp [r14+172Ch], edx jbe short loc_5AF4 mov [r14+172Ch], edx loc_5AF4: mov rdi, [r14] mov ebx, [rdi+8] cmp ebp, ebx cmovb ebx, ebp test ebx, ebx jz short loc_5B3B mov esi, edx add rsi, [r14+60h] mov edx, ebx call read_buf mov edx, [r14+0ACh] add edx, ebx mov [r14+0ACh], edx mov eax, [r14+50h] mov ecx, [r14+172Ch] sub eax, ecx cmp ebx, eax cmovb eax, ebx add eax, ecx mov [r14+172Ch], eax loc_5B3B: mov edx, edx cmp [r14+1738h], rdx jnb short loc_5B4D mov [r14+1738h], rdx loc_5B4D: mov ecx, [r14+1734h] add ecx, 2Ah ; '*' sar ecx, 3 mov rax, [r14+18h] sub rax, rcx mov ecx, 0FFFFh cmp rax, rcx cmovnb rax, rcx mov edi, [r14+50h] cmp edi, eax cmovnb edi, eax mov rsi, [r14+98h] mov ecx, edx sub ecx, esi cmp ecx, edi jnb short loc_5BAC mov r8d, [rsp+48h+var_44] cmp r8d, 4 setz dil cmp edx, esi setnz dl xor ebx, ebx test r8d, r8d jz short loc_5BF1 or dil, dl jz short loc_5BF1 mov rdx, [r14] cmp dword ptr [rdx+8], 0 jnz short loc_5BF1 loc_5BAC: cmp ecx, eax mov edx, eax cmovb edx, ecx xor ebx, ebx cmp [rsp+48h+var_44], 4 jnz short loc_5BCC mov rdi, [r14] cmp dword ptr [rdi+8], 0 jnz short loc_5BCC xor ebx, ebx cmp ecx, eax setbe bl loc_5BCC: add rsi, [r14+60h] mov r15d, edx mov rdi, r14 mov rdx, r15 mov ecx, ebx call _tr_stored_block add [r14+98h], r15 mov rdi, [r14] call flush_pending add ebx, ebx loc_5BF1: mov eax, ebx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long deflate_stored(_QWORD *a1, int a2) { unsigned long long v3; // rcx unsigned int v4; // ecx long long v5; // rax unsigned int v6; // edx char v7; // r12 bool v8; // cf unsigned int v9; // edx int v10; // ebp int v11; // r13d long long v12; // r15 long long v13; // rsi int v14; // ecx unsigned int v15; // ebx bool v16; // r12 long long v17; // rax long long v18; // rax unsigned int v19; // esi unsigned long long v20; // rax unsigned int v21; // edx long long v22; // rdx long long v23; // rax long long v24; // rax unsigned int v25; // eax int v26; // ecx unsigned int v27; // eax unsigned int v28; // ebx unsigned int v29; // ebp long long v30; // rax long long v31; // rsi bool v32; // cc long long v33; // rax long long v34; // rdx unsigned int v35; // eax long long v36; // rdi unsigned int v37; // ebx int v38; // ecx unsigned int v39; // eax unsigned long long v40; // rax unsigned int v41; // edi long long v42; // rsi unsigned int v43; // ecx bool v44; // dl unsigned int v45; // edx BOOL v46; // ebx long long v47; // r15 int v50; // [rsp+8h] [rbp-40h] int v51; // [rsp+Ch] [rbp-3Ch] unsigned int v52; // [rsp+10h] [rbp-38h] v3 = a1[3] - 5LL; if ( v3 > *((unsigned int *)a1 + 20) ) LODWORD(v3) = *((_DWORD *)a1 + 20); v52 = v3; v50 = *(_DWORD *)(*a1 + 8LL); v51 = a2 ^ 4; while ( 1 ) { v4 = (*((_DWORD *)a1 + 1485) + 42) >> 3; v5 = *a1; v6 = *(_DWORD *)(*a1 + 32LL); v7 = 1; v8 = v6 < v4; v9 = v6 - v4; if ( v8 ) break; v10 = *((_DWORD *)a1 + 38); v11 = *((_DWORD *)a1 + 43); v12 = (unsigned int)(v11 - v10); v13 = *(unsigned int *)(v5 + 8); v14 = v13 + v12; v15 = 0xFFFF; if ( (unsigned long long)(v12 + v13) < 0xFFFF ) v15 = v13 + v12; if ( v15 >= v9 ) v15 = v9; if ( v15 < v52 && (v15 == 0 && a2 != 4 || v15 != v14 || !a2) ) break; v16 = (v51 | v15 ^ v14) == 0; tr_stored_block(a1, 0LL, 0LL, v16); *(_WORD *)(a1[2] + a1[5] - 4LL) = v15; *(_WORD *)(a1[2] + a1[5] - 2LL) = ~(_WORD)v15; flush_pending(*a1); if ( v11 != v10 ) { if ( (unsigned int)v12 >= v15 ) v12 = v15; memcpy(*(_QWORD *)(*a1 + 24LL), a1[19] + a1[12], v12); v17 = *a1; *(_QWORD *)(v17 + 24) += v12; *(_DWORD *)(v17 + 32) -= v12; *(_QWORD *)(v17 + 40) += v12; a1[19] += v12; v15 -= v12; } if ( v15 ) { read_buf(*a1, *(_QWORD *)(*a1 + 24LL), v15); v18 = *a1; *(_QWORD *)(v18 + 24) += v15; *(_DWORD *)(v18 + 32) -= v15; *(_QWORD *)(v18 + 40) += v15; } if ( v16 ) { v5 = *a1; v7 = 0; break; } } v19 = v50 - *(_DWORD *)(v5 + 8); if ( v50 == *(_DWORD *)(v5 + 8) ) { v20 = *((unsigned int *)a1 + 43); v21 = *((_DWORD *)a1 + 43); } else { v22 = *((unsigned int *)a1 + 20); if ( v19 >= (unsigned int)v22 ) { *((_DWORD *)a1 + 1482) = 2; memcpy(a1[12], *(_QWORD *)v5 - v22, v22); v21 = *((_DWORD *)a1 + 20); *((_DWORD *)a1 + 43) = v21; *((_DWORD *)a1 + 1483) = v21; } else { v23 = *((unsigned int *)a1 + 43); if ( a1[13] - v23 <= (unsigned long long)v19 ) { v24 = (unsigned int)(v23 - v22); *((_DWORD *)a1 + 43) = v24; memcpy(a1[12], a1[12] + v22, v24); v25 = *((_DWORD *)a1 + 1482); if ( v25 <= 1 ) *((_DWORD *)a1 + 1482) = v25 + 1; LODWORD(v23) = *((_DWORD *)a1 + 43); if ( *((_DWORD *)a1 + 1483) > (unsigned int)v23 ) *((_DWORD *)a1 + 1483) = v23; } memcpy(a1[12] + (unsigned int)v23, *(_QWORD *)*a1 - v19, v19); v21 = v19 + *((_DWORD *)a1 + 43); *((_DWORD *)a1 + 43) = v21; v26 = *((_DWORD *)a1 + 1483); v27 = *((_DWORD *)a1 + 20) - v26; if ( v19 < v27 ) v27 = v19; *((_DWORD *)a1 + 1483) = v26 + v27; } v20 = v21; a1[19] = v21; } if ( a1[743] < v20 ) a1[743] = v20; v28 = 3; if ( v7 ) { if ( (a2 & 0xFFFFFFFB) == 0 || *(_DWORD *)(*a1 + 8LL) || (v28 = 1, a1[19] != v20) ) { v29 = *((_DWORD *)a1 + 26) - v21; if ( *(_DWORD *)(*a1 + 8LL) > v29 ) { v30 = a1[19]; v31 = *((unsigned int *)a1 + 20); v32 = v30 < v31; v33 = v30 - v31; if ( !v32 ) { a1[19] = v33; v34 = v21 - (unsigned int)v31; *((_DWORD *)a1 + 43) = v34; memcpy(a1[12], a1[12] + v31, v34); v35 = *((_DWORD *)a1 + 1482); if ( v35 <= 1 ) *((_DWORD *)a1 + 1482) = v35 + 1; v29 += *((_DWORD *)a1 + 20); v21 = *((_DWORD *)a1 + 43); if ( *((_DWORD *)a1 + 1483) > v21 ) *((_DWORD *)a1 + 1483) = v21; } } v36 = *a1; v37 = *(_DWORD *)(*a1 + 8LL); if ( v29 < v37 ) v37 = v29; if ( v37 ) { read_buf(v36, a1[12] + v21, v37); v21 = v37 + *((_DWORD *)a1 + 43); *((_DWORD *)a1 + 43) = v21; v38 = *((_DWORD *)a1 + 1483); v39 = *((_DWORD *)a1 + 20) - v38; if ( v37 < v39 ) v39 = v37; *((_DWORD *)a1 + 1483) = v38 + v39; } if ( a1[743] < (unsigned long long)v21 ) a1[743] = v21; v40 = a1[3] - (unsigned int)((*((_DWORD *)a1 + 1485) + 42) >> 3); if ( v40 >= 0xFFFF ) LODWORD(v40) = 0xFFFF; v41 = *((_DWORD *)a1 + 20); if ( v41 >= (unsigned int)v40 ) v41 = v40; v42 = a1[19]; v43 = v21 - v42; if ( v21 - (unsigned int)v42 >= v41 || (v44 = v21 != (_DWORD)v42, v28 = 0, a2) && (v44 || a2 == 4) && !*(_DWORD *)(*a1 + 8LL) ) { v45 = v40; if ( v43 < (unsigned int)v40 ) v45 = v43; v46 = 0; if ( a2 == 4 && !*(_DWORD *)(*a1 + 8LL) ) v46 = v43 <= (unsigned int)v40; v47 = v45; tr_stored_block(a1, a1[12] + v42, v45, v46); a1[19] += v47; flush_pending(*a1); return (unsigned int)(2 * v46); } } } return v28; }
deflate_stored: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14,RDI MOV RCX,qword ptr [RDI + 0x18] ADD RCX,-0x5 MOV EAX,dword ptr [RDI + 0x50] CMP RCX,RAX CMOVA ECX,EAX MOV qword ptr [RSP + 0x10],RCX MOV RAX,qword ptr [RDI] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RSP + 0x8],EAX MOV dword ptr [RSP + 0x4],ESI XOR ESI,0x4 MOV dword ptr [RSP + 0xc],ESI LAB_00105805: MOV ECX,dword ptr [R14 + 0x1734] ADD ECX,0x2a SAR ECX,0x3 MOV RAX,qword ptr [R14] MOV EDX,dword ptr [RAX + 0x20] MOV R12B,0x1 SUB EDX,ECX JC 0x0010594d MOV EBP,dword ptr [R14 + 0x98] MOV R13D,dword ptr [R14 + 0xac] MOV R15D,R13D SUB R15D,EBP MOV ESI,dword ptr [RAX + 0x8] LEA ECX,[RSI + R15*0x1] ADD RSI,R15 CMP RSI,0xffff MOV EBX,0xffff CMOVC EBX,ECX CMP EBX,EDX CMOVNC EBX,EDX CMP EBX,dword ptr [RSP + 0x10] JNC 0x00105885 CMP dword ptr [RSP + 0x4],0x4 SETNZ DL TEST EBX,EBX SETZ SIL TEST DL,SIL JNZ 0x0010594d CMP EBX,ECX JNZ 0x0010594d CMP dword ptr [RSP + 0x4],0x0 JZ 0x0010594d LAB_00105885: XOR ECX,EBX XOR R12D,R12D OR ECX,dword ptr [RSP + 0xc] SETZ R12B MOV RDI,R14 XOR ESI,ESI XOR EDX,EDX MOV ECX,R12D CALL 0x0010ce6c MOV RAX,qword ptr [R14 + 0x10] MOV RCX,qword ptr [R14 + 0x28] MOV byte ptr [RAX + RCX*0x1 + -0x4],BL MOV RAX,qword ptr [R14 + 0x10] MOV RCX,qword ptr [R14 + 0x28] MOV byte ptr [RAX + RCX*0x1 + -0x3],BH MOV EAX,EBX NOT EAX MOV RCX,qword ptr [R14 + 0x10] MOV RDX,qword ptr [R14 + 0x28] MOV byte ptr [RCX + RDX*0x1 + -0x2],AL MOV RCX,qword ptr [R14 + 0x10] MOV RDX,qword ptr [R14 + 0x28] MOV byte ptr [RCX + RDX*0x1 + -0x1],AH MOV RDI,qword ptr [R14] CALL 0x00105767 CMP R13D,EBP JZ 0x0010591c CMP R15D,EBX CMOVNC R15D,EBX MOV RAX,qword ptr [R14] MOV RSI,qword ptr [R14 + 0x60] MOV RDI,qword ptr [RAX + 0x18] ADD RSI,qword ptr [R14 + 0x98] MOV RDX,R15 CALL 0x001031b0 MOV RAX,qword ptr [R14] ADD qword ptr [RAX + 0x18],R15 SUB dword ptr [RAX + 0x20],R15D ADD qword ptr [RAX + 0x28],R15 ADD qword ptr [R14 + 0x98],R15 SUB EBX,R15D LAB_0010591c: TEST EBX,EBX JZ 0x0010593e MOV RDI,qword ptr [R14] MOV RSI,qword ptr [RDI + 0x18] MOV EDX,EBX CALL 0x00106f79 MOV RAX,qword ptr [R14] MOV ECX,EBX ADD qword ptr [RAX + 0x18],RCX SUB dword ptr [RAX + 0x20],EBX ADD qword ptr [RAX + 0x28],RCX LAB_0010593e: TEST R12B,R12B JZ 0x00105805 MOV RAX,qword ptr [R14] XOR R12D,R12D LAB_0010594d: MOV ESI,dword ptr [RSP + 0x8] SUB ESI,dword ptr [RAX + 0x8] JNZ 0x00105964 MOV EAX,dword ptr [R14 + 0xac] MOV EDX,EAX JMP 0x00105a47 LAB_00105964: MOV EDX,dword ptr [R14 + 0x50] CMP ESI,EDX JNC 0x00105a12 MOV RCX,qword ptr [R14 + 0x68] MOV EAX,dword ptr [R14 + 0xac] SUB RCX,RAX MOV EBP,ESI MOV EBX,ESI CMP RCX,RBX JA 0x001059ce SUB EAX,EDX MOV dword ptr [R14 + 0xac],EAX MOV RDI,qword ptr [R14 + 0x60] ADD RDX,RDI MOV RSI,RDX MOV RDX,RAX CALL 0x001031b0 MOV EAX,dword ptr [R14 + 0x1728] CMP EAX,0x1 JA 0x001059b7 INC EAX MOV dword ptr [R14 + 0x1728],EAX LAB_001059b7: MOV EAX,dword ptr [R14 + 0xac] CMP dword ptr [R14 + 0x172c],EAX JBE 0x001059ce MOV dword ptr [R14 + 0x172c],EAX LAB_001059ce: MOV EDI,EAX ADD RDI,qword ptr [R14 + 0x60] MOV RAX,qword ptr [R14] MOV RSI,qword ptr [RAX] SUB RSI,RBX MOV RDX,RBX CALL 0x001031b0 MOV EDX,dword ptr [R14 + 0xac] ADD EDX,EBP MOV dword ptr [R14 + 0xac],EDX MOV EAX,dword ptr [R14 + 0x50] MOV ECX,dword ptr [R14 + 0x172c] SUB EAX,ECX CMP EBP,EAX CMOVC EAX,EBP ADD EAX,ECX MOV dword ptr [R14 + 0x172c],EAX JMP 0x00105a3e LAB_00105a12: MOV dword ptr [R14 + 0x1728],0x2 MOV RDI,qword ptr [R14 + 0x60] MOV RSI,qword ptr [RAX] SUB RSI,RDX CALL 0x001031b0 MOV EDX,dword ptr [R14 + 0x50] MOV dword ptr [R14 + 0xac],EDX MOV dword ptr [R14 + 0x172c],EDX LAB_00105a3e: MOV EAX,EDX MOV qword ptr [R14 + 0x98],RAX LAB_00105a47: CMP qword ptr [R14 + 0x1738],RAX JNC 0x00105a57 MOV qword ptr [R14 + 0x1738],RAX LAB_00105a57: MOV EBX,0x3 TEST R12B,R12B JZ 0x00105bf1 TEST dword ptr [RSP + 0x4],0xfffffffb JZ 0x00105a8a MOV RCX,qword ptr [R14] CMP dword ptr [RCX + 0x8],0x0 JNZ 0x00105a8a MOV EBX,0x1 CMP qword ptr [R14 + 0x98],RAX JZ 0x00105bf1 LAB_00105a8a: MOV EBP,dword ptr [R14 + 0x68] SUB EBP,EDX MOV RAX,qword ptr [R14] CMP dword ptr [RAX + 0x8],EBP JBE 0x00105af4 MOV RAX,qword ptr [R14 + 0x98] MOV ESI,dword ptr [R14 + 0x50] SUB RAX,RSI JL 0x00105af4 MOV qword ptr [R14 + 0x98],RAX SUB EDX,ESI MOV dword ptr [R14 + 0xac],EDX MOV RDI,qword ptr [R14 + 0x60] ADD RSI,RDI CALL 0x001031b0 MOV EAX,dword ptr [R14 + 0x1728] CMP EAX,0x1 JA 0x00105ad9 INC EAX MOV dword ptr [R14 + 0x1728],EAX LAB_00105ad9: ADD EBP,dword ptr [R14 + 0x50] MOV EDX,dword ptr [R14 + 0xac] CMP dword ptr [R14 + 0x172c],EDX JBE 0x00105af4 MOV dword ptr [R14 + 0x172c],EDX LAB_00105af4: MOV RDI,qword ptr [R14] MOV EBX,dword ptr [RDI + 0x8] CMP EBP,EBX CMOVC EBX,EBP TEST EBX,EBX JZ 0x00105b3b MOV ESI,EDX ADD RSI,qword ptr [R14 + 0x60] MOV EDX,EBX CALL 0x00106f79 MOV EDX,dword ptr [R14 + 0xac] ADD EDX,EBX MOV dword ptr [R14 + 0xac],EDX MOV EAX,dword ptr [R14 + 0x50] MOV ECX,dword ptr [R14 + 0x172c] SUB EAX,ECX CMP EBX,EAX CMOVC EAX,EBX ADD EAX,ECX MOV dword ptr [R14 + 0x172c],EAX LAB_00105b3b: MOV EDX,EDX CMP qword ptr [R14 + 0x1738],RDX JNC 0x00105b4d MOV qword ptr [R14 + 0x1738],RDX LAB_00105b4d: MOV ECX,dword ptr [R14 + 0x1734] ADD ECX,0x2a SAR ECX,0x3 MOV RAX,qword ptr [R14 + 0x18] SUB RAX,RCX MOV ECX,0xffff CMP RAX,RCX CMOVNC RAX,RCX MOV EDI,dword ptr [R14 + 0x50] CMP EDI,EAX CMOVNC EDI,EAX MOV RSI,qword ptr [R14 + 0x98] MOV ECX,EDX SUB ECX,ESI CMP ECX,EDI JNC 0x00105bac MOV R8D,dword ptr [RSP + 0x4] CMP R8D,0x4 SETZ DIL CMP EDX,ESI SETNZ DL XOR EBX,EBX TEST R8D,R8D JZ 0x00105bf1 OR DIL,DL JZ 0x00105bf1 MOV RDX,qword ptr [R14] CMP dword ptr [RDX + 0x8],0x0 JNZ 0x00105bf1 LAB_00105bac: CMP ECX,EAX MOV EDX,EAX CMOVC EDX,ECX XOR EBX,EBX CMP dword ptr [RSP + 0x4],0x4 JNZ 0x00105bcc MOV RDI,qword ptr [R14] CMP dword ptr [RDI + 0x8],0x0 JNZ 0x00105bcc XOR EBX,EBX CMP ECX,EAX SETBE BL LAB_00105bcc: ADD RSI,qword ptr [R14 + 0x60] MOV R15D,EDX MOV RDI,R14 MOV RDX,R15 MOV ECX,EBX CALL 0x0010ce6c ADD qword ptr [R14 + 0x98],R15 MOV RDI,qword ptr [R14] CALL 0x00105767 ADD EBX,EBX LAB_00105bf1: MOV EAX,EBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
char deflate_stored(long *param_1,uint param_2) { int iVar1; int iVar2; long lVar3; long *plVar4; ulong uVar5; uint uVar6; uint uVar7; uint uVar8; bool bVar9; char cVar10; ulong __n; uint uVar11; uint uVar12; ulong uVar13; uVar11 = (uint)(param_1[3] - 5U); if ((ulong)*(uint *)(param_1 + 10) < param_1[3] - 5U) { uVar11 = *(uint *)(param_1 + 10); } iVar1 = *(int *)(*param_1 + 8); do { uVar6 = *(int *)((long)param_1 + 0x1734) + 0x2a >> 3; plVar4 = (long *)*param_1; bVar9 = true; uVar8 = *(uint *)(plVar4 + 4) - uVar6; if (*(uint *)(plVar4 + 4) < uVar6) goto LAB_0010594d; lVar3 = param_1[0x13]; iVar2 = *(int *)((long)param_1 + 0xac); uVar12 = iVar2 - (int)lVar3; uVar7 = *(uint *)(plVar4 + 1) + uVar12; uVar6 = 0xffff; if ((ulong)*(uint *)(plVar4 + 1) + (ulong)uVar12 < 0xffff) { uVar6 = uVar7; } if (uVar8 <= uVar6) { uVar6 = uVar8; } if ((uVar6 < uVar11) && (((param_2 != 4 && uVar6 == 0 || (uVar6 != uVar7)) || (param_2 == 0)))) goto LAB_0010594d; bVar9 = uVar7 == uVar6; _tr_stored_block(param_1,0,0,bVar9 && param_2 == 4); *(char *)(param_1[2] + -4 + param_1[5]) = (char)uVar6; *(char *)(param_1[2] + -3 + param_1[5]) = (char)(uVar6 >> 8); *(char *)(param_1[2] + -2 + param_1[5]) = (char)~uVar6; *(char *)(param_1[2] + -1 + param_1[5]) = (char)(~uVar6 >> 8); flush_pending(*param_1); if (iVar2 != (int)lVar3) { if (uVar6 <= uVar12) { uVar12 = uVar6; } uVar13 = (ulong)uVar12; memcpy(*(void **)(*param_1 + 0x18),(void *)(param_1[0xc] + param_1[0x13]),uVar13); lVar3 = *param_1; *(long *)(lVar3 + 0x18) = *(long *)(lVar3 + 0x18) + uVar13; *(int *)(lVar3 + 0x20) = *(int *)(lVar3 + 0x20) - uVar12; *(long *)(lVar3 + 0x28) = *(long *)(lVar3 + 0x28) + uVar13; param_1[0x13] = param_1[0x13] + uVar13; uVar6 = uVar6 - uVar12; } if (uVar6 != 0) { read_buf(*param_1,*(int8 *)(*param_1 + 0x18),uVar6); lVar3 = *param_1; *(long *)(lVar3 + 0x18) = *(long *)(lVar3 + 0x18) + (ulong)uVar6; *(int *)(lVar3 + 0x20) = *(int *)(lVar3 + 0x20) - uVar6; *(long *)(lVar3 + 0x28) = *(long *)(lVar3 + 0x28) + (ulong)uVar6; } } while (!bVar9 || param_2 != 4); plVar4 = (long *)*param_1; bVar9 = false; LAB_0010594d: uVar11 = iVar1 - (int)plVar4[1]; if (uVar11 == 0) { uVar6 = *(uint *)((long)param_1 + 0xac); uVar13 = (ulong)uVar6; } else { uVar6 = *(uint *)(param_1 + 10); uVar13 = (ulong)uVar6; if (uVar11 < uVar6) { uVar5 = (ulong)*(uint *)((long)param_1 + 0xac); __n = (ulong)uVar11; if (param_1[0xd] - uVar5 <= __n) { uVar6 = *(uint *)((long)param_1 + 0xac) - uVar6; *(uint *)((long)param_1 + 0xac) = uVar6; memcpy((void *)param_1[0xc],(void *)(uVar13 + param_1[0xc]),(ulong)uVar6); if (*(uint *)(param_1 + 0x2e5) < 2) { *(uint *)(param_1 + 0x2e5) = *(uint *)(param_1 + 0x2e5) + 1; } uVar6 = *(uint *)((long)param_1 + 0xac); uVar5 = (ulong)uVar6; if (uVar6 < *(uint *)((long)param_1 + 0x172c)) { *(uint *)((long)param_1 + 0x172c) = uVar6; } } memcpy((void *)(uVar5 + param_1[0xc]),(void *)(*(long *)*param_1 - __n),__n); uVar6 = *(int *)((long)param_1 + 0xac) + uVar11; *(uint *)((long)param_1 + 0xac) = uVar6; uVar8 = (int)param_1[10] - *(int *)((long)param_1 + 0x172c); if (uVar11 < uVar8) { uVar8 = uVar11; } *(uint *)((long)param_1 + 0x172c) = uVar8 + *(int *)((long)param_1 + 0x172c); } else { *(int4 *)(param_1 + 0x2e5) = 2; memcpy((void *)param_1[0xc],(void *)(*plVar4 - uVar13),uVar13); uVar6 = *(uint *)(param_1 + 10); *(uint *)((long)param_1 + 0xac) = uVar6; *(uint *)((long)param_1 + 0x172c) = uVar6; } uVar13 = (ulong)uVar6; param_1[0x13] = uVar13; } if ((ulong)param_1[0x2e7] < uVar13) { param_1[0x2e7] = uVar13; } cVar10 = '\x03'; if ((bVar9) && ((((param_2 & 0xfffffffb) == 0 || (*(int *)(*param_1 + 8) != 0)) || (cVar10 = '\x01', param_1[0x13] != uVar13)))) { uVar11 = (int)param_1[0xd] - uVar6; if (uVar11 < *(uint *)(*param_1 + 8)) { uVar13 = (ulong)*(uint *)(param_1 + 10); if ((long)uVar13 <= param_1[0x13]) { param_1[0x13] = param_1[0x13] - uVar13; uVar6 = uVar6 - *(uint *)(param_1 + 10); *(uint *)((long)param_1 + 0xac) = uVar6; memcpy((void *)param_1[0xc],(void *)(uVar13 + param_1[0xc]),(ulong)uVar6); if (*(uint *)(param_1 + 0x2e5) < 2) { *(uint *)(param_1 + 0x2e5) = *(uint *)(param_1 + 0x2e5) + 1; } uVar11 = uVar11 + (int)param_1[10]; uVar6 = *(uint *)((long)param_1 + 0xac); if (uVar6 < *(uint *)((long)param_1 + 0x172c)) { *(uint *)((long)param_1 + 0x172c) = uVar6; } } } uVar8 = *(uint *)(*param_1 + 8); if (uVar11 < uVar8) { uVar8 = uVar11; } if (uVar8 != 0) { read_buf(*param_1,(ulong)uVar6 + param_1[0xc],uVar8); uVar6 = *(int *)((long)param_1 + 0xac) + uVar8; *(uint *)((long)param_1 + 0xac) = uVar6; uVar11 = (int)param_1[10] - *(int *)((long)param_1 + 0x172c); if (uVar8 < uVar11) { uVar11 = uVar8; } *(uint *)((long)param_1 + 0x172c) = uVar11 + *(int *)((long)param_1 + 0x172c); } if ((ulong)param_1[0x2e7] < (ulong)uVar6) { param_1[0x2e7] = (ulong)uVar6; } uVar13 = param_1[3] - (ulong)(uint)(*(int *)((long)param_1 + 0x1734) + 0x2a >> 3); if (0xfffe < uVar13) { uVar13 = 0xffff; } uVar8 = (uint)uVar13; uVar11 = *(uint *)(param_1 + 10); if (uVar8 <= *(uint *)(param_1 + 10)) { uVar11 = uVar8; } uVar7 = (uint)param_1[0x13]; uVar12 = uVar6 - uVar7; if (uVar12 < uVar11) { if (param_2 == 0) { return '\0'; } if (param_2 != 4 && uVar6 == uVar7) { return '\0'; } if (*(int *)(*param_1 + 8) != 0) { return '\0'; } } uVar11 = uVar8; if (uVar12 < uVar8) { uVar11 = uVar12; } bVar9 = false; if ((param_2 == 4) && (*(int *)(*param_1 + 8) == 0)) { bVar9 = uVar12 <= uVar8; } _tr_stored_block(param_1,param_1[0x13] + param_1[0xc],(ulong)uVar11,bVar9); param_1[0x13] = param_1[0x13] + (ulong)uVar11; flush_pending(*param_1); cVar10 = bVar9 * '\x02'; } return cVar10; }
55,204
my_message_stderr
eloqsql/mysys/my_mess.c
void my_message_stderr(uint error __attribute__((unused)), const char *str, myf MyFlags) { DBUG_ENTER("my_message_stderr"); DBUG_PRINT("enter",("message: %s",str)); (void) fflush(stdout); if (MyFlags & (ME_NOTE | ME_ERROR_LOG_ONLY)) DBUG_VOID_RETURN; if (MyFlags & ME_BELL) (void) fputc('\007', stderr); if (my_progname) { (void)fputs(my_progname,stderr); (void)fputs(": ",stderr); } (void)fputs(str,stderr); (void)fputc('\n',stderr); (void)fflush(stderr); DBUG_VOID_RETURN; }
O0
c
my_message_stderr: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) jmp 0x26975 movq 0x1a8644(%rip), %rax # 0x1cefc0 movq (%rax), %rdi callq 0x24320 movq -0x18(%rbp), %rax andq $0x480, %rax # imm = 0x480 cmpq $0x0, %rax je 0x2699b jmp 0x26996 jmp 0x26a31 movq -0x18(%rbp), %rax andq $0x4, %rax cmpq $0x0, %rax je 0x269bd movq 0x1a8630(%rip), %rax # 0x1cefe0 movq (%rax), %rsi movl $0x7, %edi callq 0x24390 leaq 0x36001c(%rip), %rax # 0x3869e0 cmpq $0x0, (%rax) je 0x269f9 leaq 0x36000f(%rip), %rax # 0x3869e0 movq (%rax), %rdi movq 0x1a8605(%rip), %rax # 0x1cefe0 movq (%rax), %rsi callq 0x242f0 movq 0x1a85f6(%rip), %rax # 0x1cefe0 movq (%rax), %rsi leaq 0x53c64(%rip), %rdi # 0x7a658 callq 0x242f0 movq -0x10(%rbp), %rdi movq 0x1a85dc(%rip), %rax # 0x1cefe0 movq (%rax), %rsi callq 0x242f0 movq 0x1a85cd(%rip), %rax # 0x1cefe0 movq (%rax), %rsi movl $0xa, %edi callq 0x24390 movq 0x1a85b9(%rip), %rax # 0x1cefe0 movq (%rax), %rdi callq 0x24320 jmp 0x26a31 addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
my_message_stderr: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx jmp short $+2 loc_26975: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov rax, [rbp+var_18] and rax, 480h cmp rax, 0 jz short loc_2699B jmp short $+2 loc_26996: jmp loc_26A31 loc_2699B: mov rax, [rbp+var_18] and rax, 4 cmp rax, 0 jz short loc_269BD mov rax, cs:stderr_ptr mov rsi, [rax] mov edi, 7 call _fputc loc_269BD: lea rax, my_progname cmp qword ptr [rax], 0 jz short loc_269F9 lea rax, my_progname mov rdi, [rax] mov rax, cs:stderr_ptr mov rsi, [rax] call _fputs mov rax, cs:stderr_ptr mov rsi, [rax] lea rdi, asc_7A658; ": " call _fputs loc_269F9: mov rdi, [rbp+var_10] mov rax, cs:stderr_ptr mov rsi, [rax] call _fputs mov rax, cs:stderr_ptr mov rsi, [rax] mov edi, 0Ah call _fputc mov rax, cs:stderr_ptr mov rdi, [rax] call _fflush jmp short $+2 loc_26A31: add rsp, 20h pop rbp retn
long long my_message_stderr(long long a1, long long a2, __int16 a3) { long long result; // rax fflush(stdout); result = a3 & 0x480; if ( (a3 & 0x480) == 0 ) { if ( (a3 & 4) != 0 ) fputc(7LL, stderr); if ( my_progname ) { fputs(my_progname, stderr); fputs(": ", stderr); } fputs(a2, stderr); fputc(10LL, stderr); return fflush(stderr); } return result; }
my_message_stderr: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX JMP 0x00126975 LAB_00126975: MOV RAX,qword ptr [0x002cefc0] MOV RDI,qword ptr [RAX] CALL 0x00124320 MOV RAX,qword ptr [RBP + -0x18] AND RAX,0x480 CMP RAX,0x0 JZ 0x0012699b JMP 0x00126996 LAB_00126996: JMP 0x00126a31 LAB_0012699b: MOV RAX,qword ptr [RBP + -0x18] AND RAX,0x4 CMP RAX,0x0 JZ 0x001269bd MOV RAX,qword ptr [0x002cefe0] MOV RSI,qword ptr [RAX] MOV EDI,0x7 CALL 0x00124390 LAB_001269bd: LEA RAX,[0x4869e0] CMP qword ptr [RAX],0x0 JZ 0x001269f9 LEA RAX,[0x4869e0] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [0x002cefe0] MOV RSI,qword ptr [RAX] CALL 0x001242f0 MOV RAX,qword ptr [0x002cefe0] MOV RSI,qword ptr [RAX] LEA RDI,[0x17a658] CALL 0x001242f0 LAB_001269f9: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [0x002cefe0] MOV RSI,qword ptr [RAX] CALL 0x001242f0 MOV RAX,qword ptr [0x002cefe0] MOV RSI,qword ptr [RAX] MOV EDI,0xa CALL 0x00124390 MOV RAX,qword ptr [0x002cefe0] MOV RDI,qword ptr [RAX] CALL 0x00124320 JMP 0x00126a31 LAB_00126a31: ADD RSP,0x20 POP RBP RET
void my_message_stderr(int8 param_1,char *param_2,ulong param_3) { fflush(*(FILE **)PTR_stdout_002cefc0); if ((param_3 & 0x480) == 0) { if ((param_3 & 4) != 0) { fputc(7,*(FILE **)PTR_stderr_002cefe0); } if (my_progname != (char *)0x0) { fputs(my_progname,*(FILE **)PTR_stderr_002cefe0); fputs(": ",*(FILE **)PTR_stderr_002cefe0); } fputs(param_2,*(FILE **)PTR_stderr_002cefe0); fputc(10,*(FILE **)PTR_stderr_002cefe0); fflush(*(FILE **)PTR_stderr_002cefe0); } return; }
55,205
CLI::FileError::Missing(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
MikePodsytnik[P]TCRtrie/build_O1/_deps/cli11-src/include/CLI/Error.hpp
static FileError Missing(std::string name) { return FileError(name + " was not readable (missing?)"); }
O1
cpp
CLI::FileError::Missing(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 0x178c0 leaq 0xf4ac(%rip), %rsi # 0x37c8c movq %r14, %rdi callq 0x77e0 movq %rsp, %rsi movq %rbx, %rdi callq 0x28e40 movq (%rsp), %rdi cmpq %r15, %rdi je 0x28809 movq 0x10(%rsp), %rsi incq %rsi callq 0x7430 movq %rbx, %rax addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq jmp 0x28818 movq %rax, %rbx movq (%rsp), %rdi cmpq %r15, %rdi je 0x28831 movq 0x10(%rsp), %rsi incq %rsi callq 0x7430 movq %rbx, %rdi callq 0x7780 nop
_ZN3CLI9FileError7MissingENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15; __int64 push r14; int push rbx; void * 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) lea rsi, aWasNotReadable; " was not readable (missing?)" mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, rsp mov rdi, rbx; int call _ZN3CLI9FileErrorC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::FileError::FileError(std::string) mov rdi, [rsp+38h+var_38]; void * cmp rdi, r15 jz short loc_28809 mov rsi, [rsp+38h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_28809: mov rax, rbx add rsp, 20h pop rbx pop r14 pop r15 retn jmp short $+2 loc_28818: mov rbx, rax mov rdi, [rsp+0]; void * cmp rdi, r15 jz short loc_28831 mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_28831: mov rdi, rbx call __Unwind_Resume
long long CLI::FileError::Missing(long long a1, long long a2) { void *v3; // [rsp+0h] [rbp-38h] BYREF int v4; // [rsp+8h] [rbp-30h] long long v5; // [rsp+10h] [rbp-28h] BYREF int v6; // [rsp+18h] [rbp-20h] void *v7; // [rsp+20h] [rbp-18h] int v8; // [rsp+28h] [rbp-10h] long long v9; // [rsp+30h] [rbp-8h] v3 = &v5; std::string::_M_construct<char *>(&v3, *(_BYTE **)a2, *(_QWORD *)a2 + *(_QWORD *)(a2 + 8)); std::string::append(&v3, " was not readable (missing?)"); CLI::FileError::FileError(a1, v3, v4, v5, v6, v7, v8, v9); if ( v3 != &v5 ) operator delete(v3, v5 + 1); return a1; }
Missing: 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 0x001178c0 LAB_001287d9: LEA RSI,[0x137c8c] MOV RDI,R14 CALL 0x001077e0 LAB_001287e8: MOV RSI,RSP MOV RDI,RBX CALL 0x00128e40 LAB_001287f3: MOV RDI,qword ptr [RSP] CMP RDI,R15 JZ 0x00128809 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x00107430 LAB_00128809: MOV RAX,RBX ADD RSP,0x20 POP RBX POP R14 POP R15 RET
/* CLI::FileError::Missing(std::__cxx11::string) */ FileError * __thiscall CLI::FileError::Missing(FileError *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 001287d9 to 001287e7 has its CatchHandler @ 00128818 */ std::__cxx11::string::append((char *)local_38); /* try { // try from 001287e8 to 001287f2 has its CatchHandler @ 00128816 */ FileError(this,local_38); if (local_38[0] != local_28) { operator_delete(local_38[0],local_28[0] + 1); } return this; }
55,206
enumerate_ports()
ami-iit[P]serial_cpp/examples/serial_cpp_example.cc
void enumerate_ports() { vector<serial_cpp::PortInfo> devices_found = serial_cpp::list_ports(); vector<serial_cpp::PortInfo>::iterator iter = devices_found.begin(); while( iter != devices_found.end() ) { serial_cpp::PortInfo device = *iter++; printf( "(%s, %s, %s)\n", device.port.c_str(), device.description.c_str(), device.hardware_id.c_str() ); } }
O0
cpp
enumerate_ports(): pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp leaq -0x18(%rbp), %rdi callq 0xcf70 leaq -0x18(%rbp), %rdi callq 0x4440 movq %rax, -0x20(%rbp) leaq -0x18(%rbp), %rdi callq 0x44b0 movq %rax, -0x28(%rbp) leaq -0x20(%rbp), %rdi leaq -0x28(%rbp), %rsi callq 0x4470 testb $0x1, %al jne 0x3874 jmp 0x3935 leaq -0x20(%rbp), %rdi xorl %esi, %esi callq 0x44e0 movq %rax, -0x90(%rbp) leaq -0x90(%rbp), %rdi callq 0x4520 movq %rax, %rsi leaq -0x88(%rbp), %rdi callq 0x4540 jmp 0x38a3 leaq -0x88(%rbp), %rdi callq 0x3150 movq %rax, -0xb0(%rbp) leaq -0x68(%rbp), %rdi callq 0x3150 movq %rax, -0xa8(%rbp) leaq -0x48(%rbp), %rdi callq 0x3150 movq -0xb0(%rbp), %rsi movq -0xa8(%rbp), %rdx movq %rax, %rcx leaq 0xc71d(%rip), %rdi # 0x10004 xorl %eax, %eax callq 0x3060 jmp 0x38f0 leaq -0x88(%rbp), %rdi callq 0x45e0 jmp 0x3851 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x98(%rbp) movl %eax, -0x9c(%rbp) jmp 0x3947 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x98(%rbp) movl %eax, -0x9c(%rbp) leaq -0x88(%rbp), %rdi callq 0x45e0 jmp 0x3947 leaq -0x18(%rbp), %rdi callq 0x4620 addq $0xb0, %rsp popq %rbp retq leaq -0x18(%rbp), %rdi callq 0x4620 movq -0x98(%rbp), %rdi callq 0x35d0 nopl (%rax)
_Z15enumerate_portsv: push rbp mov rbp, rsp sub rsp, 0B0h lea rdi, [rbp+var_18]; this call _ZN10serial_cpp10list_portsEv; serial_cpp::list_ports(void) lea rdi, [rbp+var_18] call _ZNSt6vectorIN10serial_cpp8PortInfoESaIS1_EE5beginEv; std::vector<serial_cpp::PortInfo>::begin(void) mov [rbp+var_20], rax loc_3851: lea rdi, [rbp+var_18] call _ZNSt6vectorIN10serial_cpp8PortInfoESaIS1_EE3endEv; std::vector<serial_cpp::PortInfo>::end(void) mov [rbp+var_28], rax lea rdi, [rbp+var_20] lea rsi, [rbp+var_28] call _ZN9__gnu_cxxneIPN10serial_cpp8PortInfoESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_; __gnu_cxx::operator!=<serial_cpp::PortInfo *,std::vector<serial_cpp::PortInfo>>(__gnu_cxx::__normal_iterator<serial_cpp::PortInfo *,std::vector<serial_cpp::PortInfo>> const&,__gnu_cxx::__normal_iterator<serial_cpp::PortInfo *,std::vector<serial_cpp::PortInfo>> const&) test al, 1 jnz short loc_3874 jmp loc_3935 loc_3874: lea rdi, [rbp+var_20] xor esi, esi call _ZN9__gnu_cxx17__normal_iteratorIPN10serial_cpp8PortInfoESt6vectorIS2_SaIS2_EEEppEi; __gnu_cxx::__normal_iterator<serial_cpp::PortInfo *,std::vector<serial_cpp::PortInfo>>::operator++(int) mov [rbp+var_90], rax lea rdi, [rbp+var_90] call _ZNK9__gnu_cxx17__normal_iteratorIPN10serial_cpp8PortInfoESt6vectorIS2_SaIS2_EEEdeEv; __gnu_cxx::__normal_iterator<serial_cpp::PortInfo *,std::vector<serial_cpp::PortInfo>>::operator*(void) mov rsi, rax lea rdi, [rbp+var_88] call _ZN10serial_cpp8PortInfoC2ERKS0_; serial_cpp::PortInfo::PortInfo(serial_cpp::PortInfo const&) jmp short $+2 loc_38A3: lea rdi, [rbp+var_88] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov [rbp+var_B0], rax lea rdi, [rbp+var_68] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov [rbp+var_A8], rax lea rdi, [rbp+var_48] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov rsi, [rbp+var_B0] mov rdx, [rbp+var_A8] mov rcx, rax lea rdi, aSSS; "(%s, %s, %s)\n" xor eax, eax call _printf jmp short $+2 loc_38F0: lea rdi, [rbp+var_88]; this call _ZN10serial_cpp8PortInfoD2Ev; serial_cpp::PortInfo::~PortInfo() jmp loc_3851 mov rcx, rax mov eax, edx mov [rbp+var_98], rcx mov [rbp+var_9C], eax jmp short loc_3947 mov rcx, rax mov eax, edx mov [rbp+var_98], rcx mov [rbp+var_9C], eax lea rdi, [rbp+var_88]; this call _ZN10serial_cpp8PortInfoD2Ev; serial_cpp::PortInfo::~PortInfo() jmp short loc_3947 loc_3935: lea rdi, [rbp+var_18] call _ZNSt6vectorIN10serial_cpp8PortInfoESaIS1_EED2Ev; std::vector<serial_cpp::PortInfo>::~vector() add rsp, 0B0h pop rbp retn loc_3947: lea rdi, [rbp+var_18] call _ZNSt6vectorIN10serial_cpp8PortInfoESaIS1_EED2Ev; std::vector<serial_cpp::PortInfo>::~vector() mov rdi, [rbp+var_98] call __Unwind_Resume
long long enumerate_ports(void) { const serial_cpp::PortInfo *v0; // rsi const char *v1; // rax const char *v3; // [rsp+0h] [rbp-B0h] const char *v4; // [rsp+8h] [rbp-A8h] long long v5; // [rsp+20h] [rbp-90h] BYREF _BYTE v6[32]; // [rsp+28h] [rbp-88h] BYREF _BYTE v7[32]; // [rsp+48h] [rbp-68h] BYREF _BYTE v8[32]; // [rsp+68h] [rbp-48h] BYREF long long v9; // [rsp+88h] [rbp-28h] BYREF long long v10; // [rsp+90h] [rbp-20h] BYREF _BYTE v11[24]; // [rsp+98h] [rbp-18h] BYREF serial_cpp::list_ports((serial_cpp *)v11); v10 = std::vector<serial_cpp::PortInfo>::begin(v11); while ( 1 ) { v9 = std::vector<serial_cpp::PortInfo>::end(v11); if ( (__gnu_cxx::operator!=<serial_cpp::PortInfo *,std::vector<serial_cpp::PortInfo>>(&v10, &v9) & 1) == 0 ) break; v5 = __gnu_cxx::__normal_iterator<serial_cpp::PortInfo *,std::vector<serial_cpp::PortInfo>>::operator++(&v10, 0LL); v0 = (const serial_cpp::PortInfo *)__gnu_cxx::__normal_iterator<serial_cpp::PortInfo *,std::vector<serial_cpp::PortInfo>>::operator*(&v5); serial_cpp::PortInfo::PortInfo((serial_cpp::PortInfo *)v6, v0); v3 = (const char *)std::string::c_str(v6); v4 = (const char *)std::string::c_str(v7); v1 = (const char *)std::string::c_str(v8); printf("(%s, %s, %s)\n", v3, v4, v1); serial_cpp::PortInfo::~PortInfo((serial_cpp::PortInfo *)v6); } return std::vector<serial_cpp::PortInfo>::~vector(v11); }
enumerate_ports: PUSH RBP MOV RBP,RSP SUB RSP,0xb0 LEA RDI,[RBP + -0x18] CALL 0x0010cf70 LEA RDI,[RBP + -0x18] CALL 0x00104440 MOV qword ptr [RBP + -0x20],RAX LAB_00103851: LEA RDI,[RBP + -0x18] CALL 0x001044b0 MOV qword ptr [RBP + -0x28],RAX LEA RDI,[RBP + -0x20] LEA RSI,[RBP + -0x28] CALL 0x00104470 TEST AL,0x1 JNZ 0x00103874 JMP 0x00103935 LAB_00103874: LEA RDI,[RBP + -0x20] XOR ESI,ESI CALL 0x001044e0 MOV qword ptr [RBP + -0x90],RAX LEA RDI,[RBP + -0x90] CALL 0x00104520 MOV RSI,RAX LAB_00103895: LEA RDI,[RBP + -0x88] CALL 0x00104540 JMP 0x001038a3 LAB_001038a3: LEA RDI,[RBP + -0x88] CALL 0x00103150 MOV qword ptr [RBP + -0xb0],RAX LEA RDI,[RBP + -0x68] CALL 0x00103150 MOV qword ptr [RBP + -0xa8],RAX LEA RDI,[RBP + -0x48] CALL 0x00103150 MOV RSI,qword ptr [RBP + -0xb0] MOV RDX,qword ptr [RBP + -0xa8] MOV RCX,RAX LAB_001038e0: LEA RDI,[0x110004] XOR EAX,EAX CALL 0x00103060 LAB_001038ee: JMP 0x001038f0 LAB_001038f0: LEA RDI,[RBP + -0x88] CALL 0x001045e0 JMP 0x00103851 LAB_00103935: LEA RDI,[RBP + -0x18] CALL 0x00104620 ADD RSP,0xb0 POP RBP RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* enumerate_ports() */ void enumerate_ports(void) { bool bVar1; PortInfo *pPVar2; int8 uVar3; int8 uVar4; int8 uVar5; int8 local_98; PortInfo local_90 [96]; int8 local_30; int8 local_28; serial_cpp local_20 [24]; serial_cpp::list_ports(local_20); local_28 = std::vector<serial_cpp::PortInfo,std::allocator<serial_cpp::PortInfo>>::begin ((vector<serial_cpp::PortInfo,std::allocator<serial_cpp::PortInfo>> *) local_20); while( true ) { local_30 = std::vector<serial_cpp::PortInfo,std::allocator<serial_cpp::PortInfo>>::end ((vector<serial_cpp::PortInfo,std::allocator<serial_cpp::PortInfo>> *) local_20); bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_28,(__normal_iterator *)&local_30); if (!bVar1) break; local_98 = __gnu_cxx:: __normal_iterator<serial_cpp::PortInfo*,std::vector<serial_cpp::PortInfo,std::allocator<serial_cpp::PortInfo>>> ::operator++((__normal_iterator<serial_cpp::PortInfo*,std::vector<serial_cpp::PortInfo,std::allocator<serial_cpp::PortInfo>>> *)&local_28,0); pPVar2 = (PortInfo *) __gnu_cxx:: __normal_iterator<serial_cpp::PortInfo*,std::vector<serial_cpp::PortInfo,std::allocator<serial_cpp::PortInfo>>> ::operator*((__normal_iterator<serial_cpp::PortInfo*,std::vector<serial_cpp::PortInfo,std::allocator<serial_cpp::PortInfo>>> *)&local_98); /* try { // try from 00103895 to 001038a0 has its CatchHandler @ 00103901 */ serial_cpp::PortInfo::PortInfo(local_90,pPVar2); uVar3 = std::__cxx11::string::c_str(); uVar4 = std::__cxx11::string::c_str(); uVar5 = std::__cxx11::string::c_str(); /* try { // try from 001038e0 to 001038ed has its CatchHandler @ 00103915 */ printf("(%s, %s, %s)\n",uVar3,uVar4,uVar5); serial_cpp::PortInfo::~PortInfo(local_90); } std::vector<serial_cpp::PortInfo,std::allocator<serial_cpp::PortInfo>>::~vector ((vector<serial_cpp::PortInfo,std::allocator<serial_cpp::PortInfo>> *)local_20); return; }
55,207
enumerate_ports()
ami-iit[P]serial_cpp/examples/serial_cpp_example.cc
void enumerate_ports() { vector<serial_cpp::PortInfo> devices_found = serial_cpp::list_ports(); vector<serial_cpp::PortInfo>::iterator iter = devices_found.begin(); while( iter != devices_found.end() ) { serial_cpp::PortInfo device = *iter++; printf( "(%s, %s, %s)\n", device.port.c_str(), device.description.c_str(), device.hardware_id.c_str() ); } }
O2
cpp
enumerate_ports(): pushq %r15 pushq %r14 pushq %rbx subq $0x80, %rsp leaq 0x8(%rsp), %rbx movq %rbx, %rdi callq 0x7684 movq (%rbx), %rbx leaq 0x20(%rsp), %r14 leaq 0x5941(%rip), %r15 # 0x9020 cmpq 0x10(%rsp), %rbx je 0x3718 movq %r14, %rdi movq %rbx, %rsi callq 0x3d66 addq $0x60, %rbx movq 0x20(%rsp), %rsi movq 0x40(%rsp), %rdx movq 0x60(%rsp), %rcx movq %r15, %rdi xorl %eax, %eax callq 0x3050 movq %r14, %rdi callq 0x3dbc jmp 0x36df leaq 0x8(%rsp), %rdi callq 0x3ddc addq $0x80, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x3ddc movq %rbx, %rdi callq 0x34d0
_Z15enumerate_portsv: push r15 push r14 push rbx sub rsp, 80h lea rbx, [rsp+98h+var_90] mov rdi, rbx; this call _ZN10serial_cpp10list_portsEv; serial_cpp::list_ports(void) mov rbx, [rbx] lea r14, [rsp+98h+var_78] lea r15, aSSS; "(%s, %s, %s)\n" loc_36DF: cmp rbx, [rsp+98h+var_88] jz short loc_3718 mov rdi, r14 mov rsi, rbx call _ZN10serial_cpp8PortInfoC2ERKS0_; serial_cpp::PortInfo::PortInfo(serial_cpp::PortInfo const&) add rbx, 60h ; '`' mov rsi, [rsp+98h+var_78] mov rdx, [rsp+98h+var_58] mov rcx, [rsp+98h+var_38] mov rdi, r15 xor eax, eax call _printf mov rdi, r14; this call _ZN10serial_cpp8PortInfoD2Ev; serial_cpp::PortInfo::~PortInfo() jmp short loc_36DF loc_3718: lea rdi, [rsp+98h+var_90] call _ZNSt6vectorIN10serial_cpp8PortInfoESaIS1_EED2Ev; std::vector<serial_cpp::PortInfo>::~vector() add rsp, 80h pop rbx pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_0] call _ZNSt6vectorIN10serial_cpp8PortInfoESaIS1_EED2Ev; std::vector<serial_cpp::PortInfo>::~vector() mov rdi, rbx call __Unwind_Resume
long long enumerate_ports(void) { const serial_cpp::PortInfo *i; // rbx _QWORD v2[3]; // [rsp+8h] [rbp-90h] BYREF const char *v3[15]; // [rsp+20h] [rbp-78h] BYREF serial_cpp::list_ports((serial_cpp *)v2); for ( i = (const serial_cpp::PortInfo *)v2[0]; i != (const serial_cpp::PortInfo *)v2[1]; i = (const serial_cpp::PortInfo *)((char *)i + 96) ) { serial_cpp::PortInfo::PortInfo((serial_cpp::PortInfo *)v3, i); printf("(%s, %s, %s)\n", v3[0], v3[4], v3[8]); serial_cpp::PortInfo::~PortInfo((serial_cpp::PortInfo *)v3); } return std::vector<serial_cpp::PortInfo>::~vector(v2); }
enumerate_ports: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x80 LEA RBX,[RSP + 0x8] MOV RDI,RBX CALL 0x00107684 MOV RBX,qword ptr [RBX] LEA R14,[RSP + 0x20] LEA R15,[0x109020] LAB_001036df: CMP RBX,qword ptr [RSP + 0x10] JZ 0x00103718 LAB_001036e6: MOV RDI,R14 MOV RSI,RBX CALL 0x00103d66 LAB_001036f1: ADD RBX,0x60 MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x40] MOV RCX,qword ptr [RSP + 0x60] MOV RDI,R15 XOR EAX,EAX CALL 0x00103050 MOV RDI,R14 CALL 0x00103dbc JMP 0x001036df LAB_00103718: LEA RDI,[RSP + 0x8] CALL 0x00103ddc ADD RSP,0x80 POP RBX POP R14 POP R15 RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* enumerate_ports() */ void enumerate_ports(void) { PortInfo *pPVar1; PortInfo *local_90; PortInfo *local_88; int8 local_78 [4]; int8 local_58; int8 local_38; serial_cpp::list_ports((serial_cpp *)&local_90); for (pPVar1 = local_90; pPVar1 != local_88; pPVar1 = pPVar1 + 0x60) { /* try { // try from 001036e6 to 001036f0 has its CatchHandler @ 0010372f */ serial_cpp::PortInfo::PortInfo((PortInfo *)local_78,pPVar1); printf("(%s, %s, %s)\n",local_78[0],local_58,local_38); serial_cpp::PortInfo::~PortInfo((PortInfo *)local_78); } std::vector<serial_cpp::PortInfo,std::allocator<serial_cpp::PortInfo>>::~vector ((vector<serial_cpp::PortInfo,std::allocator<serial_cpp::PortInfo>> *)&local_90); return; }
55,208
enumerate_ports()
ami-iit[P]serial_cpp/examples/serial_cpp_example.cc
void enumerate_ports() { vector<serial_cpp::PortInfo> devices_found = serial_cpp::list_ports(); vector<serial_cpp::PortInfo>::iterator iter = devices_found.begin(); while( iter != devices_found.end() ) { serial_cpp::PortInfo device = *iter++; printf( "(%s, %s, %s)\n", device.port.c_str(), device.description.c_str(), device.hardware_id.c_str() ); } }
O3
cpp
enumerate_ports(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp leaq 0x60(%rsp), %rbx movq %rbx, %rdi callq 0x8640 movq (%rbx), %rbp cmpq 0x8(%rbx), %rbp je 0x380e leaq 0x10(%rsp), %r13 leaq 0x30(%rsp), %rbx leaq 0x50(%rsp), %r14 movq %rsp, %r15 leaq 0x78d8(%rip), %r12 # 0xb030 movq %r13, (%rsp) movq (%rbp), %rsi movq 0x8(%rbp), %rdx addq %rsi, %rdx movq %r15, %rdi callq 0x41da movq %rbx, 0x20(%rsp) movq 0x20(%rbp), %rsi movq 0x28(%rbp), %rdx addq %rsi, %rdx leaq 0x20(%rsp), %rdi callq 0x41da movq %r14, 0x40(%rsp) movq 0x40(%rbp), %rsi movq 0x48(%rbp), %rdx addq %rsi, %rdx leaq 0x40(%rsp), %rdi callq 0x41da movq (%rsp), %rsi movq 0x20(%rsp), %rdx movq 0x40(%rsp), %rcx movq %r12, %rdi xorl %eax, %eax callq 0x3060 movq 0x40(%rsp), %rdi cmpq %r14, %rdi je 0x37d2 movq 0x50(%rsp), %rsi incq %rsi callq 0x32c0 movq 0x20(%rsp), %rdi cmpq %rbx, %rdi je 0x37e9 movq 0x30(%rsp), %rsi incq %rsi callq 0x32c0 movq (%rsp), %rdi cmpq %r13, %rdi je 0x37ff movq 0x10(%rsp), %rsi incq %rsi callq 0x32c0 addq $0x60, %rbp cmpq 0x68(%rsp), %rbp jne 0x3758 leaq 0x60(%rsp), %rdi callq 0x4162 addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 jmp 0x3861 movq %rax, %r14 jmp 0x384b movq %rax, %r14 movq 0x20(%rsp), %rdi cmpq %rbx, %rdi je 0x384b movq 0x30(%rsp), %rsi incq %rsi callq 0x32c0 movq (%rsp), %rdi cmpq %r13, %rdi je 0x3861 movq 0x10(%rsp), %rsi incq %rsi callq 0x32c0 leaq 0x60(%rsp), %rdi callq 0x4162 movq %r14, %rdi callq 0x34f0
_Z15enumerate_portsv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h lea rbx, [rsp+0A8h+var_48] mov rdi, rbx; this call _ZN10serial_cpp10list_portsEv; serial_cpp::list_ports(void) mov rbp, [rbx] cmp rbp, [rbx+8] jz loc_380E lea r13, [rsp+0A8h+var_98] lea rbx, [rsp+0A8h+var_78] lea r14, [rsp+0A8h+var_58] mov r15, rsp lea r12, aSSS; "(%s, %s, %s)\n" loc_3758: mov [rsp+0A8h+var_A8], r13 mov rsi, [rbp+0] mov rdx, [rbp+8] add rdx, rsi mov rdi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov [rsp+0A8h+var_88], rbx mov rsi, [rbp+20h] mov rdx, [rbp+28h] add rdx, rsi lea rdi, [rsp+0A8h+var_88] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov [rsp+0A8h+var_68], r14 mov rsi, [rbp+40h] mov rdx, [rbp+48h] add rdx, rsi lea rdi, [rsp+0A8h+var_68] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov rsi, [rsp+0A8h+var_A8] mov rdx, [rsp+0A8h+var_88] mov rcx, [rsp+0A8h+var_68] mov rdi, r12 xor eax, eax call _printf mov rdi, [rsp+0A8h+var_68]; void * cmp rdi, r14 jz short loc_37D2 mov rsi, [rsp+0A8h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_37D2: mov rdi, [rsp+0A8h+var_88]; void * cmp rdi, rbx jz short loc_37E9 mov rsi, [rsp+0A8h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_37E9: mov rdi, [rsp+0A8h+var_A8]; void * cmp rdi, r13 jz short loc_37FF mov rsi, [rsp+0A8h+var_98] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_37FF: add rbp, 60h ; '`' cmp rbp, [rsp+0A8h+var_40] jnz loc_3758 loc_380E: lea rdi, [rsp+0A8h+var_48] call _ZNSt6vectorIN10serial_cpp8PortInfoESaIS1_EED2Ev; std::vector<serial_cpp::PortInfo>::~vector() add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax jmp short loc_3861 mov r14, rax jmp short loc_384B mov r14, rax mov rdi, [rsp+arg_18]; void * cmp rdi, rbx jz short loc_384B mov rsi, [rsp+arg_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_384B: mov rdi, [rsp+0]; void * cmp rdi, r13 jz short loc_3861 mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3861: lea rdi, [rsp+arg_58] call _ZNSt6vectorIN10serial_cpp8PortInfoESaIS1_EED2Ev; std::vector<serial_cpp::PortInfo>::~vector() mov rdi, r14 call __Unwind_Resume
long long enumerate_ports(void) { _QWORD *i; // rbp void *v2; // [rsp+0h] [rbp-A8h] BYREF _QWORD v3[2]; // [rsp+10h] [rbp-98h] BYREF void *v4; // [rsp+20h] [rbp-88h] BYREF _QWORD v5[2]; // [rsp+30h] [rbp-78h] BYREF void *v6; // [rsp+40h] [rbp-68h] BYREF _QWORD v7[2]; // [rsp+50h] [rbp-58h] BYREF _QWORD *v8; // [rsp+60h] [rbp-48h] BYREF _QWORD *v9; // [rsp+68h] [rbp-40h] serial_cpp::list_ports((serial_cpp *)&v8); for ( i = v8; i != v9; i += 12 ) { v2 = v3; std::string::_M_construct<char *>(&v2, *i, *i + i[1]); v4 = v5; std::string::_M_construct<char *>(&v4, i[4], i[4] + i[5]); v6 = v7; std::string::_M_construct<char *>(&v6, i[8], i[8] + i[9]); printf("(%s, %s, %s)\n", (const char *)v2, (const char *)v4, (const char *)v6); if ( v6 != v7 ) operator delete(v6, v7[0] + 1LL); if ( v4 != v5 ) operator delete(v4, v5[0] + 1LL); if ( v2 != v3 ) operator delete(v2, v3[0] + 1LL); } return std::vector<serial_cpp::PortInfo>::~vector(&v8); }
enumerate_ports: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 LEA RBX,[RSP + 0x60] MOV RDI,RBX CALL 0x00108640 MOV RBP,qword ptr [RBX] CMP RBP,qword ptr [RBX + 0x8] JZ 0x0010380e LEA R13,[RSP + 0x10] LEA RBX,[RSP + 0x30] LEA R14,[RSP + 0x50] MOV R15,RSP LEA R12,[0x10b030] LAB_00103758: MOV qword ptr [RSP],R13 MOV RSI,qword ptr [RBP] MOV RDX,qword ptr [RBP + 0x8] ADD RDX,RSI LAB_00103767: MOV RDI,R15 CALL 0x001041da MOV qword ptr [RSP + 0x20],RBX MOV RSI,qword ptr [RBP + 0x20] MOV RDX,qword ptr [RBP + 0x28] ADD RDX,RSI LAB_0010377f: LEA RDI,[RSP + 0x20] CALL 0x001041da MOV qword ptr [RSP + 0x40],R14 MOV RSI,qword ptr [RBP + 0x40] MOV RDX,qword ptr [RBP + 0x48] ADD RDX,RSI LAB_00103799: LEA RDI,[RSP + 0x40] CALL 0x001041da LAB_001037a3: MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x40] MOV RDI,R12 XOR EAX,EAX CALL 0x00103060 MOV RDI,qword ptr [RSP + 0x40] CMP RDI,R14 JZ 0x001037d2 MOV RSI,qword ptr [RSP + 0x50] INC RSI CALL 0x001032c0 LAB_001037d2: MOV RDI,qword ptr [RSP + 0x20] CMP RDI,RBX JZ 0x001037e9 MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x001032c0 LAB_001037e9: MOV RDI,qword ptr [RSP] CMP RDI,R13 JZ 0x001037ff MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x001032c0 LAB_001037ff: ADD RBP,0x60 CMP RBP,qword ptr [RSP + 0x68] JNZ 0x00103758 LAB_0010380e: LEA RDI,[RSP + 0x60] CALL 0x00104162 ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* enumerate_ports() */ void enumerate_ports(void) { long *plVar1; long *local_a8 [2]; long local_98 [2]; long *local_88 [2]; long local_78 [2]; long *local_68 [2]; long local_58 [2]; long *local_48; long *local_40; serial_cpp::list_ports((serial_cpp *)&local_48); if (local_48 != local_40) { plVar1 = local_48; do { local_a8[0] = local_98; /* try { // try from 00103767 to 0010376e has its CatchHandler @ 00103827 */ std::__cxx11::string::_M_construct<char*>(local_a8,*plVar1,plVar1[1] + *plVar1); /* try { // try from 0010377f to 00103788 has its CatchHandler @ 0010382c */ local_88[0] = local_78; std::__cxx11::string::_M_construct<char*>(local_88,plVar1[4],plVar1[5] + plVar1[4]); /* try { // try from 00103799 to 001037a2 has its CatchHandler @ 00103831 */ local_68[0] = local_58; std::__cxx11::string::_M_construct<char*>(local_68,plVar1[8],plVar1[9] + plVar1[8]); printf("(%s, %s, %s)\n",local_a8[0],local_88[0],local_68[0]); if (local_68[0] != local_58) { operator_delete(local_68[0],local_58[0] + 1); } if (local_88[0] != local_78) { operator_delete(local_88[0],local_78[0] + 1); } if (local_a8[0] != local_98) { operator_delete(local_a8[0],local_98[0] + 1); } plVar1 = plVar1 + 0xc; } while (plVar1 != local_40); } std::vector<serial_cpp::PortInfo,std::allocator<serial_cpp::PortInfo>>::~vector ((vector<serial_cpp::PortInfo,std::allocator<serial_cpp::PortInfo>> *)&local_48); return; }
55,209
delete_dynamic_with_callback
eloqsql/mysys/array.c
void delete_dynamic_with_callback(DYNAMIC_ARRAY *array, FREE_FUNC f) { uint i; char *ptr= (char*) array->buffer; for (i= 0; i < array->elements; i++, ptr+= array->size_of_element) { f(ptr); } delete_dynamic(array); }
O3
c
delete_dynamic_with_callback: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdi, %rbx cmpl $0x0, 0x8(%rdi) je 0xb0fce movq %rsi, %r14 movq (%rbx), %r15 xorl %r12d, %r12d movq %r15, %rdi callq *%r14 incl %r12d movl 0x14(%rbx), %eax addq %rax, %r15 cmpl 0x8(%rbx), %r12d jb 0xb0fb9 testb $0x1, 0x21(%rbx) jne 0xb0fe1 movq (%rbx), %rdi testq %rdi, %rdi je 0xb0fe1 callq 0xc3cfa xorps %xmm0, %xmm0 movups %xmm0, (%rbx) popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
delete_dynamic_with_callback: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rdi cmp dword ptr [rdi+8], 0 jz short loc_B0FCE mov r14, rsi mov r15, [rbx] xor r12d, r12d loc_B0FB9: mov rdi, r15 call r14 inc r12d mov eax, [rbx+14h] add r15, rax cmp r12d, [rbx+8] jb short loc_B0FB9 loc_B0FCE: test byte ptr [rbx+21h], 1 jnz short loc_B0FE1 mov rdi, [rbx] test rdi, rdi jz short loc_B0FE1 call my_free loc_B0FE1: xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long delete_dynamic_with_callback(long long *a1, void ( *a2)(long long)) { long long v2; // r15 unsigned int v3; // r12d long long result; // rax if ( *((_DWORD *)a1 + 2) ) { v2 = *a1; v3 = 0; do { a2(v2); ++v3; result = *((unsigned int *)a1 + 5); v2 += result; } while ( v3 < *((_DWORD *)a1 + 2) ); } if ( (*((_BYTE *)a1 + 33) & 1) == 0 && *a1 ) result = my_free(*a1); *(_OWORD *)a1 = 0LL; return result; }
delete_dynamic_with_callback: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDI CMP dword ptr [RDI + 0x8],0x0 JZ 0x001b0fce MOV R14,RSI MOV R15,qword ptr [RBX] XOR R12D,R12D LAB_001b0fb9: MOV RDI,R15 CALL R14 INC R12D MOV EAX,dword ptr [RBX + 0x14] ADD R15,RAX CMP R12D,dword ptr [RBX + 0x8] JC 0x001b0fb9 LAB_001b0fce: TEST byte ptr [RBX + 0x21],0x1 JNZ 0x001b0fe1 MOV RDI,qword ptr [RBX] TEST RDI,RDI JZ 0x001b0fe1 CALL 0x001c3cfa LAB_001b0fe1: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 POP RBX POP R12 POP R14 POP R15 POP RBP RET
void delete_dynamic_with_callback(long *param_1,code *param_2) { uint uVar1; long lVar2; if ((int)param_1[1] != 0) { lVar2 = *param_1; uVar1 = 0; do { (*param_2)(lVar2); uVar1 = uVar1 + 1; lVar2 = lVar2 + (ulong)*(uint *)((long)param_1 + 0x14); } while (uVar1 < *(uint *)(param_1 + 1)); } if (((*(byte *)((long)param_1 + 0x21) & 1) == 0) && (*param_1 != 0)) { my_free(); } *param_1 = 0; param_1[1] = 0; return; }
55,210
blst_scalar_from_hexascii
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/exports.c
void blst_scalar_from_hexascii(pow256 ret, const char *hex) { bytes_from_hexascii(ret, sizeof(pow256), hex); }
O3
c
blst_scalar_from_hexascii: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 cmpb $0x30, (%rsi) jne 0x25721 movzbl 0x1(%rbx), %eax orl $0x20, %eax cmpl $0x78, %eax jne 0x25721 addq $0x2, %rbx xorl %r15d, %r15d movsbl (%rbx,%r15), %edi callq 0x2a3e3 cmpb $0xf, %al ja 0x2574f incq %r15 cmpq $0x40, %r15 jne 0x25724 xorps %xmm0, %xmm0 movups %xmm0, 0x10(%r14) movups %xmm0, (%r14) movl $0x40, %r15d jmp 0x25760 xorps %xmm0, %xmm0 movups %xmm0, 0x10(%r14) movups %xmm0, (%r14) testq %r15, %r15 je 0x25790 decq %r15 xorl %eax, %eax movl %eax, %r12d shlb $0x4, %r12b movsbl (%rbx), %edi callq 0x2a3e3 orb %r12b, %al testb $0x1, %r15b jne 0x25787 movq %r15, %rcx shrq %rcx movb %al, (%r14,%rcx) incq %rbx addq $-0x1, %r15 jb 0x25765 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
blst_scalar_from_hexascii: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rsi mov r14, rdi cmp byte ptr [rsi], 30h ; '0' jnz short loc_25721 movzx eax, byte ptr [rbx+1] or eax, 20h cmp eax, 78h ; 'x' jnz short loc_25721 add rbx, 2 loc_25721: xor r15d, r15d loc_25724: movsx edi, byte ptr [rbx+r15] call nibble_from_hex cmp al, 0Fh ja short loc_2574F inc r15 cmp r15, 40h ; '@' jnz short loc_25724 xorps xmm0, xmm0 movups xmmword ptr [r14+10h], xmm0 movups xmmword ptr [r14], xmm0 mov r15d, 40h ; '@' jmp short loc_25760 loc_2574F: xorps xmm0, xmm0 movups xmmword ptr [r14+10h], xmm0 movups xmmword ptr [r14], xmm0 test r15, r15 jz short loc_25790 loc_25760: dec r15 xor eax, eax loc_25765: mov r12d, eax shl r12b, 4 movsx edi, byte ptr [rbx] call nibble_from_hex or al, r12b test r15b, 1 jnz short loc_25787 mov rcx, r15 shr rcx, 1 mov [r14+rcx], al loc_25787: inc rbx add r15, 0FFFFFFFFFFFFFFFFh jb short loc_25765 loc_25790: pop rbx pop r12 pop r14 pop r15 pop rbp retn
unsigned __int8 blst_scalar_from_hexascii(_OWORD *a1, char *a2) { char *v2; // rbx long long v3; // r15 unsigned __int8 result; // al unsigned long long v5; // r15 v2 = a2; if ( *a2 == 48 && ((unsigned __int8)a2[1] | 0x20) == 0x78 ) v2 = a2 + 2; v3 = 0LL; while ( 1 ) { result = nibble_from_hex((unsigned int)v2[v3]); if ( result > 0xFu ) break; if ( ++v3 == 64 ) { a1[1] = 0LL; *a1 = 0LL; v3 = 64LL; goto LABEL_9; } } a1[1] = 0LL; *a1 = 0LL; if ( !v3 ) return result; LABEL_9: v5 = v3 - 1; result = 0; do { result = (16 * result) | nibble_from_hex((unsigned int)*v2); if ( (v5 & 1) == 0 ) *((_BYTE *)a1 + (v5 >> 1)) = result; ++v2; } while ( v5-- != 0 ); return result; }
blst_scalar_from_hexascii: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RSI MOV R14,RDI CMP byte ptr [RSI],0x30 JNZ 0x00125721 MOVZX EAX,byte ptr [RBX + 0x1] OR EAX,0x20 CMP EAX,0x78 JNZ 0x00125721 ADD RBX,0x2 LAB_00125721: XOR R15D,R15D LAB_00125724: MOVSX EDI,byte ptr [RBX + R15*0x1] CALL 0x0012a3e3 CMP AL,0xf JA 0x0012574f INC R15 CMP R15,0x40 JNZ 0x00125724 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0x10],XMM0 MOVUPS xmmword ptr [R14],XMM0 MOV R15D,0x40 JMP 0x00125760 LAB_0012574f: XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0x10],XMM0 MOVUPS xmmword ptr [R14],XMM0 TEST R15,R15 JZ 0x00125790 LAB_00125760: DEC R15 XOR EAX,EAX LAB_00125765: MOV R12D,EAX SHL R12B,0x4 MOVSX EDI,byte ptr [RBX] CALL 0x0012a3e3 OR AL,R12B TEST R15B,0x1 JNZ 0x00125787 MOV RCX,R15 SHR RCX,0x1 MOV byte ptr [R14 + RCX*0x1],AL LAB_00125787: INC RBX ADD R15,-0x1 JC 0x00125765 LAB_00125790: POP RBX POP R12 POP R14 POP R15 POP RBP RET
void blst_scalar_from_hexascii(int8 *param_1,char *param_2) { byte bVar1; byte bVar2; ulong uVar3; if ((*param_2 == '0') && ((byte)(param_2[1] | 0x20U) == 0x78)) { param_2 = param_2 + 2; } uVar3 = 0; do { bVar1 = nibble_from_hex((int)param_2[uVar3]); if (0xf < bVar1) { param_1[2] = 0; param_1[3] = 0; *param_1 = 0; param_1[1] = 0; if (uVar3 == 0) { return; } goto LAB_00125760; } uVar3 = uVar3 + 1; } while (uVar3 != 0x40); param_1[2] = 0; param_1[3] = 0; *param_1 = 0; param_1[1] = 0; uVar3 = 0x40; LAB_00125760: bVar1 = 0; do { uVar3 = uVar3 - 1; bVar2 = nibble_from_hex((int)*param_2); bVar1 = bVar2 | bVar1 << 4; if ((uVar3 & 1) == 0) { *(byte *)((long)param_1 + (uVar3 >> 1)) = bVar1; } param_2 = param_2 + 1; } while (uVar3 != 0); return; }
55,211
ResidualAttentionBlock::init_params(ggml_context*, ggml_allocr*, ggml_type)
7CodeWizard[P]stablediffusion/clip.hpp
void init_params(struct ggml_context* ctx, ggml_allocr* alloc, ggml_type wtype) { ln1_w = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, hidden_size); ln1_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, hidden_size); q_w = ggml_new_tensor_2d(ctx, wtype, hidden_size, hidden_size); q_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, hidden_size); k_w = ggml_new_tensor_2d(ctx, wtype, hidden_size, hidden_size); k_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, hidden_size); v_w = ggml_new_tensor_2d(ctx, wtype, hidden_size, hidden_size); v_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, hidden_size); out_w = ggml_new_tensor_2d(ctx, wtype, hidden_size, hidden_size); out_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, hidden_size); fc1_w = ggml_new_tensor_2d(ctx, wtype, hidden_size, intermediate_size); fc1_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, intermediate_size); fc2_w = ggml_new_tensor_2d(ctx, wtype, intermediate_size, hidden_size); fc2_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, hidden_size); ln2_w = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, hidden_size); ln2_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, hidden_size); }
O0
cpp
ResidualAttentionBlock::init_params(ggml_context*, ggml_allocr*, ggml_type): subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq %rdx, 0x10(%rsp) movl %ecx, 0xc(%rsp) movq 0x20(%rsp), %rax movq %rax, (%rsp) movq 0x18(%rsp), %rdi movslq 0x8(%rax), %rdx xorl %esi, %esi callq 0x11c880 movq %rax, %rcx movq (%rsp), %rax movq %rcx, 0x50(%rax) movq 0x18(%rsp), %rdi movslq 0x8(%rax), %rdx xorl %esi, %esi callq 0x11c880 movq %rax, %rcx movq (%rsp), %rax movq %rcx, 0x58(%rax) movq 0x18(%rsp), %rdi movl 0xc(%rsp), %esi movslq 0x8(%rax), %rdx movslq 0x8(%rax), %rcx callq 0x11c8b0 movq %rax, %rcx movq (%rsp), %rax movq %rcx, 0x10(%rax) movq 0x18(%rsp), %rdi movslq 0x8(%rax), %rdx xorl %esi, %esi callq 0x11c880 movq %rax, %rcx movq (%rsp), %rax movq %rcx, 0x18(%rax) movq 0x18(%rsp), %rdi movl 0xc(%rsp), %esi movslq 0x8(%rax), %rdx movslq 0x8(%rax), %rcx callq 0x11c8b0 movq %rax, %rcx movq (%rsp), %rax movq %rcx, 0x20(%rax) movq 0x18(%rsp), %rdi movslq 0x8(%rax), %rdx xorl %esi, %esi callq 0x11c880 movq %rax, %rcx movq (%rsp), %rax movq %rcx, 0x28(%rax) movq 0x18(%rsp), %rdi movl 0xc(%rsp), %esi movslq 0x8(%rax), %rdx movslq 0x8(%rax), %rcx callq 0x11c8b0 movq %rax, %rcx movq (%rsp), %rax movq %rcx, 0x30(%rax) movq 0x18(%rsp), %rdi movslq 0x8(%rax), %rdx xorl %esi, %esi callq 0x11c880 movq %rax, %rcx movq (%rsp), %rax movq %rcx, 0x38(%rax) movq 0x18(%rsp), %rdi movl 0xc(%rsp), %esi movslq 0x8(%rax), %rdx movslq 0x8(%rax), %rcx callq 0x11c8b0 movq %rax, %rcx movq (%rsp), %rax movq %rcx, 0x40(%rax) movq 0x18(%rsp), %rdi movslq 0x8(%rax), %rdx xorl %esi, %esi callq 0x11c880 movq %rax, %rcx movq (%rsp), %rax movq %rcx, 0x48(%rax) movq 0x18(%rsp), %rdi movl 0xc(%rsp), %esi movslq 0x8(%rax), %rdx movslq 0xc(%rax), %rcx callq 0x11c8b0 movq %rax, %rcx movq (%rsp), %rax movq %rcx, 0x60(%rax) movq 0x18(%rsp), %rdi movslq 0xc(%rax), %rdx xorl %esi, %esi callq 0x11c880 movq %rax, %rcx movq (%rsp), %rax movq %rcx, 0x68(%rax) movq 0x18(%rsp), %rdi movl 0xc(%rsp), %esi movslq 0xc(%rax), %rdx movslq 0x8(%rax), %rcx callq 0x11c8b0 movq %rax, %rcx movq (%rsp), %rax movq %rcx, 0x70(%rax) movq 0x18(%rsp), %rdi movslq 0x8(%rax), %rdx xorl %esi, %esi callq 0x11c880 movq %rax, %rcx movq (%rsp), %rax movq %rcx, 0x78(%rax) movq 0x18(%rsp), %rdi movslq 0x8(%rax), %rdx xorl %esi, %esi callq 0x11c880 movq %rax, %rcx movq (%rsp), %rax movq %rcx, 0x80(%rax) movq 0x18(%rsp), %rdi movslq 0x8(%rax), %rdx xorl %esi, %esi callq 0x11c880 movq %rax, %rcx movq (%rsp), %rax movq %rcx, 0x88(%rax) addq $0x28, %rsp retq nop
_ZN22ResidualAttentionBlock11init_paramsEP12ggml_contextP11ggml_allocr9ggml_type: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_10], rsi mov [rsp+28h+var_18], rdx mov [rsp+28h+var_1C], ecx mov rax, [rsp+28h+var_8] mov [rsp+28h+var_28], rax mov rdi, [rsp+28h+var_10] movsxd rdx, dword ptr [rax+8] xor esi, esi call ggml_new_tensor_1d mov rcx, rax mov rax, [rsp+28h+var_28] mov [rax+50h], rcx mov rdi, [rsp+28h+var_10] movsxd rdx, dword ptr [rax+8] xor esi, esi call ggml_new_tensor_1d mov rcx, rax mov rax, [rsp+28h+var_28] mov [rax+58h], rcx mov rdi, [rsp+28h+var_10] mov esi, [rsp+28h+var_1C] movsxd rdx, dword ptr [rax+8] movsxd rcx, dword ptr [rax+8] call ggml_new_tensor_2d mov rcx, rax mov rax, [rsp+28h+var_28] mov [rax+10h], rcx mov rdi, [rsp+28h+var_10] movsxd rdx, dword ptr [rax+8] xor esi, esi call ggml_new_tensor_1d mov rcx, rax mov rax, [rsp+28h+var_28] mov [rax+18h], rcx mov rdi, [rsp+28h+var_10] mov esi, [rsp+28h+var_1C] movsxd rdx, dword ptr [rax+8] movsxd rcx, dword ptr [rax+8] call ggml_new_tensor_2d mov rcx, rax mov rax, [rsp+28h+var_28] mov [rax+20h], rcx mov rdi, [rsp+28h+var_10] movsxd rdx, dword ptr [rax+8] xor esi, esi call ggml_new_tensor_1d mov rcx, rax mov rax, [rsp+28h+var_28] mov [rax+28h], rcx mov rdi, [rsp+28h+var_10] mov esi, [rsp+28h+var_1C] movsxd rdx, dword ptr [rax+8] movsxd rcx, dword ptr [rax+8] call ggml_new_tensor_2d mov rcx, rax mov rax, [rsp+28h+var_28] mov [rax+30h], rcx mov rdi, [rsp+28h+var_10] movsxd rdx, dword ptr [rax+8] xor esi, esi call ggml_new_tensor_1d mov rcx, rax mov rax, [rsp+28h+var_28] mov [rax+38h], rcx mov rdi, [rsp+28h+var_10] mov esi, [rsp+28h+var_1C] movsxd rdx, dword ptr [rax+8] movsxd rcx, dword ptr [rax+8] call ggml_new_tensor_2d mov rcx, rax mov rax, [rsp+28h+var_28] mov [rax+40h], rcx mov rdi, [rsp+28h+var_10] movsxd rdx, dword ptr [rax+8] xor esi, esi call ggml_new_tensor_1d mov rcx, rax mov rax, [rsp+28h+var_28] mov [rax+48h], rcx mov rdi, [rsp+28h+var_10] mov esi, [rsp+28h+var_1C] movsxd rdx, dword ptr [rax+8] movsxd rcx, dword ptr [rax+0Ch] call ggml_new_tensor_2d mov rcx, rax mov rax, [rsp+28h+var_28] mov [rax+60h], rcx mov rdi, [rsp+28h+var_10] movsxd rdx, dword ptr [rax+0Ch] xor esi, esi call ggml_new_tensor_1d mov rcx, rax mov rax, [rsp+28h+var_28] mov [rax+68h], rcx mov rdi, [rsp+28h+var_10] mov esi, [rsp+28h+var_1C] movsxd rdx, dword ptr [rax+0Ch] movsxd rcx, dword ptr [rax+8] call ggml_new_tensor_2d mov rcx, rax mov rax, [rsp+28h+var_28] mov [rax+70h], rcx mov rdi, [rsp+28h+var_10] movsxd rdx, dword ptr [rax+8] xor esi, esi call ggml_new_tensor_1d mov rcx, rax mov rax, [rsp+28h+var_28] mov [rax+78h], rcx mov rdi, [rsp+28h+var_10] movsxd rdx, dword ptr [rax+8] xor esi, esi call ggml_new_tensor_1d mov rcx, rax mov rax, [rsp+28h+var_28] mov [rax+80h], rcx mov rdi, [rsp+28h+var_10] movsxd rdx, dword ptr [rax+8] xor esi, esi call ggml_new_tensor_1d mov rcx, rax mov rax, [rsp+28h+var_28] mov [rax+88h], rcx add rsp, 28h retn
long long ResidualAttentionBlock::init_params(long long a1, long long a2, long long a3, unsigned int a4) { long long v4; // rcx long long result; // rax *(_QWORD *)(a1 + 80) = ggml_new_tensor_1d(a2, 0LL, *(int *)(a1 + 8)); *(_QWORD *)(a1 + 88) = ggml_new_tensor_1d(a2, 0LL, *(int *)(a1 + 8)); *(_QWORD *)(a1 + 16) = ggml_new_tensor_2d(a2, a4, *(int *)(a1 + 8), *(int *)(a1 + 8)); *(_QWORD *)(a1 + 24) = ggml_new_tensor_1d(a2, 0LL, *(int *)(a1 + 8)); *(_QWORD *)(a1 + 32) = ggml_new_tensor_2d(a2, a4, *(int *)(a1 + 8), *(int *)(a1 + 8)); *(_QWORD *)(a1 + 40) = ggml_new_tensor_1d(a2, 0LL, *(int *)(a1 + 8)); *(_QWORD *)(a1 + 48) = ggml_new_tensor_2d(a2, a4, *(int *)(a1 + 8), *(int *)(a1 + 8)); *(_QWORD *)(a1 + 56) = ggml_new_tensor_1d(a2, 0LL, *(int *)(a1 + 8)); *(_QWORD *)(a1 + 64) = ggml_new_tensor_2d(a2, a4, *(int *)(a1 + 8), *(int *)(a1 + 8)); *(_QWORD *)(a1 + 72) = ggml_new_tensor_1d(a2, 0LL, *(int *)(a1 + 8)); *(_QWORD *)(a1 + 96) = ggml_new_tensor_2d(a2, a4, *(int *)(a1 + 8), *(int *)(a1 + 12)); *(_QWORD *)(a1 + 104) = ggml_new_tensor_1d(a2, 0LL, *(int *)(a1 + 12)); *(_QWORD *)(a1 + 112) = ggml_new_tensor_2d(a2, a4, *(int *)(a1 + 12), *(int *)(a1 + 8)); *(_QWORD *)(a1 + 120) = ggml_new_tensor_1d(a2, 0LL, *(int *)(a1 + 8)); *(_QWORD *)(a1 + 128) = ggml_new_tensor_1d(a2, 0LL, *(int *)(a1 + 8)); v4 = ggml_new_tensor_1d(a2, 0LL, *(int *)(a1 + 8)); result = a1; *(_QWORD *)(a1 + 136) = v4; return result; }
init_params: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOV qword ptr [RSP + 0x10],RDX MOV dword ptr [RSP + 0xc],ECX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0x18] MOVSXD RDX,dword ptr [RAX + 0x8] XOR ESI,ESI CALL 0x0021c880 MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV qword ptr [RAX + 0x50],RCX MOV RDI,qword ptr [RSP + 0x18] MOVSXD RDX,dword ptr [RAX + 0x8] XOR ESI,ESI CALL 0x0021c880 MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV qword ptr [RAX + 0x58],RCX MOV RDI,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RSP + 0xc] MOVSXD RDX,dword ptr [RAX + 0x8] MOVSXD RCX,dword ptr [RAX + 0x8] CALL 0x0021c8b0 MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV qword ptr [RAX + 0x10],RCX MOV RDI,qword ptr [RSP + 0x18] MOVSXD RDX,dword ptr [RAX + 0x8] XOR ESI,ESI CALL 0x0021c880 MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV qword ptr [RAX + 0x18],RCX MOV RDI,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RSP + 0xc] MOVSXD RDX,dword ptr [RAX + 0x8] MOVSXD RCX,dword ptr [RAX + 0x8] CALL 0x0021c8b0 MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV qword ptr [RAX + 0x20],RCX MOV RDI,qword ptr [RSP + 0x18] MOVSXD RDX,dword ptr [RAX + 0x8] XOR ESI,ESI CALL 0x0021c880 MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV qword ptr [RAX + 0x28],RCX MOV RDI,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RSP + 0xc] MOVSXD RDX,dword ptr [RAX + 0x8] MOVSXD RCX,dword ptr [RAX + 0x8] CALL 0x0021c8b0 MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV qword ptr [RAX + 0x30],RCX MOV RDI,qword ptr [RSP + 0x18] MOVSXD RDX,dword ptr [RAX + 0x8] XOR ESI,ESI CALL 0x0021c880 MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV qword ptr [RAX + 0x38],RCX MOV RDI,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RSP + 0xc] MOVSXD RDX,dword ptr [RAX + 0x8] MOVSXD RCX,dword ptr [RAX + 0x8] CALL 0x0021c8b0 MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV qword ptr [RAX + 0x40],RCX MOV RDI,qword ptr [RSP + 0x18] MOVSXD RDX,dword ptr [RAX + 0x8] XOR ESI,ESI CALL 0x0021c880 MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV qword ptr [RAX + 0x48],RCX MOV RDI,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RSP + 0xc] MOVSXD RDX,dword ptr [RAX + 0x8] MOVSXD RCX,dword ptr [RAX + 0xc] CALL 0x0021c8b0 MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV qword ptr [RAX + 0x60],RCX MOV RDI,qword ptr [RSP + 0x18] MOVSXD RDX,dword ptr [RAX + 0xc] XOR ESI,ESI CALL 0x0021c880 MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV qword ptr [RAX + 0x68],RCX MOV RDI,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RSP + 0xc] MOVSXD RDX,dword ptr [RAX + 0xc] MOVSXD RCX,dword ptr [RAX + 0x8] CALL 0x0021c8b0 MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV qword ptr [RAX + 0x70],RCX MOV RDI,qword ptr [RSP + 0x18] MOVSXD RDX,dword ptr [RAX + 0x8] XOR ESI,ESI CALL 0x0021c880 MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV qword ptr [RAX + 0x78],RCX MOV RDI,qword ptr [RSP + 0x18] MOVSXD RDX,dword ptr [RAX + 0x8] XOR ESI,ESI CALL 0x0021c880 MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV qword ptr [RAX + 0x80],RCX MOV RDI,qword ptr [RSP + 0x18] MOVSXD RDX,dword ptr [RAX + 0x8] XOR ESI,ESI CALL 0x0021c880 MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV qword ptr [RAX + 0x88],RCX ADD RSP,0x28 RET
/* ResidualAttentionBlock::init_params(ggml_context*, ggml_allocr*, ggml_type) */ void __thiscall ResidualAttentionBlock::init_params (ResidualAttentionBlock *this,int8 param_1,int8 param_3,int4 param_4) { int8 uVar1; uVar1 = ggml_new_tensor_1d(param_1,0,(long)*(int *)(this + 8)); *(int8 *)(this + 0x50) = uVar1; uVar1 = ggml_new_tensor_1d(param_1,0,(long)*(int *)(this + 8)); *(int8 *)(this + 0x58) = uVar1; uVar1 = ggml_new_tensor_2d(param_1,param_4,(long)*(int *)(this + 8),(long)*(int *)(this + 8)); *(int8 *)(this + 0x10) = uVar1; uVar1 = ggml_new_tensor_1d(param_1,0,(long)*(int *)(this + 8)); *(int8 *)(this + 0x18) = uVar1; uVar1 = ggml_new_tensor_2d(param_1,param_4,(long)*(int *)(this + 8),(long)*(int *)(this + 8)); *(int8 *)(this + 0x20) = uVar1; uVar1 = ggml_new_tensor_1d(param_1,0,(long)*(int *)(this + 8)); *(int8 *)(this + 0x28) = uVar1; uVar1 = ggml_new_tensor_2d(param_1,param_4,(long)*(int *)(this + 8),(long)*(int *)(this + 8)); *(int8 *)(this + 0x30) = uVar1; uVar1 = ggml_new_tensor_1d(param_1,0,(long)*(int *)(this + 8)); *(int8 *)(this + 0x38) = uVar1; uVar1 = ggml_new_tensor_2d(param_1,param_4,(long)*(int *)(this + 8),(long)*(int *)(this + 8)); *(int8 *)(this + 0x40) = uVar1; uVar1 = ggml_new_tensor_1d(param_1,0,(long)*(int *)(this + 8)); *(int8 *)(this + 0x48) = uVar1; uVar1 = ggml_new_tensor_2d(param_1,param_4,(long)*(int *)(this + 8),(long)*(int *)(this + 0xc)); *(int8 *)(this + 0x60) = uVar1; uVar1 = ggml_new_tensor_1d(param_1,0,(long)*(int *)(this + 0xc)); *(int8 *)(this + 0x68) = uVar1; uVar1 = ggml_new_tensor_2d(param_1,param_4,(long)*(int *)(this + 0xc),(long)*(int *)(this + 8)); *(int8 *)(this + 0x70) = uVar1; uVar1 = ggml_new_tensor_1d(param_1,0,(long)*(int *)(this + 8)); *(int8 *)(this + 0x78) = uVar1; uVar1 = ggml_new_tensor_1d(param_1,0,(long)*(int *)(this + 8)); *(int8 *)(this + 0x80) = uVar1; uVar1 = ggml_new_tensor_1d(param_1,0,(long)*(int *)(this + 8)); *(int8 *)(this + 0x88) = uVar1; return; }
55,212
ResidualAttentionBlock::init_params(ggml_context*, ggml_allocr*, ggml_type)
7CodeWizard[P]stablediffusion/clip.hpp
void init_params(struct ggml_context* ctx, ggml_allocr* alloc, ggml_type wtype) { ln1_w = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, hidden_size); ln1_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, hidden_size); q_w = ggml_new_tensor_2d(ctx, wtype, hidden_size, hidden_size); q_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, hidden_size); k_w = ggml_new_tensor_2d(ctx, wtype, hidden_size, hidden_size); k_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, hidden_size); v_w = ggml_new_tensor_2d(ctx, wtype, hidden_size, hidden_size); v_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, hidden_size); out_w = ggml_new_tensor_2d(ctx, wtype, hidden_size, hidden_size); out_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, hidden_size); fc1_w = ggml_new_tensor_2d(ctx, wtype, hidden_size, intermediate_size); fc1_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, intermediate_size); fc2_w = ggml_new_tensor_2d(ctx, wtype, intermediate_size, hidden_size); fc2_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, hidden_size); ln2_w = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, hidden_size); ln2_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, hidden_size); }
O1
cpp
ResidualAttentionBlock::init_params(ggml_context*, ggml_allocr*, ggml_type): pushq %rbp pushq %r14 pushq %rbx movl %ecx, %ebp movq %rsi, %r14 movq %rdi, %rbx movslq 0x8(%rdi), %rdx movq %rsi, %rdi xorl %esi, %esi callq 0x8ec3c movq %rax, 0x50(%rbx) movslq 0x8(%rbx), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x8ec3c movq %rax, 0x58(%rbx) movslq 0x8(%rbx), %rcx movq %r14, %rdi movl %ebp, %esi movq %rcx, %rdx callq 0x8ec55 movq %rax, 0x10(%rbx) movslq 0x8(%rbx), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x8ec3c movq %rax, 0x18(%rbx) movslq 0x8(%rbx), %rcx movq %r14, %rdi movl %ebp, %esi movq %rcx, %rdx callq 0x8ec55 movq %rax, 0x20(%rbx) movslq 0x8(%rbx), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x8ec3c movq %rax, 0x28(%rbx) movslq 0x8(%rbx), %rcx movq %r14, %rdi movl %ebp, %esi movq %rcx, %rdx callq 0x8ec55 movq %rax, 0x30(%rbx) movslq 0x8(%rbx), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x8ec3c movq %rax, 0x38(%rbx) movslq 0x8(%rbx), %rcx movq %r14, %rdi movl %ebp, %esi movq %rcx, %rdx callq 0x8ec55 movq %rax, 0x40(%rbx) movslq 0x8(%rbx), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x8ec3c movq %rax, 0x48(%rbx) movslq 0x8(%rbx), %rdx movslq 0xc(%rbx), %rcx movq %r14, %rdi movl %ebp, %esi callq 0x8ec55 movq %rax, 0x60(%rbx) movslq 0xc(%rbx), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x8ec3c movq %rax, 0x68(%rbx) movslq 0xc(%rbx), %rdx movslq 0x8(%rbx), %rcx movq %r14, %rdi movl %ebp, %esi callq 0x8ec55 movq %rax, 0x70(%rbx) movslq 0x8(%rbx), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x8ec3c movq %rax, 0x78(%rbx) movslq 0x8(%rbx), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x8ec3c movq %rax, 0x80(%rbx) movslq 0x8(%rbx), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x8ec3c movq %rax, 0x88(%rbx) popq %rbx popq %r14 popq %rbp retq nop
_ZN22ResidualAttentionBlock11init_paramsEP12ggml_contextP11ggml_allocr9ggml_type: push rbp push r14 push rbx mov ebp, ecx mov r14, rsi mov rbx, rdi movsxd rdx, dword ptr [rdi+8] mov rdi, rsi xor esi, esi call ggml_new_tensor_1d mov [rbx+50h], rax movsxd rdx, dword ptr [rbx+8] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [rbx+58h], rax movsxd rcx, dword ptr [rbx+8] mov rdi, r14 mov esi, ebp mov rdx, rcx call ggml_new_tensor_2d mov [rbx+10h], rax movsxd rdx, dword ptr [rbx+8] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [rbx+18h], rax movsxd rcx, dword ptr [rbx+8] mov rdi, r14 mov esi, ebp mov rdx, rcx call ggml_new_tensor_2d mov [rbx+20h], rax movsxd rdx, dword ptr [rbx+8] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [rbx+28h], rax movsxd rcx, dword ptr [rbx+8] mov rdi, r14 mov esi, ebp mov rdx, rcx call ggml_new_tensor_2d mov [rbx+30h], rax movsxd rdx, dword ptr [rbx+8] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [rbx+38h], rax movsxd rcx, dword ptr [rbx+8] mov rdi, r14 mov esi, ebp mov rdx, rcx call ggml_new_tensor_2d mov [rbx+40h], rax movsxd rdx, dword ptr [rbx+8] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [rbx+48h], rax movsxd rdx, dword ptr [rbx+8] movsxd rcx, dword ptr [rbx+0Ch] mov rdi, r14 mov esi, ebp call ggml_new_tensor_2d mov [rbx+60h], rax movsxd rdx, dword ptr [rbx+0Ch] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [rbx+68h], rax movsxd rdx, dword ptr [rbx+0Ch] movsxd rcx, dword ptr [rbx+8] mov rdi, r14 mov esi, ebp call ggml_new_tensor_2d mov [rbx+70h], rax movsxd rdx, dword ptr [rbx+8] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [rbx+78h], rax movsxd rdx, dword ptr [rbx+8] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [rbx+80h], rax movsxd rdx, dword ptr [rbx+8] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [rbx+88h], rax pop rbx pop r14 pop rbp retn
long long ResidualAttentionBlock::init_params(long long a1, long long a2, long long a3, unsigned int a4) { long long result; // rax *(_QWORD *)(a1 + 80) = ggml_new_tensor_1d(a2, 0LL, *(int *)(a1 + 8)); *(_QWORD *)(a1 + 88) = ggml_new_tensor_1d(a2, 0LL, *(int *)(a1 + 8)); *(_QWORD *)(a1 + 16) = ggml_new_tensor_2d(a2, a4, *(int *)(a1 + 8), *(int *)(a1 + 8)); *(_QWORD *)(a1 + 24) = ggml_new_tensor_1d(a2, 0LL, *(int *)(a1 + 8)); *(_QWORD *)(a1 + 32) = ggml_new_tensor_2d(a2, a4, *(int *)(a1 + 8), *(int *)(a1 + 8)); *(_QWORD *)(a1 + 40) = ggml_new_tensor_1d(a2, 0LL, *(int *)(a1 + 8)); *(_QWORD *)(a1 + 48) = ggml_new_tensor_2d(a2, a4, *(int *)(a1 + 8), *(int *)(a1 + 8)); *(_QWORD *)(a1 + 56) = ggml_new_tensor_1d(a2, 0LL, *(int *)(a1 + 8)); *(_QWORD *)(a1 + 64) = ggml_new_tensor_2d(a2, a4, *(int *)(a1 + 8), *(int *)(a1 + 8)); *(_QWORD *)(a1 + 72) = ggml_new_tensor_1d(a2, 0LL, *(int *)(a1 + 8)); *(_QWORD *)(a1 + 96) = ggml_new_tensor_2d(a2, a4, *(int *)(a1 + 8), *(int *)(a1 + 12)); *(_QWORD *)(a1 + 104) = ggml_new_tensor_1d(a2, 0LL, *(int *)(a1 + 12)); *(_QWORD *)(a1 + 112) = ggml_new_tensor_2d(a2, a4, *(int *)(a1 + 12), *(int *)(a1 + 8)); *(_QWORD *)(a1 + 120) = ggml_new_tensor_1d(a2, 0LL, *(int *)(a1 + 8)); *(_QWORD *)(a1 + 128) = ggml_new_tensor_1d(a2, 0LL, *(int *)(a1 + 8)); result = ggml_new_tensor_1d(a2, 0LL, *(int *)(a1 + 8)); *(_QWORD *)(a1 + 136) = result; return result; }
55,213
ResidualAttentionBlock::init_params(ggml_context*, ggml_allocr*, ggml_type)
7CodeWizard[P]stablediffusion/clip.hpp
void init_params(struct ggml_context* ctx, ggml_allocr* alloc, ggml_type wtype) { ln1_w = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, hidden_size); ln1_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, hidden_size); q_w = ggml_new_tensor_2d(ctx, wtype, hidden_size, hidden_size); q_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, hidden_size); k_w = ggml_new_tensor_2d(ctx, wtype, hidden_size, hidden_size); k_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, hidden_size); v_w = ggml_new_tensor_2d(ctx, wtype, hidden_size, hidden_size); v_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, hidden_size); out_w = ggml_new_tensor_2d(ctx, wtype, hidden_size, hidden_size); out_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, hidden_size); fc1_w = ggml_new_tensor_2d(ctx, wtype, hidden_size, intermediate_size); fc1_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, intermediate_size); fc2_w = ggml_new_tensor_2d(ctx, wtype, intermediate_size, hidden_size); fc2_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, hidden_size); ln2_w = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, hidden_size); ln2_b = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, hidden_size); }
O2
cpp
ResidualAttentionBlock::init_params(ggml_context*, ggml_allocr*, ggml_type): pushq %rbp pushq %r14 pushq %rbx movl %ecx, %ebp movq %rsi, %r14 movq %rdi, %rbx movslq 0x8(%rdi), %rdx movq %rsi, %rdi xorl %esi, %esi callq 0x68616 movq %rax, 0x50(%rbx) movslq 0x8(%rbx), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x68616 movq %rax, 0x58(%rbx) movslq 0x8(%rbx), %rcx movq %r14, %rdi movl %ebp, %esi movq %rcx, %rdx callq 0x68627 movq %rax, 0x10(%rbx) movslq 0x8(%rbx), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x68616 movq %rax, 0x18(%rbx) movslq 0x8(%rbx), %rcx movq %r14, %rdi movl %ebp, %esi movq %rcx, %rdx callq 0x68627 movq %rax, 0x20(%rbx) movslq 0x8(%rbx), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x68616 movq %rax, 0x28(%rbx) movslq 0x8(%rbx), %rcx movq %r14, %rdi movl %ebp, %esi movq %rcx, %rdx callq 0x68627 movq %rax, 0x30(%rbx) movslq 0x8(%rbx), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x68616 movq %rax, 0x38(%rbx) movslq 0x8(%rbx), %rcx movq %r14, %rdi movl %ebp, %esi movq %rcx, %rdx callq 0x68627 movq %rax, 0x40(%rbx) movslq 0x8(%rbx), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x68616 movq %rax, 0x48(%rbx) movslq 0x8(%rbx), %rdx movslq 0xc(%rbx), %rcx movq %r14, %rdi movl %ebp, %esi callq 0x68627 movq %rax, 0x60(%rbx) movslq 0xc(%rbx), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x68616 movq %rax, 0x68(%rbx) movslq 0xc(%rbx), %rdx movslq 0x8(%rbx), %rcx movq %r14, %rdi movl %ebp, %esi callq 0x68627 movq %rax, 0x70(%rbx) movslq 0x8(%rbx), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x68616 movq %rax, 0x78(%rbx) movslq 0x8(%rbx), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x68616 movq %rax, 0x80(%rbx) movslq 0x8(%rbx), %rdx movq %r14, %rdi xorl %esi, %esi callq 0x68616 movq %rax, 0x88(%rbx) popq %rbx popq %r14 popq %rbp retq nop
_ZN22ResidualAttentionBlock11init_paramsEP12ggml_contextP11ggml_allocr9ggml_type: push rbp push r14 push rbx mov ebp, ecx mov r14, rsi mov rbx, rdi movsxd rdx, dword ptr [rdi+8] mov rdi, rsi xor esi, esi call ggml_new_tensor_1d mov [rbx+50h], rax movsxd rdx, dword ptr [rbx+8] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [rbx+58h], rax movsxd rcx, dword ptr [rbx+8] mov rdi, r14 mov esi, ebp mov rdx, rcx call ggml_new_tensor_2d mov [rbx+10h], rax movsxd rdx, dword ptr [rbx+8] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [rbx+18h], rax movsxd rcx, dword ptr [rbx+8] mov rdi, r14 mov esi, ebp mov rdx, rcx call ggml_new_tensor_2d mov [rbx+20h], rax movsxd rdx, dword ptr [rbx+8] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [rbx+28h], rax movsxd rcx, dword ptr [rbx+8] mov rdi, r14 mov esi, ebp mov rdx, rcx call ggml_new_tensor_2d mov [rbx+30h], rax movsxd rdx, dword ptr [rbx+8] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [rbx+38h], rax movsxd rcx, dword ptr [rbx+8] mov rdi, r14 mov esi, ebp mov rdx, rcx call ggml_new_tensor_2d mov [rbx+40h], rax movsxd rdx, dword ptr [rbx+8] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [rbx+48h], rax movsxd rdx, dword ptr [rbx+8] movsxd rcx, dword ptr [rbx+0Ch] mov rdi, r14 mov esi, ebp call ggml_new_tensor_2d mov [rbx+60h], rax movsxd rdx, dword ptr [rbx+0Ch] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [rbx+68h], rax movsxd rdx, dword ptr [rbx+0Ch] movsxd rcx, dword ptr [rbx+8] mov rdi, r14 mov esi, ebp call ggml_new_tensor_2d mov [rbx+70h], rax movsxd rdx, dword ptr [rbx+8] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [rbx+78h], rax movsxd rdx, dword ptr [rbx+8] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [rbx+80h], rax movsxd rdx, dword ptr [rbx+8] mov rdi, r14 xor esi, esi call ggml_new_tensor_1d mov [rbx+88h], rax pop rbx pop r14 pop rbp retn
long long ResidualAttentionBlock::init_params(long long a1, long long a2, long long a3, unsigned int a4) { long long result; // rax *(_QWORD *)(a1 + 80) = ggml_new_tensor_1d(a2, 0LL, *(int *)(a1 + 8)); *(_QWORD *)(a1 + 88) = ggml_new_tensor_1d(a2, 0LL, *(int *)(a1 + 8)); *(_QWORD *)(a1 + 16) = ggml_new_tensor_2d(a2, a4, *(int *)(a1 + 8), *(int *)(a1 + 8)); *(_QWORD *)(a1 + 24) = ggml_new_tensor_1d(a2, 0LL, *(int *)(a1 + 8)); *(_QWORD *)(a1 + 32) = ggml_new_tensor_2d(a2, a4, *(int *)(a1 + 8), *(int *)(a1 + 8)); *(_QWORD *)(a1 + 40) = ggml_new_tensor_1d(a2, 0LL, *(int *)(a1 + 8)); *(_QWORD *)(a1 + 48) = ggml_new_tensor_2d(a2, a4, *(int *)(a1 + 8), *(int *)(a1 + 8)); *(_QWORD *)(a1 + 56) = ggml_new_tensor_1d(a2, 0LL, *(int *)(a1 + 8)); *(_QWORD *)(a1 + 64) = ggml_new_tensor_2d(a2, a4, *(int *)(a1 + 8), *(int *)(a1 + 8)); *(_QWORD *)(a1 + 72) = ggml_new_tensor_1d(a2, 0LL, *(int *)(a1 + 8)); *(_QWORD *)(a1 + 96) = ggml_new_tensor_2d(a2, a4, *(int *)(a1 + 8), *(int *)(a1 + 12)); *(_QWORD *)(a1 + 104) = ggml_new_tensor_1d(a2, 0LL, *(int *)(a1 + 12)); *(_QWORD *)(a1 + 112) = ggml_new_tensor_2d(a2, a4, *(int *)(a1 + 12), *(int *)(a1 + 8)); *(_QWORD *)(a1 + 120) = ggml_new_tensor_1d(a2, 0LL, *(int *)(a1 + 8)); *(_QWORD *)(a1 + 128) = ggml_new_tensor_1d(a2, 0LL, *(int *)(a1 + 8)); result = ggml_new_tensor_1d(a2, 0LL, *(int *)(a1 + 8)); *(_QWORD *)(a1 + 136) = result; return result; }
init_params: PUSH RBP PUSH R14 PUSH RBX MOV EBP,ECX MOV R14,RSI MOV RBX,RDI MOVSXD RDX,dword ptr [RDI + 0x8] MOV RDI,RSI XOR ESI,ESI CALL 0x00168616 MOV qword ptr [RBX + 0x50],RAX MOVSXD RDX,dword ptr [RBX + 0x8] MOV RDI,R14 XOR ESI,ESI CALL 0x00168616 MOV qword ptr [RBX + 0x58],RAX MOVSXD RCX,dword ptr [RBX + 0x8] MOV RDI,R14 MOV ESI,EBP MOV RDX,RCX CALL 0x00168627 MOV qword ptr [RBX + 0x10],RAX MOVSXD RDX,dword ptr [RBX + 0x8] MOV RDI,R14 XOR ESI,ESI CALL 0x00168616 MOV qword ptr [RBX + 0x18],RAX MOVSXD RCX,dword ptr [RBX + 0x8] MOV RDI,R14 MOV ESI,EBP MOV RDX,RCX CALL 0x00168627 MOV qword ptr [RBX + 0x20],RAX MOVSXD RDX,dword ptr [RBX + 0x8] MOV RDI,R14 XOR ESI,ESI CALL 0x00168616 MOV qword ptr [RBX + 0x28],RAX MOVSXD RCX,dword ptr [RBX + 0x8] MOV RDI,R14 MOV ESI,EBP MOV RDX,RCX CALL 0x00168627 MOV qword ptr [RBX + 0x30],RAX MOVSXD RDX,dword ptr [RBX + 0x8] MOV RDI,R14 XOR ESI,ESI CALL 0x00168616 MOV qword ptr [RBX + 0x38],RAX MOVSXD RCX,dword ptr [RBX + 0x8] MOV RDI,R14 MOV ESI,EBP MOV RDX,RCX CALL 0x00168627 MOV qword ptr [RBX + 0x40],RAX MOVSXD RDX,dword ptr [RBX + 0x8] MOV RDI,R14 XOR ESI,ESI CALL 0x00168616 MOV qword ptr [RBX + 0x48],RAX MOVSXD RDX,dword ptr [RBX + 0x8] MOVSXD RCX,dword ptr [RBX + 0xc] MOV RDI,R14 MOV ESI,EBP CALL 0x00168627 MOV qword ptr [RBX + 0x60],RAX MOVSXD RDX,dword ptr [RBX + 0xc] MOV RDI,R14 XOR ESI,ESI CALL 0x00168616 MOV qword ptr [RBX + 0x68],RAX MOVSXD RDX,dword ptr [RBX + 0xc] MOVSXD RCX,dword ptr [RBX + 0x8] MOV RDI,R14 MOV ESI,EBP CALL 0x00168627 MOV qword ptr [RBX + 0x70],RAX MOVSXD RDX,dword ptr [RBX + 0x8] MOV RDI,R14 XOR ESI,ESI CALL 0x00168616 MOV qword ptr [RBX + 0x78],RAX MOVSXD RDX,dword ptr [RBX + 0x8] MOV RDI,R14 XOR ESI,ESI CALL 0x00168616 MOV qword ptr [RBX + 0x80],RAX MOVSXD RDX,dword ptr [RBX + 0x8] MOV RDI,R14 XOR ESI,ESI CALL 0x00168616 MOV qword ptr [RBX + 0x88],RAX POP RBX POP R14 POP RBP RET
/* ResidualAttentionBlock::init_params(ggml_context*, ggml_allocr*, ggml_type) */ void __thiscall ResidualAttentionBlock::init_params (ResidualAttentionBlock *this,int8 param_1,int8 param_3,int4 param_4) { int8 uVar1; uVar1 = ggml_new_tensor_1d(param_1,0,(long)*(int *)(this + 8)); *(int8 *)(this + 0x50) = uVar1; uVar1 = ggml_new_tensor_1d(param_1,0,(long)*(int *)(this + 8)); *(int8 *)(this + 0x58) = uVar1; uVar1 = ggml_new_tensor_2d(param_1,param_4,(long)*(int *)(this + 8)); *(int8 *)(this + 0x10) = uVar1; uVar1 = ggml_new_tensor_1d(param_1,0,(long)*(int *)(this + 8)); *(int8 *)(this + 0x18) = uVar1; uVar1 = ggml_new_tensor_2d(param_1,param_4,(long)*(int *)(this + 8)); *(int8 *)(this + 0x20) = uVar1; uVar1 = ggml_new_tensor_1d(param_1,0,(long)*(int *)(this + 8)); *(int8 *)(this + 0x28) = uVar1; uVar1 = ggml_new_tensor_2d(param_1,param_4,(long)*(int *)(this + 8)); *(int8 *)(this + 0x30) = uVar1; uVar1 = ggml_new_tensor_1d(param_1,0,(long)*(int *)(this + 8)); *(int8 *)(this + 0x38) = uVar1; uVar1 = ggml_new_tensor_2d(param_1,param_4,(long)*(int *)(this + 8)); *(int8 *)(this + 0x40) = uVar1; uVar1 = ggml_new_tensor_1d(param_1,0,(long)*(int *)(this + 8)); *(int8 *)(this + 0x48) = uVar1; uVar1 = ggml_new_tensor_2d(param_1,param_4,(long)*(int *)(this + 8),(long)*(int *)(this + 0xc)); *(int8 *)(this + 0x60) = uVar1; uVar1 = ggml_new_tensor_1d(param_1,0,(long)*(int *)(this + 0xc)); *(int8 *)(this + 0x68) = uVar1; uVar1 = ggml_new_tensor_2d(param_1,param_4,(long)*(int *)(this + 0xc),(long)*(int *)(this + 8)); *(int8 *)(this + 0x70) = uVar1; uVar1 = ggml_new_tensor_1d(param_1,0,(long)*(int *)(this + 8)); *(int8 *)(this + 0x78) = uVar1; uVar1 = ggml_new_tensor_1d(param_1,0,(long)*(int *)(this + 8)); *(int8 *)(this + 0x80) = uVar1; uVar1 = ggml_new_tensor_1d(param_1,0,(long)*(int *)(this + 8)); *(int8 *)(this + 0x88) = uVar1; return; }
55,214
LefDefParser::defiSlot::addRect(int, int, int, int)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiSlot.cpp
void defiSlot::addRect(int xl, int yl, int xh, int yh) { if (numRectangles_ == rectsAllocated_) { int i; int max = rectsAllocated_ = rectsAllocated_ * 2; int* newxl = (int*)malloc(sizeof(int)*max); int* newyl = (int*)malloc(sizeof(int)*max); int* newxh = (int*)malloc(sizeof(int)*max); int* newyh = (int*)malloc(sizeof(int)*max); for (i = 0; i < numRectangles_; i++) { newxl[i] = xl_[i]; newyl[i] = yl_[i]; newxh[i] = xh_[i]; newyh[i] = yh_[i]; } free((char*)(xl_)); free((char*)(yl_)); free((char*)(xh_)); free((char*)(yh_)); xl_ = newxl; yl_ = newyl; xh_ = newxh; yh_ = newyh; } xl_[numRectangles_] = xl; yl_[numRectangles_] = yl; xh_[numRectangles_] = xh; yh_[numRectangles_] = yh; numRectangles_ += 1; }
O0
cpp
LefDefParser::defiSlot::addRect(int, int, int, int): subq $0x48, %rsp movq %rdi, 0x40(%rsp) movl %esi, 0x3c(%rsp) movl %edx, 0x38(%rsp) movl %ecx, 0x34(%rsp) movl %r8d, 0x30(%rsp) movq 0x40(%rsp), %rcx movq %rcx, (%rsp) movl 0x14(%rcx), %eax cmpl 0x18(%rcx), %eax jne 0x4c404 movq (%rsp), %rcx movl 0x18(%rcx), %eax shll %eax movl %eax, 0x18(%rcx) movl %eax, 0x28(%rsp) movslq 0x28(%rsp), %rdi shlq $0x2, %rdi callq 0x72d0 movq %rax, 0x20(%rsp) movslq 0x28(%rsp), %rdi shlq $0x2, %rdi callq 0x72d0 movq %rax, 0x18(%rsp) movslq 0x28(%rsp), %rdi shlq $0x2, %rdi callq 0x72d0 movq %rax, 0x10(%rsp) movslq 0x28(%rsp), %rdi shlq $0x2, %rdi callq 0x72d0 movq %rax, 0x8(%rsp) movl $0x0, 0x2c(%rsp) movq (%rsp), %rcx movl 0x2c(%rsp), %eax cmpl 0x14(%rcx), %eax jge 0x4c3a8 movq (%rsp), %rax movq 0x20(%rax), %rcx movslq 0x2c(%rsp), %rdx movl (%rcx,%rdx,4), %esi movq 0x20(%rsp), %rcx movslq 0x2c(%rsp), %rdx movl %esi, (%rcx,%rdx,4) movq 0x28(%rax), %rcx movslq 0x2c(%rsp), %rdx movl (%rcx,%rdx,4), %esi movq 0x18(%rsp), %rcx movslq 0x2c(%rsp), %rdx movl %esi, (%rcx,%rdx,4) movq 0x30(%rax), %rcx movslq 0x2c(%rsp), %rdx movl (%rcx,%rdx,4), %esi movq 0x10(%rsp), %rcx movslq 0x2c(%rsp), %rdx movl %esi, (%rcx,%rdx,4) movq 0x38(%rax), %rax movslq 0x2c(%rsp), %rcx movl (%rax,%rcx,4), %edx movq 0x8(%rsp), %rax movslq 0x2c(%rsp), %rcx movl %edx, (%rax,%rcx,4) movl 0x2c(%rsp), %eax addl $0x1, %eax movl %eax, 0x2c(%rsp) jmp 0x4c323 movq (%rsp), %rax movq 0x20(%rax), %rdi callq 0x72a0 movq (%rsp), %rax movq 0x28(%rax), %rdi callq 0x72a0 movq (%rsp), %rax movq 0x30(%rax), %rdi callq 0x72a0 movq (%rsp), %rax movq 0x38(%rax), %rdi callq 0x72a0 movq (%rsp), %rax movq 0x20(%rsp), %rcx movq %rcx, 0x20(%rax) movq 0x18(%rsp), %rcx movq %rcx, 0x28(%rax) movq 0x10(%rsp), %rcx movq %rcx, 0x30(%rax) movq 0x8(%rsp), %rcx movq %rcx, 0x38(%rax) movq (%rsp), %rax movl 0x3c(%rsp), %esi movq 0x20(%rax), %rcx movslq 0x14(%rax), %rdx movl %esi, (%rcx,%rdx,4) movl 0x38(%rsp), %esi movq 0x28(%rax), %rcx movslq 0x14(%rax), %rdx movl %esi, (%rcx,%rdx,4) movl 0x34(%rsp), %esi movq 0x30(%rax), %rcx movslq 0x14(%rax), %rdx movl %esi, (%rcx,%rdx,4) movl 0x30(%rsp), %esi movq 0x38(%rax), %rcx movslq 0x14(%rax), %rdx movl %esi, (%rcx,%rdx,4) movl 0x14(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x14(%rax) addq $0x48, %rsp retq nopw %cs:(%rax,%rax)
_ZN12LefDefParser8defiSlot7addRectEiiii: sub rsp, 48h mov [rsp+48h+var_8], rdi mov [rsp+48h+var_C], esi mov [rsp+48h+var_10], edx mov [rsp+48h+var_14], ecx mov [rsp+48h+var_18], r8d mov rcx, [rsp+48h+var_8] mov [rsp+48h+var_48], rcx mov eax, [rcx+14h] cmp eax, [rcx+18h] jnz loc_4C404 mov rcx, [rsp+48h+var_48] mov eax, [rcx+18h] shl eax, 1 mov [rcx+18h], eax mov [rsp+48h+var_20], eax movsxd rdi, [rsp+48h+var_20] shl rdi, 2 call _malloc mov [rsp+48h+var_28], rax movsxd rdi, [rsp+48h+var_20] shl rdi, 2 call _malloc mov [rsp+48h+var_30], rax movsxd rdi, [rsp+48h+var_20] shl rdi, 2 call _malloc mov [rsp+48h+var_38], rax movsxd rdi, [rsp+48h+var_20] shl rdi, 2 call _malloc mov [rsp+48h+var_40], rax mov [rsp+48h+var_1C], 0 loc_4C323: mov rcx, [rsp+48h+var_48] mov eax, [rsp+48h+var_1C] cmp eax, [rcx+14h] jge short loc_4C3A8 mov rax, [rsp+48h+var_48] mov rcx, [rax+20h] movsxd rdx, [rsp+48h+var_1C] mov esi, [rcx+rdx*4] mov rcx, [rsp+48h+var_28] movsxd rdx, [rsp+48h+var_1C] mov [rcx+rdx*4], esi mov rcx, [rax+28h] movsxd rdx, [rsp+48h+var_1C] mov esi, [rcx+rdx*4] mov rcx, [rsp+48h+var_30] movsxd rdx, [rsp+48h+var_1C] mov [rcx+rdx*4], esi mov rcx, [rax+30h] movsxd rdx, [rsp+48h+var_1C] mov esi, [rcx+rdx*4] mov rcx, [rsp+48h+var_38] movsxd rdx, [rsp+48h+var_1C] mov [rcx+rdx*4], esi mov rax, [rax+38h] movsxd rcx, [rsp+48h+var_1C] mov edx, [rax+rcx*4] mov rax, [rsp+48h+var_40] movsxd rcx, [rsp+48h+var_1C] mov [rax+rcx*4], edx mov eax, [rsp+48h+var_1C] add eax, 1 mov [rsp+48h+var_1C], eax jmp loc_4C323 loc_4C3A8: mov rax, [rsp+48h+var_48] mov rdi, [rax+20h] call _free mov rax, [rsp+48h+var_48] mov rdi, [rax+28h] call _free mov rax, [rsp+48h+var_48] mov rdi, [rax+30h] call _free mov rax, [rsp+48h+var_48] mov rdi, [rax+38h] call _free mov rax, [rsp+48h+var_48] mov rcx, [rsp+48h+var_28] mov [rax+20h], rcx mov rcx, [rsp+48h+var_30] mov [rax+28h], rcx mov rcx, [rsp+48h+var_38] mov [rax+30h], rcx mov rcx, [rsp+48h+var_40] mov [rax+38h], rcx loc_4C404: mov rax, [rsp+48h+var_48] mov esi, [rsp+48h+var_C] mov rcx, [rax+20h] movsxd rdx, dword ptr [rax+14h] mov [rcx+rdx*4], esi mov esi, [rsp+48h+var_10] mov rcx, [rax+28h] movsxd rdx, dword ptr [rax+14h] mov [rcx+rdx*4], esi mov esi, [rsp+48h+var_14] mov rcx, [rax+30h] movsxd rdx, dword ptr [rax+14h] mov [rcx+rdx*4], esi mov esi, [rsp+48h+var_18] mov rcx, [rax+38h] movsxd rdx, dword ptr [rax+14h] mov [rcx+rdx*4], esi mov ecx, [rax+14h] add ecx, 1 mov [rax+14h], ecx add rsp, 48h retn
LefDefParser::defiSlot * LefDefParser::defiSlot::addRect( LefDefParser::defiSlot *this, int a2, int a3, int a4, int a5) { int v5; // eax LefDefParser::defiSlot *result; // rax long long v7; // [rsp+8h] [rbp-40h] long long v8; // [rsp+10h] [rbp-38h] long long v9; // [rsp+18h] [rbp-30h] long long v10; // [rsp+20h] [rbp-28h] int v11; // [rsp+28h] [rbp-20h] int i; // [rsp+2Ch] [rbp-1Ch] if ( *((_DWORD *)this + 5) == *((_DWORD *)this + 6) ) { v5 = 2 * *((_DWORD *)this + 6); *((_DWORD *)this + 6) = v5; v11 = v5; v10 = malloc(4LL * v5); v9 = malloc(4LL * v11); v8 = malloc(4LL * v11); v7 = malloc(4LL * v11); for ( i = 0; i < *((_DWORD *)this + 5); ++i ) { *(_DWORD *)(v10 + 4LL * i) = *(_DWORD *)(*((_QWORD *)this + 4) + 4LL * i); *(_DWORD *)(v9 + 4LL * i) = *(_DWORD *)(*((_QWORD *)this + 5) + 4LL * i); *(_DWORD *)(v8 + 4LL * i) = *(_DWORD *)(*((_QWORD *)this + 6) + 4LL * i); *(_DWORD *)(v7 + 4LL * i) = *(_DWORD *)(*((_QWORD *)this + 7) + 4LL * i); } free(*((_QWORD *)this + 4)); free(*((_QWORD *)this + 5)); free(*((_QWORD *)this + 6)); free(*((_QWORD *)this + 7)); *((_QWORD *)this + 4) = v10; *((_QWORD *)this + 5) = v9; *((_QWORD *)this + 6) = v8; *((_QWORD *)this + 7) = v7; } result = this; *(_DWORD *)(*((_QWORD *)this + 4) + 4LL * *((int *)this + 5)) = a2; *(_DWORD *)(*((_QWORD *)this + 5) + 4LL * *((int *)this + 5)) = a3; *(_DWORD *)(*((_QWORD *)this + 6) + 4LL * *((int *)this + 5)) = a4; *(_DWORD *)(*((_QWORD *)this + 7) + 4LL * (int)(*((_DWORD *)this + 5))++) = a5; return result; }
addRect: SUB RSP,0x48 MOV qword ptr [RSP + 0x40],RDI MOV dword ptr [RSP + 0x3c],ESI MOV dword ptr [RSP + 0x38],EDX MOV dword ptr [RSP + 0x34],ECX MOV dword ptr [RSP + 0x30],R8D MOV RCX,qword ptr [RSP + 0x40] MOV qword ptr [RSP],RCX MOV EAX,dword ptr [RCX + 0x14] CMP EAX,dword ptr [RCX + 0x18] JNZ 0x0014c404 MOV RCX,qword ptr [RSP] MOV EAX,dword ptr [RCX + 0x18] SHL EAX,0x1 MOV dword ptr [RCX + 0x18],EAX MOV dword ptr [RSP + 0x28],EAX MOVSXD RDI,dword ptr [RSP + 0x28] SHL RDI,0x2 CALL 0x001072d0 MOV qword ptr [RSP + 0x20],RAX MOVSXD RDI,dword ptr [RSP + 0x28] SHL RDI,0x2 CALL 0x001072d0 MOV qword ptr [RSP + 0x18],RAX MOVSXD RDI,dword ptr [RSP + 0x28] SHL RDI,0x2 CALL 0x001072d0 MOV qword ptr [RSP + 0x10],RAX MOVSXD RDI,dword ptr [RSP + 0x28] SHL RDI,0x2 CALL 0x001072d0 MOV qword ptr [RSP + 0x8],RAX MOV dword ptr [RSP + 0x2c],0x0 LAB_0014c323: MOV RCX,qword ptr [RSP] MOV EAX,dword ptr [RSP + 0x2c] CMP EAX,dword ptr [RCX + 0x14] JGE 0x0014c3a8 MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RAX + 0x20] MOVSXD RDX,dword ptr [RSP + 0x2c] MOV ESI,dword ptr [RCX + RDX*0x4] MOV RCX,qword ptr [RSP + 0x20] MOVSXD RDX,dword ptr [RSP + 0x2c] MOV dword ptr [RCX + RDX*0x4],ESI MOV RCX,qword ptr [RAX + 0x28] MOVSXD RDX,dword ptr [RSP + 0x2c] MOV ESI,dword ptr [RCX + RDX*0x4] MOV RCX,qword ptr [RSP + 0x18] MOVSXD RDX,dword ptr [RSP + 0x2c] MOV dword ptr [RCX + RDX*0x4],ESI MOV RCX,qword ptr [RAX + 0x30] MOVSXD RDX,dword ptr [RSP + 0x2c] MOV ESI,dword ptr [RCX + RDX*0x4] MOV RCX,qword ptr [RSP + 0x10] MOVSXD RDX,dword ptr [RSP + 0x2c] MOV dword ptr [RCX + RDX*0x4],ESI MOV RAX,qword ptr [RAX + 0x38] MOVSXD RCX,dword ptr [RSP + 0x2c] MOV EDX,dword ptr [RAX + RCX*0x4] MOV RAX,qword ptr [RSP + 0x8] MOVSXD RCX,dword ptr [RSP + 0x2c] MOV dword ptr [RAX + RCX*0x4],EDX MOV EAX,dword ptr [RSP + 0x2c] ADD EAX,0x1 MOV dword ptr [RSP + 0x2c],EAX JMP 0x0014c323 LAB_0014c3a8: MOV RAX,qword ptr [RSP] MOV RDI,qword ptr [RAX + 0x20] CALL 0x001072a0 MOV RAX,qword ptr [RSP] MOV RDI,qword ptr [RAX + 0x28] CALL 0x001072a0 MOV RAX,qword ptr [RSP] MOV RDI,qword ptr [RAX + 0x30] CALL 0x001072a0 MOV RAX,qword ptr [RSP] MOV RDI,qword ptr [RAX + 0x38] CALL 0x001072a0 MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x20],RCX MOV RCX,qword ptr [RSP + 0x18] MOV qword ptr [RAX + 0x28],RCX MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x30],RCX MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x38],RCX LAB_0014c404: MOV RAX,qword ptr [RSP] MOV ESI,dword ptr [RSP + 0x3c] MOV RCX,qword ptr [RAX + 0x20] MOVSXD RDX,dword ptr [RAX + 0x14] MOV dword ptr [RCX + RDX*0x4],ESI MOV ESI,dword ptr [RSP + 0x38] MOV RCX,qword ptr [RAX + 0x28] MOVSXD RDX,dword ptr [RAX + 0x14] MOV dword ptr [RCX + RDX*0x4],ESI MOV ESI,dword ptr [RSP + 0x34] MOV RCX,qword ptr [RAX + 0x30] MOVSXD RDX,dword ptr [RAX + 0x14] MOV dword ptr [RCX + RDX*0x4],ESI MOV ESI,dword ptr [RSP + 0x30] MOV RCX,qword ptr [RAX + 0x38] MOVSXD RDX,dword ptr [RAX + 0x14] MOV dword ptr [RCX + RDX*0x4],ESI MOV ECX,dword ptr [RAX + 0x14] ADD ECX,0x1 MOV dword ptr [RAX + 0x14],ECX ADD RSP,0x48 RET
/* LefDefParser::defiSlot::addRect(int, int, int, int) */ void __thiscall LefDefParser::defiSlot::addRect(defiSlot *this,int param_1,int param_2,int param_3,int param_4) { int iVar1; void *pvVar2; void *pvVar3; void *pvVar4; void *pvVar5; int local_1c; if (*(int *)(this + 0x14) == *(int *)(this + 0x18)) { iVar1 = *(int *)(this + 0x18) << 1; *(int *)(this + 0x18) = iVar1; pvVar2 = malloc((long)iVar1 << 2); pvVar3 = malloc((long)iVar1 << 2); pvVar4 = malloc((long)iVar1 << 2); pvVar5 = malloc((long)iVar1 << 2); for (local_1c = 0; local_1c < *(int *)(this + 0x14); local_1c = local_1c + 1) { *(int4 *)((long)pvVar2 + (long)local_1c * 4) = *(int4 *)(*(long *)(this + 0x20) + (long)local_1c * 4); *(int4 *)((long)pvVar3 + (long)local_1c * 4) = *(int4 *)(*(long *)(this + 0x28) + (long)local_1c * 4); *(int4 *)((long)pvVar4 + (long)local_1c * 4) = *(int4 *)(*(long *)(this + 0x30) + (long)local_1c * 4); *(int4 *)((long)pvVar5 + (long)local_1c * 4) = *(int4 *)(*(long *)(this + 0x38) + (long)local_1c * 4); } free(*(void **)(this + 0x20)); free(*(void **)(this + 0x28)); free(*(void **)(this + 0x30)); free(*(void **)(this + 0x38)); *(void **)(this + 0x20) = pvVar2; *(void **)(this + 0x28) = pvVar3; *(void **)(this + 0x30) = pvVar4; *(void **)(this + 0x38) = pvVar5; } *(int *)(*(long *)(this + 0x20) + (long)*(int *)(this + 0x14) * 4) = param_1; *(int *)(*(long *)(this + 0x28) + (long)*(int *)(this + 0x14) * 4) = param_2; *(int *)(*(long *)(this + 0x30) + (long)*(int *)(this + 0x14) * 4) = param_3; *(int *)(*(long *)(this + 0x38) + (long)*(int *)(this + 0x14) * 4) = param_4; *(int *)(this + 0x14) = *(int *)(this + 0x14) + 1; return; }
55,215
LefDefParser::defiSlot::addRect(int, int, int, int)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiSlot.cpp
void defiSlot::addRect(int xl, int yl, int xh, int yh) { if (numRectangles_ == rectsAllocated_) { int i; int max = rectsAllocated_ = rectsAllocated_ * 2; int* newxl = (int*)malloc(sizeof(int)*max); int* newyl = (int*)malloc(sizeof(int)*max); int* newxh = (int*)malloc(sizeof(int)*max); int* newyh = (int*)malloc(sizeof(int)*max); for (i = 0; i < numRectangles_; i++) { newxl[i] = xl_[i]; newyl[i] = yl_[i]; newxh[i] = xh_[i]; newyh[i] = yh_[i]; } free((char*)(xl_)); free((char*)(yl_)); free((char*)(xh_)); free((char*)(yh_)); xl_ = newxl; yl_ = newyl; xh_ = newxh; yh_ = newyh; } xl_[numRectangles_] = xl; yl_[numRectangles_] = yl; xh_[numRectangles_] = xh; yh_[numRectangles_] = yh; numRectangles_ += 1; }
O3
cpp
LefDefParser::defiSlot::addRect(int, int, int, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %r14 movl 0x14(%rdi), %r12d cmpl 0x18(%rdi), %r12d jne 0x2cc8b movl %esi, 0x8(%rsp) movl %edx, 0xc(%rsp) movl %ecx, 0x10(%rsp) movl %r8d, 0x14(%rsp) movslq %r12d, %r15 leal (%r12,%r12), %eax movl %eax, 0x18(%r14) shlq $0x3, %r15 movq %r15, %rdi callq 0x6270 movq %rax, %r13 movq %r15, %rdi callq 0x6270 movq %rax, %rbx movq %r15, %rdi callq 0x6270 movq %rax, %rbp movq %r15, %rdi callq 0x6270 movq %rax, %r15 movq 0x20(%r14), %rdi testl %r12d, %r12d jle 0x2cc44 movq 0x28(%r14), %rax movq 0x30(%r14), %rcx movq 0x38(%r14), %rdx xorl %esi, %esi movl (%rdi,%rsi,4), %r8d movl %r8d, (%r13,%rsi,4) movl (%rax,%rsi,4), %r8d movl %r8d, (%rbx,%rsi,4) movl (%rcx,%rsi,4), %r8d movl %r8d, (%rbp,%rsi,4) movl (%rdx,%rsi,4), %r8d movl %r8d, (%r15,%rsi,4) incq %rsi cmpq %rsi, %r12 jne 0x2cc1a callq 0x6220 movq 0x28(%r14), %rdi callq 0x6220 movq 0x30(%r14), %rdi callq 0x6220 movq 0x38(%r14), %rdi callq 0x6220 movq %r13, 0x20(%r14) movq %rbx, 0x28(%r14) movq %rbp, 0x30(%r14) movq %r15, 0x38(%r14) movl 0x14(%r14), %r12d movl 0x14(%rsp), %r8d movl 0x10(%rsp), %ecx movl 0xc(%rsp), %edx movl 0x8(%rsp), %esi jmp 0x2cc9b movq 0x20(%r14), %r13 movq 0x28(%r14), %rbx movq 0x30(%r14), %rbp movq 0x38(%r14), %r15 movslq %r12d, %rax movl %esi, (%r13,%rax,4) movslq 0x14(%r14), %rax movl %edx, (%rbx,%rax,4) movslq 0x14(%r14), %rax movl %ecx, (%rbp,%rax,4) movslq 0x14(%r14), %rax movl %r8d, (%r15,%rax,4) incl 0x14(%r14) addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN12LefDefParser8defiSlot7addRectEiiii: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14, rdi mov r12d, [rdi+14h] cmp r12d, [rdi+18h] jnz loc_2CC8B mov [rsp+48h+var_40], esi mov [rsp+48h+var_3C], edx mov [rsp+48h+var_38], ecx mov [rsp+48h+var_34], r8d movsxd r15, r12d lea eax, [r12+r12] mov [r14+18h], eax shl r15, 3 mov rdi, r15 call _malloc mov r13, rax mov rdi, r15 call _malloc mov rbx, rax mov rdi, r15 call _malloc mov rbp, rax mov rdi, r15 call _malloc mov r15, rax mov rdi, [r14+20h] test r12d, r12d jle short loc_2CC44 mov rax, [r14+28h] mov rcx, [r14+30h] mov rdx, [r14+38h] xor esi, esi loc_2CC1A: mov r8d, [rdi+rsi*4] mov [r13+rsi*4+0], r8d mov r8d, [rax+rsi*4] mov [rbx+rsi*4], r8d mov r8d, [rcx+rsi*4] mov [rbp+rsi*4+0], r8d mov r8d, [rdx+rsi*4] mov [r15+rsi*4], r8d inc rsi cmp r12, rsi jnz short loc_2CC1A loc_2CC44: call _free mov rdi, [r14+28h] call _free mov rdi, [r14+30h] call _free mov rdi, [r14+38h] call _free mov [r14+20h], r13 mov [r14+28h], rbx mov [r14+30h], rbp mov [r14+38h], r15 mov r12d, [r14+14h] mov r8d, [rsp+48h+var_34] mov ecx, [rsp+48h+var_38] mov edx, [rsp+48h+var_3C] mov esi, [rsp+48h+var_40] jmp short loc_2CC9B loc_2CC8B: mov r13, [r14+20h] mov rbx, [r14+28h] mov rbp, [r14+30h] mov r15, [r14+38h] loc_2CC9B: movsxd rax, r12d mov [r13+rax*4+0], esi movsxd rax, dword ptr [r14+14h] mov [rbx+rax*4], edx movsxd rax, dword ptr [r14+14h] mov [rbp+rax*4+0], ecx movsxd rax, dword ptr [r14+14h] mov [r15+rax*4], r8d inc dword ptr [r14+14h] add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long LefDefParser::defiSlot::addRect(LefDefParser::defiSlot *this, int a2, int a3, int a4, int a5) { long long v6; // r12 long long v7; // r13 long long v8; // rbx long long v9; // rbp long long v10; // r15 long long v11; // rdi long long v12; // rax long long v13; // rcx long long v14; // rdx long long i; // rsi long long result; // rax int v17; // [rsp+8h] [rbp-40h] int v18; // [rsp+Ch] [rbp-3Ch] int v19; // [rsp+10h] [rbp-38h] int v20; // [rsp+14h] [rbp-34h] v6 = *((unsigned int *)this + 5); if ( (_DWORD)v6 == *((_DWORD *)this + 6) ) { v17 = a2; v18 = a3; v19 = a4; v20 = a5; *((_DWORD *)this + 6) = 2 * v6; v7 = malloc(8LL * (int)v6); v8 = malloc(8LL * (int)v6); v9 = malloc(8LL * (int)v6); v10 = malloc(8LL * (int)v6); v11 = *((_QWORD *)this + 4); if ( (int)v6 > 0 ) { v12 = *((_QWORD *)this + 5); v13 = *((_QWORD *)this + 6); v14 = *((_QWORD *)this + 7); for ( i = 0LL; i != v6; ++i ) { *(_DWORD *)(v7 + 4 * i) = *(_DWORD *)(v11 + 4 * i); *(_DWORD *)(v8 + 4 * i) = *(_DWORD *)(v12 + 4 * i); *(_DWORD *)(v9 + 4 * i) = *(_DWORD *)(v13 + 4 * i); *(_DWORD *)(v10 + 4 * i) = *(_DWORD *)(v14 + 4 * i); } } free(v11); free(*((_QWORD *)this + 5)); free(*((_QWORD *)this + 6)); free(*((_QWORD *)this + 7)); *((_QWORD *)this + 4) = v7; *((_QWORD *)this + 5) = v8; *((_QWORD *)this + 6) = v9; *((_QWORD *)this + 7) = v10; LODWORD(v6) = *((_DWORD *)this + 5); a5 = v20; a4 = v19; a3 = v18; a2 = v17; } else { v7 = *((_QWORD *)this + 4); v8 = *((_QWORD *)this + 5); v9 = *((_QWORD *)this + 6); v10 = *((_QWORD *)this + 7); } *(_DWORD *)(v7 + 4LL * (int)v6) = a2; *(_DWORD *)(v8 + 4LL * *((int *)this + 5)) = a3; *(_DWORD *)(v9 + 4LL * *((int *)this + 5)) = a4; result = *((int *)this + 5); *(_DWORD *)(v10 + 4 * result) = a5; ++*((_DWORD *)this + 5); return result; }
addRect: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14,RDI MOV R12D,dword ptr [RDI + 0x14] CMP R12D,dword ptr [RDI + 0x18] JNZ 0x0012cc8b MOV dword ptr [RSP + 0x8],ESI MOV dword ptr [RSP + 0xc],EDX MOV dword ptr [RSP + 0x10],ECX MOV dword ptr [RSP + 0x14],R8D MOVSXD R15,R12D LEA EAX,[R12 + R12*0x1] MOV dword ptr [R14 + 0x18],EAX SHL R15,0x3 MOV RDI,R15 CALL 0x00106270 MOV R13,RAX MOV RDI,R15 CALL 0x00106270 MOV RBX,RAX MOV RDI,R15 CALL 0x00106270 MOV RBP,RAX MOV RDI,R15 CALL 0x00106270 MOV R15,RAX MOV RDI,qword ptr [R14 + 0x20] TEST R12D,R12D JLE 0x0012cc44 MOV RAX,qword ptr [R14 + 0x28] MOV RCX,qword ptr [R14 + 0x30] MOV RDX,qword ptr [R14 + 0x38] XOR ESI,ESI LAB_0012cc1a: MOV R8D,dword ptr [RDI + RSI*0x4] MOV dword ptr [R13 + RSI*0x4],R8D MOV R8D,dword ptr [RAX + RSI*0x4] MOV dword ptr [RBX + RSI*0x4],R8D MOV R8D,dword ptr [RCX + RSI*0x4] MOV dword ptr [RBP + RSI*0x4],R8D MOV R8D,dword ptr [RDX + RSI*0x4] MOV dword ptr [R15 + RSI*0x4],R8D INC RSI CMP R12,RSI JNZ 0x0012cc1a LAB_0012cc44: CALL 0x00106220 MOV RDI,qword ptr [R14 + 0x28] CALL 0x00106220 MOV RDI,qword ptr [R14 + 0x30] CALL 0x00106220 MOV RDI,qword ptr [R14 + 0x38] CALL 0x00106220 MOV qword ptr [R14 + 0x20],R13 MOV qword ptr [R14 + 0x28],RBX MOV qword ptr [R14 + 0x30],RBP MOV qword ptr [R14 + 0x38],R15 MOV R12D,dword ptr [R14 + 0x14] MOV R8D,dword ptr [RSP + 0x14] MOV ECX,dword ptr [RSP + 0x10] MOV EDX,dword ptr [RSP + 0xc] MOV ESI,dword ptr [RSP + 0x8] JMP 0x0012cc9b LAB_0012cc8b: MOV R13,qword ptr [R14 + 0x20] MOV RBX,qword ptr [R14 + 0x28] MOV RBP,qword ptr [R14 + 0x30] MOV R15,qword ptr [R14 + 0x38] LAB_0012cc9b: MOVSXD RAX,R12D MOV dword ptr [R13 + RAX*0x4],ESI MOVSXD RAX,dword ptr [R14 + 0x14] MOV dword ptr [RBX + RAX*0x4],EDX MOVSXD RAX,dword ptr [R14 + 0x14] MOV dword ptr [RBP + RAX*0x4],ECX MOVSXD RAX,dword ptr [R14 + 0x14] MOV dword ptr [R15 + RAX*0x4],R8D INC dword ptr [R14 + 0x14] ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* LefDefParser::defiSlot::addRect(int, int, int, int) */ void __thiscall LefDefParser::defiSlot::addRect(defiSlot *this,int param_1,int param_2,int param_3,int param_4) { void *__ptr; long lVar1; long lVar2; long lVar3; void *pvVar4; void *pvVar5; void *pvVar6; void *pvVar7; ulong uVar8; uint uVar9; size_t __size; uVar9 = *(uint *)(this + 0x14); if (uVar9 == *(uint *)(this + 0x18)) { *(uint *)(this + 0x18) = uVar9 * 2; __size = (long)(int)uVar9 << 3; pvVar4 = malloc(__size); pvVar5 = malloc(__size); pvVar6 = malloc(__size); pvVar7 = malloc(__size); __ptr = *(void **)(this + 0x20); if (0 < (int)uVar9) { lVar1 = *(long *)(this + 0x28); lVar2 = *(long *)(this + 0x30); lVar3 = *(long *)(this + 0x38); uVar8 = 0; do { *(int4 *)((long)pvVar4 + uVar8 * 4) = *(int4 *)((long)__ptr + uVar8 * 4); *(int4 *)((long)pvVar5 + uVar8 * 4) = *(int4 *)(lVar1 + uVar8 * 4); *(int4 *)((long)pvVar6 + uVar8 * 4) = *(int4 *)(lVar2 + uVar8 * 4); *(int4 *)((long)pvVar7 + uVar8 * 4) = *(int4 *)(lVar3 + uVar8 * 4); uVar8 = uVar8 + 1; } while (uVar9 != uVar8); } free(__ptr); free(*(void **)(this + 0x28)); free(*(void **)(this + 0x30)); free(*(void **)(this + 0x38)); *(void **)(this + 0x20) = pvVar4; *(void **)(this + 0x28) = pvVar5; *(void **)(this + 0x30) = pvVar6; *(void **)(this + 0x38) = pvVar7; uVar9 = *(uint *)(this + 0x14); } else { pvVar4 = *(void **)(this + 0x20); pvVar5 = *(void **)(this + 0x28); pvVar6 = *(void **)(this + 0x30); pvVar7 = *(void **)(this + 0x38); } *(int *)((long)pvVar4 + (long)(int)uVar9 * 4) = param_1; *(int *)((long)pvVar5 + (long)*(int *)(this + 0x14) * 4) = param_2; *(int *)((long)pvVar6 + (long)*(int *)(this + 0x14) * 4) = param_3; *(int *)((long)pvVar7 + (long)*(int *)(this + 0x14) * 4) = param_4; *(int *)(this + 0x14) = *(int *)(this + 0x14) + 1; return; }
55,216
emit_goto
bluesky950520[P]quickjs/quickjs.c
static int emit_goto(JSParseState *s, int opcode, int label) { if (js_is_live_code(s)) { if (label < 0) label = new_label(s); emit_op(s, opcode); emit_u32(s, label); s->cur_func->label_slots[label].ref_count++; return label; } return -1; }
O0
c
emit_goto: subq $0x18, %rsp movq %rdi, 0x8(%rsp) movl %esi, 0x4(%rsp) movl %edx, (%rsp) movq 0x8(%rsp), %rdi callq 0xa6070 cmpl $0x0, %eax je 0xa5b8e cmpl $0x0, (%rsp) jge 0xa5b42 movq 0x8(%rsp), %rdi callq 0xa5af0 movl %eax, (%rsp) movq 0x8(%rsp), %rdi movl 0x4(%rsp), %eax movzbl %al, %esi callq 0x9bc60 movq 0x8(%rsp), %rdi movl (%rsp), %esi callq 0xa6210 movq 0x8(%rsp), %rax movq 0x90(%rax), %rax movq 0x170(%rax), %rax movslq (%rsp), %rcx imulq $0x18, %rcx, %rcx addq %rcx, %rax movl (%rax), %ecx addl $0x1, %ecx movl %ecx, (%rax) movl (%rsp), %eax movl %eax, 0x14(%rsp) jmp 0xa5b96 movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF movl 0x14(%rsp), %eax addq $0x18, %rsp retq nop
emit_goto: sub rsp, 18h mov [rsp+18h+var_10], rdi mov [rsp+18h+var_14], esi mov [rsp+18h+var_18], edx mov rdi, [rsp+18h+var_10] call js_is_live_code cmp eax, 0 jz short loc_A5B8E cmp [rsp+18h+var_18], 0 jge short loc_A5B42 mov rdi, [rsp+18h+var_10] call new_label mov [rsp+18h+var_18], eax loc_A5B42: mov rdi, [rsp+18h+var_10] mov eax, [rsp+18h+var_14] movzx esi, al call emit_op mov rdi, [rsp+18h+var_10] mov esi, [rsp+18h+var_18] call emit_u32 mov rax, [rsp+18h+var_10] mov rax, [rax+90h] mov rax, [rax+170h] movsxd rcx, [rsp+18h+var_18] imul rcx, 18h add rax, rcx mov ecx, [rax] add ecx, 1 mov [rax], ecx mov eax, [rsp+18h+var_18] mov [rsp+18h+var_4], eax jmp short loc_A5B96 loc_A5B8E: mov [rsp+18h+var_4], 0FFFFFFFFh loc_A5B96: mov eax, [rsp+18h+var_4] add rsp, 18h retn
long long emit_goto(long long a1, char a2, int a3) { _DWORD *v3; // rax if ( (unsigned int)js_is_live_code(a1) ) { if ( a3 < 0 ) a3 = new_label(a1); emit_op(a1, a2); emit_u32(a1, (unsigned int)a3); v3 = (_DWORD *)(24LL * a3 + *(_QWORD *)(*(_QWORD *)(a1 + 144) + 368LL)); ++*v3; return (unsigned int)a3; } else { return (unsigned int)-1; } }
emit_goto: SUB RSP,0x18 MOV qword ptr [RSP + 0x8],RDI MOV dword ptr [RSP + 0x4],ESI MOV dword ptr [RSP],EDX MOV RDI,qword ptr [RSP + 0x8] CALL 0x001a6070 CMP EAX,0x0 JZ 0x001a5b8e CMP dword ptr [RSP],0x0 JGE 0x001a5b42 MOV RDI,qword ptr [RSP + 0x8] CALL 0x001a5af0 MOV dword ptr [RSP],EAX LAB_001a5b42: MOV RDI,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RSP + 0x4] MOVZX ESI,AL CALL 0x0019bc60 MOV RDI,qword ptr [RSP + 0x8] MOV ESI,dword ptr [RSP] CALL 0x001a6210 MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x90] MOV RAX,qword ptr [RAX + 0x170] MOVSXD RCX,dword ptr [RSP] IMUL RCX,RCX,0x18 ADD RAX,RCX MOV ECX,dword ptr [RAX] ADD ECX,0x1 MOV dword ptr [RAX],ECX MOV EAX,dword ptr [RSP] MOV dword ptr [RSP + 0x14],EAX JMP 0x001a5b96 LAB_001a5b8e: MOV dword ptr [RSP + 0x14],0xffffffff LAB_001a5b96: MOV EAX,dword ptr [RSP + 0x14] ADD RSP,0x18 RET
int emit_goto(long param_1,int1 param_2,int param_3) { int iVar1; int *piVar2; int4 local_18; int4 local_4; iVar1 = js_is_live_code(param_1); if (iVar1 == 0) { local_4 = -1; } else { local_18 = param_3; if (param_3 < 0) { local_18 = new_label(param_1); } emit_op(param_1,param_2); emit_u32(param_1,local_18); piVar2 = (int *)(*(long *)(*(long *)(param_1 + 0x90) + 0x170) + (long)local_18 * 0x18); *piVar2 = *piVar2 + 1; local_4 = local_18; } return local_4; }
55,217
emit_goto
bluesky950520[P]quickjs/quickjs.c
static int emit_goto(JSParseState *s, int opcode, int label) { if (js_is_live_code(s)) { if (label < 0) label = new_label(s); emit_op(s, opcode); emit_u32(s, label); s->cur_func->label_slots[label].ref_count++; return label; } return -1; }
O1
c
emit_goto: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %edx, %ebx movl %esi, %ebp movq %rdi, %r14 callq 0x644c9 testl %eax, %eax je 0x641f8 testl %ebx, %ebx jns 0x6419d movq 0x90(%r14), %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF callq 0x6bba5 movl %eax, %ebx movq 0x90(%r14), %rax movl $0x138, %r15d # imm = 0x138 leaq (%rax,%r15), %rdi movl 0x140(%rax), %ecx movl %ecx, 0x168(%rax) movzbl %bpl, %esi callq 0x1a8bc addq 0x90(%r14), %r15 leaq 0x4(%rsp), %rsi movl %ebx, (%rsi) movl $0x4, %edx movq %r15, %rdi callq 0x1a80e movq 0x90(%r14), %rax movq 0x170(%rax), %rax movslq %ebx, %rcx leaq (%rcx,%rcx,2), %rcx incl (%rax,%rcx,8) jmp 0x641fd movl $0xffffffff, %ebx # imm = 0xFFFFFFFF movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
emit_goto: push rbp push r15 push r14 push rbx push rax mov ebx, edx mov ebp, esi mov r14, rdi call js_is_live_code test eax, eax jz short loc_641F8 test ebx, ebx jns short loc_6419D mov rdi, [r14+90h] mov esi, 0FFFFFFFFh call new_label_fd mov ebx, eax loc_6419D: mov rax, [r14+90h] mov r15d, 138h lea rdi, [rax+r15] mov ecx, [rax+140h] mov [rax+168h], ecx movzx esi, bpl call dbuf_putc add r15, [r14+90h] lea rsi, [rsp+28h+var_24] mov [rsi], ebx mov edx, 4 mov rdi, r15 call dbuf_put mov rax, [r14+90h] mov rax, [rax+170h] movsxd rcx, ebx lea rcx, [rcx+rcx*2] inc dword ptr [rax+rcx*8] jmp short loc_641FD loc_641F8: mov ebx, 0FFFFFFFFh loc_641FD: mov eax, ebx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long emit_goto(long long a1, char a2, int a3) { long long v3; // rax long long v5; // rax _QWORD *v6; // r15 int v8[9]; // [rsp+0h] [rbp-24h] BYREF v8[0] = HIDWORD(v3); if ( (unsigned int)js_is_live_code(a1) ) { if ( a3 < 0 ) a3 = new_label_fd(*(_QWORD *)(a1 + 144), 0xFFFFFFFFLL); v5 = *(_QWORD *)(a1 + 144); *(_DWORD *)(v5 + 360) = *(_DWORD *)(v5 + 320); dbuf_putc((_QWORD *)(v5 + 312), a2); v6 = (_QWORD *)(*(_QWORD *)(a1 + 144) + 312LL); v8[0] = a3; dbuf_put(v6, (long long)v8, 4LL); ++*(_DWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 144) + 368LL) + 24LL * a3); } else { return (unsigned int)-1; } return (unsigned int)a3; }
emit_goto: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBX,EDX MOV EBP,ESI MOV R14,RDI CALL 0x001644c9 TEST EAX,EAX JZ 0x001641f8 TEST EBX,EBX JNS 0x0016419d MOV RDI,qword ptr [R14 + 0x90] MOV ESI,0xffffffff CALL 0x0016bba5 MOV EBX,EAX LAB_0016419d: MOV RAX,qword ptr [R14 + 0x90] MOV R15D,0x138 LEA RDI,[RAX + R15*0x1] MOV ECX,dword ptr [RAX + 0x140] MOV dword ptr [RAX + 0x168],ECX MOVZX ESI,BPL CALL 0x0011a8bc ADD R15,qword ptr [R14 + 0x90] LEA RSI,[RSP + 0x4] MOV dword ptr [RSI],EBX MOV EDX,0x4 MOV RDI,R15 CALL 0x0011a80e MOV RAX,qword ptr [R14 + 0x90] MOV RAX,qword ptr [RAX + 0x170] MOVSXD RCX,EBX LEA RCX,[RCX + RCX*0x2] INC dword ptr [RAX + RCX*0x8] JMP 0x001641fd LAB_001641f8: MOV EBX,0xffffffff LAB_001641fd: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int emit_goto(long param_1,int1 param_2,int param_3) { int *piVar1; long lVar2; int iVar3; int1 local_24 [4]; iVar3 = js_is_live_code(); if (iVar3 == 0) { param_3 = -1; } else { if (param_3 < 0) { param_3 = new_label_fd(*(int8 *)(param_1 + 0x90),0xffffffff); } lVar2 = *(long *)(param_1 + 0x90); *(int4 *)(lVar2 + 0x168) = *(int4 *)(lVar2 + 0x140); dbuf_putc(lVar2 + 0x138,param_2); dbuf_put(*(long *)(param_1 + 0x90) + 0x138,local_24,4); piVar1 = (int *)(*(long *)(*(long *)(param_1 + 0x90) + 0x170) + (long)param_3 * 0x18); *piVar1 = *piVar1 + 1; } return param_3; }
55,218
pvio_socket_has_data
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
my_bool pvio_socket_has_data(MARIADB_PVIO *pvio, ssize_t *data_len) { struct st_pvio_socket *csock= NULL; char tmp_buf; ssize_t len; my_bool mode; if (!pvio || !pvio->data) return 0; csock= (struct st_pvio_socket *)pvio->data; /* MSG_PEEK: Peeks at the incoming data. The data is copied into the buffer, but is not removed from the input queue. */ pvio_socket_blocking(pvio, 0, &mode); len= recv(csock->socket, &tmp_buf, sizeof(tmp_buf), MSG_PEEK); pvio_socket_blocking(pvio, mode, 0); if (len < 0) return 1; *data_len= len; return 0; }
O3
c
pvio_socket_has_data: testq %rdi, %rdi je 0x32547 pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdi, %r14 movq (%rdi), %r15 testq %r15, %r15 je 0x32543 movq %rsi, %rbx leaq -0x21(%rbp), %r12 movq %r14, %rdi xorl %esi, %esi movq %r12, %rdx callq 0x31b8e movl (%r15), %edi leaq -0x22(%rbp), %rsi movl $0x1, %edx movl $0x2, %ecx callq 0x13170 movq %rax, %r15 movsbl (%r12), %esi movq %r14, %rdi xorl %edx, %edx callq 0x31b8e testq %r15, %r15 js 0x3254a movq %r15, (%rbx) xorl %eax, %eax jmp 0x3254c xorl %eax, %eax retq movb $0x1, %al addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
pvio_socket_has_data: test rdi, rdi jz short loc_32547 push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 10h mov r14, rdi mov r15, [rdi] test r15, r15 jz short loc_32543 mov rbx, rsi lea r12, [rbp-21h] mov rdi, r14 xor esi, esi mov rdx, r12 call pvio_socket_blocking mov edi, [r15] lea rsi, [rbp-22h] mov edx, 1 mov ecx, 2 call _recv mov r15, rax movsx esi, byte ptr [r12] mov rdi, r14 xor edx, edx call pvio_socket_blocking test r15, r15 js short loc_3254A mov [rbx], r15 loc_32543: xor eax, eax jmp short loc_3254C loc_32547: xor eax, eax retn loc_3254A: mov al, 1 loc_3254C: add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn
char pvio_socket_has_data(unsigned int **a1, long long *a2) { unsigned int *v2; // r15 long long v3; // r15 __int16 v5; // [rsp-2Ah] [rbp-2Ah] BYREF if ( !a1 ) return 0; v2 = *a1; if ( !*a1 ) return 0; pvio_socket_blocking(a1, 0, (bool *)&v5 + 1); v3 = recv(*v2, &v5, 1LL, 2LL); pvio_socket_blocking(a1, SHIBYTE(v5), 0LL); if ( v3 >= 0 ) { *a2 = v3; return 0; } return 1; }
pvio_socket_has_data: TEST RDI,RDI JZ 0x00132547 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R14,RDI MOV R15,qword ptr [RDI] TEST R15,R15 JZ 0x00132543 MOV RBX,RSI LEA R12,[RBP + -0x21] MOV RDI,R14 XOR ESI,ESI MOV RDX,R12 CALL 0x00131b8e MOV EDI,dword ptr [R15] LEA RSI,[RBP + -0x22] MOV EDX,0x1 MOV ECX,0x2 CALL 0x00113170 MOV R15,RAX MOVSX ESI,byte ptr [R12] MOV RDI,R14 XOR EDX,EDX CALL 0x00131b8e TEST R15,R15 JS 0x0013254a MOV qword ptr [RBX],R15 LAB_00132543: XOR EAX,EAX JMP 0x0013254c LAB_00132547: XOR EAX,EAX RET LAB_0013254a: MOV AL,0x1 LAB_0013254c: ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET
int8 pvio_socket_has_data(int8 *param_1,ssize_t *param_2) { int *piVar1; ssize_t sVar2; int1 local_2a; char local_29; if (param_1 == (int8 *)0x0) { return 0; } piVar1 = (int *)*param_1; if (piVar1 != (int *)0x0) { pvio_socket_blocking(param_1,0,&local_29); sVar2 = recv(*piVar1,&local_2a,1,2); pvio_socket_blocking(param_1,(int)local_29,0); if (sVar2 < 0) { return 1; } *param_2 = sVar2; } return 0; }
55,219
ggml_graph_get_tensor
monkey531[P]llama/ggml/src/ggml.c
struct ggml_tensor * ggml_graph_get_tensor(const struct ggml_cgraph * cgraph, const char * name) { for (int i = 0; i < cgraph->n_leafs; i++) { struct ggml_tensor * leaf = cgraph->leafs[i]; if (strcmp(leaf->name, name) == 0) { return leaf; } } for (int i = 0; i < cgraph->n_nodes; i++) { struct ggml_tensor * node = cgraph->nodes[i]; if (strcmp(node->name, name) == 0) { return node; } } return NULL; }
O0
c
ggml_graph_get_tensor: subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movl $0x0, 0x1c(%rsp) movl 0x1c(%rsp), %eax movq 0x28(%rsp), %rcx cmpl 0x8(%rcx), %eax jge 0x582e1 movq 0x28(%rsp), %rax movq 0x28(%rax), %rax movslq 0x1c(%rsp), %rcx movq (%rax,%rcx,8), %rax movq %rax, 0x10(%rsp) movq 0x10(%rsp), %rdi addq $0x100, %rdi # imm = 0x100 movq 0x20(%rsp), %rsi callq 0x45560 cmpl $0x0, %eax jne 0x582d2 movq 0x10(%rsp), %rax movq %rax, 0x30(%rsp) jmp 0x5834a jmp 0x582d4 movl 0x1c(%rsp), %eax addl $0x1, %eax movl %eax, 0x1c(%rsp) jmp 0x58286 movl $0x0, 0xc(%rsp) movl 0xc(%rsp), %eax movq 0x28(%rsp), %rcx cmpl 0x4(%rcx), %eax jge 0x58341 movq 0x28(%rsp), %rax movq 0x10(%rax), %rax movslq 0xc(%rsp), %rcx movq (%rax,%rcx,8), %rax movq %rax, (%rsp) movq (%rsp), %rdi addq $0x100, %rdi # imm = 0x100 movq 0x20(%rsp), %rsi callq 0x45560 cmpl $0x0, %eax jne 0x58332 movq (%rsp), %rax movq %rax, 0x30(%rsp) jmp 0x5834a jmp 0x58334 movl 0xc(%rsp), %eax addl $0x1, %eax movl %eax, 0xc(%rsp) jmp 0x582e9 movq $0x0, 0x30(%rsp) movq 0x30(%rsp), %rax addq $0x38, %rsp retq nopw %cs:(%rax,%rax)
ggml_graph_get_tensor: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_18], rsi mov [rsp+38h+var_1C], 0 loc_58286: mov eax, [rsp+38h+var_1C] mov rcx, [rsp+38h+var_10] cmp eax, [rcx+8] jge short loc_582E1 mov rax, [rsp+38h+var_10] mov rax, [rax+28h] movsxd rcx, [rsp+38h+var_1C] mov rax, [rax+rcx*8] mov [rsp+38h+var_28], rax mov rdi, [rsp+38h+var_28] add rdi, 100h mov rsi, [rsp+38h+var_18] call _strcmp cmp eax, 0 jnz short loc_582D2 mov rax, [rsp+38h+var_28] mov [rsp+38h+var_8], rax jmp short loc_5834A loc_582D2: jmp short $+2 loc_582D4: mov eax, [rsp+38h+var_1C] add eax, 1 mov [rsp+38h+var_1C], eax jmp short loc_58286 loc_582E1: mov [rsp+38h+var_2C], 0 loc_582E9: mov eax, [rsp+38h+var_2C] mov rcx, [rsp+38h+var_10] cmp eax, [rcx+4] jge short loc_58341 mov rax, [rsp+38h+var_10] mov rax, [rax+10h] movsxd rcx, [rsp+38h+var_2C] mov rax, [rax+rcx*8] mov [rsp+38h+var_38], rax mov rdi, [rsp+38h+var_38] add rdi, 100h mov rsi, [rsp+38h+var_18] call _strcmp cmp eax, 0 jnz short loc_58332 mov rax, [rsp+38h+var_38] mov [rsp+38h+var_8], rax jmp short loc_5834A loc_58332: jmp short $+2 loc_58334: mov eax, [rsp+38h+var_2C] add eax, 1 mov [rsp+38h+var_2C], eax jmp short loc_582E9 loc_58341: mov [rsp+38h+var_8], 0 loc_5834A: mov rax, [rsp+38h+var_8] add rsp, 38h retn
long long ggml_graph_get_tensor(long long a1, long long a2) { long long v3; // [rsp+0h] [rbp-38h] int j; // [rsp+Ch] [rbp-2Ch] long long v5; // [rsp+10h] [rbp-28h] int i; // [rsp+1Ch] [rbp-1Ch] for ( i = 0; i < *(_DWORD *)(a1 + 8); ++i ) { v5 = *(_QWORD *)(*(_QWORD *)(a1 + 40) + 8LL * i); if ( !(unsigned int)strcmp(v5 + 256, a2) ) return v5; } for ( j = 0; j < *(_DWORD *)(a1 + 4); ++j ) { v3 = *(_QWORD *)(*(_QWORD *)(a1 + 16) + 8LL * j); if ( !(unsigned int)strcmp(v3 + 256, a2) ) return v3; } return 0LL; }
ggml_graph_get_tensor: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RDI MOV qword ptr [RSP + 0x20],RSI MOV dword ptr [RSP + 0x1c],0x0 LAB_00158286: MOV EAX,dword ptr [RSP + 0x1c] MOV RCX,qword ptr [RSP + 0x28] CMP EAX,dword ptr [RCX + 0x8] JGE 0x001582e1 MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x28] MOVSXD RCX,dword ptr [RSP + 0x1c] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x100 MOV RSI,qword ptr [RSP + 0x20] CALL 0x00145560 CMP EAX,0x0 JNZ 0x001582d2 MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x30],RAX JMP 0x0015834a LAB_001582d2: JMP 0x001582d4 LAB_001582d4: MOV EAX,dword ptr [RSP + 0x1c] ADD EAX,0x1 MOV dword ptr [RSP + 0x1c],EAX JMP 0x00158286 LAB_001582e1: MOV dword ptr [RSP + 0xc],0x0 LAB_001582e9: MOV EAX,dword ptr [RSP + 0xc] MOV RCX,qword ptr [RSP + 0x28] CMP EAX,dword ptr [RCX + 0x4] JGE 0x00158341 MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x10] MOVSXD RCX,dword ptr [RSP + 0xc] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP] ADD RDI,0x100 MOV RSI,qword ptr [RSP + 0x20] CALL 0x00145560 CMP EAX,0x0 JNZ 0x00158332 MOV RAX,qword ptr [RSP] MOV qword ptr [RSP + 0x30],RAX JMP 0x0015834a LAB_00158332: JMP 0x00158334 LAB_00158334: MOV EAX,dword ptr [RSP + 0xc] ADD EAX,0x1 MOV dword ptr [RSP + 0xc],EAX JMP 0x001582e9 LAB_00158341: MOV qword ptr [RSP + 0x30],0x0 LAB_0015834a: MOV RAX,qword ptr [RSP + 0x30] ADD RSP,0x38 RET
long ggml_graph_get_tensor(long param_1,char *param_2) { long lVar1; int iVar2; int local_2c; int local_1c; for (local_1c = 0; local_1c < *(int *)(param_1 + 8); local_1c = local_1c + 1) { lVar1 = *(long *)(*(long *)(param_1 + 0x28) + (long)local_1c * 8); iVar2 = strcmp((char *)(lVar1 + 0x100),param_2); if (iVar2 == 0) { return lVar1; } } local_2c = 0; while( true ) { if (*(int *)(param_1 + 4) <= local_2c) { return 0; } lVar1 = *(long *)(*(long *)(param_1 + 0x10) + (long)local_2c * 8); iVar2 = strcmp((char *)(lVar1 + 0x100),param_2); if (iVar2 == 0) break; local_2c = local_2c + 1; } return lVar1; }
55,220
js_clone_shape
bluesky950520[P]quickjs/quickjs.c
static JSShape *js_clone_shape(JSContext *ctx, JSShape *sh1) { JSShape *sh; void *sh_alloc, *sh_alloc1; size_t size; JSShapeProperty *pr; uint32_t i, hash_size; hash_size = sh1->prop_hash_mask + 1; size = get_shape_size(hash_size, sh1->prop_size); sh_alloc = js_malloc(ctx, size); if (!sh_alloc) return NULL; sh_alloc1 = get_alloc_from_shape(sh1); memcpy(sh_alloc, sh_alloc1, size); sh = get_shape_from_alloc(sh_alloc, hash_size); sh->header.ref_count = 1; add_gc_object(ctx->rt, &sh->header, JS_GC_OBJ_TYPE_SHAPE); sh->is_hashed = FALSE; if (sh->proto) { js_dup(JS_MKPTR(JS_TAG_OBJECT, sh->proto)); } for(i = 0, pr = get_shape_prop(sh); i < sh->prop_count; i++, pr++) { JS_DupAtom(ctx, pr->atom); } return sh; }
O0
c
js_clone_shape: subq $0x68, %rsp movq %rdi, 0x58(%rsp) movq %rsi, 0x50(%rsp) movq 0x50(%rsp), %rax movl 0x20(%rax), %eax addl $0x1, %eax movl %eax, 0x20(%rsp) movl 0x20(%rsp), %eax movl %eax, %edi movq 0x50(%rsp), %rax movslq 0x24(%rax), %rsi callq 0x2ad80 movq %rax, 0x30(%rsp) movq 0x58(%rsp), %rdi movq 0x30(%rsp), %rsi callq 0x209f0 movq %rax, 0x40(%rsp) cmpq $0x0, 0x40(%rsp) jne 0x5ceb0 movq $0x0, 0x60(%rsp) jmp 0x5cfab movq 0x50(%rsp), %rdi callq 0x5c5a0 movq %rax, 0x38(%rsp) movq 0x40(%rsp), %rdi movq 0x38(%rsp), %rsi movq 0x30(%rsp), %rdx callq 0xe5a0 movq 0x40(%rsp), %rdi movl 0x20(%rsp), %eax movl %eax, %esi callq 0x5c970 movq %rax, 0x48(%rsp) movq 0x48(%rsp), %rax movl $0x1, (%rax) movq 0x58(%rsp), %rax movq 0x18(%rax), %rdi movq 0x48(%rsp), %rsi movl $0x2, %edx callq 0x22e10 movq 0x48(%rsp), %rax movb $0x0, 0x18(%rax) movq 0x48(%rsp), %rax cmpq $0x0, 0x38(%rax) je 0x5cf4f movq 0x48(%rsp), %rax movq 0x38(%rax), %rax movq %rax, 0x10(%rsp) movq $-0x1, 0x18(%rsp) movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x20410 movq %rax, (%rsp) movq %rdx, 0x8(%rsp) movl $0x0, 0x24(%rsp) movq 0x48(%rsp), %rdi callq 0x2afc0 movq %rax, 0x28(%rsp) movl 0x24(%rsp), %eax movq 0x48(%rsp), %rcx cmpl 0x28(%rcx), %eax jae 0x5cfa1 movq 0x58(%rsp), %rdi movq 0x28(%rsp), %rax movl 0x4(%rax), %esi callq 0x26ce0 movl 0x24(%rsp), %eax addl $0x1, %eax movl %eax, 0x24(%rsp) movq 0x28(%rsp), %rax addq $0x8, %rax movq %rax, 0x28(%rsp) jmp 0x5cf66 movq 0x48(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x60(%rsp), %rax addq $0x68, %rsp retq nopw %cs:(%rax,%rax)
js_clone_shape: sub rsp, 68h mov [rsp+68h+var_10], rdi mov [rsp+68h+var_18], rsi mov rax, [rsp+68h+var_18] mov eax, [rax+20h] add eax, 1 mov [rsp+68h+var_48], eax mov eax, [rsp+68h+var_48] mov edi, eax mov rax, [rsp+68h+var_18] movsxd rsi, dword ptr [rax+24h] call get_shape_size mov [rsp+68h+var_38], rax mov rdi, [rsp+68h+var_10] mov rsi, [rsp+68h+var_38] call js_malloc mov [rsp+68h+var_28], rax cmp [rsp+68h+var_28], 0 jnz short loc_5CEB0 mov [rsp+68h+var_8], 0 jmp loc_5CFAB loc_5CEB0: mov rdi, [rsp+68h+var_18] call get_alloc_from_shape mov [rsp+68h+var_30], rax mov rdi, [rsp+68h+var_28] mov rsi, [rsp+68h+var_30] mov rdx, [rsp+68h+var_38] call _memcpy mov rdi, [rsp+68h+var_28] mov eax, [rsp+68h+var_48] mov esi, eax call get_shape_from_alloc mov [rsp+68h+var_20], rax mov rax, [rsp+68h+var_20] mov dword ptr [rax], 1 mov rax, [rsp+68h+var_10] mov rdi, [rax+18h] mov rsi, [rsp+68h+var_20] mov edx, 2 call add_gc_object mov rax, [rsp+68h+var_20] mov byte ptr [rax+18h], 0 mov rax, [rsp+68h+var_20] cmp qword ptr [rax+38h], 0 jz short loc_5CF4F mov rax, [rsp+68h+var_20] mov rax, [rax+38h] mov [rsp+68h+var_58], rax mov [rsp+68h+var_50], 0FFFFFFFFFFFFFFFFh mov rdi, [rsp+68h+var_58] mov rsi, [rsp+68h+var_50] call js_dup mov [rsp+68h+var_68], rax mov [rsp+68h+var_60], rdx loc_5CF4F: mov [rsp+68h+var_44], 0 mov rdi, [rsp+68h+var_20] call get_shape_prop mov [rsp+68h+var_40], rax loc_5CF66: mov eax, [rsp+68h+var_44] mov rcx, [rsp+68h+var_20] cmp eax, [rcx+28h] jnb short loc_5CFA1 mov rdi, [rsp+68h+var_10] mov rax, [rsp+68h+var_40] mov esi, [rax+4] call JS_DupAtom mov eax, [rsp+68h+var_44] add eax, 1 mov [rsp+68h+var_44], eax mov rax, [rsp+68h+var_40] add rax, 8 mov [rsp+68h+var_40], rax jmp short loc_5CF66 loc_5CFA1: mov rax, [rsp+68h+var_20] mov [rsp+68h+var_8], rax loc_5CFAB: mov rax, [rsp+68h+var_8] add rsp, 68h retn
long long js_clone_shape(long long a1, long long a2) { unsigned int v3; // [rsp+20h] [rbp-48h] unsigned int v4; // [rsp+24h] [rbp-44h] long long shape_prop; // [rsp+28h] [rbp-40h] long long shape_size; // [rsp+30h] [rbp-38h] long long alloc_from_shape; // [rsp+38h] [rbp-30h] long long v8; // [rsp+40h] [rbp-28h] long long shape_from_alloc; // [rsp+48h] [rbp-20h] v3 = *(_DWORD *)(a2 + 32) + 1; shape_size = get_shape_size(v3, *(int *)(a2 + 36)); v8 = js_malloc(a1, shape_size); if ( !v8 ) return 0LL; alloc_from_shape = get_alloc_from_shape(a2); memcpy(v8, alloc_from_shape, shape_size); shape_from_alloc = get_shape_from_alloc(v8, v3); *(_DWORD *)shape_from_alloc = 1; add_gc_object(*(_QWORD *)(a1 + 24), shape_from_alloc, 2); *(_BYTE *)(shape_from_alloc + 24) = 0; if ( *(_QWORD *)(shape_from_alloc + 56) ) js_dup(*(_DWORD **)(shape_from_alloc + 56), 0xFFFFFFFF); v4 = 0; shape_prop = get_shape_prop(shape_from_alloc); while ( v4 < *(_DWORD *)(shape_from_alloc + 40) ) { JS_DupAtom(a1, *(_DWORD *)(shape_prop + 4)); ++v4; shape_prop += 8LL; } return shape_from_alloc; }
js_clone_shape: SUB RSP,0x68 MOV qword ptr [RSP + 0x58],RDI MOV qword ptr [RSP + 0x50],RSI MOV RAX,qword ptr [RSP + 0x50] MOV EAX,dword ptr [RAX + 0x20] ADD EAX,0x1 MOV dword ptr [RSP + 0x20],EAX MOV EAX,dword ptr [RSP + 0x20] MOV EDI,EAX MOV RAX,qword ptr [RSP + 0x50] MOVSXD RSI,dword ptr [RAX + 0x24] CALL 0x0012ad80 MOV qword ptr [RSP + 0x30],RAX MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x30] CALL 0x001209f0 MOV qword ptr [RSP + 0x40],RAX CMP qword ptr [RSP + 0x40],0x0 JNZ 0x0015ceb0 MOV qword ptr [RSP + 0x60],0x0 JMP 0x0015cfab LAB_0015ceb0: MOV RDI,qword ptr [RSP + 0x50] CALL 0x0015c5a0 MOV qword ptr [RSP + 0x38],RAX MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x30] CALL 0x0010e5a0 MOV RDI,qword ptr [RSP + 0x40] MOV EAX,dword ptr [RSP + 0x20] MOV ESI,EAX CALL 0x0015c970 MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0x48] MOV dword ptr [RAX],0x1 MOV RAX,qword ptr [RSP + 0x58] MOV RDI,qword ptr [RAX + 0x18] MOV RSI,qword ptr [RSP + 0x48] MOV EDX,0x2 CALL 0x00122e10 MOV RAX,qword ptr [RSP + 0x48] MOV byte ptr [RAX + 0x18],0x0 MOV RAX,qword ptr [RSP + 0x48] CMP qword ptr [RAX + 0x38],0x0 JZ 0x0015cf4f MOV RAX,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],-0x1 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x18] CALL 0x00120410 MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x8],RDX LAB_0015cf4f: MOV dword ptr [RSP + 0x24],0x0 MOV RDI,qword ptr [RSP + 0x48] CALL 0x0012afc0 MOV qword ptr [RSP + 0x28],RAX LAB_0015cf66: MOV EAX,dword ptr [RSP + 0x24] MOV RCX,qword ptr [RSP + 0x48] CMP EAX,dword ptr [RCX + 0x28] JNC 0x0015cfa1 MOV RDI,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RSP + 0x28] MOV ESI,dword ptr [RAX + 0x4] CALL 0x00126ce0 MOV EAX,dword ptr [RSP + 0x24] ADD EAX,0x1 MOV dword ptr [RSP + 0x24],EAX MOV RAX,qword ptr [RSP + 0x28] ADD RAX,0x8 MOV qword ptr [RSP + 0x28],RAX JMP 0x0015cf66 LAB_0015cfa1: MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x60],RAX LAB_0015cfab: MOV RAX,qword ptr [RSP + 0x60] ADD RSP,0x68 RET
int4 * js_clone_shape(long param_1,long param_2) { int iVar1; size_t __n; void *__dest; void *__src; uint local_44; long local_40; int4 *local_8; iVar1 = *(int *)(param_2 + 0x20) + 1; __n = get_shape_size(iVar1,(long)*(int *)(param_2 + 0x24)); __dest = (void *)js_malloc(param_1,__n); if (__dest == (void *)0x0) { local_8 = (int4 *)0x0; } else { __src = (void *)get_alloc_from_shape(param_2); memcpy(__dest,__src,__n); local_8 = (int4 *)get_shape_from_alloc(__dest,iVar1); *local_8 = 1; add_gc_object(*(int8 *)(param_1 + 0x18),local_8,2); *(int1 *)(local_8 + 6) = 0; if (*(long *)(local_8 + 0xe) != 0) { js_dup(*(int8 *)(local_8 + 0xe),0xffffffffffffffff); } local_44 = 0; local_40 = get_shape_prop(local_8); for (; local_44 < (uint)local_8[10]; local_44 = local_44 + 1) { JS_DupAtom(param_1,*(int4 *)(local_40 + 4)); local_40 = local_40 + 8; } } return local_8; }
55,221
js_clone_shape
bluesky950520[P]quickjs/quickjs.c
static JSShape *js_clone_shape(JSContext *ctx, JSShape *sh1) { JSShape *sh; void *sh_alloc, *sh_alloc1; size_t size; JSShapeProperty *pr; uint32_t i, hash_size; hash_size = sh1->prop_hash_mask + 1; size = get_shape_size(hash_size, sh1->prop_size); sh_alloc = js_malloc(ctx, size); if (!sh_alloc) return NULL; sh_alloc1 = get_alloc_from_shape(sh1); memcpy(sh_alloc, sh_alloc1, size); sh = get_shape_from_alloc(sh_alloc, hash_size); sh->header.ref_count = 1; add_gc_object(ctx->rt, &sh->header, JS_GC_OBJ_TYPE_SHAPE); sh->is_hashed = FALSE; if (sh->proto) { js_dup(JS_MKPTR(JS_TAG_OBJECT, sh->proto)); } for(i = 0, pr = get_shape_prop(sh); i < sh->prop_count; i++, pr++) { JS_DupAtom(ctx, pr->atom); } return sh; }
O1
c
js_clone_shape: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rsi, %r15 movq %rdi, %rbx movl 0x20(%rsi), %r13d incl %r13d movslq 0x24(%rsi), %rax shlq $0x3, %rax leaq (%rax,%r13,4), %r12 addq $0x40, %r12 movq %r12, %rsi callq 0xed5d testq %rax, %rax je 0x10a6d movq %rax, %r14 movl 0x20(%r15), %eax notq %rax leaq (%r15,%rax,4), %rsi movq %r14, %rdi movq %r12, %rdx callq 0xe5a0 leaq (%r14,%r13,4), %rax movl $0x1, (%r14,%r13,4) movq 0x18(%rbx), %rcx movb $0x2, 0x4(%r14,%r13,4) leaq 0x8(%r14,%r13,4), %rdx leaq 0x98(%rcx), %rsi movq 0x98(%rcx), %rdi movq %rdx, 0x8(%rdi) movq %rdi, 0x8(%r14,%r13,4) movq %rsi, 0x10(%r14,%r13,4) movq %rdx, 0x98(%rcx) movb $0x0, 0x18(%r14,%r13,4) movq 0x38(%r14,%r13,4), %rcx testq %rcx, %rcx je 0x10a38 incl (%rcx) cmpl $0x0, 0x28(%rax) je 0x10a6f leaq (%r14,%r13,4), %rcx addq $0x44, %rcx xorl %edx, %edx movslq (%rcx,%rdx,8), %rsi cmpq $0xe0, %rsi jl 0x10a63 movq 0x18(%rbx), %rdi movq 0x68(%rdi), %rdi movq (%rdi,%rsi,8), %rsi incl (%rsi) incq %rdx cmpl 0x28(%rax), %edx jb 0x10a48 jmp 0x10a6f xorl %eax, %eax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
js_clone_shape: push r15 push r14 push r13 push r12 push rbx mov r15, rsi mov rbx, rdi mov r13d, [rsi+20h] inc r13d movsxd rax, dword ptr [rsi+24h] shl rax, 3 lea r12, [rax+r13*4] add r12, 40h ; '@' mov rsi, r12 call js_malloc test rax, rax jz loc_10A6D mov r14, rax mov eax, [r15+20h] not rax lea rsi, [r15+rax*4] mov rdi, r14 mov rdx, r12 call _memcpy lea rax, [r14+r13*4] mov dword ptr [r14+r13*4], 1 mov rcx, [rbx+18h] mov byte ptr [r14+r13*4+4], 2 lea rdx, [r14+r13*4+8] lea rsi, [rcx+98h] mov rdi, [rcx+98h] mov [rdi+8], rdx mov [r14+r13*4+8], rdi mov [r14+r13*4+10h], rsi mov [rcx+98h], rdx mov byte ptr [r14+r13*4+18h], 0 mov rcx, [r14+r13*4+38h] test rcx, rcx jz short loc_10A38 inc dword ptr [rcx] loc_10A38: cmp dword ptr [rax+28h], 0 jz short loc_10A6F lea rcx, [r14+r13*4] add rcx, 44h ; 'D' xor edx, edx loc_10A48: movsxd rsi, dword ptr [rcx+rdx*8] cmp rsi, 0E0h jl short loc_10A63 mov rdi, [rbx+18h] mov rdi, [rdi+68h] mov rsi, [rdi+rsi*8] inc dword ptr [rsi] loc_10A63: inc rdx cmp edx, [rax+28h] jb short loc_10A48 jmp short loc_10A6F loc_10A6D: xor eax, eax loc_10A6F: pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long js_clone_shape(long long a1, long long a2) { long long v3; // r13 long long v4; // r12 long long v5; // rax long long v6; // r14 long long result; // rax long long v8; // rcx long long v9; // rdi _DWORD *v10; // rcx long long v11; // rdx long long v12; // rsi _DWORD *v13; // rsi v3 = (unsigned int)(*(_DWORD *)(a2 + 32) + 1); v4 = 8LL * *(int *)(a2 + 36) + 4 * v3 + 64; v5 = js_malloc(a1, v4); if ( !v5 ) return 0LL; v6 = v5; memcpy(v5, a2 + 4 * ~(unsigned long long)*(unsigned int *)(a2 + 32), v4); result = v6 + 4 * v3; *(_DWORD *)result = 1; v8 = *(_QWORD *)(a1 + 24); *(_BYTE *)(result + 4) = 2; v9 = *(_QWORD *)(v8 + 152); *(_QWORD *)(v9 + 8) = result + 8; *(_QWORD *)(result + 8) = v9; *(_QWORD *)(result + 16) = v8 + 152; *(_QWORD *)(v8 + 152) = result + 8; *(_BYTE *)(result + 24) = 0; v10 = *(_DWORD **)(result + 56); if ( v10 ) ++*v10; if ( *(_DWORD *)(result + 40) ) { v11 = 0LL; do { v12 = *(int *)(v6 + 4 * v3 + 68 + 8 * v11); if ( v12 >= 224 ) { v13 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 8 * v12); ++*v13; } ++v11; } while ( (unsigned int)v11 < *(_DWORD *)(result + 40) ); } return result; }
js_clone_shape: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R15,RSI MOV RBX,RDI MOV R13D,dword ptr [RSI + 0x20] INC R13D MOVSXD RAX,dword ptr [RSI + 0x24] SHL RAX,0x3 LEA R12,[RAX + R13*0x4] ADD R12,0x40 MOV RSI,R12 CALL 0x0010ed5d TEST RAX,RAX JZ 0x00110a6d MOV R14,RAX MOV EAX,dword ptr [R15 + 0x20] NOT RAX LEA RSI,[R15 + RAX*0x4] MOV RDI,R14 MOV RDX,R12 CALL 0x0010e5a0 LEA RAX,[R14 + R13*0x4] MOV dword ptr [R14 + R13*0x4],0x1 MOV RCX,qword ptr [RBX + 0x18] MOV byte ptr [R14 + R13*0x4 + 0x4],0x2 LEA RDX,[R14 + R13*0x4 + 0x8] LEA RSI,[RCX + 0x98] MOV RDI,qword ptr [RCX + 0x98] MOV qword ptr [RDI + 0x8],RDX MOV qword ptr [R14 + R13*0x4 + 0x8],RDI MOV qword ptr [R14 + R13*0x4 + 0x10],RSI MOV qword ptr [RCX + 0x98],RDX MOV byte ptr [R14 + R13*0x4 + 0x18],0x0 MOV RCX,qword ptr [R14 + R13*0x4 + 0x38] TEST RCX,RCX JZ 0x00110a38 INC dword ptr [RCX] LAB_00110a38: CMP dword ptr [RAX + 0x28],0x0 JZ 0x00110a6f LEA RCX,[R14 + R13*0x4] ADD RCX,0x44 XOR EDX,EDX LAB_00110a48: MOVSXD RSI,dword ptr [RCX + RDX*0x8] CMP RSI,0xe0 JL 0x00110a63 MOV RDI,qword ptr [RBX + 0x18] MOV RDI,qword ptr [RDI + 0x68] MOV RSI,qword ptr [RDI + RSI*0x8] INC dword ptr [RSI] LAB_00110a63: INC RDX CMP EDX,dword ptr [RAX + 0x28] JC 0x00110a48 JMP 0x00110a6f LAB_00110a6d: XOR EAX,EAX LAB_00110a6f: POP RBX POP R12 POP R13 POP R14 POP R15 RET
void * js_clone_shape(long param_1,long param_2) { long lVar1; int *piVar2; void *__dest; void *pvVar3; long lVar4; long lVar5; size_t __n; ulong uVar6; uVar6 = (ulong)(*(int *)(param_2 + 0x20) + 1); __n = (long)*(int *)(param_2 + 0x24) * 8 + uVar6 * 4 + 0x40; __dest = (void *)js_malloc(param_1,__n); if (__dest == (void *)0x0) { pvVar3 = (void *)0x0; } else { memcpy(__dest,(void *)(param_2 + ~(ulong)*(uint *)(param_2 + 0x20) * 4),__n); pvVar3 = (void *)((long)__dest + uVar6 * 4); *(int4 *)((long)__dest + uVar6 * 4) = 1; lVar5 = *(long *)(param_1 + 0x18); *(int1 *)((long)__dest + uVar6 * 4 + 4) = 2; lVar4 = (long)__dest + uVar6 * 4 + 8; lVar1 = *(long *)(lVar5 + 0x98); *(long *)(lVar1 + 8) = lVar4; *(long *)((long)__dest + uVar6 * 4 + 8) = lVar1; *(long *)((long)__dest + uVar6 * 4 + 0x10) = lVar5 + 0x98; *(long *)(lVar5 + 0x98) = lVar4; *(int1 *)((long)__dest + uVar6 * 4 + 0x18) = 0; piVar2 = *(int **)((long)__dest + uVar6 * 4 + 0x38); if (piVar2 != (int *)0x0) { *piVar2 = *piVar2 + 1; } if (*(int *)((long)pvVar3 + 0x28) != 0) { lVar4 = 0; do { lVar5 = (long)*(int *)((long)__dest + lVar4 * 8 + uVar6 * 4 + 0x44); if (0xdf < lVar5) { piVar2 = *(int **)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + lVar5 * 8); *piVar2 = *piVar2 + 1; } lVar4 = lVar4 + 1; } while ((uint)lVar4 < *(uint *)((long)pvVar3 + 0x28)); } } return pvVar3; }
55,222
translog_deassign_id_from_share
eloqsql/storage/maria/ma_loghandler.c
void translog_deassign_id_from_share(MARIA_SHARE *share) { DBUG_PRINT("info", ("id_to_share: %p id %u -> 0", share, share->id)); /* We don't need any mutex as we are called only when closing the last instance of the table or at the end of REPAIR: no writes can be happening. But a Checkpoint may be reading share->id, so we require this mutex: */ mysql_mutex_assert_owner(&share->intern_lock); my_atomic_storeptr((void **)&id_to_share[share->id], 0); share->id= 0; /* useless but safety: */ share->lsn_of_file_id= LSN_IMPOSSIBLE; }
O3
c
translog_deassign_id_from_share: pushq %rbp movq %rsp, %rbp movq 0xbc8cea(%rip), %rax # 0xc00e08 movzwl 0x620(%rdi), %ecx xorl %edx, %edx xchgq %rdx, (%rax,%rcx,8) movw $0x0, 0x620(%rdi) movq $0x0, 0xc10(%rdi) popq %rbp retq
translog_deassign_id_from_share: push rbp mov rbp, rsp mov rax, cs:id_to_share movzx ecx, word ptr [rdi+620h] xor edx, edx xchg rdx, [rax+rcx*8] mov word ptr [rdi+620h], 0 mov qword ptr [rdi+0C10h], 0 pop rbp retn
long long translog_deassign_id_from_share(long long a1) { long long result; // rax result = id_to_share; _InterlockedExchange64((volatile long long *)(id_to_share + 8LL * *(unsigned __int16 *)(a1 + 1568)), 0LL); *(_WORD *)(a1 + 1568) = 0; *(_QWORD *)(a1 + 3088) = 0LL; return result; }
translog_deassign_id_from_share: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [0x00d00e08] MOVZX ECX,word ptr [RDI + 0x620] XOR EDX,EDX XCHG qword ptr [RAX + RCX*0x8],RDX MOV word ptr [RDI + 0x620],0x0 MOV qword ptr [RDI + 0xc10],0x0 POP RBP RET
void translog_deassign_id_from_share(long param_1) { LOCK(); *(int8 *)(id_to_share + (ulong)*(ushort *)(param_1 + 0x620) * 8) = 0; UNLOCK(); *(int2 *)(param_1 + 0x620) = 0; *(int8 *)(param_1 + 0xc10) = 0; return; }
55,223
LefDefParser::defwPinPortPolygon(char const*, int, int, int, double*, double*, int)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp
int defwPinPortPolygon(const char *layerName, int spacing, int designRuleWidth, int num_polys, double *xl, double *yl, int mask) { int i; if (!defwFile) return DEFW_UNINITIALIZED; if (defwState != DEFW_PIN && defwState != DEFW_PIN_PORT) return DEFW_BAD_ORDER; if (defVersionNum < 5.7) return DEFW_WRONG_VERSION; if (spacing && designRuleWidth) return DEFW_BAD_DATA; // only one, spacing // or designRuleWidth can be defined, not both fprintf(defwFile, "\n + POLYGON %s ", layerName); if (mask) { if (defVersionNum < 5.8) { return DEFW_WRONG_VERSION; } fprintf(defwFile, "\n MASK %d", mask); } if (spacing) fprintf(defwFile, "\n SPACING %d", spacing); else if (designRuleWidth) // can be both 0 fprintf(defwFile, "\n DESIGNRULEWIDTH %d", designRuleWidth); printPointsNum = 0; for (i = 0; i < num_polys; i++) { if ((i == 0) || ((i % 5) == 0)) { printPoints(defwFile, *xl++, *yl++, "\n ", " "); defwLines++; } else printPoints(defwFile, *xl++, *yl++, "", " "); } defwState = DEFW_PIN; defwLines++; return DEFW_OK; }
O3
cpp
LefDefParser::defwPinPortPolygon(char const*, int, int, int, double*, double*, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %edx, %r15d movq %rdi, %rdx leaq 0x131cc(%rip), %r13 # 0x1e168 movq (%r13), %rdi testq %rdi, %rdi je 0xb04f movl %ecx, %ebp leaq 0x131c2(%rip), %rax # 0x1e174 movl (%rax), %ecx addl $-0x27, %ecx movl $0x2, %eax cmpl $-0x2, %ecx jb 0xb054 movl $0x5, %eax movsd 0x9146(%rip), %xmm0 # 0x14118 ucomisd 0x130e6(%rip), %xmm0 # 0x1e0c0 ja 0xb054 movl %esi, %r12d testl %esi, %esi setne %cl testl %r15d, %r15d setne %sil movl $0x3, %eax testb %sil, %cl jne 0xb054 movq %r9, %rbx movq %r8, %r14 leaq 0xa8e4(%rip), %rsi # 0x158e6 xorl %eax, %eax callq 0x10e0 movl 0x40(%rsp), %edx testl %edx, %edx je 0xb03a movsd 0x90ef(%rip), %xmm0 # 0x14108 ucomisd 0x1309f(%rip), %xmm0 # 0x1e0c0 movl $0x5, %eax ja 0xb054 movq (%r13), %rdi leaq 0xa86b(%rip), %rsi # 0x1589e xorl %eax, %eax callq 0x10e0 testl %r12d, %r12d je 0xb063 movq (%r13), %rdi leaq 0xa867(%rip), %rsi # 0x158b1 movl %r12d, %edx jmp 0xb076 movl $0x1, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq testl %r15d, %r15d je 0xb07d movq (%r13), %rdi leaq 0xa854(%rip), %rsi # 0x158c7 movl %r15d, %edx xorl %eax, %eax callq 0x10e0 movl $0x0, 0x1311d(%rip) # 0x1e1a4 testl %ebp, %ebp jle 0xb0ed movl %ebp, %r15d xorl %ebp, %ebp leaq 0xaaa5(%rip), %r12 # 0x15b3c movl %ebp, %eax movl $0xcccccccd, %ecx # imm = 0xCCCCCCCD imulq %rcx, %rax shrq $0x22, %rax leal (%rax,%rax,4), %eax movq (%r13), %rdi movsd (%r14,%rbp,8), %xmm0 movsd (%rbx,%rbp,8), %xmm1 cmpl %eax, %ebp je 0xb0cd leaq 0xa174(%rip), %rsi # 0x15237 movq %r12, %rdx callq 0x9104 jmp 0xb0e5 leaq 0xa829(%rip), %rsi # 0x158fd movq %r12, %rdx callq 0x9104 leaq 0x1308d(%rip), %rax # 0x1e170 incl (%rax) incq %rbp cmpl %ebp, %r15d jne 0xb097 leaq 0x13080(%rip), %rax # 0x1e174 movl $0x25, (%rax) leaq 0x1306f(%rip), %rax # 0x1e170 incl (%rax) xorl %eax, %eax jmp 0xb054
_ZN12LefDefParser18defwPinPortPolygonEPKciiiPdS2_i: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r15d, edx mov rdx, rdi lea r13, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile mov rdi, [r13+0] test rdi, rdi jz loc_B04F mov ebp, ecx lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState mov ecx, [rax] add ecx, 0FFFFFFD9h mov eax, 2 cmp ecx, 0FFFFFFFEh jb loc_B054 mov eax, 5 movsd xmm0, cs:qword_14118 ucomisd xmm0, cs:_ZN12LefDefParserL13defVersionNumE; LefDefParser::defVersionNum ja short loc_B054 mov r12d, esi test esi, esi setnz cl test r15d, r15d setnz sil mov eax, 3 test cl, sil jnz short loc_B054 mov rbx, r9 mov r14, r8 lea rsi, aPolygonS_0; "\n + POLYGON %s " xor eax, eax call _fprintf mov edx, dword ptr [rsp+38h+arg_0] test edx, edx jz short loc_B03A movsd xmm0, cs:qword_14108 ucomisd xmm0, cs:_ZN12LefDefParserL13defVersionNumE; LefDefParser::defVersionNum mov eax, 5 ja short loc_B054 mov rdi, [r13+0] lea rsi, aMaskD_0; "\n MASK %d" xor eax, eax call _fprintf loc_B03A: test r12d, r12d jz short loc_B063 mov rdi, [r13+0] lea rsi, aSpacingD_0; "\n SPACING %d" mov edx, r12d jmp short loc_B076 loc_B04F: mov eax, 1 loc_B054: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_B063: test r15d, r15d jz short loc_B07D mov rdi, [r13+0] lea rsi, aDesignrulewidt_0; "\n DESIGNRULEWIDTH %d" mov edx, r15d loc_B076: xor eax, eax call _fprintf loc_B07D: mov cs:_ZN12LefDefParserL14printPointsNumE, 0; LefDefParser::printPointsNum test ebp, ebp jle short loc_B0ED mov r15d, ebp xor ebp, ebp lea r12, asc_15B37+5; " " loc_B097: mov eax, ebp mov ecx, 0CCCCCCCDh imul rax, rcx shr rax, 22h lea eax, [rax+rax*4] mov rdi, [r13+0] movsd xmm0, qword ptr [r14+rbp*8] movsd xmm1, qword ptr [rbx+rbp*8] cmp ebp, eax jz short loc_B0CD lea rsi, asc_15234+3; "" mov rdx, r12 call _ZN12LefDefParserL11printPointsEP8_IO_FILEddPKcS3_; LefDefParser::printPoints(_IO_FILE *,double,double,char const*,char const*) jmp short loc_B0E5 loc_B0CD: lea rsi, asc_158FD; "\n " mov rdx, r12 call _ZN12LefDefParserL11printPointsEP8_IO_FILEddPKcS3_; LefDefParser::printPoints(_IO_FILE *,double,double,char const*,char const*) lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines inc dword ptr [rax] loc_B0E5: inc rbp cmp r15d, ebp jnz short loc_B097 loc_B0ED: lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState mov dword ptr [rax], 25h ; '%' lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines inc dword ptr [rax] xor eax, eax jmp loc_B054
long long LefDefParser::defwPinPortPolygon( LefDefParser *this, const char *a2, unsigned int a3, int a4, long long a5, double *a6, double *a7) { long long result; // rax int v12; // r15d long long v13; // rbp double v14; // xmm0_8 double v15; // xmm1_8 if ( !LefDefParser::defwFile ) return 1LL; result = 2LL; if ( (unsigned int)(LefDefParser::defwState - 39) >= 0xFFFFFFFE ) { result = 5LL; if ( *(double *)&LefDefParser::defVersionNum >= 5.7 ) { result = 3LL; if ( a3 == 0 || (_DWORD)a2 == 0 ) { fprintf(LefDefParser::defwFile, "\n + POLYGON %s ", (const char *)this); if ( (_DWORD)a7 ) { result = 5LL; if ( *(double *)&LefDefParser::defVersionNum < 5.8 ) return result; fprintf(LefDefParser::defwFile, "\n MASK %d", (_DWORD)a7); } if ( (_DWORD)a2 ) { fprintf(LefDefParser::defwFile, "\n SPACING %d", (unsigned int)a2); } else if ( a3 ) { fprintf(LefDefParser::defwFile, "\n DESIGNRULEWIDTH %d", a3); } LefDefParser::printPointsNum = 0; if ( a4 > 0 ) { v12 = a4; v13 = 0LL; do { v14 = *(double *)(a5 + 8 * v13); v15 = a6[v13]; if ( (_DWORD)v13 == 5 * ((unsigned int)v13 / 5) ) { LefDefParser::printPoints(LefDefParser::defwFile, (long long)"\n ", (long long)" ", v14, v15); ++LefDefParser::defwLines; } else { LefDefParser::printPoints(LefDefParser::defwFile, (long long)"", (long long)" ", v14, v15); } ++v13; } while ( v12 != (_DWORD)v13 ); } LefDefParser::defwState = 37; ++LefDefParser::defwLines; return 0LL; } } } return result; }
defwPinPortPolygon: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15D,EDX MOV RDX,RDI LEA R13,[0x11e168] MOV RDI,qword ptr [R13] TEST RDI,RDI JZ 0x0010b04f MOV EBP,ECX LEA RAX,[0x11e174] MOV ECX,dword ptr [RAX] ADD ECX,-0x27 MOV EAX,0x2 CMP ECX,-0x2 JC 0x0010b054 MOV EAX,0x5 MOVSD XMM0,qword ptr [0x00114118] UCOMISD XMM0,qword ptr [0x0011e0c0] JA 0x0010b054 MOV R12D,ESI TEST ESI,ESI SETNZ CL TEST R15D,R15D SETNZ SIL MOV EAX,0x3 TEST CL,SIL JNZ 0x0010b054 MOV RBX,R9 MOV R14,R8 LEA RSI,[0x1158e6] XOR EAX,EAX CALL 0x001010e0 MOV EDX,dword ptr [RSP + 0x40] TEST EDX,EDX JZ 0x0010b03a MOVSD XMM0,qword ptr [0x00114108] UCOMISD XMM0,qword ptr [0x0011e0c0] MOV EAX,0x5 JA 0x0010b054 MOV RDI,qword ptr [R13] LEA RSI,[0x11589e] XOR EAX,EAX CALL 0x001010e0 LAB_0010b03a: TEST R12D,R12D JZ 0x0010b063 MOV RDI,qword ptr [R13] LEA RSI,[0x1158b1] MOV EDX,R12D JMP 0x0010b076 LAB_0010b04f: MOV EAX,0x1 LAB_0010b054: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0010b063: TEST R15D,R15D JZ 0x0010b07d MOV RDI,qword ptr [R13] LEA RSI,[0x1158c7] MOV EDX,R15D LAB_0010b076: XOR EAX,EAX CALL 0x001010e0 LAB_0010b07d: MOV dword ptr [0x0011e1a4],0x0 TEST EBP,EBP JLE 0x0010b0ed MOV R15D,EBP XOR EBP,EBP LEA R12,[0x115b3c] LAB_0010b097: MOV EAX,EBP MOV ECX,0xcccccccd IMUL RAX,RCX SHR RAX,0x22 LEA EAX,[RAX + RAX*0x4] MOV RDI,qword ptr [R13] MOVSD XMM0,qword ptr [R14 + RBP*0x8] MOVSD XMM1,qword ptr [RBX + RBP*0x8] CMP EBP,EAX JZ 0x0010b0cd LEA RSI,[0x115237] MOV RDX,R12 CALL 0x00109104 JMP 0x0010b0e5 LAB_0010b0cd: LEA RSI,[0x1158fd] MOV RDX,R12 CALL 0x00109104 LEA RAX,[0x11e170] INC dword ptr [RAX] LAB_0010b0e5: INC RBP CMP R15D,EBP JNZ 0x0010b097 LAB_0010b0ed: LEA RAX,[0x11e174] MOV dword ptr [RAX],0x25 LEA RAX,[0x11e170] INC dword ptr [RAX] XOR EAX,EAX JMP 0x0010b054
/* LefDefParser::defwPinPortPolygon(char const*, int, int, int, double*, double*, int) */ int8 LefDefParser::defwPinPortPolygon (char *param_1,int param_2,int param_3,int param_4,double *param_5,double *param_6, int param_7) { ulong uVar1; char *__format; if (defwFile == (FILE *)0x0) { return 1; } if (defwState - 0x27U < 0xfffffffe) { return 2; } if (defVersionNum < DAT_00114118) { return 5; } if (param_2 != 0 && param_3 != 0) { return 3; } fprintf(defwFile,"\n + POLYGON %s ",param_1); if (param_7 != 0) { if (defVersionNum < DAT_00114108) { return 5; } fprintf(defwFile,"\n MASK %d"); } if (param_2 == 0) { if (param_3 == 0) goto LAB_0010b07d; __format = "\n DESIGNRULEWIDTH %d"; uVar1 = (ulong)(uint)param_3; } else { __format = "\n SPACING %d"; uVar1 = (ulong)(uint)param_2; } fprintf(defwFile,__format,uVar1); LAB_0010b07d: printPointsNum = 0; if (0 < param_4) { uVar1 = 0; do { if ((int)uVar1 == (int)((uVar1 & 0xffffffff) / 5) * 5) { printPoints(defwFile,param_5[uVar1],param_6[uVar1],"\n "," "); defwLines = defwLines + 1; } else { printPoints(defwFile,param_5[uVar1],param_6[uVar1],""," "); } uVar1 = uVar1 + 1; } while (param_4 != (int)uVar1); } defwState = 0x25; defwLines = defwLines + 1; return 0; }
55,224
ma_randominit
eloqsql/libmariadb/libmariadb/ma_password.c
void ma_randominit(struct rand_struct *rand_st,ulong seed1, ulong seed2) { /* For mysql 3.21.# */ #ifdef HAVE_purify memset((char*) rand_st, 0m sizeof(*rand_st)); /* Avoid UMC warnings */ #endif rand_st->max_value= 0x3FFFFFFFL; rand_st->max_value_dbl=(double) rand_st->max_value; rand_st->seed1=seed1%rand_st->max_value ; rand_st->seed2=seed2%rand_st->max_value; }
O3
c
ma_randominit: pushq %rbp movq %rsp, %rbp movq %rdx, %rcx movq $0x3fffffff, 0x10(%rdi) # imm = 0x3FFFFFFF movabsq $0x41cfffffff800000, %rax # imm = 0x41CFFFFFFF800000 movq %rax, 0x18(%rdi) movabsq $0x400000011, %r8 # imm = 0x400000011 movq %rsi, %rax mulq %r8 movq %rsi, %r9 subq %rdx, %r9 shrq %r9 addq %rdx, %r9 shrq $0x1d, %r9 movq %r9, %rax shlq $0x1e, %rax subq %rax, %r9 addq %rsi, %r9 movq %rcx, %rax mulq %r8 movq %r9, (%rdi) movq %rcx, %rax subq %rdx, %rax shrq %rax addq %rdx, %rax shrq $0x1d, %rax movq %rax, %rdx shlq $0x1e, %rdx subq %rdx, %rax addq %rcx, %rax movq %rax, 0x8(%rdi) popq %rbp retq
ma_randominit: push rbp mov rbp, rsp mov rcx, rdx mov qword ptr [rdi+10h], 3FFFFFFFh mov rax, 41CFFFFFFF800000h mov [rdi+18h], rax mov r8, 400000011h mov rax, rsi mul r8 mov r9, rsi sub r9, rdx shr r9, 1 add r9, rdx shr r9, 1Dh mov rax, r9 shl rax, 1Eh sub r9, rax add r9, rsi mov rax, rcx mul r8 mov [rdi], r9 mov rax, rcx sub rax, rdx shr rax, 1 add rax, rdx shr rax, 1Dh mov rdx, rax shl rdx, 1Eh sub rax, rdx add rax, rcx mov [rdi+8], rax pop rbp retn
unsigned long long ma_randominit(unsigned long long *a1, unsigned long long a2, unsigned long long a3) { unsigned long long result; // rax a1[2] = 0x3FFFFFFFLL; a1[3] = 0x41CFFFFFFF800000LL; *a1 = a2 % 0x3FFFFFFF; result = a3 % 0x3FFFFFFF; a1[1] = a3 % 0x3FFFFFFF; return result; }
ma_randominit: PUSH RBP MOV RBP,RSP MOV RCX,RDX MOV qword ptr [RDI + 0x10],0x3fffffff MOV RAX,0x41cfffffff800000 MOV qword ptr [RDI + 0x18],RAX MOV R8,0x400000011 MOV RAX,RSI MUL R8 MOV R9,RSI SUB R9,RDX SHR R9,0x1 ADD R9,RDX SHR R9,0x1d MOV RAX,R9 SHL RAX,0x1e SUB R9,RAX ADD R9,RSI MOV RAX,RCX MUL R8 MOV qword ptr [RDI],R9 MOV RAX,RCX SUB RAX,RDX SHR RAX,0x1 ADD RAX,RDX SHR RAX,0x1d MOV RDX,RAX SHL RDX,0x1e SUB RAX,RDX ADD RAX,RCX MOV qword ptr [RDI + 0x8],RAX POP RBP RET
void ma_randominit(ulong *param_1,ulong param_2,ulong param_3) { param_1[2] = 0x3fffffff; param_1[3] = 0x41cfffffff800000; *param_1 = param_2 % 0x3fffffff; param_1[1] = param_3 % 0x3fffffff; return; }
55,225
ma_pvio_has_data
eloqsql/libmariadb/libmariadb/ma_pvio.c
my_bool ma_pvio_has_data(MARIADB_PVIO *pvio, ssize_t *data_len) { /* check if we still have unread data in cache */ if (pvio && pvio->cache) if (pvio->cache_pos > pvio->cache) return test(pvio->cache_pos - pvio->cache); if (pvio && pvio->methods->has_data) return pvio->methods->has_data(pvio, data_len); return 1; }
O3
c
ma_pvio_has_data: pushq %rbp movq %rsp, %rbp testq %rdi, %rdi je 0x20506 movq 0x8(%rdi), %rax testq %rax, %rax je 0x204f6 cmpq %rax, 0x10(%rdi) ja 0x20506 movq 0x48(%rdi), %rax movq 0x78(%rax), %rax testq %rax, %rax je 0x20506 popq %rbp jmpq *%rax movb $0x1, %al popq %rbp retq
ma_pvio_has_data: push rbp mov rbp, rsp test rdi, rdi jz short loc_20506 mov rax, [rdi+8] test rax, rax jz short loc_204F6 cmp [rdi+10h], rax ja short loc_20506 loc_204F6: mov rax, [rdi+48h] mov rax, [rax+78h] test rax, rax jz short loc_20506 pop rbp jmp rax loc_20506: mov al, 1 pop rbp retn
char ma_pvio_has_data(_QWORD *a1) { unsigned long long v1; // rax long long (*v2)(void); // rax if ( a1 && ((v1 = a1[1]) == 0 || a1[2] <= v1) && (v2 = *(long long (**)(void))(a1[9] + 120LL)) != 0LL ) return v2(); else return 1; }
ma_pvio_has_data: PUSH RBP MOV RBP,RSP TEST RDI,RDI JZ 0x00120506 MOV RAX,qword ptr [RDI + 0x8] TEST RAX,RAX JZ 0x001204f6 CMP qword ptr [RDI + 0x10],RAX JA 0x00120506 LAB_001204f6: MOV RAX,qword ptr [RDI + 0x48] MOV RAX,qword ptr [RAX + 0x78] TEST RAX,RAX JZ 0x00120506 POP RBP JMP RAX LAB_00120506: MOV AL,0x1 POP RBP RET
int8 ma_pvio_has_data(long param_1) { code *UNRECOVERED_JUMPTABLE; int8 uVar1; if ((param_1 != 0) && (((*(ulong *)(param_1 + 8) == 0 || (*(ulong *)(param_1 + 0x10) <= *(ulong *)(param_1 + 8))) && (UNRECOVERED_JUMPTABLE = *(code **)(*(long *)(param_1 + 0x48) + 0x78), UNRECOVERED_JUMPTABLE != (code *)0x0)))) { /* WARNING: Could not recover jumptable at 0x00120504. Too many branches */ /* WARNING: Treating indirect jump as call */ uVar1 = (*UNRECOVERED_JUMPTABLE)(); return uVar1; } return 1; }
55,226
inline_mysql_file_write
eloqsql/include/mysql/psi/mysql_file.h
static inline size_t inline_mysql_file_write( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File file, const uchar *buffer, size_t count, myf flags) { size_t result; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; size_t bytes_written; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_WRITE); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line); result= my_write(file, buffer, count, flags); if (flags & (MY_NABP | MY_FNABP)) bytes_written= (result == 0) ? count : 0; else bytes_written= (result != MY_FILE_ERROR) ? result : 0; PSI_FILE_CALL(end_file_wait)(locker, bytes_written); return result; } #endif result= my_write(file, buffer, count, flags); return result; }
O0
c
inline_mysql_file_write: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) leaq 0x22e4e0(%rip), %rax # 0x2c0238 movq (%rax), %rax movq 0x158(%rax), %rax movl -0x18(%rbp), %esi leaq -0x88(%rbp), %rdi movl $0x7, %edx callq *%rax movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x91e67 leaq 0x22e496(%rip), %rax # 0x2c0238 movq (%rax), %rax movq 0x210(%rax), %rax movq -0x40(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x10(%rbp), %rdx movl -0x14(%rbp), %ecx callq *%rax movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx callq 0xf6d20 movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0x91e12 cmpq $0x0, -0x38(%rbp) jne 0x91df7 movq -0x28(%rbp), %rax movq %rax, -0x98(%rbp) jmp 0x91e02 xorl %eax, %eax movq %rax, -0x98(%rbp) jmp 0x91e02 movq -0x98(%rbp), %rax movq %rax, -0x90(%rbp) jmp 0x91e3f cmpq $-0x1, -0x38(%rbp) je 0x91e26 movq -0x38(%rbp), %rax movq %rax, -0xa0(%rbp) jmp 0x91e31 xorl %eax, %eax movq %rax, -0xa0(%rbp) jmp 0x91e31 movq -0xa0(%rbp), %rax movq %rax, -0x90(%rbp) leaq 0x22e3f2(%rip), %rax # 0x2c0238 movq (%rax), %rax movq 0x218(%rax), %rax movq -0x40(%rbp), %rdi movq -0x90(%rbp), %rsi callq *%rax movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x91e87 movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx callq 0xf6d20 movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xa0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
inline_mysql_file_write_0: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 lea rax, PSI_server mov rax, [rax] mov rax, [rax+158h] mov esi, [rbp+var_18] lea rdi, [rbp+var_88] mov edx, 7 call rax mov [rbp+var_40], rax cmp [rbp+var_40], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz loc_91E67 lea rax, PSI_server mov rax, [rax] mov rax, [rax+210h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_28] mov rdx, [rbp+var_10] mov ecx, [rbp+var_14] call rax mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] call my_write mov [rbp+var_38], rax mov rax, [rbp+var_30] and rax, 6 cmp rax, 0 jz short loc_91E12 cmp [rbp+var_38], 0 jnz short loc_91DF7 mov rax, [rbp+var_28] mov [rbp+var_98], rax jmp short loc_91E02 loc_91DF7: xor eax, eax mov [rbp+var_98], rax jmp short $+2 loc_91E02: mov rax, [rbp+var_98] mov [rbp+var_90], rax jmp short loc_91E3F loc_91E12: cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh jz short loc_91E26 mov rax, [rbp+var_38] mov [rbp+var_A0], rax jmp short loc_91E31 loc_91E26: xor eax, eax mov [rbp+var_A0], rax jmp short $+2 loc_91E31: mov rax, [rbp+var_A0] mov [rbp+var_90], rax loc_91E3F: lea rax, PSI_server mov rax, [rax] mov rax, [rax+218h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_90] call rax mov rax, [rbp+var_38] mov [rbp+var_8], rax jmp short loc_91E87 loc_91E67: mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] call my_write mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_8], rax loc_91E87: mov rax, [rbp+var_8] add rsp, 0A0h pop rbp retn
long long inline_mysql_file_write_0( long long a1, unsigned int a2, unsigned int a3, long long a4, long long a5, long long a6) { long long v7; // [rsp+0h] [rbp-A0h] long long v8; // [rsp+8h] [rbp-98h] _BYTE v9[72]; // [rsp+18h] [rbp-88h] BYREF long long v10; // [rsp+60h] [rbp-40h] long long v11; // [rsp+68h] [rbp-38h] long long v12; // [rsp+70h] [rbp-30h] long long v13; // [rsp+78h] [rbp-28h] long long v14; // [rsp+80h] [rbp-20h] unsigned int v15; // [rsp+88h] [rbp-18h] unsigned int v16; // [rsp+8Ch] [rbp-14h] long long v17; // [rsp+90h] [rbp-10h] v17 = a1; v16 = a2; v15 = a3; v14 = a4; v13 = a5; v12 = a6; v10 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v9, a3, 7LL); if ( v10 ) { ((void ( *)(long long, long long, long long, _QWORD))PSI_server[66])(v10, v13, v17, v16); v11 = my_write(v15, v14, v13, v12); if ( (v12 & 6) != 0 ) { if ( v11 ) v8 = 0LL; else v8 = v13; ((void ( *)(long long, long long))PSI_server[67])(v10, v8); } else { if ( v11 == -1 ) v7 = 0LL; else v7 = v11; ((void ( *)(long long, long long))PSI_server[67])(v10, v7); } return v11; } else { return my_write(v15, v14, v13, v12); } }
inline_mysql_file_write: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 LEA RAX,[0x3c0238] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x158] MOV ESI,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x88] MOV EDX,0x7 CALL RAX MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x40],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00191e67 LEA RAX,[0x3c0238] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x210] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] CALL RAX MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] CALL 0x001f6d20 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] AND RAX,0x6 CMP RAX,0x0 JZ 0x00191e12 CMP qword ptr [RBP + -0x38],0x0 JNZ 0x00191df7 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x98],RAX JMP 0x00191e02 LAB_00191df7: XOR EAX,EAX MOV qword ptr [RBP + -0x98],RAX JMP 0x00191e02 LAB_00191e02: MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x90],RAX JMP 0x00191e3f LAB_00191e12: CMP qword ptr [RBP + -0x38],-0x1 JZ 0x00191e26 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0xa0],RAX JMP 0x00191e31 LAB_00191e26: XOR EAX,EAX MOV qword ptr [RBP + -0xa0],RAX JMP 0x00191e31 LAB_00191e31: MOV RAX,qword ptr [RBP + -0xa0] MOV qword ptr [RBP + -0x90],RAX LAB_00191e3f: LEA RAX,[0x3c0238] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x90] CALL RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX JMP 0x00191e87 LAB_00191e67: MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] CALL 0x001f6d20 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX LAB_00191e87: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0xa0 POP RBP RET
long inline_mysql_file_write (int8 param_1,int4 param_2,int4 param_3,int8 param_4, long param_5,ulong param_6) { long local_a8; long local_a0; long local_98; int1 local_90 [72]; long local_48; long local_40; ulong local_38; long local_30; int8 local_28; int4 local_20; int4 local_1c; int8 local_18; long local_10; local_38 = param_6; local_30 = param_5; local_28 = param_4; local_20 = param_3; local_1c = param_2; local_18 = param_1; local_48 = (**(code **)(PSI_server + 0x158))(local_90,param_3,7); if (local_48 == 0) { local_10 = my_write(local_20,local_28,local_30,local_38); } else { (**(code **)(PSI_server + 0x210))(local_48,local_30,local_18,local_1c); local_40 = my_write(local_20,local_28,local_30,local_38); if ((local_38 & 6) == 0) { local_a8 = local_40; if (local_40 == -1) { local_a8 = 0; } local_98 = local_a8; } else { if (local_40 == 0) { local_a0 = local_30; } else { local_a0 = 0; } local_98 = local_a0; } (**(code **)(PSI_server + 0x218))(local_48,local_98); local_10 = local_40; } return local_10; }
55,227
evmone::Result evmone::instr::core::create_eof_impl<(evmone::Opcode)236>(evmone::StackTop, long, evmone::ExecutionState&, unsigned char const*&)
corpus-core[P]colibri-stateless/build_O2/_deps/evmone_external-src/lib/evmone/instructions_calls.cpp
Result create_eof_impl( StackTop stack, int64_t gas_left, ExecutionState& state, code_iterator& pos) noexcept { static_assert(Op == OP_EOFCREATE || Op == OP_TXCREATE); if (state.in_static_mode()) return {EVMC_STATIC_MODE_VIOLATION, gas_left}; const auto initcode_hash = (Op == OP_TXCREATE) ? intx::be::store<evmc::bytes32>(stack.pop()) : evmc::bytes32{}; const auto salt = stack.pop(); const auto input_offset_u256 = stack.pop(); const auto input_size_u256 = stack.pop(); const auto endowment = stack.pop(); stack.push(0); // Assume failure. state.return_data.clear(); if (!check_memory(gas_left, state.memory, input_offset_u256, input_size_u256)) return {EVMC_OUT_OF_GAS, gas_left}; constexpr auto pos_advance = (Op == OP_EOFCREATE ? 2 : 1); pos += pos_advance; if (state.msg->depth >= 1024) return {EVMC_SUCCESS, gas_left}; // "Light" failure. if (endowment != 0 && intx::be::load<uint256>(state.host.get_balance(state.msg->recipient)) < endowment) return {EVMC_SUCCESS, gas_left}; // "Light" failure. bytes_view initcontainer; if constexpr (Op == OP_EOFCREATE) { const auto initcontainer_index = pos[-1]; const auto& container = state.original_code; const auto& eof_header = state.analysis.baseline->eof_header(); initcontainer = eof_header.get_container(container, initcontainer_index); } else { auto* tx_initcode = state.get_tx_initcode_by_hash(initcode_hash); // In case initcode was not found, nullptr was returned. if (tx_initcode == nullptr) return {EVMC_SUCCESS, gas_left}; // "Light" failure initcontainer = tx_initcode->code; if (!tx_initcode->is_valid.has_value()) { const auto error_subcont = validate_eof(state.rev, ContainerKind::initcode, initcontainer); tx_initcode->is_valid = (error_subcont == EOFValidationError::success); } if (!*tx_initcode->is_valid) return {EVMC_SUCCESS, gas_left}; // "Light" failure. } const auto input_offset = static_cast<size_t>(input_offset_u256); const auto input_size = static_cast<size_t>(input_size_u256); evmc_message msg{.kind = to_call_kind(Op)}; msg.gas = gas_left - gas_left / 64; if (input_size > 0) { // input_data may be garbage if init_code_size == 0. msg.input_data = &state.memory[input_offset]; msg.input_size = input_size; } msg.sender = state.msg->recipient; msg.depth = state.msg->depth + 1; msg.create2_salt = intx::be::store<evmc::bytes32>(salt); msg.value = intx::be::store<evmc::uint256be>(endowment); // init_code is guaranteed to be non-empty by validation of container sections msg.code = initcontainer.data(); msg.code_size = initcontainer.size(); const auto result = state.host.call(msg); gas_left -= msg.gas - result.gas_left; state.gas_refund += result.gas_refund; state.return_data.assign(result.output_data, result.output_size); if (result.status_code == EVMC_SUCCESS) stack.top() = intx::be::load<uint256>(result.create_address); return {EVMC_SUCCESS, gas_left}; }
O2
cpp
evmone::Result evmone::instr::core::create_eof_impl<(evmone::Opcode)236>(evmone::StackTop, long, evmone::ExecutionState&, unsigned char const*&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1f8, %rsp # imm = 0x1F8 movq %rsi, 0x8(%rsp) movq 0x20(%rdx), %rax testb $0x1, 0x4(%rax) jne 0x4434c movq %rcx, %r12 movq %rdx, %r14 movq %rdi, %rbx leaq 0x100(%rsp), %rdi movq %rbx, %rsi callq 0x3c237 movups -0x20(%rbx), %xmm0 movups -0x10(%rbx), %xmm1 movaps %xmm1, 0xb0(%rsp) movaps %xmm0, 0xa0(%rsp) movups -0x40(%rbx), %xmm0 movups -0x30(%rbx), %xmm1 leaq 0xe0(%rsp), %rdx movaps %xmm1, 0x10(%rdx) movaps %xmm0, (%rdx) movups -0x60(%rbx), %xmm0 movups -0x50(%rbx), %xmm1 leaq 0xc0(%rsp), %rcx movaps %xmm1, 0x10(%rcx) movaps %xmm0, (%rcx) movdqu -0x80(%rbx), %xmm0 movdqu -0x70(%rbx), %xmm1 movdqa %xmm1, 0x40(%rsp) movdqa %xmm0, 0x30(%rsp) pxor %xmm0, %xmm0 movdqu %xmm0, -0x80(%rbx) movdqu %xmm0, -0x70(%rbx) andq $0x0, 0x50(%r14) movq 0x48(%r14), %rax movb $0x0, (%rax) leaq 0x8(%r14), %r15 leaq 0x8(%rsp), %rdi movq %r15, %rsi callq 0x3b250 testb %al, %al je 0x44355 incq (%r12) movq 0x20(%r14), %rax cmpl $0x400, 0x8(%rax) # imm = 0x400 jge 0x4435b leaq 0x2c(%rsp), %rsi andl $0x0, (%rsi) leaq 0x30(%rsp), %rdi callq 0x38f0c testb %al, %al je 0x4430a leaq 0x28(%r14), %rsi movq 0x20(%r14), %rax movl 0x28(%rax), %ecx leaq 0x120(%rsp), %rdx movl %ecx, 0x10(%rdx) movups 0x18(%rax), %xmm0 movaps %xmm0, (%rdx) leaq 0x58(%rsp), %r12 movq %r12, %rdi callq 0x2f46c movdqu (%r12), %xmm0 movdqu 0x10(%r12), %xmm1 movdqa 0x32abf(%rip), %xmm2 # 0x76da0 pshufb %xmm2, %xmm1 leaq 0x140(%rsp), %rdi movdqa %xmm1, (%rdi) pshufb %xmm2, %xmm0 movdqa %xmm0, 0x10(%rdi) leaq 0x30(%rsp), %rsi callq 0x3ad6f testb %al, %al jne 0x4435b leaq 0x100(%rsp), %rsi movq %r14, %rdi callq 0x4450e movq %rax, %r13 testq %rax, %rax je 0x4435b movq (%r13), %rdx movq 0x8(%r13), %rcx cmpb $0x1, 0x11(%r13) movq %rdx, 0x20(%rsp) movq %rcx, 0x18(%rsp) jne 0x4437b xorl %r12d, %r12d movq 0x8(%rsp), %rbp testb $0x1, 0x10(%r13) je 0x44363 jmp 0x443a4 movq %rsi, %rbp pushq $0xb popq %r12 jmp 0x44363 pushq $0x3 popq %r12 jmp 0x4435e xorl %r12d, %r12d movq 0x8(%rsp), %rbp movl %r12d, %eax movq %rbp, %rdx addq $0x1f8, %rsp # imm = 0x1F8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl 0x40(%r14), %edi xorl %r12d, %r12d xorl %esi, %esi callq 0x3dfc1 xorl %ecx, %ecx testl %eax, %eax sete %cl orl $0x100, %ecx # imm = 0x100 movw %cx, 0x10(%r13) movq 0x8(%rsp), %rbp testl %eax, %eax jne 0x44363 leaq 0x48(%r14), %rax movq %rax, 0x10(%rsp) movq 0xe0(%rsp), %r12 movq 0xc0(%rsp), %r13 leaq 0x140(%rsp), %rdi movl $0xb8, %edx xorl %esi, %esi callq 0x221a0 leaq 0x140(%rsp), %rsi movl $0x5, (%rsi) pushq $-0x40 popq %rcx movq %rbp, %rax cqto idivq %rcx addq %rbp, %rax movq %rax, 0x10(%rsi) testq %r13, %r13 je 0x44409 addq (%r15), %r12 movq %r12, 0x180(%rsp) movq %r13, 0x188(%rsp) movq 0x20(%r14), %rax movl 0x28(%rax), %ecx leaq 0x1b0(%rsp), %r15 movl %ecx, -0x34(%r15) movups 0x18(%rax), %xmm0 movups %xmm0, -0x44(%r15) movl 0x8(%rax), %eax incl %eax movl %eax, -0x68(%r15) leaq 0xa0(%rsp), %rsi movq %r15, %rdi callq 0x3c237 leaq 0x58(%rsp), %r12 leaq 0x30(%rsp), %rsi movq %r12, %rdi callq 0x3c237 movdqu (%r12), %xmm0 movdqu 0x10(%r12), %xmm1 movdqu %xmm1, -0x10(%r15) movdqu %xmm0, -0x20(%r15) movq 0x18(%rsp), %rax movq %rax, 0x38(%r15) movq 0x20(%rsp), %rax movq %rax, 0x40(%r15) leaq 0x28(%r14), %rsi leaq 0x58(%rsp), %r15 leaq 0x140(%rsp), %r12 movq %r15, %rdi movq %r12, %rdx callq 0x2f51e movq 0x8(%r15), %rax subq 0x10(%r12), %rax addq %rax, 0x8(%rsp) movq 0x10(%r15), %rax addq %rax, (%r14) movq 0x18(%r15), %rsi movq 0x20(%r15), %rdx movq 0x10(%rsp), %rdi callq 0x42094 cmpl $0x0, 0x58(%rsp) jne 0x444ee movl 0x88(%rsp), %eax bswapl %eax movdqu 0x8c(%rsp), %xmm0 pshufb 0x328c0(%rip), %xmm0 # 0x76da0 movdqu %xmm0, -0x80(%rbx) movq %rax, -0x70(%rbx) andq $0x0, -0x68(%rbx) movq 0x8(%rsp), %rbp leaq 0x58(%rsp), %rdi callq 0x2e864 xorl %r12d, %r12d jmp 0x44363 movq %rax, %rdi callq 0x2e859 nop
_ZN6evmone5instr4core15create_eof_implILNS_6OpcodeE237EEENS_6ResultENS_8StackTopElRNS_14ExecutionStateERPKh: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1F8h mov [rsp+228h+var_220], rsi mov rax, [rdx+20h] test byte ptr [rax+4], 1 jnz loc_4434C mov r12, rcx mov r14, rdx mov rbx, rdi lea rdi, [rsp+228h+var_128] mov rsi, rbx call _ZN4intx2be5storeIN4evmc7bytes32ENS_4uintILj256EEEEET_RKT0_; intx::be::store<evmc::bytes32,intx::uint<256u>>(intx::uint<256u> const&) movups xmm0, xmmword ptr [rbx-20h] movups xmm1, xmmword ptr [rbx-10h] movaps [rsp+228h+var_178], xmm1 movaps [rsp+228h+var_188], xmm0 movups xmm0, xmmword ptr [rbx-40h] movups xmm1, xmmword ptr [rbx-30h] lea rdx, [rsp+228h+var_148] movaps xmmword ptr [rdx+10h], xmm1 movaps xmmword ptr [rdx], xmm0 movups xmm0, xmmword ptr [rbx-60h] movups xmm1, xmmword ptr [rbx-50h] lea rcx, [rsp+228h+var_168] movaps xmmword ptr [rcx+10h], xmm1 movaps xmmword ptr [rcx], xmm0 movdqu xmm0, xmmword ptr [rbx-80h] movdqu xmm1, xmmword ptr [rbx-70h] movdqa [rsp+228h+var_1E8], xmm1 movdqa [rsp+228h+var_1F8], xmm0 pxor xmm0, xmm0 movdqu xmmword ptr [rbx-80h], xmm0 movdqu xmmword ptr [rbx-70h], xmm0 and qword ptr [r14+50h], 0 mov rax, [r14+48h] mov byte ptr [rax], 0 lea r15, [r14+8] lea rdi, [rsp+228h+var_220] mov rsi, r15 call _ZN6evmone12check_memoryERlRNS_6MemoryERKN4intx4uintILj256EEES7_; evmone::check_memory(long &,evmone::Memory &,intx::uint<256u> const&,intx::uint<256u> const&) test al, al jz loc_44355 inc qword ptr [r12] mov rax, [r14+20h] cmp dword ptr [rax+8], 400h jge loc_4435B lea rsi, [rsp+228h+var_1FC] and dword ptr [rsi], 0 lea rdi, [rsp+228h+var_1F8] call _ZN4intxneILj256EivEEbRKNS_4uintIXT_EEERKT0_; intx::operator!=<256u,int,void>(intx::uint<256u> const&,int const&) test al, al jz short loc_4430A lea rsi, [r14+28h] mov rax, [r14+20h] mov ecx, [rax+28h] lea rdx, [rsp+228h+var_108] mov [rdx+10h], ecx movups xmm0, xmmword ptr [rax+18h] movaps xmmword ptr [rdx], xmm0 lea r12, [rsp+228h+var_1D0] mov rdi, r12 call _ZNK4evmc11HostContext11get_balanceERKNS_7addressE; evmc::HostContext::get_balance(evmc::address const&) movdqu xmm0, xmmword ptr [r12] movdqu xmm1, xmmword ptr [r12+10h] movdqa xmm2, cs:xmmword_76DA0 pshufb xmm1, xmm2 lea rdi, [rsp+228h+var_E8] movdqa xmmword ptr [rdi], xmm1 pshufb xmm0, xmm2 movdqa xmmword ptr [rdi+10h], xmm0 lea rsi, [rsp+228h+var_1F8] call _ZN4intxltERKNS_4uintILj256EEES3_; intx::operator<(intx::uint<256u> const&,intx::uint<256u> const&) test al, al jnz short loc_4435B loc_4430A: lea rsi, [rsp+228h+var_128] mov rdi, r14; this call _ZN6evmone14ExecutionState23get_tx_initcode_by_hashERK12evmc_bytes32; evmone::ExecutionState::get_tx_initcode_by_hash(evmc_bytes32 const&) mov r13, rax test rax, rax jz short loc_4435B mov rdx, [r13+0] mov rcx, [r13+8] cmp byte ptr [r13+11h], 1 mov [rsp+228h+var_208], rdx mov [rsp+228h+var_210], rcx jnz short loc_4437B xor r12d, r12d mov rbp, [rsp+228h+var_220] test byte ptr [r13+10h], 1 jz short loc_44363 jmp short loc_443A4 loc_4434C: mov rbp, rsi push 0Bh pop r12 jmp short loc_44363 loc_44355: push 3 pop r12 jmp short loc_4435E loc_4435B: xor r12d, r12d loc_4435E: mov rbp, [rsp+228h+var_220] loc_44363: mov eax, r12d mov rdx, rbp add rsp, 1F8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4437B: mov edi, [r14+40h] xor r12d, r12d xor esi, esi call _ZN6evmone12validate_eofE13evmc_revisionNS_13ContainerKindESt17basic_string_viewIhN4evmc11byte_traitsIhEEE; evmone::validate_eof(evmc_revision,evmone::ContainerKind,std::basic_string_view<uchar,evmc::byte_traits<uchar>>) xor ecx, ecx test eax, eax setz cl or ecx, 100h mov [r13+10h], cx mov rbp, [rsp+228h+var_220] test eax, eax jnz short loc_44363 loc_443A4: lea rax, [r14+48h] mov [rsp+228h+var_218], rax mov r12, [rsp+228h+var_148] mov r13, [rsp+228h+var_168] lea rdi, [rsp+228h+var_E8] mov edx, 0B8h xor esi, esi call _memset lea rsi, [rsp+228h+var_E8] mov dword ptr [rsi], 5 push 0FFFFFFFFFFFFFFC0h pop rcx mov rax, rbp cqo idiv rcx add rax, rbp mov [rsi+10h], rax test r13, r13 jz short loc_44409 add r12, [r15] mov [rsp+228h+var_A8], r12 mov [rsp+228h+var_A0], r13 loc_44409: mov rax, [r14+20h] mov ecx, [rax+28h] lea r15, [rsp+228h+var_78] mov [r15-34h], ecx movups xmm0, xmmword ptr [rax+18h] movups xmmword ptr [r15-44h], xmm0 mov eax, [rax+8] inc eax mov [r15-68h], eax lea rsi, [rsp+228h+var_188] mov rdi, r15 call _ZN4intx2be5storeIN4evmc7bytes32ENS_4uintILj256EEEEET_RKT0_; intx::be::store<evmc::bytes32,intx::uint<256u>>(intx::uint<256u> const&) lea r12, [rsp+228h+var_1D0] lea rsi, [rsp+228h+var_1F8] mov rdi, r12 call _ZN4intx2be5storeIN4evmc7bytes32ENS_4uintILj256EEEEET_RKT0_; intx::be::store<evmc::bytes32,intx::uint<256u>>(intx::uint<256u> const&) movdqu xmm0, xmmword ptr [r12] movdqu xmm1, xmmword ptr [r12+10h] movdqu xmmword ptr [r15-10h], xmm1 movdqu xmmword ptr [r15-20h], xmm0 mov rax, [rsp+228h+var_210] mov [r15+38h], rax mov rax, [rsp+228h+var_208] mov [r15+40h], rax lea rsi, [r14+28h] lea r15, [rsp+228h+var_1D0] lea r12, [rsp+228h+var_E8] mov rdi, r15 mov rdx, r12 call _ZN4evmc11HostContext4callERK12evmc_message; evmc::HostContext::call(evmc_message const&) mov rax, [r15+8] sub rax, [r12+10h] add [rsp+228h+var_220], rax mov rax, [r15+10h] add [r14], rax mov rsi, [r15+18h] mov rdx, [r15+20h] mov rdi, [rsp+228h+var_218] call _ZNSt7__cxx1112basic_stringIhN4evmc11byte_traitsIhEESaIhEE6assignEPKhm; std::basic_string<uchar,evmc::byte_traits<uchar>,std::allocator<uchar>>::assign(uchar const*,ulong) cmp [rsp+228h+var_1D0], 0 jnz short loc_444EE mov eax, [rsp+228h+var_1A0] bswap eax movdqu xmm0, [rsp+228h+var_19C] pshufb xmm0, cs:xmmword_76DA0 movdqu xmmword ptr [rbx-80h], xmm0 mov [rbx-70h], rax and qword ptr [rbx-68h], 0 loc_444EE: mov rbp, [rsp+228h+var_220] lea rdi, [rsp+228h+var_1D0]; this call _ZN4evmc6ResultD2Ev; evmc::Result::~Result() xor r12d, r12d jmp loc_44363 mov rdi, rax call __clang_call_terminate
long long evmone::instr::core::create_eof_impl<(evmone::Opcode)237>( long long a1, long long a2, long long a3, _QWORD *a4) { __int128 v6; // xmm0 __int128 v7; // xmm0 __int128 v8; // xmm0 __m128i v9; // xmm0 long long v10; // rax __m128i v11; // xmm0 __m128i si128; // xmm2 long long tx_initcode_by_hash; // rax long long v14; // r13 unsigned long long v15; // rdx long long v16; // rcx bool v17; // zf unsigned int v18; // r12d long long v19; // rbp int v21; // eax long long v22; // r12 long long v23; // r13 long long v24; // rax __m128i v25; // xmm0 long long v26; // rax long long v27; // [rsp+8h] [rbp-220h] BYREF long long v28; // [rsp+10h] [rbp-218h] long long v29; // [rsp+18h] [rbp-210h] unsigned long long v30; // [rsp+20h] [rbp-208h] int v31; // [rsp+2Ch] [rbp-1FCh] _OWORD v32[2]; // [rsp+30h] [rbp-1F8h] BYREF __m128i v33; // [rsp+58h] [rbp-1D0h] BYREF __m128i v34; // [rsp+68h] [rbp-1C0h] BYREF long long v35; // [rsp+78h] [rbp-1B0h] unsigned int v36; // [rsp+88h] [rbp-1A0h] _DWORD v37[13]; // [rsp+8Ch] [rbp-19Ch] BYREF _OWORD v38[2]; // [rsp+C0h] [rbp-168h] BYREF _OWORD v39[2]; // [rsp+E0h] [rbp-148h] BYREF _OWORD v40[3]; // [rsp+100h] [rbp-128h] BYREF int v41; // [rsp+130h] [rbp-F8h] __m128i v42; // [rsp+140h] [rbp-E8h] BYREF __m128i v43; // [rsp+150h] [rbp-D8h] __int128 v44; // [rsp+16Ch] [rbp-BCh] int v45; // [rsp+17Ch] [rbp-ACh] long long v46; // [rsp+180h] [rbp-A8h] long long v47; // [rsp+188h] [rbp-A0h] __m128i v48; // [rsp+190h] [rbp-98h] __m128i v49; // [rsp+1A0h] [rbp-88h] __int128 v50[3]; // [rsp+1B0h] [rbp-78h] BYREF long long v51; // [rsp+1E8h] [rbp-40h] unsigned long long v52; // [rsp+1F0h] [rbp-38h] v27 = a2; if ( (*(_BYTE *)(*(_QWORD *)(a3 + 32) + 4LL) & 1) != 0 ) return 11; intx::be::store<evmc::bytes32,intx::uint<256u>>(v40); v6 = *(_OWORD *)(a1 - 32); *(_OWORD *)&v37[9] = *(_OWORD *)(a1 - 16); *(_OWORD *)&v37[5] = v6; v7 = *(_OWORD *)(a1 - 64); v39[1] = *(_OWORD *)(a1 - 48); v39[0] = v7; v8 = *(_OWORD *)(a1 - 96); v38[1] = *(_OWORD *)(a1 - 80); v38[0] = v8; v9 = _mm_loadu_si128((const __m128i *)(a1 - 128)); v32[1] = _mm_loadu_si128((const __m128i *)(a1 - 112)); v32[0] = v9; *(_OWORD *)(a1 - 128) = 0LL; *(_OWORD *)(a1 - 112) = 0LL; *(_QWORD *)(a3 + 80) = 0LL; **(_BYTE **)(a3 + 72) = 0; if ( !evmone::check_memory((long long)&v27, a3 + 8, (long long)v39, v38) ) return 3; ++*a4; if ( *(int *)(*(_QWORD *)(a3 + 32) + 8LL) >= 1024 ) return 0; v31 = 0; if ( (unsigned __int8)intx::operator!=<256u,int,void>() ) { v10 = *(_QWORD *)(a3 + 32); v41 = *(_DWORD *)(v10 + 40); v40[2] = *(_OWORD *)(v10 + 24); evmc::HostContext::get_balance(&v33, a3 + 40); v11 = _mm_loadu_si128(&v33); si128 = _mm_load_si128((const __m128i *)&xmmword_76DA0); v42 = _mm_shuffle_epi8(_mm_loadu_si128(&v34), si128); v43 = _mm_shuffle_epi8(v11, si128); if ( intx::operator<((unsigned long long *)&v42, (unsigned long long *)v32) ) return 0; } tx_initcode_by_hash = evmone::ExecutionState::get_tx_initcode_by_hash((evmone::ExecutionState *)a3); v14 = tx_initcode_by_hash; if ( !tx_initcode_by_hash ) return 0; v15 = *(_QWORD *)tx_initcode_by_hash; v16 = *(_QWORD *)(tx_initcode_by_hash + 8); v17 = *(_BYTE *)(tx_initcode_by_hash + 17) == 1; v30 = *(_QWORD *)tx_initcode_by_hash; v29 = v16; if ( v17 ) { v18 = 0; v19 = v27; if ( (*(_BYTE *)(tx_initcode_by_hash + 16) & 1) == 0 ) return v18; } else { v18 = 0; v21 = evmone::validate_eof(*(_DWORD *)(a3 + 64), 0, v15, v16); *(_WORD *)(v14 + 16) = (v21 == 0) | 0x100; v19 = v27; if ( v21 ) return v18; } v28 = a3 + 72; v22 = *(_QWORD *)&v39[0]; v23 = *(_QWORD *)&v38[0]; memset(&v42, 0LL, 184LL); v42.m128i_i32[0] = 5; v43.m128i_i64[0] = v19 + v19 / -64; if ( v23 ) { v46 = *(_QWORD *)(a3 + 8) + v22; v47 = v23; } v24 = *(_QWORD *)(a3 + 32); v45 = *(_DWORD *)(v24 + 40); v44 = *(_OWORD *)(v24 + 24); v42.m128i_i32[2] = *(_DWORD *)(v24 + 8) + 1; intx::be::store<evmc::bytes32,intx::uint<256u>>(v50); intx::be::store<evmc::bytes32,intx::uint<256u>>(&v33); v25 = _mm_loadu_si128(&v33); v49 = _mm_loadu_si128(&v34); v48 = v25; v51 = v29; v52 = v30; evmc::HostContext::call(&v33, a3 + 40); v27 += v33.m128i_i64[1] - v43.m128i_i64[0]; *(_QWORD *)a3 += v34.m128i_i64[0]; std::basic_string<unsigned char,evmc::byte_traits<unsigned char>,std::allocator<unsigned char>>::assign( v28, v34.m128i_i64[1], v35); if ( !v33.m128i_i32[0] ) { v26 = _byteswap_ulong(v36); *(__m128i *)(a1 - 128) = _mm_shuffle_epi8(_mm_loadu_si128((const __m128i *)v37), (__m128i)xmmword_76DA0); *(_QWORD *)(a1 - 112) = v26; *(_QWORD *)(a1 - 104) = 0LL; } evmc::Result::~Result((evmc::Result *)&v33); return 0; }
create_eof_impl<(evmone::Opcode)237>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1f8 MOV qword ptr [RSP + 0x8],RSI MOV RAX,qword ptr [RDX + 0x20] TEST byte ptr [RAX + 0x4],0x1 JNZ 0x0014434c MOV R12,RCX MOV R14,RDX MOV RBX,RDI LEA RDI,[RSP + 0x100] MOV RSI,RBX CALL 0x0013c237 MOVUPS XMM0,xmmword ptr [RBX + -0x20] MOVUPS XMM1,xmmword ptr [RBX + -0x10] MOVAPS xmmword ptr [RSP + 0xb0],XMM1 MOVAPS xmmword ptr [RSP + 0xa0],XMM0 MOVUPS XMM0,xmmword ptr [RBX + -0x40] MOVUPS XMM1,xmmword ptr [RBX + -0x30] LEA RDX,[RSP + 0xe0] MOVAPS xmmword ptr [RDX + 0x10],XMM1 MOVAPS xmmword ptr [RDX],XMM0 MOVUPS XMM0,xmmword ptr [RBX + -0x60] MOVUPS XMM1,xmmword ptr [RBX + -0x50] LEA RCX,[RSP + 0xc0] MOVAPS xmmword ptr [RCX + 0x10],XMM1 MOVAPS xmmword ptr [RCX],XMM0 MOVDQU XMM0,xmmword ptr [RBX + -0x80] MOVDQU XMM1,xmmword ptr [RBX + -0x70] MOVDQA xmmword ptr [RSP + 0x40],XMM1 MOVDQA xmmword ptr [RSP + 0x30],XMM0 PXOR XMM0,XMM0 MOVDQU xmmword ptr [RBX + -0x80],XMM0 MOVDQU xmmword ptr [RBX + -0x70],XMM0 AND qword ptr [R14 + 0x50],0x0 MOV RAX,qword ptr [R14 + 0x48] MOV byte ptr [RAX],0x0 LEA R15,[R14 + 0x8] LEA RDI,[RSP + 0x8] MOV RSI,R15 CALL 0x0013b250 TEST AL,AL JZ 0x00144355 INC qword ptr [R12] MOV RAX,qword ptr [R14 + 0x20] CMP dword ptr [RAX + 0x8],0x400 JGE 0x0014435b LEA RSI,[RSP + 0x2c] AND dword ptr [RSI],0x0 LEA RDI,[RSP + 0x30] CALL 0x00138f0c TEST AL,AL JZ 0x0014430a LEA RSI,[R14 + 0x28] MOV RAX,qword ptr [R14 + 0x20] MOV ECX,dword ptr [RAX + 0x28] LEA RDX,[RSP + 0x120] MOV dword ptr [RDX + 0x10],ECX MOVUPS XMM0,xmmword ptr [RAX + 0x18] MOVAPS xmmword ptr [RDX],XMM0 LEA R12,[RSP + 0x58] MOV RDI,R12 CALL 0x0012f46c MOVDQU XMM0,xmmword ptr [R12] MOVDQU XMM1,xmmword ptr [R12 + 0x10] MOVDQA XMM2,xmmword ptr [0x00176da0] PSHUFB XMM1,XMM2 LEA RDI,[RSP + 0x140] MOVDQA xmmword ptr [RDI],XMM1 PSHUFB XMM0,XMM2 MOVDQA xmmword ptr [RDI + 0x10],XMM0 LEA RSI,[RSP + 0x30] CALL 0x0013ad6f TEST AL,AL JNZ 0x0014435b LAB_0014430a: LEA RSI,[RSP + 0x100] MOV RDI,R14 CALL 0x0014450e LAB_0014431a: MOV R13,RAX TEST RAX,RAX JZ 0x0014435b MOV RDX,qword ptr [R13] MOV RCX,qword ptr [R13 + 0x8] CMP byte ptr [R13 + 0x11],0x1 MOV qword ptr [RSP + 0x20],RDX MOV qword ptr [RSP + 0x18],RCX JNZ 0x0014437b XOR R12D,R12D MOV RBP,qword ptr [RSP + 0x8] TEST byte ptr [R13 + 0x10],0x1 JZ 0x00144363 JMP 0x001443a4 LAB_0014434c: MOV RBP,RSI PUSH 0xb POP R12 JMP 0x00144363 LAB_00144355: PUSH 0x3 POP R12 JMP 0x0014435e LAB_0014435b: XOR R12D,R12D LAB_0014435e: MOV RBP,qword ptr [RSP + 0x8] LAB_00144363: MOV EAX,R12D MOV RDX,RBP ADD RSP,0x1f8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014437b: MOV EDI,dword ptr [R14 + 0x40] XOR R12D,R12D XOR ESI,ESI CALL 0x0013dfc1 XOR ECX,ECX TEST EAX,EAX SETZ CL OR ECX,0x100 MOV word ptr [R13 + 0x10],CX MOV RBP,qword ptr [RSP + 0x8] TEST EAX,EAX JNZ 0x00144363 LAB_001443a4: LEA RAX,[R14 + 0x48] MOV qword ptr [RSP + 0x10],RAX MOV R12,qword ptr [RSP + 0xe0] MOV R13,qword ptr [RSP + 0xc0] LEA RDI,[RSP + 0x140] MOV EDX,0xb8 XOR ESI,ESI CALL 0x001221a0 LEA RSI,[RSP + 0x140] MOV dword ptr [RSI],0x5 PUSH -0x40 POP RCX MOV RAX,RBP CQO IDIV RCX ADD RAX,RBP MOV qword ptr [RSI + 0x10],RAX TEST R13,R13 JZ 0x00144409 ADD R12,qword ptr [R15] MOV qword ptr [RSP + 0x180],R12 MOV qword ptr [RSP + 0x188],R13 LAB_00144409: MOV RAX,qword ptr [R14 + 0x20] MOV ECX,dword ptr [RAX + 0x28] LEA R15,[RSP + 0x1b0] MOV dword ptr [R15 + -0x34],ECX MOVUPS XMM0,xmmword ptr [RAX + 0x18] MOVUPS xmmword ptr [R15 + -0x44],XMM0 MOV EAX,dword ptr [RAX + 0x8] INC EAX MOV dword ptr [R15 + -0x68],EAX LEA RSI,[RSP + 0xa0] MOV RDI,R15 CALL 0x0013c237 LEA R12,[RSP + 0x58] LEA RSI,[RSP + 0x30] MOV RDI,R12 CALL 0x0013c237 MOVDQU XMM0,xmmword ptr [R12] MOVDQU XMM1,xmmword ptr [R12 + 0x10] MOVDQU xmmword ptr [R15 + -0x10],XMM1 MOVDQU xmmword ptr [R15 + -0x20],XMM0 MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [R15 + 0x38],RAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [R15 + 0x40],RAX LEA RSI,[R14 + 0x28] LEA R15,[RSP + 0x58] LEA R12,[RSP + 0x140] MOV RDI,R15 MOV RDX,R12 CALL 0x0012f51e MOV RAX,qword ptr [R15 + 0x8] SUB RAX,qword ptr [R12 + 0x10] ADD qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [R15 + 0x10] ADD qword ptr [R14],RAX MOV RSI,qword ptr [R15 + 0x18] MOV RDX,qword ptr [R15 + 0x20] LAB_001444b4: MOV RDI,qword ptr [RSP + 0x10] CALL 0x00142094 CMP dword ptr [RSP + 0x58],0x0 JNZ 0x001444ee MOV EAX,dword ptr [RSP + 0x88] BSWAP EAX MOVDQU XMM0,xmmword ptr [RSP + 0x8c] PSHUFB XMM0,xmmword ptr [0x00176da0] MOVDQU xmmword ptr [RBX + -0x80],XMM0 MOV qword ptr [RBX + -0x70],RAX AND qword ptr [RBX + -0x68],0x0 LAB_001444ee: MOV RBP,qword ptr [RSP + 0x8] LEA RDI,[RSP + 0x58] CALL 0x0012e864 XOR R12D,R12D JMP 0x00144363
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* evmone::Result evmone::instr::core::create_eof_impl<(evmone::Opcode)237>(evmone::StackTop, long, evmone::ExecutionState&, unsigned char const*&) */ int1 [16] evmone::instr::core::create_eof_impl<(evmone::Opcode)237> (uint *param_1,long param_2,ExecutionState *param_3,long *param_4) { long lVar1; int1 auVar2 [16]; long lVar3; long lVar4; char cVar5; bool bVar6; int iVar7; int8 *puVar8; int8 uVar9; int1 auVar10 [16]; int1 auVar11 [16]; long local_220; ExecutionState *local_218; int8 local_210; int8 local_208; int local_1fc; int8 local_1f8; int8 uStack_1f0; int8 local_1e8; int8 uStack_1e0; int local_1d0; int4 uStack_1cc; long lStack_1c8; long local_1c0; uchar *puStack_1b8; ulong local_1b0; uint local_1a0; int1 local_19c [16]; int8 local_188; int8 uStack_180; int8 local_178; int8 uStack_170; long local_168; int8 uStack_160; int8 local_158; int8 uStack_150; long local_148; int8 uStack_140; int8 local_138; int8 uStack_130; be local_128 [32]; int8 local_108; int8 uStack_100; int4 local_f8; int1 local_e8 [16]; int1 local_d8 [16]; int8 local_bc; int8 uStack_b4; int4 local_ac; long local_a8; long local_a0; long lStack_90; long local_88; uchar *puStack_80; be local_78 [56]; int8 local_40; int8 local_38; local_220 = param_2; if ((*(byte *)(*(long *)(param_3 + 0x20) + 4) & 1) != 0) { uVar9 = 0xb; goto LAB_00144363; } intx::be::store<evmc::bytes32,intx::uint<256u>>(local_128,param_1); local_188 = *(int8 *)(param_1 + -0x20); uStack_180 = *(int8 *)(param_1 + -0x18); local_178 = *(int8 *)(param_1 + -0x10); uStack_170 = *(int8 *)(param_1 + -8); local_148 = *(long *)(param_1 + -0x40); uStack_140 = *(int8 *)(param_1 + -0x38); local_138 = *(int8 *)(param_1 + -0x30); uStack_130 = *(int8 *)(param_1 + -0x28); local_168 = *(long *)(param_1 + -0x60); uStack_160 = *(int8 *)(param_1 + -0x58); local_158 = *(int8 *)(param_1 + -0x50); uStack_150 = *(int8 *)(param_1 + -0x48); local_1f8 = *(int8 *)(param_1 + -0x80); uStack_1f0 = *(int8 *)(param_1 + -0x78); local_1e8 = *(int8 *)(param_1 + -0x70); uStack_1e0 = *(int8 *)(param_1 + -0x68); *(int1 (*) [16])(param_1 + -0x80) = (int1 [16])0x0; *(int1 (*) [16])(param_1 + -0x70) = (int1 [16])0x0; *(int8 *)(param_3 + 0x50) = 0; **(int1 **)(param_3 + 0x48) = 0; cVar5 = check_memory(&local_220,(Memory *)(param_3 + 8),(uint *)&local_148,(uint *)&local_168); if (cVar5 == '\0') { uVar9 = 3; goto LAB_00144363; } *param_4 = *param_4 + 1; if (*(int *)(*(long *)(param_3 + 0x20) + 8) < 0x400) { local_1fc = 0; bVar6 = intx::operator!=((uint *)&local_1f8,&local_1fc); if (bVar6) { lVar1 = *(long *)(param_3 + 0x20); local_f8 = *(int4 *)(lVar1 + 0x28); local_108 = *(int8 *)(lVar1 + 0x18); uStack_100 = *(int8 *)(lVar1 + 0x20); evmc::HostContext::get_balance((HostContext *)&local_1d0,(address *)(param_3 + 0x28)); auVar10._4_4_ = uStack_1cc; auVar10._0_4_ = local_1d0; auVar10._8_8_ = lStack_1c8; auVar2._8_8_ = puStack_1b8; auVar2._0_8_ = local_1c0; local_e8 = pshufb(auVar2,_DAT_00176da0); local_d8 = pshufb(auVar10,_DAT_00176da0); cVar5 = intx::operator<((uint *)local_e8,(uint *)&local_1f8); if (cVar5 != '\0') goto LAB_0014435b; } /* try { // try from 0014430a to 00144319 has its CatchHandler @ 00144505 */ puVar8 = (int8 *) ExecutionState::get_tx_initcode_by_hash(param_3,(evmc_bytes32 *)local_128); if (puVar8 != (int8 *)0x0) { local_208 = *puVar8; local_210 = puVar8[1]; if (*(char *)((long)puVar8 + 0x11) == '\x01') { uVar9 = 0; if ((*(byte *)(puVar8 + 2) & 1) == 0) goto LAB_00144363; } else { /* WARNING: Load size is inaccurate */ uVar9 = 0; iVar7 = validate_eof(*(evmone **)(param_3 + 0x40)); *(ushort *)(puVar8 + 2) = iVar7 == 0 | 0x100; if (iVar7 != 0) goto LAB_00144363; } lVar4 = local_148; lVar3 = local_168; lVar1 = local_220; local_218 = param_3 + 0x48; memset(local_e8,0,0xb8); auVar10 = local_e8; local_e8._0_4_ = 5; auVar2 = local_e8; local_d8._0_8_ = lVar1 / -0x40 + lVar1; if (lVar3 != 0) { local_a8 = lVar4 + *(long *)(param_3 + 8); local_a0 = lVar3; } lVar1 = *(long *)(param_3 + 0x20); local_ac = *(int4 *)(lVar1 + 0x28); local_bc = *(int8 *)(lVar1 + 0x18); uStack_b4 = *(int8 *)(lVar1 + 0x20); local_e8._12_4_ = auVar10._12_4_; local_e8._0_8_ = auVar2._0_8_; local_e8._8_4_ = *(int *)(lVar1 + 8) + 1; intx::be::store<evmc::bytes32,intx::uint<256u>>(local_78,(uint *)&local_188); intx::be::store<evmc::bytes32,intx::uint<256u>>((be *)&local_1d0,(uint *)&local_1f8); local_88 = local_1c0; puStack_80 = puStack_1b8; lStack_90 = lStack_1c8; local_40 = local_210; local_38 = local_208; evmc::HostContext::call((HostContext *)&local_1d0,(evmc_message *)(param_3 + 0x28)); local_220 = local_220 + (lStack_1c8 - local_d8._0_8_); *(long *)param_3 = *(long *)param_3 + local_1c0; /* try { // try from 001444b4 to 001444bd has its CatchHandler @ 00144505 */ std::__cxx11:: basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>>:: assign((basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>> *)local_218,puStack_1b8,local_1b0); lVar1 = local_220; if (local_1d0 == 0) { auVar10 = pshufb(local_19c,_DAT_00176da0); *(int1 (*) [16])(param_1 + -0x80) = auVar10; *(ulong *)(param_1 + -0x70) = (ulong)(local_1a0 >> 0x18 | (local_1a0 & 0xff0000) >> 8 | (local_1a0 & 0xff00) << 8 | local_1a0 << 0x18); *(int8 *)(param_1 + -0x68) = 0; } evmc::Result::~Result((Result *)&local_1d0); uVar9 = 0; local_220 = lVar1; goto LAB_00144363; } } LAB_0014435b: uVar9 = 0; LAB_00144363: auVar11._8_8_ = local_220; auVar11._0_8_ = uVar9; return auVar11; }
55,228
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::push_back(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&)
monkey531[P]llama/common/json.hpp
void push_back(const typename object_t::value_type& val) { // push_back only works for null objects or objects if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_object()))) { JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this)); } // transform null object into an object if (is_null()) { m_data.m_type = value_t::object; m_data.m_value = value_t::object; assert_invariant(); } // add element to object auto res = m_data.m_value.object->insert(val); set_parent(res.first->second); }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::push_back(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %rbx movq %rdi, %r14 movzbl (%rdi), %eax testl %eax, %eax jne 0x7c3f8 movb $0x1, (%r14) movl $0x20, %edi callq 0x18690 xorps %xmm0, %xmm0 movups %xmm0, (%rax) movq $0x0, 0x10(%rax) movq %rax, 0x8(%r14) movq %r14, %rdi movl $0x1, %esi callq 0x3d7c0 jmp 0x7c3fd cmpl $0x1, %eax jne 0x7c411 movq 0x8(%r14), %rdi movq %rbx, %rsi addq $0x30, %rsp popq %rbx popq %r14 popq %rbp jmp 0x7c612 movl $0x20, %edi callq 0x18360 movq %rax, %rbx movq %r14, %rdi callq 0x3deb4 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x30046(%rip), %rsi # 0xac47b leaq 0x10(%rsp), %rdi callq 0x3de2b movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x134, %esi # imm = 0x134 movq %r14, %rcx callq 0x49ade xorl %ebp, %ebp leaq 0x5ee58(%rip), %rsi # 0xdb2b8 leaq -0x302ed(%rip), %rdx # 0x4c17a movq %rbx, %rdi callq 0x18b30 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x7c48d movq 0x20(%rsp), %rsi incq %rsi callq 0x186a0 testb %bpl, %bpl jne 0x7c497 jmp 0x7c49f movq %rax, %r14 movq %rbx, %rdi callq 0x184f0 movq %r14, %rdi callq 0x18b90 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backERKSt4pairIKS9_SD_E: push rbp; char push r14; int push rbx; __int64 sub rsp, 30h mov rbx, rsi mov r14, rdi movzx eax, byte ptr [rdi] test eax, eax jnz short loc_7C3F8 mov byte ptr [r14], 1 mov edi, 20h ; ' '; unsigned __int64 call __Znwm; operator new(ulong) xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 mov qword ptr [rax+10h], 0 mov [r14+8], rax mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) jmp short loc_7C3FD loc_7C3F8: cmp eax, 1 jnz short loc_7C411 loc_7C3FD: mov rdi, [r14+8] mov rsi, rbx add rsp, 30h pop rbx pop r14 pop rbp jmp _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE6insertERKSI_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::insert(std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&) loc_7C411: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUsePushB; "cannot use push_back() with " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 134h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_7C48D mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7C48D: test bpl, bpl jnz short loc_7C497 jmp short loc_7C49F mov r14, rax loc_7C497: mov rdi, rbx; void * call ___cxa_free_exception loc_7C49F: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::push_back( long long a1, long long a2) { long long v2; // rax nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx const char *v5; // [rsp+8h] [rbp-40h] BYREF _QWORD v6[2]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 ) { if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v5 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v6, (long long)"cannot use push_back() with ", &v5); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 308, v6); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } } else { *(_BYTE *)a1 = 1; v2 = operator new(0x20uLL); *(_OWORD *)v2 = 0LL; *(_QWORD *)(v2 + 16) = 0LL; *(_QWORD *)(a1 + 8) = v2; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); } return nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::insert( *(_QWORD *)(a1 + 8), a2); }
push_back: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RSI MOV R14,RDI MOVZX EAX,byte ptr [RDI] TEST EAX,EAX JNZ 0x0017c3f8 MOV byte ptr [R14],0x1 MOV EDI,0x20 CALL 0x00118690 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],0x0 MOV qword ptr [R14 + 0x8],RAX MOV RDI,R14 MOV ESI,0x1 CALL 0x0013d7c0 JMP 0x0017c3fd LAB_0017c3f8: CMP EAX,0x1 JNZ 0x0017c411 LAB_0017c3fd: MOV RDI,qword ptr [R14 + 0x8] MOV RSI,RBX ADD RSP,0x30 POP RBX POP R14 POP RBP JMP 0x0017c612 LAB_0017c411: MOV EDI,0x20 CALL 0x00118360 MOV RBX,RAX MOV RDI,R14 CALL 0x0013deb4 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_0017c42e: LEA RSI,[0x1ac47b] LEA RDI,[RSP + 0x10] CALL 0x0013de2b MOV BPL,0x1 LAB_0017c442: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x134 MOV RCX,R14 CALL 0x00149ade XOR EBP,EBP LEA RSI,[0x1db2b8] LEA RDX,[0x14c17a] MOV RDI,RBX CALL 0x00118b30
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::push_back(std::pair<std::__cxx11::string const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > const&) */ void __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::push_back(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,pair *param_1) { int8 *puVar1; int8 uVar2; char *local_40; detail local_38 [32]; if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0) { *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1; puVar1 = (int8 *)operator_new(0x20); *puVar1 = 0; puVar1[1] = 0; puVar1[2] = 0; *(int8 **)(this + 8) = puVar1; assert_invariant(SUB81(this,0)); } else if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar2 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 0017c42e to 0017c43e has its CatchHandler @ 0017c494 */ detail::concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_38,"cannot use push_back() with ",&local_40); /* try { // try from 0017c442 to 0017c46e has its CatchHandler @ 0017c46f */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x134,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception); } ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::insert(*(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> **)(this + 8),param_1); return; }
55,229
ma_read_cache
eloqsql/storage/maria/ma_cache.c
my_bool _ma_read_cache(MARIA_HA *handler, IO_CACHE *info, uchar *buff, my_off_t pos, size_t length, uint flag) { size_t read_length,in_buff_length; my_off_t offset; uchar *in_buff_pos; DBUG_ENTER("_ma_read_cache"); DBUG_ASSERT(!(info->myflags & MY_ENCRYPT)); if (unlikely(pos >= info->end_of_file) && (flag & READING_HEADER)) DBUG_RETURN(-1); if (pos < info->pos_in_file) { read_length=length; if ((my_off_t) read_length > (my_off_t) (info->pos_in_file-pos)) read_length=(uint) (info->pos_in_file-pos); info->seek_not_done=1; if (mysql_file_pread(info->file,buff,read_length,pos,MYF(MY_NABP))) DBUG_RETURN(1); if (!(length-=read_length)) DBUG_RETURN(0); pos+=read_length; buff+=read_length; } if (pos >= info->pos_in_file && (offset= (my_off_t) (pos - info->pos_in_file)) < (my_off_t) (info->read_end - info->request_pos)) { in_buff_pos=info->request_pos+(uint) offset; in_buff_length= MY_MIN(length,(size_t) (info->read_end-in_buff_pos)); memcpy(buff,info->request_pos+(uint) offset,(size_t) in_buff_length); if (!(length-=in_buff_length)) DBUG_RETURN(0); pos+=in_buff_length; buff+=in_buff_length; } else in_buff_length=0; if (flag & READING_NEXT) { if (pos != (info->pos_in_file + (uint) (info->read_end - info->request_pos))) { info->pos_in_file=pos; /* Force start here */ info->read_pos=info->read_end=info->request_pos; /* Everything used */ info->seek_not_done=1; } else info->read_pos=info->read_end; /* All block used */ if (!_my_b_read(info,buff,length)) DBUG_RETURN(0); read_length=info->error; } else { info->seek_not_done=1; if ((read_length=mysql_file_pread(info->file,buff,length,pos,MYF(0))) == length) DBUG_RETURN(0); } if (!(flag & READING_HEADER) || (int) read_length == -1 || read_length+in_buff_length < 3) { if ((flag & READING_HEADER) && read_length + in_buff_length == 0) DBUG_RETURN(-1); /* End of file */ DBUG_PRINT("error", ("Error %d reading next-multi-part block (Got %d of %d bytes)", my_errno, (int) read_length, (int) length)); if (!my_errno || my_errno == HA_ERR_FILE_TOO_SHORT) { if (!handler->in_check_table) _ma_set_fatal_error(handler, HA_ERR_FILE_TOO_SHORT); if (!my_errno) my_errno= HA_ERR_WRONG_IN_RECORD; } DBUG_RETURN(1); } bzero(buff+read_length,MARIA_BLOCK_INFO_HEADER_LENGTH - in_buff_length - read_length); DBUG_RETURN(0); }
O3
c
ma_read_cache: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movl %r9d, -0x2c(%rbp) movq %rcx, %r13 movq %rdx, %r12 movq %rsi, %rbx movq %rdi, -0x50(%rbp) cmpq %rcx, 0x8(%rsi) jbe 0x7156d movq (%rbx), %rax movq %rax, %rcx subq %r13, %rcx jbe 0x713da cmpq %r8, %rcx movl %ecx, %r15d movq %r8, -0x48(%rbp) cmovaeq %r8, %r15 movl $0x1, 0xe0(%rbx) movl 0xd4(%rbx), %r14d leaq 0x31b053(%rip), %rax # 0x38c3c8 movq (%rax), %rax leaq -0x98(%rbp), %rdi movl %r14d, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax movq %r12, -0x38(%rbp) jne 0x7157c movl $0x4, %r8d movl %r14d, %edi movq %r12, %rsi movq %r15, %rdx movq %r13, %rcx callq 0xa4f3c movq %rax, %r12 movb $0x1, %r14b testq %r12, %r12 movq -0x38(%rbp), %r12 movq -0x48(%rbp), %r8 jne 0x714ff subq %r15, %r8 je 0x714fc addq %r15, %r13 addq %r15, %r12 movq (%rbx), %rax movq %r13, %rcx subq %rax, %rcx jb 0x71426 movq 0x18(%rbx), %r15 movq 0x28(%rbx), %rsi movq %r15, %rax subq %rsi, %rax cmpq %rax, %rcx jae 0x71426 movl %ecx, %eax addq %rax, %rsi subq %rsi, %r15 cmpq %r15, %r8 cmovbq %r8, %r15 movq %r12, %rdi movq %r15, %rdx movq %r8, %r14 callq 0x2a0a0 movq %r14, %r8 subq %r15, %r8 je 0x714fc addq %r15, %r13 addq %r15, %r12 jmp 0x71429 xorl %r15d, %r15d testb $0x1, -0x2c(%rbp) jne 0x71486 movq %r8, %r14 movl $0x1, 0xe0(%rbx) movl 0xd4(%rbx), %ebx leaq 0x31af7f(%rip), %rax # 0x38c3c8 movq (%rax), %rax leaq -0x98(%rbp), %rdi movl %ebx, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x715e1 movl %ebx, %edi movq %r12, %rsi movq %r14, %rdx movq %r13, %rcx xorl %r8d, %r8d callq 0xa4f3c movq %rax, %rbx cmpq %r14, %rbx jne 0x714cb jmp 0x714fc movq 0x18(%rbx), %rcx movq 0x28(%rbx), %rax movl %ecx, %edx subl %eax, %edx addq (%rbx), %rdx cmpq %rdx, %r13 je 0x714ae movq %r13, (%rbx) movq %rax, 0x18(%rbx) movl $0x1, 0xe0(%rbx) movq %rax, %rcx movq %rcx, 0x10(%rbx) movq %rbx, %rdi movq %r12, %rsi movq %r8, %rdx callq 0x976da testl %eax, %eax je 0x714fc movslq 0xe4(%rbx), %rbx testb $0x2, -0x2c(%rbp) je 0x71511 movl %ebx, %eax cmpl $-0x1, %eax je 0x71511 leaq (%rbx,%r15), %rax cmpq $0x2, %rax jbe 0x71511 addq %rbx, %r12 movl $0x14, %edx subq %rax, %rdx xorl %r14d, %r14d movq %r12, %rdi xorl %esi, %esi callq 0x2a290 jmp 0x714ff xorl %r14d, %r14d movl %r14d, %eax addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq testb $0x2, -0x2c(%rbp) je 0x71522 negq %r15 movb $-0x1, %r14b cmpq %r15, %rbx je 0x714ff callq 0xa63fe cmpl $0x0, (%rax) je 0x7153c callq 0xa63fe movb $0x1, %r14b cmpl $0xaf, (%rax) jne 0x714ff movq -0x50(%rbp), %rdi cmpb $0x0, 0x683(%rdi) jne 0x71553 movl $0xaf, %esi callq 0x4056c callq 0xa63fe movb $0x1, %r14b cmpl $0x0, (%rax) jne 0x714ff callq 0xa63fe movl $0x7f, (%rax) jmp 0x714ff movb $-0x1, %r14b testb $0x2, -0x2c(%rbp) je 0x71340 jmp 0x714ff movq %rax, %rcx leaq 0x31ae42(%rip), %rax # 0x38c3c8 movq (%rax), %rax leaq 0x6d4da(%rip), %rdx # 0xdea6a movq %rcx, -0x40(%rbp) movq %rcx, %rdi movq %r15, %rsi movl $0x38, %ecx callq *0x210(%rax) movl $0x4, %r8d movl %r14d, %edi movq %r12, %rsi movq %r15, %rdx movq %r13, %rcx callq 0xa4f3c movq %rax, %r12 xorl %esi, %esi testq %rax, %rax cmoveq %r15, %rsi leaq 0x31adf9(%rip), %rax # 0x38c3c8 movq (%rax), %rax movq -0x40(%rbp), %rdi callq *0x218(%rax) jmp 0x713b4 movq %rax, %rcx leaq 0x31addd(%rip), %rax # 0x38c3c8 movq (%rax), %rax leaq 0x6d475(%rip), %rdx # 0xdea6a movq %rcx, -0x38(%rbp) movq %rcx, %rdi movq %r14, %rsi movl $0x5f, %ecx callq *0x210(%rax) movl %ebx, %edi movq %r12, %rsi movq %r14, %rdx movq %r13, %rcx xorl %r8d, %r8d callq 0xa4f3c movq %rax, %rbx cmpq $-0x1, %rax movl $0x0, %esi cmovneq %rax, %rsi leaq 0x31ad94(%rip), %rax # 0x38c3c8 movq (%rax), %rax movq -0x38(%rbp), %rdi callq *0x218(%rax) jmp 0x7147f nop
_ma_read_cache: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov [rbp+var_2C], r9d mov r13, rcx mov r12, rdx mov rbx, rsi mov [rbp+var_50], rdi cmp [rsi+8], rcx jbe loc_7156D loc_71340: mov rax, [rbx] mov rcx, rax sub rcx, r13 jbe loc_713DA cmp rcx, r8 mov r15d, ecx mov [rbp+var_48], r8 cmovnb r15, r8 mov dword ptr [rbx+0E0h], 1 mov r14d, [rbx+0D4h] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_98] mov esi, r14d mov edx, 6 call qword ptr [rax+158h] test rax, rax mov [rbp+var_38], r12 jnz loc_7157C mov r8d, 4 mov edi, r14d mov rsi, r12 mov rdx, r15 mov rcx, r13 call my_pread mov r12, rax loc_713B4: mov r14b, 1 test r12, r12 mov r12, [rbp+var_38] mov r8, [rbp+var_48] jnz loc_714FF sub r8, r15 jz loc_714FC add r13, r15 add r12, r15 mov rax, [rbx] loc_713DA: mov rcx, r13 sub rcx, rax jb short loc_71426 mov r15, [rbx+18h] mov rsi, [rbx+28h] mov rax, r15 sub rax, rsi cmp rcx, rax jnb short loc_71426 mov eax, ecx add rsi, rax sub r15, rsi cmp r8, r15 cmovb r15, r8 mov rdi, r12 mov rdx, r15 mov r14, r8 call _memcpy mov r8, r14 sub r8, r15 jz loc_714FC add r13, r15 add r12, r15 jmp short loc_71429 loc_71426: xor r15d, r15d loc_71429: test byte ptr [rbp+var_2C], 1 jnz short loc_71486 mov r14, r8 mov dword ptr [rbx+0E0h], 1 mov ebx, [rbx+0D4h] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_98] mov esi, ebx mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz loc_715E1 mov edi, ebx mov rsi, r12 mov rdx, r14 mov rcx, r13 xor r8d, r8d call my_pread mov rbx, rax loc_7147F: cmp rbx, r14 jnz short loc_714CB jmp short loc_714FC loc_71486: mov rcx, [rbx+18h] mov rax, [rbx+28h] mov edx, ecx sub edx, eax add rdx, [rbx] cmp r13, rdx jz short loc_714AE mov [rbx], r13 mov [rbx+18h], rax mov dword ptr [rbx+0E0h], 1 mov rcx, rax loc_714AE: mov [rbx+10h], rcx mov rdi, rbx mov rsi, r12 mov rdx, r8 call _my_b_read test eax, eax jz short loc_714FC movsxd rbx, dword ptr [rbx+0E4h] loc_714CB: test byte ptr [rbp+var_2C], 2 jz short loc_71511 mov eax, ebx cmp eax, 0FFFFFFFFh jz short loc_71511 lea rax, [rbx+r15] cmp rax, 2 jbe short loc_71511 add r12, rbx mov edx, 14h sub rdx, rax xor r14d, r14d mov rdi, r12 xor esi, esi call _memset jmp short loc_714FF loc_714FC: xor r14d, r14d loc_714FF: mov eax, r14d add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_71511: test byte ptr [rbp+var_2C], 2 jz short loc_71522 neg r15 mov r14b, 0FFh cmp rbx, r15 jz short loc_714FF loc_71522: call _my_thread_var cmp dword ptr [rax], 0 jz short loc_7153C call _my_thread_var mov r14b, 1 cmp dword ptr [rax], 0AFh jnz short loc_714FF loc_7153C: mov rdi, [rbp+var_50] cmp byte ptr [rdi+683h], 0 jnz short loc_71553 mov esi, 0AFh call _ma_set_fatal_error loc_71553: call _my_thread_var mov r14b, 1 cmp dword ptr [rax], 0 jnz short loc_714FF call _my_thread_var mov dword ptr [rax], 7Fh jmp short loc_714FF loc_7156D: mov r14b, 0FFh test byte ptr [rbp+var_2C], 2 jz loc_71340 jmp short loc_714FF loc_7157C: mov rcx, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_34; "/workspace/llm4binary/github2025/eloqsq"... mov [rbp+var_40], rcx mov rdi, rcx mov rsi, r15 mov ecx, 38h ; '8' call qword ptr [rax+210h] mov r8d, 4 mov edi, r14d mov rsi, r12 mov rdx, r15 mov rcx, r13 call my_pread mov r12, rax xor esi, esi test rax, rax cmovz rsi, r15 lea rax, PSI_server mov rax, [rax] mov rdi, [rbp+var_40] call qword ptr [rax+218h] jmp loc_713B4 loc_715E1: mov rcx, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_34; "/workspace/llm4binary/github2025/eloqsq"... mov [rbp+var_38], rcx mov rdi, rcx mov rsi, r14 mov ecx, 5Fh ; '_' call qword ptr [rax+210h] mov edi, ebx mov rsi, r12 mov rdx, r14 mov rcx, r13 xor r8d, r8d call my_pread mov rbx, rax cmp rax, 0FFFFFFFFFFFFFFFFh mov esi, 0 cmovnz rsi, rax lea rax, PSI_server mov rax, [rax] mov rdi, [rbp+var_38] call qword ptr [rax+218h] jmp loc_7147F
long long ma_read_cache( _DWORD *a1, long long *a2, const char *a3, unsigned long long a4, unsigned long long a5, int a6) { unsigned long long v6; // r14 unsigned long long v7; // r13 unsigned long long v10; // rax unsigned long long v11; // rcx unsigned long long v12; // r15 long long v13; // rax long long v14; // r12 unsigned long long v15; // rcx long long v16; // rsi long long v17; // rsi unsigned long long v18; // r15 unsigned int v19; // ebx long long v20; // rax long long v21; // rdi const char *v22; // rsi long long v23; // rbx long long v24; // rcx long long v25; // rax long long v27; // rdx long long v28; // rcx long long v29; // r8 int v30; // r9d _DWORD *v31; // rdi unsigned long long v32; // rsi long long v33; // rax _BYTE v34[72]; // [rsp+8h] [rbp-98h] BYREF _DWORD *v35; // [rsp+50h] [rbp-50h] unsigned long long v36; // [rsp+58h] [rbp-48h] long long v37; // [rsp+60h] [rbp-40h] long long v38; // [rsp+68h] [rbp-38h] int v39; // [rsp+74h] [rbp-2Ch] v39 = a6; v7 = a4; v35 = a1; if ( a2[1] <= a4 ) { LOBYTE(v6) = -1; if ( (v39 & 2) != 0 ) return (unsigned int)v6; } v10 = *a2; v11 = *a2 - a4; if ( *a2 > v7 ) { v12 = (unsigned int)v11; v36 = a5; if ( v11 >= a5 ) v12 = a5; *((_DWORD *)a2 + 56) = 1; LODWORD(v6) = *((_DWORD *)a2 + 53); v13 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v34, (unsigned int)v6, 6LL); v38 = (long long)a3; if ( v13 ) { v37 = v13; ((void ( *)(long long, unsigned long long, const char *, long long))PSI_server[66])( v13, v12, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_cache.c", 56LL); v14 = my_pread((unsigned int)v6, a3, v12, v7, 4LL); v32 = 0LL; if ( !v14 ) v32 = v12; ((void ( *)(long long, unsigned long long))PSI_server[67])(v37, v32); } else { v14 = my_pread((unsigned int)v6, a3, v12, v7, 4LL); } LOBYTE(v6) = 1; if ( v14 ) return (unsigned int)v6; a5 = v36 - v12; if ( v36 == v12 ) { LABEL_30: LODWORD(v6) = 0; return (unsigned int)v6; } v7 += v12; a3 = (const char *)(v12 + v38); v10 = *a2; } v15 = v7 - v10; if ( v7 < v10 || (v16 = a2[5], v15 >= a2[3] - v16) ) { v18 = 0LL; } else { v17 = (unsigned int)v15 + v16; v18 = a2[3] - v17; if ( a5 < v18 ) v18 = a5; v6 = a5; memcpy(a3, v17, v18); a5 = v6 - v18; if ( v6 == v18 ) goto LABEL_30; v7 += v18; a3 += v18; } if ( (v39 & 1) != 0 ) { v24 = a2[3]; v25 = a2[5]; if ( v7 != *a2 + (unsigned int)(v24 - v25) ) { *a2 = v7; a2[3] = v25; *((_DWORD *)a2 + 56) = 1; v24 = v25; } a2[2] = v24; v21 = (long long)a2; v22 = a3; if ( !(unsigned int)my_b_read(a2, a3, a5) ) goto LABEL_30; v23 = *((int *)a2 + 57); } else { v6 = a5; *((_DWORD *)a2 + 56) = 1; v19 = *((_DWORD *)a2 + 53); v20 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v34, v19, 6LL); if ( v20 ) { v38 = v20; ((void ( *)(long long, unsigned long long, const char *, long long))PSI_server[66])( v20, v6, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_cache.c", 95LL); v33 = my_pread(v19, a3, v6, v7, 0LL); v23 = v33; v22 = 0LL; if ( v33 != -1 ) v22 = (const char *)v33; v21 = v38; ((void ( *)(long long, const char *))PSI_server[67])(v38, v22); } else { v21 = v19; v22 = a3; v23 = my_pread(v19, a3, v6, v7, 0LL); } if ( v23 == v6 ) goto LABEL_30; } if ( (v39 & 2) == 0 || (_DWORD)v23 == -1 || v23 + v18 <= 2 ) { if ( (v39 & 2) == 0 || (LOBYTE(v6) = -1, v23 != -(long long)v18) ) { if ( !*(_DWORD *)my_thread_var(v21, v22) || (LOBYTE(v6) = 1, *(_DWORD *)my_thread_var(v21, v22) == 175) ) { v31 = v35; if ( !*((_BYTE *)v35 + 1667) ) { v22 = (_BYTE *)(&qword_A8 + 7); ma_set_fatal_error(v35, 175LL, v27, v28, v29, v30); } LOBYTE(v6) = 1; if ( !*(_DWORD *)my_thread_var(v31, v22) ) *(_DWORD *)my_thread_var(v31, v22) = 127; } } } else { LODWORD(v6) = 0; memset(&a3[v23], 0LL, 20 - (v23 + v18)); } return (unsigned int)v6; }
_ma_read_cache: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV dword ptr [RBP + -0x2c],R9D MOV R13,RCX MOV R12,RDX MOV RBX,RSI MOV qword ptr [RBP + -0x50],RDI CMP qword ptr [RSI + 0x8],RCX JBE 0x0017156d LAB_00171340: MOV RAX,qword ptr [RBX] MOV RCX,RAX SUB RCX,R13 JBE 0x001713da CMP RCX,R8 MOV R15D,ECX MOV qword ptr [RBP + -0x48],R8 CMOVNC R15,R8 MOV dword ptr [RBX + 0xe0],0x1 MOV R14D,dword ptr [RBX + 0xd4] LEA RAX,[0x48c3c8] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x98] MOV ESI,R14D MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX MOV qword ptr [RBP + -0x38],R12 JNZ 0x0017157c MOV R8D,0x4 MOV EDI,R14D MOV RSI,R12 MOV RDX,R15 MOV RCX,R13 CALL 0x001a4f3c MOV R12,RAX LAB_001713b4: MOV R14B,0x1 TEST R12,R12 MOV R12,qword ptr [RBP + -0x38] MOV R8,qword ptr [RBP + -0x48] JNZ 0x001714ff SUB R8,R15 JZ 0x001714fc ADD R13,R15 ADD R12,R15 MOV RAX,qword ptr [RBX] LAB_001713da: MOV RCX,R13 SUB RCX,RAX JC 0x00171426 MOV R15,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RBX + 0x28] MOV RAX,R15 SUB RAX,RSI CMP RCX,RAX JNC 0x00171426 MOV EAX,ECX ADD RSI,RAX SUB R15,RSI CMP R8,R15 CMOVC R15,R8 MOV RDI,R12 MOV RDX,R15 MOV R14,R8 CALL 0x0012a0a0 MOV R8,R14 SUB R8,R15 JZ 0x001714fc ADD R13,R15 ADD R12,R15 JMP 0x00171429 LAB_00171426: XOR R15D,R15D LAB_00171429: TEST byte ptr [RBP + -0x2c],0x1 JNZ 0x00171486 MOV R14,R8 MOV dword ptr [RBX + 0xe0],0x1 MOV EBX,dword ptr [RBX + 0xd4] LEA RAX,[0x48c3c8] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x98] MOV ESI,EBX MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x001715e1 MOV EDI,EBX MOV RSI,R12 MOV RDX,R14 MOV RCX,R13 XOR R8D,R8D CALL 0x001a4f3c MOV RBX,RAX LAB_0017147f: CMP RBX,R14 JNZ 0x001714cb JMP 0x001714fc LAB_00171486: MOV RCX,qword ptr [RBX + 0x18] MOV RAX,qword ptr [RBX + 0x28] MOV EDX,ECX SUB EDX,EAX ADD RDX,qword ptr [RBX] CMP R13,RDX JZ 0x001714ae MOV qword ptr [RBX],R13 MOV qword ptr [RBX + 0x18],RAX MOV dword ptr [RBX + 0xe0],0x1 MOV RCX,RAX LAB_001714ae: MOV qword ptr [RBX + 0x10],RCX MOV RDI,RBX MOV RSI,R12 MOV RDX,R8 CALL 0x001976da TEST EAX,EAX JZ 0x001714fc MOVSXD RBX,dword ptr [RBX + 0xe4] LAB_001714cb: TEST byte ptr [RBP + -0x2c],0x2 JZ 0x00171511 MOV EAX,EBX CMP EAX,-0x1 JZ 0x00171511 LEA RAX,[RBX + R15*0x1] CMP RAX,0x2 JBE 0x00171511 ADD R12,RBX MOV EDX,0x14 SUB RDX,RAX XOR R14D,R14D MOV RDI,R12 XOR ESI,ESI CALL 0x0012a290 JMP 0x001714ff LAB_001714fc: XOR R14D,R14D LAB_001714ff: MOV EAX,R14D ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00171511: TEST byte ptr [RBP + -0x2c],0x2 JZ 0x00171522 NEG R15 MOV R14B,0xff CMP RBX,R15 JZ 0x001714ff LAB_00171522: CALL 0x001a63fe CMP dword ptr [RAX],0x0 JZ 0x0017153c CALL 0x001a63fe MOV R14B,0x1 CMP dword ptr [RAX],0xaf JNZ 0x001714ff LAB_0017153c: MOV RDI,qword ptr [RBP + -0x50] CMP byte ptr [RDI + 0x683],0x0 JNZ 0x00171553 MOV ESI,0xaf CALL 0x0014056c LAB_00171553: CALL 0x001a63fe MOV R14B,0x1 CMP dword ptr [RAX],0x0 JNZ 0x001714ff CALL 0x001a63fe MOV dword ptr [RAX],0x7f JMP 0x001714ff LAB_0017156d: MOV R14B,0xff TEST byte ptr [RBP + -0x2c],0x2 JZ 0x00171340 JMP 0x001714ff LAB_0017157c: MOV RCX,RAX LEA RAX,[0x48c3c8] MOV RAX,qword ptr [RAX] LEA RDX,[0x1dea6a] MOV qword ptr [RBP + -0x40],RCX MOV RDI,RCX MOV RSI,R15 MOV ECX,0x38 CALL qword ptr [RAX + 0x210] MOV R8D,0x4 MOV EDI,R14D MOV RSI,R12 MOV RDX,R15 MOV RCX,R13 CALL 0x001a4f3c MOV R12,RAX XOR ESI,ESI TEST RAX,RAX CMOVZ RSI,R15 LEA RAX,[0x48c3c8] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x40] CALL qword ptr [RAX + 0x218] JMP 0x001713b4 LAB_001715e1: MOV RCX,RAX LEA RAX,[0x48c3c8] MOV RAX,qword ptr [RAX] LEA RDX,[0x1dea6a] MOV qword ptr [RBP + -0x38],RCX MOV RDI,RCX MOV RSI,R14 MOV ECX,0x5f CALL qword ptr [RAX + 0x210] MOV EDI,EBX MOV RSI,R12 MOV RDX,R14 MOV RCX,R13 XOR R8D,R8D CALL 0x001a4f3c MOV RBX,RAX CMP RAX,-0x1 MOV ESI,0x0 CMOVNZ RSI,RAX LEA RAX,[0x48c3c8] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x38] CALL qword ptr [RAX + 0x218] JMP 0x0017147f
ulong _ma_read_cache(long param_1,ulong *param_2,void *param_3,ulong param_4,ulong param_5, uint param_6) { int4 uVar1; int iVar2; long lVar3; ulong uVar4; ulong uVar5; int *piVar6; int4 *puVar7; ulong uVar8; ulong uVar9; void *pvVar10; ulong unaff_R14; int1 local_a0 [72]; long local_58; ulong local_50; long local_48; void *local_40; uint local_34; if ((param_2[1] <= param_4) && (unaff_R14 = CONCAT71((int7)(unaff_R14 >> 8),0xff), (param_6 & 2) != 0)) goto LAB_001714ff; uVar4 = *param_2; uVar8 = uVar4 - param_4; local_58 = param_1; local_34 = param_6; if (uVar4 < param_4 || uVar8 == 0) { LAB_001713da: if (param_4 < uVar4) { LAB_00171426: uVar8 = 0; uVar4 = param_5; } else { if (param_2[3] - param_2[5] <= param_4 - uVar4) goto LAB_00171426; pvVar10 = (void *)(param_2[5] + (param_4 - uVar4 & 0xffffffff)); uVar8 = param_2[3] - (long)pvVar10; if (param_5 < uVar8) { uVar8 = param_5; } memcpy(param_3,pvVar10,uVar8); if (param_5 - uVar8 == 0) goto LAB_001714fc; param_4 = param_4 + uVar8; param_3 = (void *)((long)param_3 + uVar8); uVar4 = param_5 - uVar8; unaff_R14 = param_5; } if ((local_34 & 1) == 0) { *(int4 *)(param_2 + 0x1c) = 1; uVar1 = *(int4 *)((long)param_2 + 0xd4); pvVar10 = (void *)(**(code **)(PSI_server + 0x158))(local_a0,uVar1,6); if (pvVar10 == (void *)0x0) { uVar5 = my_pread(uVar1,param_3,uVar4,param_4,0); } else { local_40 = pvVar10; (**(code **)(PSI_server + 0x210)) (pvVar10,uVar4,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_cache.c" ,0x5f); uVar5 = my_pread(uVar1,param_3,uVar4,param_4,0); (**(code **)(PSI_server + 0x218))(local_40); } unaff_R14 = uVar4; if (uVar5 != uVar4) { LAB_001714cb: if ((((local_34 & 2) == 0) || ((int)uVar5 == -1)) || (uVar5 + uVar8 < 3)) { if (((local_34 & 2) == 0) || (unaff_R14 = CONCAT71((int7)(unaff_R14 >> 8),0xff), uVar5 != -uVar8)) { piVar6 = (int *)_my_thread_var(); if (*piVar6 != 0) { piVar6 = (int *)_my_thread_var(); unaff_R14 = CONCAT71((int7)(unaff_R14 >> 8),1); if (*piVar6 != 0xaf) goto LAB_001714ff; } if (*(char *)(local_58 + 0x683) == '\0') { _ma_set_fatal_error(local_58,0xaf); } piVar6 = (int *)_my_thread_var(); unaff_R14 = CONCAT71((int7)(unaff_R14 >> 8),1); if (*piVar6 == 0) { puVar7 = (int4 *)_my_thread_var(); *puVar7 = 0x7f; } } } else { unaff_R14 = 0; memset((void *)((long)param_3 + uVar5),0,0x14 - (uVar5 + uVar8)); } goto LAB_001714ff; } } else { uVar5 = param_2[5]; uVar9 = param_2[3]; if (param_4 != (ulong)(uint)((int)param_2[3] - (int)uVar5) + *param_2) { *param_2 = param_4; param_2[3] = uVar5; *(int4 *)(param_2 + 0x1c) = 1; uVar9 = uVar5; } param_2[2] = uVar9; iVar2 = _my_b_read(param_2,param_3,uVar4); if (iVar2 != 0) { uVar5 = (ulong)*(int *)((long)param_2 + 0xe4); goto LAB_001714cb; } } } else { uVar4 = uVar8 & 0xffffffff; if (param_5 <= uVar8) { uVar4 = param_5; } *(int4 *)(param_2 + 0x1c) = 1; uVar1 = *(int4 *)((long)param_2 + 0xd4); local_50 = param_5; lVar3 = (**(code **)(PSI_server + 0x158))(local_a0,uVar1,6); local_40 = param_3; if (lVar3 == 0) { lVar3 = my_pread(uVar1,param_3,uVar4,param_4,4); } else { local_48 = lVar3; (**(code **)(PSI_server + 0x210)) (lVar3,uVar4,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_cache.c", 0x38); lVar3 = my_pread(uVar1,param_3,uVar4,param_4,4); uVar8 = 0; if (lVar3 == 0) { uVar8 = uVar4; } (**(code **)(PSI_server + 0x218))(local_48,uVar8); } unaff_R14 = CONCAT71((uint7)(uint3)((uint)uVar1 >> 8),1); if (lVar3 != 0) goto LAB_001714ff; param_5 = local_50 - uVar4; if (param_5 != 0) { param_4 = param_4 + uVar4; param_3 = (void *)((long)local_40 + uVar4); uVar4 = *param_2; goto LAB_001713da; } } LAB_001714fc: unaff_R14 = 0; LAB_001714ff: return unaff_R14 & 0xffffffff; }
55,230
my_coll_rule_shift_at_level
eloqsql/strings/ctype-uca.c
static void my_coll_rule_shift_at_level(MY_COLL_RULE *r, int level) { switch (level) { case 4: /* Quaternary difference */ r->diff[3]++; break; case 3: /* Tertiary difference */ r->diff[2]++; r->diff[3]= 0; break; case 2: /* Secondary difference */ r->diff[1]++; r->diff[2]= r->diff[3]= 0; break; case 1: /* Primary difference */ r->diff[0]++; r->diff[1]= r->diff[2]= r->diff[3]= 0; break; case 0: /* Do nothing for '=': use the previous offsets for all levels */ break; default: DBUG_ASSERT(0); } }
O0
c
my_coll_rule_shift_at_level: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl -0xc(%rbp), %eax movq %rax, -0x18(%rbp) subq $0x4, %rax ja 0x6461d movq -0x18(%rbp), %rax leaq 0xf6379(%rip), %rcx # 0x15a8e0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x8(%rbp), %rax movl 0x8c(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x8c(%rax) jmp 0x64623 movq -0x8(%rbp), %rax movl 0x88(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x88(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x8c(%rax) jmp 0x64623 movq -0x8(%rbp), %rax movl 0x84(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x84(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x8c(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x88(%rax) jmp 0x64623 movq -0x8(%rbp), %rax movl 0x80(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x80(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x8c(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x88(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x84(%rax) jmp 0x64623 jmp 0x64623 jmp 0x6461f jmp 0x64621 jmp 0x64623 popq %rbp retq nopw %cs:(%rax,%rax)
my_coll_rule_shift_at_level: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_C], esi mov eax, [rbp+var_C] mov [rbp+var_18], rax sub rax, 4; switch 5 cases ja def_6456E; jumptable 000000000006456E default case mov rax, [rbp+var_18] lea rcx, jpt_6456E movsxd rax, ds:(jpt_6456E - 15A8E0h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_64570: mov rax, [rbp+var_8]; jumptable 000000000006456E case 4 mov ecx, [rax+8Ch] add ecx, 1 mov [rax+8Ch], ecx jmp loc_64623 loc_64588: mov rax, [rbp+var_8]; jumptable 000000000006456E case 3 mov ecx, [rax+88h] add ecx, 1 mov [rax+88h], ecx mov rax, [rbp+var_8] mov dword ptr [rax+8Ch], 0 jmp short loc_64623 loc_645AB: mov rax, [rbp+var_8]; jumptable 000000000006456E case 2 mov ecx, [rax+84h] add ecx, 1 mov [rax+84h], ecx mov rax, [rbp+var_8] mov dword ptr [rax+8Ch], 0 mov rax, [rbp+var_8] mov dword ptr [rax+88h], 0 jmp short loc_64623 loc_645DC: mov rax, [rbp+var_8]; jumptable 000000000006456E case 1 mov ecx, [rax+80h] add ecx, 1 mov [rax+80h], ecx mov rax, [rbp+var_8] mov dword ptr [rax+8Ch], 0 mov rax, [rbp+var_8] mov dword ptr [rax+88h], 0 mov rax, [rbp+var_8] mov dword ptr [rax+84h], 0 jmp short loc_64623 loc_6461B: jmp short loc_64623; jumptable 000000000006456E case 0 def_6456E: jmp short $+2; jumptable 000000000006456E default case loc_6461F: jmp short $+2 loc_64621: jmp short $+2 loc_64623: pop rbp retn
unsigned long long my_coll_rule_shift_at_level(_DWORD *a1, unsigned int a2) { unsigned long long result; // rax result = a2; switch ( a2 ) { case 1u: ++a1[32]; a1[35] = 0; a1[34] = 0; result = (unsigned long long)a1; a1[33] = 0; break; case 2u: ++a1[33]; a1[35] = 0; result = (unsigned long long)a1; a1[34] = 0; break; case 3u: ++a1[34]; result = (unsigned long long)a1; a1[35] = 0; break; case 4u: result = (unsigned long long)a1; ++a1[35]; break; default: return result; } return result; }
my_coll_rule_shift_at_level: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV EAX,dword ptr [RBP + -0xc] MOV qword ptr [RBP + -0x18],RAX SUB RAX,0x4 JA 0x0016461d MOV RAX,qword ptr [RBP + -0x18] LEA RCX,[0x25a8e0] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_4: MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x8c] ADD ECX,0x1 MOV dword ptr [RAX + 0x8c],ECX JMP 0x00164623 caseD_3: MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x88] ADD ECX,0x1 MOV dword ptr [RAX + 0x88],ECX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x8c],0x0 JMP 0x00164623 caseD_2: MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x84] ADD ECX,0x1 MOV dword ptr [RAX + 0x84],ECX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x8c],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x88],0x0 JMP 0x00164623 caseD_1: MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x80] ADD ECX,0x1 MOV dword ptr [RAX + 0x80],ECX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x8c],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x88],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x84],0x0 JMP 0x00164623 caseD_0: JMP 0x00164623 LAB_0016461d: JMP 0x0016461f LAB_0016461f: JMP 0x00164621 LAB_00164621: JMP 0x00164623 default: POP RBP RET
void my_coll_rule_shift_at_level(long param_1,int4 param_2) { switch(param_2) { case 0: break; case 1: *(int *)(param_1 + 0x80) = *(int *)(param_1 + 0x80) + 1; *(int4 *)(param_1 + 0x8c) = 0; *(int4 *)(param_1 + 0x88) = 0; *(int4 *)(param_1 + 0x84) = 0; break; case 2: *(int *)(param_1 + 0x84) = *(int *)(param_1 + 0x84) + 1; *(int4 *)(param_1 + 0x8c) = 0; *(int4 *)(param_1 + 0x88) = 0; break; case 3: *(int *)(param_1 + 0x88) = *(int *)(param_1 + 0x88) + 1; *(int4 *)(param_1 + 0x8c) = 0; break; case 4: *(int *)(param_1 + 0x8c) = *(int *)(param_1 + 0x8c) + 1; } return; }
55,231
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<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::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>>::iteration_proxy_value(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::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>, unsigned long)
monkey531[P]llama/common/json.hpp
explicit iteration_proxy_value(IteratorType it, std::size_t array_index_ = 0) noexcept(std::is_nothrow_move_constructible<IteratorType>::value && std::is_nothrow_default_constructible<string_type>::value) : anchor(std::move(it)) , array_index(array_index_) {}
O1
cpp
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<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::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>>::iteration_proxy_value(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::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>, unsigned long): pushq %rbx movq %rdi, %rbx movups (%rsi), %xmm0 movups 0x10(%rsi), %xmm1 movups %xmm1, 0x10(%rdi) movups %xmm0, (%rdi) movq %rdx, 0x20(%rdi) movq $0x0, 0x28(%rdi) addq $0x30, %rdi leaq 0x40(%rbx), %rax movq %rax, 0x30(%rbx) leaq 0x3e496(%rip), %rsi # 0xf6d33 leaq 0x3e490(%rip), %rdx # 0xf6d34 callq 0x244b0 leaq 0x60(%rbx), %rax movq %rax, 0x50(%rbx) movq $0x0, 0x58(%rbx) movb $0x0, 0x60(%rbx) popq %rbx retq movq %rax, %rdi callq 0x242ab nop
_ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEEC2ESI_m: push rbx mov rbx, rdi movups xmm0, xmmword ptr [rsi] movups xmm1, xmmword ptr [rsi+10h] movups xmmword ptr [rdi+10h], xmm1 movups xmmword ptr [rdi], xmm0 mov [rdi+20h], rdx mov qword ptr [rdi+28h], 0 add rdi, 30h ; '0' lea rax, [rbx+40h] mov [rbx+30h], rax lea rsi, aMinExp0+0Ah; "0" lea rdx, aMinExp0+0Bh; "" 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 rax, [rbx+60h] mov [rbx+50h], rax mov qword ptr [rbx+58h], 0 mov byte ptr [rbx+60h], 0 pop rbx retn mov rdi, rax call __clang_call_terminate
long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<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>>::iteration_proxy_value( long long a1, __int128 *a2, long long a3) { __int128 v3; // xmm0 long long result; // rax v3 = *a2; *(_OWORD *)(a1 + 16) = a2[1]; *(_OWORD *)a1 = v3; *(_QWORD *)(a1 + 32) = a3; *(_QWORD *)(a1 + 40) = 0LL; *(_QWORD *)(a1 + 48) = a1 + 64; std::string::_M_construct<char const*>((_QWORD *)(a1 + 48), "0", (long long)""); result = a1 + 96; *(_QWORD *)(a1 + 80) = a1 + 96; *(_QWORD *)(a1 + 88) = 0LL; *(_BYTE *)(a1 + 96) = 0; return result; }
iteration_proxy_value: PUSH RBX MOV RBX,RDI MOVUPS XMM0,xmmword ptr [RSI] MOVUPS XMM1,xmmword ptr [RSI + 0x10] MOVUPS xmmword ptr [RDI + 0x10],XMM1 MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x20],RDX MOV qword ptr [RDI + 0x28],0x0 ADD RDI,0x30 LEA RAX,[RBX + 0x40] MOV qword ptr [RBX + 0x30],RAX LAB_001b8896: LEA RSI,[0x1f6d33] LEA RDX,[0x1f6d34] CALL 0x001244b0 LEA RAX,[RBX + 0x60] MOV qword ptr [RBX + 0x50],RAX MOV qword ptr [RBX + 0x58],0x0 MOV byte ptr [RBX + 0x60],0x0 POP RBX RET
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<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> >::iteration_proxy_value(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>, unsigned long) */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: iteration_proxy_value<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>> ::iteration_proxy_value (iteration_proxy_value<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>> *this,int4 *param_2,int8 param_3) { int4 uVar1; int4 uVar2; int4 uVar3; int4 uVar4; int4 uVar5; int4 uVar6; int4 uVar7; uVar1 = *param_2; uVar2 = param_2[1]; uVar3 = param_2[2]; uVar4 = param_2[3]; uVar5 = param_2[5]; uVar6 = param_2[6]; uVar7 = param_2[7]; *(int4 *)(this + 0x10) = param_2[4]; *(int4 *)(this + 0x14) = uVar5; *(int4 *)(this + 0x18) = uVar6; *(int4 *)(this + 0x1c) = uVar7; *(int4 *)this = uVar1; *(int4 *)(this + 4) = uVar2; *(int4 *)(this + 8) = uVar3; *(int4 *)(this + 0xc) = uVar4; *(int8 *)(this + 0x20) = param_3; *(int8 *)(this + 0x28) = 0; *(iteration_proxy_value<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>> **)(this + 0x30) = this + 0x40; /* try { // try from 001b8896 to 001b88a8 has its CatchHandler @ 001b88bf */ std::__cxx11::string::_M_construct<char_const*>(this + 0x30,"0",""); *(iteration_proxy_value<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>> **)(this + 0x50) = this + 0x60; *(int8 *)(this + 0x58) = 0; this[0x60] = (iteration_proxy_value<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>> )0x0; return; }
55,232
void cxxopts::values::integer_parser<unsigned long>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long&)
zkingston[P]unknot/build_O1/_deps/cxxopts-src/include/cxxopts.hpp
void integer_parser(const std::string& text, T& value) { parser_tool::IntegerDesc int_desc = parser_tool::SplitInteger(text); using US = typename std::make_unsigned<T>::type; constexpr bool is_signed = std::numeric_limits<T>::is_signed; const bool negative = int_desc.negative.length() > 0; const uint8_t base = int_desc.base.length() > 0 ? 16 : 10; const std::string & value_match = int_desc.value; US result = 0; for (char ch : value_match) { US digit = 0; if (ch >= '0' && ch <= '9') { digit = static_cast<US>(ch - '0'); } else if (base == 16 && ch >= 'a' && ch <= 'f') { digit = static_cast<US>(ch - 'a' + 10); } else if (base == 16 && ch >= 'A' && ch <= 'F') { digit = static_cast<US>(ch - 'A' + 10); } else { throw_or_mimic<exceptions::incorrect_argument_type>(text); } US limit = 0; if (negative) { limit = static_cast<US>(std::abs(static_cast<intmax_t>(std::numeric_limits<T>::min()))); } else { limit = std::numeric_limits<T>::max(); } if (base != 0 && result > limit / base) { throw_or_mimic<exceptions::incorrect_argument_type>(text); } if (result * base > limit - digit) { throw_or_mimic<exceptions::incorrect_argument_type>(text); } result = static_cast<US>(result * base + digit); } detail::check_signed_range<T>(negative, result, text); if (negative) { checked_negate<T>(value, result, text, std::integral_constant<bool, is_signed>()); } else { value = static_cast<T>(result); } }
O1
cpp
void cxxopts::values::integer_parser<unsigned long>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rsi, 0x8(%rsp) movq %rdi, %rbx leaq 0x28(%rsp), %r15 movq %r15, %rdi movq %rbx, %rsi callq 0x2fe19 movq 0x8(%r15), %rax movq 0x48(%r15), %rcx movq %rcx, 0x20(%rsp) testq %rcx, %rcx movq %rax, 0x10(%rsp) je 0x2fd81 movq 0x50(%rsp), %rcx movq 0x68(%rsp), %rdx movq %rdx, 0x18(%rsp) xorl %r12d, %r12d cmpq $0x1, %rax movl $0x0, %r15d sbbq %r15, %r15 movq %rcx, (%rsp) testq %rcx, %rcx movl $0x10, %eax movl $0xa, %r14d cmovneq %rax, %r14 xorl %ebp, %ebp movq 0x18(%rsp), %rax movsbl (%rax,%r12), %r13d leal -0x30(%r13), %eax cmpb $0x9, %al ja 0x2fd0a addl $-0x30, %r13d jmp 0x2fd3f cmpq $0x0, (%rsp) je 0x2fd1f leal -0x61(%r13), %eax cmpb $0x5, %al ja 0x2fd1f addl $-0x57, %r13d jmp 0x2fd3f cmpq $0x0, (%rsp) je 0x2fd34 leal -0x41(%r13), %eax cmpb $0x5, %al ja 0x2fd34 addl $-0x37, %r13d jmp 0x2fd3f xorl %r13d, %r13d movq %rbx, %rdi callq 0x2f145 movq %r15, %rax xorl %edx, %edx divq %r14 cmpq %rax, %rbp jbe 0x2fd54 movq %rbx, %rdi callq 0x2f145 movl %r13d, %r13d imulq %r14, %rbp movq %r15, %rax subq %r13, %rax cmpq %rax, %rbp jbe 0x2fd6e movq %rbx, %rdi callq 0x2f145 addq %r13, %rbp incq %r12 cmpq %r12, 0x20(%rsp) jne 0x2fcf2 jmp 0x2fd83 xorl %ebp, %ebp cmpq $0x0, 0x10(%rsp) je 0x2fd95 movq %rbx, %rdi callq 0x2f145 jmp 0x2fd9d movq 0x8(%rsp), %rax movq %rbp, (%rax) leaq 0x78(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x2fdb8 movq 0x78(%rsp), %rsi incq %rsi callq 0xfa70 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x2fdd3 movq 0x58(%rsp), %rsi incq %rsi callq 0xfa70 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x2fdee movq 0x38(%rsp), %rsi incq %rsi callq 0xfa70 addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x2fe04 jmp 0x2fe04 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x30230 movq %rbx, %rdi callq 0x101c0
_ZN7cxxopts6values14integer_parserImEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERT_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov [rsp+0B8h+var_B0], rsi mov rbx, rdi lea r15, [rsp+0B8h+var_90] mov rdi, r15 mov rsi, rbx call _ZN7cxxopts6values11parser_tool12SplitIntegerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; cxxopts::values::parser_tool::SplitInteger(std::string const&) mov rax, [r15+8] mov rcx, [r15+48h] mov [rsp+0B8h+var_98], rcx test rcx, rcx mov [rsp+0B8h+var_A8], rax jz loc_2FD81 mov rcx, [rsp+0B8h+var_68] mov rdx, [rsp+0B8h+var_50] mov [rsp+0B8h+var_A0], rdx xor r12d, r12d cmp rax, 1 mov r15d, 0 sbb r15, r15 mov [rsp+0B8h+var_B8], rcx test rcx, rcx mov eax, 10h mov r14d, 0Ah cmovnz r14, rax xor ebp, ebp loc_2FCF2: mov rax, [rsp+0B8h+var_A0] movsx r13d, byte ptr [rax+r12] lea eax, [r13-30h] cmp al, 9 ja short loc_2FD0A add r13d, 0FFFFFFD0h jmp short loc_2FD3F loc_2FD0A: cmp [rsp+0B8h+var_B8], 0 jz short loc_2FD1F lea eax, [r13-61h] cmp al, 5 ja short loc_2FD1F add r13d, 0FFFFFFA9h jmp short loc_2FD3F loc_2FD1F: cmp [rsp+0B8h+var_B8], 0 jz short loc_2FD34 lea eax, [r13-41h] cmp al, 5 ja short loc_2FD34 add r13d, 0FFFFFFC9h jmp short loc_2FD3F loc_2FD34: xor r13d, r13d mov rdi, rbx; int call _ZN7cxxopts14throw_or_mimicINS_10exceptions23incorrect_argument_typeEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; cxxopts::throw_or_mimic<cxxopts::exceptions::incorrect_argument_type>(std::string const&) loc_2FD3F: mov rax, r15 xor edx, edx div r14 cmp rbp, rax jbe short loc_2FD54 mov rdi, rbx; int call _ZN7cxxopts14throw_or_mimicINS_10exceptions23incorrect_argument_typeEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; cxxopts::throw_or_mimic<cxxopts::exceptions::incorrect_argument_type>(std::string const&) loc_2FD54: mov r13d, r13d imul rbp, r14 mov rax, r15 sub rax, r13 cmp rbp, rax jbe short loc_2FD6E mov rdi, rbx; int call _ZN7cxxopts14throw_or_mimicINS_10exceptions23incorrect_argument_typeEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; cxxopts::throw_or_mimic<cxxopts::exceptions::incorrect_argument_type>(std::string const&) loc_2FD6E: add rbp, r13 inc r12 cmp [rsp+0B8h+var_98], r12 jnz loc_2FCF2 jmp short loc_2FD83 loc_2FD81: xor ebp, ebp loc_2FD83: cmp [rsp+0B8h+var_A8], 0 jz short loc_2FD95 mov rdi, rbx; int call _ZN7cxxopts14throw_or_mimicINS_10exceptions23incorrect_argument_typeEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; cxxopts::throw_or_mimic<cxxopts::exceptions::incorrect_argument_type>(std::string const&) jmp short loc_2FD9D loc_2FD95: mov rax, [rsp+0B8h+var_B0] mov [rax], rbp loc_2FD9D: lea rax, [rsp+0B8h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_2FDB8 mov rsi, [rsp+0B8h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2FDB8: lea rax, [rsp+0B8h+var_60] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_2FDD3 mov rsi, [rsp+0B8h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2FDD3: lea rax, [rsp+0B8h+var_80] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_2FDEE mov rsi, [rsp+0B8h+var_80] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2FDEE: add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_2FE04 jmp short $+2 loc_2FE04: mov rbx, rax lea rdi, [rsp+arg_20]; this call _ZN7cxxopts6values11parser_tool11IntegerDescD2Ev; cxxopts::values::parser_tool::IntegerDesc::~IntegerDesc() mov rdi, rbx call __Unwind_Resume
void cxxopts::values::integer_parser<unsigned long>(long long a1, unsigned long long *a2) { long long v2; // r12 unsigned long long v3; // r15 unsigned long long v4; // r14 unsigned long long v5; // rbp int v6; // r13d unsigned int v7; // r13d unsigned long long v8; // rbp long long *v9; // [rsp+28h] [rbp-90h] BYREF long long v10; // [rsp+30h] [rbp-88h] long long v11; // [rsp+38h] [rbp-80h] BYREF long long *v12; // [rsp+48h] [rbp-70h] long long v13; // [rsp+50h] [rbp-68h] long long v14; // [rsp+58h] [rbp-60h] BYREF long long *v15; // [rsp+68h] [rbp-50h] long long v16; // [rsp+70h] [rbp-48h] long long v17; // [rsp+78h] [rbp-40h] BYREF cxxopts::values::parser_tool::SplitInteger(&v9, a1); if ( v16 ) { v2 = 0LL; v3 = -(long long)(v10 == 0); v4 = 10LL; if ( v13 ) v4 = 16LL; v5 = 0LL; do { v6 = *((char *)v15 + v2); if ( (unsigned __int8)(*((_BYTE *)v15 + v2) - 48) > 9u ) { if ( v13 && (unsigned __int8)(v6 - 97) <= 5u ) { v7 = v6 - 87; } else { if ( !v13 || (unsigned __int8)(v6 - 65) > 5u ) cxxopts::throw_or_mimic<cxxopts::exceptions::incorrect_argument_type>(a1); v7 = v6 - 55; } } else { v7 = v6 - 48; } if ( v5 > v3 / v4 ) cxxopts::throw_or_mimic<cxxopts::exceptions::incorrect_argument_type>(a1); v8 = v4 * v5; if ( v8 > v3 - v7 ) cxxopts::throw_or_mimic<cxxopts::exceptions::incorrect_argument_type>(a1); v5 = v7 + v8; ++v2; } while ( v16 != v2 ); } else { v5 = 0LL; } if ( v10 ) cxxopts::throw_or_mimic<cxxopts::exceptions::incorrect_argument_type>(a1); *a2 = v5; if ( v15 != &v17 ) operator delete(v15, v17 + 1); if ( v12 != &v14 ) operator delete(v12, v14 + 1); if ( v9 != &v11 ) operator delete(v9, v11 + 1); }
integer_parser<unsigned_long>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOV qword ptr [RSP + 0x8],RSI MOV RBX,RDI LEA R15,[RSP + 0x28] MOV RDI,R15 MOV RSI,RBX CALL 0x0012fe19 MOV RAX,qword ptr [R15 + 0x8] MOV RCX,qword ptr [R15 + 0x48] MOV qword ptr [RSP + 0x20],RCX TEST RCX,RCX MOV qword ptr [RSP + 0x10],RAX JZ 0x0012fd81 MOV RCX,qword ptr [RSP + 0x50] MOV RDX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x18],RDX XOR R12D,R12D CMP RAX,0x1 MOV R15D,0x0 SBB R15,R15 MOV qword ptr [RSP],RCX TEST RCX,RCX MOV EAX,0x10 MOV R14D,0xa CMOVNZ R14,RAX XOR EBP,EBP LAB_0012fcf2: MOV RAX,qword ptr [RSP + 0x18] MOVSX R13D,byte ptr [RAX + R12*0x1] LEA EAX,[R13 + -0x30] CMP AL,0x9 JA 0x0012fd0a ADD R13D,-0x30 JMP 0x0012fd3f LAB_0012fd0a: CMP qword ptr [RSP],0x0 JZ 0x0012fd1f LEA EAX,[R13 + -0x61] CMP AL,0x5 JA 0x0012fd1f ADD R13D,-0x57 JMP 0x0012fd3f LAB_0012fd1f: CMP qword ptr [RSP],0x0 JZ 0x0012fd34 LEA EAX,[R13 + -0x41] CMP AL,0x5 JA 0x0012fd34 ADD R13D,-0x37 JMP 0x0012fd3f LAB_0012fd34: XOR R13D,R13D LAB_0012fd37: MOV RDI,RBX CALL 0x0012f145 LAB_0012fd3f: MOV RAX,R15 XOR EDX,EDX DIV R14 CMP RBP,RAX JBE 0x0012fd54 LAB_0012fd4c: MOV RDI,RBX CALL 0x0012f145 LAB_0012fd54: MOV R13D,R13D IMUL RBP,R14 MOV RAX,R15 SUB RAX,R13 CMP RBP,RAX JBE 0x0012fd6e MOV RDI,RBX CALL 0x0012f145 LAB_0012fd6e: ADD RBP,R13 INC R12 CMP qword ptr [RSP + 0x20],R12 JNZ 0x0012fcf2 JMP 0x0012fd83 LAB_0012fd81: XOR EBP,EBP LAB_0012fd83: CMP qword ptr [RSP + 0x10],0x0 JZ 0x0012fd95 LAB_0012fd8b: MOV RDI,RBX CALL 0x0012f145 LAB_0012fd93: JMP 0x0012fd9d LAB_0012fd95: MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX],RBP LAB_0012fd9d: LEA RAX,[RSP + 0x78] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0012fdb8 MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x0010fa70 LAB_0012fdb8: LEA RAX,[RSP + 0x58] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0012fdd3 MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x0010fa70 LAB_0012fdd3: LEA RAX,[RSP + 0x38] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0012fdee MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x0010fa70 LAB_0012fdee: ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* void cxxopts::values::integer_parser<unsigned long>(std::__cxx11::string const&, unsigned long&) */ void cxxopts::values::integer_parser<unsigned_long>(string *param_1,ulong *param_2) { char cVar1; long *plVar2; ulong uVar3; ulong uVar4; long lVar5; int iVar6; uint uVar7; ulong uVar8; long *local_90; long local_88; long local_80 [2]; long *local_70; long local_68; long local_60 [2]; long *local_50; long local_48; long local_40 [2]; parser_tool::SplitInteger((parser_tool *)&local_90,param_1); plVar2 = local_50; if (local_48 == 0) { uVar4 = 0; } else { lVar5 = 0; uVar8 = 10; if (local_68 != 0) { uVar8 = 0x10; } uVar4 = 0; do { cVar1 = *(char *)((long)plVar2 + lVar5); iVar6 = (int)cVar1; if ((byte)(cVar1 - 0x30U) < 10) { uVar7 = iVar6 - 0x30; } else if ((local_68 == 0) || (5 < (byte)(cVar1 + 0x9fU))) { if ((local_68 == 0) || (5 < (byte)(cVar1 + 0xbfU))) { uVar7 = 0; /* try { // try from 0012fd37 to 0012fd3e has its CatchHandler @ 0012fe02 */ throw_or_mimic<cxxopts::exceptions::incorrect_argument_type>(param_1); } else { uVar7 = iVar6 - 0x37; } } else { uVar7 = iVar6 - 0x57; } if (-(ulong)(local_88 == 0) / uVar8 < uVar4) { /* try { // try from 0012fd4c to 0012fd6d has its CatchHandler @ 0012fe04 */ throw_or_mimic<cxxopts::exceptions::incorrect_argument_type>(param_1); } uVar4 = uVar4 * uVar8; uVar3 = -(ulong)(local_88 == 0) - (ulong)uVar7; if (uVar3 <= uVar4 && uVar4 - uVar3 != 0) { throw_or_mimic<cxxopts::exceptions::incorrect_argument_type>(param_1); } uVar4 = uVar4 + uVar7; lVar5 = lVar5 + 1; } while (local_48 != lVar5); } if (local_88 == 0) { *param_2 = uVar4; } else { /* try { // try from 0012fd8b to 0012fd92 has its CatchHandler @ 0012fe00 */ throw_or_mimic<cxxopts::exceptions::incorrect_argument_type>(param_1); } if (local_50 != local_40) { operator_delete(local_50,local_40[0] + 1); } if (local_70 != local_60) { operator_delete(local_70,local_60[0] + 1); } if (local_90 != local_80) { operator_delete(local_90,local_80[0] + 1); } return; }
55,233
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::next_byte_in_range(std::initializer_list<int>)
llama.cpp/common/json.hpp
bool next_byte_in_range(std::initializer_list<char_int_type> ranges) { JSON_ASSERT(ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6); add(current); for (auto range = ranges.begin(); range != ranges.end(); ++range) { get(); if (JSON_HEDLEY_LIKELY(*range <= current && current <= *(++range))) // NOLINT(bugprone-inc-dec-in-conditions) { add(current); } else { error_message = "invalid string: ill-formed UTF-8 byte"; return false; } } return true; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::next_byte_in_range(std::initializer_list<int>): pushq %rbx subq $0x10, %rsp cmpq $0x6, %rdx ja 0x8958d movl $0x54, %eax btq %rdx, %rax jae 0x8958d leaq 0xf(%rsp), %rbx movq %rbx, %rcx callq 0x23016 movb (%rbx), %al andb $0x1, %al addq $0x10, %rsp popq %rbx retq leaq 0x93684(%rip), %rdi # 0x11cc18 leaq 0x8be4c(%rip), %rdx # 0x1153e7 leaq 0x943b9(%rip), %rcx # 0x11d95b movl $0x1da8, %esi # imm = 0x1DA8 xorl %eax, %eax callq 0x21fe0
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE18next_byte_in_rangeESt16initializer_listIiE: push rbx sub rsp, 10h cmp rdx, 6 ja short loc_8958D mov eax, 54h ; 'T' bt rax, rdx jnb short loc_8958D lea rbx, [rsp+18h+var_9] mov rcx, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE18next_byte_in_rangeESt16initializer_listIiE_cold_1; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::next_byte_in_range(std::initializer_list<int>) [clone] mov al, [rbx] and al, 1 add rsp, 10h pop rbx retn loc_8958D: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRangesSize2Ran; "ranges.size() == 2 || ranges.size() == "... mov esi, 1DA8h xor eax, eax call _ggml_abort
char nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::next_byte_in_range( __m128i *a1, __int32 *a2, unsigned long long a3) { long long v3; // rax long long v5; // rdx long long v6; // rcx char v7[9]; // [rsp+Fh] [rbp-9h] BYREF if ( a3 <= 6 && (v3 = 84LL, _bittest64(&v3, a3)) ) { nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::next_byte_in_range( a1, a2, a3, v7); return v7[0] & 1; } else { ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 7592LL, "GGML_ASSERT(%s) failed", "ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6"); return nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::json_sax_dom_callback_parser( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 7592LL, v5, v6); } }
next_byte_in_range: PUSH RBX SUB RSP,0x10 CMP RDX,0x6 JA 0x0018958d MOV EAX,0x54 BT RAX,RDX JNC 0x0018958d LEA RBX,[RSP + 0xf] MOV RCX,RBX CALL 0x00123016 MOV AL,byte ptr [RBX] AND AL,0x1 ADD RSP,0x10 POP RBX RET LAB_0018958d: LEA RDI,[0x21cc18] LEA RDX,[0x2153e7] LEA RCX,[0x21d95b] MOV ESI,0x1da8 XOR EAX,EAX CALL 0x00121fe0
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::next_byte_in_range(std::initializer_list<int>) */ ulong nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::next_byte_in_range(int8 param_1,int8 param_2,ulong param_3) { int8 uVar1; int1 local_9; if ((param_3 < 7) && ((0x54UL >> (param_3 & 0x3f) & 1) != 0)) { uVar1 = next_byte_in_range(); return CONCAT71((int7)((ulong)uVar1 >> 8),local_9) & 0xffffffffffffff01; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x1da8, "GGML_ASSERT(%s) failed", "ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6"); }
55,234
minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/./minja.hpp
Value do_evaluate(const std::shared_ptr<Context> & context) const override { if (!left) throw std::runtime_error("BinaryOpExpr.left is null"); if (!right) throw std::runtime_error("BinaryOpExpr.right is null"); auto l = left->evaluate(context); auto do_eval = [&](const Value & l) -> Value { if (op == Op::Is || op == Op::IsNot) { auto t = dynamic_cast<VariableExpr*>(right.get()); if (!t) throw std::runtime_error("Right side of 'is' operator must be a variable"); auto eval = [&]() { const auto & name = t->get_name(); if (name == "none") return l.is_null(); if (name == "boolean") return l.is_boolean(); if (name == "integer") return l.is_number_integer(); if (name == "float") return l.is_number_float(); if (name == "number") return l.is_number(); if (name == "string") return l.is_string(); if (name == "mapping") return l.is_object(); if (name == "iterable") return l.is_iterable(); if (name == "sequence") return l.is_array(); if (name == "defined") return !l.is_null(); throw std::runtime_error("Unknown type for 'is' operator: " + name); }; auto value = eval(); return Value(op == Op::Is ? value : !value); } if (op == Op::And) { if (!l.to_bool()) return Value(false); return right->evaluate(context).to_bool(); } else if (op == Op::Or) { if (l.to_bool()) return l; return right->evaluate(context); } auto r = right->evaluate(context); switch (op) { case Op::StrConcat: return l.to_str() + r.to_str(); case Op::Add: return l + r; case Op::Sub: return l - r; case Op::Mul: return l * r; case Op::Div: return l / r; case Op::MulMul: return std::pow(l.get<double>(), r.get<double>()); case Op::DivDiv: return l.get<int64_t>() / r.get<int64_t>(); case Op::Mod: return l.get<int64_t>() % r.get<int64_t>(); case Op::Eq: return l == r; case Op::Ne: return l != r; case Op::Lt: return l < r; case Op::Gt: return l > r; case Op::Le: return l <= r; case Op::Ge: return l >= r; case Op::In: return (r.is_array() || r.is_object()) && r.contains(l); case Op::NotIn: return !(r.is_array() && r.contains(l)); default: break; } throw std::runtime_error("Unknown binary operator"); }; if (l.is_callable()) { return Value::callable([l, do_eval](const std::shared_ptr<Context> & context, ArgumentsValue & args) { auto ll = l.call(context, args); return do_eval(ll); //args[0].second); }); } else { return do_eval(l); } }
O3
cpp
minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0xe8, %rsp movq %rsi, %r15 movq 0x20(%rsi), %rsi testq %rsi, %rsi je 0x57095 cmpq $0x0, 0x30(%r15) je 0x570b3 movq %rdx, %r14 movq %rdi, %rbx leaq 0x38(%rsp), %r12 movq %r12, %rdi callq 0x3d5f2 movq %r15, 0x8(%rsp) movq %r14, 0x10(%rsp) cmpq $0x0, 0x30(%r12) je 0x56fe1 leaq 0x88(%rsp), %rdi leaq 0x38(%rsp), %rsi callq 0x4ed98 movups 0x8(%rsp), %xmm0 leaq 0x88(%rsp), %rsi movups %xmm0, 0x50(%rsi) leaq 0x18(%rsp), %rdi callq 0x57248 leaq 0x18(%rsp), %rsi movq %rbx, %rdi callq 0x571dc movq 0x28(%rsp), %rax testq %rax, %rax je 0x56f71 leaq 0x18(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax leaq 0xc8(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x3d970 movq %r14, %rdi callq 0x4a5c0 movq -0x8(%r14), %rdi testq %rdi, %rdi je 0x56f99 callq 0x2f80e movq 0xb0(%rsp), %rdi testq %rdi, %rdi je 0x56fab callq 0x2f80e movq 0xa0(%rsp), %rdi testq %rdi, %rdi je 0x56fbd callq 0x2f80e movq 0x90(%rsp), %rdi testq %rdi, %rdi je 0x5700a movq 0x98fcf(%rip), %rax # 0xeffa0 cmpb $0x0, (%rax) je 0x56ff5 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x56fff leaq 0x8(%rsp), %rsi leaq 0x38(%rsp), %rdx movq %rbx, %rdi callq 0x57332 jmp 0x5700a movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x5700a movq (%rdi), %rax callq *0x18(%rax) leaq 0x78(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x3d970 movq %r14, %rdi callq 0x4a5c0 movq -0x8(%r14), %rdi testq %rdi, %rdi je 0x5702f callq 0x2f80e movq 0x60(%rsp), %rdi testq %rdi, %rdi je 0x5703e callq 0x2f80e movq 0x50(%rsp), %rdi testq %rdi, %rdi je 0x5704d callq 0x2f80e movq 0x40(%rsp), %rdi testq %rdi, %rdi je 0x57083 movq 0x98f42(%rip), %rax # 0xeffa0 cmpb $0x0, (%rax) je 0x5706e movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x57078 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x57083 movq (%rdi), %rax callq *0x18(%rax) movq %rbx, %rax addq $0xe8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movl $0x10, %edi callq 0x18360 movq %rax, %r14 leaq 0x64319(%rip), %rsi # 0xbb3c2 movq %rax, %rdi callq 0x18270 jmp 0x570cf movl $0x10, %edi callq 0x18360 movq %rax, %r14 leaq 0x64315(%rip), %rsi # 0xbb3dc movq %rax, %rdi callq 0x18270 movq 0x98f1a(%rip), %rsi # 0xefff0 movq 0x98ea3(%rip), %rdx # 0xeff80 movq %r14, %rdi callq 0x18b30 jmp 0x57130 jmp 0x57116 jmp 0x570eb movq %rax, %rbx movq %r14, %rdi callq 0x18500 jmp 0x5713d movq %rax, %rbx movq 0x28(%rsp), %rax testq %rax, %rax je 0x57121 leaq 0x18(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0x57121 movq %rax, %rdi callq 0x2ad73 movq %rax, %rbx leaq 0x88(%rsp), %rdi callq 0x572a6 jmp 0x57133 movq %rax, %rbx leaq 0x38(%rsp), %rdi callq 0x3d8e4 movq %rbx, %rdi callq 0x18b90 nop
_ZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE: push r15 push r14 push r12 push rbx sub rsp, 0E8h mov r15, rsi mov rsi, [rsi+20h] test rsi, rsi jz loc_57095 cmp qword ptr [r15+30h], 0 jz loc_570B3 mov r14, rdx mov rbx, rdi lea r12, [rsp+108h+var_D0] mov rdi, r12 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov qword ptr [rsp+108h+var_100], r15 mov qword ptr [rsp+108h+var_100+8], r14 cmp qword ptr [r12+30h], 0 jz loc_56FE1 lea rdi, [rsp+108h+var_80]; this lea rsi, [rsp+108h+var_D0]; minja::Value * call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&) movups xmm0, [rsp+108h+var_100] lea rsi, [rsp+108h+var_80] movups xmmword ptr [rsi+50h], xmm0 lea rdi, [rsp+108h+var_F0] call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEC2IZNKS0_12BinaryOpExpr11do_evaluateES6_EUlS6_S8_E_vEEOT_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1},void>(minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1} &&) lea rsi, [rsp+108h+var_F0] mov rdi, rbx call _ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE; minja::Value::callable(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&) mov rax, [rsp+108h+var_E0] test rax, rax jz short loc_56F71 lea rdi, [rsp+108h+var_F0] mov rsi, rdi mov edx, 3 call rax loc_56F71: lea r14, [rsp+108h+var_40] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [r14-8] test rdi, rdi jz short loc_56F99 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_56F99: mov rdi, [rsp+108h+var_58] test rdi, rdi jz short loc_56FAB call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_56FAB: mov rdi, [rsp+108h+var_68] test rdi, rdi jz short loc_56FBD call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_56FBD: mov rdi, [rsp+108h+var_78] test rdi, rdi jz short loc_5700A mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_56FF5 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_56FFF loc_56FE1: lea rsi, [rsp+108h+var_100] lea rdx, [rsp+108h+var_D0] mov rdi, rbx; this call _ZZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEEENKUlRKNS_5ValueEE_clES8_; minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1}::operator()(minja::Value const&) jmp short loc_5700A loc_56FF5: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_56FFF: cmp eax, 1 jnz short loc_5700A mov rax, [rdi] call qword ptr [rax+18h] loc_5700A: lea r14, [rsp+108h+var_90] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [r14-8] test rdi, rdi jz short loc_5702F call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5702F: mov rdi, [rsp+108h+var_A8] test rdi, rdi jz short loc_5703E call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5703E: mov rdi, [rsp+108h+var_B8] test rdi, rdi jz short loc_5704D call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5704D: mov rdi, [rsp+108h+var_C8] test rdi, rdi jz short loc_57083 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_5706E mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_57078 loc_5706E: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_57078: cmp eax, 1 jnz short loc_57083 mov rax, [rdi] call qword ptr [rax+18h] loc_57083: mov rax, rbx add rsp, 0E8h pop rbx pop r12 pop r14 pop r15 retn loc_57095: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aBinaryopexprLe; "BinaryOpExpr.left is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_570CF loc_570B3: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aBinaryopexprRi; "BinaryOpExpr.right is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_570CF: mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short loc_57130 jmp short loc_57116 jmp short $+2 loc_570EB: mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_5713D mov rbx, rax mov rax, [rsp+108h+var_E0] test rax, rax jz short loc_57121 lea rdi, [rsp+108h+var_F0] mov rsi, rdi mov edx, 3 call rax jmp short loc_57121 loc_57116: mov rdi, rax call __clang_call_terminate mov rbx, rax loc_57121: lea rdi, [rsp+108h+var_80] call _ZZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEEENUlS5_RNS_14ArgumentsValueEE_D2Ev; minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1}::~ArgumentsValue() jmp short loc_57133 loc_57130: mov rbx, rax loc_57133: lea rdi, [rsp+108h+var_D0]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_5713D: mov rdi, rbx call __Unwind_Resume
minja::Value * minja::BinaryOpExpr::do_evaluate(minja::Value *this, long long a2, long long a3) { void (***v4)(void); // rsi int v7; // edx int v8; // ecx int v9; // r8d int v10; // r9d long long v11; // rdi signed __int32 v12; // eax long long v13; // rdi signed __int32 v14; // eax std::runtime_error *exception; // r14 __int128 v17; // [rsp+8h] [rbp-100h] _BYTE v18[16]; // [rsp+18h] [rbp-F0h] BYREF void ( *v19)(_BYTE *, _BYTE *, long long); // [rsp+28h] [rbp-E0h] _BYTE v20[8]; // [rsp+38h] [rbp-D0h] BYREF long long v21; // [rsp+40h] [rbp-C8h] volatile signed __int32 *v22; // [rsp+50h] [rbp-B8h] volatile signed __int32 *v23; // [rsp+60h] [rbp-A8h] long long v24; // [rsp+68h] [rbp-A0h] volatile signed __int32 *v25; // [rsp+70h] [rbp-98h] void **v26[2]; // [rsp+78h] [rbp-90h] BYREF _BYTE v27[8]; // [rsp+88h] [rbp-80h] BYREF long long v28; // [rsp+90h] [rbp-78h] volatile signed __int32 *v29; // [rsp+A0h] [rbp-68h] volatile signed __int32 *v30; // [rsp+B0h] [rbp-58h] volatile signed __int32 *v31; // [rsp+C0h] [rbp-48h] void **v32[2]; // [rsp+C8h] [rbp-40h] BYREF __int128 v33; // [rsp+D8h] [rbp-30h] v4 = *(void (****)(void))(a2 + 32); if ( !v4 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "BinaryOpExpr.left is null"); goto LABEL_34; } if ( !*(_QWORD *)(a2 + 48) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "BinaryOpExpr.right is null"); LABEL_34: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)v20, v4); *(_QWORD *)&v17 = a2; *((_QWORD *)&v17 + 1) = a3; if ( v24 ) { minja::Value::Value((minja::Value *)v27, (const minja::Value *)v20); v33 = v17; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1},void>(v18); minja::Value::callable((_DWORD)this, (unsigned int)v18, v7, v8, v9, v10); if ( v19 ) v19(v18, v18, 3LL); 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 *)v32); 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(v32); if ( v31 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v31); if ( v30 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v30); if ( v29 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v29); v11 = v28; if ( v28 ) { if ( _libc_single_threaded ) { v12 = *(_DWORD *)(v28 + 12); *(_DWORD *)(v28 + 12) = v12 - 1; } else { v12 = _InterlockedExchangeAdd((volatile signed __int32 *)(v28 + 12), 0xFFFFFFFF); } if ( v12 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v11 + 24LL))(v11, 0LL); } } else { minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)const::{lambda(minja::Value const&)#1}::operator()(this); } 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 *)v26); 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(v26); if ( v25 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v25); if ( v23 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v23); if ( v22 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v22); v13 = v21; if ( v21 ) { if ( _libc_single_threaded ) { v14 = *(_DWORD *)(v21 + 12); *(_DWORD *)(v21 + 12) = v14 - 1; } else { v14 = _InterlockedExchangeAdd((volatile signed __int32 *)(v21 + 12), 0xFFFFFFFF); } if ( v14 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v13 + 24LL))(v13, 0LL); } return this; }
do_evaluate: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV R15,RSI MOV RSI,qword ptr [RSI + 0x20] TEST RSI,RSI JZ 0x00157095 CMP qword ptr [R15 + 0x30],0x0 JZ 0x001570b3 MOV R14,RDX MOV RBX,RDI LEA R12,[RSP + 0x38] MOV RDI,R12 CALL 0x0013d5f2 MOV qword ptr [RSP + 0x8],R15 MOV qword ptr [RSP + 0x10],R14 CMP qword ptr [R12 + 0x30],0x0 JZ 0x00156fe1 LAB_00156f1e: LEA RDI,[RSP + 0x88] LEA RSI,[RSP + 0x38] CALL 0x0014ed98 MOVUPS XMM0,xmmword ptr [RSP + 0x8] LEA RSI,[RSP + 0x88] MOVUPS xmmword ptr [RSI + 0x50],XMM0 LAB_00156f41: LEA RDI,[RSP + 0x18] CALL 0x00157248 LAB_00156f4b: LEA RSI,[RSP + 0x18] MOV RDI,RBX CALL 0x001571dc MOV RAX,qword ptr [RSP + 0x28] TEST RAX,RAX JZ 0x00156f71 LAB_00156f62: LEA RDI,[RSP + 0x18] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_00156f71: LEA R14,[RSP + 0xc8] MOV RDI,R14 XOR ESI,ESI CALL 0x0013d970 MOV RDI,R14 CALL 0x0014a5c0 MOV RDI,qword ptr [R14 + -0x8] TEST RDI,RDI JZ 0x00156f99 CALL 0x0012f80e LAB_00156f99: MOV RDI,qword ptr [RSP + 0xb0] TEST RDI,RDI JZ 0x00156fab CALL 0x0012f80e LAB_00156fab: MOV RDI,qword ptr [RSP + 0xa0] TEST RDI,RDI JZ 0x00156fbd CALL 0x0012f80e LAB_00156fbd: MOV RDI,qword ptr [RSP + 0x90] TEST RDI,RDI JZ 0x0015700a MOV RAX,qword ptr [0x001effa0] CMP byte ptr [RAX],0x0 JZ 0x00156ff5 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x00156fff LAB_00156fe1: LEA RSI,[RSP + 0x8] LEA RDX,[RSP + 0x38] MOV RDI,RBX CALL 0x00157332 LAB_00156ff3: JMP 0x0015700a LAB_00156ff5: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_00156fff: CMP EAX,0x1 JNZ 0x0015700a MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_0015700a: LEA R14,[RSP + 0x78] MOV RDI,R14 XOR ESI,ESI CALL 0x0013d970 MOV RDI,R14 CALL 0x0014a5c0 MOV RDI,qword ptr [R14 + -0x8] TEST RDI,RDI JZ 0x0015702f CALL 0x0012f80e LAB_0015702f: MOV RDI,qword ptr [RSP + 0x60] TEST RDI,RDI JZ 0x0015703e CALL 0x0012f80e LAB_0015703e: MOV RDI,qword ptr [RSP + 0x50] TEST RDI,RDI JZ 0x0015704d CALL 0x0012f80e LAB_0015704d: MOV RDI,qword ptr [RSP + 0x40] TEST RDI,RDI JZ 0x00157083 MOV RAX,qword ptr [0x001effa0] CMP byte ptr [RAX],0x0 JZ 0x0015706e MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x00157078 LAB_0015706e: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_00157078: CMP EAX,0x1 JNZ 0x00157083 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_00157083: MOV RAX,RBX ADD RSP,0xe8 POP RBX POP R12 POP R14 POP R15 RET LAB_00157095: MOV EDI,0x10 CALL 0x00118360 MOV R14,RAX LAB_001570a2: LEA RSI,[0x1bb3c2] MOV RDI,RAX CALL 0x00118270 LAB_001570b1: JMP 0x001570cf LAB_001570b3: MOV EDI,0x10 CALL 0x00118360 MOV R14,RAX LAB_001570c0: LEA RSI,[0x1bb3dc] MOV RDI,RAX CALL 0x00118270 LAB_001570cf: MOV RSI,qword ptr [0x001efff0] MOV RDX,qword ptr [0x001eff80] MOV RDI,R14 CALL 0x00118b30
/* minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */ shared_ptr * minja::BinaryOpExpr::do_evaluate(shared_ptr *param_1) { int *piVar1; int iVar2; runtime_error *this; int8 in_RDX; long in_RSI; long local_100; int8 uStack_f8; _lambda_std__shared_ptr<minja::Context>_const__minja__ArgumentsValue___1_ local_f0 [16]; code *local_e0; Expression local_d0 [8]; long *local_c8; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_b8; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_a8; long local_a0; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_98; data local_90 [16]; Value local_80 [8]; long *local_78; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_68; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48; data local_40 [16]; long local_30; int8 uStack_28; if (*(shared_ptr **)(in_RSI + 0x20) == (shared_ptr *)0x0) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001570a2 to 001570b0 has its CatchHandler @ 001570eb */ std::runtime_error::runtime_error(this,"BinaryOpExpr.left is null"); } else { if (*(long *)(in_RSI + 0x30) != 0) { Expression::evaluate(local_d0,*(shared_ptr **)(in_RSI + 0x20)); if (local_a0 == 0) { /* try { // try from 00156fe1 to 00156ff2 has its CatchHandler @ 001570e5 */ const::{lambda(minja::Value_const&)#1}::operator() ((_lambda_minja__Value_const___1_ *)param_1,(Value *)&local_100); } else { /* try { // try from 00156f1e to 00156f2f has its CatchHandler @ 00157130 */ local_100 = in_RSI; uStack_f8 = in_RDX; minja::Value::Value(local_80,(Value *)local_d0); local_30 = local_100; uStack_28 = uStack_f8; /* try { // try from 00156f41 to 00156f4a has its CatchHandler @ 0015711e */ std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>:: function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context>const&)const::_lambda(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)_1_,void> (local_f0); /* try { // try from 00156f4b to 00156f57 has its CatchHandler @ 001570f8 */ minja::Value::callable((Value *)param_1,local_f0); if (local_e0 != (code *)0x0) { /* try { // try from 00156f62 to 00156f70 has its CatchHandler @ 001570e7 */ (*local_e0)(local_f0,local_f0,3); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_40,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_40); if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48); } if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58); } if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68); } if (local_78 != (long *)0x0) { if (*PTR___libc_single_threaded_001effa0 == '\0') { LOCK(); piVar1 = (int *)((long)local_78 + 0xc); iVar2 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar2 = *(int *)((long)local_78 + 0xc); *(int *)((long)local_78 + 0xc) = iVar2 + -1; } if (iVar2 == 1) { (**(code **)(*local_78 + 0x18))(); } } } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_90,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_90); if (local_98 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_98); } if (local_a8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_a8); } if (local_b8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_b8); } if (local_c8 != (long *)0x0) { if (*PTR___libc_single_threaded_001effa0 == '\0') { LOCK(); piVar1 = (int *)((long)local_c8 + 0xc); iVar2 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar2 = *(int *)((long)local_c8 + 0xc); *(int *)((long)local_c8 + 0xc) = iVar2 + -1; } if (iVar2 == 1) { (**(code **)(*local_c8 + 0x18))(); } } return param_1; } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001570c0 to 001570ce has its CatchHandler @ 001570e9 */ std::runtime_error::runtime_error(this,"BinaryOpExpr.right is null"); } /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001efff0,PTR__runtime_error_001eff80); }
55,235
PAIRING_Commit
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/aggregate.c
static void PAIRING_Commit(PAIRING *ctx) { unsigned int n; if ((n = ctx->nelems) != 0) { if (ctx->ctrl & AGGR_GT_SET) { vec384fp12 GT; miller_loop_n(GT, ctx->Q, ctx->P, n); mul_fp12(ctx->GT, ctx->GT, GT); } else { miller_loop_n(ctx->GT, ctx->Q, ctx->P, n); ctx->ctrl |= AGGR_GT_SET; } ctx->nelems = 0; } }
O0
c
PAIRING_Commit: pushq %rbp movq %rsp, %rbp subq $0x250, %rsp # imm = 0x250 movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movl 0x4(%rax), %eax movl %eax, -0xc(%rbp) cmpl $0x0, %eax je 0x2c2e3 movq -0x8(%rbp), %rax movl (%rax), %eax andl $0x20, %eax cmpl $0x0, %eax je 0x2c2a5 leaq -0x250(%rbp), %rdi movq -0x8(%rbp), %rsi addq $0x378, %rsi # imm = 0x378 movq -0x8(%rbp), %rdx addq $0x978, %rdx # imm = 0x978 movl -0xc(%rbp), %eax movl %eax, %ecx callq 0x2a300 movq -0x8(%rbp), %rdi addq $0x18, %rdi movq -0x8(%rbp), %rsi addq $0x18, %rsi leaq -0x250(%rbp), %rdx callq 0x299e0 jmp 0x2c2d8 movq -0x8(%rbp), %rdi addq $0x18, %rdi movq -0x8(%rbp), %rsi addq $0x378, %rsi # imm = 0x378 movq -0x8(%rbp), %rdx addq $0x978, %rdx # imm = 0x978 movl -0xc(%rbp), %eax movl %eax, %ecx callq 0x2a300 movq -0x8(%rbp), %rax movl (%rax), %ecx orl $0x20, %ecx movl %ecx, (%rax) movq -0x8(%rbp), %rax movl $0x0, 0x4(%rax) addq $0x250, %rsp # imm = 0x250 popq %rbp retq nopl (%rax)
PAIRING_Commit: push rbp mov rbp, rsp sub rsp, 250h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov eax, [rax+4] mov [rbp+var_C], eax cmp eax, 0 jz loc_2C2E3 mov rax, [rbp+var_8] mov eax, [rax] and eax, 20h cmp eax, 0 jz short loc_2C2A5 lea rdi, [rbp+var_250] mov rsi, [rbp+var_8] add rsi, 378h mov rdx, [rbp+var_8] add rdx, 978h mov eax, [rbp+var_C] mov ecx, eax call miller_loop_n mov rdi, [rbp+var_8] add rdi, 18h mov rsi, [rbp+var_8] add rsi, 18h lea rdx, [rbp+var_250] call mul_fp12 jmp short loc_2C2D8 loc_2C2A5: mov rdi, [rbp+var_8] add rdi, 18h mov rsi, [rbp+var_8] add rsi, 378h mov rdx, [rbp+var_8] add rdx, 978h mov eax, [rbp+var_C] mov ecx, eax call miller_loop_n mov rax, [rbp+var_8] mov ecx, [rax] or ecx, 20h mov [rax], ecx loc_2C2D8: mov rax, [rbp+var_8] mov dword ptr [rax+4], 0 loc_2C2E3: add rsp, 250h pop rbp retn
unsigned long long PAIRING_Commit(_DWORD *a1) { unsigned long long result; // rax _BYTE v2[580]; // [rsp+0h] [rbp-250h] BYREF unsigned int v3; // [rsp+244h] [rbp-Ch] _DWORD *v4; // [rsp+248h] [rbp-8h] v4 = a1; result = (unsigned int)a1[1]; v3 = result; if ( (_DWORD)result ) { if ( (*v4 & 0x20) != 0 ) { miller_loop_n((long long)v2, (long long)(v4 + 222), (long long)(v4 + 606), v3); mul_fp12((long long)(v4 + 6), (long long)(v4 + 6), (long long)v2); } else { miller_loop_n((long long)(v4 + 6), (long long)(v4 + 222), (long long)(v4 + 606), v3); *v4 |= 0x20u; } result = (unsigned long long)v4; v4[1] = 0; } return result; }
PAIRING_Commit: PUSH RBP MOV RBP,RSP SUB RSP,0x250 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x4] MOV dword ptr [RBP + -0xc],EAX CMP EAX,0x0 JZ 0x0012c2e3 MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX] AND EAX,0x20 CMP EAX,0x0 JZ 0x0012c2a5 LEA RDI,[RBP + -0x250] MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0x378 MOV RDX,qword ptr [RBP + -0x8] ADD RDX,0x978 MOV EAX,dword ptr [RBP + -0xc] MOV ECX,EAX CALL 0x0012a300 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x18 MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0x18 LEA RDX,[RBP + -0x250] CALL 0x001299e0 JMP 0x0012c2d8 LAB_0012c2a5: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x18 MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0x378 MOV RDX,qword ptr [RBP + -0x8] ADD RDX,0x978 MOV EAX,dword ptr [RBP + -0xc] MOV ECX,EAX CALL 0x0012a300 MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX] OR ECX,0x20 MOV dword ptr [RAX],ECX LAB_0012c2d8: MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x4],0x0 LAB_0012c2e3: ADD RSP,0x250 POP RBP RET
void PAIRING_Commit(uint *param_1) { int1 local_258 [580]; uint local_14; uint *local_10; local_14 = param_1[1]; if (local_14 != 0) { local_10 = param_1; if ((*param_1 & 0x20) == 0) { miller_loop_n(param_1 + 6,param_1 + 0xde,param_1 + 0x25e,local_14); *local_10 = *local_10 | 0x20; } else { miller_loop_n(local_258,param_1 + 0xde,param_1 + 0x25e,local_14); mul_fp12(local_10 + 6,local_10 + 6,local_258); } local_10[1] = 0; } return; }
55,236
PFS_account::aggregate_stats(PFS_user*, PFS_host*)
eloqsql/storage/perfschema/pfs_account.cc
void PFS_account::aggregate_stats(PFS_user *safe_user, PFS_host *safe_host) { if (likely(safe_user != NULL && safe_host != NULL)) { safe_user->m_disconnected_count+= m_disconnected_count; safe_host->m_disconnected_count+= m_disconnected_count; m_disconnected_count= 0; return; } if (safe_user != NULL) { safe_user->m_disconnected_count+= m_disconnected_count; m_disconnected_count= 0; return; } if (safe_host != NULL) { safe_host->m_disconnected_count+= m_disconnected_count; m_disconnected_count= 0; return; } m_disconnected_count= 0; return; }
O0
cpp
PFS_account::aggregate_stats(PFS_user*, PFS_host*): pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x28(%rbp) xorl %eax, %eax cmpq $0x0, -0x10(%rbp) movb %al, -0x19(%rbp) je 0x4fb6f cmpq $0x0, -0x18(%rbp) setne %al movb %al, -0x19(%rbp) movb -0x19(%rbp), %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x4fbbf movq -0x28(%rbp), %rax movq 0xaa0(%rax), %rdx movq -0x10(%rbp), %rcx addq 0x980(%rcx), %rdx movq %rdx, 0x980(%rcx) movq 0xaa0(%rax), %rdx movq -0x18(%rbp), %rcx addq 0x8f8(%rcx), %rdx movq %rdx, 0x8f8(%rcx) movq $0x0, 0xaa0(%rax) jmp 0x4fc30 cmpq $0x0, -0x10(%rbp) je 0x4fbf0 movq -0x28(%rbp), %rax movq 0xaa0(%rax), %rdx movq -0x10(%rbp), %rcx addq 0x980(%rcx), %rdx movq %rdx, 0x980(%rcx) movq $0x0, 0xaa0(%rax) jmp 0x4fc30 cmpq $0x0, -0x18(%rbp) je 0x4fc21 movq -0x28(%rbp), %rax movq 0xaa0(%rax), %rdx movq -0x18(%rbp), %rcx addq 0x8f8(%rcx), %rdx movq %rdx, 0x8f8(%rcx) movq $0x0, 0xaa0(%rax) jmp 0x4fc30 movq -0x28(%rbp), %rax movq $0x0, 0xaa0(%rax) popq %rbp retq nopw %cs:(%rax,%rax)
_ZN11PFS_account15aggregate_statsEP8PFS_userP8PFS_host: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov [rbp+var_28], rax xor eax, eax cmp [rbp+var_10], 0 mov [rbp+var_19], al jz short loc_4FB6F cmp [rbp+var_18], 0 setnz al mov [rbp+var_19], al loc_4FB6F: mov al, [rbp+var_19] and al, 1 movzx eax, al cmp eax, 0 jz short loc_4FBBF mov rax, [rbp+var_28] mov rdx, [rax+0AA0h] mov rcx, [rbp+var_10] add rdx, [rcx+980h] mov [rcx+980h], rdx mov rdx, [rax+0AA0h] mov rcx, [rbp+var_18] add rdx, [rcx+8F8h] mov [rcx+8F8h], rdx mov qword ptr [rax+0AA0h], 0 jmp short loc_4FC30 loc_4FBBF: cmp [rbp+var_10], 0 jz short loc_4FBF0 mov rax, [rbp+var_28] mov rdx, [rax+0AA0h] mov rcx, [rbp+var_10] add rdx, [rcx+980h] mov [rcx+980h], rdx mov qword ptr [rax+0AA0h], 0 jmp short loc_4FC30 loc_4FBF0: cmp [rbp+var_18], 0 jz short loc_4FC21 mov rax, [rbp+var_28] mov rdx, [rax+0AA0h] mov rcx, [rbp+var_18] add rdx, [rcx+8F8h] mov [rcx+8F8h], rdx mov qword ptr [rax+0AA0h], 0 jmp short loc_4FC30 loc_4FC21: mov rax, [rbp+var_28] mov qword ptr [rax+0AA0h], 0 loc_4FC30: pop rbp retn
PFS_account * PFS_account::aggregate_stats(PFS_account *this, PFS_user *a2, PFS_host *a3) { PFS_account *result; // rax bool v4; // [rsp+Fh] [rbp-19h] v4 = 0; if ( a2 ) v4 = a3 != 0LL; if ( v4 ) { result = this; *((_QWORD *)a2 + 304) += *((_QWORD *)this + 340); *((_QWORD *)a3 + 287) += *((_QWORD *)this + 340); *((_QWORD *)this + 340) = 0LL; } else if ( a2 ) { result = this; *((_QWORD *)a2 + 304) += *((_QWORD *)this + 340); *((_QWORD *)this + 340) = 0LL; } else { result = this; if ( a3 ) *((_QWORD *)a3 + 287) += *((_QWORD *)this + 340); *((_QWORD *)this + 340) = 0LL; } return result; }
aggregate_stats: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x28],RAX XOR EAX,EAX CMP qword ptr [RBP + -0x10],0x0 MOV byte ptr [RBP + -0x19],AL JZ 0x0014fb6f CMP qword ptr [RBP + -0x18],0x0 SETNZ AL MOV byte ptr [RBP + -0x19],AL LAB_0014fb6f: MOV AL,byte ptr [RBP + -0x19] AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x0014fbbf MOV RAX,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RAX + 0xaa0] MOV RCX,qword ptr [RBP + -0x10] ADD RDX,qword ptr [RCX + 0x980] MOV qword ptr [RCX + 0x980],RDX MOV RDX,qword ptr [RAX + 0xaa0] MOV RCX,qword ptr [RBP + -0x18] ADD RDX,qword ptr [RCX + 0x8f8] MOV qword ptr [RCX + 0x8f8],RDX MOV qword ptr [RAX + 0xaa0],0x0 JMP 0x0014fc30 LAB_0014fbbf: CMP qword ptr [RBP + -0x10],0x0 JZ 0x0014fbf0 MOV RAX,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RAX + 0xaa0] MOV RCX,qword ptr [RBP + -0x10] ADD RDX,qword ptr [RCX + 0x980] MOV qword ptr [RCX + 0x980],RDX MOV qword ptr [RAX + 0xaa0],0x0 JMP 0x0014fc30 LAB_0014fbf0: CMP qword ptr [RBP + -0x18],0x0 JZ 0x0014fc21 MOV RAX,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RAX + 0xaa0] MOV RCX,qword ptr [RBP + -0x18] ADD RDX,qword ptr [RCX + 0x8f8] MOV qword ptr [RCX + 0x8f8],RDX MOV qword ptr [RAX + 0xaa0],0x0 JMP 0x0014fc30 LAB_0014fc21: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0xaa0],0x0 LAB_0014fc30: POP RBP RET
/* PFS_account::aggregate_stats(PFS_user*, PFS_host*) */ void __thiscall PFS_account::aggregate_stats(PFS_account *this,PFS_user *param_1,PFS_host *param_2) { if (param_1 == (PFS_user *)0x0 || param_2 == (PFS_host *)0x0) { if (param_1 == (PFS_user *)0x0) { if (param_2 == (PFS_host *)0x0) { *(int8 *)(this + 0xaa0) = 0; } else { *(long *)(param_2 + 0x8f8) = *(long *)(this + 0xaa0) + *(long *)(param_2 + 0x8f8); *(int8 *)(this + 0xaa0) = 0; } } else { *(long *)(param_1 + 0x980) = *(long *)(this + 0xaa0) + *(long *)(param_1 + 0x980); *(int8 *)(this + 0xaa0) = 0; } } else { *(long *)(param_1 + 0x980) = *(long *)(this + 0xaa0) + *(long *)(param_1 + 0x980); *(long *)(param_2 + 0x8f8) = *(long *)(this + 0xaa0) + *(long *)(param_2 + 0x8f8); *(int8 *)(this + 0xaa0) = 0; } return; }
55,237
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::find_largest_pow10(unsigned int, unsigned int&)
monkey531[P]llama/common/json.hpp
inline int find_largest_pow10(const std::uint32_t n, std::uint32_t& pow10) { // LCOV_EXCL_START if (n >= 1000000000) { pow10 = 1000000000; return 10; } // LCOV_EXCL_STOP if (n >= 100000000) { pow10 = 100000000; return 9; } if (n >= 10000000) { pow10 = 10000000; return 8; } if (n >= 1000000) { pow10 = 1000000; return 7; } if (n >= 100000) { pow10 = 100000; return 6; } if (n >= 10000) { pow10 = 10000; return 5; } if (n >= 1000) { pow10 = 1000; return 4; } if (n >= 100) { pow10 = 100; return 3; } if (n >= 10) { pow10 = 10; return 2; } pow10 = 1; return 1; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::find_largest_pow10(unsigned int, unsigned int&): cmpl $0x3b9ac9ff, %edi # imm = 0x3B9AC9FF jbe 0x93f85 pushq $0xa popq %rax movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00 jmp 0x9400d cmpl $0x5f5e0ff, %edi # imm = 0x5F5E0FF jbe 0x93f97 pushq $0x9 popq %rax movl $0x5f5e100, %ecx # imm = 0x5F5E100 jmp 0x9400d cmpl $0x98967f, %edi # imm = 0x98967F jbe 0x93fa9 pushq $0x8 popq %rax movl $0x989680, %ecx # imm = 0x989680 jmp 0x9400d cmpl $0xf423f, %edi # imm = 0xF423F jbe 0x93fbb pushq $0x7 popq %rax movl $0xf4240, %ecx # imm = 0xF4240 jmp 0x9400d cmpl $0x1869f, %edi # imm = 0x1869F jbe 0x93fcd pushq $0x6 popq %rax movl $0x186a0, %ecx # imm = 0x186A0 jmp 0x9400d cmpl $0x270f, %edi # imm = 0x270F jbe 0x93fdf pushq $0x5 popq %rax movl $0x2710, %ecx # imm = 0x2710 jmp 0x9400d cmpl $0x3e7, %edi # imm = 0x3E7 jbe 0x93ff1 pushq $0x4 popq %rax movl $0x3e8, %ecx # imm = 0x3E8 jmp 0x9400d cmpl $0x63, %edi jbe 0x93ffe pushq $0x3 popq %rax pushq $0x64 popq %rcx jmp 0x9400d xorl %eax, %eax cmpl $0xa, %edi setae %al leal (%rax,%rax,8), %ecx incl %ecx incl %eax movl %ecx, (%rsi) retq
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl18find_largest_pow10EjRj: cmp edi, 3B9AC9FFh jbe short loc_93F85 push 0Ah pop rax mov ecx, 3B9ACA00h jmp loc_9400D loc_93F85: cmp edi, 5F5E0FFh jbe short loc_93F97 push 9 pop rax mov ecx, 5F5E100h jmp short loc_9400D loc_93F97: cmp edi, 98967Fh jbe short loc_93FA9 push 8 pop rax mov ecx, 989680h jmp short loc_9400D loc_93FA9: cmp edi, offset unk_F423F jbe short loc_93FBB push 7 pop rax mov ecx, offset unk_F4240 jmp short loc_9400D loc_93FBB: cmp edi, 1869Fh jbe short loc_93FCD push 6 pop rax mov ecx, 186A0h jmp short loc_9400D loc_93FCD: cmp edi, 270Fh jbe short loc_93FDF push 5 pop rax mov ecx, 2710h jmp short loc_9400D loc_93FDF: cmp edi, 3E7h jbe short loc_93FF1 push 4 pop rax mov ecx, 3E8h jmp short loc_9400D loc_93FF1: cmp edi, 63h ; 'c' jbe short loc_93FFE push 3 pop rax push 64h ; 'd' pop rcx jmp short loc_9400D loc_93FFE: xor eax, eax cmp edi, 0Ah setnb al lea ecx, [rax+rax*8] inc ecx inc eax loc_9400D: mov [rsi], ecx retn
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::find_largest_pow10( nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this, _DWORD *a2, unsigned int *a3) { long long result; // rax void *v4; // rcx BOOL v5; // eax if ( (unsigned int)this <= 0x3B9AC9FF ) { if ( (unsigned int)this <= 0x5F5E0FF ) { if ( (unsigned int)this <= 0x98967F ) { if ( (unsigned int)this <= (unsigned int)&unk_F423F ) { if ( (unsigned int)this <= 0x1869F ) { if ( (unsigned int)this <= 0x270F ) { if ( (unsigned int)this <= 0x3E7 ) { if ( (unsigned int)this <= 0x63 ) { v5 = (unsigned int)this >= 0xA; LODWORD(v4) = 9 * v5 + 1; result = (unsigned int)(v5 + 1); } else { result = 3LL; LODWORD(v4) = 100; } } else { result = 4LL; LODWORD(v4) = 1000; } } else { result = 5LL; LODWORD(v4) = 10000; } } else { result = 6LL; LODWORD(v4) = 100000; } } else { result = 7LL; v4 = &unk_F4240; } } else { result = 8LL; LODWORD(v4) = 10000000; } } else { result = 9LL; LODWORD(v4) = 100000000; } } else { result = 10LL; LODWORD(v4) = 1000000000; } *a2 = (_DWORD)v4; return result; }
find_largest_pow10: CMP EDI,0x3b9ac9ff JBE 0x00193f85 PUSH 0xa POP RAX MOV ECX,0x3b9aca00 JMP 0x0019400d LAB_00193f85: CMP EDI,0x5f5e0ff JBE 0x00193f97 PUSH 0x9 POP RAX MOV ECX,0x5f5e100 JMP 0x0019400d LAB_00193f97: CMP EDI,0x98967f JBE 0x00193fa9 PUSH 0x8 POP RAX MOV ECX,0x989680 JMP 0x0019400d LAB_00193fa9: CMP EDI,0xf423f JBE 0x00193fbb PUSH 0x7 POP RAX MOV ECX,0xf4240 JMP 0x0019400d LAB_00193fbb: CMP EDI,0x1869f JBE 0x00193fcd PUSH 0x6 POP RAX MOV ECX,0x186a0 JMP 0x0019400d LAB_00193fcd: CMP EDI,0x270f JBE 0x00193fdf PUSH 0x5 POP RAX MOV ECX,0x2710 JMP 0x0019400d LAB_00193fdf: CMP EDI,0x3e7 JBE 0x00193ff1 PUSH 0x4 POP RAX MOV ECX,0x3e8 JMP 0x0019400d LAB_00193ff1: CMP EDI,0x63 JBE 0x00193ffe PUSH 0x3 POP RAX PUSH 0x64 POP RCX JMP 0x0019400d LAB_00193ffe: XOR EAX,EAX CMP EDI,0xa SETNC AL LEA ECX,[RAX + RAX*0x8] INC ECX INC EAX LAB_0019400d: MOV dword ptr [RSI],ECX RET
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::find_largest_pow10(unsigned int, unsigned int&) */ char nlohmann::json_abi_v3_11_3::detail::dtoa_impl::find_largest_pow10(uint param_1,uint *param_2) { char cVar1; uint uVar2; if (param_1 < 1000000000) { if (param_1 < 100000000) { if (param_1 < 10000000) { if (param_1 < 1000000) { if (param_1 < 100000) { if (param_1 < 10000) { if (param_1 < 1000) { if (param_1 < 100) { uVar2 = (uint)(9 < param_1) * 9 + 1; cVar1 = (9 < param_1) + '\x01'; } else { cVar1 = '\x03'; uVar2 = 100; } } else { cVar1 = '\x04'; uVar2 = 1000; } } else { cVar1 = '\x05'; uVar2 = 10000; } } else { cVar1 = '\x06'; uVar2 = 100000; } } else { cVar1 = '\a'; uVar2 = 1000000; } } else { cVar1 = '\b'; uVar2 = 10000000; } } else { cVar1 = '\t'; uVar2 = 100000000; } } else { cVar1 = '\n'; uVar2 = 1000000000; } *param_2 = uVar2; return cVar1; }
55,238
minja::ForTemplateToken::ForTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, bool)
monkey531[P]llama/common/minja.hpp
ForTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, const std::vector<std::string> & vns, std::shared_ptr<Expression> && iter, std::shared_ptr<Expression> && c, bool r) : TemplateToken(Type::For, location, pre, post), var_names(vns), iterable(std::move(iter)), condition(std::move(c)), recursive(r) {}
O2
cpp
minja::ForTemplateToken::ForTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, bool): pushq %r15 pushq %r14 pushq %rbx movq %r9, %r14 movq %r8, %r15 movl %ecx, %r8d movl %edx, %ecx movq %rsi, %rdx movq %rdi, %rbx pushq $0x6 popq %rsi callq 0xce2c4 leaq 0x8ca87(%rip), %rax # 0x1661b0 addq $0x10, %rax movq %rax, (%rbx) leaq 0x30(%rbx), %rdi movq %r15, %rsi callq 0x46ce0 movb 0x28(%rsp), %al movq 0x20(%rsp), %rcx andq $0x0, 0x50(%rbx) movups (%r14), %xmm0 andq $0x0, 0x8(%r14) movups %xmm0, 0x48(%rbx) andq $0x0, (%r14) andq $0x0, 0x60(%rbx) movups (%rcx), %xmm0 andq $0x0, 0x8(%rcx) movups %xmm0, 0x58(%rbx) andq $0x0, (%rcx) movb %al, 0x68(%rbx) popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq %rbx, %rdi callq 0xd9f86 movq %r14, %rdi callq 0x293c0
_ZN5minja16ForTemplateTokenC2ERKNS_8LocationENS_13SpaceHandlingES4_RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISB_EEOSt10shared_ptrINS_10ExpressionEESJ_b: push r15 push r14 push rbx mov r14, r9 mov r15, r8 mov r8d, ecx mov ecx, edx mov rdx, rsi mov rbx, rdi push 6 pop rsi call _ZN5minja13TemplateTokenC2ENS0_4TypeERKNS_8LocationENS_13SpaceHandlingES5_; minja::TemplateToken::TemplateToken(minja::TemplateToken::Type,minja::Location const&,minja::SpaceHandling,minja::SpaceHandling) lea rax, _ZTVN5minja16ForTemplateTokenE; `vtable for'minja::ForTemplateToken add rax, 10h mov [rbx], rax lea rdi, [rbx+30h] mov rsi, r15 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) mov al, [rsp+18h+arg_8] mov rcx, [rsp+18h+arg_0] and qword ptr [rbx+50h], 0 movups xmm0, xmmword ptr [r14] and qword ptr [r14+8], 0 movups xmmword ptr [rbx+48h], xmm0 and qword ptr [r14], 0 and qword ptr [rbx+60h], 0 movups xmm0, xmmword ptr [rcx] and qword ptr [rcx+8], 0 movups xmmword ptr [rbx+58h], xmm0 and qword ptr [rcx], 0 mov [rbx+68h], al pop rbx pop r14 pop r15 retn mov r14, rax mov rdi, rbx; this call _ZN5minja13TemplateTokenD2Ev; minja::TemplateToken::~TemplateToken() mov rdi, r14 call __Unwind_Resume
char minja::ForTemplateToken::ForTemplateToken( long long a1, long long a2, int a3, int a4, _QWORD *a5, __int128 *a6, __int128 *a7, char a8) { char result; // al __int128 v11; // xmm0 __int128 v12; // xmm0 minja::TemplateToken::TemplateToken(a1, 6, a2, a3, a4); *(_QWORD *)a1 = &`vtable for'minja::ForTemplateToken + 2; std::vector<std::string>::vector((_QWORD *)(a1 + 48), a5); result = a8; *(_QWORD *)(a1 + 80) = 0LL; v11 = *a6; *((_QWORD *)a6 + 1) = 0LL; *(_OWORD *)(a1 + 72) = v11; *(_QWORD *)a6 = 0LL; *(_QWORD *)(a1 + 96) = 0LL; v12 = *a7; *((_QWORD *)a7 + 1) = 0LL; *(_OWORD *)(a1 + 88) = v12; *(_QWORD *)a7 = 0LL; *(_BYTE *)(a1 + 104) = a8; return result; }
ForTemplateToken: PUSH R15 PUSH R14 PUSH RBX MOV R14,R9 MOV R15,R8 MOV R8D,ECX MOV ECX,EDX MOV RDX,RSI MOV RBX,RDI PUSH 0x6 POP RSI CALL 0x001ce2c4 LEA RAX,[0x2661b0] ADD RAX,0x10 MOV qword ptr [RBX],RAX LEA RDI,[RBX + 0x30] LAB_001d9734: MOV RSI,R15 CALL 0x00146ce0 LAB_001d973c: MOV AL,byte ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x20] AND qword ptr [RBX + 0x50],0x0 MOVUPS XMM0,xmmword ptr [R14] AND qword ptr [R14 + 0x8],0x0 MOVUPS xmmword ptr [RBX + 0x48],XMM0 AND qword ptr [R14],0x0 AND qword ptr [RBX + 0x60],0x0 MOVUPS XMM0,xmmword ptr [RCX] AND qword ptr [RCX + 0x8],0x0 MOVUPS xmmword ptr [RBX + 0x58],XMM0 AND qword ptr [RCX],0x0 MOV byte ptr [RBX + 0x68],AL POP RBX POP R14 POP R15 RET
/* minja::ForTemplateToken::ForTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, bool) */ void __thiscall minja::ForTemplateToken::ForTemplateToken (ForTemplateToken *this,int8 param_1,int4 param_3,int4 param_4, vector *param_5,int8 *param_6,int8 *param_7,ForTemplateToken param_8) { int8 uVar1; TemplateToken::TemplateToken((TemplateToken *)this,6,param_1,param_3,param_4); *(int ***)this = &PTR__ForTemplateToken_002661c0; /* try { // try from 001d9734 to 001d973b has its CatchHandler @ 001d9779 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x30), param_5); *(int8 *)(this + 0x50) = 0; uVar1 = param_6[1]; param_6[1] = 0; *(int8 *)(this + 0x48) = *param_6; *(int8 *)(this + 0x50) = uVar1; *param_6 = 0; *(int8 *)(this + 0x60) = 0; uVar1 = param_7[1]; param_7[1] = 0; *(int8 *)(this + 0x58) = *param_7; *(int8 *)(this + 0x60) = uVar1; *param_7 = 0; this[0x68] = param_8; return; }
55,239
ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node> (bool)>)::Impl::OnEvent(ftxui::Event)
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/include/ftxui/component/event.hpp
bool is_mouse() const { return type_ == Type::Mouse; }
O1
cpp
ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node> (bool)>)::Impl::OnEvent(ftxui::Event): cmpl $0x2, 0x8(%rsi) jne 0x2d6c5 pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rsi, %r14 movq %rdi, %rbx addq $0x28, %rdi movl 0x18(%rsi), %esi movl 0x1c(%r14), %edx callq 0x39ccc testb %al, %al je 0x2d6bc leaq 0x8(%rsp), %r15 movq %r15, %rdi movq %rbx, %rsi movq %r14, %rdx callq 0x277ac movq (%r15), %r14 testq %r14, %r14 je 0x2d6af movq (%r14), %rax movq %r14, %rdi callq *0x8(%rax) testq %r14, %r14 je 0x2d6bc movq %rbx, %rdi callq 0x2778c addq $0x10, %rsp popq %rbx popq %r14 popq %r15 xorl %eax, %eax retq
_ZZN5ftxui8RendererESt8functionIFSt10shared_ptrINS_4NodeEEbEEEN4Impl7OnEventENS_5EventE: cmp dword ptr [rsi+8], 2 jnz short loc_2D6C5 push r15 push r14 push rbx sub rsp, 10h mov r14, rsi mov rbx, rdi add rdi, 28h ; '('; this mov esi, [rsi+18h]; int mov edx, [r14+1Ch]; int call _ZNK5ftxui3Box7ContainEii; ftxui::Box::Contain(int,int) test al, al jz short loc_2D6BC lea r15, [rsp+28h+var_20] mov rdi, r15; this mov rsi, rbx; ftxui::Event * mov rdx, r14 call _ZN5ftxui13ComponentBase12CaptureMouseERKNS_5EventE; ftxui::ComponentBase::CaptureMouse(ftxui::Event const&) mov r14, [r15] test r14, r14 jz short loc_2D6AF mov rax, [r14] mov rdi, r14 call qword ptr [rax+8] loc_2D6AF: test r14, r14 jz short loc_2D6BC mov rdi, rbx; this call _ZN5ftxui13ComponentBase9TakeFocusEv; ftxui::ComponentBase::TakeFocus(void) loc_2D6BC: add rsp, 10h pop rbx pop r14 pop r15 loc_2D6C5: xor eax, eax retn
long long ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node> ()(bool)>)::Impl::OnEvent( ftxui::Event *a1, long long a2) { long long v2; // r14 _QWORD v4[4]; // [rsp+0h] [rbp-20h] BYREF if ( *(_DWORD *)(a2 + 8) == 2 && (unsigned __int8)ftxui::Box::Contain( (ftxui::Event *)((char *)a1 + 40), *(_DWORD *)(a2 + 24), *(_DWORD *)(a2 + 28)) ) { ftxui::ComponentBase::CaptureMouse((ftxui::ComponentBase *)v4, a1, (_QWORD *)a2); v2 = v4[0]; if ( v4[0] ) (*(void ( **)(_QWORD))(*(_QWORD *)v4[0] + 8LL))(v4[0]); if ( v2 ) ftxui::ComponentBase::TakeFocus(a1); } return 0LL; }
Event): CMP dword ptr [RSI + 0x8],0x2 JNZ 0x0012d6c5 PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV R14,RSI MOV RBX,RDI ADD RDI,0x28 MOV ESI,dword ptr [RSI + 0x18] MOV EDX,dword ptr [R14 + 0x1c] CALL 0x00139ccc TEST AL,AL JZ 0x0012d6bc LEA R15,[RSP + 0x8] MOV RDI,R15 MOV RSI,RBX MOV RDX,R14 CALL 0x001277ac MOV R14,qword ptr [R15] TEST R14,R14 JZ 0x0012d6af MOV RAX,qword ptr [R14] MOV RDI,R14 CALL qword ptr [RAX + 0x8] LAB_0012d6af: TEST R14,R14 JZ 0x0012d6bc MOV RDI,RBX CALL 0x0012778c LAB_0012d6bc: ADD RSP,0x10 POP RBX POP R14 POP R15 LAB_0012d6c5: XOR EAX,EAX RET
/* ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node> (bool)>)::Impl::OnEvent(ftxui::Event) */ int8 ftxui::Renderer(std::function<std::shared_ptr<ftxui::Node>(bool)>)::Impl::OnEvent(ftxui::Event_ (ComponentBase *param_1,long param_2) { char cVar1; long *local_20; if (((*(int *)(param_2 + 8) == 2) && (cVar1 = Box::Contain((Box *)(param_1 + 0x28),*(int *)(param_2 + 0x18), *(int *)(param_2 + 0x1c)), cVar1 != '\0')) && (ComponentBase::CaptureMouse((Event *)&local_20), local_20 != (long *)0x0)) { (**(code **)(*local_20 + 8))(local_20); ComponentBase::TakeFocus(param_1); } return 0; }
55,240
ma_rec_pack
eloqsql/storage/maria/ma_dynrec.c
uint _ma_rec_pack(MARIA_HA *info, register uchar *to, register const uchar *from) { uint length,new_length,flag,bit,i; const uchar *pos,*end; uchar *startpos,*packpos; enum en_fieldtype type; reg3 MARIA_COLUMNDEF *column; MARIA_BLOB *blob; DBUG_ENTER("_ma_rec_pack"); flag= 0; bit= 1; startpos= packpos=to; to+= info->s->base.pack_bytes; blob= info->blobs; column= info->s->columndef; if (info->s->base.null_bytes) { memcpy(to, from, info->s->base.null_bytes); from+= info->s->base.null_bytes; to+= info->s->base.null_bytes; } for (i=info->s->base.fields ; i-- > 0; from+= length, column++) { length=(uint) column->length; if ((type = (enum en_fieldtype) column->type) != FIELD_NORMAL) { if (type == FIELD_BLOB) { if (!blob->length) flag|=bit; else { char *temp_pos; size_t tmp_length=length-portable_sizeof_char_ptr; memcpy(to,from,tmp_length); memcpy(&temp_pos,from+tmp_length,sizeof(char*)); memcpy(to+tmp_length,temp_pos,(size_t) blob->length); to+=tmp_length+blob->length; } blob++; } else if (type == FIELD_SKIP_ZERO) { if (memcmp(from, maria_zero_string, length) == 0) flag|=bit; else { memcpy(to, from, (size_t) length); to+=length; } } else if (type == FIELD_SKIP_ENDSPACE || type == FIELD_SKIP_PRESPACE) { pos= from; end= from + length; if (type == FIELD_SKIP_ENDSPACE) { /* Pack trailing spaces */ while (end > from && *(end-1) == ' ') end--; } else { /* Pack pref-spaces */ while (pos < end && *pos == ' ') pos++; } new_length=(uint) (end-pos); if (new_length + 1 + MY_TEST(column->length > 255 && new_length > 127) < length) { if (column->length > 255 && new_length > 127) { to[0]= (uchar) ((new_length & 127) + 128); to[1]= (uchar) (new_length >> 7); to+=2; } else *to++= (uchar) new_length; memcpy(to, pos, (size_t) new_length); to+=new_length; flag|=bit; } else { memcpy(to,from,(size_t) length); to+=length; } } else if (type == FIELD_VARCHAR) { uint pack_length= HA_VARCHAR_PACKLENGTH(column->length -1); uint tmp_length; if (pack_length == 1) { tmp_length= (uint) *from; *to++= *from; } else { tmp_length= uint2korr(from); store_key_length_inc(to,tmp_length); } if (tmp_length > column->length) { my_errno= HA_ERR_WRONG_IN_RECORD; DBUG_RETURN(0); } memcpy(to, from+pack_length,tmp_length); to+= tmp_length; continue; } else { memcpy(to,from,(size_t) length); to+=length; continue; /* Normal field */ } if ((bit= bit << 1) >= 256) { *packpos++ = (uchar) flag; bit=1; flag=0; } } else { memcpy(to,from,(size_t) length); to+=length; } } if (bit != 1) *packpos= (uchar) flag; if (info->s->calc_checksum) *to++= (uchar) info->cur_row.checksum; DBUG_PRINT("exit",("packed length: %d",(int) (to-startpos))); DBUG_RETURN((uint) (to-startpos)); }
O3
c
ma_rec_pack: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdx, %r12 movq %rsi, %rbx movq (%rdi), %rax movl 0x3f4(%rax), %r14d movl 0x3fc(%rax), %edx addq %rsi, %r14 movq 0x288(%rdi), %rcx movq %rcx, -0x58(%rbp) movq 0x588(%rax), %r15 testq %rdx, %rdx movq %rdi, -0x60(%rbp) je 0x49f30 movq %rdi, %r13 movq %r14, %rdi movq %r12, %rsi callq 0x2a0a0 movq (%r13), %rax movl 0x3fc(%rax), %ecx addq %rcx, %r12 addq %rcx, %r14 movq %r14, %rcx movl 0x3c8(%rax), %r14d testl %r14d, %r14d je 0x4a1f6 movq %rbx, -0x48(%rbp) movq %rbx, -0x40(%rbp) movl $0x1, -0x2c(%rbp) movl $0x0, -0x30(%rbp) movq %rcx, %rbx decl %r14d movzwl 0x8(%r15), %r8d movl (%r15), %ecx testl %ecx, %ecx je 0x4a04d cmpl $0x3, %ecx je 0x49fda cmpl $0x4, %ecx jne 0x4a009 movq -0x58(%rbp), %rcx cmpq $0x0, 0x10(%rcx) je 0x4a071 movl %r14d, -0x34(%rbp) movq %rcx, %r14 movq %rbx, %r13 leal -0x8(%r8), %ebx movq %r13, %rdi movq %r12, %rsi movq %rbx, %rdx movq %r8, -0x50(%rbp) callq 0x2a0a0 movq (%r12,%rbx), %rsi leaq (%rbx,%r13), %rdi movq 0x10(%r14), %rdx callq 0x2a0a0 movq -0x50(%rbp), %r8 addq 0x10(%r14), %rbx addq %rbx, %r13 movq %r13, %rbx movq %r14, %rcx movl -0x34(%rbp), %r14d movl -0x2c(%rbp), %eax jmp 0x4a077 movq %r12, %rdi leaq 0x3bbcbc(%rip), %rsi # 0x405ca0 movq %r8, %rdx movq %r8, %r13 callq 0x2a5e0 testl %eax, %eax je 0x4a066 movq %rbx, %rdi movq %r12, %rsi movq %r13, %rdx callq 0x2a0a0 addq %r13, %rbx movl -0x2c(%rbp), %eax jmp 0x4a06c cmpl $0x2, %ecx ja 0x4a038 leaq (%r12,%r8), %rax cmpl $0x1, %ecx jne 0x4a0a4 movq %rax, %rcx cmpq %r12, %rax jbe 0x4a02d leaq -0x1(%rcx), %rax cmpb $0x20, -0x1(%rcx) je 0x4a01b movq %r12, %rsi movq %rcx, %rax jmp 0x4a0d8 cmpl $0x8, %ecx jne 0x4a04d cmpl $0x100, %r8d # imm = 0x100 ja 0x4a0bb movzbl (%r12), %eax jmp 0x4a0cb movq %rbx, %rdi movq %r12, %rsi movq %r8, %rdx movq %r8, %r13 callq 0x2a0a0 movq %r13, %r8 addq %r13, %rbx jmp 0x4a08f movl -0x2c(%rbp), %eax orl %eax, -0x30(%rbp) movq %r13, %r8 jmp 0x4a07f movl -0x2c(%rbp), %eax orl %eax, -0x30(%rbp) addq $0x18, %rcx movq %rcx, -0x58(%rbp) addl %eax, %eax cmpl $0xff, %eax ja 0x4a1b4 movl %eax, -0x2c(%rbp) addq %r8, %r12 addq $0x38, %r15 testl %r14d, %r14d jne 0x49f5c jmp 0x4a1e0 movq %r12, %rsi testq %r8, %r8 je 0x4a0d5 cmpb $0x20, (%rsi) jne 0x4a0d8 incq %rsi cmpq %rax, %rsi jb 0x4a0ac jmp 0x4a0d8 movzwl (%r12), %eax cmpl $0xfe, %eax ja 0x4a15f movb %al, (%rbx) incq %rbx jmp 0x4a16c movq %r12, %rsi subq %rsi, %rax cmpl $0x100, %r8d # imm = 0x100 setae %dl cmpl $0x7f, %eax seta %cl andb %dl, %cl movzbl %cl, %edx addl %eax, %edx incl %edx cmpl %r8d, %edx jae 0x4a140 movq %rbx, %rdi movl $0x1, %ebx testb %cl, %cl movq %r8, -0x50(%rbp) movl %eax, %ecx je 0x4a11b orb $-0x80, %cl movl %eax, %edx shrl $0x7, %edx movb %dl, 0x1(%rdi) movl $0x2, %ebx addq %rdi, %rbx movb %cl, (%rdi) movl %eax, %r13d movq %rbx, %rdi movq %r13, %rdx callq 0x2a0a0 addq %r13, %rbx movl -0x2c(%rbp), %eax orl %eax, -0x30(%rbp) movq -0x50(%rbp), %r8 jmp 0x4a07f movq %rbx, %rdi movq %r12, %rsi movq %r8, %rdx movq %r8, %r13 callq 0x2a0a0 movq %r13, %r8 addq %r13, %rbx movl -0x2c(%rbp), %eax jmp 0x4a07f movb $-0x1, (%rbx) movb %al, 0x2(%rbx) movb %ah, 0x1(%rbx) addq $0x3, %rbx movzwl 0x8(%r15), %ecx cmpl %ecx, %eax ja 0x4a226 cmpl $0x101, %r8d # imm = 0x101 movq %r12, %rsi sbbq $0x0, %rsi addq $0x2, %rsi movl %r14d, -0x34(%rbp) movq %rbx, %r13 movl %eax, %ebx movq %r13, %rdi movq %rbx, %rdx movq %r8, %r14 callq 0x2a0a0 movq %r14, %r8 addq %rbx, %r13 movq %r13, %rbx movl -0x34(%rbp), %r14d jmp 0x4a08f movq %rbx, %rcx movq -0x48(%rbp), %rax movl -0x30(%rbp), %edx movb %dl, (%rax) incq %rax movq %rax, -0x48(%rbp) movl %r8d, %eax addq %rax, %r12 addq $0x38, %r15 testl %r14d, %r14d movq -0x40(%rbp), %rbx jne 0x49f4b jmp 0x4a1f6 movq %rbx, %rcx cmpl $0x1, -0x2c(%rbp) je 0x4a1f2 movq -0x48(%rbp), %rax movl -0x30(%rbp), %edx movb %dl, (%rax) movq -0x40(%rbp), %rbx movq -0x60(%rbp), %rdx movq (%rdx), %rax cmpq $0x0, 0x6a8(%rax) je 0x4a212 movb 0xb0(%rdx), %al movb %al, (%rcx) incq %rcx subl %ebx, %ecx movq %rcx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0xa8156 movl $0x7f, (%rax) xorl %eax, %eax jmp 0x4a217
_ma_rec_pack: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r12, rdx mov rbx, rsi mov rax, [rdi] mov r14d, [rax+3F4h] mov edx, [rax+3FCh] add r14, rsi mov rcx, [rdi+288h] mov [rbp+var_58], rcx mov r15, [rax+588h] test rdx, rdx mov [rbp+var_60], rdi jz short loc_49F30 mov r13, rdi mov rdi, r14 mov rsi, r12 call _memcpy mov rax, [r13+0] mov ecx, [rax+3FCh] add r12, rcx add r14, rcx loc_49F30: mov rcx, r14 mov r14d, [rax+3C8h] test r14d, r14d jz loc_4A1F6 mov [rbp+var_48], rbx mov [rbp+var_40], rbx loc_49F4B: mov [rbp+var_2C], 1 mov [rbp+var_30], 0 mov rbx, rcx loc_49F5C: dec r14d movzx r8d, word ptr [r15+8] mov ecx, [r15] test ecx, ecx jz loc_4A04D cmp ecx, 3 jz short loc_49FDA cmp ecx, 4 jnz loc_4A009 mov rcx, [rbp+var_58] cmp qword ptr [rcx+10h], 0 jz loc_4A071 mov [rbp+var_34], r14d mov r14, rcx mov r13, rbx lea ebx, [r8-8] mov rdi, r13 mov rsi, r12 mov rdx, rbx mov [rbp+var_50], r8 call _memcpy mov rsi, [r12+rbx] lea rdi, [rbx+r13] mov rdx, [r14+10h] call _memcpy mov r8, [rbp+var_50] add rbx, [r14+10h] add r13, rbx mov rbx, r13 mov rcx, r14 mov r14d, [rbp+var_34] mov eax, [rbp+var_2C] jmp loc_4A077 loc_49FDA: mov rdi, r12 lea rsi, maria_zero_string mov rdx, r8 mov r13, r8 call _bcmp test eax, eax jz short loc_4A066 mov rdi, rbx mov rsi, r12 mov rdx, r13 call _memcpy add rbx, r13 mov eax, [rbp+var_2C] jmp short loc_4A06C loc_4A009: cmp ecx, 2 ja short loc_4A038 lea rax, [r12+r8] cmp ecx, 1 jnz loc_4A0A4 loc_4A01B: mov rcx, rax cmp rax, r12 jbe short loc_4A02D lea rax, [rcx-1] cmp byte ptr [rcx-1], 20h ; ' ' jz short loc_4A01B loc_4A02D: mov rsi, r12 mov rax, rcx jmp loc_4A0D8 loc_4A038: cmp ecx, 8 jnz short loc_4A04D cmp r8d, 100h ja short loc_4A0BB movzx eax, byte ptr [r12] jmp short loc_4A0CB loc_4A04D: mov rdi, rbx mov rsi, r12 mov rdx, r8 mov r13, r8 call _memcpy mov r8, r13 add rbx, r13 jmp short loc_4A08F loc_4A066: mov eax, [rbp+var_2C] or [rbp+var_30], eax loc_4A06C: mov r8, r13 jmp short loc_4A07F loc_4A071: mov eax, [rbp+var_2C] or [rbp+var_30], eax loc_4A077: add rcx, 18h mov [rbp+var_58], rcx loc_4A07F: add eax, eax cmp eax, 0FFh ja loc_4A1B4 mov [rbp+var_2C], eax loc_4A08F: add r12, r8 add r15, 38h ; '8' test r14d, r14d jnz loc_49F5C jmp loc_4A1E0 loc_4A0A4: mov rsi, r12 test r8, r8 jz short loc_4A0D5 loc_4A0AC: cmp byte ptr [rsi], 20h ; ' ' jnz short loc_4A0D8 inc rsi cmp rsi, rax jb short loc_4A0AC jmp short loc_4A0D8 loc_4A0BB: movzx eax, word ptr [r12] cmp eax, 0FEh ja loc_4A15F loc_4A0CB: mov [rbx], al inc rbx jmp loc_4A16C loc_4A0D5: mov rsi, r12 loc_4A0D8: sub rax, rsi cmp r8d, 100h setnb dl cmp eax, 7Fh setnbe cl and cl, dl movzx edx, cl add edx, eax inc edx cmp edx, r8d jnb short loc_4A140 mov rdi, rbx mov ebx, 1 test cl, cl mov [rbp+var_50], r8 mov ecx, eax jz short loc_4A11B or cl, 80h mov edx, eax shr edx, 7 mov [rdi+1], dl mov ebx, 2 loc_4A11B: add rbx, rdi mov [rdi], cl mov r13d, eax mov rdi, rbx mov rdx, r13 call _memcpy add rbx, r13 mov eax, [rbp+var_2C] or [rbp+var_30], eax mov r8, [rbp+var_50] jmp loc_4A07F loc_4A140: mov rdi, rbx mov rsi, r12 mov rdx, r8 mov r13, r8 call _memcpy mov r8, r13 add rbx, r13 mov eax, [rbp+var_2C] jmp loc_4A07F loc_4A15F: mov byte ptr [rbx], 0FFh mov [rbx+2], al mov [rbx+1], ah add rbx, 3 loc_4A16C: movzx ecx, word ptr [r15+8] cmp eax, ecx ja loc_4A226 cmp r8d, 101h mov rsi, r12 sbb rsi, 0 add rsi, 2 mov [rbp+var_34], r14d mov r13, rbx mov ebx, eax mov rdi, r13 mov rdx, rbx mov r14, r8 call _memcpy mov r8, r14 add r13, rbx mov rbx, r13 mov r14d, [rbp+var_34] jmp loc_4A08F loc_4A1B4: mov rcx, rbx mov rax, [rbp+var_48] mov edx, [rbp+var_30] mov [rax], dl inc rax mov [rbp+var_48], rax mov eax, r8d add r12, rax add r15, 38h ; '8' test r14d, r14d mov rbx, [rbp+var_40] jnz loc_49F4B jmp short loc_4A1F6 loc_4A1E0: mov rcx, rbx cmp [rbp+var_2C], 1 jz short loc_4A1F2 mov rax, [rbp+var_48] mov edx, [rbp+var_30] mov [rax], dl loc_4A1F2: mov rbx, [rbp+var_40] loc_4A1F6: mov rdx, [rbp+var_60] mov rax, [rdx] cmp qword ptr [rax+6A8h], 0 jz short loc_4A212 mov al, [rdx+0B0h] mov [rcx], al inc rcx loc_4A212: sub ecx, ebx mov rax, rcx loc_4A217: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4A226: call _my_thread_var mov dword ptr [rax], 7Fh xor eax, eax jmp short loc_4A217
long long ma_rec_pack(unsigned __int8 *a1, _BYTE *a2, unsigned __int8 *a3) { int v4; // ebx long long v5; // rax long long v6; // rdx unsigned __int8 *v7; // r14 long long v8; // r15 unsigned __int8 *v9; // r13 long long v10; // rcx unsigned __int8 *v11; // rcx int v12; // r14d unsigned __int8 *v13; // rbx long long v14; // r8 unsigned int v15; // ecx long long v16; // rcx unsigned __int8 *v17; // r13 long long v18; // rbx int v19; // eax long long v20; // r13 unsigned __int8 *v21; // rax unsigned __int8 *v22; // rcx unsigned __int8 *v23; // rsi unsigned int v24; // eax long long v25; // r13 unsigned int v26; // eax unsigned __int8 *v27; // rbx unsigned int v28; // eax bool v29; // cl unsigned __int8 *v30; // rdi long long v31; // rbx bool v32; // zf unsigned __int8 v33; // cl long long v34; // r13 long long v35; // r13 unsigned __int8 *v36; // r13 long long v37; // rbx long long v38; // r14 unsigned __int8 *v40; // [rsp+0h] [rbp-60h] long long v41; // [rsp+8h] [rbp-58h] long long v42; // [rsp+10h] [rbp-50h] long long v43; // [rsp+10h] [rbp-50h] _BYTE *v44; // [rsp+18h] [rbp-48h] int v45; // [rsp+20h] [rbp-40h] int v46; // [rsp+2Ch] [rbp-34h] int v47; // [rsp+30h] [rbp-30h] int v48; // [rsp+34h] [rbp-2Ch] v4 = (int)a2; v5 = *(_QWORD *)a1; v6 = *(unsigned int *)(*(_QWORD *)a1 + 1020LL); v7 = &a2[*(unsigned int *)(*(_QWORD *)a1 + 1012LL)]; v41 = *((_QWORD *)a1 + 81); v8 = *(_QWORD *)(*(_QWORD *)a1 + 1416LL); v40 = a1; if ( *(_DWORD *)(*(_QWORD *)a1 + 1020LL) ) { v9 = a1; a1 = &a2[*(unsigned int *)(*(_QWORD *)a1 + 1012LL)]; memcpy(v7, a3, v6); v5 = *(_QWORD *)v9; v10 = *(unsigned int *)(*(_QWORD *)v9 + 1020LL); a3 += v10; v7 += v10; } v11 = v7; v12 = *(_DWORD *)(v5 + 968); if ( v12 ) { v44 = a2; v45 = (int)a2; LABEL_5: v48 = 1; v47 = 0; v13 = v11; while ( 1 ) { --v12; v14 = *(unsigned __int16 *)(v8 + 8); v15 = *(_DWORD *)v8; if ( !*(_DWORD *)v8 ) goto LABEL_21; if ( v15 == 3 ) { a1 = a3; v20 = *(unsigned __int16 *)(v8 + 8); if ( (unsigned int)bcmp(a3, &maria_zero_string, v20) ) { a1 = v13; memcpy(v13, a3, v20); v13 += v20; v19 = v48; } else { v19 = v48; v47 |= v48; } v14 = v20; } else if ( v15 == 4 ) { v16 = v41; if ( *(_QWORD *)(v41 + 16) ) { v17 = v13; v18 = (unsigned int)(v14 - 8); v42 = *(unsigned __int16 *)(v8 + 8); memcpy(v17, a3, v18); a1 = &v17[v18]; memcpy(&v17[v18], *(_QWORD *)&a3[v18], *(_QWORD *)(v41 + 16)); v14 = v42; v13 = &v17[*(_QWORD *)(v41 + 16) + v18]; v16 = v41; v19 = v48; } else { v19 = v48; v47 |= v48; } v41 = v16 + 24; } else { if ( v15 > 2 ) { if ( v15 == 8 ) { if ( (unsigned int)v14 <= 0x100 ) { v24 = *a3; goto LABEL_35; } v24 = *(unsigned __int16 *)a3; if ( v24 > 0xFE ) { *v13 = -1; v13[2] = v24; v13[1] = BYTE1(v24); v27 = v13 + 3; } else { LABEL_35: *v13 = v24; v27 = v13 + 1; } if ( v24 > *(unsigned __int16 *)(v8 + 8) ) { *(_DWORD *)my_thread_var(a1) = 127; return 0LL; } v46 = v12; v36 = v27; v37 = v24; a1 = v36; v38 = v14; memcpy(v36, &a3[-((unsigned int)v14 < 0x101) + 2], v24); v14 = v38; v13 = &v36[v37]; v12 = v46; goto LABEL_28; } LABEL_21: a1 = v13; v25 = *(unsigned __int16 *)(v8 + 8); memcpy(v13, a3, v25); v14 = v25; v13 += v25; goto LABEL_28; } v21 = &a3[v14]; if ( v15 == 1 ) { do { v22 = v21; if ( v21 <= a3 ) break; --v21; } while ( *(v22 - 1) == 32 ); v23 = a3; LODWORD(v21) = (_DWORD)v22; } else { v23 = a3; if ( *(_WORD *)(v8 + 8) ) { do { if ( *v23 != 32 ) break; ++v23; } while ( v23 < v21 ); } else { v23 = a3; } } v28 = (_DWORD)v21 - (_DWORD)v23; v29 = (unsigned int)v14 >= 0x100 && v28 > 0x7F; if ( v28 + v29 + 1 >= (unsigned int)v14 ) { a1 = v13; v35 = *(unsigned __int16 *)(v8 + 8); memcpy(v13, a3, v35); v14 = v35; v13 += v35; v19 = v48; } else { v30 = v13; v31 = 1LL; v32 = !v29; v43 = *(unsigned __int16 *)(v8 + 8); v33 = v28; if ( !v32 ) { v33 = v28 | 0x80; v30[1] = v28 >> 7; v31 = 2LL; } *v30 = v33; v34 = v28; a1 = &v30[v31]; memcpy(a1, v23, v28); v13 = &a1[v34]; v19 = v48; v47 |= v48; v14 = v43; } } v26 = 2 * v19; if ( v26 > 0xFF ) { v11 = v13; *v44++ = v47; a3 += (unsigned int)v14; v8 += 56LL; v4 = v45; if ( v12 ) goto LABEL_5; break; } v48 = v26; LABEL_28: a3 += v14; v8 += 56LL; if ( !v12 ) { v11 = v13; if ( v48 != 1 ) *v44 = v47; v4 = v45; break; } } } if ( *(_QWORD *)(*(_QWORD *)v40 + 1704LL) ) { *v11 = v40[176]; LODWORD(v11) = (_DWORD)v11 + 1; } return (unsigned int)((_DWORD)v11 - v4); }
_ma_rec_pack: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R12,RDX MOV RBX,RSI MOV RAX,qword ptr [RDI] MOV R14D,dword ptr [RAX + 0x3f4] MOV EDX,dword ptr [RAX + 0x3fc] ADD R14,RSI MOV RCX,qword ptr [RDI + 0x288] MOV qword ptr [RBP + -0x58],RCX MOV R15,qword ptr [RAX + 0x588] TEST RDX,RDX MOV qword ptr [RBP + -0x60],RDI JZ 0x00149f30 MOV R13,RDI MOV RDI,R14 MOV RSI,R12 CALL 0x0012a0a0 MOV RAX,qword ptr [R13] MOV ECX,dword ptr [RAX + 0x3fc] ADD R12,RCX ADD R14,RCX LAB_00149f30: MOV RCX,R14 MOV R14D,dword ptr [RAX + 0x3c8] TEST R14D,R14D JZ 0x0014a1f6 MOV qword ptr [RBP + -0x48],RBX MOV qword ptr [RBP + -0x40],RBX LAB_00149f4b: MOV dword ptr [RBP + -0x2c],0x1 MOV dword ptr [RBP + -0x30],0x0 MOV RBX,RCX LAB_00149f5c: DEC R14D MOVZX R8D,word ptr [R15 + 0x8] MOV ECX,dword ptr [R15] TEST ECX,ECX JZ 0x0014a04d CMP ECX,0x3 JZ 0x00149fda CMP ECX,0x4 JNZ 0x0014a009 MOV RCX,qword ptr [RBP + -0x58] CMP qword ptr [RCX + 0x10],0x0 JZ 0x0014a071 MOV dword ptr [RBP + -0x34],R14D MOV R14,RCX MOV R13,RBX LEA EBX,[R8 + -0x8] MOV RDI,R13 MOV RSI,R12 MOV RDX,RBX MOV qword ptr [RBP + -0x50],R8 CALL 0x0012a0a0 MOV RSI,qword ptr [R12 + RBX*0x1] LEA RDI,[RBX + R13*0x1] MOV RDX,qword ptr [R14 + 0x10] CALL 0x0012a0a0 MOV R8,qword ptr [RBP + -0x50] ADD RBX,qword ptr [R14 + 0x10] ADD R13,RBX MOV RBX,R13 MOV RCX,R14 MOV R14D,dword ptr [RBP + -0x34] MOV EAX,dword ptr [RBP + -0x2c] JMP 0x0014a077 LAB_00149fda: MOV RDI,R12 LEA RSI,[0x505ca0] MOV RDX,R8 MOV R13,R8 CALL 0x0012a5e0 TEST EAX,EAX JZ 0x0014a066 MOV RDI,RBX MOV RSI,R12 MOV RDX,R13 CALL 0x0012a0a0 ADD RBX,R13 MOV EAX,dword ptr [RBP + -0x2c] JMP 0x0014a06c LAB_0014a009: CMP ECX,0x2 JA 0x0014a038 LEA RAX,[R12 + R8*0x1] CMP ECX,0x1 JNZ 0x0014a0a4 LAB_0014a01b: MOV RCX,RAX CMP RAX,R12 JBE 0x0014a02d LEA RAX,[RCX + -0x1] CMP byte ptr [RCX + -0x1],0x20 JZ 0x0014a01b LAB_0014a02d: MOV RSI,R12 MOV RAX,RCX JMP 0x0014a0d8 LAB_0014a038: CMP ECX,0x8 JNZ 0x0014a04d CMP R8D,0x100 JA 0x0014a0bb MOVZX EAX,byte ptr [R12] JMP 0x0014a0cb LAB_0014a04d: MOV RDI,RBX MOV RSI,R12 MOV RDX,R8 MOV R13,R8 CALL 0x0012a0a0 MOV R8,R13 ADD RBX,R13 JMP 0x0014a08f LAB_0014a066: MOV EAX,dword ptr [RBP + -0x2c] OR dword ptr [RBP + -0x30],EAX LAB_0014a06c: MOV R8,R13 JMP 0x0014a07f LAB_0014a071: MOV EAX,dword ptr [RBP + -0x2c] OR dword ptr [RBP + -0x30],EAX LAB_0014a077: ADD RCX,0x18 MOV qword ptr [RBP + -0x58],RCX LAB_0014a07f: ADD EAX,EAX CMP EAX,0xff JA 0x0014a1b4 MOV dword ptr [RBP + -0x2c],EAX LAB_0014a08f: ADD R12,R8 ADD R15,0x38 TEST R14D,R14D JNZ 0x00149f5c JMP 0x0014a1e0 LAB_0014a0a4: MOV RSI,R12 TEST R8,R8 JZ 0x0014a0d5 LAB_0014a0ac: CMP byte ptr [RSI],0x20 JNZ 0x0014a0d8 INC RSI CMP RSI,RAX JC 0x0014a0ac JMP 0x0014a0d8 LAB_0014a0bb: MOVZX EAX,word ptr [R12] CMP EAX,0xfe JA 0x0014a15f LAB_0014a0cb: MOV byte ptr [RBX],AL INC RBX JMP 0x0014a16c LAB_0014a0d5: MOV RSI,R12 LAB_0014a0d8: SUB RAX,RSI CMP R8D,0x100 SETNC DL CMP EAX,0x7f SETA CL AND CL,DL MOVZX EDX,CL ADD EDX,EAX INC EDX CMP EDX,R8D JNC 0x0014a140 MOV RDI,RBX MOV EBX,0x1 TEST CL,CL MOV qword ptr [RBP + -0x50],R8 MOV ECX,EAX JZ 0x0014a11b OR CL,0x80 MOV EDX,EAX SHR EDX,0x7 MOV byte ptr [RDI + 0x1],DL MOV EBX,0x2 LAB_0014a11b: ADD RBX,RDI MOV byte ptr [RDI],CL MOV R13D,EAX MOV RDI,RBX MOV RDX,R13 CALL 0x0012a0a0 ADD RBX,R13 MOV EAX,dword ptr [RBP + -0x2c] OR dword ptr [RBP + -0x30],EAX MOV R8,qword ptr [RBP + -0x50] JMP 0x0014a07f LAB_0014a140: MOV RDI,RBX MOV RSI,R12 MOV RDX,R8 MOV R13,R8 CALL 0x0012a0a0 MOV R8,R13 ADD RBX,R13 MOV EAX,dword ptr [RBP + -0x2c] JMP 0x0014a07f LAB_0014a15f: MOV byte ptr [RBX],0xff MOV byte ptr [RBX + 0x2],AL MOV byte ptr [RBX + 0x1],AH ADD RBX,0x3 LAB_0014a16c: MOVZX ECX,word ptr [R15 + 0x8] CMP EAX,ECX JA 0x0014a226 CMP R8D,0x101 MOV RSI,R12 SBB RSI,0x0 ADD RSI,0x2 MOV dword ptr [RBP + -0x34],R14D MOV R13,RBX MOV EBX,EAX MOV RDI,R13 MOV RDX,RBX MOV R14,R8 CALL 0x0012a0a0 MOV R8,R14 ADD R13,RBX MOV RBX,R13 MOV R14D,dword ptr [RBP + -0x34] JMP 0x0014a08f LAB_0014a1b4: MOV RCX,RBX MOV RAX,qword ptr [RBP + -0x48] MOV EDX,dword ptr [RBP + -0x30] MOV byte ptr [RAX],DL INC RAX MOV qword ptr [RBP + -0x48],RAX MOV EAX,R8D ADD R12,RAX ADD R15,0x38 TEST R14D,R14D MOV RBX,qword ptr [RBP + -0x40] JNZ 0x00149f4b JMP 0x0014a1f6 LAB_0014a1e0: MOV RCX,RBX CMP dword ptr [RBP + -0x2c],0x1 JZ 0x0014a1f2 MOV RAX,qword ptr [RBP + -0x48] MOV EDX,dword ptr [RBP + -0x30] MOV byte ptr [RAX],DL LAB_0014a1f2: MOV RBX,qword ptr [RBP + -0x40] LAB_0014a1f6: MOV RDX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RDX] CMP qword ptr [RAX + 0x6a8],0x0 JZ 0x0014a212 MOV AL,byte ptr [RDX + 0xb0] MOV byte ptr [RCX],AL INC RCX LAB_0014a212: SUB ECX,EBX MOV RAX,RCX LAB_0014a217: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014a226: CALL 0x001a8156 MOV dword ptr [RAX],0x7f XOR EAX,EAX JMP 0x0014a217
int _ma_rec_pack(long *param_1,int1 *param_2,ushort *param_3) { ushort uVar1; ushort uVar2; ushort *puVar3; int iVar4; uint uVar5; ulong uVar6; int1 *puVar8; int4 *puVar9; byte bVar10; long lVar11; ushort *puVar12; uint uVar13; ulong __n; int iVar14; byte *pbVar15; uint *puVar16; long local_60; uint local_38; uint local_34; ushort *puVar7; lVar11 = *param_1; pbVar15 = param_2 + *(uint *)(lVar11 + 0x3f4); local_60 = param_1[0x51]; puVar16 = *(uint **)(lVar11 + 0x588); if ((ulong)*(uint *)(lVar11 + 0x3fc) != 0) { memcpy(pbVar15,param_3,(ulong)*(uint *)(lVar11 + 0x3fc)); lVar11 = *param_1; param_3 = (ushort *)((long)param_3 + (ulong)*(uint *)(lVar11 + 0x3fc)); pbVar15 = pbVar15 + *(uint *)(lVar11 + 0x3fc); } iVar14 = *(int *)(lVar11 + 0x3c8); puVar8 = param_2; joined_r0x00149f3d: if (iVar14 == 0) { LAB_0014a1f6: if (*(long *)(*param_1 + 0x6a8) != 0) { *pbVar15 = *(byte *)(param_1 + 0x16); pbVar15 = pbVar15 + 1; } return (int)pbVar15 - (int)param_2; } local_34 = 1; local_38 = 0; do { iVar14 = iVar14 + -1; uVar1 = (ushort)puVar16[2]; __n = (ulong)uVar1; uVar5 = *puVar16; if (uVar5 == 0) { LAB_0014a04d: memcpy(pbVar15,param_3,__n); pbVar15 = pbVar15 + __n; } else { if (uVar5 == 3) { iVar4 = bcmp(param_3,maria_zero_string,__n); if (iVar4 == 0) { local_38 = local_38 | local_34; } else { memcpy(pbVar15,param_3,__n); pbVar15 = pbVar15 + __n; } } else if (uVar5 == 4) { if (*(long *)(local_60 + 0x10) == 0) { local_38 = local_38 | local_34; } else { uVar6 = (ulong)(uVar1 - 8); memcpy(pbVar15,param_3,uVar6); memcpy(pbVar15 + uVar6,*(void **)((long)param_3 + uVar6),*(size_t *)(local_60 + 0x10)); pbVar15 = pbVar15 + uVar6 + *(long *)(local_60 + 0x10); } local_60 = local_60 + 0x18; } else { if (2 < uVar5) { if (uVar5 != 8) goto LAB_0014a04d; if (uVar1 < 0x101) { uVar5 = (uint)(byte)*param_3; LAB_0014a0cb: uVar13 = uVar5; *pbVar15 = (byte)uVar13; pbVar15 = pbVar15 + 1; } else { uVar2 = *param_3; uVar13 = (uint)uVar2; uVar5 = (uint)uVar2; if (uVar2 < 0xff) goto LAB_0014a0cb; *pbVar15 = 0xff; pbVar15[2] = (byte)uVar2; pbVar15[1] = (byte)(uVar2 >> 8); pbVar15 = pbVar15 + 3; } if ((ushort)puVar16[2] < uVar13) { puVar9 = (int4 *)_my_thread_var(); *puVar9 = 0x7f; return 0; } memcpy(pbVar15,(byte *)((long)param_3 + (2 - (ulong)(uVar1 < 0x101))),(ulong)uVar13); pbVar15 = pbVar15 + uVar13; goto LAB_0014a08f; } puVar7 = (ushort *)((long)param_3 + __n); puVar3 = puVar7; puVar12 = param_3; if (uVar5 == 1) { do { puVar7 = puVar3; if (puVar7 <= param_3) break; puVar3 = (ushort *)((long)puVar7 + -1); } while (*(byte *)((long)puVar7 + -1) == 0x20); } else if (__n != 0) { do { if ((byte)*puVar12 != 0x20) break; puVar12 = (ushort *)((long)puVar12 + 1); } while (puVar12 < puVar7); } uVar6 = (long)puVar7 - (long)puVar12; uVar13 = (uint)uVar1; uVar5 = (uint)uVar6; if ((0x7f < uVar5 && 0xff < uVar13) + uVar5 + 1 < uVar13) { lVar11 = 1; bVar10 = (byte)uVar6; if (0x7f < uVar5 && 0xff < uVar13) { bVar10 = bVar10 | 0x80; pbVar15[1] = (byte)(uVar6 >> 7); lVar11 = 2; } *pbVar15 = bVar10; memcpy(pbVar15 + lVar11,puVar12,uVar6 & 0xffffffff); pbVar15 = pbVar15 + lVar11 + (uVar6 & 0xffffffff); local_38 = local_38 | local_34; } else { memcpy(pbVar15,param_3,__n); pbVar15 = pbVar15 + __n; } } local_34 = local_34 * 2; if (0xff < local_34) break; } LAB_0014a08f: param_3 = (ushort *)((long)param_3 + __n); puVar16 = puVar16 + 0xe; if (iVar14 == 0) { if (local_34 != 1) { *puVar8 = (char)local_38; } goto LAB_0014a1f6; } } while( true ); *puVar8 = (char)local_38; puVar8 = puVar8 + 1; param_3 = (ushort *)((long)param_3 + __n); puVar16 = puVar16 + 0xe; goto joined_r0x00149f3d; }
55,241
vsort_sequential_int
davidesantangelo[P]vsort/vsort.c
static void vsort_sequential_int(int *arr, int size) { if (!arr || size <= 1) return; // Use insertion sort if nearly sorted (check only for modest sizes) if (size < thresholds.parallel_threshold / 2 && // Avoid check on very large arrays where it's less likely size < thresholds.radix_threshold && // Avoid if radix sort will be chosen anyway vsort_is_nearly_sorted_int(arr, size)) { vsort_log_info("Array (int, size %d) appears nearly sorted, using insertion sort.", size); insertion_sort_int(arr, 0, size - 1); return; } // Use radix sort for large integer arrays if (size >= thresholds.radix_threshold) { vsort_log_info("Using radix sort for large int array (size: %d)", size); radix_sort_int(arr, size); return; } // Default to quicksort quicksort_int(arr, 0, size - 1); }
O0
c
vsort_sequential_int: subq $0x48, %rsp movq %rdi, 0x18(%rsp) movl %esi, 0x14(%rsp) cmpq $0x0, 0x18(%rsp) je 0x1aec cmpl $0x1, 0x14(%rsp) jg 0x1af1 jmp 0x1c6b movl 0x14(%rsp), %eax movl %eax, 0x10(%rsp) movl 0x65e9(%rip), %eax # 0x80e8 movl $0x2, %ecx cltd idivl %ecx movl %eax, %ecx movl 0x10(%rsp), %eax cmpl %ecx, %eax jge 0x1c2a movl 0x14(%rsp), %eax cmpl 0x65cd(%rip), %eax # 0x80ec jge 0x1c2a movq 0x18(%rsp), %rdi movl 0x14(%rsp), %esi callq 0x29a0 testb $0x1, %al jne 0x1b3c jmp 0x1c2a movl 0x14(%rsp), %esi leaq 0x3bb3(%rip), %rdi # 0x56fa movb $0x0, %al callq 0x4560 movq 0x18(%rsp), %rcx movl 0x14(%rsp), %eax subl $0x1, %eax movq %rcx, 0x40(%rsp) movl $0x0, 0x3c(%rsp) movl %eax, 0x38(%rsp) movl 0x3c(%rsp), %eax addl $0x1, %eax movl %eax, 0x34(%rsp) movl 0x34(%rsp), %eax cmpl 0x38(%rsp), %eax jg 0x1c28 movq 0x40(%rsp), %rax movslq 0x34(%rsp), %rcx movl (%rax,%rcx,4), %eax movl %eax, 0x30(%rsp) movl 0x34(%rsp), %eax subl $0x1, %eax movl %eax, 0x2c(%rsp) movq 0x40(%rsp), %rax movslq 0x2c(%rsp), %rcx shlq $0x2, %rcx addq %rcx, %rax movq %rax, 0x20(%rsp) movl 0x2c(%rsp), %ecx xorl %eax, %eax cmpl 0x3c(%rsp), %ecx movb %al, 0xf(%rsp) jl 0x1bd8 movq 0x20(%rsp), %rax movl (%rax), %eax cmpl 0x30(%rsp), %eax setg %al movb %al, 0xf(%rsp) movb 0xf(%rsp), %al testb $0x1, %al jne 0x1be2 jmp 0x1c0c movq 0x20(%rsp), %rax movl (%rax), %ecx movq 0x20(%rsp), %rax movl %ecx, 0x4(%rax) movl 0x2c(%rsp), %eax addl $-0x1, %eax movl %eax, 0x2c(%rsp) movq 0x20(%rsp), %rax addq $-0x4, %rax movq %rax, 0x20(%rsp) jmp 0x1bb6 movl 0x30(%rsp), %ecx movq 0x20(%rsp), %rax movl %ecx, 0x4(%rax) movl 0x34(%rsp), %eax addl $0x1, %eax movl %eax, 0x34(%rsp) jmp 0x1b76 jmp 0x1c6b movl 0x14(%rsp), %eax cmpl 0x64b8(%rip), %eax # 0x80ec jl 0x1c58 movl 0x14(%rsp), %esi leaq 0x3afb(%rip), %rdi # 0x573c movb $0x0, %al callq 0x4560 movq 0x18(%rsp), %rdi movl 0x14(%rsp), %esi callq 0x2b40 jmp 0x1c6b movq 0x18(%rsp), %rdi movl 0x14(%rsp), %edx subl $0x1, %edx xorl %esi, %esi callq 0x3050 addq $0x48, %rsp retq
vsort_sequential_int: sub rsp, 18h mov [rsp+18h+var_8], rdi mov [rsp+18h+var_C], esi cmp [rsp+18h+var_8], 0 jz short loc_1AEC cmp [rsp+18h+var_C], 1 jg short loc_1AF1 loc_1AEC: jmp loc_1B99 loc_1AF1: mov eax, [rsp+18h+var_C] mov [rsp+18h+var_10], eax mov eax, cs:dword_70C8 mov ecx, 2 cdq idiv ecx mov ecx, eax mov eax, [rsp+18h+var_10] cmp eax, ecx jge short loc_1B58 mov eax, [rsp+18h+var_C] cmp eax, cs:dword_70CC jge short loc_1B58 mov rdi, [rsp+18h+var_8] mov esi, [rsp+18h+var_C] call vsort_is_nearly_sorted_int test al, 1 jnz short loc_1B31 jmp short loc_1B58 loc_1B31: mov esi, [rsp+18h+var_C] lea rdi, aArrayIntSizeDA; "Array (int, size %d) appears nearly sor"... mov al, 0 call vsort_log_info mov rdi, [rsp+18h+var_8] mov edx, [rsp+18h+var_C] sub edx, 1 xor esi, esi call insertion_sort_int jmp short loc_1B99 loc_1B58: mov eax, [rsp+18h+var_C] cmp eax, cs:dword_70CC jl short loc_1B86 mov esi, [rsp+18h+var_C] lea rdi, aUsingRadixSort; "Using radix sort for large int array (s"... mov al, 0 call vsort_log_info mov rdi, [rsp+18h+var_8] mov esi, [rsp+18h+var_C] call radix_sort_int jmp short loc_1B99 loc_1B86: mov rdi, [rsp+18h+var_8] mov edx, [rsp+18h+var_C] sub edx, 1 xor esi, esi call quicksort_int loc_1B99: add rsp, 18h retn
void vsort_sequential_int(long long a1, int a2, long long a3, long long a4, int a5, int a6) { long long v6; // rdx int v7; // ecx if ( a1 && a2 > 1 ) { v6 = (unsigned int)(dword_70C8 >> 31); LODWORD(v6) = dword_70C8 % 2; v7 = dword_70C8 / 2; if ( a2 < dword_70C8 / 2 && a2 < dword_70CC && (vsort_is_nearly_sorted_int(a1, (unsigned int)a2, v6) & 1) != 0 ) { vsort_log_info( (unsigned int)"Array (int, size %d) appears nearly sorted, using insertion sort.", a2, v6, v7, a5, a6); insertion_sort_int(a1, 0LL, (unsigned int)(a2 - 1)); } else if ( a2 < dword_70CC ) { quicksort_int(a1, 0LL, (unsigned int)(a2 - 1)); } else { vsort_log_info((unsigned int)"Using radix sort for large int array (size: %d)", a2, v6, v7, a5, a6); radix_sort_int(a1, (unsigned int)a2); } } }
vsort_sequential_int: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV dword ptr [RSP + 0xc],ESI CMP qword ptr [RSP + 0x10],0x0 JZ 0x00101aec CMP dword ptr [RSP + 0xc],0x1 JG 0x00101af1 LAB_00101aec: JMP 0x00101b99 LAB_00101af1: MOV EAX,dword ptr [RSP + 0xc] MOV dword ptr [RSP + 0x8],EAX MOV EAX,dword ptr [0x001070c8] MOV ECX,0x2 CDQ IDIV ECX MOV ECX,EAX MOV EAX,dword ptr [RSP + 0x8] CMP EAX,ECX JGE 0x00101b58 MOV EAX,dword ptr [RSP + 0xc] CMP EAX,dword ptr [0x001070cc] JGE 0x00101b58 MOV RDI,qword ptr [RSP + 0x10] MOV ESI,dword ptr [RSP + 0xc] CALL 0x001027f0 TEST AL,0x1 JNZ 0x00101b31 JMP 0x00101b58 LAB_00101b31: MOV ESI,dword ptr [RSP + 0xc] LEA RDI,[0x104663] MOV AL,0x0 CALL 0x00103d30 MOV RDI,qword ptr [RSP + 0x10] MOV EDX,dword ptr [RSP + 0xc] SUB EDX,0x1 XOR ESI,ESI CALL 0x00102990 JMP 0x00101b99 LAB_00101b58: MOV EAX,dword ptr [RSP + 0xc] CMP EAX,dword ptr [0x001070cc] JL 0x00101b86 MOV ESI,dword ptr [RSP + 0xc] LEA RDI,[0x1046a5] MOV AL,0x0 CALL 0x00103d30 MOV RDI,qword ptr [RSP + 0x10] MOV ESI,dword ptr [RSP + 0xc] CALL 0x00102a60 JMP 0x00101b99 LAB_00101b86: MOV RDI,qword ptr [RSP + 0x10] MOV EDX,dword ptr [RSP + 0xc] SUB EDX,0x1 XOR ESI,ESI CALL 0x00102f70 LAB_00101b99: ADD RSP,0x18 RET
void vsort_sequential_int(long param_1,int param_2) { ulong uVar1; if ((param_1 != 0) && (1 < param_2)) { if ((param_2 < DAT_001070c8 / 2) && ((param_2 < DAT_001070cc && (uVar1 = vsort_is_nearly_sorted_int(param_1,param_2,(long)DAT_001070c8 % 2 & 0xffffffff), (uVar1 & 1) != 0)))) { vsort_log_info("Array (int, size %d) appears nearly sorted, using insertion sort.",param_2); insertion_sort_int(param_1,0,param_2 + -1); } else if (param_2 < DAT_001070cc) { quicksort_int(param_1,0,param_2 + -1); } else { vsort_log_info("Using radix sort for large int array (size: %d)",param_2); radix_sort_int(param_1,param_2); } } return; }
55,242
vsort_sequential_int
davidesantangelo[P]vsort/vsort.c
static void vsort_sequential_int(int *arr, int size) { if (!arr || size <= 1) return; // Use insertion sort if nearly sorted (check only for modest sizes) if (size < thresholds.parallel_threshold / 2 && // Avoid check on very large arrays where it's less likely size < thresholds.radix_threshold && // Avoid if radix sort will be chosen anyway vsort_is_nearly_sorted_int(arr, size)) { vsort_log_info("Array (int, size %d) appears nearly sorted, using insertion sort.", size); insertion_sort_int(arr, 0, size - 1); return; } // Use radix sort for large integer arrays if (size >= thresholds.radix_threshold) { vsort_log_info("Using radix sort for large int array (size: %d)", size); radix_sort_int(arr, size); return; } // Default to quicksort quicksort_int(arr, 0, size - 1); }
O3
c
vsort_sequential_int: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x438, %rsp # imm = 0x438 movl %esi, %r14d movq %rdi, %r13 movl 0x405a(%rip), %ecx # 0x60e4 cmpl $0x14, %esi jl 0x2152 movl 0x4047(%rip), %eax # 0x60e0 movl %eax, %edx shrl $0x1f, %edx addl %eax, %edx sarl %edx cmpl %r14d, %edx jle 0x2152 cmpl %r14d, %ecx jle 0x2152 movzwl %r14w, %eax imull $0xcccd, %eax, %eax # imm = 0xCCCD shrl $0x14, %eax cmpl $0xc8, %r14d movl $0xa, %edx cmovael %eax, %edx cmpl $0x7e4, %r14d # imm = 0x7E4 movl $0x64, %esi cmovbl %edx, %esi xorl %edi, %edi movl %r14d, %eax xorl %edx, %edx divl %esi cmpl %r14d, %esi movl $0x1, %edx cmovbel %eax, %edx cmpl %r14d, %edx jae 0x2152 movl %edx, %eax addl %edx, %edx leaq (,%rax,4), %r8 addq %r13, %r8 movl $0xffffffff, %r9d # imm = 0xFFFFFFFF xorl %r10d, %r10d movl %edi, %r11d movl %r10d, %edi movl (%r13,%rdi,4), %ebx xorl %edi, %edi cmpl (%r8,%r10,4), %ebx setg %dil addl %r11d, %edi leal (%rdx,%r10), %ebx leal 0x1(%r9), %r11d cmpl %r14d, %ebx jge 0x2144 addl $0x2, %r9d addq %rax, %r10 cmpl %esi, %r9d movl %r11d, %r9d jb 0x2110 addl %edi, %edi leal (%rdi,%rdi,4), %eax cmpl %r11d, %eax jbe 0x2328 cmpl %r14d, %ecx jg 0x2309 leaq 0x15b6(%rip), %rdi # 0x3718 movl %r14d, %esi xorl %eax, %eax callq 0x2cff movl (%r13), %ebx movl %r14d, %r12d cmpl $0x2, %r14d jl 0x219c movl $0x1, %eax movl %ebx, %r15d movl (%r13,%rax,4), %ecx cmpl %ebx, %ecx cmovgl %ecx, %ebx cmpl %r15d, %ecx cmovll %ecx, %r15d incq %rax cmpq %rax, %r12 jne 0x2181 jmp 0x219f movl %ebx, %r15d leaq (,%r12,4), %rbp movq %rbp, %rdi callq 0x1130 testq %rax, %rax je 0x22fb movl %r15d, %edi negl %edi movq %r13, %rdx movl %r15d, %r13d sarl $0x1f, %r13d andl %r13d, %edi testl %r14d, %r14d jle 0x21e1 xorl %esi, %esi movl (%rdx,%rsi,4), %ecx addl %edi, %ecx movl %ecx, (%rax,%rsi,4) incq %rsi cmpq %rsi, %r12 jne 0x21d1 movl %edi, 0x14(%rsp) movq %rax, 0x8(%rsp) movq %rdx, 0x18(%rsp) movq %rbp, %rdi callq 0x1130 testq %rax, %rax je 0x23b5 andl %r15d, %r13d movl %ebx, %ecx subl %r13d, %ecx bsrl %ecx, %ecx xorl $-0x20, %ecx addl $0x28, %ecx shrl $0x3, %ecx cmpl %r13d, %ebx movl $0x1, %edx cmovnel %ecx, %edx movl %edx, 0x4(%rsp) leaq 0x1(%r12), %rcx movq %rcx, 0x28(%rsp) xorl %r13d, %r13d movq %rax, 0x20(%rsp) movq 0x8(%rsp), %r15 movq %rax, %rbx leal (,%r13,8), %ebp movl $0x400, %edx # imm = 0x400 leaq 0x30(%rsp), %rdi xorl %esi, %esi callq 0x10c0 movl $0x0, %eax testl %r14d, %r14d jle 0x227d xorl %eax, %eax movl (%r15,%rax,4), %edx movl %ebp, %ecx shrl %cl, %edx movzbl %dl, %ecx incl 0x30(%rsp,%rcx,4) incq %rax cmpq %rax, %r12 jne 0x2262 movl 0x30(%rsp), %eax movl $0x1, %ecx addl 0x30(%rsp,%rcx,4), %eax movl %eax, 0x30(%rsp,%rcx,4) incq %rcx cmpq $0x100, %rcx # imm = 0x100 jne 0x2282 movq 0x28(%rsp), %rax testl %r14d, %r14d jle 0x22e2 movl -0x8(%r15,%rax,4), %edx movl %edx, %esi movl %ebp, %ecx shrl %cl, %esi movzbl %sil, %ecx movslq 0x30(%rsp,%rcx,4), %rsi leaq -0x1(%rsi), %rdi movl %edi, 0x30(%rsp,%rcx,4) movl %edx, -0x4(%rbx,%rsi,4) decq %rax cmpq $0x1, %rax jg 0x22a0 incl %r13d movq %r15, %rax movq %rbx, %r15 cmpl 0x4(%rsp), %r13d jne 0x223a jmp 0x2376 incl %r13d movq %r15, %rax movq %rbx, %r15 cmpl 0x4(%rsp), %r13d jne 0x223a jmp 0x238f leaq 0x1446(%rip), %rdi # 0x3748 xorl %eax, %eax callq 0x2bd9 decl %r14d movq %r13, %rdi movl %r14d, %esi addq $0x438, %rsp # imm = 0x438 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x2822 leaq 0x13a7(%rip), %rdi # 0x36d6 xorl %ebx, %ebx movl %r14d, %esi xorl %eax, %eax callq 0x2cff decl %r14d movl $0x1, %eax movl (%r13,%rax,4), %ecx leaq (,%rbx,4), %rdx addq %r13, %rdx movl %eax, %esi movl (%rdx), %edi cmpl %ecx, %edi jle 0x2366 movl %edi, 0x4(%rdx) addq $-0x4, %rdx decl %esi jg 0x2355 movl %ecx, 0x4(%rdx) incq %rax incq %rbx cmpq %r14, %rbx jne 0x2343 jmp 0x23a3 xorl %eax, %eax movq 0x18(%rsp), %rdx movl (%rbx,%rax,4), %ecx subl 0x14(%rsp), %ecx movl %ecx, (%rdx,%rax,4) incq %rax cmpq %rax, %r12 jne 0x237d movq 0x8(%rsp), %rdi callq 0x1030 movq 0x20(%rsp), %rdi callq 0x1030 addq $0x438, %rsp # imm = 0x438 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x13db(%rip), %rdi # 0x3797 xorl %eax, %eax callq 0x2bd9 movq 0x8(%rsp), %rdi callq 0x1030 decl %r14d movq 0x18(%rsp), %rdi jmp 0x230f
vsort_sequential_int: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 438h mov r14d, esi mov r13, rdi mov ecx, cs:thresholds_3 cmp esi, 14h jl loc_2152 mov eax, cs:thresholds_2 mov edx, eax shr edx, 1Fh add edx, eax sar edx, 1 cmp edx, r14d jle loc_2152 cmp ecx, r14d jle loc_2152 movzx eax, r14w imul eax, 0CCCDh shr eax, 14h cmp r14d, 0C8h mov edx, 0Ah cmovnb edx, eax cmp r14d, 7E4h mov esi, 64h ; 'd' cmovb esi, edx xor edi, edi mov eax, r14d xor edx, edx div esi cmp esi, r14d mov edx, 1 cmovbe edx, eax cmp edx, r14d jnb short loc_2152 mov eax, edx add edx, edx lea r8, ds:0[rax*4] add r8, r13 mov r9d, 0FFFFFFFFh xor r10d, r10d loc_2110: mov r11d, edi mov edi, r10d mov ebx, [r13+rdi*4+0] xor edi, edi cmp ebx, [r8+r10*4] setnle dil add edi, r11d lea ebx, [rdx+r10] lea r11d, [r9+1] cmp ebx, r14d jge short loc_2144 add r9d, 2 add r10, rax cmp r9d, esi mov r9d, r11d jb short loc_2110 loc_2144: add edi, edi lea eax, [rdi+rdi*4] cmp eax, r11d jbe loc_2328 loc_2152: cmp ecx, r14d jg loc_2309 lea rdi, aUsingRadixSort; "Using radix sort for large int array (s"... mov esi, r14d xor eax, eax call vsort_log_info mov ebx, [r13+0] mov r12d, r14d cmp r14d, 2 jl short loc_219C mov eax, 1 mov r15d, ebx loc_2181: mov ecx, [r13+rax*4+0] cmp ecx, ebx cmovg ebx, ecx cmp ecx, r15d cmovl r15d, ecx inc rax cmp r12, rax jnz short loc_2181 jmp short loc_219F loc_219C: mov r15d, ebx loc_219F: lea rbp, ds:0[r12*4] mov rdi, rbp call _malloc test rax, rax jz loc_22FB mov edi, r15d neg edi mov rdx, r13 mov r13d, r15d sar r13d, 1Fh and edi, r13d test r14d, r14d jle short loc_21E1 xor esi, esi loc_21D1: mov ecx, [rdx+rsi*4] add ecx, edi mov [rax+rsi*4], ecx inc rsi cmp r12, rsi jnz short loc_21D1 loc_21E1: mov [rsp+468h+var_454], edi mov [rsp+468h+var_460], rax mov [rsp+468h+var_450], rdx mov rdi, rbp call _malloc test rax, rax jz loc_23B5 and r13d, r15d mov ecx, ebx sub ecx, r13d bsr ecx, ecx xor ecx, 0FFFFFFE0h add ecx, 28h ; '(' shr ecx, 3 cmp ebx, r13d mov edx, 1 cmovnz edx, ecx mov [rsp+468h+var_464], edx lea rcx, [r12+1] mov [rsp+468h+var_440], rcx xor r13d, r13d mov [rsp+468h+var_448], rax mov r15, [rsp+468h+var_460] loc_223A: mov rbx, rax lea ebp, ds:0[r13*8] mov edx, 400h lea rdi, [rsp+468h+var_438] xor esi, esi call _memset mov eax, 0 test r14d, r14d jle short loc_227D xor eax, eax loc_2262: mov edx, [r15+rax*4] mov ecx, ebp shr edx, cl movzx ecx, dl inc [rsp+rcx*4+468h+var_438] inc rax cmp r12, rax jnz short loc_2262 mov eax, [rsp+468h+var_438] loc_227D: mov ecx, 1 loc_2282: add eax, [rsp+rcx*4+468h+var_438] mov [rsp+rcx*4+468h+var_438], eax inc rcx cmp rcx, 100h jnz short loc_2282 mov rax, [rsp+468h+var_440] test r14d, r14d jle short loc_22E2 loc_22A0: mov edx, [r15+rax*4-8] mov esi, edx mov ecx, ebp shr esi, cl movzx ecx, sil movsxd rsi, [rsp+rcx*4+468h+var_438] lea rdi, [rsi-1] mov [rsp+rcx*4+468h+var_438], edi mov [rbx+rsi*4-4], edx dec rax cmp rax, 1 jg short loc_22A0 inc r13d mov rax, r15 mov r15, rbx cmp r13d, [rsp+468h+var_464] jnz loc_223A jmp loc_2376 loc_22E2: inc r13d mov rax, r15 mov r15, rbx cmp r13d, [rsp+468h+var_464] jnz loc_223A jmp loc_238F loc_22FB: lea rdi, aMemoryAllocati; "Memory allocation failed in radix_sort_"... xor eax, eax call vsort_log_error loc_2309: dec r14d mov rdi, r13 loc_230F: mov esi, r14d add rsp, 438h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp quicksort_int loc_2328: lea rdi, aArrayIntSizeDA; "Array (int, size %d) appears nearly sor"... xor ebx, ebx mov esi, r14d xor eax, eax call vsort_log_info dec r14d mov eax, 1 loc_2343: mov ecx, [r13+rax*4+0] lea rdx, ds:0[rbx*4] add rdx, r13 mov esi, eax loc_2355: mov edi, [rdx] cmp edi, ecx jle short loc_2366 mov [rdx+4], edi add rdx, 0FFFFFFFFFFFFFFFCh dec esi jg short loc_2355 loc_2366: mov [rdx+4], ecx inc rax inc rbx cmp rbx, r14 jnz short loc_2343 jmp short loc_23A3 loc_2376: xor eax, eax mov rdx, [rsp+468h+var_450] loc_237D: mov ecx, [rbx+rax*4] sub ecx, [rsp+468h+var_454] mov [rdx+rax*4], ecx inc rax cmp r12, rax jnz short loc_237D loc_238F: mov rdi, [rsp+468h+var_460] call _free mov rdi, [rsp+468h+var_448] call _free loc_23A3: add rsp, 438h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_23B5: lea rdi, aMemoryAllocati_0; "Memory allocation failed in radix_sort_"... xor eax, eax call vsort_log_error mov rdi, [rsp+468h+var_460] call _free dec r14d mov rdi, [rsp+468h+var_450] jmp loc_230F
long long vsort_sequential_int(int *a1, int a2, unsigned int a3, long long a4, int *a5, int a6) { unsigned int v8; // edx unsigned int v9; // esi int v10; // edi long long v11; // rax long long v12; // r10 unsigned int v13; // r11d bool v14; // cf long long v15; // rsi int v16; // ebx long long v17; // rax int v18; // r15d int v19; // ecx long long v20; // rax int v21; // edx int v22; // ecx int v23; // r8d int v24; // r9d int v25; // edi long long v26; // rax int v27; // edx int v28; // ecx int v29; // r8d int v30; // r9d int v31; // r13d unsigned int v32; // ecx unsigned int v33; // ecx int v34; // edx int v35; // r13d long long v36; // r15 long long v37; // rbx char v38; // bp int v39; // eax long long v40; // rax long long v41; // rcx long long i; // rcx long long v43; // rax unsigned int v44; // edx long long v45; // rcx long long v46; // rsi unsigned int v47; // r14d int *v48; // rdi long long result; // rax long long v50; // rbx int v51; // r14d int v52; // ecx int *v53; // rdx int v54; // esi long long v56; // rax int v57; // [rsp+4h] [rbp-464h] long long v58; // [rsp+8h] [rbp-460h] int *v59; // [rsp+18h] [rbp-450h] long long v60; // [rsp+20h] [rbp-448h] _DWORD v61[270]; // [rsp+30h] [rbp-438h] BYREF if ( a2 >= 20 ) { a3 = thresholds_2 / 2; if ( thresholds_2 / 2 > a2 && thresholds_3 > a2 ) { v8 = 10; if ( (unsigned int)a2 >= 0xC8 ) v8 = (unsigned __int16)a2 / 0x14u; v9 = 100; if ( (unsigned int)a2 < 0x7E4 ) v9 = v8; v10 = 0; a3 = 1; if ( v9 <= a2 ) a3 = a2 / v9; if ( a3 < a2 ) { v11 = a3; a3 *= 2; a5 = &a1[v11]; a6 = -1; v12 = 0LL; do { v10 += a1[(unsigned int)v12] > a5[v12]; v13 = a6 + 1; if ( (int)(a3 + v12) >= a2 ) break; v12 += v11; v14 = a6 + 2 < v9; ++a6; } while ( v14 ); if ( 10 * v10 <= v13 ) { v50 = 0LL; vsort_log_info( (unsigned int)"Array (int, size %d) appears nearly sorted, using insertion sort.", a2, a3, thresholds_3, (_DWORD)a5, a6); v51 = a2 - 1; result = 1LL; do { v52 = a1[result]; v53 = &a1[v50]; v54 = result; do { if ( *v53 <= v52 ) break; v53[1] = *v53; --v53; } while ( v54-- > 1 ); v53[1] = v52; ++result; ++v50; } while ( v50 != v51 ); return result; } } } } if ( thresholds_3 > a2 ) goto LABEL_46; LODWORD(v15) = a2; vsort_log_info((unsigned int)"Using radix sort for large int array (size: %d)", a2, a3, thresholds_3, (_DWORD)a5, a6); v16 = *a1; if ( a2 < 2 ) { v18 = *a1; } else { v17 = 1LL; v18 = *a1; do { v19 = a1[v17]; if ( v19 > v16 ) v16 = a1[v17]; if ( v19 < v18 ) v18 = a1[v17]; ++v17; } while ( a2 != v17 ); } v20 = malloc(4LL * (unsigned int)a2); if ( !v20 ) { vsort_log_error( (unsigned int)"Memory allocation failed in radix_sort_int temp_arr, falling back to quicksort", a2, v21, v22, v23, v24); LABEL_46: v47 = a2 - 1; v48 = a1; return quicksort_int(v48, v47); } v25 = (v18 >> 31) & -v18; if ( a2 > 0 ) { v15 = 0LL; do { *(_DWORD *)(v20 + 4 * v15) = v25 + a1[v15]; ++v15; } while ( a2 != v15 ); } v58 = v20; v59 = a1; v26 = malloc(4LL * (unsigned int)a2); if ( !v26 ) { vsort_log_error( (unsigned int)"Memory allocation failed in radix_sort_int output, falling back to quicksort", v15, v27, v28, v29, v30); free(v58); v47 = a2 - 1; v48 = a1; return quicksort_int(v48, v47); } v31 = v18 & (v18 >> 31); _BitScanReverse(&v32, v16 - v31); v33 = ((v32 ^ 0xFFFFFFE0) + 40) >> 3; v34 = 1; if ( v16 != v31 ) v34 = v33; v57 = v34; v35 = 0; v60 = v26; v36 = v58; do { while ( 1 ) { v37 = v26; v38 = 8 * v35; memset(v61, 0LL, 1024LL); v39 = 0; if ( a2 > 0 ) { v40 = 0LL; do { v41 = (unsigned __int8)(*(_DWORD *)(v36 + 4 * v40) >> v38); ++v61[v41]; ++v40; } while ( a2 != v40 ); v39 = v61[0]; } for ( i = 1LL; i != 256; ++i ) { v39 += v61[i]; v61[i] = v39; } v43 = (unsigned int)a2 + 1LL; if ( a2 > 0 ) break; ++v35; v26 = v36; v36 = v37; if ( v35 == v57 ) goto LABEL_55; } do { v44 = *(_DWORD *)(v36 + 4 * v43 - 8); v45 = (unsigned __int8)(v44 >> v38); v46 = (int)v61[v45]; v61[v45] = v46 - 1; *(_DWORD *)(v37 + 4 * v46 - 4) = v44; --v43; } while ( v43 > 1 ); ++v35; v26 = v36; v36 = v37; } while ( v35 != v57 ); v56 = 0LL; do { v59[v56] = *(_DWORD *)(v37 + 4 * v56) - v25; ++v56; } while ( a2 != v56 ); LABEL_55: free(v58); return free(v60); }
vsort_sequential_int: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x438 MOV R14D,ESI MOV R13,RDI MOV ECX,dword ptr [0x001060e4] CMP ESI,0x14 JL 0x00102152 MOV EAX,dword ptr [0x001060e0] MOV EDX,EAX SHR EDX,0x1f ADD EDX,EAX SAR EDX,0x1 CMP EDX,R14D JLE 0x00102152 CMP ECX,R14D JLE 0x00102152 MOVZX EAX,R14W IMUL EAX,EAX,0xcccd SHR EAX,0x14 CMP R14D,0xc8 MOV EDX,0xa CMOVNC EDX,EAX CMP R14D,0x7e4 MOV ESI,0x64 CMOVC ESI,EDX XOR EDI,EDI MOV EAX,R14D XOR EDX,EDX DIV ESI CMP ESI,R14D MOV EDX,0x1 CMOVBE EDX,EAX CMP EDX,R14D JNC 0x00102152 MOV EAX,EDX ADD EDX,EDX LEA R8,[RAX*0x4] ADD R8,R13 MOV R9D,0xffffffff XOR R10D,R10D LAB_00102110: MOV R11D,EDI MOV EDI,R10D MOV EBX,dword ptr [R13 + RDI*0x4] XOR EDI,EDI CMP EBX,dword ptr [R8 + R10*0x4] SETG DIL ADD EDI,R11D LEA EBX,[RDX + R10*0x1] LEA R11D,[R9 + 0x1] CMP EBX,R14D JGE 0x00102144 ADD R9D,0x2 ADD R10,RAX CMP R9D,ESI MOV R9D,R11D JC 0x00102110 LAB_00102144: ADD EDI,EDI LEA EAX,[RDI + RDI*0x4] CMP EAX,R11D JBE 0x00102328 LAB_00102152: CMP ECX,R14D JG 0x00102309 LEA RDI,[0x103718] MOV ESI,R14D XOR EAX,EAX CALL 0x00102cff MOV EBX,dword ptr [R13] MOV R12D,R14D CMP R14D,0x2 JL 0x0010219c MOV EAX,0x1 MOV R15D,EBX LAB_00102181: MOV ECX,dword ptr [R13 + RAX*0x4] CMP ECX,EBX CMOVG EBX,ECX CMP ECX,R15D CMOVL R15D,ECX INC RAX CMP R12,RAX JNZ 0x00102181 JMP 0x0010219f LAB_0010219c: MOV R15D,EBX LAB_0010219f: LEA RBP,[R12*0x4] MOV RDI,RBP CALL 0x00101130 TEST RAX,RAX JZ 0x001022fb MOV EDI,R15D NEG EDI MOV RDX,R13 MOV R13D,R15D SAR R13D,0x1f AND EDI,R13D TEST R14D,R14D JLE 0x001021e1 XOR ESI,ESI LAB_001021d1: MOV ECX,dword ptr [RDX + RSI*0x4] ADD ECX,EDI MOV dword ptr [RAX + RSI*0x4],ECX INC RSI CMP R12,RSI JNZ 0x001021d1 LAB_001021e1: MOV dword ptr [RSP + 0x14],EDI MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x18],RDX MOV RDI,RBP CALL 0x00101130 TEST RAX,RAX JZ 0x001023b5 AND R13D,R15D MOV ECX,EBX SUB ECX,R13D BSR ECX,ECX XOR ECX,0xffffffe0 ADD ECX,0x28 SHR ECX,0x3 CMP EBX,R13D MOV EDX,0x1 CMOVNZ EDX,ECX MOV dword ptr [RSP + 0x4],EDX LEA RCX,[R12 + 0x1] MOV qword ptr [RSP + 0x28],RCX XOR R13D,R13D MOV qword ptr [RSP + 0x20],RAX MOV R15,qword ptr [RSP + 0x8] LAB_0010223a: MOV RBX,RAX LEA EBP,[R13*0x8] MOV EDX,0x400 LEA RDI,[RSP + 0x30] XOR ESI,ESI CALL 0x001010c0 MOV EAX,0x0 TEST R14D,R14D JLE 0x0010227d XOR EAX,EAX LAB_00102262: MOV EDX,dword ptr [R15 + RAX*0x4] MOV ECX,EBP SHR EDX,CL MOVZX ECX,DL INC dword ptr [RSP + RCX*0x4 + 0x30] INC RAX CMP R12,RAX JNZ 0x00102262 MOV EAX,dword ptr [RSP + 0x30] LAB_0010227d: MOV ECX,0x1 LAB_00102282: ADD EAX,dword ptr [RSP + RCX*0x4 + 0x30] MOV dword ptr [RSP + RCX*0x4 + 0x30],EAX INC RCX CMP RCX,0x100 JNZ 0x00102282 MOV RAX,qword ptr [RSP + 0x28] TEST R14D,R14D JLE 0x001022e2 LAB_001022a0: MOV EDX,dword ptr [R15 + RAX*0x4 + -0x8] MOV ESI,EDX MOV ECX,EBP SHR ESI,CL MOVZX ECX,SIL MOVSXD RSI,dword ptr [RSP + RCX*0x4 + 0x30] LEA RDI,[RSI + -0x1] MOV dword ptr [RSP + RCX*0x4 + 0x30],EDI MOV dword ptr [RBX + RSI*0x4 + -0x4],EDX DEC RAX CMP RAX,0x1 JG 0x001022a0 INC R13D MOV RAX,R15 MOV R15,RBX CMP R13D,dword ptr [RSP + 0x4] JNZ 0x0010223a JMP 0x00102376 LAB_001022e2: INC R13D MOV RAX,R15 MOV R15,RBX CMP R13D,dword ptr [RSP + 0x4] JNZ 0x0010223a JMP 0x0010238f LAB_001022fb: LEA RDI,[0x103748] XOR EAX,EAX CALL 0x00102bd9 LAB_00102309: DEC R14D MOV RDI,R13 LAB_0010230f: MOV ESI,R14D ADD RSP,0x438 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00102822 LAB_00102328: LEA RDI,[0x1036d6] XOR EBX,EBX MOV ESI,R14D XOR EAX,EAX CALL 0x00102cff DEC R14D MOV EAX,0x1 LAB_00102343: MOV ECX,dword ptr [R13 + RAX*0x4] LEA RDX,[RBX*0x4] ADD RDX,R13 MOV ESI,EAX LAB_00102355: MOV EDI,dword ptr [RDX] CMP EDI,ECX JLE 0x00102366 MOV dword ptr [RDX + 0x4],EDI ADD RDX,-0x4 DEC ESI JG 0x00102355 LAB_00102366: MOV dword ptr [RDX + 0x4],ECX INC RAX INC RBX CMP RBX,R14 JNZ 0x00102343 JMP 0x001023a3 LAB_00102376: XOR EAX,EAX MOV RDX,qword ptr [RSP + 0x18] LAB_0010237d: MOV ECX,dword ptr [RBX + RAX*0x4] SUB ECX,dword ptr [RSP + 0x14] MOV dword ptr [RDX + RAX*0x4],ECX INC RAX CMP R12,RAX JNZ 0x0010237d LAB_0010238f: MOV RDI,qword ptr [RSP + 0x8] CALL 0x00101030 MOV RDI,qword ptr [RSP + 0x20] CALL 0x00101030 LAB_001023a3: ADD RSP,0x438 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001023b5: LEA RDI,[0x103797] XOR EAX,EAX CALL 0x00102bd9 MOV RDI,qword ptr [RSP + 0x8] CALL 0x00101030 DEC R14D MOV RDI,qword ptr [RSP + 0x18] JMP 0x0010230f
void vsort_sequential_int(uint *param_1,uint param_2) { void *pvVar1; void *__ptr; void *__ptr_00; void *pvVar2; ulong uVar3; byte bVar4; uint uVar5; uint uVar6; long lVar7; ulong uVar8; uint *puVar9; ulong uVar10; int iVar11; uint uVar12; ulong uVar13; uint uVar14; uint uVar15; void *pvVar16; int aiStack_438 [258]; uVar3 = (ulong)param_2; if (((0x13 < (int)param_2) && ((int)param_2 < thresholds_2 / 2)) && ((int)param_2 < thresholds_3)) { uVar15 = 10; if (199 < param_2) { uVar15 = (param_2 & 0xffff) / 0x14; } uVar10 = 100; if (param_2 < 0x7e4) { uVar10 = (ulong)uVar15; } iVar11 = 0; uVar8 = 1; if ((uint)uVar10 <= param_2) { uVar8 = uVar3 / uVar10; } if ((uint)uVar8 < param_2) { uVar13 = 0; uVar15 = 0xffffffff; do { iVar11 = (uint)((int)param_1[uVar8 + uVar13] < (int)param_1[uVar13 & 0xffffffff]) + iVar11; uVar14 = uVar15 + 1; if ((int)param_2 <= (int)((uint)uVar8 * 2 + (int)uVar13)) break; uVar12 = uVar15 + 2; uVar13 = uVar13 + uVar8; uVar15 = uVar14; } while (uVar12 < (uint)uVar10); if ((uint)(iVar11 * 10) <= uVar14) { uVar10 = 0; vsort_log_info("Array (int, size %d) appears nearly sorted, using insertion sort.",uVar3); uVar3 = 1; do { uVar15 = param_1[uVar3]; puVar9 = param_1 + uVar10; uVar8 = uVar3 & 0xffffffff; do { if ((int)*puVar9 <= (int)uVar15) break; puVar9[1] = *puVar9; puVar9 = puVar9 + -1; iVar11 = (int)uVar8; uVar14 = iVar11 - 1; uVar8 = (ulong)uVar14; } while (uVar14 != 0 && 0 < iVar11); puVar9[1] = uVar15; uVar3 = uVar3 + 1; uVar10 = uVar10 + 1; if (uVar10 == param_2 - 1) { return; } } while( true ); } } } if (thresholds_3 <= (int)param_2) { vsort_log_info("Using radix sort for large int array (size: %d)"); uVar15 = *param_1; uVar14 = uVar15; if (1 < (int)param_2) { uVar10 = 1; do { uVar12 = param_1[uVar10]; if ((int)uVar15 < (int)uVar12) { uVar15 = uVar12; } if ((int)uVar12 < (int)uVar14) { uVar14 = uVar12; } uVar10 = uVar10 + 1; } while (uVar3 != uVar10); } __ptr = malloc(uVar3 * 4); if (__ptr == (void *)0x0) { vsort_log_error( "Memory allocation failed in radix_sort_int temp_arr, falling back to quicksort" ); } else { uVar12 = -uVar14 & (int)uVar14 >> 0x1f; if (0 < (int)param_2) { uVar10 = 0; do { *(uint *)((long)__ptr + uVar10 * 4) = param_1[uVar10] + uVar12; uVar10 = uVar10 + 1; } while (uVar3 != uVar10); } __ptr_00 = malloc(uVar3 * 4); if (__ptr_00 != (void *)0x0) { uVar14 = (int)uVar14 >> 0x1f & uVar14; uVar5 = uVar15 - uVar14; uVar6 = 0x1f; if (uVar5 != 0) { for (; uVar5 >> uVar6 == 0; uVar6 = uVar6 - 1) { } } uVar5 = 1; if (uVar15 != uVar14) { uVar5 = (uVar6 ^ 0xffffffe0) + 0x28 >> 3; } uVar15 = 0; pvVar1 = __ptr_00; pvVar16 = __ptr; do { while( true ) { pvVar2 = pvVar1; bVar4 = (char)uVar15 * '\b'; memset(aiStack_438,0,0x400); iVar11 = 0; if (0 < (int)param_2) { uVar10 = 0; do { aiStack_438[*(uint *)((long)pvVar16 + uVar10 * 4) >> (bVar4 & 0x1f) & 0xff] = aiStack_438[*(uint *)((long)pvVar16 + uVar10 * 4) >> (bVar4 & 0x1f) & 0xff] + 1 ; uVar10 = uVar10 + 1; iVar11 = aiStack_438[0]; } while (uVar3 != uVar10); } lVar7 = 1; do { iVar11 = iVar11 + aiStack_438[lVar7]; aiStack_438[lVar7] = iVar11; lVar7 = lVar7 + 1; } while (lVar7 != 0x100); lVar7 = uVar3 + 1; pvVar1 = pvVar16; if (0 < (int)param_2) break; uVar15 = uVar15 + 1; pvVar16 = pvVar2; if (uVar15 == uVar5) goto LAB_0010238f; } do { uVar14 = *(uint *)((long)pvVar16 + lVar7 * 4 + -8); uVar6 = uVar14 >> (bVar4 & 0x1f) & 0xff; iVar11 = aiStack_438[uVar6]; aiStack_438[uVar6] = iVar11 + -1; *(uint *)((long)pvVar2 + (long)iVar11 * 4 + -4) = uVar14; lVar7 = lVar7 + -1; } while (1 < lVar7); uVar15 = uVar15 + 1; pvVar16 = pvVar2; } while (uVar15 != uVar5); uVar10 = 0; do { param_1[uVar10] = *(int *)((long)pvVar2 + uVar10 * 4) - uVar12; uVar10 = uVar10 + 1; } while (uVar3 != uVar10); LAB_0010238f: free(__ptr); free(__ptr_00); return; } vsort_log_error("Memory allocation failed in radix_sort_int output, falling back to quicksort" ); free(__ptr); } } quicksort_int(param_1,param_2 - 1); return; }
55,243
my_uca_context_weight_find
eloqsql/strings/ctype-uca.c
static inline const MY_CONTRACTION * my_uca_context_weight_find(my_uca_scanner *scanner, my_wc_t *wc, size_t max_char_length) { const MY_CONTRACTION *cnt; DBUG_ASSERT(scanner->level->contractions.nitems); /* If we have scanned a character which can have previous context, and there were some more characters already before, then reconstruct codepoint of the previous character from "page" and "code" into w[1], and verify that {wc[1], wc[0]} together form a real previous context pair. Note, we support only 2-character long sequences with previous context at the moment. CLDR does not have longer sequences. */ if (my_uca_can_be_previous_context_tail(&scanner->level->contractions, wc[0]) && scanner->wbeg != nochar && /* if not the very first character */ my_uca_can_be_previous_context_head(&scanner->level->contractions, (wc[1]= ((scanner->page << 8) + scanner->code))) && (cnt= my_uca_previous_context_find(scanner, wc[1], wc[0]))) { scanner->page= scanner->code= 0; /* Clear for the next character */ return cnt; } else if (my_uca_can_be_contraction_head(&scanner->level->contractions, wc[0])) { /* Check if w[0] starts a contraction */ if ((cnt= my_uca_scanner_contraction_find(scanner, wc, max_char_length))) return cnt; } return NULL; }
O0
c
my_uca_context_weight_find: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) jmp 0x4fd16 movq -0x10(%rbp), %rax movq 0x18(%rax), %rdi addq $0x18, %rdi movq -0x18(%rbp), %rax movq (%rax), %rsi callq 0x4fec0 movsbl %al, %eax cmpl $0x0, %eax je 0x4fdc1 movq -0x10(%rbp), %rax leaq 0x15f61b(%rip), %rcx # 0x1af360 cmpq %rcx, (%rax) je 0x4fdc1 movq -0x10(%rbp), %rax movq 0x18(%rax), %rdi addq $0x18, %rdi movq -0x10(%rbp), %rax movl 0x24(%rax), %eax shll $0x8, %eax movq -0x10(%rbp), %rcx addl 0x28(%rcx), %eax movslq %eax, %rsi movq -0x18(%rbp), %rax movq %rsi, 0x8(%rax) callq 0x4fef0 movsbl %al, %eax cmpl $0x0, %eax je 0x4fdc1 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rax movq 0x8(%rax), %rsi movq -0x18(%rbp), %rax movq (%rax), %rdx callq 0x4ff20 movq %rax, -0x28(%rbp) cmpq $0x0, %rax je 0x4fdc1 movq -0x10(%rbp), %rax movl $0x0, 0x28(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x24(%rax) movq -0x28(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x4fe0e movq -0x10(%rbp), %rax movq 0x18(%rax), %rdi addq $0x18, %rdi movq -0x18(%rbp), %rax movq (%rax), %rsi callq 0x47330 cmpb $0x0, %al je 0x4fe04 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x4ffd0 movq %rax, -0x28(%rbp) cmpq $0x0, %rax je 0x4fe02 movq -0x28(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x4fe0e jmp 0x4fe04 jmp 0x4fe06 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
my_uca_context_weight_find: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx jmp short $+2 loc_4FD16: mov rax, [rbp+var_10] mov rdi, [rax+18h] add rdi, 18h mov rax, [rbp+var_18] mov rsi, [rax] call my_uca_can_be_previous_context_tail movsx eax, al cmp eax, 0 jz loc_4FDC1 mov rax, [rbp+var_10] lea rcx, nochar cmp [rax], rcx jz short loc_4FDC1 mov rax, [rbp+var_10] mov rdi, [rax+18h] add rdi, 18h mov rax, [rbp+var_10] mov eax, [rax+24h] shl eax, 8 mov rcx, [rbp+var_10] add eax, [rcx+28h] movsxd rsi, eax mov rax, [rbp+var_18] mov [rax+8], rsi call my_uca_can_be_previous_context_head movsx eax, al cmp eax, 0 jz short loc_4FDC1 mov rdi, [rbp+var_10] mov rax, [rbp+var_18] mov rsi, [rax+8] mov rax, [rbp+var_18] mov rdx, [rax] call my_uca_previous_context_find mov [rbp+var_28], rax cmp rax, 0 jz short loc_4FDC1 mov rax, [rbp+var_10] mov dword ptr [rax+28h], 0 mov rax, [rbp+var_10] mov dword ptr [rax+24h], 0 mov rax, [rbp+var_28] mov [rbp+var_8], rax jmp short loc_4FE0E loc_4FDC1: mov rax, [rbp+var_10] mov rdi, [rax+18h] add rdi, 18h mov rax, [rbp+var_18] mov rsi, [rax] call my_uca_can_be_contraction_head cmp al, 0 jz short loc_4FE04 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call my_uca_scanner_contraction_find mov [rbp+var_28], rax cmp rax, 0 jz short loc_4FE02 mov rax, [rbp+var_28] mov [rbp+var_8], rax jmp short loc_4FE0E loc_4FE02: jmp short $+2 loc_4FE04: jmp short $+2 loc_4FE06: mov [rbp+var_8], 0 loc_4FE0E: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long my_uca_context_weight_find(long long a1, _QWORD *a2, long long a3) { long long v3; // rdi long long v5; // [rsp+8h] [rbp-28h] long long v6; // [rsp+8h] [rbp-28h] if ( (unsigned __int8)my_uca_can_be_previous_context_tail(*(_QWORD *)(a1 + 24) + 24LL, *a2) && *(_UNKNOWN **)a1 != &nochar && (v3 = *(_QWORD *)(a1 + 24) + 24LL, a2[1] = *(_DWORD *)(a1 + 40) + (*(_DWORD *)(a1 + 36) << 8), (unsigned __int8)my_uca_can_be_previous_context_head(v3)) && (v5 = my_uca_previous_context_find(a1, a2[1], *a2)) != 0 ) { *(_DWORD *)(a1 + 40) = 0; *(_DWORD *)(a1 + 36) = 0; return v5; } else if ( (unsigned __int8)my_uca_can_be_contraction_head(*(_QWORD *)(a1 + 24) + 24LL, *a2) && (v6 = my_uca_scanner_contraction_find(a1, a2, a3)) != 0 ) { return v6; } else { return 0LL; } }
my_uca_context_weight_find: 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 JMP 0x0014fd16 LAB_0014fd16: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x18] ADD RDI,0x18 MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX] CALL 0x0014fec0 MOVSX EAX,AL CMP EAX,0x0 JZ 0x0014fdc1 MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x2af360] CMP qword ptr [RAX],RCX JZ 0x0014fdc1 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x18] ADD RDI,0x18 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x24] SHL EAX,0x8 MOV RCX,qword ptr [RBP + -0x10] ADD EAX,dword ptr [RCX + 0x28] MOVSXD RSI,EAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x8],RSI CALL 0x0014fef0 MOVSX EAX,AL CMP EAX,0x0 JZ 0x0014fdc1 MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RAX] CALL 0x0014ff20 MOV qword ptr [RBP + -0x28],RAX CMP RAX,0x0 JZ 0x0014fdc1 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x28],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x24],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x8],RAX JMP 0x0014fe0e LAB_0014fdc1: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x18] ADD RDI,0x18 MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX] CALL 0x00147330 CMP AL,0x0 JZ 0x0014fe04 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x0014ffd0 MOV qword ptr [RBP + -0x28],RAX CMP RAX,0x0 JZ 0x0014fe02 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x8],RAX JMP 0x0014fe0e LAB_0014fe02: JMP 0x0014fe04 LAB_0014fe04: JMP 0x0014fe06 LAB_0014fe06: MOV qword ptr [RBP + -0x8],0x0 LAB_0014fe0e: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
long my_uca_context_weight_find(int8 *param_1,int8 *param_2,int8 param_3) { char cVar1; long lVar2; long local_10; cVar1 = my_uca_can_be_previous_context_tail(param_1[3] + 0x18,*param_2); if ((cVar1 != '\0') && ((int4 *)*param_1 != &nochar)) { lVar2 = param_1[3]; param_2[1] = (long)(*(int *)((long)param_1 + 0x24) * 0x100 + *(int *)(param_1 + 5)); cVar1 = my_uca_can_be_previous_context_head(lVar2 + 0x18); if ((cVar1 != '\0') && (lVar2 = my_uca_previous_context_find(param_1,param_2[1],*param_2), lVar2 != 0)) { *(int4 *)(param_1 + 5) = 0; *(int4 *)((long)param_1 + 0x24) = 0; return lVar2; } } cVar1 = my_uca_can_be_contraction_head(param_1[3] + 0x18,*param_2); if ((cVar1 == '\0') || (local_10 = my_uca_scanner_contraction_find(param_1,param_2,param_3), local_10 == 0)) { local_10 = 0; } return local_10; }
55,244
my_valid_mbcharlen_utf8mb3
eloqsql/strings/ctype-utf8.c
static inline int my_valid_mbcharlen_utf8mb3(const uchar *s, const uchar *e) { uchar c; DBUG_ASSERT(s < e); c= s[0]; if (c < 0x80) return 1; if (c < 0xc2) return MY_CS_ILSEQ; if (c < 0xe0) { if (s+2 > e) /* We need 2 characters */ return MY_CS_TOOSMALL2; if (!(IS_CONTINUATION_BYTE(s[1]))) return MY_CS_ILSEQ; return 2; } DBUG_ASSERT(c < 0xf0); if (s+3 > e) /* We need 3 characters */ return MY_CS_TOOSMALL3; if (!IS_UTF8MB3_STEP2(c, s[1], s[2])) return MY_CS_ILSEQ; return 3; }
O0
c
my_valid_mbcharlen_utf8mb3: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) jmp 0x7451e movq -0x10(%rbp), %rax movb (%rax), %al movb %al, -0x19(%rbp) movzbl -0x19(%rbp), %eax cmpl $0x80, %eax jge 0x7453e movl $0x1, -0x4(%rbp) jmp 0x74607 movzbl -0x19(%rbp), %eax cmpl $0xc2, %eax jge 0x74555 movl $0x0, -0x4(%rbp) jmp 0x74607 movzbl -0x19(%rbp), %eax cmpl $0xe0, %eax jge 0x7459e movq -0x10(%rbp), %rax addq $0x2, %rax cmpq -0x18(%rbp), %rax jbe 0x7457a movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x74607 movq -0x10(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jl 0x74595 movl $0x0, -0x4(%rbp) jmp 0x74607 movl $0x2, -0x4(%rbp) jmp 0x74607 jmp 0x745a0 jmp 0x745a2 movq -0x10(%rbp), %rax addq $0x3, %rax cmpq -0x18(%rbp), %rax jbe 0x745b9 movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99 jmp 0x74607 movq -0x10(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x745f7 movq -0x10(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x745f7 movzbl -0x19(%rbp), %eax cmpl $0xe1, %eax jge 0x74600 movq -0x10(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xa0, %eax jge 0x74600 movl $0x0, -0x4(%rbp) jmp 0x74607 movl $0x3, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax)
my_valid_mbcharlen_utf8mb3: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi jmp short $+2 loc_7451E: mov rax, [rbp+var_10] mov al, [rax] mov [rbp+var_19], al movzx eax, [rbp+var_19] cmp eax, 80h jge short loc_7453E mov [rbp+var_4], 1 jmp loc_74607 loc_7453E: movzx eax, [rbp+var_19] cmp eax, 0C2h jge short loc_74555 mov [rbp+var_4], 0 jmp loc_74607 loc_74555: movzx eax, [rbp+var_19] cmp eax, 0E0h jge short loc_7459E mov rax, [rbp+var_10] add rax, 2 cmp rax, [rbp+var_18] jbe short loc_7457A mov [rbp+var_4], 0FFFFFF9Ah jmp loc_74607 loc_7457A: mov rax, [rbp+var_10] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jl short loc_74595 mov [rbp+var_4], 0 jmp short loc_74607 loc_74595: mov [rbp+var_4], 2 jmp short loc_74607 loc_7459E: jmp short $+2 loc_745A0: jmp short $+2 loc_745A2: mov rax, [rbp+var_10] add rax, 3 cmp rax, [rbp+var_18] jbe short loc_745B9 mov [rbp+var_4], 0FFFFFF99h jmp short loc_74607 loc_745B9: mov rax, [rbp+var_10] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jge short loc_745F7 mov rax, [rbp+var_10] movzx eax, byte ptr [rax+2] xor eax, 80h cmp eax, 40h ; '@' jge short loc_745F7 movzx eax, [rbp+var_19] cmp eax, 0E1h jge short loc_74600 mov rax, [rbp+var_10] movzx eax, byte ptr [rax+1] cmp eax, 0A0h jge short loc_74600 loc_745F7: mov [rbp+var_4], 0 jmp short loc_74607 loc_74600: mov [rbp+var_4], 3 loc_74607: mov eax, [rbp+var_4] pop rbp retn
long long my_valid_mbcharlen_utf8mb3(unsigned __int8 *a1, unsigned long long a2) { unsigned __int8 v3; // [rsp+1h] [rbp-19h] v3 = *a1; if ( *a1 >= 0x80u ) { if ( v3 >= 0xC2u ) { if ( v3 >= 0xE0u ) { if ( (unsigned long long)(a1 + 3) <= a2 ) { if ( (a1[1] ^ 0x80) < 64 && (a1[2] ^ 0x80) < 64 && (v3 >= 0xE1u || a1[1] >= 0xA0u) ) return 3; else return 0; } else { return (unsigned int)-103; } } else if ( (unsigned long long)(a1 + 2) <= a2 ) { if ( (a1[1] ^ 0x80) < 64 ) return 2; else return 0; } else { return (unsigned int)-102; } } else { return 0; } } else { return 1; } }
my_valid_mbcharlen_utf8mb3: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI JMP 0x0017451e LAB_0017451e: MOV RAX,qword ptr [RBP + -0x10] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x19],AL MOVZX EAX,byte ptr [RBP + -0x19] CMP EAX,0x80 JGE 0x0017453e MOV dword ptr [RBP + -0x4],0x1 JMP 0x00174607 LAB_0017453e: MOVZX EAX,byte ptr [RBP + -0x19] CMP EAX,0xc2 JGE 0x00174555 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00174607 LAB_00174555: MOVZX EAX,byte ptr [RBP + -0x19] CMP EAX,0xe0 JGE 0x0017459e MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x18] JBE 0x0017457a MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x00174607 LAB_0017457a: MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JL 0x00174595 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00174607 LAB_00174595: MOV dword ptr [RBP + -0x4],0x2 JMP 0x00174607 LAB_0017459e: JMP 0x001745a0 LAB_001745a0: JMP 0x001745a2 LAB_001745a2: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x3 CMP RAX,qword ptr [RBP + -0x18] JBE 0x001745b9 MOV dword ptr [RBP + -0x4],0xffffff99 JMP 0x00174607 LAB_001745b9: MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JGE 0x001745f7 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CMP EAX,0x40 JGE 0x001745f7 MOVZX EAX,byte ptr [RBP + -0x19] CMP EAX,0xe1 JGE 0x00174600 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xa0 JGE 0x00174600 LAB_001745f7: MOV dword ptr [RBP + -0x4],0x0 JMP 0x00174607 LAB_00174600: MOV dword ptr [RBP + -0x4],0x3 LAB_00174607: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_valid_mbcharlen_utf8mb3(byte *param_1,byte *param_2) { byte bVar1; int4 local_c; bVar1 = *param_1; if (bVar1 < 0x80) { local_c = 1; } else if (bVar1 < 0xc2) { local_c = 0; } else if (bVar1 < 0xe0) { if (param_2 < param_1 + 2) { local_c = 0xffffff9a; } else if ((param_1[1] ^ 0x80) < 0x40) { local_c = 2; } else { local_c = 0; } } else if (param_2 < param_1 + 3) { local_c = 0xffffff99; } else if ((((param_1[1] ^ 0x80) < 0x40) && ((param_1[2] ^ 0x80) < 0x40)) && ((0xe0 < bVar1 || (0x9f < param_1[1])))) { local_c = 3; } else { local_c = 0; } return local_c; }
55,245
my_strnxfrm_tis620_nopad
eloqsql/strings/ctype-tis620.c
static size_t my_strnxfrm_tis620_nopad(CHARSET_INFO *cs, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags) { size_t len, dstlen0= dstlen; len= MY_MIN(dstlen, srclen); memcpy(dst, src, len); len= thai2sortable(dst, len); set_if_smaller(dstlen, nweights); set_if_smaller(len, dstlen); len= my_strxfrm_pad_desc_and_reverse_nopad(cs, dst, dst + len, dst + dstlen, (uint)(dstlen - len), flags, 0); if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len < dstlen0) { size_t fill_length= dstlen0 - len; memset(dst + len, 0x00, fill_length); len= dstlen0; } return len; }
O3
c
my_strnxfrm_tis620_nopad: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r9, %r12 movl %ecx, %r15d movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r13 cmpq %r9, %rdx cmovbq %rdx, %r12 movq %rsi, %rdi movq %r8, %rsi movq %r12, %rdx callq 0x29080 movq %r14, %rdi movq %r12, %rsi callq 0xb7ee7 movl %r15d, %r8d cmpq %rbx, %r8 cmovaeq %rbx, %r8 cmpq %r8, %r12 cmovaeq %r8, %r12 leaq (%r14,%r12), %rdx leaq (%r14,%r8), %rcx subl %r12d, %r8d movl $0x0, (%rsp) movq %r13, %rdi movq %r14, %rsi movl 0x10(%rbp), %r15d movl %r15d, %r9d callq 0xb4d7a testb %r15b, %r15b jns 0xb807f movq %rbx, %rdx subq %rax, %rdx jbe 0xb807f addq %rax, %r14 movq %r14, %rdi xorl %esi, %esi callq 0x292c0 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
my_strnxfrm_tis620_nopad: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r12, r9 mov r15d, ecx mov rbx, rdx mov r14, rsi mov r13, rdi cmp rdx, r9 cmovb r12, rdx mov rdi, rsi mov rsi, r8 mov rdx, r12 call _memcpy mov rdi, r14 mov rsi, r12 call thai2sortable mov r8d, r15d cmp r8, rbx cmovnb r8, rbx cmp r12, r8 cmovnb r12, r8 lea rdx, [r14+r12] lea rcx, [r14+r8] sub r8d, r12d mov [rsp+30h+var_30], 0 mov rdi, r13 mov rsi, r14 mov r15d, [rbp+arg_0] mov r9d, r15d call my_strxfrm_pad_desc_and_reverse_nopad test r15b, r15b jns short loc_B807F mov rdx, rbx sub rdx, rax jbe short loc_B807F add r14, rax mov rdi, r14 xor esi, esi call _memset mov rax, rbx loc_B807F: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long my_strnxfrm_tis620_nopad( long long a1, unsigned __int8 *a2, unsigned long long a3, unsigned int a4, long long a5, unsigned long long a6, unsigned int a7) { unsigned long long v7; // r12 unsigned long long v10; // r8 unsigned long long result; // rax v7 = a6; if ( a3 < a6 ) v7 = a3; memcpy(a2, a5, v7); thai2sortable(a2, v7); v10 = a4; if ( a4 >= a3 ) v10 = a3; if ( v7 >= v10 ) v7 = v10; result = my_strxfrm_pad_desc_and_reverse_nopad( a1, (long long)a2, (unsigned long long)&a2[v7], (unsigned long long)&a2[v10], (int)v10 - (int)v7, a7, 0); if ( (a7 & 0x80u) != 0 && a3 > result ) { memset(&a2[result], 0LL, a3 - result); return a3; } return result; }
my_strnxfrm_tis620_nopad: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R12,R9 MOV R15D,ECX MOV RBX,RDX MOV R14,RSI MOV R13,RDI CMP RDX,R9 CMOVC R12,RDX MOV RDI,RSI MOV RSI,R8 MOV RDX,R12 CALL 0x00129080 MOV RDI,R14 MOV RSI,R12 CALL 0x001b7ee7 MOV R8D,R15D CMP R8,RBX CMOVNC R8,RBX CMP R12,R8 CMOVNC R12,R8 LEA RDX,[R14 + R12*0x1] LEA RCX,[R14 + R8*0x1] SUB R8D,R12D MOV dword ptr [RSP],0x0 MOV RDI,R13 MOV RSI,R14 MOV R15D,dword ptr [RBP + 0x10] MOV R9D,R15D CALL 0x001b4d7a TEST R15B,R15B JNS 0x001b807f MOV RDX,RBX SUB RDX,RAX JBE 0x001b807f ADD R14,RAX MOV RDI,R14 XOR ESI,ESI CALL 0x001292c0 MOV RAX,RBX LAB_001b807f: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong my_strnxfrm_tis620_nopad (int8 param_1,void *param_2,ulong param_3,uint param_4,void *param_5, ulong param_6,int4 param_7) { int8 in_RAX; ulong uVar1; uint uVar2; uVar2 = (uint)((ulong)in_RAX >> 0x20); if (param_3 < param_6) { param_6 = param_3; } memcpy(param_2,param_5,param_6); thai2sortable(param_2,param_6); uVar1 = (ulong)param_4; if (param_3 <= param_4) { uVar1 = param_3; } if (uVar1 <= param_6) { param_6 = uVar1; } uVar1 = my_strxfrm_pad_desc_and_reverse_nopad (param_1,param_2,(long)param_2 + param_6,(long)param_2 + uVar1, (int)uVar1 - (int)param_6,param_7,(ulong)uVar2 << 0x20); if (((char)param_7 < '\0') && (uVar1 <= param_3 && param_3 - uVar1 != 0)) { memset((void *)((long)param_2 + uVar1),0,param_3 - uVar1); uVar1 = param_3; } return uVar1; }
55,246
translog_next_LSN
eloqsql/storage/maria/ma_loghandler.c
LSN translog_next_LSN(TRANSLOG_ADDRESS addr, TRANSLOG_ADDRESS horizon) { TRANSLOG_SCANNER_DATA scanner; LSN result; DBUG_ENTER("translog_next_LSN"); if (horizon == LSN_IMPOSSIBLE) horizon= translog_get_horizon(); if (addr == horizon) DBUG_RETURN(LSN_IMPOSSIBLE); translog_scanner_init(addr, 0, &scanner, 1); /* addr can point not to a chunk beginning but page end so next page beginning. */ if (addr % TRANSLOG_PAGE_SIZE == 0) { /* We are emulating the page end which cased such horizon value to trigger translog_scanner_eop(). We can't just increase addr on page header overhead because it can be file end so we allow translog_get_next_chunk() to skip to the next page in correct way */ scanner.page_addr-= TRANSLOG_PAGE_SIZE; scanner.page_offset= TRANSLOG_PAGE_SIZE; #ifndef DBUG_OFF scanner.page= NULL; /* prevent using incorrect page content */ #endif } /* addr can point not to a chunk beginning but to a page end */ if (translog_scanner_eop(&scanner)) { if (translog_get_next_chunk(&scanner)) { result= LSN_ERROR; goto out; } if (scanner.page == END_OF_LOG) { result= LSN_IMPOSSIBLE; goto out; } } while (!translog_is_LSN_chunk(scanner.page[scanner.page_offset]) && scanner.page[scanner.page_offset] != TRANSLOG_FILLER) { if (translog_get_next_chunk(&scanner)) { result= LSN_ERROR; goto out; } if (scanner.page == END_OF_LOG) { result= LSN_IMPOSSIBLE; goto out; } } if (scanner.page[scanner.page_offset] == TRANSLOG_FILLER) result= LSN_IMPOSSIBLE; /* reached page filler */ else result= scanner.page_addr + scanner.page_offset; out: translog_destroy_scanner(&scanner); DBUG_RETURN(result); }
O3
c
translog_next_LSN: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x2038, %rsp # imm = 0x2038 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x20(%rbp) testq %rsi, %rsi jne 0x36de8 callq 0x35440 movq %rax, %rsi cmpq %rbx, %rsi jne 0x36df4 xorl %ebx, %ebx jmp 0x36eda leaq -0x2050(%rbp), %rdx movq %rbx, %rdi xorl %esi, %esi movl $0x1, %ecx callq 0x34147 testl $0x1fff, %ebx # imm = 0x1FFF je 0x36e29 movl -0x28(%rbp), %eax cmpq $0x1fff, %rax # imm = 0x1FFF ja 0x36e38 movq -0x38(%rbp), %rcx cmpb $-0x1, (%rcx,%rax) jne 0x36e61 jmp 0x36e38 addq $-0x2000, -0x50(%rbp) # imm = 0xE000 movl $0x2000, -0x28(%rbp) # imm = 0x2000 leaq -0x2050(%rbp), %rdi callq 0x341ee movl $0x1, %ebx testb %al, %al jne 0x36ed1 movq -0x38(%rbp), %rcx leaq 0xbc7fb4(%rip), %rax # 0xbfee10 cmpq %rax, %rcx je 0x36ec8 xorl %ebx, %ebx leaq -0x2050(%rbp), %r14 leaq 0xbc7f9f(%rip), %r15 # 0xbfee10 movl -0x28(%rbp), %eax movzbl (%rcx,%rax), %ecx movl %ecx, %edx andl $-0x40, %edx cmpl $0x40, %edx je 0x36eb7 testl %edx, %edx sete %dl movl %ecx, %esi notl %esi testb $0x3f, %sil setne %sil testb %sil, %dl jne 0x36eb7 cmpl $0xff, %ecx je 0x36ed1 movq %r14, %rdi callq 0x341ee testb %al, %al jne 0x36ecc movq -0x38(%rbp), %rcx cmpq %r15, %rcx jne 0x36e71 jmp 0x36ed1 cmpl $0xff, %ecx je 0x36ec8 addq -0x50(%rbp), %rax movq %rax, %rbx jmp 0x36ed1 xorl %ebx, %ebx jmp 0x36ed1 movl $0x1, %ebx movq -0x30(%rbp), %rdi callq 0x354fa movq %fs:0x28, %rax cmpq -0x20(%rbp), %rax jne 0x36efa movq %rbx, %rax addq $0x2038, %rsp # imm = 0x2038 popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x29250
translog_next_LSN: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 2038h mov rbx, rdi mov rax, fs:28h mov [rbp+var_20], rax test rsi, rsi jnz short loc_36DE8 call translog_get_horizon mov rsi, rax loc_36DE8: cmp rsi, rbx jnz short loc_36DF4 xor ebx, ebx jmp loc_36EDA loc_36DF4: lea rdx, [rbp+var_2050] mov rdi, rbx xor esi, esi mov ecx, 1 call translog_scanner_init test ebx, 1FFFh jz short loc_36E29 mov eax, [rbp+var_28] cmp rax, 1FFFh ja short loc_36E38 mov rcx, [rbp+var_38] cmp byte ptr [rcx+rax], 0FFh jnz short loc_36E61 jmp short loc_36E38 loc_36E29: add [rbp+var_50], 0FFFFFFFFFFFFE000h mov [rbp+var_28], 2000h loc_36E38: lea rdi, [rbp+var_2050] call translog_get_next_chunk mov ebx, 1 test al, al jnz loc_36ED1 mov rcx, [rbp+var_38] lea rax, end_of_log cmp rcx, rax jz short loc_36EC8 loc_36E61: xor ebx, ebx lea r14, [rbp+var_2050] lea r15, end_of_log loc_36E71: mov eax, [rbp+var_28] movzx ecx, byte ptr [rcx+rax] mov edx, ecx and edx, 0FFFFFFC0h cmp edx, 40h ; '@' jz short loc_36EB7 test edx, edx setz dl mov esi, ecx not esi test sil, 3Fh setnz sil test dl, sil jnz short loc_36EB7 cmp ecx, 0FFh jz short loc_36ED1 mov rdi, r14 call translog_get_next_chunk test al, al jnz short loc_36ECC mov rcx, [rbp+var_38] cmp rcx, r15 jnz short loc_36E71 jmp short loc_36ED1 loc_36EB7: cmp ecx, 0FFh jz short loc_36EC8 add rax, [rbp+var_50] mov rbx, rax jmp short loc_36ED1 loc_36EC8: xor ebx, ebx jmp short loc_36ED1 loc_36ECC: mov ebx, 1 loc_36ED1: mov rdi, [rbp+var_30] call translog_free_link loc_36EDA: mov rax, fs:28h cmp rax, [rbp+var_20] jnz short loc_36EFA mov rax, rbx add rsp, 2038h pop rbx pop r14 pop r15 pop rbp retn loc_36EFA: call ___stack_chk_fail
long long translog_next_LSN(long long a1, long long horizon) { long long v2; // rbx _BYTE *v3; // rcx int v4; // ecx _BYTE v6[8192]; // [rsp+0h] [rbp-2050h] BYREF long long v7; // [rsp+2000h] [rbp-50h] _BYTE *v8; // [rsp+2018h] [rbp-38h] long long v9; // [rsp+2020h] [rbp-30h] unsigned int v10; // [rsp+2028h] [rbp-28h] unsigned long long v11; // [rsp+2030h] [rbp-20h] v11 = __readfsqword(0x28u); if ( !horizon ) horizon = translog_get_horizon(); if ( horizon != a1 ) { translog_scanner_init(a1, 0, (long long)v6, 1); if ( (a1 & 0x1FFF) != 0 ) { if ( v10 <= 0x1FFFuLL ) { v3 = v8; if ( v8[v10] != 0xFF ) { LABEL_12: v2 = 0LL; while ( 1 ) { v4 = (unsigned __int8)v3[v10]; if ( (v4 & 0xFFFFFFC0) == 0x40 || (~(_BYTE)v4 & 0x3F) != 0 && (v4 & 0xFFFFFFC0) == 0 ) break; if ( v4 == 255 ) goto LABEL_23; if ( translog_get_next_chunk((long long)v6) ) { v2 = 1LL; goto LABEL_23; } v3 = v8; if ( v8 == (_BYTE *)&end_of_log ) goto LABEL_23; } if ( v4 == 255 ) goto LABEL_21; v2 = v7 + v10; goto LABEL_23; } } } else { v7 -= 0x2000LL; v10 = 0x2000; } v2 = 1LL; if ( !translog_get_next_chunk((long long)v6) ) { v3 = v8; if ( v8 != (_BYTE *)&end_of_log ) goto LABEL_12; LABEL_21: v2 = 0LL; } LABEL_23: translog_free_link(v9); return v2; } return 0LL; }
translog_next_LSN: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x2038 MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX TEST RSI,RSI JNZ 0x00136de8 CALL 0x00135440 MOV RSI,RAX LAB_00136de8: CMP RSI,RBX JNZ 0x00136df4 XOR EBX,EBX JMP 0x00136eda LAB_00136df4: LEA RDX,[RBP + -0x2050] MOV RDI,RBX XOR ESI,ESI MOV ECX,0x1 CALL 0x00134147 TEST EBX,0x1fff JZ 0x00136e29 MOV EAX,dword ptr [RBP + -0x28] CMP RAX,0x1fff JA 0x00136e38 MOV RCX,qword ptr [RBP + -0x38] CMP byte ptr [RCX + RAX*0x1],0xff JNZ 0x00136e61 JMP 0x00136e38 LAB_00136e29: ADD qword ptr [RBP + -0x50],-0x2000 MOV dword ptr [RBP + -0x28],0x2000 LAB_00136e38: LEA RDI,[RBP + -0x2050] CALL 0x001341ee MOV EBX,0x1 TEST AL,AL JNZ 0x00136ed1 MOV RCX,qword ptr [RBP + -0x38] LEA RAX,[0xcfee10] CMP RCX,RAX JZ 0x00136ec8 LAB_00136e61: XOR EBX,EBX LEA R14,[RBP + -0x2050] LEA R15,[0xcfee10] LAB_00136e71: MOV EAX,dword ptr [RBP + -0x28] MOVZX ECX,byte ptr [RCX + RAX*0x1] MOV EDX,ECX AND EDX,0xffffffc0 CMP EDX,0x40 JZ 0x00136eb7 TEST EDX,EDX SETZ DL MOV ESI,ECX NOT ESI TEST SIL,0x3f SETNZ SIL TEST DL,SIL JNZ 0x00136eb7 CMP ECX,0xff JZ 0x00136ed1 MOV RDI,R14 CALL 0x001341ee TEST AL,AL JNZ 0x00136ecc MOV RCX,qword ptr [RBP + -0x38] CMP RCX,R15 JNZ 0x00136e71 JMP 0x00136ed1 LAB_00136eb7: CMP ECX,0xff JZ 0x00136ec8 ADD RAX,qword ptr [RBP + -0x50] MOV RBX,RAX JMP 0x00136ed1 LAB_00136ec8: XOR EBX,EBX JMP 0x00136ed1 LAB_00136ecc: MOV EBX,0x1 LAB_00136ed1: MOV RDI,qword ptr [RBP + -0x30] CALL 0x001354fa LAB_00136eda: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x00136efa MOV RAX,RBX ADD RSP,0x2038 POP RBX POP R14 POP R15 POP RBP RET LAB_00136efa: CALL 0x00129250
long translog_next_LSN(ulong param_1,ulong param_2) { byte bVar1; char cVar2; long lVar3; long in_FS_OFFSET; int1 local_2058 [8192]; long local_58; int1 *local_40; int8 local_38; uint local_30; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); if (param_2 == 0) { param_2 = translog_get_horizon(); } if (param_2 == param_1) { lVar3 = 0; goto LAB_00136eda; } translog_scanner_init(param_1,0,local_2058,1); if ((param_1 & 0x1fff) == 0) { local_58 = local_58 + -0x2000; local_30 = 0x2000; LAB_00136e38: cVar2 = translog_get_next_chunk(local_2058); lVar3 = 1; if (cVar2 == '\0') { if (local_40 != &end_of_log) goto LAB_00136e61; LAB_00136ec8: lVar3 = 0; } } else { if ((0x1fff < (ulong)local_30) || (local_40[local_30] == -1)) goto LAB_00136e38; LAB_00136e61: lVar3 = 0; do { bVar1 = local_40[local_30]; if (((bVar1 & 0xc0) == 0x40) || ((bVar1 & 0xc0) == 0 && (~bVar1 & 0x3f) != 0)) { if (bVar1 == 0xff) goto LAB_00136ec8; lVar3 = (ulong)local_30 + local_58; break; } if (bVar1 == 0xff) break; cVar2 = translog_get_next_chunk(local_2058); if (cVar2 != '\0') { lVar3 = 1; break; } } while (local_40 != &end_of_log); } translog_free_link(local_38); LAB_00136eda: if (*(long *)(in_FS_OFFSET + 0x28) != local_28) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return lVar3; }
55,247
mthd_my_read_one_row
eloqsql/libmariadb/libmariadb/mariadb_lib.c
int mthd_my_read_one_row(MYSQL *mysql,uint fields,MYSQL_ROW row, ulong *lengths) { uint field; ulong pkt_len,len; uchar *pos,*prev_pos, *end_pos; if ((pkt_len=(uint) ma_net_safe_read(mysql)) == packet_error) return -1; if (pkt_len <= 8 && mysql->net.read_pos[0] == 254) { mysql->warning_count= uint2korr(mysql->net.read_pos + 1); mysql->server_status= uint2korr(mysql->net.read_pos + 3); return 1; /* End of data */ } prev_pos= 0; /* allowed to write at packet[-1] */ pos=mysql->net.read_pos; end_pos=pos+pkt_len; for (field=0 ; field < fields ; field++) { if ((len=(ulong) net_field_length(&pos)) == NULL_LENGTH) { /* null field */ row[field] = 0; *lengths++=0; } else { if (len > (ulong) (end_pos - pos) || pos > end_pos) { mysql->net.last_errno=CR_UNKNOWN_ERROR; strncpy(mysql->net.last_error,ER(mysql->net.last_errno), MYSQL_ERRMSG_SIZE - 1); return -1; } row[field] = (char*) pos; pos+=len; *lengths++=len; } if (prev_pos) *prev_pos=0; /* Terminate prev field */ prev_pos=pos; } row[field]=(char*) prev_pos+1; /* End of last field */ *prev_pos=0; /* Terminate last field */ return 0; }
O0
c
mthd_my_read_one_row: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rdi callq 0x20850 movl %eax, %eax movq %rax, -0x38(%rbp) movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpq %rcx, %rax jne 0x252cc movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x2549f cmpq $0x8, -0x38(%rbp) ja 0x25351 movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movzbl (%rax), %eax cmpl $0xfe, %eax jne 0x25351 movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x10(%rbp), %rcx movq 0x20(%rcx), %rcx movzbl 0x2(%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx addl %ecx, %eax movzwl %ax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x388(%rax) movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movzbl 0x3(%rax), %eax movzwl %ax, %eax movq -0x10(%rbp), %rcx movq 0x20(%rcx), %rcx movzbl 0x4(%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx addl %ecx, %eax movzwl %ax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x380(%rax) movl $0x1, -0x4(%rbp) jmp 0x2549f movq $0x0, -0x50(%rbp) movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax addq -0x38(%rbp), %rax movq %rax, -0x58(%rbp) movl $0x0, -0x2c(%rbp) movl -0x2c(%rbp), %eax cmpl -0x14(%rbp), %eax jae 0x2547e leaq -0x48(%rbp), %rdi callq 0x20e70 movq %rax, -0x40(%rbp) cmpq $-0x1, %rax jne 0x253c1 movq -0x20(%rbp), %rax movl -0x2c(%rbp), %ecx movq $0x0, (%rax,%rcx,8) movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x8, %rcx movq %rcx, -0x28(%rbp) movq $0x0, (%rax) jmp 0x2545a movq -0x40(%rbp), %rax movq -0x58(%rbp), %rcx movq -0x48(%rbp), %rdx subq %rdx, %rcx cmpq %rcx, %rax ja 0x253df movq -0x48(%rbp), %rax cmpq -0x58(%rbp), %rax jbe 0x25429 movq -0x10(%rbp), %rax movl $0x7d0, 0x90(%rax) # imm = 0x7D0 movq -0x10(%rbp), %rdi addq $0x97, %rdi movq -0x10(%rbp), %rax movl 0x90(%rax), %eax subl $0x7d0, %eax # imm = 0x7D0 movl %eax, %eax movl %eax, %ecx leaq 0x3dc9e(%rip), %rax # 0x630b0 movq (%rax,%rcx,8), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x172e0 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x2549f movq -0x48(%rbp), %rdx movq -0x20(%rbp), %rax movl -0x2c(%rbp), %ecx movq %rdx, (%rax,%rcx,8) movq -0x40(%rbp), %rax addq -0x48(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x40(%rbp), %rcx movq -0x28(%rbp), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, -0x28(%rbp) movq %rcx, (%rax) cmpq $0x0, -0x50(%rbp) je 0x25468 movq -0x50(%rbp), %rax movb $0x0, (%rax) movq -0x48(%rbp), %rax movq %rax, -0x50(%rbp) movl -0x2c(%rbp), %eax addl $0x1, %eax movl %eax, -0x2c(%rbp) jmp 0x25378 movq -0x50(%rbp), %rdx addq $0x1, %rdx movq -0x20(%rbp), %rax movl -0x2c(%rbp), %ecx movq %rdx, (%rax,%rcx,8) movq -0x50(%rbp), %rax movb $0x0, (%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopl (%rax,%rax)
mthd_my_read_one_row: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rdi, [rbp+var_10] call ma_net_safe_read mov eax, eax mov [rbp+var_38], rax mov ecx, 0FFFFFFFFh cmp rax, rcx jnz short loc_252CC mov [rbp+var_4], 0FFFFFFFFh jmp loc_2549F loc_252CC: cmp [rbp+var_38], 8 ja short loc_25351 mov rax, [rbp+var_10] mov rax, [rax+20h] movzx eax, byte ptr [rax] cmp eax, 0FEh jnz short loc_25351 mov rax, [rbp+var_10] mov rax, [rax+20h] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_10] mov rcx, [rcx+20h] movzx ecx, byte ptr [rcx+2] movzx ecx, cx shl ecx, 8 add eax, ecx movzx ecx, ax mov rax, [rbp+var_10] mov [rax+388h], ecx mov rax, [rbp+var_10] mov rax, [rax+20h] movzx eax, byte ptr [rax+3] movzx eax, ax mov rcx, [rbp+var_10] mov rcx, [rcx+20h] movzx ecx, byte ptr [rcx+4] movzx ecx, cx shl ecx, 8 add eax, ecx movzx ecx, ax mov rax, [rbp+var_10] mov [rax+380h], ecx mov [rbp+var_4], 1 jmp loc_2549F loc_25351: mov [rbp+var_50], 0 mov rax, [rbp+var_10] mov rax, [rax+20h] mov [rbp+var_48], rax mov rax, [rbp+var_48] add rax, [rbp+var_38] mov [rbp+var_58], rax mov [rbp+var_2C], 0 loc_25378: mov eax, [rbp+var_2C] cmp eax, [rbp+var_14] jnb loc_2547E lea rdi, [rbp+var_48] call net_field_length mov [rbp+var_40], rax cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_253C1 mov rax, [rbp+var_20] mov ecx, [rbp+var_2C] mov qword ptr [rax+rcx*8], 0 mov rax, [rbp+var_28] mov rcx, rax add rcx, 8 mov [rbp+var_28], rcx mov qword ptr [rax], 0 jmp loc_2545A loc_253C1: mov rax, [rbp+var_40] mov rcx, [rbp+var_58] mov rdx, [rbp+var_48] sub rcx, rdx cmp rax, rcx ja short loc_253DF mov rax, [rbp+var_48] cmp rax, [rbp+var_58] jbe short loc_25429 loc_253DF: mov rax, [rbp+var_10] mov dword ptr [rax+90h], 7D0h mov rdi, [rbp+var_10] add rdi, 97h mov rax, [rbp+var_10] mov eax, [rax+90h] sub eax, 7D0h mov eax, eax mov ecx, eax lea rax, client_errors mov rsi, [rax+rcx*8] mov edx, 1FFh call _strncpy mov [rbp+var_4], 0FFFFFFFFh jmp short loc_2549F loc_25429: mov rdx, [rbp+var_48] mov rax, [rbp+var_20] mov ecx, [rbp+var_2C] mov [rax+rcx*8], rdx mov rax, [rbp+var_40] add rax, [rbp+var_48] mov [rbp+var_48], rax mov rcx, [rbp+var_40] mov rax, [rbp+var_28] mov rdx, rax add rdx, 8 mov [rbp+var_28], rdx mov [rax], rcx loc_2545A: cmp [rbp+var_50], 0 jz short loc_25468 mov rax, [rbp+var_50] mov byte ptr [rax], 0 loc_25468: mov rax, [rbp+var_48] mov [rbp+var_50], rax mov eax, [rbp+var_2C] add eax, 1 mov [rbp+var_2C], eax jmp loc_25378 loc_2547E: mov rdx, [rbp+var_50] add rdx, 1 mov rax, [rbp+var_20] mov ecx, [rbp+var_2C] mov [rax+rcx*8], rdx mov rax, [rbp+var_50] mov byte ptr [rax], 0 mov [rbp+var_4], 0 loc_2549F: mov eax, [rbp+var_4] add rsp, 60h pop rbp retn
long long mthd_my_read_one_row(long long a1, long long a2, long long a3, long long a4, int a5, int a6) { unsigned long long *v6; // rax unsigned long long *v7; // rax unsigned __int8 *v9; // [rsp+8h] [rbp-58h] unsigned __int8 *v10; // [rsp+10h] [rbp-50h] unsigned __int8 *v11; // [rsp+18h] [rbp-48h] BYREF unsigned long long v12; // [rsp+20h] [rbp-40h] unsigned long long v13; // [rsp+28h] [rbp-38h] unsigned int i; // [rsp+34h] [rbp-2Ch] unsigned long long *v15; // [rsp+38h] [rbp-28h] long long v16; // [rsp+40h] [rbp-20h] unsigned int v17; // [rsp+4Ch] [rbp-14h] long long v18; // [rsp+50h] [rbp-10h] v18 = a1; v17 = a2; v16 = a3; v15 = (unsigned long long *)a4; v13 = (unsigned int)ma_net_safe_read(a1, a2, a3, a4, a5, a6); if ( v13 == 0xFFFFFFFF ) { return (unsigned int)-1; } else if ( v13 <= 8 && **(unsigned __int8 **)(v18 + 32) == 254 ) { *(_DWORD *)(v18 + 904) = (unsigned __int16)((*(unsigned __int8 *)(*(_QWORD *)(v18 + 32) + 2LL) << 8) + *(unsigned __int8 *)(*(_QWORD *)(v18 + 32) + 1LL)); *(_DWORD *)(v18 + 896) = (unsigned __int16)((*(unsigned __int8 *)(*(_QWORD *)(v18 + 32) + 4LL) << 8) + *(unsigned __int8 *)(*(_QWORD *)(v18 + 32) + 3LL)); return 1; } else { v10 = 0LL; v11 = *(unsigned __int8 **)(v18 + 32); v9 = &v11[v13]; for ( i = 0; i < v17; ++i ) { v12 = net_field_length(&v11); if ( v12 == -1LL ) { *(_QWORD *)(v16 + 8LL * i) = 0LL; v6 = v15++; *v6 = 0LL; } else { if ( v12 > v9 - v11 || v11 > v9 ) { *(_DWORD *)(v18 + 144) = 2000; strncpy(v18 + 151, client_errors[*(_DWORD *)(v18 + 144) - 2000], 511LL); return (unsigned int)-1; } *(_QWORD *)(v16 + 8LL * i) = v11; v11 += v12; v7 = v15++; *v7 = v12; } if ( v10 ) *v10 = 0; v10 = v11; } *(_QWORD *)(v16 + 8LL * i) = v10 + 1; *v10 = 0; return 0; } }
mthd_my_read_one_row: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00120850 MOV EAX,EAX MOV qword ptr [RBP + -0x38],RAX MOV ECX,0xffffffff CMP RAX,RCX JNZ 0x001252cc MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0012549f LAB_001252cc: CMP qword ptr [RBP + -0x38],0x8 JA 0x00125351 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOVZX EAX,byte ptr [RAX] CMP EAX,0xfe JNZ 0x00125351 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x20] MOVZX ECX,byte ptr [RCX + 0x2] MOVZX ECX,CX SHL ECX,0x8 ADD EAX,ECX MOVZX ECX,AX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x388],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOVZX EAX,byte ptr [RAX + 0x3] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x20] MOVZX ECX,byte ptr [RCX + 0x4] MOVZX ECX,CX SHL ECX,0x8 ADD EAX,ECX MOVZX ECX,AX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x380],ECX MOV dword ptr [RBP + -0x4],0x1 JMP 0x0012549f LAB_00125351: MOV qword ptr [RBP + -0x50],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] ADD RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x58],RAX MOV dword ptr [RBP + -0x2c],0x0 LAB_00125378: MOV EAX,dword ptr [RBP + -0x2c] CMP EAX,dword ptr [RBP + -0x14] JNC 0x0012547e LEA RDI,[RBP + -0x48] CALL 0x00120e70 MOV qword ptr [RBP + -0x40],RAX CMP RAX,-0x1 JNZ 0x001253c1 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x2c] MOV qword ptr [RAX + RCX*0x8],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x8 MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RAX],0x0 JMP 0x0012545a LAB_001253c1: MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x58] MOV RDX,qword ptr [RBP + -0x48] SUB RCX,RDX CMP RAX,RCX JA 0x001253df MOV RAX,qword ptr [RBP + -0x48] CMP RAX,qword ptr [RBP + -0x58] JBE 0x00125429 LAB_001253df: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x90],0x7d0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x97 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x90] SUB EAX,0x7d0 MOV EAX,EAX MOV ECX,EAX LEA RAX,[0x1630b0] MOV RSI,qword ptr [RAX + RCX*0x8] MOV EDX,0x1ff CALL 0x001172e0 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0012549f LAB_00125429: MOV RDX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x2c] MOV qword ptr [RAX + RCX*0x8],RDX MOV RAX,qword ptr [RBP + -0x40] ADD RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x48],RAX MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x28] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RBP + -0x28],RDX MOV qword ptr [RAX],RCX LAB_0012545a: CMP qword ptr [RBP + -0x50],0x0 JZ 0x00125468 MOV RAX,qword ptr [RBP + -0x50] MOV byte ptr [RAX],0x0 LAB_00125468: MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x50],RAX MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x00125378 LAB_0012547e: MOV RDX,qword ptr [RBP + -0x50] ADD RDX,0x1 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x2c] MOV qword ptr [RAX + RCX*0x8],RDX MOV RAX,qword ptr [RBP + -0x50] MOV byte ptr [RAX],0x0 MOV dword ptr [RBP + -0x4],0x0 LAB_0012549f: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x60 POP RBP RET
int4 mthd_my_read_one_row(long param_1,uint param_2,long param_3,ulong *param_4) { uint uVar1; int1 *puVar2; int1 *local_58; int1 *local_50; ulong local_48; ulong local_40; uint local_34; ulong *local_30; long local_28; uint local_1c; long local_18; int4 local_c; local_30 = param_4; local_28 = param_3; local_1c = param_2; local_18 = param_1; uVar1 = ma_net_safe_read(param_1); local_40 = (ulong)uVar1; if (local_40 == 0xffffffff) { local_c = 0xffffffff; } else if ((local_40 < 9) && (**(char **)(local_18 + 0x20) == -2)) { *(uint *)(local_18 + 0x388) = (uint)*(byte *)(*(long *)(local_18 + 0x20) + 1) + (uint)*(byte *)(*(long *)(local_18 + 0x20) + 2) * 0x100 & 0xffff; *(uint *)(local_18 + 0x380) = (uint)*(byte *)(*(long *)(local_18 + 0x20) + 3) + (uint)*(byte *)(*(long *)(local_18 + 0x20) + 4) * 0x100 & 0xffff; local_c = 1; } else { local_58 = (int1 *)0x0; local_50 = *(int1 **)(local_18 + 0x20); puVar2 = local_50 + local_40; for (local_34 = 0; local_34 < local_1c; local_34 = local_34 + 1) { local_48 = net_field_length(&local_50); if (local_48 == 0xffffffffffffffff) { *(int8 *)(local_28 + (ulong)local_34 * 8) = 0; *local_30 = 0; } else { if (((ulong)((long)puVar2 - (long)local_50) < local_48) || (puVar2 < local_50)) { *(int4 *)(local_18 + 0x90) = 2000; strncpy((char *)(local_18 + 0x97),(&client_errors)[*(int *)(local_18 + 0x90) - 2000],0x1ff ); return 0xffffffff; } *(int1 **)(local_28 + (ulong)local_34 * 8) = local_50; local_50 = local_50 + local_48; *local_30 = local_48; } local_30 = local_30 + 1; if (local_58 != (int1 *)0x0) { *local_58 = 0; } local_58 = local_50; } *(int1 **)(local_28 + (ulong)local_34 * 8) = local_58 + 1; *local_58 = 0; local_c = 0; } return local_c; }
55,248
mthd_my_read_one_row
eloqsql/libmariadb/libmariadb/mariadb_lib.c
int mthd_my_read_one_row(MYSQL *mysql,uint fields,MYSQL_ROW row, ulong *lengths) { uint field; ulong pkt_len,len; uchar *pos,*prev_pos, *end_pos; if ((pkt_len=(uint) ma_net_safe_read(mysql)) == packet_error) return -1; if (pkt_len <= 8 && mysql->net.read_pos[0] == 254) { mysql->warning_count= uint2korr(mysql->net.read_pos + 1); mysql->server_status= uint2korr(mysql->net.read_pos + 3); return 1; /* End of data */ } prev_pos= 0; /* allowed to write at packet[-1] */ pos=mysql->net.read_pos; end_pos=pos+pkt_len; for (field=0 ; field < fields ; field++) { if ((len=(ulong) net_field_length(&pos)) == NULL_LENGTH) { /* null field */ row[field] = 0; *lengths++=0; } else { if (len > (ulong) (end_pos - pos) || pos > end_pos) { mysql->net.last_errno=CR_UNKNOWN_ERROR; strncpy(mysql->net.last_error,ER(mysql->net.last_errno), MYSQL_ERRMSG_SIZE - 1); return -1; } row[field] = (char*) pos; pos+=len; *lengths++=len; } if (prev_pos) *prev_pos=0; /* Terminate prev field */ prev_pos=pos; } row[field]=(char*) prev_pos+1; /* End of last field */ *prev_pos=0; /* Terminate last field */ return 0; }
O3
c
mthd_my_read_one_row: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %r12 movq %rdx, %rbx movl %esi, %r13d movq %rdi, %r15 callq 0x1c93b movl %eax, %eax movl $0xffffffff, %r14d # imm = 0xFFFFFFFF movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpq %rcx, %rax je 0x1f653 movq 0x20(%r15), %rcx cmpl $0x8, %eax ja 0x1f561 cmpb $-0x2, (%rcx) jne 0x1f561 movzwl 0x1(%rcx), %eax movl %eax, 0x388(%r15) movzwl 0x3(%rcx), %eax movl %eax, 0x380(%r15) movl $0x1, %r14d jmp 0x1f653 xorl %edx, %edx testl %r13d, %r13d je 0x1f618 addq %rcx, %rax movl %r13d, %edx xorl %esi, %esi xorl %edi, %edi movzbl (%rcx), %r8d cmpq $0xfa, %r8 ja 0x1f5be incq %rcx movq %rax, %r9 subq %rcx, %r9 cmpq %r9, %r8 ja 0x1f62a cmpq %rax, %rcx ja 0x1f62a movq %rcx, (%rbx,%rsi,8) addq %r8, %rcx movq %r8, (%r12,%rsi,8) testq %rdi, %rdi je 0x1f5b1 movb $0x0, (%rdi) incq %rsi movq %rcx, %rdi cmpq %rsi, %rdx jne 0x1f576 jmp 0x1f61a cmpq $0xfb, %r8 je 0x1f5fb cmpl $0xfd, %r8d je 0x1f5e4 cmpl $0xfc, %r8d jne 0x1f60b movzwl 0x1(%rcx), %r8d addq $0x3, %rcx jmp 0x1f586 movzwl 0x1(%rcx), %r9d movzbl 0x3(%rcx), %r8d addq $0x4, %rcx shll $0x10, %r8d orq %r9, %r8 jmp 0x1f586 incq %rcx movq $0x0, (%rbx,%rsi,8) xorl %r8d, %r8d jmp 0x1f5a5 movl 0x1(%rcx), %r8d addq $0x9, %rcx jmp 0x1f586 xorl %ecx, %ecx leaq 0x1(%rcx), %rax movq %rax, (%rbx,%rdx,8) movb $0x0, (%rcx) xorl %r14d, %r14d jmp 0x1f653 movl $0x7d0, 0x90(%r15) # imm = 0x7D0 addq $0x97, %r15 leaq 0x2c71d(%rip), %rax # 0x4bd60 movq (%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF movq %r15, %rdi callq 0x172d0 movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
mthd_my_read_one_row: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r12, rcx mov rbx, rdx mov r13d, esi mov r15, rdi call ma_net_safe_read mov eax, eax mov r14d, 0FFFFFFFFh mov ecx, 0FFFFFFFFh cmp rax, rcx jz loc_1F653 mov rcx, [r15+20h] cmp eax, 8 ja short loc_1F561 cmp byte ptr [rcx], 0FEh jnz short loc_1F561 movzx eax, word ptr [rcx+1] mov [r15+388h], eax movzx eax, word ptr [rcx+3] mov [r15+380h], eax mov r14d, 1 jmp loc_1F653 loc_1F561: xor edx, edx test r13d, r13d jz loc_1F618 add rax, rcx mov edx, r13d xor esi, esi xor edi, edi loc_1F576: movzx r8d, byte ptr [rcx] cmp r8, 0FAh ja short loc_1F5BE inc rcx loc_1F586: mov r9, rax sub r9, rcx cmp r8, r9 ja loc_1F62A cmp rcx, rax ja loc_1F62A mov [rbx+rsi*8], rcx add rcx, r8 loc_1F5A5: mov [r12+rsi*8], r8 test rdi, rdi jz short loc_1F5B1 mov byte ptr [rdi], 0 loc_1F5B1: inc rsi mov rdi, rcx cmp rdx, rsi jnz short loc_1F576 jmp short loc_1F61A loc_1F5BE: cmp r8, 0FBh jz short loc_1F5FB cmp r8d, 0FDh jz short loc_1F5E4 cmp r8d, 0FCh jnz short loc_1F60B movzx r8d, word ptr [rcx+1] add rcx, 3 jmp short loc_1F586 loc_1F5E4: movzx r9d, word ptr [rcx+1] movzx r8d, byte ptr [rcx+3] add rcx, 4 shl r8d, 10h or r8, r9 jmp short loc_1F586 loc_1F5FB: inc rcx mov qword ptr [rbx+rsi*8], 0 xor r8d, r8d jmp short loc_1F5A5 loc_1F60B: mov r8d, [rcx+1] add rcx, 9 jmp loc_1F586 loc_1F618: xor ecx, ecx loc_1F61A: lea rax, [rcx+1] mov [rbx+rdx*8], rax mov byte ptr [rcx], 0 xor r14d, r14d jmp short loc_1F653 loc_1F62A: mov dword ptr [r15+90h], 7D0h add r15, 97h lea rax, client_errors mov rsi, [rax] mov edx, 1FFh mov rdi, r15 call _strncpy loc_1F653: mov eax, r14d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mthd_my_read_one_row(long long a1, long long a2, long long a3, long long a4, unsigned long long a5, int a6) { int v8; // r13d unsigned int v10; // eax unsigned int v11; // r14d unsigned __int8 *v12; // rcx long long v13; // rdx unsigned __int8 *v14; // rax long long v15; // rsi unsigned __int8 *v16; // rdi unsigned long long v17; // r8 unsigned __int8 *v18; // rcx long long v19; // r9 int v20; // r8d v8 = a2; v10 = ma_net_safe_read(a1, a2, a3, a4, a5, a6); v11 = -1; if ( v10 != 0xFFFFFFFFLL ) { v12 = *(unsigned __int8 **)(a1 + 32); if ( v10 <= 8 && *v12 == 0xFE ) { *(_DWORD *)(a1 + 904) = *(unsigned __int16 *)(v12 + 1); *(_DWORD *)(a1 + 896) = *(unsigned __int16 *)(v12 + 3); return 1; } v13 = 0LL; if ( (_DWORD)a2 ) { v14 = &v12[v10]; v13 = (unsigned int)a2; v15 = 0LL; v16 = 0LL; while ( 1 ) { v17 = *v12; if ( v17 > 0xFA ) { if ( v17 == 251 ) { ++v12; *(_QWORD *)(a3 + 8 * v15) = 0LL; v17 = 0LL; goto LABEL_12; } if ( (_DWORD)v17 == 253 ) { v19 = *(unsigned __int16 *)(v12 + 1); v20 = v12[3]; v18 = v12 + 4; v17 = v19 | (unsigned int)(v20 << 16); } else if ( (_DWORD)v17 == 252 ) { v17 = *(unsigned __int16 *)(v12 + 1); v18 = v12 + 3; } else { v17 = *(unsigned int *)(v12 + 1); v18 = v12 + 9; } } else { v18 = v12 + 1; } if ( v17 > v14 - v18 || v18 > v14 ) { *(_DWORD *)(a1 + 144) = 2000; strncpy(a1 + 151, client_errors[0], 511LL); return v11; } *(_QWORD *)(a3 + 8 * v15) = v18; v12 = &v18[v17]; LABEL_12: *(_QWORD *)(a4 + 8 * v15) = v17; if ( v16 ) *v16 = 0; ++v15; v16 = v12; if ( v8 == v15 ) goto LABEL_24; } } v12 = 0LL; LABEL_24: *(_QWORD *)(a3 + 8 * v13) = v12 + 1; *v12 = 0; return 0; } return v11; }
mthd_my_read_one_row: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R12,RCX MOV RBX,RDX MOV R13D,ESI MOV R15,RDI CALL 0x0011c93b MOV EAX,EAX MOV R14D,0xffffffff MOV ECX,0xffffffff CMP RAX,RCX JZ 0x0011f653 MOV RCX,qword ptr [R15 + 0x20] CMP EAX,0x8 JA 0x0011f561 CMP byte ptr [RCX],0xfe JNZ 0x0011f561 MOVZX EAX,word ptr [RCX + 0x1] MOV dword ptr [R15 + 0x388],EAX MOVZX EAX,word ptr [RCX + 0x3] MOV dword ptr [R15 + 0x380],EAX MOV R14D,0x1 JMP 0x0011f653 LAB_0011f561: XOR EDX,EDX TEST R13D,R13D JZ 0x0011f618 ADD RAX,RCX MOV EDX,R13D XOR ESI,ESI XOR EDI,EDI LAB_0011f576: MOVZX R8D,byte ptr [RCX] CMP R8,0xfa JA 0x0011f5be INC RCX LAB_0011f586: MOV R9,RAX SUB R9,RCX CMP R8,R9 JA 0x0011f62a CMP RCX,RAX JA 0x0011f62a MOV qword ptr [RBX + RSI*0x8],RCX ADD RCX,R8 LAB_0011f5a5: MOV qword ptr [R12 + RSI*0x8],R8 TEST RDI,RDI JZ 0x0011f5b1 MOV byte ptr [RDI],0x0 LAB_0011f5b1: INC RSI MOV RDI,RCX CMP RDX,RSI JNZ 0x0011f576 JMP 0x0011f61a LAB_0011f5be: CMP R8,0xfb JZ 0x0011f5fb CMP R8D,0xfd JZ 0x0011f5e4 CMP R8D,0xfc JNZ 0x0011f60b MOVZX R8D,word ptr [RCX + 0x1] ADD RCX,0x3 JMP 0x0011f586 LAB_0011f5e4: MOVZX R9D,word ptr [RCX + 0x1] MOVZX R8D,byte ptr [RCX + 0x3] ADD RCX,0x4 SHL R8D,0x10 OR R8,R9 JMP 0x0011f586 LAB_0011f5fb: INC RCX MOV qword ptr [RBX + RSI*0x8],0x0 XOR R8D,R8D JMP 0x0011f5a5 LAB_0011f60b: MOV R8D,dword ptr [RCX + 0x1] ADD RCX,0x9 JMP 0x0011f586 LAB_0011f618: XOR ECX,ECX LAB_0011f61a: LEA RAX,[RCX + 0x1] MOV qword ptr [RBX + RDX*0x8],RAX MOV byte ptr [RCX],0x0 XOR R14D,R14D JMP 0x0011f653 LAB_0011f62a: MOV dword ptr [R15 + 0x90],0x7d0 ADD R15,0x97 LEA RAX,[0x14bd60] MOV RSI,qword ptr [RAX] MOV EDX,0x1ff MOV RDI,R15 CALL 0x001172d0 LAB_0011f653: MOV EAX,R14D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 mthd_my_read_one_row(long param_1,uint param_2,long param_3,long param_4) { byte bVar1; uint uVar2; byte *pbVar3; byte *pbVar4; byte *pbVar5; ulong uVar6; ulong uVar7; byte *pbVar8; ulong uVar9; int8 uVar10; uVar6 = (ulong)param_2; uVar2 = ma_net_safe_read(); uVar10 = 0xffffffff; if ((ulong)uVar2 != 0xffffffff) { pbVar5 = *(byte **)(param_1 + 0x20); if ((uVar2 < 9) && (*pbVar5 == 0xfe)) { *(uint *)(param_1 + 0x388) = (uint)*(ushort *)(pbVar5 + 1); *(uint *)(param_1 + 0x380) = (uint)*(ushort *)(pbVar5 + 3); uVar10 = 1; } else { if (param_2 == 0) { pbVar5 = (byte *)0x0; uVar6 = 0; } else { pbVar3 = pbVar5 + uVar2; uVar7 = 0; pbVar8 = (byte *)0x0; do { bVar1 = *pbVar5; uVar9 = (ulong)bVar1; if (uVar9 < 0xfb) { pbVar4 = pbVar5 + 1; LAB_0011f586: if (((ulong)((long)pbVar3 - (long)pbVar4) < uVar9) || (pbVar3 < pbVar4)) { *(int4 *)(param_1 + 0x90) = 2000; strncpy((char *)(param_1 + 0x97),client_errors,0x1ff); return 0xffffffff; } *(byte **)(param_3 + uVar7 * 8) = pbVar4; pbVar5 = pbVar4 + uVar9; } else { if (uVar9 != 0xfb) { if (bVar1 == 0xfd) { pbVar4 = pbVar5 + 4; uVar9 = (ulong)*(uint3 *)(pbVar5 + 1); } else if (bVar1 == 0xfc) { uVar9 = (ulong)*(ushort *)(pbVar5 + 1); pbVar4 = pbVar5 + 3; } else { uVar9 = (ulong)*(uint *)(pbVar5 + 1); pbVar4 = pbVar5 + 9; } goto LAB_0011f586; } pbVar5 = pbVar5 + 1; *(int8 *)(param_3 + uVar7 * 8) = 0; uVar9 = 0; } *(ulong *)(param_4 + uVar7 * 8) = uVar9; if (pbVar8 != (byte *)0x0) { *pbVar8 = 0; } uVar7 = uVar7 + 1; pbVar8 = pbVar5; } while (uVar6 != uVar7); } *(byte **)(param_3 + uVar6 * 8) = pbVar5 + 1; *pbVar5 = 0; uVar10 = 0; } } return uVar10; }
55,249
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [29], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [5], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(char const (&) [29], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char const (&) [5], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&)
llama.cpp/common/json.hpp
inline OutStringType concat(Args && ... args) { OutStringType str; str.reserve(concat_length(args...)); concat_into(str, std::forward<Args>(args)...); return str; }
O3
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [29], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [5], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(char const (&) [29], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char const (&) [5], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %r14 movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %r13 movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rsp) movq %rax, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi callq 0x17430 movq %rax, %rbp addq 0x8(%r12), %rbp movq %r15, %rdi callq 0x17430 addq %rax, %rbp addq 0x8(%r14), %rbp movq %rbx, %rdi movq %rbp, %rsi callq 0x17920 movq %rbx, %rdi movq %r13, %rsi callq 0x17740 movq (%r12), %rsi movq 0x8(%r12), %rdx movq %rbx, %rdi callq 0x17360 movq %rbx, %rdi movq %r15, %rsi callq 0x17740 movq (%r14), %rsi movq 0x8(%r14), %rdx movq %rbx, %rdi callq 0x17360 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq (%rbx), %rdi cmpq (%rsp), %rdi je 0x50df4 movq (%rsp), %rax movq (%rax), %rsi incq %rsi callq 0x17100 movq %r14, %rdi callq 0x17710
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcS8_RA5_S9_S8_EEET_DpOT0_: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, r8 mov r15, rcx mov r12, rdx mov r13, rsi mov rbx, rdi lea rax, [rdi+10h] mov [rsp+38h+var_38], rax mov [rdi], rax mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, rsi call _strlen mov rbp, rax add rbp, [r12+8] mov rdi, r15 call _strlen add rbp, rax add rbp, [r14+8] mov rdi, rbx mov rsi, rbp call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rdi, rbx mov rsi, r13 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r12] mov rdx, [r12+8] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong) mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r14] mov rdx, [r14+8] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong) mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, [rbx]; void * cmp rdi, [rsp+0] jz short loc_50DF4 mov rax, [rsp+0] mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_50DF4: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],std::string,char const(&)[5],std::string>( long long a1, long long a2, _QWORD *a3, long long a4, _QWORD *a5) { long long v8; // rbp long long v9; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v8 = a3[1] + strlen(a2); v9 = strlen(a4); std::string::reserve(a1, a5[1] + v9 + v8); std::string::append(a1, a2); std::string::append(a1, *a3, a3[1]); std::string::append(a1, a4); std::string::append(a1, *a5, a5[1]); return a1; }
concat<std::__cxx11::string,char_const(&)[29],std::__cxx11::string,char_const(&)[5],std::__cxx11::string>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,R8 MOV R15,RCX MOV R12,RDX MOV R13,RSI MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RSP],RAX MOV qword ptr [RDI],RAX MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RDI,RSI CALL 0x00117430 MOV RBP,RAX ADD RBP,qword ptr [R12 + 0x8] MOV RDI,R15 CALL 0x00117430 ADD RBP,RAX ADD RBP,qword ptr [R14 + 0x8] LAB_00150d86: MOV RDI,RBX MOV RSI,RBP CALL 0x00117920 MOV RDI,RBX MOV RSI,R13 CALL 0x00117740 MOV RSI,qword ptr [R12] MOV RDX,qword ptr [R12 + 0x8] MOV RDI,RBX CALL 0x00117360 MOV RDI,RBX MOV RSI,R15 CALL 0x00117740 MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] MOV RDI,RBX CALL 0x00117360 LAB_00150dc7: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const (&) [29], std::__cxx11::string, char const (&) [5], std::__cxx11::string >(char const (&) [29], std::__cxx11::string&&, char const (&) [5], std::__cxx11::string&&) */ detail * __thiscall nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[29],std::__cxx11::string,char_const(&)[5],std::__cxx11::string> (detail *this,char *param_1,string *param_2,char *param_3,string *param_4) { *(detail **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (detail)0x0; strlen(param_1); strlen(param_3); /* try { // try from 00150d86 to 00150dc6 has its CatchHandler @ 00150dd9 */ std::__cxx11::string::reserve((ulong)this); std::__cxx11::string::append((char *)this); std::__cxx11::string::append((char *)this,*(ulong *)param_2); std::__cxx11::string::append((char *)this); std::__cxx11::string::append((char *)this,*(ulong *)param_4); return this; }
55,250
ggml_backend_alloc_ctx_tensors_from_buft
monkey531[P]llama/ggml/src/ggml-alloc.c
ggml_backend_buffer_t ggml_backend_alloc_ctx_tensors_from_buft(struct ggml_context * ctx, ggml_backend_buffer_type_t buft) { GGML_ASSERT(ggml_get_no_alloc(ctx) == true); size_t alignment = ggml_backend_buft_get_alignment(buft); size_t max_size = ggml_backend_buft_get_max_size(buft); ggml_backend_buffer_t * buffers = NULL; size_t n_buffers = 0; size_t cur_buf_size = 0; struct ggml_tensor * first = ggml_get_first_tensor(ctx); for (struct ggml_tensor * t = first; t != NULL; t = ggml_get_next_tensor(ctx, t)) { size_t this_size = 0; if (t->data == NULL && t->view_src == NULL) { this_size = GGML_PAD(ggml_backend_buft_get_alloc_size(buft, t), alignment); } if (this_size > max_size) { GGML_LOG_ERROR("%s: tensor %s is too large to fit in a %s buffer (tensor size: %zu, max buffer size: %zu)\n", __func__, t->name, ggml_backend_buft_name(buft), this_size, max_size); for (size_t i = 0; i < n_buffers; i++) { ggml_backend_buffer_free(buffers[i]); } free(buffers); return NULL; } if ((cur_buf_size + this_size) > max_size) { // allocate tensors in the current buffer if (!alloc_tensor_range(ctx, first, t, buft, cur_buf_size, &buffers, &n_buffers)) { return NULL; } first = t; cur_buf_size = this_size; } else { cur_buf_size += this_size; } } // allocate remaining tensors if (cur_buf_size > 0) { if (!alloc_tensor_range(ctx, first, NULL, buft, cur_buf_size, &buffers, &n_buffers)) { return NULL; } } if (n_buffers == 0) { #ifndef NDEBUG GGML_LOG_DEBUG("%s: all tensors in the context are already allocated\n", __func__); #endif return NULL; } ggml_backend_buffer_t buffer; if (n_buffers == 1) { buffer = buffers[0]; } else { buffer = ggml_backend_multi_buffer_alloc_buffer(buffers, n_buffers); } free(buffers); return buffer; }
O0
c
ggml_backend_alloc_ctx_tensors_from_buft: subq $0x78, %rsp movq %rdi, 0x68(%rsp) movq %rsi, 0x60(%rsp) movq 0x68(%rsp), %rdi callq 0x44510 andb $0x1, %al movzbl %al, %eax cmpl $0x1, %eax je 0x5c1c3 leaq 0x5b021(%rip), %rdi # 0xb71ca movl $0x3d0, %esi # imm = 0x3D0 leaq 0x5844c(%rip), %rdx # 0xb4601 leaq 0x5b1bd(%rip), %rcx # 0xb7379 movb $0x0, %al callq 0x46770 movq 0x60(%rsp), %rdi callq 0x47b70 movq %rax, 0x58(%rsp) movq 0x60(%rsp), %rdi callq 0x47a20 movq %rax, 0x50(%rsp) movq $0x0, 0x48(%rsp) movq $0x0, 0x40(%rsp) movq $0x0, 0x38(%rsp) movq 0x68(%rsp), %rdi callq 0x414d0 movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x28(%rsp) cmpq $0x0, 0x28(%rsp) je 0x5c3ae movq $0x0, 0x20(%rsp) movq 0x28(%rsp), %rax cmpq $0x0, 0xf8(%rax) jne 0x5c275 movq 0x28(%rsp), %rax cmpq $0x0, 0xe8(%rax) jne 0x5c275 movq 0x60(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x41720 addq 0x58(%rsp), %rax subq $0x1, %rax movq 0x58(%rsp), %rcx subq $0x1, %rcx xorq $-0x1, %rcx andq %rcx, %rax movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax cmpq 0x50(%rsp), %rax jbe 0x5c31f movq 0x28(%rsp), %rax addq $0x100, %rax # imm = 0x100 movq %rax, 0x8(%rsp) movq 0x60(%rsp), %rdi callq 0x46070 movq 0x8(%rsp), %rcx movq %rax, %r8 movq 0x20(%rsp), %r9 movq 0x50(%rsp), %rax movl $0x4, %edi leaq 0x5b0db(%rip), %rsi # 0xb7398 leaq 0x5b12f(%rip), %rdx # 0xb73f3 movq %rax, (%rsp) movb $0x0, %al callq 0x41c30 movq $0x0, 0x18(%rsp) movq 0x18(%rsp), %rax cmpq 0x40(%rsp), %rax jae 0x5c307 movq 0x48(%rsp), %rax movq 0x18(%rsp), %rcx movq (%rax,%rcx,8), %rdi callq 0x46990 movq 0x18(%rsp), %rax addq $0x1, %rax movq %rax, 0x18(%rsp) jmp 0x5c2d8 movq 0x48(%rsp), %rdi callq 0x448e0 movq $0x0, 0x70(%rsp) jmp 0x5c444 movq 0x38(%rsp), %rax addq 0x20(%rsp), %rax cmpq 0x50(%rsp), %rax jbe 0x5c384 movq 0x68(%rsp), %rdi movq 0x30(%rsp), %rsi movq 0x28(%rsp), %rdx movq 0x60(%rsp), %rcx movq 0x38(%rsp), %r8 leaq 0x48(%rsp), %r9 leaq 0x40(%rsp), %rax movq %rax, (%rsp) callq 0x5c450 testb $0x1, %al jne 0x5c36e movq $0x0, 0x70(%rsp) jmp 0x5c444 movq 0x28(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x38(%rsp) jmp 0x5c393 movq 0x20(%rsp), %rax addq 0x38(%rsp), %rax movq %rax, 0x38(%rsp) jmp 0x5c395 movq 0x68(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x43cf0 movq %rax, 0x28(%rsp) jmp 0x5c215 cmpq $0x0, 0x38(%rsp) jbe 0x5c3f2 movq 0x68(%rsp), %rdi movq 0x30(%rsp), %rsi movq 0x60(%rsp), %rcx movq 0x38(%rsp), %r8 xorl %eax, %eax movl %eax, %edx leaq 0x48(%rsp), %r9 leaq 0x40(%rsp), %rax movq %rax, (%rsp) callq 0x5c450 testb $0x1, %al jne 0x5c3f0 movq $0x0, 0x70(%rsp) jmp 0x5c444 jmp 0x5c3f2 cmpq $0x0, 0x40(%rsp) jne 0x5c405 movq $0x0, 0x70(%rsp) jmp 0x5c444 cmpq $0x1, 0x40(%rsp) jne 0x5c41c movq 0x48(%rsp), %rax movq (%rax), %rax movq %rax, 0x10(%rsp) jmp 0x5c430 movq 0x48(%rsp), %rdi movq 0x40(%rsp), %rsi callq 0x457b0 movq %rax, 0x10(%rsp) movq 0x48(%rsp), %rdi callq 0x448e0 movq 0x10(%rsp), %rax movq %rax, 0x70(%rsp) movq 0x70(%rsp), %rax addq $0x78, %rsp retq nop
ggml_backend_alloc_ctx_tensors_from_buft: sub rsp, 78h mov [rsp+78h+var_10], rdi mov [rsp+78h+var_18], rsi mov rdi, [rsp+78h+var_10] call _ggml_get_no_alloc and al, 1 movzx eax, al cmp eax, 1 jz short loc_5C1C3 lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov esi, 3D0h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlGetNoAlloc_0; "ggml_get_no_alloc(ctx) == true" mov al, 0 call _ggml_abort loc_5C1C3: mov rdi, [rsp+78h+var_18] call _ggml_backend_buft_get_alignment mov [rsp+78h+var_20], rax mov rdi, [rsp+78h+var_18] call _ggml_backend_buft_get_max_size mov [rsp+78h+var_28], rax mov [rsp+78h+var_30], 0 mov [rsp+78h+var_38], 0 mov [rsp+78h+var_40], 0 mov rdi, [rsp+78h+var_10] call _ggml_get_first_tensor mov [rsp+78h+var_48], rax mov rax, [rsp+78h+var_48] mov [rsp+78h+var_50], rax loc_5C215: cmp [rsp+78h+var_50], 0 jz loc_5C3AE mov [rsp+78h+var_58], 0 mov rax, [rsp+78h+var_50] cmp qword ptr [rax+0F8h], 0 jnz short loc_5C275 mov rax, [rsp+78h+var_50] cmp qword ptr [rax+0E8h], 0 jnz short loc_5C275 mov rdi, [rsp+78h+var_18] mov rsi, [rsp+78h+var_50] call _ggml_backend_buft_get_alloc_size add rax, [rsp+78h+var_20] sub rax, 1 mov rcx, [rsp+78h+var_20] sub rcx, 1 xor rcx, 0FFFFFFFFFFFFFFFFh and rax, rcx mov [rsp+78h+var_58], rax loc_5C275: mov rax, [rsp+78h+var_58] cmp rax, [rsp+78h+var_28] jbe loc_5C31F mov rax, [rsp+78h+var_50] add rax, 100h mov [rsp+78h+var_70], rax mov rdi, [rsp+78h+var_18] call _ggml_backend_buft_name mov rcx, [rsp+78h+var_70] mov r8, rax mov r9, [rsp+78h+var_58] mov rax, [rsp+78h+var_28] mov edi, 4 lea rsi, aSTensorSIsTooL; "%s: tensor %s is too large to fit in a "... lea rdx, aGgmlBackendAll_2; "ggml_backend_alloc_ctx_tensors_from_buf"... mov [rsp+78h+var_78], rax mov al, 0 call _ggml_log_internal mov [rsp+78h+var_60], 0 loc_5C2D8: mov rax, [rsp+78h+var_60] cmp rax, [rsp+78h+var_38] jnb short loc_5C307 mov rax, [rsp+78h+var_30] mov rcx, [rsp+78h+var_60] mov rdi, [rax+rcx*8] call _ggml_backend_buffer_free mov rax, [rsp+78h+var_60] add rax, 1 mov [rsp+78h+var_60], rax jmp short loc_5C2D8 loc_5C307: mov rdi, [rsp+78h+var_30] call _free mov [rsp+78h+var_8], 0 jmp loc_5C444 loc_5C31F: mov rax, [rsp+78h+var_40] add rax, [rsp+78h+var_58] cmp rax, [rsp+78h+var_28] jbe short loc_5C384 mov rdi, [rsp+78h+var_10] mov rsi, [rsp+78h+var_48] mov rdx, [rsp+78h+var_50] mov rcx, [rsp+78h+var_18] mov r8, [rsp+78h+var_40] lea r9, [rsp+78h+var_30] lea rax, [rsp+78h+var_38] mov [rsp+78h+var_78], rax call alloc_tensor_range test al, 1 jnz short loc_5C36E mov [rsp+78h+var_8], 0 jmp loc_5C444 loc_5C36E: mov rax, [rsp+78h+var_50] mov [rsp+78h+var_48], rax mov rax, [rsp+78h+var_58] mov [rsp+78h+var_40], rax jmp short loc_5C393 loc_5C384: mov rax, [rsp+78h+var_58] add rax, [rsp+78h+var_40] mov [rsp+78h+var_40], rax loc_5C393: jmp short $+2 loc_5C395: mov rdi, [rsp+78h+var_10] mov rsi, [rsp+78h+var_50] call _ggml_get_next_tensor mov [rsp+78h+var_50], rax jmp loc_5C215 loc_5C3AE: cmp [rsp+78h+var_40], 0 jbe short loc_5C3F2 mov rdi, [rsp+78h+var_10] mov rsi, [rsp+78h+var_48] mov rcx, [rsp+78h+var_18] mov r8, [rsp+78h+var_40] xor eax, eax mov edx, eax lea r9, [rsp+78h+var_30] lea rax, [rsp+78h+var_38] mov [rsp+78h+var_78], rax call alloc_tensor_range test al, 1 jnz short loc_5C3F0 mov [rsp+78h+var_8], 0 jmp short loc_5C444 loc_5C3F0: jmp short $+2 loc_5C3F2: cmp [rsp+78h+var_38], 0 jnz short loc_5C405 mov [rsp+78h+var_8], 0 jmp short loc_5C444 loc_5C405: cmp [rsp+78h+var_38], 1 jnz short loc_5C41C mov rax, [rsp+78h+var_30] mov rax, [rax] mov [rsp+78h+var_68], rax jmp short loc_5C430 loc_5C41C: mov rdi, [rsp+78h+var_30] mov rsi, [rsp+78h+var_38] call _ggml_backend_multi_buffer_alloc_buffer mov [rsp+78h+var_68], rax loc_5C430: mov rdi, [rsp+78h+var_30] call _free mov rax, [rsp+78h+var_68] mov [rsp+78h+var_8], rax loc_5C444: mov rax, [rsp+78h+var_8] add rsp, 78h retn
long long ggml_backend_alloc_ctx_tensors_from_buft(long long a1, long long a2) { long long alloc_size; // rax const char *v3; // rax long long v5; // [rsp+10h] [rbp-68h] unsigned long long j; // [rsp+18h] [rbp-60h] unsigned long long v7; // [rsp+20h] [rbp-58h] long long i; // [rsp+28h] [rbp-50h] long long first_tensor; // [rsp+30h] [rbp-48h] unsigned long long v10; // [rsp+38h] [rbp-40h] unsigned long long v11; // [rsp+40h] [rbp-38h] BYREF long long *v12; // [rsp+48h] [rbp-30h] BYREF size_t max_size; // [rsp+50h] [rbp-28h] long long alignment; // [rsp+58h] [rbp-20h] long long v15; // [rsp+60h] [rbp-18h] long long v16; // [rsp+68h] [rbp-10h] v16 = a1; v15 = a2; if ( (ggml_get_no_alloc(a1) & 1) != 1 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-alloc.c", 976, (long long)"GGML_ASSERT(%s) failed", "ggml_get_no_alloc(ctx) == true"); alignment = ggml_backend_buft_get_alignment(v15); max_size = ggml_backend_buft_get_max_size(v15); v12 = 0LL; v11 = 0LL; v10 = 0LL; first_tensor = ggml_get_first_tensor(v16); for ( i = first_tensor; i; i = ggml_get_next_tensor(v16, i) ) { v7 = 0LL; if ( !*(_QWORD *)(i + 248) && !*(_QWORD *)(i + 232) ) { alloc_size = ggml_backend_buft_get_alloc_size(v15, i); v7 = ~(alignment - 1) & (alignment + alloc_size - 1); } if ( v7 > max_size ) { v3 = (const char *)ggml_backend_buft_name(v15); ggml_log_internal( 4u, (long long)"%s: tensor %s is too large to fit in a %s buffer (tensor size: %zu, max buffer size: %zu)\n", "ggml_backend_alloc_ctx_tensors_from_buft", (const char *)(i + 256), v3, v7, max_size); for ( j = 0LL; j < v11; ++j ) ggml_backend_buffer_free(v12[j]); free(v12, "%s: tensor %s is too large to fit in a %s buffer (tensor size: %zu, max buffer size: %zu)\n"); return 0LL; } if ( v7 + v10 <= max_size ) { v10 += v7; } else { if ( (alloc_tensor_range(v16, first_tensor, i, v15, v10, (unsigned int)&v12, (long long)&v11) & 1) == 0 ) return 0LL; first_tensor = i; v10 = v7; } a2 = i; } if ( v10 ) { a2 = first_tensor; if ( (alloc_tensor_range(v16, first_tensor, 0, v15, v10, (unsigned int)&v12, (long long)&v11) & 1) == 0 ) return 0LL; } if ( !v11 ) return 0LL; if ( v11 == 1 ) { v5 = *v12; } else { a2 = v11; v5 = ggml_backend_multi_buffer_alloc_buffer(v12, v11); } free(v12, a2); return v5; }
ggml_backend_alloc_ctx_tensors_from_buft: SUB RSP,0x78 MOV qword ptr [RSP + 0x68],RDI MOV qword ptr [RSP + 0x60],RSI MOV RDI,qword ptr [RSP + 0x68] CALL 0x00144510 AND AL,0x1 MOVZX EAX,AL CMP EAX,0x1 JZ 0x0015c1c3 LEA RDI,[0x1b71ca] MOV ESI,0x3d0 LEA RDX,[0x1b4601] LEA RCX,[0x1b7379] MOV AL,0x0 CALL 0x00146770 LAB_0015c1c3: MOV RDI,qword ptr [RSP + 0x60] CALL 0x00147b70 MOV qword ptr [RSP + 0x58],RAX MOV RDI,qword ptr [RSP + 0x60] CALL 0x00147a20 MOV qword ptr [RSP + 0x50],RAX MOV qword ptr [RSP + 0x48],0x0 MOV qword ptr [RSP + 0x40],0x0 MOV qword ptr [RSP + 0x38],0x0 MOV RDI,qword ptr [RSP + 0x68] CALL 0x001414d0 MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x28],RAX LAB_0015c215: CMP qword ptr [RSP + 0x28],0x0 JZ 0x0015c3ae MOV qword ptr [RSP + 0x20],0x0 MOV RAX,qword ptr [RSP + 0x28] CMP qword ptr [RAX + 0xf8],0x0 JNZ 0x0015c275 MOV RAX,qword ptr [RSP + 0x28] CMP qword ptr [RAX + 0xe8],0x0 JNZ 0x0015c275 MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x28] CALL 0x00141720 ADD RAX,qword ptr [RSP + 0x58] SUB RAX,0x1 MOV RCX,qword ptr [RSP + 0x58] SUB RCX,0x1 XOR RCX,-0x1 AND RAX,RCX MOV qword ptr [RSP + 0x20],RAX LAB_0015c275: MOV RAX,qword ptr [RSP + 0x20] CMP RAX,qword ptr [RSP + 0x50] JBE 0x0015c31f MOV RAX,qword ptr [RSP + 0x28] ADD RAX,0x100 MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x60] CALL 0x00146070 MOV RCX,qword ptr [RSP + 0x8] MOV R8,RAX MOV R9,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x50] MOV EDI,0x4 LEA RSI,[0x1b7398] LEA RDX,[0x1b73f3] MOV qword ptr [RSP],RAX MOV AL,0x0 CALL 0x00141c30 MOV qword ptr [RSP + 0x18],0x0 LAB_0015c2d8: MOV RAX,qword ptr [RSP + 0x18] CMP RAX,qword ptr [RSP + 0x40] JNC 0x0015c307 MOV RAX,qword ptr [RSP + 0x48] MOV RCX,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RAX + RCX*0x8] CALL 0x00146990 MOV RAX,qword ptr [RSP + 0x18] ADD RAX,0x1 MOV qword ptr [RSP + 0x18],RAX JMP 0x0015c2d8 LAB_0015c307: MOV RDI,qword ptr [RSP + 0x48] CALL 0x001448e0 MOV qword ptr [RSP + 0x70],0x0 JMP 0x0015c444 LAB_0015c31f: MOV RAX,qword ptr [RSP + 0x38] ADD RAX,qword ptr [RSP + 0x20] CMP RAX,qword ptr [RSP + 0x50] JBE 0x0015c384 MOV RDI,qword ptr [RSP + 0x68] MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x60] MOV R8,qword ptr [RSP + 0x38] LEA R9,[RSP + 0x48] LEA RAX,[RSP + 0x40] MOV qword ptr [RSP],RAX CALL 0x0015c450 TEST AL,0x1 JNZ 0x0015c36e MOV qword ptr [RSP + 0x70],0x0 JMP 0x0015c444 LAB_0015c36e: MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x38],RAX JMP 0x0015c393 LAB_0015c384: MOV RAX,qword ptr [RSP + 0x20] ADD RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x38],RAX LAB_0015c393: JMP 0x0015c395 LAB_0015c395: MOV RDI,qword ptr [RSP + 0x68] MOV RSI,qword ptr [RSP + 0x28] CALL 0x00143cf0 MOV qword ptr [RSP + 0x28],RAX JMP 0x0015c215 LAB_0015c3ae: CMP qword ptr [RSP + 0x38],0x0 JBE 0x0015c3f2 MOV RDI,qword ptr [RSP + 0x68] MOV RSI,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RSP + 0x60] MOV R8,qword ptr [RSP + 0x38] XOR EAX,EAX MOV EDX,EAX LEA R9,[RSP + 0x48] LEA RAX,[RSP + 0x40] MOV qword ptr [RSP],RAX CALL 0x0015c450 TEST AL,0x1 JNZ 0x0015c3f0 MOV qword ptr [RSP + 0x70],0x0 JMP 0x0015c444 LAB_0015c3f0: JMP 0x0015c3f2 LAB_0015c3f2: CMP qword ptr [RSP + 0x40],0x0 JNZ 0x0015c405 MOV qword ptr [RSP + 0x70],0x0 JMP 0x0015c444 LAB_0015c405: CMP qword ptr [RSP + 0x40],0x1 JNZ 0x0015c41c MOV RAX,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x10],RAX JMP 0x0015c430 LAB_0015c41c: MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x40] CALL 0x001457b0 MOV qword ptr [RSP + 0x10],RAX LAB_0015c430: MOV RDI,qword ptr [RSP + 0x48] CALL 0x001448e0 MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x70],RAX LAB_0015c444: MOV RAX,qword ptr [RSP + 0x70] ADD RSP,0x78 RET
int8 ggml_backend_alloc_ctx_tensors_from_buft(int8 param_1,int8 param_2) { byte bVar1; long lVar2; int8 uVar3; ulong uVar4; int8 local_68; ulong local_60; ulong local_58; long local_50; long local_48; ulong local_40; ulong local_38; int8 *local_30; ulong local_28; long local_20; int8 local_18; int8 local_10; int8 local_8; local_18 = param_2; local_10 = param_1; bVar1 = ggml_get_no_alloc(param_1); if ((bVar1 & 1) != 1) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-alloc.c", 0x3d0,"GGML_ASSERT(%s) failed","ggml_get_no_alloc(ctx) == true"); } local_20 = ggml_backend_buft_get_alignment(local_18); local_28 = ggml_backend_buft_get_max_size(local_18); local_30 = (int8 *)0x0; local_38 = 0; local_40 = 0; local_50 = ggml_get_first_tensor(local_10); local_48 = local_50; while( true ) { if (local_50 == 0) { if ((local_40 == 0) || (uVar4 = alloc_tensor_range(local_10,local_48,0,local_18,local_40,&local_30,&local_38), (uVar4 & 1) != 0)) { if (local_38 == 0) { local_8 = 0; } else { if (local_38 == 1) { local_68 = *local_30; } else { local_68 = ggml_backend_multi_buffer_alloc_buffer(local_30,local_38); } free(local_30); local_8 = local_68; } } else { local_8 = 0; } return local_8; } local_58 = 0; if ((*(long *)(local_50 + 0xf8) == 0) && (*(long *)(local_50 + 0xe8) == 0)) { lVar2 = ggml_backend_buft_get_alloc_size(local_18,local_50); local_58 = (lVar2 + local_20) - 1U & (local_20 - 1U ^ 0xffffffffffffffff); } if (local_28 < local_58) break; if (local_28 < local_40 + local_58) { uVar4 = alloc_tensor_range(local_10,local_48,local_50,local_18,local_40,&local_30,&local_38); if ((uVar4 & 1) == 0) { return 0; } local_48 = local_50; local_40 = local_58; } else { local_40 = local_58 + local_40; } local_50 = ggml_get_next_tensor(local_10,local_50); } uVar3 = ggml_backend_buft_name(local_18); ggml_log_internal(4, "%s: tensor %s is too large to fit in a %s buffer (tensor size: %zu, max buffer size: %zu)\n" ,"ggml_backend_alloc_ctx_tensors_from_buft",local_50 + 0x100,uVar3,local_58, local_28); for (local_60 = 0; local_60 < local_38; local_60 = local_60 + 1) { ggml_backend_buffer_free(local_30[local_60]); } free(local_30); return 0; }
55,251
reciprocal_fr
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/recip.c
static void reciprocal_fr(vec256 out, const vec256 inp) { static const vec256 rx2 = { /* left-aligned value of the modulus */ TO_LIMB_T(0xfffffffe00000002), TO_LIMB_T(0xa77b4805fffcb7fd), TO_LIMB_T(0x6673b0101343b00a), TO_LIMB_T(0xe7db4ea6533afa90), }; vec512 temp; ct_inverse_mod_256(temp, inp, BLS12_381_r, rx2); redc_mont_256(out, temp, BLS12_381_r, r0); mul_mont_sparse_256(out, out, BLS12_381_rRR, BLS12_381_r, r0); }
O0
c
reciprocal_fr: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) leaq -0x50(%rbp), %rdi movq -0x10(%rbp), %rsi leaq 0x276f1(%rip), %rdx # 0x54a90 leaq 0x2951a(%rip), %rcx # 0x568c0 callq 0x47de0 movq -0x8(%rbp), %rdi leaq -0x50(%rbp), %rsi leaq 0x276d6(%rip), %rdx # 0x54a90 movabsq $-0x100000001, %rcx # imm = 0xFFFFFFFEFFFFFFFF callq 0x476c0 movq -0x8(%rbp), %rdi movq -0x8(%rbp), %rsi leaq 0x27bc8(%rip), %rdx # 0x54fa0 leaq 0x276b1(%rip), %rcx # 0x54a90 movabsq $-0x100000001, %r8 # imm = 0xFFFFFFFEFFFFFFFF callq 0x47200 addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nop
reciprocal_fr: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi lea rdi, [rbp+var_50] mov rsi, [rbp+var_10] lea rdx, BLS12_381_r lea rcx, reciprocal_fr_rx2 call ct_inverse_mod_256 mov rdi, [rbp+var_8] lea rsi, [rbp+var_50] lea rdx, BLS12_381_r mov rcx, 0FFFFFFFEFFFFFFFFh call redc_mont_256 mov rdi, [rbp+var_8] mov rsi, [rbp+var_8] lea rdx, BLS12_381_rRR lea rcx, BLS12_381_r mov r8, 0FFFFFFFEFFFFFFFFh call mul_mont_sparse_256 add rsp, 50h pop rbp retn
long long reciprocal_fr(long long a1, long long a2) { _BYTE v3[64]; // [rsp+0h] [rbp-50h] BYREF long long v4; // [rsp+40h] [rbp-10h] long long v5; // [rsp+48h] [rbp-8h] v5 = a1; v4 = a2; ct_inverse_mod_256(v3, a2, &BLS12_381_r, &reciprocal_fr_rx2); redc_mont_256(v5, v3, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL); return mul_mont_sparse_256(v5, v5, &BLS12_381_rRR, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL); }
reciprocal_fr: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI LEA RDI,[RBP + -0x50] MOV RSI,qword ptr [RBP + -0x10] LEA RDX,[0x154a90] LEA RCX,[0x1568c0] CALL 0x00147de0 MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[RBP + -0x50] LEA RDX,[0x154a90] MOV RCX,-0x100000001 CALL 0x001476c0 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x8] LEA RDX,[0x154fa0] LEA RCX,[0x154a90] MOV R8,-0x100000001 CALL 0x00147200 ADD RSP,0x50 POP RBP RET
void reciprocal_fr(int8 param_1,int8 param_2) { int1 local_58 [64]; int8 local_18; int8 local_10; local_18 = param_2; local_10 = param_1; ct_inverse_mod_256(local_58,param_2,BLS12_381_r,reciprocal_fr_rx2); redc_mont_256(local_10,local_58,BLS12_381_r,0xfffffffeffffffff); mul_mont_sparse_256(local_10,local_10,BLS12_381_rRR,BLS12_381_r,0xfffffffeffffffff); return; }
55,252
ma_pvio_write_async
eloqsql/libmariadb/libmariadb/ma_pvio.c
static ssize_t ma_pvio_write_async(MARIADB_PVIO *pvio, const uchar *buffer, size_t length) { ssize_t res; struct mysql_async_context *b= pvio->mysql->options.extension->async_context; int timeout= pvio->timeout[PVIO_WRITE_TIMEOUT]; for (;;) { res= pvio->methods->async_write(pvio, buffer, length); if (res >= 0 || IS_BLOCKING_ERROR()) return res; b->events_to_wait_for= MYSQL_WAIT_WRITE; if (timeout >= 0) { b->events_to_wait_for|= MYSQL_WAIT_TIMEOUT; b->timeout_value= timeout; } if (b->suspend_resume_hook) (*b->suspend_resume_hook)(TRUE, b->suspend_resume_hook_user_data); my_context_yield(&b->async_context); if (b->suspend_resume_hook) (*b->suspend_resume_hook)(FALSE, b->suspend_resume_hook_user_data); if (b->events_occurred & MYSQL_WAIT_TIMEOUT) return -1; } }
O0
c
ma_pvio_write_async: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movl 0x2c(%rax), %eax movl %eax, -0x34(%rbp) movq -0x10(%rbp), %rax movq 0x48(%rax), %rax movq 0x28(%rax), %rax movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq *%rax movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) jge 0x3e2be callq 0x14050 cmpl $0xb, (%rax) je 0x3e2cb callq 0x14050 cmpl $0x4, (%rax) je 0x3e2cb movq -0x28(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x3e35c movq -0x30(%rbp), %rax movl $0x2, (%rax) cmpl $0x0, -0x34(%rbp) jl 0x3e2f0 movq -0x30(%rbp), %rax movl (%rax), %ecx orl $0x8, %ecx movl %ecx, (%rax) movl -0x34(%rbp), %ecx movq -0x30(%rbp), %rax movl %ecx, 0x10(%rax) movq -0x30(%rbp), %rax cmpq $0x0, 0x20(%rax) je 0x3e312 movq -0x30(%rbp), %rax movq 0x20(%rax), %rax movq -0x30(%rbp), %rcx movq 0x28(%rcx), %rsi movl $0x1, %edi callq *%rax movq -0x30(%rbp), %rdi addq $0x38, %rdi callq 0x59c30 movq -0x30(%rbp), %rax cmpq $0x0, 0x20(%rax) je 0x3e33e movq -0x30(%rbp), %rax movq 0x20(%rax), %rax movq -0x30(%rbp), %rcx movq 0x28(%rcx), %rsi xorl %edi, %edi callq *%rax movq -0x30(%rbp), %rax movl 0x4(%rax), %eax andl $0x8, %eax cmpl $0x0, %eax je 0x3e357 movq $-0x1, -0x8(%rbp) jmp 0x3e35c jmp 0x3e285 movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_pvio_write_async: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov rax, [rax+40h] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_30], rax mov rax, [rbp+var_10] mov eax, [rax+2Ch] mov [rbp+var_34], eax loc_3E285: mov rax, [rbp+var_10] mov rax, [rax+48h] mov rax, [rax+28h] mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call rax mov [rbp+var_28], rax cmp [rbp+var_28], 0 jge short loc_3E2BE call ___errno_location cmp dword ptr [rax], 0Bh jz short loc_3E2CB call ___errno_location cmp dword ptr [rax], 4 jz short loc_3E2CB loc_3E2BE: mov rax, [rbp+var_28] mov [rbp+var_8], rax jmp loc_3E35C loc_3E2CB: mov rax, [rbp+var_30] mov dword ptr [rax], 2 cmp [rbp+var_34], 0 jl short loc_3E2F0 mov rax, [rbp+var_30] mov ecx, [rax] or ecx, 8 mov [rax], ecx mov ecx, [rbp+var_34] mov rax, [rbp+var_30] mov [rax+10h], ecx loc_3E2F0: mov rax, [rbp+var_30] cmp qword ptr [rax+20h], 0 jz short loc_3E312 mov rax, [rbp+var_30] mov rax, [rax+20h] mov rcx, [rbp+var_30] mov rsi, [rcx+28h] mov edi, 1 call rax loc_3E312: mov rdi, [rbp+var_30] add rdi, 38h ; '8' call my_context_yield mov rax, [rbp+var_30] cmp qword ptr [rax+20h], 0 jz short loc_3E33E mov rax, [rbp+var_30] mov rax, [rax+20h] mov rcx, [rbp+var_30] mov rsi, [rcx+28h] xor edi, edi call rax loc_3E33E: mov rax, [rbp+var_30] mov eax, [rax+4] and eax, 8 cmp eax, 0 jz short loc_3E357 mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp short loc_3E35C loc_3E357: jmp loc_3E285 loc_3E35C: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long ma_pvio_write_async(long long a1, long long a2, long long a3) { int v4; // [rsp+Ch] [rbp-34h] long long v5; // [rsp+10h] [rbp-30h] long long v6; // [rsp+18h] [rbp-28h] v5 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 64) + 1152LL) + 40LL); v4 = *(_DWORD *)(a1 + 44); do { v6 = (*(long long ( **)(long long, long long, long long))(*(_QWORD *)(a1 + 72) + 40LL))(a1, a2, a3); if ( v6 >= 0 || *(_DWORD *)__errno_location() != 11 && *(_DWORD *)__errno_location() != 4 ) return v6; *(_DWORD *)v5 = 2; if ( v4 >= 0 ) { *(_DWORD *)v5 |= 8u; *(_DWORD *)(v5 + 16) = v4; } if ( *(_QWORD *)(v5 + 32) ) (*(void ( **)(long long, _QWORD))(v5 + 32))(1LL, *(_QWORD *)(v5 + 40)); my_context_yield(v5 + 56); if ( *(_QWORD *)(v5 + 32) ) (*(void ( **)(_QWORD, _QWORD))(v5 + 32))(0LL, *(_QWORD *)(v5 + 40)); } while ( (*(_DWORD *)(v5 + 4) & 8) == 0 ); return -1LL; }
ma_pvio_write_async: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x2c] MOV dword ptr [RBP + -0x34],EAX LAB_0013e285: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x48] MOV RAX,qword ptr [RAX + 0x28] MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL RAX MOV qword ptr [RBP + -0x28],RAX CMP qword ptr [RBP + -0x28],0x0 JGE 0x0013e2be CALL 0x00114050 CMP dword ptr [RAX],0xb JZ 0x0013e2cb CALL 0x00114050 CMP dword ptr [RAX],0x4 JZ 0x0013e2cb LAB_0013e2be: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x8],RAX JMP 0x0013e35c LAB_0013e2cb: MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX],0x2 CMP dword ptr [RBP + -0x34],0x0 JL 0x0013e2f0 MOV RAX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RAX] OR ECX,0x8 MOV dword ptr [RAX],ECX MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x10],ECX LAB_0013e2f0: MOV RAX,qword ptr [RBP + -0x30] CMP qword ptr [RAX + 0x20],0x0 JZ 0x0013e312 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RCX + 0x28] MOV EDI,0x1 CALL RAX LAB_0013e312: MOV RDI,qword ptr [RBP + -0x30] ADD RDI,0x38 CALL 0x00159c30 MOV RAX,qword ptr [RBP + -0x30] CMP qword ptr [RAX + 0x20],0x0 JZ 0x0013e33e MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RCX + 0x28] XOR EDI,EDI CALL RAX LAB_0013e33e: MOV RAX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RAX + 0x4] AND EAX,0x8 CMP EAX,0x0 JZ 0x0013e357 MOV qword ptr [RBP + -0x8],-0x1 JMP 0x0013e35c LAB_0013e357: JMP 0x0013e285 LAB_0013e35c: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
long ma_pvio_write_async(long param_1,int8 param_2,int8 param_3) { uint uVar1; uint *puVar2; long lVar3; int *piVar4; puVar2 = *(uint **)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x28); uVar1 = *(uint *)(param_1 + 0x2c); while( true ) { lVar3 = (**(code **)(*(long *)(param_1 + 0x48) + 0x28))(param_1,param_2,param_3); if (-1 < lVar3) { return lVar3; } piVar4 = __errno_location(); if ((*piVar4 != 0xb) && (piVar4 = __errno_location(), *piVar4 != 4)) break; *puVar2 = 2; if (-1 < (int)uVar1) { *puVar2 = *puVar2 | 8; puVar2[4] = uVar1; } if (*(long *)(puVar2 + 8) != 0) { (**(code **)(puVar2 + 8))(1,*(int8 *)(puVar2 + 10)); } my_context_yield(puVar2 + 0xe); if (*(long *)(puVar2 + 8) != 0) { (**(code **)(puVar2 + 8))(0,*(int8 *)(puVar2 + 10)); } if ((puVar2[1] & 8) != 0) { return -1; } } return lVar3; }
55,253
my_b_write
eloqsql/mysys/mf_iocache.c
int _my_b_write(IO_CACHE *info, const uchar *Buffer, size_t Count) { size_t rest_length; int res; /* Always use my_b_flush_io_cache() to flush write_buffer! */ DBUG_ASSERT(Buffer != info->write_buffer); if (info->pos_in_file + info->buffer_length > info->end_of_file) { my_errno=errno=EFBIG; return info->error = -1; } rest_length= (size_t) (info->write_end - info->write_pos); DBUG_ASSERT(Count >= rest_length); memcpy(info->write_pos, Buffer, (size_t) rest_length); Buffer+=rest_length; Count-=rest_length; info->write_pos+=rest_length; if (my_b_flush_io_cache(info, 1)) return 1; if (Count) { my_off_t old_pos_in_file= info->pos_in_file; res= info->write_function(info, Buffer, Count); Count-= (size_t) (info->pos_in_file - old_pos_in_file); Buffer+= info->pos_in_file - old_pos_in_file; } else res= 0; if (!res && Count) { memcpy(info->write_pos, Buffer, Count); info->write_pos+= Count; } return res; }
O3
c
my_b_write: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movq 0xe8(%rdi), %rax addq (%rdi), %rax cmpq 0x8(%rdi), %rax jbe 0x514c7 callq 0x28050 movl $0x1b, %r14d movl %r14d, (%rax) callq 0x5ed5e movl %r14d, (%rax) movl $0xffffffff, 0xe4(%rbx) # imm = 0xFFFFFFFF movl $0xffffffff, %r12d # imm = 0xFFFFFFFF jmp 0x51550 movq %rdx, %r14 movq %rsi, %r15 movq 0x40(%rbx), %rdi movq 0x48(%rbx), %r13 subq %rdi, %r13 movq %r13, %rdx callq 0x282c0 addq %r13, 0x40(%rbx) movl $0x1, %r12d movq %rbx, %rdi movl $0x1, %esi callq 0x511b9 testl %eax, %eax jne 0x51550 xorl %r12d, %r12d cmpq %r13, %r14 je 0x51550 addq %r13, %r15 subq %r13, %r14 movq (%rbx), %r13 movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq *0xa8(%rbx) movl %eax, %r12d movq (%rbx), %rax subq %r13, %rax testl %r12d, %r12d sete %cl subq %rax, %r14 setne %dl andb %cl, %dl cmpb $0x1, %dl jne 0x51550 addq %rax, %r15 movq 0x40(%rbx), %rdi movq %r15, %rsi movq %r14, %rdx callq 0x282c0 addq %r14, 0x40(%rbx) xorl %r12d, %r12d movl %r12d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_my_b_write: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi mov rax, [rdi+0E8h] add rax, [rdi] cmp rax, [rdi+8] jbe short loc_514C7 call ___errno_location mov r14d, 1Bh mov [rax], r14d call _my_thread_var mov [rax], r14d mov dword ptr [rbx+0E4h], 0FFFFFFFFh mov r12d, 0FFFFFFFFh jmp loc_51550 loc_514C7: mov r14, rdx mov r15, rsi mov rdi, [rbx+40h] mov r13, [rbx+48h] sub r13, rdi mov rdx, r13 call _memcpy add [rbx+40h], r13 mov r12d, 1 mov rdi, rbx mov esi, 1 call my_b_flush_io_cache test eax, eax jnz short loc_51550 xor r12d, r12d cmp r14, r13 jz short loc_51550 add r15, r13 sub r14, r13 mov r13, [rbx] mov rdi, rbx mov rsi, r15 mov rdx, r14 call qword ptr [rbx+0A8h] mov r12d, eax mov rax, [rbx] sub rax, r13 test r12d, r12d setz cl sub r14, rax setnz dl and dl, cl cmp dl, 1 jnz short loc_51550 add r15, rax mov rdi, [rbx+40h] mov rsi, r15 mov rdx, r14 call _memcpy add [rbx+40h], r14 xor r12d, r12d loc_51550: mov eax, r12d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_b_write(long long a1, const char *a2, long long a3) { unsigned int v4; // r12d long long v6; // rdi long long v7; // r13 const char *v8; // r15 long long v9; // r14 long long v10; // r13 long long v11; // rax long long v12; // r14 if ( *(_QWORD *)a1 + *(_QWORD *)(a1 + 232) <= *(_QWORD *)(a1 + 8) ) { v6 = *(_QWORD *)(a1 + 64); v7 = *(_QWORD *)(a1 + 72) - v6; memcpy(v6, a2, v7); *(_QWORD *)(a1 + 64) += v7; v4 = 1; if ( !(unsigned int)my_b_flush_io_cache((long long *)a1, 1) ) { v4 = 0; if ( a3 != v7 ) { v8 = &a2[v7]; v9 = a3 - v7; v10 = *(_QWORD *)a1; v4 = (*(long long ( **)(long long, const char *, long long))(a1 + 168))(a1, v8, v9); v11 = *(_QWORD *)a1 - v10; v12 = v9 - v11; if ( v4 == 0 && v12 != 0 ) { memcpy(*(_QWORD *)(a1 + 64), &v8[v11], v12); *(_QWORD *)(a1 + 64) += v12; return 0; } } } } else { *(_DWORD *)__errno_location(a1) = 27; *(_DWORD *)my_thread_var(a1, a2) = 27; *(_DWORD *)(a1 + 228) = -1; return (unsigned int)-1; } return v4; }
_my_b_write: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0xe8] ADD RAX,qword ptr [RDI] CMP RAX,qword ptr [RDI + 0x8] JBE 0x001514c7 CALL 0x00128050 MOV R14D,0x1b MOV dword ptr [RAX],R14D CALL 0x0015ed5e MOV dword ptr [RAX],R14D MOV dword ptr [RBX + 0xe4],0xffffffff MOV R12D,0xffffffff JMP 0x00151550 LAB_001514c7: MOV R14,RDX MOV R15,RSI MOV RDI,qword ptr [RBX + 0x40] MOV R13,qword ptr [RBX + 0x48] SUB R13,RDI MOV RDX,R13 CALL 0x001282c0 ADD qword ptr [RBX + 0x40],R13 MOV R12D,0x1 MOV RDI,RBX MOV ESI,0x1 CALL 0x001511b9 TEST EAX,EAX JNZ 0x00151550 XOR R12D,R12D CMP R14,R13 JZ 0x00151550 ADD R15,R13 SUB R14,R13 MOV R13,qword ptr [RBX] MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL qword ptr [RBX + 0xa8] MOV R12D,EAX MOV RAX,qword ptr [RBX] SUB RAX,R13 TEST R12D,R12D SETZ CL SUB R14,RAX SETNZ DL AND DL,CL CMP DL,0x1 JNZ 0x00151550 ADD R15,RAX MOV RDI,qword ptr [RBX + 0x40] MOV RSI,R15 MOV RDX,R14 CALL 0x001282c0 ADD qword ptr [RBX + 0x40],R14 XOR R12D,R12D LAB_00151550: MOV EAX,R12D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int _my_b_write(long *param_1,void *param_2,size_t param_3) { long lVar1; int iVar2; int iVar3; int *piVar4; int4 *puVar5; size_t __n; size_t __n_00; if ((ulong)param_1[1] < (ulong)(param_1[0x1d] + *param_1)) { piVar4 = __errno_location(); *piVar4 = 0x1b; puVar5 = (int4 *)_my_thread_var(); *puVar5 = 0x1b; *(int4 *)((long)param_1 + 0xe4) = 0xffffffff; iVar3 = -1; } else { __n = param_1[9] - param_1[8]; memcpy((void *)param_1[8],param_2,__n); param_1[8] = param_1[8] + __n; iVar3 = 1; iVar2 = my_b_flush_io_cache(param_1,1); if ((iVar2 == 0) && (iVar3 = 0, param_3 != __n)) { lVar1 = *param_1; iVar3 = (*(code *)param_1[0x15])(param_1,(long)param_2 + __n,param_3 - __n); __n_00 = (param_3 - __n) - (*param_1 - lVar1); if (__n_00 != 0 && iVar3 == 0) { memcpy((void *)param_1[8],(void *)((long)param_2 + __n + (*param_1 - lVar1)),__n_00); param_1[8] = param_1[8] + __n_00; iVar3 = 0; } } } return iVar3; }
55,254
LefDefParser::lefwMacroTimingFallt0(double, double)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwMacroTimingFallt0(double min, double max) { if (!lefwFile) return LEFW_UNINITIALIZED; if (!lefwDidInit) return LEFW_BAD_ORDER; if (!lefwIsMacroTiming) return LEFW_BAD_ORDER; if (lefwWriteEncrypt) encPrint(lefwFile, (char*) " FALLT0 %.11g %.11g ;\n", min, max); else fprintf(lefwFile, " FALLT0 %.11g %.11g ;\n", min, max); lefwLines++; return LEFW_OK; }
O3
cpp
LefDefParser::lefwMacroTimingFallt0(double, double): leaq 0x6b696(%rip), %rax # 0x8d0f0 movq (%rax), %rdi testq %rdi, %rdi je 0x21a99 leaq 0x6b8db(%rip), %rax # 0x8d344 cmpl $0x0, (%rax) movl $0x2, %eax je 0x21abc leaq 0x6b922(%rip), %rcx # 0x8d39c cmpl $0x0, (%rcx) je 0x21abc pushq %rax cmpb $0x1, 0x6b955(%rip) # 0x8d3dc jne 0x21a9f leaq 0x3adde(%rip), %rsi # 0x5c86e movb $0x2, %al callq 0x55afd jmp 0x21aad movl $0x1, %eax retq leaq 0x3adc8(%rip), %rsi # 0x5c86e movb $0x2, %al callq 0x22e0 leaq 0x6b888(%rip), %rax # 0x8d33c incl (%rax) xorl %eax, %eax addq $0x8, %rsp retq
_ZN12LefDefParser21lefwMacroTimingFallt0Edd: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] test rdi, rdi jz short loc_21A99 lea rax, _ZN12LefDefParser11lefwDidInitE; LefDefParser::lefwDidInit cmp dword ptr [rax], 0 mov eax, 2 jz short locret_21ABC lea rcx, _ZN12LefDefParser17lefwIsMacroTimingE; LefDefParser::lefwIsMacroTiming cmp dword ptr [rcx], 0 jz short locret_21ABC push rax cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt jnz short loc_21A9F lea rsi, aFallt011g11g; " FALLT0 %.11g %.11g ;\n" mov al, 2 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_21AAD loc_21A99: mov eax, 1 retn loc_21A9F: lea rsi, aFallt011g11g; " FALLT0 %.11g %.11g ;\n" mov al, 2 call _fprintf loc_21AAD: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines inc dword ptr [rax] xor eax, eax add rsp, 8 locret_21ABC: retn
long long LefDefParser::lefwMacroTimingFallt0( LefDefParser *this, double a2, double a3, long long a4, int a5, long long a6, int a7, int a8) { long long result; // rax if ( !*(_QWORD *)&LefDefParser::lefwFile ) return 1LL; result = 2LL; if ( LefDefParser::lefwDidInit && LefDefParser::lefwIsMacroTiming ) { if ( LefDefParser::lefwWriteEncrypt == 1 ) LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)" FALLT0 %.11g %.11g ;\n", a5, (unsigned int)&LefDefParser::lefwIsMacroTiming, a7, a8); else fprintf(*(_QWORD *)&LefDefParser::lefwFile, " FALLT0 %.11g %.11g ;\n", a2, a3); ++LefDefParser::lefwLines; return 0LL; } return result; }
lefwMacroTimingFallt0: LEA RAX,[0x18d0f0] MOV RDI,qword ptr [RAX] TEST RDI,RDI JZ 0x00121a99 LEA RAX,[0x18d344] CMP dword ptr [RAX],0x0 MOV EAX,0x2 JZ 0x00121abc LEA RCX,[0x18d39c] CMP dword ptr [RCX],0x0 JZ 0x00121abc PUSH RAX CMP byte ptr [0x0018d3dc],0x1 JNZ 0x00121a9f LEA RSI,[0x15c86e] MOV AL,0x2 CALL 0x00155afd JMP 0x00121aad LAB_00121a99: MOV EAX,0x1 RET LAB_00121a9f: LEA RSI,[0x15c86e] MOV AL,0x2 CALL 0x001022e0 LAB_00121aad: LEA RAX,[0x18d33c] INC dword ptr [RAX] XOR EAX,EAX ADD RSP,0x8 LAB_00121abc: RET
/* LefDefParser::lefwMacroTimingFallt0(double, double) */ int8 LefDefParser::lefwMacroTimingFallt0(double param_1,double param_2) { int8 uVar1; if (lefwFile != (_IO_FILE *)0x0) { uVar1 = 2; if ((lefwDidInit != 0) && (lefwIsMacroTiming != 0)) { if (lefwWriteEncrypt == '\x01') { encPrint(lefwFile," FALLT0 %.11g %.11g ;\n"); } else { fprintf(lefwFile," FALLT0 %.11g %.11g ;\n"); } lefwLines = lefwLines + 1; uVar1 = 0; } return uVar1; } return 1; }
55,255
my_strnxfrm_unicode_full_nopad_bin
eloqsql/strings/ctype-utf8.c
size_t my_strnxfrm_unicode_full_nopad_bin(CHARSET_INFO *cs, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags) { uchar *dst0= dst; uchar *de= dst + dstlen; dst+= my_strnxfrm_unicode_full_bin_internal(cs, dst, de, &nweights, src, src + srclen); DBUG_ASSERT(dst <= de); /* Safety */ if (dst < de && nweights && (flags & MY_STRXFRM_PAD_WITH_SPACE)) { size_t len= de - dst; set_if_smaller(len, nweights * 3); memset(dst, 0x00, len); dst+= len; } my_strxfrm_desc_and_reverse(dst0, dst, flags, 0); if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && dst < de) { memset(dst, 0x00, de - dst); dst= de; } return dst - dst0; }
O0
c
my_strnxfrm_unicode_full_nopad_bin: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movl 0x10(%rbp), %eax movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x40(%rbp), %rdx movq -0x28(%rbp), %r8 movq -0x28(%rbp), %r9 addq -0x30(%rbp), %r9 leaq -0x1c(%rbp), %rcx callq 0x6ac90 addq -0x10(%rbp), %rax movq %rax, -0x10(%rbp) jmp 0x6afb1 movq -0x10(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x6b011 cmpl $0x0, -0x1c(%rbp) je 0x6b011 movl 0x10(%rbp), %eax andl $0x40, %eax cmpl $0x0, %eax je 0x6b011 movq -0x40(%rbp), %rax movq -0x10(%rbp), %rcx subq %rcx, %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax imull $0x3, -0x1c(%rbp), %ecx movl %ecx, %ecx cmpq %rcx, %rax jbe 0x6aff4 imull $0x3, -0x1c(%rbp), %eax movl %eax, %eax movq %rax, -0x48(%rbp) jmp 0x6aff6 movq -0x10(%rbp), %rdi movq -0x48(%rbp), %rdx xorl %esi, %esi callq 0x24180 movq -0x48(%rbp), %rax addq -0x10(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x38(%rbp), %rdi movq -0x10(%rbp), %rsi movl 0x10(%rbp), %edx xorl %ecx, %ecx callq 0x4c190 movl 0x10(%rbp), %eax andl $0x80, %eax cmpl $0x0, %eax je 0x6b058 movq -0x10(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x6b058 movq -0x10(%rbp), %rdi movq -0x40(%rbp), %rdx movq -0x10(%rbp), %rax subq %rax, %rdx xorl %esi, %esi callq 0x24180 movq -0x40(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax addq $0x50, %rsp popq %rbp retq nopl (%rax)
my_strnxfrm_unicode_full_nopad_bin: push rbp mov rbp, rsp sub rsp, 50h mov eax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov rax, [rbp+var_10] mov [rbp+var_38], rax mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_40], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_40] mov r8, [rbp+var_28] mov r9, [rbp+var_28] add r9, [rbp+var_30] lea rcx, [rbp+var_1C] call my_strnxfrm_unicode_full_bin_internal add rax, [rbp+var_10] mov [rbp+var_10], rax jmp short $+2 loc_6AFB1: mov rax, [rbp+var_10] cmp rax, [rbp+var_40] jnb short loc_6B011 cmp [rbp+var_1C], 0 jz short loc_6B011 mov eax, [rbp+arg_0] and eax, 40h cmp eax, 0 jz short loc_6B011 mov rax, [rbp+var_40] mov rcx, [rbp+var_10] sub rax, rcx mov [rbp+var_48], rax mov rax, [rbp+var_48] imul ecx, [rbp+var_1C], 3 mov ecx, ecx cmp rax, rcx jbe short loc_6AFF4 imul eax, [rbp+var_1C], 3 mov eax, eax mov [rbp+var_48], rax loc_6AFF4: jmp short $+2 loc_6AFF6: mov rdi, [rbp+var_10] mov rdx, [rbp+var_48] xor esi, esi call _memset mov rax, [rbp+var_48] add rax, [rbp+var_10] mov [rbp+var_10], rax loc_6B011: mov rdi, [rbp+var_38] mov rsi, [rbp+var_10] mov edx, [rbp+arg_0] xor ecx, ecx call my_strxfrm_desc_and_reverse mov eax, [rbp+arg_0] and eax, 80h cmp eax, 0 jz short loc_6B058 mov rax, [rbp+var_10] cmp rax, [rbp+var_40] jnb short loc_6B058 mov rdi, [rbp+var_10] mov rdx, [rbp+var_40] mov rax, [rbp+var_10] sub rdx, rax xor esi, esi call _memset mov rax, [rbp+var_40] mov [rbp+var_10], rax loc_6B058: mov rax, [rbp+var_10] mov rcx, [rbp+var_38] sub rax, rcx add rsp, 50h pop rbp retn
unsigned long long my_strnxfrm_unicode_full_nopad_bin( long long a1, _BYTE *a2, long long a3, int a4, long long a5, long long a6, unsigned int a7) { _BYTE *v7; // rax unsigned long long v9; // [rsp+8h] [rbp-48h] unsigned long long v10; // [rsp+10h] [rbp-40h] int v11; // [rsp+34h] [rbp-1Ch] BYREF long long v12; // [rsp+38h] [rbp-18h] unsigned long long v13; // [rsp+40h] [rbp-10h] long long v14; // [rsp+48h] [rbp-8h] v14 = a1; v13 = (unsigned long long)a2; v12 = a3; v11 = a4; v10 = (unsigned long long)&a2[a3]; v7 = my_strnxfrm_unicode_full_bin_internal(a1, a2, (unsigned long long)&a2[a3], &v11, a5, a6 + a5); v13 += (unsigned long long)v7; if ( v13 < v10 && v11 && (a7 & 0x40) != 0 ) { v9 = v10 - v13; if ( v10 - v13 > (unsigned int)(3 * v11) ) v9 = (unsigned int)(3 * v11); memset(v13, 0LL, v9); v13 += v9; } my_strxfrm_desc_and_reverse(a2, v13, a7, 0); if ( (a7 & 0x80) != 0 && v13 < v10 ) { memset(v13, 0LL, v10 - v13); v13 = v10; } return v13 - (_QWORD)a2; }
my_strnxfrm_unicode_full_nopad_bin: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX 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 + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x40] MOV R8,qword ptr [RBP + -0x28] MOV R9,qword ptr [RBP + -0x28] ADD R9,qword ptr [RBP + -0x30] LEA RCX,[RBP + -0x1c] CALL 0x0016ac90 ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x10],RAX JMP 0x0016afb1 LAB_0016afb1: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x40] JNC 0x0016b011 CMP dword ptr [RBP + -0x1c],0x0 JZ 0x0016b011 MOV EAX,dword ptr [RBP + 0x10] AND EAX,0x40 CMP EAX,0x0 JZ 0x0016b011 MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] IMUL ECX,dword ptr [RBP + -0x1c],0x3 MOV ECX,ECX CMP RAX,RCX JBE 0x0016aff4 IMUL EAX,dword ptr [RBP + -0x1c],0x3 MOV EAX,EAX MOV qword ptr [RBP + -0x48],RAX LAB_0016aff4: JMP 0x0016aff6 LAB_0016aff6: MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x48] XOR ESI,ESI CALL 0x00124180 MOV RAX,qword ptr [RBP + -0x48] ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x10],RAX LAB_0016b011: MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + 0x10] XOR ECX,ECX CALL 0x0014c190 MOV EAX,dword ptr [RBP + 0x10] AND EAX,0x80 CMP EAX,0x0 JZ 0x0016b058 MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x40] JNC 0x0016b058 MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x10] SUB RDX,RAX XOR ESI,ESI CALL 0x00124180 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x10],RAX LAB_0016b058: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX ADD RSP,0x50 POP RBP RET
long my_strnxfrm_unicode_full_nopad_bin (int8 param_1,long param_2,long param_3,int param_4,long param_5,long param_6, uint param_7) { void *pvVar1; long lVar2; size_t local_50; int local_24; long local_20; void *local_18; int8 local_10; pvVar1 = (void *)(param_2 + param_3); local_24 = param_4; local_20 = param_3; local_18 = (void *)param_2; local_10 = param_1; lVar2 = my_strnxfrm_unicode_full_bin_internal (param_1,param_2,pvVar1,&local_24,param_5,param_5 + param_6); local_18 = (void *)(lVar2 + (long)local_18); if (((local_18 < pvVar1) && (local_24 != 0)) && ((param_7 & 0x40) != 0)) { local_50 = (long)pvVar1 - (long)local_18; if ((uint)(local_24 * 3) < local_50) { local_50 = (size_t)(uint)(local_24 * 3); } memset(local_18,0,local_50); local_18 = (void *)(local_50 + (long)local_18); } my_strxfrm_desc_and_reverse(param_2,local_18,param_7,0); if (((param_7 & 0x80) != 0) && (local_18 < pvVar1)) { memset(local_18,0,(long)pvVar1 - (long)local_18); local_18 = pvVar1; } return (long)local_18 - param_2; }
55,256
my_strnxfrm_unicode_full_nopad_bin
eloqsql/strings/ctype-utf8.c
size_t my_strnxfrm_unicode_full_nopad_bin(CHARSET_INFO *cs, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags) { uchar *dst0= dst; uchar *de= dst + dstlen; dst+= my_strnxfrm_unicode_full_bin_internal(cs, dst, de, &nweights, src, src + srclen); DBUG_ASSERT(dst <= de); /* Safety */ if (dst < de && nweights && (flags & MY_STRXFRM_PAD_WITH_SPACE)) { size_t len= de - dst; set_if_smaller(len, nweights * 3); memset(dst, 0x00, len); dst+= len; } my_strxfrm_desc_and_reverse(dst0, dst, flags, 0); if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && dst < de) { memset(dst, 0x00, de - dst); dst= de; } return dst - dst0; }
O3
c
my_strnxfrm_unicode_full_nopad_bin: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r13 movq %rsi, %rbx movl 0x10(%rbp), %r12d leaq -0x2c(%rbp), %rax movl %ecx, (%rax) leaq (%rsi,%rdx), %r14 addq %r8, %r9 movq %r14, %rdx movq %rax, %rcx callq 0x5241f leaq (%rbx,%rax), %r15 testb $0x40, %r12b je 0x5262c subq %rax, %r13 jle 0x5262c movl -0x2c(%rbp), %eax testl %eax, %eax je 0x5262c leal (%rax,%rax,2), %r12d cmpq %r12, %r13 cmovbq %r13, %r12 movq %r15, %rdi xorl %esi, %esi movq %r12, %rdx callq 0x24180 addq %r12, %r15 movl 0x10(%rbp), %r12d movq %rbx, %rdi movq %r15, %rsi movl %r12d, %edx xorl %ecx, %ecx callq 0x3d3c6 testb %r12b, %r12b jns 0x52659 cmpq %r14, %r15 jae 0x52659 movq %r14, %rdx subq %r15, %rdx movq %r15, %rdi xorl %esi, %esi callq 0x24180 movq %r14, %r15 subq %rbx, %r15 movq %r15, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strnxfrm_unicode_full_nopad_bin: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r13, rdx mov rbx, rsi mov r12d, [rbp+arg_0] lea rax, [rbp+var_2C] mov [rax], ecx lea r14, [rsi+rdx] add r9, r8 mov rdx, r14 mov rcx, rax call my_strnxfrm_unicode_full_bin_internal lea r15, [rbx+rax] test r12b, 40h jz short loc_5262C sub r13, rax jle short loc_5262C mov eax, [rbp+var_2C] test eax, eax jz short loc_5262C lea r12d, [rax+rax*2] cmp r13, r12 cmovb r12, r13 mov rdi, r15 xor esi, esi mov rdx, r12 call _memset add r15, r12 mov r12d, [rbp+arg_0] loc_5262C: mov rdi, rbx mov rsi, r15 mov edx, r12d xor ecx, ecx call my_strxfrm_desc_and_reverse test r12b, r12b jns short loc_52659 cmp r15, r14 jnb short loc_52659 mov rdx, r14 sub rdx, r15 mov rdi, r15 xor esi, esi call _memset mov r15, r14 loc_52659: sub r15, rbx mov rax, r15 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_strnxfrm_unicode_full_nopad_bin( long long a1, _BYTE *a2, long long a3, int a4, long long a5, long long a6, unsigned int a7) { unsigned int v8; // r12d _BYTE *v9; // r14 long long v10; // rax _BYTE *v11; // r15 bool v12; // cc unsigned long long v13; // r13 unsigned long long v14; // r12 int v16[11]; // [rsp+0h] [rbp-2Ch] BYREF v8 = a7; v16[0] = a4; v9 = &a2[a3]; v10 = my_strnxfrm_unicode_full_bin_internal(a1, a2, (unsigned long long)&a2[a3], v16, a5, a5 + a6); v11 = &a2[v10]; if ( (a7 & 0x40) != 0 ) { v12 = a3 <= v10; v13 = a3 - v10; if ( !v12 ) { if ( v16[0] ) { v14 = (unsigned int)(3 * v16[0]); if ( v13 < v14 ) v14 = v13; memset(v11, 0LL, v14); v11 += v14; v8 = a7; } } } my_strxfrm_desc_and_reverse(a2, v11, v8, 0); if ( (v8 & 0x80u) != 0 && v11 < v9 ) { memset(v11, 0LL, v9 - v11); v11 = v9; } return v11 - a2; }
my_strnxfrm_unicode_full_nopad_bin: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R13,RDX MOV RBX,RSI MOV R12D,dword ptr [RBP + 0x10] LEA RAX,[RBP + -0x2c] MOV dword ptr [RAX],ECX LEA R14,[RSI + RDX*0x1] ADD R9,R8 MOV RDX,R14 MOV RCX,RAX CALL 0x0015241f LEA R15,[RBX + RAX*0x1] TEST R12B,0x40 JZ 0x0015262c SUB R13,RAX JLE 0x0015262c MOV EAX,dword ptr [RBP + -0x2c] TEST EAX,EAX JZ 0x0015262c LEA R12D,[RAX + RAX*0x2] CMP R13,R12 CMOVC R12,R13 MOV RDI,R15 XOR ESI,ESI MOV RDX,R12 CALL 0x00124180 ADD R15,R12 MOV R12D,dword ptr [RBP + 0x10] LAB_0015262c: MOV RDI,RBX MOV RSI,R15 MOV EDX,R12D XOR ECX,ECX CALL 0x0013d3c6 TEST R12B,R12B JNS 0x00152659 CMP R15,R14 JNC 0x00152659 MOV RDX,R14 SUB RDX,R15 MOV RDI,R15 XOR ESI,ESI CALL 0x00124180 MOV R15,R14 LAB_00152659: SUB R15,RBX MOV RAX,R15 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_strnxfrm_unicode_full_nopad_bin (int8 param_1,long param_2,long param_3,int param_4,long param_5,long param_6, uint param_7) { void *pvVar1; long lVar2; ulong __n; ulong uVar3; void *__s; int local_34; pvVar1 = (void *)(param_2 + param_3); local_34 = param_4; lVar2 = my_strnxfrm_unicode_full_bin_internal (param_1,param_2,pvVar1,&local_34,param_5,param_6 + param_5); __s = (void *)(param_2 + lVar2); if ((((param_7 & 0x40) != 0) && (uVar3 = param_3 - lVar2, uVar3 != 0 && lVar2 <= param_3)) && (local_34 != 0)) { __n = (ulong)(uint)(local_34 * 3); if (uVar3 < (uint)(local_34 * 3)) { __n = uVar3; } memset(__s,0,__n); __s = (void *)((long)__s + __n); } my_strxfrm_desc_and_reverse(param_2,__s,param_7,0); if (((char)param_7 < '\0') && (__s < pvVar1)) { memset(__s,0,(long)pvVar1 - (long)__s); __s = pvVar1; } return (long)__s - param_2; }
55,257
mi_keyseg_write
eloqsql/storage/myisam/mi_open.c
int mi_keyseg_write(File file, const HA_KEYSEG *keyseg) { uchar buff[HA_KEYSEG_SIZE]; uchar *ptr=buff; ulong pos; *ptr++= keyseg->type; *ptr++= keyseg->language & 0xFF; /* Collation ID, low byte */ *ptr++= keyseg->null_bit; *ptr++= keyseg->bit_start; *ptr++= keyseg->language >> 8; /* Collation ID, high byte */ *ptr++= keyseg->bit_length; mi_int2store(ptr,keyseg->flag); ptr+=2; mi_int2store(ptr,keyseg->length); ptr+=2; mi_int4store(ptr,keyseg->start); ptr+=4; pos= keyseg->null_bit ? keyseg->null_pos : keyseg->bit_pos; mi_int4store(ptr, pos); ptr+=4; return mysql_file_write(file, buff, (size_t) (ptr-buff), MYF(MY_NABP)) != 0; }
O0
c
mi_keyseg_write: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movl %edi, -0x24(%rbp) movq %rsi, -0x30(%rbp) leaq -0x20(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax movb 0x18(%rax), %cl movq -0x38(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x38(%rbp) movb %cl, (%rax) movq -0x30(%rbp), %rax movzwl 0x16(%rax), %eax andl $0xff, %eax movb %al, %cl movq -0x38(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x38(%rbp) movb %cl, (%rax) movq -0x30(%rbp), %rax movb 0x19(%rax), %cl movq -0x38(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x38(%rbp) movb %cl, (%rax) movq -0x30(%rbp), %rax movb 0x1a(%rax), %cl movq -0x38(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x38(%rbp) movb %cl, (%rax) movq -0x30(%rbp), %rax movzwl 0x16(%rax), %eax sarl $0x8, %eax movb %al, %cl movq -0x38(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x38(%rbp) movb %cl, (%rax) movq -0x30(%rbp), %rax movb 0x1b(%rax), %cl movq -0x38(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x38(%rbp) movb %cl, (%rax) movq -0x30(%rbp), %rax movzwl 0x12(%rax), %eax movl %eax, -0x44(%rbp) movl -0x44(%rbp), %eax movb %al, %cl movq -0x38(%rbp), %rax movb %cl, 0x1(%rax) movl -0x44(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x38(%rbp), %rax movb %cl, (%rax) movq -0x38(%rbp), %rax addq $0x2, %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax movzwl 0x14(%rax), %eax movl %eax, -0x48(%rbp) movl -0x48(%rbp), %eax movb %al, %cl movq -0x38(%rbp), %rax movb %cl, 0x1(%rax) movl -0x48(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x38(%rbp), %rax movb %cl, (%rax) movq -0x38(%rbp), %rax addq $0x2, %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax movl 0x8(%rax), %eax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movb %al, %cl movq -0x38(%rbp), %rax movb %cl, 0x3(%rax) movq -0x50(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x38(%rbp), %rax movb %cl, 0x2(%rax) movq -0x50(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x38(%rbp), %rax movb %cl, 0x1(%rax) movq -0x50(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x38(%rbp), %rax movb %cl, (%rax) movq -0x38(%rbp), %rax addq $0x4, %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax movzbl 0x19(%rax), %eax cmpl $0x0, %eax je 0xb98c3 movq -0x30(%rbp), %rax movl 0xc(%rax), %eax movl %eax, -0x5c(%rbp) jmp 0xb98ce movq -0x30(%rbp), %rax movzwl 0x10(%rax), %eax movl %eax, -0x5c(%rbp) movl -0x5c(%rbp), %eax movl %eax, %eax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x58(%rbp) movb -0x58(%rbp), %cl movq -0x38(%rbp), %rax movb %cl, 0x3(%rax) movb -0x57(%rbp), %cl movq -0x38(%rbp), %rax movb %cl, 0x2(%rax) movb -0x56(%rbp), %cl movq -0x38(%rbp), %rax movb %cl, 0x1(%rax) movb -0x55(%rbp), %cl movq -0x38(%rbp), %rax movb %cl, (%rax) movq -0x38(%rbp), %rax addq $0x4, %rax movq %rax, -0x38(%rbp) movl -0x24(%rbp), %edx movq -0x38(%rbp), %r8 leaq -0x20(%rbp), %rcx subq %rcx, %r8 leaq 0x9a075(%rip), %rdi # 0x15399c movl $0x4a2, %esi # imm = 0x4A2 movl $0x4, %r9d callq 0xb8820 testq %rax, %rax setne %al movzbl %al, %eax movl %eax, -0x60(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xb995e movl -0x60(%rbp), %eax addq $0x60, %rsp popq %rbp retq callq 0x2a250 nopw %cs:(%rax,%rax)
mi_keyseg_write: push rbp mov rbp, rsp sub rsp, 60h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_24], edi mov [rbp+var_30], rsi lea rax, [rbp+var_20] mov [rbp+var_38], rax mov rax, [rbp+var_30] mov cl, [rax+18h] mov rax, [rbp+var_38] mov rdx, rax add rdx, 1 mov [rbp+var_38], rdx mov [rax], cl mov rax, [rbp+var_30] movzx eax, word ptr [rax+16h] and eax, 0FFh mov cl, al mov rax, [rbp+var_38] mov rdx, rax add rdx, 1 mov [rbp+var_38], rdx mov [rax], cl mov rax, [rbp+var_30] mov cl, [rax+19h] mov rax, [rbp+var_38] mov rdx, rax add rdx, 1 mov [rbp+var_38], rdx mov [rax], cl mov rax, [rbp+var_30] mov cl, [rax+1Ah] mov rax, [rbp+var_38] mov rdx, rax add rdx, 1 mov [rbp+var_38], rdx mov [rax], cl mov rax, [rbp+var_30] movzx eax, word ptr [rax+16h] sar eax, 8 mov cl, al mov rax, [rbp+var_38] mov rdx, rax add rdx, 1 mov [rbp+var_38], rdx mov [rax], cl mov rax, [rbp+var_30] mov cl, [rax+1Bh] mov rax, [rbp+var_38] mov rdx, rax add rdx, 1 mov [rbp+var_38], rdx mov [rax], cl mov rax, [rbp+var_30] movzx eax, word ptr [rax+12h] mov [rbp+var_44], eax mov eax, [rbp+var_44] mov cl, al mov rax, [rbp+var_38] mov [rax+1], cl mov eax, [rbp+var_44] shr eax, 8 mov cl, al mov rax, [rbp+var_38] mov [rax], cl mov rax, [rbp+var_38] add rax, 2 mov [rbp+var_38], rax mov rax, [rbp+var_30] movzx eax, word ptr [rax+14h] mov [rbp+var_48], eax mov eax, [rbp+var_48] mov cl, al mov rax, [rbp+var_38] mov [rax+1], cl mov eax, [rbp+var_48] shr eax, 8 mov cl, al mov rax, [rbp+var_38] mov [rax], cl mov rax, [rbp+var_38] add rax, 2 mov [rbp+var_38], rax mov rax, [rbp+var_30] mov eax, [rax+8] mov [rbp+var_50], rax mov rax, [rbp+var_50] mov cl, al mov rax, [rbp+var_38] mov [rax+3], cl mov rax, [rbp+var_50] shr rax, 8 mov cl, al mov rax, [rbp+var_38] mov [rax+2], cl mov rax, [rbp+var_50] shr rax, 10h mov cl, al mov rax, [rbp+var_38] mov [rax+1], cl mov rax, [rbp+var_50] shr rax, 18h mov cl, al mov rax, [rbp+var_38] mov [rax], cl mov rax, [rbp+var_38] add rax, 4 mov [rbp+var_38], rax mov rax, [rbp+var_30] movzx eax, byte ptr [rax+19h] cmp eax, 0 jz short loc_B98C3 mov rax, [rbp+var_30] mov eax, [rax+0Ch] mov [rbp+var_5C], eax jmp short loc_B98CE loc_B98C3: mov rax, [rbp+var_30] movzx eax, word ptr [rax+10h] mov [rbp+var_5C], eax loc_B98CE: mov eax, [rbp+var_5C] mov eax, eax mov [rbp+var_40], rax mov rax, [rbp+var_40] mov [rbp+var_58], rax mov cl, byte ptr [rbp+var_58] mov rax, [rbp+var_38] mov [rax+3], cl mov cl, byte ptr [rbp+var_58+1] mov rax, [rbp+var_38] mov [rax+2], cl mov cl, byte ptr [rbp+var_58+2] mov rax, [rbp+var_38] mov [rax+1], cl mov cl, byte ptr [rbp+var_58+3] mov rax, [rbp+var_38] mov [rax], cl mov rax, [rbp+var_38] add rax, 4 mov [rbp+var_38], rax mov edx, [rbp+var_24] mov r8, [rbp+var_38] lea rcx, [rbp+var_20] sub r8, rcx lea rdi, aWorkspaceLlm4b_29; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 4A2h mov r9d, 4 call inline_mysql_file_write_2 test rax, rax setnz al movzx eax, al mov [rbp+var_60], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_B995E mov eax, [rbp+var_60] add rsp, 60h pop rbp retn loc_B995E: call ___stack_chk_fail
_BOOL8 mi_keyseg_write(unsigned int a1, long long a2) { __int16 v2; // kr00_2 __int16 v3; // kr02_2 int v5; // [rsp+4h] [rbp-5Ch] int v6; // [rsp+10h] [rbp-50h] _BYTE v7[18]; // [rsp+40h] [rbp-20h] BYREF _BYTE v8[14]; // [rsp+52h] [rbp-Eh] BYREF *(_QWORD *)&v8[6] = __readfsqword(0x28u); v7[0] = *(_BYTE *)(a2 + 24); v7[1] = *(_WORD *)(a2 + 22); v7[2] = *(_BYTE *)(a2 + 25); v7[3] = *(_BYTE *)(a2 + 26); v7[4] = HIBYTE(*(_WORD *)(a2 + 22)); v7[5] = *(_BYTE *)(a2 + 27); v2 = *(_WORD *)(a2 + 18); v7[6] = HIBYTE(v2); v7[7] = v2; v3 = *(_WORD *)(a2 + 20); v7[8] = HIBYTE(v3); v7[9] = v3; v6 = *(_DWORD *)(a2 + 8); v7[12] = BYTE1(v6); v7[13] = v6; v7[10] = HIBYTE(v6); v7[11] = BYTE2(v6); if ( *(_BYTE *)(a2 + 25) ) v5 = *(_DWORD *)(a2 + 12); else v5 = *(unsigned __int16 *)(a2 + 16); v7[16] = BYTE1(v5); v7[17] = v5; v7[14] = HIBYTE(v5); v7[15] = BYTE2(v5); return inline_mysql_file_write_2( (long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c", 0x4A2u, a1, (long long)v7, v8 - v7, 4LL) != 0; }
mi_keyseg_write: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x24],EDI MOV qword ptr [RBP + -0x30],RSI LEA RAX,[RBP + -0x20] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] MOV CL,byte ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x38] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x38],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,word ptr [RAX + 0x16] AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x38] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x38],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x30] MOV CL,byte ptr [RAX + 0x19] MOV RAX,qword ptr [RBP + -0x38] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x38],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x30] MOV CL,byte ptr [RAX + 0x1a] MOV RAX,qword ptr [RBP + -0x38] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x38],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,word ptr [RAX + 0x16] SAR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x38] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x38],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x30] MOV CL,byte ptr [RAX + 0x1b] MOV RAX,qword ptr [RBP + -0x38] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x38],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,word ptr [RAX + 0x12] MOV dword ptr [RBP + -0x44],EAX MOV EAX,dword ptr [RBP + -0x44] MOV CL,AL MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x1],CL MOV EAX,dword ptr [RBP + -0x44] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x2 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,word ptr [RAX + 0x14] MOV dword ptr [RBP + -0x48],EAX MOV EAX,dword ptr [RBP + -0x48] MOV CL,AL MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x1],CL MOV EAX,dword ptr [RBP + -0x48] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x2 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] MOV CL,AL MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x4 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX + 0x19] CMP EAX,0x0 JZ 0x001b98c3 MOV RAX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RAX + 0xc] MOV dword ptr [RBP + -0x5c],EAX JMP 0x001b98ce LAB_001b98c3: MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,word ptr [RAX + 0x10] MOV dword ptr [RBP + -0x5c],EAX LAB_001b98ce: MOV EAX,dword ptr [RBP + -0x5c] MOV EAX,EAX MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x58],RAX MOV CL,byte ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x3],CL MOV CL,byte ptr [RBP + -0x57] MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x2],CL MOV CL,byte ptr [RBP + -0x56] MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x1],CL MOV CL,byte ptr [RBP + -0x55] MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x4 MOV qword ptr [RBP + -0x38],RAX MOV EDX,dword ptr [RBP + -0x24] MOV R8,qword ptr [RBP + -0x38] LEA RCX,[RBP + -0x20] SUB R8,RCX LEA RDI,[0x25399c] MOV ESI,0x4a2 MOV R9D,0x4 CALL 0x001b8820 TEST RAX,RAX SETNZ AL MOVZX EAX,AL MOV dword ptr [RBP + -0x60],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001b995e MOV EAX,dword ptr [RBP + -0x60] ADD RSP,0x60 POP RBP RET LAB_001b995e: CALL 0x0012a250
bool mi_keyseg_write(int4 param_1,long param_2) { int4 uVar1; long lVar2; long in_FS_OFFSET; uint local_64; int1 local_60; int1 uStack_5f; int1 uStack_5e; int1 uStack_5d; int1 local_28; int1 local_27; int1 local_26; int1 local_25; int1 local_24; int1 local_23; int1 local_22; int1 local_21; int1 local_20; int1 local_1f; int1 local_1e; int1 local_1d; int1 local_1c; int1 local_1b; int1 local_1a; int1 local_19; int1 local_18; int1 local_17; int1 auStack_16 [6]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_28 = *(int1 *)(param_2 + 0x18); local_27 = (int1)*(int2 *)(param_2 + 0x16); local_26 = *(int1 *)(param_2 + 0x19); local_25 = *(int1 *)(param_2 + 0x1a); local_24 = (int1)((ushort)*(int2 *)(param_2 + 0x16) >> 8); local_23 = *(int1 *)(param_2 + 0x1b); local_21 = (int1)*(int2 *)(param_2 + 0x12); local_22 = (int1)((ushort)*(int2 *)(param_2 + 0x12) >> 8); local_1f = (int1)*(int2 *)(param_2 + 0x14); local_20 = (int1)((ushort)*(int2 *)(param_2 + 0x14) >> 8); uVar1 = *(int4 *)(param_2 + 8); local_1b = (int1)uVar1; local_1c = (int1)((uint)uVar1 >> 8); local_1d = (int1)((uint)uVar1 >> 0x10); local_1e = (int1)((uint)uVar1 >> 0x18); if (*(char *)(param_2 + 0x19) == '\0') { local_64 = (uint)*(ushort *)(param_2 + 0x10); } else { local_64 = *(uint *)(param_2 + 0xc); } local_60 = (int1)local_64; local_17 = local_60; uStack_5f = (int1)(local_64 >> 8); local_18 = uStack_5f; uStack_5e = (int1)(local_64 >> 0x10); local_19 = uStack_5e; uStack_5d = (int1)(local_64 >> 0x18); local_1a = uStack_5d; lVar2 = inline_mysql_file_write ("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",0x4a2, param_1,&local_28,auStack_16 + -(long)&local_28,4); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return lVar2 != 0; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
55,258
mi_keyseg_write
eloqsql/storage/myisam/mi_open.c
int mi_keyseg_write(File file, const HA_KEYSEG *keyseg) { uchar buff[HA_KEYSEG_SIZE]; uchar *ptr=buff; ulong pos; *ptr++= keyseg->type; *ptr++= keyseg->language & 0xFF; /* Collation ID, low byte */ *ptr++= keyseg->null_bit; *ptr++= keyseg->bit_start; *ptr++= keyseg->language >> 8; /* Collation ID, high byte */ *ptr++= keyseg->bit_length; mi_int2store(ptr,keyseg->flag); ptr+=2; mi_int2store(ptr,keyseg->length); ptr+=2; mi_int4store(ptr,keyseg->start); ptr+=4; pos= keyseg->null_bit ? keyseg->null_pos : keyseg->bit_pos; mi_int4store(ptr, pos); ptr+=4; return mysql_file_write(file, buff, (size_t) (ptr-buff), MYF(MY_NABP)) != 0; }
O3
c
mi_keyseg_write: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x70, %rsp movl %edi, %ebx movq %fs:0x28, %rax movq %rax, -0x18(%rbp) movb 0x18(%rsi), %al movb %al, -0x30(%rbp) movzwl 0x16(%rsi), %eax movb %al, -0x2f(%rbp) movb 0x19(%rsi), %cl movb %cl, -0x2e(%rbp) movb 0x1a(%rsi), %dl movb %dl, -0x2d(%rbp) movb %ah, -0x2c(%rbp) movb 0x1b(%rsi), %al movb %al, -0x2b(%rbp) movzwl 0x12(%rsi), %eax rolw $0x8, %ax movw %ax, -0x2a(%rbp) movzwl 0x14(%rsi), %eax rolw $0x8, %ax movw %ax, -0x28(%rbp) movl 0x8(%rsi), %eax bswapl %eax movl %eax, -0x26(%rbp) testb %cl, %cl je 0x80411 movl 0xc(%rsi), %eax jmp 0x80415 movzwl 0x10(%rsi), %eax bswapl %eax movl %eax, -0x22(%rbp) leaq 0x305bef(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0x80(%rbp), %rdi movl %ebx, %esi movl $0x7, %edx callq *0x158(%rax) testq %rax, %rax jne 0x80474 leaq -0x30(%rbp), %rsi movl $0x12, %edx movl $0x4, %ecx movl %ebx, %edi callq 0x2efe4 movq %rax, %rcx xorl %eax, %eax testq %rcx, %rcx setne %cl movq %fs:0x28, %rdx cmpq -0x18(%rbp), %rdx jne 0x8048e movb %cl, %al addq $0x70, %rsp popq %rbx popq %r14 popq %rbp retq leaq -0x30(%rbp), %rdx leaq -0x38(%rbp), %r14 movq %rax, %rdi movl %ebx, %esi movq %r14, %rcx callq 0x2e263 movq (%r14), %rcx jmp 0x80452 callq 0x29250
mi_keyseg_write: push rbp mov rbp, rsp push r14 push rbx sub rsp, 70h mov ebx, edi mov rax, fs:28h mov [rbp+var_18], rax mov al, [rsi+18h] mov [rbp+var_30], al movzx eax, word ptr [rsi+16h] mov [rbp+var_2F], al mov cl, [rsi+19h] mov [rbp+var_2E], cl mov dl, [rsi+1Ah] mov [rbp+var_2D], dl mov [rbp+var_2C], ah mov al, [rsi+1Bh] mov [rbp+var_2B], al movzx eax, word ptr [rsi+12h] rol ax, 8 mov [rbp+var_2A], ax movzx eax, word ptr [rsi+14h] rol ax, 8 mov [rbp+var_28], ax mov eax, [rsi+8] bswap eax mov [rbp+var_26], eax test cl, cl jz short loc_80411 mov eax, [rsi+0Ch] jmp short loc_80415 loc_80411: movzx eax, word ptr [rsi+10h] loc_80415: bswap eax mov [rbp+var_22], eax lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_80] mov esi, ebx mov edx, 7 call qword ptr [rax+158h] test rax, rax jnz short loc_80474 lea rsi, [rbp+var_30] mov edx, 12h mov ecx, 4 mov edi, ebx call my_write mov rcx, rax loc_80452: xor eax, eax test rcx, rcx setnz cl mov rdx, fs:28h cmp rdx, [rbp+var_18] jnz short loc_8048E mov al, cl add rsp, 70h pop rbx pop r14 pop rbp retn loc_80474: lea rdx, [rbp+var_30] lea r14, [rbp+var_38] mov rdi, rax mov esi, ebx mov rcx, r14 call mi_keyseg_write_cold_1 mov rcx, [r14] jmp short loc_80452 loc_8048E: call ___stack_chk_fail
bool mi_keyseg_write(unsigned int a1, long long a2) { __int16 v2; // ax unsigned int v3; // eax long long v4; // rax long long v5; // rcx _BYTE v8[72]; // [rsp+0h] [rbp-80h] BYREF long long v9; // [rsp+48h] [rbp-38h] BYREF _BYTE v10[2]; // [rsp+50h] [rbp-30h] BYREF char v11; // [rsp+52h] [rbp-2Eh] char v12; // [rsp+53h] [rbp-2Dh] char v13; // [rsp+54h] [rbp-2Ch] char v14; // [rsp+55h] [rbp-2Bh] __int16 v15; // [rsp+56h] [rbp-2Ah] __int16 v16; // [rsp+58h] [rbp-28h] unsigned __int32 v17; // [rsp+5Ah] [rbp-26h] unsigned __int32 v18; // [rsp+5Eh] [rbp-22h] unsigned long long v19; // [rsp+68h] [rbp-18h] v19 = __readfsqword(0x28u); v10[0] = *(_BYTE *)(a2 + 24); v2 = *(_WORD *)(a2 + 22); v10[1] = v2; v11 = *(_BYTE *)(a2 + 25); v12 = *(_BYTE *)(a2 + 26); v13 = HIBYTE(v2); v14 = *(_BYTE *)(a2 + 27); v15 = __ROL2__(*(_WORD *)(a2 + 18), 8); v16 = __ROL2__(*(_WORD *)(a2 + 20), 8); v17 = _byteswap_ulong(*(_DWORD *)(a2 + 8)); if ( v11 ) v3 = *(_DWORD *)(a2 + 12); else v3 = *(unsigned __int16 *)(a2 + 16); v18 = _byteswap_ulong(v3); v4 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v8, a1, 7LL); if ( v4 ) { mi_keyseg_write_cold_1(v4, a1, (long long)v10, &v9); v5 = v9; } else { v5 = my_write(a1, (long long)v10, 18LL, 4LL); } return v5 != 0; }
mi_keyseg_write: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x70 MOV EBX,EDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX MOV AL,byte ptr [RSI + 0x18] MOV byte ptr [RBP + -0x30],AL MOVZX EAX,word ptr [RSI + 0x16] MOV byte ptr [RBP + -0x2f],AL MOV CL,byte ptr [RSI + 0x19] MOV byte ptr [RBP + -0x2e],CL MOV DL,byte ptr [RSI + 0x1a] MOV byte ptr [RBP + -0x2d],DL MOV byte ptr [RBP + -0x2c],AH MOV AL,byte ptr [RSI + 0x1b] MOV byte ptr [RBP + -0x2b],AL MOVZX EAX,word ptr [RSI + 0x12] ROL AX,0x8 MOV word ptr [RBP + -0x2a],AX MOVZX EAX,word ptr [RSI + 0x14] ROL AX,0x8 MOV word ptr [RBP + -0x28],AX MOV EAX,dword ptr [RSI + 0x8] BSWAP EAX MOV dword ptr [RBP + -0x26],EAX TEST CL,CL JZ 0x00180411 MOV EAX,dword ptr [RSI + 0xc] JMP 0x00180415 LAB_00180411: MOVZX EAX,word ptr [RSI + 0x10] LAB_00180415: BSWAP EAX MOV dword ptr [RBP + -0x22],EAX LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x80] MOV ESI,EBX MOV EDX,0x7 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00180474 LEA RSI,[RBP + -0x30] MOV EDX,0x12 MOV ECX,0x4 MOV EDI,EBX CALL 0x0012efe4 MOV RCX,RAX LAB_00180452: XOR EAX,EAX TEST RCX,RCX SETNZ CL MOV RDX,qword ptr FS:[0x28] CMP RDX,qword ptr [RBP + -0x18] JNZ 0x0018048e MOV AL,CL ADD RSP,0x70 POP RBX POP R14 POP RBP RET LAB_00180474: LEA RDX,[RBP + -0x30] LEA R14,[RBP + -0x38] MOV RDI,RAX MOV ESI,EBX MOV RCX,R14 CALL 0x0012e263 MOV RCX,qword ptr [R14] JMP 0x00180452 LAB_0018048e: CALL 0x00129250
bool mi_keyseg_write(int4 param_1,long param_2) { uint uVar1; long lVar2; long in_FS_OFFSET; int1 local_88 [72]; long local_40; int1 local_38; int1 local_37; char local_36; int1 local_35; int1 local_34; int1 local_33; ushort local_32; ushort local_30; uint local_2e; uint local_2a; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); local_38 = *(int1 *)(param_2 + 0x18); local_37 = (int1)*(int2 *)(param_2 + 0x16); local_36 = *(char *)(param_2 + 0x19); local_35 = *(int1 *)(param_2 + 0x1a); local_34 = (int1)((ushort)*(int2 *)(param_2 + 0x16) >> 8); local_33 = *(int1 *)(param_2 + 0x1b); local_32 = *(ushort *)(param_2 + 0x12) << 8 | *(ushort *)(param_2 + 0x12) >> 8; local_30 = *(ushort *)(param_2 + 0x14) << 8 | *(ushort *)(param_2 + 0x14) >> 8; uVar1 = *(uint *)(param_2 + 8); local_2e = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18; if (local_36 == '\0') { uVar1 = (uint)*(ushort *)(param_2 + 0x10); } else { uVar1 = *(uint *)(param_2 + 0xc); } local_2a = uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18; lVar2 = (**(code **)(PSI_server + 0x158))(local_88,param_1,7); if (lVar2 == 0) { local_40 = my_write(param_1,&local_38,0x12,4); } else { mi_keyseg_write_cold_1(lVar2,param_1,&local_38,&local_40); } if (*(long *)(in_FS_OFFSET + 0x28) == local_20) { return local_40 != 0; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
55,259
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::vector<char, std::allocator<char>>>>>::next_byte_in_range(std::initializer_list<int>)
monkey531[P]llama/common/./json.hpp
bool next_byte_in_range(std::initializer_list<char_int_type> ranges) { JSON_ASSERT(ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6); add(current); for (auto range = ranges.begin(); range != ranges.end(); ++range) { get(); if (JSON_HEDLEY_LIKELY(*range <= current && current <= *(++range))) // NOLINT(bugprone-inc-dec-in-conditions) { add(current); } else { error_message = "invalid string: ill-formed UTF-8 byte"; return false; } } return true; }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::vector<char, std::allocator<char>>>>>::next_byte_in_range(std::initializer_list<int>): subq $0x48, %rsp movq %rsi, 0x30(%rsp) movq %rdx, 0x38(%rsp) movq %rdi, 0x28(%rsp) movq 0x28(%rsp), %rdi movq %rdi, 0x18(%rsp) movl 0x14(%rdi), %esi callq 0x24c320 leaq 0x30(%rsp), %rdi callq 0x146860 movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x10(%rsp) leaq 0x30(%rsp), %rdi callq 0x146870 movq %rax, %rcx movq 0x10(%rsp), %rax cmpq %rcx, %rax je 0x24c5a6 movq 0x18(%rsp), %rdi callq 0x24c080 movq 0x18(%rsp), %rdx movq 0x20(%rsp), %rax movl (%rax), %ecx xorl %eax, %eax cmpl 0x14(%rdx), %ecx movb %al, 0xf(%rsp) jg 0x24c55d movq 0x18(%rsp), %rax movl 0x14(%rax), %eax movq 0x20(%rsp), %rcx movq %rcx, %rdx addq $0x4, %rdx movq %rdx, 0x20(%rsp) cmpl 0x4(%rcx), %eax setle %al movb %al, 0xf(%rsp) movb 0xf(%rsp), %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0x24c56b jmp 0x24c57a movq 0x18(%rsp), %rdi movl 0x14(%rdi), %esi callq 0x24c320 jmp 0x24c591 movq 0x18(%rsp), %rax leaq 0x97c01(%rip), %rcx # 0x2e4187 movq %rcx, 0x70(%rax) movb $0x0, 0x47(%rsp) jmp 0x24c5ab jmp 0x24c593 movq 0x20(%rsp), %rax addq $0x4, %rax movq %rax, 0x20(%rsp) jmp 0x24c4f4 movb $0x1, 0x47(%rsp) movb 0x47(%rsp), %al andb $0x1, %al addq $0x48, %rsp retq nopw %cs:(%rax,%rax)
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS5_IcSA_EEEEEE18next_byte_in_rangeESt16initializer_listIiE: sub rsp, 48h mov [rsp+48h+var_18], rsi mov [rsp+48h+var_10], rdx mov [rsp+48h+var_20], rdi mov rdi, [rsp+48h+var_20] mov [rsp+48h+var_30], rdi mov esi, [rdi+14h] call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS5_IcSA_EEEEEE3addEi; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::vector<char>>>>::add(int) lea rdi, [rsp+48h+var_18] call _ZNKSt16initializer_listIiE5beginEv; std::initializer_list<int>::begin(void) mov [rsp+48h+var_28], rax loc_24C4F4: mov rax, [rsp+48h+var_28] mov [rsp+48h+var_38], rax lea rdi, [rsp+48h+var_18] call _ZNKSt16initializer_listIiE3endEv; std::initializer_list<int>::end(void) mov rcx, rax mov rax, [rsp+48h+var_38] cmp rax, rcx jz loc_24C5A6 mov rdi, [rsp+48h+var_30] call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS5_IcSA_EEEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::vector<char>>>>::get(void) mov rdx, [rsp+48h+var_30] mov rax, [rsp+48h+var_28] mov ecx, [rax] xor eax, eax cmp ecx, [rdx+14h] mov [rsp+48h+var_39], al jg short loc_24C55D mov rax, [rsp+48h+var_30] mov eax, [rax+14h] mov rcx, [rsp+48h+var_28] mov rdx, rcx add rdx, 4 mov [rsp+48h+var_28], rdx cmp eax, [rcx+4] setle al mov [rsp+48h+var_39], al loc_24C55D: mov al, [rsp+48h+var_39] xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_24C56B jmp short loc_24C57A loc_24C56B: mov rdi, [rsp+48h+var_30] mov esi, [rdi+14h] call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS5_IcSA_EEEEEE3addEi; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::vector<char>>>>::add(int) jmp short loc_24C591 loc_24C57A: mov rax, [rsp+48h+var_30] lea rcx, aInvalidStringI; "invalid string: ill-formed UTF-8 byte" mov [rax+70h], rcx mov [rsp+48h+var_1], 0 jmp short loc_24C5AB loc_24C591: jmp short $+2 loc_24C593: mov rax, [rsp+48h+var_28] add rax, 4 mov [rsp+48h+var_28], rax jmp loc_24C4F4 loc_24C5A6: mov [rsp+48h+var_1], 1 loc_24C5AB: mov al, [rsp+48h+var_1] and al, 1 add rsp, 48h retn
char nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::vector<char>>>>::next_byte_in_range( long long a1, long long a2, long long a3) { _DWORD *v3; // rcx bool v5; // [rsp+Fh] [rbp-39h] _DWORD *i; // [rsp+20h] [rbp-28h] _QWORD v7[2]; // [rsp+30h] [rbp-18h] BYREF v7[0] = a2; v7[1] = a3; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::vector<char>>>>::add( a1, *(_DWORD *)(a1 + 20)); for ( i = (_DWORD *)std::initializer_list<int>::begin((long long)v7); i != (_DWORD *)std::initializer_list<int>::end((long long)v7); ++i ) { nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::vector<char>>>>::get(a1); v5 = 0; if ( *i <= *(_DWORD *)(a1 + 20) ) { v3 = i++; v5 = *(_DWORD *)(a1 + 20) <= v3[1]; } if ( !v5 ) { *(_QWORD *)(a1 + 112) = "invalid string: ill-formed UTF-8 byte"; return 0; } nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::vector<char>>>>::add( a1, *(_DWORD *)(a1 + 20)); } return 1; }
_M_ptr: PUSH RAX MOV qword ptr [RSP],RDI MOV RDI,qword ptr [RSP] CALL 0x0024c4d0 POP RCX RET
/* std::__uniq_ptr_impl<std::__cxx11::string, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::create<std::__cxx11::string, char const (&) [43]>(char const (&) [43])::{lambda(std::__cxx11::string*)#1}>::_M_ptr() */ void __thiscall std:: __uniq_ptr_impl<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>::create<std::__cxx11::string,char_const(&)[43]>(char_const(&)[43])::{lambda(std::__cxx11::string*)#1}> ::_M_ptr(__uniq_ptr_impl<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>::create<std::__cxx11::string,char_const(&)[43]>(char_const(&)[43])::_lambda(std::__cxx11::string*)_1_> *this) { get<0ul,std::__cxx11::string*,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>::create<std::__cxx11::string,char_const(&)[43]>(char_const(&)[43])::_lambda(std::__cxx11::string*)_1_> ((tuple *)this); return; }
55,260
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::vector<char, std::allocator<char>>>>>::next_byte_in_range(std::initializer_list<int>)
monkey531[P]llama/common/./json.hpp
bool next_byte_in_range(std::initializer_list<char_int_type> ranges) { JSON_ASSERT(ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6); add(current); for (auto range = ranges.begin(); range != ranges.end(); ++range) { get(); if (JSON_HEDLEY_LIKELY(*range <= current && current <= *(++range))) // NOLINT(bugprone-inc-dec-in-conditions) { add(current); } else { error_message = "invalid string: ill-formed UTF-8 byte"; return false; } } return true; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::vector<char, std::allocator<char>>>>>::next_byte_in_range(std::initializer_list<int>): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax cmpq $0x6, %rdx ja 0x6ef0a movq %rdx, %rbx pushq $0x54 popq %rax btq %rdx, %rax jae 0x6ef0a movq %rsi, %r15 movq %rdi, %r14 movsbl 0x14(%rdi), %esi leaq 0x50(%rdi), %r12 movq %r12, %rdi callq 0x28950 shlq $0x2, %rbx testq %rbx, %rbx je 0x6eef8 movq %r14, %rdi callq 0x6ecac movl 0x14(%r14), %eax cmpl %eax, (%r15) jg 0x6eeed cmpl 0x4(%r15), %eax jg 0x6eeed movsbl %al, %esi movq %r12, %rdi callq 0x28950 addq $0x8, %r15 addq $-0x8, %rbx jmp 0x6eebc leaq 0x86206(%rip), %rax # 0xf50fa movq %rax, 0x70(%r14) testq %rbx, %rbx sete %al addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq leaq 0x82e05(%rip), %rdi # 0xf1d16 leaq 0x82e4a(%rip), %rdx # 0xf1d62 leaq 0x8623b(%rip), %rcx # 0xf515a movl $0x1da8, %esi # imm = 0x1DA8 xorl %eax, %eax callq 0x292a0 nop
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE18next_byte_in_rangeESt16initializer_listIiE: push r15 push r14 push r12 push rbx push rax cmp rdx, 6 ja short loc_6EF0A mov rbx, rdx push 54h ; 'T' pop rax bt rax, rdx jnb short loc_6EF0A mov r15, rsi mov r14, rdi movsx esi, byte ptr [rdi+14h] lea r12, [rdi+50h] mov rdi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) shl rbx, 2 loc_6EEBC: test rbx, rbx jz short loc_6EEF8 mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) mov eax, [r14+14h] cmp [r15], eax jg short loc_6EEED cmp eax, [r15+4] jg short loc_6EEED movsx esi, al mov rdi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) add r15, 8 add rbx, 0FFFFFFFFFFFFFFF8h jmp short loc_6EEBC loc_6EEED: lea rax, aInvalidStringI; "invalid string: ill-formed UTF-8 byte" mov [r14+70h], rax loc_6EEF8: test rbx, rbx setz al add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn loc_6EF0A: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRangesSize2Ran; "ranges.size() == 2 || ranges.size() == "... mov esi, 1DA8h xor eax, eax call _ggml_abort nop
char nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::next_byte_in_range( __m128i *a1, __int32 *a2, unsigned long long a3) { long long v4; // rax long long i; // rbx __int32 v7; // eax long long v9; // rdx long long v10; // rcx if ( a3 <= 6 && (v4 = 84LL, _bittest64(&v4, a3)) ) { std::string::push_back(&a1[5], (unsigned int)a1[1].m128i_i8[4]); for ( i = 4 * a3; i; i -= 8LL ) { nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1); v7 = a1[1].m128i_i32[1]; if ( *a2 > v7 || v7 > a2[1] ) { a1[7].m128i_i64[0] = (long long)"invalid string: ill-formed UTF-8 byte"; return i == 0; } std::string::push_back(&a1[5], (unsigned int)(char)v7); a2 += 2; } return i == 0; } else { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 7592LL, "GGML_ASSERT(%s) failed", "ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6"); return nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::json_sax_dom_callback_parser( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 7592LL, v9, v10); } }
next_byte_in_range: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX CMP RDX,0x6 JA 0x0016ef0a MOV RBX,RDX PUSH 0x54 POP RAX BT RAX,RDX JNC 0x0016ef0a MOV R15,RSI MOV R14,RDI MOVSX ESI,byte ptr [RDI + 0x14] LEA R12,[RDI + 0x50] MOV RDI,R12 CALL 0x00128950 SHL RBX,0x2 LAB_0016eebc: TEST RBX,RBX JZ 0x0016eef8 MOV RDI,R14 CALL 0x0016ecac MOV EAX,dword ptr [R14 + 0x14] CMP dword ptr [R15],EAX JG 0x0016eeed CMP EAX,dword ptr [R15 + 0x4] JG 0x0016eeed MOVSX ESI,AL MOV RDI,R12 CALL 0x00128950 ADD R15,0x8 ADD RBX,-0x8 JMP 0x0016eebc LAB_0016eeed: LEA RAX,[0x1f50fa] MOV qword ptr [R14 + 0x70],RAX LAB_0016eef8: TEST RBX,RBX SETZ AL ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET LAB_0016ef0a: LEA RDI,[0x1f1d16] LEA RDX,[0x1f1d62] LEA RCX,[0x1f515a] MOV ESI,0x1da8 XOR EAX,EAX CALL 0x001292a0
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::next_byte_in_range(std::initializer_list<int>) */ bool nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::next_byte_in_range (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *param_1,int *param_2,ulong param_3) { long lVar1; char cVar2; if ((6 < param_3) || ((0x54UL >> (param_3 & 0x3f) & 1) == 0)) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",0x1da8, "GGML_ASSERT(%s) failed", "ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6"); } cVar2 = (char)param_1 + 'P'; std::__cxx11::string::push_back(cVar2); lVar1 = param_3 << 2; do { if (lVar1 == 0) { LAB_0016eef8: return lVar1 == 0; } get(param_1); if ((*(int *)(param_1 + 0x14) < *param_2) || (param_2[1] < *(int *)(param_1 + 0x14))) { *(char **)(param_1 + 0x70) = "invalid string: ill-formed UTF-8 byte"; goto LAB_0016eef8; } std::__cxx11::string::push_back(cVar2); param_2 = param_2 + 2; lVar1 = lVar1 + -8; } while( true ); }
55,261
my_freopen
eloqsql/mysys/my_fopen.c
FILE *my_freopen(const char *path, const char *mode, FILE *stream) { FILE *result; #if defined(_WIN32) result= my_win_freopen(path, mode, stream); #else result= freopen(path, mode, stream); #endif return result; }
O0
c
my_freopen: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x2a590 movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_freopen: push rbp mov rbp, rsp sub rsp, 20h 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] mov rdx, [rbp+var_18] call _freopen64 mov [rbp+var_20], rax mov rax, [rbp+var_20] add rsp, 20h pop rbp retn
long long my_freopen(long long a1, long long a2, long long a3) { return freopen64(a1, a2, a3); }
my_freopen: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] CALL 0x0012a590 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RSP,0x20 POP RBP RET
FILE * my_freopen(char *param_1,char *param_2,FILE *param_3) { FILE *pFVar1; pFVar1 = freopen64(param_1,param_2,param_3); return pFVar1; }
55,262
player_target::render()
untodesu[P]voxelius/game/client/player_target.cc
void player_target::render(void) { if((player_target::voxel != NULL_VOXEL_ID) && !client_game::hide_hud) { auto cpos = coord::to_chunk(player_target::coord); auto fpos = coord::to_local(player_target::coord); outline::prepare(); outline::cube(cpos, glm::fvec3(fpos), glm::fvec3(1.0f), 2.0f, glm::fvec4(0.0f, 0.0f, 0.0f, 1.0f)); } }
O1
cpp
player_target::render(): cmpw $0x0, 0x201a0b(%rip) # 0x25f44a je 0x5db18 leaq 0x20033c(%rip), %rax # 0x25dd88 cmpb $0x0, (%rax) jne 0x5db18 pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x38, %rsp movq 0x2019e9(%rip), %r15 # 0x25f450 movq %r15, %rax shrq $0x4, %rax movq 0x2019e3(%rip), %r12 # 0x25f458 movq 0x2019e4(%rip), %r14 # 0x25f460 movq %r14, %rcx shrq $0x4, %rcx movq %r12, %rdx andq $-0x10, %rdx shlq $0x1c, %rdx movl %eax, %eax orq %rdx, %rax movq %rsp, %rbx movq %rax, (%rbx) movl %ecx, 0x8(%rbx) callq 0x58aba andl $0xf, %r15d cvtsi2ss %r15d, %xmm0 leaq 0x1c(%rsp), %rsi movss %xmm0, (%rsi) andl $0xf, %r12d xorps %xmm0, %xmm0 cvtsi2ss %r12d, %xmm0 movss %xmm0, 0x4(%rsi) andl $0xf, %r14d xorps %xmm0, %xmm0 cvtsi2ss %r14d, %xmm0 movss %xmm0, 0x8(%rsi) movabsq $0x3f8000003f800000, %rax # imm = 0x3F8000003F800000 leaq 0x10(%rsp), %rdx movq %rax, (%rdx) movl $0x3f800000, 0x8(%rdx) # imm = 0x3F800000 movaps 0x13e81b(%rip), %xmm0 # 0x19c310 leaq 0x28(%rsp), %rcx movups %xmm0, (%rcx) movss 0x13e53b(%rip), %xmm0 # 0x19c040 movq %rbx, %rdi callq 0x58bb5 addq $0x38, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq nopl (%rax)
_ZN13player_target6renderEv: cmp cs:_ZN13player_target5voxelE, 0; player_target::voxel jz locret_5DB18 lea rax, _ZN11client_game8hide_hudE; client_game::hide_hud cmp byte ptr [rax], 0 jnz locret_5DB18 push r15 push r14 push r12 push rbx sub rsp, 38h mov r15, qword ptr cs:_ZN13player_target5coordE; player_target::coord mov rax, r15 shr rax, 4 mov r12, qword ptr cs:_ZN13player_target5coordE+8; player_target::coord mov r14, cs:qword_25F460 mov rcx, r14 shr rcx, 4 mov rdx, r12 and rdx, 0FFFFFFFFFFFFFFF0h shl rdx, 1Ch mov eax, eax or rax, rdx mov rbx, rsp mov [rbx], rax mov [rbx+8], ecx call _ZN7outline7prepareEv; outline::prepare(void) and r15d, 0Fh cvtsi2ss xmm0, r15d lea rsi, [rsp+58h+var_3C] movss dword ptr [rsi], xmm0 and r12d, 0Fh xorps xmm0, xmm0 cvtsi2ss xmm0, r12d movss dword ptr [rsi+4], xmm0 and r14d, 0Fh xorps xmm0, xmm0 cvtsi2ss xmm0, r14d movss dword ptr [rsi+8], xmm0 mov rax, 3F8000003F800000h lea rdx, [rsp+58h+var_48] mov [rdx], rax mov dword ptr [rdx+8], 3F800000h movaps xmm0, cs:xmmword_19C310 lea rcx, [rsp+58h+var_30] movups xmmword ptr [rcx], xmm0 movss xmm0, cs:flt_19C040 mov rdi, rbx call _ZN7outline4cubeERKN3glm3vecILi3EiLNS0_9qualifierE0EEERKNS1_ILi3EfLS2_0EEES8_fRKNS1_ILi4EfLS2_0EEE; outline::cube(glm::vec<3,int,(glm::qualifier)0> const&,glm::vec<3,float,(glm::qualifier)0> const&,glm::vec<3,float,(glm::qualifier)0> const&,float,glm::vec<4,float,(glm::qualifier)0> const&) add rsp, 38h pop rbx pop r12 pop r14 pop r15 locret_5DB18: retn
char * player_target::render(player_target *this, double a2, __m128 a3) { char *result; // rax __int128 v4; // kr00_16 char v5; // r14 unsigned long long v6; // [rsp-10h] [rbp-58h] BYREF int v7; // [rsp-8h] [rbp-50h] long long v8; // [rsp+0h] [rbp-48h] BYREF int v9; // [rsp+8h] [rbp-40h] float v10[3]; // [rsp+Ch] [rbp-3Ch] BYREF __int128 v11[3]; // [rsp+18h] [rbp-30h] BYREF if ( player_target::voxel ) { result = &client_game::hide_hud; if ( !client_game::hide_hud ) { v4 = player_target::coord; v5 = qword_25F460; v6 = ((*((_QWORD *)&player_target::coord + 1) & 0xFFFFFFFFFFFFFFF0LL) << 28) | (unsigned int)((unsigned long long)player_target::coord >> 4); v7 = (unsigned long long)qword_25F460 >> 4; outline::prepare(this); v10[0] = (float)(v4 & 0xF); v10[1] = (float)(BYTE8(v4) & 0xF); v10[2] = (float)(v5 & 0xF); v8 = 0x3F8000003F800000LL; v9 = 1065353216; v11[0] = xmmword_19C310; return (char *)outline::cube(&v6, v10, (long long)&v8, (long long)v11, 2.0, a3); } } return result; }
render: CMP word ptr [0x0035f44a],0x0 JZ 0x0015db18 LEA RAX,[0x35dd88] CMP byte ptr [RAX],0x0 JNZ 0x0015db18 PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R15,qword ptr [0x0035f450] MOV RAX,R15 SHR RAX,0x4 MOV R12,qword ptr [0x0035f458] MOV R14,qword ptr [0x0035f460] MOV RCX,R14 SHR RCX,0x4 MOV RDX,R12 AND RDX,-0x10 SHL RDX,0x1c MOV EAX,EAX OR RAX,RDX MOV RBX,RSP MOV qword ptr [RBX],RAX MOV dword ptr [RBX + 0x8],ECX CALL 0x00158aba AND R15D,0xf CVTSI2SS XMM0,R15D LEA RSI,[RSP + 0x1c] MOVSS dword ptr [RSI],XMM0 AND R12D,0xf XORPS XMM0,XMM0 CVTSI2SS XMM0,R12D MOVSS dword ptr [RSI + 0x4],XMM0 AND R14D,0xf XORPS XMM0,XMM0 CVTSI2SS XMM0,R14D MOVSS dword ptr [RSI + 0x8],XMM0 MOV RAX,0x3f8000003f800000 LEA RDX,[RSP + 0x10] MOV qword ptr [RDX],RAX MOV dword ptr [RDX + 0x8],0x3f800000 MOVAPS XMM0,xmmword ptr [0x0029c310] LEA RCX,[RSP + 0x28] MOVUPS xmmword ptr [RCX],XMM0 MOVSS XMM0,dword ptr [0x0029c040] MOV RDI,RBX CALL 0x00158bb5 ADD RSP,0x38 POP RBX POP R12 POP R14 POP R15 LAB_0015db18: RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* player_target::render() */ void player_target::render(void) { ulong uVar1; ulong uVar2; ulong uVar3; ulong local_58; int4 local_50; int8 local_48; int4 local_40; float local_3c; float local_38; float local_34; int8 local_30; int8 uStack_28; uVar3 = DAT_0035f460; uVar2 = DAT_0035f458; uVar1 = coord; if ((voxel != 0) && (client_game::hide_hud == '\0')) { local_58 = coord >> 4 & 0xffffffff | (DAT_0035f458 & 0xfffffffffffffff0) << 0x1c; local_50 = (int4)(DAT_0035f460 >> 4); outline::prepare(); local_3c = (float)((uint)uVar1 & 0xf); local_38 = (float)((uint)uVar2 & 0xf); local_34 = (float)((uint)uVar3 & 0xf); local_48 = 0x3f8000003f800000; local_40 = 0x3f800000; local_30 = _DAT_0029c310; uStack_28 = _UNK_0029c318; outline::cube((vec *)&local_58,(vec *)&local_3c,(vec *)&local_48,DAT_0029c040,(vec *)&local_30); } return; }
55,263
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char>(char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char&&)
monkey531[P]llama/common/json.hpp
inline OutStringType concat(Args && ... args) { OutStringType str; str.reserve(concat_length(args...)); concat_into(str, std::forward<Args>(args)...); return str; }
O1
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char>(char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char&&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x10(%rdi), %r13 movq %r13, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi callq 0x1b3d0 movq %rax, %r12 movq (%r14), %rdi callq 0x1b3d0 addq %rax, %r12 movq %rbx, %rdi movq %r12, %rsi callq 0x1bd80 movq %rbx, %rdi movq %r15, %rsi callq 0x1c110 movq (%r14), %rsi movq %rbx, %rdi callq 0x1c110 movq %rbx, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r14 movq (%rbx), %rdi cmpq %r13, %rdi je 0xad17d movq (%r13), %rsi incq %rsi callq 0x1b8e0 movq %r14, %rdi callq 0x1bfb0 nop
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA26_KcPS9_EEET_DpOT0_: push r15 push r14 push r13 push r12 push rbx mov r14, rdx mov r15, rsi mov rbx, rdi lea r13, [rdi+10h] mov [rdi], r13 mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, rsi call _strlen mov r12, rax mov rdi, [r14] call _strlen add r12, rax mov rdi, rbx mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r14] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rax, rbx pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r14, rax mov rdi, [rbx]; void * cmp rdi, r13 jz short loc_AD17D mov rsi, [r13+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_AD17D: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[26],char const*>( long long a1, long long a2, _QWORD *a3) { long long v4; // r12 long long v5; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v4 = strlen(a2); v5 = strlen(*a3); std::string::reserve(a1, v5 + v4); std::string::append(a1, a2); std::string::append(a1, *a3); return a1; }
concat<std::__cxx11::string,char_const(&)[26],char_const*>: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA R13,[RDI + 0x10] MOV qword ptr [RDI],R13 MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RDI,RSI CALL 0x0011b3d0 MOV R12,RAX MOV RDI,qword ptr [R14] CALL 0x0011b3d0 ADD R12,RAX LAB_001ad138: MOV RDI,RBX MOV RSI,R12 CALL 0x0011bd80 MOV RDI,RBX MOV RSI,R15 CALL 0x0011c110 MOV RSI,qword ptr [R14] MOV RDI,RBX CALL 0x0011c110 LAB_001ad159: MOV RAX,RBX POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const (&) [26], char const*>(char const (&) [26], char const*&&) */ detail * __thiscall nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[26],char_const*> (detail *this,char *param_1,char **param_2) { *(detail **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (detail)0x0; strlen(param_1); strlen(*param_2); /* try { // try from 001ad138 to 001ad158 has its CatchHandler @ 001ad166 */ std::__cxx11::string::reserve((ulong)this); std::__cxx11::string::append((char *)this); std::__cxx11::string::append((char *)this); return this; }
55,264
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char>(char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char&&)
monkey531[P]llama/common/json.hpp
inline OutStringType concat(Args && ... args) { OutStringType str; str.reserve(concat_length(args...)); concat_into(str, std::forward<Args>(args)...); return str; }
O2
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char>(char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char&&): pushq %r15 pushq %r14 pushq %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rdi) andq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi movq %rdx, %rsi callq 0x4420b movq %rbx, %rdi movq %rax, %rsi callq 0x23d90 movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x7eea7 movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq %rbx, %rdi callq 0x241f8 movq %r14, %rdi callq 0x23fb0
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA51_KcPS9_EEET_DpOT0_: push r15 push r14 push rbx mov r14, rdx mov r15, rsi mov rbx, rdi lea rax, [rdi+10h] mov [rdi], rax and qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, rsi mov rsi, rdx call _ZN8nlohmann16json_abi_v3_11_36detail13concat_lengthIJPKcEEEmS4_DpRKT_; nlohmann::json_abi_v3_11_3::detail::concat_length<char const*>(char const*,char const* const&) mov rdi, rbx mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rdi, rbx mov rsi, r15 mov rdx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA51_KcJPS9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSE_OSF_DpOT1_ mov rax, rbx pop rbx pop r14 pop r15 retn mov r14, rax mov rdi, rbx; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>( long long a1, long long a2, _QWORD *a3) { long long v4; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v4 = nlohmann::json_abi_v3_11_3::detail::concat_length<char const*>(a2, a3); std::string::reserve(a1, v4); ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA51_KcJPS9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSE_OSF_DpOT1_( a1, a2, a3); return a1; }
concat<std::__cxx11::string,char_const(&)[51],char_const*>: PUSH R15 PUSH R14 PUSH RBX MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX AND qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RDI,RSI MOV RSI,RDX CALL 0x0014420b LAB_0017ee72: MOV RDI,RBX MOV RSI,RAX CALL 0x00123d90 MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x0017eea7 LAB_0017ee8b: MOV RAX,RBX POP RBX POP R14 POP R15 RET
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const (&) [51], char const*>(char const (&) [51], char const*&&) */ detail * __thiscall nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[51],char_const*> (detail *this,char *param_1,char **param_2) { *(detail **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (detail)0x0; concat_length<char_const*>(param_1,param_2); /* try { // try from 0017ee72 to 0017ee8a has its CatchHandler @ 0017ee94 */ std::__cxx11::string::reserve((ulong)this); _ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA51_KcJPS9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSE_OSF_DpOT1_ (this,param_1,param_2); return this; }
55,265
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char>(char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char&&)
monkey531[P]llama/common/json.hpp
inline OutStringType concat(Args && ... args) { OutStringType str; str.reserve(concat_length(args...)); concat_into(str, std::forward<Args>(args)...); return str; }
O3
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char>(char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char&&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x10(%rdi), %r12 movq %r12, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi callq 0x1a3d0 addq 0x8(%r14), %rax movq %rbx, %rdi movq %rax, %rsi callq 0x1ad80 movq %rbx, %rdi movq %r15, %rsi callq 0x1b110 movq (%r14), %rsi movq 0x8(%r14), %rdx movq %rbx, %rdi callq 0x1a250 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %r14 movq (%rbx), %rdi cmpq %r12, %rdi je 0xb7e0b movq (%r12), %rsi incq %rsi callq 0x1a8e0 movq %r14, %rdi callq 0x1afb0
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA39_KcS8_EEET_DpOT0_: push r15 push r14 push r12 push rbx push rax mov r14, rdx mov r15, rsi mov rbx, rdi lea r12, [rdi+10h] mov [rdi], r12 mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, rsi call _strlen add rax, [r14+8] mov rdi, rbx mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r14] mov rdx, [r14+8] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rax, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn mov r14, rax mov rdi, [rbx]; void * cmp rdi, r12 jz short loc_B7E0B mov rsi, [r12] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B7E0B: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[39],std::string>( long long a1, long long a2, _QWORD *a3) { long long v4; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v4 = strlen(a2); std::string::reserve(a1, a3[1] + v4); std::string::append(a1, a2); std::string::_M_append(a1, *a3, a3[1]); return a1; }
concat<std::__cxx11::string,char_const(&)[39],std::__cxx11::string>: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA R12,[RDI + 0x10] MOV qword ptr [RDI],R12 MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RDI,RSI CALL 0x0011a3d0 ADD RAX,qword ptr [R14 + 0x8] LAB_001b7dc0: MOV RDI,RBX MOV RSI,RAX CALL 0x0011ad80 MOV RDI,RBX MOV RSI,R15 CALL 0x0011b110 MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] MOV RDI,RBX CALL 0x0011a250 LAB_001b7de5: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const (&) [39], std::__cxx11::string >(char const (&) [39], std::__cxx11::string&&) */ detail * __thiscall nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[39],std::__cxx11::string> (detail *this,char *param_1,string *param_2) { *(detail **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (detail)0x0; strlen(param_1); /* try { // try from 001b7dc0 to 001b7de4 has its CatchHandler @ 001b7df4 */ std::__cxx11::string::reserve((ulong)this); std::__cxx11::string::append((char *)this); std::__cxx11::string::_M_append((char *)this,*(ulong *)param_2); return this; }
55,266
mlog_get
navaro[P]qoraal-tictactoe/build_O3/_deps/qoraal-src/src/common/mlog.c
QORAAL_LOG_MSG_T* mlog_get (MLOG_TYPE_T log, uint16_t idx) { if (!_memlog_started) return 0 ; QORAAL_LOG_MSG_T * logmsg = 0 ; CBUFFER_QUEUE_T * queue ; queue = get_cqueue (log) ; if (queue) { os_mutex_lock (&_mlog_mutex) ; CBUFFER_ITEM_T* it = cqueue_front (queue) ; while (idx-- && it) { it = cqueue_backwards (queue, it) ; } if (it) { logmsg = (QORAAL_LOG_MSG_T*)it->data ; } os_mutex_unlock (&_mlog_mutex) ; } return logmsg ; }
O3
c
mlog_get: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx cmpb $0x1, 0x26c9e(%rip) # 0x412d0 jne 0x1a6a7 movl %edi, %eax leaq 0x26ca3(%rip), %rcx # 0x412e0 movq (%rcx,%rax,8), %r14 testq %r14, %r14 je 0x1a6a7 movl %esi, %ebx leaq 0x245a9(%rip), %rdi # 0x3ebf8 callq 0x14ff0 movq %r14, %rdi callq 0x1c82b testw %bx, %bx setne %dl testq %rax, %rax setne %cl andb %cl, %dl cmpb $0x1, %dl jne 0x1a68d decl %ebx movq %r14, %rdi movq %rax, %rsi callq 0x1c876 testq %rax, %rax setne %cl addw $-0x1, %bx jae 0x1a68d testq %rax, %rax jne 0x1a671 addq $0x14, %rax xorl %ebx, %ebx testb %cl, %cl cmovneq %rax, %rbx leaq 0x24558(%rip), %rdi # 0x3ebf8 callq 0x15015 jmp 0x1a6a9 xorl %ebx, %ebx movq %rbx, %rax popq %rbx popq %r14 popq %rbp retq
mlog_get: push rbp mov rbp, rsp push r14 push rbx cmp cs:_memlog_started, 1 jnz short loc_1A6A7 mov eax, edi lea rcx, _mlog_inst mov r14, [rcx+rax*8] test r14, r14 jz short loc_1A6A7 mov ebx, esi lea rdi, _mlog_mutex call os_mutex_lock mov rdi, r14 call cqueue_front test bx, bx setnz dl test rax, rax setnz cl and dl, cl cmp dl, 1 jnz short loc_1A68D dec ebx loc_1A671: mov rdi, r14 mov rsi, rax call cqueue_backwards test rax, rax setnz cl add bx, 0FFFFh jnb short loc_1A68D test rax, rax jnz short loc_1A671 loc_1A68D: add rax, 14h xor ebx, ebx test cl, cl cmovnz rbx, rax lea rdi, _mlog_mutex call os_mutex_unlock jmp short loc_1A6A9 loc_1A6A7: xor ebx, ebx loc_1A6A9: mov rax, rbx pop rbx pop r14 pop rbp retn
long long mlog_get(int a1, __int16 a2) { long long v2; // r14 long long v3; // rax bool v4; // cl __int16 v5; // bx bool v6; // cf long long v7; // rax long long v8; // rbx if ( memlog_started != 1 ) return 0LL; v2 = mlog_inst[a1]; if ( !v2 ) return 0LL; os_mutex_lock((long long *)&mlog_mutex); v3 = cqueue_front(v2); v4 = v3 != 0; if ( v3 != 0 && a2 != 0 ) { v5 = a2 - 1; do { v3 = cqueue_backwards(v2, v3); v4 = v3 != 0; v6 = v5-- != 0; } while ( v6 && v3 ); } v7 = v3 + 20; v8 = 0LL; if ( v4 ) v8 = v7; os_mutex_unlock((long long *)&mlog_mutex); return v8; }
mlog_get: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX CMP byte ptr [0x001412d0],0x1 JNZ 0x0011a6a7 MOV EAX,EDI LEA RCX,[0x1412e0] MOV R14,qword ptr [RCX + RAX*0x8] TEST R14,R14 JZ 0x0011a6a7 MOV EBX,ESI LEA RDI,[0x13ebf8] CALL 0x00114ff0 MOV RDI,R14 CALL 0x0011c82b TEST BX,BX SETNZ DL TEST RAX,RAX SETNZ CL AND DL,CL CMP DL,0x1 JNZ 0x0011a68d DEC EBX LAB_0011a671: MOV RDI,R14 MOV RSI,RAX CALL 0x0011c876 TEST RAX,RAX SETNZ CL ADD BX,-0x1 JNC 0x0011a68d TEST RAX,RAX JNZ 0x0011a671 LAB_0011a68d: ADD RAX,0x14 XOR EBX,EBX TEST CL,CL CMOVNZ RBX,RAX LEA RDI,[0x13ebf8] CALL 0x00115015 JMP 0x0011a6a9 LAB_0011a6a7: XOR EBX,EBX LAB_0011a6a9: MOV RAX,RBX POP RBX POP R14 POP RBP RET
long mlog_get(ulong param_1,short param_2) { long lVar1; long lVar2; bool bVar3; bool bVar4; if ((_memlog_started != '\x01') || (lVar2 = (&_mlog_inst)[param_1 & 0xffffffff], lVar2 == 0)) { return 0; } os_mutex_lock(&_mlog_mutex); lVar1 = cqueue_front(lVar2); bVar4 = lVar1 != 0; if (param_2 != 0 && bVar4) { param_2 = param_2 + -1; do { lVar1 = cqueue_backwards(lVar2,lVar1); bVar4 = lVar1 != 0; bVar3 = param_2 == 0; param_2 = param_2 + -1; if (bVar3) break; } while (lVar1 != 0); } lVar2 = 0; if (bVar4) { lVar2 = lVar1 + 0x14; } os_mutex_unlock(&_mlog_mutex); return lVar2; }
55,267
my_snprintf_8bit
eloqsql/strings/ctype-simple.c
size_t my_snprintf_8bit(CHARSET_INFO *cs __attribute__((unused)), char* to, size_t n __attribute__((unused)), const char* fmt, ...) { va_list args; size_t result; va_start(args,fmt); result= my_vsnprintf(to, n, fmt, args); va_end(args); return result; }
O0
c
my_snprintf_8bit: pushq %rbp movq %rsp, %rbp subq $0x100, %rsp # imm = 0x100 testb %al, %al je 0x4a0de movaps %xmm0, -0xd0(%rbp) movaps %xmm1, -0xc0(%rbp) movaps %xmm2, -0xb0(%rbp) movaps %xmm3, -0xa0(%rbp) movaps %xmm4, -0x90(%rbp) movaps %xmm5, -0x80(%rbp) movaps %xmm6, -0x70(%rbp) movaps %xmm7, -0x60(%rbp) movq %r9, -0xd8(%rbp) movq %r8, -0xe0(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) leaq -0x100(%rbp), %rax movq %rax, -0x30(%rbp) leaq 0x10(%rbp), %rax movq %rax, -0x38(%rbp) movl $0x30, -0x3c(%rbp) movl $0x20, -0x40(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx leaq -0x40(%rbp), %rcx callq 0x7d2a0 movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax addq $0x100, %rsp # imm = 0x100 popq %rbp retq nopw %cs:(%rax,%rax)
my_snprintf_8bit: push rbp mov rbp, rsp sub rsp, 100h test al, al jz short loc_4A0DE movaps [rbp+var_D0], xmm0 movaps [rbp+var_C0], xmm1 movaps [rbp+var_B0], xmm2 movaps [rbp+var_A0], xmm3 movaps [rbp+var_90], xmm4 movaps [rbp+var_80], xmm5 movaps [rbp+var_70], xmm6 movaps [rbp+var_60], xmm7 loc_4A0DE: mov [rbp+var_D8], r9 mov [rbp+var_E0], r8 mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx lea rax, [rbp+var_100] mov [rbp+var_30], rax lea rax, [rbp+arg_0] mov [rbp+var_38], rax mov [rbp+var_3C], 30h ; '0' mov [rbp+var_40], 20h ; ' ' mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] lea rcx, [rbp+var_40] call my_vsnprintf mov [rbp+var_48], rax mov rax, [rbp+var_48] add rsp, 100h pop rbp retn
long long my_snprintf_8bit( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, char a15) { char v16; // [rsp+0h] [rbp-100h] BYREF long long v17; // [rsp+20h] [rbp-E0h] long long v18; // [rsp+28h] [rbp-D8h] __m128 v19; // [rsp+30h] [rbp-D0h] __m128 v20; // [rsp+40h] [rbp-C0h] __m128 v21; // [rsp+50h] [rbp-B0h] __m128 v22; // [rsp+60h] [rbp-A0h] __m128 v23; // [rsp+70h] [rbp-90h] __m128 v24; // [rsp+80h] [rbp-80h] __m128 v25; // [rsp+90h] [rbp-70h] __m128 v26; // [rsp+A0h] [rbp-60h] _DWORD v27[2]; // [rsp+C0h] [rbp-40h] BYREF char *v28; // [rsp+C8h] [rbp-38h] char *v29; // [rsp+D0h] [rbp-30h] long long v30; // [rsp+E0h] [rbp-20h] long long v31; // [rsp+E8h] [rbp-18h] long long v32; // [rsp+F0h] [rbp-10h] long long v33; // [rsp+F8h] [rbp-8h] v19 = a7; v20 = a8; v21 = a9; v22 = a10; v23 = a11; v24 = a12; v25 = a13; v26 = a14; v18 = a6; v17 = a5; v33 = a1; v32 = a2; v31 = a3; v30 = a4; v29 = &v16; v28 = &a15; v27[1] = 48; v27[0] = 32; return my_vsnprintf(a2, a3, a4, v27); }
my_snprintf_8bit: PUSH RBP MOV RBP,RSP SUB RSP,0x100 TEST AL,AL JZ 0x0014a0de MOVAPS xmmword ptr [RBP + -0xd0],XMM0 MOVAPS xmmword ptr [RBP + -0xc0],XMM1 MOVAPS xmmword ptr [RBP + -0xb0],XMM2 MOVAPS xmmword ptr [RBP + -0xa0],XMM3 MOVAPS xmmword ptr [RBP + -0x90],XMM4 MOVAPS xmmword ptr [RBP + -0x80],XMM5 MOVAPS xmmword ptr [RBP + -0x70],XMM6 MOVAPS xmmword ptr [RBP + -0x60],XMM7 LAB_0014a0de: MOV qword ptr [RBP + -0xd8],R9 MOV qword ptr [RBP + -0xe0],R8 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX LEA RAX,[RBP + -0x100] MOV qword ptr [RBP + -0x30],RAX LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x38],RAX MOV dword ptr [RBP + -0x3c],0x30 MOV dword ptr [RBP + -0x40],0x20 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] LEA RCX,[RBP + -0x40] CALL 0x0017d2a0 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] ADD RSP,0x100 POP RBP RET
int8 my_snprintf_8bit(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int8 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; int8 uVar1; int1 local_108 [32]; int8 local_e8; int8 local_e0; int8 local_d8; int8 local_c8; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int4 local_48; int4 local_44; int1 *local_40; int1 *local_38; int8 local_28; int8 local_20; int8 local_18; int8 local_10; if (in_AL != '\0') { local_d8 = param_1; local_c8 = param_2; local_b8 = param_3; local_a8 = param_4; local_98 = param_5; local_88 = param_6; local_78 = param_7; local_68 = param_8; } local_38 = local_108; local_40 = &stack0x00000008; local_44 = 0x30; local_48 = 0x20; local_e8 = param_13; local_e0 = param_14; local_28 = param_12; local_20 = param_11; local_18 = param_10; local_10 = param_9; uVar1 = my_vsnprintf(param_10,param_11,param_12,&local_48); return uVar1; }
55,268
nglog::(anonymous namespace)::LogFileObject::CreateLogfile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
ng-log[P]ng-log/src/logging.cc
bool LogFileObject::CreateLogfile(const string& time_pid_string) { string string_filename = base_filename_; if (FLAGS_timestamp_in_logfile_name) { string_filename += time_pid_string; } string_filename += filename_extension_; const char* filename = string_filename.c_str(); // only write to files, create if non-existant. int flags = O_WRONLY | O_CREAT; if (FLAGS_timestamp_in_logfile_name) { // demand that the file is unique for our timestamp (fail if it exists). flags = flags | O_EXCL; } else { // logs are written to a single file, where: a log file is created for the // the first time or a file is being recreated due to exceeding max size struct stat statbuf; if (stat(filename, &statbuf) == 0) { // truncate the file if it exceeds the max size if ((static_cast<uint32>(statbuf.st_size) >> 20U) >= MaxLogSize()) { flags |= O_TRUNC; } // update file length to sync file size file_length_ = static_cast<uint32>(statbuf.st_size); } } FileDescriptor fd{ open(filename, flags, static_cast<mode_t>(FLAGS_logfile_mode))}; if (!fd) return false; #ifdef HAVE_FCNTL // Mark the file close-on-exec. We don't really care if this fails fcntl(fd.get(), F_SETFD, FD_CLOEXEC); // Mark the file as exclusive write access to avoid two clients logging to the // same file. This applies particularly when !FLAGS_timestamp_in_logfile_name // (otherwise open would fail because the O_EXCL flag on similar filename). // locks are released on unlock or close() automatically, only after log is // released. // This will work after a fork as it is not inherited (not stored in the fd). // Lock will not be lost because the file is opened with exclusive lock // (write) and we will never read from it inside the process. // TODO: windows implementation of this (as flock is not available on // mingw). static struct flock w_lock; w_lock.l_type = F_WRLCK; w_lock.l_start = 0; w_lock.l_whence = SEEK_SET; w_lock.l_len = 0; int wlock_ret = fcntl(fd.get(), F_SETLK, &w_lock); if (wlock_ret == -1) { return false; } #endif // fdopen in append mode so if the file exists it will fseek to the end file_.reset(fdopen(fd.release(), "a")); // Make a FILE*. if (file_ == nullptr) { // Man, we're screwed! if (FLAGS_timestamp_in_logfile_name) { unlink(filename); // Erase the half-baked evidence: an unusable log file, // only if we just created it. } return false; } #ifdef NGLOG_OS_WINDOWS // https://github.com/golang/go/issues/27638 - make sure we seek to the end to // append empirically replicated with wine over mingw build if (!FLAGS_timestamp_in_logfile_name) { if (fseek(file_.get(), 0, SEEK_END) != 0) { return false; } } #endif // We try to create a symlink called <program_name>.<severity>, // which is easier to use. (Every time we create a new logfile, // we destroy the old symlink and create a new one, so it always // points to the latest logfile.) If it fails, we're sad but it's // no error. if (!symlink_basename_.empty()) { // take directory from filename const char* slash = strrchr(filename, PATH_SEPARATOR); const string linkname = symlink_basename_ + '.' + LogSeverityNames[severity_]; string linkpath; if (slash) linkpath = string( filename, static_cast<size_t>(slash - filename + 1)); // get dirname linkpath += linkname; unlink(linkpath.c_str()); // delete old one if it exists #if defined(NGLOG_OS_WINDOWS) // TODO(hamaji): Create lnk file on Windows? #elif defined(HAVE_UNISTD_H) // We must have unistd.h. // Make the symlink be relative (in the same dir) so that if the // entire log directory gets relocated the link is still valid. const char* linkdest = slash ? (slash + 1) : filename; if (symlink(linkdest, linkpath.c_str()) != 0) { // silently ignore failures } // Make an additional link to the log file in a place specified by // FLAGS_log_link, if indicated if (!FLAGS_log_link.empty()) { linkpath = FLAGS_log_link + "/" + linkname; unlink(linkpath.c_str()); // delete old one if it exists if (symlink(filename, linkpath.c_str()) != 0) { // silently ignore failures } } #endif } return true; // Everything worked }
O1
cpp
nglog::(anonymous namespace)::LogFileObject::CreateLogfile(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 $0x118, %rsp # imm = 0x118 movq %rsi, %rbx movq %rdi, %r15 leaq 0x38(%rsp), %r13 movq %r13, -0x10(%r13) movq 0x38(%rdi), %rsi movq 0x40(%rdi), %rdx addq %rsi, %rdx leaq 0x28(%rsp), %rdi callq 0x9a5a leaq 0x210b8(%rip), %r12 # 0x31a78 cmpb $0x1, (%r12) jne 0x109d8 movq (%rbx), %rsi movq 0x8(%rbx), %rdx leaq 0x28(%rsp), %rdi callq 0x7140 movq 0x78(%r15), %rsi movq 0x80(%r15), %rdx leaq 0x28(%rsp), %rdi callq 0x7140 movq 0x28(%rsp), %r14 movl $0xc1, %esi cmpb $0x0, (%r12) jne 0x10a50 leaq 0x88(%rsp), %rsi movq %r14, %rdi callq 0x7470 movl $0x41, %esi testl %eax, %eax jne 0x10a50 movl 0xb8(%rsp), %eax leaq 0x21137(%rip), %rcx # 0x31b5c movl (%rcx), %ecx movl %eax, 0xac(%r15) shrl $0x14, %eax leal -0x1(%rcx), %edx cmpl $0xfff, %edx # imm = 0xFFF movl $0x1, %edx cmovbl %ecx, %edx xorl %esi, %esi cmpl %edx, %eax setae %sil shll $0x9, %esi orl $0x41, %esi leaq 0x210ad(%rip), %rax # 0x31b04 movl (%rax), %edx movq %r14, %rdi xorl %eax, %eax callq 0x73b0 movl %eax, %ebx cmpl $-0x1, %eax je 0x10ba9 movl %ebx, %edi movl $0x2, %esi movl $0x1, %edx xorl %eax, %eax callq 0x72c0 movl $0x1, 0x30275(%rip) # 0x40d00 leaq 0x3026e(%rip), %rdx # 0x40d00 xorps %xmm0, %xmm0 movups %xmm0, 0x3026c(%rip) # 0x40d08 movl %ebx, %edi movl $0x6, %esi xorl %eax, %eax callq 0x72c0 cmpl $-0x1, %eax je 0x10ba9 leaq 0x1357f(%rip), %rsi # 0x24039 movl %ebx, %edi callq 0x7580 movq 0x98(%r15), %rdi movq %rax, 0x98(%r15) testq %rdi, %rdi je 0x10ad9 callq 0x7520 cmpq $0x0, 0x98(%r15) je 0x10b95 movq 0x60(%r15), %r13 movb $0x1, %bpl movl $0xffffffff, %ebx # imm = 0xFFFFFFFF testq %r13, %r13 je 0x10be2 movq %r14, %rdi movl $0x2f, %esi callq 0x75b0 movq %rax, %r12 leaq 0x18(%rsp), %rax movq %rax, -0x10(%rax) movq 0x58(%r15), %rsi addq %rsi, %r13 leaq 0x8(%rsp), %rdi movq %r13, %rdx callq 0x9a5a leaq 0x8(%rsp), %rdi movq 0x8(%rdi), %rsi movl $0x1, %ecx xorl %edx, %edx movl $0x2e, %r8d callq 0x7a00 movl 0xa0(%r15), %eax leaq 0x1fa1e(%rip), %rcx # 0x30570 movq (%rcx,%rax,8), %rsi leaq 0x8(%rsp), %rdi leaq 0x38(%rsp), %r13 callq 0x7a40 leaq 0x98(%rsp), %rsi movq %rsi, -0x10(%rsi) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0x10be9 movq %rdx, 0x88(%rsp) movq (%rcx), %rdx movq %rdx, 0x98(%rsp) jmp 0x10bef movl $0xffffffff, %ebx # imm = 0xFFFFFFFF cmpb $0x1, (%r12) jne 0x10ba9 movq %r14, %rdi callq 0x7210 xorl %ebp, %ebp cmpl $-0x1, %ebx je 0x10bb7 movl %ebx, %edi callq 0x7a60 movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x10bce movq 0x38(%rsp), %rsi incq %rsi callq 0x906c movl %ebp, %eax addq $0x118, %rsp # imm = 0x118 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x38(%rsp), %r13 jmp 0x10bab movups (%rcx), %xmm0 movups %xmm0, (%rsi) movq 0x8(%rax), %rdx movq %rdx, 0x90(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x10c26 movq 0x18(%rsp), %rsi incq %rsi callq 0x906c leaq 0x18(%rsp), %rax movq %rax, 0x8(%rsp) movq $0x0, 0x10(%rsp) movb $0x0, 0x18(%rsp) testq %r12, %r12 je 0x10c8a leaq 0x78(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0x1(%r12), %rdx leaq 0x68(%rsp), %rdi movq %r14, %rsi callq 0xa606 leaq 0x8(%rsp), %rdi leaq 0x68(%rsp), %r15 movq %r15, %rsi callq 0x76b0 movq (%r15), %rdi cmpq %r13, %rdi je 0x10c85 movq 0x78(%rsp), %rsi incq %rsi callq 0x906c leaq 0x38(%rsp), %r13 movq 0x88(%rsp), %rsi movq 0x90(%rsp), %rdx leaq 0x8(%rsp), %rdi callq 0x7140 movq 0x8(%rsp), %rdi callq 0x7210 leaq 0x1(%r12), %rdi testq %r12, %r12 cmoveq %r14, %rdi movq 0x8(%rsp), %rsi callq 0x7060 leaq 0x1f87d(%rip), %rax # 0x30548 movq (%rax), %rax cmpq $0x0, 0x8(%rax) je 0x10dc2 leaq 0x58(%rsp), %r12 movq %r12, -0x10(%r12) movq (%rax), %rsi movq 0x8(%rax), %rdx addq %rsi, %rdx leaq 0x48(%rsp), %rdi callq 0x9a5a leaq 0x12cfb(%rip), %rsi # 0x239f9 leaq 0x48(%rsp), %rdi callq 0x7a40 movq 0x88(%rsp), %rsi movq 0x90(%rsp), %rdx leaq 0x48(%rsp), %rdi callq 0x7140 leaq 0x78(%rsp), %r13 movq %r13, -0x10(%r13) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0x10d49 movq %rdx, 0x68(%rsp) movq (%rcx), %rdx movq %rdx, 0x78(%rsp) jmp 0x10d51 movups (%rcx), %xmm0 movups %xmm0, (%r13) movq 0x8(%rax), %rdx leaq 0x68(%rsp), %r15 movq %rdx, 0x8(%r15) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) leaq 0x8(%rsp), %rdi movq %r15, %rsi callq 0x76b0 movq (%r15), %rdi cmpq %r13, %rdi je 0x10d8f movq 0x78(%rsp), %rsi incq %rsi callq 0x906c movq 0x48(%rsp), %rdi cmpq %r12, %rdi leaq 0x38(%rsp), %r13 je 0x10dab movq 0x58(%rsp), %rsi incq %rsi callq 0x906c movq 0x8(%rsp), %rdi callq 0x7210 movq 0x8(%rsp), %rsi movq %r14, %rdi callq 0x7060 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x10dde movq 0x18(%rsp), %rsi incq %rsi callq 0x906c movq 0x88(%rsp), %rdi leaq 0x98(%rsp), %rax cmpq %rax, %rdi je 0x10bab movq 0x98(%rsp), %rsi incq %rsi callq 0x906c jmp 0x10bab jmp 0x10e0e movq %rax, %r14 movq 0x48(%rsp), %rdi cmpq %r12, %rdi je 0x10e31 movq 0x58(%rsp), %rsi incq %rsi callq 0x906c jmp 0x10e31 jmp 0x10e2e jmp 0x10e2e movq %rax, %r14 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x10e4d movq 0x18(%rsp), %rsi incq %rsi callq 0x906c movq 0x88(%rsp), %rdi leaq 0x98(%rsp), %rax cmpq %rax, %rdi je 0x10e92 movq 0x98(%rsp), %rsi jmp 0x10e85 jmp 0x10e6e movq %rax, %r14 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x10e92 movq 0x18(%rsp), %rsi incq %rsi callq 0x906c jmp 0x10e92 movq %rax, %r14 movl $0xffffffff, %ebx # imm = 0xFFFFFFFF jmp 0x10ea0 jmp 0x10eae jmp 0x10e9d movq %rax, %r14 cmpl $-0x1, %ebx je 0x10ebb movl %ebx, %edi callq 0x7a60 jmp 0x10ebb movq %rax, %rdi callq 0x98b5 jmp 0x10eb8 movq %rax, %r14 movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x10ed7 movq 0x38(%rsp), %rsi incq %rsi callq 0x906c movq %r14, %rdi callq 0x79b0 nop
_ZN5nglog12_GLOBAL__N_113LogFileObject13CreateLogfileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 118h mov rbx, rsi mov r15, rdi lea r13, [rsp+148h+var_110] mov [r13-10h], r13 mov rsi, [rdi+38h] mov rdx, [rdi+40h] add rdx, rsi lea rdi, [rsp+148h+var_120] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea r12, _ZN3fLB31FLAGS_timestamp_in_logfile_nameE; fLB::FLAGS_timestamp_in_logfile_name cmp byte ptr [r12], 1 jnz short loc_109D8 mov rsi, [rbx] mov rdx, [rbx+8] lea rdi, [rsp+148h+var_120] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) loc_109D8: mov rsi, [r15+78h] mov rdx, [r15+80h] lea rdi, [rsp+148h+var_120] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov r14, [rsp+148h+var_120] mov esi, 0C1h cmp byte ptr [r12], 0 jnz short loc_10A50 lea rsi, [rsp+148h+var_C0] mov rdi, r14 call _stat mov esi, 41h ; 'A' test eax, eax jnz short loc_10A50 mov eax, [rsp+148h+var_90] lea rcx, _ZN3fLU18FLAGS_max_log_sizeE; fLU::FLAGS_max_log_size mov ecx, [rcx] mov [r15+0ACh], eax shr eax, 14h lea edx, [rcx-1] cmp edx, 0FFFh mov edx, 1 cmovb edx, ecx xor esi, esi cmp eax, edx setnb sil shl esi, 9 or esi, 41h loc_10A50: lea rax, _ZN3fLI18FLAGS_logfile_modeE; fLI::FLAGS_logfile_mode mov edx, [rax] mov rdi, r14 xor eax, eax call _open mov ebx, eax cmp eax, 0FFFFFFFFh jz loc_10BA9 mov edi, ebx mov esi, 2 mov edx, 1 xor eax, eax call _fcntl mov cs:_ZZN5nglog12_GLOBAL__N_113LogFileObject13CreateLogfileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE6w_lock, 1; nglog::`anonymous namespace'::LogFileObject::CreateLogfile(std::string const&)::w_lock lea rdx, _ZZN5nglog12_GLOBAL__N_113LogFileObject13CreateLogfileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE6w_lock; nglog::`anonymous namespace'::LogFileObject::CreateLogfile(std::string const&)::w_lock xorps xmm0, xmm0 movups cs:xmmword_40D08, xmm0 mov edi, ebx mov esi, 6 xor eax, eax call _fcntl cmp eax, 0FFFFFFFFh jz loc_10BA9 lea rsi, aAlpha+4; "a" mov edi, ebx call _fdopen mov rdi, [r15+98h] mov [r15+98h], rax test rdi, rdi jz short loc_10AD9 call _fclose loc_10AD9: cmp qword ptr [r15+98h], 0 jz loc_10B95 mov r13, [r15+60h] mov bpl, 1 mov ebx, 0FFFFFFFFh test r13, r13 jz loc_10BE2 mov rdi, r14 mov esi, 2Fh ; '/' call _strrchr mov r12, rax lea rax, [rsp+148h+var_130] mov [rax-10h], rax mov rsi, [r15+58h] add r13, rsi lea rdi, [rsp+148h+var_140] mov rdx, r13 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rdi, [rsp+148h+var_140] mov rsi, [rdi+8] mov ecx, 1 xor edx, edx mov r8d, 2Eh ; '.' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE14_M_replace_auxEmmmc; std::string::_M_replace_aux(ulong,ulong,ulong,char) mov eax, [r15+0A0h] lea rcx, _ZN5nglogL16LogSeverityNamesE; nglog::LogSeverityNames mov rsi, [rcx+rax*8] lea rdi, [rsp+148h+var_140] lea r13, [rsp+148h+var_110] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rsi, [rsp+148h+var_B0] mov [rsi-10h], rsi mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_10BE9 mov [rsp+148h+var_C0], rdx mov rdx, [rcx] mov [rsp+148h+var_B0], rdx jmp short loc_10BEF loc_10B95: mov ebx, 0FFFFFFFFh cmp byte ptr [r12], 1 jnz short loc_10BA9 mov rdi, r14 call _unlink loc_10BA9: xor ebp, ebp loc_10BAB: cmp ebx, 0FFFFFFFFh jz short loc_10BB7 mov edi, ebx call _close loc_10BB7: mov rdi, [rsp+148h+var_120]; void * cmp rdi, r13 jz short loc_10BCE mov rsi, [rsp+148h+var_110] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_10BCE: mov eax, ebp add rsp, 118h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_10BE2: lea r13, [rsp+148h+var_110] jmp short loc_10BAB loc_10BE9: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rsi], xmm0 loc_10BEF: mov rdx, [rax+8] mov [rsp+148h+var_B8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov rdi, [rsp+148h+var_140]; void * lea rax, [rsp+148h+var_130] cmp rdi, rax jz short loc_10C26 mov rsi, [rsp+148h+var_130] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_10C26: lea rax, [rsp+148h+var_130] mov [rsp+148h+var_140], rax mov [rsp+148h+var_138], 0 mov byte ptr [rsp+148h+var_130], 0 test r12, r12 jz short loc_10C8A lea r13, [rsp+148h+var_D0] mov [r13-10h], r13 lea rdx, [r12+1] lea rdi, [rsp+148h+var_E0] mov rsi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+148h+var_140] lea r15, [rsp+148h+var_E0] mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r15]; void * cmp rdi, r13 jz short loc_10C85 mov rsi, [rsp+148h+var_D0] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_10C85: lea r13, [rsp+148h+var_110] loc_10C8A: mov rsi, [rsp+148h+var_C0] mov rdx, [rsp+148h+var_B8] lea rdi, [rsp+148h+var_140] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, [rsp+148h+var_140] call _unlink lea rdi, [r12+1] test r12, r12 cmovz rdi, r14 mov rsi, [rsp+148h+var_140] call _symlink lea rax, _ZN3fLS14FLAGS_log_linkB5cxx11E; fLS::FLAGS_log_link mov rax, [rax] cmp qword ptr [rax+8], 0 jz loc_10DC2 lea r12, [rsp+148h+var_F0] mov [r12-10h], r12 mov rsi, [rax] mov rdx, [rax+8] add rdx, rsi lea rdi, [rsp+148h+var_100] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, asc_239F8+1; "/" lea rdi, [rsp+148h+var_100] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [rsp+148h+var_C0] mov rdx, [rsp+148h+var_B8] lea rdi, [rsp+148h+var_100] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) lea r13, [rsp+148h+var_D0] mov [r13-10h], r13 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_10D49 mov [rsp+148h+var_E0], rdx mov rdx, [rcx] mov [rsp+148h+var_D0], rdx jmp short loc_10D51 loc_10D49: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r13+0], xmm0 loc_10D51: mov rdx, [rax+8] lea r15, [rsp+148h+var_E0] mov [r15+8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 lea rdi, [rsp+148h+var_140] mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r15]; void * cmp rdi, r13 jz short loc_10D8F mov rsi, [rsp+148h+var_D0] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_10D8F: mov rdi, [rsp+148h+var_100]; void * cmp rdi, r12 lea r13, [rsp+148h+var_110] jz short loc_10DAB mov rsi, [rsp+148h+var_F0] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_10DAB: mov rdi, [rsp+148h+var_140] call _unlink mov rsi, [rsp+148h+var_140] mov rdi, r14 call _symlink loc_10DC2: mov rdi, [rsp+148h+var_140]; void * lea rax, [rsp+148h+var_130] cmp rdi, rax jz short loc_10DDE mov rsi, [rsp+148h+var_130] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_10DDE: mov rdi, [rsp+148h+var_C0]; void * lea rax, [rsp+148h+var_B0] cmp rdi, rax jz loc_10BAB mov rsi, [rsp+148h+var_B0] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) jmp loc_10BAB jmp short $+2 loc_10E0E: mov r14, rax mov rdi, [rsp+148h+var_100]; void * cmp rdi, r12 jz short loc_10E31 mov rsi, [rsp+148h+var_F0] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) jmp short loc_10E31 jmp short loc_10E2E jmp short $+2 loc_10E2E: mov r14, rax loc_10E31: mov rdi, [rsp+148h+var_140]; void * lea rax, [rsp+148h+var_130] cmp rdi, rax jz short loc_10E4D mov rsi, [rsp+148h+var_130] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_10E4D: mov rdi, [rsp+148h+var_C0] lea rax, [rsp+148h+var_B0] cmp rdi, rax jz short loc_10E92 mov rsi, [rsp+148h+var_B0] jmp short loc_10E85 jmp short $+2 loc_10E6E: mov r14, rax mov rdi, [rsp+148h+var_140]; void * lea rax, [rsp+148h+var_130] cmp rdi, rax jz short loc_10E92 mov rsi, [rsp+148h+var_130] loc_10E85: inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) jmp short loc_10E92 mov r14, rax loc_10E92: mov ebx, 0FFFFFFFFh jmp short loc_10EA0 jmp short loc_10EAE jmp short $+2 loc_10E9D: mov r14, rax loc_10EA0: cmp ebx, 0FFFFFFFFh jz short loc_10EBB mov edi, ebx call _close jmp short loc_10EBB loc_10EAE: mov rdi, rax call __clang_call_terminate jmp short $+2 loc_10EB8: mov r14, rax loc_10EBB: mov rdi, [rsp+148h+var_120]; void * lea rax, [rsp+148h+var_110] cmp rdi, rax jz short loc_10ED7 mov rsi, [rsp+148h+var_110] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_10ED7: mov rdi, r14 call __Unwind_Resume
long long nglog::`anonymous namespace'::LogFileObject::CreateLogfile(long long a1, _QWORD *a2) { unsigned int v2; // ebp _BYTE *v4; // r14 long long v5; // rsi unsigned int v6; // eax unsigned int v7; // ecx unsigned int v8; // eax unsigned int v9; // edx unsigned int v10; // eax unsigned int v11; // ebx long long v12; // rax long long v13; // rdi long long v14; // r13 long long v15; // r12 long long v16; // rax _OWORD *v17; // rcx _BYTE *v19; // rdi long long v20; // rax __int128 *v21; // rcx void *v22; // [rsp+8h] [rbp-140h] BYREF long long v23; // [rsp+10h] [rbp-138h] _BYTE v24[16]; // [rsp+18h] [rbp-130h] BYREF void *v25[2]; // [rsp+28h] [rbp-120h] BYREF void *v26[2]; // [rsp+38h] [rbp-110h] BYREF void *v27[2]; // [rsp+48h] [rbp-100h] BYREF _QWORD v28[2]; // [rsp+58h] [rbp-F0h] BYREF void *v29[2]; // [rsp+68h] [rbp-E0h] BYREF __int128 v30; // [rsp+78h] [rbp-D0h] BYREF void *v31[2]; // [rsp+88h] [rbp-C0h] BYREF _OWORD v32[2]; // [rsp+98h] [rbp-B0h] BYREF unsigned int v33; // [rsp+B8h] [rbp-90h] v25[0] = v26; std::string::_M_construct<char *>(v25, *(_BYTE **)(a1 + 56), *(_QWORD *)(a1 + 56) + *(_QWORD *)(a1 + 64)); if ( fLB::FLAGS_timestamp_in_logfile_name == 1 ) std::string::_M_append(v25, *a2); std::string::_M_append(v25, *(_QWORD *)(a1 + 120)); v4 = v25[0]; v5 = 193LL; if ( !fLB::FLAGS_timestamp_in_logfile_name ) { v5 = 65LL; if ( !(unsigned int)stat(v25[0], v31) ) { v6 = v33; v7 = fLU::FLAGS_max_log_size; *(_DWORD *)(a1 + 172) = v33; v8 = v6 >> 20; v9 = 1; if ( v7 - 1 < 0xFFF ) v9 = v7; v5 = ((v8 >= v9) << 9) | 0x41u; } } v10 = open(v4, v5, fLI::FLAGS_logfile_mode); v11 = v10; if ( v10 == -1 ) goto LABEL_18; fcntl(v10, 2LL, 1LL); nglog::`anonymous namespace'::LogFileObject::CreateLogfile(std::string const&)::w_lock = 1; xmmword_40D08 = 0LL; if ( (unsigned int)fcntl( v11, 6LL, &nglog::`anonymous namespace'::LogFileObject::CreateLogfile(std::string const&)::w_lock) == -1 ) goto LABEL_18; v12 = fdopen(v11, "a"); v13 = *(_QWORD *)(a1 + 152); *(_QWORD *)(a1 + 152) = v12; if ( v13 ) fclose(v13); if ( !*(_QWORD *)(a1 + 152) ) { v11 = -1; if ( fLB::FLAGS_timestamp_in_logfile_name == 1 ) unlink(v4); LABEL_18: v2 = 0; goto LABEL_19; } v14 = *(_QWORD *)(a1 + 96); LOBYTE(v2) = 1; v11 = -1; if ( v14 ) { v15 = strrchr(v4, 47LL); v22 = v24; std::string::_M_construct<char *>(&v22, *(_BYTE **)(a1 + 88), *(_QWORD *)(a1 + 88) + v14); std::string::_M_replace_aux(&v22, v23, 0LL, 1LL, 46LL); v16 = std::string::append(&v22, nglog::LogSeverityNames[*(unsigned int *)(a1 + 160)]); v31[0] = v32; v17 = (_OWORD *)(v16 + 16); if ( *(_QWORD *)v16 == v16 + 16 ) { v32[0] = *v17; } else { v31[0] = *(void **)v16; *(_QWORD *)&v32[0] = *(_QWORD *)v17; } v31[1] = *(void **)(v16 + 8); *(_QWORD *)v16 = v17; *(_QWORD *)(v16 + 8) = 0LL; *(_BYTE *)(v16 + 16) = 0; if ( v22 != v24 ) operator delete(v22); v22 = v24; v23 = 0LL; v24[0] = 0; if ( v15 ) { v29[0] = &v30; std::string::_M_construct<char const*>(v29, v4, v15 + 1); std::string::operator=(&v22, v29); if ( v29[0] != &v30 ) operator delete(v29[0]); } std::string::_M_append(&v22, v31[0]); unlink(v22); v19 = (_BYTE *)(v15 + 1); if ( !v15 ) v19 = v4; symlink(v19, v22); if ( *(&fLS::FLAGS_log_link_buf[abi:cxx11] + 1) ) { v27[0] = v28; std::string::_M_construct<char *>( v27, (_BYTE *)fLS::FLAGS_log_link_buf[abi:cxx11], fLS::FLAGS_log_link_buf[abi:cxx11] + *(&fLS::FLAGS_log_link_buf[abi:cxx11] + 1)); std::string::append(v27, "/"); v20 = std::string::_M_append(v27, v31[0]); v29[0] = &v30; v21 = (__int128 *)(v20 + 16); if ( *(_QWORD *)v20 == v20 + 16 ) { v30 = *v21; } else { v29[0] = *(void **)v20; *(_QWORD *)&v30 = *(_QWORD *)v21; } v29[1] = *(void **)(v20 + 8); *(_QWORD *)v20 = v21; *(_QWORD *)(v20 + 8) = 0LL; *(_BYTE *)(v20 + 16) = 0; std::string::operator=(&v22, v29); if ( v29[0] != &v30 ) operator delete(v29[0]); if ( v27[0] != v28 ) operator delete(v27[0]); unlink(v22); symlink(v4, v22); } if ( v22 != v24 ) operator delete(v22); if ( v31[0] != v32 ) operator delete(v31[0]); } LABEL_19: if ( v11 != -1 ) close(v11); if ( v25[0] != v26 ) operator delete(v25[0]); return v2; }
CreateLogfile: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x118 MOV RBX,RSI MOV R15,RDI LEA R13,[RSP + 0x38] MOV qword ptr [R13 + -0x10],R13 MOV RSI,qword ptr [RDI + 0x38] MOV RDX,qword ptr [RDI + 0x40] ADD RDX,RSI LEA RDI,[RSP + 0x28] CALL 0x00109a5a LEA R12,[0x131a78] CMP byte ptr [R12],0x1 JNZ 0x001109d8 MOV RSI,qword ptr [RBX] MOV RDX,qword ptr [RBX + 0x8] LAB_001109ce: LEA RDI,[RSP + 0x28] CALL 0x00107140 LAB_001109d8: MOV RSI,qword ptr [R15 + 0x78] MOV RDX,qword ptr [R15 + 0x80] LEA RDI,[RSP + 0x28] CALL 0x00107140 MOV R14,qword ptr [RSP + 0x28] MOV ESI,0xc1 CMP byte ptr [R12],0x0 JNZ 0x00110a50 LEA RSI,[RSP + 0x88] MOV RDI,R14 CALL 0x00107470 MOV ESI,0x41 TEST EAX,EAX JNZ 0x00110a50 MOV EAX,dword ptr [RSP + 0xb8] LEA RCX,[0x131b5c] MOV ECX,dword ptr [RCX] MOV dword ptr [R15 + 0xac],EAX SHR EAX,0x14 LEA EDX,[RCX + -0x1] CMP EDX,0xfff MOV EDX,0x1 CMOVC EDX,ECX XOR ESI,ESI CMP EAX,EDX SETNC SIL SHL ESI,0x9 OR ESI,0x41 LAB_00110a50: LEA RAX,[0x131b04] MOV EDX,dword ptr [RAX] LAB_00110a59: MOV RDI,R14 XOR EAX,EAX CALL 0x001073b0 MOV EBX,EAX CMP EAX,-0x1 JZ 0x00110ba9 LAB_00110a6e: MOV EDI,EBX MOV ESI,0x2 MOV EDX,0x1 XOR EAX,EAX CALL 0x001072c0 MOV dword ptr [0x00140d00],0x1 LEA RDX,[0x140d00] XORPS XMM0,XMM0 MOVUPS xmmword ptr [0x00140d08],XMM0 LAB_00110a9c: MOV EDI,EBX MOV ESI,0x6 XOR EAX,EAX CALL 0x001072c0 CMP EAX,-0x1 JZ 0x00110ba9 LEA RSI,[0x124039] MOV EDI,EBX CALL 0x00107580 MOV RDI,qword ptr [R15 + 0x98] MOV qword ptr [R15 + 0x98],RAX TEST RDI,RDI JZ 0x00110ad9 CALL 0x00107520 LAB_00110ad9: CMP qword ptr [R15 + 0x98],0x0 JZ 0x00110b95 MOV R13,qword ptr [R15 + 0x60] MOV BPL,0x1 MOV EBX,0xffffffff TEST R13,R13 JZ 0x00110be2 MOV RDI,R14 MOV ESI,0x2f CALL 0x001075b0 MOV R12,RAX LEA RAX,[RSP + 0x18] MOV qword ptr [RAX + -0x10],RAX MOV RSI,qword ptr [R15 + 0x58] ADD R13,RSI LAB_00110b1c: LEA RDI,[RSP + 0x8] MOV RDX,R13 CALL 0x00109a5a LEA RDI,[RSP + 0x8] MOV RSI,qword ptr [RDI + 0x8] LAB_00110b32: MOV ECX,0x1 XOR EDX,EDX MOV R8D,0x2e CALL 0x00107a00 MOV EAX,dword ptr [R15 + 0xa0] LEA RCX,[0x130570] MOV RSI,qword ptr [RCX + RAX*0x8] LAB_00110b56: LEA RDI,[RSP + 0x8] LEA R13,[RSP + 0x38] CALL 0x00107a40 LEA RSI,[RSP + 0x98] MOV qword ptr [RSI + -0x10],RSI MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x00110be9 MOV qword ptr [RSP + 0x88],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x98],RDX JMP 0x00110bef LAB_00110b95: MOV EBX,0xffffffff CMP byte ptr [R12],0x1 JNZ 0x00110ba9 MOV RDI,R14 CALL 0x00107210 LAB_00110ba9: XOR EBP,EBP LAB_00110bab: CMP EBX,-0x1 JZ 0x00110bb7 LAB_00110bb0: MOV EDI,EBX CALL 0x00107a60 LAB_00110bb7: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R13 JZ 0x00110bce MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x0010906c LAB_00110bce: MOV EAX,EBP ADD RSP,0x118 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00110be2: LEA R13,[RSP + 0x38] JMP 0x00110bab LAB_00110be9: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RSI],XMM0 LAB_00110bef: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x90],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x00110c26 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0010906c LAB_00110c26: LEA RAX,[RSP + 0x18] MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],0x0 MOV byte ptr [RSP + 0x18],0x0 TEST R12,R12 JZ 0x00110c8a LEA R13,[RSP + 0x78] MOV qword ptr [R13 + -0x10],R13 LEA RDX,[R12 + 0x1] LAB_00110c51: LEA RDI,[RSP + 0x68] MOV RSI,R14 CALL 0x0010a606 LEA RDI,[RSP + 0x8] LEA R15,[RSP + 0x68] MOV RSI,R15 CALL 0x001076b0 MOV RDI,qword ptr [R15] CMP RDI,R13 JZ 0x00110c85 MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x0010906c LAB_00110c85: LEA R13,[RSP + 0x38] LAB_00110c8a: MOV RSI,qword ptr [RSP + 0x88] MOV RDX,qword ptr [RSP + 0x90] LAB_00110c9a: LEA RDI,[RSP + 0x8] CALL 0x00107140 MOV RDI,qword ptr [RSP + 0x8] CALL 0x00107210 LEA RDI,[R12 + 0x1] TEST R12,R12 CMOVZ RDI,R14 MOV RSI,qword ptr [RSP + 0x8] CALL 0x00107060 LEA RAX,[0x130548] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0x8],0x0 JZ 0x00110dc2 LEA R12,[RSP + 0x58] MOV qword ptr [R12 + -0x10],R12 MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] ADD RDX,RSI LAB_00110ced: LEA RDI,[RSP + 0x48] CALL 0x00109a5a LAB_00110cf7: LEA RSI,[0x1239f9] LEA RDI,[RSP + 0x48] CALL 0x00107a40 MOV RSI,qword ptr [RSP + 0x88] MOV RDX,qword ptr [RSP + 0x90] LAB_00110d18: LEA RDI,[RSP + 0x48] CALL 0x00107140 LEA R13,[RSP + 0x78] MOV qword ptr [R13 + -0x10],R13 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x00110d49 MOV qword ptr [RSP + 0x68],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x78],RDX JMP 0x00110d51 LAB_00110d49: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R13],XMM0 LAB_00110d51: MOV RDX,qword ptr [RAX + 0x8] LEA R15,[RSP + 0x68] MOV qword ptr [R15 + 0x8],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LEA RDI,[RSP + 0x8] MOV RSI,R15 CALL 0x001076b0 MOV RDI,qword ptr [R15] CMP RDI,R13 JZ 0x00110d8f MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x0010906c LAB_00110d8f: MOV RDI,qword ptr [RSP + 0x48] CMP RDI,R12 LEA R13,[RSP + 0x38] JZ 0x00110dab MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x0010906c LAB_00110dab: MOV RDI,qword ptr [RSP + 0x8] CALL 0x00107210 MOV RSI,qword ptr [RSP + 0x8] MOV RDI,R14 CALL 0x00107060 LAB_00110dc2: MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x00110dde MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0010906c LAB_00110dde: MOV RDI,qword ptr [RSP + 0x88] LEA RAX,[RSP + 0x98] CMP RDI,RAX JZ 0x00110bab MOV RSI,qword ptr [RSP + 0x98] INC RSI CALL 0x0010906c JMP 0x00110bab
/* nglog::(anonymous namespace)::LogFileObject::CreateLogfile(std::__cxx11::string const&) */ ulong __thiscall nglog::(anonymous_namespace)::LogFileObject::CreateLogfile(LogFileObject *this,string *param_1) { FILE *__stream; long lVar1; uint uVar2; long *__file; int iVar3; int iVar4; FILE *pFVar5; char *pcVar6; long *plVar7; __nlink_t *p_Var8; long *plVar9; int8 unaff_RBP; ulong uVar10; uint uVar11; char *local_140; ulong local_138; char local_130; int7 uStack_12f; long *local_120 [2]; long local_110 [2]; long *local_100 [2]; long local_f0 [2]; long *local_e0; long local_d8; long local_d0; long lStack_c8; stat local_c0; local_120[0] = local_110; std::__cxx11::string::_M_construct<char*> (local_120,*(long *)(this + 0x38),*(long *)(this + 0x40) + *(long *)(this + 0x38)); if (fLB::FLAGS_timestamp_in_logfile_name == '\x01') { /* try { // try from 001109ce to 001109ec has its CatchHandler @ 00110eb8 */ std::__cxx11::string::_M_append((char *)local_120,*(ulong *)param_1); } std::__cxx11::string::_M_append((char *)local_120,*(ulong *)(this + 0x78)); __file = local_120[0]; uVar11 = 0xc1; if (fLB::FLAGS_timestamp_in_logfile_name == '\0') { iVar3 = stat((char *)local_120[0],&local_c0); uVar2 = fLU::FLAGS_max_log_size; uVar11 = 0x41; if (iVar3 == 0) { *(uint *)(this + 0xac) = (uint)local_c0.st_size; uVar11 = 1; if (uVar2 - 1 < 0xfff) { uVar11 = uVar2; } uVar11 = (uint)(uVar11 <= (uint)local_c0.st_size >> 0x14) << 9 | 0x41; } } /* try { // try from 00110a59 to 00110a62 has its CatchHandler @ 00110eb6 */ iVar3 = open((char *)__file,uVar11,(ulong)fLI::FLAGS_logfile_mode); if (iVar3 != -1) { /* try { // try from 00110a6e to 00110a80 has its CatchHandler @ 00110e9d */ fcntl(iVar3,2,1); CreateLogfile(std::__cxx11::string_const&)::w_lock._0_4_ = 1; CreateLogfile(std::__cxx11::string_const&)::w_lock._8_8_ = 0; CreateLogfile(std::__cxx11::string_const&)::w_lock._16_8_ = 0; /* try { // try from 00110a9c to 00110aa9 has its CatchHandler @ 00110e9b */ iVar4 = fcntl(iVar3,6,CreateLogfile(std::__cxx11::string_const&)::w_lock); if (iVar4 != -1) { pFVar5 = fdopen(iVar3,"a"); __stream = *(FILE **)(this + 0x98); *(FILE **)(this + 0x98) = pFVar5; if (__stream != (FILE *)0x0) { fclose(__stream); } if (*(long *)(this + 0x98) != 0) { lVar1 = *(long *)(this + 0x60); uVar10 = CONCAT71((int7)((ulong)unaff_RBP >> 8),1); iVar3 = -1; if (lVar1 != 0) { pcVar6 = strrchr((char *)__file,0x2f); local_140 = &local_130; /* try { // try from 00110b1c to 00110b28 has its CatchHandler @ 00110e8f */ std::__cxx11::string::_M_construct<char*> (&local_140,*(long *)(this + 0x58),lVar1 + *(long *)(this + 0x58)); /* try { // try from 00110b32 to 00110b43 has its CatchHandler @ 00110e6e */ std::__cxx11::string::_M_replace_aux((ulong)&local_140,local_138,0,'\x01'); /* try { // try from 00110b56 to 00110b64 has its CatchHandler @ 00110e6c */ plVar7 = (long *)std::__cxx11::string::append((char *)&local_140); local_c0.st_dev = (__dev_t)&local_c0.st_nlink; p_Var8 = (__nlink_t *)(plVar7 + 2); if ((__nlink_t *)*plVar7 == p_Var8) { local_c0.st_nlink = *p_Var8; local_c0._24_8_ = plVar7[3]; } else { local_c0.st_nlink = *p_Var8; local_c0.st_dev = (__dev_t)*plVar7; } local_c0.st_ino = plVar7[1]; *plVar7 = (long)p_Var8; plVar7[1] = 0; *(int1 *)(plVar7 + 2) = 0; if (local_140 != &local_130) { operator_delete(local_140,CONCAT71(uStack_12f,local_130) + 1); } local_140 = &local_130; local_138 = 0; local_130 = '\0'; if (pcVar6 != (char *)0x0) { /* try { // try from 00110c51 to 00110c5d has its CatchHandler @ 00110e2c */ local_e0 = &local_d0; std::__cxx11::string::_M_construct<char_const*>(&local_e0,__file,pcVar6 + 1); std::__cxx11::string::operator=((string *)&local_140,(string *)&local_e0); if (local_e0 != &local_d0) { operator_delete(local_e0,local_d0 + 1); } } /* try { // try from 00110c9a to 00110ca3 has its CatchHandler @ 00110e2e */ std::__cxx11::string::_M_append((char *)&local_140,local_c0.st_dev); unlink(local_140); plVar7 = (long *)(pcVar6 + 1); if (pcVar6 == (char *)0x0) { plVar7 = __file; } symlink((char *)plVar7,local_140); if (*(long *)(fLS::FLAGS_log_link_abi_cxx11_ + 8) != 0) { /* try { // try from 00110ced to 00110cf6 has its CatchHandler @ 00110e2a */ local_100[0] = local_f0; std::__cxx11::string::_M_construct<char*> (local_100,*(long *)fLS::FLAGS_log_link_abi_cxx11_, *(long *)(fLS::FLAGS_log_link_abi_cxx11_ + 8) + *(long *)fLS::FLAGS_log_link_abi_cxx11_); /* try { // try from 00110cf7 to 00110d07 has its CatchHandler @ 00110e0e */ std::__cxx11::string::append((char *)local_100); /* try { // try from 00110d18 to 00110d21 has its CatchHandler @ 00110e0c */ plVar7 = (long *)std::__cxx11::string::_M_append((char *)local_100,local_c0.st_dev); plVar9 = plVar7 + 2; if ((long *)*plVar7 == plVar9) { local_d0 = *plVar9; lStack_c8 = plVar7[3]; local_e0 = &local_d0; } else { local_d0 = *plVar9; local_e0 = (long *)*plVar7; } local_d8 = plVar7[1]; *plVar7 = (long)plVar9; plVar7[1] = 0; *(int1 *)(plVar7 + 2) = 0; std::__cxx11::string::operator=((string *)&local_140,(string *)&local_e0); if (local_e0 != &local_d0) { operator_delete(local_e0,local_d0 + 1); } if (local_100[0] != local_f0) { operator_delete(local_100[0],local_f0[0] + 1); } unlink(local_140); symlink((char *)__file,local_140); } if (local_140 != &local_130) { operator_delete(local_140,CONCAT71(uStack_12f,local_130) + 1); } if ((__nlink_t *)local_c0.st_dev != &local_c0.st_nlink) { operator_delete((void *)local_c0.st_dev,local_c0.st_nlink + 1); } } goto LAB_00110bab; } iVar3 = -1; if (fLB::FLAGS_timestamp_in_logfile_name == '\x01') { unlink((char *)__file); } } } uVar10 = 0; LAB_00110bab: if (iVar3 != -1) { /* try { // try from 00110bb0 to 00110bb6 has its CatchHandler @ 00110e99 */ close(iVar3); } if (local_120[0] != local_110) { operator_delete(local_120[0],local_110[0] + 1); } return uVar10 & 0xffffffff; }
55,269
nglog::(anonymous namespace)::LogFileObject::CreateLogfile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
ng-log[P]ng-log/src/logging.cc
bool LogFileObject::CreateLogfile(const string& time_pid_string) { string string_filename = base_filename_; if (FLAGS_timestamp_in_logfile_name) { string_filename += time_pid_string; } string_filename += filename_extension_; const char* filename = string_filename.c_str(); // only write to files, create if non-existant. int flags = O_WRONLY | O_CREAT; if (FLAGS_timestamp_in_logfile_name) { // demand that the file is unique for our timestamp (fail if it exists). flags = flags | O_EXCL; } else { // logs are written to a single file, where: a log file is created for the // the first time or a file is being recreated due to exceeding max size struct stat statbuf; if (stat(filename, &statbuf) == 0) { // truncate the file if it exceeds the max size if ((static_cast<uint32>(statbuf.st_size) >> 20U) >= MaxLogSize()) { flags |= O_TRUNC; } // update file length to sync file size file_length_ = static_cast<uint32>(statbuf.st_size); } } FileDescriptor fd{ open(filename, flags, static_cast<mode_t>(FLAGS_logfile_mode))}; if (!fd) return false; #ifdef HAVE_FCNTL // Mark the file close-on-exec. We don't really care if this fails fcntl(fd.get(), F_SETFD, FD_CLOEXEC); // Mark the file as exclusive write access to avoid two clients logging to the // same file. This applies particularly when !FLAGS_timestamp_in_logfile_name // (otherwise open would fail because the O_EXCL flag on similar filename). // locks are released on unlock or close() automatically, only after log is // released. // This will work after a fork as it is not inherited (not stored in the fd). // Lock will not be lost because the file is opened with exclusive lock // (write) and we will never read from it inside the process. // TODO: windows implementation of this (as flock is not available on // mingw). static struct flock w_lock; w_lock.l_type = F_WRLCK; w_lock.l_start = 0; w_lock.l_whence = SEEK_SET; w_lock.l_len = 0; int wlock_ret = fcntl(fd.get(), F_SETLK, &w_lock); if (wlock_ret == -1) { return false; } #endif // fdopen in append mode so if the file exists it will fseek to the end file_.reset(fdopen(fd.release(), "a")); // Make a FILE*. if (file_ == nullptr) { // Man, we're screwed! if (FLAGS_timestamp_in_logfile_name) { unlink(filename); // Erase the half-baked evidence: an unusable log file, // only if we just created it. } return false; } #ifdef NGLOG_OS_WINDOWS // https://github.com/golang/go/issues/27638 - make sure we seek to the end to // append empirically replicated with wine over mingw build if (!FLAGS_timestamp_in_logfile_name) { if (fseek(file_.get(), 0, SEEK_END) != 0) { return false; } } #endif // We try to create a symlink called <program_name>.<severity>, // which is easier to use. (Every time we create a new logfile, // we destroy the old symlink and create a new one, so it always // points to the latest logfile.) If it fails, we're sad but it's // no error. if (!symlink_basename_.empty()) { // take directory from filename const char* slash = strrchr(filename, PATH_SEPARATOR); const string linkname = symlink_basename_ + '.' + LogSeverityNames[severity_]; string linkpath; if (slash) linkpath = string( filename, static_cast<size_t>(slash - filename + 1)); // get dirname linkpath += linkname; unlink(linkpath.c_str()); // delete old one if it exists #if defined(NGLOG_OS_WINDOWS) // TODO(hamaji): Create lnk file on Windows? #elif defined(HAVE_UNISTD_H) // We must have unistd.h. // Make the symlink be relative (in the same dir) so that if the // entire log directory gets relocated the link is still valid. const char* linkdest = slash ? (slash + 1) : filename; if (symlink(linkdest, linkpath.c_str()) != 0) { // silently ignore failures } // Make an additional link to the log file in a place specified by // FLAGS_log_link, if indicated if (!FLAGS_log_link.empty()) { linkpath = FLAGS_log_link + "/" + linkname; unlink(linkpath.c_str()); // delete old one if it exists if (symlink(filename, linkpath.c_str()) != 0) { // silently ignore failures } } #endif } return true; // Everything worked }
O2
cpp
nglog::(anonymous namespace)::LogFileObject::CreateLogfile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x120, %rsp # imm = 0x120 movq %rsi, %rbx movq %rdi, %r14 leaq 0x38(%rdi), %rsi leaq 0x30(%rsp), %rdi callq 0x87f0 leaq 0x226c4(%rip), %r12 # 0x31ae0 cmpb $0x1, (%r12) jne 0xf430 leaq 0x30(%rsp), %rdi movq %rbx, %rsi callq 0x8af0 leaq 0x78(%r14), %rsi leaq 0x30(%rsp), %rdi callq 0x8af0 movq 0x30(%rsp), %rbx movl $0xc1, %esi cmpb $0x0, (%r12) jne 0xf49f leaq 0x90(%rsp), %rsi movq %rbx, %rdi callq 0x84f0 testl %eax, %eax je 0xf468 pushq $0x41 popq %rsi jmp 0xf49f movl 0xc0(%rsp), %eax leaq 0x2274e(%rip), %rcx # 0x31bc4 movl (%rcx), %ecx movl %eax, 0xac(%r14) shrl $0x14, %eax leal -0x1(%rcx), %edx cmpl $0xfff, %edx # imm = 0xFFF pushq $0x1 popq %rdx cmovbl %ecx, %edx xorl %esi, %esi cmpl %edx, %eax setae %sil shll $0x9, %esi orl $0x41, %esi leaq 0x226c6(%rip), %rax # 0x31b6c movl (%rax), %edx movq %rbx, %rdi xorl %eax, %eax callq 0x8420 movl %eax, 0xc(%rsp) cmpl $-0x1, %eax je 0xf6a9 pushq $0x2 popq %rsi pushq $0x1 popq %rdx movl %eax, %edi xorl %eax, %eax callq 0x8320 movl $0x1, 0x31898(%rip) # 0x40d70 leaq 0x31891(%rip), %rdx # 0x40d70 xorps %xmm0, %xmm0 movups %xmm0, 0x3188f(%rip) # 0x40d78 movl 0xc(%rsp), %edi pushq $0x6 popq %rsi xorl %eax, %eax callq 0x8320 cmpl $-0x1, %eax je 0xf6a9 leaq 0x98(%r14), %r15 movl 0xc(%rsp), %edi orl $-0x1, 0xc(%rsp) leaq 0x11b17(%rip), %rsi # 0x2102e callq 0x8600 movq %r15, %rdi movq %rax, %rsi callq 0xb0c6 cmpq $0x0, 0x98(%r14) je 0xf69a movb $0x1, %bpl cmpq $0x0, 0x60(%r14) je 0xf6ab leaq 0x58(%r14), %r12 pushq $0x2f popq %rsi movq %rbx, %rdi callq 0x8640 movq %rax, %r15 leaq 0x10(%rsp), %rdi pushq $0x2e popq %rdx movq %r12, %rsi callq 0x10aba movl 0xa0(%r14), %eax leaq 0x2104d(%rip), %rcx # 0x305c0 movq (%rcx,%rax,8), %rdx leaq 0x90(%rsp), %rdi leaq 0x10(%rsp), %rsi callq 0x10a7c leaq 0x10(%rsp), %rdi callq 0x8b78 leaq 0x20(%rsp), %rax movq %rax, -0x10(%rax) andq $0x0, -0x8(%rax) movb $0x0, (%rax) testq %r15, %r15 je 0xf5dd leaq 0x60(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x1(%r15), %rdx leaq 0x50(%rsp), %rdi movq %rbx, %rsi callq 0xb030 leaq 0x10(%rsp), %rdi leaq 0x50(%rsp), %r14 movq %r14, %rsi callq 0x8720 movq %r14, %rdi callq 0x8b78 leaq 0x10(%rsp), %rdi leaq 0x90(%rsp), %rsi callq 0x8af0 movq 0x10(%rsp), %rdi callq 0x8270 leaq 0x1(%r15), %rdi testq %r15, %r15 cmoveq %rbx, %rdi movq 0x10(%rsp), %rsi callq 0x8060 leaq 0x20f83(%rip), %rax # 0x30598 movq (%rax), %rsi cmpq $0x0, 0x8(%rsi) je 0xf681 leaq 0x113cb(%rip), %rdx # 0x209f1 leaq 0x70(%rsp), %rdi callq 0xa6e0 leaq 0x50(%rsp), %rdi leaq 0x70(%rsp), %rsi leaq 0x90(%rsp), %rdx callq 0x10a9b leaq 0x10(%rsp), %r14 leaq 0x50(%rsp), %r15 movq %r14, %rdi movq %r15, %rsi callq 0x8720 movq %r15, %rdi callq 0x8b78 leaq 0x70(%rsp), %rdi callq 0x8b78 movq (%r14), %rdi callq 0x8270 movq (%r14), %rsi movq %rbx, %rdi callq 0x8060 leaq 0x10(%rsp), %rdi callq 0x8b78 leaq 0x90(%rsp), %rdi callq 0x8b78 jmp 0xf6ab cmpb $0x1, (%r12) jne 0xf6a9 movq %rbx, %rdi callq 0x8270 xorl %ebp, %ebp leaq 0xc(%rsp), %rdi callq 0xa478 leaq 0x30(%rsp), %rdi callq 0x8b78 movl %ebp, %eax addq $0x120, %rsp # imm = 0x120 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x70(%rsp), %rdi callq 0x8b78 jmp 0xf6e7 jmp 0xf6e4 jmp 0xf6e4 movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x8b78 leaq 0x90(%rsp), %rdi jmp 0xf703 movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x8b78 jmp 0xf711 jmp 0xf70e jmp 0xf70e movq %rax, %rbx leaq 0xc(%rsp), %rdi callq 0xa478 jmp 0xf722 jmp 0xf71f movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x8b78 movq %rbx, %rdi callq 0x8a40
_ZN5nglog12_GLOBAL__N_113LogFileObject13CreateLogfileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r12 push rbx sub rsp, 120h mov rbx, rsi mov r14, rdi lea rsi, [rdi+38h] lea rdi, [rsp+148h+var_118] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) lea r12, _ZN3fLB31FLAGS_timestamp_in_logfile_nameE; fLB::FLAGS_timestamp_in_logfile_name cmp byte ptr [r12], 1 jnz short loc_F430 lea rdi, [rsp+148h+var_118] mov rsi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&) loc_F430: lea rsi, [r14+78h] lea rdi, [rsp+148h+var_118] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&) mov rbx, [rsp+148h+var_118] mov esi, 0C1h cmp byte ptr [r12], 0 jnz short loc_F49F lea rsi, [rsp+148h+var_B8] mov rdi, rbx call _stat test eax, eax jz short loc_F468 push 41h ; 'A' pop rsi jmp short loc_F49F loc_F468: mov eax, [rsp+148h+var_88] lea rcx, _ZN3fLU18FLAGS_max_log_sizeE; fLU::FLAGS_max_log_size mov ecx, [rcx] mov [r14+0ACh], eax shr eax, 14h lea edx, [rcx-1] cmp edx, 0FFFh push 1 pop rdx cmovb edx, ecx xor esi, esi cmp eax, edx setnb sil shl esi, 9 or esi, 41h loc_F49F: lea rax, _ZN3fLI18FLAGS_logfile_modeE; fLI::FLAGS_logfile_mode mov edx, [rax] mov rdi, rbx xor eax, eax call _open mov [rsp+148h+var_13C], eax cmp eax, 0FFFFFFFFh jz loc_F6A9 push 2 pop rsi push 1 pop rdx mov edi, eax xor eax, eax call _fcntl mov cs:_ZZN5nglog12_GLOBAL__N_113LogFileObject13CreateLogfileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE6w_lock, 1; nglog::`anonymous namespace'::LogFileObject::CreateLogfile(std::string const&)::w_lock lea rdx, _ZZN5nglog12_GLOBAL__N_113LogFileObject13CreateLogfileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE6w_lock; nglog::`anonymous namespace'::LogFileObject::CreateLogfile(std::string const&)::w_lock xorps xmm0, xmm0 movups cs:xmmword_40D78, xmm0 mov edi, [rsp+148h+var_13C] push 6 pop rsi xor eax, eax call _fcntl cmp eax, 0FFFFFFFFh jz loc_F6A9 lea r15, [r14+98h] mov edi, [rsp+148h+var_13C] or [rsp+148h+var_13C], 0FFFFFFFFh lea rsi, aAlpha+4; "a" call _fdopen mov rdi, r15 mov rsi, rax call _ZNSt15__uniq_ptr_implI8_IO_FILESt14default_deleteIS0_EE5resetEPS0_; std::__uniq_ptr_impl<_IO_FILE,std::default_delete<_IO_FILE>>::reset(_IO_FILE*) cmp qword ptr [r14+98h], 0 jz loc_F69A mov bpl, 1 cmp qword ptr [r14+60h], 0 jz loc_F6AB lea r12, [r14+58h] push 2Fh ; '/' pop rsi mov rdi, rbx call _strrchr mov r15, rax lea rdi, [rsp+148h+var_138] push 2Eh ; '.' pop rdx mov rsi, r12 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_S5_; std::operator+<char>(std::string const&,char) mov eax, [r14+0A0h] lea rcx, _ZN5nglogL16LogSeverityNamesE; nglog::LogSeverityNames mov rdx, [rcx+rax*8] lea rdi, [rsp+148h+var_B8] lea rsi, [rsp+148h+var_138] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) lea rdi, [rsp+148h+var_138]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rax, [rsp+148h+var_128] mov [rax-10h], rax and qword ptr [rax-8], 0 mov byte ptr [rax], 0 test r15, r15 jz short loc_F5DD lea rax, [rsp+148h+var_E8] mov [rax-10h], rax lea rdx, [r15+1] lea rdi, [rsp+148h+var_F8] mov rsi, 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) lea rdi, [rsp+148h+var_138] lea r14, [rsp+148h+var_F8] mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_F5DD: lea rdi, [rsp+148h+var_138] lea rsi, [rsp+148h+var_B8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&) mov rdi, [rsp+148h+var_138] call _unlink lea rdi, [r15+1] test r15, r15 cmovz rdi, rbx mov rsi, [rsp+148h+var_138] call _symlink lea rax, _ZN3fLS14FLAGS_log_linkB5cxx11E; fLS::FLAGS_log_link mov rsi, [rax] cmp qword ptr [rsi+8], 0 jz short loc_F681 lea rdx, asc_209F0+1; "/" lea rdi, [rsp+148h+var_D8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) lea rdi, [rsp+148h+var_F8] lea rsi, [rsp+148h+var_D8] lea rdx, [rsp+148h+var_B8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_; std::operator+<char>(std::string&&,std::string const&) lea r14, [rsp+148h+var_138] lea r15, [rsp+148h+var_F8] mov rdi, r14 mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, r15; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+148h+var_D8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, [r14] call _unlink mov rsi, [r14] mov rdi, rbx call _symlink loc_F681: lea rdi, [rsp+148h+var_138]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+148h+var_B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_F6AB loc_F69A: cmp byte ptr [r12], 1 jnz short loc_F6A9 mov rdi, rbx call _unlink loc_F6A9: xor ebp, ebp loc_F6AB: lea rdi, [rsp+148h+var_13C]; this call _ZN5nglog5tools14FileDescriptor10safe_closeEv; nglog::tools::FileDescriptor::safe_close(void) lea rdi, [rsp+148h+var_118]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov eax, ebp add rsp, 120h pop rbx pop r12 pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_F6E7 jmp short loc_F6E4 jmp short $+2 loc_F6E4: mov rbx, rax loc_F6E7: lea rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+arg_88] jmp short loc_F703 mov rbx, rax lea rdi, [rsp+arg_8]; void * loc_F703: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_F711 jmp short loc_F70E jmp short $+2 loc_F70E: mov rbx, rax loc_F711: lea rdi, [rsp+arg_4]; this call _ZN5nglog5tools14FileDescriptor10safe_closeEv; nglog::tools::FileDescriptor::safe_close(void) jmp short loc_F722 jmp short $+2 loc_F71F: mov rbx, rax loc_F722: lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
long long nglog::`anonymous namespace'::LogFileObject::CreateLogfile(long long a1, long long a2) { unsigned int v2; // ebp long long v4; // rdx long long v5; // rcx long long v6; // r8 long long v7; // r9 _BYTE *v8; // rbx long long v9; // rsi unsigned int v10; // eax unsigned int v11; // ecx unsigned int v12; // eax unsigned int v13; // edx unsigned int v14; // eax long long v15; // rdi long long v16; // rax long long v17; // r15 _BYTE *v18; // rdi unsigned int v20; // [rsp+Ch] [rbp-13Ch] BYREF _QWORD v21[2]; // [rsp+10h] [rbp-138h] BYREF char v22; // [rsp+20h] [rbp-128h] BYREF _QWORD v23[4]; // [rsp+30h] [rbp-118h] BYREF _QWORD v24[2]; // [rsp+50h] [rbp-F8h] BYREF char v25; // [rsp+60h] [rbp-E8h] BYREF _BYTE v26[32]; // [rsp+70h] [rbp-D8h] BYREF _BYTE v27[48]; // [rsp+90h] [rbp-B8h] BYREF unsigned int v28; // [rsp+C0h] [rbp-88h] std::string::basic_string(v23); if ( fLB::FLAGS_timestamp_in_logfile_name == 1 ) std::string::append(v23, a2); std::string::append(v23, a1 + 120); v8 = (_BYTE *)v23[0]; v9 = 193LL; if ( !fLB::FLAGS_timestamp_in_logfile_name ) { if ( (unsigned int)stat(v23[0], v27, v4, v5, v6, v7) ) { v9 = 65LL; } else { v10 = v28; v11 = fLU::FLAGS_max_log_size; *(_DWORD *)(a1 + 172) = v28; v12 = v10 >> 20; v13 = 1; if ( v11 - 1 < 0xFFF ) v13 = v11; v9 = ((v12 >= v13) << 9) | 0x41u; } } v14 = open(v8, v9, fLI::FLAGS_logfile_mode); v20 = v14; if ( v14 == -1 ) goto LABEL_22; fcntl(v14, 2LL, 1LL); nglog::`anonymous namespace'::LogFileObject::CreateLogfile(std::string const&)::w_lock = 1; xmmword_40D78 = 0LL; if ( (unsigned int)fcntl( v20, 6LL, &nglog::`anonymous namespace'::LogFileObject::CreateLogfile(std::string const&)::w_lock) == -1 ) goto LABEL_22; v15 = v20; v20 = -1; v16 = fdopen(v15, "a"); std::__uniq_ptr_impl<_IO_FILE,std::default_delete<_IO_FILE>>::reset((_QWORD *)(a1 + 152), v16); if ( !*(_QWORD *)(a1 + 152) ) { if ( fLB::FLAGS_timestamp_in_logfile_name == 1 ) unlink(v8); LABEL_22: v2 = 0; goto LABEL_23; } LOBYTE(v2) = 1; if ( *(_QWORD *)(a1 + 96) ) { v17 = strrchr(v8, 47LL); std::operator+<char>(v21, a1 + 88, 46LL); std::operator+<char>(v27, v21, nglog::LogSeverityNames[*(unsigned int *)(a1 + 160)]); std::string::~string(v21); v21[0] = &v22; v21[1] = 0LL; v22 = 0; if ( v17 ) { v24[0] = &v25; std::string::_M_construct<char const*>((long long)v24, v8, v17 + 1); std::string::operator=(v21, v24); std::string::~string(v24); } std::string::append(v21, v27); unlink(v21[0]); v18 = (_BYTE *)(v17 + 1); if ( !v17 ) v18 = v8; symlink(v18, v21[0]); if ( fLS::FLAGS_log_link_buf[abi:cxx11][1] ) { std::operator+<char>((long long)v26, (long long)fLS::FLAGS_log_link_buf[abi:cxx11], (long long)"/"); std::operator+<char>(v24, v26, v27); std::string::operator=(v21, v24); std::string::~string(v24); std::string::~string(v26); unlink(v21[0]); symlink(v8, v21[0]); } std::string::~string(v21); std::string::~string(v27); } LABEL_23: nglog::tools::FileDescriptor::safe_close((nglog::tools::FileDescriptor *)&v20); std::string::~string(v23); return v2; }
CreateLogfile: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x120 MOV RBX,RSI MOV R14,RDI LEA RSI,[RDI + 0x38] LEA RDI,[RSP + 0x30] CALL 0x001087f0 LEA R12,[0x131ae0] CMP byte ptr [R12],0x1 JNZ 0x0010f430 LAB_0010f423: LEA RDI,[RSP + 0x30] MOV RSI,RBX CALL 0x00108af0 LAB_0010f430: LEA RSI,[R14 + 0x78] LEA RDI,[RSP + 0x30] CALL 0x00108af0 MOV RBX,qword ptr [RSP + 0x30] MOV ESI,0xc1 CMP byte ptr [R12],0x0 JNZ 0x0010f49f LEA RSI,[RSP + 0x90] MOV RDI,RBX CALL 0x001084f0 TEST EAX,EAX JZ 0x0010f468 PUSH 0x41 POP RSI JMP 0x0010f49f LAB_0010f468: MOV EAX,dword ptr [RSP + 0xc0] LEA RCX,[0x131bc4] MOV ECX,dword ptr [RCX] MOV dword ptr [R14 + 0xac],EAX SHR EAX,0x14 LEA EDX,[RCX + -0x1] CMP EDX,0xfff PUSH 0x1 POP RDX CMOVC EDX,ECX XOR ESI,ESI CMP EAX,EDX SETNC SIL SHL ESI,0x9 OR ESI,0x41 LAB_0010f49f: LEA RAX,[0x131b6c] MOV EDX,dword ptr [RAX] LAB_0010f4a8: MOV RDI,RBX XOR EAX,EAX CALL 0x00108420 MOV dword ptr [RSP + 0xc],EAX CMP EAX,-0x1 JZ 0x0010f6a9 LAB_0010f4bf: PUSH 0x2 POP RSI PUSH 0x1 POP RDX MOV EDI,EAX XOR EAX,EAX CALL 0x00108320 MOV dword ptr [0x00140d70],0x1 LEA RDX,[0x140d70] XORPS XMM0,XMM0 MOVUPS xmmword ptr [0x00140d78],XMM0 MOV EDI,dword ptr [RSP + 0xc] LAB_0010f4ed: PUSH 0x6 POP RSI XOR EAX,EAX CALL 0x00108320 CMP EAX,-0x1 JZ 0x0010f6a9 LEA R15,[R14 + 0x98] MOV EDI,dword ptr [RSP + 0xc] OR dword ptr [RSP + 0xc],0xffffffff LEA RSI,[0x12102e] CALL 0x00108600 MOV RDI,R15 MOV RSI,RAX CALL 0x0010b0c6 CMP qword ptr [R14 + 0x98],0x0 JZ 0x0010f69a MOV BPL,0x1 CMP qword ptr [R14 + 0x60],0x0 JZ 0x0010f6ab LEA R12,[R14 + 0x58] PUSH 0x2f POP RSI MOV RDI,RBX CALL 0x00108640 MOV R15,RAX LAB_0010f555: LEA RDI,[RSP + 0x10] PUSH 0x2e POP RDX MOV RSI,R12 CALL 0x00110aba MOV EAX,dword ptr [R14 + 0xa0] LEA RCX,[0x1305c0] MOV RDX,qword ptr [RCX + RAX*0x8] LAB_0010f577: LEA RDI,[RSP + 0x90] LEA RSI,[RSP + 0x10] CALL 0x00110a7c LEA RDI,[RSP + 0x10] CALL 0x00108b78 LEA RAX,[RSP + 0x20] MOV qword ptr [RAX + -0x10],RAX AND qword ptr [RAX + -0x8],0x0 MOV byte ptr [RAX],0x0 TEST R15,R15 JZ 0x0010f5dd LEA RAX,[RSP + 0x60] MOV qword ptr [RAX + -0x10],RAX LEA RDX,[R15 + 0x1] LAB_0010f5b6: LEA RDI,[RSP + 0x50] MOV RSI,RBX CALL 0x0010b030 LEA RDI,[RSP + 0x10] LEA R14,[RSP + 0x50] MOV RSI,R14 CALL 0x00108720 MOV RDI,R14 CALL 0x00108b78 LAB_0010f5dd: LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x90] CALL 0x00108af0 MOV RDI,qword ptr [RSP + 0x10] CALL 0x00108270 LEA RDI,[R15 + 0x1] TEST R15,R15 CMOVZ RDI,RBX MOV RSI,qword ptr [RSP + 0x10] CALL 0x00108060 LEA RAX,[0x130598] MOV RSI,qword ptr [RAX] CMP qword ptr [RSI + 0x8],0x0 JZ 0x0010f681 LAB_0010f61f: LEA RDX,[0x1209f1] LEA RDI,[RSP + 0x70] CALL 0x0010a6e0 LAB_0010f630: LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0x70] LEA RDX,[RSP + 0x90] CALL 0x00110a9b LAB_0010f647: LEA R14,[RSP + 0x10] LEA R15,[RSP + 0x50] MOV RDI,R14 MOV RSI,R15 CALL 0x00108720 MOV RDI,R15 CALL 0x00108b78 LEA RDI,[RSP + 0x70] CALL 0x00108b78 MOV RDI,qword ptr [R14] CALL 0x00108270 MOV RSI,qword ptr [R14] MOV RDI,RBX CALL 0x00108060 LAB_0010f681: LEA RDI,[RSP + 0x10] CALL 0x00108b78 LEA RDI,[RSP + 0x90] CALL 0x00108b78 JMP 0x0010f6ab LAB_0010f69a: CMP byte ptr [R12],0x1 JNZ 0x0010f6a9 MOV RDI,RBX CALL 0x00108270 LAB_0010f6a9: XOR EBP,EBP LAB_0010f6ab: LEA RDI,[RSP + 0xc] CALL 0x0010a478 LEA RDI,[RSP + 0x30] CALL 0x00108b78 MOV EAX,EBP ADD RSP,0x120 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* nglog::(anonymous namespace)::LogFileObject::CreateLogfile(std::__cxx11::string const&) */ ulong nglog::(anonymous_namespace)::LogFileObject::CreateLogfile(string *param_1) { int iVar1; int iVar2; FILE *pFVar3; char *pcVar4; uint uVar5; int8 unaff_RBP; ulong uVar6; uint uVar7; char *__from; int local_13c; char *local_138; int8 local_130; char local_128 [16]; char *local_118 [4]; int1 *local_f8 [2]; int1 local_e8 [16]; string local_d8 [32]; stat local_b8; std::__cxx11::string::string((string *)local_118,param_1 + 0x38); if (fLB::FLAGS_timestamp_in_logfile_name == '\x01') { /* try { // try from 0010f423 to 0010f43d has its CatchHandler @ 0010f71f */ std::__cxx11::string::append((string *)local_118); } std::__cxx11::string::append((string *)local_118); uVar7 = 0xc1; if (fLB::FLAGS_timestamp_in_logfile_name == '\0') { iVar1 = stat(local_118[0],&local_b8); uVar7 = fLU::FLAGS_max_log_size; if (iVar1 == 0) { *(uint *)(param_1 + 0xac) = (uint)local_b8.st_size; uVar5 = 1; if (uVar7 - 1 < 0xfff) { uVar5 = uVar7; } uVar7 = (uint)(uVar5 <= (uint)local_b8.st_size >> 0x14) << 9 | 0x41; } else { uVar7 = 0x41; } } /* try { // try from 0010f4a8 to 0010f4b1 has its CatchHandler @ 0010f71d */ local_13c = open(local_118[0],uVar7,(ulong)fLI::FLAGS_logfile_mode); if (local_13c != -1) { /* try { // try from 0010f4bf to 0010f4cd has its CatchHandler @ 0010f70e */ fcntl(local_13c,2,1); CreateLogfile(std::__cxx11::string_const&)::w_lock._0_4_ = 1; CreateLogfile(std::__cxx11::string_const&)::w_lock._8_8_ = 0; CreateLogfile(std::__cxx11::string_const&)::w_lock._16_8_ = 0; /* try { // try from 0010f4ed to 0010f4f6 has its CatchHandler @ 0010f70c */ iVar2 = fcntl(local_13c,6,CreateLogfile(std::__cxx11::string_const&)::w_lock); iVar1 = local_13c; if (iVar2 != -1) { local_13c = -1; pFVar3 = fdopen(iVar1,"a"); std::__uniq_ptr_impl<_IO_FILE,std::default_delete<_IO_FILE>>::reset ((__uniq_ptr_impl<_IO_FILE,std::default_delete<_IO_FILE>> *)(param_1 + 0x98),pFVar3) ; if (*(long *)(param_1 + 0x98) != 0) { uVar6 = CONCAT71((int7)((ulong)unaff_RBP >> 8),1); if (*(long *)(param_1 + 0x60) != 0) { pcVar4 = strrchr(local_118[0],0x2f); /* try { // try from 0010f555 to 0010f564 has its CatchHandler @ 0010f70a */ std::operator+((string *)&local_138,(char)param_1 + 'X'); /* try { // try from 0010f577 to 0010f588 has its CatchHandler @ 0010f6fb */ std::operator+((string *)&local_b8,(char *)&local_138); std::__cxx11::string::~string((string *)&local_138); local_138 = local_128; local_130 = 0; local_128[0] = '\0'; if (pcVar4 != (char *)0x0) { local_f8[0] = local_e8; /* try { // try from 0010f5b6 to 0010f5c2 has its CatchHandler @ 0010f6e2 */ std::__cxx11::string::_M_construct<char_const*>(local_f8,local_118[0],pcVar4 + 1); std::__cxx11::string::operator=((string *)&local_138,(string *)local_f8); std::__cxx11::string::~string((string *)local_f8); } /* try { // try from 0010f5dd to 0010f5ee has its CatchHandler @ 0010f6e4 */ std::__cxx11::string::append((string *)&local_138); unlink(local_138); __from = pcVar4 + 1; if (pcVar4 == (char *)0x0) { __from = local_118[0]; } symlink(__from,local_138); if (*(long *)(fLS::FLAGS_log_link_abi_cxx11_ + 8) != 0) { /* try { // try from 0010f61f to 0010f62f has its CatchHandler @ 0010f6e0 */ std::operator+(local_d8,fLS::FLAGS_log_link_abi_cxx11_); /* try { // try from 0010f630 to 0010f646 has its CatchHandler @ 0010f6d1 */ std::operator+((string *)local_f8,local_d8); std::__cxx11::string::operator=((string *)&local_138,(string *)local_f8); std::__cxx11::string::~string((string *)local_f8); std::__cxx11::string::~string(local_d8); unlink(local_138); symlink(local_118[0],local_138); } std::__cxx11::string::~string((string *)&local_138); std::__cxx11::string::~string((string *)&local_b8); } goto LAB_0010f6ab; } if (fLB::FLAGS_timestamp_in_logfile_name == '\x01') { unlink(local_118[0]); } } } uVar6 = 0; LAB_0010f6ab: tools::FileDescriptor::safe_close((FileDescriptor *)&local_13c); std::__cxx11::string::~string((string *)local_118); return uVar6 & 0xffffffff; }
55,270
Binary_string::realloc_with_extra(unsigned long)
eloqsql/sql/sql_string.h
bool realloc_with_extra(size_t arg_length) { if (extra_alloc < 4096) extra_alloc= extra_alloc*2+128; if (realloc_raw(arg_length + extra_alloc)) return TRUE; Ptr[arg_length]=0; // This make other funcs shorter return FALSE; }
O3
c
Binary_string::realloc_with_extra(unsigned long): pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 movl 0x10(%rdi), %eax cmpl $0xfff, %eax # imm = 0xFFF ja 0x71356 leal 0x80(,%rax,2), %eax movl %eax, 0x10(%r14) movl %eax, %esi addq %rbx, %rsi movq %r14, %rdi callq 0x713f4 testb %al, %al jne 0x7136e movq (%r14), %rcx movb $0x0, (%rcx,%rbx) popq %rbx popq %r14 popq %rbp retq nop
_ZN13Binary_string18realloc_with_extraEm: push rbp mov rbp, rsp push r14 push rbx mov rbx, rsi mov r14, rdi mov eax, [rdi+10h] cmp eax, 0FFFh ja short loc_71356 lea eax, ds:80h[rax*2] mov [r14+10h], eax loc_71356: mov esi, eax add rsi, rbx; unsigned __int64 mov rdi, r14; this call _ZN13Binary_string11realloc_rawEm; Binary_string::realloc_raw(ulong) test al, al jnz short loc_7136E mov rcx, [r14] mov byte ptr [rcx+rbx], 0 loc_7136E: pop rbx pop r14 pop rbp retn
long long Binary_string::realloc_with_extra(Binary_string *this, long long a2) { unsigned int v2; // eax long long result; // rax v2 = *((_DWORD *)this + 4); if ( v2 <= 0xFFF ) { v2 = 2 * v2 + 128; *((_DWORD *)this + 4) = v2; } result = Binary_string::realloc_raw(this, a2 + v2); if ( !(_BYTE)result ) *(_BYTE *)(*(_QWORD *)this + a2) = 0; return result; }
realloc_with_extra: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RSI MOV R14,RDI MOV EAX,dword ptr [RDI + 0x10] CMP EAX,0xfff JA 0x00171356 LEA EAX,[0x80 + RAX*0x2] MOV dword ptr [R14 + 0x10],EAX LAB_00171356: MOV ESI,EAX ADD RSI,RBX MOV RDI,R14 CALL 0x001713f4 TEST AL,AL JNZ 0x0017136e MOV RCX,qword ptr [R14] MOV byte ptr [RCX + RBX*0x1],0x0 LAB_0017136e: POP RBX POP R14 POP RBP RET
/* Binary_string::realloc_with_extra(unsigned long) */ void __thiscall Binary_string::realloc_with_extra(Binary_string *this,ulong param_1) { char cVar1; uint uVar2; uVar2 = *(uint *)(this + 0x10); if (uVar2 < 0x1000) { uVar2 = uVar2 * 2 + 0x80; *(uint *)(this + 0x10) = uVar2; } cVar1 = realloc_raw(this,uVar2 + param_1); if (cVar1 == '\0') { *(int1 *)(*(long *)this + param_1) = 0; } return; }
55,271
httplib::detail::mmap::open(char const*)
hkr04[P]cpp-mcp/common/httplib.h
inline bool mmap::open(const char *path) { close(); #if defined(_WIN32) auto wpath = u8string_to_wstring(path); if (wpath.empty()) { return false; } #if _WIN32_WINNT >= _WIN32_WINNT_WIN8 hFile_ = ::CreateFile2(wpath.c_str(), GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING, NULL); #else hFile_ = ::CreateFileW(wpath.c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); #endif if (hFile_ == INVALID_HANDLE_VALUE) { return false; } LARGE_INTEGER size{}; if (!::GetFileSizeEx(hFile_, &size)) { return false; } // If the following line doesn't compile due to QuadPart, update Windows SDK. // See: // https://github.com/yhirose/cpp-httplib/issues/1903#issuecomment-2316520721 if (static_cast<ULONGLONG>(size.QuadPart) > (std::numeric_limits<decltype(size_)>::max)()) { // `size_t` might be 32-bits, on 32-bits Windows. return false; } size_ = static_cast<size_t>(size.QuadPart); #if _WIN32_WINNT >= _WIN32_WINNT_WIN8 hMapping_ = ::CreateFileMappingFromApp(hFile_, NULL, PAGE_READONLY, size_, NULL); #else hMapping_ = ::CreateFileMappingW(hFile_, NULL, PAGE_READONLY, 0, 0, NULL); #endif // Special treatment for an empty file... if (hMapping_ == NULL && size_ == 0) { close(); is_open_empty_file = true; return true; } if (hMapping_ == NULL) { close(); return false; } #if _WIN32_WINNT >= _WIN32_WINNT_WIN8 addr_ = ::MapViewOfFileFromApp(hMapping_, FILE_MAP_READ, 0, 0); #else addr_ = ::MapViewOfFile(hMapping_, FILE_MAP_READ, 0, 0, 0); #endif if (addr_ == nullptr) { close(); return false; } #else fd_ = ::open(path, O_RDONLY); if (fd_ == -1) { return false; } struct stat sb; if (fstat(fd_, &sb) == -1) { close(); return false; } size_ = static_cast<size_t>(sb.st_size); addr_ = ::mmap(NULL, size_, PROT_READ, MAP_PRIVATE, fd_, 0); // Special treatment for an empty file... if (addr_ == MAP_FAILED && size_ == 0) { close(); is_open_empty_file = true; return false; } #endif return true; }
O1
c
httplib::detail::mmap::open(char const*): pushq %rbp pushq %r14 pushq %rbx subq $0x90, %rsp movq %rsi, %r14 movq %rdi, %rbx movq 0x10(%rdi), %rdi testq %rdi, %rdi je 0x3f099 movq 0x8(%rbx), %rsi callq 0xa370 movq $0x0, 0x10(%rbx) movl (%rbx), %edi cmpl $-0x1, %edi je 0x3f0ab callq 0xab50 movl $0xffffffff, (%rbx) # imm = 0xFFFFFFFF movq $0x0, 0x8(%rbx) xorl %ebp, %ebp movq %r14, %rdi xorl %esi, %esi xorl %eax, %eax callq 0xa4b0 movl %eax, (%rbx) cmpl $-0x1, %eax je 0x3f17c movq %rsp, %rsi movl %eax, %edi callq 0xa980 cmpl $-0x1, %eax je 0x3f146 movq 0x30(%rsp), %rsi movq %rsi, 0x8(%rbx) movl (%rbx), %r8d xorl %edi, %edi movl $0x1, %edx movl $0x2, %ecx xorl %r9d, %r9d callq 0xaa70 movq %rax, 0x10(%rbx) movq %rax, %rcx notq %rcx movq 0x8(%rbx), %rsi movb $0x1, %bpl orq %rsi, %rcx jne 0x3f17c testq %rax, %rax je 0x3f126 movq %rax, %rdi callq 0xa370 movq $0x0, 0x10(%rbx) movl (%rbx), %edi cmpl $-0x1, %edi je 0x3f138 callq 0xab50 movl $0xffffffff, (%rbx) # imm = 0xFFFFFFFF movq $0x0, 0x8(%rbx) movb $0x1, 0x18(%rbx) jmp 0x3f17a movq 0x10(%rbx), %rdi testq %rdi, %rdi je 0x3f160 movq 0x8(%rbx), %rsi callq 0xa370 movq $0x0, 0x10(%rbx) movl (%rbx), %edi cmpl $-0x1, %edi je 0x3f172 callq 0xab50 movl $0xffffffff, (%rbx) # imm = 0xFFFFFFFF movq $0x0, 0x8(%rbx) xorl %ebp, %ebp movl %ebp, %eax addq $0x90, %rsp popq %rbx popq %r14 popq %rbp retq
_ZN7httplib6detail4mmap4openEPKc: push rbp push r14 push rbx sub rsp, 90h mov r14, rsi mov rbx, rdi mov rdi, [rdi+10h] test rdi, rdi jz short loc_3F099 mov rsi, [rbx+8] call _munmap mov qword ptr [rbx+10h], 0 loc_3F099: mov edi, [rbx] cmp edi, 0FFFFFFFFh jz short loc_3F0AB call _close mov dword ptr [rbx], 0FFFFFFFFh loc_3F0AB: mov qword ptr [rbx+8], 0 xor ebp, ebp mov rdi, r14 xor esi, esi xor eax, eax call _open mov [rbx], eax cmp eax, 0FFFFFFFFh jz loc_3F17C mov rsi, rsp mov edi, eax call _fstat cmp eax, 0FFFFFFFFh jz short loc_3F146 mov rsi, [rsp+0A8h+var_78] mov [rbx+8], rsi mov r8d, [rbx] xor edi, edi mov edx, 1 mov ecx, 2 xor r9d, r9d call _mmap mov [rbx+10h], rax mov rcx, rax not rcx mov rsi, [rbx+8] mov bpl, 1 or rcx, rsi jnz short loc_3F17C test rax, rax jz short loc_3F126 mov rdi, rax call _munmap mov qword ptr [rbx+10h], 0 loc_3F126: mov edi, [rbx] cmp edi, 0FFFFFFFFh jz short loc_3F138 call _close mov dword ptr [rbx], 0FFFFFFFFh loc_3F138: mov qword ptr [rbx+8], 0 mov byte ptr [rbx+18h], 1 jmp short loc_3F17A loc_3F146: mov rdi, [rbx+10h] test rdi, rdi jz short loc_3F160 mov rsi, [rbx+8] call _munmap mov qword ptr [rbx+10h], 0 loc_3F160: mov edi, [rbx] cmp edi, 0FFFFFFFFh jz short loc_3F172 call _close mov dword ptr [rbx], 0FFFFFFFFh loc_3F172: mov qword ptr [rbx+8], 0 loc_3F17A: xor ebp, ebp loc_3F17C: mov eax, ebp add rsp, 90h pop rbx pop r14 pop rbp retn
long long httplib::detail::mmap::open(httplib::detail::mmap *this, const char *a2) { long long v3; // rdi long long v4; // rdi unsigned int v5; // ebp unsigned int v6; // eax long long v7; // rsi long long v8; // rax long long v9; // rsi long long v10; // rdi long long v11; // rdi long long v12; // rdi long long v14; // [rsp+0h] [rbp-A8h] BYREF long long v15; // [rsp+30h] [rbp-78h] v3 = *((_QWORD *)this + 2); if ( v3 ) { munmap(v3, *((_QWORD *)this + 1)); *((_QWORD *)this + 2) = 0LL; } v4 = *(unsigned int *)this; if ( (_DWORD)v4 != -1 ) { close(v4); *(_DWORD *)this = -1; } *((_QWORD *)this + 1) = 0LL; v5 = 0; v6 = open(a2, 0LL); *(_DWORD *)this = v6; if ( v6 != -1 ) { if ( (unsigned int)fstat(v6, &v14) == -1 ) { v11 = *((_QWORD *)this + 2); if ( v11 ) { munmap(v11, *((_QWORD *)this + 1)); *((_QWORD *)this + 2) = 0LL; } v12 = *(unsigned int *)this; if ( (_DWORD)v12 != -1 ) { close(v12); *(_DWORD *)this = -1; } *((_QWORD *)this + 1) = 0LL; return 0; } v7 = v15; *((_QWORD *)this + 1) = v15; v8 = mmap(0LL, v7, 1LL, 2LL, *(unsigned int *)this, 0LL); *((_QWORD *)this + 2) = v8; v9 = *((_QWORD *)this + 1); LOBYTE(v5) = 1; if ( !(v9 | ~v8) ) { if ( v8 ) { munmap(v8, v9); *((_QWORD *)this + 2) = 0LL; } v10 = *(unsigned int *)this; if ( (_DWORD)v10 != -1 ) { close(v10); *(_DWORD *)this = -1; } *((_QWORD *)this + 1) = 0LL; *((_BYTE *)this + 24) = 1; return 0; } } return v5; }
open: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x90 MOV R14,RSI MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x10] TEST RDI,RDI JZ 0x0013f099 MOV RSI,qword ptr [RBX + 0x8] CALL 0x0010a370 MOV qword ptr [RBX + 0x10],0x0 LAB_0013f099: MOV EDI,dword ptr [RBX] CMP EDI,-0x1 JZ 0x0013f0ab CALL 0x0010ab50 MOV dword ptr [RBX],0xffffffff LAB_0013f0ab: MOV qword ptr [RBX + 0x8],0x0 XOR EBP,EBP MOV RDI,R14 XOR ESI,ESI XOR EAX,EAX CALL 0x0010a4b0 MOV dword ptr [RBX],EAX CMP EAX,-0x1 JZ 0x0013f17c MOV RSI,RSP MOV EDI,EAX CALL 0x0010a980 CMP EAX,-0x1 JZ 0x0013f146 MOV RSI,qword ptr [RSP + 0x30] MOV qword ptr [RBX + 0x8],RSI MOV R8D,dword ptr [RBX] XOR EDI,EDI MOV EDX,0x1 MOV ECX,0x2 XOR R9D,R9D CALL 0x0010aa70 MOV qword ptr [RBX + 0x10],RAX MOV RCX,RAX NOT RCX MOV RSI,qword ptr [RBX + 0x8] MOV BPL,0x1 OR RCX,RSI JNZ 0x0013f17c TEST RAX,RAX JZ 0x0013f126 MOV RDI,RAX CALL 0x0010a370 MOV qword ptr [RBX + 0x10],0x0 LAB_0013f126: MOV EDI,dword ptr [RBX] CMP EDI,-0x1 JZ 0x0013f138 CALL 0x0010ab50 MOV dword ptr [RBX],0xffffffff LAB_0013f138: MOV qword ptr [RBX + 0x8],0x0 MOV byte ptr [RBX + 0x18],0x1 JMP 0x0013f17a LAB_0013f146: MOV RDI,qword ptr [RBX + 0x10] TEST RDI,RDI JZ 0x0013f160 MOV RSI,qword ptr [RBX + 0x8] CALL 0x0010a370 MOV qword ptr [RBX + 0x10],0x0 LAB_0013f160: MOV EDI,dword ptr [RBX] CMP EDI,-0x1 JZ 0x0013f172 CALL 0x0010ab50 MOV dword ptr [RBX],0xffffffff LAB_0013f172: MOV qword ptr [RBX + 0x8],0x0 LAB_0013f17a: XOR EBP,EBP LAB_0013f17c: MOV EAX,EBP ADD RSP,0x90 POP RBX POP R14 POP RBP RET
/* httplib::detail::mmap::open(char const*) */ int8 __thiscall httplib::detail::mmap::open(mmap *this,char *param_1) { int iVar1; void *__addr; stat sStack_a8; if (*(void **)(this + 0x10) != (void *)0x0) { munmap(*(void **)(this + 0x10),*(size_t *)(this + 8)); *(int8 *)(this + 0x10) = 0; } if (*(int *)this != -1) { close(*(int *)this); *(int4 *)this = 0xffffffff; } *(int8 *)(this + 8) = 0; iVar1 = ::open(param_1,0); *(int *)this = iVar1; if (iVar1 != -1) { iVar1 = fstat(iVar1,&sStack_a8); if (iVar1 == -1) { if (*(void **)(this + 0x10) != (void *)0x0) { munmap(*(void **)(this + 0x10),*(size_t *)(this + 8)); *(int8 *)(this + 0x10) = 0; } if (*(int *)this != -1) { close(*(int *)this); *(int4 *)this = 0xffffffff; } *(int8 *)(this + 8) = 0; } else { *(__off_t *)(this + 8) = sStack_a8.st_size; __addr = ::mmap((void *)0x0,sStack_a8.st_size,1,2,*(int *)this,0); *(void **)(this + 0x10) = __addr; if (__addr != (void *)0xffffffffffffffff || *(size_t *)(this + 8) != 0) { return 1; } if (__addr != (void *)0x0) { munmap(__addr,*(size_t *)(this + 8)); *(int8 *)(this + 0x10) = 0; } if (*(int *)this != -1) { close(*(int *)this); *(int4 *)this = 0xffffffff; } *(int8 *)(this + 8) = 0; this[0x18] = (mmap)0x1; } } return 0; }
55,272
ma_write_static_record
eloqsql/storage/maria/ma_statrec.c
my_bool _ma_write_static_record(MARIA_HA *info, const uchar *record) { uchar temp[8]; /* max pointer length */ if (info->s->state.dellink != HA_OFFSET_ERROR && !info->append_insert_at_end) { my_off_t filepos=info->s->state.dellink; info->rec_cache.seek_not_done=1; /* We have done a seek */ if (info->s->file_read(info, &temp[0],info->s->base.rec_reflength, info->s->state.dellink+1, MYF(MY_NABP))) goto err; info->s->state.dellink= _ma_rec_pos(info->s, temp); info->state->del--; info->state->empty-=info->s->base.pack_reclength; if (info->s->file_write(info, record, info->s->base.reclength, filepos, MYF(MY_NABP))) goto err; } else { if (info->state->data_file_length > info->s->base.max_data_file_length- info->s->base.pack_reclength) { my_errno=HA_ERR_RECORD_FILE_FULL; return(2); } if (info->opt_flag & WRITE_CACHE_USED) { /* Cash in use */ if (my_b_write(&info->rec_cache, record, info->s->base.reclength)) goto err; if (info->s->base.pack_reclength != info->s->base.reclength) { uint length=info->s->base.pack_reclength - info->s->base.reclength; bzero(temp,length); if (my_b_write(&info->rec_cache, temp,length)) goto err; } } else { info->rec_cache.seek_not_done=1; /* We have done a seek */ if (info->s->file_write(info, record, info->s->base.reclength, info->state->data_file_length, info->s->write_flag)) goto err; if (info->s->base.pack_reclength != info->s->base.reclength) { uint length=info->s->base.pack_reclength - info->s->base.reclength; bzero(temp,length); if (info->s->file_write(info, temp,length, info->state->data_file_length+ info->s->base.reclength, info->s->write_flag)) goto err; } } info->state->data_file_length+=info->s->base.pack_reclength; info->s->state.split++; } return 0; err: return 1; }
O0
c
ma_write_static_record: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x20(%rbp) movq %rsi, -0x28(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax cmpq $-0x1, 0xc8(%rax) je 0x732c3 movq -0x20(%rbp), %rax cmpb $0x0, 0x681(%rax) jne 0x732c3 movq -0x20(%rbp), %rax movq (%rax), %rax movq 0xc8(%rax), %rax movq %rax, -0x30(%rbp) movq -0x20(%rbp), %rax movl $0x1, 0x598(%rax) movq -0x20(%rbp), %rax movq (%rax), %rax movq 0x6e0(%rax), %rax movq -0x20(%rbp), %rdi leaq -0x10(%rbp), %rsi movq -0x20(%rbp), %rcx movq (%rcx), %rcx movl 0x3e0(%rcx), %ecx movl %ecx, %edx movq -0x20(%rbp), %rcx movq (%rcx), %rcx movq 0xc8(%rcx), %rcx addq $0x1, %rcx movl $0x4, %r8d callq *%rax cmpq $0x0, %rax je 0x7322d jmp 0x734f1 movq -0x20(%rbp), %rax movq (%rax), %rdi leaq -0x10(%rbp), %rsi callq 0x6b240 movq %rax, %rcx movq -0x20(%rbp), %rax movq (%rax), %rax movq %rcx, 0xc8(%rax) movq -0x20(%rbp), %rax movq 0x20(%rax), %rax movq 0x8(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x8(%rax) movq -0x20(%rbp), %rax movq (%rax), %rax movq 0x3a0(%rax), %rdx movq -0x20(%rbp), %rax movq 0x20(%rax), %rax movq 0x10(%rax), %rcx subq %rdx, %rcx movq %rcx, 0x10(%rax) movq -0x20(%rbp), %rax movq (%rax), %rax movq 0x6e8(%rax), %rax movq -0x20(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x20(%rbp), %rcx movq (%rcx), %rcx movq 0x398(%rcx), %rdx movq -0x30(%rbp), %rcx movl $0x4, %r8d callq *%rax cmpq $0x0, %rax je 0x732be jmp 0x734f1 jmp 0x734eb movq -0x20(%rbp), %rax movq 0x20(%rax), %rax movq 0x28(%rax), %rax movq -0x20(%rbp), %rcx movq (%rcx), %rcx movq 0x368(%rcx), %rcx movq -0x20(%rbp), %rdx movq (%rdx), %rdx subq 0x3a0(%rdx), %rcx cmpq %rcx, %rax jbe 0x73304 callq 0xf6090 movl $0x87, (%rax) movb $0x2, -0x11(%rbp) jmp 0x734f5 movq -0x20(%rbp), %rax movl 0x61c(%rax), %eax andl $0x10, %eax cmpl $0x0, %eax je 0x733bd movq -0x20(%rbp), %rdi addq $0x4b8, %rdi # imm = 0x4B8 movq -0x28(%rbp), %rsi movq -0x20(%rbp), %rax movq (%rax), %rax movq 0x398(%rax), %rdx callq 0x73520 cmpl $0x0, %eax je 0x73346 jmp 0x734f1 movq -0x20(%rbp), %rax movq (%rax), %rax movq 0x3a0(%rax), %rax movq -0x20(%rbp), %rcx movq (%rcx), %rcx cmpq 0x398(%rcx), %rax je 0x733b8 movq -0x20(%rbp), %rax movq (%rax), %rax movq 0x3a0(%rax), %rax movq -0x20(%rbp), %rcx movq (%rcx), %rcx subq 0x398(%rcx), %rax movl %eax, -0x34(%rbp) leaq -0x10(%rbp), %rdi movl -0x34(%rbp), %eax movl %eax, %edx xorl %esi, %esi callq 0x2a2c0 movq -0x20(%rbp), %rdi addq $0x4b8, %rdi # imm = 0x4B8 leaq -0x10(%rbp), %rsi movl -0x34(%rbp), %eax movl %eax, %edx callq 0x73520 cmpl $0x0, %eax je 0x733b6 jmp 0x734f1 jmp 0x733b8 jmp 0x734b4 movq -0x20(%rbp), %rax movl $0x1, 0x598(%rax) movq -0x20(%rbp), %rax movq (%rax), %rax movq 0x6e8(%rax), %rax movq -0x20(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x20(%rbp), %rcx movq (%rcx), %rcx movq 0x398(%rcx), %rdx movq -0x20(%rbp), %rcx movq 0x20(%rcx), %rcx movq 0x28(%rcx), %rcx movq -0x20(%rbp), %r8 movq (%r8), %r8 movq 0x7c8(%r8), %r8 callq *%rax cmpq $0x0, %rax je 0x73416 jmp 0x734f1 movq -0x20(%rbp), %rax movq (%rax), %rax movq 0x3a0(%rax), %rax movq -0x20(%rbp), %rcx movq (%rcx), %rcx cmpq 0x398(%rcx), %rax je 0x734b2 movq -0x20(%rbp), %rax movq (%rax), %rax movq 0x3a0(%rax), %rax movq -0x20(%rbp), %rcx movq (%rcx), %rcx subq 0x398(%rcx), %rax movl %eax, -0x38(%rbp) leaq -0x10(%rbp), %rdi movl -0x38(%rbp), %eax movl %eax, %edx xorl %esi, %esi callq 0x2a2c0 movq -0x20(%rbp), %rax movq (%rax), %rax movq 0x6e8(%rax), %rax movq -0x20(%rbp), %rdi leaq -0x10(%rbp), %rsi movl -0x38(%rbp), %ecx movl %ecx, %edx movq -0x20(%rbp), %rcx movq 0x20(%rcx), %rcx movq 0x28(%rcx), %rcx movq -0x20(%rbp), %r8 movq (%r8), %r8 addq 0x398(%r8), %rcx movq -0x20(%rbp), %r8 movq (%r8), %r8 movq 0x7c8(%r8), %r8 callq *%rax cmpq $0x0, %rax je 0x734b0 jmp 0x734f1 jmp 0x734b2 jmp 0x734b4 movq -0x20(%rbp), %rax movq (%rax), %rax movq 0x3a0(%rax), %rcx movq -0x20(%rbp), %rax movq 0x20(%rax), %rax addq 0x28(%rax), %rcx movq %rcx, 0x28(%rax) movq -0x20(%rbp), %rax movq (%rax), %rax movq 0xc0(%rax), %rcx addq $0x1, %rcx movq %rcx, 0xc0(%rax) movb $0x0, -0x11(%rbp) jmp 0x734f5 movb $0x1, -0x11(%rbp) movb -0x11(%rbp), %al movb %al, -0x39(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x73516 movb -0x39(%rbp), %al addq $0x40, %rsp popq %rbp retq callq 0x2a270 nopl (%rax,%rax)
_ma_write_static_record: push rbp mov rbp, rsp sub rsp, 40h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_20], rdi mov [rbp+var_28], rsi mov rax, [rbp+var_20] mov rax, [rax] cmp qword ptr [rax+0C8h], 0FFFFFFFFFFFFFFFFh jz loc_732C3 mov rax, [rbp+var_20] cmp byte ptr [rax+681h], 0 jnz loc_732C3 mov rax, [rbp+var_20] mov rax, [rax] mov rax, [rax+0C8h] mov [rbp+var_30], rax mov rax, [rbp+var_20] mov dword ptr [rax+598h], 1 mov rax, [rbp+var_20] mov rax, [rax] mov rax, [rax+6E0h] mov rdi, [rbp+var_20] lea rsi, [rbp+var_10] mov rcx, [rbp+var_20] mov rcx, [rcx] mov ecx, [rcx+3E0h] mov edx, ecx mov rcx, [rbp+var_20] mov rcx, [rcx] mov rcx, [rcx+0C8h] add rcx, 1 mov r8d, 4 call rax cmp rax, 0 jz short loc_7322D jmp loc_734F1 loc_7322D: mov rax, [rbp+var_20] mov rdi, [rax] lea rsi, [rbp+var_10] call _ma_rec_pos mov rcx, rax mov rax, [rbp+var_20] mov rax, [rax] mov [rax+0C8h], rcx mov rax, [rbp+var_20] mov rax, [rax+20h] mov rcx, [rax+8] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+8], rcx mov rax, [rbp+var_20] mov rax, [rax] mov rdx, [rax+3A0h] mov rax, [rbp+var_20] mov rax, [rax+20h] mov rcx, [rax+10h] sub rcx, rdx mov [rax+10h], rcx mov rax, [rbp+var_20] mov rax, [rax] mov rax, [rax+6E8h] mov rdi, [rbp+var_20] mov rsi, [rbp+var_28] mov rcx, [rbp+var_20] mov rcx, [rcx] mov rdx, [rcx+398h] mov rcx, [rbp+var_30] mov r8d, 4 call rax cmp rax, 0 jz short loc_732BE jmp loc_734F1 loc_732BE: jmp loc_734EB loc_732C3: mov rax, [rbp+var_20] mov rax, [rax+20h] mov rax, [rax+28h] mov rcx, [rbp+var_20] mov rcx, [rcx] mov rcx, [rcx+368h] mov rdx, [rbp+var_20] mov rdx, [rdx] sub rcx, [rdx+3A0h] cmp rax, rcx jbe short loc_73304 call _my_thread_var mov dword ptr [rax], 87h mov [rbp+var_11], 2 jmp loc_734F5 loc_73304: mov rax, [rbp+var_20] mov eax, [rax+61Ch] and eax, 10h cmp eax, 0 jz loc_733BD mov rdi, [rbp+var_20] add rdi, 4B8h mov rsi, [rbp+var_28] mov rax, [rbp+var_20] mov rax, [rax] mov rdx, [rax+398h] call my_b_write_0 cmp eax, 0 jz short loc_73346 jmp loc_734F1 loc_73346: mov rax, [rbp+var_20] mov rax, [rax] mov rax, [rax+3A0h] mov rcx, [rbp+var_20] mov rcx, [rcx] cmp rax, [rcx+398h] jz short loc_733B8 mov rax, [rbp+var_20] mov rax, [rax] mov rax, [rax+3A0h] mov rcx, [rbp+var_20] mov rcx, [rcx] sub rax, [rcx+398h] mov [rbp+var_34], eax lea rdi, [rbp+var_10] mov eax, [rbp+var_34] mov edx, eax xor esi, esi call _memset mov rdi, [rbp+var_20] add rdi, 4B8h lea rsi, [rbp+var_10] mov eax, [rbp+var_34] mov edx, eax call my_b_write_0 cmp eax, 0 jz short loc_733B6 jmp loc_734F1 loc_733B6: jmp short $+2 loc_733B8: jmp loc_734B4 loc_733BD: mov rax, [rbp+var_20] mov dword ptr [rax+598h], 1 mov rax, [rbp+var_20] mov rax, [rax] mov rax, [rax+6E8h] mov rdi, [rbp+var_20] mov rsi, [rbp+var_28] mov rcx, [rbp+var_20] mov rcx, [rcx] mov rdx, [rcx+398h] mov rcx, [rbp+var_20] mov rcx, [rcx+20h] mov rcx, [rcx+28h] mov r8, [rbp+var_20] mov r8, [r8] mov r8, [r8+7C8h] call rax cmp rax, 0 jz short loc_73416 jmp loc_734F1 loc_73416: mov rax, [rbp+var_20] mov rax, [rax] mov rax, [rax+3A0h] mov rcx, [rbp+var_20] mov rcx, [rcx] cmp rax, [rcx+398h] jz short loc_734B2 mov rax, [rbp+var_20] mov rax, [rax] mov rax, [rax+3A0h] mov rcx, [rbp+var_20] mov rcx, [rcx] sub rax, [rcx+398h] mov [rbp+var_38], eax lea rdi, [rbp+var_10] mov eax, [rbp+var_38] mov edx, eax xor esi, esi call _memset mov rax, [rbp+var_20] mov rax, [rax] mov rax, [rax+6E8h] mov rdi, [rbp+var_20] lea rsi, [rbp+var_10] mov ecx, [rbp+var_38] mov edx, ecx mov rcx, [rbp+var_20] mov rcx, [rcx+20h] mov rcx, [rcx+28h] mov r8, [rbp+var_20] mov r8, [r8] add rcx, [r8+398h] mov r8, [rbp+var_20] mov r8, [r8] mov r8, [r8+7C8h] call rax cmp rax, 0 jz short loc_734B0 jmp short loc_734F1 loc_734B0: jmp short $+2 loc_734B2: jmp short $+2 loc_734B4: mov rax, [rbp+var_20] mov rax, [rax] mov rcx, [rax+3A0h] mov rax, [rbp+var_20] mov rax, [rax+20h] add rcx, [rax+28h] mov [rax+28h], rcx mov rax, [rbp+var_20] mov rax, [rax] mov rcx, [rax+0C0h] add rcx, 1 mov [rax+0C0h], rcx loc_734EB: mov [rbp+var_11], 0 jmp short loc_734F5 loc_734F1: mov [rbp+var_11], 1 loc_734F5: mov al, [rbp+var_11] mov [rbp+var_39], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_73516 mov al, [rbp+var_39] add rsp, 40h pop rbp retn loc_73516: call ___stack_chk_fail
char ma_write_static_record(_DWORD *a1, const char *a2) { long long v2; // rdx unsigned int v4; // [rsp+8h] [rbp-38h] unsigned int v5; // [rsp+Ch] [rbp-34h] long long v6; // [rsp+10h] [rbp-30h] unsigned int v8; // [rsp+30h] [rbp-10h] BYREF unsigned long long v9; // [rsp+38h] [rbp-8h] v9 = __readfsqword(0x28u); if ( *(_QWORD *)(*(_QWORD *)a1 + 200LL) != -1LL && !*((_BYTE *)a1 + 1665) ) { v6 = *(_QWORD *)(*(_QWORD *)a1 + 200LL); a1[358] = 1; if ( !(*(long long ( **)(_DWORD *, unsigned int *, _QWORD, long long, long long))(*(_QWORD *)a1 + 1760LL))( a1, &v8, *(unsigned int *)(*(_QWORD *)a1 + 992LL), *(_QWORD *)(*(_QWORD *)a1 + 200LL) + 1LL, 4LL) ) { *(_QWORD *)(*(_QWORD *)a1 + 200LL) = ma_rec_pos(*(_QWORD *)a1, &v8, v2); --*(_QWORD *)(*((_QWORD *)a1 + 4) + 8LL); *(_QWORD *)(*((_QWORD *)a1 + 4) + 16LL) -= *(_QWORD *)(*(_QWORD *)a1 + 928LL); if ( !(*(long long ( **)(_DWORD *, const char *, _QWORD, long long, long long))(*(_QWORD *)a1 + 1768LL))( a1, a2, *(_QWORD *)(*(_QWORD *)a1 + 920LL), v6, 4LL) ) return 0; } return 1; } if ( *(_QWORD *)(*((_QWORD *)a1 + 4) + 40LL) <= *(_QWORD *)(*(_QWORD *)a1 + 872LL) - *(_QWORD *)(*(_QWORD *)a1 + 928LL) ) { if ( (a1[391] & 0x10) != 0 ) { if ( (unsigned int)my_b_write_0(a1 + 302, a2, *(_QWORD *)(*(_QWORD *)a1 + 920LL)) ) return 1; if ( *(_QWORD *)(*(_QWORD *)a1 + 928LL) != *(_QWORD *)(*(_QWORD *)a1 + 920LL) ) { v5 = *(_DWORD *)(*(_QWORD *)a1 + 928LL) - *(_DWORD *)(*(_QWORD *)a1 + 920LL); memset(&v8, 0LL, v5); if ( (unsigned int)my_b_write_0(a1 + 302, &v8, v5) ) return 1; } } else { a1[358] = 1; if ( (*(long long ( **)(_DWORD *, const char *, _QWORD, _QWORD, _QWORD))(*(_QWORD *)a1 + 1768LL))( a1, a2, *(_QWORD *)(*(_QWORD *)a1 + 920LL), *(_QWORD *)(*((_QWORD *)a1 + 4) + 40LL), *(_QWORD *)(*(_QWORD *)a1 + 1992LL)) ) { return 1; } if ( *(_QWORD *)(*(_QWORD *)a1 + 928LL) != *(_QWORD *)(*(_QWORD *)a1 + 920LL) ) { v4 = *(_DWORD *)(*(_QWORD *)a1 + 928LL) - *(_DWORD *)(*(_QWORD *)a1 + 920LL); memset(&v8, 0LL, v4); if ( (*(long long ( **)(_DWORD *, unsigned int *, _QWORD, _QWORD, _QWORD))(*(_QWORD *)a1 + 1768LL))( a1, &v8, v4, *(_QWORD *)(*(_QWORD *)a1 + 920LL) + *(_QWORD *)(*((_QWORD *)a1 + 4) + 40LL), *(_QWORD *)(*(_QWORD *)a1 + 1992LL)) ) { return 1; } } } *(_QWORD *)(*((_QWORD *)a1 + 4) + 40LL) += *(_QWORD *)(*(_QWORD *)a1 + 928LL); ++*(_QWORD *)(*(_QWORD *)a1 + 192LL); return 0; } *(_DWORD *)my_thread_var(a1, a2) = 135; return 2; }
_ma_write_static_record: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x20],RDI MOV qword ptr [RBP + -0x28],RSI MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0xc8],-0x1 JZ 0x001732c3 MOV RAX,qword ptr [RBP + -0x20] CMP byte ptr [RAX + 0x681],0x0 JNZ 0x001732c3 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0xc8] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x598],0x1 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x6e0] MOV RDI,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0x10] MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX] MOV ECX,dword ptr [RCX + 0x3e0] MOV EDX,ECX MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX] MOV RCX,qword ptr [RCX + 0xc8] ADD RCX,0x1 MOV R8D,0x4 CALL RAX CMP RAX,0x0 JZ 0x0017322d JMP 0x001734f1 LAB_0017322d: MOV RAX,qword ptr [RBP + -0x20] MOV RDI,qword ptr [RAX] LEA RSI,[RBP + -0x10] CALL 0x0016b240 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0xc8],RCX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RAX + 0x8] ADD RCX,-0x1 MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x3a0] MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RAX + 0x10] SUB RCX,RDX MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x6e8] MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX] MOV RDX,qword ptr [RCX + 0x398] MOV RCX,qword ptr [RBP + -0x30] MOV R8D,0x4 CALL RAX CMP RAX,0x0 JZ 0x001732be JMP 0x001734f1 LAB_001732be: JMP 0x001734eb LAB_001732c3: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x20] MOV RAX,qword ptr [RAX + 0x28] MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX] MOV RCX,qword ptr [RCX + 0x368] MOV RDX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RDX] SUB RCX,qword ptr [RDX + 0x3a0] CMP RAX,RCX JBE 0x00173304 CALL 0x001f6090 MOV dword ptr [RAX],0x87 MOV byte ptr [RBP + -0x11],0x2 JMP 0x001734f5 LAB_00173304: MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x61c] AND EAX,0x10 CMP EAX,0x0 JZ 0x001733bd MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x4b8 MOV RSI,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x398] CALL 0x00173520 CMP EAX,0x0 JZ 0x00173346 JMP 0x001734f1 LAB_00173346: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x3a0] MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX] CMP RAX,qword ptr [RCX + 0x398] JZ 0x001733b8 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x3a0] MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX] SUB RAX,qword ptr [RCX + 0x398] MOV dword ptr [RBP + -0x34],EAX LEA RDI,[RBP + -0x10] MOV EAX,dword ptr [RBP + -0x34] MOV EDX,EAX XOR ESI,ESI CALL 0x0012a2c0 MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x4b8 LEA RSI,[RBP + -0x10] MOV EAX,dword ptr [RBP + -0x34] MOV EDX,EAX CALL 0x00173520 CMP EAX,0x0 JZ 0x001733b6 JMP 0x001734f1 LAB_001733b6: JMP 0x001733b8 LAB_001733b8: JMP 0x001734b4 LAB_001733bd: MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x598],0x1 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x6e8] MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX] MOV RDX,qword ptr [RCX + 0x398] MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX + 0x20] MOV RCX,qword ptr [RCX + 0x28] MOV R8,qword ptr [RBP + -0x20] MOV R8,qword ptr [R8] MOV R8,qword ptr [R8 + 0x7c8] CALL RAX CMP RAX,0x0 JZ 0x00173416 JMP 0x001734f1 LAB_00173416: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x3a0] MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX] CMP RAX,qword ptr [RCX + 0x398] JZ 0x001734b2 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x3a0] MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX] SUB RAX,qword ptr [RCX + 0x398] MOV dword ptr [RBP + -0x38],EAX LEA RDI,[RBP + -0x10] MOV EAX,dword ptr [RBP + -0x38] MOV EDX,EAX XOR ESI,ESI CALL 0x0012a2c0 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x6e8] MOV RDI,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0x10] MOV ECX,dword ptr [RBP + -0x38] MOV EDX,ECX MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX + 0x20] MOV RCX,qword ptr [RCX + 0x28] MOV R8,qword ptr [RBP + -0x20] MOV R8,qword ptr [R8] ADD RCX,qword ptr [R8 + 0x398] MOV R8,qword ptr [RBP + -0x20] MOV R8,qword ptr [R8] MOV R8,qword ptr [R8 + 0x7c8] CALL RAX CMP RAX,0x0 JZ 0x001734b0 JMP 0x001734f1 LAB_001734b0: JMP 0x001734b2 LAB_001734b2: JMP 0x001734b4 LAB_001734b4: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x3a0] MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x20] ADD RCX,qword ptr [RAX + 0x28] MOV qword ptr [RAX + 0x28],RCX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0xc0] ADD RCX,0x1 MOV qword ptr [RAX + 0xc0],RCX LAB_001734eb: MOV byte ptr [RBP + -0x11],0x0 JMP 0x001734f5 LAB_001734f1: MOV byte ptr [RBP + -0x11],0x1 LAB_001734f5: MOV AL,byte ptr [RBP + -0x11] MOV byte ptr [RBP + -0x39],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00173516 MOV AL,byte ptr [RBP + -0x39] ADD RSP,0x40 POP RBP RET LAB_00173516: CALL 0x0012a270
int8 _ma_write_static_record(long *param_1,int8 param_2) { int8 uVar1; int iVar2; uint uVar3; long lVar4; int8 uVar5; int4 *puVar6; long in_FS_OFFSET; int1 local_19; int1 local_18 [8]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); if ((*(long *)(*param_1 + 200) == -1) || (*(char *)((long)param_1 + 0x681) != '\0')) { if ((ulong)(*(long *)(*param_1 + 0x368) - *(long *)(*param_1 + 0x3a0)) < *(ulong *)(param_1[4] + 0x28)) { puVar6 = (int4 *)_my_thread_var(); *puVar6 = 0x87; local_19 = 2; goto LAB_001734f5; } if ((*(uint *)((long)param_1 + 0x61c) & 0x10) == 0) { *(int4 *)(param_1 + 0xb3) = 1; lVar4 = (**(code **)(*param_1 + 0x6e8)) (param_1,param_2,*(int8 *)(*param_1 + 0x398), *(int8 *)(param_1[4] + 0x28),*(int8 *)(*param_1 + 0x7c8)); if (lVar4 == 0) { if (*(long *)(*param_1 + 0x3a0) != *(long *)(*param_1 + 0x398)) { uVar3 = (int)*(int8 *)(*param_1 + 0x3a0) - (int)*(int8 *)(*param_1 + 0x398); memset(local_18,0,(ulong)uVar3); lVar4 = (**(code **)(*param_1 + 0x6e8)) (param_1,local_18,uVar3, *(long *)(param_1[4] + 0x28) + *(long *)(*param_1 + 0x398), *(int8 *)(*param_1 + 0x7c8)); if (lVar4 != 0) goto LAB_001734f1; } goto LAB_001734b4; } } else { iVar2 = my_b_write(param_1 + 0x97,param_2,*(int8 *)(*param_1 + 0x398)); if (iVar2 == 0) { if (*(long *)(*param_1 + 0x3a0) != *(long *)(*param_1 + 0x398)) { uVar3 = (int)*(int8 *)(*param_1 + 0x3a0) - (int)*(int8 *)(*param_1 + 0x398); memset(local_18,0,(ulong)uVar3); iVar2 = my_b_write(param_1 + 0x97,local_18,uVar3); if (iVar2 != 0) goto LAB_001734f1; } LAB_001734b4: *(long *)(param_1[4] + 0x28) = *(long *)(*param_1 + 0x3a0) + *(long *)(param_1[4] + 0x28); *(long *)(*param_1 + 0xc0) = *(long *)(*param_1 + 0xc0) + 1; goto LAB_001734eb; } } } else { uVar1 = *(int8 *)(*param_1 + 200); *(int4 *)(param_1 + 0xb3) = 1; lVar4 = (**(code **)(*param_1 + 0x6e0)) (param_1,local_18,*(int4 *)(*param_1 + 0x3e0), *(long *)(*param_1 + 200) + 1,4); if (lVar4 == 0) { uVar5 = _ma_rec_pos(*param_1,local_18); *(int8 *)(*param_1 + 200) = uVar5; *(long *)(param_1[4] + 8) = *(long *)(param_1[4] + 8) + -1; *(long *)(param_1[4] + 0x10) = *(long *)(param_1[4] + 0x10) - *(long *)(*param_1 + 0x3a0); lVar4 = (**(code **)(*param_1 + 0x6e8)) (param_1,param_2,*(int8 *)(*param_1 + 0x398),uVar1,4); if (lVar4 == 0) { LAB_001734eb: local_19 = 0; goto LAB_001734f5; } } } LAB_001734f1: local_19 = 1; LAB_001734f5: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_19); }
55,273
ma_write_static_record
eloqsql/storage/maria/ma_statrec.c
my_bool _ma_write_static_record(MARIA_HA *info, const uchar *record) { uchar temp[8]; /* max pointer length */ if (info->s->state.dellink != HA_OFFSET_ERROR && !info->append_insert_at_end) { my_off_t filepos=info->s->state.dellink; info->rec_cache.seek_not_done=1; /* We have done a seek */ if (info->s->file_read(info, &temp[0],info->s->base.rec_reflength, info->s->state.dellink+1, MYF(MY_NABP))) goto err; info->s->state.dellink= _ma_rec_pos(info->s, temp); info->state->del--; info->state->empty-=info->s->base.pack_reclength; if (info->s->file_write(info, record, info->s->base.reclength, filepos, MYF(MY_NABP))) goto err; } else { if (info->state->data_file_length > info->s->base.max_data_file_length- info->s->base.pack_reclength) { my_errno=HA_ERR_RECORD_FILE_FULL; return(2); } if (info->opt_flag & WRITE_CACHE_USED) { /* Cash in use */ if (my_b_write(&info->rec_cache, record, info->s->base.reclength)) goto err; if (info->s->base.pack_reclength != info->s->base.reclength) { uint length=info->s->base.pack_reclength - info->s->base.reclength; bzero(temp,length); if (my_b_write(&info->rec_cache, temp,length)) goto err; } } else { info->rec_cache.seek_not_done=1; /* We have done a seek */ if (info->s->file_write(info, record, info->s->base.reclength, info->state->data_file_length, info->s->write_flag)) goto err; if (info->s->base.pack_reclength != info->s->base.reclength) { uint length=info->s->base.pack_reclength - info->s->base.reclength; bzero(temp,length); if (info->s->file_write(info, temp,length, info->state->data_file_length+ info->s->base.reclength, info->s->write_flag)) goto err; } } info->state->data_file_length+=info->s->base.pack_reclength; info->s->state.split++; } return 0; err: return 1; }
O3
c
ma_write_static_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %r14 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq (%rdi), %rax movq 0xc8(%rax), %r15 cmpq $-0x1, %r15 je 0x5b28d cmpb $0x0, 0x681(%rbx) je 0x5b360 movq 0x20(%rbx), %rcx movq 0x368(%rax), %rdx subq 0x3a0(%rax), %rdx cmpq %rdx, 0x28(%rcx) jbe 0x5b2b8 callq 0xa1a06 movl $0x87, (%rax) movb $0x2, %r14b jmp 0x5b4d5 testb $0x10, 0x61c(%rbx) jne 0x5b3f2 movl $0x1, 0x598(%rbx) movq 0x398(%rax), %rdx movq 0x28(%rcx), %rcx movq 0x7c8(%rax), %r8 movq %rbx, %rdi movq %r14, %rsi callq *0x6e8(%rax) movb $0x1, %r14b testq %rax, %rax jne 0x5b4d5 movq (%rbx), %r13 movq 0x398(%r13), %rax movq 0x3a0(%r13), %r15 cmpq %rax, %r15 je 0x5b4b6 subl %eax, %r15d leaq -0x38(%rbp), %r12 movl $0x8, %ecx movq %r12, %rdi xorl %esi, %esi movq %r15, %rdx callq 0x297f0 movq 0x20(%rbx), %rax movq 0x398(%r13), %rcx addq 0x28(%rax), %rcx movq 0x7c8(%r13), %r8 movq %rbx, %rdi movq %r12, %rsi movq %r15, %rdx callq *0x6e8(%r13) testq %rax, %rax jne 0x5b4d5 jmp 0x5b4b6 movl $0x1, 0x598(%rbx) movl 0x3e0(%rax), %edx movq 0xc8(%rax), %rcx incq %rcx leaq -0x38(%rbp), %rsi movl $0x4, %r8d movq %rbx, %rdi callq *0x6e0(%rax) testq %rax, %rax jne 0x5b3ea movq (%rbx), %rdi leaq -0x38(%rbp), %rsi callq 0x5703d movq (%rbx), %rcx movq %rax, 0xc8(%rcx) movq 0x20(%rbx), %rax decq 0x8(%rax) movq (%rbx), %rax movq 0x20(%rbx), %rcx movq 0x3a0(%rax), %rax subq %rax, 0x10(%rcx) movq (%rbx), %rax movq 0x398(%rax), %rdx movl $0x4, %r8d movq %rbx, %rdi movq %r14, %rsi movq %r15, %rcx callq *0x6e8(%rax) testq %rax, %rax je 0x5b4d2 movb $0x1, %r14b jmp 0x5b4d5 leaq 0x4b8(%rbx), %r15 movq 0x398(%rax), %r12 movq 0x4f8(%rbx), %rdi leaq (%rdi,%r12), %rax cmpq 0x500(%rbx), %rax jbe 0x5b42f movq %r15, %rdi movq %r14, %rsi movq %r12, %rdx callq 0x95707 movb $0x1, %r14b testl %eax, %eax jne 0x5b4d5 jmp 0x5b446 testq %r12, %r12 je 0x5b446 movq %r14, %rsi movq %r12, %rdx callq 0x29080 addq %r12, 0x4f8(%rbx) movq (%rbx), %rcx movq 0x398(%rcx), %rax movq 0x3a0(%rcx), %r14 cmpq %rax, %r14 je 0x5b4b6 subl %eax, %r14d leaq -0x38(%rbp), %rdi movl $0x8, %ecx xorl %esi, %esi movq %r14, %rdx callq 0x297f0 movq 0x4f8(%rbx), %rdi leaq (%rdi,%r14), %rax cmpq 0x500(%rbx), %rax jbe 0x5b49e leaq -0x38(%rbp), %rsi movq %r15, %rdi movq %r14, %rdx callq 0x95707 movb $0x1, %r14b testl %eax, %eax jne 0x5b4d5 jmp 0x5b4b6 testq %r14, %r14 je 0x5b4b6 leaq -0x38(%rbp), %rsi movq %r14, %rdx callq 0x29080 addq %r14, 0x4f8(%rbx) movq (%rbx), %rax movq 0x20(%rbx), %rcx movq 0x3a0(%rax), %rax addq %rax, 0x28(%rcx) movq (%rbx), %rax incq 0xc0(%rax) xorl %r14d, %r14d movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x5b4f6 movl %r14d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29270
_ma_write_static_record: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax mov rax, [rdi] mov r15, [rax+0C8h] cmp r15, 0FFFFFFFFFFFFFFFFh jz short loc_5B28D cmp byte ptr [rbx+681h], 0 jz loc_5B360 loc_5B28D: mov rcx, [rbx+20h] mov rdx, [rax+368h] sub rdx, [rax+3A0h] cmp [rcx+28h], rdx jbe short loc_5B2B8 call _my_thread_var mov dword ptr [rax], 87h mov r14b, 2 jmp loc_5B4D5 loc_5B2B8: test byte ptr [rbx+61Ch], 10h jnz loc_5B3F2 mov dword ptr [rbx+598h], 1 mov rdx, [rax+398h] mov rcx, [rcx+28h] mov r8, [rax+7C8h] mov rdi, rbx mov rsi, r14 call qword ptr [rax+6E8h] mov r14b, 1 test rax, rax jnz loc_5B4D5 mov r13, [rbx] mov rax, [r13+398h] mov r15, [r13+3A0h] cmp r15, rax jz loc_5B4B6 sub r15d, eax lea r12, [rbp+var_38] mov ecx, 8 mov rdi, r12 xor esi, esi mov rdx, r15 call ___memset_chk mov rax, [rbx+20h] mov rcx, [r13+398h] add rcx, [rax+28h] mov r8, [r13+7C8h] mov rdi, rbx mov rsi, r12 mov rdx, r15 call qword ptr [r13+6E8h] test rax, rax jnz loc_5B4D5 jmp loc_5B4B6 loc_5B360: mov dword ptr [rbx+598h], 1 mov edx, [rax+3E0h] mov rcx, [rax+0C8h] inc rcx lea rsi, [rbp+var_38] mov r8d, 4 mov rdi, rbx call qword ptr [rax+6E0h] test rax, rax jnz short loc_5B3EA mov rdi, [rbx] lea rsi, [rbp+var_38] call _ma_rec_pos mov rcx, [rbx] mov [rcx+0C8h], rax mov rax, [rbx+20h] dec qword ptr [rax+8] mov rax, [rbx] mov rcx, [rbx+20h] mov rax, [rax+3A0h] sub [rcx+10h], rax mov rax, [rbx] mov rdx, [rax+398h] mov r8d, 4 mov rdi, rbx mov rsi, r14 mov rcx, r15 call qword ptr [rax+6E8h] test rax, rax jz loc_5B4D2 loc_5B3EA: mov r14b, 1 jmp loc_5B4D5 loc_5B3F2: lea r15, [rbx+4B8h] mov r12, [rax+398h] mov rdi, [rbx+4F8h] lea rax, [rdi+r12] cmp rax, [rbx+500h] jbe short loc_5B42F mov rdi, r15 mov rsi, r14 mov rdx, r12 call _my_b_write mov r14b, 1 test eax, eax jnz loc_5B4D5 jmp short loc_5B446 loc_5B42F: test r12, r12 jz short loc_5B446 mov rsi, r14 mov rdx, r12 call _memcpy add [rbx+4F8h], r12 loc_5B446: mov rcx, [rbx] mov rax, [rcx+398h] mov r14, [rcx+3A0h] cmp r14, rax jz short loc_5B4B6 sub r14d, eax lea rdi, [rbp+var_38] mov ecx, 8 xor esi, esi mov rdx, r14 call ___memset_chk mov rdi, [rbx+4F8h] lea rax, [rdi+r14] cmp rax, [rbx+500h] jbe short loc_5B49E lea rsi, [rbp+var_38] mov rdi, r15 mov rdx, r14 call _my_b_write mov r14b, 1 test eax, eax jnz short loc_5B4D5 jmp short loc_5B4B6 loc_5B49E: test r14, r14 jz short loc_5B4B6 lea rsi, [rbp+var_38] mov rdx, r14 call _memcpy add [rbx+4F8h], r14 loc_5B4B6: mov rax, [rbx] mov rcx, [rbx+20h] mov rax, [rax+3A0h] add [rcx+28h], rax mov rax, [rbx] inc qword ptr [rax+0C0h] loc_5B4D2: xor r14d, r14d loc_5B4D5: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_5B4F6 mov eax, r14d add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_5B4F6: call ___stack_chk_fail
long long ma_write_static_record(_DWORD *a1, const char *a2) { long long v2; // r14 long long v4; // rax long long v5; // r15 long long v6; // rcx long long v7; // r13 long long v8; // rax long long v9; // r15 long long v10; // r15 long long v11; // rdx long long v12; // r12 long long v13; // rdi long long v14; // rax long long v15; // r14 long long v16; // rdi int v17; // eax __int16 v19; // [rsp+8h] [rbp-38h] BYREF unsigned long long v20; // [rsp+10h] [rbp-30h] LODWORD(v2) = (_DWORD)a2; v20 = __readfsqword(0x28u); v4 = *(_QWORD *)a1; v5 = *(_QWORD *)(*(_QWORD *)a1 + 200LL); if ( v5 != -1 && !*((_BYTE *)a1 + 1665) ) { a1[358] = 1; if ( (*(long long ( **)(_DWORD *, __int16 *, _QWORD, long long, long long))(v4 + 1760))( a1, &v19, *(unsigned int *)(v4 + 992), *(_QWORD *)(v4 + 200) + 1LL, 4LL) || (*(_QWORD *)(*(_QWORD *)a1 + 200LL) = ma_rec_pos(*(_QWORD *)a1, &v19, v11), --*(_QWORD *)(*((_QWORD *)a1 + 4) + 8LL), *(_QWORD *)(*((_QWORD *)a1 + 4) + 16LL) -= *(_QWORD *)(*(_QWORD *)a1 + 928LL), (*(long long ( **)(_DWORD *, const char *, _QWORD, long long, long long))(*(_QWORD *)a1 + 1768LL))( a1, a2, *(_QWORD *)(*(_QWORD *)a1 + 920LL), v5, 4LL)) ) { LOBYTE(v2) = 1; return (unsigned int)v2; } LABEL_25: LODWORD(v2) = 0; return (unsigned int)v2; } v6 = *((_QWORD *)a1 + 4); if ( *(_QWORD *)(v6 + 40) > *(_QWORD *)(v4 + 872) - *(_QWORD *)(v4 + 928) ) { *(_DWORD *)my_thread_var(a1, a2) = 135; LOBYTE(v2) = 2; return (unsigned int)v2; } if ( (a1[391] & 0x10) != 0 ) { v12 = *(_QWORD *)(v4 + 920); v13 = *((_QWORD *)a1 + 159); if ( (unsigned long long)(v13 + v12) <= *((_QWORD *)a1 + 160) ) { if ( v12 ) { memcpy(v13, a2, v12); *((_QWORD *)a1 + 159) += v12; } } else { LOBYTE(v2) = 1; if ( (unsigned int)my_b_write(a1 + 302, a2, v12) ) return (unsigned int)v2; } v14 = *(_QWORD *)(*(_QWORD *)a1 + 920LL); v15 = *(_QWORD *)(*(_QWORD *)a1 + 928LL); if ( v15 != v14 ) { v2 = (unsigned int)(v15 - v14); __memset_chk(&v19, 0LL, v2, 8LL); v16 = *((_QWORD *)a1 + 159); if ( (unsigned long long)(v16 + v2) <= *((_QWORD *)a1 + 160) ) { if ( v2 ) { memcpy(v16, &v19, v2); *((_QWORD *)a1 + 159) += v2; } } else { v17 = my_b_write(a1 + 302, &v19, v2); LOBYTE(v2) = 1; if ( v17 ) return (unsigned int)v2; } } goto LABEL_24; } a1[358] = 1; LOBYTE(v2) = 1; if ( !(*(long long ( **)(_DWORD *, const char *, _QWORD, _QWORD, _QWORD))(v4 + 1768))( a1, a2, *(_QWORD *)(v4 + 920), *(_QWORD *)(v6 + 40), *(_QWORD *)(v4 + 1992)) ) { v7 = *(_QWORD *)a1; v8 = *(_QWORD *)(*(_QWORD *)a1 + 920LL); v9 = *(_QWORD *)(*(_QWORD *)a1 + 928LL); if ( v9 == v8 || (v10 = (unsigned int)(v9 - v8), __memset_chk(&v19, 0LL, v10, 8LL), !(*(long long ( **)(_DWORD *, __int16 *, long long, _QWORD, _QWORD))(v7 + 1768))( a1, &v19, v10, *(_QWORD *)(*((_QWORD *)a1 + 4) + 40LL) + *(_QWORD *)(v7 + 920), *(_QWORD *)(v7 + 1992))) ) { LABEL_24: *(_QWORD *)(*((_QWORD *)a1 + 4) + 40LL) += *(_QWORD *)(*(_QWORD *)a1 + 928LL); ++*(_QWORD *)(*(_QWORD *)a1 + 192LL); goto LABEL_25; } } return (unsigned int)v2; }
_ma_write_static_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RDI] MOV R15,qword ptr [RAX + 0xc8] CMP R15,-0x1 JZ 0x0015b28d CMP byte ptr [RBX + 0x681],0x0 JZ 0x0015b360 LAB_0015b28d: MOV RCX,qword ptr [RBX + 0x20] MOV RDX,qword ptr [RAX + 0x368] SUB RDX,qword ptr [RAX + 0x3a0] CMP qword ptr [RCX + 0x28],RDX JBE 0x0015b2b8 CALL 0x001a1a06 MOV dword ptr [RAX],0x87 MOV R14B,0x2 JMP 0x0015b4d5 LAB_0015b2b8: TEST byte ptr [RBX + 0x61c],0x10 JNZ 0x0015b3f2 MOV dword ptr [RBX + 0x598],0x1 MOV RDX,qword ptr [RAX + 0x398] MOV RCX,qword ptr [RCX + 0x28] MOV R8,qword ptr [RAX + 0x7c8] MOV RDI,RBX MOV RSI,R14 CALL qword ptr [RAX + 0x6e8] MOV R14B,0x1 TEST RAX,RAX JNZ 0x0015b4d5 MOV R13,qword ptr [RBX] MOV RAX,qword ptr [R13 + 0x398] MOV R15,qword ptr [R13 + 0x3a0] CMP R15,RAX JZ 0x0015b4b6 SUB R15D,EAX LEA R12,[RBP + -0x38] MOV ECX,0x8 MOV RDI,R12 XOR ESI,ESI MOV RDX,R15 CALL 0x001297f0 MOV RAX,qword ptr [RBX + 0x20] MOV RCX,qword ptr [R13 + 0x398] ADD RCX,qword ptr [RAX + 0x28] MOV R8,qword ptr [R13 + 0x7c8] MOV RDI,RBX MOV RSI,R12 MOV RDX,R15 CALL qword ptr [R13 + 0x6e8] TEST RAX,RAX JNZ 0x0015b4d5 JMP 0x0015b4b6 LAB_0015b360: MOV dword ptr [RBX + 0x598],0x1 MOV EDX,dword ptr [RAX + 0x3e0] MOV RCX,qword ptr [RAX + 0xc8] INC RCX LEA RSI,[RBP + -0x38] MOV R8D,0x4 MOV RDI,RBX CALL qword ptr [RAX + 0x6e0] TEST RAX,RAX JNZ 0x0015b3ea MOV RDI,qword ptr [RBX] LEA RSI,[RBP + -0x38] CALL 0x0015703d MOV RCX,qword ptr [RBX] MOV qword ptr [RCX + 0xc8],RAX MOV RAX,qword ptr [RBX + 0x20] DEC qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RBX + 0x20] MOV RAX,qword ptr [RAX + 0x3a0] SUB qword ptr [RCX + 0x10],RAX MOV RAX,qword ptr [RBX] MOV RDX,qword ptr [RAX + 0x398] MOV R8D,0x4 MOV RDI,RBX MOV RSI,R14 MOV RCX,R15 CALL qword ptr [RAX + 0x6e8] TEST RAX,RAX JZ 0x0015b4d2 LAB_0015b3ea: MOV R14B,0x1 JMP 0x0015b4d5 LAB_0015b3f2: LEA R15,[RBX + 0x4b8] MOV R12,qword ptr [RAX + 0x398] MOV RDI,qword ptr [RBX + 0x4f8] LEA RAX,[RDI + R12*0x1] CMP RAX,qword ptr [RBX + 0x500] JBE 0x0015b42f MOV RDI,R15 MOV RSI,R14 MOV RDX,R12 CALL 0x00195707 MOV R14B,0x1 TEST EAX,EAX JNZ 0x0015b4d5 JMP 0x0015b446 LAB_0015b42f: TEST R12,R12 JZ 0x0015b446 MOV RSI,R14 MOV RDX,R12 CALL 0x00129080 ADD qword ptr [RBX + 0x4f8],R12 LAB_0015b446: MOV RCX,qword ptr [RBX] MOV RAX,qword ptr [RCX + 0x398] MOV R14,qword ptr [RCX + 0x3a0] CMP R14,RAX JZ 0x0015b4b6 SUB R14D,EAX LEA RDI,[RBP + -0x38] MOV ECX,0x8 XOR ESI,ESI MOV RDX,R14 CALL 0x001297f0 MOV RDI,qword ptr [RBX + 0x4f8] LEA RAX,[RDI + R14*0x1] CMP RAX,qword ptr [RBX + 0x500] JBE 0x0015b49e LEA RSI,[RBP + -0x38] MOV RDI,R15 MOV RDX,R14 CALL 0x00195707 MOV R14B,0x1 TEST EAX,EAX JNZ 0x0015b4d5 JMP 0x0015b4b6 LAB_0015b49e: TEST R14,R14 JZ 0x0015b4b6 LEA RSI,[RBP + -0x38] MOV RDX,R14 CALL 0x00129080 ADD qword ptr [RBX + 0x4f8],R14 LAB_0015b4b6: MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RBX + 0x20] MOV RAX,qword ptr [RAX + 0x3a0] ADD qword ptr [RCX + 0x28],RAX MOV RAX,qword ptr [RBX] INC qword ptr [RAX + 0xc0] LAB_0015b4d2: XOR R14D,R14D LAB_0015b4d5: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0015b4f6 MOV EAX,R14D ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0015b4f6: CALL 0x00129270
ulong _ma_write_static_record(long *param_1,void *param_2) { long lVar1; size_t __n; int4 *puVar2; long lVar3; int8 uVar4; uint uVar5; int7 uVar7; ulong uVar6; int iVar8; long in_FS_OFFSET; int1 local_40 [8]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); lVar3 = *param_1; lVar1 = *(long *)(lVar3 + 200); uVar7 = (int7)((ulong)param_2 >> 8); if ((lVar1 == -1) || (*(char *)((long)param_1 + 0x681) != '\0')) { if ((ulong)(*(long *)(lVar3 + 0x368) - *(long *)(lVar3 + 0x3a0)) < *(ulong *)(param_1[4] + 0x28) ) { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x87; uVar6 = CONCAT71(uVar7,2); goto LAB_0015b4d5; } if ((*(byte *)((long)param_1 + 0x61c) & 0x10) == 0) { *(int4 *)(param_1 + 0xb3) = 1; lVar3 = (**(code **)(lVar3 + 0x6e8)) (param_1,param_2,*(int8 *)(lVar3 + 0x398), *(int8 *)(param_1[4] + 0x28),*(int8 *)(lVar3 + 0x7c8)); uVar6 = CONCAT71(uVar7,1); if (lVar3 != 0) goto LAB_0015b4d5; lVar3 = *param_1; if (*(long *)(lVar3 + 0x3a0) != *(long *)(lVar3 + 0x398)) { iVar8 = (int)*(long *)(lVar3 + 0x3a0) - (int)*(long *)(lVar3 + 0x398); __memset_chk(local_40,0,iVar8,8); lVar3 = (**(code **)(lVar3 + 0x6e8)) (param_1,local_40,iVar8, *(long *)(lVar3 + 0x398) + *(long *)(param_1[4] + 0x28), *(int8 *)(lVar3 + 0x7c8)); if (lVar3 != 0) goto LAB_0015b4d5; } } else { __n = *(size_t *)(lVar3 + 0x398); if ((ulong)param_1[0xa0] < param_1[0x9f] + __n) { iVar8 = _my_b_write(param_1 + 0x97,param_2,__n); uVar6 = CONCAT71(uVar7,1); if (iVar8 != 0) goto LAB_0015b4d5; } else if (__n != 0) { memcpy((void *)param_1[0x9f],param_2,__n); param_1[0x9f] = param_1[0x9f] + __n; } lVar3 = *(long *)(*param_1 + 0x398); lVar1 = *(long *)(*param_1 + 0x3a0); if (lVar1 != lVar3) { uVar5 = (int)lVar1 - (int)lVar3; uVar6 = (ulong)uVar5; __memset_chk(local_40,0,uVar6,8); if ((ulong)param_1[0xa0] < param_1[0x9f] + uVar6) { iVar8 = _my_b_write(param_1 + 0x97,local_40,uVar6); uVar6 = CONCAT71((uint7)(uint3)(uVar5 >> 8),1); if (iVar8 != 0) goto LAB_0015b4d5; } else if (uVar6 != 0) { memcpy((void *)param_1[0x9f],local_40,uVar6); param_1[0x9f] = param_1[0x9f] + uVar6; } } } *(long *)(param_1[4] + 0x28) = *(long *)(param_1[4] + 0x28) + *(long *)(*param_1 + 0x3a0); *(long *)(*param_1 + 0xc0) = *(long *)(*param_1 + 0xc0) + 1; LAB_0015b4d2: uVar6 = 0; } else { *(int4 *)(param_1 + 0xb3) = 1; lVar3 = (**(code **)(lVar3 + 0x6e0)) (param_1,local_40,*(int4 *)(lVar3 + 0x3e0),*(long *)(lVar3 + 200) + 1,4) ; if (lVar3 == 0) { uVar4 = _ma_rec_pos(*param_1,local_40); *(int8 *)(*param_1 + 200) = uVar4; *(long *)(param_1[4] + 8) = *(long *)(param_1[4] + 8) + -1; *(long *)(param_1[4] + 0x10) = *(long *)(param_1[4] + 0x10) - *(long *)(*param_1 + 0x3a0); lVar3 = (**(code **)(*param_1 + 0x6e8)) (param_1,param_2,*(int8 *)(*param_1 + 0x398),lVar1,4); if (lVar3 == 0) goto LAB_0015b4d2; } uVar6 = CONCAT71(uVar7,1); } LAB_0015b4d5: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar6 & 0xffffffff; }
55,274
uf_intervall
eloqsql/storage/maria/ma_packrec.c
static void uf_intervall(MARIA_COLUMNDEF *rec, MARIA_BIT_BUFF *bit_buff, uchar *to, uchar *end) { reg1 uint field_length=(uint) (end-to); memcpy(to,rec->huff_tree->intervalls+field_length*decode_pos(bit_buff, rec->huff_tree), (size_t) field_length); }
O3
c
uf_intervall: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %r14 movq %rdx, %rbx movq %rsi, %r12 movq 0x30(%rdi), %rax movq (%rax), %r13 movq 0x10(%rax), %r15 movl 0x4(%rsi), %eax testl %eax, %eax je 0x4476f movl (%r12), %ecx decl %eax movl %eax, 0x4(%r12) btl %eax, %ecx jae 0x4475e addq $0x2, %r13 movswq (%r13), %rcx testq %rcx, %rcx js 0x4478e leaq (%r13,%rcx,2), %r13 jmp 0x44746 movq %r12, %rdi callq 0x439ec movl $0x1f, 0x4(%r12) movl $0x1f, %eax cmpl $0x0, (%r12) jns 0x4475e jmp 0x4475a subq %rbx, %r14 andl $0x7fff, %ecx # imm = 0x7FFF imull %r14d, %ecx addq %rcx, %r15 movl %r14d, %edx movq %rbx, %rdi movq %r15, %rsi addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x2a0a0
uf_intervall: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rcx mov rbx, rdx mov r12, rsi mov rax, [rdi+30h] mov r13, [rax] mov r15, [rax+10h] mov eax, [rsi+4] loc_44746: test eax, eax jz short loc_4476F mov ecx, [r12] dec eax mov [r12+4], eax bt ecx, eax jnb short loc_4475E loc_4475A: add r13, 2 loc_4475E: movsx rcx, word ptr [r13+0] test rcx, rcx js short loc_4478E lea r13, [r13+rcx*2+0] jmp short loc_44746 loc_4476F: mov rdi, r12 call fill_buffer mov dword ptr [r12+4], 1Fh mov eax, 1Fh cmp dword ptr [r12], 0 jns short loc_4475E jmp short loc_4475A loc_4478E: sub r14, rbx and ecx, 7FFFh imul ecx, r14d add r15, rcx mov edx, r14d mov rdi, rbx mov rsi, r15 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _memcpy
long long uf_intervall(long long a1, int *a2, long long a3, int a4) { __int16 **v6; // rax __int16 *v7; // r13 __int16 *v8; // r15 unsigned int v9; // eax int v10; // ecx long long v11; // rcx v6 = *(__int16 ***)(a1 + 48); v7 = *v6; v8 = v6[2]; v9 = a2[1]; while ( 1 ) { if ( v9 ) { v10 = *a2; a2[1] = --v9; if ( !_bittest(&v10, v9) ) goto LABEL_5; LABEL_4: ++v7; goto LABEL_5; } fill_buffer((long long)a2); a2[1] = 31; v9 = 31; if ( *a2 < 0 ) goto LABEL_4; LABEL_5: v11 = *v7; if ( v11 < 0 ) return memcpy(a3, (char *)v8 + (a4 - (_DWORD)a3) * (unsigned int)(v11 & 0x7FFF), (unsigned int)(a4 - a3)); v7 += v11; } }
uf_intervall: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RCX MOV RBX,RDX MOV R12,RSI MOV RAX,qword ptr [RDI + 0x30] MOV R13,qword ptr [RAX] MOV R15,qword ptr [RAX + 0x10] MOV EAX,dword ptr [RSI + 0x4] LAB_00144746: TEST EAX,EAX JZ 0x0014476f MOV ECX,dword ptr [R12] DEC EAX MOV dword ptr [R12 + 0x4],EAX BT ECX,EAX JNC 0x0014475e LAB_0014475a: ADD R13,0x2 LAB_0014475e: MOVSX RCX,word ptr [R13] TEST RCX,RCX JS 0x0014478e LEA R13,[R13 + RCX*0x2] JMP 0x00144746 LAB_0014476f: MOV RDI,R12 CALL 0x001439ec MOV dword ptr [R12 + 0x4],0x1f MOV EAX,0x1f CMP dword ptr [R12],0x0 JNS 0x0014475e JMP 0x0014475a LAB_0014478e: SUB R14,RBX AND ECX,0x7fff IMUL ECX,R14D ADD R15,RCX MOV EDX,R14D MOV RDI,RBX MOV RSI,R15 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0012a0a0
void uf_intervall(long param_1,uint *param_2,void *param_3,int param_4) { short sVar1; long lVar2; uint uVar3; short *psVar4; psVar4 = (short *)**(int8 **)(param_1 + 0x30); lVar2 = (*(int8 **)(param_1 + 0x30))[2]; uVar3 = param_2[1]; do { if (uVar3 == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar3 = 0x1f; if ((int)*param_2 < 0) goto LAB_0014475a; } else { uVar3 = uVar3 - 1; param_2[1] = uVar3; if ((*param_2 >> (uVar3 & 0x1f) & 1) != 0) { LAB_0014475a: psVar4 = psVar4 + 1; } } sVar1 = *psVar4; if ((long)sVar1 < 0) { uVar3 = param_4 - (int)param_3; memcpy(param_3,(void *)(lVar2 + (ulong)(((int)sVar1 & 0x7fffU) * uVar3)),(ulong)uVar3); return; } psVar4 = psVar4 + sVar1; } while( true ); }
55,275
js_eq_slow
bluesky950520[P]quickjs/quickjs.c
int js_eq_slow(JSContext *ctx, JSValue *sp, BOOL is_neq) { JSValue op1, op2; int res; uint32_t tag1, tag2; op1 = sp[-2]; op2 = sp[-1]; redo: tag1 = JS_VALUE_GET_NORM_TAG(op1); tag2 = JS_VALUE_GET_NORM_TAG(op2); if (tag_is_number(tag1) && tag_is_number(tag2)) { if (tag1 == JS_TAG_INT && tag2 == JS_TAG_INT) { res = JS_VALUE_GET_INT(op1) == JS_VALUE_GET_INT(op2); } else if ((tag1 == JS_TAG_FLOAT64 && (tag2 == JS_TAG_INT || tag2 == JS_TAG_FLOAT64)) || (tag2 == JS_TAG_FLOAT64 && (tag1 == JS_TAG_INT || tag1 == JS_TAG_FLOAT64))) { double d1, d2; if (tag1 == JS_TAG_FLOAT64) { d1 = JS_VALUE_GET_FLOAT64(op1); } else { d1 = JS_VALUE_GET_INT(op1); } if (tag2 == JS_TAG_FLOAT64) { d2 = JS_VALUE_GET_FLOAT64(op2); } else { d2 = JS_VALUE_GET_INT(op2); } res = (d1 == d2); } else { res = js_compare_bigint(ctx, OP_eq, op1, op2); if (res < 0) goto exception; } } else if (tag1 == tag2) { res = js_strict_eq2(ctx, op1, op2, JS_EQ_STRICT); } else if ((tag1 == JS_TAG_NULL && tag2 == JS_TAG_UNDEFINED) || (tag2 == JS_TAG_NULL && tag1 == JS_TAG_UNDEFINED)) { res = TRUE; } else if ((tag1 == JS_TAG_STRING && tag_is_number(tag2)) || (tag2 == JS_TAG_STRING && tag_is_number(tag1))) { if ((tag1 == JS_TAG_BIG_INT || tag2 == JS_TAG_BIG_INT)) { if (tag1 == JS_TAG_STRING) { op1 = JS_StringToBigInt(ctx, op1); if (JS_VALUE_GET_TAG(op1) != JS_TAG_BIG_INT) goto invalid_bigint_string; } if (tag2 == JS_TAG_STRING) { op2 = JS_StringToBigInt(ctx, op2); if (JS_VALUE_GET_TAG(op2) != JS_TAG_BIG_INT) { invalid_bigint_string: JS_FreeValue(ctx, op1); JS_FreeValue(ctx, op2); res = FALSE; goto done; } } } else { op1 = JS_ToNumericFree(ctx, op1); if (JS_IsException(op1)) { JS_FreeValue(ctx, op2); goto exception; } op2 = JS_ToNumericFree(ctx, op2); if (JS_IsException(op2)) { JS_FreeValue(ctx, op1); goto exception; } } res = js_strict_eq(ctx, op1, op2); } else if (tag1 == JS_TAG_BOOL) { op1 = js_int32(JS_VALUE_GET_INT(op1)); goto redo; } else if (tag2 == JS_TAG_BOOL) { op2 = js_int32(JS_VALUE_GET_INT(op2)); goto redo; } else if ((tag1 == JS_TAG_OBJECT && (tag_is_number(tag2) || tag2 == JS_TAG_STRING || tag2 == JS_TAG_SYMBOL)) || (tag2 == JS_TAG_OBJECT && (tag_is_number(tag1) || tag1 == JS_TAG_STRING || tag1 == JS_TAG_SYMBOL))) { op1 = JS_ToPrimitiveFree(ctx, op1, HINT_NONE); if (JS_IsException(op1)) { JS_FreeValue(ctx, op2); goto exception; } op2 = JS_ToPrimitiveFree(ctx, op2, HINT_NONE); if (JS_IsException(op2)) { JS_FreeValue(ctx, op1); goto exception; } goto redo; } else { /* IsHTMLDDA object is equivalent to undefined for '==' and '!=' */ if ((JS_IsHTMLDDA(ctx, op1) && (tag2 == JS_TAG_NULL || tag2 == JS_TAG_UNDEFINED)) || (JS_IsHTMLDDA(ctx, op2) && (tag1 == JS_TAG_NULL || tag1 == JS_TAG_UNDEFINED))) { res = TRUE; } else { res = FALSE; } JS_FreeValue(ctx, op1); JS_FreeValue(ctx, op2); } done: sp[-2] = js_bool(res ^ is_neq); return 0; exception: sp[-2] = JS_UNDEFINED; sp[-1] = JS_UNDEFINED; return -1; }
O2
c
js_eq_slow: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %edx, %r15d movq %rsi, %rbp movq -0x20(%rsi), %xmm0 movq -0x18(%rsi), %r12 movq -0x10(%rsi), %xmm1 movq -0x8(%rsi), %r14 pushq $0x1 popq %r9 pushq $-0x7 popq %r11 pushq $-0x1 popq %r10 movl $0x10201, %ebx # imm = 0x10201 movq 0x52a4b(%rip), %xmm2 # 0x85838 movl %r14d, %eax xorl $0x2, %eax movl %r14d, %ecx xorl $0x3, %ecx leal 0x9(%r12), %esi movq %xmm0, %rdx movq %xmm1, %r13 cmpl $0x10, %esi ja 0x32e2f btl %esi, %ebx jae 0x32e2f cmpl $-0x9, %r14d je 0x32fb8 cmpl $0x7, %r14d je 0x32fcf testl %r14d, %r14d je 0x32fb8 cmpl %r14d, %r12d je 0x32fe2 movl %r12d, %r8d xorl $0x2, %r8d movl %r12d, %esi xorl $0x3, %esi orl %eax, %esi sete %sil orl %ecx, %r8d je 0x331d0 testb %sil, %sil jne 0x331d0 cmpl $-0x7, %r12d je 0x32e99 cmpl $-0x7, %r14d jne 0x32e87 leal 0x1(%r12), %esi cmpl $0x8, %esi ja 0x33082 leaq 0x50c8e(%rip), %r8 # 0x83b0c movslq (%r8,%rsi,4), %rsi addq %r8, %rsi jmpq *%rsi cmpl $0x1, %r12d jne 0x32eca pand %xmm2, %xmm0 xorl %r12d, %r12d jmp 0x32df9 cmpl $0x1, %r14d je 0x32ed0 cmpl $-0x9, %r14d je 0x3323b cmpl $-0x7, %r14d je 0x33225 testl %r14d, %r14d je 0x32ffb movl %r11d, %eax cmpl $0x7, %r14d jne 0x32ee4 jmp 0x32ffb cmpl $0x1, %r14d jne 0x32edb movl %r13d, %eax xorl %r14d, %r14d jmp 0x32f97 movl %r12d, %eax cmpl $-0x1, %r12d je 0x32f0a cmpl $-0x1, %r14d jne 0x33220 leal 0x9(%rax), %ecx cmpl $0x10, %ecx ja 0x32efb btl %ecx, %ebx jb 0x32f20 movl %eax, %ecx andl $-0x2, %ecx cmpl $-0x8, %ecx je 0x32f20 jmp 0x3322b leal 0x9(%r14), %eax cmpl $0x10, %eax ja 0x32fa1 btl %eax, %ebx jae 0x32fa1 movl %r15d, 0x10(%rsp) movq %rdx, %rsi movq %r12, %rdx pushq $0x2 popq %rcx movq %rdi, %rbx callq 0x366ee movq %rdx, %r12 cmpl $0x6, %r12d je 0x331f5 movq %rax, %r15 movq %rbp, 0x8(%rsp) movq %rbx, %rbp movq %rbx, %rdi movq %r13, %rsi movq %r14, %rdx pushq $0x2 popq %rcx callq 0x366ee movq %rdx, %r14 cmpl $0x6, %r14d je 0x33208 movq %r15, %xmm0 movl 0x10(%rsp), %r15d movq %rbp, %rdi movq 0x8(%rsp), %rbp pushq $0x1 popq %r9 pushq $-0x1 popq %r10 pushq $-0x7 popq %r11 movl $0x10201, %ebx # imm = 0x10201 movq 0x528a1(%rip), %xmm2 # 0x85838 movq %rax, %xmm1 jmp 0x32ded movl %r14d, %ecx andl $-0x2, %ecx movl %r10d, %eax cmpl $-0x8, %ecx jne 0x32ee4 jmp 0x32f20 movl %r12d, %eax orl %r14d, %eax jne 0x32fcf xorl %r9d, %r9d cmpl %r13d, %edx sete %r9b jmp 0x331d0 cmpl $0x7, %r12d jne 0x3302c testl %r14d, %r14d je 0x33037 cmpl $0x7, %r14d je 0x33037 jmp 0x3305f movq %rdx, %rsi movq %r12, %rdx movq %r13, %rcx movq %r14, %r8 xorl %r9d, %r9d callq 0x33292 jmp 0x3315b movq %rbp, %rbx movl %r15d, 0x10(%rsp) movq %rdx, %rsi movq %r12, %rdx movq %rdi, %rbp callq 0x3a3be movq %rdx, %r12 cmpl $0x6, %r12d jne 0x330dc movq %rbp, %rdi movq %r13, %rsi movq %r14, %rdx jmp 0x330ff cmpl $0x7, %r14d jne 0x3305f testl %r12d, %r12d jne 0x3305f cmpl $0x7, %r12d je 0x33041 cvtsi2sd %edx, %xmm0 cmpl $0x7, %r14d je 0x3304c cvtsi2sd %r13d, %xmm1 cmpeqsd %xmm1, %xmm0 movq %xmm0, %r9 andl $0x1, %r9d jmp 0x331d0 movl $0xac, %esi movq %r12, %rcx movq %r13, %r8 movq %r14, %r9 callq 0x3aa74 movl %eax, %r9d testl %eax, %eax jns 0x331d0 jmp 0x33107 cmpl $-0x9, %r12d jne 0x330bc movaps %xmm0, 0x10(%rsp) movq %rdi, %rbx movq %r13, %rsi movq %r14, %rdx callq 0x36b72 movq %rax, %xmm1 cmpq $-0x9, %rdx jne 0x33198 pushq $-0x9 popq %r14 movq %rbx, %rdi movdqa 0x10(%rsp), %xmm0 jmp 0x33146 xorl %ecx, %ecx movl %r12d, %eax cmpl $-0x1, %r12d jne 0x33122 cmpb $0x0, 0x5(%rdx) sets %sil testb %cl, %sil je 0x33122 pushq $0x1 popq %rax jmp 0x33170 movq %rax, %r15 movq %rbp, %rdi movq %r13, %rsi movq %r14, %rdx callq 0x3a3be movq %rdx, %r14 cmpl $0x6, %r14d jne 0x33131 movq %rbp, %rdi movq %r15, %rsi movq %r12, %rdx callq 0x1801e movq %rbx, %rbp andl $0x0, -0x20(%rbp) pushq $0x3 popq %rax movq %rax, -0x18(%rbp) andl $0x0, -0x10(%rbp) movq %rax, -0x8(%rbp) pushq $-0x1 popq %rax jmp 0x331e6 cmpl $-0x1, %r14d jne 0x33160 movb 0x5(%r13), %cl shrb $0x7, %cl jmp 0x33162 movq %r15, %xmm0 movq %rax, %xmm1 movl 0x10(%rsp), %r15d movq %rbp, %rdi movq %rbx, %rbp movq %xmm0, %rsi movq %xmm1, %rcx movq %r12, %rdx movq %r14, %r8 callq 0x3ac5f movl %eax, %r9d jmp 0x331d0 xorl %ecx, %ecx andl $-0x2, %eax cmpl $0x2, %eax sete %al andb %cl, %al movzbl %al, %eax movq %rax, 0x10(%rsp) movq %rdx, %rsi movq %r12, %rdx movq %rdi, %rbx callq 0x1801e movq %rbx, %rdi movq %r13, %rsi movq %r14, %rdx callq 0x1801e movq 0x10(%rsp), %r9 jmp 0x331d0 movq %rdx, %r14 movq %xmm1, 0x8(%rsp) movdqa 0x10(%rsp), %xmm0 movq %xmm0, %rsi movq %rbx, %rdi movq %r12, %rdx callq 0x1801e movq 0x8(%rsp), %xmm0 movq %xmm0, %rsi movq %rbx, %rdi movq %r14, %rdx callq 0x1801e xorl %r9d, %r9d xorl %eax, %eax cmpl %r15d, %r9d setne %al movq %rax, -0x20(%rbp) movq $0x1, -0x18(%rbp) xorl %eax, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rbx, %rdi movq %r13, %rsi movq %r14, %rdx callq 0x1801e jmp 0x33107 movq %rbp, %rdi movq %r15, %rsi movq %r12, %rdx callq 0x1801e movq 0x8(%rsp), %rbp jmp 0x33107 movl %r14d, %r10d jmp 0x3322b movl %r14d, %r10d movl %r14d, %eax andl $-0x2, %r10d cmpl $0x2, %r10d sete %cl jmp 0x330c1 cmpl $-0x7, %r12d jne 0x33146 movsd %xmm1, 0x8(%rsp) movq %rdi, %rbx movq %rdx, %rsi movq %r12, %rdx callq 0x36b72 movq %rax, %xmm0 cmpq $-0x9, %rdx jne 0x33276 pushq $-0x9 popq %r12 movq %rbx, %rdi movq 0x8(%rsp), %xmm1 jmp 0x33146 movq %rdx, %r12 jmp 0x331a7
js_eq_slow: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r15d, edx mov rbp, rsi movq xmm0, qword ptr [rsi-20h] mov r12, [rsi-18h] movq xmm1, qword ptr [rsi-10h] mov r14, [rsi-8] push 1 pop r9 push 0FFFFFFFFFFFFFFF9h pop r11 push 0FFFFFFFFFFFFFFFFh pop r10 mov ebx, offset locret_10201 movq xmm2, cs:qword_85838 loc_32DED: mov eax, r14d xor eax, 2 mov ecx, r14d xor ecx, 3 loc_32DF9: lea esi, [r12+9] movq rdx, xmm0 movq r13, xmm1 cmp esi, 10h ja short loc_32E2F bt ebx, esi jnb short loc_32E2F cmp r14d, 0FFFFFFF7h jz loc_32FB8 cmp r14d, 7 jz loc_32FCF test r14d, r14d jz loc_32FB8 loc_32E2F: cmp r12d, r14d jz loc_32FE2 mov r8d, r12d xor r8d, 2 mov esi, r12d xor esi, 3 or esi, eax setz sil or r8d, ecx jz loc_331D0 test sil, sil jnz loc_331D0 cmp r12d, 0FFFFFFF9h jz short loc_32E99 cmp r14d, 0FFFFFFF9h jnz short loc_32E87 lea esi, [r12+1]; switch 9 cases cmp esi, 8 ja def_32E85; jumptable 0000000000032E85 default case lea r8, jpt_32E85 movsxd rsi, ds:(jpt_32E85 - 83B0Ch)[r8+rsi*4] add rsi, r8 jmp rsi; switch jump loc_32E87: cmp r12d, 1 jnz short loc_32ECA loc_32E8D: pand xmm0, xmm2; jumptable 0000000000032E85 case 1 xor r12d, r12d jmp loc_32DF9 loc_32E99: cmp r14d, 1 jz short loc_32ED0 cmp r14d, 0FFFFFFF7h jz loc_3323B cmp r14d, 0FFFFFFF9h jz loc_33225 test r14d, r14d jz loc_32FFB; jumptable 0000000000032E85 cases 0,7 mov eax, r11d cmp r14d, 7 jnz short loc_32EE4 jmp loc_32FFB; jumptable 0000000000032E85 cases 0,7 loc_32ECA: cmp r14d, 1 jnz short loc_32EDB loc_32ED0: mov eax, r13d xor r14d, r14d jmp loc_32F97 loc_32EDB: mov eax, r12d cmp r12d, 0FFFFFFFFh jz short loc_32F0A loc_32EE4: cmp r14d, 0FFFFFFFFh jnz loc_33220 lea ecx, [rax+9] cmp ecx, 10h ja short loc_32EFB bt ebx, ecx jb short loc_32F20; jumptable 0000000000032E85 case -1 loc_32EFB: mov ecx, eax and ecx, 0FFFFFFFEh cmp ecx, 0FFFFFFF8h jz short loc_32F20; jumptable 0000000000032E85 case -1 jmp loc_3322B loc_32F0A: lea eax, [r14+9] cmp eax, 10h ja loc_32FA1 bt ebx, eax jnb loc_32FA1 loc_32F20: mov dword ptr [rsp+58h+var_48], r15d; jumptable 0000000000032E85 case -1 mov rsi, rdx mov rdx, r12 push 2 pop rcx mov rbx, rdi call JS_ToPrimitiveFree mov r12, rdx cmp r12d, 6 jz loc_331F5 mov r15, rax mov [rsp+58h+var_50], rbp mov rbp, rbx mov rdi, rbx mov rsi, r13 mov rdx, r14 push 2 pop rcx call JS_ToPrimitiveFree mov r14, rdx cmp r14d, 6 jz loc_33208 movq xmm0, r15 mov r15d, dword ptr [rsp+58h+var_48] mov rdi, rbp mov rbp, [rsp+58h+var_50] push 1 pop r9 push 0FFFFFFFFFFFFFFFFh pop r10 push 0FFFFFFFFFFFFFFF9h pop r11 mov ebx, offset locret_10201 movq xmm2, cs:qword_85838 loc_32F97: movq xmm1, rax jmp loc_32DED loc_32FA1: mov ecx, r14d and ecx, 0FFFFFFFEh mov eax, r10d cmp ecx, 0FFFFFFF8h jnz loc_32EE4 jmp loc_32F20; jumptable 0000000000032E85 case -1 loc_32FB8: mov eax, r12d or eax, r14d jnz short loc_32FCF xor r9d, r9d cmp edx, r13d setz r9b jmp loc_331D0 loc_32FCF: cmp r12d, 7 jnz short loc_3302C test r14d, r14d jz short loc_33037 cmp r14d, 7 jz short loc_33037 jmp short loc_3305F loc_32FE2: mov rsi, rdx mov rdx, r12 mov rcx, r13 mov r8, r14 xor r9d, r9d call js_strict_eq2 jmp loc_3315B loc_32FFB: mov rbx, rbp; jumptable 0000000000032E85 cases 0,7 mov dword ptr [rsp+58h+var_48], r15d mov rsi, rdx mov rdx, r12 mov rbp, rdi call JS_ToNumericFree mov r12, rdx cmp r12d, 6 jnz loc_330DC mov rdi, rbp mov rsi, r13 mov rdx, r14 jmp loc_330FF loc_3302C: cmp r14d, 7 jnz short loc_3305F test r12d, r12d jnz short loc_3305F loc_33037: cmp r12d, 7 jz short loc_33041 cvtsi2sd xmm0, edx loc_33041: cmp r14d, 7 jz short loc_3304C cvtsi2sd xmm1, r13d loc_3304C: cmpeqsd xmm0, xmm1 movq r9, xmm0 and r9d, 1 jmp loc_331D0 loc_3305F: mov esi, 0ACh mov rcx, r12 mov r8, r13 mov r9, r14 call js_compare_bigint mov r9d, eax test eax, eax jns loc_331D0 jmp loc_33107 def_32E85: cmp r12d, 0FFFFFFF7h; jumptable 0000000000032E85 default case jnz short loc_330BC; jumptable 0000000000032E85 cases 2-6 movaps [rsp+58h+var_48], xmm0 mov rbx, rdi mov rsi, r13 mov rdx, r14 call JS_StringToBigInt movq xmm1, rax cmp rdx, 0FFFFFFFFFFFFFFF7h jnz loc_33198 push 0FFFFFFFFFFFFFFF7h pop r14 mov rdi, rbx movdqa xmm0, [rsp+58h+var_48] jmp loc_33146 loc_330BC: xor ecx, ecx; jumptable 0000000000032E85 cases 2-6 mov eax, r12d loc_330C1: cmp r12d, 0FFFFFFFFh jnz short loc_33122 cmp byte ptr [rdx+5], 0 sets sil test sil, cl jz short loc_33122 push 1 pop rax jmp loc_33170 loc_330DC: mov r15, rax mov rdi, rbp mov rsi, r13 mov rdx, r14 call JS_ToNumericFree mov r14, rdx cmp r14d, 6 jnz short loc_33131 mov rdi, rbp mov rsi, r15 mov rdx, r12 loc_330FF: call JS_FreeValue mov rbp, rbx loc_33107: and dword ptr [rbp-20h], 0 push 3 pop rax mov [rbp-18h], rax and dword ptr [rbp-10h], 0 mov [rbp-8], rax push 0FFFFFFFFFFFFFFFFh pop rax jmp loc_331E6 loc_33122: cmp r14d, 0FFFFFFFFh jnz short loc_33160 mov cl, [r13+5] shr cl, 7 jmp short loc_33162 loc_33131: movq xmm0, r15 movq xmm1, rax mov r15d, dword ptr [rsp+58h+var_48] mov rdi, rbp mov rbp, rbx loc_33146: movq rsi, xmm0 movq rcx, xmm1 mov rdx, r12 mov r8, r14 call js_strict_eq loc_3315B: mov r9d, eax jmp short loc_331D0 loc_33160: xor ecx, ecx loc_33162: and eax, 0FFFFFFFEh cmp eax, 2 setz al and al, cl movzx eax, al loc_33170: mov qword ptr [rsp+58h+var_48], rax mov rsi, rdx mov rdx, r12 mov rbx, rdi call JS_FreeValue mov rdi, rbx mov rsi, r13 mov rdx, r14 call JS_FreeValue mov r9, qword ptr [rsp+58h+var_48] jmp short loc_331D0 loc_33198: mov r14, rdx movq [rsp+58h+var_50], xmm1 movdqa xmm0, [rsp+58h+var_48] loc_331A7: movq rsi, xmm0 mov rdi, rbx mov rdx, r12 call JS_FreeValue movq xmm0, [rsp+58h+var_50] movq rsi, xmm0 mov rdi, rbx mov rdx, r14 call JS_FreeValue xor r9d, r9d loc_331D0: xor eax, eax cmp r9d, r15d setnz al mov [rbp-20h], rax mov qword ptr [rbp-18h], 1 xor eax, eax loc_331E6: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_331F5: mov rdi, rbx mov rsi, r13 mov rdx, r14 call JS_FreeValue jmp loc_33107 loc_33208: mov rdi, rbp mov rsi, r15 mov rdx, r12 call JS_FreeValue mov rbp, [rsp+58h+var_50] jmp loc_33107 loc_33220: mov r10d, r14d jmp short loc_3322B loc_33225: mov r10d, r14d mov eax, r14d loc_3322B: and r10d, 0FFFFFFFEh cmp r10d, 2 setz cl jmp loc_330C1 loc_3323B: cmp r12d, 0FFFFFFF9h jnz loc_33146 movsd [rsp+58h+var_50], xmm1 mov rbx, rdi mov rsi, rdx mov rdx, r12 call JS_StringToBigInt movq xmm0, rax cmp rdx, 0FFFFFFFFFFFFFFF7h jnz short loc_33276 push 0FFFFFFFFFFFFFFF7h pop r12 mov rdi, rbx movq xmm1, [rsp+58h+var_50] jmp loc_33146 loc_33276: mov r12, rdx jmp loc_331A7
long long js_eq_slow(long long a1, long long a2, __int32 a3) { __m128d v5; // xmm0 long long v6; // r12 __m128d v7; // xmm1 long long v8; // r14 int v9; // r9d int v10; // r10d void *v11; // rbx __m128i v12; // xmm2 long long v13; // rcx long long v14; // r8 int v15; // eax long long v16; // rax long long v17; // rax long long v18; // rdx long long v19; // r15 long long v20; // rdx int v21; // eax long long v22; // rax long long v23; // rdx long long v24; // rsi long long v25; // rdx long long v26; // rbx long long v27; // rdx long long v28; // xmm0_8 bool v29; // cl long long v30; // rax long long v31; // r15 long long v32; // rax long long v33; // rdx unsigned __int8 v35; // cl long long v36; // rdx long long v37; // [rsp+8h] [rbp-50h] __m128i v38[4]; // [rsp+10h] [rbp-48h] BYREF v5 = (__m128d)_mm_loadl_epi64((const __m128i *)(a2 - 32)); v6 = *(_QWORD *)(a2 - 24); v7.m128d_f64[0] = *(double *)(a2 - 16); v8 = *(_QWORD *)(a2 - 8); v9 = 1; v10 = -1; v11 = &locret_10201; v12 = _mm_loadl_epi64((const __m128i *)&qword_85838); LABEL_2: v13 = (unsigned int)v8 ^ 3; while ( 1 ) { if ( (unsigned int)(v6 + 9) <= 0x10 && _bittest((const int *)&v11, v6 + 9) ) { switch ( (_DWORD)v8 ) { case 0xFFFFFFF7: goto LABEL_38; case 7: goto LABEL_40; case 0: LABEL_38: if ( !((unsigned int)v8 | (unsigned int)v6) ) { v9 = LODWORD(v5.m128d_f64[0]) == LODWORD(v7.m128d_f64[0]); LABEL_77: *(_QWORD *)(a2 - 32) = v9 != a3; *(_QWORD *)(a2 - 24) = 1LL; return 0LL; } LABEL_40: if ( (_DWORD)v6 == 7 ) { if ( (_DWORD)v8 && (_DWORD)v8 != 7 ) goto LABEL_54; } else if ( (_DWORD)v8 != 7 || (_DWORD)v6 ) { LABEL_54: v9 = js_compare_bigint( a1, 172LL, *(_QWORD *)&v5.m128d_f64[0], v6, *(_QWORD *)&v7.m128d_f64[0], v8, v5.m128d_f64[0], v7.m128d_f64[0], *(double *)v12.m128i_i64); if ( v9 < 0 ) goto LABEL_66; goto LABEL_77; } if ( (_DWORD)v6 != 7 ) v5.m128d_f64[0] = (double)SLODWORD(v5.m128d_f64[0]); if ( (_DWORD)v8 != 7 ) v7.m128d_f64[0] = (double)SLODWORD(v7.m128d_f64[0]); v9 = *(_OWORD *)&_mm_cmpeq_sd(v5, v7) & 1; goto LABEL_77; } } if ( (_DWORD)v6 == (_DWORD)v8 ) { v21 = js_strict_eq2(a1, *(_QWORD *)&v5.m128d_f64[0], v6, *(_QWORD *)&v7.m128d_f64[0], v8, 0LL); LABEL_71: v9 = v21; goto LABEL_77; } v14 = (unsigned int)v13 | (unsigned int)v6 ^ 2; if ( !((unsigned int)v13 | (unsigned int)v6 ^ 2) || !((unsigned int)v8 ^ 2 | (unsigned int)v6 ^ 3) ) goto LABEL_77; if ( (_DWORD)v6 == -7 ) break; if ( (_DWORD)v8 == -7 ) { switch ( (int)v6 ) { case -1: goto LABEL_32; case 0: case 7: goto LABEL_45; case 1: goto LABEL_15; case 2: case 3: case 4: case 5: case 6: goto LABEL_59; default: if ( (_DWORD)v6 != -9 ) { LABEL_59: v29 = 0; v15 = v6; goto LABEL_60; } v38[0] = (__m128i)v5; v26 = a1; *(_QWORD *)&v7.m128d_f64[0] = JS_StringToBigInt( a1, *(_QWORD *)&v7.m128d_f64[0], v8, v13, v14, 1LL, v5.m128d_f64[0], v7.m128d_f64[0], *(double *)v12.m128i_i64); if ( v27 == -9 ) { v8 = -9LL; v28 = _mm_load_si128(v38).m128i_u64[0]; goto LABEL_70; } v8 = v27; v37 = *(_QWORD *)&v7.m128d_f64[0]; v28 = _mm_load_si128(v38).m128i_u64[0]; break; } goto LABEL_76; } if ( (_DWORD)v6 != 1 ) { if ( (_DWORD)v8 == 1 ) { LABEL_23: v16 = LODWORD(v7.m128d_f64[0]); v8 = 0LL; goto LABEL_35; } v15 = v6; if ( (_DWORD)v6 == -1 ) { if ( (unsigned int)(v8 + 9) <= 0x10 && _bittest((const int *)&v11, v8 + 9) || (v15 = -1, (v8 & 0xFFFFFFFE) == 0xFFFFFFF8) ) { LABEL_32: v38[0].m128i_i32[0] = a3; v17 = JS_ToPrimitiveFree(a1, *(_QWORD *)&v5.m128d_f64[0], v6, 2LL); v6 = v18; if ( (_DWORD)v18 == 6 ) { JS_FreeValue(a1, *(long long *)&v7.m128d_f64[0], v8); goto LABEL_66; } v19 = v17; v16 = JS_ToPrimitiveFree(a1, *(_QWORD *)&v7.m128d_f64[0], v8, 2LL); v8 = v20; if ( (_DWORD)v20 == 6 ) { JS_FreeValue(a1, v19, v6); goto LABEL_66; } v5 = (__m128d)(unsigned long long)v19; a3 = v38[0].m128i_i32[0]; v9 = 1; v10 = -1; v11 = &locret_10201; v12 = _mm_loadl_epi64((const __m128i *)&qword_85838); LABEL_35: *(_QWORD *)&v7.m128d_f64[0] = v16; goto LABEL_2; } } LABEL_25: if ( (_DWORD)v8 == -1 ) { if ( (unsigned int)(v15 + 9) <= 0x10 && _bittest((const int *)&v11, v15 + 9) || (v15 & 0xFFFFFFFE) == 0xFFFFFFF8 ) goto LABEL_32; } else { v10 = v8; } LABEL_82: v29 = (v10 & 0xFFFFFFFE) == 2; LABEL_60: if ( (_DWORD)v6 == -1 && v29 && *(char *)(*(_QWORD *)&v5.m128d_f64[0] + 5LL) < 0 ) { v30 = 1LL; } else { if ( (_DWORD)v8 == -1 ) v35 = *(_BYTE *)(*(_QWORD *)&v7.m128d_f64[0] + 5LL) >> 7; else v35 = 0; v30 = v35 & ((v15 & 0xFFFFFFFE) == 2); } v38[0].m128i_i64[0] = v30; JS_FreeValue(a1, *(long long *)&v5.m128d_f64[0], v6); JS_FreeValue(a1, *(long long *)&v7.m128d_f64[0], v8); v9 = v38[0].m128i_i32[0]; goto LABEL_77; } LABEL_15: v5 = (__m128d)_mm_and_si128((__m128i)v5, v12); v6 = 0LL; } switch ( (_DWORD)v8 ) { case 1: goto LABEL_23; case 0xFFFFFFF7: v37 = *(_QWORD *)&v7.m128d_f64[0]; v26 = a1; v28 = JS_StringToBigInt( a1, *(_QWORD *)&v5.m128d_f64[0], v6, v13, v14, 1LL, v5.m128d_f64[0], v7.m128d_f64[0], *(double *)v12.m128i_i64); if ( v36 != -9 ) { v6 = v36; LABEL_76: JS_FreeValue(v26, v28, v6); JS_FreeValue(v26, v37, v8); v9 = 0; goto LABEL_77; } v6 = -9LL; goto LABEL_70; case 0xFFFFFFF9: v10 = -7; v15 = -7; goto LABEL_82; } if ( (_DWORD)v8 ) { v15 = -7; if ( (_DWORD)v8 != 7 ) goto LABEL_25; } LABEL_45: v38[0].m128i_i32[0] = a3; v22 = JS_ToNumericFree(a1, *(_QWORD *)&v5.m128d_f64[0]); v6 = v23; if ( (_DWORD)v23 == 6 ) { v24 = *(_QWORD *)&v7.m128d_f64[0]; v25 = v8; goto LABEL_65; } v31 = v22; v32 = JS_ToNumericFree(a1, *(_QWORD *)&v7.m128d_f64[0]); v8 = v33; if ( (_DWORD)v33 != 6 ) { v28 = v31; *(_QWORD *)&v7.m128d_f64[0] = v32; a3 = v38[0].m128i_i32[0]; LABEL_70: v21 = js_strict_eq(a1, v28, v6, *(_QWORD *)&v7.m128d_f64[0], v8); goto LABEL_71; } v24 = v31; v25 = v6; LABEL_65: JS_FreeValue(a1, v24, v25); LABEL_66: *(_DWORD *)(a2 - 32) = 0; *(_QWORD *)(a2 - 24) = 3LL; *(_DWORD *)(a2 - 16) = 0; *(_QWORD *)(a2 - 8) = 3LL; return -1LL; }
js_eq_slow: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R15D,EDX MOV RBP,RSI MOVQ XMM0,qword ptr [RSI + -0x20] MOV R12,qword ptr [RSI + -0x18] MOVQ XMM1,qword ptr [RSI + -0x10] MOV R14,qword ptr [RSI + -0x8] PUSH 0x1 POP R9 PUSH -0x7 POP R11 PUSH -0x1 POP R10 MOV EBX,0x10201 MOVQ XMM2,qword ptr [0x00185838] LAB_00132ded: MOV EAX,R14D XOR EAX,0x2 MOV ECX,R14D XOR ECX,0x3 LAB_00132df9: LEA ESI,[R12 + 0x9] MOVQ RDX,XMM0 MOVQ R13,XMM1 CMP ESI,0x10 JA 0x00132e2f BT EBX,ESI JNC 0x00132e2f CMP R14D,-0x9 JZ 0x00132fb8 CMP R14D,0x7 JZ 0x00132fcf TEST R14D,R14D JZ 0x00132fb8 LAB_00132e2f: CMP R12D,R14D JZ 0x00132fe2 MOV R8D,R12D XOR R8D,0x2 MOV ESI,R12D XOR ESI,0x3 OR ESI,EAX SETZ SIL OR R8D,ECX JZ 0x001331d0 TEST SIL,SIL JNZ 0x001331d0 CMP R12D,-0x7 JZ 0x00132e99 CMP R14D,-0x7 JNZ 0x00132e87 LEA ESI,[R12 + 0x1] CMP ESI,0x8 JA 0x00133082 LEA R8,[0x183b0c] MOVSXD RSI,dword ptr [R8 + RSI*0x4] ADD RSI,R8 switchD: JMP RSI LAB_00132e87: CMP R12D,0x1 JNZ 0x00132eca caseD_1: PAND XMM0,XMM2 XOR R12D,R12D JMP 0x00132df9 LAB_00132e99: CMP R14D,0x1 JZ 0x00132ed0 CMP R14D,-0x9 JZ 0x0013323b CMP R14D,-0x7 JZ 0x00133225 TEST R14D,R14D JZ 0x00132ffb MOV EAX,R11D CMP R14D,0x7 JNZ 0x00132ee4 JMP 0x00132ffb LAB_00132eca: CMP R14D,0x1 JNZ 0x00132edb LAB_00132ed0: MOV EAX,R13D XOR R14D,R14D JMP 0x00132f97 LAB_00132edb: MOV EAX,R12D CMP R12D,-0x1 JZ 0x00132f0a LAB_00132ee4: CMP R14D,-0x1 JNZ 0x00133220 LEA ECX,[RAX + 0x9] CMP ECX,0x10 JA 0x00132efb BT EBX,ECX JC 0x00132f20 LAB_00132efb: MOV ECX,EAX AND ECX,0xfffffffe CMP ECX,-0x8 JZ 0x00132f20 JMP 0x0013322b LAB_00132f0a: LEA EAX,[R14 + 0x9] CMP EAX,0x10 JA 0x00132fa1 BT EBX,EAX JNC 0x00132fa1 caseD_ffffffff: MOV dword ptr [RSP + 0x10],R15D MOV RSI,RDX MOV RDX,R12 PUSH 0x2 POP RCX MOV RBX,RDI CALL 0x001366ee MOV R12,RDX CMP R12D,0x6 JZ 0x001331f5 MOV R15,RAX MOV qword ptr [RSP + 0x8],RBP MOV RBP,RBX MOV RDI,RBX MOV RSI,R13 MOV RDX,R14 PUSH 0x2 POP RCX CALL 0x001366ee MOV R14,RDX CMP R14D,0x6 JZ 0x00133208 MOVQ XMM0,R15 MOV R15D,dword ptr [RSP + 0x10] MOV RDI,RBP MOV RBP,qword ptr [RSP + 0x8] PUSH 0x1 POP R9 PUSH -0x1 POP R10 PUSH -0x7 POP R11 MOV EBX,0x10201 MOVQ XMM2,qword ptr [0x00185838] LAB_00132f97: MOVQ XMM1,RAX JMP 0x00132ded LAB_00132fa1: MOV ECX,R14D AND ECX,0xfffffffe MOV EAX,R10D CMP ECX,-0x8 JNZ 0x00132ee4 JMP 0x00132f20 LAB_00132fb8: MOV EAX,R12D OR EAX,R14D JNZ 0x00132fcf XOR R9D,R9D CMP EDX,R13D SETZ R9B JMP 0x001331d0 LAB_00132fcf: CMP R12D,0x7 JNZ 0x0013302c TEST R14D,R14D JZ 0x00133037 CMP R14D,0x7 JZ 0x00133037 JMP 0x0013305f LAB_00132fe2: MOV RSI,RDX MOV RDX,R12 MOV RCX,R13 MOV R8,R14 XOR R9D,R9D CALL 0x00133292 JMP 0x0013315b caseD_0: MOV RBX,RBP MOV dword ptr [RSP + 0x10],R15D MOV RSI,RDX MOV RDX,R12 MOV RBP,RDI CALL 0x0013a3be MOV R12,RDX CMP R12D,0x6 JNZ 0x001330dc MOV RDI,RBP MOV RSI,R13 MOV RDX,R14 JMP 0x001330ff LAB_0013302c: CMP R14D,0x7 JNZ 0x0013305f TEST R12D,R12D JNZ 0x0013305f LAB_00133037: CMP R12D,0x7 JZ 0x00133041 CVTSI2SD XMM0,EDX LAB_00133041: CMP R14D,0x7 JZ 0x0013304c CVTSI2SD XMM1,R13D LAB_0013304c: CMPEQSD XMM0,XMM1 MOVQ R9,XMM0 AND R9D,0x1 JMP 0x001331d0 LAB_0013305f: MOV ESI,0xac MOV RCX,R12 MOV R8,R13 MOV R9,R14 CALL 0x0013aa74 MOV R9D,EAX TEST EAX,EAX JNS 0x001331d0 JMP 0x00133107 default: CMP R12D,-0x9 JNZ 0x001330bc MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOV RBX,RDI MOV RSI,R13 MOV RDX,R14 CALL 0x00136b72 MOVQ XMM1,RAX CMP RDX,-0x9 JNZ 0x00133198 PUSH -0x9 POP R14 MOV RDI,RBX MOVDQA XMM0,xmmword ptr [RSP + 0x10] JMP 0x00133146 caseD_2: XOR ECX,ECX MOV EAX,R12D LAB_001330c1: CMP R12D,-0x1 JNZ 0x00133122 CMP byte ptr [RDX + 0x5],0x0 SETS SIL TEST SIL,CL JZ 0x00133122 PUSH 0x1 POP RAX JMP 0x00133170 LAB_001330dc: MOV R15,RAX MOV RDI,RBP MOV RSI,R13 MOV RDX,R14 CALL 0x0013a3be MOV R14,RDX CMP R14D,0x6 JNZ 0x00133131 MOV RDI,RBP MOV RSI,R15 MOV RDX,R12 LAB_001330ff: CALL 0x0011801e MOV RBP,RBX LAB_00133107: AND dword ptr [RBP + -0x20],0x0 PUSH 0x3 POP RAX MOV qword ptr [RBP + -0x18],RAX AND dword ptr [RBP + -0x10],0x0 MOV qword ptr [RBP + -0x8],RAX PUSH -0x1 POP RAX JMP 0x001331e6 LAB_00133122: CMP R14D,-0x1 JNZ 0x00133160 MOV CL,byte ptr [R13 + 0x5] SHR CL,0x7 JMP 0x00133162 LAB_00133131: MOVQ XMM0,R15 MOVQ XMM1,RAX MOV R15D,dword ptr [RSP + 0x10] MOV RDI,RBP MOV RBP,RBX LAB_00133146: MOVQ RSI,XMM0 MOVQ RCX,XMM1 MOV RDX,R12 MOV R8,R14 CALL 0x0013ac5f LAB_0013315b: MOV R9D,EAX JMP 0x001331d0 LAB_00133160: XOR ECX,ECX LAB_00133162: AND EAX,0xfffffffe CMP EAX,0x2 SETZ AL AND AL,CL MOVZX EAX,AL LAB_00133170: MOV qword ptr [RSP + 0x10],RAX MOV RSI,RDX MOV RDX,R12 MOV RBX,RDI CALL 0x0011801e MOV RDI,RBX MOV RSI,R13 MOV RDX,R14 CALL 0x0011801e MOV R9,qword ptr [RSP + 0x10] JMP 0x001331d0 LAB_00133198: MOV R14,RDX MOVQ qword ptr [RSP + 0x8],XMM1 MOVDQA XMM0,xmmword ptr [RSP + 0x10] LAB_001331a7: MOVQ RSI,XMM0 MOV RDI,RBX MOV RDX,R12 CALL 0x0011801e MOVQ XMM0,qword ptr [RSP + 0x8] MOVQ RSI,XMM0 MOV RDI,RBX MOV RDX,R14 CALL 0x0011801e XOR R9D,R9D LAB_001331d0: XOR EAX,EAX CMP R9D,R15D SETNZ AL MOV qword ptr [RBP + -0x20],RAX MOV qword ptr [RBP + -0x18],0x1 XOR EAX,EAX LAB_001331e6: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001331f5: MOV RDI,RBX MOV RSI,R13 MOV RDX,R14 CALL 0x0011801e JMP 0x00133107 LAB_00133208: MOV RDI,RBP MOV RSI,R15 MOV RDX,R12 CALL 0x0011801e MOV RBP,qword ptr [RSP + 0x8] JMP 0x00133107 LAB_00133220: MOV R10D,R14D JMP 0x0013322b LAB_00133225: MOV R10D,R14D MOV EAX,R14D LAB_0013322b: AND R10D,0xfffffffe CMP R10D,0x2 SETZ CL JMP 0x001330c1 LAB_0013323b: CMP R12D,-0x7 JNZ 0x00133146 MOVSD qword ptr [RSP + 0x8],XMM1 MOV RBX,RDI MOV RSI,RDX MOV RDX,R12 CALL 0x00136b72 MOVQ XMM0,RAX CMP RDX,-0x9 JNZ 0x00133276 PUSH -0x9 POP R12 MOV RDI,RBX MOVQ XMM1,qword ptr [RSP + 0x8] JMP 0x00133146 LAB_00133276: MOV R12,RDX JMP 0x001331a7
int8 js_eq_slow(int8 param_1,long param_2,uint param_3) { uint uVar1; int1 auVar2 [16]; uint uVar3; uint uVar4; byte bVar5; uint uVar6; int8 uVar7; uint uVar8; bool bVar10; double dVar11; double dVar12; ulong uVar13; int1 auVar14 [16]; int1 auVar15 [16]; int8 local_50; int8 uVar9; auVar14 = *(int1 (*) [16])(param_2 + -0x20); auVar15 = *(int1 (*) [16])(param_2 + -0x10); uVar13 = DAT_00185838; LAB_00132ded: uVar9 = auVar15._8_8_; dVar12 = auVar15._0_8_; uVar4 = 1; uVar8 = auVar15._8_4_; do { uVar7 = auVar14._8_8_; dVar11 = auVar14._0_8_; uVar1 = auVar14._8_4_; if ((uVar1 + 9 < 0x11) && ((0x10201U >> (uVar1 + 9 & 0x1f) & 1) != 0)) { if (uVar8 == 0xfffffff7) { LAB_00132fb8: if (uVar1 == 0 && uVar8 == 0) { uVar4 = (uint)(auVar14._0_4_ == auVar15._0_4_); goto LAB_001331d0; } } else if (uVar8 != 7) { if (uVar8 != 0) goto LAB_00132e2f; goto LAB_00132fb8; } if (uVar1 == 7) { if ((uVar8 == 0) || (uVar8 == 7)) { LAB_00133037: if (uVar1 != 7) { dVar11 = (double)auVar14._0_4_; } if (uVar8 != 7) { dVar12 = (double)auVar15._0_4_; } uVar4 = -(uint)(dVar11 == dVar12) & 1; goto LAB_001331d0; } } else if ((uVar8 == 7) && (uVar1 == 0)) goto LAB_00133037; uVar4 = js_compare_bigint(param_1,0xac,dVar11,uVar7,dVar12,uVar9); if (-1 < (int)uVar4) { LAB_001331d0: *(ulong *)(param_2 + -0x20) = (ulong)(uVar4 != param_3); *(int8 *)(param_2 + -0x18) = 1; return 0; } goto LAB_00133107; } LAB_00132e2f: if (uVar1 == uVar8) { uVar4 = js_strict_eq2(param_1,dVar11,uVar7,dVar12,uVar9,0); goto LAB_001331d0; } if ((uVar1 == 2 && uVar8 == 3) || (uVar1 == 3 && uVar8 == 2)) goto LAB_001331d0; uVar6 = uVar8; if (uVar1 == 0xfffffff9) { if (uVar8 != 1) { if (uVar8 != 0xfffffff7) { if (uVar8 == 0xfffffff9) { uVar3 = 0xfffffff9; goto LAB_0013322b; } if ((uVar8 != 0) && (uVar3 = 0xfffffff9, uVar8 != 7)) goto LAB_00132ee4; goto switchD_00132e85_caseD_0; } auVar14 = JS_StringToBigInt(param_1,dVar11,uVar7); uVar9 = auVar14._0_8_; if (auVar14._8_8_ != -9) { LAB_001331a7: local_50 = auVar15._0_8_; JS_FreeValue(param_1,auVar14._0_8_,auVar14._8_8_); JS_FreeValue(param_1,local_50,auVar15._8_8_); uVar4 = 0; goto LAB_001331d0; } auVar14._8_8_ = 0xfffffffffffffff7; auVar14._0_8_ = uVar9; LAB_00133146: uVar4 = js_strict_eq(param_1,auVar14._0_8_,auVar14._8_8_,auVar15._0_8_,auVar15._8_8_); goto LAB_001331d0; } LAB_00132ed0: auVar15._8_8_ = 0; auVar15._0_8_ = (ulong)dVar12 & 0xffffffff; goto LAB_00132ded; } uVar3 = uVar1; if (uVar8 == 0xfffffff9) { switch(uVar1) { case 0: case 7: switchD_00132e85_caseD_0: auVar14 = JS_ToNumericFree(param_1,dVar11,uVar7); auVar2 = auVar15; if ((auVar14._8_4_ != 6) && (auVar15 = JS_ToNumericFree(param_1,dVar12,uVar9), auVar2 = auVar14, auVar15._8_4_ != 6)) goto LAB_00133146; JS_FreeValue(param_1,auVar2._0_8_,auVar2._8_8_); goto LAB_00133107; case 1: goto switchD_00132e85_caseD_1; case 0xffffffff: goto switchD_00132e85_caseD_ffffffff; default: if (uVar1 == 0xfffffff7) { auVar15 = JS_StringToBigInt(param_1,dVar12,uVar9); uVar9 = auVar15._0_8_; if (auVar15._8_8_ != -9) goto LAB_001331a7; auVar15._8_8_ = 0xfffffffffffffff7; auVar15._0_8_ = uVar9; goto LAB_00133146; } case 2: case 3: case 4: case 5: case 6: bVar10 = false; LAB_001330c1: if ((uVar1 == 0xffffffff) && ((bool)(*(char *)((long)dVar11 + 5) < '\0' & bVar10))) { uVar4 = 1; } else { if (uVar8 == 0xffffffff) { bVar5 = *(byte *)((long)dVar12 + 5) >> 7; } else { bVar5 = 0; } uVar4 = (uint)((uVar3 & 0xfffffffe) == 2 & bVar5); } JS_FreeValue(param_1,dVar11,uVar7); JS_FreeValue(param_1,dVar12,uVar9); goto LAB_001331d0; } } if (uVar1 != 1) break; switchD_00132e85_caseD_1: auVar14._8_8_ = 0; auVar14._0_8_ = (ulong)dVar11 & uVar13; } while( true ); if (uVar8 == 1) goto LAB_00132ed0; if ((uVar1 != 0xffffffff) || (((0x10 < uVar8 + 9 || ((0x10201U >> (uVar8 + 9 & 0x1f) & 1) == 0)) && (uVar3 = 0xffffffff, (uVar8 & 0xfffffffe) != 0xfffffff8)))) { LAB_00132ee4: if ((uVar8 != 0xffffffff) || (((0x10 < uVar3 + 9 || ((0x10201U >> (uVar3 + 9 & 0x1f) & 1) == 0)) && (uVar6 = 0xffffffff, (uVar3 & 0xfffffffe) != 0xfffffff8)))) { LAB_0013322b: bVar10 = (uVar6 & 0xfffffffe) == 2; goto LAB_001330c1; } } switchD_00132e85_caseD_ffffffff: auVar14 = JS_ToPrimitiveFree(param_1,dVar11,uVar7,2); if (auVar14._8_4_ == 6) { JS_FreeValue(param_1,dVar12,uVar9); goto LAB_00133107; } auVar15 = JS_ToPrimitiveFree(param_1,dVar12,uVar9,2); uVar13 = DAT_00185838; if (auVar15._8_4_ == 6) { JS_FreeValue(param_1,auVar14._0_8_,auVar14._8_8_); LAB_00133107: *(int4 *)(param_2 + -0x20) = 0; *(int8 *)(param_2 + -0x18) = 3; *(int4 *)(param_2 + -0x10) = 0; *(int8 *)(param_2 + -8) = 3; return 0xffffffffffffffff; } goto LAB_00132ded; }
55,276
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::key(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
monkey531[P]llama/common/json.hpp
bool key(string_t& val) { BasicJsonType k = BasicJsonType(val); // check callback for key const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::key, k); key_keep_stack.push_back(keep); // add discarded value at given key and store the reference for later if (keep && ref_stack.back()) { object_element = &(ref_stack.back()->m_data.m_value.object->operator[](val) = discarded); } return true; }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::key(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x10(%rsp), %rdi callq 0x63a2a movq 0x10(%rbx), %rax subq 0x8(%rbx), %rax shrq $0x3, %rax movl %eax, 0xc(%rsp) movb $0x4, 0xb(%rsp) cmpq $0x0, 0x90(%rbx) je 0x60e92 leaq 0x80(%rbx), %rdi leaq 0xc(%rsp), %rsi leaq 0xb(%rsp), %rdx leaq 0x10(%rsp), %rcx callq *0x98(%rbx) movl %eax, %ebp leaq 0x48(%rbx), %rdi movzbl %al, %esi callq 0x605fe testb %bpl, %bpl je 0x60e70 movq 0x10(%rbx), %rax cmpq $0x0, -0x8(%rax) je 0x60e70 leaq 0xa8(%rbx), %rsi leaq 0x20(%rsp), %rdi callq 0x61f10 movq 0x10(%rbx), %rax movq -0x8(%rax), %rax movq 0x8(%rax), %rdi movq %r14, %rsi callq 0x63a64 leaq 0x20(%rsp), %r14 movq %rax, %rdi movq %r14, %rsi callq 0x5f620 movq %rax, 0x70(%rbx) movq %r14, %rdi xorl %esi, %esi callq 0x5cc84 movq %r14, %rdi callq 0x62470 leaq 0x10(%rsp), %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x5cc84 movq %rbx, %rdi callq 0x62470 movb $0x1, %al addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq callq 0x1b340 movq %rax, %rbx leaq 0x20(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x5cc84 movq %r14, %rdi callq 0x62470 jmp 0x60eb6 movq %rax, %rbx leaq 0x10(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x5cc84 movq %r14, %rdi callq 0x62470 movq %rbx, %rdi callq 0x1c0d0 nop
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyERSB_: push rbp push r14 push rbx sub rsp, 30h mov r14, rsi mov rbx, rdi lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_ mov rax, [rbx+10h] sub rax, [rbx+8] shr rax, 3 mov [rsp+48h+var_3C], eax mov [rsp+48h+var_3D], 4 cmp qword ptr [rbx+90h], 0 jz loc_60E92 lea rdi, [rbx+80h] lea rsi, [rsp+48h+var_3C] lea rdx, [rsp+48h+var_3D] lea rcx, [rsp+48h+var_38] call qword ptr [rbx+98h] mov ebp, eax lea rdi, [rbx+48h] movzx esi, al call _ZNSt6vectorIbSaIbEE9push_backEb; std::vector<bool>::push_back(bool) test bpl, bpl jz short loc_60E70 mov rax, [rbx+10h] cmp qword ptr [rax-8], 0 jz short loc_60E70 lea rsi, [rbx+0A8h] lea rdi, [rsp+48h+var_28] 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&) mov rax, [rbx+10h] mov rax, [rax-8] mov rdi, [rax+8] mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEEixERSH_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator[](std::string const&) lea r14, [rsp+48h+var_28] mov rdi, rax mov rsi, r14 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 [rbx+70h], rax mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() loc_60E70: lea rbx, [rsp+48h+var_38] 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() mov al, 1 add rsp, 30h pop rbx pop r14 pop rbp retn loc_60E92: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) mov rbx, rax lea r14, [rsp+48h+var_28] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() jmp short loc_60EB6 mov rbx, rax loc_60EB6: lea r14, [rsp+48h+var_38] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, rbx call __Unwind_Resume
char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::key( long long a1, long long a2) { unsigned __int8 v2; // bp long long v3; // rax char v5; // [rsp+Bh] [rbp-3Dh] BYREF int v6; // [rsp+Ch] [rbp-3Ch] BYREF char v7[16]; // [rsp+10h] [rbp-38h] BYREF char v8[40]; // [rsp+20h] [rbp-28h] BYREF ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_(v7); v6 = (*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 3; v5 = 4; if ( !*(_QWORD *)(a1 + 144) ) std::__throw_bad_function_call(); v2 = (*(long long ( **)(long long, int *, char *, char *))(a1 + 152))(a1 + 128, &v6, &v5, v7); std::vector<bool>::push_back(a1 + 72, v2); if ( v2 && *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL) ) { 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( v8, a1 + 168); v3 = nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator[]( *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL) + 8LL), a2); *(_QWORD *)(a1 + 112) = 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=( v3, (long long)v8); 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(v8); 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(v8); } 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(v7); 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(v7); return 1; }
key: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RSI MOV RBX,RDI LEA RDI,[RSP + 0x10] CALL 0x00163a2a MOV RAX,qword ptr [RBX + 0x10] SUB RAX,qword ptr [RBX + 0x8] SHR RAX,0x3 MOV dword ptr [RSP + 0xc],EAX MOV byte ptr [RSP + 0xb],0x4 CMP qword ptr [RBX + 0x90],0x0 JZ 0x00160e92 LEA RDI,[RBX + 0x80] LAB_00160df2: LEA RSI,[RSP + 0xc] LEA RDX,[RSP + 0xb] LEA RCX,[RSP + 0x10] CALL qword ptr [RBX + 0x98] MOV EBP,EAX LEA RDI,[RBX + 0x48] MOVZX ESI,AL CALL 0x001605fe TEST BPL,BPL JZ 0x00160e70 MOV RAX,qword ptr [RBX + 0x10] CMP qword ptr [RAX + -0x8],0x0 JZ 0x00160e70 LEA RSI,[RBX + 0xa8] LEA RDI,[RSP + 0x20] CALL 0x00161f10 MOV RAX,qword ptr [RBX + 0x10] MOV RAX,qword ptr [RAX + -0x8] MOV RDI,qword ptr [RAX + 0x8] LAB_00160e42: MOV RSI,R14 CALL 0x00163a64 LEA R14,[RSP + 0x20] MOV RDI,RAX MOV RSI,R14 CALL 0x0015f620 MOV qword ptr [RBX + 0x70],RAX MOV RDI,R14 XOR ESI,ESI CALL 0x0015cc84 MOV RDI,R14 CALL 0x00162470 LAB_00160e70: LEA RBX,[RSP + 0x10] MOV RDI,RBX XOR ESI,ESI CALL 0x0015cc84 MOV RDI,RBX CALL 0x00162470 MOV AL,0x1 ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_00160e92: CALL 0x0011b340
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::key(std::__cxx11::string&) */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::key(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,string *param_1) { bool bVar1; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *pbVar2; int8 uVar3; int1 local_3d; int4 local_3c; data local_38 [16]; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_28 [16]; _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_ (local_38); local_3c = (int4)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3); local_3d = 4; if (*(long *)(this + 0x90) != 0) { /* try { // try from 00160df2 to 00160e35 has its CatchHandler @ 00160eb3 */ bVar1 = (bool)(**(code **)(this + 0x98))(this + 0x80,&local_3c,&local_3d,local_38); std::vector<bool,std::allocator<bool>>::push_back ((vector<bool,std::allocator<bool>> *)(this + 0x48),bVar1); if ((bVar1 != false) && (*(long *)(*(long *)(this + 0x10) + -8) != 0)) { basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(local_28,(basic_json *)(this + 0xa8)); /* try { // try from 00160e42 to 00160e49 has its CatchHandler @ 00160e97 */ pbVar2 = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::operator[](*(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> **)(*(long *)(*(long *)(this + 0x10) + -8) + 8),param_1); uVar3 = basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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=(pbVar2,(data *)local_28); *(int8 *)(this + 0x70) = uVar3; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_28,0)); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)local_28); } basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_38,0)); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_38); return 1; } /* WARNING: Subroutine does not return */ /* try { // try from 00160e92 to 00160e96 has its CatchHandler @ 00160eb3 */ std::__throw_bad_function_call(); }
55,277
make_token
tsotchke[P]eshkol/src/frontend/lexer/lexer.c
static Token make_token(Lexer* lexer, TokenType type) { Token token; token.type = type; token.lexeme = lexer->start; token.length = (size_t)(lexer->current - lexer->start); token.line = lexer->line; token.column = lexer->column - token.length; return token; }
O0
c
make_token: pushq %rbp movq %rsp, %rbp movq %rdi, %rax movq %rsi, -0x8(%rbp) movl %edx, -0xc(%rbp) movl -0xc(%rbp), %ecx movl %ecx, (%rdi) movq -0x8(%rbp), %rcx movq 0x20(%rcx), %rcx movq %rcx, 0x8(%rdi) movq -0x8(%rbp), %rcx movq 0x28(%rcx), %rcx movq -0x8(%rbp), %rdx movq 0x20(%rdx), %rdx subq %rdx, %rcx movq %rcx, 0x10(%rdi) movq -0x8(%rbp), %rcx movq 0x30(%rcx), %rcx movq %rcx, 0x18(%rdi) movq -0x8(%rbp), %rcx movq 0x38(%rcx), %rcx subq 0x10(%rdi), %rcx movq %rcx, 0x20(%rdi) popq %rbp retq nopw %cs:(%rax,%rax)
make_token: push rbp mov rbp, rsp mov rax, rdi mov [rbp+var_8], rsi mov [rbp+var_C], edx mov ecx, [rbp+var_C] mov [rdi], ecx mov rcx, [rbp+var_8] mov rcx, [rcx+20h] mov [rdi+8], rcx mov rcx, [rbp+var_8] mov rcx, [rcx+28h] mov rdx, [rbp+var_8] mov rdx, [rdx+20h] sub rcx, rdx mov [rdi+10h], rcx mov rcx, [rbp+var_8] mov rcx, [rcx+30h] mov [rdi+18h], rcx mov rcx, [rbp+var_8] mov rcx, [rcx+38h] sub rcx, [rdi+10h] mov [rdi+20h], rcx pop rbp retn
long long make_token(long long a1, _QWORD *a2, int a3) { long long result; // rax result = a1; *(_DWORD *)a1 = a3; *(_QWORD *)(a1 + 8) = a2[4]; *(_QWORD *)(a1 + 16) = a2[5] - a2[4]; *(_QWORD *)(a1 + 24) = a2[6]; *(_QWORD *)(a1 + 32) = a2[7] - *(_QWORD *)(a1 + 16); return result; }
make_token: PUSH RBP MOV RBP,RSP MOV RAX,RDI MOV qword ptr [RBP + -0x8],RSI MOV dword ptr [RBP + -0xc],EDX MOV ECX,dword ptr [RBP + -0xc] MOV dword ptr [RDI],ECX MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x20] MOV qword ptr [RDI + 0x8],RCX MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x28] MOV RDX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RDX + 0x20] SUB RCX,RDX MOV qword ptr [RDI + 0x10],RCX MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x30] MOV qword ptr [RDI + 0x18],RCX MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x38] SUB RCX,qword ptr [RDI + 0x10] MOV qword ptr [RDI + 0x20],RCX POP RBP RET
int4 * make_token(int4 *param_1,long param_2,int4 param_3) { *param_1 = param_3; *(int8 *)(param_1 + 2) = *(int8 *)(param_2 + 0x20); *(long *)(param_1 + 4) = *(long *)(param_2 + 0x28) - *(long *)(param_2 + 0x20); *(int8 *)(param_1 + 6) = *(int8 *)(param_2 + 0x30); *(long *)(param_1 + 8) = *(long *)(param_2 + 0x38) - *(long *)(param_1 + 4); return param_1; }
55,278
trnman_can_read_from
eloqsql/storage/maria/trnman.c
int trnman_can_read_from(TRN *trn, TrID trid) { TRN **found; my_bool can; if (trid < trn->min_read_from) return 1; /* Row is visible by all transactions in the system */ if (trid >= trn->trid) { /* We have now two cases trid > trn->trid, in which case the row is from a new transaction and not visible, in which case we should return 0. trid == trn->trid in which case the row is from the current transaction and we should return 1 */ return trid == trn->trid; } found= lf_hash_search(&trid_to_trn, trn->pins, &trid, sizeof(trid)); if (found == NULL) return 0; /* not in the hash of transactions = cannot read */ if (found == MY_ERRPTR) return -1; can= (*found)->commit_trid < trn->trid; lf_hash_search_unpin(trn->pins); return can; }
O3
c
trnman_can_read_from: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rsi, -0x10(%rbp) movl $0x1, %eax cmpq %rsi, 0x80(%rdi) ja 0x470fa movq %rdi, %rbx cmpq %rsi, 0x78(%rdi) jbe 0x470d2 movq (%rbx), %rsi leaq 0x3b63a6(%rip), %rdi # 0x3fd458 leaq -0x10(%rbp), %rdx movl $0x8, %ecx callq 0x2fc5f testq %rax, %rax je 0x470da cmpq $0x1, %rax jne 0x470de movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x470fa sete %al movzbl %al, %eax jmp 0x470fa xorl %eax, %eax jmp 0x470fa movq (%rax), %rax movq 0x88(%rax), %rcx xorl %eax, %eax cmpq 0x78(%rbx), %rcx setb %al movq (%rbx), %rcx xorl %edx, %edx xchgq %rdx, 0x10(%rcx) addq $0x8, %rsp popq %rbx popq %rbp retq
trnman_can_read_from: push rbp mov rbp, rsp push rbx push rax mov [rbp+var_10], rsi mov eax, 1 cmp [rdi+80h], rsi ja short loc_470FA mov rbx, rdi cmp [rdi+78h], rsi jbe short loc_470D2 mov rsi, [rbx] lea rdi, trid_to_trn lea rdx, [rbp+var_10] mov ecx, 8 call lf_hash_search test rax, rax jz short loc_470DA cmp rax, 1 jnz short loc_470DE mov eax, 0FFFFFFFFh jmp short loc_470FA loc_470D2: setz al movzx eax, al jmp short loc_470FA loc_470DA: xor eax, eax jmp short loc_470FA loc_470DE: mov rax, [rax] mov rcx, [rax+88h] xor eax, eax cmp rcx, [rbx+78h] setb al mov rcx, [rbx] xor edx, edx xchg rdx, [rcx+10h] loc_470FA: add rsp, 8 pop rbx pop rbp retn
long long trnman_can_read_from(long long a1, unsigned long long a2) { long long result; // rax long long v3; // rax unsigned long long v4; // [rsp+0h] [rbp-10h] BYREF v4 = a2; result = 1LL; if ( *(_QWORD *)(a1 + 128) <= a2 ) { if ( *(_QWORD *)(a1 + 120) <= a2 ) { return *(_QWORD *)(a1 + 120) == a2; } else { v3 = lf_hash_search((long long)&trid_to_trn, *(volatile long long **)a1, (long long)&v4, 8u); if ( v3 ) { if ( v3 == 1 ) { return 0xFFFFFFFFLL; } else { result = *(_QWORD *)(*(_QWORD *)v3 + 136LL) < *(_QWORD *)(a1 + 120); _InterlockedExchange64((volatile long long *)(*(_QWORD *)a1 + 16LL), 0LL); } } else { return 0LL; } } } return result; }
trnman_can_read_from: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV qword ptr [RBP + -0x10],RSI MOV EAX,0x1 CMP qword ptr [RDI + 0x80],RSI JA 0x001470fa MOV RBX,RDI CMP qword ptr [RDI + 0x78],RSI JBE 0x001470d2 MOV RSI,qword ptr [RBX] LEA RDI,[0x4fd458] LEA RDX,[RBP + -0x10] MOV ECX,0x8 CALL 0x0012fc5f TEST RAX,RAX JZ 0x001470da CMP RAX,0x1 JNZ 0x001470de MOV EAX,0xffffffff JMP 0x001470fa LAB_001470d2: SETZ AL MOVZX EAX,AL JMP 0x001470fa LAB_001470da: XOR EAX,EAX JMP 0x001470fa LAB_001470de: MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x88] XOR EAX,EAX CMP RCX,qword ptr [RBX + 0x78] SETC AL MOV RCX,qword ptr [RBX] XOR EDX,EDX XCHG qword ptr [RCX + 0x10],RDX LAB_001470fa: ADD RSP,0x8 POP RBX POP RBP RET
ulong trnman_can_read_from(long *param_1,ulong param_2) { ulong uVar1; long *plVar2; ulong local_18; uVar1 = 1; if ((ulong)param_1[0x10] <= param_2) { if (param_2 < (ulong)param_1[0xf]) { local_18 = param_2; plVar2 = (long *)lf_hash_search(trid_to_trn,*param_1,&local_18,8); if (plVar2 == (long *)0x0) { uVar1 = 0; } else if (plVar2 == (long *)0x1) { uVar1 = 0xffffffff; } else { uVar1 = (ulong)(*(ulong *)(*plVar2 + 0x88) < (ulong)param_1[0xf]); LOCK(); *(int8 *)(*param_1 + 0x10) = 0; UNLOCK(); } } else { uVar1 = (ulong)(param_1[0xf] == param_2); } } return uVar1; }
55,279
get_scale_min_k4
7CodeWizard[P]stablediffusion/ggml/src/ggml-quants.c
static inline void get_scale_min_k4(int j, const uint8_t * restrict q, uint8_t * restrict d, uint8_t * restrict m) { if (j < 4) { *d = q[j] & 63; *m = q[j + 4] & 63; } else { *d = (q[j+4] & 0xF) | ((q[j-4] >> 6) << 4); *m = (q[j+4] >> 4) | ((q[j-0] >> 6) << 4); } }
O2
c
get_scale_min_k4: cmpl $0x3, %edi jg 0x9414d movslq %edi, %rdi movb (%rsi,%rdi), %al movb 0x4(%rsi,%rdi), %sil andb $0x3f, %al andb $0x3f, %sil jmp 0x9417a movl %edi, %edi movb 0x4(%rsi,%rdi), %r8b movl %r8d, %r9d andb $0xf, %r9b movb -0x4(%rsi,%rdi), %al movb (%rsi,%rdi), %sil shrb $0x2, %al andb $0x30, %al orb %r9b, %al shrb $0x4, %r8b shrb $0x2, %sil andb $0x30, %sil orb %r8b, %sil movb %al, (%rdx) movb %sil, (%rcx) retq
get_scale_min_k4: cmp edi, 3 jg short loc_9414D movsxd rdi, edi mov al, [rsi+rdi] mov sil, [rsi+rdi+4] and al, 3Fh and sil, 3Fh jmp short loc_9417A loc_9414D: mov edi, edi mov r8b, [rsi+rdi+4] mov r9d, r8d and r9b, 0Fh mov al, [rsi+rdi-4] mov sil, [rsi+rdi] shr al, 2 and al, 30h or al, r9b shr r8b, 4 shr sil, 2 and sil, 30h or sil, r8b loc_9417A: mov [rdx], al mov [rcx], sil retn
char get_scale_min_k4(int a1, long long a2, _BYTE *a3, _BYTE *a4) { char result; // al char v5; // si unsigned __int8 v6; // r8 if ( a1 > 3 ) { v6 = *(_BYTE *)(a2 + (unsigned int)a1 + 4); result = v6 & 0xF | (*(_BYTE *)(a2 + (unsigned int)a1 - 4) >> 2) & 0x30; v5 = (v6 >> 4) | (*(_BYTE *)(a2 + (unsigned int)a1) >> 2) & 0x30; } else { result = *(_BYTE *)(a2 + a1) & 0x3F; v5 = *(_BYTE *)(a2 + a1 + 4) & 0x3F; } *a3 = result; *a4 = v5; return result; }
get_scale_min_k4: CMP EDI,0x3 JG 0x0019414d MOVSXD RDI,EDI MOV AL,byte ptr [RSI + RDI*0x1] MOV SIL,byte ptr [RSI + RDI*0x1 + 0x4] AND AL,0x3f AND SIL,0x3f JMP 0x0019417a LAB_0019414d: MOV EDI,EDI MOV R8B,byte ptr [RSI + RDI*0x1 + 0x4] MOV R9D,R8D AND R9B,0xf MOV AL,byte ptr [RSI + RDI*0x1 + -0x4] MOV SIL,byte ptr [RSI + RDI*0x1] SHR AL,0x2 AND AL,0x30 OR AL,R9B SHR R8B,0x4 SHR SIL,0x2 AND SIL,0x30 OR SIL,R8B LAB_0019417a: MOV byte ptr [RDX],AL MOV byte ptr [RCX],SIL RET
void get_scale_min_k4(uint param_1,long param_2,byte *param_3,byte *param_4) { byte bVar1; byte bVar2; ulong uVar3; if ((int)param_1 < 4) { bVar1 = *(byte *)(param_2 + (int)param_1) & 0x3f; bVar2 = *(byte *)(param_2 + 4 + (long)(int)param_1) & 0x3f; } else { uVar3 = (ulong)param_1; bVar2 = *(byte *)(param_2 + 4 + uVar3); bVar1 = *(byte *)(param_2 + -4 + uVar3) >> 2 & 0x30 | bVar2 & 0xf; bVar2 = *(byte *)(param_2 + uVar3) >> 2 & 0x30 | bVar2 >> 4; } *param_3 = bVar1; *param_4 = bVar2; return; }
55,280
ggml_compute_forward_map_binary_f32
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
static void ggml_compute_forward_map_binary_f32( const struct ggml_compute_params * params, struct ggml_tensor * dst, const ggml_binary_op_f32_t fun) { const struct ggml_tensor * src0 = dst->src[0]; const struct ggml_tensor * src1 = dst->src[1]; if (params->ith != 0) { return; } assert(ggml_is_contiguous_1(src0)); assert(ggml_is_contiguous_1(src1)); assert(ggml_is_contiguous_1(dst)); assert(ggml_are_same_shape(src0, src1) && ggml_are_same_shape(src0, dst)); const int n = ggml_nrows(src0); const int nc = src0->ne[0]; for (int i = 0; i < n; i++) { fun(nc, (float *) ((char *) dst->data + i*( dst->nb[1])), (float *) ((char *) src0->data + i*(src0->nb[1])), (float *) ((char *) src1->data + i*(src1->nb[1]))); } }
O0
c
ggml_compute_forward_map_binary_f32: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0x98(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0xa0(%rax), %rax movq %rax, -0x28(%rbp) movq -0x8(%rbp), %rax cmpl $0x0, (%rax) je 0x3cb70 jmp 0x3ccd2 movq -0x20(%rbp), %rdi callq 0xd030 testb $0x1, %al jne 0x3cb7f jmp 0x3cb81 jmp 0x3cba0 leaq 0x380a1(%rip), %rdi # 0x74c29 leaq 0x36fd3(%rip), %rsi # 0x73b62 movl $0x2fde, %edx # imm = 0x2FDE leaq 0x3960e(%rip), %rcx # 0x761a9 callq 0xd690 movq -0x28(%rbp), %rdi callq 0xd030 testb $0x1, %al jne 0x3cbaf jmp 0x3cbb1 jmp 0x3cbd0 leaq 0x39670(%rip), %rdi # 0x76228 leaq 0x36fa3(%rip), %rsi # 0x73b62 movl $0x2fdf, %edx # imm = 0x2FDF leaq 0x395de(%rip), %rcx # 0x761a9 callq 0xd690 movq -0x10(%rbp), %rdi callq 0xd030 testb $0x1, %al jne 0x3cbdf jmp 0x3cbe1 jmp 0x3cc00 leaq 0x3805c(%rip), %rdi # 0x74c44 leaq 0x36f73(%rip), %rsi # 0x73b62 movl $0x2fe0, %edx # imm = 0x2FE0 leaq 0x395ae(%rip), %rcx # 0x761a9 callq 0xd690 movq -0x20(%rbp), %rdi movq -0x28(%rbp), %rsi callq 0xe260 testb $0x1, %al jne 0x3cc13 jmp 0x3cc28 movq -0x20(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0xe260 testb $0x1, %al jne 0x3cc26 jmp 0x3cc28 jmp 0x3cc47 leaq 0x376d5(%rip), %rdi # 0x74304 leaq 0x36f2c(%rip), %rsi # 0x73b62 movl $0x2fe1, %edx # imm = 0x2FE1 leaq 0x39567(%rip), %rcx # 0x761a9 callq 0xd690 movq -0x20(%rbp), %rdi callq 0xdc20 movl %eax, -0x2c(%rbp) movq -0x20(%rbp), %rax movq 0x10(%rax), %rax movl %eax, -0x30(%rbp) movl $0x0, -0x34(%rbp) movl -0x34(%rbp), %eax cmpl -0x2c(%rbp), %eax jge 0x3ccd2 movq -0x18(%rbp), %rax movl -0x30(%rbp), %edi movq -0x10(%rbp), %rcx movq 0xf8(%rcx), %rsi movslq -0x34(%rbp), %rcx movq -0x10(%rbp), %rdx imulq 0x38(%rdx), %rcx addq %rcx, %rsi movq -0x20(%rbp), %rcx movq 0xf8(%rcx), %rdx movslq -0x34(%rbp), %rcx movq -0x20(%rbp), %r8 imulq 0x38(%r8), %rcx addq %rcx, %rdx movq -0x28(%rbp), %rcx movq 0xf8(%rcx), %rcx movslq -0x34(%rbp), %r8 movq -0x28(%rbp), %r9 imulq 0x38(%r9), %r8 addq %r8, %rcx callq *%rax movl -0x34(%rbp), %eax addl $0x1, %eax movl %eax, -0x34(%rbp) jmp 0x3cc65 addq $0x40, %rsp popq %rbp retq nopl (%rax,%rax)
ggml_compute_forward_map_binary_f32: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_10] mov rax, [rax+98h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rax, [rax+0A0h] mov [rbp+var_28], rax mov rax, [rbp+var_8] cmp dword ptr [rax], 0 jz short loc_3CB70 jmp loc_3CCD2 loc_3CB70: mov rdi, [rbp+var_20] call _ggml_is_contiguous_1 test al, 1 jnz short loc_3CB7F jmp short loc_3CB81 loc_3CB7F: jmp short loc_3CBA0 loc_3CB81: lea rdi, aGgmlIsContiguo_3; "ggml_is_contiguous_1(src0)" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov edx, 2FDEh lea rcx, aVoidGgmlComput_41; "void ggml_compute_forward_map_binary_f3"... call ___assert_fail loc_3CBA0: mov rdi, [rbp+var_28] call _ggml_is_contiguous_1 test al, 1 jnz short loc_3CBAF jmp short loc_3CBB1 loc_3CBAF: jmp short loc_3CBD0 loc_3CBB1: lea rdi, aGgmlIsContiguo_7; "ggml_is_contiguous_1(src1)" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov edx, 2FDFh lea rcx, aVoidGgmlComput_41; "void ggml_compute_forward_map_binary_f3"... call ___assert_fail loc_3CBD0: mov rdi, [rbp+var_10] call _ggml_is_contiguous_1 test al, 1 jnz short loc_3CBDF jmp short loc_3CBE1 loc_3CBDF: jmp short loc_3CC00 loc_3CBE1: lea rdi, aGgmlIsContiguo_4; "ggml_is_contiguous_1(dst)" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov edx, 2FE0h lea rcx, aVoidGgmlComput_41; "void ggml_compute_forward_map_binary_f3"... call ___assert_fail loc_3CC00: mov rdi, [rbp+var_20] mov rsi, [rbp+var_28] call _ggml_are_same_shape test al, 1 jnz short loc_3CC13 jmp short loc_3CC28 loc_3CC13: mov rdi, [rbp+var_20] mov rsi, [rbp+var_10] call _ggml_are_same_shape test al, 1 jnz short loc_3CC26 jmp short loc_3CC28 loc_3CC26: jmp short loc_3CC47 loc_3CC28: lea rdi, aGgmlAreSameSha_0; "ggml_are_same_shape(src0, src1) && ggml"... lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov edx, 2FE1h lea rcx, aVoidGgmlComput_41; "void ggml_compute_forward_map_binary_f3"... call ___assert_fail loc_3CC47: mov rdi, [rbp+var_20] call _ggml_nrows mov [rbp+var_2C], eax mov rax, [rbp+var_20] mov rax, [rax+10h] mov [rbp+var_30], eax mov [rbp+var_34], 0 loc_3CC65: mov eax, [rbp+var_34] cmp eax, [rbp+var_2C] jge short loc_3CCD2 mov rax, [rbp+var_18] mov edi, [rbp+var_30] mov rcx, [rbp+var_10] mov rsi, [rcx+0F8h] movsxd rcx, [rbp+var_34] mov rdx, [rbp+var_10] imul rcx, [rdx+38h] add rsi, rcx mov rcx, [rbp+var_20] mov rdx, [rcx+0F8h] movsxd rcx, [rbp+var_34] mov r8, [rbp+var_20] imul rcx, [r8+38h] add rdx, rcx mov rcx, [rbp+var_28] mov rcx, [rcx+0F8h] movsxd r8, [rbp+var_34] mov r9, [rbp+var_28] imul r8, [r9+38h] add rcx, r8 call rax mov eax, [rbp+var_34] add eax, 1 mov [rbp+var_34], eax jmp short loc_3CC65 loc_3CCD2: add rsp, 40h pop rbp retn
unsigned long long ggml_compute_forward_map_binary_f32( _DWORD *a1, _QWORD *a2, void ( *a3)(_QWORD, _QWORD, _QWORD, _QWORD)) { unsigned long long result; // rax unsigned int i; // [rsp+Ch] [rbp-34h] unsigned int v5; // [rsp+10h] [rbp-30h] int v6; // [rsp+14h] [rbp-2Ch] long long v7; // [rsp+18h] [rbp-28h] _QWORD *v8; // [rsp+20h] [rbp-20h] v8 = (_QWORD *)a2[19]; v7 = a2[20]; result = (unsigned long long)a1; if ( !*a1 ) { if ( (ggml_is_contiguous_1(v8) & 1) == 0 ) __assert_fail( "ggml_is_contiguous_1(src0)", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 12254LL, "void ggml_compute_forward_map_binary_f32(const struct ggml_compute_params *, struct ggml_tensor *, const ggml_binary_op_f32_t)"); if ( (ggml_is_contiguous_1(v7) & 1) == 0 ) __assert_fail( "ggml_is_contiguous_1(src1)", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 12255LL, "void ggml_compute_forward_map_binary_f32(const struct ggml_compute_params *, struct ggml_tensor *, const ggml_binary_op_f32_t)"); if ( (ggml_is_contiguous_1(a2) & 1) == 0 ) __assert_fail( "ggml_is_contiguous_1(dst)", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 12256LL, "void ggml_compute_forward_map_binary_f32(const struct ggml_compute_params *, struct ggml_tensor *, const ggml_binary_op_f32_t)"); if ( (ggml_are_same_shape(v8, v7) & 1) == 0 || (ggml_are_same_shape(v8, a2) & 1) == 0 ) __assert_fail( "ggml_are_same_shape(src0, src1) && ggml_are_same_shape(src0, dst)", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 12257LL, "void ggml_compute_forward_map_binary_f32(const struct ggml_compute_params *, struct ggml_tensor *, const ggml_binary_op_f32_t)"); v6 = ggml_nrows(v8); v5 = v8[2]; for ( i = 0; ; ++i ) { result = i; if ( (int)i >= v6 ) break; a3(v5, a2[7] * (int)i + a2[31], v8[7] * (int)i + v8[31], *(_QWORD *)(v7 + 56) * (int)i + *(_QWORD *)(v7 + 248)); } } return result; }
ggml_compute_forward_map_binary_f32: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x98] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xa0] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX],0x0 JZ 0x0013cb70 JMP 0x0013ccd2 LAB_0013cb70: MOV RDI,qword ptr [RBP + -0x20] CALL 0x0010d030 TEST AL,0x1 JNZ 0x0013cb7f JMP 0x0013cb81 LAB_0013cb7f: JMP 0x0013cba0 LAB_0013cb81: LEA RDI,[0x174c29] LEA RSI,[0x173b62] MOV EDX,0x2fde LEA RCX,[0x1761a9] CALL 0x0010d690 LAB_0013cba0: MOV RDI,qword ptr [RBP + -0x28] CALL 0x0010d030 TEST AL,0x1 JNZ 0x0013cbaf JMP 0x0013cbb1 LAB_0013cbaf: JMP 0x0013cbd0 LAB_0013cbb1: LEA RDI,[0x176228] LEA RSI,[0x173b62] MOV EDX,0x2fdf LEA RCX,[0x1761a9] CALL 0x0010d690 LAB_0013cbd0: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0010d030 TEST AL,0x1 JNZ 0x0013cbdf JMP 0x0013cbe1 LAB_0013cbdf: JMP 0x0013cc00 LAB_0013cbe1: LEA RDI,[0x174c44] LEA RSI,[0x173b62] MOV EDX,0x2fe0 LEA RCX,[0x1761a9] CALL 0x0010d690 LAB_0013cc00: MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x28] CALL 0x0010e260 TEST AL,0x1 JNZ 0x0013cc13 JMP 0x0013cc28 LAB_0013cc13: MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x10] CALL 0x0010e260 TEST AL,0x1 JNZ 0x0013cc26 JMP 0x0013cc28 LAB_0013cc26: JMP 0x0013cc47 LAB_0013cc28: LEA RDI,[0x174304] LEA RSI,[0x173b62] MOV EDX,0x2fe1 LEA RCX,[0x1761a9] CALL 0x0010d690 LAB_0013cc47: MOV RDI,qword ptr [RBP + -0x20] CALL 0x0010dc20 MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x10] MOV dword ptr [RBP + -0x30],EAX MOV dword ptr [RBP + -0x34],0x0 LAB_0013cc65: MOV EAX,dword ptr [RBP + -0x34] CMP EAX,dword ptr [RBP + -0x2c] JGE 0x0013ccd2 MOV RAX,qword ptr [RBP + -0x18] MOV EDI,dword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RCX + 0xf8] MOVSXD RCX,dword ptr [RBP + -0x34] MOV RDX,qword ptr [RBP + -0x10] IMUL RCX,qword ptr [RDX + 0x38] ADD RSI,RCX MOV RCX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RCX + 0xf8] MOVSXD RCX,dword ptr [RBP + -0x34] MOV R8,qword ptr [RBP + -0x20] IMUL RCX,qword ptr [R8 + 0x38] ADD RDX,RCX MOV RCX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RCX + 0xf8] MOVSXD R8,dword ptr [RBP + -0x34] MOV R9,qword ptr [RBP + -0x28] IMUL R8,qword ptr [R9 + 0x38] ADD RCX,R8 CALL RAX MOV EAX,dword ptr [RBP + -0x34] ADD EAX,0x1 MOV dword ptr [RBP + -0x34],EAX JMP 0x0013cc65 LAB_0013ccd2: ADD RSP,0x40 POP RBP RET
void ggml_compute_forward_map_binary_f32(int *param_1,long param_2,code *param_3) { long lVar1; long lVar2; int8 uVar3; int iVar4; ulong uVar5; int local_3c; lVar1 = *(long *)(param_2 + 0x98); lVar2 = *(long *)(param_2 + 0xa0); if (*param_1 == 0) { uVar5 = ggml_is_contiguous_1(lVar1); if ((uVar5 & 1) == 0) { /* WARNING: Subroutine does not return */ __assert_fail("ggml_is_contiguous_1(src0)", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x2fde, "void ggml_compute_forward_map_binary_f32(const struct ggml_compute_params *, struct ggml_tensor *, const ggml_binary_op_f32_t)" ); } uVar5 = ggml_is_contiguous_1(lVar2); if ((uVar5 & 1) == 0) { /* WARNING: Subroutine does not return */ __assert_fail("ggml_is_contiguous_1(src1)", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x2fdf, "void ggml_compute_forward_map_binary_f32(const struct ggml_compute_params *, struct ggml_tensor *, const ggml_binary_op_f32_t)" ); } uVar5 = ggml_is_contiguous_1(param_2); if ((uVar5 & 1) == 0) { /* WARNING: Subroutine does not return */ __assert_fail("ggml_is_contiguous_1(dst)", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x2fe0, "void ggml_compute_forward_map_binary_f32(const struct ggml_compute_params *, struct ggml_tensor *, const ggml_binary_op_f32_t)" ); } uVar5 = ggml_are_same_shape(lVar1,lVar2); if (((uVar5 & 1) == 0) || (uVar5 = ggml_are_same_shape(lVar1,param_2), (uVar5 & 1) == 0)) { /* WARNING: Subroutine does not return */ __assert_fail("ggml_are_same_shape(src0, src1) && ggml_are_same_shape(src0, dst)", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x2fe1, "void ggml_compute_forward_map_binary_f32(const struct ggml_compute_params *, struct ggml_tensor *, const ggml_binary_op_f32_t)" ); } iVar4 = ggml_nrows(lVar1); uVar3 = *(int8 *)(lVar1 + 0x10); for (local_3c = 0; local_3c < iVar4; local_3c = local_3c + 1) { (*param_3)((int)uVar3,*(long *)(param_2 + 0xf8) + (long)local_3c * *(long *)(param_2 + 0x38), *(long *)(lVar1 + 0xf8) + (long)local_3c * *(long *)(lVar1 + 0x38), *(long *)(lVar2 + 0xf8) + (long)local_3c * *(long *)(lVar2 + 0x38)); } } return; }
55,281
wait_for_readers
eloqsql/storage/maria/ma_pagecache.c
static inline void wait_for_readers(PAGECACHE *pagecache __attribute__((unused)), PAGECACHE_BLOCK_LINK *block __attribute__((unused))) { struct st_my_thread_var *thread= my_thread_var; DBUG_ASSERT(block->condvar == NULL); while (block->hash_link->requests) { DBUG_ENTER("wait_for_readers"); DBUG_PRINT("wait", ("suspend thread: %s %ld block: %u", thread->name, (ulong) thread->id, PCBLOCK_NUMBER(pagecache, block))); block->condvar= &thread->suspend; pagecache_pthread_cond_wait(&thread->suspend, &pagecache->cache_lock); block->condvar= NULL; DBUG_VOID_RETURN; } }
O0
c
wait_for_readers: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) callq 0xf55f0 movq %rax, -0x18(%rbp) jmp 0x5bdab jmp 0x5bdad movq -0x10(%rbp), %rax movq 0x20(%rax), %rax cmpl $0x0, 0x68(%rax) je 0x5be01 jmp 0x5bdbd jmp 0x5bdbf movq -0x18(%rbp), %rcx addq $0x8, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x28(%rax) movq -0x18(%rbp), %rdi addq $0x8, %rdi movq -0x8(%rbp), %rsi addq $0xc8, %rsi leaq 0xf57de(%rip), %rdx # 0x1515c7 movl $0x64d, %ecx # imm = 0x64D callq 0x5b480 movq -0x10(%rbp), %rax movq $0x0, 0x28(%rax) jmp 0x5be01 addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
wait_for_readers: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi call _my_thread_var mov [rbp+var_18], rax jmp short $+2 loc_5BDAB: jmp short $+2 loc_5BDAD: mov rax, [rbp+var_10] mov rax, [rax+20h] cmp dword ptr [rax+68h], 0 jz short loc_5BE01 jmp short $+2 loc_5BDBD: jmp short $+2 loc_5BDBF: mov rcx, [rbp+var_18] add rcx, 8 mov rax, [rbp+var_10] mov [rax+28h], rcx mov rdi, [rbp+var_18] add rdi, 8 mov rsi, [rbp+var_8] add rsi, 0C8h lea rdx, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 64Dh call inline_mysql_cond_wait_1 mov rax, [rbp+var_10] mov qword ptr [rax+28h], 0 jmp short $+2 loc_5BE01: add rsp, 20h pop rbp retn
long long wait_for_readers(long long a1, long long a2, double a3) { long long result; // rax long long v4; // [rsp+8h] [rbp-18h] v4 = my_thread_var(a3); result = *(_QWORD *)(a2 + 32); if ( *(_DWORD *)(result + 104) ) { *(_QWORD *)(a2 + 40) = v4 + 8; inline_mysql_cond_wait_1( v4 + 8, a1 + 200, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0x64Du); result = a2; *(_QWORD *)(a2 + 40) = 0LL; } return result; }
wait_for_readers: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI CALL 0x001f55f0 MOV qword ptr [RBP + -0x18],RAX JMP 0x0015bdab LAB_0015bdab: JMP 0x0015bdad LAB_0015bdad: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] CMP dword ptr [RAX + 0x68],0x0 JZ 0x0015be01 JMP 0x0015bdbd LAB_0015bdbd: JMP 0x0015bdbf LAB_0015bdbf: MOV RCX,qword ptr [RBP + -0x18] ADD RCX,0x8 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x28],RCX MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x8 MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0xc8 LEA RDX,[0x2515c7] MOV ECX,0x64d CALL 0x0015b480 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x28],0x0 JMP 0x0015be01 LAB_0015be01: ADD RSP,0x20 POP RBP RET
void wait_for_readers(long param_1,long param_2) { long lVar1; lVar1 = _my_thread_var(); if (*(int *)(*(long *)(param_2 + 0x20) + 0x68) != 0) { *(long *)(param_2 + 0x28) = lVar1 + 8; inline_mysql_cond_wait (lVar1 + 8,param_1 + 200, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",0x64d); *(int8 *)(param_2 + 0x28) = 0; } return; }
55,282
JS_ToInt32SatFree
bluesky950520[P]quickjs/quickjs.c
static int JS_ToInt32SatFree(JSContext *ctx, int *pres, JSValue val) { uint32_t tag; int ret; redo: tag = JS_VALUE_GET_NORM_TAG(val); switch(tag) { case JS_TAG_INT: case JS_TAG_BOOL: case JS_TAG_NULL: case JS_TAG_UNDEFINED: ret = JS_VALUE_GET_INT(val); break; case JS_TAG_EXCEPTION: *pres = 0; return -1; case JS_TAG_FLOAT64: { double d = JS_VALUE_GET_FLOAT64(val); if (isnan(d)) { ret = 0; } else { if (d < INT32_MIN) ret = INT32_MIN; else if (d > INT32_MAX) ret = INT32_MAX; else ret = (int)d; } } break; default: val = JS_ToNumberFree(ctx, val); if (JS_IsException(val)) { *pres = 0; return -1; } goto redo; } *pres = ret; return 0; }
O0
c
JS_ToInt32SatFree: subq $0x58, %rsp movq %rdx, 0x40(%rsp) movq %rcx, 0x48(%rsp) movq %rdi, 0x38(%rsp) movq %rsi, 0x30(%rsp) movl 0x48(%rsp), %eax movl %eax, 0x2c(%rsp) movl 0x2c(%rsp), %eax movl %eax, 0xc(%rsp) subl $0x4, %eax jb 0x3ea28 jmp 0x3ea0f movl 0xc(%rsp), %eax subl $0x6, %eax je 0x3ea35 jmp 0x3ea1a movl 0xc(%rsp), %eax subl $0x7, %eax je 0x3ea4d jmp 0x3eabe movl 0x40(%rsp), %eax movl %eax, 0x28(%rsp) jmp 0x3eb1e movq 0x30(%rsp), %rax movl $0x0, (%rax) movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF jmp 0x3eb31 movsd 0x40(%rsp), %xmm0 movsd %xmm0, 0x20(%rsp) movsd 0x20(%rsp), %xmm0 ucomisd %xmm0, %xmm0 setp %al testb $0x1, %al jne 0x3ea6c jmp 0x3ea76 movl $0x0, 0x28(%rsp) jmp 0x3eabc movsd 0xd4fba(%rip), %xmm0 # 0x113a38 ucomisd 0x20(%rsp), %xmm0 jbe 0x3ea90 movl $0x80000000, 0x28(%rsp) # imm = 0x80000000 jmp 0x3eaba movsd 0x20(%rsp), %xmm0 movsd 0xd4fa2(%rip), %xmm1 # 0x113a40 ucomisd %xmm1, %xmm0 jbe 0x3eaae movl $0x7fffffff, 0x28(%rsp) # imm = 0x7FFFFFFF jmp 0x3eab8 cvttsd2si 0x20(%rsp), %eax movl %eax, 0x28(%rsp) jmp 0x3eaba jmp 0x3eabc jmp 0x3eb1e movq 0x38(%rsp), %rdi movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx callq 0x56da0 movq %rax, 0x10(%rsp) movq %rdx, 0x18(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x40(%rsp), %rdi movq 0x48(%rsp), %rsi callq 0x29fb0 cmpl $0x0, %eax je 0x3eb19 movq 0x30(%rsp), %rax movl $0x0, (%rax) movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF jmp 0x3eb31 jmp 0x3e9f8 movl 0x28(%rsp), %ecx movq 0x30(%rsp), %rax movl %ecx, (%rax) movl $0x0, 0x54(%rsp) movl 0x54(%rsp), %eax addq $0x58, %rsp retq nopw (%rax,%rax)
JS_ToInt32SatFree: sub rsp, 58h mov [rsp+58h+var_18], rdx mov [rsp+58h+var_10], rcx mov [rsp+58h+var_20], rdi mov [rsp+58h+var_28], rsi loc_3E9F8: mov eax, dword ptr [rsp+58h+var_10] mov [rsp+58h+var_2C], eax mov eax, [rsp+58h+var_2C] mov [rsp+58h+var_4C], eax sub eax, 4 jb short loc_3EA28 jmp short $+2 loc_3EA0F: mov eax, [rsp+58h+var_4C] sub eax, 6 jz short loc_3EA35 jmp short $+2 loc_3EA1A: mov eax, [rsp+58h+var_4C] sub eax, 7 jz short loc_3EA4D jmp loc_3EABE loc_3EA28: mov eax, dword ptr [rsp+58h+var_18] mov [rsp+58h+var_30], eax jmp loc_3EB1E loc_3EA35: mov rax, [rsp+58h+var_28] mov dword ptr [rax], 0 mov [rsp+58h+var_4], 0FFFFFFFFh jmp loc_3EB31 loc_3EA4D: movsd xmm0, [rsp+58h+var_18] movsd [rsp+58h+var_38], xmm0 movsd xmm0, [rsp+58h+var_38] ucomisd xmm0, xmm0 setp al test al, 1 jnz short loc_3EA6C jmp short loc_3EA76 loc_3EA6C: mov [rsp+58h+var_30], 0 jmp short loc_3EABC loc_3EA76: movsd xmm0, cs:qword_113A38 ucomisd xmm0, [rsp+58h+var_38] jbe short loc_3EA90 mov [rsp+58h+var_30], 80000000h jmp short loc_3EABA loc_3EA90: movsd xmm0, [rsp+58h+var_38] movsd xmm1, cs:qword_113A40 ucomisd xmm0, xmm1 jbe short loc_3EAAE mov [rsp+58h+var_30], 7FFFFFFFh jmp short loc_3EAB8 loc_3EAAE: cvttsd2si eax, [rsp+58h+var_38] mov [rsp+58h+var_30], eax loc_3EAB8: jmp short $+2 loc_3EABA: jmp short $+2 loc_3EABC: jmp short loc_3EB1E loc_3EABE: mov rdi, [rsp+58h+var_20] mov rsi, [rsp+58h+var_18] mov rdx, [rsp+58h+var_10] call JS_ToNumberFree mov [rsp+58h+var_48], rax mov [rsp+58h+var_40], rdx mov rax, [rsp+58h+var_48] mov [rsp+58h+var_18], rax mov rax, [rsp+58h+var_40] mov [rsp+58h+var_10], rax mov rdi, [rsp+58h+var_18] mov rsi, [rsp+58h+var_10] call JS_IsException_1 cmp eax, 0 jz short loc_3EB19 mov rax, [rsp+58h+var_28] mov dword ptr [rax], 0 mov [rsp+58h+var_4], 0FFFFFFFFh jmp short loc_3EB31 loc_3EB19: jmp loc_3E9F8 loc_3EB1E: mov ecx, [rsp+58h+var_30] mov rax, [rsp+58h+var_28] mov [rax], ecx mov [rsp+58h+var_4], 0 loc_3EB31: mov eax, [rsp+58h+var_4] add rsp, 58h retn
long long JS_ToInt32SatFree(long long a1, int *a2, long long a3, long long a4) { long long v4; // rdx int v7; // [rsp+28h] [rbp-30h] while ( 1 ) { if ( (unsigned int)a4 < 4 ) { v7 = a3; goto LABEL_15; } if ( (_DWORD)a4 == 6 ) { *a2 = 0; return (unsigned int)-1; } if ( (_DWORD)a4 == 7 ) break; *(double *)&a3 = COERCE_DOUBLE(JS_ToNumberFree(a1, a3, a4)); a4 = v4; if ( JS_IsException_1(a3, v4) ) { *a2 = 0; return (unsigned int)-1; } } if ( *(double *)&a3 >= -2147483648.0 ) { if ( *(double *)&a3 <= 2147483647.0 ) v7 = (int)*(double *)&a3; else v7 = 0x7FFFFFFF; } else { v7 = 0x80000000; } LABEL_15: *a2 = v7; return 0; }
JS_ToInt32SatFree: SUB RSP,0x58 MOV qword ptr [RSP + 0x40],RDX MOV qword ptr [RSP + 0x48],RCX MOV qword ptr [RSP + 0x38],RDI MOV qword ptr [RSP + 0x30],RSI LAB_0013e9f8: MOV EAX,dword ptr [RSP + 0x48] MOV dword ptr [RSP + 0x2c],EAX MOV EAX,dword ptr [RSP + 0x2c] MOV dword ptr [RSP + 0xc],EAX SUB EAX,0x4 JC 0x0013ea28 JMP 0x0013ea0f LAB_0013ea0f: MOV EAX,dword ptr [RSP + 0xc] SUB EAX,0x6 JZ 0x0013ea35 JMP 0x0013ea1a LAB_0013ea1a: MOV EAX,dword ptr [RSP + 0xc] SUB EAX,0x7 JZ 0x0013ea4d JMP 0x0013eabe LAB_0013ea28: MOV EAX,dword ptr [RSP + 0x40] MOV dword ptr [RSP + 0x28],EAX JMP 0x0013eb1e LAB_0013ea35: MOV RAX,qword ptr [RSP + 0x30] MOV dword ptr [RAX],0x0 MOV dword ptr [RSP + 0x54],0xffffffff JMP 0x0013eb31 LAB_0013ea4d: MOVSD XMM0,qword ptr [RSP + 0x40] MOVSD qword ptr [RSP + 0x20],XMM0 MOVSD XMM0,qword ptr [RSP + 0x20] UCOMISD XMM0,XMM0 SETP AL TEST AL,0x1 JNZ 0x0013ea6c JMP 0x0013ea76 LAB_0013ea6c: MOV dword ptr [RSP + 0x28],0x0 JMP 0x0013eabc LAB_0013ea76: MOVSD XMM0,qword ptr [0x00213a38] UCOMISD XMM0,qword ptr [RSP + 0x20] JBE 0x0013ea90 MOV dword ptr [RSP + 0x28],0x80000000 JMP 0x0013eaba LAB_0013ea90: MOVSD XMM0,qword ptr [RSP + 0x20] MOVSD XMM1,qword ptr [0x00213a40] UCOMISD XMM0,XMM1 JBE 0x0013eaae MOV dword ptr [RSP + 0x28],0x7fffffff JMP 0x0013eab8 LAB_0013eaae: CVTTSD2SI EAX,qword ptr [RSP + 0x20] MOV dword ptr [RSP + 0x28],EAX LAB_0013eab8: JMP 0x0013eaba LAB_0013eaba: JMP 0x0013eabc LAB_0013eabc: JMP 0x0013eb1e LAB_0013eabe: MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x48] CALL 0x00156da0 MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],RDX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x48],RAX MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x48] CALL 0x00129fb0 CMP EAX,0x0 JZ 0x0013eb19 MOV RAX,qword ptr [RSP + 0x30] MOV dword ptr [RAX],0x0 MOV dword ptr [RSP + 0x54],0xffffffff JMP 0x0013eb31 LAB_0013eb19: JMP 0x0013e9f8 LAB_0013eb1e: MOV ECX,dword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x30] MOV dword ptr [RAX],ECX MOV dword ptr [RSP + 0x54],0x0 LAB_0013eb31: MOV EAX,dword ptr [RSP + 0x54] ADD RSP,0x58 RET
int4 JS_ToInt32SatFree(int8 param_1,int *param_2,int8 param_3,int8 param_4) { int8 uVar1; int iVar2; int1 auVar3 [16]; int local_30; double local_18; int8 local_10; auVar3._8_8_ = param_4; auVar3._0_8_ = param_3; do { local_10 = auVar3._8_8_; uVar1 = local_10; local_18 = auVar3._0_8_; local_10._0_4_ = auVar3._8_4_; if ((uint)local_10 < 4) { local_18._0_4_ = auVar3._0_4_; local_30 = local_18._0_4_; LAB_0013eb1e: *param_2 = local_30; return 0; } if ((uint)local_10 == 6) { *param_2 = 0; return 0xffffffff; } if ((uint)local_10 == 7) { if (NAN(local_18)) { local_30 = 0; } else if (DAT_00213a38 <= local_18) { if (local_18 <= DAT_00213a40) { local_30 = (int)local_18; } else { local_30 = 0x7fffffff; } } else { local_30 = -0x80000000; } goto LAB_0013eb1e; } auVar3 = JS_ToNumberFree(param_1,local_18,uVar1); iVar2 = JS_IsException(auVar3._0_8_,auVar3._8_8_); if (iVar2 != 0) { *param_2 = 0; return 0xffffffff; } } while( true ); }
55,283
JS_ToInt32SatFree
bluesky950520[P]quickjs/quickjs.c
static int JS_ToInt32SatFree(JSContext *ctx, int *pres, JSValue val) { uint32_t tag; int ret; redo: tag = JS_VALUE_GET_NORM_TAG(val); switch(tag) { case JS_TAG_INT: case JS_TAG_BOOL: case JS_TAG_NULL: case JS_TAG_UNDEFINED: ret = JS_VALUE_GET_INT(val); break; case JS_TAG_EXCEPTION: *pres = 0; return -1; case JS_TAG_FLOAT64: { double d = JS_VALUE_GET_FLOAT64(val); if (isnan(d)) { ret = 0; } else { if (d < INT32_MIN) ret = INT32_MIN; else if (d > INT32_MAX) ret = INT32_MAX; else ret = (int)d; } } break; default: val = JS_ToNumberFree(ctx, val); if (JS_IsException(val)) { *pres = 0; return -1; } goto redo; } *pres = ret; return 0; }
O2
c
JS_ToInt32SatFree: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdx, %rax movq %rsi, %rbx movq %rdi, %r14 pushq $-0x1 popq %rbp xorl %r15d, %r15d cmpl $0x4, %ecx jb 0x24f33 cmpl $0x6, %ecx je 0x24f38 cmpl $0x7, %ecx je 0x24f48 movq %r14, %rdi movq %rax, %rsi movq %rcx, %rdx callq 0x31dc6 movq %rdx, %rcx cmpl $0x6, %ecx jne 0x24f0c jmp 0x24f38 xorl %ebp, %ebp movl %eax, %r15d movl %r15d, (%rbx) movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %xmm0 xorl %ebp, %ebp ucomisd %xmm0, %xmm0 jp 0x24f80 movl $0x80000000, %r15d # imm = 0x80000000 movsd 0x63ae5(%rip), %xmm1 # 0x88a48 ucomisd %xmm0, %xmm1 ja 0x24f38 movl $0x7fffffff, %r15d # imm = 0x7FFFFFFF ucomisd 0x63ad9(%rip), %xmm0 # 0x88a50 ja 0x24f38 cvttsd2si %xmm0, %r15d jmp 0x24f38 xorl %r15d, %r15d jmp 0x24f38
JS_ToInt32SatFree: push rbp push r15 push r14 push rbx push rax mov rax, rdx mov rbx, rsi mov r14, rdi push 0FFFFFFFFFFFFFFFFh pop rbp xor r15d, r15d loc_24F0C: cmp ecx, 4 jb short loc_24F33 cmp ecx, 6 jz short loc_24F38 cmp ecx, 7 jz short loc_24F48 mov rdi, r14 mov rsi, rax mov rdx, rcx call JS_ToNumberFree mov rcx, rdx cmp ecx, 6 jnz short loc_24F0C jmp short loc_24F38 loc_24F33: xor ebp, ebp mov r15d, eax loc_24F38: mov [rbx], r15d mov eax, ebp add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_24F48: movq xmm0, rax xor ebp, ebp ucomisd xmm0, xmm0 jp short loc_24F80 mov r15d, 80000000h movsd xmm1, cs:qword_88A48 ucomisd xmm1, xmm0 ja short loc_24F38 mov r15d, 7FFFFFFFh ucomisd xmm0, cs:qword_88A50 ja short loc_24F38 cvttsd2si r15d, xmm0 jmp short loc_24F38 loc_24F80: xor r15d, r15d jmp short loc_24F38
long long JS_ToInt32SatFree(long long a1, int *a2, long long a3, long long a4) { unsigned int v5; // ebp int v6; // r15d long long v7; // rdx v5 = -1; v6 = 0; while ( 1 ) { if ( (unsigned int)a4 < 4 ) { v5 = 0; v6 = a3; goto LABEL_8; } if ( (_DWORD)a4 == 6 ) goto LABEL_8; if ( (_DWORD)a4 == 7 ) break; *(double *)&a3 = COERCE_DOUBLE(JS_ToNumberFree(a1, a3, a4)); a4 = v7; if ( (_DWORD)v7 == 6 ) goto LABEL_8; } v5 = 0; v6 = 0x80000000; if ( *(double *)&a3 >= -2147483648.0 ) { v6 = 0x7FFFFFFF; if ( *(double *)&a3 <= 2147483647.0 ) v6 = (int)*(double *)&a3; } LABEL_8: *a2 = v6; return v5; }
JS_ToInt32SatFree: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RAX,RDX MOV RBX,RSI MOV R14,RDI PUSH -0x1 POP RBP XOR R15D,R15D LAB_00124f0c: CMP ECX,0x4 JC 0x00124f33 CMP ECX,0x6 JZ 0x00124f38 CMP ECX,0x7 JZ 0x00124f48 MOV RDI,R14 MOV RSI,RAX MOV RDX,RCX CALL 0x00131dc6 MOV RCX,RDX CMP ECX,0x6 JNZ 0x00124f0c JMP 0x00124f38 LAB_00124f33: XOR EBP,EBP MOV R15D,EAX LAB_00124f38: MOV dword ptr [RBX],R15D MOV EAX,EBP ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_00124f48: MOVQ XMM0,RAX XOR EBP,EBP UCOMISD XMM0,XMM0 JP 0x00124f80 MOV R15D,0x80000000 MOVSD XMM1,qword ptr [0x00188a48] UCOMISD XMM1,XMM0 JA 0x00124f38 MOV R15D,0x7fffffff UCOMISD XMM0,qword ptr [0x00188a50] JA 0x00124f38 CVTTSD2SI R15D,XMM0 JMP 0x00124f38 LAB_00124f80: XOR R15D,R15D JMP 0x00124f38
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int4 JS_ToInt32SatFree(int8 param_1,int *param_2,int8 param_3,int8 param_4) { double dVar1; uint uVar2; int4 uVar3; int iVar4; int1 auVar5 [16]; auVar5._8_8_ = param_4; auVar5._0_8_ = param_3; uVar3 = 0xffffffff; iVar4 = 0; while( true ) { dVar1 = auVar5._0_8_; uVar2 = auVar5._8_4_; if (uVar2 < 4) { uVar3 = 0; iVar4 = auVar5._0_4_; goto LAB_00124f38; } if (uVar2 == 6) goto LAB_00124f38; if (uVar2 == 7) break; auVar5 = JS_ToNumberFree(param_1,dVar1,auVar5._8_8_); if (auVar5._8_4_ == 6) { LAB_00124f38: *param_2 = iVar4; return uVar3; } } if (NAN(dVar1)) { iVar4 = 0; uVar3 = 0; } else { iVar4 = -0x80000000; uVar3 = 0; if ((DAT_00188a48 <= dVar1) && (iVar4 = 0x7fffffff, dVar1 <= _DAT_00188a50)) { iVar4 = (int)dVar1; uVar3 = 0; } } goto LAB_00124f38; }
55,284
blst_fr_from_scalar
corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/exports.c
void blst_fr_from_scalar(vec256 ret, const pow256 a) { const union { long one; char little; } is_endian = { 1 }; if ((uptr_t)ret == (uptr_t)a && is_endian.little) { mul_mont_sparse_256(ret, (const limb_t *)a, BLS12_381_rRR, BLS12_381_r, r0); } else { vec256 out; limbs_from_le_bytes(out, a, 32); mul_mont_sparse_256(ret, out, BLS12_381_rRR, BLS12_381_r, r0); vec_zero(out, sizeof(out)); } }
O1
c
blst_fr_from_scalar: movabsq $-0x100000001, %r8 # imm = 0xFFFFFFFEFFFFFFFF cmpq %rsi, %rdi je 0x25022 pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl $0x1f, %eax xorl %ecx, %ecx shlq $0x8, %rcx movzbl (%rsi,%rax), %edx orq %rdx, %rcx movq %rax, %rdx andq $-0x8, %rdx movq %rcx, -0x20(%rbp,%rdx) addq $-0x1, %rax jb 0x24fd0 leaq 0x1addc(%rip), %rdx # 0x3fdd0 leaq 0x1a8c5(%rip), %rcx # 0x3f8c0 leaq -0x20(%rbp), %rsi callq 0x35d80 xorl %eax, %eax movq $0x0, -0x20(%rbp,%rax,8) incq %rax cmpq $0x4, %rax jne 0x25006 leaq -0x20(%rbp), %rax addq $0x20, %rsp popq %rbp retq leaq 0x1ada7(%rip), %rdx # 0x3fdd0 leaq 0x1a890(%rip), %rcx # 0x3f8c0 jmp 0x35d80
blst_fr_from_scalar: mov r8, 0FFFFFFFEFFFFFFFFh cmp rdi, rsi jz short loc_25022 push rbp mov rbp, rsp sub rsp, 20h mov eax, 1Fh xor ecx, ecx loc_24FD0: shl rcx, 8 movzx edx, byte ptr [rsi+rax] or rcx, rdx mov rdx, rax and rdx, 0FFFFFFFFFFFFFFF8h mov [rbp+rdx-20h], rcx add rax, 0FFFFFFFFFFFFFFFFh jb short loc_24FD0 lea rdx, BLS12_381_rRR lea rcx, BLS12_381_r lea rsi, [rbp-20h] call mul_mont_sparse_256 xor eax, eax loc_25006: mov qword ptr [rbp+rax*8-20h], 0 inc rax cmp rax, 4 jnz short loc_25006 lea rax, [rbp-20h] add rsp, 20h pop rbp retn loc_25022: lea rdx, BLS12_381_rRR lea rcx, BLS12_381_r jmp mul_mont_sparse_256
_BYTE * blst_fr_from_scalar(long long a1, long long a2) { long long v2; // rax unsigned long long v3; // rcx long long i; // rax _BYTE v7[40]; // [rsp-28h] [rbp-28h] BYREF if ( a1 == a2 ) return (_BYTE *)mul_mont_sparse_256(a1, a2, &BLS12_381_rRR, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL); v2 = 31LL; v3 = 0LL; do { v3 = *(unsigned __int8 *)(a2 + v2) | (v3 << 8); *(_QWORD *)&v7[v2 & 0xFFFFFFFFFFFFFFF8LL] = v3; } while ( v2-- != 0 ); mul_mont_sparse_256(a1, v7, &BLS12_381_rRR, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL); for ( i = 0LL; i != 4; ++i ) *(_QWORD *)&v7[8 * i] = 0LL; return v7; }
blst_fr_from_scalar: MOV R8,-0x100000001 CMP RDI,RSI JZ 0x00125022 PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV EAX,0x1f XOR ECX,ECX LAB_00124fd0: SHL RCX,0x8 MOVZX EDX,byte ptr [RSI + RAX*0x1] OR RCX,RDX MOV RDX,RAX AND RDX,-0x8 MOV qword ptr [RBP + RDX*0x1 + -0x20],RCX ADD RAX,-0x1 JC 0x00124fd0 LEA RDX,[0x13fdd0] LEA RCX,[0x13f8c0] LEA RSI,[RBP + -0x20] CALL 0x00135d80 XOR EAX,EAX LAB_00125006: MOV qword ptr [RBP + RAX*0x8 + -0x20],0x0 INC RAX CMP RAX,0x4 JNZ 0x00125006 LEA RAX,[RBP + -0x20] ADD RSP,0x20 POP RBP RET LAB_00125022: LEA RDX,[0x13fdd0] LEA RCX,[0x13f8c0] JMP 0x00135d80
ulong * blst_fr_from_scalar(long param_1,long param_2) { ulong uVar1; long lVar2; ulong *puVar3; ulong uVar4; bool bVar5; ulong local_28 [4]; if (param_1 != param_2) { uVar1 = 0x1f; uVar4 = 0; do { uVar4 = uVar4 << 8 | (ulong)*(byte *)(param_2 + uVar1); *(ulong *)((long)local_28 + (uVar1 & 0xfffffffffffffff8)) = uVar4; bVar5 = uVar1 != 0; uVar1 = uVar1 - 1; } while (bVar5); mul_mont_sparse_256(param_1,local_28,BLS12_381_rRR,BLS12_381_r,0xfffffffeffffffff); lVar2 = 0; do { local_28[lVar2] = 0; lVar2 = lVar2 + 1; } while (lVar2 != 4); return local_28; } puVar3 = (ulong *)mul_mont_sparse_256(param_1,param_2,BLS12_381_rRR,BLS12_381_r,0xfffffffeffffffff ); return puVar3; }
55,285
reset_events_stages_global()
eloqsql/storage/perfschema/pfs_events_stages.cc
void reset_events_stages_global() { PFS_stage_stat *stat= global_instr_class_stages_array; PFS_stage_stat *stat_last= global_instr_class_stages_array + stage_class_max; for ( ; stat < stat_last; stat++) stat->reset(); }
O3
cpp
reset_events_stages_global(): pushq %rbp movq %rsp, %rbp leaq 0x38a7ba(%rip), %rax # 0x3cf550 movq (%rax), %rax testq %rax, %rax jle 0x44dce leaq 0x38a59b(%rip), %rcx # 0x3cf340 movq (%rcx), %rcx shlq $0x5, %rax addq %rcx, %rax xorps %xmm0, %xmm0 movups %xmm0, (%rcx) movq $-0x1, 0x10(%rcx) movq $0x0, 0x18(%rcx) addq $0x20, %rcx cmpq %rax, %rcx jb 0x44db2 popq %rbp retq
_Z26reset_events_stages_globalv: push rbp mov rbp, rsp lea rax, stage_class_max mov rax, [rax] test rax, rax jle short loc_44DCE lea rcx, global_instr_class_stages_array mov rcx, [rcx] shl rax, 5 add rax, rcx xorps xmm0, xmm0 loc_44DB2: movups xmmword ptr [rcx], xmm0 mov qword ptr [rcx+10h], 0FFFFFFFFFFFFFFFFh mov qword ptr [rcx+18h], 0 add rcx, 20h ; ' ' cmp rcx, rax jb short loc_44DB2 loc_44DCE: pop rbp retn
unsigned long long reset_events_stages_global(void) { unsigned long long result; // rax unsigned long long v1; // rcx result = stage_class_max; if ( stage_class_max > 0 ) { v1 = global_instr_class_stages_array; result = global_instr_class_stages_array + 32 * stage_class_max; do { *(_OWORD *)v1 = 0LL; *(_QWORD *)(v1 + 16) = -1LL; *(_QWORD *)(v1 + 24) = 0LL; v1 += 32LL; } while ( v1 < result ); } return result; }
reset_events_stages_global: PUSH RBP MOV RBP,RSP LEA RAX,[0x4cf550] MOV RAX,qword ptr [RAX] TEST RAX,RAX JLE 0x00144dce LEA RCX,[0x4cf340] MOV RCX,qword ptr [RCX] SHL RAX,0x5 ADD RAX,RCX XORPS XMM0,XMM0 LAB_00144db2: MOVUPS xmmword ptr [RCX],XMM0 MOV qword ptr [RCX + 0x10],-0x1 MOV qword ptr [RCX + 0x18],0x0 ADD RCX,0x20 CMP RCX,RAX JC 0x00144db2 LAB_00144dce: POP RBP RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* reset_events_stages_global() */ void reset_events_stages_global(void) { int8 *puVar1; int8 *puVar2; if (0 < stage_class_max) { puVar1 = global_instr_class_stages_array + stage_class_max * 4; puVar2 = global_instr_class_stages_array; do { *puVar2 = 0; puVar2[1] = 0; puVar2[2] = 0xffffffffffffffff; puVar2[3] = 0; puVar2 = puVar2 + 4; } while (puVar2 < puVar1); } return; }
55,286
bool nlohmann::json_abi_v3_12_0::detail::iter_impl<nlohmann::json_abi_v3_12_0::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::operator==<nlohmann::json_abi_v3_12_0::detail::iter_impl<nlohmann::json_abi_v3_12_0::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, nullptr>(nlohmann::json_abi_v3_12_0::detail::iter_impl<nlohmann::json_abi_v3_12_0::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const> const&) const
shubhamoy[P]dir2txt/include/nlohmann/json.hpp
bool operator==(const IterImpl& other) const { // if objects are not the same, the comparison is undefined if (JSON_HEDLEY_UNLIKELY(m_object != other.m_object)) { JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers", m_object)); } // value-initialized forward iterators can be compared, and must compare equal to other value-initialized iterators of the same type #4493 if (m_object == nullptr) { return true; } switch (m_object->m_data.m_type) { case value_t::object: return (m_it.object_iterator == other.m_it.object_iterator); case value_t::array: return (m_it.array_iterator == other.m_it.array_iterator); case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: return (m_it.primitive_iterator == other.m_it.primitive_iterator); } }
O3
cpp
bool nlohmann::json_abi_v3_12_0::detail::iter_impl<nlohmann::json_abi_v3_12_0::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::operator==<nlohmann::json_abi_v3_12_0::detail::iter_impl<nlohmann::json_abi_v3_12_0::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, nullptr>(nlohmann::json_abi_v3_12_0::detail::iter_impl<nlohmann::json_abi_v3_12_0::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %r14 movq (%rdi), %rax cmpq (%rsi), %rax jne 0x2e411 testq %rax, %rax je 0x2e3ed movzbl (%rax), %eax cmpl $0x2, %eax je 0x2e3f1 cmpl $0x1, %eax jne 0x2e3fb movq 0x8(%r14), %rax cmpq 0x8(%rsi), %rax jmp 0x2e403 movb $0x1, %al jmp 0x2e406 movq 0x10(%r14), %rax cmpq 0x10(%rsi), %rax jmp 0x2e403 movq 0x18(%r14), %rax cmpq 0x18(%rsi), %rax sete %al addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x81d0 movq %rax, %rbx leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x95be(%rip), %rsi # 0x379ec leaq 0x95e7(%rip), %rdx # 0x37a1c leaq 0x8(%rsp), %rdi callq 0x9a9e movq (%r14), %rcx movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0xd4, %esi callq 0x2e4a4 xorl %ebp, %ebp leaq 0x1f800(%rip), %rsi # 0x4dc60 leaq 0x209(%rip), %rdx # 0x2e670 movq %rbx, %rdi callq 0x85c0 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x2e489 movq 0x18(%rsp), %rsi incq %rsi callq 0x8380 testb %bpl, %bpl jne 0x2e493 jmp 0x2e49b movq %rax, %r14 movq %rbx, %rdi callq 0x82a0 movq %r14, %rdi callq 0x85d0 nop
_ZNK8nlohmann16json_abi_v3_12_06detail9iter_implIKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_: push rbp; char push r15; int push r14; __int64 push rbx; int sub rsp, 28h mov r14, rdi mov rax, [rdi] cmp rax, [rsi] jnz short loc_2E411 test rax, rax jz short loc_2E3ED movzx eax, byte ptr [rax] cmp eax, 2 jz short loc_2E3F1 cmp eax, 1 jnz short loc_2E3FB mov rax, [r14+8] cmp rax, [rsi+8] jmp short loc_2E403 loc_2E3ED: mov al, 1 jmp short loc_2E406 loc_2E3F1: mov rax, [r14+10h] cmp rax, [rsi+10h] jmp short loc_2E403 loc_2E3FB: mov rax, [r14+18h] cmp rax, [rsi+18h] loc_2E403: setz al loc_2E406: add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn loc_2E411: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+48h+var_30] mov [r15-10h], r15 lea rsi, aCannotCompareI; "cannot compare iterators of different c"... lea rdx, aCannotCompareI+30h; "" lea rdi, [rsp+48h+var_40] 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 rcx, [r14] mov bpl, 1 lea rdx, [rsp+48h+var_40] mov rdi, rbx; this mov esi, 0D4h; int call _ZN8nlohmann16json_abi_v3_12_06detail16invalid_iterator6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_12_06detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_12_06detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rdi, [rsp+48h+var_40]; void * cmp rdi, r15 jz short loc_2E489 mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2E489: test bpl, bpl jnz short loc_2E493 jmp short loc_2E49B mov r14, rax loc_2E493: mov rdi, rbx; void * call ___cxa_free_exception loc_2E49B: mov rdi, r14 call __Unwind_Resume
_ZNK8nlohmann16json_abi_v3_12_06detail9iter_implIKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 MOV R14,RDI MOV RAX,qword ptr [RDI] CMP RAX,qword ptr [RSI] JNZ 0x0012e411 TEST RAX,RAX JZ 0x0012e3ed MOVZX EAX,byte ptr [RAX] CMP EAX,0x2 JZ 0x0012e3f1 CMP EAX,0x1 JNZ 0x0012e3fb MOV RAX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [RSI + 0x8] JMP 0x0012e403 LAB_0012e3ed: MOV AL,0x1 JMP 0x0012e406 LAB_0012e3f1: MOV RAX,qword ptr [R14 + 0x10] CMP RAX,qword ptr [RSI + 0x10] JMP 0x0012e403 LAB_0012e3fb: MOV RAX,qword ptr [R14 + 0x18] CMP RAX,qword ptr [RSI + 0x18] LAB_0012e403: SETZ AL LAB_0012e406: ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET LAB_0012e411: MOV EDI,0x20 CALL 0x001081d0 MOV RBX,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 LAB_0012e427: LEA RSI,[0x1379ec] LEA RDX,[0x137a1c] LEA RDI,[RSP + 0x8] CALL 0x00109a9e MOV RCX,qword ptr [R14] MOV BPL,0x1 LAB_0012e445: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0xd4 CALL 0x0012e4a4 XOR EBP,EBP LEA RSI,[0x14dc60] LEA RDX,[0x12e670] MOV RDI,RBX CALL 0x001085c0
int8 _ZNK8nlohmann16json_abi_v3_12_06detail9iter_implIKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_ (int8 *param_1,int8 *param_2) { char *pcVar1; long lVar2; int8 uVar3; bool bVar4; int1 *local_40 [2]; int1 local_30 [16]; pcVar1 = (char *)*param_1; if (pcVar1 == (char *)*param_2) { if (pcVar1 == (char *)0x0) { uVar3 = 1; } else { if (*pcVar1 == '\x02') { lVar2 = param_1[2]; bVar4 = lVar2 == param_2[2]; } else if (*pcVar1 == '\x01') { lVar2 = param_1[1]; bVar4 = lVar2 == param_2[1]; } else { lVar2 = param_1[3]; bVar4 = lVar2 == param_2[3]; } uVar3 = CONCAT71((int7)((ulong)lVar2 >> 8),bVar4); } return uVar3; } uVar3 = __cxa_allocate_exception(0x20); local_40[0] = local_30; /* try { // try from 0012e427 to 0012e43e has its CatchHandler @ 0012e490 */ std::__cxx11::string::_M_construct<char_const*> (local_40,"cannot compare iterators of different containers",""); /* try { // try from 0012e445 to 0012e46e has its CatchHandler @ 0012e46f */ _ZN8nlohmann16json_abi_v3_12_06detail16invalid_iterator6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar3,0xd4,local_40,*param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar3,&nlohmann::json_abi_v3_12_0::detail::invalid_iterator::typeinfo, nlohmann::json_abi_v3_12_0::detail::exception::~exception); }
55,287
find_or_create_user(PFS_thread*, char const*, unsigned int)
eloqsql/storage/perfschema/pfs_user.cc
PFS_user * find_or_create_user(PFS_thread *thread, const char *username, uint username_length) { LF_PINS *pins= get_user_hash_pins(thread); if (unlikely(pins == NULL)) { global_user_container.m_lost++; return NULL; } PFS_user_key key; set_user_key(&key, username, username_length); PFS_user **entry; PFS_user *pfs; uint retry_count= 0; const uint retry_max= 3; pfs_dirty_state dirty_state; search: entry= reinterpret_cast<PFS_user**> (lf_hash_search(&user_hash, pins, key.m_hash_key, key.m_key_length)); if (entry && (entry != MY_ERRPTR)) { pfs= *entry; pfs->inc_refcount(); lf_hash_search_unpin(pins); return pfs; } lf_hash_search_unpin(pins); pfs= global_user_container.allocate(& dirty_state); if (pfs != NULL) { pfs->m_key= key; if (username_length > 0) pfs->m_username= &pfs->m_key.m_hash_key[0]; else pfs->m_username= NULL; pfs->m_username_length= username_length; pfs->init_refcount(); pfs->reset_stats(); pfs->m_disconnected_count= 0; int res; pfs->m_lock.dirty_to_allocated(& dirty_state); res= lf_hash_insert(&user_hash, pins, &pfs); if (likely(res == 0)) { return pfs; } global_user_container.deallocate(pfs); if (res > 0) { if (++retry_count > retry_max) { global_user_container.m_lost++; return NULL; } goto search; } global_user_container.m_lost++; return NULL; } return NULL; }
O0
cpp
find_or_create_user(PFS_thread*, char const*, unsigned int): pushq %rbp movq %rsp, %rbp subq $0x200, %rsp # imm = 0x200 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x1a0(%rbp) movq %rsi, -0x1a8(%rbp) movl %edx, -0x1ac(%rbp) movq -0x1a0(%rbp), %rdi callq 0x43450 movq %rax, -0x1b8(%rbp) cmpq $0x0, -0x1b8(%rbp) sete %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x4318c leaq 0x3c0fdd(%rip), %rax # 0x404148 movq (%rax), %rcx addq $0x1, %rcx leaq 0x3c0fcf(%rip), %rax # 0x404148 movq %rcx, (%rax) movq $0x0, -0x198(%rbp) jmp 0x43411 movq -0x1a8(%rbp), %rsi movl -0x1ac(%rbp), %edx leaq -0x190(%rbp), %rdi callq 0x434c0 movl $0x0, -0x1cc(%rbp) movl $0x3, -0x1d0(%rbp) movq -0x1b8(%rbp), %rsi leaq -0x190(%rbp), %rdx movl -0xc(%rbp), %ecx leaq 0x3ca067(%rip), %rdi # 0x40d238 callq 0x5d8b0 movq %rax, -0x1c0(%rbp) cmpq $0x0, -0x1c0(%rbp) je 0x43246 movl $0x1, %eax cmpq %rax, -0x1c0(%rbp) je 0x43246 movq -0x1c0(%rbp), %rax movq (%rax), %rax movq %rax, -0x1c8(%rbp) movq -0x1c8(%rbp), %rdi callq 0x43af0 jmp 0x43214 jmp 0x43216 movq -0x1b8(%rbp), %rcx movq $0x0, -0x1e0(%rbp) movq -0x1e0(%rbp), %rax xchgq %rax, 0x10(%rcx) movq -0x1c8(%rbp), %rax movq %rax, -0x198(%rbp) jmp 0x43411 jmp 0x43248 jmp 0x4324a jmp 0x4324c movq -0x1b8(%rbp), %rcx movq $0x0, -0x1e8(%rbp) movq -0x1e8(%rbp), %rax xchgq %rax, 0x10(%rcx) leaq 0x3c0ed8(%rip), %rdi # 0x404148 leaq -0x1d4(%rbp), %rsi callq 0x43b20 movq %rax, -0x1c8(%rbp) cmpq $0x0, -0x1c8(%rbp) je 0x43406 movq -0x1c8(%rbp), %rdi addq $0x7e4, %rdi # imm = 0x7E4 leaq -0x190(%rbp), %rsi movl $0x188, %edx # imm = 0x188 callq 0x26280 cmpl $0x0, -0x1ac(%rbp) jbe 0x432d7 movq -0x1c8(%rbp), %rcx addq $0x7e4, %rcx # imm = 0x7E4 movq -0x1c8(%rbp), %rax movq %rcx, 0x970(%rax) jmp 0x432e9 movq -0x1c8(%rbp), %rax movq $0x0, 0x970(%rax) movl -0x1ac(%rbp), %ecx movq -0x1c8(%rbp), %rax movl %ecx, 0x978(%rax) movq -0x1c8(%rbp), %rdi callq 0x43ef0 movq -0x1c8(%rbp), %rdi callq 0x34480 movq -0x1c8(%rbp), %rax movq $0x0, 0x980(%rax) movq -0x1c8(%rbp), %rdi addq $0x7e0, %rdi # imm = 0x7E0 leaq -0x1d4(%rbp), %rsi callq 0x334b0 movq -0x1b8(%rbp), %rsi leaq 0x3c9eea(%rip), %rdi # 0x40d238 leaq -0x1c8(%rbp), %rdx callq 0x5c890 movl %eax, -0x1ec(%rbp) cmpl $0x0, -0x1ec(%rbp) sete %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x43387 movq -0x1c8(%rbp), %rax movq %rax, -0x198(%rbp) jmp 0x43411 movq -0x1c8(%rbp), %rsi leaq 0x3c0db3(%rip), %rdi # 0x404148 callq 0x43f20 cmpl $0x0, -0x1ec(%rbp) jle 0x433e1 movl -0x1cc(%rbp), %eax addl $0x1, %eax movl %eax, -0x1cc(%rbp) cmpl $0x3, %eax jbe 0x433dc leaq 0x3c0d8a(%rip), %rax # 0x404148 movq (%rax), %rcx addq $0x1, %rcx leaq 0x3c0d7c(%rip), %rax # 0x404148 movq %rcx, (%rax) movq $0x0, -0x198(%rbp) jmp 0x43411 jmp 0x431b9 leaq 0x3c0d60(%rip), %rax # 0x404148 movq (%rax), %rcx addq $0x1, %rcx leaq 0x3c0d52(%rip), %rax # 0x404148 movq %rcx, (%rax) movq $0x0, -0x198(%rbp) jmp 0x43411 movq $0x0, -0x198(%rbp) movq -0x198(%rbp), %rax movq %rax, -0x1f8(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x43441 movq -0x1f8(%rbp), %rax addq $0x200, %rsp # imm = 0x200 popq %rbp retq callq 0x26360 nopw %cs:(%rax,%rax)
_Z19find_or_create_userP10PFS_threadPKcj: push rbp mov rbp, rsp sub rsp, 200h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_1A0], rdi mov [rbp+var_1A8], rsi mov [rbp+var_1AC], edx mov rdi, [rbp+var_1A0]; PFS_thread * call _ZL18get_user_hash_pinsP10PFS_thread; get_user_hash_pins(PFS_thread *) mov [rbp+var_1B8], rax cmp [rbp+var_1B8], 0 setz al and al, 1 movzx eax, al cmp eax, 0 jz short loc_4318C lea rax, global_user_container mov rcx, [rax] add rcx, 1 lea rax, global_user_container mov [rax], rcx mov [rbp+var_198], 0 jmp loc_43411 loc_4318C: mov rsi, [rbp+var_1A8] mov edx, [rbp+var_1AC] lea rdi, [rbp+var_190] call _ZL12set_user_keyP12PFS_user_keyPKcj; set_user_key(PFS_user_key *,char const*,uint) mov [rbp+var_1CC], 0 mov [rbp+var_1D0], 3 loc_431B9: mov rsi, [rbp+var_1B8] lea rdx, [rbp+var_190] mov ecx, [rbp+var_C] lea rdi, user_hash call lf_hash_search mov [rbp+var_1C0], rax cmp [rbp+var_1C0], 0 jz short loc_43246 mov eax, 1 cmp [rbp+var_1C0], rax jz short loc_43246 mov rax, [rbp+var_1C0] mov rax, [rax] mov [rbp+var_1C8], rax mov rdi, [rbp+var_1C8]; this call _ZN8PFS_user12inc_refcountEv; PFS_user::inc_refcount(void) jmp short $+2 loc_43214: jmp short $+2 loc_43216: mov rcx, [rbp+var_1B8] mov [rbp+var_1E0], 0 mov rax, [rbp+var_1E0] xchg rax, [rcx+10h] mov rax, [rbp+var_1C8] mov [rbp+var_198], rax jmp loc_43411 loc_43246: jmp short $+2 loc_43248: jmp short $+2 loc_4324A: jmp short $+2 loc_4324C: mov rcx, [rbp+var_1B8] mov [rbp+var_1E8], 0 mov rax, [rbp+var_1E8] xchg rax, [rcx+10h] lea rdi, global_user_container lea rsi, [rbp+var_1D4] call _ZN29PFS_buffer_scalable_containerI8PFS_userLi128ELi128E14PFS_user_array18PFS_user_allocatorE8allocateEP15pfs_dirty_state; PFS_buffer_scalable_container<PFS_user,128,128,PFS_user_array,PFS_user_allocator>::allocate(pfs_dirty_state *) mov [rbp+var_1C8], rax cmp [rbp+var_1C8], 0 jz loc_43406 mov rdi, [rbp+var_1C8] add rdi, 7E4h lea rsi, [rbp+var_190] mov edx, 188h call _memcpy cmp [rbp+var_1AC], 0 jbe short loc_432D7 mov rcx, [rbp+var_1C8] add rcx, 7E4h mov rax, [rbp+var_1C8] mov [rax+970h], rcx jmp short loc_432E9 loc_432D7: mov rax, [rbp+var_1C8] mov qword ptr [rax+970h], 0 loc_432E9: mov ecx, [rbp+var_1AC] mov rax, [rbp+var_1C8] mov [rax+978h], ecx mov rdi, [rbp+var_1C8]; this call _ZN8PFS_user13init_refcountEv; PFS_user::init_refcount(void) mov rdi, [rbp+var_1C8]; this call _ZN20PFS_connection_slice11reset_statsEv; PFS_connection_slice::reset_stats(void) mov rax, [rbp+var_1C8] mov qword ptr [rax+980h], 0 mov rdi, [rbp+var_1C8] add rdi, 7E0h lea rsi, [rbp+var_1D4] call _ZN8pfs_lock18dirty_to_allocatedEPK15pfs_dirty_state; pfs_lock::dirty_to_allocated(pfs_dirty_state const*) mov rsi, [rbp+var_1B8] lea rdi, user_hash lea rdx, [rbp+var_1C8] call lf_hash_insert mov [rbp+var_1EC], eax cmp [rbp+var_1EC], 0 setz al and al, 1 movzx eax, al cmp eax, 0 jz short loc_43387 mov rax, [rbp+var_1C8] mov [rbp+var_198], rax jmp loc_43411 loc_43387: mov rsi, [rbp+var_1C8] lea rdi, global_user_container call _ZN29PFS_buffer_scalable_containerI8PFS_userLi128ELi128E14PFS_user_array18PFS_user_allocatorE10deallocateEPS0_; PFS_buffer_scalable_container<PFS_user,128,128,PFS_user_array,PFS_user_allocator>::deallocate(PFS_user*) cmp [rbp+var_1EC], 0 jle short loc_433E1 mov eax, [rbp+var_1CC] add eax, 1 mov [rbp+var_1CC], eax cmp eax, 3 jbe short loc_433DC lea rax, global_user_container mov rcx, [rax] add rcx, 1 lea rax, global_user_container mov [rax], rcx mov [rbp+var_198], 0 jmp short loc_43411 loc_433DC: jmp loc_431B9 loc_433E1: lea rax, global_user_container mov rcx, [rax] add rcx, 1 lea rax, global_user_container mov [rax], rcx mov [rbp+var_198], 0 jmp short loc_43411 loc_43406: mov [rbp+var_198], 0 loc_43411: mov rax, [rbp+var_198] mov [rbp+var_1F8], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_43441 mov rax, [rbp+var_1F8] add rsp, 200h pop rbp retn loc_43441: call ___stack_chk_fail
PFS_user * find_or_create_user(PFS_thread *a1, const char *a2, unsigned int a3) { unsigned int v3; // edx int v5; // [rsp+14h] [rbp-1ECh] _DWORD v6[2]; // [rsp+2Ch] [rbp-1D4h] BYREF int v7; // [rsp+34h] [rbp-1CCh] PFS_user *v8; // [rsp+38h] [rbp-1C8h] BYREF PFS_user **v9; // [rsp+40h] [rbp-1C0h] long long user_hash_pins; // [rsp+48h] [rbp-1B8h] unsigned int v11; // [rsp+54h] [rbp-1ACh] const char *v12; // [rsp+58h] [rbp-1A8h] PFS_thread *v13; // [rsp+60h] [rbp-1A0h] _BYTE v15[388]; // [rsp+70h] [rbp-190h] BYREF unsigned int v16; // [rsp+1F4h] [rbp-Ch] unsigned long long v17; // [rsp+1F8h] [rbp-8h] v17 = __readfsqword(0x28u); v13 = a1; v12 = a2; v11 = a3; user_hash_pins = get_user_hash_pins(a1); if ( user_hash_pins ) { set_user_key(v15, v12, v11); v7 = 0; v6[1] = 3; while ( 1 ) { v9 = (PFS_user **)lf_hash_search(&user_hash, user_hash_pins, v15, v16); if ( (unsigned long long)v9 >= 2 ) { v8 = *v9; PFS_user::inc_refcount(v8); _InterlockedExchange64((volatile long long *)(user_hash_pins + 16), 0LL); return v8; } _InterlockedExchange64((volatile long long *)(user_hash_pins + 16), 0LL); v8 = (PFS_user *)PFS_buffer_scalable_container<PFS_user,128,128,PFS_user_array,PFS_user_allocator>::allocate( global_user_container, v6); if ( !v8 ) break; memcpy((char *)v8 + 2020, v15, 392LL); if ( v11 ) *((_QWORD *)v8 + 302) = (char *)v8 + 2020; else *((_QWORD *)v8 + 302) = 0LL; *((_DWORD *)v8 + 606) = v11; PFS_user::init_refcount(v8); PFS_connection_slice::reset_stats(v8); *((_QWORD *)v8 + 304) = 0LL; pfs_lock::dirty_to_allocated((PFS_user *)((char *)v8 + 2016), v6, v3); v5 = lf_hash_insert(&user_hash, user_hash_pins, &v8); if ( !v5 ) return v8; PFS_buffer_scalable_container<PFS_user,128,128,PFS_user_array,PFS_user_allocator>::deallocate( global_user_container, v8); if ( v5 <= 0 ) { ++global_user_container[0]; return 0LL; } if ( (unsigned int)++v7 > 3 ) { ++global_user_container[0]; return 0LL; } } return 0LL; } else { ++global_user_container[0]; return 0LL; } }
find_or_create_user: PUSH RBP MOV RBP,RSP SUB RSP,0x200 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x1a0],RDI MOV qword ptr [RBP + -0x1a8],RSI MOV dword ptr [RBP + -0x1ac],EDX MOV RDI,qword ptr [RBP + -0x1a0] CALL 0x00143450 MOV qword ptr [RBP + -0x1b8],RAX CMP qword ptr [RBP + -0x1b8],0x0 SETZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x0014318c LEA RAX,[0x504148] MOV RCX,qword ptr [RAX] ADD RCX,0x1 LEA RAX,[0x504148] MOV qword ptr [RAX],RCX MOV qword ptr [RBP + -0x198],0x0 JMP 0x00143411 LAB_0014318c: MOV RSI,qword ptr [RBP + -0x1a8] MOV EDX,dword ptr [RBP + -0x1ac] LEA RDI,[RBP + -0x190] CALL 0x001434c0 MOV dword ptr [RBP + -0x1cc],0x0 MOV dword ptr [RBP + -0x1d0],0x3 LAB_001431b9: MOV RSI,qword ptr [RBP + -0x1b8] LEA RDX,[RBP + -0x190] MOV ECX,dword ptr [RBP + -0xc] LEA RDI,[0x50d238] CALL 0x0015d8b0 MOV qword ptr [RBP + -0x1c0],RAX CMP qword ptr [RBP + -0x1c0],0x0 JZ 0x00143246 MOV EAX,0x1 CMP qword ptr [RBP + -0x1c0],RAX JZ 0x00143246 MOV RAX,qword ptr [RBP + -0x1c0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x1c8],RAX MOV RDI,qword ptr [RBP + -0x1c8] CALL 0x00143af0 JMP 0x00143214 LAB_00143214: JMP 0x00143216 LAB_00143216: MOV RCX,qword ptr [RBP + -0x1b8] MOV qword ptr [RBP + -0x1e0],0x0 MOV RAX,qword ptr [RBP + -0x1e0] XCHG qword ptr [RCX + 0x10],RAX MOV RAX,qword ptr [RBP + -0x1c8] MOV qword ptr [RBP + -0x198],RAX JMP 0x00143411 LAB_00143246: JMP 0x00143248 LAB_00143248: JMP 0x0014324a LAB_0014324a: JMP 0x0014324c LAB_0014324c: MOV RCX,qword ptr [RBP + -0x1b8] MOV qword ptr [RBP + -0x1e8],0x0 MOV RAX,qword ptr [RBP + -0x1e8] XCHG qword ptr [RCX + 0x10],RAX LEA RDI,[0x504148] LEA RSI,[RBP + -0x1d4] CALL 0x00143b20 MOV qword ptr [RBP + -0x1c8],RAX CMP qword ptr [RBP + -0x1c8],0x0 JZ 0x00143406 MOV RDI,qword ptr [RBP + -0x1c8] ADD RDI,0x7e4 LEA RSI,[RBP + -0x190] MOV EDX,0x188 CALL 0x00126280 CMP dword ptr [RBP + -0x1ac],0x0 JBE 0x001432d7 MOV RCX,qword ptr [RBP + -0x1c8] ADD RCX,0x7e4 MOV RAX,qword ptr [RBP + -0x1c8] MOV qword ptr [RAX + 0x970],RCX JMP 0x001432e9 LAB_001432d7: MOV RAX,qword ptr [RBP + -0x1c8] MOV qword ptr [RAX + 0x970],0x0 LAB_001432e9: MOV ECX,dword ptr [RBP + -0x1ac] MOV RAX,qword ptr [RBP + -0x1c8] MOV dword ptr [RAX + 0x978],ECX MOV RDI,qword ptr [RBP + -0x1c8] CALL 0x00143ef0 MOV RDI,qword ptr [RBP + -0x1c8] CALL 0x00134480 MOV RAX,qword ptr [RBP + -0x1c8] MOV qword ptr [RAX + 0x980],0x0 MOV RDI,qword ptr [RBP + -0x1c8] ADD RDI,0x7e0 LEA RSI,[RBP + -0x1d4] CALL 0x001334b0 MOV RSI,qword ptr [RBP + -0x1b8] LEA RDI,[0x50d238] LEA RDX,[RBP + -0x1c8] CALL 0x0015c890 MOV dword ptr [RBP + -0x1ec],EAX CMP dword ptr [RBP + -0x1ec],0x0 SETZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x00143387 MOV RAX,qword ptr [RBP + -0x1c8] MOV qword ptr [RBP + -0x198],RAX JMP 0x00143411 LAB_00143387: MOV RSI,qword ptr [RBP + -0x1c8] LEA RDI,[0x504148] CALL 0x00143f20 CMP dword ptr [RBP + -0x1ec],0x0 JLE 0x001433e1 MOV EAX,dword ptr [RBP + -0x1cc] ADD EAX,0x1 MOV dword ptr [RBP + -0x1cc],EAX CMP EAX,0x3 JBE 0x001433dc LEA RAX,[0x504148] MOV RCX,qword ptr [RAX] ADD RCX,0x1 LEA RAX,[0x504148] MOV qword ptr [RAX],RCX MOV qword ptr [RBP + -0x198],0x0 JMP 0x00143411 LAB_001433dc: JMP 0x001431b9 LAB_001433e1: LEA RAX,[0x504148] MOV RCX,qword ptr [RAX] ADD RCX,0x1 LEA RAX,[0x504148] MOV qword ptr [RAX],RCX MOV qword ptr [RBP + -0x198],0x0 JMP 0x00143411 LAB_00143406: MOV qword ptr [RBP + -0x198],0x0 LAB_00143411: MOV RAX,qword ptr [RBP + -0x198] MOV qword ptr [RBP + -0x1f8],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00143441 MOV RAX,qword ptr [RBP + -0x1f8] ADD RSP,0x200 POP RBP RET LAB_00143441: CALL 0x00126360
/* find_or_create_user(PFS_thread*, char const*, unsigned int) */ PFS_user * find_or_create_user(PFS_thread *param_1,char *param_2,uint param_3) { int iVar1; long in_FS_OFFSET; pfs_dirty_state local_1dc [4]; int4 local_1d8; uint local_1d4; PFS_user *local_1d0; int8 *local_1c8; long local_1c0; uint local_1b4; char *local_1b0; PFS_thread *local_1a8; PFS_user *local_1a0; PFS_user_key local_198 [388]; int4 local_14; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_1b4 = param_3; local_1b0 = param_2; local_1a8 = param_1; local_1c0 = get_user_hash_pins(param_1); if (local_1c0 == 0) { global_user_container = global_user_container + 1; local_1a0 = (PFS_user *)0x0; } else { set_user_key(local_198,local_1b0,local_1b4); local_1d4 = 0; local_1d8 = 3; do { local_1c8 = (int8 *)lf_hash_search(user_hash,local_1c0,local_198,local_14); if ((local_1c8 != (int8 *)0x0) && (local_1c8 != (int8 *)0x1)) { local_1d0 = (PFS_user *)*local_1c8; PFS_user::inc_refcount(local_1d0); LOCK(); *(int8 *)(local_1c0 + 0x10) = 0; UNLOCK(); local_1a0 = local_1d0; goto LAB_00143411; } LOCK(); *(int8 *)(local_1c0 + 0x10) = 0; UNLOCK(); local_1d0 = (PFS_user *) PFS_buffer_scalable_container<PFS_user,128,128,PFS_user_array,PFS_user_allocator> ::allocate((PFS_buffer_scalable_container<PFS_user,128,128,PFS_user_array,PFS_user_allocator> *)&global_user_container,local_1dc); if (local_1d0 == (PFS_user *)0x0) { local_1a0 = (PFS_user *)0x0; goto LAB_00143411; } memcpy(local_1d0 + 0x7e4,local_198,0x188); if (local_1b4 == 0) { *(int8 *)(local_1d0 + 0x970) = 0; } else { *(PFS_user **)(local_1d0 + 0x970) = local_1d0 + 0x7e4; } *(uint *)(local_1d0 + 0x978) = local_1b4; PFS_user::init_refcount(local_1d0); PFS_connection_slice::reset_stats((PFS_connection_slice *)local_1d0); *(int8 *)(local_1d0 + 0x980) = 0; pfs_lock::dirty_to_allocated((pfs_lock *)(local_1d0 + 0x7e0),local_1dc); iVar1 = lf_hash_insert(user_hash,local_1c0,&local_1d0); if (iVar1 == 0) { local_1a0 = local_1d0; goto LAB_00143411; } PFS_buffer_scalable_container<PFS_user,128,128,PFS_user_array,PFS_user_allocator>::deallocate ((PFS_buffer_scalable_container<PFS_user,128,128,PFS_user_array,PFS_user_allocator> *)&global_user_container,local_1d0); if (iVar1 < 1) { global_user_container = global_user_container + 1; local_1a0 = (PFS_user *)0x0; goto LAB_00143411; } local_1d4 = local_1d4 + 1; } while (local_1d4 < 4); global_user_container = global_user_container + 1; local_1a0 = (PFS_user *)0x0; } LAB_00143411: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_1a0; }
55,288
minja::SliceExpr::SliceExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&)
monkey531[P]llama/common/minja.hpp
SliceExpr(const Location & location, std::shared_ptr<Expression> && s, std::shared_ptr<Expression> && e) : Expression(location), start(std::move(s)), end(std::move(e)) {}
O2
cpp
minja::SliceExpr::SliceExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&): pushq %r15 pushq %r14 pushq %rbx movq %rcx, %rbx movq %rdx, %r14 movq %rdi, %r15 callq 0x4d5cc leaq 0x847a8(%rip), %rax # 0xe16f8 addq $0x10, %rax movq %rax, (%r15) andq $0x0, 0x28(%r15) movups (%r14), %xmm0 andq $0x0, 0x8(%r14) movups %xmm0, 0x20(%r15) andq $0x0, (%r14) andq $0x0, 0x38(%r15) movups (%rbx), %xmm0 andq $0x0, 0x8(%rbx) movups %xmm0, 0x30(%r15) andq $0x0, (%rbx) popq %rbx popq %r14 popq %r15 retq
_ZN5minja9SliceExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_: push r15 push r14 push rbx mov rbx, rcx mov r14, rdx mov r15, rdi call _ZN5minja10ExpressionC2ERKNS_8LocationE; minja::Expression::Expression(minja::Location const&) lea rax, _ZTVN5minja9SliceExprE; `vtable for'minja::SliceExpr add rax, 10h mov [r15], rax and qword ptr [r15+28h], 0 movups xmm0, xmmword ptr [r14] and qword ptr [r14+8], 0 movups xmmword ptr [r15+20h], xmm0 and qword ptr [r14], 0 and qword ptr [r15+38h], 0 movups xmm0, xmmword ptr [rbx] and qword ptr [rbx+8], 0 movups xmmword ptr [r15+30h], xmm0 and qword ptr [rbx], 0 pop rbx pop r14 pop r15 retn
long long * minja::SliceExpr::SliceExpr(long long a1, _QWORD *a2, __int128 *a3, __int128 *a4) { long long *result; // rax __int128 v7; // xmm0 __int128 v8; // xmm0 minja::Expression::Expression((_QWORD *)a1, a2); result = &`vtable for'minja::SliceExpr + 2; *(_QWORD *)a1 = &`vtable for'minja::SliceExpr + 2; *(_QWORD *)(a1 + 40) = 0LL; v7 = *a3; *((_QWORD *)a3 + 1) = 0LL; *(_OWORD *)(a1 + 32) = v7; *(_QWORD *)a3 = 0LL; *(_QWORD *)(a1 + 56) = 0LL; v8 = *a4; *((_QWORD *)a4 + 1) = 0LL; *(_OWORD *)(a1 + 48) = v8; *(_QWORD *)a4 = 0LL; return result; }
SliceExpr: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RCX MOV R14,RDX MOV R15,RDI CALL 0x0014d5cc LEA RAX,[0x1e16f8] ADD RAX,0x10 MOV qword ptr [R15],RAX AND qword ptr [R15 + 0x28],0x0 MOVUPS XMM0,xmmword ptr [R14] AND qword ptr [R14 + 0x8],0x0 MOVUPS xmmword ptr [R15 + 0x20],XMM0 AND qword ptr [R14],0x0 AND qword ptr [R15 + 0x38],0x0 MOVUPS XMM0,xmmword ptr [RBX] AND qword ptr [RBX + 0x8],0x0 MOVUPS xmmword ptr [R15 + 0x30],XMM0 AND qword ptr [RBX],0x0 POP RBX POP R14 POP R15 RET
/* minja::SliceExpr::SliceExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&) */ void __thiscall minja::SliceExpr::SliceExpr (SliceExpr *this,Location *param_1,shared_ptr *param_2,shared_ptr *param_3) { int8 uVar1; Expression::Expression((Expression *)this,param_1); *(int ***)this = &PTR_do_evaluate_001e1708; *(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; return; }
55,289
void ggml::cpu::aarch64::gemv<block_q4_0, 8l, 4l, (ggml_type)8>(int, float*, unsigned long, void const*, void const*, int, int)
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp
void gemv<block_q4_0, 8, 4, GGML_TYPE_Q8_0>(int n, float * s, size_t bs, const void * vx, const void * vy, int nr, int nc) { ggml_gemv_q4_0_4x8_q8_0(n, s, bs, vx, vy, nr, nc); }
O2
cpp
void ggml::cpu::aarch64::gemv<block_q4_0, 8l, 4l, (ggml_type)8>(int, float*, unsigned long, void const*, void const*, int, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movl %edi, %eax movl $0x20, %edi cltd idivl %edi movl %eax, %edi movl 0x38(%rsp), %eax movl $0x4, %r9d cltd idivl %r9d movl %edi, %edx sarl $0x1f, %edx andnl %edi, %edx, %edx movq %rdx, -0x8(%rsp) movslq %edi, %rdi movl %eax, %edx sarl $0x1f, %edx andnl %eax, %edx, %eax movq %rax, -0x38(%rsp) movq %r8, -0x18(%rsp) leaq 0x12(%r8), %rax movq %rax, -0x50(%rsp) movq %rcx, -0x40(%rsp) addq $0x8, %rcx movq %rdi, -0x48(%rsp) imulq $0x48, %rdi, %rax movq %rax, -0x58(%rsp) xorl %edx, %edx movq 0x43e15(%rip), %r14 # 0x56f60 cmpq -0x38(%rsp), %rdx je 0x13297 xorl %eax, %eax cmpq $0x4, %rax je 0x13168 andl $0x0, -0x68(%rsp,%rax,4) incq %rax jmp 0x13158 movq %rsi, -0x20(%rsp) movq %rdx, -0x30(%rsp) movq %rdx, %rax imulq -0x48(%rsp), %rax imulq $0x48, %rax, %rax addq -0x40(%rsp), %rax movq %rax, -0x10(%rsp) movq %rcx, -0x28(%rsp) movq -0x50(%rsp), %r9 xorl %ebp, %ebp cmpq -0x8(%rsp), %rbp je 0x1325f imulq $0x48, %rbp, %rdi addq -0x10(%rsp), %rdi imulq $0x22, %rbp, %rax movq -0x18(%rsp), %rdx movzwl (%rdx,%rax), %eax vmovss (%r14,%rax,4), %xmm0 movq %rcx, %r10 movq %r9, %r13 xorl %r11d, %r11d cmpq $0x2, %r11 je 0x1324f movq %r10, %r12 xorl %eax, %eax cmpq $0x4, %rax je 0x1323f xorl %ebx, %ebx xorl %edx, %edx cmpq $0x8, %rbx je 0x1321b movsbl (%r12,%rbx), %r8d movl %r8d, %r15d shlb $0x4, %r15b movsbl %r15b, %r15d andl $-0x10, %r8d movsbl -0x10(%r13,%rbx), %esi imull %r15d, %esi movsbl (%r13,%rbx), %r15d imull %r8d, %r15d addl %esi, %r15d sarl $0x4, %r15d addl %r15d, %edx incq %rbx jmp 0x131de vcvtsi2ss %edx, %xmm2, %xmm1 movzwl (%rdi,%rax,2), %edx vmulss (%r14,%rdx,4), %xmm1, %xmm1 vfmadd213ss -0x68(%rsp,%rax,4), %xmm0, %xmm1 # xmm1 = (xmm0 * xmm1) + mem vmovss %xmm1, -0x68(%rsp,%rax,4) incq %rax addq $0x8, %r12 jmp 0x131d4 incq %r11 addq $0x8, %r13 addq $0x20, %r10 jmp 0x131c5 incq %rbp addq $0x22, %r9 addq $0x48, %rcx jmp 0x13195 xorl %eax, %eax movq -0x20(%rsp), %rsi movq -0x28(%rsp), %rcx movq -0x30(%rsp), %rdx cmpq $0x4, %rax je 0x13286 vmovss -0x68(%rsp,%rax,4), %xmm0 vmovss %xmm0, (%rsi,%rax,4) incq %rax jmp 0x13270 incq %rdx addq -0x58(%rsp), %rcx addq $0x10, %rsi jmp 0x1314b popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN4ggml3cpu7aarch644gemvI10block_q4_0Ll8ELl4EL9ggml_type8EEEviPfmPKvS7_ii: push rbp push r15 push r14 push r13 push r12 push rbx mov eax, edi mov edi, 20h ; ' ' cdq idiv edi mov edi, eax mov eax, [rsp+30h+arg_0] mov r9d, 4 cdq idiv r9d mov edx, edi sar edx, 1Fh andn edx, edx, edi mov [rsp+30h+var_38], rdx movsxd rdi, edi mov edx, eax sar edx, 1Fh andn eax, edx, eax mov [rsp+30h+var_68], rax mov [rsp+30h+var_48], r8 lea rax, [r8+12h] mov [rsp+30h+var_80], rax mov [rsp+30h+var_70], rcx add rcx, 8 mov [rsp+30h+var_78], rdi imul rax, rdi, 48h ; 'H' mov [rsp+30h+var_88], rax xor edx, edx mov r14, cs:ggml_table_f32_f16_ptr loc_1314B: cmp rdx, [rsp+30h+var_68] jz loc_13297 xor eax, eax loc_13158: cmp rax, 4 jz short loc_13168 and [rsp+rax*4+30h+var_98], 0 inc rax jmp short loc_13158 loc_13168: mov [rsp+30h+var_50], rsi mov [rsp+30h+var_60], rdx mov rax, rdx imul rax, [rsp+30h+var_78] imul rax, 48h ; 'H' add rax, [rsp+30h+var_70] mov [rsp+30h+var_40], rax mov [rsp+30h+var_58], rcx mov r9, [rsp+30h+var_80] xor ebp, ebp loc_13195: cmp rbp, [rsp+30h+var_38] jz loc_1325F imul rdi, rbp, 48h ; 'H' add rdi, [rsp+30h+var_40] imul rax, rbp, 22h ; '"' mov rdx, [rsp+30h+var_48] movzx eax, word ptr [rdx+rax] vmovss xmm0, dword ptr [r14+rax*4] mov r10, rcx mov r13, r9 xor r11d, r11d loc_131C5: cmp r11, 2 jz loc_1324F mov r12, r10 xor eax, eax loc_131D4: cmp rax, 4 jz short loc_1323F xor ebx, ebx xor edx, edx loc_131DE: cmp rbx, 8 jz short loc_1321B movsx r8d, byte ptr [r12+rbx] mov r15d, r8d shl r15b, 4 movsx r15d, r15b and r8d, 0FFFFFFF0h movsx esi, byte ptr [r13+rbx-10h] imul esi, r15d movsx r15d, byte ptr [r13+rbx+0] imul r15d, r8d add r15d, esi sar r15d, 4 add edx, r15d inc rbx jmp short loc_131DE loc_1321B: vcvtsi2ss xmm1, xmm2, edx movzx edx, word ptr [rdi+rax*2] vmulss xmm1, xmm1, dword ptr [r14+rdx*4] vfmadd213ss xmm1, xmm0, [rsp+rax*4+30h+var_98] vmovss [rsp+rax*4+30h+var_98], xmm1 inc rax add r12, 8 jmp short loc_131D4 loc_1323F: inc r11 add r13, 8 add r10, 20h ; ' ' jmp loc_131C5 loc_1324F: inc rbp add r9, 22h ; '"' add rcx, 48h ; 'H' jmp loc_13195 loc_1325F: xor eax, eax mov rsi, [rsp+30h+var_50] mov rcx, [rsp+30h+var_58] mov rdx, [rsp+30h+var_60] loc_13270: cmp rax, 4 jz short loc_13286 vmovss xmm0, [rsp+rax*4+30h+var_98] vmovss dword ptr [rsi+rax*4], xmm0 inc rax jmp short loc_13270 loc_13286: inc rdx add rcx, [rsp+30h+var_88] add rsi, 10h jmp loc_1314B loc_13297: pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ggml::cpu::aarch64::gemv<block_q4_0,8l,4l,(ggml_type)8>( int a1, long long a2, double a3, double a4, __m128 _XMM2, long long a6, long long a7, long long a8, long long a9, int a10) { int v10; // edi long long v11; // rcx long long result; // rax long long v13; // rdx long long i; // rax long long v16; // r9 long long j; // rbp long long v20; // r10 long long v21; // r13 long long k; // r11 long long v23; // r12 long long v25; // rbx int v26; // edx long long v31; // rcx long long v32; // rdx _DWORD v34[4]; // [rsp+0h] [rbp-98h] BYREF long long v35; // [rsp+10h] [rbp-88h] long long v36; // [rsp+18h] [rbp-80h] long long v37; // [rsp+20h] [rbp-78h] long long v38; // [rsp+28h] [rbp-70h] long long v39; // [rsp+30h] [rbp-68h] long long v40; // [rsp+38h] [rbp-60h] long long v41; // [rsp+40h] [rbp-58h] long long v42; // [rsp+48h] [rbp-50h] long long v43; // [rsp+50h] [rbp-48h] long long v44; // [rsp+58h] [rbp-40h] long long v45; // [rsp+60h] [rbp-38h] v10 = a1 / 32; v45 = v10 & (unsigned int)~(v10 >> 31); v39 = (a10 / 4) & (unsigned int)~((a10 / 4) >> 31); v43 = a8; v36 = a8 + 18; v38 = a7; v11 = a7 + 8; v37 = v10; result = 72LL * v10; v35 = result; v13 = 0LL; _R14 = &ggml_table_f32_f16; while ( v13 != v39 ) { for ( i = 0LL; i != 4; ++i ) v34[i] = 0; v42 = a2; v40 = v13; v44 = v38 + 72 * v37 * v13; v41 = v11; v16 = v36; for ( j = 0LL; j != v45; ++j ) { _RAX = *(unsigned __int16 *)(v43 + 34 * j); __asm { vmovss xmm0, dword ptr [r14+rax*4] } v20 = v11; v21 = v16; for ( k = 0LL; k != 2; ++k ) { v23 = v20; for ( _RAX = 0LL; _RAX != 4; ++_RAX ) { v25 = 0LL; v26 = 0; while ( v25 != 8 ) { v26 += (int)((char)(16 * *(_BYTE *)(v23 + v25)) * *(char *)(v21 + v25 - 16) + (*(char *)(v23 + v25) & 0xFFFFFFF0) * *(char *)(v21 + v25)) >> 4; ++v25; } __asm { vcvtsi2ss xmm1, xmm2, edx vmulss xmm1, xmm1, dword ptr [r14+rdx*4] vfmadd213ss xmm1, xmm0, [rsp+rax*4+30h+var_98] vmovss [rsp+rax*4+30h+var_98], xmm1 } v23 += 8LL; } v21 += 8LL; v20 += 32LL; } v16 += 34LL; v11 += 72LL; } result = 0LL; _RSI = v42; v31 = v41; v32 = v40; while ( result != 4 ) { __asm { vmovss xmm0, [rsp+rax*4+30h+var_98] vmovss dword ptr [rsi+rax*4], xmm0 } ++result; } v13 = v32 + 1; v11 = v35 + v31; a2 = _RSI + 16; } return result; }
gemv<block_q4_0,8l,4l,(ggml_type)8>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV EAX,EDI MOV EDI,0x20 CDQ IDIV EDI MOV EDI,EAX MOV EAX,dword ptr [RSP + 0x38] MOV R9D,0x4 CDQ IDIV R9D MOV EDX,EDI SAR EDX,0x1f ANDN EDX,EDX,EDI MOV qword ptr [RSP + -0x8],RDX MOVSXD RDI,EDI MOV EDX,EAX SAR EDX,0x1f ANDN EAX,EDX,EAX MOV qword ptr [RSP + -0x38],RAX MOV qword ptr [RSP + -0x18],R8 LEA RAX,[R8 + 0x12] MOV qword ptr [RSP + -0x50],RAX MOV qword ptr [RSP + -0x40],RCX ADD RCX,0x8 MOV qword ptr [RSP + -0x48],RDI IMUL RAX,RDI,0x48 MOV qword ptr [RSP + -0x58],RAX XOR EDX,EDX MOV R14,qword ptr [0x00156f60] LAB_0011314b: CMP RDX,qword ptr [RSP + -0x38] JZ 0x00113297 XOR EAX,EAX LAB_00113158: CMP RAX,0x4 JZ 0x00113168 AND dword ptr [RSP + RAX*0x4 + -0x68],0x0 INC RAX JMP 0x00113158 LAB_00113168: MOV qword ptr [RSP + -0x20],RSI MOV qword ptr [RSP + -0x30],RDX MOV RAX,RDX IMUL RAX,qword ptr [RSP + -0x48] IMUL RAX,RAX,0x48 ADD RAX,qword ptr [RSP + -0x40] MOV qword ptr [RSP + -0x10],RAX MOV qword ptr [RSP + -0x28],RCX MOV R9,qword ptr [RSP + -0x50] XOR EBP,EBP LAB_00113195: CMP RBP,qword ptr [RSP + -0x8] JZ 0x0011325f IMUL RDI,RBP,0x48 ADD RDI,qword ptr [RSP + -0x10] IMUL RAX,RBP,0x22 MOV RDX,qword ptr [RSP + -0x18] MOVZX EAX,word ptr [RDX + RAX*0x1] VMOVSS XMM0,dword ptr [R14 + RAX*0x4] MOV R10,RCX MOV R13,R9 XOR R11D,R11D LAB_001131c5: CMP R11,0x2 JZ 0x0011324f MOV R12,R10 XOR EAX,EAX LAB_001131d4: CMP RAX,0x4 JZ 0x0011323f XOR EBX,EBX XOR EDX,EDX LAB_001131de: CMP RBX,0x8 JZ 0x0011321b MOVSX R8D,byte ptr [R12 + RBX*0x1] MOV R15D,R8D SHL R15B,0x4 MOVSX R15D,R15B AND R8D,0xfffffff0 MOVSX ESI,byte ptr [R13 + RBX*0x1 + -0x10] IMUL ESI,R15D MOVSX R15D,byte ptr [R13 + RBX*0x1] IMUL R15D,R8D ADD R15D,ESI SAR R15D,0x4 ADD EDX,R15D INC RBX JMP 0x001131de LAB_0011321b: VCVTSI2SS XMM1,XMM2,EDX MOVZX EDX,word ptr [RDI + RAX*0x2] VMULSS XMM1,XMM1,dword ptr [R14 + RDX*0x4] VFMADD213SS XMM1,XMM0,dword ptr [RSP + RAX*0x4 + -0x68] VMOVSS dword ptr [RSP + RAX*0x4 + -0x68],XMM1 INC RAX ADD R12,0x8 JMP 0x001131d4 LAB_0011323f: INC R11 ADD R13,0x8 ADD R10,0x20 JMP 0x001131c5 LAB_0011324f: INC RBP ADD R9,0x22 ADD RCX,0x48 JMP 0x00113195 LAB_0011325f: XOR EAX,EAX MOV RSI,qword ptr [RSP + -0x20] MOV RCX,qword ptr [RSP + -0x28] MOV RDX,qword ptr [RSP + -0x30] LAB_00113270: CMP RAX,0x4 JZ 0x00113286 VMOVSS XMM0,dword ptr [RSP + RAX*0x4 + -0x68] VMOVSS dword ptr [RSI + RAX*0x4],XMM0 INC RAX JMP 0x00113270 LAB_00113286: INC RDX ADD RCX,qword ptr [RSP + -0x58] ADD RSI,0x10 JMP 0x0011314b LAB_00113297: POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* void ggml::cpu::aarch64::gemv<block_q4_0, 8l, 4l, (ggml_type)8>(int, float*, unsigned long, void const*, void const*, int, int) */ void ggml::cpu::aarch64::gemv<block_q4_0,8l,4l,(ggml_type)8> (int param_1,float *param_2,ulong param_3,void *param_4,void *param_5,int param_6, int param_7) { int1 auVar1 [16]; int *puVar2; void *pvVar3; long lVar4; long lVar5; long lVar6; int iVar7; long lVar8; ulong uVar9; uint uVar10; long lVar11; long lVar12; long lVar13; long lVar14; float afStack_98 [4]; long local_88; long local_80; long local_78; void *local_70; ulong local_68; ulong local_60; long local_58; float *local_50; void *local_48; void *local_40; ulong local_38; puVar2 = PTR_ggml_table_f32_f16_00156f60; uVar10 = param_1 / 0x20; local_38 = (ulong)(~((int)uVar10 >> 0x1f) & uVar10); local_68 = (ulong)(uint)(~(param_7 / 4 >> 0x1f) & param_7 / 4); local_48 = param_5; local_80 = (long)param_5 + 0x12; local_70 = param_4; lVar6 = (long)param_4 + 8; local_78 = (long)(int)uVar10; local_88 = (long)(int)uVar10 * 0x48; uVar9 = 0; while (uVar9 != local_68) { for (lVar4 = 0; lVar4 != 4; lVar4 = lVar4 + 1) { afStack_98[lVar4] = 0.0; } local_50 = param_2; local_60 = uVar9; local_40 = (void *)(uVar9 * local_78 * 0x48 + (long)local_70); local_58 = lVar6; lVar4 = local_80; for (uVar9 = 0; pvVar3 = local_40, uVar9 != local_38; uVar9 = uVar9 + 1) { uVar10 = *(uint *)(puVar2 + (ulong)*(ushort *)((long)local_48 + uVar9 * 0x22) * 4); lVar11 = lVar6; lVar14 = lVar4; for (lVar12 = 0; lVar12 != 2; lVar12 = lVar12 + 1) { lVar13 = lVar11; for (lVar5 = 0; lVar5 != 4; lVar5 = lVar5 + 1) { iVar7 = 0; for (lVar8 = 0; lVar8 != 8; lVar8 = lVar8 + 1) { iVar7 = iVar7 + ((int)((int)*(char *)(lVar14 + lVar8) * ((int)*(char *)(lVar13 + lVar8) & 0xfffffff0U) + (int)*(char *)(lVar14 + -0x10 + lVar8) * (int)(char)(*(char *)(lVar13 + lVar8) << 4)) >> 4); } auVar1 = vfmadd213ss_fma(ZEXT416((uint)((float)iVar7 * *(float *)(puVar2 + (ulong)*(ushort *) ((long)pvVar3 + lVar5 * 2 + uVar9 * 0x48) * 4))), ZEXT416(uVar10),ZEXT416((uint)afStack_98[lVar5])); afStack_98[lVar5] = auVar1._0_4_; lVar13 = lVar13 + 8; } lVar14 = lVar14 + 8; lVar11 = lVar11 + 0x20; } lVar4 = lVar4 + 0x22; lVar6 = lVar6 + 0x48; } for (lVar6 = 0; lVar6 != 4; lVar6 = lVar6 + 1) { local_50[lVar6] = afStack_98[lVar6]; } lVar6 = local_58 + local_88; param_2 = local_50 + 4; uVar9 = local_60 + 1; } return; }
55,290
my_pread
eloqsql/mysys/my_pread.c
size_t my_pread(File Filedes, uchar *Buffer, size_t Count, my_off_t offset, myf MyFlags) { size_t readbytes, save_count= 0; DBUG_ENTER("my_pread"); DBUG_PRINT("my",("fd: %d Seek: %llu Buffer: %p Count: %lu MyFlags: %lu", Filedes, (ulonglong)offset, Buffer, (ulong)Count, MyFlags)); if (!(MyFlags & (MY_WME | MY_FAE | MY_FNABP))) MyFlags|= my_global_flags; for (;;) { errno= 0; /* Linux, Windows don't reset this on EOF/success */ #ifdef _WIN32 readbytes= my_win_pread(Filedes, Buffer, Count, offset); #else readbytes= pread(Filedes, Buffer, Count, offset); #endif if (readbytes != Count) { /* We should never read with wrong file descriptor! */ DBUG_ASSERT(readbytes != (size_t)-1 || errno != EBADF); my_errno= errno; if (errno == 0 || (readbytes != (size_t) -1 && (MyFlags & (MY_NABP | MY_FNABP)))) my_errno= HA_ERR_FILE_TOO_SHORT; DBUG_PRINT("warning",("Read only %d bytes off %u from %d, errno: %d", (int) readbytes, (uint) Count,Filedes,my_errno)); if ((readbytes == 0 || readbytes == (size_t) -1) && errno == EINTR) { DBUG_PRINT("debug", ("my_pread() was interrupted and returned %d", (int) readbytes)); continue; /* Interrupted */ } /* Do a read retry if we didn't get enough data on first read */ if (readbytes != (size_t) -1 && readbytes != 0 && (MyFlags & MY_FULL_IO)) { Buffer+= readbytes; Count-= readbytes; save_count+= readbytes; offset+= readbytes; continue; } if (MyFlags & (MY_WME | MY_FAE | MY_FNABP)) { if (readbytes == (size_t) -1) my_error(EE_READ, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))), my_filename(Filedes),my_errno); else if (MyFlags & (MY_NABP | MY_FNABP)) my_error(EE_EOFERR, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))), my_filename(Filedes),my_errno); } if (readbytes == (size_t) -1 || (MyFlags & (MY_FNABP | MY_NABP))) DBUG_RETURN(MY_FILE_ERROR); /* Return with error */ } if (MyFlags & (MY_NABP | MY_FNABP)) readbytes= 0; /* Read went ok; Return 0 */ else readbytes+= save_count; DBUG_RETURN(readbytes); } }
O3
c
my_pread: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rcx, -0x58(%rbp) movq %rdx, -0x38(%rbp) movq %rsi, -0x50(%rbp) movl %edi, -0x2c(%rbp) movq $0x0, -0x40(%rbp) movl $0x0, %r15d testb $0x1a, %r8b jne 0xa01ee leaq 0xb67fdd(%rip), %rax # 0xc081c8 movq (%rax), %r15 orq %r8, %r15 callq 0x297b0 movq %rax, %r14 movq %r15, -0x48(%rbp) movl $0x0, (%r14) movl -0x2c(%rbp), %edi movq -0x50(%rbp), %rsi movq -0x38(%rbp), %rbx movq %rbx, %rdx movq -0x58(%rbp), %rcx callq 0x29650 subq %rax, %rbx je 0xa02e5 movq %rax, %r12 testb $0x6, %r15b sete %r13b movl (%r14), %r15d callq 0xa1672 movl %r15d, (%rax) cmpq $-0x1, %r12 sete %al cmpl $0x0, (%r14) je 0xa024c orb %r13b, %al jne 0xa0257 callq 0xa1672 movl $0xaf, (%rax) leaq 0x1(%r12), %rax cmpq $0x1, %rax ja 0xa026e cmpl $0x4, (%r14) movq -0x48(%rbp), %r15 je 0xa01fd jmp 0xa0296 movq -0x48(%rbp), %r15 btl $0x9, %r15d jae 0xa028e addq %r12, -0x50(%rbp) addq %r12, -0x40(%rbp) addq %r12, -0x58(%rbp) movq %rbx, -0x38(%rbp) jmp 0xa01fd movq $0x0, -0x40(%rbp) testb $0x1a, %r15b je 0xa02cc cmpq $-0x1, %r12 je 0xa02f9 testb $0x6, %r15b je 0xa02cc andl $0x440, %r15d # imm = 0x440 orq $0x4, %r15 movl -0x2c(%rbp), %edi callq 0xa8b50 movq %rax, %rbx callq 0xa1672 movl (%rax), %ecx movl $0x9, %edi jmp 0xa031b movq $-0x1, %rax cmpq $-0x1, %r12 je 0xa032f movl %r15d, %ecx movq %r12, -0x38(%rbp) andl $0x6, %ecx jne 0xa032f movq -0x40(%rbp), %rcx addq -0x38(%rbp), %rcx xorl %eax, %eax testb $0x6, %r15b cmoveq %rcx, %rax jmp 0xa032f andl $0x440, %r15d # imm = 0x440 orq $0x4, %r15 movl -0x2c(%rbp), %edi callq 0xa8b50 movq %rax, %rbx callq 0xa1672 movl (%rax), %ecx movl $0x2, %edi movq %r15, %rsi movq %rbx, %rdx xorl %eax, %eax callq 0x9dd27 movq $-0x1, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_pread: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov [rbp+var_58], rcx mov [rbp+var_38], rdx mov [rbp+var_50], rsi mov [rbp+var_2C], edi mov [rbp+var_40], 0 mov r15d, 0 test r8b, 1Ah jnz short loc_A01EE lea rax, my_global_flags mov r15, [rax] loc_A01EE: or r15, r8 call ___errno_location mov r14, rax mov [rbp+var_48], r15 loc_A01FD: mov dword ptr [r14], 0 mov edi, [rbp+var_2C] mov rsi, [rbp+var_50] mov rbx, [rbp+var_38] mov rdx, rbx mov rcx, [rbp+var_58] call _pread64 sub rbx, rax jz loc_A02E5 mov r12, rax test r15b, 6 setz r13b mov r15d, [r14] call _my_thread_var mov [rax], r15d cmp r12, 0FFFFFFFFFFFFFFFFh setz al cmp dword ptr [r14], 0 jz short loc_A024C or al, r13b jnz short loc_A0257 loc_A024C: call _my_thread_var mov dword ptr [rax], 0AFh loc_A0257: lea rax, [r12+1] cmp rax, 1 ja short loc_A026E cmp dword ptr [r14], 4 mov r15, [rbp+var_48] jz short loc_A01FD jmp short loc_A0296 loc_A026E: mov r15, [rbp+var_48] bt r15d, 9 jnb short loc_A028E add [rbp+var_50], r12 add [rbp+var_40], r12 add [rbp+var_58], r12 mov [rbp+var_38], rbx jmp loc_A01FD loc_A028E: mov [rbp+var_40], 0 loc_A0296: test r15b, 1Ah jz short loc_A02CC cmp r12, 0FFFFFFFFFFFFFFFFh jz short loc_A02F9 test r15b, 6 jz short loc_A02CC and r15d, 440h or r15, 4 mov edi, [rbp+var_2C] call my_filename mov rbx, rax call _my_thread_var mov ecx, [rax] mov edi, 9 jmp short loc_A031B loc_A02CC: mov rax, 0FFFFFFFFFFFFFFFFh cmp r12, 0FFFFFFFFFFFFFFFFh jz short loc_A032F mov ecx, r15d mov [rbp+var_38], r12 and ecx, 6 jnz short loc_A032F loc_A02E5: mov rcx, [rbp+var_40] add rcx, [rbp+var_38] xor eax, eax test r15b, 6 cmovz rax, rcx jmp short loc_A032F loc_A02F9: and r15d, 440h or r15, 4 mov edi, [rbp+var_2C] call my_filename mov rbx, rax call _my_thread_var mov ecx, [rax] mov edi, 2 loc_A031B: mov rsi, r15 mov rdx, rbx xor eax, eax call my_error mov rax, 0FFFFFFFFFFFFFFFFh loc_A032F: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_pread(long long a1, const char *a2, long long a3, long long a4, __int16 a5) { __int16 v5; // r15 __int16 v6; // r15 int *v7; // r14 long long v8; // rax long long v9; // rbx long long v10; // r12 bool v11; // r13 int v12; // r15d long long v13; // r15 long long v14; // rbx long long v15; // rcx unsigned int v16; // edi long long result; // rax __int16 v20; // [rsp+18h] [rbp-48h] long long v21; // [rsp+20h] [rbp-40h] v21 = 0LL; v5 = 0; if ( (a5 & 0x1A) == 0 ) v5 = my_global_flags; v6 = a5 | v5; v7 = (int *)__errno_location(a1); v20 = v6; while ( 1 ) { while ( 1 ) { *v7 = 0; v8 = pread64((unsigned int)a1, a2, a3, a4); v9 = a3 - v8; if ( a3 == v8 ) goto LABEL_20; v10 = v8; v11 = (v6 & 6) == 0; v12 = *v7; *(_DWORD *)my_thread_var((unsigned int)a1, a2) = v12; if ( !*v7 || !v11 && v10 != -1 ) *(_DWORD *)my_thread_var((unsigned int)a1, a2) = 175; if ( (unsigned long long)(v10 + 1) > 1 ) break; v6 = v20; if ( *v7 != 4 ) goto LABEL_14; } v6 = v20; if ( (v20 & 0x200) == 0 ) break; a2 += v10; v21 += v10; a4 += v10; a3 = v9; } v21 = 0LL; LABEL_14: if ( (v6 & 0x1A) != 0 ) { if ( v10 == -1 ) { v13 = v6 & 0x440 | 4LL; v14 = my_filename((unsigned int)a1); v15 = *(unsigned int *)my_thread_var((unsigned int)a1, a2); v16 = 2; goto LABEL_24; } if ( (v6 & 6) != 0 ) { v13 = v6 & 0x440 | 4LL; v14 = my_filename((unsigned int)a1); v15 = *(unsigned int *)my_thread_var((unsigned int)a1, a2); v16 = 9; LABEL_24: my_error(v16, v13, v14, v15); return -1LL; } } result = -1LL; if ( v10 != -1 ) { a3 = v10; if ( (v6 & 6) == 0 ) { LABEL_20: result = 0LL; if ( (v6 & 6) == 0 ) return a3 + v21; } } return result; }
my_pread: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV qword ptr [RBP + -0x58],RCX MOV qword ptr [RBP + -0x38],RDX MOV qword ptr [RBP + -0x50],RSI MOV dword ptr [RBP + -0x2c],EDI MOV qword ptr [RBP + -0x40],0x0 MOV R15D,0x0 TEST R8B,0x1a JNZ 0x001a01ee LEA RAX,[0xd081c8] MOV R15,qword ptr [RAX] LAB_001a01ee: OR R15,R8 CALL 0x001297b0 MOV R14,RAX MOV qword ptr [RBP + -0x48],R15 LAB_001a01fd: MOV dword ptr [R14],0x0 MOV EDI,dword ptr [RBP + -0x2c] MOV RSI,qword ptr [RBP + -0x50] MOV RBX,qword ptr [RBP + -0x38] MOV RDX,RBX MOV RCX,qword ptr [RBP + -0x58] CALL 0x00129650 SUB RBX,RAX JZ 0x001a02e5 MOV R12,RAX TEST R15B,0x6 SETZ R13B MOV R15D,dword ptr [R14] CALL 0x001a1672 MOV dword ptr [RAX],R15D CMP R12,-0x1 SETZ AL CMP dword ptr [R14],0x0 JZ 0x001a024c OR AL,R13B JNZ 0x001a0257 LAB_001a024c: CALL 0x001a1672 MOV dword ptr [RAX],0xaf LAB_001a0257: LEA RAX,[R12 + 0x1] CMP RAX,0x1 JA 0x001a026e CMP dword ptr [R14],0x4 MOV R15,qword ptr [RBP + -0x48] JZ 0x001a01fd JMP 0x001a0296 LAB_001a026e: MOV R15,qword ptr [RBP + -0x48] BT R15D,0x9 JNC 0x001a028e ADD qword ptr [RBP + -0x50],R12 ADD qword ptr [RBP + -0x40],R12 ADD qword ptr [RBP + -0x58],R12 MOV qword ptr [RBP + -0x38],RBX JMP 0x001a01fd LAB_001a028e: MOV qword ptr [RBP + -0x40],0x0 LAB_001a0296: TEST R15B,0x1a JZ 0x001a02cc CMP R12,-0x1 JZ 0x001a02f9 TEST R15B,0x6 JZ 0x001a02cc AND R15D,0x440 OR R15,0x4 MOV EDI,dword ptr [RBP + -0x2c] CALL 0x001a8b50 MOV RBX,RAX CALL 0x001a1672 MOV ECX,dword ptr [RAX] MOV EDI,0x9 JMP 0x001a031b LAB_001a02cc: MOV RAX,-0x1 CMP R12,-0x1 JZ 0x001a032f MOV ECX,R15D MOV qword ptr [RBP + -0x38],R12 AND ECX,0x6 JNZ 0x001a032f LAB_001a02e5: MOV RCX,qword ptr [RBP + -0x40] ADD RCX,qword ptr [RBP + -0x38] XOR EAX,EAX TEST R15B,0x6 CMOVZ RAX,RCX JMP 0x001a032f LAB_001a02f9: AND R15D,0x440 OR R15,0x4 MOV EDI,dword ptr [RBP + -0x2c] CALL 0x001a8b50 MOV RBX,RAX CALL 0x001a1672 MOV ECX,dword ptr [RAX] MOV EDI,0x2 LAB_001a031b: MOV RSI,R15 MOV RDX,RBX XOR EAX,EAX CALL 0x0019dd27 MOV RAX,-0x1 LAB_001a032f: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_pread(int param_1,void *param_2,size_t param_3,long param_4,ulong param_5) { int iVar1; int4 uVar2; int *piVar3; size_t sVar4; int *piVar5; int4 *puVar6; int8 uVar7; long lVar8; int8 uVar9; ulong uVar10; long local_60; void *local_58; long local_48; size_t local_40; local_48 = 0; uVar10 = 0; if ((param_5 & 0x1a) == 0) { uVar10 = my_global_flags; } uVar10 = uVar10 | param_5; piVar3 = __errno_location(); local_60 = param_4; local_58 = param_2; local_40 = param_3; do { while( true ) { *piVar3 = 0; sVar4 = pread64(param_1,local_58,local_40,local_60); if (local_40 - sVar4 == 0) goto LAB_001a02e5; iVar1 = *piVar3; piVar5 = (int *)_my_thread_var(); *piVar5 = iVar1; if ((*piVar3 == 0) || (sVar4 != 0xffffffffffffffff && (uVar10 & 6) != 0)) { puVar6 = (int4 *)_my_thread_var(); *puVar6 = 0xaf; } if (sVar4 + 1 < 2) break; if (((uint)uVar10 >> 9 & 1) == 0) { local_48 = 0; goto LAB_001a0296; } local_58 = (void *)((long)local_58 + sVar4); local_48 = local_48 + sVar4; local_60 = local_60 + sVar4; local_40 = local_40 - sVar4; } } while (*piVar3 == 4); LAB_001a0296: if ((uVar10 & 0x1a) == 0) { LAB_001a02cc: lVar8 = -1; if ((sVar4 != 0xffffffffffffffff) && (local_40 = sVar4, (uVar10 & 6) == 0)) { LAB_001a02e5: lVar8 = 0; if ((uVar10 & 6) == 0) { lVar8 = local_48 + local_40; } } } else { if (sVar4 == 0xffffffffffffffff) { uVar7 = my_filename(param_1); puVar6 = (int4 *)_my_thread_var(); uVar2 = *puVar6; uVar9 = 2; } else { if ((uVar10 & 6) == 0) goto LAB_001a02cc; uVar7 = my_filename(param_1); puVar6 = (int4 *)_my_thread_var(); uVar2 = *puVar6; uVar9 = 9; } my_error(uVar9,(uint)uVar10 & 0x440 | 4,uVar7,uVar2); lVar8 = -1; } return lVar8; }
55,291
tree_record_pos
eloqsql/mysys/tree.c
ha_rows tree_record_pos(TREE *tree, const void *key, enum ha_rkey_function flag, void *custom_arg) { int cmp; TREE_ELEMENT *element= tree->root; double left= 1; double right= tree->elements_in_tree; while (element != &null_element) { if ((cmp= (*tree->compare)(custom_arg, ELEMENT_KEY(tree, element), key)) == 0) { switch (flag) { case HA_READ_KEY_EXACT: case HA_READ_BEFORE_KEY: cmp= 1; break; case HA_READ_AFTER_KEY: cmp= -1; break; default: return HA_POS_ERROR; } } if (cmp < 0) /* element < key */ { element= element->right; left= (left + right) / 2; } else { element= element->left; right= (left + right) / 2; } } switch (flag) { case HA_READ_KEY_EXACT: case HA_READ_BEFORE_KEY: return (ha_rows) right; case HA_READ_AFTER_KEY: return (ha_rows) left; default: return HA_POS_ERROR; } }
O3
c
tree_record_pos: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %edx, %ebx movl 0x20c(%rdi), %eax cvtsi2sd %rax, %xmm0 movapd %xmm0, -0x50(%rbp) movq (%rdi), %r13 leaq 0x2d1678(%rip), %rax # 0x333a10 cmpq %rax, %r13 je 0x62455 movq %rcx, %r14 movq %rdi, %r15 movq %rsi, %r12 movsd 0x31cb6(%rip), %xmm0 # 0x94068 movapd %xmm0, -0x40(%rbp) movl 0x208(%r15), %esi testq %rsi, %rsi je 0x623c8 addq %r13, %rsi jmp 0x623cc movq 0x18(%r13), %rsi movq %r14, %rdi movq %r12, %rdx callq *0x228(%r15) testl %eax, %eax je 0x62415 movapd -0x40(%rbp), %xmm0 addsd -0x50(%rbp), %xmm0 mulsd 0x31c69(%rip), %xmm0 # 0x94058 testl %eax, %eax js 0x623fa movapd %xmm0, -0x50(%rbp) jmp 0x623ff movapd %xmm0, -0x40(%rbp) shrl $0x1f, %eax movq (%r13,%rax,8), %r13 leaq 0x2d1602(%rip), %rax # 0x333a10 cmpq %rax, %r13 jne 0x623b7 jmp 0x6242f movl $0x1, %eax testl %ebx, %ebx je 0x623dd cmpl $0x4, %ebx je 0x623dd cmpl $0x3, %ebx jne 0x624a2 movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x623dd movapd -0x40(%rbp), %xmm0 cvttsd2si %xmm0, %rcx movq %rcx, %rdx sarq $0x3f, %rdx subsd 0x31c00(%rip), %xmm0 # 0x94048 cvttsd2si %xmm0, %rax andq %rdx, %rax orq %rcx, %rax jmp 0x6245a movl $0x1, %eax cmpl $0x4, %ebx je 0x6246f cmpl $0x3, %ebx je 0x62493 movq $-0x1, %rax testl %ebx, %ebx jne 0x62493 movapd -0x50(%rbp), %xmm0 cvttsd2si %xmm0, %rcx movq %rcx, %rdx sarq $0x3f, %rdx subsd 0x31bc0(%rip), %xmm0 # 0x94048 cvttsd2si %xmm0, %rax andq %rdx, %rax orq %rcx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq $-0x1, %rax jmp 0x62493
tree_record_pos: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov ebx, edx mov eax, [rdi+20Ch] cvtsi2sd xmm0, rax movapd [rbp+var_50], xmm0 mov r13, [rdi] lea rax, null_element cmp r13, rax jz loc_62455 mov r14, rcx mov r15, rdi mov r12, rsi movsd xmm0, cs:qword_94068 movapd [rbp+var_40], xmm0 loc_623B7: mov esi, [r15+208h] test rsi, rsi jz short loc_623C8 add rsi, r13 jmp short loc_623CC loc_623C8: mov rsi, [r13+18h] loc_623CC: mov rdi, r14 mov rdx, r12 call qword ptr [r15+228h] test eax, eax jz short loc_62415 loc_623DD: movapd xmm0, [rbp+var_40] addsd xmm0, qword ptr [rbp+var_50] mulsd xmm0, cs:qword_94058 test eax, eax js short loc_623FA movapd [rbp+var_50], xmm0 jmp short loc_623FF loc_623FA: movapd [rbp+var_40], xmm0 loc_623FF: shr eax, 1Fh mov r13, [r13+rax*8+0] lea rax, null_element cmp r13, rax jnz short loc_623B7 jmp short loc_6242F loc_62415: mov eax, 1 test ebx, ebx jz short loc_623DD cmp ebx, 4 jz short loc_623DD cmp ebx, 3 jnz short loc_624A2 mov eax, 0FFFFFFFFh jmp short loc_623DD loc_6242F: movapd xmm0, [rbp+var_40] cvttsd2si rcx, xmm0 mov rdx, rcx sar rdx, 3Fh subsd xmm0, cs:qword_94048 cvttsd2si rax, xmm0 and rax, rdx or rax, rcx jmp short loc_6245A loc_62455: mov eax, 1 loc_6245A: cmp ebx, 4 jz short loc_6246F cmp ebx, 3 jz short loc_62493 mov rax, 0FFFFFFFFFFFFFFFFh test ebx, ebx jnz short loc_62493 loc_6246F: movapd xmm0, [rbp+var_50] cvttsd2si rcx, xmm0 mov rdx, rcx sar rdx, 3Fh subsd xmm0, cs:qword_94048 cvttsd2si rax, xmm0 and rax, rdx or rax, rcx loc_62493: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_624A2: mov rax, 0FFFFFFFFFFFFFFFFh jmp short loc_62493
long long tree_record_pos(long long a1, long long a2, int a3, long long a4) { _QWORD *v5; // r13 char *v8; // rsi int v9; // eax __int128 v10; // xmm0 long long result; // rax double v12; // [rsp+0h] [rbp-50h] __int128 v13; // [rsp+10h] [rbp-40h] v12 = (double)*(int *)(a1 + 524); v5 = *(_QWORD **)a1; if ( *(_UNKNOWN **)a1 != &null_element ) { v13 = 0x3FF0000000000000uLL; while ( 1 ) { if ( *(_DWORD *)(a1 + 520) ) v8 = (char *)v5 + *(unsigned int *)(a1 + 520); else v8 = (char *)v5[3]; v9 = (*(long long ( **)(long long, char *, long long))(a1 + 552))(a4, v8, a2); if ( !v9 ) { v9 = 1; if ( a3 ) { if ( a3 != 4 ) { if ( a3 != 3 ) return -1LL; v9 = -1; } } } *((_QWORD *)&v10 + 1) = *((_QWORD *)&v13 + 1); if ( v9 < 0 ) { *(double *)&v10 = (*(double *)&v13 + v12) * 0.5; v13 = v10; } else { v12 = (*(double *)&v13 + v12) * 0.5; } v5 = (_QWORD *)v5[(unsigned int)v9 >> 31]; if ( v5 == (_QWORD *)&null_element ) { result = (unsigned int)(int)*(double *)&v13; goto LABEL_17; } } } result = 1LL; LABEL_17: if ( a3 == 4 ) return (unsigned int)(int)v12; if ( a3 != 3 ) { result = -1LL; if ( !a3 ) return (unsigned int)(int)v12; } return result; }
tree_record_pos: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV EBX,EDX MOV EAX,dword ptr [RDI + 0x20c] CVTSI2SD XMM0,RAX MOVAPD xmmword ptr [RBP + -0x50],XMM0 MOV R13,qword ptr [RDI] LEA RAX,[0x433a10] CMP R13,RAX JZ 0x00162455 MOV R14,RCX MOV R15,RDI MOV R12,RSI MOVSD XMM0,qword ptr [0x00194068] MOVAPD xmmword ptr [RBP + -0x40],XMM0 LAB_001623b7: MOV ESI,dword ptr [R15 + 0x208] TEST RSI,RSI JZ 0x001623c8 ADD RSI,R13 JMP 0x001623cc LAB_001623c8: MOV RSI,qword ptr [R13 + 0x18] LAB_001623cc: MOV RDI,R14 MOV RDX,R12 CALL qword ptr [R15 + 0x228] TEST EAX,EAX JZ 0x00162415 LAB_001623dd: MOVAPD XMM0,xmmword ptr [RBP + -0x40] ADDSD XMM0,qword ptr [RBP + -0x50] MULSD XMM0,qword ptr [0x00194058] TEST EAX,EAX JS 0x001623fa MOVAPD xmmword ptr [RBP + -0x50],XMM0 JMP 0x001623ff LAB_001623fa: MOVAPD xmmword ptr [RBP + -0x40],XMM0 LAB_001623ff: SHR EAX,0x1f MOV R13,qword ptr [R13 + RAX*0x8] LEA RAX,[0x433a10] CMP R13,RAX JNZ 0x001623b7 JMP 0x0016242f LAB_00162415: MOV EAX,0x1 TEST EBX,EBX JZ 0x001623dd CMP EBX,0x4 JZ 0x001623dd CMP EBX,0x3 JNZ 0x001624a2 MOV EAX,0xffffffff JMP 0x001623dd LAB_0016242f: MOVAPD XMM0,xmmword ptr [RBP + -0x40] CVTTSD2SI RCX,XMM0 MOV RDX,RCX SAR RDX,0x3f SUBSD XMM0,qword ptr [0x00194048] CVTTSD2SI RAX,XMM0 AND RAX,RDX OR RAX,RCX JMP 0x0016245a LAB_00162455: MOV EAX,0x1 LAB_0016245a: CMP EBX,0x4 JZ 0x0016246f CMP EBX,0x3 JZ 0x00162493 MOV RAX,-0x1 TEST EBX,EBX JNZ 0x00162493 LAB_0016246f: MOVAPD XMM0,xmmword ptr [RBP + -0x50] CVTTSD2SI RCX,XMM0 MOV RDX,RCX SAR RDX,0x3f SUBSD XMM0,qword ptr [0x00194048] CVTTSD2SI RAX,XMM0 AND RAX,RDX OR RAX,RCX LAB_00162493: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001624a2: MOV RAX,-0x1 JMP 0x00162493
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ ulong tree_record_pos(long *param_1,int8 param_2,int param_3,int8 param_4) { uint uVar1; ulong uVar2; int1 *puVar3; int1 *puVar4; double dVar5; double local_58; double local_48; local_58 = (double)*(uint *)((long)param_1 + 0x20c); puVar4 = (int1 *)*param_1; if (puVar4 == null_element) { uVar2 = 1; } else { local_48 = DAT_00194068; do { if ((ulong)*(uint *)(param_1 + 0x41) == 0) { puVar3 = *(int1 **)(puVar4 + 0x18); } else { puVar3 = puVar4 + *(uint *)(param_1 + 0x41); } uVar1 = (*(code *)param_1[0x45])(param_4,puVar3,param_2); if (((uVar1 == 0) && (uVar1 = 1, param_3 != 0)) && (param_3 != 4)) { if (param_3 != 3) { return 0xffffffffffffffff; } uVar1 = 0xffffffff; } dVar5 = (local_48 + local_58) * DAT_00194058; if (-1 < (int)uVar1) { local_58 = dVar5; dVar5 = local_48; } local_48 = dVar5; puVar4 = *(int1 **)(puVar4 + (ulong)(uVar1 >> 0x1f) * 8); } while (puVar4 != null_element); uVar2 = (long)(local_48 - _DAT_00194048) & (long)local_48 >> 0x3f | (long)local_48; } if ((param_3 == 4) || ((param_3 != 3 && (uVar2 = 0xffffffffffffffff, param_3 == 0)))) { uVar2 = (long)(local_58 - _DAT_00194048) & (long)local_58 >> 0x3f | (long)local_58; } return uVar2; }
55,292
stbi__extend_receive
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h
stbi_inline static int stbi__extend_receive(stbi__jpeg *j, int n) { unsigned int k; int sgn; if (j->code_bits < n) stbi__grow_buffer_unsafe(j); if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing sgn = j->code_buffer >> 31; // sign bit always in MSB; 0 if MSB clear (positive), 1 if MSB set (negative) k = stbi_lrot(j->code_buffer, n); j->code_buffer = k & ~stbi__bmask[n]; k &= stbi__bmask[n]; j->code_bits -= n; return k + (stbi__jbias[n] & (sgn - 1)); }
O0
c
stbi__extend_receive: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq -0x10(%rbp), %rax movl 0x4824(%rax), %eax cmpl -0x14(%rbp), %eax jge 0x2ac17 movq -0x10(%rbp), %rdi callq 0x2a1a0 movq -0x10(%rbp), %rax movl 0x4824(%rax), %eax cmpl -0x14(%rbp), %eax jge 0x2ac32 movl $0x0, -0x4(%rbp) jmp 0x2acd3 movq -0x10(%rbp), %rax movl 0x4820(%rax), %eax shrl $0x1f, %eax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rax movl 0x4820(%rax), %eax movl -0x14(%rbp), %ecx shll %cl, %eax movq -0x10(%rbp), %rcx movl 0x4820(%rcx), %edx xorl %ecx, %ecx subl -0x14(%rbp), %ecx andl $0x1f, %ecx shrl %cl, %edx movl %edx, %ecx orl %ecx, %eax movl %eax, -0x18(%rbp) movl -0x18(%rbp), %ecx movslq -0x14(%rbp), %rdx leaq 0x119d6(%rip), %rax # 0x3c650 movl (%rax,%rdx,4), %eax xorl $-0x1, %eax andl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x4820(%rax) movslq -0x14(%rbp), %rcx leaq 0x119b9(%rip), %rax # 0x3c650 movl (%rax,%rcx,4), %eax andl -0x18(%rbp), %eax movl %eax, -0x18(%rbp) movl -0x14(%rbp), %edx movq -0x10(%rbp), %rax movl 0x4824(%rax), %ecx subl %edx, %ecx movl %ecx, 0x4824(%rax) movl -0x18(%rbp), %eax movslq -0x14(%rbp), %rdx leaq 0x119dd(%rip), %rcx # 0x3c6a0 movl (%rcx,%rdx,4), %ecx movl -0x1c(%rbp), %edx subl $0x1, %edx andl %edx, %ecx addl %ecx, %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopl (%rax)
stbi__extend_receive: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov rax, [rbp+var_10] mov eax, [rax+4824h] cmp eax, [rbp+var_14] jge short loc_2AC17 mov rdi, [rbp+var_10] call stbi__grow_buffer_unsafe loc_2AC17: mov rax, [rbp+var_10] mov eax, [rax+4824h] cmp eax, [rbp+var_14] jge short loc_2AC32 mov [rbp+var_4], 0 jmp loc_2ACD3 loc_2AC32: mov rax, [rbp+var_10] mov eax, [rax+4820h] shr eax, 1Fh mov [rbp+var_1C], eax mov rax, [rbp+var_10] mov eax, [rax+4820h] mov ecx, [rbp+var_14] shl eax, cl mov rcx, [rbp+var_10] mov edx, [rcx+4820h] xor ecx, ecx sub ecx, [rbp+var_14] and ecx, 1Fh shr edx, cl mov ecx, edx or eax, ecx mov [rbp+var_18], eax mov ecx, [rbp+var_18] movsxd rdx, [rbp+var_14] lea rax, stbi__bmask mov eax, [rax+rdx*4] xor eax, 0FFFFFFFFh and ecx, eax mov rax, [rbp+var_10] mov [rax+4820h], ecx movsxd rcx, [rbp+var_14] lea rax, stbi__bmask mov eax, [rax+rcx*4] and eax, [rbp+var_18] mov [rbp+var_18], eax mov edx, [rbp+var_14] mov rax, [rbp+var_10] mov ecx, [rax+4824h] sub ecx, edx mov [rax+4824h], ecx mov eax, [rbp+var_18] movsxd rdx, [rbp+var_14] lea rcx, stbi__jbias mov ecx, [rcx+rdx*4] mov edx, [rbp+var_1C] sub edx, 1 and ecx, edx add eax, ecx mov [rbp+var_4], eax loc_2ACD3: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long stbi__extend_receive(long long a1, int a2) { int v3; // [rsp+4h] [rbp-1Ch] int v4; // [rsp+8h] [rbp-18h] int v5; // [rsp+8h] [rbp-18h] if ( *(_DWORD *)(a1 + 18468) < a2 ) stbi__grow_buffer_unsafe(a1); if ( *(_DWORD *)(a1 + 18468) >= a2 ) { v3 = *(_DWORD *)(a1 + 18464) >> 31; v4 = (*(_DWORD *)(a1 + 18464) >> (-(char)a2 & 0x1F)) | (*(_DWORD *)(a1 + 18464) << a2); *(_DWORD *)(a1 + 18464) = ~stbi__bmask[a2] & v4; v5 = v4 & stbi__bmask[a2]; *(_DWORD *)(a1 + 18468) -= a2; return (unsigned int)(((v3 - 1) & stbi__jbias[a2]) + v5); } else { return 0; } }
stbi__extend_receive: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x4824] CMP EAX,dword ptr [RBP + -0x14] JGE 0x0012ac17 MOV RDI,qword ptr [RBP + -0x10] CALL 0x0012a1a0 LAB_0012ac17: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x4824] CMP EAX,dword ptr [RBP + -0x14] JGE 0x0012ac32 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0012acd3 LAB_0012ac32: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x4820] SHR EAX,0x1f MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x4820] MOV ECX,dword ptr [RBP + -0x14] SHL EAX,CL MOV RCX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RCX + 0x4820] XOR ECX,ECX SUB ECX,dword ptr [RBP + -0x14] AND ECX,0x1f SHR EDX,CL MOV ECX,EDX OR EAX,ECX MOV dword ptr [RBP + -0x18],EAX MOV ECX,dword ptr [RBP + -0x18] MOVSXD RDX,dword ptr [RBP + -0x14] LEA RAX,[0x13c650] MOV EAX,dword ptr [RAX + RDX*0x4] XOR EAX,0xffffffff AND ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4820],ECX MOVSXD RCX,dword ptr [RBP + -0x14] LEA RAX,[0x13c650] MOV EAX,dword ptr [RAX + RCX*0x4] AND EAX,dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x18],EAX MOV EDX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x4824] SUB ECX,EDX MOV dword ptr [RAX + 0x4824],ECX MOV EAX,dword ptr [RBP + -0x18] MOVSXD RDX,dword ptr [RBP + -0x14] LEA RCX,[0x13c6a0] MOV ECX,dword ptr [RCX + RDX*0x4] MOV EDX,dword ptr [RBP + -0x1c] SUB EDX,0x1 AND ECX,EDX ADD EAX,ECX MOV dword ptr [RBP + -0x4],EAX LAB_0012acd3: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int stbi__extend_receive(long param_1,int param_2) { int iVar1; uint uVar2; uint uVar3; int local_c; if (*(int *)(param_1 + 0x4824) < param_2) { stbi__grow_buffer_unsafe(param_1); } if (*(int *)(param_1 + 0x4824) < param_2) { local_c = 0; } else { iVar1 = *(int *)(param_1 + 0x4820); uVar3 = *(int *)(param_1 + 0x4820) << ((byte)param_2 & 0x1f) | *(uint *)(param_1 + 0x4820) >> (-(byte)param_2 & 0x1f); *(uint *)(param_1 + 0x4820) = uVar3 & (*(uint *)(stbi__bmask + (long)param_2 * 4) ^ 0xffffffff); uVar2 = *(uint *)(stbi__bmask + (long)param_2 * 4); *(int *)(param_1 + 0x4824) = *(int *)(param_1 + 0x4824) - param_2; local_c = (uVar2 & uVar3) + (*(uint *)(stbi__jbias + (long)param_2 * 4) & 0xffffffffU - (iVar1 >> 0x1f)); } return local_c; }
55,293
stbi__extend_receive
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h
stbi_inline static int stbi__extend_receive(stbi__jpeg *j, int n) { unsigned int k; int sgn; if (j->code_bits < n) stbi__grow_buffer_unsafe(j); if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing sgn = j->code_buffer >> 31; // sign bit always in MSB; 0 if MSB clear (positive), 1 if MSB set (negative) k = stbi_lrot(j->code_buffer, n); j->code_buffer = k & ~stbi__bmask[n]; k &= stbi__bmask[n]; j->code_bits -= n; return k + (stbi__jbias[n] & (sgn - 1)); }
O1
c
stbi__extend_receive: pushq %rbp pushq %rbx pushq %rax movl %esi, %ebp movq %rdi, %rbx cmpl %esi, 0x4824(%rdi) jge 0x18e99 movq %rbx, %rdi callq 0x18b47 movl 0x4824(%rbx), %esi xorl %eax, %eax subl %ebp, %esi jl 0x18ee7 movl 0x4820(%rbx), %edi movl %edi, %edx movl %ebp, %ecx roll %cl, %edx movl %ebp, %ecx leaq 0xb7c6(%rip), %rax # 0x24680 movl (%rax,%rcx,4), %eax movl %eax, %r8d notl %r8d andl %edx, %r8d movl %r8d, 0x4820(%rbx) andl %eax, %edx movl %esi, 0x4824(%rbx) xorl %eax, %eax testl %edi, %edi js 0x18ee5 leaq 0xb7ee(%rip), %rax # 0x246d0 movl (%rax,%rcx,4), %eax addl %edx, %eax addq $0x8, %rsp popq %rbx popq %rbp retq
stbi__extend_receive: push rbp push rbx push rax mov ebp, esi mov rbx, rdi cmp [rdi+4824h], esi jge short loc_18E99 mov rdi, rbx call stbi__grow_buffer_unsafe loc_18E99: mov esi, [rbx+4824h] xor eax, eax sub esi, ebp jl short loc_18EE7 mov edi, [rbx+4820h] mov edx, edi mov ecx, ebp rol edx, cl mov ecx, ebp lea rax, stbi__bmask mov eax, [rax+rcx*4] mov r8d, eax not r8d and r8d, edx mov [rbx+4820h], r8d and edx, eax mov [rbx+4824h], esi xor eax, eax test edi, edi js short loc_18EE5 lea rax, stbi__jbias mov eax, [rax+rcx*4] loc_18EE5: add eax, edx loc_18EE7: add rsp, 8 pop rbx pop rbp retn
long long stbi__extend_receive(long long a1, int a2) { int v4; // esi long long result; // rax bool v6; // cc int v7; // esi int v8; // edi int v9; // edx int v10; // eax int v11; // edx int v12; // eax if ( *(_DWORD *)(a1 + 18468) < a2 ) stbi__grow_buffer_unsafe(a1); v4 = *(_DWORD *)(a1 + 18468); result = 0LL; v6 = v4 < a2; v7 = v4 - a2; if ( !v6 ) { v8 = *(_DWORD *)(a1 + 18464); v9 = __ROL4__(*(_DWORD *)(a1 + 18464), a2); v10 = stbi__bmask[a2]; *(_DWORD *)(a1 + 18464) = v9 & ~v10; v11 = v10 & v9; *(_DWORD *)(a1 + 18468) = v7; v12 = 0; if ( v8 >= 0 ) v12 = stbi__jbias[a2]; return (unsigned int)(v11 + v12); } return result; }
stbi__extend_receive: PUSH RBP PUSH RBX PUSH RAX MOV EBP,ESI MOV RBX,RDI CMP dword ptr [RDI + 0x4824],ESI JGE 0x00118e99 MOV RDI,RBX CALL 0x00118b47 LAB_00118e99: MOV ESI,dword ptr [RBX + 0x4824] XOR EAX,EAX SUB ESI,EBP JL 0x00118ee7 MOV EDI,dword ptr [RBX + 0x4820] MOV EDX,EDI MOV ECX,EBP ROL EDX,CL MOV ECX,EBP LEA RAX,[0x124680] MOV EAX,dword ptr [RAX + RCX*0x4] MOV R8D,EAX NOT R8D AND R8D,EDX MOV dword ptr [RBX + 0x4820],R8D AND EDX,EAX MOV dword ptr [RBX + 0x4824],ESI XOR EAX,EAX TEST EDI,EDI JS 0x00118ee5 LEA RAX,[0x1246d0] MOV EAX,dword ptr [RAX + RCX*0x4] LAB_00118ee5: ADD EAX,EDX LAB_00118ee7: ADD RSP,0x8 POP RBX POP RBP RET
int stbi__extend_receive(long param_1,uint param_2) { uint uVar1; uint uVar2; byte bVar3; int iVar4; uint uVar5; if (*(int *)(param_1 + 0x4824) < (int)param_2) { stbi__grow_buffer_unsafe(param_1); } iVar4 = 0; if ((int)param_2 <= *(int *)(param_1 + 0x4824)) { uVar1 = *(uint *)(param_1 + 0x4820); bVar3 = (byte)param_2 & 0x1f; uVar5 = uVar1 << bVar3 | uVar1 >> 0x20 - bVar3; uVar2 = *(uint *)(stbi__bmask + (ulong)param_2 * 4); *(uint *)(param_1 + 0x4820) = ~uVar2 & uVar5; *(uint *)(param_1 + 0x4824) = *(int *)(param_1 + 0x4824) - param_2; iVar4 = 0; if (-1 < (int)uVar1) { iVar4 = *(int *)(stbi__jbias + (ulong)param_2 * 4); } iVar4 = iVar4 + (uVar5 & uVar2); } return iVar4; }
55,294
get_timer_pico_value(enum_timer_name)
eloqsql/storage/perfschema/pfs_timer.cc
ulonglong get_timer_pico_value(enum_timer_name timer_name) { ulonglong result; switch (timer_name) { case TIMER_NAME_CYCLE: result= (my_timer_cycles() - cycle_v0) * cycle_to_pico; break; case TIMER_NAME_NANOSEC: result= (my_timer_nanoseconds() - nanosec_v0) * nanosec_to_pico; break; case TIMER_NAME_MICROSEC: result= (my_timer_microseconds() - microsec_v0) * microsec_to_pico; break; case TIMER_NAME_MILLISEC: result= (my_timer_milliseconds() - millisec_v0) * millisec_to_pico; break; case TIMER_NAME_TICK: result= (my_timer_ticks() - tick_v0) * tick_to_pico; break; default: result= 0; assert(false); } return result; }
O0
cpp
get_timer_pico_value(enum_timer_name): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movl -0x4(%rbp), %eax decl %eax movl %eax, %ecx movq %rcx, -0x18(%rbp) subl $0x4, %eax ja 0x349e5 movq -0x18(%rbp), %rax leaq 0x81e4a(%rip), %rcx # 0xb67a4 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax callq 0x34720 subq 0x39a401(%rip), %rax # 0x3ced70 imulq 0x39a421(%rip), %rax # 0x3ced98 movq %rax, -0x10(%rbp) jmp 0x349ed callq 0x5fdd0 subq 0x39a3ef(%rip), %rax # 0x3ced78 imulq 0x39a40f(%rip), %rax # 0x3ceda0 movq %rax, -0x10(%rbp) jmp 0x349ed callq 0x5fe00 subq 0x39a3dd(%rip), %rax # 0x3ced80 imulq 0x39a3fd(%rip), %rax # 0x3ceda8 movq %rax, -0x10(%rbp) jmp 0x349ed callq 0x5fe50 subq 0x39a3cb(%rip), %rax # 0x3ced88 imulq 0x39a3eb(%rip), %rax # 0x3cedb0 movq %rax, -0x10(%rbp) jmp 0x349ed callq 0x5fe90 subq 0x39a3b9(%rip), %rax # 0x3ced90 imulq 0x39a3d9(%rip), %rax # 0x3cedb8 movq %rax, -0x10(%rbp) jmp 0x349ed movq $0x0, -0x10(%rbp) movq -0x10(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
_Z20get_timer_pico_value15enum_timer_name: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov eax, [rbp+var_4] dec eax; switch 5 cases mov ecx, eax mov [rbp+var_18], rcx sub eax, 4 ja def_34961; jumptable 0000000000034961 default case mov rax, [rbp+var_18] lea rcx, jpt_34961 movsxd rax, ds:(jpt_34961 - 0B67A4h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_34963: call _ZL15my_timer_cyclesv; jumptable 0000000000034961 case 1 sub rax, cs:_ZL8cycle_v0; cycle_v0 imul rax, cs:_ZL13cycle_to_pico; cycle_to_pico mov [rbp+var_10], rax jmp short loc_349ED loc_3497D: call my_timer_nanoseconds; jumptable 0000000000034961 case 2 sub rax, cs:_ZL10nanosec_v0; nanosec_v0 imul rax, cs:_ZL15nanosec_to_pico; nanosec_to_pico mov [rbp+var_10], rax jmp short loc_349ED loc_34997: call my_timer_microseconds; jumptable 0000000000034961 case 3 sub rax, cs:_ZL11microsec_v0; microsec_v0 imul rax, cs:_ZL16microsec_to_pico; microsec_to_pico mov [rbp+var_10], rax jmp short loc_349ED loc_349B1: call my_timer_milliseconds; jumptable 0000000000034961 case 4 sub rax, cs:_ZL11millisec_v0; millisec_v0 imul rax, cs:_ZL16millisec_to_pico; millisec_to_pico mov [rbp+var_10], rax jmp short loc_349ED loc_349CB: call my_timer_ticks; jumptable 0000000000034961 case 5 sub rax, cs:_ZL7tick_v0; tick_v0 imul rax, cs:_ZL12tick_to_pico; tick_to_pico mov [rbp+var_10], rax jmp short loc_349ED def_34961: mov [rbp+var_10], 0; jumptable 0000000000034961 default case loc_349ED: mov rax, [rbp+var_10] add rsp, 20h pop rbp retn
long long get_timer_pico_value(long long a1) { long long v2; // [rsp+10h] [rbp-10h] switch ( (int)a1 ) { case 1: v2 = cycle_to_pico * (my_timer_cycles() - cycle_v0); break; case 2: v2 = nanosec_to_pico * (my_timer_nanoseconds(a1) - nanosec_v0); break; case 3: v2 = microsec_to_pico * (my_timer_microseconds(a1) - microsec_v0); break; case 4: v2 = millisec_to_pico * (my_timer_milliseconds(a1) - millisec_v0); break; case 5: v2 = tick_to_pico * (my_timer_ticks(a1) - tick_v0); break; default: v2 = 0LL; break; } return v2; }
get_timer_pico_value: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV EAX,dword ptr [RBP + -0x4] DEC EAX MOV ECX,EAX MOV qword ptr [RBP + -0x18],RCX SUB EAX,0x4 JA 0x001349e5 MOV RAX,qword ptr [RBP + -0x18] LEA RCX,[0x1b67a4] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: CALL 0x00134720 SUB RAX,qword ptr [0x004ced70] IMUL RAX,qword ptr [0x004ced98] MOV qword ptr [RBP + -0x10],RAX JMP 0x001349ed caseD_2: CALL 0x0015fdd0 SUB RAX,qword ptr [0x004ced78] IMUL RAX,qword ptr [0x004ceda0] MOV qword ptr [RBP + -0x10],RAX JMP 0x001349ed caseD_3: CALL 0x0015fe00 SUB RAX,qword ptr [0x004ced80] IMUL RAX,qword ptr [0x004ceda8] MOV qword ptr [RBP + -0x10],RAX JMP 0x001349ed caseD_4: CALL 0x0015fe50 SUB RAX,qword ptr [0x004ced88] IMUL RAX,qword ptr [0x004cedb0] MOV qword ptr [RBP + -0x10],RAX JMP 0x001349ed caseD_5: CALL 0x0015fe90 SUB RAX,qword ptr [0x004ced90] IMUL RAX,qword ptr [0x004cedb8] MOV qword ptr [RBP + -0x10],RAX JMP 0x001349ed default: MOV qword ptr [RBP + -0x10],0x0 LAB_001349ed: MOV RAX,qword ptr [RBP + -0x10] ADD RSP,0x20 POP RBP RET
/* get_timer_pico_value(enum_timer_name) */ long get_timer_pico_value(int4 param_1) { long lVar1; long local_18; switch(param_1) { case 1: lVar1 = my_timer_cycles(); local_18 = (lVar1 - cycle_v0) * cycle_to_pico; break; case 2: lVar1 = my_timer_nanoseconds(); local_18 = (lVar1 - nanosec_v0) * nanosec_to_pico; break; case 3: lVar1 = my_timer_microseconds(); local_18 = (lVar1 - microsec_v0) * microsec_to_pico; break; case 4: lVar1 = my_timer_milliseconds(); local_18 = (lVar1 - millisec_v0) * millisec_to_pico; break; case 5: lVar1 = my_timer_ticks(); local_18 = (lVar1 - tick_v0) * tick_to_pico; break; default: local_18 = 0; } return local_18; }
55,295
ma_strmake
eloqsql/libmariadb/libmariadb/ma_string.c
char *ma_strmake(register char *dst, register const char *src, size_t length) { while (length--) if (! (*dst++ = *src++)) return dst-1; *dst=0; return dst; }
O0
c
ma_strmake: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x20(%rbp), %rax movq %rax, %rcx addq $-0x1, %rcx movq %rcx, -0x20(%rbp) cmpq $0x0, %rax je 0x31eab movq -0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x18(%rbp) movb (%rax), %al movq -0x10(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movb %al, (%rcx) cmpb $0x0, %al jne 0x31ea9 movq -0x10(%rbp), %rax addq $-0x1, %rax movq %rax, -0x8(%rbp) jmp 0x31eba jmp 0x31e60 movq -0x10(%rbp), %rax movb $0x0, (%rax) movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq
ma_strmake: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx loc_31E60: mov rax, [rbp+var_20] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_20], rcx cmp rax, 0 jz short loc_31EAB mov rax, [rbp+var_18] mov rcx, rax add rcx, 1 mov [rbp+var_18], rcx mov al, [rax] mov rcx, [rbp+var_10] mov rdx, rcx add rdx, 1 mov [rbp+var_10], rdx mov [rcx], al cmp al, 0 jnz short loc_31EA9 mov rax, [rbp+var_10] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_8], rax jmp short loc_31EBA loc_31EA9: jmp short loc_31E60 loc_31EAB: mov rax, [rbp+var_10] mov byte ptr [rax], 0 mov rax, [rbp+var_10] mov [rbp+var_8], rax loc_31EBA: mov rax, [rbp+var_8] pop rbp retn
_BYTE * ma_strmake(_BYTE *a1, _BYTE *a2, long long a3) { _BYTE *v4; // rax _BYTE *v5; // rcx while ( a3-- ) { v4 = a2++; LOBYTE(v4) = *v4; v5 = a1++; *v5 = (_BYTE)v4; if ( !(_BYTE)v4 ) return a1 - 1; } *a1 = 0; return a1; }
ma_strmake: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX LAB_00131e60: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,-0x1 MOV qword ptr [RBP + -0x20],RCX CMP RAX,0x0 JZ 0x00131eab MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x18],RCX MOV AL,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x10] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RCX],AL CMP AL,0x0 JNZ 0x00131ea9 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,-0x1 MOV qword ptr [RBP + -0x8],RAX JMP 0x00131eba LAB_00131ea9: JMP 0x00131e60 LAB_00131eab: MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX LAB_00131eba: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
char * ma_strmake(char *param_1,char *param_2,long param_3) { char cVar1; char *pcVar2; long local_28; char *local_20; char *local_18; local_28 = param_3; local_20 = param_2; pcVar2 = param_1; do { local_18 = pcVar2; if (local_28 == 0) { *local_18 = '\0'; return local_18; } cVar1 = *local_20; *local_18 = cVar1; local_28 = local_28 + -1; local_20 = local_20 + 1; pcVar2 = local_18 + 1; } while (cVar1 != '\0'); return local_18; }
55,296
rak_record_index_of
fabiosvm[P]rak/src/record.c
int rak_record_index_of(RakRecord *rec, RakString *name) { int len = rak_record_len(rec); for (int i = 0; i < len; ++i) { RakRecordField field = rak_record_get(rec, i); if (!rak_string_equals(field.name, name)) continue; return i; } return -1; }
O2
c
rak_record_index_of: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movl 0xc(%rdi), %r15d xorl %r12d, %r12d testl %r15d, %r15d cmovlel %r12d, %r15d pushq $-0x1 popq %rbp xorl %r13d, %r13d cmpq %r13, %r15 je 0x633c movq 0x10(%r14), %rax movq (%rax,%r12), %rdi movq %rbx, %rsi callq 0x69d1 testb %al, %al jne 0x6339 incq %r13 addq $0x18, %r12 jmp 0x6317 movl %r13d, %ebp movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
rak_record_index_of: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi mov r14, rdi mov r15d, [rdi+0Ch] xor r12d, r12d test r15d, r15d cmovle r15d, r12d push 0FFFFFFFFFFFFFFFFh pop rbp xor r13d, r13d loc_6317: cmp r15, r13 jz short loc_633C mov rax, [r14+10h] mov rdi, [rax+r12] mov rsi, rbx call rak_string_equals test al, al jnz short loc_6339 inc r13 add r12, 18h jmp short loc_6317 loc_6339: mov ebp, r13d loc_633C: mov eax, ebp add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long rak_record_index_of(long long a1, long long a2) { long long v2; // r15 long long v3; // r12 unsigned int v4; // ebp long long i; // r13 v2 = *(unsigned int *)(a1 + 12); v3 = 0LL; if ( (int)v2 <= 0 ) v2 = 0LL; v4 = -1; for ( i = 0LL; v2 != i; ++i ) { if ( (unsigned __int8)rak_string_equals(*(_QWORD *)(*(_QWORD *)(a1 + 16) + v3), a2) ) return (unsigned int)i; v3 += 24LL; } return v4; }
rak_record_index_of: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV R15D,dword ptr [RDI + 0xc] XOR R12D,R12D TEST R15D,R15D CMOVLE R15D,R12D PUSH -0x1 POP RBP XOR R13D,R13D LAB_00106317: CMP R15,R13 JZ 0x0010633c MOV RAX,qword ptr [R14 + 0x10] MOV RDI,qword ptr [RAX + R12*0x1] MOV RSI,RBX CALL 0x001069d1 TEST AL,AL JNZ 0x00106339 INC R13 ADD R12,0x18 JMP 0x00106317 LAB_00106339: MOV EBP,R13D LAB_0010633c: MOV EAX,EBP ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong rak_record_index_of(long param_1,int8 param_2) { char cVar1; ulong uVar2; ulong uVar3; ulong uVar4; ulong uVar5; uVar3 = 0; uVar5 = (ulong)*(uint *)(param_1 + 0xc); if ((int)*(uint *)(param_1 + 0xc) < 1) { uVar5 = uVar3; } uVar2 = 0xffffffffffffffff; uVar4 = 0; do { if (uVar5 == uVar4) { LAB_0010633c: return uVar2 & 0xffffffff; } cVar1 = rak_string_equals(*(int8 *)(*(long *)(param_1 + 0x10) + uVar3),param_2); if (cVar1 != '\0') { uVar2 = uVar4 & 0xffffffff; goto LAB_0010633c; } uVar4 = uVar4 + 1; uVar3 = uVar3 + 0x18; } while( true ); }
55,297
rak_record_index_of
fabiosvm[P]rak/src/record.c
int rak_record_index_of(RakRecord *rec, RakString *name) { int len = rak_record_len(rec); for (int i = 0; i < len; ++i) { RakRecordField field = rak_record_get(rec, i); if (!rak_string_equals(field.name, name)) continue; return i; } return -1; }
O3
c
rak_record_index_of: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movslq 0xc(%rdi), %rax movl $0xffffffff, %ebx # imm = 0xFFFFFFFF testq %rax, %rax jle 0x7912 movq %rsi, %r14 movq %rdi, %r15 shlq $0x3, %rax leaq (%rax,%rax,2), %r12 xorl %r13d, %r13d xorl %ebp, %ebp movq 0x10(%r15), %rax movq (%rax,%r13), %rdi movq %r14, %rsi callq 0x80e0 testb %al, %al jne 0x7910 incl %ebp addq $0x18, %r13 cmpq %r13, %r12 jne 0x78ef jmp 0x7912 movl %ebp, %ebx movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
rak_record_index_of: push rbp push r15 push r14 push r13 push r12 push rbx push rax movsxd rax, dword ptr [rdi+0Ch] mov ebx, 0FFFFFFFFh test rax, rax jle short loc_7912 mov r14, rsi mov r15, rdi shl rax, 3 lea r12, [rax+rax*2] xor r13d, r13d xor ebp, ebp loc_78EF: mov rax, [r15+10h] mov rdi, [rax+r13] mov rsi, r14 call rak_string_equals test al, al jnz short loc_7910 inc ebp add r13, 18h cmp r12, r13 jnz short loc_78EF jmp short loc_7912 loc_7910: mov ebx, ebp loc_7912: mov eax, ebx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long rak_record_index_of(long long a1, long long a2) { long long v2; // rax unsigned int v3; // ebx long long v4; // r12 long long v5; // r13 unsigned int v6; // ebp v2 = *(int *)(a1 + 12); v3 = -1; if ( v2 > 0 ) { v4 = 24 * v2; v5 = 0LL; v6 = 0; while ( !(unsigned __int8)rak_string_equals(*(_QWORD *)(*(_QWORD *)(a1 + 16) + v5), a2) ) { ++v6; v5 += 24LL; if ( v4 == v5 ) return v3; } return v6; } return v3; }
rak_record_index_of: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOVSXD RAX,dword ptr [RDI + 0xc] MOV EBX,0xffffffff TEST RAX,RAX JLE 0x00107912 MOV R14,RSI MOV R15,RDI SHL RAX,0x3 LEA R12,[RAX + RAX*0x2] XOR R13D,R13D XOR EBP,EBP LAB_001078ef: MOV RAX,qword ptr [R15 + 0x10] MOV RDI,qword ptr [RAX + R13*0x1] MOV RSI,R14 CALL 0x001080e0 TEST AL,AL JNZ 0x00107910 INC EBP ADD R13,0x18 CMP R12,R13 JNZ 0x001078ef JMP 0x00107912 LAB_00107910: MOV EBX,EBP LAB_00107912: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int rak_record_index_of(long param_1,int8 param_2) { int iVar1; char cVar2; int iVar3; long lVar4; iVar1 = *(int *)(param_1 + 0xc); if (0 < (long)iVar1) { lVar4 = 0; iVar3 = 0; do { cVar2 = rak_string_equals(*(int8 *)(*(long *)(param_1 + 0x10) + lVar4),param_2); if (cVar2 != '\0') { return iVar3; } iVar3 = iVar3 + 1; lVar4 = lVar4 + 0x18; } while ((long)iVar1 * 0x18 != lVar4); } return -1; }
55,298
CLI::Option* CLI::Option::ignore_underscore<CLI::App>(bool)
MikePodsytnik[P]TCRtrie/build_O3/_deps/cli11-src/include/CLI/impl/Option_inl.hpp
Option *Option::ignore_underscore(bool value) { if(!ignore_underscore_ && value) { ignore_underscore_ = value; auto *parent = static_cast<T *>(parent_); for(const Option_p &opt : parent->options_) { if(opt.get() == this) { continue; } const auto &omatch = opt->matching_name(*this); if(!omatch.empty()) { ignore_underscore_ = false; throw OptionAlreadyAdded("adding ignore underscore caused a name conflict with " + omatch); } } } else { ignore_underscore_ = value; } return this; }
O3
cpp
CLI::Option* CLI::Option::ignore_underscore<CLI::App>(bool): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp movq %rdi, %rbx movb 0x22(%rdi), %al movb %sil, 0x22(%rdi) testl %esi, %esi je 0x1d291 testb %al, %al jne 0x1d291 movq 0x1f0(%rbx), %rax movq 0xd8(%rax), %r15 movq 0xe0(%rax), %r12 cmpq %r12, %r15 je 0x1d291 movq (%r15), %rdi cmpq %rbx, %rdi je 0x1d28b movq %rbx, %rsi callq 0x1bc08 cmpq $0x0, 0x8(%rax) jne 0x1d2a1 addq $0x8, %r15 jmp 0x1d26f movq %rbx, %rax addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movb $0x0, 0x22(%rbx) movl $0x38, %edi callq 0x71d0 movq %rax, %rbx leaq 0x1a4cb(%rip), %rsi # 0x37787 movq %rsp, %rdi movq %r14, %rdx callq 0x11e48 movb $0x1, %bpl movq %rsp, %rsi movq %rbx, %rdi callq 0x1be52 xorl %ebp, %ebp leaq 0x2c2d2(%rip), %rsi # 0x495b0 leaq 0xc5c1(%rip), %rdx # 0x298a6 movq %rbx, %rdi callq 0x7750 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x1d30b movq 0x10(%rsp), %rsi incq %rsi callq 0x7430 testb %bpl, %bpl jne 0x1d315 jmp 0x1d31d movq %rax, %r14 movq %rbx, %rdi callq 0x7310 movq %r14, %rdi callq 0x7780
_ZN3CLI6Option17ignore_underscoreINS_3AppEEEPS0_b: push rbp; __int64 push r15; int push r14; int push r12; int push rbx; __int64 sub rsp, 20h mov rbx, rdi mov al, [rdi+22h] mov [rdi+22h], sil test esi, esi jz short loc_1D291 test al, al jnz short loc_1D291 mov rax, [rbx+1F0h] mov r15, [rax+0D8h] mov r12, [rax+0E0h] loc_1D26F: cmp r15, r12 jz short loc_1D291 mov rdi, [r15]; int cmp rdi, rbx jz short loc_1D28B mov rsi, rbx; int call _ZNK3CLI6Option13matching_nameB5cxx11ERKS0_; CLI::Option::matching_name(CLI::Option const&) cmp qword ptr [rax+8], 0 jnz short loc_1D2A1 loc_1D28B: add r15, 8 jmp short loc_1D26F loc_1D291: mov rax, rbx add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_1D2A1: mov r14, rax mov byte ptr [rbx+22h], 0 mov edi, 38h ; '8'; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aAddingIgnoreUn; "adding ignore underscore caused a name "... mov rdi, rsp mov rdx, r14 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) mov bpl, 1 mov rsi, rsp mov rdi, rbx; int call _ZN3CLI18OptionAlreadyAddedC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::OptionAlreadyAdded::OptionAlreadyAdded(std::string) xor ebp, ebp lea rsi, _ZTIN3CLI18OptionAlreadyAddedE; lptinfo lea rdx, _ZN3CLI5ErrorD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_1D30B mov rsi, [rsp+48h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1D30B: test bpl, bpl jnz short loc_1D315 jmp short loc_1D31D mov r14, rax loc_1D315: mov rdi, rbx; void * call ___cxa_free_exception loc_1D31D: mov rdi, r14 call __Unwind_Resume
long long CLI::Option::ignore_underscore<CLI::App>(long long a1, int a2) { char v2; // al long long v3; // rax long long *v4; // r15 long long *v5; // r12 long long *v6; // rax long long *v8; // r14 void *exception; // rbx _BYTE v10[16]; // [rsp+0h] [rbp-48h] BYREF v2 = *(_BYTE *)(a1 + 34); *(_BYTE *)(a1 + 34) = a2; if ( a2 && !v2 ) { v3 = *(_QWORD *)(a1 + 496); v4 = *(long long **)(v3 + 216); v5 = *(long long **)(v3 + 224); while ( v4 != v5 ) { if ( *v4 != a1 ) { v6 = CLI::Option::matching_name[abi:cxx11](*v4, (_QWORD *)a1); if ( v6[1] ) { v8 = v6; *(_BYTE *)(a1 + 34) = 0; exception = __cxa_allocate_exception(0x38uLL); std::operator+<char>((long long)v10, (long long)"adding ignore underscore caused a name conflict with ", v8); CLI::OptionAlreadyAdded::OptionAlreadyAdded((int)exception, (long long)v10); __cxa_throw(exception, (struct type_info *)&`typeinfo for'CLI::OptionAlreadyAdded, CLI::Error::~Error); } } ++v4; } } return a1; }
ignore_underscore<CLI::App>: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x20 MOV RBX,RDI MOV AL,byte ptr [RDI + 0x22] MOV byte ptr [RDI + 0x22],SIL TEST ESI,ESI JZ 0x0011d291 TEST AL,AL JNZ 0x0011d291 MOV RAX,qword ptr [RBX + 0x1f0] MOV R15,qword ptr [RAX + 0xd8] MOV R12,qword ptr [RAX + 0xe0] LAB_0011d26f: CMP R15,R12 JZ 0x0011d291 MOV RDI,qword ptr [R15] CMP RDI,RBX JZ 0x0011d28b MOV RSI,RBX CALL 0x0011bc08 CMP qword ptr [RAX + 0x8],0x0 JNZ 0x0011d2a1 LAB_0011d28b: ADD R15,0x8 JMP 0x0011d26f LAB_0011d291: MOV RAX,RBX ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0011d2a1: MOV R14,RAX MOV byte ptr [RBX + 0x22],0x0 MOV EDI,0x38 CALL 0x001071d0 MOV RBX,RAX LAB_0011d2b5: LEA RSI,[0x137787] MOV RDI,RSP MOV RDX,R14 CALL 0x00111e48 MOV BPL,0x1 LAB_0011d2ca: MOV RSI,RSP MOV RDI,RBX CALL 0x0011be52 XOR EBP,EBP LEA RSI,[0x1495b0] LEA RDX,[0x1298a6] MOV RDI,RBX CALL 0x00107750
/* CLI::Option* CLI::Option::ignore_underscore<CLI::App>(bool) */ Option * __thiscall CLI::Option::ignore_underscore<CLI::App>(Option *this,bool param_1) { Option OVar1; int8 *puVar2; long lVar3; OptionAlreadyAdded *pOVar4; int7 in_register_00000031; int8 *puVar5; char acStack_48 [32]; OVar1 = this[0x22]; this[0x22] = (Option)param_1; if (((int)CONCAT71(in_register_00000031,param_1) != 0) && (OVar1 == (Option)0x0)) { puVar2 = *(int8 **)(*(long *)(this + 0x1f0) + 0xe0); for (puVar5 = *(int8 **)(*(long *)(this + 0x1f0) + 0xd8); puVar5 != puVar2; puVar5 = puVar5 + 1) { if ((Option *)*puVar5 != this) { lVar3 = matching_name_abi_cxx11_((Option *)*puVar5,this); if (*(long *)(lVar3 + 8) != 0) { this[0x22] = (Option)0x0; pOVar4 = (OptionAlreadyAdded *)__cxa_allocate_exception(0x38); /* try { // try from 0011d2b5 to 0011d2c6 has its CatchHandler @ 0011d312 */ std::operator+(acStack_48, (string *)"adding ignore underscore caused a name conflict with "); /* try { // try from 0011d2ca to 0011d2ec has its CatchHandler @ 0011d2ed */ OptionAlreadyAdded::OptionAlreadyAdded(pOVar4,acStack_48); /* WARNING: Subroutine does not return */ __cxa_throw(pOVar4,&OptionAlreadyAdded::typeinfo,Error::~Error); } } } } return this; }
55,299
Irq::SetIoIrqControl(unsigned short)
sp1187[P]veesem/src/core/spg200/irq.cc
void Irq::SetIoIrqControl(word_t value) { io_irq_ctrl_.raw = value; UpdateIrq2(); UpdateIrq3(); UpdateIrq5(); UpdateIrq6(); UpdateIrq7(); }
O1
cpp
Irq::SetIoIrqControl(unsigned short): pushq %rbx movq %rdi, %rbx movw %si, 0x8(%rdi) andw 0xa(%rdi), %si movq (%rdi), %rdi xorl %edx, %edx testl $0xc00, %esi # imm = 0xC00 setne %dl movl $0x2, %esi callq 0xe91a movzwl 0x8(%rbx), %eax andw 0xa(%rbx), %ax movq (%rbx), %rdi xorl %edx, %edx testl $0x2100, %eax # imm = 0x2100 setne %dl movl $0x3, %esi callq 0xe91a movzwl 0x8(%rbx), %eax andw 0xa(%rbx), %ax movq (%rbx), %rdi xorl %edx, %edx testl $0x1200, %eax # imm = 0x1200 setne %dl movl $0x5, %esi callq 0xe91a movzwl 0x8(%rbx), %eax andw 0xa(%rbx), %ax movq (%rbx), %rdi xorl %edx, %edx testb $0x70, %al setne %dl movl $0x6, %esi callq 0xe91a movzwl 0x8(%rbx), %eax movq (%rbx), %rdi andw 0xa(%rbx), %ax xorl %edx, %edx testb $-0x75, %al setne %dl movl $0x7, %esi popq %rbx jmp 0xe91a nop
_ZN3Irq15SetIoIrqControlEt: push rbx mov rbx, rdi mov [rdi+8], si and si, [rdi+0Ah] mov rdi, [rdi]; this xor edx, edx test esi, 0C00h setnz dl; bool mov esi, 2; int call _ZN3Cpu6SetIrqEib; Cpu::SetIrq(int,bool) movzx eax, word ptr [rbx+8] and ax, [rbx+0Ah] mov rdi, [rbx]; this xor edx, edx test eax, 2100h setnz dl; bool mov esi, 3; int call _ZN3Cpu6SetIrqEib; Cpu::SetIrq(int,bool) movzx eax, word ptr [rbx+8] and ax, [rbx+0Ah] mov rdi, [rbx]; this xor edx, edx test eax, 1200h setnz dl; bool mov esi, 5; int call _ZN3Cpu6SetIrqEib; Cpu::SetIrq(int,bool) movzx eax, word ptr [rbx+8] and ax, [rbx+0Ah] mov rdi, [rbx]; this xor edx, edx test al, 70h setnz dl; bool mov esi, 6; int call _ZN3Cpu6SetIrqEib; Cpu::SetIrq(int,bool) movzx eax, word ptr [rbx+8] mov rdi, [rbx]; this and ax, [rbx+0Ah] xor edx, edx test al, 8Bh setnz dl; bool mov esi, 7; int pop rbx jmp _ZN3Cpu6SetIrqEib; Cpu::SetIrq(int,bool)
long long Irq::SetIoIrqControl(Irq *this, unsigned __int16 a2) { *((_WORD *)this + 4) = a2; Cpu::SetIrq(*(Cpu **)this, 2, (*((_WORD *)this + 5) & a2 & 0xC00) != 0); Cpu::SetIrq(*(Cpu **)this, 3, (*((_WORD *)this + 5) & *((_WORD *)this + 4) & 0x2100) != 0); Cpu::SetIrq(*(Cpu **)this, 5, (*((_WORD *)this + 5) & *((_WORD *)this + 4) & 0x1200) != 0); Cpu::SetIrq(*(Cpu **)this, 6, (*((_BYTE *)this + 10) & *((_BYTE *)this + 8) & 0x70) != 0); return Cpu::SetIrq(*(Cpu **)this, 7, (*((_BYTE *)this + 10) & *((_BYTE *)this + 8) & 0x8B) != 0); }
SetIoIrqControl: PUSH RBX MOV RBX,RDI MOV word ptr [RDI + 0x8],SI AND SI,word ptr [RDI + 0xa] MOV RDI,qword ptr [RDI] XOR EDX,EDX TEST ESI,0xc00 SETNZ DL MOV ESI,0x2 CALL 0x0010e91a MOVZX EAX,word ptr [RBX + 0x8] AND AX,word ptr [RBX + 0xa] MOV RDI,qword ptr [RBX] XOR EDX,EDX TEST EAX,0x2100 SETNZ DL MOV ESI,0x3 CALL 0x0010e91a MOVZX EAX,word ptr [RBX + 0x8] AND AX,word ptr [RBX + 0xa] MOV RDI,qword ptr [RBX] XOR EDX,EDX TEST EAX,0x1200 SETNZ DL MOV ESI,0x5 CALL 0x0010e91a MOVZX EAX,word ptr [RBX + 0x8] AND AX,word ptr [RBX + 0xa] MOV RDI,qword ptr [RBX] XOR EDX,EDX TEST AL,0x70 SETNZ DL MOV ESI,0x6 CALL 0x0010e91a MOVZX EAX,word ptr [RBX + 0x8] MOV RDI,qword ptr [RBX] AND AX,word ptr [RBX + 0xa] XOR EDX,EDX TEST AL,0x8b SETNZ DL MOV ESI,0x7 POP RBX JMP 0x0010e91a
/* Irq::SetIoIrqControl(unsigned short) */ void __thiscall Irq::SetIoIrqControl(Irq *this,ushort param_1) { *(ushort *)(this + 8) = param_1; Cpu::SetIrq(*(Cpu **)this,2,(param_1 & *(ushort *)(this + 10) & 0xc00) != 0); Cpu::SetIrq(*(Cpu **)this,3,(*(ushort *)(this + 8) & *(ushort *)(this + 10) & 0x2100) != 0); Cpu::SetIrq(*(Cpu **)this,5,(*(ushort *)(this + 8) & *(ushort *)(this + 10) & 0x1200) != 0); Cpu::SetIrq(*(Cpu **)this,6,(*(ushort *)(this + 8) & *(ushort *)(this + 10) & 0x70) != 0); Cpu::SetIrq(*(Cpu **)this,7,(*(ushort *)(this + 8) & *(ushort *)(this + 10) & 0x8b) != 0); return; }