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
6,600
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_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>>::end_array()
llama.cpp/common/./json.hpp
bool end_array() { JSON_ASSERT(!ref_stack.empty()); JSON_ASSERT(ref_stack.back()->is_array()); ref_stack.back()->set_parents(); ref_stack.pop_back(); return true; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_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>>::end_array(): pushq %rax movq 0x10(%rdi), %rax cmpq %rax, 0x8(%rdi) je 0x2e8d4 movq -0x8(%rax), %rcx cmpb $0x2, (%rcx) jne 0x2e8f0 addq $-0x8, %rax movq %rax, 0x10(%rdi) movb $0x1, %al popq %rcx retq leaq 0x2d47a(%rip), %rdi # 0x5bd55 leaq 0x2d4b0(%rip), %rdx # 0x5bd92 leaq 0x2e48e(%rip), %rcx # 0x5cd77 movl $0x1b01, %esi # imm = 0x1B01 jmp 0x2e90a leaq 0x2d45e(%rip), %rdi # 0x5bd55 leaq 0x2d494(%rip), %rdx # 0x5bd92 leaq 0x2e73d(%rip), %rcx # 0x5d042 movl $0x1b02, %esi # imm = 0x1B02 xorl %eax, %eax callq 0x17950 nop
_ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9end_arrayEv: push rax mov rax, [rdi+10h] cmp [rdi+8], rax jz short loc_2E8D4 mov rcx, [rax-8] cmp byte ptr [rcx], 2 jnz short loc_2E8F0 add rax, 0FFFFFFFFFFFFFFF8h mov [rdi+10h], rax mov al, 1 pop rcx retn loc_2E8D4: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRefStackEmpty; "!ref_stack.empty()" mov esi, 1B01h jmp short loc_2E90A loc_2E8F0: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRefStackBackIs_0; "ref_stack.back()->is_array()" mov esi, 1B02h loc_2E90A: xor eax, eax call _ggml_abort nop
char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_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>>::end_array( long long a1) { long long v1; // rax long long v3; // rsi long long v4; // rdx long long v5; // rcx v1 = *(_QWORD *)(a1 + 16); if ( *(_QWORD *)(a1 + 8) == v1 ) { v3 = 6913LL; ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/./json.hpp", 6913LL, "GGML_ASSERT(%s) failed", "!ref_stack.empty()"); } else { if ( **(_BYTE **)(v1 - 8) == 2 ) { *(_QWORD *)(a1 + 16) = v1 - 8; return 1; } v3 = 6914LL; ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/./json.hpp", 6914LL, "GGML_ASSERT(%s) failed", "ref_stack.back()->is_array()"); } return nlohmann::json_abi_v3_11_3::detail::json_sax_dom_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>>::parse_error<nlohmann::json_abi_v3_11_3::detail::out_of_range>( "/workspace/llm4binary/github2025/llama.cpp/common/./json.hpp", v3, v4, v5); }
end_array: PUSH RAX MOV RAX,qword ptr [RDI + 0x10] CMP qword ptr [RDI + 0x8],RAX JZ 0x0012e8d4 MOV RCX,qword ptr [RAX + -0x8] CMP byte ptr [RCX],0x2 JNZ 0x0012e8f0 ADD RAX,-0x8 MOV qword ptr [RDI + 0x10],RAX MOV AL,0x1 POP RCX RET LAB_0012e8d4: LEA RDI,[0x15bd55] LEA RDX,[0x15bd92] LEA RCX,[0x15cd77] MOV ESI,0x1b01 JMP 0x0012e90a LAB_0012e8f0: LEA RDI,[0x15bd55] LEA RDX,[0x15bd92] LEA RCX,[0x15d042] MOV ESI,0x1b02 LAB_0012e90a: XOR EAX,EAX CALL 0x00117950
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_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> >::end_array() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_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>> ::end_array(json_sax_dom_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) { long lVar1; char *pcVar2; int8 uVar3; lVar1 = *(long *)(this + 0x10); if (*(long *)(this + 8) == lVar1) { pcVar2 = "!ref_stack.empty()"; uVar3 = 0x1b01; } else { if (**(char **)(lVar1 + -8) == '\x02') { *(long *)(this + 0x10) = lVar1 + -8; return CONCAT71((int7)((ulong)(lVar1 + -8) >> 8),1); } pcVar2 = "ref_stack.back()->is_array()"; uVar3 = 0x1b02; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/./json.hpp",uVar3, "GGML_ASSERT(%s) failed",pcVar2); }
6,601
run_plugin_auth
eloqsql/libmariadb/plugins/auth/my_auth.c
int run_plugin_auth(MYSQL *mysql, char *data, uint data_len, const char *data_plugin, const char *db) { const char *auth_plugin_name= NULL; auth_plugin_t *auth_plugin; MCPVIO_EXT mpvio; ulong pkt_length; int res; /* determine the default/initial plugin to use */ if (mysql->server_capabilities & CLIENT_PLUGIN_AUTH) { if (mysql->options.extension && mysql->options.extension->default_auth) auth_plugin_name= mysql->options.extension->default_auth; else if (data_plugin) auth_plugin_name= data_plugin; } if (!auth_plugin_name) { if (mysql->server_capabilities & CLIENT_PROTOCOL_41) auth_plugin_name= native_password_plugin_name; else auth_plugin_name= "mysql_old_password"; } if (!(auth_plugin= (auth_plugin_t*) mysql_client_find_plugin(mysql, auth_plugin_name, MYSQL_CLIENT_AUTHENTICATION_PLUGIN))) auth_plugin= &dummy_fallback_client_plugin; mysql->net.last_errno= 0; /* just in case */ if (data_plugin && strcmp(data_plugin, auth_plugin_name)) { /* data was prepared for a different plugin, so we don't send any data */ data= 0; data_len= 0; } mpvio.mysql_change_user= data_plugin == 0; mpvio.cached_server_reply.pkt= (uchar*)data; mpvio.cached_server_reply.pkt_len= data_len; mpvio.read_packet= client_mpvio_read_packet; mpvio.write_packet= client_mpvio_write_packet; mpvio.info= client_mpvio_info; mpvio.mysql= mysql; mpvio.packets_read= mpvio.packets_written= 0; mpvio.db= db; retry: mpvio.plugin= auth_plugin; if (auth_plugin_name && mysql->options.extension && mysql->options.extension->restricted_auth) { if (!strstr(mysql->options.extension->restricted_auth, auth_plugin_name)) { my_set_error(mysql, CR_PLUGIN_NOT_ALLOWED, SQLSTATE_UNKNOWN, 0, data_plugin); return 1; } } mysql->net.read_pos[0]= 0; res= auth_plugin->authenticate_user((struct st_plugin_vio *)&mpvio, mysql); if ((res == CR_ERROR && !mysql->net.buff) || (res > CR_OK && mysql->net.read_pos[0] != 254)) { /* the plugin returned an error. write it down in mysql, unless the error code is CR_ERROR and mysql->net.last_errno is already set (the plugin has done it) */ if (res > CR_ERROR) my_set_error(mysql, res, SQLSTATE_UNKNOWN, 0); else if (!mysql->net.last_errno) { my_set_error(mysql, CR_UNKNOWN_ERROR, SQLSTATE_UNKNOWN, 0); } return 1; } /* read the OK packet (or use the cached value in mysql->net.read_pos */ if (res == CR_OK) pkt_length= ma_net_safe_read(mysql); else /* res == CR_OK_HANDSHAKE_COMPLETE or an error */ pkt_length= mpvio.last_read_packet_len; if (pkt_length == packet_error) { if (mysql->net.last_errno == CR_SERVER_LOST) my_set_error(mysql, CR_SERVER_LOST, SQLSTATE_UNKNOWN, ER(CR_SERVER_LOST_EXTENDED), "reading authorization packet", errno); return 1; } if (mysql->net.read_pos[0] == 254) { /* The server asked to use a different authentication plugin */ if (pkt_length == 1) { /* old "use short scramble" packet */ auth_plugin_name= old_password_plugin_name; mpvio.cached_server_reply.pkt= (uchar*)mysql->scramble_buff; mpvio.cached_server_reply.pkt_len= SCRAMBLE_LENGTH + 1; } else { /* new "use different plugin" packet */ uint len; auth_plugin_name= (char*)mysql->net.read_pos + 1; len= (uint)strlen(auth_plugin_name); /* safe as ma_net_read always appends \0 */ mpvio.cached_server_reply.pkt_len= pkt_length - len - 2; mpvio.cached_server_reply.pkt= mysql->net.read_pos + len + 2; } if (!(auth_plugin= (auth_plugin_t *) mysql_client_find_plugin(mysql, auth_plugin_name, MYSQL_CLIENT_AUTHENTICATION_PLUGIN))) auth_plugin= &dummy_fallback_client_plugin; goto retry; } /* net->read_pos[0] should always be 0 here if the server implements the protocol correctly */ if (mysql->net.read_pos[0] == 0) return ma_read_ok_packet(mysql, mysql->net.read_pos + 1, pkt_length); return 1; }
O3
c
run_plugin_auth: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %r8, -0x38(%rbp) movq %rcx, %r15 movl %edx, -0x30(%rbp) movq %rsi, %r14 movq %rdi, %rbx movq 0x370(%rdi), %rax btl $0x13, %eax jb 0x2f6c3 btl $0x9, %eax leaq 0x75bb(%rip), %rax # 0x36c71 leaq 0x75c7(%rip), %r12 # 0x36c84 cmovaeq %rax, %r12 jmp 0x2f6e0 movq 0x480(%rbx), %rcx testq %rcx, %rcx je 0x2f6d8 movq 0x8(%rcx), %r12 testq %r12, %r12 jne 0x2f6e0 movq %r15, %r12 testq %r15, %r15 je 0x2f6ab movq %rbx, %rdi movq %r12, %rsi movl $0x2, %edx callq 0x294d0 movq %rax, %r13 testq %rax, %rax jne 0x2f6ff leaq 0x1b6d9(%rip), %r13 # 0x4add8 movl $0x0, 0x90(%rbx) testq %r15, %r15 je 0x2f729 movq %r15, %rdi movq %r12, %rsi callq 0x13640 xorl %ecx, %ecx testl %eax, %eax movl -0x30(%rbp), %eax cmovnel %ecx, %eax cmovneq %rcx, %r14 jmp 0x2f72c movl -0x30(%rbp), %eax movq %r15, -0x30(%rbp) testq %r15, %r15 leaq -0x88(%rbp), %rcx sete 0x48(%rcx) movq %r14, 0x30(%rcx) movl %eax, 0x38(%rcx) leaq 0x22a(%rip), %rax # 0x2f976 movq %rax, (%rcx) leaq 0x2c2(%rip), %rax # 0x2fa18 movq %rax, 0x8(%rcx) leaq 0xa41(%rip), %rax # 0x301a2 movq %rax, 0x10(%rcx) movq %rbx, 0x18(%rcx) movq $0x0, 0x40(%rcx) movq -0x38(%rbp), %rax movq %rax, 0x28(%rcx) leaq 0x48e(%rbx), %r15 movq %r13, -0x68(%rbp) movq 0x480(%rbx), %rax testq %rax, %rax je 0x2f7ad movq 0x150(%rax), %rdi testq %rdi, %rdi je 0x2f7ad movq %r12, %rsi callq 0x13100 testq %rax, %rax je 0x2f925 movq 0x20(%rbx), %rax movb $0x0, (%rax) leaq -0x88(%rbp), %rdi movq %rbx, %rsi callq *0x58(%r13) testl %eax, %eax je 0x2f7d6 js 0x2f7ef movq 0x20(%rbx), %rcx cmpb $-0x2, (%rcx) je 0x2f7f4 jmp 0x2f946 cmpq $0x0, 0x8(%rbx) je 0x2f8f9 movq 0x20(%rbx), %rax cmpb $-0x2, (%rax) je 0x2f7f4 jmp 0x2f8f9 cmpl $-0x1, %eax je 0x2f86f movslq -0x3c(%rbp), %r14 movq 0x20(%rbx), %r13 movzbl (%r13), %eax cmpl $0xfe, %eax jne 0x2f8df movl $0x15, %eax movq %r15, %rcx leaq 0x7456(%rip), %r12 # 0x36c71 cmpq $0x1, %r14 je 0x2f840 leaq 0x1(%r13), %r12 movq %r12, %rdi callq 0x131c0 movl %eax, %ecx subl %eax, %r14d addl $-0x2, %r14d addq %r13, %rcx addq $0x2, %rcx movl %r14d, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x50(%rbp) movq %rbx, %rdi movq %r12, %rsi movl $0x2, %edx callq 0x294d0 movq %rax, %r13 testq %rax, %rax jne 0x2f780 leaq 0x1b56e(%rip), %r13 # 0x4add8 jmp 0x2f780 movq %rbx, %rdi callq 0x15e47 movq %rax, %r14 movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq %rax, %r14 jne 0x2f7f8 movl $0x1, %r14d cmpl $0x7dd, 0x90(%rbx) # imm = 0x7DD jne 0x2f964 leaq 0x1c21b(%rip), %rax # 0x4bac0 movq (%rax), %r15 leaq 0x1c221(%rip), %rax # 0x4bad0 movq 0x1b8(%rax), %r12 callq 0x13060 movl (%rax), %r9d leaq 0x7927(%rip), %r8 # 0x371ec movq %rbx, %rdi movl $0x7dd, %esi # imm = 0x7DD movq %r15, %rdx movq %r12, %rcx xorl %eax, %eax callq 0x160e1 jmp 0x2f964 testl %eax, %eax jne 0x2f95e incq %r13 movq %rbx, %rdi movq %r13, %rsi movq %r14, %rdx callq 0x1b12e movl %eax, %r14d jmp 0x2f964 movl $0x1, %r14d cmpl $0x0, 0x90(%rbx) jne 0x2f964 leaq 0x1c1b1(%rip), %rax # 0x4bac0 movq (%rax), %rdx movq %rbx, %rdi movl $0x7d0, %esi # imm = 0x7D0 xorl %ecx, %ecx xorl %eax, %eax callq 0x160e1 jmp 0x2f964 leaq 0x1c194(%rip), %rax # 0x4bac0 movq (%rax), %rdx movq %rbx, %rdi movl $0x1392, %esi # imm = 0x1392 xorl %ecx, %ecx movq -0x30(%rbp), %r8 xorl %eax, %eax callq 0x160e1 jmp 0x2f95e leaq 0x1c173(%rip), %rcx # 0x4bac0 movq (%rcx), %rdx movq %rbx, %rdi movl %eax, %esi xorl %ecx, %ecx xorl %eax, %eax callq 0x160e1 movl $0x1, %r14d movl %r14d, %eax addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
run_plugin_auth: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov [rbp+var_38], r8 mov r15, rcx mov dword ptr [rbp+var_30], edx mov r14, rsi mov rbx, rdi mov rax, [rdi+370h] bt eax, 13h jb short loc_2F6C3 loc_2F6AB: bt eax, 9 lea rax, aMysqlOldPasswo; "mysql_old_password" lea r12, aMysqlNativePas; "mysql_native_password" cmovnb r12, rax jmp short loc_2F6E0 loc_2F6C3: mov rcx, [rbx+480h] test rcx, rcx jz short loc_2F6D8 mov r12, [rcx+8] test r12, r12 jnz short loc_2F6E0 loc_2F6D8: mov r12, r15 test r15, r15 jz short loc_2F6AB loc_2F6E0: mov rdi, rbx mov rsi, r12 mov edx, 2 call mysql_client_find_plugin mov r13, rax test rax, rax jnz short loc_2F6FF lea r13, dummy_fallback_client_plugin loc_2F6FF: mov dword ptr [rbx+90h], 0 test r15, r15 jz short loc_2F729 mov rdi, r15 mov rsi, r12 call _strcmp xor ecx, ecx test eax, eax mov eax, dword ptr [rbp+var_30] cmovnz eax, ecx cmovnz r14, rcx jmp short loc_2F72C loc_2F729: mov eax, dword ptr [rbp+var_30] loc_2F72C: mov [rbp+var_30], r15 test r15, r15 lea rcx, [rbp+var_88] setz byte ptr [rcx+48h] mov [rcx+30h], r14 mov [rcx+38h], eax lea rax, client_mpvio_read_packet mov [rcx], rax lea rax, client_mpvio_write_packet mov [rcx+8], rax lea rax, client_mpvio_info mov [rcx+10h], rax mov [rcx+18h], rbx mov qword ptr [rcx+40h], 0 mov rax, [rbp+var_38] mov [rcx+28h], rax lea r15, [rbx+48Eh] loc_2F780: mov [rbp+var_68], r13 mov rax, [rbx+480h] test rax, rax jz short loc_2F7AD mov rdi, [rax+150h] test rdi, rdi jz short loc_2F7AD mov rsi, r12 call _strstr test rax, rax jz loc_2F925 loc_2F7AD: mov rax, [rbx+20h] mov byte ptr [rax], 0 lea rdi, [rbp+var_88] mov rsi, rbx call qword ptr [r13+58h] test eax, eax jz short loc_2F7D6 js short loc_2F7EF mov rcx, [rbx+20h] cmp byte ptr [rcx], 0FEh jz short loc_2F7F4 jmp loc_2F946 loc_2F7D6: cmp qword ptr [rbx+8], 0 jz loc_2F8F9 mov rax, [rbx+20h] cmp byte ptr [rax], 0FEh jz short loc_2F7F4 jmp loc_2F8F9 loc_2F7EF: cmp eax, 0FFFFFFFFh jz short loc_2F86F loc_2F7F4: movsxd r14, [rbp+var_3C] loc_2F7F8: mov r13, [rbx+20h] movzx eax, byte ptr [r13+0] cmp eax, 0FEh jnz loc_2F8DF mov eax, 15h mov rcx, r15 lea r12, aMysqlOldPasswo; "mysql_old_password" cmp r14, 1 jz short loc_2F840 lea r12, [r13+1] mov rdi, r12 call _strlen mov ecx, eax sub r14d, eax add r14d, 0FFFFFFFEh add rcx, r13 add rcx, 2 mov eax, r14d loc_2F840: mov [rbp+var_58], rcx mov [rbp+var_50], eax mov rdi, rbx mov rsi, r12 mov edx, 2 call mysql_client_find_plugin mov r13, rax test rax, rax jnz loc_2F780 lea r13, dummy_fallback_client_plugin jmp loc_2F780 loc_2F86F: mov rdi, rbx call ma_net_safe_read mov r14, rax mov eax, 0FFFFFFFFh cmp r14, rax jnz loc_2F7F8 mov r14d, 1 cmp dword ptr [rbx+90h], 7DDh jnz loc_2F964 lea rax, SQLSTATE_UNKNOWN mov r15, [rax] lea rax, client_errors mov r12, [rax+1B8h] call ___errno_location mov r9d, [rax] lea r8, aReadingAuthori; "reading authorization packet" mov rdi, rbx mov esi, 7DDh mov rdx, r15 mov rcx, r12 xor eax, eax call my_set_error jmp loc_2F964 loc_2F8DF: test eax, eax jnz short loc_2F95E inc r13 mov rdi, rbx mov rsi, r13 mov rdx, r14 call ma_read_ok_packet mov r14d, eax jmp short loc_2F964 loc_2F8F9: mov r14d, 1 cmp dword ptr [rbx+90h], 0 jnz short loc_2F964 lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov rdi, rbx mov esi, 7D0h xor ecx, ecx xor eax, eax call my_set_error jmp short loc_2F964 loc_2F925: lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov rdi, rbx mov esi, 1392h xor ecx, ecx mov r8, [rbp+var_30] xor eax, eax call my_set_error jmp short loc_2F95E loc_2F946: lea rcx, SQLSTATE_UNKNOWN mov rdx, [rcx] mov rdi, rbx mov esi, eax xor ecx, ecx xor eax, eax call my_set_error loc_2F95E: mov r14d, 1 loc_2F964: mov eax, r14d add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long run_plugin_auth( long long a1, long long a2, int a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14) { const char *v14; // r15 long long v17; // rax const char *v18; // r12 long long ( **plugin)(_QWORD *, long long); // r13 bool v20; // zf int v21; // eax long long v22; // rax long long v23; // rdi int v24; // eax long long v25; // rdx long long v26; // rcx unsigned long long v27; // r8 long long v28; // r9 double v29; // xmm4_8 double v30; // xmm5_8 unsigned long long v31; // r14 unsigned __int8 *v32; // r13 int v33; // eax long long v34; // rcx int v35; // eax unsigned int v36; // r14d char *v37; // r15 char *v38; // r12 unsigned int *v39; // rax char v41; // [rsp+0h] [rbp-90h] char v42; // [rsp+0h] [rbp-90h] _QWORD v43[6]; // [rsp+8h] [rbp-88h] BYREF long long v44; // [rsp+38h] [rbp-58h] int v45; // [rsp+40h] [rbp-50h] long long v46; // [rsp+48h] [rbp-48h] bool v47; // [rsp+50h] [rbp-40h] int v48; // [rsp+54h] [rbp-3Ch] long long v49; // [rsp+58h] [rbp-38h] const char *v50; // [rsp+60h] [rbp-30h] v49 = a5; v14 = (const char *)a4; LODWORD(v50) = a3; v17 = *(_QWORD *)(a1 + 880); if ( (v17 & 0x80000) == 0 || ((a4 = *(_QWORD *)(a1 + 1152)) == 0 || (v18 = *(const char **)(a4 + 8)) == 0LL) && (v18 = v14) == 0LL ) { v18 = "mysql_native_password"; if ( (v17 & 0x200) == 0 ) v18 = "mysql_old_password"; } plugin = (long long ( **)(_QWORD *, long long))mysql_client_find_plugin( a1, v18, 2, a7, a8, a9, a10, a11, a12, a13, a14, a4, a5, a6, v41); if ( !plugin ) plugin = (long long ( **)(_QWORD *, long long))&dummy_fallback_client_plugin; *(_DWORD *)(a1 + 144) = 0; if ( v14 ) { v20 = (unsigned int)strcmp(v14, v18) == 0; v21 = (int)v50; if ( !v20 ) { v21 = 0; a2 = 0LL; } } else { v21 = (int)v50; } v50 = v14; v47 = v14 == 0LL; v44 = a2; v45 = v21; v43[0] = client_mpvio_read_packet; v43[1] = client_mpvio_write_packet; v43[2] = client_mpvio_info; v43[3] = a1; v46 = 0LL; v43[5] = v49; while ( 1 ) { v43[4] = plugin; v22 = *(_QWORD *)(a1 + 1152); if ( v22 ) { v23 = *(_QWORD *)(v22 + 336); if ( v23 ) { if ( !strstr(v23, v18) ) { my_set_error(a1, 5010, (long long)SQLSTATE_UNKNOWN, 0LL, v50); return 1; } } } **(_BYTE **)(a1 + 32) = 0; v24 = plugin[11](v43, a1); if ( !v24 ) break; if ( v24 >= 0 ) { if ( **(_BYTE **)(a1 + 32) != 0xFE ) { my_set_error(a1, v24, (long long)SQLSTATE_UNKNOWN, 0LL); return 1; } goto LABEL_27; } if ( v24 != -1 ) goto LABEL_27; v31 = ma_net_safe_read(a1, a1, v25, v26, v27, v28); if ( v31 == 0xFFFFFFFF ) { v36 = 1; if ( *(_DWORD *)(a1 + 144) == 2013 ) { v37 = SQLSTATE_UNKNOWN; v38 = client_errors[55]; v39 = (unsigned int *)__errno_location(a1); my_set_error(a1, 2013, (long long)v37, v38, "reading authorization packet", *v39); } return v36; } LABEL_28: v32 = *(unsigned __int8 **)(a1 + 32); if ( *v32 != 254 ) { if ( !*v32 ) return (unsigned int)ma_read_ok_packet(a1, v32 + 1, v31); return 1; } v33 = 21; v34 = a1 + 1166; v18 = "mysql_old_password"; if ( v31 != 1 ) { v18 = (const char *)(v32 + 1); v35 = strlen(v32 + 1); v34 = (long long)&v32[v35 + 2]; v33 = v31 - v35 - 2; } v44 = v34; v45 = v33; plugin = (long long ( **)(_QWORD *, long long))mysql_client_find_plugin( a1, v18, 2, a7, a8, a9, a10, v29, v30, a13, a14, v34, v27, v28, v42); if ( !plugin ) plugin = (long long ( **)(_QWORD *, long long))&dummy_fallback_client_plugin; } if ( *(_QWORD *)(a1 + 8) && **(_BYTE **)(a1 + 32) == 0xFE ) { LABEL_27: v31 = v48; goto LABEL_28; } v36 = 1; if ( !*(_DWORD *)(a1 + 144) ) my_set_error(a1, 2000, (long long)SQLSTATE_UNKNOWN, 0LL); return v36; }
run_plugin_auth: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV qword ptr [RBP + -0x38],R8 MOV R15,RCX MOV dword ptr [RBP + -0x30],EDX MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x370] BT EAX,0x13 JC 0x0012f6c3 LAB_0012f6ab: BT EAX,0x9 LEA RAX,[0x136c71] LEA R12,[0x136c84] CMOVNC R12,RAX JMP 0x0012f6e0 LAB_0012f6c3: MOV RCX,qword ptr [RBX + 0x480] TEST RCX,RCX JZ 0x0012f6d8 MOV R12,qword ptr [RCX + 0x8] TEST R12,R12 JNZ 0x0012f6e0 LAB_0012f6d8: MOV R12,R15 TEST R15,R15 JZ 0x0012f6ab LAB_0012f6e0: MOV RDI,RBX MOV RSI,R12 MOV EDX,0x2 CALL 0x001294d0 MOV R13,RAX TEST RAX,RAX JNZ 0x0012f6ff LEA R13,[0x14add8] LAB_0012f6ff: MOV dword ptr [RBX + 0x90],0x0 TEST R15,R15 JZ 0x0012f729 MOV RDI,R15 MOV RSI,R12 CALL 0x00113640 XOR ECX,ECX TEST EAX,EAX MOV EAX,dword ptr [RBP + -0x30] CMOVNZ EAX,ECX CMOVNZ R14,RCX JMP 0x0012f72c LAB_0012f729: MOV EAX,dword ptr [RBP + -0x30] LAB_0012f72c: MOV qword ptr [RBP + -0x30],R15 TEST R15,R15 LEA RCX,[RBP + -0x88] SETZ byte ptr [RCX + 0x48] MOV qword ptr [RCX + 0x30],R14 MOV dword ptr [RCX + 0x38],EAX LEA RAX,[0x12f976] MOV qword ptr [RCX],RAX LEA RAX,[0x12fa18] MOV qword ptr [RCX + 0x8],RAX LEA RAX,[0x1301a2] MOV qword ptr [RCX + 0x10],RAX MOV qword ptr [RCX + 0x18],RBX MOV qword ptr [RCX + 0x40],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RCX + 0x28],RAX LEA R15,[RBX + 0x48e] LAB_0012f780: MOV qword ptr [RBP + -0x68],R13 MOV RAX,qword ptr [RBX + 0x480] TEST RAX,RAX JZ 0x0012f7ad MOV RDI,qword ptr [RAX + 0x150] TEST RDI,RDI JZ 0x0012f7ad MOV RSI,R12 CALL 0x00113100 TEST RAX,RAX JZ 0x0012f925 LAB_0012f7ad: MOV RAX,qword ptr [RBX + 0x20] MOV byte ptr [RAX],0x0 LEA RDI,[RBP + -0x88] MOV RSI,RBX CALL qword ptr [R13 + 0x58] TEST EAX,EAX JZ 0x0012f7d6 JS 0x0012f7ef MOV RCX,qword ptr [RBX + 0x20] CMP byte ptr [RCX],0xfe JZ 0x0012f7f4 JMP 0x0012f946 LAB_0012f7d6: CMP qword ptr [RBX + 0x8],0x0 JZ 0x0012f8f9 MOV RAX,qword ptr [RBX + 0x20] CMP byte ptr [RAX],0xfe JZ 0x0012f7f4 JMP 0x0012f8f9 LAB_0012f7ef: CMP EAX,-0x1 JZ 0x0012f86f LAB_0012f7f4: MOVSXD R14,dword ptr [RBP + -0x3c] LAB_0012f7f8: MOV R13,qword ptr [RBX + 0x20] MOVZX EAX,byte ptr [R13] CMP EAX,0xfe JNZ 0x0012f8df MOV EAX,0x15 MOV RCX,R15 LEA R12,[0x136c71] CMP R14,0x1 JZ 0x0012f840 LEA R12,[R13 + 0x1] MOV RDI,R12 CALL 0x001131c0 MOV ECX,EAX SUB R14D,EAX ADD R14D,-0x2 ADD RCX,R13 ADD RCX,0x2 MOV EAX,R14D LAB_0012f840: MOV qword ptr [RBP + -0x58],RCX MOV dword ptr [RBP + -0x50],EAX MOV RDI,RBX MOV RSI,R12 MOV EDX,0x2 CALL 0x001294d0 MOV R13,RAX TEST RAX,RAX JNZ 0x0012f780 LEA R13,[0x14add8] JMP 0x0012f780 LAB_0012f86f: MOV RDI,RBX CALL 0x00115e47 MOV R14,RAX MOV EAX,0xffffffff CMP R14,RAX JNZ 0x0012f7f8 MOV R14D,0x1 CMP dword ptr [RBX + 0x90],0x7dd JNZ 0x0012f964 LEA RAX,[0x14bac0] MOV R15,qword ptr [RAX] LEA RAX,[0x14bad0] MOV R12,qword ptr [RAX + 0x1b8] CALL 0x00113060 MOV R9D,dword ptr [RAX] LEA R8,[0x1371ec] MOV RDI,RBX MOV ESI,0x7dd MOV RDX,R15 MOV RCX,R12 XOR EAX,EAX CALL 0x001160e1 JMP 0x0012f964 LAB_0012f8df: TEST EAX,EAX JNZ 0x0012f95e INC R13 MOV RDI,RBX MOV RSI,R13 MOV RDX,R14 CALL 0x0011b12e MOV R14D,EAX JMP 0x0012f964 LAB_0012f8f9: MOV R14D,0x1 CMP dword ptr [RBX + 0x90],0x0 JNZ 0x0012f964 LEA RAX,[0x14bac0] MOV RDX,qword ptr [RAX] MOV RDI,RBX MOV ESI,0x7d0 XOR ECX,ECX XOR EAX,EAX CALL 0x001160e1 JMP 0x0012f964 LAB_0012f925: LEA RAX,[0x14bac0] MOV RDX,qword ptr [RAX] MOV RDI,RBX MOV ESI,0x1392 XOR ECX,ECX MOV R8,qword ptr [RBP + -0x30] XOR EAX,EAX CALL 0x001160e1 JMP 0x0012f95e LAB_0012f946: LEA RCX,[0x14bac0] MOV RDX,qword ptr [RCX] MOV RDI,RBX MOV ESI,EAX XOR ECX,ECX XOR EAX,EAX CALL 0x001160e1 LAB_0012f95e: MOV R14D,0x1 LAB_0012f964: MOV EAX,R14D ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int4 run_plugin_auth(long param_1,char *param_2,int4 param_3,char *param_4,int8 param_5) { char *pcVar1; int *puVar2; int *puVar3; uint uVar4; int iVar5; int4 uVar6; int1 *puVar7; size_t sVar8; int *piVar9; char *pcVar10; char *pcVar11; long lVar12; code *local_90; code *local_88; code *local_80; long local_78; int1 *local_70; int8 local_68; char *local_60; int local_58; int8 local_50; int1 local_48; int local_44; int8 local_40; char *local_38; local_38 = (char *)CONCAT44(local_38._4_4_,param_3); uVar4 = (uint)*(int8 *)(param_1 + 0x370); if ((((uVar4 >> 0x13 & 1) == 0) || (((*(long *)(param_1 + 0x480) == 0 || (pcVar11 = *(char **)(*(long *)(param_1 + 0x480) + 8), pcVar11 == (char *)0x0)) && (pcVar11 = param_4, param_4 == (char *)0x0)))) && (pcVar11 = "mysql_native_password", (uVar4 >> 9 & 1) == 0)) { pcVar11 = "mysql_old_password"; } local_40 = param_5; puVar7 = (int1 *)mysql_client_find_plugin(param_1,pcVar11,2); if (puVar7 == (int1 *)0x0) { puVar7 = dummy_fallback_client_plugin; } *(int4 *)(param_1 + 0x90) = 0; local_60 = param_2; if (param_4 == (char *)0x0) { local_58 = (int)local_38; } else { iVar5 = strcmp(param_4,pcVar11); local_58 = (int)local_38; if (iVar5 != 0) { local_60 = (char *)0x0; local_58 = 0; } } local_48 = param_4 == (char *)0x0; local_90 = client_mpvio_read_packet; local_88 = client_mpvio_write_packet; local_80 = client_mpvio_info; local_50 = 0; local_68 = local_40; local_78 = param_1; local_38 = param_4; do { local_70 = puVar7; if (((*(long *)(param_1 + 0x480) != 0) && (pcVar1 = *(char **)(*(long *)(param_1 + 0x480) + 0x150), pcVar1 != (char *)0x0)) && (pcVar11 = strstr(pcVar1,pcVar11), pcVar11 == (char *)0x0)) { my_set_error(param_1,0x1392,SQLSTATE_UNKNOWN,0,local_38); goto LAB_0012f95e; } **(int1 **)(param_1 + 0x20) = 0; iVar5 = (**(code **)(puVar7 + 0x58))(&local_90,param_1); if (iVar5 == 0) { if ((*(long *)(param_1 + 8) == 0) || (**(char **)(param_1 + 0x20) != -2)) { if (*(int *)(param_1 + 0x90) != 0) { return 1; } my_set_error(param_1,2000,SQLSTATE_UNKNOWN,0); return 1; } LAB_0012f7f4: lVar12 = (long)local_44; } else { if (-1 < iVar5) { if (**(char **)(param_1 + 0x20) == -2) goto LAB_0012f7f4; my_set_error(param_1,iVar5,SQLSTATE_UNKNOWN,0); goto LAB_0012f95e; } if (iVar5 != -1) goto LAB_0012f7f4; lVar12 = ma_net_safe_read(param_1); puVar3 = PTR_s_Lost_connection_to_server_at___s_0014bc88; puVar2 = SQLSTATE_UNKNOWN; if (lVar12 == 0xffffffff) { if (*(int *)(param_1 + 0x90) != 0x7dd) { return 1; } piVar9 = __errno_location(); my_set_error(param_1,0x7dd,puVar2,puVar3,"reading authorization packet",*piVar9); return 1; } } pcVar1 = *(char **)(param_1 + 0x20); if (*pcVar1 != -2) { if (*pcVar1 == '\0') { uVar6 = ma_read_ok_packet(param_1,pcVar1 + 1,lVar12); } else { LAB_0012f95e: uVar6 = 1; } return uVar6; } iVar5 = 0x15; pcVar11 = "mysql_old_password"; pcVar10 = (char *)(param_1 + 0x48e); if (lVar12 != 1) { pcVar11 = pcVar1 + 1; sVar8 = strlen(pcVar11); iVar5 = ((int)lVar12 - (int)sVar8) + -2; pcVar10 = pcVar1 + (sVar8 & 0xffffffff) + 2; } local_60 = pcVar10; local_58 = iVar5; puVar7 = (int1 *)mysql_client_find_plugin(param_1,pcVar11,2); if (puVar7 == (int1 *)0x0) { puVar7 = dummy_fallback_client_plugin; } } while( true ); }
6,602
ma_reset_status
eloqsql/storage/maria/ma_delete_all.c
void _ma_reset_status(MARIA_HA *info) { MARIA_SHARE *share= info->s; MARIA_STATE_INFO *state= &share->state; uint i; DBUG_ENTER("_ma_reset_status"); state->split= 0; state->state.records= state->state.del= 0; state->changed= 0; /* File is optimized */ state->dellink= HA_OFFSET_ERROR; state->sortkey= (ushort) ~0; state->state.key_file_length= share->base.keystart; state->state.data_file_length= 0; state->state.empty= state->state.key_empty= 0; state->state.checksum= 0; share->state.open_count= 0; share->global_changed= 0; share->changed= 1; /* We must write state */ *info->state= state->state; /* Drop the delete key chain. */ state->key_del= HA_OFFSET_ERROR; /* Clear all keys */ for (i=0 ; i < share->base.keys ; i++) state->key_root[i]= HA_OFFSET_ERROR; DBUG_VOID_RETURN; }
O3
c
ma_reset_status: pushq %rbp movq %rsp, %rbp movq (%rdi), %rax xorl %ecx, %ecx movq %rcx, 0xc0(%rax) movl %ecx, 0x170(%rax) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%rax) movq $-0x1, %rdx movq %rdx, 0xc8(%rax) movq $0xffff, 0x168(%rax) # imm = 0xFFFF movq 0x360(%rax), %rsi movq %rsi, 0x38(%rax) movq %rcx, 0x40(%rax) movl %ecx, 0x48(%rax) movups %xmm0, 0x28(%rax) movw $0x1, 0x7de(%rax) movq 0x20(%rdi), %rsi movups %xmm0, 0x10(%rsi) movq 0x48(%rax), %rdi movq %rdi, 0x30(%rsi) movups 0x38(%rax), %xmm1 movups %xmm1, 0x20(%rsi) movups %xmm0, (%rsi) movq %rdx, 0x120(%rax) cmpl %ecx, 0x3e8(%rax) je 0x5f937 xorl %ecx, %ecx movq 0x118(%rax), %rdx movq $-0x1, (%rdx,%rcx,8) incq %rcx movl 0x3e8(%rax), %edx cmpq %rdx, %rcx jb 0x5f91a popq %rbp retq
_ma_reset_status: push rbp mov rbp, rsp mov rax, [rdi] xor ecx, ecx mov [rax+0C0h], rcx mov [rax+170h], ecx xorps xmm0, xmm0 movups xmmword ptr [rax+18h], xmm0 mov rdx, 0FFFFFFFFFFFFFFFFh mov [rax+0C8h], rdx mov qword ptr [rax+168h], 0FFFFh mov rsi, [rax+360h] mov [rax+38h], rsi mov [rax+40h], rcx mov [rax+48h], ecx movups xmmword ptr [rax+28h], xmm0 mov word ptr [rax+7DEh], 1 mov rsi, [rdi+20h] movups xmmword ptr [rsi+10h], xmm0 mov rdi, [rax+48h] mov [rsi+30h], rdi movups xmm1, xmmword ptr [rax+38h] movups xmmword ptr [rsi+20h], xmm1 movups xmmword ptr [rsi], xmm0 mov [rax+120h], rdx cmp [rax+3E8h], ecx jz short loc_5F937 xor ecx, ecx loc_5F91A: mov rdx, [rax+118h] mov qword ptr [rdx+rcx*8], 0FFFFFFFFFFFFFFFFh inc rcx mov edx, [rax+3E8h] cmp rcx, rdx jb short loc_5F91A loc_5F937: pop rbp retn
long long ma_reset_status(long long *a1) { long long result; // rax long long v2; // rsi unsigned long long v3; // rcx result = *a1; *(_QWORD *)(result + 192) = 0LL; *(_DWORD *)(result + 368) = 0; *(_OWORD *)(result + 24) = 0LL; *(_QWORD *)(result + 200) = -1LL; *(_QWORD *)(result + 360) = 0xFFFFLL; *(_QWORD *)(result + 56) = *(_QWORD *)(result + 864); *(_QWORD *)(result + 64) = 0LL; *(_DWORD *)(result + 72) = 0; *(_OWORD *)(result + 40) = 0LL; *(_WORD *)(result + 2014) = 1; v2 = a1[4]; *(_OWORD *)(v2 + 16) = 0LL; *(_QWORD *)(v2 + 48) = *(_QWORD *)(result + 72); *(_OWORD *)(v2 + 32) = *(_OWORD *)(result + 56); *(_OWORD *)v2 = 0LL; *(_QWORD *)(result + 288) = -1LL; if ( *(_DWORD *)(result + 1000) ) { v3 = 0LL; do *(_QWORD *)(*(_QWORD *)(result + 280) + 8 * v3++) = -1LL; while ( v3 < *(unsigned int *)(result + 1000) ); } return result; }
_ma_reset_status: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI] XOR ECX,ECX MOV qword ptr [RAX + 0xc0],RCX MOV dword ptr [RAX + 0x170],ECX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x18],XMM0 MOV RDX,-0x1 MOV qword ptr [RAX + 0xc8],RDX MOV qword ptr [RAX + 0x168],0xffff MOV RSI,qword ptr [RAX + 0x360] MOV qword ptr [RAX + 0x38],RSI MOV qword ptr [RAX + 0x40],RCX MOV dword ptr [RAX + 0x48],ECX MOVUPS xmmword ptr [RAX + 0x28],XMM0 MOV word ptr [RAX + 0x7de],0x1 MOV RSI,qword ptr [RDI + 0x20] MOVUPS xmmword ptr [RSI + 0x10],XMM0 MOV RDI,qword ptr [RAX + 0x48] MOV qword ptr [RSI + 0x30],RDI MOVUPS XMM1,xmmword ptr [RAX + 0x38] MOVUPS xmmword ptr [RSI + 0x20],XMM1 MOVUPS xmmword ptr [RSI],XMM0 MOV qword ptr [RAX + 0x120],RDX CMP dword ptr [RAX + 0x3e8],ECX JZ 0x0015f937 XOR ECX,ECX LAB_0015f91a: MOV RDX,qword ptr [RAX + 0x118] MOV qword ptr [RDX + RCX*0x8],-0x1 INC RCX MOV EDX,dword ptr [RAX + 0x3e8] CMP RCX,RDX JC 0x0015f91a LAB_0015f937: POP RBP RET
void _ma_reset_status(long *param_1) { long lVar1; int8 *puVar2; int8 uVar3; ulong uVar4; lVar1 = *param_1; *(int8 *)(lVar1 + 0xc0) = 0; *(int4 *)(lVar1 + 0x170) = 0; *(int8 *)(lVar1 + 0x18) = 0; *(int8 *)(lVar1 + 0x20) = 0; *(int8 *)(lVar1 + 200) = 0xffffffffffffffff; *(int8 *)(lVar1 + 0x168) = 0xffff; *(int8 *)(lVar1 + 0x38) = *(int8 *)(lVar1 + 0x360); *(int8 *)(lVar1 + 0x40) = 0; *(int4 *)(lVar1 + 0x48) = 0; *(int8 *)(lVar1 + 0x28) = 0; *(int8 *)(lVar1 + 0x30) = 0; *(int2 *)(lVar1 + 0x7de) = 1; puVar2 = (int8 *)param_1[4]; puVar2[2] = 0; puVar2[3] = 0; puVar2[6] = *(int8 *)(lVar1 + 0x48); uVar3 = *(int8 *)(lVar1 + 0x40); puVar2[4] = *(int8 *)(lVar1 + 0x38); puVar2[5] = uVar3; *puVar2 = 0; puVar2[1] = 0; *(int8 *)(lVar1 + 0x120) = 0xffffffffffffffff; if (*(int *)(lVar1 + 1000) != 0) { uVar4 = 0; do { *(int8 *)(*(long *)(lVar1 + 0x118) + uVar4 * 8) = 0xffffffffffffffff; uVar4 = uVar4 + 1; } while (uVar4 < *(uint *)(lVar1 + 1000)); } return; }
6,603
my_caseup_utf16
eloqsql/strings/ctype-ucs2.c
static size_t my_caseup_utf16(CHARSET_INFO *cs, const char *src, size_t srclen, char *dst, size_t dstlen) { my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; my_charset_conv_wc_mb wc_mb= cs->cset->wc_mb; int res; const char *srcend= src + srclen; char *dstend= dst + dstlen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(srclen <= dstlen); while ((src < srcend) && (res= mb_wc(cs, &wc, (uchar *) src, (uchar *) srcend)) > 0) { my_toupper_utf16(uni_plane, &wc); if (res != wc_mb(cs, wc, (uchar *) dst, (uchar *) dstend)) break; src+= res; dst+= res; } return srclen; }
O3
c
my_caseup_utf16: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r8, -0x38(%rbp) movq %rdx, -0x30(%rbp) testq %rdx, %rdx jle 0x28ff9 movq %rcx, %r15 movq %rsi, %r12 movq %rdi, %r13 movq 0x78(%rdi), %rax movq %rax, -0x50(%rbp) movq 0xb8(%rdi), %rax movq 0x28(%rax), %rcx movq %rcx, -0x58(%rbp) movq 0x30(%rax), %rax movq %rax, -0x48(%rbp) movq -0x30(%rbp), %rax leaq (%rsi,%rax), %r14 addq %r15, -0x38(%rbp) movq %r13, %rdi leaq -0x40(%rbp), %rsi movq %r12, %rdx movq %r14, %rcx callq *-0x58(%rbp) testl %eax, %eax jle 0x28ff9 movl %eax, %ebx movq -0x40(%rbp), %rsi movq -0x50(%rbp), %rax cmpq (%rax), %rsi ja 0x28fdb movq 0x8(%rax), %rax movq %rsi, %rcx shrq $0x8, %rcx movq (%rax,%rcx,8), %rax testq %rax, %rax je 0x28fdb movzbl %sil, %ecx leaq (%rcx,%rcx,2), %rcx movl (%rax,%rcx,4), %esi movq %rsi, -0x40(%rbp) movq %r13, %rdi movq %r15, %rdx movq -0x38(%rbp), %rcx callq *-0x48(%rbp) cmpl %eax, %ebx jne 0x28ff9 movl %ebx, %eax addq %rax, %r12 addq %rax, %r15 cmpq %r14, %r12 jb 0x28f95 movq -0x30(%rbp), %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_caseup_utf16: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov [rbp+var_38], r8 mov [rbp+var_30], rdx test rdx, rdx jle loc_28FF9 mov r15, rcx mov r12, rsi mov r13, rdi mov rax, [rdi+78h] mov [rbp+var_50], rax mov rax, [rdi+0B8h] mov rcx, [rax+28h] mov [rbp+var_58], rcx mov rax, [rax+30h] mov [rbp+var_48], rax mov rax, [rbp+var_30] lea r14, [rsi+rax] add [rbp+var_38], r15 loc_28F95: mov rdi, r13 lea rsi, [rbp+var_40] mov rdx, r12 mov rcx, r14 call [rbp+var_58] test eax, eax jle short loc_28FF9 mov ebx, eax mov rsi, [rbp+var_40] mov rax, [rbp+var_50] cmp rsi, [rax] ja short loc_28FDB mov rax, [rax+8] mov rcx, rsi shr rcx, 8 mov rax, [rax+rcx*8] test rax, rax jz short loc_28FDB movzx ecx, sil lea rcx, [rcx+rcx*2] mov esi, [rax+rcx*4] mov [rbp+var_40], rsi loc_28FDB: mov rdi, r13 mov rdx, r15 mov rcx, [rbp+var_38] call [rbp+var_48] cmp ebx, eax jnz short loc_28FF9 mov eax, ebx add r12, rax add r15, rax cmp r12, r14 jb short loc_28F95 loc_28FF9: mov rax, [rbp+var_30] add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_caseup_utf16(long long a1, unsigned long long a2, long long a3, long long a4, long long a5) { long long v5; // r15 unsigned long long v6; // r12 long long v7; // rax unsigned long long v8; // r14 int v9; // eax unsigned int v10; // ebx unsigned long long v11; // rsi long long v12; // rax long long ( *v14)(long long, unsigned long long *, unsigned long long, unsigned long long); // [rsp+8h] [rbp-58h] unsigned long long *v15; // [rsp+10h] [rbp-50h] unsigned int ( *v16)(long long, unsigned long long, long long, long long); // [rsp+18h] [rbp-48h] unsigned long long v17; // [rsp+20h] [rbp-40h] BYREF long long v18; // [rsp+28h] [rbp-38h] long long v19; // [rsp+30h] [rbp-30h] v18 = a5; v19 = a3; if ( a3 > 0 ) { v5 = a4; v6 = a2; v15 = *(unsigned long long **)(a1 + 120); v7 = *(_QWORD *)(a1 + 184); v14 = *(long long ( **)(long long, unsigned long long *, unsigned long long, unsigned long long))(v7 + 40); v16 = *(unsigned int ( **)(long long, unsigned long long, long long, long long))(v7 + 48); v8 = a2 + v19; v18 += a4; do { v9 = v14(a1, &v17, v6, v8); if ( v9 <= 0 ) break; v10 = v9; v11 = v17; if ( v17 <= *v15 ) { v12 = *(_QWORD *)(v15[1] + 8 * (v17 >> 8)); if ( v12 ) { v11 = *(unsigned int *)(v12 + 12LL * (unsigned __int8)v17); v17 = v11; } } if ( v10 != v16(a1, v11, v5, v18) ) break; v6 += v10; v5 += v10; } while ( v6 < v8 ); } return v19; }
my_caseup_utf16: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV qword ptr [RBP + -0x38],R8 MOV qword ptr [RBP + -0x30],RDX TEST RDX,RDX JLE 0x00128ff9 MOV R15,RCX MOV R12,RSI MOV R13,RDI MOV RAX,qword ptr [RDI + 0x78] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RDI + 0xb8] MOV RCX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x58],RCX MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x30] LEA R14,[RSI + RAX*0x1] ADD qword ptr [RBP + -0x38],R15 LAB_00128f95: MOV RDI,R13 LEA RSI,[RBP + -0x40] MOV RDX,R12 MOV RCX,R14 CALL qword ptr [RBP + -0x58] TEST EAX,EAX JLE 0x00128ff9 MOV EBX,EAX MOV RSI,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x50] CMP RSI,qword ptr [RAX] JA 0x00128fdb MOV RAX,qword ptr [RAX + 0x8] MOV RCX,RSI SHR RCX,0x8 MOV RAX,qword ptr [RAX + RCX*0x8] TEST RAX,RAX JZ 0x00128fdb MOVZX ECX,SIL LEA RCX,[RCX + RCX*0x2] MOV ESI,dword ptr [RAX + RCX*0x4] MOV qword ptr [RBP + -0x40],RSI LAB_00128fdb: MOV RDI,R13 MOV RDX,R15 MOV RCX,qword ptr [RBP + -0x38] CALL qword ptr [RBP + -0x48] CMP EBX,EAX JNZ 0x00128ff9 MOV EAX,EBX ADD R12,RAX ADD R15,RAX CMP R12,R14 JC 0x00128f95 LAB_00128ff9: MOV RAX,qword ptr [RBP + -0x30] ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_caseup_utf16(long param_1,ulong param_2,long param_3,long param_4,long param_5) { ulong uVar1; ulong *puVar2; code *pcVar3; code *pcVar4; long lVar5; uint uVar6; uint uVar7; ulong local_48; long local_40; long local_38; local_38 = param_3; if (0 < param_3) { puVar2 = *(ulong **)(param_1 + 0x78); pcVar3 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); pcVar4 = *(code **)(*(long *)(param_1 + 0xb8) + 0x30); uVar1 = param_2 + param_3; local_40 = param_5 + param_4; do { uVar6 = (*pcVar3)(param_1,&local_48,param_2,uVar1); if ((int)uVar6 < 1) { return local_38; } if ((local_48 <= *puVar2) && (lVar5 = *(long *)(puVar2[1] + (local_48 >> 8) * 8), lVar5 != 0)) { local_48 = (ulong)*(uint *)(lVar5 + (local_48 & 0xff) * 0xc); } uVar7 = (*pcVar4)(param_1,local_48,param_4,local_40); if (uVar6 != uVar7) { return local_38; } param_2 = param_2 + uVar6; param_4 = param_4 + (ulong)uVar6; } while (param_2 < uVar1); } return local_38; }
6,604
my_open
eloqsql/mysys/my_open.c
File my_open(const char *FileName, int Flags, myf MyFlags) /* Path-name of file */ /* Read | write .. */ /* Special flags */ { File fd; DBUG_ENTER("my_open"); DBUG_PRINT("my",("Name: '%s' Flags: %d MyFlags: %lu", FileName, Flags, MyFlags)); if (!(MyFlags & (MY_WME | MY_FAE | MY_FFNF))) MyFlags|= my_global_flags; #if defined(_WIN32) fd= my_win_open(FileName, Flags); #else if (MyFlags & MY_NOSYMLINKS) fd = open_nosymlinks(FileName, Flags | O_CLOEXEC, my_umask); else fd = open(FileName, Flags | O_CLOEXEC, my_umask); #endif fd= my_register_filename(fd, FileName, FILE_BY_OPEN, EE_FILENOTFOUND, MyFlags); DBUG_RETURN(fd); }
O3
c
my_open: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movl %esi, %r15d movq %rdi, %rbx testb $0x19, %dl jne 0x5047a leaq 0x319c13(%rip), %rax # 0x36a088 movq (%rax), %r14 jmp 0x5047d xorl %r14d, %r14d orq %rdx, %r14 btl $0x9, %r14d jb 0x504a9 orl $0x80000, %r15d # imm = 0x80000 leaq 0x2e6f63(%rip), %rax # 0x3373f8 movl (%rax), %edx movq %rbx, %rdi movl %r15d, %esi xorl %eax, %eax callq 0x25560 movl %eax, %r15d jmp 0x504f5 leaq 0x2e6f48(%rip), %rax # 0x3373f8 movl (%rax), %r12d leaq -0x24(%rbp), %rsi movq %rbx, %rdi callq 0x50afc testq %rax, %rax je 0x504ef movl -0x24(%rbp), %edi orl $0xa0000, %r15d # imm = 0xA0000 movq %rax, %rsi movl %r15d, %edx movl %r12d, %ecx xorl %eax, %eax callq 0x252c0 movl %eax, %r15d movl -0x24(%rbp), %edi testl %edi, %edi js 0x504f5 callq 0x255b0 jmp 0x504f5 movl $0xffffffff, %r15d # imm = 0xFFFFFFFF movl %r15d, %edi movq %rbx, %rsi movl $0x1, %edx movl $0x1d, %ecx movq %r14, %r8 callq 0x5051a addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
my_open: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 10h mov r15d, esi mov rbx, rdi test dl, 19h jnz short loc_5047A lea rax, my_global_flags mov r14, [rax] jmp short loc_5047D loc_5047A: xor r14d, r14d loc_5047D: or r14, rdx bt r14d, 9 jb short loc_504A9 or r15d, 80000h lea rax, my_umask mov edx, [rax] mov rdi, rbx mov esi, r15d xor eax, eax call _open64 mov r15d, eax jmp short loc_504F5 loc_504A9: lea rax, my_umask mov r12d, [rax] lea rsi, [rbp+var_24] mov rdi, rbx call my_open_parent_dir_nosymlinks test rax, rax jz short loc_504EF mov edi, [rbp+var_24] or r15d, 0A0000h mov rsi, rax mov edx, r15d mov ecx, r12d xor eax, eax call _openat64 mov r15d, eax mov edi, [rbp+var_24] test edi, edi js short loc_504F5 call _close jmp short loc_504F5 loc_504EF: mov r15d, 0FFFFFFFFh loc_504F5: mov edi, r15d mov rsi, rbx mov edx, 1 mov ecx, 1Dh mov r8, r14 call my_register_filename add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long my_open(long long a1, int a2, long long a3) { long long v3; // r14 long long v4; // r14 unsigned int v5; // r15d unsigned int v6; // r12d long long v7; // rax int v9[9]; // [rsp+Ch] [rbp-24h] BYREF if ( (a3 & 0x19) != 0 ) v3 = 0LL; else v3 = my_global_flags; v4 = a3 | v3; if ( (v4 & 0x200) != 0 ) { v6 = my_umask; v7 = my_open_parent_dir_nosymlinks(a1, v9); if ( v7 ) { v5 = openat64((unsigned int)v9[0], v7, a2 | 0xA0000u, v6); if ( v9[0] >= 0 ) close(); } else { v5 = -1; } } else { v5 = open64(a1, a2 | 0x80000u, my_umask); } return my_register_filename(v5, a1, 1LL, 29LL, v4); }
my_open: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R15D,ESI MOV RBX,RDI TEST DL,0x19 JNZ 0x0015047a LEA RAX,[0x46a088] MOV R14,qword ptr [RAX] JMP 0x0015047d LAB_0015047a: XOR R14D,R14D LAB_0015047d: OR R14,RDX BT R14D,0x9 JC 0x001504a9 OR R15D,0x80000 LEA RAX,[0x4373f8] MOV EDX,dword ptr [RAX] MOV RDI,RBX MOV ESI,R15D XOR EAX,EAX CALL 0x00125560 MOV R15D,EAX JMP 0x001504f5 LAB_001504a9: LEA RAX,[0x4373f8] MOV R12D,dword ptr [RAX] LEA RSI,[RBP + -0x24] MOV RDI,RBX CALL 0x00150afc TEST RAX,RAX JZ 0x001504ef MOV EDI,dword ptr [RBP + -0x24] OR R15D,0xa0000 MOV RSI,RAX MOV EDX,R15D MOV ECX,R12D XOR EAX,EAX CALL 0x001252c0 MOV R15D,EAX MOV EDI,dword ptr [RBP + -0x24] TEST EDI,EDI JS 0x001504f5 CALL 0x001255b0 JMP 0x001504f5 LAB_001504ef: MOV R15D,0xffffffff LAB_001504f5: MOV EDI,R15D MOV RSI,RBX MOV EDX,0x1 MOV ECX,0x1d MOV R8,R14 CALL 0x0015051a ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET
void my_open(char *param_1,uint param_2,ulong param_3) { uint uVar1; int iVar2; char *__file; ulong uVar3; int local_2c; uVar1 = my_umask; uVar3 = my_global_flags; if ((param_3 & 0x19) != 0) { uVar3 = 0; } if (((uint)(uVar3 | param_3) >> 9 & 1) == 0) { iVar2 = open64(param_1,param_2 | 0x80000,(ulong)my_umask); } else { __file = (char *)my_open_parent_dir_nosymlinks(param_1,&local_2c); if (__file == (char *)0x0) { iVar2 = -1; } else { iVar2 = openat64(local_2c,__file,param_2 | 0xa0000,(ulong)uVar1); if (-1 < local_2c) { close(local_2c); } } } my_register_filename(iVar2,param_1,1,0x1d,uVar3 | param_3); return; }
6,605
fmt::v10::appender fmt::v10::detail::write_float<char, fmt::v10::appender, long double>(fmt::v10::appender, long double, fmt::v10::format_specs<char>, fmt::v10::detail::locale_ref)
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h
FMT_CONSTEXPR20 auto write_float(OutputIt out, T value, format_specs<Char> specs, locale_ref loc) -> OutputIt { float_specs fspecs = parse_float_type_spec(specs); fspecs.sign = specs.sign; if (detail::signbit(value)) { // value < 0 is false for NaN so use signbit. fspecs.sign = sign::minus; value = -value; } else if (fspecs.sign == sign::minus) { fspecs.sign = sign::none; } if (!detail::isfinite(value)) return write_nonfinite(out, detail::isnan(value), specs, fspecs); if (specs.align == align::numeric && fspecs.sign) { auto it = reserve(out, 1); *it++ = detail::sign<Char>(fspecs.sign); out = base_iterator(out, it); fspecs.sign = sign::none; if (specs.width != 0) --specs.width; } memory_buffer buffer; if (fspecs.format == float_format::hex) { if (fspecs.sign) buffer.push_back(detail::sign<char>(fspecs.sign)); format_hexfloat(convert_float(value), specs.precision, fspecs, buffer); return write_bytes<align::right>(out, {buffer.data(), buffer.size()}, specs); } int precision = specs.precision >= 0 || specs.type == presentation_type::none ? specs.precision : 6; if (fspecs.format == float_format::exp) { if (precision == max_value<int>()) throw_format_error("number is too big"); else ++precision; } else if (fspecs.format != float_format::fixed && precision == 0) { precision = 1; } if (const_check(std::is_same<T, float>())) fspecs.binary32 = true; int exp = format_float(convert_float(value), precision, fspecs, buffer); fspecs.precision = precision; auto f = big_decimal_fp{buffer.data(), static_cast<int>(buffer.size()), exp}; return write_float(out, f, specs, fspecs, loc); }
O0
c
fmt::v10::appender fmt::v10::detail::write_float<char, fmt::v10::appender, long double>(fmt::v10::appender, long double, fmt::v10::format_specs<char>, fmt::v10::detail::locale_ref): subq $0x3a8, %rsp # imm = 0x3A8 fldt 0x3b0(%rsp) movq %rdi, 0x380(%rsp) movq %rsi, 0x370(%rsp) movq %rdx, 0x378(%rsp) movq %rcx, 0x368(%rsp) fstpt 0x350(%rsp) leaq 0x370(%rsp), %rdi callq 0xd8520 movq %rax, 0x348(%rsp) movb 0x379(%rsp), %al shrb $0x4, %al andb $0x7, %al movb %al, 0x34d(%rsp) fldt 0x350(%rsp) fstpt 0x390(%rsp) fldt 0x390(%rsp) fstpl 0x68(%rsp) movsd 0x68(%rsp), %xmm0 callq 0xd2250 testb $0x1, %al jne 0xd7ed7 jmp 0xd7ef1 movb $0x1, 0x34d(%rsp) fldt 0x350(%rsp) fchs fstpt 0x350(%rsp) jmp 0xd7f20 movl 0x34c(%rsp), %eax shrl $0x8, %eax andl $0xff, %eax movzbl %al, %eax cmpl $0x1, %eax jne 0xd7f1e movl 0x34c(%rsp), %eax andl $0xffff00ff, %eax # imm = 0xFFFF00FF orl $0x0, %eax movl %eax, 0x34c(%rsp) jmp 0xd7f20 fldt 0x350(%rsp) movq %rsp, %rax fstpt (%rax) callq 0xd86e0 testb $0x1, %al jne 0xd7fae movq 0x380(%rsp), %rax movq %rax, 0x340(%rsp) fldt 0x350(%rsp) movq %rsp, %rax fstpt (%rax) callq 0xd8710 movq 0x370(%rsp), %rcx movq %rcx, 0x330(%rsp) movq 0x378(%rsp), %rcx movq %rcx, 0x338(%rsp) movq 0x340(%rsp), %rdi movq 0x330(%rsp), %rdx movq 0x338(%rsp), %rcx movzbl %al, %esi andl $0x1, %esi leaq 0x348(%rsp), %r8 callq 0xd2020 movq %rax, 0x388(%rsp) jmp 0xd8446 movw 0x379(%rsp), %ax andw $0xf, %ax movzbl %al, %eax cmpl $0x4, %eax jne 0xd80cc movl 0x34c(%rsp), %eax shrl $0x8, %eax andl $0xff, %eax cmpb $0x0, %al je 0xd80cc leaq 0x380(%rsp), %rdi movl $0x1, %esi callq 0xcd6b0 movq (%rax), %rax movq %rax, 0x328(%rsp) movl 0x34c(%rsp), %eax shrl $0x8, %eax andl $0xff, %eax movzbl %al, %edi callq 0xd2570 movb %al, 0x327(%rsp) leaq 0x328(%rsp), %rdi xorl %esi, %esi callq 0x24c00 movq %rax, 0x318(%rsp) leaq 0x318(%rsp), %rdi callq 0x24c20 movq %rax, %rdi leaq 0x327(%rsp), %rsi callq 0x24c30 movq 0x380(%rsp), %rax movq %rax, 0x308(%rsp) movq 0x328(%rsp), %rax movq %rax, 0x300(%rsp) movq 0x308(%rsp), %rdi movq 0x300(%rsp), %rsi callq 0xcd7e0 movq %rax, 0x310(%rsp) movq 0x310(%rsp), %rax movq %rax, 0x380(%rsp) movl 0x34c(%rsp), %eax andl $0xffff00ff, %eax # imm = 0xFFFF00FF orl $0x0, %eax movl %eax, 0x34c(%rsp) cmpl $0x0, 0x370(%rsp) je 0xd80ca movl 0x370(%rsp), %eax addl $-0x1, %eax movl %eax, 0x370(%rsp) jmp 0xd80cc leaq 0xe7(%rsp), %rdi movq %rdi, 0x60(%rsp) callq 0x15de0 movq 0x60(%rsp), %rsi leaq 0xe8(%rsp), %rdi callq 0xc7960 jmp 0xd80f2 leaq 0xe7(%rsp), %rdi callq 0x157f0 movl 0x34c(%rsp), %eax andl $0xff, %eax cmpb $0x3, %al jne 0xd827c movl 0x34c(%rsp), %eax shrl $0x8, %eax andl $0xff, %eax cmpb $0x0, %al je 0xd819f movzbl 0x34d(%rsp), %edi callq 0xd2570 movb %al, 0xd3(%rsp) leaq 0xe8(%rsp), %rdi leaq 0xd3(%rsp), %rsi callq 0x24c60 jmp 0xd8151 jmp 0xd819f movq %rax, %rcx movl %edx, %eax movq %rcx, 0xd8(%rsp) movl %eax, 0xd4(%rsp) leaq 0xe7(%rsp), %rdi callq 0x157f0 jmp 0xd8456 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xd8(%rsp) movl %eax, 0xd4(%rsp) leaq 0xe8(%rsp), %rdi callq 0xc79c0 jmp 0xd8456 fldt 0x350(%rsp) movq %rsp, %rax fstpt (%rax) callq 0xd8cf0 fstpt 0x54(%rsp) jmp 0xd81b6 fldt 0x54(%rsp) movl 0x374(%rsp), %edi movq 0x348(%rsp), %rax movq %rax, 0xc8(%rsp) movq 0xc8(%rsp), %rsi movq %rsp, %rax fstpt (%rax) leaq 0xe8(%rsp), %rdx callq 0xd8720 jmp 0xd81ed movq 0x380(%rsp), %rax movq %rax, 0xc0(%rsp) leaq 0xe8(%rsp), %rdi movq %rdi, 0x38(%rsp) callq 0x243d0 movq 0x38(%rsp), %rdi movq %rax, 0x40(%rsp) callq 0x243e0 movq 0x40(%rsp), %rsi movq %rax, %rdx leaq 0xb0(%rsp), %rdi callq 0x243f0 movq 0xc0(%rsp), %rdi movq 0xb0(%rsp), %rsi movq 0xb8(%rsp), %rdx leaq 0x370(%rsp), %rcx callq 0xd8d00 movq %rax, 0x48(%rsp) jmp 0xd825f movq 0x48(%rsp), %rax movq %rax, 0x388(%rsp) movl $0x1, 0xac(%rsp) jmp 0xd8439 cmpl $0x0, 0x374(%rsp) jge 0xd8290 cmpb $0x0, 0x378(%rsp) jne 0xd829d movl 0x374(%rsp), %eax movl %eax, 0x34(%rsp) jmp 0xd82a8 movl $0x6, %eax movl %eax, 0x34(%rsp) jmp 0xd82a8 movl 0x34(%rsp), %eax movl %eax, 0xa8(%rsp) movl 0x34c(%rsp), %eax andl $0xff, %eax cmpb $0x1, %al jne 0xd82fe movl 0xa8(%rsp), %eax movl %eax, 0x30(%rsp) callq 0xd4040 movl %eax, %ecx movl 0x30(%rsp), %eax cmpl %ecx, %eax jne 0xd82eb leaq 0x7a297(%rip), %rdi # 0x15257b callq 0xc62f0 jmp 0xd82eb movl 0xa8(%rsp), %eax addl $0x1, %eax movl %eax, 0xa8(%rsp) jmp 0xd8325 movl 0x34c(%rsp), %eax andl $0xff, %eax cmpb $0x2, %al je 0xd8323 cmpl $0x0, 0xa8(%rsp) jne 0xd8323 movl $0x1, 0xa8(%rsp) jmp 0xd8325 fldt 0x350(%rsp) movq %rsp, %rax fstpt (%rax) callq 0xd8cf0 fstpt 0x24(%rsp) jmp 0xd833c fldt 0x24(%rsp) movl 0xa8(%rsp), %edi movq 0x348(%rsp), %rax movq %rax, 0x98(%rsp) movq 0x98(%rsp), %rsi movq %rsp, %rax fstpt (%rax) leaq 0xe8(%rsp), %rdx callq 0xd8d70 movl %eax, 0x20(%rsp) jmp 0xd8377 movl 0x20(%rsp), %eax movl %eax, 0xa4(%rsp) movl 0xa8(%rsp), %eax movl %eax, 0x348(%rsp) leaq 0xe8(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x243d0 movq 0x10(%rsp), %rdi movq %rax, 0x88(%rsp) callq 0x243e0 movl %eax, 0x90(%rsp) movl 0xa4(%rsp), %eax movl %eax, 0x94(%rsp) movq 0x380(%rsp), %rax movq %rax, 0x80(%rsp) movq 0x348(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x368(%rsp), %rax movq %rax, 0x70(%rsp) movq 0x80(%rsp), %rdi movq 0x78(%rsp), %rcx movq 0x70(%rsp), %r8 leaq 0x88(%rsp), %rsi leaq 0x370(%rsp), %rdx callq 0xd91c0 movq %rax, 0x18(%rsp) jmp 0xd8421 movq 0x18(%rsp), %rax movq %rax, 0x388(%rsp) movl $0x1, 0xac(%rsp) leaq 0xe8(%rsp), %rdi callq 0xc79c0 movq 0x388(%rsp), %rax addq $0x3a8, %rsp # imm = 0x3A8 retq movq 0xd8(%rsp), %rdi callq 0x15dd0 nopw %cs:(%rax,%rax) nopl (%rax)
_ZN3fmt3v106detail11write_floatIcNS0_8appenderEeEET0_S4_T1_NS0_12format_specsIT_EENS1_10locale_refE: sub rsp, 3A8h fld [rsp+3A8h+arg_0] mov [rsp+3A8h+var_28], rdi mov [rsp+3A8h+var_38], rsi mov [rsp+3A8h+var_30], rdx mov [rsp+3A8h+var_40], rcx fstp [rsp+3A8h+var_58] lea rdi, [rsp+3A8h+var_38] call _ZN3fmt3v106detail21parse_float_type_specIcEENS1_11float_specsERKNS0_12format_specsIT_EE; fmt::v10::detail::parse_float_type_spec<char>(fmt::v10::format_specs<char> const&) mov [rsp+3A8h+var_60], rax mov al, byte ptr [rsp+3A8h+var_30+1] shr al, 4 and al, 7 mov byte ptr [rsp+3A8h+var_60+5], al fld [rsp+3A8h+var_58] fstp [rsp+3A8h+var_18] fld [rsp+3A8h+var_18] fstp [rsp+3A8h+var_340] movsd xmm0, [rsp+3A8h+var_340]; double call _ZSt7signbitd; std::signbit(double) test al, 1 jnz short loc_D7ED7 jmp short loc_D7EF1 loc_D7ED7: mov byte ptr [rsp+3A8h+var_60+5], 1 fld [rsp+3A8h+var_58] fchs fstp [rsp+3A8h+var_58] jmp short loc_D7F20 loc_D7EF1: mov eax, dword ptr [rsp+3A8h+var_60+4] shr eax, 8 and eax, 0FFh movzx eax, al cmp eax, 1 jnz short loc_D7F1E mov eax, dword ptr [rsp+3A8h+var_60+4] and eax, 0FFFF00FFh or eax, 0 mov dword ptr [rsp+3A8h+var_60+4], eax loc_D7F1E: jmp short $+2 loc_D7F20: fld [rsp+3A8h+var_58] mov rax, rsp fstp tbyte ptr [rax] call _ZN3fmt3v106detail8isfiniteIeTnNSt9enable_ifIXaasr3std17is_floating_pointIT_EE5valuesr12has_isfiniteIS4_EE5valueEiE4typeELi0EEEbS4_ test al, 1 jnz short loc_D7FAE mov rax, [rsp+3A8h+var_28] mov [rsp+3A8h+var_68], rax fld [rsp+3A8h+var_58] mov rax, rsp fstp tbyte ptr [rax] call _ZN3fmt3v106detail5isnanIeEEbT_; fmt::v10::detail::isnan<long double>(long double) mov rcx, [rsp+3A8h+var_38] mov [rsp+3A8h+var_78], rcx mov rcx, [rsp+3A8h+var_30] mov [rsp+3A8h+var_70], rcx mov rdi, [rsp+3A8h+var_68] mov rdx, [rsp+3A8h+var_78] mov rcx, [rsp+3A8h+var_70] movzx esi, al and esi, 1 lea r8, [rsp+3A8h+var_60] call _ZN3fmt3v106detail15write_nonfiniteIcNS0_8appenderEEET0_S4_bNS0_12format_specsIT_EERKNS1_11float_specsE; fmt::v10::detail::write_nonfinite<char,fmt::v10::appender>(fmt::v10::appender,bool,fmt::v10::format_specs<char>,fmt::v10::detail::float_specs const&) mov [rsp+3A8h+var_20], rax jmp loc_D8446 loc_D7FAE: mov ax, word ptr [rsp+3A8h+var_30+1] and ax, 0Fh movzx eax, al cmp eax, 4 jnz loc_D80CC mov eax, dword ptr [rsp+3A8h+var_60+4] shr eax, 8 and eax, 0FFh cmp al, 0 jz loc_D80CC lea rdi, [rsp+3A8h+var_28] mov esi, 1 call _ZN3fmt3v106detail7reserveINS0_8appenderEEERT_S5_m; fmt::v10::detail::reserve<fmt::v10::appender>(fmt::v10::appender &,ulong) mov rax, [rax] mov [rsp+3A8h+var_80], rax mov eax, dword ptr [rsp+3A8h+var_60+4] shr eax, 8 and eax, 0FFh movzx edi, al call _ZN3fmt3v106detail4signIcNS0_4sign4typeEEET_T0_; fmt::v10::detail::sign<char,fmt::v10::sign::type>(fmt::v10::sign::type) mov [rsp+3A8h+var_81], al lea rdi, [rsp+3A8h+var_80] xor esi, esi call _ZN3fmt3v108appenderppEi; fmt::v10::appender::operator++(int) mov [rsp+3A8h+var_90], rax lea rdi, [rsp+3A8h+var_90] call _ZNSt20back_insert_iteratorIN3fmt3v106detail6bufferIcEEEdeEv; std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator*(void) mov rdi, rax lea rsi, [rsp+3A8h+var_81] call _ZNSt20back_insert_iteratorIN3fmt3v106detail6bufferIcEEEaSEOc; std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator=(char &&) mov rax, [rsp+3A8h+var_28] mov [rsp+3A8h+var_A0], rax mov rax, [rsp+3A8h+var_80] mov [rsp+3A8h+var_A8], rax mov rdi, [rsp+3A8h+var_A0] mov rsi, [rsp+3A8h+var_A8] call _ZN3fmt3v106detail13base_iteratorINS0_8appenderEEET_S4_S4_; fmt::v10::detail::base_iterator<fmt::v10::appender>(fmt::v10::appender,fmt::v10::appender) mov [rsp+3A8h+var_98], rax mov rax, [rsp+3A8h+var_98] mov [rsp+3A8h+var_28], rax mov eax, dword ptr [rsp+3A8h+var_60+4] and eax, 0FFFF00FFh or eax, 0 mov dword ptr [rsp+3A8h+var_60+4], eax cmp dword ptr [rsp+3A8h+var_38], 0 jz short loc_D80CA mov eax, dword ptr [rsp+3A8h+var_38] add eax, 0FFFFFFFFh mov dword ptr [rsp+3A8h+var_38], eax loc_D80CA: jmp short $+2 loc_D80CC: lea rdi, [rsp+3A8h+var_2C1] mov [rsp+3A8h+var_348], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, [rsp+3A8h+var_348]; char * lea rdi, [rsp+3A8h+var_2C0] call _ZN3fmt3v1019basic_memory_bufferIcLm500ESaIcEEC2ERKS2_; fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::basic_memory_buffer(std::allocator<char> const&) jmp short $+2 loc_D80F2: lea rdi, [rsp+3A8h+var_2C1] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov eax, dword ptr [rsp+3A8h+var_60+4] and eax, 0FFh cmp al, 3 jnz loc_D827C mov eax, dword ptr [rsp+3A8h+var_60+4] shr eax, 8 and eax, 0FFh cmp al, 0 jz short loc_D819F movzx edi, byte ptr [rsp+3A8h+var_60+5] call _ZN3fmt3v106detail4signIcNS0_4sign4typeEEET_T0_; fmt::v10::detail::sign<char,fmt::v10::sign::type>(fmt::v10::sign::type) mov [rsp+3A8h+var_2D5], al lea rdi, [rsp+3A8h+var_2C0] lea rsi, [rsp+3A8h+var_2D5] call _ZN3fmt3v106detail6bufferIcE9push_backERKc; fmt::v10::detail::buffer<char>::push_back(char const&) jmp short $+2 loc_D8151: jmp short loc_D819F mov rcx, rax mov eax, edx mov [rsp+arg_D0], rcx mov [rsp+arg_CC], eax lea rdi, [rsp+arg_DF] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_D8456 mov rcx, rax mov eax, edx mov [rsp+arg_D0], rcx mov [rsp+arg_CC], eax lea rdi, [rsp+arg_E0] call _ZN3fmt3v1019basic_memory_bufferIcLm500ESaIcEED2Ev; fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::~basic_memory_buffer() jmp loc_D8456 loc_D819F: fld [rsp+3A8h+var_58] mov rax, rsp fstp tbyte ptr [rax] call _ZN3fmt3v106detail13convert_floatIeEENSt11conditionalIXoosr3std7is_sameIT_fEE5valueeqcl8num_bitsIS4_EEclL_ZNS1_8num_bitsIdEEivEEEdS4_E4typeES4_ fstp [rsp+3A8h+var_354] jmp short $+2 loc_D81B6: fld [rsp+3A8h+var_354] mov edi, dword ptr [rsp+3A8h+var_38+4] mov rax, [rsp+3A8h+var_60] mov [rsp+3A8h+var_2E0], rax mov rsi, [rsp+3A8h+var_2E0] mov rax, rsp fstp tbyte ptr [rax] lea rdx, [rsp+3A8h+var_2C0] call _ZN3fmt3v106detail15format_hexfloatIeTnNSt9enable_ifIXntsr16is_double_doubleIT_EE5valueEiE4typeELi0EEEvS4_iNS1_11float_specsERNS1_6bufferIcEE jmp short $+2 loc_D81ED: mov rax, [rsp+3A8h+var_28] mov [rsp+3A8h+var_2E8], rax lea rdi, [rsp+3A8h+var_2C0] mov [rsp+3A8h+var_370], rdi call _ZN3fmt3v106detail6bufferIcE4dataEv; fmt::v10::detail::buffer<char>::data(void) mov rdi, [rsp+3A8h+var_370] mov [rsp+3A8h+var_368], rax call _ZNK3fmt3v106detail6bufferIcE4sizeEv; fmt::v10::detail::buffer<char>::size(void) mov rsi, [rsp+3A8h+var_368] mov rdx, rax lea rdi, [rsp+3A8h+var_2F8] call _ZN3fmt3v1017basic_string_viewIcEC2EPKcm; fmt::v10::basic_string_view<char>::basic_string_view(char const*,ulong) mov rdi, [rsp+3A8h+var_2E8] mov rsi, [rsp+3A8h+var_2F8] mov rdx, [rsp+3A8h+var_2F0] lea rcx, [rsp+3A8h+var_38] call _ZN3fmt3v106detail11write_bytesILNS0_5align4typeE2EcNS0_8appenderEEET1_S6_NS0_17basic_string_viewIcEERKNS0_12format_specsIT0_EE; fmt::v10::detail::write_bytes<(fmt::v10::align::type)2,char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char> const&) mov [rsp+3A8h+var_360], rax jmp short $+2 loc_D825F: mov rax, [rsp+3A8h+var_360] mov [rsp+3A8h+var_20], rax mov [rsp+3A8h+var_2FC], 1 jmp loc_D8439 loc_D827C: cmp dword ptr [rsp+3A8h+var_38+4], 0 jge short loc_D8290 cmp byte ptr [rsp+3A8h+var_30], 0 jnz short loc_D829D loc_D8290: mov eax, dword ptr [rsp+3A8h+var_38+4] mov [rsp+3A8h+var_374], eax jmp short loc_D82A8 loc_D829D: mov eax, 6 mov [rsp+3A8h+var_374], eax jmp short $+2 loc_D82A8: mov eax, [rsp+3A8h+var_374] mov [rsp+3A8h+var_300], eax mov eax, dword ptr [rsp+3A8h+var_60+4] and eax, 0FFh cmp al, 1 jnz short loc_D82FE mov eax, [rsp+3A8h+var_300] mov [rsp+3A8h+var_378], eax call _ZN3fmt3v106detail9max_valueIiEET_v; fmt::v10::detail::max_value<int>(void) mov ecx, eax mov eax, [rsp+3A8h+var_378] cmp eax, ecx jnz short loc_D82EB lea rdi, aNumberIsTooBig; "number is too big" call _ZN3fmt3v106detail18throw_format_errorEPKc; fmt::v10::detail::throw_format_error(char const*) jmp short $+2 loc_D82EB: mov eax, [rsp+3A8h+var_300] add eax, 1 mov [rsp+3A8h+var_300], eax jmp short loc_D8325 loc_D82FE: mov eax, dword ptr [rsp+3A8h+var_60+4] and eax, 0FFh cmp al, 2 jz short loc_D8323 cmp [rsp+3A8h+var_300], 0 jnz short loc_D8323 mov [rsp+3A8h+var_300], 1 loc_D8323: jmp short $+2 loc_D8325: fld [rsp+3A8h+var_58] mov rax, rsp fstp tbyte ptr [rax] call _ZN3fmt3v106detail13convert_floatIeEENSt11conditionalIXoosr3std7is_sameIT_fEE5valueeqcl8num_bitsIS4_EEclL_ZNS1_8num_bitsIdEEivEEEdS4_E4typeES4_ fstp [rsp+3A8h+var_384] jmp short $+2 loc_D833C: fld [rsp+3A8h+var_384] mov edi, [rsp+3A8h+var_300] mov rax, [rsp+3A8h+var_60] mov [rsp+3A8h+var_310], rax mov rsi, [rsp+3A8h+var_310] mov rax, rsp fstp tbyte ptr [rax] lea rdx, [rsp+3A8h+var_2C0] call _ZN3fmt3v106detail12format_floatIeEEiT_iNS1_11float_specsERNS1_6bufferIcEE; fmt::v10::detail::format_float<long double>(long double,int,fmt::v10::detail::float_specs,fmt::v10::detail::buffer<char> &) mov [rsp+3A8h+var_388], eax jmp short $+2 loc_D8377: mov eax, [rsp+3A8h+var_388] mov [rsp+3A8h+var_304], eax mov eax, [rsp+3A8h+var_300] mov dword ptr [rsp+3A8h+var_60], eax lea rdi, [rsp+3A8h+var_2C0] mov [rsp+3A8h+var_398], rdi call _ZN3fmt3v106detail6bufferIcE4dataEv; fmt::v10::detail::buffer<char>::data(void) mov rdi, [rsp+3A8h+var_398] mov [rsp+3A8h+var_320], rax call _ZNK3fmt3v106detail6bufferIcE4sizeEv; fmt::v10::detail::buffer<char>::size(void) mov [rsp+3A8h+var_318], eax mov eax, [rsp+3A8h+var_304] mov [rsp+3A8h+var_314], eax mov rax, [rsp+3A8h+var_28] mov [rsp+3A8h+var_328], rax mov rax, [rsp+3A8h+var_60] mov [rsp+3A8h+var_330], rax mov rax, [rsp+3A8h+var_40] mov [rsp+3A8h+var_338], rax mov rdi, [rsp+3A8h+var_328] mov rcx, [rsp+3A8h+var_330] mov r8, [rsp+3A8h+var_338] lea rsi, [rsp+3A8h+var_320] lea rdx, [rsp+3A8h+var_38] call _ZN3fmt3v106detail11write_floatINS0_8appenderENS1_14big_decimal_fpEcEET_S5_RKT0_RKNS0_12format_specsIT1_EENS1_11float_specsENS1_10locale_refE; fmt::v10::detail::write_float<fmt::v10::appender,fmt::v10::detail::big_decimal_fp,char>(fmt::v10::appender,fmt::v10::detail::big_decimal_fp const&,fmt::v10::format_specs<char> const&,fmt::v10::detail::float_specs,fmt::v10::detail::locale_ref) mov [rsp+3A8h+var_390], rax jmp short $+2 loc_D8421: mov rax, [rsp+3A8h+var_390] mov [rsp+3A8h+var_20], rax mov [rsp+3A8h+var_2FC], 1 loc_D8439: lea rdi, [rsp+3A8h+var_2C0] call _ZN3fmt3v1019basic_memory_bufferIcLm500ESaIcEED2Ev; fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::~basic_memory_buffer() loc_D8446: mov rax, [rsp+3A8h+var_20] add rsp, 3A8h retn loc_D8456: mov rdi, [rsp+arg_D0] call __Unwind_Resume
long long fmt::v10::detail::write_float<char,fmt::v10::appender,long double>( long long a1, long long a2, long long a3, long long a4, long double a5) { long long v7; // rdx char v8; // al _QWORD *v9; // rax long double v10; // fst7 long long v11; // rax const char *v12; // rsi long double v13; // fst7 long double v15; // [rsp+0h] [rbp-3A8h] long double v16; // [rsp+0h] [rbp-3A8h] long double v17; // [rsp+0h] [rbp-3A8h] long double v18; // [rsp+0h] [rbp-3A8h] long double v19; // [rsp+0h] [rbp-3A8h] long double v20; // [rsp+0h] [rbp-3A8h] int v21; // [rsp+34h] [rbp-374h] long long v22; // [rsp+40h] [rbp-368h] long long v23; // [rsp+88h] [rbp-320h] BYREF int v24; // [rsp+90h] [rbp-318h] int v25; // [rsp+94h] [rbp-314h] long long v26; // [rsp+98h] [rbp-310h] int v27; // [rsp+A4h] [rbp-304h] int v28; // [rsp+A8h] [rbp-300h] int v29; // [rsp+ACh] [rbp-2FCh] _QWORD v30[2]; // [rsp+B0h] [rbp-2F8h] BYREF long long v31; // [rsp+C0h] [rbp-2E8h] long long v32; // [rsp+C8h] [rbp-2E0h] char v33[20]; // [rsp+D3h] [rbp-2D5h] BYREF char v34; // [rsp+E7h] [rbp-2C1h] BYREF _QWORD v35[69]; // [rsp+E8h] [rbp-2C0h] BYREF long long v36; // [rsp+310h] [rbp-98h] long long v37; // [rsp+318h] [rbp-90h] BYREF char v38; // [rsp+327h] [rbp-81h] BYREF long long v39[3]; // [rsp+328h] [rbp-80h] BYREF long long v40; // [rsp+340h] [rbp-68h] long long v41; // [rsp+348h] [rbp-60h] BYREF long double v42; // [rsp+350h] [rbp-58h] long long v43; // [rsp+368h] [rbp-40h] long long v44; // [rsp+370h] [rbp-38h] BYREF long long v45; // [rsp+378h] [rbp-30h] long long v46; // [rsp+380h] [rbp-28h] BYREF long long v47; // [rsp+388h] [rbp-20h] long double v48; // [rsp+390h] [rbp-18h] v46 = a1; v44 = a2; v45 = a3; v43 = a4; v42 = a5; v41 = fmt::v10::detail::parse_float_type_spec<char>(&v44); BYTE5(v41) = (BYTE1(v45) >> 4) & 7; v48 = a5; if ( std::signbit(a5) ) { BYTE5(v41) = 1; v42 = -v42; } else if ( BYTE5(v41) == 1 ) { HIDWORD(v41) &= 0xFFFF00FF; } v15 = v42; if ( (ZN3fmt3v106detail8isfiniteIeTnNSt9enable_ifIXaasr3std17is_floating_pointIT_EE5valuesr12has_isfiniteIS4_EE5valueEiE4typeELi0EEEbS4_(*(_TBYTE *)&v15) & 1) != 0 ) { if ( (BYTE1(v45) & 0xF) == 4 ) { if ( BYTE5(v41) ) { v39[0] = *(_QWORD *)fmt::v10::detail::reserve<fmt::v10::appender>((long long)&v46); v38 = fmt::v10::detail::sign<char,fmt::v10::sign::type>(BYTE5(v41)); v37 = fmt::v10::appender::operator++((long long)v39); v9 = (_QWORD *)std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator*((long long)&v37); std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator=(v9, (long long)&v38); v35[68] = v46; v35[67] = v39[0]; a2 = v39[0]; v36 = fmt::v10::detail::base_iterator<fmt::v10::appender>(v46, v39[0]); v46 = v36; HIDWORD(v41) &= 0xFFFF00FF; if ( (_DWORD)v44 ) LODWORD(v44) = v44 - 1; } } std::allocator<char>::allocator(&v34, a2, v7); fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::basic_memory_buffer(v35, (long long)&v34); std::allocator<char>::~allocator(&v34, &v34); if ( BYTE4(v41) == 3 ) { if ( BYTE5(v41) ) { v33[0] = fmt::v10::detail::sign<char,fmt::v10::sign::type>(BYTE5(v41)); fmt::v10::detail::buffer<char>::push_back((long long)v35, v33); } v10 = v42; v17 = v42; fmt::v10::detail::convert_float<long double>(*(_TBYTE *)&v17); v32 = v41; v18 = v10; ZN3fmt3v106detail15format_hexfloatIeTnNSt9enable_ifIXntsr16is_double_doubleIT_EE5valueEiE4typeELi0EEEvS4_iNS1_11float_specsERNS1_6bufferIcEE(*(_TBYTE *)&v18); v31 = v46; v22 = fmt::v10::detail::buffer<char>::data((long long)v35); v11 = fmt::v10::detail::buffer<char>::size((long long)v35); fmt::v10::basic_string_view<char>::basic_string_view(v30, v22, v11); v12 = (const char *)v30[0]; v47 = fmt::v10::detail::write_bytes<(fmt::v10::align::type)2,char,fmt::v10::appender>(v31, v30[0], v30[1], &v44); v29 = 1; } else { if ( v44 < 0 && (_BYTE)v45 ) v21 = 6; else v21 = HIDWORD(v44); v28 = v21; if ( BYTE4(v41) == 1 ) { if ( v28 == (unsigned int)fmt::v10::detail::max_value<int>((long long)&v34) ) fmt::v10::detail::throw_format_error((fmt::v10::detail *)"number is too big", &v34); ++v28; } else if ( BYTE4(v41) != 2 && !v28 ) { v28 = 1; } v13 = v42; v19 = v42; fmt::v10::detail::convert_float<long double>(*(_TBYTE *)&v19); v26 = v41; v20 = v13; v27 = fmt::v10::detail::format_float<long double>(*(_TBYTE *)&v20); LODWORD(v41) = v28; v23 = fmt::v10::detail::buffer<char>::data((long long)v35); v24 = fmt::v10::detail::buffer<char>::size((long long)v35); v25 = v27; v12 = (const char *)&v23; v47 = fmt::v10::detail::write_float<fmt::v10::appender,fmt::v10::detail::big_decimal_fp,char>( v46, &v23, &v44, v41, v43); v29 = 1; } fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>::~basic_memory_buffer((long long)v35, v12); } else { v40 = v46; v16 = v42; v8 = fmt::v10::detail::isnan<long double>(*(_TBYTE *)&v16); v39[1] = v44; v39[2] = v45; return fmt::v10::detail::write_nonfinite<char,fmt::v10::appender>(v40, v8 & 1, v44, v45, (long long)&v41); } return v47; }
write_float<char,fmt::v10::appender,long_double>: SUB RSP,0x3a8 FLD tword ptr [RSP + 0x3b0] MOV qword ptr [RSP + 0x380],RDI MOV qword ptr [RSP + 0x370],RSI MOV qword ptr [RSP + 0x378],RDX MOV qword ptr [RSP + 0x368],RCX FSTP tword ptr [RSP + 0x350] LEA RDI,[RSP + 0x370] CALL 0x001d8520 MOV qword ptr [RSP + 0x348],RAX MOV AL,byte ptr [RSP + 0x379] SHR AL,0x4 AND AL,0x7 MOV byte ptr [RSP + 0x34d],AL FLD tword ptr [RSP + 0x350] FSTP tword ptr [RSP + 0x390] FLD tword ptr [RSP + 0x390] FSTP qword ptr [RSP + 0x68] MOVSD XMM0,qword ptr [RSP + 0x68] CALL 0x001d2250 TEST AL,0x1 JNZ 0x001d7ed7 JMP 0x001d7ef1 LAB_001d7ed7: MOV byte ptr [RSP + 0x34d],0x1 FLD tword ptr [RSP + 0x350] FCHS FSTP tword ptr [RSP + 0x350] JMP 0x001d7f20 LAB_001d7ef1: MOV EAX,dword ptr [RSP + 0x34c] SHR EAX,0x8 AND EAX,0xff MOVZX EAX,AL CMP EAX,0x1 JNZ 0x001d7f1e MOV EAX,dword ptr [RSP + 0x34c] AND EAX,0xffff00ff OR EAX,0x0 MOV dword ptr [RSP + 0x34c],EAX LAB_001d7f1e: JMP 0x001d7f20 LAB_001d7f20: FLD tword ptr [RSP + 0x350] MOV RAX,RSP FSTP tword ptr [RAX] CALL 0x001d86e0 TEST AL,0x1 JNZ 0x001d7fae MOV RAX,qword ptr [RSP + 0x380] MOV qword ptr [RSP + 0x340],RAX FLD tword ptr [RSP + 0x350] MOV RAX,RSP FSTP tword ptr [RAX] CALL 0x001d8710 MOV RCX,qword ptr [RSP + 0x370] MOV qword ptr [RSP + 0x330],RCX MOV RCX,qword ptr [RSP + 0x378] MOV qword ptr [RSP + 0x338],RCX MOV RDI,qword ptr [RSP + 0x340] MOV RDX,qword ptr [RSP + 0x330] MOV RCX,qword ptr [RSP + 0x338] MOVZX ESI,AL AND ESI,0x1 LEA R8,[RSP + 0x348] CALL 0x001d2020 MOV qword ptr [RSP + 0x388],RAX JMP 0x001d8446 LAB_001d7fae: MOV AX,word ptr [RSP + 0x379] AND AX,0xf MOVZX EAX,AL CMP EAX,0x4 JNZ 0x001d80cc MOV EAX,dword ptr [RSP + 0x34c] SHR EAX,0x8 AND EAX,0xff CMP AL,0x0 JZ 0x001d80cc LEA RDI,[RSP + 0x380] MOV ESI,0x1 CALL 0x001cd6b0 MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x328],RAX MOV EAX,dword ptr [RSP + 0x34c] SHR EAX,0x8 AND EAX,0xff MOVZX EDI,AL CALL 0x001d2570 MOV byte ptr [RSP + 0x327],AL LEA RDI,[RSP + 0x328] XOR ESI,ESI CALL 0x00124c00 MOV qword ptr [RSP + 0x318],RAX LEA RDI,[RSP + 0x318] CALL 0x00124c20 MOV RDI,RAX LEA RSI,[RSP + 0x327] CALL 0x00124c30 MOV RAX,qword ptr [RSP + 0x380] MOV qword ptr [RSP + 0x308],RAX MOV RAX,qword ptr [RSP + 0x328] MOV qword ptr [RSP + 0x300],RAX MOV RDI,qword ptr [RSP + 0x308] MOV RSI,qword ptr [RSP + 0x300] CALL 0x001cd7e0 MOV qword ptr [RSP + 0x310],RAX MOV RAX,qword ptr [RSP + 0x310] MOV qword ptr [RSP + 0x380],RAX MOV EAX,dword ptr [RSP + 0x34c] AND EAX,0xffff00ff OR EAX,0x0 MOV dword ptr [RSP + 0x34c],EAX CMP dword ptr [RSP + 0x370],0x0 JZ 0x001d80ca MOV EAX,dword ptr [RSP + 0x370] ADD EAX,-0x1 MOV dword ptr [RSP + 0x370],EAX LAB_001d80ca: JMP 0x001d80cc LAB_001d80cc: LEA RDI,[RSP + 0xe7] MOV qword ptr [RSP + 0x60],RDI CALL 0x00115de0 MOV RSI,qword ptr [RSP + 0x60] LAB_001d80e3: LEA RDI,[RSP + 0xe8] CALL 0x001c7960 JMP 0x001d80f2 LAB_001d80f2: LEA RDI,[RSP + 0xe7] CALL 0x001157f0 MOV EAX,dword ptr [RSP + 0x34c] AND EAX,0xff CMP AL,0x3 JNZ 0x001d827c MOV EAX,dword ptr [RSP + 0x34c] SHR EAX,0x8 AND EAX,0xff CMP AL,0x0 JZ 0x001d819f MOVZX EDI,byte ptr [RSP + 0x34d] CALL 0x001d2570 MOV byte ptr [RSP + 0xd3],AL LAB_001d813a: LEA RDI,[RSP + 0xe8] LEA RSI,[RSP + 0xd3] CALL 0x00124c60 JMP 0x001d8151 LAB_001d8151: JMP 0x001d819f LAB_001d819f: FLD tword ptr [RSP + 0x350] MOV RAX,RSP FSTP tword ptr [RAX] CALL 0x001d8cf0 FSTP tword ptr [RSP + 0x54] JMP 0x001d81b6 LAB_001d81b6: FLD tword ptr [RSP + 0x54] MOV EDI,dword ptr [RSP + 0x374] MOV RAX,qword ptr [RSP + 0x348] MOV qword ptr [RSP + 0xc8],RAX MOV RSI,qword ptr [RSP + 0xc8] MOV RAX,RSP FSTP tword ptr [RAX] LEA RDX,[RSP + 0xe8] CALL 0x001d8720 JMP 0x001d81ed LAB_001d81ed: MOV RAX,qword ptr [RSP + 0x380] MOV qword ptr [RSP + 0xc0],RAX LEA RDI,[RSP + 0xe8] MOV qword ptr [RSP + 0x38],RDI CALL 0x001243d0 MOV RDI,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x40],RAX CALL 0x001243e0 MOV RSI,qword ptr [RSP + 0x40] MOV RDX,RAX LEA RDI,[RSP + 0xb0] CALL 0x001243f0 MOV RDI,qword ptr [RSP + 0xc0] MOV RSI,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RSP + 0xb8] LEA RCX,[RSP + 0x370] CALL 0x001d8d00 MOV qword ptr [RSP + 0x48],RAX JMP 0x001d825f LAB_001d825f: MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x388],RAX MOV dword ptr [RSP + 0xac],0x1 JMP 0x001d8439 LAB_001d827c: CMP dword ptr [RSP + 0x374],0x0 JGE 0x001d8290 CMP byte ptr [RSP + 0x378],0x0 JNZ 0x001d829d LAB_001d8290: MOV EAX,dword ptr [RSP + 0x374] MOV dword ptr [RSP + 0x34],EAX JMP 0x001d82a8 LAB_001d829d: MOV EAX,0x6 MOV dword ptr [RSP + 0x34],EAX JMP 0x001d82a8 LAB_001d82a8: MOV EAX,dword ptr [RSP + 0x34] MOV dword ptr [RSP + 0xa8],EAX MOV EAX,dword ptr [RSP + 0x34c] AND EAX,0xff CMP AL,0x1 JNZ 0x001d82fe MOV EAX,dword ptr [RSP + 0xa8] MOV dword ptr [RSP + 0x30],EAX CALL 0x001d4040 MOV ECX,EAX MOV EAX,dword ptr [RSP + 0x30] CMP EAX,ECX JNZ 0x001d82eb LEA RDI,[0x25257b] CALL 0x001c62f0 LAB_001d82eb: MOV EAX,dword ptr [RSP + 0xa8] ADD EAX,0x1 MOV dword ptr [RSP + 0xa8],EAX JMP 0x001d8325 LAB_001d82fe: MOV EAX,dword ptr [RSP + 0x34c] AND EAX,0xff CMP AL,0x2 JZ 0x001d8323 CMP dword ptr [RSP + 0xa8],0x0 JNZ 0x001d8323 MOV dword ptr [RSP + 0xa8],0x1 LAB_001d8323: JMP 0x001d8325 LAB_001d8325: FLD tword ptr [RSP + 0x350] MOV RAX,RSP FSTP tword ptr [RAX] CALL 0x001d8cf0 FSTP tword ptr [RSP + 0x24] JMP 0x001d833c LAB_001d833c: FLD tword ptr [RSP + 0x24] MOV EDI,dword ptr [RSP + 0xa8] MOV RAX,qword ptr [RSP + 0x348] MOV qword ptr [RSP + 0x98],RAX MOV RSI,qword ptr [RSP + 0x98] MOV RAX,RSP FSTP tword ptr [RAX] LEA RDX,[RSP + 0xe8] CALL 0x001d8d70 MOV dword ptr [RSP + 0x20],EAX JMP 0x001d8377 LAB_001d8377: MOV EAX,dword ptr [RSP + 0x20] MOV dword ptr [RSP + 0xa4],EAX MOV EAX,dword ptr [RSP + 0xa8] MOV dword ptr [RSP + 0x348],EAX LEA RDI,[RSP + 0xe8] MOV qword ptr [RSP + 0x10],RDI CALL 0x001243d0 MOV RDI,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x88],RAX CALL 0x001243e0 MOV dword ptr [RSP + 0x90],EAX MOV EAX,dword ptr [RSP + 0xa4] MOV dword ptr [RSP + 0x94],EAX MOV RAX,qword ptr [RSP + 0x380] MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0x348] MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RSP + 0x368] MOV qword ptr [RSP + 0x70],RAX MOV RDI,qword ptr [RSP + 0x80] MOV RCX,qword ptr [RSP + 0x78] MOV R8,qword ptr [RSP + 0x70] LEA RSI,[RSP + 0x88] LEA RDX,[RSP + 0x370] CALL 0x001d91c0 LAB_001d841a: MOV qword ptr [RSP + 0x18],RAX JMP 0x001d8421 LAB_001d8421: MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x388],RAX MOV dword ptr [RSP + 0xac],0x1 LAB_001d8439: LEA RDI,[RSP + 0xe8] CALL 0x001c79c0 LAB_001d8446: MOV RAX,qword ptr [RSP + 0x388] ADD RSP,0x3a8 RET
/* fmt::v10::appender fmt::v10::detail::write_float<char, fmt::v10::appender, long double>(fmt::v10::appender, long double, fmt::v10::format_specs<char>, fmt::v10::detail::locale_ref) */ int8 fmt::v10::detail::write_float<char,fmt::v10::appender,long_double> (detail *param_1,long param_2,int8 param_3,int8 param_4,int8 param_5, int8 param_6,longdouble param_7) { bool bVar1; char cVar2; int iVar3; int8 uVar4; ulong uVar5; int8 *puVar6; back_insert_iterator<fmt::v10::detail::buffer<char>> *this; char *pcVar7; unkbyte10 in_ST0; int local_374; int8 local_320; int4 local_318; int local_314; ulong local_310; int local_304; int local_300; int4 local_2fc; int8 local_2f8; int8 local_2f0; detail *local_2e8; ulong local_2e0; char local_2d5 [20]; allocator<char> local_2c1; allocator local_2c0 [536]; int8 local_a8; detail *local_a0; detail *local_98; int8 local_90; char local_81; int8 local_80; long local_78; int8 local_70; detail *local_68; int8 local_60; longdouble local_58; int8 local_40; int8 local_38; int8 local_30; detail *local_28; int8 local_20; longdouble local_18; local_58 = param_7; local_40 = param_4; local_38 = param_2; local_30 = param_3; local_28 = param_1; uVar4 = parse_float_type_spec<char>((format_specs *)&local_38); local_60._6_2_ = (int2)((ulong)uVar4 >> 0x30); local_60._0_5_ = (int5)uVar4; local_60 = CONCAT26(local_60._6_2_,CONCAT15(local_30._1_1_ >> 4,(int5)local_60)) & 0xffff07ffffffffff; local_18 = local_58; uVar5 = std::signbit((double)local_58); if ((uVar5 & 1) == 0) { if ((local_60._4_4_ >> 8 & 0xff) == 1) { local_60 = local_60 & 0xffff00ffffffffff; } } else { local_60._0_6_ = CONCAT15(1,(int5)local_60); local_58 = -local_58; } uVar5 = _ZN3fmt3v106detail8isfiniteIeTnNSt9enable_ifIXaasr3std17is_floating_pointIT_EE5valuesr12has_isfiniteIS4_EE5valueEiE4typeELi0EEEbS4_ (); if ((uVar5 & 1) == 0) { local_68 = local_28; bVar1 = isnan<long_double>(local_58); local_78 = local_38; local_70 = local_30; local_20 = write_nonfinite<char,fmt::v10::appender>(local_68,bVar1,local_38,local_30,&local_60); } else { if ((((byte)((ulong)local_30 >> 8) & 0xf) == 4) && ((char)(local_60 >> 0x28) != '\0')) { puVar6 = (int8 *)reserve<fmt::v10::appender>((appender *)&local_28,1); local_80 = *puVar6; local_81 = sign<char,fmt::v10::sign::type>(local_60._4_4_ >> 8 & 0xff); local_90 = appender::operator++((appender *)&local_80,0); this = (back_insert_iterator<fmt::v10::detail::buffer<char>> *) std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator* ((back_insert_iterator<fmt::v10::detail::buffer<char>> *)&local_90); std::back_insert_iterator<fmt::v10::detail::buffer<char>>::operator=(this,&local_81); local_a0 = local_28; local_a8 = local_80; local_98 = (detail *)base_iterator<fmt::v10::appender>(local_28,local_80); local_60 = local_60 & 0xffff00ffffffffff; local_28 = local_98; if ((int)local_38 != 0) { local_38 = CONCAT44(local_38._4_4_,(int)local_38 + -1); } } std::allocator<char>::allocator(); /* try { // try from 001d80e3 to 001d80ef has its CatchHandler @ 001d8153 */ basic_memory_buffer<char,500ul,std::allocator<char>>::basic_memory_buffer(local_2c0); std::allocator<char>::~allocator(&local_2c1); cVar2 = (char)(local_60 >> 0x20); if (cVar2 == '\x03') { cVar2 = (char)(local_60 >> 0x28); if (cVar2 != '\0') { local_2d5[0] = sign<char,fmt::v10::sign::type>(cVar2); /* try { // try from 001d813a to 001d8419 has its CatchHandler @ 001d8179 */ buffer<char>::push_back((buffer<char> *)local_2c0,local_2d5); } convert_float<long_double>(local_58); local_2e0 = local_60; _ZN3fmt3v106detail15format_hexfloatIeTnNSt9enable_ifIXntsr16is_double_doubleIT_EE5valueEiE4typeELi0EEEvS4_iNS1_11float_specsERNS1_6bufferIcEE (local_38._4_4_,local_60,local_2c0); local_2e8 = local_28; pcVar7 = (char *)buffer<char>::data((buffer<char> *)local_2c0); uVar5 = buffer<char>::size((buffer<char> *)local_2c0); basic_string_view<char>::basic_string_view((basic_string_view<char> *)&local_2f8,pcVar7,uVar5) ; local_20 = write_bytes<(fmt::v10::align::type)2,char,fmt::v10::appender> (local_2e8,local_2f8,local_2f0,&local_38); } else { if ((local_38 < 0) && ((char)local_30 != '\0')) { local_374 = 6; } else { local_374 = local_38._4_4_; } local_300 = local_374; if (cVar2 == '\x01') { iVar3 = max_value<int>(); if (local_374 == iVar3) { /* WARNING: Subroutine does not return */ throw_format_error("number is too big"); } local_300 = local_300 + 1; } else if ((cVar2 != '\x02') && (local_374 == 0)) { local_300 = 1; } convert_float<long_double>(local_58); local_310 = local_60; local_304 = format_float<long_double>(local_300,local_60,local_2c0); local_60 = CONCAT44(local_60._4_4_,local_300); local_320 = buffer<char>::data((buffer<char> *)local_2c0); local_318 = buffer<char>::size((buffer<char> *)local_2c0); local_314 = local_304; local_20 = write_float<fmt::v10::appender,fmt::v10::detail::big_decimal_fp,char> (local_28,&local_320,&local_38,local_60,local_40,param_6,in_ST0); } local_2fc = 1; basic_memory_buffer<char,500ul,std::allocator<char>>::~basic_memory_buffer ((basic_memory_buffer<char,500ul,std::allocator<char>> *)local_2c0); } return local_20; }
6,606
lunasvg::SVGAngle::parse(std::basic_string_view<char, std::char_traits<char>>)
dmazzella[P]pylunasvg/lunasvg/source/svgproperty.cpp
bool SVGAngle::parse(std::string_view input) { stripLeadingAndTrailingSpaces(input); if(input == "auto") { m_value = 0.f; m_orientType = OrientType::Auto; return true; } if(input == "auto-start-reverse") { m_value = 0.f; m_orientType = OrientType::AutoStartReverse; return true; } float value = 0.f; if(!parseNumber(input, value)) return false; if(!input.empty()) { if(input == "rad") value *= 180.f / PLUTOVG_PI; else if(input == "grad") value *= 360.f / 400.f; else if(input == "turn") value *= 360.f; else if(input != "deg") { return false; } } m_value = value; m_orientType = OrientType::Angle; return true; }
O0
cpp
lunasvg::SVGAngle::parse(std::basic_string_view<char, std::char_traits<char>>): pushq %rbp movq %rsp, %rbp subq $0xf0, %rsp movq %rsi, -0x18(%rbp) movq %rdx, -0x10(%rbp) movq %rdi, -0x20(%rbp) movq -0x20(%rbp), %rax movq %rax, -0xf0(%rbp) leaq -0x18(%rbp), %rdi callq 0x32fd0 movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) leaq -0x40(%rbp), %rdi leaq 0x437aa(%rip), %rsi # 0x8cb40 callq 0x33260 movq -0x30(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x40(%rbp), %rdx movq -0x38(%rbp), %rcx callq 0x4b690 testb $0x1, %al jne 0x493b6 jmp 0x493d5 movq -0xf0(%rbp), %rax xorps %xmm0, %xmm0 movss %xmm0, 0xc(%rax) movl $0x0, 0x10(%rax) movb $0x1, -0x1(%rbp) jmp 0x495ff movq -0x18(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x48(%rbp) leaq -0x60(%rbp), %rdi leaq 0x43e09(%rip), %rsi # 0x8d1f9 callq 0x33260 movq -0x50(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x60(%rbp), %rdx movq -0x58(%rbp), %rcx callq 0x4b690 testb $0x1, %al jne 0x49410 jmp 0x4942f movq -0xf0(%rbp), %rax xorps %xmm0, %xmm0 movss %xmm0, 0xc(%rax) movl $0x1, 0x10(%rax) movb $0x1, -0x1(%rbp) jmp 0x495ff xorps %xmm0, %xmm0 movss %xmm0, -0x64(%rbp) leaq -0x18(%rbp), %rdi leaq -0x64(%rbp), %rsi callq 0x339b0 testb $0x1, %al jne 0x49451 movb $0x0, -0x1(%rbp) jmp 0x495ff leaq -0x18(%rbp), %rdi callq 0x20620 testb $0x1, %al jne 0x495e3 movq -0x18(%rbp), %rax movq %rax, -0x78(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x70(%rbp) leaq -0x88(%rbp), %rdi leaq 0x43d8d(%rip), %rsi # 0x8d20d callq 0x33260 movq -0x78(%rbp), %rdi movq -0x70(%rbp), %rsi movq -0x88(%rbp), %rdx movq -0x80(%rbp), %rcx callq 0x4b690 testb $0x1, %al jne 0x494a3 jmp 0x494ba movss 0x43a15(%rip), %xmm0 # 0x8cec0 mulss -0x64(%rbp), %xmm0 movss %xmm0, -0x64(%rbp) jmp 0x495e1 movq -0x18(%rbp), %rax movq %rax, -0x98(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x90(%rbp) leaq -0xa8(%rbp), %rdi leaq 0x43d2e(%rip), %rsi # 0x8d20c callq 0x33260 movq -0x98(%rbp), %rdi movq -0x90(%rbp), %rsi movq -0xa8(%rbp), %rdx movq -0xa0(%rbp), %rcx callq 0x4b690 testb $0x1, %al jne 0x4950a jmp 0x49521 movss 0x439aa(%rip), %xmm0 # 0x8cebc mulss -0x64(%rbp), %xmm0 movss %xmm0, -0x64(%rbp) jmp 0x495df movq -0x18(%rbp), %rax movq %rax, -0xb8(%rbp) movq -0x10(%rbp), %rax movq %rax, -0xb0(%rbp) leaq -0xc8(%rbp), %rdi leaq 0x43ccc(%rip), %rsi # 0x8d211 callq 0x33260 movq -0xb8(%rbp), %rdi movq -0xb0(%rbp), %rsi movq -0xc8(%rbp), %rdx movq -0xc0(%rbp), %rcx callq 0x4b690 testb $0x1, %al jne 0x49571 jmp 0x49585 movss 0x432e3(%rip), %xmm0 # 0x8c85c mulss -0x64(%rbp), %xmm0 movss %xmm0, -0x64(%rbp) jmp 0x495dd movq -0x18(%rbp), %rax movq %rax, -0xd8(%rbp) movq -0x10(%rbp), %rax movq %rax, -0xd0(%rbp) leaq -0xe8(%rbp), %rdi leaq 0x43c6d(%rip), %rsi # 0x8d216 callq 0x33260 movq -0xd8(%rbp), %rdi movq -0xd0(%rbp), %rsi movq -0xe8(%rbp), %rdx movq -0xe0(%rbp), %rcx callq 0x4b710 testb $0x1, %al jne 0x495d5 jmp 0x495db movb $0x0, -0x1(%rbp) jmp 0x495ff jmp 0x495dd jmp 0x495df jmp 0x495e1 jmp 0x495e3 movq -0xf0(%rbp), %rax movss -0x64(%rbp), %xmm0 movss %xmm0, 0xc(%rax) movl $0x2, 0x10(%rax) movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0xf0, %rsp popq %rbp retq nopl (%rax)
_ZN7lunasvg8SVGAngle5parseESt17basic_string_viewIcSt11char_traitsIcEE: push rbp mov rbp, rsp sub rsp, 0F0h mov [rbp+var_18], rsi mov [rbp+var_10], rdx mov [rbp+var_20], rdi mov rax, [rbp+var_20] mov [rbp+var_F0], rax lea rdi, [rbp+var_18] call _ZN7lunasvg29stripLeadingAndTrailingSpacesERSt17basic_string_viewIcSt11char_traitsIcEE; lunasvg::stripLeadingAndTrailingSpaces(std::string_view &) mov rax, [rbp+var_18] mov [rbp+var_30], rax mov rax, [rbp+var_10] mov [rbp+var_28], rax lea rdi, [rbp+var_40] lea rsi, aAuto; "auto" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) mov rdi, [rbp+var_30] mov rsi, [rbp+var_28] mov rdx, [rbp+var_40] mov rcx, [rbp+var_38] call _ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ENSt15__type_identityIS5_E4typeE; std::operator==<char,std::char_traits<char>>(std::string_view,std::__type_identity<std::string_view>::type) test al, 1 jnz short loc_493B6 jmp short loc_493D5 loc_493B6: mov rax, [rbp+var_F0] xorps xmm0, xmm0 movss dword ptr [rax+0Ch], xmm0 mov dword ptr [rax+10h], 0 mov [rbp+var_1], 1 jmp loc_495FF loc_493D5: mov rax, [rbp+var_18] mov [rbp+var_50], rax mov rax, [rbp+var_10] mov [rbp+var_48], rax lea rdi, [rbp+var_60] lea rsi, aAutoStartRever; "auto-start-reverse" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) mov rdi, [rbp+var_50] mov rsi, [rbp+var_48] mov rdx, [rbp+var_60] mov rcx, [rbp+var_58] call _ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ENSt15__type_identityIS5_E4typeE; std::operator==<char,std::char_traits<char>>(std::string_view,std::__type_identity<std::string_view>::type) test al, 1 jnz short loc_49410 jmp short loc_4942F loc_49410: mov rax, [rbp+var_F0] xorps xmm0, xmm0 movss dword ptr [rax+0Ch], xmm0 mov dword ptr [rax+10h], 1 mov [rbp+var_1], 1 jmp loc_495FF loc_4942F: xorps xmm0, xmm0 movss [rbp+var_64], xmm0 lea rdi, [rbp+var_18] lea rsi, [rbp+var_64] call _ZN7lunasvg11parseNumberIfEEbRSt17basic_string_viewIcSt11char_traitsIcEERT_; lunasvg::parseNumber<float>(std::string_view &,float &) test al, 1 jnz short loc_49451 mov [rbp+var_1], 0 jmp loc_495FF loc_49451: lea rdi, [rbp+var_18] call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE5emptyEv; std::string_view::empty(void) test al, 1 jnz loc_495E3 mov rax, [rbp+var_18] mov [rbp+var_78], rax mov rax, [rbp+var_10] mov [rbp+var_70], rax lea rdi, [rbp+var_88] lea rsi, aGrad+1; "rad" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) mov rdi, [rbp+var_78] mov rsi, [rbp+var_70] mov rdx, [rbp+var_88] mov rcx, [rbp+var_80] call _ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ENSt15__type_identityIS5_E4typeE; std::operator==<char,std::char_traits<char>>(std::string_view,std::__type_identity<std::string_view>::type) test al, 1 jnz short loc_494A3 jmp short loc_494BA loc_494A3: movss xmm0, cs:dword_8CEC0 mulss xmm0, [rbp+var_64] movss [rbp+var_64], xmm0 jmp loc_495E1 loc_494BA: mov rax, [rbp+var_18] mov [rbp+var_98], rax mov rax, [rbp+var_10] mov [rbp+var_90], rax lea rdi, [rbp+var_A8] lea rsi, aGrad; "grad" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) mov rdi, [rbp+var_98] mov rsi, [rbp+var_90] mov rdx, [rbp+var_A8] mov rcx, [rbp+var_A0] call _ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ENSt15__type_identityIS5_E4typeE; std::operator==<char,std::char_traits<char>>(std::string_view,std::__type_identity<std::string_view>::type) test al, 1 jnz short loc_4950A jmp short loc_49521 loc_4950A: movss xmm0, cs:dword_8CEBC mulss xmm0, [rbp+var_64] movss [rbp+var_64], xmm0 jmp loc_495DF loc_49521: mov rax, [rbp+var_18] mov [rbp+var_B8], rax mov rax, [rbp+var_10] mov [rbp+var_B0], rax lea rdi, [rbp+var_C8] lea rsi, aTurn; "turn" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) mov rdi, [rbp+var_B8] mov rsi, [rbp+var_B0] mov rdx, [rbp+var_C8] mov rcx, [rbp+var_C0] call _ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ENSt15__type_identityIS5_E4typeE; std::operator==<char,std::char_traits<char>>(std::string_view,std::__type_identity<std::string_view>::type) test al, 1 jnz short loc_49571 jmp short loc_49585 loc_49571: movss xmm0, cs:dword_8C85C mulss xmm0, [rbp+var_64] movss [rbp+var_64], xmm0 jmp short loc_495DD loc_49585: mov rax, [rbp+var_18] mov [rbp+var_D8], rax mov rax, [rbp+var_10] mov [rbp+var_D0], rax lea rdi, [rbp+var_E8] lea rsi, aDeg; "deg" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) mov rdi, [rbp+var_D8] mov rsi, [rbp+var_D0] mov rdx, [rbp+var_E8] mov rcx, [rbp+var_E0] call _ZStneIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ENSt15__type_identityIS5_E4typeE; std::operator!=<char,std::char_traits<char>>(std::string_view,std::__type_identity<std::string_view>::type) test al, 1 jnz short loc_495D5 jmp short loc_495DB loc_495D5: mov [rbp+var_1], 0 jmp short loc_495FF loc_495DB: jmp short $+2 loc_495DD: jmp short $+2 loc_495DF: jmp short $+2 loc_495E1: jmp short $+2 loc_495E3: mov rax, [rbp+var_F0] movss xmm0, [rbp+var_64] movss dword ptr [rax+0Ch], xmm0 mov dword ptr [rax+10h], 2 mov [rbp+var_1], 1 loc_495FF: mov al, [rbp+var_1] and al, 1 add rsp, 0F0h pop rbp retn
char lunasvg::SVGAngle::parse(long long a1, long long a2, long long a3) { long long v4[2]; // [rsp+8h] [rbp-E8h] BYREF long long v5; // [rsp+18h] [rbp-D8h] long long v6; // [rsp+20h] [rbp-D0h] long long v7[2]; // [rsp+28h] [rbp-C8h] BYREF long long v8; // [rsp+38h] [rbp-B8h] long long v9; // [rsp+40h] [rbp-B0h] long long v10[2]; // [rsp+48h] [rbp-A8h] BYREF long long v11; // [rsp+58h] [rbp-98h] long long v12; // [rsp+60h] [rbp-90h] long long v13[2]; // [rsp+68h] [rbp-88h] BYREF long long v14; // [rsp+78h] [rbp-78h] long long v15; // [rsp+80h] [rbp-70h] float v16; // [rsp+8Ch] [rbp-64h] BYREF long long v17[2]; // [rsp+90h] [rbp-60h] BYREF long long v18; // [rsp+A0h] [rbp-50h] long long v19; // [rsp+A8h] [rbp-48h] long long v20[2]; // [rsp+B0h] [rbp-40h] BYREF long long v21; // [rsp+C0h] [rbp-30h] long long v22; // [rsp+C8h] [rbp-28h] long long v23; // [rsp+D0h] [rbp-20h] long long v24; // [rsp+D8h] [rbp-18h] BYREF long long v25; // [rsp+E0h] [rbp-10h] v24 = a2; v25 = a3; v23 = a1; lunasvg::stripLeadingAndTrailingSpaces((long long)&v24); v21 = v24; v22 = v25; std::string_view::basic_string_view(v20, (long long)"auto"); if ( (std::operator==<char,std::char_traits<char>>(v21, v22, v20[0], v20[1]) & 1) != 0 ) { *(_QWORD *)(a1 + 12) = 0LL; return 1; } else { v18 = v24; v19 = v25; std::string_view::basic_string_view(v17, (long long)"auto-start-reverse"); if ( (std::operator==<char,std::char_traits<char>>(v18, v19, v17[0], v17[1]) & 1) != 0 ) { *(_DWORD *)(a1 + 12) = 0; *(_DWORD *)(a1 + 16) = 1; return 1; } else { v16 = 0.0; if ( lunasvg::parseNumber<float>(&v24, &v16) ) { if ( !std::string_view::empty(&v24) ) { v14 = v24; v15 = v25; std::string_view::basic_string_view(v13, (long long)"rad"); if ( (std::operator==<char,std::char_traits<char>>(v14, v15, v13[0], v13[1]) & 1) != 0 ) { v16 = 57.295776 * v16; } else { v11 = v24; v12 = v25; std::string_view::basic_string_view(v10, (long long)"grad"); if ( (std::operator==<char,std::char_traits<char>>(v11, v12, v10[0], v10[1]) & 1) != 0 ) { v16 = 0.89999998 * v16; } else { v8 = v24; v9 = v25; std::string_view::basic_string_view(v7, (long long)"turn"); if ( (std::operator==<char,std::char_traits<char>>(v8, v9, v7[0], v7[1]) & 1) != 0 ) { v16 = 360.0 * v16; } else { v5 = v24; v6 = v25; std::string_view::basic_string_view(v4, (long long)"deg"); if ( (std::operator!=<char,std::char_traits<char>>(v5, v6, v4[0], v4[1]) & 1) != 0 ) return 0; } } } } *(float *)(a1 + 12) = v16; *(_DWORD *)(a1 + 16) = 2; return 1; } return 0; } } }
parse: PUSH RBP MOV RBP,RSP SUB RSP,0xf0 MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x10],RDX MOV qword ptr [RBP + -0x20],RDI MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0xf0],RAX LEA RDI,[RBP + -0x18] CALL 0x00132fd0 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x28],RAX LEA RDI,[RBP + -0x40] LEA RSI,[0x18cb40] CALL 0x00133260 MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x38] CALL 0x0014b690 TEST AL,0x1 JNZ 0x001493b6 JMP 0x001493d5 LAB_001493b6: MOV RAX,qword ptr [RBP + -0xf0] XORPS XMM0,XMM0 MOVSS dword ptr [RAX + 0xc],XMM0 MOV dword ptr [RAX + 0x10],0x0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001495ff LAB_001493d5: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x48],RAX LEA RDI,[RBP + -0x60] LEA RSI,[0x18d1f9] CALL 0x00133260 MOV RDI,qword ptr [RBP + -0x50] MOV RSI,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x58] CALL 0x0014b690 TEST AL,0x1 JNZ 0x00149410 JMP 0x0014942f LAB_00149410: MOV RAX,qword ptr [RBP + -0xf0] XORPS XMM0,XMM0 MOVSS dword ptr [RAX + 0xc],XMM0 MOV dword ptr [RAX + 0x10],0x1 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001495ff LAB_0014942f: XORPS XMM0,XMM0 MOVSS dword ptr [RBP + -0x64],XMM0 LEA RDI,[RBP + -0x18] LEA RSI,[RBP + -0x64] CALL 0x001339b0 TEST AL,0x1 JNZ 0x00149451 MOV byte ptr [RBP + -0x1],0x0 JMP 0x001495ff LAB_00149451: LEA RDI,[RBP + -0x18] CALL 0x00120620 TEST AL,0x1 JNZ 0x001495e3 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x70],RAX LEA RDI,[RBP + -0x88] LEA RSI,[0x18d20d] CALL 0x00133260 MOV RDI,qword ptr [RBP + -0x78] MOV RSI,qword ptr [RBP + -0x70] MOV RDX,qword ptr [RBP + -0x88] MOV RCX,qword ptr [RBP + -0x80] CALL 0x0014b690 TEST AL,0x1 JNZ 0x001494a3 JMP 0x001494ba LAB_001494a3: MOVSS XMM0,dword ptr [0x0018cec0] MULSS XMM0,dword ptr [RBP + -0x64] MOVSS dword ptr [RBP + -0x64],XMM0 JMP 0x001495e1 LAB_001494ba: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x98],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x90],RAX LEA RDI,[RBP + -0xa8] LEA RSI,[0x18d20c] CALL 0x00133260 MOV RDI,qword ptr [RBP + -0x98] MOV RSI,qword ptr [RBP + -0x90] MOV RDX,qword ptr [RBP + -0xa8] MOV RCX,qword ptr [RBP + -0xa0] CALL 0x0014b690 TEST AL,0x1 JNZ 0x0014950a JMP 0x00149521 LAB_0014950a: MOVSS XMM0,dword ptr [0x0018cebc] MULSS XMM0,dword ptr [RBP + -0x64] MOVSS dword ptr [RBP + -0x64],XMM0 JMP 0x001495df LAB_00149521: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0xb8],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0xb0],RAX LEA RDI,[RBP + -0xc8] LEA RSI,[0x18d211] CALL 0x00133260 MOV RDI,qword ptr [RBP + -0xb8] MOV RSI,qword ptr [RBP + -0xb0] MOV RDX,qword ptr [RBP + -0xc8] MOV RCX,qword ptr [RBP + -0xc0] CALL 0x0014b690 TEST AL,0x1 JNZ 0x00149571 JMP 0x00149585 LAB_00149571: MOVSS XMM0,dword ptr [0x0018c85c] MULSS XMM0,dword ptr [RBP + -0x64] MOVSS dword ptr [RBP + -0x64],XMM0 JMP 0x001495dd LAB_00149585: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0xd8],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0xd0],RAX LEA RDI,[RBP + -0xe8] LEA RSI,[0x18d216] CALL 0x00133260 MOV RDI,qword ptr [RBP + -0xd8] MOV RSI,qword ptr [RBP + -0xd0] MOV RDX,qword ptr [RBP + -0xe8] MOV RCX,qword ptr [RBP + -0xe0] CALL 0x0014b710 TEST AL,0x1 JNZ 0x001495d5 JMP 0x001495db LAB_001495d5: MOV byte ptr [RBP + -0x1],0x0 JMP 0x001495ff LAB_001495db: JMP 0x001495dd LAB_001495dd: JMP 0x001495df LAB_001495df: JMP 0x001495e1 LAB_001495e1: JMP 0x001495e3 LAB_001495e3: MOV RAX,qword ptr [RBP + -0xf0] MOVSS XMM0,dword ptr [RBP + -0x64] MOVSS dword ptr [RAX + 0xc],XMM0 MOV dword ptr [RAX + 0x10],0x2 MOV byte ptr [RBP + -0x1],0x1 LAB_001495ff: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0xf0 POP RBP RET
/* lunasvg::SVGAngle::parse(std::basic_string_view<char, std::char_traits<char> >) */ int1 lunasvg::SVGAngle::parse(long param_1,int8 param_2,int8 param_3) { bool bVar1; ulong uVar2; int8 local_f0; int8 local_e8; int8 local_e0; int8 local_d8; int8 local_d0; int8 local_c8; int8 local_c0; int8 local_b8; int8 local_b0; int8 local_a8; int8 local_a0; int8 local_98; int8 local_90; int8 local_88; int8 local_80; int8 local_78; float local_6c; int8 local_68; int8 local_60; int8 local_58; int8 local_50; int8 local_48; int8 local_40; int8 local_38; int8 local_30; long local_28; int8 local_20; int8 local_18; int1 local_9; local_28 = param_1; local_20 = param_2; local_18 = param_3; stripLeadingAndTrailingSpaces((basic_string_view *)&local_20); local_38 = local_20; local_30 = local_18; std::basic_string_view<char,std::char_traits<char>>::basic_string_view ((basic_string_view<char,std::char_traits<char>> *)&local_48,"auto"); bVar1 = std::operator==(local_38,local_30,local_48,local_40); if (bVar1) { *(int4 *)(param_1 + 0xc) = 0; *(int4 *)(param_1 + 0x10) = 0; local_9 = 1; } else { local_58 = local_20; local_50 = local_18; std::basic_string_view<char,std::char_traits<char>>::basic_string_view ((basic_string_view<char,std::char_traits<char>> *)&local_68,"auto-start-reverse"); bVar1 = std::operator==(local_58,local_50,local_68,local_60); if (bVar1) { *(int4 *)(param_1 + 0xc) = 0; *(int4 *)(param_1 + 0x10) = 1; local_9 = 1; } else { local_6c = 0.0; bVar1 = parseNumber<float>((basic_string_view *)&local_20,&local_6c); if (bVar1) { uVar2 = std::basic_string_view<char,std::char_traits<char>>::empty ((basic_string_view<char,std::char_traits<char>> *)&local_20); if ((uVar2 & 1) == 0) { local_80 = local_20; local_78 = local_18; std::basic_string_view<char,std::char_traits<char>>::basic_string_view ((basic_string_view<char,std::char_traits<char>> *)&local_90,"rad"); bVar1 = std::operator==(local_80,local_78,local_90,local_88); if (bVar1) { local_6c = DAT_0018cec0 * local_6c; } else { local_a0 = local_20; local_98 = local_18; std::basic_string_view<char,std::char_traits<char>>::basic_string_view ((basic_string_view<char,std::char_traits<char>> *)&local_b0,"grad"); bVar1 = std::operator==(local_a0,local_98,local_b0,local_a8); if (bVar1) { local_6c = DAT_0018cebc * local_6c; } else { local_c0 = local_20; local_b8 = local_18; std::basic_string_view<char,std::char_traits<char>>::basic_string_view ((basic_string_view<char,std::char_traits<char>> *)&local_d0,"turn"); bVar1 = std::operator==(local_c0,local_b8,local_d0,local_c8); if (bVar1) { local_6c = DAT_0018c85c * local_6c; } else { local_e0 = local_20; local_d8 = local_18; std::basic_string_view<char,std::char_traits<char>>::basic_string_view ((basic_string_view<char,std::char_traits<char>> *)&local_f0,"deg"); bVar1 = std::operator!=(local_e0,local_d8,local_f0,local_e8); if (bVar1) { return 0; } } } } } *(float *)(param_1 + 0xc) = local_6c; *(int4 *)(param_1 + 0x10) = 2; local_9 = 1; } else { local_9 = 0; } } } return local_9; }
6,607
lunasvg::SVGAngle::parse(std::basic_string_view<char, std::char_traits<char>>)
dmazzella[P]pylunasvg/lunasvg/source/svgproperty.cpp
bool SVGAngle::parse(std::string_view input) { stripLeadingAndTrailingSpaces(input); if(input == "auto") { m_value = 0.f; m_orientType = OrientType::Auto; return true; } if(input == "auto-start-reverse") { m_value = 0.f; m_orientType = OrientType::AutoStartReverse; return true; } float value = 0.f; if(!parseNumber(input, value)) return false; if(!input.empty()) { if(input == "rad") value *= 180.f / PLUTOVG_PI; else if(input == "grad") value *= 360.f / 400.f; else if(input == "turn") value *= 360.f; else if(input != "deg") { return false; } } m_value = value; m_orientType = OrientType::Angle; return true; }
O1
cpp
lunasvg::SVGAngle::parse(std::basic_string_view<char, std::char_traits<char>>): pushq %r15 pushq %r14 pushq %rbx subq $0x20, %rsp movq %rdi, %rbx leaq 0x10(%rsp), %r15 movq %rsi, (%r15) movq %rdx, 0x8(%r15) movq %r15, %rdi callq 0x171df movq (%r15), %r14 movq 0x8(%r15), %r15 cmpq $0x12, %r14 je 0x1f491 cmpq $0x4, %r14 jne 0x1f4ab leaq 0x246d0(%rip), %rsi # 0x43b48 movq %r15, %rdi movq %r14, %rdx callq 0xa330 testl %eax, %eax je 0x1f575 cmpq $0x12, %r14 jne 0x1f4ab leaq 0x24da5(%rip), %rsi # 0x4423d movq %r15, %rdi movq %r14, %rdx callq 0xa330 testl %eax, %eax je 0x1f565 leaq 0xc(%rsp), %rsi movl $0x0, (%rsi) leaq 0x10(%rsp), %rdi callq 0x172e2 testb %al, %al je 0x1f561 movq 0x10(%rsp), %r14 testq %r14, %r14 je 0x1f5b3 movq 0x18(%rsp), %r15 cmpq $0x4, %r14 je 0x1f50d cmpq $0x3, %r14 jne 0x1f561 leaq 0x24d63(%rip), %rsi # 0x44251 movq %r15, %rdi movq %r14, %rdx callq 0xa330 testl %eax, %eax je 0x1f58f cmpq $0x3, %r14 je 0x1f54b cmpq $0x4, %r14 jne 0x1f561 leaq 0x24d3c(%rip), %rsi # 0x44250 movq %r15, %rdi movq %r14, %rdx callq 0xa330 testl %eax, %eax je 0x1f57f cmpq $0x3, %r14 je 0x1f54b cmpq $0x4, %r14 jne 0x1f561 leaq 0x24d1f(%rip), %rsi # 0x44255 movq %r15, %rdi movq %r14, %rdx callq 0xa330 testl %eax, %eax je 0x1f59f cmpq $0x3, %r14 jne 0x1f561 leaq 0x24d08(%rip), %rsi # 0x4425a movq %r15, %rdi movq %r14, %rdx callq 0xa330 testl %eax, %eax je 0x1f5b3 xorl %eax, %eax jmp 0x1f5c7 movabsq $0x100000000, %rax # imm = 0x100000000 movq %rax, 0xc(%rbx) jmp 0x1f5c5 movq $0x0, 0xc(%rbx) jmp 0x1f5c5 movss 0xc(%rsp), %xmm0 mulss 0x24973(%rip), %xmm0 # 0x43f00 jmp 0x1f5ad movss 0xc(%rsp), %xmm0 mulss 0x24967(%rip), %xmm0 # 0x43f04 jmp 0x1f5ad movss 0xc(%rsp), %xmm0 mulss 0x242b3(%rip), %xmm0 # 0x43860 movss %xmm0, 0xc(%rsp) movss 0xc(%rsp), %xmm0 movss %xmm0, 0xc(%rbx) movl $0x2, 0x10(%rbx) movb $0x1, %al addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq nop
_ZN7lunasvg8SVGAngle5parseESt17basic_string_viewIcSt11char_traitsIcEE: push r15 push r14 push rbx sub rsp, 20h mov rbx, rdi lea r15, [rsp+38h+var_28] mov [r15], rsi mov [r15+8], rdx mov rdi, r15 call _ZN7lunasvg29stripLeadingAndTrailingSpacesERSt17basic_string_viewIcSt11char_traitsIcEE; lunasvg::stripLeadingAndTrailingSpaces(std::string_view &) mov r14, [r15] mov r15, [r15+8] cmp r14, 12h jz short loc_1F491 cmp r14, 4 jnz short loc_1F4AB lea rsi, aAuto; "auto" mov rdi, r15 mov rdx, r14 call _bcmp test eax, eax jz loc_1F575 cmp r14, 12h jnz short loc_1F4AB loc_1F491: lea rsi, aAutoStartRever; "auto-start-reverse" mov rdi, r15 mov rdx, r14 call _bcmp test eax, eax jz loc_1F565 loc_1F4AB: lea rsi, [rsp+38h+var_2C] mov dword ptr [rsi], 0 lea rdi, [rsp+38h+var_28] call _ZN7lunasvg11parseNumberIfEEbRSt17basic_string_viewIcSt11char_traitsIcEERT_; lunasvg::parseNumber<float>(std::string_view &,float &) test al, al jz loc_1F561 mov r14, [rsp+38h+var_28] test r14, r14 jz loc_1F5B3 mov r15, [rsp+38h+var_20] cmp r14, 4 jz short loc_1F50D cmp r14, 3 jnz short loc_1F561 lea rsi, aGrad+1; "rad" mov rdi, r15 mov rdx, r14 call _bcmp test eax, eax jz loc_1F58F cmp r14, 3 jz short loc_1F54B cmp r14, 4 jnz short loc_1F561 loc_1F50D: lea rsi, aGrad; "grad" mov rdi, r15 mov rdx, r14 call _bcmp test eax, eax jz short loc_1F57F cmp r14, 3 jz short loc_1F54B cmp r14, 4 jnz short loc_1F561 lea rsi, aTurn; "turn" mov rdi, r15 mov rdx, r14 call _bcmp test eax, eax jz short loc_1F59F cmp r14, 3 jnz short loc_1F561 loc_1F54B: lea rsi, aDeg; "deg" mov rdi, r15 mov rdx, r14 call _bcmp test eax, eax jz short loc_1F5B3 loc_1F561: xor eax, eax jmp short loc_1F5C7 loc_1F565: mov rax, 100000000h mov [rbx+0Ch], rax jmp short loc_1F5C5 loc_1F575: mov qword ptr [rbx+0Ch], 0 jmp short loc_1F5C5 loc_1F57F: movss xmm0, [rsp+38h+var_2C] mulss xmm0, cs:dword_43F00 jmp short loc_1F5AD loc_1F58F: movss xmm0, [rsp+38h+var_2C] mulss xmm0, cs:dword_43F04 jmp short loc_1F5AD loc_1F59F: movss xmm0, [rsp+38h+var_2C] mulss xmm0, cs:dword_43860 loc_1F5AD: movss [rsp+38h+var_2C], xmm0 loc_1F5B3: movss xmm0, [rsp+38h+var_2C] movss dword ptr [rbx+0Ch], xmm0 mov dword ptr [rbx+10h], 2 loc_1F5C5: mov al, 1 loc_1F5C7: add rsp, 20h pop rbx pop r14 pop r15 retn
char lunasvg::SVGAngle::parse(long long a1, long long a2, long long a3) { long long v3; // r14 long long v4; // r15 float v6; // xmm0_4 float v7; // [rsp+Ch] [rbp-2Ch] BYREF long long v8; // [rsp+10h] [rbp-28h] BYREF long long v9; // [rsp+18h] [rbp-20h] v8 = a2; v9 = a3; lunasvg::stripLeadingAndTrailingSpaces(&v8); if ( v8 == 18 ) { if ( (unsigned int)bcmp(v9, "auto-start-reverse") ) goto LABEL_6; *(_QWORD *)(a1 + 12) = 0x100000000LL; } else { if ( v8 != 4 || (unsigned int)bcmp(v9, "auto") ) { LABEL_6: v7 = 0.0; if ( lunasvg::parseNumber<float>(&v8, &v7) ) { v3 = v8; if ( !v8 ) { LABEL_25: *(float *)(a1 + 12) = v7; *(_DWORD *)(a1 + 16) = 2; return 1; } v4 = v9; if ( v8 == 4 ) { if ( (unsigned int)bcmp(v9, "grad") ) { if ( v3 == 3 ) goto LABEL_17; if ( v3 != 4 || (unsigned int)bcmp(v4, "turn") ) return 0; v6 = v7 * 360.0; } else { v6 = v7 * 0.89999998; } LABEL_24: v7 = v6; goto LABEL_25; } if ( v8 == 3 ) { if ( (unsigned int)bcmp(v9, "rad") ) { LABEL_17: if ( (unsigned int)bcmp(v4, "deg") ) return 0; goto LABEL_25; } v6 = v7 * 57.295776; goto LABEL_24; } } return 0; } *(_QWORD *)(a1 + 12) = 0LL; } return 1; }
parse: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x20 MOV RBX,RDI LEA R15,[RSP + 0x10] MOV qword ptr [R15],RSI MOV qword ptr [R15 + 0x8],RDX MOV RDI,R15 CALL 0x001171df MOV R14,qword ptr [R15] MOV R15,qword ptr [R15 + 0x8] CMP R14,0x12 JZ 0x0011f491 CMP R14,0x4 JNZ 0x0011f4ab LEA RSI,[0x143b48] MOV RDI,R15 MOV RDX,R14 CALL 0x0010a330 TEST EAX,EAX JZ 0x0011f575 CMP R14,0x12 JNZ 0x0011f4ab LAB_0011f491: LEA RSI,[0x14423d] MOV RDI,R15 MOV RDX,R14 CALL 0x0010a330 TEST EAX,EAX JZ 0x0011f565 LAB_0011f4ab: LEA RSI,[RSP + 0xc] MOV dword ptr [RSI],0x0 LEA RDI,[RSP + 0x10] CALL 0x001172e2 TEST AL,AL JZ 0x0011f561 MOV R14,qword ptr [RSP + 0x10] TEST R14,R14 JZ 0x0011f5b3 MOV R15,qword ptr [RSP + 0x18] CMP R14,0x4 JZ 0x0011f50d CMP R14,0x3 JNZ 0x0011f561 LEA RSI,[0x144251] MOV RDI,R15 MOV RDX,R14 CALL 0x0010a330 TEST EAX,EAX JZ 0x0011f58f CMP R14,0x3 JZ 0x0011f54b CMP R14,0x4 JNZ 0x0011f561 LAB_0011f50d: LEA RSI,[0x144250] MOV RDI,R15 MOV RDX,R14 CALL 0x0010a330 TEST EAX,EAX JZ 0x0011f57f CMP R14,0x3 JZ 0x0011f54b CMP R14,0x4 JNZ 0x0011f561 LEA RSI,[0x144255] MOV RDI,R15 MOV RDX,R14 CALL 0x0010a330 TEST EAX,EAX JZ 0x0011f59f CMP R14,0x3 JNZ 0x0011f561 LAB_0011f54b: LEA RSI,[0x14425a] MOV RDI,R15 MOV RDX,R14 CALL 0x0010a330 TEST EAX,EAX JZ 0x0011f5b3 LAB_0011f561: XOR EAX,EAX JMP 0x0011f5c7 LAB_0011f565: MOV RAX,0x100000000 MOV qword ptr [RBX + 0xc],RAX JMP 0x0011f5c5 LAB_0011f575: MOV qword ptr [RBX + 0xc],0x0 JMP 0x0011f5c5 LAB_0011f57f: MOVSS XMM0,dword ptr [RSP + 0xc] MULSS XMM0,dword ptr [0x00143f00] JMP 0x0011f5ad LAB_0011f58f: MOVSS XMM0,dword ptr [RSP + 0xc] MULSS XMM0,dword ptr [0x00143f04] JMP 0x0011f5ad LAB_0011f59f: MOVSS XMM0,dword ptr [RSP + 0xc] MULSS XMM0,dword ptr [0x00143860] LAB_0011f5ad: MOVSS dword ptr [RSP + 0xc],XMM0 LAB_0011f5b3: MOVSS XMM0,dword ptr [RSP + 0xc] MOVSS dword ptr [RBX + 0xc],XMM0 MOV dword ptr [RBX + 0x10],0x2 LAB_0011f5c5: MOV AL,0x1 LAB_0011f5c7: ADD RSP,0x20 POP RBX POP R14 POP R15 RET
/* WARNING: Removing unreachable block (ram,0x0011f507) */ /* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* lunasvg::SVGAngle::parse(std::basic_string_view<char, std::char_traits<char> >) */ int8 lunasvg::SVGAngle::parse(long param_1,long param_2,void *param_3) { void *__s1; bool bVar1; int iVar2; int4 extraout_var_00; int7 extraout_var; int4 extraout_var_01; int4 extraout_var_02; int4 extraout_var_03; int4 extraout_var_04; int8 uVar3; float local_2c; long local_28; void *local_20; local_28 = param_2; local_20 = param_3; stripLeadingAndTrailingSpaces((basic_string_view *)&local_28); if (local_28 == 0x12) { iVar2 = bcmp(local_20,"auto-start-reverse",0x12); if (iVar2 == 0) { uVar3 = 0x100000000; *(int8 *)(param_1 + 0xc) = 0x100000000; goto LAB_0011f5c5; } } else if (local_28 == 4) { iVar2 = bcmp(local_20,&DAT_00143b48,4); uVar3 = CONCAT44(extraout_var_00,iVar2); if (iVar2 == 0) { *(int8 *)(param_1 + 0xc) = 0; goto LAB_0011f5c5; } } local_2c = 0.0; bVar1 = parseNumber<float>((basic_string_view *)&local_28,&local_2c); __s1 = local_20; uVar3 = CONCAT71(extraout_var,bVar1); if (!bVar1) { return 0; } if (local_28 != 0) { if (local_28 == 4) { iVar2 = bcmp(local_20,&DAT_00144250,4); uVar3 = CONCAT44(extraout_var_02,iVar2); if (iVar2 == 0) { local_2c = local_2c * _DAT_00143f00; } else { iVar2 = bcmp(__s1,&DAT_00144255,4); uVar3 = CONCAT44(extraout_var_03,iVar2); if (iVar2 != 0) { return 0; } local_2c = local_2c * DAT_00143860; } } else { if (local_28 != 3) { return 0; } iVar2 = bcmp(local_20,&DAT_00144251,3); uVar3 = CONCAT44(extraout_var_01,iVar2); if (iVar2 == 0) { local_2c = local_2c * _DAT_00143f04; } else { iVar2 = bcmp(__s1,&DAT_0014425a,3); uVar3 = CONCAT44(extraout_var_04,iVar2); if (iVar2 != 0) { return 0; } } } } *(float *)(param_1 + 0xc) = local_2c; *(int4 *)(param_1 + 0x10) = 2; LAB_0011f5c5: return CONCAT71((int7)((ulong)uVar3 >> 8),1); }
6,608
free_tmpdir
eloqsql/mysys/mf_tempdir.c
void free_tmpdir(MY_TMPDIR *tmpdir) { uint i; if (!tmpdir->full_list.elements) return; for (i=0; i<=tmpdir->max; i++) my_free(tmpdir->list[i]); delete_dynamic(&tmpdir->full_list); mysql_mutex_destroy(&tmpdir->mutex); }
O0
c
free_tmpdir: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpl $0x0, 0x8(%rax) jne 0xb1998 jmp 0xb19e0 movl $0x0, -0xc(%rbp) movl -0xc(%rbp), %eax movq -0x8(%rbp), %rcx cmpl 0x34(%rcx), %eax ja 0xb19ca movq -0x8(%rbp), %rax movq 0x28(%rax), %rax movl -0xc(%rbp), %ecx movq (%rax,%rcx,8), %rdi callq 0xbacc0 movl -0xc(%rbp), %eax addl $0x1, %eax movl %eax, -0xc(%rbp) jmp 0xb199f movq -0x8(%rbp), %rdi callq 0xa4530 movq -0x8(%rbp), %rdi addq $0x38, %rdi callq 0xb17b0 addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
free_tmpdir: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp dword ptr [rax+8], 0 jnz short loc_B1998 jmp short loc_B19E0 loc_B1998: mov [rbp+var_C], 0 loc_B199F: mov eax, [rbp+var_C] mov rcx, [rbp+var_8] cmp eax, [rcx+34h] ja short loc_B19CA mov rax, [rbp+var_8] mov rax, [rax+28h] mov ecx, [rbp+var_C] mov rdi, [rax+rcx*8] call my_free mov eax, [rbp+var_C] add eax, 1 mov [rbp+var_C], eax jmp short loc_B199F loc_B19CA: mov rdi, [rbp+var_8] call delete_dynamic mov rdi, [rbp+var_8] add rdi, 38h ; '8' call inline_mysql_mutex_destroy_0 loc_B19E0: add rsp, 10h pop rbp retn
long long free_tmpdir(long long a1) { long long result; // rax unsigned int i; // [rsp+4h] [rbp-Ch] result = a1; if ( *(_DWORD *)(a1 + 8) ) { for ( i = 0; i <= *(_DWORD *)(a1 + 52); ++i ) my_free(*(_QWORD *)(*(_QWORD *)(a1 + 40) + 8LL * i)); delete_dynamic(a1); return inline_mysql_mutex_destroy_0(a1 + 56); } return result; }
free_tmpdir: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x8],0x0 JNZ 0x001b1998 JMP 0x001b19e0 LAB_001b1998: MOV dword ptr [RBP + -0xc],0x0 LAB_001b199f: MOV EAX,dword ptr [RBP + -0xc] MOV RCX,qword ptr [RBP + -0x8] CMP EAX,dword ptr [RCX + 0x34] JA 0x001b19ca MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x28] MOV ECX,dword ptr [RBP + -0xc] MOV RDI,qword ptr [RAX + RCX*0x8] CALL 0x001bacc0 MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x1 MOV dword ptr [RBP + -0xc],EAX JMP 0x001b199f LAB_001b19ca: MOV RDI,qword ptr [RBP + -0x8] CALL 0x001a4530 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x38 CALL 0x001b17b0 LAB_001b19e0: ADD RSP,0x10 POP RBP RET
void free_tmpdir(long param_1) { int4 local_14; if (*(int *)(param_1 + 8) != 0) { for (local_14 = 0; local_14 <= *(uint *)(param_1 + 0x34); local_14 = local_14 + 1) { my_free(*(int8 *)(*(long *)(param_1 + 0x28) + (ulong)local_14 * 8)); } delete_dynamic(param_1); inline_mysql_mutex_destroy(param_1 + 0x38); } return; }
6,609
mbedtls_asn1_write_len
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/asn1write.c
int mbedtls_asn1_write_len(unsigned char **p, unsigned char *start, size_t len) { if (len < 0x80) { if (*p - start < 1) { return MBEDTLS_ERR_ASN1_BUF_TOO_SMALL; } *--(*p) = (unsigned char) len; return 1; } if (len <= 0xFF) { if (*p - start < 2) { return MBEDTLS_ERR_ASN1_BUF_TOO_SMALL; } *--(*p) = (unsigned char) len; *--(*p) = 0x81; return 2; } if (len <= 0xFFFF) { if (*p - start < 3) { return MBEDTLS_ERR_ASN1_BUF_TOO_SMALL; } *--(*p) = MBEDTLS_BYTE_0(len); *--(*p) = MBEDTLS_BYTE_1(len); *--(*p) = 0x82; return 3; } if (len <= 0xFFFFFF) { if (*p - start < 4) { return MBEDTLS_ERR_ASN1_BUF_TOO_SMALL; } *--(*p) = MBEDTLS_BYTE_0(len); *--(*p) = MBEDTLS_BYTE_1(len); *--(*p) = MBEDTLS_BYTE_2(len); *--(*p) = 0x83; return 4; } int len_is_valid = 1; #if SIZE_MAX > 0xFFFFFFFF len_is_valid = (len <= 0xFFFFFFFF); #endif if (len_is_valid) { if (*p - start < 5) { return MBEDTLS_ERR_ASN1_BUF_TOO_SMALL; } *--(*p) = MBEDTLS_BYTE_0(len); *--(*p) = MBEDTLS_BYTE_1(len); *--(*p) = MBEDTLS_BYTE_2(len); *--(*p) = MBEDTLS_BYTE_3(len); *--(*p) = 0x84; return 5; } return MBEDTLS_ERR_ASN1_INVALID_LENGTH; }
O3
c
mbedtls_asn1_write_len: cmpq $0x7f, %rdx ja 0x97002 movq (%rdi), %rcx movq %rcx, %rax subq %rsi, %rax testq %rax, %rax jle 0x97083 movl $0x1, %eax jmp 0x97142 cmpq $0xff, %rdx ja 0x9703c movq (%rdi), %rcx movq %rcx, %r8 subq %rsi, %r8 movl $0xffffff94, %eax # imm = 0xFFFFFF94 cmpq $0x2, %r8 jl 0x9714c leaq -0x1(%rcx), %rax movq %rax, (%rdi) movb %dl, -0x1(%rcx) movq (%rdi), %rcx movl $0x2, %eax movb $-0x7f, %dl jmp 0x97142 cmpq $0xffff, %rdx # imm = 0xFFFF ja 0x97089 movq (%rdi), %rcx movq %rcx, %r8 subq %rsi, %r8 movl $0xffffff94, %eax # imm = 0xFFFFFF94 cmpq $0x3, %r8 jl 0x9714c leaq -0x1(%rcx), %rax movq %rax, (%rdi) movb %dl, -0x1(%rcx) movq (%rdi), %rax leaq -0x1(%rax), %rcx movq %rcx, (%rdi) movb %dh, -0x1(%rax) movq (%rdi), %rcx movl $0x3, %eax movb $-0x7e, %dl jmp 0x97142 movl $0xffffff94, %eax # imm = 0xFFFFFF94 retq cmpq $0xffffff, %rdx # imm = 0xFFFFFF ja 0x970dd movq (%rdi), %rcx movq %rcx, %r8 subq %rsi, %r8 movl $0xffffff94, %eax # imm = 0xFFFFFF94 cmpq $0x4, %r8 jl 0x9714c leaq -0x1(%rcx), %rax movq %rax, (%rdi) movb %dl, -0x1(%rcx) movq (%rdi), %rax leaq -0x1(%rax), %rcx movq %rcx, (%rdi) movb %dh, -0x1(%rax) shrl $0x10, %edx movq (%rdi), %rax leaq -0x1(%rax), %rcx movq %rcx, (%rdi) movb %dl, -0x1(%rax) movq (%rdi), %rcx movl $0x4, %eax movb $-0x7d, %dl jmp 0x97142 movq %rdx, %rax shrq $0x20, %rax movl $0xffffff9c, %eax # imm = 0xFFFFFF9C jne 0x9714c movq (%rdi), %rcx movq %rcx, %r8 subq %rsi, %r8 movl $0xffffff94, %eax # imm = 0xFFFFFF94 cmpq $0x5, %r8 jl 0x9714c leaq -0x1(%rcx), %rax movq %rax, (%rdi) movb %dl, -0x1(%rcx) movq (%rdi), %rax leaq -0x1(%rax), %rcx movq %rcx, (%rdi) movb %dh, -0x1(%rax) movl %edx, %eax shrl $0x10, %eax movq (%rdi), %rcx leaq -0x1(%rcx), %rsi movq %rsi, (%rdi) movb %al, -0x1(%rcx) shrl $0x18, %edx movq (%rdi), %rax leaq -0x1(%rax), %rcx movq %rcx, (%rdi) movb %dl, -0x1(%rax) movq (%rdi), %rcx movl $0x5, %eax movb $-0x7c, %dl leaq -0x1(%rcx), %rsi movq %rsi, (%rdi) movb %dl, -0x1(%rcx) retq
mbedtls_asn1_write_len: cmp rdx, 7Fh ja short loc_97002 mov rcx, [rdi] mov rax, rcx sub rax, rsi test rax, rax jle loc_97083 mov eax, 1 jmp loc_97142 loc_97002: cmp rdx, 0FFh ja short loc_9703C mov rcx, [rdi] mov r8, rcx sub r8, rsi mov eax, 0FFFFFF94h cmp r8, 2 jl locret_9714C lea rax, [rcx-1] mov [rdi], rax mov [rcx-1], dl mov rcx, [rdi] mov eax, 2 mov dl, 81h jmp loc_97142 loc_9703C: cmp rdx, 0FFFFh ja short loc_97089 mov rcx, [rdi] mov r8, rcx sub r8, rsi mov eax, 0FFFFFF94h cmp r8, 3 jl locret_9714C lea rax, [rcx-1] mov [rdi], rax mov [rcx-1], dl mov rax, [rdi] lea rcx, [rax-1] mov [rdi], rcx mov [rax-1], dh mov rcx, [rdi] mov eax, 3 mov dl, 82h jmp loc_97142 loc_97083: mov eax, 0FFFFFF94h retn loc_97089: cmp rdx, 0FFFFFFh ja short loc_970DD mov rcx, [rdi] mov r8, rcx sub r8, rsi mov eax, 0FFFFFF94h cmp r8, 4 jl locret_9714C lea rax, [rcx-1] mov [rdi], rax mov [rcx-1], dl mov rax, [rdi] lea rcx, [rax-1] mov [rdi], rcx mov [rax-1], dh shr edx, 10h mov rax, [rdi] lea rcx, [rax-1] mov [rdi], rcx mov [rax-1], dl mov rcx, [rdi] mov eax, 4 mov dl, 83h jmp short loc_97142 loc_970DD: mov rax, rdx shr rax, 20h mov eax, 0FFFFFF9Ch jnz short locret_9714C mov rcx, [rdi] mov r8, rcx sub r8, rsi mov eax, 0FFFFFF94h cmp r8, 5 jl short locret_9714C lea rax, [rcx-1] mov [rdi], rax mov [rcx-1], dl mov rax, [rdi] lea rcx, [rax-1] mov [rdi], rcx mov [rax-1], dh mov eax, edx shr eax, 10h mov rcx, [rdi] lea rsi, [rcx-1] mov [rdi], rsi mov [rcx-1], al shr edx, 18h mov rax, [rdi] lea rcx, [rax-1] mov [rdi], rcx mov [rax-1], dl mov rcx, [rdi] mov eax, 5 mov dl, 84h loc_97142: lea rsi, [rcx-1] mov [rdi], rsi mov [rcx-1], dl locret_9714C: retn
long long mbedtls_asn1_write_len(long long *a1, long long a2, unsigned long long a3) { long long v3; // rcx long long result; // rax long long v5; // rcx long long v6; // rcx _BYTE *v7; // rcx long long v8; // rcx _BYTE *v9; // rcx _BYTE *v10; // rcx long long v11; // rcx _BYTE *v12; // rcx _BYTE *v13; // rsi _BYTE *v14; // rcx if ( a3 <= 0x7F ) { v3 = *a1; if ( *a1 - a2 <= 0 ) return 4294967188LL; result = 1LL; goto LABEL_17; } if ( a3 <= 0xFF ) { v5 = *a1; result = 4294967188LL; if ( *a1 - a2 < 2 ) return result; *a1 = v5 - 1; *(_BYTE *)(v5 - 1) = a3; v3 = *a1; result = 2LL; LOBYTE(a3) = -127; goto LABEL_17; } if ( a3 <= 0xFFFF ) { v6 = *a1; result = 4294967188LL; if ( *a1 - a2 < 3 ) return result; *a1 = v6 - 1; *(_BYTE *)(v6 - 1) = a3; v7 = (_BYTE *)(*a1 - 1); *a1 = (long long)v7; *v7 = BYTE1(a3); v3 = *a1; result = 3LL; LOBYTE(a3) = -126; goto LABEL_17; } if ( a3 <= 0xFFFFFF ) { v8 = *a1; result = 4294967188LL; if ( *a1 - a2 < 4 ) return result; *a1 = v8 - 1; *(_BYTE *)(v8 - 1) = a3; v9 = (_BYTE *)(*a1 - 1); *a1 = (long long)v9; *v9 = BYTE1(a3); v10 = (_BYTE *)(*a1 - 1); *a1 = (long long)v10; *v10 = BYTE2(a3); v3 = *a1; result = 4LL; LOBYTE(a3) = -125; goto LABEL_17; } result = 4294967196LL; if ( !HIDWORD(a3) ) { v11 = *a1; result = 4294967188LL; if ( *a1 - a2 >= 5 ) { *a1 = v11 - 1; *(_BYTE *)(v11 - 1) = a3; v12 = (_BYTE *)(*a1 - 1); *a1 = (long long)v12; *v12 = BYTE1(a3); v13 = (_BYTE *)(*a1 - 1); *a1 = (long long)v13; *v13 = BYTE2(a3); v14 = (_BYTE *)(*a1 - 1); *a1 = (long long)v14; *v14 = BYTE3(a3); v3 = *a1; result = 5LL; LOBYTE(a3) = -124; LABEL_17: *a1 = v3 - 1; *(_BYTE *)(v3 - 1) = a3; } } return result; }
mbedtls_asn1_write_len: CMP RDX,0x7f JA 0x00197002 MOV RCX,qword ptr [RDI] MOV RAX,RCX SUB RAX,RSI TEST RAX,RAX JLE 0x00197083 MOV EAX,0x1 JMP 0x00197142 LAB_00197002: CMP RDX,0xff JA 0x0019703c MOV RCX,qword ptr [RDI] MOV R8,RCX SUB R8,RSI MOV EAX,0xffffff94 CMP R8,0x2 JL 0x0019714c LEA RAX,[RCX + -0x1] MOV qword ptr [RDI],RAX MOV byte ptr [RCX + -0x1],DL MOV RCX,qword ptr [RDI] MOV EAX,0x2 MOV DL,0x81 JMP 0x00197142 LAB_0019703c: CMP RDX,0xffff JA 0x00197089 MOV RCX,qword ptr [RDI] MOV R8,RCX SUB R8,RSI MOV EAX,0xffffff94 CMP R8,0x3 JL 0x0019714c LEA RAX,[RCX + -0x1] MOV qword ptr [RDI],RAX MOV byte ptr [RCX + -0x1],DL MOV RAX,qword ptr [RDI] LEA RCX,[RAX + -0x1] MOV qword ptr [RDI],RCX MOV byte ptr [RAX + -0x1],DH MOV RCX,qword ptr [RDI] MOV EAX,0x3 MOV DL,0x82 JMP 0x00197142 LAB_00197083: MOV EAX,0xffffff94 RET LAB_00197089: CMP RDX,0xffffff JA 0x001970dd MOV RCX,qword ptr [RDI] MOV R8,RCX SUB R8,RSI MOV EAX,0xffffff94 CMP R8,0x4 JL 0x0019714c LEA RAX,[RCX + -0x1] MOV qword ptr [RDI],RAX MOV byte ptr [RCX + -0x1],DL MOV RAX,qword ptr [RDI] LEA RCX,[RAX + -0x1] MOV qword ptr [RDI],RCX MOV byte ptr [RAX + -0x1],DH SHR EDX,0x10 MOV RAX,qword ptr [RDI] LEA RCX,[RAX + -0x1] MOV qword ptr [RDI],RCX MOV byte ptr [RAX + -0x1],DL MOV RCX,qword ptr [RDI] MOV EAX,0x4 MOV DL,0x83 JMP 0x00197142 LAB_001970dd: MOV RAX,RDX SHR RAX,0x20 MOV EAX,0xffffff9c JNZ 0x0019714c MOV RCX,qword ptr [RDI] MOV R8,RCX SUB R8,RSI MOV EAX,0xffffff94 CMP R8,0x5 JL 0x0019714c LEA RAX,[RCX + -0x1] MOV qword ptr [RDI],RAX MOV byte ptr [RCX + -0x1],DL MOV RAX,qword ptr [RDI] LEA RCX,[RAX + -0x1] MOV qword ptr [RDI],RCX MOV byte ptr [RAX + -0x1],DH MOV EAX,EDX SHR EAX,0x10 MOV RCX,qword ptr [RDI] LEA RSI,[RCX + -0x1] MOV qword ptr [RDI],RSI MOV byte ptr [RCX + -0x1],AL SHR EDX,0x18 MOV RAX,qword ptr [RDI] LEA RCX,[RAX + -0x1] MOV qword ptr [RDI],RCX MOV byte ptr [RAX + -0x1],DL MOV RCX,qword ptr [RDI] MOV EAX,0x5 MOV DL,0x84 LAB_00197142: LEA RSI,[RCX + -0x1] MOV qword ptr [RDI],RSI MOV byte ptr [RCX + -0x1],DL LAB_0019714c: RET
int8 mbedtls_asn1_write_len(long *param_1,long param_2,ulong param_3) { int8 uVar1; long lVar2; int1 uVar3; int1 uVar4; int1 uVar5; if (param_3 < 0x80) { lVar2 = *param_1; if (lVar2 == param_2 || lVar2 - param_2 < 0) { return 0xffffff94; } uVar1 = 1; } else { uVar3 = (int1)param_3; if (param_3 < 0x100) { lVar2 = *param_1; if (lVar2 - param_2 < 2) { return 0xffffff94; } *param_1 = lVar2 + -1; *(int1 *)(lVar2 + -1) = uVar3; lVar2 = *param_1; uVar1 = 2; param_3 = 0x81; } else { uVar5 = (int1)(param_3 >> 8); if (param_3 < 0x10000) { lVar2 = *param_1; if (lVar2 - param_2 < 3) { return 0xffffff94; } *param_1 = lVar2 + -1; *(int1 *)(lVar2 + -1) = uVar3; lVar2 = *param_1; *param_1 = lVar2 + -1; *(int1 *)(lVar2 + -1) = uVar5; lVar2 = *param_1; uVar1 = 3; param_3 = 0x82; } else { uVar4 = (int1)(param_3 >> 0x10); if (param_3 < 0x1000000) { lVar2 = *param_1; if (lVar2 - param_2 < 4) { return 0xffffff94; } *param_1 = lVar2 + -1; *(int1 *)(lVar2 + -1) = uVar3; lVar2 = *param_1; *param_1 = lVar2 + -1; *(int1 *)(lVar2 + -1) = uVar5; lVar2 = *param_1; *param_1 = lVar2 + -1; *(int1 *)(lVar2 + -1) = uVar4; lVar2 = *param_1; uVar1 = 4; param_3 = 0x83; } else { if (param_3 >> 0x20 != 0) { return 0xffffff9c; } lVar2 = *param_1; if (lVar2 - param_2 < 5) { return 0xffffff94; } *param_1 = lVar2 + -1; *(int1 *)(lVar2 + -1) = uVar3; lVar2 = *param_1; *param_1 = lVar2 + -1; *(int1 *)(lVar2 + -1) = uVar5; lVar2 = *param_1; *param_1 = lVar2 + -1; *(int1 *)(lVar2 + -1) = uVar4; lVar2 = *param_1; *param_1 = lVar2 + -1; *(char *)(lVar2 + -1) = (char)(param_3 >> 0x18); lVar2 = *param_1; uVar1 = 5; param_3 = 0x84; } } } } *param_1 = lVar2 + -1; *(char *)(lVar2 + -1) = (char)param_3; return uVar1; }
6,610
PFS_buffer_scalable_container<PFS_table_share, 4096, 4096, PFS_buffer_default_array<PFS_table_share>, PFS_buffer_default_allocator<PFS_table_share>>::apply(void (*)(PFS_table_share*))
eloqsql/storage/perfschema/pfs_buffer_container.h
void apply(function_type fct) { uint i; array_type *page; value_type *pfs; value_type *pfs_last; for (i=0 ; i < PFS_PAGE_COUNT; i++) { page= m_pages[i]; if (page != NULL) { pfs= page->get_first(); pfs_last= page->get_last(); while (pfs < pfs_last) { if (pfs->m_lock.is_populated()) { fct(pfs); } pfs++; } } } }
O0
c
PFS_buffer_scalable_container<PFS_table_share, 4096, 4096, PFS_buffer_default_array<PFS_table_share>, PFS_buffer_default_allocator<PFS_table_share>>::apply(void (*)(PFS_table_share*)): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x38(%rbp) movl $0x0, -0x14(%rbp) cmpl $0x1000, -0x14(%rbp) # imm = 0x1000 jae 0x5630e movq -0x38(%rbp), %rax movl -0x14(%rbp), %ecx movq 0xa8(%rax,%rcx,8), %rax movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) je 0x56301 movq -0x20(%rbp), %rdi callq 0x3e530 movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rdi callq 0x3e550 movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x562ff movq -0x28(%rbp), %rdi callq 0x38d80 testb $0x1, %al jne 0x562e5 jmp 0x562ef movq -0x10(%rbp), %rax movq -0x28(%rbp), %rdi callq *%rax movq -0x28(%rbp), %rax addq $0x400, %rax # imm = 0x400 movq %rax, -0x28(%rbp) jmp 0x562cc jmp 0x56301 jmp 0x56303 movl -0x14(%rbp), %eax addl $0x1, %eax movl %eax, -0x14(%rbp) jmp 0x5628f addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nop
_ZN29PFS_buffer_scalable_containerI15PFS_table_shareLi4096ELi4096E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE5applyEPFvPS0_E: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_38], rax mov [rbp+var_14], 0 loc_5628F: cmp [rbp+var_14], 1000h jnb short loc_5630E mov rax, [rbp+var_38] mov ecx, [rbp+var_14] mov rax, [rax+rcx*8+0A8h] mov [rbp+var_20], rax cmp [rbp+var_20], 0 jz short loc_56301 mov rdi, [rbp+var_20] call _ZN24PFS_buffer_default_arrayI15PFS_table_shareE9get_firstEv; PFS_buffer_default_array<PFS_table_share>::get_first(void) mov [rbp+var_28], rax mov rdi, [rbp+var_20] call _ZN24PFS_buffer_default_arrayI15PFS_table_shareE8get_lastEv; PFS_buffer_default_array<PFS_table_share>::get_last(void) mov [rbp+var_30], rax loc_562CC: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jnb short loc_562FF mov rdi, [rbp+var_28]; this call _ZN8pfs_lock12is_populatedEv; pfs_lock::is_populated(void) test al, 1 jnz short loc_562E5 jmp short loc_562EF loc_562E5: mov rax, [rbp+var_10] mov rdi, [rbp+var_28] call rax loc_562EF: mov rax, [rbp+var_28] add rax, 400h mov [rbp+var_28], rax jmp short loc_562CC loc_562FF: jmp short $+2 loc_56301: jmp short $+2 loc_56303: mov eax, [rbp+var_14] add eax, 1 mov [rbp+var_14], eax jmp short loc_5628F loc_5630E: add rsp, 40h pop rbp retn
long long PFS_buffer_scalable_container<PFS_table_share,4096,4096,PFS_buffer_default_array<PFS_table_share>,PFS_buffer_default_allocator<PFS_table_share>>::apply( long long a1, unsigned int *a2) { long long result; // rax unsigned long long last; // [rsp+10h] [rbp-30h] pfs_lock *first; // [rsp+18h] [rbp-28h] long long v5; // [rsp+20h] [rbp-20h] unsigned int i; // [rsp+2Ch] [rbp-14h] result = a1; for ( i = 0; i < 0x1000; ++i ) { v5 = *(_QWORD *)(a1 + 8LL * i + 168); if ( v5 ) { first = (pfs_lock *)PFS_buffer_default_array<PFS_table_share>::get_first(v5); last = PFS_buffer_default_array<PFS_table_share>::get_last(v5); while ( (unsigned long long)first < last ) { if ( pfs_lock::is_populated(first, a2) ) ((void ( *)(pfs_lock *))a2)(first); first = (pfs_lock *)((char *)first + 1024); } } result = i + 1; } return result; }
apply: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x38],RAX MOV dword ptr [RBP + -0x14],0x0 LAB_0015628f: CMP dword ptr [RBP + -0x14],0x1000 JNC 0x0015630e MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RAX + RCX*0x8 + 0xa8] MOV qword ptr [RBP + -0x20],RAX CMP qword ptr [RBP + -0x20],0x0 JZ 0x00156301 MOV RDI,qword ptr [RBP + -0x20] CALL 0x0013e530 MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x20] CALL 0x0013e550 MOV qword ptr [RBP + -0x30],RAX LAB_001562cc: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JNC 0x001562ff MOV RDI,qword ptr [RBP + -0x28] CALL 0x00138d80 TEST AL,0x1 JNZ 0x001562e5 JMP 0x001562ef LAB_001562e5: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RBP + -0x28] CALL RAX LAB_001562ef: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x400 MOV qword ptr [RBP + -0x28],RAX JMP 0x001562cc LAB_001562ff: JMP 0x00156301 LAB_00156301: JMP 0x00156303 LAB_00156303: MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 MOV dword ptr [RBP + -0x14],EAX JMP 0x0015628f LAB_0015630e: ADD RSP,0x40 POP RBP RET
/* PFS_buffer_scalable_container<PFS_table_share, 4096, 4096, PFS_buffer_default_array<PFS_table_share>, PFS_buffer_default_allocator<PFS_table_share> >::apply(void (*)(PFS_table_share*)) */ void __thiscall PFS_buffer_scalable_container<PFS_table_share,4096,4096,PFS_buffer_default_array<PFS_table_share>,PFS_buffer_default_allocator<PFS_table_share>> ::apply(PFS_buffer_scalable_container<PFS_table_share,4096,4096,PFS_buffer_default_array<PFS_table_share>,PFS_buffer_default_allocator<PFS_table_share>> *this,_func_void_PFS_table_share_ptr *param_1) { PFS_buffer_default_array<PFS_table_share> *this_00; pfs_lock *ppVar1; ulong uVar2; pfs_lock *local_30; uint local_1c; for (local_1c = 0; local_1c < 0x1000; local_1c = local_1c + 1) { this_00 = *(PFS_buffer_default_array<PFS_table_share> **)(this + (ulong)local_1c * 8 + 0xa8); if (this_00 != (PFS_buffer_default_array<PFS_table_share> *)0x0) { local_30 = (pfs_lock *)PFS_buffer_default_array<PFS_table_share>::get_first(this_00); ppVar1 = (pfs_lock *)PFS_buffer_default_array<PFS_table_share>::get_last(this_00); for (; local_30 < ppVar1; local_30 = local_30 + 0x400) { uVar2 = pfs_lock::is_populated(local_30); if ((uVar2 & 1) != 0) { (*param_1)((PFS_table_share *)local_30); } } } } return; }
6,611
escape_quotes_for_mysql
eloqsql/mysys/charset.c
size_t escape_quotes_for_mysql(CHARSET_INFO *charset_info, char *to, size_t to_length, const char *from, size_t length, my_bool *overflow) { const char *to_start= to; const char *end, *to_end=to_start + (to_length ? to_length-1 : 2*length); #ifdef USE_MB my_bool use_mb_flag= my_ci_use_mb(charset_info); #endif *overflow= FALSE; for (end= from + length; from < end; from++) { #ifdef USE_MB int tmp_length; if (use_mb_flag && (tmp_length= my_ismbchar(charset_info, from, end))) { if (to + tmp_length > to_end) { *overflow= TRUE; break; } while (tmp_length--) *to++= *from++; from--; continue; } /* We don't have the same issue here with a non-multi-byte character being turned into a multi-byte character by the addition of an escaping character, because we are only escaping the ' character with itself. */ #endif if (*from == '\'') { if (to + 2 > to_end) { *overflow= TRUE; break; } *to++= '\''; *to++= '\''; } else { if (to + 1 > to_end) { *overflow= TRUE; break; } *to++= *from; } } *to= 0; return (size_t) (to - to_start); }
O0
c
escape_quotes_for_mysql: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x58(%rbp) cmpq $0x0, -0x18(%rbp) je 0x2b625 movq -0x18(%rbp), %rax subq $0x1, %rax movq %rax, -0x60(%rbp) jmp 0x2b630 movq -0x28(%rbp), %rax shlq %rax movq %rax, -0x60(%rbp) movq -0x58(%rbp), %rax movq -0x60(%rbp), %rcx addq %rcx, %rax movq %rax, -0x48(%rbp) movq -0x8(%rbp), %rdi callq 0x2b7a0 movb %al, -0x49(%rbp) movq -0x30(%rbp), %rax movb $0x0, (%rax) movq -0x20(%rbp), %rax addq -0x28(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x20(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x2b779 movsbl -0x49(%rbp), %eax cmpl $0x0, %eax je 0x2b6ef movq -0x8(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x40(%rbp), %rdx callq 0x2b7d0 movl %eax, -0x50(%rbp) cmpl $0x0, %eax je 0x2b6ef movq -0x10(%rbp), %rax movslq -0x50(%rbp), %rcx addq %rcx, %rax cmpq -0x48(%rbp), %rax jbe 0x2b6ab movq -0x30(%rbp), %rax movb $0x1, (%rax) jmp 0x2b779 jmp 0x2b6ad movl -0x50(%rbp), %eax movl %eax, %ecx addl $-0x1, %ecx movl %ecx, -0x50(%rbp) cmpl $0x0, %eax je 0x2b6e1 movq -0x20(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x20(%rbp) movb (%rax), %cl movq -0x10(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movb %cl, (%rax) jmp 0x2b6ad movq -0x20(%rbp), %rax addq $-0x1, %rax movq %rax, -0x20(%rbp) jmp 0x2b768 movq -0x20(%rbp), %rax movsbl (%rax), %eax cmpl $0x27, %eax jne 0x2b738 movq -0x10(%rbp), %rax addq $0x2, %rax cmpq -0x48(%rbp), %rax jbe 0x2b712 movq -0x30(%rbp), %rax movb $0x1, (%rax) jmp 0x2b779 movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movb $0x27, (%rax) movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movb $0x27, (%rax) jmp 0x2b766 movq -0x10(%rbp), %rax addq $0x1, %rax cmpq -0x48(%rbp), %rax jbe 0x2b74f movq -0x30(%rbp), %rax movb $0x1, (%rax) jmp 0x2b779 movq -0x20(%rbp), %rax movb (%rax), %cl movq -0x10(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movb %cl, (%rax) jmp 0x2b768 movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) jmp 0x2b65e movq -0x10(%rbp), %rax movb $0x0, (%rax) movq -0x10(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
escape_quotes_for_mysql: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov rax, [rbp+var_10] mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_58], rax cmp [rbp+var_18], 0 jz short loc_2B625 mov rax, [rbp+var_18] sub rax, 1 mov [rbp+var_60], rax jmp short loc_2B630 loc_2B625: mov rax, [rbp+var_28] shl rax, 1 mov [rbp+var_60], rax loc_2B630: mov rax, [rbp+var_58] mov rcx, [rbp+var_60] add rax, rcx mov [rbp+var_48], rax mov rdi, [rbp+var_8] call my_ci_use_mb mov [rbp+var_49], al mov rax, [rbp+var_30] mov byte ptr [rax], 0 mov rax, [rbp+var_20] add rax, [rbp+var_28] mov [rbp+var_40], rax loc_2B65E: mov rax, [rbp+var_20] cmp rax, [rbp+var_40] jnb loc_2B779 movsx eax, [rbp+var_49] cmp eax, 0 jz short loc_2B6EF mov rdi, [rbp+var_8] mov rsi, [rbp+var_20] mov rdx, [rbp+var_40] call my_ismbchar mov [rbp+var_50], eax cmp eax, 0 jz short loc_2B6EF mov rax, [rbp+var_10] movsxd rcx, [rbp+var_50] add rax, rcx cmp rax, [rbp+var_48] jbe short loc_2B6AB mov rax, [rbp+var_30] mov byte ptr [rax], 1 jmp loc_2B779 loc_2B6AB: jmp short $+2 loc_2B6AD: mov eax, [rbp+var_50] mov ecx, eax add ecx, 0FFFFFFFFh mov [rbp+var_50], ecx cmp eax, 0 jz short loc_2B6E1 mov rax, [rbp+var_20] mov rcx, rax add rcx, 1 mov [rbp+var_20], rcx mov cl, [rax] mov rax, [rbp+var_10] mov rdx, rax add rdx, 1 mov [rbp+var_10], rdx mov [rax], cl jmp short loc_2B6AD loc_2B6E1: mov rax, [rbp+var_20] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_20], rax jmp short loc_2B768 loc_2B6EF: mov rax, [rbp+var_20] movsx eax, byte ptr [rax] cmp eax, 27h ; ''' jnz short loc_2B738 mov rax, [rbp+var_10] add rax, 2 cmp rax, [rbp+var_48] jbe short loc_2B712 mov rax, [rbp+var_30] mov byte ptr [rax], 1 jmp short loc_2B779 loc_2B712: mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx mov byte ptr [rax], 27h ; ''' mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx mov byte ptr [rax], 27h ; ''' jmp short loc_2B766 loc_2B738: mov rax, [rbp+var_10] add rax, 1 cmp rax, [rbp+var_48] jbe short loc_2B74F mov rax, [rbp+var_30] mov byte ptr [rax], 1 jmp short loc_2B779 loc_2B74F: mov rax, [rbp+var_20] mov cl, [rax] mov rax, [rbp+var_10] mov rdx, rax add rdx, 1 mov [rbp+var_10], rdx mov [rax], cl loc_2B766: jmp short $+2 loc_2B768: mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax jmp loc_2B65E loc_2B779: mov rax, [rbp+var_10] mov byte ptr [rax], 0 mov rax, [rbp+var_10] mov rcx, [rbp+var_38] sub rax, rcx add rsp, 60h pop rbp retn
_BYTE * escape_quotes_for_mysql(long long a1, char *a2, long long a3, char *a4, long long a5, _BYTE *a6) { char *v7; // rax char v8; // cl char *v9; // rax _BYTE *v10; // rax char *v11; // rax long long v13; // [rsp+0h] [rbp-60h] int v14; // [rsp+10h] [rbp-50h] char v15; // [rsp+17h] [rbp-49h] unsigned long long v16; // [rsp+18h] [rbp-48h] char *v17; // [rsp+20h] [rbp-40h] char *v21; // [rsp+50h] [rbp-10h] v21 = a2; if ( a3 ) v13 = a3 - 1; else v13 = 2 * a5; v16 = (unsigned long long)&a2[v13]; v15 = my_ci_use_mb(a1); *a6 = 0; v17 = &a4[a5]; while ( a4 < v17 ) { if ( v15 && (v14 = my_ismbchar(a1, a4, v17)) != 0 ) { if ( (unsigned long long)&v21[v14] > v16 ) { *a6 = 1; break; } while ( v14-- ) { v7 = a4++; v8 = *v7; v9 = v21++; *v9 = v8; } --a4; } else if ( *a4 == 39 ) { if ( (unsigned long long)(v21 + 2) > v16 ) { *a6 = 1; break; } *v21 = 39; v10 = v21 + 1; v21 += 2; *v10 = 39; } else { if ( (unsigned long long)(v21 + 1) > v16 ) { *a6 = 1; break; } v11 = v21++; *v11 = *a4; } ++a4; } *v21 = 0; return (_BYTE *)(v21 - a2); }
escape_quotes_for_mysql: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x58],RAX CMP qword ptr [RBP + -0x18],0x0 JZ 0x0012b625 MOV RAX,qword ptr [RBP + -0x18] SUB RAX,0x1 MOV qword ptr [RBP + -0x60],RAX JMP 0x0012b630 LAB_0012b625: MOV RAX,qword ptr [RBP + -0x28] SHL RAX,0x1 MOV qword ptr [RBP + -0x60],RAX LAB_0012b630: MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x60] ADD RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012b7a0 MOV byte ptr [RBP + -0x49],AL MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x40],RAX LAB_0012b65e: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x40] JNC 0x0012b779 MOVSX EAX,byte ptr [RBP + -0x49] CMP EAX,0x0 JZ 0x0012b6ef MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x40] CALL 0x0012b7d0 MOV dword ptr [RBP + -0x50],EAX CMP EAX,0x0 JZ 0x0012b6ef MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x50] ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x48] JBE 0x0012b6ab MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],0x1 JMP 0x0012b779 LAB_0012b6ab: JMP 0x0012b6ad LAB_0012b6ad: MOV EAX,dword ptr [RBP + -0x50] MOV ECX,EAX ADD ECX,-0x1 MOV dword ptr [RBP + -0x50],ECX CMP EAX,0x0 JZ 0x0012b6e1 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x20],RCX MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RAX],CL JMP 0x0012b6ad LAB_0012b6e1: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,-0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x0012b768 LAB_0012b6ef: MOV RAX,qword ptr [RBP + -0x20] MOVSX EAX,byte ptr [RAX] CMP EAX,0x27 JNZ 0x0012b738 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x48] JBE 0x0012b712 MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],0x1 JMP 0x0012b779 LAB_0012b712: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOV byte ptr [RAX],0x27 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOV byte ptr [RAX],0x27 JMP 0x0012b766 LAB_0012b738: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 CMP RAX,qword ptr [RBP + -0x48] JBE 0x0012b74f MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],0x1 JMP 0x0012b779 LAB_0012b74f: MOV RAX,qword ptr [RBP + -0x20] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RAX],CL LAB_0012b766: JMP 0x0012b768 LAB_0012b768: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x0012b65e LAB_0012b779: MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX ADD RSP,0x60 POP RBP RET
long escape_quotes_for_mysql (int8 param_1,char *param_2,long param_3,char *param_4,long param_5, int1 *param_6) { char cVar1; char *pcVar2; long local_68; int local_58; char *local_28; char *local_18; if (param_3 == 0) { local_68 = param_5 << 1; } else { local_68 = param_3 + -1; } pcVar2 = param_2 + local_68; cVar1 = my_ci_use_mb(param_1); *param_6 = 0; local_28 = param_4; local_18 = param_2; do { if (param_4 + param_5 <= local_28) { LAB_0012b779: *local_18 = '\0'; return (long)local_18 - (long)param_2; } if ((cVar1 == '\0') || (local_58 = my_ismbchar(param_1,local_28,param_4 + param_5), local_58 == 0)) { if (*local_28 == '\'') { if (pcVar2 < local_18 + 2) { *param_6 = 1; goto LAB_0012b779; } *local_18 = '\''; local_18[1] = '\''; local_18 = local_18 + 2; } else { if (pcVar2 < local_18 + 1) { *param_6 = 1; goto LAB_0012b779; } *local_18 = *local_28; local_18 = local_18 + 1; } } else { if (pcVar2 < local_18 + local_58) { *param_6 = 1; goto LAB_0012b779; } while (local_58 != 0) { *local_18 = *local_28; local_58 = local_58 + -1; local_28 = local_28 + 1; local_18 = local_18 + 1; } local_28 = local_28 + -1; } local_28 = local_28 + 1; } while( true ); }
6,612
js_object_set___proto__
bluesky950520[P]quickjs/quickjs.c
static JSValue js_object_set___proto__(JSContext *ctx, JSValue this_val, JSValue proto) { if (JS_IsUndefined(this_val) || JS_IsNull(this_val)) return JS_ThrowTypeErrorNotAnObject(ctx); if (!JS_IsObject(proto) && !JS_IsNull(proto)) return JS_UNDEFINED; if (JS_SetPrototypeInternal(ctx, this_val, proto, TRUE) < 0) return JS_EXCEPTION; else return JS_UNDEFINED; }
O0
c
js_object_set___proto__: subq $0x38, %rsp movq %rsi, 0x18(%rsp) movq %rdx, 0x20(%rsp) movq %rcx, 0x8(%rsp) movq %r8, 0x10(%rsp) movq %rdi, (%rsp) movq 0x18(%rsp), %rdi movq 0x20(%rsp), %rsi callq 0x2cfa0 cmpl $0x0, %eax jne 0xc0424 movq 0x18(%rsp), %rdi movq 0x20(%rsp), %rsi callq 0x2cf80 cmpl $0x0, %eax je 0xc043c movq (%rsp), %rdi callq 0x2e2e0 movq %rax, 0x28(%rsp) movq %rdx, 0x30(%rsp) jmp 0xc04c3 movq 0x8(%rsp), %rdi movq 0x10(%rsp), %rsi callq 0x29cb0 cmpl $0x0, %eax jne 0xc0477 movq 0x8(%rsp), %rdi movq 0x10(%rsp), %rsi callq 0x2cf80 cmpl $0x0, %eax jne 0xc0477 movl $0x0, 0x28(%rsp) movq $0x3, 0x30(%rsp) jmp 0xc04c3 movq (%rsp), %rdi movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx movq 0x8(%rsp), %rcx movq 0x10(%rsp), %r8 movl $0x1, %r9d callq 0x2c360 cmpl $0x0, %eax jge 0xc04b2 movl $0x0, 0x28(%rsp) movq $0x6, 0x30(%rsp) jmp 0xc04c3 movl $0x0, 0x28(%rsp) movq $0x3, 0x30(%rsp) movq 0x28(%rsp), %rax movq 0x30(%rsp), %rdx addq $0x38, %rsp retq nopw %cs:(%rax,%rax)
js_object_set___proto__: sub rsp, 38h mov [rsp+38h+var_20], rsi mov [rsp+38h+var_18], rdx mov [rsp+38h+var_30], rcx mov [rsp+38h+var_28], r8 mov [rsp+38h+var_38], rdi mov rdi, [rsp+38h+var_20] mov rsi, [rsp+38h+var_18] call JS_IsUndefined_0 cmp eax, 0 jnz short loc_C0424 mov rdi, [rsp+38h+var_20] mov rsi, [rsp+38h+var_18] call JS_IsNull_0 cmp eax, 0 jz short loc_C043C loc_C0424: mov rdi, [rsp+38h+var_38] call JS_ThrowTypeErrorNotAnObject mov [rsp+38h+var_10], rax mov [rsp+38h+var_8], rdx jmp loc_C04C3 loc_C043C: mov rdi, [rsp+38h+var_30] mov rsi, [rsp+38h+var_28] call JS_IsObject cmp eax, 0 jnz short loc_C0477 mov rdi, [rsp+38h+var_30] mov rsi, [rsp+38h+var_28] call JS_IsNull_0 cmp eax, 0 jnz short loc_C0477 mov dword ptr [rsp+38h+var_10], 0 mov [rsp+38h+var_8], 3 jmp short loc_C04C3 loc_C0477: mov rdi, [rsp+38h+var_38] mov rsi, [rsp+38h+var_20] mov rdx, [rsp+38h+var_18] mov rcx, [rsp+38h+var_30] mov r8, [rsp+38h+var_28] mov r9d, 1 call JS_SetPrototypeInternal cmp eax, 0 jge short loc_C04B2 mov dword ptr [rsp+38h+var_10], 0 mov [rsp+38h+var_8], 6 jmp short loc_C04C3 loc_C04B2: mov dword ptr [rsp+38h+var_10], 0 mov [rsp+38h+var_8], 3 loc_C04C3: mov rax, [rsp+38h+var_10] mov rdx, [rsp+38h+var_8] add rsp, 38h retn
long long js_object_set___proto__( long long a1, long long a2, long long a3, _DWORD *a4, long long a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, double a10, double a11, __m128 a12, __m128 a13) { long long v14; // rsi long long v15; // rdx long long v16; // rcx long long v17; // r8 long long v18; // r9 __m128 v19; // xmm4 __m128 v20; // xmm5 __m128 v21; // xmm4 __m128 v22; // xmm5 long long v29; // [rsp+28h] [rbp-10h] v14 = a3; if ( JS_IsUndefined_0(a2, a3) ) return JS_ThrowTypeErrorNotAnObject(a1, a6, a7, a8, a9, v19, v20, a12, a13, v14, v15, v16, v17, v18); v14 = a3; if ( JS_IsNull_0(a2, a3) ) return JS_ThrowTypeErrorNotAnObject(a1, a6, a7, a8, a9, v19, v20, a12, a13, v14, v15, v16, v17, v18); if ( JS_IsObject((long long)a4, a5) || JS_IsNull_0((long long)a4, a5) ) { LODWORD(v29) = 0; JS_SetPrototypeInternal(a1, a2, a3, a4, a5, 1LL, a6, a7, a8, a9, v21, v22, a12, a13); } else { LODWORD(v29) = 0; } return v29; }
js_object_set___proto__: SUB RSP,0x38 MOV qword ptr [RSP + 0x18],RSI MOV qword ptr [RSP + 0x20],RDX MOV qword ptr [RSP + 0x8],RCX MOV qword ptr [RSP + 0x10],R8 MOV qword ptr [RSP],RDI MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x20] CALL 0x0012cfa0 CMP EAX,0x0 JNZ 0x001c0424 MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x20] CALL 0x0012cf80 CMP EAX,0x0 JZ 0x001c043c LAB_001c0424: MOV RDI,qword ptr [RSP] CALL 0x0012e2e0 MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x30],RDX JMP 0x001c04c3 LAB_001c043c: MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x10] CALL 0x00129cb0 CMP EAX,0x0 JNZ 0x001c0477 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x10] CALL 0x0012cf80 CMP EAX,0x0 JNZ 0x001c0477 MOV dword ptr [RSP + 0x28],0x0 MOV qword ptr [RSP + 0x30],0x3 JMP 0x001c04c3 LAB_001c0477: MOV RDI,qword ptr [RSP] MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x8] MOV R8,qword ptr [RSP + 0x10] MOV R9D,0x1 CALL 0x0012c360 CMP EAX,0x0 JGE 0x001c04b2 MOV dword ptr [RSP + 0x28],0x0 MOV qword ptr [RSP + 0x30],0x6 JMP 0x001c04c3 LAB_001c04b2: MOV dword ptr [RSP + 0x28],0x0 MOV qword ptr [RSP + 0x30],0x3 LAB_001c04c3: MOV RAX,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x30] ADD RSP,0x38 RET
int1 [16] js_object_set___proto__ (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5) { int iVar1; int1 auVar2 [16]; int4 local_10; int4 uStack_c; int8 local_8; iVar1 = JS_IsUndefined(param_2,param_3); if (iVar1 == 0) { iVar1 = JS_IsNull(param_2,param_3); if (iVar1 == 0) { iVar1 = JS_IsObject(param_4,param_5); if (iVar1 == 0) { iVar1 = JS_IsNull(param_4,param_5); if (iVar1 == 0) { local_10 = 0; local_8 = 3; goto LAB_001c04c3; } } iVar1 = JS_SetPrototypeInternal(param_1,param_2,param_3,param_4,param_5,1); if (iVar1 < 0) { local_10 = 0; local_8 = 6; } else { local_10 = 0; local_8 = 3; } goto LAB_001c04c3; } } auVar2 = JS_ThrowTypeErrorNotAnObject(param_1); local_8 = auVar2._8_8_; local_10 = auVar2._0_4_; uStack_c = auVar2._4_4_; LAB_001c04c3: auVar2._4_4_ = uStack_c; auVar2._0_4_ = local_10; auVar2._8_8_ = local_8; return auVar2; }
6,613
js_object_set___proto__
bluesky950520[P]quickjs/quickjs.c
static JSValue js_object_set___proto__(JSContext *ctx, JSValue this_val, JSValue proto) { if (JS_IsUndefined(this_val) || JS_IsNull(this_val)) return JS_ThrowTypeErrorNotAnObject(ctx); if (!JS_IsObject(proto) && !JS_IsNull(proto)) return JS_UNDEFINED; if (JS_SetPrototypeInternal(ctx, this_val, proto, TRUE) < 0) return JS_EXCEPTION; else return JS_UNDEFINED; }
O3
c
js_object_set___proto__: pushq %rax movl %edx, %eax andl $-0x2, %eax cmpl $0x2, %eax jne 0x730bc leaq 0x2d840(%rip), %rsi # 0xa08ed xorl %eax, %eax callq 0x2214f movl $0x6, %r9d jmp 0x730e4 cmpl $0x2, %r8d je 0x730ce movl $0x3, %r9d cmpl $-0x1, %r8d jne 0x730e4 movl $0x1, %r9d callq 0x22319 shrl $0x1f, %eax leaq (%rax,%rax,2), %r9 addq $0x3, %r9 xorl %eax, %eax movq %r9, %rdx popq %rcx retq
js_object_set___proto__: push rax mov eax, edx and eax, 0FFFFFFFEh cmp eax, 2 jnz short loc_730BC lea rsi, aOperandPrototy+20h; "not an object" xor eax, eax call JS_ThrowTypeError mov r9d, 6 jmp short loc_730E4 loc_730BC: cmp r8d, 2 jz short loc_730CE mov r9d, 3 cmp r8d, 0FFFFFFFFh jnz short loc_730E4 loc_730CE: mov r9d, 1 call JS_SetPrototypeInternal shr eax, 1Fh lea r9, [rax+rax*2] add r9, 3 loc_730E4: xor eax, eax mov rdx, r9 pop rcx retn
long long js_object_set___proto__( long long a1, long long a2, long long a3, _DWORD *a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { char v14; // al if ( (a3 & 0xFFFFFFFE) == 2 ) { JS_ThrowTypeError(a1, (long long)"not an object", a3, (long long)a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v14); } else if ( (_DWORD)a5 == 2 || (_DWORD)a5 == -1 ) { JS_SetPrototypeInternal(a1, a2, a3, a4, a5, 1LL, a7, a8, a9, a10, a11, a12, a13, a14); } return 0LL; }
js_object_set___proto__: PUSH RAX MOV EAX,EDX AND EAX,0xfffffffe CMP EAX,0x2 JNZ 0x001730bc LEA RSI,[0x1a08ed] XOR EAX,EAX CALL 0x0012214f MOV R9D,0x6 JMP 0x001730e4 LAB_001730bc: CMP R8D,0x2 JZ 0x001730ce MOV R9D,0x3 CMP R8D,-0x1 JNZ 0x001730e4 LAB_001730ce: MOV R9D,0x1 CALL 0x00122319 SHR EAX,0x1f LEA R9,[RAX + RAX*0x2] ADD R9,0x3 LAB_001730e4: XOR EAX,EAX MOV RDX,R9 POP RCX RET
int1 [16] js_object_set___proto__ (int8 param_1,int8 param_2,uint param_3,int8 param_4,int param_5) { int1 auVar1 [16]; uint uVar2; ulong uVar3; if ((param_3 & 0xfffffffe) == 2) { JS_ThrowTypeError(param_1,"not an object"); uVar3 = 6; } else if ((param_5 == 2) || (uVar3 = 3, param_5 == -1)) { uVar2 = JS_SetPrototypeInternal(); uVar3 = (ulong)(uVar2 >> 0x1f) * 3 + 3; } auVar1._8_8_ = 0; auVar1._0_8_ = uVar3; return auVar1 << 0x40; }
6,614
ok1
eloqsql/unittest/mytap/tap.c
void ok1(int const pass) { va_list ap; memset(&ap, 0, sizeof(ap)); if (!pass && *g_test.todo == '\0') ++g_test.failed; vemit_tap(pass, NULL, ap); if (*g_test.todo != '\0') emit_dir("todo", g_test.todo); emit_endl(); }
O0
c
ok1: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) leaq -0x20(%rbp), %rdi xorl %esi, %esi movl $0x18, %edx callq 0x2a2c0 cmpl $0x0, -0x4(%rbp) jne 0xdb3fc movsbl 0xbaa194(%rip), %eax # 0xc8557c cmpl $0x0, %eax jne 0xdb3fc movl 0xbaa185(%rip), %eax # 0xc85578 addl $0x1, %eax movl %eax, 0xbaa17c(%rip) # 0xc85578 movl -0x4(%rbp), %edi leaq -0x20(%rbp), %rdx xorl %eax, %eax movl %eax, %esi callq 0xdb290 movsbl 0xbaa169(%rip), %eax # 0xc8557c cmpl $0x0, %eax je 0xdb42f leaq 0x812a1(%rip), %rdi # 0x15c6c0 leaq 0xbaa14a(%rip), %rsi # 0xc85570 addq $0xc, %rsi callq 0xdb370 callq 0xdb7d0 addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
ok1: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi lea rdi, [rbp+var_20] xor esi, esi mov edx, 18h call _memset cmp [rbp+var_4], 0 jnz short loc_DB3FC movsx eax, cs:byte_C8557C cmp eax, 0 jnz short loc_DB3FC mov eax, cs:dword_C85578 add eax, 1 mov cs:dword_C85578, eax loc_DB3FC: mov edi, [rbp+var_4] lea rdx, [rbp+var_20] xor eax, eax mov esi, eax call vemit_tap movsx eax, cs:byte_C8557C cmp eax, 0 jz short loc_DB42F lea rdi, aTodo; "todo" lea rsi, g_test add rsi, 0Ch call emit_dir loc_DB42F: call emit_endl add rsp, 20h pop rbp retn
long long ok1(int a1) { _BYTE v2[28]; // [rsp+0h] [rbp-20h] BYREF int v3; // [rsp+1Ch] [rbp-4h] v3 = a1; memset(v2, 0LL, 24LL); if ( !v3 && !byte_C8557C ) ++dword_C85578; vemit_tap(v3, 0LL, (long long)v2); if ( byte_C8557C ) emit_dir("todo", (const char *)&g_test + 12); return emit_endl(); }
ok1: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI LEA RDI,[RBP + -0x20] XOR ESI,ESI MOV EDX,0x18 CALL 0x0012a2c0 CMP dword ptr [RBP + -0x4],0x0 JNZ 0x001db3fc MOVSX EAX,byte ptr [0x00d8557c] CMP EAX,0x0 JNZ 0x001db3fc MOV EAX,dword ptr [0x00d85578] ADD EAX,0x1 MOV dword ptr [0x00d85578],EAX LAB_001db3fc: MOV EDI,dword ptr [RBP + -0x4] LEA RDX,[RBP + -0x20] XOR EAX,EAX MOV ESI,EAX CALL 0x001db290 MOVSX EAX,byte ptr [0x00d8557c] CMP EAX,0x0 JZ 0x001db42f LEA RDI,[0x25c6c0] LEA RSI,[0xd85570] ADD RSI,0xc CALL 0x001db370 LAB_001db42f: CALL 0x001db7d0 ADD RSP,0x20 POP RBP RET
void ok1(int param_1) { int1 local_28 [28]; int local_c; local_c = param_1; memset(local_28,0,0x18); if ((local_c == 0) && (DAT_00d8557c == '\0')) { DAT_00d85578 = DAT_00d85578 + 1; } vemit_tap(local_c,0,local_28); if (DAT_00d8557c != '\0') { emit_dir(&DAT_0025c6c0,&DAT_00d8557c); } emit_endl(); return; }
6,615
spdlog::logger::dump_backtrace_()
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/logger-inl.h
SPDLOG_INLINE void logger::dump_backtrace_() { using details::log_msg; if (tracer_.enabled() && !tracer_.empty()) { sink_it_( log_msg{name(), level::info, "****************** Backtrace Start ******************"}); tracer_.foreach_pop([this](const log_msg &msg) { this->sink_it_(msg); }); sink_it_( log_msg{name(), level::info, "****************** Backtrace End ********************"}); } }
O0
c
spdlog::logger::dump_backtrace_(): subq $0x198, %rsp # imm = 0x198 movq %rdi, 0x170(%rsp) movq 0x170(%rsp), %rdi movq %rdi, 0x30(%rsp) addq $0x68, %rdi callq 0x74b50 testb $0x1, %al jne 0x788ce jmp 0x78aa5 movq 0x30(%rsp), %rdi addq $0x68, %rdi callq 0x74e60 testb $0x1, %al jne 0x78aa5 movq 0x30(%rsp), %rdi callq 0x76b10 movq %rax, %rsi leaq 0x100(%rsp), %rdi callq 0x24380 leaq 0xf0(%rsp), %rax movq %rax, 0x180(%rsp) leaq 0xd7356(%rip), %rax # 0x14fc6b movq %rax, 0x178(%rsp) movq 0x180(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x178(%rsp), %rcx movq %rcx, (%rax) movq 0x178(%rsp), %rdi callq 0x152e0 movq %rax, %rcx movq 0x10(%rsp), %rax movq %rcx, 0x8(%rax) movq 0x100(%rsp), %rsi movq 0x108(%rsp), %rdx movq 0xf0(%rsp), %r8 movq 0xf8(%rsp), %r9 leaq 0x110(%rsp), %rdi movq %rdi, 0x18(%rsp) movl $0x2, %ecx callq 0x751e0 movq 0x18(%rsp), %rsi movq 0x30(%rsp), %rdi movq (%rdi), %rax movq 0x18(%rax), %rax callq *%rax movq 0x30(%rsp), %rax movq %rax, %rcx addq $0x68, %rcx movq %rcx, 0x20(%rsp) movq %rax, 0xc8(%rsp) leaq 0xd0(%rsp), %rdi movq %rdi, 0x28(%rsp) leaq 0xc8(%rsp), %rsi callq 0x79770 movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x74ed0 jmp 0x789dc leaq 0xd0(%rsp), %rdi callq 0x7d8b0 movq 0x30(%rsp), %rdi callq 0x76b10 movq %rax, %rsi leaq 0x48(%rsp), %rdi callq 0x24380 leaq 0x38(%rsp), %rax movq %rax, 0x190(%rsp) leaq 0xd728d(%rip), %rax # 0x14fca1 movq %rax, 0x188(%rsp) movq 0x190(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x188(%rsp), %rcx movq %rcx, (%rax) movq 0x188(%rsp), %rdi callq 0x152e0 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x8(%rax) movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx movq 0x38(%rsp), %r8 movq 0x40(%rsp), %r9 leaq 0x58(%rsp), %rdi movl $0x2, %ecx callq 0x751e0 movq 0x30(%rsp), %rdi movq (%rdi), %rax leaq 0x58(%rsp), %rsi callq *0x18(%rax) jmp 0x78aa5 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xc0(%rsp) movl %eax, 0xbc(%rsp) leaq 0xd0(%rsp), %rdi callq 0x7d8b0 jmp 0x78aad addq $0x198, %rsp # imm = 0x198 retq movq 0xc0(%rsp), %rdi callq 0x15dd0 nopw (%rax,%rax)
_ZN6spdlog6logger15dump_backtrace_Ev: sub rsp, 198h mov [rsp+198h+var_28], rdi mov rdi, [rsp+198h+var_28] mov [rsp+198h+var_168], rdi add rdi, 68h ; 'h'; this call _ZNK6spdlog7details10backtracer7enabledEv; spdlog::details::backtracer::enabled(void) test al, 1 jnz short loc_788CE jmp loc_78AA5 loc_788CE: mov rdi, [rsp+198h+var_168] add rdi, 68h ; 'h'; this call _ZNK6spdlog7details10backtracer5emptyEv; spdlog::details::backtracer::empty(void) test al, 1 jnz loc_78AA5 mov rdi, [rsp+198h+var_168] call _ZNK6spdlog6logger4nameB5cxx11Ev; spdlog::logger::name(void) mov rsi, rax lea rdi, [rsp+198h+var_98] call _ZN3fmt3v1017basic_string_viewIcEC2ISt11char_traitsIcESaIcEEERKNSt7__cxx1112basic_stringIcT_T0_EE; fmt::v10::basic_string_view<char>::basic_string_view<std::char_traits<char>,std::allocator<char>>(std::string const&) lea rax, [rsp+198h+var_A8] mov [rsp+198h+var_18], rax lea rax, aBacktraceStart; "****************** Backtrace Start ****"... mov [rsp+198h+var_20], rax mov rax, [rsp+198h+var_18] mov [rsp+198h+var_188], rax mov rcx, [rsp+198h+var_20] mov [rax], rcx mov rdi, [rsp+198h+var_20] call _strlen mov rcx, rax mov rax, [rsp+198h+var_188] mov [rax+8], rcx mov rsi, [rsp+198h+var_98] mov rdx, [rsp+198h+var_90] mov r8, [rsp+198h+var_A8] mov r9, [rsp+198h+var_A0] lea rdi, [rsp+198h+var_88] mov [rsp+198h+var_180], rdi mov ecx, 2 call _ZN6spdlog7details7log_msgC2EN3fmt3v1017basic_string_viewIcEENS_5level10level_enumES5_; spdlog::details::log_msg::log_msg(fmt::v10::basic_string_view<char>,spdlog::level::level_enum,fmt::v10::basic_string_view<char>) mov rsi, [rsp+198h+var_180] mov rdi, [rsp+198h+var_168] mov rax, [rdi] mov rax, [rax+18h] call rax mov rax, [rsp+198h+var_168] mov rcx, rax add rcx, 68h ; 'h' mov [rsp+198h+var_178], rcx mov [rsp+198h+var_D0], rax lea rdi, [rsp+198h+var_C8] mov [rsp+198h+var_170], rdi lea rsi, [rsp+198h+var_D0] call _ZNSt8functionIFvRKN6spdlog7details7log_msgEEEC2IZNS0_6logger15dump_backtrace_EvE3$_0vEEOT_; std::function<void ()(spdlog::details::log_msg const&)>::function<spdlog::logger::dump_backtrace_(void)::$_0,void>(spdlog::logger::dump_backtrace_(void)::$_0 &&) mov rdi, [rsp+198h+var_178] mov rsi, [rsp+198h+var_170] call _ZN6spdlog7details10backtracer11foreach_popESt8functionIFvRKNS0_7log_msgEEE; spdlog::details::backtracer::foreach_pop(std::function<void ()(spdlog::details::log_msg const&)>) jmp short $+2 loc_789DC: lea rdi, [rsp+198h+var_C8] call _ZNSt8functionIFvRKN6spdlog7details7log_msgEEED2Ev; std::function<void ()(spdlog::details::log_msg const&)>::~function() mov rdi, [rsp+198h+var_168] call _ZNK6spdlog6logger4nameB5cxx11Ev; spdlog::logger::name(void) mov rsi, rax lea rdi, [rsp+198h+var_150] call _ZN3fmt3v1017basic_string_viewIcEC2ISt11char_traitsIcESaIcEEERKNSt7__cxx1112basic_stringIcT_T0_EE; fmt::v10::basic_string_view<char>::basic_string_view<std::char_traits<char>,std::allocator<char>>(std::string const&) lea rax, [rsp+198h+var_160] mov [rsp+198h+var_8], rax lea rax, aBacktraceEnd; "****************** Backtrace End ******"... mov [rsp+198h+var_10], rax mov rax, [rsp+198h+var_8] mov [rsp+198h+var_190], rax mov rcx, [rsp+198h+var_10] mov [rax], rcx mov rdi, [rsp+198h+var_10] call _strlen mov rcx, rax mov rax, [rsp+198h+var_190] mov [rax+8], rcx mov rsi, [rsp+198h+var_150] mov rdx, [rsp+198h+var_148] mov r8, [rsp+198h+var_160] mov r9, [rsp+198h+var_158] lea rdi, [rsp+198h+var_140] mov ecx, 2 call _ZN6spdlog7details7log_msgC2EN3fmt3v1017basic_string_viewIcEENS_5level10level_enumES5_; spdlog::details::log_msg::log_msg(fmt::v10::basic_string_view<char>,spdlog::level::level_enum,fmt::v10::basic_string_view<char>) mov rdi, [rsp+198h+var_168] mov rax, [rdi] lea rsi, [rsp+198h+var_140] call qword ptr [rax+18h] jmp short loc_78AA5 mov rcx, rax mov eax, edx mov [rsp+arg_B8], rcx mov [rsp+arg_B4], eax lea rdi, [rsp+arg_C8] call _ZNSt8functionIFvRKN6spdlog7details7log_msgEEED2Ev; std::function<void ()(spdlog::details::log_msg const&)>::~function() jmp short loc_78AAD loc_78AA5: add rsp, 198h retn loc_78AAD: mov rdi, [rsp+arg_B8] call __Unwind_Resume
char spdlog::logger::dump_backtrace_(spdlog::logger *this) { char result; // al long long v2; // rax long long v3; // rax const char *v4; // [rsp+38h] [rbp-160h] BYREF long long v5; // [rsp+40h] [rbp-158h] long long v6[2]; // [rsp+48h] [rbp-150h] BYREF _BYTE v7[112]; // [rsp+58h] [rbp-140h] BYREF spdlog::logger *v8; // [rsp+C8h] [rbp-D0h] BYREF _BYTE v9[32]; // [rsp+D0h] [rbp-C8h] BYREF const char *v10; // [rsp+F0h] [rbp-A8h] BYREF long long v11; // [rsp+F8h] [rbp-A0h] long long v12[2]; // [rsp+100h] [rbp-98h] BYREF _BYTE v13[96]; // [rsp+110h] [rbp-88h] BYREF spdlog::logger *v14; // [rsp+170h] [rbp-28h] const char *v15; // [rsp+178h] [rbp-20h] const char **v16; // [rsp+180h] [rbp-18h] const char *v17; // [rsp+188h] [rbp-10h] const char **v18; // [rsp+190h] [rbp-8h] v14 = this; result = spdlog::details::backtracer::enabled((spdlog::logger *)((char *)this + 104)); if ( (result & 1) != 0 ) { result = spdlog::details::backtracer::empty((spdlog::logger *)((char *)this + 104)); if ( (result & 1) == 0 ) { v2 = spdlog::logger::name[abi:cxx11]((long long)this); fmt::v10::basic_string_view<char>::basic_string_view<std::char_traits<char>,std::allocator<char>>(v12, v2); v16 = &v10; v15 = "****************** Backtrace Start ******************"; v10 = "****************** Backtrace Start ******************"; v11 = strlen("****************** Backtrace Start ******************"); spdlog::details::log_msg::log_msg((spdlog::details::os *)v13, v12[0], v12[1], 2, (long long)v10, v11); (*(void ( **)(spdlog::logger *, _BYTE *))(*(_QWORD *)this + 24LL))(this, v13); v8 = this; std::function<void ()(spdlog::details::log_msg const&)>::function<spdlog::logger::dump_backtrace_(void)::$_0,void>( v9, &v8); spdlog::details::backtracer::foreach_pop((spdlog::logger *)((char *)this + 104), (std::mutex *)v9); std::function<void ()(spdlog::details::log_msg const&)>::~function(v9); v3 = spdlog::logger::name[abi:cxx11]((long long)this); fmt::v10::basic_string_view<char>::basic_string_view<std::char_traits<char>,std::allocator<char>>(v6, v3); v18 = &v4; v17 = "****************** Backtrace End ********************"; v4 = "****************** Backtrace End ********************"; v5 = strlen("****************** Backtrace End ********************"); spdlog::details::log_msg::log_msg((spdlog::details::os *)v7, v6[0], v6[1], 2, (long long)v4, v5); return (*(long long ( **)(spdlog::logger *, _BYTE *))(*(_QWORD *)this + 24LL))(this, v7); } } return result; }
dump_backtrace_: SUB RSP,0x198 MOV qword ptr [RSP + 0x170],RDI MOV RDI,qword ptr [RSP + 0x170] MOV qword ptr [RSP + 0x30],RDI ADD RDI,0x68 CALL 0x00174b50 TEST AL,0x1 JNZ 0x001788ce JMP 0x00178aa5 LAB_001788ce: MOV RDI,qword ptr [RSP + 0x30] ADD RDI,0x68 CALL 0x00174e60 TEST AL,0x1 JNZ 0x00178aa5 MOV RDI,qword ptr [RSP + 0x30] CALL 0x00176b10 MOV RSI,RAX LEA RDI,[RSP + 0x100] CALL 0x00124380 LEA RAX,[RSP + 0xf0] MOV qword ptr [RSP + 0x180],RAX LEA RAX,[0x24fc6b] MOV qword ptr [RSP + 0x178],RAX MOV RAX,qword ptr [RSP + 0x180] MOV qword ptr [RSP + 0x10],RAX MOV RCX,qword ptr [RSP + 0x178] MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RSP + 0x178] CALL 0x001152e0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV RSI,qword ptr [RSP + 0x100] MOV RDX,qword ptr [RSP + 0x108] MOV R8,qword ptr [RSP + 0xf0] MOV R9,qword ptr [RSP + 0xf8] LEA RDI,[RSP + 0x110] MOV qword ptr [RSP + 0x18],RDI MOV ECX,0x2 CALL 0x001751e0 MOV RSI,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x18] CALL RAX MOV RAX,qword ptr [RSP + 0x30] MOV RCX,RAX ADD RCX,0x68 MOV qword ptr [RSP + 0x20],RCX MOV qword ptr [RSP + 0xc8],RAX LEA RDI,[RSP + 0xd0] MOV qword ptr [RSP + 0x28],RDI LEA RSI,[RSP + 0xc8] CALL 0x00179770 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x28] LAB_001789d5: CALL 0x00174ed0 LAB_001789da: JMP 0x001789dc LAB_001789dc: LEA RDI,[RSP + 0xd0] CALL 0x0017d8b0 MOV RDI,qword ptr [RSP + 0x30] CALL 0x00176b10 MOV RSI,RAX LEA RDI,[RSP + 0x48] CALL 0x00124380 LEA RAX,[RSP + 0x38] MOV qword ptr [RSP + 0x190],RAX LEA RAX,[0x24fca1] MOV qword ptr [RSP + 0x188],RAX MOV RAX,qword ptr [RSP + 0x190] MOV qword ptr [RSP + 0x8],RAX MOV RCX,qword ptr [RSP + 0x188] MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RSP + 0x188] CALL 0x001152e0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] MOV R8,qword ptr [RSP + 0x38] MOV R9,qword ptr [RSP + 0x40] LEA RDI,[RSP + 0x58] MOV ECX,0x2 CALL 0x001751e0 MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RDI] LEA RSI,[RSP + 0x58] CALL qword ptr [RAX + 0x18] JMP 0x00178aa5 LAB_00178aa5: ADD RSP,0x198 RET
/* spdlog::logger::dump_backtrace_() */ void __thiscall spdlog::logger::dump_backtrace_(logger *this) { ulong uVar1; string *psVar2; size_t sVar3; char *local_160 [2]; int8 local_150; int8 local_148; log_msg local_140 [112]; logger *local_d0; function<void(spdlog::details::log_msg_const&)> local_c8 [32]; char *local_a8 [2]; int8 local_98; int8 local_90; log_msg local_88 [96]; logger *local_28; char *local_20; char **local_18; char *local_10; char **local_8; local_28 = this; uVar1 = details::backtracer::enabled((backtracer *)(this + 0x68)); if (((uVar1 & 1) != 0) && (uVar1 = details::backtracer::empty((backtracer *)(this + 0x68)), (uVar1 & 1) == 0)) { psVar2 = (string *)name_abi_cxx11_(this); fmt::v10::basic_string_view<char>:: basic_string_view<std::char_traits<char>,std::allocator<char>> ((basic_string_view<char> *)&local_98,psVar2); local_18 = local_a8; local_20 = "****************** Backtrace Start ******************"; local_a8[0] = "****************** Backtrace Start ******************"; sVar3 = strlen("****************** Backtrace Start ******************"); details::log_msg::log_msg(local_88,local_98,local_90,2,local_a8[0],sVar3); (**(code **)(*(long *)this + 0x18))(this,local_88); local_d0 = this; std::function<void(spdlog::details::log_msg_const&)>:: function<spdlog::logger::dump_backtrace_()::__0,void>(local_c8,(__0 *)&local_d0); /* try { // try from 001789d5 to 001789d9 has its CatchHandler @ 00178a82 */ details::backtracer::foreach_pop((backtracer *)(this + 0x68),local_c8); std::function<void(spdlog::details::log_msg_const&)>::~function(local_c8); psVar2 = (string *)name_abi_cxx11_(this); fmt::v10::basic_string_view<char>:: basic_string_view<std::char_traits<char>,std::allocator<char>> ((basic_string_view<char> *)&local_150,psVar2); local_8 = local_160; local_10 = "****************** Backtrace End ********************"; local_160[0] = "****************** Backtrace End ********************"; sVar3 = strlen("****************** Backtrace End ********************"); details::log_msg::log_msg(local_140,local_150,local_148,2,local_160[0],sVar3); (**(code **)(*(long *)this + 0x18))(this,local_140); } return; }
6,616
my_strntoull10rnd_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static ulonglong my_strntoull10rnd_mb2_or_mb4(CHARSET_INFO *cs, const char *nptr, size_t length, int unsign_fl, char **endptr, int *err) { char buf[256], *b= buf; ulonglong res; const uchar *end, *s= (const uchar*) nptr; my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; int cnv; /* Cut too long strings */ if (length >= sizeof(buf)) length= sizeof(buf)-1; end= s + length; while ((cnv= mb_wc(cs, &wc, s, end)) > 0) { s+= cnv; if (wc > (int) (uchar) 'e' || !wc) break; /* Can't be a number part */ *b++= (char) wc; } res= my_strntoull10rnd_8bit(cs, buf, b - buf, unsign_fl, endptr, err); *endptr= (char*) nptr + cs->mbminlen * (size_t) (*endptr - buf); return res; }
O3
c
my_strntoull10rnd_mb2_or_mb4: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x138, %rsp # imm = 0x138 movq %r9, -0x150(%rbp) movq %r8, -0x158(%rbp) movl %ecx, -0x134(%rbp) movq %rsi, %rcx movq %rdi, %r12 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq 0xb8(%rdi), %rax movq 0x28(%rax), %rbx movl $0xff, %r13d cmpq %r13, %rdx cmovbq %rdx, %r13 addq %rsi, %r13 leaq -0x148(%rbp), %rsi movq %rcx, -0x140(%rbp) movq %rcx, %rdx movq %r13, %rcx callq *%rbx leaq -0x130(%rbp), %r15 testl %eax, %eax jle 0xc5447 movq -0x140(%rbp), %r14 movq -0x148(%rbp), %rcx leaq -0x1(%rcx), %rdx cmpq $0x64, %rdx ja 0xc5447 movl %eax, %eax addq %rax, %r14 movb %cl, (%r15) incq %r15 movq %r12, %rdi leaq -0x148(%rbp), %rsi movq %r14, %rdx movq %r13, %rcx callq *%rbx testl %eax, %eax jg 0xc5415 leaq -0x130(%rbp), %r14 subq %r14, %r15 movq %r12, %rdi movq %r14, %rsi movq %r15, %rdx movl -0x134(%rbp), %ecx movq -0x158(%rbp), %rbx movq %rbx, %r8 movq -0x150(%rbp), %r9 callq 0xb7090 movl 0x98(%r12), %ecx movq (%rbx), %rdx subq %r14, %rdx imulq %rcx, %rdx movq -0x140(%rbp), %rcx addq %rdx, %rcx movq %rcx, (%rbx) movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0xc54b6 addq $0x138, %rsp # imm = 0x138 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29270
my_strntoull10rnd_mb2_or_mb4: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 138h mov [rbp+var_150], r9 mov [rbp+var_158], r8 mov [rbp+var_134], ecx mov rcx, rsi mov r12, rdi mov rax, fs:28h mov [rbp+var_30], rax mov rax, [rdi+0B8h] mov rbx, [rax+28h] mov r13d, 0FFh cmp rdx, r13 cmovb r13, rdx add r13, rsi lea rsi, [rbp+var_148] mov [rbp+var_140], rcx mov rdx, rcx mov rcx, r13 call rbx lea r15, [rbp+var_130] test eax, eax jle short loc_C5447 mov r14, [rbp+var_140] loc_C5415: mov rcx, [rbp+var_148] lea rdx, [rcx-1] cmp rdx, 64h ; 'd' ja short loc_C5447 mov eax, eax add r14, rax mov [r15], cl inc r15 mov rdi, r12 lea rsi, [rbp+var_148] mov rdx, r14 mov rcx, r13 call rbx test eax, eax jg short loc_C5415 loc_C5447: lea r14, [rbp+var_130] sub r15, r14 mov rdi, r12 mov rsi, r14 mov rdx, r15 mov ecx, [rbp+var_134] mov rbx, [rbp+var_158] mov r8, rbx mov r9, [rbp+var_150] call my_strntoull10rnd_8bit mov ecx, [r12+98h] mov rdx, [rbx] sub rdx, r14 imul rdx, rcx mov rcx, [rbp+var_140] add rcx, rdx mov [rbx], rcx mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz short loc_C54B6 add rsp, 138h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_C54B6: call ___stack_chk_fail
long long my_strntoull10rnd_mb2_or_mb4( long long a1, long long a2, unsigned long long a3, int a4, unsigned __int8 **a5, int *a6) { long long ( *v6)(long long, long long *, long long, long long); // rbx long long v7; // r13 long long v8; // r13 int v9; // eax unsigned __int8 *v10; // r15 long long v11; // r14 long long result; // rax long long v15; // [rsp+18h] [rbp-148h] BYREF long long v16; // [rsp+20h] [rbp-140h] int v17; // [rsp+2Ch] [rbp-134h] unsigned __int8 v18[256]; // [rsp+30h] [rbp-130h] BYREF unsigned long long v19; // [rsp+130h] [rbp-30h] v17 = a4; v19 = __readfsqword(0x28u); v6 = *(long long ( **)(long long, long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL); v7 = 255LL; if ( a3 < 0xFF ) v7 = a3; v8 = a2 + v7; v16 = a2; v9 = v6(a1, &v15, a2, v8); v10 = v18; if ( v9 > 0 ) { v11 = v16; do { if ( (unsigned long long)(v15 - 1) > 0x64 ) break; v11 += (unsigned int)v9; *v10++ = v15; v9 = v6(a1, &v15, v11, v8); } while ( v9 > 0 ); } result = my_strntoull10rnd_8bit(a1, v18, v10 - v18, v17, a5, a6); *a5 = (unsigned __int8 *)(*(unsigned int *)(a1 + 152) * (*a5 - v18) + v16); return result; }
my_strntoull10rnd_mb2_or_mb4: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x138 MOV qword ptr [RBP + -0x150],R9 MOV qword ptr [RBP + -0x158],R8 MOV dword ptr [RBP + -0x134],ECX MOV RCX,RSI MOV R12,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RDI + 0xb8] MOV RBX,qword ptr [RAX + 0x28] MOV R13D,0xff CMP RDX,R13 CMOVC R13,RDX ADD R13,RSI LEA RSI,[RBP + -0x148] MOV qword ptr [RBP + -0x140],RCX MOV RDX,RCX MOV RCX,R13 CALL RBX LEA R15,[RBP + -0x130] TEST EAX,EAX JLE 0x001c5447 MOV R14,qword ptr [RBP + -0x140] LAB_001c5415: MOV RCX,qword ptr [RBP + -0x148] LEA RDX,[RCX + -0x1] CMP RDX,0x64 JA 0x001c5447 MOV EAX,EAX ADD R14,RAX MOV byte ptr [R15],CL INC R15 MOV RDI,R12 LEA RSI,[RBP + -0x148] MOV RDX,R14 MOV RCX,R13 CALL RBX TEST EAX,EAX JG 0x001c5415 LAB_001c5447: LEA R14,[RBP + -0x130] SUB R15,R14 MOV RDI,R12 MOV RSI,R14 MOV RDX,R15 MOV ECX,dword ptr [RBP + -0x134] MOV RBX,qword ptr [RBP + -0x158] MOV R8,RBX MOV R9,qword ptr [RBP + -0x150] CALL 0x001b7090 MOV ECX,dword ptr [R12 + 0x98] MOV RDX,qword ptr [RBX] SUB RDX,R14 IMUL RDX,RCX MOV RCX,qword ptr [RBP + -0x140] ADD RCX,RDX MOV qword ptr [RBX],RCX MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x001c54b6 ADD RSP,0x138 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001c54b6: CALL 0x00129270
void my_strntoull10rnd_mb2_or_mb4 (long param_1,long param_2,ulong param_3,int4 param_4,long *param_5, int8 param_6) { code *pcVar1; uint uVar2; ulong uVar3; long lVar4; int1 *puVar5; long in_FS_OFFSET; long local_150; long local_148; int4 local_13c; int1 local_138 [256]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); uVar3 = 0xff; if (param_3 < 0xff) { uVar3 = param_3; } local_148 = param_2; local_13c = param_4; uVar2 = (*pcVar1)(param_1,&local_150,param_2,uVar3 + param_2); puVar5 = local_138; lVar4 = local_148; while ((0 < (int)uVar2 && (local_150 - 1U < 0x65))) { lVar4 = lVar4 + (ulong)uVar2; *puVar5 = (char)local_150; puVar5 = puVar5 + 1; uVar2 = (*pcVar1)(param_1,&local_150,lVar4,uVar3 + param_2); } my_strntoull10rnd_8bit(param_1,local_138,(long)puVar5 - (long)local_138,local_13c,param_5,param_6) ; *param_5 = local_148 + (*param_5 - (long)local_138) * (ulong)*(uint *)(param_1 + 0x98); if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
6,617
lunasvg::includes(std::basic_string_view<char, std::char_traits<char>> const&, std::basic_string_view<char, std::char_traits<char>> const&)
dmazzella[P]pylunasvg/lunasvg/source/svgparser.cpp
constexpr bool includes(const std::string_view& value, const std::string_view& subvalue) { if(subvalue.empty() || subvalue.length() > value.length()) return false; std::string_view input(value); while(!input.empty()) { skipOptionalSpaces(input); std::string_view start(input); while(!input.empty() && !IS_WS(input.front())) input.remove_prefix(1); if(subvalue == start.substr(0, start.length() - input.length())) { return true; } } return false; }
O0
cpp
lunasvg::includes(std::basic_string_view<char, std::char_traits<char>> const&, std::basic_string_view<char, std::char_traits<char>> const&): pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x18(%rbp), %rdi callq 0x20620 testb $0x1, %al jne 0x3f0af movq -0x18(%rbp), %rdi callq 0x23210 movq %rax, -0x60(%rbp) movq -0x10(%rbp), %rdi callq 0x23210 movq %rax, %rcx movq -0x60(%rbp), %rax cmpq %rcx, %rax jbe 0x3f0b8 movb $0x0, -0x1(%rbp) jmp 0x3f1ab movq -0x10(%rbp), %rax movq (%rax), %rcx movq %rcx, -0x28(%rbp) movq 0x8(%rax), %rax movq %rax, -0x20(%rbp) leaq -0x28(%rbp), %rdi callq 0x20620 xorb $-0x1, %al testb $0x1, %al jne 0x3f0df jmp 0x3f1a7 leaq -0x28(%rbp), %rdi callq 0x332b0 movq -0x28(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x30(%rbp) leaq -0x28(%rbp), %rdi callq 0x20620 movb %al, %cl xorl %eax, %eax testb $0x1, %cl movb %al, -0x61(%rbp) jne 0x3f123 leaq -0x28(%rbp), %rdi callq 0x20640 movsbl (%rax), %edi callq 0x33220 xorb $-0x1, %al movb %al, -0x61(%rbp) movb -0x61(%rbp), %al testb $0x1, %al jne 0x3f12c jmp 0x3f13c leaq -0x28(%rbp), %rdi movl $0x1, %esi callq 0x231b0 jmp 0x3f0f8 movq -0x18(%rbp), %rax movq (%rax), %rcx movq %rcx, -0x48(%rbp) movq 0x8(%rax), %rax movq %rax, -0x40(%rbp) leaq -0x38(%rbp), %rdi callq 0x23210 movq %rax, -0x70(%rbp) leaq -0x28(%rbp), %rdi callq 0x23210 movq -0x70(%rbp), %rdx subq %rax, %rdx leaq -0x38(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x20660 movq %rax, -0x58(%rbp) movq %rdx, -0x50(%rbp) movq -0x48(%rbp), %rdi movq -0x40(%rbp), %rsi movq -0x58(%rbp), %rdx movq -0x50(%rbp), %rcx callq 0x22010 testb $0x1, %al jne 0x3f19c jmp 0x3f1a2 movb $0x1, -0x1(%rbp) jmp 0x3f1ab jmp 0x3f0cb movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x70, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN7lunasvg8includesERKSt17basic_string_viewIcSt11char_traitsIcEES5_: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rdi, [rbp+var_18] call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE5emptyEv; std::string_view::empty(void) test al, 1 jnz short loc_3F0AF mov rdi, [rbp+var_18] call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE6lengthEv; std::string_view::length(void) mov [rbp+var_60], rax mov rdi, [rbp+var_10] call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE6lengthEv; std::string_view::length(void) mov rcx, rax mov rax, [rbp+var_60] cmp rax, rcx jbe short loc_3F0B8 loc_3F0AF: mov [rbp+var_1], 0 jmp loc_3F1AB loc_3F0B8: mov rax, [rbp+var_10] mov rcx, [rax] mov [rbp+var_28], rcx mov rax, [rax+8] mov [rbp+var_20], rax loc_3F0CB: lea rdi, [rbp+var_28] call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE5emptyEv; std::string_view::empty(void) xor al, 0FFh test al, 1 jnz short loc_3F0DF jmp loc_3F1A7 loc_3F0DF: lea rdi, [rbp+var_28] call _ZN7lunasvg18skipOptionalSpacesERSt17basic_string_viewIcSt11char_traitsIcEE; lunasvg::skipOptionalSpaces(std::string_view &) mov rax, [rbp+var_28] mov [rbp+var_38], rax mov rax, [rbp+var_20] mov [rbp+var_30], rax loc_3F0F8: lea rdi, [rbp+var_28] call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE5emptyEv; std::string_view::empty(void) mov cl, al xor eax, eax test cl, 1 mov [rbp+var_61], al jnz short loc_3F123 lea rdi, [rbp+var_28] call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE5frontEv; std::string_view::front(void) movsx edi, byte ptr [rax]; this call _ZN7lunasvg5IS_WSEi; lunasvg::IS_WS(int) xor al, 0FFh mov [rbp+var_61], al loc_3F123: mov al, [rbp+var_61] test al, 1 jnz short loc_3F12C jmp short loc_3F13C loc_3F12C: lea rdi, [rbp+var_28] mov esi, 1 call _ZNSt17basic_string_viewIcSt11char_traitsIcEE13remove_prefixEm; std::string_view::remove_prefix(ulong) jmp short loc_3F0F8 loc_3F13C: mov rax, [rbp+var_18] mov rcx, [rax] mov [rbp+var_48], rcx mov rax, [rax+8] mov [rbp+var_40], rax lea rdi, [rbp+var_38] call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE6lengthEv; std::string_view::length(void) mov [rbp+var_70], rax lea rdi, [rbp+var_28] call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE6lengthEv; std::string_view::length(void) mov rdx, [rbp+var_70] sub rdx, rax lea rdi, [rbp+var_38] xor eax, eax mov esi, eax call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE6substrEmm; std::string_view::substr(ulong,ulong) mov [rbp+var_58], rax mov [rbp+var_50], rdx mov rdi, [rbp+var_48] mov rsi, [rbp+var_40] mov rdx, [rbp+var_58] mov rcx, [rbp+var_50] call _ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_; std::operator==<char,std::char_traits<char>>(std::string_view,std::string_view) test al, 1 jnz short loc_3F19C jmp short loc_3F1A2 loc_3F19C: mov [rbp+var_1], 1 jmp short loc_3F1AB loc_3F1A2: jmp loc_3F0CB loc_3F1A7: mov [rbp+var_1], 0 loc_3F1AB: mov al, [rbp+var_1] and al, 1 add rsp, 70h pop rbp retn
char lunasvg::includes(long long *a1, long long *a2) { char *v2; // rax long long v3; // rax long long v4; // rdx long long v6; // [rsp+0h] [rbp-70h] char v7; // [rsp+Fh] [rbp-61h] unsigned long long v8; // [rsp+10h] [rbp-60h] long long v9; // [rsp+18h] [rbp-58h] long long v10; // [rsp+28h] [rbp-48h] long long v11; // [rsp+30h] [rbp-40h] _QWORD v12[2]; // [rsp+38h] [rbp-38h] BYREF long long v13; // [rsp+48h] [rbp-28h] BYREF long long v14; // [rsp+50h] [rbp-20h] long long *v15; // [rsp+58h] [rbp-18h] long long *v16; // [rsp+60h] [rbp-10h] v16 = a1; v15 = a2; if ( std::string_view::empty(a2) ) return 0; v8 = std::string_view::length((long long)v15); if ( v8 > std::string_view::length((long long)v16) ) return 0; v13 = *v16; v14 = v16[1]; while ( !std::string_view::empty(&v13) ) { lunasvg::skipOptionalSpaces(&v13); v12[0] = v13; v12[1] = v14; while ( 1 ) { v7 = 0; if ( !std::string_view::empty(&v13) ) { v2 = (char *)std::string_view::front((long long)&v13); v7 = ~lunasvg::IS_WS((lunasvg *)(unsigned int)*v2); } if ( (v7 & 1) == 0 ) break; std::string_view::remove_prefix(&v13, 1LL); } v10 = *v15; v11 = v15[1]; v6 = std::string_view::length((long long)v12); v3 = std::string_view::length((long long)&v13); v9 = std::string_view::substr(v12, 0LL, v6 - v3); if ( std::operator==<char,std::char_traits<char>>(v10, v11, v9, v4) ) return 1; } return 0; }
includes: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RDI,qword ptr [RBP + -0x18] CALL 0x00120620 TEST AL,0x1 JNZ 0x0013f0af MOV RDI,qword ptr [RBP + -0x18] CALL 0x00123210 MOV qword ptr [RBP + -0x60],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00123210 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x60] CMP RAX,RCX JBE 0x0013f0b8 LAB_0013f0af: MOV byte ptr [RBP + -0x1],0x0 JMP 0x0013f1ab LAB_0013f0b8: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x20],RAX LAB_0013f0cb: LEA RDI,[RBP + -0x28] CALL 0x00120620 XOR AL,0xff TEST AL,0x1 JNZ 0x0013f0df JMP 0x0013f1a7 LAB_0013f0df: LEA RDI,[RBP + -0x28] CALL 0x001332b0 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x30],RAX LAB_0013f0f8: LEA RDI,[RBP + -0x28] CALL 0x00120620 MOV CL,AL XOR EAX,EAX TEST CL,0x1 MOV byte ptr [RBP + -0x61],AL JNZ 0x0013f123 LEA RDI,[RBP + -0x28] CALL 0x00120640 MOVSX EDI,byte ptr [RAX] CALL 0x00133220 XOR AL,0xff MOV byte ptr [RBP + -0x61],AL LAB_0013f123: MOV AL,byte ptr [RBP + -0x61] TEST AL,0x1 JNZ 0x0013f12c JMP 0x0013f13c LAB_0013f12c: LEA RDI,[RBP + -0x28] MOV ESI,0x1 CALL 0x001231b0 JMP 0x0013f0f8 LAB_0013f13c: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX] MOV qword ptr [RBP + -0x48],RCX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x40],RAX LEA RDI,[RBP + -0x38] CALL 0x00123210 MOV qword ptr [RBP + -0x70],RAX LEA RDI,[RBP + -0x28] CALL 0x00123210 MOV RDX,qword ptr [RBP + -0x70] SUB RDX,RAX LEA RDI,[RBP + -0x38] XOR EAX,EAX MOV ESI,EAX CALL 0x00120660 MOV qword ptr [RBP + -0x58],RAX MOV qword ptr [RBP + -0x50],RDX MOV RDI,qword ptr [RBP + -0x48] MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x50] CALL 0x00122010 TEST AL,0x1 JNZ 0x0013f19c JMP 0x0013f1a2 LAB_0013f19c: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0013f1ab LAB_0013f1a2: JMP 0x0013f0cb LAB_0013f1a7: MOV byte ptr [RBP + -0x1],0x0 LAB_0013f1ab: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x70 POP RBP RET
/* lunasvg::includes(std::basic_string_view<char, std::char_traits<char> > const&, std::basic_string_view<char, std::char_traits<char> > const&) */ int1 lunasvg::includes(basic_string_view *param_1,basic_string_view *param_2) { int8 uVar1; int8 uVar2; bool bVar3; uint uVar4; ulong uVar5; ulong uVar6; char *pcVar7; long lVar8; long lVar9; int1 auVar10 [16]; byte local_69; int8 local_40; int8 local_38; int8 local_30; int8 local_28; basic_string_view<char,std::char_traits<char>> *local_20; basic_string_view *local_18; local_20 = (basic_string_view<char,std::char_traits<char>> *)param_2; local_18 = param_1; uVar5 = std::basic_string_view<char,std::char_traits<char>>::empty ((basic_string_view<char,std::char_traits<char>> *)param_2); if ((uVar5 & 1) == 0) { uVar5 = std::basic_string_view<char,std::char_traits<char>>::length(local_20); uVar6 = std::basic_string_view<char,std::char_traits<char>>::length ((basic_string_view<char,std::char_traits<char>> *)local_18); if (uVar5 <= uVar6) { local_30 = *(int8 *)local_18; local_28 = *(int8 *)(local_18 + 8); do { uVar5 = std::basic_string_view<char,std::char_traits<char>>::empty ((basic_string_view<char,std::char_traits<char>> *)&local_30); if (((uVar5 ^ 0xff) & 1) == 0) { return 0; } skipOptionalSpaces((basic_string_view *)&local_30); local_40 = local_30; local_38 = local_28; while( true ) { uVar4 = std::basic_string_view<char,std::char_traits<char>>::empty ((basic_string_view<char,std::char_traits<char>> *)&local_30); local_69 = 0; if ((uVar4 & 1) == 0) { pcVar7 = (char *)std::basic_string_view<char,std::char_traits<char>>::front ((basic_string_view<char,std::char_traits<char>> *)&local_30) ; local_69 = IS_WS((int)*pcVar7); local_69 = local_69 ^ 0xff; } if ((local_69 & 1) == 0) break; std::basic_string_view<char,std::char_traits<char>>::remove_prefix ((basic_string_view<char,std::char_traits<char>> *)&local_30,1); } uVar1 = *(int8 *)local_20; uVar2 = *(int8 *)(local_20 + 8); lVar8 = std::basic_string_view<char,std::char_traits<char>>::length ((basic_string_view<char,std::char_traits<char>> *)&local_40); lVar9 = std::basic_string_view<char,std::char_traits<char>>::length ((basic_string_view<char,std::char_traits<char>> *)&local_30); auVar10 = std::basic_string_view<char,std::char_traits<char>>::substr ((basic_string_view<char,std::char_traits<char>> *)&local_40,0, lVar8 - lVar9); bVar3 = std::operator==(uVar1,uVar2,auVar10._0_8_,auVar10._8_8_); } while (!bVar3); return 1; } } return 0; }
6,618
my_wildcmp_8bit_impl
eloqsql/strings/ctype-simple.c
static int my_wildcmp_8bit_impl(CHARSET_INFO *cs, const char *str,const char *str_end, const char *wildstr,const char *wildend, int escape, int w_one, int w_many, int recurse_level) { int result= -1; /* Not found, using wildcards */ if (my_string_stack_guard && my_string_stack_guard(recurse_level)) return 1; while (wildstr != wildend) { while (*wildstr != w_many && *wildstr != w_one) { if (*wildstr == escape && wildstr+1 != wildend) wildstr++; if (str == str_end || likeconv(cs,*wildstr++) != likeconv(cs,*str++)) return(1); /* No match */ if (wildstr == wildend) return(str != str_end); /* Match if both are at end */ result=1; /* Found an anchor char */ } if (*wildstr == w_one) { do { if (str == str_end) /* Skip one char if possible */ return(result); INC_PTR(cs,str,str_end); } while (++wildstr < wildend && *wildstr == w_one); if (wildstr == wildend) break; } if (*wildstr == w_many) { /* Found w_many */ uchar cmp; wildstr++; /* Remove any '%' and '_' from the wild search string */ for (; wildstr != wildend ; wildstr++) { if (*wildstr == w_many) continue; if (*wildstr == w_one) { if (str == str_end) return(-1); INC_PTR(cs,str,str_end); continue; } break; /* Not a wild character */ } if (wildstr == wildend) return(0); /* Ok if w_many is last */ if (str == str_end) return(-1); if ((cmp= *wildstr) == escape && wildstr+1 != wildend) cmp= *++wildstr; INC_PTR(cs,wildstr,wildend); /* This is compared trough cmp */ cmp=likeconv(cs,cmp); do { /* Find the next character in the subject string equal to 'cmp', then check recursively my_wildcmp_8bit_impl() for the pattern remainder. */ while (str != str_end && (uchar) likeconv(cs,*str) != cmp) str++; if (str++ == str_end) return(-1); /* 'cmp' was not found in the subject string */ { int tmp=my_wildcmp_8bit_impl(cs,str,str_end, wildstr,wildend,escape,w_one, w_many, recurse_level+1); if (tmp <= 0) return(tmp); } /* The recursion call did not match. But it returned 1, which means the pattern remainder has some non-special characters. Continue, there is a chance that we'll find another 'cmp' at a different position in the subject string. */ } while (str != str_end); return(-1); } } return(str != str_end ? 1 : 0); }
O0
c
my_wildcmp_8bit_impl: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movl 0x20(%rbp), %eax movl 0x18(%rbp), %eax movl 0x10(%rbp), %eax movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movl %r9d, -0x34(%rbp) movl $0xffffffff, -0x38(%rbp) # imm = 0xFFFFFFFF leaq 0x361171(%rip), %rax # 0x3ba318 cmpq $0x0, (%rax) je 0x591cd leaq 0x361164(%rip), %rax # 0x3ba318 movq (%rax), %rax movl 0x20(%rbp), %edi callq *%rax cmpl $0x0, %eax je 0x591cd movl $0x1, -0x4(%rbp) jmp 0x594fa jmp 0x591cf movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax je 0x594e2 jmp 0x591df movq -0x28(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl 0x18(%rbp), %ecx movb %al, -0x41(%rbp) je 0x59200 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl 0x10(%rbp), %eax setne %al movb %al, -0x41(%rbp) movb -0x41(%rbp), %al testb $0x1, %al jne 0x5920c jmp 0x592b6 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl -0x34(%rbp), %eax jne 0x59232 movq -0x28(%rbp), %rax addq $0x1, %rax cmpq -0x30(%rbp), %rax je 0x59232 movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax je 0x5927c movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movq -0x28(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x28(%rbp) movzbl (%rcx), %ecx movzbl (%rax,%rcx), %eax movq -0x10(%rbp), %rcx movq 0x58(%rcx), %rcx movq -0x18(%rbp), %rdx movq %rdx, %rsi addq $0x1, %rsi movq %rsi, -0x18(%rbp) movzbl (%rdx), %edx movzbl (%rcx,%rdx), %ecx cmpl %ecx, %eax je 0x59288 movl $0x1, -0x4(%rbp) jmp 0x594fa movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jne 0x592aa movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax setne %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x4(%rbp) jmp 0x594fa movl $0x1, -0x38(%rbp) jmp 0x591df movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl 0x10(%rbp), %eax jne 0x59324 jmp 0x592c4 movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jne 0x592d9 movl -0x38(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x594fa movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) movq -0x28(%rbp), %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) xorl %eax, %eax cmpq -0x30(%rbp), %rcx movb %al, -0x42(%rbp) jae 0x5930c movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl 0x10(%rbp), %eax sete %al movb %al, -0x42(%rbp) movb -0x42(%rbp), %al testb $0x1, %al jne 0x592c4 movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jne 0x59322 jmp 0x594e2 jmp 0x59324 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl 0x18(%rbp), %eax jne 0x594dd movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax je 0x59398 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl 0x18(%rbp), %eax jne 0x59358 jmp 0x5938a movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl 0x10(%rbp), %eax jne 0x59388 movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jne 0x5937a movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x594fa movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) jmp 0x5938a jmp 0x59398 movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x59340 movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jne 0x593ae movl $0x0, -0x4(%rbp) jmp 0x594fa movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jne 0x593c4 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x594fa movq -0x28(%rbp), %rax movb (%rax), %al movb %al, -0x39(%rbp) movzbl %al, %eax cmpl -0x34(%rbp), %eax jne 0x593f8 movq -0x28(%rbp), %rax addq $0x1, %rax cmpq -0x30(%rbp), %rax je 0x593f8 movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) movb 0x1(%rax), %al movb %al, -0x39(%rbp) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movzbl -0x39(%rbp), %ecx movb (%rax,%rcx), %al movb %al, -0x39(%rbp) jmp 0x59418 movq -0x18(%rbp), %rcx xorl %eax, %eax cmpq -0x20(%rbp), %rcx movb %al, -0x43(%rbp) je 0x59446 movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movq -0x18(%rbp), %rcx movzbl (%rcx), %ecx movzbl (%rax,%rcx), %eax movzbl -0x39(%rbp), %ecx cmpl %ecx, %eax setne %al movb %al, -0x43(%rbp) movb -0x43(%rbp), %al testb $0x1, %al jne 0x5944f jmp 0x5945d movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) jmp 0x59418 movq -0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x18(%rbp) cmpq -0x20(%rbp), %rax jne 0x5947b movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x594fa movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x28(%rbp), %rcx movq -0x30(%rbp), %r8 movl -0x34(%rbp), %r9d movl 0x10(%rbp), %r11d movl 0x18(%rbp), %r10d movl 0x20(%rbp), %eax addl $0x1, %eax movl %r11d, (%rsp) movl %r10d, 0x8(%rsp) movl %eax, 0x10(%rsp) callq 0x59170 movl %eax, -0x40(%rbp) cmpl $0x0, -0x40(%rbp) jg 0x594c4 movl -0x40(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x594fa jmp 0x594c6 movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jne 0x59416 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x594fa jmp 0x591cf movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rsi xorl %eax, %eax movl $0x1, %ecx cmpq %rsi, %rdx cmovnel %ecx, %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_wildcmp_8bit_impl: push rbp mov rbp, rsp sub rsp, 60h mov eax, [rbp+arg_10] mov eax, [rbp+arg_8] mov eax, [rbp+arg_0] mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_34], r9d mov [rbp+var_38], 0FFFFFFFFh lea rax, my_string_stack_guard cmp qword ptr [rax], 0 jz short loc_591CD lea rax, my_string_stack_guard mov rax, [rax] mov edi, [rbp+arg_10] call rax cmp eax, 0 jz short loc_591CD mov [rbp+var_4], 1 jmp loc_594FA loc_591CD: jmp short $+2 loc_591CF: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jz loc_594E2 jmp short $+2 loc_591DF: mov rax, [rbp+var_28] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, [rbp+arg_8] mov [rbp+var_41], al jz short loc_59200 mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+arg_0] setnz al mov [rbp+var_41], al loc_59200: mov al, [rbp+var_41] test al, 1 jnz short loc_5920C jmp loc_592B6 loc_5920C: mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+var_34] jnz short loc_59232 mov rax, [rbp+var_28] add rax, 1 cmp rax, [rbp+var_30] jz short loc_59232 mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax loc_59232: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jz short loc_5927C mov rax, [rbp+var_10] mov rax, [rax+58h] mov rcx, [rbp+var_28] mov rdx, rcx add rdx, 1 mov [rbp+var_28], rdx movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx] mov rcx, [rbp+var_10] mov rcx, [rcx+58h] mov rdx, [rbp+var_18] mov rsi, rdx add rsi, 1 mov [rbp+var_18], rsi movzx edx, byte ptr [rdx] movzx ecx, byte ptr [rcx+rdx] cmp eax, ecx jz short loc_59288 loc_5927C: mov [rbp+var_4], 1 jmp loc_594FA loc_59288: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jnz short loc_592AA mov rax, [rbp+var_18] cmp rax, [rbp+var_20] setnz al and al, 1 movzx eax, al mov [rbp+var_4], eax jmp loc_594FA loc_592AA: mov [rbp+var_38], 1 jmp loc_591DF loc_592B6: mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+arg_0] jnz short loc_59324 jmp short $+2 loc_592C4: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnz short loc_592D9 mov eax, [rbp+var_38] mov [rbp+var_4], eax jmp loc_594FA loc_592D9: mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax mov rcx, [rbp+var_28] add rcx, 1 mov [rbp+var_28], rcx xor eax, eax cmp rcx, [rbp+var_30] mov [rbp+var_42], al jnb short loc_5930C mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+arg_0] setz al mov [rbp+var_42], al loc_5930C: mov al, [rbp+var_42] test al, 1 jnz short loc_592C4 mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jnz short loc_59322 jmp loc_594E2 loc_59322: jmp short $+2 loc_59324: mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+arg_8] jnz loc_594DD mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax loc_59340: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jz short loc_59398 mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+arg_8] jnz short loc_59358 jmp short loc_5938A loc_59358: mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+arg_0] jnz short loc_59388 mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnz short loc_5937A mov [rbp+var_4], 0FFFFFFFFh jmp loc_594FA loc_5937A: mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax jmp short loc_5938A loc_59388: jmp short loc_59398 loc_5938A: mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax jmp short loc_59340 loc_59398: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jnz short loc_593AE mov [rbp+var_4], 0 jmp loc_594FA loc_593AE: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnz short loc_593C4 mov [rbp+var_4], 0FFFFFFFFh jmp loc_594FA loc_593C4: mov rax, [rbp+var_28] mov al, [rax] mov [rbp+var_39], al movzx eax, al cmp eax, [rbp+var_34] jnz short loc_593F8 mov rax, [rbp+var_28] add rax, 1 cmp rax, [rbp+var_30] jz short loc_593F8 mov rax, [rbp+var_28] mov rcx, rax add rcx, 1 mov [rbp+var_28], rcx mov al, [rax+1] mov [rbp+var_39], al loc_593F8: mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax mov rax, [rbp+var_10] mov rax, [rax+58h] movzx ecx, [rbp+var_39] mov al, [rax+rcx] mov [rbp+var_39], al loc_59416: jmp short $+2 loc_59418: mov rcx, [rbp+var_18] xor eax, eax cmp rcx, [rbp+var_20] mov [rbp+var_43], al jz short loc_59446 mov rax, [rbp+var_10] mov rax, [rax+58h] mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx] movzx ecx, [rbp+var_39] cmp eax, ecx setnz al mov [rbp+var_43], al loc_59446: mov al, [rbp+var_43] test al, 1 jnz short loc_5944F jmp short loc_5945D loc_5944F: mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax jmp short loc_59418 loc_5945D: mov rax, [rbp+var_18] mov rcx, rax add rcx, 1 mov [rbp+var_18], rcx cmp rax, [rbp+var_20] jnz short loc_5947B mov [rbp+var_4], 0FFFFFFFFh jmp short loc_594FA loc_5947B: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] mov rcx, [rbp+var_28] mov r8, [rbp+var_30] mov r9d, [rbp+var_34] mov r11d, [rbp+arg_0] mov r10d, [rbp+arg_8] mov eax, [rbp+arg_10] add eax, 1 mov [rsp+60h+var_60], r11d mov [rsp+60h+var_58], r10d mov [rsp+60h+var_50], eax call my_wildcmp_8bit_impl mov [rbp+var_40], eax cmp [rbp+var_40], 0 jg short loc_594C4 mov eax, [rbp+var_40] mov [rbp+var_4], eax jmp short loc_594FA loc_594C4: jmp short $+2 loc_594C6: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnz loc_59416 mov [rbp+var_4], 0FFFFFFFFh jmp short loc_594FA loc_594DD: jmp loc_591CF loc_594E2: mov rdx, [rbp+var_18] mov rsi, [rbp+var_20] xor eax, eax mov ecx, 1 cmp rdx, rsi cmovnz eax, ecx mov [rbp+var_4], eax loc_594FA: mov eax, [rbp+var_4] add rsp, 60h pop rbp retn
long long my_wildcmp_8bit_impl( long long a1, unsigned __int8 *a2, unsigned __int8 *a3, char *a4, char *a5, int a6, int a7, int a8, unsigned int a9) { char *v9; // rcx unsigned __int8 *v10; // rdx char *v11; // rax unsigned __int8 *v12; // rax bool v14; // [rsp+1Dh] [rbp-43h] bool v15; // [rsp+1Eh] [rbp-42h] bool v16; // [rsp+1Fh] [rbp-41h] int v17; // [rsp+20h] [rbp-40h] unsigned __int8 v18; // [rsp+27h] [rbp-39h] unsigned __int8 v19; // [rsp+27h] [rbp-39h] unsigned int v20; // [rsp+28h] [rbp-38h] char *i; // [rsp+38h] [rbp-28h] int v25; // [rsp+38h] [rbp-28h] v20 = -1; if ( my_string_stack_guard && (unsigned int)my_string_stack_guard(a9) ) { return 1; } else { do { if ( a4 != a5 ) { while ( 1 ) { v16 = 0; if ( *a4 != a8 ) v16 = *a4 != a7; if ( !v16 ) break; if ( *a4 == a6 && a4 + 1 != a5 ) ++a4; if ( a2 == a3 ) return 1; v9 = a4++; v10 = a2++; if ( *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + (unsigned __int8)*v9) != *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + *v10) ) return 1; if ( a4 == a5 ) return a2 != a3; v20 = 1; } if ( *a4 != a7 ) continue; do { if ( a2 == a3 ) return v20; ++a2; ++a4; v15 = 0; if ( a4 < a5 ) v15 = *a4 == a7; } while ( v15 ); if ( a4 != a5 ) continue; } return a2 != a3; } while ( *a4 != a8 ); for ( i = a4 + 1; i != a5; ++i ) { if ( *i != a8 ) { if ( *i != a7 ) break; if ( a2 == a3 ) return (unsigned int)-1; ++a2; } } if ( i == a5 ) { return 0; } else if ( a2 == a3 ) { return (unsigned int)-1; } else { v18 = *i; if ( (unsigned __int8)*i == a6 && i + 1 != a5 ) { v11 = i; LODWORD(i) = (_DWORD)i + 1; v18 = v11[1]; } v25 = (_DWORD)i + 1; v19 = *(_BYTE *)(*(_QWORD *)(a1 + 88) + v18); do { while ( 1 ) { v14 = 0; if ( a2 != a3 ) v14 = *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + *a2) != v19; if ( !v14 ) break; ++a2; } v12 = a2++; if ( v12 == a3 ) return (unsigned int)-1; v17 = my_wildcmp_8bit_impl(a1, (_DWORD)a2, (_DWORD)a3, v25, (_DWORD)a5, a6, a7, a8, a9 + 1); if ( v17 <= 0 ) return (unsigned int)v17; } while ( a2 != a3 ); return (unsigned int)-1; } } }
my_wildcmp_8bit_impl: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV EAX,dword ptr [RBP + 0x20] MOV EAX,dword ptr [RBP + 0x18] MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV dword ptr [RBP + -0x34],R9D MOV dword ptr [RBP + -0x38],0xffffffff LEA RAX,[0x4ba318] CMP qword ptr [RAX],0x0 JZ 0x001591cd LEA RAX,[0x4ba318] MOV RAX,qword ptr [RAX] MOV EDI,dword ptr [RBP + 0x20] CALL RAX CMP EAX,0x0 JZ 0x001591cd MOV dword ptr [RBP + -0x4],0x1 JMP 0x001594fa LAB_001591cd: JMP 0x001591cf LAB_001591cf: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JZ 0x001594e2 JMP 0x001591df LAB_001591df: MOV RAX,qword ptr [RBP + -0x28] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,dword ptr [RBP + 0x18] MOV byte ptr [RBP + -0x41],AL JZ 0x00159200 MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + 0x10] SETNZ AL MOV byte ptr [RBP + -0x41],AL LAB_00159200: MOV AL,byte ptr [RBP + -0x41] TEST AL,0x1 JNZ 0x0015920c JMP 0x001592b6 LAB_0015920c: MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + -0x34] JNZ 0x00159232 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 CMP RAX,qword ptr [RBP + -0x30] JZ 0x00159232 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX LAB_00159232: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JZ 0x0015927c MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x58] MOV RCX,qword ptr [RBP + -0x28] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x28],RDX MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x58] MOV RDX,qword ptr [RBP + -0x18] MOV RSI,RDX ADD RSI,0x1 MOV qword ptr [RBP + -0x18],RSI MOVZX EDX,byte ptr [RDX] MOVZX ECX,byte ptr [RCX + RDX*0x1] CMP EAX,ECX JZ 0x00159288 LAB_0015927c: MOV dword ptr [RBP + -0x4],0x1 JMP 0x001594fa LAB_00159288: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001592aa MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x4],EAX JMP 0x001594fa LAB_001592aa: MOV dword ptr [RBP + -0x38],0x1 JMP 0x001591df LAB_001592b6: MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + 0x10] JNZ 0x00159324 JMP 0x001592c4 LAB_001592c4: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x001592d9 MOV EAX,dword ptr [RBP + -0x38] MOV dword ptr [RBP + -0x4],EAX JMP 0x001594fa LAB_001592d9: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX MOV RCX,qword ptr [RBP + -0x28] ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x30] MOV byte ptr [RBP + -0x42],AL JNC 0x0015930c MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + 0x10] SETZ AL MOV byte ptr [RBP + -0x42],AL LAB_0015930c: MOV AL,byte ptr [RBP + -0x42] TEST AL,0x1 JNZ 0x001592c4 MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00159322 JMP 0x001594e2 LAB_00159322: JMP 0x00159324 LAB_00159324: MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + 0x18] JNZ 0x001594dd MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX LAB_00159340: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JZ 0x00159398 MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + 0x18] JNZ 0x00159358 JMP 0x0015938a LAB_00159358: MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + 0x10] JNZ 0x00159388 MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x0015937a MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001594fa LAB_0015937a: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x0015938a LAB_00159388: JMP 0x00159398 LAB_0015938a: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x00159340 LAB_00159398: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001593ae MOV dword ptr [RBP + -0x4],0x0 JMP 0x001594fa LAB_001593ae: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x001593c4 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001594fa LAB_001593c4: MOV RAX,qword ptr [RBP + -0x28] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x39],AL MOVZX EAX,AL CMP EAX,dword ptr [RBP + -0x34] JNZ 0x001593f8 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 CMP RAX,qword ptr [RBP + -0x30] JZ 0x001593f8 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX MOV AL,byte ptr [RAX + 0x1] MOV byte ptr [RBP + -0x39],AL LAB_001593f8: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x58] MOVZX ECX,byte ptr [RBP + -0x39] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x39],AL LAB_00159416: JMP 0x00159418 LAB_00159418: MOV RCX,qword ptr [RBP + -0x18] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x20] MOV byte ptr [RBP + -0x43],AL JZ 0x00159446 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x58] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOVZX ECX,byte ptr [RBP + -0x39] CMP EAX,ECX SETNZ AL MOV byte ptr [RBP + -0x43],AL LAB_00159446: MOV AL,byte ptr [RBP + -0x43] TEST AL,0x1 JNZ 0x0015944f JMP 0x0015945d LAB_0015944f: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x00159418 LAB_0015945d: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x18],RCX CMP RAX,qword ptr [RBP + -0x20] JNZ 0x0015947b MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001594fa LAB_0015947b: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x28] MOV R8,qword ptr [RBP + -0x30] MOV R9D,dword ptr [RBP + -0x34] MOV R11D,dword ptr [RBP + 0x10] MOV R10D,dword ptr [RBP + 0x18] MOV EAX,dword ptr [RBP + 0x20] ADD EAX,0x1 MOV dword ptr [RSP],R11D MOV dword ptr [RSP + 0x8],R10D MOV dword ptr [RSP + 0x10],EAX CALL 0x00159170 MOV dword ptr [RBP + -0x40],EAX CMP dword ptr [RBP + -0x40],0x0 JG 0x001594c4 MOV EAX,dword ptr [RBP + -0x40] MOV dword ptr [RBP + -0x4],EAX JMP 0x001594fa LAB_001594c4: JMP 0x001594c6 LAB_001594c6: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x00159416 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001594fa LAB_001594dd: JMP 0x001591cf LAB_001594e2: MOV RDX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] XOR EAX,EAX MOV ECX,0x1 CMP RDX,RSI CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x4],EAX LAB_001594fa: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x60 POP RBP RET
uint my_wildcmp_8bit_impl (long param_1,byte *param_2,byte *param_3,byte *param_4,byte *param_5,uint param_6, int param_7,int param_8,int param_9) { char cVar1; int iVar2; uint uVar3; byte *pbVar4; bool bVar5; byte local_41; uint local_40; byte *local_30; byte *local_20; uint local_c; local_40 = 0xffffffff; local_30 = param_4; local_20 = param_2; if ((my_string_stack_guard == (code *)0x0) || (iVar2 = (*my_string_stack_guard)(param_9), iVar2 == 0)) { do { if (local_30 == param_5) { LAB_001594e2: return (uint)(local_20 != param_3); } while( true ) { bVar5 = false; if ((char)*local_30 != param_8) { bVar5 = (char)*local_30 != param_7; } if (!bVar5) break; if (((int)(char)*local_30 == param_6) && (local_30 + 1 != param_5)) { local_30 = local_30 + 1; } if (local_20 == param_3) { return 1; } if (*(char *)(*(long *)(param_1 + 0x58) + (ulong)*local_30) != *(char *)(*(long *)(param_1 + 0x58) + (ulong)*local_20)) { return 1; } if (local_30 + 1 == param_5) { return (uint)(local_20 + 1 != param_3); } local_40 = 1; local_30 = local_30 + 1; local_20 = local_20 + 1; } if ((char)*local_30 == param_7) { do { if (local_20 == param_3) { return local_40; } local_20 = local_20 + 1; local_30 = local_30 + 1; bVar5 = false; if (local_30 < param_5) { bVar5 = (char)*local_30 == param_7; } } while (bVar5); if (local_30 == param_5) goto LAB_001594e2; } } while ((char)*local_30 != param_8); while (pbVar4 = local_30, local_30 = pbVar4 + 1, local_30 != param_5) { if ((char)*local_30 != param_8) { if ((char)*local_30 != param_7) break; if (local_20 == param_3) { return 0xffffffff; } local_20 = local_20 + 1; } } if (local_30 == param_5) { local_c = 0; } else if (local_20 == param_3) { local_c = 0xffffffff; } else { local_41 = *local_30; if ((local_41 == param_6) && (pbVar4 + 2 != param_5)) { local_30 = pbVar4 + 2; local_41 = pbVar4[2]; } cVar1 = *(char *)(*(long *)(param_1 + 0x58) + (ulong)local_41); do { while( true ) { bVar5 = false; if (local_20 != param_3) { bVar5 = *(char *)(*(long *)(param_1 + 0x58) + (ulong)*local_20) != cVar1; } if (!bVar5) break; local_20 = local_20 + 1; } pbVar4 = local_20 + 1; if (local_20 == param_3) { return 0xffffffff; } uVar3 = my_wildcmp_8bit_impl (param_1,pbVar4,param_3,local_30 + 1,param_5,param_6,param_7,param_8, param_9 + 1); if ((int)uVar3 < 1) { return uVar3; } local_20 = pbVar4; } while (pbVar4 != param_3); local_c = 0xffffffff; } } else { local_c = 1; } return local_c; }
6,619
ma_bitmap_free_full_pages
eloqsql/storage/maria/ma_bitmap.c
my_bool _ma_bitmap_free_full_pages(MARIA_HA *info, const uchar *extents, uint count) { MARIA_FILE_BITMAP *bitmap= &info->s->bitmap; my_bool res; DBUG_ENTER("_ma_bitmap_free_full_pages"); for (; count--; extents+= ROW_EXTENT_SIZE) { pgcache_page_no_t page= uint5korr(extents); uint page_count= (uint2korr(extents + ROW_EXTENT_PAGE_SIZE) & ~START_EXTENT_BIT); if (!(page_count & TAIL_BIT)) { if (page == 0 && page_count == 0) continue; /* Not used extent */ if (pagecache_delete_pages(info->s->pagecache, &info->dfile, page, page_count, PAGECACHE_LOCK_WRITE, 1)) DBUG_RETURN(1); mysql_mutex_lock(&bitmap->bitmap_lock); res= _ma_bitmap_reset_full_page_bits(info, bitmap, page, page_count); mysql_mutex_unlock(&bitmap->bitmap_lock); if (res) DBUG_RETURN(1); } } DBUG_RETURN(0); }
O0
c
ma_bitmap_free_full_pages: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax addq $0xa10, %rax # imm = 0xA10 movq %rax, -0x28(%rbp) movl -0x1c(%rbp), %eax movl %eax, %ecx addl $-0x1, %ecx movl %ecx, -0x1c(%rbp) cmpl $0x0, %eax je 0x43ffb movq -0x18(%rbp), %rdi callq 0x44010 movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rax movzwl 0x5(%rax), %eax andl $0xffffbfff, %eax # imm = 0xFFFFBFFF movl %eax, -0x3c(%rbp) movl -0x3c(%rbp), %eax andl $0x8000, %eax # imm = 0x8000 cmpl $0x0, %eax jne 0x43fe8 cmpq $0x0, -0x38(%rbp) jne 0x43f58 cmpl $0x0, -0x3c(%rbp) jne 0x43f58 jmp 0x43fea movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x600(%rax), %rdi movq -0x10(%rbp), %rsi addq $0x470, %rsi # imm = 0x470 movq -0x38(%rbp), %rdx movl -0x3c(%rbp), %ecx movl $0x4, %r8d movl $0x1, %r9d callq 0x2eff0 cmpb $0x0, %al je 0x43f95 jmp 0x43f8f movb $0x1, -0x1(%rbp) jmp 0x44001 movq -0x28(%rbp), %rdi addq $0x88, %rdi leaq 0x10d6e5(%rip), %rsi # 0x15168c movl $0xb31, %edx # imm = 0xB31 callq 0x41c50 movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x38(%rbp), %rdx movl -0x3c(%rbp), %ecx callq 0x43450 movb %al, -0x29(%rbp) movq -0x28(%rbp), %rdi addq $0x88, %rdi callq 0x41f00 cmpb $0x0, -0x29(%rbp) je 0x43fe6 jmp 0x43fe0 movb $0x1, -0x1(%rbp) jmp 0x44001 jmp 0x43fe8 jmp 0x43fea movq -0x18(%rbp), %rax addq $0x7, %rax movq %rax, -0x18(%rbp) jmp 0x43f04 jmp 0x43ffd movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x40, %rsp popq %rbp retq nopw (%rax,%rax)
_ma_bitmap_free_full_pages: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov rax, [rbp+var_10] mov rax, [rax] add rax, 0A10h mov [rbp+var_28], rax loc_43F04: mov eax, [rbp+var_1C] mov ecx, eax add ecx, 0FFFFFFFFh mov [rbp+var_1C], ecx cmp eax, 0 jz loc_43FFB mov rdi, [rbp+var_18] call uint5korr mov [rbp+var_38], rax mov rax, [rbp+var_18] movzx eax, word ptr [rax+5] and eax, 0FFFFBFFFh mov [rbp+var_3C], eax mov eax, [rbp+var_3C] and eax, 8000h cmp eax, 0 jnz loc_43FE8 cmp [rbp+var_38], 0 jnz short loc_43F58 cmp [rbp+var_3C], 0 jnz short loc_43F58 jmp loc_43FEA loc_43F58: mov rax, [rbp+var_10] mov rax, [rax] mov rdi, [rax+600h] mov rsi, [rbp+var_10] add rsi, 470h mov rdx, [rbp+var_38] mov ecx, [rbp+var_3C] mov r8d, 4 mov r9d, 1 call pagecache_delete_pages cmp al, 0 jz short loc_43F95 jmp short $+2 loc_43F8F: mov [rbp+var_1], 1 jmp short loc_44001 loc_43F95: mov rdi, [rbp+var_28] add rdi, 88h lea rsi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 0B31h call inline_mysql_mutex_lock_4 mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] mov rdx, [rbp+var_38] mov ecx, [rbp+var_3C] call _ma_bitmap_reset_full_page_bits mov [rbp+var_29], al mov rdi, [rbp+var_28] add rdi, 88h call inline_mysql_mutex_unlock_4 cmp [rbp+var_29], 0 jz short loc_43FE6 jmp short $+2 loc_43FE0: mov [rbp+var_1], 1 jmp short loc_44001 loc_43FE6: jmp short $+2 loc_43FE8: jmp short $+2 loc_43FEA: mov rax, [rbp+var_18] add rax, 7 mov [rbp+var_18], rax jmp loc_43F04 loc_43FFB: jmp short $+2 loc_43FFD: mov [rbp+var_1], 0 loc_44001: mov al, [rbp+var_1] add rsp, 40h pop rbp retn
char ma_bitmap_free_full_pages(long long *a1, long long a2, int a3) { int v5; // [rsp+4h] [rbp-3Ch] long long v6; // [rsp+8h] [rbp-38h] char v7; // [rsp+17h] [rbp-29h] long long v8; // [rsp+18h] [rbp-28h] v8 = *a1 + 2576; while ( a3-- ) { v6 = uint5korr(a2); v5 = *(_WORD *)(a2 + 5) & 0xBFFF; if ( (*(_WORD *)(a2 + 5) & 0x8000) == 0 && (v6 || (*(_WORD *)(a2 + 5) & 0xBFFF) != 0) ) { if ( pagecache_delete_pages(*(_QWORD **)(*a1 + 1536), (long long)(a1 + 142), v6, v5, 4u, 1) ) return 1; inline_mysql_mutex_lock_4( v8 + 136, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c", 0xB31u); v7 = ma_bitmap_reset_full_page_bits(a1, v8, v6, v5); inline_mysql_mutex_unlock_4(v8 + 136); if ( v7 ) return 1; } a2 += 7LL; } return 0; }
_ma_bitmap_free_full_pages: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] ADD RAX,0xa10 MOV qword ptr [RBP + -0x28],RAX LAB_00143f04: MOV EAX,dword ptr [RBP + -0x1c] MOV ECX,EAX ADD ECX,-0x1 MOV dword ptr [RBP + -0x1c],ECX CMP EAX,0x0 JZ 0x00143ffb MOV RDI,qword ptr [RBP + -0x18] CALL 0x00144010 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX + 0x5] AND EAX,0xffffbfff MOV dword ptr [RBP + -0x3c],EAX MOV EAX,dword ptr [RBP + -0x3c] AND EAX,0x8000 CMP EAX,0x0 JNZ 0x00143fe8 CMP qword ptr [RBP + -0x38],0x0 JNZ 0x00143f58 CMP dword ptr [RBP + -0x3c],0x0 JNZ 0x00143f58 JMP 0x00143fea LAB_00143f58: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + 0x600] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x470 MOV RDX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x3c] MOV R8D,0x4 MOV R9D,0x1 CALL 0x0012eff0 CMP AL,0x0 JZ 0x00143f95 JMP 0x00143f8f LAB_00143f8f: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00144001 LAB_00143f95: MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x88 LEA RSI,[0x25168c] MOV EDX,0xb31 CALL 0x00141c50 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x3c] CALL 0x00143450 MOV byte ptr [RBP + -0x29],AL MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x88 CALL 0x00141f00 CMP byte ptr [RBP + -0x29],0x0 JZ 0x00143fe6 JMP 0x00143fe0 LAB_00143fe0: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00144001 LAB_00143fe6: JMP 0x00143fe8 LAB_00143fe8: JMP 0x00143fea LAB_00143fea: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x7 MOV qword ptr [RBP + -0x18],RAX JMP 0x00143f04 LAB_00143ffb: JMP 0x00143ffd LAB_00143ffd: MOV byte ptr [RBP + -0x1],0x0 LAB_00144001: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x40 POP RBP RET
int1 _ma_bitmap_free_full_pages(long *param_1,long param_2,int param_3) { ushort uVar1; long lVar2; char cVar3; long lVar4; int local_24; long local_20; lVar2 = *param_1; local_24 = param_3; local_20 = param_2; do { if (local_24 == 0) { return 0; } lVar4 = uint5korr(local_20); uVar1 = *(ushort *)(local_20 + 5); if (((uVar1 & 0x8000) == 0) && ((lVar4 != 0 || ((uVar1 & 0xbfff) != 0)))) { cVar3 = pagecache_delete_pages (*(int8 *)(*param_1 + 0x600),param_1 + 0x8e,lVar4,uVar1 & 0xbfff,4,1); if (cVar3 != '\0') { return 1; } inline_mysql_mutex_lock (lVar2 + 0xa98,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c", 0xb31); cVar3 = _ma_bitmap_reset_full_page_bits(param_1,lVar2 + 0xa10,lVar4,uVar1 & 0xbfff); inline_mysql_mutex_unlock(lVar2 + 0xa98); if (cVar3 != '\0') { return 1; } } local_20 = local_20 + 7; local_24 = local_24 + -1; } while( true ); }
6,620
my_symlink
eloqsql/mysys/my_symlink.c
int my_symlink(const char *content, const char *linkname, myf MyFlags) { #ifndef HAVE_READLINK return 0; #else int result; DBUG_ENTER("my_symlink"); DBUG_PRINT("enter",("content: %s linkname: %s", content, linkname)); result= 0; if (symlink(content, linkname)) { result= -1; my_errno=errno; if (MyFlags & MY_WME) my_error(EE_CANT_SYMLINK, MYF(0), linkname, content, errno); } else if ((MyFlags & MY_SYNC_DIR) && my_sync_dir_by_file(linkname, MyFlags)) result= -1; DBUG_RETURN(result); #endif /* HAVE_READLINK */ }
O0
c
my_symlink: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) jmp 0x7da46 movl $0x0, -0x1c(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x36090 cmpl $0x0, %eax je 0x7daba movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF callq 0x36990 movl (%rax), %eax movl %eax, -0x20(%rbp) callq 0x7e510 movl -0x20(%rbp), %ecx movl %ecx, (%rax) movq -0x18(%rbp), %rax andq $0x10, %rax cmpq $0x0, %rax je 0x7dab8 movq -0x10(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x28(%rbp) callq 0x36990 movq -0x30(%rbp), %rdx movq -0x28(%rbp), %rcx movl (%rax), %r8d movl $0x19, %edi xorl %eax, %eax movl %eax, %esi movb $0x0, %al callq 0x77200 jmp 0x7dae5 movq -0x18(%rbp), %rax andq $0x8000, %rax # imm = 0x8000 cmpq $0x0, %rax je 0x7dae3 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x7e1b0 cmpl $0x0, %eax je 0x7dae3 movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF jmp 0x7dae5 jmp 0x7dae7 movl -0x1c(%rbp), %eax movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_symlink: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx jmp short $+2 loc_7DA46: mov [rbp+var_1C], 0 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call _symlink cmp eax, 0 jz short loc_7DABA mov [rbp+var_1C], 0FFFFFFFFh call ___errno_location mov eax, [rax] mov [rbp+var_20], eax call _my_thread_var mov ecx, [rbp+var_20] mov [rax], ecx mov rax, [rbp+var_18] and rax, 10h cmp rax, 0 jz short loc_7DAB8 mov rax, [rbp+var_10] mov [rbp+var_30], rax mov rax, [rbp+var_8] mov [rbp+var_28], rax call ___errno_location mov rdx, [rbp+var_30] mov rcx, [rbp+var_28] mov r8d, [rax] mov edi, 19h xor eax, eax mov esi, eax mov al, 0 call my_error loc_7DAB8: jmp short loc_7DAE5 loc_7DABA: mov rax, [rbp+var_18] and rax, 8000h cmp rax, 0 jz short loc_7DAE3 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call my_sync_dir_by_file cmp eax, 0 jz short loc_7DAE3 mov [rbp+var_1C], 0FFFFFFFFh loc_7DAE3: jmp short $+2 loc_7DAE5: jmp short $+2 loc_7DAE7: mov eax, [rbp+var_1C] mov [rbp+var_34], eax mov eax, [rbp+var_34] add rsp, 40h pop rbp retn
long long my_symlink(long long a1, long long a2, long long a3) { unsigned int *v3; // rax int v5; // [rsp+20h] [rbp-20h] unsigned int v6; // [rsp+24h] [rbp-1Ch] v6 = 0; if ( (unsigned int)symlink(a1, a2) ) { v6 = -1; v5 = *(_DWORD *)__errno_location(a1); *(_DWORD *)my_thread_var() = v5; if ( (a3 & 0x10) != 0 ) { v3 = (unsigned int *)__errno_location(a1); my_error(0x19u, 0LL, a2, a1, *v3); } } else if ( (a3 & 0x8000) != 0 && (unsigned int)my_sync_dir_by_file(a2, a3) ) { return (unsigned int)-1; } return v6; }
my_symlink: 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 JMP 0x0017da46 LAB_0017da46: MOV dword ptr [RBP + -0x1c],0x0 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x00136090 CMP EAX,0x0 JZ 0x0017daba MOV dword ptr [RBP + -0x1c],0xffffffff CALL 0x00136990 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x20],EAX CALL 0x0017e510 MOV ECX,dword ptr [RBP + -0x20] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x18] AND RAX,0x10 CMP RAX,0x0 JZ 0x0017dab8 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x28],RAX CALL 0x00136990 MOV RDX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x28] MOV R8D,dword ptr [RAX] MOV EDI,0x19 XOR EAX,EAX MOV ESI,EAX MOV AL,0x0 CALL 0x00177200 LAB_0017dab8: JMP 0x0017dae5 LAB_0017daba: MOV RAX,qword ptr [RBP + -0x18] AND RAX,0x8000 CMP RAX,0x0 JZ 0x0017dae3 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0017e1b0 CMP EAX,0x0 JZ 0x0017dae3 MOV dword ptr [RBP + -0x1c],0xffffffff LAB_0017dae3: JMP 0x0017dae5 LAB_0017dae5: JMP 0x0017dae7 LAB_0017dae7: MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x34],EAX MOV EAX,dword ptr [RBP + -0x34] ADD RSP,0x40 POP RBP RET
int4 my_symlink(char *param_1,char *param_2,ulong param_3) { int iVar1; int *piVar2; int4 local_24; local_24 = 0; iVar1 = symlink(param_1,param_2); if (iVar1 == 0) { if (((param_3 & 0x8000) != 0) && (iVar1 = my_sync_dir_by_file(param_2,param_3), iVar1 != 0)) { local_24 = 0xffffffff; } } else { local_24 = 0xffffffff; piVar2 = __errno_location(); iVar1 = *piVar2; piVar2 = (int *)_my_thread_var(); *piVar2 = iVar1; if ((param_3 & 0x10) != 0) { piVar2 = __errno_location(); my_error(0x19,0,param_2,param_1,*piVar2); } } return local_24; }
6,621
bool nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator==<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, nullptr>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&) const
zkingston[P]unknot/build_O1/_deps/json-src/include/nlohmann/detail/iterators/iter_impl.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)); } JSON_ASSERT(m_object != nullptr); 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); } }
O1
cpp
bool nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator==<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, nullptr>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %r14 movq (%rdi), %rax cmpq (%rsi), %rax jne 0x38694 movzbl (%rax), %eax cmpl $0x2, %eax je 0x38674 cmpl $0x1, %eax jne 0x3867e movq 0x8(%r14), %rax cmpq 0x8(%rsi), %rax jmp 0x38686 movq 0x10(%r14), %rax cmpq 0x10(%rsi), %rax jmp 0x38686 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 0xf4f0 movq %rax, %rbx leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x258c98(%rip), %rsi # 0x291349 leaq 0x258cc1(%rip), %rdx # 0x291379 leaq 0x8(%rsp), %rdi callq 0x1a83c movq (%r14), %rcx movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0xd4, %esi callq 0x35a60 xorl %ebp, %ebp leaq 0x2fb41d(%rip), %rsi # 0x333b00 leaq -0x5278(%rip), %rdx # 0x33472 movq %rbx, %rdi callq 0x10170 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x38714 movq 0x18(%rsp), %rsi incq %rsi callq 0xfa70 jmp 0x38714 movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0x38721 movq %rbx, %rdi callq 0xf6f0 movq %r14, %rdi callq 0x101c0 nop
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_: 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_38694 movzx eax, byte ptr [rax] cmp eax, 2 jz short loc_38674 cmp eax, 1 jnz short loc_3867E mov rax, [r14+8] cmp rax, [rsi+8] jmp short loc_38686 loc_38674: mov rax, [r14+10h] cmp rax, [rsi+10h] jmp short loc_38686 loc_3867E: mov rax, [r14+18h] cmp rax, [rsi+18h] loc_38686: setz al add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn loc_38694: 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_11_36detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; 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_38714 mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_38714 mov r14, rax mov bpl, 1 loc_38714: test bpl, bpl jz short loc_38721 mov rdi, rbx; void * call ___cxa_free_exception loc_38721: mov rdi, r14 call __Unwind_Resume
bool ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_( unsigned __int8 **a1, unsigned __int8 **a2) { int v2; // eax nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx void *v6[2]; // [rsp+8h] [rbp-40h] BYREF long long v7; // [rsp+18h] [rbp-30h] BYREF if ( *a1 != *a2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v6[0] = &v7; std::string::_M_construct<char const*>(v6, "cannot compare iterators of different containers", (long long)""); ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 212, v6); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v2 = **a1; if ( v2 == 2 ) return a1[2] == a2[2]; if ( v2 == 1 ) return a1[1] == a2[1]; return a1[3] == a2[3]; }
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_: 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 0x00138694 MOVZX EAX,byte ptr [RAX] CMP EAX,0x2 JZ 0x00138674 CMP EAX,0x1 JNZ 0x0013867e MOV RAX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [RSI + 0x8] JMP 0x00138686 LAB_00138674: MOV RAX,qword ptr [R14 + 0x10] CMP RAX,qword ptr [RSI + 0x10] JMP 0x00138686 LAB_0013867e: MOV RAX,qword ptr [R14 + 0x18] CMP RAX,qword ptr [RSI + 0x18] LAB_00138686: SETZ AL ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET LAB_00138694: MOV EDI,0x20 CALL 0x0010f4f0 MOV RBX,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 LAB_001386aa: LEA RSI,[0x391349] LEA RDX,[0x391379] LEA RDI,[RSP + 0x8] CALL 0x0011a83c MOV RCX,qword ptr [R14] MOV BPL,0x1 LAB_001386c8: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0xd4 CALL 0x00135a60 XOR EBP,EBP LEA RSI,[0x433b00] LEA RDX,[0x133472] MOV RDI,RBX CALL 0x00110170
int8 _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_ (int8 *param_1,int8 *param_2) { char cVar1; long lVar2; int8 uVar3; bool bVar4; int1 *local_40 [2]; int1 local_30 [16]; if ((char *)*param_1 == (char *)*param_2) { cVar1 = *(char *)*param_1; if (cVar1 == '\x02') { lVar2 = param_1[2]; bVar4 = lVar2 == param_2[2]; } else if (cVar1 == '\x01') { lVar2 = param_1[1]; bVar4 = lVar2 == param_2[1]; } else { lVar2 = param_1[3]; bVar4 = lVar2 == param_2[3]; } return CONCAT71((int7)((ulong)lVar2 >> 8),bVar4); } uVar3 = __cxa_allocate_exception(0x20); local_40[0] = local_30; /* try { // try from 001386aa to 001386c1 has its CatchHandler @ 0013870e */ std::__cxx11::string::_M_construct<char_const*> (local_40,"cannot compare iterators of different containers",""); /* try { // try from 001386c8 to 001386f1 has its CatchHandler @ 001386f2 */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar3,0xd4,local_40,*param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); }
6,622
lowercase
alca/libalca/vm.c
char *lowercase(char *s) { char *x = ac_alloc(strlen(s) + 1); strcpy(x, s); for(int i = 0; x[i]; i++) \ x[i] = (char)tolower(x[i]); return x; }
O0
c
lowercase: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi callq 0x7400 addq $0x1, %rax movl %eax, %edi callq 0x7890 movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rsi callq 0x71a0 movl $0x0, -0x14(%rbp) movq -0x10(%rbp), %rax movslq -0x14(%rbp), %rcx cmpb $0x0, (%rax,%rcx) je 0x1480f movq -0x10(%rbp), %rax movslq -0x14(%rbp), %rcx movsbl (%rax,%rcx), %edi callq 0x7850 movb %al, %dl movq -0x10(%rbp), %rax movslq -0x14(%rbp), %rcx movb %dl, (%rax,%rcx) movl -0x14(%rbp), %eax addl $0x1, %eax movl %eax, -0x14(%rbp) jmp 0x147d8 movq -0x10(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopl (%rax)
lowercase: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] call _strlen add rax, 1 mov edi, eax call _ac_alloc mov [rbp+var_10], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_8] call _strcpy mov [rbp+var_14], 0 loc_147D8: mov rax, [rbp+var_10] movsxd rcx, [rbp+var_14] cmp byte ptr [rax+rcx], 0 jz short loc_1480F mov rax, [rbp+var_10] movsxd rcx, [rbp+var_14] movsx edi, byte ptr [rax+rcx] call _tolower mov dl, al mov rax, [rbp+var_10] movsxd rcx, [rbp+var_14] mov [rax+rcx], dl mov eax, [rbp+var_14] add eax, 1 mov [rbp+var_14], eax jmp short loc_147D8 loc_1480F: mov rax, [rbp+var_10] add rsp, 20h pop rbp retn
long long lowercase(long long a1) { int v1; // eax int i; // [rsp+Ch] [rbp-14h] long long v4; // [rsp+10h] [rbp-10h] v1 = strlen(a1); v4 = ac_alloc((unsigned int)(v1 + 1)); strcpy(v4, a1); for ( i = 0; *(_BYTE *)(v4 + i); ++i ) *(_BYTE *)(v4 + i) = tolower((unsigned int)*(char *)(v4 + i)); return v4; }
lowercase: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] CALL 0x00107400 ADD RAX,0x1 MOV EDI,EAX CALL 0x00107890 MOV qword ptr [RBP + -0x10],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x8] CALL 0x001071a0 MOV dword ptr [RBP + -0x14],0x0 LAB_001147d8: MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x14] CMP byte ptr [RAX + RCX*0x1],0x0 JZ 0x0011480f MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x14] MOVSX EDI,byte ptr [RAX + RCX*0x1] CALL 0x00107850 MOV DL,AL MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x14] MOV byte ptr [RAX + RCX*0x1],DL MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 MOV dword ptr [RBP + -0x14],EAX JMP 0x001147d8 LAB_0011480f: MOV RAX,qword ptr [RBP + -0x10] ADD RSP,0x20 POP RBP RET
char * lowercase(char *param_1) { int iVar1; size_t sVar2; char *__dest; int local_1c; sVar2 = strlen(param_1); __dest = (char *)ac_alloc((int)sVar2 + 1); strcpy(__dest,param_1); for (local_1c = 0; __dest[local_1c] != '\0'; local_1c = local_1c + 1) { iVar1 = tolower((int)__dest[local_1c]); __dest[local_1c] = (char)iVar1; } return __dest; }
6,623
psi_mutex_trylock
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_mutex_trylock(mysql_mutex_t *that, const char *file, uint line) { PSI_mutex_locker_state state; PSI_mutex_locker *locker= PSI_MUTEX_CALL(start_mutex_wait) (&state, that->m_psi, PSI_MUTEX_TRYLOCK, file, line); # ifdef SAFE_MUTEX int result= safe_mutex_lock(&that->m_mutex, TRUE, file, line); # else int result= pthread_mutex_trylock(&that->m_mutex); # endif if (locker) PSI_MUTEX_CALL(end_mutex_wait)(locker, result); return result; }
O0
c
psi_mutex_trylock: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) leaq 0x1a7676(%rip), %rax # 0x1ce530 movq (%rax), %rax movq 0x190(%rax), %rax movq -0x8(%rbp), %rcx movq 0x40(%rcx), %rsi movq -0x10(%rbp), %rcx movl -0x14(%rbp), %r8d leaq -0x48(%rbp), %rdi movl $0x1, %edx callq *%rax movq %rax, -0x50(%rbp) movq -0x8(%rbp), %rdi callq 0x240a0 movl %eax, -0x54(%rbp) cmpq $0x0, -0x50(%rbp) je 0x26f10 leaq 0x1a7633(%rip), %rax # 0x1ce530 movq (%rax), %rax movq 0x198(%rax), %rax movq -0x50(%rbp), %rdi movl -0x54(%rbp), %esi callq *%rax movl -0x54(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopl (%rax)
psi_mutex_trylock: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx lea rax, PSI_server mov rax, [rax] mov rax, [rax+190h] mov rcx, [rbp+var_8] mov rsi, [rcx+40h] mov rcx, [rbp+var_10] mov r8d, [rbp+var_14] lea rdi, [rbp+var_48] mov edx, 1 call rax mov [rbp+var_50], rax mov rdi, [rbp+var_8] call _pthread_mutex_trylock mov [rbp+var_54], eax cmp [rbp+var_50], 0 jz short loc_26F10 lea rax, PSI_server mov rax, [rax] mov rax, [rax+198h] mov rdi, [rbp+var_50] mov esi, [rbp+var_54] call rax loc_26F10: mov eax, [rbp+var_54] add rsp, 60h pop rbp retn
long long psi_mutex_trylock(long long a1, long long a2, unsigned int a3) { unsigned int v4; // [rsp+Ch] [rbp-54h] long long v5; // [rsp+10h] [rbp-50h] _BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF unsigned int v7; // [rsp+4Ch] [rbp-14h] long long v8; // [rsp+50h] [rbp-10h] long long v9; // [rsp+58h] [rbp-8h] v9 = a1; v8 = a2; v7 = a3; v5 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[50])( v6, *(_QWORD *)(a1 + 64), 1LL, a2, a3); v4 = pthread_mutex_trylock(v9); if ( v5 ) ((void ( *)(long long, _QWORD))PSI_server[51])(v5, v4); return v4; }
psi_mutex_trylock: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX LEA RAX,[0x2ce530] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x190] MOV RCX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RCX + 0x40] MOV RCX,qword ptr [RBP + -0x10] MOV R8D,dword ptr [RBP + -0x14] LEA RDI,[RBP + -0x48] MOV EDX,0x1 CALL RAX MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x001240a0 MOV dword ptr [RBP + -0x54],EAX CMP qword ptr [RBP + -0x50],0x0 JZ 0x00126f10 LEA RAX,[0x2ce530] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x198] MOV RDI,qword ptr [RBP + -0x50] MOV ESI,dword ptr [RBP + -0x54] CALL RAX LAB_00126f10: MOV EAX,dword ptr [RBP + -0x54] ADD RSP,0x60 POP RBP RET
int psi_mutex_trylock(pthread_mutex_t *param_1,int8 param_2,int4 param_3) { int iVar1; long lVar2; int1 local_50 [52]; int4 local_1c; int8 local_18; pthread_mutex_t *local_10; local_1c = param_3; local_18 = param_2; local_10 = param_1; lVar2 = (**(code **)(PSI_server + 400)) (local_50,*(int8 *)((long)param_1 + 0x40),1,param_2,param_3); iVar1 = pthread_mutex_trylock(local_10); if (lVar2 != 0) { (**(code **)(PSI_server + 0x198))(lVar2,iVar1); } return iVar1; }
6,624
ggml_graph_compute.cold.1
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c
static void clear_numa_thread_affinity(void) { if (!ggml_is_numa()) { return; } size_t setsize = CPU_ALLOC_SIZE(g_state.numa.total_cpus); cpu_set_t * cpus = CPU_ALLOC(g_state.numa.total_cpus); CPU_ZERO_S(setsize, cpus); for (unsigned i = 0; i < g_state.numa.total_cpus; ++i) { CPU_SET_S(i, setsize, cpus); } int rv = pthread_setaffinity_np(pthread_self(), setsize, cpus); if (rv) { fprintf(stderr, "warning: pthread_setaffinity_np() failed: %s\n", strerror(rv)); } CPU_FREE(cpus); }
O1
c
ggml_graph_compute.cold.1: pushq %rbx movq 0x50c5b(%rip), %rax # 0x5bfb8 movq (%rax), %rbx callq 0xa260 leaq 0x3e585(%rip), %rsi # 0x498f1 movq %rbx, %rdi movq %rax, %rdx xorl %eax, %eax callq 0xac80 popq %rbx retq
ggml_graph_compute_cold_1: push rbx mov rax, cs:stderr_ptr mov rbx, [rax] call _strerror lea rsi, aWarningPthread; "warning: pthread_setaffinity_np() faile"... mov rdi, rbx mov rdx, rax xor eax, eax call _fprintf pop rbx retn
long long ggml_graph_compute_cold_1() { long long v0; // rbx const char *v1; // rax v0 = stderr; v1 = (const char *)strerror(); return fprintf(v0, "warning: pthread_setaffinity_np() failed: %s\n", v1); }
ggml_graph_compute.cold.1: PUSH RBX MOV RAX,qword ptr [0x0015bfb8] MOV RBX,qword ptr [RAX] CALL 0x0010a260 LEA RSI,[0x1498f1] MOV RDI,RBX MOV RDX,RAX XOR EAX,EAX CALL 0x0010ac80 POP RBX RET
void ggml_graph_compute_cold_1(int param_1) { FILE *__stream; char *pcVar1; __stream = *(FILE **)PTR_stderr_0015bfb8; pcVar1 = strerror(param_1); fprintf(__stream,"warning: pthread_setaffinity_np() failed: %s\n",pcVar1); return; }
6,625
long minja::Value::get<long>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, long) const
monkey531[P]llama/common/minja.hpp
T get(const std::string & key, T default_value) const { if (!contains(key)) return default_value; return at(key).get<T>(); }
O0
cpp
long minja::Value::get<long>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, long) const: subq $0xb8, %rsp movq %rcx, 0x18(%rsp) movq %rdi, 0x20(%rsp) movq %rdi, %rax movq %rax, 0x28(%rsp) movq %rdi, 0xb0(%rsp) movq %rsi, 0xa8(%rsp) movq %rdx, 0xa0(%rsp) movq %rcx, 0x98(%rsp) movq 0xa8(%rsp), %rdi movq %rdi, 0x30(%rsp) movq 0xa0(%rsp), %rsi callq 0x114300 testb $0x1, %al jne 0x1577b8 movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdi callq 0x56e70 jmp 0x15781c movq 0xa0(%rsp), %rsi leaq 0x48(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0xe6d40 movq 0x30(%rsp), %rdi movq 0x8(%rsp), %rsi callq 0x154250 movq %rax, 0x10(%rsp) jmp 0x1577e5 movq 0x10(%rsp), %rsi movq 0x20(%rsp), %rdi callq 0xe13c0 jmp 0x1577f6 leaq 0x48(%rsp), %rdi callq 0xdc630 jmp 0x15781c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x40(%rsp) movl %eax, 0x3c(%rsp) leaq 0x48(%rsp), %rdi callq 0xdc630 jmp 0x157829 movq 0x28(%rsp), %rax addq $0xb8, %rsp retq movq 0x40(%rsp), %rdi callq 0x56a10 nopw %cs:(%rax,%rax) nopl (%rax)
_ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_RKS7_S8_: sub rsp, 0B8h mov qword ptr [rsp+0B8h+var_A0], rcx; int mov qword ptr [rsp+0B8h+var_98], rdi; __int16 mov rax, rdi mov [rsp+0B8h+var_90], rax; __int64 mov [rsp+0B8h+var_8], rdi mov qword ptr [rsp+0B8h+var_10], rsi mov [rsp+0B8h+var_18], rdx mov [rsp+0B8h+var_20], rcx mov rdi, qword ptr [rsp+0B8h+var_10] mov [rsp+0B8h+var_88], rdi; char mov rsi, [rsp+0B8h+var_18] call _ZNK5minja5Value8containsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::contains(std::string const&) test al, 1 jnz short loc_1577B8 mov rsi, qword ptr [rsp+0B8h+var_A0] mov rdi, qword ptr [rsp+0B8h+var_98] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EOS4_; std::string::basic_string(std::string&&) jmp short loc_15781C loc_1577B8: mov rsi, [rsp+0B8h+var_18] lea rdi, [rsp+0B8h+var_70] mov [rsp+0B8h+var_B0], rdi; int call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rdi, [rsp+0B8h+var_88]; this mov rsi, [rsp+0B8h+var_B0]; minja::Value * call _ZNK5minja5Value2atERKS0_; minja::Value::at(minja::Value const&) mov qword ptr [rsp+0B8h+var_A8], rax; int jmp short $+2 loc_1577E5: mov rsi, qword ptr [rsp+0B8h+var_A8]; int mov rdi, qword ptr [rsp+0B8h+var_98]; int call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void) jmp short $+2 loc_1577F6: lea rdi, [rsp+0B8h+var_70]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_15781C mov rcx, rax mov eax, edx mov [rsp+arg_38], rcx mov [rsp+arg_34], eax lea rdi, [rsp+arg_40]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_157829 loc_15781C: mov rax, [rsp+0B8h+var_90] add rsp, 0B8h retn loc_157829: mov rdi, [rsp+arg_38] call __Unwind_Resume
void * minja::Value::get<std::string>(void *a1, minja::Value *a2, long long a3, long long a4) { long long v4; // rdx long long v5; // rcx long long v6; // r8 long long v7; // r9 minja::Value *v9; // [rsp+10h] [rbp-A8h] int v11[20]; // [rsp+48h] [rbp-70h] BYREF long long v12; // [rsp+98h] [rbp-20h] long long v13; // [rsp+A0h] [rbp-18h] char v14[8]; // [rsp+A8h] [rbp-10h] void *v15; // [rsp+B0h] [rbp-8h] v15 = a1; *(_QWORD *)v14 = a2; v13 = a3; v12 = a4; if ( minja::Value::contains((long long)a2, a3) ) { minja::Value::Value((long long)v11, v13); v9 = (minja::Value *)minja::Value::at(a2, (const minja::Value *)v11); minja::Value::get<std::string>(a1, v9); minja::Value::~Value((minja::Value *)v11); } else { std::string::basic_string(a1, a4, v4, v5, v6, v7); } return a1; }
6,626
long minja::Value::get<long>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, long) const
monkey531[P]llama/common/minja.hpp
T get(const std::string & key, T default_value) const { if (!contains(key)) return default_value; return at(key).get<T>(); }
O3
cpp
long minja::Value::get<long>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, long) const: pushq %r15 pushq %r14 pushq %rbx subq $0x50, %rsp movl %edx, %ebx movq %rsi, %r15 movq %rdi, %r14 callq 0x676c8 testb %al, %al je 0x881ac movq %rsp, %rbx movq %rbx, %rdi movq %r15, %rsi callq 0x55588 movq %r14, %rdi movq %rbx, %rsi callq 0x6726a movq %rax, %rdi callq 0x52550 movl %eax, %ebx leaq 0x40(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x5099a movq %r14, %rdi callq 0x5d0d4 movq -0x8(%r14), %rdi testq %rdi, %rdi je 0x88158 callq 0x31b9a movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x88167 callq 0x31b9a movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x88176 callq 0x31b9a movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x881ac movq 0x68e11(%rip), %rax # 0xf0f98 cmpb $0x0, (%rax) je 0x88197 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x881a1 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x881ac movq (%rdi), %rax callq *0x18(%rax) movl %ebx, %eax addq $0x50, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq %rsp, %rdi callq 0x5090e movq %rbx, %rdi callq 0x19dc0 nop
_ZNK5minja5Value3getIbEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES2_: push r15 push r14 push rbx sub rsp, 50h mov ebx, edx mov r15, rsi mov r14, rdi call _ZNK5minja5Value8containsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::contains(std::string const&) test al, al jz loc_881AC mov rbx, rsp mov rdi, rbx mov rsi, r15 call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rdi, r14; this mov rsi, rbx; minja::Value * call _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&) mov rdi, rax call _ZNK5minja5Value3getIbEET_v; minja::Value::get<bool>(void) mov ebx, eax lea r14, [rsp+68h+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() mov rdi, [r14-8] test rdi, rdi jz short loc_88158 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_88158: mov rdi, [rsp+68h+var_40] test rdi, rdi jz short loc_88167 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_88167: mov rdi, [rsp+68h+var_50] test rdi, rdi jz short loc_88176 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_88176: mov rdi, [rsp+68h+var_60] test rdi, rdi jz short loc_881AC mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_88197 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_881A1 loc_88197: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_881A1: cmp eax, 1 jnz short loc_881AC mov rax, [rdi] call qword ptr [rax+18h] loc_881AC: mov eax, ebx add rsp, 50h pop rbx pop r14 pop r15 retn mov rbx, rax mov rdi, rsp; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() mov rdi, rbx call __Unwind_Resume
long long minja::Value::get<bool>(minja::Value *this, long long a2, unsigned int a3) { _QWORD *v4; // rax unsigned int v5; // eax long long v6; // rdi signed __int32 v7; // eax __int128 v9; // [rsp+0h] [rbp-68h] BYREF volatile signed __int32 *v10; // [rsp+18h] [rbp-50h] volatile signed __int32 *v11; // [rsp+28h] [rbp-40h] volatile signed __int32 *v12; // [rsp+38h] [rbp-30h] void **v13[5]; // [rsp+40h] [rbp-28h] BYREF if ( minja::Value::contains((long long)this) ) { minja::Value::Value(&v9); v4 = (_QWORD *)minja::Value::at(this, (const minja::Value *)&v9); LOBYTE(v5) = minja::Value::get<bool>(v4); a3 = v5; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v13); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v13); if ( v12 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v12); if ( v11 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11); if ( v10 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v10); v6 = *((_QWORD *)&v9 + 1); if ( *((_QWORD *)&v9 + 1) ) { if ( _libc_single_threaded ) { v7 = *(_DWORD *)(*((_QWORD *)&v9 + 1) + 12LL); *(_DWORD *)(*((_QWORD *)&v9 + 1) + 12LL) = v7 - 1; } else { v7 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v9 + 1) + 12LL), 0xFFFFFFFF); } if ( v7 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v6 + 24LL))(v6, 0LL); } } return a3; }
get<bool>: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x50 MOV EBX,EDX MOV R15,RSI MOV R14,RDI CALL 0x001676c8 TEST AL,AL JZ 0x001881ac MOV RBX,RSP MOV RDI,RBX MOV RSI,R15 CALL 0x00155588 LAB_0018811e: MOV RDI,R14 MOV RSI,RBX CALL 0x0016726a MOV RDI,RAX CALL 0x00152550 LAB_00188131: MOV EBX,EAX LEA R14,[RSP + 0x40] MOV RDI,R14 XOR ESI,ESI CALL 0x0015099a MOV RDI,R14 CALL 0x0015d0d4 MOV RDI,qword ptr [R14 + -0x8] TEST RDI,RDI JZ 0x00188158 CALL 0x00131b9a LAB_00188158: MOV RDI,qword ptr [RSP + 0x28] TEST RDI,RDI JZ 0x00188167 CALL 0x00131b9a LAB_00188167: MOV RDI,qword ptr [RSP + 0x18] TEST RDI,RDI JZ 0x00188176 CALL 0x00131b9a LAB_00188176: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x001881ac MOV RAX,qword ptr [0x001f0f98] CMP byte ptr [RAX],0x0 JZ 0x00188197 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001881a1 LAB_00188197: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001881a1: CMP EAX,0x1 JNZ 0x001881ac MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001881ac: MOV EAX,EBX ADD RSP,0x50 POP RBX POP R14 POP R15 RET
/* bool minja::Value::get<bool>(std::__cxx11::string const&, bool) const */ bool __thiscall minja::Value::get<bool>(Value *this,string *param_1,bool param_2) { int *piVar1; char cVar2; int iVar3; Value *this_00; Value aVStack_68 [8]; long *local_60; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_50; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_30; data local_28 [16]; cVar2 = contains(this,param_1); if (cVar2 != '\0') { Value(aVStack_68,param_1); /* try { // try from 0018811e to 00188130 has its CatchHandler @ 001881b8 */ this_00 = (Value *)at(this,aVStack_68); param_2 = get<bool>(this_00); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_28,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_28); if (local_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_30); } if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40); } if (local_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_50); } if (local_60 != (long *)0x0) { if (*PTR___libc_single_threaded_001f0f98 == '\0') { LOCK(); piVar1 = (int *)((long)local_60 + 0xc); iVar3 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar3 = *(int *)((long)local_60 + 0xc); *(int *)((long)local_60 + 0xc) = iVar3 + -1; } if (iVar3 == 1) { (**(code **)(*local_60 + 0x18))(); } } } return param_2; }
6,627
maria_ftparser_alloc_param
eloqsql/storage/maria/ma_ft_parser.c
MYSQL_FTPARSER_PARAM* maria_ftparser_alloc_param(MARIA_HA *info) { if (!info->ftparser_param) { /* . info->ftparser_param can not be zero after the initialization, because it always includes built-in fulltext parser. And built-in parser can be called even if the table has no fulltext indexes and no varchar/text fields. ftb_find_relevance... parser (ftb_find_relevance_parse, ftb_find_relevance_add_word) calls ftb_check_phrase... parser (ftb_check_phrase_internal, ftb_phrase_add_word). Thus MAX_PARAM_NR=2. */ info->ftparser_param= (MYSQL_FTPARSER_PARAM *) my_malloc(PSI_INSTRUMENT_ME, MAX_PARAM_NR * sizeof(MYSQL_FTPARSER_PARAM) * info->s->ftkeys, MYF(MY_WME | MY_ZEROFILL)); init_alloc_root(PSI_INSTRUMENT_ME, &info->ft_memroot, FTPARSER_MEMROOT_ALLOC_SIZE, 0, MYF(0)); } return info->ftparser_param; }
O3
c
maria_ftparser_alloc_param: movq 0x368(%rdi), %rax testq %rax, %rax je 0x4280a retq pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx movq (%rdi), %rax movl 0x748(%rax), %esi shlq $0x7, %rsi movl $0x30, %edx xorl %edi, %edi callq 0x9f6e1 movq %rax, 0x368(%rbx) leaq 0x328(%rbx), %rsi movl $0x10000, %edx # imm = 0x10000 xorl %edi, %edi xorl %ecx, %ecx xorl %r8d, %r8d callq 0x9c474 movq 0x368(%rbx), %rax addq $0x8, %rsp popq %rbx popq %rbp retq
maria_ftparser_alloc_param: mov rax, [rdi+368h] test rax, rax jz short loc_4280A retn loc_4280A: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi mov rax, [rdi] mov esi, [rax+748h] shl rsi, 7 mov edx, 30h ; '0' xor edi, edi call my_malloc mov [rbx+368h], rax lea rsi, [rbx+328h] mov edx, 10000h xor edi, edi xor ecx, ecx xor r8d, r8d call init_alloc_root mov rax, [rbx+368h] add rsp, 8 pop rbx pop rbp retn
long long maria_ftparser_alloc_param(_QWORD *a1) { long long result; // rax result = a1[109]; if ( !result ) { a1[109] = my_malloc(0LL, (unsigned long long)*(unsigned int *)(*a1 + 1864LL) << 7, 48LL); init_alloc_root(0LL, a1 + 101, 0x10000LL, 0LL, 0LL); return a1[109]; } return result; }
maria_ftparser_alloc_param: MOV RAX,qword ptr [RDI + 0x368] TEST RAX,RAX JZ 0x0014280a RET LAB_0014280a: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI MOV RAX,qword ptr [RDI] MOV ESI,dword ptr [RAX + 0x748] SHL RSI,0x7 MOV EDX,0x30 XOR EDI,EDI CALL 0x0019f6e1 MOV qword ptr [RBX + 0x368],RAX LEA RSI,[RBX + 0x328] MOV EDX,0x10000 XOR EDI,EDI XOR ECX,ECX XOR R8D,R8D CALL 0x0019c474 MOV RAX,qword ptr [RBX + 0x368] ADD RSP,0x8 POP RBX POP RBP RET
long maria_ftparser_alloc_param(long *param_1) { long lVar1; int8 in_R9; long lVar2; lVar2 = param_1[0x6d]; if (lVar2 != 0) { return lVar2; } lVar1 = my_malloc(0,(ulong)*(uint *)(*param_1 + 0x748) << 7,0x30); param_1[0x6d] = lVar1; init_alloc_root(0,param_1 + 0x65,0x10000,0,0,in_R9,lVar2); return param_1[0x6d]; }
6,628
pvio_socket_shutdown
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
int pvio_socket_shutdown(MARIADB_PVIO *pvio) { if (pvio && pvio->data) { my_socket s = ((struct st_pvio_socket *)pvio->data)->socket; #ifdef _WIN32 shutdown(s, SD_BOTH); CancelIoEx((HANDLE)s, NULL); #else shutdown(s, SHUT_RDWR); #endif } return -1; }
O0
c
pvio_socket_shutdown: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) je 0x3f746 movq -0x8(%rbp), %rax cmpq $0x0, (%rax) je 0x3f746 movq -0x8(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0xc(%rbp) movl -0xc(%rbp), %edi movl $0x2, %esi callq 0x125a0 movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
pvio_socket_shutdown: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi cmp [rbp+var_8], 0 jz short loc_3F746 mov rax, [rbp+var_8] cmp qword ptr [rax], 0 jz short loc_3F746 mov rax, [rbp+var_8] mov rax, [rax] mov eax, [rax] mov [rbp+var_C], eax mov edi, [rbp+var_C] mov esi, 2 call _shutdown loc_3F746: mov eax, 0FFFFFFFFh add rsp, 10h pop rbp retn
long long pvio_socket_shutdown(_QWORD *a1) { if ( a1 && *a1 ) shutdown(*(unsigned int *)*a1, 2LL); return 0xFFFFFFFFLL; }
pvio_socket_shutdown: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI CMP qword ptr [RBP + -0x8],0x0 JZ 0x0013f746 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX],0x0 JZ 0x0013f746 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0xc],EAX MOV EDI,dword ptr [RBP + -0xc] MOV ESI,0x2 CALL 0x001125a0 LAB_0013f746: MOV EAX,0xffffffff ADD RSP,0x10 POP RBP RET
int8 pvio_socket_shutdown(long *param_1) { if ((param_1 != (long *)0x0) && (*param_1 != 0)) { shutdown(*(int *)*param_1,2); } return 0xffffffff; }
6,629
my_hash_sort_utf8mb3
eloqsql/strings/ctype-utf8.c
static void my_hash_sort_utf8mb3(CHARSET_INFO *cs, const uchar *s, size_t slen, ulong *nr1, ulong *nr2) { /* Remove end space. We have to do this to be able to compare 'A ' and 'A' as identical */ const uchar *e= skip_trailing_space(s, slen); my_hash_sort_utf8mb3_nopad(cs, s, e - s, nr1, nr2); }
O3
c
my_hash_sort_utf8mb3: pushq %rbp movq %rsp, %rbp leaq (%rsi,%rdx), %r10 cmpq $0x15, %rdx jb 0xccde3 movq %r10, %r9 andq $-0x4, %r9 cmpq %rsi, %r9 jbe 0xccde3 leaq 0x3(%rsi), %rdx andq $-0x4, %rdx movq %r10, %rax movb -0x1(%r10), %r11b cmpq %r9, %r10 jbe 0xcce08 leaq -0x1(%rax), %r10 cmpb $0x20, %r11b je 0xccdcb jmp 0xccde6 movq %r10, %rax movq %rax, %r9 subq %rsi, %r9 movq %r9, %rdx cmpq %rsi, %rax jbe 0xcce02 cmpb $0x20, -0x1(%rax) leaq -0x1(%rax), %rax leaq -0x1(%rdx), %r9 je 0xccdec popq %rbp jmp 0xccfed cmpb $0x20, %r11b setne %r10b cmpq %r9, %rdx setae %r9b orb %r10b, %r9b jne 0xccde6 movq %rax, %r9 movq %r9, %rax cmpq %rdx, %r9 jbe 0xccde6 leaq -0x4(%rax), %r9 cmpl $0x20202020, -0x4(%rax) # imm = 0x20202020 je 0xcce1f jmp 0xccde6
my_hash_sort_utf8mb3: push rbp mov rbp, rsp lea r10, [rsi+rdx] cmp rdx, 15h jb short loc_CCDE3 mov r9, r10 and r9, 0FFFFFFFFFFFFFFFCh cmp r9, rsi jbe short loc_CCDE3 lea rdx, [rsi+3] and rdx, 0FFFFFFFFFFFFFFFCh loc_CCDCB: mov rax, r10 mov r11b, [r10-1] cmp r10, r9 jbe short loc_CCE08 lea r10, [rax-1] cmp r11b, 20h ; ' ' jz short loc_CCDCB jmp short loc_CCDE6 loc_CCDE3: mov rax, r10 loc_CCDE6: mov r9, rax sub r9, rsi loc_CCDEC: mov rdx, r9 cmp rax, rsi jbe short loc_CCE02 cmp byte ptr [rax-1], 20h ; ' ' lea rax, [rax-1] lea r9, [rdx-1] jz short loc_CCDEC loc_CCE02: pop rbp jmp my_hash_sort_utf8mb3_nopad loc_CCE08: cmp r11b, 20h ; ' ' setnz r10b cmp rdx, r9 setnb r9b or r9b, r10b jnz short loc_CCDE6 mov r9, rax loc_CCE1F: mov rax, r9 cmp r9, rdx jbe short loc_CCDE6 lea r9, [rax-4] cmp dword ptr [rax-4], 20202020h jz short loc_CCE1F jmp short loc_CCDE6
long long my_hash_sort_utf8mb3(long long a1, unsigned long long a2, unsigned long long a3, long long a4, long long a5) { unsigned long long v5; // r10 unsigned long long v6; // r9 unsigned long long v7; // rdx unsigned long long v8; // rax char v9; // r11 unsigned long long v10; // r9 unsigned long long v11; // rdx bool v12; // zf unsigned long long v14; // r9 v5 = a2 + a3; if ( a3 < 0x15 || (v6 = v5 & 0xFFFFFFFFFFFFFFFCLL, (v5 & 0xFFFFFFFFFFFFFFFCLL) <= a2) ) { v8 = a2 + a3; } else { v7 = (a2 + 3) & 0xFFFFFFFFFFFFFFFCLL; while ( 1 ) { v8 = v5; v9 = *(_BYTE *)(v5 - 1); if ( v5 <= v6 ) break; --v5; if ( v9 != 32 ) goto LABEL_8; } if ( v9 == 32 && v7 < v6 ) { v14 = v5; do { v8 = v14; if ( v14 <= v7 ) break; v14 -= 4LL; } while ( *(_DWORD *)(v8 - 4) == 538976288 ); } } LABEL_8: v10 = v8 - a2; do { v11 = v10; if ( v8 <= a2 ) break; v12 = *(_BYTE *)--v8 == 32; --v10; } while ( v12 ); return my_hash_sort_utf8mb3_nopad(a1, a2, v11, a4, a5, v10); }
my_hash_sort_utf8mb3: PUSH RBP MOV RBP,RSP LEA R10,[RSI + RDX*0x1] CMP RDX,0x15 JC 0x001ccde3 MOV R9,R10 AND R9,-0x4 CMP R9,RSI JBE 0x001ccde3 LEA RDX,[RSI + 0x3] AND RDX,-0x4 LAB_001ccdcb: MOV RAX,R10 MOV R11B,byte ptr [R10 + -0x1] CMP R10,R9 JBE 0x001cce08 LEA R10,[RAX + -0x1] CMP R11B,0x20 JZ 0x001ccdcb JMP 0x001ccde6 LAB_001ccde3: MOV RAX,R10 LAB_001ccde6: MOV R9,RAX SUB R9,RSI LAB_001ccdec: MOV RDX,R9 CMP RAX,RSI JBE 0x001cce02 CMP byte ptr [RAX + -0x1],0x20 LEA RAX,[RAX + -0x1] LEA R9,[RDX + -0x1] JZ 0x001ccdec LAB_001cce02: POP RBP JMP 0x001ccfed LAB_001cce08: CMP R11B,0x20 SETNZ R10B CMP RDX,R9 SETNC R9B OR R9B,R10B JNZ 0x001ccde6 MOV R9,RAX LAB_001cce1f: MOV RAX,R9 CMP R9,RDX JBE 0x001ccde6 LEA R9,[RAX + -0x4] CMP dword ptr [RAX + -0x4],0x20202020 JZ 0x001cce1f JMP 0x001ccde6
void my_hash_sort_utf8mb3(int8 param_1,ulong param_2,ulong param_3) { char *pcVar1; ulong uVar2; ulong uVar3; ulong uVar4; ulong uVar5; uVar3 = param_2 + param_3; if ((0x14 < param_3) && (uVar5 = uVar3 & 0xfffffffffffffffc, param_2 < uVar5)) { uVar4 = param_2 + 3 & 0xfffffffffffffffc; uVar2 = uVar3; do { uVar3 = uVar2; if (uVar3 <= uVar5) { uVar2 = uVar3; if (uVar4 < uVar5 && *(char *)(uVar3 - 1) == ' ') goto LAB_001cce1f; break; } uVar2 = uVar3 - 1; } while (*(char *)(uVar3 - 1) == ' '); } goto LAB_001ccdec; while (uVar2 = uVar3 - 4, *(int *)(uVar3 - 4) == 0x20202020) { LAB_001cce1f: uVar3 = uVar2; if (uVar3 <= uVar4) break; } LAB_001ccdec: do { if (uVar3 <= param_2) break; pcVar1 = (char *)(uVar3 - 1); uVar3 = uVar3 - 1; } while (*pcVar1 == ' '); my_hash_sort_utf8mb3_nopad(); return; }
6,630
my_vfprintf
eloqsql/strings/my_vsnprintf.c
int my_vfprintf(FILE *stream, const char* format, va_list args) { char cvtbuf[1024]; int alloc= 0; char *p= cvtbuf; size_t cur_len= sizeof(cvtbuf), actual; int ret; /* We do not know how much buffer we need. So start with a reasonably-sized stack-allocated buffer, and increase it exponentially until it is big enough. */ for (;;) { size_t new_len; actual= my_vsnprintf(p, cur_len, format, args); if (actual < cur_len - 1) break; /* Not enough space (or just enough with nothing to spare - but we cannot distinguish this case from the return value). Allocate a bigger buffer and try again. */ if (alloc) my_free(p); else alloc= 1; new_len= cur_len*2; if (new_len < cur_len) return 0; /* Overflow */ cur_len= new_len; p= my_malloc(PSI_INSTRUMENT_ME, cur_len, MYF(MY_FAE)); if (!p) return 0; } ret= (int) actual; if (fputs(p, stream) < 0) ret= -1; if (alloc) my_free(p); return ret; }
O3
c
my_vfprintf: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x418, %rsp # imm = 0x418 movq %rdx, -0x440(%rbp) movq %rsi, %r12 movq %rdi, -0x438(%rbp) movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movb $0x1, %bl movl $0x400, %r13d # imm = 0x400 leaq -0x430(%rbp), %r14 leaq 0x2d4fcc(%rip), %rdi # 0x3abf20 movq %r14, %rsi movq %r13, %rdx movq %r12, %rcx movq -0x440(%rbp), %r8 callq 0xd5ca4 movq %rax, %r15 leaq -0x1(%r13), %rax cmpq %rax, %r15 jb 0xd6fa5 testb $0x1, %bl jne 0xd6f82 movq %r14, %rdi callq 0xa00ca testq %r13, %r13 js 0xd6fd2 addq %r13, %r13 xorl %ebx, %ebx movl $0x8, %edx xorl %edi, %edi movq %r13, %rsi callq 0x9fe9d movq %rax, %r14 testq %rax, %rax jne 0xd6f4d jmp 0xd6fd4 movq %r14, %rdi movq -0x438(%rbp), %rsi callq 0x292c0 testl %eax, %eax movl $0xffffffff, %r12d # imm = 0xFFFFFFFF cmovnsl %r15d, %r12d testb $0x1, %bl jne 0xd6fcd movq %r14, %rdi callq 0xa00ca movl %r12d, %ebx jmp 0xd6fd4 xorl %ebx, %ebx movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0xd6ff7 movl %ebx, %eax addq $0x418, %rsp # imm = 0x418 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29250
my_vfprintf: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 418h mov [rbp+var_440], rdx mov r12, rsi mov [rbp+var_438], rdi mov rax, fs:28h mov [rbp+var_30], rax mov bl, 1 mov r13d, 400h lea r14, [rbp+var_430] loc_D6F4D: lea rdi, my_charset_latin1 mov rsi, r14 mov rdx, r13 mov rcx, r12 mov r8, [rbp+var_440] call my_vsnprintf_ex mov r15, rax lea rax, [r13-1] cmp r15, rax jb short loc_D6FA5 test bl, 1 jnz short loc_D6F82 mov rdi, r14 call my_free loc_D6F82: test r13, r13 js short loc_D6FD2 add r13, r13 xor ebx, ebx mov edx, 8 xor edi, edi mov rsi, r13 call my_malloc mov r14, rax test rax, rax jnz short loc_D6F4D jmp short loc_D6FD4 loc_D6FA5: mov rdi, r14 mov rsi, [rbp+var_438] call _fputs test eax, eax mov r12d, 0FFFFFFFFh cmovns r12d, r15d test bl, 1 jnz short loc_D6FCD mov rdi, r14 call my_free loc_D6FCD: mov ebx, r12d jmp short loc_D6FD4 loc_D6FD2: xor ebx, ebx loc_D6FD4: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_D6FF7 mov eax, ebx add rsp, 418h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_D6FF7: call ___stack_chk_fail
long long my_vfprintf(long long a1, unsigned __int8 *a2, unsigned int *a3) { unsigned int v3; // ebx long long v4; // r13 char *v5; // r14 unsigned long long v6; // r15 unsigned int v7; // r12d char v10; // [rsp+10h] [rbp-430h] BYREF unsigned long long v11; // [rsp+410h] [rbp-30h] v11 = __readfsqword(0x28u); LOBYTE(v3) = 1; v4 = 1024LL; v5 = &v10; while ( 1 ) { v6 = my_vsnprintf_ex((long long)my_charset_latin1, (unsigned long long)v5, v4, a2, a3); if ( v6 < v4 - 1 ) break; if ( (v3 & 1) == 0 ) my_free((long long)v5); if ( v4 < 0 ) return 0; v4 *= 2LL; v3 = 0; v5 = (char *)my_malloc(0, v4, 8); if ( !v5 ) return v3; } v7 = -1; if ( (int)fputs(v5, a1) >= 0 ) v7 = v6; if ( (v3 & 1) == 0 ) my_free((long long)v5); return v7; }
my_vfprintf: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x418 MOV qword ptr [RBP + -0x440],RDX MOV R12,RSI MOV qword ptr [RBP + -0x438],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV BL,0x1 MOV R13D,0x400 LEA R14,[RBP + -0x430] LAB_001d6f4d: LEA RDI,[0x4abf20] MOV RSI,R14 MOV RDX,R13 MOV RCX,R12 MOV R8,qword ptr [RBP + -0x440] CALL 0x001d5ca4 MOV R15,RAX LEA RAX,[R13 + -0x1] CMP R15,RAX JC 0x001d6fa5 TEST BL,0x1 JNZ 0x001d6f82 MOV RDI,R14 CALL 0x001a00ca LAB_001d6f82: TEST R13,R13 JS 0x001d6fd2 ADD R13,R13 XOR EBX,EBX MOV EDX,0x8 XOR EDI,EDI MOV RSI,R13 CALL 0x0019fe9d MOV R14,RAX TEST RAX,RAX JNZ 0x001d6f4d JMP 0x001d6fd4 LAB_001d6fa5: MOV RDI,R14 MOV RSI,qword ptr [RBP + -0x438] CALL 0x001292c0 TEST EAX,EAX MOV R12D,0xffffffff CMOVNS R12D,R15D TEST BL,0x1 JNZ 0x001d6fcd MOV RDI,R14 CALL 0x001a00ca LAB_001d6fcd: MOV EBX,R12D JMP 0x001d6fd4 LAB_001d6fd2: XOR EBX,EBX LAB_001d6fd4: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001d6ff7 MOV EAX,EBX ADD RSP,0x418 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001d6ff7: CALL 0x00129250
ulong my_vfprintf(FILE *param_1,int8 param_2,int8 param_3) { int iVar1; ulong uVar2; char *__s; ulong uVar3; ulong uVar4; long lVar5; long in_FS_OFFSET; char local_438 [1024]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); lVar5 = 0x400; __s = local_438; uVar3 = 1; do { uVar2 = my_vsnprintf_ex(&my_charset_latin1,__s,lVar5,param_2,param_3); if (uVar2 < lVar5 - 1U) { iVar1 = fputs(__s,param_1); uVar4 = 0xffffffff; if (-1 < iVar1) { uVar4 = uVar2 & 0xffffffff; } if (uVar3 == 0) { my_free(__s); } break; } if ((char)uVar3 == '\0') { my_free(__s); } if (lVar5 < 0) { uVar4 = 0; break; } lVar5 = lVar5 * 2; uVar4 = 0; __s = (char *)my_malloc(0,lVar5,8); uVar3 = uVar4; } while (__s != (char *)0x0); if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar4; }
6,631
translog_wait_for_writers
eloqsql/storage/maria/ma_loghandler.c
static void translog_wait_for_writers(struct st_translog_buffer *buffer) { DBUG_ENTER("translog_wait_for_writers"); DBUG_PRINT("enter", ("Buffer #%u %p copies in progress: %u " "is closing %u File: %d size: %lu", (uint) buffer->buffer_no, buffer, (uint) buffer->copy_to_buffer_in_progress, (uint) buffer->is_closing_buffer, (buffer->file ? buffer->file->handler.file : -1), (ulong) buffer->size)); translog_buffer_lock_assert_owner(buffer); while (buffer->copy_to_buffer_in_progress) { DBUG_PRINT("info", ("wait for writers... buffer: #%u %p", (uint) buffer->buffer_no, buffer)); DBUG_ASSERT(buffer->file != NULL); mysql_cond_wait(&buffer->waiting_filling_buffer, &buffer->mutex); DBUG_PRINT("info", ("wait for writers done buffer: #%u %p", (uint) buffer->buffer_no, buffer)); } DBUG_VOID_RETURN; }
O3
c
translog_wait_for_writers: cmpl $0x0, 0x100078(%rdi) je 0x3b4ad pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdi, %rbx leaq 0x100040(%rdi), %r14 leaq 0x100090(%rdi), %r15 leaq 0xa5bd4(%rip), %r12 # 0xe1044 cmpq $0x0, 0x100070(%rbx) jne 0x3b490 movq %r14, %rdi movq %r15, %rsi callq 0x2a460 cmpl $0x0, 0x100078(%rbx) jne 0x3b470 jmp 0x3b4a5 movq %r14, %rdi movq %r15, %rsi movq %r12, %rdx movl $0x806, %ecx # imm = 0x806 callq 0x30914 jmp 0x3b485 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
translog_wait_for_writers: cmp ds:dword_100078[rdi], 0 jz short locret_3B4AD push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rdi lea r14, unk_100040[rdi] lea r15, unk_100090[rdi] lea r12, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... loc_3B470: cmp ds:qword_100070[rbx], 0 jnz short loc_3B490 mov rdi, r14 mov rsi, r15 call _pthread_cond_wait loc_3B485: cmp ds:dword_100078[rbx], 0 jnz short loc_3B470 jmp short loc_3B4A5 loc_3B490: mov rdi, r14 mov rsi, r15 mov rdx, r12 mov ecx, 806h call psi_cond_wait jmp short loc_3B485 loc_3B4A5: pop rbx pop r12 pop r14 pop r15 pop rbp locret_3B4AD: retn
long long translog_wait_for_writers(long long a1) { char *v1; // r14 char *v2; // r15 long long result; // rax if ( *(int *)((char *)&dword_100078 + a1) ) { v1 = (char *)&unk_100040 + a1; v2 = (char *)&unk_100090 + a1; do { if ( *(long long *)((char *)&qword_100070 + a1) ) result = psi_cond_wait( (long long)v1, (long long)v2, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0x806u); else result = pthread_cond_wait(v1, v2); } while ( *(int *)((char *)&dword_100078 + a1) ); } return result; }
translog_wait_for_writers: CMP dword ptr [RDI + 0x100078],0x0 JZ 0x0013b4ad PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDI LEA R14,[RDI + 0x100040] LEA R15,[RDI + 0x100090] LEA R12,[0x1e1044] LAB_0013b470: CMP qword ptr [RBX + 0x100070],0x0 JNZ 0x0013b490 MOV RDI,R14 MOV RSI,R15 CALL 0x0012a460 LAB_0013b485: CMP dword ptr [RBX + 0x100078],0x0 JNZ 0x0013b470 JMP 0x0013b4a5 LAB_0013b490: MOV RDI,R14 MOV RSI,R15 MOV RDX,R12 MOV ECX,0x806 CALL 0x00130914 JMP 0x0013b485 LAB_0013b4a5: POP RBX POP R12 POP R14 POP R15 POP RBP LAB_0013b4ad: RET
void translog_wait_for_writers(long param_1) { pthread_cond_t *__cond; pthread_mutex_t *__mutex; if (*(int *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_type + param_1) != 0) { __cond = (pthread_cond_t *)((long)&Elf64_Phdr_ARRAY_00100040[0].p_type + param_1); __mutex = (pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + param_1); do { if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[0].p_align + param_1) == 0) { pthread_cond_wait(__cond,__mutex); } else { psi_cond_wait(__cond,__mutex, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0x806 ); } } while (*(int *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_type + param_1) != 0); } return; }
6,632
wake_up_waiters
eloqsql/mysys/thr_lock.c
static void wake_up_waiters(THR_LOCK *lock) { THR_LOCK_DATA *data; enum thr_lock_type lock_type; DBUG_ENTER("wake_up_waiters"); check_locks(lock, "before waking up waiters", TL_UNLOCK, 1); if (!lock->write.data) /* If no active write locks */ { data=lock->write_wait.data; if (!lock->read.data) /* If no more locks in use */ { /* Release write-locks with TL_WRITE or TL_WRITE_ONLY priority first */ if (data && (data->type != TL_WRITE_LOW_PRIORITY || !lock->read_wait.data || lock->read_wait.data->type < TL_READ_HIGH_PRIORITY)) { if (lock->write_lock_count++ > max_write_lock_count) { /* Too many write locks in a row; Release all waiting read locks */ lock->write_lock_count=0; if (lock->read_wait.data) { DBUG_PRINT("info",("Freeing all read_locks because of max_write_lock_count")); free_all_read_locks(lock,0); goto end; } } for (;;) { if (((*data->prev)=data->next)) /* remove from wait-list */ data->next->prev= data->prev; else lock->write_wait.last=data->prev; (*lock->write.last)=data; /* Put in execute list */ data->prev=lock->write.last; data->next=0; lock->write.last= &data->next; if (data->type == TL_WRITE_CONCURRENT_INSERT && (*lock->check_status)(data->status_param)) data->type=TL_WRITE; /* Upgrade lock */ /* purecov: begin inspected */ DBUG_PRINT("lock",("giving write lock of type %d to thread: %lu", data->type, (ulong) data->owner->thread_id)); /* purecov: end */ { mysql_cond_t *cond= data->cond; data->cond=0; /* Mark thread free */ mysql_cond_signal(cond); /* Start waiting thread */ } if (data->type != TL_WRITE_ALLOW_WRITE || !lock->write_wait.data || lock->write_wait.data->type != TL_WRITE_ALLOW_WRITE) break; data=lock->write_wait.data; /* Free this too */ } if (data->type >= TL_WRITE_LOW_PRIORITY) goto end; /* Release possible read locks together with the write lock */ } if (lock->read_wait.data) free_all_read_locks(lock, data && (data->type == TL_WRITE_CONCURRENT_INSERT || data->type == TL_WRITE_ALLOW_WRITE)); else { DBUG_PRINT("lock",("No waiting read locks to free")); } } else if (data && (lock_type=data->type) <= TL_WRITE_DELAYED && ((lock_type != TL_WRITE_CONCURRENT_INSERT && lock_type != TL_WRITE_ALLOW_WRITE) || !lock->read_no_write_count)) { /* For DELAYED, ALLOW_READ, WRITE_ALLOW_WRITE or CONCURRENT_INSERT locks start WRITE locks together with the READ locks */ if (lock_type == TL_WRITE_CONCURRENT_INSERT && (*lock->check_status)(data->status_param)) { data->type=TL_WRITE; /* Upgrade lock */ if (lock->read_wait.data) free_all_read_locks(lock,0); goto end; } do { mysql_cond_t *cond= data->cond; if (((*data->prev)=data->next)) /* remove from wait-list */ data->next->prev= data->prev; else lock->write_wait.last=data->prev; (*lock->write.last)=data; /* Put in execute list */ data->prev=lock->write.last; lock->write.last= &data->next; data->next=0; /* Only one write lock */ data->cond=0; /* Mark thread free */ mysql_cond_signal(cond); /* Start waiting thread */ } while (lock_type == TL_WRITE_ALLOW_WRITE && (data=lock->write_wait.data) && data->type == TL_WRITE_ALLOW_WRITE); if (lock->read_wait.data) free_all_read_locks(lock, (lock_type == TL_WRITE_CONCURRENT_INSERT || lock_type == TL_WRITE_ALLOW_WRITE)); } else if (!data && lock->read_wait.data) free_all_read_locks(lock,0); } end: check_locks(lock, "after waking up waiters", TL_UNLOCK, 0); DBUG_VOID_RETURN; }
O0
c
wake_up_waiters: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x90(%rax) jne 0xf80b1 movq -0x8(%rbp), %rax movq 0x80(%rax), %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x70(%rax) jne 0xf7ee5 cmpq $0x0, -0x10(%rbp) je 0xf7e82 movq -0x10(%rbp), %rax cmpl $0xb, 0x40(%rax) jne 0xf7cfe movq -0x8(%rbp), %rax cmpq $0x0, 0x60(%rax) je 0xf7cfe movq -0x8(%rbp), %rax movq 0x60(%rax), %rax cmpl $0x4, 0x40(%rax) jge 0xf7e82 movq -0x8(%rbp), %rcx movq 0xa0(%rcx), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0xa0(%rcx) leaq 0x1c7f3a(%rip), %rcx # 0x2bfc58 cmpq (%rcx), %rax jbe 0xf7d53 movq -0x8(%rbp), %rax movq $0x0, 0xa0(%rax) movq -0x8(%rbp), %rax cmpq $0x0, 0x60(%rax) je 0xf7d51 jmp 0xf7d3f jmp 0xf7d41 movq -0x8(%rbp), %rdi xorl %esi, %esi callq 0xf9720 jmp 0xf80b3 jmp 0xf7d53 jmp 0xf7d55 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq -0x10(%rbp), %rcx movq 0x10(%rcx), %rcx movq %rax, (%rcx) cmpq $0x0, %rax je 0xf7d84 movq -0x10(%rbp), %rax movq 0x10(%rax), %rcx movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rcx, 0x10(%rax) jmp 0xf7d97 movq -0x10(%rbp), %rax movq 0x10(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x88(%rax) movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq 0x98(%rax), %rax movq %rcx, (%rax) movq -0x8(%rbp), %rax movq 0x98(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x8(%rax) movq -0x10(%rbp), %rcx addq $0x8, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x98(%rax) movq -0x10(%rbp), %rax cmpl $0x8, 0x40(%rax) jne 0xf7e0d movq -0x8(%rbp), %rax movq 0xd8(%rax), %rax movq -0x10(%rbp), %rcx movq 0x28(%rcx), %rdi callq *%rax movsbl %al, %eax cmpl $0x0, %eax je 0xf7e0d movq -0x10(%rbp), %rax movl $0xd, 0x40(%rax) jmp 0xf7e0f jmp 0xf7e11 movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq $0x0, 0x20(%rax) movq -0x20(%rbp), %rdi callq 0xf8da0 movq -0x10(%rbp), %rax cmpl $0x7, 0x40(%rax) jne 0xf7e5b movq -0x8(%rbp), %rax cmpq $0x0, 0x80(%rax) je 0xf7e5b movq -0x8(%rbp), %rax movq 0x80(%rax), %rax cmpl $0x7, 0x40(%rax) je 0xf7e5d jmp 0xf7e71 movq -0x8(%rbp), %rax movq 0x80(%rax), %rax movq %rax, -0x10(%rbp) jmp 0xf7d55 movq -0x10(%rbp), %rax cmpl $0xb, 0x40(%rax) jl 0xf7e80 jmp 0xf80b3 jmp 0xf7e82 movq -0x8(%rbp), %rax cmpq $0x0, 0x60(%rax) je 0xf7eda movq -0x8(%rbp), %rax movq %rax, -0x38(%rbp) xorl %eax, %eax cmpq $0x0, -0x10(%rbp) movb %al, -0x29(%rbp) je 0xf7ec4 movq -0x10(%rbp), %rcx movb $0x1, %al cmpl $0x8, 0x40(%rcx) movb %al, -0x39(%rbp) je 0xf7ebe movq -0x10(%rbp), %rax cmpl $0x7, 0x40(%rax) sete %al movb %al, -0x39(%rbp) movb -0x39(%rbp), %al movb %al, -0x29(%rbp) movq -0x38(%rbp), %rdi movb -0x29(%rbp), %al andb $0x1, %al movzbl %al, %eax movsbl %al, %esi callq 0xf9720 jmp 0xf7ee0 jmp 0xf7edc jmp 0xf7ede jmp 0xf7ee0 jmp 0xf80af cmpq $0x0, -0x10(%rbp) je 0xf808e movq -0x10(%rbp), %rax movl 0x40(%rax), %eax movl %eax, -0x14(%rbp) cmpl $0x9, %eax jg 0xf808e cmpl $0x8, -0x14(%rbp) je 0xf7f0f cmpl $0x7, -0x14(%rbp) jne 0xf7f20 movq -0x8(%rbp), %rax cmpl $0x0, 0xa8(%rax) jne 0xf808e cmpl $0x8, -0x14(%rbp) jne 0xf7f69 movq -0x8(%rbp), %rax movq 0xd8(%rax), %rax movq -0x10(%rbp), %rcx movq 0x28(%rcx), %rdi callq *%rax movsbl %al, %eax cmpl $0x0, %eax je 0xf7f69 movq -0x10(%rbp), %rax movl $0xd, 0x40(%rax) movq -0x8(%rbp), %rax cmpq $0x0, 0x60(%rax) je 0xf7f64 movq -0x8(%rbp), %rdi xorl %esi, %esi callq 0xf9720 jmp 0xf80b3 jmp 0xf7f6b movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq -0x10(%rbp), %rcx movq 0x10(%rcx), %rcx movq %rax, (%rcx) cmpq $0x0, %rax je 0xf7fa6 movq -0x10(%rbp), %rax movq 0x10(%rax), %rcx movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rcx, 0x10(%rax) jmp 0xf7fb9 movq -0x10(%rbp), %rax movq 0x10(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x88(%rax) movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq 0x98(%rax), %rax movq %rcx, (%rax) movq -0x8(%rbp), %rax movq 0x98(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x10(%rbp), %rcx addq $0x8, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x98(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x8(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x20(%rax) movq -0x28(%rbp), %rdi callq 0xf8da0 xorl %eax, %eax cmpl $0x7, -0x14(%rbp) movb %al, -0x3a(%rbp) jne 0xf8045 movq -0x8(%rbp), %rax movq 0x80(%rax), %rcx movq %rcx, -0x10(%rbp) xorl %eax, %eax cmpq $0x0, %rcx movb %al, -0x3a(%rbp) je 0xf8045 movq -0x10(%rbp), %rax cmpl $0x7, 0x40(%rax) sete %al movb %al, -0x3a(%rbp) movb -0x3a(%rbp), %al testb $0x1, %al jne 0xf7f6b movq -0x8(%rbp), %rax cmpq $0x0, 0x60(%rax) je 0xf808c movq -0x8(%rbp), %rax movq %rax, -0x48(%rbp) movb $0x1, %al cmpl $0x8, -0x14(%rbp) movb %al, -0x3b(%rbp) je 0xf8078 cmpl $0x7, -0x14(%rbp) sete %al movb %al, -0x3b(%rbp) movq -0x48(%rbp), %rdi movb -0x3b(%rbp), %al andb $0x1, %al movzbl %al, %eax movsbl %al, %esi callq 0xf9720 jmp 0xf80ad cmpq $0x0, -0x10(%rbp) jne 0xf80ab movq -0x8(%rbp), %rax cmpq $0x0, 0x60(%rax) je 0xf80ab movq -0x8(%rbp), %rdi xorl %esi, %esi callq 0xf9720 jmp 0xf80ad jmp 0xf80af jmp 0xf80b1 jmp 0xf80b3 jmp 0xf80b5 jmp 0xf80b7 addq $0x50, %rsp popq %rbp retq nopl (%rax)
wake_up_waiters: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp qword ptr [rax+90h], 0 jnz loc_F80B1 mov rax, [rbp+var_8] mov rax, [rax+80h] mov [rbp+var_10], rax mov rax, [rbp+var_8] cmp qword ptr [rax+70h], 0 jnz loc_F7EE5 cmp [rbp+var_10], 0 jz loc_F7E82 mov rax, [rbp+var_10] cmp dword ptr [rax+40h], 0Bh jnz short loc_F7CFE mov rax, [rbp+var_8] cmp qword ptr [rax+60h], 0 jz short loc_F7CFE mov rax, [rbp+var_8] mov rax, [rax+60h] cmp dword ptr [rax+40h], 4 jge loc_F7E82 loc_F7CFE: mov rcx, [rbp+var_8] mov rax, [rcx+0A0h] mov rdx, rax add rdx, 1 mov [rcx+0A0h], rdx lea rcx, max_write_lock_count cmp rax, [rcx] jbe short loc_F7D53 mov rax, [rbp+var_8] mov qword ptr [rax+0A0h], 0 mov rax, [rbp+var_8] cmp qword ptr [rax+60h], 0 jz short loc_F7D51 jmp short $+2 loc_F7D3F: jmp short $+2 loc_F7D41: mov rdi, [rbp+var_8] xor esi, esi call free_all_read_locks jmp loc_F80B3 loc_F7D51: jmp short $+2 loc_F7D53: jmp short $+2 loc_F7D55: mov rax, [rbp+var_10] mov rax, [rax+8] mov rcx, [rbp+var_10] mov rcx, [rcx+10h] mov [rcx], rax cmp rax, 0 jz short loc_F7D84 mov rax, [rbp+var_10] mov rcx, [rax+10h] mov rax, [rbp+var_10] mov rax, [rax+8] mov [rax+10h], rcx jmp short loc_F7D97 loc_F7D84: mov rax, [rbp+var_10] mov rcx, [rax+10h] mov rax, [rbp+var_8] mov [rax+88h], rcx loc_F7D97: mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov rax, [rax+98h] mov [rax], rcx mov rax, [rbp+var_8] mov rcx, [rax+98h] mov rax, [rbp+var_10] mov [rax+10h], rcx mov rax, [rbp+var_10] mov qword ptr [rax+8], 0 mov rcx, [rbp+var_10] add rcx, 8 mov rax, [rbp+var_8] mov [rax+98h], rcx mov rax, [rbp+var_10] cmp dword ptr [rax+40h], 8 jnz short loc_F7E0D mov rax, [rbp+var_8] mov rax, [rax+0D8h] mov rcx, [rbp+var_10] mov rdi, [rcx+28h] call rax movsx eax, al cmp eax, 0 jz short loc_F7E0D mov rax, [rbp+var_10] mov dword ptr [rax+40h], 0Dh loc_F7E0D: jmp short $+2 loc_F7E0F: jmp short $+2 loc_F7E11: mov rax, [rbp+var_10] mov rax, [rax+20h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov qword ptr [rax+20h], 0 mov rdi, [rbp+var_20] call inline_mysql_cond_signal_4 mov rax, [rbp+var_10] cmp dword ptr [rax+40h], 7 jnz short loc_F7E5B mov rax, [rbp+var_8] cmp qword ptr [rax+80h], 0 jz short loc_F7E5B mov rax, [rbp+var_8] mov rax, [rax+80h] cmp dword ptr [rax+40h], 7 jz short loc_F7E5D loc_F7E5B: jmp short loc_F7E71 loc_F7E5D: mov rax, [rbp+var_8] mov rax, [rax+80h] mov [rbp+var_10], rax jmp loc_F7D55 loc_F7E71: mov rax, [rbp+var_10] cmp dword ptr [rax+40h], 0Bh jl short loc_F7E80 jmp loc_F80B3 loc_F7E80: jmp short $+2 loc_F7E82: mov rax, [rbp+var_8] cmp qword ptr [rax+60h], 0 jz short loc_F7EDA mov rax, [rbp+var_8] mov [rbp+var_38], rax xor eax, eax cmp [rbp+var_10], 0 mov [rbp+var_29], al jz short loc_F7EC4 mov rcx, [rbp+var_10] mov al, 1 cmp dword ptr [rcx+40h], 8 mov [rbp+var_39], al jz short loc_F7EBE mov rax, [rbp+var_10] cmp dword ptr [rax+40h], 7 setz al mov [rbp+var_39], al loc_F7EBE: mov al, [rbp+var_39] mov [rbp+var_29], al loc_F7EC4: mov rdi, [rbp+var_38] mov al, [rbp+var_29] and al, 1 movzx eax, al movsx esi, al call free_all_read_locks jmp short loc_F7EE0 loc_F7EDA: jmp short $+2 loc_F7EDC: jmp short $+2 loc_F7EDE: jmp short $+2 loc_F7EE0: jmp loc_F80AF loc_F7EE5: cmp [rbp+var_10], 0 jz loc_F808E mov rax, [rbp+var_10] mov eax, [rax+40h] mov [rbp+var_14], eax cmp eax, 9 jg loc_F808E cmp [rbp+var_14], 8 jz short loc_F7F0F cmp [rbp+var_14], 7 jnz short loc_F7F20 loc_F7F0F: mov rax, [rbp+var_8] cmp dword ptr [rax+0A8h], 0 jnz loc_F808E loc_F7F20: cmp [rbp+var_14], 8 jnz short loc_F7F69 mov rax, [rbp+var_8] mov rax, [rax+0D8h] mov rcx, [rbp+var_10] mov rdi, [rcx+28h] call rax movsx eax, al cmp eax, 0 jz short loc_F7F69 mov rax, [rbp+var_10] mov dword ptr [rax+40h], 0Dh mov rax, [rbp+var_8] cmp qword ptr [rax+60h], 0 jz short loc_F7F64 mov rdi, [rbp+var_8] xor esi, esi call free_all_read_locks loc_F7F64: jmp loc_F80B3 loc_F7F69: jmp short $+2 loc_F7F6B: mov rax, [rbp+var_10] mov rax, [rax+20h] mov [rbp+var_28], rax mov rax, [rbp+var_10] mov rax, [rax+8] mov rcx, [rbp+var_10] mov rcx, [rcx+10h] mov [rcx], rax cmp rax, 0 jz short loc_F7FA6 mov rax, [rbp+var_10] mov rcx, [rax+10h] mov rax, [rbp+var_10] mov rax, [rax+8] mov [rax+10h], rcx jmp short loc_F7FB9 loc_F7FA6: mov rax, [rbp+var_10] mov rcx, [rax+10h] mov rax, [rbp+var_8] mov [rax+88h], rcx loc_F7FB9: mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov rax, [rax+98h] mov [rax], rcx mov rax, [rbp+var_8] mov rcx, [rax+98h] mov rax, [rbp+var_10] mov [rax+10h], rcx mov rcx, [rbp+var_10] add rcx, 8 mov rax, [rbp+var_8] mov [rax+98h], rcx mov rax, [rbp+var_10] mov qword ptr [rax+8], 0 mov rax, [rbp+var_10] mov qword ptr [rax+20h], 0 mov rdi, [rbp+var_28] call inline_mysql_cond_signal_4 xor eax, eax cmp [rbp+var_14], 7 mov [rbp+var_3A], al jnz short loc_F8045 mov rax, [rbp+var_8] mov rcx, [rax+80h] mov [rbp+var_10], rcx xor eax, eax cmp rcx, 0 mov [rbp+var_3A], al jz short loc_F8045 mov rax, [rbp+var_10] cmp dword ptr [rax+40h], 7 setz al mov [rbp+var_3A], al loc_F8045: mov al, [rbp+var_3A] test al, 1 jnz loc_F7F6B mov rax, [rbp+var_8] cmp qword ptr [rax+60h], 0 jz short loc_F808C mov rax, [rbp+var_8] mov [rbp+var_48], rax mov al, 1 cmp [rbp+var_14], 8 mov [rbp+var_3B], al jz short loc_F8078 cmp [rbp+var_14], 7 setz al mov [rbp+var_3B], al loc_F8078: mov rdi, [rbp+var_48] mov al, [rbp+var_3B] and al, 1 movzx eax, al movsx esi, al call free_all_read_locks loc_F808C: jmp short loc_F80AD loc_F808E: cmp [rbp+var_10], 0 jnz short loc_F80AB mov rax, [rbp+var_8] cmp qword ptr [rax+60h], 0 jz short loc_F80AB mov rdi, [rbp+var_8] xor esi, esi call free_all_read_locks loc_F80AB: jmp short $+2 loc_F80AD: jmp short $+2 loc_F80AF: jmp short $+2 loc_F80B1: jmp short $+2 loc_F80B3: jmp short $+2 loc_F80B5: jmp short $+2 loc_F80B7: add rsp, 50h pop rbp retn
long long wake_up_waiters(long long a1) { long long result; // rax unsigned long long v2; // rax long long v3; // rax long long v4; // rax bool v5; // [rsp+15h] [rbp-3Bh] bool v6; // [rsp+16h] [rbp-3Ah] bool v7; // [rsp+17h] [rbp-39h] bool v8; // [rsp+27h] [rbp-29h] long long v9; // [rsp+28h] [rbp-28h] long long v10; // [rsp+30h] [rbp-20h] int v11; // [rsp+3Ch] [rbp-14h] long long v12; // [rsp+40h] [rbp-10h] result = a1; if ( *(_QWORD *)(a1 + 144) ) return result; v12 = *(_QWORD *)(a1 + 128); result = a1; if ( *(_QWORD *)(a1 + 112) ) { if ( v12 ) { result = *(unsigned int *)(v12 + 64); v11 = result; if ( (int)result <= 9 ) { if ( (_DWORD)result != 8 && (_DWORD)result != 7 || (result = a1, !*(_DWORD *)(a1 + 168)) ) { if ( v11 == 8 && (*(unsigned __int8 ( **)(_QWORD))(a1 + 216))(*(_QWORD *)(v12 + 40)) ) { *(_DWORD *)(v12 + 64) = 13; result = a1; if ( *(_QWORD *)(a1 + 96) ) return free_all_read_locks(a1, 0LL); } else { do { v9 = *(_QWORD *)(v12 + 32); v4 = *(_QWORD *)(v12 + 8); **(_QWORD **)(v12 + 16) = v4; if ( v4 ) *(_QWORD *)(*(_QWORD *)(v12 + 8) + 16LL) = *(_QWORD *)(v12 + 16); else *(_QWORD *)(a1 + 136) = *(_QWORD *)(v12 + 16); **(_QWORD **)(a1 + 152) = v12; *(_QWORD *)(v12 + 16) = *(_QWORD *)(a1 + 152); *(_QWORD *)(a1 + 152) = v12 + 8; *(_QWORD *)(v12 + 8) = 0LL; *(_QWORD *)(v12 + 32) = 0LL; inline_mysql_cond_signal_4(v9); v6 = 0; if ( v11 == 7 ) { v12 = *(_QWORD *)(a1 + 128); v6 = 0; if ( v12 ) v6 = *(_DWORD *)(v12 + 64) == 7; } } while ( v6 ); result = a1; if ( *(_QWORD *)(a1 + 96) ) { v5 = 1; if ( v11 != 8 ) v5 = v11 == 7; return free_all_read_locks(a1, v5); } } return result; } } } if ( v12 ) return result; result = a1; if ( !*(_QWORD *)(a1 + 96) ) return result; return free_all_read_locks(a1, 0LL); } if ( !v12 || *(_DWORD *)(v12 + 64) == 11 && *(_QWORD *)(a1 + 96) && *(int *)(*(_QWORD *)(a1 + 96) + 64LL) >= 4 ) { LABEL_21: result = a1; if ( *(_QWORD *)(a1 + 96) ) { v8 = 0; if ( v12 ) { v7 = 1; if ( *(_DWORD *)(v12 + 64) != 8 ) v7 = *(_DWORD *)(v12 + 64) == 7; v8 = v7; } return free_all_read_locks(a1, v8); } return result; } v2 = *(_QWORD *)(a1 + 160); *(_QWORD *)(a1 + 160) = v2 + 1; if ( v2 > max_write_lock_count ) { *(_QWORD *)(a1 + 160) = 0LL; if ( *(_QWORD *)(a1 + 96) ) return free_all_read_locks(a1, 0LL); } while ( 1 ) { v3 = *(_QWORD *)(v12 + 8); **(_QWORD **)(v12 + 16) = v3; if ( v3 ) *(_QWORD *)(*(_QWORD *)(v12 + 8) + 16LL) = *(_QWORD *)(v12 + 16); else *(_QWORD *)(a1 + 136) = *(_QWORD *)(v12 + 16); **(_QWORD **)(a1 + 152) = v12; *(_QWORD *)(v12 + 16) = *(_QWORD *)(a1 + 152); *(_QWORD *)(v12 + 8) = 0LL; *(_QWORD *)(a1 + 152) = v12 + 8; if ( *(_DWORD *)(v12 + 64) == 8 && (*(unsigned __int8 ( **)(_QWORD))(a1 + 216))(*(_QWORD *)(v12 + 40)) ) *(_DWORD *)(v12 + 64) = 13; v10 = *(_QWORD *)(v12 + 32); *(_QWORD *)(v12 + 32) = 0LL; inline_mysql_cond_signal_4(v10); if ( *(_DWORD *)(v12 + 64) != 7 || !*(_QWORD *)(a1 + 128) || *(_DWORD *)(*(_QWORD *)(a1 + 128) + 64LL) != 7 ) break; v12 = *(_QWORD *)(a1 + 128); } result = v12; if ( *(int *)(v12 + 64) < 11 ) goto LABEL_21; return result; }
wake_up_waiters: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x90],0x0 JNZ 0x001f80b1 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x80] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x70],0x0 JNZ 0x001f7ee5 CMP qword ptr [RBP + -0x10],0x0 JZ 0x001f7e82 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x40],0xb JNZ 0x001f7cfe MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x60],0x0 JZ 0x001f7cfe MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x60] CMP dword ptr [RAX + 0x40],0x4 JGE 0x001f7e82 LAB_001f7cfe: MOV RCX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RCX + 0xa0] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RCX + 0xa0],RDX LEA RCX,[0x3bfc58] CMP RAX,qword ptr [RCX] JBE 0x001f7d53 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xa0],0x0 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x60],0x0 JZ 0x001f7d51 JMP 0x001f7d3f LAB_001f7d3f: JMP 0x001f7d41 LAB_001f7d41: MOV RDI,qword ptr [RBP + -0x8] XOR ESI,ESI CALL 0x001f9720 JMP 0x001f80b3 LAB_001f7d51: JMP 0x001f7d53 LAB_001f7d53: JMP 0x001f7d55 LAB_001f7d55: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x10] MOV qword ptr [RCX],RAX CMP RAX,0x0 JZ 0x001f7d84 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RAX + 0x10],RCX JMP 0x001f7d97 LAB_001f7d84: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x88],RCX LAB_001f7d97: MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x98] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x98] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],0x0 MOV RCX,qword ptr [RBP + -0x10] ADD RCX,0x8 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x98],RCX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x40],0x8 JNZ 0x001f7e0d MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0xd8] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0x28] CALL RAX MOVSX EAX,AL CMP EAX,0x0 JZ 0x001f7e0d MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x40],0xd LAB_001f7e0d: JMP 0x001f7e0f LAB_001f7e0f: JMP 0x001f7e11 LAB_001f7e11: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x20],0x0 MOV RDI,qword ptr [RBP + -0x20] CALL 0x001f8da0 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x40],0x7 JNZ 0x001f7e5b MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x80],0x0 JZ 0x001f7e5b MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x80] CMP dword ptr [RAX + 0x40],0x7 JZ 0x001f7e5d LAB_001f7e5b: JMP 0x001f7e71 LAB_001f7e5d: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x80] MOV qword ptr [RBP + -0x10],RAX JMP 0x001f7d55 LAB_001f7e71: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x40],0xb JL 0x001f7e80 JMP 0x001f80b3 LAB_001f7e80: JMP 0x001f7e82 LAB_001f7e82: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x60],0x0 JZ 0x001f7eda MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x38],RAX XOR EAX,EAX CMP qword ptr [RBP + -0x10],0x0 MOV byte ptr [RBP + -0x29],AL JZ 0x001f7ec4 MOV RCX,qword ptr [RBP + -0x10] MOV AL,0x1 CMP dword ptr [RCX + 0x40],0x8 MOV byte ptr [RBP + -0x39],AL JZ 0x001f7ebe MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x40],0x7 SETZ AL MOV byte ptr [RBP + -0x39],AL LAB_001f7ebe: MOV AL,byte ptr [RBP + -0x39] MOV byte ptr [RBP + -0x29],AL LAB_001f7ec4: MOV RDI,qword ptr [RBP + -0x38] MOV AL,byte ptr [RBP + -0x29] AND AL,0x1 MOVZX EAX,AL MOVSX ESI,AL CALL 0x001f9720 JMP 0x001f7ee0 LAB_001f7eda: JMP 0x001f7edc LAB_001f7edc: JMP 0x001f7ede LAB_001f7ede: JMP 0x001f7ee0 LAB_001f7ee0: JMP 0x001f80af LAB_001f7ee5: CMP qword ptr [RBP + -0x10],0x0 JZ 0x001f808e MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x40] MOV dword ptr [RBP + -0x14],EAX CMP EAX,0x9 JG 0x001f808e CMP dword ptr [RBP + -0x14],0x8 JZ 0x001f7f0f CMP dword ptr [RBP + -0x14],0x7 JNZ 0x001f7f20 LAB_001f7f0f: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0xa8],0x0 JNZ 0x001f808e LAB_001f7f20: CMP dword ptr [RBP + -0x14],0x8 JNZ 0x001f7f69 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0xd8] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0x28] CALL RAX MOVSX EAX,AL CMP EAX,0x0 JZ 0x001f7f69 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x40],0xd MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x60],0x0 JZ 0x001f7f64 MOV RDI,qword ptr [RBP + -0x8] XOR ESI,ESI CALL 0x001f9720 LAB_001f7f64: JMP 0x001f80b3 LAB_001f7f69: JMP 0x001f7f6b LAB_001f7f6b: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x10] MOV qword ptr [RCX],RAX CMP RAX,0x0 JZ 0x001f7fa6 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RAX + 0x10],RCX JMP 0x001f7fb9 LAB_001f7fa6: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x88],RCX LAB_001f7fb9: MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x98] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x98] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RBP + -0x10] ADD RCX,0x8 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x98],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x20],0x0 MOV RDI,qword ptr [RBP + -0x28] CALL 0x001f8da0 XOR EAX,EAX CMP dword ptr [RBP + -0x14],0x7 MOV byte ptr [RBP + -0x3a],AL JNZ 0x001f8045 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x80] MOV qword ptr [RBP + -0x10],RCX XOR EAX,EAX CMP RCX,0x0 MOV byte ptr [RBP + -0x3a],AL JZ 0x001f8045 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x40],0x7 SETZ AL MOV byte ptr [RBP + -0x3a],AL LAB_001f8045: MOV AL,byte ptr [RBP + -0x3a] TEST AL,0x1 JNZ 0x001f7f6b MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x60],0x0 JZ 0x001f808c MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x48],RAX MOV AL,0x1 CMP dword ptr [RBP + -0x14],0x8 MOV byte ptr [RBP + -0x3b],AL JZ 0x001f8078 CMP dword ptr [RBP + -0x14],0x7 SETZ AL MOV byte ptr [RBP + -0x3b],AL LAB_001f8078: MOV RDI,qword ptr [RBP + -0x48] MOV AL,byte ptr [RBP + -0x3b] AND AL,0x1 MOVZX EAX,AL MOVSX ESI,AL CALL 0x001f9720 LAB_001f808c: JMP 0x001f80ad LAB_001f808e: CMP qword ptr [RBP + -0x10],0x0 JNZ 0x001f80ab MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x60],0x0 JZ 0x001f80ab MOV RDI,qword ptr [RBP + -0x8] XOR ESI,ESI CALL 0x001f9720 LAB_001f80ab: JMP 0x001f80ad LAB_001f80ad: JMP 0x001f80af LAB_001f80af: JMP 0x001f80b1 LAB_001f80b1: JMP 0x001f80b3 LAB_001f80b3: JMP 0x001f80b5 LAB_001f80b5: JMP 0x001f80b7 LAB_001f80b7: ADD RSP,0x50 POP RBP RET
void wake_up_waiters(long param_1) { int iVar1; ulong uVar2; long lVar3; int8 uVar4; char cVar5; bool bVar6; bool local_43; bool local_41; bool local_31; long local_18; if (*(long *)(param_1 + 0x90) == 0) { local_18 = *(long *)(param_1 + 0x80); if (*(long *)(param_1 + 0x70) == 0) { if ((local_18 != 0) && (((*(int *)(local_18 + 0x40) != 0xb || (*(long *)(param_1 + 0x60) == 0)) || (*(int *)(*(long *)(param_1 + 0x60) + 0x40) < 4)))) { uVar2 = *(ulong *)(param_1 + 0xa0); *(ulong *)(param_1 + 0xa0) = uVar2 + 1; if ((max_write_lock_count < uVar2) && (*(int8 *)(param_1 + 0xa0) = 0, *(long *)(param_1 + 0x60) != 0)) { free_all_read_locks(param_1,0); return; } while( true ) { lVar3 = *(long *)(local_18 + 8); **(long **)(local_18 + 0x10) = lVar3; if (lVar3 == 0) { *(int8 *)(param_1 + 0x88) = *(int8 *)(local_18 + 0x10); } else { *(int8 *)(*(long *)(local_18 + 8) + 0x10) = *(int8 *)(local_18 + 0x10); } **(long **)(param_1 + 0x98) = local_18; *(int8 *)(local_18 + 0x10) = *(int8 *)(param_1 + 0x98); *(int8 *)(local_18 + 8) = 0; *(long *)(param_1 + 0x98) = local_18 + 8; if ((*(int *)(local_18 + 0x40) == 8) && (cVar5 = (**(code **)(param_1 + 0xd8))(*(int8 *)(local_18 + 0x28)), cVar5 != '\0' )) { *(int4 *)(local_18 + 0x40) = 0xd; } uVar4 = *(int8 *)(local_18 + 0x20); *(int8 *)(local_18 + 0x20) = 0; inline_mysql_cond_signal(uVar4); if (((*(int *)(local_18 + 0x40) != 7) || (*(long *)(param_1 + 0x80) == 0)) || (*(int *)(*(long *)(param_1 + 0x80) + 0x40) != 7)) break; local_18 = *(long *)(param_1 + 0x80); } if (10 < *(int *)(local_18 + 0x40)) { return; } } if (*(long *)(param_1 + 0x60) != 0) { local_31 = false; if (local_18 != 0) { local_41 = true; if (*(int *)(local_18 + 0x40) != 8) { local_41 = *(int *)(local_18 + 0x40) == 7; } local_31 = local_41; } free_all_read_locks(param_1,local_31); } } else if (((local_18 == 0) || (iVar1 = *(int *)(local_18 + 0x40), 9 < iVar1)) || (((iVar1 == 8 || (iVar1 == 7)) && (*(int *)(param_1 + 0xa8) != 0)))) { if ((local_18 == 0) && (*(long *)(param_1 + 0x60) != 0)) { free_all_read_locks(param_1,0); } } else if ((iVar1 == 8) && (cVar5 = (**(code **)(param_1 + 0xd8))(*(int8 *)(local_18 + 0x28)), cVar5 != '\0') ) { *(int4 *)(local_18 + 0x40) = 0xd; if (*(long *)(param_1 + 0x60) != 0) { free_all_read_locks(param_1,0); } } else { do { uVar4 = *(int8 *)(local_18 + 0x20); lVar3 = *(long *)(local_18 + 8); **(long **)(local_18 + 0x10) = lVar3; if (lVar3 == 0) { *(int8 *)(param_1 + 0x88) = *(int8 *)(local_18 + 0x10); } else { *(int8 *)(*(long *)(local_18 + 8) + 0x10) = *(int8 *)(local_18 + 0x10); } **(long **)(param_1 + 0x98) = local_18; *(int8 *)(local_18 + 0x10) = *(int8 *)(param_1 + 0x98); *(long *)(param_1 + 0x98) = local_18 + 8; *(int8 *)(local_18 + 8) = 0; *(int8 *)(local_18 + 0x20) = 0; inline_mysql_cond_signal(uVar4); bVar6 = false; if (iVar1 == 7) { local_18 = *(long *)(param_1 + 0x80); bVar6 = false; if (local_18 != 0) { bVar6 = *(int *)(local_18 + 0x40) == 7; } } } while (bVar6); if (*(long *)(param_1 + 0x60) != 0) { local_43 = iVar1 == 8 || iVar1 == 7; free_all_read_locks(param_1,local_43); } } } return; }
6,633
ggml_compute_forward_sum_rows_f32
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
static void ggml_compute_forward_sum_rows_f32( const struct ggml_compute_params * params, struct ggml_tensor * dst) { const struct ggml_tensor * src0 = dst->src[0]; if (params->ith != 0) { return; } GGML_ASSERT(src0->nb[0] == sizeof(float)); GGML_ASSERT(dst->nb[0] == sizeof(float)); GGML_TENSOR_UNARY_OP_LOCALS GGML_ASSERT(ne0 == 1); GGML_ASSERT(ne1 == ne01); GGML_ASSERT(ne2 == ne02); GGML_ASSERT(ne3 == ne03); for (int64_t i3 = 0; i3 < ne03; i3++) { for (int64_t i2 = 0; i2 < ne02; i2++) { for (int64_t i1 = 0; i1 < ne01; i1++) { float * src_row = (float *) ((char *) src0->data + i1*nb01 + i2*nb02 + i3*nb03); float * dst_row = (float *) ((char *) dst->data + i1*nb1 + i2*nb2 + i3*nb3); float row_sum = 0; ggml_vec_sum_f32(ne00, &row_sum, src_row); dst_row[0] = row_sum; } } } }
O0
c
ggml_compute_forward_sum_rows_f32: pushq %rbp movq %rsp, %rbp subq $0xd0, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x98(%rax), %rax movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax cmpl $0x0, (%rax) je 0x25fe0 jmp 0x26306 movq -0x18(%rbp), %rax cmpq $0x4, 0x30(%rax) je 0x2600c leaq 0x4db70(%rip), %rdi # 0x73b62 movl $0x15f8, %esi # imm = 0x15F8 leaq 0x4dbc3(%rip), %rdx # 0x73bc1 leaq 0x4e838(%rip), %rcx # 0x7483d movb $0x0, %al callq 0xe270 movq -0x10(%rbp), %rax cmpq $0x4, 0x30(%rax) je 0x26038 leaq 0x4db44(%rip), %rdi # 0x73b62 movl $0x15f9, %esi # imm = 0x15F9 leaq 0x4db97(%rip), %rdx # 0x73bc1 leaq 0x4e7f0(%rip), %rcx # 0x74821 movb $0x0, %al callq 0xe270 movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rax movq 0x28(%rax), %rax movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rax movq 0x30(%rax), %rax movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movq %rax, -0x48(%rbp) movq -0x18(%rbp), %rax movq 0x40(%rax), %rax movq %rax, -0x50(%rbp) movq -0x18(%rbp), %rax movq 0x48(%rax), %rax movq %rax, -0x58(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x60(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x68(%rbp) movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x70(%rbp) movq -0x10(%rbp), %rax movq 0x28(%rax), %rax movq %rax, -0x78(%rbp) movq -0x10(%rbp), %rax movq 0x30(%rax), %rax movq %rax, -0x80(%rbp) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq %rax, -0x88(%rbp) movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq %rax, -0x90(%rbp) movq -0x10(%rbp), %rax movq 0x48(%rax), %rax movq %rax, -0x98(%rbp) cmpq $0x1, -0x60(%rbp) je 0x26129 leaq 0x4da53(%rip), %rdi # 0x73b62 movl $0x15fd, %esi # imm = 0x15FD leaq 0x4daa6(%rip), %rdx # 0x73bc1 leaq 0x4e904(%rip), %rcx # 0x74a26 movb $0x0, %al callq 0xe270 movq -0x68(%rbp), %rax cmpq -0x28(%rbp), %rax je 0x26154 leaq 0x4da28(%rip), %rdi # 0x73b62 movl $0x15fe, %esi # imm = 0x15FE leaq 0x4da7b(%rip), %rdx # 0x73bc1 leaq 0x4e8e2(%rip), %rcx # 0x74a2f movb $0x0, %al callq 0xe270 movq -0x70(%rbp), %rax cmpq -0x30(%rbp), %rax je 0x2617f leaq 0x4d9fd(%rip), %rdi # 0x73b62 movl $0x15ff, %esi # imm = 0x15FF leaq 0x4da50(%rip), %rdx # 0x73bc1 leaq 0x4e8c3(%rip), %rcx # 0x74a3b movb $0x0, %al callq 0xe270 movq -0x78(%rbp), %rax cmpq -0x38(%rbp), %rax je 0x261aa leaq 0x4d9d2(%rip), %rdi # 0x73b62 movl $0x1600, %esi # imm = 0x1600 leaq 0x4da25(%rip), %rdx # 0x73bc1 leaq 0x4e8a4(%rip), %rcx # 0x74a47 movb $0x0, %al callq 0xe270 movq $0x0, -0xa0(%rbp) movq -0xa0(%rbp), %rax cmpq -0x38(%rbp), %rax jge 0x26306 movq $0x0, -0xa8(%rbp) movq -0xa8(%rbp), %rax cmpq -0x30(%rbp), %rax jge 0x262ed movq $0x0, -0xb0(%rbp) movq -0xb0(%rbp), %rax cmpq -0x28(%rbp), %rax jge 0x262d4 movq -0x18(%rbp), %rax movq 0xf8(%rax), %rax movq -0xb0(%rbp), %rcx imulq -0x48(%rbp), %rcx addq %rcx, %rax movq -0xa8(%rbp), %rcx imulq -0x50(%rbp), %rcx addq %rcx, %rax movq -0xa0(%rbp), %rcx imulq -0x58(%rbp), %rcx addq %rcx, %rax movq %rax, -0xb8(%rbp) movq -0x10(%rbp), %rax movq 0xf8(%rax), %rax movq -0xb0(%rbp), %rcx imulq -0x88(%rbp), %rcx addq %rcx, %rax movq -0xa8(%rbp), %rcx imulq -0x90(%rbp), %rcx addq %rcx, %rax movq -0xa0(%rbp), %rcx imulq -0x98(%rbp), %rcx addq %rcx, %rax movq %rax, -0xc0(%rbp) vpxor %xmm0, %xmm0, %xmm0 vmovss %xmm0, -0xc4(%rbp) movq -0x20(%rbp), %rax movl %eax, %edi movq -0xb8(%rbp), %rdx leaq -0xc4(%rbp), %rsi callq 0x26310 vmovss -0xc4(%rbp), %xmm0 movq -0xc0(%rbp), %rax vmovss %xmm0, (%rax) movq -0xb0(%rbp), %rax addq $0x1, %rax movq %rax, -0xb0(%rbp) jmp 0x261ed jmp 0x262d6 movq -0xa8(%rbp), %rax addq $0x1, %rax movq %rax, -0xa8(%rbp) jmp 0x261d1 jmp 0x262ef movq -0xa0(%rbp), %rax addq $0x1, %rax movq %rax, -0xa0(%rbp) jmp 0x261b5 addq $0xd0, %rsp popq %rbp retq nop
ggml_compute_forward_sum_rows_f32: push rbp mov rbp, rsp sub rsp, 0D0h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov rax, [rax+98h] mov [rbp+var_18], rax mov rax, [rbp+var_8] cmp dword ptr [rax], 0 jz short loc_25FE0 jmp loc_26306 loc_25FE0: mov rax, [rbp+var_18] cmp qword ptr [rax+30h], 4 jz short loc_2600C lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 15F8h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aSrc0Nb0SizeofF; "src0->nb[0] == sizeof(float)" mov al, 0 call _ggml_abort loc_2600C: mov rax, [rbp+var_10] cmp qword ptr [rax+30h], 4 jz short loc_26038 lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 15F9h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aDstNb0SizeofFl; "dst->nb[0] == sizeof(float)" mov al, 0 call _ggml_abort loc_26038: mov rax, [rbp+var_18] mov rax, [rax+10h] mov [rbp+var_20], rax mov rax, [rbp+var_18] mov rax, [rax+18h] mov [rbp+var_28], rax mov rax, [rbp+var_18] mov rax, [rax+20h] mov [rbp+var_30], rax mov rax, [rbp+var_18] mov rax, [rax+28h] mov [rbp+var_38], rax mov rax, [rbp+var_18] mov rax, [rax+30h] mov [rbp+var_40], rax mov rax, [rbp+var_18] mov rax, [rax+38h] mov [rbp+var_48], rax mov rax, [rbp+var_18] mov rax, [rax+40h] mov [rbp+var_50], rax mov rax, [rbp+var_18] mov rax, [rax+48h] mov [rbp+var_58], rax mov rax, [rbp+var_10] mov rax, [rax+10h] mov [rbp+var_60], rax mov rax, [rbp+var_10] mov rax, [rax+18h] mov [rbp+var_68], rax mov rax, [rbp+var_10] mov rax, [rax+20h] mov [rbp+var_70], rax mov rax, [rbp+var_10] mov rax, [rax+28h] mov [rbp+var_78], rax mov rax, [rbp+var_10] mov rax, [rax+30h] mov [rbp+var_80], rax mov rax, [rbp+var_10] mov rax, [rax+38h] mov [rbp+var_88], rax mov rax, [rbp+var_10] mov rax, [rax+40h] mov [rbp+var_90], rax mov rax, [rbp+var_10] mov rax, [rax+48h] mov [rbp+var_98], rax cmp [rbp+var_60], 1 jz short loc_26129 lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 15FDh lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNe01; "ne0 == 1" mov al, 0 call _ggml_abort loc_26129: mov rax, [rbp+var_68] cmp rax, [rbp+var_28] jz short loc_26154 lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 15FEh lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNe1Ne01; "ne1 == ne01" mov al, 0 call _ggml_abort loc_26154: mov rax, [rbp+var_70] cmp rax, [rbp+var_30] jz short loc_2617F lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 15FFh lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNe2Ne02; "ne2 == ne02" mov al, 0 call _ggml_abort loc_2617F: mov rax, [rbp+var_78] cmp rax, [rbp+var_38] jz short loc_261AA lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 1600h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNe3Ne03; "ne3 == ne03" mov al, 0 call _ggml_abort loc_261AA: mov [rbp+var_A0], 0 loc_261B5: mov rax, [rbp+var_A0] cmp rax, [rbp+var_38] jge loc_26306 mov [rbp+var_A8], 0 loc_261D1: mov rax, [rbp+var_A8] cmp rax, [rbp+var_30] jge loc_262ED mov [rbp+var_B0], 0 loc_261ED: mov rax, [rbp+var_B0] cmp rax, [rbp+var_28] jge loc_262D4 mov rax, [rbp+var_18] mov rax, [rax+0F8h] mov rcx, [rbp+var_B0] imul rcx, [rbp+var_48] add rax, rcx mov rcx, [rbp+var_A8] imul rcx, [rbp+var_50] add rax, rcx mov rcx, [rbp+var_A0] imul rcx, [rbp+var_58] add rax, rcx mov [rbp+var_B8], rax mov rax, [rbp+var_10] mov rax, [rax+0F8h] mov rcx, [rbp+var_B0] imul rcx, [rbp+var_88] add rax, rcx mov rcx, [rbp+var_A8] imul rcx, [rbp+var_90] add rax, rcx mov rcx, [rbp+var_A0] imul rcx, [rbp+var_98] add rax, rcx mov [rbp+var_C0], rax vpxor xmm0, xmm0, xmm0 vmovss [rbp+var_C4], xmm0 mov rax, [rbp+var_20] mov edi, eax mov rdx, [rbp+var_B8] lea rsi, [rbp+var_C4] call ggml_vec_sum_f32 vmovss xmm0, [rbp+var_C4] mov rax, [rbp+var_C0] vmovss dword ptr [rax], xmm0 mov rax, [rbp+var_B0] add rax, 1 mov [rbp+var_B0], rax jmp loc_261ED loc_262D4: jmp short $+2 loc_262D6: mov rax, [rbp+var_A8] add rax, 1 mov [rbp+var_A8], rax jmp loc_261D1 loc_262ED: jmp short $+2 loc_262EF: mov rax, [rbp+var_A0] add rax, 1 mov [rbp+var_A0], rax jmp loc_261B5 loc_26306: add rsp, 0D0h pop rbp retn
_DWORD * ggml_compute_forward_sum_rows_f32(_DWORD *a1, _QWORD *a2, __m128 _XMM0) { _DWORD *result; // rax int v6; // [rsp+Ch] [rbp-C4h] BYREF long long v7; // [rsp+10h] [rbp-C0h] long long v8; // [rsp+18h] [rbp-B8h] long long k; // [rsp+20h] [rbp-B0h] long long j; // [rsp+28h] [rbp-A8h] long long i; // [rsp+30h] [rbp-A0h] long long v12; // [rsp+38h] [rbp-98h] long long v13; // [rsp+40h] [rbp-90h] long long v14; // [rsp+48h] [rbp-88h] long long v15; // [rsp+50h] [rbp-80h] long long v16; // [rsp+58h] [rbp-78h] long long v17; // [rsp+60h] [rbp-70h] long long v18; // [rsp+68h] [rbp-68h] long long v19; // [rsp+70h] [rbp-60h] long long v20; // [rsp+78h] [rbp-58h] long long v21; // [rsp+80h] [rbp-50h] long long v22; // [rsp+88h] [rbp-48h] long long v23; // [rsp+90h] [rbp-40h] long long v24; // [rsp+98h] [rbp-38h] long long v25; // [rsp+A0h] [rbp-30h] long long v26; // [rsp+A8h] [rbp-28h] long long v27; // [rsp+B0h] [rbp-20h] _QWORD *v28; // [rsp+B8h] [rbp-18h] _QWORD *v29; // [rsp+C0h] [rbp-10h] _DWORD *v30; // [rsp+C8h] [rbp-8h] v30 = a1; v29 = a2; v28 = (_QWORD *)a2[19]; result = a1; if ( !*a1 ) { if ( v28[6] != 4LL ) *(double *)_XMM0.m128_u64 = ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 5624LL, "GGML_ASSERT(%s) failed", "src0->nb[0] == sizeof(float)"); if ( v29[6] != 4LL ) *(double *)_XMM0.m128_u64 = ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 5625LL, "GGML_ASSERT(%s) failed", "dst->nb[0] == sizeof(float)"); v27 = v28[2]; v26 = v28[3]; v25 = v28[4]; v24 = v28[5]; v23 = v28[6]; v22 = v28[7]; v21 = v28[8]; v20 = v28[9]; v19 = v29[2]; v18 = v29[3]; v17 = v29[4]; v16 = v29[5]; v15 = v29[6]; v14 = v29[7]; v13 = v29[8]; v12 = v29[9]; if ( v19 != 1 ) *(double *)_XMM0.m128_u64 = ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 5629LL, "GGML_ASSERT(%s) failed", "ne0 == 1"); if ( v18 != v26 ) *(double *)_XMM0.m128_u64 = ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 5630LL, "GGML_ASSERT(%s) failed", "ne1 == ne01"); if ( v17 != v25 ) *(double *)_XMM0.m128_u64 = ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 5631LL, "GGML_ASSERT(%s) failed", "ne2 == ne02"); if ( v16 != v24 ) *(double *)_XMM0.m128_u64 = ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 5632LL, "GGML_ASSERT(%s) failed", "ne3 == ne03"); for ( i = 0LL; ; ++i ) { result = (_DWORD *)i; if ( i >= v24 ) break; for ( j = 0LL; j < v25; ++j ) { for ( k = 0LL; k < v26; ++k ) { v8 = v20 * i + v21 * j + v22 * k + v28[31]; v7 = v12 * i + v13 * j + v14 * k + v29[31]; __asm { vpxor xmm0, xmm0, xmm0 vmovss [rbp+var_C4], xmm0 } ggml_vec_sum_f32((unsigned int)v27, &v6, v8); __asm { vmovss xmm0, [rbp+var_C4] } _RAX = v7; __asm { vmovss dword ptr [rax], xmm0 } } } } } return result; }
ggml_compute_forward_sum_rows_f32: PUSH RBP MOV RBP,RSP SUB RSP,0xd0 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x98] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX],0x0 JZ 0x00125fe0 JMP 0x00126306 LAB_00125fe0: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x30],0x4 JZ 0x0012600c LEA RDI,[0x173b62] MOV ESI,0x15f8 LEA RDX,[0x173bc1] LEA RCX,[0x17483d] MOV AL,0x0 CALL 0x0010e270 LAB_0012600c: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x30],0x4 JZ 0x00126038 LEA RDI,[0x173b62] MOV ESI,0x15f9 LEA RDX,[0x173bc1] LEA RCX,[0x174821] MOV AL,0x0 CALL 0x0010e270 LAB_00126038: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x48] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RBP + -0x90],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x48] MOV qword ptr [RBP + -0x98],RAX CMP qword ptr [RBP + -0x60],0x1 JZ 0x00126129 LEA RDI,[0x173b62] MOV ESI,0x15fd LEA RDX,[0x173bc1] LEA RCX,[0x174a26] MOV AL,0x0 CALL 0x0010e270 LAB_00126129: MOV RAX,qword ptr [RBP + -0x68] CMP RAX,qword ptr [RBP + -0x28] JZ 0x00126154 LEA RDI,[0x173b62] MOV ESI,0x15fe LEA RDX,[0x173bc1] LEA RCX,[0x174a2f] MOV AL,0x0 CALL 0x0010e270 LAB_00126154: MOV RAX,qword ptr [RBP + -0x70] CMP RAX,qword ptr [RBP + -0x30] JZ 0x0012617f LEA RDI,[0x173b62] MOV ESI,0x15ff LEA RDX,[0x173bc1] LEA RCX,[0x174a3b] MOV AL,0x0 CALL 0x0010e270 LAB_0012617f: MOV RAX,qword ptr [RBP + -0x78] CMP RAX,qword ptr [RBP + -0x38] JZ 0x001261aa LEA RDI,[0x173b62] MOV ESI,0x1600 LEA RDX,[0x173bc1] LEA RCX,[0x174a47] MOV AL,0x0 CALL 0x0010e270 LAB_001261aa: MOV qword ptr [RBP + -0xa0],0x0 LAB_001261b5: MOV RAX,qword ptr [RBP + -0xa0] CMP RAX,qword ptr [RBP + -0x38] JGE 0x00126306 MOV qword ptr [RBP + -0xa8],0x0 LAB_001261d1: MOV RAX,qword ptr [RBP + -0xa8] CMP RAX,qword ptr [RBP + -0x30] JGE 0x001262ed MOV qword ptr [RBP + -0xb0],0x0 LAB_001261ed: MOV RAX,qword ptr [RBP + -0xb0] CMP RAX,qword ptr [RBP + -0x28] JGE 0x001262d4 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0xf8] MOV RCX,qword ptr [RBP + -0xb0] IMUL RCX,qword ptr [RBP + -0x48] ADD RAX,RCX MOV RCX,qword ptr [RBP + -0xa8] IMUL RCX,qword ptr [RBP + -0x50] ADD RAX,RCX MOV RCX,qword ptr [RBP + -0xa0] IMUL RCX,qword ptr [RBP + -0x58] ADD RAX,RCX MOV qword ptr [RBP + -0xb8],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xf8] MOV RCX,qword ptr [RBP + -0xb0] IMUL RCX,qword ptr [RBP + -0x88] ADD RAX,RCX MOV RCX,qword ptr [RBP + -0xa8] IMUL RCX,qword ptr [RBP + -0x90] ADD RAX,RCX MOV RCX,qword ptr [RBP + -0xa0] IMUL RCX,qword ptr [RBP + -0x98] ADD RAX,RCX MOV qword ptr [RBP + -0xc0],RAX VPXOR XMM0,XMM0,XMM0 VMOVSS dword ptr [RBP + -0xc4],XMM0 MOV RAX,qword ptr [RBP + -0x20] MOV EDI,EAX MOV RDX,qword ptr [RBP + -0xb8] LEA RSI,[RBP + -0xc4] CALL 0x00126310 VMOVSS XMM0,dword ptr [RBP + -0xc4] MOV RAX,qword ptr [RBP + -0xc0] VMOVSS dword ptr [RAX],XMM0 MOV RAX,qword ptr [RBP + -0xb0] ADD RAX,0x1 MOV qword ptr [RBP + -0xb0],RAX JMP 0x001261ed LAB_001262d4: JMP 0x001262d6 LAB_001262d6: MOV RAX,qword ptr [RBP + -0xa8] ADD RAX,0x1 MOV qword ptr [RBP + -0xa8],RAX JMP 0x001261d1 LAB_001262ed: JMP 0x001262ef LAB_001262ef: MOV RAX,qword ptr [RBP + -0xa0] ADD RAX,0x1 MOV qword ptr [RBP + -0xa0],RAX JMP 0x001261b5 LAB_00126306: ADD RSP,0xd0 POP RBP RET
void ggml_compute_forward_sum_rows_f32(int *param_1,long param_2) { int4 local_cc; int4 *local_c8; long local_c0; long local_b8; long local_b0; long local_a8; long local_a0; long local_98; long local_90; int8 local_88; long local_80; long local_78; long local_70; long local_68; long local_60; long local_58; long local_50; int8 local_48; long local_40; long local_38; long local_30; ulong local_28; long local_20; long local_18; int *local_10; local_20 = *(long *)(param_2 + 0x98); if (*param_1 == 0) { local_18 = param_2; local_10 = param_1; if (*(long *)(local_20 + 0x30) != 4) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x15f8,"GGML_ASSERT(%s) failed","src0->nb[0] == sizeof(float)"); } if (*(long *)(local_18 + 0x30) != 4) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x15f9,"GGML_ASSERT(%s) failed","dst->nb[0] == sizeof(float)"); } local_28 = *(ulong *)(local_20 + 0x10); local_30 = *(long *)(local_20 + 0x18); local_38 = *(long *)(local_20 + 0x20); local_40 = *(long *)(local_20 + 0x28); local_48 = *(int8 *)(local_20 + 0x30); local_50 = *(long *)(local_20 + 0x38); local_58 = *(long *)(local_20 + 0x40); local_60 = *(long *)(local_20 + 0x48); local_68 = *(long *)(local_18 + 0x10); local_70 = *(long *)(local_18 + 0x18); local_78 = *(long *)(local_18 + 0x20); local_80 = *(long *)(local_18 + 0x28); local_88 = *(int8 *)(local_18 + 0x30); local_90 = *(long *)(local_18 + 0x38); local_98 = *(long *)(local_18 + 0x40); local_a0 = *(long *)(local_18 + 0x48); if (local_68 != 1) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x15fd,"GGML_ASSERT(%s) failed","ne0 == 1"); } if (local_70 != local_30) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x15fe,"GGML_ASSERT(%s) failed","ne1 == ne01"); } if (local_78 != local_38) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x15ff,"GGML_ASSERT(%s) failed","ne2 == ne02"); } if (local_80 != local_40) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x1600,"GGML_ASSERT(%s) failed","ne3 == ne03"); } for (local_a8 = 0; local_a8 < local_40; local_a8 = local_a8 + 1) { for (local_b0 = 0; local_b0 < local_38; local_b0 = local_b0 + 1) { for (local_b8 = 0; local_b8 < local_30; local_b8 = local_b8 + 1) { local_c0 = *(long *)(local_20 + 0xf8) + local_b8 * local_50 + local_b0 * local_58 + local_a8 * local_60; local_c8 = (int4 *) (*(long *)(local_18 + 0xf8) + local_b8 * local_90 + local_b0 * local_98 + local_a8 * local_a0); local_cc = 0; ggml_vec_sum_f32(local_28 & 0xffffffff,&local_cc,local_c0); *local_c8 = local_cc; } } } } return; }
6,634
mysql_stmt_store_result_start
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_stmt_store_result_start(int *ret, MYSQL_STMT *stmt) { MK_ASYNC_START_BODY( mysql_stmt_store_result, stmt->mysql, { WIN_SET_NONBLOCKING(stmt->mysql) parms.stmt= stmt; }, 1, r_int, /* If stmt->mysql==NULL then we will not block so can call directly. */ if (!stmt->mysql) { *ret= mysql_stmt_store_result(stmt); return 0; }) }
O0
c
mysql_stmt_store_result_start: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x18(%rbp), %rax cmpq $0x0, 0x38(%rax) jne 0x6ee98 movq -0x18(%rbp), %rdi callq 0x5c8d0 movl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl $0x0, -0x4(%rbp) jmp 0x6efa9 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax movb $0x1, 0x14(%rax) movq -0x28(%rbp), %rdi addq $0x38, %rdi leaq 0xf2(%rip), %rsi # 0x6efc0 leaq -0x30(%rbp), %rdx callq 0x70f10 movl %eax, -0x1c(%rbp) movq -0x28(%rbp), %rax movb $0x0, 0x15(%rax) movq -0x28(%rbp), %rax movb $0x0, 0x14(%rax) cmpl $0x0, -0x1c(%rbp) jle 0x6ef06 movq -0x28(%rbp), %rax movb $0x1, 0x15(%rax) movq -0x28(%rbp), %rax movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0x6efa9 cmpl $0x0, -0x1c(%rbp) jge 0x6ef95 jmp 0x6ef12 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x1daa96(%rip), %rax # 0x2499d0 movq (%rax), %rsi movl $0x5, %edx callq 0x38140 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x29c(%rax) movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi addq $0x97, %rdi leaq 0x1daa74(%rip), %rax # 0x2499e0 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x38140 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x296(%rax) movq -0x10(%rbp), %rax movl $0x1, (%rax) jmp 0x6efa2 movq -0x28(%rbp), %rax movl 0x8(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mysql_stmt_store_result_start: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_18] cmp qword ptr [rax+38h], 0 jnz short loc_6EE98 mov rdi, [rbp+var_18] call mysql_stmt_store_result mov ecx, eax mov rax, [rbp+var_10] mov [rax], ecx mov [rbp+var_4], 0 jmp loc_6EFA9 loc_6EE98: mov rax, [rbp+var_18] mov rax, [rax+38h] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_28], rax mov rax, [rbp+var_18] mov [rbp+var_30], rax mov rax, [rbp+var_28] mov byte ptr [rax+14h], 1 mov rdi, [rbp+var_28] add rdi, 38h ; '8' lea rsi, mysql_stmt_store_result_start_internal lea rdx, [rbp+var_30] call my_context_spawn mov [rbp+var_1C], eax mov rax, [rbp+var_28] mov byte ptr [rax+15h], 0 mov rax, [rbp+var_28] mov byte ptr [rax+14h], 0 cmp [rbp+var_1C], 0 jle short loc_6EF06 mov rax, [rbp+var_28] mov byte ptr [rax+15h], 1 mov rax, [rbp+var_28] mov eax, [rax] mov [rbp+var_4], eax jmp loc_6EFA9 loc_6EF06: cmp [rbp+var_1C], 0 jge loc_6EF95 jmp short $+2 loc_6EF12: mov rax, [rbp+var_18] mov rax, [rax+38h] mov dword ptr [rax+90h], 7D8h mov rax, [rbp+var_18] mov rdi, [rax+38h] add rdi, 297h lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_18] mov rax, [rax+38h] mov byte ptr [rax+29Ch], 0 mov rax, [rbp+var_18] mov rdi, [rax+38h] add rdi, 97h lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy mov rax, [rbp+var_18] mov rax, [rax+38h] mov byte ptr [rax+296h], 0 mov rax, [rbp+var_10] mov dword ptr [rax], 1 jmp short loc_6EFA2 loc_6EF95: mov rax, [rbp+var_28] mov ecx, [rax+8] mov rax, [rbp+var_10] mov [rax], ecx loc_6EFA2: mov [rbp+var_4], 0 loc_6EFA9: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long mysql_stmt_store_result_start(_DWORD *a1, long long a2) { long long v3; // [rsp+0h] [rbp-30h] BYREF unsigned int *v4; // [rsp+8h] [rbp-28h] int v5; // [rsp+14h] [rbp-1Ch] long long v6; // [rsp+18h] [rbp-18h] _DWORD *v7; // [rsp+20h] [rbp-10h] v7 = a1; v6 = a2; if ( *(_QWORD *)(a2 + 56) ) { v4 = *(unsigned int **)(*(_QWORD *)(*(_QWORD *)(v6 + 56) + 1152LL) + 40LL); v3 = v6; *((_BYTE *)v4 + 20) = 1; v5 = my_context_spawn(v4 + 14, mysql_stmt_store_result_start_internal, &v3); *((_BYTE *)v4 + 21) = 0; *((_BYTE *)v4 + 20) = 0; if ( v5 <= 0 ) { if ( v5 >= 0 ) { *v7 = v4[2]; } else { *(_DWORD *)(*(_QWORD *)(v6 + 56) + 144LL) = 2008; strncpy(*(_QWORD *)(v6 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(*(_QWORD *)(v6 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(v6 + 56) + 151LL, client_errors[8], 511LL); *(_BYTE *)(*(_QWORD *)(v6 + 56) + 662LL) = 0; *v7 = 1; } return 0; } else { *((_BYTE *)v4 + 21) = 1; return *v4; } } else { *v7 = mysql_stmt_store_result(v6); return 0; } }
mysql_stmt_store_result_start: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x38],0x0 JNZ 0x0016ee98 MOV RDI,qword ptr [RBP + -0x18] CALL 0x0015c8d0 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV dword ptr [RBP + -0x4],0x0 JMP 0x0016efa9 LAB_0016ee98: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x14],0x1 MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x38 LEA RSI,[0x16efc0] LEA RDX,[RBP + -0x30] CALL 0x00170f10 MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x15],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x14],0x0 CMP dword ptr [RBP + -0x1c],0x0 JLE 0x0016ef06 MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x15],0x1 MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX JMP 0x0016efa9 LAB_0016ef06: CMP dword ptr [RBP + -0x1c],0x0 JGE 0x0016ef95 JMP 0x0016ef12 LAB_0016ef12: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV dword ptr [RAX + 0x90],0x7d8 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x297 LEA RAX,[0x3499d0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00138140 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV byte ptr [RAX + 0x29c],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x97 LEA RAX,[0x3499e0] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x00138140 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV byte ptr [RAX + 0x296],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],0x1 JMP 0x0016efa2 LAB_0016ef95: MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX LAB_0016efa2: MOV dword ptr [RBP + -0x4],0x0 LAB_0016efa9: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 mysql_stmt_store_result_start(int4 *param_1,long param_2) { int4 uVar1; long local_38; int4 *local_30; int local_24; long local_20; int4 *local_18; int4 local_c; local_20 = param_2; local_18 = param_1; if (*(long *)(param_2 + 0x38) == 0) { uVar1 = mysql_stmt_store_result(param_2); *local_18 = uVar1; local_c = 0; } else { local_30 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28); *(int1 *)(local_30 + 5) = 1; local_38 = param_2; local_24 = my_context_spawn(local_30 + 0xe,mysql_stmt_store_result_start_internal,&local_38); *(int1 *)((long)local_30 + 0x15) = 0; *(int1 *)(local_30 + 5) = 0; if (local_24 < 1) { if (local_24 < 0) { *(int4 *)(*(long *)(local_20 + 0x38) + 0x90) = 0x7d8; strncpy((char *)(*(long *)(local_20 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(local_20 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(local_20 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_00349a20, 0x1ff); *(int1 *)(*(long *)(local_20 + 0x38) + 0x296) = 0; *local_18 = 1; } else { *local_18 = local_30[2]; } local_c = 0; } else { *(int1 *)((long)local_30 + 0x15) = 1; local_c = *local_30; } } return local_c; }
6,635
mysql_stmt_store_result_start
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_stmt_store_result_start(int *ret, MYSQL_STMT *stmt) { MK_ASYNC_START_BODY( mysql_stmt_store_result, stmt->mysql, { WIN_SET_NONBLOCKING(stmt->mysql) parms.stmt= stmt; }, 1, r_int, /* If stmt->mysql==NULL then we will not block so can call directly. */ if (!stmt->mysql) { *ret= mysql_stmt_store_result(stmt); return 0; }) }
O3
c
mysql_stmt_store_result_start: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq 0x38(%rsi), %rax testq %rax, %rax je 0x5b167 movq 0x480(%rax), %rax movq 0x28(%rax), %r15 leaq -0x20(%rbp), %rdx movq %r14, (%rdx) movb $0x1, 0x14(%r15) leaq 0x38(%r15), %rdi leaq 0xa2(%rip), %rsi # 0x5b1ef callq 0x5c670 movw $0x0, 0x14(%r15) testl %eax, %eax jle 0x5b171 movb $0x1, 0x15(%r15) movl (%r15), %eax jmp 0x5b1e4 movq %r14, %rdi callq 0x5003e jmp 0x5b1e0 js 0x5b179 movl 0x8(%r15), %eax jmp 0x5b1e0 movq 0x38(%r14), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movl $0x297, %edi # imm = 0x297 addq 0x38(%r14), %rdi leaq 0x2f23e9(%rip), %rax # 0x34d580 movq (%rax), %rsi movl $0x5, %edx callq 0x37130 movq 0x38(%r14), %rax xorl %r15d, %r15d movb %r15b, 0x29c(%rax) movl $0x97, %edi addq 0x38(%r14), %rdi leaq 0x2f23ce(%rip), %rax # 0x34d590 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x37130 movq 0x38(%r14), %rax movb %r15b, 0x296(%rax) movl $0x1, %eax movl %eax, (%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
mysql_stmt_store_result_start: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, rsi mov rbx, rdi mov rax, [rsi+38h] test rax, rax jz short loc_5B167 mov rax, [rax+480h] mov r15, [rax+28h] lea rdx, [rbp+var_20] mov [rdx], r14 mov byte ptr [r15+14h], 1 lea rdi, [r15+38h] lea rsi, mysql_stmt_store_result_start_internal call my_context_spawn mov word ptr [r15+14h], 0 test eax, eax jle short loc_5B171 mov byte ptr [r15+15h], 1 mov eax, [r15] jmp short loc_5B1E4 loc_5B167: mov rdi, r14 call mysql_stmt_store_result jmp short loc_5B1E0 loc_5B171: js short loc_5B179 mov eax, [r15+8] jmp short loc_5B1E0 loc_5B179: mov rax, [r14+38h] mov dword ptr [rax+90h], 7D8h mov edi, 297h add rdi, [r14+38h] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [r14+38h] xor r15d, r15d mov [rax+29Ch], r15b mov edi, 97h add rdi, [r14+38h] lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy mov rax, [r14+38h] mov [rax+296h], r15b mov eax, 1 loc_5B1E0: mov [rbx], eax xor eax, eax loc_5B1E4: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long mysql_stmt_store_result_start(int *a1, long long a2) { long long v2; // rax long long v3; // rax unsigned int *v4; // r15 int v5; // eax int v7; // eax long long v8[4]; // [rsp+0h] [rbp-20h] BYREF v8[0] = v2; v3 = *(_QWORD *)(a2 + 56); if ( v3 ) { v4 = *(unsigned int **)(*(_QWORD *)(v3 + 1152) + 40LL); v8[0] = a2; *((_BYTE *)v4 + 20) = 1; v5 = my_context_spawn(v4 + 14, mysql_stmt_store_result_start_internal, v8); *((_WORD *)v4 + 10) = 0; if ( v5 > 0 ) { *((_BYTE *)v4 + 21) = 1; return *v4; } if ( v5 < 0 ) { *(_DWORD *)(*(_QWORD *)(a2 + 56) + 144LL) = 2008; strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[8], 511LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0; v7 = 1; } else { v7 = v4[2]; } } else { v7 = mysql_stmt_store_result(a2); } *a1 = v7; return 0LL; }
mysql_stmt_store_result_start: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr [RSI + 0x38] TEST RAX,RAX JZ 0x0015b167 MOV RAX,qword ptr [RAX + 0x480] MOV R15,qword ptr [RAX + 0x28] LEA RDX,[RBP + -0x20] MOV qword ptr [RDX],R14 MOV byte ptr [R15 + 0x14],0x1 LEA RDI,[R15 + 0x38] LEA RSI,[0x15b1ef] CALL 0x0015c670 MOV word ptr [R15 + 0x14],0x0 TEST EAX,EAX JLE 0x0015b171 MOV byte ptr [R15 + 0x15],0x1 MOV EAX,dword ptr [R15] JMP 0x0015b1e4 LAB_0015b167: MOV RDI,R14 CALL 0x0015003e JMP 0x0015b1e0 LAB_0015b171: JS 0x0015b179 MOV EAX,dword ptr [R15 + 0x8] JMP 0x0015b1e0 LAB_0015b179: MOV RAX,qword ptr [R14 + 0x38] MOV dword ptr [RAX + 0x90],0x7d8 MOV EDI,0x297 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x44d580] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00137130 MOV RAX,qword ptr [R14 + 0x38] XOR R15D,R15D MOV byte ptr [RAX + 0x29c],R15B MOV EDI,0x97 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x44d590] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x00137130 MOV RAX,qword ptr [R14 + 0x38] MOV byte ptr [RAX + 0x296],R15B MOV EAX,0x1 LAB_0015b1e0: MOV dword ptr [RBX],EAX XOR EAX,EAX LAB_0015b1e4: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int4 mysql_stmt_store_result_start(int4 *param_1,long param_2) { int4 *puVar1; int iVar2; int4 uVar3; if (*(long *)(param_2 + 0x38) == 0) { uVar3 = mysql_stmt_store_result(param_2); } else { puVar1 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28); *(int1 *)(puVar1 + 5) = 1; iVar2 = my_context_spawn(puVar1 + 0xe,mysql_stmt_store_result_start_internal); *(int2 *)(puVar1 + 5) = 0; if (0 < iVar2) { *(int1 *)((long)puVar1 + 0x15) = 1; return *puVar1; } if (iVar2 < 0) { *(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7d8; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_0044d5d0, 0x1ff); *(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0; uVar3 = 1; } else { uVar3 = puVar1[2]; } } *param_1 = uVar3; return 0; }
6,636
my_strnxfrm_latin1_de
eloqsql/strings/ctype-latin1.c
static size_t my_strnxfrm_latin1_de(CHARSET_INFO *cs, uchar *dst, size_t dstlen, uint nweights, const uchar* src, size_t srclen, uint flags) { uchar *de= dst + dstlen; const uchar *se= src + srclen; uchar *d0= dst; for ( ; src < se && dst < de && nweights; src++, nweights--) { uchar chr= combo1map[*src]; *dst++= chr; if ((chr= combo2map[*src]) && dst < de && nweights > 1) { *dst++= chr; nweights--; } } return my_strxfrm_pad_desc_and_reverse(cs, d0, dst, de, nweights, flags, 0); }
O3
c
my_strnxfrm_latin1_de: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r9, %rax movl %ecx, %r10d movq %rdx, %rcx movl 0x10(%rbp), %r9d addq %rsi, %rcx testq %rax, %rax jle 0x6b38b addq %r8, %rax leaq 0x16f11b(%rip), %r11 # 0x1da440 leaq 0x16f214(%rip), %rbx # 0x1da540 movq %rsi, %r14 cmpq %rcx, %r14 jae 0x6b390 testl %r10d, %r10d je 0x6b390 movzbl (%r8), %edx movb (%rdx,%r11), %r15b leaq 0x1(%r14), %rdx movb %r15b, (%r14) movzbl (%r8), %r15d movb (%r15,%rbx), %r15b testb %r15b, %r15b je 0x6b37b cmpq %rcx, %rdx setb %r12b cmpl $0x2, %r10d setae %r13b andb %r12b, %r13b cmpb $0x1, %r13b jne 0x6b37b movb %r15b, 0x1(%r14) addq $0x2, %r14 decl %r10d movq %r14, %rdx incq %r8 decl %r10d movq %rdx, %r14 cmpq %rax, %r8 jb 0x6b32f jmp 0x6b393 movq %rsi, %rdx jmp 0x6b393 movq %r14, %rdx movl $0x0, (%rsp) movl %r10d, %r8d callq 0x6d11c addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nopl (%rax)
my_strnxfrm_latin1_de: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rax, r9 mov r10d, ecx mov rcx, rdx mov r9d, [rbp+arg_0] add rcx, rsi test rax, rax jle short loc_6B38B add rax, r8 lea r11, combo1map lea rbx, combo2map mov r14, rsi loc_6B32F: cmp r14, rcx jnb short loc_6B390 test r10d, r10d jz short loc_6B390 movzx edx, byte ptr [r8] mov r15b, [rdx+r11] lea rdx, [r14+1] mov [r14], r15b movzx r15d, byte ptr [r8] mov r15b, [r15+rbx] test r15b, r15b jz short loc_6B37B cmp rdx, rcx setb r12b cmp r10d, 2 setnb r13b and r13b, r12b cmp r13b, 1 jnz short loc_6B37B mov [r14+1], r15b add r14, 2 dec r10d mov rdx, r14 loc_6B37B: inc r8 dec r10d mov r14, rdx cmp r8, rax jb short loc_6B32F jmp short loc_6B393 loc_6B38B: mov rdx, rsi jmp short loc_6B393 loc_6B390: mov rdx, r14 loc_6B393: mov [rsp+30h+var_30], 0 mov r8d, r10d call my_strxfrm_pad_desc_and_reverse add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_strnxfrm_latin1_de( int a1, _BYTE *a2, long long a3, unsigned int a4, unsigned __int8 *a5, long long a6, int a7) { unsigned long long v8; // rcx unsigned __int8 *v9; // rax _BYTE *v10; // r14 _BYTE *v11; // rdx unsigned __int8 v12; // r15 v8 = (unsigned long long)&a2[a3]; if ( a6 <= 0 ) { LODWORD(v11) = (_DWORD)a2; } else { v9 = &a5[a6]; v10 = a2; while ( (unsigned long long)v10 < v8 && a4 ) { v11 = v10 + 1; *v10 = combo1map[*a5]; v12 = combo2map[*a5]; if ( v12 && (unsigned long long)v11 < v8 && a4 >= 2 ) { v10[1] = v12; --a4; v11 = v10 + 2; } ++a5; --a4; v10 = v11; if ( a5 >= v9 ) return my_strxfrm_pad_desc_and_reverse(a1, (_DWORD)a2, (_DWORD)v11, v8, a4, a7, 0); } LODWORD(v11) = (_DWORD)v10; } return my_strxfrm_pad_desc_and_reverse(a1, (_DWORD)a2, (_DWORD)v11, v8, a4, a7, 0); }
my_strnxfrm_latin1_de: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RAX,R9 MOV R10D,ECX MOV RCX,RDX MOV R9D,dword ptr [RBP + 0x10] ADD RCX,RSI TEST RAX,RAX JLE 0x0016b38b ADD RAX,R8 LEA R11,[0x2da440] LEA RBX,[0x2da540] MOV R14,RSI LAB_0016b32f: CMP R14,RCX JNC 0x0016b390 TEST R10D,R10D JZ 0x0016b390 MOVZX EDX,byte ptr [R8] MOV R15B,byte ptr [RDX + R11*0x1] LEA RDX,[R14 + 0x1] MOV byte ptr [R14],R15B MOVZX R15D,byte ptr [R8] MOV R15B,byte ptr [R15 + RBX*0x1] TEST R15B,R15B JZ 0x0016b37b CMP RDX,RCX SETC R12B CMP R10D,0x2 SETNC R13B AND R13B,R12B CMP R13B,0x1 JNZ 0x0016b37b MOV byte ptr [R14 + 0x1],R15B ADD R14,0x2 DEC R10D MOV RDX,R14 LAB_0016b37b: INC R8 DEC R10D MOV R14,RDX CMP R8,RAX JC 0x0016b32f JMP 0x0016b393 LAB_0016b38b: MOV RDX,RSI JMP 0x0016b393 LAB_0016b390: MOV RDX,R14 LAB_0016b393: MOV dword ptr [RSP],0x0 MOV R8D,R10D CALL 0x0016d11c ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void my_strnxfrm_latin1_de (int8 param_1,int1 *param_2,long param_3,uint param_4,byte *param_5, long param_6,int4 param_7) { ulong in_RAX; byte *pbVar1; int1 *puVar2; int1 *puVar3; int1 *puVar4; puVar2 = param_2 + param_3; puVar4 = param_2; if (0 < param_6) { pbVar1 = param_5 + param_6; puVar3 = param_2; do { puVar4 = puVar3; if ((puVar2 <= puVar3) || (param_4 == 0)) break; puVar4 = puVar3 + 1; *puVar3 = combo1map[*param_5]; if ((combo2map[*param_5] != '\0') && (1 < param_4 && puVar4 < puVar2)) { puVar3[1] = combo2map[*param_5]; puVar4 = puVar3 + 2; param_4 = param_4 - 1; } param_5 = param_5 + 1; param_4 = param_4 - 1; puVar3 = puVar4; } while (param_5 < pbVar1); } my_strxfrm_pad_desc_and_reverse (param_1,param_2,puVar4,puVar2,param_4,param_7,in_RAX & 0xffffffff00000000); return; }
6,637
testing::(anonymous namespace)::PrintBytesInObjectToImpl(unsigned char const*, unsigned long, std::ostream*)
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-printers.cc
void PrintBytesInObjectToImpl(const unsigned char* obj_bytes, size_t count, ostream* os) { // Tells the user how big the object is. *os << count << "-byte object <"; const size_t kThreshold = 132; const size_t kChunkSize = 64; // If the object size is bigger than kThreshold, we'll have to omit // some details by printing only the first and the last kChunkSize // bytes. if (count < kThreshold) { PrintByteSegmentInObjectTo(obj_bytes, 0, count, os); } else { PrintByteSegmentInObjectTo(obj_bytes, 0, kChunkSize, os); *os << " ... "; // Rounds up to 2-byte boundary. const size_t resume_pos = (count - kChunkSize + 1) / 2 * 2; PrintByteSegmentInObjectTo(obj_bytes, resume_pos, count - resume_pos, os); } *os << ">"; }
O0
cpp
testing::(anonymous namespace)::PrintBytesInObjectToImpl(unsigned char const*, unsigned long, std::ostream*): subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movq %rdx, 0x20(%rsp) movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x16130 movq %rax, %rdi leaq 0x5bc67(%rip), %rsi # 0x11e4c3 callq 0x166e0 movq $0x84, 0x18(%rsp) movq $0x40, 0x10(%rsp) cmpq $0x84, 0x28(%rsp) jae 0xc2898 movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rdx movq 0x20(%rsp), %rcx xorl %eax, %eax movl %eax, %esi callq 0xe56d0 jmp 0xc28f7 movq 0x30(%rsp), %rdi movq 0x20(%rsp), %rcx xorl %eax, %eax movl %eax, %esi movl $0x40, %edx callq 0xe56d0 movq 0x20(%rsp), %rdi leaq 0x5bc16(%rip), %rsi # 0x11e4d2 callq 0x166e0 movq 0x28(%rsp), %rax subq $0x40, %rax addq $0x1, %rax shrq %rax shlq %rax movq %rax, 0x8(%rsp) movq 0x30(%rsp), %rdi movq 0x8(%rsp), %rsi movq 0x28(%rsp), %rdx subq 0x8(%rsp), %rdx movq 0x20(%rsp), %rcx callq 0xe56d0 movq 0x20(%rsp), %rdi leaq 0x5b240(%rip), %rsi # 0x11db43 callq 0x166e0 addq $0x38, %rsp retq nopl (%rax)
_ZN7testing12_GLOBAL__N_124PrintBytesInObjectToImplEPKhmPSo: sub rsp, 38h mov [rsp+38h+var_8], rdi mov [rsp+38h+var_10], rsi mov [rsp+38h+var_18], rdx mov rdi, [rsp+38h+var_18] mov rsi, [rsp+38h+var_10] call __ZNSolsEm; std::ostream::operator<<(ulong) mov rdi, rax lea rsi, aByteObject; "-byte object <" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+38h+var_20], 84h mov [rsp+38h+var_28], 40h ; '@' cmp [rsp+38h+var_10], 84h jnb short loc_C2898 mov rdi, [rsp+38h+var_8]; this mov rdx, [rsp+38h+var_10]; unsigned __int64 mov rcx, [rsp+38h+var_18]; unsigned __int64 xor eax, eax mov esi, eax; unsigned __int8 * call _ZN7testing12_GLOBAL__N_126PrintByteSegmentInObjectToEPKhmmPSo; testing::`anonymous namespace'::PrintByteSegmentInObjectTo(uchar const*,ulong,ulong,std::ostream *) jmp short loc_C28F7 loc_C2898: mov rdi, [rsp+38h+var_8]; this mov rcx, [rsp+38h+var_18]; unsigned __int64 xor eax, eax mov esi, eax; unsigned __int8 * mov edx, 40h ; '@'; unsigned __int64 call _ZN7testing12_GLOBAL__N_126PrintByteSegmentInObjectToEPKhmmPSo; testing::`anonymous namespace'::PrintByteSegmentInObjectTo(uchar const*,ulong,ulong,std::ostream *) mov rdi, [rsp+38h+var_18] lea rsi, asc_11E4D2; " ... " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rax, [rsp+38h+var_10] sub rax, 40h ; '@' add rax, 1 shr rax, 1 shl rax, 1 mov [rsp+38h+var_30], rax mov rdi, [rsp+38h+var_8]; this mov rsi, [rsp+38h+var_30]; unsigned __int8 * mov rdx, [rsp+38h+var_10] sub rdx, [rsp+38h+var_30]; unsigned __int64 mov rcx, [rsp+38h+var_18]; unsigned __int64 call _ZN7testing12_GLOBAL__N_126PrintByteSegmentInObjectToEPKhmmPSo; testing::`anonymous namespace'::PrintByteSegmentInObjectTo(uchar const*,ulong,ulong,std::ostream *) loc_C28F7: mov rdi, [rsp+38h+var_18] lea rsi, aType_0+9; ">" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) add rsp, 38h retn
long long testing::`anonymous namespace'::PrintBytesInObjectToImpl( testing::_anonymous_namespace_ *this, const unsigned __int8 *a2, unsigned long long a3, std::ostream *a4) { long long v4; // rax std::ostream *v5; // r8 std::ostream *v6; // r8 v4 = std::ostream::operator<<(a3, a2); std::operator<<<std::char_traits<char>>(v4, "-byte object <"); if ( (unsigned long long)a2 >= 0x84 ) { testing::`anonymous namespace'::PrintByteSegmentInObjectTo(this, 0LL, 0x40uLL, a3, v5); std::operator<<<std::char_traits<char>>(a3, " ... "); testing::`anonymous namespace'::PrintByteSegmentInObjectTo( this, (const unsigned __int8 *)(2 * ((unsigned long long)(a2 - 63) >> 1)), (unsigned long long)&a2[-2 * ((unsigned long long)(a2 - 63) >> 1)], a3, v6); } else { testing::`anonymous namespace'::PrintByteSegmentInObjectTo(this, 0LL, (unsigned long long)a2, a3, v5); } return std::operator<<<std::char_traits<char>>(a3, ">"); }
PrintBytesInObjectToImpl: SUB RSP,0x38 MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x20],RDX MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x28] CALL 0x00116130 MOV RDI,RAX LEA RSI,[0x21e4c3] CALL 0x001166e0 MOV qword ptr [RSP + 0x18],0x84 MOV qword ptr [RSP + 0x10],0x40 CMP qword ptr [RSP + 0x28],0x84 JNC 0x001c2898 MOV RDI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x20] XOR EAX,EAX MOV ESI,EAX CALL 0x001e56d0 JMP 0x001c28f7 LAB_001c2898: MOV RDI,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RSP + 0x20] XOR EAX,EAX MOV ESI,EAX MOV EDX,0x40 CALL 0x001e56d0 MOV RDI,qword ptr [RSP + 0x20] LEA RSI,[0x21e4d2] CALL 0x001166e0 MOV RAX,qword ptr [RSP + 0x28] SUB RAX,0x40 ADD RAX,0x1 SHR RAX,0x1 SHL RAX,0x1 MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x28] SUB RDX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x20] CALL 0x001e56d0 LAB_001c28f7: MOV RDI,qword ptr [RSP + 0x20] LEA RSI,[0x21db43] CALL 0x001166e0 ADD RSP,0x38 RET
/* testing::(anonymous namespace)::PrintBytesInObjectToImpl(unsigned char const*, unsigned long, std::ostream*) */ void testing::(anonymous_namespace)::PrintBytesInObjectToImpl (uchar *param_1,ulong param_2,ostream *param_3) { ostream *poVar1; ulong uVar2; poVar1 = (ostream *)std::ostream::operator<<(param_3,param_2); std::operator<<(poVar1,"-byte object <"); if (param_2 < 0x84) { PrintByteSegmentInObjectTo(param_1,0,param_2,param_3); } else { PrintByteSegmentInObjectTo(param_1,0,0x40,param_3); std::operator<<(param_3," ... "); uVar2 = param_2 - 0x3f & 0xfffffffffffffffe; PrintByteSegmentInObjectTo(param_1,uVar2,param_2 - uVar2,param_3); } std::operator<<(param_3,">"); return; }
6,638
maria_status
eloqsql/storage/maria/ma_info.c
int maria_status(MARIA_HA *info, register MARIA_INFO *x, uint flag) { MY_STAT state; MARIA_SHARE *share= info->s; DBUG_ENTER("maria_status"); DBUG_PRINT("info", ("records: %lld", info->state->records)); x->recpos= info->cur_row.lastpos; if (flag == HA_STATUS_POS) DBUG_RETURN(0); /* Compatible with ISAM */ if (!(flag & HA_STATUS_NO_LOCK)) { mysql_mutex_lock(&share->intern_lock); _ma_readinfo(info,F_RDLCK,0); fast_ma_writeinfo(info); mysql_mutex_unlock(&share->intern_lock); } if (flag & HA_STATUS_VARIABLE) { /* If table is locked, give versioned number otherwise last commited */ if (info->lock_type == F_UNLCK) x->records = share->state.state.records; else x->records = info->state->records; x->deleted = share->state.state.del; x->delete_length = share->state.state.empty; x->data_file_length = share->state.state.data_file_length; x->index_file_length= share->state.state.key_file_length; x->keys = share->state.header.keys; x->check_time = share->state.check_time; x->mean_reclength = x->records ? (ulong) ((x->data_file_length - x->delete_length) /x->records) : (ulong) share->min_pack_length; } if (flag & HA_STATUS_ERRKEY) { x->errkey= info->errkey; x->dup_key_pos= info->dup_key_pos; } if (flag & HA_STATUS_CONST) { x->reclength = share->base.reclength; x->max_data_file_length=share->base.max_data_file_length; x->max_index_file_length=info->s->base.max_key_file_length; x->filenr = info->dfile.file; x->options = share->options; x->create_time=share->state.create_time; x->reflength= maria_get_pointer_length(share->base.max_data_file_length, maria_data_pointer_size); x->record_offset= (info->s->data_file_type == STATIC_RECORD ? share->base.pack_reclength: 0); x->sortkey= -1; /* No clustering */ x->rec_per_key = share->state.rec_per_key_part; x->key_map = share->state.key_map; x->data_file_name = share->data_file_name.str; x->index_file_name = share->index_file_name.str; x->data_file_type = share->data_file_type; } if ((flag & HA_STATUS_TIME) && !my_fstat(info->dfile.file, &state, MYF(0))) x->update_time=state.st_mtime; else x->update_time=0; if (flag & HA_STATUS_AUTO) { x->auto_increment= share->state.auto_increment+1; if (!x->auto_increment) /* This shouldn't happen */ x->auto_increment= ~(ulonglong) 0; } DBUG_RETURN(0); }
O3
c
maria_status: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x98, %rsp movq (%rdi), %r13 movq 0x98(%rdi), %rax movq %rax, 0x10(%rsi) cmpl $0x1, %edx je 0x3787a movl %edx, %r14d movq %rsi, %rbx movq %rdi, %r15 testb $0x2, %r14b jne 0x376c3 leaq 0x8f0(%r13), %r12 cmpq $0x0, 0x930(%r13) jne 0x3788e movq %r12, %rdi callq 0x29220 movq %r15, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x38d0a movq (%r15), %rax cmpl $0x0, 0x7b8(%rax) jne 0x376ab movq %r15, %rdi xorl %esi, %esi callq 0x38d12 movq 0x930(%r13), %rdi testq %rdi, %rdi jne 0x378a7 movq %r12, %rdi callq 0x291e0 testb $0x10, %r14b je 0x37736 cmpl $0x2, 0x664(%r15) jne 0x376d9 leaq 0x18(%r13), %rax jmp 0x376dd movq 0x20(%r15), %rax movq (%rax), %rcx movq %rcx, (%rbx) movq 0x20(%r13), %rax movq %rax, 0x8(%rbx) movq 0x28(%r13), %rdx movq %rdx, 0x48(%rbx) movq 0x40(%r13), %rax movq %rax, 0x28(%rbx) movq 0x38(%r13), %rsi movq %rsi, 0x38(%rbx) movzbl 0x12(%r13), %esi movl %esi, 0xac(%rbx) movq 0x160(%r13), %rsi movq %rsi, 0x68(%rbx) testq %rcx, %rcx je 0x37728 subq %rdx, %rax xorl %edx, %edx divq %rcx jmp 0x3772f movq 0x728(%r13), %rax movq %rax, 0x90(%rbx) testb $0x20, %r14b je 0x37754 movl 0x660(%r15), %eax movl %eax, 0xb8(%rbx) movq 0x428(%r15), %rax movq %rax, 0x20(%rbx) testb $0x8, %r14b je 0x3782c movq 0x398(%r13), %rax movq %rax, 0x88(%rbx) movq 0x368(%r13), %rax movq %rax, 0x30(%rbx) movq (%r15), %rax movq 0x370(%rax), %rax movq %rax, 0x40(%rbx) movl 0x480(%r15), %eax movl %eax, 0xc0(%rbx) movl 0x720(%r13), %eax movl %eax, 0xb0(%rbx) movq 0x150(%r13), %rax movq %rax, 0x60(%rbx) movq 0x368(%r13), %rdi leaq 0x34e980(%rip), %rax # 0x386138 movl (%rax), %esi callq 0x467fb movl %eax, 0xb4(%rbx) movq (%r15), %rax cmpl $0x0, 0x7d0(%rax) je 0x377d5 xorl %eax, %eax jmp 0x377dc movq 0x3a0(%r13), %rax movq %rax, 0x78(%rbx) movl $0xffffffff, 0xbc(%rbx) # imm = 0xFFFFFFFF movq 0x100(%r13), %rax movq %rax, 0x80(%rbx) movq 0x140(%r13), %rax movq %rax, 0x58(%rbx) movq 0x5c0(%r13), %rax movq %rax, 0x98(%rbx) movq 0x5d0(%r13), %rax movq %rax, 0xa0(%rbx) movl 0x7d0(%r13), %eax movl %eax, 0xa8(%rbx) testb $0x4, %r14b jne 0x37837 xorl %r15d, %r15d jmp 0x37857 movl 0x480(%r15), %edi xorl %r15d, %r15d leaq -0xb8(%rbp), %rsi xorl %edx, %edx callq 0xa0a73 testl %eax, %eax jne 0x37857 movq -0x60(%rbp), %r15 movq %r15, 0x70(%rbx) testb $0x40, %r14b je 0x3787a movq 0xd8(%r13), %rax incq %rax movq $-0x1, %rcx cmovneq %rax, %rcx movq %rcx, 0x50(%rbx) xorl %eax, %eax addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0xa309e(%rip), %rsi # 0xda933 movq %r12, %rdi movl $0x34, %edx callq 0x2eb8f jmp 0x37689 leaq 0x350812(%rip), %rax # 0x3880c0 movq (%rax), %rax callq *0x160(%rax) jmp 0x376bb
maria_status: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 98h mov r13, [rdi] mov rax, [rdi+98h] mov [rsi+10h], rax cmp edx, 1 jz loc_3787A mov r14d, edx mov rbx, rsi mov r15, rdi test r14b, 2 jnz short loc_376C3 lea r12, [r13+8F0h] cmp qword ptr [r13+930h], 0 jnz loc_3788E mov rdi, r12 call _pthread_mutex_lock loc_37689: mov rdi, r15 xor esi, esi xor edx, edx call _ma_readinfo mov rax, [r15] cmp dword ptr [rax+7B8h], 0 jnz short loc_376AB mov rdi, r15 xor esi, esi call _ma_writeinfo loc_376AB: mov rdi, [r13+930h] test rdi, rdi jnz loc_378A7 loc_376BB: mov rdi, r12 call _pthread_mutex_unlock loc_376C3: test r14b, 10h jz short loc_37736 cmp dword ptr [r15+664h], 2 jnz short loc_376D9 lea rax, [r13+18h] jmp short loc_376DD loc_376D9: mov rax, [r15+20h] loc_376DD: mov rcx, [rax] mov [rbx], rcx mov rax, [r13+20h] mov [rbx+8], rax mov rdx, [r13+28h] mov [rbx+48h], rdx mov rax, [r13+40h] mov [rbx+28h], rax mov rsi, [r13+38h] mov [rbx+38h], rsi movzx esi, byte ptr [r13+12h] mov [rbx+0ACh], esi mov rsi, [r13+160h] mov [rbx+68h], rsi test rcx, rcx jz short loc_37728 sub rax, rdx xor edx, edx div rcx jmp short loc_3772F loc_37728: mov rax, [r13+728h] loc_3772F: mov [rbx+90h], rax loc_37736: test r14b, 20h jz short loc_37754 mov eax, [r15+660h] mov [rbx+0B8h], eax mov rax, [r15+428h] mov [rbx+20h], rax loc_37754: test r14b, 8 jz loc_3782C mov rax, [r13+398h] mov [rbx+88h], rax mov rax, [r13+368h] mov [rbx+30h], rax mov rax, [r15] mov rax, [rax+370h] mov [rbx+40h], rax mov eax, [r15+480h] mov [rbx+0C0h], eax mov eax, [r13+720h] mov [rbx+0B0h], eax mov rax, [r13+150h] mov [rbx+60h], rax mov rdi, [r13+368h] lea rax, maria_data_pointer_size mov esi, [rax] call maria_get_pointer_length mov [rbx+0B4h], eax mov rax, [r15] cmp dword ptr [rax+7D0h], 0 jz short loc_377D5 xor eax, eax jmp short loc_377DC loc_377D5: mov rax, [r13+3A0h] loc_377DC: mov [rbx+78h], rax mov dword ptr [rbx+0BCh], 0FFFFFFFFh mov rax, [r13+100h] mov [rbx+80h], rax mov rax, [r13+140h] mov [rbx+58h], rax mov rax, [r13+5C0h] mov [rbx+98h], rax mov rax, [r13+5D0h] mov [rbx+0A0h], rax mov eax, [r13+7D0h] mov [rbx+0A8h], eax loc_3782C: test r14b, 4 jnz short loc_37837 xor r15d, r15d jmp short loc_37857 loc_37837: mov edi, [r15+480h] xor r15d, r15d lea rsi, [rbp+var_B8] xor edx, edx call my_fstat test eax, eax jnz short loc_37857 mov r15, [rbp+var_60] loc_37857: mov [rbx+70h], r15 test r14b, 40h jz short loc_3787A mov rax, [r13+0D8h] inc rax mov rcx, 0FFFFFFFFFFFFFFFFh cmovnz rcx, rax mov [rbx+50h], rcx loc_3787A: xor eax, eax add rsp, 98h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3788E: lea rsi, aWorkspaceLlm4b_26; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r12 mov edx, 34h ; '4' call psi_mutex_lock jmp loc_37689 loc_378A7: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_376BB
long long maria_status(_DWORD *a1, long long a2, int a3) { long long v3; // r13 char v4; // r14 unsigned long long *v5; // rax unsigned long long v6; // rcx long long v7; // rdx long long v8; // rax unsigned long long v9; // rax long long v10; // rax long long v11; // r15 long long v12; // rcx _BYTE v14[88]; // [rsp+8h] [rbp-B8h] BYREF long long v15; // [rsp+60h] [rbp-60h] v3 = *(_QWORD *)a1; *(_QWORD *)(a2 + 16) = *((_QWORD *)a1 + 19); if ( a3 != 1 ) { v4 = a3; if ( (a3 & 2) == 0 ) { if ( *(_QWORD *)(v3 + 2352) ) psi_mutex_lock(v3 + 2288, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_info.c", 0x34u); else pthread_mutex_lock(v3 + 2288); ma_readinfo(a1, 0LL, 0LL); if ( !*(_DWORD *)(*(_QWORD *)a1 + 1976LL) ) ma_writeinfo(a1, 0LL); if ( *(_QWORD *)(v3 + 2352) ) PSI_server[44](); pthread_mutex_unlock(v3 + 2288); } if ( (v4 & 0x10) != 0 ) { if ( a1[409] == 2 ) v5 = (unsigned long long *)(v3 + 24); else v5 = (unsigned long long *)*((_QWORD *)a1 + 4); v6 = *v5; *(_QWORD *)a2 = *v5; *(_QWORD *)(a2 + 8) = *(_QWORD *)(v3 + 32); v7 = *(_QWORD *)(v3 + 40); *(_QWORD *)(a2 + 72) = v7; v8 = *(_QWORD *)(v3 + 64); *(_QWORD *)(a2 + 40) = v8; *(_QWORD *)(a2 + 56) = *(_QWORD *)(v3 + 56); *(_DWORD *)(a2 + 172) = *(unsigned __int8 *)(v3 + 18); *(_QWORD *)(a2 + 104) = *(_QWORD *)(v3 + 352); if ( v6 ) v9 = (v8 - v7) / v6; else v9 = *(_QWORD *)(v3 + 1832); *(_QWORD *)(a2 + 144) = v9; } if ( (v4 & 0x20) != 0 ) { *(_DWORD *)(a2 + 184) = a1[408]; *(_QWORD *)(a2 + 32) = *((_QWORD *)a1 + 133); } if ( (v4 & 8) != 0 ) { *(_QWORD *)(a2 + 136) = *(_QWORD *)(v3 + 920); *(_QWORD *)(a2 + 48) = *(_QWORD *)(v3 + 872); *(_QWORD *)(a2 + 64) = *(_QWORD *)(*(_QWORD *)a1 + 880LL); *(_DWORD *)(a2 + 192) = a1[288]; *(_DWORD *)(a2 + 176) = *(_DWORD *)(v3 + 1824); *(_QWORD *)(a2 + 96) = *(_QWORD *)(v3 + 336); *(_DWORD *)(a2 + 180) = maria_get_pointer_length(*(_QWORD *)(v3 + 872), maria_data_pointer_size); if ( *(_DWORD *)(*(_QWORD *)a1 + 2000LL) ) v10 = 0LL; else v10 = *(_QWORD *)(v3 + 928); *(_QWORD *)(a2 + 120) = v10; *(_DWORD *)(a2 + 188) = -1; *(_QWORD *)(a2 + 128) = *(_QWORD *)(v3 + 256); *(_QWORD *)(a2 + 88) = *(_QWORD *)(v3 + 320); *(_QWORD *)(a2 + 152) = *(_QWORD *)(v3 + 1472); *(_QWORD *)(a2 + 160) = *(_QWORD *)(v3 + 1488); *(_DWORD *)(a2 + 168) = *(_DWORD *)(v3 + 2000); } if ( (v4 & 4) != 0 ) { v11 = 0LL; if ( !(unsigned int)my_fstat((unsigned int)a1[288], v14, 0LL) ) v11 = v15; } else { v11 = 0LL; } *(_QWORD *)(a2 + 112) = v11; if ( (v4 & 0x40) != 0 ) { v12 = -1LL; if ( *(_QWORD *)(v3 + 216) != -1LL ) v12 = *(_QWORD *)(v3 + 216) + 1LL; *(_QWORD *)(a2 + 80) = v12; } } return 0LL; }
maria_status: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x98 MOV R13,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x98] MOV qword ptr [RSI + 0x10],RAX CMP EDX,0x1 JZ 0x0013787a MOV R14D,EDX MOV RBX,RSI MOV R15,RDI TEST R14B,0x2 JNZ 0x001376c3 LEA R12,[R13 + 0x8f0] CMP qword ptr [R13 + 0x930],0x0 JNZ 0x0013788e MOV RDI,R12 CALL 0x00129220 LAB_00137689: MOV RDI,R15 XOR ESI,ESI XOR EDX,EDX CALL 0x00138d0a MOV RAX,qword ptr [R15] CMP dword ptr [RAX + 0x7b8],0x0 JNZ 0x001376ab MOV RDI,R15 XOR ESI,ESI CALL 0x00138d12 LAB_001376ab: MOV RDI,qword ptr [R13 + 0x930] TEST RDI,RDI JNZ 0x001378a7 LAB_001376bb: MOV RDI,R12 CALL 0x001291e0 LAB_001376c3: TEST R14B,0x10 JZ 0x00137736 CMP dword ptr [R15 + 0x664],0x2 JNZ 0x001376d9 LEA RAX,[R13 + 0x18] JMP 0x001376dd LAB_001376d9: MOV RAX,qword ptr [R15 + 0x20] LAB_001376dd: MOV RCX,qword ptr [RAX] MOV qword ptr [RBX],RCX MOV RAX,qword ptr [R13 + 0x20] MOV qword ptr [RBX + 0x8],RAX MOV RDX,qword ptr [R13 + 0x28] MOV qword ptr [RBX + 0x48],RDX MOV RAX,qword ptr [R13 + 0x40] MOV qword ptr [RBX + 0x28],RAX MOV RSI,qword ptr [R13 + 0x38] MOV qword ptr [RBX + 0x38],RSI MOVZX ESI,byte ptr [R13 + 0x12] MOV dword ptr [RBX + 0xac],ESI MOV RSI,qword ptr [R13 + 0x160] MOV qword ptr [RBX + 0x68],RSI TEST RCX,RCX JZ 0x00137728 SUB RAX,RDX XOR EDX,EDX DIV RCX JMP 0x0013772f LAB_00137728: MOV RAX,qword ptr [R13 + 0x728] LAB_0013772f: MOV qword ptr [RBX + 0x90],RAX LAB_00137736: TEST R14B,0x20 JZ 0x00137754 MOV EAX,dword ptr [R15 + 0x660] MOV dword ptr [RBX + 0xb8],EAX MOV RAX,qword ptr [R15 + 0x428] MOV qword ptr [RBX + 0x20],RAX LAB_00137754: TEST R14B,0x8 JZ 0x0013782c MOV RAX,qword ptr [R13 + 0x398] MOV qword ptr [RBX + 0x88],RAX MOV RAX,qword ptr [R13 + 0x368] MOV qword ptr [RBX + 0x30],RAX MOV RAX,qword ptr [R15] MOV RAX,qword ptr [RAX + 0x370] MOV qword ptr [RBX + 0x40],RAX MOV EAX,dword ptr [R15 + 0x480] MOV dword ptr [RBX + 0xc0],EAX MOV EAX,dword ptr [R13 + 0x720] MOV dword ptr [RBX + 0xb0],EAX MOV RAX,qword ptr [R13 + 0x150] MOV qword ptr [RBX + 0x60],RAX MOV RDI,qword ptr [R13 + 0x368] LEA RAX,[0x486138] MOV ESI,dword ptr [RAX] CALL 0x001467fb MOV dword ptr [RBX + 0xb4],EAX MOV RAX,qword ptr [R15] CMP dword ptr [RAX + 0x7d0],0x0 JZ 0x001377d5 XOR EAX,EAX JMP 0x001377dc LAB_001377d5: MOV RAX,qword ptr [R13 + 0x3a0] LAB_001377dc: MOV qword ptr [RBX + 0x78],RAX MOV dword ptr [RBX + 0xbc],0xffffffff MOV RAX,qword ptr [R13 + 0x100] MOV qword ptr [RBX + 0x80],RAX MOV RAX,qword ptr [R13 + 0x140] MOV qword ptr [RBX + 0x58],RAX MOV RAX,qword ptr [R13 + 0x5c0] MOV qword ptr [RBX + 0x98],RAX MOV RAX,qword ptr [R13 + 0x5d0] MOV qword ptr [RBX + 0xa0],RAX MOV EAX,dword ptr [R13 + 0x7d0] MOV dword ptr [RBX + 0xa8],EAX LAB_0013782c: TEST R14B,0x4 JNZ 0x00137837 XOR R15D,R15D JMP 0x00137857 LAB_00137837: MOV EDI,dword ptr [R15 + 0x480] XOR R15D,R15D LEA RSI,[RBP + -0xb8] XOR EDX,EDX CALL 0x001a0a73 TEST EAX,EAX JNZ 0x00137857 MOV R15,qword ptr [RBP + -0x60] LAB_00137857: MOV qword ptr [RBX + 0x70],R15 TEST R14B,0x40 JZ 0x0013787a MOV RAX,qword ptr [R13 + 0xd8] INC RAX MOV RCX,-0x1 CMOVNZ RCX,RAX MOV qword ptr [RBX + 0x50],RCX LAB_0013787a: XOR EAX,EAX ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013788e: LEA RSI,[0x1da933] MOV RDI,R12 MOV EDX,0x34 CALL 0x0012eb8f JMP 0x00137689 LAB_001378a7: LEA RAX,[0x4880c0] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x001376bb
int8 maria_status(long *param_1,ulong *param_2,uint param_3) { pthread_mutex_t *__mutex; long lVar1; int4 uVar2; int iVar3; ulong *puVar4; ulong uVar5; ulong uVar6; ulong uVar7; int1 local_c0 [88]; ulong local_68; lVar1 = *param_1; param_2[2] = param_1[0x13]; if (param_3 != 1) { if ((param_3 & 2) == 0) { __mutex = (pthread_mutex_t *)(lVar1 + 0x8f0); if (*(long *)(lVar1 + 0x930) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_info.c", 0x34); } _ma_readinfo(param_1,0,0); if (*(int *)(*param_1 + 0x7b8) == 0) { _ma_writeinfo(param_1,0); } if (*(long *)(lVar1 + 0x930) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); } if ((param_3 & 0x10) != 0) { if (*(int *)((long)param_1 + 0x664) == 2) { puVar4 = (ulong *)(lVar1 + 0x18); } else { puVar4 = (ulong *)param_1[4]; } uVar5 = *puVar4; *param_2 = uVar5; param_2[1] = *(ulong *)(lVar1 + 0x20); uVar6 = *(ulong *)(lVar1 + 0x28); param_2[9] = uVar6; uVar7 = *(ulong *)(lVar1 + 0x40); param_2[5] = uVar7; param_2[7] = *(ulong *)(lVar1 + 0x38); *(uint *)((long)param_2 + 0xac) = (uint)*(byte *)(lVar1 + 0x12); param_2[0xd] = *(ulong *)(lVar1 + 0x160); if (uVar5 == 0) { uVar5 = *(ulong *)(lVar1 + 0x728); } else { uVar5 = (uVar7 - uVar6) / uVar5; } param_2[0x12] = uVar5; } if ((param_3 & 0x20) != 0) { *(int *)(param_2 + 0x17) = (int)param_1[0xcc]; param_2[4] = param_1[0x85]; } if ((param_3 & 8) != 0) { param_2[0x11] = *(ulong *)(lVar1 + 0x398); param_2[6] = *(ulong *)(lVar1 + 0x368); param_2[8] = *(ulong *)(*param_1 + 0x370); *(int *)(param_2 + 0x18) = (int)param_1[0x90]; *(int4 *)(param_2 + 0x16) = *(int4 *)(lVar1 + 0x720); param_2[0xc] = *(ulong *)(lVar1 + 0x150); uVar2 = maria_get_pointer_length(*(int8 *)(lVar1 + 0x368),maria_data_pointer_size); *(int4 *)((long)param_2 + 0xb4) = uVar2; if (*(int *)(*param_1 + 2000) == 0) { uVar6 = *(ulong *)(lVar1 + 0x3a0); } else { uVar6 = 0; } param_2[0xf] = uVar6; *(int4 *)((long)param_2 + 0xbc) = 0xffffffff; param_2[0x10] = *(ulong *)(lVar1 + 0x100); param_2[0xb] = *(ulong *)(lVar1 + 0x140); param_2[0x13] = *(ulong *)(lVar1 + 0x5c0); param_2[0x14] = *(ulong *)(lVar1 + 0x5d0); *(int4 *)(param_2 + 0x15) = *(int4 *)(lVar1 + 2000); } if ((param_3 & 4) == 0) { uVar6 = 0; } else { iVar3 = my_fstat((int)param_1[0x90],local_c0,0); uVar6 = 0; if (iVar3 == 0) { uVar6 = local_68; } } param_2[0xe] = uVar6; if ((param_3 & 0x40) != 0) { uVar7 = *(long *)(lVar1 + 0xd8) + 1; uVar6 = 0xffffffffffffffff; if (uVar7 != 0) { uVar6 = uVar7; } param_2[10] = uVar6; } } return 0; }
6,639
nglog::ShutdownLogging()
ng-log[P]ng-log/src/logging.cc
void ShutdownLogging() { ShutdownLoggingUtilities(); LogDestination::DeleteLogDestinations(); logging_directories_list = nullptr; g_prefix_formatter = nullptr; }
O1
cpp
nglog::ShutdownLogging(): pushq %rax callq 0x2126b callq 0x97c2 leaq 0x30ac6(%rip), %rdi # 0x3ec00 xorl %esi, %esi callq 0x1ed52 movq 0x219a8(%rip), %rdi # 0x2faf0 movq $0x0, 0x2199d(%rip) # 0x2faf0 testq %rdi, %rdi je 0xe163 movl $0x18, %esi popq %rax jmp 0x7540 popq %rax retq
_ZN5nglog15ShutdownLoggingEv: push rax call _ZN5nglog5tools24ShutdownLoggingUtilitiesEv; nglog::tools::ShutdownLoggingUtilities(void) call _ZN5nglog14LogDestination21DeleteLogDestinationsEv; nglog::LogDestination::DeleteLogDestinations(void) lea rdi, _ZN5nglogL24logging_directories_listB5cxx11E; nglog::logging_directories_list xor esi, esi call _ZNSt15__uniq_ptr_implISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EESt14default_deleteIS8_EE5resetEPS8_; std::__uniq_ptr_impl<std::vector<std::string>,std::default_delete<std::vector<std::string>>>::reset(std::vector<std::string>*) mov rdi, cs:_ZN5nglog12_GLOBAL__N_118g_prefix_formatterE; void * mov cs:_ZN5nglog12_GLOBAL__N_118g_prefix_formatterE, 0; nglog::`anonymous namespace'::g_prefix_formatter test rdi, rdi jz short loc_E163 mov esi, 18h; unsigned __int64 pop rax jmp __ZdlPvm; operator delete(void *,ulong) loc_E163: pop rax retn
void nglog::ShutdownLogging(nglog *this) { void *v1; // rdi nglog::tools::ShutdownLoggingUtilities(this); nglog::LogDestination::DeleteLogDestinations(this); std::__uniq_ptr_impl<std::vector<std::string>,std::default_delete<std::vector<std::string>>>::reset( &nglog::logging_directories_list[abi:cxx11], 0LL); v1 = nglog::`anonymous namespace'::g_prefix_formatter; nglog::`anonymous namespace'::g_prefix_formatter = 0LL; if ( v1 ) operator delete(v1, 0x18uLL); }
ShutdownLogging: PUSH RAX CALL 0x0012126b CALL 0x001097c2 LEA RDI,[0x13ec00] XOR ESI,ESI CALL 0x0011ed52 MOV RDI,qword ptr [0x0012faf0] MOV qword ptr [0x0012faf0],0x0 TEST RDI,RDI JZ 0x0010e163 MOV ESI,0x18 POP RAX JMP 0x00107540 LAB_0010e163: POP RAX RET
/* nglog::ShutdownLogging() */ int8 nglog::ShutdownLogging(void) { void *pvVar1; int8 in_RAX; int8 extraout_RAX; tools::ShutdownLoggingUtilities(); LogDestination::DeleteLogDestinations(); std:: __uniq_ptr_impl<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>,std::default_delete<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>> ::reset((__uniq_ptr_impl<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>,std::default_delete<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>> *)&logging_directories_list_abi_cxx11_,(vector *)0x0); pvVar1 = (anonymous_namespace)::g_prefix_formatter; (anonymous_namespace)::g_prefix_formatter = (void *)0x0; if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,0x18); return extraout_RAX; } return in_RAX; }
6,640
simple_key_cache_read
eloqsql/mysys/mf_keycache.c
uchar *simple_key_cache_read(SIMPLE_KEY_CACHE_CB *keycache, File file, my_off_t filepos, int level, uchar *buff, uint length, uint block_length __attribute__((unused)), int return_buffer __attribute__((unused))) { my_bool locked_and_incremented= FALSE; int error=0; uchar *start= buff; DBUG_ENTER("simple_key_cache_read"); DBUG_PRINT("enter", ("fd: %u pos: %lu length: %u", (uint) file, (ulong) filepos, length)); if (keycache->key_cache_inited) { /* Key cache is used */ reg1 BLOCK_LINK *block; uint read_length; uint offset; int page_st; if (MYSQL_KEYCACHE_READ_START_ENABLED()) { MYSQL_KEYCACHE_READ_START(my_filename(file), length, (ulong) (keycache->blocks_used * keycache->key_cache_block_size), (ulong) (keycache->blocks_unused * keycache->key_cache_block_size)); } /* When the key cache is once initialized, we use the cache_lock to reliably distinguish the cases of normal operation, resizing, and disabled cache. We always increment and decrement 'cnt_for_resize_op' so that a resizer can wait for pending I/O. */ keycache_pthread_mutex_lock(&keycache->cache_lock); /* Cache resizing has two phases: Flushing and re-initializing. In the flush phase read requests are allowed to bypass the cache for blocks not in the cache. find_key_block() returns NULL in this case. After the flush phase new I/O requests must wait until the re-initialization is done. The re-initialization can be done only if no I/O request is in progress. The reason is that key_cache_block_size can change. With enabled cache, I/O is done in chunks of key_cache_block_size. Every chunk tries to use a cache block first. If the block size changes in the middle, a block could be missed and old data could be read. */ while (keycache->in_resize && !keycache->resize_in_flush) wait_on_queue(&keycache->resize_queue, &keycache->cache_lock); /* Register the I/O for the next resize. */ inc_counter_for_resize_op(keycache); locked_and_incremented= TRUE; /* Requested data may not always be aligned to cache blocks. */ offset= (uint) (filepos % keycache->key_cache_block_size); /* Read data in key_cache_block_size increments */ do { /* Cache could be disabled in a later iteration. */ if (!keycache->can_be_used) { KEYCACHE_DBUG_PRINT("key_cache_read", ("keycache cannot be used")); goto no_key_cache; } /* Start reading at the beginning of the cache block. */ filepos-= offset; /* Do not read beyond the end of the cache block. */ read_length= length; set_if_smaller(read_length, keycache->key_cache_block_size-offset); KEYCACHE_DBUG_ASSERT(read_length > 0); /* Request the cache block that matches file/pos. */ keycache->global_cache_r_requests++; MYSQL_KEYCACHE_READ_BLOCK(keycache->key_cache_block_size); block=find_key_block(keycache, file, filepos, level, 0, &page_st); if (!block) { /* This happens only for requests submitted during key cache resize. The block is not in the cache and shall not go in. Read directly from file. */ keycache->global_cache_read++; keycache_pthread_mutex_unlock(&keycache->cache_lock); error= (my_pread(file, (uchar*) buff, read_length, filepos + offset, MYF(MY_NABP)) != 0); keycache_pthread_mutex_lock(&keycache->cache_lock); goto next_block; } if (!(block->status & BLOCK_ERROR)) { if (page_st == PAGE_TO_BE_READ) { MYSQL_KEYCACHE_READ_MISS(); read_block_primary(keycache, block, keycache->key_cache_block_size, read_length+offset); } else if (page_st == PAGE_WAIT_TO_BE_READ) { MYSQL_KEYCACHE_READ_MISS(); /* The requested page is to be read into the block buffer */ read_block_secondary(keycache, block); /* A secondary request must now have the block assigned to the requested file block. */ DBUG_ASSERT(block->hash_link->file == file); DBUG_ASSERT(block->hash_link->diskpos == filepos); } else if (block->length < read_length + offset) { /* Impossible if nothing goes wrong: this could only happen if we are using a file with small key blocks and are trying to read outside the file */ my_errno= -1; block->status|= BLOCK_ERROR; } else { MYSQL_KEYCACHE_READ_HIT(); } } /* block status may have added BLOCK_ERROR in the above 'if'. */ if (!(block->status & BLOCK_ERROR)) { { DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE)); #if !defined(SERIALIZED_READ_FROM_CACHE) keycache_pthread_mutex_unlock(&keycache->cache_lock); #endif /* Copy data from the cache buffer */ memcpy(buff, block->buffer+offset, (size_t) read_length); #if !defined(SERIALIZED_READ_FROM_CACHE) keycache_pthread_mutex_lock(&keycache->cache_lock); DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE)); #endif } } remove_reader(block); /* Error injection for coverage testing. */ DBUG_EXECUTE_IF("key_cache_read_block_error", block->status|= BLOCK_ERROR;); /* Do not link erroneous blocks into the LRU ring, but free them. */ if (!(block->status & BLOCK_ERROR)) { /* Link the block into the LRU ring if it's the last submitted request for the block. This enables eviction for the block. */ unreg_request(keycache, block, 1); } else { free_block(keycache, block); error= 1; break; } next_block: buff+= read_length; filepos+= read_length+offset; offset= 0; } while ((length-= read_length)); if (MYSQL_KEYCACHE_READ_DONE_ENABLED()) { MYSQL_KEYCACHE_READ_DONE((ulong) (keycache->blocks_used * keycache->key_cache_block_size), (ulong) (keycache->blocks_unused * keycache->key_cache_block_size)); } goto end; } KEYCACHE_DBUG_PRINT("key_cache_read", ("keycache not initialized")); no_key_cache: /* Key cache is not used */ keycache->global_cache_r_requests++; keycache->global_cache_read++; if (locked_and_incremented) keycache_pthread_mutex_unlock(&keycache->cache_lock); if (my_pread(file, (uchar*) buff, length, filepos, MYF(MY_NABP))) error= 1; if (locked_and_incremented) keycache_pthread_mutex_lock(&keycache->cache_lock); end: if (locked_and_incremented) { dec_counter_for_resize_op(keycache); keycache_pthread_mutex_unlock(&keycache->cache_lock); } DBUG_PRINT("exit", ("error: %d", error )); DBUG_RETURN(error ? (uchar*) 0 : start); }
O3
c
simple_key_cache_read: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %r8, %r14 movl %ecx, -0x6c(%rbp) movq %rdx, %rcx movq %rdi, %r13 cmpb $0x0, (%rdi) je 0x97360 movq %rcx, %r12 movl %r9d, -0x38(%rbp) leaq 0xc0(%r13), %r15 cmpq $0x0, 0x100(%r13) movl %esi, -0x34(%rbp) jne 0x97477 movq %r15, %rdi callq 0x29200 movq %r14, -0x58(%rbp) cmpb $0x0, 0x1(%r13) je 0x97114 leaq 0x108(%r13), %rbx cmpb $0x0, 0x2(%r13) jne 0x97114 movq %rbx, %rdi movq %r15, %rsi callq 0x974f0 cmpb $0x0, 0x1(%r13) jne 0x970fb movq %r15, -0x30(%rbp) incq 0x70(%r13) movl 0x18(%r13), %ecx movq $0x0, -0x40(%rbp) movq %r12, %r15 movq %r12, %rax xorl %edx, %edx divq %rcx movq %rdx, %r12 movq -0x58(%rbp), %rax movq %rax, -0x50(%rbp) movl -0x38(%rbp), %eax movq %r13, -0x48(%rbp) cmpb $0x0, 0x3(%r13) je 0x9739a movl %r12d, %ecx movq %r15, %r14 movq %rcx, -0x60(%rbp) subq %rcx, %r14 movl 0x18(%r13), %ebx subl %r12d, %ebx cmpl %ebx, %eax movl %eax, -0x38(%rbp) cmovbl %eax, %ebx incq 0x150(%r13) movq %r13, %rdi movl -0x34(%rbp), %esi movq %r14, %rdx movl -0x6c(%rbp), %ecx xorl %r8d, %r8d leaq -0x70(%rbp), %r9 callq 0x97581 movq %r13, %rcx movq %rax, %r13 movl %ebx, %eax movq %rax, -0x68(%rbp) testq %r13, %r13 je 0x971d4 testb $0x1, 0x50(%r13) jne 0x9726b movl -0x70(%rbp), %eax cmpl $0x2, %eax je 0x9723f cmpl $0x1, %eax jne 0x97251 movq -0x48(%rbp), %rdi movl 0x18(%rdi), %edx leal (%rbx,%r12), %ecx movq %r13, %rsi callq 0x97d82 jmp 0x9726b movq %r15, -0x60(%rbp) incq 0x158(%rcx) movq 0x100(%rcx), %rdi testq %rdi, %rdi movq %rcx, %r13 jne 0x97306 movq -0x30(%rbp), %r15 movq %r15, %rdi callq 0x291c0 movl $0x4, %r8d movl -0x34(%rbp), %edi movq -0x50(%rbp), %rsi movq -0x68(%rbp), %rdx movq -0x60(%rbp), %rcx callq 0xa05f0 xorl %ecx, %ecx testq %rax, %rax setne %cl movq %rcx, -0x40(%rbp) cmpq $0x0, 0x100(%r13) jne 0x9731b movq %r15, %rdi callq 0x29200 jmp 0x972e2 movq %r13, %rdi addq $0x28, %rdi movq -0x30(%rbp), %rsi callq 0x974f0 jmp 0x9726b leal (%rbx,%r12), %eax cmpl %eax, 0x4c(%r13) jae 0x9726b callq 0xa1ab2 movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF orb $0x1, 0x50(%r13) testb $0x1, 0x50(%r13) jne 0x972bb movq -0x48(%rbp), %r15 movq 0x100(%r15), %rdi testq %rdi, %rdi jne 0x97331 movq -0x30(%rbp), %rdi callq 0x291c0 movq -0x60(%rbp), %rsi addq 0x40(%r13), %rsi movq -0x50(%rbp), %rdi movq -0x68(%rbp), %rdx callq 0x29080 cmpq $0x0, 0x100(%r15) jne 0x97346 movq -0x30(%rbp), %rdi callq 0x29200 movq %r13, %rdi callq 0x97e50 testb $0x1, 0x50(%r13) jne 0x97414 movq -0x48(%rbp), %rdi movq %r13, %rsi movq %rdi, %r13 movl $0x1, %edx callq 0x97e98 movq -0x68(%rbp), %rax addq %rax, -0x50(%rbp) addl %ebx, %r12d addq %r12, %r14 xorl %r12d, %r12d movq %r14, %r15 movl -0x38(%rbp), %eax subl %ebx, %eax jne 0x97145 jmp 0x9742c leaq 0x2eed03(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x971f2 movq %r15, %rdi leaq 0x44ceb(%rip), %rsi # 0xdc010 movl $0xb29, %edx # imm = 0xB29 callq 0x2eb6f jmp 0x972e2 leaq 0x2eecd8(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x97286 movq -0x30(%rbp), %rdi leaq 0x44cbf(%rip), %rsi # 0xdc010 movl $0xb5e, %edx # imm = 0xB5E callq 0x2eb6f jmp 0x972bb movdqu 0x150(%r13), %xmm0 pcmpeqd %xmm1, %xmm1 psubq %xmm1, %xmm0 movdqu %xmm0, 0x150(%r13) movl %r9d, %edx movl $0x4, %r8d movl %esi, %edi movq %r14, %rsi callq 0xa05f0 xorl %ebx, %ebx testq %rax, %rax setne %bl jmp 0x97460 movq %r15, %r14 movl %eax, %ebx movdqu 0x150(%r13), %xmm0 pcmpeqd %xmm1, %xmm1 psubq %xmm1, %xmm0 movdqu %xmm0, 0x150(%r13) movq 0x100(%r13), %rdi testq %rdi, %rdi jne 0x974a2 movq -0x30(%rbp), %r15 movq %r15, %rdi callq 0x291c0 movl %ebx, %edx movl $0x4, %r8d movl -0x34(%rbp), %edi movq -0x50(%rbp), %rsi movq %r14, %rcx callq 0xa05f0 testq %rax, %rax movl $0x1, %ebx cmovel -0x40(%rbp), %ebx cmpq $0x0, 0x100(%r13) movq -0x58(%rbp), %r14 jne 0x974b7 movq %r15, %rdi callq 0x29200 jmp 0x9743a movq -0x48(%rbp), %rdi movq %r13, %rsi movq %rdi, %r13 callq 0x97fa0 movl $0x1, %eax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movl %eax, %ebx movq -0x58(%rbp), %r14 movq -0x30(%rbp), %r15 decq 0x70(%r13) jne 0x9744c leaq 0x110(%r13), %rdi callq 0x987a5 movq 0x100(%r13), %rdi testq %rdi, %rdi jne 0x97490 movq %r15, %rdi callq 0x291c0 xorl %eax, %eax testl %ebx, %ebx cmoveq %r14, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x44b92(%rip), %rsi # 0xdc010 movq %r15, %rdi movl $0xaf2, %edx # imm = 0xAF2 callq 0x2eb6f jmp 0x970e9 leaq 0x2eeb79(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x97458 leaq 0x2eeb67(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x973c9 leaq 0x44b52(%rip), %rsi # 0xdc010 movq %r15, %rdi movl $0xb96, %edx # imm = 0xB96 callq 0x2eb6f jmp 0x9743a
simple_key_cache_read: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r14, r8 mov [rbp+var_6C], ecx mov rcx, rdx mov r13, rdi cmp byte ptr [rdi], 0 jz loc_97360 mov r12, rcx mov [rbp+var_38], r9d lea r15, [r13+0C0h] cmp qword ptr [r13+100h], 0 mov [rbp+var_34], esi jnz loc_97477 mov rdi, r15 call _pthread_mutex_lock loc_970E9: mov [rbp+var_58], r14 cmp byte ptr [r13+1], 0 jz short loc_97114 lea rbx, [r13+108h] loc_970FB: cmp byte ptr [r13+2], 0 jnz short loc_97114 mov rdi, rbx mov rsi, r15 call wait_on_queue cmp byte ptr [r13+1], 0 jnz short loc_970FB loc_97114: mov [rbp+var_30], r15 inc qword ptr [r13+70h] mov ecx, [r13+18h] mov [rbp+var_40], 0 mov r15, r12 mov rax, r12 xor edx, edx div rcx mov r12, rdx mov rax, [rbp+var_58] mov [rbp+var_50], rax mov eax, [rbp+var_38] mov [rbp+var_48], r13 loc_97145: cmp byte ptr [r13+3], 0 jz loc_9739A mov ecx, r12d mov r14, r15 mov [rbp+var_60], rcx sub r14, rcx mov ebx, [r13+18h] sub ebx, r12d cmp eax, ebx mov [rbp+var_38], eax cmovb ebx, eax inc qword ptr [r13+150h] mov rdi, r13 mov esi, [rbp+var_34] mov rdx, r14 mov ecx, [rbp+var_6C] xor r8d, r8d lea r9, [rbp+var_70] call find_key_block mov rcx, r13 mov r13, rax mov eax, ebx mov [rbp+var_68], rax test r13, r13 jz short loc_971D4 test byte ptr [r13+50h], 1 jnz loc_9726B mov eax, [rbp+var_70] cmp eax, 2 jz loc_9723F cmp eax, 1 jnz loc_97251 mov rdi, [rbp+var_48] mov edx, [rdi+18h] lea ecx, [rbx+r12] mov rsi, r13 call read_block_primary jmp loc_9726B loc_971D4: mov [rbp+var_60], r15 inc qword ptr [rcx+158h] mov rdi, [rcx+100h] test rdi, rdi mov r13, rcx jnz loc_97306 loc_971F2: mov r15, [rbp+var_30] mov rdi, r15 call _pthread_mutex_unlock mov r8d, 4 mov edi, [rbp+var_34] mov rsi, [rbp+var_50] mov rdx, [rbp+var_68] mov rcx, [rbp+var_60] call my_pread xor ecx, ecx test rax, rax setnz cl mov [rbp+var_40], rcx cmp qword ptr [r13+100h], 0 jnz loc_9731B mov rdi, r15 call _pthread_mutex_lock jmp loc_972E2 loc_9723F: mov rdi, r13 add rdi, 28h ; '(' mov rsi, [rbp+var_30] call wait_on_queue jmp short loc_9726B loc_97251: lea eax, [rbx+r12] cmp [r13+4Ch], eax jnb short loc_9726B call _my_thread_var mov dword ptr [rax], 0FFFFFFFFh or byte ptr [r13+50h], 1 loc_9726B: test byte ptr [r13+50h], 1 jnz short loc_972BB mov r15, [rbp+var_48] mov rdi, [r15+100h] test rdi, rdi jnz loc_97331 loc_97286: mov rdi, [rbp+var_30] call _pthread_mutex_unlock mov rsi, [rbp+var_60] add rsi, [r13+40h] mov rdi, [rbp+var_50] mov rdx, [rbp+var_68] call _memcpy cmp qword ptr [r15+100h], 0 jnz loc_97346 mov rdi, [rbp+var_30] call _pthread_mutex_lock loc_972BB: mov rdi, r13 call remove_reader test byte ptr [r13+50h], 1 jnz loc_97414 mov rdi, [rbp+var_48] mov rsi, r13 mov r13, rdi mov edx, 1 call unreg_request_0 loc_972E2: mov rax, [rbp+var_68] add [rbp+var_50], rax add r12d, ebx add r14, r12 xor r12d, r12d mov r15, r14 mov eax, [rbp+var_38] sub eax, ebx jnz loc_97145 jmp loc_9742C loc_97306: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_971F2 loc_9731B: mov rdi, r15 lea rsi, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 0B29h call psi_mutex_lock jmp short loc_972E2 loc_97331: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_97286 loc_97346: mov rdi, [rbp+var_30] lea rsi, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 0B5Eh call psi_mutex_lock jmp loc_972BB loc_97360: movdqu xmm0, xmmword ptr [r13+150h] pcmpeqd xmm1, xmm1 psubq xmm0, xmm1 movdqu xmmword ptr [r13+150h], xmm0 mov edx, r9d mov r8d, 4 mov edi, esi mov rsi, r14 call my_pread xor ebx, ebx test rax, rax setnz bl jmp loc_97460 loc_9739A: mov r14, r15 mov ebx, eax movdqu xmm0, xmmword ptr [r13+150h] pcmpeqd xmm1, xmm1 psubq xmm0, xmm1 movdqu xmmword ptr [r13+150h], xmm0 mov rdi, [r13+100h] test rdi, rdi jnz loc_974A2 loc_973C9: mov r15, [rbp+var_30] mov rdi, r15 call _pthread_mutex_unlock mov edx, ebx mov r8d, 4 mov edi, [rbp+var_34] mov rsi, [rbp+var_50] mov rcx, r14 call my_pread test rax, rax mov ebx, 1 cmovz ebx, dword ptr [rbp+var_40] cmp qword ptr [r13+100h], 0 mov r14, [rbp+var_58] jnz loc_974B7 mov rdi, r15 call _pthread_mutex_lock jmp short loc_9743A loc_97414: mov rdi, [rbp+var_48] mov rsi, r13 mov r13, rdi call free_block_0 mov eax, 1 mov [rbp+var_40], rax loc_9742C: mov rax, [rbp+var_40] mov ebx, eax mov r14, [rbp+var_58] mov r15, [rbp+var_30] loc_9743A: dec qword ptr [r13+70h] jnz short loc_9744C lea rdi, [r13+110h] call release_whole_queue loc_9744C: mov rdi, [r13+100h] test rdi, rdi jnz short loc_97490 loc_97458: mov rdi, r15 call _pthread_mutex_unlock loc_97460: xor eax, eax test ebx, ebx cmovz rax, r14 add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_97477: lea rsi, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r15 mov edx, 0AF2h call psi_mutex_lock jmp loc_970E9 loc_97490: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_97458 loc_974A2: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_973C9 loc_974B7: lea rsi, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r15 mov edx, 0B96h call psi_mutex_lock jmp loc_9743A
long long simple_key_cache_read( const __m128i *a1, unsigned int a2, unsigned long long a3, unsigned int a4, long long a5, unsigned int a6) { long long v6; // r14 const __m128i *v7; // r13 bool v9; // zf unsigned long long v10; // rcx long long v11; // r15 unsigned long long v12; // r12 unsigned int v13; // eax long long v14; // r14 unsigned int v15; // ebx const __m128i *v16; // rdi long long v17; // rsi long long key_block; // rax long long v19; // rdx const __m128i *v20; // rcx long long v21; // r13 long long v22; // r15 const __m128i *v23; // r15 long long v24; // rdi long long v25; // rsi long long v26; // r14 BOOL v27; // ebx long long v28; // r14 unsigned int v29; // ebx long long v30; // r15 long long v31; // rax long long v32; // rsi long long result; // rax int v34; // [rsp+0h] [rbp-70h] BYREF unsigned int v35; // [rsp+4h] [rbp-6Ch] long long v36; // [rsp+8h] [rbp-68h] long long v37; // [rsp+10h] [rbp-60h] long long v38; // [rsp+18h] [rbp-58h] long long v39; // [rsp+20h] [rbp-50h] const __m128i *v40; // [rsp+28h] [rbp-48h] _BOOL8 v41; // [rsp+30h] [rbp-40h] unsigned int v42; // [rsp+38h] [rbp-38h] unsigned int v43; // [rsp+3Ch] [rbp-34h] const __m128i *v44; // [rsp+40h] [rbp-30h] v6 = a5; v35 = a4; v7 = a1; if ( a1->m128i_i8[0] ) { v42 = a6; v9 = a1[16].m128i_i64[0] == 0; v43 = a2; if ( v9 ) pthread_mutex_lock(&a1[12]); else psi_mutex_lock( (long long)a1[12].m128i_i64, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0xAF2u); v38 = v6; while ( a1->m128i_i8[1] ) { if ( a1->m128i_i8[2] ) break; wait_on_queue(&a1[16].m128i_u64[1], &a1[12]); } v44 = a1 + 12; ++a1[7].m128i_i64[0]; v10 = a1[1].m128i_u32[2]; v41 = 0LL; v11 = a3; v12 = a3 % v10; v39 = v38; v13 = v42; v40 = a1; while ( v7->m128i_i8[3] ) { v37 = (unsigned int)v12; v14 = v11 - (unsigned int)v12; v15 = v7[1].m128i_i32[2] - v12; v42 = v13; if ( v13 < v15 ) v15 = v13; ++v7[21].m128i_i64[0]; v16 = v7; v17 = v43; key_block = find_key_block(v7, v43, v11 - (unsigned int)v12, v35, 0LL, &v34); v20 = v7; v21 = key_block; v36 = v15; if ( key_block ) { if ( (*(_BYTE *)(key_block + 80) & 1) == 0 ) { if ( v34 == 2 ) { v17 = (long long)v44; wait_on_queue(key_block + 40, v44); } else if ( v34 == 1 ) { v17 = key_block; read_block_primary(v40, key_block, v40[1].m128i_u32[2], v15 + (unsigned int)v12); } else if ( *(_DWORD *)(key_block + 76) < v15 + (unsigned int)v12 ) { *(_DWORD *)my_thread_var(v16) = -1; *(_BYTE *)(v21 + 80) |= 1u; } } if ( (*(_BYTE *)(v21 + 80) & 1) == 0 ) { v23 = v40; v24 = v40[16].m128i_i64[0]; if ( v24 ) ((void ( *)(long long, long long, long long, const __m128i *))PSI_server[44])(v24, v17, v19, v20); pthread_mutex_unlock(v44); v17 = *(_QWORD *)(v21 + 64) + v37; memcpy(v39, v17, v36); if ( v23[16].m128i_i64[0] ) { v17 = (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c"; psi_mutex_lock( (long long)v44, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0xB5Eu); } else { pthread_mutex_lock(v44); } } remove_reader(v21, v17, v19, v20); if ( (*(_BYTE *)(v21 + 80) & 1) != 0 ) { v32 = v21; v7 = v40; free_block_0(v40, v32); v41 = 1LL; LABEL_42: v27 = v41; v6 = v38; v30 = (long long)v44; goto LABEL_43; } v25 = v21; v7 = v40; unreg_request_0(v40, v25, 1LL); } else { v37 = v11; ++v20[21].m128i_i64[1]; v7 = v20; if ( v20[16].m128i_i64[0] ) PSI_server[44](); v22 = (long long)v44; pthread_mutex_unlock(v44); v41 = my_pread(v43, v39, v36, v37, 4LL) != 0; if ( v7[16].m128i_i64[0] ) psi_mutex_lock(v22, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0xB29u); else pthread_mutex_lock(v22); } v39 += v36; v26 = v15 + (unsigned int)v12 + v14; LODWORD(v12) = 0; v11 = v26; v13 = v42 - v15; if ( v42 == v15 ) goto LABEL_42; } v28 = v11; v29 = v13; v7[21] = _mm_sub_epi64(_mm_loadu_si128(v7 + 21), (__m128i)-1LL); if ( v7[16].m128i_i64[0] ) PSI_server[44](); v30 = (long long)v44; pthread_mutex_unlock(v44); v31 = my_pread(v43, v39, v29, v28, 4LL); v27 = 1; if ( !v31 ) v27 = v41; v6 = v38; if ( v7[16].m128i_i64[0] ) psi_mutex_lock(v30, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0xB96u); else pthread_mutex_lock(v30); LABEL_43: v9 = v7[7].m128i_i64[0]-- == 1; if ( v9 ) release_whole_queue(&v7[17]); if ( v7[16].m128i_i64[0] ) PSI_server[44](); pthread_mutex_unlock(v30); } else { a1[21] = _mm_sub_epi64(_mm_loadu_si128(a1 + 21), (__m128i)-1LL); v27 = my_pread(a2, a5, a6, a3, 4LL) != 0; } result = 0LL; if ( !v27 ) return v6; return result; }
simple_key_cache_read: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R14,R8 MOV dword ptr [RBP + -0x6c],ECX MOV RCX,RDX MOV R13,RDI CMP byte ptr [RDI],0x0 JZ 0x00197360 MOV R12,RCX MOV dword ptr [RBP + -0x38],R9D LEA R15,[R13 + 0xc0] CMP qword ptr [R13 + 0x100],0x0 MOV dword ptr [RBP + -0x34],ESI JNZ 0x00197477 MOV RDI,R15 CALL 0x00129200 LAB_001970e9: MOV qword ptr [RBP + -0x58],R14 CMP byte ptr [R13 + 0x1],0x0 JZ 0x00197114 LEA RBX,[R13 + 0x108] LAB_001970fb: CMP byte ptr [R13 + 0x2],0x0 JNZ 0x00197114 MOV RDI,RBX MOV RSI,R15 CALL 0x001974f0 CMP byte ptr [R13 + 0x1],0x0 JNZ 0x001970fb LAB_00197114: MOV qword ptr [RBP + -0x30],R15 INC qword ptr [R13 + 0x70] MOV ECX,dword ptr [R13 + 0x18] MOV qword ptr [RBP + -0x40],0x0 MOV R15,R12 MOV RAX,R12 XOR EDX,EDX DIV RCX MOV R12,RDX MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x50],RAX MOV EAX,dword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x48],R13 LAB_00197145: CMP byte ptr [R13 + 0x3],0x0 JZ 0x0019739a MOV ECX,R12D MOV R14,R15 MOV qword ptr [RBP + -0x60],RCX SUB R14,RCX MOV EBX,dword ptr [R13 + 0x18] SUB EBX,R12D CMP EAX,EBX MOV dword ptr [RBP + -0x38],EAX CMOVC EBX,EAX INC qword ptr [R13 + 0x150] MOV RDI,R13 MOV ESI,dword ptr [RBP + -0x34] MOV RDX,R14 MOV ECX,dword ptr [RBP + -0x6c] XOR R8D,R8D LEA R9,[RBP + -0x70] CALL 0x00197581 MOV RCX,R13 MOV R13,RAX MOV EAX,EBX MOV qword ptr [RBP + -0x68],RAX TEST R13,R13 JZ 0x001971d4 TEST byte ptr [R13 + 0x50],0x1 JNZ 0x0019726b MOV EAX,dword ptr [RBP + -0x70] CMP EAX,0x2 JZ 0x0019723f CMP EAX,0x1 JNZ 0x00197251 MOV RDI,qword ptr [RBP + -0x48] MOV EDX,dword ptr [RDI + 0x18] LEA ECX,[RBX + R12*0x1] MOV RSI,R13 CALL 0x00197d82 JMP 0x0019726b LAB_001971d4: MOV qword ptr [RBP + -0x60],R15 INC qword ptr [RCX + 0x158] MOV RDI,qword ptr [RCX + 0x100] TEST RDI,RDI MOV R13,RCX JNZ 0x00197306 LAB_001971f2: MOV R15,qword ptr [RBP + -0x30] MOV RDI,R15 CALL 0x001291c0 MOV R8D,0x4 MOV EDI,dword ptr [RBP + -0x34] MOV RSI,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x60] CALL 0x001a05f0 XOR ECX,ECX TEST RAX,RAX SETNZ CL MOV qword ptr [RBP + -0x40],RCX CMP qword ptr [R13 + 0x100],0x0 JNZ 0x0019731b MOV RDI,R15 CALL 0x00129200 JMP 0x001972e2 LAB_0019723f: MOV RDI,R13 ADD RDI,0x28 MOV RSI,qword ptr [RBP + -0x30] CALL 0x001974f0 JMP 0x0019726b LAB_00197251: LEA EAX,[RBX + R12*0x1] CMP dword ptr [R13 + 0x4c],EAX JNC 0x0019726b CALL 0x001a1ab2 MOV dword ptr [RAX],0xffffffff OR byte ptr [R13 + 0x50],0x1 LAB_0019726b: TEST byte ptr [R13 + 0x50],0x1 JNZ 0x001972bb MOV R15,qword ptr [RBP + -0x48] MOV RDI,qword ptr [R15 + 0x100] TEST RDI,RDI JNZ 0x00197331 LAB_00197286: MOV RDI,qword ptr [RBP + -0x30] CALL 0x001291c0 MOV RSI,qword ptr [RBP + -0x60] ADD RSI,qword ptr [R13 + 0x40] MOV RDI,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x68] CALL 0x00129080 CMP qword ptr [R15 + 0x100],0x0 JNZ 0x00197346 MOV RDI,qword ptr [RBP + -0x30] CALL 0x00129200 LAB_001972bb: MOV RDI,R13 CALL 0x00197e50 TEST byte ptr [R13 + 0x50],0x1 JNZ 0x00197414 MOV RDI,qword ptr [RBP + -0x48] MOV RSI,R13 MOV R13,RDI MOV EDX,0x1 CALL 0x00197e98 LAB_001972e2: MOV RAX,qword ptr [RBP + -0x68] ADD qword ptr [RBP + -0x50],RAX ADD R12D,EBX ADD R14,R12 XOR R12D,R12D MOV R15,R14 MOV EAX,dword ptr [RBP + -0x38] SUB EAX,EBX JNZ 0x00197145 JMP 0x0019742c LAB_00197306: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x001971f2 LAB_0019731b: MOV RDI,R15 LEA RSI,[0x1dc010] MOV EDX,0xb29 CALL 0x0012eb6f JMP 0x001972e2 LAB_00197331: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00197286 LAB_00197346: MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[0x1dc010] MOV EDX,0xb5e CALL 0x0012eb6f JMP 0x001972bb LAB_00197360: MOVDQU XMM0,xmmword ptr [R13 + 0x150] PCMPEQD XMM1,XMM1 PSUBQ XMM0,XMM1 MOVDQU xmmword ptr [R13 + 0x150],XMM0 MOV EDX,R9D MOV R8D,0x4 MOV EDI,ESI MOV RSI,R14 CALL 0x001a05f0 XOR EBX,EBX TEST RAX,RAX SETNZ BL JMP 0x00197460 LAB_0019739a: MOV R14,R15 MOV EBX,EAX MOVDQU XMM0,xmmword ptr [R13 + 0x150] PCMPEQD XMM1,XMM1 PSUBQ XMM0,XMM1 MOVDQU xmmword ptr [R13 + 0x150],XMM0 MOV RDI,qword ptr [R13 + 0x100] TEST RDI,RDI JNZ 0x001974a2 LAB_001973c9: MOV R15,qword ptr [RBP + -0x30] MOV RDI,R15 CALL 0x001291c0 MOV EDX,EBX MOV R8D,0x4 MOV EDI,dword ptr [RBP + -0x34] MOV RSI,qword ptr [RBP + -0x50] MOV RCX,R14 CALL 0x001a05f0 TEST RAX,RAX MOV EBX,0x1 CMOVZ EBX,dword ptr [RBP + -0x40] CMP qword ptr [R13 + 0x100],0x0 MOV R14,qword ptr [RBP + -0x58] JNZ 0x001974b7 MOV RDI,R15 CALL 0x00129200 JMP 0x0019743a LAB_00197414: MOV RDI,qword ptr [RBP + -0x48] MOV RSI,R13 MOV R13,RDI CALL 0x00197fa0 MOV EAX,0x1 MOV qword ptr [RBP + -0x40],RAX LAB_0019742c: MOV RAX,qword ptr [RBP + -0x40] MOV EBX,EAX MOV R14,qword ptr [RBP + -0x58] MOV R15,qword ptr [RBP + -0x30] LAB_0019743a: DEC qword ptr [R13 + 0x70] JNZ 0x0019744c LEA RDI,[R13 + 0x110] CALL 0x001987a5 LAB_0019744c: MOV RDI,qword ptr [R13 + 0x100] TEST RDI,RDI JNZ 0x00197490 LAB_00197458: MOV RDI,R15 CALL 0x001291c0 LAB_00197460: XOR EAX,EAX TEST EBX,EBX CMOVZ RAX,R14 ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00197477: LEA RSI,[0x1dc010] MOV RDI,R15 MOV EDX,0xaf2 CALL 0x0012eb6f JMP 0x001970e9 LAB_00197490: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00197458 LAB_001974a2: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x001973c9 LAB_001974b7: LEA RSI,[0x1dc010] MOV RDI,R15 MOV EDX,0xb96 CALL 0x0012eb6f JMP 0x0019743a
void * simple_key_cache_read (char *param_1,int4 param_2,ulong param_3,int4 param_4,void *param_5, uint param_6) { long *plVar1; uint uVar2; char *pcVar3; uint uVar4; long lVar5; int4 *puVar6; void *pvVar7; ulong uVar8; ulong uVar9; int iVar10; pthread_mutex_t *ppVar11; int local_78; int4 local_74; ulong local_70; ulong local_68; void *local_60; void *local_58; char *local_50; ulong local_48; uint local_40; int4 local_3c; pthread_mutex_t *local_38; local_74 = param_4; if (*param_1 == '\0') { *(long *)(param_1 + 0x150) = *(long *)(param_1 + 0x150) + 1; *(long *)(param_1 + 0x158) = *(long *)(param_1 + 0x158) + 1; lVar5 = my_pread(param_2,param_5,param_6,param_3,4); uVar4 = (uint)(lVar5 != 0); } else { ppVar11 = (pthread_mutex_t *)(param_1 + 0xc0); local_40 = param_6; local_3c = param_2; if (*(long *)(param_1 + 0x100) == 0) { pthread_mutex_lock(ppVar11); } else { psi_mutex_lock(ppVar11,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0xaf2); } local_60 = param_5; if (param_1[1] != '\0') { do { if (param_1[2] != '\0') break; wait_on_queue(param_1 + 0x108,ppVar11); } while (param_1[1] != '\0'); } *(long *)(param_1 + 0x70) = *(long *)(param_1 + 0x70) + 1; local_48 = 0; uVar8 = param_3 % (ulong)*(uint *)(param_1 + 0x18); local_58 = local_60; uVar4 = local_40; local_50 = param_1; local_38 = ppVar11; do { if (param_1[3] == '\0') { *(long *)(param_1 + 0x150) = *(long *)(param_1 + 0x150) + 1; *(long *)(param_1 + 0x158) = *(long *)(param_1 + 0x158) + 1; if (*(long *)(param_1 + 0x100) != 0) { (**(code **)(PSI_server + 0x160))(); } ppVar11 = local_38; pthread_mutex_unlock(local_38); lVar5 = my_pread(local_3c,local_58,uVar4,param_3,4); param_5 = local_60; uVar4 = 1; if (lVar5 == 0) { uVar4 = (uint)local_48; } if (*(long *)(param_1 + 0x100) == 0) { pthread_mutex_lock(ppVar11); } else { psi_mutex_lock(ppVar11,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0xb96); } goto LAB_0019743a; } iVar10 = (int)uVar8; uVar2 = *(int *)(param_1 + 0x18) - iVar10; if (uVar4 < (uint)(*(int *)(param_1 + 0x18) - iVar10)) { uVar2 = uVar4; } uVar9 = (ulong)uVar2; *(long *)(param_1 + 0x150) = *(long *)(param_1 + 0x150) + 1; local_68 = uVar8; local_40 = uVar4; lVar5 = find_key_block(param_1,local_3c,param_3 - uVar8,local_74,0,&local_78); local_70 = uVar9; if (lVar5 == 0) { *(long *)(param_1 + 0x158) = *(long *)(param_1 + 0x158) + 1; local_68 = param_3; if (*(long *)(param_1 + 0x100) != 0) { (**(code **)(PSI_server + 0x160))(); } ppVar11 = local_38; pthread_mutex_unlock(local_38); lVar5 = my_pread(local_3c,local_58,local_70,local_68); local_48 = (ulong)(lVar5 != 0); if (*(long *)(param_1 + 0x100) == 0) { pthread_mutex_lock(ppVar11); } else { psi_mutex_lock(ppVar11,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0xb29); } } else { if ((*(byte *)(lVar5 + 0x50) & 1) == 0) { if (local_78 == 2) { wait_on_queue(lVar5 + 0x28,local_38); } else if (local_78 == 1) { read_block_primary(local_50,lVar5,*(int4 *)(local_50 + 0x18),uVar2 + iVar10); } else if (*(uint *)(lVar5 + 0x4c) < uVar2 + iVar10) { puVar6 = (int4 *)_my_thread_var(); *puVar6 = 0xffffffff; *(byte *)(lVar5 + 0x50) = *(byte *)(lVar5 + 0x50) | 1; } } pcVar3 = local_50; if ((*(byte *)(lVar5 + 0x50) & 1) == 0) { if (*(long *)(local_50 + 0x100) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(local_38); memcpy(local_58,(void *)(local_68 + *(long *)(lVar5 + 0x40)),local_70); if (*(long *)(pcVar3 + 0x100) == 0) { pthread_mutex_lock(local_38); } else { psi_mutex_lock(local_38,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0xb5e); } } remove_reader(lVar5); param_1 = local_50; if ((*(byte *)(lVar5 + 0x50) & 1) != 0) { free_block(local_50,lVar5); local_48 = 1; break; } unreg_request(local_50,lVar5,1); } local_58 = (void *)((long)local_58 + local_70); param_3 = (param_3 - uVar8) + (ulong)(iVar10 + uVar2); uVar8 = 0; uVar4 = local_40 - uVar2; } while (uVar4 != 0); uVar4 = (uint)local_48; param_5 = local_60; ppVar11 = local_38; LAB_0019743a: plVar1 = (long *)(param_1 + 0x70); *plVar1 = *plVar1 + -1; if (*plVar1 == 0) { release_whole_queue(param_1 + 0x110); } if (*(long *)(param_1 + 0x100) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(ppVar11); } pvVar7 = (void *)0x0; if (uVar4 == 0) { pvVar7 = param_5; } return pvVar7; }
6,641
ma_log_change
eloqsql/storage/maria/ma_write.c
my_bool _ma_log_change(MARIA_PAGE *ma_page, const uchar *key_pos, uint length, enum en_key_debug debug_marker __attribute__((unused))) { LSN lsn; uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE + 2 + 6 + 7], *log_pos; LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 4]; uint offset= (uint) (key_pos - ma_page->buff), translog_parts; MARIA_HA *info= ma_page->info; my_off_t page= ma_page->pos / info->s->block_size; DBUG_ENTER("_ma_log_change"); DBUG_PRINT("enter", ("page: %lu length: %u", (ulong) page, length)); DBUG_ASSERT(info->s->now_transactional); DBUG_ASSERT(offset + length <= ma_page->size); DBUG_ASSERT(ma_page->org_size == ma_page->size); /* Store address of new root page */ page= ma_page->pos / info->s->block_size; page_store(log_data + FILEID_STORE_SIZE, page); log_pos= log_data+ FILEID_STORE_SIZE + PAGE_STORE_SIZE; #ifdef EXTRA_DEBUG_KEY_CHANGES (*log_pos++)= KEY_OP_DEBUG; (*log_pos++)= debug_marker; #endif log_pos[0]= KEY_OP_OFFSET; int2store(log_pos+1, offset); log_pos[3]= KEY_OP_CHANGE; int2store(log_pos+4, length); log_pos+= 6; log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data; log_array[TRANSLOG_INTERNAL_PARTS + 0].length= (log_pos - log_data); log_array[TRANSLOG_INTERNAL_PARTS + 1].str= key_pos; log_array[TRANSLOG_INTERNAL_PARTS + 1].length= length; translog_parts= 2; _ma_log_key_changes(ma_page, log_array + TRANSLOG_INTERNAL_PARTS + translog_parts, log_pos, &length, &translog_parts); if (translog_write_record(&lsn, LOGREC_REDO_INDEX, info->trn, info, (translog_size_t) (log_pos - log_data) + length, TRANSLOG_INTERNAL_PARTS + translog_parts, log_array, log_data, NULL)) DBUG_RETURN(1); DBUG_RETURN(0); }
O3
c
ma_log_change: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movl %edx, %r8d movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movl 0x10(%rdi), %r9d movq (%rdi), %rcx movq 0x18(%rdi), %rax movq (%rcx), %rdx movl 0x7bc(%rdx), %edi xorl %edx, %edx divq %rdi leaq -0x20(%rbp), %r10 leaq -0x90(%rbp), %r11 movq %r10, 0x20(%r11) movq $0xd, 0x28(%r11) movq %rsi, 0x30(%r11) movl %esi, %edx subl %r9d, %edx movl %eax, 0x2(%r10) shrq $0x20, %rax movb %al, 0x6(%r10) movb $0x1, 0x7(%r10) movw %dx, 0x8(%r10) movb $0x3, 0xa(%r10) movw %r8w, 0xb(%r10) movl %r8d, %eax movq %rax, 0x38(%r11) movq 0x8(%rcx), %rdx addl $0xd, %r8d subq $0x8, %rsp leaq -0x28(%rbp), %rdi movl $0xc, %esi movl $0x4, %r9d pushq $0x0 pushq %r10 pushq %r11 callq 0x29c44 addq $0x20, %rsp testb %al, %al setne %al movq %fs:0x28, %rcx cmpq -0x8(%rbp), %rcx jne 0x58614 addq $0x90, %rsp popq %rbp retq callq 0x29250
_ma_log_change: push rbp mov rbp, rsp sub rsp, 90h mov r8d, edx mov rax, fs:28h mov [rbp+var_8], rax mov r9d, [rdi+10h] mov rcx, [rdi] mov rax, [rdi+18h] mov rdx, [rcx] mov edi, [rdx+7BCh] xor edx, edx div rdi lea r10, [rbp+var_20] lea r11, [rbp+var_90] mov [r11+20h], r10 mov qword ptr [r11+28h], 0Dh mov [r11+30h], rsi mov edx, esi sub edx, r9d mov [r10+2], eax shr rax, 20h mov [r10+6], al mov byte ptr [r10+7], 1 mov [r10+8], dx mov byte ptr [r10+0Ah], 3 mov [r10+0Bh], r8w mov eax, r8d mov [r11+38h], rax mov rdx, [rcx+8] add r8d, 0Dh sub rsp, 8 lea rdi, [rbp+var_28] mov esi, 0Ch mov r9d, 4 push 0 push r10 push r11 call translog_write_record add rsp, 20h test al, al setnz al mov rcx, fs:28h cmp rcx, [rbp+var_8] jnz short loc_58614 add rsp, 90h pop rbp retn loc_58614: call ___stack_chk_fail
bool ma_log_change(long long a1, long long a2, unsigned int a3) { int v3; // r9d _QWORD *v4; // rcx unsigned long long v5; // rax __int128 v7; // [rsp+8h] [rbp-90h] BYREF __int16 *v8; // [rsp+28h] [rbp-70h] long long v9; // [rsp+30h] [rbp-68h] long long v10; // [rsp+38h] [rbp-60h] long long v11; // [rsp+40h] [rbp-58h] _BYTE v12[8]; // [rsp+70h] [rbp-28h] BYREF __int16 v13; // [rsp+78h] [rbp-20h] BYREF int v14; // [rsp+7Ah] [rbp-1Eh] char v15; // [rsp+7Eh] [rbp-1Ah] char v16; // [rsp+7Fh] [rbp-19h] __int16 v17; // [rsp+80h] [rbp-18h] char v18; // [rsp+82h] [rbp-16h] __int16 v19; // [rsp+83h] [rbp-15h] unsigned long long v20; // [rsp+90h] [rbp-8h] v20 = __readfsqword(0x28u); v3 = *(_DWORD *)(a1 + 16); v4 = *(_QWORD **)a1; v5 = *(_QWORD *)(a1 + 24) / (unsigned long long)*(unsigned int *)(**(_QWORD **)a1 + 1980LL); v8 = &v13; v9 = 13LL; v10 = a2; v14 = v5; v15 = BYTE4(v5); v16 = 1; v17 = a2 - v3; v18 = 3; v19 = a3; v11 = a3; return (unsigned __int8)translog_write_record( (unsigned long long)v12, &byte_9[3], v4[1], v4, a3 + 13, 4, &v7, &v13, 0LL) != 0; }
_ma_log_change: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV R8D,EDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV R9D,dword ptr [RDI + 0x10] MOV RCX,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x18] MOV RDX,qword ptr [RCX] MOV EDI,dword ptr [RDX + 0x7bc] XOR EDX,EDX DIV RDI LEA R10,[RBP + -0x20] LEA R11,[RBP + -0x90] MOV qword ptr [R11 + 0x20],R10 MOV qword ptr [R11 + 0x28],0xd MOV qword ptr [R11 + 0x30],RSI MOV EDX,ESI SUB EDX,R9D MOV dword ptr [R10 + 0x2],EAX SHR RAX,0x20 MOV byte ptr [R10 + 0x6],AL MOV byte ptr [R10 + 0x7],0x1 MOV word ptr [R10 + 0x8],DX MOV byte ptr [R10 + 0xa],0x3 MOV word ptr [R10 + 0xb],R8W MOV EAX,R8D MOV qword ptr [R11 + 0x38],RAX MOV RDX,qword ptr [RCX + 0x8] ADD R8D,0xd SUB RSP,0x8 LEA RDI,[RBP + -0x28] MOV ESI,0xc MOV R9D,0x4 PUSH 0x0 PUSH R10 PUSH R11 CALL 0x00129c44 ADD RSP,0x20 TEST AL,AL SETNZ AL MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x8] JNZ 0x00158614 ADD RSP,0x90 POP RBP RET LAB_00158614: CALL 0x00129250
bool _ma_log_change(long *param_1,int8 param_2,uint param_3) { long *plVar1; int1 auVar2 [16]; char cVar3; long in_FS_OFFSET; int1 local_98 [32]; int1 *local_78; int8 local_70; int8 local_68; ulong local_60; int1 local_30 [8]; int1 local_28 [2]; int4 local_26; int1 local_22; int1 local_21; short local_20; int1 local_1e; int2 local_1d; long local_10; local_60 = (ulong)param_3; local_10 = *(long *)(in_FS_OFFSET + 0x28); plVar1 = (long *)*param_1; auVar2._8_8_ = 0; auVar2._0_8_ = param_1[3]; auVar2 = auVar2 / ZEXT416(*(uint *)(*plVar1 + 0x7bc)); local_78 = local_28; local_70 = 0xd; local_20 = (short)param_2 - (short)(int)param_1[2]; local_26 = auVar2._0_4_; local_22 = auVar2[4]; local_21 = 1; local_1e = 3; local_1d = (int2)param_3; local_68 = param_2; cVar3 = translog_write_record(local_30,0xc,plVar1[1],plVar1,param_3 + 0xd,4,local_98,local_78,0); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return cVar3 != '\0'; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
6,642
bool 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>::operator==<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>, nullptr>(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> const&) const
monkey531[P]llama/common/./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)); } JSON_ASSERT(m_object != nullptr); 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_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>::operator==<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>, nullptr>(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> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %r14 movq (%rdi), %rax cmpq (%rsi), %rax jne 0x79d01 testq %rax, %rax je 0x79d5f movzbl (%rax), %eax cmpl $0x2, %eax je 0x79ce1 cmpl $0x1, %eax jne 0x79ceb movq 0x8(%r14), %rax cmpq 0x8(%rsi), %rax jmp 0x79cf3 movq 0x10(%r14), %rax cmpq 0x10(%rsi), %rax jmp 0x79cf3 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 0x1f550 movq %rax, %rbx leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0xce5fe(%rip), %rsi # 0x14831c leaq 0xce627(%rip), %rdx # 0x14834c leaq 0x8(%rsp), %rdi callq 0x4b514 movq (%r14), %rcx movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0xd4, %esi callq 0x79db4 xorl %ebp, %ebp leaq 0x1290c8(%rip), %rsi # 0x1a2e18 leaq 0x3267(%rip), %rdx # 0x7cfbe movq %rbx, %rdi callq 0x202e0 leaq 0xcbfc8(%rip), %rdi # 0x145d2e leaq 0xcc00d(%rip), %rdx # 0x145d7a leaq 0xce5f1(%rip), %rcx # 0x148365 movl $0x3422, %esi # imm = 0x3422 xorl %eax, %eax callq 0x20250 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x79d9a movq 0x18(%rsp), %rsi incq %rsi callq 0x1fae0 testb %bpl, %bpl jne 0x79da4 jmp 0x79dac movq %rax, %r14 movq %rbx, %rdi callq 0x1f7e0 movq %r14, %rdi callq 0x20380
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_: 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_79D01 test rax, rax jz loc_79D5F movzx eax, byte ptr [rax] cmp eax, 2 jz short loc_79CE1 cmp eax, 1 jnz short loc_79CEB mov rax, [r14+8] cmp rax, [rsi+8] jmp short loc_79CF3 loc_79CE1: mov rax, [r14+10h] cmp rax, [rsi+10h] jmp short loc_79CF3 loc_79CEB: mov rax, [r14+18h] cmp rax, [rsi+18h] loc_79CF3: setz al add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn loc_79D01: 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_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_79D5F: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN+7; "m_object != nullptr" mov esi, 3422h xor eax, eax call _ggml_abort mov r14, rax mov rdi, [rsp+48h+var_40]; void * cmp rdi, r15 jz short loc_79D9A mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_79D9A: test bpl, bpl jnz short loc_79DA4 jmp short loc_79DAC mov r14, rax loc_79DA4: mov rdi, rbx; void * call ___cxa_free_exception loc_79DAC: mov rdi, r14 call __Unwind_Resume
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_: 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 0x00179d01 TEST RAX,RAX JZ 0x00179d5f MOVZX EAX,byte ptr [RAX] CMP EAX,0x2 JZ 0x00179ce1 CMP EAX,0x1 JNZ 0x00179ceb MOV RAX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [RSI + 0x8] JMP 0x00179cf3 LAB_00179ce1: MOV RAX,qword ptr [R14 + 0x10] CMP RAX,qword ptr [RSI + 0x10] JMP 0x00179cf3 LAB_00179ceb: MOV RAX,qword ptr [R14 + 0x18] CMP RAX,qword ptr [RSI + 0x18] LAB_00179cf3: SETZ AL ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET LAB_00179d01: MOV EDI,0x20 CALL 0x0011f550 MOV RBX,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 LAB_00179d17: LEA RSI,[0x24831c] LEA RDX,[0x24834c] LEA RDI,[RSP + 0x8] CALL 0x0014b514 MOV RCX,qword ptr [R14] MOV BPL,0x1 LAB_00179d35: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0xd4 CALL 0x00179db4 XOR EBP,EBP LEA RSI,[0x2a2e18] LEA RDX,[0x17cfbe] MOV RDI,RBX CALL 0x001202e0 LAB_00179d5f: LEA RDI,[0x245d2e] LEA RDX,[0x245d7a] LEA RCX,[0x248365] MOV ESI,0x3422 XOR EAX,EAX CALL 0x00120250
int8 _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_ (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) { uVar3 = __cxa_allocate_exception(0x20); local_40[0] = local_30; /* try { // try from 00179d17 to 00179d2e has its CatchHandler @ 00179da1 */ std::__cxx11::string::_M_construct<char_const*> (local_40,"cannot compare iterators of different containers",""); /* try { // try from 00179d35 to 00179d5e has its CatchHandler @ 00179d80 */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__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_11_3::detail::invalid_iterator::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } if (pcVar1 != (char *)0x0) { 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]; } return CONCAT71((int7)((ulong)lVar2 >> 8),bVar4); } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",0x3422, "GGML_ASSERT(%s) failed","m_object != nullptr"); }
6,643
common_sampler_clone(common_sampler*)
monkey531[P]llama/common/sampling.cpp
struct common_sampler * common_sampler_clone(common_sampler * gsmpl) { return new common_sampler { /* .params = */ gsmpl->params, /* .grmr = */ llama_sampler_clone(gsmpl->grmr), /* .chain = */ llama_sampler_clone(gsmpl->chain), /* .prev = */ gsmpl->prev, /* .cur = */ gsmpl->cur, /* .cur_p = */ gsmpl->cur_p, }; }
O2
cpp
common_sampler_clone(common_sampler*): pushq %r14 pushq %rbx pushq %rax movq %rdi, %r14 movl $0x1b8, %edi # imm = 0x1B8 callq 0x23890 movq %rax, %rbx movq %rax, %rdi movq %r14, %rsi callq 0x3a318 movq 0x138(%r14), %rdi callq 0x23620 movq %rax, 0x138(%rbx) movq 0x140(%r14), %rdi callq 0x23620 movq %rax, 0x140(%rbx) movl $0x148, %esi # imm = 0x148 leaq (%rbx,%rsi), %rdi addq %r14, %rsi callq 0x99090 movl $0x180, %esi # imm = 0x180 leaq (%rbx,%rsi), %rdi addq %r14, %rsi callq 0x990ac movups 0x198(%r14), %xmm0 movups 0x1a8(%r14), %xmm1 movups %xmm1, 0x1a8(%rbx) movups %xmm0, 0x198(%rbx) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq movq %rax, %r14 movq %rbx, %rdi addq $0x168, %rdi # imm = 0x168 callq 0x27e04 jmp 0x9830a movq %rax, %r14 jmp 0x98312 movq %rax, %r14 movq %rbx, %rdi callq 0x27adc movl $0x1b8, %esi # imm = 0x1B8 movq %rbx, %rdi callq 0x238b0 movq %r14, %rdi callq 0x23f20
_Z20common_sampler_cloneP14common_sampler: push r14 push rbx push rax mov r14, rdi mov edi, 1B8h; unsigned __int64 call __Znwm; operator new(ulong) mov rbx, rax mov rdi, rax; this mov rsi, r14; common_params_sampling * call _ZN22common_params_samplingC2ERKS_; common_params_sampling::common_params_sampling(common_params_sampling const&) mov rdi, [r14+138h] call _llama_sampler_clone mov [rbx+138h], rax mov rdi, [r14+140h] call _llama_sampler_clone mov [rbx+140h], rax mov esi, 148h lea rdi, [rbx+rsi] add rsi, r14 call _ZN11ring_bufferIiEC2ERKS0_; ring_buffer<int>::ring_buffer(ring_buffer<int> const&) mov esi, 180h lea rdi, [rbx+rsi] add rsi, r14 call _ZNSt6vectorI16llama_token_dataSaIS0_EEC2ERKS2_; std::vector<llama_token_data>::vector(std::vector<llama_token_data> const&) movups xmm0, xmmword ptr [r14+198h] movups xmm1, xmmword ptr [r14+1A8h] movups xmmword ptr [rbx+1A8h], xmm1 movups xmmword ptr [rbx+198h], xmm0 mov rax, rbx add rsp, 8 pop rbx pop r14 retn mov r14, rax mov rdi, rbx add rdi, 168h call _ZNSt12_Vector_baseIiSaIiEED2Ev; std::_Vector_base<int>::~_Vector_base() jmp short loc_9830A mov r14, rax jmp short loc_98312 mov r14, rax loc_9830A: mov rdi, rbx; this call _ZN22common_params_samplingD2Ev; common_params_sampling::~common_params_sampling() loc_98312: mov esi, 1B8h; unsigned __int64 mov rdi, rbx; void * call __ZdlPvm; operator delete(void *,ulong) mov rdi, r14 call __Unwind_Resume
long long common_sampler_clone(common_sampler *a1) { long long v1; // rbx __int128 v2; // xmm0 v1 = operator new(0x1B8uLL); common_params_sampling::common_params_sampling((common_params_sampling *)v1, a1); *(_QWORD *)(v1 + 312) = llama_sampler_clone(*((_QWORD *)a1 + 39)); *(_QWORD *)(v1 + 320) = llama_sampler_clone(*((_QWORD *)a1 + 40)); ring_buffer<int>::ring_buffer(v1 + 328, (char *)a1 + 328); std::vector<llama_token_data>::vector(v1 + 384, (char *)a1 + 384); v2 = *(_OWORD *)((char *)a1 + 408); *(_OWORD *)(v1 + 424) = *(_OWORD *)((char *)a1 + 424); *(_OWORD *)(v1 + 408) = v2; return v1; }
common_sampler_clone: PUSH R14 PUSH RBX PUSH RAX MOV R14,RDI MOV EDI,0x1b8 CALL 0x00123890 MOV RBX,RAX LAB_00198272: MOV RDI,RAX MOV RSI,R14 CALL 0x0013a318 MOV RDI,qword ptr [R14 + 0x138] LAB_00198284: CALL 0x00123620 MOV qword ptr [RBX + 0x138],RAX MOV RDI,qword ptr [R14 + 0x140] CALL 0x00123620 MOV qword ptr [RBX + 0x140],RAX MOV ESI,0x148 LEA RDI,[RBX + RSI*0x1] ADD RSI,R14 CALL 0x00199090 MOV ESI,0x180 LEA RDI,[RBX + RSI*0x1] ADD RSI,R14 LAB_001982c0: CALL 0x001990ac LAB_001982c5: MOVUPS XMM0,xmmword ptr [R14 + 0x198] MOVUPS XMM1,xmmword ptr [R14 + 0x1a8] MOVUPS xmmword ptr [RBX + 0x1a8],XMM1 MOVUPS xmmword ptr [RBX + 0x198],XMM0 MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* common_sampler_clone(common_sampler*) */ common_params_sampling * common_sampler_clone(common_sampler *param_1) { int8 uVar1; int8 uVar2; common_params_sampling *this; int8 uVar3; this = (common_params_sampling *)operator_new(0x1b8); /* try { // try from 00198272 to 0019827c has its CatchHandler @ 00198302 */ common_params_sampling::common_params_sampling(this,(common_params_sampling *)param_1); /* try { // try from 00198284 to 001982b3 has its CatchHandler @ 00198307 */ uVar3 = llama_sampler_clone(*(int8 *)(param_1 + 0x138)); *(int8 *)(this + 0x138) = uVar3; uVar3 = llama_sampler_clone(*(int8 *)(param_1 + 0x140)); *(int8 *)(this + 0x140) = uVar3; ring_buffer<int>::ring_buffer((ring_buffer<int> *)(this + 0x148),(ring_buffer *)(param_1 + 0x148)) ; /* try { // try from 001982c0 to 001982c4 has its CatchHandler @ 001982ee */ std::vector<llama_token_data,std::allocator<llama_token_data>>::vector ((vector<llama_token_data,std::allocator<llama_token_data>> *)(this + 0x180), (vector *)(param_1 + 0x180)); uVar3 = *(int8 *)(param_1 + 0x198); uVar1 = *(int8 *)(param_1 + 0x1a0); uVar2 = *(int8 *)(param_1 + 0x1b0); *(int8 *)(this + 0x1a8) = *(int8 *)(param_1 + 0x1a8); *(int8 *)(this + 0x1b0) = uVar2; *(int8 *)(this + 0x198) = uVar3; *(int8 *)(this + 0x1a0) = uVar1; return this; }
6,644
mariadb_get_infov
eloqsql/libmariadb/libmariadb/mariadb_lib.c
my_bool mariadb_get_infov(MYSQL *mysql, enum mariadb_value value, void *arg, ...) { va_list ap; va_start(ap, arg); switch(value) { case MARIADB_MAX_ALLOWED_PACKET: *((size_t *)arg)= (size_t)max_allowed_packet; break; case MARIADB_NET_BUFFER_LENGTH: *((size_t *)arg)= (size_t)net_buffer_length; break; case MARIADB_CONNECTION_ERROR_ID: if (!mysql) goto error; *((unsigned int *)arg)= mysql->net.last_errno; break; case MARIADB_CONNECTION_ERROR: if (!mysql) goto error; *((char **)arg)= mysql->net.last_error; break; case MARIADB_CONNECTION_SQLSTATE: if (!mysql) goto error; *((char **)arg)= mysql->net.sqlstate; break; case MARIADB_CONNECTION_TLS_VERSION: #ifdef HAVE_TLS if (mysql && mysql->net.pvio && mysql->net.pvio->ctls) *((char **)arg)= (char *)ma_pvio_tls_get_protocol_version(mysql->net.pvio->ctls); else #endif goto error; break; case MARIADB_CONNECTION_TLS_VERSION_ID: #ifdef HAVE_TLS if (mysql && mysql->net.pvio && mysql->net.pvio->ctls) *((unsigned int *)arg)= ma_pvio_tls_get_protocol_version_id(mysql->net.pvio->ctls); else #endif goto error; break; case MARIADB_TLS_LIBRARY: #ifdef HAVE_TLS *((const char **)arg)= tls_library_version; #else *((const char **)arg)= "Off"; #endif break; case MARIADB_CLIENT_VERSION: *((const char **)arg)= MARIADB_CLIENT_VERSION_STR; break; case MARIADB_CLIENT_VERSION_ID: *((size_t *)arg)= MARIADB_VERSION_ID; break; case MARIADB_CONNECTION_SERVER_VERSION: if (mysql) *((char **)arg)= mysql->server_version; else goto error; break; case MARIADB_CONNECTION_SERVER_TYPE: if (mysql) *((const char **)arg)= mariadb_connection(mysql) ? "MariaDB" : "MySQL"; else goto error; break; case MARIADB_CONNECTION_SERVER_VERSION_ID: if (mysql) *((size_t *)arg)= mariadb_server_version_id(mysql); else goto error; break; case MARIADB_CONNECTION_PROTOCOL_VERSION_ID: if (mysql) *((unsigned int *)arg)= mysql->protocol_version; else goto error; break; case MARIADB_CONNECTION_MARIADB_CHARSET_INFO: if (mysql) mariadb_get_charset_info(mysql, (MY_CHARSET_INFO *)arg); else goto error; break; case MARIADB_CONNECTION_SOCKET: if (mysql) *((my_socket *)arg)= mariadb_get_socket(mysql); else goto error; break; case MARIADB_CONNECTION_TYPE: if (mysql && mysql->net.pvio) *((int *)arg)= (int)mysql->net.pvio->type; else goto error; break; case MARIADB_CONNECTION_ASYNC_TIMEOUT_MS: if (mysql && mysql->options.extension && mysql->options.extension->async_context) *((unsigned int *)arg)= mysql->options.extension->async_context->timeout_value; break; case MARIADB_CONNECTION_ASYNC_TIMEOUT: if (mysql && mysql->options.extension && mysql->options.extension->async_context) { unsigned int timeout= mysql->options.extension->async_context->timeout_value; if (timeout > UINT_MAX - 999) *((unsigned int *)arg)= (timeout - 1)/1000 + 1; else *((unsigned int *)arg)= (timeout+999)/1000; } break; case MARIADB_CHARSET_NAME: { char *name; name= va_arg(ap, char *); if (name) *((MARIADB_CHARSET_INFO **)arg)= (MARIADB_CHARSET_INFO *)mysql_find_charset_name(name); else goto error; } break; case MARIADB_CHARSET_ID: { unsigned int nr; nr= va_arg(ap, unsigned int); *((MARIADB_CHARSET_INFO **)arg)= (MARIADB_CHARSET_INFO *)mysql_find_charset_nr(nr); } break; case MARIADB_CONNECTION_SSL_CIPHER: #ifdef HAVE_TLS if (mysql && mysql->net.pvio && mysql->net.pvio->ctls) *((char **)arg)= (char *)ma_pvio_tls_cipher(mysql->net.pvio->ctls); else #endif *((char **)arg)= NULL; break; case MARIADB_CLIENT_ERRORS: *((char ***)arg)= (char **)client_errors; break; case MARIADB_CONNECTION_INFO: if (mysql) *((char **)arg)= (char *)mysql->info; else goto error; break; case MARIADB_CONNECTION_PVIO_TYPE: if (mysql && mysql->net.pvio) *((unsigned int *)arg)= (unsigned int)mysql->net.pvio->type; else goto error; break; case MARIADB_CONNECTION_SCHEMA: if (mysql) *((char **)arg)= mysql->db; else goto error; break; case MARIADB_CONNECTION_USER: if (mysql) *((char **)arg)= mysql->user; else goto error; break; case MARIADB_CONNECTION_PORT: if (mysql) *((unsigned int *)arg)= mysql->port; else goto error; break; case MARIADB_CONNECTION_UNIX_SOCKET: if (mysql) *((char **)arg)= mysql->unix_socket; else goto error; break; case MARIADB_CONNECTION_HOST: if (mysql) *((char **)arg)= mysql->host; else goto error; break; case MARIADB_CONNECTION_SERVER_STATUS: if (mysql) *((unsigned int *)arg)= mysql->server_status; else goto error; break; case MARIADB_CONNECTION_SERVER_CAPABILITIES: if (mysql) *((unsigned long *)arg)= mysql->server_capabilities; else goto error; break; case MARIADB_CONNECTION_EXTENDED_SERVER_CAPABILITIES: if (mysql) *((unsigned long *)arg)= mysql->extension->mariadb_server_capabilities; else goto error; break; case MARIADB_CONNECTION_CLIENT_CAPABILITIES: if (mysql) *((unsigned long *)arg)= mysql->client_flag; else goto error; break; case MARIADB_CONNECTION_BYTES_READ: *((size_t *)arg)= mysql->net.pvio->bytes_read; break; case MARIADB_CONNECTION_BYTES_SENT: *((size_t *)arg)= mysql->net.pvio->bytes_sent; break; default: va_end(ap); return(-1); } va_end(ap); return(0); error: va_end(ap); return(-1); }
O3
c
mariadb_get_infov: pushq %rbp movq %rsp, %rbp pushq %rbx subq $0xc8, %rsp movq %rdx, %rbx leaq -0xd0(%rbp), %rdx movq %rcx, 0x18(%rdx) movq %r8, 0x20(%rdx) movq %r9, 0x28(%rdx) testb %al, %al je 0x1d1d2 movaps %xmm0, -0xa0(%rbp) movaps %xmm1, -0x90(%rbp) movaps %xmm2, -0x80(%rbp) movaps %xmm3, -0x70(%rbp) movaps %xmm4, -0x60(%rbp) movaps %xmm5, -0x50(%rbp) movaps %xmm6, -0x40(%rbp) movaps %xmm7, -0x30(%rbp) movq %rdx, -0x10(%rbp) leaq 0x10(%rbp), %rax movq %rax, -0x18(%rbp) movabsq $0x3000000018, %rax # imm = 0x3000000018 movq %rax, -0x20(%rbp) movb $-0x1, %al cmpl $0x23, %esi ja 0x1d585 movl %esi, %ecx leaq 0x1cd88(%rip), %rdx # 0x39f88 movslq (%rdx,%rcx,4), %rcx addq %rdx, %rcx jmpq *%rcx testq %rdi, %rdi je 0x1d585 movq (%rdi), %rcx testq %rcx, %rcx je 0x1d585 movl 0x20(%rcx), %eax jmp 0x1d522 movq (%rdi), %rax movq 0x68(%rax), %rax jmp 0x1d580 testq %rdi, %rdi je 0x1d585 movq 0x2b8(%rdi), %rax jmp 0x1d580 movq (%rdi), %rax movq 0x60(%rax), %rax jmp 0x1d580 testq %rdi, %rdi je 0x1d585 movq 0x2d0(%rdi), %rax jmp 0x1d580 testq %rdi, %rdi je 0x1d585 movq 0x2e8(%rdi), %rax jmp 0x1d580 testq %rdi, %rdi je 0x1d585 movq 0x368(%rdi), %rax jmp 0x1d580 testq %rdi, %rdi je 0x1d585 movq 0x2e0(%rdi), %rax jmp 0x1d580 movq $0x18902, (%rbx) # imm = 0x18902 jmp 0x1d583 testq %rdi, %rdi je 0x1d585 movl 0x360(%rdi), %eax jmp 0x1d522 testq %rdi, %rdi je 0x1d585 movl 0x90(%rdi), %eax jmp 0x1d522 leaq 0x2e7ee(%rip), %rax # 0x4bad0 jmp 0x1d580 testq %rdi, %rdi je 0x1d585 callq 0x161e3 testb %al, %al leaq 0x19a85(%rip), %rax # 0x36d83 leaq 0x19a6e(%rip), %rcx # 0x36d73 cmoveq %rax, %rcx movq %rcx, (%rbx) jmp 0x1d583 leaq 0x19a71(%rip), %rax # 0x36d89 jmp 0x1d580 testq %rdi, %rdi je 0x1d585 movq %rbx, %rsi callq 0x1cf74 jmp 0x1d583 movl -0x20(%rbp), %ecx cmpq $0x28, %rcx ja 0x1d552 movq %rcx, %rax addq -0x10(%rbp), %rax addl $0x8, %ecx movl %ecx, -0x20(%rbp) jmp 0x1d55e movl -0x20(%rbp), %edx cmpq $0x28, %rdx ja 0x1d567 movq %rdx, %rcx addq -0x10(%rbp), %rcx addl $0x8, %edx movl %edx, -0x20(%rbp) jmp 0x1d573 testq %rdi, %rdi je 0x1d585 movq 0x370(%rdi), %rax jmp 0x1d580 testq %rdi, %rdi je 0x1d585 movq 0x2d0(%rdi), %rdi callq 0x1c679 jmp 0x1d580 testq %rdi, %rdi je 0x1d549 movq (%rdi), %rax testq %rax, %rax je 0x1d549 movq 0x38(%rax), %rdi testq %rdi, %rdi je 0x1d549 callq 0x1e34a jmp 0x1d580 testq %rdi, %rdi je 0x1d583 movq 0x480(%rdi), %rax testq %rax, %rax je 0x1d583 movq 0x28(%rax), %rax testq %rax, %rax je 0x1d583 movl 0x10(%rax), %eax cmpl $0xfffffc19, %eax # imm = 0xFFFFFC19 jb 0x1d58f decl %eax imulq $0x10624dd3, %rax, %rax # imm = 0x10624DD3 shrq $0x26, %rax incl %eax jmp 0x1d59f leaq 0x304d5(%rip), %rax # 0x4d8f0 jmp 0x1d580 testq %rdi, %rdi je 0x1d585 movl 0x378(%rdi), %eax jmp 0x1d522 testq %rdi, %rdi je 0x1d583 movq 0x480(%rdi), %rax testq %rax, %rax je 0x1d583 movq 0x28(%rax), %rax testq %rax, %rax je 0x1d583 movl 0x10(%rax), %eax jmp 0x1d522 testq %rdi, %rdi je 0x1d585 callq 0x1d126 jmp 0x1d522 testq %rdi, %rdi je 0x1d585 movq 0x2b0(%rdi), %rax jmp 0x1d580 testq %rdi, %rdi je 0x1d585 addq $0x97, %rdi jmp 0x1d502 testq %rdi, %rdi je 0x1d585 movl 0x380(%rdi), %eax jmp 0x1d522 testq %rdi, %rdi je 0x1d585 movq 0x4f0(%rdi), %rax movq 0x70(%rax), %rax jmp 0x1d580 testq %rdi, %rdi je 0x1d585 movq (%rdi), %rcx testq %rcx, %rcx je 0x1d585 movq 0x38(%rcx), %rdi testq %rdi, %rdi je 0x1d585 callq 0x1e368 jmp 0x1d580 testq %rdi, %rdi je 0x1d585 addq $0x297, %rdi # imm = 0x297 movq %rdi, (%rbx) jmp 0x1d583 testq %rdi, %rdi je 0x1d585 movq (%rdi), %rcx testq %rcx, %rcx je 0x1d585 movq 0x38(%rcx), %rdi testq %rdi, %rdi je 0x1d585 callq 0x1e35e movl %eax, (%rbx) jmp 0x1d583 leaq 0x2e54b(%rip), %rax # 0x4ba78 jmp 0x1d536 leaq 0x2e55a(%rip), %rax # 0x4ba90 movq (%rax), %rax jmp 0x1d580 testq %rdi, %rdi je 0x1d585 movq 0x2c8(%rdi), %rax jmp 0x1d580 movq $0x0, (%rbx) jmp 0x1d583 movq -0x18(%rbp), %rax leaq 0x8(%rax), %rcx movq %rcx, -0x18(%rbp) movl (%rax), %edi callq 0x31bb6 jmp 0x1d580 movq -0x18(%rbp), %rcx leaq 0x8(%rcx), %rdx movq %rdx, -0x18(%rbp) movq (%rcx), %rdi testq %rdi, %rdi je 0x1d585 callq 0x31c3a movq %rax, (%rbx) xorl %eax, %eax addq $0xc8, %rsp popq %rbx popq %rbp retq addl $0x3e7, %eax # imm = 0x3E7 imulq $0x10624dd3, %rax, %rax # imm = 0x10624DD3 shrq $0x26, %rax movl %eax, (%rbx) jmp 0x1d583
mariadb_get_infov: push rbp mov rbp, rsp push rbx sub rsp, 0C8h mov rbx, rdx lea rdx, [rbp+var_D0] mov [rdx+18h], rcx mov [rdx+20h], r8 mov [rdx+28h], r9 test al, al jz short loc_1D1D2 movaps [rbp+var_A0], xmm0 movaps [rbp+var_90], xmm1 movaps [rbp+var_80], xmm2 movaps [rbp+var_70], xmm3 movaps [rbp+var_60], xmm4 movaps [rbp+var_50], xmm5 movaps [rbp+var_40], xmm6 movaps [rbp+var_30], xmm7 loc_1D1D2: mov [rbp+var_10], rdx lea rax, [rbp+arg_0] mov [rbp+var_18], rax mov rax, 3000000018h mov [rbp+var_20], rax mov al, 0FFh cmp esi, 23h; switch 36 cases ja def_1D207; jumptable 000000000001D207 default case mov ecx, esi lea rdx, jpt_1D207 movsxd rcx, ds:(jpt_1D207 - 39F88h)[rdx+rcx*4] add rcx, rdx jmp rcx; switch jump loc_1D209: test rdi, rdi; jumptable 000000000001D207 cases 14,25 jz def_1D207; jumptable 000000000001D207 default case mov rcx, [rdi] test rcx, rcx jz def_1D207; jumptable 000000000001D207 default case mov eax, [rcx+20h] jmp loc_1D522 loc_1D226: mov rax, [rdi]; jumptable 000000000001D207 case 35 mov rax, [rax+68h] jmp loc_1D580 loc_1D232: test rdi, rdi; jumptable 000000000001D207 case 27 jz def_1D207; jumptable 000000000001D207 default case mov rax, [rdi+2B8h] jmp loc_1D580 loc_1D247: mov rax, [rdi]; jumptable 000000000001D207 case 34 mov rax, [rax+60h] jmp loc_1D580 loc_1D253: test rdi, rdi; jumptable 000000000001D207 case 17 jz def_1D207; jumptable 000000000001D207 default case mov rax, [rdi+2D0h] jmp loc_1D580 loc_1D268: test rdi, rdi; jumptable 000000000001D207 case 15 jz def_1D207; jumptable 000000000001D207 default case mov rax, [rdi+2E8h] jmp loc_1D580 loc_1D27D: test rdi, rdi; jumptable 000000000001D207 case 33 jz def_1D207; jumptable 000000000001D207 default case mov rax, [rdi+368h] jmp loc_1D580 loc_1D292: test rdi, rdi; jumptable 000000000001D207 case 11 jz def_1D207; jumptable 000000000001D207 default case mov rax, [rdi+2E0h] jmp loc_1D580 loc_1D2A7: mov qword ptr [rbx], offset loc_18902; jumptable 000000000001D207 case 4 jmp loc_1D583 loc_1D2B3: test rdi, rdi; jumptable 000000000001D207 case 12 jz def_1D207; jumptable 000000000001D207 default case mov eax, [rdi+360h] jmp loc_1D522 loc_1D2C7: test rdi, rdi; jumptable 000000000001D207 case 9 jz def_1D207; jumptable 000000000001D207 default case mov eax, [rdi+90h] jmp loc_1D522 loc_1D2DB: lea rax, client_errors; jumptable 000000000001D207 case 2 jmp loc_1D580 loc_1D2E7: test rdi, rdi; jumptable 000000000001D207 case 16 jz def_1D207; jumptable 000000000001D207 default case call mariadb_connection test al, al lea rax, aMysql; "MySQL" lea rcx, aMariadb; "MariaDB" cmovz rcx, rax mov [rbx], rcx jmp loc_1D583 loc_1D311: lea rax, a10610; jumptable 000000000001D207 case 3 jmp loc_1D580 loc_1D31D: test rdi, rdi; jumptable 000000000001D207 case 7 jz def_1D207; jumptable 000000000001D207 default case mov rsi, rbx call mariadb_get_charset_info jmp loc_1D583 loc_1D333: mov ecx, dword ptr [rbp+var_20]; jumptable 000000000001D207 case 0 cmp rcx, 28h ; '(' ja loc_1D552 mov rax, rcx add rax, [rbp+var_10] add ecx, 8 mov dword ptr [rbp+var_20], ecx jmp loc_1D55E loc_1D352: mov edx, dword ptr [rbp+var_20]; jumptable 000000000001D207 case 1 cmp rdx, 28h ; '(' ja loc_1D567 mov rcx, rdx add rcx, [rbp+var_10] add edx, 8 mov dword ptr [rbp+var_20], edx jmp loc_1D573 loc_1D371: test rdi, rdi; jumptable 000000000001D207 case 31 jz def_1D207; jumptable 000000000001D207 default case mov rax, [rdi+370h] jmp loc_1D580 loc_1D386: test rdi, rdi; jumptable 000000000001D207 case 18 jz def_1D207; jumptable 000000000001D207 default case mov rdi, [rdi+2D0h] call mariadb_server_version_id jmp loc_1D580 loc_1D3A0: test rdi, rdi; jumptable 000000000001D207 case 21 jz loc_1D549 mov rax, [rdi] test rax, rax jz loc_1D549 mov rdi, [rax+38h] test rdi, rdi jz loc_1D549 call ma_pvio_tls_cipher jmp loc_1D580 loc_1D3CC: test rdi, rdi; jumptable 000000000001D207 case 5 jz loc_1D583 mov rax, [rdi+480h] test rax, rax jz loc_1D583 mov rax, [rax+28h] test rax, rax jz loc_1D583 mov eax, [rax+10h] cmp eax, 0FFFFFC19h jb loc_1D58F dec eax imul rax, 10624DD3h shr rax, 26h inc eax jmp loc_1D59F loc_1D414: lea rax, tls_library_version; jumptable 000000000001D207 case 22 jmp loc_1D580 loc_1D420: test rdi, rdi; jumptable 000000000001D207 case 13 jz def_1D207; jumptable 000000000001D207 default case mov eax, [rdi+378h] jmp loc_1D522 loc_1D434: test rdi, rdi; jumptable 000000000001D207 case 6 jz loc_1D583 mov rax, [rdi+480h] test rax, rax jz loc_1D583 mov rax, [rax+28h] test rax, rax jz loc_1D583 mov eax, [rax+10h] jmp loc_1D522 loc_1D462: test rdi, rdi; jumptable 000000000001D207 case 19 jz def_1D207; jumptable 000000000001D207 default case call mariadb_get_socket jmp loc_1D522 loc_1D475: test rdi, rdi; jumptable 000000000001D207 case 10 jz def_1D207; jumptable 000000000001D207 default case mov rax, [rdi+2B0h] jmp loc_1D580 loc_1D48A: test rdi, rdi; jumptable 000000000001D207 case 8 jz def_1D207; jumptable 000000000001D207 default case add rdi, 97h jmp short loc_1D502 loc_1D49C: test rdi, rdi; jumptable 000000000001D207 case 30 jz def_1D207; jumptable 000000000001D207 default case mov eax, [rdi+380h] jmp short loc_1D522 loc_1D4AD: test rdi, rdi; jumptable 000000000001D207 case 32 jz def_1D207; jumptable 000000000001D207 default case mov rax, [rdi+4F0h] mov rax, [rax+70h] jmp loc_1D580 loc_1D4C6: test rdi, rdi; jumptable 000000000001D207 case 23 jz def_1D207; jumptable 000000000001D207 default case mov rcx, [rdi] test rcx, rcx jz def_1D207; jumptable 000000000001D207 default case mov rdi, [rcx+38h] test rdi, rdi jz def_1D207; jumptable 000000000001D207 default case call ma_pvio_tls_get_protocol_version jmp loc_1D580 loc_1D4F2: test rdi, rdi; jumptable 000000000001D207 case 20 jz def_1D207; jumptable 000000000001D207 default case add rdi, 297h loc_1D502: mov [rbx], rdi jmp short loc_1D583 loc_1D507: test rdi, rdi; jumptable 000000000001D207 case 24 jz short def_1D207; jumptable 000000000001D207 default case mov rcx, [rdi] test rcx, rcx jz short def_1D207; jumptable 000000000001D207 default case mov rdi, [rcx+38h] test rdi, rdi jz short def_1D207; jumptable 000000000001D207 default case call ma_pvio_tls_get_protocol_version_id loc_1D522: mov [rbx], eax jmp short loc_1D583 loc_1D526: lea rax, max_allowed_packet; jumptable 000000000001D207 case 28 jmp short loc_1D536 loc_1D52F: lea rax, net_buffer_length; jumptable 000000000001D207 case 29 loc_1D536: mov rax, [rax] jmp short loc_1D580 loc_1D53B: test rdi, rdi; jumptable 000000000001D207 case 26 jz short def_1D207; jumptable 000000000001D207 default case mov rax, [rdi+2C8h] jmp short loc_1D580 loc_1D549: mov qword ptr [rbx], 0 jmp short loc_1D583 loc_1D552: mov rax, [rbp+var_18] lea rcx, [rax+8] mov [rbp+var_18], rcx loc_1D55E: mov edi, [rax] call mysql_find_charset_nr jmp short loc_1D580 loc_1D567: mov rcx, [rbp+var_18] lea rdx, [rcx+8] mov [rbp+var_18], rdx loc_1D573: mov rdi, [rcx] test rdi, rdi jz short def_1D207; jumptable 000000000001D207 default case call mysql_find_charset_name loc_1D580: mov [rbx], rax loc_1D583: xor eax, eax def_1D207: add rsp, 0C8h; jumptable 000000000001D207 default case pop rbx pop rbp retn loc_1D58F: add eax, 3E7h imul rax, 10624DD3h shr rax, 26h loc_1D59F: mov [rbx], eax jmp short loc_1D583
long long mariadb_get_infov( long long a1, int a2, const char **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) { long long result; // rax int socket; // eax const char *charset_nr; // rax bool v19; // al const char *v20; // rcx char *v21; // rax char *v22; // rcx long long v23; // rax long long v24; // rax unsigned int v25; // eax unsigned int v26; // eax long long v27; // rax long long v28; // rax long long v29; // rdi const char **v30; // rax char v31; // [rsp+0h] [rbp-D0h] BYREF long long v32; // [rsp+18h] [rbp-B8h] long long v33; // [rsp+20h] [rbp-B0h] long long v34; // [rsp+28h] [rbp-A8h] __m128 v35; // [rsp+30h] [rbp-A0h] __m128 v36; // [rsp+40h] [rbp-90h] __m128 v37; // [rsp+50h] [rbp-80h] __m128 v38; // [rsp+60h] [rbp-70h] __m128 v39; // [rsp+70h] [rbp-60h] __m128 v40; // [rsp+80h] [rbp-50h] __m128 v41; // [rsp+90h] [rbp-40h] __m128 v42; // [rsp+A0h] [rbp-30h] long long v43; // [rsp+B0h] [rbp-20h] char *v44; // [rsp+B8h] [rbp-18h] char *v45; // [rsp+C0h] [rbp-10h] v35 = a7; v36 = a8; v37 = a9; v38 = a10; v39 = a11; v40 = a12; v41 = a13; v42 = a14; v32 = a4; v33 = a5; v34 = a6; v45 = &v31; v44 = &a15; result = 0x30000000FFLL; v43 = 0x3000000018LL; switch ( a2 ) { case 0: if ( (unsigned int)v43 > 0x28uLL ) { v21 = v44; v44 += 8; } else { v21 = &v45[(unsigned int)v43]; LODWORD(v43) = v43 + 8; } charset_nr = (const char *)mysql_find_charset_nr(*(unsigned int *)v21); goto LABEL_87; case 1: if ( (unsigned int)v43 > 0x28uLL ) { v22 = v44; v44 += 8; } else { v22 = &v45[(unsigned int)v43]; LODWORD(v43) = v43 + 8; } if ( !*(_QWORD *)v22 ) return result; charset_nr = (const char *)mysql_find_charset_name(*(_QWORD *)v22); goto LABEL_87; case 2: charset_nr = (const char *)client_errors; goto LABEL_87; case 3: charset_nr = "10.6.10"; goto LABEL_87; case 4: *a3 = (const char *)&loc_18902; return 0LL; case 5: if ( a1 ) { v23 = *(_QWORD *)(a1 + 1152); if ( v23 ) { v24 = *(_QWORD *)(v23 + 40); if ( v24 ) { v25 = *(_DWORD *)(v24 + 16); if ( v25 < 0xFFFFFC19 ) v26 = (v25 + 999) / 0x3E8; else v26 = (v25 - 1) / 0x3E8 + 1; *(_DWORD *)a3 = v26; } } } return 0LL; case 6: if ( !a1 ) return 0LL; v27 = *(_QWORD *)(a1 + 1152); if ( !v27 ) return 0LL; v28 = *(_QWORD *)(v27 + 40); if ( !v28 ) return 0LL; socket = *(_DWORD *)(v28 + 16); goto LABEL_75; case 7: if ( !a1 ) return result; mariadb_get_charset_info(a1, (long long)a3); return 0LL; case 8: if ( !a1 ) return result; v29 = a1 + 151; goto LABEL_70; case 9: if ( !a1 ) return result; socket = *(_DWORD *)(a1 + 144); goto LABEL_75; case 10: if ( !a1 ) return result; charset_nr = *(const char **)(a1 + 688); goto LABEL_87; case 11: if ( !a1 ) return result; charset_nr = *(const char **)(a1 + 736); goto LABEL_87; case 12: if ( !a1 ) return result; socket = *(_DWORD *)(a1 + 864); goto LABEL_75; case 13: if ( !a1 ) return result; socket = *(_DWORD *)(a1 + 888); goto LABEL_75; case 14: case 25: if ( !a1 || !*(_QWORD *)a1 ) return result; socket = *(_DWORD *)(*(_QWORD *)a1 + 32LL); goto LABEL_75; case 15: if ( !a1 ) return result; charset_nr = *(const char **)(a1 + 744); goto LABEL_87; case 16: if ( !a1 ) return result; v19 = mariadb_connection(a1); v20 = "MariaDB"; if ( !v19 ) v20 = "MySQL"; *a3 = v20; return 0LL; case 17: if ( !a1 ) return result; charset_nr = *(const char **)(a1 + 720); goto LABEL_87; case 18: if ( !a1 ) return result; charset_nr = (const char *)mariadb_server_version_id(*(_QWORD *)(a1 + 720)); goto LABEL_87; case 19: if ( !a1 ) return result; socket = mariadb_get_socket((long long *)a1); goto LABEL_75; case 20: if ( !a1 ) return result; v29 = a1 + 663; LABEL_70: *a3 = (const char *)v29; return 0LL; case 21: if ( a1 && *(_QWORD *)a1 && *(_QWORD *)(*(_QWORD *)a1 + 56LL) ) { charset_nr = (const char *)ma_pvio_tls_cipher(); LABEL_87: *a3 = charset_nr; } else { *a3 = 0LL; } return 0LL; case 22: charset_nr = (const char *)&tls_library_version; goto LABEL_87; case 23: if ( !a1 || !*(_QWORD *)a1 || !*(_QWORD *)(*(_QWORD *)a1 + 56LL) ) return result; charset_nr = (const char *)ma_pvio_tls_get_protocol_version(); goto LABEL_87; case 24: if ( !a1 || !*(_QWORD *)a1 || !*(_QWORD *)(*(_QWORD *)a1 + 56LL) ) return result; socket = ma_pvio_tls_get_protocol_version_id(); goto LABEL_75; case 26: if ( !a1 ) return result; charset_nr = *(const char **)(a1 + 712); goto LABEL_87; case 27: if ( !a1 ) return result; charset_nr = *(const char **)(a1 + 696); goto LABEL_87; case 28: v30 = (const char **)&max_allowed_packet; goto LABEL_78; case 29: v30 = (const char **)&net_buffer_length; LABEL_78: charset_nr = *v30; goto LABEL_87; case 30: if ( !a1 ) return result; socket = *(_DWORD *)(a1 + 896); LABEL_75: *(_DWORD *)a3 = socket; return 0LL; case 31: if ( !a1 ) return result; charset_nr = *(const char **)(a1 + 880); goto LABEL_87; case 32: if ( !a1 ) return result; charset_nr = *(const char **)(*(_QWORD *)(a1 + 1264) + 112LL); goto LABEL_87; case 33: if ( !a1 ) return result; charset_nr = *(const char **)(a1 + 872); goto LABEL_87; case 34: charset_nr = *(const char **)(*(_QWORD *)a1 + 96LL); goto LABEL_87; case 35: charset_nr = *(const char **)(*(_QWORD *)a1 + 104LL); goto LABEL_87; default: return result; } }
mariadb_get_infov: PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0xc8 MOV RBX,RDX LEA RDX,[RBP + -0xd0] MOV qword ptr [RDX + 0x18],RCX MOV qword ptr [RDX + 0x20],R8 MOV qword ptr [RDX + 0x28],R9 TEST AL,AL JZ 0x0011d1d2 MOVAPS xmmword ptr [RBP + -0xa0],XMM0 MOVAPS xmmword ptr [RBP + -0x90],XMM1 MOVAPS xmmword ptr [RBP + -0x80],XMM2 MOVAPS xmmword ptr [RBP + -0x70],XMM3 MOVAPS xmmword ptr [RBP + -0x60],XMM4 MOVAPS xmmword ptr [RBP + -0x50],XMM5 MOVAPS xmmword ptr [RBP + -0x40],XMM6 MOVAPS xmmword ptr [RBP + -0x30],XMM7 LAB_0011d1d2: MOV qword ptr [RBP + -0x10],RDX LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x18],RAX MOV RAX,0x3000000018 MOV qword ptr [RBP + -0x20],RAX MOV AL,0xff CMP ESI,0x23 JA 0x0011d585 MOV ECX,ESI LEA RDX,[0x139f88] MOVSXD RCX,dword ptr [RDX + RCX*0x4] ADD RCX,RDX switchD: JMP RCX caseD_e: TEST RDI,RDI JZ 0x0011d585 MOV RCX,qword ptr [RDI] TEST RCX,RCX JZ 0x0011d585 MOV EAX,dword ptr [RCX + 0x20] JMP 0x0011d522 caseD_23: MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x68] JMP 0x0011d580 caseD_1b: TEST RDI,RDI JZ 0x0011d585 MOV RAX,qword ptr [RDI + 0x2b8] JMP 0x0011d580 caseD_22: MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x60] JMP 0x0011d580 caseD_11: TEST RDI,RDI JZ 0x0011d585 MOV RAX,qword ptr [RDI + 0x2d0] JMP 0x0011d580 caseD_f: TEST RDI,RDI JZ 0x0011d585 MOV RAX,qword ptr [RDI + 0x2e8] JMP 0x0011d580 caseD_21: TEST RDI,RDI JZ 0x0011d585 MOV RAX,qword ptr [RDI + 0x368] JMP 0x0011d580 caseD_b: TEST RDI,RDI JZ 0x0011d585 MOV RAX,qword ptr [RDI + 0x2e0] JMP 0x0011d580 caseD_4: MOV qword ptr [RBX],0x18902 JMP 0x0011d583 caseD_c: TEST RDI,RDI JZ 0x0011d585 MOV EAX,dword ptr [RDI + 0x360] JMP 0x0011d522 caseD_9: TEST RDI,RDI JZ 0x0011d585 MOV EAX,dword ptr [RDI + 0x90] JMP 0x0011d522 caseD_2: LEA RAX,[0x14bad0] JMP 0x0011d580 caseD_10: TEST RDI,RDI JZ 0x0011d585 CALL 0x001161e3 TEST AL,AL LEA RAX,[0x136d83] LEA RCX,[0x136d73] CMOVZ RCX,RAX MOV qword ptr [RBX],RCX JMP 0x0011d583 caseD_3: LEA RAX,[0x136d89] JMP 0x0011d580 caseD_7: TEST RDI,RDI JZ 0x0011d585 MOV RSI,RBX CALL 0x0011cf74 JMP 0x0011d583 caseD_0: MOV ECX,dword ptr [RBP + -0x20] CMP RCX,0x28 JA 0x0011d552 MOV RAX,RCX ADD RAX,qword ptr [RBP + -0x10] ADD ECX,0x8 MOV dword ptr [RBP + -0x20],ECX JMP 0x0011d55e caseD_1: MOV EDX,dword ptr [RBP + -0x20] CMP RDX,0x28 JA 0x0011d567 MOV RCX,RDX ADD RCX,qword ptr [RBP + -0x10] ADD EDX,0x8 MOV dword ptr [RBP + -0x20],EDX JMP 0x0011d573 caseD_1f: TEST RDI,RDI JZ 0x0011d585 MOV RAX,qword ptr [RDI + 0x370] JMP 0x0011d580 caseD_12: TEST RDI,RDI JZ 0x0011d585 MOV RDI,qword ptr [RDI + 0x2d0] CALL 0x0011c679 JMP 0x0011d580 caseD_15: TEST RDI,RDI JZ 0x0011d549 MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x0011d549 MOV RDI,qword ptr [RAX + 0x38] TEST RDI,RDI JZ 0x0011d549 CALL 0x0011e34a JMP 0x0011d580 caseD_5: TEST RDI,RDI JZ 0x0011d583 MOV RAX,qword ptr [RDI + 0x480] TEST RAX,RAX JZ 0x0011d583 MOV RAX,qword ptr [RAX + 0x28] TEST RAX,RAX JZ 0x0011d583 MOV EAX,dword ptr [RAX + 0x10] CMP EAX,0xfffffc19 JC 0x0011d58f DEC EAX IMUL RAX,RAX,0x10624dd3 SHR RAX,0x26 INC EAX JMP 0x0011d59f caseD_16: LEA RAX,[0x14d8f0] JMP 0x0011d580 caseD_d: TEST RDI,RDI JZ 0x0011d585 MOV EAX,dword ptr [RDI + 0x378] JMP 0x0011d522 caseD_6: TEST RDI,RDI JZ 0x0011d583 MOV RAX,qword ptr [RDI + 0x480] TEST RAX,RAX JZ 0x0011d583 MOV RAX,qword ptr [RAX + 0x28] TEST RAX,RAX JZ 0x0011d583 MOV EAX,dword ptr [RAX + 0x10] JMP 0x0011d522 caseD_13: TEST RDI,RDI JZ 0x0011d585 CALL 0x0011d126 JMP 0x0011d522 caseD_a: TEST RDI,RDI JZ 0x0011d585 MOV RAX,qword ptr [RDI + 0x2b0] JMP 0x0011d580 caseD_8: TEST RDI,RDI JZ 0x0011d585 ADD RDI,0x97 JMP 0x0011d502 caseD_1e: TEST RDI,RDI JZ 0x0011d585 MOV EAX,dword ptr [RDI + 0x380] JMP 0x0011d522 caseD_20: TEST RDI,RDI JZ 0x0011d585 MOV RAX,qword ptr [RDI + 0x4f0] MOV RAX,qword ptr [RAX + 0x70] JMP 0x0011d580 caseD_17: TEST RDI,RDI JZ 0x0011d585 MOV RCX,qword ptr [RDI] TEST RCX,RCX JZ 0x0011d585 MOV RDI,qword ptr [RCX + 0x38] TEST RDI,RDI JZ 0x0011d585 CALL 0x0011e368 JMP 0x0011d580 caseD_14: TEST RDI,RDI JZ 0x0011d585 ADD RDI,0x297 LAB_0011d502: MOV qword ptr [RBX],RDI JMP 0x0011d583 caseD_18: TEST RDI,RDI JZ 0x0011d585 MOV RCX,qword ptr [RDI] TEST RCX,RCX JZ 0x0011d585 MOV RDI,qword ptr [RCX + 0x38] TEST RDI,RDI JZ 0x0011d585 CALL 0x0011e35e LAB_0011d522: MOV dword ptr [RBX],EAX JMP 0x0011d583 caseD_1c: LEA RAX,[0x14ba78] JMP 0x0011d536 caseD_1d: LEA RAX,[0x14ba90] LAB_0011d536: MOV RAX,qword ptr [RAX] JMP 0x0011d580 caseD_1a: TEST RDI,RDI JZ 0x0011d585 MOV RAX,qword ptr [RDI + 0x2c8] JMP 0x0011d580 LAB_0011d549: MOV qword ptr [RBX],0x0 JMP 0x0011d583 LAB_0011d552: MOV RAX,qword ptr [RBP + -0x18] LEA RCX,[RAX + 0x8] MOV qword ptr [RBP + -0x18],RCX LAB_0011d55e: MOV EDI,dword ptr [RAX] CALL 0x00131bb6 JMP 0x0011d580 LAB_0011d567: MOV RCX,qword ptr [RBP + -0x18] LEA RDX,[RCX + 0x8] MOV qword ptr [RBP + -0x18],RDX LAB_0011d573: MOV RDI,qword ptr [RCX] TEST RDI,RDI JZ 0x0011d585 CALL 0x00131c3a LAB_0011d580: MOV qword ptr [RBX],RAX LAB_0011d583: XOR EAX,EAX default: ADD RSP,0xc8 POP RBX POP RBP RET LAB_0011d58f: ADD EAX,0x3e7 IMUL RAX,RAX,0x10624dd3 SHR RAX,0x26 LAB_0011d59f: MOV dword ptr [RBX],EAX JMP 0x0011d583
/* WARNING: Removing unreachable block (ram,0x0011d552) */ /* WARNING: Removing unreachable block (ram,0x0011d567) */ /* WARNING: Heritage AFTER dead removal. Example location: s0xffffffffffffff40 : 0x0011d55e */ /* WARNING: Restarted to delay deadcode elimination for space: stack */ int8 mariadb_get_infov(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, long *param_9,int4 param_10,uint *param_11,int8 param_12, int8 param_13,int8 param_14) { int4 uVar1; char in_AL; char cVar2; uint uVar3; int8 uVar4; int1 *puVar5; long *plVar6; char *pcVar7; long lVar8; int1 local_d8 [24]; long local_c0; int8 local_b8; int8 local_b0; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int8 local_38; int8 local_28; int1 *local_20; int1 *local_18; local_18 = local_d8; if (in_AL != '\0') { local_a8 = param_1; local_98 = param_2; local_88 = param_3; local_78 = param_4; local_68 = param_5; local_58 = param_6; local_48 = param_7; local_38 = param_8; } local_20 = &stack0x00000008; local_28 = 0x3000000018; uVar4 = 0x30000000ff; local_b8 = param_13; local_b0 = param_14; switch(param_10) { case 0: local_28 = 0x3000000020; uVar1 = (int4)local_c0; local_c0 = param_12; puVar5 = (int1 *)mysql_find_charset_nr(uVar1); break; case 1: local_28 = 0x3000000020; if (local_c0 == 0) { return 0x30000000ff; } local_c0 = param_12; puVar5 = (int1 *)mysql_find_charset_name(); break; case 2: puVar5 = (int1 *)&client_errors; break; case 3: puVar5 = "10.6.10"; break; case 4: param_11[0] = 0x18902; param_11[1] = 0; goto LAB_0011d583; case 5: if (((param_9 != (long *)0x0) && (param_9[0x90] != 0)) && (lVar8 = *(long *)(param_9[0x90] + 0x28), lVar8 != 0)) { uVar3 = *(uint *)(lVar8 + 0x10); if (uVar3 < 0xfffffc19) { uVar3 = (uVar3 + 999) / 1000; } else { uVar3 = (uVar3 - 1) / 1000 + 1; } *param_11 = uVar3; } goto LAB_0011d583; case 6: if (((param_9 != (long *)0x0) && (param_9[0x90] != 0)) && (lVar8 = *(long *)(param_9[0x90] + 0x28), lVar8 != 0)) { uVar3 = *(uint *)(lVar8 + 0x10); goto LAB_0011d522; } goto LAB_0011d583; case 7: if (param_9 == (long *)0x0) { return 0x30000000ff; } local_c0 = param_12; mariadb_get_charset_info(param_9,param_11); goto LAB_0011d583; case 8: if (param_9 == (long *)0x0) { return 0x30000000ff; } lVar8 = (long)param_9 + 0x97; goto LAB_0011d502; case 9: if (param_9 == (long *)0x0) { return 0x30000000ff; } uVar3 = *(uint *)(param_9 + 0x12); goto LAB_0011d522; case 10: if (param_9 == (long *)0x0) { return 0x30000000ff; } puVar5 = (int1 *)param_9[0x56]; break; case 0xb: if (param_9 == (long *)0x0) { return 0x30000000ff; } puVar5 = (int1 *)param_9[0x5c]; break; case 0xc: if (param_9 == (long *)0x0) { return 0x30000000ff; } uVar3 = *(uint *)(param_9 + 0x6c); goto LAB_0011d522; case 0xd: if (param_9 == (long *)0x0) { return 0x30000000ff; } uVar3 = *(uint *)(param_9 + 0x6f); goto LAB_0011d522; case 0xe: case 0x19: if (param_9 == (long *)0x0) { return 0x30000000ff; } if (*param_9 == 0) { return 0x30000000ff; } uVar3 = *(uint *)(*param_9 + 0x20); goto LAB_0011d522; case 0xf: if (param_9 == (long *)0x0) { return 0x30000000ff; } puVar5 = (int1 *)param_9[0x5d]; break; case 0x10: if (param_9 == (long *)0x0) { return 0x30000000ff; } local_c0 = param_12; cVar2 = mariadb_connection(); pcVar7 = "MariaDB"; if (cVar2 == '\0') { pcVar7 = "MySQL"; } *(char **)param_11 = pcVar7; goto LAB_0011d583; case 0x11: if (param_9 == (long *)0x0) { return 0x30000000ff; } puVar5 = (int1 *)param_9[0x5a]; break; case 0x12: if (param_9 == (long *)0x0) { return 0x30000000ff; } local_c0 = param_12; puVar5 = (int1 *)mariadb_server_version_id(param_9[0x5a]); break; case 0x13: if (param_9 == (long *)0x0) { return 0x30000000ff; } local_c0 = param_12; uVar3 = mariadb_get_socket(); goto LAB_0011d522; case 0x14: if (param_9 == (long *)0x0) { return 0x30000000ff; } lVar8 = (long)param_9 + 0x297; LAB_0011d502: *(long *)param_11 = lVar8; goto LAB_0011d583; case 0x15: if (((param_9 != (long *)0x0) && (*param_9 != 0)) && (*(long *)(*param_9 + 0x38) != 0)) { local_c0 = param_12; puVar5 = (int1 *)ma_pvio_tls_cipher(); break; } param_11[0] = 0; param_11[1] = 0; goto LAB_0011d583; case 0x16: puVar5 = tls_library_version; break; case 0x17: if (param_9 == (long *)0x0) { return 0x30000000ff; } if (*param_9 == 0) { return 0x30000000ff; } if (*(long *)(*param_9 + 0x38) == 0) { return 0x30000000ff; } local_c0 = param_12; puVar5 = (int1 *)ma_pvio_tls_get_protocol_version(); break; case 0x18: if (param_9 == (long *)0x0) { return 0x30000000ff; } if (*param_9 == 0) { return 0x30000000ff; } if (*(long *)(*param_9 + 0x38) == 0) { return 0x30000000ff; } local_c0 = param_12; uVar3 = ma_pvio_tls_get_protocol_version_id(); goto LAB_0011d522; case 0x1a: if (param_9 == (long *)0x0) { return 0x30000000ff; } puVar5 = (int1 *)param_9[0x59]; break; case 0x1b: if (param_9 == (long *)0x0) { return 0x30000000ff; } puVar5 = (int1 *)param_9[0x57]; break; case 0x1c: plVar6 = &max_allowed_packet; goto LAB_0011d536; case 0x1d: plVar6 = &net_buffer_length; LAB_0011d536: puVar5 = (int1 *)*plVar6; break; case 0x1e: if (param_9 == (long *)0x0) { return 0x30000000ff; } uVar3 = *(uint *)(param_9 + 0x70); LAB_0011d522: *param_11 = uVar3; goto LAB_0011d583; case 0x1f: if (param_9 == (long *)0x0) { return 0x30000000ff; } puVar5 = (int1 *)param_9[0x6e]; break; case 0x20: if (param_9 == (long *)0x0) { return 0x30000000ff; } puVar5 = *(int1 **)(param_9[0x9e] + 0x70); break; case 0x21: if (param_9 == (long *)0x0) { return 0x30000000ff; } puVar5 = (int1 *)param_9[0x6d]; break; case 0x22: puVar5 = *(int1 **)(*param_9 + 0x60); break; case 0x23: puVar5 = *(int1 **)(*param_9 + 0x68); break; default: goto switchD_0011d207_default; } *(int1 **)param_11 = puVar5; LAB_0011d583: uVar4 = 0; switchD_0011d207_default: return uVar4; }
6,645
nglog::(anonymous namespace)::LogFileObject::LogSize()
ng-log[P]ng-log/src/logging.cc
uint32 LogSize() override { std::lock_guard<std::mutex> l{mutex_}; return file_length_; }
O3
cpp
nglog::(anonymous namespace)::LogFileObject::LogSize(): pushq %rbp pushq %r14 pushq %rbx movq %rdi, %r14 leaq 0x8(%rdi), %rbx movq %rbx, %rdi callq 0x7840 testl %eax, %eax jne 0x106f5 movl 0xac(%r14), %ebp movq %rbx, %rdi callq 0x73e0 movl %ebp, %eax popq %rbx popq %r14 popq %rbp retq movl %eax, %edi callq 0x7350
_ZN5nglog12_GLOBAL__N_113LogFileObject7LogSizeEv: push rbp push r14 push rbx mov r14, rdi lea rbx, [rdi+8] mov rdi, rbx call _pthread_mutex_lock test eax, eax jnz short loc_106F5 mov ebp, [r14+0ACh] mov rdi, rbx call _pthread_mutex_unlock mov eax, ebp pop rbx pop r14 pop rbp retn loc_106F5: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int)
long long nglog::`anonymous namespace'::LogFileObject::LogSize( nglog::_anonymous_namespace_::LogFileObject *this) { int v1; // eax unsigned int v2; // ebp v1 = pthread_mutex_lock((char *)this + 8); if ( v1 ) std::__throw_system_error(v1); v2 = *((_DWORD *)this + 43); pthread_mutex_unlock((char *)this + 8); return v2; }
LogSize: PUSH RBP PUSH R14 PUSH RBX MOV R14,RDI LEA RBX,[RDI + 0x8] MOV RDI,RBX CALL 0x00107840 TEST EAX,EAX JNZ 0x001106f5 MOV EBP,dword ptr [R14 + 0xac] MOV RDI,RBX CALL 0x001073e0 MOV EAX,EBP POP RBX POP R14 POP RBP RET LAB_001106f5: MOV EDI,EAX CALL 0x00107350
/* nglog::(anonymous namespace)::LogFileObject::LogSize() */ int4 __thiscall nglog::(anonymous_namespace)::LogFileObject::LogSize(LogFileObject *this) { int4 uVar1; int iVar2; iVar2 = pthread_mutex_lock((pthread_mutex_t *)(this + 8)); if (iVar2 == 0) { uVar1 = *(int4 *)(this + 0xac); pthread_mutex_unlock((pthread_mutex_t *)(this + 8)); return uVar1; } /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar2); }
6,646
common_chat_verify_template(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
llama.cpp/common/chat.cpp
bool common_chat_verify_template(const std::string & tmpl, bool use_jinja) { if (use_jinja) { try { common_chat_msg msg; msg.role = "user"; msg.content = "test"; auto tmpls = common_chat_templates_init(/* model= */ nullptr, tmpl); common_chat_templates_inputs inputs; inputs.messages = {msg}; common_chat_templates_apply(tmpls.get(), inputs); return true; } catch (const std::exception & e) { LOG_ERR("%s: failed to apply template: %s\n", __func__, e.what()); return false; } } llama_chat_message chat[] = {{"user", "test"}}; const int res = llama_chat_apply_template(tmpl.c_str(), chat, 1, true, nullptr, 0); return res >= 0; }
O3
cpp
common_chat_verify_template(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x2c8, %rsp # imm = 0x2C8 movq %rdi, %rbx testl %esi, %esi je 0x37b10 leaq 0x170(%rsp), %rax movq %rax, -0x10(%rax) xorl %ecx, %ecx movq %rcx, -0x8(%rax) movb %cl, (%rax) leaq 0x190(%rsp), %rax movq %rax, -0x10(%rax) movq %rcx, -0x8(%rax) movb %cl, (%rax) leaq 0x1e0(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, -0x40(%rax) movups %xmm0, -0x30(%rax) movups %xmm0, -0x20(%rax) movq %rax, -0x10(%rax) movq %rcx, -0x8(%rax) movb %cl, (%rax) leaq 0x200(%rsp), %rax movq %rax, -0x10(%rax) movq %rcx, -0x8(%rax) movb %cl, (%rax) leaq 0x220(%rsp), %rax movq %rax, -0x10(%rax) movq %rcx, -0x8(%rax) movb %cl, (%rax) leaq 0x9394f(%rip), %rcx # 0xcb227 leaq 0x160(%rsp), %rdi movl $0x4, %r8d xorl %esi, %esi xorl %edx, %edx callq 0x1d6d0 leaq 0x180(%rsp), %rdi movq 0x8(%rdi), %rdx leaq 0x9266d(%rip), %rcx # 0xc9f6f movl $0x4, %r8d xorl %esi, %esi callq 0x1d6d0 leaq 0xa0(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x9ac6e(%rip), %rdx # 0xd2590 leaq 0x90(%rsp), %rdi movq %rdx, %rsi callq 0x237c2 leaq 0x20(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x9ac4d(%rip), %rdx # 0xd2590 leaq 0x10(%rsp), %rdi movq %rdx, %rsi callq 0x237c2 leaq 0x8(%rsp), %rdi leaq 0x90(%rsp), %rcx leaq 0x10(%rsp), %r8 xorl %esi, %esi movq %rbx, %rdx callq 0x37c5a movq 0x10(%rsp), %rdi cmpq %r12, %rdi je 0x37983 movq 0x20(%rsp), %rsi incq %rsi callq 0x1d160 movq 0x90(%rsp), %rdi cmpq %r15, %rdi je 0x379a0 movq 0xa0(%rsp), %rsi incq %rsi callq 0x1d160 xorl %eax, %eax leaq 0x38(%rsp), %r14 movq %rax, -0x18(%r14) xorps %xmm0, %xmm0 movaps %xmm0, -0x28(%r14) movq %r14, -0x10(%r14) movq %rax, -0x8(%r14) movb %al, (%r14) leaq 0x58(%rsp), %r12 movq %r12, -0x10(%r12) movq %rax, -0x8(%r12) movb %al, (%r12) movw $0x101, 0x10(%r12) # imm = 0x101 movaps %xmm0, 0x18(%r12) movups %xmm0, 0x25(%r12) movb $0x1, 0x35(%r12) leaq 0x90(%rsp), %rdi leaq 0x160(%rsp), %rsi callq 0x3153e leaq 0x160(%rsp), %rdx leaq 0x10(%rsp), %rdi leaq 0x90(%rsp), %rsi callq 0x8cda2 leaq 0x90(%rsp), %rdi callq 0x3128c movq 0x8(%rsp), %r15 leaq 0x230(%rsp), %rdi leaq 0x10(%rsp), %rdx movq %r15, %rsi callq 0x3828b leaq 0x2b0(%rsp), %rdi callq 0x23764 leaq 0x298(%rsp), %rdi callq 0x23764 leaq 0x280(%rsp), %rbx movq %rbx, %rdi callq 0x23fe6 movq -0x28(%rbx), %rdi leaq 0x268(%rsp), %rax cmpq %rax, %rdi je 0x37a8c movq 0x268(%rsp), %rsi incq %rsi callq 0x1d160 leaq 0x70(%rsp), %rbx leaq 0x248(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x37ab2 movq 0x248(%rsp), %rsi incq %rsi callq 0x1d160 movq %rbx, %rdi callq 0x31dc0 movq 0x48(%rsp), %rdi cmpq %r12, %rdi je 0x37ad1 movq 0x58(%rsp), %rsi incq %rsi callq 0x1d160 movq 0x28(%rsp), %rdi cmpq %r14, %rdi je 0x37ae8 movq 0x38(%rsp), %rsi incq %rsi callq 0x1d160 leaq 0x10(%rsp), %rdi callq 0x31df0 testq %r15, %r15 je 0x37aff movq %r15, %rdi callq 0x3add7 leaq 0x160(%rsp), %rdi callq 0x3128c movb $0x1, %al jmp 0x37b3f movaps 0xd1449(%rip), %xmm0 # 0x108f60 leaq 0x160(%rsp), %rsi movaps %xmm0, (%rsi) movq (%rbx), %rdi movl $0x1, %edx movl $0x1, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x1d660 testl %eax, %eax setns %al addq $0x2c8, %rsp # imm = 0x2C8 popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rdx, %r14 movq %rax, %rbx jmp 0x37b76 movq %rdx, %r14 movq %rax, %rbx leaq 0x90(%rsp), %rdi callq 0x3128c jmp 0x37b71 movq %rdx, %r14 movq %rax, %rbx movq 0x8(%rsp), %r15 leaq 0x10(%rsp), %rdi callq 0x31382 testq %r15, %r15 je 0x37bdb movq %r15, %rdi callq 0x3add7 jmp 0x37bdb movq %rdx, %r14 movq %rax, %rbx movq 0x10(%rsp), %rdi cmpq %r12, %rdi je 0x37bb4 movq 0x20(%rsp), %rsi incq %rsi callq 0x1d160 jmp 0x37bb4 movq %rdx, %r14 movq %rax, %rbx movq 0x90(%rsp), %rdi cmpq %r15, %rdi je 0x37bdb movq 0xa0(%rsp), %rsi incq %rsi callq 0x1d160 jmp 0x37bdb jmp 0x37bd5 movq %rdx, %r14 movq %rax, %rbx leaq 0x160(%rsp), %rdi callq 0x3128c cmpl $0x1, %r14d jne 0x37c4a movq %rbx, %rdi callq 0x1d090 movq %rax, %rbx leaq 0xd4b60(%rip), %rax # 0x10c760 cmpl $0x0, (%rax) js 0x37c36 callq 0xc7df7 movq %rax, %r14 movq (%rbx), %rax movq %rbx, %rdi callq *0x10(%rax) leaq 0x9a007(%rip), %rdx # 0xd1c24 leaq 0x9a022(%rip), %rcx # 0xd1c46 movq %r14, %rdi movl $0x4, %esi movq %rax, %r8 xorl %eax, %eax callq 0xc7e94 callq 0x1dae0 xorl %eax, %eax jmp 0x37b3f movq %rax, %rbx callq 0x1dae0 movq %rbx, %rdi callq 0x1d8e0 movq %rax, %rdi callq 0x232f3
_Z27common_chat_verify_templateRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb: push r15 push r14 push r12 push rbx sub rsp, 2C8h mov rbx, rdi test esi, esi jz loc_37B10 lea rax, [rsp+2E8h+var_178] mov [rax-10h], rax xor ecx, ecx mov [rax-8], rcx mov [rax], cl lea rax, [rsp+2E8h+var_158] mov [rax-10h], rax mov [rax-8], rcx mov [rax], cl lea rax, [rsp+2E8h+var_108] xorps xmm0, xmm0 movups xmmword ptr [rax-40h], xmm0 movups xmmword ptr [rax-30h], xmm0 movups xmmword ptr [rax-20h], xmm0 mov [rax-10h], rax mov [rax-8], rcx mov [rax], cl lea rax, [rsp+2E8h+var_E8] mov [rax-10h], rax mov [rax-8], rcx mov [rax], cl lea rax, [rsp+2E8h+var_C8] mov [rax-10h], rax mov [rax-8], rcx mov [rax], cl lea rcx, aUser; "user" lea rdi, [rsp+2E8h+var_188] mov r8d, 4 xor esi, esi xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) lea rdi, [rsp+2E8h+var_168] mov rdx, [rdi+8] lea rcx, aLatest+2; "test" mov r8d, 4 xor esi, esi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) lea r15, [rsp+2E8h+var_248] mov [r15-10h], r15 lea rdx, aExampleToolCal+1Dh; "" lea rdi, [rsp+2E8h+var_258] mov rsi, rdx 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 r12, [rsp+2E8h+var_2C8] mov [r12-10h], r12 lea rdx, aExampleToolCal+1Dh; "" lea rdi, [rsp+2E8h+var_2D8] mov rsi, rdx 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+2E8h+var_2E0] lea rcx, [rsp+2E8h+var_258] lea r8, [rsp+2E8h+var_2D8] xor esi, esi mov rdx, rbx call _Z26common_chat_templates_initPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_S9_; common_chat_templates_init(llama_model const*,std::string const&,std::string const&,std::string const&) mov rdi, [rsp+2E8h+var_2D8]; void * cmp rdi, r12 jz short loc_37983 mov rsi, [rsp+2E8h+var_2C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_37983: mov rdi, [rsp+2E8h+var_258]; void * cmp rdi, r15 jz short loc_379A0 mov rsi, [rsp+2E8h+var_248] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_379A0: xor eax, eax lea r14, [rsp+2E8h+var_2B0] mov [r14-18h], rax xorps xmm0, xmm0 movaps xmmword ptr [r14-28h], xmm0 mov [r14-10h], r14 mov [r14-8], rax mov [r14], al lea r12, [rsp+2E8h+var_290] mov [r12-10h], r12 mov [r12-8], rax mov [r12], al mov word ptr [r12+10h], 101h movaps xmmword ptr [r12+18h], xmm0 movups xmmword ptr [r12+25h], xmm0 mov byte ptr [r12+35h], 1 lea rdi, [rsp+2E8h+var_258]; this lea rsi, [rsp+2E8h+var_188]; common_chat_msg * call _ZN15common_chat_msgC2ERKS_; common_chat_msg::common_chat_msg(common_chat_msg const&) lea rdx, [rsp+2E8h+var_188] lea rdi, [rsp+2E8h+var_2D8] lea rsi, [rsp+2E8h+var_258] call _ZNSt6vectorI15common_chat_msgSaIS0_EE13_M_assign_auxIPKS0_EEvT_S6_St20forward_iterator_tag; std::vector<common_chat_msg>::_M_assign_aux<common_chat_msg const*>(common_chat_msg const*,common_chat_msg const*,std::forward_iterator_tag) lea rdi, [rsp+2E8h+var_258]; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() mov r15, [rsp+2E8h+var_2E0] lea rdi, [rsp+2E8h+var_B8] lea rdx, [rsp+2E8h+var_2D8] mov rsi, r15 call _Z27common_chat_templates_applyPK21common_chat_templatesRK28common_chat_templates_inputs; common_chat_templates_apply(common_chat_templates const*,common_chat_templates_inputs const&) lea rdi, [rsp+2E8h+var_38] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rdi, [rsp+2E8h+var_50] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rbx, [rsp+2E8h+var_68] mov rdi, rbx call _ZNSt6vectorI22common_grammar_triggerSaIS0_EED2Ev; std::vector<common_grammar_trigger>::~vector() mov rdi, [rbx-28h]; void * lea rax, [rsp+2E8h+var_80] cmp rdi, rax jz short loc_37A8C mov rsi, [rsp+2E8h+var_80] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_37A8C: lea rbx, [rsp+2E8h+var_278] lea rax, [rsp+2E8h+var_A0] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_37AB2 mov rsi, [rsp+2E8h+var_A0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_37AB2: mov rdi, rbx call _ZNSt6vectorI16common_chat_toolSaIS0_EED2Ev; std::vector<common_chat_tool>::~vector() mov rdi, [rsp+2E8h+var_2A0]; void * cmp rdi, r12 jz short loc_37AD1 mov rsi, [rsp+2E8h+var_290] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_37AD1: mov rdi, [rsp+2E8h+var_2C0]; void * cmp rdi, r14 jz short loc_37AE8 mov rsi, [rsp+2E8h+var_2B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_37AE8: lea rdi, [rsp+2E8h+var_2D8] call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector() test r15, r15 jz short loc_37AFF mov rdi, r15; void * call _Z26common_chat_templates_freeP21common_chat_templates; common_chat_templates_free(common_chat_templates *) loc_37AFF: lea rdi, [rsp+2E8h+var_188]; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() mov al, 1 jmp short loc_37B3F loc_37B10: movaps xmm0, xmmword ptr cs:off_108F60; "user" lea rsi, [rsp+2E8h+var_188] movaps xmmword ptr [rsi], xmm0 mov rdi, [rbx] mov edx, 1 mov ecx, 1 xor r8d, r8d xor r9d, r9d call _llama_chat_apply_template test eax, eax setns al loc_37B3F: add rsp, 2C8h pop rbx pop r12 pop r14 pop r15 retn mov r14, rdx mov rbx, rax jmp short loc_37B76 mov r14, rdx mov rbx, rax lea rdi, [rsp+2E8h+var_258]; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() jmp short loc_37B71 mov r14, rdx mov rbx, rax loc_37B71: mov r15, [rsp+2E8h+var_2E0] loc_37B76: lea rdi, [rsp+2E8h+var_2D8]; this call _ZN28common_chat_templates_inputsD2Ev; common_chat_templates_inputs::~common_chat_templates_inputs() test r15, r15 jz short loc_37BDB mov rdi, r15; void * call _Z26common_chat_templates_freeP21common_chat_templates; common_chat_templates_free(common_chat_templates *) jmp short loc_37BDB mov r14, rdx mov rbx, rax mov rdi, [rsp+2E8h+var_2D8]; void * cmp rdi, r12 jz short loc_37BB4 mov rsi, [rsp+2E8h+var_2C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_37BB4 mov r14, rdx mov rbx, rax loc_37BB4: mov rdi, [rsp+2E8h+var_258]; void * cmp rdi, r15 jz short loc_37BDB mov rsi, [rsp+2E8h+var_248] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_37BDB jmp short $+2 loc_37BD5: mov r14, rdx mov rbx, rax loc_37BDB: lea rdi, [rsp+2E8h+var_188]; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() cmp r14d, 1 jnz short loc_37C4A mov rdi, rbx; void * call ___cxa_begin_catch mov rbx, rax lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_37C36 call _Z15common_log_mainv; common_log_main(void) mov r14, rax mov rax, [rbx] mov rdi, rbx call qword ptr [rax+10h] lea rdx, aSFailedToApply; "%s: failed to apply template: %s\n" lea rcx, aCommonChatVeri; "common_chat_verify_template" mov rdi, r14 mov esi, 4 mov r8, rax xor eax, eax call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) loc_37C36: call ___cxa_end_catch xor eax, eax jmp loc_37B3F mov rbx, rax call ___cxa_end_catch loc_37C4A: mov rdi, rbx call __Unwind_Resume mov rdi, rax call __clang_call_terminate
bool common_chat_verify_template(_QWORD *a1, int a2) { void *v2; // r15 void *v4; // [rsp+8h] [rbp-2E0h] BYREF __int128 v5; // [rsp+10h] [rbp-2D8h] BYREF long long v6; // [rsp+20h] [rbp-2C8h] BYREF void *v7; // [rsp+28h] [rbp-2C0h] long long v8; // [rsp+30h] [rbp-2B8h] _QWORD v9[2]; // [rsp+38h] [rbp-2B0h] BYREF void *v10; // [rsp+48h] [rbp-2A0h] long long v11; // [rsp+50h] [rbp-298h] _QWORD v12[2]; // [rsp+58h] [rbp-290h] BYREF __int16 v13; // [rsp+68h] [rbp-280h] _BYTE v14[29]; // [rsp+70h] [rbp-278h] BYREF char v15; // [rsp+8Dh] [rbp-25Bh] void *v16[2]; // [rsp+90h] [rbp-258h] BYREF _QWORD v17[24]; // [rsp+A0h] [rbp-248h] BYREF __int128 v18; // [rsp+160h] [rbp-188h] BYREF char v19; // [rsp+170h] [rbp-178h] BYREF char *v20; // [rsp+180h] [rbp-168h] BYREF long long v21; // [rsp+188h] [rbp-160h] char v22; // [rsp+190h] [rbp-158h] BYREF __int128 v23; // [rsp+1A0h] [rbp-148h] __int128 v24; // [rsp+1B0h] [rbp-138h] __int128 v25; // [rsp+1C0h] [rbp-128h] char *v26; // [rsp+1D0h] [rbp-118h] long long v27; // [rsp+1D8h] [rbp-110h] char v28; // [rsp+1E0h] [rbp-108h] BYREF char *v29; // [rsp+1F0h] [rbp-F8h] long long v30; // [rsp+1F8h] [rbp-F0h] char v31; // [rsp+200h] [rbp-E8h] BYREF char *v32; // [rsp+210h] [rbp-D8h] long long v33; // [rsp+218h] [rbp-D0h] char v34; // [rsp+220h] [rbp-C8h] BYREF _BYTE v35[8]; // [rsp+230h] [rbp-B8h] BYREF long long *v36; // [rsp+238h] [rbp-B0h] long long v37; // [rsp+248h] [rbp-A0h] BYREF long long *v38; // [rsp+258h] [rbp-90h] long long v39; // [rsp+268h] [rbp-80h] BYREF _BYTE v40[24]; // [rsp+280h] [rbp-68h] BYREF _BYTE v41[24]; // [rsp+298h] [rbp-50h] BYREF _BYTE v42[56]; // [rsp+2B0h] [rbp-38h] BYREF if ( a2 ) { *(_QWORD *)&v18 = &v19; *((_QWORD *)&v18 + 1) = 0LL; v19 = 0; v20 = &v22; v21 = 0LL; v22 = 0; v23 = 0LL; v24 = 0LL; v25 = 0LL; v26 = &v28; v27 = 0LL; v28 = 0; v29 = &v31; v30 = 0LL; v31 = 0; v32 = &v34; v33 = 0LL; v34 = 0; std::string::_M_replace(&v18, 0LL, 0LL, "user", 4LL); std::string::_M_replace(&v20, 0LL, v21, "test", 4LL); v16[0] = v17; std::string::_M_construct<char const*>((long long)v16, "", (long long)""); *(_QWORD *)&v5 = &v6; std::string::_M_construct<char const*>((long long)&v5, "", (long long)""); common_chat_templates_init(&v4, 0LL, a1, v16, &v5); if ( (long long *)v5 != &v6 ) operator delete((void *)v5, v6 + 1); if ( v16[0] != v17 ) operator delete(v16[0], v17[0] + 1LL); v6 = 0LL; v5 = 0LL; v7 = v9; v8 = 0LL; LOBYTE(v9[0]) = 0; v10 = v12; v11 = 0LL; LOBYTE(v12[0]) = 0; v13 = 257; memset(v14, 0, sizeof(v14)); v15 = 1; common_chat_msg::common_chat_msg((common_chat_msg *)v16, (const common_chat_msg *)&v18); std::vector<common_chat_msg>::_M_assign_aux<common_chat_msg const*>(&v5, v16, &v18); common_chat_msg::~common_chat_msg((common_chat_msg *)v16); v2 = v4; common_chat_templates_apply(v35, v4); std::vector<std::string>::~vector((long long)v42); std::vector<std::string>::~vector((long long)v41); std::vector<common_grammar_trigger>::~vector((long long)v40); if ( v38 != &v39 ) operator delete(v38, v39 + 1); if ( v36 != &v37 ) operator delete(v36, v37 + 1); std::vector<common_chat_tool>::~vector(v14); if ( v10 != v12 ) operator delete(v10, v12[0] + 1LL); if ( v7 != v9 ) operator delete(v7, v9[0] + 1LL); std::vector<common_chat_msg>::~vector((long long)&v5); if ( v2 ) common_chat_templates_free(v2); common_chat_msg::~common_chat_msg((common_chat_msg *)&v18); return 1; } else { v18 = *(_OWORD *)&off_108F60; return (int)llama_chat_apply_template(*a1, &v18, 1LL, 1LL, 0LL, 0LL) >= 0; } }
common_chat_verify_template: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x2c8 MOV RBX,RDI TEST ESI,ESI JZ 0x00137b10 LEA RAX,[RSP + 0x170] MOV qword ptr [RAX + -0x10],RAX XOR ECX,ECX MOV qword ptr [RAX + -0x8],RCX MOV byte ptr [RAX],CL LEA RAX,[RSP + 0x190] MOV qword ptr [RAX + -0x10],RAX MOV qword ptr [RAX + -0x8],RCX MOV byte ptr [RAX],CL LEA RAX,[RSP + 0x1e0] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x40],XMM0 MOVUPS xmmword ptr [RAX + -0x30],XMM0 MOVUPS xmmword ptr [RAX + -0x20],XMM0 MOV qword ptr [RAX + -0x10],RAX MOV qword ptr [RAX + -0x8],RCX MOV byte ptr [RAX],CL LEA RAX,[RSP + 0x200] MOV qword ptr [RAX + -0x10],RAX MOV qword ptr [RAX + -0x8],RCX MOV byte ptr [RAX],CL LEA RAX,[RSP + 0x220] MOV qword ptr [RAX + -0x10],RAX MOV qword ptr [RAX + -0x8],RCX MOV byte ptr [RAX],CL LAB_001378d1: LEA RCX,[0x1cb227] LEA RDI,[RSP + 0x160] MOV R8D,0x4 XOR ESI,ESI XOR EDX,EDX CALL 0x0011d6d0 LEA RDI,[RSP + 0x180] MOV RDX,qword ptr [RDI + 0x8] LEA RCX,[0x1c9f6f] MOV R8D,0x4 XOR ESI,ESI CALL 0x0011d6d0 LEA R15,[RSP + 0xa0] MOV qword ptr [R15 + -0x10],R15 LAB_0013791b: LEA RDX,[0x1d2590] LEA RDI,[RSP + 0x90] MOV RSI,RDX CALL 0x001237c2 LEA R12,[RSP + 0x20] MOV qword ptr [R12 + -0x10],R12 LAB_0013793c: LEA RDX,[0x1d2590] LEA RDI,[RSP + 0x10] MOV RSI,RDX CALL 0x001237c2 LAB_00137950: LEA RDI,[RSP + 0x8] LEA RCX,[RSP + 0x90] LEA R8,[RSP + 0x10] XOR ESI,ESI MOV RDX,RBX CALL 0x00137c5a MOV RDI,qword ptr [RSP + 0x10] CMP RDI,R12 JZ 0x00137983 MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x0011d160 LAB_00137983: MOV RDI,qword ptr [RSP + 0x90] CMP RDI,R15 JZ 0x001379a0 MOV RSI,qword ptr [RSP + 0xa0] INC RSI CALL 0x0011d160 LAB_001379a0: XOR EAX,EAX LEA R14,[RSP + 0x38] MOV qword ptr [R14 + -0x18],RAX XORPS XMM0,XMM0 MOVAPS xmmword ptr [R14 + -0x28],XMM0 MOV qword ptr [R14 + -0x10],R14 MOV qword ptr [R14 + -0x8],RAX MOV byte ptr [R14],AL LEA R12,[RSP + 0x58] MOV qword ptr [R12 + -0x10],R12 MOV qword ptr [R12 + -0x8],RAX MOV byte ptr [R12],AL MOV word ptr [R12 + 0x10],0x101 MOVAPS xmmword ptr [R12 + 0x18],XMM0 MOVUPS xmmword ptr [R12 + 0x25],XMM0 MOV byte ptr [R12 + 0x35],0x1 LAB_001379eb: LEA RDI,[RSP + 0x90] LEA RSI,[RSP + 0x160] CALL 0x0013153e LEA RDX,[RSP + 0x160] LAB_00137a08: LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x90] CALL 0x0018cda2 LEA RDI,[RSP + 0x90] CALL 0x0013128c MOV R15,qword ptr [RSP + 0x8] LAB_00137a2c: LEA RDI,[RSP + 0x230] LEA RDX,[RSP + 0x10] MOV RSI,R15 CALL 0x0013828b LAB_00137a41: LEA RDI,[RSP + 0x2b0] CALL 0x00123764 LEA RDI,[RSP + 0x298] CALL 0x00123764 LEA RBX,[RSP + 0x280] MOV RDI,RBX CALL 0x00123fe6 MOV RDI,qword ptr [RBX + -0x28] LEA RAX,[RSP + 0x268] CMP RDI,RAX JZ 0x00137a8c MOV RSI,qword ptr [RSP + 0x268] INC RSI CALL 0x0011d160 LAB_00137a8c: LEA RBX,[RSP + 0x70] LEA RAX,[RSP + 0x248] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00137ab2 MOV RSI,qword ptr [RSP + 0x248] INC RSI CALL 0x0011d160 LAB_00137ab2: MOV RDI,RBX CALL 0x00131dc0 MOV RDI,qword ptr [RSP + 0x48] CMP RDI,R12 JZ 0x00137ad1 MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x0011d160 LAB_00137ad1: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R14 JZ 0x00137ae8 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x0011d160 LAB_00137ae8: LEA RDI,[RSP + 0x10] CALL 0x00131df0 TEST R15,R15 JZ 0x00137aff MOV RDI,R15 CALL 0x0013add7 LAB_00137aff: LEA RDI,[RSP + 0x160] CALL 0x0013128c MOV AL,0x1 JMP 0x00137b3f LAB_00137b10: MOVAPS XMM0,xmmword ptr [0x00208f60] LEA RSI,[RSP + 0x160] MOVAPS xmmword ptr [RSI],XMM0 MOV RDI,qword ptr [RBX] MOV EDX,0x1 MOV ECX,0x1 XOR R8D,R8D XOR R9D,R9D CALL 0x0011d660 TEST EAX,EAX SETNS AL LAB_00137b3f: ADD RSP,0x2c8 POP RBX POP R12 POP R14 POP R15 RET
/* common_chat_verify_template(std::__cxx11::string const&, bool) */ bool common_chat_verify_template(string *param_1,bool param_2) { int iVar1; int7 in_register_00000031; bool bVar2; common_chat_templates_inputs *local_2e0; long *local_2d8; int8 uStack_2d0; long local_2c8; int1 *local_2c0; int8 local_2b8; int1 local_2b0; int7 uStack_2af; int1 *local_2a0; int8 local_298; int1 local_290; int7 uStack_28f; int2 local_280; int8 local_278; int5 uStack_270; int3 uStack_26b; int5 uStack_268; int8 uStack_263; int1 local_25b; long *local_258 [2]; long local_248 [24]; int8 local_188; int8 uStack_180; int1 local_178 [16]; int1 *local_168; char *local_160; int1 local_158 [16]; int8 local_148; int8 uStack_140; int8 local_138; int8 uStack_130; int8 local_128; int8 uStack_120; int1 *local_118; int8 local_110; int1 local_108 [16]; int1 *local_f8; int8 local_f0; int1 local_e8 [16]; int1 *local_d8; int8 local_d0; int1 local_c8 [16]; common_chat_templates local_b8 [8]; long *local_b0; long local_a0 [2]; long *local_90; long local_80 [3]; vector<common_grammar_trigger,std::allocator<common_grammar_trigger>> local_68 [24]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_50 [24]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_38 [24]; if ((int)CONCAT71(in_register_00000031,param_2) == 0) { local_188 = (int1 *)CONCAT44(PTR_DAT_00208f60._4_4_,PTR_DAT_00208f60._0_4_); uStack_180 = CONCAT44(PTR_s_test_00208f68._4_4_,PTR_s_test_00208f68._0_4_); iVar1 = llama_chat_apply_template(*(int8 *)param_1,&local_188,1,1,0,0); bVar2 = -1 < iVar1; } else { local_188 = local_178; uStack_180 = 0; local_178[0] = 0; local_168 = local_158; local_160 = (char *)0x0; local_158[0] = 0; local_118 = local_108; local_148 = 0; uStack_140 = 0; local_138 = 0; uStack_130 = 0; local_128 = 0; uStack_120 = 0; local_110 = 0; local_108[0] = 0; local_f8 = local_e8; local_f0 = 0; local_e8[0] = 0; local_d8 = local_c8; local_d0 = 0; local_c8[0] = 0; /* try { // try from 001378d1 to 0013790e has its CatchHandler @ 00137bd5 */ std::__cxx11::string::_M_replace((ulong)&local_188,0,(char *)0x0,0x1cb227); std::__cxx11::string::_M_replace((ulong)&local_168,0,local_160,0x1c9f6f); /* try { // try from 0013791b to 00137931 has its CatchHandler @ 00137bd3 */ local_258[0] = local_248; std::__cxx11::string::_M_construct<char_const*>(local_258,""); /* try { // try from 0013793c to 0013794f has its CatchHandler @ 00137bae */ local_2d8 = &local_2c8; std::__cxx11::string::_M_construct<char_const*>(&local_2d8); /* try { // try from 00137950 to 0013796b has its CatchHandler @ 00137b8f */ common_chat_templates_init((llama_model *)&local_2e0,(string *)0x0,param_1,(string *)local_258); if (local_2d8 != &local_2c8) { operator_delete(local_2d8,local_2c8 + 1); } if (local_258[0] != local_248) { operator_delete(local_258[0],local_248[0] + 1); } local_2c8 = 0; local_2d8 = (long *)0x0; uStack_2d0 = 0; local_2b8 = 0; local_2b0 = 0; local_298 = 0; local_290 = 0; local_280 = 0x101; local_278 = 0; uStack_270 = 0; uStack_26b = 0; uStack_268 = 0; uStack_263 = 0; local_25b = 1; /* try { // try from 001379eb to 001379ff has its CatchHandler @ 00137b6b */ local_2c0 = &local_2b0; local_2a0 = &local_290; common_chat_msg::common_chat_msg((common_chat_msg *)local_258,(common_chat_msg *)&local_188); /* try { // try from 00137a08 to 00137a19 has its CatchHandler @ 00137b56 */ std::vector<common_chat_msg,std::allocator<common_chat_msg>>:: _M_assign_aux<common_chat_msg_const*>(&local_2d8,local_258,&local_188); common_chat_msg::~common_chat_msg((common_chat_msg *)local_258); /* try { // try from 00137a2c to 00137a40 has its CatchHandler @ 00137b4e */ common_chat_templates_apply(local_b8,local_2e0); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_38); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_50); std::vector<common_grammar_trigger,std::allocator<common_grammar_trigger>>::~vector(local_68); if (local_90 != local_80) { operator_delete(local_90,local_80[0] + 1); } if (local_b0 != local_a0) { operator_delete(local_b0,local_a0[0] + 1); } std::vector<common_chat_tool,std::allocator<common_chat_tool>>::~vector ((vector<common_chat_tool,std::allocator<common_chat_tool>> *)&local_278); if (local_2a0 != &local_290) { operator_delete(local_2a0,CONCAT71(uStack_28f,local_290) + 1); } if (local_2c0 != &local_2b0) { operator_delete(local_2c0,CONCAT71(uStack_2af,local_2b0) + 1); } std::vector<common_chat_msg,std::allocator<common_chat_msg>>::~vector ((vector<common_chat_msg,std::allocator<common_chat_msg>> *)&local_2d8); if (local_2e0 != (common_chat_templates_inputs *)0x0) { common_chat_templates_free((common_chat_templates *)local_2e0); } common_chat_msg::~common_chat_msg((common_chat_msg *)&local_188); bVar2 = true; } return bVar2; }
6,647
pvio_socket_write
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
ssize_t pvio_socket_write(MARIADB_PVIO *pvio, const uchar *buffer, size_t length) { ssize_t r; struct st_pvio_socket *csock; int timeout; int send_flags= MSG_DONTWAIT; #ifdef MSG_NOSIGNAL send_flags|= MSG_NOSIGNAL; #endif if (!pvio || !pvio->data) return -1; csock= (struct st_pvio_socket *)pvio->data; timeout = pvio->timeout[PVIO_WRITE_TIMEOUT]; while ((r = ma_send(csock->socket, (void *)buffer, length,send_flags)) == -1) { int err = socket_errno; if ((err != SOCKET_EAGAIN #ifdef HAVE_SOCKET_EWOULDBLOCK && err != SOCKET_EWOULDBLOCK #endif )|| timeout == 0) return r; if (pvio_socket_wait_io_or_timeout(pvio, FALSE, timeout) < 1) return -1; } return r; }
O3
c
pvio_socket_write: movq $-0x1, %rax testq %rdi, %rdi je 0x5d881 pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r12 movq (%rdi), %rbx testq %rbx, %rbx je 0x5d873 movq %rdx, %r14 movq %rsi, %r15 movl 0x2c(%r12), %r13d movl (%rbx), %edi movq %r15, %rsi movq %r14, %rdx callq 0x5e3eb cmpq $-0x1, %rax jne 0x5d873 callq 0x37a20 cmpl $0xb, (%rax) jne 0x5d86c testl %r13d, %r13d je 0x5d86c movq %r12, %rdi xorl %esi, %esi movl %r13d, %edx callq 0x5d8a4 testl %eax, %eax jg 0x5d839 movq $-0x1, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
pvio_socket_write: mov rax, 0FFFFFFFFFFFFFFFFh test rdi, rdi jz short locret_5D881 push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r12, rdi mov rbx, [rdi] test rbx, rbx jz short loc_5D873 mov r14, rdx mov r15, rsi mov r13d, [r12+2Ch] loc_5D839: mov edi, [rbx] mov rsi, r15 mov rdx, r14 call ma_send cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_5D873 call ___errno_location cmp dword ptr [rax], 0Bh jnz short loc_5D86C test r13d, r13d jz short loc_5D86C mov rdi, r12 xor esi, esi mov edx, r13d call pvio_socket_wait_io_or_timeout test eax, eax jg short loc_5D839 loc_5D86C: mov rax, 0FFFFFFFFFFFFFFFFh loc_5D873: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp locret_5D881: retn
long long pvio_socket_write(unsigned int **a1, long long a2, long long a3) { long long result; // rax unsigned int *v5; // rbx unsigned int v7; // r13d long long v8; // rdi result = -1LL; if ( a1 ) { v5 = *a1; if ( *a1 ) { v7 = *((_DWORD *)a1 + 11); while ( 1 ) { v8 = *v5; result = ma_send(v8, a2, a3); if ( result != -1 ) break; if ( *(_DWORD *)__errno_location(v8) != 11 || !v7 || (int)pvio_socket_wait_io_or_timeout(a1, 0LL, v7) <= 0 ) return -1LL; } } } return result; }
pvio_socket_write: MOV RAX,-0x1 TEST RDI,RDI JZ 0x0015d881 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R12,RDI MOV RBX,qword ptr [RDI] TEST RBX,RBX JZ 0x0015d873 MOV R14,RDX MOV R15,RSI MOV R13D,dword ptr [R12 + 0x2c] LAB_0015d839: MOV EDI,dword ptr [RBX] MOV RSI,R15 MOV RDX,R14 CALL 0x0015e3eb CMP RAX,-0x1 JNZ 0x0015d873 CALL 0x00137a20 CMP dword ptr [RAX],0xb JNZ 0x0015d86c TEST R13D,R13D JZ 0x0015d86c MOV RDI,R12 XOR ESI,ESI MOV EDX,R13D CALL 0x0015d8a4 TEST EAX,EAX JG 0x0015d839 LAB_0015d86c: MOV RAX,-0x1 LAB_0015d873: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP LAB_0015d881: RET
long pvio_socket_write(int8 *param_1,int8 param_2,int8 param_3) { int iVar1; int4 *puVar2; int iVar3; long lVar4; int *piVar5; if ((param_1 != (int8 *)0x0) && (puVar2 = (int4 *)*param_1, puVar2 != (int4 *)0x0)) { iVar1 = *(int *)((long)param_1 + 0x2c); do { lVar4 = ma_send(*puVar2,param_2,param_3); if (lVar4 != -1) { return lVar4; } piVar5 = __errno_location(); } while (((*piVar5 == 0xb) && (iVar1 != 0)) && (iVar3 = pvio_socket_wait_io_or_timeout(param_1,0,iVar1), 0 < iVar3)); } return -1; }
6,648
ggml_view_impl
llama.cpp/ggml/src/ggml.c
static struct ggml_tensor * ggml_view_impl( struct ggml_context * ctx, struct ggml_tensor * a, int n_dims, const int64_t * ne, size_t offset) { struct ggml_tensor * result = ggml_new_tensor_impl(ctx, a->type, n_dims, ne, a, offset); ggml_format_name(result, "%s (view)", a->name); ggml_set_op_params(result, &offset, sizeof(offset)); result->op = GGML_OP_VIEW; result->src[0] = a; return result; }
O3
c
ggml_view_impl: pushq %r15 pushq %r14 pushq %rbx movq %r8, %rbx movq %rsi, %r14 movl (%rsi), %esi movq %r14, %r8 movq %rbx, %r9 callq 0x19be7 movq %rax, %r15 leaq 0x100(%r14), %rdx leaq 0x2e8c5(%rip), %rsi # 0x4a76b movq %rax, %rdi xorl %eax, %eax callq 0x17a20 testq %r15, %r15 je 0x1bed1 movq %rbx, 0x54(%r15) movl $0x23, 0x50(%r15) movq %r14, 0x98(%r15) movq %r15, %rax popq %rbx popq %r14 popq %r15 retq leaq 0x308ab(%rip), %rdi # 0x4c783 leaq 0x2e76f(%rip), %rdx # 0x4a64e leaq 0x308dd(%rip), %rcx # 0x4c7c3 movl $0x70, %esi xorl %eax, %eax callq 0x17c80
ggml_view_impl: push r15 push r14 push rbx mov rbx, r8 mov r14, rsi mov esi, [rsi] mov r8, r14 mov r9, rbx call ggml_new_tensor_impl mov r15, rax lea rdx, [r14+100h] lea rsi, aSView; "%s (view)" mov rdi, rax xor eax, eax call _ggml_format_name test r15, r15 jz short loc_1BED1 mov [r15+54h], rbx mov dword ptr [r15+50h], 23h ; '#' mov [r15+98h], r14 mov rax, r15 pop rbx pop r14 pop r15 retn loc_1BED1: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTensorNull; "tensor != NULL" mov esi, 70h ; 'p' xor eax, eax call _ggml_abort
long long ggml_view_impl(long long a1, unsigned int *a2, unsigned int a3, _QWORD *a4, long long a5) { long long v6; // r15 int v7; // r8d int v8; // r9d v6 = ggml_new_tensor_impl(a1, *a2, a3, a4, (long long)a2, a5); ggml_format_name(v6, (long long)"%s (view)"); if ( !v6 ) ggml_abort( (unsigned int)"/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml-impl.h", 112, (unsigned int)"GGML_ASSERT(%s) failed", (unsigned int)"tensor != NULL", v7, v8); *(_QWORD *)(v6 + 84) = a5; *(_DWORD *)(v6 + 80) = 35; *(_QWORD *)(v6 + 152) = a2; return v6; }
ggml_view_impl: PUSH R15 PUSH R14 PUSH RBX MOV RBX,R8 MOV R14,RSI MOV ESI,dword ptr [RSI] MOV R8,R14 MOV R9,RBX CALL 0x00119be7 MOV R15,RAX LEA RDX,[R14 + 0x100] LEA RSI,[0x14a76b] MOV RDI,RAX XOR EAX,EAX CALL 0x00117a20 TEST R15,R15 JZ 0x0011bed1 MOV qword ptr [R15 + 0x54],RBX MOV dword ptr [R15 + 0x50],0x23 MOV qword ptr [R15 + 0x98],R14 MOV RAX,R15 POP RBX POP R14 POP R15 RET LAB_0011bed1: LEA RDI,[0x14c783] LEA RDX,[0x14a64e] LEA RCX,[0x14c7c3] MOV ESI,0x70 XOR EAX,EAX CALL 0x00117c80
long ggml_view_impl(int8 param_1,int4 *param_2,int8 param_3,int8 param_4, int8 param_5) { long lVar1; lVar1 = ggml_new_tensor_impl(param_1,*param_2,param_3,param_4,param_2,param_5); ggml_format_name(lVar1,"%s (view)",param_2 + 0x40); if (lVar1 != 0) { *(int8 *)(lVar1 + 0x54) = param_5; *(int4 *)(lVar1 + 0x50) = 0x23; *(int4 **)(lVar1 + 0x98) = param_2; return lVar1; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml-impl.h",0x70, "GGML_ASSERT(%s) failed","tensor != NULL"); }
6,649
StartTree::NJMatrix<double>::finishClustering()
iqtree3/utils/bionj2.cpp
void finishClustering() { //Assumes that n is 3 T halfD01 = 0.5 * rows[0][1]; T halfD02 = 0.5 * rows[0][2]; T halfD12 = 0.5 * rows[1][2]; clusters.addCluster ( rowToCluster[0], halfD01 + halfD02 - halfD12 , rowToCluster[1], halfD01 + halfD12 - halfD02 , rowToCluster[2], halfD02 + halfD12 - halfD01); n = 0; }
O0
cpp
StartTree::NJMatrix<double>::finishClustering(): subq $0x58, %rsp movq %rdi, 0x50(%rsp) movq 0x50(%rsp), %rdi movq %rdi, 0x30(%rsp) movq 0x20(%rdi), %rax movq (%rax), %rax movsd 0x8c2e(%rip), %xmm0 # 0x694e0 mulsd 0x8(%rax), %xmm0 movsd %xmm0, 0x48(%rsp) movq 0x20(%rdi), %rax movq (%rax), %rax movsd 0x8c14(%rip), %xmm0 # 0x694e0 mulsd 0x10(%rax), %xmm0 movsd %xmm0, 0x40(%rsp) movq 0x20(%rdi), %rax movq 0x8(%rax), %rax movsd 0x8bf9(%rip), %xmm0 # 0x694e0 mulsd 0x10(%rax), %xmm0 movsd %xmm0, 0x38(%rsp) movq %rdi, %rax addq $0x48, %rax movq %rax, 0x8(%rsp) addq $0x30, %rdi xorl %eax, %eax movl %eax, %esi callq 0x42750 movq 0x30(%rsp), %rdi movq (%rax), %rax movq %rax, 0x10(%rsp) movsd 0x48(%rsp), %xmm0 addsd 0x40(%rsp), %xmm0 subsd 0x38(%rsp), %xmm0 movsd %xmm0, 0x18(%rsp) addq $0x30, %rdi movl $0x1, %esi callq 0x42750 movq 0x30(%rsp), %rdi movq (%rax), %rax movq %rax, 0x20(%rsp) movsd 0x48(%rsp), %xmm0 addsd 0x38(%rsp), %xmm0 subsd 0x40(%rsp), %xmm0 movsd %xmm0, 0x28(%rsp) addq $0x30, %rdi movl $0x2, %esi callq 0x42750 movq 0x8(%rsp), %rdi movq 0x10(%rsp), %rsi movsd 0x18(%rsp), %xmm0 movq 0x20(%rsp), %rdx movsd 0x28(%rsp), %xmm1 movq (%rax), %rcx movsd 0x40(%rsp), %xmm2 addsd 0x38(%rsp), %xmm2 subsd 0x48(%rsp), %xmm2 callq 0x5fe60 movq 0x30(%rsp), %rax movq $0x0, 0x8(%rax) addq $0x58, %rsp retq nopl (%rax,%rax)
_ZN9StartTree8NJMatrixIdE16finishClusteringEv: sub rsp, 58h mov [rsp+58h+var_8], rdi mov rdi, [rsp+58h+var_8] mov [rsp+58h+var_28], rdi mov rax, [rdi+20h] mov rax, [rax] movsd xmm0, cs:qword_694E0 mulsd xmm0, qword ptr [rax+8] movsd [rsp+58h+var_10], xmm0 mov rax, [rdi+20h] mov rax, [rax] movsd xmm0, cs:qword_694E0 mulsd xmm0, qword ptr [rax+10h] movsd [rsp+58h+var_18], xmm0 mov rax, [rdi+20h] mov rax, [rax+8] movsd xmm0, cs:qword_694E0 mulsd xmm0, qword ptr [rax+10h] movsd [rsp+58h+var_20], xmm0 mov rax, rdi add rax, 48h ; 'H' mov [rsp+58h+var_50], rax add rdi, 30h ; '0' xor eax, eax mov esi, eax call _ZNSt6vectorImSaImEEixEm; std::vector<ulong>::operator[](ulong) mov rdi, [rsp+58h+var_28] mov rax, [rax] mov [rsp+58h+var_48], rax movsd xmm0, [rsp+58h+var_10] addsd xmm0, [rsp+58h+var_18] subsd xmm0, [rsp+58h+var_20] movsd [rsp+58h+var_40], xmm0 add rdi, 30h ; '0' mov esi, 1 call _ZNSt6vectorImSaImEEixEm; std::vector<ulong>::operator[](ulong) mov rdi, [rsp+58h+var_28] mov rax, [rax] mov [rsp+58h+var_38], rax movsd xmm0, [rsp+58h+var_10] addsd xmm0, [rsp+58h+var_20] subsd xmm0, [rsp+58h+var_18] movsd [rsp+58h+var_30], xmm0 add rdi, 30h ; '0' mov esi, 2 call _ZNSt6vectorImSaImEEixEm; std::vector<ulong>::operator[](ulong) mov rdi, [rsp+58h+var_50] mov rsi, [rsp+58h+var_48] movsd xmm0, [rsp+58h+var_40] mov rdx, [rsp+58h+var_38] movsd xmm1, [rsp+58h+var_30] mov rcx, [rax] movsd xmm2, [rsp+58h+var_18] addsd xmm2, [rsp+58h+var_20] subsd xmm2, [rsp+58h+var_10] call _ZN9StartTree11ClusterTreeIdE10addClusterEmdmdmd; StartTree::ClusterTree<double>::addCluster(ulong,double,ulong,double,ulong,double) mov rax, [rsp+58h+var_28] mov qword ptr [rax+8], 0 add rsp, 58h retn
long long StartTree::NJMatrix<double>::finishClustering(long long a1) { long long *v1; // rax long long result; // rax long long v3; // [rsp+10h] [rbp-48h] long long v4; // [rsp+20h] [rbp-38h] double v5; // [rsp+38h] [rbp-20h] double v6; // [rsp+40h] [rbp-18h] double v7; // [rsp+48h] [rbp-10h] v7 = 0.5 * *(double *)(**(_QWORD **)(a1 + 32) + 8LL); v6 = 0.5 * *(double *)(**(_QWORD **)(a1 + 32) + 16LL); v5 = 0.5 * *(double *)(*(_QWORD *)(*(_QWORD *)(a1 + 32) + 8LL) + 16LL); v3 = *(_QWORD *)std::vector<unsigned long>::operator[]((_QWORD *)(a1 + 48), 0LL); v4 = *(_QWORD *)std::vector<unsigned long>::operator[]((_QWORD *)(a1 + 48), 1LL); v1 = (long long *)std::vector<unsigned long>::operator[]((_QWORD *)(a1 + 48), 2LL); StartTree::ClusterTree<double>::addCluster((_QWORD *)(a1 + 72), v3, v4, *v1, v7 + v6 - v5, v7 + v5 - v6, v6 + v5 - v7); result = a1; *(_QWORD *)(a1 + 8) = 0LL; return result; }
finishClustering: SUB RSP,0x58 MOV qword ptr [RSP + 0x50],RDI MOV RDI,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x30],RDI MOV RAX,qword ptr [RDI + 0x20] MOV RAX,qword ptr [RAX] MOVSD XMM0,qword ptr [0x001694e0] MULSD XMM0,qword ptr [RAX + 0x8] MOVSD qword ptr [RSP + 0x48],XMM0 MOV RAX,qword ptr [RDI + 0x20] MOV RAX,qword ptr [RAX] MOVSD XMM0,qword ptr [0x001694e0] MULSD XMM0,qword ptr [RAX + 0x10] MOVSD qword ptr [RSP + 0x40],XMM0 MOV RAX,qword ptr [RDI + 0x20] MOV RAX,qword ptr [RAX + 0x8] MOVSD XMM0,qword ptr [0x001694e0] MULSD XMM0,qword ptr [RAX + 0x10] MOVSD qword ptr [RSP + 0x38],XMM0 MOV RAX,RDI ADD RAX,0x48 MOV qword ptr [RSP + 0x8],RAX ADD RDI,0x30 XOR EAX,EAX MOV ESI,EAX CALL 0x00142750 MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x10],RAX MOVSD XMM0,qword ptr [RSP + 0x48] ADDSD XMM0,qword ptr [RSP + 0x40] SUBSD XMM0,qword ptr [RSP + 0x38] MOVSD qword ptr [RSP + 0x18],XMM0 ADD RDI,0x30 MOV ESI,0x1 CALL 0x00142750 MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x20],RAX MOVSD XMM0,qword ptr [RSP + 0x48] ADDSD XMM0,qword ptr [RSP + 0x38] SUBSD XMM0,qword ptr [RSP + 0x40] MOVSD qword ptr [RSP + 0x28],XMM0 ADD RDI,0x30 MOV ESI,0x2 CALL 0x00142750 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x10] MOVSD XMM0,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] MOVSD XMM1,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RAX] MOVSD XMM2,qword ptr [RSP + 0x40] ADDSD XMM2,qword ptr [RSP + 0x38] SUBSD XMM2,qword ptr [RSP + 0x48] CALL 0x0015fe60 MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x8],0x0 ADD RSP,0x58 RET
/* StartTree::NJMatrix<double>::finishClustering() */ void __thiscall StartTree::NJMatrix<double>::finishClustering(NJMatrix<double> *this) { ulong uVar1; ulong uVar2; ulong *puVar3; double dVar4; double dVar5; double dVar6; dVar4 = DAT_001694e0 * *(double *)(**(long **)(this + 0x20) + 8); dVar5 = DAT_001694e0 * *(double *)(**(long **)(this + 0x20) + 0x10); dVar6 = DAT_001694e0 * *(double *)(*(long *)(*(long *)(this + 0x20) + 8) + 0x10); puVar3 = (ulong *)std::vector<unsigned_long,std::allocator<unsigned_long>>::operator[] ((vector<unsigned_long,std::allocator<unsigned_long>> *)(this + 0x30), 0); uVar1 = *puVar3; puVar3 = (ulong *)std::vector<unsigned_long,std::allocator<unsigned_long>>::operator[] ((vector<unsigned_long,std::allocator<unsigned_long>> *)(this + 0x30), 1); uVar2 = *puVar3; puVar3 = (ulong *)std::vector<unsigned_long,std::allocator<unsigned_long>>::operator[] ((vector<unsigned_long,std::allocator<unsigned_long>> *)(this + 0x30), 2); ClusterTree<double>::addCluster ((ClusterTree<double> *)(this + 0x48),uVar1,(dVar4 + dVar5) - dVar6,uVar2, (dVar4 + dVar6) - dVar5,*puVar3,(dVar5 + dVar6) - dVar4); *(int8 *)(this + 8) = 0; return; }
6,650
StartTree::NJMatrix<double>::finishClustering()
iqtree3/utils/bionj2.cpp
void finishClustering() { //Assumes that n is 3 T halfD01 = 0.5 * rows[0][1]; T halfD02 = 0.5 * rows[0][2]; T halfD12 = 0.5 * rows[1][2]; clusters.addCluster ( rowToCluster[0], halfD01 + halfD02 - halfD12 , rowToCluster[1], halfD01 + halfD12 - halfD02 , rowToCluster[2], halfD02 + halfD12 - halfD01); n = 0; }
O3
cpp
StartTree::NJMatrix<double>::finishClustering(): pushq %rbx movq %rdi, %rbx movq 0x20(%rdi), %rax movq 0x30(%rdi), %rcx movq (%rax), %rdx movq 0x8(%rax), %rax movupd 0x8(%rdx), %xmm3 mulpd 0x4192(%rip), %xmm3 # 0x2b760 movsd 0x10(%rax), %xmm4 mulsd 0x41bd(%rip), %xmm4 # 0x2b798 leaq 0x48(%rdi), %rdi movapd %xmm3, %xmm2 unpckhpd %xmm3, %xmm2 # xmm2 = xmm2[1],xmm3[1] movapd %xmm3, %xmm0 addsd %xmm2, %xmm0 subsd %xmm4, %xmm0 movq (%rcx), %rsi movq 0x8(%rcx), %rdx movapd %xmm3, %xmm1 addsd %xmm4, %xmm1 subsd %xmm2, %xmm1 movq 0x10(%rcx), %rcx addsd %xmm4, %xmm2 subsd %xmm3, %xmm2 callq 0x272da movq $0x0, 0x8(%rbx) popq %rbx retq nop
_ZN9StartTree8NJMatrixIdE16finishClusteringEv: push rbx mov rbx, rdi mov rax, [rdi+20h] mov rcx, [rdi+30h] mov rdx, [rax] mov rax, [rax+8] movupd xmm3, xmmword ptr [rdx+8] mulpd xmm3, cs:xmmword_2B760 movsd xmm4, qword ptr [rax+10h] mulsd xmm4, cs:qword_2B798 lea rdi, [rdi+48h] movapd xmm2, xmm3 unpckhpd xmm2, xmm3 movapd xmm0, xmm3 addsd xmm0, xmm2 subsd xmm0, xmm4 mov rsi, [rcx] mov rdx, [rcx+8] movapd xmm1, xmm3 addsd xmm1, xmm4 subsd xmm1, xmm2 mov rcx, [rcx+10h] addsd xmm2, xmm4 subsd xmm2, xmm3 call _ZN9StartTree11ClusterTreeIdE10addClusterEmdmdmd; StartTree::ClusterTree<double>::addCluster(ulong,double,ulong,double,ulong,double) mov qword ptr [rbx+8], 0 pop rbx retn
_QWORD * StartTree::NJMatrix<double>::finishClustering(long long a1) { _QWORD *v1; // rax __m128d v2; // xmm3 double v3; // xmm4_8 double v4; // xmm2_8 _QWORD *result; // rax v1 = *(_QWORD **)(a1 + 32); v2 = _mm_mul_pd(*(__m128d *)(*v1 + 8LL), (__m128d)xmmword_2B760); v3 = *(double *)(v1[1] + 16LL) * 0.5; v4 = _mm_unpackhi_pd(v2, v2).m128d_f64[0]; result = StartTree::ClusterTree<double>::addCluster( (_QWORD *)(a1 + 72), **(_QWORD **)(a1 + 48), *(_QWORD *)(*(_QWORD *)(a1 + 48) + 8LL), *(_QWORD *)(*(_QWORD *)(a1 + 48) + 16LL), v2.m128d_f64[0] + v4 - v3, v2.m128d_f64[0] + v3 - v4, v4 + v3 - v2.m128d_f64[0]); *(_QWORD *)(a1 + 8) = 0LL; return result; }
finishClustering: PUSH RBX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x20] MOV RCX,qword ptr [RDI + 0x30] MOV RDX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x8] MOVUPD XMM3,xmmword ptr [RDX + 0x8] MULPD XMM3,xmmword ptr [0x0012b760] MOVSD XMM4,qword ptr [RAX + 0x10] MULSD XMM4,qword ptr [0x0012b798] LEA RDI,[RDI + 0x48] MOVAPD XMM2,XMM3 UNPCKHPD XMM2,XMM3 MOVAPD XMM0,XMM3 ADDSD XMM0,XMM2 SUBSD XMM0,XMM4 MOV RSI,qword ptr [RCX] MOV RDX,qword ptr [RCX + 0x8] MOVAPD XMM1,XMM3 ADDSD XMM1,XMM4 SUBSD XMM1,XMM2 MOV RCX,qword ptr [RCX + 0x10] ADDSD XMM2,XMM4 SUBSD XMM2,XMM3 CALL 0x001272da MOV qword ptr [RBX + 0x8],0x0 POP RBX RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* StartTree::NJMatrix<double>::finishClustering() */ void __thiscall StartTree::NJMatrix<double>::finishClustering(NJMatrix<double> *this) { ulong *puVar1; long lVar2; double dVar3; double dVar4; double dVar5; puVar1 = *(ulong **)(this + 0x30); lVar2 = **(long **)(this + 0x20); dVar3 = *(double *)(lVar2 + 8) * _DAT_0012b760; dVar4 = *(double *)(lVar2 + 0x10) * _UNK_0012b768; dVar5 = *(double *)((*(long **)(this + 0x20))[1] + 0x10) * DAT_0012b798; ClusterTree<double>::addCluster ((ClusterTree<double> *)(this + 0x48),*puVar1,(dVar3 + dVar4) - dVar5,puVar1[1], (dVar3 + dVar5) - dVar4,puVar1[2],(dVar4 + dVar5) - dVar3); *(int8 *)(this + 8) = 0; return; }
6,651
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json(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::__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>>>, bool, nlohmann::json_abi_v3_11_3::detail::value_t)::'lambda'(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::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&)::operator()(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::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&) const
monkey531[P]llama/common/./json.hpp
value_type const& operator*() const { return value_ref ? *value_ref : owned_value; }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json(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::__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>>>, bool, nlohmann::json_abi_v3_11_3::detail::value_t)::'lambda'(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::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&)::operator()(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::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&) const: pushq %rbx movq 0x10(%rsi), %rdi testq %rdi, %rdi cmoveq %rsi, %rdi cmpb $0x2, (%rdi) jne 0x4f04b movq %rsi, %rbx callq 0x4f050 cmpq $0x2, %rax jne 0x4f04b movq 0x10(%rbx), %rdi testq %rdi, %rdi cmoveq %rbx, %rdi xorl %esi, %esi callq 0x4f08a cmpb $0x3, (%rax) sete %al jmp 0x4f04d xorl %eax, %eax popq %rbx retq nop
_ZZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC1ESt16initializer_listINS0_6detail8json_refISD_EEEbNSF_7value_tEENKUlRKSH_E_clESL_: push rbx mov rdi, [rsi+10h] test rdi, rdi cmovz rdi, rsi cmp byte ptr [rdi], 2 jnz short loc_4F04B mov rbx, rsi 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) cmp rax, 2 jnz short loc_4F04B mov rdi, [rbx+10h] test rdi, rdi cmovz rdi, rbx xor esi, esi call _ZNK8nlohmann16json_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) cmp byte ptr [rax], 3 setz al jmp short loc_4F04D loc_4F04B: xor eax, eax loc_4F04D: pop rbx retn
bool nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::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,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(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>> const&)#1}::operator()( long long a1, long long a2) { _BYTE *v2; // rdi long long v3; // rdi v2 = *(_BYTE **)(a2 + 16); if ( !v2 ) v2 = (_BYTE *)a2; if ( *v2 != 2 || 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(v2) != 2 ) { return 0; } v3 = *(_QWORD *)(a2 + 16); if ( !v3 ) v3 = a2; return *(_BYTE *)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, 0LL) == 3; }
operator(): PUSH RBX MOV RDI,qword ptr [RSI + 0x10] TEST RDI,RDI CMOVZ RDI,RSI CMP byte ptr [RDI],0x2 JNZ 0x0014f04b MOV RBX,RSI CALL 0x0014f050 CMP RAX,0x2 JNZ 0x0014f04b MOV RDI,qword ptr [RBX + 0x10] TEST RDI,RDI CMOVZ RDI,RBX XOR ESI,ESI CALL 0x0014f08a CMP byte ptr [RAX],0x3 SETZ AL JMP 0x0014f04d LAB_0014f04b: XOR EAX,EAX LAB_0014f04d: POP RBX RET
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::basic_json(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::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > >, bool, nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(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> > const&)#1}::TEMPNAMEPLACEHOLDERVALUE(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> > const&) const */ bool __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> :: basic_json(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::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t) :: {lambda(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>>const&)#1} ::operator()(_lambda_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>>const___1_ *this,json_ref *param_1) { long lVar1; char *pcVar2; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *pbVar3; pbVar3 = *(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> **)(param_1 + 0x10); if (*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> **)(param_1 + 0x10) == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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) { pbVar3 = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)param_1; } if ((*pbVar3 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) && (lVar1 = size(pbVar3), lVar1 == 2)) { pbVar3 = *(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> **)(param_1 + 0x10); if (*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> **)(param_1 + 0x10) == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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) { pbVar3 = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)param_1; } pcVar2 = (char *)basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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[](pbVar3,0); return *pcVar2 == '\x03'; } return false; }
6,652
js_init_module_os
bluesky950520[P]quickjs/quickjs-libc.c
JSModuleDef *js_init_module_os(JSContext *ctx, const char *module_name) { JSModuleDef *m; m = JS_NewCModule(ctx, module_name, js_os_init); if (!m) return NULL; JS_AddModuleExportList(ctx, m, js_os_funcs, countof(js_os_funcs)); #ifdef USE_WORKER JS_AddModuleExport(ctx, m, "Worker"); #endif return m; }
O0
c
js_init_module_os: subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq %rsi, 0x10(%rsp) movq 0x18(%rsp), %rdi movq 0x10(%rsp), %rsi leaq 0x71(%rip), %rdx # 0xf820 callq 0x48260 movq %rax, 0x8(%rsp) cmpq $0x0, 0x8(%rsp) jne 0xf7cc movq $0x0, 0x20(%rsp) jmp 0xf807 movq 0x18(%rsp), %rdi movq 0x8(%rsp), %rsi leaq 0x11e533(%rip), %rdx # 0x12dd10 movl $0x4a, %ecx callq 0x4c040 movq 0x18(%rsp), %rdi movq 0x8(%rsp), %rsi leaq 0xf8afd(%rip), %rdx # 0x1082f5 callq 0x484c0 movq 0x8(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax addq $0x28, %rsp retq nopw %cs:(%rax,%rax)
js_init_module_os: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_18], rsi mov rdi, [rsp+28h+var_10] mov rsi, [rsp+28h+var_18] lea rdx, js_os_init call JS_NewCModule mov [rsp+28h+var_20], rax cmp [rsp+28h+var_20], 0 jnz short loc_F7CC mov [rsp+28h+var_8], 0 jmp short loc_F807 loc_F7CC: mov rdi, [rsp+28h+var_10] mov rsi, [rsp+28h+var_20] lea rdx, js_os_funcs mov ecx, 4Ah ; 'J' call JS_AddModuleExportList mov rdi, [rsp+28h+var_10] mov rsi, [rsp+28h+var_20] lea rdx, aWorker; "Worker" call JS_AddModuleExport mov rax, [rsp+28h+var_20] mov [rsp+28h+var_8], rax loc_F807: mov rax, [rsp+28h+var_8] add rsp, 28h retn
long long js_init_module_os(long long a1, long long a2) { long long v3; // [rsp+8h] [rbp-20h] v3 = JS_NewCModule(a1, a2, js_os_init); if ( !v3 ) return 0LL; JS_AddModuleExportList(a1, v3, &js_os_funcs, 74LL); JS_AddModuleExport(a1, v3, "Worker"); return v3; }
js_init_module_os: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV qword ptr [RSP + 0x10],RSI MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x10] LEA RDX,[0x10f820] CALL 0x00148260 MOV qword ptr [RSP + 0x8],RAX CMP qword ptr [RSP + 0x8],0x0 JNZ 0x0010f7cc MOV qword ptr [RSP + 0x20],0x0 JMP 0x0010f807 LAB_0010f7cc: MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x8] LEA RDX,[0x22dd10] MOV ECX,0x4a CALL 0x0014c040 MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x8] LEA RDX,[0x2082f5] CALL 0x001484c0 MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x20],RAX LAB_0010f807: MOV RAX,qword ptr [RSP + 0x20] ADD RSP,0x28 RET
long js_init_module_os(int8 param_1,int8 param_2) { long local_8; local_8 = JS_NewCModule(param_1,param_2,js_os_init); if (local_8 == 0) { local_8 = 0; } else { JS_AddModuleExportList(param_1,local_8,js_os_funcs,0x4a); JS_AddModuleExport(param_1,local_8,"Worker"); } return local_8; }
6,653
js_init_module_os
bluesky950520[P]quickjs/quickjs-libc.c
JSModuleDef *js_init_module_os(JSContext *ctx, const char *module_name) { JSModuleDef *m; m = JS_NewCModule(ctx, module_name, js_os_init); if (!m) return NULL; JS_AddModuleExportList(ctx, m, js_os_funcs, countof(js_os_funcs)); #ifdef USE_WORKER JS_AddModuleExport(ctx, m, "Worker"); #endif return m; }
O1
c
js_init_module_os: pushq %r14 pushq %rbx pushq %rax movq %rdi, %r14 leaq 0x45(%rip), %rdx # 0x1416c callq 0x2fc3f testq %rax, %rax je 0x1415f movq %rax, %rbx leaq 0xb0a85(%rip), %rdx # 0xc4bc0 movq %r14, %rdi movq %rax, %rsi movl $0x4a, %ecx callq 0x3243c leaq 0x8610b(%rip), %rdx # 0x9a25d movq %r14, %rdi movq %rbx, %rsi callq 0x2fc7f jmp 0x14161 xorl %ebx, %ebx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
js_init_module_os: push r14 push rbx push rax mov r14, rdi lea rdx, js_os_init call JS_NewCModule test rax, rax jz short loc_1415F mov rbx, rax lea rdx, js_os_funcs mov rdi, r14 mov rsi, rax mov ecx, 4Ah ; 'J' call JS_AddModuleExportList lea rdx, aWorker; "Worker" mov rdi, r14 mov rsi, rbx call JS_AddModuleExport jmp short loc_14161 loc_1415F: xor ebx, ebx loc_14161: mov rax, rbx add rsp, 8 pop rbx pop r14 retn
long long js_init_module_os(long long a1, long long a2) { long long v2; // rax long long v3; // rbx v2 = JS_NewCModule(a1, a2, js_os_init); if ( !v2 ) return 0LL; v3 = v2; JS_AddModuleExportList(a1, v2, &js_os_funcs, 74LL); JS_AddModuleExport(a1, v3, "Worker"); return v3; }
js_init_module_os: PUSH R14 PUSH RBX PUSH RAX MOV R14,RDI LEA RDX,[0x11416c] CALL 0x0012fc3f TEST RAX,RAX JZ 0x0011415f MOV RBX,RAX LEA RDX,[0x1c4bc0] MOV RDI,R14 MOV RSI,RAX MOV ECX,0x4a CALL 0x0013243c LEA RDX,[0x19a25d] MOV RDI,R14 MOV RSI,RBX CALL 0x0012fc7f JMP 0x00114161 LAB_0011415f: XOR EBX,EBX LAB_00114161: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
long js_init_module_os(int8 param_1,int8 param_2) { long lVar1; lVar1 = JS_NewCModule(param_1,param_2,js_os_init); if (lVar1 == 0) { lVar1 = 0; } else { JS_AddModuleExportList(param_1,lVar1,js_os_funcs,0x4a); JS_AddModuleExport(param_1,lVar1,"Worker"); } return lVar1; }
6,654
js_init_module_os
bluesky950520[P]quickjs/quickjs-libc.c
JSModuleDef *js_init_module_os(JSContext *ctx, const char *module_name) { JSModuleDef *m; m = JS_NewCModule(ctx, module_name, js_os_init); if (!m) return NULL; JS_AddModuleExportList(ctx, m, js_os_funcs, countof(js_os_funcs)); #ifdef USE_WORKER JS_AddModuleExport(ctx, m, "Worker"); #endif return m; }
O3
c
js_init_module_os: pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x41(%rip), %rdx # 0x14bb9 callq 0x30bf6 movq %rax, %r14 testq %rax, %rax je 0x14bae leaq 0xb30b4(%rip), %rdx # 0xc7c40 movq %rbx, %rdi movq %r14, %rsi movl $0x4a, %ecx callq 0x333ed leaq 0x88666(%rip), %rdx # 0x9d209 movq %rbx, %rdi movq %r14, %rsi callq 0x30c36 movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
js_init_module_os: push r14 push rbx push rax mov rbx, rdi lea rdx, js_os_init call JS_NewCModule mov r14, rax test rax, rax jz short loc_14BAE lea rdx, js_os_funcs mov rdi, rbx mov rsi, r14 mov ecx, 4Ah ; 'J' call JS_AddModuleExportList lea rdx, aWorker; "Worker" mov rdi, rbx mov rsi, r14 call JS_AddModuleExport loc_14BAE: mov rax, r14 add rsp, 8 pop rbx pop r14 retn
long long js_init_module_os(long long a1, long long a2) { long long v2; // rax long long v3; // r14 v2 = JS_NewCModule(a1, a2, js_os_init); v3 = v2; if ( v2 ) { JS_AddModuleExportList(a1, v2, &js_os_funcs, 74LL); JS_AddModuleExport(a1, v3, "Worker"); } return v3; }
js_init_module_os: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI LEA RDX,[0x114bb9] CALL 0x00130bf6 MOV R14,RAX TEST RAX,RAX JZ 0x00114bae LEA RDX,[0x1c7c40] MOV RDI,RBX MOV RSI,R14 MOV ECX,0x4a CALL 0x001333ed LEA RDX,[0x19d209] MOV RDI,RBX MOV RSI,R14 CALL 0x00130c36 LAB_00114bae: MOV RAX,R14 ADD RSP,0x8 POP RBX POP R14 RET
long js_init_module_os(int8 param_1,int8 param_2) { long lVar1; lVar1 = JS_NewCModule(param_1,param_2,js_os_init); if (lVar1 != 0) { JS_AddModuleExportList(param_1,lVar1,js_os_funcs,0x4a); JS_AddModuleExport(param_1,lVar1,"Worker"); } return lVar1; }
6,655
common_chat_format_single[abi:cxx11](minja::chat_template const&, std::vector<common_chat_msg, std::allocator<common_chat_msg>> const&, common_chat_msg const&, bool, bool)
monkey531[P]llama/common/common.cpp
std::string common_chat_format_single( const common_chat_template & tmpl, const std::vector<common_chat_msg> & past_msg, const common_chat_msg & new_msg, bool add_ass, bool use_jinja) { std::ostringstream ss; auto fmt_past_msg = past_msg.empty() ? "" : common_chat_apply_template(tmpl, past_msg, false, use_jinja); std::vector<common_chat_msg> chat_new(past_msg); // if the past_msg ends with a newline, we must preserve it in the formatted version if (add_ass && !fmt_past_msg.empty() && fmt_past_msg.back() == '\n') { ss << "\n"; }; // format chat with new_msg chat_new.push_back(new_msg); auto fmt_new_msg = common_chat_apply_template(tmpl, chat_new, add_ass, use_jinja); // get the diff part ss << fmt_new_msg.substr(fmt_past_msg.size(), fmt_new_msg.size() - fmt_past_msg.size()); return ss.str(); }
O3
cpp
common_chat_format_single[abi:cxx11](minja::chat_template const&, std::vector<common_chat_msg, std::allocator<common_chat_msg>> const&, common_chat_msg const&, bool, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1f8, %rsp # imm = 0x1F8 movl %r9d, %r15d movl %r8d, %ebp movq %rcx, %r12 movq %rdx, %r13 movq %rsi, %r14 movq %rdi, %rbx leaq 0x80(%rsp), %rdi callq 0x18880 movq (%r13), %rax movzbl %r15b, %r15d cmpq 0x8(%r13), %rax je 0x22b5f leaq 0x8(%rsp), %rdi movq %r14, %rsi movq %r13, %rdx xorl %ecx, %ecx movl %r15d, %r8d callq 0x223b8 jmp 0x22b7c leaq 0x18(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x848a9(%rip), %rdx # 0xa7418 leaq 0x8(%rsp), %rdi movq %rdx, %rsi callq 0x1d1e4 leaq 0x48(%rsp), %rdi movq %r13, %rsi callq 0x2ac16 testb %bpl, %bpl je 0x22bbd movq 0x10(%rsp), %rax testq %rax, %rax je 0x22bbd movq 0x8(%rsp), %rcx cmpb $0xa, -0x1(%rcx,%rax) jne 0x22bbd leaq 0x8486c(%rip), %rsi # 0xa7417 leaq 0x80(%rsp), %rdi movl $0x1, %edx callq 0x18770 leaq 0x48(%rsp), %rdi movq %r12, %rsi callq 0x2acae movzbl %bpl, %ecx leaq 0x60(%rsp), %rdi leaq 0x48(%rsp), %rdx movq %r14, %rsi movl %r15d, %r8d callq 0x223b8 movq 0x10(%rsp), %rdx leaq 0x60(%rsp), %rsi movq 0x8(%rsi), %rcx subq %rdx, %rcx leaq 0x28(%rsp), %rdi callq 0x186f0 movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx leaq 0x80(%rsp), %rdi callq 0x18770 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x22c30 movq 0x38(%rsp), %rsi incq %rsi callq 0x186a0 leaq 0x88(%rsp), %rsi movq %rbx, %rdi callq 0x18a40 leaq 0x70(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x22c5b movq 0x70(%rsp), %rsi incq %rsi callq 0x186a0 leaq 0x48(%rsp), %rdi callq 0x2acda leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x22c80 movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 movq 0xba2f1(%rip), %rsi # 0xdcf78 leaq 0x80(%rsp), %rdi callq 0x183b0 leaq 0xf0(%rsp), %rdi callq 0x18210 movq %rbx, %rax addq $0x1f8, %rsp # imm = 0x1F8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x22cb8 movq %rax, %rbx jmp 0x22d2e jmp 0x22cdf movq %rax, %rbx leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x22ce2 movq 0x38(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x22ce2 movq %rax, %rbx leaq 0x70(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x22d09 movq 0x70(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x22d09 jmp 0x22d06 movq %rax, %rbx jmp 0x22d13 movq %rax, %rbx leaq 0x48(%rsp), %rdi callq 0x2acda leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x22d2e movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 movq 0xba243(%rip), %rsi # 0xdcf78 leaq 0x80(%rsp), %rdi callq 0x183b0 leaq 0xf0(%rsp), %rdi callq 0x18210 movq %rbx, %rdi callq 0x18b90
_Z25common_chat_format_singleB5cxx11RKN5minja13chat_templateERKSt6vectorI15common_chat_msgSaIS4_EERKS4_bb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1F8h mov r15d, r9d mov ebp, r8d mov r12, rcx mov r13, rdx mov r14, rsi mov rbx, rdi lea rdi, [rsp+228h+var_1A8] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) mov rax, [r13+0] movzx r15d, r15b cmp rax, [r13+8] jz short loc_22B5F lea rdi, [rsp+228h+var_220] mov rsi, r14 mov rdx, r13 xor ecx, ecx mov r8d, r15d call _Z26common_chat_apply_templateB5cxx11RKN5minja13chat_templateERKSt6vectorI15common_chat_msgSaIS4_EEbb; common_chat_apply_template(minja::chat_template const&,std::vector<common_chat_msg> const&,bool,bool) jmp short loc_22B7C loc_22B5F: lea rax, [rsp+228h+var_210] mov [rax-10h], rax lea rdx, aUsageSOptions+15h; "" lea rdi, [rsp+228h+var_220] mov rsi, rdx 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) loc_22B7C: lea rdi, [rsp+228h+var_1E0] mov rsi, r13 call _ZNSt6vectorI15common_chat_msgSaIS0_EEC2ERKS2_; std::vector<common_chat_msg>::vector(std::vector<common_chat_msg> const&) test bpl, bpl jz short loc_22BBD mov rax, [rsp+228h+var_218] test rax, rax jz short loc_22BBD mov rcx, [rsp+228h+var_220] cmp byte ptr [rcx+rax-1], 0Ah jnz short loc_22BBD lea rsi, aUsageSOptions+14h; "\n" lea rdi, [rsp+228h+var_1A8] mov edx, 1 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_22BBD: lea rdi, [rsp+228h+var_1E0] mov rsi, r12 call _ZNSt6vectorI15common_chat_msgSaIS0_EE9push_backERKS0_; std::vector<common_chat_msg>::push_back(common_chat_msg const&) movzx ecx, bpl lea rdi, [rsp+228h+var_1C8] lea rdx, [rsp+228h+var_1E0] mov rsi, r14 mov r8d, r15d call _Z26common_chat_apply_templateB5cxx11RKN5minja13chat_templateERKSt6vectorI15common_chat_msgSaIS4_EEbb; common_chat_apply_template(minja::chat_template const&,std::vector<common_chat_msg> const&,bool,bool) mov rdx, [rsp+228h+var_218] lea rsi, [rsp+228h+var_1C8] mov rcx, [rsi+8] sub rcx, rdx lea rdi, [rsp+228h+var_200] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rsi, [rsp+228h+var_200] mov rdx, [rsp+228h+var_1F8] lea rdi, [rsp+228h+var_1A8] call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rax, [rsp+228h+var_1F0] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_22C30 mov rsi, [rsp+228h+var_1F0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_22C30: lea rsi, [rsp+228h+var_1A0] mov rdi, rbx call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) lea rax, [rsp+228h+var_1B8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_22C5B mov rsi, [rsp+228h+var_1B8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_22C5B: lea rdi, [rsp+228h+var_1E0] call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector() lea rax, [rsp+228h+var_210] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_22C80 mov rsi, [rsp+228h+var_210] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_22C80: mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+228h+var_1A8] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+228h+var_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rax, rbx add rsp, 1F8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_22CB8: mov rbx, rax jmp short loc_22D2E jmp short loc_22CDF mov rbx, rax lea rax, [rsp+arg_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_22CE2 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_22CE2 loc_22CDF: mov rbx, rax loc_22CE2: lea rax, [rsp+arg_68] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_22D09 mov rsi, [rsp+arg_68] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_22D09 jmp short loc_22D06 mov rbx, rax jmp short loc_22D13 loc_22D06: mov rbx, rax loc_22D09: lea rdi, [rsp+arg_40] call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector() loc_22D13: lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_22D2E mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_22D2E: mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_78] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+arg_E8]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rbx call __Unwind_Resume
long long common_chat_format_single[abi:cxx11]( long long a1, common_chat_inputs *a2, long long *a3, long long a4, unsigned __int8 a5, unsigned __int8 a6) { char *v11; // [rsp+8h] [rbp-220h] BYREF long long v12; // [rsp+10h] [rbp-218h] _QWORD v13[2]; // [rsp+18h] [rbp-210h] BYREF void *v14[2]; // [rsp+28h] [rbp-200h] BYREF long long v15; // [rsp+38h] [rbp-1F0h] BYREF long long v16[3]; // [rsp+48h] [rbp-1E0h] BYREF void *v17[2]; // [rsp+60h] [rbp-1C8h] BYREF long long v18; // [rsp+70h] [rbp-1B8h] BYREF _BYTE v19[8]; // [rsp+80h] [rbp-1A8h] BYREF _BYTE v20[104]; // [rsp+88h] [rbp-1A0h] BYREF _BYTE v21[312]; // [rsp+F0h] [rbp-138h] BYREF std::ostringstream::basic_ostringstream(v19); if ( *a3 == a3[1] ) { v11 = (char *)v13; std::string::_M_construct<char const*>((long long)&v11, "", (long long)""); } else { common_chat_apply_template[abi:cxx11](&v11, a2, a3, 0, a6); } std::vector<common_chat_msg>::vector(v16, a3); if ( a5 && v12 && v11[v12 - 1] == 10 ) std::__ostream_insert<char,std::char_traits<char>>(v19, "\n", 1LL); std::vector<common_chat_msg>::push_back(v16, a4); common_chat_apply_template[abi:cxx11](v17, a2, v16, a5, a6); std::string::substr(v14, v17, v12, (char *)v17[1] - v12); std::__ostream_insert<char,std::char_traits<char>>(v19, v14[0], v14[1]); if ( v14[0] != &v15 ) operator delete(v14[0], v15 + 1); std::stringbuf::str(a1, v20); if ( v17[0] != &v18 ) operator delete(v17[0], v18 + 1); std::vector<common_chat_msg>::~vector(v16); if ( v11 != (char *)v13 ) operator delete(v11, v13[0] + 1LL); std::ostringstream::~ostringstream(v19, &`VTT for'std::ostringstream); std::ios_base::~ios_base((std::ios_base *)v21); return a1; }
common_chat_format_single[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1f8 MOV R15D,R9D MOV EBP,R8D MOV R12,RCX MOV R13,RDX MOV R14,RSI MOV RBX,RDI LEA RDI,[RSP + 0x80] CALL 0x00118880 MOV RAX,qword ptr [R13] MOVZX R15D,R15B CMP RAX,qword ptr [R13 + 0x8] JZ 0x00122b5f LAB_00122b48: LEA RDI,[RSP + 0x8] MOV RSI,R14 MOV RDX,R13 XOR ECX,ECX MOV R8D,R15D CALL 0x001223b8 JMP 0x00122b7c LAB_00122b5f: LEA RAX,[RSP + 0x18] MOV qword ptr [RAX + -0x10],RAX LAB_00122b68: LEA RDX,[0x1a7418] LEA RDI,[RSP + 0x8] MOV RSI,RDX CALL 0x0011d1e4 LAB_00122b7c: LEA RDI,[RSP + 0x48] MOV RSI,R13 CALL 0x0012ac16 TEST BPL,BPL JZ 0x00122bbd MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x00122bbd MOV RCX,qword ptr [RSP + 0x8] CMP byte ptr [RCX + RAX*0x1 + -0x1],0xa JNZ 0x00122bbd LAB_00122ba4: LEA RSI,[0x1a7417] LEA RDI,[RSP + 0x80] MOV EDX,0x1 CALL 0x00118770 LAB_00122bbd: LEA RDI,[RSP + 0x48] MOV RSI,R12 CALL 0x0012acae LAB_00122bca: MOVZX ECX,BPL LEA RDI,[RSP + 0x60] LEA RDX,[RSP + 0x48] MOV RSI,R14 MOV R8D,R15D CALL 0x001223b8 MOV RDX,qword ptr [RSP + 0x10] LEA RSI,[RSP + 0x60] MOV RCX,qword ptr [RSI + 0x8] SUB RCX,RDX LAB_00122bf4: LEA RDI,[RSP + 0x28] CALL 0x001186f0 MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x30] LAB_00122c08: LEA RDI,[RSP + 0x80] CALL 0x00118770 LEA RAX,[RSP + 0x38] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00122c30 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001186a0 LAB_00122c30: LEA RSI,[RSP + 0x88] LAB_00122c38: MOV RDI,RBX CALL 0x00118a40 LAB_00122c40: LEA RAX,[RSP + 0x70] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00122c5b MOV RSI,qword ptr [RSP + 0x70] INC RSI CALL 0x001186a0 LAB_00122c5b: LEA RDI,[RSP + 0x48] CALL 0x0012acda LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00122c80 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001186a0 LAB_00122c80: MOV RSI,qword ptr [0x001dcf78] LEA RDI,[RSP + 0x80] CALL 0x001183b0 LEA RDI,[RSP + 0xf0] CALL 0x00118210 MOV RAX,RBX ADD RSP,0x1f8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_chat_format_single[abi:cxx11](minja::chat_template const&, std::vector<common_chat_msg, std::allocator<common_chat_msg> > const&, common_chat_msg const&, bool, bool) */ chat_template * common_chat_format_single_abi_cxx11_ (chat_template *param_1,vector *param_2,common_chat_msg *param_3,bool param_4,bool param_5 ) { int7 in_register_00000009; long *local_220; long local_218; long local_210 [2]; long *local_200; long local_1f8; long local_1f0 [2]; vector<common_chat_msg,std::allocator<common_chat_msg>> local_1e0 [24]; long *local_1c8 [2]; long local_1b8 [2]; ostringstream local_1a8 [112]; ios_base local_138 [264]; std::__cxx11::ostringstream::ostringstream(local_1a8); if (*(long *)param_3 == *(long *)(param_3 + 8)) { local_220 = local_210; /* try { // try from 00122b68 to 00122b7b has its CatchHandler @ 00122cb6 */ std::__cxx11::string::_M_construct<char_const*>(&local_220,""); } else { /* try { // try from 00122b48 to 00122b5c has its CatchHandler @ 00122cb8 */ common_chat_apply_template_abi_cxx11_ ((chat_template *)&local_220,param_2,SUB81(param_3,0),false); } /* try { // try from 00122b7c to 00122b88 has its CatchHandler @ 00122d01 */ std::vector<common_chat_msg,std::allocator<common_chat_msg>>::vector(local_1e0,(vector *)param_3); if (((param_5) && (local_218 != 0)) && (*(char *)((long)local_220 + local_218 + -1) == '\n')) { /* try { // try from 00122ba4 to 00122bc9 has its CatchHandler @ 00122d06 */ std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_1a8,"\n",1); } std::vector<common_chat_msg,std::allocator<common_chat_msg>>::push_back (local_1e0,(common_chat_msg *)CONCAT71(in_register_00000009,param_4)); /* try { // try from 00122bca to 00122be2 has its CatchHandler @ 00122cff */ common_chat_apply_template_abi_cxx11_ ((chat_template *)local_1c8,param_2,SUB81(local_1e0,0),param_5); /* try { // try from 00122bf4 to 00122bfd has its CatchHandler @ 00122cdf */ std::__cxx11::string::substr((ulong)&local_200,(ulong)local_1c8); /* try { // try from 00122c08 to 00122c14 has its CatchHandler @ 00122cbf */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)local_1a8,(char *)local_200,local_1f8); if (local_200 != local_1f0) { operator_delete(local_200,local_1f0[0] + 1); } /* try { // try from 00122c38 to 00122c3f has its CatchHandler @ 00122cbd */ std::__cxx11::stringbuf::str(); if (local_1c8[0] != local_1b8) { operator_delete(local_1c8[0],local_1b8[0] + 1); } std::vector<common_chat_msg,std::allocator<common_chat_msg>>::~vector(local_1e0); if (local_220 != local_210) { operator_delete(local_220,local_210[0] + 1); } std::__cxx11::ostringstream::~ostringstream(local_1a8); std::ios_base::~ios_base(local_138); return param_1; }
6,656
JS_IsInstanceOf
bluesky950520[P]quickjs/quickjs.c
int JS_IsInstanceOf(JSContext *ctx, JSValue val, JSValue obj) { JSValue method; if (!JS_IsObject(obj)) goto fail; method = JS_GetProperty(ctx, obj, JS_ATOM_Symbol_hasInstance); if (JS_IsException(method)) return -1; if (!JS_IsNull(method) && !JS_IsUndefined(method)) { JSValue ret; ret = JS_CallFree(ctx, method, obj, 1, &val); return JS_ToBoolFree(ctx, ret); } /* legacy case */ if (!JS_IsFunction(ctx, obj)) { fail: JS_ThrowTypeError(ctx, "invalid 'instanceof' right operand"); return -1; } return JS_OrdinaryIsInstanceOf(ctx, val, obj); }
O2
c
JS_IsInstanceOf: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r8, %r14 movq %rdi, %rbx movq %rsi, 0x8(%rsp) movq %rdx, 0x10(%rsp) pushq $-0x1 popq %rbp cmpl $-0x1, %r14d jne 0x1cd3a movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %r13 movq %rbx, %rdi movq %rcx, %rsi movq %r14, %rdx movl $0xdc, %ecx callq 0x1b043 leal -0x2(%rdx), %ecx cmpl $0x2, %ecx jae 0x1cd5c movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x1ce7d testl %eax, %eax je 0x1cd3a movq %rbx, %rdi movq %r13, %rsi movq %r12, %rdx movq %r15, %rcx movq %r14, %r8 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x1ceba leaq 0x68e9d(%rip), %rsi # 0x85bde movq %rbx, %rdi xorl %eax, %eax callq 0x1c64d movl %ebp, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpl $0x6, %edx je 0x1cd4b leaq 0x8(%rsp), %rcx movq %rcx, (%rsp) pushq $0x1 popq %r9 movq %rbx, %rdi movq %rax, %rsi movq %r15, %rcx movq %r14, %r8 callq 0x1cd8e movq %rbx, %rdi movq %rax, %rsi callq 0x1cdfa movl %eax, %ebp jmp 0x1cd4b
JS_IsInstanceOf: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14, r8 mov rbx, rdi mov [rsp+48h+var_40], rsi mov [rsp+48h+var_38], rdx push 0FFFFFFFFFFFFFFFFh pop rbp cmp r14d, 0FFFFFFFFh jnz short loc_1CD3A mov r15, rcx mov r12, rdx mov r13, rsi mov rdi, rbx mov rsi, rcx mov rdx, r14 mov ecx, 0DCh call JS_GetProperty lea ecx, [rdx-2] cmp ecx, 2 jnb short loc_1CD5C mov rdi, rbx mov rsi, r15 mov rdx, r14 call JS_IsFunction test eax, eax jz short loc_1CD3A mov rdi, rbx mov rsi, r13 mov rdx, r12 mov rcx, r15 mov r8, r14 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp JS_OrdinaryIsInstanceOf loc_1CD3A: lea rsi, aInvalidInstanc; "invalid 'instanceof' right operand" mov rdi, rbx xor eax, eax call JS_ThrowTypeError loc_1CD4B: mov eax, ebp add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1CD5C: cmp edx, 6 jz short loc_1CD4B lea rcx, [rsp+48h+var_40] mov [rsp+48h+var_48], rcx push 1 pop r9 mov rdi, rbx mov rsi, rax mov rcx, r15 mov r8, r14 call JS_CallFree mov rdi, rbx mov rsi, rax call JS_ToBoolFree mov ebp, eax jmp short loc_1CD4B
long long JS_IsInstanceOf( 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) { unsigned int v15; // ebp int Property; // eax int v19; // edx long long v21; // rax char v22; // [rsp+0h] [rbp-48h] _QWORD v23[8]; // [rsp+8h] [rbp-40h] BYREF v23[0] = a2; v23[1] = a3; v15 = -1; if ( (_DWORD)a5 == -1 ) { Property = JS_GetProperty(a1, a4, -1, 220); if ( (unsigned int)(v19 - 2) >= 2 ) { if ( v19 != 6 ) { v21 = JS_CallFree(a1, Property, v19, a4, a5, 1, (long long)v23); return (unsigned int)JS_ToBoolFree(a1, v21); } return v15; } if ( (unsigned int)JS_IsFunction(a1, a4) ) return JS_OrdinaryIsInstanceOf(a1, a2, a3, a4, a5); } JS_ThrowTypeError( a1, (long long)"invalid 'instanceof' right operand", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v22); return v15; }
JS_IsInstanceOf: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14,R8 MOV RBX,RDI MOV qword ptr [RSP + 0x8],RSI MOV qword ptr [RSP + 0x10],RDX PUSH -0x1 POP RBP CMP R14D,-0x1 JNZ 0x0011cd3a MOV R15,RCX MOV R12,RDX MOV R13,RSI MOV RDI,RBX MOV RSI,RCX MOV RDX,R14 MOV ECX,0xdc CALL 0x0011b043 LEA ECX,[RDX + -0x2] CMP ECX,0x2 JNC 0x0011cd5c MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x0011ce7d TEST EAX,EAX JZ 0x0011cd3a MOV RDI,RBX MOV RSI,R13 MOV RDX,R12 MOV RCX,R15 MOV R8,R14 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0011ceba LAB_0011cd3a: LEA RSI,[0x185bde] MOV RDI,RBX XOR EAX,EAX CALL 0x0011c64d LAB_0011cd4b: MOV EAX,EBP ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011cd5c: CMP EDX,0x6 JZ 0x0011cd4b LEA RCX,[RSP + 0x8] MOV qword ptr [RSP],RCX PUSH 0x1 POP R9 MOV RDI,RBX MOV RSI,RAX MOV RCX,R15 MOV R8,R14 CALL 0x0011cd8e MOV RDI,RBX MOV RSI,RAX CALL 0x0011cdfa MOV EBP,EAX JMP 0x0011cd4b
ulong JS_IsInstanceOf(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5) { int iVar1; uint uVar2; ulong uVar3; int8 uVar4; int1 auVar5 [16]; int8 local_40; int8 local_38; uVar3 = 0xffffffffffffffff; local_40 = param_2; local_38 = param_3; if ((int)param_5 == -1) { auVar5 = JS_GetProperty(param_1,param_4,param_5,0xdc); if (1 < auVar5._8_4_ - 2U) { if (auVar5._8_4_ != 6) { uVar4 = JS_CallFree(param_1,auVar5._0_8_,auVar5._8_8_,param_4,param_5,1,&local_40); uVar2 = JS_ToBoolFree(param_1,uVar4); uVar3 = (ulong)uVar2; } goto LAB_0011cd4b; } iVar1 = JS_IsFunction(param_1,param_4,param_5); if (iVar1 != 0) { uVar3 = JS_OrdinaryIsInstanceOf(param_1,param_2,param_3,param_4,param_5); return uVar3; } } JS_ThrowTypeError(param_1,"invalid \'instanceof\' right operand"); LAB_0011cd4b: return uVar3 & 0xffffffff; }
6,657
help()
dmazzella[P]pylunasvg/lunasvg/examples/svg2png.cpp
int help() { std::cout << "Usage: \n" " svg2png [filename] [resolution] [bgColor]\n\n" "Examples: \n" " $ svg2png input.svg\n" " $ svg2png input.svg 512x512\n" " $ svg2png input.svg 512x512 0xff00ffff\n\n"; return 1; }
O0
cpp
help(): pushq %rbp movq %rsp, %rbp movq 0xb966d(%rip), %rdi # 0xc4fd8 leaq 0x80692(%rip), %rsi # 0x8c004 callq 0xb350 movl $0x1, %eax popq %rbp retq nop
_Z4helpv: push rbp mov rbp, rsp mov rdi, cs:_ZSt4cout_ptr lea rsi, aUsageSvg2pngFi; "Usage: \n svg2png [filename] [resolut"... call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov eax, 1 pop rbp retn
long long help(void) { std::operator<<<std::char_traits<char>>( &std::cout, "Usage: \n" " svg2png [filename] [resolution] [bgColor]\n" "\n" "Examples: \n" " $ svg2png input.svg\n" " $ svg2png input.svg 512x512\n" " $ svg2png input.svg 512x512 0xff00ffff\n" "\n"); return 1LL; }
help: PUSH RBP MOV RBP,RSP MOV RDI,qword ptr [0x001c4fd8] LEA RSI,[0x18c004] CALL 0x0010b350 MOV EAX,0x1 POP RBP RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* help() */ int8 help(void) { std::operator<<((ostream *)PTR_cout_001c4fd8, "Usage: \n svg2png [filename] [resolution] [bgColor]\n\nExamples: \n $ svg2png input.svg\n $ svg2png input.svg 512x512\n $ svg2png input.svg 512x512 0xff00ffff\n\n" ); return 1; }
6,658
help()
dmazzella[P]pylunasvg/lunasvg/examples/svg2png.cpp
int help() { std::cout << "Usage: \n" " svg2png [filename] [resolution] [bgColor]\n\n" "Examples: \n" " $ svg2png input.svg\n" " $ svg2png input.svg 512x512\n" " $ svg2png input.svg 512x512 0xff00ffff\n\n"; return 1; }
O1
cpp
help(): pushq %rax movq 0x515dc(%rip), %rdi # 0x5bfd0 leaq 0x38609(%rip), %rsi # 0x43004 movl $0xa5, %edx callq 0xa3a0 movl $0x1, %eax popq %rcx retq
_Z4helpv: push rax mov rdi, cs:_ZSt4cout_ptr lea rsi, aUsageSvg2pngFi; "Usage: \n svg2png [filename] [resolut"... mov edx, 0A5h call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov eax, 1 pop rcx retn
long long help(void) { std::__ostream_insert<char,std::char_traits<char>>( &std::cout, "Usage: \n" " svg2png [filename] [resolution] [bgColor]\n" "\n" "Examples: \n" " $ svg2png input.svg\n" " $ svg2png input.svg 512x512\n" " $ svg2png input.svg 512x512 0xff00ffff\n" "\n", 165LL); return 1LL; }
help: PUSH RAX MOV RDI,qword ptr [0x0015bfd0] LEA RSI,[0x143004] MOV EDX,0xa5 CALL 0x0010a3a0 MOV EAX,0x1 POP RCX RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* help() */ int8 help(void) { std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cout_0015bfd0, "Usage: \n svg2png [filename] [resolution] [bgColor]\n\nExamples: \n $ svg2png input.svg\n $ svg2png input.svg 512x512\n $ svg2png input.svg 512x512 0xff00ffff\n\n" ,0xa5); return 1; }
6,659
help()
dmazzella[P]pylunasvg/lunasvg/examples/svg2png.cpp
int help() { std::cout << "Usage: \n" " svg2png [filename] [resolution] [bgColor]\n\n" "Examples: \n" " $ svg2png input.svg\n" " $ svg2png input.svg 512x512\n" " $ svg2png input.svg 512x512 0xff00ffff\n\n"; return 1; }
O2
cpp
help(): pushq %rax movq 0x4c834(%rip), %rdi # 0x56fd8 leaq 0x2f859(%rip), %rsi # 0x3a004 callq 0xa2b0 pushq $0x1 popq %rax popq %rcx retq
_Z4helpv: push rax mov rdi, cs:_ZSt4cout_ptr lea rsi, aUsageSvg2pngFi; "Usage: \n svg2png [filename] [resolut"... call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) push 1 pop rax pop rcx retn
long long help(void) { std::operator<<<std::char_traits<char>>( &std::cout, "Usage: \n" " svg2png [filename] [resolution] [bgColor]\n" "\n" "Examples: \n" " $ svg2png input.svg\n" " $ svg2png input.svg 512x512\n" " $ svg2png input.svg 512x512 0xff00ffff\n" "\n"); return 1LL; }
help: PUSH RAX MOV RDI,qword ptr [0x00156fd8] LEA RSI,[0x13a004] CALL 0x0010a2b0 PUSH 0x1 POP RAX POP RCX RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* help() */ int8 help(void) { std::operator<<((ostream *)PTR_cout_00156fd8, "Usage: \n svg2png [filename] [resolution] [bgColor]\n\nExamples: \n $ svg2png input.svg\n $ svg2png input.svg 512x512\n $ svg2png input.svg 512x512 0xff00ffff\n\n" ); return 1; }
6,660
unicode_get_short_code
bluesky950520[P]quickjs/libunicode.c
static uint32_t unicode_get_short_code(uint32_t c) { static const uint16_t unicode_short_table[2] = { 0x2044, 0x2215 }; if (c < 0x80) return c; else if (c < 0x80 + 0x50) return c - 0x80 + 0x300; else return unicode_short_table[c - 0x80 - 0x50]; }
O0
c
unicode_get_short_code: movl %edi, -0x8(%rsp) cmpl $0x80, -0x8(%rsp) jae 0x10e238 movl -0x8(%rsp), %eax movl %eax, -0x4(%rsp) jmp 0x10e275 cmpl $0xd0, -0x8(%rsp) jae 0x10e256 movl -0x8(%rsp), %eax subl $0x80, %eax addl $0x300, %eax # imm = 0x300 movl %eax, -0x4(%rsp) jmp 0x10e275 movl -0x8(%rsp), %eax subl $0x80, %eax subl $0x50, %eax movl %eax, %eax movl %eax, %ecx leaq 0x116df(%rip), %rax # 0x11f94c movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rsp) movl -0x4(%rsp), %eax retq nopw (%rax,%rax)
unicode_get_short_code: mov [rsp+var_8], edi cmp [rsp+var_8], 80h jnb short loc_10E238 mov eax, [rsp+var_8] mov [rsp+var_4], eax jmp short loc_10E275 loc_10E238: cmp [rsp+var_8], 0D0h jnb short loc_10E256 mov eax, [rsp+var_8] sub eax, 80h add eax, 300h mov [rsp+var_4], eax jmp short loc_10E275 loc_10E256: mov eax, [rsp+var_8] sub eax, 80h sub eax, 50h ; 'P' mov eax, eax mov ecx, eax lea rax, unicode_get_short_code_unicode_short_table movzx eax, word ptr [rax+rcx*2] mov [rsp+var_4], eax loc_10E275: mov eax, [rsp+var_4] retn
long long unicode_get_short_code(unsigned int a1) { if ( a1 >= 0x80 ) { if ( a1 >= 0xD0 ) return unicode_get_short_code_unicode_short_table[a1 - 208]; else return a1 - 128 + 768; } else { return a1; } }
6,661
unicode_get_short_code
bluesky950520[P]quickjs/libunicode.c
static uint32_t unicode_get_short_code(uint32_t c) { static const uint16_t unicode_short_table[2] = { 0x2044, 0x2215 }; if (c < 0x80) return c; else if (c < 0x80 + 0x50) return c - 0x80 + 0x300; else return unicode_short_table[c - 0x80 - 0x50]; }
O2
c
unicode_get_short_code: movl %edi, %eax cmpl $0x80, %edi jb 0x84c8f cmpl $0xcf, %eax ja 0x84c90 addl $0x280, %eax # imm = 0x280 retq addl $0xffffff30, %eax # imm = 0xFFFFFF30 leaq 0x12404(%rip), %rcx # 0x970a0 movzwl (%rcx,%rax,2), %eax retq
unicode_get_short_code: mov eax, edi cmp edi, 80h jb short locret_84C8F cmp eax, 0CFh ja short loc_84C90 add eax, 280h locret_84C8F: retn loc_84C90: add eax, 0FFFFFF30h lea rcx, unicode_get_short_code_unicode_short_table movzx eax, word ptr [rcx+rax*2] retn
long long unicode_get_short_code(unsigned int a1) { long long result; // rax result = a1; if ( a1 >= 0x80 ) { if ( a1 > 0xCF ) return unicode_get_short_code_unicode_short_table[a1 - 208]; else return a1 + 640; } return result; }
unicode_get_short_code: MOV EAX,EDI CMP EDI,0x80 JC 0x00184c8f CMP EAX,0xcf JA 0x00184c90 ADD EAX,0x280 LAB_00184c8f: RET LAB_00184c90: ADD EAX,0xffffff30 LEA RCX,[0x1970a0] MOVZX EAX,word ptr [RCX + RAX*0x2] RET
uint unicode_get_short_code(uint param_1) { if (0x7f < param_1) { if (0xcf < param_1) { return (uint)*(ushort *) ((long)&unicode_get_short_code_unicode_short_table + (ulong)(param_1 - 0xd0) * 2 ); } param_1 = param_1 + 0x280; } return param_1; }
6,662
psi_cond_timedwait
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_cond_timedwait(mysql_cond_t *that, mysql_mutex_t *mutex, const struct timespec *abstime, const char *file, uint line) { PSI_cond_locker_state state; PSI_cond_locker *locker= PSI_COND_CALL(start_cond_wait) (&state, that->m_psi, mutex->m_psi, PSI_COND_TIMEDWAIT, file, line); int result= my_cond_timedwait(&that->m_cond, &mutex->m_mutex, abstime); if (psi_likely(locker)) PSI_COND_CALL(end_cond_wait)(locker, result); return result; }
O0
c
psi_cond_timedwait: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movl %r8d, -0x24(%rbp) leaq 0x1cdf5d(%rip), %rax # 0x2cb450 movq (%rax), %rax movq 0x1c0(%rax), %rax movq -0x8(%rbp), %rcx movq 0x30(%rcx), %rsi movq -0x10(%rbp), %rcx movq 0x40(%rcx), %rdx movq -0x20(%rbp), %r8 movl -0x24(%rbp), %r9d leaq -0x60(%rbp), %rdi movl $0x1, %ecx callq *%rax movq %rax, -0x68(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x2a650 movl %eax, -0x6c(%rbp) cmpq $0x0, -0x68(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0xfd567 leaq 0x1cdefc(%rip), %rax # 0x2cb450 movq (%rax), %rax movq 0x1c8(%rax), %rax movq -0x68(%rbp), %rdi movl -0x6c(%rbp), %esi callq *%rax movl -0x6c(%rbp), %eax addq $0x70, %rsp popq %rbp retq
psi_cond_timedwait: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_24], r8d lea rax, PSI_server mov rax, [rax] mov rax, [rax+1C0h] mov rcx, [rbp+var_8] mov rsi, [rcx+30h] mov rcx, [rbp+var_10] mov rdx, [rcx+40h] mov r8, [rbp+var_20] mov r9d, [rbp+var_24] lea rdi, [rbp+var_60] mov ecx, 1 call rax mov [rbp+var_68], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] call _pthread_cond_timedwait mov [rbp+var_6C], eax cmp [rbp+var_68], 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_FD567 lea rax, PSI_server mov rax, [rax] mov rax, [rax+1C8h] mov rdi, [rbp+var_68] mov esi, [rbp+var_6C] call rax loc_FD567: mov eax, [rbp+var_6C] add rsp, 70h pop rbp retn
long long psi_cond_timedwait(long long a1, long long a2, long long a3, long long a4, unsigned int a5) { unsigned int v6; // [rsp+4h] [rbp-6Ch] long long v7; // [rsp+8h] [rbp-68h] _BYTE v8[60]; // [rsp+10h] [rbp-60h] BYREF unsigned int v9; // [rsp+4Ch] [rbp-24h] long long v10; // [rsp+50h] [rbp-20h] long long v11; // [rsp+58h] [rbp-18h] long long v12; // [rsp+60h] [rbp-10h] long long v13; // [rsp+68h] [rbp-8h] v13 = a1; v12 = a2; v11 = a3; v10 = a4; v9 = a5; v7 = ((long long ( *)(_BYTE *, _QWORD, _QWORD, long long, long long, _QWORD))PSI_server[56])( v8, *(_QWORD *)(a1 + 48), *(_QWORD *)(a2 + 64), 1LL, a4, a5); v6 = pthread_cond_timedwait(v13, v12, v11); if ( v7 ) ((void ( *)(long long, _QWORD))PSI_server[57])(v7, v6); return v6; }
psi_cond_timedwait: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],R8D LEA RAX,[0x3cb450] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1c0] MOV RCX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RCX + 0x30] MOV RCX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RCX + 0x40] MOV R8,qword ptr [RBP + -0x20] MOV R9D,dword ptr [RBP + -0x24] LEA RDI,[RBP + -0x60] MOV ECX,0x1 CALL RAX MOV qword ptr [RBP + -0x68],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] CALL 0x0012a650 MOV dword ptr [RBP + -0x6c],EAX CMP qword ptr [RBP + -0x68],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001fd567 LEA RAX,[0x3cb450] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1c8] MOV RDI,qword ptr [RBP + -0x68] MOV ESI,dword ptr [RBP + -0x6c] CALL RAX LAB_001fd567: MOV EAX,dword ptr [RBP + -0x6c] ADD RSP,0x70 POP RBP RET
int psi_cond_timedwait(pthread_cond_t *param_1,pthread_mutex_t *param_2,timespec *param_3, int8 param_4,int4 param_5) { int iVar1; long lVar2; int1 local_68 [60]; int4 local_2c; int8 local_28; timespec *local_20; pthread_mutex_t *local_18; pthread_cond_t *local_10; local_2c = param_5; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; lVar2 = (**(code **)(PSI_server + 0x1c0)) (local_68,param_1[1].__align,*(int8 *)((long)param_2 + 0x40),1,param_4, param_5); iVar1 = pthread_cond_timedwait(local_10,local_18,local_20); if (lVar2 != 0) { (**(code **)(PSI_server + 0x1c8))(lVar2,iVar1); } return iVar1; }
6,663
google::protobuf::internal::ExtensionSet::SpaceUsedExcludingSelfLong() const::$_0 google::protobuf::internal::ExtensionSet::ForEach<std::_Rb_tree_iterator<std::pair<int const, google::protobuf::internal::ExtensionSet::Extension>>, google::protobuf::internal::ExtensionSet::SpaceUsedExcludingSelfLong() const::$_0>(std::_Rb_tree_iterator<std::pair<int const, google::protobuf::internal::ExtensionSet::Extension>>, std::_Rb_tree_iterator<std::pair<int const, google::protobuf::internal::ExtensionSet::Extension>>, google::protobuf::internal::ExtensionSet::SpaceUsedExcludingSelfLong() const::$_0)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/extension_set.h
static KeyValueFunctor ForEach(Iterator begin, Iterator end, KeyValueFunctor func) { for (Iterator it = begin; it != end; ++it) func(it->first, it->second); return std::move(func); }
O3
c
google::protobuf::internal::ExtensionSet::SpaceUsedExcludingSelfLong() const::$_0 google::protobuf::internal::ExtensionSet::ForEach<std::_Rb_tree_iterator<std::pair<int const, google::protobuf::internal::ExtensionSet::Extension>>, google::protobuf::internal::ExtensionSet::SpaceUsedExcludingSelfLong() const::$_0>(std::_Rb_tree_iterator<std::pair<int const, google::protobuf::internal::ExtensionSet::Extension>>, std::_Rb_tree_iterator<std::pair<int const, google::protobuf::internal::ExtensionSet::Extension>>, google::protobuf::internal::ExtensionSet::SpaceUsedExcludingSelfLong() const::$_0): pushq %r15 pushq %r14 pushq %rbx movq %rdx, %rbx cmpq %rsi, %rdi je 0x6295d movq %rsi, %r14 movq %rdi, %r15 leaq 0x28(%r15), %rdi callq 0x62742 addq %rax, (%rbx) movq %r15, %rdi callq 0xf270 movq %rax, %r15 cmpq %r14, %rax jne 0x62941 movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq
_ZN6google8protobuf8internal12ExtensionSet7ForEachISt17_Rb_tree_iteratorISt4pairIKiNS2_9ExtensionEEEZNKS2_26SpaceUsedExcludingSelfLongEvE3$_0EET0_T_SC_SB_: push r15 push r14 push rbx mov rbx, rdx cmp rdi, rsi jz short loc_6295D mov r14, rsi mov r15, rdi loc_62941: lea rdi, [r15+28h]; this call _ZNK6google8protobuf8internal12ExtensionSet9Extension26SpaceUsedExcludingSelfLongEv; google::protobuf::internal::ExtensionSet::Extension::SpaceUsedExcludingSelfLong(void) add [rbx], rax mov rdi, r15 call __ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base *) mov r15, rax cmp rax, r14 jnz short loc_62941 loc_6295D: mov rax, rbx pop rbx pop r14 pop r15 retn
_QWORD * google::protobuf::internal::ExtensionSet::ForEach<std::_Rb_tree_iterator<std::pair<int const,google::protobuf::internal::ExtensionSet::Extension>>,google::protobuf::internal::ExtensionSet::SpaceUsedExcludingSelfLong(void)::$_0>( long long a1, long long a2, _QWORD *a3) { long long v4; // r15 if ( a1 != a2 ) { v4 = a1; do { *a3 += google::protobuf::internal::ExtensionSet::Extension::SpaceUsedExcludingSelfLong((long long **)(v4 + 40)); v4 = std::_Rb_tree_increment(v4); } while ( v4 != a2 ); } return a3; }
ForEach<std::_Rb_tree_iterator<std::pair<int_const,google::protobuf::internal::ExtensionSet::Extension>>,google::protobuf::internal::ExtensionSet::SpaceUsedExcludingSelfLong()const::$_0>: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDX CMP RDI,RSI JZ 0x0016295d MOV R14,RSI MOV R15,RDI LAB_00162941: LEA RDI,[R15 + 0x28] CALL 0x00162742 ADD qword ptr [RBX],RAX MOV RDI,R15 CALL 0x0010f270 MOV R15,RAX CMP RAX,R14 JNZ 0x00162941 LAB_0016295d: MOV RAX,RBX POP RBX POP R14 POP R15 RET
/* google::protobuf::internal::ExtensionSet::SpaceUsedExcludingSelfLong() const::$_0 google::protobuf::internal::ExtensionSet::ForEach<std::_Rb_tree_iterator<std::pair<int const, google::protobuf::internal::ExtensionSet::Extension> >, google::protobuf::internal::ExtensionSet::SpaceUsedExcludingSelfLong() const::$_0>(std::_Rb_tree_iterator<std::pair<int const, google::protobuf::internal::ExtensionSet::Extension> >, std::_Rb_tree_iterator<std::pair<int const, google::protobuf::internal::ExtensionSet::Extension> >, google::protobuf::internal::ExtensionSet::SpaceUsedExcludingSelfLong() const::$_0) */ long * google::protobuf::internal::ExtensionSet:: ForEach<std::_Rb_tree_iterator<std::pair<int_const,google::protobuf::internal::ExtensionSet::Extension>>,google::protobuf::internal::ExtensionSet::SpaceUsedExcludingSelfLong()const::__0> (_Rb_tree_node_base *param_1,_Rb_tree_node_base *param_2,long *param_3) { long lVar1; if (param_1 != param_2) { do { lVar1 = Extension::SpaceUsedExcludingSelfLong((Extension *)(param_1 + 0x28)); *param_3 = *param_3 + lVar1; param_1 = (_Rb_tree_node_base *)std::_Rb_tree_increment(param_1); } while (param_1 != param_2); } return param_3; }
6,664
ma_keydef_write
eloqsql/storage/maria/ma_open.c
my_bool _ma_keydef_write(File file, MARIA_KEYDEF *keydef) { uchar buff[MARIA_KEYDEF_SIZE]; uchar *ptr=buff; *ptr++= (uchar) keydef->keysegs; *ptr++= keydef->key_alg; /* Rtree or Btree */ mi_int2store(ptr,keydef->flag); ptr+= 2; mi_int2store(ptr,keydef->block_length); ptr+= 2; mi_int2store(ptr,keydef->keylength); ptr+= 2; mi_int2store(ptr,keydef->minlength); ptr+= 2; mi_int2store(ptr,keydef->maxlength); ptr+= 2; return mysql_file_write(file, buff, (size_t) (ptr-buff), MYF(MY_NABP)) != 0; }
O0
c
ma_keydef_write: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movl %edi, -0x18(%rbp) movq %rsi, -0x20(%rbp) leaq -0x14(%rbp), %rcx movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax movb 0xa0(%rax), %dl movq -0x28(%rbp), %rax movq %rax, %rsi incq %rsi movq %rsi, -0x28(%rbp) movb %dl, (%rax) movq -0x20(%rbp), %rax movb 0xa4(%rax), %dl movq -0x28(%rbp), %rax movq %rax, %rsi incq %rsi movq %rsi, -0x28(%rbp) movb %dl, (%rax) movq -0x20(%rbp), %rax movzwl 0xa2(%rax), %eax movl %eax, -0x2c(%rbp) movb -0x2c(%rbp), %dl movq -0x28(%rbp), %rax movb %dl, 0x1(%rax) movb -0x2b(%rbp), %dl movq -0x28(%rbp), %rax movb %dl, (%rax) movq -0x28(%rbp), %rax addq $0x2, %rax movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rax movzwl 0xa6(%rax), %eax movl %eax, -0x30(%rbp) movb -0x30(%rbp), %dl movq -0x28(%rbp), %rax movb %dl, 0x1(%rax) movb -0x2f(%rbp), %dl movq -0x28(%rbp), %rax movb %dl, (%rax) movq -0x28(%rbp), %rax addq $0x2, %rax movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rax movzwl 0xaa(%rax), %eax movl %eax, -0x34(%rbp) movb -0x34(%rbp), %dl movq -0x28(%rbp), %rax movb %dl, 0x1(%rax) movb -0x33(%rbp), %dl movq -0x28(%rbp), %rax movb %dl, (%rax) movq -0x28(%rbp), %rax addq $0x2, %rax movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rax movzwl 0xac(%rax), %eax movl %eax, -0x38(%rbp) movb -0x38(%rbp), %dl movq -0x28(%rbp), %rax movb %dl, 0x1(%rax) movb -0x37(%rbp), %dl movq -0x28(%rbp), %rax movb %dl, (%rax) movq -0x28(%rbp), %rax addq $0x2, %rax movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rax movzwl 0xae(%rax), %eax movl %eax, -0x3c(%rbp) movb -0x3c(%rbp), %dl movq -0x28(%rbp), %rax movb %dl, 0x1(%rax) movb -0x3b(%rbp), %dl movq -0x28(%rbp), %rax movb %dl, (%rax) movq -0x28(%rbp), %rax addq $0x2, %rax movq %rax, -0x28(%rbp) movl -0x18(%rbp), %edx movq -0x28(%rbp), %r8 subq %rcx, %r8 leaq 0xf1920(%rip), %rdi # 0x15b1ea movl $0x707, %esi # imm = 0x707 movl $0x4, %r9d callq 0x68710 testq %rax, %rax setne %al movb %al, -0x3d(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x698fe movb -0x3d(%rbp), %al addq $0x40, %rsp popq %rbp retq callq 0x2a270 nopw %cs:(%rax,%rax)
_ma_keydef_write: push rbp mov rbp, rsp sub rsp, 40h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_18], edi mov [rbp+var_20], rsi lea rcx, [rbp+var_14] mov [rbp+var_28], rcx mov rax, [rbp+var_20] mov dl, [rax+0A0h] mov rax, [rbp+var_28] mov rsi, rax inc rsi mov [rbp+var_28], rsi mov [rax], dl mov rax, [rbp+var_20] mov dl, [rax+0A4h] mov rax, [rbp+var_28] mov rsi, rax inc rsi mov [rbp+var_28], rsi mov [rax], dl mov rax, [rbp+var_20] movzx eax, word ptr [rax+0A2h] mov [rbp+var_2C], eax mov dl, byte ptr [rbp+var_2C] mov rax, [rbp+var_28] mov [rax+1], dl mov dl, byte ptr [rbp+var_2C+1] mov rax, [rbp+var_28] mov [rax], dl mov rax, [rbp+var_28] add rax, 2 mov [rbp+var_28], rax mov rax, [rbp+var_20] movzx eax, word ptr [rax+0A6h] mov [rbp+var_30], eax mov dl, byte ptr [rbp+var_30] mov rax, [rbp+var_28] mov [rax+1], dl mov dl, byte ptr [rbp+var_30+1] mov rax, [rbp+var_28] mov [rax], dl mov rax, [rbp+var_28] add rax, 2 mov [rbp+var_28], rax mov rax, [rbp+var_20] movzx eax, word ptr [rax+0AAh] mov [rbp+var_34], eax mov dl, byte ptr [rbp+var_34] mov rax, [rbp+var_28] mov [rax+1], dl mov dl, byte ptr [rbp+var_34+1] mov rax, [rbp+var_28] mov [rax], dl mov rax, [rbp+var_28] add rax, 2 mov [rbp+var_28], rax mov rax, [rbp+var_20] movzx eax, word ptr [rax+0ACh] mov [rbp+var_38], eax mov dl, byte ptr [rbp+var_38] mov rax, [rbp+var_28] mov [rax+1], dl mov dl, byte ptr [rbp+var_38+1] mov rax, [rbp+var_28] mov [rax], dl mov rax, [rbp+var_28] add rax, 2 mov [rbp+var_28], rax mov rax, [rbp+var_20] movzx eax, word ptr [rax+0AEh] mov [rbp+var_3C], eax mov dl, byte ptr [rbp+var_3C] mov rax, [rbp+var_28] mov [rax+1], dl mov dl, byte ptr [rbp+var_3C+1] mov rax, [rbp+var_28] mov [rax], dl mov rax, [rbp+var_28] add rax, 2 mov [rbp+var_28], rax mov edx, [rbp+var_18] mov r8, [rbp+var_28] sub r8, rcx lea rdi, aWorkspaceLlm4b_14; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 707h mov r9d, 4 call inline_mysql_file_write_0 test rax, rax setnz al mov [rbp+var_3D], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_698FE mov al, [rbp+var_3D] add rsp, 40h pop rbp retn loc_698FE: call ___stack_chk_fail
bool ma_keydef_write(unsigned int a1, long long a2) { __int16 v2; // kr00_2 __int16 v3; // kr02_2 __int16 v4; // kr04_2 __int16 v5; // kr06_2 __int16 v6; // kr08_2 _BYTE v8[12]; // [rsp+2Ch] [rbp-14h] BYREF unsigned long long v9; // [rsp+38h] [rbp-8h] v9 = __readfsqword(0x28u); v8[0] = *(_BYTE *)(a2 + 160); v8[1] = *(_BYTE *)(a2 + 164); v2 = *(_WORD *)(a2 + 162); v8[2] = HIBYTE(v2); v8[3] = v2; v3 = *(_WORD *)(a2 + 166); v8[4] = HIBYTE(v3); v8[5] = v3; v4 = *(_WORD *)(a2 + 170); v8[6] = HIBYTE(v4); v8[7] = v4; v5 = *(_WORD *)(a2 + 172); v8[8] = HIBYTE(v5); v8[9] = v5; v6 = *(_WORD *)(a2 + 174); v8[10] = HIBYTE(v6); v8[11] = v6; return inline_mysql_file_write_0( (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c", 0x707u, a1, (long long)v8, 12LL, 4LL) != 0; }
_ma_keydef_write: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x18],EDI MOV qword ptr [RBP + -0x20],RSI LEA RCX,[RBP + -0x14] MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] MOV DL,byte ptr [RAX + 0xa0] MOV RAX,qword ptr [RBP + -0x28] MOV RSI,RAX INC RSI MOV qword ptr [RBP + -0x28],RSI MOV byte ptr [RAX],DL MOV RAX,qword ptr [RBP + -0x20] MOV DL,byte ptr [RAX + 0xa4] MOV RAX,qword ptr [RBP + -0x28] MOV RSI,RAX INC RSI MOV qword ptr [RBP + -0x28],RSI MOV byte ptr [RAX],DL MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,word ptr [RAX + 0xa2] MOV dword ptr [RBP + -0x2c],EAX MOV DL,byte ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x1],DL MOV DL,byte ptr [RBP + -0x2b] MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],DL MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x2 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,word ptr [RAX + 0xa6] MOV dword ptr [RBP + -0x30],EAX MOV DL,byte ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x1],DL MOV DL,byte ptr [RBP + -0x2f] MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],DL MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x2 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,word ptr [RAX + 0xaa] MOV dword ptr [RBP + -0x34],EAX MOV DL,byte ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x1],DL MOV DL,byte ptr [RBP + -0x33] MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],DL MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x2 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,word ptr [RAX + 0xac] MOV dword ptr [RBP + -0x38],EAX MOV DL,byte ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x1],DL MOV DL,byte ptr [RBP + -0x37] MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],DL MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x2 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,word ptr [RAX + 0xae] MOV dword ptr [RBP + -0x3c],EAX MOV DL,byte ptr [RBP + -0x3c] MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x1],DL MOV DL,byte ptr [RBP + -0x3b] MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],DL MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x2 MOV qword ptr [RBP + -0x28],RAX MOV EDX,dword ptr [RBP + -0x18] MOV R8,qword ptr [RBP + -0x28] SUB R8,RCX LEA RDI,[0x25b1ea] MOV ESI,0x707 MOV R9D,0x4 CALL 0x00168710 TEST RAX,RAX SETNZ AL MOV byte ptr [RBP + -0x3d],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001698fe MOV AL,byte ptr [RBP + -0x3d] ADD RSP,0x40 POP RBP RET LAB_001698fe: CALL 0x0012a270
int8 _ma_keydef_write(int4 param_1,long param_2) { long lVar1; long in_FS_OFFSET; int1 local_44; int1 uStack_43; int1 local_40; int1 uStack_3f; int1 local_3c; int1 uStack_3b; int1 local_38; int1 uStack_37; int1 local_34; int1 uStack_33; int1 local_1c; int1 local_1b; int1 local_1a; int1 local_19; int1 local_18; int1 local_17; int1 local_16; int1 local_15; int1 local_14; int1 local_13; int1 local_12; int1 local_11; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_1c = *(int1 *)(param_2 + 0xa0); local_1b = *(int1 *)(param_2 + 0xa4); local_34 = (int1)*(int2 *)(param_2 + 0xa2); local_19 = local_34; uStack_33 = (int1)((ushort)*(int2 *)(param_2 + 0xa2) >> 8); local_1a = uStack_33; local_38 = (int1)*(int2 *)(param_2 + 0xa6); local_17 = local_38; uStack_37 = (int1)((ushort)*(int2 *)(param_2 + 0xa6) >> 8); local_18 = uStack_37; local_3c = (int1)*(int2 *)(param_2 + 0xaa); local_15 = local_3c; uStack_3b = (int1)((ushort)*(int2 *)(param_2 + 0xaa) >> 8); local_16 = uStack_3b; local_40 = (int1)*(int2 *)(param_2 + 0xac); local_13 = local_40; uStack_3f = (int1)((ushort)*(int2 *)(param_2 + 0xac) >> 8); local_14 = uStack_3f; local_44 = (int1)*(int2 *)(param_2 + 0xae); local_11 = local_44; uStack_43 = (int1)((ushort)*(int2 *)(param_2 + 0xae) >> 8); local_12 = uStack_43; lVar1 = inline_mysql_file_write ("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c",0x707, param_1,&local_1c,(long)&local_10 - (long)&local_1c,4); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),lVar1 != 0); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
6,665
google::protobuf::io::CodedInputStream::PrintTotalBytesLimitError()
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/coded_stream.cc
void CodedInputStream::PrintTotalBytesLimitError() { GOOGLE_LOG(ERROR) << "A protocol message was rejected because it was too " "big (more than " << total_bytes_limit_ << " bytes). To increase the limit (or to disable these " "warnings), see CodedInputStream::SetTotalBytesLimit() " "in third_party/protobuf/io/coded_stream.h."; }
O0
cpp
google::protobuf::io::CodedInputStream::PrintTotalBytesLimitError(): subq $0x78, %rsp movq %rdi, 0x70(%rsp) movq 0x70(%rsp), %rax movq %rax, 0x10(%rsp) leaq 0x1cd149(%rip), %rdx # 0x1ebb83 leaq 0x38(%rsp), %rdi movq %rdi, 0x18(%rsp) movl $0x2, %esi movl $0xc2, %ecx callq 0x237e0 movq 0x18(%rsp), %rdi leaq 0x1cd1c9(%rip), %rsi # 0x1ebc28 callq 0x230a0 movq %rax, 0x20(%rsp) jmp 0x1ea6b movq 0x20(%rsp), %rdi movq 0x10(%rsp), %rax movl 0x30(%rax), %esi callq 0x235b0 movq %rax, 0x8(%rsp) jmp 0x1ea84 movq 0x8(%rsp), %rdi leaq 0x1cd1db(%rip), %rsi # 0x1ebc6b callq 0x230a0 movq %rax, (%rsp) jmp 0x1ea9b movq (%rsp), %rsi leaq 0x2b(%rsp), %rdi callq 0x23250 jmp 0x1eaab leaq 0x38(%rsp), %rdi callq 0x23820 addq $0x78, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) leaq 0x38(%rsp), %rdi callq 0x23820 movq 0x30(%rsp), %rdi callq 0x13750 nopl (%rax)
_ZN6google8protobuf2io16CodedInputStream25PrintTotalBytesLimitErrorEv: sub rsp, 78h mov [rsp+78h+var_8], rdi mov rax, [rsp+78h+var_8] mov [rsp+78h+var_68], rax lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+78h+var_40] mov [rsp+78h+var_60], rdi mov esi, 2 mov ecx, 0C2h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+78h+var_60] lea rsi, aAProtocolMessa; "A protocol message was rejected because"... call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+78h+var_58], rax jmp short $+2 loc_1EA6B: mov rdi, [rsp+78h+var_58] mov rax, [rsp+78h+var_68] mov esi, [rax+30h] call _ZN6google8protobuf8internal10LogMessagelsEi; google::protobuf::internal::LogMessage::operator<<(int) mov [rsp+78h+var_70], rax jmp short $+2 loc_1EA84: mov rdi, [rsp+78h+var_70] lea rsi, aBytesToIncreas; " bytes). To increase the limit (or to "... call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+78h+var_78], rax jmp short $+2 loc_1EA9B: mov rsi, [rsp+78h+var_78] lea rdi, [rsp+78h+var_4D] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_1EAAB: lea rdi, [rsp+78h+var_40]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() add rsp, 78h retn mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax lea rdi, [rsp+arg_30]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() mov rdi, [rsp+arg_28] call __Unwind_Resume
void google::protobuf::io::CodedInputStream::PrintTotalBytesLimitError( google::protobuf::io::CodedInputStream *this) { long long v1; // [rsp+0h] [rbp-78h] long long v2; // [rsp+8h] [rbp-70h] long long v3; // [rsp+20h] [rbp-58h] _BYTE v4[13]; // [rsp+2Bh] [rbp-4Dh] BYREF _BYTE v5[56]; // [rsp+38h] [rbp-40h] BYREF google::protobuf::io::CodedInputStream *v6; // [rsp+70h] [rbp-8h] v6 = this; google::protobuf::internal::LogMessage::LogMessage( v5, 2LL, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/coded_stream.cc", 194LL); v3 = google::protobuf::internal::LogMessage::operator<<( v5, "A protocol message was rejected because it was too big (more than "); v2 = google::protobuf::internal::LogMessage::operator<<(v3, *((unsigned int *)this + 12)); v1 = google::protobuf::internal::LogMessage::operator<<( v2, " bytes). To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in t" "hird_party/protobuf/io/coded_stream.h."); google::protobuf::internal::LogFinisher::operator=(v4, v1); google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v5); }
PrintTotalBytesLimitError: SUB RSP,0x78 MOV qword ptr [RSP + 0x70],RDI MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x10],RAX LEA RDX,[0x2ebb83] LEA RDI,[RSP + 0x38] MOV qword ptr [RSP + 0x18],RDI MOV ESI,0x2 MOV ECX,0xc2 CALL 0x001237e0 MOV RDI,qword ptr [RSP + 0x18] LAB_0011ea58: LEA RSI,[0x2ebc28] CALL 0x001230a0 MOV qword ptr [RSP + 0x20],RAX JMP 0x0011ea6b LAB_0011ea6b: MOV RDI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x10] MOV ESI,dword ptr [RAX + 0x30] CALL 0x001235b0 MOV qword ptr [RSP + 0x8],RAX JMP 0x0011ea84 LAB_0011ea84: MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[0x2ebc6b] CALL 0x001230a0 MOV qword ptr [RSP],RAX JMP 0x0011ea9b LAB_0011ea9b: MOV RSI,qword ptr [RSP] LEA RDI,[RSP + 0x2b] CALL 0x00123250 LAB_0011eaa9: JMP 0x0011eaab LAB_0011eaab: LEA RDI,[RSP + 0x38] CALL 0x00123820 ADD RSP,0x78 RET
/* google::protobuf::io::CodedInputStream::PrintTotalBytesLimitError() */ void __thiscall google::protobuf::io::CodedInputStream::PrintTotalBytesLimitError(CodedInputStream *this) { LogMessage *pLVar1; LogFinisher local_4d [13]; LogMessage local_40 [56]; CodedInputStream *local_8; local_8 = this; internal::LogMessage::LogMessage (local_40,2, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/coded_stream.cc" ,0xc2); /* try { // try from 0011ea58 to 0011eaa8 has its CatchHandler @ 0011eaba */ pLVar1 = (LogMessage *) internal::LogMessage::operator<< (local_40,"A protocol message was rejected because it was too big (more than ") ; pLVar1 = (LogMessage *)internal::LogMessage::operator<<(pLVar1,*(int *)(this + 0x30)); pLVar1 = (LogMessage *) internal::LogMessage::operator<< (pLVar1, " bytes). To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in third_party/protobuf/io/coded_stream.h." ); internal::LogFinisher::operator=(local_4d,pLVar1); internal::LogMessage::~LogMessage(local_40); return; }
6,666
lookup_file_by_name(char const*)
eloqsql/storage/perfschema/unittest/pfs-t.cc
PFS_file* lookup_file_by_name(const char* name) { PFS_file *pfs; size_t len= strlen(name); size_t dirlen; const char *filename; size_t filename_length; PFS_file_iterator it= global_file_container.iterate(); pfs= it.scan_next(); while (pfs != NULL) { /* When a file "foo" is instrumented, the name is normalized to "/path/to/current/directory/foo", so we remove the directory name here to find it back. */ dirlen= dirname_length(pfs->m_filename); filename= pfs->m_filename + dirlen; filename_length= pfs->m_filename_length - dirlen; if ((len == filename_length) && (strncmp(name, filename, filename_length) == 0)) return pfs; pfs= it.scan_next(); } return NULL; }
O0
cpp
lookup_file_by_name(char const*): pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x28(%rbp) movq -0x28(%rbp), %rdi callq 0x26150 movq %rax, -0x38(%rbp) leaq 0x3a8263(%rip), %rdi # 0x3d1cb0 callq 0x2edf0 movl %edx, -0x58(%rbp) movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax movq %rax, -0x18(%rbp) movl -0x58(%rbp), %eax movl %eax, -0x10(%rbp) leaq -0x18(%rbp), %rdi callq 0x2ee50 movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%rbp) je 0x29ae7 movq -0x30(%rbp), %rdi addq $0x18, %rdi callq 0x5ca40 movq %rax, -0x40(%rbp) movq -0x30(%rbp), %rax addq $0x18, %rax addq -0x40(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x30(%rbp), %rax movl 0x218(%rax), %eax subq -0x40(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x38(%rbp), %rax cmpq -0x50(%rbp), %rax jne 0x29ad8 movq -0x28(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x50(%rbp), %rdx callq 0x26170 cmpl $0x0, %eax jne 0x29ad8 movq -0x30(%rbp), %rax movq %rax, -0x20(%rbp) jmp 0x29aef leaq -0x18(%rbp), %rdi callq 0x2ee50 movq %rax, -0x30(%rbp) jmp 0x29a74 movq $0x0, -0x20(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x68(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x29b13 movq -0x68(%rbp), %rax addq $0x70, %rsp popq %rbp retq callq 0x26360 nopl (%rax,%rax)
_Z19lookup_file_by_namePKc: push rbp mov rbp, rsp sub rsp, 70h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_28], rdi mov rdi, [rbp+var_28] call _strlen mov [rbp+var_38], rax lea rdi, global_file_container call _ZN29PFS_buffer_scalable_containerI8PFS_fileLi4096ELi4096E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE7iterateEv; PFS_buffer_scalable_container<PFS_file,4096,4096,PFS_buffer_default_array<PFS_file>,PFS_buffer_default_allocator<PFS_file>>::iterate(void) mov [rbp+var_58], edx mov [rbp+var_60], rax mov rax, [rbp+var_60] mov [rbp+var_18], rax mov eax, [rbp+var_58] mov [rbp+var_10], eax lea rdi, [rbp+var_18] call _ZN28PFS_buffer_scalable_iteratorI8PFS_fileLi4096ELi4096E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE9scan_nextEv; PFS_buffer_scalable_iterator<PFS_file,4096,4096,PFS_buffer_default_array<PFS_file>,PFS_buffer_default_allocator<PFS_file>>::scan_next(void) mov [rbp+var_30], rax loc_29A74: cmp [rbp+var_30], 0 jz short loc_29AE7 mov rdi, [rbp+var_30] add rdi, 18h call dirname_length mov [rbp+var_40], rax mov rax, [rbp+var_30] add rax, 18h add rax, [rbp+var_40] mov [rbp+var_48], rax mov rax, [rbp+var_30] mov eax, [rax+218h] sub rax, [rbp+var_40] mov [rbp+var_50], rax mov rax, [rbp+var_38] cmp rax, [rbp+var_50] jnz short loc_29AD8 mov rdi, [rbp+var_28] mov rsi, [rbp+var_48] mov rdx, [rbp+var_50] call _strncmp cmp eax, 0 jnz short loc_29AD8 mov rax, [rbp+var_30] mov [rbp+var_20], rax jmp short loc_29AEF loc_29AD8: lea rdi, [rbp+var_18] call _ZN28PFS_buffer_scalable_iteratorI8PFS_fileLi4096ELi4096E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE9scan_nextEv; PFS_buffer_scalable_iterator<PFS_file,4096,4096,PFS_buffer_default_array<PFS_file>,PFS_buffer_default_allocator<PFS_file>>::scan_next(void) mov [rbp+var_30], rax jmp short loc_29A74 loc_29AE7: mov [rbp+var_20], 0 loc_29AEF: mov rax, [rbp+var_20] mov [rbp+var_68], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_29B13 mov rax, [rbp+var_68] add rsp, 70h pop rbp retn loc_29B13: call ___stack_chk_fail
long long lookup_file_by_name(const char *a1) { int v1; // edx long long v3; // [rsp+20h] [rbp-50h] long long v4; // [rsp+30h] [rbp-40h] long long v5; // [rsp+38h] [rbp-38h] long long i; // [rsp+40h] [rbp-30h] long long v8; // [rsp+58h] [rbp-18h] BYREF int v9; // [rsp+60h] [rbp-10h] unsigned long long v10; // [rsp+68h] [rbp-8h] v10 = __readfsqword(0x28u); v5 = strlen(a1); v8 = PFS_buffer_scalable_container<PFS_file,4096,4096,PFS_buffer_default_array<PFS_file>,PFS_buffer_default_allocator<PFS_file>>::iterate(&global_file_container); v9 = v1; for ( i = PFS_buffer_scalable_iterator<PFS_file,4096,4096,PFS_buffer_default_array<PFS_file>,PFS_buffer_default_allocator<PFS_file>>::scan_next(&v8); i; i = PFS_buffer_scalable_iterator<PFS_file,4096,4096,PFS_buffer_default_array<PFS_file>,PFS_buffer_default_allocator<PFS_file>>::scan_next(&v8) ) { v4 = dirname_length(i + 24); v3 = *(unsigned int *)(i + 536) - v4; if ( v5 == v3 && !(unsigned int)strncmp(a1, v4 + i + 24, v3) ) return i; } return 0LL; }
lookup_file_by_name: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x28],RDI MOV RDI,qword ptr [RBP + -0x28] CALL 0x00126150 MOV qword ptr [RBP + -0x38],RAX LEA RDI,[0x4d1cb0] CALL 0x0012edf0 MOV dword ptr [RBP + -0x58],EDX MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x18],RAX MOV EAX,dword ptr [RBP + -0x58] MOV dword ptr [RBP + -0x10],EAX LEA RDI,[RBP + -0x18] CALL 0x0012ee50 MOV qword ptr [RBP + -0x30],RAX LAB_00129a74: CMP qword ptr [RBP + -0x30],0x0 JZ 0x00129ae7 MOV RDI,qword ptr [RBP + -0x30] ADD RDI,0x18 CALL 0x0015ca40 MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x18 ADD RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RAX + 0x218] SUB RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x50] JNZ 0x00129ad8 MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x50] CALL 0x00126170 CMP EAX,0x0 JNZ 0x00129ad8 MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x20],RAX JMP 0x00129aef LAB_00129ad8: LEA RDI,[RBP + -0x18] CALL 0x0012ee50 MOV qword ptr [RBP + -0x30],RAX JMP 0x00129a74 LAB_00129ae7: MOV qword ptr [RBP + -0x20],0x0 LAB_00129aef: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00129b13 MOV RAX,qword ptr [RBP + -0x68] ADD RSP,0x70 POP RBP RET LAB_00129b13: CALL 0x00126360
/* lookup_file_by_name(char const*) */ long lookup_file_by_name(char *param_1) { int iVar1; size_t sVar2; long lVar3; size_t __n; long in_FS_OFFSET; long local_38; long local_28; PFS_buffer_scalable_iterator<PFS_file,4096,4096,PFS_buffer_default_array<PFS_file>,PFS_buffer_default_allocator<PFS_file>> local_20 [16]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); sVar2 = strlen(param_1); local_20._0_12_ = PFS_buffer_scalable_container<PFS_file,4096,4096,PFS_buffer_default_array<PFS_file>,PFS_buffer_default_allocator<PFS_file>> ::iterate((PFS_buffer_scalable_container<PFS_file,4096,4096,PFS_buffer_default_array<PFS_file>,PFS_buffer_default_allocator<PFS_file>> *)&global_file_container); local_38 = PFS_buffer_scalable_iterator<PFS_file,4096,4096,PFS_buffer_default_array<PFS_file>,PFS_buffer_default_allocator<PFS_file>> ::scan_next(local_20); do { if (local_38 == 0) { local_28 = 0; LAB_00129aef: if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_28; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); } lVar3 = dirname_length(local_38 + 0x18); __n = (ulong)*(uint *)(local_38 + 0x218) - lVar3; if (sVar2 == __n) { iVar1 = strncmp(param_1,(char *)(local_38 + 0x18 + lVar3),__n); if (iVar1 == 0) { local_28 = local_38; goto LAB_00129aef; } } local_38 = PFS_buffer_scalable_iterator<PFS_file,4096,4096,PFS_buffer_default_array<PFS_file>,PFS_buffer_default_allocator<PFS_file>> ::scan_next(local_20); } while( true ); }
6,667
ma_zlib_compress
eloqsql/libmariadb/plugins/compress/c_zlib.c
my_bool ma_zlib_compress(ma_compress_ctx *ctx, void *dst, size_t *dst_len, void *source, size_t source_len) { int rc; if (!ctx) return 1; if ((rc= compress2((Bytef *)dst, (uLongf *)dst_len, (Bytef *)source, (uLong)source_len, ctx->compression_level)) != Z_OK) return 1; return 0; }
O0
c
ma_zlib_compress: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) cmpq $0x0, -0x10(%rbp) jne 0x45969 movb $0x1, -0x1(%rbp) jmp 0x45998 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx movq -0x10(%rbp), %rax movl 0x10(%rax), %r8d callq 0x13240 movl %eax, -0x34(%rbp) cmpl $0x0, %eax je 0x45994 movb $0x1, -0x1(%rbp) jmp 0x45998 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_zlib_compress: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 cmp [rbp+var_10], 0 jnz short loc_45969 mov [rbp+var_1], 1 jmp short loc_45998 loc_45969: mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] mov rax, [rbp+var_10] mov r8d, [rax+10h] call _compress2 mov [rbp+var_34], eax cmp eax, 0 jz short loc_45994 mov [rbp+var_1], 1 jmp short loc_45998 loc_45994: mov [rbp+var_1], 0 loc_45998: mov al, [rbp+var_1] add rsp, 40h pop rbp retn
bool ma_zlib_compress(long long a1, long long a2, long long a3, long long a4, long long a5) { return !a1 || (unsigned int)compress2(a2, a3, a4, a5, *(unsigned int *)(a1 + 16)) != 0; }
ma_zlib_compress: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 CMP qword ptr [RBP + -0x10],0x0 JNZ 0x00145969 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00145998 LAB_00145969: MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x10] MOV R8D,dword ptr [RAX + 0x10] CALL 0x00113240 MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JZ 0x00145994 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00145998 LAB_00145994: MOV byte ptr [RBP + -0x1],0x0 LAB_00145998: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x40 POP RBP RET
int1 ma_zlib_compress(long param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5) { int iVar1; int1 local_9; if (param_1 == 0) { local_9 = 1; } else { iVar1 = compress2(param_2,param_3,param_4,param_5,*(int4 *)(param_1 + 0x10)); if (iVar1 == 0) { local_9 = 0; } else { local_9 = 1; } } return local_9; }
6,668
ma_zlib_compress
eloqsql/libmariadb/plugins/compress/c_zlib.c
my_bool ma_zlib_compress(ma_compress_ctx *ctx, void *dst, size_t *dst_len, void *source, size_t source_len) { int rc; if (!ctx) return 1; if ((rc= compress2((Bytef *)dst, (uLongf *)dst_len, (Bytef *)source, (uLong)source_len, ctx->compression_level)) != Z_OK) return 1; return 0; }
O3
c
ma_zlib_compress: testq %rdi, %rdi je 0x318af pushq %rbp movq %rsp, %rbp movl 0x10(%rdi), %eax movq %rsi, %rdi movq %rdx, %rsi movq %rcx, %rdx movq %r8, %rcx movl %eax, %r8d callq 0x13250 testl %eax, %eax setne %al popq %rbp retq movb $0x1, %al retq
ma_zlib_compress: test rdi, rdi jz short loc_318AF push rbp mov rbp, rsp mov eax, [rdi+10h] mov rdi, rsi mov rsi, rdx mov rdx, rcx mov rcx, r8 mov r8d, eax call _compress2 test eax, eax setnz al pop rbp retn loc_318AF: mov al, 1 retn
bool ma_zlib_compress(long long a1, long long a2, long long a3, long long a4, long long a5) { return !a1 || (unsigned int)compress2(a2, a3, a4, a5, *(unsigned int *)(a1 + 16)) != 0; }
ma_zlib_compress: TEST RDI,RDI JZ 0x001318af PUSH RBP MOV RBP,RSP MOV EAX,dword ptr [RDI + 0x10] MOV RDI,RSI MOV RSI,RDX MOV RDX,RCX MOV RCX,R8 MOV R8D,EAX CALL 0x00113250 TEST EAX,EAX SETNZ AL POP RBP RET LAB_001318af: MOV AL,0x1 RET
bool ma_zlib_compress(long param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5) { int iVar1; if (param_1 != 0) { iVar1 = compress2(param_2,param_3,param_4,param_5,*(int4 *)(param_1 + 0x10)); return iVar1 != 0; } return true; }
6,669
mysql_refresh_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_refresh_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_refresh, (parms->mysql, parms->refresh_options), parms->mysql, int, r_int) }
O3
c
mysql_refresh_start_internal: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq (%rdi), %rax movq 0x480(%rax), %rcx movq 0x28(%rcx), %rbx movl 0x8(%rdi), %esi movq %rax, %rdi callq 0x20ca8 movl %eax, 0x8(%rbx) movl $0x0, (%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
mysql_refresh_start_internal: push rbp mov rbp, rsp push rbx push rax mov rax, [rdi] mov rcx, [rax+480h] mov rbx, [rcx+28h] mov esi, [rdi+8] mov rdi, rax call mysql_refresh mov [rbx+8], eax mov dword ptr [rbx], 0 add rsp, 8 pop rbx pop rbp retn
long long mysql_refresh_start_internal(long long a1) { _DWORD *v1; // rbx long long result; // rax v1 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)a1 + 1152LL) + 40LL); result = mysql_refresh(*(_QWORD *)a1, *(_DWORD *)(a1 + 8)); v1[2] = result; *v1 = 0; return result; }
mysql_refresh_start_internal: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RAX,qword ptr [RDI] MOV RCX,qword ptr [RAX + 0x480] MOV RBX,qword ptr [RCX + 0x28] MOV ESI,dword ptr [RDI + 0x8] MOV RDI,RAX CALL 0x00120ca8 MOV dword ptr [RBX + 0x8],EAX MOV dword ptr [RBX],0x0 ADD RSP,0x8 POP RBX POP RBP RET
void mysql_refresh_start_internal(long *param_1) { int4 *puVar1; int4 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_refresh(*param_1,(int)param_1[1]); puVar1[2] = uVar2; *puVar1 = 0; return; }
6,670
SettingValue_StepperUnsigned::refresh_wids()
untodesu[P]voxelius/game/client/settings.cc
void SettingValue_StepperUnsigned::refresh_wids(void) { for(std::size_t i = 0; i < wids.size(); ++i) { auto key = fmt::format("settings.value.{}.{}", name, i); wids[i] = fmt::format("{}###{}", language::resolve(key.c_str()), static_cast<const void *>(value)); } }
O2
cpp
SettingValue_StepperUnsigned::refresh_wids(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdi, %rbx leaq 0x50(%rdi), %r14 xorl %eax, %eax leaq 0x18(%rsp), %r12 leaq 0x38(%rsp), %r13 leaq 0x10(%rsp), %r15 leaq 0x8(%rsp), %rbp movq %rax, (%rsp) movq 0x80(%rbx), %rcx subq 0x78(%rbx), %rcx sarq $0x5, %rcx cmpq %rcx, %rax jae 0x63f5a movq %r12, %rdi leaq 0x1125c2(%rip), %rsi # 0x1764ab pushq $0x14 popq %rdx movq %r14, %rcx movq %rsp, %r8 callq 0x65e27 movq 0x18(%rsp), %rdi callq 0x4f9d6 movq %rax, 0x10(%rsp) movq 0x90(%rbx), %rax movq %rax, 0x8(%rsp) movq %r13, %rdi leaq 0x10f780(%rip), %rsi # 0x17369c pushq $0x7 popq %rdx movq %r15, %rcx movq %rbp, %r8 callq 0x65e53 movq (%rsp), %rdi shlq $0x5, %rdi addq 0x78(%rbx), %rdi movq %r13, %rsi callq 0x26b30 movq %r13, %rdi callq 0x272a8 movq %r12, %rdi callq 0x272a8 movq (%rsp), %rax incq %rax jmp 0x63ec7 addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x63f6b movq %rax, %rbx leaq 0x18(%rsp), %rdi callq 0x272a8 movq %rbx, %rdi callq 0x27040
_ZN28SettingValue_StepperUnsigned12refresh_widsEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov rbx, rdi lea r14, [rdi+50h] xor eax, eax lea r12, [rsp+88h+var_70] lea r13, [rsp+88h+var_50] lea r15, [rsp+88h+var_78] lea rbp, [rsp+88h+var_80] loc_63EC7: mov [rsp+88h+var_88], rax mov rcx, [rbx+80h] sub rcx, [rbx+78h] sar rcx, 5 cmp rax, rcx jnb short loc_63F5A mov rdi, r12 lea rsi, aSettingsValue; "settings.value.{}.{}" push 14h pop rdx mov rcx, r14 mov r8, rsp call _ZN3fmt3v116formatIJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERmEEES7_NS0_19basic_format_stringIcJDpNS0_13type_identityIT_E4typeEEEEDpOSC_; fmt::v11::format<std::string &,ulong &>(fmt::v11::basic_format_string<char,fmt::v11::type_identity<std::string &,ulong &>::type>,std::string &,ulong &&&) mov rdi, [rsp+88h+var_70]; this call _ZN8language7resolveEPKc; language::resolve(char const*) mov [rsp+88h+var_78], rax mov rax, [rbx+90h] mov [rsp+88h+var_80], rax mov rdi, r13 lea rsi, asc_17369C; "{}###{}" push 7 pop rdx mov rcx, r15 mov r8, rbp call _ZN3fmt3v116formatIJPKcPKvEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_19basic_format_stringIcJDpNS0_13type_identityIT_E4typeEEEEDpOSE_; fmt::v11::format<char const*,void const*>(fmt::v11::basic_format_string<char,fmt::v11::type_identity<char const*,void const*>::type>,char const*,void const*&&) mov rdi, [rsp+88h+var_88] shl rdi, 5 add rdi, [rbx+78h] mov rsi, r13 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, r13; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r12; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, [rsp+88h+var_88] inc rax jmp loc_63EC7 loc_63F5A: add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_63F6B: mov rbx, rax lea rdi, [rsp+arg_10]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
unsigned long long SettingValue_StepperUnsigned::refresh_wids(SettingValue_StepperUnsigned *this) { unsigned long long result; // rax unsigned long long v2; // [rsp+0h] [rbp-88h] BYREF long long v3; // [rsp+8h] [rbp-80h] BYREF language *v4; // [rsp+10h] [rbp-78h] BYREF language *v5[4]; // [rsp+18h] [rbp-70h] BYREF _BYTE v6[80]; // [rsp+38h] [rbp-50h] BYREF for ( result = 0LL; ; result = v2 + 1 ) { v2 = result; if ( result >= (long long)(*((_QWORD *)this + 16) - *((_QWORD *)this + 15)) >> 5 ) break; fmt::v11::format<std::string &,unsigned long &>(v5, "settings.value.{}.{}", 20LL, (char *)this + 80, &v2); v4 = language::resolve(v5[0], "settings.value.{}.{}"); v3 = *((_QWORD *)this + 18); fmt::v11::format<char const*,void const*>(v6, "{}###{}", 7LL, &v4, &v3); std::string::operator=(*((_QWORD *)this + 15) + 32 * v2, v6); std::string::~string(v6); std::string::~string(v5); } return result; }
refresh_wids: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV RBX,RDI LEA R14,[RDI + 0x50] XOR EAX,EAX LEA R12,[RSP + 0x18] LEA R13,[RSP + 0x38] LEA R15,[RSP + 0x10] LEA RBP,[RSP + 0x8] LAB_00163ec7: MOV qword ptr [RSP],RAX MOV RCX,qword ptr [RBX + 0x80] SUB RCX,qword ptr [RBX + 0x78] SAR RCX,0x5 CMP RAX,RCX JNC 0x00163f5a MOV RDI,R12 LEA RSI,[0x2764ab] PUSH 0x14 POP RDX MOV RCX,R14 MOV R8,RSP CALL 0x00165e27 MOV RDI,qword ptr [RSP + 0x18] LAB_00163efc: CALL 0x0014f9d6 MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RBX + 0x90] MOV qword ptr [RSP + 0x8],RAX LAB_00163f12: MOV RDI,R13 LEA RSI,[0x27369c] PUSH 0x7 POP RDX MOV RCX,R15 MOV R8,RBP CALL 0x00165e53 LAB_00163f2a: MOV RDI,qword ptr [RSP] SHL RDI,0x5 ADD RDI,qword ptr [RBX + 0x78] MOV RSI,R13 CALL 0x00126b30 MOV RDI,R13 CALL 0x001272a8 MOV RDI,R12 CALL 0x001272a8 MOV RAX,qword ptr [RSP] INC RAX JMP 0x00163ec7 LAB_00163f5a: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* SettingValue_StepperUnsigned::refresh_wids() */ void __thiscall SettingValue_StepperUnsigned::refresh_wids(SettingValue_StepperUnsigned *this) { ulong local_88; int8 local_80; int8 local_78; char *local_70 [4]; string local_50 [32]; for (local_88 = 0; local_88 < (ulong)(*(long *)(this + 0x80) - *(long *)(this + 0x78) >> 5); local_88 = local_88 + 1) { fmt::v11::format<std::__cxx11::string&,unsigned_long&> ((string *)local_70,"settings.value.{}.{}",0x14,this + 0x50,&local_88); /* try { // try from 00163efc to 00163f00 has its CatchHandler @ 00163f6b */ local_78 = language::resolve(local_70[0]); local_80 = *(int8 *)(this + 0x90); /* try { // try from 00163f12 to 00163f29 has its CatchHandler @ 00163f69 */ fmt::v11::format<char_const*,void_const*>(local_50,"{}###{}",7,&local_78,&local_80); std::__cxx11::string::operator=((string *)(local_88 * 0x20 + *(long *)(this + 0x78)),local_50); std::__cxx11::string::~string(local_50); std::__cxx11::string::~string((string *)local_70); } return; }
6,671
ASTChainStore::ASTChainStore(std::__cxx11::list<PycRef<ASTNode>, std::allocator<PycRef<ASTNode>>>, PycRef<ASTNode>)
Pyarmor-Static-Unpack-1shot/ASTNode.h
ASTChainStore(list_t nodes, PycRef<ASTNode> src) : ASTNodeList(nodes, NODE_CHAINSTORE), m_src(std::move(src)) { }
O3
c
ASTChainStore::ASTChainStore(std::__cxx11::list<PycRef<ASTNode>, std::allocator<PycRef<ASTNode>>>, PycRef<ASTNode>): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x18, %rsp movq %rdx, %rbx movq %rdi, %r14 leaq -0x30(%rbp), %r15 movq %r15, %rdi callq 0x28b0a movabsq $0x2100000000, %rax # imm = 0x2100000000 movq %rax, 0x8(%r14) movb $0x0, 0x10(%r14) leaq 0x207eb(%rip), %rax # 0x49be0 movq %rax, (%r14) leaq 0x18(%r14), %rax movq (%r15), %rdx movq %rdx, 0x18(%r14) movq 0x8(%r15), %rcx movq %rcx, 0x20(%r14) movq 0x10(%r15), %rsi movq %rsi, 0x28(%r14) cmpq %r15, %rdx je 0x29434 movq %rax, (%rcx) movq (%rax), %rcx movq %rax, 0x8(%rcx) movq %r15, -0x28(%rbp) movq %r15, -0x30(%rbp) movq $0x0, -0x20(%rbp) jmp 0x2943c movq %rax, 0x20(%r14) movq %rax, 0x18(%r14) leaq -0x30(%rbp), %rdi callq 0x2b2ec leaq 0x20744(%rip), %rax # 0x49b90 movq %rax, (%r14) movq (%rbx), %rax movq %rax, 0x30(%r14) movq $0x0, (%rbx) addq $0x18, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
_ZN13ASTChainStoreC2ENSt7__cxx114listI6PycRefI7ASTNodeESaIS4_EEES4_: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 18h mov rbx, rdx mov r14, rdi lea r15, [rbp+var_30] mov rdi, r15 call _ZNSt7__cxx114listI6PycRefI7ASTNodeESaIS3_EEC2ERKS5_; std::list<PycRef<ASTNode>>::list(std::list<PycRef<ASTNode>> const&) mov rax, 2100000000h mov [r14+8], rax mov byte ptr [r14+10h], 0 lea rax, off_49BE0 mov [r14], rax lea rax, [r14+18h] mov rdx, [r15] mov [r14+18h], rdx mov rcx, [r15+8] mov [r14+20h], rcx mov rsi, [r15+10h] mov [r14+28h], rsi cmp rdx, r15 jz short loc_29434 mov [rcx], rax mov rcx, [rax] mov [rcx+8], rax mov [rbp+var_28], r15 mov [rbp+var_30], r15 mov [rbp+var_20], 0 jmp short loc_2943C loc_29434: mov [r14+20h], rax mov [r14+18h], rax loc_2943C: lea rdi, [rbp+var_30] call _ZNSt7__cxx1110_List_baseI6PycRefI7ASTNodeESaIS3_EE8_M_clearEv; std::_List_base<PycRef<ASTNode>>::_M_clear(void) lea rax, off_49B90 mov [r14], rax mov rax, [rbx] mov [r14+30h], rax mov qword ptr [rbx], 0 add rsp, 18h pop rbx pop r14 pop r15 pop rbp retn
long long ASTChainStore::ASTChainStore(long long a1, _QWORD **a2, long long *a3) { long long v4; // rax _QWORD *v5; // rdx _QWORD *v6; // rcx long long result; // rax _QWORD *v8; // [rsp+0h] [rbp-30h] BYREF _QWORD *v9; // [rsp+8h] [rbp-28h] long long v10; // [rsp+10h] [rbp-20h] std::list<PycRef<ASTNode>>::list(&v8, a2); *(_QWORD *)(a1 + 8) = 0x2100000000LL; *(_BYTE *)(a1 + 16) = 0; *(_QWORD *)a1 = off_49BE0; v4 = a1 + 24; v5 = v8; *(_QWORD *)(a1 + 24) = v8; v6 = v9; *(_QWORD *)(a1 + 32) = v9; *(_QWORD *)(a1 + 40) = v10; if ( v5 == &v8 ) { *(_QWORD *)(a1 + 32) = v4; *(_QWORD *)(a1 + 24) = v4; } else { *v6 = v4; *(_QWORD *)(*(_QWORD *)v4 + 8LL) = v4; v9 = &v8; v8 = &v8; v10 = 0LL; } std::_List_base<PycRef<ASTNode>>::_M_clear(&v8); *(_QWORD *)a1 = off_49B90; result = *a3; *(_QWORD *)(a1 + 48) = *a3; *a3 = 0LL; return result; }
ASTChainStore: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x18 MOV RBX,RDX MOV R14,RDI LEA R15,[RBP + -0x30] MOV RDI,R15 CALL 0x00128b0a MOV RAX,0x2100000000 MOV qword ptr [R14 + 0x8],RAX MOV byte ptr [R14 + 0x10],0x0 LEA RAX,[0x149be0] MOV qword ptr [R14],RAX LEA RAX,[R14 + 0x18] MOV RDX,qword ptr [R15] MOV qword ptr [R14 + 0x18],RDX MOV RCX,qword ptr [R15 + 0x8] MOV qword ptr [R14 + 0x20],RCX MOV RSI,qword ptr [R15 + 0x10] MOV qword ptr [R14 + 0x28],RSI CMP RDX,R15 JZ 0x00129434 MOV qword ptr [RCX],RAX MOV RCX,qword ptr [RAX] MOV qword ptr [RCX + 0x8],RAX MOV qword ptr [RBP + -0x28],R15 MOV qword ptr [RBP + -0x30],R15 MOV qword ptr [RBP + -0x20],0x0 JMP 0x0012943c LAB_00129434: MOV qword ptr [R14 + 0x20],RAX MOV qword ptr [R14 + 0x18],RAX LAB_0012943c: LEA RDI,[RBP + -0x30] CALL 0x0012b2ec LEA RAX,[0x149b90] MOV qword ptr [R14],RAX MOV RAX,qword ptr [RBX] MOV qword ptr [R14 + 0x30],RAX MOV qword ptr [RBX],0x0 ADD RSP,0x18 POP RBX POP R14 POP R15 POP RBP RET
/* ASTChainStore::ASTChainStore(std::__cxx11::list<PycRef<ASTNode>, std::allocator<PycRef<ASTNode> > >, PycRef<ASTNode>) */ void __thiscall ASTChainStore::ASTChainStore(ASTChainStore *this,list *param_2,int8 *param_3) { ASTChainStore *pAVar1; list<PycRef<ASTNode>,std::allocator<PycRef<ASTNode>>> *local_38; list<PycRef<ASTNode>,std::allocator<PycRef<ASTNode>>> *local_30; int8 local_28; std::__cxx11::list<PycRef<ASTNode>,std::allocator<PycRef<ASTNode>>>::list ((list<PycRef<ASTNode>,std::allocator<PycRef<ASTNode>>> *)&local_38,param_2); *(int8 *)(this + 8) = 0x2100000000; this[0x10] = (ASTChainStore)0x0; *(int ***)this = &PTR__ASTNodeList_00149be0; pAVar1 = this + 0x18; *(list<PycRef<ASTNode>,std::allocator<PycRef<ASTNode>>> **)(this + 0x18) = local_38; *(list<PycRef<ASTNode>,std::allocator<PycRef<ASTNode>>> **)(this + 0x20) = local_30; *(int8 *)(this + 0x28) = local_28; if (local_38 == (list<PycRef<ASTNode>,std::allocator<PycRef<ASTNode>>> *)&local_38) { *(ASTChainStore **)(this + 0x20) = pAVar1; *(ASTChainStore **)(this + 0x18) = pAVar1; } else { *(ASTChainStore **)local_30 = pAVar1; *(ASTChainStore **)(*(long *)pAVar1 + 8) = pAVar1; local_28 = 0; local_38 = (list<PycRef<ASTNode>,std::allocator<PycRef<ASTNode>>> *)&local_38; local_30 = (list<PycRef<ASTNode>,std::allocator<PycRef<ASTNode>>> *)&local_38; } std::__cxx11::_List_base<PycRef<ASTNode>,std::allocator<PycRef<ASTNode>>>::_M_clear ((_List_base<PycRef<ASTNode>,std::allocator<PycRef<ASTNode>>> *)&local_38); *(int ***)this = &PTR__ASTChainStore_00149b90; *(int8 *)(this + 0x30) = *param_3; *param_3 = 0; return; }
6,672
ma_hashtbl_search
eloqsql/libmariadb/libmariadb/ma_hashtbl.c
void* ma_hashtbl_search(MA_HASHTBL *hash,const uchar *key,uint length) { MA_HASHTBL_LINK *pos; uint flag,idx; flag=1; if (hash->records) { idx=hash_mask((*hash->calc_hashnr)(key,length ? length : hash->key_length), hash->blength,hash->records); do { pos= dynamic_element(&hash->array,idx,MA_HASHTBL_LINK*); if (!hashcmp(hash,pos,key,length)) { hash->current_record= idx; return (pos->data); } if (flag) { flag=0; /* Reset flag */ if (hash_rec_mask(hash,pos,hash->blength,hash->records) != idx) break; /* Wrong link */ } } while ((idx=pos->next) != NO_RECORD); } hash->current_record= NO_RECORD; return(0); }
O3
c
ma_hashtbl_search: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, -0x30(%rbp) movq %rdi, %rbx cmpl $0x0, 0x8(%rdi) je 0x747ec movl %edx, %r14d movq 0x40(%rbx), %rax movl %edx, %esi testl %edx, %edx jne 0x74777 movl 0x4(%rbx), %esi movq -0x30(%rbp), %rdi callq *%rax movl 0xc(%rbx), %r12d leal -0x1(%r12), %ecx andl %eax, %ecx shrl %r12d decl %r12d andl %eax, %r12d cmpl 0x8(%rbx), %ecx cmovbl %ecx, %r12d xorl %r15d, %r15d movq 0x18(%rbx), %rax movl %r12d, %ecx shlq $0x4, %rcx leaq (%rax,%rcx), %r13 movq 0x8(%rax,%rcx), %rsi movq %rbx, %rdi movq -0x30(%rbp), %rdx movl %r14d, %ecx callq 0x7480e testl %eax, %eax je 0x747f7 testb $0x1, %r15b jne 0x747df movl 0x8(%rbx), %ecx movl 0xc(%rbx), %edx movq 0x8(%r13), %rsi movq %rbx, %rdi callq 0x74884 cmpl %r12d, %eax jne 0x747ec movl (%r13), %r12d movb $0x1, %r15b cmpl $-0x1, %r12d jne 0x7479b movl $0xffffffff, 0x10(%rbx) # imm = 0xFFFFFFFF xorl %eax, %eax jmp 0x747ff movl %r12d, 0x10(%rbx) movq 0x8(%r13), %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ma_hashtbl_search: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov [rbp+var_30], rsi mov rbx, rdi cmp dword ptr [rdi+8], 0 jz loc_747EC mov r14d, edx mov rax, [rbx+40h] mov esi, edx test edx, edx jnz short loc_74777 mov esi, [rbx+4] loc_74777: mov rdi, [rbp+var_30] call rax mov r12d, [rbx+0Ch] lea ecx, [r12-1] and ecx, eax shr r12d, 1 dec r12d and r12d, eax cmp ecx, [rbx+8] cmovb r12d, ecx xor r15d, r15d loc_7479B: mov rax, [rbx+18h] mov ecx, r12d shl rcx, 4 lea r13, [rax+rcx] mov rsi, [rax+rcx+8] mov rdi, rbx mov rdx, [rbp+var_30] mov ecx, r14d call hashcmp test eax, eax jz short loc_747F7 test r15b, 1 jnz short loc_747DF mov ecx, [rbx+8] mov edx, [rbx+0Ch] mov rsi, [r13+8] mov rdi, rbx call hash_rec_mask cmp eax, r12d jnz short loc_747EC loc_747DF: mov r12d, [r13+0] mov r15b, 1 cmp r12d, 0FFFFFFFFh jnz short loc_7479B loc_747EC: mov dword ptr [rbx+10h], 0FFFFFFFFh xor eax, eax jmp short loc_747FF loc_747F7: mov [rbx+10h], r12d mov rax, [r13+8] loc_747FF: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ma_hashtbl_search(long long a1, long long a2, unsigned int a3) { long long v4; // rsi int v5; // eax unsigned int v6; // r12d unsigned int v7; // ecx unsigned int v8; // r12d char v9; // r15 long long v10; // r13 if ( *(_DWORD *)(a1 + 8) ) { v4 = a3; if ( !a3 ) v4 = *(unsigned int *)(a1 + 4); v5 = (*(long long ( **)(long long, long long))(a1 + 64))(a2, v4); v6 = *(_DWORD *)(a1 + 12); v7 = v5 & (v6 - 1); v8 = v5 & ((v6 >> 1) - 1); if ( v7 < *(_DWORD *)(a1 + 8) ) v8 = v7; v9 = 0; while ( 1 ) { v10 = *(_QWORD *)(a1 + 24) + 16LL * v8; if ( !(unsigned int)hashcmp(a1, *(_QWORD *)(v10 + 8), a2, a3) ) break; if ( (v9 & 1) != 0 || (unsigned int)hash_rec_mask(a1, *(_QWORD *)(v10 + 8), *(unsigned int *)(a1 + 12), *(unsigned int *)(a1 + 8)) == v8 ) { v8 = *(_DWORD *)v10; v9 = 1; if ( *(_DWORD *)v10 != -1 ) continue; } goto LABEL_11; } *(_DWORD *)(a1 + 16) = v8; return *(_QWORD *)(v10 + 8); } else { LABEL_11: *(_DWORD *)(a1 + 16) = -1; return 0LL; } }
ma_hashtbl_search: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV qword ptr [RBP + -0x30],RSI MOV RBX,RDI CMP dword ptr [RDI + 0x8],0x0 JZ 0x001747ec MOV R14D,EDX MOV RAX,qword ptr [RBX + 0x40] MOV ESI,EDX TEST EDX,EDX JNZ 0x00174777 MOV ESI,dword ptr [RBX + 0x4] LAB_00174777: MOV RDI,qword ptr [RBP + -0x30] CALL RAX MOV R12D,dword ptr [RBX + 0xc] LEA ECX,[R12 + -0x1] AND ECX,EAX SHR R12D,0x1 DEC R12D AND R12D,EAX CMP ECX,dword ptr [RBX + 0x8] CMOVC R12D,ECX XOR R15D,R15D LAB_0017479b: MOV RAX,qword ptr [RBX + 0x18] MOV ECX,R12D SHL RCX,0x4 LEA R13,[RAX + RCX*0x1] MOV RSI,qword ptr [RAX + RCX*0x1 + 0x8] MOV RDI,RBX MOV RDX,qword ptr [RBP + -0x30] MOV ECX,R14D CALL 0x0017480e TEST EAX,EAX JZ 0x001747f7 TEST R15B,0x1 JNZ 0x001747df MOV ECX,dword ptr [RBX + 0x8] MOV EDX,dword ptr [RBX + 0xc] MOV RSI,qword ptr [R13 + 0x8] MOV RDI,RBX CALL 0x00174884 CMP EAX,R12D JNZ 0x001747ec LAB_001747df: MOV R12D,dword ptr [R13] MOV R15B,0x1 CMP R12D,-0x1 JNZ 0x0017479b LAB_001747ec: MOV dword ptr [RBX + 0x10],0xffffffff XOR EAX,EAX JMP 0x001747ff LAB_001747f7: MOV dword ptr [RBX + 0x10],R12D MOV RAX,qword ptr [R13 + 0x8] LAB_001747ff: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 ma_hashtbl_search(long param_1,int8 param_2,int param_3) { uint *puVar1; uint uVar2; int iVar3; uint uVar4; bool bVar5; if (*(int *)(param_1 + 8) != 0) { iVar3 = param_3; if (param_3 == 0) { iVar3 = *(int *)(param_1 + 4); } uVar2 = (**(code **)(param_1 + 0x40))(param_2,iVar3); uVar4 = *(uint *)(param_1 + 0xc) - 1 & uVar2; uVar2 = (*(uint *)(param_1 + 0xc) >> 1) - 1 & uVar2; if (uVar4 < *(uint *)(param_1 + 8)) { uVar2 = uVar4; } bVar5 = false; do { puVar1 = (uint *)(*(long *)(param_1 + 0x18) + (ulong)uVar2 * 0x10); iVar3 = hashcmp(param_1,*(int8 *)(*(long *)(param_1 + 0x18) + 8 + (ulong)uVar2 * 0x10), param_2,param_3); if (iVar3 == 0) { *(uint *)(param_1 + 0x10) = uVar2; return *(int8 *)(puVar1 + 2); } if ((!bVar5) && (uVar4 = hash_rec_mask(param_1,*(int8 *)(puVar1 + 2),*(int4 *)(param_1 + 0xc), *(int4 *)(param_1 + 8)), uVar4 != uVar2)) break; uVar2 = *puVar1; bVar5 = true; } while (uVar2 != 0xffffffff); } *(int4 *)(param_1 + 0x10) = 0xffffffff; return 0; }
6,673
pfs_set_transaction_xid_v1
eloqsql/storage/perfschema/pfs.cc
void pfs_set_transaction_xid_v1(PSI_transaction_locker *locker, const void *xid, int xa_state) { PSI_transaction_locker_state *state= reinterpret_cast<PSI_transaction_locker_state*> (locker); assert(state != NULL); if (state->m_flags & STATE_FLAG_EVENT) { PFS_events_transactions *pfs= reinterpret_cast<PFS_events_transactions*> (state->m_transaction); assert(pfs != NULL); assert(xid != NULL); pfs->m_xid= *(PSI_xid *)xid; pfs->m_xa_state= (enum_xa_transaction_state)xa_state; pfs->m_xa= true; } return; }
O0
cpp
pfs_set_transaction_xid_v1: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movl (%rax), %eax andl $0x4, %eax cmpl $0x0, %eax je 0x54ae3 movq -0x20(%rbp), %rax movq 0x28(%rax), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rsi movq -0x28(%rbp), %rdi addq $0x80, %rdi movl $0x98, %edx callq 0x26280 movl -0x14(%rbp), %ecx movq -0x28(%rbp), %rax movl %ecx, 0x118(%rax) movq -0x28(%rbp), %rax movb $0x1, 0x78(%rax) addq $0x30, %rsp popq %rbp retq nopl (%rax)
pfs_set_transaction_xid_v1: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov rax, [rbp+var_8] mov [rbp+var_20], rax mov rax, [rbp+var_20] mov eax, [rax] and eax, 4 cmp eax, 0 jz short loc_54AE3 mov rax, [rbp+var_20] mov rax, [rax+28h] mov [rbp+var_28], rax mov rsi, [rbp+var_10] mov rdi, [rbp+var_28] add rdi, 80h mov edx, 98h call _memcpy mov ecx, [rbp+var_14] mov rax, [rbp+var_28] mov [rax+118h], ecx mov rax, [rbp+var_28] mov byte ptr [rax+78h], 1 loc_54AE3: add rsp, 30h pop rbp retn
long long pfs_set_transaction_xid_v1(long long a1, long long a2, int a3) { long long result; // rax long long v4; // [rsp+8h] [rbp-28h] result = *(_DWORD *)a1 & 4; if ( (_DWORD)result ) { v4 = *(_QWORD *)(a1 + 40); memcpy(v4 + 128, a2, 152LL); *(_DWORD *)(v4 + 280) = a3; result = v4; *(_BYTE *)(v4 + 120) = 1; } return result; }
pfs_set_transaction_xid_v1: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX] AND EAX,0x4 CMP EAX,0x0 JZ 0x00154ae3 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x28],RAX MOV RSI,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x80 MOV EDX,0x98 CALL 0x00126280 MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x118],ECX MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x78],0x1 LAB_00154ae3: ADD RSP,0x30 POP RBP RET
void pfs_set_transaction_xid_v1(uint *param_1,void *param_2,int4 param_3) { long lVar1; if ((*param_1 & 4) != 0) { lVar1 = *(long *)(param_1 + 10); memcpy((void *)(lVar1 + 0x80),param_2,0x98); *(int4 *)(lVar1 + 0x118) = param_3; *(int1 *)(lVar1 + 0x78) = 1; } return; }
6,674
minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
Value do_evaluate(const std::shared_ptr<Context> & context) const override { auto result = Value::array(); for (const auto& e : elements) { if (!e) throw std::runtime_error("Array element is null"); result.push_back(e->evaluate(context)); } return result; }
O3
cpp
minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx xorps %xmm0, %xmm0 movq %rsp, %rsi movaps %xmm0, (%rsi) movq $0x0, 0x10(%rsi) callq 0x509d8 movq %rsp, %rdi callq 0x501c2 movq 0x20(%r15), %r13 movq 0x28(%r15), %rbp cmpq %rbp, %r13 je 0x508d5 leaq 0x58(%rsp), %r15 leaq 0x18(%rsp), %r12 movq (%r13), %rsi testq %rsi, %rsi je 0x508e7 movq %r12, %rdi movq %r14, %rdx callq 0x3e93e movq %rbx, %rdi movq %r12, %rsi callq 0x50a90 movq %r15, %rdi xorl %esi, %esi callq 0x3ecbc movq %r15, %rdi callq 0x4b8aa movq 0x50(%rsp), %rdi testq %rdi, %rdi je 0x50874 callq 0x30ed6 movq 0x40(%rsp), %rdi testq %rdi, %rdi je 0x50883 callq 0x30ed6 movq 0x30(%rsp), %rdi testq %rdi, %rdi je 0x50892 callq 0x30ed6 movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x508c8 movq 0x8d6f5(%rip), %rax # 0xddf98 cmpb $0x0, (%rax) je 0x508b3 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x508bd movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x508c8 movq (%rdi), %rax callq *0x18(%rax) addq $0x10, %r13 cmpq %rbp, %r13 jne 0x50830 movq %rbx, %rax addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x18350 movq %rax, %r15 leaq 0x5b708(%rip), %rsi # 0xac003 movq %rax, %rdi callq 0x18260 movq 0x8d6e6(%rip), %rsi # 0xddff0 movq 0x8d65f(%rip), %rdx # 0xddf70 movq %r15, %rdi callq 0x18b50 movq %rax, %r14 movq %rsp, %rdi callq 0x501c2 jmp 0x5094f jmp 0x50935 movq %rax, %r14 movq %r15, %rdi callq 0x184f0 jmp 0x50947 movq %rax, %r14 jmp 0x50947 movq %rax, %r14 leaq 0x18(%rsp), %rdi callq 0x3ec30 movq %rbx, %rdi callq 0x3ec30 movq %r14, %rdi callq 0x18bc0 nop
_ZNK5minja9ArrayExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r14, rdx mov r15, rsi mov rbx, rdi xorps xmm0, xmm0 mov rsi, rsp movaps xmmword ptr [rsi], xmm0 mov qword ptr [rsi+10h], 0 call _ZN5minja5Value5arrayESt6vectorIS0_SaIS0_EE; minja::Value::array(std::vector<minja::Value>) mov rdi, rsp call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() mov r13, [r15+20h] mov rbp, [r15+28h] cmp r13, rbp jz loc_508D5 lea r15, [rsp+98h+var_40] lea r12, [rsp+98h+var_80] loc_50830: mov rsi, [r13+0] test rsi, rsi jz loc_508E7 mov rdi, r12 mov rdx, r14 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov rdi, rbx; this mov rsi, r12; minja::Value * call _ZN5minja5Value9push_backERKS0_; minja::Value::push_back(minja::Value const&) mov rdi, r15 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rsp+98h+var_48] test rdi, rdi jz short loc_50874 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_50874: mov rdi, [rsp+98h+var_58] test rdi, rdi jz short loc_50883 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_50883: mov rdi, [rsp+98h+var_68] test rdi, rdi jz short loc_50892 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_50892: mov rdi, [rsp+98h+var_78] test rdi, rdi jz short loc_508C8 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_508B3 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_508BD loc_508B3: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_508BD: cmp eax, 1 jnz short loc_508C8 mov rax, [rdi] call qword ptr [rax+18h] loc_508C8: add r13, 10h cmp r13, rbp jnz loc_50830 loc_508D5: mov rax, rbx add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_508E7: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aArrayElementIs; "Array element is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r15; void * call ___cxa_throw mov r14, rax mov rdi, rsp call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() jmp short loc_5094F jmp short loc_50935 mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_50947 loc_50935: mov r14, rax jmp short loc_50947 mov r14, rax lea rdi, [rsp+98h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_50947: mov rdi, rbx; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_5094F: mov rdi, r14 call __Unwind_Resume
minja::Value * minja::ArrayExpr::do_evaluate(minja::Value *this, long long a2) { void (****v3)(void); // r13 void (****i)(void); // rbp long long v5; // rdi signed __int32 v6; // eax std::runtime_error *exception; // r15 __int128 v9; // [rsp+0h] [rbp-98h] BYREF long long v10; // [rsp+10h] [rbp-88h] _BYTE v11[8]; // [rsp+18h] [rbp-80h] BYREF long long v12; // [rsp+20h] [rbp-78h] volatile signed __int32 *v13; // [rsp+30h] [rbp-68h] volatile signed __int32 *v14; // [rsp+40h] [rbp-58h] volatile signed __int32 *v15; // [rsp+50h] [rbp-48h] void **v16[8]; // [rsp+58h] [rbp-40h] BYREF v9 = 0LL; v10 = 0LL; ((void ( *)(minja::Value *, __int128 *))minja::Value::array)(this, &v9); std::vector<minja::Value>::~vector(&v9); v3 = *(void (*****)(void))(a2 + 32); for ( i = *(void (*****)(void))(a2 + 40); v3 != i; v3 += 2 ) { if ( !*v3 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Array element is null"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)v11, *v3); minja::Value::push_back(this, (const minja::Value *)v11); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v16); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v16); if ( v15 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v15); if ( v14 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14); if ( v13 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v13); v5 = v12; if ( v12 ) { if ( _libc_single_threaded ) { v6 = *(_DWORD *)(v12 + 12); *(_DWORD *)(v12 + 12) = v6 - 1; } else { v6 = _InterlockedExchangeAdd((volatile signed __int32 *)(v12 + 12), 0xFFFFFFFF); } if ( v6 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v5 + 24LL))(v5, 0LL); } } return this; }
do_evaluate: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R14,RDX MOV R15,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOV RSI,RSP MOVAPS xmmword ptr [RSI],XMM0 MOV qword ptr [RSI + 0x10],0x0 LAB_00150808: CALL 0x001509d8 MOV RDI,RSP CALL 0x001501c2 MOV R13,qword ptr [R15 + 0x20] MOV RBP,qword ptr [R15 + 0x28] CMP R13,RBP JZ 0x001508d5 LEA R15,[RSP + 0x58] LEA R12,[RSP + 0x18] LAB_00150830: MOV RSI,qword ptr [R13] TEST RSI,RSI JZ 0x001508e7 LAB_0015083d: MOV RDI,R12 MOV RDX,R14 CALL 0x0013e93e LAB_00150848: MOV RDI,RBX MOV RSI,R12 CALL 0x00150a90 LAB_00150853: MOV RDI,R15 XOR ESI,ESI CALL 0x0013ecbc MOV RDI,R15 CALL 0x0014b8aa MOV RDI,qword ptr [RSP + 0x50] TEST RDI,RDI JZ 0x00150874 CALL 0x00130ed6 LAB_00150874: MOV RDI,qword ptr [RSP + 0x40] TEST RDI,RDI JZ 0x00150883 CALL 0x00130ed6 LAB_00150883: MOV RDI,qword ptr [RSP + 0x30] TEST RDI,RDI JZ 0x00150892 CALL 0x00130ed6 LAB_00150892: MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x001508c8 MOV RAX,qword ptr [0x001ddf98] CMP byte ptr [RAX],0x0 JZ 0x001508b3 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001508bd LAB_001508b3: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001508bd: CMP EAX,0x1 JNZ 0x001508c8 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001508c8: ADD R13,0x10 CMP R13,RBP JNZ 0x00150830 LAB_001508d5: MOV RAX,RBX ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001508e7: MOV EDI,0x10 CALL 0x00118350 MOV R15,RAX LAB_001508f4: LEA RSI,[0x1ac003] MOV RDI,RAX CALL 0x00118260 LAB_00150903: MOV RSI,qword ptr [0x001ddff0] MOV RDX,qword ptr [0x001ddf70] MOV RDI,R15 CALL 0x00118b50
/* minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */ ArrayExpr * __thiscall minja::ArrayExpr::do_evaluate(ArrayExpr *this,shared_ptr *param_1) { int *piVar1; int8 *puVar2; int iVar3; runtime_error *this_00; int8 *puVar4; int8 local_98; int8 uStack_90; int8 local_88; Expression 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]; local_98 = 0; uStack_90 = 0; local_88 = 0; /* try { // try from 00150808 to 0015080c has its CatchHandler @ 00150919 */ Value::array(); std::vector<minja::Value,std::allocator<minja::Value>>::~vector ((vector<minja::Value,std::allocator<minja::Value>> *)&local_98); puVar4 = *(int8 **)(param_1 + 0x20); puVar2 = *(int8 **)(param_1 + 0x28); if (puVar4 != puVar2) { do { if ((shared_ptr *)*puVar4 == (shared_ptr *)0x0) { this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001508f4 to 00150902 has its CatchHandler @ 00150928 */ std::runtime_error::runtime_error(this_00,"Array element is null"); /* try { // try from 00150903 to 00150918 has its CatchHandler @ 00150926 */ /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_001ddff0,PTR__runtime_error_001ddf70); } /* try { // try from 0015083d to 00150847 has its CatchHandler @ 00150935 */ Expression::evaluate(local_80,(shared_ptr *)*puVar4); /* try { // try from 00150848 to 00150852 has its CatchHandler @ 0015093a */ Value::push_back((Value *)this,(Value *)local_80); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_001ddf98 == '\0') { LOCK(); piVar1 = (int *)((long)local_78 + 0xc); iVar3 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar3 = *(int *)((long)local_78 + 0xc); *(int *)((long)local_78 + 0xc) = iVar3 + -1; } if (iVar3 == 1) { (**(code **)(*local_78 + 0x18))(); } } puVar4 = puVar4 + 2; } while (puVar4 != puVar2); } return this; }
6,675
my_uca_copy_page
eloqsql/strings/ctype-uca.c
static my_bool my_uca_copy_page(MY_CHARSET_LOADER *loader, const MY_UCA_WEIGHT_LEVEL *src, MY_UCA_WEIGHT_LEVEL *dst, size_t page) { uint chc, size= 256 * dst->lengths[page] * sizeof(uint16); if (!(dst->weights[page]= (uint16 *) (loader->once_alloc)(size))) return TRUE; DBUG_ASSERT(src->lengths[page] <= dst->lengths[page]); memset(dst->weights[page], 0, size); for (chc=0 ; chc < 256; chc++) { memcpy(dst->weights[page] + chc * dst->lengths[page], src->weights[page] + chc * src->lengths[page], src->lengths[page] * sizeof(uint16)); } return FALSE; }
O0
c
my_uca_copy_page: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movq -0x28(%rbp), %rcx movzbl (%rax,%rcx), %eax shll $0x8, %eax cltq shlq %rax movl %eax, -0x30(%rbp) movq -0x10(%rbp), %rax movq 0x80(%rax), %rax movl -0x30(%rbp), %ecx movl %ecx, %edi callq *%rax movq -0x20(%rbp), %rcx movq 0x10(%rcx), %rcx movq -0x28(%rbp), %rdx movq %rax, (%rcx,%rdx,8) cmpq $0x0, %rax jne 0x86084 movb $0x1, -0x1(%rbp) jmp 0x86140 jmp 0x86086 jmp 0x86088 movq -0x20(%rbp), %rax movq 0x10(%rax), %rax movq -0x28(%rbp), %rcx movq (%rax,%rcx,8), %rdi movl -0x30(%rbp), %eax movl %eax, %edx xorl %esi, %esi callq 0x261c0 movl $0x0, -0x2c(%rbp) cmpl $0x100, -0x2c(%rbp) # imm = 0x100 jae 0x8613c movq -0x20(%rbp), %rax movq 0x10(%rax), %rax movq -0x28(%rbp), %rcx movq (%rax,%rcx,8), %rdi movl -0x2c(%rbp), %eax movq -0x20(%rbp), %rcx movq 0x8(%rcx), %rcx movq -0x28(%rbp), %rdx movzbl (%rcx,%rdx), %ecx imull %ecx, %eax movl %eax, %eax shlq %rax addq %rax, %rdi movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movq -0x28(%rbp), %rcx movq (%rax,%rcx,8), %rsi movl -0x2c(%rbp), %eax movq -0x18(%rbp), %rcx movq 0x8(%rcx), %rcx movq -0x28(%rbp), %rdx movzbl (%rcx,%rdx), %ecx imull %ecx, %eax movl %eax, %eax shlq %rax addq %rax, %rsi movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq -0x28(%rbp), %rcx movzbl (%rax,%rcx), %eax movl %eax, %edx shlq %rdx callq 0x26280 movl -0x2c(%rbp), %eax addl $0x1, %eax movl %eax, -0x2c(%rbp) jmp 0x860ab movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopl (%rax)
my_uca_copy_page: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] mov rax, [rax+8] mov rcx, [rbp+var_28] movzx eax, byte ptr [rax+rcx] shl eax, 8 cdqe shl rax, 1 mov [rbp+var_30], eax mov rax, [rbp+var_10] mov rax, [rax+80h] mov ecx, [rbp+var_30] mov edi, ecx call rax mov rcx, [rbp+var_20] mov rcx, [rcx+10h] mov rdx, [rbp+var_28] mov [rcx+rdx*8], rax cmp rax, 0 jnz short loc_86084 mov [rbp+var_1], 1 jmp loc_86140 loc_86084: jmp short $+2 loc_86086: jmp short $+2 loc_86088: mov rax, [rbp+var_20] mov rax, [rax+10h] mov rcx, [rbp+var_28] mov rdi, [rax+rcx*8] mov eax, [rbp+var_30] mov edx, eax xor esi, esi call _memset mov [rbp+var_2C], 0 loc_860AB: cmp [rbp+var_2C], 100h jnb loc_8613C mov rax, [rbp+var_20] mov rax, [rax+10h] mov rcx, [rbp+var_28] mov rdi, [rax+rcx*8] mov eax, [rbp+var_2C] mov rcx, [rbp+var_20] mov rcx, [rcx+8] mov rdx, [rbp+var_28] movzx ecx, byte ptr [rcx+rdx] imul eax, ecx mov eax, eax shl rax, 1 add rdi, rax mov rax, [rbp+var_18] mov rax, [rax+10h] mov rcx, [rbp+var_28] mov rsi, [rax+rcx*8] mov eax, [rbp+var_2C] mov rcx, [rbp+var_18] mov rcx, [rcx+8] mov rdx, [rbp+var_28] movzx ecx, byte ptr [rcx+rdx] imul eax, ecx mov eax, eax shl rax, 1 add rsi, rax mov rax, [rbp+var_18] mov rax, [rax+8] mov rcx, [rbp+var_28] movzx eax, byte ptr [rax+rcx] mov edx, eax shl rdx, 1 call _memcpy mov eax, [rbp+var_2C] add eax, 1 mov [rbp+var_2C], eax jmp loc_860AB loc_8613C: mov [rbp+var_1], 0 loc_86140: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char my_uca_copy_page(long long a1, long long a2, long long a3, long long a4) { long long v4; // rax unsigned int i; // [rsp+4h] [rbp-2Ch] v4 = (*(long long ( **)(_QWORD))(a1 + 128))(*(unsigned __int8 *)(*(_QWORD *)(a3 + 8) + a4) << 9); *(_QWORD *)(*(_QWORD *)(a3 + 16) + 8 * a4) = v4; if ( !v4 ) return 1; memset(*(_QWORD *)(*(_QWORD *)(a3 + 16) + 8 * a4), 0LL); for ( i = 0; i < 0x100; ++i ) memcpy( 2LL * *(unsigned __int8 *)(*(_QWORD *)(a3 + 8) + a4) * i + *(_QWORD *)(*(_QWORD *)(a3 + 16) + 8 * a4), 2LL * *(unsigned __int8 *)(*(_QWORD *)(a2 + 8) + a4) * i + *(_QWORD *)(*(_QWORD *)(a2 + 16) + 8 * a4), 2LL * *(unsigned __int8 *)(*(_QWORD *)(a2 + 8) + a4)); return 0; }
my_uca_copy_page: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX + RCX*0x1] SHL EAX,0x8 CDQE SHL RAX,0x1 MOV dword ptr [RBP + -0x30],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x80] MOV ECX,dword ptr [RBP + -0x30] MOV EDI,ECX CALL RAX MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX + 0x10] MOV RDX,qword ptr [RBP + -0x28] MOV qword ptr [RCX + RDX*0x8],RAX CMP RAX,0x0 JNZ 0x00186084 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00186140 LAB_00186084: JMP 0x00186086 LAB_00186086: JMP 0x00186088 LAB_00186088: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX + RCX*0x8] MOV EAX,dword ptr [RBP + -0x30] MOV EDX,EAX XOR ESI,ESI CALL 0x001261c0 MOV dword ptr [RBP + -0x2c],0x0 LAB_001860ab: CMP dword ptr [RBP + -0x2c],0x100 JNC 0x0018613c MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX + RCX*0x8] MOV EAX,dword ptr [RBP + -0x2c] MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX + 0x8] MOV RDX,qword ptr [RBP + -0x28] MOVZX ECX,byte ptr [RCX + RDX*0x1] IMUL EAX,ECX MOV EAX,EAX SHL RAX,0x1 ADD RDI,RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RAX + RCX*0x8] MOV EAX,dword ptr [RBP + -0x2c] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX + 0x8] MOV RDX,qword ptr [RBP + -0x28] MOVZX ECX,byte ptr [RCX + RDX*0x1] IMUL EAX,ECX MOV EAX,EAX SHL RAX,0x1 ADD RSI,RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV EDX,EAX SHL RDX,0x1 CALL 0x00126280 MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x001860ab LAB_0018613c: MOV byte ptr [RBP + -0x1],0x0 LAB_00186140: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 my_uca_copy_page(long param_1,long param_2,long param_3,long param_4) { size_t __n; long lVar1; int4 local_34; int1 local_9; __n = (long)(int)((uint)*(byte *)(*(long *)(param_3 + 8) + param_4) << 8) << 1; lVar1 = (**(code **)(param_1 + 0x80))(__n); *(long *)(*(long *)(param_3 + 0x10) + param_4 * 8) = lVar1; if (lVar1 == 0) { local_9 = 1; } else { memset(*(void **)(*(long *)(param_3 + 0x10) + param_4 * 8),0,__n); for (local_34 = 0; local_34 < 0x100; local_34 = local_34 + 1) { memcpy((void *)(*(long *)(*(long *)(param_3 + 0x10) + param_4 * 8) + (ulong)(local_34 * *(byte *)(*(long *)(param_3 + 8) + param_4)) * 2), (void *)(*(long *)(*(long *)(param_2 + 0x10) + param_4 * 8) + (ulong)(local_34 * *(byte *)(*(long *)(param_2 + 8) + param_4)) * 2), (ulong)*(byte *)(*(long *)(param_2 + 8) + param_4) << 1); } local_9 = 0; } return local_9; }
6,676
init_io_cache_ext
eloqsql/mysys/mf_iocache.c
int init_io_cache_ext(IO_CACHE *info, File file, size_t cachesize, enum cache_type type, my_off_t seek_offset, pbool use_async_io, myf cache_myflags, PSI_file_key file_key __attribute__((unused))) { size_t min_cache; my_off_t pos; my_off_t end_of_file= ~(my_off_t) 0; DBUG_ENTER("init_io_cache_ext"); DBUG_PRINT("enter",("cache:%p type: %d pos: %llu", info, (int) type, (ulonglong) seek_offset)); info->file= file; info->type= TYPE_NOT_SET; /* Don't set it until mutex are created */ info->pos_in_file= seek_offset; info->alloced_buffer = 0; info->buffer=0; info->seek_not_done= 0; info->next_file_user= NULL; if (file >= 0) { DBUG_ASSERT(!(cache_myflags & MY_ENCRYPT)); pos= mysql_file_tell(file, MYF(0)); if ((pos == (my_off_t) -1) && (my_errno == ESPIPE)) { /* This kind of object doesn't support seek() or tell(). Don't set a seek_not_done that will make us again try to seek() later and fail. Additionally, if we're supposed to start somewhere other than the the beginning of whatever this file is, then somebody made a bad assumption. */ DBUG_ASSERT(seek_offset == 0); } else info->seek_not_done= MY_TEST(seek_offset != pos); } else if (type == WRITE_CACHE && _my_b_encr_read) { cache_myflags|= MY_ENCRYPT; DBUG_ASSERT(seek_offset == 0); } info->disk_writes= 0; info->share=0; if (!cachesize && !(cachesize= my_default_record_cache_size)) DBUG_RETURN(1); /* No cache requested */ min_cache=use_async_io ? IO_SIZE*4 : IO_SIZE*2; if (type == READ_CACHE || type == SEQ_READ_APPEND) { /* Assume file isn't growing */ DBUG_ASSERT(!(cache_myflags & MY_ENCRYPT)); if (!(cache_myflags & MY_DONT_CHECK_FILESIZE)) { /* Calculate end of file to avoid allocating oversized buffers */ end_of_file= mysql_file_seek(file, 0L, MY_SEEK_END, MYF(0)); /* Need to reset seek_not_done now that we just did a seek. */ info->seek_not_done= end_of_file == seek_offset ? 0 : 1; if (end_of_file < seek_offset) end_of_file=seek_offset; /* Trim cache size if the file is very small */ if ((my_off_t) cachesize > end_of_file-seek_offset+IO_SIZE*2-1) { cachesize= (size_t) (end_of_file-seek_offset)+IO_SIZE*2-1; use_async_io=0; /* No need to use async */ } } } cache_myflags &= ~MY_DONT_CHECK_FILESIZE; if (type != READ_NET) { /* Retry allocating memory in smaller blocks until we get one */ cachesize= ((cachesize + min_cache-1) & ~(min_cache-1)); for (;;) { size_t buffer_block; /* Unset MY_WAIT_IF_FULL bit if it is set, to prevent conflict with MY_ZEROFILL. */ myf flags= (myf) (cache_myflags & ~(MY_WME | MY_WAIT_IF_FULL)); if (cachesize < min_cache) cachesize = min_cache; buffer_block= cachesize; if (type == SEQ_READ_APPEND) buffer_block *= 2; else if (cache_myflags & MY_ENCRYPT) buffer_block= 2*(buffer_block + MY_AES_BLOCK_SIZE) + sizeof(IO_CACHE_CRYPT); if (cachesize == min_cache) flags|= (myf) MY_WME; if ((info->buffer= (uchar*) my_malloc(key_memory_IO_CACHE, buffer_block, flags)) != 0) { if (type == SEQ_READ_APPEND) info->write_buffer= info->buffer + cachesize; else info->write_buffer= info->buffer; info->alloced_buffer= buffer_block; break; /* Enough memory found */ } if (cachesize == min_cache) DBUG_RETURN(2); /* Can't alloc cache */ /* Try with less memory */ cachesize= (cachesize*3/4 & ~(min_cache-1)); } } DBUG_PRINT("info",("init_io_cache_ext: cachesize = %lu", (ulong) cachesize)); info->read_length=info->buffer_length=cachesize; info->myflags=cache_myflags & ~(MY_NABP | MY_FNABP); info->request_pos= info->read_pos= info->write_pos = info->buffer; if (type == SEQ_READ_APPEND) { info->append_read_pos = info->write_pos = info->write_buffer; info->write_end = info->write_buffer + info->buffer_length; mysql_mutex_init(key_IO_CACHE_append_buffer_lock, &info->append_buffer_lock, MY_MUTEX_INIT_FAST); } #if defined(SAFE_MUTEX) else { /* Clear mutex so that safe_mutex will notice that it's not initialized */ bzero((char*) &info->append_buffer_lock, sizeof(info->append_buffer_lock)); } #endif if (type == WRITE_CACHE) info->write_end= info->buffer+info->buffer_length- (seek_offset & (IO_SIZE-1)); else info->read_end=info->buffer; /* Nothing in cache */ /* End_of_file may be changed by user later */ info->end_of_file= end_of_file; info->error=0; info->type= type; init_functions(info); DBUG_RETURN(0); }
O3
c
init_io_cache_ext: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rdx, %rbx movl %esi, %r15d movq %rdi, %r12 movq 0x10(%rbp), %r13 movl %esi, 0xd4(%rdi) xorl %eax, %eax movl %eax, 0xb0(%rdi) movq %r8, -0x48(%rbp) movq %r8, (%rdi) movq %rax, 0x100(%rdi) movq %rax, 0x20(%rdi) movl %eax, 0xe0(%rdi) movq %rax, 0xd8(%rdi) testl %esi, %esi movl %ecx, -0x2c(%rbp) js 0x94dfa movl %r9d, %r14d leaq 0x2f1275(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0xb0(%rbp), %rdi movl %r15d, %esi movl $0x9, %edx callq *0x158(%rax) testq %rax, %rax jne 0x950df movl %r15d, %edi xorl %esi, %esi callq 0xa0c04 movq %rax, %r13 cmpq $-0x1, %r13 movl %r14d, %r9d jne 0x94ddf callq 0xa1b22 movl %r14d, %r9d cmpl $0x1d, (%rax) je 0x94df0 xorl %eax, %eax cmpq -0x48(%rbp), %r13 setne %al movl %eax, 0xe0(%r12) movq 0x10(%rbp), %r13 movl -0x2c(%rbp), %r14d jmp 0x94e1b movl %ecx, %r14d leaq 0xb72d34(%rip), %rax # 0xc07b38 movq %r13, %rcx orq $0x40, %rcx cmpq $0x0, (%rax) cmoveq %r13, %rcx cmpl $0x2, %r14d cmoveq %rcx, %r13 xorl %eax, %eax movq %rax, 0xb8(%r12) movq %rax, 0x98(%r12) testq %rbx, %rbx jne 0x94e45 leaq 0x2f0ce7(%rip), %rax # 0x385b20 movq (%rax), %rbx testq %rbx, %rbx je 0x950c8 movq %r12, -0x40(%rbp) xorl %r12d, %r12d testb %r9b, %r9b setne %cl sete %dl movq $-0x1, -0x60(%rbp) cmpl $0x1, %r14d je 0x94e88 cmpl $0x3, %r14d je 0x94e88 cmpl $0x5, %r14d jne 0x94f07 movq -0x40(%rbp), %r12 movq 0x20(%r12), %rax movq $-0x1, %r15 jmp 0x94fd5 testb %r13b, %r13b movq %r13, -0x38(%rbp) js 0x94f0b movb %dl, -0x50(%rbp) movb %cl, -0x58(%rbp) leaq 0x2f1172(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0xb0(%rbp), %rdi movl %r15d, %esi movl $0x8, %edx callq *0x158(%rax) testq %rax, %rax jne 0x950fa movl %r15d, %edi xorl %esi, %esi movl $0x2, %edx xorl %ecx, %ecx callq 0xa0ba0 xorl %esi, %esi movq -0x48(%rbp), %rdx cmpq %rdx, %rax cmovbeq %rdx, %rax setne %sil movq -0x40(%rbp), %rcx movl %esi, 0xe0(%rcx) movq %rax, -0x60(%rbp) subq %rdx, %rax addq $0x1fff, %rax # imm = 0x1FFF cmpq %rax, %rbx cmovaeq %rax, %rbx movb -0x58(%rbp), %cl movb -0x50(%rbp), %dl jmp 0x94f0b movq %r13, -0x38(%rbp) xorl %eax, %eax movb %dl, %al shll $0xd, %eax orq $-0x4000, %rax # imm = 0xC000 movq %rax, -0x58(%rbp) movb %cl, %r12b shll $0xd, %r12d addq $0x2000, %r12 # imm = 0x2000 leaq (%r12,%rbx), %r13 decq %r13 movq -0x38(%rbp), %r14 andl $0xffffff4f, %r14d # imm = 0xFFFFFF4F leaq 0x10(%r14), %rax movq %rax, -0x50(%rbp) andq -0x58(%rbp), %r13 cmpq %r12, %r13 movq %r12, %rbx cmovaq %r13, %rbx cmpl $0x3, -0x2c(%rbp) jne 0x94f5e leaq (%rbx,%rbx), %r15 jmp 0x94f6f movq %rbx, %r15 testb $0x40, -0x38(%rbp) je 0x94f6f leaq 0x48(,%rbx,2), %r15 cmpq %r13, %r12 movq -0x50(%rbp), %rdx cmovbq %r14, %rdx leaq 0xb73733(%rip), %rax # 0xc086b4 movl (%rax), %edi movq %r15, %rsi callq 0x9fdb1 movq -0x40(%rbp), %rcx movq %rax, 0x20(%rcx) testq %rax, %rax jne 0x94fab cmpq %r13, %r12 jae 0x95078 leaq (%rbx,%rbx,2), %r13 shrq $0x2, %r13 jmp 0x94f44 xorl %ecx, %ecx movl -0x2c(%rbp), %r14d cmpl $0x3, %r14d cmoveq %rbx, %rcx addq %rax, %rcx movq -0x40(%rbp), %r12 movq %rcx, 0x30(%r12) movq %r15, 0x100(%r12) movq -0x38(%rbp), %r13 movq -0x60(%rbp), %r15 andl $0xffffff79, %r13d # imm = 0xFFFFFF79 movq %rbx, 0xe8(%r12) movq %rbx, 0xf0(%r12) movq %r13, 0xf8(%r12) movq %rax, 0x40(%r12) movq %rax, 0x10(%r12) movq %rax, 0x28(%r12) cmpl $0x3, %r14d jne 0x9507f movq 0x30(%r12), %rax movq %rax, 0x40(%r12) movq %rax, 0x38(%r12) addq %rax, %rbx movq %rbx, 0x48(%r12) leaq 0xb72ced(%rip), %rax # 0xc07d14 movl (%rax), %edi movq %r15, %rbx leaq 0x50(%r12), %r15 leaq 0x2f0fd8(%rip), %rax # 0x386010 movq (%rax), %rax movq %r15, %rsi callq *0x40(%rax) movq %rax, 0x90(%r12) movq %r15, 0x88(%r12) xorps %xmm0, %xmm0 movups %xmm0, 0x78(%r12) leaq 0xb739cf(%rip), %rsi # 0xc08a30 movq %r15, %rdi movq %rbx, %r15 callq 0x29340 movq 0x20(%r12), %rax movl $0x18, %ecx jmp 0x9509f movl $0x2, %eax jmp 0x950cd movl $0x18, %ecx cmpl $0x2, %r14d jne 0x9509f addq %rbx, %rax movq -0x48(%rbp), %rcx andl $0xfff, %ecx # imm = 0xFFF subq %rcx, %rax movl $0x48, %ecx movq %rax, (%r12,%rcx) movq %r15, 0x8(%r12) movl $0x0, 0xe4(%r12) movl %r14d, 0xb0(%r12) movq %r12, %rdi callq 0x95117 xorl %eax, %eax jmp 0x950cd movl $0x1, %eax addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq -0x68(%rbp), %r13 movq %rax, %rdi movl %r15d, %esi movq %r13, %rdx callq 0x2e918 movq (%r13), %r13 jmp 0x94dc9 leaq -0x68(%rbp), %rcx movq %rax, %rdi movl %r15d, %esi movq %rcx, %r15 movq %rcx, %rdx callq 0x2e970 movq (%r15), %rax jmp 0x94ed0
init_io_cache_ext: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov rbx, rdx mov r15d, esi mov r12, rdi mov r13, [rbp+arg_0] mov [rdi+0D4h], esi xor eax, eax mov [rdi+0B0h], eax mov [rbp+var_48], r8 mov [rdi], r8 mov [rdi+100h], rax mov [rdi+20h], rax mov [rdi+0E0h], eax mov [rdi+0D8h], rax test esi, esi mov [rbp+var_2C], ecx js short loc_94DFA mov r14d, r9d lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_B0] mov esi, r15d mov edx, 9 call qword ptr [rax+158h] test rax, rax jnz loc_950DF mov edi, r15d xor esi, esi call my_tell mov r13, rax loc_94DC9: cmp r13, 0FFFFFFFFFFFFFFFFh mov r9d, r14d jnz short loc_94DDF call _my_thread_var mov r9d, r14d cmp dword ptr [rax], 1Dh jz short loc_94DF0 loc_94DDF: xor eax, eax cmp r13, [rbp+var_48] setnz al mov [r12+0E0h], eax loc_94DF0: mov r13, [rbp+arg_0] mov r14d, [rbp+var_2C] jmp short loc_94E1B loc_94DFA: mov r14d, ecx lea rax, _my_b_encr_read mov rcx, r13 or rcx, 40h cmp qword ptr [rax], 0 cmovz rcx, r13 cmp r14d, 2 cmovz r13, rcx loc_94E1B: xor eax, eax mov [r12+0B8h], rax mov [r12+98h], rax test rbx, rbx jnz short loc_94E45 lea rax, my_default_record_cache_size mov rbx, [rax] test rbx, rbx jz loc_950C8 loc_94E45: mov [rbp+var_40], r12 xor r12d, r12d test r9b, r9b setnz cl setz dl mov [rbp+var_60], 0FFFFFFFFFFFFFFFFh cmp r14d, 1 jz short loc_94E88 cmp r14d, 3 jz short loc_94E88 cmp r14d, 5 jnz loc_94F07 mov r12, [rbp+var_40] mov rax, [r12+20h] mov r15, 0FFFFFFFFFFFFFFFFh jmp loc_94FD5 loc_94E88: test r13b, r13b mov [rbp+var_38], r13 js short loc_94F0B mov byte ptr [rbp+var_50], dl mov byte ptr [rbp+var_58], cl lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_B0] mov esi, r15d mov edx, 8 call qword ptr [rax+158h] test rax, rax jnz loc_950FA mov edi, r15d xor esi, esi mov edx, 2 xor ecx, ecx call my_seek loc_94ED0: xor esi, esi mov rdx, [rbp+var_48] cmp rax, rdx cmovbe rax, rdx setnz sil mov rcx, [rbp+var_40] mov [rcx+0E0h], esi mov [rbp+var_60], rax sub rax, rdx add rax, 1FFFh cmp rbx, rax cmovnb rbx, rax mov cl, byte ptr [rbp+var_58] mov dl, byte ptr [rbp+var_50] jmp short loc_94F0B loc_94F07: mov [rbp+var_38], r13 loc_94F0B: xor eax, eax mov al, dl shl eax, 0Dh or rax, 0FFFFFFFFFFFFC000h mov [rbp+var_58], rax mov r12b, cl shl r12d, 0Dh add r12, 2000h lea r13, [r12+rbx] dec r13 mov r14, [rbp+var_38] and r14d, 0FFFFFF4Fh lea rax, [r14+10h] mov [rbp+var_50], rax loc_94F44: and r13, [rbp+var_58] cmp r13, r12 mov rbx, r12 cmova rbx, r13 cmp [rbp+var_2C], 3 jnz short loc_94F5E lea r15, [rbx+rbx] jmp short loc_94F6F loc_94F5E: mov r15, rbx test byte ptr [rbp+var_38], 40h jz short loc_94F6F lea r15, ds:48h[rbx*2] loc_94F6F: cmp r12, r13 mov rdx, [rbp+var_50] cmovb rdx, r14 lea rax, key_memory_IO_CACHE mov edi, [rax] mov rsi, r15 call my_malloc mov rcx, [rbp+var_40] mov [rcx+20h], rax test rax, rax jnz short loc_94FAB cmp r12, r13 jnb loc_95078 lea r13, [rbx+rbx*2] shr r13, 2 jmp short loc_94F44 loc_94FAB: xor ecx, ecx mov r14d, [rbp+var_2C] cmp r14d, 3 cmovz rcx, rbx add rcx, rax mov r12, [rbp+var_40] mov [r12+30h], rcx mov [r12+100h], r15 mov r13, [rbp+var_38] mov r15, [rbp+var_60] loc_94FD5: and r13d, 0FFFFFF79h mov [r12+0E8h], rbx mov [r12+0F0h], rbx mov [r12+0F8h], r13 mov [r12+40h], rax mov [r12+10h], rax mov [r12+28h], rax cmp r14d, 3 jnz short loc_9507F mov rax, [r12+30h] mov [r12+40h], rax mov [r12+38h], rax add rbx, rax mov [r12+48h], rbx lea rax, key_IO_CACHE_append_buffer_lock mov edi, [rax] mov rbx, r15 lea r15, [r12+50h] lea rax, PSI_server mov rax, [rax] mov rsi, r15 call qword ptr [rax+40h] mov [r12+90h], rax mov [r12+88h], r15 xorps xmm0, xmm0 movups xmmword ptr [r12+78h], xmm0 lea rsi, my_fast_mutexattr mov rdi, r15 mov r15, rbx call _pthread_mutex_init mov rax, [r12+20h] mov ecx, 18h jmp short loc_9509F loc_95078: mov eax, 2 jmp short loc_950CD loc_9507F: mov ecx, 18h cmp r14d, 2 jnz short loc_9509F add rax, rbx mov rcx, [rbp+var_48] and ecx, 0FFFh sub rax, rcx mov ecx, 48h ; 'H' loc_9509F: mov [r12+rcx], rax mov [r12+8], r15 mov dword ptr [r12+0E4h], 0 mov [r12+0B0h], r14d mov rdi, r12 call init_functions xor eax, eax jmp short loc_950CD loc_950C8: mov eax, 1 loc_950CD: add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_950DF: lea r13, [rbp+var_68] mov rdi, rax mov esi, r15d mov rdx, r13 call init_io_cache_ext_cold_1 mov r13, [r13+0] jmp loc_94DC9 loc_950FA: lea rcx, [rbp+var_68] mov rdi, rax mov esi, r15d mov r15, rcx mov rdx, rcx call init_io_cache_ext_cold_2 mov rax, [r15] jmp loc_94ED0
long long init_io_cache_ext( long long a1, const char *a2, unsigned long long a3, int a4, unsigned long long a5, unsigned int a6, long long a7) { unsigned long long v7; // rbx unsigned int v8; // r15d long long v10; // r13 unsigned int v11; // r14d long long v12; // rax long long v13; // rdi long long v14; // rcx long long v15; // r8 long long v16; // r13 _DWORD *v17; // rax int v18; // r14d int v19; // r12d long long v20; // r12 long long v21; // rax long long v22; // r15 long long v23; // rax unsigned long long v24; // rax int v25; // esi unsigned long long v26; // rdx bool v27; // zf unsigned long long v28; // rax unsigned long long v29; // r12 unsigned long long v30; // r13 long long v31; // r14 unsigned long long v32; // r13 long long v33; // r15 long long v34; // rdx unsigned long long v35; // rcx long long v36; // rax long long v37; // rcx _BYTE v39[72]; // [rsp+0h] [rbp-B0h] BYREF unsigned long long v40; // [rsp+48h] [rbp-68h] BYREF long long v41; // [rsp+50h] [rbp-60h] unsigned long long v42; // [rsp+58h] [rbp-58h] long long v43; // [rsp+60h] [rbp-50h] unsigned long long v44; // [rsp+68h] [rbp-48h] long long v45; // [rsp+70h] [rbp-40h] long long v46; // [rsp+78h] [rbp-38h] int v47; // [rsp+84h] [rbp-2Ch] v7 = a3; v8 = (unsigned int)a2; v10 = a7; *(_DWORD *)(a1 + 212) = (_DWORD)a2; *(_DWORD *)(a1 + 176) = 0; v44 = a5; *(_QWORD *)a1 = a5; *(_QWORD *)(a1 + 256) = 0LL; *(_QWORD *)(a1 + 32) = 0LL; *(_DWORD *)(a1 + 224) = 0; *(_QWORD *)(a1 + 216) = 0LL; v47 = a4; if ( (int)a2 < 0 ) { v18 = a4; v14 = a7 | 0x40; if ( !my_b_encr_read ) v14 = a7; if ( v18 == 2 ) v10 = v14; } else { v11 = a6; v12 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v39, (unsigned int)a2, 9LL); if ( v12 ) { v13 = v12; a2 = (const char *)(unsigned int)a2; init_io_cache_ext_cold_1(v12, (unsigned int)a2, &v40); v16 = v40; } else { v13 = (unsigned int)a2; a2 = 0LL; v16 = my_tell(v8, 0LL); } LOBYTE(a6) = v11; if ( v16 != -1 || (v17 = (_DWORD *)my_thread_var(v13, a2, a3, v14, v15, v11), LOBYTE(a6) = v11, *v17 != 29) ) *(_DWORD *)(a1 + 224) = v16 != v44; v10 = a7; v18 = v47; } *(_QWORD *)(a1 + 184) = 0LL; *(_QWORD *)(a1 + 152) = 0LL; if ( !v7 ) { v7 = my_default_record_cache_size; if ( !my_default_record_cache_size ) return 1LL; } v45 = a1; v19 = 0; LOBYTE(v14) = (_BYTE)a6 != 0; LOBYTE(a3) = (_BYTE)a6 == 0; v41 = -1LL; if ( v18 == 1 || v18 == 3 ) { v46 = v10; if ( (v10 & 0x80u) == 0LL ) { LOBYTE(v43) = (_BYTE)a6 == 0; LOBYTE(v42) = (_BYTE)a6 != 0; v23 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v39, v8, 8LL); if ( v23 ) { init_io_cache_ext_cold_2(v23, v8, &v40); v24 = v40; } else { v24 = my_seek(v8, 0LL, 2LL, 0LL); } v25 = 0; v26 = v44; v27 = v24 == v44; if ( v24 <= v44 ) v24 = v44; LOBYTE(v25) = !v27; *(_DWORD *)(v45 + 224) = v25; v41 = v24; v28 = v24 - v26 + 0x1FFF; if ( v7 >= v28 ) v7 = v28; LOBYTE(v14) = v42; LOBYTE(a3) = v43; } LABEL_27: v42 = ((unsigned __int8)a3 << 13) | 0xFFFFFFFFFFFFC000LL; LOBYTE(v19) = v14; v29 = (unsigned int)(v19 << 13) + 0x2000LL; v30 = v29 + v7 - 1; v31 = (unsigned int)v46 & 0xFFFFFF4F; v43 = v31 + 16; while ( 1 ) { v32 = v42 & v30; v7 = v29; if ( v32 > v29 ) v7 = v32; if ( v47 == 3 ) { v33 = 2 * v7; } else { v33 = v7; if ( (v46 & 0x40) != 0 ) v33 = 2 * v7 + 72; } v34 = v43; if ( v29 < v32 ) v34 = v31; v21 = my_malloc(key_memory_IO_CACHE, v33, v34); *(_QWORD *)(v45 + 32) = v21; if ( v21 ) break; if ( v29 >= v32 ) return 2LL; v30 = (3 * v7) >> 2; } v35 = 0LL; v18 = v47; if ( v47 == 3 ) v35 = v7; v14 = v21 + v35; v20 = v45; *(_QWORD *)(v45 + 48) = v14; *(_QWORD *)(v20 + 256) = v33; LODWORD(v10) = v46; v22 = v41; goto LABEL_42; } if ( v18 != 5 ) { v46 = v10; goto LABEL_27; } v20 = v45; v21 = *(_QWORD *)(v45 + 32); v22 = -1LL; LABEL_42: *(_QWORD *)(v20 + 232) = v7; *(_QWORD *)(v20 + 240) = v7; *(_QWORD *)(v20 + 248) = (unsigned int)v10 & 0xFFFFFF79; *(_QWORD *)(v20 + 64) = v21; *(_QWORD *)(v20 + 16) = v21; *(_QWORD *)(v20 + 40) = v21; if ( v18 == 3 ) { v36 = *(_QWORD *)(v20 + 48); *(_QWORD *)(v20 + 64) = v36; *(_QWORD *)(v20 + 56) = v36; *(_QWORD *)(v20 + 72) = v36 + v7; *(_QWORD *)(v20 + 144) = ((long long ( *)(_QWORD, long long, unsigned long long, long long))PSI_server[8])( key_IO_CACHE_append_buffer_lock, v20 + 80, a3, v14); *(_QWORD *)(v20 + 136) = v20 + 80; *(_OWORD *)(v20 + 120) = 0LL; pthread_mutex_init(v20 + 80, &my_fast_mutexattr); v21 = *(_QWORD *)(v20 + 32); v37 = 24LL; } else { v37 = 24LL; if ( v18 == 2 ) { v21 = v7 + v21 - (v44 & 0xFFF); v37 = 72LL; } } *(_QWORD *)(v20 + v37) = v21; *(_QWORD *)(v20 + 8) = v22; *(_DWORD *)(v20 + 228) = 0; *(_DWORD *)(v20 + 176) = v18; init_functions(v20); return 0LL; }
init_io_cache_ext: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOV RBX,RDX MOV R15D,ESI MOV R12,RDI MOV R13,qword ptr [RBP + 0x10] MOV dword ptr [RDI + 0xd4],ESI XOR EAX,EAX MOV dword ptr [RDI + 0xb0],EAX MOV qword ptr [RBP + -0x48],R8 MOV qword ptr [RDI],R8 MOV qword ptr [RDI + 0x100],RAX MOV qword ptr [RDI + 0x20],RAX MOV dword ptr [RDI + 0xe0],EAX MOV qword ptr [RDI + 0xd8],RAX TEST ESI,ESI MOV dword ptr [RBP + -0x2c],ECX JS 0x00194dfa MOV R14D,R9D LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0xb0] MOV ESI,R15D MOV EDX,0x9 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x001950df MOV EDI,R15D XOR ESI,ESI CALL 0x001a0c04 MOV R13,RAX LAB_00194dc9: CMP R13,-0x1 MOV R9D,R14D JNZ 0x00194ddf CALL 0x001a1b22 MOV R9D,R14D CMP dword ptr [RAX],0x1d JZ 0x00194df0 LAB_00194ddf: XOR EAX,EAX CMP R13,qword ptr [RBP + -0x48] SETNZ AL MOV dword ptr [R12 + 0xe0],EAX LAB_00194df0: MOV R13,qword ptr [RBP + 0x10] MOV R14D,dword ptr [RBP + -0x2c] JMP 0x00194e1b LAB_00194dfa: MOV R14D,ECX LEA RAX,[0xd07b38] MOV RCX,R13 OR RCX,0x40 CMP qword ptr [RAX],0x0 CMOVZ RCX,R13 CMP R14D,0x2 CMOVZ R13,RCX LAB_00194e1b: XOR EAX,EAX MOV qword ptr [R12 + 0xb8],RAX MOV qword ptr [R12 + 0x98],RAX TEST RBX,RBX JNZ 0x00194e45 LEA RAX,[0x485b20] MOV RBX,qword ptr [RAX] TEST RBX,RBX JZ 0x001950c8 LAB_00194e45: MOV qword ptr [RBP + -0x40],R12 XOR R12D,R12D TEST R9B,R9B SETNZ CL SETZ DL MOV qword ptr [RBP + -0x60],-0x1 CMP R14D,0x1 JZ 0x00194e88 CMP R14D,0x3 JZ 0x00194e88 CMP R14D,0x5 JNZ 0x00194f07 MOV R12,qword ptr [RBP + -0x40] MOV RAX,qword ptr [R12 + 0x20] MOV R15,-0x1 JMP 0x00194fd5 LAB_00194e88: TEST R13B,R13B MOV qword ptr [RBP + -0x38],R13 JS 0x00194f0b MOV byte ptr [RBP + -0x50],DL MOV byte ptr [RBP + -0x58],CL LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0xb0] MOV ESI,R15D MOV EDX,0x8 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x001950fa MOV EDI,R15D XOR ESI,ESI MOV EDX,0x2 XOR ECX,ECX CALL 0x001a0ba0 LAB_00194ed0: XOR ESI,ESI MOV RDX,qword ptr [RBP + -0x48] CMP RAX,RDX CMOVBE RAX,RDX SETNZ SIL MOV RCX,qword ptr [RBP + -0x40] MOV dword ptr [RCX + 0xe0],ESI MOV qword ptr [RBP + -0x60],RAX SUB RAX,RDX ADD RAX,0x1fff CMP RBX,RAX CMOVNC RBX,RAX MOV CL,byte ptr [RBP + -0x58] MOV DL,byte ptr [RBP + -0x50] JMP 0x00194f0b LAB_00194f07: MOV qword ptr [RBP + -0x38],R13 LAB_00194f0b: XOR EAX,EAX MOV AL,DL SHL EAX,0xd OR RAX,-0x4000 MOV qword ptr [RBP + -0x58],RAX MOV R12B,CL SHL R12D,0xd ADD R12,0x2000 LEA R13,[R12 + RBX*0x1] DEC R13 MOV R14,qword ptr [RBP + -0x38] AND R14D,0xffffff4f LEA RAX,[R14 + 0x10] MOV qword ptr [RBP + -0x50],RAX LAB_00194f44: AND R13,qword ptr [RBP + -0x58] CMP R13,R12 MOV RBX,R12 CMOVA RBX,R13 CMP dword ptr [RBP + -0x2c],0x3 JNZ 0x00194f5e LEA R15,[RBX + RBX*0x1] JMP 0x00194f6f LAB_00194f5e: MOV R15,RBX TEST byte ptr [RBP + -0x38],0x40 JZ 0x00194f6f LEA R15,[0x48 + RBX*0x2] LAB_00194f6f: CMP R12,R13 MOV RDX,qword ptr [RBP + -0x50] CMOVC RDX,R14 LEA RAX,[0xd086b4] MOV EDI,dword ptr [RAX] MOV RSI,R15 CALL 0x0019fdb1 MOV RCX,qword ptr [RBP + -0x40] MOV qword ptr [RCX + 0x20],RAX TEST RAX,RAX JNZ 0x00194fab CMP R12,R13 JNC 0x00195078 LEA R13,[RBX + RBX*0x2] SHR R13,0x2 JMP 0x00194f44 LAB_00194fab: XOR ECX,ECX MOV R14D,dword ptr [RBP + -0x2c] CMP R14D,0x3 CMOVZ RCX,RBX ADD RCX,RAX MOV R12,qword ptr [RBP + -0x40] MOV qword ptr [R12 + 0x30],RCX MOV qword ptr [R12 + 0x100],R15 MOV R13,qword ptr [RBP + -0x38] MOV R15,qword ptr [RBP + -0x60] LAB_00194fd5: AND R13D,0xffffff79 MOV qword ptr [R12 + 0xe8],RBX MOV qword ptr [R12 + 0xf0],RBX MOV qword ptr [R12 + 0xf8],R13 MOV qword ptr [R12 + 0x40],RAX MOV qword ptr [R12 + 0x10],RAX MOV qword ptr [R12 + 0x28],RAX CMP R14D,0x3 JNZ 0x0019507f MOV RAX,qword ptr [R12 + 0x30] MOV qword ptr [R12 + 0x40],RAX MOV qword ptr [R12 + 0x38],RAX ADD RBX,RAX MOV qword ptr [R12 + 0x48],RBX LEA RAX,[0xd07d14] MOV EDI,dword ptr [RAX] MOV RBX,R15 LEA R15,[R12 + 0x50] LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] MOV RSI,R15 CALL qword ptr [RAX + 0x40] MOV qword ptr [R12 + 0x90],RAX MOV qword ptr [R12 + 0x88],R15 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R12 + 0x78],XMM0 LEA RSI,[0xd08a30] MOV RDI,R15 MOV R15,RBX CALL 0x00129340 MOV RAX,qword ptr [R12 + 0x20] MOV ECX,0x18 JMP 0x0019509f LAB_00195078: MOV EAX,0x2 JMP 0x001950cd LAB_0019507f: MOV ECX,0x18 CMP R14D,0x2 JNZ 0x0019509f ADD RAX,RBX MOV RCX,qword ptr [RBP + -0x48] AND ECX,0xfff SUB RAX,RCX MOV ECX,0x48 LAB_0019509f: MOV qword ptr [R12 + RCX*0x1],RAX MOV qword ptr [R12 + 0x8],R15 MOV dword ptr [R12 + 0xe4],0x0 MOV dword ptr [R12 + 0xb0],R14D MOV RDI,R12 CALL 0x00195117 XOR EAX,EAX JMP 0x001950cd LAB_001950c8: MOV EAX,0x1 LAB_001950cd: ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001950df: LEA R13,[RBP + -0x68] MOV RDI,RAX MOV ESI,R15D MOV RDX,R13 CALL 0x0012e918 MOV R13,qword ptr [R13] JMP 0x00194dc9 LAB_001950fa: LEA RCX,[RBP + -0x68] MOV RDI,RAX MOV ESI,R15D MOV R15,RCX MOV RDX,RCX CALL 0x0012e970 MOV RAX,qword ptr [R15] JMP 0x00194ed0
int8 init_io_cache_ext(ulong *param_1,int param_2,ulong param_3,int param_4,ulong param_5,char param_6, ulong param_7) { pthread_mutex_t *__mutex; ulong *puVar1; int iVar2; long lVar3; ulong uVar4; int *piVar5; int8 uVar6; uint uVar7; uint uVar8; ulong uVar9; ulong uVar10; ulong uVar11; ulong uVar12; bool bVar13; int1 local_b8 [72]; ulong local_70; ulong local_68; ulong local_60; ulong local_58; ulong local_50; ulong *local_48; ulong local_40; int local_34; *(int *)((long)param_1 + 0xd4) = param_2; *(int4 *)(param_1 + 0x16) = 0; *param_1 = param_5; param_1[0x20] = 0; param_1[4] = 0; *(int4 *)(param_1 + 0x1c) = 0; param_1[0x1b] = 0; local_50 = param_5; local_34 = param_4; if (param_2 < 0) { uVar4 = param_7 | 0x40; if (_my_b_encr_read == 0) { uVar4 = param_7; } if (param_4 == 2) { param_7 = uVar4; } } else { lVar3 = (**(code **)(PSI_server + 0x158))(local_b8,param_2,9); if (lVar3 == 0) { uVar4 = my_tell(param_2,0); } else { init_io_cache_ext_cold_1(lVar3,param_2,&local_70); uVar4 = local_70; } if ((uVar4 != 0xffffffffffffffff) || (piVar5 = (int *)_my_thread_var(), *piVar5 != 0x1d)) { *(uint *)(param_1 + 0x1c) = (uint)(uVar4 != local_50); } } param_1[0x17] = 0; param_1[0x13] = 0; if ((param_3 == 0) && (param_3 = my_default_record_cache_size, my_default_record_cache_size == 0)) { uVar6 = 1; } else { bVar13 = param_6 == '\0'; uVar7 = (uint)!bVar13; uVar8 = (uint)bVar13; local_68 = 0xffffffffffffffff; local_48 = param_1; if ((local_34 == 1) || (local_34 == 3)) { uVar4 = param_7; if (-1 < (char)param_7) { local_58 = CONCAT71(local_58._1_7_,bVar13); local_60 = CONCAT71(local_60._1_7_,!bVar13); local_40 = param_7; lVar3 = (**(code **)(PSI_server + 0x158))(local_b8,param_2,8); if (lVar3 == 0) { local_70 = my_seek(param_2,0,2,0); } else { init_io_cache_ext_cold_2(lVar3,param_2,&local_70); } local_68 = local_70; if (local_70 <= local_50) { local_68 = local_50; } *(uint *)(local_48 + 0x1c) = (uint)(local_70 != local_50); uVar4 = (local_68 - local_50) + 0x1fff; if (uVar4 <= param_3) { param_3 = uVar4; } uVar7 = (uint)local_60 & 0xff; uVar8 = (uint)local_58 & 0xff; uVar4 = local_40; } } else { uVar4 = param_7; if (local_34 == 5) { uVar4 = param_1[4]; LAB_00194fd5: iVar2 = local_34; puVar1 = local_48; uVar9 = local_68; local_48[0x1d] = param_3; local_48[0x1e] = param_3; local_48[0x1f] = (ulong)((uint)param_7 & 0xffffff79); local_48[8] = uVar4; local_48[2] = uVar4; local_48[5] = uVar4; if (local_34 == 3) { uVar4 = local_48[6]; local_48[8] = uVar4; local_48[7] = uVar4; local_48[9] = param_3 + uVar4; __mutex = (pthread_mutex_t *)(local_48 + 10); uVar4 = (**(code **)(PSI_server + 0x40))(key_IO_CACHE_append_buffer_lock,__mutex); puVar1[0x12] = uVar4; puVar1[0x11] = (ulong)__mutex; puVar1[0xf] = 0; puVar1[0x10] = 0; pthread_mutex_init(__mutex,(pthread_mutexattr_t *)&my_fast_mutexattr); uVar4 = puVar1[4]; lVar3 = 0x18; } else { lVar3 = 0x18; if (local_34 == 2) { uVar4 = (uVar4 + param_3) - (ulong)((uint)local_50 & 0xfff); lVar3 = 0x48; } } *(ulong *)((long)puVar1 + lVar3) = uVar4; puVar1[1] = uVar9; *(int4 *)((long)puVar1 + 0xe4) = 0; *(int *)(puVar1 + 0x16) = iVar2; init_functions(puVar1); return 0; } } local_40 = uVar4; local_60 = (ulong)(uVar8 << 0xd) | 0xffffffffffffc000; uVar9 = (ulong)(uVar7 << 0xd) + 0x2000; uVar10 = (uVar9 + param_3) - 1; uVar11 = (ulong)((uint)local_40 & 0xffffff4f); local_58 = uVar11 + 0x10; while( true ) { uVar10 = uVar10 & local_60; param_3 = uVar9; if (uVar9 < uVar10) { param_3 = uVar10; } if (local_34 == 3) { uVar12 = param_3 * 2; } else { uVar12 = param_3; if ((local_40 & 0x40) != 0) { uVar12 = param_3 * 2 + 0x48; } } uVar4 = local_58; if (uVar9 < uVar10) { uVar4 = uVar11; } uVar4 = my_malloc(key_memory_IO_CACHE,uVar12,uVar4); local_48[4] = uVar4; if (uVar4 != 0) { uVar9 = 0; if (local_34 == 3) { uVar9 = param_3; } local_48[6] = uVar9 + uVar4; local_48[0x20] = uVar12; param_7 = local_40; goto LAB_00194fd5; } if (uVar10 <= uVar9) break; uVar10 = param_3 * 3 >> 2; } uVar6 = 2; } return uVar6; }
6,677
ma_check_unique
eloqsql/storage/maria/ma_unique.c
my_bool _ma_check_unique(MARIA_HA *info, MARIA_UNIQUEDEF *def, const uchar *record, ha_checksum unique_hash, my_off_t disk_pos) { my_off_t lastpos=info->cur_row.lastpos; MARIA_KEYDEF *keyinfo= &info->s->keyinfo[def->key]; uchar *key_buff= info->lastkey_buff2; MARIA_KEY key; int error= 0; DBUG_ENTER("_ma_check_unique"); DBUG_PRINT("enter",("unique_hash: %lu", (ulong) unique_hash)); /* We need to store the hash value as a key in the record, breaking const */ maria_unique_store(record+keyinfo->seg->start, unique_hash); /* Can't be spatial so it's ok to call _ma_make_key directly here */ _ma_make_key(info, &key, def->key, key_buff, record, 0, 0); /* The above changed info->lastkey_buff2. Inform maria_rnext_same(). */ info->update&= ~HA_STATE_RNEXT_SAME; /* Setup that unique key is active key */ info->last_key.keyinfo= keyinfo; /* any key pointer in data is destroyed */ info->lastinx= ~0; DBUG_ASSERT(key.data_length == MARIA_UNIQUE_HASH_LENGTH); if (_ma_search(info, &key, SEARCH_FIND | SEARCH_SAVE_BUFF, info->s->state.key_root[def->key])) { info->page_changed=1; /* Can't optimize read next */ info->cur_row.lastpos= lastpos; goto end; } for (;;) { if (info->cur_row.lastpos != disk_pos && !(*info->s->compare_unique)(info,def,record,info->cur_row.lastpos)) { my_errno=HA_ERR_FOUND_DUPP_UNIQUE; info->errkey= (int) def->key; info->dup_key_pos= info->cur_row.lastpos; info->page_changed= 1; /* Can't optimize read next */ info->cur_row.lastpos= lastpos; DBUG_PRINT("info",("Found duplicate")); error= 1; /* Found identical */ goto end; } DBUG_ASSERT(info->last_key.data_length == MARIA_UNIQUE_HASH_LENGTH); if (_ma_search_next(info, &info->last_key, SEARCH_BIGGER, info->s->state.key_root[def->key]) || bcmp(info->last_key.data, key_buff, MARIA_UNIQUE_HASH_LENGTH)) { info->page_changed= 1; /* Can't optimize read next */ info->cur_row.lastpos= lastpos; break; /* end of tree */ } } end: DBUG_RETURN(error); }
O3
c
ma_check_unique: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %r8, -0x38(%rbp) movq %rsi, %r14 movq %rdi, %rbx movq (%rdi), %rax movq 0x98(%rdi), %r15 movq 0x570(%rax), %rax movzbl 0x2(%rsi), %esi imulq $0x118, %rsi, %r9 # imm = 0x118 leaq (%rax,%r9), %rsi movq %rsi, -0x30(%rbp) movq 0x390(%rdi), %r12 movq 0xc0(%rax,%r9), %rsi movl 0x8(%rsi), %esi movb %cl, 0x3(%rdx,%rsi) movq 0xc0(%rax,%r9), %rsi movl 0x8(%rsi), %esi movb %ch, 0x2(%rdx,%rsi) movq %rdx, %r8 movl %ecx, %esi shrl $0x10, %esi movq 0xc0(%rax,%r9), %rdi movl 0x8(%rdi), %edi movb %sil, 0x1(%rdx,%rdi) shrl $0x18, %ecx movq 0xc0(%rax,%r9), %rax movl 0x8(%rax), %eax movb %cl, (%rdx,%rax) movzbl 0x2(%r14), %edx movq $0x0, (%rsp) leaq -0x60(%rbp), %r13 movq %rbx, %rdi movq %r13, %rsi movq %r12, %rcx movq %r8, -0x40(%rbp) xorl %r9d, %r9d callq 0x387f7 andb $-0x11, 0x625(%rbx) movq -0x30(%rbp), %rax movq %rax, 0x208(%rbx) movl $0xffffffff, 0x62c(%rbx) # imm = 0xFFFFFFFF movq (%rbx), %rax movq 0x118(%rax), %rax movzbl 0x2(%r14), %ecx movq (%rax,%rcx,8), %rcx movq %rbx, %rdi movq %r13, %rsi movl $0x21, %edx callq 0x5bf97 xorl %ecx, %ecx testl %eax, %eax movq %r15, %rax jne 0x4445a movq -0x38(%rbp), %r15 movq %rax, -0x30(%rbp) leaq 0x200(%rbx), %r13 movq 0x98(%rbx), %rcx cmpq %r15, %rcx je 0x443f9 movq (%rbx), %rax movq %rbx, %rdi movq %r14, %rsi movq -0x40(%rbp), %rdx callq *0x6c0(%rax) testb %al, %al je 0x44430 movq (%rbx), %rax movq 0x118(%rax), %rax movzbl 0x2(%r14), %ecx movq (%rax,%rcx,8), %rcx movq %rbx, %rdi movq %r13, %rsi movl $0x8, %edx callq 0x5dec3 testl %eax, %eax jne 0x4442c movq (%r13), %rax movl (%rax), %eax cmpl (%r12), %eax je 0x443d6 xorl %ecx, %ecx jmp 0x44456 callq 0x85b0e movl $0x8d, (%rax) movzbl 0x2(%r14), %eax movl %eax, 0x660(%rbx) movq 0x98(%rbx), %rax movq %rax, 0x428(%rbx) movb $0x1, %cl movq -0x30(%rbp), %rax movb $0x1, 0x684(%rbx) movq %rax, 0x98(%rbx) movl %ecx, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ma_check_unique: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov [rbp+var_38], r8 mov r14, rsi mov rbx, rdi mov rax, [rdi] mov r15, [rdi+98h] mov rax, [rax+570h] movzx esi, byte ptr [rsi+2] imul r9, rsi, 118h lea rsi, [rax+r9] mov [rbp+var_30], rsi mov r12, [rdi+390h] mov rsi, [rax+r9+0C0h] mov esi, [rsi+8] mov [rdx+rsi+3], cl mov rsi, [rax+r9+0C0h] mov esi, [rsi+8] mov [rdx+rsi+2], ch mov r8, rdx mov esi, ecx shr esi, 10h mov rdi, [rax+r9+0C0h] mov edi, [rdi+8] mov [rdx+rdi+1], sil shr ecx, 18h mov rax, [rax+r9+0C0h] mov eax, [rax+8] mov [rdx+rax], cl movzx edx, byte ptr [r14+2] mov [rsp+70h+var_70], 0 lea r13, [rbp+var_60] mov rdi, rbx mov rsi, r13 mov rcx, r12 mov [rbp+var_40], r8 xor r9d, r9d call _ma_make_key and byte ptr [rbx+625h], 0EFh mov rax, [rbp+var_30] mov [rbx+208h], rax mov dword ptr [rbx+62Ch], 0FFFFFFFFh mov rax, [rbx] mov rax, [rax+118h] movzx ecx, byte ptr [r14+2] mov rcx, [rax+rcx*8] mov rdi, rbx mov rsi, r13 mov edx, 21h ; '!' call _ma_search xor ecx, ecx test eax, eax mov rax, r15 jnz loc_4445A mov r15, [rbp+var_38] mov [rbp+var_30], rax lea r13, [rbx+200h] loc_443D6: mov rcx, [rbx+98h] cmp rcx, r15 jz short loc_443F9 mov rax, [rbx] mov rdi, rbx mov rsi, r14 mov rdx, [rbp+var_40] call qword ptr [rax+6C0h] test al, al jz short loc_44430 loc_443F9: mov rax, [rbx] mov rax, [rax+118h] movzx ecx, byte ptr [r14+2] mov rcx, [rax+rcx*8] mov rdi, rbx mov rsi, r13 mov edx, 8 call _ma_search_next test eax, eax jnz short loc_4442C mov rax, [r13+0] mov eax, [rax] cmp eax, [r12] jz short loc_443D6 loc_4442C: xor ecx, ecx jmp short loc_44456 loc_44430: call _my_thread_var mov dword ptr [rax], 8Dh movzx eax, byte ptr [r14+2] mov [rbx+660h], eax mov rax, [rbx+98h] mov [rbx+428h], rax mov cl, 1 loc_44456: mov rax, [rbp+var_30] loc_4445A: mov byte ptr [rbx+684h], 1 mov [rbx+98h], rax mov eax, ecx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ma_check_unique(_QWORD *a1, long long a2, long long a3, int a4, long long a5) { long long v5; // r15 long long v6; // rax long long v7; // r9 char *v8; // r12 unsigned int v10; // edx int v11; // eax unsigned int v12; // ecx bool v13; // zf long long v14; // rax long long v15; // r15 _BYTE v17[32]; // [rsp+10h] [rbp-60h] BYREF long long v18; // [rsp+30h] [rbp-40h] long long v19; // [rsp+38h] [rbp-38h] long long v20; // [rsp+40h] [rbp-30h] v19 = a5; v5 = a1[19]; v6 = *(_QWORD *)(*a1 + 1392LL); v7 = 280LL * *(unsigned __int8 *)(a2 + 2); v20 = v6 + v7; v8 = (char *)a1[114]; *(_BYTE *)(a3 + *(unsigned int *)(*(_QWORD *)(v6 + v7 + 192) + 8LL) + 3) = a4; *(_BYTE *)(a3 + *(unsigned int *)(*(_QWORD *)(v6 + v7 + 192) + 8LL) + 2) = BYTE1(a4); *(_BYTE *)(a3 + *(unsigned int *)(*(_QWORD *)(v6 + v7 + 192) + 8LL) + 1) = BYTE2(a4); *(_BYTE *)(a3 + *(unsigned int *)(*(_QWORD *)(v6 + v7 + 192) + 8LL)) = HIBYTE(a4); v10 = *(unsigned __int8 *)(a2 + 2); v18 = a3; ma_make_key(a1, (long long)v17, v10, v8, a3, 0LL, 0LL); *((_BYTE *)a1 + 1573) &= ~0x10u; a1[65] = v20; *((_DWORD *)a1 + 395) = -1; v11 = ma_search(a1, v17, 33LL, *(_QWORD *)(*(_QWORD *)(*a1 + 280LL) + 8LL * *(unsigned __int8 *)(a2 + 2))); v12 = 0; v13 = v11 == 0; v14 = v5; if ( v13 ) { v15 = v19; v20 = v14; while ( a1[19] == v15 || (*(unsigned __int8 ( **)(_QWORD *, long long, long long))(*a1 + 1728LL))(a1, a2, v18) ) { if ( (unsigned int)ma_search_next( a1, a1 + 64, 8LL, *(_QWORD *)(*(_QWORD *)(*a1 + 280LL) + 8LL * *(unsigned __int8 *)(a2 + 2))) || *(_DWORD *)a1[64] != *(_DWORD *)v8 ) { v12 = 0; goto LABEL_9; } } *(_DWORD *)my_thread_var(a1) = 141; *((_DWORD *)a1 + 408) = *(unsigned __int8 *)(a2 + 2); a1[133] = a1[19]; LOBYTE(v12) = 1; LABEL_9: v14 = v20; } *((_BYTE *)a1 + 1668) = 1; a1[19] = v14; return v12; }
_ma_check_unique: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV qword ptr [RBP + -0x38],R8 MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr [RDI] MOV R15,qword ptr [RDI + 0x98] MOV RAX,qword ptr [RAX + 0x570] MOVZX ESI,byte ptr [RSI + 0x2] IMUL R9,RSI,0x118 LEA RSI,[RAX + R9*0x1] MOV qword ptr [RBP + -0x30],RSI MOV R12,qword ptr [RDI + 0x390] MOV RSI,qword ptr [RAX + R9*0x1 + 0xc0] MOV ESI,dword ptr [RSI + 0x8] MOV byte ptr [RDX + RSI*0x1 + 0x3],CL MOV RSI,qword ptr [RAX + R9*0x1 + 0xc0] MOV ESI,dword ptr [RSI + 0x8] MOV byte ptr [RDX + RSI*0x1 + 0x2],CH MOV R8,RDX MOV ESI,ECX SHR ESI,0x10 MOV RDI,qword ptr [RAX + R9*0x1 + 0xc0] MOV EDI,dword ptr [RDI + 0x8] MOV byte ptr [RDX + RDI*0x1 + 0x1],SIL SHR ECX,0x18 MOV RAX,qword ptr [RAX + R9*0x1 + 0xc0] MOV EAX,dword ptr [RAX + 0x8] MOV byte ptr [RDX + RAX*0x1],CL MOVZX EDX,byte ptr [R14 + 0x2] MOV qword ptr [RSP],0x0 LEA R13,[RBP + -0x60] MOV RDI,RBX MOV RSI,R13 MOV RCX,R12 MOV qword ptr [RBP + -0x40],R8 XOR R9D,R9D CALL 0x001387f7 AND byte ptr [RBX + 0x625],0xef MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBX + 0x208],RAX MOV dword ptr [RBX + 0x62c],0xffffffff MOV RAX,qword ptr [RBX] MOV RAX,qword ptr [RAX + 0x118] MOVZX ECX,byte ptr [R14 + 0x2] MOV RCX,qword ptr [RAX + RCX*0x8] MOV RDI,RBX MOV RSI,R13 MOV EDX,0x21 CALL 0x0015bf97 XOR ECX,ECX TEST EAX,EAX MOV RAX,R15 JNZ 0x0014445a MOV R15,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x30],RAX LEA R13,[RBX + 0x200] LAB_001443d6: MOV RCX,qword ptr [RBX + 0x98] CMP RCX,R15 JZ 0x001443f9 MOV RAX,qword ptr [RBX] MOV RDI,RBX MOV RSI,R14 MOV RDX,qword ptr [RBP + -0x40] CALL qword ptr [RAX + 0x6c0] TEST AL,AL JZ 0x00144430 LAB_001443f9: MOV RAX,qword ptr [RBX] MOV RAX,qword ptr [RAX + 0x118] MOVZX ECX,byte ptr [R14 + 0x2] MOV RCX,qword ptr [RAX + RCX*0x8] MOV RDI,RBX MOV RSI,R13 MOV EDX,0x8 CALL 0x0015dec3 TEST EAX,EAX JNZ 0x0014442c MOV RAX,qword ptr [R13] MOV EAX,dword ptr [RAX] CMP EAX,dword ptr [R12] JZ 0x001443d6 LAB_0014442c: XOR ECX,ECX JMP 0x00144456 LAB_00144430: CALL 0x00185b0e MOV dword ptr [RAX],0x8d MOVZX EAX,byte ptr [R14 + 0x2] MOV dword ptr [RBX + 0x660],EAX MOV RAX,qword ptr [RBX + 0x98] MOV qword ptr [RBX + 0x428],RAX MOV CL,0x1 LAB_00144456: MOV RAX,qword ptr [RBP + -0x30] LAB_0014445a: MOV byte ptr [RBX + 0x684],0x1 MOV qword ptr [RBX + 0x98],RAX MOV EAX,ECX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong _ma_check_unique(long *param_1,long param_2,long param_3,int4 param_4,long param_5) { long lVar1; int *piVar2; char cVar3; int iVar4; int4 *puVar5; long lVar6; ulong uVar7; long lVar8; int1 local_68 [32]; long local_48; long local_40; long local_38; lVar6 = param_1[0x13]; lVar1 = *(long *)(*param_1 + 0x570); lVar8 = (ulong)*(byte *)(param_2 + 2) * 0x118; local_38 = lVar1 + lVar8; piVar2 = (int *)param_1[0x72]; *(char *)(param_3 + 3 + (ulong)*(uint *)(*(long *)(lVar1 + 0xc0 + lVar8) + 8)) = (char)param_4; *(char *)(param_3 + 2 + (ulong)*(uint *)(*(long *)(lVar1 + 0xc0 + lVar8) + 8)) = (char)((uint)param_4 >> 8); *(char *)(param_3 + 1 + (ulong)*(uint *)(*(long *)(lVar1 + 0xc0 + lVar8) + 8)) = (char)((uint)param_4 >> 0x10); *(char *)(param_3 + (ulong)*(uint *)(*(long *)(lVar1 + 0xc0 + lVar8) + 8)) = (char)((uint)param_4 >> 0x18); local_48 = param_3; local_40 = param_5; _ma_make_key(param_1,local_68,*(int1 *)(param_2 + 2),piVar2,param_3,0,0); *(byte *)((long)param_1 + 0x625) = *(byte *)((long)param_1 + 0x625) & 0xef; param_1[0x41] = local_38; *(int4 *)((long)param_1 + 0x62c) = 0xffffffff; iVar4 = _ma_search(param_1,local_68,0x21, *(int8 *) (*(long *)(*param_1 + 0x118) + (ulong)*(byte *)(param_2 + 2) * 8)); lVar1 = local_40; uVar7 = 0; local_38 = lVar6; if (iVar4 == 0) { do { lVar6 = param_1[0x13]; if ((lVar6 != lVar1) && (cVar3 = (**(code **)(*param_1 + 0x6c0))(param_1,param_2,local_48), cVar3 == '\0')) { puVar5 = (int4 *)_my_thread_var(); *puVar5 = 0x8d; *(uint *)(param_1 + 0xcc) = (uint)*(byte *)(param_2 + 2); param_1[0x85] = param_1[0x13]; uVar7 = CONCAT71((int7)((ulong)lVar6 >> 8),1); goto LAB_0014445a; } iVar4 = _ma_search_next(param_1,param_1 + 0x40,8, *(int8 *) (*(long *)(*param_1 + 0x118) + (ulong)*(byte *)(param_2 + 2) * 8)); } while ((iVar4 == 0) && (*(int *)param_1[0x40] == *piVar2)); uVar7 = 0; } LAB_0014445a: *(int1 *)((long)param_1 + 0x684) = 1; param_1[0x13] = local_38; return uVar7 & 0xffffffff; }
6,678
diff
eloqsql/libmariadb/libmariadb/ma_dtoa.c
static Bigint *diff(Bigint *a, Bigint *b, Stack_alloc *alloc) { Bigint *c; int i, wa, wb; ULong *xa, *xae, *xb, *xbe, *xc; ULLong borrow, y; i= cmp(a,b); if (!i) { c= Balloc(0, alloc); c->wds= 1; c->p.x[0]= 0; return c; } if (i < 0) { c= a; a= b; b= c; i= 1; } else i= 0; c= Balloc(a->k, alloc); c->sign= i; wa= a->wds; xa= a->p.x; xae= xa + wa; wb= b->wds; xb= b->p.x; xbe= xb + wb; xc= c->p.x; borrow= 0; do { y= (ULLong)*xa++ - *xb++ - borrow; borrow= y >> 32 & (ULong)1; *xc++= (ULong) (y & FFFFFFFF); } while (xb < xbe); while (xa < xae) { y= *xa++ - borrow; borrow= y >> 32 & (ULong)1; *xc++= (ULong) (y & FFFFFFFF); } while (!*--xc) wa--; c->wds= wa; return c; }
O0
c
diff: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x34ea0 movl %eax, -0x2c(%rbp) cmpl $0x0, -0x2c(%rbp) jne 0x354ee movq -0x20(%rbp), %rsi xorl %edi, %edi callq 0x350b0 movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movl $0x1, 0x14(%rax) movq -0x28(%rbp), %rax movq (%rax), %rax movl $0x0, (%rax) movq -0x28(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x3569a cmpl $0x0, -0x2c(%rbp) jge 0x35515 movq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x18(%rbp) movl $0x1, -0x2c(%rbp) jmp 0x3551c movl $0x0, -0x2c(%rbp) movq -0x10(%rbp), %rax movl 0x8(%rax), %edi movq -0x20(%rbp), %rsi callq 0x350b0 movq %rax, -0x28(%rbp) movl -0x2c(%rbp), %ecx movq -0x28(%rbp), %rax movl %ecx, 0x10(%rax) movq -0x10(%rbp), %rax movl 0x14(%rax), %eax movl %eax, -0x30(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movslq -0x30(%rbp), %rcx shlq $0x2, %rcx addq %rcx, %rax movq %rax, -0x48(%rbp) movq -0x18(%rbp), %rax movl 0x14(%rax), %eax movl %eax, -0x34(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movslq -0x34(%rbp), %rcx shlq $0x2, %rcx addq %rcx, %rax movq %rax, -0x58(%rbp) movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x60(%rbp) movq $0x0, -0x68(%rbp) movq -0x40(%rbp), %rax movq %rax, %rcx addq $0x4, %rcx movq %rcx, -0x40(%rbp) movl (%rax), %eax movq -0x50(%rbp), %rcx movq %rcx, %rdx addq $0x4, %rdx movq %rdx, -0x50(%rbp) movl (%rcx), %ecx subq %rcx, %rax subq -0x68(%rbp), %rax movq %rax, -0x70(%rbp) movq -0x70(%rbp), %rax shrq $0x20, %rax andq $0x1, %rax movq %rax, -0x68(%rbp) movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq -0x70(%rbp), %rax movl %eax, %ecx movq -0x60(%rbp), %rax movq %rax, %rdx addq $0x4, %rdx movq %rdx, -0x60(%rbp) movl %ecx, (%rax) movq -0x50(%rbp), %rax cmpq -0x58(%rbp), %rax jb 0x3559d jmp 0x35607 movq -0x40(%rbp), %rax cmpq -0x48(%rbp), %rax jae 0x3565d movq -0x40(%rbp), %rax movq %rax, %rcx addq $0x4, %rcx movq %rcx, -0x40(%rbp) movl (%rax), %eax subq -0x68(%rbp), %rax movq %rax, -0x70(%rbp) movq -0x70(%rbp), %rax shrq $0x20, %rax andq $0x1, %rax movq %rax, -0x68(%rbp) movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq -0x70(%rbp), %rax movl %eax, %ecx movq -0x60(%rbp), %rax movq %rax, %rdx addq $0x4, %rdx movq %rdx, -0x60(%rbp) movl %ecx, (%rax) jmp 0x35607 jmp 0x3565f movq -0x60(%rbp), %rax movq %rax, %rcx addq $-0x4, %rcx movq %rcx, -0x60(%rbp) cmpl $0x0, -0x4(%rax) setne %al xorb $-0x1, %al testb $0x1, %al jne 0x3567d jmp 0x35688 movl -0x30(%rbp), %eax addl $-0x1, %eax movl %eax, -0x30(%rbp) jmp 0x3565f movl -0x30(%rbp), %ecx movq -0x28(%rbp), %rax movl %ecx, 0x14(%rax) movq -0x28(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x70, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
diff: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call cmp mov [rbp+var_2C], eax cmp [rbp+var_2C], 0 jnz short loc_354EE mov rsi, [rbp+var_20] xor edi, edi call Balloc mov [rbp+var_28], rax mov rax, [rbp+var_28] mov dword ptr [rax+14h], 1 mov rax, [rbp+var_28] mov rax, [rax] mov dword ptr [rax], 0 mov rax, [rbp+var_28] mov [rbp+var_8], rax jmp loc_3569A loc_354EE: cmp [rbp+var_2C], 0 jge short loc_35515 mov rax, [rbp+var_10] mov [rbp+var_28], rax mov rax, [rbp+var_18] mov [rbp+var_10], rax mov rax, [rbp+var_28] mov [rbp+var_18], rax mov [rbp+var_2C], 1 jmp short loc_3551C loc_35515: mov [rbp+var_2C], 0 loc_3551C: mov rax, [rbp+var_10] mov edi, [rax+8] mov rsi, [rbp+var_20] call Balloc mov [rbp+var_28], rax mov ecx, [rbp+var_2C] mov rax, [rbp+var_28] mov [rax+10h], ecx mov rax, [rbp+var_10] mov eax, [rax+14h] mov [rbp+var_30], eax mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_40], rax mov rax, [rbp+var_40] movsxd rcx, [rbp+var_30] shl rcx, 2 add rax, rcx mov [rbp+var_48], rax mov rax, [rbp+var_18] mov eax, [rax+14h] mov [rbp+var_34], eax mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_50], rax mov rax, [rbp+var_50] movsxd rcx, [rbp+var_34] shl rcx, 2 add rax, rcx mov [rbp+var_58], rax mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_60], rax mov [rbp+var_68], 0 loc_3559D: mov rax, [rbp+var_40] mov rcx, rax add rcx, 4 mov [rbp+var_40], rcx mov eax, [rax] mov rcx, [rbp+var_50] mov rdx, rcx add rdx, 4 mov [rbp+var_50], rdx mov ecx, [rcx] sub rax, rcx sub rax, [rbp+var_68] mov [rbp+var_70], rax mov rax, [rbp+var_70] shr rax, 20h and rax, 1 mov [rbp+var_68], rax mov rax, 0FFFFFFFFh and rax, [rbp+var_70] mov ecx, eax mov rax, [rbp+var_60] mov rdx, rax add rdx, 4 mov [rbp+var_60], rdx mov [rax], ecx mov rax, [rbp+var_50] cmp rax, [rbp+var_58] jb short loc_3559D jmp short $+2 loc_35607: mov rax, [rbp+var_40] cmp rax, [rbp+var_48] jnb short loc_3565D mov rax, [rbp+var_40] mov rcx, rax add rcx, 4 mov [rbp+var_40], rcx mov eax, [rax] sub rax, [rbp+var_68] mov [rbp+var_70], rax mov rax, [rbp+var_70] shr rax, 20h and rax, 1 mov [rbp+var_68], rax mov rax, 0FFFFFFFFh and rax, [rbp+var_70] mov ecx, eax mov rax, [rbp+var_60] mov rdx, rax add rdx, 4 mov [rbp+var_60], rdx mov [rax], ecx jmp short loc_35607 loc_3565D: jmp short $+2 loc_3565F: mov rax, [rbp+var_60] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFFCh mov [rbp+var_60], rcx cmp dword ptr [rax-4], 0 setnz al xor al, 0FFh test al, 1 jnz short loc_3567D jmp short loc_35688 loc_3567D: mov eax, [rbp+var_30] add eax, 0FFFFFFFFh mov [rbp+var_30], eax jmp short loc_3565F loc_35688: mov ecx, [rbp+var_30] mov rax, [rbp+var_28] mov [rax+14h], ecx mov rax, [rbp+var_28] mov [rbp+var_8], rax loc_3569A: mov rax, [rbp+var_8] add rsp, 70h pop rbp retn
long long diff(long long a1, long long a2, long long a3) { unsigned int *v3; // rax unsigned int *v4; // rcx _DWORD *v5; // rax unsigned int *v6; // rax _DWORD *v7; // rax _DWORD *v8; // rax unsigned long long v10; // [rsp+0h] [rbp-70h] unsigned long long v11; // [rsp+0h] [rbp-70h] long long v12; // [rsp+8h] [rbp-68h] _DWORD *v13; // [rsp+10h] [rbp-60h] unsigned long long v14; // [rsp+18h] [rbp-58h] unsigned int *v15; // [rsp+20h] [rbp-50h] unsigned long long v16; // [rsp+28h] [rbp-48h] unsigned int *v17; // [rsp+30h] [rbp-40h] int v18; // [rsp+40h] [rbp-30h] int v19; // [rsp+44h] [rbp-2Ch] int v20; // [rsp+44h] [rbp-2Ch] long long v21; // [rsp+48h] [rbp-28h] long long v22; // [rsp+48h] [rbp-28h] long long v24; // [rsp+58h] [rbp-18h] long long v25; // [rsp+60h] [rbp-10h] v25 = a1; v24 = a2; v19 = cmp(a1, a2); if ( v19 ) { if ( v19 >= 0 ) { v20 = 0; } else { v25 = a2; v24 = a1; v20 = 1; } v22 = Balloc(*(_DWORD *)(v25 + 8), a3); *(_DWORD *)(v22 + 16) = v20; v18 = *(_DWORD *)(v25 + 20); v17 = *(unsigned int **)v25; v16 = 4LL * v18 + *(_QWORD *)v25; v15 = *(unsigned int **)v24; v14 = 4LL * *(int *)(v24 + 20) + *(_QWORD *)v24; v13 = *(_DWORD **)v22; v12 = 0LL; do { v3 = v17++; v4 = v15++; v10 = *v3 - (unsigned long long)*v4 - v12; v12 = HIDWORD(v10) & 1; v5 = v13++; *v5 = v10; } while ( (unsigned long long)v15 < v14 ); while ( (unsigned long long)v17 < v16 ) { v6 = v17++; v11 = *v6 - v12; v12 = HIDWORD(v11) & 1; v7 = v13++; *v7 = v11; } while ( 1 ) { v8 = v13--; if ( *(v8 - 1) ) break; --v18; } *(_DWORD *)(v22 + 20) = v18; return v22; } else { v21 = Balloc(0, a3); *(_DWORD *)(v21 + 20) = 1; **(_DWORD **)v21 = 0; return v21; } }
diff: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00134ea0 MOV dword ptr [RBP + -0x2c],EAX CMP dword ptr [RBP + -0x2c],0x0 JNZ 0x001354ee MOV RSI,qword ptr [RBP + -0x20] XOR EDI,EDI CALL 0x001350b0 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x14],0x1 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV dword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x8],RAX JMP 0x0013569a LAB_001354ee: CMP dword ptr [RBP + -0x2c],0x0 JGE 0x00135515 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x18],RAX MOV dword ptr [RBP + -0x2c],0x1 JMP 0x0013551c LAB_00135515: MOV dword ptr [RBP + -0x2c],0x0 LAB_0013551c: MOV RAX,qword ptr [RBP + -0x10] MOV EDI,dword ptr [RAX + 0x8] MOV RSI,qword ptr [RBP + -0x20] CALL 0x001350b0 MOV qword ptr [RBP + -0x28],RAX MOV ECX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x14] MOV dword ptr [RBP + -0x30],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOVSXD RCX,dword ptr [RBP + -0x30] SHL RCX,0x2 ADD RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x14] MOV dword ptr [RBP + -0x34],EAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] MOVSXD RCX,dword ptr [RBP + -0x34] SHL RCX,0x2 ADD RAX,RCX MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x60],RAX MOV qword ptr [RBP + -0x68],0x0 LAB_0013559d: MOV RAX,qword ptr [RBP + -0x40] MOV RCX,RAX ADD RCX,0x4 MOV qword ptr [RBP + -0x40],RCX MOV EAX,dword ptr [RAX] MOV RCX,qword ptr [RBP + -0x50] MOV RDX,RCX ADD RDX,0x4 MOV qword ptr [RBP + -0x50],RDX MOV ECX,dword ptr [RCX] SUB RAX,RCX SUB RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x70] SHR RAX,0x20 AND RAX,0x1 MOV qword ptr [RBP + -0x68],RAX MOV RAX,0xffffffff AND RAX,qword ptr [RBP + -0x70] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x60] MOV RDX,RAX ADD RDX,0x4 MOV qword ptr [RBP + -0x60],RDX MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x50] CMP RAX,qword ptr [RBP + -0x58] JC 0x0013559d JMP 0x00135607 LAB_00135607: MOV RAX,qword ptr [RBP + -0x40] CMP RAX,qword ptr [RBP + -0x48] JNC 0x0013565d MOV RAX,qword ptr [RBP + -0x40] MOV RCX,RAX ADD RCX,0x4 MOV qword ptr [RBP + -0x40],RCX MOV EAX,dword ptr [RAX] SUB RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x70] SHR RAX,0x20 AND RAX,0x1 MOV qword ptr [RBP + -0x68],RAX MOV RAX,0xffffffff AND RAX,qword ptr [RBP + -0x70] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x60] MOV RDX,RAX ADD RDX,0x4 MOV qword ptr [RBP + -0x60],RDX MOV dword ptr [RAX],ECX JMP 0x00135607 LAB_0013565d: JMP 0x0013565f LAB_0013565f: MOV RAX,qword ptr [RBP + -0x60] MOV RCX,RAX ADD RCX,-0x4 MOV qword ptr [RBP + -0x60],RCX CMP dword ptr [RAX + -0x4],0x0 SETNZ AL XOR AL,0xff TEST AL,0x1 JNZ 0x0013567d JMP 0x00135688 LAB_0013567d: MOV EAX,dword ptr [RBP + -0x30] ADD EAX,-0x1 MOV dword ptr [RBP + -0x30],EAX JMP 0x0013565f LAB_00135688: MOV ECX,dword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x14],ECX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x8],RAX LAB_0013569a: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x70 POP RBP RET
int8 * diff(int8 *param_1,int8 *param_2,int8 param_3) { uint *puVar1; uint *puVar2; int iVar3; ulong uVar4; uint *puVar5; uint *puVar6; int4 *puVar7; ulong local_70; int4 *local_68; uint *local_58; uint *local_48; int local_38; uint local_34; int8 *local_20; int8 *local_18; int8 *local_10; iVar3 = cmp(param_1,param_2); if (iVar3 == 0) { local_10 = (int8 *)Balloc(0,param_3); *(int4 *)((long)local_10 + 0x14) = 1; *(int4 *)*local_10 = 0; } else { local_20 = param_2; local_18 = param_1; if (iVar3 < 0) { local_20 = param_1; local_18 = param_2; } local_34 = (uint)(iVar3 < 0); local_10 = (int8 *)Balloc(*(int4 *)(local_18 + 1),param_3); *(uint *)(local_10 + 2) = local_34; local_38 = *(int *)((long)local_18 + 0x14); puVar1 = (uint *)*local_18; iVar3 = *(int *)((long)local_20 + 0x14); puVar2 = (uint *)*local_20; local_70 = 0; local_68 = (int4 *)*local_10; local_58 = puVar2; local_48 = puVar1; do { puVar5 = local_48 + 1; puVar6 = local_58 + 1; uVar4 = ((ulong)*local_48 - (ulong)*local_58) - local_70; local_70 = uVar4 >> 0x20 & 1; puVar7 = local_68 + 1; *local_68 = (int)uVar4; local_68 = puVar7; local_58 = puVar6; local_48 = puVar5; } while (puVar6 < puVar2 + iVar3); while (local_48 < puVar1 + local_38) { uVar4 = *local_48 - local_70; local_70 = uVar4 >> 0x20 & 1; *local_68 = (int)uVar4; local_68 = local_68 + 1; local_48 = local_48 + 1; } while (local_68[-1] == 0) { local_38 = local_38 + -1; local_68 = local_68 + -1; } *(int *)((long)local_10 + 0x14) = local_38; } return local_10; }
6,679
uf_prespace
eloqsql/storage/myisam/mi_packrec.c
static void uf_prespace(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to, uchar *end) { uint spaces; if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end) { bit_buff->error=1; return; } bfill((uchar*) to,spaces,' '); if (to+spaces != end) decode_bytes(rec,bit_buff,to+spaces,end); }
O3
c
uf_prespace: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %rbx movq %rdx, %r12 movq %rsi, %r14 movq %rdi, %r15 movl 0x4(%rsi), %ecx movl 0x1c(%rdi), %r13d cmpl %r13d, %ecx jae 0x88a70 subl %ecx, %r13d leaq 0x62036(%rip), %rax # 0xeaa70 movq %rbx, -0x30(%rbp) movl (%rax,%rcx,4), %ebx andl (%r14), %ebx movl %r13d, %ecx shll %cl, %ebx movq %r14, %rdi callq 0x87691 movl $0x20, %eax subl %r13d, %eax movl %eax, 0x4(%r14) movl (%r14), %eax negl %r13d movl %r13d, %ecx shrl %cl, %eax addl %ebx, %eax movq -0x30(%rbp), %rbx jmp 0x88a8a movl (%r14), %eax subl %r13d, %ecx movl %ecx, 0x4(%r14) shrl %cl, %eax movl 0x1c(%r15), %ecx leaq 0x61fe9(%rip), %rdx # 0xeaa70 andl (%rdx,%rcx,4), %eax movl %eax, %edx leaq (%r12,%rdx), %r13 cmpq %rbx, %r13 jbe 0x88a9f movl $0x1, 0x28(%r14) jmp 0x88ad0 movq %r12, %rdi movl $0x20, %esi callq 0x2a290 cmpq %rbx, %r13 je 0x88ad0 movq %r15, %rdi movq %r14, %rsi movq %r13, %rdx movq %rbx, %rcx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x87f82 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
uf_prespace_0: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rcx mov r12, rdx mov r14, rsi mov r15, rdi mov ecx, [rsi+4] mov r13d, [rdi+1Ch] cmp ecx, r13d jnb short loc_88A70 sub r13d, ecx lea rax, mask_0 mov [rbp+var_30], rbx mov ebx, [rax+rcx*4] and ebx, [r14] mov ecx, r13d shl ebx, cl mov rdi, r14 call fill_buffer_0 mov eax, 20h ; ' ' sub eax, r13d mov [r14+4], eax mov eax, [r14] neg r13d mov ecx, r13d shr eax, cl add eax, ebx mov rbx, [rbp+var_30] jmp short loc_88A8A loc_88A70: mov eax, [r14] sub ecx, r13d mov [r14+4], ecx shr eax, cl mov ecx, [r15+1Ch] lea rdx, mask_0 and eax, [rdx+rcx*4] loc_88A8A: mov edx, eax lea r13, [r12+rdx] cmp r13, rbx jbe short loc_88A9F mov dword ptr [r14+28h], 1 jmp short loc_88AD0 loc_88A9F: mov rdi, r12 mov esi, 20h ; ' ' call _memset cmp r13, rbx jz short loc_88AD0 mov rdi, r15 mov rsi, r14 mov rdx, r13 mov rcx, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp decode_bytes_0 loc_88AD0: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long uf_prespace_0(long long a1, unsigned int *a2, long long a3, _BYTE *a4) { long long v6; // rcx unsigned int v7; // r13d int v8; // r13d int v9; // ebx long long result; // rax unsigned int v11; // eax unsigned int v12; // ecx _BYTE *v13; // r13 _BYTE *v14; // [rsp+0h] [rbp-30h] v6 = a2[1]; v7 = *(_DWORD *)(a1 + 28); if ( (unsigned int)v6 >= v7 ) { v11 = *a2; v12 = v6 - v7; a2[1] = v12; result = mask_0[*(unsigned int *)(a1 + 28)] & (v11 >> v12); } else { v8 = v7 - v6; v14 = a4; v9 = (*a2 & mask_0[v6]) << v8; fill_buffer_0((long long)a2); a2[1] = 32 - v8; result = v9 + (*a2 >> -(char)v8); a4 = v14; } v13 = (_BYTE *)(a3 + (unsigned int)result); if ( v13 <= a4 ) { result = memset(a3, 32LL, (unsigned int)result); if ( v13 != a4 ) return (long long)decode_bytes_0(a1, (long long)a2, v13, a4); } else { a2[10] = 1; } return result; }
uf_prespace: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RCX MOV R12,RDX MOV R14,RSI MOV R15,RDI MOV ECX,dword ptr [RSI + 0x4] MOV R13D,dword ptr [RDI + 0x1c] CMP ECX,R13D JNC 0x00188a70 SUB R13D,ECX LEA RAX,[0x1eaa70] MOV qword ptr [RBP + -0x30],RBX MOV EBX,dword ptr [RAX + RCX*0x4] AND EBX,dword ptr [R14] MOV ECX,R13D SHL EBX,CL MOV RDI,R14 CALL 0x00187691 MOV EAX,0x20 SUB EAX,R13D MOV dword ptr [R14 + 0x4],EAX MOV EAX,dword ptr [R14] NEG R13D MOV ECX,R13D SHR EAX,CL ADD EAX,EBX MOV RBX,qword ptr [RBP + -0x30] JMP 0x00188a8a LAB_00188a70: MOV EAX,dword ptr [R14] SUB ECX,R13D MOV dword ptr [R14 + 0x4],ECX SHR EAX,CL MOV ECX,dword ptr [R15 + 0x1c] LEA RDX,[0x1eaa70] AND EAX,dword ptr [RDX + RCX*0x4] LAB_00188a8a: MOV EDX,EAX LEA R13,[R12 + RDX*0x1] CMP R13,RBX JBE 0x00188a9f MOV dword ptr [R14 + 0x28],0x1 JMP 0x00188ad0 LAB_00188a9f: MOV RDI,R12 MOV ESI,0x20 CALL 0x0012a290 CMP R13,RBX JZ 0x00188ad0 MOV RDI,R15 MOV RSI,R14 MOV RDX,R13 MOV RCX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00187f82 LAB_00188ad0: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void uf_prespace(long param_1,uint *param_2,void *param_3,ulong param_4) { ulong uVar1; uint uVar2; uint uVar3; uint uVar4; uint uVar5; byte bVar6; uVar5 = param_2[1]; uVar2 = *(uint *)(param_1 + 0x1c); if (uVar5 < uVar2) { uVar3 = (&mask)[uVar5]; uVar4 = *param_2; bVar6 = (byte)(uVar2 - uVar5); fill_buffer(param_2); param_2[1] = 0x20 - (uVar2 - uVar5); uVar5 = (*param_2 >> (-bVar6 & 0x1f)) + ((uVar3 & uVar4) << (bVar6 & 0x1f)); } else { param_2[1] = uVar5 - uVar2; uVar5 = *param_2 >> ((byte)(uVar5 - uVar2) & 0x1f) & (&mask)[*(uint *)(param_1 + 0x1c)]; } uVar1 = (long)param_3 + (ulong)uVar5; if (param_4 < uVar1) { param_2[10] = 1; } else { memset(param_3,0x20,(ulong)uVar5); if (uVar1 != param_4) { decode_bytes(param_1,param_2,uVar1,param_4); return; } } return; }
6,680
minja::Context::at(minja::Value const&)
monkey531[P]llama/common/minja.hpp
virtual Value & at(const Value & key) { if (values_.contains(key)) return values_.at(key); if (parent_) return parent_->at(key); throw std::runtime_error("Undefined variable: " + key.dump()); }
O2
cpp
minja::Context::at(minja::Value const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x18(%rdi), %r15 movq %r15, %rdi callq 0x6cffe testb %al, %al je 0x7453f movq %r15, %rdi movq %r14, %rsi addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x6ce6c movq 0x68(%rbx), %rdi testq %rdi, %rdi je 0x7455e movq (%rdi), %rax movq 0x18(%rax), %rax movq %r14, %rsi addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmpq *%rax pushq $0x10 popq %rdi callq 0x23450 movq %rax, %rbx leaq 0x8(%rsp), %rdi pushq $-0x1 popq %rdx movq %r14, %rsi xorl %ecx, %ecx callq 0x62cdc leaq 0x3f771(%rip), %rsi # 0xb3cf3 leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x58306 movb $0x1, %bpl leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x23e10 xorl %ebp, %ebp movq 0x88a46(%rip), %rsi # 0xfcff0 movq 0x889a7(%rip), %rdx # 0xfcf58 movq %rbx, %rdi callq 0x23ee0 movq %rax, %r14 leaq 0x28(%rsp), %rdi callq 0x241a8 jmp 0x745ce movq %rax, %r14 movb $0x1, %bpl leaq 0x8(%rsp), %rdi callq 0x241a8 testb %bpl, %bpl jne 0x745e2 jmp 0x745ea movq %rax, %r14 movq %rbx, %rdi callq 0x23680 movq %r14, %rdi callq 0x23f70
_ZN5minja7Context2atERKNS_5ValueE: push rbp push r15 push r14 push rbx sub rsp, 48h mov r14, rsi mov rbx, rdi lea r15, [rdi+18h] mov rdi, r15; this call _ZNK5minja5Value8containsERKS0_; minja::Value::contains(minja::Value const&) test al, al jz short loc_7453F mov rdi, r15; this mov rsi, r14; minja::Value * add rsp, 48h pop rbx pop r14 pop r15 pop rbp jmp _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&) loc_7453F: mov rdi, [rbx+68h] test rdi, rdi jz short loc_7455E mov rax, [rdi] mov rax, [rax+18h] mov rsi, r14 add rsp, 48h pop rbx pop r14 pop r15 pop rbp jmp rax loc_7455E: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+68h+var_60] push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, r14 xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aUndefinedVaria; "Undefined variable: " lea rdi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_60] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+68h+var_40] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+68h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_745CE mov r14, rax mov bpl, 1 loc_745CE: lea rdi, [rsp+68h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_745E2 jmp short loc_745EA mov r14, rax loc_745E2: mov rdi, rbx; void * call ___cxa_free_exception loc_745EA: mov rdi, r14 call __Unwind_Resume
long long minja::Context::at(unsigned __int8 ***this, const minja::Value *a2, __m128d a3) { unsigned __int8 **v4; // rdi void *exception; // rbx _BYTE v6[32]; // [rsp+8h] [rbp-60h] BYREF _BYTE v7[64]; // [rsp+28h] [rbp-40h] BYREF if ( (unsigned __int8)minja::Value::contains(this + 3, a2, a3) ) return minja::Value::at((minja::Value *)(this + 3), a2); v4 = this[13]; if ( !v4 ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v6, (long long)a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)v7, (long long)"Undefined variable: ", (long long)v6); std::runtime_error::runtime_error(exception, v7); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return (*((long long ( **)(unsigned __int8 **, const minja::Value *))*v4 + 3))(v4, a2); }
at: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RSI MOV RBX,RDI LEA R15,[RDI + 0x18] MOV RDI,R15 CALL 0x0016cffe TEST AL,AL JZ 0x0017453f MOV RDI,R15 MOV RSI,R14 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP JMP 0x0016ce6c LAB_0017453f: MOV RDI,qword ptr [RBX + 0x68] TEST RDI,RDI JZ 0x0017455e MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x18] MOV RSI,R14 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP JMP RAX LAB_0017455e: PUSH 0x10 POP RDI CALL 0x00123450 MOV RBX,RAX LAB_00174569: LEA RDI,[RSP + 0x8] PUSH -0x1 POP RDX MOV RSI,R14 XOR ECX,ECX CALL 0x00162cdc LAB_0017457b: LEA RSI,[0x1b3cf3] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL 0x00158306 MOV BPL,0x1 LAB_00174594: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x00123e10 XOR EBP,EBP MOV RSI,qword ptr [0x001fcff0] MOV RDX,qword ptr [0x001fcf58] MOV RDI,RBX CALL 0x00123ee0
/* minja::Context::at(minja::Value const&) */ void __thiscall minja::Context::at(Context *this,Value *param_1) { long *plVar1; char cVar2; runtime_error *this_00; int1 local_60 [32]; string local_40 [32]; cVar2 = Value::contains((Value *)(this + 0x18),param_1); if (cVar2 != '\0') { Value::at((Value *)(this + 0x18),param_1); return; } plVar1 = *(long **)(this + 0x68); if (plVar1 != (long *)0x0) { /* WARNING: Could not recover jumptable at 0x0017455c. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(*plVar1 + 0x18))(plVar1,param_1); return; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00174569 to 0017457a has its CatchHandler @ 001745df */ Value::dump_abi_cxx11_((int)local_60,SUB81(param_1,0)); /* try { // try from 0017457b to 00174590 has its CatchHandler @ 001745c8 */ std::operator+((char *)local_40,(string *)"Undefined variable: "); /* try { // try from 00174594 to 001745b8 has its CatchHandler @ 001745b9 */ std::runtime_error::runtime_error(this_00,local_40); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_001fcff0,PTR__runtime_error_001fcf58); }
6,681
my_strnncollsp_8bit_bin
eloqsql/strings/ctype-bin.c
static int my_strnncollsp_8bit_bin(CHARSET_INFO * cs __attribute__((unused)), const uchar *a, size_t a_length, const uchar *b, size_t b_length) { const uchar *end; size_t length; end= a + (length= MY_MIN(a_length, b_length)); while (a < end) { if (*a++ != *b++) return ((int) a[-1] - (int) b[-1]); } return a_length == b_length ? 0 : a_length < b_length ? -my_strnncollsp_padspace_bin(b, b_length - length) : my_strnncollsp_padspace_bin(a, a_length - length); }
O0
c
my_strnncollsp_8bit_bin: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x20(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x108458 movq -0x20(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0x108460 movq -0x30(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x48(%rbp), %rax movq -0x50(%rbp), %rcx movq %rcx, -0x40(%rbp) addq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0x1084be movq -0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x18(%rbp) movzbl (%rax), %eax movq -0x28(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x28(%rbp) movzbl (%rcx), %ecx cmpl %ecx, %eax je 0x1084bc movq -0x18(%rbp), %rax movzbl -0x1(%rax), %eax movq -0x28(%rbp), %rcx movzbl -0x1(%rcx), %ecx subl %ecx, %eax movl %eax, -0x4(%rbp) jmp 0x108515 jmp 0x108473 movq -0x20(%rbp), %rax cmpq -0x30(%rbp), %rax jne 0x1084cf xorl %eax, %eax movl %eax, -0x54(%rbp) jmp 0x10850f movq -0x20(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x1084f5 movq -0x28(%rbp), %rdi movq -0x30(%rbp), %rsi subq -0x40(%rbp), %rsi callq 0x107c80 movl %eax, %ecx xorl %eax, %eax subl %ecx, %eax movl %eax, -0x58(%rbp) jmp 0x108509 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi subq -0x40(%rbp), %rsi callq 0x107c80 movl %eax, -0x58(%rbp) movl -0x58(%rbp), %eax movl %eax, -0x54(%rbp) movl -0x54(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x60, %rsp popq %rbp retq nop
my_strnncollsp_8bit_bin: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov rax, [rbp+var_18] mov [rbp+var_48], rax mov rax, [rbp+var_20] cmp rax, [rbp+var_30] jnb short loc_108458 mov rax, [rbp+var_20] mov [rbp+var_50], rax jmp short loc_108460 loc_108458: mov rax, [rbp+var_30] mov [rbp+var_50], rax loc_108460: mov rax, [rbp+var_48] mov rcx, [rbp+var_50] mov [rbp+var_40], rcx add rax, rcx mov [rbp+var_38], rax loc_108473: mov rax, [rbp+var_18] cmp rax, [rbp+var_38] jnb short loc_1084BE mov rax, [rbp+var_18] mov rcx, rax add rcx, 1 mov [rbp+var_18], rcx movzx eax, byte ptr [rax] mov rcx, [rbp+var_28] mov rdx, rcx add rdx, 1 mov [rbp+var_28], rdx movzx ecx, byte ptr [rcx] cmp eax, ecx jz short loc_1084BC mov rax, [rbp+var_18] movzx eax, byte ptr [rax-1] mov rcx, [rbp+var_28] movzx ecx, byte ptr [rcx-1] sub eax, ecx mov [rbp+var_4], eax jmp short loc_108515 loc_1084BC: jmp short loc_108473 loc_1084BE: mov rax, [rbp+var_20] cmp rax, [rbp+var_30] jnz short loc_1084CF xor eax, eax mov [rbp+var_54], eax jmp short loc_10850F loc_1084CF: mov rax, [rbp+var_20] cmp rax, [rbp+var_30] jnb short loc_1084F5 mov rdi, [rbp+var_28] mov rsi, [rbp+var_30] sub rsi, [rbp+var_40] call my_strnncollsp_padspace_bin mov ecx, eax xor eax, eax sub eax, ecx mov [rbp+var_58], eax jmp short loc_108509 loc_1084F5: mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] sub rsi, [rbp+var_40] call my_strnncollsp_padspace_bin mov [rbp+var_58], eax loc_108509: mov eax, [rbp+var_58] mov [rbp+var_54], eax loc_10850F: mov eax, [rbp+var_54] mov [rbp+var_4], eax loc_108515: mov eax, [rbp+var_4] add rsp, 60h pop rbp retn
long long my_strnncollsp_8bit_bin( long long a1, unsigned __int8 *a2, unsigned long long a3, unsigned __int8 *a4, unsigned long long a5) { unsigned __int8 *v5; // rax unsigned __int8 *v6; // rcx unsigned long long v10; // [rsp+10h] [rbp-50h] unsigned __int8 *v12; // [rsp+48h] [rbp-18h] v12 = a2; if ( a3 >= a5 ) v10 = a5; else v10 = a3; while ( v12 < &a2[v10] ) { v5 = v12++; v6 = a4++; if ( *v5 != *v6 ) return (unsigned int)(*(v12 - 1) - *(a4 - 1)); } if ( a3 == a5 ) { return 0; } else if ( a3 >= a5 ) { return (unsigned int)my_strnncollsp_padspace_bin(v12, a3 - v10); } else { return (unsigned int)-(int)my_strnncollsp_padspace_bin(a4, a5 - v10); } }
6,682
my_strnncollsp_8bit_bin
eloqsql/strings/ctype-bin.c
static int my_strnncollsp_8bit_bin(CHARSET_INFO * cs __attribute__((unused)), const uchar *a, size_t a_length, const uchar *b, size_t b_length) { const uchar *end; size_t length; end= a + (length= MY_MIN(a_length, b_length)); while (a < end) { if (*a++ != *b++) return ((int) a[-1] - (int) b[-1]); } return a_length == b_length ? 0 : a_length < b_length ? -my_strnncollsp_padspace_bin(b, b_length - length) : my_strnncollsp_padspace_bin(a, a_length - length); }
O3
c
my_strnncollsp_8bit_bin: pushq %rbp movq %rsp, %rbp cmpq %r8, %rdx movq %r8, %rdi cmovbq %rdx, %rdi leaq (%rsi,%rdi), %r9 cmpq %r9, %rsi jae 0xc3d4d movzbl (%rsi), %eax incq %rsi movzbl (%rcx), %r10d incq %rcx cmpb %r10b, %al je 0xc3d31 subl %r10d, %eax jmp 0xc3d54 xorl %eax, %eax cmpq %r8, %rdx jne 0xc3d56 popq %rbp retq jae 0xc3d73 subq %rdi, %r8 je 0xc3d54 xorl %edx, %edx xorl %eax, %eax cmpb $0x20, (%rcx,%rdx) jb 0xc3d8e jne 0xc3d95 incq %rdx cmpq %rdx, %r8 jne 0xc3d61 jmp 0xc3d54 subq %rdi, %rdx je 0xc3d54 xorl %ecx, %ecx xorl %eax, %eax cmpb $0x20, (%rsi,%rcx) jb 0xc3d95 jne 0xc3d8e incq %rcx cmpq %rcx, %rdx jne 0xc3d7c jmp 0xc3d54 movl $0x1, %eax jmp 0xc3d54 movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0xc3d54
my_strnncollsp_8bit_bin: push rbp mov rbp, rsp cmp rdx, r8 mov rdi, r8 cmovb rdi, rdx lea r9, [rsi+rdi] loc_C3D31: cmp rsi, r9 jnb short loc_C3D4D movzx eax, byte ptr [rsi] inc rsi movzx r10d, byte ptr [rcx] inc rcx cmp al, r10b jz short loc_C3D31 sub eax, r10d jmp short loc_C3D54 loc_C3D4D: xor eax, eax cmp rdx, r8 jnz short loc_C3D56 loc_C3D54: pop rbp retn loc_C3D56: jnb short loc_C3D73 sub r8, rdi jz short loc_C3D54 xor edx, edx xor eax, eax loc_C3D61: cmp byte ptr [rcx+rdx], 20h ; ' ' jb short loc_C3D8E jnz short loc_C3D95 inc rdx cmp r8, rdx jnz short loc_C3D61 jmp short loc_C3D54 loc_C3D73: sub rdx, rdi jz short loc_C3D54 xor ecx, ecx xor eax, eax loc_C3D7C: cmp byte ptr [rsi+rcx], 20h ; ' ' jb short loc_C3D95 jnz short loc_C3D8E inc rcx cmp rdx, rcx jnz short loc_C3D7C jmp short loc_C3D54 loc_C3D8E: mov eax, 1 jmp short loc_C3D54 loc_C3D95: mov eax, 0FFFFFFFFh jmp short loc_C3D54
long long my_strnncollsp_8bit_bin( long long a1, unsigned __int8 *a2, unsigned long long a3, unsigned __int8 *a4, unsigned long long a5) { unsigned long long v5; // rdi unsigned __int8 *v6; // r9 int v7; // eax int v8; // r10d long long result; // rax unsigned long long v10; // r8 long long v11; // rdx unsigned long long v12; // rdx long long v13; // rcx v5 = a5; if ( a3 < a5 ) v5 = a3; v6 = &a2[v5]; while ( a2 < v6 ) { v7 = *a2++; v8 = *a4++; if ( (_BYTE)v7 != (_BYTE)v8 ) return (unsigned int)(v7 - v8); } result = 0LL; if ( a3 != a5 ) { if ( a3 >= a5 ) { v12 = a3 - v5; if ( v12 ) { v13 = 0LL; result = 0LL; while ( a2[v13] >= 0x20u ) { if ( a2[v13] != 32 ) return 1LL; if ( v12 == ++v13 ) return result; } return 0xFFFFFFFFLL; } } else { v10 = a5 - v5; if ( v10 ) { v11 = 0LL; result = 0LL; while ( a4[v11] >= 0x20u ) { if ( a4[v11] != 32 ) return 0xFFFFFFFFLL; if ( v10 == ++v11 ) return result; } return 1LL; } } } return result; }
my_strnncollsp_8bit_bin: PUSH RBP MOV RBP,RSP CMP RDX,R8 MOV RDI,R8 CMOVC RDI,RDX LEA R9,[RSI + RDI*0x1] LAB_001c3d31: CMP RSI,R9 JNC 0x001c3d4d MOVZX EAX,byte ptr [RSI] INC RSI MOVZX R10D,byte ptr [RCX] INC RCX CMP AL,R10B JZ 0x001c3d31 SUB EAX,R10D JMP 0x001c3d54 LAB_001c3d4d: XOR EAX,EAX CMP RDX,R8 JNZ 0x001c3d56 LAB_001c3d54: POP RBP RET LAB_001c3d56: JNC 0x001c3d73 SUB R8,RDI JZ 0x001c3d54 XOR EDX,EDX XOR EAX,EAX LAB_001c3d61: CMP byte ptr [RCX + RDX*0x1],0x20 JC 0x001c3d8e JNZ 0x001c3d95 INC RDX CMP R8,RDX JNZ 0x001c3d61 JMP 0x001c3d54 LAB_001c3d73: SUB RDX,RDI JZ 0x001c3d54 XOR ECX,ECX XOR EAX,EAX LAB_001c3d7c: CMP byte ptr [RSI + RCX*0x1],0x20 JC 0x001c3d95 JNZ 0x001c3d8e INC RCX CMP RDX,RCX JNZ 0x001c3d7c JMP 0x001c3d54 LAB_001c3d8e: MOV EAX,0x1 JMP 0x001c3d54 LAB_001c3d95: MOV EAX,0xffffffff JMP 0x001c3d54
int my_strnncollsp_8bit_bin (int8 param_1,byte *param_2,ulong param_3,byte *param_4,ulong param_5) { byte *pbVar1; byte bVar2; byte bVar3; long lVar4; ulong uVar5; uVar5 = param_5; if (param_3 < param_5) { uVar5 = param_3; } pbVar1 = param_2 + uVar5; while (param_2 < pbVar1) { bVar2 = *param_2; param_2 = param_2 + 1; bVar3 = *param_4; param_4 = param_4 + 1; if (bVar2 != bVar3) { return (uint)bVar2 - (uint)bVar3; } } if (param_3 == param_5) { return 0; } if (param_3 < param_5) { if (param_5 == uVar5) { return 0; } lVar4 = 0; while( true ) { if (param_4[lVar4] < 0x20) { return 1; } if (param_4[lVar4] != 0x20) break; lVar4 = lVar4 + 1; if (param_5 - uVar5 == lVar4) { return 0; } } return -1; } if (param_3 != uVar5) { lVar4 = 0; while( true ) { if (param_2[lVar4] < 0x20) { return -1; } if (param_2[lVar4] != 0x20) break; lVar4 = lVar4 + 1; if (param_3 - uVar5 == lVar4) { return 0; } } return 1; } return 0; }
6,683
evmone::advanced::execute(evmone::advanced::AdvancedExecutionState&, evmone::advanced::AdvancedCodeAnalysis const&)
corpus-core[P]colibri-stateless/build_O1/_deps/evmone_external-src/lib/evmone/advanced_execution.cpp
evmc_result execute(AdvancedExecutionState& state, const AdvancedCodeAnalysis& analysis) noexcept { state.analysis.advanced = &analysis; // Allow accessing the analysis by instructions. const auto* instr = state.analysis.advanced->instrs.data(); // Get the first instruction. while (instr != nullptr) instr = instr->fn(instr, state); const auto gas_left = (state.status == EVMC_SUCCESS || state.status == EVMC_REVERT) ? state.gas_left : 0; const auto gas_refund = (state.status == EVMC_SUCCESS) ? state.gas_refund : 0; assert(state.output_size != 0 || state.output_offset == 0); return evmc::make_result(state.status, gas_left, gas_refund, state.memory.data() + state.output_offset, state.output_size); }
O1
cpp
evmone::advanced::execute(evmone::advanced::AdvancedExecutionState&, evmone::advanced::AdvancedCodeAnalysis const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq %rdx, 0x1f8(%rsi) movq (%rdx), %rax testq %rax, %rax je 0x3183a movq %rax, %rdi movq %r14, %rsi callq *(%rax) jmp 0x3182b movl 0x78(%r14), %ebp testl $0xfffffffd, %ebp # imm = 0xFFFFFFFD jne 0x3184f movq 0x220(%r14), %r13 jmp 0x31852 xorl %r13d, %r13d testl %ebp, %ebp jne 0x3185b movq (%r14), %rsi jmp 0x3185d xorl %esi, %esi movq 0x80(%r14), %r12 movq 0x88(%r14), %r15 testq %r15, %r15 setne %al testq %r12, %r12 sete %cl orb %al, %cl je 0x31904 addq 0x8(%r14), %r12 xorps %xmm0, %xmm0 movups %xmm0, 0x30(%rbx) movups %xmm0, 0x20(%rbx) movups %xmm0, 0x10(%rbx) movups %xmm0, (%rbx) movq $0x0, 0x40(%rbx) testq %r15, %r15 je 0x318e8 movq %rsi, (%rsp) movq %r15, %rdi callq 0x22420 movq %rax, %r14 testq %rax, %rax je 0x318d9 movq %r14, %rdi movq %r12, %rsi movq %r15, %rdx callq 0x22090 movq %r14, 0x18(%rbx) movq %r15, 0x20(%rbx) leaq 0x5c1(%rip), %rax # 0x31e94 movq %rax, 0x28(%rbx) jmp 0x318df movl $0xfffffffd, (%rbx) # imm = 0xFFFFFFFD testq %r14, %r14 movq (%rsp), %rsi je 0x318f2 movl %ebp, (%rbx) movq %r13, 0x8(%rbx) movq %rsi, 0x10(%rbx) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x55851(%rip), %rdi # 0x8715c leaq 0x5587d(%rip), %rsi # 0x8718f leaq 0x55903(%rip), %rcx # 0x8721c movl $0x18, %edx callq 0x22110 movq %rax, %rdi callq 0x30731
_ZN6evmone8advanced7executeERNS0_22AdvancedExecutionStateERKNS0_20AdvancedCodeAnalysisE: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rsi mov rbx, rdi mov [rsi+1F8h], rdx mov rax, [rdx] loc_3182B: test rax, rax jz short loc_3183A mov rdi, rax mov rsi, r14 call qword ptr [rax] jmp short loc_3182B loc_3183A: mov ebp, [r14+78h] test ebp, 0FFFFFFFDh jnz short loc_3184F mov r13, [r14+220h] jmp short loc_31852 loc_3184F: xor r13d, r13d loc_31852: test ebp, ebp jnz short loc_3185B mov rsi, [r14] jmp short loc_3185D loc_3185B: xor esi, esi loc_3185D: mov r12, [r14+80h] mov r15, [r14+88h] test r15, r15 setnz al test r12, r12 setz cl or cl, al jz loc_31904 add r12, [r14+8] xorps xmm0, xmm0 movups xmmword ptr [rbx+30h], xmm0 movups xmmword ptr [rbx+20h], xmm0 movups xmmword ptr [rbx+10h], xmm0 movups xmmword ptr [rbx], xmm0 mov qword ptr [rbx+40h], 0 test r15, r15 jz short loc_318E8 mov [rsp+38h+var_38], rsi mov rdi, r15 call _malloc mov r14, rax test rax, rax jz short loc_318D9 mov rdi, r14 mov rsi, r12 mov rdx, r15 call _memcpy mov [rbx+18h], r14 mov [rbx+20h], r15 lea rax, _ZL23evmc_free_result_memoryPK11evmc_result_0; evmc_free_result_memory(evmc_result const*) mov [rbx+28h], rax jmp short loc_318DF loc_318D9: mov dword ptr [rbx], 0FFFFFFFDh loc_318DF: test r14, r14 mov rsi, [rsp+38h+var_38] jz short loc_318F2 loc_318E8: mov [rbx], ebp mov [rbx+8], r13 mov [rbx+10h], rsi loc_318F2: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_31904: lea rdi, aStateOutputSiz; "state.output_size != 0 || state.output_"... lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aEvmcResultEvmo; "evmc_result evmone::advanced::execute(A"... mov edx, 18h call ___assert_fail mov rdi, rax call __clang_call_terminate
long long evmone::advanced::execute(long long a1, long long *a2, long long ( ***a3)(_QWORD, long long *)) { long long ( **i)(_QWORD, long long *); // rax int v5; // ebp long long v6; // r13 long long v7; // rsi long long v8; // r15 long long v9; // rax long long v10; // r14 a2[63] = (long long)a3; for ( i = *a3; i; i = (long long ( **)(_QWORD, long long *))(*i)(i, a2) ) ; v5 = *((_DWORD *)a2 + 30); if ( (v5 & 0xFFFFFFFD) != 0 ) v6 = 0LL; else v6 = a2[68]; if ( v5 ) v7 = 0LL; else v7 = *a2; v8 = a2[17]; if ( v8 == 0 && a2[16] != 0 ) __assert_fail( "state.output_size != 0 || state.output_offset == 0", "/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O1/_deps/evmone_external-src/lib/evm" "one/advanced_execution.cpp", 24LL, "evmc_result evmone::advanced::execute(AdvancedExecutionState &, const AdvancedCodeAnalysis &)"); *(_OWORD *)(a1 + 48) = 0LL; *(_OWORD *)(a1 + 32) = 0LL; *(_OWORD *)(a1 + 16) = 0LL; *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 64) = 0LL; if ( !v8 || ((v9 = malloc(v8), (v10 = v9) == 0) ? (*(_DWORD *)a1 = -3) : (memcpy(v9), *(_QWORD *)(a1 + 24) = v10, *(_QWORD *)(a1 + 32) = v8, *(_QWORD *)(a1 + 40) = evmc_free_result_memory), v10) ) { *(_DWORD *)a1 = v5; *(_QWORD *)(a1 + 8) = v6; *(_QWORD *)(a1 + 16) = v7; } return a1; }
execute: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV qword ptr [RSI + 0x1f8],RDX MOV RAX,qword ptr [RDX] LAB_0013182b: TEST RAX,RAX JZ 0x0013183a LAB_00131830: MOV RDI,RAX MOV RSI,R14 CALL qword ptr [RAX] LAB_00131838: JMP 0x0013182b LAB_0013183a: MOV EBP,dword ptr [R14 + 0x78] TEST EBP,0xfffffffd JNZ 0x0013184f MOV R13,qword ptr [R14 + 0x220] JMP 0x00131852 LAB_0013184f: XOR R13D,R13D LAB_00131852: TEST EBP,EBP JNZ 0x0013185b MOV RSI,qword ptr [R14] JMP 0x0013185d LAB_0013185b: XOR ESI,ESI LAB_0013185d: MOV R12,qword ptr [R14 + 0x80] MOV R15,qword ptr [R14 + 0x88] TEST R15,R15 SETNZ AL TEST R12,R12 SETZ CL OR CL,AL JZ 0x00131904 ADD R12,qword ptr [R14 + 0x8] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOVUPS xmmword ptr [RBX + 0x10],XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RBX + 0x40],0x0 TEST R15,R15 JZ 0x001318e8 MOV qword ptr [RSP],RSI MOV RDI,R15 CALL 0x00122420 MOV R14,RAX TEST RAX,RAX JZ 0x001318d9 MOV RDI,R14 MOV RSI,R12 MOV RDX,R15 CALL 0x00122090 MOV qword ptr [RBX + 0x18],R14 MOV qword ptr [RBX + 0x20],R15 LEA RAX,[0x131e94] MOV qword ptr [RBX + 0x28],RAX JMP 0x001318df LAB_001318d9: MOV dword ptr [RBX],0xfffffffd LAB_001318df: TEST R14,R14 MOV RSI,qword ptr [RSP] JZ 0x001318f2 LAB_001318e8: MOV dword ptr [RBX],EBP MOV qword ptr [RBX + 0x8],R13 MOV qword ptr [RBX + 0x10],RSI LAB_001318f2: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00131904: LEA RDI,[0x18715c] LEA RSI,[0x18718f] LEA RCX,[0x18721c] MOV EDX,0x18 CALL 0x00122110
/* evmone::advanced::execute(evmone::advanced::AdvancedExecutionState&, evmone::advanced::AdvancedCodeAnalysis const&) */ advanced * __thiscall evmone::advanced::execute (advanced *this,AdvancedExecutionState *param_1,AdvancedCodeAnalysis *param_2) { uint uVar1; long lVar2; size_t __size; long lVar3; int8 *puVar4; void *__dest; int8 uVar5; int8 uVar6; *(AdvancedCodeAnalysis **)(param_1 + 0x1f8) = param_2; for (puVar4 = *(int8 **)param_2; puVar4 != (int8 *)0x0; puVar4 = (int8 *)(*(code *)*puVar4)(puVar4)) { /* try { // try from 00131830 to 00131837 has its CatchHandler @ 00131923 */ } uVar1 = *(uint *)(param_1 + 0x78); if ((uVar1 & 0xfffffffd) == 0) { uVar6 = *(int8 *)(param_1 + 0x220); } else { uVar6 = 0; } if (uVar1 == 0) { uVar5 = *(int8 *)param_1; } else { uVar5 = 0; } lVar2 = *(long *)(param_1 + 0x80); __size = *(size_t *)(param_1 + 0x88); if (lVar2 == 0 || __size != 0) { lVar3 = *(long *)(param_1 + 8); *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x40) = 0; if (__size != 0) { __dest = malloc(__size); if (__dest == (void *)0x0) { *(int4 *)this = 0xfffffffd; return this; } memcpy(__dest,(void *)(lVar2 + lVar3),__size); *(void **)(this + 0x18) = __dest; *(size_t *)(this + 0x20) = __size; *(code **)(this + 0x28) = evmc_free_result_memory; } *(uint *)this = uVar1; *(int8 *)(this + 8) = uVar6; *(int8 *)(this + 0x10) = uVar5; return this; } /* WARNING: Subroutine does not return */ __assert_fail("state.output_size != 0 || state.output_offset == 0", "/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O1/_deps/evmone_external-src/lib/evmone/advanced_execution.cpp" ,0x18, "evmc_result evmone::advanced::execute(AdvancedExecutionState &, const AdvancedCodeAnalysis &)" ); }
6,684
glfw_fminf
untodesu[P]riteg/build_O3/_deps/glfw-src/src/init.c
float _glfw_fminf(float a, float b) { if (a != a) return b; else if (b != b) return a; else if (a < b) return a; else return b; }
O3
c
glfw_fminf: ucomiss %xmm0, %xmm0 jp 0x18e78 ucomiss %xmm1, %xmm1 jp 0x18e75 minss %xmm1, %xmm0 movaps %xmm0, %xmm1 movaps %xmm1, %xmm0 retq
_glfw_fminf: ucomiss xmm0, xmm0 jp short loc_18E78 ucomiss xmm1, xmm1 jp short loc_18E75 minss xmm0, xmm1 loc_18E75: movaps xmm1, xmm0 loc_18E78: movaps xmm0, xmm1 retn
float glfw_fminf(float a1, float a2) { return fminf(a1, a2); }
_glfw_fminf: UCOMISS XMM0,XMM0 JP 0x00118e78 UCOMISS XMM1,XMM1 JP 0x00118e75 MINSS XMM0,XMM1 LAB_00118e75: MOVAPS XMM1,XMM0 LAB_00118e78: MOVAPS XMM0,XMM1 RET
float _glfw_fminf(float param_1,float param_2) { if (param_2 <= param_1) { param_1 = param_2; } return param_1; }
6,685
r3d_light_get_matrix_proj_spot
r3d/src/details/r3d_light.c
Matrix r3d_light_get_matrix_proj_spot(r3d_light_t* light) { light->near = 0.05f; // Save near plane (can be used in shaders) light->far = light->range; // Save far plane (can be used in shaders) return MatrixPerspective(90 * DEG2RAD, 1.0, light->near, light->far); }
O3
c
r3d_light_get_matrix_proj_spot: pushq %rbp movq %rsp, %rbp movq %rdi, %rax movl $0x3d4ccccd, 0x9c(%rsi) # imm = 0x3D4CCCCD movss 0x94(%rsi), %xmm0 movss %xmm0, 0xa0(%rsi) xorps %xmm1, %xmm1 movups %xmm1, 0x14(%rdi) movups %xmm1, 0x24(%rdi) movups %xmm1, 0x30(%rdi) movups %xmm1, 0x4(%rdi) movss 0x6ee(%rip), %xmm1 # 0xe1290 addss %xmm0, %xmm1 movl $0x3f7fffff, (%rdi) # imm = 0x3F7FFFFF movq $0x3f7fffff, 0x14(%rdi) # imm = 0x3F7FFFFF movss 0x6d8(%rip), %xmm2 # 0xe1294 movaps %xmm0, %xmm3 addss %xmm2, %xmm3 xorps 0x6f6(%rip), %xmm3 # 0xe12c0 divss %xmm1, %xmm3 movss %xmm3, 0x28(%rdi) mulss %xmm2, %xmm0 mulss 0x449(%rip), %xmm0 # 0xe1028 movl $0xbf800000, 0x38(%rdi) # imm = 0xBF800000 divss %xmm1, %xmm0 movss %xmm0, 0x2c(%rdi) popq %rbp retq
r3d_light_get_matrix_proj_spot: push rbp mov rbp, rsp mov rax, rdi mov dword ptr [rsi+9Ch], 3D4CCCCDh movss xmm0, dword ptr [rsi+94h] movss dword ptr [rsi+0A0h], xmm0 xorps xmm1, xmm1 movups xmmword ptr [rdi+14h], xmm1 movups xmmword ptr [rdi+24h], xmm1 movups xmmword ptr [rdi+30h], xmm1 movups xmmword ptr [rdi+4], xmm1 movss xmm1, cs:dword_E1290 addss xmm1, xmm0 mov dword ptr [rdi], 3F7FFFFFh mov qword ptr [rdi+14h], 3F7FFFFFh movss xmm2, cs:dword_E1294 movaps xmm3, xmm0 addss xmm3, xmm2 xorps xmm3, cs:xmmword_E12C0 divss xmm3, xmm1 movss dword ptr [rdi+28h], xmm3 mulss xmm0, xmm2 mulss xmm0, cs:dword_E1028 mov dword ptr [rdi+38h], 0BF800000h divss xmm0, xmm1 movss dword ptr [rdi+2Ch], xmm0 pop rbp retn
long long r3d_light_get_matrix_proj_spot(long long a1, long long a2) { long long result; // rax float v3; // xmm0_4 result = a1; *(_DWORD *)(a2 + 156) = 1028443341; v3 = *(float *)(a2 + 148); *(float *)(a2 + 160) = v3; *(_OWORD *)(a1 + 20) = 0LL; *(_OWORD *)(a1 + 36) = 0LL; *(_OWORD *)(a1 + 48) = 0LL; *(_OWORD *)(a1 + 4) = 0LL; *(_DWORD *)a1 = 1065353215; *(_QWORD *)(a1 + 20) = 1065353215LL; *(float *)(a1 + 40) = (float)-(float)(v3 + 0.050000001) / (float)(v3 + -0.050000001); *(_DWORD *)(a1 + 56) = -1082130432; *(float *)(a1 + 44) = (float)((float)(v3 * 0.050000001) * -2.0) / (float)(v3 + -0.050000001); return result; }
r3d_light_get_matrix_proj_spot: PUSH RBP MOV RBP,RSP MOV RAX,RDI MOV dword ptr [RSI + 0x9c],0x3d4ccccd MOVSS XMM0,dword ptr [RSI + 0x94] MOVSS dword ptr [RSI + 0xa0],XMM0 XORPS XMM1,XMM1 MOVUPS xmmword ptr [RDI + 0x14],XMM1 MOVUPS xmmword ptr [RDI + 0x24],XMM1 MOVUPS xmmword ptr [RDI + 0x30],XMM1 MOVUPS xmmword ptr [RDI + 0x4],XMM1 MOVSS XMM1,dword ptr [0x001e1290] ADDSS XMM1,XMM0 MOV dword ptr [RDI],0x3f7fffff MOV qword ptr [RDI + 0x14],0x3f7fffff MOVSS XMM2,dword ptr [0x001e1294] MOVAPS XMM3,XMM0 ADDSS XMM3,XMM2 XORPS XMM3,xmmword ptr [0x001e12c0] DIVSS XMM3,XMM1 MOVSS dword ptr [RDI + 0x28],XMM3 MULSS XMM0,XMM2 MULSS XMM0,dword ptr [0x001e1028] MOV dword ptr [RDI + 0x38],0xbf800000 DIVSS XMM0,XMM1 MOVSS dword ptr [RDI + 0x2c],XMM0 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int4 * r3d_light_get_matrix_proj_spot(int4 *param_1,long param_2) { float fVar1; float fVar2; float fVar3; *(int4 *)(param_2 + 0x9c) = 0x3d4ccccd; fVar2 = *(float *)(param_2 + 0x94); *(float *)(param_2 + 0xa0) = fVar2; *(int8 *)(param_1 + 5) = 0; *(int8 *)(param_1 + 7) = 0; *(int8 *)(param_1 + 9) = 0; *(int8 *)(param_1 + 0xb) = 0; *(int8 *)(param_1 + 0xc) = 0; *(int8 *)(param_1 + 0xe) = 0; *(int8 *)(param_1 + 1) = 0; *(int8 *)(param_1 + 3) = 0; fVar3 = DAT_001e1290 + fVar2; *param_1 = 0x3f7fffff; *(int8 *)(param_1 + 5) = 0x3f7fffff; fVar1 = DAT_001e1294; param_1[10] = (float)((uint)(fVar2 + DAT_001e1294) ^ _DAT_001e12c0) / fVar3; fVar2 = fVar2 * fVar1 * DAT_001e1028; param_1[0xe] = 0xbf800000; param_1[0xb] = fVar2 / fVar3; return param_1; }
6,686
coro::detail::task_self_deleting coro::detail::make_when_any_controller_task<std::vector<coro::task<long>, std::allocator<coro::task<long>>>, coro::task<long>, long&&, long>(std::vector<coro::task<long>, std::allocator<coro::task<long>>>, coro::event&, std::optional<long>&) (.destroy)
AlayaLite/build_O3/_deps/libcoro-src/include/coro/when_any.hpp
static auto make_when_any_controller_task( range_type awaitables, coro::event& notify, std::optional<return_type_base>& return_value) -> coro::detail::task_self_deleting { // These must live for as long as the longest running when_any task since each task tries to see // if it was the first to complete. Only the very first task to complete will set the return_value // and notify. coro::mutex m{}; std::atomic<bool> return_value_set{false}; // This detatched task will maintain the lifetime of all the when_any tasks. std::vector<coro::task<void>> tasks{}; if constexpr (std::ranges::sized_range<range_type>) { tasks.reserve(std::size(awaitables)); } for (auto&& a : awaitables) { tasks.emplace_back(make_when_any_task<awaitable_type, return_type_base>( std::move(a), m, return_value_set, notify, return_value)); } co_await coro::when_all(std::move(tasks)); co_return; }
O3
cpp
coro::detail::task_self_deleting coro::detail::make_when_any_controller_task<std::vector<coro::task<long>, std::allocator<coro::task<long>>>, coro::task<long>, long&&, long>(std::vector<coro::task<long>, std::allocator<coro::task<long>>>, coro::event&, std::optional<long>&) (.destroy): pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx cmpb $0x1, 0xb0(%rdi) jne 0x45d0 leaq 0x70(%rbx), %r14 leaq 0x58(%rbx), %r15 leaq 0x28(%rbx), %rdi callq 0x5780 movq %r14, %rdi callq 0x5490 movq %r15, %rdi callq 0x5490 leaq 0x10(%rbx), %rdi leaq 0x40(%rbx), %r14 callq 0x59dc movq %r14, %rdi callq 0x49b8 movl $0xb8, %esi movq %rbx, %rdi popq %rbx popq %r14 popq %r15 jmp 0x3250
_ZN4coro6detailL29make_when_any_controller_taskITkNSt6ranges5rangeESt6vectorINS_4taskIlEESaIS5_EETkNS_8concepts9awaitableES5_OllEENS0_18task_self_deletingET_RNS_5eventERSt8optionalIT2_E_destroy: push r15 push r14 push rbx mov rbx, rdi cmp byte ptr [rdi+0B0h], 1 jnz short loc_45D0 lea r14, [rbx+70h] lea r15, [rbx+58h] lea rdi, [rbx+28h] call _ZNSt6vectorIN4coro6detail13when_all_taskIvEESaIS3_EED2Ev; std::vector<coro::detail::when_all_task<void>>::~vector() mov rdi, r14 call _ZNSt6vectorIN4coro4taskIvEESaIS2_EED2Ev; std::vector<coro::task<void>>::~vector() mov rdi, r15 call _ZNSt6vectorIN4coro4taskIvEESaIS2_EED2Ev; std::vector<coro::task<void>>::~vector() loc_45D0: lea rdi, [rbx+10h]; this lea r14, [rbx+40h] call _ZN4coro6detail21promise_self_deletingD2Ev; coro::detail::promise_self_deleting::~promise_self_deleting() mov rdi, r14 call _ZNSt6vectorIN4coro4taskIlEESaIS2_EED2Ev; std::vector<coro::task<long>>::~vector() mov esi, 0B8h; unsigned __int64 mov rdi, rbx; void * pop rbx pop r14 pop r15 jmp __ZdlPvm; operator delete(void *,ulong)
void ZN4coro6detailL29make_when_any_controller_taskITkNSt6ranges5rangeESt6vectorINS_4taskIlEESaIS5_EETkNS_8concepts9awaitableES5_OllEENS0_18task_self_deletingET_RNS_5eventERSt8optionalIT2_E_destroy( char *a1) { if ( a1[176] == 1 ) { std::vector<coro::detail::when_all_task<void>>::~vector(a1 + 40); std::vector<coro::task<void>>::~vector(a1 + 112); std::vector<coro::task<void>>::~vector(a1 + 88); } coro::detail::promise_self_deleting::~promise_self_deleting((coro::detail::promise_self_deleting *)(a1 + 16)); std::vector<coro::task<long>>::~vector(a1 + 64); operator delete(a1, 0xB8uLL); }
_ZN4coro6detailL29make_when_any_controller_taskITkNSt6ranges5rangeESt6vectorINS_4taskIlEESaIS5_EETkNS_8concepts9awaitableES5_OllEENS0_18task_self_deletingET_RNS_5eventERSt8optionalIT2_E.destroy: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDI CMP byte ptr [RDI + 0xb0],0x1 JNZ 0x001045d0 LEA R14,[RBX + 0x70] LEA R15,[RBX + 0x58] LEA RDI,[RBX + 0x28] CALL 0x00105780 MOV RDI,R14 CALL 0x00105490 MOV RDI,R15 CALL 0x00105490 LAB_001045d0: LEA RDI,[RBX + 0x10] LEA R14,[RBX + 0x40] CALL 0x001059dc MOV RDI,R14 CALL 0x001049b8 MOV ESI,0xb8 MOV RDI,RBX POP RBX POP R14 POP R15 JMP 0x00103250
void _ZN4coro6detailL29make_when_any_controller_taskITkNSt6ranges5rangeESt6vectorINS_4taskIlEESaIS5_EETkNS_8concepts9awaitableES5_OllEENS0_18task_self_deletingET_RNS_5eventERSt8optionalIT2_E_destroy (void *param_1) { if (*(char *)((long)param_1 + 0xb0) == '\x01') { std::vector<coro::detail::when_all_task<void>,std::allocator<coro::detail::when_all_task<void>>> ::~vector((vector<coro::detail::when_all_task<void>,std::allocator<coro::detail::when_all_task<void>>> *)((long)param_1 + 0x28)); std::vector<coro::task<void>,std::allocator<coro::task<void>>>::~vector ((vector<coro::task<void>,std::allocator<coro::task<void>>> *)((long)param_1 + 0x70)); std::vector<coro::task<void>,std::allocator<coro::task<void>>>::~vector ((vector<coro::task<void>,std::allocator<coro::task<void>>> *)((long)param_1 + 0x58)); } coro::detail::promise_self_deleting::~promise_self_deleting ((promise_self_deleting *)((long)param_1 + 0x10)); std::vector<coro::task<long>,std::allocator<coro::task<long>>>::~vector ((vector<coro::task<long>,std::allocator<coro::task<long>>> *)((long)param_1 + 0x40)); operator_delete(param_1,0xb8); return; }
6,687
testing::TestSuite::GetTestInfo(int) const
giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest-internal-inl.h
inline E GetElementOr(const std::vector<E>& v, int i, E default_value) { return (i < 0 || i >= static_cast<int>(v.size())) ? default_value : v[static_cast<size_t>(i)]; }
O3
c
testing::TestSuite::GetTestInfo(int) const: testl %esi, %esi js 0x216c7 movq 0x48(%rdi), %rax movq 0x50(%rdi), %rcx subq %rax, %rcx shrq $0x2, %rcx cmpl %esi, %ecx jle 0x216c7 movl %esi, %ecx movslq (%rax,%rcx,4), %rax testq %rax, %rax js 0x216c7 movq 0x30(%rdi), %rcx movq (%rcx,%rax,8), %rax retq xorl %eax, %eax retq
_ZNK7testing9TestSuite11GetTestInfoEi: test esi, esi js short loc_216C7 mov rax, [rdi+48h] mov rcx, [rdi+50h] sub rcx, rax shr rcx, 2 cmp ecx, esi jle short loc_216C7 mov ecx, esi movsxd rax, dword ptr [rax+rcx*4] test rax, rax js short loc_216C7 mov rcx, [rdi+30h] mov rax, [rcx+rax*8] retn loc_216C7: xor eax, eax retn
long long testing::TestSuite::GetTestInfo(testing::TestSuite *this, int a2) { long long v2; // rax long long v3; // rax if ( a2 < 0 ) return 0LL; v2 = *((_QWORD *)this + 9); if ( (int)((unsigned long long)(*((_QWORD *)this + 10) - v2) >> 2) <= a2 ) return 0LL; v3 = *(int *)(v2 + 4LL * (unsigned int)a2); if ( v3 < 0 ) return 0LL; else return *(_QWORD *)(*((_QWORD *)this + 6) + 8 * v3); }
GetTestInfo: TEST ESI,ESI JS 0x001216c7 MOV RAX,qword ptr [RDI + 0x48] MOV RCX,qword ptr [RDI + 0x50] SUB RCX,RAX SHR RCX,0x2 CMP ECX,ESI JLE 0x001216c7 MOV ECX,ESI MOVSXD RAX,dword ptr [RAX + RCX*0x4] TEST RAX,RAX JS 0x001216c7 MOV RCX,qword ptr [RDI + 0x30] MOV RAX,qword ptr [RCX + RAX*0x8] RET LAB_001216c7: XOR EAX,EAX RET
/* testing::TestSuite::GetTestInfo(int) const */ int8 __thiscall testing::TestSuite::GetTestInfo(TestSuite *this,int param_1) { long lVar1; if (((-1 < param_1) && (param_1 < (int)((ulong)(*(long *)(this + 0x50) - *(long *)(this + 0x48)) >> 2))) && (lVar1 = (long)*(int *)(*(long *)(this + 0x48) + (ulong)(uint)param_1 * 4), -1 < lVar1)) { return *(int8 *)(*(long *)(this + 0x30) + lVar1 * 8); } return 0; }
6,688
LefDefParser::lefwBeginextRevision(int, int)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwBeginextRevision(int vers1, int vers2) { if (!lefwFile) return LEFW_UNINITIALIZED; if (!lefwDidInit) return LEFW_BAD_ORDER; if (lefwState != LEFW_BEGINEXT_START && lefwState != LEFW_BEGINEXT) return LEFW_BAD_ORDER; if (lefwWriteEncrypt) encPrint(lefwFile, (char*) "\n REVISION %d.%d", vers1, vers2); else fprintf(lefwFile, "\n REVISION %d.%d", vers1, vers2); lefwState = LEFW_BEGINEXT; lefwLines++; return LEFW_OK; }
O0
cpp
LefDefParser::lefwBeginextRevision(int, int): subq $0x18, %rsp movl %edi, 0x10(%rsp) movl %esi, 0xc(%rsp) leaq 0x9123d(%rip), %rax # 0xc5250 cmpq $0x0, (%rax) jne 0x34026 movl $0x1, 0x14(%rsp) jmp 0x340d6 leaq 0x91477(%rip), %rax # 0xc54a4 cmpl $0x0, (%rax) jne 0x3403f movl $0x2, 0x14(%rsp) jmp 0x340d6 leaq 0x9145a(%rip), %rax # 0xc54a0 cmpl $0x3, (%rax) je 0x34061 leaq 0x9144e(%rip), %rax # 0xc54a0 cmpl $0x14, (%rax) je 0x34061 movl $0x2, 0x14(%rsp) jmp 0x340d6 cmpl $0x0, 0x914d4(%rip) # 0xc553c je 0x3408c leaq 0x911df(%rip), %rax # 0xc5250 movq (%rax), %rdi movl 0x10(%rsp), %edx movl 0xc(%rsp), %ecx leaq 0x6091e(%rip), %rsi # 0x949a1 movb $0x0, %al callq 0x8bf50 jmp 0x340ac leaq 0x911bd(%rip), %rax # 0xc5250 movq (%rax), %rdi movl 0x10(%rsp), %edx movl 0xc(%rsp), %ecx leaq 0x608fc(%rip), %rsi # 0x949a1 movb $0x0, %al callq 0x2370 leaq 0x913ed(%rip), %rax # 0xc54a0 movl $0x14, (%rax) leaq 0x913dc(%rip), %rax # 0xc549c movl (%rax), %ecx addl $0x1, %ecx leaq 0x913d0(%rip), %rax # 0xc549c movl %ecx, (%rax) movl $0x0, 0x14(%rsp) movl 0x14(%rsp), %eax addq $0x18, %rsp retq nop
_ZN12LefDefParser20lefwBeginextRevisionEii: sub rsp, 18h mov [rsp+18h+var_8], edi mov [rsp+18h+var_C], esi lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile cmp qword ptr [rax], 0 jnz short loc_34026 mov [rsp+18h+var_4], 1 jmp loc_340D6 loc_34026: lea rax, _ZN12LefDefParser11lefwDidInitE; LefDefParser::lefwDidInit cmp dword ptr [rax], 0 jnz short loc_3403F mov [rsp+18h+var_4], 2 jmp loc_340D6 loc_3403F: lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 3 jz short loc_34061 lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 14h jz short loc_34061 mov [rsp+18h+var_4], 2 jmp short loc_340D6 loc_34061: cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt jz short loc_3408C lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] mov edx, [rsp+18h+var_8] mov ecx, [rsp+18h+var_C] lea rsi, aRevisionDD; "\n REVISION %d.%d" mov al, 0 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_340AC loc_3408C: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] mov edx, [rsp+18h+var_8] mov ecx, [rsp+18h+var_C] lea rsi, aRevisionDD; "\n REVISION %d.%d" mov al, 0 call _fprintf loc_340AC: lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov dword ptr [rax], 14h lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov [rax], ecx mov [rsp+18h+var_4], 0 loc_340D6: mov eax, [rsp+18h+var_4] add rsp, 18h retn
long long LefDefParser::lefwBeginextRevision(LefDefParser *this, int a2, int a3, long long a4, int a5, int a6) { if ( *(_QWORD *)&LefDefParser::lefwFile ) { if ( LefDefParser::lefwDidInit ) { if ( LefDefParser::lefwState == 3 || LefDefParser::lefwState == 20 ) { if ( LefDefParser::lefwWriteEncrypt ) LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)"\n REVISION %d.%d", (_DWORD)this, a2, a5, a6); else fprintf(*(_QWORD *)&LefDefParser::lefwFile, "\n REVISION %d.%d", (_DWORD)this, a2); LefDefParser::lefwState = 20; ++LefDefParser::lefwLines; return 0; } else { return 2; } } else { return 2; } } else { return 1; } }
lefwBeginextRevision: SUB RSP,0x18 MOV dword ptr [RSP + 0x10],EDI MOV dword ptr [RSP + 0xc],ESI LEA RAX,[0x1c5250] CMP qword ptr [RAX],0x0 JNZ 0x00134026 MOV dword ptr [RSP + 0x14],0x1 JMP 0x001340d6 LAB_00134026: LEA RAX,[0x1c54a4] CMP dword ptr [RAX],0x0 JNZ 0x0013403f MOV dword ptr [RSP + 0x14],0x2 JMP 0x001340d6 LAB_0013403f: LEA RAX,[0x1c54a0] CMP dword ptr [RAX],0x3 JZ 0x00134061 LEA RAX,[0x1c54a0] CMP dword ptr [RAX],0x14 JZ 0x00134061 MOV dword ptr [RSP + 0x14],0x2 JMP 0x001340d6 LAB_00134061: CMP dword ptr [0x001c553c],0x0 JZ 0x0013408c LEA RAX,[0x1c5250] MOV RDI,qword ptr [RAX] MOV EDX,dword ptr [RSP + 0x10] MOV ECX,dword ptr [RSP + 0xc] LEA RSI,[0x1949a1] MOV AL,0x0 CALL 0x0018bf50 JMP 0x001340ac LAB_0013408c: LEA RAX,[0x1c5250] MOV RDI,qword ptr [RAX] MOV EDX,dword ptr [RSP + 0x10] MOV ECX,dword ptr [RSP + 0xc] LEA RSI,[0x1949a1] MOV AL,0x0 CALL 0x00102370 LAB_001340ac: LEA RAX,[0x1c54a0] MOV dword ptr [RAX],0x14 LEA RAX,[0x1c549c] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x1c549c] MOV dword ptr [RAX],ECX MOV dword ptr [RSP + 0x14],0x0 LAB_001340d6: MOV EAX,dword ptr [RSP + 0x14] ADD RSP,0x18 RET
/* LefDefParser::lefwBeginextRevision(int, int) */ int4 LefDefParser::lefwBeginextRevision(int param_1,int param_2) { int4 local_4; if (lefwFile == (_IO_FILE *)0x0) { local_4 = 1; } else if (lefwDidInit == 0) { local_4 = 2; } else if ((lefwState == 3) || (lefwState == 0x14)) { if (lefwWriteEncrypt == 0) { fprintf(lefwFile,"\n REVISION %d.%d",(ulong)(uint)param_1,(ulong)(uint)param_2); } else { encPrint(lefwFile,"\n REVISION %d.%d",(ulong)(uint)param_1,(ulong)(uint)param_2); } lefwState = 0x14; lefwLines = lefwLines + 1; local_4 = 0; } else { local_4 = 2; } return local_4; }
6,689
YogaTest_aspect_ratio_defined_cross_with_margin_Test::YogaTest_aspect_ratio_defined_cross_with_margin_Test()
yoga-mod/tests/YGAspectRatioTest.cpp
TEST(YogaTest, aspect_ratio_defined_cross_with_margin) { YGNodeRef root = YGNodeNew(); YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNew(); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetAspectRatio(root_child0, 1); YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 10); YGNodeStyleSetMargin(root_child0, YGEdgeRight, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); ASSERT_EQ(100, YGNodeLayoutGetWidth(root)); ASSERT_EQ(100, YGNodeLayoutGetHeight(root)); ASSERT_EQ(50, YGNodeLayoutGetWidth(root_child0)); ASSERT_EQ(50, YGNodeLayoutGetHeight(root_child0)); YGNodeFreeRecursive(root); }
O0
cpp
YogaTest_aspect_ratio_defined_cross_with_margin_Test::YogaTest_aspect_ratio_defined_cross_with_margin_Test(): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x10(%rbp) callq 0x7047d0 movq -0x10(%rbp), %rax leaq 0x77c9bc(%rip), %rcx # 0x85d7f0 addq $0x10, %rcx movq %rcx, (%rax) addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax,%rax)
_ZN52YogaTest_aspect_ratio_defined_cross_with_margin_TestC2Ev: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8]; this mov [rbp+var_10], rdi call _ZN7testing4TestC2Ev; testing::Test::Test(void) mov rax, [rbp+var_10] lea rcx, _ZTV52YogaTest_aspect_ratio_defined_cross_with_margin_Test; `vtable for'YogaTest_aspect_ratio_defined_cross_with_margin_Test add rcx, 10h mov [rax], rcx add rsp, 10h pop rbp retn
void YogaTest_aspect_ratio_defined_cross_with_margin_Test::YogaTest_aspect_ratio_defined_cross_with_margin_Test( YogaTest_aspect_ratio_defined_cross_with_margin_Test *this) { testing::Test::Test(this); *(_QWORD *)this = (char *)&`vtable for'YogaTest_aspect_ratio_defined_cross_with_margin_Test + 16; }
YogaTest_aspect_ratio_defined_cross_with_margin_Test: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RDI CALL 0x008047d0 MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x95d7f0] ADD RCX,0x10 MOV qword ptr [RAX],RCX ADD RSP,0x10 POP RBP RET
/* YogaTest_aspect_ratio_defined_cross_with_margin_Test::YogaTest_aspect_ratio_defined_cross_with_margin_Test() */ void __thiscall YogaTest_aspect_ratio_defined_cross_with_margin_Test:: YogaTest_aspect_ratio_defined_cross_with_margin_Test (YogaTest_aspect_ratio_defined_cross_with_margin_Test *this) { testing::Test::Test((Test *)this); *(int ***)this = &PTR__YogaTest_aspect_ratio_defined_cross_with_margin_Test_0095d800; return; }
6,690
fmt::v11::detail::utf8_to_utf16::utf8_to_utf16(fmt::v11::basic_string_view<char>)::$_0::operator()(unsigned int, fmt::v11::basic_string_view<char>) const
zkingston[P]unknot/build_O0/_deps/fmt-src/include/fmt/format-inl.h
FMT_FUNC detail::utf8_to_utf16::utf8_to_utf16(string_view s) { for_each_codepoint(s, [this](uint32_t cp, string_view) { if (cp == invalid_code_point) FMT_THROW(std::runtime_error("invalid utf8")); if (cp <= 0xFFFF) { buffer_.push_back(static_cast<wchar_t>(cp)); } else { cp -= 0x10000; buffer_.push_back(static_cast<wchar_t>(0xD800 + (cp >> 10))); buffer_.push_back(static_cast<wchar_t>(0xDC00 + (cp & 0x3FF))); } return true; }); buffer_.push_back(0); }
O0
c
fmt::v11::detail::utf8_to_utf16::utf8_to_utf16(fmt::v11::basic_string_view<char>)::$_0::operator()(unsigned int, fmt::v11::basic_string_view<char>) const: subq $0x48, %rsp movq %rdx, 0x38(%rsp) movq %rcx, 0x40(%rsp) movq %rdi, 0x30(%rsp) movl %esi, 0x2c(%rsp) movq 0x30(%rsp), %rax movq (%rax), %rax movq %rax, 0x8(%rsp) cmpl $-0x1, 0x2c(%rsp) jne 0xa69ad movl $0x10, %edi callq 0x125d0 movq %rax, %rdi movq %rdi, %rax movq %rax, (%rsp) leaq 0x52a4ec(%rip), %rsi # 0x5d0e62 callq 0x12460 jmp 0xa697d movq (%rsp), %rdi movq 0x5e6660(%rip), %rsi # 0x68cfe8 movq 0x5e65c9(%rip), %rdx # 0x68cf58 callq 0x134c0 movq (%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x20(%rsp) movl %eax, 0x1c(%rsp) callq 0x12880 jmp 0xa6a26 cmpl $0xffff, 0x2c(%rsp) # imm = 0xFFFF ja 0xa69d0 movq 0x8(%rsp), %rdi movl 0x2c(%rsp), %eax movl %eax, 0x18(%rsp) leaq 0x18(%rsp), %rsi callq 0xa7970 jmp 0xa6a1d movq 0x8(%rsp), %rdi movl 0x2c(%rsp), %eax subl $0x10000, %eax # imm = 0x10000 movl %eax, 0x2c(%rsp) movl 0x2c(%rsp), %eax shrl $0xa, %eax addl $0xd800, %eax # imm = 0xD800 movl %eax, 0x14(%rsp) leaq 0x14(%rsp), %rsi callq 0xa7970 movq 0x8(%rsp), %rdi movl 0x2c(%rsp), %eax andl $0x3ff, %eax # imm = 0x3FF addl $0xdc00, %eax # imm = 0xDC00 movl %eax, 0x10(%rsp) leaq 0x10(%rsp), %rsi callq 0xa7970 movb $0x1, %al andb $0x1, %al addq $0x48, %rsp retq movq 0x20(%rsp), %rdi callq 0x13540
_ZZN3fmt3v116detail13utf8_to_utf16C1ENS0_17basic_string_viewIcEEENK3$_0clEjS4_: sub rsp, 48h mov [rsp+48h+var_10], rdx mov [rsp+48h+var_8], rcx mov [rsp+48h+var_18], rdi mov [rsp+48h+var_1C], esi mov rax, [rsp+48h+var_18] mov rax, [rax] mov [rsp+48h+var_40], rax cmp [rsp+48h+var_1C], 0FFFFFFFFh jnz short loc_A69AD mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rdi, rax; this mov rax, rdi mov [rsp+48h+var_48], rax lea rsi, aInvalidUtf8; "invalid utf8" call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short $+2 loc_A697D: mov rdi, [rsp+48h+var_48]; void * mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) call ___cxa_throw mov rdi, [rsp+48h+var_48]; void * mov rcx, rax mov eax, edx mov [rsp+48h+var_28], rcx mov [rsp+48h+var_2C], eax call ___cxa_free_exception jmp short loc_A6A26 loc_A69AD: cmp [rsp+48h+var_1C], 0FFFFh ja short loc_A69D0 mov rdi, [rsp+48h+var_40] mov eax, [rsp+48h+var_1C] mov [rsp+48h+var_30], eax lea rsi, [rsp+48h+var_30] call _ZN3fmt3v116detail6bufferIwE9push_backERKw; fmt::v11::detail::buffer<wchar_t>::push_back(wchar_t const&) jmp short loc_A6A1D loc_A69D0: mov rdi, [rsp+48h+var_40] mov eax, [rsp+48h+var_1C] sub eax, 10000h mov [rsp+48h+var_1C], eax mov eax, [rsp+48h+var_1C] shr eax, 0Ah add eax, 0D800h mov [rsp+48h+var_34], eax lea rsi, [rsp+48h+var_34] call _ZN3fmt3v116detail6bufferIwE9push_backERKw; fmt::v11::detail::buffer<wchar_t>::push_back(wchar_t const&) mov rdi, [rsp+48h+var_40] mov eax, [rsp+48h+var_1C] and eax, 3FFh add eax, 0DC00h mov [rsp+48h+var_38], eax lea rsi, [rsp+48h+var_38] call _ZN3fmt3v116detail6bufferIwE9push_backERKw; fmt::v11::detail::buffer<wchar_t>::push_back(wchar_t const&) loc_A6A1D: mov al, 1 and al, 1 add rsp, 48h retn loc_A6A26: mov rdi, [rsp+48h+var_28] call __Unwind_Resume
char fmt::v11::detail::utf8_to_utf16::utf8_to_utf16(fmt::v11::basic_string_view<char>)::$_0::operator()( _QWORD *a1, unsigned int a2, long long a3, long long a4) { std::runtime_error *exception; // [rsp+0h] [rbp-48h] long long v6; // [rsp+8h] [rbp-40h] int v7; // [rsp+10h] [rbp-38h] BYREF int v8; // [rsp+14h] [rbp-34h] BYREF unsigned int v9; // [rsp+18h] [rbp-30h] BYREF unsigned int v10; // [rsp+2Ch] [rbp-1Ch] _QWORD *v11; // [rsp+30h] [rbp-18h] long long v12; // [rsp+38h] [rbp-10h] long long v13; // [rsp+40h] [rbp-8h] v12 = a3; v13 = a4; v11 = a1; v10 = a2; v6 = *a1; if ( a2 == -1 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "invalid utf8"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( v10 > 0xFFFF ) { v10 -= 0x10000; v8 = (v10 >> 10) + 55296; fmt::v11::detail::buffer<wchar_t>::push_back(v6, &v8); v7 = (v10 & 0x3FF) + 56320; fmt::v11::detail::buffer<wchar_t>::push_back(v6, &v7); } else { v9 = v10; fmt::v11::detail::buffer<wchar_t>::push_back(v6, &v9); } return 1; }
operator(): SUB RSP,0x48 MOV qword ptr [RSP + 0x38],RDX MOV qword ptr [RSP + 0x40],RCX MOV qword ptr [RSP + 0x30],RDI MOV dword ptr [RSP + 0x2c],ESI MOV RAX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x8],RAX CMP dword ptr [RSP + 0x2c],-0x1 JNZ 0x001a69ad MOV EDI,0x10 CALL 0x001125d0 MOV RDI,RAX MOV RAX,RDI MOV qword ptr [RSP],RAX LAB_001a696f: LEA RSI,[0x6d0e62] CALL 0x00112460 LAB_001a697b: JMP 0x001a697d LAB_001a697d: MOV RDI,qword ptr [RSP] MOV RSI,qword ptr [0x0078cfe8] MOV RDX,qword ptr [0x0078cf58] CALL 0x001134c0 LAB_001a69ad: CMP dword ptr [RSP + 0x2c],0xffff JA 0x001a69d0 MOV RDI,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RSP + 0x2c] MOV dword ptr [RSP + 0x18],EAX LEA RSI,[RSP + 0x18] CALL 0x001a7970 JMP 0x001a6a1d LAB_001a69d0: MOV RDI,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RSP + 0x2c] SUB EAX,0x10000 MOV dword ptr [RSP + 0x2c],EAX MOV EAX,dword ptr [RSP + 0x2c] SHR EAX,0xa ADD EAX,0xd800 MOV dword ptr [RSP + 0x14],EAX LEA RSI,[RSP + 0x14] CALL 0x001a7970 MOV RDI,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RSP + 0x2c] AND EAX,0x3ff ADD EAX,0xdc00 MOV dword ptr [RSP + 0x10],EAX LEA RSI,[RSP + 0x10] CALL 0x001a7970 LAB_001a6a1d: MOV AL,0x1 AND AL,0x1 ADD RSP,0x48 RET
/* fmt::v11::detail::utf8_to_utf16::utf8_to_utf16(fmt::v11::basic_string_view<char>)::$_0::TEMPNAMEPLACEHOLDERVALUE(unsigned int, fmt::v11::basic_string_view<char>) const */ int8 fmt::v11::detail::utf8_to_utf16::utf8_to_utf16(fmt::v11::basic_string_view<char>)::$_0::operator() (int8 *param_1,wchar_t param_2,int8 param_3,int8 param_4) { buffer<wchar_t> *this; runtime_error *this_00; wchar_t local_38; wchar_t local_34; wchar_t local_30 [5]; wchar_t local_1c; int8 *local_18; int8 local_10; int8 local_8; this = (buffer<wchar_t> *)*param_1; local_1c = param_2; local_18 = param_1; local_10 = param_3; local_8 = param_4; if (param_2 == L'\xffffffff') { this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001a696f to 001a697a has its CatchHandler @ 001a6994 */ std::runtime_error::runtime_error(this_00,"invalid utf8"); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_0078cfe8,PTR__runtime_error_0078cf58); } if ((uint)param_2 < 0x10000) { local_30[0] = param_2; buffer<wchar_t>::push_back(this,local_30); } else { local_1c = param_2 + L'\xffff0000'; local_34 = ((uint)local_1c >> 10) + L'\xd800'; buffer<wchar_t>::push_back(this,&local_34); local_38 = (local_1c & 0x3ffU) + L'\xdc00'; buffer<wchar_t>::push_back(this,&local_38); } return 1; }
6,691
release_configuration_dirs
eloqsql/libmariadb/libmariadb/ma_default.c
void release_configuration_dirs() { if (configuration_dirs) { int i= 0; while (configuration_dirs[i]) free(configuration_dirs[i++]); free(configuration_dirs); } }
O0
c
release_configuration_dirs: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp leaq 0x216c1(%rip), %rax # 0x82d60 cmpq $0x0, (%rax) je 0x616f3 movl $0x0, -0x4(%rbp) leaq 0x216ad(%rip), %rax # 0x82d60 movq (%rax), %rax movslq -0x4(%rbp), %rcx cmpq $0x0, (%rax,%rcx,8) je 0x616e4 leaq 0x21698(%rip), %rax # 0x82d60 movq (%rax), %rax movl -0x4(%rbp), %ecx movl %ecx, %edx addl $0x1, %edx movl %edx, -0x4(%rbp) movslq %ecx, %rcx movq (%rax,%rcx,8), %rdi callq 0x14530 jmp 0x616ac leaq 0x21675(%rip), %rax # 0x82d60 movq (%rax), %rdi callq 0x14530 addq $0x10, %rsp popq %rbp retq nopl (%rax)
release_configuration_dirs: push rbp mov rbp, rsp sub rsp, 10h lea rax, configuration_dirs cmp qword ptr [rax], 0 jz short loc_616F3 mov [rbp+var_4], 0 loc_616AC: lea rax, configuration_dirs mov rax, [rax] movsxd rcx, [rbp+var_4] cmp qword ptr [rax+rcx*8], 0 jz short loc_616E4 lea rax, configuration_dirs mov rax, [rax] mov ecx, [rbp+var_4] mov edx, ecx add edx, 1 mov [rbp+var_4], edx movsxd rcx, ecx mov rdi, [rax+rcx*8] call _free jmp short loc_616AC loc_616E4: lea rax, configuration_dirs mov rdi, [rax] call _free loc_616F3: add rsp, 10h pop rbp retn
_QWORD *release_configuration_dirs() { _QWORD *result; // rax int v1; // ecx int i; // [rsp+Ch] [rbp-4h] result = configuration_dirs; if ( configuration_dirs[0] ) { for ( i = 0; *(_QWORD *)(configuration_dirs[0] + 8LL * i); ++i ) { v1 = i; free(*(_QWORD *)(configuration_dirs[0] + 8LL * v1)); } return (_QWORD *)free(configuration_dirs[0]); } return result; }
release_configuration_dirs: PUSH RBP MOV RBP,RSP SUB RSP,0x10 LEA RAX,[0x182d60] CMP qword ptr [RAX],0x0 JZ 0x001616f3 MOV dword ptr [RBP + -0x4],0x0 LAB_001616ac: LEA RAX,[0x182d60] MOV RAX,qword ptr [RAX] MOVSXD RCX,dword ptr [RBP + -0x4] CMP qword ptr [RAX + RCX*0x8],0x0 JZ 0x001616e4 LEA RAX,[0x182d60] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x4] MOV EDX,ECX ADD EDX,0x1 MOV dword ptr [RBP + -0x4],EDX MOVSXD RCX,ECX MOV RDI,qword ptr [RAX + RCX*0x8] CALL 0x00114530 JMP 0x001616ac LAB_001616e4: LEA RAX,[0x182d60] MOV RDI,qword ptr [RAX] CALL 0x00114530 LAB_001616f3: ADD RSP,0x10 POP RBP RET
void release_configuration_dirs(void) { int4 local_c; if (configuration_dirs != (void *)0x0) { local_c = 0; while (*(long *)((long)configuration_dirs + (long)local_c * 8) != 0) { free(*(void **)((long)configuration_dirs + (long)local_c * 8)); local_c = local_c + 1; } free(configuration_dirs); } return; }
6,692
main
Gabbar-v7[P]Aero/src/main.cpp
int main() { try { asio::io_context io_context; asio::ip::tcp::acceptor acceptor( io_context, asio::ip::tcp::endpoint(asio::ip::tcp::v4(), PORT)); std::cout << "Server is listening on port 6377...." << std::endl; while (true) { asio::ip::tcp::socket socket(io_context); acceptor.accept(socket); std::cout << "Client connected" << std::endl; std::thread(handle_client, std::move(socket)).detach(); } } catch (const std::exception &e) { std::cerr << "Error: " << e.what() << std::endl; } return 0; }
O0
cpp
main: pushq %rbp movq %rsp, %rbp subq $0x130, %rsp # imm = 0x130 movl $0x0, -0x4(%rbp) leaq -0x18(%rbp), %rdi callq 0xa7b0 jmp 0x946d callq 0xa8a0 movl %eax, -0xa0(%rbp) leaq -0x9c(%rbp), %rdi movq %rdi, -0x110(%rbp) leaq -0xa0(%rbp), %rsi movl $0x18e9, %edx # imm = 0x18E9 callq 0xa8c0 movq -0x110(%rbp), %rdx leaq -0x80(%rbp), %rdi leaq -0x18(%rbp), %rsi movl $0x1, %ecx xorl %r8d, %r8d callq 0xa900 jmp 0x94b5 movq 0x2aadc(%rip), %rdi # 0x33f98 leaq 0x19bf5(%rip), %rsi # 0x230b8 callq 0x83d0 movq %rax, -0x118(%rbp) jmp 0x94d1 movq -0x118(%rbp), %rdi movq 0x2aa69(%rip), %rsi # 0x33f48 callq 0x8410 jmp 0x94e6 jmp 0x94e8 jmp 0x94ea leaq -0xf8(%rbp), %rdi leaq -0x18(%rbp), %rsi xorl %edx, %edx callq 0xab90 jmp 0x94fe leaq -0x80(%rbp), %rdi leaq -0xf8(%rbp), %rsi xorl %edx, %edx callq 0xabc0 jmp 0x9512 movq 0x2aa7f(%rip), %rdi # 0x33f98 leaq 0x19bbd(%rip), %rsi # 0x230dd callq 0x83d0 movq %rax, -0x120(%rbp) jmp 0x952e movq -0x120(%rbp), %rdi movq 0x2aa0c(%rip), %rsi # 0x33f48 callq 0x8410 jmp 0x9543 leaq -0x8ba(%rip), %rsi # 0x8c90 leaq -0x100(%rbp), %rdi leaq -0xf8(%rbp), %rdx callq 0xac30 jmp 0x955f leaq -0x100(%rbp), %rdi callq 0x86b0 jmp 0x956d leaq -0x100(%rbp), %rdi callq 0xacf0 leaq -0xf8(%rbp), %rdi callq 0xad20 jmp 0x94e8 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x20(%rbp) movl %eax, -0x24(%rbp) jmp 0x95f8 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x20(%rbp) movl %eax, -0x24(%rbp) jmp 0x95ef movq %rax, %rcx movl %edx, %eax movq %rcx, -0x20(%rbp) movl %eax, -0x24(%rbp) jmp 0x95e6 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x20(%rbp) movl %eax, -0x24(%rbp) jmp 0x95da movq %rax, %rcx movl %edx, %eax movq %rcx, -0x20(%rbp) movl %eax, -0x24(%rbp) leaq -0x100(%rbp), %rdi callq 0xacf0 leaq -0xf8(%rbp), %rdi callq 0xad20 leaq -0x80(%rbp), %rdi callq 0xad40 leaq -0x18(%rbp), %rdi callq 0xad70 movl -0x24(%rbp), %eax movl $0x1, %ecx cmpl %ecx, %eax jne 0x9696 movq -0x20(%rbp), %rdi callq 0x81d0 movq %rax, -0x108(%rbp) movq 0x2a9c9(%rip), %rdi # 0x33fe8 leaq 0x19a8a(%rip), %rsi # 0x230b0 callq 0x83d0 movq %rax, -0x128(%rbp) jmp 0x9634 movq -0x108(%rbp), %rdi movq (%rdi), %rax movq 0x10(%rax), %rax callq *%rax movq -0x128(%rbp), %rdi movq %rax, %rsi callq 0x83d0 movq %rax, -0x130(%rbp) jmp 0x965c movq -0x130(%rbp), %rdi movq 0x2a8de(%rip), %rsi # 0x33f48 callq 0x8410 jmp 0x9671 callq 0x8660 xorl %eax, %eax addq $0x130, %rsp # imm = 0x130 popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0x20(%rbp) movl %eax, -0x24(%rbp) callq 0x8660 jmp 0x9694 jmp 0x9696 movq -0x20(%rbp), %rdi callq 0x86c0 movq %rax, %rdi callq 0xa750 nopw (%rax,%rax)
main: push rbp mov rbp, rsp sub rsp, 130h mov [rbp+var_4], 0 lea rdi, [rbp+var_18]; this call _ZN4asio10io_contextC2Ev; asio::io_context::io_context(void) jmp short $+2 loc_946D: call _ZN4asio2ip3tcp2v4Ev; asio::ip::tcp::v4(void) mov [rbp+var_A0], eax lea rdi, [rbp+var_9C] mov [rbp+var_110], rdi lea rsi, [rbp+var_A0] mov edx, 18E9h call _ZN4asio2ip14basic_endpointINS0_3tcpEEC2ERKS2_t; asio::ip::basic_endpoint<asio::ip::tcp>::basic_endpoint(asio::ip::tcp const&,ushort) mov rdx, [rbp+var_110] lea rdi, [rbp+var_80] lea rsi, [rbp+var_18] mov ecx, 1 xor r8d, r8d call _ZN4asio21basic_socket_acceptorINS_2ip3tcpENS_15any_io_executorEEC2INS_10io_contextEEERT_RKNS1_14basic_endpointIS2_EEbNS_10constraintIXsr14is_convertibleIS8_RNS_17execution_contextEEE5valueEiE4typeE jmp short $+2 loc_94B5: mov rdi, cs:_ZSt4cout_ptr lea rsi, aServerIsListen; "Server is listening on port 6377...." call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_118], rax jmp short $+2 loc_94D1: mov rdi, [rbp+var_118] mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &)) jmp short $+2 loc_94E6: jmp short $+2 loc_94E8: jmp short $+2 loc_94EA: lea rdi, [rbp+var_F8] lea rsi, [rbp+var_18] xor edx, edx call _ZN4asio19basic_stream_socketINS_2ip3tcpENS_15any_io_executorEEC2INS_10io_contextEEERT_NS_10constraintIXsr14is_convertibleIS8_RNS_17execution_contextEEE5valueEiE4typeE jmp short $+2 loc_94FE: lea rdi, [rbp+var_80] lea rsi, [rbp+var_F8] xor edx, edx call _ZN4asio21basic_socket_acceptorINS_2ip3tcpENS_15any_io_executorEE6acceptIS2_S3_EEvRNS_12basic_socketIT_T0_EENS_10constraintIXsr14is_convertibleIS2_S7_EE5valueEiE4typeE jmp short $+2 loc_9512: mov rdi, cs:_ZSt4cout_ptr lea rsi, aClientConnecte; "Client connected" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_120], rax jmp short $+2 loc_952E: mov rdi, [rbp+var_120] mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &)) jmp short $+2 loc_9543: lea rsi, _Z13handle_clientN4asio19basic_stream_socketINS_2ip3tcpENS_15any_io_executorEEE; handle_client(asio::basic_stream_socket<asio::ip::tcp,asio::any_io_executor>) lea rdi, [rbp+var_100] lea rdx, [rbp+var_F8] call _ZNSt6threadC2IRFvN4asio19basic_stream_socketINS1_2ip3tcpENS1_15any_io_executorEEEEJS6_EvEEOT_DpOT0_; std::thread::thread<void (&)(asio::basic_stream_socket<asio::ip::tcp,asio::any_io_executor>),asio::basic_stream_socket<asio::ip::tcp,asio::any_io_executor>,void>(void (&)(asio::basic_stream_socket<asio::ip::tcp,asio::any_io_executor>) &&,asio::basic_stream_socket<asio::ip::tcp,asio::any_io_executor> &&) jmp short $+2 loc_955F: lea rdi, [rbp+var_100]; this call __ZNSt6thread6detachEv; std::thread::detach(void) jmp short $+2 loc_956D: lea rdi, [rbp+var_100]; this call _ZNSt6threadD2Ev; std::thread::~thread() lea rdi, [rbp+var_F8] call _ZN4asio19basic_stream_socketINS_2ip3tcpENS_15any_io_executorEED2Ev; asio::basic_stream_socket<asio::ip::tcp,asio::any_io_executor>::~basic_stream_socket() jmp loc_94E8 mov rcx, rax mov eax, edx mov [rbp+var_20], rcx mov [rbp+var_24], eax jmp short loc_95F8 mov rcx, rax mov eax, edx mov [rbp+var_20], rcx mov [rbp+var_24], eax jmp short loc_95EF mov rcx, rax mov eax, edx mov [rbp+var_20], rcx mov [rbp+var_24], eax jmp short loc_95E6 mov rcx, rax mov eax, edx mov [rbp+var_20], rcx mov [rbp+var_24], eax jmp short loc_95DA mov rcx, rax mov eax, edx mov [rbp+var_20], rcx mov [rbp+var_24], eax lea rdi, [rbp+var_100]; this call _ZNSt6threadD2Ev; std::thread::~thread() loc_95DA: lea rdi, [rbp+var_F8] call _ZN4asio19basic_stream_socketINS_2ip3tcpENS_15any_io_executorEED2Ev; asio::basic_stream_socket<asio::ip::tcp,asio::any_io_executor>::~basic_stream_socket() loc_95E6: lea rdi, [rbp+var_80] call _ZN4asio21basic_socket_acceptorINS_2ip3tcpENS_15any_io_executorEED2Ev; asio::basic_socket_acceptor<asio::ip::tcp,asio::any_io_executor>::~basic_socket_acceptor() loc_95EF: lea rdi, [rbp+var_18]; this call _ZN4asio10io_contextD2Ev; asio::io_context::~io_context() loc_95F8: mov eax, [rbp+var_24] mov ecx, 1 cmp eax, ecx jnz loc_9696 mov rdi, [rbp+var_20]; void * call ___cxa_begin_catch mov [rbp+var_108], rax mov rdi, cs:_ZSt4cerr_ptr lea rsi, aError; "Error: " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_128], rax jmp short $+2 loc_9634: mov rdi, [rbp+var_108] mov rax, [rdi] mov rax, [rax+10h] call rax mov rdi, [rbp+var_128] mov rsi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_130], rax jmp short $+2 loc_965C: mov rdi, [rbp+var_130] mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &)) jmp short $+2 loc_9671: call ___cxa_end_catch xor eax, eax add rsp, 130h pop rbp retn mov rcx, rax mov eax, edx mov [rbp+var_20], rcx mov [rbp+var_24], eax call ___cxa_end_catch jmp short $+2 loc_9694: jmp short $+2 loc_9696: mov rdi, [rbp+var_20] call __Unwind_Resume mov rdi, rax call __clang_call_terminate
int main(int argc, const char **argv, const char **envp) { long long v4; // [rsp+10h] [rbp-120h] long long v5; // [rsp+18h] [rbp-118h] _BYTE v6[8]; // [rsp+30h] [rbp-100h] BYREF _BYTE v7[88]; // [rsp+38h] [rbp-F8h] BYREF int v8; // [rsp+90h] [rbp-A0h] BYREF _BYTE v9[28]; // [rsp+94h] [rbp-9Ch] BYREF _BYTE v10[92]; // [rsp+B0h] [rbp-80h] BYREF _BYTE v11[20]; // [rsp+118h] [rbp-18h] BYREF int v12; // [rsp+12Ch] [rbp-4h] v12 = 0; asio::io_context::io_context((asio::io_context *)v11); v8 = asio::ip::tcp::v4((asio::ip::tcp *)v11); asio::ip::basic_endpoint<asio::ip::tcp>::basic_endpoint(v9, &v8, 6377LL); asio::basic_socket_acceptor<asio::ip::tcp,asio::any_io_executor>::basic_socket_acceptor<asio::io_context>( v10, v11, v9, 1LL, 0LL); v5 = std::operator<<<std::char_traits<char>>(&std::cout, "Server is listening on port 6377...."); std::ostream::operator<<(v5, &std::endl<char,std::char_traits<char>>); while ( 1 ) { asio::basic_stream_socket<asio::ip::tcp,asio::any_io_executor>::basic_stream_socket<asio::io_context>(v7, v11, 0LL); asio::basic_socket_acceptor<asio::ip::tcp,asio::any_io_executor>::accept<asio::ip::tcp,asio::any_io_executor>( v10, v7, 0LL); v4 = std::operator<<<std::char_traits<char>>(&std::cout, "Client connected"); std::ostream::operator<<(v4, &std::endl<char,std::char_traits<char>>); std::thread::thread<void (&)(asio::basic_stream_socket<asio::ip::tcp,asio::any_io_executor>),asio::basic_stream_socket<asio::ip::tcp,asio::any_io_executor>,void>( v6, handle_client, v7); std::thread::detach((std::thread *)v6); std::thread::~thread((std::thread *)v6); asio::basic_stream_socket<asio::ip::tcp,asio::any_io_executor>::~basic_stream_socket(v7); } }
main: PUSH RBP MOV RBP,RSP SUB RSP,0x130 MOV dword ptr [RBP + -0x4],0x0 LAB_00109462: LEA RDI,[RBP + -0x18] CALL 0x0010a7b0 JMP 0x0010946d LAB_0010946d: CALL 0x0010a8a0 MOV dword ptr [RBP + -0xa0],EAX LEA RDI,[RBP + -0x9c] MOV qword ptr [RBP + -0x110],RDI LEA RSI,[RBP + -0xa0] MOV EDX,0x18e9 CALL 0x0010a8c0 MOV RDX,qword ptr [RBP + -0x110] LAB_0010949e: LEA RDI,[RBP + -0x80] LEA RSI,[RBP + -0x18] MOV ECX,0x1 XOR R8D,R8D CALL 0x0010a900 JMP 0x001094b5 LAB_001094b5: MOV RDI,qword ptr [0x00133f98] LEA RSI,[0x1230b8] CALL 0x001083d0 MOV qword ptr [RBP + -0x118],RAX JMP 0x001094d1 LAB_001094d1: MOV RDI,qword ptr [RBP + -0x118] MOV RSI,qword ptr [0x00133f48] CALL 0x00108410 JMP 0x001094e6 LAB_001094e6: JMP 0x001094e8 LAB_001094e8: JMP 0x001094ea LAB_001094ea: LEA RDI,[RBP + -0xf8] LEA RSI,[RBP + -0x18] XOR EDX,EDX CALL 0x0010ab90 JMP 0x001094fe LAB_001094fe: LEA RDI,[RBP + -0x80] LEA RSI,[RBP + -0xf8] XOR EDX,EDX CALL 0x0010abc0 JMP 0x00109512 LAB_00109512: MOV RDI,qword ptr [0x00133f98] LEA RSI,[0x1230dd] CALL 0x001083d0 MOV qword ptr [RBP + -0x120],RAX JMP 0x0010952e LAB_0010952e: MOV RDI,qword ptr [RBP + -0x120] MOV RSI,qword ptr [0x00133f48] CALL 0x00108410 JMP 0x00109543 LAB_00109543: LEA RSI,[0x108c90] LEA RDI,[RBP + -0x100] LEA RDX,[RBP + -0xf8] CALL 0x0010ac30 JMP 0x0010955f LAB_0010955f: LEA RDI,[RBP + -0x100] CALL 0x001086b0 LAB_0010956b: JMP 0x0010956d LAB_0010956d: LEA RDI,[RBP + -0x100] CALL 0x0010acf0 LEA RDI,[RBP + -0xf8] CALL 0x0010ad20 JMP 0x001094e8
void main(void) { ostream *poVar1; thread local_108 [8]; basic_stream_socket<asio::ip::tcp,asio::any_io_executor> local_100 [88]; int4 local_a8; basic_endpoint<asio::ip::tcp> local_a4 [28]; basic_socket_acceptor<asio::ip::tcp,asio::any_io_executor> local_88 [104]; io_context local_20 [20]; int4 local_c; local_c = 0; /* try { // try from 00109462 to 0010946a has its CatchHandler @ 0010958a */ asio::io_context::io_context(local_20); local_a8 = asio::ip::tcp::v4(); asio::ip::basic_endpoint<asio::ip::tcp>::basic_endpoint(local_a4,(tcp *)&local_a8,0x18e9); /* try { // try from 0010949e to 001094b2 has its CatchHandler @ 00109598 */ asio::basic_socket_acceptor<asio::ip::tcp,asio::any_io_executor>:: basic_socket_acceptor<asio::io_context>(local_88,local_20,local_a4,1,0); /* try { // try from 001094b5 to 001094fb has its CatchHandler @ 001095a6 */ poVar1 = std::operator<<((ostream *)PTR_cout_00133f98,"Server is listening on port 6377...."); std::ostream::operator<< (poVar1,(_func_ostream_ptr_ostream_ptr *)PTR_endl<char,std_char_traits<char>>_00133f48); do { asio::basic_stream_socket<asio::ip::tcp,asio::any_io_executor>:: basic_stream_socket<asio::io_context>(local_100,local_20,0); /* try { // try from 001094fe to 0010955c has its CatchHandler @ 001095b4 */ asio::basic_socket_acceptor<asio::ip::tcp,asio::any_io_executor>:: accept<asio::ip::tcp,asio::any_io_executor>(local_88,local_100,0); poVar1 = std::operator<<((ostream *)PTR_cout_00133f98,"Client connected"); std::ostream::operator<< (poVar1,(_func_ostream_ptr_ostream_ptr *)PTR_endl<char,std_char_traits<char>>_00133f48 ); std::thread:: thread<void(&)(asio::basic_stream_socket<asio::ip::tcp,asio::any_io_executor>),asio::basic_stream_socket<asio::ip::tcp,asio::any_io_executor>,void> (local_108,handle_client,local_100); /* try { // try from 0010955f to 0010956a has its CatchHandler @ 001095c2 */ std::thread::detach(); std::thread::~thread(local_108); asio::basic_stream_socket<asio::ip::tcp,asio::any_io_executor>::~basic_stream_socket(local_100); } while( true ); }
6,693
free_blocks
corpus-core[P]colibri-stateless/src/chains/eth/proofer/proof_logs.c
static void free_blocks(proof_logs_block_t* blocks) { while (blocks) { while (blocks->txs) { if (blocks->txs->proof.bytes.data) safe_free(blocks->txs->proof.bytes.data); proof_logs_tx_t* next = blocks->txs->next; safe_free(blocks->txs); blocks->txs = next; } if (blocks->proof.data) safe_free(blocks->proof.data); proof_logs_block_t* next = blocks->next; safe_free(blocks); blocks = next; } }
O1
c
free_blocks: testq %rdi, %rdi je 0x8559 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x48(%rbx), %r14 testq %r14, %r14 je 0x8530 movq 0x38(%r14), %rdi testq %rdi, %rdi je 0x851d callq 0x128b8 movq 0x48(%rbx), %rdi movq 0x58(%rdi), %r14 callq 0x128b8 movq %r14, 0x48(%rbx) jmp 0x850a movq 0x20(%rbx), %rdi testq %rdi, %rdi je 0x853e callq 0x128b8 movq 0x28(%rbx), %r14 movq %rbx, %rdi callq 0x128b8 movq %r14, %rbx testq %r14, %r14 jne 0x8506 addq $0x8, %rsp popq %rbx popq %r14 retq nop
free_blocks: test rdi, rdi jz short locret_8559 push r14 push rbx push rax mov rbx, rdi loc_8506: mov r14, [rbx+48h] loc_850A: test r14, r14 jz short loc_8530 mov rdi, [r14+38h] test rdi, rdi jz short loc_851D call safe_free loc_851D: mov rdi, [rbx+48h] mov r14, [rdi+58h] call safe_free mov [rbx+48h], r14 jmp short loc_850A loc_8530: mov rdi, [rbx+20h] test rdi, rdi jz short loc_853E call safe_free loc_853E: mov r14, [rbx+28h] mov rdi, rbx call safe_free mov rbx, r14 test r14, r14 jnz short loc_8506 add rsp, 8 pop rbx pop r14 locret_8559: retn
long long free_blocks(_QWORD *a1) { _QWORD *v1; // rbx long long i; // r14 long long v3; // rdi long long v4; // rdi long long v5; // rdi _QWORD *v6; // r14 long long result; // rax if ( a1 ) { v1 = a1; do { for ( i = v1[9]; i; v1[9] = i ) { v3 = *(_QWORD *)(i + 56); if ( v3 ) safe_free(v3); v4 = v1[9]; i = *(_QWORD *)(v4 + 88); safe_free(v4); } v5 = v1[4]; if ( v5 ) safe_free(v5); v6 = (_QWORD *)v1[5]; result = safe_free(v1); v1 = v6; } while ( v6 ); } return result; }
free_blocks: TEST RDI,RDI JZ 0x00108559 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI LAB_00108506: MOV R14,qword ptr [RBX + 0x48] LAB_0010850a: TEST R14,R14 JZ 0x00108530 MOV RDI,qword ptr [R14 + 0x38] TEST RDI,RDI JZ 0x0010851d CALL 0x001128b8 LAB_0010851d: MOV RDI,qword ptr [RBX + 0x48] MOV R14,qword ptr [RDI + 0x58] CALL 0x001128b8 MOV qword ptr [RBX + 0x48],R14 JMP 0x0010850a LAB_00108530: MOV RDI,qword ptr [RBX + 0x20] TEST RDI,RDI JZ 0x0010853e CALL 0x001128b8 LAB_0010853e: MOV R14,qword ptr [RBX + 0x28] MOV RDI,RBX CALL 0x001128b8 MOV RBX,R14 TEST R14,R14 JNZ 0x00108506 ADD RSP,0x8 POP RBX POP R14 LAB_00108559: RET
void free_blocks(void *param_1) { void *pvVar1; long lVar2; if (param_1 != (void *)0x0) { do { lVar2 = *(long *)((long)param_1 + 0x48); while (lVar2 != 0) { if (*(void **)(lVar2 + 0x38) != (void *)0x0) { safe_free(*(void **)(lVar2 + 0x38)); } lVar2 = *(long *)((long)*(void **)((long)param_1 + 0x48) + 0x58); safe_free(*(void **)((long)param_1 + 0x48)); *(long *)((long)param_1 + 0x48) = lVar2; } if (*(void **)((long)param_1 + 0x20) != (void *)0x0) { safe_free(*(void **)((long)param_1 + 0x20)); } pvVar1 = *(void **)((long)param_1 + 0x28); safe_free(param_1); param_1 = pvVar1; } while (pvVar1 != (void *)0x0); } return; }
6,694
free_blocks
corpus-core[P]colibri-stateless/src/chains/eth/proofer/proof_logs.c
static void free_blocks(proof_logs_block_t* blocks) { while (blocks) { while (blocks->txs) { if (blocks->txs->proof.bytes.data) safe_free(blocks->txs->proof.bytes.data); proof_logs_tx_t* next = blocks->txs->next; safe_free(blocks->txs); blocks->txs = next; } if (blocks->proof.data) safe_free(blocks->proof.data); proof_logs_block_t* next = blocks->next; safe_free(blocks); blocks = next; } }
O3
c
free_blocks: testq %rdi, %rdi je 0x848d pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x48(%rbx), %rdi testq %rdi, %rdi je 0x8464 movq 0x38(%rdi), %rax testq %rax, %rax je 0x844f movq %rax, %rdi callq 0x125c0 movq 0x48(%rbx), %rdi movq 0x58(%rdi), %r14 callq 0x125c0 movq %r14, 0x48(%rbx) movq %r14, %rdi testq %r14, %r14 jne 0x843a movq 0x20(%rbx), %rdi testq %rdi, %rdi je 0x8472 callq 0x125c0 movq 0x28(%rbx), %r14 movq %rbx, %rdi callq 0x125c0 movq %r14, %rbx testq %r14, %r14 jne 0x8431 addq $0x8, %rsp popq %rbx popq %r14 retq nop
free_blocks: test rdi, rdi jz short locret_848D push r14 push rbx push rax mov rbx, rdi loc_8431: mov rdi, [rbx+48h] test rdi, rdi jz short loc_8464 loc_843A: mov rax, [rdi+38h] test rax, rax jz short loc_844F mov rdi, rax call safe_free mov rdi, [rbx+48h] loc_844F: mov r14, [rdi+58h] call safe_free mov [rbx+48h], r14 mov rdi, r14 test r14, r14 jnz short loc_843A loc_8464: mov rdi, [rbx+20h] test rdi, rdi jz short loc_8472 call safe_free loc_8472: mov r14, [rbx+28h] mov rdi, rbx call safe_free mov rbx, r14 test r14, r14 jnz short loc_8431 add rsp, 8 pop rbx pop r14 locret_848D: retn
long long free_blocks(_QWORD *a1) { _QWORD *v1; // rbx long long v2; // rdi long long v3; // r14 long long v4; // rdi _QWORD *v5; // r14 long long result; // rax if ( a1 ) { v1 = a1; do { v2 = v1[9]; if ( v2 ) { do { if ( *(_QWORD *)(v2 + 56) ) { safe_free(*(_QWORD *)(v2 + 56)); v2 = v1[9]; } v3 = *(_QWORD *)(v2 + 88); safe_free(v2); v1[9] = v3; v2 = v3; } while ( v3 ); } v4 = v1[4]; if ( v4 ) safe_free(v4); v5 = (_QWORD *)v1[5]; result = safe_free(v1); v1 = v5; } while ( v5 ); } return result; }
free_blocks: TEST RDI,RDI JZ 0x0010848d PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI LAB_00108431: MOV RDI,qword ptr [RBX + 0x48] TEST RDI,RDI JZ 0x00108464 LAB_0010843a: MOV RAX,qword ptr [RDI + 0x38] TEST RAX,RAX JZ 0x0010844f MOV RDI,RAX CALL 0x001125c0 MOV RDI,qword ptr [RBX + 0x48] LAB_0010844f: MOV R14,qword ptr [RDI + 0x58] CALL 0x001125c0 MOV qword ptr [RBX + 0x48],R14 MOV RDI,R14 TEST R14,R14 JNZ 0x0010843a LAB_00108464: MOV RDI,qword ptr [RBX + 0x20] TEST RDI,RDI JZ 0x00108472 CALL 0x001125c0 LAB_00108472: MOV R14,qword ptr [RBX + 0x28] MOV RDI,RBX CALL 0x001125c0 MOV RBX,R14 TEST R14,R14 JNZ 0x00108431 ADD RSP,0x8 POP RBX POP R14 LAB_0010848d: RET
void free_blocks(void *param_1) { void *pvVar1; void *pvVar2; if (param_1 != (void *)0x0) { do { pvVar2 = *(void **)((long)param_1 + 0x48); while (pvVar2 != (void *)0x0) { if (*(void **)((long)pvVar2 + 0x38) != (void *)0x0) { safe_free(*(void **)((long)pvVar2 + 0x38)); pvVar2 = *(void **)((long)param_1 + 0x48); } pvVar1 = *(void **)((long)pvVar2 + 0x58); safe_free(pvVar2); *(void **)((long)param_1 + 0x48) = pvVar1; pvVar2 = pvVar1; } if (*(void **)((long)param_1 + 0x20) != (void *)0x0) { safe_free(*(void **)((long)param_1 + 0x20)); } pvVar2 = *(void **)((long)param_1 + 0x28); safe_free(param_1); param_1 = pvVar2; } while (pvVar2 != (void *)0x0); } return; }
6,695
evmc::load64le(unsigned char const*)
corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/evmc/include/evmc/evmc.hpp
inline constexpr uint64_t load64le(const uint8_t* data) noexcept { return uint64_t{data[0]} | (uint64_t{data[1]} << 8) | (uint64_t{data[2]} << 16) | (uint64_t{data[3]} << 24) | (uint64_t{data[4]} << 32) | (uint64_t{data[5]} << 40) | (uint64_t{data[6]} << 48) | (uint64_t{data[7]} << 56); }
O0
cpp
evmc::load64le(unsigned char const*): pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movzbl (%rax), %eax movq -0x8(%rbp), %rcx movzbl 0x1(%rcx), %ecx shlq $0x8, %rcx orq %rcx, %rax movq -0x8(%rbp), %rcx movzbl 0x2(%rcx), %ecx shlq $0x10, %rcx orq %rcx, %rax movq -0x8(%rbp), %rcx movzbl 0x3(%rcx), %ecx shlq $0x18, %rcx orq %rcx, %rax movq -0x8(%rbp), %rcx movzbl 0x4(%rcx), %ecx shlq $0x20, %rcx orq %rcx, %rax movq -0x8(%rbp), %rcx movzbl 0x5(%rcx), %ecx shlq $0x28, %rcx orq %rcx, %rax movq -0x8(%rbp), %rcx movzbl 0x6(%rcx), %ecx shlq $0x30, %rcx orq %rcx, %rax movq -0x8(%rbp), %rcx movzbl 0x7(%rcx), %ecx shlq $0x38, %rcx orq %rcx, %rax popq %rbp retq nopw (%rax,%rax)
_ZN4evmc8load64leEPKh: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] movzx eax, byte ptr [rax] mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx+1] shl rcx, 8 or rax, rcx mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx+2] shl rcx, 10h or rax, rcx mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx+3] shl rcx, 18h or rax, rcx mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx+4] shl rcx, 20h or rax, rcx mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx+5] shl rcx, 28h or rax, rcx mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx+6] shl rcx, 30h or rax, rcx mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx+7] shl rcx, 38h or rax, rcx pop rbp retn
unsigned long long evmc::load64le(evmc *this, const unsigned __int8 *a2) { return ((unsigned long long)*((unsigned __int8 *)this + 7) << 56) | ((unsigned long long)*((unsigned __int8 *)this + 6) << 48) | ((unsigned long long)*((unsigned __int8 *)this + 5) << 40) | ((unsigned long long)*((unsigned __int8 *)this + 4) << 32) | ((unsigned long long)*((unsigned __int8 *)this + 3) << 24) | ((unsigned long long)*((unsigned __int8 *)this + 2) << 16) | *(unsigned __int16 *)this; }
load64le: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX + 0x1] SHL RCX,0x8 OR RAX,RCX MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX + 0x2] SHL RCX,0x10 OR RAX,RCX MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX + 0x3] SHL RCX,0x18 OR RAX,RCX MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX + 0x4] SHL RCX,0x20 OR RAX,RCX MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX + 0x5] SHL RCX,0x28 OR RAX,RCX MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX + 0x6] SHL RCX,0x30 OR RAX,RCX MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX + 0x7] SHL RCX,0x38 OR RAX,RCX POP RBP RET
/* evmc::load64le(unsigned char const*) */ int8 evmc::load64le(uchar *param_1) { return *(int8 *)param_1; }
6,696
do_rmdir(st_command*)
eloqsql/client/mysqltest.cc
void do_rmdir(struct st_command *command) { static DYNAMIC_STRING ds_dirname; const struct command_arg rmdir_args[] = { { "dirname", ARG_STRING, TRUE, &ds_dirname, "Directory to remove" } }; DBUG_ENTER("do_rmdir"); check_command_args(command, command->first_argument, rmdir_args, sizeof(rmdir_args)/sizeof(struct command_arg), ' '); if (bad_path(ds_dirname.str)) DBUG_VOID_RETURN; DBUG_PRINT("info", ("removing directory: %s", ds_dirname.str)); if (my_rmtree(ds_dirname.str, MYF(0))) handle_command_error(command, 1, errno); dynstr_free(&ds_dirname); DBUG_VOID_RETURN; }
O3
cpp
do_rmdir(st_command*): pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx movq 0x10(%rdi), %rsi leaq 0x363594(%rip), %rdx # 0x3ca030 movl $0x1, %ecx movl $0x20, %r8d callq 0x629e7 movq 0x3f675d(%rip), %rdi # 0x45d210 callq 0x66386 testb %al, %al je 0x66ac3 addq $0x8, %rsp popq %rbx popq %rbp retq movq 0x3f6746(%rip), %rdi # 0x45d210 xorl %esi, %esi callq 0x98d31 testl %eax, %eax je 0x66ae9 callq 0x5fc00 movl (%rax), %edx movq %rbx, %rdi movl $0x1, %esi callq 0x62c93 leaq 0x3f6720(%rip), %rdi # 0x45d210 addq $0x8, %rsp popq %rbx popq %rbp jmp 0x9f03b
_Z8do_rmdirP10st_command: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi mov rsi, [rdi+10h] lea rdx, off_3CA030; "dirname" mov ecx, 1 mov r8d, 20h ; ' ' call _Z18check_command_argsP10st_commandPKcPK11command_argic; check_command_args(st_command *,char const*,command_arg const*,int,char) mov rdi, cs:_ZZ8do_rmdirP10st_commandE10ds_dirname; char * call _Z8bad_pathPKc; bad_path(char const*) test al, al jz short loc_66AC3 add rsp, 8 pop rbx pop rbp retn loc_66AC3: mov rdi, cs:_ZZ8do_rmdirP10st_commandE10ds_dirname; do_rmdir(st_command *)::ds_dirname xor esi, esi call my_rmtree test eax, eax jz short loc_66AE9 call ___errno_location mov edx, [rax] mov rdi, rbx mov esi, 1 call _Z20handle_command_errorP10st_commandji; handle_command_error(st_command *,uint,int) loc_66AE9: lea rdi, _ZZ8do_rmdirP10st_commandE10ds_dirname; do_rmdir(st_command *)::ds_dirname add rsp, 8 pop rbx pop rbp jmp dynstr_free
long long do_rmdir( long long a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, double a6, double a7, __m128 a8, __m128 a9) { double v10; // xmm4_8 double v11; // xmm5_8 long long result; // rax char *v13; // rdi unsigned int *v14; // rax long long v15; // rcx int v16; // r8d int v17; // r9d double v18; // xmm4_8 double v19; // xmm5_8 check_command_args((_QWORD *)a1, *(char **)(a1 + 16), (long long)&off_3CA030, 1LL, 32); result = bad_path(do_rmdir(st_command *)::ds_dirname, a2, a3, a4, a5, v10, v11, a8, a9); if ( !(_BYTE)result ) { v13 = do_rmdir(st_command *)::ds_dirname; if ( (unsigned int)my_rmtree(do_rmdir(st_command *)::ds_dirname, 0LL) ) { v14 = (unsigned int *)__errno_location(v13); handle_command_error(a1, 1u, *v14, a2, a3, a4, a5, v18, v19, a8, a9, v15, v16, v17); } return dynstr_free(&do_rmdir(st_command *)::ds_dirname); } return result; }
do_rmdir: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI MOV RSI,qword ptr [RDI + 0x10] LEA RDX,[0x4ca030] MOV ECX,0x1 MOV R8D,0x20 CALL 0x001629e7 MOV RDI,qword ptr [0x0055d210] CALL 0x00166386 TEST AL,AL JZ 0x00166ac3 ADD RSP,0x8 POP RBX POP RBP RET LAB_00166ac3: MOV RDI,qword ptr [0x0055d210] XOR ESI,ESI CALL 0x00198d31 TEST EAX,EAX JZ 0x00166ae9 CALL 0x0015fc00 MOV EDX,dword ptr [RAX] MOV RDI,RBX MOV ESI,0x1 CALL 0x00162c93 LAB_00166ae9: LEA RDI,[0x55d210] ADD RSP,0x8 POP RBX POP RBP JMP 0x0019f03b
/* do_rmdir(st_command*) */ void do_rmdir(st_command *param_1) { char cVar1; int iVar2; int *piVar3; check_command_args(param_1,*(char **)(param_1 + 0x10),(command_arg *)&PTR_s_dirname_004ca030,1,' ' ); cVar1 = bad_path(do_rmdir(st_command*)::ds_dirname); if (cVar1 != '\0') { return; } iVar2 = my_rmtree(do_rmdir(st_command*)::ds_dirname,0); if (iVar2 != 0) { piVar3 = __errno_location(); handle_command_error(param_1,1,*piVar3); } dynstr_free(&do_rmdir(st_command*)::ds_dirname); return; }
6,697
DatabaseWorkerPool<CharacterDatabaseConnection>::KeepAlive()
SylCore-WoTLK/src/server/database/Database/DatabaseWorkerPool.cpp
void DatabaseWorkerPool<T>::KeepAlive() { //! Ping synchronous connections for (auto& connection : _connections[IDX_SYNCH]) { if (connection->LockIfReady()) { connection->Ping(); connection->Unlock(); } } //! Assuming all worker threads are free, every worker thread will receive 1 ping operation request //! If one or more worker threads are busy, the ping operations will not be split evenly, but this doesn't matter //! as the sole purpose is to prevent connections from idling. auto const count = _connections[IDX_ASYNC].size(); for (uint8 i = 0; i < count; ++i) Enqueue(new PingOperation); }
O3
cpp
DatabaseWorkerPool<CharacterDatabaseConnection>::KeepAlive(): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movq 0x20(%rdi), %r14 movq 0x28(%rdi), %r15 cmpq %r15, %r14 je 0x61bfa movq (%r14), %rdi callq 0x715cc testb %al, %al je 0x61bf4 movq (%r14), %rdi callq 0x715c2 movq (%r14), %rdi callq 0x715de addq $0x8, %r14 jmp 0x61bd3 movq 0x10(%rbx), %r15 movq 0x8(%rbx), %rax subq %rax, %r15 je 0x61c4d sarq $0x3, %r15 movb $0x1, %bpl leaq 0x1052ab(%rip), %r12 # 0x166ec0 leaq 0x8(%rsp), %r14 movl $0x10, %edi callq 0xd3250 movq $0x0, 0x8(%rax) movq %r12, (%rax) movq %rax, 0x8(%rsp) movq (%rbx), %rdi movq %r14, %rsi callq 0x5d566 movzbl %bpl, %eax movl %eax, %ebp incb %bpl cmpq %rax, %r15 ja 0x61c1a addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_ZN18DatabaseWorkerPoolI27CharacterDatabaseConnectionE9KeepAliveEv: push rbp push r15 push r14 push r12 push rbx sub rsp, 10h mov rbx, rdi mov r14, [rdi+20h] mov r15, [rdi+28h] loc_61BD3: cmp r14, r15 jz short loc_61BFA mov rdi, [r14]; this call _ZN15MySQLConnection11LockIfReadyEv; MySQLConnection::LockIfReady(void) test al, al jz short loc_61BF4 mov rdi, [r14]; this call _ZN15MySQLConnection4PingEv; MySQLConnection::Ping(void) mov rdi, [r14]; this call _ZN15MySQLConnection6UnlockEv; MySQLConnection::Unlock(void) loc_61BF4: add r14, 8 jmp short loc_61BD3 loc_61BFA: mov r15, [rbx+10h] mov rax, [rbx+8] sub r15, rax jz short loc_61C4D sar r15, 3 mov bpl, 1 lea r12, off_166EC0 lea r14, [rsp+38h+var_30] loc_61C1A: mov edi, 10h; unsigned __int64 call _Znwm; operator new(ulong) mov qword ptr [rax+8], 0 mov [rax], r12 mov [rsp+38h+var_30], rax mov rdi, [rbx] mov rsi, r14 call _ZN21ProducerConsumerQueueIP12SQLOperationE4PushERKS1_; ProducerConsumerQueue<SQLOperation *>::Push(SQLOperation * const&) movzx eax, bpl mov ebp, eax inc bpl cmp r15, rax ja short loc_61C1A loc_61C4D: add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn
unsigned long long DatabaseWorkerPool<CharacterDatabaseConnection>::KeepAlive(long long a1) { MySQLConnection **v1; // r14 MySQLConnection **v2; // r15 unsigned long long result; // rax long long v4; // r15 unsigned long long v5; // r15 unsigned __int8 v6; // bp _QWORD *v7; // rax _QWORD *v8; // [rsp+8h] [rbp-30h] BYREF v1 = *(MySQLConnection ***)(a1 + 32); v2 = *(MySQLConnection ***)(a1 + 40); while ( v1 != v2 ) { if ( (unsigned __int8)MySQLConnection::LockIfReady(*v1) ) { MySQLConnection::Ping(*v1); MySQLConnection::Unlock(*v1); } ++v1; } result = *(_QWORD *)(a1 + 8); v4 = *(_QWORD *)(a1 + 16) - result; if ( v4 ) { v5 = v4 >> 3; v6 = 1; do { v7 = (_QWORD *)operator new(0x10uLL); v7[1] = 0LL; *v7 = off_166EC0; v8 = v7; ProducerConsumerQueue<SQLOperation *>::Push(*(_QWORD **)a1, &v8); result = v6++; } while ( v5 > result ); } return result; }
KeepAlive: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV RBX,RDI MOV R14,qword ptr [RDI + 0x20] MOV R15,qword ptr [RDI + 0x28] LAB_00161bd3: CMP R14,R15 JZ 0x00161bfa MOV RDI,qword ptr [R14] CALL 0x001715cc TEST AL,AL JZ 0x00161bf4 MOV RDI,qword ptr [R14] CALL 0x001715c2 MOV RDI,qword ptr [R14] CALL 0x001715de LAB_00161bf4: ADD R14,0x8 JMP 0x00161bd3 LAB_00161bfa: MOV R15,qword ptr [RBX + 0x10] MOV RAX,qword ptr [RBX + 0x8] SUB R15,RAX JZ 0x00161c4d SAR R15,0x3 MOV BPL,0x1 LEA R12,[0x266ec0] LEA R14,[RSP + 0x8] LAB_00161c1a: MOV EDI,0x10 CALL 0x001d3250 MOV qword ptr [RAX + 0x8],0x0 MOV qword ptr [RAX],R12 MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RBX] MOV RSI,R14 CALL 0x0015d566 MOVZX EAX,BPL MOV EBP,EAX INC BPL CMP R15,RAX JA 0x00161c1a LAB_00161c4d: ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* DatabaseWorkerPool<CharacterDatabaseConnection>::KeepAlive() */ void __thiscall DatabaseWorkerPool<CharacterDatabaseConnection>::KeepAlive (DatabaseWorkerPool<CharacterDatabaseConnection> *this) { int8 *puVar1; long lVar2; long lVar3; bool bVar4; char cVar5; ulong uVar6; int8 *puVar7; SQLOperation *local_30; puVar1 = *(int8 **)(this + 0x28); for (puVar7 = *(int8 **)(this + 0x20); puVar7 != puVar1; puVar7 = puVar7 + 1) { cVar5 = MySQLConnection::LockIfReady((MySQLConnection *)*puVar7); if (cVar5 != '\0') { MySQLConnection::Ping((MySQLConnection *)*puVar7); MySQLConnection::Unlock((MySQLConnection *)*puVar7); } } lVar2 = *(long *)(this + 0x10); lVar3 = *(long *)(this + 8); if (lVar2 - lVar3 != 0) { uVar6 = 1; do { local_30 = (SQLOperation *)operator_new(0x10); *(int8 *)(local_30 + 8) = 0; *(int ***)local_30 = &PTR__SQLOperation_00266ec0; ProducerConsumerQueue<SQLOperation*>::Push (*(ProducerConsumerQueue<SQLOperation*> **)this,&local_30); bVar4 = uVar6 < (ulong)(lVar2 - lVar3 >> 3); uVar6 = (ulong)(byte)((char)uVar6 + 1); } while (bVar4); } return; }
6,698
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::get_binary() const
monkey531[P]llama/common/json.hpp
const binary_t& get_binary() const { if (!is_binary()) { JSON_THROW(type_error::create(302, detail::concat("type must be binary, but is ", type_name()), this)); } return *get_ptr<const binary_t*>(); }
O1
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>::get_binary() const: pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x8, (%rdi) jne 0xb3e4b movq 0x8(%r14), %rax addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x20, %edi callq 0x1b450 movq %rax, %rbx movq %r14, %rdi callq 0x5fca8 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x404f8(%rip), %rsi # 0xf4367 leaq 0x10(%rsp), %rdi callq 0x88355 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x12e, %esi # imm = 0x12E movq %r14, %rcx callq 0x88186 xorl %ebp, %ebp leaq 0x7907e(%rip), %rsi # 0x12cf18 leaq -0x580b7(%rip), %rdx # 0x5bdea movq %rbx, %rdi callq 0x1bf10 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb3ecf movq 0x20(%rsp), %rsi incq %rsi callq 0x1b8e0 jmp 0xb3ecf movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0xb3edc movq %rbx, %rdi callq 0x1b690 movq %r14, %rdi callq 0x1bf90
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10get_binaryEv: push rbp; char push r14; int push rbx; __int64 sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 8 jnz short loc_B3E4B mov rax, [r14+8] add rsp, 30h pop rbx pop r14 pop rbp retn loc_B3E4B: 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, aTypeMustBeBina; "type must be binary, but is " 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, 12Eh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B3ECF mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_B3ECF mov r14, rax mov bpl, 1 loc_B3ECF: test bpl, bpl jz short loc_B3EDC mov rdi, rbx; void * call ___cxa_free_exception loc_B3EDC: 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>::get_binary( long long a1) { nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx const char *v3; // [rsp+8h] [rbp-40h] BYREF _QWORD v4[2]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 != 8 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v3 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v4, (long long)"type must be binary, but is ", &v3); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 302, v4); __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); } return *(_QWORD *)(a1 + 8); }
get_binary: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI CMP byte ptr [RDI],0x8 JNZ 0x001b3e4b MOV RAX,qword ptr [R14 + 0x8] ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_001b3e4b: MOV EDI,0x20 CALL 0x0011b450 MOV RBX,RAX MOV RDI,R14 CALL 0x0015fca8 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_001b3e68: LEA RSI,[0x1f4367] LEA RDI,[RSP + 0x10] CALL 0x00188355 MOV BPL,0x1 LAB_001b3e7c: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x12e MOV RCX,R14 CALL 0x00188186 XOR EBP,EBP LEA RSI,[0x22cf18] LEA RDX,[0x15bdea] MOV RDI,RBX CALL 0x0011bf10
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::get_binary() const */ int8 __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::get_binary(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this) { int8 uVar1; 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> )0x8) { return *(int8 *)(this + 8); } uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 001b3e68 to 001b3e78 has its CatchHandler @ 001b3ec9 */ detail::concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_38,"type must be binary, but is ",&local_40); /* try { // try from 001b3e7c to 001b3ea8 has its CatchHandler @ 001b3ea9 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar1,0x12e,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception); }
6,699
(anonymous namespace)::msgpack23_int8_int8Test_Test::AddToRegistry()
msgpack23/tests/int8_tests.cpp
TEST_P(msgpack23_int8, int8Test) { Int8Struct const testIntStruct{ GetParam() }; auto const data = msgpack23::pack(testIntStruct); auto [actual] = msgpack23::unpack<Int8Struct>(data); EXPECT_EQ(actual, GetParam()); }
O0
cpp
(anonymous namespace)::msgpack23_int8_int8Test_Test::AddToRegistry(): pushq %rbp movq %rsp, %rbp subq $0xe0, %rsp callq 0xb7260 movq %rax, %rdi callq 0xa07c0 movq %rax, -0xc0(%rbp) leaq -0x49(%rbp), %rdi movq %rdi, -0xb8(%rbp) callq 0x16b00 movq -0xb8(%rbp), %rdx leaq 0x8c755(%rip), %rsi # 0xd02a2 leaq -0x48(%rbp), %rdi callq 0x246f0 jmp 0x43b58 leaq -0x28(%rbp), %rdi leaq -0x48(%rbp), %rsi movl $0x1b, %edx callq 0x247a0 jmp 0x43b6c movq -0xc0(%rbp), %rdi leaq 0x8c719(%rip), %rsi # 0xd0293 leaq -0x28(%rbp), %rdx callq 0x43d30 movq %rax, -0xc8(%rbp) jmp 0x43b8c movl $0x8, %edi callq 0x16550 movq %rax, -0xd0(%rbp) jmp 0x43b9f movq -0xd0(%rbp), %rdi callq 0x44260 jmp 0x43bad leaq -0xa9(%rbp), %rdi movq %rdi, -0xd8(%rbp) callq 0x16b00 movq -0xd8(%rbp), %rdx leaq 0x8c6d4(%rip), %rsi # 0xd02a2 leaq -0xa8(%rbp), %rdi callq 0x246f0 jmp 0x43bdc leaq -0x88(%rbp), %rdi leaq -0xa8(%rbp), %rsi movl $0x1b, %edx callq 0x247a0 jmp 0x43bf6 movq -0xd0(%rbp), %rcx movq -0xc8(%rbp), %rdi leaq 0x8c688(%rip), %rsi # 0xd0293 leaq 0x8af72(%rip), %rdx # 0xceb84 leaq -0x88(%rbp), %r8 callq 0x44120 jmp 0x43c20 leaq -0x88(%rbp), %rdi callq 0x24820 leaq -0xa8(%rbp), %rdi callq 0x247e0 leaq -0xa9(%rbp), %rdi callq 0x165f0 leaq -0x28(%rbp), %rdi callq 0x24820 leaq -0x48(%rbp), %rdi callq 0x247e0 leaq -0x49(%rbp), %rdi callq 0x165f0 xorl %eax, %eax addq $0xe0, %rsp popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) jmp 0x43d17 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) jmp 0x43d0e movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) jmp 0x43d05 movq -0xd0(%rbp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) movl $0x8, %esi callq 0x16580 jmp 0x43d05 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) jmp 0x43cf9 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) jmp 0x43ced movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) leaq -0x88(%rbp), %rdi callq 0x24820 leaq -0xa8(%rbp), %rdi callq 0x247e0 leaq -0xa9(%rbp), %rdi callq 0x165f0 leaq -0x28(%rbp), %rdi callq 0x24820 leaq -0x48(%rbp), %rdi callq 0x247e0 leaq -0x49(%rbp), %rdi callq 0x165f0 movq -0x58(%rbp), %rdi callq 0x16af0 nopl (%rax)
_ZN12_GLOBAL__N_128msgpack23_int8_int8Test_Test13AddToRegistryEv: push rbp mov rbp, rsp sub rsp, 0E0h call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void) mov rdi, rax; this call _ZN7testing8UnitTest27parameterized_test_registryEv; testing::UnitTest::parameterized_test_registry(void) mov [rbp+var_C0], rax lea rdi, [rbp+var_49] mov [rbp+var_B8], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rbp+var_B8] lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/msgpac"... lea rdi, [rbp+var_48] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_43B58: lea rdi, [rbp+var_28] lea rsi, [rbp+var_48] mov edx, 1Bh call _ZN7testing8internal12CodeLocationC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; testing::internal::CodeLocation::CodeLocation(std::string const&,int) jmp short $+2 loc_43B6C: mov rdi, [rbp+var_C0] lea rsi, aMsgpack23Int8; "msgpack23_int8" lea rdx, [rbp+var_28] call _ZN7testing8internal30ParameterizedTestSuiteRegistry25GetTestSuitePatternHolderIN12_GLOBAL__N_114msgpack23_int8EEEPNS0_26ParameterizedTestSuiteInfoIT_EEPKcNS0_12CodeLocationE; testing::internal::ParameterizedTestSuiteRegistry::GetTestSuitePatternHolder<`anonymous namespace'::msgpack23_int8>(char const*,testing::internal::CodeLocation) mov [rbp+var_C8], rax jmp short $+2 loc_43B8C: mov edi, 8; unsigned __int64 call __Znwm; operator new(ulong) mov [rbp+var_D0], rax jmp short $+2 loc_43B9F: mov rdi, [rbp+var_D0] call _ZN7testing8internal15TestMetaFactoryIN12_GLOBAL__N_128msgpack23_int8_int8Test_TestEEC2Ev; testing::internal::TestMetaFactory<`anonymous namespace'::msgpack23_int8_int8Test_Test>::TestMetaFactory(void) jmp short $+2 loc_43BAD: lea rdi, [rbp+var_A9] mov [rbp+var_D8], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rbp+var_D8] lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/msgpac"... lea rdi, [rbp+var_A8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_43BDC: lea rdi, [rbp+var_88] lea rsi, [rbp+var_A8] mov edx, 1Bh call _ZN7testing8internal12CodeLocationC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; testing::internal::CodeLocation::CodeLocation(std::string const&,int) jmp short $+2 loc_43BF6: mov rcx, [rbp+var_D0] mov rdi, [rbp+var_C8] lea rsi, aMsgpack23Int8; "msgpack23_int8" lea rdx, aInt8test; "int8Test" lea r8, [rbp+var_88] call _ZN7testing8internal26ParameterizedTestSuiteInfoIN12_GLOBAL__N_114msgpack23_int8EE14AddTestPatternEPKcS6_PNS0_19TestMetaFactoryBaseIaEENS0_12CodeLocationE; testing::internal::ParameterizedTestSuiteInfo<`anonymous namespace'::msgpack23_int8>::AddTestPattern(char const*,char const*,testing::internal::TestMetaFactoryBase<signed char> *,testing::internal::CodeLocation) jmp short $+2 loc_43C20: lea rdi, [rbp+var_88]; this call _ZN7testing8internal12CodeLocationD2Ev; testing::internal::CodeLocation::~CodeLocation() lea rdi, [rbp+var_A8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rbp+var_A9] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rbp+var_28]; this call _ZN7testing8internal12CodeLocationD2Ev; testing::internal::CodeLocation::~CodeLocation() lea rdi, [rbp+var_48] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rbp+var_49] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() xor eax, eax add rsp, 0E0h pop rbp retn mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax jmp loc_43D17 mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax jmp loc_43D0E mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax jmp short loc_43D05 mov rdi, [rbp+var_D0]; void * mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax mov esi, 8; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_43D05 mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax jmp short loc_43CF9 mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax jmp short loc_43CED mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax lea rdi, [rbp+var_88]; this call _ZN7testing8internal12CodeLocationD2Ev; testing::internal::CodeLocation::~CodeLocation() loc_43CED: lea rdi, [rbp+var_A8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_43CF9: lea rdi, [rbp+var_A9] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() loc_43D05: lea rdi, [rbp+var_28]; this call _ZN7testing8internal12CodeLocationD2Ev; testing::internal::CodeLocation::~CodeLocation() loc_43D0E: lea rdi, [rbp+var_48] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_43D17: lea rdi, [rbp+var_49] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rdi, [rbp+var_58] call __Unwind_Resume
long long `anonymous namespace'::msgpack23_int8_int8Test_Test::AddToRegistry( _anonymous_namespace_::msgpack23_int8_int8Test_Test *this) { testing::UnitTest *Instance; // rax void *v3; // [rsp+10h] [rbp-D0h] long long v4; // [rsp+18h] [rbp-C8h] long long v5; // [rsp+20h] [rbp-C0h] char v6; // [rsp+37h] [rbp-A9h] BYREF _BYTE v7[32]; // [rsp+38h] [rbp-A8h] BYREF _BYTE v8[44]; // [rsp+58h] [rbp-88h] BYREF char v9; // [rsp+97h] [rbp-49h] BYREF _BYTE v10[32]; // [rsp+98h] [rbp-48h] BYREF _BYTE v11[40]; // [rsp+B8h] [rbp-28h] BYREF Instance = (testing::UnitTest *)testing::UnitTest::GetInstance(this); v5 = testing::UnitTest::parameterized_test_registry(Instance); std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>( (long long)v10, (long long)"/workspace/llm4binary/github2025/msgpack23/tests/int8_tests.cpp", (long long)&v9); testing::internal::CodeLocation::CodeLocation((long long)v11, (long long)v10, 27); v4 = testing::internal::ParameterizedTestSuiteRegistry::GetTestSuitePatternHolder<`anonymous namespace'::msgpack23_int8>( v5, "msgpack23_int8", v11); v3 = (void *)operator new(8uLL); testing::internal::TestMetaFactory<`anonymous namespace'::msgpack23_int8_int8Test_Test>::TestMetaFactory(v3); std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>( (long long)v7, (long long)"/workspace/llm4binary/github2025/msgpack23/tests/int8_tests.cpp", (long long)&v6); testing::internal::CodeLocation::CodeLocation((long long)v8, (long long)v7, 27); testing::internal::ParameterizedTestSuiteInfo<`anonymous namespace'::msgpack23_int8>::AddTestPattern( v4, "msgpack23_int8", "int8Test", v3, v8); testing::internal::CodeLocation::~CodeLocation((testing::internal::CodeLocation *)v8); std::string::~string((long long)v7); std::allocator<char>::~allocator(&v6); testing::internal::CodeLocation::~CodeLocation((testing::internal::CodeLocation *)v11); std::string::~string((long long)v10); std::allocator<char>::~allocator(&v9); return 0LL; }
AddToRegistry: PUSH RBP MOV RBP,RSP SUB RSP,0xe0 CALL 0x001b7260 MOV RDI,RAX CALL 0x001a07c0 MOV qword ptr [RBP + -0xc0],RAX LEA RDI,[RBP + -0x49] MOV qword ptr [RBP + -0xb8],RDI CALL 0x00116b00 MOV RDX,qword ptr [RBP + -0xb8] LAB_00143b46: LEA RSI,[0x1d02a2] LEA RDI,[RBP + -0x48] CALL 0x001246f0 JMP 0x00143b58 LAB_00143b58: LEA RDI,[RBP + -0x28] LEA RSI,[RBP + -0x48] MOV EDX,0x1b CALL 0x001247a0 JMP 0x00143b6c LAB_00143b6c: MOV RDI,qword ptr [RBP + -0xc0] LEA RSI,[0x1d0293] LEA RDX,[RBP + -0x28] CALL 0x00143d30 MOV qword ptr [RBP + -0xc8],RAX JMP 0x00143b8c LAB_00143b8c: MOV EDI,0x8 CALL 0x00116550 MOV qword ptr [RBP + -0xd0],RAX JMP 0x00143b9f LAB_00143b9f: MOV RDI,qword ptr [RBP + -0xd0] CALL 0x00144260 JMP 0x00143bad LAB_00143bad: LEA RDI,[RBP + -0xa9] MOV qword ptr [RBP + -0xd8],RDI CALL 0x00116b00 MOV RDX,qword ptr [RBP + -0xd8] LAB_00143bc7: LEA RSI,[0x1d02a2] LEA RDI,[RBP + -0xa8] CALL 0x001246f0 JMP 0x00143bdc LAB_00143bdc: LEA RDI,[RBP + -0x88] LEA RSI,[RBP + -0xa8] MOV EDX,0x1b CALL 0x001247a0 JMP 0x00143bf6 LAB_00143bf6: MOV RCX,qword ptr [RBP + -0xd0] MOV RDI,qword ptr [RBP + -0xc8] LEA RSI,[0x1d0293] LEA RDX,[0x1ceb84] LEA R8,[RBP + -0x88] CALL 0x00144120 LAB_00143c1e: JMP 0x00143c20 LAB_00143c20: LEA RDI,[RBP + -0x88] CALL 0x00124820 LEA RDI,[RBP + -0xa8] CALL 0x001247e0 LEA RDI,[RBP + -0xa9] CALL 0x001165f0 LEA RDI,[RBP + -0x28] CALL 0x00124820 LEA RDI,[RBP + -0x48] CALL 0x001247e0 LEA RDI,[RBP + -0x49] CALL 0x001165f0 XOR EAX,EAX ADD RSP,0xe0 POP RBP RET
/* (anonymous namespace)::msgpack23_int8_int8Test_Test::AddToRegistry() */ int8 (anonymous_namespace)::msgpack23_int8_int8Test_Test::AddToRegistry(void) { UnitTest *this; ParameterizedTestSuiteRegistry *pPVar1; ParameterizedTestSuiteInfo *pPVar2; TestMetaFactory<(anonymous_namespace)::msgpack23_int8_int8Test_Test> *this_00; allocator local_b1; string local_b0 [32]; CodeLocation local_90 [63]; allocator local_51; string local_50 [32]; CodeLocation local_30 [40]; this = (UnitTest *)testing::UnitTest::GetInstance(); pPVar1 = (ParameterizedTestSuiteRegistry *)testing::UnitTest::parameterized_test_registry(this); std::allocator<char>::allocator(); /* try { // try from 00143b46 to 00143b55 has its CatchHandler @ 00143c6a */ std::__cxx11::string::string<std::allocator<char>> (local_50,"/workspace/llm4binary/github2025/msgpack23/tests/int8_tests.cpp",&local_51); /* try { // try from 00143b58 to 00143b69 has its CatchHandler @ 00143c7b */ testing::internal::CodeLocation::CodeLocation(local_30,local_50,0x1b); /* try { // try from 00143b6c to 00143b95 has its CatchHandler @ 00143c8c */ pPVar2 = testing::internal::ParameterizedTestSuiteRegistry:: GetTestSuitePatternHolder<(anonymous_namespace)::msgpack23_int8> (pPVar1,"msgpack23_int8",local_30); this_00 = (TestMetaFactory<(anonymous_namespace)::msgpack23_int8_int8Test_Test> *)operator_new(8); /* try { // try from 00143b9f to 00143baa has its CatchHandler @ 00143c9a */ testing::internal::TestMetaFactory<(anonymous_namespace)::msgpack23_int8_int8Test_Test>:: TestMetaFactory(this_00); std::allocator<char>::allocator(); /* try { // try from 00143bc7 to 00143bd9 has its CatchHandler @ 00143cb9 */ std::__cxx11::string::string<std::allocator<char>> (local_b0,"/workspace/llm4binary/github2025/msgpack23/tests/int8_tests.cpp",&local_b1); /* try { // try from 00143bdc to 00143bf3 has its CatchHandler @ 00143cc7 */ testing::internal::CodeLocation::CodeLocation(local_90,local_b0,0x1b); /* try { // try from 00143bf6 to 00143c1d has its CatchHandler @ 00143cd5 */ testing::internal::ParameterizedTestSuiteInfo<(anonymous_namespace)::msgpack23_int8>:: AddTestPattern((ParameterizedTestSuiteInfo<(anonymous_namespace)::msgpack23_int8> *)pPVar2, "msgpack23_int8","int8Test",this_00,local_90); testing::internal::CodeLocation::~CodeLocation(local_90); std::__cxx11::string::~string(local_b0); std::allocator<char>::~allocator((allocator<char> *)&local_b1); testing::internal::CodeLocation::~CodeLocation(local_30); std::__cxx11::string::~string(local_50); std::allocator<char>::~allocator((allocator<char> *)&local_51); return 0; }