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
51,400
coro::net::tls::client::connect(std::chrono::duration<long, std::ratio<1l, 1000l>>) (.destroy)
AlayaLite/build_O3/_deps/libcoro-src/src/net/tls/client.cpp
auto client::connect(std::chrono::milliseconds timeout) -> coro::task<connection_status> { // Only allow the user to connect per tcp client once, if they need to re-connect they should // make a new tls::client. if (m_connect_status.has_value()) { co_return m_connect_status.value(); } // tls context isn't setup and is required. if (m_tls_ctx == nullptr) { co_return connection_status::context_required; } // This enforces the connection status is aways set on the client object upon returning. auto return_value = [this](connection_status s) -> connection_status { m_connect_status = s; return s; }; sockaddr_in server{}; server.sin_family = static_cast<int>(m_options.address.domain()); server.sin_port = htons(m_options.port); server.sin_addr = *reinterpret_cast<const in_addr*>(m_options.address.data().data()); auto cret = ::connect(m_socket.native_handle(), (struct sockaddr*)&server, sizeof(server)); if (cret == 0) { co_return return_value(co_await handshake(timeout)); } else if (cret == -1) { // If the connect is happening in the background poll for write on the socket to trigger // when the connection is established. if (errno == EAGAIN || errno == EINPROGRESS) { auto pstatus = co_await m_io_scheduler->poll(m_socket, poll_op::write, timeout); if (pstatus == poll_status::event) { int result{0}; socklen_t result_length{sizeof(result)}; if (getsockopt(m_socket.native_handle(), SOL_SOCKET, SO_ERROR, &result, &result_length) < 0) { std::cerr << "connect failed to getsockopt after write poll event\n"; } if (result == 0) { // TODO: delta the already used time and remove from the handshake timeout. co_return return_value(co_await handshake(timeout)); } } else if (pstatus == poll_status::timeout) { co_return return_value(connection_status::timeout); } } } co_return return_value(connection_status::error); }
O3
cpp
coro::net::tls::client::connect(std::chrono::duration<long, std::ratio<1l, 1000l>>) (.destroy): pushq %rbx movq %rdi, %rbx movzbl 0x144(%rdi), %eax leaq 0x16644(%rip), %rcx # 0xe3908 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x98(%rbx), %rdi callq 0xcce72 jmp 0xcd2f5 leaq 0x28(%rbx), %rdi callq 0xcce72 jmp 0xcd2f5 movq 0x108(%rbx), %rdi testq %rdi, %rdi je 0xcd2f5 callq *0x8(%rdi) leaq 0x18(%rbx), %rdi callq 0xcd388 movl $0x148, %esi # imm = 0x148 movq %rbx, %rdi popq %rbx jmp 0x17150 jmp 0xcd310 jmp 0xcd310 movq %rax, %rdi callq 0x1f2c3
_ZN4coro3net3tls6client7connectENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE_destroy: push rbx mov rbx, rdi movzx eax, byte ptr [rdi+144h] lea rcx, jpt_CD2CB movsxd rax, ds:(jpt_CD2CB - 0E3908h)[rcx+rax*4]; switch 5 cases add rax, rcx jmp rax; switch jump loc_CD2CD: lea rdi, [rbx+98h]; jumptable 00000000000CD2CB case 1 call _ZN4coro3net3tls6client9handshakeENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE_cleanup; coro::net::tls::client::handshake(std::chrono::duration<long,std::ratio<1l,1000l>>) [clone] jmp short loc_CD2F5; jumptable 00000000000CD2CB cases 0,4 loc_CD2DB: lea rdi, [rbx+28h]; jumptable 00000000000CD2CB case 3 call _ZN4coro3net3tls6client9handshakeENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE_cleanup; coro::net::tls::client::handshake(std::chrono::duration<long,std::ratio<1l,1000l>>) [clone] jmp short loc_CD2F5; jumptable 00000000000CD2CB cases 0,4 loc_CD2E6: mov rdi, [rbx+108h]; jumptable 00000000000CD2CB case 2 test rdi, rdi jz short loc_CD2F5; jumptable 00000000000CD2CB cases 0,4 call qword ptr [rdi+8] loc_CD2F5: lea rdi, [rbx+18h]; jumptable 00000000000CD2CB cases 0,4 call _ZNSt8__detail9__variant16_Variant_storageILb0EJN4coro6detail7promiseINS2_3net3tls17connection_statusEE18unset_return_valueES7_NSt15__exception_ptr13exception_ptrEEED2Ev; std::__detail::__variant::_Variant_storage<false,coro::detail::promise<coro::net::tls::connection_status>::unset_return_value,coro::net::tls::connection_status,std::__exception_ptr::exception_ptr>::~_Variant_storage() mov esi, 148h; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong) jmp short loc_CD310 jmp short $+2 loc_CD310: mov rdi, rax call __clang_call_terminate
void coro::net::tls::client::connect(_QWORD *a1) { long long v2; // rdi switch ( *((_BYTE *)a1 + 324) ) { case 0: case 4: break; case 1: coro::net::tls::client::handshake((long long)(a1 + 19)); break; case 2: v2 = a1[33]; if ( v2 ) (*(void (**)(void))(v2 + 8))(); break; case 3: coro::net::tls::client::handshake((long long)(a1 + 5)); break; } std::__detail::__variant::_Variant_storage<false,coro::detail::promise<coro::net::tls::connection_status>::unset_return_value,coro::net::tls::connection_status,std::__exception_ptr::exception_ptr>::~_Variant_storage(a1 + 3); operator delete(a1, 0x148uLL); }
connect: PUSH RBX MOV RBX,RDI MOVZX EAX,byte ptr [RDI + 0x144] LEA RCX,[0x1e3908] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX JMP RAX
/* coro::net::tls::client::connect(std::chrono::duration<long, std::ratio<1l, 1000l> >) [clone .destroy] */ void coro::net::tls::client::connect(long param_1) { /* WARNING: Could not recover jumptable at 0x001cd2cb. Too many branches */ /* WARNING: Treating indirect jump as call */ (*(code *)(&DAT_001e3908 + *(int *)(&DAT_001e3908 + (ulong)*(byte *)(param_1 + 0x144) * 4)))(); return; }
51,401
my_charlen_utf8mb3
eloqsql/strings/ctype-utf8.c
static int my_charlen_utf8mb3(CHARSET_INFO *cs __attribute__((unused)), const uchar *s, const uchar *e) { uchar c; if (s >= e) return MY_CS_TOOSMALL; c= s[0]; if (c < 0xf0) return my_valid_mbcharlen_utf8mb3(s, e); return MY_CS_ILSEQ; }
O0
c
my_charlen_utf8mb3: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jb 0x675b7 movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x675e4 movq -0x18(%rbp), %rax movb (%rax), %al movb %al, -0x21(%rbp) movzbl -0x21(%rbp), %eax cmpl $0xf0, %eax jge 0x675dd movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x68450 movl %eax, -0x4(%rbp) jmp 0x675e4 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax)
my_charlen_utf8mb3: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jb short loc_675B7 mov [rbp+var_4], 0FFFFFF9Bh jmp short loc_675E4 loc_675B7: mov rax, [rbp+var_18] mov al, [rax] mov [rbp+var_21], al movzx eax, [rbp+var_21] cmp eax, 0F0h jge short loc_675DD mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] call my_valid_mbcharlen_utf8mb3 mov [rbp+var_4], eax jmp short loc_675E4 loc_675DD: mov [rbp+var_4], 0 loc_675E4: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long my_charlen_utf8mb3(long long a1, unsigned __int8 *a2, unsigned long long a3) { if ( (unsigned long long)a2 < a3 ) { if ( *a2 >= 0xF0u ) return 0; else return (unsigned int)my_valid_mbcharlen_utf8mb3(a2, a3); } else { return (unsigned int)-101; } }
my_charlen_utf8mb3: 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 RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JC 0x001675b7 MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x001675e4 LAB_001675b7: MOV RAX,qword ptr [RBP + -0x18] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x21],AL MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xf0 JGE 0x001675dd MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] CALL 0x00168450 MOV dword ptr [RBP + -0x4],EAX JMP 0x001675e4 LAB_001675dd: MOV dword ptr [RBP + -0x4],0x0 LAB_001675e4: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 my_charlen_utf8mb3(int8 param_1,byte *param_2,byte *param_3) { int4 local_c; if (param_2 < param_3) { if (*param_2 < 0xf0) { local_c = my_valid_mbcharlen_utf8mb3(param_2,param_3); } else { local_c = 0; } } else { local_c = 0xffffff9b; } return local_c; }
51,402
common_arg::common_arg(std::initializer_list<char const*> const&, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, int))
monkey531[P]llama/common/arg.h
common_arg( const std::initializer_list<const char *> & args, const char * value_hint, const std::string & help, void (*handler)(common_params & params, int) ) : args(args), value_hint(value_hint), help(help), handler_int(handler) {}
O3
c
common_arg::common_arg(std::initializer_list<char const*> const&, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, int)): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %r14 movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %rbp movq %rdi, %rbx leaq 0x4(%rsp), %rsi movl $0x0, (%rsi) leaq 0x3(%rsp), %rcx leaq 0x2(%rsp), %r8 movl $0x1, %edx callq 0x56ddc leaq 0x38(%rbx), %rax xorl %ecx, %ecx movq %rcx, 0x40(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x30(%rbx) movq %rax, 0x48(%rbx) movq %rax, 0x50(%rbx) movq %rcx, 0x58(%rbx) leaq 0x60(%rbx), %r13 movq (%rbp), %rsi movq 0x8(%rbp), %rdx leaq 0x1(%rsp), %rcx movq %r13, %rdi callq 0x56e5e movq %r12, 0x78(%rbx) leaq 0x90(%rbx), %rdi leaq 0xa0(%rbx), %rax xorps %xmm0, %xmm0 movups %xmm0, 0x80(%rbx) movq %rax, 0x90(%rbx) movq (%r15), %rsi movq 0x8(%r15), %rdx addq %rsi, %rdx callq 0x213b2 movb $0x0, 0xb0(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0xb8(%rbx) movq $0x0, 0xc8(%rbx) movq %r14, 0xd0(%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq (%r13), %rdi testq %rdi, %rdi je 0x536f2 movq 0x70(%rbx), %rsi subq %rdi, %rsi callq 0x1a8e0 jmp 0x536f2 movq %rax, %r14 leaq 0x30(%rbx), %rdi callq 0x56ea4 movq %rbx, %rdi callq 0x56ea4 movq %r14, %rdi callq 0x1afa0 nop
_ZN10common_argC2ERKSt16initializer_listIPKcES2_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPFvR13common_paramsiE: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, r8 mov r15, rcx mov r12, rdx mov rbp, rsi mov rbx, rdi lea rsi, [rsp+38h+var_34] mov dword ptr [rsi], 0 lea rcx, [rsp+38h+var_35] lea r8, [rsp+38h+var_36] mov edx, 1 call _ZNSt3setI13llama_exampleSt4lessIS0_ESaIS0_EEC2ESt16initializer_listIS0_ERKS2_RKS3_; std::set<llama_example>::set(std::initializer_list<llama_example>,std::less<llama_example> const&,std::allocator<llama_example> const&) lea rax, [rbx+38h] xor ecx, ecx mov [rbx+40h], rcx xorps xmm0, xmm0 movups xmmword ptr [rbx+30h], xmm0 mov [rbx+48h], rax mov [rbx+50h], rax mov [rbx+58h], rcx lea r13, [rbx+60h] mov rsi, [rbp+0] mov rdx, [rbp+8] lea rcx, [rsp+38h+var_37] mov rdi, r13 call _ZNSt6vectorIPKcSaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<char const*>::vector(std::initializer_list<char const*>,std::allocator<char const*> const&) mov [rbx+78h], r12 lea rdi, [rbx+90h] lea rax, [rbx+0A0h] xorps xmm0, xmm0 movups xmmword ptr [rbx+80h], xmm0 mov [rbx+90h], rax mov rsi, [r15] mov rdx, [r15+8] add rdx, rsi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov byte ptr [rbx+0B0h], 0 xorps xmm0, xmm0 movups xmmword ptr [rbx+0B8h], xmm0 mov qword ptr [rbx+0C8h], 0 mov [rbx+0D0h], r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, [r13+0]; void * test rdi, rdi jz short loc_536F2 mov rsi, [rbx+70h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_536F2 mov r14, rax loc_536F2: lea rdi, [rbx+30h] call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree() mov rdi, rbx call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree() mov rdi, r14 call __Unwind_Resume
long long common_arg::common_arg(long long a1, _QWORD *a2, long long a3, long long a4, long long a5) { int v5; // eax long long result; // rax int v10; // [rsp+0h] [rbp-38h] BYREF _DWORD v11[13]; // [rsp+4h] [rbp-34h] BYREF v10 = v5; v11[0] = 0; std::set<llama_example>::set(a1, v11, 1LL, (char *)&v10 + 3, (char *)&v10 + 2); *(_QWORD *)(a1 + 64) = 0LL; *(_OWORD *)(a1 + 48) = 0LL; *(_QWORD *)(a1 + 72) = a1 + 56; *(_QWORD *)(a1 + 80) = a1 + 56; *(_QWORD *)(a1 + 88) = 0LL; std::vector<char const*>::vector(a1 + 96, *a2, a2[1], (char *)&v10 + 1); *(_QWORD *)(a1 + 120) = a3; *(_OWORD *)(a1 + 128) = 0LL; *(_QWORD *)(a1 + 144) = a1 + 160; result = std::string::_M_construct<char *>(a1 + 144, *(_BYTE **)a4, *(_QWORD *)a4 + *(_QWORD *)(a4 + 8)); *(_BYTE *)(a1 + 176) = 0; *(_OWORD *)(a1 + 184) = 0LL; *(_QWORD *)(a1 + 200) = 0LL; *(_QWORD *)(a1 + 208) = a5; return result; }
common_arg: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,R8 MOV R15,RCX MOV R12,RDX MOV RBP,RSI MOV RBX,RDI LEA RSI,[RSP + 0x4] MOV dword ptr [RSI],0x0 LEA RCX,[RSP + 0x3] LEA R8,[RSP + 0x2] MOV EDX,0x1 CALL 0x00156ddc LEA RAX,[RBX + 0x38] XOR ECX,ECX MOV qword ptr [RBX + 0x40],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOV qword ptr [RBX + 0x48],RAX MOV qword ptr [RBX + 0x50],RAX MOV qword ptr [RBX + 0x58],RCX LEA R13,[RBX + 0x60] MOV RSI,qword ptr [RBP] MOV RDX,qword ptr [RBP + 0x8] LAB_00153664: LEA RCX,[RSP + 0x1] MOV RDI,R13 CALL 0x00156e5e MOV qword ptr [RBX + 0x78],R12 LEA RDI,[RBX + 0x90] LEA RAX,[RBX + 0xa0] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x80],XMM0 MOV qword ptr [RBX + 0x90],RAX MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] ADD RDX,RSI LAB_0015369e: CALL 0x001213b2 LAB_001536a3: MOV byte ptr [RBX + 0xb0],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0xb8],XMM0 MOV qword ptr [RBX + 0xc8],0x0 MOV qword ptr [RBX + 0xd0],R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_arg::common_arg(std::initializer_list<char const*> const&, char const*, std::__cxx11::string const&, void (*)(common_params&, int)) */ void __thiscall common_arg::common_arg (common_arg *this,initializer_list *param_1,char *param_2,string *param_3, _func_void_common_params_ptr_int *param_4) { int4 in_EAX; int8 in_R9; std::set<llama_example,std::less<llama_example>,std::allocator<llama_example>>::set (this,&stack0xffffffffffffffcc,1,&stack0xffffffffffffffcb,&stack0xffffffffffffffca,in_R9 ,in_EAX); *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(common_arg **)(this + 0x48) = this + 0x38; *(common_arg **)(this + 0x50) = this + 0x38; *(int8 *)(this + 0x58) = 0; /* try { // try from 00153664 to 00153670 has its CatchHandler @ 001536ef */ std::vector<char_const*,std::allocator<char_const*>>::vector ((vector<char_const*,std::allocator<char_const*>> *)(this + 0x60),*(int8 *)param_1 ,*(int8 *)(param_1 + 8),&stack0xffffffffffffffc9); *(char **)(this + 0x78) = param_2; *(int8 *)(this + 0x80) = 0; *(int8 *)(this + 0x88) = 0; *(common_arg **)(this + 0x90) = this + 0xa0; /* try { // try from 0015369e to 001536a2 has its CatchHandler @ 001536d5 */ std::__cxx11::string::_M_construct<char*> (this + 0x90,*(long *)param_3,*(long *)(param_3 + 8) + *(long *)param_3); this[0xb0] = (common_arg)0x0; *(int8 *)(this + 0xb8) = 0; *(int8 *)(this + 0xc0) = 0; *(int8 *)(this + 200) = 0; *(_func_void_common_params_ptr_int **)(this + 0xd0) = param_4; return; }
51,403
my_time_init
eloqsql/mysys/my_getsystime.c
void my_time_init() { #ifdef _WIN32 compile_time_assert(sizeof(LARGE_INTEGER) == sizeof(query_performance_frequency)); QueryPerformanceFrequency((LARGE_INTEGER *)&query_performance_frequency); DBUG_ASSERT(query_performance_frequency); #endif }
O0
c
my_time_init: pushq %rbp movq %rsp, %rbp popq %rbp retq nopw %cs:(%rax,%rax)
my_time_init: push rbp mov rbp, rsp pop rbp retn
void my_time_init() { ; }
my_time_init: PUSH RBP MOV RBP,RSP POP RBP RET
void my_time_init(void) { return; }
51,404
my_coll_parser_scan_character_list
eloqsql/strings/ctype-uca.c
static int my_coll_parser_scan_character_list(MY_COLL_RULE_PARSER *p, my_wc_t *pwc, size_t limit, const char *name) { if (my_coll_parser_curr(p)->term != MY_COLL_LEXEM_CHAR) return my_coll_parser_expected_error(p, MY_COLL_LEXEM_CHAR); if (!my_coll_rule_expand(pwc, limit, my_coll_parser_curr(p)->code)) return my_coll_parser_too_long_error(p, name); if (!my_coll_parser_scan_term(p, MY_COLL_LEXEM_CHAR)) return 0; while (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_CHAR) { if (!my_coll_rule_expand(pwc, limit, my_coll_parser_curr(p)->code)) return my_coll_parser_too_long_error(p, name); my_coll_parser_scan(p); } return 1; }
O3
c
my_coll_parser_scan_character_list: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx cmpl $0x5, (%rdi) jne 0x40fbd movq %rcx, %r14 movq %rdx, %r12 testq %rdx, %rdx je 0x40f9f movq %rsi, %r13 movslq 0x24(%rbx), %rax xorl %ecx, %ecx cmpq $0x0, (%r13,%rcx,8) je 0x40ff6 incq %rcx cmpq %rcx, %r12 jne 0x40f8f addq $0xf8, %rbx leaq 0x1dae4(%rip), %rdx # 0x5ea91 xorl %r15d, %r15d movl $0x80, %esi movq %rbx, %rdi movq %r14, %rcx jmp 0x40fdd addq $0xf8, %rbx leaq 0x1dad5(%rip), %rdx # 0x5eaa0 leaq 0x1dae4(%rip), %rcx # 0x5eab6 xorl %r15d, %r15d movl $0x80, %esi movq %rbx, %rdi xorl %eax, %eax callq 0x5a9e6 movl %r15d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, (%r13,%rcx,8) movq %rbx, %rdi movl $0x5, %esi callq 0x40cc9 testl %eax, %eax je 0x4106c movl $0x1, %r15d cmpl $0x5, (%rbx) jne 0x40fe4 leaq 0x28(%rbx), %rdx movslq 0x24(%rbx), %rax xorl %ecx, %ecx cmpq $0x0, (%r13,%rcx,8) je 0x41036 incq %rcx cmpq %rcx, %r12 jne 0x41021 jmp 0x40f9f movq %rax, (%r13,%rcx,8) movq 0x20(%rdx), %rax movq %rax, 0x20(%rbx) movups (%rdx), %xmm0 movups 0x10(%rdx), %xmm1 movups %xmm1, 0x10(%rbx) movups %xmm0, (%rbx) movq %rdx, -0x30(%rbp) movq -0x30(%rbp), %rdi callq 0x40a6b movq -0x30(%rbp), %rdx cmpl $0x5, (%rbx) je 0x4101b jmp 0x40fe4 xorl %r15d, %r15d jmp 0x40fe4
my_coll_parser_scan_character_list: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi cmp dword ptr [rdi], 5 jnz short loc_40FBD mov r14, rcx mov r12, rdx test rdx, rdx jz short loc_40F9F mov r13, rsi movsxd rax, dword ptr [rbx+24h] xor ecx, ecx loc_40F8F: cmp qword ptr [r13+rcx*8+0], 0 jz short loc_40FF6 inc rcx cmp r12, rcx jnz short loc_40F8F loc_40F9F: add rbx, 0F8h lea rdx, aSIsTooLong; "%s is too long" xor r15d, r15d mov esi, 80h mov rdi, rbx mov rcx, r14 jmp short loc_40FDD loc_40FBD: add rbx, 0F8h lea rdx, aSExpected; "%s expected" lea rcx, aCharacter; "Character" xor r15d, r15d mov esi, 80h mov rdi, rbx loc_40FDD: xor eax, eax call my_snprintf loc_40FE4: mov eax, r15d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_40FF6: mov [r13+rcx*8+0], rax mov rdi, rbx mov esi, 5 call my_coll_parser_scan_term test eax, eax jz short loc_4106C mov r15d, 1 cmp dword ptr [rbx], 5 jnz short loc_40FE4 lea rdx, [rbx+28h] loc_4101B: movsxd rax, dword ptr [rbx+24h] xor ecx, ecx loc_41021: cmp qword ptr [r13+rcx*8+0], 0 jz short loc_41036 inc rcx cmp r12, rcx jnz short loc_41021 jmp loc_40F9F loc_41036: mov [r13+rcx*8+0], rax mov rax, [rdx+20h] mov [rbx+20h], rax movups xmm0, xmmword ptr [rdx] movups xmm1, xmmword ptr [rdx+10h] movups xmmword ptr [rbx+10h], xmm1 movups xmmword ptr [rbx], xmm0 mov [rbp+var_30], rdx mov rdi, [rbp+var_30] call my_coll_lexem_next mov rdx, [rbp+var_30] cmp dword ptr [rbx], 5 jz short loc_4101B jmp loc_40FE4 loc_4106C: xor r15d, r15d jmp loc_40FE4
long long my_coll_parser_scan_character_list(long long a1, long long a2, long long a3, int a4, int a5, int a6) { long long v8; // rcx const char *v9; // rdx unsigned int v10; // r15d int v11; // edi const char *v12; // rcx long long v14; // rdx long long v15; // rcx __int128 v16; // xmm0 long long v17; // [rsp+0h] [rbp-30h] if ( *(_DWORD *)a1 != 5 ) { v9 = "%s expected"; v12 = "Character"; v10 = 0; v11 = a1 + 248; goto LABEL_8; } if ( !a3 ) { LABEL_6: v9 = "%s is too long"; v10 = 0; v11 = a1 + 248; LODWORD(v12) = a4; LABEL_8: my_snprintf(v11, 128, (_DWORD)v9, (_DWORD)v12, a5, a6); return v10; } v8 = 0LL; while ( *(_QWORD *)(a2 + 8 * v8) ) { if ( a3 == ++v8 ) goto LABEL_6; } *(_QWORD *)(a2 + 8 * v8) = *(int *)(a1 + 36); if ( (unsigned int)my_coll_parser_scan_term(a1, 5) ) { v10 = 1; if ( *(_DWORD *)a1 == 5 ) { v14 = a1 + 40; do { v15 = 0LL; while ( *(_QWORD *)(a2 + 8 * v15) ) { if ( a3 == ++v15 ) goto LABEL_6; } *(_QWORD *)(a2 + 8 * v15) = *(int *)(a1 + 36); *(_QWORD *)(a1 + 32) = *(_QWORD *)(v14 + 32); v16 = *(_OWORD *)v14; *(_OWORD *)(a1 + 16) = *(_OWORD *)(v14 + 16); *(_OWORD *)a1 = v16; v17 = v14; my_coll_lexem_next(v14); v14 = v17; } while ( *(_DWORD *)a1 == 5 ); } } else { return 0; } return v10; }
my_coll_parser_scan_character_list: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI CMP dword ptr [RDI],0x5 JNZ 0x00140fbd MOV R14,RCX MOV R12,RDX TEST RDX,RDX JZ 0x00140f9f MOV R13,RSI MOVSXD RAX,dword ptr [RBX + 0x24] XOR ECX,ECX LAB_00140f8f: CMP qword ptr [R13 + RCX*0x8],0x0 JZ 0x00140ff6 INC RCX CMP R12,RCX JNZ 0x00140f8f LAB_00140f9f: ADD RBX,0xf8 LEA RDX,[0x15ea91] XOR R15D,R15D MOV ESI,0x80 MOV RDI,RBX MOV RCX,R14 JMP 0x00140fdd LAB_00140fbd: ADD RBX,0xf8 LEA RDX,[0x15eaa0] LEA RCX,[0x15eab6] XOR R15D,R15D MOV ESI,0x80 MOV RDI,RBX LAB_00140fdd: XOR EAX,EAX CALL 0x0015a9e6 LAB_00140fe4: MOV EAX,R15D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00140ff6: MOV qword ptr [R13 + RCX*0x8],RAX MOV RDI,RBX MOV ESI,0x5 CALL 0x00140cc9 TEST EAX,EAX JZ 0x0014106c MOV R15D,0x1 CMP dword ptr [RBX],0x5 JNZ 0x00140fe4 LEA RDX,[RBX + 0x28] LAB_0014101b: MOVSXD RAX,dword ptr [RBX + 0x24] XOR ECX,ECX LAB_00141021: CMP qword ptr [R13 + RCX*0x8],0x0 JZ 0x00141036 INC RCX CMP R12,RCX JNZ 0x00141021 JMP 0x00140f9f LAB_00141036: MOV qword ptr [R13 + RCX*0x8],RAX MOV RAX,qword ptr [RDX + 0x20] MOV qword ptr [RBX + 0x20],RAX MOVUPS XMM0,xmmword ptr [RDX] MOVUPS XMM1,xmmword ptr [RDX + 0x10] MOVUPS xmmword ptr [RBX + 0x10],XMM1 MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RBP + -0x30],RDX MOV RDI,qword ptr [RBP + -0x30] CALL 0x00140a6b MOV RDX,qword ptr [RBP + -0x30] CMP dword ptr [RBX],0x5 JZ 0x0014101b JMP 0x00140fe4 LAB_0014106c: XOR R15D,R15D JMP 0x00140fe4
int8 my_coll_parser_scan_character_list(int *param_1,long param_2,long param_3,char *param_4) { int iVar1; long lVar2; char *pcVar3; if (*param_1 == 5) { if (param_3 != 0) { lVar2 = 0; do { if (*(long *)(param_2 + lVar2 * 8) == 0) { *(long *)(param_2 + lVar2 * 8) = (long)param_1[9]; iVar1 = my_coll_parser_scan_term(param_1,5); if (iVar1 == 0) { return 0; } if (*param_1 != 5) { return 1; } do { lVar2 = 0; while (*(long *)(param_2 + lVar2 * 8) != 0) { lVar2 = lVar2 + 1; if (param_3 == lVar2) goto LAB_00140f9f; } *(long *)(param_2 + lVar2 * 8) = (long)param_1[9]; *(int8 *)(param_1 + 8) = *(int8 *)(param_1 + 0x12); param_1[4] = param_1[0xe]; param_1[5] = param_1[0xf]; param_1[6] = param_1[0x10]; param_1[7] = param_1[0x11]; *param_1 = param_1[10]; param_1[1] = param_1[0xb]; param_1[2] = param_1[0xc]; param_1[3] = param_1[0xd]; my_coll_lexem_next(param_1 + 10); if (*param_1 != 5) { return 1; } } while( true ); } lVar2 = lVar2 + 1; } while (param_3 != lVar2); } LAB_00140f9f: pcVar3 = "%s is too long"; } else { pcVar3 = "%s expected"; param_4 = "Character"; } my_snprintf(param_1 + 0x3e,0x80,pcVar3,param_4); return 0; }
51,405
number_to_time_only
eloqsql/client/../sql-common/my_time.c
int number_to_time_only(my_bool neg, ulonglong nr, ulong sec_part, ulong max_hour, MYSQL_TIME *ltime, int *was_cut) { static const ulonglong TIME_MAX_mmss= TIME_MAX_MINUTE*100 + TIME_MAX_SECOND; ulonglong time_max_value= max_hour * 10000ULL + TIME_MAX_mmss; *was_cut= 0; ltime->year= ltime->month= ltime->day= 0; ltime->time_type= MYSQL_TIMESTAMP_TIME; ltime->neg= neg; if (nr > time_max_value) { nr= time_max_value; sec_part= TIME_MAX_SECOND_PART; *was_cut= MYSQL_TIME_WARN_OUT_OF_RANGE; } ltime->hour = (uint)(nr/100/100); ltime->minute= nr/100%100; ltime->second= nr%100; ltime->second_part= sec_part; if (ltime->minute < 60 && ltime->second < 60 && sec_part <= TIME_MAX_SECOND_PART) return 0; *was_cut= MYSQL_TIME_WARN_TRUNCATED; return -1; }
O3
c
number_to_time_only: pushq %rbp movq %rsp, %rbp movq %rdx, %r10 imulq $0x2710, %rcx, %rax # imm = 0x2710 addq $0x1747, %rax # imm = 0x1747 xorl %ecx, %ecx movl %ecx, (%r9) movl %ecx, 0x8(%r8) movq $0x0, (%r8) movl $0x2, 0x24(%r8) movb %dil, 0x20(%r8) cmpq %rsi, %rax jae 0x46b84 movl $0x2, (%r9) movl $0xf423f, %r10d # imm = 0xF423F movq %rax, %rsi movabsq $0x346dc5d63886594b, %rcx # imm = 0x346DC5D63886594B movq %rsi, %rax mulq %rcx shrq $0xb, %rdx movl %edx, 0xc(%r8) movq %rsi, %rax shrq $0x2, %rax movabsq $0x28f5c28f5c28f5c3, %rcx # imm = 0x28F5C28F5C28F5C3 mulq %rcx movq %rdx, %rcx shrq $0x2, %rcx movabsq $0x51eb851eb851eb9, %rdx # imm = 0x51EB851EB851EB9 movq %rcx, %rax mulq %rdx shrq %rdx imulq $0x64, %rdx, %rax imulq $0x64, %rcx, %rdx subq %rax, %rcx movl %ecx, 0x10(%r8) subq %rdx, %rsi movl %esi, 0x14(%r8) movq %r10, 0x18(%r8) cmpq $0x3b, %rcx ja 0x46c01 cmpq $0x3c, %rsi setb %cl cmpq $0xf4240, %r10 # imm = 0xF4240 setb %dl xorl %eax, %eax testb %cl, %dl jne 0x46c0d movl $0x1, (%r9) movl $0xffffffff, %eax # imm = 0xFFFFFFFF popq %rbp retq
number_to_time_only: push rbp mov rbp, rsp mov r10, rdx imul rax, rcx, 2710h add rax, 1747h xor ecx, ecx mov [r9], ecx mov [r8+8], ecx mov qword ptr [r8], 0 mov dword ptr [r8+24h], 2 mov [r8+20h], dil cmp rax, rsi jnb short loc_46B84 mov dword ptr [r9], 2 mov r10d, offset unk_F423F mov rsi, rax loc_46B84: mov rcx, 346DC5D63886594Bh mov rax, rsi mul rcx shr rdx, 0Bh mov [r8+0Ch], edx mov rax, rsi shr rax, 2 mov rcx, 28F5C28F5C28F5C3h mul rcx mov rcx, rdx shr rcx, 2 mov rdx, 51EB851EB851EB9h mov rax, rcx mul rdx shr rdx, 1 imul rax, rdx, 64h ; 'd' imul rdx, rcx, 64h ; 'd' sub rcx, rax mov [r8+10h], ecx sub rsi, rdx mov [r8+14h], esi mov [r8+18h], r10 cmp rcx, 3Bh ; ';' ja short loc_46C01 cmp rsi, 3Ch ; '<' setb cl cmp r10, offset unk_F4240 setb dl xor eax, eax test dl, cl jnz short loc_46C0D loc_46C01: mov dword ptr [r9], 1 mov eax, 0FFFFFFFFh loc_46C0D: pop rbp retn
long long number_to_time_only(char a1, unsigned long long a2, void *a3, long long a4, long long a5, _DWORD *a6) { unsigned long long v7; // rcx unsigned long long v8; // rsi long long result; // rax *a6 = 0; *(_DWORD *)(a5 + 8) = 0; *(_QWORD *)a5 = 0LL; *(_DWORD *)(a5 + 36) = 2; *(_BYTE *)(a5 + 32) = a1; if ( 10000 * a4 + 5959 < a2 ) { *a6 = 2; a3 = &unk_F423F; a2 = 10000 * a4 + 5959; } *(_DWORD *)(a5 + 12) = a2 / 0x2710; v7 = a2 / 0x64 - 100 * ((unsigned long long)((0x51EB851EB851EB9LL * (unsigned __int128)(a2 / 0x64)) >> 64) >> 1); *(_DWORD *)(a5 + 16) = v7; v8 = a2 % 0x64; *(_DWORD *)(a5 + 20) = v8; *(_QWORD *)(a5 + 24) = a3; if ( v7 > 0x3B || (result = 0LL, v8 >= 0x3C || a3 >= &unk_F4240) ) { *a6 = 1; return 0xFFFFFFFFLL; } return result; }
number_to_time_only: PUSH RBP MOV RBP,RSP MOV R10,RDX IMUL RAX,RCX,0x2710 ADD RAX,0x1747 XOR ECX,ECX MOV dword ptr [R9],ECX MOV dword ptr [R8 + 0x8],ECX MOV qword ptr [R8],0x0 MOV dword ptr [R8 + 0x24],0x2 MOV byte ptr [R8 + 0x20],DIL CMP RAX,RSI JNC 0x00146b84 MOV dword ptr [R9],0x2 MOV R10D,0xf423f MOV RSI,RAX LAB_00146b84: MOV RCX,0x346dc5d63886594b MOV RAX,RSI MUL RCX SHR RDX,0xb MOV dword ptr [R8 + 0xc],EDX MOV RAX,RSI SHR RAX,0x2 MOV RCX,0x28f5c28f5c28f5c3 MUL RCX MOV RCX,RDX SHR RCX,0x2 MOV RDX,0x51eb851eb851eb9 MOV RAX,RCX MUL RDX SHR RDX,0x1 IMUL RAX,RDX,0x64 IMUL RDX,RCX,0x64 SUB RCX,RAX MOV dword ptr [R8 + 0x10],ECX SUB RSI,RDX MOV dword ptr [R8 + 0x14],ESI MOV qword ptr [R8 + 0x18],R10 CMP RCX,0x3b JA 0x00146c01 CMP RSI,0x3c SETC CL CMP R10,0xf4240 SETC DL XOR EAX,EAX TEST DL,CL JNZ 0x00146c0d LAB_00146c01: MOV dword ptr [R9],0x1 MOV EAX,0xffffffff LAB_00146c0d: POP RBP RET
int8 number_to_time_only(int1 param_1,ulong param_2,ulong param_3,long param_4,int8 *param_5, int4 *param_6) { ulong uVar1; int8 uVar2; uVar1 = param_4 * 10000 + 0x1747; *param_6 = 0; *(int4 *)(param_5 + 1) = 0; *param_5 = 0; *(int4 *)((long)param_5 + 0x24) = 2; *(int1 *)(param_5 + 4) = param_1; if (uVar1 < param_2) { *param_6 = 2; param_3 = 999999; param_2 = uVar1; } *(int *)((long)param_5 + 0xc) = (int)(param_2 / 10000); uVar1 = (param_2 / 100) % 100; *(int *)(param_5 + 2) = (int)uVar1; *(int *)((long)param_5 + 0x14) = (int)(param_2 % 100); param_5[3] = param_3; if ((0x3b < uVar1) || (uVar2 = 0, 999999 < param_3 || 0x3b < param_2 % 100)) { *param_6 = 1; uVar2 = 0xffffffff; } return uVar2; }
51,406
LefDefParser::defiNet::changePin(char const*, int)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNet.cpp
void defiNet::changePin(const char* pin, int index) { int len; char errMsg[128]; if ((index < 0) || (index > numPins_)) { sprintf (errMsg, "ERROR (DEFPARS-6084): The index number %d specified for the NET PIN is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again.", index, numPins_); defiError(0, 6084, errMsg, defData); } len = strlen(pin)+ 1; if (pins_[index]) free((char*)(pins_[index])); pins_[index] = (char*)malloc(len); strcpy(pins_[index], defData->DEFCASE(pin)); return; }
O3
cpp
LefDefParser::defiNet::changePin(char const*, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movl %edx, %ebp movq %rsi, %rbx movq %rdi, %r14 testl %edx, %edx sets %al movl 0xc(%rdi), %ecx cmpl %edx, %ecx setl %dl orb %al, %dl cmpb $0x1, %dl jne 0x220e3 leaq 0x20afc(%rip), %rsi # 0x42bba movq %rsp, %r15 movq %r15, %rdi movl %ebp, %edx xorl %eax, %eax callq 0x6060 movq 0x240(%r14), %rcx xorl %edi, %edi movl $0x17c4, %esi # imm = 0x17C4 movq %r15, %rdx callq 0x18f80 movq %rbx, %rdi callq 0x60d0 movq %rax, %r15 movq 0x20(%r14), %r13 movslq %ebp, %r12 movq (%r13,%r12,8), %rdi testq %rdi, %rdi je 0x22108 callq 0x6220 movq 0x20(%r14), %r13 incl %r15d movslq %r15d, %rdi callq 0x6270 movq %rax, (%r13,%r12,8) movq 0x20(%r14), %rax movq (%rax,%r12,8), %r15 movq 0x240(%r14), %rdi movq %rbx, %rsi callq 0x18aa0 movq %r15, %rdi movq %rax, %rsi callq 0x6190 addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN12LefDefParser7defiNet9changePinEPKci: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov ebp, edx mov rbx, rsi mov r14, rdi test edx, edx sets al mov ecx, [rdi+0Ch] cmp ecx, edx setl dl or dl, al cmp dl, 1 jnz short loc_220E3 lea rsi, aErrorDefpars60_5; "ERROR (DEFPARS-6084): The index number "... mov r15, rsp mov rdi, r15 mov edx, ebp xor eax, eax call _sprintf mov rcx, [r14+240h]; LefDefParser::defrData * xor edi, edi; this mov esi, 17C4h; int mov rdx, r15; char * call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *) loc_220E3: mov rdi, rbx call _strlen mov r15, rax mov r13, [r14+20h] movsxd r12, ebp mov rdi, [r13+r12*8+0] test rdi, rdi jz short loc_22108 call _free mov r13, [r14+20h] loc_22108: inc r15d movsxd rdi, r15d call _malloc mov [r13+r12*8+0], rax mov rax, [r14+20h] mov r15, [rax+r12*8] mov rdi, [r14+240h]; this mov rsi, rbx; char * call _ZN12LefDefParser8defrData7DEFCASEEPKc; LefDefParser::defrData::DEFCASE(char const*) mov rdi, r15 mov rsi, rax call _strcpy add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long LefDefParser::defiNet::changePin(LefDefParser::defiNet *this, const char *a2, int a3) { int v5; // ecx LefDefParser::defrData *v6; // r8 int v7; // r15d long long v8; // r13 long long v9; // rdi long long v10; // r15 const char *v11; // rax char v13[184]; // [rsp+0h] [rbp-B8h] BYREF v5 = *((_DWORD *)this + 3); if ( a3 < 0 || v5 < a3 ) { sprintf( v13, "ERROR (DEFPARS-6084): The index number %d specified for the NET PIN is invalid.\n" "Valid index is from 0 to %d. Specify a valid index number and then try again.", a3, v5); LefDefParser::defiError(0LL, 6084, v13, *((LefDefParser::defrData **)this + 72), v6); } v7 = strlen(a2); v8 = *((_QWORD *)this + 4); v9 = *(_QWORD *)(v8 + 8LL * a3); if ( v9 ) { free(v9); v8 = *((_QWORD *)this + 4); } *(_QWORD *)(v8 + 8LL * a3) = malloc(v7 + 1); v10 = *(_QWORD *)(*((_QWORD *)this + 4) + 8LL * a3); v11 = LefDefParser::defrData::DEFCASE(*((LefDefParser::defrData **)this + 72), a2); return strcpy(v10, v11); }
changePin: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOV EBP,EDX MOV RBX,RSI MOV R14,RDI TEST EDX,EDX SETS AL MOV ECX,dword ptr [RDI + 0xc] CMP ECX,EDX SETL DL OR DL,AL CMP DL,0x1 JNZ 0x001220e3 LEA RSI,[0x142bba] MOV R15,RSP MOV RDI,R15 MOV EDX,EBP XOR EAX,EAX CALL 0x00106060 MOV RCX,qword ptr [R14 + 0x240] XOR EDI,EDI MOV ESI,0x17c4 MOV RDX,R15 CALL 0x00118f80 LAB_001220e3: MOV RDI,RBX CALL 0x001060d0 MOV R15,RAX MOV R13,qword ptr [R14 + 0x20] MOVSXD R12,EBP MOV RDI,qword ptr [R13 + R12*0x8] TEST RDI,RDI JZ 0x00122108 CALL 0x00106220 MOV R13,qword ptr [R14 + 0x20] LAB_00122108: INC R15D MOVSXD RDI,R15D CALL 0x00106270 MOV qword ptr [R13 + R12*0x8],RAX MOV RAX,qword ptr [R14 + 0x20] MOV R15,qword ptr [RAX + R12*0x8] MOV RDI,qword ptr [R14 + 0x240] MOV RSI,RBX CALL 0x00118aa0 MOV RDI,R15 MOV RSI,RAX CALL 0x00106190 ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* LefDefParser::defiNet::changePin(char const*, int) */ void __thiscall LefDefParser::defiNet::changePin(defiNet *this,char *param_1,int param_2) { char *__dest; size_t sVar1; void *pvVar2; char *__src; long lVar3; long lVar4; char acStack_b8 [136]; if (*(int *)(this + 0xc) < param_2 || param_2 < 0) { sprintf(acStack_b8, "ERROR (DEFPARS-6084): The index number %d specified for the NET PIN is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again." ,(ulong)(uint)param_2); defiError(0,0x17c4,acStack_b8,*(defrData **)(this + 0x240)); } sVar1 = strlen(param_1); lVar4 = *(long *)(this + 0x20); lVar3 = (long)param_2; pvVar2 = *(void **)(lVar4 + lVar3 * 8); if (pvVar2 != (void *)0x0) { free(pvVar2); lVar4 = *(long *)(this + 0x20); } pvVar2 = malloc((long)((int)sVar1 + 1)); *(void **)(lVar4 + lVar3 * 8) = pvVar2; __dest = *(char **)(*(long *)(this + 0x20) + lVar3 * 8); __src = (char *)defrData::DEFCASE(*(defrData **)(this + 0x240),param_1); strcpy(__dest,__src); return; }
51,407
build_repetition(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/json-schema-to-grammar.cpp
static std::string build_repetition(const std::string & item_rule, int min_items, int max_items, const std::string & separator_rule = "") { auto has_max = max_items != std::numeric_limits<int>::max(); if (min_items == 0 && max_items == 1) { return item_rule + "?"; } if (separator_rule.empty()) { if (min_items == 1 && !has_max) { return item_rule + "+"; } else if (min_items == 0 && !has_max) { return item_rule + "*"; } else { return item_rule + "{" + std::to_string(min_items) + "," + (has_max ? std::to_string(max_items) : "") + "}"; } } auto result = item_rule + " " + build_repetition("(" + separator_rule + " " + item_rule + ")", min_items == 0 ? 0 : min_items - 1, has_max ? max_items - 1 : max_items); if (min_items == 0) { result = "(" + result + ")?"; } return result; }
O2
cpp
build_repetition(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0xf0, %rsp movq %rsi, %r15 movq %rdi, %rbx movl %ecx, %eax xorl $0x1, %eax orl %edx, %eax jne 0x85dc8 leaq 0x16a7b(%rip), %rdx # 0x9c833 movq %rbx, %rdi movq %r15, %rsi callq 0x27911 jmp 0x86071 movq %r8, %r12 movl %ecx, %ebp movl %edx, %r14d cmpq $0x0, 0x8(%r8) je 0x85f4d leaq 0xd764(%rip), %rdx # 0x93546 leaq 0x30(%rsp), %rdi movq %r15, %rsi callq 0x27911 leaq 0x16c2e(%rip), %rsi # 0x9ca24 leaq 0x50(%rsp), %rdi movq %r12, %rdx callq 0x2dac1 leaq 0xd73c(%rip), %rdx # 0x93546 leaq 0x70(%rsp), %rdi leaq 0x50(%rsp), %rsi callq 0x2d7d6 leaq 0x90(%rsp), %rdi leaq 0x70(%rsp), %rsi movq %r15, %rdx callq 0x609d3 leaq 0x168ce(%rip), %rdx # 0x9c703 leaq 0xb0(%rsp), %rdi leaq 0x90(%rsp), %rsi callq 0x2d7d6 leaq 0xb29d(%rip), %rsi # 0x910ee leaq 0xd0(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x26838 xorl %eax, %eax cmpl $0x7fffffff, %ebp # imm = 0x7FFFFFFF setne %al subl %eax, %ebp xorl %eax, %eax movl %r14d, %edx subl $0x1, %edx cmovbl %eax, %edx leaq 0x10(%rsp), %rdi leaq 0xb0(%rsp), %rsi leaq 0xd0(%rsp), %r8 movl %ebp, %ecx callq 0x85d93 leaq 0x30(%rsp), %rsi leaq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x2d811 leaq 0x10(%rsp), %rdi callq 0x22f48 leaq 0xd0(%rsp), %rdi callq 0x22f48 leaq 0xb0(%rsp), %rdi callq 0x22f48 leaq 0x90(%rsp), %rdi callq 0x22f48 leaq 0x70(%rsp), %rdi callq 0x22f48 leaq 0x50(%rsp), %rdi callq 0x22f48 leaq 0x30(%rsp), %rdi callq 0x22f48 testl %r14d, %r14d jne 0x86071 leaq 0x16b1c(%rip), %rsi # 0x9ca24 leaq 0x10(%rsp), %rdi movq %rbx, %rdx callq 0x2dac1 leaq 0x16aaa(%rip), %rdx # 0x9c9c6 leaq 0x30(%rsp), %rdi leaq 0x10(%rsp), %rsi callq 0x2d7d6 leaq 0x30(%rsp), %r14 movq %rbx, %rdi movq %r14, %rsi callq 0x22930 movq %r14, %rdi callq 0x22f48 leaq 0x10(%rsp), %rdi jmp 0x8606c movl %ebp, %eax xorl $0x7fffffff, %eax # imm = 0x7FFFFFFF movl %r14d, %ecx xorl $0x1, %ecx orl %eax, %ecx je 0x85fd0 orl %r14d, %eax je 0x85fdc leaq 0xe726(%rip), %rdx # 0x94690 leaq 0x90(%rsp), %rdi movq %r15, %rsi callq 0x27911 leaq 0x70(%rsp), %rdi movl %r14d, %esi callq 0x2d899 leaq 0xb0(%rsp), %rdi leaq 0x90(%rsp), %rsi leaq 0x70(%rsp), %rdx callq 0x2d811 leaq 0xfd11(%rip), %rdx # 0x95cb9 leaq 0x10(%rsp), %rdi leaq 0xb0(%rsp), %rsi callq 0x2d7d6 cmpl $0x7fffffff, %ebp # imm = 0x7FFFFFFF je 0x85fe8 leaq 0x50(%rsp), %rdi movl %ebp, %esi callq 0x2d899 jmp 0x86001 leaq 0x105ce(%rip), %rdx # 0x965a5 jmp 0x85db8 leaq 0x156e6(%rip), %rdx # 0x9b6c9 jmp 0x85db8 leaq 0xb0ff(%rip), %rsi # 0x910ee leaq 0x50(%rsp), %rdi leaq 0xd0(%rsp), %rdx callq 0x26838 leaq 0x30(%rsp), %rdi leaq 0x10(%rsp), %rsi leaq 0x50(%rsp), %rdx callq 0x2d811 leaq 0x16443(%rip), %rdx # 0x9c45f leaq 0x30(%rsp), %rsi movq %rbx, %rdi callq 0x2d7d6 leaq 0x30(%rsp), %rdi callq 0x22f48 leaq 0x50(%rsp), %rdi callq 0x22f48 cmpl $0x7fffffff, %ebp # imm = 0x7FFFFFFF leaq 0x10(%rsp), %rdi callq 0x22f48 leaq 0xb0(%rsp), %rdi callq 0x22f48 leaq 0x70(%rsp), %rdi callq 0x22f48 leaq 0x90(%rsp), %rdi callq 0x22f48 movq %rbx, %rax addq $0xf0, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq jmp 0x86086 movq %rax, %r14 jmp 0x860ad movq %rax, %r14 leaq 0x30(%rsp), %rdi callq 0x22f48 jmp 0x8609d movq %rax, %r14 leaq 0x50(%rsp), %rdi callq 0x22f48 cmpl $0x7fffffff, %ebp # imm = 0x7FFFFFFF leaq 0x10(%rsp), %rdi callq 0x22f48 jmp 0x860bc movq %rax, %r14 leaq 0xb0(%rsp), %rdi callq 0x22f48 jmp 0x860ce movq %rax, %r14 leaq 0x70(%rsp), %rdi callq 0x22f48 leaq 0x90(%rsp), %rdi jmp 0x8615f movq %rax, %r14 jmp 0x860d8 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x22f48 jmp 0x860f9 movq %rax, %r14 movq %rbx, %rdi jmp 0x8615f movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x22f48 jmp 0x86110 movq %rax, %r14 leaq 0xd0(%rsp), %rdi callq 0x22f48 jmp 0x86122 movq %rax, %r14 leaq 0xb0(%rsp), %rdi callq 0x22f48 jmp 0x86134 movq %rax, %r14 leaq 0x90(%rsp), %rdi callq 0x22f48 jmp 0x86146 movq %rax, %r14 leaq 0x70(%rsp), %rdi callq 0x22f48 leaq 0x50(%rsp), %rdi callq 0x22f48 leaq 0x30(%rsp), %rdi callq 0x22f48 movq %r14, %rdi callq 0x22d30 movq %rax, %r14 jmp 0x86150 movq %rax, %r14 jmp 0x8615a
_ZL16build_repetitionRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiiS6_: push rbp push r15 push r14 push r12 push rbx sub rsp, 0F0h mov r15, rsi mov rbx, rdi mov eax, ecx xor eax, 1 or eax, edx jnz short loc_85DC8 lea rdx, asc_9C830+3; "?" loc_85DB8: mov rdi, rbx mov rsi, r15 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) jmp loc_86071 loc_85DC8: mov r12, r8 mov ebp, ecx mov r14d, edx cmp qword ptr [r8+8], 0 jz loc_85F4D lea rdx, aForMessageInMe+144h; " " lea rdi, [rsp+118h+var_E8] mov rsi, r15 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) lea rsi, asc_9CA1F+5; "(" lea rdi, [rsp+118h+var_C8] mov rdx, r12 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) lea rdx, aForMessageInMe+144h; " " lea rdi, [rsp+118h+var_A8] lea rsi, [rsp+118h+var_C8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) lea rdi, [rsp+118h+var_88] lea rsi, [rsp+118h+var_A8] mov rdx, r15 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_; std::operator+<char>(std::string&&,std::string const&) lea rdx, a09401910201912+51h; ")" lea rdi, [rsp+118h+var_68] lea rsi, [rsp+118h+var_88] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) lea rsi, aSUnableToOpenT+2Bh; "" lea rdi, [rsp+118h+var_48] lea rdx, [rsp+118h+var_109] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) xor eax, eax cmp ebp, 7FFFFFFFh setnz al sub ebp, eax xor eax, eax mov edx, r14d sub edx, 1 cmovb edx, eax lea rdi, [rsp+118h+var_108] lea rsi, [rsp+118h+var_68] lea r8, [rsp+118h+var_48] mov ecx, ebp call _ZL16build_repetitionRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiiS6_; build_repetition(std::string const&,int,int,std::string const&) lea rsi, [rsp+118h+var_E8] lea rdx, [rsp+118h+var_108] mov rdi, rbx call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) lea rdi, [rsp+118h+var_108]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+118h+var_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+118h+var_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+118h+var_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+118h+var_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+118h+var_C8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+118h+var_E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test r14d, r14d jnz loc_86071 lea rsi, asc_9CA1F+5; "(" lea rdi, [rsp+118h+var_108] mov rdx, rbx call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) lea rdx, asc_9C9C5+1; ")?" lea rdi, [rsp+118h+var_E8] lea rsi, [rsp+118h+var_108] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) lea r14, [rsp+118h+var_E8] mov rdi, rbx mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+118h+var_108] jmp loc_8606C loc_85F4D: mov eax, ebp xor eax, 7FFFFFFFh mov ecx, r14d xor ecx, 1 or ecx, eax jz short loc_85FD0 or eax, r14d jz short loc_85FDC lea rdx, asc_94690; "{" lea rdi, [rsp+118h+var_88] mov rsi, r15 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) lea rdi, [rsp+118h+var_A8]; this mov esi, r14d; int call _ZNSt7__cxx119to_stringEi; std::to_string(int) lea rdi, [rsp+118h+var_68] lea rsi, [rsp+118h+var_88] lea rdx, [rsp+118h+var_A8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) lea rdx, asc_95CB9; "," lea rdi, [rsp+118h+var_108] lea rsi, [rsp+118h+var_68] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) cmp ebp, 7FFFFFFFh jz short loc_85FE8 lea rdi, [rsp+118h+var_C8]; this mov esi, ebp; int call _ZNSt7__cxx119to_stringEi; std::to_string(int) jmp short loc_86001 loc_85FD0: lea rdx, aSRN_0+0Bh; "+" jmp loc_85DB8 loc_85FDC: lea rdx, asc_9B6C8+1; "*" jmp loc_85DB8 loc_85FE8: lea rsi, aSUnableToOpenT+2Bh; "" lea rdi, [rsp+118h+var_C8] lea rdx, [rsp+118h+var_48] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) loc_86001: lea rdi, [rsp+118h+var_E8] lea rsi, [rsp+118h+var_108] lea rdx, [rsp+118h+var_C8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) lea rdx, aNT020+17h; "}" lea rsi, [rsp+118h+var_E8] mov rdi, rbx call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) lea rdi, [rsp+118h+var_E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+118h+var_C8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() cmp ebp, 7FFFFFFFh lea rdi, [rsp+118h+var_108]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+118h+var_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+118h+var_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+118h+var_88]; void * loc_8606C: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_86071: mov rax, rbx add rsp, 0F0h pop rbx pop r12 pop r14 pop r15 pop rbp retn jmp short $+2 loc_86086: mov r14, rax jmp short loc_860AD mov r14, rax lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_8609D mov r14, rax loc_8609D: lea rdi, [rsp+arg_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() cmp ebp, 7FFFFFFFh loc_860AD: lea rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_860BC mov r14, rax loc_860BC: lea rdi, [rsp+arg_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_860CE mov r14, rax loc_860CE: lea rdi, [rsp+arg_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_860D8: lea rdi, [rsp+arg_88] jmp short loc_8615F mov r14, rax jmp short loc_860D8 mov r14, rax lea rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_860F9 mov r14, rax loc_860F9: mov rdi, rbx jmp short loc_8615F mov r14, rax lea rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_86110 mov r14, rax loc_86110: lea rdi, [rsp+arg_C8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_86122 mov r14, rax loc_86122: lea rdi, [rsp+arg_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_86134 mov r14, rax loc_86134: lea rdi, [rsp+arg_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_86146 mov r14, rax loc_86146: lea rdi, [rsp+arg_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_86150: lea rdi, [rsp+arg_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_8615A: lea rdi, [rsp+arg_28]; void * loc_8615F: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14 call __Unwind_Resume mov r14, rax jmp short loc_86150 mov r14, rax jmp short loc_8615A
long long build_repetition(long long a1, long long a2, int a3, int a4, long long a5) { char *v6; // rdx int v10; // r9d int v11; // ebp int v12; // edx _QWORD *v13; // rdi _QWORD v15[4]; // [rsp+10h] [rbp-108h] BYREF _QWORD v16[4]; // [rsp+30h] [rbp-E8h] BYREF _QWORD v17[4]; // [rsp+50h] [rbp-C8h] BYREF _QWORD v18[4]; // [rsp+70h] [rbp-A8h] BYREF _QWORD v19[4]; // [rsp+90h] [rbp-88h] BYREF _BYTE v20[32]; // [rsp+B0h] [rbp-68h] BYREF _QWORD v21[9]; // [rsp+D0h] [rbp-48h] BYREF if ( !(a3 | a4 ^ 1) ) { v6 = "?"; LABEL_3: std::operator+<char>(a1, a2, (long long)v6); return a1; } if ( !*(_QWORD *)(a5 + 8) ) { if ( !(a4 ^ 0x7FFFFFFF | a3 ^ 1) ) { v6 = "+"; goto LABEL_3; } if ( !(a3 | a4 ^ 0x7FFFFFFF) ) { v6 = "*"; goto LABEL_3; } std::operator+<char>((long long)v19, a2, (long long)"{"); std::to_string((std::__cxx11 *)v18, a3); std::operator+<char>((long long)v20, v19, v18); std::operator+<char>((long long)v15, (long long)v20, (long long)","); if ( a4 == 0x7FFFFFFF ) std::string::basic_string<std::allocator<char>>(v17, (long long)""); else std::to_string((std::__cxx11 *)v17, a4); std::operator+<char>((long long)v16, v15, v17); std::operator+<char>(a1, (long long)v16, (long long)"}"); std::string::~string(v16); std::string::~string(v17); std::string::~string(v15); std::string::~string(v20); std::string::~string(v18); v13 = v19; LABEL_17: std::string::~string(v13); return a1; } std::operator+<char>((long long)v16, a2, (long long)" "); std::operator+<char>((long long)v17, (long long)"(", a5); std::operator+<char>((long long)v18, (long long)v17, (long long)" "); std::operator+<char>((long long)v19, (long long)v18, a2); std::operator+<char>((long long)v20, (long long)v19, (long long)")"); std::string::basic_string<std::allocator<char>>(v21, (long long)""); v11 = a4 - (a4 != 0x7FFFFFFF); v12 = a3 - 1; if ( !a3 ) v12 = 0; build_repetition((unsigned int)v15, (unsigned int)v20, v12, v11, (unsigned int)v21, v10); std::operator+<char>(a1, v16, v15); std::string::~string(v15); std::string::~string(v21); std::string::~string(v20); std::string::~string(v19); std::string::~string(v18); std::string::~string(v17); std::string::~string(v16); if ( !a3 ) { std::operator+<char>((long long)v15, (long long)"(", a1); std::operator+<char>((long long)v16, (long long)v15, (long long)")?"); std::string::operator=(a1, v16); std::string::~string(v16); v13 = v15; goto LABEL_17; } return a1; }
build_repetition: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0xf0 MOV R15,RSI MOV RBX,RDI MOV EAX,ECX XOR EAX,0x1 OR EAX,EDX JNZ 0x00185dc8 LEA RDX,[0x19c833] LAB_00185db8: MOV RDI,RBX MOV RSI,R15 CALL 0x00127911 JMP 0x00186071 LAB_00185dc8: MOV R12,R8 MOV EBP,ECX MOV R14D,EDX CMP qword ptr [R8 + 0x8],0x0 JZ 0x00185f4d LEA RDX,[0x193546] LEA RDI,[RSP + 0x30] MOV RSI,R15 CALL 0x00127911 LAB_00185def: LEA RSI,[0x19ca24] LEA RDI,[RSP + 0x50] MOV RDX,R12 CALL 0x0012dac1 LAB_00185e03: LEA RDX,[0x193546] LEA RDI,[RSP + 0x70] LEA RSI,[RSP + 0x50] CALL 0x0012d7d6 LAB_00185e19: LEA RDI,[RSP + 0x90] LEA RSI,[RSP + 0x70] MOV RDX,R15 CALL 0x001609d3 LAB_00185e2e: LEA RDX,[0x19c703] LEA RDI,[RSP + 0xb0] LEA RSI,[RSP + 0x90] CALL 0x0012d7d6 LAB_00185e4a: LEA RSI,[0x1910ee] LEA RDI,[RSP + 0xd0] LEA RDX,[RSP + 0xf] CALL 0x00126838 XOR EAX,EAX CMP EBP,0x7fffffff SETNZ AL SUB EBP,EAX XOR EAX,EAX MOV EDX,R14D SUB EDX,0x1 CMOVC EDX,EAX LAB_00185e7b: LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0xb0] LEA R8,[RSP + 0xd0] MOV ECX,EBP CALL 0x00185d93 LAB_00185e97: LEA RSI,[RSP + 0x30] LEA RDX,[RSP + 0x10] MOV RDI,RBX CALL 0x0012d811 LEA RDI,[RSP + 0x10] CALL 0x00122f48 LEA RDI,[RSP + 0xd0] CALL 0x00122f48 LEA RDI,[RSP + 0xb0] CALL 0x00122f48 LEA RDI,[RSP + 0x90] CALL 0x00122f48 LEA RDI,[RSP + 0x70] CALL 0x00122f48 LEA RDI,[RSP + 0x50] CALL 0x00122f48 LEA RDI,[RSP + 0x30] CALL 0x00122f48 TEST R14D,R14D JNZ 0x00186071 LAB_00185f01: LEA RSI,[0x19ca24] LEA RDI,[RSP + 0x10] MOV RDX,RBX CALL 0x0012dac1 LAB_00185f15: LEA RDX,[0x19c9c6] LEA RDI,[RSP + 0x30] LEA RSI,[RSP + 0x10] CALL 0x0012d7d6 LAB_00185f2b: LEA R14,[RSP + 0x30] MOV RDI,RBX MOV RSI,R14 CALL 0x00122930 MOV RDI,R14 CALL 0x00122f48 LEA RDI,[RSP + 0x10] JMP 0x0018606c LAB_00185f4d: MOV EAX,EBP XOR EAX,0x7fffffff MOV ECX,R14D XOR ECX,0x1 OR ECX,EAX JZ 0x00185fd0 OR EAX,R14D JZ 0x00185fdc LEA RDX,[0x194690] LEA RDI,[RSP + 0x90] MOV RSI,R15 CALL 0x00127911 LAB_00185f7a: LEA RDI,[RSP + 0x70] MOV ESI,R14D CALL 0x0012d899 LAB_00185f87: LEA RDI,[RSP + 0xb0] LEA RSI,[RSP + 0x90] LEA RDX,[RSP + 0x70] CALL 0x0012d811 LAB_00185fa1: LEA RDX,[0x195cb9] LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0xb0] CALL 0x0012d7d6 CMP EBP,0x7fffffff JZ 0x00185fe8 LAB_00185fc2: LEA RDI,[RSP + 0x50] MOV ESI,EBP CALL 0x0012d899 JMP 0x00186001 LAB_00185fd0: LEA RDX,[0x1965a5] JMP 0x00185db8 LAB_00185fdc: LEA RDX,[0x19b6c9] JMP 0x00185db8 LAB_00185fe8: LEA RSI,[0x1910ee] LEA RDI,[RSP + 0x50] LEA RDX,[RSP + 0xd0] CALL 0x00126838 LAB_00186001: LEA RDI,[RSP + 0x30] LEA RSI,[RSP + 0x10] LEA RDX,[RSP + 0x50] CALL 0x0012d811 LAB_00186015: LEA RDX,[0x19c45f] LEA RSI,[RSP + 0x30] MOV RDI,RBX CALL 0x0012d7d6 LAB_00186029: LEA RDI,[RSP + 0x30] CALL 0x00122f48 LEA RDI,[RSP + 0x50] CALL 0x00122f48 CMP EBP,0x7fffffff LEA RDI,[RSP + 0x10] CALL 0x00122f48 LEA RDI,[RSP + 0xb0] CALL 0x00122f48 LEA RDI,[RSP + 0x70] CALL 0x00122f48 LEA RDI,[RSP + 0x90] LAB_0018606c: CALL 0x00122f48 LAB_00186071: MOV RAX,RBX ADD RSP,0xf0 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* build_repetition(std::__cxx11::string const&, int, int, std::__cxx11::string const&) */ string * build_repetition(string *param_1,int param_2,int param_3,string *param_4) { uint uVar1; int iVar2; int4 in_register_00000034; char *pcVar3; string *this; long in_R8; allocator local_109; string local_108 [32]; string local_e8 [32]; string local_c8 [32]; string local_a8 [32]; string local_88 [32]; string local_68 [32]; string local_48 [32]; pcVar3 = (char *)CONCAT44(in_register_00000034,param_2); uVar1 = (uint)param_4; if (uVar1 == 1 && param_3 == 0) { LAB_00185db8: std::operator+(param_1,pcVar3); } else { if (*(long *)(in_R8 + 8) == 0) { if ((param_3 == 1 && (uVar1 ^ 0x7fffffff) == 0) || ((uVar1 ^ 0x7fffffff) == 0 && param_3 == 0) ) goto LAB_00185db8; std::operator+(local_88,pcVar3); /* try { // try from 00185f7a to 00185f86 has its CatchHandler @ 001860e2 */ std::__cxx11::to_string((__cxx11 *)local_a8,param_3); /* try { // try from 00185f87 to 00185fa0 has its CatchHandler @ 001860cb */ std::operator+(local_68,local_88); /* try { // try from 00185fa1 to 00185fb9 has its CatchHandler @ 001860b9 */ std::operator+(local_108,(char *)local_68); if (uVar1 == 0x7fffffff) { /* try { // try from 00185fe8 to 00186000 has its CatchHandler @ 00186084 */ std::__cxx11::string::string<std::allocator<char>>(local_c8,"",(allocator *)local_48); } else { /* try { // try from 00185fc2 to 00185fcd has its CatchHandler @ 00186086 */ std::__cxx11::to_string((__cxx11 *)local_c8,uVar1); } /* try { // try from 00186001 to 00186014 has its CatchHandler @ 0018609a */ std::operator+(local_e8,local_108); /* try { // try from 00186015 to 00186028 has its CatchHandler @ 0018608b */ std::operator+(param_1,(char *)local_e8); std::__cxx11::string::~string(local_e8); std::__cxx11::string::~string(local_c8); std::__cxx11::string::~string(local_108); std::__cxx11::string::~string(local_68); std::__cxx11::string::~string(local_a8); this = local_88; } else { std::operator+(local_e8,pcVar3); /* try { // try from 00185def to 00185e02 has its CatchHandler @ 00186171 */ std::operator+((char *)local_c8,(string *)&DAT_0019ca24); /* try { // try from 00185e03 to 00185e18 has its CatchHandler @ 0018616c */ std::operator+(local_a8,(char *)local_c8); /* try { // try from 00185e19 to 00185e2d has its CatchHandler @ 00186143 */ std::operator+(local_88,local_a8); /* try { // try from 00185e2e to 00185e49 has its CatchHandler @ 00186131 */ std::operator+(local_68,(char *)local_88); /* try { // try from 00185e4a to 00185e62 has its CatchHandler @ 0018611f */ std::__cxx11::string::string<std::allocator<char>>(local_48,"",&local_109); iVar2 = param_3 + -1; if (param_3 == 0) { iVar2 = 0; } /* try { // try from 00185e7b to 00185e96 has its CatchHandler @ 0018610d */ build_repetition(local_108,(int)local_68,iVar2, (string *)(ulong)(uVar1 - (uVar1 != 0x7fffffff))); /* try { // try from 00185e97 to 00185ea8 has its CatchHandler @ 001860fe */ std::operator+(param_1,local_e8); std::__cxx11::string::~string(local_108); std::__cxx11::string::~string(local_48); std::__cxx11::string::~string(local_68); std::__cxx11::string::~string(local_88); std::__cxx11::string::~string(local_a8); std::__cxx11::string::~string(local_c8); std::__cxx11::string::~string(local_e8); if (param_3 != 0) { return param_1; } /* try { // try from 00185f01 to 00185f14 has its CatchHandler @ 001860f6 */ std::operator+((char *)local_108,(string *)&DAT_0019ca24); /* try { // try from 00185f15 to 00185f2a has its CatchHandler @ 001860e7 */ std::operator+(local_e8,(char *)local_108); std::__cxx11::string::operator=(param_1,local_e8); std::__cxx11::string::~string(local_e8); this = local_108; } std::__cxx11::string::~string(this); } return param_1; }
51,408
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan()
zkingston[P]unknot/build_O0/_deps/json-src/include/nlohmann/detail/input/lexer.hpp
token_type scan() { // initially, skip the BOM if (position.chars_read_total == 0 && !skip_bom()) { error_message = "invalid BOM; must be 0xEF 0xBB 0xBF if given"; return token_type::parse_error; } // read next character and ignore whitespace skip_whitespace(); // ignore comments while (ignore_comments && current == '/') { if (!scan_comment()) { return token_type::parse_error; } // skip following whitespace skip_whitespace(); } switch (current) { // structural characters case '[': return token_type::begin_array; case ']': return token_type::end_array; case '{': return token_type::begin_object; case '}': return token_type::end_object; case ':': return token_type::name_separator; case ',': return token_type::value_separator; // literals case 't': { std::array<char_type, 4> true_literal = {{static_cast<char_type>('t'), static_cast<char_type>('r'), static_cast<char_type>('u'), static_cast<char_type>('e')}}; return scan_literal(true_literal.data(), true_literal.size(), token_type::literal_true); } case 'f': { std::array<char_type, 5> false_literal = {{static_cast<char_type>('f'), static_cast<char_type>('a'), static_cast<char_type>('l'), static_cast<char_type>('s'), static_cast<char_type>('e')}}; return scan_literal(false_literal.data(), false_literal.size(), token_type::literal_false); } case 'n': { std::array<char_type, 4> null_literal = {{static_cast<char_type>('n'), static_cast<char_type>('u'), static_cast<char_type>('l'), static_cast<char_type>('l')}}; return scan_literal(null_literal.data(), null_literal.size(), token_type::literal_null); } // string case '\"': return scan_string(); // number case '-': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': return scan_number(); // end of input (the null byte is needed when parsing from // string literals) case '\0': case char_traits<char_type>::eof(): return token_type::end_of_input; // error default: error_message = "invalid literal"; return token_type::parse_error; } }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan(): subq $0x58, %rsp movq %rdi, 0x48(%rsp) movq 0x48(%rsp), %rax movq %rax, 0x30(%rsp) cmpq $0x0, 0x20(%rax) jne 0x76dc5 movq 0x30(%rsp), %rdi callq 0x76fc0 testb $0x1, %al jne 0x76dc5 movq 0x30(%rsp), %rax leaq 0x556c98(%rip), %rcx # 0x5cda4c movq %rcx, 0x70(%rax) movl $0xe, 0x54(%rsp) jmp 0x76fb0 movq 0x30(%rsp), %rdi callq 0x77040 movq 0x30(%rsp), %rcx xorl %eax, %eax testb $0x1, 0x10(%rcx) movb %al, 0x2f(%rsp) je 0x76df0 movq 0x30(%rsp), %rax cmpl $0x2f, 0x14(%rax) sete %al movb %al, 0x2f(%rsp) movb 0x2f(%rsp), %al testb $0x1, %al jne 0x76dfa jmp 0x76e21 movq 0x30(%rsp), %rdi callq 0x770b0 testb $0x1, %al jne 0x76e15 movl $0xe, 0x54(%rsp) jmp 0x76fb0 movq 0x30(%rsp), %rdi callq 0x77040 jmp 0x76dcf movq 0x30(%rsp), %rax movl 0x14(%rax), %eax incl %eax movl %eax, %ecx movq %rcx, 0x20(%rsp) subl $0x7e, %eax ja 0x76f98 movq 0x20(%rsp), %rax leaq 0x555549(%rip), %rcx # 0x5cc390 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl $0x8, 0x54(%rsp) jmp 0x76fb0 movl $0xa, 0x54(%rsp) jmp 0x76fb0 movl $0x9, 0x54(%rsp) jmp 0x76fb0 movl $0xb, 0x54(%rsp) jmp 0x76fb0 movl $0xc, 0x54(%rsp) jmp 0x76fb0 movl $0xd, 0x54(%rsp) jmp 0x76fb0 movl 0x5551a0(%rip), %eax # 0x5cc044 movl %eax, 0x44(%rsp) leaq 0x44(%rsp), %rdi callq 0x77260 movq %rax, 0x18(%rsp) leaq 0x44(%rsp), %rdi callq 0x77270 movq 0x30(%rsp), %rdi movq 0x18(%rsp), %rsi movq %rax, %rdx movl $0x1, %ecx callq 0x771b0 movl %eax, 0x54(%rsp) jmp 0x76fb0 movl 0x55944d(%rip), %eax # 0x5d0334 movl %eax, 0x3f(%rsp) movb 0x559447(%rip), %al # 0x5d0338 movb %al, 0x43(%rsp) leaq 0x3f(%rsp), %rdi callq 0x77280 movq %rax, 0x10(%rsp) leaq 0x3f(%rsp), %rdi callq 0x77290 movq 0x30(%rsp), %rdi movq 0x10(%rsp), %rsi movq %rax, %rdx movl $0x2, %ecx callq 0x771b0 movl %eax, 0x54(%rsp) jmp 0x76fb0 movl 0x555114(%rip), %eax # 0x5cc048 movl %eax, 0x3b(%rsp) leaq 0x3b(%rsp), %rdi callq 0x77260 movq %rax, 0x8(%rsp) leaq 0x3b(%rsp), %rdi callq 0x77270 movq 0x30(%rsp), %rdi movq 0x8(%rsp), %rsi movq %rax, %rdx movl $0x3, %ecx callq 0x771b0 movl %eax, 0x54(%rsp) jmp 0x76fb0 movq 0x30(%rsp), %rdi callq 0x772a0 movl %eax, 0x54(%rsp) jmp 0x76fb0 movq 0x30(%rsp), %rdi callq 0x77ed0 movl %eax, 0x54(%rsp) jmp 0x76fb0 movl $0xf, 0x54(%rsp) jmp 0x76fb0 movq 0x30(%rsp), %rax leaq 0x556ad5(%rip), %rcx # 0x5cda79 movq %rcx, 0x70(%rax) movl $0xe, 0x54(%rsp) movl 0x54(%rsp), %eax addq $0x58, %rsp retq nopl (%rax)
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE4scanEv: sub rsp, 58h mov [rsp+58h+var_10], rdi mov rax, [rsp+58h+var_10] mov [rsp+58h+var_28], rax cmp qword ptr [rax+20h], 0 jnz short loc_76DC5 mov rdi, [rsp+58h+var_28] call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE8skip_bomEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::skip_bom(void) test al, 1 jnz short loc_76DC5 mov rax, [rsp+58h+var_28] lea rcx, aInvalidBomMust; "invalid BOM; must be 0xEF 0xBB 0xBF if "... mov [rax+70h], rcx mov [rsp+58h+var_4], 0Eh jmp loc_76FB0 loc_76DC5: mov rdi, [rsp+58h+var_28] call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE15skip_whitespaceEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::skip_whitespace(void) loc_76DCF: mov rcx, [rsp+58h+var_28] xor eax, eax test byte ptr [rcx+10h], 1 mov [rsp+58h+var_29], al jz short loc_76DF0 mov rax, [rsp+58h+var_28] cmp dword ptr [rax+14h], 2Fh ; '/' setz al mov [rsp+58h+var_29], al loc_76DF0: mov al, [rsp+58h+var_29] test al, 1 jnz short loc_76DFA jmp short loc_76E21 loc_76DFA: mov rdi, [rsp+58h+var_28] call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE12scan_commentEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan_comment(void) test al, 1 jnz short loc_76E15 mov [rsp+58h+var_4], 0Eh jmp loc_76FB0 loc_76E15: mov rdi, [rsp+58h+var_28] call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE15skip_whitespaceEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::skip_whitespace(void) jmp short loc_76DCF loc_76E21: mov rax, [rsp+58h+var_28] mov eax, [rax+14h] inc eax; switch 127 cases mov ecx, eax mov [rsp+58h+var_38], rcx sub eax, 7Eh ja def_76E4E; jumptable 0000000000076E4E default case, cases 1-33,35-43,46,47,59-90,92,94-101,103-109,111-115,117-122,124 mov rax, [rsp+58h+var_38] lea rcx, jpt_76E4E movsxd rax, ds:(jpt_76E4E - 5CC390h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_76E50: mov [rsp+58h+var_4], 8; jumptable 0000000000076E4E case 91 jmp loc_76FB0 loc_76E5D: mov [rsp+58h+var_4], 0Ah; jumptable 0000000000076E4E case 93 jmp loc_76FB0 loc_76E6A: mov [rsp+58h+var_4], 9; jumptable 0000000000076E4E case 123 jmp loc_76FB0 loc_76E77: mov [rsp+58h+var_4], 0Bh; jumptable 0000000000076E4E case 125 jmp loc_76FB0 loc_76E84: mov [rsp+58h+var_4], 0Ch; jumptable 0000000000076E4E case 58 jmp loc_76FB0 loc_76E91: mov [rsp+58h+var_4], 0Dh; jumptable 0000000000076E4E case 44 jmp loc_76FB0 loc_76E9E: mov eax, cs:dword_5CC044; jumptable 0000000000076E4E case 116 mov [rsp+58h+var_14], eax lea rdi, [rsp+58h+var_14] call _ZNSt5arrayIcLm4EE4dataEv; std::array<char,4ul>::data(void) mov [rsp+58h+var_40], rax lea rdi, [rsp+58h+var_14] call _ZNKSt5arrayIcLm4EE4sizeEv; std::array<char,4ul>::size(void) mov rdi, [rsp+58h+var_28] mov rsi, [rsp+58h+var_40] mov rdx, rax mov ecx, 1 call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE12scan_literalEPKcmNS1_10lexer_baseISF_E10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan_literal(char const*,ulong,nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type) mov [rsp+58h+var_4], eax jmp loc_76FB0 loc_76EE1: mov eax, cs:dword_5D0334; jumptable 0000000000076E4E case 102 mov [rsp+58h+var_19], eax mov al, cs:byte_5D0338 mov [rsp+58h+var_15], al lea rdi, [rsp+58h+var_19] call _ZNSt5arrayIcLm5EE4dataEv; std::array<char,5ul>::data(void) mov [rsp+58h+var_48], rax lea rdi, [rsp+58h+var_19] call _ZNKSt5arrayIcLm5EE4sizeEv; std::array<char,5ul>::size(void) mov rdi, [rsp+58h+var_28] mov rsi, [rsp+58h+var_48] mov rdx, rax mov ecx, 2 call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE12scan_literalEPKcmNS1_10lexer_baseISF_E10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan_literal(char const*,ulong,nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type) mov [rsp+58h+var_4], eax jmp loc_76FB0 loc_76F2E: mov eax, cs:dword_5CC048; jumptable 0000000000076E4E case 110 mov [rsp+58h+var_1D], eax lea rdi, [rsp+58h+var_1D] call _ZNSt5arrayIcLm4EE4dataEv; std::array<char,4ul>::data(void) mov [rsp+58h+var_50], rax lea rdi, [rsp+58h+var_1D] call _ZNKSt5arrayIcLm4EE4sizeEv; std::array<char,4ul>::size(void) mov rdi, [rsp+58h+var_28] mov rsi, [rsp+58h+var_50] mov rdx, rax mov ecx, 3 call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE12scan_literalEPKcmNS1_10lexer_baseISF_E10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan_literal(char const*,ulong,nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type) mov [rsp+58h+var_4], eax jmp short loc_76FB0 loc_76F6E: mov rdi, [rsp+58h+var_28]; jumptable 0000000000076E4E case 34 call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE11scan_stringEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan_string(void) mov [rsp+58h+var_4], eax jmp short loc_76FB0 loc_76F7E: mov rdi, [rsp+58h+var_28]; jumptable 0000000000076E4E cases 45,48-57 call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE11scan_numberEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan_number(void) mov [rsp+58h+var_4], eax jmp short loc_76FB0 loc_76F8E: mov [rsp+58h+var_4], 0Fh; jumptable 0000000000076E4E cases -1,0 jmp short loc_76FB0 def_76E4E: mov rax, [rsp+58h+var_28]; jumptable 0000000000076E4E default case, cases 1-33,35-43,46,47,59-90,92,94-101,103-109,111-115,117-122,124 lea rcx, aInvalidLiteral; "invalid literal" mov [rax+70h], rcx mov [rsp+58h+var_4], 0Eh loc_76FB0: mov eax, [rsp+58h+var_4] add rsp, 58h retn
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan( long long a1) { long long v1; // rax long long v2; // rax long long v3; // rax long long v5; // [rsp+8h] [rbp-50h] long long v6; // [rsp+10h] [rbp-48h] long long v7; // [rsp+18h] [rbp-40h] bool v8; // [rsp+2Fh] [rbp-29h] int v9; // [rsp+3Bh] [rbp-1Dh] BYREF _BYTE v10[5]; // [rsp+3Fh] [rbp-19h] BYREF int v11; // [rsp+44h] [rbp-14h] BYREF long long v12; // [rsp+48h] [rbp-10h] unsigned int v13; // [rsp+54h] [rbp-4h] v12 = a1; if ( *(_QWORD *)(a1 + 32) || (nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::skip_bom(a1) & 1) != 0 ) { while ( 1 ) { nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::skip_whitespace(a1); v8 = 0; if ( (*(_BYTE *)(a1 + 16) & 1) != 0 ) v8 = *(_DWORD *)(a1 + 20) == 47; if ( !v8 ) break; if ( (nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan_comment(a1) & 1) == 0 ) return 14; } switch ( *(_DWORD *)(a1 + 20) ) { case 0xFFFFFFFF: case 0: v13 = 15; break; case 0x22: v13 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan_string(a1); break; case 0x2C: v13 = 13; break; case 0x2D: case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: v13 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan_number(a1); break; case 0x3A: v13 = 12; break; case 0x5B: v13 = 8; break; case 0x5D: v13 = 10; break; case 0x66: qmemcpy(v10, "false", sizeof(v10)); v6 = std::array<char,5ul>::data(v10); v2 = std::array<char,5ul>::size(v10); v13 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan_literal( a1, v6, v2, 2LL); break; case 0x6E: v9 = 1819047278; v5 = std::array<char,4ul>::data(&v9); v3 = std::array<char,4ul>::size(&v9); v13 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan_literal( a1, v5, v3, 3LL); break; case 0x74: v11 = 1702195828; v7 = std::array<char,4ul>::data(&v11); v1 = std::array<char,4ul>::size(&v11); v13 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan_literal( a1, v7, v1, 1LL); break; case 0x7B: v13 = 9; break; case 0x7D: v13 = 11; break; default: *(_QWORD *)(a1 + 112) = "invalid literal"; v13 = 14; break; } } else { *(_QWORD *)(a1 + 112) = "invalid BOM; must be 0xEF 0xBB 0xBF if given"; return 14; } return v13; }
scan: SUB RSP,0x58 MOV qword ptr [RSP + 0x48],RDI MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x30],RAX CMP qword ptr [RAX + 0x20],0x0 JNZ 0x00176dc5 MOV RDI,qword ptr [RSP + 0x30] CALL 0x00176fc0 TEST AL,0x1 JNZ 0x00176dc5 MOV RAX,qword ptr [RSP + 0x30] LEA RCX,[0x6cda4c] MOV qword ptr [RAX + 0x70],RCX MOV dword ptr [RSP + 0x54],0xe JMP 0x00176fb0 LAB_00176dc5: MOV RDI,qword ptr [RSP + 0x30] CALL 0x00177040 LAB_00176dcf: MOV RCX,qword ptr [RSP + 0x30] XOR EAX,EAX TEST byte ptr [RCX + 0x10],0x1 MOV byte ptr [RSP + 0x2f],AL JZ 0x00176df0 MOV RAX,qword ptr [RSP + 0x30] CMP dword ptr [RAX + 0x14],0x2f SETZ AL MOV byte ptr [RSP + 0x2f],AL LAB_00176df0: MOV AL,byte ptr [RSP + 0x2f] TEST AL,0x1 JNZ 0x00176dfa JMP 0x00176e21 LAB_00176dfa: MOV RDI,qword ptr [RSP + 0x30] CALL 0x001770b0 TEST AL,0x1 JNZ 0x00176e15 MOV dword ptr [RSP + 0x54],0xe JMP 0x00176fb0 LAB_00176e15: MOV RDI,qword ptr [RSP + 0x30] CALL 0x00177040 JMP 0x00176dcf LAB_00176e21: MOV RAX,qword ptr [RSP + 0x30] MOV EAX,dword ptr [RAX + 0x14] INC EAX MOV ECX,EAX MOV qword ptr [RSP + 0x20],RCX SUB EAX,0x7e JA 0x00176f98 MOV RAX,qword ptr [RSP + 0x20] LEA RCX,[0x6cc390] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_5b: MOV dword ptr [RSP + 0x54],0x8 JMP 0x00176fb0 caseD_5d: MOV dword ptr [RSP + 0x54],0xa JMP 0x00176fb0 caseD_7b: MOV dword ptr [RSP + 0x54],0x9 JMP 0x00176fb0 caseD_7d: MOV dword ptr [RSP + 0x54],0xb JMP 0x00176fb0 caseD_3a: MOV dword ptr [RSP + 0x54],0xc JMP 0x00176fb0 caseD_2c: MOV dword ptr [RSP + 0x54],0xd JMP 0x00176fb0 caseD_74: MOV EAX,dword ptr [0x006cc044] MOV dword ptr [RSP + 0x44],EAX LEA RDI,[RSP + 0x44] CALL 0x00177260 MOV qword ptr [RSP + 0x18],RAX LEA RDI,[RSP + 0x44] CALL 0x00177270 MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x18] MOV RDX,RAX MOV ECX,0x1 CALL 0x001771b0 MOV dword ptr [RSP + 0x54],EAX JMP 0x00176fb0 caseD_66: MOV EAX,dword ptr [0x006d0334] MOV dword ptr [RSP + 0x3f],EAX MOV AL,byte ptr [0x006d0338] MOV byte ptr [RSP + 0x43],AL LEA RDI,[RSP + 0x3f] CALL 0x00177280 MOV qword ptr [RSP + 0x10],RAX LEA RDI,[RSP + 0x3f] CALL 0x00177290 MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x10] MOV RDX,RAX MOV ECX,0x2 CALL 0x001771b0 MOV dword ptr [RSP + 0x54],EAX JMP 0x00176fb0 caseD_6e: MOV EAX,dword ptr [0x006cc048] MOV dword ptr [RSP + 0x3b],EAX LEA RDI,[RSP + 0x3b] CALL 0x00177260 MOV qword ptr [RSP + 0x8],RAX LEA RDI,[RSP + 0x3b] CALL 0x00177270 MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x8] MOV RDX,RAX MOV ECX,0x3 CALL 0x001771b0 MOV dword ptr [RSP + 0x54],EAX JMP 0x00176fb0 caseD_22: MOV RDI,qword ptr [RSP + 0x30] CALL 0x001772a0 MOV dword ptr [RSP + 0x54],EAX JMP 0x00176fb0 caseD_2d: MOV RDI,qword ptr [RSP + 0x30] CALL 0x00177ed0 MOV dword ptr [RSP + 0x54],EAX JMP 0x00176fb0 caseD_ffffffff: MOV dword ptr [RSP + 0x54],0xf JMP 0x00176fb0 caseD_1: MOV RAX,qword ptr [RSP + 0x30] LEA RCX,[0x6cda79] MOV qword ptr [RAX + 0x70],RCX MOV dword ptr [RSP + 0x54],0xe LAB_00176fb0: MOV EAX,dword ptr [RSP + 0x54] ADD RSP,0x58 RET
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan() */ int4 __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> ::scan(lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> *this) { int4 uVar1; ulong uVar2; int8 uVar3; int8 uVar4; bool bVar5; array<char,4ul> local_1d [4]; array<char,5ul> local_19 [4]; char local_15; array<char,4ul> local_14 [4]; lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> *local_10; local_10 = this; if ((*(long *)(this + 0x20) == 0) && (uVar2 = skip_bom(this), (uVar2 & 1) == 0)) { *(char **)(this + 0x70) = "invalid BOM; must be 0xEF 0xBB 0xBF if given"; } else { skip_whitespace(this); while( true ) { bVar5 = false; if (((byte)this[0x10] & 1) != 0) { bVar5 = *(int *)(this + 0x14) == 0x2f; } if (!bVar5) { switch(*(int4 *)(this + 0x14)) { default: *(char **)(this + 0x70) = "invalid literal"; return 0xe; case 0x22: uVar1 = scan_string(this); return uVar1; case 0x2c: return 0xd; case 0x2d: case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: uVar1 = scan_number(this); return uVar1; case 0x3a: return 0xc; case 0x5b: return 8; case 0x5d: return 10; case 0x66: local_19[0] = (array<char,5ul>)s_false_006d0334[0]; local_19[1] = (array<char,5ul>)s_false_006d0334[1]; local_19[2] = (array<char,5ul>)s_false_006d0334[2]; local_19[3] = (array<char,5ul>)s_false_006d0334[3]; local_15 = s_false_006d0334[4]; uVar3 = std::array<char,5ul>::data(local_19); uVar4 = std::array<char,5ul>::size(); uVar1 = scan_literal(this,uVar3,uVar4,2); return uVar1; case 0x6e: local_1d[0] = (array<char,4ul>)s_truenull_006cc044[4]; local_1d[1] = (array<char,4ul>)s_truenull_006cc044[5]; local_1d[2] = (array<char,4ul>)s_truenull_006cc044[6]; local_1d[3] = (array<char,4ul>)s_truenull_006cc044[7]; uVar3 = std::array<char,4ul>::data(local_1d); uVar4 = std::array<char,4ul>::size(); uVar1 = scan_literal(this,uVar3,uVar4,3); return uVar1; case 0x74: local_14[0] = (array<char,4ul>)s_truenull_006cc044[0]; local_14[1] = (array<char,4ul>)s_truenull_006cc044[1]; local_14[2] = (array<char,4ul>)s_truenull_006cc044[2]; local_14[3] = (array<char,4ul>)s_truenull_006cc044[3]; uVar3 = std::array<char,4ul>::data(local_14); uVar4 = std::array<char,4ul>::size(); uVar1 = scan_literal(this,uVar3,uVar4,1); return uVar1; case 0x7b: return 9; case 0x7d: return 0xb; case 0xffffffff: case 0: return 0xf; } } uVar2 = scan_comment(this); if ((uVar2 & 1) == 0) break; skip_whitespace(this); } } return 0xe; }
51,409
OpenSubdiv::v3_6_0::Bfr::Surface<float>::evalMultiLinearDerivs(float const*, float const*, OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&, float**) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surface.cpp
void Surface<REAL>::evalMultiLinearDerivs(REAL const uv[], REAL const patchPoints[], PointDescriptor const & pointDesc, REAL * deriv[]) const { // // Linear evaluation of irregular N-sided faces evaluates one of N // locally subdivided quad faces and identifies that sub-face. // // Assign weights for requested derivatives and evaluate: // REAL wBuffer[6 * 4]; REAL * wDeriv[6]; int numDerivs = assignWeightsPerDeriv(deriv, 4, wBuffer, wDeriv); int subQuad = evalMultiLinearBasis(uv, wDeriv); // // Identify the patch points for the sub-face and interpolate: // int N = GetNumControlPoints(); int quadIndices[4]; quadIndices[0] = subQuad; quadIndices[1] = N + 1 + subQuad; quadIndices[2] = N; quadIndices[3] = N + 1 + (subQuad + N - 1) % N; // // Assemble parameters of the point combination operation and apply: // points::CommonCombinationParameters<REAL> combineParams; combineParams.pointData = patchPoints; combineParams.pointSize = pointDesc.size; combineParams.pointStride = pointDesc.stride; combineParams.srcCount = 4; combineParams.srcIndices = quadIndices; combineParams.resultCount = numDerivs; combineParams.resultArray = deriv; combineParams.weightArray = wDeriv; if (numDerivs == 1) { points::Combine1<REAL>::Apply(combineParams); } else if (numDerivs == 3) { points::Combine3<REAL>::Apply(combineParams); } else { points::CombineMultiple<REAL>::Apply(combineParams); } }
O0
cpp
OpenSubdiv::v3_6_0::Bfr::Surface<float>::evalMultiLinearDerivs(float const*, float const*, OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&, float**) const: pushq %rbp movq %rsp, %rbp subq $0x120, %rsp # imm = 0x120 movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x120(%rbp) movq -0x28(%rbp), %rdi leaq -0x90(%rbp), %rdx leaq -0xc0(%rbp), %rcx movl $0x4, %esi callq 0x1ab750 movq -0x120(%rbp), %rdi movl %eax, -0xc4(%rbp) movq -0x10(%rbp), %rsi leaq -0xc0(%rbp), %rdx callq 0xd6840 movq -0x120(%rbp), %rdi movl %eax, -0xc8(%rbp) callq 0xcec90 movl %eax, -0xcc(%rbp) movl -0xc8(%rbp), %eax movl %eax, -0xe0(%rbp) movl -0xcc(%rbp), %eax addl $0x1, %eax addl -0xc8(%rbp), %eax movl %eax, -0xdc(%rbp) movl -0xcc(%rbp), %eax movl %eax, -0xd8(%rbp) movl -0xcc(%rbp), %eax addl $0x1, %eax movl %eax, -0x114(%rbp) movl -0xc8(%rbp), %eax addl -0xcc(%rbp), %eax subl $0x1, %eax cltd idivl -0xcc(%rbp) movl -0x114(%rbp), %eax addl %edx, %eax movl %eax, -0xd4(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x110(%rbp) movq -0x20(%rbp), %rax movl (%rax), %eax movl %eax, -0x108(%rbp) movq -0x20(%rbp), %rax movl 0x4(%rax), %eax movl %eax, -0x104(%rbp) movl $0x4, -0xf8(%rbp) leaq -0xe0(%rbp), %rax movq %rax, -0x100(%rbp) movl -0xc4(%rbp), %eax movl %eax, -0xf4(%rbp) movq -0x28(%rbp), %rax movq %rax, -0xf0(%rbp) leaq -0xc0(%rbp), %rax movq %rax, -0xe8(%rbp) cmpl $0x1, -0xc4(%rbp) jne 0x1acc03 leaq -0x110(%rbp), %rdi callq 0xd2e00 jmp 0x1acc28 cmpl $0x3, -0xc4(%rbp) jne 0x1acc1a leaq -0x110(%rbp), %rdi callq 0xc68b0 jmp 0x1acc26 leaq -0x110(%rbp), %rdi callq 0xd3420 jmp 0x1acc28 addq $0x120, %rsp # imm = 0x120 popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax,%rax)
_ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIfE21evalMultiLinearDerivsEPKfS5_RKNS3_15PointDescriptorEPPf: push rbp mov rbp, rsp sub rsp, 120h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_8] mov [rbp+var_120], rax mov rdi, [rbp+var_28] lea rdx, [rbp+var_90] lea rcx, [rbp+var_C0] mov esi, 4 call _ZN10OpenSubdiv6v3_6_03Bfr12_GLOBAL__N_121assignWeightsPerDerivIfEEiPKPT_iS5_PS5_; OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::assignWeightsPerDeriv<float>(float * const*,int,float *,float **) mov rdi, [rbp+var_120] mov [rbp+var_C4], eax mov rsi, [rbp+var_10] lea rdx, [rbp+var_C0] call __ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIfE20evalMultiLinearBasisEPKfPPf; OpenSubdiv::v3_6_0::Bfr::Surface<float>::evalMultiLinearBasis(float const*,float **) mov rdi, [rbp+var_120] mov [rbp+var_C8], eax call __ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIfE19GetNumControlPointsEv; OpenSubdiv::v3_6_0::Bfr::Surface<float>::GetNumControlPoints(void) mov [rbp+var_CC], eax mov eax, [rbp+var_C8] mov [rbp+var_E0], eax mov eax, [rbp+var_CC] add eax, 1 add eax, [rbp+var_C8] mov [rbp+var_DC], eax mov eax, [rbp+var_CC] mov [rbp+var_D8], eax mov eax, [rbp+var_CC] add eax, 1 mov [rbp+var_114], eax mov eax, [rbp+var_C8] add eax, [rbp+var_CC] sub eax, 1 cdq idiv [rbp+var_CC] mov eax, [rbp+var_114] add eax, edx mov [rbp+var_D4], eax mov rax, [rbp+var_18] mov [rbp+var_110], rax mov rax, [rbp+var_20] mov eax, [rax] mov [rbp+var_108], eax mov rax, [rbp+var_20] mov eax, [rax+4] mov [rbp+var_104], eax mov [rbp+var_F8], 4 lea rax, [rbp+var_E0] mov [rbp+var_100], rax mov eax, [rbp+var_C4] mov [rbp+var_F4], eax mov rax, [rbp+var_28] mov [rbp+var_F0], rax lea rax, [rbp+var_C0] mov [rbp+var_E8], rax cmp [rbp+var_C4], 1 jnz short loc_1ACC03 lea rdi, [rbp+var_110] call __ZN10OpenSubdiv6v3_6_03Bfr6points8Combine1IfE5ApplyERKNS2_27CommonCombinationParametersIfEE; OpenSubdiv::v3_6_0::Bfr::points::Combine1<float>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CommonCombinationParameters<float> const&) jmp short loc_1ACC28 loc_1ACC03: cmp [rbp+var_C4], 3 jnz short loc_1ACC1A lea rdi, [rbp+var_110] call __ZN10OpenSubdiv6v3_6_03Bfr6points8Combine3IfE5ApplyERKNS2_27CommonCombinationParametersIfEE; OpenSubdiv::v3_6_0::Bfr::points::Combine3<float>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CommonCombinationParameters<float> const&) jmp short loc_1ACC26 loc_1ACC1A: lea rdi, [rbp+var_110] call __ZN10OpenSubdiv6v3_6_03Bfr6points15CombineMultipleIfE5ApplyERKNS2_27CommonCombinationParametersIfEE; OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<float>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CommonCombinationParameters<float> const&) loc_1ACC26: jmp short $+2 loc_1ACC28: add rsp, 120h pop rbp retn
long long OpenSubdiv::v3_6_0::Bfr::Surface<float>::evalMultiLinearDerivs( OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData *a1, long long a2, long long a3, int *a4, _QWORD *a5) { long long v6; // [rsp+10h] [rbp-110h] BYREF int v7; // [rsp+18h] [rbp-108h] int v8; // [rsp+1Ch] [rbp-104h] _DWORD *v9; // [rsp+20h] [rbp-100h] int v10; // [rsp+28h] [rbp-F8h] int v11; // [rsp+2Ch] [rbp-F4h] _QWORD *v12; // [rsp+30h] [rbp-F0h] _QWORD *v13; // [rsp+38h] [rbp-E8h] _DWORD v14[5]; // [rsp+40h] [rbp-E0h] BYREF int NumControlPoints; // [rsp+54h] [rbp-CCh] int v16; // [rsp+58h] [rbp-C8h] int v17; // [rsp+5Ch] [rbp-C4h] _QWORD v18[6]; // [rsp+60h] [rbp-C0h] BYREF char v19[104]; // [rsp+90h] [rbp-90h] BYREF _QWORD *v20; // [rsp+F8h] [rbp-28h] int *v21; // [rsp+100h] [rbp-20h] long long v22; // [rsp+108h] [rbp-18h] long long v23; // [rsp+110h] [rbp-10h] OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData *v24; // [rsp+118h] [rbp-8h] v24 = a1; v23 = a2; v22 = a3; v21 = a4; v20 = a5; v17 = OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::assignWeightsPerDeriv<float>(a5, 4, (long long)v19, v18); v16 = OpenSubdiv::v3_6_0::Bfr::Surface<float>::evalMultiLinearBasis(a1, v23, v18); NumControlPoints = OpenSubdiv::v3_6_0::Bfr::Surface<float>::GetNumControlPoints(a1); v14[0] = v16; v14[1] = v16 + NumControlPoints + 1; v14[2] = NumControlPoints; v14[3] = (NumControlPoints + v16 - 1) % NumControlPoints + NumControlPoints + 1; v6 = v22; v7 = *v21; v8 = v21[1]; v10 = 4; v9 = v14; v11 = v17; v12 = v20; v13 = v18; if ( v17 == 1 ) return OpenSubdiv::v3_6_0::Bfr::points::Combine1<float>::Apply(&v6); if ( v17 == 3 ) return OpenSubdiv::v3_6_0::Bfr::points::Combine3<float>::Apply(&v6); return OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<float>::Apply(&v6); }
51,410
OpenSubdiv::v3_6_0::Bfr::Surface<float>::evalMultiLinearDerivs(float const*, float const*, OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&, float**) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surface.cpp
void Surface<REAL>::evalMultiLinearDerivs(REAL const uv[], REAL const patchPoints[], PointDescriptor const & pointDesc, REAL * deriv[]) const { // // Linear evaluation of irregular N-sided faces evaluates one of N // locally subdivided quad faces and identifies that sub-face. // // Assign weights for requested derivatives and evaluate: // REAL wBuffer[6 * 4]; REAL * wDeriv[6]; int numDerivs = assignWeightsPerDeriv(deriv, 4, wBuffer, wDeriv); int subQuad = evalMultiLinearBasis(uv, wDeriv); // // Identify the patch points for the sub-face and interpolate: // int N = GetNumControlPoints(); int quadIndices[4]; quadIndices[0] = subQuad; quadIndices[1] = N + 1 + subQuad; quadIndices[2] = N; quadIndices[3] = N + 1 + (subQuad + N - 1) % N; // // Assemble parameters of the point combination operation and apply: // points::CommonCombinationParameters<REAL> combineParams; combineParams.pointData = patchPoints; combineParams.pointSize = pointDesc.size; combineParams.pointStride = pointDesc.stride; combineParams.srcCount = 4; combineParams.srcIndices = quadIndices; combineParams.resultCount = numDerivs; combineParams.resultArray = deriv; combineParams.weightArray = wDeriv; if (numDerivs == 1) { points::Combine1<REAL>::Apply(combineParams); } else if (numDerivs == 3) { points::Combine3<REAL>::Apply(combineParams); } else { points::CombineMultiple<REAL>::Apply(combineParams); } }
O3
cpp
OpenSubdiv::v3_6_0::Bfr::Surface<float>::evalMultiLinearDerivs(float const*, float const*, OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&, float**) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x138, %rsp # imm = 0x138 movq %r8, %rbx movq %rcx, %r14 movq %rdx, %r15 movq %rdi, %r12 xorps %xmm0, %xmm0 movups %xmm0, 0x18(%rsp) movups %xmm0, 0x8(%rsp) movq $0x0, 0x28(%rsp) leaq 0x70(%rsp), %rax movq %rax, (%rsp) movl $0x1, %ebp cmpq $0x0, 0x8(%r8) je 0x9ab27 cmpq $0x0, 0x10(%rbx) je 0x9ab27 leaq 0x90(%rsp), %rax movq %rax, 0x8(%rsp) leaq 0xb0(%rsp), %rax movq %rax, 0x10(%rsp) movl $0x3, %ebp cmpq $0x0, 0x18(%rbx) je 0x9ab27 cmpq $0x0, 0x20(%rbx) je 0x9ab27 cmpq $0x0, 0x28(%rbx) je 0x9ab27 leaq 0xd0(%rsp), %rax movq %rax, 0x18(%rsp) leaq 0xf0(%rsp), %rax movq %rax, 0x20(%rsp) leaq 0x110(%rsp), %rax movq %rax, 0x28(%rsp) movl $0x6, %ebp movq %rsp, %r13 movq %r12, %rdi movq %r13, %rdx callq 0x3a450 movl 0x8(%r12), %ecx leaq 0x60(%rsp), %rsi movl %eax, (%rsi) leal 0x1(%rcx,%rax), %edx movl %edx, 0x4(%rsi) movl %ecx, 0x8(%rsi) addl %ecx, %eax decl %eax cltd idivl %ecx leal (%rdx,%rcx), %eax incl %eax movl %eax, 0xc(%rsi) movq %r15, 0x30(%rsp) movq (%r14), %rax movq %rax, 0x38(%rsp) movl $0x4, 0x48(%rsp) movq %rsi, 0x40(%rsp) movl %ebp, 0x4c(%rsp) movq %rbx, 0x50(%rsp) movq %r13, 0x58(%rsp) leaq 0x30(%rsp), %rdi cmpl $0x3, %ebp je 0x9ab98 cmpl $0x1, %ebp jne 0x9ab9f callq 0x39940 jmp 0x9aba4 callq 0x3a020 jmp 0x9aba4 callq 0x3a1b0 addq $0x138, %rsp # imm = 0x138 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE21evalMultiLinearDerivsEPKdS5_RKNS3_15PointDescriptorEPPd: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 138h mov rbx, r8 mov r14, rcx mov r15, rdx mov r12, rdi xorps xmm0, xmm0 movups [rsp+168h+var_150], xmm0 movups [rsp+168h+var_160], xmm0 mov [rsp+168h+var_140], 0 lea rax, [rsp+168h+var_F8] mov [rsp+168h+var_168], rax mov ebp, 1 cmp qword ptr [r8+8], 0 jz short loc_9AB27 cmp qword ptr [rbx+10h], 0 jz short loc_9AB27 lea rax, [rsp+168h+var_D8] mov qword ptr [rsp+168h+var_160], rax lea rax, [rsp+168h+var_B8] mov qword ptr [rsp+168h+var_160+8], rax mov ebp, 3 cmp qword ptr [rbx+18h], 0 jz short loc_9AB27 cmp qword ptr [rbx+20h], 0 jz short loc_9AB27 cmp qword ptr [rbx+28h], 0 jz short loc_9AB27 lea rax, [rsp+168h+var_98] mov qword ptr [rsp+168h+var_150], rax lea rax, [rsp+168h+var_78] mov qword ptr [rsp+168h+var_150+8], rax lea rax, [rsp+168h+var_58] mov [rsp+168h+var_140], rax mov ebp, 6 loc_9AB27: mov r13, rsp mov rdi, r12 mov rdx, r13 call __ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE20evalMultiLinearBasisEPKdPPd; OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalMultiLinearBasis(double const*,double **) mov ecx, [r12+8] lea rsi, [rsp+168h+var_108] mov [rsi], eax lea edx, [rcx+rax+1] mov [rsi+4], edx mov [rsi+8], ecx add eax, ecx dec eax cdq idiv ecx lea eax, [rdx+rcx] inc eax mov [rsi+0Ch], eax mov [rsp+168h+var_138], r15 mov rax, [r14] mov [rsp+168h+var_130], rax mov [rsp+168h+var_120], 4 mov [rsp+168h+var_128], rsi mov [rsp+168h+var_11C], ebp mov [rsp+168h+var_118], rbx mov [rsp+168h+var_110], r13 lea rdi, [rsp+168h+var_138] cmp ebp, 3 jz short loc_9AB98 cmp ebp, 1 jnz short loc_9AB9F call __ZN10OpenSubdiv6v3_6_03Bfr6points8Combine1IdE5ApplyERKNS2_27CommonCombinationParametersIdEE; OpenSubdiv::v3_6_0::Bfr::points::Combine1<double>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CommonCombinationParameters<double> const&) jmp short loc_9ABA4 loc_9AB98: call __ZN10OpenSubdiv6v3_6_03Bfr6points8Combine3IdE5ApplyERKNS2_27CommonCombinationParametersIdEE; OpenSubdiv::v3_6_0::Bfr::points::Combine3<double>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CommonCombinationParameters<double> const&) jmp short loc_9ABA4 loc_9AB9F: call __ZN10OpenSubdiv6v3_6_03Bfr6points15CombineMultipleIdE5ApplyERKNS2_27CommonCombinationParametersIdEE; OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<double>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CommonCombinationParameters<double> const&) loc_9ABA4: add rsp, 138h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalMultiLinearDerivs( long long a1, long long a2, long long a3, long long *a4, _QWORD *a5) { int v8; // ebp int v9; // eax long long v10; // r8 long long v11; // r9 long long v12; // rcx long long v13; // rdx char *v15; // [rsp+0h] [rbp-168h] BYREF __int128 v16; // [rsp+8h] [rbp-160h] __int128 v17; // [rsp+18h] [rbp-150h] char *v18; // [rsp+28h] [rbp-140h] long long v19; // [rsp+30h] [rbp-138h] BYREF long long v20; // [rsp+38h] [rbp-130h] _DWORD *v21; // [rsp+40h] [rbp-128h] long long v22; // [rsp+48h] [rbp-120h] _QWORD *v23; // [rsp+50h] [rbp-118h] char **v24; // [rsp+58h] [rbp-110h] _DWORD v25[4]; // [rsp+60h] [rbp-108h] BYREF char v26; // [rsp+70h] [rbp-F8h] BYREF char v27; // [rsp+90h] [rbp-D8h] BYREF char v28; // [rsp+B0h] [rbp-B8h] BYREF char v29; // [rsp+D0h] [rbp-98h] BYREF char v30; // [rsp+F0h] [rbp-78h] BYREF char v31; // [rsp+110h] [rbp-58h] BYREF v17 = 0LL; v16 = 0LL; v18 = 0LL; v15 = &v26; v8 = 1; if ( a5[1] ) { if ( a5[2] ) { *(_QWORD *)&v16 = &v27; *((_QWORD *)&v16 + 1) = &v28; v8 = 3; if ( a5[3] ) { if ( a5[4] && a5[5] ) { *(_QWORD *)&v17 = &v29; *((_QWORD *)&v17 + 1) = &v30; v18 = &v31; v8 = 6; } } } } v9 = OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalMultiLinearBasis(a1, a2, &v15); v12 = *(unsigned int *)(a1 + 8); v25[0] = v9; v25[1] = v12 + v9 + 1; v25[2] = v12; v13 = (unsigned int)(((int)v12 + v9 - 1) >> 31); LODWORD(v13) = ((int)v12 + v9 - 1) % (int)v12; v25[3] = v13 + v12 + 1; v19 = a3; v20 = *a4; LODWORD(v22) = 4; v21 = v25; HIDWORD(v22) = v8; v23 = a5; v24 = &v15; if ( v8 == 3 ) return OpenSubdiv::v3_6_0::Bfr::points::Combine3<double>::Apply( &v19, v25, v13, v12, v10, v11, v15, v16, *((_QWORD *)&v16 + 1), v17, *((_QWORD *)&v17 + 1), v18, v19, v20, v21, v22, v23, v24); if ( v8 == 1 ) return OpenSubdiv::v3_6_0::Bfr::points::Combine1<double>::Apply(&v19); return OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<double>::Apply( &v19, v25, v13, v12, v10, v11, v15, v16, *((_QWORD *)&v16 + 1), v17, *((_QWORD *)&v17 + 1), v18, v19, v20, v21, v22, v23, v24); }
evalMultiLinearDerivs: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x138 MOV RBX,R8 MOV R14,RCX MOV R15,RDX MOV R12,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x18],XMM0 MOVUPS xmmword ptr [RSP + 0x8],XMM0 MOV qword ptr [RSP + 0x28],0x0 LEA RAX,[RSP + 0x70] MOV qword ptr [RSP],RAX MOV EBP,0x1 CMP qword ptr [R8 + 0x8],0x0 JZ 0x0019ab27 CMP qword ptr [RBX + 0x10],0x0 JZ 0x0019ab27 LEA RAX,[RSP + 0x90] MOV qword ptr [RSP + 0x8],RAX LEA RAX,[RSP + 0xb0] MOV qword ptr [RSP + 0x10],RAX MOV EBP,0x3 CMP qword ptr [RBX + 0x18],0x0 JZ 0x0019ab27 CMP qword ptr [RBX + 0x20],0x0 JZ 0x0019ab27 CMP qword ptr [RBX + 0x28],0x0 JZ 0x0019ab27 LEA RAX,[RSP + 0xd0] MOV qword ptr [RSP + 0x18],RAX LEA RAX,[RSP + 0xf0] MOV qword ptr [RSP + 0x20],RAX LEA RAX,[RSP + 0x110] MOV qword ptr [RSP + 0x28],RAX MOV EBP,0x6 LAB_0019ab27: MOV R13,RSP MOV RDI,R12 MOV RDX,R13 CALL 0x0013a450 MOV ECX,dword ptr [R12 + 0x8] LEA RSI,[RSP + 0x60] MOV dword ptr [RSI],EAX LEA EDX,[RCX + RAX*0x1 + 0x1] MOV dword ptr [RSI + 0x4],EDX MOV dword ptr [RSI + 0x8],ECX ADD EAX,ECX DEC EAX CDQ IDIV ECX LEA EAX,[RDX + RCX*0x1] INC EAX MOV dword ptr [RSI + 0xc],EAX MOV qword ptr [RSP + 0x30],R15 MOV RAX,qword ptr [R14] MOV qword ptr [RSP + 0x38],RAX MOV dword ptr [RSP + 0x48],0x4 MOV qword ptr [RSP + 0x40],RSI MOV dword ptr [RSP + 0x4c],EBP MOV qword ptr [RSP + 0x50],RBX MOV qword ptr [RSP + 0x58],R13 LEA RDI,[RSP + 0x30] CMP EBP,0x3 JZ 0x0019ab98 CMP EBP,0x1 JNZ 0x0019ab9f CALL 0x00139940 JMP 0x0019aba4 LAB_0019ab98: CALL 0x0013a020 JMP 0x0019aba4 LAB_0019ab9f: CALL 0x0013a1b0 LAB_0019aba4: ADD RSP,0x138 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalMultiLinearDerivs(double const*, double const*, OpenSubdiv::v3_6_0::Bfr::Surface<double>::PointDescriptor const&, double**) const */ void __thiscall OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalMultiLinearDerivs (Surface<double> *this,double *param_1,double *param_2,PointDescriptor *param_3, double **param_4) { int iVar1; double *local_168; int1 *local_160; int1 *puStack_158; int1 *local_150; int1 *puStack_148; int1 *local_140; double *local_138; int8 local_130; int *local_128; int4 local_120; int local_11c; double **local_118; int1 *local_110; int local_108; int local_104; int local_100; int local_fc; double local_f8 [4]; int1 local_d8 [32]; int1 local_b8 [32]; int1 local_98 [32]; int1 local_78 [32]; int1 local_58 [40]; local_150 = (int1 *)0x0; puStack_148 = (int1 *)0x0; local_160 = (int1 *)0x0; puStack_158 = (int1 *)0x0; local_140 = (int1 *)0x0; local_168 = local_f8; iVar1 = 1; if ((param_4[1] != (double *)0x0) && (param_4[2] != (double *)0x0)) { local_160 = local_d8; puStack_158 = local_b8; iVar1 = 3; if ((param_4[3] != (double *)0x0) && ((param_4[4] != (double *)0x0 && (param_4[5] != (double *)0x0)))) { local_150 = local_98; puStack_148 = local_78; local_140 = local_58; iVar1 = 6; } } local_108 = evalMultiLinearBasis(this,param_1,&local_168); local_100 = *(int *)(this + 8); local_128 = &local_108; local_104 = local_100 + 1 + local_108; local_fc = (local_108 + local_100 + -1) % local_100 + local_100 + 1; local_130 = *(int8 *)param_3; local_120 = 4; local_138 = param_2; local_11c = iVar1; local_118 = param_4; if (iVar1 == 3) { local_110 = (int1 *)&local_168; points::Combine3<double>::Apply((CommonCombinationParameters *)&local_138); } else if (iVar1 == 1) { local_110 = (int1 *)&local_168; points::Combine1<double>::Apply((CommonCombinationParameters *)&local_138); } else { local_110 = (int1 *)&local_168; points::CombineMultiple<double>::Apply((CommonCombinationParameters *)&local_138); } return; }
51,411
ma_unlock_key_del
eloqsql/storage/maria/ma_key_recover.c
void _ma_unlock_key_del(MARIA_HA *info) { DBUG_ASSERT(info->key_del_used); if (info->key_del_used == 1) /* Ignore insert-with-append */ { MARIA_SHARE *share= info->s; mysql_mutex_lock(&share->key_del_lock); share->key_del_used= 0; share->state.key_del= share->key_del_current; mysql_mutex_unlock(&share->key_del_lock); mysql_cond_signal(&share->key_del_cond); } info->key_del_used= 0; }
O0
c
ma_unlock_key_del: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) jmp 0x729be movq -0x8(%rbp), %rax movzbl 0x67e(%rax), %eax cmpl $0x1, %eax jne 0x72a36 movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rdi addq $0x938, %rdi # imm = 0x938 leaq 0xdffd7(%rip), %rsi # 0x1529c2 movl $0x59a, %edx # imm = 0x59A callq 0x70300 movq -0x10(%rbp), %rax movb $0x0, 0x7e9(%rax) movq -0x10(%rbp), %rax movq 0x700(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x120(%rax) movq -0x10(%rbp), %rdi addq $0x938, %rdi # imm = 0x938 callq 0x70370 movq -0x10(%rbp), %rdi addq $0x980, %rdi # imm = 0x980 callq 0x72a50 movq -0x8(%rbp), %rax movb $0x0, 0x67e(%rax) addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
_ma_unlock_key_del: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi jmp short $+2 loc_729BE: mov rax, [rbp+var_8] movzx eax, byte ptr [rax+67Eh] cmp eax, 1 jnz short loc_72A36 mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_10], rax mov rdi, [rbp+var_10] add rdi, 938h lea rsi, aWorkspaceLlm4b_16; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 59Ah call inline_mysql_mutex_lock_13 mov rax, [rbp+var_10] mov byte ptr [rax+7E9h], 0 mov rax, [rbp+var_10] mov rcx, [rax+700h] mov rax, [rbp+var_10] mov [rax+120h], rcx mov rdi, [rbp+var_10] add rdi, 938h call inline_mysql_mutex_unlock_13 mov rdi, [rbp+var_10] add rdi, 980h call inline_mysql_cond_signal_0 loc_72A36: mov rax, [rbp+var_8] mov byte ptr [rax+67Eh], 0 add rsp, 10h pop rbp retn
long long * ma_unlock_key_del(long long *a1) { long long *result; // rax long long v2; // [rsp+0h] [rbp-10h] if ( *((_BYTE *)a1 + 1662) == 1 ) { v2 = *a1; inline_mysql_mutex_lock_13( *a1 + 2360, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_key_recover.c", 0x59Au); *(_BYTE *)(v2 + 2025) = 0; *(_QWORD *)(v2 + 288) = *(_QWORD *)(v2 + 1792); inline_mysql_mutex_unlock_13(v2 + 2360); inline_mysql_cond_signal_0(v2 + 2432); } result = a1; *((_BYTE *)a1 + 1662) = 0; return result; }
_ma_unlock_key_del: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI JMP 0x001729be LAB_001729be: MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x67e] CMP EAX,0x1 JNZ 0x00172a36 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x10],RAX MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x938 LEA RSI,[0x2529c2] MOV EDX,0x59a CALL 0x00170300 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x7e9],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x700] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x120],RCX MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x938 CALL 0x00170370 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x980 CALL 0x00172a50 LAB_00172a36: MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x67e],0x0 ADD RSP,0x10 POP RBP RET
void _ma_unlock_key_del(long *param_1) { long lVar1; if (*(char *)((long)param_1 + 0x67e) == '\x01') { lVar1 = *param_1; inline_mysql_mutex_lock (lVar1 + 0x938, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_key_recover.c",0x59a); *(int1 *)(lVar1 + 0x7e9) = 0; *(int8 *)(lVar1 + 0x120) = *(int8 *)(lVar1 + 0x700); inline_mysql_mutex_unlock(lVar1 + 0x938); inline_mysql_cond_signal(lVar1 + 0x980); } *(int1 *)((long)param_1 + 0x67e) = 0; return; }
51,412
create_fromuni
eloqsql/strings/ctype-simple.c
static my_bool create_fromuni(struct charset_info_st *cs, MY_CHARSET_LOADER *loader) { uni_idx idx[PLANE_NUM]; int i,n; /* Check that Unicode map is loaded. It can be not loaded when the collation is listed in Index.xml but not specified in the character set specific XML file. */ if (!cs->tab_to_uni) return TRUE; /* Clear plane statistics */ bzero(idx,sizeof(idx)); /* Count number of characters in each plane */ for (i=0; i< 0x100; i++) { uint16 wc=cs->tab_to_uni[i]; int pl= PLANE_NUMBER(wc); if (wc || !i) { if (!idx[pl].nchars) { idx[pl].uidx.from=wc; idx[pl].uidx.to=wc; }else { idx[pl].uidx.from=wc<idx[pl].uidx.from?wc:idx[pl].uidx.from; idx[pl].uidx.to=wc>idx[pl].uidx.to?wc:idx[pl].uidx.to; } idx[pl].nchars++; } } /* Sort planes in descending order */ qsort(&idx,PLANE_NUM,sizeof(uni_idx),&pcmp); for (i=0; i < PLANE_NUM; i++) { int ch,numchars; uchar *tab; /* Skip empty plane */ if (!idx[i].nchars) break; numchars=idx[i].uidx.to-idx[i].uidx.from+1; if (!(idx[i].uidx.tab= tab= (uchar*) (loader->once_alloc) (numchars * sizeof(*idx[i].uidx.tab)))) return TRUE; bzero(tab,numchars*sizeof(*tab)); for (ch=1; ch < PLANE_SIZE; ch++) { uint16 wc=cs->tab_to_uni[ch]; if (wc >= idx[i].uidx.from && wc <= idx[i].uidx.to && wc) { int ofs= wc - idx[i].uidx.from; if (!tab[ofs] || tab[ofs] > 0x7F) /* Prefer ASCII*/ { /* Some character sets can have double encoding. For example, in ARMSCII8, the following characters are encoded twice: Encoding#1 Encoding#2 Unicode Character Name ---------- ---------- ------- -------------- 0x27 0xFF U+0027 APOSTROPHE 0x28 0xA5 U+0028 LEFT PARENTHESIS 0x29 0xA4 U+0029 RIGHT PARENTHESIS 0x2C 0xAB U+002C COMMA 0x2D 0xAC U+002D HYPHEN-MINUS 0x2E 0xA9 U+002E FULL STOP That is, both 0x27 and 0xFF convert to Unicode U+0027. When converting back from Unicode to ARMSCII, we prefer the ASCII range, that is we want U+0027 to convert to 0x27 rather than to 0xFF. */ tab[ofs]= ch; } } } } /* Allocate and fill reverse table for each plane */ n=i; if (!(cs->tab_from_uni= (MY_UNI_IDX *) (loader->once_alloc)(sizeof(MY_UNI_IDX) * (n + 1)))) return TRUE; for (i=0; i< n; i++) ((struct my_uni_idx_st*)cs->tab_from_uni)[i]= idx[i].uidx; /* Set end-of-list marker */ bzero((char*) &cs->tab_from_uni[i],sizeof(MY_UNI_IDX)); return FALSE; }
O0
c
create_fromuni: pushq %rbp movq %rsp, %rbp subq $0x1850, %rsp # imm = 0x1850 movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x68(%rax) jne 0xa47e7 movb $0x1, -0x1(%rbp) jmp 0xa4cba leaq -0x1820(%rbp), %rdi xorl %esi, %esi movl $0x1800, %edx # imm = 0x1800 callq 0x38300 movl $0x0, -0x1824(%rbp) cmpl $0x100, -0x1824(%rbp) # imm = 0x100 jge 0xa49d8 movq -0x10(%rbp), %rax movq 0x68(%rax), %rax movslq -0x1824(%rbp), %rcx movw (%rax,%rcx,2), %ax movw %ax, -0x182a(%rbp) movzwl -0x182a(%rbp), %eax sarl $0x8, %eax movl $0x100, %ecx # imm = 0x100 cltd idivl %ecx movl %edx, -0x1830(%rbp) movzwl -0x182a(%rbp), %eax cmpl $0x0, %eax jne 0xa485f cmpl $0x0, -0x1824(%rbp) jne 0xa49c2 movslq -0x1830(%rbp), %rcx leaq -0x1820(%rbp), %rax imulq $0x18, %rcx, %rcx addq %rcx, %rax cmpl $0x0, (%rax) jne 0xa48be movw -0x182a(%rbp), %cx movslq -0x1830(%rbp), %rdx leaq -0x1820(%rbp), %rax imulq $0x18, %rdx, %rdx addq %rdx, %rax movw %cx, 0x8(%rax) movw -0x182a(%rbp), %cx movslq -0x1830(%rbp), %rdx leaq -0x1820(%rbp), %rax imulq $0x18, %rdx, %rdx addq %rdx, %rax movw %cx, 0xa(%rax) jmp 0xa49a6 movzwl -0x182a(%rbp), %eax movslq -0x1830(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movzwl 0x8(%rcx), %ecx cmpl %ecx, %eax jge 0xa48f1 movzwl -0x182a(%rbp), %eax movl %eax, -0x184c(%rbp) jmp 0xa4910 movslq -0x1830(%rbp), %rcx leaq -0x1820(%rbp), %rax imulq $0x18, %rcx, %rcx addq %rcx, %rax movzwl 0x8(%rax), %eax movl %eax, -0x184c(%rbp) movl -0x184c(%rbp), %eax movw %ax, %cx movslq -0x1830(%rbp), %rdx leaq -0x1820(%rbp), %rax imulq $0x18, %rdx, %rdx addq %rdx, %rax movw %cx, 0x8(%rax) movzwl -0x182a(%rbp), %eax movslq -0x1830(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movzwl 0xa(%rcx), %ecx cmpl %ecx, %eax jle 0xa4965 movzwl -0x182a(%rbp), %eax movl %eax, -0x1850(%rbp) jmp 0xa4984 movslq -0x1830(%rbp), %rcx leaq -0x1820(%rbp), %rax imulq $0x18, %rcx, %rcx addq %rcx, %rax movzwl 0xa(%rax), %eax movl %eax, -0x1850(%rbp) movl -0x1850(%rbp), %eax movw %ax, %cx movslq -0x1830(%rbp), %rdx leaq -0x1820(%rbp), %rax imulq $0x18, %rdx, %rdx addq %rdx, %rax movw %cx, 0xa(%rax) movslq -0x1830(%rbp), %rcx leaq -0x1820(%rbp), %rax imulq $0x18, %rcx, %rcx addq %rcx, %rax movl (%rax), %ecx addl $0x1, %ecx movl %ecx, (%rax) jmp 0xa49c4 movl -0x1824(%rbp), %eax addl $0x1, %eax movl %eax, -0x1824(%rbp) jmp 0xa4804 leaq -0x1820(%rbp), %rdi movl $0x100, %esi # imm = 0x100 movl $0x18, %edx leaq 0x2e0(%rip), %rcx # 0xa4cd0 callq 0x38750 movl $0x0, -0x1824(%rbp) cmpl $0x100, -0x1824(%rbp) # imm = 0x100 jge 0xa4bf1 movslq -0x1824(%rbp), %rcx leaq -0x1820(%rbp), %rax imulq $0x18, %rcx, %rcx addq %rcx, %rax cmpl $0x0, (%rax) jne 0xa4a2e jmp 0xa4bf1 movslq -0x1824(%rbp), %rcx leaq -0x1820(%rbp), %rax imulq $0x18, %rcx, %rcx addq %rcx, %rax movzwl 0xa(%rax), %eax movslq -0x1824(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movzwl 0x8(%rcx), %ecx subl %ecx, %eax addl $0x1, %eax movl %eax, -0x1838(%rbp) movq -0x18(%rbp), %rax movq 0x80(%rax), %rax movslq -0x1838(%rbp), %rdi shlq $0x0, %rdi callq *%rax movq %rax, -0x1840(%rbp) movslq -0x1824(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movq %rax, 0x10(%rcx) cmpq $0x0, %rax jne 0xa4ab2 movb $0x1, -0x1(%rbp) jmp 0xa4cba movq -0x1840(%rbp), %rdi movslq -0x1838(%rbp), %rdx shlq $0x0, %rdx xorl %esi, %esi callq 0x38300 movl $0x1, -0x1834(%rbp) cmpl $0x100, -0x1834(%rbp) # imm = 0x100 jge 0xa4bdb movq -0x10(%rbp), %rax movq 0x68(%rax), %rax movslq -0x1834(%rbp), %rcx movw (%rax,%rcx,2), %ax movw %ax, -0x1842(%rbp) movzwl -0x1842(%rbp), %eax movslq -0x1824(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movzwl 0x8(%rcx), %ecx cmpl %ecx, %eax jl 0xa4bc5 movzwl -0x1842(%rbp), %eax movslq -0x1824(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movzwl 0xa(%rcx), %ecx cmpl %ecx, %eax jg 0xa4bc5 movzwl -0x1842(%rbp), %eax cmpl $0x0, %eax je 0xa4bc5 movzwl -0x1842(%rbp), %eax movslq -0x1824(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movzwl 0x8(%rcx), %ecx subl %ecx, %eax movl %eax, -0x1848(%rbp) movq -0x1840(%rbp), %rax movslq -0x1848(%rbp), %rcx cmpb $0x0, (%rax,%rcx) je 0xa4baa movq -0x1840(%rbp), %rax movslq -0x1848(%rbp), %rcx movzbl (%rax,%rcx), %eax cmpl $0x7f, %eax jle 0xa4bc3 movl -0x1834(%rbp), %eax movb %al, %dl movq -0x1840(%rbp), %rax movslq -0x1848(%rbp), %rcx movb %dl, (%rax,%rcx) jmp 0xa4bc5 jmp 0xa4bc7 movl -0x1834(%rbp), %eax addl $0x1, %eax movl %eax, -0x1834(%rbp) jmp 0xa4ad5 jmp 0xa4bdd movl -0x1824(%rbp), %eax addl $0x1, %eax movl %eax, -0x1824(%rbp) jmp 0xa49ff movl -0x1824(%rbp), %eax movl %eax, -0x1828(%rbp) movq -0x18(%rbp), %rax movq 0x80(%rax), %rax movl -0x1828(%rbp), %ecx addl $0x1, %ecx movslq %ecx, %rdi shlq $0x4, %rdi callq *%rax movq -0x10(%rbp), %rcx movq %rax, 0x70(%rcx) cmpq $0x0, %rax jne 0xa4c31 movb $0x1, -0x1(%rbp) jmp 0xa4cba movl $0x0, -0x1824(%rbp) movl -0x1824(%rbp), %eax cmpl -0x1828(%rbp), %eax jge 0xa4c94 movq -0x10(%rbp), %rax movq 0x70(%rax), %rax movslq -0x1824(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax movslq -0x1824(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movq 0x8(%rcx), %rdx movq %rdx, (%rax) movq 0x10(%rcx), %rcx movq %rcx, 0x8(%rax) movl -0x1824(%rbp), %eax addl $0x1, %eax movl %eax, -0x1824(%rbp) jmp 0xa4c3b movq -0x10(%rbp), %rax movq 0x70(%rax), %rdi movslq -0x1824(%rbp), %rax shlq $0x4, %rax addq %rax, %rdi xorl %esi, %esi movl $0x10, %edx callq 0x38300 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x1850, %rsp # imm = 0x1850 popq %rbp retq nopw %cs:(%rax,%rax)
create_fromuni: push rbp mov rbp, rsp sub rsp, 1850h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] cmp qword ptr [rax+68h], 0 jnz short loc_A47E7 mov [rbp+var_1], 1 jmp loc_A4CBA loc_A47E7: lea rdi, [rbp+var_1820] xor esi, esi mov edx, 1800h call _memset mov [rbp+var_1824], 0 loc_A4804: cmp [rbp+var_1824], 100h jge loc_A49D8 mov rax, [rbp+var_10] mov rax, [rax+68h] movsxd rcx, [rbp+var_1824] mov ax, [rax+rcx*2] mov [rbp+var_182A], ax movzx eax, [rbp+var_182A] sar eax, 8 mov ecx, 100h cdq idiv ecx mov [rbp+var_1830], edx movzx eax, [rbp+var_182A] cmp eax, 0 jnz short loc_A485F cmp [rbp+var_1824], 0 jnz loc_A49C2 loc_A485F: movsxd rcx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rcx, 18h add rax, rcx cmp dword ptr [rax], 0 jnz short loc_A48BE mov cx, [rbp+var_182A] movsxd rdx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rdx, 18h add rax, rdx mov [rax+8], cx mov cx, [rbp+var_182A] movsxd rdx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rdx, 18h add rax, rdx mov [rax+0Ah], cx jmp loc_A49A6 loc_A48BE: movzx eax, [rbp+var_182A] movsxd rdx, [rbp+var_1830] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx movzx ecx, word ptr [rcx+8] cmp eax, ecx jge short loc_A48F1 movzx eax, [rbp+var_182A] mov [rbp+var_184C], eax jmp short loc_A4910 loc_A48F1: movsxd rcx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rcx, 18h add rax, rcx movzx eax, word ptr [rax+8] mov [rbp+var_184C], eax loc_A4910: mov eax, [rbp+var_184C] mov cx, ax movsxd rdx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rdx, 18h add rax, rdx mov [rax+8], cx movzx eax, [rbp+var_182A] movsxd rdx, [rbp+var_1830] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx movzx ecx, word ptr [rcx+0Ah] cmp eax, ecx jle short loc_A4965 movzx eax, [rbp+var_182A] mov [rbp+var_1850], eax jmp short loc_A4984 loc_A4965: movsxd rcx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rcx, 18h add rax, rcx movzx eax, word ptr [rax+0Ah] mov [rbp+var_1850], eax loc_A4984: mov eax, [rbp+var_1850] mov cx, ax movsxd rdx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rdx, 18h add rax, rdx mov [rax+0Ah], cx loc_A49A6: movsxd rcx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rcx, 18h add rax, rcx mov ecx, [rax] add ecx, 1 mov [rax], ecx loc_A49C2: jmp short $+2 loc_A49C4: mov eax, [rbp+var_1824] add eax, 1 mov [rbp+var_1824], eax jmp loc_A4804 loc_A49D8: lea rdi, [rbp+var_1820] mov esi, 100h mov edx, 18h lea rcx, pcmp call _qsort mov [rbp+var_1824], 0 loc_A49FF: cmp [rbp+var_1824], 100h jge loc_A4BF1 movsxd rcx, [rbp+var_1824] lea rax, [rbp+var_1820] imul rcx, 18h add rax, rcx cmp dword ptr [rax], 0 jnz short loc_A4A2E jmp loc_A4BF1 loc_A4A2E: movsxd rcx, [rbp+var_1824] lea rax, [rbp+var_1820] imul rcx, 18h add rax, rcx movzx eax, word ptr [rax+0Ah] movsxd rdx, [rbp+var_1824] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx movzx ecx, word ptr [rcx+8] sub eax, ecx add eax, 1 mov [rbp+var_1838], eax mov rax, [rbp+var_18] mov rax, [rax+80h] movsxd rdi, [rbp+var_1838] shl rdi, 0 call rax mov [rbp+var_1840], rax movsxd rdx, [rbp+var_1824] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx mov [rcx+10h], rax cmp rax, 0 jnz short loc_A4AB2 mov [rbp+var_1], 1 jmp loc_A4CBA loc_A4AB2: mov rdi, [rbp+var_1840] movsxd rdx, [rbp+var_1838] shl rdx, 0 xor esi, esi call _memset mov [rbp+var_1834], 1 loc_A4AD5: cmp [rbp+var_1834], 100h jge loc_A4BDB mov rax, [rbp+var_10] mov rax, [rax+68h] movsxd rcx, [rbp+var_1834] mov ax, [rax+rcx*2] mov [rbp+var_1842], ax movzx eax, [rbp+var_1842] movsxd rdx, [rbp+var_1824] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx movzx ecx, word ptr [rcx+8] cmp eax, ecx jl loc_A4BC5 movzx eax, [rbp+var_1842] movsxd rdx, [rbp+var_1824] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx movzx ecx, word ptr [rcx+0Ah] cmp eax, ecx jg short loc_A4BC5 movzx eax, [rbp+var_1842] cmp eax, 0 jz short loc_A4BC5 movzx eax, [rbp+var_1842] movsxd rdx, [rbp+var_1824] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx movzx ecx, word ptr [rcx+8] sub eax, ecx mov [rbp+var_1848], eax mov rax, [rbp+var_1840] movsxd rcx, [rbp+var_1848] cmp byte ptr [rax+rcx], 0 jz short loc_A4BAA mov rax, [rbp+var_1840] movsxd rcx, [rbp+var_1848] movzx eax, byte ptr [rax+rcx] cmp eax, 7Fh jle short loc_A4BC3 loc_A4BAA: mov eax, [rbp+var_1834] mov dl, al mov rax, [rbp+var_1840] movsxd rcx, [rbp+var_1848] mov [rax+rcx], dl loc_A4BC3: jmp short $+2 loc_A4BC5: jmp short $+2 loc_A4BC7: mov eax, [rbp+var_1834] add eax, 1 mov [rbp+var_1834], eax jmp loc_A4AD5 loc_A4BDB: jmp short $+2 loc_A4BDD: mov eax, [rbp+var_1824] add eax, 1 mov [rbp+var_1824], eax jmp loc_A49FF loc_A4BF1: mov eax, [rbp+var_1824] mov [rbp+var_1828], eax mov rax, [rbp+var_18] mov rax, [rax+80h] mov ecx, [rbp+var_1828] add ecx, 1 movsxd rdi, ecx shl rdi, 4 call rax mov rcx, [rbp+var_10] mov [rcx+70h], rax cmp rax, 0 jnz short loc_A4C31 mov [rbp+var_1], 1 jmp loc_A4CBA loc_A4C31: mov [rbp+var_1824], 0 loc_A4C3B: mov eax, [rbp+var_1824] cmp eax, [rbp+var_1828] jge short loc_A4C94 mov rax, [rbp+var_10] mov rax, [rax+70h] movsxd rcx, [rbp+var_1824] shl rcx, 4 add rax, rcx movsxd rdx, [rbp+var_1824] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx mov rdx, [rcx+8] mov [rax], rdx mov rcx, [rcx+10h] mov [rax+8], rcx mov eax, [rbp+var_1824] add eax, 1 mov [rbp+var_1824], eax jmp short loc_A4C3B loc_A4C94: mov rax, [rbp+var_10] mov rdi, [rax+70h] movsxd rax, [rbp+var_1824] shl rax, 4 add rdi, rax xor esi, esi mov edx, 10h call _memset mov [rbp+var_1], 0 loc_A4CBA: mov al, [rbp+var_1] add rsp, 1850h pop rbp retn
char create_fromuni(long long a1, long long a2) { long long v2; // rax _QWORD *v3; // rax unsigned __int16 v5; // [rsp+0h] [rbp-1850h] __int16 v6; // [rsp+4h] [rbp-184Ch] int v7; // [rsp+8h] [rbp-1848h] unsigned __int16 v8; // [rsp+Eh] [rbp-1842h] long long v9; // [rsp+10h] [rbp-1840h] int v10; // [rsp+18h] [rbp-1838h] int k; // [rsp+1Ch] [rbp-1834h] int v12; // [rsp+20h] [rbp-1830h] unsigned __int16 v13; // [rsp+26h] [rbp-182Ah] int v14; // [rsp+28h] [rbp-1828h] int i; // [rsp+2Ch] [rbp-1824h] int j; // [rsp+2Ch] [rbp-1824h] int m; // [rsp+2Ch] [rbp-1824h] _DWORD v18[1538]; // [rsp+30h] [rbp-1820h] BYREF long long v19; // [rsp+1838h] [rbp-18h] long long v20; // [rsp+1840h] [rbp-10h] v20 = a1; v19 = a2; if ( !*(_QWORD *)(a1 + 104) ) return 1; memset(v18, 0LL, 6144LL); for ( i = 0; i < 256; ++i ) { v13 = *(_WORD *)(*(_QWORD *)(v20 + 104) + 2LL * i); v12 = ((int)v13 >> 8) % 256; if ( v13 || !i ) { if ( v18[6 * v12] ) { if ( v13 >= (int)LOWORD(v18[6 * v12 + 2]) ) v6 = v18[6 * v12 + 2]; else v6 = *(_WORD *)(*(_QWORD *)(v20 + 104) + 2LL * i); LOWORD(v18[6 * v12 + 2]) = v6; if ( v13 <= (int)HIWORD(v18[6 * v12 + 2]) ) v5 = HIWORD(v18[6 * v12 + 2]); else v5 = v13; HIWORD(v18[6 * v12 + 2]) = v5; } else { LOWORD(v18[6 * v12 + 2]) = v13; HIWORD(v18[6 * v12 + 2]) = v13; } ++v18[6 * v12]; } } qsort(v18, 256LL, 24LL, pcmp); for ( j = 0; j < 256 && v18[6 * j]; ++j ) { v10 = HIWORD(v18[6 * j + 2]) - LOWORD(v18[6 * j + 2]) + 1; v9 = (*(long long ( **)(_QWORD))(v19 + 128))(v10); *(_QWORD *)&v18[6 * j + 4] = v9; if ( !v9 ) return 1; memset(v9, 0LL, v10); for ( k = 1; k < 256; ++k ) { v8 = *(_WORD *)(*(_QWORD *)(v20 + 104) + 2LL * k); if ( v8 >= (int)LOWORD(v18[6 * j + 2]) && v8 <= (int)HIWORD(v18[6 * j + 2]) ) { if ( v8 ) { v7 = v8 - LOWORD(v18[6 * j + 2]); if ( !*(_BYTE *)(v9 + v7) || *(unsigned __int8 *)(v9 + v7) > 0x7Fu ) *(_BYTE *)(v9 + v7) = k; } } } } v14 = j; v2 = (*(long long ( **)(long long))(v19 + 128))(16LL * (j + 1)); *(_QWORD *)(v20 + 112) = v2; if ( !v2 ) return 1; for ( m = 0; m < v14; ++m ) { v3 = (_QWORD *)(16LL * m + *(_QWORD *)(v20 + 112)); *v3 = *(_QWORD *)&v18[6 * m + 2]; v3[1] = *(_QWORD *)&v18[6 * m + 4]; } memset(16LL * m + *(_QWORD *)(v20 + 112), 0LL, 16LL); return 0; }
create_fromuni: PUSH RBP MOV RBP,RSP SUB RSP,0x1850 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x68],0x0 JNZ 0x001a47e7 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001a4cba LAB_001a47e7: LEA RDI,[RBP + -0x1820] XOR ESI,ESI MOV EDX,0x1800 CALL 0x00138300 MOV dword ptr [RBP + -0x1824],0x0 LAB_001a4804: CMP dword ptr [RBP + -0x1824],0x100 JGE 0x001a49d8 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x68] MOVSXD RCX,dword ptr [RBP + -0x1824] MOV AX,word ptr [RAX + RCX*0x2] MOV word ptr [RBP + -0x182a],AX MOVZX EAX,word ptr [RBP + -0x182a] SAR EAX,0x8 MOV ECX,0x100 CDQ IDIV ECX MOV dword ptr [RBP + -0x1830],EDX MOVZX EAX,word ptr [RBP + -0x182a] CMP EAX,0x0 JNZ 0x001a485f CMP dword ptr [RBP + -0x1824],0x0 JNZ 0x001a49c2 LAB_001a485f: MOVSXD RCX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RCX,RCX,0x18 ADD RAX,RCX CMP dword ptr [RAX],0x0 JNZ 0x001a48be MOV CX,word ptr [RBP + -0x182a] MOVSXD RDX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RAX,RDX MOV word ptr [RAX + 0x8],CX MOV CX,word ptr [RBP + -0x182a] MOVSXD RDX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RAX,RDX MOV word ptr [RAX + 0xa],CX JMP 0x001a49a6 LAB_001a48be: MOVZX EAX,word ptr [RBP + -0x182a] MOVSXD RDX,dword ptr [RBP + -0x1830] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOVZX ECX,word ptr [RCX + 0x8] CMP EAX,ECX JGE 0x001a48f1 MOVZX EAX,word ptr [RBP + -0x182a] MOV dword ptr [RBP + -0x184c],EAX JMP 0x001a4910 LAB_001a48f1: MOVSXD RCX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RCX,RCX,0x18 ADD RAX,RCX MOVZX EAX,word ptr [RAX + 0x8] MOV dword ptr [RBP + -0x184c],EAX LAB_001a4910: MOV EAX,dword ptr [RBP + -0x184c] MOV CX,AX MOVSXD RDX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RAX,RDX MOV word ptr [RAX + 0x8],CX MOVZX EAX,word ptr [RBP + -0x182a] MOVSXD RDX,dword ptr [RBP + -0x1830] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOVZX ECX,word ptr [RCX + 0xa] CMP EAX,ECX JLE 0x001a4965 MOVZX EAX,word ptr [RBP + -0x182a] MOV dword ptr [RBP + -0x1850],EAX JMP 0x001a4984 LAB_001a4965: MOVSXD RCX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RCX,RCX,0x18 ADD RAX,RCX MOVZX EAX,word ptr [RAX + 0xa] MOV dword ptr [RBP + -0x1850],EAX LAB_001a4984: MOV EAX,dword ptr [RBP + -0x1850] MOV CX,AX MOVSXD RDX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RAX,RDX MOV word ptr [RAX + 0xa],CX LAB_001a49a6: MOVSXD RCX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RCX,RCX,0x18 ADD RAX,RCX MOV ECX,dword ptr [RAX] ADD ECX,0x1 MOV dword ptr [RAX],ECX LAB_001a49c2: JMP 0x001a49c4 LAB_001a49c4: MOV EAX,dword ptr [RBP + -0x1824] ADD EAX,0x1 MOV dword ptr [RBP + -0x1824],EAX JMP 0x001a4804 LAB_001a49d8: LEA RDI,[RBP + -0x1820] MOV ESI,0x100 MOV EDX,0x18 LEA RCX,[0x1a4cd0] CALL 0x00138750 MOV dword ptr [RBP + -0x1824],0x0 LAB_001a49ff: CMP dword ptr [RBP + -0x1824],0x100 JGE 0x001a4bf1 MOVSXD RCX,dword ptr [RBP + -0x1824] LEA RAX,[RBP + -0x1820] IMUL RCX,RCX,0x18 ADD RAX,RCX CMP dword ptr [RAX],0x0 JNZ 0x001a4a2e JMP 0x001a4bf1 LAB_001a4a2e: MOVSXD RCX,dword ptr [RBP + -0x1824] LEA RAX,[RBP + -0x1820] IMUL RCX,RCX,0x18 ADD RAX,RCX MOVZX EAX,word ptr [RAX + 0xa] MOVSXD RDX,dword ptr [RBP + -0x1824] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOVZX ECX,word ptr [RCX + 0x8] SUB EAX,ECX ADD EAX,0x1 MOV dword ptr [RBP + -0x1838],EAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x80] MOVSXD RDI,dword ptr [RBP + -0x1838] SHL RDI,0x0 CALL RAX MOV qword ptr [RBP + -0x1840],RAX MOVSXD RDX,dword ptr [RBP + -0x1824] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOV qword ptr [RCX + 0x10],RAX CMP RAX,0x0 JNZ 0x001a4ab2 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001a4cba LAB_001a4ab2: MOV RDI,qword ptr [RBP + -0x1840] MOVSXD RDX,dword ptr [RBP + -0x1838] SHL RDX,0x0 XOR ESI,ESI CALL 0x00138300 MOV dword ptr [RBP + -0x1834],0x1 LAB_001a4ad5: CMP dword ptr [RBP + -0x1834],0x100 JGE 0x001a4bdb MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x68] MOVSXD RCX,dword ptr [RBP + -0x1834] MOV AX,word ptr [RAX + RCX*0x2] MOV word ptr [RBP + -0x1842],AX MOVZX EAX,word ptr [RBP + -0x1842] MOVSXD RDX,dword ptr [RBP + -0x1824] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOVZX ECX,word ptr [RCX + 0x8] CMP EAX,ECX JL 0x001a4bc5 MOVZX EAX,word ptr [RBP + -0x1842] MOVSXD RDX,dword ptr [RBP + -0x1824] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOVZX ECX,word ptr [RCX + 0xa] CMP EAX,ECX JG 0x001a4bc5 MOVZX EAX,word ptr [RBP + -0x1842] CMP EAX,0x0 JZ 0x001a4bc5 MOVZX EAX,word ptr [RBP + -0x1842] MOVSXD RDX,dword ptr [RBP + -0x1824] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOVZX ECX,word ptr [RCX + 0x8] SUB EAX,ECX MOV dword ptr [RBP + -0x1848],EAX MOV RAX,qword ptr [RBP + -0x1840] MOVSXD RCX,dword ptr [RBP + -0x1848] CMP byte ptr [RAX + RCX*0x1],0x0 JZ 0x001a4baa MOV RAX,qword ptr [RBP + -0x1840] MOVSXD RCX,dword ptr [RBP + -0x1848] MOVZX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x7f JLE 0x001a4bc3 LAB_001a4baa: MOV EAX,dword ptr [RBP + -0x1834] MOV DL,AL MOV RAX,qword ptr [RBP + -0x1840] MOVSXD RCX,dword ptr [RBP + -0x1848] MOV byte ptr [RAX + RCX*0x1],DL LAB_001a4bc3: JMP 0x001a4bc5 LAB_001a4bc5: JMP 0x001a4bc7 LAB_001a4bc7: MOV EAX,dword ptr [RBP + -0x1834] ADD EAX,0x1 MOV dword ptr [RBP + -0x1834],EAX JMP 0x001a4ad5 LAB_001a4bdb: JMP 0x001a4bdd LAB_001a4bdd: MOV EAX,dword ptr [RBP + -0x1824] ADD EAX,0x1 MOV dword ptr [RBP + -0x1824],EAX JMP 0x001a49ff LAB_001a4bf1: MOV EAX,dword ptr [RBP + -0x1824] MOV dword ptr [RBP + -0x1828],EAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x80] MOV ECX,dword ptr [RBP + -0x1828] ADD ECX,0x1 MOVSXD RDI,ECX SHL RDI,0x4 CALL RAX MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x70],RAX CMP RAX,0x0 JNZ 0x001a4c31 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001a4cba LAB_001a4c31: MOV dword ptr [RBP + -0x1824],0x0 LAB_001a4c3b: MOV EAX,dword ptr [RBP + -0x1824] CMP EAX,dword ptr [RBP + -0x1828] JGE 0x001a4c94 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x70] MOVSXD RCX,dword ptr [RBP + -0x1824] SHL RCX,0x4 ADD RAX,RCX MOVSXD RDX,dword ptr [RBP + -0x1824] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOV RDX,qword ptr [RCX + 0x8] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV EAX,dword ptr [RBP + -0x1824] ADD EAX,0x1 MOV dword ptr [RBP + -0x1824],EAX JMP 0x001a4c3b LAB_001a4c94: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x70] MOVSXD RAX,dword ptr [RBP + -0x1824] SHL RAX,0x4 ADD RDI,RAX XOR ESI,ESI MOV EDX,0x10 CALL 0x00138300 MOV byte ptr [RBP + -0x1],0x0 LAB_001a4cba: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x1850 POP RBP RET
int1 create_fromuni(long param_1,long param_2) { ushort uVar1; ushort uVar2; int iVar3; void *__s; long lVar4; int8 *puVar5; uint uVar6; int local_183c; int local_182c; int local_1828 [2]; ushort auStack_1820 [4]; int8 auStack_1818 [767]; long local_20; long local_18; int1 local_9; if (*(long *)(param_1 + 0x68) == 0) { local_9 = 1; } else { local_20 = param_2; local_18 = param_1; memset(local_1828,0,0x1800); for (local_182c = 0; local_182c < 0x100; local_182c = local_182c + 1) { uVar1 = *(ushort *)(*(long *)(local_18 + 0x68) + (long)local_182c * 2); uVar6 = (uint)((int)(uint)uVar1 >> 8) % 0x100; if ((uVar1 != 0) || (local_182c == 0)) { if (local_1828[(long)(int)uVar6 * 6] == 0) { auStack_1820[(long)(int)uVar6 * 0xc] = uVar1; auStack_1820[(long)(int)uVar6 * 0xc + 1] = uVar1; } else { uVar2 = uVar1; if (auStack_1820[(long)(int)uVar6 * 0xc] <= uVar1) { uVar2 = auStack_1820[(long)(int)uVar6 * 0xc]; } auStack_1820[(long)(int)uVar6 * 0xc] = uVar2; if (uVar1 <= auStack_1820[(long)(int)uVar6 * 0xc + 1]) { uVar1 = auStack_1820[(long)(int)uVar6 * 0xc + 1]; } auStack_1820[(long)(int)uVar6 * 0xc + 1] = uVar1; } local_1828[(long)(int)uVar6 * 6] = local_1828[(long)(int)uVar6 * 6] + 1; } } qsort(local_1828,0x100,0x18,pcmp); local_182c = 0; while ((iVar3 = local_182c, local_182c < 0x100 && (local_1828[(long)local_182c * 6] != 0))) { iVar3 = ((uint)auStack_1820[(long)local_182c * 0xc + 1] - (uint)auStack_1820[(long)local_182c * 0xc]) + 1; __s = (void *)(**(code **)(local_20 + 0x80))((long)iVar3); auStack_1818[(long)local_182c * 3] = __s; if (__s == (void *)0x0) { return 1; } memset(__s,0,(long)iVar3); for (local_183c = 1; local_183c < 0x100; local_183c = local_183c + 1) { uVar1 = *(ushort *)(*(long *)(local_18 + 0x68) + (long)local_183c * 2); if ((((auStack_1820[(long)local_182c * 0xc] <= uVar1) && (uVar1 <= auStack_1820[(long)local_182c * 0xc + 1])) && (uVar1 != 0)) && ((iVar3 = (uint)uVar1 - (uint)auStack_1820[(long)local_182c * 0xc], *(char *)((long)__s + (long)iVar3) == '\0' || (0x7f < *(byte *)((long)__s + (long)iVar3))))) { *(char *)((long)__s + (long)iVar3) = (char)local_183c; } } local_182c = local_182c + 1; } lVar4 = (**(code **)(local_20 + 0x80))((long)(local_182c + 1) << 4); *(long *)(local_18 + 0x70) = lVar4; if (lVar4 == 0) { local_9 = 1; } else { for (local_182c = 0; local_182c < iVar3; local_182c = local_182c + 1) { puVar5 = (int8 *)(*(long *)(local_18 + 0x70) + (long)local_182c * 0x10); *puVar5 = *(int8 *)(auStack_1820 + (long)local_182c * 0xc); puVar5[1] = auStack_1818[(long)local_182c * 3]; } memset((void *)(*(long *)(local_18 + 0x70) + (long)local_182c * 0x10),0,0x10); local_9 = 0; } } return local_9; }
51,413
my_b_safe_write
eloqsql/mysys/mf_iocache.c
int my_b_safe_write(IO_CACHE *info, const uchar *Buffer, size_t Count) { /* Sasha: We are not writing this with the ? operator to avoid hitting a possible compiler bug. At least gcc 2.95 cannot deal with several layers of ternary operators that evaluated comma(,) operator expressions inside - I do have a test case if somebody wants it */ if (info->type == SEQ_READ_APPEND) return my_b_append(info, Buffer, Count); return my_b_write(info, Buffer, Count); }
O3
c
my_b_safe_write: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdx, %rbx movq %rdi, %r14 cmpl $0x3, 0xb0(%rdi) jne 0x515f6 movq %r14, %rdi movq %rbx, %rdx popq %rbx popq %r14 popq %rbp jmp 0x5139e movq 0x40(%r14), %rdi leaq (%rdi,%rbx), %rax cmpq 0x48(%r14), %rax jbe 0x51613 movq %r14, %rdi movq %rbx, %rdx popq %rbx popq %r14 popq %rbp jmp 0x50b97 testq %rbx, %rbx je 0x51624 movq %rbx, %rdx callq 0x282a0 addq %rbx, 0x40(%r14) xorl %eax, %eax popq %rbx popq %r14 popq %rbp retq
my_b_safe_write: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdx mov r14, rdi cmp dword ptr [rdi+0B0h], 3 jnz short loc_515F6 mov rdi, r14 mov rdx, rbx pop rbx pop r14 pop rbp jmp my_b_append loc_515F6: mov rdi, [r14+40h] lea rax, [rdi+rbx] cmp rax, [r14+48h] jbe short loc_51613 mov rdi, r14 mov rdx, rbx pop rbx pop r14 pop rbp jmp _my_b_write loc_51613: test rbx, rbx jz short loc_51624 mov rdx, rbx call _memcpy add [r14+40h], rbx loc_51624: xor eax, eax pop rbx pop r14 pop rbp retn
long long my_b_safe_write(long long a1, const char *a2, unsigned long long a3) { long long v6; // rdi if ( *(_DWORD *)(a1 + 176) == 3 ) return my_b_append(a1, (long long)a2, a3); v6 = *(_QWORD *)(a1 + 64); if ( v6 + a3 > *(_QWORD *)(a1 + 72) ) return my_b_write(a1, a2, a3); if ( a3 ) { memcpy(v6, a2, a3); *(_QWORD *)(a1 + 64) += a3; } return 0LL; }
my_b_safe_write: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDX MOV R14,RDI CMP dword ptr [RDI + 0xb0],0x3 JNZ 0x001515f6 MOV RDI,R14 MOV RDX,RBX POP RBX POP R14 POP RBP JMP 0x0015139e LAB_001515f6: MOV RDI,qword ptr [R14 + 0x40] LEA RAX,[RDI + RBX*0x1] CMP RAX,qword ptr [R14 + 0x48] JBE 0x00151613 MOV RDI,R14 MOV RDX,RBX POP RBX POP R14 POP RBP JMP 0x00150b97 LAB_00151613: TEST RBX,RBX JZ 0x00151624 MOV RDX,RBX CALL 0x001282a0 ADD qword ptr [R14 + 0x40],RBX LAB_00151624: XOR EAX,EAX POP RBX POP R14 POP RBP RET
int8 my_b_safe_write(long param_1,void *param_2,size_t param_3) { int8 uVar1; if (*(int *)(param_1 + 0xb0) == 3) { uVar1 = my_b_append(param_1,param_2,param_3); return uVar1; } if (*(ulong *)(param_1 + 0x48) < (long)*(void **)(param_1 + 0x40) + param_3) { uVar1 = _my_b_write(param_1,param_2,param_3); return uVar1; } if (param_3 != 0) { memcpy(*(void **)(param_1 + 0x40),param_2,param_3); *(long *)(param_1 + 0x40) = *(long *)(param_1 + 0x40) + param_3; } return 0; }
51,414
default_reporter
eloqsql/mysys/my_getopt.c
static void default_reporter(enum loglevel level, const char *format, ...) { va_list args; DBUG_ENTER("default_reporter"); va_start(args, format); if (level == WARNING_LEVEL) fprintf(stderr, "%s", "Warning: "); else if (level == INFORMATION_LEVEL) fprintf(stderr, "%s", "Info: "); vfprintf(stderr, format, args); va_end(args); fputc('\n', stderr); fflush(stderr); DBUG_VOID_RETURN; }
O0
c
default_reporter: pushq %rbp movq %rsp, %rbp subq $0xe0, %rsp testb %al, %al je 0x794f8 movaps %xmm0, -0xb0(%rbp) movaps %xmm1, -0xa0(%rbp) movaps %xmm2, -0x90(%rbp) movaps %xmm3, -0x80(%rbp) movaps %xmm4, -0x70(%rbp) movaps %xmm5, -0x60(%rbp) movaps %xmm6, -0x50(%rbp) movaps %xmm7, -0x40(%rbp) movq %r9, -0xb8(%rbp) movq %r8, -0xc0(%rbp) movq %rcx, -0xc8(%rbp) movq %rdx, -0xd0(%rbp) movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) leaq -0x30(%rbp), %rax leaq -0xe0(%rbp), %rcx movq %rcx, 0x10(%rax) leaq 0x10(%rbp), %rcx movq %rcx, 0x8(%rax) movl $0x30, 0x4(%rax) movl $0x10, (%rax) cmpl $0x1, -0x4(%rbp) jne 0x79566 movq 0x1b8a94(%rip), %rax # 0x231fe0 movq (%rax), %rdi leaq 0x58df6(%rip), %rsi # 0xd234c leaq 0x577e9(%rip), %rdx # 0xd0d46 movb $0x0, %al callq 0x361c0 jmp 0x7958d cmpl $0x2, -0x4(%rbp) jne 0x7958b movq 0x1b8a6d(%rip), %rax # 0x231fe0 movq (%rax), %rdi leaq 0x58dcf(%rip), %rsi # 0xd234c leaq 0x577cc(%rip), %rdx # 0xd0d50 movb $0x0, %al callq 0x361c0 jmp 0x7958d movq 0x1b8a4c(%rip), %rax # 0x231fe0 movq (%rax), %rdi movq -0x10(%rbp), %rsi leaq -0x30(%rbp), %rdx callq 0x36a60 leaq -0x30(%rbp), %rax movq 0x1b8a31(%rip), %rax # 0x231fe0 movq (%rax), %rsi movl $0xa, %edi callq 0x36880 movq 0x1b8a1d(%rip), %rax # 0x231fe0 movq (%rax), %rdi callq 0x364a0 jmp 0x795cd addq $0xe0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
default_reporter_0: push rbp mov rbp, rsp sub rsp, 0E0h test al, al jz short loc_794F8 movaps [rbp+var_B0], xmm0 movaps [rbp+var_A0], xmm1 movaps [rbp+var_90], xmm2 movaps [rbp+var_80], xmm3 movaps [rbp+var_70], xmm4 movaps [rbp+var_60], xmm5 movaps [rbp+var_50], xmm6 movaps [rbp+var_40], xmm7 loc_794F8: mov [rbp+var_B8], r9 mov [rbp+var_C0], r8 mov [rbp+var_C8], rcx mov [rbp+var_D0], rdx mov [rbp+var_4], edi mov [rbp+var_10], rsi lea rax, [rbp+var_30] lea rcx, [rbp+var_E0] mov [rax+10h], rcx lea rcx, [rbp+arg_0] mov [rax+8], rcx mov dword ptr [rax+4], 30h ; '0' mov dword ptr [rax], 10h cmp [rbp+var_4], 1 jnz short loc_79566 mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aAtLineDPosDS+13h; "%s" lea rdx, aWarning; "Warning: " mov al, 0 call _fprintf jmp short loc_7958D loc_79566: cmp [rbp+var_4], 2 jnz short loc_7958B mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aAtLineDPosDS+13h; "%s" lea rdx, aInfo; "Info: " mov al, 0 call _fprintf loc_7958B: jmp short $+2 loc_7958D: mov rax, cs:stderr_ptr mov rdi, [rax] mov rsi, [rbp+var_10] lea rdx, [rbp+var_30] call _vfprintf lea rax, [rbp+var_30] mov rax, cs:stderr_ptr mov rsi, [rax] mov edi, 0Ah call _fputc mov rax, cs:stderr_ptr mov rdi, [rax] call _fflush jmp short $+2 loc_795CD: add rsp, 0E0h pop rbp retn
long long default_reporter_0(int a1, long long a2, ...) { va_list va; // [rsp+B0h] [rbp-30h] BYREF long long v4; // [rsp+D0h] [rbp-10h] int v5; // [rsp+DCh] [rbp-4h] va_start(va, a2); v5 = a1; v4 = a2; if ( a1 == 1 ) { fprintf(stderr, "%s", "Warning: "); } else if ( v5 == 2 ) { fprintf(stderr, "%s", "Info: "); } vfprintf(stderr, v4, va); fputc(10LL, stderr); return fflush(stderr); }
default_reporter: PUSH RBP MOV RBP,RSP SUB RSP,0xe0 TEST AL,AL JZ 0x001794f8 MOVAPS xmmword ptr [RBP + -0xb0],XMM0 MOVAPS xmmword ptr [RBP + -0xa0],XMM1 MOVAPS xmmword ptr [RBP + -0x90],XMM2 MOVAPS xmmword ptr [RBP + -0x80],XMM3 MOVAPS xmmword ptr [RBP + -0x70],XMM4 MOVAPS xmmword ptr [RBP + -0x60],XMM5 MOVAPS xmmword ptr [RBP + -0x50],XMM6 MOVAPS xmmword ptr [RBP + -0x40],XMM7 LAB_001794f8: MOV qword ptr [RBP + -0xb8],R9 MOV qword ptr [RBP + -0xc0],R8 MOV qword ptr [RBP + -0xc8],RCX MOV qword ptr [RBP + -0xd0],RDX MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI LEA RAX,[RBP + -0x30] LEA RCX,[RBP + -0xe0] MOV qword ptr [RAX + 0x10],RCX LEA RCX,[RBP + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RAX + 0x4],0x30 MOV dword ptr [RAX],0x10 CMP dword ptr [RBP + -0x4],0x1 JNZ 0x00179566 MOV RAX,qword ptr [0x00331fe0] MOV RDI,qword ptr [RAX] LEA RSI,[0x1d234c] LEA RDX,[0x1d0d46] MOV AL,0x0 CALL 0x001361c0 JMP 0x0017958d LAB_00179566: CMP dword ptr [RBP + -0x4],0x2 JNZ 0x0017958b MOV RAX,qword ptr [0x00331fe0] MOV RDI,qword ptr [RAX] LEA RSI,[0x1d234c] LEA RDX,[0x1d0d50] MOV AL,0x0 CALL 0x001361c0 LAB_0017958b: JMP 0x0017958d LAB_0017958d: MOV RAX,qword ptr [0x00331fe0] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] LEA RDX,[RBP + -0x30] CALL 0x00136a60 LEA RAX,[RBP + -0x30] MOV RAX,qword ptr [0x00331fe0] MOV RSI,qword ptr [RAX] MOV EDI,0xa CALL 0x00136880 MOV RAX,qword ptr [0x00331fe0] MOV RDI,qword ptr [RAX] CALL 0x001364a0 JMP 0x001795cd LAB_001795cd: ADD RSP,0xe0 POP RBP RET
void default_reporter(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int param_9,char *param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; int1 local_e8 [16]; int8 local_d8; int8 local_d0; int8 local_c8; int8 local_c0; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int4 local_38; int4 local_34; int1 *local_30; int1 *local_28; char *local_18; int local_c; if (in_AL != '\0') { local_b8 = param_1; local_a8 = param_2; local_98 = param_3; local_88 = param_4; local_78 = param_5; local_68 = param_6; local_58 = param_7; local_48 = param_8; } local_28 = local_e8; local_30 = &stack0x00000008; local_34 = 0x30; local_38 = 0x10; local_d8 = param_11; local_d0 = param_12; local_c8 = param_13; local_c0 = param_14; local_18 = param_10; local_c = param_9; if (param_9 == 1) { fprintf(*(FILE **)PTR_stderr_00331fe0,"%s","Warning: "); } else if (param_9 == 2) { fprintf(*(FILE **)PTR_stderr_00331fe0,"%s","Info: "); } vfprintf(*(FILE **)PTR_stderr_00331fe0,local_18,&local_38); fputc(10,*(FILE **)PTR_stderr_00331fe0); fflush(*(FILE **)PTR_stderr_00331fe0); return; }
51,415
mi_init_bulk_insert
eloqsql/storage/myisam/mi_write.c
int mi_init_bulk_insert(MI_INFO *info, size_t cache_size, ha_rows rows) { MYISAM_SHARE *share=info->s; MI_KEYDEF *key=share->keyinfo; bulk_insert_param *params; uint i, num_keys, total_keylength; ulonglong key_map; DBUG_ENTER("_mi_init_bulk_insert"); DBUG_PRINT("enter",("cache_size: %lu", (ulong) cache_size)); DBUG_ASSERT(!info->bulk_insert && (!rows || rows >= MI_MIN_ROWS_TO_USE_BULK_INSERT)); mi_clear_all_keys_active(key_map); for (i=total_keylength=num_keys=0 ; i < share->base.keys ; i++) { if (! (key[i].flag & HA_NOSAME) && (share->base.auto_key != i + 1) && mi_is_key_active(share->state.key_map, i)) { num_keys++; mi_set_key_active(key_map, i); total_keylength+=key[i].maxlength+TREE_ELEMENT_EXTRA_SIZE; } } if (num_keys==0 || num_keys * (size_t) MI_MIN_SIZE_BULK_INSERT_TREE > cache_size) DBUG_RETURN(0); if (rows && rows*total_keylength < cache_size) cache_size= (size_t) rows; else cache_size/=total_keylength*16; info->bulk_insert=(TREE *) my_malloc(mi_key_memory_MI_INFO_bulk_insert, (sizeof(TREE)*share->base.keys+ sizeof(bulk_insert_param)*num_keys),MYF(0)); if (!info->bulk_insert) DBUG_RETURN(HA_ERR_OUT_OF_MEM); params=(bulk_insert_param *)(info->bulk_insert+share->base.keys); for (i=0 ; i < share->base.keys ; i++) { if (mi_is_key_active(key_map, i)) { params->info=info; params->keynr=i; /* Only allocate a 16'th of the buffer at a time */ init_tree(&info->bulk_insert[i], cache_size * key[i].maxlength, cache_size * key[i].maxlength, 0, (qsort_cmp2)keys_compare, keys_free, (void *)params++, MYF(0)); } else info->bulk_insert[i].root=0; } DBUG_RETURN(0); }
O3
c
mi_init_bulk_insert: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, -0x30(%rbp) movq (%rdi), %r13 movl 0x180(%r13), %r8d testq %r8, %r8 je 0x89806 movq %rdx, %rbx movq 0x218(%r13), %r14 xorl %ecx, %ecx xorl %r15d, %r15d xorl %edi, %edi xorl %eax, %eax imulq $0x70, %rcx, %r9 testb $0x1, 0xa(%r14,%r9) jne 0x896dc movl 0x184(%r13), %r10d leaq 0x1(%rcx), %rdx cmpq %r10, %rdx je 0x896e2 movq 0xc0(%r13), %r11 movl $0x1, %r10d shlq %cl, %r10 btq %rcx, %r11 jae 0x896e2 addq %r14, %r9 incl %eax orq %r10, %r15 movzwl 0x16(%r9), %ecx addl %ecx, %edi addl $0x20, %edi jmp 0x896e2 incq %rcx movq %rcx, %rdx movq %rdx, %rcx cmpq %r8, %rdx jne 0x89696 xorl %r12d, %r12d testl %eax, %eax je 0x89809 movq %r15, -0x40(%rbp) movl %eax, %ecx movq %rcx, %rax shlq $0xe, %rax cmpq %rsi, %rax ja 0x89809 testq %rbx, %rbx je 0x8971b movl %edi, %eax imulq %rbx, %rax cmpq %rsi, %rax jb 0x89729 shll $0x4, %edi movq %rsi, %rax xorl %edx, %edx divq %rdi movq %rax, %rbx leaq 0xb76244(%rip), %rax # 0xbff974 movl (%rax), %edi imulq $0x298, %r8, %rax # imm = 0x298 shlq $0x4, %rcx addq %rax, %rcx xorl %r12d, %r12d movq %rcx, %rsi xorl %edx, %edx callq 0x9fd89 movq %rax, %r15 movq -0x30(%rbp), %rax movq %r15, 0x80(%rax) testq %r15, %r15 je 0x8981b movl 0x180(%r13), %eax testq %rax, %rax je 0x89809 movq %rbx, -0x38(%rbp) imulq $0x298, %rax, %rax # imm = 0x298 addq %rax, %r15 addq $0x16, %r14 xorl %r12d, %r12d xorl %ebx, %ebx movq -0x40(%rbp), %rax btq %rbx, %rax jae 0x897d9 movq -0x30(%rbp), %rax movq %rax, (%r15) movl %ebx, 0x8(%r15) movq 0x80(%rax), %rdi addq %r12, %rdi movzwl (%r14), %edx imulq -0x38(%rbp), %rdx movq %rdx, %rsi xorl %ecx, %ecx leaq 0x64(%rip), %r8 # 0x89823 leaq 0x98(%rip), %r9 # 0x8985e pushq $0x0 pushq %r15 addq $0x10, %r15 callq 0xa4618 addq $0x10, %rsp jmp 0x897ec movq -0x30(%rbp), %rax movq 0x80(%rax), %rax movq $0x0, (%rax,%r12) incq %rbx movl 0x180(%r13), %eax addq $0x298, %r12 # imm = 0x298 addq $0x70, %r14 cmpq %rax, %rbx jb 0x8978b xorl %r12d, %r12d movl %r12d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x80, %r12d jmp 0x89809
mi_init_bulk_insert: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_30], rdi mov r13, [rdi] mov r8d, [r13+180h] test r8, r8 jz loc_89806 mov rbx, rdx mov r14, [r13+218h] xor ecx, ecx xor r15d, r15d xor edi, edi xor eax, eax loc_89696: imul r9, rcx, 70h ; 'p' test byte ptr [r14+r9+0Ah], 1 jnz short loc_896DC mov r10d, [r13+184h] lea rdx, [rcx+1] cmp rdx, r10 jz short loc_896E2 mov r11, [r13+0C0h] mov r10d, 1 shl r10, cl bt r11, rcx jnb short loc_896E2 add r9, r14 inc eax or r15, r10 movzx ecx, word ptr [r9+16h] add edi, ecx add edi, 20h ; ' ' jmp short loc_896E2 loc_896DC: inc rcx mov rdx, rcx loc_896E2: mov rcx, rdx cmp rdx, r8 jnz short loc_89696 xor r12d, r12d test eax, eax jz loc_89809 mov [rbp+var_40], r15 mov ecx, eax mov rax, rcx shl rax, 0Eh cmp rax, rsi ja loc_89809 test rbx, rbx jz short loc_8971B mov eax, edi imul rax, rbx cmp rax, rsi jb short loc_89729 loc_8971B: shl edi, 4 mov rax, rsi xor edx, edx div rdi mov rbx, rax loc_89729: lea rax, mi_key_memory_MI_INFO_bulk_insert mov edi, [rax] imul rax, r8, 298h shl rcx, 4 add rcx, rax xor r12d, r12d mov rsi, rcx xor edx, edx call my_malloc mov r15, rax mov rax, [rbp+var_30] mov [rax+80h], r15 test r15, r15 jz loc_8981B mov eax, [r13+180h] test rax, rax jz loc_89809 mov [rbp+var_38], rbx imul rax, 298h add r15, rax add r14, 16h xor r12d, r12d xor ebx, ebx loc_8978B: mov rax, [rbp+var_40] bt rax, rbx jnb short loc_897D9 mov rax, [rbp+var_30] mov [r15], rax mov [r15+8], ebx mov rdi, [rax+80h] add rdi, r12 movzx edx, word ptr [r14] imul rdx, [rbp+var_38] mov rsi, rdx xor ecx, ecx lea r8, keys_compare_0 lea r9, keys_free_0 push 0 push r15 add r15, 10h call init_tree add rsp, 10h jmp short loc_897EC loc_897D9: mov rax, [rbp+var_30] mov rax, [rax+80h] mov qword ptr [rax+r12], 0 loc_897EC: inc rbx mov eax, [r13+180h] add r12, 298h add r14, 70h ; 'p' cmp rbx, rax jb short loc_8978B loc_89806: xor r12d, r12d loc_89809: mov eax, r12d add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8981B: mov r12d, 80h jmp short loc_89809
long long mi_init_bulk_insert(_QWORD *a1, unsigned long long a2, unsigned long long a3) { long long v3; // r13 long long v4; // r8 long long v6; // r14 unsigned long long v7; // rcx long long v8; // r15 unsigned int v9; // edi unsigned int v10; // eax unsigned long long v11; // rdx long long v12; // r11 unsigned int v13; // r12d long long v14; // r15 long long v15; // r15 unsigned __int16 *v16; // r14 long long v17; // r12 unsigned long long v18; // rbx long long v19; // rax long long v21; // [rsp-10h] [rbp-50h] long long v22; // [rsp+0h] [rbp-40h] int v23; // [rsp+8h] [rbp-38h] v3 = *a1; v4 = *(unsigned int *)(*a1 + 384LL); if ( !*(_DWORD *)(*a1 + 384LL) ) return 0; v6 = *(_QWORD *)(v3 + 536); v7 = 0LL; v8 = 0LL; v9 = 0; v10 = 0; do { if ( (*(_BYTE *)(v6 + 112 * v7 + 10) & 1) != 0 ) { v11 = v7 + 1; } else { v11 = v7 + 1; if ( v7 + 1 != *(_DWORD *)(v3 + 388) ) { v12 = *(_QWORD *)(v3 + 192); if ( _bittest64(&v12, v7) ) { ++v10; v8 |= 1LL << v7; v9 += *(unsigned __int16 *)(v6 + 112 * v7 + 22) + 32; } } } v7 = v11; } while ( v11 != v4 ); v13 = 0; if ( v10 ) { v22 = v8; if ( (unsigned long long)v10 << 14 <= a2 ) { if ( !a3 || a3 * v9 >= a2 ) a3 = a2 / (16 * v9); v13 = 0; v14 = my_malloc(mi_key_memory_MI_INFO_bulk_insert, 664 * v4 + 16LL * v10, 0LL); a1[16] = v14; if ( !v14 ) return 128; if ( *(_DWORD *)(v3 + 384) ) { v23 = a3; v15 = 664LL * *(unsigned int *)(v3 + 384) + v14; v16 = (unsigned __int16 *)(v6 + 22); v17 = 0LL; v18 = 0LL; do { v19 = v22; if ( _bittest64(&v19, v18) ) { *(_QWORD *)v15 = a1; *(_DWORD *)(v15 + 8) = v18; v21 = v15; v15 += 16LL; init_tree( v17 + *((_DWORD *)a1 + 32), v23 * *v16, v23 * *v16, 0, (unsigned int)keys_compare_0, (unsigned int)keys_free_0, v21, 0LL); } else { *(_QWORD *)(a1[16] + v17) = 0LL; } ++v18; v17 += 664LL; v16 += 56; } while ( v18 < *(unsigned int *)(v3 + 384) ); return 0; } } } return v13; }
mi_init_bulk_insert: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x30],RDI MOV R13,qword ptr [RDI] MOV R8D,dword ptr [R13 + 0x180] TEST R8,R8 JZ 0x00189806 MOV RBX,RDX MOV R14,qword ptr [R13 + 0x218] XOR ECX,ECX XOR R15D,R15D XOR EDI,EDI XOR EAX,EAX LAB_00189696: IMUL R9,RCX,0x70 TEST byte ptr [R14 + R9*0x1 + 0xa],0x1 JNZ 0x001896dc MOV R10D,dword ptr [R13 + 0x184] LEA RDX,[RCX + 0x1] CMP RDX,R10 JZ 0x001896e2 MOV R11,qword ptr [R13 + 0xc0] MOV R10D,0x1 SHL R10,CL BT R11,RCX JNC 0x001896e2 ADD R9,R14 INC EAX OR R15,R10 MOVZX ECX,word ptr [R9 + 0x16] ADD EDI,ECX ADD EDI,0x20 JMP 0x001896e2 LAB_001896dc: INC RCX MOV RDX,RCX LAB_001896e2: MOV RCX,RDX CMP RDX,R8 JNZ 0x00189696 XOR R12D,R12D TEST EAX,EAX JZ 0x00189809 MOV qword ptr [RBP + -0x40],R15 MOV ECX,EAX MOV RAX,RCX SHL RAX,0xe CMP RAX,RSI JA 0x00189809 TEST RBX,RBX JZ 0x0018971b MOV EAX,EDI IMUL RAX,RBX CMP RAX,RSI JC 0x00189729 LAB_0018971b: SHL EDI,0x4 MOV RAX,RSI XOR EDX,EDX DIV RDI MOV RBX,RAX LAB_00189729: LEA RAX,[0xcff974] MOV EDI,dword ptr [RAX] IMUL RAX,R8,0x298 SHL RCX,0x4 ADD RCX,RAX XOR R12D,R12D MOV RSI,RCX XOR EDX,EDX CALL 0x0019fd89 MOV R15,RAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x80],R15 TEST R15,R15 JZ 0x0018981b MOV EAX,dword ptr [R13 + 0x180] TEST RAX,RAX JZ 0x00189809 MOV qword ptr [RBP + -0x38],RBX IMUL RAX,RAX,0x298 ADD R15,RAX ADD R14,0x16 XOR R12D,R12D XOR EBX,EBX LAB_0018978b: MOV RAX,qword ptr [RBP + -0x40] BT RAX,RBX JNC 0x001897d9 MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [R15],RAX MOV dword ptr [R15 + 0x8],EBX MOV RDI,qword ptr [RAX + 0x80] ADD RDI,R12 MOVZX EDX,word ptr [R14] IMUL RDX,qword ptr [RBP + -0x38] MOV RSI,RDX XOR ECX,ECX LEA R8,[0x189823] LEA R9,[0x18985e] PUSH 0x0 PUSH R15 ADD R15,0x10 CALL 0x001a4618 ADD RSP,0x10 JMP 0x001897ec LAB_001897d9: MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x80] MOV qword ptr [RAX + R12*0x1],0x0 LAB_001897ec: INC RBX MOV EAX,dword ptr [R13 + 0x180] ADD R12,0x298 ADD R14,0x70 CMP RBX,RAX JC 0x0018978b LAB_00189806: XOR R12D,R12D LAB_00189809: MOV EAX,R12D ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0018981b: MOV R12D,0x80 JMP 0x00189809
int8 mi_init_bulk_insert(long *param_1,ulong param_2,ulong param_3) { long lVar1; uint uVar2; long lVar3; ulong uVar4; ulong uVar5; uint uVar6; long lVar7; ushort *puVar8; ulong uVar9; int8 *puVar10; lVar1 = *param_1; uVar5 = (ulong)*(uint *)(lVar1 + 0x180); if (uVar5 != 0) { lVar7 = *(long *)(lVar1 + 0x218); uVar4 = 0; uVar9 = 0; uVar6 = 0; uVar2 = 0; do { if ((((*(byte *)(lVar7 + 10 + uVar4 * 0x70) & 1) == 0) && (uVar4 + 1 != (ulong)*(uint *)(lVar1 + 0x184))) && ((*(ulong *)(lVar1 + 0xc0) >> (uVar4 & 0x3f) & 1) != 0)) { uVar2 = uVar2 + 1; uVar9 = uVar9 | 1L << ((byte)uVar4 & 0x3f); uVar6 = uVar6 + *(ushort *)(uVar4 * 0x70 + lVar7 + 0x16) + 0x20; } uVar4 = uVar4 + 1; } while (uVar4 != uVar5); if (uVar2 == 0) { return 0; } if (param_2 < (ulong)uVar2 << 0xe) { return 0; } if ((param_3 == 0) || (param_2 <= uVar6 * param_3)) { param_3 = param_2 / (uVar6 << 4); } lVar3 = my_malloc(mi_key_memory_MI_INFO_bulk_insert,(ulong)uVar2 * 0x10 + uVar5 * 0x298,0); param_1[0x10] = lVar3; if (lVar3 == 0) { return 0x80; } if ((ulong)*(uint *)(lVar1 + 0x180) == 0) { return 0; } puVar10 = (int8 *)(lVar3 + (ulong)*(uint *)(lVar1 + 0x180) * 0x298); puVar8 = (ushort *)(lVar7 + 0x16); lVar7 = 0; uVar5 = 0; do { if ((uVar9 >> (uVar5 & 0x3f) & 1) == 0) { *(int8 *)(param_1[0x10] + lVar7) = 0; } else { *puVar10 = param_1; *(int *)(puVar10 + 1) = (int)uVar5; init_tree(param_1[0x10] + lVar7,*puVar8 * param_3,*puVar8 * param_3,0,keys_compare,keys_free ,puVar10,0,uVar9,param_3); puVar10 = puVar10 + 2; } uVar5 = uVar5 + 1; lVar7 = lVar7 + 0x298; puVar8 = puVar8 + 0x38; } while (uVar5 < *(uint *)(lVar1 + 0x180)); } return 0; }
51,416
lunasvg::SVGPreserveAspectRatio::parse(std::basic_string_view<char, std::char_traits<char>>)
dmazzella[P]pylunasvg/lunasvg/source/svgproperty.cpp
bool SVGPreserveAspectRatio::parse(std::string_view input) { auto alignType = AlignType::xMidYMid; stripLeadingSpaces(input); if(skipString(input, "none")) alignType = AlignType::None; else if(skipString(input, "xMinYMin")) alignType = AlignType::xMinYMin; else if(skipString(input, "xMidYMin")) alignType = AlignType::xMidYMin; else if(skipString(input, "xMaxYMin")) alignType = AlignType::xMaxYMin; else if(skipString(input, "xMinYMid")) alignType = AlignType::xMinYMid; else if(skipString(input, "xMidYMid")) alignType = AlignType::xMidYMid; else if(skipString(input, "xMaxYMid")) alignType = AlignType::xMaxYMid; else if(skipString(input, "xMinYMax")) alignType = AlignType::xMinYMax; else if(skipString(input, "xMidYMax")) alignType = AlignType::xMidYMax; else if(skipString(input, "xMaxYMax")) alignType = AlignType::xMaxYMax; else { return false; } auto meetOrSlice = MeetOrSlice::Meet; skipOptionalSpaces(input); if(skipString(input, "meet")) { meetOrSlice = MeetOrSlice::Meet; } else if(skipString(input, "slice")) { meetOrSlice = MeetOrSlice::Slice; } if(alignType == AlignType::None) meetOrSlice = MeetOrSlice::Meet; skipOptionalSpaces(input); if(!input.empty()) return false; m_alignType = alignType; m_meetOrSlice = meetOrSlice; return true; }
O1
cpp
lunasvg::SVGPreserveAspectRatio::parse(std::basic_string_view<char, std::char_traits<char>>): movabsq $0x100002600, %rcx # imm = 0x100002600 testq %rsi, %rsi je 0x1ff5a leaq (%rdx,%rsi), %rax movzbl (%rdx), %r8d cmpq $0x20, %r8 ja 0x1ff5a btq %r8, %rcx jae 0x1ff5a incq %rdx decq %rsi jne 0x1ff3d xorl %esi, %esi movq %rax, %rdx xorl %r8d, %r8d cmpq $0x4, %rsi jb 0x1ff6f cmpl $0x656e6f6e, (%rdx) # imm = 0x656E6F6E je 0x201cb xorl %eax, %eax testb %al, %al jne 0x2011e cmpq $0x8, %rsi jb 0x1ff99 movabsq $0x6e694d5964694d78, %r8 # imm = 0x6E694D5964694D78 orq $0xa000000, %r8 # imm = 0xA000000 cmpq (%rdx), %r8 je 0x201ea xorl %r9d, %r9d movl $0x1, %r8d testb %r9b, %r9b jne 0x2011e cmpq $0x8, %rsi jb 0x1ffc4 movabsq $0x6e694d5964694d78, %r8 # imm = 0x6E694D5964694D78 cmpq %r8, (%rdx) je 0x201fa xorl %r9d, %r9d movl $0x2, %r8d testb %r9b, %r9b jne 0x2011e cmpq $0x8, %rsi jb 0x1fff6 movabsq $0x6e694d5964694d78, %r8 # imm = 0x6E694D5964694D78 addq $0x13f80000, %r8 # imm = 0x13F80000 cmpq (%rdx), %r8 je 0x2020a xorl %r9d, %r9d movl $0x3, %r8d testb %r9b, %r9b jne 0x2011e cmpq $0x8, %rsi jb 0x20028 movabsq $0x64694d5964694d78, %r8 # imm = 0x64694D5964694D78 orq $0xa000000, %r8 # imm = 0xA000000 cmpq (%rdx), %r8 je 0x2021a xorl %r9d, %r9d movl $0x4, %r8d testb %r9b, %r9b jne 0x2011e cmpq $0x8, %rsi jb 0x20053 movabsq $0x64694d5964694d78, %r8 # imm = 0x64694D5964694D78 cmpq %r8, (%rdx) je 0x2022a xorl %r9d, %r9d movl $0x5, %r8d testb %r9b, %r9b jne 0x2011e cmpq $0x8, %rsi jb 0x20085 movabsq $0x64694d5964694d78, %r8 # imm = 0x64694D5964694D78 addq $0x13f80000, %r8 # imm = 0x13F80000 cmpq (%rdx), %r8 je 0x2023a xorl %r9d, %r9d movl $0x6, %r8d testb %r9b, %r9b jne 0x2011e cmpq $0x8, %rsi jb 0x200b7 movabsq $0x78614d5964694d78, %r8 # imm = 0x78614D5964694D78 orq $0xa000000, %r8 # imm = 0xA000000 cmpq (%rdx), %r8 je 0x2024a xorl %r9d, %r9d movl $0x7, %r8d testb %r9b, %r9b jne 0x2011e cmpq $0x8, %rsi jb 0x200de movabsq $0x78614d5964694d78, %r8 # imm = 0x78614D5964694D78 cmpq %r8, (%rdx) je 0x2025d xorl %r9d, %r9d movl $0x8, %r8d testb %r9b, %r9b jne 0x2011e cmpq $0x8, %rsi jb 0x2010c movabsq $0x78614d5964694d78, %r8 # imm = 0x78614D5964694D78 addq $0x13f80000, %r8 # imm = 0x13F80000 cmpq (%rdx), %r8 je 0x2026d xorl %r9d, %r9d movl $0x9, %r8d testb %r9b, %r9b je 0x2025a testq %rsi, %rsi je 0x20144 leaq (%rdx,%rsi), %r9 movzbl (%rdx), %r10d cmpq $0x20, %r10 ja 0x20144 btq %r10, %rcx jae 0x20144 incq %rdx decq %rsi jne 0x20127 xorl %esi, %esi movq %r9, %rdx xorl %r9d, %r9d cmpq $0x4, %rsi jb 0x20159 cmpl $0x7465656d, (%rdx) # imm = 0x7465656D je 0x201da xorl %r10d, %r10d cmpq $0x5, %rsi setb %r11b orb %r10b, %r11b jne 0x2018e movl $0x63696c73, %r10d # imm = 0x63696C73 xorl (%rdx), %r10d movzbl 0x4(%rdx), %r11d xorl $0x65, %r11d orl %r10d, %r11d jne 0x2018e addq $0x5, %rdx addq $-0x5, %rsi movl $0x1, %r9d xorl %r10d, %r10d testb %al, %al cmovel %r9d, %r10d testq %rsi, %rsi je 0x201ba xorl %r9d, %r9d xorl %eax, %eax movzbl (%rdx,%r9), %r11d cmpq $0x20, %r11 ja 0x201bc btq %r11, %rcx jae 0x201bc incq %r9 cmpq %r9, %rsi jne 0x201a1 movb $0x1, %al testb %al, %al je 0x201ca movl %r8d, 0xc(%rdi) movl %r10d, 0x10(%rdi) movb $0x1, %al retq addq $0x4, %rdx addq $-0x4, %rsi movb $0x1, %al jmp 0x1ff71 addq $0x4, %rdx addq $-0x4, %rsi movb $0x1, %r10b jmp 0x2015c addq $0x8, %rdx addq $-0x8, %rsi movb $0x1, %r9b jmp 0x1ff9c addq $0x8, %rdx addq $-0x8, %rsi movb $0x1, %r9b jmp 0x1ffc7 addq $0x8, %rdx addq $-0x8, %rsi movb $0x1, %r9b jmp 0x1fff9 addq $0x8, %rdx addq $-0x8, %rsi movb $0x1, %r9b jmp 0x2002b addq $0x8, %rdx addq $-0x8, %rsi movb $0x1, %r9b jmp 0x20056 addq $0x8, %rdx addq $-0x8, %rsi movb $0x1, %r9b jmp 0x20088 addq $0x8, %rdx addq $-0x8, %rsi movb $0x1, %r9b jmp 0x200ba xorl %eax, %eax retq addq $0x8, %rdx addq $-0x8, %rsi movb $0x1, %r9b jmp 0x200e1 addq $0x8, %rdx addq $-0x8, %rsi movb $0x1, %r9b jmp 0x2010f nop
_ZN7lunasvg22SVGPreserveAspectRatio5parseESt17basic_string_viewIcSt11char_traitsIcEE: mov rcx, 100002600h test rsi, rsi jz short loc_1FF5A lea rax, [rdx+rsi] loc_1FF3D: movzx r8d, byte ptr [rdx] cmp r8, 20h ; ' ' ja short loc_1FF5A bt rcx, r8 jnb short loc_1FF5A inc rdx dec rsi jnz short loc_1FF3D xor esi, esi mov rdx, rax loc_1FF5A: xor r8d, r8d cmp rsi, 4 jb short loc_1FF6F cmp dword ptr [rdx], 656E6F6Eh jz loc_201CB loc_1FF6F: xor eax, eax loc_1FF71: test al, al jnz loc_2011E cmp rsi, 8 jb short loc_1FF99 mov r8, 6E694D5964694D78h or r8, 0A000000h cmp r8, [rdx] jz loc_201EA loc_1FF99: xor r9d, r9d loc_1FF9C: mov r8d, 1 test r9b, r9b jnz loc_2011E cmp rsi, 8 jb short loc_1FFC4 mov r8, 6E694D5964694D78h cmp [rdx], r8 jz loc_201FA loc_1FFC4: xor r9d, r9d loc_1FFC7: mov r8d, 2 test r9b, r9b jnz loc_2011E cmp rsi, 8 jb short loc_1FFF6 mov r8, 6E694D5964694D78h add r8, 13F80000h cmp r8, [rdx] jz loc_2020A loc_1FFF6: xor r9d, r9d loc_1FFF9: mov r8d, 3 test r9b, r9b jnz loc_2011E cmp rsi, 8 jb short loc_20028 mov r8, 64694D5964694D78h or r8, 0A000000h cmp r8, [rdx] jz loc_2021A loc_20028: xor r9d, r9d loc_2002B: mov r8d, 4 test r9b, r9b jnz loc_2011E cmp rsi, 8 jb short loc_20053 mov r8, 64694D5964694D78h cmp [rdx], r8 jz loc_2022A loc_20053: xor r9d, r9d loc_20056: mov r8d, 5 test r9b, r9b jnz loc_2011E cmp rsi, 8 jb short loc_20085 mov r8, 64694D5964694D78h add r8, 13F80000h cmp r8, [rdx] jz loc_2023A loc_20085: xor r9d, r9d loc_20088: mov r8d, 6 test r9b, r9b jnz loc_2011E cmp rsi, 8 jb short loc_200B7 mov r8, 78614D5964694D78h or r8, 0A000000h cmp r8, [rdx] jz loc_2024A loc_200B7: xor r9d, r9d loc_200BA: mov r8d, 7 test r9b, r9b jnz short loc_2011E cmp rsi, 8 jb short loc_200DE mov r8, 78614D5964694D78h cmp [rdx], r8 jz loc_2025D loc_200DE: xor r9d, r9d loc_200E1: mov r8d, 8 test r9b, r9b jnz short loc_2011E cmp rsi, 8 jb short loc_2010C mov r8, 78614D5964694D78h add r8, 13F80000h cmp r8, [rdx] jz loc_2026D loc_2010C: xor r9d, r9d loc_2010F: mov r8d, 9 test r9b, r9b jz loc_2025A loc_2011E: test rsi, rsi jz short loc_20144 lea r9, [rdx+rsi] loc_20127: movzx r10d, byte ptr [rdx] cmp r10, 20h ; ' ' ja short loc_20144 bt rcx, r10 jnb short loc_20144 inc rdx dec rsi jnz short loc_20127 xor esi, esi mov rdx, r9 loc_20144: xor r9d, r9d cmp rsi, 4 jb short loc_20159 cmp dword ptr [rdx], 7465656Dh jz loc_201DA loc_20159: xor r10d, r10d loc_2015C: cmp rsi, 5 setb r11b or r11b, r10b jnz short loc_2018E mov r10d, 63696C73h xor r10d, [rdx] movzx r11d, byte ptr [rdx+4] xor r11d, 65h or r11d, r10d jnz short loc_2018E add rdx, 5 add rsi, 0FFFFFFFFFFFFFFFBh mov r9d, 1 loc_2018E: xor r10d, r10d test al, al cmovz r10d, r9d test rsi, rsi jz short loc_201BA xor r9d, r9d xor eax, eax loc_201A1: movzx r11d, byte ptr [rdx+r9] cmp r11, 20h ; ' ' ja short loc_201BC bt rcx, r11 jnb short loc_201BC inc r9 cmp rsi, r9 jnz short loc_201A1 loc_201BA: mov al, 1 loc_201BC: test al, al jz short locret_201CA mov [rdi+0Ch], r8d mov [rdi+10h], r10d mov al, 1 locret_201CA: retn loc_201CB: add rdx, 4 add rsi, 0FFFFFFFFFFFFFFFCh mov al, 1 jmp loc_1FF71 loc_201DA: add rdx, 4 add rsi, 0FFFFFFFFFFFFFFFCh mov r10b, 1 jmp loc_2015C loc_201EA: add rdx, 8 add rsi, 0FFFFFFFFFFFFFFF8h mov r9b, 1 jmp loc_1FF9C loc_201FA: add rdx, 8 add rsi, 0FFFFFFFFFFFFFFF8h mov r9b, 1 jmp loc_1FFC7 loc_2020A: add rdx, 8 add rsi, 0FFFFFFFFFFFFFFF8h mov r9b, 1 jmp loc_1FFF9 loc_2021A: add rdx, 8 add rsi, 0FFFFFFFFFFFFFFF8h mov r9b, 1 jmp loc_2002B loc_2022A: add rdx, 8 add rsi, 0FFFFFFFFFFFFFFF8h mov r9b, 1 jmp loc_20056 loc_2023A: add rdx, 8 add rsi, 0FFFFFFFFFFFFFFF8h mov r9b, 1 jmp loc_20088 loc_2024A: add rdx, 8 add rsi, 0FFFFFFFFFFFFFFF8h mov r9b, 1 jmp loc_200BA loc_2025A: xor eax, eax retn loc_2025D: add rdx, 8 add rsi, 0FFFFFFFFFFFFFFF8h mov r9b, 1 jmp loc_200E1 loc_2026D: add rdx, 8 add rsi, 0FFFFFFFFFFFFFFF8h mov r9b, 1 jmp loc_2010F
char lunasvg::SVGPreserveAspectRatio::parse(long long a1, unsigned long long a2, unsigned __int8 *a3) { long long v3; // rcx unsigned __int8 *v4; // rax unsigned long long v5; // r8 int v6; // r8d char v7; // al char v8; // r9 char v9; // r9 char v10; // r9 char v11; // r9 char v12; // r9 char v13; // r9 char v14; // r9 char v15; // r9 char v16; // r9 unsigned __int8 *v17; // r9 unsigned long long v18; // r10 int v19; // r9d char v20; // r10 int v21; // r10d long long v22; // r9 char result; // al unsigned long long v24; // r11 v3 = 0x100002600LL; if ( a2 ) { v4 = &a3[a2]; while ( 1 ) { v5 = *a3; if ( v5 > 0x20 || !_bittest64(&v3, v5) ) break; ++a3; if ( !--a2 ) { a2 = 0LL; a3 = v4; break; } } } v6 = 0; if ( a2 >= 4 && *(_DWORD *)a3 == 1701736302 ) { a3 += 4; a2 -= 4LL; v7 = 1; } else { v7 = 0; } if ( !v7 ) { if ( a2 >= 8 && *(_QWORD *)a3 == 0x6E694D596E694D78LL ) { a3 += 8; a2 -= 8LL; v8 = 1; } else { v8 = 0; } v6 = 1; if ( !v8 ) { if ( a2 >= 8 && *(_QWORD *)a3 == 0x6E694D5964694D78LL ) { a3 += 8; a2 -= 8LL; v9 = 1; } else { v9 = 0; } v6 = 2; if ( !v9 ) { if ( a2 >= 8 && *(_QWORD *)a3 == 0x6E694D5978614D78LL ) { a3 += 8; a2 -= 8LL; v10 = 1; } else { v10 = 0; } v6 = 3; if ( !v10 ) { if ( a2 >= 8 && *(_QWORD *)a3 == 0x64694D596E694D78LL ) { a3 += 8; a2 -= 8LL; v11 = 1; } else { v11 = 0; } v6 = 4; if ( !v11 ) { if ( a2 >= 8 && *(_QWORD *)a3 == 0x64694D5964694D78LL ) { a3 += 8; a2 -= 8LL; v12 = 1; } else { v12 = 0; } v6 = 5; if ( !v12 ) { if ( a2 >= 8 && *(_QWORD *)a3 == 0x64694D5978614D78LL ) { a3 += 8; a2 -= 8LL; v13 = 1; } else { v13 = 0; } v6 = 6; if ( !v13 ) { if ( a2 >= 8 && *(_QWORD *)a3 == 0x78614D596E694D78LL ) { a3 += 8; a2 -= 8LL; v14 = 1; } else { v14 = 0; } v6 = 7; if ( !v14 ) { if ( a2 >= 8 && *(_QWORD *)a3 == 0x78614D5964694D78LL ) { a3 += 8; a2 -= 8LL; v15 = 1; } else { v15 = 0; } v6 = 8; if ( !v15 ) { if ( a2 >= 8 && *(_QWORD *)a3 == 0x78614D5978614D78LL ) { a3 += 8; a2 -= 8LL; v16 = 1; } else { v16 = 0; } v6 = 9; if ( !v16 ) return 0; } } } } } } } } } if ( a2 ) { v17 = &a3[a2]; while ( 1 ) { v18 = *a3; if ( v18 > 0x20 || !_bittest64(&v3, v18) ) break; ++a3; if ( !--a2 ) { a2 = 0LL; a3 = v17; break; } } } v19 = 0; if ( a2 >= 4 && *(_DWORD *)a3 == 1952802157 ) { a3 += 4; a2 -= 4LL; v20 = 1; } else { v20 = 0; } if ( !((unsigned __int8)v20 | (a2 < 5)) && !(*(_DWORD *)a3 ^ 0x63696C73 | a3[4] ^ 0x65) ) { a3 += 5; a2 -= 5LL; v19 = 1; } v21 = 0; if ( !v7 ) v21 = v19; if ( a2 ) { v22 = 0LL; result = 0; while ( 1 ) { v24 = a3[v22]; if ( v24 > 0x20 || !_bittest64(&v3, v24) ) break; if ( a2 == ++v22 ) goto LABEL_66; } } else { LABEL_66: result = 1; } if ( result ) { *(_DWORD *)(a1 + 12) = v6; *(_DWORD *)(a1 + 16) = v21; return 1; } return result; }
parse: MOV RCX,0x100002600 TEST RSI,RSI JZ 0x0011ff5a LEA RAX,[RDX + RSI*0x1] LAB_0011ff3d: MOVZX R8D,byte ptr [RDX] CMP R8,0x20 JA 0x0011ff5a BT RCX,R8 JNC 0x0011ff5a INC RDX DEC RSI JNZ 0x0011ff3d XOR ESI,ESI MOV RDX,RAX LAB_0011ff5a: XOR R8D,R8D CMP RSI,0x4 JC 0x0011ff6f CMP dword ptr [RDX],0x656e6f6e JZ 0x001201cb LAB_0011ff6f: XOR EAX,EAX LAB_0011ff71: TEST AL,AL JNZ 0x0012011e CMP RSI,0x8 JC 0x0011ff99 MOV R8,0x6e694d5964694d78 OR R8,0xa000000 CMP R8,qword ptr [RDX] JZ 0x001201ea LAB_0011ff99: XOR R9D,R9D LAB_0011ff9c: MOV R8D,0x1 TEST R9B,R9B JNZ 0x0012011e CMP RSI,0x8 JC 0x0011ffc4 MOV R8,0x6e694d5964694d78 CMP qword ptr [RDX],R8 JZ 0x001201fa LAB_0011ffc4: XOR R9D,R9D LAB_0011ffc7: MOV R8D,0x2 TEST R9B,R9B JNZ 0x0012011e CMP RSI,0x8 JC 0x0011fff6 MOV R8,0x6e694d5964694d78 ADD R8,0x13f80000 CMP R8,qword ptr [RDX] JZ 0x0012020a LAB_0011fff6: XOR R9D,R9D LAB_0011fff9: MOV R8D,0x3 TEST R9B,R9B JNZ 0x0012011e CMP RSI,0x8 JC 0x00120028 MOV R8,0x64694d5964694d78 OR R8,0xa000000 CMP R8,qword ptr [RDX] JZ 0x0012021a LAB_00120028: XOR R9D,R9D LAB_0012002b: MOV R8D,0x4 TEST R9B,R9B JNZ 0x0012011e CMP RSI,0x8 JC 0x00120053 MOV R8,0x64694d5964694d78 CMP qword ptr [RDX],R8 JZ 0x0012022a LAB_00120053: XOR R9D,R9D LAB_00120056: MOV R8D,0x5 TEST R9B,R9B JNZ 0x0012011e CMP RSI,0x8 JC 0x00120085 MOV R8,0x64694d5964694d78 ADD R8,0x13f80000 CMP R8,qword ptr [RDX] JZ 0x0012023a LAB_00120085: XOR R9D,R9D LAB_00120088: MOV R8D,0x6 TEST R9B,R9B JNZ 0x0012011e CMP RSI,0x8 JC 0x001200b7 MOV R8,0x78614d5964694d78 OR R8,0xa000000 CMP R8,qword ptr [RDX] JZ 0x0012024a LAB_001200b7: XOR R9D,R9D LAB_001200ba: MOV R8D,0x7 TEST R9B,R9B JNZ 0x0012011e CMP RSI,0x8 JC 0x001200de MOV R8,0x78614d5964694d78 CMP qword ptr [RDX],R8 JZ 0x0012025d LAB_001200de: XOR R9D,R9D LAB_001200e1: MOV R8D,0x8 TEST R9B,R9B JNZ 0x0012011e CMP RSI,0x8 JC 0x0012010c MOV R8,0x78614d5964694d78 ADD R8,0x13f80000 CMP R8,qword ptr [RDX] JZ 0x0012026d LAB_0012010c: XOR R9D,R9D LAB_0012010f: MOV R8D,0x9 TEST R9B,R9B JZ 0x0012025a LAB_0012011e: TEST RSI,RSI JZ 0x00120144 LEA R9,[RDX + RSI*0x1] LAB_00120127: MOVZX R10D,byte ptr [RDX] CMP R10,0x20 JA 0x00120144 BT RCX,R10 JNC 0x00120144 INC RDX DEC RSI JNZ 0x00120127 XOR ESI,ESI MOV RDX,R9 LAB_00120144: XOR R9D,R9D CMP RSI,0x4 JC 0x00120159 CMP dword ptr [RDX],0x7465656d JZ 0x001201da LAB_00120159: XOR R10D,R10D LAB_0012015c: CMP RSI,0x5 SETC R11B OR R11B,R10B JNZ 0x0012018e MOV R10D,0x63696c73 XOR R10D,dword ptr [RDX] MOVZX R11D,byte ptr [RDX + 0x4] XOR R11D,0x65 OR R11D,R10D JNZ 0x0012018e ADD RDX,0x5 ADD RSI,-0x5 MOV R9D,0x1 LAB_0012018e: XOR R10D,R10D TEST AL,AL CMOVZ R10D,R9D TEST RSI,RSI JZ 0x001201ba XOR R9D,R9D XOR EAX,EAX LAB_001201a1: MOVZX R11D,byte ptr [RDX + R9*0x1] CMP R11,0x20 JA 0x001201bc BT RCX,R11 JNC 0x001201bc INC R9 CMP RSI,R9 JNZ 0x001201a1 LAB_001201ba: MOV AL,0x1 LAB_001201bc: TEST AL,AL JZ 0x001201ca MOV dword ptr [RDI + 0xc],R8D MOV dword ptr [RDI + 0x10],R10D MOV AL,0x1 LAB_001201ca: RET LAB_001201cb: ADD RDX,0x4 ADD RSI,-0x4 MOV AL,0x1 JMP 0x0011ff71 LAB_001201da: ADD RDX,0x4 ADD RSI,-0x4 MOV R10B,0x1 JMP 0x0012015c LAB_001201ea: ADD RDX,0x8 ADD RSI,-0x8 MOV R9B,0x1 JMP 0x0011ff9c LAB_001201fa: ADD RDX,0x8 ADD RSI,-0x8 MOV R9B,0x1 JMP 0x0011ffc7 LAB_0012020a: ADD RDX,0x8 ADD RSI,-0x8 MOV R9B,0x1 JMP 0x0011fff9 LAB_0012021a: ADD RDX,0x8 ADD RSI,-0x8 MOV R9B,0x1 JMP 0x0012002b LAB_0012022a: ADD RDX,0x8 ADD RSI,-0x8 MOV R9B,0x1 JMP 0x00120056 LAB_0012023a: ADD RDX,0x8 ADD RSI,-0x8 MOV R9B,0x1 JMP 0x00120088 LAB_0012024a: ADD RDX,0x8 ADD RSI,-0x8 MOV R9B,0x1 JMP 0x001200ba LAB_0012025a: XOR EAX,EAX RET LAB_0012025d: ADD RDX,0x8 ADD RSI,-0x8 MOV R9B,0x1 JMP 0x001200e1 LAB_0012026d: ADD RDX,0x8 ADD RSI,-0x8 MOV R9B,0x1 JMP 0x0012010f
/* lunasvg::SVGPreserveAspectRatio::parse(std::basic_string_view<char, std::char_traits<char> >) */ int8 lunasvg::SVGPreserveAspectRatio::parse(long param_1,ulong param_2,byte *param_3) { byte *pbVar1; bool bVar2; byte *in_RAX; int8 uVar3; int4 uVar4; int4 uVar5; ulong uVar6; int4 uVar7; if (param_2 != 0) { in_RAX = param_3 + param_2; do { if ((0x20 < (ulong)*param_3) || ((0x100002600U >> ((ulong)*param_3 & 0x3f) & 1) == 0)) goto LAB_0011ff5a; param_3 = param_3 + 1; param_2 = param_2 - 1; } while (param_2 != 0); param_2 = 0; param_3 = in_RAX; } LAB_0011ff5a: uVar4 = 0; if ((param_2 < 4) || (*(int *)param_3 != 0x656e6f6e)) { uVar3 = 0; } else { param_3 = param_3 + 4; param_2 = param_2 - 4; uVar3 = CONCAT71((int7)((ulong)in_RAX >> 8),1); } if ((char)uVar3 == '\0') { if ((param_2 < 8) || (*(long *)param_3 != 0x6e694d596e694d78)) { bVar2 = false; } else { param_3 = param_3 + 8; param_2 = param_2 - 8; bVar2 = true; } uVar4 = 1; if (!bVar2) { if ((param_2 < 8) || (*(long *)param_3 != 0x6e694d5964694d78)) { bVar2 = false; } else { param_3 = param_3 + 8; param_2 = param_2 - 8; bVar2 = true; } uVar4 = 2; if (!bVar2) { if ((param_2 < 8) || (*(long *)param_3 != 0x6e694d5978614d78)) { bVar2 = false; } else { param_3 = param_3 + 8; param_2 = param_2 - 8; bVar2 = true; } uVar4 = 3; if (!bVar2) { if ((param_2 < 8) || (*(long *)param_3 != 0x64694d596e694d78)) { bVar2 = false; } else { param_3 = param_3 + 8; param_2 = param_2 - 8; bVar2 = true; } uVar4 = 4; if (!bVar2) { if ((param_2 < 8) || (*(long *)param_3 != 0x64694d5964694d78)) { bVar2 = false; } else { param_3 = param_3 + 8; param_2 = param_2 - 8; bVar2 = true; } uVar4 = 5; if (!bVar2) { if ((param_2 < 8) || (*(long *)param_3 != 0x64694d5978614d78)) { bVar2 = false; } else { param_3 = param_3 + 8; param_2 = param_2 - 8; bVar2 = true; } uVar4 = 6; if (!bVar2) { if ((param_2 < 8) || (*(long *)param_3 != 0x78614d596e694d78)) { bVar2 = false; } else { param_3 = param_3 + 8; param_2 = param_2 - 8; bVar2 = true; } uVar4 = 7; if (!bVar2) { if ((param_2 < 8) || (*(long *)param_3 != 0x78614d5964694d78)) { bVar2 = false; } else { param_3 = param_3 + 8; param_2 = param_2 - 8; bVar2 = true; } uVar4 = 8; if (!bVar2) { if ((param_2 < 8) || (*(long *)param_3 != 0x78614d5978614d78)) { bVar2 = false; } else { param_3 = param_3 + 8; param_2 = param_2 - 8; bVar2 = true; } uVar4 = 9; if (!bVar2) { return 0; } } } } } } } } } } if (param_2 != 0) { pbVar1 = param_3 + param_2; do { if ((0x20 < (ulong)*param_3) || ((0x100002600U >> ((ulong)*param_3 & 0x3f) & 1) == 0)) goto LAB_00120144; param_3 = param_3 + 1; param_2 = param_2 - 1; } while (param_2 != 0); param_2 = 0; param_3 = pbVar1; } LAB_00120144: if ((param_2 < 4) || (*(int *)param_3 != 0x7465656d)) { bVar2 = false; } else { param_3 = param_3 + 4; param_2 = param_2 - 4; bVar2 = true; } uVar5 = 0; if ((4 < param_2 && !bVar2) && (uVar5 = 0, param_3[4] == 0x65 && *(int *)param_3 == 0x63696c73)) { param_3 = param_3 + 5; param_2 = param_2 - 5; uVar5 = 1; } uVar7 = 0; if ((char)uVar3 == '\0') { uVar7 = uVar5; } if (param_2 != 0) { uVar6 = 0; uVar3 = 0; do { if ((0x20 < (ulong)param_3[uVar6]) || ((0x100002600U >> ((ulong)param_3[uVar6] & 0x3f) & 1) == 0)) goto LAB_001201bc; uVar6 = uVar6 + 1; } while (param_2 != uVar6); } uVar3 = CONCAT71((int7)((ulong)uVar3 >> 8),1); LAB_001201bc: if ((char)uVar3 != '\0') { *(int4 *)(param_1 + 0xc) = uVar4; *(int4 *)(param_1 + 0x10) = uVar7; uVar3 = CONCAT71((int7)((ulong)uVar3 >> 8),1); } return uVar3; }
51,417
google::protobuf::stringpiece_internal::operator==(google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/stubs/stringpiece.h
inline bool operator==(StringPiece x, StringPiece y) { StringPiece::size_type len = x.size(); if (len != y.size()) { return false; } return x.data() == y.data() || len <= 0 || memcmp(x.data(), y.data(), static_cast<size_t>(len)) == 0; }
O0
c
google::protobuf::stringpiece_internal::operator==(google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece): subq $0x58, %rsp movq %rdi, 0x40(%rsp) movq %rsi, 0x48(%rsp) movq %rdx, 0x30(%rsp) movq %rcx, 0x38(%rsp) leaq 0x40(%rsp), %rdi callq 0x24080 movq %rax, 0x28(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x20(%rsp) leaq 0x30(%rsp), %rdi callq 0x24080 movq %rax, %rcx movq 0x20(%rsp), %rax cmpq %rcx, %rax je 0x7359f movb $0x0, 0x57(%rsp) jmp 0x73618 leaq 0x40(%rsp), %rdi callq 0x24070 movq %rax, 0x10(%rsp) leaq 0x30(%rsp), %rdi callq 0x24070 movq 0x10(%rsp), %rcx movq %rax, %rdx movb $0x1, %al cmpq %rdx, %rcx movb %al, 0x1f(%rsp) je 0x7360e movb $0x1, %al cmpq $0x0, 0x28(%rsp) movb %al, 0x1f(%rsp) jbe 0x7360e leaq 0x40(%rsp), %rdi callq 0x24070 movq %rax, 0x8(%rsp) leaq 0x30(%rsp), %rdi callq 0x24070 movq 0x8(%rsp), %rdi movq %rax, %rsi movq 0x28(%rsp), %rdx callq 0x131c0 cmpl $0x0, %eax sete %al movb %al, 0x1f(%rsp) movb 0x1f(%rsp), %al andb $0x1, %al movb %al, 0x57(%rsp) movb 0x57(%rsp), %al andb $0x1, %al addq $0x58, %rsp retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZN6google8protobuf20stringpiece_internaleqENS1_11StringPieceES2_: sub rsp, 58h mov [rsp+58h+var_18], rdi mov [rsp+58h+var_10], rsi mov [rsp+58h+var_28], rdx mov [rsp+58h+var_20], rcx lea rdi, [rsp+58h+var_18]; this call _ZNK6google8protobuf20stringpiece_internal11StringPiece4sizeEv; google::protobuf::stringpiece_internal::StringPiece::size(void) mov [rsp+58h+var_30], rax mov rax, [rsp+58h+var_30] mov [rsp+58h+var_38], rax lea rdi, [rsp+58h+var_28]; this call _ZNK6google8protobuf20stringpiece_internal11StringPiece4sizeEv; google::protobuf::stringpiece_internal::StringPiece::size(void) mov rcx, rax mov rax, [rsp+58h+var_38] cmp rax, rcx jz short loc_7359F mov [rsp+58h+var_1], 0 jmp short loc_73618 loc_7359F: lea rdi, [rsp+58h+var_18]; this call _ZNK6google8protobuf20stringpiece_internal11StringPiece4dataEv; google::protobuf::stringpiece_internal::StringPiece::data(void) mov [rsp+58h+var_48], rax lea rdi, [rsp+58h+var_28]; this call _ZNK6google8protobuf20stringpiece_internal11StringPiece4dataEv; google::protobuf::stringpiece_internal::StringPiece::data(void) mov rcx, [rsp+58h+var_48] mov rdx, rax mov al, 1 cmp rcx, rdx mov [rsp+58h+var_39], al jz short loc_7360E mov al, 1 cmp [rsp+58h+var_30], 0 mov [rsp+58h+var_39], al jbe short loc_7360E lea rdi, [rsp+58h+var_18]; this call _ZNK6google8protobuf20stringpiece_internal11StringPiece4dataEv; google::protobuf::stringpiece_internal::StringPiece::data(void) mov [rsp+58h+var_50], rax lea rdi, [rsp+58h+var_28]; this call _ZNK6google8protobuf20stringpiece_internal11StringPiece4dataEv; google::protobuf::stringpiece_internal::StringPiece::data(void) mov rdi, [rsp+58h+var_50] mov rsi, rax mov rdx, [rsp+58h+var_30] call _memcmp cmp eax, 0 setz al mov [rsp+58h+var_39], al loc_7360E: mov al, [rsp+58h+var_39] and al, 1 mov [rsp+58h+var_1], al loc_73618: mov al, [rsp+58h+var_1] and al, 1 add rsp, 58h retn
bool google::protobuf::stringpiece_internal::operator==(long long a1, long long a2, long long a3, long long a4) { long long v4; // rax long long v6; // [rsp+8h] [rbp-50h] long long v7; // [rsp+10h] [rbp-48h] bool v8; // [rsp+1Fh] [rbp-39h] long long v9; // [rsp+28h] [rbp-30h] _QWORD v10[2]; // [rsp+30h] [rbp-28h] BYREF _QWORD v11[2]; // [rsp+40h] [rbp-18h] BYREF v11[0] = a1; v11[1] = a2; v10[0] = a3; v10[1] = a4; v9 = google::protobuf::stringpiece_internal::StringPiece::size((google::protobuf::stringpiece_internal::StringPiece *)v11); if ( v9 != google::protobuf::stringpiece_internal::StringPiece::size((google::protobuf::stringpiece_internal::StringPiece *)v10) ) return 0; v7 = google::protobuf::stringpiece_internal::StringPiece::data((google::protobuf::stringpiece_internal::StringPiece *)v11); v8 = 1; if ( v7 != google::protobuf::stringpiece_internal::StringPiece::data((google::protobuf::stringpiece_internal::StringPiece *)v10) ) { v8 = 1; if ( v9 ) { v6 = google::protobuf::stringpiece_internal::StringPiece::data((google::protobuf::stringpiece_internal::StringPiece *)v11); v4 = google::protobuf::stringpiece_internal::StringPiece::data((google::protobuf::stringpiece_internal::StringPiece *)v10); return (unsigned int)memcmp(v6, v4, v9) == 0; } } return v8; }
operator==: SUB RSP,0x58 MOV qword ptr [RSP + 0x40],RDI MOV qword ptr [RSP + 0x48],RSI MOV qword ptr [RSP + 0x30],RDX MOV qword ptr [RSP + 0x38],RCX LEA RDI,[RSP + 0x40] CALL 0x00124080 MOV qword ptr [RSP + 0x28],RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x20],RAX LEA RDI,[RSP + 0x30] CALL 0x00124080 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x20] CMP RAX,RCX JZ 0x0017359f MOV byte ptr [RSP + 0x57],0x0 JMP 0x00173618 LAB_0017359f: LEA RDI,[RSP + 0x40] CALL 0x00124070 MOV qword ptr [RSP + 0x10],RAX LEA RDI,[RSP + 0x30] CALL 0x00124070 MOV RCX,qword ptr [RSP + 0x10] MOV RDX,RAX MOV AL,0x1 CMP RCX,RDX MOV byte ptr [RSP + 0x1f],AL JZ 0x0017360e MOV AL,0x1 CMP qword ptr [RSP + 0x28],0x0 MOV byte ptr [RSP + 0x1f],AL JBE 0x0017360e LEA RDI,[RSP + 0x40] CALL 0x00124070 MOV qword ptr [RSP + 0x8],RAX LEA RDI,[RSP + 0x30] CALL 0x00124070 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,RAX MOV RDX,qword ptr [RSP + 0x28] CALL 0x001131c0 CMP EAX,0x0 SETZ AL MOV byte ptr [RSP + 0x1f],AL LAB_0017360e: MOV AL,byte ptr [RSP + 0x1f] AND AL,0x1 MOV byte ptr [RSP + 0x57],AL LAB_00173618: MOV AL,byte ptr [RSP + 0x57] AND AL,0x1 ADD RSP,0x58 RET
/* google::protobuf::stringpiece_internal::TEMPNAMEPLACEHOLDERVALUE(google::protobuf::stringpiece_internal::StringPiece, google::protobuf::stringpiece_internal::StringPiece) */ bool google::protobuf::stringpiece_internal::operator== (int8 param_1,int8 param_2,int8 param_3,int8 param_4) { int iVar1; size_t __n; size_t sVar2; long lVar3; long lVar4; void *__s1; void *__s2; bool local_39; int8 local_28; int8 local_20; int8 local_18; int8 local_10; bool local_1; local_28 = param_3; local_20 = param_4; local_18 = param_1; local_10 = param_2; __n = StringPiece::size((StringPiece *)&local_18); sVar2 = StringPiece::size((StringPiece *)&local_28); if (__n == sVar2) { lVar3 = StringPiece::data((StringPiece *)&local_18); lVar4 = StringPiece::data((StringPiece *)&local_28); local_39 = true; if ((lVar3 != lVar4) && (local_39 = true, __n != 0)) { __s1 = (void *)StringPiece::data((StringPiece *)&local_18); __s2 = (void *)StringPiece::data((StringPiece *)&local_28); iVar1 = memcmp(__s1,__s2,__n); local_39 = iVar1 == 0; } local_1 = local_39; } else { local_1 = false; } return local_1; }
51,418
aria_read_index
eloqsql/storage/maria/ma_backup.c
int aria_read_index(File kfile, ARIA_TABLE_CAPABILITIES *cap, ulonglong block, uchar *buffer) { MARIA_SHARE share; int retry= 0; DBUG_ENTER("aria_read_index"); share.keypage_header= cap->keypage_header; share.block_size= cap->block_size; do { int error; size_t length; if ((length= my_pread(kfile, buffer, cap->block_size, block * cap->block_size, MYF(0))) != cap->block_size) { if (length == 0) DBUG_RETURN(HA_ERR_END_OF_FILE); if (length == (size_t) -1) DBUG_RETURN(my_errno ? my_errno : -1); /* Assume we got a half read; Do a re-read */ } /* If not transactional or key file header, there are no checksums */ if (!cap->online_backup_safe || block < cap->header_size/ cap->block_size) DBUG_RETURN(length == cap->block_size ? 0 : HA_ERR_CRASHED); if (length == cap->block_size) { length= _ma_get_page_used(&share, buffer); if (length > cap->block_size - CRC_SIZE) DBUG_RETURN(HA_ERR_CRASHED); error= maria_page_crc_check(buffer, block, &share, MARIA_NO_CRC_NORMAL_PAGE, (int) length); if (error != HA_ERR_WRONG_CRC) DBUG_RETURN(error); } my_sleep(100000); /* Sleep 0.1 seconds */ } while (retry < MAX_RETRY); DBUG_RETURN(HA_ERR_WRONG_CRC); }
O0
c
aria_read_index: pushq %rbp movq %rsp, %rbp subq $0xc90, %rsp # imm = 0xC90 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movl %edi, -0xc48(%rbp) movq %rsi, -0xc50(%rbp) movq %rdx, -0xc58(%rbp) movq %rcx, -0xc60(%rbp) movl $0x0, -0xc64(%rbp) movq -0xc50(%rbp), %rax movl 0x14(%rax), %eax movl %eax, -0x4fc(%rbp) movq -0xc50(%rbp), %rax movl 0x10(%rax), %eax movl %eax, -0x484(%rbp) movl -0xc48(%rbp), %edi movq -0xc60(%rbp), %rsi movq -0xc50(%rbp), %rax movl 0x10(%rax), %eax movl %eax, %edx movq -0xc58(%rbp), %rcx movq -0xc50(%rbp), %rax movl 0x10(%rax), %eax imulq %rax, %rcx xorl %eax, %eax movl %eax, %r8d callq 0xfa750 movq %rax, -0xc70(%rbp) movq -0xc50(%rbp), %rcx movl 0x10(%rcx), %ecx cmpq %rcx, %rax je 0x9d0db cmpq $0x0, -0xc70(%rbp) jne 0x9d096 jmp 0x9d087 movl $0x89, -0xc44(%rbp) jmp 0x9d23c cmpq $-0x1, -0xc70(%rbp) jne 0x9d0d9 jmp 0x9d0a2 callq 0xfc1b0 cmpl $0x0, (%rax) je 0x9d0bb callq 0xfc1b0 movl (%rax), %eax movl %eax, -0xc74(%rbp) jmp 0x9d0c8 movl $0xffffffff, %eax # imm = 0xFFFFFFFF movl %eax, -0xc74(%rbp) jmp 0x9d0c8 movl -0xc74(%rbp), %eax movl %eax, -0xc44(%rbp) jmp 0x9d23c jmp 0x9d0db movq -0xc50(%rbp), %rax cmpb $0x0, 0x1f(%rax) je 0x9d11e movq -0xc58(%rbp), %rax movq %rax, -0xc80(%rbp) movq -0xc50(%rbp), %rax movq (%rax), %rax movq -0xc50(%rbp), %rcx movl 0x10(%rcx), %ecx xorl %edx, %edx divq %rcx movq %rax, %rcx movq -0xc80(%rbp), %rax cmpq %rcx, %rax jae 0x9d14b jmp 0x9d120 movq -0xc70(%rbp), %rdx movq -0xc50(%rbp), %rax movl 0x10(%rax), %eax movl %eax, %esi movl $0x7e, %eax xorl %ecx, %ecx cmpq %rsi, %rdx cmovel %ecx, %eax movl %eax, -0xc44(%rbp) jmp 0x9d23c movq -0xc70(%rbp), %rax movq -0xc50(%rbp), %rcx movl 0x10(%rcx), %ecx cmpq %rcx, %rax jne 0x9d219 movq -0xc60(%rbp), %rax movl -0x4fc(%rbp), %ecx movzbl -0x1(%rax,%rcx), %eax movzwl %ax, %eax movq -0xc60(%rbp), %rcx movl -0x4fc(%rbp), %edx movzbl -0x2(%rcx,%rdx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax movl %eax, %eax movq %rax, -0xc70(%rbp) movq -0xc70(%rbp), %rax movq -0xc50(%rbp), %rcx movl 0x10(%rcx), %ecx subl $0x4, %ecx movl %ecx, %ecx cmpq %rcx, %rax jbe 0x9d1c9 jmp 0x9d1bd movl $0x7e, -0xc44(%rbp) jmp 0x9d23c movq -0xc60(%rbp), %rdi movq -0xc58(%rbp), %rsi movq -0xc70(%rbp), %rax movl %eax, %r8d leaq -0xc40(%rbp), %rdx movl $0xffffffff, %ecx # imm = 0xFFFFFFFF callq 0x3f500 movsbl %al, %eax movl %eax, -0xc68(%rbp) cmpl $0xb0, -0xc68(%rbp) je 0x9d217 jmp 0x9d209 movl -0xc68(%rbp), %eax movl %eax, -0xc44(%rbp) jmp 0x9d23c jmp 0x9d219 movl $0x186a0, %edi # imm = 0x186A0 callq 0xfaef0 cmpl $0xa, -0xc64(%rbp) jl 0x9d02d jmp 0x9d232 movl $0xb0, -0xc44(%rbp) movl -0xc44(%rbp), %eax movl %eax, -0xc84(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x9d269 movl -0xc84(%rbp), %eax addq $0xc90, %rsp # imm = 0xC90 popq %rbp retq callq 0x2a250 nop
aria_read_index: push rbp mov rbp, rsp sub rsp, 0C90h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_C48], edi mov [rbp+var_C50], rsi mov [rbp+var_C58], rdx mov [rbp+var_C60], rcx mov [rbp+var_C64], 0 mov rax, [rbp+var_C50] mov eax, [rax+14h] mov [rbp+var_4FC], eax mov rax, [rbp+var_C50] mov eax, [rax+10h] mov [rbp+var_484], eax loc_9D02D: mov edi, [rbp+var_C48] mov rsi, [rbp+var_C60] mov rax, [rbp+var_C50] mov eax, [rax+10h] mov edx, eax mov rcx, [rbp+var_C58] mov rax, [rbp+var_C50] mov eax, [rax+10h] imul rcx, rax xor eax, eax mov r8d, eax call my_pread mov [rbp+var_C70], rax mov rcx, [rbp+var_C50] mov ecx, [rcx+10h] cmp rax, rcx jz short loc_9D0DB cmp [rbp+var_C70], 0 jnz short loc_9D096 jmp short $+2 loc_9D087: mov [rbp+var_C44], 89h jmp loc_9D23C loc_9D096: cmp [rbp+var_C70], 0FFFFFFFFFFFFFFFFh jnz short loc_9D0D9 jmp short $+2 loc_9D0A2: call _my_thread_var cmp dword ptr [rax], 0 jz short loc_9D0BB call _my_thread_var mov eax, [rax] mov [rbp+var_C74], eax jmp short loc_9D0C8 loc_9D0BB: mov eax, 0FFFFFFFFh mov [rbp+var_C74], eax jmp short $+2 loc_9D0C8: mov eax, [rbp+var_C74] mov [rbp+var_C44], eax jmp loc_9D23C loc_9D0D9: jmp short $+2 loc_9D0DB: mov rax, [rbp+var_C50] cmp byte ptr [rax+1Fh], 0 jz short loc_9D11E mov rax, [rbp+var_C58] mov [rbp+var_C80], rax mov rax, [rbp+var_C50] mov rax, [rax] mov rcx, [rbp+var_C50] mov ecx, [rcx+10h] xor edx, edx div rcx mov rcx, rax mov rax, [rbp+var_C80] cmp rax, rcx jnb short loc_9D14B loc_9D11E: jmp short $+2 loc_9D120: mov rdx, [rbp+var_C70] mov rax, [rbp+var_C50] mov eax, [rax+10h] mov esi, eax mov eax, 7Eh ; '~' xor ecx, ecx cmp rdx, rsi cmovz eax, ecx mov [rbp+var_C44], eax jmp loc_9D23C loc_9D14B: mov rax, [rbp+var_C70] mov rcx, [rbp+var_C50] mov ecx, [rcx+10h] cmp rax, rcx jnz loc_9D219 mov rax, [rbp+var_C60] mov ecx, [rbp+var_4FC] movzx eax, byte ptr [rax+rcx-1] movzx eax, ax mov rcx, [rbp+var_C60] mov edx, [rbp+var_4FC] movzx ecx, byte ptr [rcx+rdx-2] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax mov eax, eax mov [rbp+var_C70], rax mov rax, [rbp+var_C70] mov rcx, [rbp+var_C50] mov ecx, [rcx+10h] sub ecx, 4 mov ecx, ecx cmp rax, rcx jbe short loc_9D1C9 jmp short $+2 loc_9D1BD: mov [rbp+var_C44], 7Eh ; '~' jmp short loc_9D23C loc_9D1C9: mov rdi, [rbp+var_C60] mov rsi, [rbp+var_C58] mov rax, [rbp+var_C70] mov r8d, eax lea rdx, [rbp+var_C40] mov ecx, 0FFFFFFFFh call maria_page_crc_check movsx eax, al mov [rbp+var_C68], eax cmp [rbp+var_C68], 0B0h jz short loc_9D217 jmp short $+2 loc_9D209: mov eax, [rbp+var_C68] mov [rbp+var_C44], eax jmp short loc_9D23C loc_9D217: jmp short $+2 loc_9D219: mov edi, 186A0h call my_sleep cmp [rbp+var_C64], 0Ah jl loc_9D02D jmp short $+2 loc_9D232: mov [rbp+var_C44], 0B0h loc_9D23C: mov eax, [rbp+var_C44] mov [rbp+var_C84], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_9D269 mov eax, [rbp+var_C84] add rsp, 0C90h pop rbp retn loc_9D269: call ___stack_chk_fail
long long aria_read_index(unsigned int a1, long long a2, unsigned long long a3, const char *a4) { unsigned int v4; // eax long long v7; // [rsp+20h] [rbp-C70h] unsigned int v8; // [rsp+20h] [rbp-C70h] _BYTE v12[1860]; // [rsp+50h] [rbp-C40h] BYREF int v13; // [rsp+794h] [rbp-4FCh] int v14; // [rsp+80Ch] [rbp-484h] unsigned long long v15; // [rsp+C88h] [rbp-8h] v15 = __readfsqword(0x28u); v13 = *(_DWORD *)(a2 + 20); v14 = *(_DWORD *)(a2 + 16); while ( 1 ) { v7 = my_pread(a1, a4, *(unsigned int *)(a2 + 16), *(unsigned int *)(a2 + 16) * a3, 0LL); if ( v7 != *(_DWORD *)(a2 + 16) ) { if ( !v7 ) return 137; if ( v7 == -1 ) { if ( *(_DWORD *)my_thread_var(a1, a4) ) return *(unsigned int *)my_thread_var(a1, a4); else return (unsigned int)-1; } } if ( !*(_BYTE *)(a2 + 31) || a3 < *(_QWORD *)a2 / (unsigned long long)*(unsigned int *)(a2 + 16) ) break; if ( v7 == *(_DWORD *)(a2 + 16) ) { v8 = _byteswap_ushort(*(_WORD *)&a4[v13 - 2]); if ( (unsigned __int16)v8 <= (unsigned long long)(unsigned int)(*(_DWORD *)(a2 + 16) - 4) ) return (unsigned int)maria_page_crc_check((long long)a4, a3, (long long)v12, -1, v8); else return 126; } my_sleep(100000LL, a4, *(_QWORD *)a2 % (unsigned long long)*(unsigned int *)(a2 + 16)); } v4 = 126; if ( v7 == *(_DWORD *)(a2 + 16) ) return 0; return v4; }
aria_read_index: PUSH RBP MOV RBP,RSP SUB RSP,0xc90 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0xc48],EDI MOV qword ptr [RBP + -0xc50],RSI MOV qword ptr [RBP + -0xc58],RDX MOV qword ptr [RBP + -0xc60],RCX MOV dword ptr [RBP + -0xc64],0x0 MOV RAX,qword ptr [RBP + -0xc50] MOV EAX,dword ptr [RAX + 0x14] MOV dword ptr [RBP + -0x4fc],EAX MOV RAX,qword ptr [RBP + -0xc50] MOV EAX,dword ptr [RAX + 0x10] MOV dword ptr [RBP + -0x484],EAX LAB_0019d02d: MOV EDI,dword ptr [RBP + -0xc48] MOV RSI,qword ptr [RBP + -0xc60] MOV RAX,qword ptr [RBP + -0xc50] MOV EAX,dword ptr [RAX + 0x10] MOV EDX,EAX MOV RCX,qword ptr [RBP + -0xc58] MOV RAX,qword ptr [RBP + -0xc50] MOV EAX,dword ptr [RAX + 0x10] IMUL RCX,RAX XOR EAX,EAX MOV R8D,EAX CALL 0x001fa750 MOV qword ptr [RBP + -0xc70],RAX MOV RCX,qword ptr [RBP + -0xc50] MOV ECX,dword ptr [RCX + 0x10] CMP RAX,RCX JZ 0x0019d0db CMP qword ptr [RBP + -0xc70],0x0 JNZ 0x0019d096 JMP 0x0019d087 LAB_0019d087: MOV dword ptr [RBP + -0xc44],0x89 JMP 0x0019d23c LAB_0019d096: CMP qword ptr [RBP + -0xc70],-0x1 JNZ 0x0019d0d9 JMP 0x0019d0a2 LAB_0019d0a2: CALL 0x001fc1b0 CMP dword ptr [RAX],0x0 JZ 0x0019d0bb CALL 0x001fc1b0 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0xc74],EAX JMP 0x0019d0c8 LAB_0019d0bb: MOV EAX,0xffffffff MOV dword ptr [RBP + -0xc74],EAX JMP 0x0019d0c8 LAB_0019d0c8: MOV EAX,dword ptr [RBP + -0xc74] MOV dword ptr [RBP + -0xc44],EAX JMP 0x0019d23c LAB_0019d0d9: JMP 0x0019d0db LAB_0019d0db: MOV RAX,qword ptr [RBP + -0xc50] CMP byte ptr [RAX + 0x1f],0x0 JZ 0x0019d11e MOV RAX,qword ptr [RBP + -0xc58] MOV qword ptr [RBP + -0xc80],RAX MOV RAX,qword ptr [RBP + -0xc50] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0xc50] MOV ECX,dword ptr [RCX + 0x10] XOR EDX,EDX DIV RCX MOV RCX,RAX MOV RAX,qword ptr [RBP + -0xc80] CMP RAX,RCX JNC 0x0019d14b LAB_0019d11e: JMP 0x0019d120 LAB_0019d120: MOV RDX,qword ptr [RBP + -0xc70] MOV RAX,qword ptr [RBP + -0xc50] MOV EAX,dword ptr [RAX + 0x10] MOV ESI,EAX MOV EAX,0x7e XOR ECX,ECX CMP RDX,RSI CMOVZ EAX,ECX MOV dword ptr [RBP + -0xc44],EAX JMP 0x0019d23c LAB_0019d14b: MOV RAX,qword ptr [RBP + -0xc70] MOV RCX,qword ptr [RBP + -0xc50] MOV ECX,dword ptr [RCX + 0x10] CMP RAX,RCX JNZ 0x0019d219 MOV RAX,qword ptr [RBP + -0xc60] MOV ECX,dword ptr [RBP + -0x4fc] MOVZX EAX,byte ptr [RAX + RCX*0x1 + -0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0xc60] MOV EDX,dword ptr [RBP + -0x4fc] MOVZX ECX,byte ptr [RCX + RDX*0x1 + -0x2] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX MOV EAX,EAX MOV qword ptr [RBP + -0xc70],RAX MOV RAX,qword ptr [RBP + -0xc70] MOV RCX,qword ptr [RBP + -0xc50] MOV ECX,dword ptr [RCX + 0x10] SUB ECX,0x4 MOV ECX,ECX CMP RAX,RCX JBE 0x0019d1c9 JMP 0x0019d1bd LAB_0019d1bd: MOV dword ptr [RBP + -0xc44],0x7e JMP 0x0019d23c LAB_0019d1c9: MOV RDI,qword ptr [RBP + -0xc60] MOV RSI,qword ptr [RBP + -0xc58] MOV RAX,qword ptr [RBP + -0xc70] MOV R8D,EAX LEA RDX,[RBP + -0xc40] MOV ECX,0xffffffff CALL 0x0013f500 MOVSX EAX,AL MOV dword ptr [RBP + -0xc68],EAX CMP dword ptr [RBP + -0xc68],0xb0 JZ 0x0019d217 JMP 0x0019d209 LAB_0019d209: MOV EAX,dword ptr [RBP + -0xc68] MOV dword ptr [RBP + -0xc44],EAX JMP 0x0019d23c LAB_0019d217: JMP 0x0019d219 LAB_0019d219: MOV EDI,0x186a0 CALL 0x001faef0 CMP dword ptr [RBP + -0xc64],0xa JL 0x0019d02d JMP 0x0019d232 LAB_0019d232: MOV dword ptr [RBP + -0xc44],0xb0 LAB_0019d23c: MOV EAX,dword ptr [RBP + -0xc44] MOV dword ptr [RBP + -0xc84],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0019d269 MOV EAX,dword ptr [RBP + -0xc84] ADD RSP,0xc90 POP RBP RET LAB_0019d269: CALL 0x0012a250
/* WARNING: Removing unreachable block (ram,0x0019d230) */ int aria_read_index(int4 param_1,ulong *param_2,ulong param_3,long param_4) { char cVar1; uint uVar2; ulong uVar3; int *piVar4; long in_FS_OFFSET; int local_c7c; int local_c4c; int1 local_c48 [1860]; uint local_504; int4 local_48c; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_504 = *(uint *)((long)param_2 + 0x14); local_48c = (int4)param_2[2]; do { uVar3 = my_pread(param_1,param_4,(int)param_2[2],param_3 * (uint)param_2[2],0); if (uVar3 != (uint)param_2[2]) { if (uVar3 == 0) { local_c4c = 0x89; goto LAB_0019d23c; } if (uVar3 == 0xffffffffffffffff) { piVar4 = (int *)_my_thread_var(); if (*piVar4 == 0) { local_c7c = -1; } else { piVar4 = (int *)_my_thread_var(); local_c7c = *piVar4; } local_c4c = local_c7c; LAB_0019d23c: if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_c4c; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); } } if ((*(char *)((long)param_2 + 0x1f) == '\0') || (param_3 < *param_2 / (ulong)(uint)param_2[2])) { local_c4c = 0x7e; if (uVar3 == (uint)param_2[2]) { local_c4c = 0; } goto LAB_0019d23c; } if (uVar3 == (uint)param_2[2]) { uVar2 = (uint)CONCAT11(*(int1 *)(param_4 + -2 + (ulong)local_504), *(int1 *)(param_4 + -1 + (ulong)local_504)); if ((int)param_2[2] - 4U < uVar2) { local_c4c = 0x7e; goto LAB_0019d23c; } cVar1 = maria_page_crc_check(param_4,param_3,local_c48,0xffffffff,uVar2); local_c4c = (int)cVar1; if (local_c4c != 0xb0) goto LAB_0019d23c; } my_sleep(100000); } while( true ); }
51,419
madb_get_os_character_set
eloqsql/libmariadb/libmariadb/ma_charset.c
const char *madb_get_os_character_set() { unsigned int i= 0; char *p= NULL; #ifdef _WIN32 char codepage[FN_REFLEN]; snprintf(codepage, FN_REFLEN, "%u", GetConsoleCP() ? GetConsoleCP() : GetACP()); p= codepage; #elif defined(HAVE_NL_LANGINFO) && defined(HAVE_SETLOCALE) if (setlocale(LC_CTYPE, "")) p= nl_langinfo(CODESET); #endif if (!p) return MADB_DEFAULT_CHARSET_NAME; while (MADB_OS_CHARSET[i].identifier) { if (MADB_OS_CHARSET[i].supported > MADB_CS_UNSUPPORTED && strcasecmp(MADB_OS_CHARSET[i].identifier, p) == 0) return MADB_OS_CHARSET[i].charset; i++; } return MADB_DEFAULT_CHARSET_NAME; }
O0
c
madb_get_os_character_set: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl $0x0, -0xc(%rbp) movq $0x0, -0x18(%rbp) xorl %edi, %edi leaq 0x7b60(%rip), %rsi # 0x66370 callq 0x143b0 cmpq $0x0, %rax je 0x5e829 movl $0xe, %edi callq 0x14420 movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) jne 0x5e840 leaq 0x9968(%rip), %rax # 0x6819f movq %rax, -0x8(%rbp) jmp 0x5e8d1 jmp 0x5e842 movl -0xc(%rbp), %eax movl %eax, %ecx leaq 0x21842(%rip), %rax # 0x80090 imulq $0x28, %rcx, %rcx addq %rcx, %rax cmpq $0x0, (%rax) je 0x5e8c6 movl -0xc(%rbp), %eax movl %eax, %ecx leaq 0x21829(%rip), %rax # 0x80090 imulq $0x28, %rcx, %rcx addq %rcx, %rax movzbl 0x20(%rax), %eax cmpl $0x0, %eax jle 0x5e8b8 movl -0xc(%rbp), %eax movl %eax, %ecx leaq 0x2180d(%rip), %rax # 0x80090 imulq $0x28, %rcx, %rcx addq %rcx, %rax movq (%rax), %rdi movq -0x18(%rbp), %rsi callq 0x14490 cmpl $0x0, %eax jne 0x5e8b8 movl -0xc(%rbp), %eax movl %eax, %ecx leaq 0x217e9(%rip), %rax # 0x80090 imulq $0x28, %rcx, %rcx addq %rcx, %rax movq 0x10(%rax), %rax movq %rax, -0x8(%rbp) jmp 0x5e8d1 movl -0xc(%rbp), %eax addl $0x1, %eax movl %eax, -0xc(%rbp) jmp 0x5e842 leaq 0x98d2(%rip), %rax # 0x6819f movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
madb_get_os_character_set: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_C], 0 mov [rbp+var_18], 0 xor edi, edi lea rsi, a12+4; "" call _setlocale cmp rax, 0 jz short loc_5E829 mov edi, 0Eh call _nl_langinfo mov [rbp+var_18], rax loc_5E829: cmp [rbp+var_18], 0 jnz short loc_5E840 lea rax, aSetNamesLatin1+0Ah; "latin1" mov [rbp+var_8], rax jmp loc_5E8D1 loc_5E840: jmp short $+2 loc_5E842: mov eax, [rbp+var_C] mov ecx, eax lea rax, MADB_OS_CHARSET imul rcx, 28h ; '(' add rax, rcx cmp qword ptr [rax], 0 jz short loc_5E8C6 mov eax, [rbp+var_C] mov ecx, eax lea rax, MADB_OS_CHARSET imul rcx, 28h ; '(' add rax, rcx movzx eax, byte ptr [rax+20h] cmp eax, 0 jle short loc_5E8B8 mov eax, [rbp+var_C] mov ecx, eax lea rax, MADB_OS_CHARSET imul rcx, 28h ; '(' add rax, rcx mov rdi, [rax] mov rsi, [rbp+var_18] call _strcasecmp cmp eax, 0 jnz short loc_5E8B8 mov eax, [rbp+var_C] mov ecx, eax lea rax, MADB_OS_CHARSET imul rcx, 28h ; '(' add rax, rcx mov rax, [rax+10h] mov [rbp+var_8], rax jmp short loc_5E8D1 loc_5E8B8: mov eax, [rbp+var_C] add eax, 1 mov [rbp+var_C], eax jmp loc_5E842 loc_5E8C6: lea rax, aSetNamesLatin1+0Ah; "latin1" mov [rbp+var_8], rax loc_5E8D1: mov rax, [rbp+var_8] add rsp, 20h pop rbp retn
char *madb_get_os_character_set() { long long v1; // [rsp+8h] [rbp-18h] unsigned int v2; // [rsp+14h] [rbp-Ch] v2 = 0; v1 = 0LL; if ( setlocale(0LL, "") ) v1 = nl_langinfo(14LL); if ( !v1 ) return "latin1"; while ( *(&MADB_OS_CHARSET + 5 * v2) ) { if ( *((_BYTE *)&MADB_OS_CHARSET + 40 * v2 + 32) && !(unsigned int)strcasecmp(*(&MADB_OS_CHARSET + 5 * v2), v1) ) return (char *)*(&MADB_OS_CHARSET + 5 * v2 + 2); ++v2; } return "latin1"; }
madb_get_os_character_set: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0xc],0x0 MOV qword ptr [RBP + -0x18],0x0 XOR EDI,EDI LEA RSI,[0x166370] CALL 0x001143b0 CMP RAX,0x0 JZ 0x0015e829 MOV EDI,0xe CALL 0x00114420 MOV qword ptr [RBP + -0x18],RAX LAB_0015e829: CMP qword ptr [RBP + -0x18],0x0 JNZ 0x0015e840 LEA RAX,[0x16819f] MOV qword ptr [RBP + -0x8],RAX JMP 0x0015e8d1 LAB_0015e840: JMP 0x0015e842 LAB_0015e842: MOV EAX,dword ptr [RBP + -0xc] MOV ECX,EAX LEA RAX,[0x180090] IMUL RCX,RCX,0x28 ADD RAX,RCX CMP qword ptr [RAX],0x0 JZ 0x0015e8c6 MOV EAX,dword ptr [RBP + -0xc] MOV ECX,EAX LEA RAX,[0x180090] IMUL RCX,RCX,0x28 ADD RAX,RCX MOVZX EAX,byte ptr [RAX + 0x20] CMP EAX,0x0 JLE 0x0015e8b8 MOV EAX,dword ptr [RBP + -0xc] MOV ECX,EAX LEA RAX,[0x180090] IMUL RCX,RCX,0x28 ADD RAX,RCX MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00114490 CMP EAX,0x0 JNZ 0x0015e8b8 MOV EAX,dword ptr [RBP + -0xc] MOV ECX,EAX LEA RAX,[0x180090] IMUL RCX,RCX,0x28 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x8],RAX JMP 0x0015e8d1 LAB_0015e8b8: MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x1 MOV dword ptr [RBP + -0xc],EAX JMP 0x0015e842 LAB_0015e8c6: LEA RAX,[0x16819f] MOV qword ptr [RBP + -0x8],RAX LAB_0015e8d1: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
char * madb_get_os_character_set(void) { int iVar1; char *pcVar2; char *local_20; uint local_14; char *local_10; local_14 = 0; local_20 = (char *)0x0; pcVar2 = setlocale(0,""); if (pcVar2 != (char *)0x0) { local_20 = nl_langinfo(0xe); } if (local_20 != (char *)0x0) { while (*(long *)(MADB_OS_CHARSET + (ulong)local_14 * 0x28) != 0) { if ((MADB_OS_CHARSET[(ulong)local_14 * 0x28 + 0x20] != '\0') && (iVar1 = strcasecmp(*(char **)(MADB_OS_CHARSET + (ulong)local_14 * 0x28),local_20), iVar1 == 0)) { return *(char **)(MADB_OS_CHARSET + (ulong)local_14 * 0x28 + 0x10); } local_14 = local_14 + 1; } } local_10 = "latin1"; return local_10; }
51,420
write_hook_for_clr_end
eloqsql/storage/maria/ma_key_recover.c
my_bool write_hook_for_clr_end(enum translog_record_type type __attribute__ ((unused)), TRN *trn, MARIA_HA *tbl_info, LSN *lsn __attribute__ ((unused)), void *hook_arg) { MARIA_SHARE *share= tbl_info->s; struct st_msg_to_write_hook_for_clr_end *msg= (struct st_msg_to_write_hook_for_clr_end *)hook_arg; my_bool error= FALSE; DBUG_ENTER("write_hook_for_clr_end"); DBUG_ASSERT(trn->trid != 0); trn->undo_lsn= msg->previous_undo_lsn; switch (msg->undone_record_type) { case LOGREC_UNDO_ROW_DELETE: share->state.state.records++; share->state.state.checksum+= msg->checksum_delta; break; case LOGREC_UNDO_ROW_INSERT: share->state.state.records--; share->state.state.checksum+= msg->checksum_delta; break; case LOGREC_UNDO_ROW_UPDATE: share->state.state.checksum+= msg->checksum_delta; break; case LOGREC_UNDO_KEY_INSERT_WITH_ROOT: case LOGREC_UNDO_KEY_DELETE_WITH_ROOT: { /* Update key root */ struct st_msg_to_write_hook_for_undo_key *extra_msg= (struct st_msg_to_write_hook_for_undo_key *) msg->extra_msg; *extra_msg->root= extra_msg->value; break; } case LOGREC_UNDO_KEY_INSERT: case LOGREC_UNDO_KEY_DELETE: break; case LOGREC_UNDO_BULK_INSERT: mysql_mutex_assert_owner(&share->intern_lock); error= (maria_enable_indexes(tbl_info) || /* we enabled indices, need '2' below */ _ma_state_info_write(share, MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET | MA_STATE_INFO_WRITE_FULL_INFO)); /* no need for _ma_reset_status(): REDO_DELETE_ALL is just before us */ break; default: DBUG_ASSERT(0); } if (trn->undo_lsn == LSN_IMPOSSIBLE) /* has fully rolled back */ trn->first_undo_lsn= LSN_WITH_FLAGS_TO_FLAGS(trn->first_undo_lsn); DBUG_RETURN(error); }
O0
c
write_hook_for_clr_end: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x38(%rbp) movb $0x0, -0x39(%rbp) jmp 0x6fdb4 movq -0x38(%rbp), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x98(%rax) movq -0x38(%rbp), %rax movl 0x8(%rax), %eax addl $-0x12, %eax movl %eax, %ecx movq %rcx, -0x50(%rbp) subl $0x15, %eax ja 0x6feae movq -0x50(%rbp), %rax leaq 0xe7fca(%rip), %rcx # 0x157db4 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x30(%rbp), %rax movq 0x18(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x18(%rax) movq -0x38(%rbp), %rax movl 0xc(%rax), %ecx movq -0x30(%rbp), %rax addl 0x48(%rax), %ecx movl %ecx, 0x48(%rax) jmp 0x6feb4 movq -0x30(%rbp), %rax movq 0x18(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x18(%rax) movq -0x38(%rbp), %rax movl 0xc(%rax), %ecx movq -0x30(%rbp), %rax addl 0x48(%rax), %ecx movl %ecx, 0x48(%rax) jmp 0x6feb4 movq -0x38(%rbp), %rax movl 0xc(%rax), %ecx movq -0x30(%rbp), %rax addl 0x48(%rax), %ecx movl %ecx, 0x48(%rax) jmp 0x6feb4 movq -0x38(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq 0x8(%rax), %rcx movq -0x48(%rbp), %rax movq (%rax), %rax movq %rcx, (%rax) jmp 0x6feb4 jmp 0x6feb4 jmp 0x6fe73 jmp 0x6fe75 movq -0x18(%rbp), %rdi callq 0x68800 movl %eax, %ecx movb $0x1, %al cmpl $0x0, %ecx movb %al, -0x51(%rbp) jne 0x6fea1 movq -0x30(%rbp), %rdi movl $0x3, %esi callq 0x64f30 cmpl $0x0, %eax setne %al movb %al, -0x51(%rbp) movb -0x51(%rbp), %al andb $0x1, %al movzbl %al, %eax movb %al, -0x39(%rbp) jmp 0x6feb4 jmp 0x6feb0 jmp 0x6feb2 jmp 0x6feb4 movq -0x10(%rbp), %rax cmpq $0x0, 0x98(%rax) jne 0x6fee2 movq -0x10(%rbp), %rax movabsq $-0x100000000000000, %rcx # imm = 0xFF00000000000000 andq 0xa0(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0xa0(%rax) jmp 0x6fee4 movb -0x39(%rbp), %al movb %al, -0x52(%rbp) movb -0x52(%rbp), %al addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
write_hook_for_clr_end: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_30], rax mov rax, [rbp+var_28] mov [rbp+var_38], rax mov [rbp+var_39], 0 jmp short $+2 loc_6FDB4: mov rax, [rbp+var_38] mov rcx, [rax] mov rax, [rbp+var_10] mov [rax+98h], rcx mov rax, [rbp+var_38] mov eax, [rax+8] add eax, 0FFFFFFEEh; switch 22 cases mov ecx, eax mov [rbp+var_50], rcx sub eax, 15h ja def_6FDF1; jumptable 000000000006FDF1 default case, cases 25-38 mov rax, [rbp+var_50] lea rcx, jpt_6FDF1 movsxd rax, ds:(jpt_6FDF1 - 157DB4h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_6FDF3: mov rax, [rbp+var_30]; jumptable 000000000006FDF1 case 19 mov rcx, [rax+18h] add rcx, 1 mov [rax+18h], rcx mov rax, [rbp+var_38] mov ecx, [rax+0Ch] mov rax, [rbp+var_30] add ecx, [rax+48h] mov [rax+48h], ecx jmp loc_6FEB4 loc_6FE19: mov rax, [rbp+var_30]; jumptable 000000000006FDF1 case 18 mov rcx, [rax+18h] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+18h], rcx mov rax, [rbp+var_38] mov ecx, [rax+0Ch] mov rax, [rbp+var_30] add ecx, [rax+48h] mov [rax+48h], ecx jmp short loc_6FEB4 loc_6FE3C: mov rax, [rbp+var_38]; jumptable 000000000006FDF1 case 20 mov ecx, [rax+0Ch] mov rax, [rbp+var_30] add ecx, [rax+48h] mov [rax+48h], ecx jmp short loc_6FEB4 loc_6FE4F: mov rax, [rbp+var_38]; jumptable 000000000006FDF1 cases 22,24 mov rax, [rax+10h] mov [rbp+var_48], rax mov rax, [rbp+var_48] mov rcx, [rax+8] mov rax, [rbp+var_48] mov rax, [rax] mov [rax], rcx jmp short loc_6FEB4 loc_6FE6F: jmp short loc_6FEB4; jumptable 000000000006FDF1 cases 21,23 loc_6FE71: jmp short $+2; jumptable 000000000006FDF1 case 39 loc_6FE73: jmp short $+2 loc_6FE75: mov rdi, [rbp+var_18] call maria_enable_indexes mov ecx, eax mov al, 1 cmp ecx, 0 mov [rbp+var_51], al jnz short loc_6FEA1 mov rdi, [rbp+var_30] mov esi, 3 call _ma_state_info_write cmp eax, 0 setnz al mov [rbp+var_51], al loc_6FEA1: mov al, [rbp+var_51] and al, 1 movzx eax, al mov [rbp+var_39], al jmp short loc_6FEB4 def_6FDF1: jmp short $+2; jumptable 000000000006FDF1 default case, cases 25-38 loc_6FEB0: jmp short $+2 loc_6FEB2: jmp short $+2 loc_6FEB4: mov rax, [rbp+var_10] cmp qword ptr [rax+98h], 0 jnz short loc_6FEE2 mov rax, [rbp+var_10] mov rcx, 0FF00000000000000h and rcx, [rax+0A0h] mov rax, [rbp+var_10] mov [rax+0A0h], rcx loc_6FEE2: jmp short $+2 loc_6FEE4: mov al, [rbp+var_39] mov [rbp+var_52], al mov al, [rbp+var_52] add rsp, 60h pop rbp retn
bool write_hook_for_clr_end(long long a1, long long a2, _DWORD *a3, long long a4, long long a5, int a6) { int v6; // eax bool v8; // [rsp+Fh] [rbp-51h] bool v9; // [rsp+27h] [rbp-39h] long long v10; // [rsp+30h] [rbp-30h] v10 = *(_QWORD *)a3; v9 = 0; *(_QWORD *)(a2 + 152) = *(_QWORD *)a5; v6 = *(_DWORD *)(a5 + 8); switch ( v6 ) { case 18: --*(_QWORD *)(v10 + 24); *(_DWORD *)(v10 + 72) += *(_DWORD *)(a5 + 12); break; case 19: ++*(_QWORD *)(v10 + 24); *(_DWORD *)(v10 + 72) += *(_DWORD *)(a5 + 12); break; case 20: *(_DWORD *)(v10 + 72) += *(_DWORD *)(a5 + 12); break; case 22: case 24: ***(_QWORD ***)(a5 + 16) = *(_QWORD *)(*(_QWORD *)(a5 + 16) + 8LL); break; case 39: v8 = 1; if ( !(unsigned int)maria_enable_indexes(a3, a2, (long long)a3, (unsigned int)(v6 - 18), a5, a6) ) v8 = (unsigned int)ma_state_info_write(v10, 3u) != 0; v9 = v8; break; default: break; } if ( !*(_QWORD *)(a2 + 152) ) *(_QWORD *)(a2 + 160) &= 0xFF00000000000000LL; return v9; }
write_hook_for_clr_end: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x38],RAX MOV byte ptr [RBP + -0x39],0x0 JMP 0x0016fdb4 LAB_0016fdb4: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x98],RCX MOV RAX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RAX + 0x8] ADD EAX,-0x12 MOV ECX,EAX MOV qword ptr [RBP + -0x50],RCX SUB EAX,0x15 JA 0x0016feae MOV RAX,qword ptr [RBP + -0x50] LEA RCX,[0x257db4] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_13: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RAX + 0x18] ADD RCX,0x1 MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX + 0xc] MOV RAX,qword ptr [RBP + -0x30] ADD ECX,dword ptr [RAX + 0x48] MOV dword ptr [RAX + 0x48],ECX JMP 0x0016feb4 caseD_12: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RAX + 0x18] ADD RCX,-0x1 MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX + 0xc] MOV RAX,qword ptr [RBP + -0x30] ADD ECX,dword ptr [RAX + 0x48] MOV dword ptr [RAX + 0x48],ECX JMP 0x0016feb4 caseD_14: MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX + 0xc] MOV RAX,qword ptr [RBP + -0x30] ADD ECX,dword ptr [RAX + 0x48] MOV dword ptr [RAX + 0x48],ECX JMP 0x0016feb4 caseD_16: MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX],RCX JMP 0x0016feb4 caseD_15: JMP 0x0016feb4 caseD_27: JMP 0x0016fe73 LAB_0016fe73: JMP 0x0016fe75 LAB_0016fe75: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00168800 MOV ECX,EAX MOV AL,0x1 CMP ECX,0x0 MOV byte ptr [RBP + -0x51],AL JNZ 0x0016fea1 MOV RDI,qword ptr [RBP + -0x30] MOV ESI,0x3 CALL 0x00164f30 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x51],AL LAB_0016fea1: MOV AL,byte ptr [RBP + -0x51] AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x39],AL JMP 0x0016feb4 caseD_19: JMP 0x0016feb0 LAB_0016feb0: JMP 0x0016feb2 LAB_0016feb2: JMP 0x0016feb4 LAB_0016feb4: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x98],0x0 JNZ 0x0016fee2 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,-0x100000000000000 AND RCX,qword ptr [RAX + 0xa0] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xa0],RCX LAB_0016fee2: JMP 0x0016fee4 LAB_0016fee4: MOV AL,byte ptr [RBP + -0x39] MOV byte ptr [RBP + -0x52],AL MOV AL,byte ptr [RBP + -0x52] ADD RSP,0x60 POP RBP RET
bool write_hook_for_clr_end (int8 param_1,long param_2,long *param_3,int8 param_4,int8 *param_5 ) { long lVar1; int iVar2; bool local_59; bool local_41; lVar1 = *param_3; local_41 = false; *(int8 *)(param_2 + 0x98) = *param_5; switch(*(int4 *)(param_5 + 1)) { case 0x12: *(long *)(lVar1 + 0x18) = *(long *)(lVar1 + 0x18) + -1; *(int *)(lVar1 + 0x48) = *(int *)((long)param_5 + 0xc) + *(int *)(lVar1 + 0x48); break; case 0x13: *(long *)(lVar1 + 0x18) = *(long *)(lVar1 + 0x18) + 1; *(int *)(lVar1 + 0x48) = *(int *)((long)param_5 + 0xc) + *(int *)(lVar1 + 0x48); break; case 0x14: *(int *)(lVar1 + 0x48) = *(int *)((long)param_5 + 0xc) + *(int *)(lVar1 + 0x48); break; case 0x15: case 0x17: break; case 0x16: case 0x18: **(int8 **)param_5[2] = ((int8 *)param_5[2])[1]; break; default: break; case 0x27: iVar2 = maria_enable_indexes(param_3); local_59 = true; if (iVar2 == 0) { iVar2 = _ma_state_info_write(lVar1,3); local_59 = iVar2 != 0; } local_41 = local_59; } if (*(long *)(param_2 + 0x98) == 0) { *(ulong *)(param_2 + 0xa0) = *(ulong *)(param_2 + 0xa0) & 0xff00000000000000; } return local_41; }
51,421
write_hook_for_clr_end
eloqsql/storage/maria/ma_key_recover.c
my_bool write_hook_for_clr_end(enum translog_record_type type __attribute__ ((unused)), TRN *trn, MARIA_HA *tbl_info, LSN *lsn __attribute__ ((unused)), void *hook_arg) { MARIA_SHARE *share= tbl_info->s; struct st_msg_to_write_hook_for_clr_end *msg= (struct st_msg_to_write_hook_for_clr_end *)hook_arg; my_bool error= FALSE; DBUG_ENTER("write_hook_for_clr_end"); DBUG_ASSERT(trn->trid != 0); trn->undo_lsn= msg->previous_undo_lsn; switch (msg->undone_record_type) { case LOGREC_UNDO_ROW_DELETE: share->state.state.records++; share->state.state.checksum+= msg->checksum_delta; break; case LOGREC_UNDO_ROW_INSERT: share->state.state.records--; share->state.state.checksum+= msg->checksum_delta; break; case LOGREC_UNDO_ROW_UPDATE: share->state.state.checksum+= msg->checksum_delta; break; case LOGREC_UNDO_KEY_INSERT_WITH_ROOT: case LOGREC_UNDO_KEY_DELETE_WITH_ROOT: { /* Update key root */ struct st_msg_to_write_hook_for_undo_key *extra_msg= (struct st_msg_to_write_hook_for_undo_key *) msg->extra_msg; *extra_msg->root= extra_msg->value; break; } case LOGREC_UNDO_KEY_INSERT: case LOGREC_UNDO_KEY_DELETE: break; case LOGREC_UNDO_BULK_INSERT: mysql_mutex_assert_owner(&share->intern_lock); error= (maria_enable_indexes(tbl_info) || /* we enabled indices, need '2' below */ _ma_state_info_write(share, MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET | MA_STATE_INFO_WRITE_FULL_INFO)); /* no need for _ma_reset_status(): REDO_DELETE_ALL is just before us */ break; default: DBUG_ASSERT(0); } if (trn->undo_lsn == LSN_IMPOSSIBLE) /* has fully rolled back */ trn->first_undo_lsn= LSN_WITH_FLAGS_TO_FLAGS(trn->first_undo_lsn); DBUG_RETURN(error); }
O3
c
write_hook_for_clr_end: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %rbx movq (%rdx), %r14 movq (%r8), %rcx movq %rcx, 0x98(%rsi) movl 0x8(%r8), %esi xorl %eax, %eax leal -0x12(%rsi), %edi cmpl $0x6, %edi ja 0x59626 leaq 0x87c7f(%rip), %rdx # 0xe128c movslq (%rdx,%rdi,4), %rsi addq %rdx, %rsi jmpq *%rsi movq 0x10(%r8), %rax movq (%rax), %rcx movq 0x8(%rax), %rax movq %rax, (%rcx) jmp 0x59661 cmpl $0x27, %esi jne 0x5966a movq %rdx, %rdi callq 0x558cf movl %eax, %ecx movb $0x1, %al testl %ecx, %ecx jne 0x59663 movq %r14, %rdi movl $0x3, %esi callq 0x54a5e testl %eax, %eax setne %al jmp 0x59663 incq 0x18(%r14) jmp 0x59659 decq 0x18(%r14) movl 0xc(%r8), %eax addl %eax, 0x48(%r14) xorl %eax, %eax movq 0x98(%rbx), %rcx testq %rcx, %rcx jne 0x59681 movzbl 0xa7(%rbx), %ecx shlq $0x38, %rcx movq %rcx, 0xa0(%rbx) popq %rbx popq %r14 popq %rbp retq
write_hook_for_clr_end: push rbp mov rbp, rsp push r14 push rbx mov rbx, rsi mov r14, [rdx] mov rcx, [r8] mov [rsi+98h], rcx mov esi, [r8+8] xor eax, eax lea edi, [rsi-12h]; switch 7 cases cmp edi, 6 ja short def_59614; jumptable 0000000000059614 default case lea rdx, jpt_59614 movsxd rsi, ds:(jpt_59614 - 0E128Ch)[rdx+rdi*4] add rsi, rdx jmp rsi; switch jump loc_59616: mov rax, [r8+10h]; jumptable 0000000000059614 cases 22,24 mov rcx, [rax] mov rax, [rax+8] mov [rcx], rax jmp short loc_59661 def_59614: cmp esi, 27h ; '''; jumptable 0000000000059614 default case jnz short loc_5966A; jumptable 0000000000059614 cases 21,23 mov rdi, rdx call maria_enable_indexes mov ecx, eax mov al, 1 test ecx, ecx jnz short loc_59663 mov rdi, r14 mov esi, 3 call _ma_state_info_write test eax, eax setnz al jmp short loc_59663 loc_5964F: inc qword ptr [r14+18h]; jumptable 0000000000059614 case 19 jmp short loc_59659; jumptable 0000000000059614 case 20 loc_59655: dec qword ptr [r14+18h]; jumptable 0000000000059614 case 18 loc_59659: mov eax, [r8+0Ch]; jumptable 0000000000059614 case 20 add [r14+48h], eax loc_59661: xor eax, eax loc_59663: mov rcx, [rbx+98h] loc_5966A: test rcx, rcx; jumptable 0000000000059614 cases 21,23 jnz short loc_59681 movzx ecx, byte ptr [rbx+0A7h] shl rcx, 38h mov [rbx+0A0h], rcx loc_59681: pop rbx pop r14 pop rbp retn
bool write_hook_for_clr_end(long long a1, long long a2, _DWORD *a3, long long a4, long long a5, int a6) { long long v7; // r14 long long v8; // rcx long long v9; // rsi bool result; // al int v11; // ecx v7 = *(_QWORD *)a3; v8 = *(_QWORD *)a5; *(_QWORD *)(a2 + 152) = *(_QWORD *)a5; v9 = *(unsigned int *)(a5 + 8); result = 0; switch ( (int)v9 ) { case 18: --*(_QWORD *)(v7 + 24); goto LABEL_8; case 19: ++*(_QWORD *)(v7 + 24); goto LABEL_8; case 20: LABEL_8: *(_DWORD *)(v7 + 72) += *(_DWORD *)(a5 + 12); goto LABEL_9; case 21: case 23: goto LABEL_11; case 22: case 24: ***(_QWORD ***)(a5 + 16) = *(_QWORD *)(*(_QWORD *)(a5 + 16) + 8LL); LABEL_9: result = 0; goto LABEL_10; default: if ( (_DWORD)v9 != 39 ) goto LABEL_11; v11 = maria_enable_indexes(a3, v9, (long long)a3, v8, a5, a6); result = 1; if ( !v11 ) result = (unsigned int)ma_state_info_write(v7, 3u) != 0; LABEL_10: v8 = *(_QWORD *)(a2 + 152); LABEL_11: if ( !v8 ) *(_QWORD *)(a2 + 160) = (unsigned long long)*(unsigned __int8 *)(a2 + 167) << 56; return result; } }
write_hook_for_clr_end: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RSI MOV R14,qword ptr [RDX] MOV RCX,qword ptr [R8] MOV qword ptr [RSI + 0x98],RCX MOV ESI,dword ptr [R8 + 0x8] XOR EAX,EAX LEA EDI,[RSI + -0x12] CMP EDI,0x6 JA 0x00159626 LEA RDX,[0x1e128c] MOVSXD RSI,dword ptr [RDX + RDI*0x4] ADD RSI,RDX switchD: JMP RSI caseD_16: MOV RAX,qword ptr [R8 + 0x10] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RCX],RAX JMP 0x00159661 default: CMP ESI,0x27 JNZ 0x0015966a MOV RDI,RDX CALL 0x001558cf MOV ECX,EAX MOV AL,0x1 TEST ECX,ECX JNZ 0x00159663 MOV RDI,R14 MOV ESI,0x3 CALL 0x00154a5e TEST EAX,EAX SETNZ AL JMP 0x00159663 caseD_13: INC qword ptr [R14 + 0x18] JMP 0x00159659 caseD_12: DEC qword ptr [R14 + 0x18] caseD_14: MOV EAX,dword ptr [R8 + 0xc] ADD dword ptr [R14 + 0x48],EAX LAB_00159661: XOR EAX,EAX LAB_00159663: MOV RCX,qword ptr [RBX + 0x98] caseD_15: TEST RCX,RCX JNZ 0x00159681 MOVZX ECX,byte ptr [RBX + 0xa7] SHL RCX,0x38 MOV qword ptr [RBX + 0xa0],RCX LAB_00159681: POP RBX POP R14 POP RBP RET
bool write_hook_for_clr_end (int8 param_1,long param_2,long *param_3,int8 param_4,long *param_5) { long lVar1; int iVar2; long lVar3; bool bVar4; lVar1 = *param_3; lVar3 = *param_5; *(long *)(param_2 + 0x98) = lVar3; bVar4 = false; switch((int)param_5[1]) { case 0x12: *(long *)(lVar1 + 0x18) = *(long *)(lVar1 + 0x18) + -1; break; case 0x13: *(long *)(lVar1 + 0x18) = *(long *)(lVar1 + 0x18) + 1; break; case 0x14: break; case 0x15: case 0x17: goto switchD_00159614_caseD_15; case 0x16: case 0x18: **(int8 **)param_5[2] = ((int8 *)param_5[2])[1]; goto LAB_00159661; default: if ((int)param_5[1] != 0x27) goto switchD_00159614_caseD_15; iVar2 = maria_enable_indexes(param_3); bVar4 = true; if (iVar2 == 0) { iVar2 = _ma_state_info_write(lVar1,3); bVar4 = iVar2 != 0; } goto LAB_00159663; } *(int *)(lVar1 + 0x48) = *(int *)(lVar1 + 0x48) + *(int *)((long)param_5 + 0xc); LAB_00159661: bVar4 = false; LAB_00159663: lVar3 = *(long *)(param_2 + 0x98); switchD_00159614_caseD_15: if (lVar3 == 0) { *(ulong *)(param_2 + 0xa0) = (ulong)*(byte *)(param_2 + 0xa7) << 0x38; } return bVar4; }
51,422
my_rmtree
eloqsql/mysys/my_delete.c
int my_rmtree(const char *dir, myf MyFlags) { char path[FN_REFLEN]; char sep[] = { FN_LIBCHAR, 0 }; int err = 0; uint i; MY_DIR *dir_info = my_dir(dir, MYF(MY_DONT_SORT | MY_WANT_STAT)); if (!dir_info) return 1; for (i = 0; i < dir_info->number_of_files; i++) { FILEINFO *file = dir_info->dir_entry + i; /* Skip "." and ".." */ if (!strcmp(file->name, ".") || !strcmp(file->name, "..")) continue; strxnmov(path, sizeof(path), dir, sep, file->name, NULL); if (!MY_S_ISDIR(file->mystat->st_mode)) { err = my_delete(path, MyFlags); #ifdef _WIN32 /* On Windows, check and possible reset readonly attribute. my_delete(), or DeleteFile does not remove theses files. */ if (err) { DWORD attr = GetFileAttributes(path); if (attr != INVALID_FILE_ATTRIBUTES && (attr & FILE_ATTRIBUTE_READONLY)) { SetFileAttributes(path, attr &~FILE_ATTRIBUTE_READONLY); err = my_delete(path, MyFlags); } } #endif } else err = my_rmtree(path, MyFlags); if (err) break; } my_dirend(dir_info); if (!err) err = rmdir(dir); return err; }
O3
c
my_rmtree: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x228, %rsp # imm = 0x228 movq %rsi, -0x240(%rbp) movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movw $0x2f, -0x232(%rbp) movl $0x4000, %esi # imm = 0x4000 movq %rdi, -0x248(%rbp) callq 0x2fd29 testq %rax, %rax je 0x367a1 movq %rax, %r15 movl 0x8(%rax), %eax testl %eax, %eax je 0x36788 movl $0x8, %r14d leaq -0x230(%rbp), %rbx xorl %r12d, %r12d movq (%r15), %r13 movq -0x8(%r13,%r14), %r8 cmpb $0x2e, (%r8) jne 0x36711 cmpb $0x0, 0x1(%r8) je 0x36776 cmpb $0x2e, 0x1(%r8) jne 0x36711 cmpb $0x0, 0x2(%r8) je 0x36776 movl $0x200, %esi # imm = 0x200 movq %rbx, %rdi movq -0x248(%rbp), %rdx leaq -0x232(%rbp), %rcx xorl %r9d, %r9d xorl %eax, %eax callq 0x632f4 movq (%r13,%r14), %rax movl 0x18(%rax), %eax movl $0xf000, %ecx # imm = 0xF000 andl %ecx, %eax movq %rbx, %rdi cmpl $0x4000, %eax # imm = 0x4000 jne 0x36758 movq -0x240(%rbp), %rsi callq 0x36685 jmp 0x36764 movq -0x240(%rbp), %rsi callq 0x365b0 movl %eax, %r13d testl %eax, %eax jne 0x367a9 movl 0x8(%r15), %eax leaq -0x230(%rbp), %rbx incq %r12 movl %eax, %ecx addq $0x10, %r14 cmpq %rcx, %r12 jb 0x366ee movq %r15, %rdi callq 0x2fcf8 movq -0x248(%rbp), %rdi callq 0x24160 movl %eax, %r13d jmp 0x367b1 movl $0x1, %r13d jmp 0x367b1 movq %r15, %rdi callq 0x2fcf8 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x367d5 movl %r13d, %eax addq $0x228, %rsp # imm = 0x228 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x243e0 nop
my_rmtree: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 228h mov [rbp+var_240], rsi mov rax, fs:28h mov [rbp+var_30], rax mov [rbp+var_232], 2Fh ; '/' mov esi, 4000h mov [rbp+var_248], rdi call my_dir test rax, rax jz loc_367A1 mov r15, rax mov eax, [rax+8] test eax, eax jz loc_36788 mov r14d, 8 lea rbx, [rbp+var_230] xor r12d, r12d loc_366EE: mov r13, [r15] mov r8, [r13+r14-8] cmp byte ptr [r8], 2Eh ; '.' jnz short loc_36711 cmp byte ptr [r8+1], 0 jz short loc_36776 cmp byte ptr [r8+1], 2Eh ; '.' jnz short loc_36711 cmp byte ptr [r8+2], 0 jz short loc_36776 loc_36711: mov esi, 200h mov rdi, rbx mov rdx, [rbp+var_248] lea rcx, [rbp+var_232] xor r9d, r9d xor eax, eax call strxnmov mov rax, [r13+r14+0] mov eax, [rax+18h] mov ecx, 0F000h and eax, ecx mov rdi, rbx cmp eax, 4000h jnz short loc_36758 mov rsi, [rbp+var_240] call my_rmtree jmp short loc_36764 loc_36758: mov rsi, [rbp+var_240] call my_delete loc_36764: mov r13d, eax test eax, eax jnz short loc_367A9 mov eax, [r15+8] lea rbx, [rbp+var_230] loc_36776: inc r12 mov ecx, eax add r14, 10h cmp r12, rcx jb loc_366EE loc_36788: mov rdi, r15 call my_dirend mov rdi, [rbp+var_248] call _rmdir mov r13d, eax jmp short loc_367B1 loc_367A1: mov r13d, 1 jmp short loc_367B1 loc_367A9: mov rdi, r15 call my_dirend loc_367B1: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_367D5 mov eax, r13d add rsp, 228h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_367D5: call ___stack_chk_fail
long long my_rmtree(char *a1, long long a2) { long long v2; // rax long long v3; // r15 unsigned int v4; // eax long long v5; // r14 unsigned long long i; // r12 long long v7; // r13 _BYTE *v8; // r8 unsigned int v9; // eax unsigned int v10; // r13d char v12; // [rsp+0h] [rbp-250h] __int16 v13; // [rsp+1Eh] [rbp-232h] BYREF _BYTE v14[512]; // [rsp+20h] [rbp-230h] BYREF unsigned long long v15; // [rsp+220h] [rbp-30h] v15 = __readfsqword(0x28u); v13 = 47; v2 = my_dir(a1, 0x4000LL); if ( v2 ) { v3 = v2; v4 = *(_DWORD *)(v2 + 8); if ( v4 ) { v5 = 8LL; for ( i = 0LL; i < v4; ++i ) { v7 = *(_QWORD *)v3; v8 = *(_BYTE **)(*(_QWORD *)v3 + v5 - 8); if ( *v8 != 46 || v8[1] && (v8[1] != 46 || v8[2]) ) { strxnmov((unsigned int)v14, 512, (_DWORD)a1, (unsigned int)&v13, (_DWORD)v8, 0, v12); if ( (*(_DWORD *)(*(_QWORD *)(v7 + v5) + 24LL) & 0xF000) == 0x4000 ) v9 = my_rmtree(v14, a2); else v9 = my_delete((long long)v14, a2); v10 = v9; if ( v9 ) { my_dirend(v3); return v10; } v4 = *(_DWORD *)(v3 + 8); } v5 += 16LL; } } my_dirend(v3); return (unsigned int)rmdir(a1); } else { return 1; } }
my_rmtree: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x228 MOV qword ptr [RBP + -0x240],RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV word ptr [RBP + -0x232],0x2f MOV ESI,0x4000 MOV qword ptr [RBP + -0x248],RDI CALL 0x0012fd29 TEST RAX,RAX JZ 0x001367a1 MOV R15,RAX MOV EAX,dword ptr [RAX + 0x8] TEST EAX,EAX JZ 0x00136788 MOV R14D,0x8 LEA RBX,[RBP + -0x230] XOR R12D,R12D LAB_001366ee: MOV R13,qword ptr [R15] MOV R8,qword ptr [R13 + R14*0x1 + -0x8] CMP byte ptr [R8],0x2e JNZ 0x00136711 CMP byte ptr [R8 + 0x1],0x0 JZ 0x00136776 CMP byte ptr [R8 + 0x1],0x2e JNZ 0x00136711 CMP byte ptr [R8 + 0x2],0x0 JZ 0x00136776 LAB_00136711: MOV ESI,0x200 MOV RDI,RBX MOV RDX,qword ptr [RBP + -0x248] LEA RCX,[RBP + -0x232] XOR R9D,R9D XOR EAX,EAX CALL 0x001632f4 MOV RAX,qword ptr [R13 + R14*0x1] MOV EAX,dword ptr [RAX + 0x18] MOV ECX,0xf000 AND EAX,ECX MOV RDI,RBX CMP EAX,0x4000 JNZ 0x00136758 MOV RSI,qword ptr [RBP + -0x240] CALL 0x00136685 JMP 0x00136764 LAB_00136758: MOV RSI,qword ptr [RBP + -0x240] CALL 0x001365b0 LAB_00136764: MOV R13D,EAX TEST EAX,EAX JNZ 0x001367a9 MOV EAX,dword ptr [R15 + 0x8] LEA RBX,[RBP + -0x230] LAB_00136776: INC R12 MOV ECX,EAX ADD R14,0x10 CMP R12,RCX JC 0x001366ee LAB_00136788: MOV RDI,R15 CALL 0x0012fcf8 MOV RDI,qword ptr [RBP + -0x248] CALL 0x00124160 MOV R13D,EAX JMP 0x001367b1 LAB_001367a1: MOV R13D,0x1 JMP 0x001367b1 LAB_001367a9: MOV RDI,R15 CALL 0x0012fcf8 LAB_001367b1: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001367d5 MOV EAX,R13D ADD RSP,0x228 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001367d5: CALL 0x001243e0
int my_rmtree(char *param_1,int8 param_2) { long lVar1; char *pcVar2; uint uVar3; int iVar4; long *plVar5; ulong uVar6; long lVar7; long in_FS_OFFSET; int2 local_23a; int1 local_238 [512]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); local_23a = 0x2f; plVar5 = (long *)my_dir(param_1,0x4000); if (plVar5 == (long *)0x0) { iVar4 = 1; } else { uVar3 = *(uint *)(plVar5 + 1); if (uVar3 != 0) { lVar7 = 8; uVar6 = 0; do { lVar1 = *plVar5; pcVar2 = *(char **)(lVar1 + -8 + lVar7); if ((*pcVar2 != '.') || ((pcVar2[1] != '\0' && ((pcVar2[1] != '.' || (pcVar2[2] != '\0'))))) ) { strxnmov(local_238,0x200,param_1,&local_23a,pcVar2,0); if ((*(uint *)(*(long *)(lVar1 + lVar7) + 0x18) & 0xf000) == 0x4000) { iVar4 = my_rmtree(local_238,param_2); } else { iVar4 = my_delete(local_238,param_2); } if (iVar4 != 0) { my_dirend(plVar5); goto LAB_001367b1; } uVar3 = *(uint *)(plVar5 + 1); } uVar6 = uVar6 + 1; lVar7 = lVar7 + 0x10; } while (uVar6 < uVar3); } my_dirend(plVar5); iVar4 = rmdir(param_1); } LAB_001367b1: if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return iVar4; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
51,423
ImPlot3D::RenderTickMarks(ImDrawList*, ImPlot3DPlot const&, ImPlot3DPoint const*, ImVec2 const*, int const (*) [2], int)
zkingston[P]unknot/build_O1/_deps/implot3d-src/implot3d.cpp
void RenderTickMarks(ImDrawList* draw_list, const ImPlot3DPlot& plot, const ImPlot3DPoint* corners, const ImVec2* corners_pix, const int axis_corners[3][2], const int plane_2d) { ImU32 col_tick = GetStyleColorU32(ImPlot3DCol_AxisTick); auto DeterminePlaneForAxis = [&](int axis_idx) { if (plane_2d != -1) return plane_2d; // If no plane chosen (-1), use: // X or Y axis -> XY plane (2) // Z axis -> YZ plane (0) if (axis_idx == 2) return 1; // Z-axis use XZ plane else return 2; // X or Y-axis use XY plane }; for (int a = 0; a < 3; a++) { const ImPlot3DAxis& axis = plot.Axes[a]; if (ImPlot3D::ImHasFlag(axis.Flags, ImPlot3DAxisFlags_NoTickMarks)) continue; int idx0 = axis_corners[a][0]; int idx1 = axis_corners[a][1]; if (idx0 == idx1) // axis not visible or invalid continue; ImPlot3DPoint axis_start = corners[idx0]; ImPlot3DPoint axis_end = corners[idx1]; ImPlot3DPoint axis_dir = axis_end - axis_start; float axis_len = axis_dir.Length(); if (axis_len < 1e-12f) continue; axis_dir /= axis_len; // Draw axis line ImVec2 axis_start_pix = corners_pix[idx0]; ImVec2 axis_end_pix = corners_pix[idx1]; draw_list->AddLine(axis_start_pix, axis_end_pix, col_tick); // Choose plane int chosen_plane = DeterminePlaneForAxis(a); // Project axis_dir onto chosen plane ImPlot3DPoint proj_dir = axis_dir; if (chosen_plane == 0) { // YZ plane: zero out x proj_dir.x = 0.0f; } else if (chosen_plane == 1) { // XZ plane: zero out y proj_dir.y = 0.0f; } else if (chosen_plane == 2) { // XY plane: zero out z proj_dir.z = 0.0f; } float proj_len = proj_dir.Length(); if (proj_len < 1e-12f) { // Axis is parallel to plane normal or something degenerate, skip ticks continue; } proj_dir /= proj_len; // Rotate 90 degrees in chosen plane ImPlot3DPoint tick_dir; if (chosen_plane == 0) { // YZ plane // proj_dir=(0,py,pz), rotate 90°: (py,pz) -> (-pz,py) tick_dir = ImPlot3DPoint(0, -proj_dir.z, proj_dir.y); } else if (chosen_plane == 1) { // XZ plane (plane=1) // proj_dir=(px,0,pz), rotate 90°: (px,pz) -> (-pz,px) tick_dir = ImPlot3DPoint(-proj_dir.z, 0, proj_dir.x); } else { // XY plane // proj_dir=(px,py,0), rotate by 90°: (px,py) -> (-py,px) tick_dir = ImPlot3DPoint(-proj_dir.y, proj_dir.x, 0); } tick_dir.Normalize(); // Tick lengths in NDC units const float major_size_ndc = 0.06f; const float minor_size_ndc = 0.03f; for (int t = 0; t < axis.Ticker.TickCount(); ++t) { const ImPlot3DTick& tick = axis.Ticker.Ticks[t]; float v = (tick.PlotPos - axis.Range.Min) / (axis.Range.Max - axis.Range.Min); // Skip ticks that are out of range if (v < 0.0f || v > 1.0f) continue; ImPlot3DPoint tick_pos_ndc = PlotToNDC(axis_start + axis_dir * (v * axis_len)); // Half tick on each side of the axis line float size_tick_ndc = tick.Major ? major_size_ndc : minor_size_ndc; ImPlot3DPoint half_tick_ndc = tick_dir * (size_tick_ndc * 0.5f); ImPlot3DPoint T1_ndc = tick_pos_ndc - half_tick_ndc; ImPlot3DPoint T2_ndc = tick_pos_ndc + half_tick_ndc; ImVec2 T1_screen = NDCToPixels(T1_ndc); ImVec2 T2_screen = NDCToPixels(T2_ndc); draw_list->AddLine(T1_screen, T2_screen, col_tick); } } }
O1
cpp
ImPlot3D::RenderTickMarks(ImDrawList*, ImPlot3DPlot const&, ImPlot3DPoint const*, ImVec2 const*, int const (*) [2], int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movl %r9d, 0x8(%rsp) movq %r8, %r12 movq %rcx, 0x68(%rsp) movq %rdx, 0x78(%rsp) movq %rsi, %r13 movq %rdi, 0x48(%rsp) movq 0x2e9e9e(%rip), %rax # 0x336c98 movss 0x1cc(%rax), %xmm0 ucomiss 0x2421fb(%rip), %xmm0 # 0x28f004 jne 0x4ce3f jp 0x4ce3f movss 0x1bc(%rax), %xmm0 ucomiss 0x2421e8(%rip), %xmm0 # 0x28f004 jne 0x4ce4f jp 0x4ce4f xorl %edi, %edi callq 0x215eee movups (%rax), %xmm0 movss 0xc(%rax), %xmm1 mulss 0x247541(%rip), %xmm1 # 0x294378 movhlps %xmm0, %xmm0 # xmm0 = xmm0[1,1] unpcklps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1] jmp 0x4ce5d movsd 0x1c8(%rax), %xmm0 addq $0x1c0, %rax # imm = 0x1C0 jmp 0x4ce5d movsd 0x1b8(%rax), %xmm0 addq $0x1b0, %rax # imm = 0x1B0 movsd (%rax), %xmm1 movlhps %xmm0, %xmm1 # xmm1 = xmm1[0],xmm0[0] leaq 0x10(%rsp), %rdi movups %xmm1, (%rdi) callq 0x213cfe movl %eax, 0x4(%rsp) addq $0x78, %r13 xorl %ebx, %ebx movq %r12, 0x70(%rsp) imulq $0x70, %rbx, %rbp testb $0x4, (%r13,%rbp) jne 0x4d243 movslq (%r12,%rbx,8), %r14 movslq 0x4(%r12,%rbx,8), %r15 cmpl %r15d, %r14d je 0x4d243 leaq (%r14,%r14,2), %rax movq 0x78(%rsp), %rdx movss 0x8(%rdx,%rax,4), %xmm0 leaq (%r15,%r15,2), %rcx movss 0x8(%rdx,%rcx,4), %xmm2 movsd (%rdx,%rax,4), %xmm1 movsd (%rdx,%rcx,4), %xmm3 movaps %xmm1, 0xd0(%rsp) subps %xmm1, %xmm3 movss %xmm0, 0xc(%rsp) subss %xmm0, %xmm2 movaps %xmm3, %xmm0 mulps %xmm3, %xmm0 shufps $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1] movaps %xmm3, 0x50(%rsp) movaps %xmm3, %xmm1 mulss %xmm3, %xmm1 addss %xmm0, %xmm1 movss %xmm2, (%rsp) movaps %xmm2, %xmm0 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 ucomiss 0x242149(%rip), %xmm0 # 0x28f054 jb 0x4cf16 xorps %xmm1, %xmm1 sqrtss %xmm0, %xmm1 jmp 0x4cf1e callq 0x10240 movaps %xmm0, %xmm1 movss 0x247446(%rip), %xmm0 # 0x29436c ucomiss %xmm1, %xmm0 ja 0x4d243 movq 0x68(%rsp), %rcx movq (%rcx,%r14,8), %rax movq %rax, 0xa8(%rsp) movq (%rcx,%r15,8), %rax movq %rax, 0xa0(%rsp) movq 0x48(%rsp), %rdi leaq 0xa8(%rsp), %rsi leaq 0xa0(%rsp), %rdx movl 0x4(%rsp), %ecx movss 0x24209b(%rip), %xmm0 # 0x28f008 movaps %xmm1, 0xb0(%rsp) callq 0x23d9c0 xorl %r15d, %r15d cmpq $0x2, %rbx setne %r15b incl %r15d movl 0x8(%rsp), %eax cmpl $-0x1, %eax movaps 0xb0(%rsp), %xmm3 movaps %xmm3, %xmm0 shufps $0x0, %xmm3, %xmm0 # xmm0 = xmm0[0,0],xmm3[0,0] movaps 0x50(%rsp), %xmm1 divps %xmm0, %xmm1 movaps %xmm1, %xmm2 shufps $0x55, %xmm1, %xmm2 # xmm2 = xmm2[1,1],xmm1[1,1] movss (%rsp), %xmm0 divss %xmm3, %xmm0 cmovnel %eax, %r15d testl %r15d, %r15d movss %xmm0, (%rsp) movaps %xmm1, 0x50(%rsp) je 0x4cfdd movaps %xmm1, %xmm3 cmpl $0x2, %r15d je 0x4cfe5 cmpl $0x1, %r15d jne 0x4cfe0 xorps %xmm2, %xmm2 jmp 0x4cfe0 xorps %xmm3, %xmm3 movaps %xmm0, %xmm4 jmp 0x4cfe8 xorps %xmm4, %xmm4 movaps %xmm2, 0x30(%rsp) movaps %xmm2, %xmm0 mulss %xmm2, %xmm0 movaps %xmm3, %xmm1 mulss %xmm3, %xmm1 addss %xmm0, %xmm1 movaps %xmm4, %xmm0 mulss %xmm4, %xmm0 addss %xmm1, %xmm0 ucomiss 0x242043(%rip), %xmm0 # 0x28f054 jb 0x4d019 sqrtss %xmm0, %xmm0 jmp 0x4d038 movaps %xmm3, 0x20(%rsp) movaps %xmm4, 0xc0(%rsp) callq 0x10240 movaps 0xc0(%rsp), %xmm4 movaps 0x20(%rsp), %xmm3 movss 0x24732c(%rip), %xmm1 # 0x29436c ucomiss %xmm0, %xmm1 ja 0x4d23e movaps 0x30(%rsp), %xmm2 divss %xmm0, %xmm2 divss %xmm0, %xmm4 testl %r15d, %r15d je 0x4d078 divss %xmm0, %xmm3 cmpl $0x1, %r15d jne 0x4d08d xorps 0x2465a4(%rip), %xmm4 # 0x293610 xorps %xmm1, %xmm1 movss %xmm4, %xmm1 # xmm1 = xmm4[0],xmm1[1,2,3] movaps %xmm3, %xmm2 jmp 0x4d09d xorps 0x246591(%rip), %xmm4 # 0x293610 movq %xmm4, %xmm1 # xmm1 = xmm4[0],zero shufps $0xe2, 0x242035(%rip), %xmm1 # xmm1 = xmm1[2,0],mem[2,3] jmp 0x4d09d xorps 0x24657c(%rip), %xmm2 # 0x293610 movaps %xmm2, %xmm1 unpcklps %xmm3, %xmm1 # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1] xorps %xmm2, %xmm2 movaps %xmm1, %xmm0 mulps %xmm1, %xmm0 shufps $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1] movaps %xmm1, 0x20(%rsp) mulss %xmm1, %xmm1 addss %xmm0, %xmm1 movaps %xmm2, 0x30(%rsp) movaps %xmm2, %xmm0 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 ucomiss 0x241f89(%rip), %xmm0 # 0x28f054 jb 0x4d0d3 sqrtss %xmm0, %xmm0 jmp 0x4d0d8 callq 0x10240 addq %r13, %rbp cmpl $0x0, 0x28(%rbp) jle 0x4d23e movaps 0x30(%rsp), %xmm1 divss %xmm0, %xmm1 movaps %xmm1, 0x30(%rsp) shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] movaps 0x20(%rsp), %xmm1 divps %xmm0, %xmm1 movaps %xmm1, 0x20(%rsp) movl $0x4, %r15d xorl %r14d, %r14d movq 0x30(%rbp), %r12 movss -0x4(%r12,%r15), %xmm0 movss 0x8(%rbp), %xmm1 movss 0xc(%rbp), %xmm2 subss %xmm1, %xmm0 subss %xmm1, %xmm2 divss %xmm2, %xmm0 xorps %xmm1, %xmm1 ucomiss %xmm0, %xmm1 ja 0x4d22a ucomiss 0x241ec7(%rip), %xmm0 # 0x28f008 ja 0x4d22a mulss 0xb0(%rsp), %xmm0 movss (%rsp), %xmm1 mulss %xmm0, %xmm1 unpcklps %xmm0, %xmm0 # xmm0 = xmm0[0,0,1,1] mulps 0x50(%rsp), %xmm0 addps 0xd0(%rsp), %xmm0 addss 0xc(%rsp), %xmm1 movlps %xmm0, 0x10(%rsp) movss %xmm1, 0x18(%rsp) leaq 0x10(%rsp), %rdi callq 0x4d311 cmpb $0x0, (%r12,%r15) movss 0x2471e3(%rip), %xmm2 # 0x294374 jne 0x4d19b movss 0x2471e9(%rip), %xmm2 # 0x294384 movaps 0x30(%rsp), %xmm3 mulss %xmm2, %xmm3 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] mulps 0x20(%rsp), %xmm2 movaps %xmm0, %xmm4 subps %xmm2, %xmm4 movaps %xmm1, %xmm5 subss %xmm3, %xmm5 movlps %xmm4, 0x10(%rsp) movss %xmm5, 0x18(%rsp) addps %xmm0, %xmm2 addss %xmm1, %xmm3 movlps %xmm2, 0x90(%rsp) movss %xmm3, 0x98(%rsp) leaq 0x10(%rsp), %rdi callq 0x4d3c6 movlps %xmm0, 0x88(%rsp) leaq 0x90(%rsp), %rdi callq 0x4d3c6 movlps %xmm0, 0x80(%rsp) movq 0x48(%rsp), %rdi leaq 0x88(%rsp), %rsi leaq 0x80(%rsp), %rdx movl 0x4(%rsp), %ecx movss 0x241de3(%rip), %xmm0 # 0x28f008 callq 0x23d9c0 incq %r14 movslq 0x28(%rbp), %rax addq $0x18, %r15 cmpq %rax, %r14 jl 0x4d10d movq 0x70(%rsp), %r12 incq %rbx cmpq $0x3, %rbx jne 0x4ce80 addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN8ImPlot3D15RenderTickMarksEP10ImDrawListRK12ImPlot3DPlotPK13ImPlot3DPointPK6ImVec2PA2_Kii: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov [rsp+118h+var_110], r9d mov r12, r8 mov [rsp+118h+var_B0], rcx mov [rsp+118h+var_A0], rdx mov r13, rsi mov [rsp+118h+var_D0], rdi mov rax, cs:_ZN8ImPlot3D9GImPlot3DE; ImPlot3D::GImPlot3D movss xmm0, dword ptr [rax+1CCh] ucomiss xmm0, cs:flt_28F004 jnz short loc_4CE3F jp short loc_4CE3F movss xmm0, dword ptr [rax+1BCh] ucomiss xmm0, cs:flt_28F004 jnz short loc_4CE4F jp short loc_4CE4F xor edi, edi; this call _ZN5ImGui17GetStyleColorVec4Ei; ImGui::GetStyleColorVec4(int) movups xmm0, xmmword ptr [rax] movss xmm1, dword ptr [rax+0Ch] mulss xmm1, cs:flt_294378 movhlps xmm0, xmm0 unpcklps xmm0, xmm1 jmp short loc_4CE5D loc_4CE3F: movsd xmm0, qword ptr [rax+1C8h] add rax, 1C0h jmp short loc_4CE5D loc_4CE4F: movsd xmm0, qword ptr [rax+1B8h] add rax, 1B0h loc_4CE5D: movsd xmm1, qword ptr [rax] movlhps xmm1, xmm0 lea rdi, [rsp+118h+var_108] movups xmmword ptr [rdi], xmm1 call _ZN5ImGui23ColorConvertFloat4ToU32ERK6ImVec4; ImGui::ColorConvertFloat4ToU32(ImVec4 const&) mov [rsp+118h+var_114], eax add r13, 78h ; 'x' xor ebx, ebx mov [rsp+118h+var_A8], r12 loc_4CE80: imul rbp, rbx, 70h ; 'p' test byte ptr [r13+rbp+0], 4 jnz loc_4D243 movsxd r14, dword ptr [r12+rbx*8] movsxd r15, dword ptr [r12+rbx*8+4] cmp r14d, r15d jz loc_4D243 lea rax, [r14+r14*2] mov rdx, [rsp+118h+var_A0] movss xmm0, dword ptr [rdx+rax*4+8] lea rcx, [r15+r15*2] movss xmm2, dword ptr [rdx+rcx*4+8] movsd xmm1, qword ptr [rdx+rax*4] movsd xmm3, qword ptr [rdx+rcx*4] movaps [rsp+118h+var_48], xmm1 subps xmm3, xmm1 movss [rsp+118h+var_10C], xmm0 subss xmm2, xmm0 movaps xmm0, xmm3 mulps xmm0, xmm3 shufps xmm0, xmm0, 55h ; 'U' movaps [rsp+118h+var_C8], xmm3 movaps xmm1, xmm3 mulss xmm1, xmm3 addss xmm1, xmm0 movss [rsp+118h+var_118], xmm2 movaps xmm0, xmm2 mulss xmm0, xmm2 addss xmm0, xmm1 ucomiss xmm0, cs:dword_28F054 jb short loc_4CF16 xorps xmm1, xmm1 sqrtss xmm1, xmm0 jmp short loc_4CF1E loc_4CF16: call _sqrtf movaps xmm1, xmm0 loc_4CF1E: movss xmm0, cs:dword_29436C ucomiss xmm0, xmm1 ja loc_4D243 mov rcx, [rsp+118h+var_B0] mov rax, [rcx+r14*8] mov [rsp+118h+var_70], rax mov rax, [rcx+r15*8] mov [rsp+118h+var_78], rax mov rdi, [rsp+118h+var_D0]; this lea rsi, [rsp+118h+var_70]; ImPlot3DPoint * lea rdx, [rsp+118h+var_78] mov ecx, [rsp+118h+var_114] movss xmm0, cs:flt_28F008 movaps [rsp+118h+var_68], xmm1 call _ZN10ImDrawList7AddLineERK6ImVec2S2_jf; ImDrawList::AddLine(ImVec2 const&,ImVec2 const&,uint,float) xor r15d, r15d cmp rbx, 2 setnz r15b inc r15d mov eax, [rsp+118h+var_110] cmp eax, 0FFFFFFFFh movaps xmm3, [rsp+118h+var_68] movaps xmm0, xmm3 shufps xmm0, xmm3, 0 movaps xmm1, [rsp+118h+var_C8] divps xmm1, xmm0 movaps xmm2, xmm1 shufps xmm2, xmm1, 55h ; 'U' movss xmm0, [rsp+118h+var_118] divss xmm0, xmm3 cmovnz r15d, eax test r15d, r15d movss [rsp+118h+var_118], xmm0 movaps [rsp+118h+var_C8], xmm1 jz short loc_4CFDD movaps xmm3, xmm1 cmp r15d, 2 jz short loc_4CFE5 cmp r15d, 1 jnz short loc_4CFE0 xorps xmm2, xmm2 jmp short loc_4CFE0 loc_4CFDD: xorps xmm3, xmm3 loc_4CFE0: movaps xmm4, xmm0 jmp short loc_4CFE8 loc_4CFE5: xorps xmm4, xmm4 loc_4CFE8: movaps [rsp+118h+var_E8], xmm2 movaps xmm0, xmm2 mulss xmm0, xmm2 movaps xmm1, xmm3 mulss xmm1, xmm3 addss xmm1, xmm0 movaps xmm0, xmm4 mulss xmm0, xmm4 addss xmm0, xmm1 ucomiss xmm0, cs:dword_28F054 jb short loc_4D019 sqrtss xmm0, xmm0 jmp short loc_4D038 loc_4D019: movaps [rsp+118h+var_F8], xmm3 movaps [rsp+118h+var_58], xmm4 call _sqrtf movaps xmm4, [rsp+118h+var_58] movaps xmm3, [rsp+118h+var_F8] loc_4D038: movss xmm1, cs:dword_29436C ucomiss xmm1, xmm0 ja loc_4D23E movaps xmm2, [rsp+118h+var_E8] divss xmm2, xmm0 divss xmm4, xmm0 test r15d, r15d jz short loc_4D078 divss xmm3, xmm0 cmp r15d, 1 jnz short loc_4D08D xorps xmm4, cs:xmmword_293610 xorps xmm1, xmm1 movss xmm1, xmm4 movaps xmm2, xmm3 jmp short loc_4D09D loc_4D078: xorps xmm4, cs:xmmword_293610 movq xmm1, xmm4 shufps xmm1, cs:xmmword_28F0C0, 0E2h jmp short loc_4D09D loc_4D08D: xorps xmm2, cs:xmmword_293610 movaps xmm1, xmm2 unpcklps xmm1, xmm3 xorps xmm2, xmm2 loc_4D09D: movaps xmm0, xmm1 mulps xmm0, xmm1 shufps xmm0, xmm0, 55h ; 'U' movaps [rsp+118h+var_F8], xmm1 mulss xmm1, xmm1 addss xmm1, xmm0 movaps [rsp+118h+var_E8], xmm2 movaps xmm0, xmm2 mulss xmm0, xmm2 addss xmm0, xmm1 ucomiss xmm0, cs:dword_28F054 jb short loc_4D0D3 sqrtss xmm0, xmm0 jmp short loc_4D0D8 loc_4D0D3: call _sqrtf loc_4D0D8: add rbp, r13 cmp dword ptr [rbp+28h], 0 jle loc_4D23E movaps xmm1, [rsp+118h+var_E8] divss xmm1, xmm0 movaps [rsp+118h+var_E8], xmm1 shufps xmm0, xmm0, 0 movaps xmm1, [rsp+118h+var_F8] divps xmm1, xmm0 movaps [rsp+118h+var_F8], xmm1 mov r15d, 4 xor r14d, r14d loc_4D10D: mov r12, [rbp+30h] movss xmm0, dword ptr [r12+r15-4] movss xmm1, dword ptr [rbp+8] movss xmm2, dword ptr [rbp+0Ch] subss xmm0, xmm1 subss xmm2, xmm1 divss xmm0, xmm2 xorps xmm1, xmm1 ucomiss xmm1, xmm0 ja loc_4D22A ucomiss xmm0, cs:flt_28F008 ja loc_4D22A mulss xmm0, dword ptr [rsp+118h+var_68] movss xmm1, [rsp+118h+var_118] mulss xmm1, xmm0 unpcklps xmm0, xmm0 mulps xmm0, [rsp+118h+var_C8] addps xmm0, [rsp+118h+var_48] addss xmm1, [rsp+118h+var_10C] movlps [rsp+118h+var_108], xmm0 movss [rsp+118h+var_100], xmm1 lea rdi, [rsp+118h+var_108]; this call _ZN8ImPlot3D9PlotToNDCERK13ImPlot3DPoint; ImPlot3D::PlotToNDC(ImPlot3DPoint const&) cmp byte ptr [r12+r15], 0 movss xmm2, cs:dword_294374 jnz short loc_4D19B movss xmm2, cs:dword_294384 loc_4D19B: movaps xmm3, [rsp+118h+var_E8] mulss xmm3, xmm2 shufps xmm2, xmm2, 0 mulps xmm2, [rsp+118h+var_F8] movaps xmm4, xmm0 subps xmm4, xmm2 movaps xmm5, xmm1 subss xmm5, xmm3 movlps [rsp+118h+var_108], xmm4 movss [rsp+118h+var_100], xmm5 addps xmm2, xmm0 addss xmm3, xmm1 movlps [rsp+118h+var_88], xmm2 movss [rsp+118h+var_80], xmm3 lea rdi, [rsp+118h+var_108]; this call _ZN8ImPlot3D11NDCToPixelsERK13ImPlot3DPoint; ImPlot3D::NDCToPixels(ImPlot3DPoint const&) movlps [rsp+118h+var_90], xmm0 lea rdi, [rsp+118h+var_88]; this call _ZN8ImPlot3D11NDCToPixelsERK13ImPlot3DPoint; ImPlot3D::NDCToPixels(ImPlot3DPoint const&) movlps [rsp+118h+var_98], xmm0 mov rdi, [rsp+118h+var_D0]; this lea rsi, [rsp+118h+var_90] lea rdx, [rsp+118h+var_98] mov ecx, [rsp+118h+var_114] movss xmm0, cs:flt_28F008 call _ZN10ImDrawList7AddLineERK6ImVec2S2_jf; ImDrawList::AddLine(ImVec2 const&,ImVec2 const&,uint,float) loc_4D22A: inc r14 movsxd rax, dword ptr [rbp+28h] add r15, 18h cmp r14, rax jl loc_4D10D loc_4D23E: mov r12, [rsp+118h+var_A8] loc_4D243: inc rbx cmp rbx, 3 jnz loc_4CE80 add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
void ImPlot3D::RenderTickMarks(ImDrawList *a1, long long a2, long long a3, long long a4, long long a5, int a6) { __m128 *StyleColorVec4; // rax __m128 v8; // xmm1 __m128 v9; // xmm0 long long v10; // r13 long long v11; // rbx long long v12; // r14 long long v13; // r15 float v14; // xmm0_4 __int128 v15; // xmm2 __m128 v16; // xmm3 __m128 v17; // xmm3 float v18; // xmm1_4 __m128 v19; // xmm0 __m128 v20; // xmm1 ImDrawList *v21; // rdi const ImPlot3DPoint *v22; // rsi int v23; // r15d __m128 v24; // xmm1 __m128 v25; // xmm2 __m128 v26; // xmm0 __m128 v27; // xmm3 __m128 v28; // xmm4 float v29; // xmm0_4 __m128 v30; // xmm2 __m128 v31; // xmm1 __m128 v32; // xmm0 float v33; // xmm1_4 __m128 v34; // xmm0 long long v35; // rbp __m128 v36; // xmm1 long long v37; // r15 long long v38; // r14 long long v39; // r12 __m128 v40; // xmm0 float v41; // xmm1_4 __m128 v42; // xmm0 float v43; // xmm1_4 __m128 v44; // xmm2 float v45; // xmm3_4 __m128 v46; // xmm2 float v47; // [rsp+0h] [rbp-118h] float v48; // [rsp+0h] [rbp-118h] float v50; // [rsp+Ch] [rbp-10Ch] __m128 v51; // [rsp+10h] [rbp-108h] BYREF __m128 v52; // [rsp+20h] [rbp-F8h] __m128 v53; // [rsp+30h] [rbp-E8h] ImDrawList *v54; // [rsp+48h] [rbp-D0h] __m128 v55; // [rsp+50h] [rbp-C8h] long long v56; // [rsp+68h] [rbp-B0h] long long v57; // [rsp+70h] [rbp-A8h] long long v58; // [rsp+78h] [rbp-A0h] long long v59; // [rsp+80h] [rbp-98h] BYREF long long v60; // [rsp+88h] [rbp-90h] BYREF long long v61; // [rsp+90h] [rbp-88h] BYREF float v62; // [rsp+98h] [rbp-80h] long long v63; // [rsp+A0h] [rbp-78h] long long v64; // [rsp+A8h] [rbp-70h] BYREF __m128 v65; // [rsp+B0h] [rbp-68h] __m128 v66; // [rsp+C0h] [rbp-58h] __m128 v67; // [rsp+D0h] [rbp-48h] v56 = a4; v58 = a3; v54 = a1; if ( *((float *)ImPlot3D::GImPlot3D + 115) == -1.0 ) { if ( *((float *)ImPlot3D::GImPlot3D + 111) == -1.0 ) { StyleColorVec4 = (__m128 *)ImGui::GetStyleColorVec4(0LL, a2); v8 = (__m128)StyleColorVec4->m128_u32[3]; v8.m128_f32[0] = v8.m128_f32[0] * 0.25; v9 = _mm_unpacklo_ps(_mm_movehl_ps(*StyleColorVec4, *StyleColorVec4), v8); } else { v9 = (__m128)*((unsigned long long *)ImPlot3D::GImPlot3D + 55); StyleColorVec4 = (__m128 *)((char *)ImPlot3D::GImPlot3D + 432); } } else { v9 = (__m128)*((unsigned long long *)ImPlot3D::GImPlot3D + 57); StyleColorVec4 = (__m128 *)((char *)ImPlot3D::GImPlot3D + 448); } v51 = _mm_movelh_ps((__m128)StyleColorVec4->m128_u64[0], v9); ImGui::ColorConvertFloat4ToU32(&v51); v10 = a2 + 120; v11 = 0LL; v57 = a5; do { if ( (*(_BYTE *)(v10 + 112 * v11) & 4) != 0 ) goto LABEL_43; v12 = *(int *)(a5 + 8 * v11); v13 = *(int *)(a5 + 8 * v11 + 4); if ( (_DWORD)v12 == (_DWORD)v13 ) goto LABEL_43; v14 = *(float *)(v58 + 12 * v12 + 8); v15 = *(unsigned int *)(v58 + 12 * v13 + 8); v16 = (__m128)*(unsigned long long *)(v58 + 12 * v13); v67 = (__m128)*(unsigned long long *)(v58 + 12 * v12); v17 = _mm_sub_ps(v16, v67); v50 = v14; *(float *)&v15 = *(float *)&v15 - v14; v19 = _mm_mul_ps(v17, v17); v55 = v17; v18 = (float)(v17.m128_f32[0] * v17.m128_f32[0]) + _mm_shuffle_ps(v19, v19, 85).m128_f32[0]; v47 = *(float *)&v15; v19.m128_u64[1] = *((_QWORD *)&v15 + 1); v19.m128_f32[0] = (float)(*(float *)&v15 * *(float *)&v15) + v18; if ( v19.m128_f32[0] < 0.0 ) { *(double *)v19.m128_u64 = ((double (*)(void))sqrtf)(); v20 = v19; } else { v20 = 0LL; v20.m128_f32[0] = fsqrt(v19.m128_f32[0]); } if ( v20.m128_f32[0] < 1.0e-12 ) goto LABEL_43; v64 = *(_QWORD *)(v56 + 8 * v12); v63 = *(_QWORD *)(v56 + 8 * v13); v21 = v54; v22 = (const ImPlot3DPoint *)&v64; v65 = v20; ImDrawList::AddLine(v54); v23 = (v11 != 2) + 1; v24 = _mm_div_ps(v55, _mm_shuffle_ps(v65, v65, 0)); v25 = _mm_shuffle_ps(v24, v24, 85); v26 = (__m128)LODWORD(v47); v26.m128_f32[0] = v47 / v65.m128_f32[0]; if ( a6 != -1 ) v23 = a6; v48 = v47 / v65.m128_f32[0]; v55 = v24; if ( v23 ) { v27 = v24; if ( v23 == 2 ) { v28 = 0LL; goto LABEL_22; } if ( v23 == 1 ) v25 = 0LL; } else { v27 = 0LL; } v28 = v26; LABEL_22: v53 = v25; v29 = (float)(v28.m128_f32[0] * v28.m128_f32[0]) + (float)((float)(v27.m128_f32[0] * v27.m128_f32[0]) + (float)(v25.m128_f32[0] * v25.m128_f32[0])); if ( v29 < 0.0 ) { v52 = v27; v66 = v28; sqrtf(v21, &v64); v28 = v66; v27 = v52; } else { v29 = fsqrt(v29); } if ( v29 >= 1.0e-12 ) { v30 = v53; v30.m128_f32[0] = v53.m128_f32[0] / v29; v28.m128_f32[0] = v28.m128_f32[0] / v29; if ( v23 ) { v27.m128_f32[0] = v27.m128_f32[0] / v29; if ( v23 == 1 ) { v31 = 0LL; v31.m128_f32[0] = -v28.m128_f32[0]; v30 = v27; } else { v31 = _mm_unpacklo_ps(_mm_xor_ps(v30, (__m128)xmmword_293610), v27); v30 = 0LL; } } else { v31 = _mm_shuffle_ps( (__m128)_mm_move_epi64((__m128i)_mm_xor_ps(v28, (__m128)xmmword_293610)), (__m128)xmmword_28F0C0, 226); } v32 = _mm_mul_ps(v31, v31); v52 = v31; v33 = (float)(v31.m128_f32[0] * v31.m128_f32[0]) + _mm_shuffle_ps(v32, v32, 85).m128_f32[0]; v53 = v30; v34 = v30; v34.m128_f32[0] = (float)(v30.m128_f32[0] * v30.m128_f32[0]) + v33; if ( v34.m128_f32[0] < 0.0 ) sqrtf(v21, &v64); else v34.m128_f32[0] = fsqrt(v34.m128_f32[0]); v35 = v10 + 112 * v11; if ( *(int *)(v35 + 40) > 0 ) { v36 = v53; v36.m128_f32[0] = v53.m128_f32[0] / v34.m128_f32[0]; v53 = v36; v52 = _mm_div_ps(v52, _mm_shuffle_ps(v34, v34, 0)); v37 = 4LL; v38 = 0LL; do { v39 = *(_QWORD *)(v35 + 48); v40 = (__m128)*(unsigned int *)(v39 + v37 - 4); v40.m128_f32[0] = (float)(v40.m128_f32[0] - *(float *)(v35 + 8)) / (float)(*(float *)(v35 + 12) - *(float *)(v35 + 8)); if ( v40.m128_f32[0] >= 0.0 && v40.m128_f32[0] <= 1.0 ) { v40.m128_f32[0] = v40.m128_f32[0] * v65.m128_f32[0]; v41 = v48 * v40.m128_f32[0]; v42 = _mm_add_ps(_mm_mul_ps(_mm_unpacklo_ps(v40, v40), v55), v67); v43 = v41 + v50; _mm_storel_ps((double *)v51.m128_u64, v42); v51.m128_f32[2] = v43; ImPlot3D::PlotToNDC((ImPlot3D *)&v51, v22); v44 = (__m128)0x3CF5C28Fu; if ( !*(_BYTE *)(v39 + v37) ) v44 = (__m128)0x3C75C28Fu; v45 = v53.m128_f32[0] * v44.m128_f32[0]; v46 = _mm_mul_ps(_mm_shuffle_ps(v44, v44, 0), v52); _mm_storel_ps((double *)v51.m128_u64, _mm_sub_ps(v42, v46)); v51.m128_f32[2] = v43 - v45; _mm_storel_ps((double *)&v61, _mm_add_ps(v46, v42)); v62 = v45 + v43; ImPlot3D::NDCToPixels((ImPlot3D *)&v51, v22); _mm_storel_ps((double *)&v60, v42); ImPlot3D::NDCToPixels((ImPlot3D *)&v61, v22); _mm_storel_ps((double *)&v59, v42); v22 = (const ImPlot3DPoint *)&v60; ImDrawList::AddLine(v54); } ++v38; v37 += 24LL; } while ( v38 < *(int *)(v35 + 40) ); } } a5 = v57; LABEL_43: ++v11; } while ( v11 != 3 ); }
RenderTickMarks: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV dword ptr [RSP + 0x8],R9D MOV R12,R8 MOV qword ptr [RSP + 0x68],RCX MOV qword ptr [RSP + 0x78],RDX MOV R13,RSI MOV qword ptr [RSP + 0x48],RDI MOV RAX,qword ptr [0x00436c98] MOVSS XMM0,dword ptr [RAX + 0x1cc] UCOMISS XMM0,dword ptr [0x0038f004] JNZ 0x0014ce3f JP 0x0014ce3f MOVSS XMM0,dword ptr [RAX + 0x1bc] UCOMISS XMM0,dword ptr [0x0038f004] JNZ 0x0014ce4f JP 0x0014ce4f XOR EDI,EDI CALL 0x00315eee MOVUPS XMM0,xmmword ptr [RAX] MOVSS XMM1,dword ptr [RAX + 0xc] MULSS XMM1,dword ptr [0x00394378] MOVHLPS XMM0,XMM0 UNPCKLPS XMM0,XMM1 JMP 0x0014ce5d LAB_0014ce3f: MOVSD XMM0,qword ptr [RAX + 0x1c8] ADD RAX,0x1c0 JMP 0x0014ce5d LAB_0014ce4f: MOVSD XMM0,qword ptr [RAX + 0x1b8] ADD RAX,0x1b0 LAB_0014ce5d: MOVSD XMM1,qword ptr [RAX] MOVLHPS XMM1,XMM0 LEA RDI,[RSP + 0x10] MOVUPS xmmword ptr [RDI],XMM1 CALL 0x00313cfe MOV dword ptr [RSP + 0x4],EAX ADD R13,0x78 XOR EBX,EBX MOV qword ptr [RSP + 0x70],R12 LAB_0014ce80: IMUL RBP,RBX,0x70 TEST byte ptr [R13 + RBP*0x1],0x4 JNZ 0x0014d243 MOVSXD R14,dword ptr [R12 + RBX*0x8] MOVSXD R15,dword ptr [R12 + RBX*0x8 + 0x4] CMP R14D,R15D JZ 0x0014d243 LEA RAX,[R14 + R14*0x2] MOV RDX,qword ptr [RSP + 0x78] MOVSS XMM0,dword ptr [RDX + RAX*0x4 + 0x8] LEA RCX,[R15 + R15*0x2] MOVSS XMM2,dword ptr [RDX + RCX*0x4 + 0x8] MOVSD XMM1,qword ptr [RDX + RAX*0x4] MOVSD XMM3,qword ptr [RDX + RCX*0x4] MOVAPS xmmword ptr [RSP + 0xd0],XMM1 SUBPS XMM3,XMM1 MOVSS dword ptr [RSP + 0xc],XMM0 SUBSS XMM2,XMM0 MOVAPS XMM0,XMM3 MULPS XMM0,XMM3 SHUFPS XMM0,XMM0,0x55 MOVAPS xmmword ptr [RSP + 0x50],XMM3 MOVAPS XMM1,XMM3 MULSS XMM1,XMM3 ADDSS XMM1,XMM0 MOVSS dword ptr [RSP],XMM2 MOVAPS XMM0,XMM2 MULSS XMM0,XMM2 ADDSS XMM0,XMM1 UCOMISS XMM0,dword ptr [0x0038f054] JC 0x0014cf16 XORPS XMM1,XMM1 SQRTSS XMM1,XMM0 JMP 0x0014cf1e LAB_0014cf16: CALL 0x00110240 MOVAPS XMM1,XMM0 LAB_0014cf1e: MOVSS XMM0,dword ptr [0x0039436c] UCOMISS XMM0,XMM1 JA 0x0014d243 MOV RCX,qword ptr [RSP + 0x68] MOV RAX,qword ptr [RCX + R14*0x8] MOV qword ptr [RSP + 0xa8],RAX MOV RAX,qword ptr [RCX + R15*0x8] MOV qword ptr [RSP + 0xa0],RAX MOV RDI,qword ptr [RSP + 0x48] LEA RSI,[RSP + 0xa8] LEA RDX,[RSP + 0xa0] MOV ECX,dword ptr [RSP + 0x4] MOVSS XMM0,dword ptr [0x0038f008] MOVAPS xmmword ptr [RSP + 0xb0],XMM1 CALL 0x0033d9c0 XOR R15D,R15D CMP RBX,0x2 SETNZ R15B INC R15D MOV EAX,dword ptr [RSP + 0x8] CMP EAX,-0x1 MOVAPS XMM3,xmmword ptr [RSP + 0xb0] MOVAPS XMM0,XMM3 SHUFPS XMM0,XMM3,0x0 MOVAPS XMM1,xmmword ptr [RSP + 0x50] DIVPS XMM1,XMM0 MOVAPS XMM2,XMM1 SHUFPS XMM2,XMM1,0x55 MOVSS XMM0,dword ptr [RSP] DIVSS XMM0,XMM3 CMOVNZ R15D,EAX TEST R15D,R15D MOVSS dword ptr [RSP],XMM0 MOVAPS xmmword ptr [RSP + 0x50],XMM1 JZ 0x0014cfdd MOVAPS XMM3,XMM1 CMP R15D,0x2 JZ 0x0014cfe5 CMP R15D,0x1 JNZ 0x0014cfe0 XORPS XMM2,XMM2 JMP 0x0014cfe0 LAB_0014cfdd: XORPS XMM3,XMM3 LAB_0014cfe0: MOVAPS XMM4,XMM0 JMP 0x0014cfe8 LAB_0014cfe5: XORPS XMM4,XMM4 LAB_0014cfe8: MOVAPS xmmword ptr [RSP + 0x30],XMM2 MOVAPS XMM0,XMM2 MULSS XMM0,XMM2 MOVAPS XMM1,XMM3 MULSS XMM1,XMM3 ADDSS XMM1,XMM0 MOVAPS XMM0,XMM4 MULSS XMM0,XMM4 ADDSS XMM0,XMM1 UCOMISS XMM0,dword ptr [0x0038f054] JC 0x0014d019 SQRTSS XMM0,XMM0 JMP 0x0014d038 LAB_0014d019: MOVAPS xmmword ptr [RSP + 0x20],XMM3 MOVAPS xmmword ptr [RSP + 0xc0],XMM4 CALL 0x00110240 MOVAPS XMM4,xmmword ptr [RSP + 0xc0] MOVAPS XMM3,xmmword ptr [RSP + 0x20] LAB_0014d038: MOVSS XMM1,dword ptr [0x0039436c] UCOMISS XMM1,XMM0 JA 0x0014d23e MOVAPS XMM2,xmmword ptr [RSP + 0x30] DIVSS XMM2,XMM0 DIVSS XMM4,XMM0 TEST R15D,R15D JZ 0x0014d078 DIVSS XMM3,XMM0 CMP R15D,0x1 JNZ 0x0014d08d XORPS XMM4,xmmword ptr [0x00393610] XORPS XMM1,XMM1 MOVSS XMM1,XMM4 MOVAPS XMM2,XMM3 JMP 0x0014d09d LAB_0014d078: XORPS XMM4,xmmword ptr [0x00393610] MOVQ XMM1,XMM4 SHUFPS XMM1,xmmword ptr [0x0038f0c0],0xe2 JMP 0x0014d09d LAB_0014d08d: XORPS XMM2,xmmword ptr [0x00393610] MOVAPS XMM1,XMM2 UNPCKLPS XMM1,XMM3 XORPS XMM2,XMM2 LAB_0014d09d: MOVAPS XMM0,XMM1 MULPS XMM0,XMM1 SHUFPS XMM0,XMM0,0x55 MOVAPS xmmword ptr [RSP + 0x20],XMM1 MULSS XMM1,XMM1 ADDSS XMM1,XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM2 MOVAPS XMM0,XMM2 MULSS XMM0,XMM2 ADDSS XMM0,XMM1 UCOMISS XMM0,dword ptr [0x0038f054] JC 0x0014d0d3 SQRTSS XMM0,XMM0 JMP 0x0014d0d8 LAB_0014d0d3: CALL 0x00110240 LAB_0014d0d8: ADD RBP,R13 CMP dword ptr [RBP + 0x28],0x0 JLE 0x0014d23e MOVAPS XMM1,xmmword ptr [RSP + 0x30] DIVSS XMM1,XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM1 SHUFPS XMM0,XMM0,0x0 MOVAPS XMM1,xmmword ptr [RSP + 0x20] DIVPS XMM1,XMM0 MOVAPS xmmword ptr [RSP + 0x20],XMM1 MOV R15D,0x4 XOR R14D,R14D LAB_0014d10d: MOV R12,qword ptr [RBP + 0x30] MOVSS XMM0,dword ptr [R12 + R15*0x1 + -0x4] MOVSS XMM1,dword ptr [RBP + 0x8] MOVSS XMM2,dword ptr [RBP + 0xc] SUBSS XMM0,XMM1 SUBSS XMM2,XMM1 DIVSS XMM0,XMM2 XORPS XMM1,XMM1 UCOMISS XMM1,XMM0 JA 0x0014d22a UCOMISS XMM0,dword ptr [0x0038f008] JA 0x0014d22a MULSS XMM0,dword ptr [RSP + 0xb0] MOVSS XMM1,dword ptr [RSP] MULSS XMM1,XMM0 UNPCKLPS XMM0,XMM0 MULPS XMM0,xmmword ptr [RSP + 0x50] ADDPS XMM0,xmmword ptr [RSP + 0xd0] ADDSS XMM1,dword ptr [RSP + 0xc] MOVLPS qword ptr [RSP + 0x10],XMM0 MOVSS dword ptr [RSP + 0x18],XMM1 LEA RDI,[RSP + 0x10] CALL 0x0014d311 CMP byte ptr [R12 + R15*0x1],0x0 MOVSS XMM2,dword ptr [0x00394374] JNZ 0x0014d19b MOVSS XMM2,dword ptr [0x00394384] LAB_0014d19b: MOVAPS XMM3,xmmword ptr [RSP + 0x30] MULSS XMM3,XMM2 SHUFPS XMM2,XMM2,0x0 MULPS XMM2,xmmword ptr [RSP + 0x20] MOVAPS XMM4,XMM0 SUBPS XMM4,XMM2 MOVAPS XMM5,XMM1 SUBSS XMM5,XMM3 MOVLPS qword ptr [RSP + 0x10],XMM4 MOVSS dword ptr [RSP + 0x18],XMM5 ADDPS XMM2,XMM0 ADDSS XMM3,XMM1 MOVLPS qword ptr [RSP + 0x90],XMM2 MOVSS dword ptr [RSP + 0x98],XMM3 LEA RDI,[RSP + 0x10] CALL 0x0014d3c6 MOVLPS qword ptr [RSP + 0x88],XMM0 LEA RDI,[RSP + 0x90] CALL 0x0014d3c6 MOVLPS qword ptr [RSP + 0x80],XMM0 MOV RDI,qword ptr [RSP + 0x48] LEA RSI,[RSP + 0x88] LEA RDX,[RSP + 0x80] MOV ECX,dword ptr [RSP + 0x4] MOVSS XMM0,dword ptr [0x0038f008] CALL 0x0033d9c0 LAB_0014d22a: INC R14 MOVSXD RAX,dword ptr [RBP + 0x28] ADD R15,0x18 CMP R14,RAX JL 0x0014d10d LAB_0014d23e: MOV R12,qword ptr [RSP + 0x70] LAB_0014d243: INC RBX CMP RBX,0x3 JNZ 0x0014ce80 ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* ImPlot3D::RenderTickMarks(ImDrawList*, ImPlot3DPlot const&, ImPlot3DPoint const*, ImVec2 const*, int const (*) [2], int) */ void ImPlot3D::RenderTickMarks (ImDrawList *param_1,ImPlot3DPlot *param_2,ImPlot3DPoint *param_3,ImVec2 *param_4, int *param_5,int param_6) { long lVar1; int1 auVar2 [16]; int1 auVar3 [16]; uint uVar4; int8 *puVar5; long lVar6; long lVar7; long lVar8; int iVar9; long lVar10; int4 uVar11; float fVar12; float fVar13; int4 extraout_XMM0_Db; int8 uVar14; int4 extraout_XMM0_Dc; int4 extraout_XMM0_Dd; float fVar15; float extraout_XMM1_Da; int4 uVar16; int4 uVar17; float fVar18; float fVar19; float fVar20; float fVar21; float fVar22; int8 local_108; int8 uStack_100; int1 local_f8 [8]; float fStack_f0; float fStack_ec; float local_e8; float fStack_e4; float fStack_e0; float fStack_dc; ImDrawList *local_d0; int1 local_c8 [24]; ImVec2 *local_b0; int *local_a8; ImPlot3DPoint *local_a0; int8 local_98; int8 local_90; int8 local_88; float local_80; int8 local_78; int8 local_70; float local_68; int4 uStack_64; int4 uStack_60; int4 uStack_5c; int1 local_58 [16]; int8 local_48; int8 uStack_40; local_d0 = param_1; local_b0 = param_4; local_a0 = param_3; if ((*(float *)(GImPlot3D + 0x1cc) != DAT_0038f004) || (NAN(*(float *)(GImPlot3D + 0x1cc)) || NAN(DAT_0038f004))) { uVar11 = (int4)*(int8 *)(GImPlot3D + 0x1c8); fVar15 = (float)((ulong)*(int8 *)(GImPlot3D + 0x1c8) >> 0x20); puVar5 = (int8 *)(GImPlot3D + 0x1c0); } else if ((*(float *)(GImPlot3D + 0x1bc) != DAT_0038f004) || (NAN(*(float *)(GImPlot3D + 0x1bc)) || NAN(DAT_0038f004))) { uVar11 = (int4)*(int8 *)(GImPlot3D + 0x1b8); fVar15 = (float)((ulong)*(int8 *)(GImPlot3D + 0x1b8) >> 0x20); puVar5 = (int8 *)(GImPlot3D + 0x1b0); } else { puVar5 = (int8 *)ImGui::GetStyleColorVec4(0); uVar11 = *(int4 *)(puVar5 + 1); fVar15 = *(float *)((long)puVar5 + 0xc) * DAT_00394378; } local_108 = *puVar5; uStack_100 = CONCAT44(fVar15,uVar11); uVar4 = ImGui::ColorConvertFloat4ToU32((ImVec4 *)&local_108); lVar6 = 0; local_a8 = param_5; do { lVar7 = lVar6 * 0x70; if (((byte)param_2[lVar7 + 0x78] & 4) == 0) { lVar8 = (long)param_5[lVar6 * 2]; lVar10 = (long)param_5[lVar6 * 2 + 1]; if (param_5[lVar6 * 2] != param_5[lVar6 * 2 + 1]) { fVar15 = *(float *)(local_a0 + lVar8 * 0xc + 8); local_48 = *(int8 *)(local_a0 + lVar8 * 0xc); uStack_40 = 0; local_c8._0_4_ = (float)*(int8 *)(local_a0 + lVar10 * 0xc) - (float)local_48; local_c8._4_4_ = (float)((ulong)*(int8 *)(local_a0 + lVar10 * 0xc) >> 0x20) - (float)((ulong)local_48 >> 0x20); fVar18 = *(float *)(local_a0 + lVar10 * 0xc + 8) - fVar15; local_c8._8_8_ = 0; fVar12 = fVar18 * fVar18 + (float)local_c8._0_4_ * (float)local_c8._0_4_ + (float)local_c8._4_4_ * (float)local_c8._4_4_; if (fVar12 < DAT_0038f054) { fVar12 = sqrtf(fVar12); uVar11 = extraout_XMM0_Db; uVar16 = extraout_XMM0_Dc; uVar17 = extraout_XMM0_Dd; } else { fVar12 = SQRT(fVar12); uVar11 = 0; uVar16 = 0; uVar17 = 0; } if (DAT_0039436c <= fVar12) { local_70 = *(int8 *)(local_b0 + lVar8 * 8); local_78 = *(int8 *)(local_b0 + lVar10 * 8); local_68 = fVar12; uStack_64 = uVar11; uStack_60 = uVar16; uStack_5c = uVar17; ImDrawList::AddLine(local_d0,(ImVec2 *)&local_70,(ImVec2 *)&local_78,uVar4,DAT_0038f008); auVar2._4_4_ = local_68; auVar2._0_4_ = local_68; auVar2._8_4_ = local_68; auVar2._12_4_ = local_68; local_c8._0_16_ = divps(local_c8._0_16_,auVar2); fVar12 = SUB164(local_c8._0_16_,0); local_e8 = SUB164(local_c8._0_16_,4); fVar20 = SUB164(local_c8._0_16_,8); fVar21 = SUB164(local_c8._0_16_,0xc); fVar18 = fVar18 / local_68; iVar9 = (lVar6 != 2) + 1; if (param_6 != -1) { iVar9 = param_6; } fVar22 = fVar18; if (iVar9 == 0) { fVar12 = 0.0; fVar19 = 0.0; fVar20 = 0.0; fVar21 = 0.0; } else { fVar19 = local_e8; if (iVar9 == 2) { fVar22 = 0.0; } else if (iVar9 == 1) { local_e8 = 0.0; } } fVar13 = fVar22 * fVar22 + fVar12 * fVar12 + local_e8 * local_e8; fStack_e4 = local_e8; fStack_e0 = local_e8; fStack_dc = local_e8; if (fVar13 < DAT_0038f054) { local_f8._4_4_ = fVar19; local_f8._0_4_ = fVar12; fStack_f0 = fVar20; fStack_ec = fVar21; local_58 = ZEXT416((uint)fVar22); fVar13 = sqrtf(fVar13); fVar12 = (float)local_f8._0_4_; fVar19 = (float)local_f8._4_4_; fVar20 = fStack_f0; fVar21 = fStack_ec; fVar22 = (float)local_58._0_4_; } else { fVar13 = SQRT(fVar13); } param_5 = local_a8; if (DAT_0039436c <= fVar13) { local_e8 = local_e8 / fVar13; if (iVar9 == 0) { local_f8._4_4_ = (uint)(fVar22 / fVar13) ^ _DAT_00393610; local_f8._0_4_ = 0.0; fStack_f0 = (float)DAT_0038f0c8; fVar19 = DAT_0038f0cc; } else { local_f8._4_4_ = fVar12 / fVar13; if (iVar9 == 1) { local_f8._0_4_ = (uint)(fVar22 / fVar13) ^ _DAT_00393610; local_e8 = (float)local_f8._4_4_; fStack_e4 = fVar19; fStack_e0 = fVar20; fStack_dc = fVar21; local_f8._4_4_ = 0.0; fStack_f0 = (float)0; fVar19 = 0.0; } else { local_f8._0_4_ = (uint)local_e8 ^ _DAT_00393610; fStack_f0 = (float)((uint)fStack_e4 ^ _UNK_00393614); local_e8 = 0.0; fStack_e4 = 0.0; fStack_e0 = 0.0; fStack_dc = 0.0; } } fStack_ec = fVar19; fVar12 = local_e8 * local_e8 + (float)local_f8._0_4_ * (float)local_f8._0_4_ + (float)local_f8._4_4_ * (float)local_f8._4_4_; if (fVar12 < DAT_0038f054) { fVar12 = sqrtf(fVar12); } else { fVar12 = SQRT(fVar12); } param_5 = local_a8; if (0 < *(int *)(param_2 + lVar7 + 0xa0)) { local_e8 = local_e8 / fVar12; auVar3._4_4_ = fVar12; auVar3._0_4_ = fVar12; auVar3._8_4_ = fVar12; auVar3._12_4_ = fVar12; _local_f8 = divps(_local_f8,auVar3); lVar10 = 4; lVar8 = 0; do { lVar1 = *(long *)(param_2 + lVar7 + 0xa8); fVar12 = (*(float *)(lVar1 + -4 + lVar10) - *(float *)(param_2 + lVar7 + 0x80)) / (*(float *)(param_2 + lVar7 + 0x84) - *(float *)(param_2 + lVar7 + 0x80)); if ((0.0 <= fVar12) && (fVar12 <= DAT_0038f008)) { fVar12 = fVar12 * local_68; local_108 = CONCAT44(fVar12 * (float)local_c8._4_4_ + local_48._4_4_, fVar12 * (float)local_c8._0_4_ + (float)local_48); uStack_100._0_4_ = fVar18 * fVar12 + fVar15; uVar14 = PlotToNDC((ImPlot3DPoint *)&local_108); fVar20 = (float)((ulong)uVar14 >> 0x20); fVar12 = DAT_00394374; if (*(char *)(lVar1 + lVar10) == '\0') { fVar12 = DAT_00394384; } local_108 = CONCAT44(fVar20 - fVar12 * (float)local_f8._4_4_, (float)uVar14 - fVar12 * (float)local_f8._0_4_); uStack_100 = CONCAT44(uStack_100._4_4_,extraout_XMM1_Da - local_e8 * fVar12); local_80 = local_e8 * fVar12 + extraout_XMM1_Da; local_88 = CONCAT44(fVar12 * (float)local_f8._4_4_ + fVar20, fVar12 * (float)local_f8._0_4_ + (float)uVar14); local_90 = NDCToPixels((ImPlot3DPoint *)&local_108); local_98 = NDCToPixels((ImPlot3DPoint *)&local_88); ImDrawList::AddLine(local_d0,(ImVec2 *)&local_90,(ImVec2 *)&local_98,uVar4, DAT_0038f008); } lVar8 = lVar8 + 1; lVar10 = lVar10 + 0x18; param_5 = local_a8; } while (lVar8 < *(int *)(param_2 + lVar7 + 0xa0)); } } } } } lVar6 = lVar6 + 1; } while (lVar6 != 3); return; }
51,424
OpenSubdiv::v3_6_0::Far::Warning(char const*, ...)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/error.cpp
void Warning(const char *format, ...) { char message[10240]; va_list argptr; va_start(argptr, format); vsnprintf(message, 10240, format, argptr); va_end(argptr); if (warningFunc) { warningFunc(message); } else { fprintf(stdout, "Warning: %s\n", message); } }
O0
cpp
OpenSubdiv::v3_6_0::Far::Warning(char const*, ...): pushq %rbp movq %rsp, %rbp subq $0x28e0, %rsp # imm = 0x28E0 testb %al, %al je 0x11a787 movaps %xmm0, -0x28b0(%rbp) movaps %xmm1, -0x28a0(%rbp) movaps %xmm2, -0x2890(%rbp) movaps %xmm3, -0x2880(%rbp) movaps %xmm4, -0x2870(%rbp) movaps %xmm5, -0x2860(%rbp) movaps %xmm6, -0x2850(%rbp) movaps %xmm7, -0x2840(%rbp) movq %r9, -0x28b8(%rbp) movq %r8, -0x28c0(%rbp) movq %rcx, -0x28c8(%rbp) movq %rdx, -0x28d0(%rbp) movq %rsi, -0x28d8(%rbp) movq %rdi, -0x8(%rbp) leaq -0x2830(%rbp), %rax leaq -0x28e0(%rbp), %rcx movq %rcx, 0x10(%rax) leaq 0x10(%rbp), %rcx movq %rcx, 0x8(%rax) movl $0x30, 0x4(%rax) movl $0x8, (%rax) leaq -0x2810(%rbp), %rdi movq -0x8(%rbp), %rdx leaq -0x2830(%rbp), %rcx movl $0x2800, %esi # imm = 0x2800 callq 0xc90a0 leaq -0x2830(%rbp), %rax cmpq $0x0, 0x1310d0(%rip) # 0x24b8d0 je 0x11a814 movq 0x1310c7(%rip), %rax # 0x24b8d0 leaq -0x2810(%rbp), %rdi callq *%rax jmp 0x11a833 movq 0x1265bd(%rip), %rax # 0x240dd8 movq (%rax), %rdi leaq -0x2810(%rbp), %rdx leaq 0xd3781(%rip), %rsi # 0x1edfad movb $0x0, %al callq 0xd1ea0 addq $0x28e0, %rsp # imm = 0x28E0 popq %rbp retq nopl (%rax)
_ZN10OpenSubdiv6v3_6_03Far7WarningEPKcz: push rbp mov rbp, rsp sub rsp, 28E0h test al, al jz short loc_11A787 movaps [rbp+var_28B0], xmm0 movaps [rbp+var_28A0], xmm1 movaps [rbp+var_2890], xmm2 movaps [rbp+var_2880], xmm3 movaps [rbp+var_2870], xmm4 movaps [rbp+var_2860], xmm5 movaps [rbp+var_2850], xmm6 movaps [rbp+var_2840], xmm7 loc_11A787: mov [rbp+var_28B8], r9 mov [rbp+var_28C0], r8 mov [rbp+var_28C8], rcx mov [rbp+var_28D0], rdx mov [rbp+var_28D8], rsi mov [rbp+var_8], rdi lea rax, [rbp+var_2830] lea rcx, [rbp+var_28E0] mov [rax+10h], rcx lea rcx, [rbp+arg_0] mov [rax+8], rcx mov dword ptr [rax+4], 30h ; '0' mov dword ptr [rax], 8 lea rdi, [rbp+var_2810] mov rdx, [rbp+var_8] lea rcx, [rbp+var_2830] mov esi, 2800h call _vsnprintf lea rax, [rbp+var_2830] cmp cs:_ZN10OpenSubdiv6v3_6_03FarL11warningFuncE, 0; OpenSubdiv::v3_6_0::Far::warningFunc jz short loc_11A814 mov rax, cs:_ZN10OpenSubdiv6v3_6_03FarL11warningFuncE; OpenSubdiv::v3_6_0::Far::warningFunc lea rdi, [rbp+var_2810] call rax ; OpenSubdiv::v3_6_0::Far::warningFunc jmp short loc_11A833 loc_11A814: mov rax, cs:stdout_ptr mov rdi, [rax] lea rdx, [rbp+var_2810] lea rsi, aWarningS; "Warning: %s\n" mov al, 0 call _fprintf loc_11A833: add rsp, 28E0h pop rbp retn
long long OpenSubdiv::v3_6_0::Far::Warning( OpenSubdiv::v3_6_0::Far *this, const char *a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, char a15) { char v16; // [rsp+0h] [rbp-28E0h] BYREF const char *v17; // [rsp+8h] [rbp-28D8h] long long v18; // [rsp+10h] [rbp-28D0h] long long v19; // [rsp+18h] [rbp-28C8h] long long v20; // [rsp+20h] [rbp-28C0h] long long v21; // [rsp+28h] [rbp-28B8h] __m128 v22; // [rsp+30h] [rbp-28B0h] __m128 v23; // [rsp+40h] [rbp-28A0h] __m128 v24; // [rsp+50h] [rbp-2890h] __m128 v25; // [rsp+60h] [rbp-2880h] __m128 v26; // [rsp+70h] [rbp-2870h] __m128 v27; // [rsp+80h] [rbp-2860h] __m128 v28; // [rsp+90h] [rbp-2850h] __m128 v29; // [rsp+A0h] [rbp-2840h] _DWORD v30[2]; // [rsp+B0h] [rbp-2830h] BYREF char *v31; // [rsp+B8h] [rbp-2828h] char *v32; // [rsp+C0h] [rbp-2820h] char v33[10248]; // [rsp+D0h] [rbp-2810h] BYREF OpenSubdiv::v3_6_0::Far *v34; // [rsp+28D8h] [rbp-8h] v22 = a7; v23 = a8; v24 = a9; v25 = a10; v26 = a11; v27 = a12; v28 = a13; v29 = a14; v21 = a6; v20 = a5; v19 = a4; v18 = a3; v17 = a2; v34 = this; v32 = &v16; v31 = &a15; v30[1] = 48; v30[0] = 8; vsnprintf(v33, 10240LL, this, v30); if ( OpenSubdiv::v3_6_0::Far::warningFunc ) return OpenSubdiv::v3_6_0::Far::warningFunc(v33); else return fprintf(stdout, "Warning: %s\n", v33); }
51,425
OpenSubdiv::v3_6_0::Far::Warning(char const*, ...)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/error.cpp
void Warning(const char *format, ...) { char message[10240]; va_list argptr; va_start(argptr, format); vsnprintf(message, 10240, format, argptr); va_end(argptr); if (warningFunc) { warningFunc(message); } else { fprintf(stdout, "Warning: %s\n", message); } }
O1
cpp
OpenSubdiv::v3_6_0::Far::Warning(char const*, ...): subq $0x28d8, %rsp # imm = 0x28D8 movq %rdi, %r10 leaq 0x20(%rsp), %rdi movq %rsi, 0x8(%rdi) movq %rdx, 0x10(%rdi) movq %rcx, 0x18(%rdi) movq %r8, 0x20(%rdi) movq %r9, 0x28(%rdi) testb %al, %al je 0x5455c movaps %xmm0, 0x50(%rsp) movaps %xmm1, 0x60(%rsp) movaps %xmm2, 0x70(%rsp) movaps %xmm3, 0x80(%rsp) movaps %xmm4, 0x90(%rsp) movaps %xmm5, 0xa0(%rsp) movaps %xmm6, 0xb0(%rsp) movaps %xmm7, 0xc0(%rsp) movq %rsp, %rcx movq %rdi, 0x10(%rcx) leaq 0x28e0(%rsp), %rax movq %rax, 0x8(%rcx) movabsq $0x3000000008, %rax # imm = 0x3000000008 movq %rax, (%rcx) leaq 0xd0(%rsp), %rdi movl $0x2800, %esi # imm = 0x2800 movq %r10, %rdx callq 0x394c0 movq 0x8bd68(%rip), %rax # 0xe0300 testq %rax, %rax je 0x545a9 leaq 0xd0(%rsp), %rdi callq *%rax jmp 0x545c9 movq 0x89840(%rip), %rax # 0xdddf0 movq (%rax), %rdi leaq 0x61937(%rip), %rsi # 0xb5ef1 leaq 0xd0(%rsp), %rdx xorl %eax, %eax callq 0x3b0f0 addq $0x28d8, %rsp # imm = 0x28D8 retq nopl (%rax)
_ZN10OpenSubdiv6v3_6_03Far7WarningEPKcz: sub rsp, 28D8h mov r10, rdi lea rdi, [rsp+28D8h+var_28B8] mov [rdi+8], rsi mov [rdi+10h], rdx mov [rdi+18h], rcx mov [rdi+20h], r8 mov [rdi+28h], r9 test al, al jz short loc_5455C movaps [rsp+28D8h+var_2888], xmm0 movaps [rsp+28D8h+var_2878], xmm1 movaps [rsp+28D8h+var_2868], xmm2 movaps [rsp+28D8h+var_2858], xmm3 movaps [rsp+28D8h+var_2848], xmm4 movaps [rsp+28D8h+var_2838], xmm5 movaps [rsp+28D8h+var_2828], xmm6 movaps [rsp+28D8h+var_2818], xmm7 loc_5455C: mov rcx, rsp mov [rcx+10h], rdi lea rax, [rsp+28D8h+arg_0] mov [rcx+8], rax mov rax, 3000000008h mov [rcx], rax lea rdi, [rsp+28D8h+var_2808] mov esi, 2800h mov rdx, r10 call _vsnprintf mov rax, cs:_ZN10OpenSubdiv6v3_6_03FarL11warningFuncE; OpenSubdiv::v3_6_0::Far::warningFunc test rax, rax jz short loc_545A9 lea rdi, [rsp+28D8h+var_2808] call rax ; OpenSubdiv::v3_6_0::Far::warningFunc jmp short loc_545C9 loc_545A9: mov rax, cs:stdout_ptr mov rdi, [rax] lea rsi, aWarningS; "Warning: %s\n" lea rdx, [rsp+28D8h+var_2808] xor eax, eax call _fprintf loc_545C9: add rsp, 28D8h retn
long long OpenSubdiv::v3_6_0::Far::Warning( OpenSubdiv::v3_6_0::Far *this, const char *a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, char a15) { _QWORD v16[4]; // [rsp+0h] [rbp-28D8h] BYREF char v17; // [rsp+20h] [rbp-28B8h] BYREF const char *v18; // [rsp+28h] [rbp-28B0h] long long v19; // [rsp+30h] [rbp-28A8h] long long v20; // [rsp+38h] [rbp-28A0h] long long v21; // [rsp+40h] [rbp-2898h] long long v22; // [rsp+48h] [rbp-2890h] __m128 v23; // [rsp+50h] [rbp-2888h] __m128 v24; // [rsp+60h] [rbp-2878h] __m128 v25; // [rsp+70h] [rbp-2868h] __m128 v26; // [rsp+80h] [rbp-2858h] __m128 v27; // [rsp+90h] [rbp-2848h] __m128 v28; // [rsp+A0h] [rbp-2838h] __m128 v29; // [rsp+B0h] [rbp-2828h] __m128 v30; // [rsp+C0h] [rbp-2818h] char v31[10248]; // [rsp+D0h] [rbp-2808h] BYREF v23 = a7; v24 = a8; v25 = a9; v26 = a10; v27 = a11; v28 = a12; v29 = a13; v30 = a14; v18 = a2; v19 = a3; v20 = a4; v21 = a5; v22 = a6; v16[2] = &v17; v16[1] = &a15; v16[0] = 0x3000000008LL; ((void ( *)(char *, long long, OpenSubdiv::v3_6_0::Far *, _QWORD *, long long, long long))vsnprintf)( v31, 10240LL, this, v16, a5, a6); if ( OpenSubdiv::v3_6_0::Far::warningFunc ) return OpenSubdiv::v3_6_0::Far::warningFunc(v31); else return fprintf(stdout, "Warning: %s\n", v31); }
Warning: SUB RSP,0x28d8 MOV R10,RDI LEA RDI,[RSP + 0x20] MOV qword ptr [RDI + 0x8],RSI MOV qword ptr [RDI + 0x10],RDX MOV qword ptr [RDI + 0x18],RCX MOV qword ptr [RDI + 0x20],R8 MOV qword ptr [RDI + 0x28],R9 TEST AL,AL JZ 0x0015455c MOVAPS xmmword ptr [RSP + 0x50],XMM0 MOVAPS xmmword ptr [RSP + 0x60],XMM1 MOVAPS xmmword ptr [RSP + 0x70],XMM2 MOVAPS xmmword ptr [RSP + 0x80],XMM3 MOVAPS xmmword ptr [RSP + 0x90],XMM4 MOVAPS xmmword ptr [RSP + 0xa0],XMM5 MOVAPS xmmword ptr [RSP + 0xb0],XMM6 MOVAPS xmmword ptr [RSP + 0xc0],XMM7 LAB_0015455c: MOV RCX,RSP MOV qword ptr [RCX + 0x10],RDI LEA RAX,[RSP + 0x28e0] MOV qword ptr [RCX + 0x8],RAX MOV RAX,0x3000000008 MOV qword ptr [RCX],RAX LEA RDI,[RSP + 0xd0] MOV ESI,0x2800 MOV RDX,R10 CALL 0x001394c0 MOV RAX,qword ptr [0x001e0300] TEST RAX,RAX JZ 0x001545a9 LEA RDI,[RSP + 0xd0] CALL RAX JMP 0x001545c9 LAB_001545a9: MOV RAX,qword ptr [0x001dddf0] MOV RDI,qword ptr [RAX] LEA RSI,[0x1b5ef1] LEA RDX,[RSP + 0xd0] XOR EAX,EAX CALL 0x0013b0f0 LAB_001545c9: ADD RSP,0x28d8 RET
/* OpenSubdiv::v3_6_0::Far::Warning(char const*, ...) */ void OpenSubdiv::v3_6_0::Far::Warning(char *param_1,...) { char in_AL; int8 in_RCX; int8 in_RDX; int8 in_RSI; int8 in_R8; int8 in_R9; int8 in_XMM0_Qa; int8 in_XMM1_Qa; int8 in_XMM2_Qa; int8 in_XMM3_Qa; int8 in_XMM4_Qa; int8 in_XMM5_Qa; int8 in_XMM6_Qa; int8 in_XMM7_Qa; int8 local_28d8; int1 *local_28d0; int1 *local_28c8; int1 local_28b8 [8]; int8 local_28b0; int8 local_28a8; int8 local_28a0; int8 local_2898; int8 local_2890; int8 local_2888; int8 local_2878; int8 local_2868; int8 local_2858; int8 local_2848; int8 local_2838; int8 local_2828; int8 local_2818; char local_2808 [10248]; local_28c8 = local_28b8; if (in_AL != '\0') { local_2888 = in_XMM0_Qa; local_2878 = in_XMM1_Qa; local_2868 = in_XMM2_Qa; local_2858 = in_XMM3_Qa; local_2848 = in_XMM4_Qa; local_2838 = in_XMM5_Qa; local_2828 = in_XMM6_Qa; local_2818 = in_XMM7_Qa; } local_28d0 = &stack0x00000008; local_28d8 = 0x3000000008; local_28b0 = in_RSI; local_28a8 = in_RDX; local_28a0 = in_RCX; local_2898 = in_R8; local_2890 = in_R9; vsnprintf(local_2808,0x2800,param_1,&local_28d8); if (warningFunc == (code *)0x0) { fprintf(*(FILE **)PTR_stdout_001dddf0,"Warning: %s\n",local_2808); } else { (*warningFunc)(local_2808); } return; }
51,426
OpenSubdiv::v3_6_0::Far::Warning(char const*, ...)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/error.cpp
void Warning(const char *format, ...) { char message[10240]; va_list argptr; va_start(argptr, format); vsnprintf(message, 10240, format, argptr); va_end(argptr); if (warningFunc) { warningFunc(message); } else { fprintf(stdout, "Warning: %s\n", message); } }
O2
cpp
OpenSubdiv::v3_6_0::Far::Warning(char const*, ...): subq $0x28d8, %rsp # imm = 0x28D8 movq %rdi, %r10 leaq 0x20(%rsp), %rdi movq %rsi, 0x8(%rdi) movq %rdx, 0x10(%rdi) movq %rcx, 0x18(%rdi) movq %r8, 0x20(%rdi) movq %r9, 0x28(%rdi) testb %al, %al je 0x6b09a movaps %xmm0, 0x50(%rsp) movaps %xmm1, 0x60(%rsp) movaps %xmm2, 0x70(%rsp) movaps %xmm3, 0x80(%rsp) movaps %xmm4, 0x90(%rsp) movaps %xmm5, 0xa0(%rsp) movaps %xmm6, 0xb0(%rsp) movaps %xmm7, 0xc0(%rsp) movq %rsp, %rcx movq %rdi, 0x10(%rcx) leaq 0x28e0(%rsp), %rax movq %rax, 0x8(%rcx) movabsq $0x3000000008, %rax # imm = 0x3000000008 movq %rax, (%rcx) leaq 0xd0(%rsp), %rdi movl $0x2800, %esi # imm = 0x2800 movq %r10, %rdx callq 0x511a0 movq 0x8977a(%rip), %rax # 0xf4850 testq %rax, %rax je 0x6b0e7 leaq 0xd0(%rsp), %rdi callq *%rax jmp 0x6b107 movq 0x85d0a(%rip), %rax # 0xf0df8 movq (%rax), %rdi leaq 0x54f49(%rip), %rsi # 0xc0041 leaq 0xd0(%rsp), %rdx xorl %eax, %eax callq 0x53f90 addq $0x28d8, %rsp # imm = 0x28D8 retq nop
_ZN10OpenSubdiv6v3_6_03Far7WarningEPKcz: sub rsp, 28D8h mov r10, rdi lea rdi, [rsp+28D8h+var_28B8] mov [rdi+8], rsi mov [rdi+10h], rdx mov [rdi+18h], rcx mov [rdi+20h], r8 mov [rdi+28h], r9 test al, al jz short loc_6B09A movaps [rsp+28D8h+var_2888], xmm0 movaps [rsp+28D8h+var_2878], xmm1 movaps [rsp+28D8h+var_2868], xmm2 movaps [rsp+28D8h+var_2858], xmm3 movaps [rsp+28D8h+var_2848], xmm4 movaps [rsp+28D8h+var_2838], xmm5 movaps [rsp+28D8h+var_2828], xmm6 movaps [rsp+28D8h+var_2818], xmm7 loc_6B09A: mov rcx, rsp mov [rcx+10h], rdi lea rax, [rsp+28D8h+arg_0] mov [rcx+8], rax mov rax, 3000000008h mov [rcx], rax lea rdi, [rsp+28D8h+var_2808] mov esi, 2800h mov rdx, r10 call _vsnprintf mov rax, cs:_ZN10OpenSubdiv6v3_6_03FarL11warningFuncE; OpenSubdiv::v3_6_0::Far::warningFunc test rax, rax jz short loc_6B0E7 lea rdi, [rsp+28D8h+var_2808] call rax ; OpenSubdiv::v3_6_0::Far::warningFunc jmp short loc_6B107 loc_6B0E7: mov rax, cs:stdout_ptr mov rdi, [rax] lea rsi, aWarningS; "Warning: %s\n" lea rdx, [rsp+28D8h+var_2808] xor eax, eax call _fprintf loc_6B107: add rsp, 28D8h retn
long long OpenSubdiv::v3_6_0::Far::Warning( OpenSubdiv::v3_6_0::Far *this, const char *a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, char a15) { _QWORD v16[4]; // [rsp+0h] [rbp-28D8h] BYREF char v17; // [rsp+20h] [rbp-28B8h] BYREF const char *v18; // [rsp+28h] [rbp-28B0h] long long v19; // [rsp+30h] [rbp-28A8h] long long v20; // [rsp+38h] [rbp-28A0h] long long v21; // [rsp+40h] [rbp-2898h] long long v22; // [rsp+48h] [rbp-2890h] __m128 v23; // [rsp+50h] [rbp-2888h] __m128 v24; // [rsp+60h] [rbp-2878h] __m128 v25; // [rsp+70h] [rbp-2868h] __m128 v26; // [rsp+80h] [rbp-2858h] __m128 v27; // [rsp+90h] [rbp-2848h] __m128 v28; // [rsp+A0h] [rbp-2838h] __m128 v29; // [rsp+B0h] [rbp-2828h] __m128 v30; // [rsp+C0h] [rbp-2818h] char v31[10248]; // [rsp+D0h] [rbp-2808h] BYREF v23 = a7; v24 = a8; v25 = a9; v26 = a10; v27 = a11; v28 = a12; v29 = a13; v30 = a14; v18 = a2; v19 = a3; v20 = a4; v21 = a5; v22 = a6; v16[2] = &v17; v16[1] = &a15; v16[0] = 0x3000000008LL; ((void ( *)(char *, long long, OpenSubdiv::v3_6_0::Far *, _QWORD *, long long, long long))vsnprintf)( v31, 10240LL, this, v16, a5, a6); if ( OpenSubdiv::v3_6_0::Far::warningFunc ) return OpenSubdiv::v3_6_0::Far::warningFunc(v31); else return fprintf(stdout, "Warning: %s\n", v31); }
Warning: SUB RSP,0x28d8 MOV R10,RDI LEA RDI,[RSP + 0x20] MOV qword ptr [RDI + 0x8],RSI MOV qword ptr [RDI + 0x10],RDX MOV qword ptr [RDI + 0x18],RCX MOV qword ptr [RDI + 0x20],R8 MOV qword ptr [RDI + 0x28],R9 TEST AL,AL JZ 0x0016b09a MOVAPS xmmword ptr [RSP + 0x50],XMM0 MOVAPS xmmword ptr [RSP + 0x60],XMM1 MOVAPS xmmword ptr [RSP + 0x70],XMM2 MOVAPS xmmword ptr [RSP + 0x80],XMM3 MOVAPS xmmword ptr [RSP + 0x90],XMM4 MOVAPS xmmword ptr [RSP + 0xa0],XMM5 MOVAPS xmmword ptr [RSP + 0xb0],XMM6 MOVAPS xmmword ptr [RSP + 0xc0],XMM7 LAB_0016b09a: MOV RCX,RSP MOV qword ptr [RCX + 0x10],RDI LEA RAX,[RSP + 0x28e0] MOV qword ptr [RCX + 0x8],RAX MOV RAX,0x3000000008 MOV qword ptr [RCX],RAX LEA RDI,[RSP + 0xd0] MOV ESI,0x2800 MOV RDX,R10 CALL 0x001511a0 MOV RAX,qword ptr [0x001f4850] TEST RAX,RAX JZ 0x0016b0e7 LEA RDI,[RSP + 0xd0] CALL RAX JMP 0x0016b107 LAB_0016b0e7: MOV RAX,qword ptr [0x001f0df8] MOV RDI,qword ptr [RAX] LEA RSI,[0x1c0041] LEA RDX,[RSP + 0xd0] XOR EAX,EAX CALL 0x00153f90 LAB_0016b107: ADD RSP,0x28d8 RET
/* OpenSubdiv::v3_6_0::Far::Warning(char const*, ...) */ void OpenSubdiv::v3_6_0::Far::Warning(char *param_1,...) { char in_AL; int8 in_RCX; int8 in_RDX; int8 in_RSI; int8 in_R8; int8 in_R9; int8 in_XMM0_Qa; int8 in_XMM1_Qa; int8 in_XMM2_Qa; int8 in_XMM3_Qa; int8 in_XMM4_Qa; int8 in_XMM5_Qa; int8 in_XMM6_Qa; int8 in_XMM7_Qa; int8 local_28d8; int1 *local_28d0; int1 *local_28c8; int1 local_28b8 [8]; int8 local_28b0; int8 local_28a8; int8 local_28a0; int8 local_2898; int8 local_2890; int8 local_2888; int8 local_2878; int8 local_2868; int8 local_2858; int8 local_2848; int8 local_2838; int8 local_2828; int8 local_2818; char local_2808 [10248]; local_28c8 = local_28b8; if (in_AL != '\0') { local_2888 = in_XMM0_Qa; local_2878 = in_XMM1_Qa; local_2868 = in_XMM2_Qa; local_2858 = in_XMM3_Qa; local_2848 = in_XMM4_Qa; local_2838 = in_XMM5_Qa; local_2828 = in_XMM6_Qa; local_2818 = in_XMM7_Qa; } local_28d0 = &stack0x00000008; local_28d8 = 0x3000000008; local_28b0 = in_RSI; local_28a8 = in_RDX; local_28a0 = in_RCX; local_2898 = in_R8; local_2890 = in_R9; vsnprintf(local_2808,0x2800,param_1,&local_28d8); if (warningFunc == (code *)0x0) { fprintf(*(FILE **)PTR_stdout_001f0df8,"Warning: %s\n",local_2808); } else { (*warningFunc)(local_2808); } return; }
51,427
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)
monkey531[P]llama/common/json.hpp
inline cached_power get_cached_power_for_binary_exponent(int e) { // Now // // alpha <= e_c + e + q <= gamma (1) // ==> f_c * 2^alpha <= c * 2^e * 2^q // // and since the c's are normalized, 2^(q-1) <= f_c, // // ==> 2^(q - 1 + alpha) <= c * 2^(e + q) // ==> 2^(alpha - e - 1) <= c // // If c were an exact power of ten, i.e. c = 10^k, one may determine k as // // k = ceil( log_10( 2^(alpha - e - 1) ) ) // = ceil( (alpha - e - 1) * log_10(2) ) // // From the paper: // "In theory the result of the procedure could be wrong since c is rounded, // and the computation itself is approximated [...]. In practice, however, // this simple function is sufficient." // // For IEEE double precision floating-point numbers converted into // normalized diyfp's w = f * 2^e, with q = 64, // // e >= -1022 (min IEEE exponent) // -52 (p - 1) // -52 (p - 1, possibly normalize denormal IEEE numbers) // -11 (normalize the diyfp) // = -1137 // // and // // e <= +1023 (max IEEE exponent) // -52 (p - 1) // -11 (normalize the diyfp) // = 960 // // This binary exponent range [-1137,960] results in a decimal exponent // range [-307,324]. One does not need to store a cached power for each // k in this range. For each such k it suffices to find a cached power // such that the exponent of the product lies in [alpha,gamma]. // This implies that the difference of the decimal exponents of adjacent // table entries must be less than or equal to // // floor( (gamma - alpha) * log_10(2) ) = 8. // // (A smaller distance gamma-alpha would require a larger table.) // NB: // Actually this function returns c, such that -60 <= e_c + e + 64 <= -34. constexpr int kCachedPowersMinDecExp = -300; constexpr int kCachedPowersDecStep = 8; static constexpr std::array<cached_power, 79> kCachedPowers = { { { 0xAB70FE17C79AC6CA, -1060, -300 }, { 0xFF77B1FCBEBCDC4F, -1034, -292 }, { 0xBE5691EF416BD60C, -1007, -284 }, { 0x8DD01FAD907FFC3C, -980, -276 }, { 0xD3515C2831559A83, -954, -268 }, { 0x9D71AC8FADA6C9B5, -927, -260 }, { 0xEA9C227723EE8BCB, -901, -252 }, { 0xAECC49914078536D, -874, -244 }, { 0x823C12795DB6CE57, -847, -236 }, { 0xC21094364DFB5637, -821, -228 }, { 0x9096EA6F3848984F, -794, -220 }, { 0xD77485CB25823AC7, -768, -212 }, { 0xA086CFCD97BF97F4, -741, -204 }, { 0xEF340A98172AACE5, -715, -196 }, { 0xB23867FB2A35B28E, -688, -188 }, { 0x84C8D4DFD2C63F3B, -661, -180 }, { 0xC5DD44271AD3CDBA, -635, -172 }, { 0x936B9FCEBB25C996, -608, -164 }, { 0xDBAC6C247D62A584, -582, -156 }, { 0xA3AB66580D5FDAF6, -555, -148 }, { 0xF3E2F893DEC3F126, -529, -140 }, { 0xB5B5ADA8AAFF80B8, -502, -132 }, { 0x87625F056C7C4A8B, -475, -124 }, { 0xC9BCFF6034C13053, -449, -116 }, { 0x964E858C91BA2655, -422, -108 }, { 0xDFF9772470297EBD, -396, -100 }, { 0xA6DFBD9FB8E5B88F, -369, -92 }, { 0xF8A95FCF88747D94, -343, -84 }, { 0xB94470938FA89BCF, -316, -76 }, { 0x8A08F0F8BF0F156B, -289, -68 }, { 0xCDB02555653131B6, -263, -60 }, { 0x993FE2C6D07B7FAC, -236, -52 }, { 0xE45C10C42A2B3B06, -210, -44 }, { 0xAA242499697392D3, -183, -36 }, { 0xFD87B5F28300CA0E, -157, -28 }, { 0xBCE5086492111AEB, -130, -20 }, { 0x8CBCCC096F5088CC, -103, -12 }, { 0xD1B71758E219652C, -77, -4 }, { 0x9C40000000000000, -50, 4 }, { 0xE8D4A51000000000, -24, 12 }, { 0xAD78EBC5AC620000, 3, 20 }, { 0x813F3978F8940984, 30, 28 }, { 0xC097CE7BC90715B3, 56, 36 }, { 0x8F7E32CE7BEA5C70, 83, 44 }, { 0xD5D238A4ABE98068, 109, 52 }, { 0x9F4F2726179A2245, 136, 60 }, { 0xED63A231D4C4FB27, 162, 68 }, { 0xB0DE65388CC8ADA8, 189, 76 }, { 0x83C7088E1AAB65DB, 216, 84 }, { 0xC45D1DF942711D9A, 242, 92 }, { 0x924D692CA61BE758, 269, 100 }, { 0xDA01EE641A708DEA, 295, 108 }, { 0xA26DA3999AEF774A, 322, 116 }, { 0xF209787BB47D6B85, 348, 124 }, { 0xB454E4A179DD1877, 375, 132 }, { 0x865B86925B9BC5C2, 402, 140 }, { 0xC83553C5C8965D3D, 428, 148 }, { 0x952AB45CFA97A0B3, 455, 156 }, { 0xDE469FBD99A05FE3, 481, 164 }, { 0xA59BC234DB398C25, 508, 172 }, { 0xF6C69A72A3989F5C, 534, 180 }, { 0xB7DCBF5354E9BECE, 561, 188 }, { 0x88FCF317F22241E2, 588, 196 }, { 0xCC20CE9BD35C78A5, 614, 204 }, { 0x98165AF37B2153DF, 641, 212 }, { 0xE2A0B5DC971F303A, 667, 220 }, { 0xA8D9D1535CE3B396, 694, 228 }, { 0xFB9B7CD9A4A7443C, 720, 236 }, { 0xBB764C4CA7A44410, 747, 244 }, { 0x8BAB8EEFB6409C1A, 774, 252 }, { 0xD01FEF10A657842C, 800, 260 }, { 0x9B10A4E5E9913129, 827, 268 }, { 0xE7109BFBA19C0C9D, 853, 276 }, { 0xAC2820D9623BF429, 880, 284 }, { 0x80444B5E7AA7CF85, 907, 292 }, { 0xBF21E44003ACDD2D, 933, 300 }, { 0x8E679C2F5E44FF8F, 960, 308 }, { 0xD433179D9C8CB841, 986, 316 }, { 0x9E19DB92B4E31BA9, 1013, 324 }, } }; // This computation gives exactly the same results for k as // k = ceil((kAlpha - e - 1) * 0.30102999566398114) // for |e| <= 1500, but doesn't require floating-point operations. // NB: log_10(2) ~= 78913 / 2^18 JSON_ASSERT(e >= -1500); JSON_ASSERT(e <= 1500); const int f = kAlpha - e - 1; const int k = (f * 78913) / (1 << 18) + static_cast<int>(f > 0); const int index = (-kCachedPowersMinDecExp + k + (kCachedPowersDecStep - 1)) / kCachedPowersDecStep; JSON_ASSERT(index >= 0); JSON_ASSERT(static_cast<std::size_t>(index) < kCachedPowers.size()); const cached_power cached = kCachedPowers[static_cast<std::size_t>(index)]; JSON_ASSERT(kAlpha <= cached.e + e + 64); JSON_ASSERT(kGamma >= cached.e + e + 64); return cached; }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int): subq $0x38, %rsp movl %edi, 0x24(%rsp) movl $0xfffffed4, 0x20(%rsp) # imm = 0xFFFFFED4 movl $0x8, 0x1c(%rsp) cmpl $0xfffffa24, 0x24(%rsp) # imm = 0xFFFFFA24 jge 0x1b0a33 leaq 0x7caee(%rip), %rdi # 0x22d507 movl $0x43e4, %esi # imm = 0x43E4 leaq 0x762b0(%rip), %rdx # 0x226cd5 leaq 0x8272c(%rip), %rcx # 0x233158 movb $0x0, %al callq 0x5ef80 cmpl $0x5dc, 0x24(%rsp) # imm = 0x5DC jle 0x1b0a5e leaq 0x7cac3(%rip), %rdi # 0x22d507 movl $0x43e5, %esi # imm = 0x43E5 leaq 0x76285(%rip), %rdx # 0x226cd5 leaq 0x8270c(%rip), %rcx # 0x233163 movb $0x0, %al callq 0x5ef80 movl $0xffffffc4, %eax # imm = 0xFFFFFFC4 subl 0x24(%rsp), %eax subl $0x1, %eax movl %eax, 0x18(%rsp) imull $0x13441, 0x18(%rsp), %eax # imm = 0x13441 movl $0x40000, %ecx # imm = 0x40000 cltd idivl %ecx cmpl $0x0, 0x18(%rsp) setg %cl andb $0x1, %cl movzbl %cl, %ecx addl %ecx, %eax movl %eax, 0x14(%rsp) movl 0x14(%rsp), %eax addl $0x12c, %eax # imm = 0x12C addl $0x7, %eax movl $0x8, %ecx cltd idivl %ecx movl %eax, 0x10(%rsp) cmpl $0x0, 0x10(%rsp) jge 0x1b0ad2 leaq 0x7ca4f(%rip), %rdi # 0x22d507 movl $0x43ea, %esi # imm = 0x43EA leaq 0x76211(%rip), %rdx # 0x226cd5 leaq 0x826a2(%rip), %rcx # 0x23316d movb $0x0, %al callq 0x5ef80 movslq 0x10(%rsp), %rax movq %rax, 0x8(%rsp) leaq 0x84b3d(%rip), %rdi # 0x235620 callq 0x1b11c0 movq %rax, %rcx movq 0x8(%rsp), %rax cmpq %rcx, %rax jb 0x1b0b16 leaq 0x7ca0b(%rip), %rdi # 0x22d507 movl $0x43eb, %esi # imm = 0x43EB leaq 0x761cd(%rip), %rdx # 0x226cd5 leaq 0x82669(%rip), %rcx # 0x233178 movb $0x0, %al callq 0x5ef80 movslq 0x10(%rsp), %rsi leaq 0x84afe(%rip), %rdi # 0x235620 callq 0x1b11d0 movq (%rax), %rcx movq %rcx, 0x28(%rsp) movq 0x8(%rax), %rax movq %rax, 0x30(%rsp) movl 0x30(%rsp), %ecx addl 0x24(%rsp), %ecx addl $0x40, %ecx movl $0xffffffc4, %eax # imm = 0xFFFFFFC4 cmpl %ecx, %eax jle 0x1b0b6d leaq 0x7c9b4(%rip), %rdi # 0x22d507 movl $0x43ee, %esi # imm = 0x43EE leaq 0x76176(%rip), %rdx # 0x226cd5 leaq 0x82649(%rip), %rcx # 0x2331af movb $0x0, %al callq 0x5ef80 movl 0x30(%rsp), %ecx addl 0x24(%rsp), %ecx addl $0x40, %ecx movl $0xffffffe0, %eax # imm = 0xFFFFFFE0 cmpl %ecx, %eax jge 0x1b0ba2 leaq 0x7c97f(%rip), %rdi # 0x22d507 movl $0x43ef, %esi # imm = 0x43EF leaq 0x76141(%rip), %rdx # 0x226cd5 leaq 0x82630(%rip), %rcx # 0x2331cb movb $0x0, %al callq 0x5ef80 movq 0x28(%rsp), %rax movq 0x30(%rsp), %rdx addq $0x38, %rsp retq nopw %cs:(%rax,%rax) nopl (%rax,%rax)
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl36get_cached_power_for_binary_exponentEi: sub rsp, 38h mov [rsp+38h+var_14], edi mov [rsp+38h+var_18], 0FFFFFED4h mov [rsp+38h+var_1C], 8 cmp [rsp+38h+var_14], 0FFFFFA24h jge short loc_1B0A33 lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov esi, 43E4h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aE1500; "e >= -1500" mov al, 0 call _ggml_abort loc_1B0A33: cmp [rsp+38h+var_14], 5DCh jle short loc_1B0A5E lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov esi, 43E5h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aE1500_0; "e <= 1500" mov al, 0 call _ggml_abort loc_1B0A5E: mov eax, 0FFFFFFC4h sub eax, [rsp+38h+var_14] sub eax, 1 mov [rsp+38h+var_20], eax imul eax, [rsp+38h+var_20], 13441h mov ecx, 40000h cdq idiv ecx cmp [rsp+38h+var_20], 0 setnle cl and cl, 1 movzx ecx, cl add eax, ecx mov [rsp+38h+var_24], eax mov eax, [rsp+38h+var_24] add eax, 12Ch add eax, 7 mov ecx, 8 cdq idiv ecx mov [rsp+38h+var_28], eax cmp [rsp+38h+var_28], 0 jge short loc_1B0AD2 lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov esi, 43EAh lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aIndex0; "index >= 0" mov al, 0 call _ggml_abort loc_1B0AD2: movsxd rax, [rsp+38h+var_28] mov [rsp+38h+var_30], rax lea rdi, _ZZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl36get_cached_power_for_binary_exponentEiE13kCachedPowers; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers call _ZNKSt5arrayIN8nlohmann16json_abi_v3_11_36detail9dtoa_impl12cached_powerELm79EE4sizeEv; std::array<nlohmann::json_abi_v3_11_3::detail::dtoa_impl::cached_power,79ul>::size(void) mov rcx, rax mov rax, [rsp+38h+var_30] cmp rax, rcx jb short loc_1B0B16 lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov esi, 43EBh lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aStaticCastStdS; "static_cast<std::size_t>(index) < kCach"... mov al, 0 call _ggml_abort loc_1B0B16: movsxd rsi, [rsp+38h+var_28] lea rdi, _ZZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl36get_cached_power_for_binary_exponentEiE13kCachedPowers; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers call _ZNKSt5arrayIN8nlohmann16json_abi_v3_11_36detail9dtoa_impl12cached_powerELm79EEixEm; std::array<nlohmann::json_abi_v3_11_3::detail::dtoa_impl::cached_power,79ul>::operator[](ulong) mov rcx, [rax] mov [rsp+38h+var_10], rcx mov rax, [rax+8] mov [rsp+38h+var_8], rax mov ecx, dword ptr [rsp+38h+var_8] add ecx, [rsp+38h+var_14] add ecx, 40h ; '@' mov eax, 0FFFFFFC4h cmp eax, ecx jle short loc_1B0B6D lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov esi, 43EEh lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKalphaCachedEE; "kAlpha <= cached.e + e + 64" mov al, 0 call _ggml_abort loc_1B0B6D: mov ecx, dword ptr [rsp+38h+var_8] add ecx, [rsp+38h+var_14] add ecx, 40h ; '@' mov eax, 0FFFFFFE0h cmp eax, ecx jge short loc_1B0BA2 lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov esi, 43EFh lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKgammaCachedEE; "kGamma >= cached.e + e + 64" mov al, 0 call _ggml_abort loc_1B0BA2: mov rax, [rsp+38h+var_10] mov rdx, [rsp+38h+var_8] add rsp, 38h retn
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent( nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this, long long a2) { long long v2; // rdx long long *v3; // rax int v5; // [rsp+10h] [rbp-28h] int v6; // [rsp+14h] [rbp-24h] long long v7; // [rsp+28h] [rbp-10h] long long v8; // [rsp+30h] [rbp-8h] if ( (int)this < -1500 ) { a2 = 17380LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17380LL, "GGML_ASSERT(%s) failed", "e >= -1500"); } if ( (int)this > 1500 ) { a2 = 17381LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17381LL, "GGML_ASSERT(%s) failed", "e <= 1500"); } v6 = (-60 - (int)this - 1 > 0) + 78913 * (-60 - (int)this - 1) / 0x40000; v2 = (unsigned int)((v6 + 307) >> 31); LODWORD(v2) = (v6 + 307) % 8; v5 = (v6 + 307) / 8; if ( v5 < 0 ) { a2 = 17386LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17386LL, "GGML_ASSERT(%s) failed", "index >= 0"); } if ( v5 >= (unsigned long long)std::array<nlohmann::json_abi_v3_11_3::detail::dtoa_impl::cached_power,79ul>::size( &nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers, a2, v2) ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17387LL, "GGML_ASSERT(%s) failed", "static_cast<std::size_t>(index) < kCachedPowers.size()"); v3 = (long long *)std::array<nlohmann::json_abi_v3_11_3::detail::dtoa_impl::cached_power,79ul>::operator[]( &nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers, v5); v7 = *v3; v8 = v3[1]; if ( (int)this + (int)v8 + 64 < -60 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17390LL, "GGML_ASSERT(%s) failed", "kAlpha <= cached.e + e + 64"); if ( (int)this + (int)v8 + 64 > -32 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17391LL, "GGML_ASSERT(%s) failed", "kGamma >= cached.e + e + 64"); return v7; }
51,428
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)
monkey531[P]llama/common/json.hpp
inline cached_power get_cached_power_for_binary_exponent(int e) { // Now // // alpha <= e_c + e + q <= gamma (1) // ==> f_c * 2^alpha <= c * 2^e * 2^q // // and since the c's are normalized, 2^(q-1) <= f_c, // // ==> 2^(q - 1 + alpha) <= c * 2^(e + q) // ==> 2^(alpha - e - 1) <= c // // If c were an exact power of ten, i.e. c = 10^k, one may determine k as // // k = ceil( log_10( 2^(alpha - e - 1) ) ) // = ceil( (alpha - e - 1) * log_10(2) ) // // From the paper: // "In theory the result of the procedure could be wrong since c is rounded, // and the computation itself is approximated [...]. In practice, however, // this simple function is sufficient." // // For IEEE double precision floating-point numbers converted into // normalized diyfp's w = f * 2^e, with q = 64, // // e >= -1022 (min IEEE exponent) // -52 (p - 1) // -52 (p - 1, possibly normalize denormal IEEE numbers) // -11 (normalize the diyfp) // = -1137 // // and // // e <= +1023 (max IEEE exponent) // -52 (p - 1) // -11 (normalize the diyfp) // = 960 // // This binary exponent range [-1137,960] results in a decimal exponent // range [-307,324]. One does not need to store a cached power for each // k in this range. For each such k it suffices to find a cached power // such that the exponent of the product lies in [alpha,gamma]. // This implies that the difference of the decimal exponents of adjacent // table entries must be less than or equal to // // floor( (gamma - alpha) * log_10(2) ) = 8. // // (A smaller distance gamma-alpha would require a larger table.) // NB: // Actually this function returns c, such that -60 <= e_c + e + 64 <= -34. constexpr int kCachedPowersMinDecExp = -300; constexpr int kCachedPowersDecStep = 8; static constexpr std::array<cached_power, 79> kCachedPowers = { { { 0xAB70FE17C79AC6CA, -1060, -300 }, { 0xFF77B1FCBEBCDC4F, -1034, -292 }, { 0xBE5691EF416BD60C, -1007, -284 }, { 0x8DD01FAD907FFC3C, -980, -276 }, { 0xD3515C2831559A83, -954, -268 }, { 0x9D71AC8FADA6C9B5, -927, -260 }, { 0xEA9C227723EE8BCB, -901, -252 }, { 0xAECC49914078536D, -874, -244 }, { 0x823C12795DB6CE57, -847, -236 }, { 0xC21094364DFB5637, -821, -228 }, { 0x9096EA6F3848984F, -794, -220 }, { 0xD77485CB25823AC7, -768, -212 }, { 0xA086CFCD97BF97F4, -741, -204 }, { 0xEF340A98172AACE5, -715, -196 }, { 0xB23867FB2A35B28E, -688, -188 }, { 0x84C8D4DFD2C63F3B, -661, -180 }, { 0xC5DD44271AD3CDBA, -635, -172 }, { 0x936B9FCEBB25C996, -608, -164 }, { 0xDBAC6C247D62A584, -582, -156 }, { 0xA3AB66580D5FDAF6, -555, -148 }, { 0xF3E2F893DEC3F126, -529, -140 }, { 0xB5B5ADA8AAFF80B8, -502, -132 }, { 0x87625F056C7C4A8B, -475, -124 }, { 0xC9BCFF6034C13053, -449, -116 }, { 0x964E858C91BA2655, -422, -108 }, { 0xDFF9772470297EBD, -396, -100 }, { 0xA6DFBD9FB8E5B88F, -369, -92 }, { 0xF8A95FCF88747D94, -343, -84 }, { 0xB94470938FA89BCF, -316, -76 }, { 0x8A08F0F8BF0F156B, -289, -68 }, { 0xCDB02555653131B6, -263, -60 }, { 0x993FE2C6D07B7FAC, -236, -52 }, { 0xE45C10C42A2B3B06, -210, -44 }, { 0xAA242499697392D3, -183, -36 }, { 0xFD87B5F28300CA0E, -157, -28 }, { 0xBCE5086492111AEB, -130, -20 }, { 0x8CBCCC096F5088CC, -103, -12 }, { 0xD1B71758E219652C, -77, -4 }, { 0x9C40000000000000, -50, 4 }, { 0xE8D4A51000000000, -24, 12 }, { 0xAD78EBC5AC620000, 3, 20 }, { 0x813F3978F8940984, 30, 28 }, { 0xC097CE7BC90715B3, 56, 36 }, { 0x8F7E32CE7BEA5C70, 83, 44 }, { 0xD5D238A4ABE98068, 109, 52 }, { 0x9F4F2726179A2245, 136, 60 }, { 0xED63A231D4C4FB27, 162, 68 }, { 0xB0DE65388CC8ADA8, 189, 76 }, { 0x83C7088E1AAB65DB, 216, 84 }, { 0xC45D1DF942711D9A, 242, 92 }, { 0x924D692CA61BE758, 269, 100 }, { 0xDA01EE641A708DEA, 295, 108 }, { 0xA26DA3999AEF774A, 322, 116 }, { 0xF209787BB47D6B85, 348, 124 }, { 0xB454E4A179DD1877, 375, 132 }, { 0x865B86925B9BC5C2, 402, 140 }, { 0xC83553C5C8965D3D, 428, 148 }, { 0x952AB45CFA97A0B3, 455, 156 }, { 0xDE469FBD99A05FE3, 481, 164 }, { 0xA59BC234DB398C25, 508, 172 }, { 0xF6C69A72A3989F5C, 534, 180 }, { 0xB7DCBF5354E9BECE, 561, 188 }, { 0x88FCF317F22241E2, 588, 196 }, { 0xCC20CE9BD35C78A5, 614, 204 }, { 0x98165AF37B2153DF, 641, 212 }, { 0xE2A0B5DC971F303A, 667, 220 }, { 0xA8D9D1535CE3B396, 694, 228 }, { 0xFB9B7CD9A4A7443C, 720, 236 }, { 0xBB764C4CA7A44410, 747, 244 }, { 0x8BAB8EEFB6409C1A, 774, 252 }, { 0xD01FEF10A657842C, 800, 260 }, { 0x9B10A4E5E9913129, 827, 268 }, { 0xE7109BFBA19C0C9D, 853, 276 }, { 0xAC2820D9623BF429, 880, 284 }, { 0x80444B5E7AA7CF85, 907, 292 }, { 0xBF21E44003ACDD2D, 933, 300 }, { 0x8E679C2F5E44FF8F, 960, 308 }, { 0xD433179D9C8CB841, 986, 316 }, { 0x9E19DB92B4E31BA9, 1013, 324 }, } }; // This computation gives exactly the same results for k as // k = ceil((kAlpha - e - 1) * 0.30102999566398114) // for |e| <= 1500, but doesn't require floating-point operations. // NB: log_10(2) ~= 78913 / 2^18 JSON_ASSERT(e >= -1500); JSON_ASSERT(e <= 1500); const int f = kAlpha - e - 1; const int k = (f * 78913) / (1 << 18) + static_cast<int>(f > 0); const int index = (-kCachedPowersMinDecExp + k + (kCachedPowersDecStep - 1)) / kCachedPowersDecStep; JSON_ASSERT(index >= 0); JSON_ASSERT(static_cast<std::size_t>(index) < kCachedPowers.size()); const cached_power cached = kCachedPowers[static_cast<std::size_t>(index)]; JSON_ASSERT(kAlpha <= cached.e + e + 64); JSON_ASSERT(kGamma >= cached.e + e + 64); return cached; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int): pushq %rax cmpl $0xfffffa23, %edi # imm = 0xFFFFFA23 jle 0x93ba1 cmpl $0x5dd, %edi # imm = 0x5DD jge 0x93bc0 xorl %ecx, %ecx movl %edi, %eax subl $-0x3d, %eax setl %cl negl %eax imull $0x13441, %eax, %eax # imm = 0x13441 movl $0x40000, %esi # imm = 0x40000 cltd idivl %esi addl %eax, %ecx cmpl $0xfffffec5, %ecx # imm = 0xFFFFFEC5 jle 0x93bdc addl $0x133, %ecx # imm = 0x133 movl %ecx, %eax cwtd movw $0x8, %cx idivw %cx cmpw $0x4f, %ax jae 0x93bf8 movzwl %ax, %eax shll $0x4, %eax leaq 0x300f6(%rip), %rcx # 0xc3c78 movq 0x8(%rcx,%rax), %rdx addl %edx, %edi cmpl $-0x7d, %edi jle 0x93c14 cmpl $-0x5f, %edi jge 0x93c30 movq (%rcx,%rax), %rax popq %rcx retq leaq 0x283af(%rip), %rdi # 0xbbf57 leaq 0x21f41(%rip), %rdx # 0xb5af0 leaq 0x2db67(%rip), %rcx # 0xc171d movl $0x43e4, %esi # imm = 0x43E4 jmp 0x93c4a leaq 0x28390(%rip), %rdi # 0xbbf57 leaq 0x21f22(%rip), %rdx # 0xb5af0 leaq 0x2db53(%rip), %rcx # 0xc1728 movl $0x43e5, %esi # imm = 0x43E5 jmp 0x93c4a leaq 0x28374(%rip), %rdi # 0xbbf57 leaq 0x21f06(%rip), %rdx # 0xb5af0 leaq 0x2db41(%rip), %rcx # 0xc1732 movl $0x43ea, %esi # imm = 0x43EA jmp 0x93c4a leaq 0x28358(%rip), %rdi # 0xbbf57 leaq 0x21eea(%rip), %rdx # 0xb5af0 leaq 0x2db30(%rip), %rcx # 0xc173d movl $0x43eb, %esi # imm = 0x43EB jmp 0x93c4a leaq 0x2833c(%rip), %rdi # 0xbbf57 leaq 0x21ece(%rip), %rdx # 0xb5af0 leaq 0x2db4b(%rip), %rcx # 0xc1774 movl $0x43ee, %esi # imm = 0x43EE jmp 0x93c4a leaq 0x28320(%rip), %rdi # 0xbbf57 leaq 0x21eb2(%rip), %rdx # 0xb5af0 leaq 0x2db4b(%rip), %rcx # 0xc1790 movl $0x43ef, %esi # imm = 0x43EF xorl %eax, %eax callq 0x24f20 nop
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl36get_cached_power_for_binary_exponentEi: push rax cmp edi, 0FFFFFA23h jle short loc_93BA1 cmp edi, 5DDh jge loc_93BC0 xor ecx, ecx mov eax, edi sub eax, 0FFFFFFC3h setl cl neg eax imul eax, 13441h mov esi, 40000h cdq idiv esi add ecx, eax cmp ecx, 0FFFFFEC5h jle loc_93BDC add ecx, 133h mov eax, ecx cwd mov cx, 8 idiv cx cmp ax, 4Fh ; 'O' jnb loc_93BF8 movzx eax, ax shl eax, 4 lea rcx, _ZZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl36get_cached_power_for_binary_exponentEiE13kCachedPowers; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers mov rdx, [rcx+rax+8] add edi, edx cmp edi, 0FFFFFF83h jle loc_93C14 cmp edi, 0FFFFFFA1h jge loc_93C30 mov rax, [rcx+rax] pop rcx retn loc_93BA1: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aE1500; "e >= -1500" mov esi, 43E4h jmp loc_93C4A loc_93BC0: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aE1500_0; "e <= 1500" mov esi, 43E5h jmp short loc_93C4A loc_93BDC: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aIndex0; "index >= 0" mov esi, 43EAh jmp short loc_93C4A loc_93BF8: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aStaticCastStdS; "static_cast<std::size_t>(index) < kCach"... mov esi, 43EBh jmp short loc_93C4A loc_93C14: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKalphaCachedEE; "kAlpha <= cached.e + e + 64" mov esi, 43EEh jmp short loc_93C4A loc_93C30: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKgammaCachedEE; "kGamma >= cached.e + e + 64" mov esi, 43EFh loc_93C4A: xor eax, eax call _ggml_abort nop
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent( nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this) { int v1; // ecx unsigned __int16 v2; // ax long long v3; // rax int v4; // edi long long v6; // rsi if ( (int)this <= -1501 ) { v6 = 17380LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17380LL, "GGML_ASSERT(%s) failed", "e >= -1500"); } else if ( (int)this >= 1501 ) { v6 = 17381LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17381LL, "GGML_ASSERT(%s) failed", "e <= 1500"); } else { v1 = -78913 * ((int)this + 61) / 0x40000 + ((int)this < -61); if ( v1 <= -315 ) { v6 = 17386LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17386LL, "GGML_ASSERT(%s) failed", "index >= 0"); } else { v2 = (__int16)(v1 + 307) / 8; if ( v2 >= 0x4Fu ) { v6 = 17387LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17387LL, "GGML_ASSERT(%s) failed", "static_cast<std::size_t>(index) < kCachedPowers.size()"); } else { v3 = 16 * (unsigned int)v2; v4 = *(_QWORD *)((char *)&nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers + v3 + 8) + (_DWORD)this; if ( v4 <= -125 ) { v6 = 17390LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17390LL, "GGML_ASSERT(%s) failed", "kAlpha <= cached.e + e + 64"); } else { if ( v4 < -95 ) return *(_QWORD *)((char *)&nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers + v3); v6 = 17391LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17391LL, "GGML_ASSERT(%s) failed", "kGamma >= cached.e + e + 64"); } } } } return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", v6); }
get_cached_power_for_binary_exponent: PUSH RAX CMP EDI,0xfffffa23 JLE 0x00193ba1 CMP EDI,0x5dd JGE 0x00193bc0 XOR ECX,ECX MOV EAX,EDI SUB EAX,-0x3d SETL CL NEG EAX IMUL EAX,EAX,0x13441 MOV ESI,0x40000 CDQ IDIV ESI ADD ECX,EAX CMP ECX,0xfffffec5 JLE 0x00193bdc ADD ECX,0x133 MOV EAX,ECX CWD MOV CX,0x8 IDIV CX CMP AX,0x4f JNC 0x00193bf8 MOVZX EAX,AX SHL EAX,0x4 LEA RCX,[0x1c3c78] MOV RDX,qword ptr [RCX + RAX*0x1 + 0x8] ADD EDI,EDX CMP EDI,-0x7d JLE 0x00193c14 CMP EDI,-0x5f JGE 0x00193c30 MOV RAX,qword ptr [RCX + RAX*0x1] POP RCX RET LAB_00193ba1: LEA RDI,[0x1bbf57] LEA RDX,[0x1b5af0] LEA RCX,[0x1c171d] MOV ESI,0x43e4 JMP 0x00193c4a LAB_00193bc0: LEA RDI,[0x1bbf57] LEA RDX,[0x1b5af0] LEA RCX,[0x1c1728] MOV ESI,0x43e5 JMP 0x00193c4a LAB_00193bdc: LEA RDI,[0x1bbf57] LEA RDX,[0x1b5af0] LEA RCX,[0x1c1732] MOV ESI,0x43ea JMP 0x00193c4a LAB_00193bf8: LEA RDI,[0x1bbf57] LEA RDX,[0x1b5af0] LEA RCX,[0x1c173d] MOV ESI,0x43eb JMP 0x00193c4a LAB_00193c14: LEA RDI,[0x1bbf57] LEA RDX,[0x1b5af0] LEA RCX,[0x1c1774] MOV ESI,0x43ee JMP 0x00193c4a LAB_00193c30: LEA RDI,[0x1bbf57] LEA RDX,[0x1b5af0] LEA RCX,[0x1c1790] MOV ESI,0x43ef LAB_00193c4a: XOR EAX,EAX CALL 0x00124f20
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int) */ int8 nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int param_1) { ulong uVar1; int iVar2; uint uVar3; char *pcVar4; int8 uVar5; if (param_1 < -0x5dc) { pcVar4 = "e >= -1500"; uVar5 = 0x43e4; } else if (param_1 < 0x5dd) { iVar2 = (uint)(param_1 < -0x3d) + ((param_1 + 0x3d) * -0x13441) / 0x40000; if (iVar2 < -0x13a) { pcVar4 = "index >= 0"; uVar5 = 0x43ea; } else { uVar3 = iVar2 + 0x133; uVar3 = (int)((uint)(ushort)((short)uVar3 >> 0xf) << 0x10 | uVar3 & 0xffff) / 8; if ((ushort)uVar3 < 0x4f) { uVar1 = (ulong)((uVar3 & 0xffff) << 4); iVar2 = param_1 + (int)*(int8 *) (get_cached_power_for_binary_exponent(int)::kCachedPowers + uVar1 + 8); if (iVar2 < -0x7c) { pcVar4 = "kAlpha <= cached.e + e + 64"; uVar5 = 0x43ee; } else { if (iVar2 < -0x5f) { return *(int8 *)(get_cached_power_for_binary_exponent(int)::kCachedPowers + uVar1) ; } pcVar4 = "kGamma >= cached.e + e + 64"; uVar5 = 0x43ef; } } else { pcVar4 = "static_cast<std::size_t>(index) < kCachedPowers.size()"; uVar5 = 0x43eb; } } } else { pcVar4 = "e <= 1500"; uVar5 = 0x43e5; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar5, "GGML_ASSERT(%s) failed",pcVar4); }
51,429
LefDefParser::lefwMacroPinAntennaMaxSideAreaCar(double, char const*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwMacroPinAntennaMaxSideAreaCar(double value, const char *layerName) { lefw54Num = LEFW_ANTENNAMAXSIDEAREACAR; if (!lefwFile) return LEFW_UNINITIALIZED; if (!lefwDidInit) return LEFW_BAD_ORDER; if (!lefwIsMacroPin) return LEFW_BAD_ORDER; if (lefwAMaxSideAreaCar) return LEFW_BAD_DATA; // ANTENNAMAXSIDEAREACAR has // defined more than once if (versionNum < 5.4) return LEFW_WRONG_VERSION; if (lefwAntenna53) return LEFW_MIX_VERSION_DATA; if (lefwWriteEncrypt) { encPrint(lefwFile, (char*) " ANTENNAMAXSIDEAREACAR %.11g ", value); if (layerName) encPrint(lefwFile, (char*) "LAYER %s ", layerName); encPrint(lefwFile, (char*) ";\n"); } else { fprintf(lefwFile, " ANTENNAMAXSIDEAREACAR %.11g ", value); if (layerName) fprintf(lefwFile, "LAYER %s ", layerName); fprintf(lefwFile, ";\n"); } lefwLines++; lefwState = LEFW_MACRO; lefwAntenna54 = 1; return LEFW_OK; }
O0
cpp
LefDefParser::lefwMacroPinAntennaMaxSideAreaCar(double, char const*): subq $0x18, %rsp movsd %xmm0, 0x8(%rsp) movq %rdi, (%rsp) movl $0x78, 0xf974(%rip) # 0x32d4c leaq 0xfa21(%rip), %rax # 0x32e00 cmpq $0x0, (%rax) jne 0x233f2 movl $0x1, 0x14(%rsp) jmp 0x23560 leaq 0xfc5b(%rip), %rax # 0x33054 cmpl $0x0, (%rax) jne 0x2340b movl $0x2, 0x14(%rsp) jmp 0x23560 leaq 0xfc8e(%rip), %rax # 0x330a0 cmpl $0x0, (%rax) jne 0x23424 movl $0x2, 0x14(%rsp) jmp 0x23560 cmpl $0x0, 0xfce5(%rip) # 0x33110 je 0x2343a movl $0x3, 0x14(%rsp) jmp 0x23560 movsd 0x5dbe(%rip), %xmm0 # 0x29200 ucomisd 0xf8f6(%rip), %xmm0 # 0x32d40 jbe 0x23459 movl $0x5, 0x14(%rsp) jmp 0x23560 cmpl $0x0, 0xfcbc(%rip) # 0x3311c je 0x2346f movl $0x6, 0x14(%rsp) jmp 0x23560 cmpl $0x0, 0xfc76(%rip) # 0x330ec je 0x234d3 leaq 0xf981(%rip), %rax # 0x32e00 movq (%rax), %rdi movsd 0x8(%rsp), %xmm0 leaq 0x8648(%rip), %rsi # 0x2bad7 movb $0x1, %al callq 0x289b0 cmpq $0x0, (%rsp) je 0x234b9 leaq 0xf95c(%rip), %rax # 0x32e00 movq (%rax), %rdi movq (%rsp), %rdx leaq 0x8698(%rip), %rsi # 0x2bb4a movb $0x0, %al callq 0x289b0 leaq 0xf940(%rip), %rax # 0x32e00 movq (%rax), %rdi leaq 0x6a8a(%rip), %rsi # 0x29f54 movb $0x0, %al callq 0x289b0 jmp 0x2352c leaq 0xf926(%rip), %rax # 0x32e00 movq (%rax), %rdi movsd 0x8(%rsp), %xmm0 leaq 0x85ed(%rip), %rsi # 0x2bad7 movb $0x1, %al callq 0x1100 cmpq $0x0, (%rsp) je 0x23514 leaq 0xf901(%rip), %rax # 0x32e00 movq (%rax), %rdi movq (%rsp), %rdx leaq 0x863d(%rip), %rsi # 0x2bb4a movb $0x0, %al callq 0x1100 leaq 0xf8e5(%rip), %rax # 0x32e00 movq (%rax), %rdi leaq 0x6a2f(%rip), %rsi # 0x29f54 movb $0x0, %al callq 0x1100 leaq 0xfb19(%rip), %rax # 0x3304c movl (%rax), %ecx addl $0x1, %ecx leaq 0xfb0d(%rip), %rax # 0x3304c movl %ecx, (%rax) leaq 0xfb08(%rip), %rax # 0x33050 movl $0x21, (%rax) movl $0x1, 0xfbc0(%rip) # 0x33118 movl $0x0, 0x14(%rsp) movl 0x14(%rsp), %eax addq $0x18, %rsp retq nopl (%rax)
_ZN12LefDefParser33lefwMacroPinAntennaMaxSideAreaCarEdPKc: sub rsp, 18h movsd [rsp+18h+var_10], xmm0 mov [rsp+18h+var_18], rdi mov cs:_ZN12LefDefParserL9lefw54NumE, 78h ; 'x'; LefDefParser::lefw54Num lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile cmp qword ptr [rax], 0 jnz short loc_233F2 mov [rsp+18h+var_4], 1 jmp loc_23560 loc_233F2: lea rax, _ZN12LefDefParser11lefwDidInitE; LefDefParser::lefwDidInit cmp dword ptr [rax], 0 jnz short loc_2340B mov [rsp+18h+var_4], 2 jmp loc_23560 loc_2340B: lea rax, _ZN12LefDefParser14lefwIsMacroPinE; LefDefParser::lefwIsMacroPin cmp dword ptr [rax], 0 jnz short loc_23424 mov [rsp+18h+var_4], 2 jmp loc_23560 loc_23424: cmp cs:_ZN12LefDefParserL19lefwAMaxSideAreaCarE, 0; LefDefParser::lefwAMaxSideAreaCar jz short loc_2343A mov [rsp+18h+var_4], 3 jmp loc_23560 loc_2343A: movsd xmm0, cs:dbl_29200 ucomisd xmm0, cs:_ZN12LefDefParserL10versionNumE; LefDefParser::versionNum jbe short loc_23459 mov [rsp+18h+var_4], 5 jmp loc_23560 loc_23459: cmp cs:_ZN12LefDefParserL13lefwAntenna53E, 0; LefDefParser::lefwAntenna53 jz short loc_2346F mov [rsp+18h+var_4], 6 jmp loc_23560 loc_2346F: cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt jz short loc_234D3 lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] movsd xmm0, [rsp+18h+var_10] lea rsi, aAntennamaxside; " ANTENNAMAXSIDEAREACAR %.11g " mov al, 1 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) cmp [rsp+18h+var_18], 0 jz short loc_234B9 lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] mov rdx, [rsp+18h+var_18] lea rsi, aLayerS_2+9; "LAYER %s " mov al, 0 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) loc_234B9: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] lea rsi, aDividercharS+11h; ";\n" mov al, 0 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_2352C loc_234D3: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] movsd xmm0, [rsp+18h+var_10] lea rsi, aAntennamaxside; " ANTENNAMAXSIDEAREACAR %.11g " mov al, 1 call _fprintf cmp [rsp+18h+var_18], 0 jz short loc_23514 lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] mov rdx, [rsp+18h+var_18] lea rsi, aLayerS_2+9; "LAYER %s " mov al, 0 call _fprintf loc_23514: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] lea rsi, aDividercharS+11h; ";\n" mov al, 0 call _fprintf loc_2352C: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov [rax], ecx lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov dword ptr [rax], 21h ; '!' mov cs:_ZN12LefDefParserL13lefwAntenna54E, 1; LefDefParser::lefwAntenna54 mov [rsp+18h+var_4], 0 loc_23560: mov eax, [rsp+18h+var_4] add rsp, 18h retn
long long LefDefParser::lefwMacroPinAntennaMaxSideAreaCar( LefDefParser *this, double a2, const char *a3, int a4, int a5, int a6, int a7) { int v7; // edx int v8; // ecx int v9; // r8d int v10; // r9d LefDefParser::lefw54Num = 120; if ( *(_QWORD *)&LefDefParser::lefwFile ) { if ( LefDefParser::lefwDidInit ) { if ( LefDefParser::lefwIsMacroPin ) { if ( LefDefParser::lefwAMaxSideAreaCar ) { return 3; } else if ( *(double *)&LefDefParser::versionNum >= 5.4 ) { if ( LefDefParser::lefwAntenna53 ) { return 6; } else { if ( LefDefParser::lefwWriteEncrypt ) { LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)" ANTENNAMAXSIDEAREACAR %.11g ", a4, a5, a6, a7); if ( this ) LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)"LAYER %s ", (_DWORD)this, v8, v9, v10); LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)";\n", v7, v8, v9, v10); } else { fprintf(*(_QWORD *)&LefDefParser::lefwFile, " ANTENNAMAXSIDEAREACAR %.11g ", a2); if ( this ) fprintf(*(_QWORD *)&LefDefParser::lefwFile, "LAYER %s ", (const char *)this); fprintf(*(_QWORD *)&LefDefParser::lefwFile, ";\n"); } ++LefDefParser::lefwLines; LefDefParser::lefwState = 33; LefDefParser::lefwAntenna54 = 1; return 0; } } else { return 5; } } else { return 2; } } else { return 2; } } else { return 1; } }
lefwMacroPinAntennaMaxSideAreaCar: SUB RSP,0x18 MOVSD qword ptr [RSP + 0x8],XMM0 MOV qword ptr [RSP],RDI MOV dword ptr [0x00132d4c],0x78 LEA RAX,[0x132e00] CMP qword ptr [RAX],0x0 JNZ 0x001233f2 MOV dword ptr [RSP + 0x14],0x1 JMP 0x00123560 LAB_001233f2: LEA RAX,[0x133054] CMP dword ptr [RAX],0x0 JNZ 0x0012340b MOV dword ptr [RSP + 0x14],0x2 JMP 0x00123560 LAB_0012340b: LEA RAX,[0x1330a0] CMP dword ptr [RAX],0x0 JNZ 0x00123424 MOV dword ptr [RSP + 0x14],0x2 JMP 0x00123560 LAB_00123424: CMP dword ptr [0x00133110],0x0 JZ 0x0012343a MOV dword ptr [RSP + 0x14],0x3 JMP 0x00123560 LAB_0012343a: MOVSD XMM0,qword ptr [0x00129200] UCOMISD XMM0,qword ptr [0x00132d40] JBE 0x00123459 MOV dword ptr [RSP + 0x14],0x5 JMP 0x00123560 LAB_00123459: CMP dword ptr [0x0013311c],0x0 JZ 0x0012346f MOV dword ptr [RSP + 0x14],0x6 JMP 0x00123560 LAB_0012346f: CMP dword ptr [0x001330ec],0x0 JZ 0x001234d3 LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] MOVSD XMM0,qword ptr [RSP + 0x8] LEA RSI,[0x12bad7] MOV AL,0x1 CALL 0x001289b0 CMP qword ptr [RSP],0x0 JZ 0x001234b9 LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] MOV RDX,qword ptr [RSP] LEA RSI,[0x12bb4a] MOV AL,0x0 CALL 0x001289b0 LAB_001234b9: LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] LEA RSI,[0x129f54] MOV AL,0x0 CALL 0x001289b0 JMP 0x0012352c LAB_001234d3: LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] MOVSD XMM0,qword ptr [RSP + 0x8] LEA RSI,[0x12bad7] MOV AL,0x1 CALL 0x00101100 CMP qword ptr [RSP],0x0 JZ 0x00123514 LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] MOV RDX,qword ptr [RSP] LEA RSI,[0x12bb4a] MOV AL,0x0 CALL 0x00101100 LAB_00123514: LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] LEA RSI,[0x129f54] MOV AL,0x0 CALL 0x00101100 LAB_0012352c: LEA RAX,[0x13304c] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x13304c] MOV dword ptr [RAX],ECX LEA RAX,[0x133050] MOV dword ptr [RAX],0x21 MOV dword ptr [0x00133118],0x1 MOV dword ptr [RSP + 0x14],0x0 LAB_00123560: MOV EAX,dword ptr [RSP + 0x14] ADD RSP,0x18 RET
/* LefDefParser::lefwMacroPinAntennaMaxSideAreaCar(double, char const*) */ int4 LefDefParser::lefwMacroPinAntennaMaxSideAreaCar(double param_1,char *param_2) { int4 local_4; lefw54Num = 0x78; if (lefwFile == (_IO_FILE *)0x0) { local_4 = 1; } else if (lefwDidInit == 0) { local_4 = 2; } else if (lefwIsMacroPin == 0) { local_4 = 2; } else if (lefwAMaxSideAreaCar == 0) { if (DAT_00129200 <= versionNum) { if (lefwAntenna53 == 0) { if (lefwWriteEncrypt == 0) { fprintf(lefwFile," ANTENNAMAXSIDEAREACAR %.11g ",param_1); if (param_2 != (char *)0x0) { fprintf(lefwFile,"LAYER %s ",param_2); } fprintf(lefwFile,";\n"); } else { encPrint(lefwFile," ANTENNAMAXSIDEAREACAR %.11g ",param_1); if (param_2 != (char *)0x0) { encPrint(lefwFile,"LAYER %s ",param_2); } encPrint(lefwFile,";\n"); } lefwLines = lefwLines + 1; lefwState = 0x21; lefwAntenna54 = 1; local_4 = 0; } else { local_4 = 6; } } else { local_4 = 5; } } else { local_4 = 3; } return local_4; }
51,430
MNN::CreateConvolution2D(flatbuffers::FlatBufferBuilder&, flatbuffers::Offset<MNN::Convolution2DCommon>, flatbuffers::Offset<flatbuffers::Vector<float>>, flatbuffers::Offset<flatbuffers::Vector<float>>, flatbuffers::Offset<MNN::IDSTQuan>, flatbuffers::Offset<MNN::QuantizedFloatParam>, flatbuffers::Offset<MNN::SparseCommon>, flatbuffers::Offset<flatbuffers::Vector<long>>)
mnn-tts/MNN/schema/current/CaffeOp_generated.h
inline flatbuffers::Offset<Convolution2D> CreateConvolution2D( flatbuffers::FlatBufferBuilder &_fbb, flatbuffers::Offset<Convolution2DCommon> common = 0, flatbuffers::Offset<flatbuffers::Vector<float>> weight = 0, flatbuffers::Offset<flatbuffers::Vector<float>> bias = 0, flatbuffers::Offset<IDSTQuan> quanParameter = 0, flatbuffers::Offset<QuantizedFloatParam> symmetricQuan = 0, flatbuffers::Offset<SparseCommon> sparseParameter = 0, flatbuffers::Offset<flatbuffers::Vector<int64_t>> external = 0) { Convolution2DBuilder builder_(_fbb); builder_.add_external(external); builder_.add_sparseParameter(sparseParameter); builder_.add_symmetricQuan(symmetricQuan); builder_.add_quanParameter(quanParameter); builder_.add_bias(bias); builder_.add_weight(weight); builder_.add_common(common); return builder_.Finish(); }
O0
c
MNN::CreateConvolution2D(flatbuffers::FlatBufferBuilder&, flatbuffers::Offset<MNN::Convolution2DCommon>, flatbuffers::Offset<flatbuffers::Vector<float>>, flatbuffers::Offset<flatbuffers::Vector<float>>, flatbuffers::Offset<MNN::IDSTQuan>, flatbuffers::Offset<MNN::QuantizedFloatParam>, flatbuffers::Offset<MNN::SparseCommon>, flatbuffers::Offset<flatbuffers::Vector<long>>): subq $0x68, %rsp movl %ecx, 0xc(%rsp) movl %edx, %eax movl 0xc(%rsp), %edx movl %eax, 0x10(%rsp) movl %esi, %r10d movl 0x10(%rsp), %esi movl 0x78(%rsp), %eax movl 0x70(%rsp), %ecx movl %r10d, 0x60(%rsp) movl %esi, 0x5c(%rsp) movl %edx, 0x58(%rsp) movl %r8d, 0x54(%rsp) movl %r9d, 0x50(%rsp) movl %ecx, 0x4c(%rsp) movl %eax, 0x48(%rsp) movq %rdi, 0x40(%rsp) movq 0x40(%rsp), %rsi leaq 0x30(%rsp), %rdi callq 0x19300 movl 0x48(%rsp), %eax movl %eax, 0x2c(%rsp) movl 0x2c(%rsp), %esi leaq 0x30(%rsp), %rdi callq 0x19340 movl 0x4c(%rsp), %eax movl %eax, 0x28(%rsp) movl 0x28(%rsp), %esi leaq 0x30(%rsp), %rdi callq 0x19370 movl 0x50(%rsp), %eax movl %eax, 0x24(%rsp) movl 0x24(%rsp), %esi leaq 0x30(%rsp), %rdi callq 0x193a0 movl 0x54(%rsp), %eax movl %eax, 0x20(%rsp) movl 0x20(%rsp), %esi leaq 0x30(%rsp), %rdi callq 0x193d0 movl 0x58(%rsp), %eax movl %eax, 0x1c(%rsp) movl 0x1c(%rsp), %esi leaq 0x30(%rsp), %rdi callq 0x19400 movl 0x5c(%rsp), %eax movl %eax, 0x18(%rsp) movl 0x18(%rsp), %esi leaq 0x30(%rsp), %rdi callq 0x19430 movl 0x60(%rsp), %eax movl %eax, 0x14(%rsp) movl 0x14(%rsp), %esi leaq 0x30(%rsp), %rdi callq 0x19460 leaq 0x30(%rsp), %rdi callq 0x19490 movl %eax, 0x64(%rsp) movl 0x64(%rsp), %eax addq $0x68, %rsp retq nopw %cs:(%rax,%rax) nop
_ZN3MNN19CreateConvolution2DERN11flatbuffers17FlatBufferBuilderENS0_6OffsetINS_19Convolution2DCommonEEENS3_INS0_6VectorIfEEEES8_NS3_INS_8IDSTQuanEEENS3_INS_19QuantizedFloatParamEEENS3_INS_12SparseCommonEEENS3_INS6_IlEEEE: sub rsp, 68h mov [rsp+68h+var_5C], ecx mov eax, edx mov edx, [rsp+68h+var_5C] mov [rsp+68h+var_58], eax mov r10d, esi mov esi, [rsp+68h+var_58] mov eax, [rsp+68h+arg_8] mov ecx, [rsp+68h+arg_0] mov [rsp+68h+var_8], r10d mov [rsp+68h+var_C], esi mov [rsp+68h+var_10], edx mov [rsp+68h+var_14], r8d mov [rsp+68h+var_18], r9d mov [rsp+68h+var_1C], ecx mov [rsp+68h+var_20], eax mov [rsp+68h+var_28], rdi mov rsi, [rsp+68h+var_28]; flatbuffers::FlatBufferBuilder * lea rdi, [rsp+68h+var_38]; this call _ZN3MNN20Convolution2DBuilderC2ERN11flatbuffers17FlatBufferBuilderE; MNN::Convolution2DBuilder::Convolution2DBuilder(flatbuffers::FlatBufferBuilder &) mov eax, [rsp+68h+var_20] mov [rsp+68h+var_3C], eax mov esi, [rsp+68h+var_3C] lea rdi, [rsp+68h+var_38] call _ZN3MNN20Convolution2DBuilder12add_externalEN11flatbuffers6OffsetINS1_6VectorIlEEEE; MNN::Convolution2DBuilder::add_external(flatbuffers::Offset<flatbuffers::Vector<long>>) mov eax, [rsp+68h+var_1C] mov [rsp+68h+var_40], eax mov esi, [rsp+68h+var_40] lea rdi, [rsp+68h+var_38] call _ZN3MNN20Convolution2DBuilder19add_sparseParameterEN11flatbuffers6OffsetINS_12SparseCommonEEE; MNN::Convolution2DBuilder::add_sparseParameter(flatbuffers::Offset<MNN::SparseCommon>) mov eax, [rsp+68h+var_18] mov [rsp+68h+var_44], eax mov esi, [rsp+68h+var_44] lea rdi, [rsp+68h+var_38] call _ZN3MNN20Convolution2DBuilder17add_symmetricQuanEN11flatbuffers6OffsetINS_19QuantizedFloatParamEEE; MNN::Convolution2DBuilder::add_symmetricQuan(flatbuffers::Offset<MNN::QuantizedFloatParam>) mov eax, [rsp+68h+var_14] mov [rsp+68h+var_48], eax mov esi, [rsp+68h+var_48] lea rdi, [rsp+68h+var_38] call _ZN3MNN20Convolution2DBuilder17add_quanParameterEN11flatbuffers6OffsetINS_8IDSTQuanEEE; MNN::Convolution2DBuilder::add_quanParameter(flatbuffers::Offset<MNN::IDSTQuan>) mov eax, [rsp+68h+var_10] mov [rsp+68h+var_4C], eax mov esi, [rsp+68h+var_4C] lea rdi, [rsp+68h+var_38] call _ZN3MNN20Convolution2DBuilder8add_biasEN11flatbuffers6OffsetINS1_6VectorIfEEEE; MNN::Convolution2DBuilder::add_bias(flatbuffers::Offset<flatbuffers::Vector<float>>) mov eax, [rsp+68h+var_C] mov [rsp+68h+var_50], eax mov esi, [rsp+68h+var_50] lea rdi, [rsp+68h+var_38] call _ZN3MNN20Convolution2DBuilder10add_weightEN11flatbuffers6OffsetINS1_6VectorIfEEEE; MNN::Convolution2DBuilder::add_weight(flatbuffers::Offset<flatbuffers::Vector<float>>) mov eax, [rsp+68h+var_8] mov [rsp+68h+var_54], eax mov esi, [rsp+68h+var_54] lea rdi, [rsp+68h+var_38] call _ZN3MNN20Convolution2DBuilder10add_commonEN11flatbuffers6OffsetINS_19Convolution2DCommonEEE; MNN::Convolution2DBuilder::add_common(flatbuffers::Offset<MNN::Convolution2DCommon>) lea rdi, [rsp+68h+var_38]; this call _ZN3MNN20Convolution2DBuilder6FinishEv; MNN::Convolution2DBuilder::Finish(void) mov [rsp+68h+var_4], eax mov eax, [rsp+68h+var_4] add rsp, 68h retn
long long MNN::CreateConvolution2D( flatbuffers::FlatBufferBuilder *a1, unsigned int a2, unsigned int a3, unsigned int a4, unsigned int a5, unsigned int a6, unsigned int a7, unsigned int a8) { _BYTE v9[16]; // [rsp+30h] [rbp-38h] BYREF flatbuffers::FlatBufferBuilder *v10; // [rsp+40h] [rbp-28h] unsigned int v11; // [rsp+48h] [rbp-20h] unsigned int v12; // [rsp+4Ch] [rbp-1Ch] unsigned int v13; // [rsp+50h] [rbp-18h] unsigned int v14; // [rsp+54h] [rbp-14h] unsigned int v15; // [rsp+58h] [rbp-10h] unsigned int v16; // [rsp+5Ch] [rbp-Ch] unsigned int v17; // [rsp+60h] [rbp-8h] v17 = a2; v16 = a3; v15 = a4; v14 = a5; v13 = a6; v12 = a7; v11 = a8; v10 = a1; MNN::Convolution2DBuilder::Convolution2DBuilder((MNN::Convolution2DBuilder *)v9, a1); MNN::Convolution2DBuilder::add_external(v9, v11); MNN::Convolution2DBuilder::add_sparseParameter(v9, v12); MNN::Convolution2DBuilder::add_symmetricQuan(v9, v13); MNN::Convolution2DBuilder::add_quanParameter(v9, v14); MNN::Convolution2DBuilder::add_bias(v9, v15); MNN::Convolution2DBuilder::add_weight(v9, v16); MNN::Convolution2DBuilder::add_common(v9, v17); return (unsigned int)MNN::Convolution2DBuilder::Finish((MNN::Convolution2DBuilder *)v9); }
CreateConvolution2D: SUB RSP,0x68 MOV dword ptr [RSP + 0xc],ECX MOV EAX,EDX MOV EDX,dword ptr [RSP + 0xc] MOV dword ptr [RSP + 0x10],EAX MOV R10D,ESI MOV ESI,dword ptr [RSP + 0x10] MOV EAX,dword ptr [RSP + 0x78] MOV ECX,dword ptr [RSP + 0x70] MOV dword ptr [RSP + 0x60],R10D MOV dword ptr [RSP + 0x5c],ESI MOV dword ptr [RSP + 0x58],EDX MOV dword ptr [RSP + 0x54],R8D MOV dword ptr [RSP + 0x50],R9D MOV dword ptr [RSP + 0x4c],ECX MOV dword ptr [RSP + 0x48],EAX MOV qword ptr [RSP + 0x40],RDI MOV RSI,qword ptr [RSP + 0x40] LEA RDI,[RSP + 0x30] CALL 0x00119300 MOV EAX,dword ptr [RSP + 0x48] MOV dword ptr [RSP + 0x2c],EAX MOV ESI,dword ptr [RSP + 0x2c] LEA RDI,[RSP + 0x30] CALL 0x00119340 MOV EAX,dword ptr [RSP + 0x4c] MOV dword ptr [RSP + 0x28],EAX MOV ESI,dword ptr [RSP + 0x28] LEA RDI,[RSP + 0x30] CALL 0x00119370 MOV EAX,dword ptr [RSP + 0x50] MOV dword ptr [RSP + 0x24],EAX MOV ESI,dword ptr [RSP + 0x24] LEA RDI,[RSP + 0x30] CALL 0x001193a0 MOV EAX,dword ptr [RSP + 0x54] MOV dword ptr [RSP + 0x20],EAX MOV ESI,dword ptr [RSP + 0x20] LEA RDI,[RSP + 0x30] CALL 0x001193d0 MOV EAX,dword ptr [RSP + 0x58] MOV dword ptr [RSP + 0x1c],EAX MOV ESI,dword ptr [RSP + 0x1c] LEA RDI,[RSP + 0x30] CALL 0x00119400 MOV EAX,dword ptr [RSP + 0x5c] MOV dword ptr [RSP + 0x18],EAX MOV ESI,dword ptr [RSP + 0x18] LEA RDI,[RSP + 0x30] CALL 0x00119430 MOV EAX,dword ptr [RSP + 0x60] MOV dword ptr [RSP + 0x14],EAX MOV ESI,dword ptr [RSP + 0x14] LEA RDI,[RSP + 0x30] CALL 0x00119460 LEA RDI,[RSP + 0x30] CALL 0x00119490 MOV dword ptr [RSP + 0x64],EAX MOV EAX,dword ptr [RSP + 0x64] ADD RSP,0x68 RET
/* MNN::CreateConvolution2D(flatbuffers::FlatBufferBuilder&, flatbuffers::Offset<MNN::Convolution2DCommon>, flatbuffers::Offset<flatbuffers::Vector<float> >, flatbuffers::Offset<flatbuffers::Vector<float> >, flatbuffers::Offset<MNN::IDSTQuan>, flatbuffers::Offset<MNN::QuantizedFloatParam>, flatbuffers::Offset<MNN::SparseCommon>, flatbuffers::Offset<flatbuffers::Vector<long> >) */ int4 MNN::CreateConvolution2D (FlatBufferBuilder *param_1,int4 param_2,int4 param_3,int4 param_4, int4 param_5,int4 param_6,int4 param_7,int4 param_8) { int4 uVar1; Convolution2DBuilder local_38 [16]; FlatBufferBuilder *local_28; int4 local_20; int4 local_1c; int4 local_18; int4 local_14; int4 local_10; int4 local_c; int4 local_8; local_1c = param_7; local_20 = param_8; local_28 = param_1; local_18 = param_6; local_14 = param_5; local_10 = param_4; local_c = param_3; local_8 = param_2; Convolution2DBuilder::Convolution2DBuilder(local_38,param_1); Convolution2DBuilder::add_external(local_38,local_20); Convolution2DBuilder::add_sparseParameter(local_38,local_1c); Convolution2DBuilder::add_symmetricQuan(local_38,local_18); Convolution2DBuilder::add_quanParameter(local_38,local_14); Convolution2DBuilder::add_bias(local_38,local_10); Convolution2DBuilder::add_weight(local_38,local_c); Convolution2DBuilder::add_common(local_38,local_8); uVar1 = Convolution2DBuilder::Finish(local_38); return uVar1; }
51,431
my_strnncollsp_simple_nopad
eloqsql/strings/ctype-simple.c
int my_strnncollsp_simple_nopad(CHARSET_INFO * cs, const uchar *a, size_t a_length, const uchar *b, size_t b_length) { return my_strnncoll_simple(cs, a, a_length, b, b_length, FALSE); }
O3
c
my_strnncollsp_simple_nopad: pushq %rbp movq %rsp, %rbp cmpq %r8, %rdx movq %r8, %r9 cmovbq %rdx, %r9 movq 0x58(%rdi), %rdi xorl %r10d, %r10d cmpq %r10, %r9 je 0x37eef movzbl (%rsi,%r10), %eax movzbl (%rdi,%rax), %eax movzbl (%rcx,%r10), %r11d movzbl (%rdi,%r11), %r11d incq %r10 cmpb %r11b, %al je 0x37eca subl %r11d, %eax jmp 0x37f01 xorl %ecx, %ecx cmpq %r8, %rdx sbbl %ecx, %ecx cmpq %r8, %rdx movl $0x1, %eax cmovbel %ecx, %eax popq %rbp retq
my_strnncollsp_simple_nopad: push rbp mov rbp, rsp cmp rdx, r8 mov r9, r8 cmovb r9, rdx mov rdi, [rdi+58h] xor r10d, r10d loc_37ECA: cmp r9, r10 jz short loc_37EEF movzx eax, byte ptr [rsi+r10] movzx eax, byte ptr [rdi+rax] movzx r11d, byte ptr [rcx+r10] movzx r11d, byte ptr [rdi+r11] inc r10 cmp al, r11b jz short loc_37ECA sub eax, r11d jmp short loc_37F01 loc_37EEF: xor ecx, ecx cmp rdx, r8 sbb ecx, ecx cmp rdx, r8 mov eax, 1 cmovbe eax, ecx loc_37F01: pop rbp retn
long long my_strnncollsp_simple_nopad( long long a1, long long a2, unsigned long long a3, long long a4, unsigned long long a5) { unsigned long long v5; // r9 long long v6; // rdi long long v7; // r10 int v8; // eax int v9; // r11d long long result; // rax v5 = a5; if ( a3 < a5 ) v5 = a3; v6 = *(_QWORD *)(a1 + 88); v7 = 0LL; while ( v5 != v7 ) { v8 = *(unsigned __int8 *)(v6 + *(unsigned __int8 *)(a2 + v7)); v9 = *(unsigned __int8 *)(v6 + *(unsigned __int8 *)(a4 + v7++)); if ( (_BYTE)v8 != (_BYTE)v9 ) return (unsigned int)(v8 - v9); } result = 1LL; if ( a3 <= a5 ) return (unsigned int)-(a3 < a5); return result; }
my_strnncollsp_simple_nopad: PUSH RBP MOV RBP,RSP CMP RDX,R8 MOV R9,R8 CMOVC R9,RDX MOV RDI,qword ptr [RDI + 0x58] XOR R10D,R10D LAB_00137eca: CMP R9,R10 JZ 0x00137eef MOVZX EAX,byte ptr [RSI + R10*0x1] MOVZX EAX,byte ptr [RDI + RAX*0x1] MOVZX R11D,byte ptr [RCX + R10*0x1] MOVZX R11D,byte ptr [RDI + R11*0x1] INC R10 CMP AL,R11B JZ 0x00137eca SUB EAX,R11D JMP 0x00137f01 LAB_00137eef: XOR ECX,ECX CMP RDX,R8 SBB ECX,ECX CMP RDX,R8 MOV EAX,0x1 CMOVBE EAX,ECX LAB_00137f01: POP RBP RET
int my_strnncollsp_simple_nopad(long param_1,long param_2,ulong param_3,long param_4,ulong param_5) { byte bVar1; byte bVar2; ulong uVar3; ulong uVar4; uVar3 = param_5; if (param_3 < param_5) { uVar3 = param_3; } uVar4 = 0; do { if (uVar3 == uVar4) { if (param_5 < param_3) { return 1; } return -(uint)(param_3 < param_5); } bVar1 = *(byte *)(*(long *)(param_1 + 0x58) + (ulong)*(byte *)(param_2 + uVar4)); bVar2 = *(byte *)(*(long *)(param_1 + 0x58) + (ulong)*(byte *)(param_4 + uVar4)); uVar4 = uVar4 + 1; } while (bVar1 == bVar2); return (uint)bVar1 - (uint)bVar2; }
51,432
rw_pr_rdlock
eloqsql/mysys/thr_rwlock.c
int rw_pr_rdlock(rw_pr_lock_t *rwlock) { pthread_mutex_lock(&rwlock->lock); /* The fact that we were able to acquire 'lock' mutex means that there are no active writers and we can acquire rd-lock. Increment active readers counter to prevent requests for wr-lock from succeeding and unlock mutex. */ rwlock->active_readers++; pthread_mutex_unlock(&rwlock->lock); return 0; }
O0
c
rw_pr_rdlock: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi callq 0x24410 movq -0x8(%rbp), %rax movl 0x58(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x58(%rax) movq -0x8(%rbp), %rdi callq 0x24200 xorl %eax, %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
rw_pr_rdlock: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] call _pthread_mutex_lock mov rax, [rbp+var_8] mov ecx, [rax+58h] add ecx, 1 mov [rax+58h], ecx mov rdi, [rbp+var_8] call _pthread_mutex_unlock xor eax, eax add rsp, 10h pop rbp retn
long long rw_pr_rdlock(long long a1) { pthread_mutex_lock(a1); ++*(_DWORD *)(a1 + 88); pthread_mutex_unlock(a1); return 0LL; }
rw_pr_rdlock: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] CALL 0x00124410 MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x58] ADD ECX,0x1 MOV dword ptr [RAX + 0x58],ECX MOV RDI,qword ptr [RBP + -0x8] CALL 0x00124200 XOR EAX,EAX ADD RSP,0x10 POP RBP RET
int8 rw_pr_rdlock(pthread_mutex_t *param_1) { pthread_mutex_lock(param_1); *(int *)((long)param_1 + 0x58) = *(int *)((long)param_1 + 0x58) + 1; pthread_mutex_unlock(param_1); return 0; }
51,433
ftb_parse_query
eloqsql/storage/myisam/ft_boolean_search.c
static int _ftb_parse_query(FTB *ftb, uchar *query, uint len, struct st_mysql_ftparser *parser) { MYSQL_FTPARSER_PARAM *param; MY_FTB_PARAM ftb_param; DBUG_ENTER("_ftb_parse_query"); DBUG_ASSERT(parser); if (ftb->state != UNINITIALIZED) DBUG_RETURN(0); if (! (param= ftparser_call_initializer(ftb->info, ftb->keynr, 0))) DBUG_RETURN(1); ftb_param.ftb= ftb; ftb_param.depth= 0; ftb_param.ftbe= ftb->root; ftb_param.up_quot= 0; param->mysql_parse= ftb_parse_query_internal; param->mysql_add_word= ftb_query_add_word; param->mysql_ftparam= (void *)&ftb_param; param->cs= ftb->charset; param->doc= (char*) query; param->length= len; param->flags= 0; param->mode= MYSQL_FTPARSER_FULL_BOOLEAN_INFO; DBUG_RETURN(parser->parse(param)); }
O0
c
ftb_parse_query: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq %rcx, -0x28(%rbp) jmp 0x9f9b9 movq -0x10(%rbp), %rax cmpl $0x0, 0x348(%rax) je 0x9f9d4 jmp 0x9f9c8 movl $0x0, -0x4(%rbp) jmp 0x9fa9e movq -0x10(%rbp), %rax movq 0x8(%rax), %rdi movq -0x10(%rbp), %rax movl 0x340(%rax), %esi xorl %edx, %edx callq 0xa3b90 movq %rax, -0x30(%rbp) cmpq $0x0, %rax jne 0x9fa05 jmp 0x9f9f9 movl $0x1, -0x4(%rbp) jmp 0x9fa9e movq -0x10(%rbp), %rax movq %rax, -0x50(%rbp) movl $0x0, -0x38(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x48(%rbp) movq $0x0, -0x40(%rbp) movq -0x30(%rbp), %rax leaq 0x118d(%rip), %rcx # 0xa0bc0 movq %rcx, (%rax) movq -0x30(%rbp), %rax leaq 0x121f(%rip), %rcx # 0xa0c60 movq %rcx, 0x8(%rax) movq -0x30(%rbp), %rax leaq -0x50(%rbp), %rcx movq %rcx, 0x18(%rax) movq -0x10(%rbp), %rax movq 0x10(%rax), %rcx movq -0x30(%rbp), %rax movq %rcx, 0x20(%rax) movq -0x18(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, 0x28(%rax) movl -0x1c(%rbp), %ecx movq -0x30(%rbp), %rax movl %ecx, 0x30(%rax) movq -0x30(%rbp), %rax movl $0x0, 0x34(%rax) movq -0x30(%rbp), %rax movl $0x2, 0x38(%rax) movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq -0x30(%rbp), %rdi callq *%rax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw (%rax,%rax)
_ftb_parse_query: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_28], rcx jmp short $+2 loc_9F9B9: mov rax, [rbp+var_10] cmp dword ptr [rax+348h], 0 jz short loc_9F9D4 jmp short $+2 loc_9F9C8: mov [rbp+var_4], 0 jmp loc_9FA9E loc_9F9D4: mov rax, [rbp+var_10] mov rdi, [rax+8] mov rax, [rbp+var_10] mov esi, [rax+340h] xor edx, edx call ftparser_call_initializer mov [rbp+var_30], rax cmp rax, 0 jnz short loc_9FA05 jmp short $+2 loc_9F9F9: mov [rbp+var_4], 1 jmp loc_9FA9E loc_9FA05: mov rax, [rbp+var_10] mov [rbp+var_50], rax mov [rbp+var_38], 0 mov rax, [rbp+var_10] mov rax, [rax+18h] mov [rbp+var_48], rax mov [rbp+var_40], 0 mov rax, [rbp+var_30] lea rcx, ftb_parse_query_internal mov [rax], rcx mov rax, [rbp+var_30] lea rcx, ftb_query_add_word mov [rax+8], rcx mov rax, [rbp+var_30] lea rcx, [rbp+var_50] mov [rax+18h], rcx mov rax, [rbp+var_10] mov rcx, [rax+10h] mov rax, [rbp+var_30] mov [rax+20h], rcx mov rcx, [rbp+var_18] mov rax, [rbp+var_30] mov [rax+28h], rcx mov ecx, [rbp+var_1C] mov rax, [rbp+var_30] mov [rax+30h], ecx mov rax, [rbp+var_30] mov dword ptr [rax+34h], 0 mov rax, [rbp+var_30] mov dword ptr [rax+38h], 2 mov rax, [rbp+var_28] mov rax, [rax+8] mov rdi, [rbp+var_30] call rax mov [rbp+var_4], eax loc_9FA9E: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long ftb_parse_query(long long a1, long long a2, unsigned int a3, long long a4) { long long v4; // rsi long long v5; // rdx long long v6; // r8 long long v7; // r9 long long v8; // rcx long long v10; // [rsp+0h] [rbp-50h] BYREF long long v11; // [rsp+8h] [rbp-48h] long long v12; // [rsp+10h] [rbp-40h] int v13; // [rsp+18h] [rbp-38h] long long v14; // [rsp+20h] [rbp-30h] long long v15; // [rsp+28h] [rbp-28h] unsigned int v16; // [rsp+34h] [rbp-1Ch] long long v17; // [rsp+38h] [rbp-18h] long long v18; // [rsp+40h] [rbp-10h] v18 = a1; v17 = a2; v16 = a3; v15 = a4; if ( *(_DWORD *)(a1 + 840) ) { return 0; } else { v4 = *(unsigned int *)(v18 + 832); v14 = ftparser_call_initializer(*(_QWORD *)(v18 + 8), v4, 0LL); if ( v14 ) { v10 = v18; v13 = 0; v11 = *(_QWORD *)(v18 + 24); v12 = 0LL; *(_QWORD *)v14 = ftb_parse_query_internal; *(_QWORD *)(v14 + 8) = ftb_query_add_word; *(_QWORD *)(v14 + 24) = &v10; *(_QWORD *)(v14 + 32) = *(_QWORD *)(v18 + 16); *(_QWORD *)(v14 + 40) = v17; v8 = v16; *(_DWORD *)(v14 + 48) = v16; *(_DWORD *)(v14 + 52) = 0; *(_DWORD *)(v14 + 56) = 2; return (unsigned int)(*(long long ( **)(long long, long long, long long, long long, long long, long long, long long, long long, long long, int))(v15 + 8))( v14, v4, v5, v8, v6, v7, v10, v11, v12, v13); } else { return 1; } } }
_ftb_parse_query: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV qword ptr [RBP + -0x28],RCX JMP 0x0019f9b9 LAB_0019f9b9: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x348],0x0 JZ 0x0019f9d4 JMP 0x0019f9c8 LAB_0019f9c8: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0019fa9e LAB_0019f9d4: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RAX + 0x340] XOR EDX,EDX CALL 0x001a3b90 MOV qword ptr [RBP + -0x30],RAX CMP RAX,0x0 JNZ 0x0019fa05 JMP 0x0019f9f9 LAB_0019f9f9: MOV dword ptr [RBP + -0x4],0x1 JMP 0x0019fa9e LAB_0019fa05: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x50],RAX MOV dword ptr [RBP + -0x38],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x48],RAX MOV qword ptr [RBP + -0x40],0x0 MOV RAX,qword ptr [RBP + -0x30] LEA RCX,[0x1a0bc0] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x30] LEA RCX,[0x1a0c60] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x30] LEA RCX,[RBP + -0x50] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x20],RCX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x28],RCX MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x30],ECX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x34],0x0 MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x38],0x2 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RDI,qword ptr [RBP + -0x30] CALL RAX MOV dword ptr [RBP + -0x4],EAX LAB_0019fa9e: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int4 _ftb_parse_query(long param_1,int8 param_2,int4 param_3,long param_4) { long local_58; int8 local_50; int8 local_48; int4 local_40; int8 *local_38; long local_30; int4 local_24; int8 local_20; long local_18; int4 local_c; if (*(int *)(param_1 + 0x348) == 0) { local_30 = param_4; local_24 = param_3; local_20 = param_2; local_18 = param_1; local_38 = (int8 *) ftparser_call_initializer (*(int8 *)(param_1 + 8),*(int4 *)(param_1 + 0x340),0); if (local_38 == (int8 *)0x0) { local_c = 1; } else { local_58 = local_18; local_40 = 0; local_50 = *(int8 *)(local_18 + 0x18); local_48 = 0; *local_38 = ftb_parse_query_internal; local_38[1] = ftb_query_add_word; local_38[3] = &local_58; local_38[4] = *(int8 *)(local_18 + 0x10); local_38[5] = local_20; *(int4 *)(local_38 + 6) = local_24; *(int4 *)((long)local_38 + 0x34) = 0; *(int4 *)(local_38 + 7) = 2; local_c = (**(code **)(local_30 + 8))(local_38); } } else { local_c = 0; } return local_c; }
51,434
google::protobuf::compiler::csharp::FieldGeneratorBase::FieldGeneratorBase(google::protobuf::FieldDescriptor const*, int, google::protobuf::compiler::csharp::Options const*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/csharp/csharp_field_base.cc
FieldGeneratorBase::FieldGeneratorBase(const FieldDescriptor* descriptor, int presenceIndex, const Options* options) : SourceGeneratorBase(options), descriptor_(descriptor), presenceIndex_(presenceIndex) { SetCommonFieldVariables(&variables_); }
O3
cpp
google::protobuf::compiler::csharp::FieldGeneratorBase::FieldGeneratorBase(google::protobuf::FieldDescriptor const*, int, google::protobuf::compiler::csharp::Options const*): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %edx, %ebp movq %rsi, %r14 movq %rdi, %rbx movq %rcx, %rsi callq 0x41a78 leaq 0x1d7618(%rip), %rax # 0x278800 movq %rax, (%rbx) movq %r14, 0x10(%rbx) movl %ebp, 0x18(%rbx) leaq 0x20(%rbx), %r14 leaq 0x28(%rbx), %rax movl $0x0, 0x28(%rbx) xorl %ecx, %ecx movq %rcx, 0x30(%rbx) movq %rax, 0x38(%rbx) movq %rax, 0x40(%rbx) movq %rcx, 0x48(%rbx) movq %rbx, %rdi movq %r14, %rsi callq 0x9e8b0 addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %r15 movq %r14, %rdi callq 0x2e5e0 movq %rbx, %rdi callq 0x41a88 movq %r15, %rdi callq 0x1f860
_ZN6google8protobuf8compiler6csharp18FieldGeneratorBaseC2EPKNS0_15FieldDescriptorEiPKNS2_7OptionsE: push rbp; void * push r15; int push r14; char push rbx; int push rax; void * mov ebp, edx mov r14, rsi mov rbx, rdi mov rsi, rcx call _ZN6google8protobuf8compiler6csharp19SourceGeneratorBaseC2EPKNS2_7OptionsE; google::protobuf::compiler::csharp::SourceGeneratorBase::SourceGeneratorBase(google::protobuf::compiler::csharp::Options const*) lea rax, off_278800 mov [rbx], rax mov [rbx+10h], r14 mov [rbx+18h], ebp lea r14, [rbx+20h] lea rax, [rbx+28h] mov dword ptr [rbx+28h], 0 xor ecx, ecx; int mov [rbx+30h], rcx mov [rbx+38h], rax mov [rbx+40h], rax mov [rbx+48h], rcx mov rdi, rbx; int mov rsi, r14; int call _ZN6google8protobuf8compiler6csharp18FieldGeneratorBase23SetCommonFieldVariablesEPSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_St4lessISA_ESaISt4pairIKSA_SA_EEE; google::protobuf::compiler::csharp::FieldGeneratorBase::SetCommonFieldVariables(std::map<std::string,std::string> *) add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn mov r15, rax mov rdi, r14 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree() mov rdi, rbx; this call _ZN6google8protobuf8compiler6csharp19SourceGeneratorBaseD2Ev; google::protobuf::compiler::csharp::SourceGeneratorBase::~SourceGeneratorBase() mov rdi, r15 call __Unwind_Resume
void google::protobuf::compiler::csharp::FieldGeneratorBase::FieldGeneratorBase( google::protobuf::compiler::csharp::FieldGeneratorBase *this, const google::protobuf::FieldDescriptor *a2, int a3, const google::protobuf::compiler::csharp::Options *a4) { google::protobuf::compiler::csharp::SourceGeneratorBase::SourceGeneratorBase(this, a4); *(_QWORD *)this = &off_278800; *((_QWORD *)this + 2) = a2; *((_DWORD *)this + 6) = a3; *((_DWORD *)this + 10) = 0; *((_QWORD *)this + 6) = 0LL; *((_QWORD *)this + 7) = (char *)this + 40; *((_QWORD *)this + 8) = (char *)this + 40; *((_QWORD *)this + 9) = 0LL; google::protobuf::compiler::csharp::FieldGeneratorBase::SetCommonFieldVariables(this, (long long)this + 32); }
FieldGeneratorBase: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBP,EDX MOV R14,RSI MOV RBX,RDI MOV RSI,RCX CALL 0x00141a78 LEA RAX,[0x378800] MOV qword ptr [RBX],RAX MOV qword ptr [RBX + 0x10],R14 MOV dword ptr [RBX + 0x18],EBP LEA R14,[RBX + 0x20] LEA RAX,[RBX + 0x28] MOV dword ptr [RBX + 0x28],0x0 XOR ECX,ECX MOV qword ptr [RBX + 0x30],RCX MOV qword ptr [RBX + 0x38],RAX MOV qword ptr [RBX + 0x40],RAX MOV qword ptr [RBX + 0x48],RCX LAB_001a1213: MOV RDI,RBX MOV RSI,R14 CALL 0x0019e8b0 LAB_001a121e: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
/* google::protobuf::compiler::csharp::FieldGeneratorBase::FieldGeneratorBase(google::protobuf::FieldDescriptor const*, int, google::protobuf::compiler::csharp::Options const*) */ void __thiscall google::protobuf::compiler::csharp::FieldGeneratorBase::FieldGeneratorBase (FieldGeneratorBase *this,FieldDescriptor *param_1,int param_2,Options *param_3) { SourceGeneratorBase::SourceGeneratorBase((SourceGeneratorBase *)this,param_3); *(int ***)this = &PTR__FieldGeneratorBase_00378800; *(FieldDescriptor **)(this + 0x10) = param_1; *(int *)(this + 0x18) = param_2; *(int4 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(FieldGeneratorBase **)(this + 0x38) = this + 0x28; *(FieldGeneratorBase **)(this + 0x40) = this + 0x28; *(int8 *)(this + 0x48) = 0; /* try { // try from 001a1213 to 001a121d has its CatchHandler @ 001a1229 */ SetCommonFieldVariables(this,(map *)(this + 0x20)); return; }
51,435
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&)
zkingston[P]unknot/build_O0/_deps/json-src/include/nlohmann/detail/conversions/to_chars.hpp
static diyfp mul(const diyfp& x, const diyfp& y) noexcept { static_assert(kPrecision == 64, "internal error"); // Computes: // f = round((x.f * y.f) / 2^q) // e = x.e + y.e + q // Emulate the 64-bit * 64-bit multiplication: // // p = u * v // = (u_lo + 2^32 u_hi) (v_lo + 2^32 v_hi) // = (u_lo v_lo ) + 2^32 ((u_lo v_hi ) + (u_hi v_lo )) + 2^64 (u_hi v_hi ) // = (p0 ) + 2^32 ((p1 ) + (p2 )) + 2^64 (p3 ) // = (p0_lo + 2^32 p0_hi) + 2^32 ((p1_lo + 2^32 p1_hi) + (p2_lo + 2^32 p2_hi)) + 2^64 (p3 ) // = (p0_lo ) + 2^32 (p0_hi + p1_lo + p2_lo ) + 2^64 (p1_hi + p2_hi + p3) // = (p0_lo ) + 2^32 (Q ) + 2^64 (H ) // = (p0_lo ) + 2^32 (Q_lo + 2^32 Q_hi ) + 2^64 (H ) // // (Since Q might be larger than 2^32 - 1) // // = (p0_lo + 2^32 Q_lo) + 2^64 (Q_hi + H) // // (Q_hi + H does not overflow a 64-bit int) // // = p_lo + 2^64 p_hi const std::uint64_t u_lo = x.f & 0xFFFFFFFFu; const std::uint64_t u_hi = x.f >> 32u; const std::uint64_t v_lo = y.f & 0xFFFFFFFFu; const std::uint64_t v_hi = y.f >> 32u; const std::uint64_t p0 = u_lo * v_lo; const std::uint64_t p1 = u_lo * v_hi; const std::uint64_t p2 = u_hi * v_lo; const std::uint64_t p3 = u_hi * v_hi; const std::uint64_t p0_hi = p0 >> 32u; const std::uint64_t p1_lo = p1 & 0xFFFFFFFFu; const std::uint64_t p1_hi = p1 >> 32u; const std::uint64_t p2_lo = p2 & 0xFFFFFFFFu; const std::uint64_t p2_hi = p2 >> 32u; std::uint64_t Q = p0_hi + p1_lo + p2_lo; // The full product might now be computed as // // p_hi = p3 + p2_hi + p1_hi + (Q >> 32) // p_lo = p0_lo + (Q << 32) // // But in this particular case here, the full p_lo is not required. // Effectively we only need to add the highest bit in p_lo to p_hi (and // Q_hi + 1 does not overflow). Q += std::uint64_t{1} << (64u - 32u - 1u); // round, ties up const std::uint64_t h = p3 + p2_hi + p1_hi + (Q >> 32u); return {h, x.e + y.e + 64}; }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&): subq $0x98, %rsp movq %rdi, 0x80(%rsp) movq %rsi, 0x78(%rsp) movq 0x80(%rsp), %rax movl (%rax), %eax movq %rax, 0x70(%rsp) movq 0x80(%rsp), %rax movl 0x4(%rax), %eax movq %rax, 0x68(%rsp) movq 0x78(%rsp), %rax movl (%rax), %eax movq %rax, 0x60(%rsp) movq 0x78(%rsp), %rax movl 0x4(%rax), %eax movq %rax, 0x58(%rsp) movq 0x70(%rsp), %rax movq 0x60(%rsp), %rcx imulq %rcx, %rax movq %rax, 0x50(%rsp) movq 0x70(%rsp), %rax movq 0x58(%rsp), %rcx imulq %rcx, %rax movq %rax, 0x48(%rsp) movq 0x68(%rsp), %rax movq 0x60(%rsp), %rcx imulq %rcx, %rax movq %rax, 0x40(%rsp) movq 0x68(%rsp), %rax movq 0x58(%rsp), %rcx imulq %rcx, %rax movq %rax, 0x38(%rsp) movl 0x54(%rsp), %eax movq %rax, 0x30(%rsp) movl 0x48(%rsp), %eax movq %rax, 0x28(%rsp) movl 0x4c(%rsp), %eax movq %rax, 0x20(%rsp) movl 0x40(%rsp), %eax movq %rax, 0x18(%rsp) movl 0x44(%rsp), %eax movq %rax, 0x10(%rsp) movq 0x30(%rsp), %rax movq 0x28(%rsp), %rcx addq %rcx, %rax movq 0x18(%rsp), %rcx addq %rcx, %rax movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax subq $-0x80000000, %rax # imm = 0x80000000 movq %rax, 0x8(%rsp) movq 0x38(%rsp), %rax movq 0x10(%rsp), %rcx addq %rcx, %rax movq 0x20(%rsp), %rcx addq %rcx, %rax movl 0xc(%rsp), %ecx addq %rcx, %rax movq %rax, (%rsp) movq (%rsp), %rsi movq 0x80(%rsp), %rax movl 0x8(%rax), %edx movq 0x78(%rsp), %rax movl 0x8(%rax), %eax movl %eax, %ecx movl %edx, %eax leal 0x40(%rax,%rcx), %edx leaq 0x88(%rsp), %rdi callq 0x6caa0 movq 0x88(%rsp), %rax movl 0x90(%rsp), %edx addq $0x98, %rsp retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3mulERKS3_S5_: sub rsp, 98h mov [rsp+98h+var_18], rdi mov [rsp+98h+var_20], rsi mov rax, [rsp+98h+var_18] mov eax, [rax] mov [rsp+98h+var_28], rax mov rax, [rsp+98h+var_18] mov eax, [rax+4] mov [rsp+98h+var_30], rax mov rax, [rsp+98h+var_20] mov eax, [rax] mov [rsp+98h+var_38], rax mov rax, [rsp+98h+var_20] mov eax, [rax+4] mov [rsp+98h+var_40], rax mov rax, [rsp+98h+var_28] mov rcx, [rsp+98h+var_38] imul rax, rcx mov [rsp+98h+var_48], rax mov rax, [rsp+98h+var_28] mov rcx, [rsp+98h+var_40] imul rax, rcx mov [rsp+98h+var_50], rax mov rax, [rsp+98h+var_30] mov rcx, [rsp+98h+var_38] imul rax, rcx mov [rsp+98h+var_58], rax mov rax, [rsp+98h+var_30] mov rcx, [rsp+98h+var_40] imul rax, rcx mov [rsp+98h+var_60], rax mov eax, dword ptr [rsp+98h+var_48+4] mov [rsp+98h+var_68], rax mov eax, dword ptr [rsp+98h+var_50] mov [rsp+98h+var_70], rax mov eax, dword ptr [rsp+98h+var_50+4] mov [rsp+98h+var_78], rax mov eax, dword ptr [rsp+98h+var_58] mov [rsp+98h+var_80], rax mov eax, dword ptr [rsp+98h+var_58+4] mov [rsp+98h+var_88], rax mov rax, [rsp+98h+var_68] mov rcx, [rsp+98h+var_70] add rax, rcx mov rcx, [rsp+98h+var_80] add rax, rcx mov [rsp+98h+var_90], rax mov rax, [rsp+98h+var_90] sub rax, 0FFFFFFFF80000000h mov [rsp+98h+var_90], rax mov rax, [rsp+98h+var_60] mov rcx, [rsp+98h+var_88] add rax, rcx mov rcx, [rsp+98h+var_78] add rax, rcx mov ecx, dword ptr [rsp+98h+var_90+4] add rax, rcx mov [rsp+98h+var_98], rax mov rsi, [rsp+98h+var_98]; unsigned __int64 mov rax, [rsp+98h+var_18] mov edx, [rax+8] mov rax, [rsp+98h+var_20] mov eax, [rax+8] mov ecx, eax mov eax, edx lea edx, [rax+rcx+40h]; int lea rdi, [rsp+98h+var_10]; this call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfpC2Emi; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::diyfp(ulong,int) mov rax, [rsp+98h+var_10] mov edx, [rsp+98h+var_8] add rsp, 98h retn
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul( nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp *this, const nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp *a2, const nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp *a3) { long long v4; // [rsp+68h] [rbp-30h] long long v5; // [rsp+70h] [rbp-28h] long long v6; // [rsp+88h] [rbp-10h] BYREF v5 = *(unsigned int *)this; v4 = *((unsigned int *)this + 1); nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::diyfp( (nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp *)&v6, (((unsigned int)(*(_DWORD *)a2 * v4) + (unsigned int)(*((_DWORD *)a2 + 1) * v5) + (((unsigned long long)*(unsigned int *)a2 * v5) >> 32) + 0x80000000) >> 32) + (((unsigned long long)*((unsigned int *)a2 + 1) * v5) >> 32) + (((unsigned long long)*(unsigned int *)a2 * v4) >> 32) + *((unsigned int *)a2 + 1) * v4, *((_DWORD *)this + 2) + *((_DWORD *)a2 + 2) + 64); return v6; }
mul: SUB RSP,0x98 MOV qword ptr [RSP + 0x80],RDI MOV qword ptr [RSP + 0x78],RSI MOV RAX,qword ptr [RSP + 0x80] MOV EAX,dword ptr [RAX] MOV qword ptr [RSP + 0x70],RAX MOV RAX,qword ptr [RSP + 0x80] MOV EAX,dword ptr [RAX + 0x4] MOV qword ptr [RSP + 0x68],RAX MOV RAX,qword ptr [RSP + 0x78] MOV EAX,dword ptr [RAX] MOV qword ptr [RSP + 0x60],RAX MOV RAX,qword ptr [RSP + 0x78] MOV EAX,dword ptr [RAX + 0x4] MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x70] MOV RCX,qword ptr [RSP + 0x60] IMUL RAX,RCX MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [RSP + 0x70] MOV RCX,qword ptr [RSP + 0x58] IMUL RAX,RCX MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0x68] MOV RCX,qword ptr [RSP + 0x60] IMUL RAX,RCX MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x68] MOV RCX,qword ptr [RSP + 0x58] IMUL RAX,RCX MOV qword ptr [RSP + 0x38],RAX MOV EAX,dword ptr [RSP + 0x54] MOV qword ptr [RSP + 0x30],RAX MOV EAX,dword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x28],RAX MOV EAX,dword ptr [RSP + 0x4c] MOV qword ptr [RSP + 0x20],RAX MOV EAX,dword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x18],RAX MOV EAX,dword ptr [RSP + 0x44] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RSP + 0x28] ADD RAX,RCX MOV RCX,qword ptr [RSP + 0x18] ADD RAX,RCX MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x8] SUB RAX,-0x80000000 MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x38] MOV RCX,qword ptr [RSP + 0x10] ADD RAX,RCX MOV RCX,qword ptr [RSP + 0x20] ADD RAX,RCX MOV ECX,dword ptr [RSP + 0xc] ADD RAX,RCX MOV qword ptr [RSP],RAX MOV RSI,qword ptr [RSP] MOV RAX,qword ptr [RSP + 0x80] MOV EDX,dword ptr [RAX + 0x8] MOV RAX,qword ptr [RSP + 0x78] MOV EAX,dword ptr [RAX + 0x8] MOV ECX,EAX MOV EAX,EDX LEA EDX,[RAX + RCX*0x1 + 0x40] LEA RDI,[RSP + 0x88] CALL 0x0016caa0 MOV RAX,qword ptr [RSP + 0x88] MOV EDX,dword ptr [RSP + 0x90] ADD RSP,0x98 RET
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) */ int1 [16] nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(diyfp *param_1,diyfp *param_2) { ulong uVar1; ulong uVar2; int1 auVar3 [16]; diyfp local_10 [16]; int1 auVar4 [11]; uVar1 = (ulong)*(uint *)param_1 * (ulong)*(uint *)(param_2 + 4); uVar2 = (ulong)*(uint *)(param_1 + 4) * (ulong)*(uint *)param_2; diyfp(local_10,(ulong)*(uint *)(param_1 + 4) * (ulong)*(uint *)(param_2 + 4) + (uVar2 >> 0x20) + (uVar1 >> 0x20) + (((ulong)*(uint *)param_1 * (ulong)*(uint *)param_2 >> 0x20) + (uVar1 & 0xffffffff) + (uVar2 & 0xffffffff) + 0x80000000 >> 0x20), *(int *)(param_1 + 8) + 0x40 + *(int *)(param_2 + 8)); auVar3._12_4_ = 0; auVar3[0] = local_10[0]; auVar4[1] = local_10[1]; auVar4[2] = local_10[2]; auVar4[3] = local_10[3]; auVar4[4] = local_10[4]; auVar4[5] = local_10[5]; auVar4[6] = local_10[6]; auVar4[7] = local_10[7]; auVar3[8] = local_10[8]; auVar3[9] = local_10[9]; auVar3[10] = local_10[10]; auVar3[0xb] = local_10[0xb]; return auVar3; }
51,436
my_wc_to_printable_ex
eloqsql/strings/ctype.c
int my_wc_to_printable_ex(CHARSET_INFO *cs, my_wc_t wc, uchar *str, uchar *end, uint bs, uint bslen, uint diglen) { uchar *str0; uint i, length; uchar tmp[MY_CS_PRINTABLE_CHAR_LENGTH * MY_CS_MBMAXLEN]; if (my_is_printable(wc)) { int mblen= my_ci_wc_mb(cs, wc, str, end); if (mblen > 0) return mblen; } if (str + my_printable_length(bslen, diglen) > end) return MY_CS_TOOSMALLN(my_printable_length(bslen, diglen)); if ((cs->state & MY_CS_NONASCII) == 0) return to_printable_8bit(str, wc, bs); length= to_printable_8bit(tmp, wc, bs); str0= str; for (i= 0; i < length; i++) { uint expected_length= i == 0 ? bslen : diglen; if (my_ci_wc_mb(cs, tmp[i], str, end) != (int) expected_length) { DBUG_ASSERT(0); return MY_CS_ILSEQ; } str+= expected_length; } return (int) (str - str0); }
O0
c
my_wc_to_printable_ex: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movl 0x10(%rbp), %eax movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x40(%rbp) movq %rsi, -0x48(%rbp) movq %rdx, -0x50(%rbp) movq %rcx, -0x58(%rbp) movl %r8d, -0x5c(%rbp) movl %r9d, -0x60(%rbp) movq -0x48(%rbp), %rdi callq 0x14b7a0 cmpb $0x0, %al je 0x14b657 movq -0x40(%rbp), %rax movq 0xb8(%rax), %rax movq 0x30(%rax), %rax movq -0x40(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x50(%rbp), %rdx movq -0x58(%rbp), %rcx callq *%rax movl %eax, -0x74(%rbp) cmpl $0x0, -0x74(%rbp) jle 0x14b655 movl -0x74(%rbp), %eax movl %eax, -0x34(%rbp) jmp 0x14b76f jmp 0x14b657 movq -0x50(%rbp), %rax movq %rax, -0x80(%rbp) movl -0x60(%rbp), %edi movl 0x10(%rbp), %esi callq 0x14b820 movl %eax, %ecx movq -0x80(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax cmpq -0x58(%rbp), %rax jbe 0x14b697 movl -0x60(%rbp), %edi movl 0x10(%rbp), %esi callq 0x14b820 movl %eax, %ecx movl $0xffffff9c, %eax # imm = 0xFFFFFF9C subl %ecx, %eax movl %eax, -0x34(%rbp) jmp 0x14b76f movq -0x40(%rbp), %rax movl 0xc(%rax), %eax andl $0x2000, %eax # imm = 0x2000 cmpl $0x0, %eax jne 0x14b6c0 movq -0x50(%rbp), %rdi movq -0x48(%rbp), %rsi movl -0x5c(%rbp), %edx callq 0x14b840 movl %eax, -0x34(%rbp) jmp 0x14b76f leaq -0x30(%rbp), %rdi movq -0x48(%rbp), %rsi movl -0x5c(%rbp), %edx callq 0x14b840 movl %eax, -0x70(%rbp) movq -0x50(%rbp), %rax movq %rax, -0x68(%rbp) movl $0x0, -0x6c(%rbp) movl -0x6c(%rbp), %eax cmpl -0x70(%rbp), %eax jae 0x14b761 cmpl $0x0, -0x6c(%rbp) jne 0x14b6fb movl -0x60(%rbp), %eax movl %eax, -0x84(%rbp) jmp 0x14b704 movl 0x10(%rbp), %eax movl %eax, -0x84(%rbp) movl -0x84(%rbp), %eax movl %eax, -0x78(%rbp) movq -0x40(%rbp), %rax movq 0xb8(%rax), %rax movq 0x30(%rax), %rax movq -0x40(%rbp), %rdi movl -0x6c(%rbp), %ecx movzbl -0x30(%rbp,%rcx), %ecx movl %ecx, %esi movq -0x50(%rbp), %rdx movq -0x58(%rbp), %rcx callq *%rax cmpl -0x78(%rbp), %eax je 0x14b746 jmp 0x14b73b jmp 0x14b73d movl $0x0, -0x34(%rbp) jmp 0x14b76f movl -0x78(%rbp), %ecx movq -0x50(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x50(%rbp) movl -0x6c(%rbp), %eax addl $0x1, %eax movl %eax, -0x6c(%rbp) jmp 0x14b6e2 movq -0x50(%rbp), %rax movq -0x68(%rbp), %rcx subq %rcx, %rax movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax movl %eax, -0x88(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x14b799 movl -0x88(%rbp), %eax addq $0x90, %rsp popq %rbp retq callq 0x29230 nop
my_wc_to_printable_ex: push rbp mov rbp, rsp sub rsp, 90h mov eax, [rbp+arg_0] mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_40], rdi mov [rbp+var_48], rsi mov [rbp+var_50], rdx mov [rbp+var_58], rcx mov [rbp+var_5C], r8d mov [rbp+var_60], r9d mov rdi, [rbp+var_48] call my_is_printable cmp al, 0 jz short loc_14B657 mov rax, [rbp+var_40] mov rax, [rax+0B8h] mov rax, [rax+30h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_48] mov rdx, [rbp+var_50] mov rcx, [rbp+var_58] call rax mov [rbp+var_74], eax cmp [rbp+var_74], 0 jle short loc_14B655 mov eax, [rbp+var_74] mov [rbp+var_34], eax jmp loc_14B76F loc_14B655: jmp short $+2 loc_14B657: mov rax, [rbp+var_50] mov [rbp+var_80], rax mov edi, [rbp+var_60] mov esi, [rbp+arg_0] call my_printable_length mov ecx, eax mov rax, [rbp+var_80] mov ecx, ecx add rax, rcx cmp rax, [rbp+var_58] jbe short loc_14B697 mov edi, [rbp+var_60] mov esi, [rbp+arg_0] call my_printable_length mov ecx, eax mov eax, 0FFFFFF9Ch sub eax, ecx mov [rbp+var_34], eax jmp loc_14B76F loc_14B697: mov rax, [rbp+var_40] mov eax, [rax+0Ch] and eax, 2000h cmp eax, 0 jnz short loc_14B6C0 mov rdi, [rbp+var_50] mov rsi, [rbp+var_48] mov edx, [rbp+var_5C] call to_printable_8bit mov [rbp+var_34], eax jmp loc_14B76F loc_14B6C0: lea rdi, [rbp+var_30] mov rsi, [rbp+var_48] mov edx, [rbp+var_5C] call to_printable_8bit mov [rbp+var_70], eax mov rax, [rbp+var_50] mov [rbp+var_68], rax mov [rbp+var_6C], 0 loc_14B6E2: mov eax, [rbp+var_6C] cmp eax, [rbp+var_70] jnb short loc_14B761 cmp [rbp+var_6C], 0 jnz short loc_14B6FB mov eax, [rbp+var_60] mov [rbp+var_84], eax jmp short loc_14B704 loc_14B6FB: mov eax, [rbp+arg_0] mov [rbp+var_84], eax loc_14B704: mov eax, [rbp+var_84] mov [rbp+var_78], eax mov rax, [rbp+var_40] mov rax, [rax+0B8h] mov rax, [rax+30h] mov rdi, [rbp+var_40] mov ecx, [rbp+var_6C] movzx ecx, [rbp+rcx+var_30] mov esi, ecx mov rdx, [rbp+var_50] mov rcx, [rbp+var_58] call rax cmp eax, [rbp+var_78] jz short loc_14B746 jmp short $+2 loc_14B73B: jmp short $+2 loc_14B73D: mov [rbp+var_34], 0 jmp short loc_14B76F loc_14B746: mov ecx, [rbp+var_78] mov rax, [rbp+var_50] mov ecx, ecx add rax, rcx mov [rbp+var_50], rax mov eax, [rbp+var_6C] add eax, 1 mov [rbp+var_6C], eax jmp short loc_14B6E2 loc_14B761: mov rax, [rbp+var_50] mov rcx, [rbp+var_68] sub rax, rcx mov [rbp+var_34], eax loc_14B76F: mov eax, [rbp+var_34] mov [rbp+var_88], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_14B799 mov eax, [rbp+var_88] add rsp, 90h pop rbp retn loc_14B799: call ___stack_chk_fail
long long my_wc_to_printable_ex( long long a1, long long a2, long long a3, unsigned long long a4, unsigned int a5, unsigned int a6, unsigned int a7) { unsigned int v8; // [rsp+Ch] [rbp-84h] int v9; // [rsp+1Ch] [rbp-74h] unsigned int v10; // [rsp+20h] [rbp-70h] unsigned int i; // [rsp+24h] [rbp-6Ch] int v12; // [rsp+28h] [rbp-68h] _BYTE v18[40]; // [rsp+60h] [rbp-30h] BYREF unsigned long long v19; // [rsp+88h] [rbp-8h] v19 = __readfsqword(0x28u); if ( (unsigned __int8)my_is_printable(a2) && (v9 = (*(long long ( **)(long long, long long, long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 48LL))( a1, a2, a3, a4), v9 > 0) ) { return (unsigned int)v9; } else if ( (unsigned long long)(unsigned int)my_printable_length(a6, a7) + a3 <= a4 ) { if ( (*(_DWORD *)(a1 + 12) & 0x2000) != 0 ) { v10 = to_printable_8bit(v18, a2, a5); v12 = a3; for ( i = 0; i < v10; ++i ) { if ( i ) v8 = a7; else v8 = a6; if ( (*(unsigned int ( **)(long long, _QWORD, long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 48LL))( a1, (unsigned __int8)v18[i], a3, a4) != v8 ) return 0; a3 += v8; } return (unsigned int)(a3 - v12); } else { return (unsigned int)to_printable_8bit(a3, a2, a5); } } else { return (unsigned int)(-100 - my_printable_length(a6, a7)); } }
uf_space_normal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x4],0x0 JZ 0x0014b627 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] ADD ECX,-0x1 MOV dword ptr [RDX + 0x4],ECX MOV EDX,0x1 SHL EDX,CL MOV ECX,EDX AND EAX,ECX CMP EAX,0x0 JNZ 0x0014b64b JMP 0x0014b666 LAB_0014b627: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0014b3c0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4],0x1f MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] AND EAX,0x80000000 CMP EAX,0x0 JZ 0x0014b666 LAB_0014b64b: MOV RDI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] SUB RDX,RAX MOV ESI,0x20 CALL 0x00129280 JMP 0x0014b67b LAB_0014b666: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] CALL 0x0014b700 LAB_0014b67b: ADD RSP,0x20 POP RBP RET
void uf_space_normal(int8 param_1,uint *param_2,void *param_3,long param_4) { uint uVar1; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar1 = *param_2 & 0x80000000; } else { uVar1 = param_2[1]; param_2[1] = uVar1 - 1; uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f); } if (uVar1 == 0) { decode_bytes(param_1,param_2,param_3,param_4); } else { memset(param_3,0x20,param_4 - (long)param_3); } return; }
51,437
ma_hashtbl_next
eloqsql/libmariadb/libmariadb/ma_hashtbl.c
void *ma_hashtbl_next(MA_HASHTBL *hash,const uchar *key,uint length) { MA_HASHTBL_LINK *pos; uint idx; if (hash->current_record != NO_RECORD) { MA_HASHTBL_LINK *data=dynamic_element(&hash->array,0,MA_HASHTBL_LINK*); for (idx=data[hash->current_record].next; idx != NO_RECORD ; idx=pos->next) { pos=data+idx; if (!hashcmp(hash,pos,key,length)) { hash->current_record= idx; return pos->data; } } hash->current_record=NO_RECORD; } return 0; }
O0
c
ma_hashtbl_next: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq -0x10(%rbp), %rax cmpl $-0x1, 0x10(%rax) je 0x4cc85 movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq -0x10(%rbp), %rcx movl 0x10(%rcx), %ecx shlq $0x4, %rcx addq %rcx, %rax movl (%rax), %eax movl %eax, -0x2c(%rbp) cmpl $-0x1, -0x2c(%rbp) je 0x4cc7a movq -0x38(%rbp), %rax movl -0x2c(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x18(%rbp), %rdx movl -0x1c(%rbp), %ecx callq 0x4cb00 cmpl $0x0, %eax jne 0x4cc6d movl -0x2c(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x10(%rax) movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x8(%rbp) jmp 0x4cc8d jmp 0x4cc6f movq -0x28(%rbp), %rax movl (%rax), %eax movl %eax, -0x2c(%rbp) jmp 0x4cc24 movq -0x10(%rbp), %rax movl $0xffffffff, 0x10(%rax) # imm = 0xFFFFFFFF movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw (%rax,%rax)
ma_hashtbl_next: 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] cmp dword ptr [rax+10h], 0FFFFFFFFh jz loc_4CC85 mov rax, [rbp+var_10] mov rax, [rax+18h] mov [rbp+var_38], rax mov rax, [rbp+var_38] mov rcx, [rbp+var_10] mov ecx, [rcx+10h] shl rcx, 4 add rax, rcx mov eax, [rax] mov [rbp+var_2C], eax loc_4CC24: cmp [rbp+var_2C], 0FFFFFFFFh jz short loc_4CC7A mov rax, [rbp+var_38] mov ecx, [rbp+var_2C] shl rcx, 4 add rax, rcx mov [rbp+var_28], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] mov rdx, [rbp+var_18] mov ecx, [rbp+var_1C] call hashcmp cmp eax, 0 jnz short loc_4CC6D mov ecx, [rbp+var_2C] mov rax, [rbp+var_10] mov [rax+10h], ecx mov rax, [rbp+var_28] mov rax, [rax+8] mov [rbp+var_8], rax jmp short loc_4CC8D loc_4CC6D: jmp short $+2 loc_4CC6F: mov rax, [rbp+var_28] mov eax, [rax] mov [rbp+var_2C], eax jmp short loc_4CC24 loc_4CC7A: mov rax, [rbp+var_10] mov dword ptr [rax+10h], 0FFFFFFFFh loc_4CC85: mov [rbp+var_8], 0 loc_4CC8D: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long ma_hashtbl_next(long long a1, long long a2, int a3) { long long v4; // [rsp+8h] [rbp-38h] unsigned int i; // [rsp+14h] [rbp-2Ch] long long v6; // [rsp+18h] [rbp-28h] if ( *(_DWORD *)(a1 + 16) != -1 ) { v4 = *(_QWORD *)(a1 + 24); for ( i = *(_DWORD *)(16LL * *(unsigned int *)(a1 + 16) + v4); i != -1; i = *(_DWORD *)v6 ) { v6 = 16LL * i + v4; if ( !hashcmp(a1, v6, a2, a3) ) { *(_DWORD *)(a1 + 16) = i; return *(_QWORD *)(v6 + 8); } } *(_DWORD *)(a1 + 16) = -1; } return 0LL; }
ma_hashtbl_next: 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] CMP dword ptr [RAX + 0x10],-0x1 JZ 0x0014cc85 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x10] SHL RCX,0x4 ADD RAX,RCX MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX LAB_0014cc24: CMP dword ptr [RBP + -0x2c],-0x1 JZ 0x0014cc7a MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x2c] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x1c] CALL 0x0014cb00 CMP EAX,0x0 JNZ 0x0014cc6d MOV ECX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x8],RAX JMP 0x0014cc8d LAB_0014cc6d: JMP 0x0014cc6f LAB_0014cc6f: MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX JMP 0x0014cc24 LAB_0014cc7a: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x10],0xffffffff LAB_0014cc85: MOV qword ptr [RBP + -0x8],0x0 LAB_0014cc8d: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
int8 ma_hashtbl_next(long param_1,int8 param_2,int4 param_3) { long lVar1; int iVar2; uint *puVar3; uint local_34; if (*(int *)(param_1 + 0x10) != -1) { lVar1 = *(long *)(param_1 + 0x18); local_34 = *(uint *)(lVar1 + (ulong)*(uint *)(param_1 + 0x10) * 0x10); while (local_34 != 0xffffffff) { puVar3 = (uint *)(lVar1 + (ulong)local_34 * 0x10); iVar2 = hashcmp(param_1,puVar3,param_2,param_3); if (iVar2 == 0) { *(uint *)(param_1 + 0x10) = local_34; return *(int8 *)(puVar3 + 2); } local_34 = *puVar3; } *(int4 *)(param_1 + 0x10) = 0xffffffff; } return 0; }
51,438
inline_mysql_cond_signal
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_cond_signal( mysql_cond_t *that) { int result; #ifdef HAVE_PSI_COND_INTERFACE if (psi_likely(that->m_psi != NULL)) PSI_COND_CALL(signal_cond)(that->m_psi); #endif result= pthread_cond_signal(&that->m_cond); return result; }
O0
c
inline_mysql_cond_signal: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x30(%rax) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x5a85b leaq 0x1b9ad9(%rip), %rax # 0x214320 movq (%rax), %rax movq 0x170(%rax), %rax movq -0x8(%rbp), %rcx movq 0x30(%rcx), %rdi callq *%rax movq -0x8(%rbp), %rdi callq 0x26030 movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax addq $0x10, %rsp popq %rbp retq
inline_mysql_cond_signal: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp qword ptr [rax+30h], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_5A85B lea rax, PSI_server mov rax, [rax] mov rax, [rax+170h] mov rcx, [rbp+var_8] mov rdi, [rcx+30h] call rax loc_5A85B: mov rdi, [rbp+var_8] call _pthread_cond_signal mov [rbp+var_C], eax mov eax, [rbp+var_C] add rsp, 10h pop rbp retn
long long inline_mysql_cond_signal(long long a1) { if ( *(_QWORD *)(a1 + 48) ) ((void ( *)(_QWORD))PSI_server[46])(*(_QWORD *)(a1 + 48)); return (unsigned int)pthread_cond_signal(a1); }
inline_mysql_cond_signal: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x30],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x0015a85b LEA RAX,[0x314320] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x170] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x30] CALL RAX LAB_0015a85b: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00126030 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0xc] ADD RSP,0x10 POP RBP RET
int inline_mysql_cond_signal(pthread_cond_t *param_1) { int iVar1; if (param_1[1].__align != 0) { (**(code **)(PSI_server + 0x170))(param_1[1].__align); } iVar1 = pthread_cond_signal(param_1); return iVar1; }
51,439
ulp
eloqsql/strings/dtoa.c
static double ulp(U *x) { register Long L; U u; L= (word0(x) & Exp_mask) - (P - 1)*Exp_msk1; word0(&u) = L; word1(&u) = 0; return dval(&u); }
O0
c
ulp: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movl 0x4(%rax), %eax andl $0x7ff00000, %eax # imm = 0x7FF00000 subl $0x3400000, %eax # imm = 0x3400000 movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax movl %eax, -0x14(%rbp) movl $0x0, -0x18(%rbp) movsd -0x18(%rbp), %xmm0 popq %rbp retq
ulp: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov eax, [rax+4] and eax, 7FF00000h sub eax, 3400000h mov [rbp+var_C], eax mov eax, [rbp+var_C] mov dword ptr [rbp+var_18+4], eax mov dword ptr [rbp+var_18], 0 movsd xmm0, [rbp+var_18] pop rbp retn
double ulp(long long a1) { double v2; // [rsp+0h] [rbp-18h] HIDWORD(v2) = (*(_DWORD *)(a1 + 4) & 0x7FF00000) - 54525952; LODWORD(v2) = 0; return v2; }
ulp: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x4] AND EAX,0x7ff00000 SUB EAX,0x3400000 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x14],EAX MOV dword ptr [RBP + -0x18],0x0 MOVSD XMM0,qword ptr [RBP + -0x18] POP RBP RET
long ulp(long param_1) { return (ulong)((*(uint *)(param_1 + 4) & 0x7ff00000) + 0xfcc00000) << 0x20; }
51,440
google::protobuf::compiler::java::RepeatedImmutableStringFieldGenerator::GenerateMembers(google::protobuf::io::Printer*) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/string_field.cc
void RepeatedImmutableStringFieldGenerator::GenerateMembers( io::Printer* printer) const { printer->Print(variables_, "@SuppressWarnings(\"serial\")\n" "private com.google.protobuf.LazyStringList $name$_;\n"); PrintExtraFieldInfo(variables_, printer); WriteFieldAccessorDocComment(printer, descriptor_, LIST_GETTER); printer->Print(variables_, "$deprecation$public com.google.protobuf.ProtocolStringList\n" " ${$get$capitalized_name$List$}$() {\n" " return $name$_;\n" // note: unmodifiable list "}\n"); printer->Annotate("{", "}", descriptor_); WriteFieldAccessorDocComment(printer, descriptor_, LIST_COUNT); printer->Print( variables_, "$deprecation$public int ${$get$capitalized_name$Count$}$() {\n" " return $name$_.size();\n" "}\n"); printer->Annotate("{", "}", descriptor_); WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_GETTER); printer->Print(variables_, "$deprecation$public java.lang.String " "${$get$capitalized_name$$}$(int index) {\n" " return $name$_.get(index);\n" "}\n"); printer->Annotate("{", "}", descriptor_); WriteFieldStringBytesAccessorDocComment(printer, descriptor_, LIST_INDEXED_GETTER); printer->Print(variables_, "$deprecation$public com.google.protobuf.ByteString\n" " ${$get$capitalized_name$Bytes$}$(int index) {\n" " return $name$_.getByteString(index);\n" "}\n"); printer->Annotate("{", "}", descriptor_); }
O3
cpp
google::protobuf::compiler::java::RepeatedImmutableStringFieldGenerator::GenerateMembers(google::protobuf::io::Printer*) const: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 leaq 0x18(%rdi), %r15 leaq 0xfaa86(%rip), %rdx # 0x1e2e8e movq %rsi, %rdi movq %r15, %rsi callq 0x16cd32 movq %r15, %rdi movq %rbx, %rsi callq 0xd5ca2 movq 0x8(%r14), %rsi movq %rbx, %rdi movl $0x5, %edx xorl %ecx, %ecx callq 0xcff9a leaq 0xfaaa7(%rip), %rdx # 0x1e2edf movq %rbx, %rdi movq %r15, %rsi callq 0x16cd32 movq 0x8(%r14), %rcx leaq 0x107c8b(%rip), %r12 # 0x1f00d9 leaq 0xf8278(%rip), %r13 # 0x1e06cd movq %rbx, %rdi movq %r12, %rsi movq %r13, %rdx callq 0xafc7e movq 0x8(%r14), %rsi movq %rbx, %rdi movl $0x4, %edx xorl %ecx, %ecx callq 0xcff9a leaq 0xf2e8b(%rip), %rdx # 0x1db308 movq %rbx, %rdi movq %r15, %rsi callq 0x16cd32 movq 0x8(%r14), %rcx movq %rbx, %rdi movq %r12, %rsi movq %r13, %rdx callq 0xafc7e movq 0x8(%r14), %rsi movq %rbx, %rdi movl $0x6, %edx xorl %ecx, %ecx callq 0xcff9a leaq 0xfc51f(%rip), %rdx # 0x1e49d3 movq %rbx, %rdi movq %r15, %rsi callq 0x16cd32 movq 0x8(%r14), %rcx movq %rbx, %rdi movq %r12, %rsi movq %r13, %rdx callq 0xafc7e movq 0x8(%r14), %rsi movq %rbx, %rdi movl $0x6, %edx xorl %ecx, %ecx callq 0xd033e leaq 0xfaa6c(%rip), %rdx # 0x1e2f57 movq %rbx, %rdi movq %r15, %rsi callq 0x16cd32 movq 0x8(%r14), %rcx movq %rbx, %rdi movq %r12, %rsi movq %r13, %rdx popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 jmp 0xafc7e nop
_ZNK6google8protobuf8compiler4java37RepeatedImmutableStringFieldGenerator15GenerateMembersEPNS0_2io7PrinterE: push r15; int push r14; int push r13; char push r12; int push rbx; void * mov rbx, rsi mov r14, rdi lea r15, [rdi+18h] lea rdx, aSuppresswarnin_6; "@SuppressWarnings(\"serial\")\nprivate "... mov rdi, rsi; this mov rsi, r15 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rdi, r15 mov rsi, rbx call _ZN6google8protobuf8compiler4java19PrintExtraFieldInfoERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPNS0_2io7PrinterE; google::protobuf::compiler::java::PrintExtraFieldInfo(std::map<std::string,std::string> const&,google::protobuf::io::Printer *) mov rsi, [r14+8]; google::protobuf::FieldDescriptor * mov rdi, rbx; this mov edx, 5 xor ecx, ecx call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) lea rdx, aDeprecationPub_84; "$deprecation$public com.google.protobuf"... mov rdi, rbx; this mov rsi, r15 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rcx, [r14+8] lea r12, a0oneof1+0Bh; "{" lea r13, aKotlinJvmJvmsy_32+0E3h; "}" mov rdi, rbx mov rsi, r12 mov rdx, r13 call _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*) mov rsi, [r14+8]; google::protobuf::FieldDescriptor * mov rdi, rbx; this mov edx, 4 xor ecx, ecx call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) lea rdx, aJavaLangOverri_68+14h; "$deprecation$public int ${$get$capitali"... mov rdi, rbx; this mov rsi, r15 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rcx, [r14+8] mov rdi, rbx mov rsi, r12 mov rdx, r13 call _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*) mov rsi, [r14+8]; google::protobuf::FieldDescriptor * mov rdi, rbx; this mov edx, 6 xor ecx, ecx call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) lea rdx, aJavaLangOverri_94+14h; "$deprecation$public java.lang.String ${"... mov rdi, rbx; this mov rsi, r15 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rcx, [r14+8] mov rdi, rbx mov rsi, r12 mov rdx, r13 call _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*) mov rsi, [r14+8]; google::protobuf::FieldDescriptor * mov rdi, rbx; this mov edx, 6 xor ecx, ecx call _ZN6google8protobuf8compiler4java39WriteFieldStringBytesAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldStringBytesAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) lea rdx, aDeprecationPub_86; "$deprecation$public com.google.protobuf"... mov rdi, rbx; this mov rsi, r15 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rcx, [r14+8] mov rdi, rbx mov rsi, r12 mov rdx, r13 pop rbx pop r12 pop r13 pop r14 pop r15 jmp _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*)
GenerateMembers: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV RBX,RSI MOV R14,RDI LEA R15,[RDI + 0x18] LEA RDX,[0x2e2e8e] MOV RDI,RSI MOV RSI,R15 CALL 0x0026cd32 MOV RDI,R15 MOV RSI,RBX CALL 0x001d5ca2 MOV RSI,qword ptr [R14 + 0x8] MOV RDI,RBX MOV EDX,0x5 XOR ECX,ECX CALL 0x001cff9a LEA RDX,[0x2e2edf] MOV RDI,RBX MOV RSI,R15 CALL 0x0026cd32 MOV RCX,qword ptr [R14 + 0x8] LEA R12,[0x2f00d9] LEA R13,[0x2e06cd] MOV RDI,RBX MOV RSI,R12 MOV RDX,R13 CALL 0x001afc7e MOV RSI,qword ptr [R14 + 0x8] MOV RDI,RBX MOV EDX,0x4 XOR ECX,ECX CALL 0x001cff9a LEA RDX,[0x2db308] MOV RDI,RBX MOV RSI,R15 CALL 0x0026cd32 MOV RCX,qword ptr [R14 + 0x8] MOV RDI,RBX MOV RSI,R12 MOV RDX,R13 CALL 0x001afc7e MOV RSI,qword ptr [R14 + 0x8] MOV RDI,RBX MOV EDX,0x6 XOR ECX,ECX CALL 0x001cff9a LEA RDX,[0x2e49d3] MOV RDI,RBX MOV RSI,R15 CALL 0x0026cd32 MOV RCX,qword ptr [R14 + 0x8] MOV RDI,RBX MOV RSI,R12 MOV RDX,R13 CALL 0x001afc7e MOV RSI,qword ptr [R14 + 0x8] MOV RDI,RBX MOV EDX,0x6 XOR ECX,ECX CALL 0x001d033e LEA RDX,[0x2e2f57] MOV RDI,RBX MOV RSI,R15 CALL 0x0026cd32 MOV RCX,qword ptr [R14 + 0x8] MOV RDI,RBX MOV RSI,R12 MOV RDX,R13 POP RBX POP R12 POP R13 POP R14 POP R15 JMP 0x001afc7e
/* google::protobuf::compiler::java::RepeatedImmutableStringFieldGenerator::GenerateMembers(google::protobuf::io::Printer*) const */ void __thiscall google::protobuf::compiler::java::RepeatedImmutableStringFieldGenerator::GenerateMembers (RepeatedImmutableStringFieldGenerator *this,Printer *param_1) { map *pmVar1; pmVar1 = (map *)(this + 0x18); io::Printer::Print(param_1,pmVar1, "@SuppressWarnings(\"serial\")\nprivate com.google.protobuf.LazyStringList $name$_;\n" ); PrintExtraFieldInfo(pmVar1,param_1); WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),5,0); io::Printer::Print(param_1,pmVar1, "$deprecation$public com.google.protobuf.ProtocolStringList\n ${$get$capitalized_name$List$}$() {\n return $name$_;\n}\n" ); io::Printer::Annotate<google::protobuf::FieldDescriptor> (param_1,"{","}",*(FieldDescriptor **)(this + 8)); WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),4,0); io::Printer::Print(param_1,pmVar1, "$deprecation$public int ${$get$capitalized_name$Count$}$() {\n return $name$_.size();\n}\n" ); io::Printer::Annotate<google::protobuf::FieldDescriptor> (param_1,"{","}",*(FieldDescriptor **)(this + 8)); WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),6,0); io::Printer::Print(param_1,pmVar1, "$deprecation$public java.lang.String ${$get$capitalized_name$$}$(int index) {\n return $name$_.get(index);\n}\n" ); io::Printer::Annotate<google::protobuf::FieldDescriptor> (param_1,"{","}",*(FieldDescriptor **)(this + 8)); WriteFieldStringBytesAccessorDocComment(param_1,*(int8 *)(this + 8),6,0); io::Printer::Print(param_1,pmVar1, "$deprecation$public com.google.protobuf.ByteString\n ${$get$capitalized_name$Bytes$}$(int index) {\n return $name$_.getByteString(index);\n}\n" ); io::Printer::Annotate<google::protobuf::FieldDescriptor> (param_1,"{","}",*(FieldDescriptor **)(this + 8)); return; }
51,441
google::protobuf::(anonymous namespace)::AggregateErrorCollector::AddError(int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
void AddError(int /* line */, int /* column */, const std::string& message) override { if (!error_.empty()) { error_ += "; "; } error_ += message; }
O3
cpp
google::protobuf::(anonymous namespace)::AggregateErrorCollector::AddError(int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r14 pushq %rbx pushq %rax movq %rcx, %rbx leaq 0x8(%rdi), %r14 cmpq $0x0, 0x10(%rdi) je 0xdefb9 leaq 0x8f72a(%rip), %rsi # 0x16e6db movq %r14, %rdi callq 0x2e5a0 movq (%rbx), %rsi movq 0x8(%rbx), %rdx movq %r14, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x2e460 nop
_ZN6google8protobuf12_GLOBAL__N_123AggregateErrorCollector8AddErrorEiiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r14 push rbx push rax mov rbx, rcx lea r14, [rdi+8] cmp qword ptr [rdi+10h], 0 jz short loc_DEFB9 lea rsi, asc_16E6DB; "; " mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) loc_DEFB9: mov rsi, [rbx] mov rdx, [rbx+8] mov rdi, r14 add rsp, 8 pop rbx pop r14 jmp __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
long long google::protobuf::`anonymous namespace'::AggregateErrorCollector::AddError( long long a1, long long a2, long long a3, _QWORD *a4) { if ( *(_QWORD *)(a1 + 16) ) std::string::append(a1 + 8, "; "); return std::string::_M_append(a1 + 8, *a4, a4[1]); }
AddError: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RCX LEA R14,[RDI + 0x8] CMP qword ptr [RDI + 0x10],0x0 JZ 0x001defb9 LEA RSI,[0x26e6db] MOV RDI,R14 CALL 0x0012e5a0 LAB_001defb9: MOV RSI,qword ptr [RBX] MOV RDX,qword ptr [RBX + 0x8] MOV RDI,R14 ADD RSP,0x8 POP RBX POP R14 JMP 0x0012e460
/* google::protobuf::(anonymous namespace)::AggregateErrorCollector::AddError(int, int, std::__cxx11::string const&) */ void __thiscall google::protobuf::(anonymous_namespace)::AggregateErrorCollector::AddError (AggregateErrorCollector *this,int param_1,int param_2,string *param_3) { if (*(long *)(this + 0x10) != 0) { std::__cxx11::string::append((string *)(this + 8),"; "); } std::__cxx11::string::_M_append((string *)(this + 8),*(char **)param_3,*(ulong *)(param_3 + 8)); return; }
51,442
testing::AssertionResult testing::(anonymous namespace)::IsSubstringImpl<char const*>(bool, char const*, char const*, char const* const&, char const* const&)
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc
AssertionResult IsSubstringImpl(bool expected_to_be_substring, const char* needle_expr, const char* haystack_expr, const StringType& needle, const StringType& haystack) { if (IsSubstringPred(needle, haystack) == expected_to_be_substring) return AssertionSuccess(); const bool is_wide_string = sizeof(needle[0]) > 1; const char* const begin_string_quote = is_wide_string ? "L\"" : "\""; return AssertionFailure() << "Value of: " << needle_expr << "\n" << " Actual: " << begin_string_quote << needle << "\"\n" << "Expected: " << (expected_to_be_substring ? "" : "not ") << "a substring of " << haystack_expr << "\n" << "Which is: " << begin_string_quote << haystack << "\""; }
O1
cpp
testing::AssertionResult testing::(anonymous namespace)::IsSubstringImpl<char const*>(bool, char const*, char const*, char const* const&, char const* const&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x30, %rsp movq %r9, %r15 movq %r8, %r12 movl %esi, %ebp movq %rdi, %rbx movq %rdx, 0x20(%rsp) movq %rcx, 0x18(%rsp) movq (%r8), %rsi movq 0x8(%r8), %rcx movq %r9, %rdi xorl %edx, %edx callq 0x8960 cmpq $-0x1, %rax setne %al xorb %bpl, %al je 0x1f07d leaq 0x24796(%rip), %rax # 0x436eb movq %rax, (%rsp) leaq 0x10(%rsp), %r14 movb $0x0, -0x8(%r14) movq $0x0, (%r14) leaq 0x23c02(%rip), %rsi # 0x42b73 leaq 0x8(%rsp), %rdi callq 0x36f70 leaq 0x20(%rsp), %rsi movq %rax, %rdi callq 0xe69e leaq 0x2434e(%rip), %rsi # 0x432dd movq %rax, %rdi callq 0x33620 leaq 0x23be1(%rip), %rsi # 0x42b7f movq %rax, %rdi callq 0x36f70 movq %rsp, %rsi movq %rax, %rdi callq 0xe69e movq %rax, %rdi movq %r12, %rsi callq 0xe7ac leaq 0x24712(%rip), %rsi # 0x436d5 movq %rax, %rdi callq 0xe72e leaq 0x23bb9(%rip), %rsi # 0x42b8b movq %rax, %rdi callq 0x36f70 leaq 0x242fd(%rip), %rcx # 0x432de leaq 0x256fb(%rip), %rdx # 0x446e3 testb %bpl, %bpl cmovneq %rcx, %rdx leaq 0x28(%rsp), %rsi movq %rdx, (%rsi) movq %rax, %rdi callq 0xe69e leaq 0x256e2(%rip), %rsi # 0x446e8 movq %rax, %rdi callq 0x3aef0 leaq 0x18(%rsp), %rsi movq %rax, %rdi callq 0xe69e leaq 0x242bb(%rip), %rsi # 0x432dd movq %rax, %rdi callq 0x33620 leaq 0x23b1b(%rip), %rsi # 0x42b4c movq %rax, %rdi callq 0x36f70 movq %rsp, %rsi movq %rax, %rdi callq 0xe69e movq %rax, %rdi movq %r15, %rsi callq 0xe7ac leaq 0x24695(%rip), %rsi # 0x436eb movq %rax, %rdi callq 0x33620 movq %rbx, %rdi movq %rax, %rsi callq 0xefc4 movq 0x10(%rsp), %rsi testq %rsi, %rsi je 0x1f088 movq %r14, %rdi callq 0xde4a jmp 0x1f088 movb $0x1, (%rbx) movq $0x0, 0x8(%rbx) movq %rbx, %rax addq $0x30, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq jmp 0x1f09a movq %rax, %rbx movq 0x10(%rsp), %rsi testq %rsi, %rsi je 0x1f0af movq %r14, %rdi callq 0xde4a movq %rbx, %rdi callq 0x8990
_ZN7testing12_GLOBAL__N_115IsSubstringImplINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS_15AssertionResultEbPKcSA_RKT_SD_: push rbp push r15 push r14 push r12 push rbx sub rsp, 30h mov r15, r9 mov r12, r8 mov ebp, esi mov rbx, rdi mov [rsp+58h+var_38], rdx mov [rsp+58h+var_40], rcx mov rsi, [r8] mov rcx, [r8+8] mov rdi, r9 xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh setnz al xor al, bpl jz loc_1F07D lea rax, aMessage+0Fh; "\"" mov [rsp+58h+var_58], rax; __int64 lea r14, [rsp+58h+var_48] mov byte ptr [r14-8], 0 mov qword ptr [r14], 0 lea rsi, aValueOf; "Value of: " lea rdi, [rsp+58h+var_50]; this call _ZN7testing15AssertionResultlsIA11_cEERS0_RKT_; testing::AssertionResult::operator<<<char [11]>(char [11] const&) lea rsi, [rsp+58h+var_38] mov rdi, rax; this call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&) lea rsi, aSFromSSMsTotal+19h; "\n" mov rdi, rax; this call _ZN7testing15AssertionResultlsIA2_cEERS0_RKT_; testing::AssertionResult::operator<<<char [2]>(char [2] const&) lea rsi, aActual_0+1; " Actual: " mov rdi, rax; this call _ZN7testing15AssertionResultlsIA11_cEERS0_RKT_; testing::AssertionResult::operator<<<char [11]>(char [11] const&) mov rsi, rsp mov rdi, rax; this call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&) mov rdi, rax; this mov rsi, r12 call _ZN7testing15AssertionResultlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS0_RKT_; testing::AssertionResult::operator<<<std::string>(std::string const&) lea rsi, aType_0+0Dh; "\"\n" mov rdi, rax; this call _ZN7testing15AssertionResultlsIA3_cEERS0_RKT_; testing::AssertionResult::operator<<<char [3]>(char [3] const&) lea rsi, aExpected_1+1; "Expected: " mov rdi, rax; this call _ZN7testing15AssertionResultlsIA11_cEERS0_RKT_; testing::AssertionResult::operator<<<char [11]>(char [11] const&) lea rcx, aSFromSSMsTotal+1Ah; "" lea rdx, aNot; "not " test bpl, bpl cmovnz rdx, rcx lea rsi, [rsp+58h+var_30] mov [rsi], rdx mov rdi, rax; this call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&) lea rsi, aASubstringOf; "a substring of " mov rdi, rax; this call _ZN7testing15AssertionResultlsIA16_cEERS0_RKT_; testing::AssertionResult::operator<<<char [16]>(char [16] const&) lea rsi, [rsp+58h+var_40] mov rdi, rax; this call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&) lea rsi, aSFromSSMsTotal+19h; "\n" mov rdi, rax; this call _ZN7testing15AssertionResultlsIA2_cEERS0_RKT_; testing::AssertionResult::operator<<<char [2]>(char [2] const&) lea rsi, aWhichIs+5; "Which is: " mov rdi, rax; this call _ZN7testing15AssertionResultlsIA11_cEERS0_RKT_; testing::AssertionResult::operator<<<char [11]>(char [11] const&) mov rsi, rsp mov rdi, rax; this call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&) mov rdi, rax; this mov rsi, r15 call _ZN7testing15AssertionResultlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS0_RKT_; testing::AssertionResult::operator<<<std::string>(std::string const&) lea rsi, aMessage+0Fh; "\"" mov rdi, rax; this call _ZN7testing15AssertionResultlsIA2_cEERS0_RKT_; testing::AssertionResult::operator<<<char [2]>(char [2] const&) mov rdi, rbx mov rsi, rax call _ZN7testing15AssertionResultC2ERKS0_; testing::AssertionResult::AssertionResult(testing::AssertionResult const&) mov rsi, [rsp+58h+var_48] test rsi, rsi jz short loc_1F088 mov rdi, r14 call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*) jmp short loc_1F088 loc_1F07D: mov byte ptr [rbx], 1 mov qword ptr [rbx+8], 0 loc_1F088: mov rax, rbx add rsp, 30h pop rbx pop r12 pop r14 pop r15 pop rbp retn jmp short $+2 loc_1F09A: mov rbx, rax mov rsi, [rsp+arg_8] test rsi, rsi jz short loc_1F0AF mov rdi, r14 call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*) loc_1F0AF: mov rdi, rbx call __Unwind_Resume
testing::AssertionResult * testing::`anonymous namespace'::IsSubstringImpl<std::string>( testing::AssertionResult *a1, char a2, const char *a3, const char *a4, _QWORD *a5, _QWORD *a6) { testing::AssertionResult *v8; // rax testing::AssertionResult *v9; // rax testing::AssertionResult *v10; // rax testing::AssertionResult *v11; // rax testing::AssertionResult *v12; // rax testing::AssertionResult *v13; // rax testing::AssertionResult *v14; // rax testing::AssertionResult *v15; // rax const char *v16; // rdx testing::AssertionResult *v17; // rax testing::AssertionResult *v18; // rax testing::AssertionResult *v19; // rax testing::AssertionResult *v20; // rax testing::AssertionResult *v21; // rax testing::AssertionResult *v22; // rax testing::AssertionResult *v23; // rax const testing::AssertionResult *v24; // rax long long v26; // [rsp+0h] [rbp-58h] BYREF _BYTE v27[8]; // [rsp+8h] [rbp-50h] BYREF long long v28; // [rsp+10h] [rbp-48h] BYREF const char *v29; // [rsp+18h] [rbp-40h] BYREF const char *v30; // [rsp+20h] [rbp-38h] BYREF const char *v31; // [rsp+28h] [rbp-30h] BYREF v30 = a3; v29 = a4; if ( a2 != (std::string::find(a6, *a5, 0LL, a5[1]) != -1) ) { v27[0] = 0; v28 = 0LL; v8 = (testing::AssertionResult *)testing::AssertionResult::operator<<<char [11]>( (testing::AssertionResult *)v27, (long long)"\""); v9 = testing::AssertionResult::operator<<<char const*>(v8, &v30); v10 = (testing::AssertionResult *)testing::AssertionResult::operator<<<char [2]>(v9, v26); v11 = (testing::AssertionResult *)testing::AssertionResult::operator<<<char [11]>(v10, v26); v12 = testing::AssertionResult::operator<<<char const*>(v11, (const char **)&v26); v13 = testing::AssertionResult::operator<<<std::string>(v12, a5); v14 = testing::AssertionResult::operator<<<char [3]>(v13, (long long)"\"\n"); v15 = (testing::AssertionResult *)testing::AssertionResult::operator<<<char [11]>(v14, v26); v16 = "not "; if ( a2 ) v16 = ""; v31 = v16; v17 = testing::AssertionResult::operator<<<char const*>(v15, &v31); v18 = (testing::AssertionResult *)testing::AssertionResult::operator<<<char [16]>(v17, v26); v19 = testing::AssertionResult::operator<<<char const*>(v18, &v29); v20 = (testing::AssertionResult *)testing::AssertionResult::operator<<<char [2]>(v19, v26); v21 = (testing::AssertionResult *)testing::AssertionResult::operator<<<char [11]>(v20, v26); v22 = testing::AssertionResult::operator<<<char const*>(v21, (const char **)&v26); v23 = testing::AssertionResult::operator<<<std::string>(v22, a6); v24 = (const testing::AssertionResult *)testing::AssertionResult::operator<<<char [2]>(v23, v26); testing::AssertionResult::AssertionResult(a1, v24); if ( v28 ) std::default_delete<std::string>::operator()((long long)&v28, v28); } else { *(_BYTE *)a1 = 1; *((_QWORD *)a1 + 1) = 0LL; } return a1; }
IsSubstringImpl<std::__cxx11::string>: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x30 MOV R15,R9 MOV R12,R8 MOV EBP,ESI MOV RBX,RDI MOV qword ptr [RSP + 0x20],RDX MOV qword ptr [RSP + 0x18],RCX MOV RSI,qword ptr [R8] MOV RCX,qword ptr [R8 + 0x8] MOV RDI,R9 XOR EDX,EDX CALL 0x00108960 CMP RAX,-0x1 SETNZ AL XOR AL,BPL JZ 0x0011f07d LEA RAX,[0x1436eb] MOV qword ptr [RSP],RAX LEA R14,[RSP + 0x10] MOV byte ptr [R14 + -0x8],0x0 MOV qword ptr [R14],0x0 LAB_0011ef6a: LEA RSI,[0x142b73] LEA RDI,[RSP + 0x8] CALL 0x00136f70 LEA RSI,[RSP + 0x20] MOV RDI,RAX CALL 0x0010e69e LEA RSI,[0x1432dd] MOV RDI,RAX CALL 0x00133620 LEA RSI,[0x142b7f] MOV RDI,RAX CALL 0x00136f70 MOV RSI,RSP MOV RDI,RAX CALL 0x0010e69e MOV RDI,RAX MOV RSI,R12 CALL 0x0010e7ac LEA RSI,[0x1436d5] MOV RDI,RAX CALL 0x0010e72e LEA RSI,[0x142b8b] MOV RDI,RAX CALL 0x00136f70 LEA RCX,[0x1432de] LEA RDX,[0x1446e3] TEST BPL,BPL CMOVNZ RDX,RCX LEA RSI,[RSP + 0x28] MOV qword ptr [RSI],RDX LAB_0011eff7: MOV RDI,RAX CALL 0x0010e69e LEA RSI,[0x1446e8] MOV RDI,RAX CALL 0x0013aef0 LEA RSI,[RSP + 0x18] MOV RDI,RAX CALL 0x0010e69e LEA RSI,[0x1432dd] MOV RDI,RAX CALL 0x00133620 LEA RSI,[0x142b4c] MOV RDI,RAX CALL 0x00136f70 MOV RSI,RSP MOV RDI,RAX CALL 0x0010e69e MOV RDI,RAX MOV RSI,R15 CALL 0x0010e7ac LEA RSI,[0x1436eb] MOV RDI,RAX CALL 0x00133620 MOV RDI,RBX MOV RSI,RAX CALL 0x0010efc4 LAB_0011f069: MOV RSI,qword ptr [RSP + 0x10] TEST RSI,RSI JZ 0x0011f088 MOV RDI,R14 CALL 0x0010de4a JMP 0x0011f088 LAB_0011f07d: MOV byte ptr [RBX],0x1 MOV qword ptr [RBX + 0x8],0x0 LAB_0011f088: MOV RAX,RBX ADD RSP,0x30 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* testing::AssertionResult testing::(anonymous namespace)::IsSubstringImpl<std::__cxx11::string >(bool, char const*, char const*, std::__cxx11::string const&, std::__cxx11::string const&) */ _anonymous_namespace_ * __thiscall testing::(anonymous_namespace)::IsSubstringImpl<std::__cxx11::string> (_anonymous_namespace_ *this,bool param_1,char *param_2,char *param_3,string *param_4, string *param_5) { long lVar1; AssertionResult *pAVar2; char *local_58; AssertionResult local_50 [8]; string *local_48; char *local_40; char *local_38; char *local_30; local_40 = param_3; local_38 = param_2; lVar1 = std::__cxx11::string::find((char *)param_5,*(ulong *)param_4,0); if ((lVar1 != -1) == param_1) { *this = (_anonymous_namespace_)0x1; *(int8 *)(this + 8) = 0; } else { local_58 = "\""; local_50[0] = (AssertionResult)0x0; local_48 = (string *)0x0; /* try { // try from 0011ef6a to 0011efd9 has its CatchHandler @ 0011f098 */ pAVar2 = AssertionResult::operator<<(local_50,"Value of: "); pAVar2 = AssertionResult::operator<<(pAVar2,&local_38); pAVar2 = AssertionResult::operator<<(pAVar2,"\n"); pAVar2 = AssertionResult::operator<<(pAVar2," Actual: "); pAVar2 = AssertionResult::operator<<(pAVar2,&local_58); pAVar2 = AssertionResult::operator<<(pAVar2,param_4); pAVar2 = AssertionResult::operator<<(pAVar2,"\"\n"); pAVar2 = AssertionResult::operator<<(pAVar2,"Expected: "); local_30 = "not "; if (param_1) { local_30 = ""; } /* try { // try from 0011eff7 to 0011f068 has its CatchHandler @ 0011f09a */ pAVar2 = AssertionResult::operator<<(pAVar2,&local_30); pAVar2 = AssertionResult::operator<<(pAVar2,"a substring of "); pAVar2 = AssertionResult::operator<<(pAVar2,&local_40); pAVar2 = AssertionResult::operator<<(pAVar2,"\n"); pAVar2 = AssertionResult::operator<<(pAVar2,"Which is: "); pAVar2 = AssertionResult::operator<<(pAVar2,&local_58); pAVar2 = AssertionResult::operator<<(pAVar2,param_5); pAVar2 = AssertionResult::operator<<(pAVar2,"\""); AssertionResult::AssertionResult((AssertionResult *)this,pAVar2); if (local_48 != (string *)0x0) { std::default_delete<std::__cxx11::string>::operator() ((default_delete<std::__cxx11::string> *)&local_48,local_48); } } return this; }
51,443
blst_p2_affine_compress
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/e2.c
void blst_p2_affine_compress(unsigned char out[96], const POINTonE2_affine *in) { if (vec_is_zero(in->X, 2*sizeof(in->X))) { bytes_zero(out, 96); out[0] = 0xc0; /* compressed and infinity bits */ } else { limb_t sign = POINTonE2_affine_Compress_BE(out, in); out[0] |= (unsigned char)(0x80 | ((sign & 2) << 4)); } }
O0
c
blst_p2_affine_compress: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rdi movl $0xc0, %esi callq 0xa7680 cmpq $0x0, %rax je 0xaa9ab movq -0x8(%rbp), %rdi movl $0x60, %esi callq 0xa7930 movq -0x8(%rbp), %rax movb $-0x40, (%rax) jmp 0xaa9dc movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0xaa9f0 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax andq $0x2, %rax shlq $0x4, %rax orq $0x80, %rax movzbl %al, %edx movq -0x8(%rbp), %rax movzbl (%rax), %ecx orl %edx, %ecx movb %cl, (%rax) addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
blst_p2_affine_compress: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_10] mov esi, 0C0h call vec_is_zero cmp rax, 0 jz short loc_AA9AB mov rdi, [rbp+var_8] mov esi, 60h ; '`' call bytes_zero mov rax, [rbp+var_8] mov byte ptr [rax], 0C0h jmp short loc_AA9DC loc_AA9AB: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call POINTonE2_affine_Compress_BE mov [rbp+var_18], rax mov rax, [rbp+var_18] and rax, 2 shl rax, 4 or rax, 80h movzx edx, al mov rax, [rbp+var_8] movzx ecx, byte ptr [rax] or ecx, edx mov [rax], cl loc_AA9DC: add rsp, 20h pop rbp retn
_BYTE * blst_p2_affine_compress(_BYTE *a1, long long a2) { _BYTE *result; // rax char v3; // dl if ( vec_is_zero(a2, 0xC0uLL) ) { bytes_zero((long long)a1, 0x60uLL); result = a1; *a1 = -64; } else { v3 = (16 * (POINTonE2_affine_Compress_BE(a1, a2) & 2)) | 0x80; result = a1; *a1 |= v3; } return result; }
blst_p2_affine_compress: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0xc0 CALL 0x001a7680 CMP RAX,0x0 JZ 0x001aa9ab MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x60 CALL 0x001a7930 MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX],0xc0 JMP 0x001aa9dc LAB_001aa9ab: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x001aa9f0 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] AND RAX,0x2 SHL RAX,0x4 OR RAX,0x80 MOVZX EDX,AL MOV RAX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RAX] OR ECX,EDX MOV byte ptr [RAX],CL LAB_001aa9dc: ADD RSP,0x20 POP RBP RET
void blst_p2_affine_compress(byte *param_1,int8 param_2) { long lVar1; ulong uVar2; lVar1 = vec_is_zero(param_2,0xc0); if (lVar1 == 0) { uVar2 = POINTonE2_affine_Compress_BE(param_1,param_2); *param_1 = *param_1 | (byte)((uVar2 & 2) << 4) | 0x80; } else { bytes_zero(param_1,0x60); *param_1 = 0xc0; } return; }
51,444
OpenSubdiv::v3_6_0::Bfr::Surface<float>::evalIrregularDerivs(float const*, float const*, OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&, float**) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surface.cpp
void Surface<REAL>::evalIrregularDerivs(REAL const uv[2], REAL const patchPoints[], PointDescriptor const & pointDesc, REAL * deriv[]) const { // // Non-linear irregular basis evaluation returns both the weights // and the corresponding points of a sub-patch defined by a subset // of the given patch points. // // Assign weights for requested derivatives and evaluate: // REAL wBuffer[6 * 20]; REAL * wDeriv[6]; int numDerivs = assignWeightsPerDeriv(deriv, 20, wBuffer, wDeriv); IndexArray indices = evalIrregularBasis(uv, wDeriv); // // Assemble parameters of the point combination operation and apply: // points::CommonCombinationParameters<REAL> combineParams; combineParams.pointData = patchPoints; combineParams.pointSize = pointDesc.size; combineParams.pointStride = pointDesc.stride; combineParams.srcCount = indices.size(); combineParams.srcIndices = &indices[0]; combineParams.resultCount = numDerivs; combineParams.resultArray = deriv; combineParams.weightArray = wDeriv; if (numDerivs == 1) { points::Combine1<REAL>::Apply(combineParams); } else if (numDerivs == 3) { points::Combine3<REAL>::Apply(combineParams); } else { points::CombineMultiple<REAL>::Apply(combineParams); } }
O0
cpp
OpenSubdiv::v3_6_0::Bfr::Surface<float>::evalIrregularDerivs(float const*, float const*, OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&, float**) const: pushq %rbp movq %rsp, %rbp subq $0x2b0, %rsp # imm = 0x2B0 movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x2a8(%rbp) movq -0x28(%rbp), %rdi movl $0x14, %esi leaq -0x210(%rbp), %rdx leaq -0x240(%rbp), %rcx movq %rcx, -0x2a0(%rbp) callq 0x1ab750 movq -0x2a8(%rbp), %rdi movq -0x2a0(%rbp), %rdx movl %eax, -0x244(%rbp) movq -0x10(%rbp), %rsi callq 0xc5af0 movl %edx, -0x260(%rbp) movq %rax, -0x268(%rbp) movq -0x268(%rbp), %rax movq %rax, -0x258(%rbp) movl -0x260(%rbp), %eax movl %eax, -0x250(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x298(%rbp) movq -0x20(%rbp), %rax movl (%rax), %eax movl %eax, -0x290(%rbp) movq -0x20(%rbp), %rax movl 0x4(%rax), %eax movl %eax, -0x28c(%rbp) leaq -0x258(%rbp), %rdi callq 0xcc250 movl %eax, -0x280(%rbp) leaq -0x258(%rbp), %rdi xorl %esi, %esi callq 0xcabf0 movq %rax, -0x288(%rbp) movl -0x244(%rbp), %eax movl %eax, -0x27c(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x278(%rbp) leaq -0x240(%rbp), %rax movq %rax, -0x270(%rbp) cmpl $0x1, -0x244(%rbp) jne 0x1acd58 leaq -0x298(%rbp), %rdi callq 0xd2e00 jmp 0x1acd7d cmpl $0x3, -0x244(%rbp) jne 0x1acd6f leaq -0x298(%rbp), %rdi callq 0xc68b0 jmp 0x1acd7b leaq -0x298(%rbp), %rdi callq 0xd3420 jmp 0x1acd7d addq $0x2b0, %rsp # imm = 0x2B0 popq %rbp retq nopw %cs:(%rax,%rax)
_ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIfE19evalIrregularDerivsEPKfS5_RKNS3_15PointDescriptorEPPf: push rbp mov rbp, rsp sub rsp, 2B0h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_8] mov [rbp+var_2A8], rax mov rdi, [rbp+var_28] mov esi, 14h lea rdx, [rbp+var_210] lea rcx, [rbp+var_240] mov [rbp+var_2A0], rcx call _ZN10OpenSubdiv6v3_6_03Bfr12_GLOBAL__N_121assignWeightsPerDerivIfEEiPKPT_iS5_PS5_; OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::assignWeightsPerDeriv<float>(float * const*,int,float *,float **) mov rdi, [rbp+var_2A8] mov rdx, [rbp+var_2A0] mov [rbp+var_244], eax mov rsi, [rbp+var_10] call __ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIfE18evalIrregularBasisEPKfPPf; OpenSubdiv::v3_6_0::Bfr::Surface<float>::evalIrregularBasis(float const*,float **) mov [rbp+var_260], edx mov [rbp+var_268], rax mov rax, [rbp+var_268] mov [rbp+var_258], rax mov eax, [rbp+var_260] mov [rbp+var_250], eax mov rax, [rbp+var_18] mov [rbp+var_298], rax mov rax, [rbp+var_20] mov eax, [rax] mov [rbp+var_290], eax mov rax, [rbp+var_20] mov eax, [rax+4] mov [rbp+var_28C], eax lea rdi, [rbp+var_258] call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiE4sizeEv; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(void) mov [rbp+var_280], eax lea rdi, [rbp+var_258] xor esi, esi call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int) mov [rbp+var_288], rax mov eax, [rbp+var_244] mov [rbp+var_27C], eax mov rax, [rbp+var_28] mov [rbp+var_278], rax lea rax, [rbp+var_240] mov [rbp+var_270], rax cmp [rbp+var_244], 1 jnz short loc_1ACD58 lea rdi, [rbp+var_298] call __ZN10OpenSubdiv6v3_6_03Bfr6points8Combine1IfE5ApplyERKNS2_27CommonCombinationParametersIfEE; OpenSubdiv::v3_6_0::Bfr::points::Combine1<float>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CommonCombinationParameters<float> const&) jmp short loc_1ACD7D loc_1ACD58: cmp [rbp+var_244], 3 jnz short loc_1ACD6F lea rdi, [rbp+var_298] call __ZN10OpenSubdiv6v3_6_03Bfr6points8Combine3IfE5ApplyERKNS2_27CommonCombinationParametersIfEE; OpenSubdiv::v3_6_0::Bfr::points::Combine3<float>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CommonCombinationParameters<float> const&) jmp short loc_1ACD7B loc_1ACD6F: lea rdi, [rbp+var_298] call __ZN10OpenSubdiv6v3_6_03Bfr6points15CombineMultipleIfE5ApplyERKNS2_27CommonCombinationParametersIfEE; OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<float>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CommonCombinationParameters<float> const&) loc_1ACD7B: jmp short $+2 loc_1ACD7D: add rsp, 2B0h pop rbp retn
long long OpenSubdiv::v3_6_0::Bfr::Surface<float>::evalIrregularDerivs( long long a1, long long a2, long long a3, int *a4, _QWORD *a5) { long long v5; // rax int v6; // edx long long v8; // [rsp+18h] [rbp-298h] BYREF int v9; // [rsp+20h] [rbp-290h] int v10; // [rsp+24h] [rbp-28Ch] long long v11; // [rsp+28h] [rbp-288h] int v12; // [rsp+30h] [rbp-280h] int v13; // [rsp+34h] [rbp-27Ch] _QWORD *v14; // [rsp+38h] [rbp-278h] _QWORD *v15; // [rsp+40h] [rbp-270h] long long v16; // [rsp+48h] [rbp-268h] int v17; // [rsp+50h] [rbp-260h] long long v18; // [rsp+58h] [rbp-258h] BYREF int v19; // [rsp+60h] [rbp-250h] int v20; // [rsp+6Ch] [rbp-244h] _QWORD v21[6]; // [rsp+70h] [rbp-240h] BYREF char v22[488]; // [rsp+A0h] [rbp-210h] BYREF _QWORD *v23; // [rsp+288h] [rbp-28h] int *v24; // [rsp+290h] [rbp-20h] long long v25; // [rsp+298h] [rbp-18h] long long v26; // [rsp+2A0h] [rbp-10h] long long v27; // [rsp+2A8h] [rbp-8h] v27 = a1; v26 = a2; v25 = a3; v24 = a4; v23 = a5; v20 = OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::assignWeightsPerDeriv<float>(a5, 20, (long long)v22, v21); v5 = OpenSubdiv::v3_6_0::Bfr::Surface<float>::evalIrregularBasis(a1, v26, v21); v17 = v6; v16 = v5; v18 = v5; v19 = v6; v8 = v25; v9 = *v24; v10 = v24[1]; v12 = OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(&v18); v11 = OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&v18, 0LL); v13 = v20; v14 = v23; v15 = v21; if ( v20 == 1 ) return OpenSubdiv::v3_6_0::Bfr::points::Combine1<float>::Apply(&v8); if ( v20 == 3 ) return OpenSubdiv::v3_6_0::Bfr::points::Combine3<float>::Apply(&v8); return OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<float>::Apply(&v8); }
51,445
OpenSubdiv::v3_6_0::Bfr::Surface<float>::evalIrregularDerivs(float const*, float const*, OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&, float**) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surface.cpp
void Surface<REAL>::evalIrregularDerivs(REAL const uv[2], REAL const patchPoints[], PointDescriptor const & pointDesc, REAL * deriv[]) const { // // Non-linear irregular basis evaluation returns both the weights // and the corresponding points of a sub-patch defined by a subset // of the given patch points. // // Assign weights for requested derivatives and evaluate: // REAL wBuffer[6 * 20]; REAL * wDeriv[6]; int numDerivs = assignWeightsPerDeriv(deriv, 20, wBuffer, wDeriv); IndexArray indices = evalIrregularBasis(uv, wDeriv); // // Assemble parameters of the point combination operation and apply: // points::CommonCombinationParameters<REAL> combineParams; combineParams.pointData = patchPoints; combineParams.pointSize = pointDesc.size; combineParams.pointStride = pointDesc.stride; combineParams.srcCount = indices.size(); combineParams.srcIndices = &indices[0]; combineParams.resultCount = numDerivs; combineParams.resultArray = deriv; combineParams.weightArray = wDeriv; if (numDerivs == 1) { points::Combine1<REAL>::Apply(combineParams); } else if (numDerivs == 3) { points::Combine3<REAL>::Apply(combineParams); } else { points::CombineMultiple<REAL>::Apply(combineParams); } }
O1
cpp
OpenSubdiv::v3_6_0::Bfr::Surface<float>::evalIrregularDerivs(float const*, float const*, OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&, float**) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x420, %rsp # imm = 0x420 movq %r8, %rbx movq %rcx, %r14 movq %rdx, %r15 xorps %xmm0, %xmm0 movaps %xmm0, 0x30(%rsp) movaps %xmm0, 0x50(%rsp) movaps %xmm0, 0x40(%rsp) leaq 0x60(%rsp), %rax movq %rax, 0x30(%rsp) movl $0x1, %ebp cmpq $0x0, 0x8(%r8) je 0x97fd5 cmpq $0x0, 0x10(%rbx) je 0x97fd5 leaq 0x100(%rsp), %rax movq %rax, 0x38(%rsp) leaq 0x1a0(%rsp), %rax movq %rax, 0x40(%rsp) movl $0x3, %ebp cmpq $0x0, 0x18(%rbx) je 0x97fd5 cmpq $0x0, 0x20(%rbx) je 0x97fd5 cmpq $0x0, 0x28(%rbx) je 0x97fd5 leaq 0x240(%rsp), %rax movq %rax, 0x48(%rsp) leaq 0x2e0(%rsp), %rax movq %rax, 0x50(%rsp) leaq 0x380(%rsp), %rax movq %rax, 0x58(%rsp) movl $0x6, %ebp leaq 0x30(%rsp), %r12 movq %r12, %rdx callq 0x38f10 movq %r15, (%rsp) movl (%r14), %ecx movl %ecx, 0x8(%rsp) movl 0x4(%r14), %ecx movl %ecx, 0xc(%rsp) movl %edx, 0x18(%rsp) movq %rax, 0x10(%rsp) movl %ebp, 0x1c(%rsp) movq %rbx, 0x20(%rsp) movq %r12, 0x28(%rsp) movq %rsp, %rdi cmpl $0x3, %ebp je 0x98020 cmpl $0x1, %ebp jne 0x98027 callq 0x39960 jmp 0x9802c callq 0x3a040 jmp 0x9802c callq 0x3a1d0 addq $0x420, %rsp # imm = 0x420 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE19evalIrregularDerivsEPKdS5_RKNS3_15PointDescriptorEPPd: push rbp push r15 push r14 push r12 push rbx sub rsp, 420h mov rbx, r8 mov r14, rcx mov r15, rdx xorps xmm0, xmm0 movaps [rsp+448h+var_418], xmm0 movaps [rsp+448h+var_3F8], xmm0 movaps [rsp+448h+var_408], xmm0 lea rax, [rsp+448h+var_3E8] mov qword ptr [rsp+448h+var_418], rax mov ebp, 1 cmp qword ptr [r8+8], 0 jz short loc_97FD5 cmp qword ptr [rbx+10h], 0 jz short loc_97FD5 lea rax, [rsp+448h+var_348] mov qword ptr [rsp+448h+var_418+8], rax lea rax, [rsp+448h+var_2A8] mov qword ptr [rsp+448h+var_408], rax mov ebp, 3 cmp qword ptr [rbx+18h], 0 jz short loc_97FD5 cmp qword ptr [rbx+20h], 0 jz short loc_97FD5 cmp qword ptr [rbx+28h], 0 jz short loc_97FD5 lea rax, [rsp+448h+var_208] mov qword ptr [rsp+448h+var_408+8], rax lea rax, [rsp+448h+var_168] mov qword ptr [rsp+448h+var_3F8], rax lea rax, [rsp+448h+var_C8] mov qword ptr [rsp+448h+var_3F8+8], rax mov ebp, 6 loc_97FD5: lea r12, [rsp+448h+var_418] mov rdx, r12 call __ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE18evalIrregularBasisEPKdPPd; OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalIrregularBasis(double const*,double **) mov [rsp+448h+var_448], r15 mov ecx, [r14] mov [rsp+448h+var_440], ecx mov ecx, [r14+4] mov [rsp+448h+var_43C], ecx mov [rsp+448h+var_430], edx mov [rsp+448h+var_438], rax mov [rsp+448h+var_42C], ebp mov [rsp+448h+var_428], rbx mov [rsp+448h+var_420], r12 mov rdi, rsp cmp ebp, 3 jz short loc_98020 cmp ebp, 1 jnz short loc_98027 call __ZN10OpenSubdiv6v3_6_03Bfr6points8Combine1IdE5ApplyERKNS2_27CommonCombinationParametersIdEE; OpenSubdiv::v3_6_0::Bfr::points::Combine1<double>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CommonCombinationParameters<double> const&) jmp short loc_9802C loc_98020: call __ZN10OpenSubdiv6v3_6_03Bfr6points8Combine3IdE5ApplyERKNS2_27CommonCombinationParametersIdEE; OpenSubdiv::v3_6_0::Bfr::points::Combine3<double>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CommonCombinationParameters<double> const&) jmp short loc_9802C loc_98027: call __ZN10OpenSubdiv6v3_6_03Bfr6points15CombineMultipleIdE5ApplyERKNS2_27CommonCombinationParametersIdEE; OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<double>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CommonCombinationParameters<double> const&) loc_9802C: add rsp, 420h pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalIrregularDerivs( long long a1, long long a2, long long a3, _DWORD *a4, _QWORD *a5) { int v8; // ebp long long v9; // rax long long v10; // rdx long long v11; // r8 long long v12; // r9 long long v13; // rcx long long v15; // [rsp+0h] [rbp-448h] BYREF long long v16; // [rsp+8h] [rbp-440h] long long v17; // [rsp+10h] [rbp-438h] unsigned long long v18; // [rsp+18h] [rbp-430h] _QWORD *v19; // [rsp+20h] [rbp-428h] __int128 *v20; // [rsp+28h] [rbp-420h] __int128 v21; // [rsp+30h] [rbp-418h] BYREF __int128 v22; // [rsp+40h] [rbp-408h] __int128 v23; // [rsp+50h] [rbp-3F8h] char v24; // [rsp+60h] [rbp-3E8h] BYREF char v25; // [rsp+100h] [rbp-348h] BYREF char v26; // [rsp+1A0h] [rbp-2A8h] BYREF char v27; // [rsp+240h] [rbp-208h] BYREF char v28; // [rsp+2E0h] [rbp-168h] BYREF char v29; // [rsp+380h] [rbp-C8h] BYREF v23 = 0LL; v22 = 0LL; v21 = (unsigned long long)&v24; v8 = 1; if ( a5[1] ) { if ( a5[2] ) { *((_QWORD *)&v21 + 1) = &v25; *(_QWORD *)&v22 = &v26; v8 = 3; if ( a5[3] ) { if ( a5[4] && a5[5] ) { *((_QWORD *)&v22 + 1) = &v27; *(_QWORD *)&v23 = &v28; *((_QWORD *)&v23 + 1) = &v29; v8 = 6; } } } } v9 = OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalIrregularBasis(a1, a2, &v21); v15 = a3; LODWORD(v16) = *a4; v13 = (unsigned int)a4[1]; HIDWORD(v16) = a4[1]; v18 = __PAIR64__(v8, v10); v17 = v9; v19 = a5; v20 = &v21; if ( v8 == 3 ) return OpenSubdiv::v3_6_0::Bfr::points::Combine3<double>::Apply( &v15, a2, v10, v13, v11, v12, v15, v16, v17, v18, v19, v20, v21, *((_QWORD *)&v21 + 1), v22, *((_QWORD *)&v22 + 1), v23, *((_QWORD *)&v23 + 1)); if ( v8 == 1 ) return OpenSubdiv::v3_6_0::Bfr::points::Combine1<double>::Apply(&v15); return OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<double>::Apply( &v15, a2, v10, v13, v11, v12, v15, v16, v17, v18, v19, v20, v21, *((_QWORD *)&v21 + 1), v22, *((_QWORD *)&v22 + 1), v23, *((_QWORD *)&v23 + 1)); }
evalIrregularDerivs: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x420 MOV RBX,R8 MOV R14,RCX MOV R15,RDX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOVAPS xmmword ptr [RSP + 0x50],XMM0 MOVAPS xmmword ptr [RSP + 0x40],XMM0 LEA RAX,[RSP + 0x60] MOV qword ptr [RSP + 0x30],RAX MOV EBP,0x1 CMP qword ptr [R8 + 0x8],0x0 JZ 0x00197fd5 CMP qword ptr [RBX + 0x10],0x0 JZ 0x00197fd5 LEA RAX,[RSP + 0x100] MOV qword ptr [RSP + 0x38],RAX LEA RAX,[RSP + 0x1a0] MOV qword ptr [RSP + 0x40],RAX MOV EBP,0x3 CMP qword ptr [RBX + 0x18],0x0 JZ 0x00197fd5 CMP qword ptr [RBX + 0x20],0x0 JZ 0x00197fd5 CMP qword ptr [RBX + 0x28],0x0 JZ 0x00197fd5 LEA RAX,[RSP + 0x240] MOV qword ptr [RSP + 0x48],RAX LEA RAX,[RSP + 0x2e0] MOV qword ptr [RSP + 0x50],RAX LEA RAX,[RSP + 0x380] MOV qword ptr [RSP + 0x58],RAX MOV EBP,0x6 LAB_00197fd5: LEA R12,[RSP + 0x30] MOV RDX,R12 CALL 0x00138f10 MOV qword ptr [RSP],R15 MOV ECX,dword ptr [R14] MOV dword ptr [RSP + 0x8],ECX MOV ECX,dword ptr [R14 + 0x4] MOV dword ptr [RSP + 0xc],ECX MOV dword ptr [RSP + 0x18],EDX MOV qword ptr [RSP + 0x10],RAX MOV dword ptr [RSP + 0x1c],EBP MOV qword ptr [RSP + 0x20],RBX MOV qword ptr [RSP + 0x28],R12 MOV RDI,RSP CMP EBP,0x3 JZ 0x00198020 CMP EBP,0x1 JNZ 0x00198027 CALL 0x00139960 JMP 0x0019802c LAB_00198020: CALL 0x0013a040 JMP 0x0019802c LAB_00198027: CALL 0x0013a1d0 LAB_0019802c: ADD RSP,0x420 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalIrregularDerivs(double const*, double const*, OpenSubdiv::v3_6_0::Bfr::Surface<double>::PointDescriptor const&, double**) const */ void __thiscall OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalIrregularDerivs (Surface<double> *this,double *param_1,double *param_2,PointDescriptor *param_3, double **param_4) { int iVar1; double *local_448; int4 local_440; int4 local_43c; int1 local_438 [12]; int local_42c; double **local_428; double **local_420; double *local_418; int1 *puStack_410; int1 *local_408; int1 *puStack_400; int1 *local_3f8; int1 *puStack_3f0; double local_3e8 [20]; int1 local_348 [160]; int1 local_2a8 [160]; int1 local_208 [160]; int1 local_168 [160]; int1 local_c8 [160]; puStack_410 = (int1 *)0x0; local_3f8 = (int1 *)0x0; puStack_3f0 = (int1 *)0x0; local_408 = (int1 *)0x0; puStack_400 = (int1 *)0x0; local_418 = local_3e8; iVar1 = 1; if ((param_4[1] != (double *)0x0) && (param_4[2] != (double *)0x0)) { puStack_410 = local_348; local_408 = local_2a8; iVar1 = 3; if ((param_4[3] != (double *)0x0) && ((param_4[4] != (double *)0x0 && (param_4[5] != (double *)0x0)))) { puStack_400 = local_208; local_3f8 = local_168; puStack_3f0 = local_c8; iVar1 = 6; } } local_438 = evalIrregularBasis(this,param_1,&local_418); local_440 = *(int4 *)param_3; local_43c = *(int4 *)(param_3 + 4); local_448 = param_2; local_42c = iVar1; local_428 = param_4; local_420 = &local_418; if (iVar1 == 3) { points::Combine3<double>::Apply((CommonCombinationParameters *)&local_448); } else if (iVar1 == 1) { points::Combine1<double>::Apply((CommonCombinationParameters *)&local_448); } else { points::CombineMultiple<double>::Apply((CommonCombinationParameters *)&local_448); } return; }
51,446
OpenSubdiv::v3_6_0::Bfr::Surface<float>::evalIrregularDerivs(float const*, float const*, OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&, float**) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surface.cpp
void Surface<REAL>::evalIrregularDerivs(REAL const uv[2], REAL const patchPoints[], PointDescriptor const & pointDesc, REAL * deriv[]) const { // // Non-linear irregular basis evaluation returns both the weights // and the corresponding points of a sub-patch defined by a subset // of the given patch points. // // Assign weights for requested derivatives and evaluate: // REAL wBuffer[6 * 20]; REAL * wDeriv[6]; int numDerivs = assignWeightsPerDeriv(deriv, 20, wBuffer, wDeriv); IndexArray indices = evalIrregularBasis(uv, wDeriv); // // Assemble parameters of the point combination operation and apply: // points::CommonCombinationParameters<REAL> combineParams; combineParams.pointData = patchPoints; combineParams.pointSize = pointDesc.size; combineParams.pointStride = pointDesc.stride; combineParams.srcCount = indices.size(); combineParams.srcIndices = &indices[0]; combineParams.resultCount = numDerivs; combineParams.resultArray = deriv; combineParams.weightArray = wDeriv; if (numDerivs == 1) { points::Combine1<REAL>::Apply(combineParams); } else if (numDerivs == 3) { points::Combine3<REAL>::Apply(combineParams); } else { points::CombineMultiple<REAL>::Apply(combineParams); } }
O2
cpp
OpenSubdiv::v3_6_0::Bfr::Surface<float>::evalIrregularDerivs(float const*, float const*, OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&, float**) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x438, %rsp # imm = 0x438 movq %r8, %r14 movq %rcx, 0x8(%rsp) movq %rdx, %r12 movq %rsi, %r13 movq %rdi, %rbp pushq $0x14 popq %rsi leaq 0x70(%rsp), %rdx leaq 0x40(%rsp), %r15 movq %r8, %rdi movq %r15, %rcx callq 0xa375f movl %eax, %ebx movq %rbp, %rdi movq %r13, %rsi movq %r15, %rdx callq 0x50750 movq %r12, 0x10(%rsp) movq 0x8(%rsp), %rcx movq (%rcx), %rcx movq %rcx, 0x18(%rsp) movl %edx, 0x28(%rsp) movq %rax, 0x20(%rsp) movl %ebx, 0x2c(%rsp) movq %r14, 0x30(%rsp) movq %r15, 0x38(%rsp) leaq 0x10(%rsp), %rdi cmpl $0x3, %ebx je 0xa4be1 cmpl $0x1, %ebx jne 0xa4be8 callq 0x51950 jmp 0xa4bed callq 0x52420 jmp 0xa4bed callq 0x52720 addq $0x438, %rsp # imm = 0x438 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE19evalIrregularDerivsEPKdS5_RKNS3_15PointDescriptorEPPd: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 438h mov r14, r8 mov [rsp+468h+var_460], rcx mov r12, rdx mov r13, rsi mov rbp, rdi push 14h pop rsi lea rdx, [rsp+468h+var_3F8] lea r15, [rsp+468h+var_428] mov rdi, r8 mov rcx, r15 call _ZN10OpenSubdiv6v3_6_03Bfr12_GLOBAL__N_121assignWeightsPerDerivIdEEiPKPT_iS5_PS5_; OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::assignWeightsPerDeriv<double>(double * const*,int,double *,double **) mov ebx, eax mov rdi, rbp mov rsi, r13 mov rdx, r15 call __ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE18evalIrregularBasisEPKdPPd; OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalIrregularBasis(double const*,double **) mov [rsp+468h+var_458], r12 mov rcx, [rsp+468h+var_460] mov rcx, [rcx] mov [rsp+468h+var_450], rcx mov [rsp+468h+var_440], edx mov [rsp+468h+var_448], rax mov [rsp+468h+var_43C], ebx mov [rsp+468h+var_438], r14 mov [rsp+468h+var_430], r15 lea rdi, [rsp+468h+var_458] cmp ebx, 3 jz short loc_A4BE1 cmp ebx, 1 jnz short loc_A4BE8 call __ZN10OpenSubdiv6v3_6_03Bfr6points8Combine1IdE5ApplyERKNS2_27CommonCombinationParametersIdEE; OpenSubdiv::v3_6_0::Bfr::points::Combine1<double>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CommonCombinationParameters<double> const&) jmp short loc_A4BED loc_A4BE1: call __ZN10OpenSubdiv6v3_6_03Bfr6points8Combine3IdE5ApplyERKNS2_27CommonCombinationParametersIdEE; OpenSubdiv::v3_6_0::Bfr::points::Combine3<double>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CommonCombinationParameters<double> const&) jmp short loc_A4BED loc_A4BE8: call __ZN10OpenSubdiv6v3_6_03Bfr6points15CombineMultipleIdE5ApplyERKNS2_27CommonCombinationParametersIdEE; OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<double>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CommonCombinationParameters<double> const&) loc_A4BED: add rsp, 438h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalIrregularDerivs( long long a1, long long a2, long long a3, _QWORD *a4, _QWORD *a5) { int v7; // ebx long long v8; // rax int v9; // edx _QWORD v12[3]; // [rsp+10h] [rbp-458h] BYREF int v13; // [rsp+28h] [rbp-440h] int v14; // [rsp+2Ch] [rbp-43Ch] _QWORD *v15; // [rsp+30h] [rbp-438h] _BYTE *v16; // [rsp+38h] [rbp-430h] _BYTE v17[48]; // [rsp+40h] [rbp-428h] BYREF _BYTE v18[1016]; // [rsp+70h] [rbp-3F8h] BYREF v7 = OpenSubdiv::v3_6_0::Bfr::`anonymous namespace'::assignWeightsPerDeriv<double>( a5, 0x14u, (long long)v18, (long long)v17); v8 = OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalIrregularBasis(a1, a2, v17); v12[0] = a3; v12[1] = *a4; v13 = v9; v12[2] = v8; v14 = v7; v15 = a5; v16 = v17; if ( v7 == 3 ) return OpenSubdiv::v3_6_0::Bfr::points::Combine3<double>::Apply(v12); if ( v7 == 1 ) return OpenSubdiv::v3_6_0::Bfr::points::Combine1<double>::Apply(v12); return OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<double>::Apply(v12); }
evalIrregularDerivs: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x438 MOV R14,R8 MOV qword ptr [RSP + 0x8],RCX MOV R12,RDX MOV R13,RSI MOV RBP,RDI PUSH 0x14 POP RSI LEA RDX,[RSP + 0x70] LEA R15,[RSP + 0x40] MOV RDI,R8 MOV RCX,R15 CALL 0x001a375f MOV EBX,EAX MOV RDI,RBP MOV RSI,R13 MOV RDX,R15 CALL 0x00150750 MOV qword ptr [RSP + 0x10],R12 MOV RCX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RCX] MOV qword ptr [RSP + 0x18],RCX MOV dword ptr [RSP + 0x28],EDX MOV qword ptr [RSP + 0x20],RAX MOV dword ptr [RSP + 0x2c],EBX MOV qword ptr [RSP + 0x30],R14 MOV qword ptr [RSP + 0x38],R15 LEA RDI,[RSP + 0x10] CMP EBX,0x3 JZ 0x001a4be1 CMP EBX,0x1 JNZ 0x001a4be8 CALL 0x00151950 JMP 0x001a4bed LAB_001a4be1: CALL 0x00152420 JMP 0x001a4bed LAB_001a4be8: CALL 0x00152720 LAB_001a4bed: ADD RSP,0x438 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalIrregularDerivs(double const*, double const*, OpenSubdiv::v3_6_0::Bfr::Surface<double>::PointDescriptor const&, double**) const */ void __thiscall OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalIrregularDerivs (Surface<double> *this,double *param_1,double *param_2,PointDescriptor *param_3, double **param_4) { int iVar1; int4 extraout_EDX; double *local_458; int8 local_450; int8 local_448; int4 local_440; int local_43c; double **local_438; double **local_430; double *local_428 [6]; double local_3f8 [121]; iVar1 = (anonymous_namespace)::assignWeightsPerDeriv<double>(param_4,0x14,local_3f8,local_428); local_448 = evalIrregularBasis(this,param_1,local_428); local_450 = *(int8 *)param_3; local_458 = param_2; local_440 = extraout_EDX; local_43c = iVar1; local_438 = param_4; local_430 = local_428; if (iVar1 == 3) { points::Combine3<double>::Apply((CommonCombinationParameters *)&local_458); } else if (iVar1 == 1) { points::Combine1<double>::Apply((CommonCombinationParameters *)&local_458); } else { points::CombineMultiple<double>::Apply((CommonCombinationParameters *)&local_458); } return; }
51,447
OpenSubdiv::v3_6_0::Bfr::Surface<float>::evalIrregularDerivs(float const*, float const*, OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&, float**) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surface.cpp
void Surface<REAL>::evalIrregularDerivs(REAL const uv[2], REAL const patchPoints[], PointDescriptor const & pointDesc, REAL * deriv[]) const { // // Non-linear irregular basis evaluation returns both the weights // and the corresponding points of a sub-patch defined by a subset // of the given patch points. // // Assign weights for requested derivatives and evaluate: // REAL wBuffer[6 * 20]; REAL * wDeriv[6]; int numDerivs = assignWeightsPerDeriv(deriv, 20, wBuffer, wDeriv); IndexArray indices = evalIrregularBasis(uv, wDeriv); // // Assemble parameters of the point combination operation and apply: // points::CommonCombinationParameters<REAL> combineParams; combineParams.pointData = patchPoints; combineParams.pointSize = pointDesc.size; combineParams.pointStride = pointDesc.stride; combineParams.srcCount = indices.size(); combineParams.srcIndices = &indices[0]; combineParams.resultCount = numDerivs; combineParams.resultArray = deriv; combineParams.weightArray = wDeriv; if (numDerivs == 1) { points::Combine1<REAL>::Apply(combineParams); } else if (numDerivs == 3) { points::Combine3<REAL>::Apply(combineParams); } else { points::CombineMultiple<REAL>::Apply(combineParams); } }
O3
cpp
OpenSubdiv::v3_6_0::Bfr::Surface<float>::evalIrregularDerivs(float const*, float const*, OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&, float**) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x420, %rsp # imm = 0x420 movq %r8, %rbx movq %rcx, %r14 movq %rdx, %r15 xorps %xmm0, %xmm0 movups %xmm0, 0x18(%rsp) movups %xmm0, 0x8(%rsp) movq $0x0, 0x28(%rsp) leaq 0x60(%rsp), %rax movq %rax, (%rsp) movl $0x1, %ebp cmpq $0x0, 0x8(%r8) je 0x9ac60 cmpq $0x0, 0x10(%rbx) je 0x9ac60 leaq 0x100(%rsp), %rax movq %rax, 0x8(%rsp) leaq 0x1a0(%rsp), %rax movq %rax, 0x10(%rsp) movl $0x3, %ebp cmpq $0x0, 0x18(%rbx) je 0x9ac60 cmpq $0x0, 0x20(%rbx) je 0x9ac60 cmpq $0x0, 0x28(%rbx) je 0x9ac60 leaq 0x240(%rsp), %rax movq %rax, 0x18(%rsp) leaq 0x2e0(%rsp), %rax movq %rax, 0x20(%rsp) leaq 0x380(%rsp), %rax movq %rax, 0x28(%rsp) movl $0x6, %ebp movq %rsp, %r12 movq %r12, %rdx callq 0x38f00 movq %r15, 0x30(%rsp) movq (%r14), %rcx movq %rcx, 0x38(%rsp) movl %edx, 0x48(%rsp) movq %rax, 0x40(%rsp) movl %ebp, 0x4c(%rsp) movq %rbx, 0x50(%rsp) movq %r12, 0x58(%rsp) leaq 0x30(%rsp), %rdi cmpl $0x3, %ebp je 0x9aca5 cmpl $0x1, %ebp jne 0x9acac callq 0x39940 jmp 0x9acb1 callq 0x3a020 jmp 0x9acb1 callq 0x3a1b0 addq $0x420, %rsp # imm = 0x420 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq nop
_ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE19evalIrregularDerivsEPKdS5_RKNS3_15PointDescriptorEPPd: push rbp push r15 push r14 push r12 push rbx sub rsp, 420h mov rbx, r8 mov r14, rcx mov r15, rdx xorps xmm0, xmm0 movups [rsp+448h+var_430], xmm0 movups [rsp+448h+var_440], xmm0 mov [rsp+448h+var_420], 0 lea rax, [rsp+448h+var_3E8] mov [rsp+448h+var_448], rax mov ebp, 1 cmp qword ptr [r8+8], 0 jz short loc_9AC60 cmp qword ptr [rbx+10h], 0 jz short loc_9AC60 lea rax, [rsp+448h+var_348] mov qword ptr [rsp+448h+var_440], rax lea rax, [rsp+448h+var_2A8] mov qword ptr [rsp+448h+var_440+8], rax mov ebp, 3 cmp qword ptr [rbx+18h], 0 jz short loc_9AC60 cmp qword ptr [rbx+20h], 0 jz short loc_9AC60 cmp qword ptr [rbx+28h], 0 jz short loc_9AC60 lea rax, [rsp+448h+var_208] mov qword ptr [rsp+448h+var_430], rax lea rax, [rsp+448h+var_168] mov qword ptr [rsp+448h+var_430+8], rax lea rax, [rsp+448h+var_C8] mov [rsp+448h+var_420], rax mov ebp, 6 loc_9AC60: mov r12, rsp mov rdx, r12 call __ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE18evalIrregularBasisEPKdPPd; OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalIrregularBasis(double const*,double **) mov [rsp+448h+var_418], r15 mov rcx, [r14] mov [rsp+448h+var_410], rcx mov [rsp+448h+var_400], edx mov [rsp+448h+var_408], rax mov [rsp+448h+var_3FC], ebp mov [rsp+448h+var_3F8], rbx mov [rsp+448h+var_3F0], r12 lea rdi, [rsp+448h+var_418] cmp ebp, 3 jz short loc_9ACA5 cmp ebp, 1 jnz short loc_9ACAC call __ZN10OpenSubdiv6v3_6_03Bfr6points8Combine1IdE5ApplyERKNS2_27CommonCombinationParametersIdEE; OpenSubdiv::v3_6_0::Bfr::points::Combine1<double>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CommonCombinationParameters<double> const&) jmp short loc_9ACB1 loc_9ACA5: call __ZN10OpenSubdiv6v3_6_03Bfr6points8Combine3IdE5ApplyERKNS2_27CommonCombinationParametersIdEE; OpenSubdiv::v3_6_0::Bfr::points::Combine3<double>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CommonCombinationParameters<double> const&) jmp short loc_9ACB1 loc_9ACAC: call __ZN10OpenSubdiv6v3_6_03Bfr6points15CombineMultipleIdE5ApplyERKNS2_27CommonCombinationParametersIdEE; OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<double>::Apply(OpenSubdiv::v3_6_0::Bfr::points::CommonCombinationParameters<double> const&) loc_9ACB1: add rsp, 420h pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalIrregularDerivs( long long a1, long long a2, long long a3, long long *a4, _QWORD *a5) { int v8; // ebp long long v9; // rax long long v10; // rdx long long v11; // r8 long long v12; // r9 long long v13; // rcx char *v15; // [rsp+0h] [rbp-448h] BYREF __int128 v16; // [rsp+8h] [rbp-440h] __int128 v17; // [rsp+18h] [rbp-430h] char *v18; // [rsp+28h] [rbp-420h] long long v19; // [rsp+30h] [rbp-418h] BYREF long long v20; // [rsp+38h] [rbp-410h] long long v21; // [rsp+40h] [rbp-408h] unsigned long long v22; // [rsp+48h] [rbp-400h] _QWORD *v23; // [rsp+50h] [rbp-3F8h] char **v24; // [rsp+58h] [rbp-3F0h] char v25; // [rsp+60h] [rbp-3E8h] BYREF char v26; // [rsp+100h] [rbp-348h] BYREF char v27; // [rsp+1A0h] [rbp-2A8h] BYREF char v28; // [rsp+240h] [rbp-208h] BYREF char v29; // [rsp+2E0h] [rbp-168h] BYREF char v30; // [rsp+380h] [rbp-C8h] BYREF v17 = 0LL; v16 = 0LL; v18 = 0LL; v15 = &v25; v8 = 1; if ( a5[1] ) { if ( a5[2] ) { *(_QWORD *)&v16 = &v26; *((_QWORD *)&v16 + 1) = &v27; v8 = 3; if ( a5[3] ) { if ( a5[4] && a5[5] ) { *(_QWORD *)&v17 = &v28; *((_QWORD *)&v17 + 1) = &v29; v18 = &v30; v8 = 6; } } } } v9 = OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalIrregularBasis(a1, a2, &v15); v19 = a3; v13 = *a4; v20 = *a4; v22 = __PAIR64__(v8, v10); v21 = v9; v23 = a5; v24 = &v15; if ( v8 == 3 ) return OpenSubdiv::v3_6_0::Bfr::points::Combine3<double>::Apply( &v19, a2, v10, v13, v11, v12, v15, v16, *((_QWORD *)&v16 + 1), v17, *((_QWORD *)&v17 + 1), v18, v19, v20, v21, v22, v23, v24); if ( v8 == 1 ) return OpenSubdiv::v3_6_0::Bfr::points::Combine1<double>::Apply(&v19); return OpenSubdiv::v3_6_0::Bfr::points::CombineMultiple<double>::Apply( &v19, a2, v10, v13, v11, v12, v15, v16, *((_QWORD *)&v16 + 1), v17, *((_QWORD *)&v17 + 1), v18, v19, v20, v21, v22, v23, v24); }
evalIrregularDerivs: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x420 MOV RBX,R8 MOV R14,RCX MOV R15,RDX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x18],XMM0 MOVUPS xmmword ptr [RSP + 0x8],XMM0 MOV qword ptr [RSP + 0x28],0x0 LEA RAX,[RSP + 0x60] MOV qword ptr [RSP],RAX MOV EBP,0x1 CMP qword ptr [R8 + 0x8],0x0 JZ 0x0019ac60 CMP qword ptr [RBX + 0x10],0x0 JZ 0x0019ac60 LEA RAX,[RSP + 0x100] MOV qword ptr [RSP + 0x8],RAX LEA RAX,[RSP + 0x1a0] MOV qword ptr [RSP + 0x10],RAX MOV EBP,0x3 CMP qword ptr [RBX + 0x18],0x0 JZ 0x0019ac60 CMP qword ptr [RBX + 0x20],0x0 JZ 0x0019ac60 CMP qword ptr [RBX + 0x28],0x0 JZ 0x0019ac60 LEA RAX,[RSP + 0x240] MOV qword ptr [RSP + 0x18],RAX LEA RAX,[RSP + 0x2e0] MOV qword ptr [RSP + 0x20],RAX LEA RAX,[RSP + 0x380] MOV qword ptr [RSP + 0x28],RAX MOV EBP,0x6 LAB_0019ac60: MOV R12,RSP MOV RDX,R12 CALL 0x00138f00 MOV qword ptr [RSP + 0x30],R15 MOV RCX,qword ptr [R14] MOV qword ptr [RSP + 0x38],RCX MOV dword ptr [RSP + 0x48],EDX MOV qword ptr [RSP + 0x40],RAX MOV dword ptr [RSP + 0x4c],EBP MOV qword ptr [RSP + 0x50],RBX MOV qword ptr [RSP + 0x58],R12 LEA RDI,[RSP + 0x30] CMP EBP,0x3 JZ 0x0019aca5 CMP EBP,0x1 JNZ 0x0019acac CALL 0x00139940 JMP 0x0019acb1 LAB_0019aca5: CALL 0x0013a020 JMP 0x0019acb1 LAB_0019acac: CALL 0x0013a1b0 LAB_0019acb1: ADD RSP,0x420 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalIrregularDerivs(double const*, double const*, OpenSubdiv::v3_6_0::Bfr::Surface<double>::PointDescriptor const&, double**) const */ void __thiscall OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalIrregularDerivs (Surface<double> *this,double *param_1,double *param_2,PointDescriptor *param_3, double **param_4) { int iVar1; double *local_448; int1 *local_440; int1 *puStack_438; int1 *local_430; int1 *puStack_428; int1 *local_420; double *local_418; int8 local_410; int1 local_408 [12]; int local_3fc; double **local_3f8; int1 *local_3f0; double local_3e8 [20]; int1 local_348 [160]; int1 local_2a8 [160]; int1 local_208 [160]; int1 local_168 [160]; int1 local_c8 [160]; local_430 = (int1 *)0x0; puStack_428 = (int1 *)0x0; local_440 = (int1 *)0x0; puStack_438 = (int1 *)0x0; local_420 = (int1 *)0x0; local_448 = local_3e8; iVar1 = 1; if ((param_4[1] != (double *)0x0) && (param_4[2] != (double *)0x0)) { local_440 = local_348; puStack_438 = local_2a8; iVar1 = 3; if ((param_4[3] != (double *)0x0) && ((param_4[4] != (double *)0x0 && (param_4[5] != (double *)0x0)))) { local_430 = local_208; puStack_428 = local_168; local_420 = local_c8; iVar1 = 6; } } local_408 = evalIrregularBasis(this,param_1,&local_448); local_410 = *(int8 *)param_3; local_418 = param_2; local_3fc = iVar1; local_3f8 = param_4; if (iVar1 == 3) { local_3f0 = (int1 *)&local_448; points::Combine3<double>::Apply((CommonCombinationParameters *)&local_418); } else if (iVar1 == 1) { local_3f0 = (int1 *)&local_448; points::Combine1<double>::Apply((CommonCombinationParameters *)&local_418); } else { local_3f0 = (int1 *)&local_448; points::CombineMultiple<double>::Apply((CommonCombinationParameters *)&local_418); } return; }
51,448
ma_setup_functions
eloqsql/storage/maria/ma_open.c
void _ma_setup_functions(register MARIA_SHARE *share) { share->once_init= maria_once_init_dummy; share->once_end= maria_once_end_dummy; share->init= maria_scan_init_dummy; share->end= maria_scan_end_dummy; share->scan_init= maria_scan_init_dummy;/* Compat. dummy function */ share->scan_end= maria_scan_end_dummy;/* Compat. dummy function */ share->scan_remember_pos= _ma_def_scan_remember_pos; share->scan_restore_pos= _ma_def_scan_restore_pos; share->write_record_init= _ma_write_init_default; share->write_record_abort= _ma_write_abort_default; share->keypos_to_recpos= _ma_transparent_recpos; share->recpos_to_keypos= _ma_transparent_recpos; switch (share->data_file_type) { case COMPRESSED_RECORD: share->read_record= _ma_read_pack_record; share->scan= _ma_read_rnd_pack_record; share->once_init= _ma_once_init_pack_row; share->once_end= _ma_once_end_pack_row; /* Calculate checksum according to data in the original, not compressed, row. */ if (share->state.header.org_data_file_type == STATIC_RECORD && ! (share->options & HA_OPTION_NULL_FIELDS)) share->calc_checksum= _ma_static_checksum; else share->calc_checksum= _ma_checksum; share->calc_write_checksum= share->calc_checksum; break; case DYNAMIC_RECORD: share->read_record= _ma_read_dynamic_record; share->scan= _ma_read_rnd_dynamic_record; share->delete_record= _ma_delete_dynamic_record; share->compare_record= _ma_cmp_dynamic_record; share->compare_unique= _ma_cmp_dynamic_unique; share->calc_checksum= share->calc_write_checksum= _ma_checksum; if (share->base.blobs) { share->update_record= _ma_update_blob_record; share->write_record= _ma_write_blob_record; } else { share->write_record= _ma_write_dynamic_record; share->update_record= _ma_update_dynamic_record; } break; case STATIC_RECORD: share->read_record= _ma_read_static_record; share->scan= _ma_read_rnd_static_record; share->delete_record= _ma_delete_static_record; share->compare_record= _ma_cmp_static_record; share->update_record= _ma_update_static_record; share->write_record= _ma_write_static_record; share->compare_unique= _ma_cmp_static_unique; share->keypos_to_recpos= _ma_static_keypos_to_recpos; share->recpos_to_keypos= _ma_static_recpos_to_keypos; if (share->state.header.org_data_file_type == STATIC_RECORD && ! (share->options & HA_OPTION_NULL_FIELDS)) share->calc_checksum= _ma_static_checksum; else share->calc_checksum= _ma_checksum; break; case NO_RECORD: share->read_record= _ma_read_no_record; share->scan= _ma_read_rnd_no_record; share->delete_record= _ma_delete_no_record; share->update_record= _ma_update_no_record; share->write_record= _ma_write_no_record; share->recpos_to_keypos= _ma_no_keypos_to_recpos; share->keypos_to_recpos= _ma_no_keypos_to_recpos; /* Abort if following functions are called */ share->compare_record= 0; share->compare_unique= 0; share->calc_checksum= 0; break; case BLOCK_RECORD: share->once_init= _ma_once_init_block_record; share->once_end= _ma_once_end_block_record; share->init= _ma_init_block_record; share->end= _ma_end_block_record; share->write_record_init= _ma_write_init_block_record; share->write_record_abort= _ma_write_abort_block_record; share->scan_init= _ma_scan_init_block_record; share->scan_end= _ma_scan_end_block_record; share->scan= _ma_scan_block_record; share->scan_remember_pos= _ma_scan_remember_block_record; share->scan_restore_pos= _ma_scan_restore_block_record; share->read_record= _ma_read_block_record; share->delete_record= _ma_delete_block_record; share->compare_record= _ma_compare_block_record; share->update_record= _ma_update_block_record; share->write_record= _ma_write_block_record; share->compare_unique= _ma_cmp_block_unique; share->calc_checksum= _ma_checksum; share->keypos_to_recpos= _ma_transaction_keypos_to_recpos; share->recpos_to_keypos= _ma_transaction_recpos_to_keypos; /* write_block_record() will calculate the checksum; Tell maria_write() that it doesn't have to do this. */ share->calc_write_checksum= 0; break; } share->file_read= _ma_nommap_pread; share->file_write= _ma_nommap_pwrite; share->calc_check_checksum= share->calc_checksum; if (!(share->options & HA_OPTION_CHECKSUM) && share->data_file_type != COMPRESSED_RECORD) share->calc_checksum= share->calc_write_checksum= 0; return; }
O3
c
ma_setup_functions: pushq %rbp movq %rsp, %rbp leaq 0x49a(%rip), %rax # 0x54820 movq %rax, 0x628(%rdi) leaq 0x494(%rip), %rax # 0x54828 movq %rax, 0x630(%rdi) leaq 0x48e(%rip), %rax # 0x54830 movq %rax, 0x638(%rdi) leaq 0x488(%rip), %rcx # 0x54838 movq %rcx, 0x640(%rdi) movq %rax, 0x650(%rdi) movq %rcx, 0x660(%rdi) leaq 0x6575(%rip), %rax # 0x5a941 movq %rax, 0x668(%rdi) leaq 0x6579(%rip), %rax # 0x5a953 movq %rax, 0x670(%rdi) leaq 0xf208(%rip), %rax # 0x635f0 movq %rax, 0x678(%rdi) leaq 0xf221(%rip), %rax # 0x63617 movq %rax, 0x688(%rdi) leaq 0x28b9(%rip), %rax # 0x56cbd movq %rax, 0x6c8(%rdi) movq %rax, 0x6d0(%rdi) movl 0x7d0(%rdi), %eax cmpq $0x4, %rax ja 0x5474f leaq 0x8bc93(%rip), %rcx # 0xe00bc movslq (%rcx,%rax,4), %rdx addq %rcx, %rdx jmpq *%rdx leaq 0x6d11(%rip), %rcx # 0x5b14a movq %rcx, 0x648(%rdi) leaq 0x6dd1(%rip), %rcx # 0x5b218 movq %rcx, 0x658(%rdi) leaq 0x6b28(%rip), %rcx # 0x5af7d movq %rcx, 0x698(%rdi) leaq 0x6bbe(%rip), %rcx # 0x5b021 movq %rcx, 0x6a0(%rdi) leaq 0x6ad6(%rip), %rcx # 0x5af47 movq %rcx, 0x690(%rdi) leaq 0x6819(%rip), %rcx # 0x5ac98 movq %rcx, 0x680(%rdi) leaq 0x6c50(%rip), %rcx # 0x5b0dd movq %rcx, 0x6c0(%rdi) leaq 0x27ff(%rip), %rcx # 0x56c9a movq %rcx, 0x6c8(%rdi) leaq 0x2802(%rip), %rcx # 0x56cab movq %rcx, 0x6d0(%rdi) cmpb $0x0, 0x17(%rdi) jne 0x5476f testb $0x4, 0x721(%rdi) jne 0x5476f leaq 0x15412(%rip), %rcx # 0x698e0 jmp 0x54776 leaq 0x1c37a(%rip), %rcx # 0x70854 movq %rcx, 0x648(%rdi) leaq 0x1c377(%rip), %rcx # 0x7085f movq %rcx, 0x658(%rdi) leaq 0x1c356(%rip), %rcx # 0x7084c movq %rcx, 0x698(%rdi) leaq 0x1c340(%rip), %rcx # 0x70844 movq %rcx, 0x690(%rdi) leaq 0x1c32a(%rip), %rcx # 0x7083c movq %rcx, 0x680(%rdi) leaq 0x1c34a(%rip), %rcx # 0x7086a movq %rcx, 0x6d0(%rdi) movq %rcx, 0x6c8(%rdi) movq $0x0, 0x6c0(%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x6a0(%rdi) xorl %ecx, %ecx jmp 0x5479b leaq -0x1e7f3(%rip), %rcx # 0x35d5e movq %rcx, 0x648(%rdi) leaq -0x1e2ac(%rip), %rcx # 0x362b3 movq %rcx, 0x658(%rdi) leaq -0x1f6ad(%rip), %rcx # 0x34ec0 movq %rcx, 0x628(%rdi) leaq -0x1e84c(%rip), %rcx # 0x35d2f movq %rcx, 0x630(%rdi) cmpb $0x0, 0x17(%rdi) jne 0x54758 testb $0x4, 0x721(%rdi) jne 0x54758 leaq 0x15340(%rip), %rcx # 0x698e0 jmp 0x5475f leaq 0x6f62(%rip), %rcx # 0x5b50e movq %rcx, 0x628(%rdi) leaq 0x6fbc(%rip), %rcx # 0x5b576 movq %rcx, 0x630(%rdi) leaq 0x7110(%rip), %rcx # 0x5b6d8 movq %rcx, 0x638(%rdi) leaq 0x730e(%rip), %rcx # 0x5b8e4 movq %rcx, 0x640(%rdi) leaq 0x781c(%rip), %rcx # 0x5be00 movq %rcx, 0x678(%rdi) leaq 0x7cc7(%rip), %rcx # 0x5c2b9 movq %rcx, 0x688(%rdi) leaq 0x9a6e(%rip), %rcx # 0x5e06e movq %rcx, 0x650(%rdi) leaq 0x9b19(%rip), %rcx # 0x5e127 movq %rcx, 0x660(%rdi) leaq 0x9d02(%rip), %rcx # 0x5e31e movq %rcx, 0x658(%rdi) leaq 0x9b40(%rip), %rcx # 0x5e16a movq %rcx, 0x668(%rdi) leaq 0x9bf9(%rip), %rcx # 0x5e231 movq %rcx, 0x670(%rdi) leaq 0x97a3(%rip), %rcx # 0x5dde9 movq %rcx, 0x648(%rdi) leaq 0x85c2(%rip), %rcx # 0x5cc16 movq %rcx, 0x698(%rdi) leaq 0x9ff0(%rip), %rcx # 0x5e652 movq %rcx, 0x6a0(%rdi) leaq 0x820a(%rip), %rcx # 0x5c87a movq %rcx, 0x690(%rdi) leaq 0x7c33(%rip), %rcx # 0x5c2b1 movq %rcx, 0x680(%rdi) leaq 0x987e(%rip), %rcx # 0x5df0a movq %rcx, 0x6c0(%rdi) leaq 0x1512e(%rip), %rcx # 0x697c8 movq %rcx, 0x6a8(%rdi) leaq 0x261e(%rip), %rdx # 0x56cc6 movq %rdx, 0x6c8(%rdi) leaq 0x261c(%rip), %rdx # 0x56cd2 movq %rdx, 0x6d0(%rdi) movq $0x0, 0x6b0(%rdi) jmp 0x5479b leaq -0x19ed5(%rip), %rcx # 0x3a7ff movq %rcx, 0x648(%rdi) leaq -0x19590(%rip), %rcx # 0x3b152 movq %rcx, 0x658(%rdi) leaq -0x1b537(%rip), %rcx # 0x391b9 movq %rcx, 0x698(%rdi) leaq -0x19a6c(%rip), %rcx # 0x3ac92 movq %rcx, 0x6a0(%rdi) leaq -0x19bde(%rip), %rcx # 0x3ab2e movq %rcx, 0x6c0(%rdi) leaq 0x150ae(%rip), %rcx # 0x697c8 movq %rcx, 0x6b0(%rdi) movq %rcx, 0x6a8(%rdi) cmpl $0x0, 0x3f0(%rdi) je 0x5477f leaq -0x1b694(%rip), %rdx # 0x390a4 movq %rdx, 0x690(%rdi) leaq -0x1b82d(%rip), %rdx # 0x38f19 movq %rdx, 0x680(%rdi) jmp 0x5479b movq 0x6a8(%rdi), %rcx jmp 0x5479b leaq 0x15069(%rip), %rcx # 0x697c8 movq %rcx, 0x6a8(%rdi) movq %rcx, 0x6b0(%rdi) jmp 0x5479b leaq 0x15052(%rip), %rcx # 0x697c8 movq %rcx, 0x6a8(%rdi) jmp 0x5479b leaq -0x1c13d(%rip), %rdx # 0x38649 movq %rdx, 0x680(%rdi) leaq -0x1bcb6(%rip), %rdx # 0x38ade movq %rdx, 0x690(%rdi) leaq -0x1c37f(%rip), %rdx # 0x38423 movq %rdx, 0x6e0(%rdi) leaq -0x1c177(%rip), %rdx # 0x38639 movq %rdx, 0x6e8(%rdi) movq %rcx, 0x6b8(%rdi) cmpl $0x2, %eax je 0x547d9 movq 0x720(%rdi), %rax andl $0x20, %eax jne 0x547d9 xorps %xmm0, %xmm0 movups %xmm0, 0x6a8(%rdi) popq %rbp retq
_ma_setup_functions: push rbp mov rbp, rsp lea rax, maria_once_init_dummy mov [rdi+628h], rax lea rax, maria_once_end_dummy mov [rdi+630h], rax lea rax, maria_scan_init_dummy mov [rdi+638h], rax lea rcx, maria_scan_end_dummy mov [rdi+640h], rcx mov [rdi+650h], rax mov [rdi+660h], rcx lea rax, _ma_def_scan_remember_pos mov [rdi+668h], rax lea rax, _ma_def_scan_restore_pos mov [rdi+670h], rax lea rax, _ma_write_init_default mov [rdi+678h], rax lea rax, _ma_write_abort_default mov [rdi+688h], rax lea rax, _ma_transparent_recpos mov [rdi+6C8h], rax mov [rdi+6D0h], rax mov eax, [rdi+7D0h] cmp rax, 4; switch 5 cases ja def_54430; jumptable 0000000000054430 default case lea rcx, jpt_54430 movsxd rdx, ds:(jpt_54430 - 0E00BCh)[rcx+rax*4] add rdx, rcx jmp rdx; switch jump loc_54432: lea rcx, _ma_read_static_record; jumptable 0000000000054430 case 0 mov [rdi+648h], rcx lea rcx, _ma_read_rnd_static_record mov [rdi+658h], rcx lea rcx, _ma_delete_static_record mov [rdi+698h], rcx lea rcx, _ma_cmp_static_record mov [rdi+6A0h], rcx lea rcx, _ma_update_static_record mov [rdi+690h], rcx lea rcx, _ma_write_static_record mov [rdi+680h], rcx lea rcx, _ma_cmp_static_unique mov [rdi+6C0h], rcx lea rcx, _ma_static_keypos_to_recpos mov [rdi+6C8h], rcx lea rcx, _ma_static_recpos_to_keypos mov [rdi+6D0h], rcx cmp byte ptr [rdi+17h], 0 jnz loc_5476F test byte ptr [rdi+721h], 4 jnz loc_5476F lea rcx, _ma_static_checksum jmp loc_54776 loc_544D3: lea rcx, _ma_read_no_record; jumptable 0000000000054430 case 4 mov [rdi+648h], rcx lea rcx, _ma_read_rnd_no_record mov [rdi+658h], rcx lea rcx, _ma_delete_no_record mov [rdi+698h], rcx lea rcx, _ma_update_no_record mov [rdi+690h], rcx lea rcx, _ma_write_no_record mov [rdi+680h], rcx lea rcx, _ma_no_keypos_to_recpos mov [rdi+6D0h], rcx mov [rdi+6C8h], rcx mov qword ptr [rdi+6C0h], 0 xorps xmm0, xmm0 movups xmmword ptr [rdi+6A0h], xmm0 xor ecx, ecx jmp loc_5479B loc_5454A: lea rcx, _ma_read_pack_record; jumptable 0000000000054430 case 2 mov [rdi+648h], rcx lea rcx, _ma_read_rnd_pack_record mov [rdi+658h], rcx lea rcx, _ma_once_init_pack_row mov [rdi+628h], rcx lea rcx, _ma_once_end_pack_row mov [rdi+630h], rcx cmp byte ptr [rdi+17h], 0 jnz loc_54758 test byte ptr [rdi+721h], 4 jnz loc_54758 lea rcx, _ma_static_checksum jmp loc_5475F loc_545A5: lea rcx, _ma_once_init_block_record; jumptable 0000000000054430 case 3 mov [rdi+628h], rcx lea rcx, _ma_once_end_block_record mov [rdi+630h], rcx lea rcx, _ma_init_block_record mov [rdi+638h], rcx lea rcx, _ma_end_block_record mov [rdi+640h], rcx lea rcx, _ma_write_init_block_record mov [rdi+678h], rcx lea rcx, _ma_write_abort_block_record mov [rdi+688h], rcx lea rcx, _ma_scan_init_block_record mov [rdi+650h], rcx lea rcx, _ma_scan_end_block_record mov [rdi+660h], rcx lea rcx, _ma_scan_block_record mov [rdi+658h], rcx lea rcx, _ma_scan_remember_block_record mov [rdi+668h], rcx lea rcx, _ma_scan_restore_block_record mov [rdi+670h], rcx lea rcx, _ma_read_block_record mov [rdi+648h], rcx lea rcx, _ma_delete_block_record mov [rdi+698h], rcx lea rcx, _ma_compare_block_record mov [rdi+6A0h], rcx lea rcx, _ma_update_block_record mov [rdi+690h], rcx lea rcx, _ma_write_block_record mov [rdi+680h], rcx lea rcx, _ma_cmp_block_unique mov [rdi+6C0h], rcx lea rcx, _ma_checksum mov [rdi+6A8h], rcx lea rdx, _ma_transaction_keypos_to_recpos mov [rdi+6C8h], rdx lea rdx, _ma_transaction_recpos_to_keypos mov [rdi+6D0h], rdx mov qword ptr [rdi+6B0h], 0 jmp loc_5479B loc_546CD: lea rcx, _ma_read_dynamic_record; jumptable 0000000000054430 case 1 mov [rdi+648h], rcx lea rcx, _ma_read_rnd_dynamic_record mov [rdi+658h], rcx lea rcx, _ma_delete_dynamic_record mov [rdi+698h], rcx lea rcx, _ma_cmp_dynamic_record mov [rdi+6A0h], rcx lea rcx, _ma_cmp_dynamic_unique mov [rdi+6C0h], rcx lea rcx, _ma_checksum mov [rdi+6B0h], rcx mov [rdi+6A8h], rcx cmp dword ptr [rdi+3F0h], 0 jz short loc_5477F lea rdx, _ma_update_blob_record mov [rdi+690h], rdx lea rdx, _ma_write_blob_record mov [rdi+680h], rdx jmp short loc_5479B def_54430: mov rcx, [rdi+6A8h]; jumptable 0000000000054430 default case jmp short loc_5479B loc_54758: lea rcx, _ma_checksum loc_5475F: mov [rdi+6A8h], rcx mov [rdi+6B0h], rcx jmp short loc_5479B loc_5476F: lea rcx, _ma_checksum loc_54776: mov [rdi+6A8h], rcx jmp short loc_5479B loc_5477F: lea rdx, _ma_write_dynamic_record mov [rdi+680h], rdx lea rdx, _ma_update_dynamic_record mov [rdi+690h], rdx loc_5479B: lea rdx, _ma_nommap_pread mov [rdi+6E0h], rdx lea rdx, _ma_nommap_pwrite mov [rdi+6E8h], rdx mov [rdi+6B8h], rcx cmp eax, 2 jz short loc_547D9 mov rax, [rdi+720h] and eax, 20h jnz short loc_547D9 xorps xmm0, xmm0 movups xmmword ptr [rdi+6A8h], xmm0 loc_547D9: pop rbp retn
long long ma_setup_functions(long long a1) { long long result; // rax long long ( *v2)(); // rcx *(_QWORD *)(a1 + 1576) = maria_once_init_dummy; *(_QWORD *)(a1 + 1584) = maria_once_end_dummy; *(_QWORD *)(a1 + 1592) = maria_scan_init_dummy; *(_QWORD *)(a1 + 1600) = maria_scan_end_dummy; *(_QWORD *)(a1 + 1616) = maria_scan_init_dummy; *(_QWORD *)(a1 + 1632) = maria_scan_end_dummy; *(_QWORD *)(a1 + 1640) = ma_def_scan_remember_pos; *(_QWORD *)(a1 + 1648) = ma_def_scan_restore_pos; *(_QWORD *)(a1 + 1656) = ma_write_init_default; *(_QWORD *)(a1 + 1672) = ma_write_abort_default; *(_QWORD *)(a1 + 1736) = ma_transparent_recpos; *(_QWORD *)(a1 + 1744) = ma_transparent_recpos; result = *(unsigned int *)(a1 + 2000); switch ( *(_DWORD *)(a1 + 2000) ) { case 0: *(_QWORD *)(a1 + 1608) = ma_read_static_record; *(_QWORD *)(a1 + 1624) = ma_read_rnd_static_record; *(_QWORD *)(a1 + 1688) = ma_delete_static_record; *(_QWORD *)(a1 + 1696) = ma_cmp_static_record; *(_QWORD *)(a1 + 1680) = ma_update_static_record; *(_QWORD *)(a1 + 1664) = ma_write_static_record; *(_QWORD *)(a1 + 1728) = ma_cmp_static_unique; *(_QWORD *)(a1 + 1736) = ma_static_keypos_to_recpos; *(_QWORD *)(a1 + 1744) = ma_static_recpos_to_keypos; if ( *(_BYTE *)(a1 + 23) || (*(_BYTE *)(a1 + 1825) & 4) != 0 ) v2 = ma_checksum; else v2 = ma_static_checksum; *(_QWORD *)(a1 + 1704) = v2; break; case 1: *(_QWORD *)(a1 + 1608) = ma_read_dynamic_record; *(_QWORD *)(a1 + 1624) = ma_read_rnd_dynamic_record; *(_QWORD *)(a1 + 1688) = ma_delete_dynamic_record; *(_QWORD *)(a1 + 1696) = ma_cmp_dynamic_record; *(_QWORD *)(a1 + 1728) = ma_cmp_dynamic_unique; v2 = ma_checksum; *(_QWORD *)(a1 + 1712) = ma_checksum; *(_QWORD *)(a1 + 1704) = ma_checksum; if ( *(_DWORD *)(a1 + 1008) ) { *(_QWORD *)(a1 + 1680) = ma_update_blob_record; *(_QWORD *)(a1 + 1664) = ma_write_blob_record; } else { *(_QWORD *)(a1 + 1664) = ma_write_dynamic_record; *(_QWORD *)(a1 + 1680) = ma_update_dynamic_record; } break; case 2: *(_QWORD *)(a1 + 1608) = ma_read_pack_record; *(_QWORD *)(a1 + 1624) = ma_read_rnd_pack_record; *(_QWORD *)(a1 + 1576) = ma_once_init_pack_row; *(_QWORD *)(a1 + 1584) = ma_once_end_pack_row; if ( *(_BYTE *)(a1 + 23) || (*(_BYTE *)(a1 + 1825) & 4) != 0 ) v2 = ma_checksum; else v2 = ma_static_checksum; *(_QWORD *)(a1 + 1704) = v2; *(_QWORD *)(a1 + 1712) = v2; break; case 3: *(_QWORD *)(a1 + 1576) = ma_once_init_block_record; *(_QWORD *)(a1 + 1584) = ma_once_end_block_record; *(_QWORD *)(a1 + 1592) = ma_init_block_record; *(_QWORD *)(a1 + 1600) = ma_end_block_record; *(_QWORD *)(a1 + 1656) = ma_write_init_block_record; *(_QWORD *)(a1 + 1672) = ma_write_abort_block_record; *(_QWORD *)(a1 + 1616) = ma_scan_init_block_record; *(_QWORD *)(a1 + 1632) = ma_scan_end_block_record; *(_QWORD *)(a1 + 1624) = ma_scan_block_record; *(_QWORD *)(a1 + 1640) = ma_scan_remember_block_record; *(_QWORD *)(a1 + 1648) = ma_scan_restore_block_record; *(_QWORD *)(a1 + 1608) = ma_read_block_record; *(_QWORD *)(a1 + 1688) = ma_delete_block_record; *(_QWORD *)(a1 + 1696) = ma_compare_block_record; *(_QWORD *)(a1 + 1680) = ma_update_block_record; *(_QWORD *)(a1 + 1664) = ma_write_block_record; *(_QWORD *)(a1 + 1728) = ma_cmp_block_unique; v2 = ma_checksum; *(_QWORD *)(a1 + 1704) = ma_checksum; *(_QWORD *)(a1 + 1736) = ma_transaction_keypos_to_recpos; *(_QWORD *)(a1 + 1744) = ma_transaction_recpos_to_keypos; *(_QWORD *)(a1 + 1712) = 0LL; break; case 4: *(_QWORD *)(a1 + 1608) = ma_read_no_record; *(_QWORD *)(a1 + 1624) = ma_read_rnd_no_record; *(_QWORD *)(a1 + 1688) = ma_delete_no_record; *(_QWORD *)(a1 + 1680) = ma_update_no_record; *(_QWORD *)(a1 + 1664) = ma_write_no_record; *(_QWORD *)(a1 + 1744) = ma_no_keypos_to_recpos; *(_QWORD *)(a1 + 1736) = ma_no_keypos_to_recpos; *(_QWORD *)(a1 + 1728) = 0LL; *(_OWORD *)(a1 + 1696) = 0LL; v2 = 0LL; break; default: v2 = *(long long ( **)())(a1 + 1704); break; } *(_QWORD *)(a1 + 1760) = ma_nommap_pread; *(_QWORD *)(a1 + 1768) = ma_nommap_pwrite; *(_QWORD *)(a1 + 1720) = v2; if ( (_DWORD)result != 2 ) { result = *(_QWORD *)(a1 + 1824) & 0x20LL; if ( (*(_QWORD *)(a1 + 1824) & 0x20) == 0 ) *(_OWORD *)(a1 + 1704) = 0LL; } return result; }
_ma_setup_functions: PUSH RBP MOV RBP,RSP LEA RAX,[0x154820] MOV qword ptr [RDI + 0x628],RAX LEA RAX,[0x154828] MOV qword ptr [RDI + 0x630],RAX LEA RAX,[0x154830] MOV qword ptr [RDI + 0x638],RAX LEA RCX,[0x154838] MOV qword ptr [RDI + 0x640],RCX MOV qword ptr [RDI + 0x650],RAX MOV qword ptr [RDI + 0x660],RCX LEA RAX,[0x15a941] MOV qword ptr [RDI + 0x668],RAX LEA RAX,[0x15a953] MOV qword ptr [RDI + 0x670],RAX LEA RAX,[0x1635f0] MOV qword ptr [RDI + 0x678],RAX LEA RAX,[0x163617] MOV qword ptr [RDI + 0x688],RAX LEA RAX,[0x156cbd] MOV qword ptr [RDI + 0x6c8],RAX MOV qword ptr [RDI + 0x6d0],RAX MOV EAX,dword ptr [RDI + 0x7d0] CMP RAX,0x4 JA 0x0015474f LEA RCX,[0x1e00bc] MOVSXD RDX,dword ptr [RCX + RAX*0x4] ADD RDX,RCX switchD: JMP RDX caseD_0: LEA RCX,[0x15b14a] MOV qword ptr [RDI + 0x648],RCX LEA RCX,[0x15b218] MOV qword ptr [RDI + 0x658],RCX LEA RCX,[0x15af7d] MOV qword ptr [RDI + 0x698],RCX LEA RCX,[0x15b021] MOV qword ptr [RDI + 0x6a0],RCX LEA RCX,[0x15af47] MOV qword ptr [RDI + 0x690],RCX LEA RCX,[0x15ac98] MOV qword ptr [RDI + 0x680],RCX LEA RCX,[0x15b0dd] MOV qword ptr [RDI + 0x6c0],RCX LEA RCX,[0x156c9a] MOV qword ptr [RDI + 0x6c8],RCX LEA RCX,[0x156cab] MOV qword ptr [RDI + 0x6d0],RCX CMP byte ptr [RDI + 0x17],0x0 JNZ 0x0015476f TEST byte ptr [RDI + 0x721],0x4 JNZ 0x0015476f LEA RCX,[0x1698e0] JMP 0x00154776 caseD_4: LEA RCX,[0x170854] MOV qword ptr [RDI + 0x648],RCX LEA RCX,[0x17085f] MOV qword ptr [RDI + 0x658],RCX LEA RCX,[0x17084c] MOV qword ptr [RDI + 0x698],RCX LEA RCX,[0x170844] MOV qword ptr [RDI + 0x690],RCX LEA RCX,[0x17083c] MOV qword ptr [RDI + 0x680],RCX LEA RCX,[0x17086a] MOV qword ptr [RDI + 0x6d0],RCX MOV qword ptr [RDI + 0x6c8],RCX MOV qword ptr [RDI + 0x6c0],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x6a0],XMM0 XOR ECX,ECX JMP 0x0015479b caseD_2: LEA RCX,[0x135d5e] MOV qword ptr [RDI + 0x648],RCX LEA RCX,[0x1362b3] MOV qword ptr [RDI + 0x658],RCX LEA RCX,[0x134ec0] MOV qword ptr [RDI + 0x628],RCX LEA RCX,[0x135d2f] MOV qword ptr [RDI + 0x630],RCX CMP byte ptr [RDI + 0x17],0x0 JNZ 0x00154758 TEST byte ptr [RDI + 0x721],0x4 JNZ 0x00154758 LEA RCX,[0x1698e0] JMP 0x0015475f caseD_3: LEA RCX,[0x15b50e] MOV qword ptr [RDI + 0x628],RCX LEA RCX,[0x15b576] MOV qword ptr [RDI + 0x630],RCX LEA RCX,[0x15b6d8] MOV qword ptr [RDI + 0x638],RCX LEA RCX,[0x15b8e4] MOV qword ptr [RDI + 0x640],RCX LEA RCX,[0x15be00] MOV qword ptr [RDI + 0x678],RCX LEA RCX,[0x15c2b9] MOV qword ptr [RDI + 0x688],RCX LEA RCX,[0x15e06e] MOV qword ptr [RDI + 0x650],RCX LEA RCX,[0x15e127] MOV qword ptr [RDI + 0x660],RCX LEA RCX,[0x15e31e] MOV qword ptr [RDI + 0x658],RCX LEA RCX,[0x15e16a] MOV qword ptr [RDI + 0x668],RCX LEA RCX,[0x15e231] MOV qword ptr [RDI + 0x670],RCX LEA RCX,[0x15dde9] MOV qword ptr [RDI + 0x648],RCX LEA RCX,[0x15cc16] MOV qword ptr [RDI + 0x698],RCX LEA RCX,[0x15e652] MOV qword ptr [RDI + 0x6a0],RCX LEA RCX,[0x15c87a] MOV qword ptr [RDI + 0x690],RCX LEA RCX,[0x15c2b1] MOV qword ptr [RDI + 0x680],RCX LEA RCX,[0x15df0a] MOV qword ptr [RDI + 0x6c0],RCX LEA RCX,[0x1697c8] MOV qword ptr [RDI + 0x6a8],RCX LEA RDX,[0x156cc6] MOV qword ptr [RDI + 0x6c8],RDX LEA RDX,[0x156cd2] MOV qword ptr [RDI + 0x6d0],RDX MOV qword ptr [RDI + 0x6b0],0x0 JMP 0x0015479b caseD_1: LEA RCX,[0x13a7ff] MOV qword ptr [RDI + 0x648],RCX LEA RCX,[0x13b152] MOV qword ptr [RDI + 0x658],RCX LEA RCX,[0x1391b9] MOV qword ptr [RDI + 0x698],RCX LEA RCX,[0x13ac92] MOV qword ptr [RDI + 0x6a0],RCX LEA RCX,[0x13ab2e] MOV qword ptr [RDI + 0x6c0],RCX LEA RCX,[0x1697c8] MOV qword ptr [RDI + 0x6b0],RCX MOV qword ptr [RDI + 0x6a8],RCX CMP dword ptr [RDI + 0x3f0],0x0 JZ 0x0015477f LEA RDX,[0x1390a4] MOV qword ptr [RDI + 0x690],RDX LEA RDX,[0x138f19] MOV qword ptr [RDI + 0x680],RDX JMP 0x0015479b default: MOV RCX,qword ptr [RDI + 0x6a8] JMP 0x0015479b LAB_00154758: LEA RCX,[0x1697c8] LAB_0015475f: MOV qword ptr [RDI + 0x6a8],RCX MOV qword ptr [RDI + 0x6b0],RCX JMP 0x0015479b LAB_0015476f: LEA RCX,[0x1697c8] LAB_00154776: MOV qword ptr [RDI + 0x6a8],RCX JMP 0x0015479b LAB_0015477f: LEA RDX,[0x138649] MOV qword ptr [RDI + 0x680],RDX LEA RDX,[0x138ade] MOV qword ptr [RDI + 0x690],RDX LAB_0015479b: LEA RDX,[0x138423] MOV qword ptr [RDI + 0x6e0],RDX LEA RDX,[0x138639] MOV qword ptr [RDI + 0x6e8],RDX MOV qword ptr [RDI + 0x6b8],RCX CMP EAX,0x2 JZ 0x001547d9 MOV RAX,qword ptr [RDI + 0x720] AND EAX,0x20 JNZ 0x001547d9 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x6a8],XMM0 LAB_001547d9: POP RBP RET
void _ma_setup_functions(long param_1) { code *pcVar1; *(code **)(param_1 + 0x628) = maria_once_init_dummy; *(code **)(param_1 + 0x630) = maria_once_end_dummy; *(code **)(param_1 + 0x638) = maria_scan_init_dummy; *(code **)(param_1 + 0x640) = maria_scan_end_dummy; *(code **)(param_1 + 0x650) = maria_scan_init_dummy; *(code **)(param_1 + 0x660) = maria_scan_end_dummy; *(code **)(param_1 + 0x668) = _ma_def_scan_remember_pos; *(code **)(param_1 + 0x670) = _ma_def_scan_restore_pos; *(code **)(param_1 + 0x678) = _ma_write_init_default; *(code **)(param_1 + 0x688) = _ma_write_abort_default; *(code **)(param_1 + 0x6c8) = _ma_transparent_recpos; *(code **)(param_1 + 0x6d0) = _ma_transparent_recpos; switch(*(int *)(param_1 + 2000)) { case 0: *(code **)(param_1 + 0x648) = _ma_read_static_record; *(code **)(param_1 + 0x658) = _ma_read_rnd_static_record; *(code **)(param_1 + 0x698) = _ma_delete_static_record; *(code **)(param_1 + 0x6a0) = _ma_cmp_static_record; *(code **)(param_1 + 0x690) = _ma_update_static_record; *(code **)(param_1 + 0x680) = _ma_write_static_record; *(code **)(param_1 + 0x6c0) = _ma_cmp_static_unique; *(code **)(param_1 + 0x6c8) = _ma_static_keypos_to_recpos; *(code **)(param_1 + 0x6d0) = _ma_static_recpos_to_keypos; if ((*(char *)(param_1 + 0x17) == '\0') && ((*(byte *)(param_1 + 0x721) & 4) == 0)) { pcVar1 = _ma_static_checksum; } else { pcVar1 = _ma_checksum; } *(code **)(param_1 + 0x6a8) = pcVar1; break; case 1: *(code **)(param_1 + 0x648) = _ma_read_dynamic_record; *(code **)(param_1 + 0x658) = _ma_read_rnd_dynamic_record; *(code **)(param_1 + 0x698) = _ma_delete_dynamic_record; *(code **)(param_1 + 0x6a0) = _ma_cmp_dynamic_record; *(code **)(param_1 + 0x6c0) = _ma_cmp_dynamic_unique; pcVar1 = _ma_checksum; *(code **)(param_1 + 0x6b0) = _ma_checksum; *(code **)(param_1 + 0x6a8) = _ma_checksum; if (*(int *)(param_1 + 0x3f0) == 0) { *(code **)(param_1 + 0x680) = _ma_write_dynamic_record; *(code **)(param_1 + 0x690) = _ma_update_dynamic_record; } else { *(code **)(param_1 + 0x690) = _ma_update_blob_record; *(code **)(param_1 + 0x680) = _ma_write_blob_record; } break; case 2: *(code **)(param_1 + 0x648) = _ma_read_pack_record; *(code **)(param_1 + 0x658) = _ma_read_rnd_pack_record; *(code **)(param_1 + 0x628) = _ma_once_init_pack_row; *(code **)(param_1 + 0x630) = _ma_once_end_pack_row; if ((*(char *)(param_1 + 0x17) == '\0') && ((*(byte *)(param_1 + 0x721) & 4) == 0)) { pcVar1 = _ma_static_checksum; } else { pcVar1 = _ma_checksum; } *(code **)(param_1 + 0x6a8) = pcVar1; *(code **)(param_1 + 0x6b0) = pcVar1; break; case 3: *(code **)(param_1 + 0x628) = _ma_once_init_block_record; *(code **)(param_1 + 0x630) = _ma_once_end_block_record; *(code **)(param_1 + 0x638) = _ma_init_block_record; *(code **)(param_1 + 0x640) = _ma_end_block_record; *(code **)(param_1 + 0x678) = _ma_write_init_block_record; *(code **)(param_1 + 0x688) = _ma_write_abort_block_record; *(code **)(param_1 + 0x650) = _ma_scan_init_block_record; *(code **)(param_1 + 0x660) = _ma_scan_end_block_record; *(code **)(param_1 + 0x658) = _ma_scan_block_record; *(code **)(param_1 + 0x668) = _ma_scan_remember_block_record; *(code **)(param_1 + 0x670) = _ma_scan_restore_block_record; *(code **)(param_1 + 0x648) = _ma_read_block_record; *(code **)(param_1 + 0x698) = _ma_delete_block_record; *(code **)(param_1 + 0x6a0) = _ma_compare_block_record; *(code **)(param_1 + 0x690) = _ma_update_block_record; *(code **)(param_1 + 0x680) = _ma_write_block_record; *(code **)(param_1 + 0x6c0) = _ma_cmp_block_unique; pcVar1 = _ma_checksum; *(code **)(param_1 + 0x6a8) = _ma_checksum; *(code **)(param_1 + 0x6c8) = _ma_transaction_keypos_to_recpos; *(code **)(param_1 + 0x6d0) = _ma_transaction_recpos_to_keypos; *(int8 *)(param_1 + 0x6b0) = 0; break; case 4: *(code **)(param_1 + 0x648) = _ma_read_no_record; *(code **)(param_1 + 0x658) = _ma_read_rnd_no_record; *(code **)(param_1 + 0x698) = _ma_delete_no_record; *(code **)(param_1 + 0x690) = _ma_update_no_record; *(code **)(param_1 + 0x680) = _ma_write_no_record; *(code **)(param_1 + 0x6d0) = _ma_no_keypos_to_recpos; *(code **)(param_1 + 0x6c8) = _ma_no_keypos_to_recpos; *(int8 *)(param_1 + 0x6c0) = 0; *(int8 *)(param_1 + 0x6a0) = 0; *(int8 *)(param_1 + 0x6a8) = 0; pcVar1 = (code *)0x0; break; default: pcVar1 = *(code **)(param_1 + 0x6a8); } *(code **)(param_1 + 0x6e0) = _ma_nommap_pread; *(code **)(param_1 + 0x6e8) = _ma_nommap_pwrite; *(code **)(param_1 + 0x6b8) = pcVar1; if ((*(int *)(param_1 + 2000) != 2) && ((*(ulong *)(param_1 + 0x720) & 0x20) == 0)) { *(int8 *)(param_1 + 0x6a8) = 0; *(int8 *)(param_1 + 0x6b0) = 0; } return; }
51,449
my_mb_wc_utf8mb4_quick
eloqsql/strings/ctype-utf8.h
static inline int my_mb_wc_utf8mb4_quick(my_wc_t *pwc, const uchar *s, const uchar *e) { uchar c; if (s >= e) return MY_CS_TOOSMALL; c= s[0]; if (c < 0x80) { *pwc= c; return 1; } else if (c < 0xc2) return MY_CS_ILSEQ; else if (c < 0xe0) { if (s + 2 > e) /* We need 2 characters */ return MY_CS_TOOSMALL2; if (!(IS_CONTINUATION_BYTE(s[1]))) return MY_CS_ILSEQ; *pwc= UTF8MB2_CODE(c, s[1]); return 2; } else if (c < 0xf0) { if (s + 3 > e) /* We need 3 characters */ return MY_CS_TOOSMALL3; if (!IS_UTF8MB3_STEP2(c, s[1], s[2])) return MY_CS_ILSEQ; *pwc= UTF8MB3_CODE(c, s[1], s[2]); return 3; } else if (c < 0xf5) { if (s + 4 > e) /* We need 4 characters */ return MY_CS_TOOSMALL4; if (!IS_UTF8MB4_STEP2(c, s[1], s[2], s[3])) return MY_CS_ILSEQ; *pwc= UTF8MB4_CODE(c, s[1], s[2], s[3]); return 4; } return MY_CS_ILSEQ; }
O0
c
my_mb_wc_utf8mb4_quick: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jb 0x79946 movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x79bc3 movq -0x18(%rbp), %rax movb (%rax), %al movb %al, -0x21(%rbp) movzbl -0x21(%rbp), %eax cmpl $0x80, %eax jge 0x79973 movzbl -0x21(%rbp), %eax movl %eax, %ecx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl $0x1, -0x4(%rbp) jmp 0x79bc3 movzbl -0x21(%rbp), %eax cmpl $0xc2, %eax jge 0x7998a movl $0x0, -0x4(%rbp) jmp 0x79bc3 movzbl -0x21(%rbp), %eax cmpl $0xe0, %eax jge 0x79a00 movq -0x18(%rbp), %rax addq $0x2, %rax cmpq -0x20(%rbp), %rax jbe 0x799af movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x79bc3 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jl 0x799cd movl $0x0, -0x4(%rbp) jmp 0x79bc3 movzbl -0x21(%rbp), %eax andl $0x1f, %eax movslq %eax, %rcx shlq $0x6, %rcx movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cltq orq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl $0x2, -0x4(%rbp) jmp 0x79bc3 movzbl -0x21(%rbp), %eax cmpl $0xf0, %eax jge 0x79abc movq -0x18(%rbp), %rax addq $0x3, %rax cmpq -0x20(%rbp), %rax jbe 0x79a29 movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99 jmp 0x79bc3 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x79a67 movq -0x18(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x79a67 movzbl -0x21(%rbp), %eax cmpl $0xe1, %eax jge 0x79a73 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xa0, %eax jge 0x79a73 movl $0x0, -0x4(%rbp) jmp 0x79bc3 movzbl -0x21(%rbp), %eax andl $0xf, %eax movslq %eax, %rcx shlq $0xc, %rcx movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cltq shlq $0x6, %rax orq %rax, %rcx movq -0x18(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cltq orq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl $0x3, -0x4(%rbp) jmp 0x79bc3 movzbl -0x21(%rbp), %eax cmpl $0xf5, %eax jge 0x79bb4 movq -0x18(%rbp), %rax addq $0x4, %rax cmpq -0x20(%rbp), %rax jbe 0x79ae5 movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98 jmp 0x79bc3 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x79b4f movq -0x18(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x79b4f movq -0x18(%rbp), %rax movzbl 0x3(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x79b4f movzbl -0x21(%rbp), %eax cmpl $0xf1, %eax jge 0x79b35 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x90, %eax jl 0x79b4f movzbl -0x21(%rbp), %eax cmpl $0xf3, %eax jle 0x79b58 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x8f, %eax jle 0x79b58 movl $0x0, -0x4(%rbp) jmp 0x79bc3 movzbl -0x21(%rbp), %eax andl $0x7, %eax movslq %eax, %rcx shlq $0x12, %rcx movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cltq shlq $0xc, %rax orq %rax, %rcx movq -0x18(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cltq shlq $0x6, %rax orq %rax, %rcx movq -0x18(%rbp), %rax movzbl 0x3(%rax), %eax xorl $0x80, %eax cltq orq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl $0x4, -0x4(%rbp) jmp 0x79bc3 jmp 0x79bb6 jmp 0x79bb8 jmp 0x79bba jmp 0x79bbc movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
my_mb_wc_utf8mb4_quick_0: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jb short loc_79946 mov [rbp+var_4], 0FFFFFF9Bh jmp loc_79BC3 loc_79946: mov rax, [rbp+var_18] mov al, [rax] mov [rbp+var_21], al movzx eax, [rbp+var_21] cmp eax, 80h jge short loc_79973 movzx eax, [rbp+var_21] mov ecx, eax mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_4], 1 jmp loc_79BC3 loc_79973: movzx eax, [rbp+var_21] cmp eax, 0C2h jge short loc_7998A mov [rbp+var_4], 0 jmp loc_79BC3 loc_7998A: movzx eax, [rbp+var_21] cmp eax, 0E0h jge short loc_79A00 mov rax, [rbp+var_18] add rax, 2 cmp rax, [rbp+var_20] jbe short loc_799AF mov [rbp+var_4], 0FFFFFF9Ah jmp loc_79BC3 loc_799AF: mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jl short loc_799CD mov [rbp+var_4], 0 jmp loc_79BC3 loc_799CD: movzx eax, [rbp+var_21] and eax, 1Fh movsxd rcx, eax shl rcx, 6 mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cdqe or rcx, rax mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_4], 2 jmp loc_79BC3 loc_79A00: movzx eax, [rbp+var_21] cmp eax, 0F0h jge loc_79ABC mov rax, [rbp+var_18] add rax, 3 cmp rax, [rbp+var_20] jbe short loc_79A29 mov [rbp+var_4], 0FFFFFF99h jmp loc_79BC3 loc_79A29: mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jge short loc_79A67 mov rax, [rbp+var_18] movzx eax, byte ptr [rax+2] xor eax, 80h cmp eax, 40h ; '@' jge short loc_79A67 movzx eax, [rbp+var_21] cmp eax, 0E1h jge short loc_79A73 mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] cmp eax, 0A0h jge short loc_79A73 loc_79A67: mov [rbp+var_4], 0 jmp loc_79BC3 loc_79A73: movzx eax, [rbp+var_21] and eax, 0Fh movsxd rcx, eax shl rcx, 0Ch mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cdqe shl rax, 6 or rcx, rax mov rax, [rbp+var_18] movzx eax, byte ptr [rax+2] xor eax, 80h cdqe or rcx, rax mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_4], 3 jmp loc_79BC3 loc_79ABC: movzx eax, [rbp+var_21] cmp eax, 0F5h jge loc_79BB4 mov rax, [rbp+var_18] add rax, 4 cmp rax, [rbp+var_20] jbe short loc_79AE5 mov [rbp+var_4], 0FFFFFF98h jmp loc_79BC3 loc_79AE5: mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jge short loc_79B4F mov rax, [rbp+var_18] movzx eax, byte ptr [rax+2] xor eax, 80h cmp eax, 40h ; '@' jge short loc_79B4F mov rax, [rbp+var_18] movzx eax, byte ptr [rax+3] xor eax, 80h cmp eax, 40h ; '@' jge short loc_79B4F movzx eax, [rbp+var_21] cmp eax, 0F1h jge short loc_79B35 mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] cmp eax, 90h jl short loc_79B4F loc_79B35: movzx eax, [rbp+var_21] cmp eax, 0F3h jle short loc_79B58 mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] cmp eax, 8Fh jle short loc_79B58 loc_79B4F: mov [rbp+var_4], 0 jmp short loc_79BC3 loc_79B58: movzx eax, [rbp+var_21] and eax, 7 movsxd rcx, eax shl rcx, 12h mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cdqe shl rax, 0Ch or rcx, rax mov rax, [rbp+var_18] movzx eax, byte ptr [rax+2] xor eax, 80h cdqe shl rax, 6 or rcx, rax mov rax, [rbp+var_18] movzx eax, byte ptr [rax+3] xor eax, 80h cdqe or rcx, rax mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_4], 4 jmp short loc_79BC3 loc_79BB4: jmp short $+2 loc_79BB6: jmp short $+2 loc_79BB8: jmp short $+2 loc_79BBA: jmp short $+2 loc_79BBC: mov [rbp+var_4], 0 loc_79BC3: mov eax, [rbp+var_4] pop rbp retn
long long my_mb_wc_utf8mb4_quick_0(unsigned long long *a1, unsigned __int8 *a2, unsigned long long a3) { unsigned __int8 v4; // [rsp+1h] [rbp-21h] if ( (unsigned long long)a2 < a3 ) { v4 = *a2; if ( *a2 >= 0x80u ) { if ( v4 >= 0xC2u ) { if ( v4 >= 0xE0u ) { if ( v4 >= 0xF0u ) { if ( v4 >= 0xF5u ) { return 0; } else if ( (unsigned long long)(a2 + 4) <= a3 ) { if ( (a2[1] ^ 0x80) < 64 && (a2[2] ^ 0x80) < 64 && (a2[3] ^ 0x80) < 64 && (v4 >= 0xF1u || a2[1] >= 0x90u) && (v4 <= 0xF3u || a2[1] <= 0x8Fu) ) { *a1 = a2[3] ^ 0x80u | ((long long)(a2[2] ^ 0x80u) << 6) | ((long long)(a2[1] ^ 0x80u) << 12) | ((unsigned long long)(v4 & 7) << 18); return 4; } else { return 0; } } else { return (unsigned int)-104; } } else if ( (unsigned long long)(a2 + 3) <= a3 ) { if ( (a2[1] ^ 0x80) < 64 && (a2[2] ^ 0x80) < 64 && (v4 >= 0xE1u || a2[1] >= 0xA0u) ) { *a1 = a2[2] ^ 0x80u | ((long long)(a2[1] ^ 0x80u) << 6) | ((unsigned long long)(v4 & 0xF) << 12); return 3; } else { return 0; } } else { return (unsigned int)-103; } } else if ( (unsigned long long)(a2 + 2) <= a3 ) { if ( (a2[1] ^ 0x80) < 64 ) { *a1 = a2[1] ^ 0x80u | ((unsigned long long)(v4 & 0x1F) << 6); return 2; } else { return 0; } } else { return (unsigned int)-102; } } else { return 0; } } else { *a1 = v4; return 1; } } else { return (unsigned int)-101; } }
my_mb_wc_utf8mb4_quick: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JC 0x00179946 MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x00179bc3 LAB_00179946: MOV RAX,qword ptr [RBP + -0x18] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x21],AL MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0x80 JGE 0x00179973 MOVZX EAX,byte ptr [RBP + -0x21] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x1 JMP 0x00179bc3 LAB_00179973: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xc2 JGE 0x0017998a MOV dword ptr [RBP + -0x4],0x0 JMP 0x00179bc3 LAB_0017998a: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xe0 JGE 0x00179a00 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x20] JBE 0x001799af MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x00179bc3 LAB_001799af: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JL 0x001799cd MOV dword ptr [RBP + -0x4],0x0 JMP 0x00179bc3 LAB_001799cd: MOVZX EAX,byte ptr [RBP + -0x21] AND EAX,0x1f MOVSXD RCX,EAX SHL RCX,0x6 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CDQE OR RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x2 JMP 0x00179bc3 LAB_00179a00: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xf0 JGE 0x00179abc MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x3 CMP RAX,qword ptr [RBP + -0x20] JBE 0x00179a29 MOV dword ptr [RBP + -0x4],0xffffff99 JMP 0x00179bc3 LAB_00179a29: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JGE 0x00179a67 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CMP EAX,0x40 JGE 0x00179a67 MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xe1 JGE 0x00179a73 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xa0 JGE 0x00179a73 LAB_00179a67: MOV dword ptr [RBP + -0x4],0x0 JMP 0x00179bc3 LAB_00179a73: MOVZX EAX,byte ptr [RBP + -0x21] AND EAX,0xf MOVSXD RCX,EAX SHL RCX,0xc MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CDQE SHL RAX,0x6 OR RCX,RAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CDQE OR RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x3 JMP 0x00179bc3 LAB_00179abc: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xf5 JGE 0x00179bb4 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x4 CMP RAX,qword ptr [RBP + -0x20] JBE 0x00179ae5 MOV dword ptr [RBP + -0x4],0xffffff98 JMP 0x00179bc3 LAB_00179ae5: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JGE 0x00179b4f MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CMP EAX,0x40 JGE 0x00179b4f MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x3] XOR EAX,0x80 CMP EAX,0x40 JGE 0x00179b4f MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xf1 JGE 0x00179b35 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x90 JL 0x00179b4f LAB_00179b35: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xf3 JLE 0x00179b58 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x8f JLE 0x00179b58 LAB_00179b4f: MOV dword ptr [RBP + -0x4],0x0 JMP 0x00179bc3 LAB_00179b58: MOVZX EAX,byte ptr [RBP + -0x21] AND EAX,0x7 MOVSXD RCX,EAX SHL RCX,0x12 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CDQE SHL RAX,0xc OR RCX,RAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CDQE SHL RAX,0x6 OR RCX,RAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x3] XOR EAX,0x80 CDQE OR RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x4 JMP 0x00179bc3 LAB_00179bb4: JMP 0x00179bb6 LAB_00179bb6: JMP 0x00179bb8 LAB_00179bb8: JMP 0x00179bba LAB_00179bba: JMP 0x00179bbc LAB_00179bbc: MOV dword ptr [RBP + -0x4],0x0 LAB_00179bc3: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_mb_wc_utf8mb4_quick(ulong *param_1,byte *param_2,byte *param_3) { byte bVar1; int4 local_c; if (param_2 < param_3) { bVar1 = *param_2; if (bVar1 < 0x80) { *param_1 = (ulong)bVar1; local_c = 1; } else if (bVar1 < 0xc2) { local_c = 0; } else if (bVar1 < 0xe0) { if (param_3 < param_2 + 2) { local_c = 0xffffff9a; } else if ((param_2[1] ^ 0x80) < 0x40) { *param_1 = (long)(int)(bVar1 & 0x1f) << 6 | (long)(int)(param_2[1] ^ 0x80); local_c = 2; } else { local_c = 0; } } else if (bVar1 < 0xf0) { if (param_3 < param_2 + 3) { local_c = 0xffffff99; } else if ((((param_2[1] ^ 0x80) < 0x40) && ((param_2[2] ^ 0x80) < 0x40)) && ((0xe0 < bVar1 || (0x9f < param_2[1])))) { *param_1 = (long)(int)(bVar1 & 0xf) << 0xc | (long)(int)(param_2[1] ^ 0x80) << 6 | (long)(int)(param_2[2] ^ 0x80); local_c = 3; } else { local_c = 0; } } else if (bVar1 < 0xf5) { if (param_3 < param_2 + 4) { local_c = 0xffffff98; } else if ((((((param_2[1] ^ 0x80) < 0x40) && ((param_2[2] ^ 0x80) < 0x40)) && ((param_2[3] ^ 0x80) < 0x40)) && ((0xf0 < bVar1 || (0x8f < param_2[1])))) && ((bVar1 < 0xf4 || (param_2[1] < 0x90)))) { *param_1 = (long)(int)(bVar1 & 7) << 0x12 | (long)(int)(param_2[1] ^ 0x80) << 0xc | (long)(int)(param_2[2] ^ 0x80) << 6 | (long)(int)(param_2[3] ^ 0x80); local_c = 4; } else { local_c = 0; } } else { local_c = 0; } } else { local_c = 0xffffff9b; } return local_c; }
51,450
my_mb_wc_utf8mb4_quick
eloqsql/strings/ctype-utf8.h
static inline int my_mb_wc_utf8mb4_quick(my_wc_t *pwc, const uchar *s, const uchar *e) { uchar c; if (s >= e) return MY_CS_TOOSMALL; c= s[0]; if (c < 0x80) { *pwc= c; return 1; } else if (c < 0xc2) return MY_CS_ILSEQ; else if (c < 0xe0) { if (s + 2 > e) /* We need 2 characters */ return MY_CS_TOOSMALL2; if (!(IS_CONTINUATION_BYTE(s[1]))) return MY_CS_ILSEQ; *pwc= UTF8MB2_CODE(c, s[1]); return 2; } else if (c < 0xf0) { if (s + 3 > e) /* We need 3 characters */ return MY_CS_TOOSMALL3; if (!IS_UTF8MB3_STEP2(c, s[1], s[2])) return MY_CS_ILSEQ; *pwc= UTF8MB3_CODE(c, s[1], s[2]); return 3; } else if (c < 0xf5) { if (s + 4 > e) /* We need 4 characters */ return MY_CS_TOOSMALL4; if (!IS_UTF8MB4_STEP2(c, s[1], s[2], s[3])) return MY_CS_ILSEQ; *pwc= UTF8MB4_CODE(c, s[1], s[2], s[3]); return 4; } return MY_CS_ILSEQ; }
O3
c
my_mb_wc_utf8mb4_quick: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rdx, %rsi jae 0x59138 movzbl (%rsi), %ecx testb %cl, %cl js 0x59131 movl $0x1, %eax movq %rcx, (%rdi) jmp 0x59138 cmpb $-0x3e, %cl jae 0x5913a xorl %eax, %eax popq %rbp retq cmpb $-0x21, %cl ja 0x59170 leaq 0x2(%rsi), %r8 movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rdx, %r8 ja 0x59138 movzbl 0x1(%rsi), %edx xorl $0x80, %edx movl $0x0, %eax cmpb $0x3f, %dl ja 0x59138 andl $0x1f, %ecx shll $0x6, %ecx orl %edx, %ecx movl $0x2, %eax jmp 0x5912c cmpb $-0x11, %cl ja 0x591d2 leaq 0x3(%rsi), %r8 movl $0xffffff99, %eax # imm = 0xFFFFFF99 cmpq %rdx, %r8 ja 0x59138 movzbl 0x1(%rsi), %edx cmpb $-0x41, %dl jg 0x59136 movzbl 0x2(%rsi), %esi cmpb $-0x41, %sil jg 0x59136 cmpl $0xe0, %ecx sete %r8b cmpb $-0x60, %dl setb %r9b movl $0x0, %eax testb %r9b, %r8b jne 0x59138 shll $0xc, %ecx movzwl %cx, %eax andl $0x3f, %edx shll $0x6, %edx orl %eax, %edx andl $0x3f, %esi orq %rdx, %rsi movl $0x3, %eax movq %rsi, %rcx jmp 0x5912c cmpb $-0xc, %cl ja 0x59136 leaq 0x4(%rsi), %r8 movl $0xffffff98, %eax # imm = 0xFFFFFF98 cmpq %rdx, %r8 ja 0x59138 movzbl 0x1(%rsi), %r8d cmpb $-0x41, %r8b jg 0x59136 movzbl 0x2(%rsi), %edx cmpb $-0x41, %dl jg 0x59136 movzbl 0x3(%rsi), %esi cmpb $-0x41, %sil jg 0x59136 cmpl $0xf0, %ecx sete %al cmpb $-0x70, %r8b setb %r9b testb %r9b, %al jne 0x59136 cmpl $0xf4, %ecx sete %r9b cmpb $-0x70, %r8b setae %r10b movl $0x0, %eax testb %r10b, %r9b jne 0x59138 andl $0x7, %ecx shll $0x12, %ecx andl $0x3f, %r8d shll $0xc, %r8d orl %ecx, %r8d andl $0x3f, %edx shll $0x6, %edx orl %r8d, %edx andl $0x3f, %esi orq %rdx, %rsi movl $0x4, %eax jmp 0x591ca
my_mb_wc_utf8mb4_quick_0: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rsi, rdx jnb short loc_59138 movzx ecx, byte ptr [rsi] test cl, cl js short loc_59131 mov eax, 1 loc_5912C: mov [rdi], rcx jmp short loc_59138 loc_59131: cmp cl, 0C2h jnb short loc_5913A loc_59136: xor eax, eax loc_59138: pop rbp retn loc_5913A: cmp cl, 0DFh ja short loc_59170 lea r8, [rsi+2] mov eax, 0FFFFFF9Ah cmp r8, rdx ja short loc_59138 movzx edx, byte ptr [rsi+1] xor edx, 80h mov eax, 0 cmp dl, 3Fh ; '?' ja short loc_59138 and ecx, 1Fh shl ecx, 6 or ecx, edx mov eax, 2 jmp short loc_5912C loc_59170: cmp cl, 0EFh ja short loc_591D2 lea r8, [rsi+3] mov eax, 0FFFFFF99h cmp r8, rdx ja short loc_59138 movzx edx, byte ptr [rsi+1] cmp dl, 0BFh jg short loc_59136 movzx esi, byte ptr [rsi+2] cmp sil, 0BFh jg short loc_59136 cmp ecx, 0E0h setz r8b cmp dl, 0A0h setb r9b mov eax, 0 test r8b, r9b jnz short loc_59138 shl ecx, 0Ch movzx eax, cx and edx, 3Fh shl edx, 6 or edx, eax and esi, 3Fh or rsi, rdx mov eax, 3 loc_591CA: mov rcx, rsi jmp loc_5912C loc_591D2: cmp cl, 0F4h ja loc_59136 lea r8, [rsi+4] mov eax, 0FFFFFF98h cmp r8, rdx ja loc_59138 movzx r8d, byte ptr [rsi+1] cmp r8b, 0BFh jg loc_59136 movzx edx, byte ptr [rsi+2] cmp dl, 0BFh jg loc_59136 movzx esi, byte ptr [rsi+3] cmp sil, 0BFh jg loc_59136 cmp ecx, 0F0h setz al cmp r8b, 90h setb r9b test al, r9b jnz loc_59136 cmp ecx, 0F4h setz r9b cmp r8b, 90h setnb r10b mov eax, 0 test r9b, r10b jnz loc_59138 and ecx, 7 shl ecx, 12h and r8d, 3Fh shl r8d, 0Ch or r8d, ecx and edx, 3Fh shl edx, 6 or edx, r8d and esi, 3Fh or rsi, rdx mov eax, 4 jmp loc_591CA
long long my_mb_wc_utf8mb4_quick_0(unsigned long long *a1, unsigned __int8 *a2, unsigned long long a3) { long long result; // rax unsigned long long v4; // rcx char v5; // dl char v6; // si unsigned long long v7; // rsi char v8; // r8 char v9; // dl char v10; // si result = 4294967195LL; if ( (unsigned long long)a2 >= a3 ) return result; v4 = *a2; if ( (v4 & 0x80u) == 0LL ) { result = 1LL; LABEL_4: *a1 = v4; return result; } if ( (unsigned __int8)v4 < 0xC2u ) return 0LL; if ( (unsigned __int8)v4 > 0xDFu ) { if ( (unsigned __int8)v4 > 0xEFu ) { if ( (unsigned __int8)v4 <= 0xF4u ) { result = 4294967192LL; if ( (unsigned long long)(a2 + 4) > a3 ) return result; v8 = a2[1]; if ( v8 <= -65 ) { v9 = a2[2]; if ( v9 <= -65 ) { v10 = a2[3]; if ( v10 <= -65 && ((unsigned __int8)v8 >= 0x90u || (_DWORD)v4 != 240) ) { result = 0LL; if ( (unsigned __int8)v8 >= 0x90u && (_DWORD)v4 == 244 ) return result; v7 = ((v4 & 7) << 18) | ((unsigned __int8)(v8 & 0x3F) << 12) | ((unsigned __int8)(v9 & 0x3F) << 6) | v10 & 0x3F; result = 4LL; LABEL_18: v4 = v7; goto LABEL_4; } } } } } else { result = 4294967193LL; if ( (unsigned long long)(a2 + 3) > a3 ) return result; v5 = a2[1]; if ( v5 <= -65 ) { v6 = a2[2]; if ( v6 <= -65 ) { result = 0LL; if ( (unsigned __int8)v5 < 0xA0u && (_DWORD)v4 == 224 ) return result; v7 = (unsigned __int16)((_WORD)v4 << 12) | ((unsigned __int8)(v5 & 0x3F) << 6) | (unsigned long long)(v6 & 0x3F); result = 3LL; goto LABEL_18; } } } return 0LL; } result = 4294967194LL; if ( (unsigned long long)(a2 + 2) <= a3 ) { result = 0LL; if ( (a2[1] ^ 0x80u) <= 0x3F ) { v4 = a2[1] ^ 0x80 | ((unsigned __int8)(v4 & 0x1F) << 6); result = 2LL; goto LABEL_4; } } return result; }
my_mb_wc_utf8mb4_quick: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RSI,RDX JNC 0x00159138 MOVZX ECX,byte ptr [RSI] TEST CL,CL JS 0x00159131 MOV EAX,0x1 LAB_0015912c: MOV qword ptr [RDI],RCX JMP 0x00159138 LAB_00159131: CMP CL,0xc2 JNC 0x0015913a LAB_00159136: XOR EAX,EAX LAB_00159138: POP RBP RET LAB_0015913a: CMP CL,0xdf JA 0x00159170 LEA R8,[RSI + 0x2] MOV EAX,0xffffff9a CMP R8,RDX JA 0x00159138 MOVZX EDX,byte ptr [RSI + 0x1] XOR EDX,0x80 MOV EAX,0x0 CMP DL,0x3f JA 0x00159138 AND ECX,0x1f SHL ECX,0x6 OR ECX,EDX MOV EAX,0x2 JMP 0x0015912c LAB_00159170: CMP CL,0xef JA 0x001591d2 LEA R8,[RSI + 0x3] MOV EAX,0xffffff99 CMP R8,RDX JA 0x00159138 MOVZX EDX,byte ptr [RSI + 0x1] CMP DL,0xbf JG 0x00159136 MOVZX ESI,byte ptr [RSI + 0x2] CMP SIL,0xbf JG 0x00159136 CMP ECX,0xe0 SETZ R8B CMP DL,0xa0 SETC R9B MOV EAX,0x0 TEST R8B,R9B JNZ 0x00159138 SHL ECX,0xc MOVZX EAX,CX AND EDX,0x3f SHL EDX,0x6 OR EDX,EAX AND ESI,0x3f OR RSI,RDX MOV EAX,0x3 LAB_001591ca: MOV RCX,RSI JMP 0x0015912c LAB_001591d2: CMP CL,0xf4 JA 0x00159136 LEA R8,[RSI + 0x4] MOV EAX,0xffffff98 CMP R8,RDX JA 0x00159138 MOVZX R8D,byte ptr [RSI + 0x1] CMP R8B,0xbf JG 0x00159136 MOVZX EDX,byte ptr [RSI + 0x2] CMP DL,0xbf JG 0x00159136 MOVZX ESI,byte ptr [RSI + 0x3] CMP SIL,0xbf JG 0x00159136 CMP ECX,0xf0 SETZ AL CMP R8B,0x90 SETC R9B TEST AL,R9B JNZ 0x00159136 CMP ECX,0xf4 SETZ R9B CMP R8B,0x90 SETNC R10B MOV EAX,0x0 TEST R9B,R10B JNZ 0x00159138 AND ECX,0x7 SHL ECX,0x12 AND R8D,0x3f SHL R8D,0xc OR R8D,ECX AND EDX,0x3f SHL EDX,0x6 OR EDX,R8D AND ESI,0x3f OR RSI,RDX MOV EAX,0x4 JMP 0x001591ca
int8 my_mb_wc_utf8mb4_quick(ulong *param_1,byte *param_2,byte *param_3) { byte bVar1; byte bVar2; int8 uVar3; uint uVar4; ulong uVar5; if (param_3 <= param_2) { return 0xffffff9b; } bVar1 = *param_2; uVar5 = (ulong)bVar1; if ((char)bVar1 < '\0') { if (0xc1 < bVar1) { uVar4 = (uint)bVar1; if (bVar1 < 0xe0) { if (param_3 < param_2 + 2) { return 0xffffff9a; } if (0x3f < (byte)(param_2[1] ^ 0x80)) { return 0; } uVar5 = (ulong)((uVar4 & 0x1f) << 6 | param_2[1] ^ 0x80); uVar3 = 2; goto LAB_0015912c; } if (bVar1 < 0xf0) { if (param_3 < param_2 + 3) { return 0xffffff99; } bVar2 = param_2[1]; if (((char)bVar2 < -0x40) && ((char)param_2[2] < -0x40)) { if (uVar4 == 0xe0 && bVar2 < 0xa0) { return 0; } uVar4 = param_2[2] & 0x3f | (bVar2 & 0x3f) << 6 | (bVar1 & 0xf) << 0xc; uVar3 = 3; LAB_001591ca: uVar5 = (ulong)uVar4; goto LAB_0015912c; } } else if (bVar1 < 0xf5) { if (param_3 < param_2 + 4) { return 0xffffff98; } bVar1 = param_2[1]; if (((((char)bVar1 < -0x40) && ((char)param_2[2] < -0x40)) && ((char)param_2[3] < -0x40)) && (uVar4 != 0xf0 || 0x8f < bVar1)) { if (uVar4 == 0xf4 && 0x8f < bVar1) { return 0; } uVar4 = param_2[3] & 0x3f | (param_2[2] & 0x3f) << 6 | (bVar1 & 0x3f) << 0xc | (uVar4 & 7) << 0x12; uVar3 = 4; goto LAB_001591ca; } } } uVar3 = 0; } else { uVar3 = 1; LAB_0015912c: *param_1 = uVar5; } return uVar3; }
51,451
do_load_const
fabiosvm[P]rak/src/vm.c
static void do_load_const(RakVM *vm, RakChunk *chunk, uint32_t *ip, RakValue *slots, RakError *err) { uint8_t idx = rak_instr_a(*ip); rak_vm_load_const(vm, chunk, idx, err); if (!rak_is_ok(err)) return; dispatch(vm, chunk, ip + 1, slots, err); }
O2
c
do_load_const: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %r8, %rbx movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %r13 movzbl 0x1(%rdx), %eax shll $0x4, %eax movq 0x8(%rsi,%rax), %rsi movq 0x10(%r12,%rax), %rdx movq %r8, %rcx callq 0x8028 cmpb $0x1, (%rbx) jne 0x6f7e movzbl 0x4(%r15), %eax addq $0x4, %r15 leaq 0x7d8e(%rip), %r9 # 0xecf0 movq %r13, %rdi movq %r12, %rsi movq %r15, %rdx movq %r14, %rcx movq %rbx, %r8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 jmpq *(%r9,%rax,8) popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
do_load_const: push r15 push r14 push r13 push r12 push rbx mov rbx, r8 mov r14, rcx mov r15, rdx mov r12, rsi mov r13, rdi movzx eax, byte ptr [rdx+1] shl eax, 4 mov rsi, [rsi+rax+8] mov rdx, [r12+rax+10h] mov rcx, r8 call rak_vm_push_value cmp byte ptr [rbx], 1 jnz short loc_6F7E movzx eax, byte ptr [r15+4] add r15, 4 lea r9, dispatchTable mov rdi, r13 mov rsi, r12 mov rdx, r15 mov rcx, r14 mov r8, rbx pop rbx pop r12 pop r13 pop r14 pop r15 jmp ds:(dispatchTable - 0ECF0h)[r9+rax*8] loc_6F7E: pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long do_load_const(long long a1, long long a2, long long a3, long long a4, _BYTE *a5) { long long result; // rax result = rak_vm_push_value( a1, *(_QWORD *)(a2 + 16 * (unsigned int)*(unsigned __int8 *)(a3 + 1) + 8), *(_QWORD *)(a2 + 16 * (unsigned int)*(unsigned __int8 *)(a3 + 1) + 16), a5); if ( *a5 == 1 ) ((void ( __noreturn *)(long long, long long, long long))*(&dispatchTable + *(unsigned __int8 *)(a3 + 4)))( a1, a2, a3 + 4); return result; }
do_load_const: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV RBX,R8 MOV R14,RCX MOV R15,RDX MOV R12,RSI MOV R13,RDI MOVZX EAX,byte ptr [RDX + 0x1] SHL EAX,0x4 MOV RSI,qword ptr [RSI + RAX*0x1 + 0x8] MOV RDX,qword ptr [R12 + RAX*0x1 + 0x10] MOV RCX,R8 CALL 0x00108028 CMP byte ptr [RBX],0x1 JNZ 0x00106f7e MOVZX EAX,byte ptr [R15 + 0x4] ADD R15,0x4 LEA R9,[0x10ecf0] MOV RDI,R13 MOV RSI,R12 MOV RDX,R15 MOV RCX,R14 MOV R8,RBX POP RBX POP R12 POP R13 POP R14 POP R15 JMP qword ptr [R9 + RAX*0x8] LAB_00106f7e: POP RBX POP R12 POP R13 POP R14 POP R15 RET
void do_load_const(int8 param_1,long param_2,long param_3,int8 param_4,char *param_5) { long lVar1; lVar1 = (ulong)*(byte *)(param_3 + 1) * 0x10; rak_vm_push_value(param_1,*(int8 *)(param_2 + 8 + lVar1), *(int8 *)(param_2 + 0x10 + lVar1),param_5); if (*param_5 == '\x01') { /* WARNING: Could not recover jumptable at 0x00106f7a. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(dispatchTable + (ulong)*(byte *)(param_3 + 4) * 8)) (param_1,param_2,param_3 + 4,param_4,param_5); return; } return; }
51,452
psi_prlock_rdlock
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_prlock_rdlock(mysql_prlock_t *that, const char *file, uint line) { PSI_rwlock_locker_state state; PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_rdwait) (&state, that->m_psi, PSI_RWLOCK_READLOCK, file, line); int result= rw_pr_rdlock(&that->m_prlock); if (locker) PSI_RWLOCK_CALL(end_rwlock_rdwait)(locker, result); return result; }
O0
c
psi_prlock_rdlock: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) leaq 0x1ac4ce(%rip), %rax # 0x1db8a8 movq (%rax), %rax movq 0x1a0(%rax), %rax movq -0x8(%rbp), %rcx movq 0x68(%rcx), %rsi movq -0x10(%rbp), %rcx movl -0x14(%rbp), %r8d leaq -0x48(%rbp), %rdi xorl %edx, %edx callq *%rax movq %rax, -0x50(%rbp) movq -0x8(%rbp), %rdi callq 0x321d0 movl %eax, -0x54(%rbp) cmpq $0x0, -0x50(%rbp) je 0x2f42d leaq 0x1ac48e(%rip), %rax # 0x1db8a8 movq (%rax), %rax movq 0x1a8(%rax), %rax movq -0x50(%rbp), %rdi movl -0x54(%rbp), %esi callq *%rax movl -0x54(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
psi_prlock_rdlock: 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+1A0h] mov rcx, [rbp+var_8] mov rsi, [rcx+68h] mov rcx, [rbp+var_10] mov r8d, [rbp+var_14] lea rdi, [rbp+var_48] xor edx, edx call rax mov [rbp+var_50], rax mov rdi, [rbp+var_8] call rw_pr_rdlock mov [rbp+var_54], eax cmp [rbp+var_50], 0 jz short loc_2F42D lea rax, PSI_server mov rax, [rax] mov rax, [rax+1A8h] mov rdi, [rbp+var_50] mov esi, [rbp+var_54] call rax loc_2F42D: mov eax, [rbp+var_54] add rsp, 60h pop rbp retn
long long psi_prlock_rdlock(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, _QWORD, long long, _QWORD))PSI_server[0] + 52))( v6, *(_QWORD *)(a1 + 104), 0LL, a2, a3); v4 = rw_pr_rdlock(v9); if ( v5 ) (*((void ( **)(long long, _QWORD))PSI_server[0] + 53))(v5, v4); return v4; }
psi_prlock_rdlock: 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,[0x2db8a8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1a0] MOV RCX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RCX + 0x68] MOV RCX,qword ptr [RBP + -0x10] MOV R8D,dword ptr [RBP + -0x14] LEA RDI,[RBP + -0x48] XOR EDX,EDX CALL RAX MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x001321d0 MOV dword ptr [RBP + -0x54],EAX CMP qword ptr [RBP + -0x50],0x0 JZ 0x0012f42d LEA RAX,[0x2db8a8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1a8] MOV RDI,qword ptr [RBP + -0x50] MOV ESI,dword ptr [RBP + -0x54] CALL RAX LAB_0012f42d: MOV EAX,dword ptr [RBP + -0x54] ADD RSP,0x60 POP RBP RET
int4 psi_prlock_rdlock(long param_1,int8 param_2,int4 param_3) { int4 uVar1; long lVar2; int1 local_50 [52]; int4 local_1c; int8 local_18; long local_10; local_1c = param_3; local_18 = param_2; local_10 = param_1; lVar2 = (**(code **)(PSI_server + 0x1a0)) (local_50,*(int8 *)(param_1 + 0x68),0,param_2,param_3); uVar1 = rw_pr_rdlock(local_10); if (lVar2 != 0) { (**(code **)(PSI_server + 0x1a8))(lVar2,uVar1); } return uVar1; }
51,453
mbedtls_blowfish_crypt_cbc
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/blowfish.c
int mbedtls_blowfish_crypt_cbc(mbedtls_blowfish_context *ctx, int mode, size_t length, unsigned char iv[MBEDTLS_BLOWFISH_BLOCKSIZE], const unsigned char *input, unsigned char *output) { int i; unsigned char temp[MBEDTLS_BLOWFISH_BLOCKSIZE]; BLOWFISH_VALIDATE_RET(ctx != NULL); BLOWFISH_VALIDATE_RET(mode == MBEDTLS_BLOWFISH_ENCRYPT || mode == MBEDTLS_BLOWFISH_DECRYPT); BLOWFISH_VALIDATE_RET(iv != NULL); BLOWFISH_VALIDATE_RET(length == 0 || input != NULL); BLOWFISH_VALIDATE_RET(length == 0 || output != NULL); if (length % MBEDTLS_BLOWFISH_BLOCKSIZE) { return MBEDTLS_ERR_BLOWFISH_INVALID_INPUT_LENGTH; } if (mode == MBEDTLS_BLOWFISH_DECRYPT) { while (length > 0) { memcpy(temp, input, MBEDTLS_BLOWFISH_BLOCKSIZE); mbedtls_blowfish_crypt_ecb(ctx, mode, input, output); for (i = 0; i < MBEDTLS_BLOWFISH_BLOCKSIZE; i++) { output[i] = (unsigned char) (output[i] ^ iv[i]); } memcpy(iv, temp, MBEDTLS_BLOWFISH_BLOCKSIZE); input += MBEDTLS_BLOWFISH_BLOCKSIZE; output += MBEDTLS_BLOWFISH_BLOCKSIZE; length -= MBEDTLS_BLOWFISH_BLOCKSIZE; } } else { while (length > 0) { for (i = 0; i < MBEDTLS_BLOWFISH_BLOCKSIZE; i++) { output[i] = (unsigned char) (input[i] ^ iv[i]); } mbedtls_blowfish_crypt_ecb(ctx, mode, output, output); memcpy(iv, output, MBEDTLS_BLOWFISH_BLOCKSIZE); input += MBEDTLS_BLOWFISH_BLOCKSIZE; output += MBEDTLS_BLOWFISH_BLOCKSIZE; length -= MBEDTLS_BLOWFISH_BLOCKSIZE; } } return 0; }
O3
c
mbedtls_blowfish_crypt_cbc: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r12 movl $0xffffffe8, %eax # imm = 0xFFFFFFE8 testb $0x7, %r12b jne 0x9dc41 movq %r9, %rbx movq %r8, %r14 movq %rcx, %r15 movl %esi, %ebp movq %rdi, %r13 testl %esi, %esi je 0x9dc04 testq %r12, %r12 je 0x9dc3f xorl %eax, %eax movb (%r15,%rax), %cl xorb (%r14,%rax), %cl movb %cl, (%rbx,%rax) incq %rax cmpq $0x8, %rax jne 0x9dbca movq %r13, %rdi movl %ebp, %esi movq %rbx, %rdx movq %rbx, %rcx callq 0x9dabe movq (%rbx), %rax movq %rax, (%r15) addq $0x8, %r14 addq $0x8, %rbx addq $-0x8, %r12 jne 0x9dbc8 jmp 0x9dc3f testq %r12, %r12 je 0x9dc3f movq (%r14), %rbp movq %r13, %rdi xorl %esi, %esi movq %r14, %rdx movq %rbx, %rcx callq 0x9dabe xorl %eax, %eax movb (%r15,%rax), %cl xorb %cl, (%rbx,%rax) incq %rax cmpq $0x8, %rax jne 0x9dc1e movq %rbp, (%r15) addq $0x8, %r14 addq $0x8, %rbx addq $-0x8, %r12 jne 0x9dc09 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
mbedtls_blowfish_crypt_cbc: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r12, rdx mov eax, 0FFFFFFE8h test r12b, 7 jnz loc_9DC41 mov rbx, r9 mov r14, r8 mov r15, rcx mov ebp, esi mov r13, rdi test esi, esi jz short loc_9DC04 test r12, r12 jz short loc_9DC3F loc_9DBC8: xor eax, eax loc_9DBCA: mov cl, [r15+rax] xor cl, [r14+rax] mov [rbx+rax], cl inc rax cmp rax, 8 jnz short loc_9DBCA mov rdi, r13 mov esi, ebp mov rdx, rbx mov rcx, rbx call mbedtls_blowfish_crypt_ecb mov rax, [rbx] mov [r15], rax add r14, 8 add rbx, 8 add r12, 0FFFFFFFFFFFFFFF8h jnz short loc_9DBC8 jmp short loc_9DC3F loc_9DC04: test r12, r12 jz short loc_9DC3F loc_9DC09: mov rbp, [r14] mov rdi, r13 xor esi, esi mov rdx, r14 mov rcx, rbx call mbedtls_blowfish_crypt_ecb xor eax, eax loc_9DC1E: mov cl, [r15+rax] xor [rbx+rax], cl inc rax cmp rax, 8 jnz short loc_9DC1E mov [r15], rbp add r14, 8 add rbx, 8 add r12, 0FFFFFFFFFFFFFFF8h jnz short loc_9DC09 loc_9DC3F: xor eax, eax loc_9DC41: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mbedtls_blowfish_crypt_cbc( _DWORD *a1, int a2, long long a3, _QWORD *a4, unsigned int *a5, unsigned int *a6) { long long v6; // r12 long long result; // rax long long i; // rax long long v12; // rbp long long j; // rax v6 = a3; result = 4294967272LL; if ( (a3 & 7) == 0 ) { if ( a2 ) { if ( a3 ) { do { for ( i = 0LL; i != 8; ++i ) *((_BYTE *)a6 + i) = *((_BYTE *)a5 + i) ^ *((_BYTE *)a4 + i); mbedtls_blowfish_crypt_ecb(a1, a2, a6, a6); *a4 = *(_QWORD *)a6; a5 += 2; a6 += 2; v6 -= 8LL; } while ( v6 ); } } else if ( a3 ) { do { v12 = *(_QWORD *)a5; mbedtls_blowfish_crypt_ecb(a1, 0, a5, a6); for ( j = 0LL; j != 8; ++j ) *((_BYTE *)a6 + j) ^= *((_BYTE *)a4 + j); *a4 = v12; a5 += 2; a6 += 2; v6 -= 8LL; } while ( v6 ); } return 0LL; } return result; }
mbedtls_blowfish_crypt_cbc: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R12,RDX MOV EAX,0xffffffe8 TEST R12B,0x7 JNZ 0x0019dc41 MOV RBX,R9 MOV R14,R8 MOV R15,RCX MOV EBP,ESI MOV R13,RDI TEST ESI,ESI JZ 0x0019dc04 TEST R12,R12 JZ 0x0019dc3f LAB_0019dbc8: XOR EAX,EAX LAB_0019dbca: MOV CL,byte ptr [R15 + RAX*0x1] XOR CL,byte ptr [R14 + RAX*0x1] MOV byte ptr [RBX + RAX*0x1],CL INC RAX CMP RAX,0x8 JNZ 0x0019dbca MOV RDI,R13 MOV ESI,EBP MOV RDX,RBX MOV RCX,RBX CALL 0x0019dabe MOV RAX,qword ptr [RBX] MOV qword ptr [R15],RAX ADD R14,0x8 ADD RBX,0x8 ADD R12,-0x8 JNZ 0x0019dbc8 JMP 0x0019dc3f LAB_0019dc04: TEST R12,R12 JZ 0x0019dc3f LAB_0019dc09: MOV RBP,qword ptr [R14] MOV RDI,R13 XOR ESI,ESI MOV RDX,R14 MOV RCX,RBX CALL 0x0019dabe XOR EAX,EAX LAB_0019dc1e: MOV CL,byte ptr [R15 + RAX*0x1] XOR byte ptr [RBX + RAX*0x1],CL INC RAX CMP RAX,0x8 JNZ 0x0019dc1e MOV qword ptr [R15],RBP ADD R14,0x8 ADD RBX,0x8 ADD R12,-0x8 JNZ 0x0019dc09 LAB_0019dc3f: XOR EAX,EAX LAB_0019dc41: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 mbedtls_blowfish_crypt_cbc (int8 param_1,int param_2,ulong param_3,int8 *param_4,int8 *param_5, int8 *param_6) { int8 uVar1; long lVar2; uVar1 = 0xffffffe8; if ((param_3 & 7) == 0) { if (param_2 == 0) { if (param_3 != 0) { do { uVar1 = *param_5; mbedtls_blowfish_crypt_ecb(param_1,0,param_5,param_6); lVar2 = 0; do { *(byte *)((long)param_6 + lVar2) = *(byte *)((long)param_6 + lVar2) ^ *(byte *)((long)param_4 + lVar2); lVar2 = lVar2 + 1; } while (lVar2 != 8); *param_4 = uVar1; param_5 = param_5 + 1; param_6 = param_6 + 1; param_3 = param_3 - 8; } while (param_3 != 0); } } else if (param_3 != 0) { do { lVar2 = 0; do { *(byte *)((long)param_6 + lVar2) = *(byte *)((long)param_4 + lVar2) ^ *(byte *)((long)param_5 + lVar2); lVar2 = lVar2 + 1; } while (lVar2 != 8); mbedtls_blowfish_crypt_ecb(param_1,param_2,param_6,param_6); *param_4 = *param_6; param_5 = param_5 + 1; param_6 = param_6 + 1; param_3 = param_3 - 8; } while (param_3 != 0); } uVar1 = 0; } return uVar1; }
51,454
my_strntol_8bit
eloqsql/strings/ctype-simple.c
long my_strntol_8bit(CHARSET_INFO *cs, const char *nptr, size_t l, int base, char **endptr, int *err) { int negative; register uint32 cutoff; register uint cutlim; register uint32 i; register const char *s; register uchar c; const char *save, *e; int overflow; *err= 0; /* Initialize error indicator */ s = nptr; e = nptr+l; for ( ; s<e && my_isspace(cs, *s) ; s++); if (s == e) { goto noconv; } /* Check for a sign. */ if (*s == '-') { negative = 1; ++s; } else if (*s == '+') { negative = 0; ++s; } else negative = 0; save = s; cutoff = ((uint32)~0L) / (uint32) base; cutlim = (uint) (((uint32)~0L) % (uint32) base); overflow = 0; i = 0; for (c = *s; s != e; c = *++s) { if (c>='0' && c<='9') c -= '0'; else if (c>='A' && c<='Z') c = c - 'A' + 10; else if (c>='a' && c<='z') c = c - 'a' + 10; else break; if (c >= base) break; if (i > cutoff || (i == cutoff && c > cutlim)) overflow = 1; else { i *= (uint32) base; i += c; } } if (s == save) goto noconv; if (endptr != NULL) *endptr = (char *) s; if (negative) { if (i > (uint32) INT_MIN32) overflow = 1; } else if (i > INT_MAX32) overflow = 1; if (overflow) { err[0]= ERANGE; return negative ? INT_MIN32 : INT_MAX32; } return (negative ? -((long) i) : (long) i); noconv: err[0]= EDOM; if (endptr != NULL) *endptr = (char *) nptr; return 0L; }
O0
c
my_strntol_8bit: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) movq -0x38(%rbp), %rax movl $0x0, (%rax) movq -0x18(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x18(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x50(%rbp), %rcx xorl %eax, %eax cmpq -0x68(%rbp), %rcx movb %al, -0x6d(%rbp) jae 0x4a118 movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq -0x50(%rbp), %rcx movzbl (%rcx), %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x8, %eax cmpl $0x0, %eax setne %al movb %al, -0x6d(%rbp) movb -0x6d(%rbp), %al testb $0x1, %al jne 0x4a121 jmp 0x4a131 jmp 0x4a123 movq -0x50(%rbp), %rax addq $0x1, %rax movq %rax, -0x50(%rbp) jmp 0x4a0e9 movq -0x50(%rbp), %rax cmpq -0x68(%rbp), %rax jne 0x4a140 jmp 0x4a335 movq -0x50(%rbp), %rax movsbl (%rax), %eax cmpl $0x2d, %eax jne 0x4a161 movl $0x1, -0x3c(%rbp) movq -0x50(%rbp), %rax addq $0x1, %rax movq %rax, -0x50(%rbp) jmp 0x4a18b movq -0x50(%rbp), %rax movsbl (%rax), %eax cmpl $0x2b, %eax jne 0x4a182 movl $0x0, -0x3c(%rbp) movq -0x50(%rbp), %rax addq $0x1, %rax movq %rax, -0x50(%rbp) jmp 0x4a189 movl $0x0, -0x3c(%rbp) jmp 0x4a18b movq -0x50(%rbp), %rax movq %rax, -0x60(%rbp) movl $0xffffffff, %eax # imm = 0xFFFFFFFF xorl %edx, %edx divl -0x24(%rbp) movl %eax, -0x40(%rbp) movl $0xffffffff, %eax # imm = 0xFFFFFFFF xorl %edx, %edx divl -0x24(%rbp) movl %edx, -0x44(%rbp) movl $0x0, -0x6c(%rbp) movl $0x0, -0x48(%rbp) movq -0x50(%rbp), %rax movb (%rax), %al movb %al, -0x51(%rbp) movq -0x50(%rbp), %rax cmpq -0x68(%rbp), %rax je 0x4a295 movzbl -0x51(%rbp), %eax cmpl $0x30, %eax jl 0x4a1f0 movzbl -0x51(%rbp), %eax cmpl $0x39, %eax jg 0x4a1f0 movzbl -0x51(%rbp), %eax subl $0x30, %eax movb %al, -0x51(%rbp) jmp 0x4a238 movzbl -0x51(%rbp), %eax cmpl $0x41, %eax jl 0x4a211 movzbl -0x51(%rbp), %eax cmpl $0x5a, %eax jg 0x4a211 movzbl -0x51(%rbp), %eax subl $0x41, %eax addl $0xa, %eax movb %al, -0x51(%rbp) jmp 0x4a236 movzbl -0x51(%rbp), %eax cmpl $0x61, %eax jl 0x4a232 movzbl -0x51(%rbp), %eax cmpl $0x7a, %eax jg 0x4a232 movzbl -0x51(%rbp), %eax subl $0x61, %eax addl $0xa, %eax movb %al, -0x51(%rbp) jmp 0x4a234 jmp 0x4a295 jmp 0x4a236 jmp 0x4a238 movzbl -0x51(%rbp), %eax cmpl -0x24(%rbp), %eax jl 0x4a243 jmp 0x4a295 movl -0x48(%rbp), %eax cmpl -0x40(%rbp), %eax ja 0x4a25c movl -0x48(%rbp), %eax cmpl -0x40(%rbp), %eax jne 0x4a265 movzbl -0x51(%rbp), %eax cmpl -0x44(%rbp), %eax jbe 0x4a265 movl $0x1, -0x6c(%rbp) jmp 0x4a279 movl -0x24(%rbp), %eax imull -0x48(%rbp), %eax movl %eax, -0x48(%rbp) movzbl -0x51(%rbp), %eax addl -0x48(%rbp), %eax movl %eax, -0x48(%rbp) jmp 0x4a27b movq -0x50(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x50(%rbp) movb 0x1(%rax), %al movb %al, -0x51(%rbp) jmp 0x4a1c4 movq -0x50(%rbp), %rax cmpq -0x60(%rbp), %rax jne 0x4a2a4 jmp 0x4a335 cmpq $0x0, -0x30(%rbp) je 0x4a2b6 movq -0x50(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) cmpl $0x0, -0x3c(%rbp) je 0x4a2ce cmpl $0x80000000, -0x48(%rbp) # imm = 0x80000000 jbe 0x4a2cc movl $0x1, -0x6c(%rbp) jmp 0x4a2e2 movl -0x48(%rbp), %eax cmpq $0x7fffffff, %rax # imm = 0x7FFFFFFF jle 0x4a2e0 movl $0x1, -0x6c(%rbp) jmp 0x4a2e2 cmpl $0x0, -0x6c(%rbp) je 0x4a30e movq -0x38(%rbp), %rax movl $0x22, (%rax) movl -0x3c(%rbp), %edx movl $0x7fffffff, %eax # imm = 0x7FFFFFFF movq $-0x80000000, %rcx # imm = 0x80000000 cmpl $0x0, %edx cmovneq %rcx, %rax movq %rax, -0x8(%rbp) jmp 0x4a359 cmpl $0x0, -0x3c(%rbp) je 0x4a324 movl -0x48(%rbp), %eax movl %eax, %ecx xorl %eax, %eax subq %rcx, %rax movq %rax, -0x78(%rbp) jmp 0x4a32b movl -0x48(%rbp), %eax movq %rax, -0x78(%rbp) movq -0x78(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x4a359 movq -0x38(%rbp), %rax movl $0x21, (%rax) cmpq $0x0, -0x30(%rbp) je 0x4a351 movq -0x18(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq nop
my_strntol_8bit: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov [rbp+var_30], r8 mov [rbp+var_38], r9 mov rax, [rbp+var_38] mov dword ptr [rax], 0 mov rax, [rbp+var_18] mov [rbp+var_50], rax mov rax, [rbp+var_18] add rax, [rbp+var_20] mov [rbp+var_68], rax loc_4A0E9: mov rcx, [rbp+var_50] xor eax, eax cmp rcx, [rbp+var_68] mov [rbp+var_6D], al jnb short loc_4A118 mov rax, [rbp+var_10] mov rax, [rax+40h] mov rcx, [rbp+var_50] movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx+1] and eax, 8 cmp eax, 0 setnz al mov [rbp+var_6D], al loc_4A118: mov al, [rbp+var_6D] test al, 1 jnz short loc_4A121 jmp short loc_4A131 loc_4A121: jmp short $+2 loc_4A123: mov rax, [rbp+var_50] add rax, 1 mov [rbp+var_50], rax jmp short loc_4A0E9 loc_4A131: mov rax, [rbp+var_50] cmp rax, [rbp+var_68] jnz short loc_4A140 jmp loc_4A335 loc_4A140: mov rax, [rbp+var_50] movsx eax, byte ptr [rax] cmp eax, 2Dh ; '-' jnz short loc_4A161 mov [rbp+var_3C], 1 mov rax, [rbp+var_50] add rax, 1 mov [rbp+var_50], rax jmp short loc_4A18B loc_4A161: mov rax, [rbp+var_50] movsx eax, byte ptr [rax] cmp eax, 2Bh ; '+' jnz short loc_4A182 mov [rbp+var_3C], 0 mov rax, [rbp+var_50] add rax, 1 mov [rbp+var_50], rax jmp short loc_4A189 loc_4A182: mov [rbp+var_3C], 0 loc_4A189: jmp short $+2 loc_4A18B: mov rax, [rbp+var_50] mov [rbp+var_60], rax mov eax, 0FFFFFFFFh xor edx, edx div [rbp+var_24] mov [rbp+var_40], eax mov eax, 0FFFFFFFFh xor edx, edx div [rbp+var_24] mov [rbp+var_44], edx mov [rbp+var_6C], 0 mov [rbp+var_48], 0 mov rax, [rbp+var_50] mov al, [rax] mov [rbp+var_51], al loc_4A1C4: mov rax, [rbp+var_50] cmp rax, [rbp+var_68] jz loc_4A295 movzx eax, [rbp+var_51] cmp eax, 30h ; '0' jl short loc_4A1F0 movzx eax, [rbp+var_51] cmp eax, 39h ; '9' jg short loc_4A1F0 movzx eax, [rbp+var_51] sub eax, 30h ; '0' mov [rbp+var_51], al jmp short loc_4A238 loc_4A1F0: movzx eax, [rbp+var_51] cmp eax, 41h ; 'A' jl short loc_4A211 movzx eax, [rbp+var_51] cmp eax, 5Ah ; 'Z' jg short loc_4A211 movzx eax, [rbp+var_51] sub eax, 41h ; 'A' add eax, 0Ah mov [rbp+var_51], al jmp short loc_4A236 loc_4A211: movzx eax, [rbp+var_51] cmp eax, 61h ; 'a' jl short loc_4A232 movzx eax, [rbp+var_51] cmp eax, 7Ah ; 'z' jg short loc_4A232 movzx eax, [rbp+var_51] sub eax, 61h ; 'a' add eax, 0Ah mov [rbp+var_51], al jmp short loc_4A234 loc_4A232: jmp short loc_4A295 loc_4A234: jmp short $+2 loc_4A236: jmp short $+2 loc_4A238: movzx eax, [rbp+var_51] cmp eax, [rbp+var_24] jl short loc_4A243 jmp short loc_4A295 loc_4A243: mov eax, [rbp+var_48] cmp eax, [rbp+var_40] ja short loc_4A25C mov eax, [rbp+var_48] cmp eax, [rbp+var_40] jnz short loc_4A265 movzx eax, [rbp+var_51] cmp eax, [rbp+var_44] jbe short loc_4A265 loc_4A25C: mov [rbp+var_6C], 1 jmp short loc_4A279 loc_4A265: mov eax, [rbp+var_24] imul eax, [rbp+var_48] mov [rbp+var_48], eax movzx eax, [rbp+var_51] add eax, [rbp+var_48] mov [rbp+var_48], eax loc_4A279: jmp short $+2 loc_4A27B: mov rax, [rbp+var_50] mov rcx, rax add rcx, 1 mov [rbp+var_50], rcx mov al, [rax+1] mov [rbp+var_51], al jmp loc_4A1C4 loc_4A295: mov rax, [rbp+var_50] cmp rax, [rbp+var_60] jnz short loc_4A2A4 jmp loc_4A335 loc_4A2A4: cmp [rbp+var_30], 0 jz short loc_4A2B6 mov rcx, [rbp+var_50] mov rax, [rbp+var_30] mov [rax], rcx loc_4A2B6: cmp [rbp+var_3C], 0 jz short loc_4A2CE cmp [rbp+var_48], 80000000h jbe short loc_4A2CC mov [rbp+var_6C], 1 loc_4A2CC: jmp short loc_4A2E2 loc_4A2CE: mov eax, [rbp+var_48] cmp rax, 7FFFFFFFh jle short loc_4A2E0 mov [rbp+var_6C], 1 loc_4A2E0: jmp short $+2 loc_4A2E2: cmp [rbp+var_6C], 0 jz short loc_4A30E mov rax, [rbp+var_38] mov dword ptr [rax], 22h ; '"' mov edx, [rbp+var_3C] mov eax, 7FFFFFFFh mov rcx, 0FFFFFFFF80000000h cmp edx, 0 cmovnz rax, rcx mov [rbp+var_8], rax jmp short loc_4A359 loc_4A30E: cmp [rbp+var_3C], 0 jz short loc_4A324 mov eax, [rbp+var_48] mov ecx, eax xor eax, eax sub rax, rcx mov [rbp+var_78], rax jmp short loc_4A32B loc_4A324: mov eax, [rbp+var_48] mov [rbp+var_78], rax loc_4A32B: mov rax, [rbp+var_78] mov [rbp+var_8], rax jmp short loc_4A359 loc_4A335: mov rax, [rbp+var_38] mov dword ptr [rax], 21h ; '!' cmp [rbp+var_30], 0 jz short loc_4A351 mov rcx, [rbp+var_18] mov rax, [rbp+var_30] mov [rax], rcx loc_4A351: mov [rbp+var_8], 0 loc_4A359: mov rax, [rbp+var_8] pop rbp retn
long long my_strntol_8bit(long long a1, _BYTE *a2, long long a3, int a4, _QWORD *a5, _DWORD *a6) { _BYTE *v6; // rax long long v7; // rax bool v10; // [rsp+Bh] [rbp-6Dh] int v11; // [rsp+Ch] [rbp-6Ch] _BYTE *v12; // [rsp+10h] [rbp-68h] _BYTE *v13; // [rsp+18h] [rbp-60h] unsigned __int8 v14; // [rsp+27h] [rbp-51h] unsigned __int8 v15; // [rsp+27h] [rbp-51h] _BYTE *v16; // [rsp+28h] [rbp-50h] unsigned int v17; // [rsp+30h] [rbp-48h] unsigned long long v18; // [rsp+34h] [rbp-44h] int v19; // [rsp+3Ch] [rbp-3Ch] *a6 = 0; v16 = a2; v12 = &a2[a3]; while ( 1 ) { v10 = 0; if ( v16 < v12 ) v10 = (*(_BYTE *)(*(_QWORD *)(a1 + 64) + (unsigned __int8)*v16 + 1LL) & 8) != 0; if ( !v10 ) break; ++v16; } if ( v16 == v12 ) goto LABEL_45; if ( *v16 == 45 ) { v19 = 1; ++v16; } else { v19 = 0; if ( *v16 == 43 ) ++v16; } v13 = v16; v11 = 0; v17 = 0; v14 = *v16; while ( v16 != v12 ) { if ( v14 < 0x30u || v14 > 0x39u ) { if ( v14 < 0x41u || v14 > 0x5Au ) { if ( v14 < 0x61u || v14 > 0x7Au ) break; v15 = v14 - 97 + 10; } else { v15 = v14 - 65 + 10; } } else { v15 = v14 - 48; } if ( v15 >= a4 ) break; LODWORD(v18) = 0xFFFFFFFF % a4; HIDWORD(v18) = 0xFFFFFFFF / a4; if ( __PAIR64__(v17, v15) <= v18 ) v17 = v17 * a4 + v15; else v11 = 1; v6 = v16++; v14 = v6[1]; } if ( v16 == v13 ) { LABEL_45: *a6 = 33; if ( a5 ) *a5 = a2; return 0LL; } else { if ( a5 ) *a5 = v16; if ( v19 ) { if ( v17 > 0x80000000 ) v11 = 1; } else if ( v17 > 0x7FFFFFFFuLL ) { v11 = 1; } if ( v11 ) { *a6 = 34; v7 = 0x7FFFFFFFLL; if ( v19 ) return 0xFFFFFFFF80000000LL; return v7; } else if ( v19 ) { return -(long long)v17; } else { return v17; } } }
my_strntol_8bit: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],R9 MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x68],RAX LAB_0014a0e9: MOV RCX,qword ptr [RBP + -0x50] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x68] MOV byte ptr [RBP + -0x6d],AL JNC 0x0014a118 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x50] MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x8 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x6d],AL LAB_0014a118: MOV AL,byte ptr [RBP + -0x6d] TEST AL,0x1 JNZ 0x0014a121 JMP 0x0014a131 LAB_0014a121: JMP 0x0014a123 LAB_0014a123: MOV RAX,qword ptr [RBP + -0x50] ADD RAX,0x1 MOV qword ptr [RBP + -0x50],RAX JMP 0x0014a0e9 LAB_0014a131: MOV RAX,qword ptr [RBP + -0x50] CMP RAX,qword ptr [RBP + -0x68] JNZ 0x0014a140 JMP 0x0014a335 LAB_0014a140: MOV RAX,qword ptr [RBP + -0x50] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2d JNZ 0x0014a161 MOV dword ptr [RBP + -0x3c],0x1 MOV RAX,qword ptr [RBP + -0x50] ADD RAX,0x1 MOV qword ptr [RBP + -0x50],RAX JMP 0x0014a18b LAB_0014a161: MOV RAX,qword ptr [RBP + -0x50] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2b JNZ 0x0014a182 MOV dword ptr [RBP + -0x3c],0x0 MOV RAX,qword ptr [RBP + -0x50] ADD RAX,0x1 MOV qword ptr [RBP + -0x50],RAX JMP 0x0014a189 LAB_0014a182: MOV dword ptr [RBP + -0x3c],0x0 LAB_0014a189: JMP 0x0014a18b LAB_0014a18b: MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x60],RAX MOV EAX,0xffffffff XOR EDX,EDX DIV dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x40],EAX MOV EAX,0xffffffff XOR EDX,EDX DIV dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x44],EDX MOV dword ptr [RBP + -0x6c],0x0 MOV dword ptr [RBP + -0x48],0x0 MOV RAX,qword ptr [RBP + -0x50] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x51],AL LAB_0014a1c4: MOV RAX,qword ptr [RBP + -0x50] CMP RAX,qword ptr [RBP + -0x68] JZ 0x0014a295 MOVZX EAX,byte ptr [RBP + -0x51] CMP EAX,0x30 JL 0x0014a1f0 MOVZX EAX,byte ptr [RBP + -0x51] CMP EAX,0x39 JG 0x0014a1f0 MOVZX EAX,byte ptr [RBP + -0x51] SUB EAX,0x30 MOV byte ptr [RBP + -0x51],AL JMP 0x0014a238 LAB_0014a1f0: MOVZX EAX,byte ptr [RBP + -0x51] CMP EAX,0x41 JL 0x0014a211 MOVZX EAX,byte ptr [RBP + -0x51] CMP EAX,0x5a JG 0x0014a211 MOVZX EAX,byte ptr [RBP + -0x51] SUB EAX,0x41 ADD EAX,0xa MOV byte ptr [RBP + -0x51],AL JMP 0x0014a236 LAB_0014a211: MOVZX EAX,byte ptr [RBP + -0x51] CMP EAX,0x61 JL 0x0014a232 MOVZX EAX,byte ptr [RBP + -0x51] CMP EAX,0x7a JG 0x0014a232 MOVZX EAX,byte ptr [RBP + -0x51] SUB EAX,0x61 ADD EAX,0xa MOV byte ptr [RBP + -0x51],AL JMP 0x0014a234 LAB_0014a232: JMP 0x0014a295 LAB_0014a234: JMP 0x0014a236 LAB_0014a236: JMP 0x0014a238 LAB_0014a238: MOVZX EAX,byte ptr [RBP + -0x51] CMP EAX,dword ptr [RBP + -0x24] JL 0x0014a243 JMP 0x0014a295 LAB_0014a243: MOV EAX,dword ptr [RBP + -0x48] CMP EAX,dword ptr [RBP + -0x40] JA 0x0014a25c MOV EAX,dword ptr [RBP + -0x48] CMP EAX,dword ptr [RBP + -0x40] JNZ 0x0014a265 MOVZX EAX,byte ptr [RBP + -0x51] CMP EAX,dword ptr [RBP + -0x44] JBE 0x0014a265 LAB_0014a25c: MOV dword ptr [RBP + -0x6c],0x1 JMP 0x0014a279 LAB_0014a265: MOV EAX,dword ptr [RBP + -0x24] IMUL EAX,dword ptr [RBP + -0x48] MOV dword ptr [RBP + -0x48],EAX MOVZX EAX,byte ptr [RBP + -0x51] ADD EAX,dword ptr [RBP + -0x48] MOV dword ptr [RBP + -0x48],EAX LAB_0014a279: JMP 0x0014a27b LAB_0014a27b: MOV RAX,qword ptr [RBP + -0x50] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x50],RCX MOV AL,byte ptr [RAX + 0x1] MOV byte ptr [RBP + -0x51],AL JMP 0x0014a1c4 LAB_0014a295: MOV RAX,qword ptr [RBP + -0x50] CMP RAX,qword ptr [RBP + -0x60] JNZ 0x0014a2a4 JMP 0x0014a335 LAB_0014a2a4: CMP qword ptr [RBP + -0x30],0x0 JZ 0x0014a2b6 MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX LAB_0014a2b6: CMP dword ptr [RBP + -0x3c],0x0 JZ 0x0014a2ce CMP dword ptr [RBP + -0x48],0x80000000 JBE 0x0014a2cc MOV dword ptr [RBP + -0x6c],0x1 LAB_0014a2cc: JMP 0x0014a2e2 LAB_0014a2ce: MOV EAX,dword ptr [RBP + -0x48] CMP RAX,0x7fffffff JLE 0x0014a2e0 MOV dword ptr [RBP + -0x6c],0x1 LAB_0014a2e0: JMP 0x0014a2e2 LAB_0014a2e2: CMP dword ptr [RBP + -0x6c],0x0 JZ 0x0014a30e MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x22 MOV EDX,dword ptr [RBP + -0x3c] MOV EAX,0x7fffffff MOV RCX,-0x80000000 CMP EDX,0x0 CMOVNZ RAX,RCX MOV qword ptr [RBP + -0x8],RAX JMP 0x0014a359 LAB_0014a30e: CMP dword ptr [RBP + -0x3c],0x0 JZ 0x0014a324 MOV EAX,dword ptr [RBP + -0x48] MOV ECX,EAX XOR EAX,EAX SUB RAX,RCX MOV qword ptr [RBP + -0x78],RAX JMP 0x0014a32b LAB_0014a324: MOV EAX,dword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x78],RAX LAB_0014a32b: MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x8],RAX JMP 0x0014a359 LAB_0014a335: MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x21 CMP qword ptr [RBP + -0x30],0x0 JZ 0x0014a351 MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX LAB_0014a351: MOV qword ptr [RBP + -0x8],0x0 LAB_0014a359: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
ulong my_strntol_8bit(long param_1,byte *param_2,long param_3,uint param_4,int8 *param_5, int4 *param_6) { bool bVar1; byte *pbVar2; uint uVar3; byte *pbVar4; bool bVar5; ulong local_80; byte local_59; byte *local_58; uint local_50; *param_6 = 0; pbVar4 = param_2 + param_3; local_58 = param_2; while( true ) { bVar5 = false; if (local_58 < pbVar4) { bVar5 = (*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*local_58) & 8) != 0; } if (!bVar5) break; local_58 = local_58 + 1; } if (local_58 != pbVar4) { if (*local_58 == 0x2d) { bVar5 = true; local_58 = local_58 + 1; } else { if (*local_58 == 0x2b) { local_58 = local_58 + 1; } bVar5 = false; } pbVar2 = local_58; uVar3 = (uint)(0xffffffff / (ulong)param_4); bVar1 = false; local_50 = 0; local_59 = *local_58; for (; local_58 != pbVar4; local_58 = local_58 + 1) { if ((local_59 < 0x30) || (0x39 < local_59)) { if ((local_59 < 0x41) || (0x5a < local_59)) { if ((local_59 < 0x61) || (0x7a < local_59)) break; local_59 = local_59 + 0xa9; } else { local_59 = local_59 - 0x37; } } else { local_59 = local_59 - 0x30; } if ((int)param_4 <= (int)(uint)local_59) break; if ((uVar3 < local_50) || ((local_50 == uVar3 && ((uint)(0xffffffff % (ulong)param_4) < (uint)local_59)))) { bVar1 = true; } else { local_50 = (uint)local_59 + param_4 * local_50; } local_59 = local_58[1]; } if (local_58 != pbVar2) { if (param_5 != (int8 *)0x0) { *param_5 = local_58; } if (bVar5) { if (0x80000000 < local_50) { bVar1 = true; } } else if (0x7fffffff < local_50) { bVar1 = true; } if (bVar1) { *param_6 = 0x22; if (!bVar5) { return 0x7fffffff; } return 0xffffffff80000000; } if (bVar5) { local_80 = -(ulong)local_50; } else { local_80 = (ulong)local_50; } return local_80; } } *param_6 = 0x21; if (param_5 != (int8 *)0x0) { *param_5 = param_2; } return 0; }
51,455
ma_fetch_keypage
eloqsql/storage/maria/ma_page.c
my_bool _ma_fetch_keypage(MARIA_PAGE *page, MARIA_HA *info, const MARIA_KEYDEF *keyinfo, my_off_t pos, enum pagecache_page_lock lock, int level, uchar *buff, my_bool return_buffer __attribute__ ((unused))) { uchar *tmp; MARIA_PINNED_PAGE page_link; MARIA_SHARE *share= info->s; uint block_size= share->block_size; DBUG_ENTER("_ma_fetch_keypage"); DBUG_PRINT("enter",("page: %lu", (ulong) (pos / block_size))); tmp= pagecache_read(share->pagecache, &share->kfile, (pgcache_page_no_t) (pos / block_size), level, buff, share->page_type, lock, &page_link.link); if (lock != PAGECACHE_LOCK_LEFT_UNLOCKED) { DBUG_ASSERT(lock == PAGECACHE_LOCK_WRITE || lock == PAGECACHE_LOCK_READ); page_link.unlock= (lock == PAGECACHE_LOCK_WRITE ? PAGECACHE_LOCK_WRITE_UNLOCK : PAGECACHE_LOCK_READ_UNLOCK); page_link.changed= 0; push_dynamic(&info->pinned_pages, (void*) &page_link); page->link_offset= info->pinned_pages.elements-1; } if (tmp == info->buff) info->keyread_buff_used=1; else if (!tmp) { DBUG_PRINT("error",("Got errno: %d from pagecache_read",my_errno)); info->last_keypage=HA_OFFSET_ERROR; _ma_set_fatal_error(info, my_errno); DBUG_RETURN(1); } info->last_keypage= pos; /* Setup page structure to make pages easy to use This is same as page_fill_info, but here inlined as this si used so often. */ page->info= info; page->keyinfo= keyinfo; page->buff= tmp; page->pos= pos; page->size= _ma_get_page_used(share, tmp); page->org_size= page->size; /* For debugging */ page->flag= _ma_get_keypage_flag(share, tmp); page->node= ((page->flag & KEYPAGE_FLAG_ISNOD) ? share->base.key_reflength : 0); #ifdef EXTRA_DEBUG { uint page_size= page->size; if (page_size < 4 || page_size > share->max_index_block_size || _ma_get_keynr(share, tmp) != keyinfo->key_nr) { DBUG_PRINT("error",("page %lu had wrong page length: %u page_header: %u keynr: %u", (ulong) (pos / block_size), page_size, share->keypage_header, _ma_get_keynr(share, tmp))); DBUG_DUMP("page", tmp, page_size); info->last_keypage = HA_OFFSET_ERROR; _ma_set_fatal_error(info, HA_ERR_CRASHED); DBUG_RETURN(1); } } #endif DBUG_RETURN(0); }
O0
c
ma_fetch_keypage: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movb 0x18(%rbp), %al movq 0x10(%rbp), %rax movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movl %r8d, -0x2c(%rbp) movl %r9d, -0x30(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax movl 0x7bc(%rax), %eax movl %eax, -0x5c(%rbp) jmp 0x3e0c4 movq -0x58(%rbp), %rax movq 0x600(%rax), %rdi movq -0x58(%rbp), %rsi addq $0x750, %rsi # imm = 0x750 movq -0x28(%rbp), %rax movl -0x5c(%rbp), %ecx xorl %edx, %edx divq %rcx movq %rax, %rdx movl -0x30(%rbp), %ecx movq 0x10(%rbp), %r8 movq -0x58(%rbp), %rax movl 0x7d4(%rax), %r9d movl -0x2c(%rbp), %r10d leaq -0x50(%rbp), %rax movl %r10d, (%rsp) movq %rax, 0x8(%rsp) callq 0x96df0 movq %rax, -0x38(%rbp) cmpl $0x0, -0x2c(%rbp) je 0x3e161 jmp 0x3e11d jmp 0x3e11f movl -0x2c(%rbp), %edx movl $0x5, %eax movl $0x6, %ecx cmpl $0x4, %edx cmovel %ecx, %eax movl %eax, -0x48(%rbp) movb $0x0, -0x40(%rbp) movq -0x18(%rbp), %rdi addq $0x2e8, %rdi # imm = 0x2E8 leaq -0x50(%rbp), %rsi callq 0xdd8b0 movq -0x18(%rbp), %rax movl 0x2f0(%rax), %ecx subl $0x1, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x30(%rax) movq -0x38(%rbp), %rax movq -0x18(%rbp), %rcx cmpq 0x378(%rcx), %rax jne 0x3e17f movq -0x18(%rbp), %rax movb $0x1, 0x685(%rax) jmp 0x3e1bc cmpq $0x0, -0x38(%rbp) jne 0x3e1ba jmp 0x3e188 jmp 0x3e18a movq -0x18(%rbp), %rax movq $-0x1, 0x440(%rax) movq -0x18(%rbp), %rax movq %rax, -0x68(%rbp) callq 0xfc990 movq -0x68(%rbp), %rdi movl (%rax), %esi callq 0x37c10 movb $0x1, -0x1(%rbp) jmp 0x3e297 jmp 0x3e1bc movq -0x28(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x440(%rax) movq -0x18(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x38(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x28(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x38(%rbp), %rax movq -0x58(%rbp), %rcx movl 0x744(%rcx), %ecx movzbl -0x1(%rax,%rcx), %eax movzwl %ax, %eax movq -0x38(%rbp), %rcx movq -0x58(%rbp), %rdx movl 0x744(%rdx), %edx movzbl -0x2(%rcx,%rdx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x20(%rax) movq -0x10(%rbp), %rax movl 0x20(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x24(%rax) movq -0x38(%rbp), %rax movq -0x58(%rbp), %rcx movl 0x744(%rcx), %ecx subl $0x2, %ecx subl $0x1, %ecx movl %ecx, %ecx movzbl (%rax,%rcx), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x2c(%rax) movq -0x10(%rbp), %rax movl 0x2c(%rax), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x3e282 movq -0x58(%rbp), %rax movl 0x3e4(%rax), %eax movl %eax, -0x6c(%rbp) jmp 0x3e289 xorl %eax, %eax movl %eax, -0x6c(%rbp) jmp 0x3e289 movl -0x6c(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x28(%rax) movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x80, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_fetch_keypage: push rbp mov rbp, rsp sub rsp, 80h mov al, [rbp+arg_8] mov rax, [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_2C], r8d mov [rbp+var_30], r9d mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_58], rax mov rax, [rbp+var_58] mov eax, [rax+7BCh] mov [rbp+var_5C], eax jmp short $+2 loc_3E0C4: mov rax, [rbp+var_58] mov rdi, [rax+600h] mov rsi, [rbp+var_58] add rsi, 750h mov rax, [rbp+var_28] mov ecx, [rbp+var_5C] xor edx, edx div rcx mov rdx, rax mov ecx, [rbp+var_30] mov r8, [rbp+arg_0] mov rax, [rbp+var_58] mov r9d, [rax+7D4h] mov r10d, [rbp+var_2C] lea rax, [rbp+var_50] mov [rsp+80h+var_80], r10d mov [rsp+80h+var_78], rax call pagecache_read mov [rbp+var_38], rax cmp [rbp+var_2C], 0 jz short loc_3E161 jmp short $+2 loc_3E11D: jmp short $+2 loc_3E11F: mov edx, [rbp+var_2C] mov eax, 5 mov ecx, 6 cmp edx, 4 cmovz eax, ecx mov [rbp+var_48], eax mov [rbp+var_40], 0 mov rdi, [rbp+var_18] add rdi, 2E8h lea rsi, [rbp+var_50] call insert_dynamic mov rax, [rbp+var_18] mov ecx, [rax+2F0h] sub ecx, 1 mov rax, [rbp+var_10] mov [rax+30h], ecx loc_3E161: mov rax, [rbp+var_38] mov rcx, [rbp+var_18] cmp rax, [rcx+378h] jnz short loc_3E17F mov rax, [rbp+var_18] mov byte ptr [rax+685h], 1 jmp short loc_3E1BC loc_3E17F: cmp [rbp+var_38], 0 jnz short loc_3E1BA jmp short $+2 loc_3E188: jmp short $+2 loc_3E18A: mov rax, [rbp+var_18] mov qword ptr [rax+440h], 0FFFFFFFFFFFFFFFFh mov rax, [rbp+var_18] mov [rbp+var_68], rax call _my_thread_var mov rdi, [rbp+var_68] mov esi, [rax] call _ma_set_fatal_error mov [rbp+var_1], 1 jmp loc_3E297 loc_3E1BA: jmp short $+2 loc_3E1BC: mov rcx, [rbp+var_28] mov rax, [rbp+var_18] mov [rax+440h], rcx mov rcx, [rbp+var_18] mov rax, [rbp+var_10] mov [rax], rcx mov rcx, [rbp+var_20] mov rax, [rbp+var_10] mov [rax+8], rcx mov rcx, [rbp+var_38] mov rax, [rbp+var_10] mov [rax+10h], rcx mov rcx, [rbp+var_28] mov rax, [rbp+var_10] mov [rax+18h], rcx mov rax, [rbp+var_38] mov rcx, [rbp+var_58] mov ecx, [rcx+744h] movzx eax, byte ptr [rax+rcx-1] movzx eax, ax mov rcx, [rbp+var_38] mov rdx, [rbp+var_58] mov edx, [rdx+744h] movzx ecx, byte ptr [rcx+rdx-2] movzx ecx, cx shl ecx, 8 or eax, ecx movzx ecx, ax mov rax, [rbp+var_10] mov [rax+20h], ecx mov rax, [rbp+var_10] mov ecx, [rax+20h] mov rax, [rbp+var_10] mov [rax+24h], ecx mov rax, [rbp+var_38] mov rcx, [rbp+var_58] mov ecx, [rcx+744h] sub ecx, 2 sub ecx, 1 mov ecx, ecx movzx ecx, byte ptr [rax+rcx] mov rax, [rbp+var_10] mov [rax+2Ch], ecx mov rax, [rbp+var_10] mov eax, [rax+2Ch] and eax, 1 cmp eax, 0 jz short loc_3E282 mov rax, [rbp+var_58] mov eax, [rax+3E4h] mov [rbp+var_6C], eax jmp short loc_3E289 loc_3E282: xor eax, eax mov [rbp+var_6C], eax jmp short $+2 loc_3E289: mov ecx, [rbp+var_6C] mov rax, [rbp+var_10] mov [rax+28h], ecx mov [rbp+var_1], 0 loc_3E297: mov al, [rbp+var_1] add rsp, 80h pop rbp retn
char ma_fetch_keypage(long long a1, long long a2, long long a3, unsigned long long a4, int a5, int a6, long long a7) { long long v7; // rdi const char *v8; // rsi int v9; // eax unsigned int *v10; // rax long long v11; // rdx long long v12; // rcx long long v13; // r8 int v14; // r9d int v16; // [rsp+14h] [rbp-6Ch] _DWORD *v17; // [rsp+18h] [rbp-68h] unsigned int v18; // [rsp+24h] [rbp-5Ch] _DWORD *v19; // [rsp+28h] [rbp-58h] _BYTE v20[8]; // [rsp+30h] [rbp-50h] BYREF int v21; // [rsp+38h] [rbp-48h] char v22; // [rsp+40h] [rbp-40h] long long v23; // [rsp+48h] [rbp-38h] int v24; // [rsp+50h] [rbp-30h] int v25; // [rsp+54h] [rbp-2Ch] unsigned long long v26; // [rsp+58h] [rbp-28h] long long v27; // [rsp+60h] [rbp-20h] long long v28; // [rsp+68h] [rbp-18h] long long v29; // [rsp+70h] [rbp-10h] v29 = a1; v28 = a2; v27 = a3; v26 = a4; v25 = a5; v24 = a6; v19 = *(_DWORD **)a2; v18 = *(_DWORD *)(*(_QWORD *)a2 + 1980LL); v7 = *(_QWORD *)(*(_QWORD *)a2 + 1536LL); v8 = (const char *)(*(_QWORD *)a2 + 1872LL); v23 = pagecache_read(v7, (int)v19 + 1872, a4 / v18, a6, a7, v19[501], a5, (long long)v20); if ( v25 ) { v9 = 5; if ( v25 == 4 ) v9 = 6; v21 = v9; v22 = 0; v7 = v28 + 744; v8 = v20; insert_dynamic(v28 + 744, v20); *(_DWORD *)(v29 + 48) = *(_DWORD *)(v28 + 752) - 1; } if ( v23 == *(_QWORD *)(v28 + 888) ) { *(_BYTE *)(v28 + 1669) = 1; } else if ( !v23 ) { *(_QWORD *)(v28 + 1088) = -1LL; v17 = (_DWORD *)v28; v10 = (unsigned int *)my_thread_var(v7, v8); ma_set_fatal_error(v17, *v10, v11, v12, v13, v14); return 1; } *(_QWORD *)(v28 + 1088) = v26; *(_QWORD *)v29 = v28; *(_QWORD *)(v29 + 8) = v27; *(_QWORD *)(v29 + 16) = v23; *(_QWORD *)(v29 + 24) = v26; *(_DWORD *)(v29 + 32) = _byteswap_ushort(*(_WORD *)(v23 + (unsigned int)v19[465] - 2)); *(_DWORD *)(v29 + 36) = *(_DWORD *)(v29 + 32); *(_DWORD *)(v29 + 44) = *(unsigned __int8 *)(v23 + (unsigned int)(v19[465] - 3)); if ( (*(_DWORD *)(v29 + 44) & 1) != 0 ) v16 = v19[249]; else v16 = 0; *(_DWORD *)(v29 + 40) = v16; return 0; }
_ma_fetch_keypage: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV AL,byte ptr [RBP + 0x18] MOV RAX,qword 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 dword ptr [RBP + -0x2c],R8D MOV dword ptr [RBP + -0x30],R9D MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x58] MOV EAX,dword ptr [RAX + 0x7bc] MOV dword ptr [RBP + -0x5c],EAX JMP 0x0013e0c4 LAB_0013e0c4: MOV RAX,qword ptr [RBP + -0x58] MOV RDI,qword ptr [RAX + 0x600] MOV RSI,qword ptr [RBP + -0x58] ADD RSI,0x750 MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RBP + -0x5c] XOR EDX,EDX DIV RCX MOV RDX,RAX MOV ECX,dword ptr [RBP + -0x30] MOV R8,qword ptr [RBP + 0x10] MOV RAX,qword ptr [RBP + -0x58] MOV R9D,dword ptr [RAX + 0x7d4] MOV R10D,dword ptr [RBP + -0x2c] LEA RAX,[RBP + -0x50] MOV dword ptr [RSP],R10D MOV qword ptr [RSP + 0x8],RAX CALL 0x00196df0 MOV qword ptr [RBP + -0x38],RAX CMP dword ptr [RBP + -0x2c],0x0 JZ 0x0013e161 JMP 0x0013e11d LAB_0013e11d: JMP 0x0013e11f LAB_0013e11f: MOV EDX,dword ptr [RBP + -0x2c] MOV EAX,0x5 MOV ECX,0x6 CMP EDX,0x4 CMOVZ EAX,ECX MOV dword ptr [RBP + -0x48],EAX MOV byte ptr [RBP + -0x40],0x0 MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x2e8 LEA RSI,[RBP + -0x50] CALL 0x001dd8b0 MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RAX + 0x2f0] SUB ECX,0x1 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x30],ECX LAB_0013e161: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RCX + 0x378] JNZ 0x0013e17f MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x685],0x1 JMP 0x0013e1bc LAB_0013e17f: CMP qword ptr [RBP + -0x38],0x0 JNZ 0x0013e1ba JMP 0x0013e188 LAB_0013e188: JMP 0x0013e18a LAB_0013e18a: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x440],-0x1 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x68],RAX CALL 0x001fc990 MOV RDI,qword ptr [RBP + -0x68] MOV ESI,dword ptr [RAX] CALL 0x00137c10 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0013e297 LAB_0013e1ba: JMP 0x0013e1bc LAB_0013e1bc: MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x440],RCX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x58] MOV ECX,dword ptr [RCX + 0x744] MOVZX EAX,byte ptr [RAX + RCX*0x1 + -0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x58] MOV EDX,dword ptr [RDX + 0x744] MOVZX ECX,byte ptr [RCX + RDX*0x1 + -0x2] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX ECX,AX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x20],ECX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x20] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x24],ECX MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x58] MOV ECX,dword ptr [RCX + 0x744] SUB ECX,0x2 SUB ECX,0x1 MOV ECX,ECX MOVZX ECX,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x2c],ECX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x2c] AND EAX,0x1 CMP EAX,0x0 JZ 0x0013e282 MOV RAX,qword ptr [RBP + -0x58] MOV EAX,dword ptr [RAX + 0x3e4] MOV dword ptr [RBP + -0x6c],EAX JMP 0x0013e289 LAB_0013e282: XOR EAX,EAX MOV dword ptr [RBP + -0x6c],EAX JMP 0x0013e289 LAB_0013e289: MOV ECX,dword ptr [RBP + -0x6c] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x28],ECX MOV byte ptr [RBP + -0x1],0x0 LAB_0013e297: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x80 POP RBP RET
int1 _ma_fetch_keypage(int8 *param_1,long *param_2,int8 param_3,ulong param_4,int param_5, int4 param_6,int8 param_7) { long lVar1; long *plVar2; int4 *puVar3; int4 local_74; int1 local_58 [8]; int4 local_50; int1 local_48; long local_40; int4 local_38; int local_34; ulong local_30; int8 local_28; long *local_20; int8 *local_18; lVar1 = *param_2; local_38 = param_6; local_34 = param_5; local_30 = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; local_40 = pagecache_read(*(int8 *)(lVar1 + 0x600),lVar1 + 0x750, param_4 / *(uint *)(lVar1 + 0x7bc),param_6,param_7, *(int4 *)(lVar1 + 0x7d4),param_5,local_58); if (local_34 != 0) { local_50 = 5; if (local_34 == 4) { local_50 = 6; } local_48 = 0; insert_dynamic(local_20 + 0x5d,local_58); *(int *)(local_18 + 6) = (int)local_20[0x5e] + -1; } plVar2 = local_20; if (local_40 == local_20[0x6f]) { *(int1 *)((long)local_20 + 0x685) = 1; } else if (local_40 == 0) { local_20[0x88] = -1; puVar3 = (int4 *)_my_thread_var(); _ma_set_fatal_error(plVar2,*puVar3); return 1; } local_20[0x88] = local_30; *local_18 = local_20; local_18[1] = local_28; local_18[2] = local_40; local_18[3] = local_30; *(uint *)(local_18 + 4) = (uint)CONCAT11(*(int1 *)(local_40 + -2 + (ulong)*(uint *)(lVar1 + 0x744)), *(int1 *)(local_40 + -1 + (ulong)*(uint *)(lVar1 + 0x744))); *(int4 *)((long)local_18 + 0x24) = *(int4 *)(local_18 + 4); *(uint *)((long)local_18 + 0x2c) = (uint)*(byte *)(local_40 + (ulong)(*(int *)(lVar1 + 0x744) - 3)); if ((*(uint *)((long)local_18 + 0x2c) & 1) == 0) { local_74 = 0; } else { local_74 = *(int4 *)(lVar1 + 0x3e4); } *(int4 *)(local_18 + 5) = local_74; return 0; }
51,456
ma_SHA1Final
eloqsql/libmariadb/libmariadb/ma_sha1.c
void ma_SHA1Final(unsigned char digest[20], _MA_SHA1_CTX * context) { unsigned char bits[8]; unsigned int index, padLen; /* Save number of bits */ bits[7] = context->count[0] & 0xFF; bits[6] = (context->count[0] >> 8) & 0xFF; bits[5] = (context->count[0] >> 16) & 0xFF; bits[4] = (context->count[0] >> 24) & 0xFF; bits[3] = context->count[1] & 0xFF; bits[2] = (context->count[1] >> 8) & 0xFF; bits[1] = (context->count[1] >> 16) & 0xFF; bits[0] = (context->count[1] >> 24) & 0xFF; /* Pad out to 56 mod 64. */ index = (unsigned int) ((context->count[0] >> 3) & 0x3f); padLen = (index < 56) ? (56 - index) : (120 - index); ma_SHA1Update(context, PADDING, padLen); /* Append length (before padding) */ ma_SHA1Update(context, bits, 8); /* Store state in digest */ ma_SHA1Encode(digest, context->state, 20); /* Zeroize sensitive information. */ memset((unsigned char*) context, 0, sizeof(*context)); }
O0
c
ma_SHA1Final: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x18(%rbp) movq %rsi, -0x20(%rbp) movq -0x20(%rbp), %rax movl 0x14(%rax), %eax andl $0xff, %eax movb %al, -0x9(%rbp) movq -0x20(%rbp), %rax movl 0x14(%rax), %eax shrl $0x8, %eax andl $0xff, %eax movb %al, -0xa(%rbp) movq -0x20(%rbp), %rax movl 0x14(%rax), %eax shrl $0x10, %eax andl $0xff, %eax movb %al, -0xb(%rbp) movq -0x20(%rbp), %rax movl 0x14(%rax), %eax shrl $0x18, %eax andl $0xff, %eax movb %al, -0xc(%rbp) movq -0x20(%rbp), %rax movl 0x18(%rax), %eax andl $0xff, %eax movb %al, -0xd(%rbp) movq -0x20(%rbp), %rax movl 0x18(%rax), %eax shrl $0x8, %eax andl $0xff, %eax movb %al, -0xe(%rbp) movq -0x20(%rbp), %rax movl 0x18(%rax), %eax shrl $0x10, %eax andl $0xff, %eax movb %al, -0xf(%rbp) movq -0x20(%rbp), %rax movl 0x18(%rax), %eax shrl $0x18, %eax andl $0xff, %eax movb %al, -0x10(%rbp) movq -0x20(%rbp), %rax movl 0x14(%rax), %eax shrl $0x3, %eax andl $0x3f, %eax movl %eax, -0x24(%rbp) cmpl $0x38, -0x24(%rbp) jae 0x4a5aa movl $0x38, %eax subl -0x24(%rbp), %eax movl %eax, -0x2c(%rbp) jmp 0x4a5b5 movl $0x78, %eax subl -0x24(%rbp), %eax movl %eax, -0x2c(%rbp) movl -0x2c(%rbp), %eax movl %eax, -0x28(%rbp) movq -0x20(%rbp), %rdi movl -0x28(%rbp), %eax movl %eax, %edx leaq 0x15be5(%rip), %rsi # 0x601b0 callq 0x48770 movq -0x20(%rbp), %rdi leaq -0x10(%rbp), %rsi movl $0x8, %edx callq 0x48770 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movl $0x14, %edx callq 0x4a630 movq -0x20(%rbp), %rax xorps %xmm0, %xmm0 movups %xmm0, 0x4c(%rax) movups %xmm0, 0x40(%rax) movups %xmm0, 0x30(%rax) movups %xmm0, 0x20(%rax) movups %xmm0, 0x10(%rax) movups %xmm0, (%rax) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x4a62a addq $0x30, %rsp popq %rbp retq callq 0x134b0 nop
ma_SHA1Final: push rbp mov rbp, rsp sub rsp, 30h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov rax, [rbp+var_20] mov eax, [rax+14h] and eax, 0FFh mov [rbp+var_9], al mov rax, [rbp+var_20] mov eax, [rax+14h] shr eax, 8 and eax, 0FFh mov [rbp+var_A], al mov rax, [rbp+var_20] mov eax, [rax+14h] shr eax, 10h and eax, 0FFh mov [rbp+var_B], al mov rax, [rbp+var_20] mov eax, [rax+14h] shr eax, 18h and eax, 0FFh mov [rbp+var_C], al mov rax, [rbp+var_20] mov eax, [rax+18h] and eax, 0FFh mov [rbp+var_D], al mov rax, [rbp+var_20] mov eax, [rax+18h] shr eax, 8 and eax, 0FFh mov [rbp+var_E], al mov rax, [rbp+var_20] mov eax, [rax+18h] shr eax, 10h and eax, 0FFh mov [rbp+var_F], al mov rax, [rbp+var_20] mov eax, [rax+18h] shr eax, 18h and eax, 0FFh mov [rbp+var_10], al mov rax, [rbp+var_20] mov eax, [rax+14h] shr eax, 3 and eax, 3Fh mov [rbp+var_24], eax cmp [rbp+var_24], 38h ; '8' jnb short loc_4A5AA mov eax, 38h ; '8' sub eax, [rbp+var_24] mov [rbp+var_2C], eax jmp short loc_4A5B5 loc_4A5AA: mov eax, 78h ; 'x' sub eax, [rbp+var_24] mov [rbp+var_2C], eax loc_4A5B5: mov eax, [rbp+var_2C] mov [rbp+var_28], eax mov rdi, [rbp+var_20] mov eax, [rbp+var_28] mov edx, eax lea rsi, PADDING call ma_SHA1Update mov rdi, [rbp+var_20] lea rsi, [rbp+var_10] mov edx, 8 call ma_SHA1Update mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] mov edx, 14h call ma_SHA1Encode mov rax, [rbp+var_20] xorps xmm0, xmm0 movups xmmword ptr [rax+4Ch], xmm0 movups xmmword ptr [rax+40h], xmm0 movups xmmword ptr [rax+30h], xmm0 movups xmmword ptr [rax+20h], xmm0 movups xmmword ptr [rax+10h], xmm0 movups xmmword ptr [rax], xmm0 mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_4A62A add rsp, 30h pop rbp retn loc_4A62A: call ___stack_chk_fail
unsigned long long ma_SHA1Final(long long a1, long long a2) { unsigned int v3; // [rsp+4h] [rbp-2Ch] unsigned int v4; // [rsp+Ch] [rbp-24h] _BYTE v5[8]; // [rsp+20h] [rbp-10h] BYREF unsigned long long v6; // [rsp+28h] [rbp-8h] v6 = __readfsqword(0x28u); v5[7] = *(_DWORD *)(a2 + 20); v5[6] = BYTE1(*(_DWORD *)(a2 + 20)); v5[5] = BYTE2(*(_DWORD *)(a2 + 20)); v5[4] = HIBYTE(*(_DWORD *)(a2 + 20)); v5[3] = *(_DWORD *)(a2 + 24); v5[2] = BYTE1(*(_DWORD *)(a2 + 24)); v5[1] = BYTE2(*(_DWORD *)(a2 + 24)); v5[0] = HIBYTE(*(_DWORD *)(a2 + 24)); v4 = (*(_DWORD *)(a2 + 20) >> 3) & 0x3F; if ( v4 >= 0x38 ) v3 = 120 - v4; else v3 = 56 - v4; ma_SHA1Update(a2, (long long)&PADDING, v3); ma_SHA1Update(a2, (long long)v5, 8uLL); ma_SHA1Encode(a1, a2, 20LL); *(_OWORD *)(a2 + 76) = 0LL; *(_OWORD *)(a2 + 64) = 0LL; *(_OWORD *)(a2 + 48) = 0LL; *(_OWORD *)(a2 + 32) = 0LL; *(_OWORD *)(a2 + 16) = 0LL; *(_OWORD *)a2 = 0LL; return __readfsqword(0x28u); }
ma_SHA1Final: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x14] AND EAX,0xff MOV byte ptr [RBP + -0x9],AL MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x14] SHR EAX,0x8 AND EAX,0xff MOV byte ptr [RBP + -0xa],AL MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x14] SHR EAX,0x10 AND EAX,0xff MOV byte ptr [RBP + -0xb],AL MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x14] SHR EAX,0x18 AND EAX,0xff MOV byte ptr [RBP + -0xc],AL MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x18] AND EAX,0xff MOV byte ptr [RBP + -0xd],AL MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x18] SHR EAX,0x8 AND EAX,0xff MOV byte ptr [RBP + -0xe],AL MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x18] SHR EAX,0x10 AND EAX,0xff MOV byte ptr [RBP + -0xf],AL MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x18] SHR EAX,0x18 AND EAX,0xff MOV byte ptr [RBP + -0x10],AL MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x14] SHR EAX,0x3 AND EAX,0x3f MOV dword ptr [RBP + -0x24],EAX CMP dword ptr [RBP + -0x24],0x38 JNC 0x0014a5aa MOV EAX,0x38 SUB EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x2c],EAX JMP 0x0014a5b5 LAB_0014a5aa: MOV EAX,0x78 SUB EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x2c],EAX LAB_0014a5b5: MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x28],EAX MOV RDI,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x28] MOV EDX,EAX LEA RSI,[0x1601b0] CALL 0x00148770 MOV RDI,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0x10] MOV EDX,0x8 CALL 0x00148770 MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV EDX,0x14 CALL 0x0014a630 MOV RAX,qword ptr [RBP + -0x20] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x4c],XMM0 MOVUPS xmmword ptr [RAX + 0x40],XMM0 MOVUPS xmmword ptr [RAX + 0x30],XMM0 MOVUPS xmmword ptr [RAX + 0x20],XMM0 MOVUPS xmmword ptr [RAX + 0x10],XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0014a62a ADD RSP,0x30 POP RBP RET LAB_0014a62a: CALL 0x001134b0
void ma_SHA1Final(int8 param_1,int8 *param_2) { uint uVar1; long in_FS_OFFSET; int local_34; 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_11 = (int1)*(int4 *)((long)param_2 + 0x14); local_12 = (int1)((uint)*(int4 *)((long)param_2 + 0x14) >> 8); local_13 = (int1)((uint)*(int4 *)((long)param_2 + 0x14) >> 0x10); local_14 = (int1)((uint)*(int4 *)((long)param_2 + 0x14) >> 0x18); local_15 = (int1)*(int4 *)(param_2 + 3); local_16 = (int1)((uint)*(int4 *)(param_2 + 3) >> 8); local_17 = (int1)((uint)*(int4 *)(param_2 + 3) >> 0x10); local_18 = (int1)((uint)*(int4 *)(param_2 + 3) >> 0x18); uVar1 = *(uint *)((long)param_2 + 0x14) >> 3 & 0x3f; if (uVar1 < 0x38) { local_34 = 0x38 - uVar1; } else { local_34 = 0x78 - uVar1; } ma_SHA1Update(param_2,PADDING,local_34); ma_SHA1Update(param_2,&local_18,8); ma_SHA1Encode(param_1,param_2,0x14); *(int8 *)((long)param_2 + 0x4c) = 0; *(int8 *)((long)param_2 + 0x54) = 0; param_2[8] = 0; param_2[9] = 0; param_2[6] = 0; param_2[7] = 0; param_2[4] = 0; param_2[5] = 0; param_2[2] = 0; param_2[3] = 0; *param_2 = 0; param_2[1] = 0; if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
51,457
common_batch_add(llama_batch&, int, int, std::vector<int, std::allocator<int>> const&, bool)
llama.cpp/common/common.cpp
void common_batch_add( struct llama_batch & batch, llama_token id, llama_pos pos, const std::vector<llama_seq_id> & seq_ids, bool logits) { GGML_ASSERT(batch.seq_id[batch.n_tokens] && "llama_batch size exceeded"); batch.token [batch.n_tokens] = id; batch.pos [batch.n_tokens] = pos; batch.n_seq_id[batch.n_tokens] = seq_ids.size(); for (size_t i = 0; i < seq_ids.size(); ++i) { batch.seq_id[batch.n_tokens][i] = seq_ids[i]; } batch.logits [batch.n_tokens] = logits; batch.n_tokens++; }
O3
cpp
common_batch_add(llama_batch&, int, int, std::vector<int, std::allocator<int>> const&, bool): pushq %rax movq 0x28(%rdi), %rax movslq (%rdi), %r9 cmpq $0x0, (%rax,%r9,8) je 0xfa2bd movq 0x8(%rdi), %r10 movl %esi, (%r10,%r9,4) movq 0x18(%rdi), %rsi movslq (%rdi), %r9 movl %edx, (%rsi,%r9,4) movq (%rcx), %rdx movq 0x8(%rcx), %rsi movq %rsi, %rcx subq %rdx, %rcx sarq $0x2, %rcx movq 0x20(%rdi), %r9 movslq (%rdi), %r10 movl %ecx, (%r9,%r10,4) cmpq %rdx, %rsi je 0xfa2ae cmpq $0x1, %rcx adcq $0x0, %rcx xorl %esi, %esi movl (%rdx,%rsi,4), %r9d movslq (%rdi), %r10 movq (%rax,%r10,8), %r10 movl %r9d, (%r10,%rsi,4) incq %rsi cmpq %rsi, %rcx jne 0xfa297 movq 0x30(%rdi), %rax movslq (%rdi), %rcx movb %r8b, (%rax,%rcx) incl (%rdi) popq %rax retq leaq 0x2a161(%rip), %rdi # 0x124425 leaq 0x17f42(%rip), %rdx # 0x11220d leaq 0x2a723(%rip), %rcx # 0x1249f5 movl $0x478, %esi # imm = 0x478 xorl %eax, %eax callq 0x20e60
_Z16common_batch_addR11llama_batchiiRKSt6vectorIiSaIiEEb: push rax mov rax, [rdi+28h] movsxd r9, dword ptr [rdi] cmp qword ptr [rax+r9*8], 0 jz short loc_FA2BD mov r10, [rdi+8] mov [r10+r9*4], esi mov rsi, [rdi+18h] movsxd r9, dword ptr [rdi] mov [rsi+r9*4], edx mov rdx, [rcx] mov rsi, [rcx+8] mov rcx, rsi sub rcx, rdx sar rcx, 2 mov r9, [rdi+20h] movsxd r10, dword ptr [rdi] mov [r9+r10*4], ecx cmp rsi, rdx jz short loc_FA2AE cmp rcx, 1 adc rcx, 0 xor esi, esi loc_FA297: mov r9d, [rdx+rsi*4] movsxd r10, dword ptr [rdi] mov r10, [rax+r10*8] mov [r10+rsi*4], r9d inc rsi cmp rcx, rsi jnz short loc_FA297 loc_FA2AE: mov rax, [rdi+30h] movsxd rcx, dword ptr [rdi] mov [rax+rcx], r8b inc dword ptr [rdi] pop rax retn loc_FA2BD: lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aBatchSeqIdBatc; "batch.seq_id[batch.n_tokens] && \"llama"... mov esi, 478h xor eax, eax call _ggml_abort
long long common_batch_add(int *a1, int a2, int a3, long long *a4, char a5) { long long v5; // rax long long v6; // rax long long v7; // r9 long long v8; // rdx long long v9; // rsi long long v10; // rcx long long v11; // rcx long long v12; // rsi double v14; // xmm0_8 long long v15; // [rsp-8h] [rbp-8h] v15 = v5; v6 = *((_QWORD *)a1 + 5); v7 = *a1; if ( *(_QWORD *)(v6 + 8 * v7) ) { *(_DWORD *)(*((_QWORD *)a1 + 1) + 4 * v7) = a2; *(_DWORD *)(*((_QWORD *)a1 + 3) + 4LL * *a1) = a3; v8 = *a4; v9 = a4[1]; v10 = (v9 - *a4) >> 2; *(_DWORD *)(*((_QWORD *)a1 + 4) + 4LL * *a1) = v10; if ( v9 != v8 ) { v11 = (v10 == 0) + v10; v12 = 0LL; do { *(_DWORD *)(*(_QWORD *)(v6 + 8LL * *a1) + 4 * v12) = *(_DWORD *)(v8 + 4 * v12); ++v12; } while ( v11 != v12 ); } *(_BYTE *)(*((_QWORD *)a1 + 6) + (*a1)++) = a5; return v15; } else { v14 = ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/common.cpp", 1144LL, "GGML_ASSERT(%s) failed", "batch.seq_id[batch.n_tokens] && \"llama_batch size exceeded\""); return common_lcp(v14); } }
common_batch_add: PUSH RAX MOV RAX,qword ptr [RDI + 0x28] MOVSXD R9,dword ptr [RDI] CMP qword ptr [RAX + R9*0x8],0x0 JZ 0x001fa2bd MOV R10,qword ptr [RDI + 0x8] MOV dword ptr [R10 + R9*0x4],ESI MOV RSI,qword ptr [RDI + 0x18] MOVSXD R9,dword ptr [RDI] MOV dword ptr [RSI + R9*0x4],EDX MOV RDX,qword ptr [RCX] MOV RSI,qword ptr [RCX + 0x8] MOV RCX,RSI SUB RCX,RDX SAR RCX,0x2 MOV R9,qword ptr [RDI + 0x20] MOVSXD R10,dword ptr [RDI] MOV dword ptr [R9 + R10*0x4],ECX CMP RSI,RDX JZ 0x001fa2ae CMP RCX,0x1 ADC RCX,0x0 XOR ESI,ESI LAB_001fa297: MOV R9D,dword ptr [RDX + RSI*0x4] MOVSXD R10,dword ptr [RDI] MOV R10,qword ptr [RAX + R10*0x8] MOV dword ptr [R10 + RSI*0x4],R9D INC RSI CMP RCX,RSI JNZ 0x001fa297 LAB_001fa2ae: MOV RAX,qword ptr [RDI + 0x30] MOVSXD RCX,dword ptr [RDI] MOV byte ptr [RAX + RCX*0x1],R8B INC dword ptr [RDI] POP RAX RET LAB_001fa2bd: LEA RDI,[0x224425] LEA RDX,[0x21220d] LEA RCX,[0x2249f5] MOV ESI,0x478 XOR EAX,EAX CALL 0x00120e60
/* common_batch_add(llama_batch&, int, int, std::vector<int, std::allocator<int> > const&, bool) */ int8 common_batch_add(llama_batch *param_1,int param_2,int param_3,vector *param_4,bool param_5) { long lVar1; long lVar2; int8 in_RAX; long lVar3; long lVar4; lVar1 = *(long *)(param_1 + 0x28); if (*(long *)(lVar1 + (long)*(int *)param_1 * 8) != 0) { *(int *)(*(long *)(param_1 + 8) + (long)*(int *)param_1 * 4) = param_2; *(int *)(*(long *)(param_1 + 0x18) + (long)*(int *)param_1 * 4) = param_3; lVar2 = *(long *)param_4; lVar4 = *(long *)(param_4 + 8); lVar3 = lVar4 - lVar2 >> 2; *(int *)(*(long *)(param_1 + 0x20) + (long)*(int *)param_1 * 4) = (int)lVar3; if (lVar4 != lVar2) { lVar4 = 0; do { *(int4 *)(*(long *)(lVar1 + (long)*(int *)param_1 * 8) + lVar4 * 4) = *(int4 *)(lVar2 + lVar4 * 4); lVar4 = lVar4 + 1; } while (lVar3 + (ulong)(lVar3 == 0) != lVar4); } *(bool *)(*(long *)(param_1 + 0x30) + (long)*(int *)param_1) = param_5; *(int *)param_1 = *(int *)param_1 + 1; return in_RAX; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/common.cpp",0x478, "GGML_ASSERT(%s) failed", "batch.seq_id[batch.n_tokens] && \"llama_batch size exceeded\""); }
51,458
hi0bits
eloqsql/strings/dtoa.c
static int hi0bits(register ULong x) { register int k= 0; if (!(x & 0xffff0000)) { k= 16; x<<= 16; } if (!(x & 0xff000000)) { k+= 8; x<<= 8; } if (!(x & 0xf0000000)) { k+= 4; x<<= 4; } if (!(x & 0xc0000000)) { k+= 2; x<<= 2; } if (!(x & 0x80000000)) { k++; if (!(x & 0x40000000)) return 32; } return k; }
O0
c
hi0bits: pushq %rbp movq %rsp, %rbp movl %edi, -0x8(%rbp) movl $0x0, -0xc(%rbp) movl -0x8(%rbp), %eax andl $0xffff0000, %eax # imm = 0xFFFF0000 cmpl $0x0, %eax jne 0xa7b2b movl $0x10, -0xc(%rbp) movl -0x8(%rbp), %eax shll $0x10, %eax movl %eax, -0x8(%rbp) movl -0x8(%rbp), %eax andl $0xff000000, %eax # imm = 0xFF000000 cmpl $0x0, %eax jne 0xa7b4a movl -0xc(%rbp), %eax addl $0x8, %eax movl %eax, -0xc(%rbp) movl -0x8(%rbp), %eax shll $0x8, %eax movl %eax, -0x8(%rbp) movl -0x8(%rbp), %eax andl $0xf0000000, %eax # imm = 0xF0000000 cmpl $0x0, %eax jne 0xa7b69 movl -0xc(%rbp), %eax addl $0x4, %eax movl %eax, -0xc(%rbp) movl -0x8(%rbp), %eax shll $0x4, %eax movl %eax, -0x8(%rbp) movl -0x8(%rbp), %eax andl $0xc0000000, %eax # imm = 0xC0000000 cmpl $0x0, %eax jne 0xa7b88 movl -0xc(%rbp), %eax addl $0x2, %eax movl %eax, -0xc(%rbp) movl -0x8(%rbp), %eax shll $0x2, %eax movl %eax, -0x8(%rbp) movl -0x8(%rbp), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax jne 0xa7bb6 movl -0xc(%rbp), %eax addl $0x1, %eax movl %eax, -0xc(%rbp) movl -0x8(%rbp), %eax andl $0x40000000, %eax # imm = 0x40000000 cmpl $0x0, %eax jne 0xa7bb4 movl $0x20, -0x4(%rbp) jmp 0xa7bbc jmp 0xa7bb6 movl -0xc(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
hi0bits: push rbp mov rbp, rsp mov [rbp+var_8], edi mov [rbp+var_C], 0 mov eax, [rbp+var_8] and eax, 0FFFF0000h cmp eax, 0 jnz short loc_A7B2B mov [rbp+var_C], 10h mov eax, [rbp+var_8] shl eax, 10h mov [rbp+var_8], eax loc_A7B2B: mov eax, [rbp+var_8] and eax, 0FF000000h cmp eax, 0 jnz short loc_A7B4A mov eax, [rbp+var_C] add eax, 8 mov [rbp+var_C], eax mov eax, [rbp+var_8] shl eax, 8 mov [rbp+var_8], eax loc_A7B4A: mov eax, [rbp+var_8] and eax, 0F0000000h cmp eax, 0 jnz short loc_A7B69 mov eax, [rbp+var_C] add eax, 4 mov [rbp+var_C], eax mov eax, [rbp+var_8] shl eax, 4 mov [rbp+var_8], eax loc_A7B69: mov eax, [rbp+var_8] and eax, 0C0000000h cmp eax, 0 jnz short loc_A7B88 mov eax, [rbp+var_C] add eax, 2 mov [rbp+var_C], eax mov eax, [rbp+var_8] shl eax, 2 mov [rbp+var_8], eax loc_A7B88: mov eax, [rbp+var_8] and eax, 80000000h cmp eax, 0 jnz short loc_A7BB6 mov eax, [rbp+var_C] add eax, 1 mov [rbp+var_C], eax mov eax, [rbp+var_8] and eax, 40000000h cmp eax, 0 jnz short loc_A7BB4 mov [rbp+var_4], 20h ; ' ' jmp short loc_A7BBC loc_A7BB4: jmp short $+2 loc_A7BB6: mov eax, [rbp+var_C] mov [rbp+var_4], eax loc_A7BBC: mov eax, [rbp+var_4] pop rbp retn
long long hi0bits(int a1) { unsigned int v2; // [rsp+0h] [rbp-Ch] int v3; // [rsp+4h] [rbp-8h] v3 = a1; v2 = 0; if ( (a1 & 0xFFFF0000) == 0 ) { v2 = 16; v3 = a1 << 16; } if ( (v3 & 0xFF000000) == 0 ) { v2 += 8; v3 <<= 8; } if ( (v3 & 0xF0000000) == 0 ) { v2 += 4; v3 *= 16; } if ( (v3 & 0xC0000000) == 0 ) { v2 += 2; v3 *= 4; } if ( v3 < 0 ) return v2; ++v2; if ( (v3 & 0x40000000) != 0 ) return v2; else return 32; }
hi0bits: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x8],EDI MOV dword ptr [RBP + -0xc],0x0 MOV EAX,dword ptr [RBP + -0x8] AND EAX,0xffff0000 CMP EAX,0x0 JNZ 0x001a7b2b MOV dword ptr [RBP + -0xc],0x10 MOV EAX,dword ptr [RBP + -0x8] SHL EAX,0x10 MOV dword ptr [RBP + -0x8],EAX LAB_001a7b2b: MOV EAX,dword ptr [RBP + -0x8] AND EAX,0xff000000 CMP EAX,0x0 JNZ 0x001a7b4a MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x8 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0x8] SHL EAX,0x8 MOV dword ptr [RBP + -0x8],EAX LAB_001a7b4a: MOV EAX,dword ptr [RBP + -0x8] AND EAX,0xf0000000 CMP EAX,0x0 JNZ 0x001a7b69 MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x4 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0x8] SHL EAX,0x4 MOV dword ptr [RBP + -0x8],EAX LAB_001a7b69: MOV EAX,dword ptr [RBP + -0x8] AND EAX,0xc0000000 CMP EAX,0x0 JNZ 0x001a7b88 MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x2 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0x8] SHL EAX,0x2 MOV dword ptr [RBP + -0x8],EAX LAB_001a7b88: MOV EAX,dword ptr [RBP + -0x8] AND EAX,0x80000000 CMP EAX,0x0 JNZ 0x001a7bb6 MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x1 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0x8] AND EAX,0x40000000 CMP EAX,0x0 JNZ 0x001a7bb4 MOV dword ptr [RBP + -0x4],0x20 JMP 0x001a7bbc LAB_001a7bb4: JMP 0x001a7bb6 LAB_001a7bb6: MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x4],EAX LAB_001a7bbc: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int hi0bits(uint param_1) { int local_14; uint local_10; int local_c; local_14 = 0; local_10 = param_1; if ((param_1 & 0xffff0000) == 0) { local_14 = 0x10; local_10 = param_1 << 0x10; } if ((local_10 & 0xff000000) == 0) { local_14 = local_14 + 8; local_10 = local_10 << 8; } if ((local_10 & 0xf0000000) == 0) { local_14 = local_14 + 4; local_10 = local_10 << 4; } if ((local_10 & 0xc0000000) == 0) { local_14 = local_14 + 2; local_10 = local_10 << 2; } if (((local_10 & 0x80000000) == 0) && (local_14 = local_14 + 1, (local_10 & 0x40000000) == 0)) { local_c = 0x20; } else { local_c = local_14; } return local_c; }
51,459
stbi__start_callbacks(stbi__context*, stbi_io_callbacks*, void*)
SDL3Lite/dependencies/stb_image.h
static void stbi__start_callbacks(stbi__context *s, stbi_io_callbacks *c, void *user) { s->io = *c; s->io_user_data = user; s->buflen = sizeof(s->buffer_start); s->read_from_callbacks = 1; s->callback_already_read = 0; s->img_buffer = s->img_buffer_original = s->buffer_start; stbi__refill_buffer(s); s->img_buffer_original_end = s->img_buffer_end; }
O3
c
stbi__start_callbacks(stbi__context*, stbi_io_callbacks*, void*): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq %rsi, 0x8(%rsp) movq %rdx, (%rsp) movq 0x8(%rsp), %rcx movq 0x10(%rsp), %rax movq (%rcx), %rdx movq %rdx, 0x10(%rax) movq 0x8(%rcx), %rdx movq %rdx, 0x18(%rax) movq 0x10(%rcx), %rcx movq %rcx, 0x20(%rax) movq (%rsp), %rcx movq 0x10(%rsp), %rax movq %rcx, 0x28(%rax) movq 0x10(%rsp), %rax movl $0x80, 0x34(%rax) movq 0x10(%rsp), %rax movl $0x1, 0x30(%rax) movq 0x10(%rsp), %rax movl $0x0, 0xb8(%rax) movq 0x10(%rsp), %rcx addq $0x38, %rcx movq 0x10(%rsp), %rax movq %rcx, 0xd0(%rax) movq 0x10(%rsp), %rax movq %rcx, 0xc0(%rax) movq 0x10(%rsp), %rdi callq 0x320b0 movq 0x10(%rsp), %rax movq 0xc8(%rax), %rcx movq 0x10(%rsp), %rax movq %rcx, 0xd8(%rax) addq $0x18, %rsp retq nop
_ZL21stbi__start_callbacksP13stbi__contextP17stbi_io_callbacksPv: sub rsp, 18h mov [rsp+18h+var_8], rdi mov [rsp+18h+var_10], rsi mov [rsp+18h+var_18], rdx mov rcx, [rsp+18h+var_10] mov rax, [rsp+18h+var_8] mov rdx, [rcx] mov [rax+10h], rdx mov rdx, [rcx+8] mov [rax+18h], rdx mov rcx, [rcx+10h] mov [rax+20h], rcx mov rcx, [rsp+18h+var_18] mov rax, [rsp+18h+var_8] mov [rax+28h], rcx mov rax, [rsp+18h+var_8] mov dword ptr [rax+34h], 80h mov rax, [rsp+18h+var_8] mov dword ptr [rax+30h], 1 mov rax, [rsp+18h+var_8] mov dword ptr [rax+0B8h], 0 mov rcx, [rsp+18h+var_8] add rcx, 38h ; '8' mov rax, [rsp+18h+var_8] mov [rax+0D0h], rcx mov rax, [rsp+18h+var_8] mov [rax+0C0h], rcx mov rdi, [rsp+18h+var_8] call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *) mov rax, [rsp+18h+var_8] mov rcx, [rax+0C8h] mov rax, [rsp+18h+var_8] mov [rax+0D8h], rcx add rsp, 18h retn
long long stbi__start_callbacks(long long a1, _QWORD *a2, long long a3) { long long result; // rax *(_QWORD *)(a1 + 16) = *a2; *(_QWORD *)(a1 + 24) = a2[1]; *(_QWORD *)(a1 + 32) = a2[2]; *(_QWORD *)(a1 + 40) = a3; *(_DWORD *)(a1 + 52) = 128; *(_DWORD *)(a1 + 48) = 1; *(_DWORD *)(a1 + 184) = 0; *(_QWORD *)(a1 + 208) = a1 + 56; *(_QWORD *)(a1 + 192) = a1 + 56; stbi__refill_buffer(a1); result = a1; *(_QWORD *)(a1 + 216) = *(_QWORD *)(a1 + 200); return result; }
stbi__start_callbacks: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV qword ptr [RSP + 0x8],RSI MOV qword ptr [RSP],RDX MOV RCX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX + 0x10],RDX MOV RDX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x18],RDX MOV RCX,qword ptr [RCX + 0x10] MOV qword ptr [RAX + 0x20],RCX MOV RCX,qword ptr [RSP] MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x28],RCX MOV RAX,qword ptr [RSP + 0x10] MOV dword ptr [RAX + 0x34],0x80 MOV RAX,qword ptr [RSP + 0x10] MOV dword ptr [RAX + 0x30],0x1 MOV RAX,qword ptr [RSP + 0x10] MOV dword ptr [RAX + 0xb8],0x0 MOV RCX,qword ptr [RSP + 0x10] ADD RCX,0x38 MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0xd0],RCX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0xc0],RCX MOV RDI,qword ptr [RSP + 0x10] CALL 0x001320b0 MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RAX + 0xc8] MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0xd8],RCX ADD RSP,0x18 RET
/* stbi__start_callbacks(stbi__context*, stbi_io_callbacks*, void*) */ void stbi__start_callbacks(stbi__context *param_1,stbi_io_callbacks *param_2,void *param_3) { *(int8 *)(param_1 + 0x10) = *(int8 *)param_2; *(int8 *)(param_1 + 0x18) = *(int8 *)(param_2 + 8); *(int8 *)(param_1 + 0x20) = *(int8 *)(param_2 + 0x10); *(void **)(param_1 + 0x28) = param_3; *(int4 *)(param_1 + 0x34) = 0x80; *(int4 *)(param_1 + 0x30) = 1; *(int4 *)(param_1 + 0xb8) = 0; *(stbi__context **)(param_1 + 0xd0) = param_1 + 0x38; *(stbi__context **)(param_1 + 0xc0) = param_1 + 0x38; stbi__refill_buffer(param_1); *(int8 *)(param_1 + 0xd8) = *(int8 *)(param_1 + 200); return; }
51,460
stbi__mad3sizes_valid
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h
static int stbi__mad3sizes_valid(int a, int b, int c, int add) { return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a*b, c) && stbi__addsizes_valid(a*b*c, add); }
O1
c
stbi__mad3sizes_valid: xorl %r9d, %r9d movl %esi, %eax orl %edi, %eax js 0x368fa movl %edx, %r8d testl %esi, %esi je 0x368c1 xorl %r9d, %r9d movl $0x7fffffff, %eax # imm = 0x7FFFFFFF xorl %edx, %edx divl %esi cmpl %edi, %eax jl 0x368fa imull %edi, %esi movl %esi, %eax orl %r8d, %eax movl $0x0, %r9d js 0x368fa testl %r8d, %r8d je 0x368e7 xorl %r9d, %r9d movl $0x7fffffff, %eax # imm = 0x7FFFFFFF xorl %edx, %edx divl %r8d cmpl %esi, %eax jl 0x368fa imull %r8d, %esi xorl $0x7fffffff, %ecx # imm = 0x7FFFFFFF xorl %r9d, %r9d cmpl %esi, %ecx setge %r9b movl %r9d, %eax retq
stbi__mad3sizes_valid: xor r9d, r9d mov eax, esi or eax, edi js short loc_368FA mov r8d, edx test esi, esi jz short loc_368C1 xor r9d, r9d mov eax, 7FFFFFFFh xor edx, edx div esi cmp eax, edi jl short loc_368FA loc_368C1: imul esi, edi mov eax, esi or eax, r8d mov r9d, 0 js short loc_368FA test r8d, r8d jz short loc_368E7 xor r9d, r9d mov eax, 7FFFFFFFh xor edx, edx div r8d cmp eax, esi jl short loc_368FA loc_368E7: imul esi, r8d xor ecx, 7FFFFFFFh xor r9d, r9d cmp ecx, esi setnl r9b loc_368FA: mov eax, r9d retn
long long stbi__mad3sizes_valid(signed int a1, unsigned int a2, unsigned int a3, int a4) { unsigned int v4; // r9d int v5; // esi v4 = 0; if ( ((a1 | a2) & 0x80000000) == 0 ) { if ( !a2 || (v4 = 0, (int)(0x7FFFFFFF / a2) >= a1) ) { v5 = a1 * a2; v4 = 0; if ( ((a3 | v5) & 0x80000000) == 0 ) { if ( !a3 ) return (a4 ^ 0x7FFFFFFF) >= (int)(a3 * v5); v4 = 0; if ( (int)(0x7FFFFFFF / a3) >= v5 ) return (a4 ^ 0x7FFFFFFF) >= (int)(a3 * v5); } } } return v4; }
stbi__mad3sizes_valid: XOR R9D,R9D MOV EAX,ESI OR EAX,EDI JS 0x001368fa MOV R8D,EDX TEST ESI,ESI JZ 0x001368c1 XOR R9D,R9D MOV EAX,0x7fffffff XOR EDX,EDX DIV ESI CMP EAX,EDI JL 0x001368fa LAB_001368c1: IMUL ESI,EDI MOV EAX,ESI OR EAX,R8D MOV R9D,0x0 JS 0x001368fa TEST R8D,R8D JZ 0x001368e7 XOR R9D,R9D MOV EAX,0x7fffffff XOR EDX,EDX DIV R8D CMP EAX,ESI JL 0x001368fa LAB_001368e7: IMUL ESI,R8D XOR ECX,0x7fffffff XOR R9D,R9D CMP ECX,ESI SETGE R9B LAB_001368fa: MOV EAX,R9D RET
int1 [16] stbi__mad3sizes_valid(uint param_1,uint param_2,ulong param_3,uint param_4) { ulong uVar1; uint uVar2; ulong uVar3; int1 auVar4 [16]; uVar3 = 0; uVar1 = param_3; if (-1 < (int)(param_2 | param_1)) { if (param_2 != 0) { uVar3 = 0; uVar1 = 0x7fffffff % (ulong)param_2; if ((int)(0x7fffffff / (ulong)param_2) < (int)param_1) goto LAB_001368fa; } param_2 = param_2 * param_1; uVar2 = (uint)param_3; uVar3 = 0; if (-1 < (int)(param_2 | uVar2)) { if (uVar2 != 0) { uVar3 = 0; uVar1 = 0x7fffffff % (param_3 & 0xffffffff); if ((int)(0x7fffffff / (param_3 & 0xffffffff)) < (int)param_2) goto LAB_001368fa; } uVar3 = (ulong)((int)(param_2 * uVar2) <= (int)(param_4 ^ 0x7fffffff)); } } LAB_001368fa: auVar4._8_8_ = uVar1; auVar4._0_8_ = uVar3; return auVar4; }
51,461
stbi__mad3sizes_valid
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h
static int stbi__mad3sizes_valid(int a, int b, int c, int add) { return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a*b, c) && stbi__addsizes_valid(a*b*c, add); }
O3
c
stbi__mad3sizes_valid: xorl %r9d, %r9d movl %esi, %eax orl %edi, %eax js 0x368fd movl %edx, %r8d testl %esi, %esi je 0x368c4 xorl %r9d, %r9d movl $0x7fffffff, %eax # imm = 0x7FFFFFFF xorl %edx, %edx divl %esi cmpl %edi, %eax jl 0x368fd imull %edi, %esi movl %esi, %eax orl %r8d, %eax movl $0x0, %r9d js 0x368fd testl %r8d, %r8d je 0x368ea xorl %r9d, %r9d movl $0x7fffffff, %eax # imm = 0x7FFFFFFF xorl %edx, %edx divl %r8d cmpl %esi, %eax jl 0x368fd imull %r8d, %esi xorl $0x7fffffff, %ecx # imm = 0x7FFFFFFF xorl %r9d, %r9d cmpl %esi, %ecx setge %r9b movl %r9d, %eax retq
stbi__mad3sizes_valid: xor r9d, r9d mov eax, esi or eax, edi js short loc_368FD mov r8d, edx test esi, esi jz short loc_368C4 xor r9d, r9d mov eax, 7FFFFFFFh xor edx, edx div esi cmp eax, edi jl short loc_368FD loc_368C4: imul esi, edi mov eax, esi or eax, r8d mov r9d, 0 js short loc_368FD test r8d, r8d jz short loc_368EA xor r9d, r9d mov eax, 7FFFFFFFh xor edx, edx div r8d cmp eax, esi jl short loc_368FD loc_368EA: imul esi, r8d xor ecx, 7FFFFFFFh xor r9d, r9d cmp ecx, esi setnl r9b loc_368FD: mov eax, r9d retn
long long stbi__mad3sizes_valid(signed int a1, unsigned int a2, unsigned int a3, int a4) { unsigned int v4; // r9d int v5; // esi v4 = 0; if ( ((a1 | a2) & 0x80000000) == 0 ) { if ( !a2 || (v4 = 0, (int)(0x7FFFFFFF / a2) >= a1) ) { v5 = a1 * a2; v4 = 0; if ( ((a3 | v5) & 0x80000000) == 0 ) { if ( !a3 ) return (a4 ^ 0x7FFFFFFF) >= (int)(a3 * v5); v4 = 0; if ( (int)(0x7FFFFFFF / a3) >= v5 ) return (a4 ^ 0x7FFFFFFF) >= (int)(a3 * v5); } } } return v4; }
stbi__mad3sizes_valid: XOR R9D,R9D MOV EAX,ESI OR EAX,EDI JS 0x001368fd MOV R8D,EDX TEST ESI,ESI JZ 0x001368c4 XOR R9D,R9D MOV EAX,0x7fffffff XOR EDX,EDX DIV ESI CMP EAX,EDI JL 0x001368fd LAB_001368c4: IMUL ESI,EDI MOV EAX,ESI OR EAX,R8D MOV R9D,0x0 JS 0x001368fd TEST R8D,R8D JZ 0x001368ea XOR R9D,R9D MOV EAX,0x7fffffff XOR EDX,EDX DIV R8D CMP EAX,ESI JL 0x001368fd LAB_001368ea: IMUL ESI,R8D XOR ECX,0x7fffffff XOR R9D,R9D CMP ECX,ESI SETGE R9B LAB_001368fd: MOV EAX,R9D RET
int1 [16] stbi__mad3sizes_valid(uint param_1,uint param_2,ulong param_3,uint param_4) { ulong uVar1; uint uVar2; ulong uVar3; int1 auVar4 [16]; uVar3 = 0; uVar1 = param_3; if (-1 < (int)(param_2 | param_1)) { if (param_2 != 0) { uVar3 = 0; uVar1 = 0x7fffffff % (ulong)param_2; if ((int)(0x7fffffff / (ulong)param_2) < (int)param_1) goto LAB_001368fd; } param_2 = param_2 * param_1; uVar2 = (uint)param_3; uVar3 = 0; if (-1 < (int)(param_2 | uVar2)) { if (uVar2 != 0) { uVar3 = 0; uVar1 = 0x7fffffff % (param_3 & 0xffffffff); if ((int)(0x7fffffff / (param_3 & 0xffffffff)) < (int)param_2) goto LAB_001368fd; } uVar3 = (ulong)((int)(param_2 * uVar2) <= (int)(param_4 ^ 0x7fffffff)); } } LAB_001368fd: auVar4._8_8_ = uVar1; auVar4._0_8_ = uVar3; return auVar4; }
51,462
maria_rtree_find_req
eloqsql/storage/maria/ma_rt_index.c
static int maria_rtree_find_req(MARIA_HA *info, MARIA_KEYDEF *keyinfo, uint32 search_flag, uint nod_cmp_flag, my_off_t page_pos, int level) { MARIA_SHARE *share= info->s; uint nod_flag; int res; uchar *page_buf, *k, *last; int key_data_length; uint *saved_key= (uint*) (info->maria_rtree_recursion_state) + level; MARIA_PAGE page; my_bool buff_alloced; alloc_on_stack(*info->stack_end_ptr, page_buf, buff_alloced, keyinfo->block_length); if (!page_buf) { my_errno= HA_ERR_OUT_OF_MEM; return(-1); } if (_ma_fetch_keypage(&page, info, keyinfo, page_pos, PAGECACHE_LOCK_LEFT_UNLOCKED, DFLT_INIT_HITS, page_buf, 0)) goto err; nod_flag= page.node; key_data_length= keyinfo->keylength - share->base.rec_reflength; if (info->maria_rtree_recursion_depth >= level) { k= page_buf + *saved_key; } else { k= rt_PAGE_FIRST_KEY(share, page_buf, nod_flag); } last= rt_PAGE_END(&page); for (; k < last; k= rt_PAGE_NEXT_KEY(share, k, key_data_length, nod_flag)) { if (nod_flag) { /* this is an internal node in the tree */ if (!(res= maria_rtree_key_cmp(keyinfo->seg, info->first_mbr_key, k, info->last_rkey_length, nod_cmp_flag))) { switch ((res= maria_rtree_find_req(info, keyinfo, search_flag, nod_cmp_flag, _ma_kpos(nod_flag, k), level + 1))) { case 0: /* found - exit from recursion */ *saved_key= (uint) (k - page_buf); goto ok; case 1: /* not found - continue searching */ info->maria_rtree_recursion_depth= level; break; default: /* error */ case -1: goto err; } } } else { /* this is a leaf */ if (!maria_rtree_key_cmp(keyinfo->seg, info->first_mbr_key, k, info->last_rkey_length, search_flag)) { uchar *after_key= rt_PAGE_NEXT_KEY(share, k, key_data_length, 0); MARIA_KEY tmp_key; /* We don't need to set all MARIA_KEY elements here as _ma_row_pos_from_key() only uses a few of them. */ tmp_key.keyinfo= keyinfo; tmp_key.data= k; tmp_key.data_length= key_data_length; info->cur_row.lastpos= _ma_row_pos_from_key(&tmp_key); info->last_key.data_length= key_data_length; info->last_key.ref_length= share->base.rec_reflength; info->last_key.flag= 0; memcpy(info->last_key.data, k, info->last_key.data_length + info->last_key.ref_length); info->maria_rtree_recursion_depth= level; *saved_key= (uint) (last - page_buf); if (after_key < last) { uchar *keyread_buff= info->keyread_buff; info->int_keypos= keyread_buff; info->int_maxpos= keyread_buff + (last - after_key); memcpy(keyread_buff, after_key, last - after_key); info->keyread_buff_used= 0; } else { info->keyread_buff_used= 1; } res= 0; goto ok; } } } info->cur_row.lastpos= HA_OFFSET_ERROR; my_errno= HA_ERR_KEY_NOT_FOUND; res= 1; ok: stack_alloc_free(page_buf, buff_alloced); return res; err: stack_alloc_free(page_buf, buff_alloced); info->cur_row.lastpos= HA_OFFSET_ERROR; return -1; }
O3
c
maria_rtree_find_req: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movq %rcx, -0x58(%rbp) movq %rdx, %r14 movq %rsi, %r12 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq (%rdi), %rax movq %rax, -0x40(%rbp) movq 0x6e0(%rdi), %r15 movzwl 0xa6(%rsi), %esi leaq -0xa8(%rbp), %rcx movq %rsi, (%rcx) movq 0x78(%rdi), %rax movq (%rax), %rax subq %rcx, %rax subq %rsi, %rax jbe 0x6af21 cmpq $0x10000, %rax # imm = 0x10000 ja 0x6af07 cmpl $0x1000, %esi # imm = 0x1000 jb 0x6af21 cmpq $0x8001, %rax # imm = 0x8001 jb 0x6af21 movq %r15, -0x50(%rbp) movq %rsp, %r13 addl $0xf, %esi andl $-0x10, %esi subq %rsi, %r13 movq %r13, %rsp movb $0x1, %al movl %eax, -0x34(%rbp) jmp 0x6af44 movl $0x10010, %edx # imm = 0x10010 xorl %edi, %edi callq 0x9fdb1 testq %rax, %rax je 0x6afb7 movq %rax, %r13 movq %r15, -0x50(%rbp) movl $0x0, -0x34(%rbp) leaq -0xa8(%rbp), %rdi movq %rbx, %rsi movq %r12, %rdx movq %r14, %rcx xorl %r8d, %r8d movl $0x3, %r9d pushq $0x0 pushq %r13 callq 0x58efe addq $0x10, %rsp testb %al, %al je 0x6af89 cmpb $0x0, -0x34(%rbp) jne 0x6af7c movq %r13, %rdi callq 0x9ffde movq $-0x1, 0x98(%rbx) jmp 0x6afc2 movslq -0x58(%rbp), %rcx movl -0x80(%rbp), %r14d cmpl %ecx, 0x6f0(%rbx) movq %r13, -0x48(%rbp) movq %rcx, -0x70(%rbp) movq %r12, -0x60(%rbp) jge 0x6afeb movq -0x40(%rbp), %rax movl 0x744(%rax), %eax addq %r13, %rax movl %r14d, %ecx jmp 0x6aff5 callq 0xa1b22 movl $0x80, (%rax) movl $0xffffffff, %ebx # imm = 0xFFFFFFFF movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x6b1c5 movl %ebx, %eax leaq -0x28(%rbp), %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq -0x50(%rbp), %rax movl (%rax,%rcx,4), %ecx movq %r13, %rax movl %ecx, %r15d addq %rax, %r15 movl -0x88(%rbp), %r12d addq -0x98(%rbp), %r12 cmpq %r12, %r15 jae 0x6b0b1 movq -0x60(%rbp), %rax movzwl 0xaa(%rax), %eax movq -0x40(%rbp), %rcx subl 0x3e0(%rcx), %eax movq -0x58(%rbp), %rcx incl %ecx movl %ecx, -0x64(%rbp) movslq %eax, %r13 movq -0x60(%rbp), %rax movq 0xc0(%rax), %rdi movq 0x398(%rbx), %rsi movl 0x630(%rbx), %ecx movq %r15, %rdx movl $0x400, %r8d # imm = 0x400 callq 0x6d02c testl %r14d, %r14d je 0x6b096 movl %r14d, %ecx testl %eax, %eax jne 0x6b0a4 movl %r14d, %edi movq %r15, %rsi callq 0x56f0f movq %rbx, %rdi movq -0x60(%rbp), %rsi movq %rax, %rdx movl -0x64(%rbp), %ecx callq 0x6ae93 cmpl $0x1, %eax jne 0x6b0e8 movq -0x58(%rbp), %rax movl %eax, 0x6f0(%rbx) movl %r14d, %ecx jmp 0x6b0a4 testl %eax, %eax je 0x6b107 movq -0x40(%rbp), %rax movl 0x3e0(%rax), %ecx addq %r13, %r15 movl %ecx, %eax addq %rax, %r15 cmpq %r12, %r15 jb 0x6b033 movq $-0x1, 0x98(%rbx) callq 0xa1b22 movl $0x78, (%rax) movl $0x1, %ebx movq -0x48(%rbp), %r13 movl -0x34(%rbp), %eax testb %al, %al jne 0x6afc7 movq %r13, %rdi callq 0x9ffde jmp 0x6afc7 testl %eax, %eax movq -0x48(%rbp), %r13 jne 0x6af6e subl %r13d, %r15d movq -0x50(%rbp), %rax movq -0x70(%rbp), %rcx movl %r15d, (%rax,%rcx,4) xorl %ebx, %ebx jmp 0x6b0d0 movq -0x40(%rbp), %rcx movl 0x3e0(%rcx), %r14d addq %r15, %r14 addq %r13, %r14 leaq -0xc8(%rbp), %rdi movq -0x60(%rbp), %rax movq %rax, 0x8(%rdi) movq %r15, (%rdi) movl %r13d, 0x10(%rdi) callq 0x57074 movq %rax, 0x98(%rbx) movl %r13d, 0x210(%rbx) movq -0x40(%rbp), %rax movl 0x3e0(%rax), %edx movl %edx, 0x214(%rbx) movl $0x0, 0x218(%rbx) movq 0x200(%rbx), %rdi addl %r13d, %edx movq %r15, %rsi callq 0x29080 movq -0x58(%rbp), %rax movl %eax, 0x6f0(%rbx) movl %r12d, %eax subl -0x48(%rbp), %eax movq -0x50(%rbp), %rcx movq -0x70(%rbp), %rdx movl %eax, (%rcx,%rdx,4) movb $0x1, %al cmpq %r12, %r14 jae 0x6b1b8 movq 0x380(%rbx), %rdi movq %rdi, 0x3b0(%rbx) subq %r14, %r12 leaq (%rdi,%r12), %rax movq %rax, 0x3b8(%rbx) movq %r14, %rsi movq %r12, %rdx callq 0x29080 xorl %eax, %eax movb %al, 0x685(%rbx) xorl %ebx, %ebx jmp 0x6b0cc callq 0x29270
maria_rtree_find_req: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A8h mov [rbp+var_58], rcx mov r14, rdx mov r12, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax mov rax, [rdi] mov [rbp+var_40], rax mov r15, [rdi+6E0h] movzx esi, word ptr [rsi+0A6h] lea rcx, [rbp+var_A8] mov [rcx], rsi mov rax, [rdi+78h] mov rax, [rax] sub rax, rcx sub rax, rsi jbe short loc_6AF21 cmp rax, offset stru_10000 ja short loc_6AF07 cmp esi, 1000h jb short loc_6AF21 cmp rax, 8001h jb short loc_6AF21 loc_6AF07: mov [rbp+var_50], r15 mov r13, rsp add esi, 0Fh and esi, 0FFFFFFF0h sub r13, rsi mov rsp, r13 mov al, 1 mov [rbp+var_34], eax jmp short loc_6AF44 loc_6AF21: mov edx, 10010h xor edi, edi call my_malloc test rax, rax jz loc_6AFB7 mov r13, rax mov [rbp+var_50], r15 mov [rbp+var_34], 0 loc_6AF44: lea rdi, [rbp+var_A8] mov rsi, rbx mov rdx, r12 mov rcx, r14 xor r8d, r8d mov r9d, 3 push 0 push r13 call _ma_fetch_keypage add rsp, 10h test al, al jz short loc_6AF89 loc_6AF6E: cmp byte ptr [rbp+var_34], 0 jnz short loc_6AF7C mov rdi, r13 call my_free loc_6AF7C: mov qword ptr [rbx+98h], 0FFFFFFFFFFFFFFFFh jmp short loc_6AFC2 loc_6AF89: movsxd rcx, dword ptr [rbp+var_58] mov r14d, [rbp+var_80] cmp [rbx+6F0h], ecx mov [rbp+var_48], r13 mov [rbp+var_70], rcx mov [rbp+var_60], r12 jge short loc_6AFEB mov rax, [rbp+var_40] mov eax, [rax+744h] add rax, r13 mov ecx, r14d jmp short loc_6AFF5 loc_6AFB7: call _my_thread_var mov dword ptr [rax], 80h loc_6AFC2: mov ebx, 0FFFFFFFFh loc_6AFC7: mov rax, fs:28h cmp rax, [rbp+var_30] jnz loc_6B1C5 mov eax, ebx lea rsp, [rbp-28h] pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6AFEB: mov rax, [rbp+var_50] mov ecx, [rax+rcx*4] mov rax, r13 loc_6AFF5: mov r15d, ecx add r15, rax mov r12d, [rbp+var_88] add r12, [rbp+var_98] cmp r15, r12 jnb loc_6B0B1 mov rax, [rbp+var_60] movzx eax, word ptr [rax+0AAh] mov rcx, [rbp+var_40] sub eax, [rcx+3E0h] mov rcx, [rbp+var_58] inc ecx mov [rbp+var_64], ecx movsxd r13, eax loc_6B033: mov rax, [rbp+var_60] mov rdi, [rax+0C0h] mov rsi, [rbx+398h] mov ecx, [rbx+630h] mov rdx, r15 mov r8d, 400h call maria_rtree_key_cmp test r14d, r14d jz short loc_6B096 mov ecx, r14d test eax, eax jnz short loc_6B0A4 mov edi, r14d mov rsi, r15 call _ma_kpos mov rdi, rbx mov rsi, [rbp+var_60] mov rdx, rax mov ecx, [rbp+var_64] call maria_rtree_find_req cmp eax, 1 jnz short loc_6B0E8 mov rax, [rbp+var_58] mov [rbx+6F0h], eax mov ecx, r14d jmp short loc_6B0A4 loc_6B096: test eax, eax jz short loc_6B107 mov rax, [rbp+var_40] mov ecx, [rax+3E0h] loc_6B0A4: add r15, r13 mov eax, ecx add r15, rax cmp r15, r12 jb short loc_6B033 loc_6B0B1: mov qword ptr [rbx+98h], 0FFFFFFFFFFFFFFFFh call _my_thread_var mov dword ptr [rax], 78h ; 'x' mov ebx, 1 loc_6B0CC: mov r13, [rbp+var_48] loc_6B0D0: mov eax, [rbp+var_34] test al, al jnz loc_6AFC7 mov rdi, r13 call my_free jmp loc_6AFC7 loc_6B0E8: test eax, eax mov r13, [rbp+var_48] jnz loc_6AF6E sub r15d, r13d mov rax, [rbp+var_50] mov rcx, [rbp+var_70] mov [rax+rcx*4], r15d xor ebx, ebx jmp short loc_6B0D0 loc_6B107: mov rcx, [rbp+var_40] mov r14d, [rcx+3E0h] add r14, r15 add r14, r13 lea rdi, [rbp+var_C8] mov rax, [rbp+var_60] mov [rdi+8], rax mov [rdi], r15 mov [rdi+10h], r13d call _ma_row_pos_from_key mov [rbx+98h], rax mov [rbx+210h], r13d mov rax, [rbp+var_40] mov edx, [rax+3E0h] mov [rbx+214h], edx mov dword ptr [rbx+218h], 0 mov rdi, [rbx+200h] add edx, r13d mov rsi, r15 call _memcpy mov rax, [rbp+var_58] mov [rbx+6F0h], eax mov eax, r12d sub eax, dword ptr [rbp+var_48] mov rcx, [rbp+var_50] mov rdx, [rbp+var_70] mov [rcx+rdx*4], eax mov al, 1 cmp r14, r12 jnb short loc_6B1B8 mov rdi, [rbx+380h] mov [rbx+3B0h], rdi sub r12, r14 lea rax, [rdi+r12] mov [rbx+3B8h], rax mov rsi, r14 mov rdx, r12 call _memcpy xor eax, eax loc_6B1B8: mov [rbx+685h], al xor ebx, ebx jmp loc_6B0CC loc_6B1C5: call ___stack_chk_fail
long long maria_rtree_find_req(long long a1, long long a2, unsigned long long a3, long long a4) { long long v7; // r15 const char *v8; // rsi unsigned long long v9; // rax bool v10; // cc unsigned long long v11; // rax char *v12; // r13 long long v13; // rax _QWORD *v14; // rdi const char *v15; // rsi unsigned int v16; // r14d char *v17; // rax unsigned int v18; // ecx unsigned int v19; // ebx unsigned long long v21; // r15 unsigned long long v22; // r12 int v23; // eax long long v24; // r13 int v25; // eax unsigned int v26; // ecx long long v27; // rax int req; // eax unsigned long long v29; // r14 int v30; // edx char v31; // al long long v32; // rdi unsigned long long v33; // r12 long long v35[2]; // [rsp+8h] [rbp-C8h] BYREF int v36; // [rsp+18h] [rbp-B8h] _QWORD v37[4]; // [rsp+28h] [rbp-A8h] BYREF unsigned int v38; // [rsp+48h] [rbp-88h] unsigned int v39; // [rsp+50h] [rbp-80h] long long v40; // [rsp+60h] [rbp-70h] unsigned int v41; // [rsp+6Ch] [rbp-64h] long long v42; // [rsp+70h] [rbp-60h] long long v43; // [rsp+78h] [rbp-58h] long long v44; // [rsp+80h] [rbp-50h] char *v45; // [rsp+88h] [rbp-48h] long long v46; // [rsp+90h] [rbp-40h] int v47; // [rsp+9Ch] [rbp-34h] unsigned long long v48; // [rsp+A0h] [rbp-30h] v43 = a4; v48 = __readfsqword(0x28u); v46 = *(_QWORD *)a1; v7 = *(_QWORD *)(a1 + 1760); v8 = (const char *)*(unsigned __int16 *)(a2 + 166); v37[0] = v8; v9 = **(_QWORD **)(a1 + 120) - (_QWORD)v37; v10 = v9 <= (unsigned long long)v8; v11 = v9 - (_QWORD)v8; if ( v10 || v11 <= (unsigned long long)&stru_10000 && ((unsigned int)v8 < 0x1000 || v11 < 0x8001) ) { v13 = my_malloc(0LL, v8, 65552LL); if ( !v13 ) { *(_DWORD *)my_thread_var(0LL, v8) = 128; return (unsigned int)-1; } v12 = (char *)v13; v44 = v7; v47 = 0; } else { v44 = v7; v12 = (char *)&v35[-1] - (((_DWORD)v8 + 15) & 0xFFFFFFF0); LOBYTE(v11) = 1; v47 = v11; } v14 = v37; v15 = (const char *)a1; if ( ma_fetch_keypage((long long)v37, a1, a2, a3, 0, 3, (long long)v12) ) { LABEL_9: if ( !(_BYTE)v47 ) my_free(v12); *(_QWORD *)(a1 + 152) = -1LL; return (unsigned int)-1; } v16 = v39; v10 = *(_DWORD *)(a1 + 1776) < (int)v43; v45 = v12; v40 = (int)v43; v42 = a2; if ( v10 ) { v17 = &v12[*(unsigned int *)(v46 + 1860)]; v18 = v39; } else { v18 = *(_DWORD *)(v44 + 4LL * (int)v43); v17 = v12; } v21 = (unsigned long long)&v17[v18]; v22 = v37[2] + v38; if ( v21 < v22 ) { v23 = *(unsigned __int16 *)(v42 + 170) - *(_DWORD *)(v46 + 992); v41 = v43 + 1; v24 = v23; do { v14 = *(_QWORD **)(v42 + 192); v15 = *(const char **)(a1 + 920); v25 = maria_rtree_key_cmp(v14, v15, v21, *(unsigned int *)(a1 + 1584), 1024LL); if ( v16 ) { v26 = v16; if ( !v25 ) { v27 = ma_kpos(v16, v21); v14 = (_QWORD *)a1; v15 = (const char *)v42; req = maria_rtree_find_req(a1, v42, v27, v41); if ( req != 1 ) { v12 = v45; if ( req ) goto LABEL_9; *(_DWORD *)(v44 + 4 * v40) = v21 - (_DWORD)v45; v19 = 0; goto LABEL_29; } *(_DWORD *)(a1 + 1776) = v43; v26 = v16; } } else { if ( !v25 ) { v29 = v24 + v21 + *(unsigned int *)(v46 + 992); v35[1] = v42; v35[0] = v21; v36 = v24; *(_QWORD *)(a1 + 152) = ma_row_pos_from_key(v35); *(_DWORD *)(a1 + 528) = v24; v30 = *(_DWORD *)(v46 + 992); *(_DWORD *)(a1 + 532) = v30; *(_DWORD *)(a1 + 536) = 0; memcpy(*(_QWORD *)(a1 + 512), v21, (unsigned int)(v24 + v30)); *(_DWORD *)(a1 + 1776) = v43; *(_DWORD *)(v44 + 4 * v40) = v22 - (_DWORD)v45; v31 = 1; if ( v29 < v22 ) { v32 = *(_QWORD *)(a1 + 896); *(_QWORD *)(a1 + 944) = v32; v33 = v22 - v29; *(_QWORD *)(a1 + 952) = v32 + v33; memcpy(v32, v29, v33); v31 = 0; } *(_BYTE *)(a1 + 1669) = v31; v19 = 0; goto LABEL_28; } v26 = *(_DWORD *)(v46 + 992); } v21 += v26 + v24; } while ( v21 < v22 ); } *(_QWORD *)(a1 + 152) = -1LL; *(_DWORD *)my_thread_var(v14, v15) = 120; v19 = 1; LABEL_28: v12 = v45; LABEL_29: if ( !(_BYTE)v47 ) my_free(v12); return v19; }
maria_rtree_find_req: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV qword ptr [RBP + -0x58],RCX MOV R14,RDX MOV R12,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RDI] MOV qword ptr [RBP + -0x40],RAX MOV R15,qword ptr [RDI + 0x6e0] MOVZX ESI,word ptr [RSI + 0xa6] LEA RCX,[RBP + -0xa8] MOV qword ptr [RCX],RSI MOV RAX,qword ptr [RDI + 0x78] MOV RAX,qword ptr [RAX] SUB RAX,RCX SUB RAX,RSI JBE 0x0016af21 CMP RAX,0x10000 JA 0x0016af07 CMP ESI,0x1000 JC 0x0016af21 CMP RAX,0x8001 JC 0x0016af21 LAB_0016af07: MOV qword ptr [RBP + -0x50],R15 MOV R13,RSP ADD ESI,0xf AND ESI,0xfffffff0 SUB R13,RSI MOV RSP,R13 MOV AL,0x1 MOV dword ptr [RBP + -0x34],EAX JMP 0x0016af44 LAB_0016af21: MOV EDX,0x10010 XOR EDI,EDI CALL 0x0019fdb1 TEST RAX,RAX JZ 0x0016afb7 MOV R13,RAX MOV qword ptr [RBP + -0x50],R15 MOV dword ptr [RBP + -0x34],0x0 LAB_0016af44: LEA RDI,[RBP + -0xa8] MOV RSI,RBX MOV RDX,R12 MOV RCX,R14 XOR R8D,R8D MOV R9D,0x3 PUSH 0x0 PUSH R13 CALL 0x00158efe ADD RSP,0x10 TEST AL,AL JZ 0x0016af89 LAB_0016af6e: CMP byte ptr [RBP + -0x34],0x0 JNZ 0x0016af7c MOV RDI,R13 CALL 0x0019ffde LAB_0016af7c: MOV qword ptr [RBX + 0x98],-0x1 JMP 0x0016afc2 LAB_0016af89: MOVSXD RCX,dword ptr [RBP + -0x58] MOV R14D,dword ptr [RBP + -0x80] CMP dword ptr [RBX + 0x6f0],ECX MOV qword ptr [RBP + -0x48],R13 MOV qword ptr [RBP + -0x70],RCX MOV qword ptr [RBP + -0x60],R12 JGE 0x0016afeb MOV RAX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RAX + 0x744] ADD RAX,R13 MOV ECX,R14D JMP 0x0016aff5 LAB_0016afb7: CALL 0x001a1b22 MOV dword ptr [RAX],0x80 LAB_0016afc2: MOV EBX,0xffffffff LAB_0016afc7: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0016b1c5 MOV EAX,EBX LEA RSP,[RBP + -0x28] POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016afeb: MOV RAX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RAX + RCX*0x4] MOV RAX,R13 LAB_0016aff5: MOV R15D,ECX ADD R15,RAX MOV R12D,dword ptr [RBP + -0x88] ADD R12,qword ptr [RBP + -0x98] CMP R15,R12 JNC 0x0016b0b1 MOV RAX,qword ptr [RBP + -0x60] MOVZX EAX,word ptr [RAX + 0xaa] MOV RCX,qword ptr [RBP + -0x40] SUB EAX,dword ptr [RCX + 0x3e0] MOV RCX,qword ptr [RBP + -0x58] INC ECX MOV dword ptr [RBP + -0x64],ECX MOVSXD R13,EAX LAB_0016b033: MOV RAX,qword ptr [RBP + -0x60] MOV RDI,qword ptr [RAX + 0xc0] MOV RSI,qword ptr [RBX + 0x398] MOV ECX,dword ptr [RBX + 0x630] MOV RDX,R15 MOV R8D,0x400 CALL 0x0016d02c TEST R14D,R14D JZ 0x0016b096 MOV ECX,R14D TEST EAX,EAX JNZ 0x0016b0a4 MOV EDI,R14D MOV RSI,R15 CALL 0x00156f0f MOV RDI,RBX MOV RSI,qword ptr [RBP + -0x60] MOV RDX,RAX MOV ECX,dword ptr [RBP + -0x64] CALL 0x0016ae93 CMP EAX,0x1 JNZ 0x0016b0e8 MOV RAX,qword ptr [RBP + -0x58] MOV dword ptr [RBX + 0x6f0],EAX MOV ECX,R14D JMP 0x0016b0a4 LAB_0016b096: TEST EAX,EAX JZ 0x0016b107 MOV RAX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RAX + 0x3e0] LAB_0016b0a4: ADD R15,R13 MOV EAX,ECX ADD R15,RAX CMP R15,R12 JC 0x0016b033 LAB_0016b0b1: MOV qword ptr [RBX + 0x98],-0x1 CALL 0x001a1b22 MOV dword ptr [RAX],0x78 MOV EBX,0x1 LAB_0016b0cc: MOV R13,qword ptr [RBP + -0x48] LAB_0016b0d0: MOV EAX,dword ptr [RBP + -0x34] TEST AL,AL JNZ 0x0016afc7 MOV RDI,R13 CALL 0x0019ffde JMP 0x0016afc7 LAB_0016b0e8: TEST EAX,EAX MOV R13,qword ptr [RBP + -0x48] JNZ 0x0016af6e SUB R15D,R13D MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x70] MOV dword ptr [RAX + RCX*0x4],R15D XOR EBX,EBX JMP 0x0016b0d0 LAB_0016b107: MOV RCX,qword ptr [RBP + -0x40] MOV R14D,dword ptr [RCX + 0x3e0] ADD R14,R15 ADD R14,R13 LEA RDI,[RBP + -0xc8] MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RDI + 0x8],RAX MOV qword ptr [RDI],R15 MOV dword ptr [RDI + 0x10],R13D CALL 0x00157074 MOV qword ptr [RBX + 0x98],RAX MOV dword ptr [RBX + 0x210],R13D MOV RAX,qword ptr [RBP + -0x40] MOV EDX,dword ptr [RAX + 0x3e0] MOV dword ptr [RBX + 0x214],EDX MOV dword ptr [RBX + 0x218],0x0 MOV RDI,qword ptr [RBX + 0x200] ADD EDX,R13D MOV RSI,R15 CALL 0x00129080 MOV RAX,qword ptr [RBP + -0x58] MOV dword ptr [RBX + 0x6f0],EAX MOV EAX,R12D SUB EAX,dword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x70] MOV dword ptr [RCX + RDX*0x4],EAX MOV AL,0x1 CMP R14,R12 JNC 0x0016b1b8 MOV RDI,qword ptr [RBX + 0x380] MOV qword ptr [RBX + 0x3b0],RDI SUB R12,R14 LEA RAX,[RDI + R12*0x1] MOV qword ptr [RBX + 0x3b8],RAX MOV RSI,R14 MOV RDX,R12 CALL 0x00129080 XOR EAX,EAX LAB_0016b1b8: MOV byte ptr [RBX + 0x685],AL XOR EBX,EBX JMP 0x0016b0cc LAB_0016b1c5: CALL 0x00129270
int8 maria_rtree_find_req(long *param_1,long param_2,int8 param_3,int8 param_4) { ushort uVar1; uint uVar2; void *pvVar3; long lVar4; char cVar5; int iVar6; int iVar7; ulong uVar8; int4 *puVar9; long lVar10; int8 uVar11; int1 *puVar12; int1 *puVar13; int1 *puVar14; int1 *puVar15; long in_FS_OFFSET; int1 auStack_d8 [8]; int1 *local_d0; long local_c8; int local_c0; ulong local_b0 [2]; long local_a0; uint local_90; uint local_88; long local_78; int local_6c; long local_68; int8 local_60; long local_58; int1 *local_50; long local_48; int4 local_3c; long local_38; puVar12 = auStack_d8; local_38 = *(long *)(in_FS_OFFSET + 0x28); local_48 = *param_1; lVar10 = param_1[0xdc]; uVar1 = *(ushort *)(param_2 + 0xa6); local_b0[0] = (ulong)uVar1; uVar8 = (*(long *)param_1[0xf] - (long)local_b0) - local_b0[0]; local_60 = param_4; if (((ulong)(*(long *)param_1[0xf] - (long)local_b0) < local_b0[0] || uVar8 == 0) || ((uVar8 < 0x10001 && ((uVar1 < 0x1000 || (uVar8 < 0x8001)))))) { puVar14 = (int1 *)my_malloc(0,local_b0[0],0x10010); if (puVar14 != (int1 *)0x0) { local_3c = 0; puVar12 = auStack_d8; goto LAB_0016af44; } puVar9 = (int4 *)_my_thread_var(); *puVar9 = 0x80; } else { puVar14 = auStack_d8 + -(ulong)(uVar1 + 0xf & 0xfffffff0); local_3c = (int4)CONCAT71((int7)(uVar8 >> 8),1); puVar12 = puVar14; LAB_0016af44: local_58 = lVar10; *(int8 *)(puVar12 + -8) = 0; *(int1 **)(puVar12 + -0x10) = puVar14; *(int8 *)(puVar12 + -0x18) = 0x16af66; cVar5 = _ma_fetch_keypage(local_b0,param_1,param_2,param_3,0,3); if (cVar5 == '\0') { local_78 = (long)(int)local_60; if ((int)param_1[0xde] < (int)local_60) { puVar15 = puVar14 + *(uint *)(local_48 + 0x744); uVar2 = local_88; } else { uVar2 = *(uint *)(local_58 + local_78 * 4); puVar15 = puVar14; } puVar15 = puVar15 + uVar2; puVar13 = (int1 *)((ulong)local_90 + local_a0); local_68 = param_2; local_50 = puVar14; if (puVar15 < puVar13) { iVar6 = (uint)*(ushort *)(param_2 + 0xaa) - *(int *)(local_48 + 0x3e0); local_6c = (int)local_60 + 1; do { uVar11 = *(int8 *)(local_68 + 0xc0); lVar10 = param_1[0x73]; lVar4 = param_1[0xc6]; *(int8 *)(puVar12 + -8) = 0x16b059; iVar7 = maria_rtree_key_cmp(uVar11,lVar10,puVar15,(int)lVar4,0x400); if (local_88 == 0) { if (iVar7 == 0) { puVar14 = puVar15 + (long)iVar6 + (ulong)*(uint *)(local_48 + 0x3e0); local_c8 = local_68; local_d0 = puVar15; local_c0 = iVar6; *(int8 *)(puVar12 + -8) = 0x16b133; lVar10 = _ma_row_pos_from_key(); param_1[0x13] = lVar10; *(int *)(param_1 + 0x42) = iVar6; iVar7 = *(int *)(local_48 + 0x3e0); *(int *)((long)param_1 + 0x214) = iVar7; *(int4 *)(param_1 + 0x43) = 0; pvVar3 = (void *)param_1[0x40]; *(int8 *)(puVar12 + -8) = 0x16b16d; memcpy(pvVar3,puVar15,(ulong)(uint)(iVar7 + iVar6)); *(int *)(param_1 + 0xde) = (int)local_60; *(int *)(local_58 + local_78 * 4) = (int)puVar13 - (int)local_50; if (puVar13 > puVar14) { pvVar3 = (void *)param_1[0x70]; param_1[0x76] = (long)pvVar3; param_1[0x77] = (long)pvVar3 + ((long)puVar13 - (long)puVar14); *(int8 *)(puVar12 + -8) = 0x16b1b6; memcpy(pvVar3,puVar14,(long)puVar13 - (long)puVar14); } *(bool *)((long)param_1 + 0x685) = puVar13 <= puVar14; uVar11 = 0; goto LAB_0016b0d0; } uVar8 = (ulong)*(uint *)(local_48 + 0x3e0); } else { uVar8 = (ulong)local_88; if (iVar7 == 0) { *(int8 *)(puVar12 + -8) = 0x16b070; uVar11 = _ma_kpos(local_88,puVar15); lVar10 = local_68; iVar7 = local_6c; *(int8 *)(puVar12 + -8) = 0x16b082; iVar7 = maria_rtree_find_req(param_1,lVar10,uVar11,iVar7); if (iVar7 != 1) { puVar14 = local_50; if (iVar7 != 0) goto LAB_0016af6e; *(int *)(local_58 + local_78 * 4) = (int)puVar15 - (int)local_50; uVar11 = 0; goto LAB_0016b0d0; } *(int *)(param_1 + 0xde) = (int)local_60; uVar8 = (ulong)local_88; } } puVar15 = puVar15 + uVar8 + (long)iVar6; } while (puVar15 < puVar13); } param_1[0x13] = -1; *(int8 *)(puVar12 + -8) = 0x16b0c1; puVar9 = (int4 *)_my_thread_var(); *puVar9 = 0x78; uVar11 = 1; LAB_0016b0d0: puVar14 = local_50; if ((char)local_3c == '\0') { *(int8 *)(puVar12 + -8) = 0x16b0e3; my_free(puVar14); } goto LAB_0016afc7; } LAB_0016af6e: if ((char)local_3c == '\0') { *(int8 *)(puVar12 + -8) = 0x16af7c; my_free(puVar14); } param_1[0x13] = -1; } uVar11 = 0xffffffff; LAB_0016afc7: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ *(code **)(puVar12 + -8) = maria_rtree_find_next; __stack_chk_fail(); } return uVar11; }
51,463
ma_bitmap_flush
eloqsql/storage/maria/ma_bitmap.c
my_bool _ma_bitmap_flush(MARIA_SHARE *share) { my_bool res= 0; DBUG_ENTER("_ma_bitmap_flush"); if (share->bitmap.changed) { mysql_mutex_lock(&share->bitmap.bitmap_lock); if (share->bitmap.changed) { /* We have to mark the file changed here, as otherwise the following write to pagecache may force a page out from this file, which would cause _ma_mark_file_changed() to be called with bitmaplock hold! */ _ma_bitmap_mark_file_changed(share, 1); res= write_changed_bitmap(share, &share->bitmap); share->bitmap.changed= 0; } mysql_mutex_unlock(&share->bitmap.bitmap_lock); } DBUG_RETURN(res); }
O0
c
ma_bitmap_flush: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movb $0x0, -0x9(%rbp) movq -0x8(%rbp), %rax cmpb $0x0, 0xa30(%rax) je 0x62474 movq -0x8(%rbp), %rdi addq $0xa10, %rdi # imm = 0xA10 addq $0x88, %rdi leaq 0xf0083(%rip), %rsi # 0x152499 movl $0x1a9, %edx # imm = 0x1A9 callq 0x62550 movq -0x8(%rbp), %rax cmpb $0x0, 0xa30(%rax) je 0x6245d movq -0x8(%rbp), %rdi movl $0x1, %esi callq 0x625c0 movq -0x8(%rbp), %rdi movq -0x8(%rbp), %rsi addq $0xa10, %rsi # imm = 0xA10 callq 0x62690 movb %al, -0x9(%rbp) movq -0x8(%rbp), %rax movb $0x0, 0xa30(%rax) movq -0x8(%rbp), %rdi addq $0xa10, %rdi # imm = 0xA10 addq $0x88, %rdi callq 0x62800 jmp 0x62476 movb -0x9(%rbp), %al movb %al, -0xa(%rbp) movb -0xa(%rbp), %al addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_bitmap_flush: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov [rbp+var_9], 0 mov rax, [rbp+var_8] cmp byte ptr [rax+0A30h], 0 jz short loc_62474 mov rdi, [rbp+var_8] add rdi, 0A10h add rdi, 88h lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 1A9h call inline_mysql_mutex_lock_8 mov rax, [rbp+var_8] cmp byte ptr [rax+0A30h], 0 jz short loc_6245D mov rdi, [rbp+var_8] mov esi, 1 call _ma_bitmap_mark_file_changed mov rdi, [rbp+var_8] mov rsi, [rbp+var_8] add rsi, 0A10h call write_changed_bitmap mov [rbp+var_9], al mov rax, [rbp+var_8] mov byte ptr [rax+0A30h], 0 loc_6245D: mov rdi, [rbp+var_8] add rdi, 0A10h add rdi, 88h call inline_mysql_mutex_unlock_8 loc_62474: jmp short $+2 loc_62476: mov al, [rbp+var_9] mov [rbp+var_A], al mov al, [rbp+var_A] add rsp, 10h pop rbp retn
char ma_bitmap_flush(long long a1) { char v2; // [rsp+7h] [rbp-9h] v2 = 0; if ( *(_BYTE *)(a1 + 2608) ) { inline_mysql_mutex_lock_8(a1 + 2712, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c", 425LL); if ( *(_BYTE *)(a1 + 2608) ) { ma_bitmap_mark_file_changed(a1, 1LL); v2 = write_changed_bitmap(a1, a1 + 2576); *(_BYTE *)(a1 + 2608) = 0; } inline_mysql_mutex_unlock_8(a1 + 2712); } return v2; }
_ma_bitmap_flush: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV byte ptr [RBP + -0x9],0x0 MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0xa30],0x0 JZ 0x00162474 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xa10 ADD RDI,0x88 LEA RSI,[0x252499] MOV EDX,0x1a9 CALL 0x00162550 MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0xa30],0x0 JZ 0x0016245d MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x1 CALL 0x001625c0 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0xa10 CALL 0x00162690 MOV byte ptr [RBP + -0x9],AL MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0xa30],0x0 LAB_0016245d: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xa10 ADD RDI,0x88 CALL 0x00162800 LAB_00162474: JMP 0x00162476 LAB_00162476: MOV AL,byte ptr [RBP + -0x9] MOV byte ptr [RBP + -0xa],AL MOV AL,byte ptr [RBP + -0xa] ADD RSP,0x10 POP RBP RET
int1 _ma_bitmap_flush(long param_1) { int1 local_11; local_11 = 0; if (*(char *)(param_1 + 0xa30) != '\0') { inline_mysql_mutex_lock (param_1 + 0xa98,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c", 0x1a9); if (*(char *)(param_1 + 0xa30) != '\0') { _ma_bitmap_mark_file_changed(param_1,1); local_11 = write_changed_bitmap(param_1,param_1 + 0xa10); *(int1 *)(param_1 + 0xa30) = 0; } inline_mysql_mutex_unlock(param_1 + 0xa98); } return local_11; }
51,464
my_mb_wc_big5
eloqsql/strings/ctype-big5.c
static int my_mb_wc_big5(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc,const uchar *s,const uchar *e) { int hi; if (s >= e) return MY_CS_TOOSMALL; if ((hi= s[0]) < 0x80) { pwc[0]=hi; return 1; } if (s+2>e) return MY_CS_TOOSMALL2; if (!IS_MB2_CHAR(hi, s[1])) return MY_CS_ILSEQ; if (!(pwc[0]=func_big5_uni_onechar((hi<<8)+s[1]))) return -2; return 2; }
O3
c
my_mb_wc_big5: movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x2dcd2 movsbq (%rdx), %rdi testq %rdi, %rdi js 0x2dc9c movq %rdi, (%rsi) movl $0x1, %eax retq leaq 0x2(%rdx), %r8 movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %r8 ja 0x2dcd2 leal 0x5f(%rdi), %ecx xorl %eax, %eax cmpb $0x58, %cl ja 0x2dcd2 movzbl 0x1(%rdx), %ecx leal -0x7f(%rcx), %edx cmpb $-0x3f, %dl setb %dl leal 0x1(%rcx), %r8d cmpb $-0x5e, %r8b setb %r8b testb %r8b, %dl je 0x2dcd3 retq pushq %rbp movq %rsp, %rbp movzbl %dil, %eax shll $0x8, %eax leal (%rax,%rcx), %edx addl $0xffff5ec0, %edx # imm = 0xFFFF5EC0 cmpl $0x26bc, %edx # imm = 0x26BC ja 0x2dcfa movl %edx, %eax leaq 0x324a8(%rip), %rcx # 0x601a0 jmp 0x2dd11 orl %ecx, %eax addl $0xffff36c0, %eax # imm = 0xFFFF36C0 cmpl $0x309d, %eax # imm = 0x309D jae 0x2dd2a movl %eax, %eax leaq 0x3720f(%rip), %rcx # 0x64f20 leaq (%rcx,%rax,2), %rax movzwl (%rax), %eax movzwl %ax, %ecx movq %rcx, (%rsi) movl $0x2, %eax testw %cx, %cx jne 0x2dd36 jmp 0x2dd31 movq $0x0, (%rsi) movl $0xfffffffe, %eax # imm = 0xFFFFFFFE popq %rbp retq
my_mb_wc_big5: mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short locret_2DCD2 movsx rdi, byte ptr [rdx] test rdi, rdi js short loc_2DC9C mov [rsi], rdi mov eax, 1 retn loc_2DC9C: lea r8, [rdx+2] mov eax, 0FFFFFF9Ah cmp r8, rcx ja short locret_2DCD2 lea ecx, [rdi+5Fh] xor eax, eax cmp cl, 58h ; 'X' ja short locret_2DCD2 movzx ecx, byte ptr [rdx+1] lea edx, [rcx-7Fh] cmp dl, 0C1h setb dl lea r8d, [rcx+1] cmp r8b, 0A2h setb r8b test dl, r8b jz short loc_2DCD3 locret_2DCD2: retn loc_2DCD3: push rbp mov rbp, rsp movzx eax, dil shl eax, 8 lea edx, [rax+rcx] add edx, 0FFFF5EC0h cmp edx, 26BCh ja short loc_2DCFA mov eax, edx lea rcx, tab_big5_uni0 jmp short loc_2DD11 loc_2DCFA: or eax, ecx add eax, 0FFFF36C0h cmp eax, 309Dh jnb short loc_2DD2A mov eax, eax lea rcx, tab_big5_uni1 loc_2DD11: lea rax, [rcx+rax*2] movzx eax, word ptr [rax] movzx ecx, ax mov [rsi], rcx mov eax, 2 test cx, cx jnz short loc_2DD36 jmp short loc_2DD31 loc_2DD2A: mov qword ptr [rsi], 0 loc_2DD31: mov eax, 0FFFFFFFEh loc_2DD36: pop rbp retn
long long my_mb_wc_big5(long long a1, long long *a2, char *a3, unsigned long long a4) { long long result; // rax long long v5; // rdi int v6; // ecx int v7; // eax unsigned int v8; // edx long long v9; // rax unsigned __int16 *v10; // rcx long long v11; // rcx result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { v5 = *a3; if ( v5 >= 0 ) { *a2 = v5; return 1LL; } result = 4294967194LL; if ( (unsigned long long)(a3 + 2) <= a4 ) { result = 0LL; if ( (unsigned __int8)(v5 + 95) <= 0x58u ) { v6 = (unsigned __int8)a3[1]; if ( (unsigned __int8)(v6 + 1) >= 0xA2u || (unsigned __int8)(v6 - 127) >= 0xC1u ) { v7 = (unsigned __int8)v5 << 8; v8 = v7 + v6 - 41280; if ( v8 > 0x26BC ) { LODWORD(v9) = (v6 | v7) - 51520; if ( (unsigned int)v9 >= 0x309D ) { *a2 = 0LL; return 4294967294LL; } v9 = (unsigned int)v9; v10 = (unsigned __int16 *)&tab_big5_uni1; } else { v9 = v8; v10 = (unsigned __int16 *)&tab_big5_uni0; } v11 = v10[v9]; *a2 = v11; result = 2LL; if ( (_WORD)v11 ) return result; return 4294967294LL; } } } } return result; }
my_mb_wc_big5: MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x0012dcd2 MOVSX RDI,byte ptr [RDX] TEST RDI,RDI JS 0x0012dc9c MOV qword ptr [RSI],RDI MOV EAX,0x1 RET LAB_0012dc9c: LEA R8,[RDX + 0x2] MOV EAX,0xffffff9a CMP R8,RCX JA 0x0012dcd2 LEA ECX,[RDI + 0x5f] XOR EAX,EAX CMP CL,0x58 JA 0x0012dcd2 MOVZX ECX,byte ptr [RDX + 0x1] LEA EDX,[RCX + -0x7f] CMP DL,0xc1 SETC DL LEA R8D,[RCX + 0x1] CMP R8B,0xa2 SETC R8B TEST DL,R8B JZ 0x0012dcd3 LAB_0012dcd2: RET LAB_0012dcd3: PUSH RBP MOV RBP,RSP MOVZX EAX,DIL SHL EAX,0x8 LEA EDX,[RAX + RCX*0x1] ADD EDX,0xffff5ec0 CMP EDX,0x26bc JA 0x0012dcfa MOV EAX,EDX LEA RCX,[0x1601a0] JMP 0x0012dd11 LAB_0012dcfa: OR EAX,ECX ADD EAX,0xffff36c0 CMP EAX,0x309d JNC 0x0012dd2a MOV EAX,EAX LEA RCX,[0x164f20] LAB_0012dd11: LEA RAX,[RCX + RAX*0x2] MOVZX EAX,word ptr [RAX] MOVZX ECX,AX MOV qword ptr [RSI],RCX MOV EAX,0x2 TEST CX,CX JNZ 0x0012dd36 JMP 0x0012dd31 LAB_0012dd2a: MOV qword ptr [RSI],0x0 LAB_0012dd31: MOV EAX,0xfffffffe LAB_0012dd36: POP RBP RET
int8 my_mb_wc_big5(int8 param_1,ulong *param_2,byte *param_3,byte *param_4) { byte bVar1; byte bVar2; ushort uVar3; int *puVar4; uint uVar5; if (param_4 <= param_3) { return 0xffffff9b; } bVar1 = *param_3; if (-1 < (long)(char)bVar1) { *param_2 = (long)(char)bVar1; return 1; } if (param_4 < param_3 + 2) { return 0xffffff9a; } if ((byte)(bVar1 + 0x5f) < 0x59) { bVar2 = param_3[1]; if ((byte)(bVar2 + 0x81) < 0xc1 && (byte)(bVar2 + 1) < 0xa2) { return 0; } uVar5 = ((uint)bVar1 * 0x100 + (uint)bVar2) - 0xa140; if (uVar5 < 0x26bd) { puVar4 = &tab_big5_uni0; } else { uVar5 = CONCAT11(bVar1,bVar2) - 0xc940; if (0x309c < uVar5) { *param_2 = 0; return 0xfffffffe; } puVar4 = &tab_big5_uni1; } uVar3 = *(ushort *)(puVar4 + (ulong)uVar5 * 2); *param_2 = (ulong)uVar3; if (uVar3 == 0) { return 0xfffffffe; } return 2; } return 0; }
51,465
MatrixRotate
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h
RMAPI Matrix MatrixRotate(Vector3 axis, float angle) { Matrix result = { 0 }; float x = axis.x, y = axis.y, z = axis.z; float lengthSquared = x*x + y*y + z*z; if ((lengthSquared != 1.0f) && (lengthSquared != 0.0f)) { float ilength = 1.0f/sqrtf(lengthSquared); x *= ilength; y *= ilength; z *= ilength; } float sinres = sinf(angle); float cosres = cosf(angle); float t = 1.0f - cosres; result.m0 = x*x*t + cosres; result.m1 = y*x*t + z*sinres; result.m2 = z*x*t - y*sinres; result.m3 = 0.0f; result.m4 = x*y*t - z*sinres; result.m5 = y*y*t + cosres; result.m6 = z*y*t + x*sinres; result.m7 = 0.0f; result.m8 = x*z*t + y*sinres; result.m9 = y*z*t - x*sinres; result.m10 = z*z*t + cosres; result.m11 = 0.0f; result.m12 = 0.0f; result.m13 = 0.0f; result.m14 = 0.0f; result.m15 = 1.0f; return result; }
O2
c
MatrixRotate: pushq %rbx subq $0x50, %rsp movaps %xmm2, %xmm5 movaps %xmm1, %xmm2 movq %rdi, %rbx movaps %xmm0, %xmm4 mulps %xmm0, %xmm4 shufps $0x55, %xmm4, %xmm4 # xmm4 = xmm4[1,1,1,1] movaps %xmm0, %xmm1 mulss %xmm0, %xmm1 addss %xmm4, %xmm1 movaps %xmm2, %xmm3 mulss %xmm2, %xmm3 addss %xmm1, %xmm3 ucomiss 0x60d77(%rip), %xmm3 # 0xb969c jne 0x58929 jnp 0x58969 xorps %xmm1, %xmm1 ucomiss %xmm1, %xmm3 jne 0x58933 jnp 0x58969 sqrtss %xmm3, %xmm3 movss 0x60d5d(%rip), %xmm1 # 0xb969c divss %xmm3, %xmm1 mulss %xmm1, %xmm2 movaps %xmm2, 0x30(%rsp) shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] mulps %xmm1, %xmm0 movaps %xmm0, 0x10(%rsp) movaps %xmm0, %xmm1 mulps %xmm0, %xmm1 shufps $0x55, %xmm1, %xmm1 # xmm1 = xmm1[1,1,1,1] movaps %xmm1, 0x20(%rsp) jmp 0x58978 movaps %xmm2, 0x30(%rsp) movaps %xmm0, 0x10(%rsp) movaps %xmm4, 0x20(%rsp) movaps %xmm5, %xmm0 movss %xmm5, 0xc(%rsp) callq 0x9410 movaps %xmm0, 0x40(%rsp) movss 0xc(%rsp), %xmm0 callq 0x9390 movss 0x60cfe(%rip), %xmm1 # 0xb969c subss %xmm0, %xmm1 movaps 0x10(%rsp), %xmm10 movaps %xmm10, %xmm3 shufps $0x0, %xmm10, %xmm3 # xmm3 = xmm3[0,0],xmm10[0,0] mulps %xmm10, %xmm3 movaps 0x30(%rsp), %xmm9 movaps %xmm9, %xmm2 movaps 0x40(%rsp), %xmm11 mulss %xmm11, %xmm2 movaps %xmm10, %xmm6 shufps $0x55, %xmm10, %xmm6 # xmm6 = xmm6[1,1],xmm10[1,1] mulss %xmm11, %xmm6 movaps 0x5c761(%rip), %xmm4 # 0xb5140 movaps %xmm9, %xmm5 shufps $0x0, %xmm9, %xmm5 # xmm5 = xmm5[0,0],xmm9[0,0] mulps %xmm10, %xmm5 movaps %xmm5, %xmm7 mulss %xmm1, %xmm7 addss %xmm6, %xmm7 xorps %xmm4, %xmm6 xorps %xmm2, %xmm4 movaps %xmm1, %xmm8 shufps $0x0, %xmm1, %xmm8 # xmm8 = xmm8[0,0],xmm1[0,0] unpcklps %xmm0, %xmm2 # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1] mulss %xmm9, %xmm9 mulss %xmm1, %xmm9 addss %xmm0, %xmm9 unpcklps %xmm4, %xmm0 # xmm0 = xmm0[0],xmm4[0],xmm0[1],xmm4[1] movaps 0x20(%rsp), %xmm4 shufps $0xd4, %xmm3, %xmm4 # xmm4 = xmm4[0,1],xmm3[1,3] shufps $0x52, %xmm3, %xmm4 # xmm4 = xmm4[2,0],xmm3[1,1] mulps %xmm8, %xmm3 addps %xmm0, %xmm3 movlps %xmm3, (%rbx) mulps %xmm8, %xmm4 addps %xmm2, %xmm4 movlps %xmm4, 0x10(%rbx) movaps %xmm11, %xmm0 mulss %xmm10, %xmm0 unpcklps %xmm0, %xmm6 # xmm6 = xmm6[0],xmm0[0],xmm6[1],xmm0[1] mulps %xmm5, %xmm8 addps %xmm6, %xmm8 movlps %xmm8, 0x20(%rbx) movss %xmm7, 0x8(%rbx) shufps $0x55, %xmm5, %xmm5 # xmm5 = xmm5[1,1,1,1] mulss %xmm1, %xmm5 subss %xmm0, %xmm5 movss %xmm5, 0x18(%rbx) movss %xmm9, 0x28(%rbx) andl $0x0, 0xc(%rbx) andl $0x0, 0x1c(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x2c(%rbx) movl $0x3f800000, 0x3c(%rbx) # imm = 0x3F800000 movq %rbx, %rax addq $0x50, %rsp popq %rbx retq
MatrixRotate: push rbx sub rsp, 50h movaps xmm5, xmm2 movaps xmm2, xmm1 mov rbx, rdi movaps xmm4, xmm0 mulps xmm4, xmm0 shufps xmm4, xmm4, 55h ; 'U' movaps xmm1, xmm0 mulss xmm1, xmm0 addss xmm1, xmm4 movaps xmm3, xmm2 mulss xmm3, xmm2 addss xmm3, xmm1 ucomiss xmm3, cs:dword_B969C jnz short loc_58929 jnp short loc_58969 loc_58929: xorps xmm1, xmm1 ucomiss xmm3, xmm1 jnz short loc_58933 jnp short loc_58969 loc_58933: sqrtss xmm3, xmm3 movss xmm1, cs:dword_B969C divss xmm1, xmm3 mulss xmm2, xmm1 movaps [rsp+58h+var_28], xmm2 shufps xmm1, xmm1, 0 mulps xmm0, xmm1 movaps [rsp+58h+var_48], xmm0 movaps xmm1, xmm0 mulps xmm1, xmm0 shufps xmm1, xmm1, 55h ; 'U' movaps [rsp+58h+var_38], xmm1 jmp short loc_58978 loc_58969: movaps [rsp+58h+var_28], xmm2 movaps [rsp+58h+var_48], xmm0 movaps [rsp+58h+var_38], xmm4 loc_58978: movaps xmm0, xmm5 movss [rsp+58h+var_4C], xmm5 call _sinf movaps [rsp+58h+var_18], xmm0 movss xmm0, [rsp+58h+var_4C] call _cosf movss xmm1, cs:dword_B969C subss xmm1, xmm0 movaps xmm10, [rsp+58h+var_48] movaps xmm3, xmm10 shufps xmm3, xmm10, 0 mulps xmm3, xmm10 movaps xmm9, [rsp+58h+var_28] movaps xmm2, xmm9 movaps xmm11, [rsp+58h+var_18] mulss xmm2, xmm11 movaps xmm6, xmm10 shufps xmm6, xmm10, 55h ; 'U' mulss xmm6, xmm11 movaps xmm4, cs:xmmword_B5140 movaps xmm5, xmm9 shufps xmm5, xmm9, 0 mulps xmm5, xmm10 movaps xmm7, xmm5 mulss xmm7, xmm1 addss xmm7, xmm6 xorps xmm6, xmm4 xorps xmm4, xmm2 movaps xmm8, xmm1 shufps xmm8, xmm1, 0 unpcklps xmm2, xmm0 mulss xmm9, xmm9 mulss xmm9, xmm1 addss xmm9, xmm0 unpcklps xmm0, xmm4 movaps xmm4, [rsp+58h+var_38] shufps xmm4, xmm3, 0D4h shufps xmm4, xmm3, 52h ; 'R' mulps xmm3, xmm8 addps xmm3, xmm0 movlps qword ptr [rbx], xmm3 mulps xmm4, xmm8 addps xmm4, xmm2 movlps qword ptr [rbx+10h], xmm4 movaps xmm0, xmm11 mulss xmm0, xmm10 unpcklps xmm6, xmm0 mulps xmm8, xmm5 addps xmm8, xmm6 movlps qword ptr [rbx+20h], xmm8 movss dword ptr [rbx+8], xmm7 shufps xmm5, xmm5, 55h ; 'U' mulss xmm5, xmm1 subss xmm5, xmm0 movss dword ptr [rbx+18h], xmm5 movss dword ptr [rbx+28h], xmm9 and dword ptr [rbx+0Ch], 0 and dword ptr [rbx+1Ch], 0 xorps xmm0, xmm0 movups xmmword ptr [rbx+2Ch], xmm0 mov dword ptr [rbx+3Ch], 3F800000h mov rax, rbx add rsp, 50h pop rbx retn
long long MatrixRotate(long long a1, __m128 a2, __m128 a3, __m128 a4) { __m128 v5; // xmm2 __m128 v6; // xmm4 __m128 v7; // xmm4 float v8; // xmm3_4 __m128 v9; // xmm1 __m128 v10; // xmm1 __m128 v11; // xmm0 __m128 v12; // xmm0 __m128 v13; // xmm1 __m128 v14; // xmm3 __m128 v15; // xmm2 __m128 v16; // xmm6 __m128 v17; // xmm5 float v18; // xmm7_4 __m128 v19; // xmm8 float v20; // xmm9_4 __m128 v21; // xmm0 float v23; // [rsp+Ch] [rbp-4Ch] __m128 v24; // [rsp+10h] [rbp-48h] __m128 v25; // [rsp+20h] [rbp-38h] __m128 v26; // [rsp+30h] [rbp-28h] __m128 v27; // [rsp+40h] [rbp-18h] v5 = a3; v6 = _mm_mul_ps(a2, a2); v7 = _mm_shuffle_ps(v6, v6, 85); v8 = (float)(v5.m128_f32[0] * v5.m128_f32[0]) + (float)((float)(a2.m128_f32[0] * a2.m128_f32[0]) + v7.m128_f32[0]); if ( v8 == 1.0 || v8 == 0.0 ) { v26 = a3; v24 = a2; v25 = v7; } else { v9 = (__m128)0x3F800000u; v9.m128_f32[0] = 1.0 / fsqrt(v8); v5.m128_f32[0] = v5.m128_f32[0] * v9.m128_f32[0]; v26 = v5; v24 = _mm_mul_ps(a2, _mm_shuffle_ps(v9, v9, 0)); v10 = _mm_mul_ps(v24, v24); v25 = _mm_shuffle_ps(v10, v10, 85); } v11.m128_u64[1] = a4.m128_u64[1]; v23 = a4.m128_f32[0]; *(double *)v11.m128_u64 = sinf(a4.m128_f32[0]); v27 = v11; v12 = (__m128)LODWORD(v23); *(double *)v12.m128_u64 = cosf(v23); v13 = (__m128)0x3F800000u; v13.m128_f32[0] = 1.0 - v12.m128_f32[0]; v14 = _mm_mul_ps(_mm_shuffle_ps(v24, v24, 0), v24); v15 = v26; v15.m128_f32[0] = v26.m128_f32[0] * v27.m128_f32[0]; v16 = _mm_shuffle_ps(v24, v24, 85); v16.m128_f32[0] = v16.m128_f32[0] * v27.m128_f32[0]; v17 = _mm_mul_ps(_mm_shuffle_ps(v26, v26, 0), v24); v18 = (float)(v17.m128_f32[0] * (float)(1.0 - v12.m128_f32[0])) + v16.m128_f32[0]; v19 = _mm_shuffle_ps(v13, v13, 0); v20 = (float)((float)(v26.m128_f32[0] * v26.m128_f32[0]) * (float)(1.0 - v12.m128_f32[0])) + v12.m128_f32[0]; _mm_storel_ps( (double *)a1, _mm_add_ps(_mm_mul_ps(v14, v19), _mm_unpacklo_ps(v12, _mm_xor_ps((__m128)xmmword_B5140, v15)))); _mm_storel_ps( (double *)(a1 + 16), _mm_add_ps(_mm_mul_ps(_mm_shuffle_ps(_mm_shuffle_ps(v25, v14, 212), v14, 82), v19), _mm_unpacklo_ps(v15, v12))); v21 = v27; v21.m128_f32[0] = v27.m128_f32[0] * v24.m128_f32[0]; _mm_storel_ps( (double *)(a1 + 32), _mm_add_ps(_mm_mul_ps(v19, v17), _mm_unpacklo_ps(_mm_xor_ps(v16, (__m128)xmmword_B5140), v21))); *(float *)(a1 + 8) = v18; *(float *)(a1 + 24) = (float)(_mm_shuffle_ps(v17, v17, 85).m128_f32[0] * v13.m128_f32[0]) - (float)(v27.m128_f32[0] * v24.m128_f32[0]); *(float *)(a1 + 40) = v20; *(_DWORD *)(a1 + 12) = 0; *(_DWORD *)(a1 + 28) = 0; *(_OWORD *)(a1 + 44) = 0LL; *(_DWORD *)(a1 + 60) = 1065353216; return a1; }
MatrixRotate: PUSH RBX SUB RSP,0x50 MOVAPS XMM5,XMM2 MOVAPS XMM2,XMM1 MOV RBX,RDI MOVAPS XMM4,XMM0 MULPS XMM4,XMM0 SHUFPS XMM4,XMM4,0x55 MOVAPS XMM1,XMM0 MULSS XMM1,XMM0 ADDSS XMM1,XMM4 MOVAPS XMM3,XMM2 MULSS XMM3,XMM2 ADDSS XMM3,XMM1 UCOMISS XMM3,dword ptr [0x001b969c] JNZ 0x00158929 JNP 0x00158969 LAB_00158929: XORPS XMM1,XMM1 UCOMISS XMM3,XMM1 JNZ 0x00158933 JNP 0x00158969 LAB_00158933: SQRTSS XMM3,XMM3 MOVSS XMM1,dword ptr [0x001b969c] DIVSS XMM1,XMM3 MULSS XMM2,XMM1 MOVAPS xmmword ptr [RSP + 0x30],XMM2 SHUFPS XMM1,XMM1,0x0 MULPS XMM0,XMM1 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOVAPS XMM1,XMM0 MULPS XMM1,XMM0 SHUFPS XMM1,XMM1,0x55 MOVAPS xmmword ptr [RSP + 0x20],XMM1 JMP 0x00158978 LAB_00158969: MOVAPS xmmword ptr [RSP + 0x30],XMM2 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOVAPS xmmword ptr [RSP + 0x20],XMM4 LAB_00158978: MOVAPS XMM0,XMM5 MOVSS dword ptr [RSP + 0xc],XMM5 CALL 0x00109410 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOVSS XMM0,dword ptr [RSP + 0xc] CALL 0x00109390 MOVSS XMM1,dword ptr [0x001b969c] SUBSS XMM1,XMM0 MOVAPS XMM10,xmmword ptr [RSP + 0x10] MOVAPS XMM3,XMM10 SHUFPS XMM3,XMM10,0x0 MULPS XMM3,XMM10 MOVAPS XMM9,xmmword ptr [RSP + 0x30] MOVAPS XMM2,XMM9 MOVAPS XMM11,xmmword ptr [RSP + 0x40] MULSS XMM2,XMM11 MOVAPS XMM6,XMM10 SHUFPS XMM6,XMM10,0x55 MULSS XMM6,XMM11 MOVAPS XMM4,xmmword ptr [0x001b5140] MOVAPS XMM5,XMM9 SHUFPS XMM5,XMM9,0x0 MULPS XMM5,XMM10 MOVAPS XMM7,XMM5 MULSS XMM7,XMM1 ADDSS XMM7,XMM6 XORPS XMM6,XMM4 XORPS XMM4,XMM2 MOVAPS XMM8,XMM1 SHUFPS XMM8,XMM1,0x0 UNPCKLPS XMM2,XMM0 MULSS XMM9,XMM9 MULSS XMM9,XMM1 ADDSS XMM9,XMM0 UNPCKLPS XMM0,XMM4 MOVAPS XMM4,xmmword ptr [RSP + 0x20] SHUFPS XMM4,XMM3,0xd4 SHUFPS XMM4,XMM3,0x52 MULPS XMM3,XMM8 ADDPS XMM3,XMM0 MOVLPS qword ptr [RBX],XMM3 MULPS XMM4,XMM8 ADDPS XMM4,XMM2 MOVLPS qword ptr [RBX + 0x10],XMM4 MOVAPS XMM0,XMM11 MULSS XMM0,XMM10 UNPCKLPS XMM6,XMM0 MULPS XMM8,XMM5 ADDPS XMM8,XMM6 MOVLPS qword ptr [RBX + 0x20],XMM8 MOVSS dword ptr [RBX + 0x8],XMM7 SHUFPS XMM5,XMM5,0x55 MULSS XMM5,XMM1 SUBSS XMM5,XMM0 MOVSS dword ptr [RBX + 0x18],XMM5 MOVSS dword ptr [RBX + 0x28],XMM9 AND dword ptr [RBX + 0xc],0x0 AND dword ptr [RBX + 0x1c],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x2c],XMM0 MOV dword ptr [RBX + 0x3c],0x3f800000 MOV RAX,RBX ADD RSP,0x50 POP RBX RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int8 * MatrixRotate(int8 param_1,float param_2,float param_3,int8 *param_4) { float fVar1; float fVar2; float fVar3; float fVar4; float local_48; float fStack_44; float local_38; float local_28; fStack_44 = (float)((ulong)param_1 >> 0x20); local_48 = (float)param_1; local_38 = fStack_44 * fStack_44; fVar3 = param_2 * param_2 + local_48 * local_48 + local_38; local_28 = param_2; if (((fVar3 != DAT_001b969c) || (NAN(fVar3) || NAN(DAT_001b969c))) && ((fVar3 != 0.0 || (NAN(fVar3))))) { fVar3 = DAT_001b969c / SQRT(fVar3); local_28 = param_2 * fVar3; local_48 = local_48 * fVar3; fStack_44 = fStack_44 * fVar3; local_38 = fStack_44 * fStack_44; } fVar3 = sinf(param_3); fVar1 = cosf(param_3); fVar2 = DAT_001b969c - fVar1; fVar4 = (float)((uint)(fStack_44 * fVar3) ^ _DAT_001b5140); *param_4 = CONCAT44(local_48 * fStack_44 * fVar2 + (float)(_DAT_001b5140 ^ (uint)(local_28 * fVar3)), local_48 * local_48 * fVar2 + fVar1); param_4[2] = CONCAT44(local_38 * fVar2 + fVar1,local_48 * fStack_44 * fVar2 + local_28 * fVar3); param_4[4] = CONCAT44(fVar2 * local_28 * fStack_44 + fVar3 * local_48, fVar2 * local_28 * local_48 + fVar4); *(float *)(param_4 + 1) = local_28 * local_48 * fVar2 + fStack_44 * fVar3; *(float *)(param_4 + 3) = local_28 * fStack_44 * fVar2 - fVar3 * local_48; *(float *)(param_4 + 5) = local_28 * local_28 * fVar2 + fVar1; *(int4 *)((long)param_4 + 0xc) = 0; *(int4 *)((long)param_4 + 0x1c) = 0; *(int8 *)((long)param_4 + 0x2c) = 0; *(int8 *)((long)param_4 + 0x34) = 0; *(int4 *)((long)param_4 + 0x3c) = 0x3f800000; return param_4; }
51,466
MatrixRotate
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h
RMAPI Matrix MatrixRotate(Vector3 axis, float angle) { Matrix result = { 0 }; float x = axis.x, y = axis.y, z = axis.z; float lengthSquared = x*x + y*y + z*z; if ((lengthSquared != 1.0f) && (lengthSquared != 0.0f)) { float ilength = 1.0f/sqrtf(lengthSquared); x *= ilength; y *= ilength; z *= ilength; } float sinres = sinf(angle); float cosres = cosf(angle); float t = 1.0f - cosres; result.m0 = x*x*t + cosres; result.m1 = y*x*t + z*sinres; result.m2 = z*x*t - y*sinres; result.m3 = 0.0f; result.m4 = x*y*t - z*sinres; result.m5 = y*y*t + cosres; result.m6 = z*y*t + x*sinres; result.m7 = 0.0f; result.m8 = x*z*t + y*sinres; result.m9 = y*z*t - x*sinres; result.m10 = z*z*t + cosres; result.m11 = 0.0f; result.m12 = 0.0f; result.m13 = 0.0f; result.m14 = 0.0f; result.m15 = 1.0f; return result; }
O3
c
MatrixRotate: pushq %rbx subq $0x50, %rsp movaps %xmm2, %xmm5 movaps %xmm1, %xmm2 movq %rdi, %rbx movaps %xmm0, %xmm4 mulps %xmm0, %xmm4 shufps $0x55, %xmm4, %xmm4 # xmm4 = xmm4[1,1,1,1] movaps %xmm0, %xmm1 mulss %xmm0, %xmm1 addss %xmm4, %xmm1 movaps %xmm2, %xmm3 mulss %xmm2, %xmm3 addss %xmm1, %xmm3 ucomiss 0x6b260(%rip), %xmm3 # 0xd3b1c jne 0x688c0 jnp 0x68900 xorps %xmm1, %xmm1 ucomiss %xmm1, %xmm3 jne 0x688ca jnp 0x68900 sqrtss %xmm3, %xmm3 movss 0x6b246(%rip), %xmm1 # 0xd3b1c divss %xmm3, %xmm1 mulss %xmm1, %xmm2 movaps %xmm2, 0x30(%rsp) shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] mulps %xmm1, %xmm0 movaps %xmm0, 0x10(%rsp) movaps %xmm0, %xmm1 mulps %xmm0, %xmm1 shufps $0x55, %xmm1, %xmm1 # xmm1 = xmm1[1,1,1,1] movaps %xmm1, 0x20(%rsp) jmp 0x6890f movaps %xmm2, 0x30(%rsp) movaps %xmm0, 0x10(%rsp) movaps %xmm4, 0x20(%rsp) movaps %xmm5, %xmm0 movss %xmm5, 0xc(%rsp) callq 0xa420 movaps %xmm0, 0x40(%rsp) movss 0xc(%rsp), %xmm0 callq 0xa3b0 movss 0x6b1e7(%rip), %xmm1 # 0xd3b1c subss %xmm0, %xmm1 movaps 0x10(%rsp), %xmm10 movaps %xmm10, %xmm3 shufps $0x0, %xmm10, %xmm3 # xmm3 = xmm3[0,0],xmm10[0,0] mulps %xmm10, %xmm3 movaps 0x30(%rsp), %xmm9 movaps %xmm9, %xmm2 movaps 0x40(%rsp), %xmm11 mulss %xmm11, %xmm2 movaps %xmm10, %xmm6 shufps $0x55, %xmm10, %xmm6 # xmm6 = xmm6[1,1],xmm10[1,1] mulss %xmm11, %xmm6 movaps 0x667da(%rip), %xmm4 # 0xcf150 movaps %xmm9, %xmm5 shufps $0x0, %xmm9, %xmm5 # xmm5 = xmm5[0,0],xmm9[0,0] mulps %xmm10, %xmm5 movaps %xmm5, %xmm7 mulss %xmm1, %xmm7 addss %xmm6, %xmm7 xorps %xmm4, %xmm6 xorps %xmm2, %xmm4 movaps %xmm1, %xmm8 shufps $0x0, %xmm1, %xmm8 # xmm8 = xmm8[0,0],xmm1[0,0] unpcklps %xmm0, %xmm2 # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1] mulss %xmm9, %xmm9 mulss %xmm1, %xmm9 addss %xmm0, %xmm9 unpcklps %xmm4, %xmm0 # xmm0 = xmm0[0],xmm4[0],xmm0[1],xmm4[1] movaps 0x20(%rsp), %xmm4 shufps $0xd4, %xmm3, %xmm4 # xmm4 = xmm4[0,1],xmm3[1,3] shufps $0x52, %xmm3, %xmm4 # xmm4 = xmm4[2,0],xmm3[1,1] mulps %xmm8, %xmm3 addps %xmm0, %xmm3 movlps %xmm3, (%rbx) mulps %xmm8, %xmm4 addps %xmm2, %xmm4 movlps %xmm4, 0x10(%rbx) movaps %xmm11, %xmm0 mulss %xmm10, %xmm0 unpcklps %xmm0, %xmm6 # xmm6 = xmm6[0],xmm0[0],xmm6[1],xmm0[1] mulps %xmm5, %xmm8 addps %xmm6, %xmm8 movlps %xmm8, 0x20(%rbx) movss %xmm7, 0x8(%rbx) shufps $0x55, %xmm5, %xmm5 # xmm5 = xmm5[1,1,1,1] mulss %xmm1, %xmm5 subss %xmm0, %xmm5 movss %xmm5, 0x18(%rbx) movss %xmm9, 0x28(%rbx) xorl %eax, %eax movl %eax, 0xc(%rbx) movl %eax, 0x1c(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x2c(%rbx) movl $0x3f800000, 0x3c(%rbx) # imm = 0x3F800000 movq %rbx, %rax addq $0x50, %rsp popq %rbx retq
MatrixRotate: push rbx sub rsp, 50h movaps xmm5, xmm2 movaps xmm2, xmm1 mov rbx, rdi movaps xmm4, xmm0 mulps xmm4, xmm0 shufps xmm4, xmm4, 55h ; 'U' movaps xmm1, xmm0 mulss xmm1, xmm0 addss xmm1, xmm4 movaps xmm3, xmm2 mulss xmm3, xmm2 addss xmm3, xmm1 ucomiss xmm3, cs:dword_D3B1C jnz short loc_688C0 jnp short loc_68900 loc_688C0: xorps xmm1, xmm1 ucomiss xmm3, xmm1 jnz short loc_688CA jnp short loc_68900 loc_688CA: sqrtss xmm3, xmm3 movss xmm1, cs:dword_D3B1C divss xmm1, xmm3 mulss xmm2, xmm1 movaps [rsp+58h+var_28], xmm2 shufps xmm1, xmm1, 0 mulps xmm0, xmm1 movaps [rsp+58h+var_48], xmm0 movaps xmm1, xmm0 mulps xmm1, xmm0 shufps xmm1, xmm1, 55h ; 'U' movaps [rsp+58h+var_38], xmm1 jmp short loc_6890F loc_68900: movaps [rsp+58h+var_28], xmm2 movaps [rsp+58h+var_48], xmm0 movaps [rsp+58h+var_38], xmm4 loc_6890F: movaps xmm0, xmm5 movss [rsp+58h+var_4C], xmm5 call _sinf movaps [rsp+58h+var_18], xmm0 movss xmm0, [rsp+58h+var_4C] call _cosf movss xmm1, cs:dword_D3B1C subss xmm1, xmm0 movaps xmm10, [rsp+58h+var_48] movaps xmm3, xmm10 shufps xmm3, xmm10, 0 mulps xmm3, xmm10 movaps xmm9, [rsp+58h+var_28] movaps xmm2, xmm9 movaps xmm11, [rsp+58h+var_18] mulss xmm2, xmm11 movaps xmm6, xmm10 shufps xmm6, xmm10, 55h ; 'U' mulss xmm6, xmm11 movaps xmm4, cs:xmmword_CF150 movaps xmm5, xmm9 shufps xmm5, xmm9, 0 mulps xmm5, xmm10 movaps xmm7, xmm5 mulss xmm7, xmm1 addss xmm7, xmm6 xorps xmm6, xmm4 xorps xmm4, xmm2 movaps xmm8, xmm1 shufps xmm8, xmm1, 0 unpcklps xmm2, xmm0 mulss xmm9, xmm9 mulss xmm9, xmm1 addss xmm9, xmm0 unpcklps xmm0, xmm4 movaps xmm4, [rsp+58h+var_38] shufps xmm4, xmm3, 0D4h shufps xmm4, xmm3, 52h ; 'R' mulps xmm3, xmm8 addps xmm3, xmm0 movlps qword ptr [rbx], xmm3 mulps xmm4, xmm8 addps xmm4, xmm2 movlps qword ptr [rbx+10h], xmm4 movaps xmm0, xmm11 mulss xmm0, xmm10 unpcklps xmm6, xmm0 mulps xmm8, xmm5 addps xmm8, xmm6 movlps qword ptr [rbx+20h], xmm8 movss dword ptr [rbx+8], xmm7 shufps xmm5, xmm5, 55h ; 'U' mulss xmm5, xmm1 subss xmm5, xmm0 movss dword ptr [rbx+18h], xmm5 movss dword ptr [rbx+28h], xmm9 xor eax, eax mov [rbx+0Ch], eax mov [rbx+1Ch], eax xorps xmm0, xmm0 movups xmmword ptr [rbx+2Ch], xmm0 mov dword ptr [rbx+3Ch], 3F800000h mov rax, rbx add rsp, 50h pop rbx retn
long long MatrixRotate(long long a1, __m128 a2, __m128 a3, __m128 a4) { __m128 v5; // xmm2 __m128 v6; // xmm4 __m128 v7; // xmm4 float v8; // xmm3_4 __m128 v9; // xmm1 __m128 v10; // xmm1 __m128 v11; // xmm0 __m128 v12; // xmm0 __m128 v13; // xmm1 __m128 v14; // xmm3 __m128 v15; // xmm2 __m128 v16; // xmm6 __m128 v17; // xmm5 float v18; // xmm7_4 __m128 v19; // xmm8 float v20; // xmm9_4 __m128 v21; // xmm0 float v23; // [rsp+Ch] [rbp-4Ch] __m128 v24; // [rsp+10h] [rbp-48h] __m128 v25; // [rsp+20h] [rbp-38h] __m128 v26; // [rsp+30h] [rbp-28h] __m128 v27; // [rsp+40h] [rbp-18h] v5 = a3; v6 = _mm_mul_ps(a2, a2); v7 = _mm_shuffle_ps(v6, v6, 85); v8 = (float)(v5.m128_f32[0] * v5.m128_f32[0]) + (float)((float)(a2.m128_f32[0] * a2.m128_f32[0]) + v7.m128_f32[0]); if ( v8 == 1.0 || v8 == 0.0 ) { v26 = a3; v24 = a2; v25 = v7; } else { v9 = (__m128)0x3F800000u; v9.m128_f32[0] = 1.0 / fsqrt(v8); v5.m128_f32[0] = v5.m128_f32[0] * v9.m128_f32[0]; v26 = v5; v24 = _mm_mul_ps(a2, _mm_shuffle_ps(v9, v9, 0)); v10 = _mm_mul_ps(v24, v24); v25 = _mm_shuffle_ps(v10, v10, 85); } v11.m128_u64[1] = a4.m128_u64[1]; v23 = a4.m128_f32[0]; *(double *)v11.m128_u64 = sinf(a4.m128_f32[0]); v27 = v11; v12 = (__m128)LODWORD(v23); *(double *)v12.m128_u64 = cosf(v23); v13 = (__m128)0x3F800000u; v13.m128_f32[0] = 1.0 - v12.m128_f32[0]; v14 = _mm_mul_ps(_mm_shuffle_ps(v24, v24, 0), v24); v15 = v26; v15.m128_f32[0] = v26.m128_f32[0] * v27.m128_f32[0]; v16 = _mm_shuffle_ps(v24, v24, 85); v16.m128_f32[0] = v16.m128_f32[0] * v27.m128_f32[0]; v17 = _mm_mul_ps(_mm_shuffle_ps(v26, v26, 0), v24); v18 = (float)(v17.m128_f32[0] * (float)(1.0 - v12.m128_f32[0])) + v16.m128_f32[0]; v19 = _mm_shuffle_ps(v13, v13, 0); v20 = (float)((float)(v26.m128_f32[0] * v26.m128_f32[0]) * (float)(1.0 - v12.m128_f32[0])) + v12.m128_f32[0]; _mm_storel_ps( (double *)a1, _mm_add_ps(_mm_mul_ps(v14, v19), _mm_unpacklo_ps(v12, _mm_xor_ps((__m128)xmmword_CF150, v15)))); _mm_storel_ps( (double *)(a1 + 16), _mm_add_ps(_mm_mul_ps(_mm_shuffle_ps(_mm_shuffle_ps(v25, v14, 212), v14, 82), v19), _mm_unpacklo_ps(v15, v12))); v21 = v27; v21.m128_f32[0] = v27.m128_f32[0] * v24.m128_f32[0]; _mm_storel_ps( (double *)(a1 + 32), _mm_add_ps(_mm_mul_ps(v19, v17), _mm_unpacklo_ps(_mm_xor_ps(v16, (__m128)xmmword_CF150), v21))); *(float *)(a1 + 8) = v18; *(float *)(a1 + 24) = (float)(_mm_shuffle_ps(v17, v17, 85).m128_f32[0] * v13.m128_f32[0]) - (float)(v27.m128_f32[0] * v24.m128_f32[0]); *(float *)(a1 + 40) = v20; *(_DWORD *)(a1 + 12) = 0; *(_DWORD *)(a1 + 28) = 0; *(_OWORD *)(a1 + 44) = 0LL; *(_DWORD *)(a1 + 60) = 1065353216; return a1; }
MatrixRotate: PUSH RBX SUB RSP,0x50 MOVAPS XMM5,XMM2 MOVAPS XMM2,XMM1 MOV RBX,RDI MOVAPS XMM4,XMM0 MULPS XMM4,XMM0 SHUFPS XMM4,XMM4,0x55 MOVAPS XMM1,XMM0 MULSS XMM1,XMM0 ADDSS XMM1,XMM4 MOVAPS XMM3,XMM2 MULSS XMM3,XMM2 ADDSS XMM3,XMM1 UCOMISS XMM3,dword ptr [0x001d3b1c] JNZ 0x001688c0 JNP 0x00168900 LAB_001688c0: XORPS XMM1,XMM1 UCOMISS XMM3,XMM1 JNZ 0x001688ca JNP 0x00168900 LAB_001688ca: SQRTSS XMM3,XMM3 MOVSS XMM1,dword ptr [0x001d3b1c] DIVSS XMM1,XMM3 MULSS XMM2,XMM1 MOVAPS xmmword ptr [RSP + 0x30],XMM2 SHUFPS XMM1,XMM1,0x0 MULPS XMM0,XMM1 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOVAPS XMM1,XMM0 MULPS XMM1,XMM0 SHUFPS XMM1,XMM1,0x55 MOVAPS xmmword ptr [RSP + 0x20],XMM1 JMP 0x0016890f LAB_00168900: MOVAPS xmmword ptr [RSP + 0x30],XMM2 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOVAPS xmmword ptr [RSP + 0x20],XMM4 LAB_0016890f: MOVAPS XMM0,XMM5 MOVSS dword ptr [RSP + 0xc],XMM5 CALL 0x0010a420 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOVSS XMM0,dword ptr [RSP + 0xc] CALL 0x0010a3b0 MOVSS XMM1,dword ptr [0x001d3b1c] SUBSS XMM1,XMM0 MOVAPS XMM10,xmmword ptr [RSP + 0x10] MOVAPS XMM3,XMM10 SHUFPS XMM3,XMM10,0x0 MULPS XMM3,XMM10 MOVAPS XMM9,xmmword ptr [RSP + 0x30] MOVAPS XMM2,XMM9 MOVAPS XMM11,xmmword ptr [RSP + 0x40] MULSS XMM2,XMM11 MOVAPS XMM6,XMM10 SHUFPS XMM6,XMM10,0x55 MULSS XMM6,XMM11 MOVAPS XMM4,xmmword ptr [0x001cf150] MOVAPS XMM5,XMM9 SHUFPS XMM5,XMM9,0x0 MULPS XMM5,XMM10 MOVAPS XMM7,XMM5 MULSS XMM7,XMM1 ADDSS XMM7,XMM6 XORPS XMM6,XMM4 XORPS XMM4,XMM2 MOVAPS XMM8,XMM1 SHUFPS XMM8,XMM1,0x0 UNPCKLPS XMM2,XMM0 MULSS XMM9,XMM9 MULSS XMM9,XMM1 ADDSS XMM9,XMM0 UNPCKLPS XMM0,XMM4 MOVAPS XMM4,xmmword ptr [RSP + 0x20] SHUFPS XMM4,XMM3,0xd4 SHUFPS XMM4,XMM3,0x52 MULPS XMM3,XMM8 ADDPS XMM3,XMM0 MOVLPS qword ptr [RBX],XMM3 MULPS XMM4,XMM8 ADDPS XMM4,XMM2 MOVLPS qword ptr [RBX + 0x10],XMM4 MOVAPS XMM0,XMM11 MULSS XMM0,XMM10 UNPCKLPS XMM6,XMM0 MULPS XMM8,XMM5 ADDPS XMM8,XMM6 MOVLPS qword ptr [RBX + 0x20],XMM8 MOVSS dword ptr [RBX + 0x8],XMM7 SHUFPS XMM5,XMM5,0x55 MULSS XMM5,XMM1 SUBSS XMM5,XMM0 MOVSS dword ptr [RBX + 0x18],XMM5 MOVSS dword ptr [RBX + 0x28],XMM9 XOR EAX,EAX MOV dword ptr [RBX + 0xc],EAX MOV dword ptr [RBX + 0x1c],EAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x2c],XMM0 MOV dword ptr [RBX + 0x3c],0x3f800000 MOV RAX,RBX ADD RSP,0x50 POP RBX RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int8 * MatrixRotate(int8 param_1,float param_2,float param_3,int8 *param_4) { float fVar1; float fVar2; float fVar3; float fVar4; float local_48; float fStack_44; float local_38; float local_28; fStack_44 = (float)((ulong)param_1 >> 0x20); local_48 = (float)param_1; local_38 = fStack_44 * fStack_44; fVar3 = param_2 * param_2 + local_48 * local_48 + local_38; local_28 = param_2; if (((fVar3 != DAT_001d3b1c) || (NAN(fVar3) || NAN(DAT_001d3b1c))) && ((fVar3 != 0.0 || (NAN(fVar3))))) { fVar3 = DAT_001d3b1c / SQRT(fVar3); local_28 = param_2 * fVar3; local_48 = local_48 * fVar3; fStack_44 = fStack_44 * fVar3; local_38 = fStack_44 * fStack_44; } fVar3 = sinf(param_3); fVar1 = cosf(param_3); fVar2 = DAT_001d3b1c - fVar1; fVar4 = (float)((uint)(fStack_44 * fVar3) ^ _DAT_001cf150); *param_4 = CONCAT44(local_48 * fStack_44 * fVar2 + (float)(_DAT_001cf150 ^ (uint)(local_28 * fVar3)), local_48 * local_48 * fVar2 + fVar1); param_4[2] = CONCAT44(local_38 * fVar2 + fVar1,local_48 * fStack_44 * fVar2 + local_28 * fVar3); param_4[4] = CONCAT44(fVar2 * local_28 * fStack_44 + fVar3 * local_48, fVar2 * local_28 * local_48 + fVar4); *(float *)(param_4 + 1) = local_28 * local_48 * fVar2 + fStack_44 * fVar3; *(float *)(param_4 + 3) = local_28 * fStack_44 * fVar2 - fVar3 * local_48; *(float *)(param_4 + 5) = local_28 * local_28 * fVar2 + fVar1; *(int4 *)((long)param_4 + 0xc) = 0; *(int4 *)((long)param_4 + 0x1c) = 0; *(int8 *)((long)param_4 + 0x2c) = 0; *(int8 *)((long)param_4 + 0x34) = 0; *(int4 *)((long)param_4 + 0x3c) = 0x3f800000; return param_4; }
51,467
test_bug38486
eloqsql/libmariadb/unittest/libmariadb/cursor.c
static int test_bug38486(MYSQL *mysql) { MYSQL_STMT *stmt; const char *stmt_text; int rc; unsigned long type= CURSOR_TYPE_READ_ONLY; rc= mysql_query(mysql, "DROP TABLE IF EXISTS t10"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "CREATE TABLE t10 (a INT)"); check_mysql_rc(rc, mysql); stmt= mysql_stmt_init(mysql); rc= mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, (void*)&type); check_stmt_rc(rc, stmt); stmt_text= "INSERT INTO t10 VALUES (1)"; rc= mysql_stmt_prepare(stmt, SL(stmt_text)); check_stmt_rc(rc, stmt); rc= mysql_stmt_execute(stmt); check_stmt_rc(rc, stmt); rc= mysql_query(mysql, "DROP TABLE IF EXISTS t10"); check_mysql_rc(rc, mysql); mysql_stmt_close(stmt); return OK; }
O0
c
test_bug38486: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movq $0x1, -0x30(%rbp) movq -0x10(%rbp), %rdi leaq 0x39c5f(%rip), %rsi # 0x5587e callq 0x26160 movl %eax, -0x24(%rbp) cmpl $0x0, -0x24(%rbp) je 0x1bc79 movl -0x24(%rbp), %eax movl %eax, -0x3c(%rbp) movq -0x10(%rbp), %rdi callq 0x29ae0 movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rdi callq 0x29ab0 movl -0x3c(%rbp), %esi movq -0x38(%rbp), %rdx movl %eax, %ecx leaq 0x37644(%rip), %rdi # 0x5329d leaq 0x37a84(%rip), %r8 # 0x536e4 movl $0x5e3, %r9d # imm = 0x5E3 movb $0x0, %al callq 0x1d330 movl $0x1, -0x4(%rbp) jmp 0x1be69 jmp 0x1bc7b movq -0x10(%rbp), %rdi leaq 0x39c11(%rip), %rsi # 0x55897 callq 0x26160 movl %eax, -0x24(%rbp) cmpl $0x0, -0x24(%rbp) je 0x1bce0 movl -0x24(%rbp), %eax movl %eax, -0x4c(%rbp) movq -0x10(%rbp), %rdi callq 0x29ae0 movq %rax, -0x48(%rbp) movq -0x10(%rbp), %rdi callq 0x29ab0 movl -0x4c(%rbp), %esi movq -0x48(%rbp), %rdx movl %eax, %ecx leaq 0x375dd(%rip), %rdi # 0x5329d leaq 0x37a1d(%rip), %r8 # 0x536e4 movl $0x5e6, %r9d # imm = 0x5E6 movb $0x0, %al callq 0x1d330 movl $0x1, -0x4(%rbp) jmp 0x1be69 jmp 0x1bce2 movq -0x10(%rbp), %rdi callq 0x32040 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rdi movl $0x1, %esi leaq -0x30(%rbp), %rdx callq 0x30220 movsbl %al, %eax movl %eax, -0x24(%rbp) cmpl $0x0, -0x24(%rbp) je 0x1bd3f movq -0x18(%rbp), %rdi callq 0x316c0 movq %rax, %rsi leaq 0x37438(%rip), %rdi # 0x53158 leaq 0x379bd(%rip), %rdx # 0x536e4 movl $0x5ea, %ecx # imm = 0x5EA movb $0x0, %al callq 0x1d330 movl $0x1, -0x4(%rbp) jmp 0x1be69 jmp 0x1bd41 leaq 0x39b68(%rip), %rax # 0x558b0 movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x20(%rbp), %rdi callq 0x131a0 movq -0x60(%rbp), %rdi movq -0x58(%rbp), %rsi movq %rax, %rdx callq 0x32760 movl %eax, -0x24(%rbp) cmpl $0x0, -0x24(%rbp) je 0x1bdb0 movq -0x18(%rbp), %rdi callq 0x316c0 movq %rax, %rsi leaq 0x373c7(%rip), %rdi # 0x53158 leaq 0x3794c(%rip), %rdx # 0x536e4 movl $0x5ed, %ecx # imm = 0x5ED movb $0x0, %al callq 0x1d330 movl $0x1, -0x4(%rbp) jmp 0x1be69 jmp 0x1bdb2 movq -0x18(%rbp), %rdi callq 0x33c70 movl %eax, -0x24(%rbp) cmpl $0x0, -0x24(%rbp) je 0x1bdf3 movq -0x18(%rbp), %rdi callq 0x316c0 movq %rax, %rsi leaq 0x37381(%rip), %rdi # 0x53158 leaq 0x37906(%rip), %rdx # 0x536e4 movl $0x5ef, %ecx # imm = 0x5EF movb $0x0, %al callq 0x1d330 movl $0x1, -0x4(%rbp) jmp 0x1be69 jmp 0x1bdf5 movq -0x10(%rbp), %rdi leaq 0x39a7e(%rip), %rsi # 0x5587e callq 0x26160 movl %eax, -0x24(%rbp) cmpl $0x0, -0x24(%rbp) je 0x1be57 movl -0x24(%rbp), %eax movl %eax, -0x6c(%rbp) movq -0x10(%rbp), %rdi callq 0x29ae0 movq %rax, -0x68(%rbp) movq -0x10(%rbp), %rdi callq 0x29ab0 movl -0x6c(%rbp), %esi movq -0x68(%rbp), %rdx movl %eax, %ecx leaq 0x37463(%rip), %rdi # 0x5329d leaq 0x378a3(%rip), %r8 # 0x536e4 movl $0x5f1, %r9d # imm = 0x5F1 movb $0x0, %al callq 0x1d330 movl $0x1, -0x4(%rbp) jmp 0x1be69 jmp 0x1be59 movq -0x18(%rbp), %rdi callq 0x315a0 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x70, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
test_bug38486: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_10], rdi mov [rbp+var_30], 1 mov rdi, [rbp+var_10] lea rsi, aDropTableIfExi_4; "DROP TABLE IF EXISTS t10" call mysql_query mov [rbp+var_24], eax cmp [rbp+var_24], 0 jz short loc_1BC79 mov eax, [rbp+var_24] mov [rbp+var_3C], eax mov rdi, [rbp+var_10] call mysql_error mov [rbp+var_38], rax mov rdi, [rbp+var_10] call mysql_errno mov esi, [rbp+var_3C] mov rdx, [rbp+var_38] mov ecx, eax lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov r9d, 5E3h mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_1BE69 loc_1BC79: jmp short $+2 loc_1BC7B: mov rdi, [rbp+var_10] lea rsi, aCreateTableT10; "CREATE TABLE t10 (a INT)" call mysql_query mov [rbp+var_24], eax cmp [rbp+var_24], 0 jz short loc_1BCE0 mov eax, [rbp+var_24] mov [rbp+var_4C], eax mov rdi, [rbp+var_10] call mysql_error mov [rbp+var_48], rax mov rdi, [rbp+var_10] call mysql_errno mov esi, [rbp+var_4C] mov rdx, [rbp+var_48] mov ecx, eax lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov r9d, 5E6h mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_1BE69 loc_1BCE0: jmp short $+2 loc_1BCE2: mov rdi, [rbp+var_10] call mysql_stmt_init mov [rbp+var_18], rax mov rdi, [rbp+var_18] mov esi, 1 lea rdx, [rbp+var_30] call mysql_stmt_attr_set movsx eax, al mov [rbp+var_24], eax cmp [rbp+var_24], 0 jz short loc_1BD3F mov rdi, [rbp+var_18] call mysql_stmt_error mov rsi, rax lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 5EAh mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_1BE69 loc_1BD3F: jmp short $+2 loc_1BD41: lea rax, aInsertIntoT10V; "INSERT INTO t10 VALUES (1)" mov [rbp+var_20], rax mov rax, [rbp+var_18] mov [rbp+var_60], rax mov rax, [rbp+var_20] mov [rbp+var_58], rax mov rdi, [rbp+var_20] call _strlen mov rdi, [rbp+var_60] mov rsi, [rbp+var_58] mov rdx, rax call mysql_stmt_prepare mov [rbp+var_24], eax cmp [rbp+var_24], 0 jz short loc_1BDB0 mov rdi, [rbp+var_18] call mysql_stmt_error mov rsi, rax lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 5EDh mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_1BE69 loc_1BDB0: jmp short $+2 loc_1BDB2: mov rdi, [rbp+var_18] call mysql_stmt_execute mov [rbp+var_24], eax cmp [rbp+var_24], 0 jz short loc_1BDF3 mov rdi, [rbp+var_18] call mysql_stmt_error mov rsi, rax lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 5EFh mov al, 0 call diag mov [rbp+var_4], 1 jmp short loc_1BE69 loc_1BDF3: jmp short $+2 loc_1BDF5: mov rdi, [rbp+var_10] lea rsi, aDropTableIfExi_4; "DROP TABLE IF EXISTS t10" call mysql_query mov [rbp+var_24], eax cmp [rbp+var_24], 0 jz short loc_1BE57 mov eax, [rbp+var_24] mov [rbp+var_6C], eax mov rdi, [rbp+var_10] call mysql_error mov [rbp+var_68], rax mov rdi, [rbp+var_10] call mysql_errno mov esi, [rbp+var_6C] mov rdx, [rbp+var_68] mov ecx, eax lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov r9d, 5F1h mov al, 0 call diag mov [rbp+var_4], 1 jmp short loc_1BE69 loc_1BE57: jmp short $+2 loc_1BE59: mov rdi, [rbp+var_18] call mysql_stmt_close mov [rbp+var_4], 0 loc_1BE69: mov eax, [rbp+var_4] add rsp, 70h pop rbp retn
long long test_bug38486(long long a1) { int v1; // eax int v2; // eax char v3; // al int v4; // eax int v5; // r8d int v6; // r9d long long v7; // rax int v8; // eax int v9; // r8d int v10; // r9d int v11; // eax int v12; // r8d int v13; // r9d int v14; // eax int v16; // [rsp+4h] [rbp-6Ch] int v17; // [rsp+8h] [rbp-68h] long long v18; // [rsp+10h] [rbp-60h] int v19; // [rsp+28h] [rbp-48h] int v20; // [rsp+38h] [rbp-38h] long long v21; // [rsp+40h] [rbp-30h] BYREF int v22; // [rsp+4Ch] [rbp-24h] const char *v23; // [rsp+50h] [rbp-20h] long long v24; // [rsp+58h] [rbp-18h] long long v25; // [rsp+60h] [rbp-10h] v25 = a1; v21 = 1LL; v22 = mysql_query(a1, "DROP TABLE IF EXISTS t10"); if ( v22 ) { v20 = mysql_error(v25); v1 = mysql_errno(v25); diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v22, v20, v1, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/cursor.c", 1507); return 1; } else { v22 = mysql_query(v25, "CREATE TABLE t10 (a INT)"); if ( v22 ) { v19 = mysql_error(v25); v2 = mysql_errno(v25); diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v22, v19, v2, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/cursor.c", 1510); return 1; } else { v24 = mysql_stmt_init(v25); v3 = mysql_stmt_attr_set(v24, 1LL, &v21); v22 = v3; if ( v3 ) { v4 = mysql_stmt_error(v24); diag( (unsigned int)"Error: %s (%s: %d)", v4, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/cursor.c", 1514, v5, v6); return 1; } else { v23 = "INSERT INTO t10 VALUES (1)"; v18 = v24; v7 = strlen("INSERT INTO t10 VALUES (1)"); v22 = mysql_stmt_prepare(v18, "INSERT INTO t10 VALUES (1)", v7); if ( v22 ) { v8 = mysql_stmt_error(v24); diag( (unsigned int)"Error: %s (%s: %d)", v8, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/cursor.c", 1517, v9, v10); return 1; } else { v22 = mysql_stmt_execute(v24); if ( v22 ) { v11 = mysql_stmt_error(v24); diag( (unsigned int)"Error: %s (%s: %d)", v11, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/cursor.c", 1519, v12, v13); return 1; } else { v22 = mysql_query(v25, "DROP TABLE IF EXISTS t10"); if ( v22 ) { v16 = v22; v17 = mysql_error(v25); v14 = mysql_errno(v25); diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v16, v17, v14, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/cursor.c", 1521); return 1; } else { mysql_stmt_close(v24); return 0; } } } } } } }
test_bug38486: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x30],0x1 MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x15587e] CALL 0x00126160 MOV dword ptr [RBP + -0x24],EAX CMP dword ptr [RBP + -0x24],0x0 JZ 0x0011bc79 MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x3c],EAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00129ae0 MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00129ab0 MOV ESI,dword ptr [RBP + -0x3c] MOV RDX,qword ptr [RBP + -0x38] MOV ECX,EAX LEA RDI,[0x15329d] LEA R8,[0x1536e4] MOV R9D,0x5e3 MOV AL,0x0 CALL 0x0011d330 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0011be69 LAB_0011bc79: JMP 0x0011bc7b LAB_0011bc7b: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x155897] CALL 0x00126160 MOV dword ptr [RBP + -0x24],EAX CMP dword ptr [RBP + -0x24],0x0 JZ 0x0011bce0 MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4c],EAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00129ae0 MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00129ab0 MOV ESI,dword ptr [RBP + -0x4c] MOV RDX,qword ptr [RBP + -0x48] MOV ECX,EAX LEA RDI,[0x15329d] LEA R8,[0x1536e4] MOV R9D,0x5e6 MOV AL,0x0 CALL 0x0011d330 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0011be69 LAB_0011bce0: JMP 0x0011bce2 LAB_0011bce2: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00132040 MOV qword ptr [RBP + -0x18],RAX MOV RDI,qword ptr [RBP + -0x18] MOV ESI,0x1 LEA RDX,[RBP + -0x30] CALL 0x00130220 MOVSX EAX,AL MOV dword ptr [RBP + -0x24],EAX CMP dword ptr [RBP + -0x24],0x0 JZ 0x0011bd3f MOV RDI,qword ptr [RBP + -0x18] CALL 0x001316c0 MOV RSI,RAX LEA RDI,[0x153158] LEA RDX,[0x1536e4] MOV ECX,0x5ea MOV AL,0x0 CALL 0x0011d330 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0011be69 LAB_0011bd3f: JMP 0x0011bd41 LAB_0011bd41: LEA RAX,[0x1558b0] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x58],RAX MOV RDI,qword ptr [RBP + -0x20] CALL 0x001131a0 MOV RDI,qword ptr [RBP + -0x60] MOV RSI,qword ptr [RBP + -0x58] MOV RDX,RAX CALL 0x00132760 MOV dword ptr [RBP + -0x24],EAX CMP dword ptr [RBP + -0x24],0x0 JZ 0x0011bdb0 MOV RDI,qword ptr [RBP + -0x18] CALL 0x001316c0 MOV RSI,RAX LEA RDI,[0x153158] LEA RDX,[0x1536e4] MOV ECX,0x5ed MOV AL,0x0 CALL 0x0011d330 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0011be69 LAB_0011bdb0: JMP 0x0011bdb2 LAB_0011bdb2: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00133c70 MOV dword ptr [RBP + -0x24],EAX CMP dword ptr [RBP + -0x24],0x0 JZ 0x0011bdf3 MOV RDI,qword ptr [RBP + -0x18] CALL 0x001316c0 MOV RSI,RAX LEA RDI,[0x153158] LEA RDX,[0x1536e4] MOV ECX,0x5ef MOV AL,0x0 CALL 0x0011d330 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0011be69 LAB_0011bdf3: JMP 0x0011bdf5 LAB_0011bdf5: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x15587e] CALL 0x00126160 MOV dword ptr [RBP + -0x24],EAX CMP dword ptr [RBP + -0x24],0x0 JZ 0x0011be57 MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x6c],EAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00129ae0 MOV qword ptr [RBP + -0x68],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00129ab0 MOV ESI,dword ptr [RBP + -0x6c] MOV RDX,qword ptr [RBP + -0x68] MOV ECX,EAX LEA RDI,[0x15329d] LEA R8,[0x1536e4] MOV R9D,0x5f1 MOV AL,0x0 CALL 0x0011d330 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0011be69 LAB_0011be57: JMP 0x0011be59 LAB_0011be59: MOV RDI,qword ptr [RBP + -0x18] CALL 0x001315a0 MOV dword ptr [RBP + -0x4],0x0 LAB_0011be69: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x70 POP RBP RET
int4 test_bug38486(int8 param_1) { char cVar1; int iVar2; int4 uVar3; int8 uVar4; size_t sVar5; int8 local_38; int local_2c; char *local_28; int8 local_20; int8 local_18; int4 local_c; local_38 = 1; local_18 = param_1; iVar2 = mysql_query(param_1,"DROP TABLE IF EXISTS t10"); local_2c = iVar2; if (iVar2 == 0) { iVar2 = mysql_query(local_18,"CREATE TABLE t10 (a INT)"); local_2c = iVar2; if (iVar2 == 0) { local_20 = mysql_stmt_init(local_18); cVar1 = mysql_stmt_attr_set(local_20,1,&local_38); uVar4 = local_20; local_2c = (int)cVar1; if (local_2c == 0) { local_28 = "INSERT INTO t10 VALUES (1)"; sVar5 = strlen("INSERT INTO t10 VALUES (1)"); local_2c = mysql_stmt_prepare(uVar4,"INSERT INTO t10 VALUES (1)",sVar5); if (local_2c == 0) { local_2c = mysql_stmt_execute(local_20); if (local_2c == 0) { iVar2 = mysql_query(local_18,"DROP TABLE IF EXISTS t10"); local_2c = iVar2; if (iVar2 == 0) { mysql_stmt_close(local_20); local_c = 0; } else { uVar4 = mysql_error(local_18); uVar3 = mysql_errno(local_18); diag("Error (%d): %s (%d) in %s line %d",iVar2,uVar4,uVar3, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/cursor.c" ,0x5f1); local_c = 1; } } else { uVar4 = mysql_stmt_error(local_20); diag("Error: %s (%s: %d)",uVar4, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/cursor.c", 0x5ef); local_c = 1; } } else { uVar4 = mysql_stmt_error(local_20); diag("Error: %s (%s: %d)",uVar4, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/cursor.c", 0x5ed); local_c = 1; } } else { uVar4 = mysql_stmt_error(local_20); diag("Error: %s (%s: %d)",uVar4, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/cursor.c", 0x5ea); local_c = 1; } } else { uVar4 = mysql_error(local_18); uVar3 = mysql_errno(local_18); diag("Error (%d): %s (%d) in %s line %d",iVar2,uVar4,uVar3, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/cursor.c",0x5e6) ; local_c = 1; } } else { uVar4 = mysql_error(local_18); uVar3 = mysql_errno(local_18); diag("Error (%d): %s (%d) in %s line %d",iVar2,uVar4,uVar3, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/cursor.c",0x5e3); local_c = 1; } return local_c; }
51,468
reset_simple_key_cache_counters
eloqsql/mysys/mf_keycache.c
static int reset_simple_key_cache_counters(const char *name __attribute__((unused)), SIMPLE_KEY_CACHE_CB *keycache) { DBUG_ENTER("reset_simple_key_cache_counters"); if (!keycache->key_cache_inited) { DBUG_PRINT("info", ("Key cache %s not initialized.", name)); DBUG_RETURN(0); } DBUG_PRINT("info", ("Resetting counters for key cache %s.", name)); keycache->global_blocks_changed= 0; /* Key_blocks_not_flushed */ keycache->global_cache_r_requests= 0; /* Key_read_requests */ keycache->global_cache_read= 0; /* Key_reads */ keycache->global_cache_w_requests= 0; /* Key_write_requests */ keycache->global_cache_write= 0; /* Key_writes */ DBUG_RETURN(0); }
O3
c
reset_simple_key_cache_counters: pushq %rbp movq %rsp, %rbp cmpb $0x0, (%rsi) je 0x54eda xorps %xmm0, %xmm0 movups %xmm0, 0x148(%rsi) movups %xmm0, 0x138(%rsi) movq $0x0, 0x158(%rsi) xorl %eax, %eax popq %rbp retq
reset_simple_key_cache_counters: push rbp mov rbp, rsp cmp byte ptr [rsi], 0 jz short loc_54EDA xorps xmm0, xmm0 movups xmmword ptr [rsi+148h], xmm0 movups xmmword ptr [rsi+138h], xmm0 mov qword ptr [rsi+158h], 0 loc_54EDA: xor eax, eax pop rbp retn
long long reset_simple_key_cache_counters(long long a1, long long a2) { if ( *(_BYTE *)a2 ) { *(_OWORD *)(a2 + 328) = 0LL; *(_OWORD *)(a2 + 312) = 0LL; *(_QWORD *)(a2 + 344) = 0LL; } return 0LL; }
reset_simple_key_cache_counters: PUSH RBP MOV RBP,RSP CMP byte ptr [RSI],0x0 JZ 0x00154eda XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI + 0x148],XMM0 MOVUPS xmmword ptr [RSI + 0x138],XMM0 MOV qword ptr [RSI + 0x158],0x0 LAB_00154eda: XOR EAX,EAX POP RBP RET
int8 reset_simple_key_cache_counters(int8 param_1,char *param_2) { if (*param_2 != '\0') { param_2[0x148] = '\0'; param_2[0x149] = '\0'; param_2[0x14a] = '\0'; param_2[0x14b] = '\0'; param_2[0x14c] = '\0'; param_2[0x14d] = '\0'; param_2[0x14e] = '\0'; param_2[0x14f] = '\0'; param_2[0x150] = '\0'; param_2[0x151] = '\0'; param_2[0x152] = '\0'; param_2[0x153] = '\0'; param_2[0x154] = '\0'; param_2[0x155] = '\0'; param_2[0x156] = '\0'; param_2[0x157] = '\0'; param_2[0x138] = '\0'; param_2[0x139] = '\0'; param_2[0x13a] = '\0'; param_2[0x13b] = '\0'; param_2[0x13c] = '\0'; param_2[0x13d] = '\0'; param_2[0x13e] = '\0'; param_2[0x13f] = '\0'; param_2[0x140] = '\0'; param_2[0x141] = '\0'; param_2[0x142] = '\0'; param_2[0x143] = '\0'; param_2[0x144] = '\0'; param_2[0x145] = '\0'; param_2[0x146] = '\0'; param_2[0x147] = '\0'; param_2[0x158] = '\0'; param_2[0x159] = '\0'; param_2[0x15a] = '\0'; param_2[0x15b] = '\0'; param_2[0x15c] = '\0'; param_2[0x15d] = '\0'; param_2[0x15e] = '\0'; param_2[0x15f] = '\0'; } return 0; }
51,469
mi_write_blob_record
eloqsql/storage/myisam/mi_dynrec.c
int _mi_write_blob_record(MI_INFO *info, const uchar *record) { uchar *rec_buff; int error; ulong reclength,reclength2,extra; extra= (ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER)+MI_SPLIT_LENGTH+ MI_DYN_DELETE_BLOCK_HEADER+1); reclength= (info->s->base.pack_reclength + _mi_calc_total_blob_length(info,record)+ extra); if (!(rec_buff=(uchar*) my_alloca(reclength))) { my_errno= HA_ERR_OUT_OF_MEM; /* purecov: inspected */ return(-1); } reclength2= _mi_rec_pack(info,rec_buff+ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER), record); DBUG_PRINT("info",("reclength: %lu reclength2: %lu", reclength, reclength2)); DBUG_ASSERT(reclength2 <= reclength); error=write_dynamic_record(info,rec_buff+ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER), reclength2); my_afree(rec_buff); return(error); }
O0
c
mi_write_blob_record: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq $0x5d, -0x40(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x148(%rax), %rax movq %rax, -0x48(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0xa8280 movq %rax, %rcx movq -0x48(%rbp), %rax addq %rcx, %rax addq -0x40(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rsi xorl %edi, %edi xorl %eax, %eax movl %eax, %edx callq 0xf3210 movq %rax, -0x20(%rbp) cmpq $0x0, %rax jne 0xa8226 callq 0xf5a70 movl $0x80, (%rax) movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xa826e movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi addq $0x18, %rsi movq -0x18(%rbp), %rdx callq 0xa72f0 movl %eax, %eax movq %rax, -0x38(%rbp) jmp 0xa8243 jmp 0xa8245 jmp 0xa8247 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi addq $0x18, %rsi movq -0x38(%rbp), %rdx callq 0xa7840 movl %eax, -0x24(%rbp) movq -0x20(%rbp), %rdi callq 0xf3590 movl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw (%rax,%rax)
_mi_write_blob_record: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_40], 5Dh ; ']' mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+148h] mov [rbp+var_48], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call _mi_calc_total_blob_length mov rcx, rax mov rax, [rbp+var_48] add rax, rcx add rax, [rbp+var_40] mov [rbp+var_30], rax mov rsi, [rbp+var_30] xor edi, edi xor eax, eax mov edx, eax call my_malloc mov [rbp+var_20], rax cmp rax, 0 jnz short loc_A8226 call _my_thread_var mov dword ptr [rax], 80h mov [rbp+var_4], 0FFFFFFFFh jmp short loc_A826E loc_A8226: mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] add rsi, 18h mov rdx, [rbp+var_18] call _mi_rec_pack mov eax, eax mov [rbp+var_38], rax jmp short $+2 loc_A8243: jmp short $+2 loc_A8245: jmp short $+2 loc_A8247: mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] add rsi, 18h mov rdx, [rbp+var_38] call write_dynamic_record_0 mov [rbp+var_24], eax mov rdi, [rbp+var_20] call my_free mov eax, [rbp+var_24] mov [rbp+var_4], eax loc_A826E: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long mi_write_blob_record(_DWORD *a1, _BYTE *a2) { const char *v2; // rsi long long v4; // [rsp+8h] [rbp-48h] long long v5; // [rsp+18h] [rbp-38h] unsigned int v6; // [rsp+2Ch] [rbp-24h] long long v7; // [rsp+30h] [rbp-20h] v4 = *(_QWORD *)(*(_QWORD *)a1 + 328LL); v2 = (const char *)(mi_calc_total_blob_length(a1, a2) + v4 + 93); v7 = my_malloc(0LL, v2, 0LL); if ( v7 ) { v5 = (unsigned int)mi_rec_pack(a1, (_BYTE *)(v7 + 24), a2); v6 = write_dynamic_record_0(a1, (const char *)(v7 + 24), v5); my_free(v7); return v6; } else { *(_DWORD *)my_thread_var(0LL, v2) = 128; return (unsigned int)-1; } }
_mi_write_blob_record: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x40],0x5d MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x148] MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001a8280 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x48] ADD RAX,RCX ADD RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x30],RAX MOV RSI,qword ptr [RBP + -0x30] XOR EDI,EDI XOR EAX,EAX MOV EDX,EAX CALL 0x001f3210 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JNZ 0x001a8226 CALL 0x001f5a70 MOV dword ptr [RAX],0x80 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001a826e LAB_001a8226: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] ADD RSI,0x18 MOV RDX,qword ptr [RBP + -0x18] CALL 0x001a72f0 MOV EAX,EAX MOV qword ptr [RBP + -0x38],RAX JMP 0x001a8243 LAB_001a8243: JMP 0x001a8245 LAB_001a8245: JMP 0x001a8247 LAB_001a8247: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] ADD RSI,0x18 MOV RDX,qword ptr [RBP + -0x38] CALL 0x001a7840 MOV dword ptr [RBP + -0x24],EAX MOV RDI,qword ptr [RBP + -0x20] CALL 0x001f3590 MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4],EAX LAB_001a826e: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int4 _mi_write_blob_record(long *param_1,int8 param_2) { int4 uVar1; long lVar2; long lVar3; int4 *puVar4; int4 local_c; lVar3 = *(long *)(*param_1 + 0x148); lVar2 = _mi_calc_total_blob_length(param_1,param_2); lVar3 = my_malloc(0,lVar3 + lVar2 + 0x5d,0); if (lVar3 == 0) { puVar4 = (int4 *)_my_thread_var(); *puVar4 = 0x80; local_c = 0xffffffff; } else { uVar1 = _mi_rec_pack(param_1,lVar3 + 0x18,param_2); local_c = write_dynamic_record(param_1,lVar3 + 0x18,uVar1); my_free(lVar3); } return local_c; }
51,470
my_hash_next
eloqsql/mysys/hash.c
uchar* my_hash_next(const HASH *hash, const uchar *key, size_t length, HASH_SEARCH_STATE *current_record) { HASH_LINK *pos; uint idx; if (*current_record != NO_RECORD) { HASH_LINK *data=dynamic_element(&hash->array,0,HASH_LINK*); for (idx=data[*current_record].next; idx != NO_RECORD ; idx=pos->next) { pos=data+idx; if (!hashcmp(hash,pos,key,length)) { *current_record= idx; return pos->data; } } *current_record= NO_RECORD; } return 0; }
O0
c
my_hash_next: 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 -0x28(%rbp), %rax cmpl $-0x1, (%rax) je 0xe3487 movq -0x10(%rbp), %rax movq 0x28(%rax), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq -0x28(%rbp), %rcx movl (%rcx), %ecx shlq $0x4, %rcx addq %rcx, %rax movl (%rax), %eax movl %eax, -0x34(%rbp) cmpl $-0x1, -0x34(%rbp) je 0xe347d movq -0x40(%rbp), %rax movl -0x34(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx callq 0xe3310 cmpl $0x0, %eax jne 0xe3470 movl -0x34(%rbp), %ecx movq -0x28(%rbp), %rax movl %ecx, (%rax) movq -0x30(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x8(%rbp) jmp 0xe348f jmp 0xe3472 movq -0x30(%rbp), %rax movl (%rax), %eax movl %eax, -0x34(%rbp) jmp 0xe3427 movq -0x28(%rbp), %rax movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopl (%rax)
my_hash_next: 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 rax, [rbp+var_28] cmp dword ptr [rax], 0FFFFFFFFh jz loc_E3487 mov rax, [rbp+var_10] mov rax, [rax+28h] mov [rbp+var_40], rax mov rax, [rbp+var_40] mov rcx, [rbp+var_28] mov ecx, [rcx] shl rcx, 4 add rax, rcx mov eax, [rax] mov [rbp+var_34], eax loc_E3427: cmp [rbp+var_34], 0FFFFFFFFh jz short loc_E347D mov rax, [rbp+var_40] mov ecx, [rbp+var_34] shl rcx, 4 add rax, rcx mov [rbp+var_30], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_30] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] call hashcmp cmp eax, 0 jnz short loc_E3470 mov ecx, [rbp+var_34] mov rax, [rbp+var_28] mov [rax], ecx mov rax, [rbp+var_30] mov rax, [rax+8] mov [rbp+var_8], rax jmp short loc_E348F loc_E3470: jmp short $+2 loc_E3472: mov rax, [rbp+var_30] mov eax, [rax] mov [rbp+var_34], eax jmp short loc_E3427 loc_E347D: mov rax, [rbp+var_28] mov dword ptr [rax], 0FFFFFFFFh loc_E3487: mov [rbp+var_8], 0 loc_E348F: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long my_hash_next(long long a1, long long a2, long long a3, unsigned int *a4) { long long v5; // [rsp+0h] [rbp-40h] unsigned int i; // [rsp+Ch] [rbp-34h] long long v7; // [rsp+10h] [rbp-30h] if ( *a4 != -1 ) { v5 = *(_QWORD *)(a1 + 40); for ( i = *(_DWORD *)(16LL * *a4 + v5); i != -1; i = *(_DWORD *)v7 ) { v7 = 16LL * i + v5; if ( !hashcmp(a1, v7, a2, a3) ) { *a4 = i; return *(_QWORD *)(v7 + 8); } } *a4 = -1; } return 0LL; }
my_hash_next: 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 RAX,qword ptr [RBP + -0x28] CMP dword ptr [RAX],-0x1 JZ 0x001e3487 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RCX] SHL RCX,0x4 ADD RAX,RCX MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x34],EAX LAB_001e3427: CMP dword ptr [RBP + -0x34],-0x1 JZ 0x001e347d MOV RAX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RBP + -0x34] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] CALL 0x001e3310 CMP EAX,0x0 JNZ 0x001e3470 MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x8],RAX JMP 0x001e348f LAB_001e3470: JMP 0x001e3472 LAB_001e3472: MOV RAX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x34],EAX JMP 0x001e3427 LAB_001e347d: MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX],0xffffffff LAB_001e3487: MOV qword ptr [RBP + -0x8],0x0 LAB_001e348f: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
int8 my_hash_next(long param_1,int8 param_2,int8 param_3,uint *param_4) { long lVar1; int iVar2; uint *puVar3; uint local_3c; if (*param_4 != 0xffffffff) { lVar1 = *(long *)(param_1 + 0x28); local_3c = *(uint *)(lVar1 + (ulong)*param_4 * 0x10); while (local_3c != 0xffffffff) { puVar3 = (uint *)(lVar1 + (ulong)local_3c * 0x10); iVar2 = hashcmp(param_1,puVar3,param_2,param_3); if (iVar2 == 0) { *param_4 = local_3c; return *(int8 *)(puVar3 + 2); } local_3c = *puVar3; } *param_4 = 0xffffffff; } return 0; }
51,471
testing::internal::TestEventRepeater::OnTestIterationEnd(testing::UnitTest const&, int)
seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest.cc
void TestEventRepeater::OnTestIterationEnd(const UnitTest& unit_test, int iteration) { if (forwarding_enabled_) { for (size_t i = listeners_.size(); i > 0; i--) { listeners_[i - 1]->OnTestIterationEnd(unit_test, iteration); } } }
O1
cpp
testing::internal::TestEventRepeater::OnTestIterationEnd(testing::UnitTest const&, int): cmpb $0x1, 0x8(%rdi) jne 0x28191 pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r15 movq 0x18(%rdi), %r12 subq 0x10(%rdi), %r12 je 0x28186 movl %edx, %ebx movq %rsi, %r14 sarq $0x3, %r12 movq 0x10(%r15), %rax movq -0x8(%rax,%r12,8), %rdi movq (%rdi), %rax movq %r14, %rsi movl %ebx, %edx callq *0x80(%rax) decq %r12 jne 0x2816a addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
_ZN7testing8internal17TestEventRepeater18OnTestIterationEndERKNS_8UnitTestEi: cmp byte ptr [rdi+8], 1 jnz short locret_28191 push r15 push r14 push r12 push rbx push rax mov r15, rdi mov r12, [rdi+18h] sub r12, [rdi+10h] jz short loc_28186 mov ebx, edx mov r14, rsi sar r12, 3 loc_2816A: mov rax, [r15+10h] mov rdi, [rax+r12*8-8] mov rax, [rdi] mov rsi, r14 mov edx, ebx call qword ptr [rax+80h] dec r12 jnz short loc_2816A loc_28186: add rsp, 8 pop rbx pop r12 pop r14 pop r15 locret_28191: retn
long long testing::internal::TestEventRepeater::OnTestIterationEnd( testing::internal::TestEventRepeater *this, const testing::UnitTest *a2, unsigned int a3) { long long v4; // r12 long long v6; // r12 long long v7; // rdi long long result; // rax if ( *((_BYTE *)this + 8) == 1 ) { v4 = *((_QWORD *)this + 3) - *((_QWORD *)this + 2); if ( v4 ) { v6 = v4 >> 3; do { v7 = *(_QWORD *)(*((_QWORD *)this + 2) + 8 * v6 - 8); result = (*(long long ( **)(long long, const testing::UnitTest *, _QWORD))(*(_QWORD *)v7 + 128LL))( v7, a2, a3); --v6; } while ( v6 ); } } return result; }
OnTestIterationEnd: CMP byte ptr [RDI + 0x8],0x1 JNZ 0x00128191 PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R15,RDI MOV R12,qword ptr [RDI + 0x18] SUB R12,qword ptr [RDI + 0x10] JZ 0x00128186 MOV EBX,EDX MOV R14,RSI SAR R12,0x3 LAB_0012816a: MOV RAX,qword ptr [R15 + 0x10] MOV RDI,qword ptr [RAX + R12*0x8 + -0x8] MOV RAX,qword ptr [RDI] MOV RSI,R14 MOV EDX,EBX CALL qword ptr [RAX + 0x80] DEC R12 JNZ 0x0012816a LAB_00128186: ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 LAB_00128191: RET
/* testing::internal::TestEventRepeater::OnTestIterationEnd(testing::UnitTest const&, int) */ void __thiscall testing::internal::TestEventRepeater::OnTestIterationEnd (TestEventRepeater *this,UnitTest *param_1,int param_2) { long *plVar1; long lVar2; if ((this[8] == (TestEventRepeater)0x1) && (*(long *)(this + 0x18) - *(long *)(this + 0x10) != 0)) { lVar2 = *(long *)(this + 0x18) - *(long *)(this + 0x10) >> 3; do { plVar1 = *(long **)(*(long *)(this + 0x10) + -8 + lVar2 * 8); (**(code **)(*plVar1 + 0x80))(plVar1,param_1,param_2); lVar2 = lVar2 + -1; } while (lVar2 != 0); } return; }
51,472
google::protobuf::EnumDescriptorProto_EnumReservedRange::~EnumDescriptorProto_EnumReservedRange()
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
EnumDescriptorProto_EnumReservedRange::~EnumDescriptorProto_EnumReservedRange() { // @@protoc_insertion_point(destructor:google.protobuf.EnumDescriptorProto.EnumReservedRange) if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { (void)arena; return; } SharedDtor(); }
O3
cpp
google::protobuf::EnumDescriptorProto_EnumReservedRange::~EnumDescriptorProto_EnumReservedRange(): pushq %r14 pushq %rbx pushq %rax movq %rdi, %r14 leaq 0x8(%rdi), %rbx testb $0x1, 0x8(%rdi) je 0x4d9d3 movq %rbx, %rdi callq 0x59746 leaq 0xb3946(%rip), %rax # 0x101320 addq $0x10, %rax movq %rax, (%r14) movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x59494 movq %rax, %rdi callq 0x13387
_ZN6google8protobuf37EnumDescriptorProto_EnumReservedRangeD2Ev: push r14; Alternative name is 'google::protobuf::EnumDescriptorProto_EnumReservedRange::~EnumDescriptorProto_EnumReservedRange()' push rbx push rax mov r14, rdi lea rbx, [rdi+8] test byte ptr [rdi+8], 1 jz short loc_4D9D3 mov rdi, rbx call _ZN6google8protobuf8internal16InternalMetadata21DeleteOutOfLineHelperINS0_15UnknownFieldSetEEEPNS0_5ArenaEv; google::protobuf::internal::InternalMetadata::DeleteOutOfLineHelper<google::protobuf::UnknownFieldSet>(void) loc_4D9D3: lea rax, _ZTVN6google8protobuf11MessageLiteE; `vtable for'google::protobuf::MessageLite add rax, 10h mov [r14], rax mov rdi, rbx; this add rsp, 8 pop rbx pop r14 jmp _ZN6google8protobuf8internal16InternalMetadataD2Ev; google::protobuf::internal::InternalMetadata::~InternalMetadata() mov rdi, rax call __clang_call_terminate
void google::protobuf::EnumDescriptorProto_EnumReservedRange::~EnumDescriptorProto_EnumReservedRange( google::protobuf::EnumDescriptorProto_EnumReservedRange *this) { if ( (*((_BYTE *)this + 8) & 1) != 0 ) google::protobuf::internal::InternalMetadata::DeleteOutOfLineHelper<google::protobuf::UnknownFieldSet>((char *)this + 8); *(_QWORD *)this = &`vtable for'google::protobuf::MessageLite + 2; google::protobuf::internal::InternalMetadata::~InternalMetadata((google::protobuf::EnumDescriptorProto_EnumReservedRange *)((char *)this + 8)); }
~EnumDescriptorProto_EnumReservedRange: PUSH R14 PUSH RBX PUSH RAX MOV R14,RDI LEA RBX,[RDI + 0x8] TEST byte ptr [RDI + 0x8],0x1 JZ 0x0014d9d3 LAB_0014d9cb: MOV RDI,RBX CALL 0x00159746 LAB_0014d9d3: LEA RAX,[0x201320] ADD RAX,0x10 MOV qword ptr [R14],RAX MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x00159494
/* google::protobuf::EnumDescriptorProto_EnumReservedRange::~EnumDescriptorProto_EnumReservedRange() */ void __thiscall google::protobuf::EnumDescriptorProto_EnumReservedRange::~EnumDescriptorProto_EnumReservedRange (EnumDescriptorProto_EnumReservedRange *this) { if (((byte)this[8] & 1) != 0) { /* try { // try from 0014d9cb to 0014d9d2 has its CatchHandler @ 0014d9f0 */ internal::InternalMetadata::DeleteOutOfLineHelper<google::protobuf::UnknownFieldSet> ((InternalMetadata *)(this + 8)); } *(int ***)this = &PTR__MessageLite_00201330; internal::InternalMetadata::~InternalMetadata((InternalMetadata *)(this + 8)); return; }
51,473
string_split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/common.cpp
std::vector<std::string> string_split(const std::string & str, const std::string & delimiter) { std::vector<std::string> parts; size_t start = 0; size_t end = str.find(delimiter); while (end != std::string::npos) { parts.push_back(str.substr(start, end - start)); start = end + delimiter.length(); end = str.find(delimiter, start); } parts.push_back(str.substr(start)); return parts; }
O1
cpp
string_split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq $0x0, 0x10(%rdi) movq (%rdx), %rsi movq 0x8(%rdx), %rcx xorl %ebp, %ebp movq %r14, %rdi xorl %edx, %edx callq 0x1bf70 cmpq $-0x1, %rax je 0x728ca movq %rax, %r12 xorl %ebp, %ebp leaq 0x8(%rsp), %r13 movq %r12, %rcx subq %rbp, %rcx movq %r13, %rdi movq %r14, %rsi movq %rbp, %rdx callq 0x1b940 movq %rbx, %rdi movq %r13, %rsi callq 0x55dea movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x728a9 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8f0 movq (%r15), %rsi movq 0x8(%r15), %rcx movq %r12, %rbp addq %rcx, %rbp movq %r14, %rdi movq %rbp, %rdx callq 0x1bf70 movq %rax, %r12 cmpq $-0x1, %rax jne 0x7286e leaq 0x8(%rsp), %rdi movq %r14, %rsi movq %rbp, %rdx movq $-0x1, %rcx callq 0x1b940 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x55dea leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x72909 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8f0 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi jmp 0x7293d jmp 0x7292b movq %rax, %r14 jmp 0x7294f movq %rax, %r14 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x7294f movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8f0 movq %rbx, %rdi callq 0x225e0 movq %r14, %rdi callq 0x1bfd0
_Z12string_splitRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r15, rdx mov r14, rsi mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov qword ptr [rdi+10h], 0 mov rsi, [rdx] mov rcx, [rdx+8] xor ebp, ebp mov rdi, r14 xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_728CA mov r12, rax xor ebp, ebp lea r13, [rsp+58h+var_50] loc_7286E: mov rcx, r12 sub rcx, rbp mov rdi, r13 mov rsi, r14 mov rdx, rbp call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rdi, rbx mov rsi, r13 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) mov rdi, [rsp+58h+var_50]; void * lea rax, [rsp+58h+var_40] cmp rdi, rax jz short loc_728A9 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_728A9: mov rsi, [r15] mov rcx, [r15+8] mov rbp, r12 add rbp, rcx mov rdi, r14 mov rdx, rbp call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong) mov r12, rax cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_7286E loc_728CA: lea rdi, [rsp+58h+var_50] mov rsi, r14 mov rdx, rbp mov rcx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) lea rax, [rsp+58h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_72909 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_72909: mov rax, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h] jmp short loc_7293D jmp short $+2 loc_7292B: mov r14, rax jmp short loc_7294F mov r14, rax mov rdi, [rsp+arg_0]; void * lea rax, [rsp+arg_10] loc_7293D: cmp rdi, rax jz short loc_7294F mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7294F: mov rdi, rbx call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, r14 call __Unwind_Resume
long long string_split(long long a1, long long a2, _QWORD *a3) { long long v4; // rbp long long v5; // rax long long v6; // r12 long long v7; // rcx void *v9[2]; // [rsp+8h] [rbp-50h] BYREF _QWORD v10[8]; // [rsp+18h] [rbp-40h] BYREF *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; v4 = 0LL; v5 = std::string::find(a2, *a3, 0LL, a3[1]); if ( v5 != -1 ) { v6 = v5; v4 = 0LL; do { std::string::substr(v9, a2, v4, v6 - v4); std::vector<std::string>::emplace_back<std::string>(a1, (long long)v9); if ( v9[0] != v10 ) operator delete(v9[0], v10[0] + 1LL); v7 = a3[1]; v4 = v7 + v6; v6 = std::string::find(a2, *a3, v7 + v6, v7); } while ( v6 != -1 ); } std::string::substr(v9, a2, v4, -1LL); std::vector<std::string>::emplace_back<std::string>(a1, (long long)v9); if ( v9[0] != v10 ) operator delete(v9[0], v10[0] + 1LL); return a1; }
string_split: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R15,RDX MOV R14,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x10],0x0 MOV RSI,qword ptr [RDX] MOV RCX,qword ptr [RDX + 0x8] XOR EBP,EBP MOV RDI,R14 XOR EDX,EDX CALL 0x0011bf70 CMP RAX,-0x1 JZ 0x001728ca MOV R12,RAX XOR EBP,EBP LEA R13,[RSP + 0x8] LAB_0017286e: MOV RCX,R12 SUB RCX,RBP LAB_00172874: MOV RDI,R13 MOV RSI,R14 MOV RDX,RBP CALL 0x0011b940 LAB_00172882: MOV RDI,RBX MOV RSI,R13 CALL 0x00155dea MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x001728a9 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011b8f0 LAB_001728a9: MOV RSI,qword ptr [R15] MOV RCX,qword ptr [R15 + 0x8] MOV RBP,R12 ADD RBP,RCX MOV RDI,R14 MOV RDX,RBP CALL 0x0011bf70 MOV R12,RAX CMP RAX,-0x1 JNZ 0x0017286e LAB_001728ca: LEA RDI,[RSP + 0x8] MOV RSI,R14 MOV RDX,RBP MOV RCX,-0x1 CALL 0x0011b940 LAB_001728e1: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x00155dea LAB_001728ee: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00172909 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011b8f0 LAB_00172909: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* string_split(std::__cxx11::string const&, std::__cxx11::string const&) */ string * string_split(string *param_1,string *param_2) { long lVar1; ulong *in_RDX; long *local_50 [2]; long local_40 [2]; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; lVar1 = std::__cxx11::string::find((char *)param_2,*in_RDX,0); if (lVar1 != -1) { do { /* try { // try from 00172874 to 00172881 has its CatchHandler @ 0017292b */ std::__cxx11::string::substr((ulong)local_50,(ulong)param_2); /* try { // try from 00172882 to 0017288c has its CatchHandler @ 00172930 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1, (string *)local_50); if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } lVar1 = std::__cxx11::string::find((char *)param_2,*in_RDX,lVar1 + in_RDX[1]); } while (lVar1 != -1); } /* try { // try from 001728ca to 001728e0 has its CatchHandler @ 00172929 */ std::__cxx11::string::substr((ulong)local_50,(ulong)param_2); /* try { // try from 001728e1 to 001728ed has its CatchHandler @ 0017291b */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1, (string *)local_50); if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } return param_1; }
51,474
string_split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/common.cpp
std::vector<std::string> string_split(const std::string & str, const std::string & delimiter) { std::vector<std::string> parts; size_t start = 0; size_t end = str.find(delimiter); while (end != std::string::npos) { parts.push_back(str.substr(start, end - start)); start = end + delimiter.length(); end = str.find(delimiter, start); } parts.push_back(str.substr(start)); return parts; }
O3
cpp
string_split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq $0x0, 0x10(%rdi) movq (%rdx), %rsi movq 0x8(%rdx), %rcx xorl %ebp, %ebp movq %r14, %rdi xorl %edx, %edx callq 0x1af70 cmpq $-0x1, %rax je 0x7202e movq %rax, %r12 xorl %ebp, %ebp leaq 0x8(%rsp), %r13 movq %r12, %rcx subq %rbp, %rcx movq %r13, %rdi movq %r14, %rsi movq %rbp, %rdx callq 0x1a940 movq %rbx, %rdi movq %r13, %rsi callq 0x556fa movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x7200d movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8f0 movq (%r15), %rsi movq 0x8(%r15), %rcx movq %r12, %rbp addq %rcx, %rbp movq %r14, %rdi movq %rbp, %rdx callq 0x1af70 movq %rax, %r12 cmpq $-0x1, %rax jne 0x71fd2 leaq 0x8(%rsp), %rdi movq %r14, %rsi movq %rbp, %rdx movq $-0x1, %rcx callq 0x1a940 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x556fa leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x7206d movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8f0 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi jmp 0x720a1 jmp 0x7208f movq %rax, %r14 jmp 0x720b3 movq %rax, %r14 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x720b3 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8f0 movq %rbx, %rdi callq 0x2152e movq %r14, %rdi callq 0x1afd0
_Z12string_splitRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r15, rdx mov r14, rsi mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov qword ptr [rdi+10h], 0 mov rsi, [rdx] mov rcx, [rdx+8] xor ebp, ebp mov rdi, r14 xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_7202E mov r12, rax xor ebp, ebp lea r13, [rsp+58h+var_50] loc_71FD2: mov rcx, r12 sub rcx, rbp mov rdi, r13 mov rsi, r14 mov rdx, rbp call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rdi, rbx mov rsi, r13 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) mov rdi, [rsp+58h+var_50]; void * lea rax, [rsp+58h+var_40] cmp rdi, rax jz short loc_7200D mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7200D: mov rsi, [r15] mov rcx, [r15+8] mov rbp, r12 add rbp, rcx mov rdi, r14 mov rdx, rbp call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong) mov r12, rax cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_71FD2 loc_7202E: lea rdi, [rsp+58h+var_50] mov rsi, r14 mov rdx, rbp mov rcx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) lea rax, [rsp+58h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_7206D mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7206D: mov rax, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h] jmp short loc_720A1 jmp short $+2 loc_7208F: mov r14, rax jmp short loc_720B3 mov r14, rax mov rdi, [rsp+arg_0]; void * lea rax, [rsp+arg_10] loc_720A1: cmp rdi, rax jz short loc_720B3 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_720B3: mov rdi, rbx call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, r14 call __Unwind_Resume
long long string_split(long long a1, long long a2, _QWORD *a3) { long long v4; // rbp long long v5; // rax long long v6; // r12 long long v7; // rcx void *v9[2]; // [rsp+8h] [rbp-50h] BYREF _QWORD v10[8]; // [rsp+18h] [rbp-40h] BYREF *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; v4 = 0LL; v5 = std::string::find(a2, *a3, 0LL, a3[1]); if ( v5 != -1 ) { v6 = v5; v4 = 0LL; do { std::string::substr(v9, a2, v4, v6 - v4); std::vector<std::string>::emplace_back<std::string>(a1, (long long)v9); if ( v9[0] != v10 ) operator delete(v9[0], v10[0] + 1LL); v7 = a3[1]; v4 = v7 + v6; v6 = std::string::find(a2, *a3, v7 + v6, v7); } while ( v6 != -1 ); } std::string::substr(v9, a2, v4, -1LL); std::vector<std::string>::emplace_back<std::string>(a1, (long long)v9); if ( v9[0] != v10 ) operator delete(v9[0], v10[0] + 1LL); return a1; }
string_split: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R15,RDX MOV R14,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x10],0x0 MOV RSI,qword ptr [RDX] MOV RCX,qword ptr [RDX + 0x8] XOR EBP,EBP MOV RDI,R14 XOR EDX,EDX CALL 0x0011af70 CMP RAX,-0x1 JZ 0x0017202e MOV R12,RAX XOR EBP,EBP LEA R13,[RSP + 0x8] LAB_00171fd2: MOV RCX,R12 SUB RCX,RBP LAB_00171fd8: MOV RDI,R13 MOV RSI,R14 MOV RDX,RBP CALL 0x0011a940 LAB_00171fe6: MOV RDI,RBX MOV RSI,R13 CALL 0x001556fa MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x0017200d MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011a8f0 LAB_0017200d: MOV RSI,qword ptr [R15] MOV RCX,qword ptr [R15 + 0x8] MOV RBP,R12 ADD RBP,RCX MOV RDI,R14 MOV RDX,RBP CALL 0x0011af70 MOV R12,RAX CMP RAX,-0x1 JNZ 0x00171fd2 LAB_0017202e: LEA RDI,[RSP + 0x8] MOV RSI,R14 MOV RDX,RBP MOV RCX,-0x1 CALL 0x0011a940 LAB_00172045: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x001556fa LAB_00172052: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0017206d MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011a8f0 LAB_0017206d: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* string_split(std::__cxx11::string const&, std::__cxx11::string const&) */ string * string_split(string *param_1,string *param_2) { long lVar1; ulong *in_RDX; long *local_50 [2]; long local_40 [2]; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; lVar1 = std::__cxx11::string::find((char *)param_2,*in_RDX,0); if (lVar1 != -1) { do { /* try { // try from 00171fd8 to 00171fe5 has its CatchHandler @ 0017208f */ std::__cxx11::string::substr((ulong)local_50,(ulong)param_2); /* try { // try from 00171fe6 to 00171ff0 has its CatchHandler @ 00172094 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1, (string *)local_50); if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } lVar1 = std::__cxx11::string::find((char *)param_2,*in_RDX,lVar1 + in_RDX[1]); } while (lVar1 != -1); } /* try { // try from 0017202e to 00172044 has its CatchHandler @ 0017208d */ std::__cxx11::string::substr((ulong)local_50,(ulong)param_2); /* try { // try from 00172045 to 00172051 has its CatchHandler @ 0017207f */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1, (string *)local_50); if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } return param_1; }
51,475
my_uca_scanner_next_implicit
eloqsql/strings/ctype-uca.c
static inline int my_uca_scanner_next_implicit(my_uca_scanner *scanner) { switch (scanner->level->levelno) { case 0: return my_uca_scanner_next_implicit_primary(scanner);/* Primary level*/ case 1: scanner->wbeg= nochar; return 0x0020; /* Secondary level */ case 2: scanner->wbeg= nochar; return 0x0002; /* Tertiary level */ default: scanner->wbeg= nochar; break; } DBUG_ASSERT(0); return 0; }
O0
c
my_uca_scanner_next_implicit: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movl 0x30(%rax), %eax movl %eax, -0x14(%rbp) testl %eax, %eax je 0x515e4 jmp 0x515d0 movl -0x14(%rbp), %eax subl $0x1, %eax je 0x515f2 jmp 0x515da movl -0x14(%rbp), %eax subl $0x2, %eax je 0x51609 jmp 0x51620 movq -0x10(%rbp), %rdi callq 0x51930 movl %eax, -0x4(%rbp) jmp 0x51639 movq -0x10(%rbp), %rax leaq 0x15eec3(%rip), %rcx # 0x1b04c0 movq %rcx, (%rax) movl $0x20, -0x4(%rbp) jmp 0x51639 movq -0x10(%rbp), %rax leaq 0x15eeac(%rip), %rcx # 0x1b04c0 movq %rcx, (%rax) movl $0x2, -0x4(%rbp) jmp 0x51639 movq -0x10(%rbp), %rax leaq 0x15ee95(%rip), %rcx # 0x1b04c0 movq %rcx, (%rax) jmp 0x51630 jmp 0x51632 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_uca_scanner_next_implicit: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax+18h] mov eax, [rax+30h] mov [rbp+var_14], eax test eax, eax jz short loc_515E4 jmp short $+2 loc_515D0: mov eax, [rbp+var_14] sub eax, 1 jz short loc_515F2 jmp short $+2 loc_515DA: mov eax, [rbp+var_14] sub eax, 2 jz short loc_51609 jmp short loc_51620 loc_515E4: mov rdi, [rbp+var_10] call my_uca_scanner_next_implicit_primary mov [rbp+var_4], eax jmp short loc_51639 loc_515F2: mov rax, [rbp+var_10] lea rcx, nochar mov [rax], rcx mov [rbp+var_4], 20h ; ' ' jmp short loc_51639 loc_51609: mov rax, [rbp+var_10] lea rcx, nochar mov [rax], rcx mov [rbp+var_4], 2 jmp short loc_51639 loc_51620: mov rax, [rbp+var_10] lea rcx, nochar mov [rax], rcx jmp short $+2 loc_51630: jmp short $+2 loc_51632: mov [rbp+var_4], 0 loc_51639: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long my_uca_scanner_next_implicit(_QWORD *a1) { int v2; // [rsp+Ch] [rbp-14h] v2 = *(_DWORD *)(a1[3] + 48LL); if ( v2 ) { if ( v2 == 1 ) { *a1 = &nochar; return 32; } else { *a1 = &nochar; if ( v2 == 2 ) return 2; else return 0; } } else { return (unsigned int)my_uca_scanner_next_implicit_primary(a1); } }
my_uca_scanner_next_implicit: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV EAX,dword ptr [RAX + 0x30] MOV dword ptr [RBP + -0x14],EAX TEST EAX,EAX JZ 0x001515e4 JMP 0x001515d0 LAB_001515d0: MOV EAX,dword ptr [RBP + -0x14] SUB EAX,0x1 JZ 0x001515f2 JMP 0x001515da LAB_001515da: MOV EAX,dword ptr [RBP + -0x14] SUB EAX,0x2 JZ 0x00151609 JMP 0x00151620 LAB_001515e4: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00151930 MOV dword ptr [RBP + -0x4],EAX JMP 0x00151639 LAB_001515f2: MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x2b04c0] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x20 JMP 0x00151639 LAB_00151609: MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x2b04c0] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x2 JMP 0x00151639 LAB_00151620: MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x2b04c0] MOV qword ptr [RAX],RCX JMP 0x00151630 LAB_00151630: JMP 0x00151632 LAB_00151632: MOV dword ptr [RBP + -0x4],0x0 LAB_00151639: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 my_uca_scanner_next_implicit(int8 *param_1) { int iVar1; int4 local_c; iVar1 = *(int *)(param_1[3] + 0x30); if (iVar1 == 0) { local_c = my_uca_scanner_next_implicit_primary(param_1); } else if (iVar1 == 1) { *param_1 = &nochar; local_c = 0x20; } else if (iVar1 == 2) { *param_1 = &nochar; local_c = 2; } else { *param_1 = &nochar; local_c = 0; } return local_c; }
51,476
testing::internal::DeathTestImpl::Abort(testing::internal::DeathTest::AbortReason)
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-death-test.cc
void DeathTestImpl::Abort(AbortReason reason) { // The parent process considers the death test to be a failure if // it finds any data in our pipe. So, here we write a single flag byte // to the pipe, then exit. const char status_ch = reason == TEST_DID_NOT_DIE ? kDeathTestLived : reason == TEST_THREW_EXCEPTION ? kDeathTestThrew : kDeathTestReturned; GTEST_DEATH_TEST_CHECK_SYSCALL_(posix::Write(write_fd(), &status_ch, 1)); // We are leaking the descriptor here because on some platforms (i.e., // when built as Windows DLL), destructors of global objects will still // run after calling _Exit(). On such systems, write_fd_ will be // indirectly closed from the destructor of UnitTestImpl, causing double // close if it is also closed here. On debug configurations, double close // may assert. As there are no in-process buffers to flush here, we are // relying on the OS to close the descriptor after the process terminates // when the destructors are not run. _Exit(1); // Exits w/o any normal exit hooks (we were supposed to crash) }
O0
cpp
testing::internal::DeathTestImpl::Abort(testing::internal::DeathTest::AbortReason): subq $0x158, %rsp # imm = 0x158 movq %rdi, 0x150(%rsp) movl %esi, 0x14c(%rsp) movq 0x150(%rsp), %rax movq %rax, 0x18(%rsp) cmpl $0x2, 0x14c(%rsp) jne 0x141d5 movb $0x4c, %al movb %al, 0x17(%rsp) jmp 0x141fd movl 0x14c(%rsp), %ecx movb $0x54, %al movb $0x52, %dl movb %dl, 0x15(%rsp) cmpl $0x1, %ecx movb %al, 0x16(%rsp) je 0x141f5 movb 0x15(%rsp), %al movb %al, 0x16(%rsp) movb 0x16(%rsp), %al movb %al, 0x17(%rsp) movb 0x17(%rsp), %al movb %al, 0x14b(%rsp) jmp 0x1420a movq 0x18(%rsp), %rdi callq 0x45430 movl %eax, %edi leaq 0x14b(%rsp), %rsi movl $0x1, %edx callq 0x45400 movl %eax, 0x144(%rsp) xorl %eax, %eax cmpl $-0x1, 0x144(%rsp) movb %al, 0x14(%rsp) jne 0x1424e callq 0xb050 cmpl $0x4, (%rax) sete %al movb %al, 0x14(%rsp) movb 0x14(%rsp), %al testb $0x1, %al jne 0x1420a cmpl $-0x1, 0x144(%rsp) jne 0x1446a leaq 0x5f(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0xb920 movq 0x8(%rsp), %rdx leaq 0x5fd1b(%rip), %rsi # 0x73f9a leaq 0x60(%rsp), %rdi callq 0xe840 jmp 0x1428b leaq 0x5fc34(%rip), %rdx # 0x73ec6 leaq 0x80(%rsp), %rdi leaq 0x60(%rsp), %rsi callq 0x45200 jmp 0x142a6 leaq 0x5fd01(%rip), %rdx # 0x73fae leaq 0xa0(%rsp), %rdi leaq 0x80(%rsp), %rsi callq 0x45200 jmp 0x142c4 movl $0x20d, 0x24(%rsp) # imm = 0x20D leaq 0x28(%rsp), %rdi leaq 0x24(%rsp), %rsi callq 0x45340 jmp 0x142dd leaq 0xc0(%rsp), %rdi leaq 0xa0(%rsp), %rsi leaq 0x28(%rsp), %rdx callq 0x45250 jmp 0x142f9 leaq 0x612e1(%rip), %rdx # 0x755e1 leaq 0xe0(%rsp), %rdi leaq 0xc0(%rsp), %rsi callq 0x45200 jmp 0x14317 leaq 0x5fcb0(%rip), %rdx # 0x73fce leaq 0x100(%rsp), %rdi leaq 0xe0(%rsp), %rsi callq 0x45200 jmp 0x14335 leaq 0x5fe8f(%rip), %rdx # 0x741cb leaq 0x120(%rsp), %rdi leaq 0x100(%rsp), %rsi callq 0x45200 jmp 0x14353 leaq 0x120(%rsp), %rdi callq 0x13740 jmp 0x14362 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) jmp 0x1445e movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) jmp 0x14454 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) jmp 0x14447 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) jmp 0x1443a movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) jmp 0x14430 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) jmp 0x14423 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) jmp 0x14416 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) jmp 0x14409 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) leaq 0x120(%rsp), %rdi callq 0xec60 leaq 0x100(%rsp), %rdi callq 0xec60 leaq 0xe0(%rsp), %rdi callq 0xec60 leaq 0xc0(%rsp), %rdi callq 0xec60 leaq 0x28(%rsp), %rdi callq 0xec60 leaq 0xa0(%rsp), %rdi callq 0xec60 leaq 0x80(%rsp), %rdi callq 0xec60 leaq 0x60(%rsp), %rdi callq 0xec60 leaq 0x5f(%rsp), %rdi callq 0xb500 jmp 0x14483 jmp 0x1446c callq 0x453d0 testb $0x1, %al jne 0x14208 movl $0x1, %edi callq 0xb8b0 movq 0x50(%rsp), %rdi callq 0xb910 nopl (%rax)
_ZN7testing8internal13DeathTestImpl5AbortENS0_9DeathTest11AbortReasonE: sub rsp, 158h mov [rsp+158h+var_8], rdi mov [rsp+158h+var_D+1], esi mov rax, [rsp+158h+var_8] mov [rsp+158h+var_140], rax cmp [rsp+158h+var_D+1], 2 jnz short loc_141D5 mov al, 4Ch ; 'L' mov [rsp+158h+var_141], al jmp short loc_141FD loc_141D5: mov ecx, [rsp+158h+var_D+1] mov al, 54h ; 'T' mov dl, 52h ; 'R' mov [rsp+158h+var_143], dl cmp ecx, 1 mov [rsp+158h+var_142], al jz short loc_141F5 mov al, [rsp+158h+var_143] mov [rsp+158h+var_142], al loc_141F5: mov al, [rsp+158h+var_142] mov [rsp+158h+var_141], al loc_141FD: mov al, [rsp+158h+var_141] mov byte ptr [rsp+158h+var_D], al loc_14208: jmp short $+2 loc_1420A: mov rdi, [rsp+158h+var_140]; this call _ZNK7testing8internal13DeathTestImpl8write_fdEv; testing::internal::DeathTestImpl::write_fd(void) mov edi, eax; this lea rsi, [rsp+158h+var_D]; int mov edx, (offset dword_0+1); void * call _ZN7testing8internal5posix5WriteEiPKvj; testing::internal::posix::Write(int,void const*,uint) mov [rsp+158h+var_14], eax xor eax, eax cmp [rsp+158h+var_14], 0FFFFFFFFh mov [rsp+158h+var_144], al jnz short loc_1424E call ___errno_location cmp dword ptr [rax], 4 setz al mov [rsp+158h+var_144], al loc_1424E: mov al, [rsp+158h+var_144] test al, 1 jnz short loc_1420A cmp [rsp+158h+var_14], 0FFFFFFFFh jnz loc_1446A lea rdi, [rsp+158h+var_F9] mov [rsp+158h+var_150], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rsp+158h+var_150] lea rsi, aCheckFailedFil; "CHECK failed: File " lea rdi, [rsp+158h+var_F8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_1428B: lea rdx, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/AlayaL"... lea rdi, [rsp+158h+var_D8] lea rsi, [rsp+158h+var_F8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_142A6: lea rdx, aLine; ", line " lea rdi, [rsp+158h+var_B8] lea rsi, [rsp+158h+var_D8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_142C4: mov [rsp+158h+var_134], 20Dh lea rdi, [rsp+158h+var_130] lea rsi, [rsp+158h+var_134] call _ZN7testing8internal18StreamableToStringIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::internal::StreamableToString<int>(int const&) jmp short $+2 loc_142DD: lea rdi, [rsp+158h+var_98] lea rsi, [rsp+158h+var_B8] lea rdx, [rsp+158h+var_130] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) jmp short $+2 loc_142F9: lea rdx, asc_755E0+1; ": " lea rdi, [rsp+158h+var_78] lea rsi, [rsp+158h+var_98] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_14317: lea rdx, aPosixWriteWrit; "posix::Write(write_fd(), &status_ch, 1)" lea rdi, [rsp+158h+var_58] lea rsi, [rsp+158h+var_78] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_14335: lea rdx, aFcntlPipeFd1FS+1Dh; " != -1" lea rdi, [rsp+158h+var_38] lea rsi, [rsp+158h+var_58] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_14353: lea rdi, [rsp+158h+var_38] call _ZN7testing8internalL14DeathTestAbortERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::DeathTestAbort(std::string const&) jmp short $+2 loc_14362: mov rcx, rax mov eax, edx mov [rsp+158h+var_108], rcx mov [rsp+158h+var_10C], eax jmp loc_1445E mov rcx, rax mov eax, edx mov [rsp+158h+var_108], rcx mov [rsp+158h+var_10C], eax jmp loc_14454 mov rcx, rax mov eax, edx mov [rsp+158h+var_108], rcx mov [rsp+158h+var_10C], eax jmp loc_14447 mov rcx, rax mov eax, edx mov [rsp+158h+var_108], rcx mov [rsp+158h+var_10C], eax jmp loc_1443A mov rcx, rax mov eax, edx mov [rsp+158h+var_108], rcx mov [rsp+158h+var_10C], eax jmp short loc_14430 mov rcx, rax mov eax, edx mov [rsp+158h+var_108], rcx mov [rsp+158h+var_10C], eax jmp short loc_14423 mov rcx, rax mov eax, edx mov [rsp+158h+var_108], rcx mov [rsp+158h+var_10C], eax jmp short loc_14416 mov rcx, rax mov eax, edx mov [rsp+158h+var_108], rcx mov [rsp+158h+var_10C], eax jmp short loc_14409 mov rcx, rax mov eax, edx mov [rsp+158h+var_108], rcx mov [rsp+158h+var_10C], eax lea rdi, [rsp+158h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_14409: lea rdi, [rsp+158h+var_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_14416: lea rdi, [rsp+158h+var_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_14423: lea rdi, [rsp+158h+var_98]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_14430: lea rdi, [rsp+158h+var_130]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_1443A: lea rdi, [rsp+158h+var_B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_14447: lea rdi, [rsp+158h+var_D8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_14454: lea rdi, [rsp+158h+var_F8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_1445E: lea rdi, [rsp+158h+var_F9] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_14483 loc_1446A: jmp short $+2 loc_1446C: call _ZN7testing8internal11AlwaysFalseEv; testing::internal::AlwaysFalse(void) test al, 1 jnz loc_14208 mov edi, 1 call __Exit loc_14483: mov rdi, [rsp+158h+var_108] call __Unwind_Resume
void __noreturn testing::internal::DeathTestImpl::Abort(testing::internal::DeathTestImpl *a1, int a2) { testing::internal::posix *v2; // rdi unsigned int v3; // ecx int v4; // edx int v5; // ecx int v6; // r8d int v7; // r9d bool v8; // [rsp+14h] [rbp-144h] char v9; // [rsp+16h] [rbp-142h] char v10; // [rsp+17h] [rbp-141h] int v12; // [rsp+24h] [rbp-134h] BYREF _BYTE v13[36]; // [rsp+28h] [rbp-130h] BYREF long long v14; // [rsp+50h] [rbp-108h] char v15; // [rsp+5Fh] [rbp-F9h] BYREF _BYTE v16[32]; // [rsp+60h] [rbp-F8h] BYREF _BYTE v17[32]; // [rsp+80h] [rbp-D8h] BYREF _BYTE v18[32]; // [rsp+A0h] [rbp-B8h] BYREF _BYTE v19[32]; // [rsp+C0h] [rbp-98h] BYREF _BYTE v20[32]; // [rsp+E0h] [rbp-78h] BYREF _BYTE v21[32]; // [rsp+100h] [rbp-58h] BYREF _BYTE v22[36]; // [rsp+120h] [rbp-38h] BYREF int v23; // [rsp+144h] [rbp-14h] _BYTE v24[5]; // [rsp+14Bh] [rbp-Dh] BYREF testing::internal::DeathTestImpl *v25; // [rsp+150h] [rbp-8h] v25 = a1; *(_DWORD *)&v24[1] = a2; if ( a2 == 2 ) { v10 = 76; } else { v9 = 84; if ( *(_DWORD *)&v24[1] != 1 ) v9 = 82; v10 = v9; } v24[0] = v10; while ( 1 ) { v2 = (testing::internal::posix *)(unsigned int)testing::internal::DeathTestImpl::write_fd(a1); v23 = testing::internal::posix::Write(v2, (int)v24, (char *)&dword_0 + 1, v3); v8 = 0; if ( v23 == -1 ) v8 = *(_DWORD *)__errno_location() == 4; if ( !v8 ) { if ( v23 == -1 ) { std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>((long long)v16, (long long)"CHECK failed: File ", (long long)&v15); std::operator+<char>( v17, v16, "/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-death-test.cc"); std::operator+<char>(v18, v17, ", line "); v12 = 525; testing::internal::StreamableToString<int>((unsigned int)v13, (unsigned int)&v12, v4, v5, v6, v7); std::operator+<char>(v19, v18, v13); std::operator+<char>(v20, v19, ": "); std::operator+<char>(v21, v20, "posix::Write(write_fd(), &status_ch, 1)"); std::operator+<char>(v22, v21, " != -1"); testing::internal::DeathTestAbort((testing::internal *)v22); } if ( (testing::internal::AlwaysFalse(v2) & 1) == 0 ) { _Exit(1LL); _Unwind_Resume(v14); } } } }
Abort: SUB RSP,0x158 MOV qword ptr [RSP + 0x150],RDI MOV dword ptr [RSP + 0x14c],ESI MOV RAX,qword ptr [RSP + 0x150] MOV qword ptr [RSP + 0x18],RAX CMP dword ptr [RSP + 0x14c],0x2 JNZ 0x001141d5 MOV AL,0x4c MOV byte ptr [RSP + 0x17],AL JMP 0x001141fd LAB_001141d5: MOV ECX,dword ptr [RSP + 0x14c] MOV AL,0x54 MOV DL,0x52 MOV byte ptr [RSP + 0x15],DL CMP ECX,0x1 MOV byte ptr [RSP + 0x16],AL JZ 0x001141f5 MOV AL,byte ptr [RSP + 0x15] MOV byte ptr [RSP + 0x16],AL LAB_001141f5: MOV AL,byte ptr [RSP + 0x16] MOV byte ptr [RSP + 0x17],AL LAB_001141fd: MOV AL,byte ptr [RSP + 0x17] MOV byte ptr [RSP + 0x14b],AL LAB_00114208: JMP 0x0011420a LAB_0011420a: MOV RDI,qword ptr [RSP + 0x18] CALL 0x00145430 MOV EDI,EAX LEA RSI,[RSP + 0x14b] MOV EDX,0x1 CALL 0x00145400 MOV dword ptr [RSP + 0x144],EAX XOR EAX,EAX CMP dword ptr [RSP + 0x144],-0x1 MOV byte ptr [RSP + 0x14],AL JNZ 0x0011424e CALL 0x0010b050 CMP dword ptr [RAX],0x4 SETZ AL MOV byte ptr [RSP + 0x14],AL LAB_0011424e: MOV AL,byte ptr [RSP + 0x14] TEST AL,0x1 JNZ 0x0011420a CMP dword ptr [RSP + 0x144],-0x1 JNZ 0x0011446a LEA RDI,[RSP + 0x5f] MOV qword ptr [RSP + 0x8],RDI CALL 0x0010b920 MOV RDX,qword ptr [RSP + 0x8] LAB_00114278: LEA RSI,[0x173f9a] LEA RDI,[RSP + 0x60] CALL 0x0010e840 JMP 0x0011428b LAB_0011428b: LEA RDX,[0x173ec6] LEA RDI,[RSP + 0x80] LEA RSI,[RSP + 0x60] CALL 0x00145200 JMP 0x001142a6 LAB_001142a6: LEA RDX,[0x173fae] LEA RDI,[RSP + 0xa0] LEA RSI,[RSP + 0x80] CALL 0x00145200 JMP 0x001142c4 LAB_001142c4: MOV dword ptr [RSP + 0x24],0x20d LAB_001142cc: LEA RDI,[RSP + 0x28] LEA RSI,[RSP + 0x24] CALL 0x00145340 JMP 0x001142dd LAB_001142dd: LEA RDI,[RSP + 0xc0] LEA RSI,[RSP + 0xa0] LEA RDX,[RSP + 0x28] CALL 0x00145250 JMP 0x001142f9 LAB_001142f9: LEA RDX,[0x1755e1] LEA RDI,[RSP + 0xe0] LEA RSI,[RSP + 0xc0] CALL 0x00145200 JMP 0x00114317 LAB_00114317: LEA RDX,[0x173fce] LEA RDI,[RSP + 0x100] LEA RSI,[RSP + 0xe0] CALL 0x00145200 JMP 0x00114335 LAB_00114335: LEA RDX,[0x1741cb] LEA RDI,[RSP + 0x120] LEA RSI,[RSP + 0x100] CALL 0x00145200 JMP 0x00114353 LAB_00114353: LEA RDI,[RSP + 0x120] CALL 0x00113740 LAB_00114360: JMP 0x00114362 LAB_00114362: MOV RCX,RAX MOV EAX,EDX MOV qword ptr [RSP + 0x50],RCX MOV dword ptr [RSP + 0x4c],EAX JMP 0x0011445e LAB_0011445e: LEA RDI,[RSP + 0x5f] CALL 0x0010b500 JMP 0x00114483 LAB_0011446a: JMP 0x0011446c LAB_0011446c: CALL 0x001453d0 TEST AL,0x1 JNZ 0x00114208 MOV EDI,0x1 CALL 0x0010b8b0 LAB_00114483: MOV RDI,qword ptr [RSP + 0x50] CALL 0x0010b910
/* testing::internal::DeathTestImpl::Abort(testing::internal::DeathTest::AbortReason) */ void __thiscall testing::internal::DeathTestImpl::Abort(DeathTestImpl *this,int param_2) { int iVar1; int *piVar2; ulong uVar3; bool bVar4; int1 auVar5 [12]; int1 local_142; int1 local_141; int local_134; internal local_130 [36]; int4 local_10c; int8 local_108; allocator local_f9; string local_f8 [32]; string local_d8 [32]; string local_b8 [32]; string local_98 [32]; string local_78 [32]; string local_58 [32]; string local_38 [36]; int local_14; int1 local_d; int local_c; DeathTestImpl *local_8; if (param_2 == 2) { local_141 = 0x4c; } else { local_142 = 0x54; if (param_2 != 1) { local_142 = 0x52; } local_141 = local_142; } local_d = local_141; local_c = param_2; local_8 = this; while( true ) { do { iVar1 = write_fd(this); local_14 = posix::Write(iVar1,&local_d,1); bVar4 = false; if (local_14 == -1) { piVar2 = __errno_location(); bVar4 = *piVar2 == 4; } } while (bVar4); if (local_14 == -1) break; uVar3 = AlwaysFalse(); if ((uVar3 & 1) == 0) { _Exit(1); LAB_00114483: /* WARNING: Subroutine does not return */ _Unwind_Resume(local_108); } } std::allocator<char>::allocator(); /* try { // try from 00114278 to 00114288 has its CatchHandler @ 00114362 */ std::__cxx11::string::string<std::allocator<char>>(local_f8,"CHECK failed: File ",&local_f9); /* try { // try from 0011428b to 001142a3 has its CatchHandler @ 00114375 */ std::operator+(local_d8,(char *)local_f8); /* try { // try from 001142a6 to 001142c1 has its CatchHandler @ 00114388 */ std::operator+(local_b8,(char *)local_d8); local_134 = 0x20d; /* try { // try from 001142cc to 001142da has its CatchHandler @ 0011439b */ StreamableToString<int>(local_130,&local_134); /* try { // try from 001142dd to 001142f6 has its CatchHandler @ 001143ae */ std::operator+(local_98,local_b8); /* try { // try from 001142f9 to 00114314 has its CatchHandler @ 001143be */ std::operator+(local_78,(char *)local_98); /* try { // try from 00114317 to 00114332 has its CatchHandler @ 001143ce */ std::operator+(local_58,(char *)local_78); /* try { // try from 00114335 to 00114350 has its CatchHandler @ 001143de */ std::operator+(local_38,(char *)local_58); /* try { // try from 00114353 to 0011435f has its CatchHandler @ 001143ee */ auVar5 = DeathTestAbort(local_38); local_10c = auVar5._8_4_; local_108 = auVar5._0_8_; /* catch() { ... } // from try @ 00114278 with catch @ 00114362 */ std::allocator<char>::~allocator((allocator<char> *)&local_f9); goto LAB_00114483; }
51,477
my_strntod_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static double my_strntod_mb2_or_mb4(CHARSET_INFO *cs, char *nptr, size_t length, char **endptr, int *err) { char buf[256]; double res; register char *b= buf; register const uchar *s= (const uchar*) nptr; const uchar *end; my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; int cnv; *err= 0; /* 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 part of double */ *b++= (char) wc; } *endptr= b; res= my_strtod(buf, endptr, err); *endptr= nptr + cs->mbminlen * (size_t) (*endptr - buf); return res; }
O3
c
my_strntod_mb2_or_mb4: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x128, %rsp # imm = 0x128 movq %rcx, -0x150(%rbp) movq %rsi, %rcx movq %rdi, %r15 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq 0xb8(%rdi), %rax movq 0x28(%rax), %rbx movq %r8, -0x148(%rbp) movl $0x0, (%r8) movl $0xff, %r13d cmpq %r13, %rdx cmovbq %rdx, %r13 addq %rsi, %r13 leaq -0x140(%rbp), %rsi movq %rcx, -0x138(%rbp) movq %rcx, %rdx movq %r13, %rcx callq *%rbx leaq -0x130(%rbp), %r12 testl %eax, %eax jle 0x92871 movq -0x138(%rbp), %r14 movq -0x140(%rbp), %rcx leaq -0x1(%rcx), %rdx cmpq $0x64, %rdx ja 0x92871 movl %eax, %eax addq %rax, %r14 movb %cl, (%r12) incq %r12 movq %r15, %rdi leaq -0x140(%rbp), %rsi movq %r14, %rdx movq %r13, %rcx callq *%rbx testl %eax, %eax jg 0x9283e movq -0x150(%rbp), %rbx movq %r12, (%rbx) leaq -0x130(%rbp), %r14 movq %r14, %rdi movq %rbx, %rsi movq -0x148(%rbp), %rdx callq 0xa23ec movl 0x98(%r15), %eax movq (%rbx), %rcx subq %r14, %rcx imulq %rax, %rcx movq -0x138(%rbp), %rax addq %rcx, %rax movq %rax, (%rbx) movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x928d3 addq $0x128, %rsp # imm = 0x128 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29470
my_strntod_mb2_or_mb4: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 128h mov [rbp+var_150], rcx mov rcx, rsi mov r15, rdi mov rax, fs:28h mov [rbp+var_30], rax mov rax, [rdi+0B8h] mov rbx, [rax+28h] mov [rbp+var_148], r8 mov dword ptr [r8], 0 mov r13d, 0FFh cmp rdx, r13 cmovb r13, rdx add r13, rsi lea rsi, [rbp+var_140] mov [rbp+var_138], rcx mov rdx, rcx mov rcx, r13 call rbx lea r12, [rbp+var_130] test eax, eax jle short loc_92871 mov r14, [rbp+var_138] loc_9283E: mov rcx, [rbp+var_140] lea rdx, [rcx-1] cmp rdx, 64h ; 'd' ja short loc_92871 mov eax, eax add r14, rax mov [r12], cl inc r12 mov rdi, r15 lea rsi, [rbp+var_140] mov rdx, r14 mov rcx, r13 call rbx test eax, eax jg short loc_9283E loc_92871: mov rbx, [rbp+var_150] mov [rbx], r12 lea r14, [rbp+var_130] mov rdi, r14 mov rsi, rbx mov rdx, [rbp+var_148] call my_strtod mov eax, [r15+98h] mov rcx, [rbx] sub rcx, r14 imul rcx, rax mov rax, [rbp+var_138] add rax, rcx mov [rbx], rax mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_928D3 add rsp, 128h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_928D3: call ___stack_chk_fail
unsigned long long my_strntod_mb2_or_mb4(long long a1, long long a2, unsigned long long a3, _QWORD *a4, _DWORD *a5) { long long ( *v5)(long long, long long *, long long, long long); // rbx long long v6; // r13 long long v7; // r13 int v8; // eax _BYTE *v9; // r12 long long v10; // r14 long long v14; // [rsp+10h] [rbp-140h] BYREF long long v15; // [rsp+18h] [rbp-138h] _BYTE v16[256]; // [rsp+20h] [rbp-130h] BYREF unsigned long long v17; // [rsp+120h] [rbp-30h] v17 = __readfsqword(0x28u); v5 = *(long long ( **)(long long, long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL); *a5 = 0; v6 = 255LL; if ( a3 < 0xFF ) v6 = a3; v7 = a2 + v6; v15 = a2; v8 = v5(a1, &v14, a2, v7); v9 = v16; if ( v8 > 0 ) { v10 = v15; do { if ( (unsigned long long)(v14 - 1) > 0x64 ) break; v10 += (unsigned int)v8; *v9++ = v14; v8 = v5(a1, &v14, v10, v7); } while ( v8 > 0 ); } *a4 = v9; my_strtod(v16, a4, a5); *a4 = *(unsigned int *)(a1 + 152) * (*a4 - (_QWORD)v16) + v15; return __readfsqword(0x28u); }
my_strntod_mb2_or_mb4: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x128 MOV qword ptr [RBP + -0x150],RCX MOV RCX,RSI MOV R15,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 qword ptr [RBP + -0x148],R8 MOV dword ptr [R8],0x0 MOV R13D,0xff CMP RDX,R13 CMOVC R13,RDX ADD R13,RSI LEA RSI,[RBP + -0x140] MOV qword ptr [RBP + -0x138],RCX MOV RDX,RCX MOV RCX,R13 CALL RBX LEA R12,[RBP + -0x130] TEST EAX,EAX JLE 0x00192871 MOV R14,qword ptr [RBP + -0x138] LAB_0019283e: MOV RCX,qword ptr [RBP + -0x140] LEA RDX,[RCX + -0x1] CMP RDX,0x64 JA 0x00192871 MOV EAX,EAX ADD R14,RAX MOV byte ptr [R12],CL INC R12 MOV RDI,R15 LEA RSI,[RBP + -0x140] MOV RDX,R14 MOV RCX,R13 CALL RBX TEST EAX,EAX JG 0x0019283e LAB_00192871: MOV RBX,qword ptr [RBP + -0x150] MOV qword ptr [RBX],R12 LEA R14,[RBP + -0x130] MOV RDI,R14 MOV RSI,RBX MOV RDX,qword ptr [RBP + -0x148] CALL 0x001a23ec MOV EAX,dword ptr [R15 + 0x98] MOV RCX,qword ptr [RBX] SUB RCX,R14 IMUL RCX,RAX MOV RAX,qword ptr [RBP + -0x138] ADD RAX,RCX MOV qword ptr [RBX],RAX MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001928d3 ADD RSP,0x128 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001928d3: CALL 0x00129470
void my_strntod_mb2_or_mb4 (long param_1,long param_2,ulong param_3,long *param_4,int4 *param_5) { code *pcVar1; uint uVar2; int1 *puVar3; ulong uVar4; long lVar5; long in_FS_OFFSET; long local_148; long local_140; int1 local_138 [256]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); *param_5 = 0; uVar4 = 0xff; if (param_3 < 0xff) { uVar4 = param_3; } local_140 = param_2; uVar2 = (*pcVar1)(param_1,&local_148,param_2,uVar4 + param_2); puVar3 = local_138; lVar5 = local_140; while ((0 < (int)uVar2 && (local_148 - 1U < 0x65))) { lVar5 = lVar5 + (ulong)uVar2; *puVar3 = (char)local_148; puVar3 = puVar3 + 1; uVar2 = (*pcVar1)(param_1,&local_148,lVar5,uVar4 + param_2); } *param_4 = (long)puVar3; my_strtod(local_138,param_4,param_5); *param_4 = local_140 + (*param_4 - (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(); }
51,478
linenoiseNoTTY()
monkey531[P]llama/examples/run/linenoise.cpp/linenoise.cpp
static char *linenoiseNoTTY(void) { char *line = NULL; size_t len = 0, maxlen = 0; while(1) { if (len == maxlen) { if (maxlen == 0) maxlen = 16; maxlen *= 2; char *oldval = line; line = (char*) realloc(line,maxlen); if (line == NULL) { if (oldval) free(oldval); return NULL; } } int c = fgetc(stdin); if (c == EOF || c == '\n') { if (c == EOF && len == 0) { free(line); return NULL; } else { line[len] = '\0'; return line; } } else { line[len] = c; len++; } } }
O2
cpp
linenoiseNoTTY(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax xorl %r13d, %r13d movq 0x923ed(%rip), %rbp # 0xd9f60 xorl %ebx, %ebx xorl %r12d, %r12d cmpq %rbx, %r13 jne 0x47ba4 leaq (,%r13,2), %rbx testq %r13, %r13 pushq $0x20 popq %rax cmoveq %rax, %rbx movq %r12, %rdi movq %rbx, %rsi callq 0x21d60 movq %rax, %r15 testq %rax, %rax jne 0x47ba7 jmp 0x47bed movq %r12, %r15 movq (%rbp), %rdi callq 0x21cb0 cmpl $0xa, %eax je 0x47bba cmpl $-0x1, %eax jne 0x47bd4 cmpl $-0x1, %eax sete %cl testq %r13, %r13 sete %dl testb %cl, %dl jne 0x47bea movb $0x0, (%r15,%r13) movq %r15, %r14 jmp 0x47bdb movb %al, (%r15,%r13) incq %r13 cmpl $-0x1, %eax je 0x47bf8 movq %r15, %r12 cmpl $0xa, %eax jne 0x47b78 jmp 0x47bf8 movq %r15, %r12 movq %r12, %rdi callq 0x21980 xorl %r14d, %r14d movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZL14linenoiseNoTTYv: push rbp push r15 push r14 push r13 push r12 push rbx push rax xor r13d, r13d mov rbp, cs:stdin_ptr xor ebx, ebx xor r12d, r12d loc_47B78: cmp r13, rbx jnz short loc_47BA4 lea rbx, ds:0[r13*2] test r13, r13 push 20h ; ' ' pop rax cmovz rbx, rax mov rdi, r12 mov rsi, rbx call _realloc mov r15, rax test rax, rax jnz short loc_47BA7 jmp short loc_47BED loc_47BA4: mov r15, r12 loc_47BA7: mov rdi, [rbp+0] call _fgetc cmp eax, 0Ah jz short loc_47BBA cmp eax, 0FFFFFFFFh jnz short loc_47BD4 loc_47BBA: cmp eax, 0FFFFFFFFh setz cl test r13, r13 setz dl test dl, cl jnz short loc_47BEA mov byte ptr [r15+r13], 0 mov r14, r15 jmp short loc_47BDB loc_47BD4: mov [r15+r13], al inc r13 loc_47BDB: cmp eax, 0FFFFFFFFh jz short loc_47BF8 mov r12, r15 cmp eax, 0Ah jnz short loc_47B78 jmp short loc_47BF8 loc_47BEA: mov r12, r15 loc_47BED: mov rdi, r12 call _free xor r14d, r14d loc_47BF8: mov rax, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long linenoiseNoTTY() { long long v0; // r14 long long v1; // r13 long long v2; // rbx long long v3; // r12 long long v4; // r15 int v5; // eax v1 = 0LL; v2 = 0LL; v3 = 0LL; while ( 1 ) { if ( v1 == v2 ) { v2 = 2 * v1; if ( !v1 ) v2 = 32LL; v4 = realloc(v3, v2); if ( !v4 ) goto LABEL_17; } else { v4 = v3; } v5 = fgetc(stdin); if ( v5 == 10 || v5 == -1 ) break; *(_BYTE *)(v4 + v1++) = v5; LABEL_13: if ( v5 != -1 ) { v3 = v4; if ( v5 != 10 ) continue; } return v0; } if ( v5 != -1 || v1 != 0 ) { *(_BYTE *)(v4 + v1) = 0; v0 = v4; goto LABEL_13; } v3 = v4; LABEL_17: free(v3); return 0LL; }
linenoiseNoTTY: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX XOR R13D,R13D MOV RBP,qword ptr [0x001d9f60] XOR EBX,EBX XOR R12D,R12D LAB_00147b78: CMP R13,RBX JNZ 0x00147ba4 LEA RBX,[R13*0x2] TEST R13,R13 PUSH 0x20 POP RAX CMOVZ RBX,RAX MOV RDI,R12 MOV RSI,RBX CALL 0x00121d60 MOV R15,RAX TEST RAX,RAX JNZ 0x00147ba7 JMP 0x00147bed LAB_00147ba4: MOV R15,R12 LAB_00147ba7: MOV RDI,qword ptr [RBP] CALL 0x00121cb0 CMP EAX,0xa JZ 0x00147bba CMP EAX,-0x1 JNZ 0x00147bd4 LAB_00147bba: CMP EAX,-0x1 SETZ CL TEST R13,R13 SETZ DL TEST DL,CL JNZ 0x00147bea MOV byte ptr [R15 + R13*0x1],0x0 MOV R14,R15 JMP 0x00147bdb LAB_00147bd4: MOV byte ptr [R15 + R13*0x1],AL INC R13 LAB_00147bdb: CMP EAX,-0x1 JZ 0x00147bf8 MOV R12,R15 CMP EAX,0xa JNZ 0x00147b78 JMP 0x00147bf8 LAB_00147bea: MOV R12,R15 LAB_00147bed: MOV RDI,R12 CALL 0x00121980 XOR R14D,R14D LAB_00147bf8: MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* linenoiseNoTTY() */ void * linenoiseNoTTY(void) { int *puVar1; int iVar2; void *pvVar3; size_t __size; void *__ptr; size_t sVar4; void *unaff_R14; puVar1 = PTR_stdin_001d9f60; sVar4 = 0; __size = 0; __ptr = (void *)0x0; do { pvVar3 = __ptr; if (sVar4 == __size) { __size = sVar4 * 2; if (sVar4 == 0) { __size = 0x20; } pvVar3 = realloc(__ptr,__size); if (pvVar3 == (void *)0x0) goto LAB_00147bed; } __ptr = pvVar3; iVar2 = fgetc(*(FILE **)puVar1); if ((iVar2 == 10) || (iVar2 == -1)) { if (sVar4 == 0 && iVar2 == -1) { LAB_00147bed: free(__ptr); return (void *)0x0; } *(int1 *)((long)__ptr + sVar4) = 0; unaff_R14 = __ptr; } else { *(char *)((long)__ptr + sVar4) = (char)iVar2; sVar4 = sVar4 + 1; } if (iVar2 == -1) { return unaff_R14; } if (iVar2 == 10) { return unaff_R14; } } while( true ); }
51,479
unlink_block
eloqsql/mysys/mf_keycache.c
static void unlink_block(SIMPLE_KEY_CACHE_CB *keycache, BLOCK_LINK *block) { DBUG_ASSERT((block->status & ~BLOCK_CHANGED) == (BLOCK_READ | BLOCK_IN_USE)); DBUG_ASSERT(block->hash_link); /*backptr to block NULL from free_block()*/ DBUG_ASSERT(!block->requests); DBUG_ASSERT(block->prev_changed && *block->prev_changed == block); DBUG_ASSERT(block->next_used && block->prev_used && (block->next_used->prev_used == &block->next_used) && (*block->prev_used == block)); if (block->next_used == block) /* The list contains only one member */ keycache->used_last= keycache->used_ins= NULL; else { block->next_used->prev_used= block->prev_used; *block->prev_used= block->next_used; if (keycache->used_last == block) keycache->used_last= STRUCT_PTR(BLOCK_LINK, next_used, block->prev_used); if (keycache->used_ins == block) keycache->used_ins=STRUCT_PTR(BLOCK_LINK, next_used, block->prev_used); } block->next_used= NULL; #ifdef DBUG_ASSERT_EXISTS /* This makes it easier to see it's not in a chain during debugging. And some DBUG_ASSERT() rely on it. */ block->prev_used= NULL; #endif KEYCACHE_THREAD_TRACE("unlink_block"); #if defined(KEYCACHE_DEBUG) KEYCACHE_DBUG_ASSERT(keycache->blocks_available != 0); keycache->blocks_available--; KEYCACHE_DBUG_PRINT("unlink_block", ("unlinked block %u status=%x #requests=%u #available=%u", BLOCK_NUMBER(block), block->status, block->requests, keycache->blocks_available)); #endif }
O0
c
unlink_block: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) jmp 0x73b9e jmp 0x73ba0 jmp 0x73ba2 jmp 0x73ba4 jmp 0x73ba6 jmp 0x73ba8 jmp 0x73baa jmp 0x73bac jmp 0x73bae movq -0x10(%rbp), %rax movq (%rax), %rax cmpq -0x10(%rbp), %rax jne 0x73bdb movq -0x8(%rbp), %rax movq $0x0, 0xb8(%rax) movq -0x8(%rbp), %rax movq $0x0, 0xb0(%rax) jmp 0x73c4a movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx movq -0x10(%rbp), %rax movq (%rax), %rax movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rcx, (%rax) movq -0x8(%rbp), %rax movq 0xb0(%rax), %rax cmpq -0x10(%rbp), %rax jne 0x73c24 movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0xb0(%rax) movq -0x8(%rbp), %rax movq 0xb8(%rax), %rax cmpq -0x10(%rbp), %rax jne 0x73c48 movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0xb8(%rax) jmp 0x73c4a movq -0x10(%rbp), %rax movq $0x0, (%rax) popq %rbp retq nopw (%rax,%rax)
unlink_block: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi jmp short $+2 loc_73B9E: jmp short $+2 loc_73BA0: jmp short $+2 loc_73BA2: jmp short $+2 loc_73BA4: jmp short $+2 loc_73BA6: jmp short $+2 loc_73BA8: jmp short $+2 loc_73BAA: jmp short $+2 loc_73BAC: jmp short $+2 loc_73BAE: mov rax, [rbp+var_10] mov rax, [rax] cmp rax, [rbp+var_10] jnz short loc_73BDB mov rax, [rbp+var_8] mov qword ptr [rax+0B8h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+0B0h], 0 jmp short loc_73C4A loc_73BDB: mov rax, [rbp+var_10] mov rcx, [rax+8] mov rax, [rbp+var_10] mov rax, [rax] mov [rax+8], rcx mov rax, [rbp+var_10] mov rcx, [rax] mov rax, [rbp+var_10] mov rax, [rax+8] mov [rax], rcx mov rax, [rbp+var_8] mov rax, [rax+0B0h] cmp rax, [rbp+var_10] jnz short loc_73C24 mov rax, [rbp+var_10] mov rcx, [rax+8] mov rax, [rbp+var_8] mov [rax+0B0h], rcx loc_73C24: mov rax, [rbp+var_8] mov rax, [rax+0B8h] cmp rax, [rbp+var_10] jnz short loc_73C48 mov rax, [rbp+var_10] mov rcx, [rax+8] mov rax, [rbp+var_8] mov [rax+0B8h], rcx loc_73C48: jmp short $+2 loc_73C4A: mov rax, [rbp+var_10] mov qword ptr [rax], 0 pop rbp retn
_QWORD * unlink_block(long long a1, _QWORD *a2) { _QWORD *result; // rax if ( (_QWORD *)*a2 == a2 ) { *(_QWORD *)(a1 + 184) = 0LL; *(_QWORD *)(a1 + 176) = 0LL; } else { *(_QWORD *)(*a2 + 8LL) = a2[1]; *(_QWORD *)a2[1] = *a2; if ( *(_QWORD **)(a1 + 176) == a2 ) *(_QWORD *)(a1 + 176) = a2[1]; if ( *(_QWORD **)(a1 + 184) == a2 ) *(_QWORD *)(a1 + 184) = a2[1]; } result = a2; *a2 = 0LL; return result; }
unlink_block: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI JMP 0x00173b9e LAB_00173b9e: JMP 0x00173ba0 LAB_00173ba0: JMP 0x00173ba2 LAB_00173ba2: JMP 0x00173ba4 LAB_00173ba4: JMP 0x00173ba6 LAB_00173ba6: JMP 0x00173ba8 LAB_00173ba8: JMP 0x00173baa LAB_00173baa: JMP 0x00173bac LAB_00173bac: JMP 0x00173bae LAB_00173bae: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] CMP RAX,qword ptr [RBP + -0x10] JNZ 0x00173bdb MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xb8],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xb0],0x0 JMP 0x00173c4a LAB_00173bdb: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0xb0] CMP RAX,qword ptr [RBP + -0x10] JNZ 0x00173c24 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xb0],RCX LAB_00173c24: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0xb8] CMP RAX,qword ptr [RBP + -0x10] JNZ 0x00173c48 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xb8],RCX LAB_00173c48: JMP 0x00173c4a LAB_00173c4a: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],0x0 POP RBP RET
void unlink_block(long param_1,long *param_2) { if ((long *)*param_2 == param_2) { *(int8 *)(param_1 + 0xb8) = 0; *(int8 *)(param_1 + 0xb0) = 0; } else { *(long *)(*param_2 + 8) = param_2[1]; *(long *)param_2[1] = *param_2; if (*(long **)(param_1 + 0xb0) == param_2) { *(long *)(param_1 + 0xb0) = param_2[1]; } if (*(long **)(param_1 + 0xb8) == param_2) { *(long *)(param_1 + 0xb8) = param_2[1]; } } *param_2 = 0; return; }
51,480
File::CreateDir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Dolphin-anty/Source/Core/Common/FileUtil.cpp
bool CreateDir(const std::string& path) { DEBUG_LOG_FMT(COMMON, "{}: directory {}", __func__, path); std::error_code error; auto native_path = StringToPath(path); bool success = fs::create_directory(native_path, error); // If the path was not created, check if it was a pre-existing directory std::error_code error_ignored; if (!success && fs::is_directory(native_path, error_ignored)) success = true; if (!success) ERROR_LOG_FMT(COMMON, "{}: failed on {}: {}", __func__, path, error.message()); return success; }
O3
cpp
File::CreateDir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0xb0, %rsp movq %rdi, %rbx xorl %ebp, %ebp leaq 0x18(%rsp), %r14 movl %ebp, (%r14) callq 0x76d0 movq %rax, %r15 movq %rax, 0x8(%r14) movq (%rbx), %rdx movq 0x8(%rbx), %rsi leaq 0x48(%rsp), %r12 movq %r12, %rdi callq 0x14018 movq %r12, %rdi movq %r14, %rsi callq 0x72d0 movl %ebp, 0x8(%rsp) movq %r15, 0x10(%rsp) movb $0x1, %bpl testb %al, %al jne 0x1a078 leaq 0x48(%rsp), %rdi leaq 0x8(%rsp), %rsi callq 0x7ad0 cmpb $0x2, %al je 0x1a078 movq 0x20(%rsp), %rsi movl 0x18(%rsp), %edx movq (%rsi), %rax leaq 0x28(%rsp), %r14 movq %r14, %rdi callq *0x20(%rax) movups (%rbx), %xmm0 movups (%r14), %xmm1 leaq 0x23cfc(%rip), %rax # 0x3dd09 leaq 0x80(%rsp), %rcx movq %rax, (%rcx) movaps %xmm0, 0x10(%rcx) movaps %xmm1, 0x20(%rcx) leaq 0x70(%rsp), %rax movq $0xddc, (%rax) # imm = 0xDDC movq %rcx, 0x8(%rax) movq %rax, (%rsp) leaq 0x23c79(%rip), %rdx # 0x3dcb4 leaq 0x24089(%rip), %r8 # 0x3e0cb movl $0x14, %r9d movl $0x2, %edi movl $0x6, %esi movl $0xd6, %ecx callq 0xc12c movq (%r14), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x1a076 movq 0x38(%rsp), %rsi incq %rsi callq 0x7560 xorl %ebp, %ebp leaq 0x48(%rsp), %rdi callq 0x1dbfc movl %ebp, %eax addq $0xb0, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_ZN4File9CreateDirERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r12 push rbx sub rsp, 0B0h mov rbx, rdi xor ebp, ebp lea r14, [rsp+0D8h+var_C0] mov [r14], ebp call __ZNSt3_V215system_categoryEv; std::_V2::system_category(void) mov r15, rax mov [r14+8], rax mov rdx, [rbx] mov rsi, [rbx+8] lea r12, [rsp+0D8h+var_90] mov rdi, r12 call _Z12StringToPathB5cxx11St17basic_string_viewIcSt11char_traitsIcEE; StringToPath(std::string_view) mov rdi, r12 mov rsi, r14 call __ZNSt10filesystem16create_directoryERKNS_7__cxx114pathERSt10error_code; std::filesystem::create_directory(std::filesystem::__cxx11::path const&,std::error_code &) mov [rsp+0D8h+var_D0], ebp mov [rsp+0D8h+var_C8], r15 mov bpl, 1 test al, al jnz loc_1A078 lea rdi, [rsp+0D8h+var_90] lea rsi, [rsp+0D8h+var_D0] call __ZNSt10filesystem6statusERKNS_7__cxx114pathERSt10error_code; std::filesystem::status(std::filesystem::__cxx11::path const&,std::error_code &) cmp al, 2 jz loc_1A078 mov rsi, [rsp+0D8h+var_B8] mov edx, [rsp+0D8h+var_C0] mov rax, [rsi] lea r14, [rsp+0D8h+var_B0] mov rdi, r14 call qword ptr [rax+20h] movups xmm0, xmmword ptr [rbx] movups xmm1, xmmword ptr [r14] lea rax, aCreatedir; "CreateDir" lea rcx, [rsp+0D8h+var_58] mov [rcx], rax movaps xmmword ptr [rcx+10h], xmm0 movaps xmmword ptr [rcx+20h], xmm1 lea rax, [rsp+0D8h+var_68] mov qword ptr [rax], 0DDCh mov [rax+8], rcx mov [rsp+0D8h+var_D8], rax lea rdx, aWorkspaceLlm4b_5; "/workspace/llm4binary/github2025/Dolphi"... lea r8, aFailedOn; "{}: failed on {}: {}" mov r9d, 14h mov edi, 2 mov esi, 6 mov ecx, 0D6h call _ZN6Common3Log17GenericLogFmtImplENS0_8LogLevelENS0_7LogTypeEPKciN3fmt3v1017basic_string_viewIcEERKNS6_17basic_format_argsINS6_20basic_format_contextINS6_8appenderEcEEEE; Common::Log::GenericLogFmtImpl(Common::Log::LogLevel,Common::Log::LogType,char const*,int,fmt::v10::basic_string_view<char>,fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>> const&) mov rdi, [r14]; void * lea rax, [rsp+0D8h+var_A0] cmp rdi, rax jz short loc_1A076 mov rsi, [rsp+0D8h+var_A0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1A076: xor ebp, ebp loc_1A078: lea rdi, [rsp+0D8h+var_90]; this call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path() mov eax, ebp add rsp, 0B0h pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long File::CreateDir(std::_V2 *a1) { unsigned int v1; // ebp long long v2; // r15 __int128 v3; // xmm0 int v5; // [rsp+8h] [rbp-D0h] BYREF long long v6; // [rsp+10h] [rbp-C8h] unsigned int v7; // [rsp+18h] [rbp-C0h] BYREF long long v8; // [rsp+20h] [rbp-B8h] __int128 v9; // [rsp+28h] [rbp-B0h] BYREF long long v10; // [rsp+38h] [rbp-A0h] BYREF _BYTE v11[40]; // [rsp+48h] [rbp-90h] BYREF _QWORD v12[2]; // [rsp+70h] [rbp-68h] BYREF const char *v13; // [rsp+80h] [rbp-58h] BYREF __int128 v14; // [rsp+90h] [rbp-48h] __int128 v15; // [rsp+A0h] [rbp-38h] v1 = 1; v7 = 0; v2 = std::_V2::system_category(a1); v8 = v2; StringToPath[abi:cxx11]((std::filesystem::__cxx11::path *)v11); v5 = 0; v6 = v2; if ( !(unsigned __int8)std::filesystem::create_directory(v11, &v7) && (unsigned __int8)std::filesystem::status(v11, &v5) != 2 ) { (*(void ( **)(__int128 *, long long, _QWORD))(*(_QWORD *)v8 + 32LL))(&v9, v8, v7); v3 = *(_OWORD *)a1; v13 = "CreateDir"; v14 = v3; v15 = v9; v12[0] = 3548LL; v12[1] = &v13; Common::Log::GenericLogFmtImpl( 2u, 6u, (long long)"/workspace/llm4binary/github2025/Dolphin-anty/Source/Core/Common/FileUtil.cpp", 0xD6u, (long long)"{}: failed on {}: {}", 20LL, v12); if ( (long long *)v9 != &v10 ) operator delete((void *)v9, v10 + 1); v1 = 0; } std::filesystem::__cxx11::path::~path((std::filesystem::__cxx11::path *)v11); return v1; }
CreateDir: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0xb0 MOV RBX,RDI XOR EBP,EBP LEA R14,[RSP + 0x18] MOV dword ptr [R14],EBP CALL 0x001076d0 MOV R15,RAX MOV qword ptr [R14 + 0x8],RAX MOV RDX,qword ptr [RBX] MOV RSI,qword ptr [RBX + 0x8] LEA R12,[RSP + 0x48] MOV RDI,R12 CALL 0x00114018 MOV RDI,R12 MOV RSI,R14 CALL 0x001072d0 MOV dword ptr [RSP + 0x8],EBP MOV qword ptr [RSP + 0x10],R15 MOV BPL,0x1 TEST AL,AL JNZ 0x0011a078 LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x8] CALL 0x00107ad0 CMP AL,0x2 JZ 0x0011a078 MOV RSI,qword ptr [RSP + 0x20] MOV EDX,dword ptr [RSP + 0x18] MOV RAX,qword ptr [RSI] LEA R14,[RSP + 0x28] MOV RDI,R14 CALL qword ptr [RAX + 0x20] MOVUPS XMM0,xmmword ptr [RBX] MOVUPS XMM1,xmmword ptr [R14] LEA RAX,[0x13dd09] LEA RCX,[RSP + 0x80] MOV qword ptr [RCX],RAX MOVAPS xmmword ptr [RCX + 0x10],XMM0 MOVAPS xmmword ptr [RCX + 0x20],XMM1 LEA RAX,[RSP + 0x70] MOV qword ptr [RAX],0xddc MOV qword ptr [RAX + 0x8],RCX MOV qword ptr [RSP],RAX LEA RDX,[0x13dcb4] LEA R8,[0x13e0cb] MOV R9D,0x14 MOV EDI,0x2 MOV ESI,0x6 MOV ECX,0xd6 CALL 0x0010c12c MOV RDI,qword ptr [R14] LEA RAX,[RSP + 0x38] CMP RDI,RAX JZ 0x0011a076 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x00107560 LAB_0011a076: XOR EBP,EBP LAB_0011a078: LEA RDI,[RSP + 0x48] CALL 0x0011dbfc MOV EAX,EBP ADD RSP,0xb0 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* File::CreateDir(std::__cxx11::string const&) */ int8 File::CreateDir(string *param_1) { char cVar1; long *plVar2; int8 uVar3; int4 local_d0 [2]; long *local_c8; int4 local_c0 [2]; long *local_b8; int4 local_b0; int4 uStack_ac; int4 uStack_a8; int4 uStack_a4; long local_a0 [2]; path local_90 [40]; int8 local_68; char **local_60; char *local_58 [2]; int4 local_48; int4 uStack_44; int4 uStack_40; int4 uStack_3c; int4 local_38; int4 uStack_34; int4 uStack_30; int4 uStack_2c; local_c0[0] = 0; plVar2 = (long *)std::_V2::system_category(); local_b8 = plVar2; StringToPath_abi_cxx11_(local_90,*(int8 *)(param_1 + 8),*(int8 *)param_1); cVar1 = std::filesystem::create_directory(local_90,(error_code *)local_c0); local_d0[0] = 0; uVar3 = 1; local_c8 = plVar2; if (cVar1 == '\0') { cVar1 = std::filesystem::status(local_90,(error_code *)local_d0); if (cVar1 != '\x02') { (**(code **)(*local_b8 + 0x20))(&local_b0,local_b8,local_c0[0]); local_48 = *(int4 *)param_1; uStack_44 = *(int4 *)(param_1 + 4); uStack_40 = *(int4 *)(param_1 + 8); uStack_3c = *(int4 *)(param_1 + 0xc); local_60 = local_58; local_58[0] = "CreateDir"; local_38 = local_b0; uStack_34 = uStack_ac; uStack_30 = uStack_a8; uStack_2c = uStack_a4; local_68 = 0xddc; Common::Log::GenericLogFmtImpl ((Log *)0x2,6, "/workspace/llm4binary/github2025/Dolphin-anty/Source/Core/Common/FileUtil.cpp", 0xd6,"{}: failed on {}: {}",0x14,&local_68); if ((long *)CONCAT44(uStack_ac,local_b0) != local_a0) { operator_delete((long *)CONCAT44(uStack_ac,local_b0),local_a0[0] + 1); } uVar3 = 0; } } std::filesystem::__cxx11::path::~path(local_90); return uVar3; }
51,481
my_copy_fix_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static size_t my_copy_fix_mb2_or_mb4(CHARSET_INFO *cs, char *dst, size_t dst_length, const char *src, size_t src_length, size_t nchars, MY_STRCOPY_STATUS *status) { size_t length2, src_offset= src_length % cs->mbminlen; my_char_copy_status_t padstatus; if (!src_offset) return my_copy_fix_mb(cs, dst, dst_length, src, src_length, nchars, status); if ((padstatus= my_copy_incomplete_char(cs, dst, dst_length, src, src_length, nchars, TRUE)) == MY_CHAR_COPY_ERROR) { status->m_source_end_pos= status->m_well_formed_error_pos= src; return 0; } length2= my_copy_fix_mb(cs, dst + cs->mbminlen, dst_length - cs->mbminlen, src + src_offset, src_length - src_offset, nchars - 1, status); if (padstatus == MY_CHAR_COPY_FIXED) status->m_well_formed_error_pos= src; return cs->mbminlen /* The left-padded character */ + length2; }
O0
c
my_copy_fix_mb2_or_mb4: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq 0x10(%rbp), %rax movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) movq -0x30(%rbp), %rax movq -0x10(%rbp), %rcx movl 0x98(%rcx), %ecx xorl %edx, %edx divq %rcx movq %rdx, -0x48(%rbp) cmpq $0x0, -0x48(%rbp) jne 0x67fb0 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x28(%rbp), %rcx movq -0x30(%rbp), %r8 movq -0x38(%rbp), %r9 movq 0x10(%rbp), %rax movq %rax, (%rsp) callq 0x4d760 movq %rax, -0x8(%rbp) jmp 0x6806c movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x28(%rbp), %rcx movq -0x30(%rbp), %r8 movq -0x38(%rbp), %r9 movl $0x1, (%rsp) callq 0x69860 movl %eax, -0x4c(%rbp) cmpl $0x1, %eax jne 0x67ff9 movq -0x28(%rbp), %rcx movq 0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq 0x10(%rbp), %rax movq %rcx, (%rax) movq $0x0, -0x8(%rbp) jmp 0x6806c movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x10(%rbp), %rax movl 0x98(%rax), %eax addq %rax, %rsi movq -0x20(%rbp), %rdx movq -0x10(%rbp), %rax movl 0x98(%rax), %eax subq %rax, %rdx movq -0x28(%rbp), %rcx addq -0x48(%rbp), %rcx movq -0x30(%rbp), %r8 subq -0x48(%rbp), %r8 movq -0x38(%rbp), %r9 subq $0x1, %r9 movq 0x10(%rbp), %rax movq %rax, (%rsp) callq 0x4d760 movq %rax, -0x40(%rbp) cmpl $0x2, -0x4c(%rbp) jne 0x6805a movq -0x28(%rbp), %rcx movq 0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax movl 0x98(%rax), %eax addq -0x40(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_copy_fix_mb2_or_mb4: push rbp mov rbp, rsp sub rsp, 60h mov rax, [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_38], r9 mov rax, [rbp+var_30] mov rcx, [rbp+var_10] mov ecx, [rcx+98h] xor edx, edx div rcx mov [rbp+var_48], rdx cmp [rbp+var_48], 0 jnz short loc_67FB0 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 r9, [rbp+var_38] mov rax, [rbp+arg_0] mov [rsp+60h+var_60], rax call my_copy_fix_mb mov [rbp+var_8], rax jmp loc_6806C loc_67FB0: 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 r9, [rbp+var_38] mov dword ptr [rsp+60h+var_60], 1 call my_copy_incomplete_char mov [rbp+var_4C], eax cmp eax, 1 jnz short loc_67FF9 mov rcx, [rbp+var_28] mov rax, [rbp+arg_0] mov [rax+8], rcx mov rax, [rbp+arg_0] mov [rax], rcx mov [rbp+var_8], 0 jmp short loc_6806C loc_67FF9: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rax, [rbp+var_10] mov eax, [rax+98h] add rsi, rax mov rdx, [rbp+var_20] mov rax, [rbp+var_10] mov eax, [rax+98h] sub rdx, rax mov rcx, [rbp+var_28] add rcx, [rbp+var_48] mov r8, [rbp+var_30] sub r8, [rbp+var_48] mov r9, [rbp+var_38] sub r9, 1 mov rax, [rbp+arg_0] mov [rsp+60h+var_60], rax call my_copy_fix_mb mov [rbp+var_40], rax cmp [rbp+var_4C], 2 jnz short loc_6805A mov rcx, [rbp+var_28] mov rax, [rbp+arg_0] mov [rax+8], rcx loc_6805A: mov rax, [rbp+var_10] mov eax, [rax+98h] add rax, [rbp+var_40] mov [rbp+var_8], rax loc_6806C: mov rax, [rbp+var_8] add rsp, 60h pop rbp retn
long long my_copy_fix_mb2_or_mb4( long long a1, long long a2, unsigned long long a3, long long a4, unsigned long long a5, long long a6, long long *a7) { int v8; // [rsp+14h] [rbp-4Ch] unsigned long long v9; // [rsp+18h] [rbp-48h] long long fixed; // [rsp+20h] [rbp-40h] v9 = a5 % *(unsigned int *)(a1 + 152); if ( !v9 ) return my_copy_fix_mb(a1, a2, a3, a4, a5, a6, a7); v8 = my_copy_incomplete_char(a1, a2, a3, a4, a5, a6, 1); if ( v8 == 1 ) { a7[1] = a4; *a7 = a4; return 0LL; } else { fixed = my_copy_fix_mb( a1, *(unsigned int *)(a1 + 152) + a2, a3 - *(unsigned int *)(a1 + 152), v9 + a4, a5 - v9, a6 - 1, a7); if ( v8 == 2 ) a7[1] = a4; return fixed + *(unsigned int *)(a1 + 152); } }
my_copy_fix_mb2_or_mb4: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV RAX,qword 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 qword ptr [RBP + -0x38],R9 MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x98] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x48],RDX CMP qword ptr [RBP + -0x48],0x0 JNZ 0x00167fb0 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 R9,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RSP],RAX CALL 0x0014d760 MOV qword ptr [RBP + -0x8],RAX JMP 0x0016806c LAB_00167fb0: 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 R9,qword ptr [RBP + -0x38] MOV dword ptr [RSP],0x1 CALL 0x00169860 MOV dword ptr [RBP + -0x4c],EAX CMP EAX,0x1 JNZ 0x00167ff9 MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RAX],RCX MOV qword ptr [RBP + -0x8],0x0 JMP 0x0016806c LAB_00167ff9: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x98] ADD RSI,RAX MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x98] SUB RDX,RAX MOV RCX,qword ptr [RBP + -0x28] ADD RCX,qword ptr [RBP + -0x48] MOV R8,qword ptr [RBP + -0x30] SUB R8,qword ptr [RBP + -0x48] MOV R9,qword ptr [RBP + -0x38] SUB R9,0x1 MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RSP],RAX CALL 0x0014d760 MOV qword ptr [RBP + -0x40],RAX CMP dword ptr [RBP + -0x4c],0x2 JNZ 0x0016805a MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RAX + 0x8],RCX LAB_0016805a: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x98] ADD RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x8],RAX LAB_0016806c: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x60 POP RBP RET
long my_copy_fix_mb2_or_mb4 (long param_1,long param_2,long param_3,long param_4,ulong param_5,long param_6, long *param_7) { int iVar1; ulong uVar2; long local_10; uVar2 = param_5 % (ulong)*(uint *)(param_1 + 0x98); if (uVar2 == 0) { local_10 = my_copy_fix_mb(param_1,param_2,param_3,param_4,param_5,param_6,param_7); } else { iVar1 = my_copy_incomplete_char(param_1,param_2,param_3,param_4,param_5,param_6,1); if (iVar1 == 1) { param_7[1] = param_4; *param_7 = param_4; local_10 = 0; } else { local_10 = my_copy_fix_mb(param_1,param_2 + (ulong)*(uint *)(param_1 + 0x98), param_3 - (ulong)*(uint *)(param_1 + 0x98),param_4 + uVar2, param_5 - uVar2,param_6 + -1,param_7); if (iVar1 == 2) { param_7[1] = param_4; } local_10 = (ulong)*(uint *)(param_1 + 0x98) + local_10; } } return local_10; }
51,482
my_copy_fix_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static size_t my_copy_fix_mb2_or_mb4(CHARSET_INFO *cs, char *dst, size_t dst_length, const char *src, size_t src_length, size_t nchars, MY_STRCOPY_STATUS *status) { size_t length2, src_offset= src_length % cs->mbminlen; my_char_copy_status_t padstatus; if (!src_offset) return my_copy_fix_mb(cs, dst, dst_length, src, src_length, nchars, status); if ((padstatus= my_copy_incomplete_char(cs, dst, dst_length, src, src_length, nchars, TRUE)) == MY_CHAR_COPY_ERROR) { status->m_source_end_pos= status->m_well_formed_error_pos= src; return 0; } length2= my_copy_fix_mb(cs, dst + cs->mbminlen, dst_length - cs->mbminlen, src + src_offset, src_length - src_offset, nchars - 1, status); if (padstatus == MY_CHAR_COPY_FIXED) status->m_well_formed_error_pos= src; return cs->mbminlen /* The left-padded character */ + length2; }
O3
c
my_copy_fix_mb2_or_mb4: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rcx, %r12 movq %rdx, %r10 movq %rsi, %rbx movq %rdi, %r14 movl 0x98(%rdi), %r13d movq %r8, %rax xorl %edx, %edx divq %r13 testq %rdx, %rdx je 0x50d5d cmpq %r10, %r13 seta %al movq 0x10(%rbp), %rsi testq %r9, %r9 sete %cl orb %al, %cl jne 0x50dec movq %rdx, %r15 movq %rsi, -0x38(%rbp) movq %r10, -0x40(%rbp) movq %r8, -0x48(%rbp) movq %r9, -0x50(%rbp) subq %rdx, %r13 movq %rbx, %rdi xorl %esi, %esi movq %r13, %rdx callq 0x24190 addq %rbx, %r13 movq %r13, %rdi movq %r12, -0x58(%rbp) movq %r12, %rsi movq %r15, %rdx callq 0x24560 movl 0x98(%r14), %edx addq %rbx, %rdx movq 0xb8(%r14), %rax movq %r14, %rdi movq %rbx, %rsi callq *0xc0(%rax) movl 0x98(%r14), %r13d cmpl %r13d, %eax movl %eax, -0x2c(%rbp) jne 0x50d7c movq -0x58(%rbp), %r12 movq -0x50(%rbp), %r9 movq -0x48(%rbp), %r8 movq -0x40(%rbp), %rdx movq -0x38(%rbp), %rsi jmp 0x50db2 movq %r14, %rdi movq %rbx, %rsi movq %r10, %rdx movq %r12, %rcx addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x3fd36 movq 0xb8(%r14), %rax leaq (%rbx,%r13), %rcx movl $0x3f, %esi movq %r14, %rdi movq %rbx, %rdx callq *0x30(%rax) cmpl 0x98(%r14), %eax movq -0x58(%rbp), %r12 movq -0x50(%rbp), %r9 movq -0x48(%rbp), %r8 movq -0x40(%rbp), %rdx movq -0x38(%rbp), %rsi jne 0x50dec movl %eax, %eax addq %rax, %rbx subq %rax, %rdx leaq (%r12,%r15), %rcx subq %r15, %r8 decq %r9 movq %rsi, (%rsp) movq %r14, %rdi movq %rsi, %r15 movq %rbx, %rsi callq 0x3fd36 cmpl %r13d, -0x2c(%rbp) je 0x50de0 movq %r12, 0x8(%r15) movl 0x98(%r14), %ecx addq %rcx, %rax jmp 0x50df5 movq %r12, 0x8(%rsi) movq %r12, (%rsi) xorl %eax, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_copy_fix_mb2_or_mb4: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r12, rcx mov r10, rdx mov rbx, rsi mov r14, rdi mov r13d, [rdi+98h] mov rax, r8 xor edx, edx div r13 test rdx, rdx jz loc_50D5D cmp r13, r10 setnbe al mov rsi, [rbp+arg_0] test r9, r9 setz cl or cl, al jnz loc_50DEC mov r15, rdx mov [rbp+var_38], rsi mov [rbp+var_40], r10 mov [rbp+var_48], r8 mov [rbp+var_50], r9 sub r13, rdx mov rdi, rbx xor esi, esi mov rdx, r13 call _memset add r13, rbx mov rdi, r13 mov [rbp+var_58], r12 mov rsi, r12 mov rdx, r15 call _memmove mov edx, [r14+98h] add rdx, rbx mov rax, [r14+0B8h] mov rdi, r14 mov rsi, rbx call qword ptr [rax+0C0h] mov r13d, [r14+98h] cmp eax, r13d mov [rbp+var_2C], eax jnz short loc_50D7C mov r12, [rbp+var_58] mov r9, [rbp+var_50] mov r8, [rbp+var_48] mov rdx, [rbp+var_40] mov rsi, [rbp+var_38] jmp short loc_50DB2 loc_50D5D: mov rdi, r14 mov rsi, rbx mov rdx, r10 mov rcx, r12 add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp my_copy_fix_mb loc_50D7C: mov rax, [r14+0B8h] lea rcx, [rbx+r13] mov esi, 3Fh ; '?' mov rdi, r14 mov rdx, rbx call qword ptr [rax+30h] cmp eax, [r14+98h] mov r12, [rbp+var_58] mov r9, [rbp+var_50] mov r8, [rbp+var_48] mov rdx, [rbp+var_40] mov rsi, [rbp+var_38] jnz short loc_50DEC loc_50DB2: mov eax, eax add rbx, rax sub rdx, rax lea rcx, [r12+r15] sub r8, r15 dec r9 mov [rsp+60h+var_60], rsi mov rdi, r14 mov r15, rsi mov rsi, rbx call my_copy_fix_mb cmp [rbp+var_2C], r13d jz short loc_50DE0 mov [r15+8], r12 loc_50DE0: mov ecx, [r14+98h] add rax, rcx jmp short loc_50DF5 loc_50DEC: mov [rsi+8], r12 mov [rsi], r12 xor eax, eax loc_50DF5: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long my_copy_fix_mb2_or_mb4( long long a1, long long a2, unsigned long long a3, long long a4, unsigned long long a5, long long a6, unsigned long long *a7) { unsigned long long v9; // r13 unsigned long long *v10; // rsi unsigned long long v11; // r15 unsigned long long v12; // r13 unsigned int v13; // eax long long v14; // r13 long long v15; // r9 unsigned long long v16; // r8 unsigned long long v17; // rdx unsigned long long fixed; // rax unsigned int v23; // [rsp+34h] [rbp-2Ch] v9 = *(unsigned int *)(a1 + 152); if ( !(a5 % v9) ) return my_copy_fix_mb(a1, a2, a3, a4, a5, a6, a7); v10 = a7; if ( v9 > a3 || a6 == 0 ) goto LABEL_10; v11 = a5 % *(unsigned int *)(a1 + 152); v12 = v9 - a5 % v9; memset(a2, 0LL, v12); memmove(a2 + v12, a4); v13 = (*(long long ( **)(long long, long long, long long))(*(_QWORD *)(a1 + 184) + 192LL))( a1, a2, a2 + *(unsigned int *)(a1 + 152)); v14 = *(unsigned int *)(a1 + 152); v23 = v13; if ( v13 != (_DWORD)v14 ) { v13 = (*(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a1 + 184) + 48LL))( a1, 63LL, a2, a2 + v14); v15 = a6; v16 = a5; v17 = a3; v10 = a7; if ( v13 == *(_DWORD *)(a1 + 152) ) goto LABEL_7; LABEL_10: v10[1] = a4; *v10 = a4; return 0LL; } v15 = a6; v16 = a5; v17 = a3; v10 = a7; LABEL_7: fixed = my_copy_fix_mb(a1, v13 + a2, v17 - v13, a4 + v11, v16 - v11, v15 - 1, v10); if ( v23 != (_DWORD)v14 ) v10[1] = a4; return *(unsigned int *)(a1 + 152) + fixed; }
my_copy_fix_mb2_or_mb4: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R12,RCX MOV R10,RDX MOV RBX,RSI MOV R14,RDI MOV R13D,dword ptr [RDI + 0x98] MOV RAX,R8 XOR EDX,EDX DIV R13 TEST RDX,RDX JZ 0x00150d5d CMP R13,R10 SETA AL MOV RSI,qword ptr [RBP + 0x10] TEST R9,R9 SETZ CL OR CL,AL JNZ 0x00150dec MOV R15,RDX MOV qword ptr [RBP + -0x38],RSI MOV qword ptr [RBP + -0x40],R10 MOV qword ptr [RBP + -0x48],R8 MOV qword ptr [RBP + -0x50],R9 SUB R13,RDX MOV RDI,RBX XOR ESI,ESI MOV RDX,R13 CALL 0x00124190 ADD R13,RBX MOV RDI,R13 MOV qword ptr [RBP + -0x58],R12 MOV RSI,R12 MOV RDX,R15 CALL 0x00124560 MOV EDX,dword ptr [R14 + 0x98] ADD RDX,RBX MOV RAX,qword ptr [R14 + 0xb8] MOV RDI,R14 MOV RSI,RBX CALL qword ptr [RAX + 0xc0] MOV R13D,dword ptr [R14 + 0x98] CMP EAX,R13D MOV dword ptr [RBP + -0x2c],EAX JNZ 0x00150d7c MOV R12,qword ptr [RBP + -0x58] MOV R9,qword ptr [RBP + -0x50] MOV R8,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x38] JMP 0x00150db2 LAB_00150d5d: MOV RDI,R14 MOV RSI,RBX MOV RDX,R10 MOV RCX,R12 ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0013fd36 LAB_00150d7c: MOV RAX,qword ptr [R14 + 0xb8] LEA RCX,[RBX + R13*0x1] MOV ESI,0x3f MOV RDI,R14 MOV RDX,RBX CALL qword ptr [RAX + 0x30] CMP EAX,dword ptr [R14 + 0x98] MOV R12,qword ptr [RBP + -0x58] MOV R9,qword ptr [RBP + -0x50] MOV R8,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x38] JNZ 0x00150dec LAB_00150db2: MOV EAX,EAX ADD RBX,RAX SUB RDX,RAX LEA RCX,[R12 + R15*0x1] SUB R8,R15 DEC R9 MOV qword ptr [RSP],RSI MOV RDI,R14 MOV R15,RSI MOV RSI,RBX CALL 0x0013fd36 CMP dword ptr [RBP + -0x2c],R13D JZ 0x00150de0 MOV qword ptr [R15 + 0x8],R12 LAB_00150de0: MOV ECX,dword ptr [R14 + 0x98] ADD RAX,RCX JMP 0x00150df5 LAB_00150dec: MOV qword ptr [RSI + 0x8],R12 MOV qword ptr [RSI],R12 XOR EAX,EAX LAB_00150df5: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_copy_fix_mb2_or_mb4 (long param_1,void *param_2,ulong param_3,void *param_4,ulong param_5,long param_6, int8 *param_7) { uint uVar1; uint uVar2; uint uVar3; long lVar4; ulong __n; ulong uVar5; uVar5 = (ulong)*(uint *)(param_1 + 0x98); __n = param_5 % uVar5; if (__n == 0) { lVar4 = my_copy_fix_mb(param_1,param_2,param_3,param_4); return lVar4; } if (param_6 != 0 && uVar5 <= param_3) { memset(param_2,0,uVar5 - __n); memmove((void *)((uVar5 - __n) + (long)param_2),param_4,__n); uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0)) (param_1,param_2,(ulong)*(uint *)(param_1 + 0x98) + (long)param_2); uVar1 = *(uint *)(param_1 + 0x98); uVar3 = uVar2; if ((uVar2 == uVar1) || (uVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30)) (param_1,0x3f,param_2,(long)param_2 + (ulong)uVar1), uVar3 == *(uint *)(param_1 + 0x98))) { lVar4 = my_copy_fix_mb(param_1,(long)param_2 + (ulong)uVar3,param_3 - uVar3, (long)param_4 + __n,param_5 - __n,param_6 + -1,param_7); if (uVar2 != uVar1) { param_7[1] = param_4; } return lVar4 + (ulong)*(uint *)(param_1 + 0x98); } } param_7[1] = param_4; *param_7 = param_4; return 0; }
51,483
LefDefParser::defiProp::Init()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiProp.cpp
void defiProp::Init() { stringLength_ = 16; stringData_ = (char*)malloc(16); nameSize_ = 16; propName_ = (char*)malloc(16); clear(); }
O3
cpp
LefDefParser::defiProp::Init(): pushq %rbp pushq %r14 pushq %rbx movq %rdi, %rbx movl $0x10, %ebp movl %ebp, 0x20(%rdi) movl $0x10, %edi callq 0x6270 movq %rax, %r14 movq %rax, 0x18(%rbx) movl %ebp, 0x10(%rbx) movl $0x10, %edi callq 0x6270 movq %rax, 0x8(%rbx) testq %r14, %r14 je 0x29cfc movb $0x0, (%r14) testq %rax, %rax je 0x29d04 movb $0x0, (%rax) xorl %eax, %eax movq %rax, (%rbx) movl $0x42000000, 0x14(%rbx) # imm = 0x42000000 xorps %xmm0, %xmm0 movups %xmm0, 0x28(%rbx) movq %rax, 0x38(%rbx) popq %rbx popq %r14 popq %rbp retq
_ZN12LefDefParser8defiProp4InitEv: push rbp push r14 push rbx mov rbx, rdi mov ebp, 10h mov [rdi+20h], ebp mov edi, 10h call _malloc mov r14, rax mov [rbx+18h], rax mov [rbx+10h], ebp mov edi, 10h call _malloc mov [rbx+8], rax test r14, r14 jz short loc_29CFC mov byte ptr [r14], 0 loc_29CFC: test rax, rax jz short loc_29D04 mov byte ptr [rax], 0 loc_29D04: xor eax, eax mov [rbx], rax mov dword ptr [rbx+14h], 42000000h xorps xmm0, xmm0 movups xmmword ptr [rbx+28h], xmm0 mov [rbx+38h], rax pop rbx pop r14 pop rbp retn
long long LefDefParser::defiProp::Init(LefDefParser::defiProp *this) { _BYTE *v1; // r14 _BYTE *v2; // rax long long result; // rax *((_DWORD *)this + 8) = 16; v1 = (_BYTE *)malloc(16LL); *((_QWORD *)this + 3) = v1; *((_DWORD *)this + 4) = 16; v2 = (_BYTE *)malloc(16LL); *((_QWORD *)this + 1) = v2; if ( v1 ) *v1 = 0; if ( v2 ) *v2 = 0; result = 0LL; *(_QWORD *)this = 0LL; *((_DWORD *)this + 5) = 1107296256; *(_OWORD *)((char *)this + 40) = 0LL; *((_QWORD *)this + 7) = 0LL; return result; }
Init: PUSH RBP PUSH R14 PUSH RBX MOV RBX,RDI MOV EBP,0x10 MOV dword ptr [RDI + 0x20],EBP MOV EDI,0x10 CALL 0x00106270 MOV R14,RAX MOV qword ptr [RBX + 0x18],RAX MOV dword ptr [RBX + 0x10],EBP MOV EDI,0x10 CALL 0x00106270 MOV qword ptr [RBX + 0x8],RAX TEST R14,R14 JZ 0x00129cfc MOV byte ptr [R14],0x0 LAB_00129cfc: TEST RAX,RAX JZ 0x00129d04 MOV byte ptr [RAX],0x0 LAB_00129d04: XOR EAX,EAX MOV qword ptr [RBX],RAX MOV dword ptr [RBX + 0x14],0x42000000 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x28],XMM0 MOV qword ptr [RBX + 0x38],RAX POP RBX POP R14 POP RBP RET
/* LefDefParser::defiProp::Init() */ void __thiscall LefDefParser::defiProp::Init(defiProp *this) { int1 *puVar1; int1 *puVar2; *(int4 *)(this + 0x20) = 0x10; puVar1 = (int1 *)malloc(0x10); *(int1 **)(this + 0x18) = puVar1; *(int4 *)(this + 0x10) = 0x10; puVar2 = (int1 *)malloc(0x10); *(int1 **)(this + 8) = puVar2; if (puVar1 != (int1 *)0x0) { *puVar1 = 0; } if (puVar2 != (int1 *)0x0) { *puVar2 = 0; } *(int8 *)this = 0; *(int4 *)(this + 0x14) = 0x42000000; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; return; }
51,484
mysql_stmt_use_result
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
MYSQL_RES *_mysql_stmt_use_result(MYSQL_STMT *stmt) { MYSQL *mysql= stmt->mysql; if (!stmt->field_count || (!stmt->cursor_exists && mysql->status != MYSQL_STATUS_STMT_RESULT) || (stmt->cursor_exists && mysql->status != MYSQL_STATUS_READY) || (stmt->state != MYSQL_STMT_WAITING_USE_OR_STORE)) { SET_CLIENT_ERROR(mysql, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); return(NULL); } CLEAR_CLIENT_STMT_ERROR(stmt); stmt->state = MYSQL_STMT_USE_OR_STORE_CALLED; if (!stmt->cursor_exists) stmt->fetch_row_func= stmt_unbuffered_fetch; //mysql_stmt_fetch_unbuffered_row; else stmt->fetch_row_func= stmt_cursor_fetch; return(NULL); }
O0
c
mysql_stmt_use_result: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax cmpl $0x0, 0x60(%rax) je 0x26073 movq -0x10(%rbp), %rax cmpb $0x0, 0x338(%rax) jne 0x2604c movq -0x18(%rbp), %rax cmpl $0x8, 0x488(%rax) jne 0x26073 movq -0x10(%rbp), %rax movsbl 0x338(%rax), %eax cmpl $0x0, %eax je 0x26069 movq -0x18(%rbp), %rax cmpl $0x0, 0x488(%rax) jne 0x26073 movq -0x10(%rbp), %rax cmpl $0x3, 0x50(%rax) je 0x260e2 jmp 0x26075 movq -0x18(%rbp), %rax movl $0x7de, 0x90(%rax) # imm = 0x7DE movq -0x18(%rbp), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x39e1b(%rip), %rax # 0x5feb0 movq (%rax), %rsi movl $0x5, %edx callq 0x13210 movq -0x18(%rbp), %rax movb $0x0, 0x29c(%rax) movq -0x18(%rbp), %rdi addq $0x97, %rdi leaq 0x39e01(%rip), %rax # 0x5fec0 movq 0x70(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13210 movq -0x18(%rbp), %rax movb $0x0, 0x296(%rax) movq $0x0, -0x8(%rbp) jmp 0x2615a jmp 0x260e4 movq -0x10(%rbp), %rax movl $0x0, 0x108(%rax) movq -0x10(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D leaq 0x25727(%rip), %rsi # 0x4b82b callq 0x133c0 movq -0x10(%rbp), %rax movb $0x0, 0x10c(%rax) movq -0x10(%rbp), %rax movl $0x4, 0x50(%rax) movq -0x10(%rbp), %rax cmpb $0x0, 0x338(%rax) jne 0x26140 movq -0x10(%rbp), %rax leaq 0x39(%rip), %rcx # 0x26170 movq %rcx, 0x348(%rax) jmp 0x26152 movq -0x10(%rbp), %rax leaq 0xe5(%rip), %rcx # 0x26230 movq %rcx, 0x348(%rax) movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_mysql_stmt_use_result: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax+38h] mov [rbp+var_18], rax mov rax, [rbp+var_10] cmp dword ptr [rax+60h], 0 jz short loc_26073 mov rax, [rbp+var_10] cmp byte ptr [rax+338h], 0 jnz short loc_2604C mov rax, [rbp+var_18] cmp dword ptr [rax+488h], 8 jnz short loc_26073 loc_2604C: mov rax, [rbp+var_10] movsx eax, byte ptr [rax+338h] cmp eax, 0 jz short loc_26069 mov rax, [rbp+var_18] cmp dword ptr [rax+488h], 0 jnz short loc_26073 loc_26069: mov rax, [rbp+var_10] cmp dword ptr [rax+50h], 3 jz short loc_260E2 loc_26073: jmp short $+2 loc_26075: mov rax, [rbp+var_18] mov dword ptr [rax+90h], 7DEh mov rdi, [rbp+var_18] add rdi, 297h lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_18] mov byte ptr [rax+29Ch], 0 mov rdi, [rbp+var_18] add rdi, 97h lea rax, client_errors mov rsi, [rax+70h] mov edx, 1FFh call _strncpy mov rax, [rbp+var_18] mov byte ptr [rax+296h], 0 mov [rbp+var_8], 0 jmp short loc_2615A loc_260E2: jmp short $+2 loc_260E4: mov rax, [rbp+var_10] mov dword ptr [rax+108h], 0 mov rdi, [rbp+var_10] add rdi, 30Dh lea rsi, a00000; "00000" call _strcpy mov rax, [rbp+var_10] mov byte ptr [rax+10Ch], 0 mov rax, [rbp+var_10] mov dword ptr [rax+50h], 4 mov rax, [rbp+var_10] cmp byte ptr [rax+338h], 0 jnz short loc_26140 mov rax, [rbp+var_10] lea rcx, stmt_unbuffered_fetch mov [rax+348h], rcx jmp short loc_26152 loc_26140: mov rax, [rbp+var_10] lea rcx, stmt_cursor_fetch mov [rax+348h], rcx loc_26152: mov [rbp+var_8], 0 loc_2615A: mov rax, [rbp+var_8] add rsp, 20h pop rbp retn
long long mysql_stmt_use_result(long long a1) { long long v2; // [rsp+8h] [rbp-18h] v2 = *(_QWORD *)(a1 + 56); if ( *(_DWORD *)(a1 + 96) && (*(_BYTE *)(a1 + 824) || *(_DWORD *)(v2 + 1160) == 8) && (!*(_BYTE *)(a1 + 824) || !*(_DWORD *)(v2 + 1160)) && *(_DWORD *)(a1 + 80) == 3 ) { *(_DWORD *)(a1 + 264) = 0; strcpy(a1 + 781, "00000"); *(_BYTE *)(a1 + 268) = 0; *(_DWORD *)(a1 + 80) = 4; if ( *(_BYTE *)(a1 + 824) ) *(_QWORD *)(a1 + 840) = stmt_cursor_fetch; else *(_QWORD *)(a1 + 840) = stmt_unbuffered_fetch; } else { *(_DWORD *)(v2 + 144) = 2014; strncpy(v2 + 663, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(v2 + 668) = 0; strncpy(v2 + 151, client_errors[14], 511LL); *(_BYTE *)(v2 + 662) = 0; } return 0LL; }
_mysql_stmt_use_result: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x60],0x0 JZ 0x00126073 MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x338],0x0 JNZ 0x0012604c MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x488],0x8 JNZ 0x00126073 LAB_0012604c: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX + 0x338] CMP EAX,0x0 JZ 0x00126069 MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x488],0x0 JNZ 0x00126073 LAB_00126069: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x50],0x3 JZ 0x001260e2 LAB_00126073: JMP 0x00126075 LAB_00126075: MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x90],0x7de MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x297 LEA RAX,[0x15feb0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x29c],0x0 MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x97 LEA RAX,[0x15fec0] MOV RSI,qword ptr [RAX + 0x70] MOV EDX,0x1ff CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x296],0x0 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0012615a LAB_001260e2: JMP 0x001260e4 LAB_001260e4: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x108],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x30d LEA RSI,[0x14b82b] CALL 0x001133c0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x10c],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x50],0x4 MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x338],0x0 JNZ 0x00126140 MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x126170] MOV qword ptr [RAX + 0x348],RCX JMP 0x00126152 LAB_00126140: MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x126230] MOV qword ptr [RAX + 0x348],RCX LAB_00126152: MOV qword ptr [RBP + -0x8],0x0 LAB_0012615a: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
int8 _mysql_stmt_use_result(long param_1) { long lVar1; lVar1 = *(long *)(param_1 + 0x38); if ((((*(int *)(param_1 + 0x60) == 0) || ((*(char *)(param_1 + 0x338) == '\0' && (*(int *)(lVar1 + 0x488) != 8)))) || ((*(char *)(param_1 + 0x338) != '\0' && (*(int *)(lVar1 + 0x488) != 0)))) || (*(int *)(param_1 + 0x50) != 3)) { *(int4 *)(lVar1 + 0x90) = 0x7de; strncpy((char *)(lVar1 + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(lVar1 + 0x29c) = 0; strncpy((char *)(lVar1 + 0x97),PTR_s_Commands_out_of_sync__you_can_t_r_0015ff30,0x1ff); *(int1 *)(lVar1 + 0x296) = 0; } else { *(int4 *)(param_1 + 0x108) = 0; strcpy((char *)(param_1 + 0x30d),"00000"); *(int1 *)(param_1 + 0x10c) = 0; *(int4 *)(param_1 + 0x50) = 4; if (*(char *)(param_1 + 0x338) == '\0') { *(code **)(param_1 + 0x348) = stmt_unbuffered_fetch; } else { *(code **)(param_1 + 0x348) = stmt_cursor_fetch; } } return 0; }
51,485
mi_reset
eloqsql/storage/myisam/mi_extra.c
int mi_reset(MI_INFO *info) { int error= 0; MYISAM_SHARE *share=info->s; DBUG_ENTER("mi_reset"); /* Free buffers and reset the following flags: EXTRA_CACHE, EXTRA_WRITE_CACHE, EXTRA_KEYREAD, EXTRA_QUICK If the row buffer cache is large (for dynamic tables), reduce it to save memory. */ if (info->opt_flag & (READ_CACHE_USED | WRITE_CACHE_USED)) { info->opt_flag&= ~(READ_CACHE_USED | WRITE_CACHE_USED); error= end_io_cache(&info->rec_cache); } if (share->base.blobs) mi_alloc_rec_buff(info, -1, &info->rec_buff); #if defined(HAVE_MMAP) && defined(HAVE_MADVISE) if (info->opt_flag & MEMMAP_USED) madvise((char*) share->file_map, share->state.state.data_file_length, MADV_RANDOM); #endif info->opt_flag&= ~(KEY_READ_USED | REMEMBER_OLD_POS); info->quick_mode=0; info->lastinx= 0; /* Use first index as def */ info->last_search_keypage= info->lastpos= HA_OFFSET_ERROR; info->page_changed= 1; info->update= ((info->update & HA_STATE_CHANGED) | HA_STATE_NEXT_FOUND | HA_STATE_PREV_FOUND); DBUG_RETURN(error); }
O3
c
mi_reset: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq (%rdi), %r15 movl 0x1c8(%rdi), %eax testb $0x12, %al je 0x7be6e andl $-0x13, %eax movl %eax, 0x1c8(%rbx) leaq 0x220(%rbx), %rdi callq 0x97797 movl %eax, %r14d jmp 0x7be71 xorl %r14d, %r14d cmpl $0x0, 0x188(%r15) je 0x7be91 leaq 0x120(%rbx), %rdx movq %rbx, %rdi movq $-0x1, %rsi callq 0x80f8d movl 0x1c8(%rbx), %eax testb $0x20, %al je 0x7beb6 movq 0x270(%r15), %rdi movq 0x40(%r15), %rsi movl $0x1, %edx callq 0x29480 movl 0x1c8(%rbx), %eax andl $-0x49, %eax movl %eax, 0x1c8(%rbx) movw $0x100, 0x33b(%rbx) # imm = 0x100 movl $0x0, 0x1d4(%rbx) movq $-0x1, %rax movq %rax, 0x170(%rbx) movq %rax, 0x198(%rbx) movl 0x1d0(%rbx), %eax andl $0x1, %eax orl $0x30, %eax movl %eax, 0x1d0(%rbx) movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
mi_reset: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi mov r15, [rdi] mov eax, [rdi+1C8h] test al, 12h jz short loc_7BE6E and eax, 0FFFFFFEDh mov [rbx+1C8h], eax lea rdi, [rbx+220h] call end_io_cache mov r14d, eax jmp short loc_7BE71 loc_7BE6E: xor r14d, r14d loc_7BE71: cmp dword ptr [r15+188h], 0 jz short loc_7BE91 lea rdx, [rbx+120h] mov rdi, rbx mov rsi, 0FFFFFFFFFFFFFFFFh call mi_alloc_rec_buff loc_7BE91: mov eax, [rbx+1C8h] test al, 20h jz short loc_7BEB6 mov rdi, [r15+270h] mov rsi, [r15+40h] mov edx, 1 call _madvise mov eax, [rbx+1C8h] loc_7BEB6: and eax, 0FFFFFFB7h mov [rbx+1C8h], eax mov word ptr [rbx+33Bh], 100h mov dword ptr [rbx+1D4h], 0 mov rax, 0FFFFFFFFFFFFFFFFh mov [rbx+170h], rax mov [rbx+198h], rax mov eax, [rbx+1D0h] and eax, 1 or eax, 30h mov [rbx+1D0h], eax mov eax, r14d add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long mi_reset(long long *a1) { long long v1; // r15 int v2; // eax unsigned int v3; // r14d int v4; // eax v1 = *a1; v2 = *((_DWORD *)a1 + 114); if ( (v2 & 0x12) != 0 ) { *((_DWORD *)a1 + 114) = v2 & 0xFFFFFFED; v3 = end_io_cache(a1 + 68); } else { v3 = 0; } if ( *(_DWORD *)(v1 + 392) ) mi_alloc_rec_buff(a1, -1LL, a1 + 36); v4 = *((_DWORD *)a1 + 114); if ( (v4 & 0x20) != 0 ) { madvise(*(_QWORD *)(v1 + 624), *(_QWORD *)(v1 + 64), 1LL); v4 = *((_DWORD *)a1 + 114); } *((_DWORD *)a1 + 114) = v4 & 0xFFFFFFB7; *(_WORD *)((char *)a1 + 827) = 256; *((_DWORD *)a1 + 117) = 0; a1[46] = -1LL; a1[51] = -1LL; *((_DWORD *)a1 + 116) = a1[58] & 1 | 0x30; return v3; }
mi_reset: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV R15,qword ptr [RDI] MOV EAX,dword ptr [RDI + 0x1c8] TEST AL,0x12 JZ 0x0017be6e AND EAX,0xffffffed MOV dword ptr [RBX + 0x1c8],EAX LEA RDI,[RBX + 0x220] CALL 0x00197797 MOV R14D,EAX JMP 0x0017be71 LAB_0017be6e: XOR R14D,R14D LAB_0017be71: CMP dword ptr [R15 + 0x188],0x0 JZ 0x0017be91 LEA RDX,[RBX + 0x120] MOV RDI,RBX MOV RSI,-0x1 CALL 0x00180f8d LAB_0017be91: MOV EAX,dword ptr [RBX + 0x1c8] TEST AL,0x20 JZ 0x0017beb6 MOV RDI,qword ptr [R15 + 0x270] MOV RSI,qword ptr [R15 + 0x40] MOV EDX,0x1 CALL 0x00129480 MOV EAX,dword ptr [RBX + 0x1c8] LAB_0017beb6: AND EAX,0xffffffb7 MOV dword ptr [RBX + 0x1c8],EAX MOV word ptr [RBX + 0x33b],0x100 MOV dword ptr [RBX + 0x1d4],0x0 MOV RAX,-0x1 MOV qword ptr [RBX + 0x170],RAX MOV qword ptr [RBX + 0x198],RAX MOV EAX,dword ptr [RBX + 0x1d0] AND EAX,0x1 OR EAX,0x30 MOV dword ptr [RBX + 0x1d0],EAX MOV EAX,R14D ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int4 mi_reset(long *param_1) { long lVar1; int4 uVar2; uint uVar3; lVar1 = *param_1; if ((*(uint *)(param_1 + 0x39) & 0x12) == 0) { uVar2 = 0; } else { *(uint *)(param_1 + 0x39) = *(uint *)(param_1 + 0x39) & 0xffffffed; uVar2 = end_io_cache(param_1 + 0x44); } if (*(int *)(lVar1 + 0x188) != 0) { mi_alloc_rec_buff(param_1,0xffffffffffffffff,param_1 + 0x24); } uVar3 = *(uint *)(param_1 + 0x39); if ((uVar3 & 0x20) != 0) { madvise(*(void **)(lVar1 + 0x270),*(size_t *)(lVar1 + 0x40),1); uVar3 = *(uint *)(param_1 + 0x39); } *(uint *)(param_1 + 0x39) = uVar3 & 0xffffffb7; *(int2 *)((long)param_1 + 0x33b) = 0x100; *(int4 *)((long)param_1 + 0x1d4) = 0; param_1[0x2e] = -1; param_1[0x33] = -1; *(uint *)(param_1 + 0x3a) = *(uint *)(param_1 + 0x3a) & 1 | 0x30; return uVar2; }
51,486
tbb::detail::r1::governor::auto_terminate(void*)
aimrt_mujoco_sim/_deps/tbb-src/src/tbb/governor.cpp
void governor::auto_terminate(void* tls) { __TBB_ASSERT(get_thread_data_if_initialized() == nullptr || get_thread_data_if_initialized() == tls, nullptr); if (tls) { thread_data* td = static_cast<thread_data*>(tls); auto clear_tls = [td] { td->~thread_data(); cache_aligned_deallocate(td); clear_thread_data(); }; // Only external thread can be inside an arena during termination. if (td->my_arena_slot) { arena* a = td->my_arena; threading_control* thr_control = a->my_threading_control; // If the TLS slot is already cleared by OS or underlying concurrency // runtime, restore its value to properly clean up arena if (!is_thread_data_set(td)) { set_thread_data(*td); } a->my_observers.notify_exit_observers(td->my_last_observer, td->my_is_worker); td->leave_task_dispatcher(); td->my_arena_slot->release(); // Release an arena a->on_thread_leaving(arena::ref_external); thr_control->unregister_thread(*td); // The tls should be cleared before market::release because // market can destroy the tls key if we keep the last reference clear_tls(); // If there was an associated arena, it added a public market reference thr_control->unregister_public_reference(/* blocking terminate =*/ false); } else { clear_tls(); } } __TBB_ASSERT(get_thread_data_if_initialized() == nullptr, nullptr); }
O0
cpp
tbb::detail::r1::governor::auto_terminate(void*): subq $0x38, %rsp movq %fs:0x28, %rax movq %rax, 0x30(%rsp) movq %rdi, 0x20(%rsp) cmpq $0x0, 0x20(%rsp) je 0x39a1fa movq 0x20(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x18(%rsp), %rax cmpq $0x0, 0x30(%rax) je 0x39a1ee movq 0x18(%rsp), %rax movq 0x20(%rax), %rax movq %rax, 0x10(%rsp) movq 0x10(%rsp), %rax movq 0x118(%rax), %rax movq %rax, 0x8(%rsp) movq 0x18(%rsp), %rdi callq 0x39afd0 testb $0x1, %al jne 0x39a17e movq 0x18(%rsp), %rdi callq 0x38c1c0 movq 0x10(%rsp), %rdi addq $0xf0, %rdi movq 0x18(%rsp), %rsi addq $0x48, %rsi movq 0x18(%rsp), %rax movb 0x12(%rax), %al andb $0x1, %al movzbl %al, %edx callq 0x38c4e0 movq 0x18(%rsp), %rdi callq 0x38c540 movq 0x18(%rsp), %rax movq 0x30(%rax), %rdi callq 0x38c570 movq 0x10(%rsp), %rdi movl $0x1, %esi callq 0x3864a0 movq 0x8(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x372d60 leaq 0x28(%rsp), %rdi callq 0x39a5a0 xorl %edi, %edi callq 0x3728b0 jmp 0x39a1f8 leaq 0x28(%rsp), %rdi callq 0x39a5a0 jmp 0x39a1fa movq %fs:0x28, %rax movq 0x30(%rsp), %rcx cmpq %rcx, %rax jne 0x39a212 addq $0x38, %rsp retq callq 0x190f00 nopw (%rax,%rax)
_ZN3tbb6detail2r18governor14auto_terminateEPv: sub rsp, 38h mov rax, fs:28h mov [rsp+38h+var_8], rax mov [rsp+38h+var_18], rdi cmp [rsp+38h+var_18], 0 jz loc_39A1FA mov rax, [rsp+38h+var_18] mov [rsp+38h+var_20], rax mov rax, [rsp+38h+var_20] mov [rsp+38h+var_10], rax mov rax, [rsp+38h+var_20] cmp qword ptr [rax+30h], 0 jz loc_39A1EE mov rax, [rsp+38h+var_20] mov rax, [rax+20h] mov [rsp+38h+var_28], rax mov rax, [rsp+38h+var_28] mov rax, [rax+118h] mov [rsp+38h+var_30], rax mov rdi, [rsp+38h+var_20]; this call _ZN3tbb6detail2r18governor18is_thread_data_setEPNS1_11thread_dataE; tbb::detail::r1::governor::is_thread_data_set(tbb::detail::r1::thread_data *) test al, 1 jnz short loc_39A17E mov rdi, [rsp+38h+var_20]; this call _ZN3tbb6detail2r18governor15set_thread_dataERNS1_11thread_dataE; tbb::detail::r1::governor::set_thread_data(tbb::detail::r1::thread_data &) loc_39A17E: mov rdi, [rsp+38h+var_28] add rdi, 0F0h; this mov rsi, [rsp+38h+var_20] add rsi, 48h ; 'H'; tbb::detail::r1::observer_proxy ** mov rax, [rsp+38h+var_20] mov al, [rax+12h] and al, 1 movzx edx, al; bool call _ZN3tbb6detail2r113observer_list21notify_exit_observersERPNS1_14observer_proxyEb; tbb::detail::r1::observer_list::notify_exit_observers(tbb::detail::r1::observer_proxy *&,bool) mov rdi, [rsp+38h+var_20]; this call _ZN3tbb6detail2r111thread_data21leave_task_dispatcherEv; tbb::detail::r1::thread_data::leave_task_dispatcher(void) mov rax, [rsp+38h+var_20] mov rdi, [rax+30h]; this call _ZN3tbb6detail2r110arena_slot7releaseEv; tbb::detail::r1::arena_slot::release(void) mov rdi, [rsp+38h+var_28]; this mov esi, 1; unsigned int call _ZN3tbb6detail2r15arena17on_thread_leavingEj; tbb::detail::r1::arena::on_thread_leaving(uint) mov rdi, [rsp+38h+var_30]; this mov rsi, [rsp+38h+var_20]; bool call _ZN3tbb6detail2r117threading_control17unregister_threadERNS1_11thread_dataE; tbb::detail::r1::threading_control::unregister_thread(tbb::detail::r1::thread_data &) lea rdi, [rsp+38h+var_10] call _ZZN3tbb6detail2r18governor14auto_terminateEPvENK3$_0clEv; tbb::detail::r1::governor::auto_terminate(void *)::$_0::operator()(void) xor edi, edi; this call _ZN3tbb6detail2r117threading_control27unregister_public_referenceEb; tbb::detail::r1::threading_control::unregister_public_reference(bool) jmp short loc_39A1F8 loc_39A1EE: lea rdi, [rsp+38h+var_10] call _ZZN3tbb6detail2r18governor14auto_terminateEPvENK3$_0clEv; tbb::detail::r1::governor::auto_terminate(void *)::$_0::operator()(void) loc_39A1F8: jmp short $+2 loc_39A1FA: mov rax, fs:28h mov rcx, [rsp+38h+var_8] cmp rax, rcx jnz short loc_39A212 add rsp, 38h retn loc_39A212: call ___stack_chk_fail
unsigned long long tbb::detail::r1::governor::auto_terminate( tbb::detail::r1::governor *this, tbb::detail::r1::thread_data *a2) { tbb::detail::r1::threading_control *v3; // [rsp+8h] [rbp-30h] tbb::detail::r1::arena *v4; // [rsp+10h] [rbp-28h] _QWORD v5[2]; // [rsp+28h] [rbp-10h] BYREF v5[1] = __readfsqword(0x28u); if ( this ) { v5[0] = this; if ( *((_QWORD *)this + 6) ) { v4 = (tbb::detail::r1::arena *)*((_QWORD *)this + 4); v3 = (tbb::detail::r1::threading_control *)*((_QWORD *)v4 + 35); if ( (tbb::detail::r1::governor::is_thread_data_set(this, a2) & 1) == 0 ) tbb::detail::r1::governor::set_thread_data(this, a2); tbb::detail::r1::observer_list::notify_exit_observers( (tbb::detail::r1::arena *)((char *)v4 + 240), (tbb::detail::r1::observer_proxy **)this + 9, *((_BYTE *)this + 18) & 1); tbb::detail::r1::thread_data::leave_task_dispatcher((tbb::detail::r1::task_dispatcher **)this); tbb::detail::r1::arena_slot::release(*((tbb::detail::r1::arena_slot **)this + 6)); tbb::detail::r1::arena::on_thread_leaving(v4, 1); tbb::detail::r1::threading_control::unregister_thread(v3, this); tbb::detail::r1::governor::auto_terminate(void *)::$_0::operator()(v5, this); tbb::detail::r1::threading_control::unregister_public_reference(0LL); } else { tbb::detail::r1::governor::auto_terminate(void *)::$_0::operator()(v5, a2); } } return __readfsqword(0x28u); }
~_Hashtable_ebo_helper: PUSH RAX MOV qword ptr [RSP],RDI MOV RDI,qword ptr [RSP] CALL 0x00291a30 POP RAX RET
/* std::__detail::_Hashtable_ebo_helper<0, std::allocator<std::__detail::_Hash_node<std::pair<std::basic_string_view<char, std::char_traits<char> > const, std::vector<std::basic_string_view<char, std::char_traits<char> >, std::allocator<std::basic_string_view<char, std::char_traits<char> > > > >, true> >, true>::~_Hashtable_ebo_helper() */ _Hashtable_ebo_helper<0,std::allocator<std::__detail::_Hash_node<std::pair<std::basic_string_view<char,std::char_traits<char>>const,std::vector<std::basic_string_view<char,std::char_traits<char>>,std::allocator<std::basic_string_view<char,std::char_traits<char>>>>>,true>>,true> * __thiscall std::__detail:: _Hashtable_ebo_helper<0,std::allocator<std::__detail::_Hash_node<std::pair<std::basic_string_view<char,std::char_traits<char>>const,std::vector<std::basic_string_view<char,std::char_traits<char>>,std::allocator<std::basic_string_view<char,std::char_traits<char>>>>>,true>>,true> ::~_Hashtable_ebo_helper (_Hashtable_ebo_helper<0,std::allocator<std::__detail::_Hash_node<std::pair<std::basic_string_view<char,std::char_traits<char>>const,std::vector<std::basic_string_view<char,std::char_traits<char>>,std::allocator<std::basic_string_view<char,std::char_traits<char>>>>>,true>>,true> *this) { allocator<std::__detail::_Hash_node<std::pair<std::basic_string_view<char,std::char_traits<char>>const,std::vector<std::basic_string_view<char,std::char_traits<char>>,std::allocator<std::basic_string_view<char,std::char_traits<char>>>>>,true>> ::~allocator((allocator<std::__detail::_Hash_node<std::pair<std::basic_string_view<char,std::char_traits<char>>const,std::vector<std::basic_string_view<char,std::char_traits<char>>,std::allocator<std::basic_string_view<char,std::char_traits<char>>>>>,true>> *)this); return this; }
51,487
evmone::EOF1Header::data_size_position() const
corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/eof.cpp
size_t EOF1Header::data_size_position() const noexcept { const auto num_code_sections = code_sizes.size(); const auto num_container_sections = container_sizes.size(); return std::size(EOF_MAGIC) + 1 + // magic + version 3 + // type section kind + size 3 + CODE_SECTION_SIZE_SIZE * num_code_sections + // code sections kind + count + sizes // container sections kind + count + sizes (num_container_sections != 0 ? 3 + CONTAINER_SECTION_SIZE_SIZE * num_container_sections : 0) + 1; // data section kind }
O0
cpp
evmone::EOF1Header::data_size_position() const: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x28(%rbp) addq $0x10, %rdi callq 0x3ce60 movq -0x28(%rbp), %rdi movq %rax, -0x10(%rbp) addq $0x48, %rdi callq 0x6f7f0 movq %rax, -0x18(%rbp) leaq 0xb6057(%rip), %rdi # 0x126a60 callq 0x78160 addq $0x1, %rax addq $0x3, %rax addq $0x3, %rax movq -0x10(%rbp), %rcx shlq %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) cmpq $0x0, -0x18(%rbp) je 0x70a41 movq -0x18(%rbp), %rax shlq $0x2, %rax addq $0x3, %rax movq %rax, -0x30(%rbp) jmp 0x70a49 xorl %eax, %eax movq %rax, -0x30(%rbp) jmp 0x70a49 movq -0x20(%rbp), %rax movq -0x30(%rbp), %rcx addq %rcx, %rax addq $0x1, %rax addq $0x30, %rsp popq %rbp retq nop
_ZNK6evmone10EOF1Header18data_size_positionEv: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] mov [rbp+var_28], rdi add rdi, 10h call _ZNKSt6vectorItSaItEE4sizeEv; std::vector<ushort>::size(void) mov rdi, [rbp+var_28] mov [rbp+var_10], rax add rdi, 48h ; 'H' call _ZNKSt6vectorIjSaIjEE4sizeEv; std::vector<uint>::size(void) mov [rbp+var_18], rax lea rdi, _ZN6evmoneL9EOF_MAGICE; evmone::EOF_MAGIC call _ZSt4sizeISt17basic_string_viewIhN4evmc11byte_traitsIhEEEEDTcldtfp_4sizeEERKT_ add rax, 1 add rax, 3 add rax, 3 mov rcx, [rbp+var_10] shl rcx, 1 add rax, rcx mov [rbp+var_20], rax cmp [rbp+var_18], 0 jz short loc_70A41 mov rax, [rbp+var_18] shl rax, 2 add rax, 3 mov [rbp+var_30], rax jmp short loc_70A49 loc_70A41: xor eax, eax mov [rbp+var_30], rax jmp short $+2 loc_70A49: mov rax, [rbp+var_20] mov rcx, [rbp+var_30] add rax, rcx add rax, 1 add rsp, 30h pop rbp retn
long long evmone::EOF1Header::data_size_position(evmone::EOF1Header *this) { long long v2; // [rsp+0h] [rbp-30h] long long v3; // [rsp+10h] [rbp-20h] long long v4; // [rsp+18h] [rbp-18h] long long v5; // [rsp+20h] [rbp-10h] v5 = std::vector<unsigned short>::size((_QWORD *)this + 2); v4 = std::vector<unsigned int>::size((_QWORD *)this + 9); v3 = 2 * v5 + std::size<std::basic_string_view<unsigned char,evmc::byte_traits<unsigned char>>>(&evmone::EOF_MAGIC) + 7; if ( v4 ) v2 = 4 * v4 + 3; else v2 = 0LL; return v2 + v3 + 1; }
data_size_position: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x28],RDI ADD RDI,0x10 CALL 0x0013ce60 MOV RDI,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x10],RAX ADD RDI,0x48 CALL 0x0016f7f0 MOV qword ptr [RBP + -0x18],RAX LEA RDI,[0x226a60] CALL 0x00178160 ADD RAX,0x1 ADD RAX,0x3 ADD RAX,0x3 MOV RCX,qword ptr [RBP + -0x10] SHL RCX,0x1 ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX CMP qword ptr [RBP + -0x18],0x0 JZ 0x00170a41 MOV RAX,qword ptr [RBP + -0x18] SHL RAX,0x2 ADD RAX,0x3 MOV qword ptr [RBP + -0x30],RAX JMP 0x00170a49 LAB_00170a41: XOR EAX,EAX MOV qword ptr [RBP + -0x30],RAX JMP 0x00170a49 LAB_00170a49: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x30] ADD RAX,RCX ADD RAX,0x1 ADD RSP,0x30 POP RBP RET
/* evmone::EOF1Header::data_size_position() const */ long __thiscall evmone::EOF1Header::data_size_position(EOF1Header *this) { long lVar1; long lVar2; long lVar3; long local_38; lVar1 = std::vector<unsigned_short,std::allocator<unsigned_short>>::size ((vector<unsigned_short,std::allocator<unsigned_short>> *)(this + 0x10)); lVar2 = std::vector<unsigned_int,std::allocator<unsigned_int>>::size ((vector<unsigned_int,std::allocator<unsigned_int>> *)(this + 0x48)); lVar3 = std::size<std::basic_string_view<unsigned_char,evmc::byte_traits<unsigned_char>>> ((basic_string_view *)&EOF_MAGIC); if (lVar2 == 0) { local_38 = 0; } else { local_38 = lVar2 * 4 + 3; } return lVar3 + lVar1 * 2 + local_38 + 8; }
51,488
nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_float(double)
llama.cpp/common/json.hpp
void dump_float(number_float_t x) { // NaN / inf if (!std::isfinite(x)) { o->write_characters("null", 4); return; } // If number_float_t is an IEEE-754 single or double precision number, // use the Grisu2 algorithm to produce short numbers which are // guaranteed to round-trip, using strtof and strtod, resp. // // NB: The test below works if <long double> == <double>. static constexpr bool is_ieee_single_or_double = (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 24 && std::numeric_limits<number_float_t>::max_exponent == 128) || (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 53 && std::numeric_limits<number_float_t>::max_exponent == 1024); dump_float(x, std::integral_constant<bool, is_ieee_single_or_double>()); }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<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>>::dump_float(double): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq %xmm0, %rax btrq $0x3f, %rax movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000 cmpq %rcx, %rax jl 0x7da09 movq (%rbx), %rdi movq (%rdi), %rax movq 0x8(%rax), %rax leaq 0xa2dad(%rip), %rsi # 0x1207a8 movl $0x4, %edx addq $0x8, %rsp popq %rbx popq %r14 jmpq *%rax leaq 0x10(%rbx), %r14 leaq 0x50(%rbx), %rsi movq %r14, %rdi callq 0x7de25 movq (%rbx), %rdi subq %r14, %rax movq (%rdi), %rcx movq 0x8(%rcx), %rcx movq %r14, %rsi movq %rax, %rdx addq $0x8, %rsp popq %rbx popq %r14 jmpq *%rcx nop
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10dump_floatEd: push r14 push rbx push rax mov rbx, rdi movq rax, xmm0 btr rax, 3Fh ; '?' mov rcx, 7FF0000000000000h cmp rax, rcx jl short loc_7DA09 mov rdi, [rbx] mov rax, [rdi] mov rax, [rax+8] lea rsi, aOnNull_0+5; "null" mov edx, 4 add rsp, 8 pop rbx pop r14 jmp rax loc_7DA09: lea r14, [rbx+10h] lea rsi, [rbx+50h] mov rdi, r14; this call _ZN8nlohmann16json_abi_v3_11_36detail8to_charsIdEEPcS3_PKcT_; nlohmann::json_abi_v3_11_3::detail::to_chars<double>(char *,char const*,double) mov rdi, [rbx] sub rax, r14 mov rcx, [rdi] mov rcx, [rcx+8] mov rsi, r14 mov rdx, rax add rsp, 8 pop rbx pop r14 jmp rcx
long long nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::dump_float( _QWORD *a1, double a2) { long long v3; // rax if ( (*(_QWORD *)&a2 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL ) return (*(long long ( **)(_QWORD, char *, long long))(*(_QWORD *)*a1 + 8LL))(*a1, "null", 4LL); v3 = nlohmann::json_abi_v3_11_3::detail::to_chars<double>((nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)(a1 + 2)); return (*(long long ( **)(_QWORD, _QWORD *, long long))(*(_QWORD *)*a1 + 8LL))( *a1, a1 + 2, v3 - (_QWORD)(a1 + 2)); }
dump_float: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOVQ RAX,XMM0 BTR RAX,0x3f MOV RCX,0x7ff0000000000000 CMP RAX,RCX JL 0x0017da09 MOV RDI,qword ptr [RBX] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x8] LEA RSI,[0x2207a8] MOV EDX,0x4 ADD RSP,0x8 POP RBX POP R14 JMP RAX LAB_0017da09: LEA R14,[RBX + 0x10] LEA RSI,[RBX + 0x50] MOV RDI,R14 CALL 0x0017de25 MOV RDI,qword ptr [RBX] SUB RAX,R14 MOV RCX,qword ptr [RDI] MOV RCX,qword ptr [RCX + 0x8] MOV RSI,R14 MOV RDX,RAX ADD RSP,0x8 POP RBX POP R14 JMP RCX
/* nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::dump_float(double) */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::dump_float(serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,double param_1) { serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *psVar1; code *UNRECOVERED_JUMPTABLE; char *pcVar2; if (0x7fefffffffffffff < (ulong)ABS(param_1)) { /* WARNING: Could not recover jumptable at 0x0017da07. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(**(long **)this + 8))(*(long **)this,"null",4); return; } psVar1 = this + 0x10; pcVar2 = to_chars<double>((char *)psVar1,(char *)(this + 0x50),param_1); UNRECOVERED_JUMPTABLE = *(code **)(**(long **)this + 8); /* WARNING: Could not recover jumptable at 0x0017da33. Too many branches */ /* WARNING: Treating indirect jump as call */ (*UNRECOVERED_JUMPTABLE)(*(long **)this,psVar1,(long)pcVar2 - (long)psVar1,UNRECOVERED_JUMPTABLE); return; }
51,489
ma_freeze_size
eloqsql/libmariadb/libmariadb/ma_array.c
void ma_freeze_size(DYNAMIC_ARRAY *array) { uint elements=max(array->elements,1); if (array->buffer && array->max_element != elements) { array->buffer=(char*) realloc(array->buffer, elements*array->size_of_element); array->max_element=elements; } }
O0
c
ma_freeze_size: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpl $0x1, 0x8(%rax) jbe 0x45212 movq -0x8(%rbp), %rax movl 0x8(%rax), %eax movl %eax, -0x10(%rbp) jmp 0x4521c movl $0x1, %eax movl %eax, -0x10(%rbp) jmp 0x4521c movl -0x10(%rbp), %eax movl %eax, -0xc(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, (%rax) je 0x45267 movq -0x8(%rbp), %rax movl 0xc(%rax), %eax cmpl -0xc(%rbp), %eax je 0x45267 movq -0x8(%rbp), %rax movq (%rax), %rdi movl -0xc(%rbp), %eax movq -0x8(%rbp), %rcx imull 0x14(%rcx), %eax movl %eax, %eax movl %eax, %esi callq 0x13700 movq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, (%rax) movl -0xc(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0xc(%rax) addq $0x10, %rsp popq %rbp retq nopl (%rax)
ma_freeze_size: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp dword ptr [rax+8], 1 jbe short loc_45212 mov rax, [rbp+var_8] mov eax, [rax+8] mov [rbp+var_10], eax jmp short loc_4521C loc_45212: mov eax, 1 mov [rbp+var_10], eax jmp short $+2 loc_4521C: mov eax, [rbp+var_10] mov [rbp+var_C], eax mov rax, [rbp+var_8] cmp qword ptr [rax], 0 jz short loc_45267 mov rax, [rbp+var_8] mov eax, [rax+0Ch] cmp eax, [rbp+var_C] jz short loc_45267 mov rax, [rbp+var_8] mov rdi, [rax] mov eax, [rbp+var_C] mov rcx, [rbp+var_8] imul eax, [rcx+14h] mov eax, eax mov esi, eax call _realloc mov rcx, rax mov rax, [rbp+var_8] mov [rax], rcx mov ecx, [rbp+var_C] mov rax, [rbp+var_8] mov [rax+0Ch], ecx loc_45267: add rsp, 10h pop rbp retn
long long ma_freeze_size(long long a1) { long long result; // rax int v2; // [rsp+0h] [rbp-10h] if ( *(_DWORD *)(a1 + 8) <= 1u ) v2 = 1; else v2 = *(_DWORD *)(a1 + 8); result = a1; if ( *(_QWORD *)a1 ) { result = *(unsigned int *)(a1 + 12); if ( (_DWORD)result != v2 ) { *(_QWORD *)a1 = realloc(*(_QWORD *)a1, (unsigned int)(*(_DWORD *)(a1 + 20) * v2)); result = a1; *(_DWORD *)(a1 + 12) = v2; } } return result; }
ma_freeze_size: 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],0x1 JBE 0x00145212 MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x10],EAX JMP 0x0014521c LAB_00145212: MOV EAX,0x1 MOV dword ptr [RBP + -0x10],EAX JMP 0x0014521c LAB_0014521c: MOV EAX,dword ptr [RBP + -0x10] MOV dword ptr [RBP + -0xc],EAX MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX],0x0 JZ 0x00145267 MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0xc] CMP EAX,dword ptr [RBP + -0xc] JZ 0x00145267 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX] MOV EAX,dword ptr [RBP + -0xc] MOV RCX,qword ptr [RBP + -0x8] IMUL EAX,dword ptr [RCX + 0x14] MOV EAX,EAX MOV ESI,EAX CALL 0x00113700 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],RCX MOV ECX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0xc],ECX LAB_00145267: ADD RSP,0x10 POP RBP RET
void ma_freeze_size(long *param_1) { void *pvVar1; int local_18; if (*(uint *)(param_1 + 1) < 2) { local_18 = 1; } else { local_18 = (int)param_1[1]; } if ((*param_1 != 0) && (*(int *)((long)param_1 + 0xc) != local_18)) { pvVar1 = realloc((void *)*param_1,(ulong)(uint)(local_18 * *(int *)((long)param_1 + 0x14))); *param_1 = (long)pvVar1; *(int *)((long)param_1 + 0xc) = local_18; } return; }
51,490
testing::TestSuite::Run()
seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest.cc
void TestSuite::Run() { if (!should_run_) return; internal::UnitTestImpl* const impl = internal::GetUnitTestImpl(); impl->set_current_test_suite(this); TestEventListener* repeater = UnitTest::GetInstance()->listeners().repeater(); // Call both legacy and the new API repeater->OnTestSuiteStart(*this); // Legacy API is deprecated but still available #ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ repeater->OnTestCaseStart(*this); #endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ impl->os_stack_trace_getter()->UponLeavingGTest(); internal::HandleExceptionsInMethodIfSupported( this, &TestSuite::RunSetUpTestSuite, "SetUpTestSuite()"); const bool skip_all = ad_hoc_test_result().Failed(); start_timestamp_ = internal::GetTimeInMillis(); internal::Timer timer; for (int i = 0; i < total_test_count(); i++) { if (skip_all) { GetMutableTestInfo(i)->Skip(); } else { GetMutableTestInfo(i)->Run(); } if (GTEST_FLAG_GET(fail_fast) && GetMutableTestInfo(i)->result()->Failed()) { for (int j = i + 1; j < total_test_count(); j++) { GetMutableTestInfo(j)->Skip(); } break; } } elapsed_time_ = timer.Elapsed(); impl->os_stack_trace_getter()->UponLeavingGTest(); internal::HandleExceptionsInMethodIfSupported( this, &TestSuite::RunTearDownTestSuite, "TearDownTestSuite()"); // Call both legacy and the new API repeater->OnTestSuiteEnd(*this); // Legacy API is deprecated but still available #ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ repeater->OnTestCaseEnd(*this); #endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ impl->set_current_test_suite(nullptr); }
O1
cpp
testing::TestSuite::Run(): cmpb $0x1, 0x70(%rdi) jne 0x25cf0 pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx callq 0x1d29e movq 0x4138505(%rip), %r15 # 0x415df60 movq %rbx, 0x168(%r15) callq 0x1d29e movq 0x41384f2(%rip), %rax # 0x415df60 movq 0x1f8(%rax), %r14 movq (%r14), %rax movq %r14, %rdi movq %rbx, %rsi callq *0x30(%rax) movq (%r14), %rax movq %r14, %rdi movq %rbx, %rsi callq *0x38(%rax) cmpq $0x0, 0x210(%r15) jne 0x25ab2 movl $0x8, %edi callq 0x9490 leaq 0x33668(%rip), %rcx # 0x59110 movq %rcx, (%rax) movq %rax, 0x210(%r15) movq %r15, 0x10(%rsp) movq 0x210(%r15), %rdi movq (%rdi), %rax callq *0x18(%rax) leaq 0x11fbd(%rip), %rsi # 0x37a88 leaq 0x1d917(%rip), %rcx # 0x433e9 movq %rbx, %rdi xorl %edx, %edx callq 0x37903 leaq 0x88(%rbx), %rdi callq 0x241b8 movl %eax, %ebp callq 0x9090 movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB imulq %rcx movq %rdx, %rax shrq $0x3f, %rax sarq $0x12, %rdx addq %rax, %rdx movq %rdx, 0x78(%rbx) callq 0x9740 movq %rax, 0x8(%rsp) movq 0x30(%rbx), %rax movq 0x38(%rbx), %rcx subq %rax, %rcx shrq $0x3, %rcx testl %ecx, %ecx jle 0x25c44 movl $0x1, %r13d movl $0x90, %r15d leaq -0x1(%r13), %r12 testb %bpl, %bpl je 0x25b72 movq 0x48(%rbx), %rcx movq 0x50(%rbx), %rdx subq %rcx, %rdx shrq $0x2, %rdx movslq %edx, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF cmpq %rsi, %r12 jge 0x25b65 movl -0x4(%rcx,%r13,4), %edx movl %edx, %ecx movq (%rax,%rcx,8), %rdi callq 0x25630 jmp 0x25b9e movq 0x48(%rbx), %rcx movq 0x50(%rbx), %rdx subq %rcx, %rdx shrq $0x2, %rdx movslq %edx, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF cmpq %rsi, %r12 jge 0x25b93 movl -0x4(%rcx,%r13,4), %edx movl %edx, %ecx movq (%rax,%rcx,8), %rdi callq 0x2547a cmpb $0x1, 0x413828d(%rip) # 0x415de32 jne 0x25bde movq 0x48(%rbx), %rax movq 0x50(%rbx), %rcx subq %rax, %rcx shrq $0x2, %rcx movslq %ecx, %rdx movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpq %rdx, %r12 jge 0x25bc8 movl -0x4(%rax,%r13,4), %ecx movl %ecx, %eax movq 0x30(%rbx), %rcx movq (%rcx,%rax,8), %rdi addq %r15, %rdi callq 0x241b8 testb %al, %al jne 0x25c30 movq 0x30(%rbx), %rax movq 0x38(%rbx), %rcx subq %rax, %rcx shrq $0x3, %rcx movslq %ecx, %rcx leaq 0x1(%r13), %rdx cmpq %rcx, %r13 movq %rdx, %r13 jl 0x25b3b jmp 0x25c44 movq 0x48(%rbx), %rcx movq 0x50(%rbx), %rdx subq %rcx, %rdx shrq $0x2, %rdx movslq %edx, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF cmpq %rsi, %r13 jge 0x25c22 movl (%rcx,%r13,4), %edx movl %edx, %ecx movq (%rax,%rcx,8), %rdi callq 0x25630 incq %r13 movq 0x30(%rbx), %rax movq 0x38(%rbx), %rcx subq %rax, %rcx shrq $0x3, %rcx cmpl %ecx, %r13d jl 0x25c02 callq 0x9740 subq 0x8(%rsp), %rax movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB imulq %rcx movq %rdx, %rax shrq $0x3f, %rax sarq $0x12, %rdx addq %rax, %rdx movq %rdx, 0x80(%rbx) movq 0x10(%rsp), %r15 cmpq $0x0, 0x210(%r15) jne 0x25c9a movl $0x8, %edi callq 0x9490 leaq 0x33480(%rip), %rcx # 0x59110 movq %rcx, (%rax) movq %rax, 0x210(%r15) movq 0x210(%r15), %rdi movq (%rdi), %rax callq *0x18(%rax) leaq 0x11de6(%rip), %rsi # 0x37a94 leaq 0x1d745(%rip), %rcx # 0x433fa movq %rbx, %rdi xorl %edx, %edx callq 0x37903 movq (%r14), %rax movq %r14, %rdi movq %rbx, %rsi callq *0x60(%rax) movq (%r14), %rax movq %r14, %rdi movq %rbx, %rsi callq *0x68(%rax) movq $0x0, 0x168(%r15) addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN7testing9TestSuite3RunEv: cmp byte ptr [rdi+70h], 1 jnz locret_25CF0 push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdi call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void) mov r15, cs:qword_415DF60 mov [r15+168h], rbx call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void) mov rax, cs:qword_415DF60 mov r14, [rax+1F8h] mov rax, [r14] mov rdi, r14 mov rsi, rbx call qword ptr [rax+30h] mov rax, [r14] mov rdi, r14 mov rsi, rbx call qword ptr [rax+38h] cmp qword ptr [r15+210h], 0 jnz short loc_25AB2 mov edi, 8; unsigned __int64 call __Znwm; operator new(ulong) lea rcx, off_59110 mov [rax], rcx mov [r15+210h], rax loc_25AB2: mov [rsp+48h+var_38], r15 mov rdi, [r15+210h] mov rax, [rdi] call qword ptr [rax+18h] lea rsi, _ZN7testing9TestSuite17RunSetUpTestSuiteEv; testing::TestSuite::RunSetUpTestSuite(void) lea rcx, aSetuptestsuite; "SetUpTestSuite()" mov rdi, rbx xor edx, edx call _ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS_9TestSuiteEvEET0_PT_MS4_FS3_vEPKc; testing::internal::HandleExceptionsInMethodIfSupported<testing::TestSuite,void>(testing::TestSuite *,void (testing::TestSuite::*)(void),char const*) lea rdi, [rbx+88h]; this call _ZNK7testing10TestResult6FailedEv; testing::TestResult::Failed(void) mov ebp, eax call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void) mov rcx, 431BDE82D7B634DBh imul rcx mov rax, rdx shr rax, 3Fh sar rdx, 12h add rdx, rax mov [rbx+78h], rdx call __ZNSt6chrono3_V212steady_clock3nowEv; std::chrono::_V2::steady_clock::now(void) mov [rsp+48h+var_40], rax mov rax, [rbx+30h] mov rcx, [rbx+38h] sub rcx, rax shr rcx, 3 test ecx, ecx jle loc_25C44 mov r13d, 1 mov r15d, 90h loc_25B3B: lea r12, [r13-1] test bpl, bpl jz short loc_25B72 mov rcx, [rbx+48h] mov rdx, [rbx+50h] sub rdx, rcx shr rdx, 2 movsxd rsi, edx mov edx, 0FFFFFFFFh cmp r12, rsi jge short loc_25B65 mov edx, [rcx+r13*4-4] loc_25B65: mov ecx, edx mov rdi, [rax+rcx*8]; this call _ZN7testing8TestInfo4SkipEv; testing::TestInfo::Skip(void) jmp short loc_25B9E loc_25B72: mov rcx, [rbx+48h] mov rdx, [rbx+50h] sub rdx, rcx shr rdx, 2 movsxd rsi, edx mov edx, 0FFFFFFFFh cmp r12, rsi jge short loc_25B93 mov edx, [rcx+r13*4-4] loc_25B93: mov ecx, edx mov rdi, [rax+rcx*8]; this call _ZN7testing8TestInfo3RunEv; testing::TestInfo::Run(void) loc_25B9E: cmp cs:_ZN7testing21FLAGS_gtest_fail_fastE, 1; testing::FLAGS_gtest_fail_fast jnz short loc_25BDE mov rax, [rbx+48h] mov rcx, [rbx+50h] sub rcx, rax shr rcx, 2 movsxd rdx, ecx mov ecx, 0FFFFFFFFh cmp r12, rdx jge short loc_25BC8 mov ecx, [rax+r13*4-4] loc_25BC8: mov eax, ecx mov rcx, [rbx+30h] mov rdi, [rcx+rax*8] add rdi, r15; this call _ZNK7testing10TestResult6FailedEv; testing::TestResult::Failed(void) test al, al jnz short loc_25C30 loc_25BDE: mov rax, [rbx+30h] mov rcx, [rbx+38h] sub rcx, rax shr rcx, 3 movsxd rcx, ecx lea rdx, [r13+1] cmp r13, rcx mov r13, rdx jl loc_25B3B jmp short loc_25C44 loc_25C02: mov rcx, [rbx+48h] mov rdx, [rbx+50h] sub rdx, rcx shr rdx, 2 movsxd rsi, edx mov edx, 0FFFFFFFFh cmp r13, rsi jge short loc_25C22 mov edx, [rcx+r13*4] loc_25C22: mov ecx, edx mov rdi, [rax+rcx*8]; this call _ZN7testing8TestInfo4SkipEv; testing::TestInfo::Skip(void) inc r13 loc_25C30: mov rax, [rbx+30h] mov rcx, [rbx+38h] sub rcx, rax shr rcx, 3 cmp r13d, ecx jl short loc_25C02 loc_25C44: call __ZNSt6chrono3_V212steady_clock3nowEv; std::chrono::_V2::steady_clock::now(void) sub rax, [rsp+48h+var_40] mov rcx, 431BDE82D7B634DBh imul rcx mov rax, rdx shr rax, 3Fh sar rdx, 12h add rdx, rax mov [rbx+80h], rdx mov r15, [rsp+48h+var_38] cmp qword ptr [r15+210h], 0 jnz short loc_25C9A mov edi, 8; unsigned __int64 call __Znwm; operator new(ulong) lea rcx, off_59110 mov [rax], rcx mov [r15+210h], rax loc_25C9A: mov rdi, [r15+210h] mov rax, [rdi] call qword ptr [rax+18h] lea rsi, _ZN7testing9TestSuite20RunTearDownTestSuiteEv; testing::TestSuite::RunTearDownTestSuite(void) lea rcx, aTeardowntestsu; "TearDownTestSuite()" mov rdi, rbx xor edx, edx call _ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS_9TestSuiteEvEET0_PT_MS4_FS3_vEPKc; testing::internal::HandleExceptionsInMethodIfSupported<testing::TestSuite,void>(testing::TestSuite *,void (testing::TestSuite::*)(void),char const*) mov rax, [r14] mov rdi, r14 mov rsi, rbx call qword ptr [rax+60h] mov rax, [r14] mov rdi, r14 mov rsi, rbx call qword ptr [rax+68h] mov qword ptr [r15+168h], 0 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp locret_25CF0: retn
void testing::TestSuite::Run(testing::TestSuite *this) { testing::internal::UnitTestImpl *v2; // r15 long long v3; // r14 _QWORD *v4; // rax testing::TestInfo *v5; // rdi char v6; // bp long long v7; // rax long long v8; // r13 long long v9; // r12 long long v10; // rcx unsigned int v11; // edx long long v12; // rcx unsigned int v13; // edx long long v14; // rax unsigned int v15; // ecx long long v17; // rcx unsigned int v18; // edx long long v19; // rax _QWORD *v20; // rax long long v21; // [rsp+0h] [rbp-40h] if ( *((_BYTE *)this + 112) == 1 ) { testing::UnitTest::GetInstance(this); v2 = qword_415DF60; *((_QWORD *)qword_415DF60 + 45) = this; testing::UnitTest::GetInstance(this); v3 = *((_QWORD *)qword_415DF60 + 63); (*(void ( **)(long long, testing::TestSuite *))(*(_QWORD *)v3 + 48LL))(v3, this); (*(void ( **)(long long, testing::TestSuite *))(*(_QWORD *)v3 + 56LL))(v3, this); if ( !*((_QWORD *)v2 + 66) ) { v4 = (_QWORD *)operator new(8uLL); *v4 = off_59110; *((_QWORD *)v2 + 66) = v4; } (*(void ( **)(_QWORD))(**((_QWORD **)v2 + 66) + 24LL))(*((_QWORD *)v2 + 66)); testing::internal::HandleExceptionsInMethodIfSupported<testing::TestSuite,void>( this, testing::TestSuite::RunSetUpTestSuite, 0LL, "SetUpTestSuite()"); v5 = (testing::TestSuite *)((char *)this + 136); v6 = testing::TestResult::Failed((testing::TestSuite *)((char *)this + 136)); *((_QWORD *)this + 15) = std::chrono::_V2::system_clock::now((testing::TestSuite *)((char *)this + 136)) / 1000000LL; v21 = std::chrono::_V2::steady_clock::now((testing::TestSuite *)((char *)this + 136)); v7 = *((_QWORD *)this + 6); if ( (int)((unsigned long long)(*((_QWORD *)this + 7) - v7) >> 3) > 0 ) { v8 = 1LL; while ( 1 ) { v9 = v8 - 1; if ( v6 ) { v10 = *((_QWORD *)this + 9); v11 = -1; if ( v9 < (int)((unsigned long long)(*((_QWORD *)this + 10) - v10) >> 2) ) v11 = *(_DWORD *)(v10 + 4 * v8 - 4); v5 = *(testing::TestInfo **)(v7 + 8LL * v11); testing::TestInfo::Skip(v5); } else { v12 = *((_QWORD *)this + 9); v13 = -1; if ( v9 < (int)((unsigned long long)(*((_QWORD *)this + 10) - v12) >> 2) ) v13 = *(_DWORD *)(v12 + 4 * v8 - 4); v5 = *(testing::TestInfo **)(v7 + 8LL * v13); testing::TestInfo::Run(v5); } if ( testing::FLAGS_gtest_fail_fast == 1 ) { v14 = *((_QWORD *)this + 9); v15 = -1; if ( v9 < (int)((unsigned long long)(*((_QWORD *)this + 10) - v14) >> 2) ) v15 = *(_DWORD *)(v14 + 4 * v8 - 4); v5 = (testing::TestInfo *)(*(_QWORD *)(*((_QWORD *)this + 6) + 8LL * v15) + 144LL); if ( (unsigned __int8)testing::TestResult::Failed(v5) ) break; } v7 = *((_QWORD *)this + 6); if ( v8++ >= (int)((unsigned long long)(*((_QWORD *)this + 7) - v7) >> 3) ) goto LABEL_23; } while ( 1 ) { v19 = *((_QWORD *)this + 6); if ( (int)v8 >= (int)((unsigned long long)(*((_QWORD *)this + 7) - v19) >> 3) ) break; v17 = *((_QWORD *)this + 9); v18 = -1; if ( v8 < (int)((unsigned long long)(*((_QWORD *)this + 10) - v17) >> 2) ) v18 = *(_DWORD *)(v17 + 4 * v8); v5 = *(testing::TestInfo **)(v19 + 8LL * v18); testing::TestInfo::Skip(v5); ++v8; } } LABEL_23: *((_QWORD *)this + 16) = (std::chrono::_V2::steady_clock::now(v5) - v21) / 1000000; if ( !*((_QWORD *)v2 + 66) ) { v20 = (_QWORD *)operator new(8uLL); *v20 = off_59110; *((_QWORD *)v2 + 66) = v20; } (*(void ( **)(_QWORD))(**((_QWORD **)v2 + 66) + 24LL))(*((_QWORD *)v2 + 66)); testing::internal::HandleExceptionsInMethodIfSupported<testing::TestSuite,void>( this, testing::TestSuite::RunTearDownTestSuite, 0LL, "TearDownTestSuite()"); (*(void ( **)(long long, testing::TestSuite *))(*(_QWORD *)v3 + 96LL))(v3, this); (*(void ( **)(long long, testing::TestSuite *))(*(_QWORD *)v3 + 104LL))(v3, this); *((_QWORD *)v2 + 45) = 0LL; } }
Run: CMP byte ptr [RDI + 0x70],0x1 JNZ 0x00125cf0 PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDI CALL 0x0011d29e MOV R15,qword ptr [0x0425df60] MOV qword ptr [R15 + 0x168],RBX CALL 0x0011d29e MOV RAX,qword ptr [0x0425df60] MOV R14,qword ptr [RAX + 0x1f8] MOV RAX,qword ptr [R14] MOV RDI,R14 MOV RSI,RBX CALL qword ptr [RAX + 0x30] MOV RAX,qword ptr [R14] MOV RDI,R14 MOV RSI,RBX CALL qword ptr [RAX + 0x38] CMP qword ptr [R15 + 0x210],0x0 JNZ 0x00125ab2 MOV EDI,0x8 CALL 0x00109490 LEA RCX,[0x159110] MOV qword ptr [RAX],RCX MOV qword ptr [R15 + 0x210],RAX LAB_00125ab2: MOV qword ptr [RSP + 0x10],R15 MOV RDI,qword ptr [R15 + 0x210] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LEA RSI,[0x137a88] LEA RCX,[0x1433e9] MOV RDI,RBX XOR EDX,EDX CALL 0x00137903 LEA RDI,[RBX + 0x88] CALL 0x001241b8 MOV EBP,EAX CALL 0x00109090 MOV RCX,0x431bde82d7b634db IMUL RCX MOV RAX,RDX SHR RAX,0x3f SAR RDX,0x12 ADD RDX,RAX MOV qword ptr [RBX + 0x78],RDX CALL 0x00109740 MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RBX + 0x30] MOV RCX,qword ptr [RBX + 0x38] SUB RCX,RAX SHR RCX,0x3 TEST ECX,ECX JLE 0x00125c44 MOV R13D,0x1 MOV R15D,0x90 LAB_00125b3b: LEA R12,[R13 + -0x1] TEST BPL,BPL JZ 0x00125b72 MOV RCX,qword ptr [RBX + 0x48] MOV RDX,qword ptr [RBX + 0x50] SUB RDX,RCX SHR RDX,0x2 MOVSXD RSI,EDX MOV EDX,0xffffffff CMP R12,RSI JGE 0x00125b65 MOV EDX,dword ptr [RCX + R13*0x4 + -0x4] LAB_00125b65: MOV ECX,EDX MOV RDI,qword ptr [RAX + RCX*0x8] CALL 0x00125630 JMP 0x00125b9e LAB_00125b72: MOV RCX,qword ptr [RBX + 0x48] MOV RDX,qword ptr [RBX + 0x50] SUB RDX,RCX SHR RDX,0x2 MOVSXD RSI,EDX MOV EDX,0xffffffff CMP R12,RSI JGE 0x00125b93 MOV EDX,dword ptr [RCX + R13*0x4 + -0x4] LAB_00125b93: MOV ECX,EDX MOV RDI,qword ptr [RAX + RCX*0x8] CALL 0x0012547a LAB_00125b9e: CMP byte ptr [0x0425de32],0x1 JNZ 0x00125bde MOV RAX,qword ptr [RBX + 0x48] MOV RCX,qword ptr [RBX + 0x50] SUB RCX,RAX SHR RCX,0x2 MOVSXD RDX,ECX MOV ECX,0xffffffff CMP R12,RDX JGE 0x00125bc8 MOV ECX,dword ptr [RAX + R13*0x4 + -0x4] LAB_00125bc8: MOV EAX,ECX MOV RCX,qword ptr [RBX + 0x30] MOV RDI,qword ptr [RCX + RAX*0x8] ADD RDI,R15 CALL 0x001241b8 TEST AL,AL JNZ 0x00125c30 LAB_00125bde: MOV RAX,qword ptr [RBX + 0x30] MOV RCX,qword ptr [RBX + 0x38] SUB RCX,RAX SHR RCX,0x3 MOVSXD RCX,ECX LEA RDX,[R13 + 0x1] CMP R13,RCX MOV R13,RDX JL 0x00125b3b JMP 0x00125c44 LAB_00125c02: MOV RCX,qword ptr [RBX + 0x48] MOV RDX,qword ptr [RBX + 0x50] SUB RDX,RCX SHR RDX,0x2 MOVSXD RSI,EDX MOV EDX,0xffffffff CMP R13,RSI JGE 0x00125c22 MOV EDX,dword ptr [RCX + R13*0x4] LAB_00125c22: MOV ECX,EDX MOV RDI,qword ptr [RAX + RCX*0x8] CALL 0x00125630 INC R13 LAB_00125c30: MOV RAX,qword ptr [RBX + 0x30] MOV RCX,qword ptr [RBX + 0x38] SUB RCX,RAX SHR RCX,0x3 CMP R13D,ECX JL 0x00125c02 LAB_00125c44: CALL 0x00109740 SUB RAX,qword ptr [RSP + 0x8] MOV RCX,0x431bde82d7b634db IMUL RCX MOV RAX,RDX SHR RAX,0x3f SAR RDX,0x12 ADD RDX,RAX MOV qword ptr [RBX + 0x80],RDX MOV R15,qword ptr [RSP + 0x10] CMP qword ptr [R15 + 0x210],0x0 JNZ 0x00125c9a MOV EDI,0x8 CALL 0x00109490 LEA RCX,[0x159110] MOV qword ptr [RAX],RCX MOV qword ptr [R15 + 0x210],RAX LAB_00125c9a: MOV RDI,qword ptr [R15 + 0x210] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LEA RSI,[0x137a94] LEA RCX,[0x1433fa] MOV RDI,RBX XOR EDX,EDX CALL 0x00137903 MOV RAX,qword ptr [R14] MOV RDI,R14 MOV RSI,RBX CALL qword ptr [RAX + 0x60] MOV RAX,qword ptr [R14] MOV RDI,R14 MOV RSI,RBX CALL qword ptr [RAX + 0x68] MOV qword ptr [R15 + 0x168],0x0 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP LAB_00125cf0: RET
/* testing::TestSuite::Run() */ void __thiscall testing::TestSuite::Run(TestSuite *this) { long lVar1; long *plVar2; bool bVar3; int8 uVar4; char cVar5; char cVar6; int8 *puVar7; long lVar8; long lVar9; uint uVar10; long lVar11; if (this[0x70] != (TestSuite)0x1) { return; } UnitTest::GetInstance(); uVar4 = UnitTest::GetInstance()::instance._64_8_; *(TestSuite **)(UnitTest::GetInstance()::instance._64_8_ + 0x168) = this; UnitTest::GetInstance(); plVar2 = *(long **)(UnitTest::GetInstance()::instance._64_8_ + 0x1f8); (**(code **)(*plVar2 + 0x30))(plVar2,this); (**(code **)(*plVar2 + 0x38))(plVar2,this); if (*(long *)(uVar4 + 0x210) == 0) { puVar7 = (int8 *)operator_new(8); *puVar7 = &PTR__OsStackTraceGetterInterface_00159110; *(int8 **)(uVar4 + 0x210) = puVar7; } (**(code **)(**(long **)(uVar4 + 0x210) + 0x18))(); internal::HandleExceptionsInMethodIfSupported<testing::TestSuite,void> (this,RunSetUpTestSuite,(char *)0x0); cVar5 = TestResult::Failed((TestResult *)(this + 0x88)); lVar8 = std::chrono::_V2::system_clock::now(); *(long *)(this + 0x78) = lVar8 / 1000000; lVar9 = std::chrono::_V2::steady_clock::now(); lVar8 = *(long *)(this + 0x30); if (0 < (int)((ulong)(*(long *)(this + 0x38) - lVar8) >> 3)) { lVar11 = 1; do { lVar1 = lVar11 + -1; if (cVar5 == '\0') { uVar10 = 0xffffffff; if (lVar1 < (int)((ulong)(*(long *)(this + 0x50) - *(long *)(this + 0x48)) >> 2)) { uVar10 = *(uint *)(*(long *)(this + 0x48) + -4 + lVar11 * 4); } TestInfo::Run(*(TestInfo **)(lVar8 + (ulong)uVar10 * 8)); } else { uVar10 = 0xffffffff; if (lVar1 < (int)((ulong)(*(long *)(this + 0x50) - *(long *)(this + 0x48)) >> 2)) { uVar10 = *(uint *)(*(long *)(this + 0x48) + -4 + lVar11 * 4); } TestInfo::Skip(*(TestInfo **)(lVar8 + (ulong)uVar10 * 8)); } if (FLAGS_gtest_fail_fast == '\x01') { uVar10 = 0xffffffff; if (lVar1 < (int)((ulong)(*(long *)(this + 0x50) - *(long *)(this + 0x48)) >> 2)) { uVar10 = *(uint *)(*(long *)(this + 0x48) + -4 + lVar11 * 4); } cVar6 = TestResult::Failed((TestResult *) (*(long *)(*(long *)(this + 0x30) + (ulong)uVar10 * 8) + 0x90)); if (cVar6 != '\0') goto LAB_00125c30; } lVar8 = *(long *)(this + 0x30); bVar3 = lVar11 < (int)((ulong)(*(long *)(this + 0x38) - lVar8) >> 3); lVar11 = lVar11 + 1; } while (bVar3); } LAB_00125c44: lVar8 = std::chrono::_V2::steady_clock::now(); *(long *)(this + 0x80) = (lVar8 - lVar9) / 1000000; if (*(long *)(uVar4 + 0x210) == 0) { puVar7 = (int8 *)operator_new(8); *puVar7 = &PTR__OsStackTraceGetterInterface_00159110; *(int8 **)(uVar4 + 0x210) = puVar7; } (**(code **)(**(long **)(uVar4 + 0x210) + 0x18))(); internal::HandleExceptionsInMethodIfSupported<testing::TestSuite,void> (this,RunTearDownTestSuite,(char *)0x0); (**(code **)(*plVar2 + 0x60))(plVar2,this); (**(code **)(*plVar2 + 0x68))(plVar2,this); *(int8 *)(uVar4 + 0x168) = 0; return; LAB_00125c30: for (; (int)lVar11 < (int)((ulong)(*(long *)(this + 0x38) - *(long *)(this + 0x30)) >> 3); lVar11 = lVar11 + 1) { uVar10 = 0xffffffff; if (lVar11 < (int)((ulong)(*(long *)(this + 0x50) - *(long *)(this + 0x48)) >> 2)) { uVar10 = *(uint *)(*(long *)(this + 0x48) + lVar11 * 4); } TestInfo::Skip(*(TestInfo **)(*(long *)(this + 0x30) + (ulong)uVar10 * 8)); } goto LAB_00125c44; }
51,491
npc_forest_frog::SpellHit(Unit*, SpellInfo const*)
SylCore-WoTLK/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
void SpellHit(Unit* caster, SpellInfo const* spell) override { if (spell->Id == SPELL_REMOVE_AMANI_CURSE && caster->IsPlayer() && me->GetEntry() == NPC_FOREST_FROG) { me->GetMotionMaster()->MoveIdle(); me->SetFacingToObject(caster); PlayerGUID = caster->GetGUID(); if (roll_chance_i(2)) { DoCast(caster, SPELL_PUSH_MOJO, true); me->GetMotionMaster()->MovePoint(POINT_DESPAWN, caster->GetPosition()); } else DoSpawnRandom(); } }
O3
cpp
npc_forest_frog::SpellHit(Unit*, SpellInfo const*): pushq %r14 pushq %rbx pushq %rax cmpl $0xaad4, (%rdx) # imm = 0xAAD4 jne 0x55fac8 movq %rsi, %rbx cmpl $0x4, 0x44(%rsi) jne 0x55fac8 movq %rdi, %r14 movq 0x120(%rdi), %rdi movl $0x3, %esi callq 0xa96762 cmpl $0x5f4c, %eax # imm = 0x5F4C jne 0x55fac8 movq 0x120(%r14), %rax movq 0x26b0(%rax), %rdi callq 0xd242f8 movq 0x120(%r14), %rdi movq %rbx, %rsi callq 0xb897b6 movq %rbx, %rdi xorl %esi, %esi callq 0xa97f5e movq %rax, 0x1b8(%r14) xorl %edi, %edi movl $0x63, %esi callq 0x1084384 cmpl $0x1, %eax jg 0x55fad0 movq %r14, %rdi movq %rbx, %rsi movl $0xab93, %edx # imm = 0xAB93 movl $0x1, %ecx callq 0x9234c2 movq 0x120(%r14), %rax movq 0x26b0(%rax), %rdi movss 0xa0(%rbx), %xmm0 movss 0xa4(%rbx), %xmm1 movss 0xa8(%rbx), %xmm2 movss 0xac(%rbx), %xmm3 movl $0x1, %esi movl $0x1, %edx movl $0x1, %ecx movl $0x1, %r8d addq $0x8, %rsp popq %rbx popq %r14 jmp 0xd269c0 addq $0x8, %rsp popq %rbx popq %r14 retq movq %r14, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x55fafe nop
_ZN15npc_forest_frog8SpellHitEP4UnitPK9SpellInfo: push r14 push rbx push rax cmp dword ptr [rdx], 0AAD4h jnz loc_55FAC8 mov rbx, rsi cmp dword ptr [rsi+44h], 4 jnz loc_55FAC8 mov r14, rdi mov rdi, [rdi+120h]; this mov esi, 3; unsigned __int16 call _ZNK6Object14GetUInt32ValueEt; Object::GetUInt32Value(ushort) cmp eax, 5F4Ch jnz loc_55FAC8 mov rax, [r14+120h] mov rdi, [rax+26B0h]; this call _ZN12MotionMaster8MoveIdleEv; MotionMaster::MoveIdle(void) mov rdi, [r14+120h]; this mov rsi, rbx; WorldObject * call _ZN4Unit17SetFacingToObjectEP11WorldObject; Unit::SetFacingToObject(WorldObject *) mov rdi, rbx; this xor esi, esi; unsigned __int16 call _ZNK6Object12GetGuidValueEt; Object::GetGuidValue(ushort) mov [r14+1B8h], rax xor edi, edi; int mov esi, 63h ; 'c'; int call _Z5irandii; irand(int,int) cmp eax, 1 jg short loc_55FAD0 mov rdi, r14; this mov rsi, rbx; Unit * mov edx, 0AB93h; unsigned int mov ecx, 1; bool call _ZN6UnitAI6DoCastEP4Unitjb; UnitAI::DoCast(Unit *,uint,bool) mov rax, [r14+120h] mov rdi, [rax+26B0h]; this movss xmm0, dword ptr [rbx+0A0h] movss xmm1, dword ptr [rbx+0A4h] movss xmm2, dword ptr [rbx+0A8h] movss xmm3, dword ptr [rbx+0ACh] mov esi, 1 mov edx, 1 mov ecx, 1 mov r8d, 1 add rsp, 8 pop rbx pop r14 jmp _ZN12MotionMaster9MovePointEjfffbb12MovementSlotf; MotionMaster::MovePoint(uint,float,float,float,bool,bool,MovementSlot,float) loc_55FAC8: add rsp, 8 pop rbx pop r14 retn loc_55FAD0: mov rdi, r14; this add rsp, 8 pop rbx pop r14 jmp _ZN15npc_forest_frog13DoSpawnRandomEv; npc_forest_frog::DoSpawnRandom(void)
long long npc_forest_frog::SpellHit(Object **this, Unit *a2, const SpellInfo *a3) { long long result; // rax if ( *(_DWORD *)a3 == 43732 && *((_DWORD *)a2 + 17) == 4 ) { result = Object::GetUInt32Value(this[36], 3u); if ( (_DWORD)result == 24396 ) { MotionMaster::MoveIdle(*((MotionMaster **)this[36] + 1238)); Unit::SetFacingToObject(this[36], a2); this[55] = (Object *)Object::GetGuidValue(a2, 0); if ( (int)irand(0, 99) > 1 ) { return npc_forest_frog::DoSpawnRandom((npc_forest_frog *)this); } else { UnitAI::DoCast((UnitAI *)this, a2, 0xAB93u, 1); return MotionMaster::MovePoint(*((MotionMaster **)this[36] + 1238)); } } } return result; }
allocate: PUSH RAX SHR RDI,0x3d JZ 0x0055f9f0 CALL 0x0055d680 LAB_0055f9f0: CALL 0x0055d190
/* std::__new_allocator<std::function<void ()>*>::allocate(unsigned long, void const*) [clone .cold.1] */ void std::__new_allocator<std::function<void()>*>::allocate(ulong param_1,void *param_2) { if (param_1 >> 0x3d != 0) { std::__throw_bad_array_new_length(); } /* WARNING: Subroutine does not return */ std::__throw_bad_alloc(); }
51,492
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::reclassifySemisharpVertices()
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/refinement.cpp
void Refinement::reclassifySemisharpVertices() { typedef Level::VTag::VTagSize VTagSize; Sdc::Crease creasing(_options); // // Inspect all vertices derived from edges -- for those whose parent edges were semisharp, // reset the semisharp tag and the associated Rule according to the sharpness pair for the // subdivided edges (note this may be better handled when the edge sharpness is computed): // Index vertFromEdgeBegin = getFirstChildVertexFromEdges(); Index vertFromEdgeEnd = vertFromEdgeBegin + getNumChildVerticesFromEdges(); for (Index cVert = vertFromEdgeBegin; cVert < vertFromEdgeEnd; ++cVert) { Level::VTag& cVertTag = _child->_vertTags[cVert]; if (!cVertTag._semiSharpEdges) continue; Index pEdge = _childVertexParentIndex[cVert]; ConstIndexArray cEdges = getEdgeChildEdges(pEdge); if (_childVertexTag[cVert]._incomplete) { // One child edge likely missing -- assume Crease if remaining edge semi-sharp: cVertTag._semiSharpEdges = (IndexIsValid(cEdges[0]) && _child->_edgeTags[cEdges[0]]._semiSharp) || (IndexIsValid(cEdges[1]) && _child->_edgeTags[cEdges[1]]._semiSharp); cVertTag._rule = (VTagSize)(cVertTag._semiSharpEdges ? Sdc::Crease::RULE_CREASE : Sdc::Crease::RULE_SMOOTH); } else { int sharpEdgeCount = _child->_edgeTags[cEdges[0]]._semiSharp + _child->_edgeTags[cEdges[1]]._semiSharp; cVertTag._semiSharpEdges = (sharpEdgeCount > 0); cVertTag._rule = (VTagSize)(creasing.DetermineVertexVertexRule(0.0, sharpEdgeCount)); } } // // Inspect all vertices derived from vertices -- for those whose parent vertices were // semisharp (inherited in the child vert's tag), inspect and reset the semisharp tag // and the associated Rule (based on neighboring child edges around the child vertex). // // We should never find such a vertex "incomplete" in a sparse refinement as a parent // vertex is either selected or not, but never neighboring. So the only complication // here is whether the local topology of child edges exists -- it may have been pruned // from the last level to reduce memory. If so, we use the parent to identify the // child edges. // // In both cases, we count the number of sharp and semisharp child edges incident the // child vertex and adjust the "semisharp" and "rule" tags accordingly. // Index vertFromVertBegin = getFirstChildVertexFromVertices(); Index vertFromVertEnd = vertFromVertBegin + getNumChildVerticesFromVertices(); for (Index cVert = vertFromVertBegin; cVert < vertFromVertEnd; ++cVert) { Index pVert = _childVertexParentIndex[cVert]; Level::VTag const& pVertTag = _parent->_vertTags[pVert]; // Skip if parent not semi-sharp: if (!pVertTag._semiSharp && !pVertTag._semiSharpEdges) continue; // // We need to inspect the child neighborhood's sharpness when either semi-sharp // edges were present around the parent vertex, or the parent vertex sharpness // decayed: // Level::VTag& cVertTag = _child->_vertTags[cVert]; bool sharpVertexDecayed = pVertTag._semiSharp && !cVertTag._semiSharp; if (pVertTag._semiSharpEdges || sharpVertexDecayed) { int infSharpEdgeCount = 0; int semiSharpEdgeCount = 0; bool cVertEdgesPresent = (_child->getNumVertexEdgesTotal() > 0); if (cVertEdgesPresent) { ConstIndexArray cEdges = _child->getVertexEdges(cVert); for (int i = 0; i < cEdges.size(); ++i) { Level::ETag cEdgeTag = _child->_edgeTags[cEdges[i]]; infSharpEdgeCount += cEdgeTag._infSharp; semiSharpEdgeCount += cEdgeTag._semiSharp; } } else { ConstIndexArray pEdges = _parent->getVertexEdges(pVert); ConstLocalIndexArray pVertInEdge = _parent->getVertexEdgeLocalIndices(pVert); for (int i = 0; i < pEdges.size(); ++i) { ConstIndexArray cEdgePair = getEdgeChildEdges(pEdges[i]); Index cEdge = cEdgePair[pVertInEdge[i]]; Level::ETag cEdgeTag = _child->_edgeTags[cEdge]; infSharpEdgeCount += cEdgeTag._infSharp; semiSharpEdgeCount += cEdgeTag._semiSharp; } } cVertTag._semiSharpEdges = (semiSharpEdgeCount > 0); if (!cVertTag._semiSharp && !cVertTag._infSharp) { cVertTag._rule = (VTagSize)(creasing.DetermineVertexVertexRule(0.0, infSharpEdgeCount + semiSharpEdgeCount)); } } } }
O2
cpp
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::reclassifySemisharpVertices(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx movl 0x18(%rdi), %eax leaq 0xc(%rsp), %r14 movl %eax, (%r14) movslq 0x50(%rdi), %r15 movslq 0x38(%rdi), %r12 addq %r15, %r12 movl $0x80, %ebp cmpq %r12, %r15 jge 0x61f76 movq 0x10(%rbx), %rcx movq 0x1b0(%rcx), %r13 movzwl (%r13,%r15,2), %eax testb $0x40, %al je 0x61f6e movq 0xc0(%rbx), %rdx movq 0x138(%rbx), %rsi movslq (%rsi,%r15,4), %rsi addq %rsi, %rsi movq 0x180(%rbx), %rdi testb $0x1, (%rdi,%r15) jne 0x61f07 movslq (%rdx,%rsi,4), %rdi movq 0xf0(%rcx), %rcx movzbl (%rcx,%rdi), %edi movslq 0x4(%rdx,%rsi,4), %rdx movzbl (%rcx,%rdx), %esi shrl $0x3, %esi andl $0x1, %esi btl $0x3, %edi adcl $0x0, %esi xorl %ecx, %ecx testb %sil, %sil setne %cl shll $0x6, %ecx andl $-0x41, %eax orl %ecx, %eax movw %ax, (%r13,%r15,2) xorps %xmm0, %xmm0 movq %r14, %rdi callq 0x542f0 movzwl (%r13,%r15,2), %ecx andl $0xf, %eax shll $0x7, %eax andl $0xfffff87f, %ecx # imm = 0xFFFFF87F jmp 0x61f66 movslq (%rdx,%rsi,4), %rdi cmpq $-0x1, %rdi je 0x61f1f movq 0xf0(%rcx), %r8 testb $0x8, (%r8,%rdi) jne 0x61f49 movslq 0x4(%rdx,%rsi,4), %rdx cmpq $-0x1, %rdx je 0x61f53 movq 0xf0(%rcx), %rcx movb (%rcx,%rdx), %cl shlb $0x3, %cl andb $0x40, %cl movzbl %cl, %ecx testb %cl, %cl movl $0x200, %edx # imm = 0x200 cmovel %ebp, %edx jmp 0x61f59 movw $0x200, %dx # imm = 0x200 movw $0x40, %cx jmp 0x61f59 xorl %ecx, %ecx movw $0x80, %dx andl $0xfffff83f, %eax # imm = 0xFFFFF83F movzwl %cx, %esi movzwl %dx, %ecx orl %esi, %ecx orl %eax, %ecx movw %cx, (%r13,%r15,2) incq %r15 jmp 0x61e68 movslq 0x54(%rbx), %r14 movslq 0x3c(%rbx), %r13 addq %r14, %r13 movq %r13, 0x10(%rsp) cmpq %r13, %r14 jge 0x620f6 movq 0x8(%rbx), %rdi movq 0x138(%rbx), %rax movslq (%rax,%r14,4), %r12 movq 0x1b0(%rdi), %rax movzwl (%rax,%r12,2), %ecx testb $0x60, %cl je 0x620ee movq 0x10(%rbx), %rax movq 0x1b0(%rax), %r15 movzwl (%r15,%r14,2), %edx testb $0x20, %dl sete %dl testb $0x40, %cl jne 0x61fd9 shrb $0x5, %cl andb %dl, %cl je 0x620ee movq 0x170(%rax), %rcx subq 0x168(%rax), %rcx shrq $0x2, %rcx testl %ecx, %ecx jle 0x62039 movq %rax, %rdi movl %r14d, %esi callq 0x4f370 movq 0x10(%rbx), %rdi xorl %r8d, %r8d testl %edx, %edx cmovlel %r8d, %edx xorl %ecx, %ecx xorl %esi, %esi cmpq %r8, %rdx je 0x620a7 movslq (%rax,%r8,4), %r9 movq 0xf0(%rdi), %r10 movzbl (%r10,%r9), %r9d btl $0x2, %r9d adcl $0x0, %esi btl $0x3, %r9d adcl $0x0, %ecx incq %r8 jmp 0x6200b movl %r12d, %esi callq 0x54550 movq %rax, %r13 movl %edx, %ebp movq 0x8(%rbx), %rdi movl %r12d, %esi callq 0x4f6b0 movq 0x10(%rbx), %rdx movq 0xc0(%rbx), %rdi xorl %r8d, %r8d testl %ebp, %ebp cmovlel %r8d, %ebp xorl %ecx, %ecx xorl %esi, %esi cmpq %r8, %rbp je 0x620a2 movslq (%r13,%r8,4), %r9 leaq (%rdi,%r9,8), %r9 movzwl (%rax,%r8,2), %r10d movslq (%r9,%r10,4), %r9 movq 0xf0(%rdx), %r10 movzbl (%r10,%r9), %r9d btl $0x2, %r9d adcl $0x0, %esi btl $0x3, %r9d adcl $0x0, %ecx incq %r8 jmp 0x6206a movq 0x10(%rsp), %r13 xorl %eax, %eax testl %ecx, %ecx setg %al movzwl (%r15,%r14,2), %edx shll $0x6, %eax movl %edx, %edi andl $-0x41, %edi orl %eax, %edi movw %di, (%r15,%r14,2) testb $0x30, %dl jne 0x620ee addl %ecx, %esi xorps %xmm0, %xmm0 leaq 0xc(%rsp), %rdi callq 0x542f0 movzwl (%r15,%r14,2), %ecx andl $0xf, %eax shll $0x7, %eax andl $0xfffff87f, %ecx # imm = 0xFFFFF87F orl %eax, %ecx movw %cx, (%r15,%r14,2) incq %r14 jmp 0x61f86 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement27reclassifySemisharpVerticesEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdi mov eax, [rdi+18h] lea r14, [rsp+48h+var_3C] mov [r14], eax movsxd r15, dword ptr [rdi+50h] movsxd r12, dword ptr [rdi+38h] add r12, r15 mov ebp, 80h loc_61E68: cmp r15, r12 jge loc_61F76 mov rcx, [rbx+10h] mov r13, [rcx+1B0h] movzx eax, word ptr [r13+r15*2+0] test al, 40h jz loc_61F6E mov rdx, [rbx+0C0h] mov rsi, [rbx+138h] movsxd rsi, dword ptr [rsi+r15*4] add rsi, rsi mov rdi, [rbx+180h] test byte ptr [rdi+r15], 1 jnz short loc_61F07 movsxd rdi, dword ptr [rdx+rsi*4] mov rcx, [rcx+0F0h] movzx edi, byte ptr [rcx+rdi] movsxd rdx, dword ptr [rdx+rsi*4+4] movzx esi, byte ptr [rcx+rdx] shr esi, 3 and esi, 1 bt edi, 3 adc esi, 0; int xor ecx, ecx test sil, sil setnz cl shl ecx, 6 and eax, 0FFFFFFBFh or eax, ecx mov [r13+r15*2+0], ax xorps xmm0, xmm0; float mov rdi, r14; this call __ZNK10OpenSubdiv6v3_6_03Sdc6Crease25DetermineVertexVertexRuleEfi; OpenSubdiv::v3_6_0::Sdc::Crease::DetermineVertexVertexRule(float,int) movzx ecx, word ptr [r13+r15*2+0] and eax, 0Fh shl eax, 7 and ecx, 0FFFFF87Fh jmp short loc_61F66 loc_61F07: movsxd rdi, dword ptr [rdx+rsi*4] cmp rdi, 0FFFFFFFFFFFFFFFFh jz short loc_61F1F mov r8, [rcx+0F0h] test byte ptr [r8+rdi], 8 jnz short loc_61F49 loc_61F1F: movsxd rdx, dword ptr [rdx+rsi*4+4] cmp rdx, 0FFFFFFFFFFFFFFFFh jz short loc_61F53 mov rcx, [rcx+0F0h] mov cl, [rcx+rdx] shl cl, 3 and cl, 40h movzx ecx, cl test cl, cl mov edx, 200h cmovz edx, ebp jmp short loc_61F59 loc_61F49: mov dx, 200h mov cx, 40h ; '@' jmp short loc_61F59 loc_61F53: xor ecx, ecx mov dx, 80h loc_61F59: and eax, 0FFFFF83Fh movzx esi, cx movzx ecx, dx or ecx, esi loc_61F66: or ecx, eax mov [r13+r15*2+0], cx loc_61F6E: inc r15 jmp loc_61E68 loc_61F76: movsxd r14, dword ptr [rbx+54h] movsxd r13, dword ptr [rbx+3Ch] add r13, r14 mov [rsp+48h+var_38], r13 loc_61F86: cmp r14, r13 jge loc_620F6 mov rdi, [rbx+8]; this mov rax, [rbx+138h] movsxd r12, dword ptr [rax+r14*4] mov rax, [rdi+1B0h] movzx ecx, word ptr [rax+r12*2] test cl, 60h jz loc_620EE mov rax, [rbx+10h] mov r15, [rax+1B0h] movzx edx, word ptr [r15+r14*2] test dl, 20h setz dl test cl, 40h jnz short loc_61FD9 shr cl, 5 and cl, dl jz loc_620EE loc_61FD9: mov rcx, [rax+170h] sub rcx, [rax+168h] shr rcx, 2 test ecx, ecx jle short loc_62039 mov rdi, rax; this mov esi, r14d; int call __ZN10OpenSubdiv6v3_6_03Vtr8internal5Level14getVertexEdgesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdges(int) mov rdi, [rbx+10h] xor r8d, r8d test edx, edx cmovle edx, r8d xor ecx, ecx xor esi, esi loc_6200B: cmp rdx, r8 jz loc_620A7 movsxd r9, dword ptr [rax+r8*4] mov r10, [rdi+0F0h] movzx r9d, byte ptr [r10+r9] bt r9d, 2 adc esi, 0 bt r9d, 3 adc ecx, 0 inc r8 jmp short loc_6200B loc_62039: mov esi, r12d; int call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level14getVertexEdgesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdges(int) mov r13, rax mov ebp, edx mov rdi, [rbx+8]; this mov esi, r12d; int call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level25getVertexEdgeLocalIndicesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdgeLocalIndices(int) mov rdx, [rbx+10h] mov rdi, [rbx+0C0h] xor r8d, r8d test ebp, ebp cmovle ebp, r8d xor ecx, ecx xor esi, esi loc_6206A: cmp rbp, r8 jz short loc_620A2 movsxd r9, dword ptr [r13+r8*4+0] lea r9, [rdi+r9*8] movzx r10d, word ptr [rax+r8*2] movsxd r9, dword ptr [r9+r10*4] mov r10, [rdx+0F0h] movzx r9d, byte ptr [r10+r9] bt r9d, 2 adc esi, 0 bt r9d, 3 adc ecx, 0 inc r8 jmp short loc_6206A loc_620A2: mov r13, [rsp+48h+var_38] loc_620A7: xor eax, eax test ecx, ecx setnle al movzx edx, word ptr [r15+r14*2] shl eax, 6 mov edi, edx and edi, 0FFFFFFBFh or edi, eax mov [r15+r14*2], di test dl, 30h jnz short loc_620EE add esi, ecx; int xorps xmm0, xmm0; float lea rdi, [rsp+48h+var_3C]; this call __ZNK10OpenSubdiv6v3_6_03Sdc6Crease25DetermineVertexVertexRuleEfi; OpenSubdiv::v3_6_0::Sdc::Crease::DetermineVertexVertexRule(float,int) movzx ecx, word ptr [r15+r14*2] and eax, 0Fh shl eax, 7 and ecx, 0FFFFF87Fh or ecx, eax mov [r15+r14*2], cx loc_620EE: inc r14 jmp loc_61F86 loc_620F6: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long OpenSubdiv::v3_6_0::Vtr::internal::Refinement::reclassifySemisharpVertices( OpenSubdiv::v3_6_0::Vtr::internal::Refinement *this) { long long result; // rax long long v3; // r15 long long v4; // r12 long long v5; // rcx long long v6; // r13 long long v7; // rdx long long v8; // rcx char v9; // di long long v10; // rdx int v11; // esi __int16 v12; // cx long long v13; // rdi long long v14; // rdx __int16 v15; // cx __int16 v16; // dx long long v17; // r14 long long v18; // r13 OpenSubdiv::v3_6_0::Vtr::internal::Level *v19; // rdi long long v20; // r12 __int16 v21; // cx long long v22; // r15 long long v23; // rax long long v24; // rdx long long v25; // r8 int v26; // ecx int v27; // esi char v28; // r9 long long VertexEdges; // r13 unsigned int v30; // edx long long v31; // rbp long long VertexEdgeLocalIndices; // rax long long v33; // r8 char v34; // r9 __int16 v35; // dx int v36; // [rsp+Ch] [rbp-3Ch] BYREF long long v37; // [rsp+10h] [rbp-38h] result = *((unsigned int *)this + 6); v36 = *((_DWORD *)this + 6); v3 = *((int *)this + 20); v4 = v3 + *((int *)this + 14); while ( v3 < v4 ) { v5 = *((_QWORD *)this + 2); v6 = *(_QWORD *)(v5 + 432); result = *(unsigned __int16 *)(v6 + 2 * v3); if ( (result & 0x40) != 0 ) { v7 = *((_QWORD *)this + 24); if ( (*(_BYTE *)(*((_QWORD *)this + 48) + v3) & 1) != 0 ) { v13 = *(int *)(v7 + 8LL * *(int *)(*((_QWORD *)this + 39) + 4 * v3)); if ( v13 != -1 && (*(_BYTE *)(*(_QWORD *)(v5 + 240) + v13) & 8) != 0 ) { v16 = 512; v15 = 64; } else { v14 = *(int *)(v7 + 8LL * *(int *)(*((_QWORD *)this + 39) + 4 * v3) + 4); if ( v14 == -1 ) { v15 = 0; v16 = 128; } else { v15 = (8 * *(_BYTE *)(*(_QWORD *)(v5 + 240) + v14)) & 0x40; v16 = 512; if ( !(_BYTE)v15 ) v16 = 128; } } result = (unsigned int)result & 0xFFFFF83F; v12 = v15 | v16; } else { v8 = *(_QWORD *)(v5 + 240); v9 = *(_BYTE *)(v8 + *(int *)(v7 + 8LL * *(int *)(*((_QWORD *)this + 39) + 4 * v3))); v10 = *(int *)(v7 + 8LL * *(int *)(*((_QWORD *)this + 39) + 4 * v3) + 4); v11 = ((v9 & 8) != 0) + ((*(unsigned __int8 *)(v8 + v10) >> 3) & 1); *(_WORD *)(v6 + 2 * v3) = ((((v9 & 8) != 0) + ((*(_BYTE *)(v8 + v10) & 8) != 0) != 0) << 6) | result & 0xFFBF; result = (unsigned __int8)(OpenSubdiv::v3_6_0::Sdc::Crease::DetermineVertexVertexRule( (OpenSubdiv::v3_6_0::Sdc::Crease *)&v36, 0.0, v11) & 0xF) << 7; v12 = *(_WORD *)(v6 + 2 * v3) & 0xF87F; } *(_WORD *)(v6 + 2 * v3) = result | v12; } ++v3; } v17 = *((int *)this + 21); v18 = v17 + *((int *)this + 15); v37 = v18; while ( v17 < v18 ) { v19 = (OpenSubdiv::v3_6_0::Vtr::internal::Level *)*((_QWORD *)this + 1); v20 = *(int *)(*((_QWORD *)this + 39) + 4 * v17); result = *((_QWORD *)v19 + 54); v21 = *(_WORD *)(result + 2 * v20); if ( (v21 & 0x60) != 0 ) { result = *((_QWORD *)this + 2); v22 = *(_QWORD *)(result + 432); if ( (v21 & 0x40) != 0 || (((*(_WORD *)(v22 + 2 * v17) & 0x20) == 0) & ((unsigned __int8)v21 >> 5)) != 0 ) { if ( (int)((*(_QWORD *)(result + 368) - *(_QWORD *)(result + 360)) >> 2) <= 0 ) { VertexEdges = OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdges(v19, v20); v31 = v30; VertexEdgeLocalIndices = OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdgeLocalIndices( *((OpenSubdiv::v3_6_0::Vtr::internal::Level **)this + 1), v20); v33 = 0LL; if ( (int)v31 <= 0 ) v31 = 0LL; v26 = 0; v27 = 0; while ( v31 != v33 ) { v34 = *(_BYTE *)(*(_QWORD *)(*((_QWORD *)this + 2) + 240LL) + *(int *)(*((_QWORD *)this + 24) + 8LL * *(int *)(VertexEdges + 4 * v33) + 4LL * *(unsigned __int16 *)(VertexEdgeLocalIndices + 2 * v33))); v27 += (v34 & 4) != 0; v26 += (v34 & 8) != 0; ++v33; } v18 = v37; } else { v23 = OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdges( (OpenSubdiv::v3_6_0::Vtr::internal::Level *)result, v17); v25 = 0LL; if ( (int)v24 <= 0 ) v24 = 0LL; v26 = 0; v27 = 0; while ( v24 != v25 ) { v28 = *(_BYTE *)(*(_QWORD *)(*((_QWORD *)this + 2) + 240LL) + *(int *)(v23 + 4 * v25)); v27 += (v28 & 4) != 0; v26 += (v28 & 8) != 0; ++v25; } } v35 = *(_WORD *)(v22 + 2 * v17); result = (unsigned __int8)(v26 > 0) << 6; *(_WORD *)(v22 + 2 * v17) = ((v26 > 0) << 6) | v35 & 0xFFBF; if ( (v35 & 0x30) == 0 ) { result = (unsigned __int8)(OpenSubdiv::v3_6_0::Sdc::Crease::DetermineVertexVertexRule( (OpenSubdiv::v3_6_0::Sdc::Crease *)&v36, 0.0, v26 + v27) & 0xF) << 7; *(_WORD *)(v22 + 2 * v17) = result | *(_WORD *)(v22 + 2 * v17) & 0xF87F; } } } ++v17; } return result; }
reclassifySemisharpVertices: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDI MOV EAX,dword ptr [RDI + 0x18] LEA R14,[RSP + 0xc] MOV dword ptr [R14],EAX MOVSXD R15,dword ptr [RDI + 0x50] MOVSXD R12,dword ptr [RDI + 0x38] ADD R12,R15 MOV EBP,0x80 LAB_00161e68: CMP R15,R12 JGE 0x00161f76 MOV RCX,qword ptr [RBX + 0x10] MOV R13,qword ptr [RCX + 0x1b0] MOVZX EAX,word ptr [R13 + R15*0x2] TEST AL,0x40 JZ 0x00161f6e MOV RDX,qword ptr [RBX + 0xc0] MOV RSI,qword ptr [RBX + 0x138] MOVSXD RSI,dword ptr [RSI + R15*0x4] ADD RSI,RSI MOV RDI,qword ptr [RBX + 0x180] TEST byte ptr [RDI + R15*0x1],0x1 JNZ 0x00161f07 MOVSXD RDI,dword ptr [RDX + RSI*0x4] MOV RCX,qword ptr [RCX + 0xf0] MOVZX EDI,byte ptr [RCX + RDI*0x1] MOVSXD RDX,dword ptr [RDX + RSI*0x4 + 0x4] MOVZX ESI,byte ptr [RCX + RDX*0x1] SHR ESI,0x3 AND ESI,0x1 BT EDI,0x3 ADC ESI,0x0 XOR ECX,ECX TEST SIL,SIL SETNZ CL SHL ECX,0x6 AND EAX,0xffffffbf OR EAX,ECX MOV word ptr [R13 + R15*0x2],AX XORPS XMM0,XMM0 MOV RDI,R14 CALL 0x001542f0 MOVZX ECX,word ptr [R13 + R15*0x2] AND EAX,0xf SHL EAX,0x7 AND ECX,0xfffff87f JMP 0x00161f66 LAB_00161f07: MOVSXD RDI,dword ptr [RDX + RSI*0x4] CMP RDI,-0x1 JZ 0x00161f1f MOV R8,qword ptr [RCX + 0xf0] TEST byte ptr [R8 + RDI*0x1],0x8 JNZ 0x00161f49 LAB_00161f1f: MOVSXD RDX,dword ptr [RDX + RSI*0x4 + 0x4] CMP RDX,-0x1 JZ 0x00161f53 MOV RCX,qword ptr [RCX + 0xf0] MOV CL,byte ptr [RCX + RDX*0x1] SHL CL,0x3 AND CL,0x40 MOVZX ECX,CL TEST CL,CL MOV EDX,0x200 CMOVZ EDX,EBP JMP 0x00161f59 LAB_00161f49: MOV DX,0x200 MOV CX,0x40 JMP 0x00161f59 LAB_00161f53: XOR ECX,ECX MOV DX,0x80 LAB_00161f59: AND EAX,0xfffff83f MOVZX ESI,CX MOVZX ECX,DX OR ECX,ESI LAB_00161f66: OR ECX,EAX MOV word ptr [R13 + R15*0x2],CX LAB_00161f6e: INC R15 JMP 0x00161e68 LAB_00161f76: MOVSXD R14,dword ptr [RBX + 0x54] MOVSXD R13,dword ptr [RBX + 0x3c] ADD R13,R14 MOV qword ptr [RSP + 0x10],R13 LAB_00161f86: CMP R14,R13 JGE 0x001620f6 MOV RDI,qword ptr [RBX + 0x8] MOV RAX,qword ptr [RBX + 0x138] MOVSXD R12,dword ptr [RAX + R14*0x4] MOV RAX,qword ptr [RDI + 0x1b0] MOVZX ECX,word ptr [RAX + R12*0x2] TEST CL,0x60 JZ 0x001620ee MOV RAX,qword ptr [RBX + 0x10] MOV R15,qword ptr [RAX + 0x1b0] MOVZX EDX,word ptr [R15 + R14*0x2] TEST DL,0x20 SETZ DL TEST CL,0x40 JNZ 0x00161fd9 SHR CL,0x5 AND CL,DL JZ 0x001620ee LAB_00161fd9: MOV RCX,qword ptr [RAX + 0x170] SUB RCX,qword ptr [RAX + 0x168] SHR RCX,0x2 TEST ECX,ECX JLE 0x00162039 MOV RDI,RAX MOV ESI,R14D CALL 0x0014f370 MOV RDI,qword ptr [RBX + 0x10] XOR R8D,R8D TEST EDX,EDX CMOVLE EDX,R8D XOR ECX,ECX XOR ESI,ESI LAB_0016200b: CMP RDX,R8 JZ 0x001620a7 MOVSXD R9,dword ptr [RAX + R8*0x4] MOV R10,qword ptr [RDI + 0xf0] MOVZX R9D,byte ptr [R10 + R9*0x1] BT R9D,0x2 ADC ESI,0x0 BT R9D,0x3 ADC ECX,0x0 INC R8 JMP 0x0016200b LAB_00162039: MOV ESI,R12D CALL 0x00154550 MOV R13,RAX MOV EBP,EDX MOV RDI,qword ptr [RBX + 0x8] MOV ESI,R12D CALL 0x0014f6b0 MOV RDX,qword ptr [RBX + 0x10] MOV RDI,qword ptr [RBX + 0xc0] XOR R8D,R8D TEST EBP,EBP CMOVLE EBP,R8D XOR ECX,ECX XOR ESI,ESI LAB_0016206a: CMP RBP,R8 JZ 0x001620a2 MOVSXD R9,dword ptr [R13 + R8*0x4] LEA R9,[RDI + R9*0x8] MOVZX R10D,word ptr [RAX + R8*0x2] MOVSXD R9,dword ptr [R9 + R10*0x4] MOV R10,qword ptr [RDX + 0xf0] MOVZX R9D,byte ptr [R10 + R9*0x1] BT R9D,0x2 ADC ESI,0x0 BT R9D,0x3 ADC ECX,0x0 INC R8 JMP 0x0016206a LAB_001620a2: MOV R13,qword ptr [RSP + 0x10] LAB_001620a7: XOR EAX,EAX TEST ECX,ECX SETG AL MOVZX EDX,word ptr [R15 + R14*0x2] SHL EAX,0x6 MOV EDI,EDX AND EDI,0xffffffbf OR EDI,EAX MOV word ptr [R15 + R14*0x2],DI TEST DL,0x30 JNZ 0x001620ee ADD ESI,ECX XORPS XMM0,XMM0 LEA RDI,[RSP + 0xc] CALL 0x001542f0 MOVZX ECX,word ptr [R15 + R14*0x2] AND EAX,0xf SHL EAX,0x7 AND ECX,0xfffff87f OR ECX,EAX MOV word ptr [R15 + R14*0x2],CX LAB_001620ee: INC R14 JMP 0x00161f86 LAB_001620f6: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Vtr::internal::Refinement::reclassifySemisharpVertices() */ void __thiscall OpenSubdiv::v3_6_0::Vtr::internal::Refinement::reclassifySemisharpVertices(Refinement *this) { byte bVar1; long lVar2; Level *this_00; ushort uVar3; uint uVar4; long lVar5; ushort uVar6; ushort uVar7; long lVar8; ulong uVar9; int iVar10; int iVar11; long lVar12; long lVar13; ulong uVar14; long lVar15; long lVar16; int1 auVar17 [12]; int4 local_3c; long local_38; local_3c = *(int4 *)(this + 0x18); lVar16 = (long)*(int *)(this + 0x50); lVar15 = *(int *)(this + 0x38) + lVar16; for (; lVar16 < lVar15; lVar16 = lVar16 + 1) { lVar2 = *(long *)(this + 0x10); lVar5 = *(long *)(lVar2 + 0x1b0); uVar3 = *(ushort *)(lVar5 + lVar16 * 2); if ((uVar3 & 0x40) != 0) { lVar8 = *(long *)(this + 0xc0); lVar12 = (long)*(int *)(*(long *)(this + 0x138) + lVar16 * 4); if ((*(byte *)(*(long *)(this + 0x180) + lVar16) & 1) == 0) { iVar10 = (*(byte *)(*(long *)(lVar2 + 0xf0) + (long)*(int *)(lVar8 + 4 + lVar12 * 8)) >> 3 & 1) + (uint)((*(byte *)(*(long *)(lVar2 + 0xf0) + (long)*(int *)(lVar8 + lVar12 * 8) ) >> 3 & 1) != 0); *(ushort *)(lVar5 + lVar16 * 2) = uVar3 & 0xffbf | (ushort)((char)iVar10 != '\0') << 6; uVar4 = Sdc::Crease::DetermineVertexVertexRule((Crease *)&local_3c,0.0,iVar10); uVar3 = (ushort)((uVar4 & 0xf) << 7); uVar7 = *(ushort *)(lVar5 + lVar16 * 2) & 0xf87f; } else { lVar13 = (long)*(int *)(lVar8 + lVar12 * 8); if ((lVar13 == -1) || ((*(byte *)(*(long *)(lVar2 + 0xf0) + lVar13) & 8) == 0)) { lVar8 = (long)*(int *)(lVar8 + 4 + lVar12 * 8); if (lVar8 == -1) { uVar6 = 0; uVar7 = 0x80; } else { bVar1 = *(byte *)(*(long *)(lVar2 + 0xf0) + lVar8) & 8; uVar6 = (ushort)(byte)(bVar1 << 3); uVar7 = 0x200; if (bVar1 == 0) { uVar7 = 0x80; } } } else { uVar7 = 0x200; uVar6 = 0x40; } uVar3 = uVar3 & 0xf83f; uVar7 = uVar7 | uVar6; } *(ushort *)(lVar5 + lVar16 * 2) = uVar7 | uVar3; } } lVar16 = (long)*(int *)(this + 0x54); lVar15 = *(int *)(this + 0x3c) + lVar16; local_38 = lVar15; for (; lVar16 < lVar15; lVar16 = lVar16 + 1) { iVar10 = *(int *)(*(long *)(this + 0x138) + lVar16 * 4); uVar3 = *(ushort *)(*(long *)(*(Level **)(this + 8) + 0x1b0) + (long)iVar10 * 2); if ((uVar3 & 0x60) != 0) { this_00 = *(Level **)(this + 0x10); lVar2 = *(long *)(this_00 + 0x1b0); if (((uVar3 & 0x40) != 0) || (((byte)uVar3 >> 5 & (*(ushort *)(lVar2 + lVar16 * 2) & 0x20) == 0) != 0)) { if ((int)((ulong)(*(long *)(this_00 + 0x170) - *(long *)(this_00 + 0x168)) >> 2) < 1) { auVar17 = Level::getVertexEdges(*(Level **)(this + 8),iVar10); lVar5 = Level::getVertexEdgeLocalIndices(*(Level **)(this + 8),iVar10); uVar14 = 0; uVar9 = (ulong)auVar17._8_4_; if ((int)auVar17._8_4_ < 1) { uVar9 = uVar14; } iVar10 = 0; iVar11 = 0; for (; lVar15 = local_38, uVar9 != uVar14; uVar14 = uVar14 + 1) { bVar1 = *(byte *)(*(long *)(*(long *)(this + 0x10) + 0xf0) + (long)*(int *)(*(long *)(this + 0xc0) + (long)*(int *)(auVar17._0_8_ + uVar14 * 4) * 8 + (ulong)*(ushort *)(lVar5 + uVar14 * 2) * 4)); iVar11 = iVar11 + (uint)((bVar1 >> 2 & 1) != 0); iVar10 = iVar10 + (uint)((bVar1 >> 3 & 1) != 0); } } else { auVar17 = Level::getVertexEdges(this_00,(int)lVar16); uVar14 = 0; uVar9 = (ulong)auVar17._8_4_; if ((int)auVar17._8_4_ < 1) { uVar9 = uVar14; } iVar10 = 0; iVar11 = 0; for (; uVar9 != uVar14; uVar14 = uVar14 + 1) { bVar1 = *(byte *)(*(long *)(*(long *)(this + 0x10) + 0xf0) + (long)*(int *)(auVar17._0_8_ + uVar14 * 4)); iVar11 = iVar11 + (uint)((bVar1 >> 2 & 1) != 0); iVar10 = iVar10 + (uint)((bVar1 >> 3 & 1) != 0); } } uVar3 = *(ushort *)(lVar2 + lVar16 * 2); *(ushort *)(lVar2 + lVar16 * 2) = uVar3 & 0xffbf | (ushort)(0 < iVar10) << 6; if ((uVar3 & 0x30) == 0) { uVar4 = Sdc::Crease::DetermineVertexVertexRule((Crease *)&local_3c,0.0,iVar11 + iVar10); *(ushort *)(lVar2 + lVar16 * 2) = *(ushort *)(lVar2 + lVar16 * 2) & 0xf87f | (ushort)((uVar4 & 0xf) << 7); } } } } return; }
51,493
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::reclassifySemisharpVertices()
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/refinement.cpp
void Refinement::reclassifySemisharpVertices() { typedef Level::VTag::VTagSize VTagSize; Sdc::Crease creasing(_options); // // Inspect all vertices derived from edges -- for those whose parent edges were semisharp, // reset the semisharp tag and the associated Rule according to the sharpness pair for the // subdivided edges (note this may be better handled when the edge sharpness is computed): // Index vertFromEdgeBegin = getFirstChildVertexFromEdges(); Index vertFromEdgeEnd = vertFromEdgeBegin + getNumChildVerticesFromEdges(); for (Index cVert = vertFromEdgeBegin; cVert < vertFromEdgeEnd; ++cVert) { Level::VTag& cVertTag = _child->_vertTags[cVert]; if (!cVertTag._semiSharpEdges) continue; Index pEdge = _childVertexParentIndex[cVert]; ConstIndexArray cEdges = getEdgeChildEdges(pEdge); if (_childVertexTag[cVert]._incomplete) { // One child edge likely missing -- assume Crease if remaining edge semi-sharp: cVertTag._semiSharpEdges = (IndexIsValid(cEdges[0]) && _child->_edgeTags[cEdges[0]]._semiSharp) || (IndexIsValid(cEdges[1]) && _child->_edgeTags[cEdges[1]]._semiSharp); cVertTag._rule = (VTagSize)(cVertTag._semiSharpEdges ? Sdc::Crease::RULE_CREASE : Sdc::Crease::RULE_SMOOTH); } else { int sharpEdgeCount = _child->_edgeTags[cEdges[0]]._semiSharp + _child->_edgeTags[cEdges[1]]._semiSharp; cVertTag._semiSharpEdges = (sharpEdgeCount > 0); cVertTag._rule = (VTagSize)(creasing.DetermineVertexVertexRule(0.0, sharpEdgeCount)); } } // // Inspect all vertices derived from vertices -- for those whose parent vertices were // semisharp (inherited in the child vert's tag), inspect and reset the semisharp tag // and the associated Rule (based on neighboring child edges around the child vertex). // // We should never find such a vertex "incomplete" in a sparse refinement as a parent // vertex is either selected or not, but never neighboring. So the only complication // here is whether the local topology of child edges exists -- it may have been pruned // from the last level to reduce memory. If so, we use the parent to identify the // child edges. // // In both cases, we count the number of sharp and semisharp child edges incident the // child vertex and adjust the "semisharp" and "rule" tags accordingly. // Index vertFromVertBegin = getFirstChildVertexFromVertices(); Index vertFromVertEnd = vertFromVertBegin + getNumChildVerticesFromVertices(); for (Index cVert = vertFromVertBegin; cVert < vertFromVertEnd; ++cVert) { Index pVert = _childVertexParentIndex[cVert]; Level::VTag const& pVertTag = _parent->_vertTags[pVert]; // Skip if parent not semi-sharp: if (!pVertTag._semiSharp && !pVertTag._semiSharpEdges) continue; // // We need to inspect the child neighborhood's sharpness when either semi-sharp // edges were present around the parent vertex, or the parent vertex sharpness // decayed: // Level::VTag& cVertTag = _child->_vertTags[cVert]; bool sharpVertexDecayed = pVertTag._semiSharp && !cVertTag._semiSharp; if (pVertTag._semiSharpEdges || sharpVertexDecayed) { int infSharpEdgeCount = 0; int semiSharpEdgeCount = 0; bool cVertEdgesPresent = (_child->getNumVertexEdgesTotal() > 0); if (cVertEdgesPresent) { ConstIndexArray cEdges = _child->getVertexEdges(cVert); for (int i = 0; i < cEdges.size(); ++i) { Level::ETag cEdgeTag = _child->_edgeTags[cEdges[i]]; infSharpEdgeCount += cEdgeTag._infSharp; semiSharpEdgeCount += cEdgeTag._semiSharp; } } else { ConstIndexArray pEdges = _parent->getVertexEdges(pVert); ConstLocalIndexArray pVertInEdge = _parent->getVertexEdgeLocalIndices(pVert); for (int i = 0; i < pEdges.size(); ++i) { ConstIndexArray cEdgePair = getEdgeChildEdges(pEdges[i]); Index cEdge = cEdgePair[pVertInEdge[i]]; Level::ETag cEdgeTag = _child->_edgeTags[cEdge]; infSharpEdgeCount += cEdgeTag._infSharp; semiSharpEdgeCount += cEdgeTag._semiSharp; } } cVertTag._semiSharpEdges = (semiSharpEdgeCount > 0); if (!cVertTag._semiSharp && !cVertTag._infSharp) { cVertTag._rule = (VTagSize)(creasing.DetermineVertexVertexRule(0.0, infSharpEdgeCount + semiSharpEdgeCount)); } } } }
O3
cpp
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::reclassifySemisharpVertices(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movl 0x18(%rdi), %eax movl %eax, 0x4(%rsp) movslq 0x38(%rdi), %r15 testq %r15, %r15 jle 0x4c5bc movslq 0x50(%rbx), %r12 addq %r12, %r15 leaq 0x4(%rsp), %r14 movl $0x80, %ebp movq 0x10(%rbx), %rcx movq 0x1b0(%rcx), %r13 movzwl (%r13,%r12,2), %eax testb $0x40, %al je 0x4c5b0 movq 0xc0(%rbx), %rdx movq 0x138(%rbx), %rsi movslq (%rsi,%r12,4), %rsi addq %rsi, %rsi movq 0x180(%rbx), %rdi testb $0x1, (%rdi,%r12) jne 0x4c549 movslq (%rdx,%rsi,4), %rdi movq 0xf0(%rcx), %rcx movzbl (%rcx,%rdi), %edi movslq 0x4(%rdx,%rsi,4), %rdx movzbl (%rcx,%rdx), %esi shrl $0x3, %esi andl $0x1, %esi btl $0x3, %edi adcl $0x0, %esi xorl %ecx, %ecx testb %sil, %sil setne %cl shll $0x6, %ecx andl $-0x41, %eax orl %ecx, %eax movw %ax, (%r13,%r12,2) xorps %xmm0, %xmm0 movq %r14, %rdi callq 0x3b290 movzwl (%r13,%r12,2), %ecx andl $0xf, %eax shll $0x7, %eax andl $0xfffff87f, %ecx # imm = 0xFFFFF87F jmp 0x4c5a8 movslq (%rdx,%rsi,4), %rdi cmpq $-0x1, %rdi je 0x4c561 movq 0xf0(%rcx), %r8 testb $0x8, (%r8,%rdi) jne 0x4c58b movslq 0x4(%rdx,%rsi,4), %rdx cmpq $-0x1, %rdx je 0x4c595 movq 0xf0(%rcx), %rcx movb (%rcx,%rdx), %cl shlb $0x3, %cl andb $0x40, %cl movzbl %cl, %ecx testb %cl, %cl movl $0x200, %edx # imm = 0x200 cmovel %ebp, %edx jmp 0x4c59b movw $0x200, %dx # imm = 0x200 movw $0x40, %cx jmp 0x4c59b xorl %ecx, %ecx movw $0x80, %dx andl $0xfffff83f, %eax # imm = 0xFFFFF83F movzwl %cx, %esi movzwl %dx, %ecx orl %esi, %ecx orl %eax, %ecx movw %cx, (%r13,%r12,2) incq %r12 cmpq %r15, %r12 jl 0x4c4b3 movslq 0x3c(%rbx), %r15 testq %r15, %r15 jle 0x4c757 movslq 0x54(%rbx), %r12 addq %r12, %r15 movq 0x8(%rbx), %rcx movq 0x138(%rbx), %rax movslq (%rax,%r12,4), %rsi movq 0x1b0(%rcx), %rax movzwl (%rax,%rsi,2), %edi testb $0x60, %dil je 0x4c74b movq 0x10(%rbx), %rdx movq 0x1b0(%rdx), %r13 movzwl (%r13,%r12,2), %eax testb $0x20, %al sete %r8b testb $0x40, %dil jne 0x4c61e shrb $0x5, %dil andb %r8b, %dil je 0x4c74b movq 0x168(%rdx), %r8 movq 0x170(%rdx), %rdi subq %r8, %rdi shrq $0x2, %rdi testl %edi, %edi jle 0x4c685 movq 0x150(%rdx), %rcx movslq (%rcx,%r12,8), %rdi testq %rdi, %rdi jle 0x4c708 movslq 0x4(%rcx,%r12,8), %rcx leaq (%r8,%rcx,4), %r8 movq 0xf0(%rdx), %rdx xorl %r9d, %r9d xorl %esi, %esi xorl %ecx, %ecx movslq (%r8,%r9,4), %r10 movzbl (%rdx,%r10), %r10d btl $0x2, %r10d adcl $0x0, %esi btl $0x3, %r10d adcl $0x0, %ecx incq %r9 cmpq %r9, %rdi jne 0x4c662 jmp 0x4c6fc leaq (%rsi,%rsi), %rdi movq 0x150(%rcx), %r8 movslq %edi, %rdi movslq (%r8,%rdi,4), %rdi testq %rdi, %rdi jle 0x4c708 movslq 0x4(%r8,%rsi,8), %r8 leaq (,%r8,4), %r9 addq 0x168(%rcx), %r9 addq %r8, %r8 addq 0x180(%rcx), %r8 movq 0xc0(%rbx), %r10 movq 0xf0(%rdx), %rdx xorl %r11d, %r11d xorl %esi, %esi xorl %ecx, %ecx movslq (%r9,%r11,4), %rbp leaq (%r10,%rbp,8), %rbp movzwl (%r8,%r11,2), %r14d movslq (%rbp,%r14,4), %r14 movzbl (%rdx,%r14), %ebp btl $0x2, %ebp adcl $0x0, %esi btl $0x3, %ebp adcl $0x0, %ecx incq %r11 cmpq %r11, %rdi jne 0x4c6cf xorl %edx, %edx testl %ecx, %ecx setg %dl shll $0x6, %edx jmp 0x4c70e xorl %esi, %esi xorl %ecx, %ecx xorl %edx, %edx movl %eax, %edi andl $-0x41, %edi movzwl %dx, %edx orl %edi, %edx movw %dx, (%r13,%r12,2) testb $0x30, %al jne 0x4c74b addl %ecx, %esi xorps %xmm0, %xmm0 leaq 0x4(%rsp), %rdi callq 0x3b290 movzwl (%r13,%r12,2), %ecx andl $0xf, %eax shll $0x7, %eax andl $0xfffff87f, %ecx # imm = 0xFFFFF87F orl %eax, %ecx movw %cx, (%r13,%r12,2) incq %r12 cmpq %r15, %r12 jl 0x4c5d0 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement27reclassifySemisharpVerticesEv: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi mov eax, [rdi+18h] mov [rsp+38h+var_34], eax movsxd r15, dword ptr [rdi+38h] test r15, r15 jle loc_4C5BC movsxd r12, dword ptr [rbx+50h] add r15, r12 lea r14, [rsp+38h+var_34] mov ebp, 80h loc_4C4B3: mov rcx, [rbx+10h] mov r13, [rcx+1B0h] movzx eax, word ptr [r13+r12*2+0] test al, 40h jz loc_4C5B0 mov rdx, [rbx+0C0h] mov rsi, [rbx+138h] movsxd rsi, dword ptr [rsi+r12*4] add rsi, rsi mov rdi, [rbx+180h] test byte ptr [rdi+r12], 1 jnz short loc_4C549 movsxd rdi, dword ptr [rdx+rsi*4] mov rcx, [rcx+0F0h] movzx edi, byte ptr [rcx+rdi] movsxd rdx, dword ptr [rdx+rsi*4+4] movzx esi, byte ptr [rcx+rdx] shr esi, 3 and esi, 1 bt edi, 3 adc esi, 0; int xor ecx, ecx test sil, sil setnz cl shl ecx, 6 and eax, 0FFFFFFBFh or eax, ecx mov [r13+r12*2+0], ax xorps xmm0, xmm0; float mov rdi, r14; this call __ZNK10OpenSubdiv6v3_6_03Sdc6Crease25DetermineVertexVertexRuleEfi; OpenSubdiv::v3_6_0::Sdc::Crease::DetermineVertexVertexRule(float,int) movzx ecx, word ptr [r13+r12*2+0] and eax, 0Fh shl eax, 7 and ecx, 0FFFFF87Fh jmp short loc_4C5A8 loc_4C549: movsxd rdi, dword ptr [rdx+rsi*4] cmp rdi, 0FFFFFFFFFFFFFFFFh jz short loc_4C561 mov r8, [rcx+0F0h] test byte ptr [r8+rdi], 8 jnz short loc_4C58B loc_4C561: movsxd rdx, dword ptr [rdx+rsi*4+4] cmp rdx, 0FFFFFFFFFFFFFFFFh jz short loc_4C595 mov rcx, [rcx+0F0h] mov cl, [rcx+rdx] shl cl, 3 and cl, 40h movzx ecx, cl test cl, cl mov edx, 200h cmovz edx, ebp jmp short loc_4C59B loc_4C58B: mov dx, 200h mov cx, 40h ; '@' jmp short loc_4C59B loc_4C595: xor ecx, ecx mov dx, 80h loc_4C59B: and eax, 0FFFFF83Fh movzx esi, cx movzx ecx, dx or ecx, esi loc_4C5A8: or ecx, eax mov [r13+r12*2+0], cx loc_4C5B0: inc r12 cmp r12, r15 jl loc_4C4B3 loc_4C5BC: movsxd r15, dword ptr [rbx+3Ch] test r15, r15 jle loc_4C757 movsxd r12, dword ptr [rbx+54h] add r15, r12 loc_4C5D0: mov rcx, [rbx+8] mov rax, [rbx+138h] movsxd rsi, dword ptr [rax+r12*4] mov rax, [rcx+1B0h] movzx edi, word ptr [rax+rsi*2] test dil, 60h jz loc_4C74B mov rdx, [rbx+10h] mov r13, [rdx+1B0h] movzx eax, word ptr [r13+r12*2+0] test al, 20h setz r8b test dil, 40h jnz short loc_4C61E shr dil, 5 and dil, r8b jz loc_4C74B loc_4C61E: mov r8, [rdx+168h] mov rdi, [rdx+170h] sub rdi, r8 shr rdi, 2 test edi, edi jle short loc_4C685 mov rcx, [rdx+150h] movsxd rdi, dword ptr [rcx+r12*8] test rdi, rdi jle loc_4C708 movsxd rcx, dword ptr [rcx+r12*8+4] lea r8, [r8+rcx*4] mov rdx, [rdx+0F0h] xor r9d, r9d xor esi, esi xor ecx, ecx loc_4C662: movsxd r10, dword ptr [r8+r9*4] movzx r10d, byte ptr [rdx+r10] bt r10d, 2 adc esi, 0 bt r10d, 3 adc ecx, 0 inc r9 cmp rdi, r9 jnz short loc_4C662 jmp short loc_4C6FC loc_4C685: lea rdi, [rsi+rsi] mov r8, [rcx+150h] movsxd rdi, edi movsxd rdi, dword ptr [r8+rdi*4] test rdi, rdi jle short loc_4C708 movsxd r8, dword ptr [r8+rsi*8+4] lea r9, ds:0[r8*4] add r9, [rcx+168h] add r8, r8 add r8, [rcx+180h] mov r10, [rbx+0C0h] mov rdx, [rdx+0F0h] xor r11d, r11d xor esi, esi xor ecx, ecx loc_4C6CF: movsxd rbp, dword ptr [r9+r11*4] lea rbp, [r10+rbp*8] movzx r14d, word ptr [r8+r11*2] movsxd r14, dword ptr [rbp+r14*4+0] movzx ebp, byte ptr [rdx+r14] bt ebp, 2 adc esi, 0 bt ebp, 3 adc ecx, 0 inc r11 cmp rdi, r11 jnz short loc_4C6CF loc_4C6FC: xor edx, edx test ecx, ecx setnle dl shl edx, 6 jmp short loc_4C70E loc_4C708: xor esi, esi xor ecx, ecx xor edx, edx loc_4C70E: mov edi, eax and edi, 0FFFFFFBFh movzx edx, dx or edx, edi mov [r13+r12*2+0], dx test al, 30h jnz short loc_4C74B add esi, ecx; int xorps xmm0, xmm0; float lea rdi, [rsp+38h+var_34]; this call __ZNK10OpenSubdiv6v3_6_03Sdc6Crease25DetermineVertexVertexRuleEfi; OpenSubdiv::v3_6_0::Sdc::Crease::DetermineVertexVertexRule(float,int) movzx ecx, word ptr [r13+r12*2+0] and eax, 0Fh shl eax, 7 and ecx, 0FFFFF87Fh or ecx, eax mov [r13+r12*2+0], cx loc_4C74B: inc r12 cmp r12, r15 jl loc_4C5D0 loc_4C757: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long OpenSubdiv::v3_6_0::Vtr::internal::Refinement::reclassifySemisharpVertices( OpenSubdiv::v3_6_0::Vtr::internal::Refinement *this) { long long v1; // rax long long result; // rax long long v4; // r15 long long v5; // r12 long long v6; // r15 long long v7; // rcx long long v8; // r13 long long v9; // rdx long long v10; // rcx char v11; // di long long v12; // rdx int v13; // esi __int16 v14; // cx long long v15; // rdi long long v16; // rdx __int16 v17; // cx __int16 v18; // dx long long v19; // r15 long long v20; // r12 long long v21; // r15 _QWORD *v22; // rcx long long v23; // rsi __int16 v24; // di _QWORD *v25; // rdx long long v26; // r13 long long v27; // r8 long long v28; // rcx long long v29; // rdi long long v30; // r8 long long v31; // rdx long long v32; // r9 int v33; // esi int v34; // ecx char v35; // r10 long long v36; // r8 long long v37; // rdi long long v38; // r8 long long v39; // r9 long long v40; // r8 long long v41; // rdx long long v42; // r11 char v43; // bp __int16 v44; // dx _DWORD v45[13]; // [rsp+0h] [rbp-34h] BYREF v45[0] = HIDWORD(v1); result = *((unsigned int *)this + 6); v45[0] = *((_DWORD *)this + 6); v4 = *((int *)this + 14); if ( v4 > 0 ) { v5 = *((int *)this + 20); v6 = v5 + v4; do { v7 = *((_QWORD *)this + 2); v8 = *(_QWORD *)(v7 + 432); result = *(unsigned __int16 *)(v8 + 2 * v5); if ( (result & 0x40) != 0 ) { v9 = *((_QWORD *)this + 24); if ( (*(_BYTE *)(*((_QWORD *)this + 48) + v5) & 1) != 0 ) { v15 = *(int *)(v9 + 8LL * *(int *)(*((_QWORD *)this + 39) + 4 * v5)); if ( v15 != -1 && (*(_BYTE *)(*(_QWORD *)(v7 + 240) + v15) & 8) != 0 ) { v18 = 512; v17 = 64; } else { v16 = *(int *)(v9 + 8LL * *(int *)(*((_QWORD *)this + 39) + 4 * v5) + 4); if ( v16 == -1 ) { v17 = 0; v18 = 128; } else { v17 = (8 * *(_BYTE *)(*(_QWORD *)(v7 + 240) + v16)) & 0x40; v18 = 512; if ( !(_BYTE)v17 ) v18 = 128; } } result = (unsigned int)result & 0xFFFFF83F; v14 = v17 | v18; } else { v10 = *(_QWORD *)(v7 + 240); v11 = *(_BYTE *)(v10 + *(int *)(v9 + 8LL * *(int *)(*((_QWORD *)this + 39) + 4 * v5))); v12 = *(int *)(v9 + 8LL * *(int *)(*((_QWORD *)this + 39) + 4 * v5) + 4); v13 = ((v11 & 8) != 0) + ((*(unsigned __int8 *)(v10 + v12) >> 3) & 1); *(_WORD *)(v8 + 2 * v5) = ((((v11 & 8) != 0) + ((*(_BYTE *)(v10 + v12) & 8) != 0) != 0) << 6) | result & 0xFFBF; result = (unsigned __int8)(OpenSubdiv::v3_6_0::Sdc::Crease::DetermineVertexVertexRule( (OpenSubdiv::v3_6_0::Sdc::Crease *)v45, 0.0, v13) & 0xF) << 7; v14 = *(_WORD *)(v8 + 2 * v5) & 0xF87F; } *(_WORD *)(v8 + 2 * v5) = result | v14; } ++v5; } while ( v5 < v6 ); } v19 = *((int *)this + 15); if ( v19 > 0 ) { v20 = *((int *)this + 21); v21 = v20 + v19; do { v22 = (_QWORD *)*((_QWORD *)this + 1); v23 = *(int *)(*((_QWORD *)this + 39) + 4 * v20); result = v22[54]; v24 = *(_WORD *)(result + 2 * v23); if ( (v24 & 0x60) == 0 ) goto LABEL_34; v25 = (_QWORD *)*((_QWORD *)this + 2); v26 = v25[54]; result = *(unsigned __int16 *)(v26 + 2 * v20); if ( (v24 & 0x40) == 0 && (((result & 0x20) == 0) & ((unsigned __int8)v24 >> 5)) == 0 ) goto LABEL_34; v27 = v25[45]; if ( (int)((unsigned long long)(v25[46] - v27) >> 2) <= 0 ) { v36 = v22[42]; v37 = *(int *)(v36 + 8LL * (_DWORD)v23); if ( v37 > 0 ) { v38 = *(int *)(v36 + 8 * v23 + 4); v39 = v22[45] + 4 * v38; v40 = v22[48] + 2 * v38; v41 = v25[30]; v42 = 0LL; v33 = 0; v34 = 0; do { v43 = *(_BYTE *)(v41 + *(int *)(*((_QWORD *)this + 24) + 8LL * *(int *)(v39 + 4 * v42) + 4LL * *(unsigned __int16 *)(v40 + 2 * v42))); v33 += (v43 & 4) != 0; v34 += (v43 & 8) != 0; ++v42; } while ( v37 != v42 ); goto LABEL_30; } } else { v28 = v25[42]; v29 = *(int *)(v28 + 8 * v20); if ( v29 > 0 ) { v30 = v27 + 4LL * *(int *)(v28 + 8 * v20 + 4); v31 = v25[30]; v32 = 0LL; v33 = 0; v34 = 0; do { v35 = *(_BYTE *)(v31 + *(int *)(v30 + 4 * v32)); v33 += (v35 & 4) != 0; v34 += (v35 & 8) != 0; ++v32; } while ( v29 != v32 ); LABEL_30: v44 = (v34 > 0) << 6; goto LABEL_32; } } v33 = 0; v34 = 0; v44 = 0; LABEL_32: *(_WORD *)(v26 + 2 * v20) = result & 0xFFBF | v44; if ( (result & 0x30) == 0 ) { result = (unsigned __int8)(OpenSubdiv::v3_6_0::Sdc::Crease::DetermineVertexVertexRule( (OpenSubdiv::v3_6_0::Sdc::Crease *)v45, 0.0, v34 + v33) & 0xF) << 7; *(_WORD *)(v26 + 2 * v20) = result | *(_WORD *)(v26 + 2 * v20) & 0xF87F; } LABEL_34: ++v20; } while ( v20 < v21 ); } return result; }
reclassifySemisharpVertices: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV EAX,dword ptr [RDI + 0x18] MOV dword ptr [RSP + 0x4],EAX MOVSXD R15,dword ptr [RDI + 0x38] TEST R15,R15 JLE 0x0014c5bc MOVSXD R12,dword ptr [RBX + 0x50] ADD R15,R12 LEA R14,[RSP + 0x4] MOV EBP,0x80 LAB_0014c4b3: MOV RCX,qword ptr [RBX + 0x10] MOV R13,qword ptr [RCX + 0x1b0] MOVZX EAX,word ptr [R13 + R12*0x2] TEST AL,0x40 JZ 0x0014c5b0 MOV RDX,qword ptr [RBX + 0xc0] MOV RSI,qword ptr [RBX + 0x138] MOVSXD RSI,dword ptr [RSI + R12*0x4] ADD RSI,RSI MOV RDI,qword ptr [RBX + 0x180] TEST byte ptr [RDI + R12*0x1],0x1 JNZ 0x0014c549 MOVSXD RDI,dword ptr [RDX + RSI*0x4] MOV RCX,qword ptr [RCX + 0xf0] MOVZX EDI,byte ptr [RCX + RDI*0x1] MOVSXD RDX,dword ptr [RDX + RSI*0x4 + 0x4] MOVZX ESI,byte ptr [RCX + RDX*0x1] SHR ESI,0x3 AND ESI,0x1 BT EDI,0x3 ADC ESI,0x0 XOR ECX,ECX TEST SIL,SIL SETNZ CL SHL ECX,0x6 AND EAX,0xffffffbf OR EAX,ECX MOV word ptr [R13 + R12*0x2],AX XORPS XMM0,XMM0 MOV RDI,R14 CALL 0x0013b290 MOVZX ECX,word ptr [R13 + R12*0x2] AND EAX,0xf SHL EAX,0x7 AND ECX,0xfffff87f JMP 0x0014c5a8 LAB_0014c549: MOVSXD RDI,dword ptr [RDX + RSI*0x4] CMP RDI,-0x1 JZ 0x0014c561 MOV R8,qword ptr [RCX + 0xf0] TEST byte ptr [R8 + RDI*0x1],0x8 JNZ 0x0014c58b LAB_0014c561: MOVSXD RDX,dword ptr [RDX + RSI*0x4 + 0x4] CMP RDX,-0x1 JZ 0x0014c595 MOV RCX,qword ptr [RCX + 0xf0] MOV CL,byte ptr [RCX + RDX*0x1] SHL CL,0x3 AND CL,0x40 MOVZX ECX,CL TEST CL,CL MOV EDX,0x200 CMOVZ EDX,EBP JMP 0x0014c59b LAB_0014c58b: MOV DX,0x200 MOV CX,0x40 JMP 0x0014c59b LAB_0014c595: XOR ECX,ECX MOV DX,0x80 LAB_0014c59b: AND EAX,0xfffff83f MOVZX ESI,CX MOVZX ECX,DX OR ECX,ESI LAB_0014c5a8: OR ECX,EAX MOV word ptr [R13 + R12*0x2],CX LAB_0014c5b0: INC R12 CMP R12,R15 JL 0x0014c4b3 LAB_0014c5bc: MOVSXD R15,dword ptr [RBX + 0x3c] TEST R15,R15 JLE 0x0014c757 MOVSXD R12,dword ptr [RBX + 0x54] ADD R15,R12 LAB_0014c5d0: MOV RCX,qword ptr [RBX + 0x8] MOV RAX,qword ptr [RBX + 0x138] MOVSXD RSI,dword ptr [RAX + R12*0x4] MOV RAX,qword ptr [RCX + 0x1b0] MOVZX EDI,word ptr [RAX + RSI*0x2] TEST DIL,0x60 JZ 0x0014c74b MOV RDX,qword ptr [RBX + 0x10] MOV R13,qword ptr [RDX + 0x1b0] MOVZX EAX,word ptr [R13 + R12*0x2] TEST AL,0x20 SETZ R8B TEST DIL,0x40 JNZ 0x0014c61e SHR DIL,0x5 AND DIL,R8B JZ 0x0014c74b LAB_0014c61e: MOV R8,qword ptr [RDX + 0x168] MOV RDI,qword ptr [RDX + 0x170] SUB RDI,R8 SHR RDI,0x2 TEST EDI,EDI JLE 0x0014c685 MOV RCX,qword ptr [RDX + 0x150] MOVSXD RDI,dword ptr [RCX + R12*0x8] TEST RDI,RDI JLE 0x0014c708 MOVSXD RCX,dword ptr [RCX + R12*0x8 + 0x4] LEA R8,[R8 + RCX*0x4] MOV RDX,qword ptr [RDX + 0xf0] XOR R9D,R9D XOR ESI,ESI XOR ECX,ECX LAB_0014c662: MOVSXD R10,dword ptr [R8 + R9*0x4] MOVZX R10D,byte ptr [RDX + R10*0x1] BT R10D,0x2 ADC ESI,0x0 BT R10D,0x3 ADC ECX,0x0 INC R9 CMP RDI,R9 JNZ 0x0014c662 JMP 0x0014c6fc LAB_0014c685: LEA RDI,[RSI + RSI*0x1] MOV R8,qword ptr [RCX + 0x150] MOVSXD RDI,EDI MOVSXD RDI,dword ptr [R8 + RDI*0x4] TEST RDI,RDI JLE 0x0014c708 MOVSXD R8,dword ptr [R8 + RSI*0x8 + 0x4] LEA R9,[R8*0x4] ADD R9,qword ptr [RCX + 0x168] ADD R8,R8 ADD R8,qword ptr [RCX + 0x180] MOV R10,qword ptr [RBX + 0xc0] MOV RDX,qword ptr [RDX + 0xf0] XOR R11D,R11D XOR ESI,ESI XOR ECX,ECX LAB_0014c6cf: MOVSXD RBP,dword ptr [R9 + R11*0x4] LEA RBP,[R10 + RBP*0x8] MOVZX R14D,word ptr [R8 + R11*0x2] MOVSXD R14,dword ptr [RBP + R14*0x4] MOVZX EBP,byte ptr [RDX + R14*0x1] BT EBP,0x2 ADC ESI,0x0 BT EBP,0x3 ADC ECX,0x0 INC R11 CMP RDI,R11 JNZ 0x0014c6cf LAB_0014c6fc: XOR EDX,EDX TEST ECX,ECX SETG DL SHL EDX,0x6 JMP 0x0014c70e LAB_0014c708: XOR ESI,ESI XOR ECX,ECX XOR EDX,EDX LAB_0014c70e: MOV EDI,EAX AND EDI,0xffffffbf MOVZX EDX,DX OR EDX,EDI MOV word ptr [R13 + R12*0x2],DX TEST AL,0x30 JNZ 0x0014c74b ADD ESI,ECX XORPS XMM0,XMM0 LEA RDI,[RSP + 0x4] CALL 0x0013b290 MOVZX ECX,word ptr [R13 + R12*0x2] AND EAX,0xf SHL EAX,0x7 AND ECX,0xfffff87f OR ECX,EAX MOV word ptr [R13 + R12*0x2],CX LAB_0014c74b: INC R12 CMP R12,R15 JL 0x0014c5d0 LAB_0014c757: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Vtr::internal::Refinement::reclassifySemisharpVertices() */ void __thiscall OpenSubdiv::v3_6_0::Vtr::internal::Refinement::reclassifySemisharpVertices(Refinement *this) { byte bVar1; long lVar2; uint uVar3; ushort uVar4; ushort uVar5; ushort uVar6; long lVar7; int iVar8; int iVar9; long lVar10; long lVar11; long lVar12; long lVar13; long lVar14; long lVar15; Crease local_34 [4]; if (0 < (long)*(int *)(this + 0x38)) { lVar14 = (long)*(int *)(this + 0x50); lVar15 = *(int *)(this + 0x38) + lVar14; do { lVar11 = *(long *)(this + 0x10); lVar2 = *(long *)(lVar11 + 0x1b0); uVar6 = *(ushort *)(lVar2 + lVar14 * 2); if ((uVar6 & 0x40) != 0) { lVar7 = *(long *)(this + 0xc0); lVar10 = (long)*(int *)(*(long *)(this + 0x138) + lVar14 * 4); if ((*(byte *)(*(long *)(this + 0x180) + lVar14) & 1) == 0) { iVar8 = (*(byte *)(*(long *)(lVar11 + 0xf0) + (long)*(int *)(lVar7 + 4 + lVar10 * 8)) >> 3 & 1) + (uint)((*(byte *)(*(long *)(lVar11 + 0xf0) + (long)*(int *)(lVar7 + lVar10 * 8)) >> 3 & 1) != 0); *(ushort *)(lVar2 + lVar14 * 2) = uVar6 & 0xffbf | (ushort)((char)iVar8 != '\0') << 6; uVar3 = Sdc::Crease::DetermineVertexVertexRule(local_34,0.0,iVar8); uVar6 = (ushort)((uVar3 & 0xf) << 7); uVar5 = *(ushort *)(lVar2 + lVar14 * 2) & 0xf87f; } else { lVar12 = (long)*(int *)(lVar7 + lVar10 * 8); if ((lVar12 == -1) || ((*(byte *)(*(long *)(lVar11 + 0xf0) + lVar12) & 8) == 0)) { lVar7 = (long)*(int *)(lVar7 + 4 + lVar10 * 8); if (lVar7 == -1) { uVar4 = 0; uVar5 = 0x80; } else { bVar1 = *(byte *)(*(long *)(lVar11 + 0xf0) + lVar7) & 8; uVar4 = (ushort)(byte)(bVar1 << 3); uVar5 = 0x200; if (bVar1 == 0) { uVar5 = 0x80; } } } else { uVar5 = 0x200; uVar4 = 0x40; } uVar6 = uVar6 & 0xf83f; uVar5 = uVar5 | uVar4; } *(ushort *)(lVar2 + lVar14 * 2) = uVar5 | uVar6; } lVar14 = lVar14 + 1; } while (lVar14 < lVar15); } if (0 < (long)*(int *)(this + 0x3c)) { lVar14 = (long)*(int *)(this + 0x54); lVar15 = *(int *)(this + 0x3c) + lVar14; do { lVar11 = *(long *)(this + 8); iVar8 = *(int *)(*(long *)(this + 0x138) + lVar14 * 4); uVar6 = *(ushort *)(*(long *)(lVar11 + 0x1b0) + (long)iVar8 * 2); if ((uVar6 & 0x60) != 0) { lVar2 = *(long *)(this + 0x10); lVar7 = *(long *)(lVar2 + 0x1b0); uVar4 = *(ushort *)(lVar7 + lVar14 * 2); if (((uVar6 & 0x40) != 0) || (((byte)uVar6 >> 5 & (uVar4 & 0x20) == 0) != 0)) { if ((int)((ulong)(*(long *)(lVar2 + 0x170) - *(long *)(lVar2 + 0x168)) >> 2) < 1) { lVar10 = (long)*(int *)(*(long *)(lVar11 + 0x150) + (long)(iVar8 * 2) * 4); if (0 < lVar10) { lVar12 = (long)*(int *)(*(long *)(lVar11 + 0x150) + 4 + (long)iVar8 * 8); lVar13 = 0; iVar9 = 0; iVar8 = 0; do { bVar1 = *(byte *)(*(long *)(lVar2 + 0xf0) + (long)*(int *)(*(long *)(this + 0xc0) + (long)*(int *)(lVar12 * 4 + *(long *)(lVar11 + 0x168) + lVar13 * 4) * 8 + (ulong)*(ushort *) (lVar12 * 2 + *(long *)(lVar11 + 0x180) + lVar13 * 2) * 4)); iVar9 = iVar9 + (uint)((bVar1 >> 2 & 1) != 0); iVar8 = iVar8 + (uint)((bVar1 >> 3 & 1) != 0); lVar13 = lVar13 + 1; } while (lVar10 != lVar13); goto LAB_0014c6fc; } LAB_0014c708: iVar9 = 0; iVar8 = 0; uVar6 = 0; } else { lVar11 = (long)*(int *)(*(long *)(lVar2 + 0x150) + lVar14 * 8); if (lVar11 < 1) goto LAB_0014c708; lVar10 = 0; iVar9 = 0; iVar8 = 0; do { bVar1 = *(byte *)(*(long *)(lVar2 + 0xf0) + (long)*(int *)(*(long *)(lVar2 + 0x168) + (long)*(int *)(*(long *)(lVar2 + 0x150) + 4 + lVar14 * 8) * 4 + lVar10 * 4)); iVar9 = iVar9 + (uint)((bVar1 >> 2 & 1) != 0); iVar8 = iVar8 + (uint)((bVar1 >> 3 & 1) != 0); lVar10 = lVar10 + 1; } while (lVar11 != lVar10); LAB_0014c6fc: uVar6 = (ushort)(0 < iVar8) << 6; } *(ushort *)(lVar7 + lVar14 * 2) = uVar6 | uVar4 & 0xffbf; if ((uVar4 & 0x30) == 0) { uVar3 = Sdc::Crease::DetermineVertexVertexRule(local_34,0.0,iVar9 + iVar8); *(ushort *)(lVar7 + lVar14 * 2) = *(ushort *)(lVar7 + lVar14 * 2) & 0xf87f | (ushort)((uVar3 & 0xf) << 7); } } } lVar14 = lVar14 + 1; } while (lVar14 < lVar15); } return; }
51,494
ftxui::TerminalInputParser::ParseMouse(bool, bool, std::vector<int, std::allocator<int>>)
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/component/terminal_input_parser.cpp
TerminalInputParser::Output TerminalInputParser::ParseMouse( // NOLINT bool altered, bool pressed, std::vector<int> arguments) { if (arguments.size() != 3) { return SPECIAL; } (void)altered; Output output(MOUSE); output.mouse.button = Mouse::Button((arguments[0] & 3) + // NOLINT ((arguments[0] & 64) >> 4)); // NOLINT output.mouse.motion = Mouse::Motion(pressed); // NOLINT output.mouse.shift = bool(arguments[0] & 4); // NOLINT output.mouse.meta = bool(arguments[0] & 8); // NOLINT output.mouse.x = arguments[1]; // NOLINT output.mouse.y = arguments[2]; // NOLINT return output; }
O2
cpp
ftxui::TerminalInputParser::ParseMouse(bool, bool, std::vector<int, std::allocator<int>>): movq %rdi, %rax movq (%r8), %rdx movq 0x8(%r8), %rsi subq %rdx, %rsi cmpq $0xc, %rsi jne 0x2b0a7 movl (%rdx), %esi movl %esi, %edi andl $0x3, %edi movl %esi, %r8d shrl $0x4, %r8d andl $0x4, %r8d orl %edi, %r8d movl %r8d, 0x4(%rax) movzbl %cl, %ecx movl %ecx, 0x8(%rax) movl %esi, %ecx shrb $0x2, %cl andb $0x1, %cl movb %cl, 0xc(%rax) shrb $0x3, %sil andb $0x1, %sil movb %sil, 0xd(%rax) movq 0x4(%rdx), %rcx movq %rcx, 0x10(%rax) pushq $0x4 jmp 0x2b0a9 pushq $0x3 popq %rcx movl %ecx, (%rax) retq nop
_ZN5ftxui19TerminalInputParser10ParseMouseEbbSt6vectorIiSaIiEE: mov rax, rdi mov rdx, [r8] mov rsi, [r8+8] sub rsi, rdx cmp rsi, 0Ch jnz short loc_2B0A7 mov esi, [rdx] mov edi, esi and edi, 3 mov r8d, esi shr r8d, 4 and r8d, 4 or r8d, edi mov [rax+4], r8d movzx ecx, cl mov [rax+8], ecx mov ecx, esi shr cl, 2 and cl, 1 mov [rax+0Ch], cl shr sil, 3 and sil, 1 mov [rax+0Dh], sil mov rcx, [rdx+4] mov [rax+10h], rcx push 4 jmp short loc_2B0A9 loc_2B0A7: push 3 loc_2B0A9: pop rcx mov [rax], ecx retn
long long ftxui::TerminalInputParser::ParseMouse( long long a1, long long a2, long long a3, unsigned __int8 a4, int **a5) { long long result; // rax int *v6; // rdx unsigned int v7; // esi int v8; // [rsp-8h] [rbp-8h] result = a1; v6 = *a5; if ( (char *)a5[1] - (char *)*a5 == 12 ) { v7 = *v6; *(_DWORD *)(a1 + 4) = *v6 & 3 | ((unsigned int)*v6 >> 4) & 4; *(_DWORD *)(a1 + 8) = a4; *(_BYTE *)(a1 + 12) = (v7 & 4) != 0; *(_BYTE *)(a1 + 13) = (v7 & 8) != 0; *(_QWORD *)(a1 + 16) = *(_QWORD *)(v6 + 1); v8 = 4; } else { v8 = 3; } *(_DWORD *)a1 = v8; return result; }
ParseMouse: MOV RAX,RDI MOV RDX,qword ptr [R8] MOV RSI,qword ptr [R8 + 0x8] SUB RSI,RDX CMP RSI,0xc JNZ 0x0012b0a7 MOV ESI,dword ptr [RDX] MOV EDI,ESI AND EDI,0x3 MOV R8D,ESI SHR R8D,0x4 AND R8D,0x4 OR R8D,EDI MOV dword ptr [RAX + 0x4],R8D MOVZX ECX,CL MOV dword ptr [RAX + 0x8],ECX MOV ECX,ESI SHR CL,0x2 AND CL,0x1 MOV byte ptr [RAX + 0xc],CL SHR SIL,0x3 AND SIL,0x1 MOV byte ptr [RAX + 0xd],SIL MOV RCX,qword ptr [RDX + 0x4] MOV qword ptr [RAX + 0x10],RCX PUSH 0x4 JMP 0x0012b0a9 LAB_0012b0a7: PUSH 0x3 LAB_0012b0a9: POP RCX MOV dword ptr [RAX],ECX RET
/* ftxui::TerminalInputParser::ParseMouse(bool, bool, std::vector<int, std::allocator<int> >) */ void ftxui::TerminalInputParser::ParseMouse (int4 *param_1,int8 param_2,int8 param_3,byte param_4, int8 *param_5) { uint uVar1; uint *puVar2; int4 uVar3; puVar2 = (uint *)*param_5; if (param_5[1] - (long)puVar2 == 0xc) { uVar1 = *puVar2; param_1[1] = uVar1 >> 4 & 4 | uVar1 & 3; param_1[2] = (uint)param_4; *(byte *)(param_1 + 3) = (byte)uVar1 >> 2 & 1; *(byte *)((long)param_1 + 0xd) = (byte)uVar1 >> 3 & 1; *(int8 *)(param_1 + 4) = *(int8 *)(puVar2 + 1); uVar3 = 4; } else { uVar3 = 3; } *param_1 = uVar3; return; }
51,495
get_date_field
bluesky950520[P]quickjs/quickjs.c
static JSValue get_date_field(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { // get_date_field(obj, n, is_local) double fields[9]; int res, n, is_local; is_local = magic & 0x0F; n = (magic >> 4) & 0x0F; res = get_date_fields(ctx, this_val, fields, is_local, 0); if (res < 0) return JS_EXCEPTION; if (!res) return JS_NAN; if (magic & 0x100) { // getYear fields[0] -= 1900; } return js_number(fields[n]); }
O0
c
get_date_field: subq $0x98, %rsp movq %rsi, 0x78(%rsp) movq %rdx, 0x80(%rsp) movq %rdi, 0x70(%rsp) movl %ecx, 0x6c(%rsp) movq %r8, 0x60(%rsp) movl %r9d, 0x5c(%rsp) movl 0x5c(%rsp), %eax andl $0xf, %eax movl %eax, 0x4(%rsp) movl 0x5c(%rsp), %eax sarl $0x4, %eax andl $0xf, %eax movl %eax, 0x8(%rsp) movq 0x70(%rsp), %rdi leaq 0x10(%rsp), %rcx movl 0x4(%rsp), %r8d movq 0x78(%rsp), %rsi movq 0x80(%rsp), %rdx xorl %r9d, %r9d callq 0x9f060 movl %eax, 0xc(%rsp) cmpl $0x0, 0xc(%rsp) jge 0x9e758 movl $0x0, 0x88(%rsp) movq $0x6, 0x90(%rsp) jmp 0x9e7c4 cmpl $0x0, 0xc(%rsp) jne 0x9e77e movsd 0x75309(%rip), %xmm0 # 0x113a70 movsd %xmm0, 0x88(%rsp) movq $0x7, 0x90(%rsp) jmp 0x9e7c4 movl 0x5c(%rsp), %eax andl $0x100, %eax # imm = 0x100 cmpl $0x0, %eax je 0x9e7a4 movsd 0x10(%rsp), %xmm0 movsd 0x752e6(%rip), %xmm1 # 0x113a80 subsd %xmm1, %xmm0 movsd %xmm0, 0x10(%rsp) movslq 0x8(%rsp), %rax movsd 0x10(%rsp,%rax,8), %xmm0 callq 0x27920 movq %rax, 0x88(%rsp) movq %rdx, 0x90(%rsp) movq 0x88(%rsp), %rax movq 0x90(%rsp), %rdx addq $0x98, %rsp retq nopl (%rax)
get_date_field: sub rsp, 98h mov [rsp+98h+var_20], rsi mov [rsp+98h+var_18], rdx mov [rsp+98h+var_28], rdi mov [rsp+98h+var_2C], ecx mov [rsp+98h+var_38], r8 mov [rsp+98h+var_3C], r9d mov eax, [rsp+98h+var_3C] and eax, 0Fh mov [rsp+98h+var_94], eax mov eax, [rsp+98h+var_3C] sar eax, 4 and eax, 0Fh mov [rsp+98h+var_90], eax mov rdi, [rsp+98h+var_28] lea rcx, [rsp+98h+var_88] mov r8d, [rsp+98h+var_94] mov rsi, [rsp+98h+var_20] mov rdx, [rsp+98h+var_18] xor r9d, r9d call get_date_fields mov [rsp+98h+var_8C], eax cmp [rsp+98h+var_8C], 0 jge short loc_9E758 mov dword ptr [rsp+98h+var_10], 0 mov [rsp+98h+var_8], 6 jmp short loc_9E7C4 loc_9E758: cmp [rsp+98h+var_8C], 0 jnz short loc_9E77E movsd xmm0, cs:qword_113A70 movsd [rsp+98h+var_10], xmm0 mov [rsp+98h+var_8], 7 jmp short loc_9E7C4 loc_9E77E: mov eax, [rsp+98h+var_3C] and eax, 100h cmp eax, 0 jz short loc_9E7A4 movsd xmm0, [rsp+98h+var_88] movsd xmm1, cs:qword_113A80 subsd xmm0, xmm1 movsd [rsp+98h+var_88], xmm0 loc_9E7A4: movsxd rax, [rsp+98h+var_90] movsd xmm0, [rsp+rax*8+98h+var_88] call js_number mov [rsp+98h+var_10], rax mov [rsp+98h+var_8], rdx loc_9E7C4: mov rax, [rsp+98h+var_10] mov rdx, [rsp+98h+var_8] add rsp, 98h retn
long long get_date_field(long long a1, long long a2, long long a3, int a4, long long a5, int a6) { long long v6; // rdx int v8; // [rsp+8h] [rbp-90h] int date_fields; // [rsp+Ch] [rbp-8Ch] double v10[9]; // [rsp+10h] [rbp-88h] BYREF int v11; // [rsp+5Ch] [rbp-3Ch] long long v12; // [rsp+60h] [rbp-38h] int v13; // [rsp+6Ch] [rbp-2Ch] long long v14; // [rsp+70h] [rbp-28h] long long v15; // [rsp+78h] [rbp-20h] long long v16; // [rsp+80h] [rbp-18h] long long v17; // [rsp+88h] [rbp-10h] long long v18; // [rsp+90h] [rbp-8h] v15 = a2; v16 = a3; v14 = a1; v13 = a4; v12 = a5; v11 = a6; v8 = (a6 >> 4) & 0xF; date_fields = get_date_fields(a1, a2, a3, v10, a6 & 0xF, 0LL); if ( date_fields >= 0 ) { if ( date_fields ) { if ( (v11 & 0x100) != 0 ) v10[0] = v10[0] - 1900.0; v17 = js_number(v10[v8]); v18 = v6; } else { v17 = 0x7FF8000000000000LL; v18 = 7LL; } } else { LODWORD(v17) = 0; v18 = 6LL; } return v17; }
get_date_field: SUB RSP,0x98 MOV qword ptr [RSP + 0x78],RSI MOV qword ptr [RSP + 0x80],RDX MOV qword ptr [RSP + 0x70],RDI MOV dword ptr [RSP + 0x6c],ECX MOV qword ptr [RSP + 0x60],R8 MOV dword ptr [RSP + 0x5c],R9D MOV EAX,dword ptr [RSP + 0x5c] AND EAX,0xf MOV dword ptr [RSP + 0x4],EAX MOV EAX,dword ptr [RSP + 0x5c] SAR EAX,0x4 AND EAX,0xf MOV dword ptr [RSP + 0x8],EAX MOV RDI,qword ptr [RSP + 0x70] LEA RCX,[RSP + 0x10] MOV R8D,dword ptr [RSP + 0x4] MOV RSI,qword ptr [RSP + 0x78] MOV RDX,qword ptr [RSP + 0x80] XOR R9D,R9D CALL 0x0019f060 MOV dword ptr [RSP + 0xc],EAX CMP dword ptr [RSP + 0xc],0x0 JGE 0x0019e758 MOV dword ptr [RSP + 0x88],0x0 MOV qword ptr [RSP + 0x90],0x6 JMP 0x0019e7c4 LAB_0019e758: CMP dword ptr [RSP + 0xc],0x0 JNZ 0x0019e77e MOVSD XMM0,qword ptr [0x00213a70] MOVSD qword ptr [RSP + 0x88],XMM0 MOV qword ptr [RSP + 0x90],0x7 JMP 0x0019e7c4 LAB_0019e77e: MOV EAX,dword ptr [RSP + 0x5c] AND EAX,0x100 CMP EAX,0x0 JZ 0x0019e7a4 MOVSD XMM0,qword ptr [RSP + 0x10] MOVSD XMM1,qword ptr [0x00213a80] SUBSD XMM0,XMM1 MOVSD qword ptr [RSP + 0x10],XMM0 LAB_0019e7a4: MOVSXD RAX,dword ptr [RSP + 0x8] MOVSD XMM0,qword ptr [RSP + RAX*0x8 + 0x10] CALL 0x00127920 MOV qword ptr [RSP + 0x88],RAX MOV qword ptr [RSP + 0x90],RDX LAB_0019e7c4: MOV RAX,qword ptr [RSP + 0x88] MOV RDX,qword ptr [RSP + 0x90] ADD RSP,0x98 RET
int1 [16] get_date_field(int8 param_1,int8 param_2,int8 param_3,int4 param_4, int8 param_5,uint param_6) { int iVar1; int1 auVar2 [16]; double local_88 [9]; uint local_3c; int8 local_38; int4 local_2c; int8 local_28; int8 local_20; int8 local_18; int4 local_10; int4 uStack_c; int8 local_8; local_3c = param_6; local_38 = param_5; local_2c = param_4; local_28 = param_1; local_20 = param_2; local_18 = param_3; iVar1 = get_date_fields(param_1,param_2,param_3,local_88,param_6 & 0xf,0); if (iVar1 < 0) { local_10 = 0; local_8 = 6; } else if (iVar1 == 0) { local_10 = (int4)DAT_00213a70; uStack_c = (int4)((ulong)DAT_00213a70 >> 0x20); local_8 = 7; } else { if ((local_3c & 0x100) != 0) { local_88[0] = local_88[0] - DAT_00213a80; } auVar2 = js_number(local_88[(int)((int)param_6 >> 4 & 0xf)]); local_8 = auVar2._8_8_; local_10 = auVar2._0_4_; uStack_c = auVar2._4_4_; } auVar2._4_4_ = uStack_c; auVar2._0_4_ = local_10; auVar2._8_8_ = local_8; return auVar2; }
51,496
mysql_send_query_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_send_query_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_send_query, (parms->mysql, parms->q, parms->length), parms->mysql, int, r_int) }
O0
c
mysql_send_query_start_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rax movq 0x8(%rax), %rsi movq -0x10(%rbp), %rax movq 0x10(%rax), %rdx callq 0x261a0 movl %eax, -0x14(%rbp) movl -0x14(%rbp), %ecx movq -0x20(%rbp), %rax movl %ecx, 0x8(%rax) movq -0x20(%rbp), %rax movl $0x0, (%rax) addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mysql_send_query_start_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax] mov rax, [rbp+var_10] mov rsi, [rax+8] mov rax, [rbp+var_10] mov rdx, [rax+10h] call mysql_send_query mov [rbp+var_14], eax mov ecx, [rbp+var_14] mov rax, [rbp+var_20] mov [rax+8], ecx mov rax, [rbp+var_20] mov dword ptr [rax], 0 add rsp, 20h pop rbp retn
_DWORD * mysql_send_query_start_internal(long long *a1) { _DWORD *result; // rax _DWORD *v2; // [rsp+0h] [rbp-20h] v2 = *(_DWORD **)(*(_QWORD *)(*a1 + 1152) + 40LL); v2[2] = mysql_send_query(*a1, a1[1], a1[2]); result = v2; *v2 = 0; return result; }
mysql_send_query_start_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x10] CALL 0x001261a0 MOV dword ptr [RBP + -0x14],EAX MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x0 ADD RSP,0x20 POP RBP RET
void mysql_send_query_start_internal(long *param_1) { int4 *puVar1; int4 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_send_query(*param_1,param_1[1],param_1[2]); puVar1[2] = uVar2; *puVar1 = 0; return; }
51,497
my_b_cache_write_r
eloqsql/mysys/mf_iocache.c
static int _my_b_cache_write_r(IO_CACHE *info, const uchar *Buffer, size_t Count) { my_off_t old_pos_in_file= info->pos_in_file; int res= _my_b_cache_write(info, Buffer, Count); if (res) return res; DBUG_ASSERT(!(info->myflags & MY_ENCRYPT)); DBUG_ASSERT(info->share); copy_to_read_buffer(info, Buffer, old_pos_in_file); return 0; }
O0
c
my_b_cache_write_r: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x71140 movl %eax, -0x2c(%rbp) cmpl $0x0, -0x2c(%rbp) je 0x6fc71 movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x6fc91 jmp 0x6fc73 jmp 0x6fc75 jmp 0x6fc77 jmp 0x6fc79 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0x71700 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
_my_b_cache_write_r: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_28], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call _my_b_cache_write mov [rbp+var_2C], eax cmp [rbp+var_2C], 0 jz short loc_6FC71 mov eax, [rbp+var_2C] mov [rbp+var_4], eax jmp short loc_6FC91 loc_6FC71: jmp short $+2 loc_6FC73: jmp short $+2 loc_6FC75: jmp short $+2 loc_6FC77: jmp short $+2 loc_6FC79: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_28] call copy_to_read_buffer mov [rbp+var_4], 0 loc_6FC91: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long my_b_cache_write_r(long long *a1, long long a2, long long a3) { unsigned int v4; // [rsp+4h] [rbp-2Ch] long long v5; // [rsp+8h] [rbp-28h] v5 = *a1; v4 = my_b_cache_write(a1, a2, a3); if ( v4 ) { return v4; } else { copy_to_read_buffer(a1, a2, v5); return 0; } }
_my_b_cache_write_r: 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 RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x00171140 MOV dword ptr [RBP + -0x2c],EAX CMP dword ptr [RBP + -0x2c],0x0 JZ 0x0016fc71 MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x4],EAX JMP 0x0016fc91 LAB_0016fc71: JMP 0x0016fc73 LAB_0016fc73: JMP 0x0016fc75 LAB_0016fc75: JMP 0x0016fc77 LAB_0016fc77: JMP 0x0016fc79 LAB_0016fc79: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x28] CALL 0x00171700 MOV dword ptr [RBP + -0x4],0x0 LAB_0016fc91: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int _my_b_cache_write_r(int8 *param_1,int8 param_2,int8 param_3) { int8 uVar1; int4 local_c; uVar1 = *param_1; local_c = _my_b_cache_write(param_1,param_2,param_3); if (local_c == 0) { copy_to_read_buffer(param_1,param_2,uVar1); local_c = 0; } return local_c; }
51,498
mthd_stmt_flush_unbuffered
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
void mthd_stmt_flush_unbuffered(MYSQL_STMT *stmt) { ulong packet_len; int in_resultset= stmt->state > MYSQL_STMT_EXECUTED && stmt->state < MYSQL_STMT_FETCH_DONE; while ((packet_len = ma_net_safe_read(stmt->mysql)) != packet_error) { uchar *pos= stmt->mysql->net.read_pos; if (!in_resultset && *pos == 0) /* OK */ { pos++; net_field_length(&pos); net_field_length(&pos); stmt->mysql->server_status= uint2korr(pos); goto end; } if (packet_len < 8 && *pos == 254) /* EOF */ { if (mariadb_connection(stmt->mysql)) { stmt->mysql->server_status= uint2korr(pos + 3); if (in_resultset) goto end; in_resultset= 1; } else goto end; } } end: stmt->state= MYSQL_STMT_FETCH_DONE; }
O3
c
mthd_stmt_flush_unbuffered: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movl 0x50(%rdi), %r12d movq 0x38(%rdi), %rdi callq 0x19e07 movl $0xffffffff, %r14d # imm = 0xFFFFFFFF cmpq %r14, %rax je 0x230b6 addl $-0x3, %r12d xorl %r15d, %r15d cmpl $0x3, %r12d setb %r15b movq 0x38(%rbx), %rdi movq 0x20(%rdi), %r12 testl %r15d, %r15d jne 0x2304b cmpb $0x0, (%r12) je 0x2308c cmpq $0x7, %rax ja 0x23080 cmpb $-0x2, (%r12) jne 0x23080 callq 0x1a1a3 testb %al, %al je 0x230b6 movzwl 0x3(%r12), %eax movq 0x38(%rbx), %rcx movl %eax, 0x380(%rcx) testl %r15d, %r15d jne 0x230b6 movq 0x38(%rbx), %rdi movl $0x1, %r15d callq 0x19e07 cmpq %r14, %rax jne 0x23037 jmp 0x230b6 incq %r12 leaq -0x28(%rbp), %r14 movq %r12, (%r14) movq %r14, %rdi callq 0x1a1e5 movq %r14, %rdi callq 0x1a1e5 movq (%r14), %rax movzwl (%rax), %eax movq 0x38(%rbx), %rcx movl %eax, 0x380(%rcx) movl $0x6, 0x50(%rbx) addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
mthd_stmt_flush_unbuffered: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 10h mov rbx, rdi mov r12d, [rdi+50h] mov rdi, [rdi+38h] call ma_net_safe_read mov r14d, 0FFFFFFFFh cmp rax, r14 jz loc_230B6 add r12d, 0FFFFFFFDh xor r15d, r15d cmp r12d, 3 setb r15b loc_23037: mov rdi, [rbx+38h] mov r12, [rdi+20h] test r15d, r15d jnz short loc_2304B cmp byte ptr [r12], 0 jz short loc_2308C loc_2304B: cmp rax, 7 ja short loc_23080 cmp byte ptr [r12], 0FEh jnz short loc_23080 call mariadb_connection test al, al jz short loc_230B6 movzx eax, word ptr [r12+3] mov rcx, [rbx+38h] mov [rcx+380h], eax test r15d, r15d jnz short loc_230B6 mov rdi, [rbx+38h] mov r15d, 1 loc_23080: call ma_net_safe_read cmp rax, r14 jnz short loc_23037 jmp short loc_230B6 loc_2308C: inc r12 lea r14, [rbp+var_28] mov [r14], r12 mov rdi, r14 call net_field_length mov rdi, r14 call net_field_length mov rax, [r14] movzx eax, word ptr [rax] mov rcx, [rbx+38h] mov [rcx+380h], eax loc_230B6: mov dword ptr [rbx+50h], 6 add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn
char mthd_stmt_flush_unbuffered(long long a1, long long a2, long long a3, long long a4, unsigned long long a5, int a6) { int v7; // r12d unsigned long long v8; // rax long long v9; // rdx long long v10; // rcx unsigned long long v11; // r8 int v12; // r9d BOOL v13; // r15d long long v14; // rdi long long v15; // r12 unsigned __int8 *v17[5]; // [rsp+8h] [rbp-28h] BYREF v7 = *(_DWORD *)(a1 + 80); v8 = ma_net_safe_read(*(_QWORD *)(a1 + 56), a2, a3, a4, a5, a6); if ( v8 != 0xFFFFFFFF ) { v13 = (unsigned int)(v7 - 3) < 3; while ( 1 ) { v14 = *(_QWORD *)(a1 + 56); v15 = *(_QWORD *)(v14 + 32); if ( !v13 && !*(_BYTE *)v15 ) break; if ( v8 <= 7 && *(_BYTE *)v15 == 0xFE ) { LOBYTE(v8) = mariadb_connection(v14); if ( !(_BYTE)v8 ) goto LABEL_13; LODWORD(v8) = *(unsigned __int16 *)(v15 + 3); v10 = *(_QWORD *)(a1 + 56); *(_DWORD *)(v10 + 896) = v8; if ( v13 ) goto LABEL_13; v14 = *(_QWORD *)(a1 + 56); v13 = 1; } v8 = ma_net_safe_read(v14, a2, v9, v10, v11, v12); if ( v8 == 0xFFFFFFFF ) goto LABEL_13; } v17[0] = (unsigned __int8 *)(v15 + 1); net_field_length(v17); net_field_length(v17); LODWORD(v8) = *(unsigned __int16 *)v17[0]; *(_DWORD *)(*(_QWORD *)(a1 + 56) + 896LL) = v8; } LABEL_13: *(_DWORD *)(a1 + 80) = 6; return v8; }
mthd_stmt_flush_unbuffered: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV RBX,RDI MOV R12D,dword ptr [RDI + 0x50] MOV RDI,qword ptr [RDI + 0x38] CALL 0x00119e07 MOV R14D,0xffffffff CMP RAX,R14 JZ 0x001230b6 ADD R12D,-0x3 XOR R15D,R15D CMP R12D,0x3 SETC R15B LAB_00123037: MOV RDI,qword ptr [RBX + 0x38] MOV R12,qword ptr [RDI + 0x20] TEST R15D,R15D JNZ 0x0012304b CMP byte ptr [R12],0x0 JZ 0x0012308c LAB_0012304b: CMP RAX,0x7 JA 0x00123080 CMP byte ptr [R12],0xfe JNZ 0x00123080 CALL 0x0011a1a3 TEST AL,AL JZ 0x001230b6 MOVZX EAX,word ptr [R12 + 0x3] MOV RCX,qword ptr [RBX + 0x38] MOV dword ptr [RCX + 0x380],EAX TEST R15D,R15D JNZ 0x001230b6 MOV RDI,qword ptr [RBX + 0x38] MOV R15D,0x1 LAB_00123080: CALL 0x00119e07 CMP RAX,R14 JNZ 0x00123037 JMP 0x001230b6 LAB_0012308c: INC R12 LEA R14,[RBP + -0x28] MOV qword ptr [R14],R12 MOV RDI,R14 CALL 0x0011a1e5 MOV RDI,R14 CALL 0x0011a1e5 MOV RAX,qword ptr [R14] MOVZX EAX,word ptr [RAX] MOV RCX,qword ptr [RBX + 0x38] MOV dword ptr [RCX + 0x380],EAX LAB_001230b6: MOV dword ptr [RBX + 0x50],0x6 ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET
void mthd_stmt_flush_unbuffered(long param_1) { int iVar1; char *pcVar2; char cVar3; ulong uVar4; long lVar5; bool bVar6; ushort *local_30; iVar1 = *(int *)(param_1 + 0x50); uVar4 = ma_net_safe_read(*(int8 *)(param_1 + 0x38)); if (uVar4 != 0xffffffff) { bVar6 = iVar1 - 3U < 3; while( true ) { lVar5 = *(long *)(param_1 + 0x38); pcVar2 = *(char **)(lVar5 + 0x20); if ((!bVar6) && (*pcVar2 == '\0')) break; if ((uVar4 < 8) && (*pcVar2 == -2)) { cVar3 = mariadb_connection(); if ((cVar3 == '\0') || (*(uint *)(*(long *)(param_1 + 0x38) + 0x380) = (uint)*(ushort *)(pcVar2 + 3), bVar6)) goto LAB_001230b6; lVar5 = *(long *)(param_1 + 0x38); bVar6 = true; } uVar4 = ma_net_safe_read(lVar5); if (uVar4 == 0xffffffff) goto LAB_001230b6; } local_30 = (ushort *)(pcVar2 + 1); net_field_length(&local_30); net_field_length(&local_30); *(uint *)(*(long *)(param_1 + 0x38) + 0x380) = (uint)*local_30; } LAB_001230b6: *(int4 *)(param_1 + 0x50) = 6; return; }
51,499
mi_unpack_index_tuple
eloqsql/storage/myisam/mi_key.c
static int mi_unpack_index_tuple(MI_INFO *info, uint keynr, uchar *record) { if (_mi_put_key_in_record(info, keynr, FALSE, record)) { /* Impossible case; Can only happen if bug in code */ mi_print_error(info->s, HA_ERR_CRASHED); info->lastpos= HA_OFFSET_ERROR; /* No active record */ my_errno= HA_ERR_CRASHED; return 1; } return 0; }
O3
c
mi_unpack_index_tuple: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdx, %rcx movq %rdi, %rbx xorl %r14d, %r14d xorl %edx, %edx callq 0x96646 testl %eax, %eax je 0x96b65 movq (%rbx), %rax movq 0x268(%rax), %rsi movl $0x7e, %edi callq 0x95dfa movq $-0x1, 0x170(%rbx) callq 0xc14ee movl $0x7e, (%rax) movl $0x1, %r14d movl %r14d, %eax popq %rbx popq %r14 popq %rbp retq
mi_unpack_index_tuple: push rbp mov rbp, rsp push r14 push rbx mov rcx, rdx mov rbx, rdi xor r14d, r14d xor edx, edx call _mi_put_key_in_record test eax, eax jz short loc_96B65 mov rax, [rbx] mov rsi, [rax+268h] mov edi, 7Eh ; '~' call mi_report_error mov qword ptr [rbx+170h], 0FFFFFFFFFFFFFFFFh call _my_thread_var mov dword ptr [rax], 7Eh ; '~' mov r14d, 1 loc_96B65: mov eax, r14d pop rbx pop r14 pop rbp retn
long long mi_unpack_index_tuple(_QWORD *a1, unsigned int a2, long long a3) { unsigned int v3; // r14d v3 = 0; if ( (unsigned int)mi_put_key_in_record((long long)a1, a2, 0, a3) ) { mi_report_error(126, *(_QWORD *)(*a1 + 616LL)); a1[46] = -1LL; *(_DWORD *)my_thread_var(126LL) = 126; return 1; } return v3; }
mi_unpack_index_tuple: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RCX,RDX MOV RBX,RDI XOR R14D,R14D XOR EDX,EDX CALL 0x00196646 TEST EAX,EAX JZ 0x00196b65 MOV RAX,qword ptr [RBX] MOV RSI,qword ptr [RAX + 0x268] MOV EDI,0x7e CALL 0x00195dfa MOV qword ptr [RBX + 0x170],-0x1 CALL 0x001c14ee MOV dword ptr [RAX],0x7e MOV R14D,0x1 LAB_00196b65: MOV EAX,R14D POP RBX POP R14 POP RBP RET
bool mi_unpack_index_tuple(long *param_1,int8 param_2,int8 param_3) { int iVar1; int4 *puVar2; iVar1 = _mi_put_key_in_record(param_1,param_2,0,param_3); if (iVar1 != 0) { mi_report_error(0x7e,*(int8 *)(*param_1 + 0x268)); param_1[0x2e] = -1; puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x7e; } return iVar1 != 0; }