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
29,500
bitmap_is_subset
eloqsql/mysys/my_bitmap.c
my_bool bitmap_is_subset(const MY_BITMAP *map1, const MY_BITMAP *map2) { my_bitmap_map *m1= map1->bitmap, *m2= map2->bitmap, *end; DBUG_ASSERT(map1->bitmap && map2->bitmap); DBUG_ASSERT(map1->n_bits==map2->n_bits); end= map1->last_word_ptr; while (m1 < end) { if ((*m1++) & ~(*m2++)) return 0; } /* here both maps have the same number of bits - see assert above */ return ((*m1 & ~*m2 & ~map1->last_word_mask) ? 0 : 1); }
O3
c
bitmap_is_subset: pushq %rbp movq %rsp, %rbp movq (%rdi), %rax movq 0x8(%rdi), %rdx movq (%rsi), %rcx cmpq %rdx, %rax jae 0xbe9f6 leaq 0x4(%rax), %rsi movl (%rcx), %r8d addq $0x4, %rcx notl %r8d testl %r8d, (%rax) movq %rsi, %rax je 0xbe9d7 xorl %eax, %eax jmp 0xbea02 movl 0x18(%rdi), %edx orl (%rcx), %edx notl %edx testl %edx, (%rax) sete %al popq %rbp retq
bitmap_is_subset: push rbp mov rbp, rsp mov rax, [rdi] mov rdx, [rdi+8] mov rcx, [rsi] loc_BE9D7: cmp rax, rdx jnb short loc_BE9F6 lea rsi, [rax+4] mov r8d, [rcx] add rcx, 4 not r8d test [rax], r8d mov rax, rsi jz short loc_BE9D7 xor eax, eax jmp short loc_BEA02 loc_BE9F6: mov edx, [rdi+18h] or edx, [rcx] not edx test [rax], edx setz al loc_BEA02: pop rbp retn
bool bitmap_is_subset(long long a1, int **a2) { _DWORD *v2; // rax int *v3; // rcx int v4; // r8d v2 = *(_DWORD **)a1; v3 = *a2; while ( (unsigned long long)v2 < *(_QWORD *)(a1 + 8) ) { v4 = *v3++; if ( (~v4 & *v2++) != 0 ) return 0; } return (~(*v3 | *(_DWORD *)(a1 + 24)) & *v2) == 0; }
bitmap_is_subset: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI] MOV RDX,qword ptr [RDI + 0x8] MOV RCX,qword ptr [RSI] LAB_001be9d7: CMP RAX,RDX JNC 0x001be9f6 LEA RSI,[RAX + 0x4] MOV R8D,dword ptr [RCX] ADD RCX,0x4 NOT R8D TEST dword ptr [RAX],R8D MOV RAX,RSI JZ 0x001be9d7 XOR EAX,EAX JMP 0x001bea02 LAB_001be9f6: MOV EDX,dword ptr [RDI + 0x18] OR EDX,dword ptr [RCX] NOT EDX TEST dword ptr [RAX],EDX SETZ AL LAB_001bea02: POP RBP RET
int8 bitmap_is_subset(int8 *param_1,int8 *param_2) { uint uVar1; uint uVar2; uint *puVar3; uint *puVar4; puVar4 = (uint *)*param_2; puVar3 = (uint *)*param_1; do { if ((uint *)param_1[1] <= puVar3) { return CONCAT71((int7)((ulong)puVar3 >> 8), (*puVar3 & ~(*(uint *)(param_1 + 3) | *puVar4)) == 0); } uVar1 = *puVar4; puVar4 = puVar4 + 1; uVar2 = *puVar3; puVar3 = puVar3 + 1; } while ((uVar2 & ~uVar1) == 0); return 0; }
29,501
intx::bswap(unsigned long)
corpus-core[P]colibri-stateless/build_O0/_deps/intx-src/include/intx/intx.hpp
inline constexpr uint64_t bswap(uint64_t x) noexcept { #if __has_builtin(__builtin_bswap64) return __builtin_bswap64(x); #else #ifdef _MSC_VER if (!std::is_constant_evaluated()) return _byteswap_uint64(x); #endif const auto a = ((x << 8) & 0xFF00FF00FF00FF00) | ((x >> 8) & 0x00FF00FF00FF00FF); const auto b = ((a << 16) & 0xFFFF0000FFFF0000) | ((a >> 16) & 0x0000FFFF0000FFFF); return (b << 32) | (b >> 32); #endif }
O0
cpp
intx::bswap(unsigned long): pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax bswapq %rax popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax,%rax)
_ZN4intx5bswapEm: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] bswap rax pop rbp retn
unsigned long long intx::bswap(intx *this) { return _byteswap_uint64((unsigned long long)this); }
bswap: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] BSWAP RAX POP RBP RET
/* intx::bswap(unsigned long) */ ulong intx::bswap(ulong param_1) { return param_1 >> 0x38 | (param_1 & 0xff000000000000) >> 0x28 | (param_1 & 0xff0000000000) >> 0x18 | (param_1 & 0xff00000000) >> 8 | (param_1 & 0xff000000) << 8 | (param_1 & 0xff0000) << 0x18 | (param_1 & 0xff00) << 0x28 | param_1 << 0x38; }
29,502
metrics::UnixSocketExporter::UnixSocketExporter(metrics::Registry&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
nickolajgrishuk[P]metricz-cpp/examples/../include/metrics_exporter.hpp
UnixSocketExporter(Registry& registry, const std::string& socket_path = "/tmp/metrics.sock") : MetricsExporter(registry), socket_path_(socket_path), running_(false) { // Remove old socket if exists std::remove(socket_path_.c_str()); }
O3
cpp
metrics::UnixSocketExporter::UnixSocketExporter(metrics::Registry&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq %rsi, 0x8(%rdi) leaq 0x35c4e(%rip), %rax # 0x3f810 movq %rax, (%rdi) addq $0x10, %rdi leaq 0x20(%rbx), %rax movq %rax, 0x10(%rbx) movq (%rdx), %rsi movq 0x8(%rdx), %rdx addq %rsi, %rdx callq 0xad64 movb $0x0, 0x30(%rbx) leaq 0x3568d(%rip), %rax # 0x3f278 movq %rax, 0x38(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x40(%rbx) leaq 0x121f(%rip), %rax # 0xae1c movq %rax, 0x58(%rbx) leaq 0x121a(%rip), %rax # 0xae22 movq %rax, 0x50(%rbx) movl $0xffffffff, 0x60(%rbx) # imm = 0xFFFFFFFF movl $0x5, %eax movq %rax, 0x68(%rbx) movq %rax, 0x70(%rbx) movq %rax, 0x78(%rbx) xorl %r14d, %r14d movq %r14, 0x80(%rbx) movq %rax, 0x88(%rbx) movups %xmm0, 0x90(%rbx) movq %r14, 0xa0(%rbx) movq $-0x1, 0xa8(%rbx) leaq 0xd8(%rbx), %rax movl %r14d, 0xd8(%rbx) movq %r14, 0xe0(%rbx) movups %xmm0, 0xb0(%rbx) movups %xmm0, 0xb9(%rbx) movq %rax, 0xe8(%rbx) movq %rax, 0xf0(%rbx) leaq 0xf8(%rbx), %rdi movq %r14, 0x2e0(%rbx) movl $0x1dd, %edx # imm = 0x1DD xorl %esi, %esi callq 0x82e0 leaq 0x1159(%rip), %rax # 0xadf9 movq %rax, 0x2d8(%rbx) leaq 0x1944(%rip), %rax # 0xb5f2 movq %rax, 0x2f0(%rbx) leaq 0x193e(%rip), %rax # 0xb5fa movq %rax, 0x2e8(%rbx) leaq 0x300(%rbx), %rax movl %r14d, 0x300(%rbx) movq %r14, 0x308(%rbx) movq %rax, 0x310(%rbx) movq %rax, 0x318(%rbx) movq %r14, 0x320(%rbx) movl $0x1, %esi movl $0xd, %edi callq 0x8660 movq %r14, 0x328(%rbx) movq 0x10(%rbx), %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x89b0 nop
_ZN7metrics18UnixSocketExporterC2ERNS_8RegistryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r14 push rbx push rax mov rbx, rdi mov [rdi+8], rsi lea rax, off_3F810 mov [rdi], rax add rdi, 10h lea rax, [rbx+20h] mov [rbx+10h], rax mov rsi, [rdx] mov rdx, [rdx+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+30h], 0 lea rax, off_3F278 mov [rbx+38h], rax xorps xmm0, xmm0 movups xmmword ptr [rbx+40h], xmm0 lea rax, _ZNSt17_Function_handlerIFPN7httplib9TaskQueueEvEZNS0_6ServerC1EvEUlvE_E9_M_invokeERKSt9_Any_data; std::_Function_handler<httplib::TaskQueue * ()(void),httplib::Server::Server(void)::{lambda(void)#1}>::_M_invoke(std::_Any_data const&) mov [rbx+58h], rax lea rax, _ZNSt17_Function_handlerIFPN7httplib9TaskQueueEvEZNS0_6ServerC1EvEUlvE_E10_M_managerERSt9_Any_dataRKS7_St18_Manager_operation; std::_Function_handler<httplib::TaskQueue * ()(void),httplib::Server::Server(void)::{lambda(void)#1}>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rbx+50h], rax mov dword ptr [rbx+60h], 0FFFFFFFFh mov eax, 5 mov [rbx+68h], rax mov [rbx+70h], rax mov [rbx+78h], rax xor r14d, r14d mov [rbx+80h], r14 mov [rbx+88h], rax movups xmmword ptr [rbx+90h], xmm0 mov [rbx+0A0h], r14 mov qword ptr [rbx+0A8h], 0FFFFFFFFFFFFFFFFh lea rax, [rbx+0D8h] mov [rbx+0D8h], r14d mov [rbx+0E0h], r14 movups xmmword ptr [rbx+0B0h], xmm0 movups xmmword ptr [rbx+0B9h], xmm0 mov [rbx+0E8h], rax mov [rbx+0F0h], rax lea rdi, [rbx+0F8h] mov [rbx+2E0h], r14 mov edx, 1DDh xor esi, esi call _memset lea rax, _ZN7httplib22default_socket_optionsEi; httplib::default_socket_options(int) mov [rbx+2D8h], rax lea rax, _ZNSt17_Function_handlerIFviEPS0_E9_M_invokeERKSt9_Any_dataOi; std::_Function_handler<void ()(int),void (*)(int)>::_M_invoke(std::_Any_data const&,int &&) mov [rbx+2F0h], rax lea rax, _ZNSt17_Function_handlerIFviEPS0_E10_M_managerERSt9_Any_dataRKS3_St18_Manager_operation; std::_Function_handler<void ()(int),void (*)(int)>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rbx+2E8h], rax lea rax, [rbx+300h] mov [rbx+300h], r14d mov [rbx+308h], r14 mov [rbx+310h], rax mov [rbx+318h], rax mov [rbx+320h], r14 mov esi, 1 mov edi, 0Dh call _signal mov [rbx+328h], r14 mov rdi, [rbx+10h] add rsp, 8 pop rbx pop r14 jmp _remove
long long metrics::UnixSocketExporter::UnixSocketExporter(long long a1, long long a2, _QWORD *a3) { *(_QWORD *)(a1 + 8) = a2; *(_QWORD *)a1 = off_3F810; *(_QWORD *)(a1 + 16) = a1 + 32; std::string::_M_construct<char *>(a1 + 16, *a3, *a3 + a3[1]); *(_BYTE *)(a1 + 48) = 0; *(_QWORD *)(a1 + 56) = off_3F278; *(_OWORD *)(a1 + 64) = 0LL; *(_QWORD *)(a1 + 88) = std::_Function_handler<httplib::TaskQueue * ()(void),httplib::Server::Server(void)::{lambda(void)#1}>::_M_invoke; *(_QWORD *)(a1 + 80) = std::_Function_handler<httplib::TaskQueue * ()(void),httplib::Server::Server(void)::{lambda(void)#1}>::_M_manager; *(_DWORD *)(a1 + 96) = -1; *(_QWORD *)(a1 + 104) = 5LL; *(_QWORD *)(a1 + 112) = 5LL; *(_QWORD *)(a1 + 120) = 5LL; *(_QWORD *)(a1 + 128) = 0LL; *(_QWORD *)(a1 + 136) = 5LL; *(_OWORD *)(a1 + 144) = 0LL; *(_QWORD *)(a1 + 160) = 0LL; *(_QWORD *)(a1 + 168) = -1LL; *(_DWORD *)(a1 + 216) = 0; *(_QWORD *)(a1 + 224) = 0LL; *(_OWORD *)(a1 + 176) = 0LL; *(_OWORD *)(a1 + 185) = 0LL; *(_QWORD *)(a1 + 232) = a1 + 216; *(_QWORD *)(a1 + 240) = a1 + 216; *(_QWORD *)(a1 + 736) = 0LL; memset(a1 + 248, 0LL, 477LL); *(_QWORD *)(a1 + 728) = httplib::default_socket_options; *(_QWORD *)(a1 + 752) = std::_Function_handler<void ()(int),void (*)(int)>::_M_invoke; *(_QWORD *)(a1 + 744) = std::_Function_handler<void ()(int),void (*)(int)>::_M_manager; *(_DWORD *)(a1 + 768) = 0; *(_QWORD *)(a1 + 776) = 0LL; *(_QWORD *)(a1 + 784) = a1 + 768; *(_QWORD *)(a1 + 792) = a1 + 768; *(_QWORD *)(a1 + 800) = 0LL; signal(13LL, 1LL); *(_QWORD *)(a1 + 808) = 0LL; return remove(*(_QWORD *)(a1 + 16)); }
UnixSocketExporter: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV qword ptr [RDI + 0x8],RSI LEA RAX,[0x13f810] MOV qword ptr [RDI],RAX ADD RDI,0x10 LEA RAX,[RBX + 0x20] MOV qword ptr [RBX + 0x10],RAX MOV RSI,qword ptr [RDX] MOV RDX,qword ptr [RDX + 0x8] ADD RDX,RSI CALL 0x0010ad64 MOV byte ptr [RBX + 0x30],0x0 LEA RAX,[0x13f278] MOV qword ptr [RBX + 0x38],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x40],XMM0 LEA RAX,[0x10ae1c] MOV qword ptr [RBX + 0x58],RAX LEA RAX,[0x10ae22] MOV qword ptr [RBX + 0x50],RAX MOV dword ptr [RBX + 0x60],0xffffffff MOV EAX,0x5 MOV qword ptr [RBX + 0x68],RAX MOV qword ptr [RBX + 0x70],RAX MOV qword ptr [RBX + 0x78],RAX XOR R14D,R14D MOV qword ptr [RBX + 0x80],R14 MOV qword ptr [RBX + 0x88],RAX MOVUPS xmmword ptr [RBX + 0x90],XMM0 MOV qword ptr [RBX + 0xa0],R14 MOV qword ptr [RBX + 0xa8],-0x1 LEA RAX,[RBX + 0xd8] MOV dword ptr [RBX + 0xd8],R14D MOV qword ptr [RBX + 0xe0],R14 MOVUPS xmmword ptr [RBX + 0xb0],XMM0 MOVUPS xmmword ptr [RBX + 0xb9],XMM0 MOV qword ptr [RBX + 0xe8],RAX MOV qword ptr [RBX + 0xf0],RAX LEA RDI,[RBX + 0xf8] MOV qword ptr [RBX + 0x2e0],R14 MOV EDX,0x1dd XOR ESI,ESI CALL 0x001082e0 LEA RAX,[0x10adf9] MOV qword ptr [RBX + 0x2d8],RAX LEA RAX,[0x10b5f2] MOV qword ptr [RBX + 0x2f0],RAX LEA RAX,[0x10b5fa] MOV qword ptr [RBX + 0x2e8],RAX LEA RAX,[RBX + 0x300] MOV dword ptr [RBX + 0x300],R14D MOV qword ptr [RBX + 0x308],R14 MOV qword ptr [RBX + 0x310],RAX MOV qword ptr [RBX + 0x318],RAX MOV qword ptr [RBX + 0x320],R14 MOV ESI,0x1 MOV EDI,0xd CALL 0x00108660 MOV qword ptr [RBX + 0x328],R14 MOV RDI,qword ptr [RBX + 0x10] ADD RSP,0x8 POP RBX POP R14 JMP 0x001089b0
/* metrics::UnixSocketExporter::UnixSocketExporter(metrics::Registry&, std::__cxx11::string const&) */ void __thiscall metrics::UnixSocketExporter::UnixSocketExporter (UnixSocketExporter *this,Registry *param_1,string *param_2) { *(Registry **)(this + 8) = param_1; *(int ***)this = &PTR__UnixSocketExporter_0013f810; *(UnixSocketExporter **)(this + 0x10) = this + 0x20; std::__cxx11::string::_M_construct<char*> (this + 0x10,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2); this[0x30] = (UnixSocketExporter)0x0; *(int ***)(this + 0x38) = &PTR__Server_0013f278; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; *(code **)(this + 0x58) = std::_Function_handler<httplib::TaskQueue*(),httplib::Server::Server()::{lambda()#1}>:: _M_invoke; *(code **)(this + 0x50) = std::_Function_handler<httplib::TaskQueue*(),httplib::Server::Server()::{lambda()#1}>:: _M_manager; *(int4 *)(this + 0x60) = 0xffffffff; *(int8 *)(this + 0x68) = 5; *(int8 *)(this + 0x70) = 5; *(int8 *)(this + 0x78) = 5; *(int8 *)(this + 0x80) = 0; *(int8 *)(this + 0x88) = 5; *(int8 *)(this + 0x90) = 0; *(int8 *)(this + 0x98) = 0; *(int8 *)(this + 0xa0) = 0; *(int8 *)(this + 0xa8) = 0xffffffffffffffff; *(int4 *)(this + 0xd8) = 0; *(int8 *)(this + 0xe0) = 0; *(int8 *)(this + 0xb0) = 0; *(int8 *)(this + 0xb8) = 0; *(int8 *)(this + 0xb9) = 0; *(int8 *)(this + 0xc1) = 0; *(UnixSocketExporter **)(this + 0xe8) = this + 0xd8; *(UnixSocketExporter **)(this + 0xf0) = this + 0xd8; *(int8 *)(this + 0x2e0) = 0; memset(this + 0xf8,0,0x1dd); *(code **)(this + 0x2d8) = httplib::default_socket_options; *(code **)(this + 0x2f0) = std::_Function_handler<void(int),void(*)(int)>::_M_invoke; *(code **)(this + 0x2e8) = std::_Function_handler<void(int),void(*)(int)>::_M_manager; *(int4 *)(this + 0x300) = 0; *(int8 *)(this + 0x308) = 0; *(UnixSocketExporter **)(this + 0x310) = this + 0x300; *(UnixSocketExporter **)(this + 0x318) = this + 0x300; *(int8 *)(this + 800) = 0; signal(0xd,(__sighandler_t)0x1); *(int8 *)(this + 0x328) = 0; remove(*(char **)(this + 0x10)); return; }
29,503
get_charset_name
eloqsql/mysys/charset.c
const char *get_charset_name(uint charset_number) { my_pthread_once(&charsets_initialized, init_available_charsets); if (charset_number < array_elements(all_charsets)) { CHARSET_INFO *cs= all_charsets[charset_number]; if (cs && (cs->number == charset_number) && cs->coll_name.str) return cs->coll_name.str; } return "?"; /* this mimics find_type() */ }
O3
c
get_charset_name: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movl %edi, %ebx leaq 0x35067a(%rip), %rdi # 0x378f90 leaq -0x302(%rip), %rsi # 0x2861b callq 0x24310 leaq 0x3ba6e(%rip), %rcx # 0x64397 cmpl $0x7ff, %ebx # imm = 0x7FF ja 0x28950 movl %ebx, %eax leaq 0x3485e6(%rip), %rdx # 0x370f20 movq (%rdx,%rax,8), %rax testq %rax, %rax je 0x28950 cmpl %ebx, (%rax) jne 0x28950 movq 0x20(%rax), %rax testq %rax, %rax jne 0x28953 movq %rcx, %rax addq $0x8, %rsp popq %rbx popq %rbp retq
get_charset_name: push rbp mov rbp, rsp push rbx push rax mov ebx, edi lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once lea rcx, asc_64397; "?" cmp ebx, 7FFh ja short loc_28950 mov eax, ebx lea rdx, all_charsets mov rax, [rdx+rax*8] test rax, rax jz short loc_28950 cmp [rax], ebx jnz short loc_28950 mov rax, [rax+20h] test rax, rax jnz short loc_28953 loc_28950: mov rax, rcx loc_28953: add rsp, 8 pop rbx pop rbp retn
const char * get_charset_name(unsigned int a1) { long long v1; // rax const char *result; // rax pthread_once(&charsets_initialized, init_available_charsets); if ( a1 > 0x7FF ) return "?"; v1 = all_charsets[a1]; if ( !v1 ) return "?"; if ( *(_DWORD *)v1 != a1 ) return "?"; result = *(const char **)(v1 + 32); if ( !result ) return "?"; return result; }
get_charset_name: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV EBX,EDI LEA RDI,[0x478f90] LEA RSI,[0x12861b] CALL 0x00124310 LEA RCX,[0x164397] CMP EBX,0x7ff JA 0x00128950 MOV EAX,EBX LEA RDX,[0x470f20] MOV RAX,qword ptr [RDX + RAX*0x8] TEST RAX,RAX JZ 0x00128950 CMP dword ptr [RAX],EBX JNZ 0x00128950 MOV RAX,qword ptr [RAX + 0x20] TEST RAX,RAX JNZ 0x00128953 LAB_00128950: MOV RAX,RCX LAB_00128953: ADD RSP,0x8 POP RBX POP RBP RET
int * get_charset_name(uint param_1) { uint *puVar1; int *puVar2; pthread_once(&charsets_initialized,init_available_charsets); if ((((0x7ff < param_1) || (puVar1 = (uint *)(&all_charsets)[param_1], puVar1 == (uint *)0x0)) || (*puVar1 != param_1)) || (puVar2 = *(int **)(puVar1 + 8), puVar2 == (int *)0x0)) { puVar2 = &DAT_00164397; } return puVar2; }
29,504
google::protobuf::io::IstreamInputStream::~IstreamInputStream()
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl.h
class PROTOBUF_EXPORT IstreamInputStream PROTOBUF_FUTURE_FINAL : public ZeroCopyInputStream { public: // Creates a stream that reads from the given C++ istream. // If a block_size is given, it specifies the number of bytes that // should be read and returned with each call to Next(). Otherwise, // a reasonable default is used. explicit IstreamInputStream(std::istream* stream, int block_size = -1); // implements ZeroCopyInputStream ---------------------------------- bool Next(const void** data, int* size) override; void BackUp(int count) override; bool Skip(int count) override; int64_t ByteCount() const override; private: class PROTOBUF_EXPORT CopyingIstreamInputStream PROTOBUF_FUTURE_FINAL : public CopyingInputStream { public: CopyingIstreamInputStream(std::istream* input); ~CopyingIstreamInputStream() override; // implements CopyingInputStream --------------------------------- int Read(void* buffer, int size) override; // (We use the default implementation of Skip().) private: // The stream. std::istream* input_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CopyingIstreamInputStream); }
O0
c
google::protobuf::io::IstreamInputStream::~IstreamInputStream(): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rdi movq %rdi, 0x8(%rsp) leaq 0x2fddc6(%rip), %rax # 0x4eddf0 addq $0x10, %rax movq %rax, (%rdi) addq $0x18, %rdi callq 0x1f1010 movq 0x8(%rsp), %rdi addq $0x8, %rdi callq 0x1ef830 movq 0x8(%rsp), %rdi callq 0x3d750 addq $0x18, %rsp retq nopw (%rax,%rax)
_ZN6google8protobuf2io18IstreamInputStreamD2Ev: sub rsp, 18h mov [rsp+18h+var_8], rdi mov rdi, [rsp+18h+var_8] mov [rsp+18h+var_10], rdi lea rax, _ZTVN6google8protobuf2io18IstreamInputStreamE; `vtable for'google::protobuf::io::IstreamInputStream add rax, 10h mov [rdi], rax add rdi, 18h; this call _ZN6google8protobuf2io25CopyingInputStreamAdaptorD2Ev; google::protobuf::io::CopyingInputStreamAdaptor::~CopyingInputStreamAdaptor() mov rdi, [rsp+18h+var_10] add rdi, 8; this call _ZN6google8protobuf2io18IstreamInputStream25CopyingIstreamInputStreamD2Ev; google::protobuf::io::IstreamInputStream::CopyingIstreamInputStream::~CopyingIstreamInputStream() mov rdi, [rsp+18h+var_10]; this call _ZN6google8protobuf2io19ZeroCopyInputStreamD2Ev; google::protobuf::io::ZeroCopyInputStream::~ZeroCopyInputStream() add rsp, 18h retn
void google::protobuf::io::IstreamInputStream::~IstreamInputStream( google::protobuf::io::IstreamInputStream *this) { *(_QWORD *)this = &`vtable for'google::protobuf::io::IstreamInputStream + 2; google::protobuf::io::CopyingInputStreamAdaptor::~CopyingInputStreamAdaptor((google::protobuf::io::IstreamInputStream *)((char *)this + 24)); google::protobuf::io::IstreamInputStream::CopyingIstreamInputStream::~CopyingIstreamInputStream((google::protobuf::io::IstreamInputStream *)((char *)this + 8)); google::protobuf::io::ZeroCopyInputStream::~ZeroCopyInputStream(this); }
_M_get_insert_hint_unique_pos: SUB RSP,0xa8 MOV qword ptr [RSP + 0x90],RSI MOV qword ptr [RSP + 0x88],RDI MOV qword ptr [RSP + 0x80],RDX MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0x30],RAX LEA RDI,[RSP + 0x90] CALL 0x001f0870 MOV RDI,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x38],RAX CALL 0x001efef0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x38] CMP RAX,RCX JNZ 0x001f0104 MOV RDI,qword ptr [RSP + 0x30] CALL 0x001f08a0 CMP RAX,0x0 JBE 0x001f00dd MOV RDI,qword ptr [RSP + 0x30] CALL 0x001f08c0 MOV RDI,qword ptr [RAX] CALL 0x001f08b0 MOV RDI,qword ptr [RSP + 0x30] MOV RSI,RAX MOV RDX,qword ptr [RSP + 0x80] CALL 0x00141450 TEST AL,0x1 JNZ 0x001f00b0 JMP 0x001f00dd LAB_001f00b0: MOV RDI,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x70],0x0 CALL 0x001f08c0 MOV RDX,RAX LEA RDI,[RSP + 0x98] LEA RSI,[RSP + 0x70] CALL 0x00143370 JMP 0x001f037f LAB_001f00dd: MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x80] CALL 0x001f08e0 MOV qword ptr [RSP + 0x98],RAX MOV qword ptr [RSP + 0xa0],RDX JMP 0x001f037f LAB_001f0104: MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x78] CALL 0x001f08b0 MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x28] MOV RDX,RAX CALL 0x00141450 TEST AL,0x1 JNZ 0x001f0136 JMP 0x001f0239 LAB_001f0136: MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x68],RAX MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x20],RAX CALL 0x001f0a50 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x20] CMP RAX,qword ptr [RCX] JNZ 0x001f0194 MOV RDI,qword ptr [RSP + 0x30] CALL 0x001f0a50 MOV RDI,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x18],RAX CALL 0x001f0a50 MOV RSI,qword ptr [RSP + 0x18] MOV RDX,RAX LEA RDI,[RSP + 0x98] CALL 0x00143530 JMP 0x001f037f LAB_001f0194: LEA RDI,[RSP + 0x68] CALL 0x001f0a70 MOV RDI,qword ptr [RAX] CALL 0x001f08b0 MOV RDI,qword ptr [RSP + 0x30] MOV RSI,RAX MOV RDX,qword ptr [RSP + 0x80] CALL 0x00141450 TEST AL,0x1 JNZ 0x001f01c1 JMP 0x001f0212 LAB_001f01c1: MOV RDI,qword ptr [RSP + 0x68] CALL 0x001e6590 CMP RAX,0x0 JNZ 0x001f01f6 MOV qword ptr [RSP + 0x60],0x0 LEA RDX,[RSP + 0x68] LEA RDI,[RSP + 0x98] LEA RSI,[RSP + 0x60] CALL 0x00143370 JMP 0x001f037f LAB_001f01f6: LEA RSI,[RSP + 0x78] LEA RDX,[RSP + 0x78] LEA RDI,[RSP + 0x98] CALL 0x00143530 JMP 0x001f037f LAB_001f0212: MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x80] CALL 0x001f08e0 MOV qword ptr [RSP + 0x98],RAX MOV qword ptr [RSP + 0xa0],RDX JMP 0x001f037f LAB_001f0239: MOV RDI,qword ptr [RSP + 0x78] CALL 0x001f08b0 MOV RDI,qword ptr [RSP + 0x30] MOV RSI,RAX MOV RDX,qword ptr [RSP + 0x80] CALL 0x00141450 TEST AL,0x1 JNZ 0x001f0261 JMP 0x001f035f LAB_001f0261: MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x10],RAX CALL 0x001f08c0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x10] CMP RAX,qword ptr [RCX] JNZ 0x001f02b9 MOV RDI,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x50],0x0 CALL 0x001f08c0 MOV RDX,RAX LEA RDI,[RSP + 0x98] LEA RSI,[RSP + 0x50] CALL 0x00143370 JMP 0x001f037f LAB_001f02b9: MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x8],RAX LEA RDI,[RSP + 0x58] CALL 0x001e0ff0 MOV RDI,qword ptr [RAX] CALL 0x001f08b0 MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x8] MOV RDX,RAX CALL 0x00141450 TEST AL,0x1 JNZ 0x001f02f0 JMP 0x001f033b LAB_001f02f0: MOV RDI,qword ptr [RSP + 0x78] CALL 0x001e6590 CMP RAX,0x0 JNZ 0x001f0322 MOV qword ptr [RSP + 0x48],0x0 LEA RDX,[RSP + 0x78] LEA RDI,[RSP + 0x98] LEA RSI,[RSP + 0x48] CALL 0x00143370 JMP 0x001f037f LAB_001f0322: LEA RSI,[RSP + 0x58] LEA RDX,[RSP + 0x58] LEA RDI,[RSP + 0x98] CALL 0x00143530 JMP 0x001f037f LAB_001f033b: MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x80] CALL 0x001f08e0 MOV qword ptr [RSP + 0x98],RAX MOV qword ptr [RSP + 0xa0],RDX JMP 0x001f037f LAB_001f035f: LEA RSI,[RSP + 0x78] MOV qword ptr [RSP + 0x40],0x0 LEA RDI,[RSP + 0x98] LEA RDX,[RSP + 0x40] CALL 0x0013e170 LAB_001f037f: MOV RAX,qword ptr [RSP + 0x98] MOV RDX,qword ptr [RSP + 0xa0] ADD RSP,0xa8 RET
/* std::_Rb_tree<std::__cxx11::string, std::pair<std::__cxx11::string const, google::protobuf::compiler::cpp::FileGenerator::ForwardDeclarations>, std::_Select1st<std::pair<std::__cxx11::string const, google::protobuf::compiler::cpp::FileGenerator::ForwardDeclarations> >, std::less<std::__cxx11::string >, std::allocator<std::pair<std::__cxx11::string const, google::protobuf::compiler::cpp::FileGenerator::ForwardDeclarations> > >::_M_get_insert_hint_unique_pos(std::_Rb_tree_const_iterator<std::pair<std::__cxx11::string const, google::protobuf::compiler::cpp::FileGenerator::ForwardDeclarations> >, std::__cxx11::string const&) */ int1 [16] __thiscall std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,google::protobuf::compiler::cpp::FileGenerator::ForwardDeclarations>,std::_Select1st<std::pair<std::__cxx11::string_const,google::protobuf::compiler::cpp::FileGenerator::ForwardDeclarations>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,google::protobuf::compiler::cpp::FileGenerator::ForwardDeclarations>>> ::_M_get_insert_hint_unique_pos (_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,google::protobuf::compiler::cpp::FileGenerator::ForwardDeclarations>,std::_Select1st<std::pair<std::__cxx11::string_const,google::protobuf::compiler::cpp::FileGenerator::ForwardDeclarations>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,google::protobuf::compiler::cpp::FileGenerator::ForwardDeclarations>>> *this,int8 param_2,string *param_3) { int1 auVar1 [16]; _Rb_tree_node_base *p_Var2; _Rb_tree_node_base *p_Var3; long lVar4; int8 *puVar5; string *psVar6; ulong uVar7; int8 uVar8; string *psVar9; int8 uVar10; long *plVar11; int1 auVar12 [16]; int8 local_68; int8 local_60; int8 local_58; _Rb_tree_node_base *local_50; int8 local_48; _Rb_tree_node_base *local_40; int8 local_38; _Rb_tree_node_base *local_30; string *local_28; _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,google::protobuf::compiler::cpp::FileGenerator::ForwardDeclarations>,std::_Select1st<std::pair<std::__cxx11::string_const,google::protobuf::compiler::cpp::FileGenerator::ForwardDeclarations>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,google::protobuf::compiler::cpp::FileGenerator::ForwardDeclarations>>> *local_20; int8 local_18; int8 local_10; int8 local_8; local_28 = param_3; local_20 = this; local_18 = param_2; p_Var2 = (_Rb_tree_node_base *) _Rb_tree_const_iterator<std::pair<std::__cxx11::string_const,google::protobuf::compiler::cpp::FileGenerator::ForwardDeclarations>> ::_M_const_cast((_Rb_tree_const_iterator<std::pair<std::__cxx11::string_const,google::protobuf::compiler::cpp::FileGenerator::ForwardDeclarations>> *)&local_18); local_30 = p_Var2; p_Var3 = (_Rb_tree_node_base *)_M_end(this); psVar6 = local_28; if (p_Var2 == p_Var3) { lVar4 = size(this); if (lVar4 != 0) { puVar5 = (int8 *)_M_rightmost(this); psVar6 = (string *)_S_key((_Rb_tree_node_base *)*puVar5); uVar7 = less<std::__cxx11::string>::operator() ((less<std::__cxx11::string> *)this,psVar6,local_28); if ((uVar7 & 1) != 0) { local_38 = 0; uVar8 = _M_rightmost(this); _ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_TnNSt9enable_ifIXclsr5_PCCPE13_CopyMovePairILb1ES1_T_EEEbE4typeELb1EEERKS1_OS6_ (&local_10,&local_38,uVar8); auVar1._8_8_ = local_8; auVar1._0_8_ = local_10; return auVar1; } } auVar12 = _M_get_insert_unique_pos(this,local_28); } else { psVar9 = (string *)_S_key(local_30); uVar7 = less<std::__cxx11::string>::operator()((less<std::__cxx11::string> *)this,psVar6,psVar9) ; p_Var2 = local_30; if ((uVar7 & 1) == 0) { psVar6 = (string *)_S_key(local_30); uVar7 = less<std::__cxx11::string>::operator() ((less<std::__cxx11::string> *)this,psVar6,local_28); p_Var2 = local_30; if ((uVar7 & 1) == 0) { local_68 = 0; _ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_TnNSt9enable_ifIXclsr5_PCCPE13_MoveCopyPairILb1ET_S1_EEEbE4typeELb1EEEOS6_RKS1_ (&local_10,&local_30,&local_68); auVar12._8_8_ = local_8; auVar12._0_8_ = local_10; } else { local_50 = local_30; plVar11 = (long *)_M_rightmost(this); psVar6 = local_28; if (p_Var2 == (_Rb_tree_node_base *)*plVar11) { local_58 = 0; uVar8 = _M_rightmost(this); _ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_TnNSt9enable_ifIXclsr5_PCCPE13_CopyMovePairILb1ES1_T_EEEbE4typeELb1EEERKS1_OS6_ (&local_10,&local_58,uVar8); auVar12._8_8_ = local_8; auVar12._0_8_ = local_10; } else { puVar5 = (int8 *) _Rb_tree_iterator<std::pair<std::__cxx11::string_const,google::protobuf::compiler::cpp::FileGenerator::ForwardDeclarations>> ::operator++((_Rb_tree_iterator<std::pair<std::__cxx11::string_const,google::protobuf::compiler::cpp::FileGenerator::ForwardDeclarations>> *)&local_50); psVar9 = (string *)_S_key((_Rb_tree_node_base *)*puVar5); uVar7 = less<std::__cxx11::string>::operator() ((less<std::__cxx11::string> *)this,psVar6,psVar9); if ((uVar7 & 1) == 0) { auVar12 = _M_get_insert_unique_pos(this,local_28); } else { lVar4 = _S_right(local_30); if (lVar4 == 0) { local_60 = 0; _ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_TnNSt9enable_ifIXclsr5_PCCPE13_CopyMovePairILb1ES1_T_EEEbE4typeELb1EEERKS1_OS6_ (&local_10,&local_60,&local_30); auVar12._8_8_ = local_8; auVar12._0_8_ = local_10; } else { _ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_S4_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS6_S7_EEEbE4typeELb1EEEOS6_OS7_ (&local_10,&local_50,&local_50); auVar12._8_8_ = local_8; auVar12._0_8_ = local_10; } } } } } else { local_40 = local_30; plVar11 = (long *)_M_leftmost(this); if (p_Var2 == (_Rb_tree_node_base *)*plVar11) { uVar8 = _M_leftmost(this); uVar10 = _M_leftmost(this); _ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_S4_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS6_S7_EEEbE4typeELb1EEEOS6_OS7_ (&local_10,uVar8,uVar10); auVar12._8_8_ = local_8; auVar12._0_8_ = local_10; } else { puVar5 = (int8 *) _Rb_tree_iterator<std::pair<std::__cxx11::string_const,google::protobuf::compiler::cpp::FileGenerator::ForwardDeclarations>> ::operator--((_Rb_tree_iterator<std::pair<std::__cxx11::string_const,google::protobuf::compiler::cpp::FileGenerator::ForwardDeclarations>> *)&local_40); psVar6 = (string *)_S_key((_Rb_tree_node_base *)*puVar5); uVar7 = less<std::__cxx11::string>::operator() ((less<std::__cxx11::string> *)this,psVar6,local_28); if ((uVar7 & 1) == 0) { auVar12 = _M_get_insert_unique_pos(this,local_28); } else { lVar4 = _S_right(local_40); if (lVar4 == 0) { local_48 = 0; _ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_TnNSt9enable_ifIXclsr5_PCCPE13_CopyMovePairILb1ES1_T_EEEbE4typeELb1EEERKS1_OS6_ (&local_10,&local_48,&local_40); auVar12._8_8_ = local_8; auVar12._0_8_ = local_10; } else { _ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_S4_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS6_S7_EEEbE4typeELb1EEEOS6_OS7_ (&local_10,&local_30,&local_30); auVar12._8_8_ = local_8; auVar12._0_8_ = local_10; } } } } } return auVar12; }
29,505
PFS_buffer_default_allocator<PFS_rwlock>::alloc_array(PFS_buffer_default_array<PFS_rwlock>*)
eloqsql/storage/perfschema/pfs_buffer_container.h
int alloc_array(array_type *array) { array->m_ptr= NULL; array->m_full= true; array->m_monotonic.m_u32= 0; if (array->m_max > 0) { array->m_ptr= PFS_MALLOC_ARRAY(m_builtin_class, array->m_max, sizeof(T), T, MYF(MY_ZEROFILL)); if (array->m_ptr == NULL) return 1; array->m_full= false; } return 0; }
O0
c
PFS_buffer_default_allocator<PFS_rwlock>::alloc_array(PFS_buffer_default_array<PFS_rwlock>*): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movq $0x0, 0x48(%rax) movq -0x18(%rbp), %rax movb $0x1, (%rax) movq -0x18(%rbp), %rax movl $0x0, 0x4(%rax) movq -0x18(%rbp), %rax cmpq $0x0, 0x50(%rax) jbe 0x38c85 movq -0x20(%rbp), %rax movq (%rax), %rdi movq -0x18(%rbp), %rax movq 0x50(%rax), %rsi movl $0x200, %edx # imm = 0x200 movl $0x20, %ecx callq 0x29b10 movq %rax, %rcx movq -0x18(%rbp), %rax movq %rcx, 0x48(%rax) movq -0x18(%rbp), %rax cmpq $0x0, 0x48(%rax) jne 0x38c7e movl $0x1, -0x4(%rbp) jmp 0x38c8c movq -0x18(%rbp), %rax movb $0x0, (%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nop
_ZN28PFS_buffer_default_allocatorI17PFS_metadata_lockE11alloc_arrayEP24PFS_buffer_default_arrayIS0_E: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov [rbp+var_20], rax mov rax, [rbp+var_18] mov qword ptr [rax+48h], 0 mov rax, [rbp+var_18] mov byte ptr [rax], 1 mov rax, [rbp+var_18] mov dword ptr [rax+4], 0 mov rax, [rbp+var_18] cmp qword ptr [rax+50h], 0 jbe short loc_38C85 mov rax, [rbp+var_20] mov rdi, [rax]; PFS_builtin_memory_class * mov rax, [rbp+var_18] mov rsi, [rax+50h]; unsigned __int64 mov edx, 200h; unsigned __int64 mov ecx, 20h ; ' '; unsigned __int64 call _Z16pfs_malloc_arrayP24PFS_builtin_memory_classmmm; pfs_malloc_array(PFS_builtin_memory_class *,ulong,ulong,ulong) mov rcx, rax mov rax, [rbp+var_18] mov [rax+48h], rcx mov rax, [rbp+var_18] cmp qword ptr [rax+48h], 0 jnz short loc_38C7E mov [rbp+var_4], 1 jmp short loc_38C8C loc_38C7E: mov rax, [rbp+var_18] mov byte ptr [rax], 0 loc_38C85: mov [rbp+var_4], 0 loc_38C8C: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long PFS_buffer_default_allocator<PFS_metadata_lock>::alloc_array( PFS_builtin_memory_class **a1, long long a2) { *(_QWORD *)(a2 + 72) = 0LL; *(_BYTE *)a2 = 1; *(_DWORD *)(a2 + 4) = 0; if ( !*(_QWORD *)(a2 + 80) ) return 0; *(_QWORD *)(a2 + 72) = pfs_malloc_array(*a1, *(_QWORD *)(a2 + 80), 0x200uLL); if ( *(_QWORD *)(a2 + 72) ) { *(_BYTE *)a2 = 0; return 0; } return 1; }
alloc_array: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x48],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],0x1 MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x4],0x0 MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x50],0x0 JBE 0x00138c85 MOV RAX,qword ptr [RBP + -0x20] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x50] MOV EDX,0x200 MOV ECX,0x20 CALL 0x00129b10 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x48],RCX MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x48],0x0 JNZ 0x00138c7e MOV dword ptr [RBP + -0x4],0x1 JMP 0x00138c8c LAB_00138c7e: MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],0x0 LAB_00138c85: MOV dword ptr [RBP + -0x4],0x0 LAB_00138c8c: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
/* PFS_buffer_default_allocator<PFS_metadata_lock>::alloc_array(PFS_buffer_default_array<PFS_metadata_lock>*) */ int4 __thiscall PFS_buffer_default_allocator<PFS_metadata_lock>::alloc_array (PFS_buffer_default_allocator<PFS_metadata_lock> *this,PFS_buffer_default_array *param_1) { int8 uVar1; *(int8 *)(param_1 + 0x48) = 0; *param_1 = (PFS_buffer_default_array)0x1; *(int4 *)(param_1 + 4) = 0; if (*(long *)(param_1 + 0x50) != 0) { uVar1 = pfs_malloc_array(*(PFS_builtin_memory_class **)this,*(ulong *)(param_1 + 0x50),0x200, 0x20); *(int8 *)(param_1 + 0x48) = uVar1; if (*(long *)(param_1 + 0x48) == 0) { return 1; } *param_1 = (PFS_buffer_default_array)0x0; } return 0; }
29,506
JS_CallConstructorInternal
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_CallConstructorInternal(JSContext *ctx, JSValue func_obj, JSValue new_target, int argc, JSValue *argv, int flags) { JSObject *p; JSFunctionBytecode *b; if (js_poll_interrupts(ctx)) return JS_EXCEPTION; flags |= JS_CALL_FLAG_CONSTRUCTOR; if (unlikely(JS_VALUE_GET_TAG(func_obj) != JS_TAG_OBJECT)) goto not_a_function; p = JS_VALUE_GET_OBJ(func_obj); if (unlikely(!p->is_constructor)) return JS_ThrowTypeError(ctx, "not a constructor"); if (unlikely(p->class_id != JS_CLASS_BYTECODE_FUNCTION)) { JSClassCall *call_func; call_func = ctx->rt->class_array[p->class_id].call; if (!call_func) { not_a_function: return JS_ThrowTypeError(ctx, "not a function"); } return call_func(ctx, func_obj, new_target, argc, argv, flags); } b = p->u.func.function_bytecode; if (b->is_derived_class_constructor) { return JS_CallInternal(ctx, func_obj, JS_UNDEFINED, new_target, argc, argv, flags); } else { JSValue obj, ret; /* legacy constructor behavior */ obj = js_create_from_ctor(ctx, new_target, JS_CLASS_OBJECT); if (JS_IsException(obj)) return JS_EXCEPTION; ret = JS_CallInternal(ctx, func_obj, obj, new_target, argc, argv, flags); if (JS_VALUE_GET_TAG(ret) == JS_TAG_OBJECT || JS_IsException(ret)) { JS_FreeValue(ctx, obj); return ret; } else { JS_FreeValue(ctx, ret); return obj; } } }
O0
c
JS_CallConstructorInternal: pushq %rbx subq $0xd0, %rsp movl 0xe8(%rsp), %eax movq 0xe0(%rsp), %rax movq %rsi, 0xb0(%rsp) movq %rdx, 0xb8(%rsp) movq %rcx, 0xa0(%rsp) movq %r8, 0xa8(%rsp) movq %rdi, 0x98(%rsp) movl %r9d, 0x94(%rsp) movq 0x98(%rsp), %rdi callq 0x5f000 cmpl $0x0, %eax je 0x46ec5 movl $0x0, 0xc0(%rsp) movq $0x6, 0xc8(%rsp) jmp 0x47271 movl 0xe8(%rsp), %eax orl $0x1, %eax movl %eax, 0xe8(%rsp) movq 0xb8(%rsp), %rax cmpl $-0x1, %eax setne %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x46efa jmp 0x46fbd movq 0xb0(%rsp), %rax movq %rax, 0x88(%rsp) movq 0x88(%rsp), %rax movb 0x5(%rax), %al shrb $0x4, %al andb $0x1, %al cmpb $0x0, %al setne %al xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x46f5d movq 0x98(%rsp), %rdi leaq 0xc6093(%rip), %rsi # 0x10cfd4 movb $0x0, %al callq 0x2c040 movq %rax, 0xc0(%rsp) movq %rdx, 0xc8(%rsp) jmp 0x47271 movq 0x88(%rsp), %rax movzwl 0x6(%rax), %eax cmpl $0xd, %eax setne %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x4704d movq 0x98(%rsp), %rax movq 0x18(%rax), %rax movq 0x80(%rax), %rax movq 0x88(%rsp), %rcx movzwl 0x6(%rcx), %ecx imulq $0x28, %rcx, %rcx addq %rcx, %rax movq 0x18(%rax), %rax movq %rax, 0x78(%rsp) cmpq $0x0, 0x78(%rsp) jne 0x46fe8 jmp 0x46fbd movq 0x98(%rsp), %rdi leaq 0xc6bf8(%rip), %rsi # 0x10dbc4 movb $0x0, %al callq 0x2c040 movq %rax, 0xc0(%rsp) movq %rdx, 0xc8(%rsp) jmp 0x47271 movq 0x78(%rsp), %rax movq 0x98(%rsp), %rdi movl 0x94(%rsp), %r9d movq 0xe0(%rsp), %r11 movl 0xe8(%rsp), %r10d movq 0xb0(%rsp), %rsi movq 0xb8(%rsp), %rdx movq 0xa0(%rsp), %rcx movq 0xa8(%rsp), %r8 movq %r11, (%rsp) movl %r10d, 0x8(%rsp) callq *%rax movq %rax, 0xc0(%rsp) movq %rdx, 0xc8(%rsp) jmp 0x47271 movq 0x88(%rsp), %rax movq 0x30(%rax), %rax movq %rax, 0x80(%rsp) movq 0x80(%rsp), %rax movw 0x18(%rax), %ax shrw $0x3, %ax andw $0x1, %ax cmpb $0x0, %al je 0x47102 movq 0x98(%rsp), %rdi movl $0x0, 0x68(%rsp) movq $0x3, 0x70(%rsp) movl 0x94(%rsp), %r9d movq 0xe0(%rsp), %r10 movl 0xe8(%rsp), %eax movq 0xb0(%rsp), %rsi movq 0xb8(%rsp), %rdx movq 0x68(%rsp), %rcx movq 0x70(%rsp), %r8 leaq 0xa0(%rsp), %r11 movq (%r11), %rbx movq %rbx, (%rsp) movq 0x8(%r11), %r11 movq %r11, 0x8(%rsp) movq %r10, 0x10(%rsp) movl %eax, 0x18(%rsp) callq 0x38e30 movq %rax, 0xc0(%rsp) movq %rdx, 0xc8(%rsp) jmp 0x47271 movq 0x98(%rsp), %rdi movq 0xa0(%rsp), %rsi movq 0xa8(%rsp), %rdx movl $0x1, %ecx callq 0x53b40 movq %rax, 0x38(%rsp) movq %rdx, 0x40(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x58(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x58(%rsp), %rdi movq 0x60(%rsp), %rsi callq 0x22a00 cmpl $0x0, %eax je 0x47172 movl $0x0, 0xc0(%rsp) movq $0x6, 0xc8(%rsp) jmp 0x47271 movq 0x98(%rsp), %rdi movl 0x94(%rsp), %r9d movq 0xe0(%rsp), %r10 movl 0xe8(%rsp), %eax movq 0xb0(%rsp), %rsi movq 0xb8(%rsp), %rdx movq 0x58(%rsp), %rcx movq 0x60(%rsp), %r8 leaq 0xa0(%rsp), %r11 movq (%r11), %rbx movq %rbx, (%rsp) movq 0x8(%r11), %r11 movq %r11, 0x8(%rsp) movq %r10, 0x10(%rsp) movl %eax, 0x18(%rsp) callq 0x38e30 movq %rax, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x50(%rsp) movq 0x50(%rsp), %rax cmpl $-0x1, %eax je 0x4720d movq 0x48(%rsp), %rdi movq 0x50(%rsp), %rsi callq 0x22a00 cmpl $0x0, %eax je 0x47240 movq 0x98(%rsp), %rdi movq 0x58(%rsp), %rsi movq 0x60(%rsp), %rdx callq 0x229d0 movq 0x48(%rsp), %rax movq %rax, 0xc0(%rsp) movq 0x50(%rsp), %rax movq %rax, 0xc8(%rsp) jmp 0x47271 movq 0x98(%rsp), %rdi movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx callq 0x229d0 movq 0x58(%rsp), %rax movq %rax, 0xc0(%rsp) movq 0x60(%rsp), %rax movq %rax, 0xc8(%rsp) movq 0xc0(%rsp), %rax movq 0xc8(%rsp), %rdx addq $0xd0, %rsp popq %rbx retq nopw (%rax,%rax)
JS_CallConstructorInternal: push rbx sub rsp, 0D0h mov eax, [rsp+0D8h+arg_8] mov rax, [rsp+0D8h+arg_0] mov [rsp+0D8h+var_28], rsi mov [rsp+0D8h+var_20], rdx mov [rsp+0D8h+var_38], rcx mov [rsp+0D8h+var_30], r8 mov [rsp+0D8h+var_40], rdi mov [rsp+0D8h+var_44], r9d mov rdi, [rsp+0D8h+var_40] call js_poll_interrupts cmp eax, 0 jz short loc_46EC5 mov dword ptr [rsp+0D8h+var_18], 0 mov [rsp+0D8h+var_10], 6 jmp loc_47271 loc_46EC5: mov eax, [rsp+0D8h+arg_8] or eax, 1 mov [rsp+0D8h+arg_8], eax mov rax, [rsp+0D8h+var_20] cmp eax, 0FFFFFFFFh setnz al xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_46EFA jmp loc_46FBD loc_46EFA: mov rax, [rsp+0D8h+var_28] mov [rsp+0D8h+var_50], rax mov rax, [rsp+0D8h+var_50] mov al, [rax+5] shr al, 4 and al, 1 cmp al, 0 setnz al xor al, 0FFh xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_46F5D mov rdi, [rsp+0D8h+var_40] lea rsi, aNotAConstructo; "not a constructor" mov al, 0 call JS_ThrowTypeError mov [rsp+0D8h+var_18], rax mov [rsp+0D8h+var_10], rdx jmp loc_47271 loc_46F5D: mov rax, [rsp+0D8h+var_50] movzx eax, word ptr [rax+6] cmp eax, 0Dh setnz al xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz loc_4704D mov rax, [rsp+0D8h+var_40] mov rax, [rax+18h] mov rax, [rax+80h] mov rcx, [rsp+0D8h+var_50] movzx ecx, word ptr [rcx+6] imul rcx, 28h ; '(' add rax, rcx mov rax, [rax+18h] mov [rsp+0D8h+var_60], rax cmp [rsp+0D8h+var_60], 0 jnz short loc_46FE8 jmp short $+2 loc_46FBD: mov rdi, [rsp+0D8h+var_40] lea rsi, aSetAddIsNotAFu+0Bh; "not a function" mov al, 0 call JS_ThrowTypeError mov [rsp+0D8h+var_18], rax mov [rsp+0D8h+var_10], rdx jmp loc_47271 loc_46FE8: mov rax, [rsp+0D8h+var_60] mov rdi, [rsp+0D8h+var_40] mov r9d, [rsp+0D8h+var_44] mov r11, [rsp+0D8h+arg_0] mov r10d, [rsp+0D8h+arg_8] mov rsi, [rsp+0D8h+var_28] mov rdx, [rsp+0D8h+var_20] mov rcx, [rsp+0D8h+var_38] mov r8, [rsp+0D8h+var_30] mov [rsp+0D8h+var_D8], r11 mov dword ptr [rsp+0D8h+var_D0], r10d call rax mov [rsp+0D8h+var_18], rax mov [rsp+0D8h+var_10], rdx jmp loc_47271 loc_4704D: mov rax, [rsp+0D8h+var_50] mov rax, [rax+30h] mov [rsp+0D8h+var_58], rax mov rax, [rsp+0D8h+var_58] mov ax, [rax+18h] shr ax, 3 and ax, 1 cmp al, 0 jz loc_47102 mov rdi, [rsp+0D8h+var_40] mov dword ptr [rsp+0D8h+var_70], 0 mov [rsp+0D8h+var_68], 3 mov r9d, [rsp+0D8h+var_44] mov r10, [rsp+0D8h+arg_0] mov eax, [rsp+0D8h+arg_8] mov rsi, [rsp+0D8h+var_28] mov rdx, [rsp+0D8h+var_20] mov rcx, [rsp+0D8h+var_70] mov r8, [rsp+0D8h+var_68] lea r11, [rsp+0D8h+var_38] mov rbx, [r11] mov [rsp+0D8h+var_D8], rbx mov r11, [r11+8] mov [rsp+0D8h+var_D0], r11 mov [rsp+0D8h+var_C8], r10 mov [rsp+0D8h+var_C0], eax call JS_CallInternal mov [rsp+0D8h+var_18], rax mov [rsp+0D8h+var_10], rdx jmp loc_47271 loc_47102: mov rdi, [rsp+0D8h+var_40] mov rsi, [rsp+0D8h+var_38] mov rdx, [rsp+0D8h+var_30] mov ecx, 1 call js_create_from_ctor mov [rsp+0D8h+var_A0], rax mov [rsp+0D8h+var_98], rdx mov rax, [rsp+0D8h+var_A0] mov [rsp+0D8h+var_80], rax mov rax, [rsp+0D8h+var_98] mov [rsp+0D8h+var_78], rax mov rdi, [rsp+0D8h+var_80] mov rsi, [rsp+0D8h+var_78] call JS_IsException_1 cmp eax, 0 jz short loc_47172 mov dword ptr [rsp+0D8h+var_18], 0 mov [rsp+0D8h+var_10], 6 jmp loc_47271 loc_47172: mov rdi, [rsp+0D8h+var_40] mov r9d, [rsp+0D8h+var_44] mov r10, [rsp+0D8h+arg_0] mov eax, [rsp+0D8h+arg_8] mov rsi, [rsp+0D8h+var_28] mov rdx, [rsp+0D8h+var_20] mov rcx, [rsp+0D8h+var_80] mov r8, [rsp+0D8h+var_78] lea r11, [rsp+0D8h+var_38] mov rbx, [r11] mov [rsp+0D8h+var_D8], rbx mov r11, [r11+8] mov [rsp+0D8h+var_D0], r11 mov [rsp+0D8h+var_C8], r10 mov [rsp+0D8h+var_C0], eax call JS_CallInternal mov [rsp+0D8h+var_B0], rax mov [rsp+0D8h+var_A8], rdx mov rax, [rsp+0D8h+var_B0] mov [rsp+0D8h+var_90], rax mov rax, [rsp+0D8h+var_A8] mov [rsp+0D8h+var_88], rax mov rax, [rsp+0D8h+var_88] cmp eax, 0FFFFFFFFh jz short loc_4720D mov rdi, [rsp+0D8h+var_90] mov rsi, [rsp+0D8h+var_88] call JS_IsException_1 cmp eax, 0 jz short loc_47240 loc_4720D: mov rdi, [rsp+0D8h+var_40] mov rsi, [rsp+0D8h+var_80] mov rdx, [rsp+0D8h+var_78] call JS_FreeValue mov rax, [rsp+0D8h+var_90] mov [rsp+0D8h+var_18], rax mov rax, [rsp+0D8h+var_88] mov [rsp+0D8h+var_10], rax jmp short loc_47271 loc_47240: mov rdi, [rsp+0D8h+var_40] mov rsi, [rsp+0D8h+var_90] mov rdx, [rsp+0D8h+var_88] call JS_FreeValue mov rax, [rsp+0D8h+var_80] mov [rsp+0D8h+var_18], rax mov rax, [rsp+0D8h+var_78] mov [rsp+0D8h+var_10], rax loc_47271: mov rax, [rsp+0D8h+var_18] mov rdx, [rsp+0D8h+var_10] add rsp, 0D0h pop rbx retn
long long JS_CallConstructorInternal( long long a1, long long a2, unsigned long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14, long long a15, int a16) { long long v16; // rdx long long v17; // rcx long long v18; // r8 long long v19; // r9 __m128 v20; // xmm4 __m128 v21; // xmm5 long long v22; // rdx double v23; // xmm4_8 double v24; // xmm5_8 long long v25; // rdx char v27; // [rsp+0h] [rbp-D8h] long long v28; // [rsp+28h] [rbp-B0h] _DWORD *v29; // [rsp+38h] [rbp-A0h] long long v30; // [rsp+50h] [rbp-88h] long long v31; // [rsp+60h] [rbp-78h] _DWORD *v32; // [rsp+68h] [rbp-70h] long long ( *v33)(long long, long long, unsigned long long, long long, long long, _QWORD, long long, int); // [rsp+78h] [rbp-60h] unsigned int v34; // [rsp+94h] [rbp-44h] long long v38; // [rsp+C0h] [rbp-18h] int v39; // [rsp+E8h] [rbp+10h] v34 = a6; if ( (unsigned int)js_poll_interrupts(a1, a2, a3, a4, a5, a6) ) { LODWORD(v38) = 0; return v38; } v39 = a16 | 1; if ( (_DWORD)a3 != -1 ) return JS_ThrowTypeError( a1, (long long)"not a function", v16, v17, v18, v19, a7, a8, a9, a10, v20, v21, a13, a14, v27); if ( (*(_BYTE *)(a2 + 5) & 0x10) == 0 ) return JS_ThrowTypeError( a1, (long long)"not a constructor", v16, v17, v18, v19, a7, a8, a9, a10, v20, v21, a13, a14, v27); if ( *(_WORD *)(a2 + 6) != 13 ) { v17 = 40LL * *(unsigned __int16 *)(a2 + 6); v33 = *(long long ( **)(long long, long long, unsigned long long, long long, long long, _QWORD, long long, int))(v17 + *(_QWORD *)(*(_QWORD *)(a1 + 24) + 128LL) + 24); if ( v33 ) return v33(a1, a2, a3, a4, a5, v34, a15, v39); return JS_ThrowTypeError( a1, (long long)"not a function", v16, v17, v18, v19, a7, a8, a9, a10, v20, v21, a13, a14, v27); } if ( (*(_WORD *)(*(_QWORD *)(a2 + 48) + 24LL) & 8) != 0 ) { LODWORD(v32) = 0; return JS_CallInternal( a1, a2, a3, v32, 3LL, v34, a7, a8, a9, a10, *(double *)v20.m128_u64, *(double *)v21.m128_u64, a13, a14, a4, a5, a15, v39); } else { v29 = (_DWORD *)js_create_from_ctor(a1, a4, a5, 1LL); v31 = v22; if ( JS_IsException_1((long long)v29, v22) ) { LODWORD(v38) = 0; } else { v28 = JS_CallInternal(a1, a2, a3, v29, v31, v34, a7, a8, a9, a10, v23, v24, a13, a14, a4, a5, a15, v39); v30 = v25; if ( (_DWORD)v25 == -1 || JS_IsException_1(v28, v25) ) { JS_FreeValue(a1, (long long)v29, v31); return v28; } else { JS_FreeValue(a1, v28, v30); return (long long)v29; } } } return v38; }
JS_CallConstructorInternal: PUSH RBX SUB RSP,0xd0 MOV EAX,dword ptr [RSP + 0xe8] MOV RAX,qword ptr [RSP + 0xe0] MOV qword ptr [RSP + 0xb0],RSI MOV qword ptr [RSP + 0xb8],RDX MOV qword ptr [RSP + 0xa0],RCX MOV qword ptr [RSP + 0xa8],R8 MOV qword ptr [RSP + 0x98],RDI MOV dword ptr [RSP + 0x94],R9D MOV RDI,qword ptr [RSP + 0x98] CALL 0x0015f000 CMP EAX,0x0 JZ 0x00146ec5 MOV dword ptr [RSP + 0xc0],0x0 MOV qword ptr [RSP + 0xc8],0x6 JMP 0x00147271 LAB_00146ec5: MOV EAX,dword ptr [RSP + 0xe8] OR EAX,0x1 MOV dword ptr [RSP + 0xe8],EAX MOV RAX,qword ptr [RSP + 0xb8] CMP EAX,-0x1 SETNZ AL XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00146efa JMP 0x00146fbd LAB_00146efa: MOV RAX,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0x88],RAX MOV RAX,qword ptr [RSP + 0x88] MOV AL,byte ptr [RAX + 0x5] SHR AL,0x4 AND AL,0x1 CMP AL,0x0 SETNZ AL XOR AL,0xff XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00146f5d MOV RDI,qword ptr [RSP + 0x98] LEA RSI,[0x20cfd4] MOV AL,0x0 CALL 0x0012c040 MOV qword ptr [RSP + 0xc0],RAX MOV qword ptr [RSP + 0xc8],RDX JMP 0x00147271 LAB_00146f5d: MOV RAX,qword ptr [RSP + 0x88] MOVZX EAX,word ptr [RAX + 0x6] CMP EAX,0xd SETNZ AL XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x0014704d MOV RAX,qword ptr [RSP + 0x98] MOV RAX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RAX + 0x80] MOV RCX,qword ptr [RSP + 0x88] MOVZX ECX,word ptr [RCX + 0x6] IMUL RCX,RCX,0x28 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x78],RAX CMP qword ptr [RSP + 0x78],0x0 JNZ 0x00146fe8 JMP 0x00146fbd LAB_00146fbd: MOV RDI,qword ptr [RSP + 0x98] LEA RSI,[0x20dbc4] MOV AL,0x0 CALL 0x0012c040 MOV qword ptr [RSP + 0xc0],RAX MOV qword ptr [RSP + 0xc8],RDX JMP 0x00147271 LAB_00146fe8: MOV RAX,qword ptr [RSP + 0x78] MOV RDI,qword ptr [RSP + 0x98] MOV R9D,dword ptr [RSP + 0x94] MOV R11,qword ptr [RSP + 0xe0] MOV R10D,dword ptr [RSP + 0xe8] MOV RSI,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RSP + 0xb8] MOV RCX,qword ptr [RSP + 0xa0] MOV R8,qword ptr [RSP + 0xa8] MOV qword ptr [RSP],R11 MOV dword ptr [RSP + 0x8],R10D CALL RAX MOV qword ptr [RSP + 0xc0],RAX MOV qword ptr [RSP + 0xc8],RDX JMP 0x00147271 LAB_0014704d: MOV RAX,qword ptr [RSP + 0x88] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0x80] MOV AX,word ptr [RAX + 0x18] SHR AX,0x3 AND AX,0x1 CMP AL,0x0 JZ 0x00147102 MOV RDI,qword ptr [RSP + 0x98] MOV dword ptr [RSP + 0x68],0x0 MOV qword ptr [RSP + 0x70],0x3 MOV R9D,dword ptr [RSP + 0x94] MOV R10,qword ptr [RSP + 0xe0] MOV EAX,dword ptr [RSP + 0xe8] MOV RSI,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RSP + 0xb8] MOV RCX,qword ptr [RSP + 0x68] MOV R8,qword ptr [RSP + 0x70] LEA R11,[RSP + 0xa0] MOV RBX,qword ptr [R11] MOV qword ptr [RSP],RBX MOV R11,qword ptr [R11 + 0x8] MOV qword ptr [RSP + 0x8],R11 MOV qword ptr [RSP + 0x10],R10 MOV dword ptr [RSP + 0x18],EAX CALL 0x00138e30 MOV qword ptr [RSP + 0xc0],RAX MOV qword ptr [RSP + 0xc8],RDX JMP 0x00147271 LAB_00147102: MOV RDI,qword ptr [RSP + 0x98] MOV RSI,qword ptr [RSP + 0xa0] MOV RDX,qword ptr [RSP + 0xa8] MOV ECX,0x1 CALL 0x00153b40 MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x40],RDX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x60],RAX MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x60] CALL 0x00122a00 CMP EAX,0x0 JZ 0x00147172 MOV dword ptr [RSP + 0xc0],0x0 MOV qword ptr [RSP + 0xc8],0x6 JMP 0x00147271 LAB_00147172: MOV RDI,qword ptr [RSP + 0x98] MOV R9D,dword ptr [RSP + 0x94] MOV R10,qword ptr [RSP + 0xe0] MOV EAX,dword ptr [RSP + 0xe8] MOV RSI,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RSP + 0xb8] MOV RCX,qword ptr [RSP + 0x58] MOV R8,qword ptr [RSP + 0x60] LEA R11,[RSP + 0xa0] MOV RBX,qword ptr [R11] MOV qword ptr [RSP],RBX MOV R11,qword ptr [R11 + 0x8] MOV qword ptr [RSP + 0x8],R11 MOV qword ptr [RSP + 0x10],R10 MOV dword ptr [RSP + 0x18],EAX CALL 0x00138e30 MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x30],RDX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [RSP + 0x50] CMP EAX,-0x1 JZ 0x0014720d MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x50] CALL 0x00122a00 CMP EAX,0x0 JZ 0x00147240 LAB_0014720d: MOV RDI,qword ptr [RSP + 0x98] MOV RSI,qword ptr [RSP + 0x58] MOV RDX,qword ptr [RSP + 0x60] CALL 0x001229d0 MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0xc0],RAX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0xc8],RAX JMP 0x00147271 LAB_00147240: MOV RDI,qword ptr [RSP + 0x98] MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] CALL 0x001229d0 MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0xc0],RAX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0xc8],RAX LAB_00147271: MOV RAX,qword ptr [RSP + 0xc0] MOV RDX,qword ptr [RSP + 0xc8] ADD RSP,0xd0 POP RBX RET
int1 [16] JS_CallConstructorInternal (long param_1,long param_2,int8 param_3,int8 param_4,int8 param_5, int4 param_6,int8 param_7,uint param_8) { code *pcVar1; int iVar2; int8 uVar3; int8 uVar4; int1 auVar5 [16]; int1 auVar6 [16]; int8 in_stack_ffffffffffffff30; int4 uVar7; uint uStack_6c; int4 local_18; int4 uStack_14; int8 local_10; uVar7 = (int4)((ulong)in_stack_ffffffffffffff30 >> 0x20); iVar2 = js_poll_interrupts(param_1); if (iVar2 != 0) { local_18 = 0; local_10 = 6; goto LAB_00147271; } if ((int)param_3 == -1) { if ((*(byte *)(param_2 + 5) >> 4 & 1) == 0) { auVar5 = JS_ThrowTypeError(param_1,"not a constructor"); local_18 = auVar5._0_4_; uStack_14 = auVar5._4_4_; local_10 = auVar5._8_8_; goto LAB_00147271; } if (*(short *)(param_2 + 6) == 0xd) { if ((*(ushort *)(*(long *)(param_2 + 0x30) + 0x18) >> 3 & 1) == 0) { auVar5 = js_create_from_ctor(param_1,param_4,param_5,1); local_10 = auVar5._8_8_; uVar3 = auVar5._0_8_; iVar2 = JS_IsException(uVar3,local_10); if (iVar2 == 0) { auVar6 = JS_CallInternal(param_1,param_2,param_3,uVar3,local_10,param_6,param_4,param_5, param_7,param_8 | 1); uVar4 = auVar6._8_8_; if ((auVar6._8_4_ == -1) || (iVar2 = JS_IsException(auVar6._0_8_,uVar4), iVar2 != 0)) { JS_FreeValue(param_1,uVar3,local_10); local_18 = auVar6._0_4_; uStack_14 = auVar6._4_4_; local_10 = uVar4; } else { JS_FreeValue(param_1,auVar6._0_8_,uVar4); local_18 = auVar5._0_4_; uStack_14 = auVar5._4_4_; } } else { local_18 = 0; local_10 = 6; } } else { auVar5 = JS_CallInternal(param_1,param_2,param_3,(ulong)uStack_6c << 0x20,3,param_6,param_4, param_5,param_7,param_8 | 1); local_18 = auVar5._0_4_; uStack_14 = auVar5._4_4_; local_10 = auVar5._8_8_; } goto LAB_00147271; } pcVar1 = *(code **)(*(long *)(*(long *)(param_1 + 0x18) + 0x80) + (ulong)*(ushort *)(param_2 + 6) * 0x28 + 0x18); if (pcVar1 != (code *)0x0) { auVar5 = (*pcVar1)(param_1,param_2,param_3,param_4,param_5,param_6,param_7, CONCAT44(uVar7,param_8) | 1); local_18 = auVar5._0_4_; uStack_14 = auVar5._4_4_; local_10 = auVar5._8_8_; goto LAB_00147271; } } auVar5 = JS_ThrowTypeError(param_1,"not a function"); local_18 = auVar5._0_4_; uStack_14 = auVar5._4_4_; local_10 = auVar5._8_8_; LAB_00147271: auVar5._4_4_ = uStack_14; auVar5._0_4_ = local_18; auVar5._8_8_ = local_10; return auVar5; }
29,507
JS_CallConstructorInternal
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_CallConstructorInternal(JSContext *ctx, JSValue func_obj, JSValue new_target, int argc, JSValue *argv, int flags) { JSObject *p; JSFunctionBytecode *b; if (js_poll_interrupts(ctx)) return JS_EXCEPTION; flags |= JS_CALL_FLAG_CONSTRUCTOR; if (unlikely(JS_VALUE_GET_TAG(func_obj) != JS_TAG_OBJECT)) goto not_a_function; p = JS_VALUE_GET_OBJ(func_obj); if (unlikely(!p->is_constructor)) return JS_ThrowTypeError(ctx, "not a constructor"); if (unlikely(p->class_id != JS_CLASS_BYTECODE_FUNCTION)) { JSClassCall *call_func; call_func = ctx->rt->class_array[p->class_id].call; if (!call_func) { not_a_function: return JS_ThrowTypeError(ctx, "not a function"); } return call_func(ctx, func_obj, new_target, argc, argv, flags); } b = p->u.func.function_bytecode; if (b->is_derived_class_constructor) { return JS_CallInternal(ctx, func_obj, JS_UNDEFINED, new_target, argc, argv, flags); } else { JSValue obj, ret; /* legacy constructor behavior */ obj = js_create_from_ctor(ctx, new_target, JS_CLASS_OBJECT); if (JS_IsException(obj)) return JS_EXCEPTION; ret = JS_CallInternal(ctx, func_obj, obj, new_target, argc, argv, flags); if (JS_VALUE_GET_TAG(ret) == JS_TAG_OBJECT || JS_IsException(ret)) { JS_FreeValue(ctx, obj); return ret; } else { JS_FreeValue(ctx, ret); return obj; } } }
O3
c
JS_CallConstructorInternal: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r8, %r12 movq %rcx, %r13 movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movq %rcx, 0x28(%rsp) movq %r8, 0x30(%rsp) movl 0x1d8(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0x1d8(%rdi) cmpl $0x1, %eax jle 0x2fde7 cmpl $-0x1, %r14d jne 0x2fe42 testb $0x10, 0x5(%r15) je 0x2fe02 movl 0x78(%rsp), %ebp movq 0x70(%rsp), %rdx orl $0x1, %ebp movzwl 0x6(%r15), %eax cmpq $0xd, %rax jne 0x2fe0b movq 0x30(%r15), %rax testb $0x8, 0x18(%rax) jne 0x2fce0 movl %r9d, 0x24(%rsp) movq %rbx, %rdi movq %r13, %rsi movq %r12, %rdx movl $0x1, %ecx callq 0x373f3 movq %rdx, %r12 cmpl $0x6, %r12d jne 0x2fd1a movl $0x6, %r15d xorl %r14d, %r14d xorl %ecx, %ecx jmp 0x2fd94 movups 0x28(%rsp), %xmm0 movups %xmm0, (%rsp) movl %ebp, 0x18(%rsp) movq %rdx, 0x10(%rsp) movl $0x3, %r8d movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx xorl %ecx, %ecx callq 0x27eca movq %rax, %r14 movq %rdx, %r15 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 jmp 0x2fd91 movq %rax, %r13 movups 0x28(%rsp), %xmm0 movups %xmm0, (%rsp) movl %ebp, 0x18(%rsp) movq 0x70(%rsp), %rax movq %rax, 0x10(%rsp) movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx movq %r13, %rcx movq %r12, %r8 movl 0x24(%rsp), %r9d callq 0x27eca movq %rax, %r14 movq %rdx, %r15 cmpl $0x6, %r15d je 0x2fd5f cmpl $-0x1, %r15d jne 0x2fdac cmpl $-0x9, %r12d jb 0x2fd84 movq 0x18(%rbx), %rdi movl (%r13), %eax leal -0x1(%rax), %ecx movl %ecx, (%r13) cmpl $0x1, %eax jg 0x2fd84 movq %r13, %rsi movq %r12, %rdx callq 0x20d90 movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 movq %r14, %rcx andq %rax, %rcx movl %r14d, %eax orq %rcx, %rax movq %r15, %rdx addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpl $-0x9, %r15d jb 0x2fdcf movq 0x18(%rbx), %rdi movl (%r14), %eax leal -0x1(%rax), %ecx movl %ecx, (%r14) cmpl $0x1, %eax jg 0x2fdcf movq %r14, %rsi movq %r15, %rdx callq 0x20d90 movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 movq %r13, %rcx andq %rax, %rcx movq %r13, %r14 movq %r12, %r15 jmp 0x2fd94 movq %rbx, %rdi movl %r9d, %ebp callq 0x3de9f movl %ebp, %r9d testl %eax, %eax jne 0x2fcd0 jmp 0x2fc75 leaq 0x7119f(%rip), %rsi # 0xa0fa8 jmp 0x2fe49 movq 0x18(%rbx), %rcx movq 0x80(%rcx), %rcx leaq (%rax,%rax,4), %rax movq 0x18(%rcx,%rax,8), %rax testq %rax, %rax je 0x2fe42 movl %ebp, 0x8(%rsp) movq %rdx, (%rsp) movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx movq %r13, %rcx movq %r12, %r8 callq *%rax jmp 0x2fd08 leaq 0x71d39(%rip), %rsi # 0xa1b82 xorl %r14d, %r14d movq %rbx, %rdi xorl %eax, %eax callq 0x2214f movl $0x6, %r15d jmp 0x2fcd9
JS_CallConstructorInternal: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r12, r8 mov r13, rcx mov r14, rdx mov r15, rsi mov rbx, rdi mov qword ptr [rsp+68h+var_40], rcx mov qword ptr [rsp+68h+var_40+8], r8 mov eax, [rdi+1D8h] lea ecx, [rax-1] mov [rdi+1D8h], ecx cmp eax, 1 jle loc_2FDE7 loc_2FC75: cmp r14d, 0FFFFFFFFh jnz loc_2FE42 test byte ptr [r15+5], 10h jz loc_2FE02 mov ebp, [rsp+68h+arg_8] mov rdx, [rsp+68h+arg_0] or ebp, 1 movzx eax, word ptr [r15+6] cmp rax, 0Dh jnz loc_2FE0B mov rax, [r15+30h] test byte ptr [rax+18h], 8 jnz short loc_2FCE0 mov [rsp+68h+var_44], r9d mov rdi, rbx mov rsi, r13 mov rdx, r12 mov ecx, 1 call js_create_from_ctor mov r12, rdx cmp r12d, 6 jnz short loc_2FD1A loc_2FCD0: mov r15d, 6 xor r14d, r14d loc_2FCD9: xor ecx, ecx jmp loc_2FD94 loc_2FCE0: movups xmm0, [rsp+68h+var_40] movups [rsp+68h+var_68], xmm0 mov [rsp+68h+var_50], ebp mov [rsp+68h+var_58], rdx mov r8d, 3 mov rdi, rbx mov rsi, r15 mov rdx, r14 xor ecx, ecx call JS_CallInternal loc_2FD08: mov r14, rax mov r15, rdx mov rcx, 0FFFFFFFF00000000h jmp short loc_2FD91 loc_2FD1A: mov r13, rax movups xmm0, [rsp+68h+var_40] movups [rsp+68h+var_68], xmm0 mov [rsp+68h+var_50], ebp mov rax, [rsp+68h+arg_0] mov [rsp+68h+var_58], rax mov rdi, rbx mov rsi, r15 mov rdx, r14 mov rcx, r13 mov r8, r12 mov r9d, [rsp+68h+var_44] call JS_CallInternal mov r14, rax mov r15, rdx cmp r15d, 6 jz short loc_2FD5F cmp r15d, 0FFFFFFFFh jnz short loc_2FDAC loc_2FD5F: cmp r12d, 0FFFFFFF7h jb short loc_2FD84 mov rdi, [rbx+18h] mov eax, [r13+0] lea ecx, [rax-1] mov [r13+0], ecx cmp eax, 1 jg short loc_2FD84 mov rsi, r13 mov rdx, r12 call js_free_value_rt loc_2FD84: mov rax, 0FFFFFFFF00000000h mov rcx, r14 loc_2FD91: and rcx, rax loc_2FD94: mov eax, r14d or rax, rcx mov rdx, r15 add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2FDAC: cmp r15d, 0FFFFFFF7h jb short loc_2FDCF mov rdi, [rbx+18h] mov eax, [r14] lea ecx, [rax-1] mov [r14], ecx cmp eax, 1 jg short loc_2FDCF mov rsi, r14 mov rdx, r15 call js_free_value_rt loc_2FDCF: mov rax, 0FFFFFFFF00000000h mov rcx, r13 and rcx, rax mov r14, r13 mov r15, r12 jmp short loc_2FD94 loc_2FDE7: mov rdi, rbx mov ebp, r9d call __js_poll_interrupts mov r9d, ebp test eax, eax jnz loc_2FCD0 jmp loc_2FC75 loc_2FE02: lea rsi, aNotAConstructo; "not a constructor" jmp short loc_2FE49 loc_2FE0B: mov rcx, [rbx+18h] mov rcx, [rcx+80h] lea rax, [rax+rax*4] mov rax, [rcx+rax*8+18h] test rax, rax jz short loc_2FE42 mov dword ptr [rsp+68h+var_68+8], ebp mov qword ptr [rsp+68h+var_68], rdx mov rdi, rbx mov rsi, r15 mov rdx, r14 mov rcx, r13 mov r8, r12 call rax jmp loc_2FD08 loc_2FE42: lea rsi, aSetAddIsNotAFu+0Bh; "not a function" loc_2FE49: xor r14d, r14d mov rdi, rbx xor eax, eax call JS_ThrowTypeError mov r15d, 6 jmp loc_2FCD9
unsigned long long JS_CallConstructorInternal( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, long long a15, int a16) { long long v18; // r14 int v19; // eax long long v20; // rcx long long v21; // rax long long v22; // rax long long v23; // rdx __m128 v24; // xmm4 __m128 v25; // xmm5 long long v26; // r12 _QWORD *v27; // r14 unsigned long long v28; // rcx unsigned long long v29; // rax unsigned long long v30; // rcx long long v31; // r13 _DWORD *v32; // rax long long v33; // rdx long long v34; // r8 long long v35; // r9 long long v36; // rdi int v37; // eax long long v38; // rcx long long v40; // rdi int v41; // eax long long v42; // rcx unsigned int v43; // ebp int v44; // eax char *v45; // rsi long long ( *v46)(long long, long long, long long, long long, long long, long long, long long, unsigned int); // rax char v47; // [rsp+0h] [rbp-68h] unsigned int v48; // [rsp+24h] [rbp-44h] __m128i v49; // [rsp+28h] [rbp-40h] v18 = a3; v49.m128i_i64[0] = a4; v49.m128i_i64[1] = a5; v19 = *(_DWORD *)(a1 + 472); v20 = (unsigned int)(v19 - 1); *(_DWORD *)(a1 + 472) = v20; if ( v19 <= 1 ) { v43 = a6; v44 = _js_poll_interrupts(a1); a6 = v43; if ( v44 ) goto LABEL_7; } if ( (_DWORD)v18 != -1 ) { LABEL_28: v45 = "not a function"; goto LABEL_29; } if ( (*(_BYTE *)(a2 + 5) & 0x10) == 0 ) { v45 = "not a constructor"; LABEL_29: LODWORD(v27) = 0; JS_ThrowTypeError(a1, (long long)v45, a3, v20, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v47); goto LABEL_8; } a3 = a15; v21 = *(unsigned __int16 *)(a2 + 6); if ( v21 != 13 ) { v20 = *(_QWORD *)(*(_QWORD *)(a1 + 24) + 128LL); v46 = *(long long ( **)(long long, long long, long long, long long, long long, long long, long long, unsigned int))(v20 + 40 * v21 + 24); if ( v46 ) { v29 = v46(a1, a2, v18, a4, a5, a6, a15, a16 | 1u); goto LABEL_10; } goto LABEL_28; } if ( (*(_BYTE *)(*(_QWORD *)(a2 + 48) + 24LL) & 8) != 0 ) { v29 = JS_CallInternal( a1, a2, v18, 0LL, 3LL, a6, v49, a8, a9, a10, a11, a12, a13, a14, v49.m128i_i8[0], v49.m128i_i32[2], a15, a16 | 1u); LABEL_10: LODWORD(v27) = v29; v30 = 0xFFFFFFFF00000000LL; LABEL_17: v28 = v29 & v30; return v28 | (unsigned int)v27; } v48 = a6; v22 = js_create_from_ctor(a1, a4, a5, 1LL); v26 = v23; if ( (_DWORD)v23 == 6 ) { LABEL_7: LODWORD(v27) = 0; LABEL_8: v28 = 0LL; return v28 | (unsigned int)v27; } v31 = v22; v32 = (_DWORD *)JS_CallInternal( a1, a2, v18, v22, v23, v48, v49, a8, a9, a10, v24, v25, a13, a14, v49.m128i_i8[0], v49.m128i_i32[2], a15, a16 | 1u); v27 = v32; if ( (_DWORD)v33 == 6 || (_DWORD)v33 == -1 ) { if ( (unsigned int)v26 >= 0xFFFFFFF7 ) { v36 = *(_QWORD *)(a1 + 24); v37 = *(_DWORD *)v31; v38 = (unsigned int)(*(_DWORD *)v31 - 1); *(_DWORD *)v31 = v38; if ( v37 <= 1 ) js_free_value_rt(v36, (_QWORD *)v31, v26, v38, v34, v35); } v29 = 0xFFFFFFFF00000000LL; v30 = (unsigned long long)v27; goto LABEL_17; } if ( (unsigned int)v33 >= 0xFFFFFFF7 ) { v40 = *(_QWORD *)(a1 + 24); v41 = *v32; v42 = (unsigned int)(v41 - 1); *(_DWORD *)v27 = v42; if ( v41 <= 1 ) js_free_value_rt(v40, v27, v33, v42, v34, v35); } v28 = v31 & 0xFFFFFFFF00000000LL; LODWORD(v27) = v31; return v28 | (unsigned int)v27; }
JS_CallConstructorInternal: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R12,R8 MOV R13,RCX MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV qword ptr [RSP + 0x28],RCX MOV qword ptr [RSP + 0x30],R8 MOV EAX,dword ptr [RDI + 0x1d8] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0x1d8],ECX CMP EAX,0x1 JLE 0x0012fde7 LAB_0012fc75: CMP R14D,-0x1 JNZ 0x0012fe42 TEST byte ptr [R15 + 0x5],0x10 JZ 0x0012fe02 MOV EBP,dword ptr [RSP + 0x78] MOV RDX,qword ptr [RSP + 0x70] OR EBP,0x1 MOVZX EAX,word ptr [R15 + 0x6] CMP RAX,0xd JNZ 0x0012fe0b MOV RAX,qword ptr [R15 + 0x30] TEST byte ptr [RAX + 0x18],0x8 JNZ 0x0012fce0 MOV dword ptr [RSP + 0x24],R9D MOV RDI,RBX MOV RSI,R13 MOV RDX,R12 MOV ECX,0x1 CALL 0x001373f3 MOV R12,RDX CMP R12D,0x6 JNZ 0x0012fd1a LAB_0012fcd0: MOV R15D,0x6 XOR R14D,R14D LAB_0012fcd9: XOR ECX,ECX JMP 0x0012fd94 LAB_0012fce0: MOVUPS XMM0,xmmword ptr [RSP + 0x28] MOVUPS xmmword ptr [RSP],XMM0 MOV dword ptr [RSP + 0x18],EBP MOV qword ptr [RSP + 0x10],RDX MOV R8D,0x3 MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 XOR ECX,ECX CALL 0x00127eca LAB_0012fd08: MOV R14,RAX MOV R15,RDX MOV RCX,-0x100000000 JMP 0x0012fd91 LAB_0012fd1a: MOV R13,RAX MOVUPS XMM0,xmmword ptr [RSP + 0x28] MOVUPS xmmword ptr [RSP],XMM0 MOV dword ptr [RSP + 0x18],EBP MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x10],RAX MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 MOV RCX,R13 MOV R8,R12 MOV R9D,dword ptr [RSP + 0x24] CALL 0x00127eca MOV R14,RAX MOV R15,RDX CMP R15D,0x6 JZ 0x0012fd5f CMP R15D,-0x1 JNZ 0x0012fdac LAB_0012fd5f: CMP R12D,-0x9 JC 0x0012fd84 MOV RDI,qword ptr [RBX + 0x18] MOV EAX,dword ptr [R13] LEA ECX,[RAX + -0x1] MOV dword ptr [R13],ECX CMP EAX,0x1 JG 0x0012fd84 MOV RSI,R13 MOV RDX,R12 CALL 0x00120d90 LAB_0012fd84: MOV RAX,-0x100000000 MOV RCX,R14 LAB_0012fd91: AND RCX,RAX LAB_0012fd94: MOV EAX,R14D OR RAX,RCX MOV RDX,R15 ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012fdac: CMP R15D,-0x9 JC 0x0012fdcf MOV RDI,qword ptr [RBX + 0x18] MOV EAX,dword ptr [R14] LEA ECX,[RAX + -0x1] MOV dword ptr [R14],ECX CMP EAX,0x1 JG 0x0012fdcf MOV RSI,R14 MOV RDX,R15 CALL 0x00120d90 LAB_0012fdcf: MOV RAX,-0x100000000 MOV RCX,R13 AND RCX,RAX MOV R14,R13 MOV R15,R12 JMP 0x0012fd94 LAB_0012fde7: MOV RDI,RBX MOV EBP,R9D CALL 0x0013de9f MOV R9D,EBP TEST EAX,EAX JNZ 0x0012fcd0 JMP 0x0012fc75 LAB_0012fe02: LEA RSI,[0x1a0fa8] JMP 0x0012fe49 LAB_0012fe0b: MOV RCX,qword ptr [RBX + 0x18] MOV RCX,qword ptr [RCX + 0x80] LEA RAX,[RAX + RAX*0x4] MOV RAX,qword ptr [RCX + RAX*0x8 + 0x18] TEST RAX,RAX JZ 0x0012fe42 MOV dword ptr [RSP + 0x8],EBP MOV qword ptr [RSP],RDX MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 MOV RCX,R13 MOV R8,R12 CALL RAX JMP 0x0012fd08 LAB_0012fe42: LEA RSI,[0x1a1b82] LAB_0012fe49: XOR R14D,R14D MOV RDI,RBX XOR EAX,EAX CALL 0x0012214f MOV R15D,0x6 JMP 0x0012fcd9
int1 [16] JS_CallConstructorInternal (long param_1,long param_2,int8 param_3,int8 param_4,int8 param_5, ulong param_6,int8 param_7,uint param_8) { int8 uVar1; code *pcVar2; int iVar3; int *piVar4; int *piVar5; ulong uVar6; char *pcVar7; uint uVar8; int1 auVar9 [16]; int1 auVar10 [16]; int1 auVar11 [16]; int4 uStack_38; iVar3 = *(int *)(param_1 + 0x1d8); *(int *)(param_1 + 0x1d8) = iVar3 + -1; if (iVar3 < 2) { iVar3 = __js_poll_interrupts(param_1); param_6 = param_6 & 0xffffffff; if (iVar3 == 0) goto LAB_0012fc75; } else { LAB_0012fc75: if ((int)param_3 == -1) { if ((*(byte *)(param_2 + 5) & 0x10) != 0) { param_8 = param_8 | 1; if ((ulong)*(ushort *)(param_2 + 6) == 0xd) { uStack_38 = (int4)param_5; if ((*(byte *)(*(long *)(param_2 + 0x30) + 0x18) & 8) != 0) { auVar10 = JS_CallInternal(param_1,param_2,param_3,0,3,param_6,param_4,uStack_38,param_7, param_8); goto LAB_0012fd08; } auVar9 = js_create_from_ctor(param_1,param_4,param_5,1); piVar4 = auVar9._0_8_; if (auVar9._8_4_ == 6) goto LAB_0012fcd9; auVar10 = JS_CallInternal(param_1,param_2,param_3,piVar4,auVar9._8_8_,param_6 & 0xffffffff ,param_4,uStack_38,param_7,param_8); piVar5 = auVar10._0_8_; uVar8 = auVar10._8_4_; if ((uVar8 != 6) && (uVar8 != 0xffffffff)) { if (0xfffffff6 < uVar8) { uVar1 = *(int8 *)(param_1 + 0x18); iVar3 = *piVar5; *piVar5 = iVar3 + -1; if (iVar3 < 2) { js_free_value_rt(uVar1,piVar5,auVar10._8_8_); } } uVar6 = (ulong)piVar4 & 0xffffffff00000000; goto LAB_0012fd94; } if (0xfffffff6 < auVar9._8_4_) { uVar1 = *(int8 *)(param_1 + 0x18); iVar3 = *piVar4; *piVar4 = iVar3 + -1; if (iVar3 < 2) { js_free_value_rt(uVar1,piVar4,auVar9._8_8_); } } auVar10._8_8_ = auVar10._8_8_; auVar10._0_8_ = 0xffffffff00000000; piVar4 = piVar5; } else { pcVar2 = *(code **)(*(long *)(*(long *)(param_1 + 0x18) + 0x80) + 0x18 + (ulong)*(ushort *)(param_2 + 6) * 0x28); if (pcVar2 == (code *)0x0) goto LAB_0012fe42; auVar10 = (*pcVar2)(param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8); LAB_0012fd08: piVar4 = auVar10._0_8_; piVar5 = (int *)0xffffffff00000000; } auVar9._8_8_ = auVar10._8_8_; auVar9._0_8_ = piVar4; uVar6 = (ulong)piVar5 & auVar10._0_8_; goto LAB_0012fd94; } pcVar7 = "not a constructor"; } else { LAB_0012fe42: pcVar7 = "not a function"; } JS_ThrowTypeError(param_1,pcVar7); } LAB_0012fcd9: auVar9 = ZEXT816(6) << 0x40; uVar6 = 0; LAB_0012fd94: auVar11._0_8_ = auVar9._0_8_ & 0xffffffff | uVar6; auVar11._8_8_ = auVar9._8_8_; return auVar11; }
29,508
js_std_file_finalizer
bluesky950520[P]quickjs/quickjs-libc.c
static void js_std_file_finalizer(JSRuntime *rt, JSValue val) { JSThreadState *ts = js_get_thread_state(rt); JSSTDFile *s = JS_GetOpaque(val, ts->std_file_class_id); if (s) { if (s->f && !is_stdio(s->f)) { #if !defined(__wasi__) if (s->is_popen) pclose(s->f); else #endif fclose(s->f); } js_free_rt(rt, s); } }
O0
c
js_std_file_finalizer: subq $0x28, %rsp movq %rsi, 0x18(%rsp) movq %rdx, 0x20(%rsp) movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rdi callq 0x115d0 movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax movl 0x78(%rax), %edx movq 0x18(%rsp), %rdi movq 0x20(%rsp), %rsi callq 0x38350 movq %rax, (%rsp) cmpq $0x0, (%rsp) je 0x12873 movq (%rsp), %rax cmpq $0x0, (%rax) je 0x12865 movq (%rsp), %rax movq (%rax), %rdi callq 0x12880 cmpl $0x0, %eax jne 0x12865 movq (%rsp), %rax cmpl $0x0, 0x8(%rax) je 0x12857 movq (%rsp), %rax movq (%rax), %rdi callq 0xe2c0 jmp 0x12863 movq (%rsp), %rax movq (%rax), %rdi callq 0xe220 jmp 0x12865 movq 0x10(%rsp), %rdi movq (%rsp), %rsi callq 0x21960 addq $0x28, %rsp retq nopl (%rax,%rax)
js_std_file_finalizer: sub rsp, 28h mov [rsp+28h+var_10], rsi mov [rsp+28h+var_8], rdx mov [rsp+28h+var_18], rdi mov rdi, [rsp+28h+var_18] call js_get_thread_state mov [rsp+28h+var_20], rax mov rax, [rsp+28h+var_20] mov edx, [rax+78h] mov rdi, [rsp+28h+var_10] mov rsi, [rsp+28h+var_8] call JS_GetOpaque mov [rsp+28h+var_28], rax cmp [rsp+28h+var_28], 0 jz short loc_12873 mov rax, [rsp+28h+var_28] cmp qword ptr [rax], 0 jz short loc_12865 mov rax, [rsp+28h+var_28] mov rdi, [rax] call is_stdio cmp eax, 0 jnz short loc_12865 mov rax, [rsp+28h+var_28] cmp dword ptr [rax+8], 0 jz short loc_12857 mov rax, [rsp+28h+var_28] mov rdi, [rax] call _pclose jmp short loc_12863 loc_12857: mov rax, [rsp+28h+var_28] mov rdi, [rax] call _fclose loc_12863: jmp short $+2 loc_12865: mov rdi, [rsp+28h+var_18] mov rsi, [rsp+28h+var_28] call js_free_rt loc_12873: add rsp, 28h retn
_QWORD * js_std_file_finalizer(long long a1, long long a2, long long a3, int a4, int a5, int a6) { _QWORD *result; // rax _QWORD *v7; // [rsp+0h] [rbp-28h] long long thread_state; // [rsp+8h] [rbp-20h] thread_state = js_get_thread_state(a1, a2, a3, a4, a5, a6); result = (_QWORD *)JS_GetOpaque(a2, a3, *(unsigned int *)(thread_state + 120)); v7 = result; if ( result ) { if ( *result && !(unsigned int)is_stdio(*result) ) { if ( *((_DWORD *)v7 + 2) ) pclose(*v7); else fclose(*v7); } return (_QWORD *)js_free_rt(a1, v7); } return result; }
js_std_file_finalizer: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RSI MOV qword ptr [RSP + 0x20],RDX MOV qword ptr [RSP + 0x10],RDI MOV RDI,qword ptr [RSP + 0x10] CALL 0x001115d0 MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x8] MOV EDX,dword ptr [RAX + 0x78] MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x20] CALL 0x00138350 MOV qword ptr [RSP],RAX CMP qword ptr [RSP],0x0 JZ 0x00112873 MOV RAX,qword ptr [RSP] CMP qword ptr [RAX],0x0 JZ 0x00112865 MOV RAX,qword ptr [RSP] MOV RDI,qword ptr [RAX] CALL 0x00112880 CMP EAX,0x0 JNZ 0x00112865 MOV RAX,qword ptr [RSP] CMP dword ptr [RAX + 0x8],0x0 JZ 0x00112857 MOV RAX,qword ptr [RSP] MOV RDI,qword ptr [RAX] CALL 0x0010e2c0 JMP 0x00112863 LAB_00112857: MOV RAX,qword ptr [RSP] MOV RDI,qword ptr [RAX] CALL 0x0010e220 LAB_00112863: JMP 0x00112865 LAB_00112865: MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP] CALL 0x00121960 LAB_00112873: ADD RSP,0x28 RET
void js_std_file_finalizer(int8 param_1,int8 param_2,int8 param_3) { int iVar1; long lVar2; long *plVar3; lVar2 = js_get_thread_state(param_1); plVar3 = (long *)JS_GetOpaque(param_2,param_3,*(int4 *)(lVar2 + 0x78)); if (plVar3 != (long *)0x0) { if ((*plVar3 != 0) && (iVar1 = is_stdio(*plVar3), iVar1 == 0)) { if ((int)plVar3[1] == 0) { fclose((FILE *)*plVar3); } else { pclose((FILE *)*plVar3); } } js_free_rt(param_1,plVar3); } return; }
29,509
js_std_file_finalizer
bluesky950520[P]quickjs/quickjs-libc.c
static void js_std_file_finalizer(JSRuntime *rt, JSValue val) { JSThreadState *ts = js_get_thread_state(rt); JSSTDFile *s = JS_GetOpaque(val, ts->std_file_class_id); if (s) { if (s->f && !is_stdio(s->f)) { #if !defined(__wasi__) if (s->is_popen) pclose(s->f); else #endif fclose(s->f); } js_free_rt(rt, s); } }
O2
c
js_std_file_finalizer: pushq %r15 pushq %r14 pushq %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx callq 0x1028a movl 0x78(%rax), %edx movq %r15, %rdi movq %r14, %rsi callq 0x211f2 testq %rax, %rax je 0x10d09 movq %rax, %r14 movq (%rax), %r15 testq %r15, %r15 je 0x10d17 movq %r15, %rdi callq 0x10d27 testl %eax, %eax jne 0x10d17 cmpl $0x0, 0x8(%r14) je 0x10d0f movq %r15, %rdi callq 0xe2d0 jmp 0x10d17 popq %rbx popq %r14 popq %r15 retq movq %r15, %rdi callq 0xe230 movq %rbx, %rdi movq %r14, %rsi popq %rbx popq %r14 popq %r15 jmp 0x170cb
js_std_file_finalizer: push r15 push r14 push rbx mov r14, rdx mov r15, rsi mov rbx, rdi call js_get_thread_state mov edx, [rax+78h] mov rdi, r15 mov rsi, r14 call JS_GetOpaque test rax, rax jz short loc_10D09 mov r14, rax mov r15, [rax] test r15, r15 jz short loc_10D17 mov rdi, r15 call is_stdio test eax, eax jnz short loc_10D17 cmp dword ptr [r14+8], 0 jz short loc_10D0F mov rdi, r15 call _pclose jmp short loc_10D17 loc_10D09: pop rbx pop r14 pop r15 retn loc_10D0F: mov rdi, r15 call _fclose loc_10D17: mov rdi, rbx mov rsi, r14 pop rbx pop r14 pop r15 jmp js_free_rt
_QWORD * js_std_file_finalizer(long long a1, long long a2, long long a3, int a4, int a5, int a6) { long long thread_state; // rax _QWORD *result; // rax _QWORD *v9; // r14 long long v10; // r15 char v11; // [rsp+0h] [rbp-18h] thread_state = js_get_thread_state(a1, a2, a3, a4, a5, a6, v11); result = (_QWORD *)JS_GetOpaque(a2, a3, *(unsigned int *)(thread_state + 120)); if ( result ) { v9 = result; v10 = *result; if ( *result && !(unsigned int)is_stdio(*result) ) { if ( *((_DWORD *)v9 + 2) ) pclose(v10); else fclose(v10); } return (_QWORD *)js_free_rt(a1, v9); } return result; }
js_std_file_finalizer: PUSH R15 PUSH R14 PUSH RBX MOV R14,RDX MOV R15,RSI MOV RBX,RDI CALL 0x0011028a MOV EDX,dword ptr [RAX + 0x78] MOV RDI,R15 MOV RSI,R14 CALL 0x001211f2 TEST RAX,RAX JZ 0x00110d09 MOV R14,RAX MOV R15,qword ptr [RAX] TEST R15,R15 JZ 0x00110d17 MOV RDI,R15 CALL 0x00110d27 TEST EAX,EAX JNZ 0x00110d17 CMP dword ptr [R14 + 0x8],0x0 JZ 0x00110d0f MOV RDI,R15 CALL 0x0010e2d0 JMP 0x00110d17 LAB_00110d09: POP RBX POP R14 POP R15 RET LAB_00110d0f: MOV RDI,R15 CALL 0x0010e230 LAB_00110d17: MOV RDI,RBX MOV RSI,R14 POP RBX POP R14 POP R15 JMP 0x001170cb
void js_std_file_finalizer(int8 param_1,int8 param_2,int8 param_3) { FILE *__stream; long lVar1; int iVar2; int8 *puVar3; lVar1 = js_get_thread_state(); puVar3 = (int8 *)JS_GetOpaque(param_2,param_3,*(int4 *)(lVar1 + 0x78)); if (puVar3 != (int8 *)0x0) { __stream = (FILE *)*puVar3; if (__stream != (FILE *)0x0) { iVar2 = is_stdio(__stream); if (iVar2 == 0) { if (*(int *)(puVar3 + 1) == 0) { fclose(__stream); } else { pclose(__stream); } } } js_free_rt(param_1,puVar3); return; } return; }
29,510
ft_boolean_read_next
eloqsql/storage/myisam/ft_boolean_search.c
int ft_boolean_read_next(FT_INFO *ftb, char *record) { FTB_EXPR *ftbe; FTB_WORD *ftbw; MI_INFO *info=ftb->info; my_off_t curdoc; if (ftb->state != INDEX_SEARCH && ftb->state != INDEX_DONE) return -1; /* black magic ON */ if ((int) _mi_check_index(info, ftb->keynr) < 0) return my_errno; if (_mi_readinfo(info, F_RDLCK, 1)) return my_errno; /* black magic OFF */ if (!ftb->queue.elements) return my_errno=HA_ERR_END_OF_FILE; /* Attention!!! Address of a local variable is used here! See err: label */ ftb->queue.first_cmp_arg=(void *)&curdoc; while (ftb->state == INDEX_SEARCH && (curdoc=((FTB_WORD *)queue_top(& ftb->queue))->docid[0]) != HA_OFFSET_ERROR) { while (curdoc == (ftbw=(FTB_WORD *)queue_top(& ftb->queue))->docid[0]) { if (unlikely(_ftb_climb_the_tree(ftb, ftbw, 0))) { my_errno= HA_ERR_OUT_OF_MEM; goto err; } /* update queue */ _ft2_search(ftb, ftbw, 0); queue_replace_top(&ftb->queue); } ftbe=ftb->root; if (ftbe->docid[0]==curdoc && ftbe->cur_weight>0 && ftbe->yesses>=(ftbe->ythresh-ftbe->yweaks) && !ftbe->nos) { /* curdoc matched ! */ if (is_tree_inited(&ftb->no_dupes) && tree_insert(&ftb->no_dupes, &curdoc, 0, ftb->no_dupes.custom_arg)->count >1) /* but it managed already to get past this line once */ continue; info->lastpos=curdoc; /* Clear all states, except that the table was updated */ info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED); if (!(*info->read_record)(info,curdoc, (uchar*) record)) { info->update|= HA_STATE_AKTIV; /* Record is read */ if (ftb->with_scan && ft_boolean_find_relevance(ftb,(uchar*) record,0)==0) continue; /* no match */ my_errno=0; goto err; } goto err; } } ftb->state=INDEX_DONE; my_errno=HA_ERR_END_OF_FILE; err: ftb->queue.first_cmp_arg=(void *)0; return my_errno; }
O0
c
ft_boolean_read_next: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax cmpl $0x2, 0x348(%rax) je 0x9fc82 movq -0x10(%rbp), %rax cmpl $0x3, 0x348(%rax) je 0x9fc82 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x9ff12 movq -0x30(%rbp), %rdi movq -0x10(%rbp), %rax movl 0x340(%rax), %esi callq 0xbf990 cmpl $0x0, %eax jge 0x9fca9 callq 0xfabb0 movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0x9ff12 movq -0x30(%rbp), %rdi xorl %esi, %esi movl $0x1, %edx callq 0xb23c0 cmpl $0x0, %eax je 0x9fccd callq 0xfabb0 movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0x9ff12 movq -0x10(%rbp), %rax cmpl $0x0, 0x80(%rax) jne 0x9fcf1 callq 0xfabb0 movl $0x89, (%rax) movl $0x89, -0x4(%rbp) jmp 0x9ff12 movq -0x10(%rbp), %rax leaq -0x38(%rbp), %rcx movq %rcx, 0x78(%rax) movq -0x10(%rbp), %rcx xorl %eax, %eax cmpl $0x2, 0x348(%rcx) movb %al, -0x39(%rbp) jne 0x9fd2d movq -0x10(%rbp), %rax movq 0x70(%rax), %rax movq 0x8(%rax), %rax movq 0x10(%rax), %rax movq %rax, -0x38(%rbp) cmpq $-0x1, %rax setne %al movb %al, -0x39(%rbp) movb -0x39(%rbp), %al testb $0x1, %al jne 0x9fd39 jmp 0x9fee3 jmp 0x9fd3b movq -0x38(%rbp), %rax movq -0x10(%rbp), %rcx movq 0x70(%rcx), %rcx movq 0x8(%rcx), %rcx movq %rcx, -0x28(%rbp) cmpq 0x10(%rcx), %rax jne 0x9fdac movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi xorl %eax, %eax movl %eax, %edx callq 0x9ff20 cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x9fd89 callq 0xfabb0 movl $0x80, (%rax) jmp 0x9fefc movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi xorl %edx, %edx callq 0xa0290 movq -0x10(%rbp), %rdi addq $0x70, %rdi movl $0x1, %esi callq 0xfc0a0 jmp 0x9fd3b movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq 0x10(%rax), %rax cmpq -0x38(%rbp), %rax jne 0x9fede movq -0x20(%rbp), %rax movss 0x2c(%rax), %xmm0 xorps %xmm1, %xmm1 ucomiss %xmm1, %xmm0 jbe 0x9fede movq -0x20(%rbp), %rax movl 0x40(%rax), %eax movq -0x20(%rbp), %rcx movl 0x48(%rcx), %ecx movq -0x20(%rbp), %rdx subl 0x4c(%rdx), %ecx cmpl %ecx, %eax jb 0x9fede movq -0x20(%rbp), %rax cmpl $0x0, 0x44(%rax) jne 0x9fede movq -0x10(%rbp), %rax cmpq $0x0, 0xa0(%rax) je 0x9fe4b movq -0x10(%rbp), %rdi addq $0xa0, %rdi movq -0x10(%rbp), %rax movq 0x2d0(%rax), %rcx leaq -0x38(%rbp), %rsi xorl %edx, %edx callq 0xff280 movl 0x10(%rax), %eax andl $0x7fffffff, %eax # imm = 0x7FFFFFFF cmpl $0x1, %eax jle 0x9fe4b jmp 0x9fcfd movq -0x38(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, 0x170(%rax) movq -0x30(%rbp), %rax movl 0x1d0(%rax), %ecx andl $0x401, %ecx # imm = 0x401 movl %ecx, 0x1d0(%rax) movq -0x30(%rbp), %rax movq 0x140(%rax), %rax movq -0x30(%rbp), %rdi movq -0x38(%rbp), %rsi movq -0x18(%rbp), %rdx callq *%rax cmpl $0x0, %eax jne 0x9fedc movq -0x30(%rbp), %rax movl 0x1d0(%rax), %ecx orl $0x2, %ecx movl %ecx, 0x1d0(%rax) movq -0x10(%rbp), %rax movzbl 0x344(%rax), %eax cmpl $0x0, %eax je 0x9fecf movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi xorl %edx, %edx callq 0xa0340 xorps %xmm1, %xmm1 ucomiss %xmm1, %xmm0 jne 0x9fecf jp 0x9fecf jmp 0x9fcfd callq 0xfabb0 movl $0x0, (%rax) jmp 0x9fefc jmp 0x9fefc jmp 0x9fcfd movq -0x10(%rbp), %rax movl $0x3, 0x348(%rax) callq 0xfabb0 movl $0x89, (%rax) movq -0x10(%rbp), %rax movq $0x0, 0x78(%rax) callq 0xfabb0 movl (%rax), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopl (%rax,%rax)
ft_boolean_read_next: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_30], rax mov rax, [rbp+var_10] cmp dword ptr [rax+348h], 2 jz short loc_9FC82 mov rax, [rbp+var_10] cmp dword ptr [rax+348h], 3 jz short loc_9FC82 mov [rbp+var_4], 0FFFFFFFFh jmp loc_9FF12 loc_9FC82: mov rdi, [rbp+var_30] mov rax, [rbp+var_10] mov esi, [rax+340h] call _mi_check_index cmp eax, 0 jge short loc_9FCA9 call _my_thread_var mov eax, [rax] mov [rbp+var_4], eax jmp loc_9FF12 loc_9FCA9: mov rdi, [rbp+var_30] xor esi, esi mov edx, 1 call _mi_readinfo cmp eax, 0 jz short loc_9FCCD call _my_thread_var mov eax, [rax] mov [rbp+var_4], eax jmp loc_9FF12 loc_9FCCD: mov rax, [rbp+var_10] cmp dword ptr [rax+80h], 0 jnz short loc_9FCF1 call _my_thread_var mov dword ptr [rax], 89h mov [rbp+var_4], 89h jmp loc_9FF12 loc_9FCF1: mov rax, [rbp+var_10] lea rcx, [rbp+var_38] mov [rax+78h], rcx loc_9FCFD: mov rcx, [rbp+var_10] xor eax, eax cmp dword ptr [rcx+348h], 2 mov [rbp+var_39], al jnz short loc_9FD2D mov rax, [rbp+var_10] mov rax, [rax+70h] mov rax, [rax+8] mov rax, [rax+10h] mov [rbp+var_38], rax cmp rax, 0FFFFFFFFFFFFFFFFh setnz al mov [rbp+var_39], al loc_9FD2D: mov al, [rbp+var_39] test al, 1 jnz short loc_9FD39 jmp loc_9FEE3 loc_9FD39: jmp short $+2 loc_9FD3B: mov rax, [rbp+var_38] mov rcx, [rbp+var_10] mov rcx, [rcx+70h] mov rcx, [rcx+8] mov [rbp+var_28], rcx cmp rax, [rcx+10h] jnz short loc_9FDAC mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] xor eax, eax mov edx, eax call _ftb_climb_the_tree cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_9FD89 call _my_thread_var mov dword ptr [rax], 80h jmp loc_9FEFC loc_9FD89: mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] xor edx, edx call _ft2_search mov rdi, [rbp+var_10] add rdi, 70h ; 'p' mov esi, 1 call _downheap jmp short loc_9FD3B loc_9FDAC: mov rax, [rbp+var_10] mov rax, [rax+18h] mov [rbp+var_20], rax mov rax, [rbp+var_20] mov rax, [rax+10h] cmp rax, [rbp+var_38] jnz loc_9FEDE mov rax, [rbp+var_20] movss xmm0, dword ptr [rax+2Ch] xorps xmm1, xmm1 ucomiss xmm0, xmm1 jbe loc_9FEDE mov rax, [rbp+var_20] mov eax, [rax+40h] mov rcx, [rbp+var_20] mov ecx, [rcx+48h] mov rdx, [rbp+var_20] sub ecx, [rdx+4Ch] cmp eax, ecx jb loc_9FEDE mov rax, [rbp+var_20] cmp dword ptr [rax+44h], 0 jnz loc_9FEDE mov rax, [rbp+var_10] cmp qword ptr [rax+0A0h], 0 jz short loc_9FE4B mov rdi, [rbp+var_10] add rdi, 0A0h mov rax, [rbp+var_10] mov rcx, [rax+2D0h] lea rsi, [rbp+var_38] xor edx, edx call tree_insert mov eax, [rax+10h] and eax, 7FFFFFFFh cmp eax, 1 jle short loc_9FE4B jmp loc_9FCFD loc_9FE4B: mov rcx, [rbp+var_38] mov rax, [rbp+var_30] mov [rax+170h], rcx mov rax, [rbp+var_30] mov ecx, [rax+1D0h] and ecx, 401h mov [rax+1D0h], ecx mov rax, [rbp+var_30] mov rax, [rax+140h] mov rdi, [rbp+var_30] mov rsi, [rbp+var_38] mov rdx, [rbp+var_18] call rax cmp eax, 0 jnz short loc_9FEDC mov rax, [rbp+var_30] mov ecx, [rax+1D0h] or ecx, 2 mov [rax+1D0h], ecx mov rax, [rbp+var_10] movzx eax, byte ptr [rax+344h] cmp eax, 0 jz short loc_9FECF mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] xor edx, edx call ft_boolean_find_relevance xorps xmm1, xmm1 ucomiss xmm0, xmm1 jnz short loc_9FECF jp short loc_9FECF jmp loc_9FCFD loc_9FECF: call _my_thread_var mov dword ptr [rax], 0 jmp short loc_9FEFC loc_9FEDC: jmp short loc_9FEFC loc_9FEDE: jmp loc_9FCFD loc_9FEE3: mov rax, [rbp+var_10] mov dword ptr [rax+348h], 3 call _my_thread_var mov dword ptr [rax], 89h loc_9FEFC: mov rax, [rbp+var_10] mov qword ptr [rax+78h], 0 call _my_thread_var mov eax, [rax] mov [rbp+var_4], eax loc_9FF12: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long ft_boolean_read_next(long long a1, const char *a2) { long long v2; // rdi const char *v3; // rsi bool v5; // [rsp+7h] [rbp-39h] const char *v6; // [rsp+8h] [rbp-38h] BYREF long long v7; // [rsp+10h] [rbp-30h] long long v8; // [rsp+18h] [rbp-28h] long long v9; // [rsp+20h] [rbp-20h] const char *v10; // [rsp+28h] [rbp-18h] long long v11; // [rsp+30h] [rbp-10h] v11 = a1; v10 = a2; v7 = *(_QWORD *)(a1 + 8); if ( *(_DWORD *)(a1 + 840) == 2 || *(_DWORD *)(v11 + 840) == 3 ) { v2 = v7; v3 = (const char *)*(unsigned int *)(v11 + 832); if ( (int)mi_check_index(v7, v3) < 0 ) return *(unsigned int *)my_thread_var(v2, v3); v2 = v7; v3 = 0LL; if ( (unsigned int)mi_readinfo(v7, 0LL, 1LL) ) { return *(unsigned int *)my_thread_var(v2, v3); } else if ( *(_DWORD *)(v11 + 128) ) { *(_QWORD *)(v11 + 120) = &v6; while ( 1 ) { v5 = 0; if ( *(_DWORD *)(v11 + 840) == 2 ) { v6 = *(const char **)(*(_QWORD *)(*(_QWORD *)(v11 + 112) + 8LL) + 16LL); v5 = v6 + 1 != 0LL; } if ( !v5 ) break; while ( 1 ) { v8 = *(_QWORD *)(*(_QWORD *)(v11 + 112) + 8LL); if ( v6 != *(const char **)(v8 + 16) ) break; v2 = v11; v3 = (const char *)v8; if ( (unsigned int)ftb_climb_the_tree(v11, v8, 0LL) ) { *(_DWORD *)my_thread_var(v2, v3) = 128; goto LABEL_30; } ft2_search(v11, v8, 0LL); v2 = v11 + 112; v3 = (_BYTE *)(&dword_0 + 1); downheap(v11 + 112, 1LL); } v9 = *(_QWORD *)(v11 + 24); if ( *(const char **)(v9 + 16) == v6 && *(float *)(v9 + 44) > 0.0 && *(_DWORD *)(v9 + 64) >= (unsigned int)(*(_DWORD *)(v9 + 72) - *(_DWORD *)(v9 + 76)) && !*(_DWORD *)(v9 + 68) ) { if ( !*(_QWORD *)(v11 + 160) || (v2 = v11 + 160, v3 = (const char *)&v6, (*(_DWORD *)(tree_insert(v11 + 160, &v6, 0LL, *(_QWORD *)(v11 + 720)) + 16) & 0x7FFFFFFFu) <= 1) ) { *(_QWORD *)(v7 + 368) = v6; *(_DWORD *)(v7 + 464) &= 0x401u; v2 = v7; v3 = v6; if ( (*(unsigned int ( **)(long long, const char *, const char *))(v7 + 320))(v7, v6, v10) ) goto LABEL_30; *(_DWORD *)(v7 + 464) |= 2u; if ( !*(_BYTE *)(v11 + 836) || (v2 = v11, v3 = v10, ft_boolean_find_relevance(v11, v10, 0LL) != 0.0) ) { *(_DWORD *)my_thread_var(v2, v3) = 0; goto LABEL_30; } } } } *(_DWORD *)(v11 + 840) = 3; *(_DWORD *)my_thread_var(v2, v3) = 137; LABEL_30: *(_QWORD *)(v11 + 120) = 0LL; return *(unsigned int *)my_thread_var(v2, v3); } else { *(_DWORD *)my_thread_var(v7, 0LL) = 137; return 137; } } else { return (unsigned int)-1; } }
ft_boolean_read_next: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x348],0x2 JZ 0x0019fc82 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x348],0x3 JZ 0x0019fc82 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0019ff12 LAB_0019fc82: MOV RDI,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RAX + 0x340] CALL 0x001bf990 CMP EAX,0x0 JGE 0x0019fca9 CALL 0x001fabb0 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX JMP 0x0019ff12 LAB_0019fca9: MOV RDI,qword ptr [RBP + -0x30] XOR ESI,ESI MOV EDX,0x1 CALL 0x001b23c0 CMP EAX,0x0 JZ 0x0019fccd CALL 0x001fabb0 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX JMP 0x0019ff12 LAB_0019fccd: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x80],0x0 JNZ 0x0019fcf1 CALL 0x001fabb0 MOV dword ptr [RAX],0x89 MOV dword ptr [RBP + -0x4],0x89 JMP 0x0019ff12 LAB_0019fcf1: MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[RBP + -0x38] MOV qword ptr [RAX + 0x78],RCX LAB_0019fcfd: MOV RCX,qword ptr [RBP + -0x10] XOR EAX,EAX CMP dword ptr [RCX + 0x348],0x2 MOV byte ptr [RBP + -0x39],AL JNZ 0x0019fd2d MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x70] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x38],RAX CMP RAX,-0x1 SETNZ AL MOV byte ptr [RBP + -0x39],AL LAB_0019fd2d: MOV AL,byte ptr [RBP + -0x39] TEST AL,0x1 JNZ 0x0019fd39 JMP 0x0019fee3 LAB_0019fd39: JMP 0x0019fd3b LAB_0019fd3b: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x70] MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RBP + -0x28],RCX CMP RAX,qword ptr [RCX + 0x10] JNZ 0x0019fdac MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x28] XOR EAX,EAX MOV EDX,EAX CALL 0x0019ff20 CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x0019fd89 CALL 0x001fabb0 MOV dword ptr [RAX],0x80 JMP 0x0019fefc LAB_0019fd89: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x28] XOR EDX,EDX CALL 0x001a0290 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x70 MOV ESI,0x1 CALL 0x001fc0a0 JMP 0x0019fd3b LAB_0019fdac: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x10] CMP RAX,qword ptr [RBP + -0x38] JNZ 0x0019fede MOV RAX,qword ptr [RBP + -0x20] MOVSS XMM0,dword ptr [RAX + 0x2c] XORPS XMM1,XMM1 UCOMISS XMM0,XMM1 JBE 0x0019fede MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RCX + 0x48] MOV RDX,qword ptr [RBP + -0x20] SUB ECX,dword ptr [RDX + 0x4c] CMP EAX,ECX JC 0x0019fede MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0x44],0x0 JNZ 0x0019fede MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0xa0],0x0 JZ 0x0019fe4b MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0xa0 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x2d0] LEA RSI,[RBP + -0x38] XOR EDX,EDX CALL 0x001ff280 MOV EAX,dword ptr [RAX + 0x10] AND EAX,0x7fffffff CMP EAX,0x1 JLE 0x0019fe4b JMP 0x0019fcfd LAB_0019fe4b: MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x170],RCX MOV RAX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RAX + 0x1d0] AND ECX,0x401 MOV dword ptr [RAX + 0x1d0],ECX MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x140] MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x18] CALL RAX CMP EAX,0x0 JNZ 0x0019fedc MOV RAX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RAX + 0x1d0] OR ECX,0x2 MOV dword ptr [RAX + 0x1d0],ECX MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x344] CMP EAX,0x0 JZ 0x0019fecf MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] XOR EDX,EDX CALL 0x001a0340 XORPS XMM1,XMM1 UCOMISS XMM0,XMM1 JNZ 0x0019fecf JP 0x0019fecf JMP 0x0019fcfd LAB_0019fecf: CALL 0x001fabb0 MOV dword ptr [RAX],0x0 JMP 0x0019fefc LAB_0019fedc: JMP 0x0019fefc LAB_0019fede: JMP 0x0019fcfd LAB_0019fee3: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x348],0x3 CALL 0x001fabb0 MOV dword ptr [RAX],0x89 LAB_0019fefc: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x78],0x0 CALL 0x001fabb0 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX LAB_0019ff12: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
int4 ft_boolean_read_next(long param_1,int8 param_2) { int iVar1; int4 *puVar2; long lVar3; bool bVar4; float fVar5; long local_40; long local_38; long local_30; long local_28; int8 local_20; long local_18; int4 local_c; local_38 = *(long *)(param_1 + 8); if ((*(int *)(param_1 + 0x348) == 2) || (*(int *)(param_1 + 0x348) == 3)) { local_20 = param_2; local_18 = param_1; iVar1 = _mi_check_index(local_38,*(int4 *)(param_1 + 0x340)); if (iVar1 < 0) { puVar2 = (int4 *)_my_thread_var(); local_c = *puVar2; } else { iVar1 = _mi_readinfo(local_38,0,1); if (iVar1 == 0) { if (*(int *)(local_18 + 0x80) == 0) { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x89; local_c = 0x89; } else { *(long **)(local_18 + 0x78) = &local_40; while( true ) { do { bVar4 = false; if (*(int *)(local_18 + 0x348) == 2) { local_40 = *(long *)(*(long *)(*(long *)(local_18 + 0x70) + 8) + 0x10); bVar4 = local_40 != -1; } if (!bVar4) { *(int4 *)(local_18 + 0x348) = 3; puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x89; goto LAB_0019fefc; } while (local_30 = *(long *)(*(long *)(local_18 + 0x70) + 8), local_40 == *(long *)(local_30 + 0x10)) { iVar1 = _ftb_climb_the_tree(local_18,local_30,0); if (iVar1 != 0) { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x80; goto LAB_0019fefc; } _ft2_search(local_18,local_30,0); _downheap(local_18 + 0x70,1); } local_28 = *(long *)(local_18 + 0x18); } while (((((*(long *)(local_28 + 0x10) != local_40) || (*(float *)(local_28 + 0x2c) <= 0.0)) || (*(uint *)(local_28 + 0x40) < (uint)(*(int *)(local_28 + 0x48) - *(int *)(local_28 + 0x4c)))) || (*(int *)(local_28 + 0x44) != 0)) || ((*(long *)(local_18 + 0xa0) != 0 && (lVar3 = tree_insert(local_18 + 0xa0,&local_40,0, *(int8 *)(local_18 + 0x2d0)), 1 < (*(uint *)(lVar3 + 0x10) & 0x7fffffff))))); *(long *)(local_38 + 0x170) = local_40; *(uint *)(local_38 + 0x1d0) = *(uint *)(local_38 + 0x1d0) & 0x401; iVar1 = (**(code **)(local_38 + 0x140))(local_38,local_40,local_20); if (iVar1 != 0) goto LAB_0019fefc; *(uint *)(local_38 + 0x1d0) = *(uint *)(local_38 + 0x1d0) | 2; if (*(char *)(local_18 + 0x344) == '\0') break; fVar5 = (float)ft_boolean_find_relevance(local_18,local_20,0); if ((fVar5 != 0.0) || (NAN(fVar5))) break; } puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0; LAB_0019fefc: *(int8 *)(local_18 + 0x78) = 0; puVar2 = (int4 *)_my_thread_var(); local_c = *puVar2; } } else { puVar2 = (int4 *)_my_thread_var(); local_c = *puVar2; } } } else { local_c = 0xffffffff; } return local_c; }
29,511
MatrixRotateXYZ
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h
RMAPI Matrix MatrixRotateXYZ(Vector3 angle) { Matrix result = { 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f }; // MatrixIdentity() float cosz = cosf(-angle.z); float sinz = sinf(-angle.z); float cosy = cosf(-angle.y); float siny = sinf(-angle.y); float cosx = cosf(-angle.x); float sinx = sinf(-angle.x); result.m0 = cosz*cosy; result.m1 = (cosz*siny*sinx) - (sinz*cosx); result.m2 = (cosz*siny*cosx) + (sinz*sinx); result.m4 = sinz*cosy; result.m5 = (sinz*siny*sinx) + (cosz*cosx); result.m6 = (sinz*siny*cosx) - (cosz*sinx); result.m8 = -siny; result.m9 = cosy*sinx; result.m10= cosy*cosx; return result; }
O0
c
MatrixRotateXYZ: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x48(%rbp) movq %rdi, %rax movq %rax, -0x40(%rbp) movlpd %xmm0, -0x1c(%rbp) movss %xmm1, -0x14(%rbp) movq -0x1c(%rbp), %rax movq %rax, -0xc(%rbp) movl -0x14(%rbp), %eax movl %eax, -0x4(%rbp) xorl %esi, %esi movl $0x40, %edx callq 0xa2d0 movq -0x48(%rbp), %rdi movss 0xe4e21(%rip), %xmm0 # 0x1a40f4 movss %xmm0, (%rdi) movss 0xe4e15(%rip), %xmm0 # 0x1a40f4 movss %xmm0, 0x14(%rdi) movss 0xe4e08(%rip), %xmm0 # 0x1a40f4 movss %xmm0, 0x28(%rdi) movss 0xe4dfb(%rip), %xmm0 # 0x1a40f4 movss %xmm0, 0x3c(%rdi) movss -0x4(%rbp), %xmm0 movd %xmm0, %eax xorl $0x80000000, %eax # imm = 0x80000000 movd %eax, %xmm0 callq 0xa390 movss %xmm0, -0x20(%rbp) movss -0x4(%rbp), %xmm0 movd %xmm0, %eax xorl $0x80000000, %eax # imm = 0x80000000 movd %eax, %xmm0 callq 0xa410 movss %xmm0, -0x24(%rbp) movss -0x8(%rbp), %xmm0 movd %xmm0, %eax xorl $0x80000000, %eax # imm = 0x80000000 movd %eax, %xmm0 callq 0xa390 movss %xmm0, -0x28(%rbp) movss -0x8(%rbp), %xmm0 movd %xmm0, %eax xorl $0x80000000, %eax # imm = 0x80000000 movd %eax, %xmm0 callq 0xa410 movss %xmm0, -0x2c(%rbp) movss -0xc(%rbp), %xmm0 movd %xmm0, %eax xorl $0x80000000, %eax # imm = 0x80000000 movd %eax, %xmm0 callq 0xa390 movss %xmm0, -0x30(%rbp) movss -0xc(%rbp), %xmm0 movd %xmm0, %eax xorl $0x80000000, %eax # imm = 0x80000000 movd %eax, %xmm0 callq 0xa410 movq -0x48(%rbp), %rdi movq -0x40(%rbp), %rax movss %xmm0, -0x34(%rbp) movss -0x20(%rbp), %xmm0 mulss -0x28(%rbp), %xmm0 movss %xmm0, (%rdi) movss -0x20(%rbp), %xmm0 mulss -0x2c(%rbp), %xmm0 movss -0x34(%rbp), %xmm2 movss -0x24(%rbp), %xmm1 mulss -0x30(%rbp), %xmm1 movd %xmm1, %ecx xorl $0x80000000, %ecx # imm = 0x80000000 movd %ecx, %xmm1 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 movss %xmm0, 0x10(%rdi) movss -0x20(%rbp), %xmm0 mulss -0x2c(%rbp), %xmm0 movss -0x30(%rbp), %xmm2 movss -0x24(%rbp), %xmm1 mulss -0x34(%rbp), %xmm1 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 movss %xmm0, 0x20(%rdi) movss -0x24(%rbp), %xmm0 mulss -0x28(%rbp), %xmm0 movss %xmm0, 0x4(%rdi) movss -0x24(%rbp), %xmm0 mulss -0x2c(%rbp), %xmm0 movss -0x34(%rbp), %xmm2 movss -0x20(%rbp), %xmm1 mulss -0x30(%rbp), %xmm1 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 movss %xmm0, 0x14(%rdi) movss -0x24(%rbp), %xmm0 mulss -0x2c(%rbp), %xmm0 movss -0x30(%rbp), %xmm2 movss -0x20(%rbp), %xmm1 mulss -0x34(%rbp), %xmm1 movd %xmm1, %ecx xorl $0x80000000, %ecx # imm = 0x80000000 movd %ecx, %xmm1 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 movss %xmm0, 0x24(%rdi) movss -0x2c(%rbp), %xmm0 movd %xmm0, %ecx xorl $0x80000000, %ecx # imm = 0x80000000 movd %ecx, %xmm0 movss %xmm0, 0x8(%rdi) movss -0x28(%rbp), %xmm0 mulss -0x34(%rbp), %xmm0 movss %xmm0, 0x18(%rdi) movss -0x28(%rbp), %xmm0 mulss -0x30(%rbp), %xmm0 movss %xmm0, 0x28(%rdi) addq $0x50, %rsp popq %rbp retq nopl (%rax,%rax)
MatrixRotateXYZ: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_48], rdi mov rax, rdi mov [rbp+var_40], rax movlpd [rbp+var_1C], xmm0 movss [rbp+var_14], xmm1 mov rax, [rbp+var_1C] mov [rbp+var_C], rax mov eax, [rbp+var_14] mov [rbp+var_4], eax xor esi, esi mov edx, 40h ; '@' call _memset mov rdi, [rbp+var_48] movss xmm0, cs:dword_1A40F4 movss dword ptr [rdi], xmm0 movss xmm0, cs:dword_1A40F4 movss dword ptr [rdi+14h], xmm0 movss xmm0, cs:dword_1A40F4 movss dword ptr [rdi+28h], xmm0 movss xmm0, cs:dword_1A40F4 movss dword ptr [rdi+3Ch], xmm0 movss xmm0, [rbp+var_4] movd eax, xmm0 xor eax, 80000000h movd xmm0, eax call _cosf movss [rbp+var_20], xmm0 movss xmm0, [rbp+var_4] movd eax, xmm0 xor eax, 80000000h movd xmm0, eax call _sinf movss [rbp+var_24], xmm0 movss xmm0, dword ptr [rbp+var_C+4] movd eax, xmm0 xor eax, 80000000h movd xmm0, eax call _cosf movss [rbp+var_28], xmm0 movss xmm0, dword ptr [rbp+var_C+4] movd eax, xmm0 xor eax, 80000000h movd xmm0, eax call _sinf movss [rbp+var_2C], xmm0 movss xmm0, dword ptr [rbp+var_C] movd eax, xmm0 xor eax, 80000000h movd xmm0, eax call _cosf movss [rbp+var_30], xmm0 movss xmm0, dword ptr [rbp+var_C] movd eax, xmm0 xor eax, 80000000h movd xmm0, eax call _sinf mov rdi, [rbp+var_48] mov rax, [rbp+var_40] movss [rbp+var_34], xmm0 movss xmm0, [rbp+var_20] mulss xmm0, [rbp+var_28] movss dword ptr [rdi], xmm0 movss xmm0, [rbp+var_20] mulss xmm0, [rbp+var_2C] movss xmm2, [rbp+var_34] movss xmm1, [rbp+var_24] mulss xmm1, [rbp+var_30] movd ecx, xmm1 xor ecx, 80000000h movd xmm1, ecx mulss xmm0, xmm2 addss xmm0, xmm1 movss dword ptr [rdi+10h], xmm0 movss xmm0, [rbp+var_20] mulss xmm0, [rbp+var_2C] movss xmm2, [rbp+var_30] movss xmm1, [rbp+var_24] mulss xmm1, [rbp+var_34] mulss xmm0, xmm2 addss xmm0, xmm1 movss dword ptr [rdi+20h], xmm0 movss xmm0, [rbp+var_24] mulss xmm0, [rbp+var_28] movss dword ptr [rdi+4], xmm0 movss xmm0, [rbp+var_24] mulss xmm0, [rbp+var_2C] movss xmm2, [rbp+var_34] movss xmm1, [rbp+var_20] mulss xmm1, [rbp+var_30] mulss xmm0, xmm2 addss xmm0, xmm1 movss dword ptr [rdi+14h], xmm0 movss xmm0, [rbp+var_24] mulss xmm0, [rbp+var_2C] movss xmm2, [rbp+var_30] movss xmm1, [rbp+var_20] mulss xmm1, [rbp+var_34] movd ecx, xmm1 xor ecx, 80000000h movd xmm1, ecx mulss xmm0, xmm2 addss xmm0, xmm1 movss dword ptr [rdi+24h], xmm0 movss xmm0, [rbp+var_2C] movd ecx, xmm0 xor ecx, 80000000h movd xmm0, ecx movss dword ptr [rdi+8], xmm0 movss xmm0, [rbp+var_28] mulss xmm0, [rbp+var_34] movss dword ptr [rdi+18h], xmm0 movss xmm0, [rbp+var_28] mulss xmm0, [rbp+var_30] movss dword ptr [rdi+28h], xmm0 add rsp, 50h pop rbp retn
long long MatrixRotateXYZ(long long a1, double a2, float a3) { double v3; // xmm0_8 double v4; // xmm0_8 double v5; // xmm0_8 long long result; // rax __m128i v7; // xmm1 __m128i v8; // xmm1 float v9; // [rsp+20h] [rbp-30h] float v10; // [rsp+24h] [rbp-2Ch] float v11; // [rsp+28h] [rbp-28h] float v12; // [rsp+2Ch] [rbp-24h] float v13; // [rsp+30h] [rbp-20h] memset(a1, 0LL, 64LL); *(_DWORD *)a1 = 1065353216; *(_DWORD *)(a1 + 20) = 1065353216; *(_DWORD *)(a1 + 40) = 1065353216; *(_DWORD *)(a1 + 60) = 1065353216; v13 = cosf(COERCE_FLOAT(_mm_cvtsi128_si32((__m128i)LODWORD(a3)) ^ 0x80000000)); v3 = sinf(COERCE_FLOAT(_mm_cvtsi128_si32((__m128i)LODWORD(a3)) ^ 0x80000000)); v12 = *(float *)&v3; v11 = cosf(COERCE_FLOAT(_mm_cvtsi128_si32((__m128i)HIDWORD(a2)) ^ 0x80000000)); v4 = sinf(COERCE_FLOAT(_mm_cvtsi128_si32((__m128i)HIDWORD(a2)) ^ 0x80000000)); v10 = *(float *)&v4; v9 = cosf(COERCE_FLOAT(_mm_cvtsi128_si32((__m128i)LODWORD(a2)) ^ 0x80000000)); v5 = sinf(COERCE_FLOAT(_mm_cvtsi128_si32((__m128i)LODWORD(a2)) ^ 0x80000000)); result = a1; *(float *)a1 = v13 * v11; v7 = (__m128i)LODWORD(v12); *(float *)v7.m128i_i32 = v12 * v9; *(float *)(a1 + 16) = (float)((float)(v13 * v10) * *(float *)&v5) + COERCE_FLOAT(_mm_cvtsi128_si32(v7) ^ 0x80000000); *(float *)(a1 + 32) = (float)((float)(v13 * v10) * v9) + (float)(v12 * *(float *)&v5); *(float *)(a1 + 4) = v12 * v11; *(float *)(a1 + 20) = (float)((float)(v12 * v10) * *(float *)&v5) + (float)(v13 * v9); v8 = (__m128i)LODWORD(v13); *(float *)v8.m128i_i32 = v13 * *(float *)&v5; *(float *)(a1 + 36) = (float)((float)(v12 * v10) * v9) + COERCE_FLOAT(_mm_cvtsi128_si32(v8) ^ 0x80000000); *(_DWORD *)(a1 + 8) = _mm_cvtsi128_si32((__m128i)LODWORD(v10)) ^ 0x80000000; *(float *)(a1 + 24) = v11 * *(float *)&v5; *(float *)(a1 + 40) = v11 * v9; return result; }
MatrixRotateXYZ: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x48],RDI MOV RAX,RDI MOV qword ptr [RBP + -0x40],RAX MOVLPD qword ptr [RBP + -0x1c],XMM0 MOVSS dword ptr [RBP + -0x14],XMM1 MOV RAX,qword ptr [RBP + -0x1c] MOV qword ptr [RBP + -0xc],RAX MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x4],EAX XOR ESI,ESI MOV EDX,0x40 CALL 0x0010a2d0 MOV RDI,qword ptr [RBP + -0x48] MOVSS XMM0,dword ptr [0x002a40f4] MOVSS dword ptr [RDI],XMM0 MOVSS XMM0,dword ptr [0x002a40f4] MOVSS dword ptr [RDI + 0x14],XMM0 MOVSS XMM0,dword ptr [0x002a40f4] MOVSS dword ptr [RDI + 0x28],XMM0 MOVSS XMM0,dword ptr [0x002a40f4] MOVSS dword ptr [RDI + 0x3c],XMM0 MOVSS XMM0,dword ptr [RBP + -0x4] MOVD EAX,XMM0 XOR EAX,0x80000000 MOVD XMM0,EAX CALL 0x0010a390 MOVSS dword ptr [RBP + -0x20],XMM0 MOVSS XMM0,dword ptr [RBP + -0x4] MOVD EAX,XMM0 XOR EAX,0x80000000 MOVD XMM0,EAX CALL 0x0010a410 MOVSS dword ptr [RBP + -0x24],XMM0 MOVSS XMM0,dword ptr [RBP + -0x8] MOVD EAX,XMM0 XOR EAX,0x80000000 MOVD XMM0,EAX CALL 0x0010a390 MOVSS dword ptr [RBP + -0x28],XMM0 MOVSS XMM0,dword ptr [RBP + -0x8] MOVD EAX,XMM0 XOR EAX,0x80000000 MOVD XMM0,EAX CALL 0x0010a410 MOVSS dword ptr [RBP + -0x2c],XMM0 MOVSS XMM0,dword ptr [RBP + -0xc] MOVD EAX,XMM0 XOR EAX,0x80000000 MOVD XMM0,EAX CALL 0x0010a390 MOVSS dword ptr [RBP + -0x30],XMM0 MOVSS XMM0,dword ptr [RBP + -0xc] MOVD EAX,XMM0 XOR EAX,0x80000000 MOVD XMM0,EAX CALL 0x0010a410 MOV RDI,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x40] MOVSS dword ptr [RBP + -0x34],XMM0 MOVSS XMM0,dword ptr [RBP + -0x20] MULSS XMM0,dword ptr [RBP + -0x28] MOVSS dword ptr [RDI],XMM0 MOVSS XMM0,dword ptr [RBP + -0x20] MULSS XMM0,dword ptr [RBP + -0x2c] MOVSS XMM2,dword ptr [RBP + -0x34] MOVSS XMM1,dword ptr [RBP + -0x24] MULSS XMM1,dword ptr [RBP + -0x30] MOVD ECX,XMM1 XOR ECX,0x80000000 MOVD XMM1,ECX MULSS XMM0,XMM2 ADDSS XMM0,XMM1 MOVSS dword ptr [RDI + 0x10],XMM0 MOVSS XMM0,dword ptr [RBP + -0x20] MULSS XMM0,dword ptr [RBP + -0x2c] MOVSS XMM2,dword ptr [RBP + -0x30] MOVSS XMM1,dword ptr [RBP + -0x24] MULSS XMM1,dword ptr [RBP + -0x34] MULSS XMM0,XMM2 ADDSS XMM0,XMM1 MOVSS dword ptr [RDI + 0x20],XMM0 MOVSS XMM0,dword ptr [RBP + -0x24] MULSS XMM0,dword ptr [RBP + -0x28] MOVSS dword ptr [RDI + 0x4],XMM0 MOVSS XMM0,dword ptr [RBP + -0x24] MULSS XMM0,dword ptr [RBP + -0x2c] MOVSS XMM2,dword ptr [RBP + -0x34] MOVSS XMM1,dword ptr [RBP + -0x20] MULSS XMM1,dword ptr [RBP + -0x30] MULSS XMM0,XMM2 ADDSS XMM0,XMM1 MOVSS dword ptr [RDI + 0x14],XMM0 MOVSS XMM0,dword ptr [RBP + -0x24] MULSS XMM0,dword ptr [RBP + -0x2c] MOVSS XMM2,dword ptr [RBP + -0x30] MOVSS XMM1,dword ptr [RBP + -0x20] MULSS XMM1,dword ptr [RBP + -0x34] MOVD ECX,XMM1 XOR ECX,0x80000000 MOVD XMM1,ECX MULSS XMM0,XMM2 ADDSS XMM0,XMM1 MOVSS dword ptr [RDI + 0x24],XMM0 MOVSS XMM0,dword ptr [RBP + -0x2c] MOVD ECX,XMM0 XOR ECX,0x80000000 MOVD XMM0,ECX MOVSS dword ptr [RDI + 0x8],XMM0 MOVSS XMM0,dword ptr [RBP + -0x28] MULSS XMM0,dword ptr [RBP + -0x34] MOVSS dword ptr [RDI + 0x18],XMM0 MOVSS XMM0,dword ptr [RBP + -0x28] MULSS XMM0,dword ptr [RBP + -0x30] MOVSS dword ptr [RDI + 0x28],XMM0 ADD RSP,0x50 POP RBP RET
float * MatrixRotateXYZ(int8 param_1,float param_2,float *param_3) { float fVar1; float fVar2; float fVar3; float fVar4; float fVar5; float fVar6; float local_14; float fStack_10; memset(param_3,0,0x40); *param_3 = DAT_002a40f4; param_3[5] = DAT_002a40f4; param_3[10] = DAT_002a40f4; param_3[0xf] = DAT_002a40f4; fVar1 = cosf(-param_2); fVar2 = sinf(-param_2); fStack_10 = (float)((ulong)param_1 >> 0x20); fVar3 = cosf(-fStack_10); fVar4 = sinf(-fStack_10); local_14 = (float)param_1; fVar5 = cosf(-local_14); fVar6 = sinf(-local_14); *param_3 = fVar1 * fVar3; param_3[4] = fVar1 * fVar4 * fVar6 + -(fVar2 * fVar5); param_3[8] = fVar1 * fVar4 * fVar5 + fVar2 * fVar6; param_3[1] = fVar2 * fVar3; param_3[5] = fVar2 * fVar4 * fVar6 + fVar1 * fVar5; param_3[9] = fVar2 * fVar4 * fVar5 + -(fVar1 * fVar6); param_3[2] = -fVar4; param_3[6] = fVar3 * fVar6; param_3[10] = fVar3 * fVar5; return param_3; }
29,512
MatrixRotateXYZ
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h
RMAPI Matrix MatrixRotateXYZ(Vector3 angle) { Matrix result = { 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f }; // MatrixIdentity() float cosz = cosf(-angle.z); float sinz = sinf(-angle.z); float cosy = cosf(-angle.y); float siny = sinf(-angle.y); float cosx = cosf(-angle.x); float sinx = sinf(-angle.x); result.m0 = cosz*cosy; result.m1 = (cosz*siny*sinx) - (sinz*cosx); result.m2 = (cosz*siny*cosx) + (sinz*sinx); result.m4 = sinz*cosy; result.m5 = (sinz*siny*sinx) + (cosz*cosx); result.m6 = (sinz*siny*cosx) - (cosz*sinx); result.m8 = -siny; result.m9 = cosy*sinx; result.m10= cosy*cosx; return result; }
O1
c
MatrixRotateXYZ: pushq %rbx subq $0x40, %rsp movaps %xmm0, 0x10(%rsp) movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movups %xmm0, 0x10(%rdi) movups %xmm0, 0x20(%rdi) movups %xmm0, 0x30(%rdi) movl $0x3f800000, %eax # imm = 0x3F800000 movl %eax, (%rdi) movl %eax, 0x14(%rdi) movl %eax, 0x28(%rdi) movl %eax, 0x3c(%rdi) xorps 0x6e56b(%rip), %xmm1 # 0xd9bc0 movaps %xmm1, 0x30(%rsp) movaps %xmm1, %xmm0 callq 0x93b0 movss %xmm0, 0xc(%rsp) movaps 0x30(%rsp), %xmm0 callq 0x9420 movss %xmm0, 0x30(%rsp) movaps 0x10(%rsp), %xmm0 shufps $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1] xorps 0x6e538(%rip), %xmm0 # 0xd9bc0 movaps %xmm0, 0x20(%rsp) callq 0x93b0 movss %xmm0, 0x8(%rsp) movaps 0x20(%rsp), %xmm0 callq 0x9420 movaps %xmm0, 0x20(%rsp) movaps 0x10(%rsp), %xmm0 xorps 0x6e50d(%rip), %xmm0 # 0xd9bc0 movaps %xmm0, 0x10(%rsp) callq 0x93b0 movss %xmm0, 0x4(%rsp) movaps 0x10(%rsp), %xmm0 callq 0x9420 movss 0xc(%rsp), %xmm2 movaps %xmm2, %xmm1 movss 0x8(%rsp), %xmm5 mulss %xmm5, %xmm1 movss %xmm1, (%rbx) movaps %xmm2, %xmm1 movaps %xmm2, %xmm6 movaps 0x20(%rsp), %xmm7 mulss %xmm7, %xmm1 movss 0x4(%rsp), %xmm8 movaps %xmm8, %xmm2 movss 0x30(%rsp), %xmm4 mulss %xmm4, %xmm2 movaps %xmm1, %xmm3 mulss %xmm0, %xmm3 subss %xmm2, %xmm3 movss %xmm3, 0x10(%rbx) movaps %xmm4, %xmm2 mulss %xmm0, %xmm2 mulss %xmm8, %xmm1 addss %xmm2, %xmm1 movss %xmm1, 0x20(%rbx) movaps %xmm4, %xmm1 mulss %xmm5, %xmm1 movss %xmm1, 0x4(%rbx) mulss %xmm7, %xmm4 movaps %xmm0, %xmm1 movaps %xmm6, %xmm2 mulss %xmm6, %xmm1 mulss %xmm8, %xmm2 movaps %xmm2, %xmm3 movaps %xmm4, %xmm2 mulss %xmm0, %xmm2 addss %xmm3, %xmm2 movss %xmm2, 0x14(%rbx) mulss %xmm8, %xmm4 subss %xmm1, %xmm4 movss %xmm4, 0x24(%rbx) movaps %xmm7, %xmm1 xorps 0x6e449(%rip), %xmm1 # 0xd9bc0 movss %xmm1, 0x8(%rbx) movaps %xmm5, %xmm1 mulss %xmm5, %xmm0 movss %xmm0, 0x18(%rbx) mulss %xmm8, %xmm1 movss %xmm1, 0x28(%rbx) movq %rbx, %rax addq $0x40, %rsp popq %rbx retq
MatrixRotateXYZ: push rbx sub rsp, 40h movaps [rsp+48h+var_38], xmm0 mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 movups xmmword ptr [rdi+10h], xmm0 movups xmmword ptr [rdi+20h], xmm0 movups xmmword ptr [rdi+30h], xmm0 mov eax, 3F800000h mov [rdi], eax mov [rdi+14h], eax mov [rdi+28h], eax mov [rdi+3Ch], eax xorps xmm1, cs:xmmword_D9BC0 movaps [rsp+48h+var_18], xmm1 movaps xmm0, xmm1 call _cosf movss [rsp+48h+var_3C], xmm0 movaps xmm0, [rsp+48h+var_18] call _sinf movss dword ptr [rsp+48h+var_18], xmm0 movaps xmm0, [rsp+48h+var_38] shufps xmm0, xmm0, 55h ; 'U' xorps xmm0, cs:xmmword_D9BC0 movaps [rsp+48h+var_28], xmm0 call _cosf movss [rsp+48h+var_40], xmm0 movaps xmm0, [rsp+48h+var_28] call _sinf movaps [rsp+48h+var_28], xmm0 movaps xmm0, [rsp+48h+var_38] xorps xmm0, cs:xmmword_D9BC0 movaps [rsp+48h+var_38], xmm0 call _cosf movss [rsp+48h+var_44], xmm0 movaps xmm0, [rsp+48h+var_38] call _sinf movss xmm2, [rsp+48h+var_3C] movaps xmm1, xmm2 movss xmm5, [rsp+48h+var_40] mulss xmm1, xmm5 movss dword ptr [rbx], xmm1 movaps xmm1, xmm2 movaps xmm6, xmm2 movaps xmm7, [rsp+48h+var_28] mulss xmm1, xmm7 movss xmm8, [rsp+48h+var_44] movaps xmm2, xmm8 movss xmm4, dword ptr [rsp+48h+var_18] mulss xmm2, xmm4 movaps xmm3, xmm1 mulss xmm3, xmm0 subss xmm3, xmm2 movss dword ptr [rbx+10h], xmm3 movaps xmm2, xmm4 mulss xmm2, xmm0 mulss xmm1, xmm8 addss xmm1, xmm2 movss dword ptr [rbx+20h], xmm1 movaps xmm1, xmm4 mulss xmm1, xmm5 movss dword ptr [rbx+4], xmm1 mulss xmm4, xmm7 movaps xmm1, xmm0 movaps xmm2, xmm6 mulss xmm1, xmm6 mulss xmm2, xmm8 movaps xmm3, xmm2 movaps xmm2, xmm4 mulss xmm2, xmm0 addss xmm2, xmm3 movss dword ptr [rbx+14h], xmm2 mulss xmm4, xmm8 subss xmm4, xmm1 movss dword ptr [rbx+24h], xmm4 movaps xmm1, xmm7 xorps xmm1, cs:xmmword_D9BC0 movss dword ptr [rbx+8], xmm1 movaps xmm1, xmm5 mulss xmm0, xmm5 movss dword ptr [rbx+18h], xmm0 mulss xmm1, xmm8 movss dword ptr [rbx+28h], xmm1 mov rax, rbx add rsp, 40h pop rbx retn
long long MatrixRotateXYZ(long long a1, __m128 a2, float a3) { double v3; // xmm0_8 double v4; // xmm0_8 double v5; // xmm0_8 float v7; // [rsp+4h] [rbp-44h] float v8; // [rsp+8h] [rbp-40h] float v9; // [rsp+Ch] [rbp-3Ch] float v11; // [rsp+20h] [rbp-28h] float v12; // [rsp+20h] [rbp-28h] float v13; // [rsp+30h] [rbp-18h] *(_OWORD *)a1 = 0LL; *(_OWORD *)(a1 + 16) = 0LL; *(_OWORD *)(a1 + 32) = 0LL; *(_OWORD *)(a1 + 48) = 0LL; *(_DWORD *)a1 = 1065353216; *(_DWORD *)(a1 + 20) = 1065353216; *(_DWORD *)(a1 + 40) = 1065353216; *(_DWORD *)(a1 + 60) = 1065353216; v9 = cosf(-a3); v3 = sinf(-a3); v13 = *(float *)&v3; v11 = -_mm_shuffle_ps(a2, a2, 85).m128_f32[0]; v8 = cosf(v11); v4 = sinf(v11); v12 = *(float *)&v4; a2.m128_f32[0] = -a2.m128_f32[0]; v7 = cosf(a2.m128_f32[0]); v5 = sinf(a2.m128_f32[0]); *(float *)a1 = v9 * v8; *(float *)(a1 + 16) = (float)((float)(v9 * v12) * *(float *)&v5) - (float)(v7 * v13); *(float *)(a1 + 32) = (float)((float)(v9 * v12) * v7) + (float)(v13 * *(float *)&v5); *(float *)(a1 + 4) = v13 * v8; *(float *)(a1 + 20) = (float)((float)(v13 * v12) * *(float *)&v5) + (float)(v9 * v7); *(float *)(a1 + 36) = (float)((float)(v13 * v12) * v7) - (float)(*(float *)&v5 * v9); *(float *)(a1 + 8) = -v12; *(float *)(a1 + 24) = *(float *)&v5 * v8; *(float *)(a1 + 40) = v8 * v7; return a1; }
MatrixRotateXYZ: PUSH RBX SUB RSP,0x40 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOVUPS xmmword ptr [RDI + 0x10],XMM0 MOVUPS xmmword ptr [RDI + 0x20],XMM0 MOVUPS xmmword ptr [RDI + 0x30],XMM0 MOV EAX,0x3f800000 MOV dword ptr [RDI],EAX MOV dword ptr [RDI + 0x14],EAX MOV dword ptr [RDI + 0x28],EAX MOV dword ptr [RDI + 0x3c],EAX XORPS XMM1,xmmword ptr [0x001d9bc0] MOVAPS xmmword ptr [RSP + 0x30],XMM1 MOVAPS XMM0,XMM1 CALL 0x001093b0 MOVSS dword ptr [RSP + 0xc],XMM0 MOVAPS XMM0,xmmword ptr [RSP + 0x30] CALL 0x00109420 MOVSS dword ptr [RSP + 0x30],XMM0 MOVAPS XMM0,xmmword ptr [RSP + 0x10] SHUFPS XMM0,XMM0,0x55 XORPS XMM0,xmmword ptr [0x001d9bc0] MOVAPS xmmword ptr [RSP + 0x20],XMM0 CALL 0x001093b0 MOVSS dword ptr [RSP + 0x8],XMM0 MOVAPS XMM0,xmmword ptr [RSP + 0x20] CALL 0x00109420 MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOVAPS XMM0,xmmword ptr [RSP + 0x10] XORPS XMM0,xmmword ptr [0x001d9bc0] MOVAPS xmmword ptr [RSP + 0x10],XMM0 CALL 0x001093b0 MOVSS dword ptr [RSP + 0x4],XMM0 MOVAPS XMM0,xmmword ptr [RSP + 0x10] CALL 0x00109420 MOVSS XMM2,dword ptr [RSP + 0xc] MOVAPS XMM1,XMM2 MOVSS XMM5,dword ptr [RSP + 0x8] MULSS XMM1,XMM5 MOVSS dword ptr [RBX],XMM1 MOVAPS XMM1,XMM2 MOVAPS XMM6,XMM2 MOVAPS XMM7,xmmword ptr [RSP + 0x20] MULSS XMM1,XMM7 MOVSS XMM8,dword ptr [RSP + 0x4] MOVAPS XMM2,XMM8 MOVSS XMM4,dword ptr [RSP + 0x30] MULSS XMM2,XMM4 MOVAPS XMM3,XMM1 MULSS XMM3,XMM0 SUBSS XMM3,XMM2 MOVSS dword ptr [RBX + 0x10],XMM3 MOVAPS XMM2,XMM4 MULSS XMM2,XMM0 MULSS XMM1,XMM8 ADDSS XMM1,XMM2 MOVSS dword ptr [RBX + 0x20],XMM1 MOVAPS XMM1,XMM4 MULSS XMM1,XMM5 MOVSS dword ptr [RBX + 0x4],XMM1 MULSS XMM4,XMM7 MOVAPS XMM1,XMM0 MOVAPS XMM2,XMM6 MULSS XMM1,XMM6 MULSS XMM2,XMM8 MOVAPS XMM3,XMM2 MOVAPS XMM2,XMM4 MULSS XMM2,XMM0 ADDSS XMM2,XMM3 MOVSS dword ptr [RBX + 0x14],XMM2 MULSS XMM4,XMM8 SUBSS XMM4,XMM1 MOVSS dword ptr [RBX + 0x24],XMM4 MOVAPS XMM1,XMM7 XORPS XMM1,xmmword ptr [0x001d9bc0] MOVSS dword ptr [RBX + 0x8],XMM1 MOVAPS XMM1,XMM5 MULSS XMM0,XMM5 MOVSS dword ptr [RBX + 0x18],XMM0 MULSS XMM1,XMM8 MOVSS dword ptr [RBX + 0x28],XMM1 MOV RAX,RBX ADD RSP,0x40 POP RBX RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ float * MatrixRotateXYZ(int8 param_1,uint param_2,float *param_3) { float fVar1; float fVar2; float fVar3; float fVar4; float fVar5; float fVar6; param_3[0] = 0.0; param_3[1] = 0.0; param_3[2] = 0.0; param_3[3] = 0.0; param_3[4] = 0.0; param_3[5] = 0.0; param_3[6] = 0.0; param_3[7] = 0.0; param_3[8] = 0.0; param_3[9] = 0.0; param_3[10] = 0.0; param_3[0xb] = 0.0; param_3[0xc] = 0.0; param_3[0xd] = 0.0; param_3[0xe] = 0.0; param_3[0xf] = 0.0; *param_3 = 1.0; param_3[5] = 1.0; param_3[10] = 1.0; param_3[0xf] = 1.0; fVar6 = (float)(param_2 ^ _DAT_001d9bc0); fVar1 = cosf(fVar6); fVar6 = sinf(fVar6); fVar2 = (float)((uint)((ulong)param_1 >> 0x20) ^ _DAT_001d9bc0); fVar3 = cosf(fVar2); fVar2 = sinf(fVar2); fVar4 = (float)((uint)param_1 ^ _DAT_001d9bc0); fVar5 = cosf(fVar4); fVar4 = sinf(fVar4); *param_3 = fVar1 * fVar3; param_3[4] = fVar1 * fVar2 * fVar4 - fVar5 * fVar6; param_3[8] = fVar1 * fVar2 * fVar5 + fVar6 * fVar4; param_3[1] = fVar6 * fVar3; param_3[5] = fVar6 * fVar2 * fVar4 + fVar1 * fVar5; param_3[9] = fVar6 * fVar2 * fVar5 - fVar4 * fVar1; param_3[2] = (float)((uint)fVar2 ^ _DAT_001d9bc0); param_3[6] = fVar4 * fVar3; param_3[10] = fVar3 * fVar5; return param_3; }
29,513
MatrixRotateXYZ
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h
RMAPI Matrix MatrixRotateXYZ(Vector3 angle) { Matrix result = { 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f }; // MatrixIdentity() float cosz = cosf(-angle.z); float sinz = sinf(-angle.z); float cosy = cosf(-angle.y); float siny = sinf(-angle.y); float cosx = cosf(-angle.x); float sinx = sinf(-angle.x); result.m0 = cosz*cosy; result.m1 = (cosz*siny*sinx) - (sinz*cosx); result.m2 = (cosz*siny*cosx) + (sinz*sinx); result.m4 = sinz*cosy; result.m5 = (sinz*siny*sinx) + (cosz*cosx); result.m6 = (sinz*siny*cosx) - (cosz*sinx); result.m8 = -siny; result.m9 = cosy*sinx; result.m10= cosy*cosx; return result; }
O2
c
MatrixRotateXYZ: pushq %rbx subq $0x60, %rsp movaps %xmm0, (%rsp) movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, 0x2c(%rdi) movups %xmm0, 0x1c(%rdi) movups %xmm0, 0xc(%rdi) movl $0x3f800000, 0x3c(%rdi) # imm = 0x3F800000 xorps 0x5c53a(%rip), %xmm1 # 0xb5140 movaps %xmm1, 0x20(%rsp) movaps %xmm1, %xmm0 callq 0x9390 movaps %xmm0, 0x50(%rsp) movaps 0x20(%rsp), %xmm0 callq 0x9410 movaps %xmm0, 0x20(%rsp) movaps (%rsp), %xmm0 shufps $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1] xorps 0x5c50a(%rip), %xmm0 # 0xb5140 movaps %xmm0, 0x10(%rsp) callq 0x9390 movaps %xmm0, 0x40(%rsp) movaps 0x10(%rsp), %xmm0 callq 0x9410 movaps %xmm0, 0x10(%rsp) movaps (%rsp), %xmm0 xorps 0x5c4e1(%rip), %xmm0 # 0xb5140 movaps %xmm0, (%rsp) callq 0x9390 movaps %xmm0, 0x30(%rsp) movaps (%rsp), %xmm0 callq 0x9410 movaps 0x20(%rsp), %xmm3 movaps %xmm3, %xmm1 movaps 0x5c4bb(%rip), %xmm5 # 0xb5140 xorps %xmm5, %xmm1 movaps 0x50(%rsp), %xmm4 movaps %xmm4, %xmm2 unpcklps %xmm3, %xmm2 # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1] movaps %xmm3, %xmm7 movaps 0x40(%rsp), %xmm8 movaps %xmm8, %xmm3 unpcklps %xmm8, %xmm3 # xmm3 = xmm3[0],xmm8[0],xmm3[1],xmm8[1] mulps %xmm2, %xmm3 movlps %xmm3, (%rbx) movaps 0x10(%rsp), %xmm9 movaps %xmm9, %xmm3 shufps $0x0, %xmm9, %xmm3 # xmm3 = xmm3[0,0],xmm9[0,0] mulps %xmm2, %xmm3 movaps 0x30(%rsp), %xmm10 movaps %xmm10, %xmm2 shufps $0x0, %xmm10, %xmm2 # xmm2 = xmm2[0,0],xmm10[0,0] unpcklps %xmm4, %xmm1 # xmm1 = xmm1[0],xmm4[0],xmm1[1],xmm4[1] movaps %xmm4, %xmm6 mulps %xmm2, %xmm1 movaps %xmm0, %xmm4 shufps $0x0, %xmm0, %xmm4 # xmm4 = xmm4[0,0],xmm0[0,0] mulps %xmm3, %xmm2 mulps %xmm4, %xmm3 addps %xmm1, %xmm3 movlps %xmm3, 0x10(%rbx) movaps %xmm6, %xmm3 xorps %xmm5, %xmm3 unpcklps %xmm3, %xmm7 # xmm7 = xmm7[0],xmm3[0],xmm7[1],xmm3[1] mulps %xmm4, %xmm7 addps %xmm7, %xmm2 movlps %xmm2, 0x20(%rbx) movaps %xmm9, %xmm2 xorps %xmm5, %xmm2 movss %xmm2, 0x8(%rbx) movaps %xmm8, %xmm1 mulss %xmm8, %xmm0 movss %xmm0, 0x18(%rbx) mulss %xmm10, %xmm1 movss %xmm1, 0x28(%rbx) movq %rbx, %rax addq $0x60, %rsp popq %rbx retq
MatrixRotateXYZ: push rbx sub rsp, 60h movaps [rsp+68h+var_68], xmm0 mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi+2Ch], xmm0 movups xmmword ptr [rdi+1Ch], xmm0 movups xmmword ptr [rdi+0Ch], xmm0 mov dword ptr [rdi+3Ch], 3F800000h xorps xmm1, cs:xmmword_B5140 movaps [rsp+68h+var_48], xmm1 movaps xmm0, xmm1 call _cosf movaps [rsp+68h+var_18], xmm0 movaps xmm0, [rsp+68h+var_48] call _sinf movaps [rsp+68h+var_48], xmm0 movaps xmm0, [rsp+68h+var_68] shufps xmm0, xmm0, 55h ; 'U' xorps xmm0, cs:xmmword_B5140 movaps [rsp+68h+var_58], xmm0 call _cosf movaps [rsp+68h+var_28], xmm0 movaps xmm0, [rsp+68h+var_58] call _sinf movaps [rsp+68h+var_58], xmm0 movaps xmm0, [rsp+68h+var_68] xorps xmm0, cs:xmmword_B5140 movaps [rsp+68h+var_68], xmm0 call _cosf movaps [rsp+68h+var_38], xmm0 movaps xmm0, [rsp+68h+var_68] call _sinf movaps xmm3, [rsp+68h+var_48] movaps xmm1, xmm3 movaps xmm5, cs:xmmword_B5140 xorps xmm1, xmm5 movaps xmm4, [rsp+68h+var_18] movaps xmm2, xmm4 unpcklps xmm2, xmm3 movaps xmm7, xmm3 movaps xmm8, [rsp+68h+var_28] movaps xmm3, xmm8 unpcklps xmm3, xmm8 mulps xmm3, xmm2 movlps qword ptr [rbx], xmm3 movaps xmm9, [rsp+68h+var_58] movaps xmm3, xmm9 shufps xmm3, xmm9, 0 mulps xmm3, xmm2 movaps xmm10, [rsp+68h+var_38] movaps xmm2, xmm10 shufps xmm2, xmm10, 0 unpcklps xmm1, xmm4 movaps xmm6, xmm4 mulps xmm1, xmm2 movaps xmm4, xmm0 shufps xmm4, xmm0, 0 mulps xmm2, xmm3 mulps xmm3, xmm4 addps xmm3, xmm1 movlps qword ptr [rbx+10h], xmm3 movaps xmm3, xmm6 xorps xmm3, xmm5 unpcklps xmm7, xmm3 mulps xmm7, xmm4 addps xmm2, xmm7 movlps qword ptr [rbx+20h], xmm2 movaps xmm2, xmm9 xorps xmm2, xmm5 movss dword ptr [rbx+8], xmm2 movaps xmm1, xmm8 mulss xmm0, xmm8 movss dword ptr [rbx+18h], xmm0 mulss xmm1, xmm10 movss dword ptr [rbx+28h], xmm1 mov rax, rbx add rsp, 60h pop rbx retn
long long MatrixRotateXYZ(long long a1, __m128 a2, __m128 a3) { __m128 v3; // xmm0 __m128 v4; // xmm0 __m128 v5; // xmm0 __m128 v6; // xmm2 __m128 v7; // xmm3 __m128 v8; // xmm2 __m128 v9; // xmm4 __m128 v12; // [rsp+0h] [rbp-68h] __m128 v13; // [rsp+10h] [rbp-58h] __m128 v14; // [rsp+10h] [rbp-58h] __m128 v15; // [rsp+20h] [rbp-48h] __m128 v16; // [rsp+20h] [rbp-48h] __m128 v17; // [rsp+30h] [rbp-38h] __m128 v18; // [rsp+40h] [rbp-28h] __m128 v19; // [rsp+50h] [rbp-18h] *(_OWORD *)(a1 + 44) = 0LL; *(_OWORD *)(a1 + 28) = 0LL; *(_OWORD *)(a1 + 12) = 0LL; *(_DWORD *)(a1 + 60) = 1065353216; v15 = _mm_xor_ps(a3, (__m128)xmmword_B5140); v3.m128_u64[1] = v15.m128_u64[1]; *(double *)v3.m128_u64 = cosf(v15.m128_f32[0]); v19 = v3; v3.m128_u64[1] = v15.m128_u64[1]; *(double *)v3.m128_u64 = sinf(v15.m128_f32[0]); v16 = v3; v4 = _mm_xor_ps(_mm_shuffle_ps(a2, a2, 85), (__m128)xmmword_B5140); v13 = v4; *(double *)v4.m128_u64 = cosf(v4.m128_f32[0]); v18 = v4; v4.m128_u64[1] = v13.m128_u64[1]; *(double *)v4.m128_u64 = sinf(v13.m128_f32[0]); v14 = v4; v5 = _mm_xor_ps(a2, (__m128)xmmword_B5140); v12 = v5; *(double *)v5.m128_u64 = cosf(v5.m128_f32[0]); v17 = v5; v5.m128_u64[1] = v12.m128_u64[1]; *(double *)v5.m128_u64 = sinf(v12.m128_f32[0]); v6 = _mm_unpacklo_ps(v19, v16); _mm_storel_ps((double *)a1, _mm_mul_ps(_mm_unpacklo_ps(v18, v18), v6)); v7 = _mm_mul_ps(_mm_shuffle_ps(v14, v14, 0), v6); v8 = _mm_shuffle_ps(v17, v17, 0); v9 = _mm_shuffle_ps(v5, v5, 0); _mm_storel_ps( (double *)(a1 + 16), _mm_add_ps(_mm_mul_ps(v7, v9), _mm_mul_ps(_mm_unpacklo_ps(_mm_xor_ps(v16, (__m128)xmmword_B5140), v19), v8))); _mm_storel_ps( (double *)(a1 + 32), _mm_add_ps(_mm_mul_ps(v8, v7), _mm_mul_ps(_mm_unpacklo_ps(v16, _mm_xor_ps(v19, (__m128)xmmword_B5140)), v9))); *(float *)(a1 + 8) = -v14.m128_f32[0]; *(float *)(a1 + 24) = v5.m128_f32[0] * v18.m128_f32[0]; *(float *)(a1 + 40) = v18.m128_f32[0] * v17.m128_f32[0]; return a1; }
MatrixRotateXYZ: PUSH RBX SUB RSP,0x60 MOVAPS xmmword ptr [RSP],XMM0 MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x2c],XMM0 MOVUPS xmmword ptr [RDI + 0x1c],XMM0 MOVUPS xmmword ptr [RDI + 0xc],XMM0 MOV dword ptr [RDI + 0x3c],0x3f800000 XORPS XMM1,xmmword ptr [0x001b5140] MOVAPS xmmword ptr [RSP + 0x20],XMM1 MOVAPS XMM0,XMM1 CALL 0x00109390 MOVAPS xmmword ptr [RSP + 0x50],XMM0 MOVAPS XMM0,xmmword ptr [RSP + 0x20] CALL 0x00109410 MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOVAPS XMM0,xmmword ptr [RSP] SHUFPS XMM0,XMM0,0x55 XORPS XMM0,xmmword ptr [0x001b5140] MOVAPS xmmword ptr [RSP + 0x10],XMM0 CALL 0x00109390 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOVAPS XMM0,xmmword ptr [RSP + 0x10] CALL 0x00109410 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOVAPS XMM0,xmmword ptr [RSP] XORPS XMM0,xmmword ptr [0x001b5140] MOVAPS xmmword ptr [RSP],XMM0 CALL 0x00109390 MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOVAPS XMM0,xmmword ptr [RSP] CALL 0x00109410 MOVAPS XMM3,xmmword ptr [RSP + 0x20] MOVAPS XMM1,XMM3 MOVAPS XMM5,xmmword ptr [0x001b5140] XORPS XMM1,XMM5 MOVAPS XMM4,xmmword ptr [RSP + 0x50] MOVAPS XMM2,XMM4 UNPCKLPS XMM2,XMM3 MOVAPS XMM7,XMM3 MOVAPS XMM8,xmmword ptr [RSP + 0x40] MOVAPS XMM3,XMM8 UNPCKLPS XMM3,XMM8 MULPS XMM3,XMM2 MOVLPS qword ptr [RBX],XMM3 MOVAPS XMM9,xmmword ptr [RSP + 0x10] MOVAPS XMM3,XMM9 SHUFPS XMM3,XMM9,0x0 MULPS XMM3,XMM2 MOVAPS XMM10,xmmword ptr [RSP + 0x30] MOVAPS XMM2,XMM10 SHUFPS XMM2,XMM10,0x0 UNPCKLPS XMM1,XMM4 MOVAPS XMM6,XMM4 MULPS XMM1,XMM2 MOVAPS XMM4,XMM0 SHUFPS XMM4,XMM0,0x0 MULPS XMM2,XMM3 MULPS XMM3,XMM4 ADDPS XMM3,XMM1 MOVLPS qword ptr [RBX + 0x10],XMM3 MOVAPS XMM3,XMM6 XORPS XMM3,XMM5 UNPCKLPS XMM7,XMM3 MULPS XMM7,XMM4 ADDPS XMM2,XMM7 MOVLPS qword ptr [RBX + 0x20],XMM2 MOVAPS XMM2,XMM9 XORPS XMM2,XMM5 MOVSS dword ptr [RBX + 0x8],XMM2 MOVAPS XMM1,XMM8 MULSS XMM0,XMM8 MOVSS dword ptr [RBX + 0x18],XMM0 MULSS XMM1,XMM10 MOVSS dword ptr [RBX + 0x28],XMM1 MOV RAX,RBX ADD RSP,0x60 POP RBX RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int8 * MatrixRotateXYZ(int8 param_1,uint param_2,int8 *param_3) { uint uVar1; float fVar2; float fVar3; float fVar4; float fVar5; float fVar6; float fVar7; float fVar8; *(int8 *)((long)param_3 + 0x2c) = 0; *(int8 *)((long)param_3 + 0x34) = 0; *(int8 *)((long)param_3 + 0x1c) = 0; *(int8 *)((long)param_3 + 0x24) = 0; *(int8 *)((long)param_3 + 0xc) = 0; *(int8 *)((long)param_3 + 0x14) = 0; *(int4 *)((long)param_3 + 0x3c) = 0x3f800000; fVar7 = (float)(param_2 ^ _DAT_001b5140); fVar2 = cosf(fVar7); fVar7 = sinf(fVar7); fVar3 = (float)((uint)((ulong)param_1 >> 0x20) ^ _DAT_001b5140); fVar4 = cosf(fVar3); fVar3 = sinf(fVar3); fVar5 = (float)((uint)param_1 ^ _DAT_001b5140); fVar6 = cosf(fVar5); fVar5 = sinf(fVar5); uVar1 = _DAT_001b5140; fVar8 = (float)((uint)fVar7 ^ _DAT_001b5140); *param_3 = CONCAT44(fVar4 * fVar7,fVar4 * fVar2); param_3[2] = CONCAT44(fVar3 * fVar7 * fVar5 + fVar2 * fVar6,fVar3 * fVar2 * fVar5 + fVar8 * fVar6) ; param_3[4] = CONCAT44(fVar6 * fVar3 * fVar7 + (float)((uint)fVar2 ^ uVar1) * fVar5, fVar6 * fVar3 * fVar2 + fVar7 * fVar5); *(uint *)(param_3 + 1) = (uint)fVar3 ^ uVar1; *(float *)(param_3 + 3) = fVar5 * fVar4; *(float *)(param_3 + 5) = fVar4 * fVar6; return param_3; }
29,514
mysql_stmt_prepare
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, unsigned long length) { MYSQL *mysql= stmt->mysql; int rc= 1; my_bool is_multi= 0; if (!stmt->mysql) { SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); return(1); } if (length == (unsigned long) -1) length= (unsigned long)strlen(query); /* clear flags */ CLEAR_CLIENT_STMT_ERROR(stmt); CLEAR_CLIENT_ERROR(stmt->mysql); stmt->upsert_status.affected_rows= mysql->affected_rows= (unsigned long long) ~0; /* check if we have to clear results */ if (stmt->state > MYSQL_STMT_INITTED) { char stmt_id[STMT_ID_LENGTH]; is_multi= (mysql->net.extension->multi_status > COM_MULTI_OFF); /* We need to semi-close the prepared statement: reset stmt and free all buffers and close the statement on server side. Statement handle will get a new stmt_id */ if (!is_multi) ma_multi_command(mysql, COM_MULTI_ENABLED); if (mysql_stmt_internal_reset(stmt, 1)) goto fail; ma_free_root(&stmt->mem_root, MYF(MY_KEEP_PREALLOC)); ma_free_root(&((MADB_STMT_EXTENSION *)stmt->extension)->fields_ma_alloc_root, MYF(0)); stmt->param_count= 0; stmt->field_count= 0; stmt->fields= NULL; stmt->params= NULL; int4store(stmt_id, stmt->stmt_id); if (mysql->methods->db_command(mysql, COM_STMT_CLOSE, stmt_id, sizeof(stmt_id), 1, stmt)) goto fail; } if (mysql->methods->db_command(mysql, COM_STMT_PREPARE, query, length, 1, stmt)) goto fail; if (!is_multi && mysql->net.extension->multi_status == COM_MULTI_ENABLED) if (ma_multi_command(mysql, COM_MULTI_END)) goto fail; if (mysql->net.extension->multi_status > COM_MULTI_OFF || mysql->options.extension->skip_read_response) return 0; if (mysql->methods->db_read_prepare_response && mysql->methods->db_read_prepare_response(stmt)) goto fail; return(0); fail: stmt->state= MYSQL_STMT_INITTED; UPDATE_STMT_ERROR(stmt); return(rc); }
O0
c
mysql_stmt_prepare: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x18(%rbp) movq %rsi, -0x20(%rbp) movq %rdx, -0x28(%rbp) movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movq %rax, -0x30(%rbp) movl $0x1, -0x34(%rbp) movb $0x0, -0x35(%rbp) movq -0x18(%rbp), %rax cmpq $0x0, 0x38(%rax) jne 0x5c524 jmp 0x5c4b5 movq -0x18(%rbp), %rax movl $0x7dd, 0x108(%rax) # imm = 0x7DD movq -0x18(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D leaq 0x1ed4fb(%rip), %rax # 0x2499d0 movq (%rax), %rsi movl $0x5, %edx callq 0x38140 movq -0x18(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x18(%rbp), %rdi addq $0x10c, %rdi # imm = 0x10C leaq 0x1ed4e1(%rip), %rax # 0x2499e0 movq 0x68(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x38140 movq -0x18(%rbp), %rax movb $0x0, 0x30b(%rax) movl $0x1, -0x10(%rbp) jmp 0x5c8a5 cmpq $-0x1, -0x28(%rbp) jne 0x5c538 movq -0x20(%rbp), %rdi callq 0x38410 movq %rax, -0x28(%rbp) jmp 0x5c53a movq -0x18(%rbp), %rax movl $0x0, 0x108(%rax) movq -0x18(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D leaq 0x8302c(%rip), %rsi # 0xdf586 callq 0x38420 movq -0x18(%rbp), %rax movb $0x0, 0x10c(%rax) jmp 0x5c56c movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movl $0x0, 0x90(%rax) movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x82ff2(%rip), %rsi # 0xdf586 callq 0x38420 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x97(%rax) movq -0x18(%rbp), %rax movq 0x38(%rax), %rax cmpq $0x0, 0x2a0(%rax) je 0x5c5d0 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movq 0x2a0(%rax), %rax movl $0x0, 0x4(%rax) jmp 0x5c5d2 movq -0x30(%rbp), %rax movq $-0x1, 0x338(%rax) movq -0x18(%rbp), %rax movq $-0x1, 0xf8(%rax) movq -0x18(%rbp), %rax cmpl $0x0, 0x50(%rax) jbe 0x5c701 movq -0x30(%rbp), %rax movq 0x2a0(%rax), %rax cmpl $0x0, (%rax) seta %al andb $0x1, %al movzbl %al, %eax movb %al, -0x35(%rbp) cmpb $0x0, -0x35(%rbp) jne 0x5c62b movq -0x30(%rbp), %rdi movl $0x2, %esi callq 0x48a80 movq -0x18(%rbp), %rdi movl $0x1, %esi callq 0x5a1e0 cmpb $0x0, %al je 0x5c642 jmp 0x5c7d4 movq -0x18(%rbp), %rdi movl $0x1, %esi callq 0x56820 movq -0x18(%rbp), %rax movq 0x340(%rax), %rdi xorl %esi, %esi callq 0x56820 movq -0x18(%rbp), %rax movl $0x0, 0x64(%rax) movq -0x18(%rbp), %rax movl $0x0, 0x60(%rax) movq -0x18(%rbp), %rax movq $0x0, 0x58(%rax) movq -0x18(%rbp), %rax movq $0x0, 0x70(%rax) movq -0x18(%rbp), %rax movq 0x40(%rax), %rax movb %al, -0xc(%rbp) movq -0x18(%rbp), %rax movq 0x40(%rax), %rax shrq $0x8, %rax movb %al, -0xb(%rbp) movq -0x18(%rbp), %rax movq 0x40(%rax), %rax shrq $0x10, %rax movb %al, -0xa(%rbp) movq -0x18(%rbp), %rax movq 0x40(%rax), %rax shrq $0x18, %rax movb %al, -0x9(%rbp) movq -0x30(%rbp), %rax movq 0x4d0(%rax), %rax movq 0x10(%rax), %rax movq -0x30(%rbp), %rdi leaq -0xc(%rbp), %rdx movq -0x18(%rbp), %r9 movl $0x19, %esi movl $0x4, %ecx movl $0x1, %r8d callq *%rax cmpl $0x0, %eax je 0x5c6ff jmp 0x5c7d4 jmp 0x5c701 movq -0x30(%rbp), %rax movq 0x4d0(%rax), %rax movq 0x10(%rax), %rax movq -0x30(%rbp), %rdi movq -0x20(%rbp), %rdx movq -0x28(%rbp), %rcx movq -0x18(%rbp), %r9 movl $0x16, %esi movl $0x1, %r8d callq *%rax cmpl $0x0, %eax je 0x5c737 jmp 0x5c7d4 cmpb $0x0, -0x35(%rbp) jne 0x5c764 movq -0x30(%rbp), %rax movq 0x2a0(%rax), %rax cmpl $0x2, (%rax) jne 0x5c764 movq -0x30(%rbp), %rdi movl $0x4, %esi callq 0x48a80 cmpl $0x0, %eax je 0x5c762 jmp 0x5c7d4 jmp 0x5c764 movq -0x30(%rbp), %rax movq 0x2a0(%rax), %rax cmpl $0x0, (%rax) ja 0x5c78b movq -0x30(%rbp), %rax movq 0x480(%rax), %rax movsbl 0x148(%rax), %eax cmpl $0x0, %eax je 0x5c797 movl $0x0, -0x10(%rbp) jmp 0x5c8a5 movq -0x30(%rbp), %rax movq 0x4d0(%rax), %rax cmpq $0x0, 0x40(%rax) je 0x5c7c8 movq -0x30(%rbp), %rax movq 0x4d0(%rax), %rax movq 0x40(%rax), %rax movq -0x18(%rbp), %rdi callq *%rax movsbl %al, %eax cmpl $0x0, %eax je 0x5c7c8 jmp 0x5c7d4 movl $0x0, -0x10(%rbp) jmp 0x5c8a5 movq -0x18(%rbp), %rax movl $0x0, 0x50(%rax) movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movl 0x90(%rax), %ecx movq -0x18(%rbp), %rax movl %ecx, 0x108(%rax) movq -0x18(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D movq -0x18(%rbp), %rax movq 0x38(%rax), %rsi addq $0x297, %rsi # imm = 0x297 movl $0x5, %edx callq 0x38140 movq -0x18(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x18(%rbp), %rax addq $0x10c, %rax # imm = 0x10C movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax movq 0x38(%rax), %rax addq $0x97, %rax cmpq $0x0, %rax je 0x5c85c movq -0x18(%rbp), %rax movq 0x38(%rax), %rax addq $0x97, %rax movq %rax, -0x48(%rbp) jmp 0x5c882 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movl 0x90(%rax), %eax subl $0x7d0, %eax # imm = 0x7D0 movl %eax, %eax movl %eax, %ecx leaq 0x1ed166(%rip), %rax # 0x2499e0 movq (%rax,%rcx,8), %rax movq %rax, -0x48(%rbp) movq -0x40(%rbp), %rdi movq -0x48(%rbp), %rsi movl $0x200, %edx # imm = 0x200 callq 0x38140 movq -0x18(%rbp), %rax movb $0x0, 0x30b(%rax) movl -0x34(%rbp), %eax movl %eax, -0x10(%rbp) movl -0x10(%rbp), %eax movl %eax, -0x4c(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x5c8c6 movl -0x4c(%rbp), %eax addq $0x50, %rsp popq %rbp retq callq 0x382c0 nopl (%rax,%rax)
mysql_stmt_prepare: push rbp mov rbp, rsp sub rsp, 50h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov [rbp+var_28], rdx mov rax, [rbp+var_18] mov rax, [rax+38h] mov [rbp+var_30], rax mov [rbp+var_34], 1 mov [rbp+var_35], 0 mov rax, [rbp+var_18] cmp qword ptr [rax+38h], 0 jnz short loc_5C524 jmp short $+2 loc_5C4B5: mov rax, [rbp+var_18] mov dword ptr [rax+108h], 7DDh mov rdi, [rbp+var_18] add rdi, 30Dh lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_18] mov byte ptr [rax+312h], 0 mov rdi, [rbp+var_18] add rdi, 10Ch lea rax, client_errors mov rsi, [rax+68h] mov edx, 200h call _strncpy mov rax, [rbp+var_18] mov byte ptr [rax+30Bh], 0 mov [rbp+var_10], 1 jmp loc_5C8A5 loc_5C524: cmp [rbp+var_28], 0FFFFFFFFFFFFFFFFh jnz short loc_5C538 mov rdi, [rbp+var_20] call _strlen mov [rbp+var_28], rax loc_5C538: jmp short $+2 loc_5C53A: mov rax, [rbp+var_18] mov dword ptr [rax+108h], 0 mov rdi, [rbp+var_18] add rdi, 30Dh lea rsi, a00000; "00000" call _strcpy mov rax, [rbp+var_18] mov byte ptr [rax+10Ch], 0 jmp short $+2 loc_5C56C: mov rax, [rbp+var_18] mov rax, [rax+38h] mov dword ptr [rax+90h], 0 mov rax, [rbp+var_18] mov rdi, [rax+38h] add rdi, 297h lea rsi, a00000; "00000" call _strcpy mov rax, [rbp+var_18] mov rax, [rax+38h] mov byte ptr [rax+97h], 0 mov rax, [rbp+var_18] mov rax, [rax+38h] cmp qword ptr [rax+2A0h], 0 jz short loc_5C5D0 mov rax, [rbp+var_18] mov rax, [rax+38h] mov rax, [rax+2A0h] mov dword ptr [rax+4], 0 loc_5C5D0: jmp short $+2 loc_5C5D2: mov rax, [rbp+var_30] mov qword ptr [rax+338h], 0FFFFFFFFFFFFFFFFh mov rax, [rbp+var_18] mov qword ptr [rax+0F8h], 0FFFFFFFFFFFFFFFFh mov rax, [rbp+var_18] cmp dword ptr [rax+50h], 0 jbe loc_5C701 mov rax, [rbp+var_30] mov rax, [rax+2A0h] cmp dword ptr [rax], 0 setnbe al and al, 1 movzx eax, al mov [rbp+var_35], al cmp [rbp+var_35], 0 jnz short loc_5C62B mov rdi, [rbp+var_30] mov esi, 2 call ma_multi_command loc_5C62B: mov rdi, [rbp+var_18] mov esi, 1 call mysql_stmt_internal_reset cmp al, 0 jz short loc_5C642 jmp loc_5C7D4 loc_5C642: mov rdi, [rbp+var_18] mov esi, 1 call ma_free_root mov rax, [rbp+var_18] mov rdi, [rax+340h] xor esi, esi call ma_free_root mov rax, [rbp+var_18] mov dword ptr [rax+64h], 0 mov rax, [rbp+var_18] mov dword ptr [rax+60h], 0 mov rax, [rbp+var_18] mov qword ptr [rax+58h], 0 mov rax, [rbp+var_18] mov qword ptr [rax+70h], 0 mov rax, [rbp+var_18] mov rax, [rax+40h] mov [rbp+var_C], al mov rax, [rbp+var_18] mov rax, [rax+40h] shr rax, 8 mov [rbp+var_B], al mov rax, [rbp+var_18] mov rax, [rax+40h] shr rax, 10h mov [rbp+var_A], al mov rax, [rbp+var_18] mov rax, [rax+40h] shr rax, 18h mov [rbp+var_9], al mov rax, [rbp+var_30] mov rax, [rax+4D0h] mov rax, [rax+10h] mov rdi, [rbp+var_30] lea rdx, [rbp+var_C] mov r9, [rbp+var_18] mov esi, 19h mov ecx, 4 mov r8d, 1 call rax cmp eax, 0 jz short loc_5C6FF jmp loc_5C7D4 loc_5C6FF: jmp short $+2 loc_5C701: mov rax, [rbp+var_30] mov rax, [rax+4D0h] mov rax, [rax+10h] mov rdi, [rbp+var_30] mov rdx, [rbp+var_20] mov rcx, [rbp+var_28] mov r9, [rbp+var_18] mov esi, 16h mov r8d, 1 call rax cmp eax, 0 jz short loc_5C737 jmp loc_5C7D4 loc_5C737: cmp [rbp+var_35], 0 jnz short loc_5C764 mov rax, [rbp+var_30] mov rax, [rax+2A0h] cmp dword ptr [rax], 2 jnz short loc_5C764 mov rdi, [rbp+var_30] mov esi, 4 call ma_multi_command cmp eax, 0 jz short loc_5C762 jmp short loc_5C7D4 loc_5C762: jmp short $+2 loc_5C764: mov rax, [rbp+var_30] mov rax, [rax+2A0h] cmp dword ptr [rax], 0 ja short loc_5C78B mov rax, [rbp+var_30] mov rax, [rax+480h] movsx eax, byte ptr [rax+148h] cmp eax, 0 jz short loc_5C797 loc_5C78B: mov [rbp+var_10], 0 jmp loc_5C8A5 loc_5C797: mov rax, [rbp+var_30] mov rax, [rax+4D0h] cmp qword ptr [rax+40h], 0 jz short loc_5C7C8 mov rax, [rbp+var_30] mov rax, [rax+4D0h] mov rax, [rax+40h] mov rdi, [rbp+var_18] call rax movsx eax, al cmp eax, 0 jz short loc_5C7C8 jmp short loc_5C7D4 loc_5C7C8: mov [rbp+var_10], 0 jmp loc_5C8A5 loc_5C7D4: mov rax, [rbp+var_18] mov dword ptr [rax+50h], 0 mov rax, [rbp+var_18] mov rax, [rax+38h] mov ecx, [rax+90h] mov rax, [rbp+var_18] mov [rax+108h], ecx mov rdi, [rbp+var_18] add rdi, 30Dh mov rax, [rbp+var_18] mov rsi, [rax+38h] add rsi, 297h mov edx, 5 call _strncpy mov rax, [rbp+var_18] mov byte ptr [rax+312h], 0 mov rax, [rbp+var_18] add rax, 10Ch mov [rbp+var_40], rax mov rax, [rbp+var_18] mov rax, [rax+38h] add rax, 97h cmp rax, 0 jz short loc_5C85C mov rax, [rbp+var_18] mov rax, [rax+38h] add rax, 97h mov [rbp+var_48], rax jmp short loc_5C882 loc_5C85C: mov rax, [rbp+var_18] mov rax, [rax+38h] mov eax, [rax+90h] sub eax, 7D0h mov eax, eax mov ecx, eax lea rax, client_errors mov rax, [rax+rcx*8] mov [rbp+var_48], rax loc_5C882: mov rdi, [rbp+var_40] mov rsi, [rbp+var_48] mov edx, 200h call _strncpy mov rax, [rbp+var_18] mov byte ptr [rax+30Bh], 0 mov eax, [rbp+var_34] mov [rbp+var_10], eax loc_5C8A5: mov eax, [rbp+var_10] mov [rbp+var_4C], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_5C8C6 mov eax, [rbp+var_4C] add rsp, 50h pop rbp retn loc_5C8C6: call ___stack_chk_fail
long long mysql_stmt_prepare(long long a1, long long a2, long long a3) { char *v3; // rax bool v5; // [rsp+1Bh] [rbp-35h] long long v6; // [rsp+20h] [rbp-30h] long long v7; // [rsp+28h] [rbp-28h] _BYTE v9[4]; // [rsp+44h] [rbp-Ch] BYREF unsigned long long v10; // [rsp+48h] [rbp-8h] v10 = __readfsqword(0x28u); v7 = a3; v6 = *(_QWORD *)(a1 + 56); v5 = 0; if ( v6 ) { if ( a3 == -1 ) v7 = strlen(a2); *(_DWORD *)(a1 + 264) = 0; strcpy(a1 + 781, "00000"); *(_BYTE *)(a1 + 268) = 0; *(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL) = 0; strcpy(*(_QWORD *)(a1 + 56) + 663LL, "00000"); *(_BYTE *)(*(_QWORD *)(a1 + 56) + 151LL) = 0; if ( *(_QWORD *)(*(_QWORD *)(a1 + 56) + 672LL) ) *(_DWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 672LL) + 4LL) = 0; *(_QWORD *)(v6 + 824) = -1LL; *(_QWORD *)(a1 + 248) = -1LL; if ( !*(_DWORD *)(a1 + 80) ) goto LABEL_29; v5 = **(_DWORD **)(v6 + 672) != 0; if ( !**(_DWORD **)(v6 + 672) ) ma_multi_command(v6, 2); if ( !mysql_stmt_internal_reset(a1, 1) ) { ma_free_root((_QWORD *)a1, 1); ma_free_root(*(_QWORD **)(a1 + 832), 0); *(_DWORD *)(a1 + 100) = 0; *(_DWORD *)(a1 + 96) = 0; *(_QWORD *)(a1 + 88) = 0LL; *(_QWORD *)(a1 + 112) = 0LL; v9[0] = *(_QWORD *)(a1 + 64); v9[1] = BYTE1(*(_QWORD *)(a1 + 64)); v9[2] = BYTE2(*(_QWORD *)(a1 + 64)); v9[3] = BYTE3(*(_QWORD *)(a1 + 64)); if ( !(*(unsigned int ( **)(long long, long long, _BYTE *, long long, long long, long long))(*(_QWORD *)(v6 + 1232) + 16LL))( v6, 25LL, v9, 4LL, 1LL, a1) ) { LABEL_29: if ( !(*(unsigned int ( **)(long long, long long, long long, long long, long long, long long))(*(_QWORD *)(v6 + 1232) + 16LL))( v6, 22LL, a2, v7, 1LL, a1) && (v5 || **(_DWORD **)(v6 + 672) != 2 || !(unsigned int)ma_multi_command(v6, 4)) ) { if ( **(_DWORD **)(v6 + 672) || *(_BYTE *)(*(_QWORD *)(v6 + 1152) + 328LL) ) return 0; if ( !*(_QWORD *)(*(_QWORD *)(v6 + 1232) + 64LL) || !(*(unsigned __int8 ( **)(long long))(*(_QWORD *)(v6 + 1232) + 64LL))(a1) ) { return 0; } } } } *(_DWORD *)(a1 + 80) = 0; *(_DWORD *)(a1 + 264) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL); strncpy(a1 + 781, *(_QWORD *)(a1 + 56) + 663LL, 5LL); *(_BYTE *)(a1 + 786) = 0; if ( *(_QWORD *)(a1 + 56) == -151LL ) v3 = client_errors[*(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL) - 2000]; else v3 = (char *)(*(_QWORD *)(a1 + 56) + 151LL); strncpy(a1 + 268, v3, 512LL); *(_BYTE *)(a1 + 779) = 0; return 1; } else { *(_DWORD *)(a1 + 264) = 2013; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; strncpy(a1 + 268, client_errors[13], 512LL); *(_BYTE *)(a1 + 779) = 0; return 1; } }
mysql_stmt_prepare: PUSH RBP MOV RBP,RSP SUB RSP,0x50 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 qword ptr [RBP + -0x28],RDX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0x30],RAX MOV dword ptr [RBP + -0x34],0x1 MOV byte ptr [RBP + -0x35],0x0 MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x38],0x0 JNZ 0x0015c524 JMP 0x0015c4b5 LAB_0015c4b5: MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x108],0x7dd MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x30d LEA RAX,[0x3499d0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00138140 MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x312],0x0 MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x10c LEA RAX,[0x3499e0] MOV RSI,qword ptr [RAX + 0x68] MOV EDX,0x200 CALL 0x00138140 MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x30b],0x0 MOV dword ptr [RBP + -0x10],0x1 JMP 0x0015c8a5 LAB_0015c524: CMP qword ptr [RBP + -0x28],-0x1 JNZ 0x0015c538 MOV RDI,qword ptr [RBP + -0x20] CALL 0x00138410 MOV qword ptr [RBP + -0x28],RAX LAB_0015c538: JMP 0x0015c53a LAB_0015c53a: MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x108],0x0 MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x30d LEA RSI,[0x1df586] CALL 0x00138420 MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x10c],0x0 JMP 0x0015c56c LAB_0015c56c: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV dword ptr [RAX + 0x90],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x297 LEA RSI,[0x1df586] CALL 0x00138420 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV byte ptr [RAX + 0x97],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] CMP qword ptr [RAX + 0x2a0],0x0 JZ 0x0015c5d0 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x2a0] MOV dword ptr [RAX + 0x4],0x0 LAB_0015c5d0: JMP 0x0015c5d2 LAB_0015c5d2: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x338],-0x1 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0xf8],-0x1 MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x50],0x0 JBE 0x0015c701 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x2a0] CMP dword ptr [RAX],0x0 SETA AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x35],AL CMP byte ptr [RBP + -0x35],0x0 JNZ 0x0015c62b MOV RDI,qword ptr [RBP + -0x30] MOV ESI,0x2 CALL 0x00148a80 LAB_0015c62b: MOV RDI,qword ptr [RBP + -0x18] MOV ESI,0x1 CALL 0x0015a1e0 CMP AL,0x0 JZ 0x0015c642 JMP 0x0015c7d4 LAB_0015c642: MOV RDI,qword ptr [RBP + -0x18] MOV ESI,0x1 CALL 0x00156820 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x340] XOR ESI,ESI CALL 0x00156820 MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x64],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x60],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x58],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x70],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x40] MOV byte ptr [RBP + -0xc],AL MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x40] SHR RAX,0x8 MOV byte ptr [RBP + -0xb],AL MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x40] SHR RAX,0x10 MOV byte ptr [RBP + -0xa],AL MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x40] SHR RAX,0x18 MOV byte ptr [RBP + -0x9],AL MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x4d0] MOV RAX,qword ptr [RAX + 0x10] MOV RDI,qword ptr [RBP + -0x30] LEA RDX,[RBP + -0xc] MOV R9,qword ptr [RBP + -0x18] MOV ESI,0x19 MOV ECX,0x4 MOV R8D,0x1 CALL RAX CMP EAX,0x0 JZ 0x0015c6ff JMP 0x0015c7d4 LAB_0015c6ff: JMP 0x0015c701 LAB_0015c701: MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x4d0] MOV RAX,qword ptr [RAX + 0x10] MOV RDI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x28] MOV R9,qword ptr [RBP + -0x18] MOV ESI,0x16 MOV R8D,0x1 CALL RAX CMP EAX,0x0 JZ 0x0015c737 JMP 0x0015c7d4 LAB_0015c737: CMP byte ptr [RBP + -0x35],0x0 JNZ 0x0015c764 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x2a0] CMP dword ptr [RAX],0x2 JNZ 0x0015c764 MOV RDI,qword ptr [RBP + -0x30] MOV ESI,0x4 CALL 0x00148a80 CMP EAX,0x0 JZ 0x0015c762 JMP 0x0015c7d4 LAB_0015c762: JMP 0x0015c764 LAB_0015c764: MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x2a0] CMP dword ptr [RAX],0x0 JA 0x0015c78b MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x480] MOVSX EAX,byte ptr [RAX + 0x148] CMP EAX,0x0 JZ 0x0015c797 LAB_0015c78b: MOV dword ptr [RBP + -0x10],0x0 JMP 0x0015c8a5 LAB_0015c797: MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x4d0] CMP qword ptr [RAX + 0x40],0x0 JZ 0x0015c7c8 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x4d0] MOV RAX,qword ptr [RAX + 0x40] MOV RDI,qword ptr [RBP + -0x18] CALL RAX MOVSX EAX,AL CMP EAX,0x0 JZ 0x0015c7c8 JMP 0x0015c7d4 LAB_0015c7c8: MOV dword ptr [RBP + -0x10],0x0 JMP 0x0015c8a5 LAB_0015c7d4: MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x50],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV ECX,dword ptr [RAX + 0x90] MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x108],ECX MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x30d MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x38] ADD RSI,0x297 MOV EDX,0x5 CALL 0x00138140 MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x312],0x0 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x10c MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] ADD RAX,0x97 CMP RAX,0x0 JZ 0x0015c85c MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] ADD RAX,0x97 MOV qword ptr [RBP + -0x48],RAX JMP 0x0015c882 LAB_0015c85c: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV EAX,dword ptr [RAX + 0x90] SUB EAX,0x7d0 MOV EAX,EAX MOV ECX,EAX LEA RAX,[0x3499e0] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x48],RAX LAB_0015c882: MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x48] MOV EDX,0x200 CALL 0x00138140 MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x30b],0x0 MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x10],EAX LAB_0015c8a5: MOV EAX,dword ptr [RBP + -0x10] MOV dword ptr [RBP + -0x4c],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0015c8c6 MOV EAX,dword ptr [RBP + -0x4c] ADD RSP,0x50 POP RBP RET LAB_0015c8c6: CALL 0x001382c0
int4 mysql_stmt_prepare(long param_1,char *param_2,size_t param_3) { long lVar1; char cVar2; int iVar3; long in_FS_OFFSET; bool bVar4; char *local_50; size_t local_30; int4 local_18; int1 local_14; int1 local_13; int1 local_12; int1 local_11; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); lVar1 = *(long *)(param_1 + 0x38); bVar4 = false; if (*(long *)(param_1 + 0x38) == 0) { *(int4 *)(param_1 + 0x108) = 0x7dd; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; strncpy((char *)(param_1 + 0x10c),PTR_s_Lost_connection_to_server_during_00349a48,0x200); *(int1 *)(param_1 + 0x30b) = 0; local_18 = 1; goto LAB_0015c8a5; } local_30 = param_3; if (param_3 == 0xffffffffffffffff) { local_30 = strlen(param_2); } *(int4 *)(param_1 + 0x108) = 0; strcpy((char *)(param_1 + 0x30d),"00000"); *(int1 *)(param_1 + 0x10c) = 0; *(int4 *)(*(long *)(param_1 + 0x38) + 0x90) = 0; strcpy((char *)(*(long *)(param_1 + 0x38) + 0x297),"00000"); *(int1 *)(*(long *)(param_1 + 0x38) + 0x97) = 0; if (*(long *)(*(long *)(param_1 + 0x38) + 0x2a0) != 0) { *(int4 *)(*(long *)(*(long *)(param_1 + 0x38) + 0x2a0) + 4) = 0; } *(int8 *)(lVar1 + 0x338) = 0xffffffffffffffff; *(int8 *)(param_1 + 0xf8) = 0xffffffffffffffff; if (*(int *)(param_1 + 0x50) == 0) { LAB_0015c701: iVar3 = (**(code **)(*(long *)(lVar1 + 0x4d0) + 0x10))(lVar1,0x16,param_2,local_30,1,param_1); if ((iVar3 == 0) && (((bVar4 || (**(int **)(lVar1 + 0x2a0) != 2)) || (iVar3 = ma_multi_command(lVar1,4), iVar3 == 0)))) { if ((**(int **)(lVar1 + 0x2a0) != 0) || (*(char *)(*(long *)(lVar1 + 0x480) + 0x148) != '\0')) { local_18 = 0; goto LAB_0015c8a5; } if ((*(long *)(*(long *)(lVar1 + 0x4d0) + 0x40) == 0) || (cVar2 = (**(code **)(*(long *)(lVar1 + 0x4d0) + 0x40))(param_1), cVar2 == '\0')) { local_18 = 0; goto LAB_0015c8a5; } } } else { bVar4 = **(int **)(lVar1 + 0x2a0) != 0; if (!bVar4) { ma_multi_command(lVar1,2); } cVar2 = mysql_stmt_internal_reset(param_1,1); if (cVar2 == '\0') { ma_free_root(param_1,1); ma_free_root(*(int8 *)(param_1 + 0x340),0); *(int4 *)(param_1 + 100) = 0; *(int4 *)(param_1 + 0x60) = 0; *(int8 *)(param_1 + 0x58) = 0; *(int8 *)(param_1 + 0x70) = 0; local_14 = (int1)*(int8 *)(param_1 + 0x40); local_13 = (int1)((ulong)*(int8 *)(param_1 + 0x40) >> 8); local_12 = (int1)((ulong)*(int8 *)(param_1 + 0x40) >> 0x10); local_11 = (int1)((ulong)*(int8 *)(param_1 + 0x40) >> 0x18); iVar3 = (**(code **)(*(long *)(lVar1 + 0x4d0) + 0x10))(lVar1,0x19,&local_14,4,1,param_1); if (iVar3 == 0) goto LAB_0015c701; } } *(int4 *)(param_1 + 0x50) = 0; *(int4 *)(param_1 + 0x108) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x90); strncpy((char *)(param_1 + 0x30d),(char *)(*(long *)(param_1 + 0x38) + 0x297),5); *(int1 *)(param_1 + 0x312) = 0; if (*(long *)(param_1 + 0x38) == -0x97) { local_50 = (&client_errors)[*(int *)(*(long *)(param_1 + 0x38) + 0x90) - 2000]; } else { local_50 = (char *)(*(long *)(param_1 + 0x38) + 0x97); } strncpy((char *)(param_1 + 0x10c),local_50,0x200); *(int1 *)(param_1 + 0x30b) = 0; local_18 = 1; LAB_0015c8a5: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_18; }
29,515
ggml_gallocr_free
llama.cpp/ggml/src/ggml-alloc.c
void ggml_gallocr_free(ggml_gallocr_t galloc) { if (galloc == NULL) { return; } for (int i = 0; i < galloc->n_buffers; i++) { if (galloc->buffers != NULL) { // skip if already freed bool freed = false; for (int j = 0; j < i; j++) { if (galloc->buffers[j] == galloc->buffers[i]) { freed = true; break; } } if (!freed) { ggml_backend_buffer_free(galloc->buffers[i]); } } if (galloc->buf_tallocs != NULL) { // skip if already freed bool freed = false; for (int j = 0; j < i; j++) { if (galloc->buf_tallocs[j] == galloc->buf_tallocs[i]) { freed = true; break; } } if (!freed) { ggml_dyn_tallocr_free(galloc->buf_tallocs[i]); } } } ggml_hash_set_free(&galloc->hash_set); free(galloc->hash_values); free(galloc->bufts); free(galloc->buffers); free(galloc->buf_tallocs); free(galloc->node_allocs); free(galloc->leaf_allocs); free(galloc); }
O3
c
ggml_gallocr_free: testq %rdi, %rdi je 0x23c2d pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx cmpl $0x0, 0x18(%rdi) jle 0x23be0 xorl %r14d, %r14d movq 0x8(%rbx), %rax testq %rax, %rax je 0x23ba8 testq %r14, %r14 je 0x23ba0 movq (%rax,%r14,8), %rdi xorl %ecx, %ecx cmpq %rdi, (%rax,%rcx,8) je 0x23ba8 incq %rcx cmpq %rcx, %r14 jne 0x23b90 jmp 0x23ba3 movq (%rax), %rdi callq 0x17d30 movq 0x10(%rbx), %rax testq %rax, %rax je 0x23bd4 testq %r14, %r14 je 0x23bcc movq (%rax,%r14,8), %rdi xorl %ecx, %ecx cmpq %rdi, (%rax,%rcx,8) je 0x23bd4 incq %rcx cmpq %rcx, %r14 jne 0x23bbc jmp 0x23bcf movq (%rax), %rdi callq 0x173f0 incq %r14 movslq 0x18(%rbx), %rax cmpq %rax, %r14 jl 0x23b7c leaq 0x20(%rbx), %rdi callq 0x16150 movq 0x38(%rbx), %rdi callq 0x173f0 movq (%rbx), %rdi callq 0x173f0 movq 0x8(%rbx), %rdi callq 0x173f0 movq 0x10(%rbx), %rdi callq 0x173f0 movq 0x40(%rbx), %rdi callq 0x173f0 movq 0x50(%rbx), %rdi callq 0x173f0 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x173f0 retq
ggml_gallocr_free: test rdi, rdi jz locret_23C2D push r14 push rbx push rax mov rbx, rdi cmp dword ptr [rdi+18h], 0 jle short loc_23BE0 xor r14d, r14d loc_23B7C: mov rax, [rbx+8] test rax, rax jz short loc_23BA8 test r14, r14 jz short loc_23BA0 mov rdi, [rax+r14*8] xor ecx, ecx loc_23B90: cmp [rax+rcx*8], rdi jz short loc_23BA8 inc rcx cmp r14, rcx jnz short loc_23B90 jmp short loc_23BA3 loc_23BA0: mov rdi, [rax]; void * loc_23BA3: call _ggml_backend_buffer_free loc_23BA8: mov rax, [rbx+10h] test rax, rax jz short loc_23BD4 test r14, r14 jz short loc_23BCC mov rdi, [rax+r14*8] xor ecx, ecx loc_23BBC: cmp [rax+rcx*8], rdi jz short loc_23BD4 inc rcx cmp r14, rcx jnz short loc_23BBC jmp short loc_23BCF loc_23BCC: mov rdi, [rax] loc_23BCF: call _free loc_23BD4: inc r14 movsxd rax, dword ptr [rbx+18h] cmp r14, rax jl short loc_23B7C loc_23BE0: lea rdi, [rbx+20h] call _ggml_hash_set_free mov rdi, [rbx+38h] call _free mov rdi, [rbx] call _free mov rdi, [rbx+8] call _free mov rdi, [rbx+10h] call _free mov rdi, [rbx+40h] call _free mov rdi, [rbx+50h] call _free mov rdi, rbx add rsp, 8 pop rbx pop r14 jmp _free locret_23C2D: retn
long long ggml_gallocr_free(long long a1) { long long result; // rax long long v3; // r14 void **v4; // rax void *v5; // rdi long long v6; // rcx long long *v7; // rax long long v8; // rdi long long v9; // rcx if ( a1 ) { if ( *(int *)(a1 + 24) > 0 ) { v3 = 0LL; do { v4 = *(void ***)(a1 + 8); if ( v4 ) { if ( v3 ) { v5 = v4[v3]; v6 = 0LL; while ( v4[v6] != v5 ) { if ( v3 == ++v6 ) goto LABEL_11; } } else { v5 = *v4; LABEL_11: ggml_backend_buffer_free(v5); } } v7 = *(long long **)(a1 + 16); if ( v7 ) { if ( v3 ) { v8 = v7[v3]; v9 = 0LL; while ( v7[v9] != v8 ) { if ( v3 == ++v9 ) goto LABEL_19; } } else { v8 = *v7; LABEL_19: free(v8); } } ++v3; } while ( v3 < *(int *)(a1 + 24) ); } ggml_hash_set_free(a1 + 32); free(*(_QWORD *)(a1 + 56)); free(*(_QWORD *)a1); free(*(_QWORD *)(a1 + 8)); free(*(_QWORD *)(a1 + 16)); free(*(_QWORD *)(a1 + 64)); free(*(_QWORD *)(a1 + 80)); return free(a1); } return result; }
ggml_gallocr_free: TEST RDI,RDI JZ 0x00123c2d PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI CMP dword ptr [RDI + 0x18],0x0 JLE 0x00123be0 XOR R14D,R14D LAB_00123b7c: MOV RAX,qword ptr [RBX + 0x8] TEST RAX,RAX JZ 0x00123ba8 TEST R14,R14 JZ 0x00123ba0 MOV RDI,qword ptr [RAX + R14*0x8] XOR ECX,ECX LAB_00123b90: CMP qword ptr [RAX + RCX*0x8],RDI JZ 0x00123ba8 INC RCX CMP R14,RCX JNZ 0x00123b90 JMP 0x00123ba3 LAB_00123ba0: MOV RDI,qword ptr [RAX] LAB_00123ba3: CALL 0x00117d30 LAB_00123ba8: MOV RAX,qword ptr [RBX + 0x10] TEST RAX,RAX JZ 0x00123bd4 TEST R14,R14 JZ 0x00123bcc MOV RDI,qword ptr [RAX + R14*0x8] XOR ECX,ECX LAB_00123bbc: CMP qword ptr [RAX + RCX*0x8],RDI JZ 0x00123bd4 INC RCX CMP R14,RCX JNZ 0x00123bbc JMP 0x00123bcf LAB_00123bcc: MOV RDI,qword ptr [RAX] LAB_00123bcf: CALL 0x001173f0 LAB_00123bd4: INC R14 MOVSXD RAX,dword ptr [RBX + 0x18] CMP R14,RAX JL 0x00123b7c LAB_00123be0: LEA RDI,[RBX + 0x20] CALL 0x00116150 MOV RDI,qword ptr [RBX + 0x38] CALL 0x001173f0 MOV RDI,qword ptr [RBX] CALL 0x001173f0 MOV RDI,qword ptr [RBX + 0x8] CALL 0x001173f0 MOV RDI,qword ptr [RBX + 0x10] CALL 0x001173f0 MOV RDI,qword ptr [RBX + 0x40] CALL 0x001173f0 MOV RDI,qword ptr [RBX + 0x50] CALL 0x001173f0 MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x001173f0 LAB_00123c2d: RET
void ggml_gallocr_free(int8 *param_1) { long *plVar1; int8 *puVar2; long lVar3; long lVar4; void *__ptr; long lVar5; if (param_1 == (int8 *)0x0) { return; } if (0 < *(int *)(param_1 + 3)) { lVar5 = 0; do { plVar1 = (long *)param_1[1]; if (plVar1 != (long *)0x0) { if (lVar5 == 0) { lVar4 = *plVar1; } else { lVar4 = plVar1[lVar5]; lVar3 = 0; do { if (plVar1[lVar3] == lVar4) goto LAB_00123ba8; lVar3 = lVar3 + 1; } while (lVar5 != lVar3); } ggml_backend_buffer_free(lVar4); } LAB_00123ba8: puVar2 = (int8 *)param_1[2]; if (puVar2 != (int8 *)0x0) { if (lVar5 == 0) { __ptr = (void *)*puVar2; } else { __ptr = (void *)puVar2[lVar5]; lVar4 = 0; do { if ((void *)puVar2[lVar4] == __ptr) goto LAB_00123bd4; lVar4 = lVar4 + 1; } while (lVar5 != lVar4); } free(__ptr); } LAB_00123bd4: lVar5 = lVar5 + 1; } while (lVar5 < *(int *)(param_1 + 3)); } ggml_hash_set_free(param_1 + 4); free((void *)param_1[7]); free((void *)*param_1); free((void *)param_1[1]); free((void *)param_1[2]); free((void *)param_1[8]); free((void *)param_1[10]); free(param_1); return; }
29,516
print_toggle_state(ToggleInfo const&)
untodesu[P]voxelius/game/client/toggles.cc
static void print_toggle_state(const ToggleInfo &info) { if(info.description) { if(info.is_enabled) client_chat::print(fmt::format("[toggles] {} ON", info.description)); else client_chat::print(fmt::format("[toggles] {} OFF", info.description)); } }
O1
cpp
print_toggle_state(ToggleInfo const&): pushq %rbx subq $0x30, %rsp movq (%rdi), %rax testq %rax, %rax je 0x70450 cmpb $0x1, 0xc(%rdi) jne 0x70409 leaq 0x20(%rsp), %r8 movq %rax, (%r8) leaq 0x12e940(%rip), %rsi # 0x19ed2a movq %rsp, %rbx movl $0xf, %edx movl $0xc, %ecx movq %rbx, %rdi callq 0x147c0b movq %rbx, %rdi callq 0x381f2 jmp 0x70435 leaq 0x20(%rsp), %r8 movq %rax, (%r8) leaq 0x12e922(%rip), %rsi # 0x19ed3a movq %rsp, %rbx movl $0x10, %edx movl $0xc, %ecx movq %rbx, %rdi callq 0x147c0b movq %rbx, %rdi callq 0x381f2 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x70450 movq 0x10(%rsp), %rsi incq %rsi callq 0x268d0 addq $0x30, %rsp popq %rbx retq jmp 0x70458 movq %rax, %rbx leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x70476 movq 0x10(%rsp), %rsi incq %rsi callq 0x268d0 movq %rbx, %rdi callq 0x26fe0
_ZL18print_toggle_stateRK10ToggleInfo: push rbx sub rsp, 30h mov rax, [rdi] test rax, rax jz short loc_70450 cmp byte ptr [rdi+0Ch], 1 jnz short loc_70409 lea r8, [rsp+38h+var_18] mov [r8], rax lea rsi, aTogglesOn; "[toggles] {} ON" mov rbx, rsp mov edx, 0Fh mov ecx, 0Ch mov rdi, rbx call _ZN3fmt3v117vformatB5cxx11ENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_7contextEEE; fmt::v11::vformat(fmt::v11::basic_string_view<char>,fmt::v11::basic_format_args<fmt::v11::context>) mov rdi, rbx; int call _ZN11client_chat5printERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; client_chat::print(std::string const&) jmp short loc_70435 loc_70409: lea r8, [rsp+38h+var_18] mov [r8], rax lea rsi, aTogglesOff; "[toggles] {} OFF" mov rbx, rsp mov edx, 10h mov ecx, 0Ch mov rdi, rbx call _ZN3fmt3v117vformatB5cxx11ENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_7contextEEE; fmt::v11::vformat(fmt::v11::basic_string_view<char>,fmt::v11::basic_format_args<fmt::v11::context>) mov rdi, rbx; int call _ZN11client_chat5printERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; client_chat::print(std::string const&) loc_70435: lea rax, [rsp+38h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_70450 mov rsi, [rsp+38h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_70450: add rsp, 30h pop rbx retn jmp short $+2 loc_70458: mov rbx, rax lea rax, [rsp+arg_8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_70476 mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_70476: mov rdi, rbx call __Unwind_Resume
void print_toggle_state(long long a1, _DWORD a2, _DWORD a3, _DWORD a4, _DWORD a5, int a6) { void *v6[2]; // [rsp+0h] [rbp-38h] BYREF long long v7; // [rsp+10h] [rbp-28h] BYREF _QWORD v8[3]; // [rsp+20h] [rbp-18h] BYREF if ( *(_QWORD *)a1 ) { if ( *(_BYTE *)(a1 + 12) == 1 ) { v8[0] = *(_QWORD *)a1; fmt::v11::vformat[abi:cxx11]((unsigned int)v6, (unsigned int)"[toggles] {} ON", 15, 12, (unsigned int)v8, a6); } else { v8[0] = *(_QWORD *)a1; fmt::v11::vformat[abi:cxx11]((unsigned int)v6, (unsigned int)"[toggles] {} OFF", 16, 12, (unsigned int)v8, a6); } client_chat::print((long long)v6); if ( v6[0] != &v7 ) operator delete(v6[0], v7 + 1); } }
print_toggle_state: PUSH RBX SUB RSP,0x30 MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x00170450 CMP byte ptr [RDI + 0xc],0x1 JNZ 0x00170409 LEA R8,[RSP + 0x20] MOV qword ptr [R8],RAX LEA RSI,[0x29ed2a] MOV RBX,RSP MOV EDX,0xf MOV ECX,0xc MOV RDI,RBX CALL 0x00247c0b LAB_001703ff: MOV RDI,RBX CALL 0x001381f2 LAB_00170407: JMP 0x00170435 LAB_00170409: LEA R8,[RSP + 0x20] MOV qword ptr [R8],RAX LEA RSI,[0x29ed3a] MOV RBX,RSP MOV EDX,0x10 MOV ECX,0xc MOV RDI,RBX CALL 0x00247c0b LAB_0017042d: MOV RDI,RBX CALL 0x001381f2 LAB_00170435: LEA RAX,[RSP + 0x10] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00170450 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x001268d0 LAB_00170450: ADD RSP,0x30 POP RBX RET
/* print_toggle_state(ToggleInfo const&) */ void print_toggle_state(ToggleInfo *param_1) { long *local_38 [2]; long local_28 [2]; long local_18; local_18 = *(long *)param_1; if (local_18 != 0) { if (param_1[0xc] == (ToggleInfo)0x1) { fmt::v11::vformat_abi_cxx11_(local_38,"[toggles] {} ON",0xf,0xc); /* try { // try from 001703ff to 00170406 has its CatchHandler @ 00170458 */ client_chat::print((string *)local_38); } else { fmt::v11::vformat_abi_cxx11_(local_38,"[toggles] {} OFF",0x10,0xc); /* try { // try from 0017042d to 00170434 has its CatchHandler @ 00170456 */ client_chat::print((string *)local_38); } if (local_38[0] != local_28) { operator_delete(local_38[0],local_28[0] + 1); } } return; }
29,517
void 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_integer<unsigned char, 0>(unsigned char)
llama.cpp/common/json.hpp
void dump_integer(NumberType x) { static constexpr std::array<std::array<char, 2>, 100> digits_to_99 { { {{'0', '0'}}, {{'0', '1'}}, {{'0', '2'}}, {{'0', '3'}}, {{'0', '4'}}, {{'0', '5'}}, {{'0', '6'}}, {{'0', '7'}}, {{'0', '8'}}, {{'0', '9'}}, {{'1', '0'}}, {{'1', '1'}}, {{'1', '2'}}, {{'1', '3'}}, {{'1', '4'}}, {{'1', '5'}}, {{'1', '6'}}, {{'1', '7'}}, {{'1', '8'}}, {{'1', '9'}}, {{'2', '0'}}, {{'2', '1'}}, {{'2', '2'}}, {{'2', '3'}}, {{'2', '4'}}, {{'2', '5'}}, {{'2', '6'}}, {{'2', '7'}}, {{'2', '8'}}, {{'2', '9'}}, {{'3', '0'}}, {{'3', '1'}}, {{'3', '2'}}, {{'3', '3'}}, {{'3', '4'}}, {{'3', '5'}}, {{'3', '6'}}, {{'3', '7'}}, {{'3', '8'}}, {{'3', '9'}}, {{'4', '0'}}, {{'4', '1'}}, {{'4', '2'}}, {{'4', '3'}}, {{'4', '4'}}, {{'4', '5'}}, {{'4', '6'}}, {{'4', '7'}}, {{'4', '8'}}, {{'4', '9'}}, {{'5', '0'}}, {{'5', '1'}}, {{'5', '2'}}, {{'5', '3'}}, {{'5', '4'}}, {{'5', '5'}}, {{'5', '6'}}, {{'5', '7'}}, {{'5', '8'}}, {{'5', '9'}}, {{'6', '0'}}, {{'6', '1'}}, {{'6', '2'}}, {{'6', '3'}}, {{'6', '4'}}, {{'6', '5'}}, {{'6', '6'}}, {{'6', '7'}}, {{'6', '8'}}, {{'6', '9'}}, {{'7', '0'}}, {{'7', '1'}}, {{'7', '2'}}, {{'7', '3'}}, {{'7', '4'}}, {{'7', '5'}}, {{'7', '6'}}, {{'7', '7'}}, {{'7', '8'}}, {{'7', '9'}}, {{'8', '0'}}, {{'8', '1'}}, {{'8', '2'}}, {{'8', '3'}}, {{'8', '4'}}, {{'8', '5'}}, {{'8', '6'}}, {{'8', '7'}}, {{'8', '8'}}, {{'8', '9'}}, {{'9', '0'}}, {{'9', '1'}}, {{'9', '2'}}, {{'9', '3'}}, {{'9', '4'}}, {{'9', '5'}}, {{'9', '6'}}, {{'9', '7'}}, {{'9', '8'}}, {{'9', '9'}}, } }; // special case for "0" if (x == 0) { o->write_character('0'); return; } // use a pointer to fill the buffer auto buffer_ptr = number_buffer.begin(); // NOLINT(llvm-qualified-auto,readability-qualified-auto,cppcoreguidelines-pro-type-vararg,hicpp-vararg) number_unsigned_t abs_value; unsigned int n_chars{}; if (is_negative_number(x)) { *buffer_ptr = '-'; abs_value = remove_sign(static_cast<number_integer_t>(x)); // account one more byte for the minus sign n_chars = 1 + count_digits(abs_value); } else { abs_value = static_cast<number_unsigned_t>(x); n_chars = count_digits(abs_value); } // spare 1 byte for '\0' JSON_ASSERT(n_chars < number_buffer.size() - 1); // jump to the end to generate the string from backward, // so we later avoid reversing the result buffer_ptr += n_chars; // Fast int2ascii implementation inspired by "Fastware" talk by Andrei Alexandrescu // See: https://www.youtube.com/watch?v=o4-CwDo2zpg while (abs_value >= 100) { const auto digits_index = static_cast<unsigned>((abs_value % 100)); abs_value /= 100; *(--buffer_ptr) = digits_to_99[digits_index][1]; *(--buffer_ptr) = digits_to_99[digits_index][0]; } if (abs_value >= 10) { const auto digits_index = static_cast<unsigned>(abs_value); *(--buffer_ptr) = digits_to_99[digits_index][1]; *(--buffer_ptr) = digits_to_99[digits_index][0]; } else { *(--buffer_ptr) = static_cast<char>('0' + abs_value); } o->write_characters(number_buffer.data(), n_chars); }
O3
cpp
void 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_integer<unsigned char, 0>(unsigned char): testl %esi, %esi je 0x7de10 movl %esi, %eax leaq 0x10(%rdi), %rsi movzbl %al, %ecx movl $0x1, %edx cmpb $0xa, %cl jb 0x7ddf6 movl $0x2, %edx cmpb $0x64, %al jae 0x7de20 leaq (%rsi,%rdx), %r8 cmpb $0xa, %al jb 0x7de4b leaq 0x9f0d4(%rip), %rax # 0x11ced9 movzwl (%rax,%rcx,2), %eax movw %ax, -0x2(%r8) jmp 0x7de51 movq (%rdi), %rdi movq (%rdi), %rax movq (%rax), %rax movl $0x30, %esi jmpq *%rax leal (%rcx,%rcx,4), %edx leal (%rcx,%rdx,8), %ecx shrl $0xc, %ecx imull $0x64, %ecx, %edx subb %dl, %al movzbl %al, %eax leaq 0x9f0a1(%rip), %rdx # 0x11ced9 movzwl (%rdx,%rax,2), %eax leaq 0x11(%rdi), %r8 movw %ax, 0x11(%rdi) movl $0x3, %edx movl %ecx, %eax orb $0x30, %al movb %al, -0x1(%r8) movq (%rdi), %rdi movq (%rdi), %rax movq 0x8(%rax), %rax jmpq *%rax nop
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_: test esi, esi jz short loc_7DE10 mov eax, esi lea rsi, [rdi+10h] movzx ecx, al mov edx, 1 cmp cl, 0Ah jb short loc_7DDF6 mov edx, 2 cmp al, 64h ; 'd' jnb short loc_7DE20 loc_7DDF6: lea r8, [rsi+rdx] cmp al, 0Ah jb short loc_7DE4B lea rax, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99 movzx eax, word ptr [rax+rcx*2] mov [r8-2], ax jmp short loc_7DE51 loc_7DE10: mov rdi, [rdi] mov rax, [rdi] mov rax, [rax] mov esi, 30h ; '0' jmp rax loc_7DE20: lea edx, [rcx+rcx*4] lea ecx, [rcx+rdx*8] shr ecx, 0Ch imul edx, ecx, 64h ; 'd' sub al, dl movzx eax, al lea rdx, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99 movzx eax, word ptr [rdx+rax*2] lea r8, [rdi+11h] mov [rdi+11h], ax mov edx, 3 mov eax, ecx loc_7DE4B: or al, 30h mov [r8-1], al loc_7DE51: mov rdi, [rdi] mov rax, [rdi] mov rax, [rax+8] jmp rax
long long ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_( _QWORD *a1, int a2) { char v2; // al long long v3; // rdx char *v4; // r8 if ( !a2 ) return (**(long long ( ***)(_QWORD, long long))*a1)(*a1, 48LL); v2 = a2; v3 = 1LL; if ( (unsigned __int8)a2 >= 0xAu ) { v3 = 2LL; if ( (unsigned __int8)a2 >= 0x64u ) { v4 = (char *)a1 + 17; *(_WORD *)((char *)a1 + 17) = ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99[(unsigned __int8)a2 % 0x64u]; v2 = (unsigned __int8)a2 / 0x64u; goto LABEL_8; } } v4 = (char *)a1 + v3 + 16; if ( (unsigned __int8)a2 < 0xAu ) { LABEL_8: *(v4 - 1) = v2 | 0x30; return (*(long long ( **)(_QWORD))(*(_QWORD *)*a1 + 8LL))(*a1); } *((_WORD *)v4 - 1) = ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99[(unsigned __int8)a2]; return (*(long long ( **)(_QWORD))(*(_QWORD *)*a1 + 8LL))(*a1); }
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_: TEST ESI,ESI JZ 0x0017de10 MOV EAX,ESI LEA RSI,[RDI + 0x10] MOVZX ECX,AL MOV EDX,0x1 CMP CL,0xa JC 0x0017ddf6 MOV EDX,0x2 CMP AL,0x64 JNC 0x0017de20 LAB_0017ddf6: LEA R8,[RSI + RDX*0x1] CMP AL,0xa JC 0x0017de4b LEA RAX,[0x21ced9] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV word ptr [R8 + -0x2],AX JMP 0x0017de51 LAB_0017de10: MOV RDI,qword ptr [RDI] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX] MOV ESI,0x30 JMP RAX LAB_0017de20: LEA EDX,[RCX + RCX*0x4] LEA ECX,[RCX + RDX*0x8] SHR ECX,0xc IMUL EDX,ECX,0x64 SUB AL,DL MOVZX EAX,AL LEA RDX,[0x21ced9] MOVZX EAX,word ptr [RDX + RAX*0x2] LEA R8,[RDI + 0x11] MOV word ptr [RDI + 0x11],AX MOV EDX,0x3 MOV EAX,ECX LAB_0017de4b: OR AL,0x30 MOV byte ptr [R8 + -0x1],AL LAB_0017de51: MOV RDI,qword ptr [RDI] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x8] JMP RAX
void _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_ (int8 *param_1,uint param_2) { byte bVar1; byte bVar2; long lVar3; long lVar4; if (param_2 == 0) { /* WARNING: Could not recover jumptable at 0x0017de1e. Too many branches */ /* WARNING: Treating indirect jump as call */ (*(code *)**(int8 **)*param_1)((int8 *)*param_1,0x30); return; } bVar1 = (byte)param_2; lVar3 = 1; if ((bVar1 < 10) || (lVar3 = 2, bVar1 < 100)) { lVar4 = (long)(param_1 + 2) + lVar3; bVar2 = bVar1; if (9 < bVar1) { *(int2 *)(lVar4 + -2) = *(int2 *) ( _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99 + (ulong)bVar1 * 2); goto LAB_0017de51; } } else { bVar2 = (byte)((param_2 & 0xff) + ((param_2 & 0xff) + (param_2 & 0xff) * 4) * 8 >> 0xc); lVar4 = (long)param_1 + 0x11; *(int2 *)((long)param_1 + 0x11) = *(int2 *) ( _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIhTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99 + (ulong)(byte)(bVar1 + bVar2 * -100) * 2); lVar3 = 3; } *(byte *)(lVar4 + -1) = bVar2 | 0x30; LAB_0017de51: /* WARNING: Could not recover jumptable at 0x0017de5b. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(*(long *)*param_1 + 8))((long *)*param_1,param_1 + 2,lVar3); return; }
29,518
SET_resume_index
xtate/src/xconf.c
static ConfRes SET_resume_index(void *conf, const char *name, const char *value) { XConf *xconf = (XConf *)conf; UNUSEDPARM(name); if (xconf->echo) { if (xconf->resume.index != 0 || xconf->echo_all) { fprintf(xconf->echo, "resume-index = %" PRIu64 "\n", xconf->resume.index); } return 0; } xconf->resume.index = conf_parse_int(value); return Conf_OK; }
O3
c
SET_resume_index: pushq %rbx movq %rdi, %rbx movq 0x2a8(%rdi), %rdi testq %rdi, %rdi je 0x5b001 movq 0x170(%rbx), %rdx testq %rdx, %rdx jne 0x5aff1 cmpl $0x0, 0x2b0(%rbx) je 0x5b010 leaq 0x241cc(%rip), %rsi # 0x7f1c4 xorl %eax, %eax callq 0x15220 jmp 0x5b010 movq %rdx, %rdi callq 0x523a0 movq %rax, 0x170(%rbx) xorl %eax, %eax popq %rbx retq
SET_resume_index: push rbx mov rbx, rdi mov rdi, [rdi+2A8h] test rdi, rdi jz short loc_5B001 mov rdx, [rbx+170h] test rdx, rdx jnz short loc_5AFF1 cmp dword ptr [rbx+2B0h], 0 jz short loc_5B010 loc_5AFF1: lea rsi, aResumeIndexLu; "resume-index = %lu\n" xor eax, eax call _fprintf jmp short loc_5B010 loc_5B001: mov rdi, rdx call conf_parse_int mov [rbx+170h], rax loc_5B010: xor eax, eax pop rbx retn
long long SET_resume_index(long long a1, long long a2, unsigned __int8 *a3, long long a4, long long a5) { long long v6; // rdi long long v7; // rdx v6 = *(_QWORD *)(a1 + 680); if ( v6 ) { v7 = *(_QWORD *)(a1 + 368); if ( v7 || *(_DWORD *)(a1 + 688) ) fprintf(v6, "resume-index = %lu\n", v7); } else { *(_QWORD *)(a1 + 368) = conf_parse_int(a3, a2, (long long)a3, a4, a5); } return 0LL; }
SET_resume_index: PUSH RBX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x2a8] TEST RDI,RDI JZ 0x0015b001 MOV RDX,qword ptr [RBX + 0x170] TEST RDX,RDX JNZ 0x0015aff1 CMP dword ptr [RBX + 0x2b0],0x0 JZ 0x0015b010 LAB_0015aff1: LEA RSI,[0x17f1c4] XOR EAX,EAX CALL 0x00115220 JMP 0x0015b010 LAB_0015b001: MOV RDI,RDX CALL 0x001523a0 MOV qword ptr [RBX + 0x170],RAX LAB_0015b010: XOR EAX,EAX POP RBX RET
int8 SET_resume_index(long param_1,int8 param_2,int8 param_3) { int8 uVar1; if (*(FILE **)(param_1 + 0x2a8) == (FILE *)0x0) { uVar1 = conf_parse_int(param_3); *(int8 *)(param_1 + 0x170) = uVar1; } else if ((*(long *)(param_1 + 0x170) != 0) || (*(int *)(param_1 + 0x2b0) != 0)) { fprintf(*(FILE **)(param_1 + 0x2a8),"resume-index = %lu\n"); } return 0; }
29,519
minja::Value::operator-() const
monkey531[P]llama/common/minja.hpp
Value operator-() const { if (is_number_integer()) return -get<int64_t>(); else return -get<double>(); }
O3
cpp
minja::Value::operator-() const: pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movb 0x40(%rsi), %al addb $-0x5, %al leaq 0x40(%rdi), %r14 movq %rsi, %rdi cmpb $0x1, %al ja 0x85edc callq 0x8609e negq %rax xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movups %xmm0, 0x10(%rbx) movups %xmm0, 0x20(%rbx) movups %xmm0, 0x30(%rbx) movups %xmm0, 0x40(%rbx) movq %r14, %rdi movq %rax, %rsi callq 0x60366 jmp 0x85f06 callq 0x861e8 xorps 0x6a7b8(%rip), %xmm0 # 0xf06a0 xorps %xmm1, %xmm1 movups %xmm1, (%rbx) movups %xmm1, 0x10(%rbx) movups %xmm1, 0x20(%rbx) movups %xmm1, 0x30(%rbx) movups %xmm1, 0x40(%rbx) movq %r14, %rdi callq 0x5f92e movq %r14, %rdi movl $0x1, %esi callq 0x58644 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_ZNK5minja5ValuengEv: push r14 push rbx push rax mov rbx, rdi mov al, [rsi+40h] add al, 0FBh lea r14, [rdi+40h] mov rdi, rsi cmp al, 1 ja short loc_85EDC call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void) neg rax xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 movups xmmword ptr [rbx+10h], xmm0 movups xmmword ptr [rbx+20h], xmm0 movups xmmword ptr [rbx+30h], xmm0 movups xmmword ptr [rbx+40h], xmm0 mov rdi, r14 mov rsi, rax call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE5EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_16number_integer_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::number_integer_t) jmp short loc_85F06 loc_85EDC: call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) xorps xmm0, cs:xmmword_F06A0 xorps xmm1, xmm1 movups xmmword ptr [rbx], xmm1 movups xmmword ptr [rbx+10h], xmm1 movups xmmword ptr [rbx+20h], xmm1 movups xmmword ptr [rbx+30h], xmm1 movups xmmword ptr [rbx+40h], xmm1 mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE7EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_14number_float_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::number_float_t) loc_85F06: mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rax, rbx add rsp, 8 pop rbx pop r14 retn
_OWORD * minja::Value::operator-(_OWORD *a1, long long a2) { unsigned __int8 *v2; // r14 long long v3; // rax double v4; // xmm0_8 v2 = (unsigned __int8 *)(a1 + 4); if ( (unsigned __int8)(*(_BYTE *)(a2 + 64) - 5) > 1u ) { v4 = minja::Value::get<double>(a2); *a1 = 0LL; a1[1] = 0LL; a1[2] = 0LL; a1[3] = 0LL; a1[4] = 0LL; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( v2, -v4); } else { v3 = minja::Value::get<long>(a2); *a1 = 0LL; a1[1] = 0LL; a1[2] = 0LL; a1[3] = 0LL; a1[4] = 0LL; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( v2, -v3); } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v2); return a1; }
operator-: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV AL,byte ptr [RSI + 0x40] ADD AL,0xfb LEA R14,[RDI + 0x40] MOV RDI,RSI CMP AL,0x1 JA 0x00185edc CALL 0x0018609e NEG RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOVUPS xmmword ptr [RBX + 0x10],XMM0 MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOVUPS xmmword ptr [RBX + 0x40],XMM0 MOV RDI,R14 MOV RSI,RAX CALL 0x00160366 JMP 0x00185f06 LAB_00185edc: CALL 0x001861e8 XORPS XMM0,xmmword ptr [0x001f06a0] XORPS XMM1,XMM1 MOVUPS xmmword ptr [RBX],XMM1 MOVUPS xmmword ptr [RBX + 0x10],XMM1 MOVUPS xmmword ptr [RBX + 0x20],XMM1 MOVUPS xmmword ptr [RBX + 0x30],XMM1 MOVUPS xmmword ptr [RBX + 0x40],XMM1 MOV RDI,R14 CALL 0x0015f92e LAB_00185f06: MOV RDI,R14 MOV ESI,0x1 CALL 0x00158644 MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* minja::Value::TEMPNAMEPLACEHOLDERVALUE() const */ Value * __thiscall minja::Value::operator-(Value *this) { Value *pVVar1; double dVar2; long lVar3; Value *in_RSI; uint uVar4; pVVar1 = this + 0x40; if ((byte)((char)in_RSI[0x40] - 5U) < 2) { lVar3 = get<long>(in_RSI); *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; nlohmann::json_abi_v3_11_3::detail:: external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>:: construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (pVVar1,-lVar3); } else { dVar2 = get<double>(in_RSI); uVar4 = SUB84(dVar2,0) ^ _DAT_001f06a0; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; nlohmann::json_abi_v3_11_3::detail:: external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>:: construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (uVar4,pVVar1); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(pVVar1,0)); return this; }
29,520
unreg_request
eloqsql/mysys/mf_keycache.c
static void unreg_request(SIMPLE_KEY_CACHE_CB *keycache, BLOCK_LINK *block, int at_end) { DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE)); DBUG_ASSERT(block->hash_link); /*backptr to block NULL from free_block()*/ DBUG_ASSERT(block->requests); DBUG_ASSERT(block->prev_changed && *block->prev_changed == block); DBUG_ASSERT(!block->next_used); DBUG_ASSERT(!block->prev_used); /* Unregister the request, but do not link erroneous blocks into the LRU ring. */ if (!--block->requests && !(block->status & BLOCK_ERROR)) { my_bool hot; if (block->hits_left) block->hits_left--; hot= !block->hits_left && at_end && keycache->warm_blocks > keycache->min_warm_blocks; if (hot) { if (block->temperature == BLOCK_WARM) keycache->warm_blocks--; block->temperature= BLOCK_HOT; KEYCACHE_DBUG_PRINT("unreg_request", ("#warm_blocks: %lu", keycache->warm_blocks)); } link_block(keycache, block, hot, (my_bool)at_end); block->last_hit_time= keycache->keycache_time; keycache->keycache_time++; /* At this place, the block might be in the LRU ring or not. If an evicter was waiting for a block, it was selected for eviction and not linked in the LRU ring. */ /* Check if we should link a hot block to the warm block sub-chain. It is possible that we select the same block as above. But it can also be another block. In any case a block from the LRU ring is selected. In other words it works even if the above block was selected for eviction and not linked in the LRU ring. Since this happens only if the LRU ring is empty, the block selected below would be NULL and the rest of the function skipped. */ block= keycache->used_ins; if (block && keycache->keycache_time - block->last_hit_time > keycache->age_threshold) { unlink_block(keycache, block); link_block(keycache, block, 0, 0); if (block->temperature != BLOCK_WARM) { keycache->warm_blocks++; block->temperature= BLOCK_WARM; } KEYCACHE_DBUG_PRINT("unreg_request", ("#warm_blocks: %lu", keycache->warm_blocks)); } } }
O3
c
unreg_request: decl 0x38(%rsi) je 0x53d0a retq pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %r14 testb $0x1, 0x50(%rsi) jne 0x53df0 movq %rdi, %rbx movl 0x58(%r14), %eax testl %eax, %eax je 0x53d34 decl %eax movl %eax, 0x58(%r14) sete %al jmp 0x53d36 movb $0x1, %al testl %edx, %edx sete %cl xorb $0x1, %al orb %cl, %al jne 0x53d8e movq 0x68(%rbx), %rax cmpq 0x20(%rbx), %rax jbe 0x53d8e cmpl $0x1, 0x54(%r14) jne 0x53d59 decq %rax movq %rax, 0x68(%rbx) movl $0x2, 0x54(%r14) movq 0xb8(%rbx), %rax testq %rax, %rax je 0x53df5 movq (%rax), %rcx movq %r14, 0x8(%rcx) movq (%rax), %rcx movq %rcx, (%r14) movq %rax, 0x8(%r14) movq %r14, (%rax) movq %r14, 0xb8(%rbx) jmp 0x53d9e movsbl %dl, %ecx movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx callq 0x5476b movq 0x30(%rbx), %rax movq %rax, 0x60(%r14) incq %rax movq %rax, 0x30(%rbx) movq 0xb8(%rbx), %r14 testq %r14, %r14 je 0x53df0 subq 0x60(%r14), %rax cmpq 0x28(%rbx), %rax jbe 0x53df0 movq %rbx, %rdi movq %r14, %rsi callq 0x54714 movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx xorl %ecx, %ecx callq 0x5476b cmpl $0x1, 0x54(%r14) je 0x53df0 incq 0x68(%rbx) movl $0x1, 0x54(%r14) popq %rbx popq %r14 popq %rbp retq movq %r14, (%r14) movq %r14, 0xb8(%rbx) movq %r14, 0xb0(%rbx) movq %r14, 0x8(%r14) jmp 0x53d9e
unreg_request: dec dword ptr [rsi+38h] jz short loc_53D0A retn loc_53D0A: push rbp mov rbp, rsp push r14 push rbx mov r14, rsi test byte ptr [rsi+50h], 1 jnz loc_53DF0 mov rbx, rdi mov eax, [r14+58h] test eax, eax jz short loc_53D34 dec eax mov [r14+58h], eax setz al jmp short loc_53D36 loc_53D34: mov al, 1 loc_53D36: test edx, edx setz cl xor al, 1 or al, cl jnz short loc_53D8E mov rax, [rbx+68h] cmp rax, [rbx+20h] jbe short loc_53D8E cmp dword ptr [r14+54h], 1 jnz short loc_53D59 dec rax mov [rbx+68h], rax loc_53D59: mov dword ptr [r14+54h], 2 mov rax, [rbx+0B8h] test rax, rax jz loc_53DF5 mov rcx, [rax] mov [rcx+8], r14 mov rcx, [rax] mov [r14], rcx mov [r14+8], rax mov [rax], r14 mov [rbx+0B8h], r14 jmp short loc_53D9E loc_53D8E: movsx ecx, dl mov rdi, rbx mov rsi, r14 xor edx, edx call link_block loc_53D9E: mov rax, [rbx+30h] mov [r14+60h], rax inc rax mov [rbx+30h], rax mov r14, [rbx+0B8h] test r14, r14 jz short loc_53DF0 sub rax, [r14+60h] cmp rax, [rbx+28h] jbe short loc_53DF0 mov rdi, rbx mov rsi, r14 call unlink_block mov rdi, rbx mov rsi, r14 xor edx, edx xor ecx, ecx call link_block cmp dword ptr [r14+54h], 1 jz short loc_53DF0 inc qword ptr [rbx+68h] mov dword ptr [r14+54h], 1 loc_53DF0: pop rbx pop r14 pop rbp retn loc_53DF5: mov [r14], r14 mov [rbx+0B8h], r14 mov [rbx+0B0h], r14 mov [r14+8], r14 jmp short loc_53D9E
void unreg_request(_QWORD *a1, long long a2, long long a3) { bool v3; // zf int v4; // eax int v5; // eax bool v6; // al unsigned long long v7; // rax long long v8; // rax long long v9; // rax long long v10; // rax long long v11; // r14 v3 = (*(_DWORD *)(a2 + 56))-- == 1; if ( v3 && (*(_BYTE *)(a2 + 80) & 1) == 0 ) { v4 = *(_DWORD *)(a2 + 88); if ( v4 ) { v5 = v4 - 1; *(_DWORD *)(a2 + 88) = v5; v6 = v5 == 0; } else { v6 = 1; } if ( (_DWORD)a3 == 0 || !v6 || (v7 = a1[13], v7 <= a1[4]) ) { link_block(a1, a2, 0LL, (unsigned int)(char)a3); } else { if ( *(_DWORD *)(a2 + 84) == 1 ) a1[13] = v7 - 1; *(_DWORD *)(a2 + 84) = 2; v8 = a1[23]; if ( v8 ) { *(_QWORD *)(*(_QWORD *)v8 + 8LL) = a2; *(_QWORD *)a2 = *(_QWORD *)v8; *(_QWORD *)(a2 + 8) = v8; *(_QWORD *)v8 = a2; a1[23] = a2; } else { *(_QWORD *)a2 = a2; a1[23] = a2; a1[22] = a2; *(_QWORD *)(a2 + 8) = a2; } } v9 = a1[6]; *(_QWORD *)(a2 + 96) = v9; v10 = v9 + 1; a1[6] = v10; v11 = a1[23]; if ( v11 && (unsigned long long)(v10 - *(_QWORD *)(v11 + 96)) > a1[5] ) { unlink_block(a1, a1[23], a3); link_block(a1, v11, 0LL, 0LL); if ( *(_DWORD *)(v11 + 84) != 1 ) { ++a1[13]; *(_DWORD *)(v11 + 84) = 1; } } } }
unreg_request: DEC dword ptr [RSI + 0x38] JZ 0x00153d0a RET LAB_00153d0a: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV R14,RSI TEST byte ptr [RSI + 0x50],0x1 JNZ 0x00153df0 MOV RBX,RDI MOV EAX,dword ptr [R14 + 0x58] TEST EAX,EAX JZ 0x00153d34 DEC EAX MOV dword ptr [R14 + 0x58],EAX SETZ AL JMP 0x00153d36 LAB_00153d34: MOV AL,0x1 LAB_00153d36: TEST EDX,EDX SETZ CL XOR AL,0x1 OR AL,CL JNZ 0x00153d8e MOV RAX,qword ptr [RBX + 0x68] CMP RAX,qword ptr [RBX + 0x20] JBE 0x00153d8e CMP dword ptr [R14 + 0x54],0x1 JNZ 0x00153d59 DEC RAX MOV qword ptr [RBX + 0x68],RAX LAB_00153d59: MOV dword ptr [R14 + 0x54],0x2 MOV RAX,qword ptr [RBX + 0xb8] TEST RAX,RAX JZ 0x00153df5 MOV RCX,qword ptr [RAX] MOV qword ptr [RCX + 0x8],R14 MOV RCX,qword ptr [RAX] MOV qword ptr [R14],RCX MOV qword ptr [R14 + 0x8],RAX MOV qword ptr [RAX],R14 MOV qword ptr [RBX + 0xb8],R14 JMP 0x00153d9e LAB_00153d8e: MOVSX ECX,DL MOV RDI,RBX MOV RSI,R14 XOR EDX,EDX CALL 0x0015476b LAB_00153d9e: MOV RAX,qword ptr [RBX + 0x30] MOV qword ptr [R14 + 0x60],RAX INC RAX MOV qword ptr [RBX + 0x30],RAX MOV R14,qword ptr [RBX + 0xb8] TEST R14,R14 JZ 0x00153df0 SUB RAX,qword ptr [R14 + 0x60] CMP RAX,qword ptr [RBX + 0x28] JBE 0x00153df0 MOV RDI,RBX MOV RSI,R14 CALL 0x00154714 MOV RDI,RBX MOV RSI,R14 XOR EDX,EDX XOR ECX,ECX CALL 0x0015476b CMP dword ptr [R14 + 0x54],0x1 JZ 0x00153df0 INC qword ptr [RBX + 0x68] MOV dword ptr [R14 + 0x54],0x1 LAB_00153df0: POP RBX POP R14 POP RBP RET LAB_00153df5: MOV qword ptr [R14],R14 MOV qword ptr [RBX + 0xb8],R14 MOV qword ptr [RBX + 0xb0],R14 MOV qword ptr [R14 + 0x8],R14 JMP 0x00153d9e
void unreg_request(long param_1,long *param_2,int param_3) { long *plVar1; long lVar2; int iVar3; long lVar4; bool bVar5; plVar1 = param_2 + 7; *(int *)plVar1 = (int)*plVar1 + -1; if ((int)*plVar1 != 0) { return; } if ((*(byte *)(param_2 + 10) & 1) == 0) { if ((int)param_2[0xb] == 0) { bVar5 = true; } else { iVar3 = (int)param_2[0xb] + -1; bVar5 = iVar3 == 0; *(int *)(param_2 + 0xb) = iVar3; } if (((bool)(bVar5 ^ 1U | param_3 == 0)) || (*(ulong *)(param_1 + 0x68) <= *(ulong *)(param_1 + 0x20))) { link_block(param_1,param_2,0,(int)(char)param_3); } else { if (*(int *)((long)param_2 + 0x54) == 1) { *(ulong *)(param_1 + 0x68) = *(ulong *)(param_1 + 0x68) - 1; } *(int4 *)((long)param_2 + 0x54) = 2; plVar1 = *(long **)(param_1 + 0xb8); if (plVar1 == (long *)0x0) { *param_2 = (long)param_2; *(long **)(param_1 + 0xb8) = param_2; *(long **)(param_1 + 0xb0) = param_2; param_2[1] = (long)param_2; } else { *(long **)(*plVar1 + 8) = param_2; *param_2 = *plVar1; param_2[1] = (long)plVar1; *plVar1 = (long)param_2; *(long **)(param_1 + 0xb8) = param_2; } } lVar4 = *(long *)(param_1 + 0x30); param_2[0xc] = lVar4; lVar4 = lVar4 + 1; *(long *)(param_1 + 0x30) = lVar4; lVar2 = *(long *)(param_1 + 0xb8); if ((lVar2 != 0) && (*(ulong *)(param_1 + 0x28) < (ulong)(lVar4 - *(long *)(lVar2 + 0x60)))) { unlink_block(param_1,lVar2); link_block(param_1,lVar2,0,0); if (*(int *)(lVar2 + 0x54) != 1) { *(long *)(param_1 + 0x68) = *(long *)(param_1 + 0x68) + 1; *(int4 *)(lVar2 + 0x54) = 1; } } } return; }
29,521
get_file_memory_access(unsigned char, bool, unsigned int*)
msxemulator/build_O3/_deps/picotool-src/main.cpp
file_memory_access get_file_memory_access(uint8_t idx, bool writeable = false, uint32_t *next_family_id=nullptr) { ios::openmode mode = (writeable ? ios::out|ios::in : ios::in)|ios::binary; auto file = get_file_idx(mode, idx); try { return get_iostream_memory_access<file_memory_access>(file, get_file_type_idx(idx), writeable, next_family_id); } catch (std::exception&) { file->close(); throw; } }
O3
cpp
get_file_memory_access(unsigned char, bool, unsigned int*): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp movq %rcx, %r14 movl %edx, %ebp movl %esi, %r15d movq %rdi, %rbx movl %edx, %esi shll $0x4, %esi orl $0xc, %esi leaq 0x10(%rsp), %r12 movq %r12, %rdi movl %r15d, %edx callq 0x2078d movq (%r12), %rcx movq 0x8(%r12), %rax movq %rcx, (%rsp) movq %rax, 0x8(%rsp) testq %rax, %rax je 0x216a1 movq 0xc3925(%rip), %rcx # 0xe4fb8 cmpb $0x0, (%rcx) je 0x2169d incl 0x8(%rax) jmp 0x216a1 lock incl 0x8(%rax) movzbl %r15b, %edi callq 0x20887 movzbl %bpl, %ecx movq %rsp, %rsi movq %rbx, %rdi movl %eax, %edx movq %r14, %r8 callq 0x3961f movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x216cd callq 0x4bd0a movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x216dc callq 0x4bd0a movq %rbx, %rax addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq %rdx, %r14 movq %rax, %rbx movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x21701 callq 0x4bd0a cmpl $0x1, %r14d jne 0x21726 movq %rbx, %rdi callq 0xf210 movq 0x10(%rsp), %rdi callq 0xf080 callq 0xf670 movq %rax, %rbx callq 0xf740 movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x21735 callq 0x4bd0a movq %rbx, %rdi callq 0xf7d0 movq %rax, %rdi callq 0x1d2b2
_Z22get_file_memory_accesshbPj: push rbp push r15 push r14 push r12 push rbx sub rsp, 20h mov r14, rcx mov ebp, edx mov r15d, esi mov rbx, rdi mov esi, edx shl esi, 4 or esi, 0Ch; int lea r12, [rsp+48h+var_38] mov rdi, r12; int mov edx, r15d; int call _Z12get_file_idxSt13_Ios_Openmodeh; get_file_idx(std::_Ios_Openmode,uchar) mov rcx, [r12] mov rax, [r12+8] mov [rsp+48h+var_48], rcx mov [rsp+48h+var_40], rax test rax, rax jz short loc_216A1 mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_2169D inc dword ptr [rax+8] jmp short loc_216A1 loc_2169D: lock inc dword ptr [rax+8] loc_216A1: movzx edi, r15b; unsigned __int8 call _Z17get_file_type_idxh; get_file_type_idx(uchar) movzx ecx, bpl mov rsi, rsp mov rdi, rbx mov edx, eax mov r8, r14 call _Z26get_iostream_memory_accessI18file_memory_accessSt13basic_fstreamIcSt11char_traitsIcEEET_St10shared_ptrIT0_E8filetypebPj; get_iostream_memory_access<file_memory_access,std::fstream>(std::shared_ptr<std::fstream>,filetype,bool,uint *) mov rdi, [rsp+48h+var_40] test rdi, rdi jz short loc_216CD call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_216CD: mov rdi, [rsp+48h+var_30] test rdi, rdi jz short loc_216DC call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_216DC: mov rax, rbx add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn mov r14, rdx mov rbx, rax mov rdi, [rsp+48h+var_40] test rdi, rdi jz short loc_21701 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_21701: cmp r14d, 1 jnz short loc_21726 mov rdi, rbx; void * call ___cxa_begin_catch mov rdi, qword ptr [rsp+48h+var_38] call __ZNSt13basic_fstreamIcSt11char_traitsIcEE5closeEv; std::fstream::close(void) call ___cxa_rethrow mov rbx, rax call ___cxa_end_catch loc_21726: mov rdi, [rsp+48h+var_30] test rdi, rdi jz short loc_21735 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_21735: mov rdi, rbx call __Unwind_Resume mov rdi, rax call __clang_call_terminate
get_file_memory_access: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x20 MOV R14,RCX MOV EBP,EDX MOV R15D,ESI MOV RBX,RDI MOV ESI,EDX SHL ESI,0x4 OR ESI,0xc LEA R12,[RSP + 0x10] MOV RDI,R12 MOV EDX,R15D CALL 0x0012078d MOV RCX,qword ptr [R12] MOV RAX,qword ptr [R12 + 0x8] MOV qword ptr [RSP],RCX MOV qword ptr [RSP + 0x8],RAX TEST RAX,RAX JZ 0x001216a1 MOV RCX,qword ptr [0x001e4fb8] CMP byte ptr [RCX],0x0 JZ 0x0012169d INC dword ptr [RAX + 0x8] JMP 0x001216a1 LAB_0012169d: INC.LOCK dword ptr [RAX + 0x8] LAB_001216a1: MOVZX EDI,R15B CALL 0x00120887 MOVZX ECX,BPL MOV RSI,RSP MOV RDI,RBX MOV EDX,EAX MOV R8,R14 CALL 0x0013961f LAB_001216be: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x001216cd CALL 0x0014bd0a LAB_001216cd: MOV RDI,qword ptr [RSP + 0x18] TEST RDI,RDI JZ 0x001216dc CALL 0x0014bd0a LAB_001216dc: MOV RAX,RBX ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* get_file_memory_access(unsigned char, bool, unsigned int*) */ int8 get_file_memory_access(uchar param_1,bool param_2,uint *param_3) { int4 uVar1; int7 in_register_00000031; int7 in_register_00000039; ulong uVar2; int8 local_48; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40; int8 local_38; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_30; uVar2 = CONCAT71(in_register_00000031,param_2) & 0xffffffff; get_file_idx(&local_38,(int)param_3 << 4 | 0xc,uVar2); local_48 = local_38; local_40 = local_30; if (local_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_001e4fb8 == '\0') { LOCK(); *(int *)(local_30 + 8) = *(int *)(local_30 + 8) + 1; UNLOCK(); } else { *(int *)(local_30 + 8) = *(int *)(local_30 + 8) + 1; } } /* try { // try from 001216a1 to 001216bd has its CatchHandler @ 001216ec */ uVar1 = get_file_type_idx((uchar)uVar2); get_iostream_memory_access<file_memory_access,std::fstream> (CONCAT71(in_register_00000039,param_1),&local_48,uVar1,(ulong)param_3 & 0xff); if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40); } if (local_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_30); } return CONCAT71(in_register_00000039,param_1); }
29,522
my_strcasecmp_utf8mb4
eloqsql/strings/ctype-utf8.c
static int my_strcasecmp_utf8mb4(CHARSET_INFO *cs, const char *s, const char *t) { MY_UNICASE_INFO *uni_plane= cs->caseinfo; while (s[0] && t[0]) { my_wc_t s_wc,t_wc; if ((uchar) s[0] < 128) { /* s[0] is between 0 and 127. It represents a single byte character. Convert it into weight according to collation. */ s_wc= my_unicase_default_page00[(uchar) s[0]].tolower; s++; } else { int res= my_mb_wc_utf8mb4_no_range(cs, &s_wc, (const uchar*) s); /* In the case of wrong multibyte sequence we will call strcmp() for byte-to-byte comparison. */ if (res <= 0) return strcmp(s, t); s+= res; my_tolower_utf8mb4(uni_plane, &s_wc); } /* Do the same for the second string */ if ((uchar) t[0] < 128) { /* Convert single byte character into weight */ t_wc= my_unicase_default_page00[(uchar) t[0]].tolower; t++; } else { int res= my_mb_wc_utf8mb4_no_range(cs, &t_wc, (const uchar*) t); if (res <= 0) return strcmp(s, t); t+= res; my_tolower_utf8mb4(uni_plane, &t_wc); } /* Now we have two weights, let's compare them */ if ( s_wc != t_wc ) return ((int) s_wc) - ((int) t_wc); } return ((int) (uchar) s[0]) - ((int) (uchar) t[0]); }
O0
c
my_strcasecmp_utf8mb4: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x78(%rax), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x41(%rbp) je 0x6a051 movq -0x20(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax setne %al movb %al, -0x41(%rbp) movb -0x41(%rbp), %al testb $0x1, %al jne 0x6a05d jmp 0x6a186 movq -0x18(%rbp), %rax movzbl (%rax), %eax cmpl $0x80, %eax jge 0x6a097 movq -0x18(%rbp), %rax movzbl (%rax), %eax movl %eax, %ecx leaq 0x2f71f5(%rip), %rax # 0x361270 imulq $0xc, %rcx, %rcx addq %rcx, %rax movl 0x4(%rax), %eax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) jmp 0x6a0e4 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rdx leaq -0x30(%rbp), %rsi callq 0x69790 movl %eax, -0x3c(%rbp) cmpl $0x0, -0x3c(%rbp) jg 0x6a0c6 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x24480 movl %eax, -0x4(%rbp) jmp 0x6a199 movl -0x3c(%rbp), %ecx movq -0x18(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x18(%rbp) movq -0x28(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0x69b80 movq -0x20(%rbp), %rax movzbl (%rax), %eax cmpl $0x80, %eax jge 0x6a11e movq -0x20(%rbp), %rax movzbl (%rax), %eax movl %eax, %ecx leaq 0x2f716e(%rip), %rax # 0x361270 imulq $0xc, %rcx, %rcx addq %rcx, %rax movl 0x4(%rax), %eax movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) jmp 0x6a168 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rdx leaq -0x38(%rbp), %rsi callq 0x69790 movl %eax, -0x40(%rbp) cmpl $0x0, -0x40(%rbp) jg 0x6a14a movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x24480 movl %eax, -0x4(%rbp) jmp 0x6a199 movl -0x40(%rbp), %ecx movq -0x20(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rdi leaq -0x38(%rbp), %rsi callq 0x69b80 movq -0x30(%rbp), %rax cmpq -0x38(%rbp), %rax je 0x6a181 movq -0x30(%rbp), %rax movq -0x38(%rbp), %rcx subl %ecx, %eax movl %eax, -0x4(%rbp) jmp 0x6a199 jmp 0x6a030 movq -0x18(%rbp), %rax movzbl (%rax), %eax movq -0x20(%rbp), %rcx movzbl (%rcx), %ecx subl %ecx, %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_strcasecmp_utf8mb4: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov rax, [rax+78h] mov [rbp+var_28], rax loc_6A030: mov rax, [rbp+var_18] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, 0 mov [rbp+var_41], al jz short loc_6A051 mov rax, [rbp+var_20] movsx eax, byte ptr [rax] cmp eax, 0 setnz al mov [rbp+var_41], al loc_6A051: mov al, [rbp+var_41] test al, 1 jnz short loc_6A05D jmp loc_6A186 loc_6A05D: mov rax, [rbp+var_18] movzx eax, byte ptr [rax] cmp eax, 80h jge short loc_6A097 mov rax, [rbp+var_18] movzx eax, byte ptr [rax] mov ecx, eax lea rax, my_unicase_default_page00 imul rcx, 0Ch add rax, rcx mov eax, [rax+4] mov [rbp+var_30], rax mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax jmp short loc_6A0E4 loc_6A097: mov rdi, [rbp+var_10] mov rdx, [rbp+var_18] lea rsi, [rbp+var_30] call my_mb_wc_utf8mb4_no_range mov [rbp+var_3C], eax cmp [rbp+var_3C], 0 jg short loc_6A0C6 mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] call _strcmp mov [rbp+var_4], eax jmp loc_6A199 loc_6A0C6: mov ecx, [rbp+var_3C] mov rax, [rbp+var_18] movsxd rcx, ecx add rax, rcx mov [rbp+var_18], rax mov rdi, [rbp+var_28] lea rsi, [rbp+var_30] call my_tolower_utf8mb4 loc_6A0E4: mov rax, [rbp+var_20] movzx eax, byte ptr [rax] cmp eax, 80h jge short loc_6A11E mov rax, [rbp+var_20] movzx eax, byte ptr [rax] mov ecx, eax lea rax, my_unicase_default_page00 imul rcx, 0Ch add rax, rcx mov eax, [rax+4] mov [rbp+var_38], rax mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax jmp short loc_6A168 loc_6A11E: mov rdi, [rbp+var_10] mov rdx, [rbp+var_20] lea rsi, [rbp+var_38] call my_mb_wc_utf8mb4_no_range mov [rbp+var_40], eax cmp [rbp+var_40], 0 jg short loc_6A14A mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] call _strcmp mov [rbp+var_4], eax jmp short loc_6A199 loc_6A14A: mov ecx, [rbp+var_40] mov rax, [rbp+var_20] movsxd rcx, ecx add rax, rcx mov [rbp+var_20], rax mov rdi, [rbp+var_28] lea rsi, [rbp+var_38] call my_tolower_utf8mb4 loc_6A168: mov rax, [rbp+var_30] cmp rax, [rbp+var_38] jz short loc_6A181 mov rax, [rbp+var_30] mov rcx, [rbp+var_38] sub eax, ecx mov [rbp+var_4], eax jmp short loc_6A199 loc_6A181: jmp loc_6A030 loc_6A186: mov rax, [rbp+var_18] movzx eax, byte ptr [rax] mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx] sub eax, ecx mov [rbp+var_4], eax loc_6A199: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long my_strcasecmp_utf8mb4(long long a1, unsigned __int8 *a2, unsigned __int8 *a3) { bool v4; // [rsp+Fh] [rbp-41h] int v5; // [rsp+10h] [rbp-40h] int v6; // [rsp+14h] [rbp-3Ch] unsigned long long v7; // [rsp+18h] [rbp-38h] BYREF unsigned long long v8; // [rsp+20h] [rbp-30h] BYREF _QWORD *v9; // [rsp+28h] [rbp-28h] unsigned __int8 *v10; // [rsp+30h] [rbp-20h] unsigned __int8 *v11; // [rsp+38h] [rbp-18h] long long v12; // [rsp+40h] [rbp-10h] v12 = a1; v11 = a2; v10 = a3; v9 = *(_QWORD **)(a1 + 120); while ( 1 ) { v4 = 0; if ( *v11 ) v4 = *v10 != 0; if ( !v4 ) break; if ( *v11 >= 0x80u ) { v6 = my_mb_wc_utf8mb4_no_range(v12, &v8, v11); if ( v6 <= 0 ) return (unsigned int)strcmp(v11, v10); v11 += v6; my_tolower_utf8mb4(v9, &v8); } else { v8 = my_unicase_default_page00[3 * *v11++ + 1]; } if ( *v10 >= 0x80u ) { v5 = my_mb_wc_utf8mb4_no_range(v12, &v7, v10); if ( v5 <= 0 ) return (unsigned int)strcmp(v11, v10); v10 += v5; my_tolower_utf8mb4(v9, &v7); } else { v7 = my_unicase_default_page00[3 * *v10++ + 1]; } if ( v8 != v7 ) return (unsigned int)(v8 - v7); } return (unsigned int)(*v11 - *v10); }
my_strcasecmp_utf8mb4: PUSH RBP MOV RBP,RSP SUB RSP,0x50 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 + 0x78] MOV qword ptr [RBP + -0x28],RAX LAB_0016a030: MOV RAX,qword ptr [RBP + -0x18] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x41],AL JZ 0x0016a051 MOV RAX,qword ptr [RBP + -0x20] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x41],AL LAB_0016a051: MOV AL,byte ptr [RBP + -0x41] TEST AL,0x1 JNZ 0x0016a05d JMP 0x0016a186 LAB_0016a05d: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] CMP EAX,0x80 JGE 0x0016a097 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] MOV ECX,EAX LEA RAX,[0x461270] IMUL RCX,RCX,0xc ADD RAX,RCX MOV EAX,dword ptr [RAX + 0x4] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x0016a0e4 LAB_0016a097: MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] LEA RSI,[RBP + -0x30] CALL 0x00169790 MOV dword ptr [RBP + -0x3c],EAX CMP dword ptr [RBP + -0x3c],0x0 JG 0x0016a0c6 MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] CALL 0x00124480 MOV dword ptr [RBP + -0x4],EAX JMP 0x0016a199 LAB_0016a0c6: MOV ECX,dword ptr [RBP + -0x3c] MOV RAX,qword ptr [RBP + -0x18] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX MOV RDI,qword ptr [RBP + -0x28] LEA RSI,[RBP + -0x30] CALL 0x00169b80 LAB_0016a0e4: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] CMP EAX,0x80 JGE 0x0016a11e MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] MOV ECX,EAX LEA RAX,[0x461270] IMUL RCX,RCX,0xc ADD RAX,RCX MOV EAX,dword ptr [RAX + 0x4] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x0016a168 LAB_0016a11e: MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0x38] CALL 0x00169790 MOV dword ptr [RBP + -0x40],EAX CMP dword ptr [RBP + -0x40],0x0 JG 0x0016a14a MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] CALL 0x00124480 MOV dword ptr [RBP + -0x4],EAX JMP 0x0016a199 LAB_0016a14a: MOV ECX,dword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x20] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x28] LEA RSI,[RBP + -0x38] CALL 0x00169b80 LAB_0016a168: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x38] JZ 0x0016a181 MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x38] SUB EAX,ECX MOV dword ptr [RBP + -0x4],EAX JMP 0x0016a199 LAB_0016a181: JMP 0x0016a030 LAB_0016a186: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX] SUB EAX,ECX MOV dword ptr [RBP + -0x4],EAX LAB_0016a199: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int my_strcasecmp_utf8mb4(long param_1,byte *param_2,byte *param_3) { int iVar1; bool bVar2; ulong local_40; ulong local_38; int8 local_30; byte *local_28; byte *local_20; long local_18; local_30 = *(int8 *)(param_1 + 0x78); local_28 = param_3; local_20 = param_2; local_18 = param_1; do { bVar2 = false; if (*local_20 != 0) { bVar2 = *local_28 != 0; } if (!bVar2) { return (uint)*local_20 - (uint)*local_28; } if (*local_20 < 0x80) { local_38 = (ulong)*(uint *)(my_unicase_default_page00 + (ulong)*local_20 * 0xc + 4); local_20 = local_20 + 1; } else { iVar1 = my_mb_wc_utf8mb4_no_range(local_18,&local_38,local_20); if (iVar1 < 1) { iVar1 = strcmp((char *)local_20,(char *)local_28); return iVar1; } local_20 = local_20 + iVar1; my_tolower_utf8mb4(local_30,&local_38); } if (*local_28 < 0x80) { local_40 = (ulong)*(uint *)(my_unicase_default_page00 + (ulong)*local_28 * 0xc + 4); local_28 = local_28 + 1; } else { iVar1 = my_mb_wc_utf8mb4_no_range(local_18,&local_40,local_28); if (iVar1 < 1) { iVar1 = strcmp((char *)local_20,(char *)local_28); return iVar1; } local_28 = local_28 + iVar1; my_tolower_utf8mb4(local_30,&local_40); } } while (local_38 == local_40); return (int)local_38 - (int)local_40; }
29,523
minja::Context::at(minja::Value const&)
monkey531[P]llama/common/minja.hpp
virtual Value & at(const Value & key) { if (values_.contains(key)) return values_.at(key); if (parent_) return parent_->at(key); throw std::runtime_error("Undefined variable: " + key.dump()); }
O3
cpp
minja::Context::at(minja::Value const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x18(%rdi), %r15 movq %r15, %rdi callq 0x932c8 testb %al, %al je 0x9ca8f movq %r15, %rdi movq %r14, %rsi addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x930b6 movq 0x68(%rbx), %rdi testq %rdi, %rdi je 0x9caae movq (%rdi), %rax movq 0x18(%rax), %rax movq %r14, %rsi addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmpq *%rax movl $0x10, %edi callq 0x1a450 movq %rax, %rbx leaq 0x8(%rsp), %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x86378 leaq 0x5411d(%rip), %rsi # 0xf0bf3 leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x78b0d movb $0x1, %bpl leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x1ae50 xorl %ebp, %ebp movq 0x8f4f2(%rip), %rsi # 0x12bff0 movq 0x8f45b(%rip), %rdx # 0x12bf60 movq %rbx, %rdi callq 0x1af40 movq %rax, %r14 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9cb2b movq 0x38(%rsp), %rsi incq %rsi callq 0x1a8d0 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9cb46 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8d0 testb %bpl, %bpl jne 0x9cb70 jmp 0x9cb78 movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9cb70 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8d0 jmp 0x9cb70 movq %rax, %r14 movq %rbx, %rdi callq 0x1a680 movq %r14, %rdi callq 0x1afc0
_ZN5minja7Context2atERKNS_5ValueE: push rbp push r15 push r14 push rbx sub rsp, 48h mov r14, rsi mov rbx, rdi lea r15, [rdi+18h] mov rdi, r15; this call _ZNK5minja5Value8containsERKS0_; minja::Value::contains(minja::Value const&) test al, al jz short loc_9CA8F mov rdi, r15; this mov rsi, r14; minja::Value * add rsp, 48h pop rbx pop r14 pop r15 pop rbp jmp _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&) loc_9CA8F: mov rdi, [rbx+68h] test rdi, rdi jz short loc_9CAAE mov rax, [rdi] mov rax, [rax+18h] mov rsi, r14 add rsp, 48h pop rbx pop r14 pop r15 pop rbp jmp rax loc_9CAAE: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+68h+var_60] mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aUndefinedVaria; "Undefined variable: " lea rdi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_60] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+68h+var_40] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+68h+var_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9CB2B mov rsi, [rsp+68h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9CB2B: lea rax, [rsp+68h+var_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9CB46 mov rsi, [rsp+68h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9CB46: test bpl, bpl jnz short loc_9CB70 jmp short loc_9CB78 mov r14, rax lea rax, [rsp+68h+var_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9CB70 mov rsi, [rsp+68h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9CB70 mov r14, rax loc_9CB70: mov rdi, rbx; void * call ___cxa_free_exception loc_9CB78: mov rdi, r14 call __Unwind_Resume
unsigned long long minja::Context::at(minja::Context *this, const minja::Value *a2, __m128d a3) { long long v4; // rdi void *exception; // rbx _BYTE v6[16]; // [rsp+8h] [rbp-60h] BYREF _BYTE v7[16]; // [rsp+28h] [rbp-40h] BYREF if ( minja::Value::contains((minja::Context *)((char *)this + 24), a2, a3) ) return minja::Value::at((minja::Context *)((char *)this + 24), a2); v4 = *((_QWORD *)this + 13); if ( !v4 ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v6, (long long)a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)v7, (long long)"Undefined variable: ", (long long)v6); std::runtime_error::runtime_error(exception, v7); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return (*(long long ( **)(long long, const minja::Value *))(*(_QWORD *)v4 + 24LL))(v4, a2); }
at: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RSI MOV RBX,RDI LEA R15,[RDI + 0x18] MOV RDI,R15 CALL 0x001932c8 TEST AL,AL JZ 0x0019ca8f MOV RDI,R15 MOV RSI,R14 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP JMP 0x001930b6 LAB_0019ca8f: MOV RDI,qword ptr [RBX + 0x68] TEST RDI,RDI JZ 0x0019caae MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x18] MOV RSI,R14 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP JMP RAX LAB_0019caae: MOV EDI,0x10 CALL 0x0011a450 MOV RBX,RAX LAB_0019cabb: LEA RDI,[RSP + 0x8] MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x00186378 LAB_0019cacf: LEA RSI,[0x1f0bf3] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL 0x00178b0d MOV BPL,0x1 LAB_0019cae8: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x0011ae50 XOR EBP,EBP MOV RSI,qword ptr [0x0022bff0] MOV RDX,qword ptr [0x0022bf60] MOV RDI,RBX CALL 0x0011af40
/* minja::Context::at(minja::Value const&) */ void __thiscall minja::Context::at(Context *this,Value *param_1) { long *plVar1; char cVar2; runtime_error *this_00; int1 local_60 [32]; string local_40 [32]; cVar2 = Value::contains((Value *)(this + 0x18),param_1); if (cVar2 != '\0') { Value::at((Value *)(this + 0x18),param_1); return; } plVar1 = *(long **)(this + 0x68); if (plVar1 != (long *)0x0) { /* WARNING: Could not recover jumptable at 0x0019caac. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(*plVar1 + 0x18))(plVar1,param_1); return; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0019cabb to 0019cace has its CatchHandler @ 0019cb6d */ Value::dump_abi_cxx11_((int)local_60,SUB81(param_1,0)); /* try { // try from 0019cacf to 0019cae4 has its CatchHandler @ 0019cb4d */ std::operator+((char *)local_40,(string *)"Undefined variable: "); /* try { // try from 0019cae8 to 0019cb0c has its CatchHandler @ 0019cb0d */ std::runtime_error::runtime_error(this_00,local_40); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60); }
29,524
reset_key_cache_counters
eloqsql/mysys/mf_keycache.c
int reset_key_cache_counters(const char *name __attribute__((unused)), KEY_CACHE *keycache, void *unused __attribute__((unused))) { int rc= 0; if (keycache->key_cache_inited) { pthread_mutex_lock(&keycache->op_lock); rc= keycache->interface_funcs->reset_counters(name, keycache->keycache_cb); pthread_mutex_unlock(&keycache->op_lock); } return rc; }
O0
c
reset_key_cache_counters: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl $0x0, -0x1c(%rbp) movq -0x10(%rbp), %rax cmpb $0x0, 0x48(%rax) je 0xe4d9c movq -0x10(%rbp), %rdi addq $0x58, %rdi callq 0x2a220 movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq 0x38(%rax), %rax movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rcx movq 0x8(%rcx), %rsi callq *%rax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rdi addq $0x58, %rdi callq 0x2a1f0 movl -0x1c(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
reset_key_cache_counters: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], 0 mov rax, [rbp+var_10] cmp byte ptr [rax+48h], 0 jz short loc_E4D9C mov rdi, [rbp+var_10] add rdi, 58h ; 'X' call _pthread_mutex_lock mov rax, [rbp+var_10] mov rax, [rax+10h] mov rax, [rax+38h] mov rdi, [rbp+var_8] mov rcx, [rbp+var_10] mov rsi, [rcx+8] call rax mov [rbp+var_1C], eax mov rdi, [rbp+var_10] add rdi, 58h ; 'X' call _pthread_mutex_unlock loc_E4D9C: mov eax, [rbp+var_1C] add rsp, 20h pop rbp retn
long long reset_key_cache_counters(long long a1, long long a2) { unsigned int v3; // [rsp+4h] [rbp-1Ch] v3 = 0; if ( *(_BYTE *)(a2 + 72) ) { pthread_mutex_lock(a2 + 88); v3 = (*(long long ( **)(long long, _QWORD))(*(_QWORD *)(a2 + 16) + 56LL))(a1, *(_QWORD *)(a2 + 8)); pthread_mutex_unlock(a2 + 88); } return v3; }
reset_key_cache_counters: 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 dword ptr [RBP + -0x1c],0x0 MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x48],0x0 JZ 0x001e4d9c MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x58 CALL 0x0012a220 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RAX + 0x38] MOV RDI,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RCX + 0x8] CALL RAX MOV dword ptr [RBP + -0x1c],EAX MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x58 CALL 0x0012a1f0 LAB_001e4d9c: MOV EAX,dword ptr [RBP + -0x1c] ADD RSP,0x20 POP RBP RET
int4 reset_key_cache_counters(int8 param_1,long param_2) { int4 local_24; local_24 = 0; if (*(char *)(param_2 + 0x48) != '\0') { pthread_mutex_lock((pthread_mutex_t *)(param_2 + 0x58)); local_24 = (**(code **)(*(long *)(param_2 + 0x10) + 0x38))(param_1,*(int8 *)(param_2 + 8)) ; pthread_mutex_unlock((pthread_mutex_t *)(param_2 + 0x58)); } return local_24; }
29,525
CLI::detail::format_aliases(std::ostream&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, unsigned long)
MikePodsytnik[P]TCRtrie/build_O3/_deps/cli11-src/include/CLI/impl/StringTools_inl.hpp
CLI11_INLINE std::ostream &format_aliases(std::ostream &out, const std::vector<std::string> &aliases, std::size_t wid) { if(!aliases.empty()) { out << std::setw(static_cast<int>(wid)) << " aliases: "; bool front = true; for(const auto &alias : aliases) { if(!front) { out << ", "; } else { front = false; } out << detail::fix_newlines(" ", alias); } out << "\n"; } return out; }
O3
cpp
CLI::detail::format_aliases(std::ostream&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdi, %rbx movq (%rsi), %rax cmpq 0x8(%rsi), %rax je 0x2d0bb movq %rsi, %r14 movq (%rbx), %rax movq -0x18(%rax), %rax movslq %edx, %rcx movq %rcx, 0x10(%rbx,%rax) leaq 0xadd0(%rip), %rsi # 0x37d79 movl $0xe, %edx movq %rbx, %rdi callq 0x74b0 movq (%r14), %rbp movq 0x8(%r14), %r14 cmpq %r14, %rbp je 0x2d0a7 leaq 0x58(%rsp), %r15 movb $0x1, %al leaq 0x8(%rsp), %r12 leaq 0x48(%rsp), %r13 testb $0x1, %al jne 0x2cfef movl $0x2, %edx movq %rbx, %rdi leaq 0xad9e(%rip), %rsi # 0x37d88 callq 0x74b0 leaq 0x18(%rsp), %rax movq %rax, 0x8(%rsp) movq %r12, %rdi leaq 0xad88(%rip), %rsi # 0x37d8b leaq 0xad8f(%rip), %rdx # 0x37d99 callq 0x11f90 movq %r15, 0x48(%rsp) movq (%rbp), %rsi movq 0x8(%rbp), %rdx addq %rsi, %rdx movq %r13, %rdi callq 0x177be leaq 0x28(%rsp), %rdi movq %r12, %rsi movq %r13, %rdx callq 0xaa04 movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx movq %rbx, %rdi callq 0x74b0 movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x2d065 movq 0x38(%rsp), %rsi incq %rsi callq 0x7430 movq 0x48(%rsp), %rdi cmpq %r15, %rdi je 0x2d07c movq 0x58(%rsp), %rsi incq %rsi callq 0x7430 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x2d098 movq 0x18(%rsp), %rsi incq %rsi callq 0x7430 addq $0x20, %rbp xorl %eax, %eax cmpq %r14, %rbp jne 0x2cfd7 leaq 0xacc5(%rip), %rsi # 0x37d73 movl $0x1, %edx movq %rbx, %rdi callq 0x74b0 movq %rbx, %rax addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx jmp 0x2d10d movq %rax, %rbx jmp 0x2d0f6 movq %rax, %rbx movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x2d0f6 movq 0x38(%rsp), %rsi incq %rsi callq 0x7430 movq 0x48(%rsp), %rdi cmpq %r15, %rdi je 0x2d10d movq 0x58(%rsp), %rsi incq %rsi callq 0x7430 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x2d129 movq 0x18(%rsp), %rsi incq %rsi callq 0x7430 movq %rbx, %rdi callq 0x7780 nop
_ZN3CLI6detail14format_aliasesERSoRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EEm: push rbp push r15 push r14; __int64 push r13; int push r12; void * push rbx; int sub rsp, 68h mov rbx, rdi mov rax, [rsi] cmp rax, [rsi+8] jz loc_2D0BB mov r14, rsi mov rax, [rbx] mov rax, [rax-18h] movsxd rcx, edx mov [rbx+rax+10h], rcx lea rsi, aAliases; " aliases: " mov edx, 0Eh mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rbp, [r14] mov r14, [r14+8] cmp rbp, r14 jz loc_2D0A7 lea r15, [rsp+98h+var_40] mov al, 1 lea r12, [rsp+98h+var_90] lea r13, [rsp+98h+var_50] loc_2CFD7: test al, 1 jnz short loc_2CFEF mov edx, 2 mov rdi, rbx lea rsi, asc_37D88; ", " call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_2CFEF: lea rax, [rsp+98h+var_80] mov [rsp+98h+var_90], rax; int mov rdi, r12 lea rsi, asc_37D8B; " " lea rdx, asc_37D8B+0Eh; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov [rsp+98h+var_50], r15; int mov rsi, [rbp+0] mov rdx, [rbp+8] add rdx, rsi mov rdi, r13 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rdi, [rsp+98h+var_70]; int mov rsi, r12; int mov rdx, r13; int call _ZN3CLI6detail12fix_newlinesERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_; CLI::detail::fix_newlines(std::string const&,std::string) mov rsi, [rsp+98h+var_70] mov rdx, [rsp+98h+var_68] mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+98h+var_70]; void * lea rax, [rsp+98h+var_60] cmp rdi, rax jz short loc_2D065 mov rsi, [rsp+98h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2D065: mov rdi, [rsp+98h+var_50]; void * cmp rdi, r15 jz short loc_2D07C mov rsi, qword ptr [rsp+98h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2D07C: mov rdi, [rsp+98h+var_90]; void * lea rax, [rsp+98h+var_80] cmp rdi, rax jz short loc_2D098 mov rsi, qword ptr [rsp+98h+var_80] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2D098: add rbp, 20h ; ' ' xor eax, eax cmp rbp, r14 jnz loc_2CFD7 loc_2D0A7: lea rsi, asc_37D72+1; "\n" mov edx, 1 mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_2D0BB: mov rax, rbx add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax jmp short loc_2D10D mov rbx, rax jmp short loc_2D0F6 mov rbx, rax mov rdi, [rsp+arg_20]; void * lea rax, [rsp+arg_30] cmp rdi, rax jz short loc_2D0F6 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2D0F6: mov rdi, [rsp+arg_40]; void * cmp rdi, r15 jz short loc_2D10D mov rsi, [rsp+arg_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2D10D: mov rdi, [rsp+arg_0]; void * lea rax, [rsp+arg_10] cmp rdi, rax jz short loc_2D129 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2D129: mov rdi, rbx call __Unwind_Resume
_QWORD * CLI::detail::format_aliases(_QWORD *a1, long long *a2, int a3) { long long v3; // rbp long long v4; // r14 char v5; // al void *v7[2]; // [rsp+8h] [rbp-90h] BYREF int v8[2]; // [rsp+18h] [rbp-80h] BYREF void *v9[2]; // [rsp+28h] [rbp-70h] BYREF long long v10; // [rsp+38h] [rbp-60h] BYREF void *v11[2]; // [rsp+48h] [rbp-50h] BYREF int v12[2]; // [rsp+58h] [rbp-40h] BYREF if ( *a2 != a2[1] ) { *(_QWORD *)((char *)a1 + *(_QWORD *)(*a1 - 24LL) + 16) = a3; std::__ostream_insert<char,std::char_traits<char>>(a1, " aliases: ", 14LL); v3 = *a2; v4 = a2[1]; if ( *a2 != v4 ) { v5 = 1; do { if ( (v5 & 1) == 0 ) std::__ostream_insert<char,std::char_traits<char>>(a1, ", ", 2LL); v7[0] = v8; std::string::_M_construct<char const*>((long long)v7, " ", (long long)""); v11[0] = v12; std::string::_M_construct<char *>((long long)v11, *(_BYTE **)v3, *(_QWORD *)v3 + *(_QWORD *)(v3 + 8)); CLI::detail::fix_newlines(v9, v7, (long long)v11); std::__ostream_insert<char,std::char_traits<char>>(a1, v9[0], v9[1]); if ( v9[0] != &v10 ) operator delete(v9[0], v10 + 1); if ( v11[0] != v12 ) operator delete(v11[0], *(_QWORD *)v12 + 1LL); if ( v7[0] != v8 ) operator delete(v7[0], *(_QWORD *)v8 + 1LL); v3 += 32LL; v5 = 0; } while ( v3 != v4 ); } std::__ostream_insert<char,std::char_traits<char>>(a1, "\n", 1LL); } return a1; }
format_aliases: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV RBX,RDI MOV RAX,qword ptr [RSI] CMP RAX,qword ptr [RSI + 0x8] JZ 0x0012d0bb MOV R14,RSI MOV RAX,qword ptr [RBX] MOV RAX,qword ptr [RAX + -0x18] MOVSXD RCX,EDX MOV qword ptr [RBX + RAX*0x1 + 0x10],RCX LEA RSI,[0x137d79] MOV EDX,0xe MOV RDI,RBX CALL 0x001074b0 MOV RBP,qword ptr [R14] MOV R14,qword ptr [R14 + 0x8] CMP RBP,R14 JZ 0x0012d0a7 LEA R15,[RSP + 0x58] MOV AL,0x1 LEA R12,[RSP + 0x8] LEA R13,[RSP + 0x48] LAB_0012cfd7: TEST AL,0x1 JNZ 0x0012cfef MOV EDX,0x2 MOV RDI,RBX LEA RSI,[0x137d88] CALL 0x001074b0 LAB_0012cfef: LEA RAX,[RSP + 0x18] MOV qword ptr [RSP + 0x8],RAX MOV RDI,R12 LEA RSI,[0x137d8b] LEA RDX,[0x137d99] CALL 0x00111f90 MOV qword ptr [RSP + 0x48],R15 MOV RSI,qword ptr [RBP] MOV RDX,qword ptr [RBP + 0x8] ADD RDX,RSI LAB_0012d01f: MOV RDI,R13 CALL 0x001177be LAB_0012d027: LEA RDI,[RSP + 0x28] MOV RSI,R12 MOV RDX,R13 CALL 0x0010aa04 MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x30] LAB_0012d041: MOV RDI,RBX CALL 0x001074b0 LAB_0012d049: MOV RDI,qword ptr [RSP + 0x28] LEA RAX,[RSP + 0x38] CMP RDI,RAX JZ 0x0012d065 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x00107430 LAB_0012d065: MOV RDI,qword ptr [RSP + 0x48] CMP RDI,R15 JZ 0x0012d07c MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x00107430 LAB_0012d07c: MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x0012d098 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00107430 LAB_0012d098: ADD RBP,0x20 XOR EAX,EAX CMP RBP,R14 JNZ 0x0012cfd7 LAB_0012d0a7: LEA RSI,[0x137d73] MOV EDX,0x1 MOV RDI,RBX CALL 0x001074b0 LAB_0012d0bb: MOV RAX,RBX ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* CLI::detail::format_aliases(std::ostream&, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, unsigned long) */ ostream * CLI::detail::format_aliases(ostream *param_1,vector *param_2,ulong param_3) { long *plVar1; bool bVar2; long *plVar3; long *local_90 [2]; long local_80 [2]; long *local_70; long local_68; long local_60 [2]; long *local_50 [2]; long local_40 [2]; if (*(long *)param_2 != *(long *)(param_2 + 8)) { *(long *)(param_1 + *(long *)(*(long *)param_1 + -0x18) + 0x10) = (long)(int)param_3; std::__ostream_insert<char,std::char_traits<char>>(param_1," aliases: ",0xe); plVar3 = *(long **)param_2; plVar1 = *(long **)(param_2 + 8); if (plVar3 != plVar1) { bVar2 = true; do { if (!bVar2) { std::__ostream_insert<char,std::char_traits<char>>(param_1,", ",2); } local_90[0] = local_80; std::__cxx11::string::_M_construct<char_const*>(local_90,&DAT_00137d8b,&DAT_00137d99); local_50[0] = local_40; /* try { // try from 0012d01f to 0012d026 has its CatchHandler @ 0012d0cd */ std::__cxx11::string::_M_construct<char*>(local_50,*plVar3,plVar3[1] + *plVar3); /* try { // try from 0012d027 to 0012d036 has its CatchHandler @ 0012d0d2 */ fix_newlines((detail *)&local_70,local_90,local_50); /* try { // try from 0012d041 to 0012d048 has its CatchHandler @ 0012d0d7 */ std::__ostream_insert<char,std::char_traits<char>>(param_1,(char *)local_70,local_68); if (local_70 != local_60) { operator_delete(local_70,local_60[0] + 1); } if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } if (local_90[0] != local_80) { operator_delete(local_90[0],local_80[0] + 1); } plVar3 = plVar3 + 4; bVar2 = false; } while (plVar3 != plVar1); } std::__ostream_insert<char,std::char_traits<char>>(param_1,"\n",1); } return param_1; }
29,526
bitmap_get_first_set
eloqsql/mysys/my_bitmap.c
uint bitmap_get_first_set(const MY_BITMAP *map) { uint i; my_bitmap_map *data_ptr= map->bitmap, *end= map->last_word_ptr; DBUG_ASSERT(map->bitmap); for (i=0; data_ptr < end; data_ptr++, i++) if (*data_ptr) goto found; if (!(*data_ptr & ~map->last_word_mask)) return MY_BIT_NONE; found: return get_first_set(*data_ptr, i); }
O3
c
bitmap_get_first_set: pushq %rbp movq %rsp, %rbp movq (%rdi), %rcx movq 0x8(%rdi), %rdx xorl %eax, %eax cmpq %rdx, %rcx jae 0x9d3be xorl %eax, %eax movl (%rcx), %esi testl %esi, %esi jne 0x9d3c9 addq $0x4, %rcx incl %eax cmpq %rdx, %rcx jb 0x9d3ad movl (%rcx), %esi movl 0x18(%rdi), %ecx notl %ecx testl %ecx, %esi je 0x9d404 movl %esi, -0x4(%rbp) xorl %edx, %edx movl $0x0, %ecx testb %sil, %sil jne 0x9d3ec xorl %ecx, %ecx leaq -0x3(%rbp), %rdi movb (%rdi), %sil addl $0x8, %ecx incq %rdi testb %sil, %sil je 0x9d3de movzbl %sil, %esi btl %edx, %esi leal 0x1(%rdx), %edx jae 0x9d3f0 shll $0x5, %eax addl %eax, %ecx leal (%rdx,%rcx), %eax decl %eax jmp 0x9d409 movl $0xffffffff, %eax # imm = 0xFFFFFFFF popq %rbp retq
bitmap_get_first_set: push rbp mov rbp, rsp mov rcx, [rdi] mov rdx, [rdi+8] xor eax, eax cmp rcx, rdx jnb short loc_9D3BE xor eax, eax loc_9D3AD: mov esi, [rcx] test esi, esi jnz short loc_9D3C9 add rcx, 4 inc eax cmp rcx, rdx jb short loc_9D3AD loc_9D3BE: mov esi, [rcx] mov ecx, [rdi+18h] not ecx test esi, ecx jz short loc_9D404 loc_9D3C9: mov [rbp+var_4], esi xor edx, edx mov ecx, 0 test sil, sil jnz short loc_9D3EC xor ecx, ecx lea rdi, [rbp+var_4+1] loc_9D3DE: mov sil, [rdi] add ecx, 8 inc rdi test sil, sil jz short loc_9D3DE loc_9D3EC: movzx esi, sil loc_9D3F0: bt esi, edx lea edx, [rdx+1] jnb short loc_9D3F0 shl eax, 5 add ecx, eax lea eax, [rdx+rcx] dec eax jmp short loc_9D409 loc_9D404: mov eax, 0FFFFFFFFh loc_9D409: pop rbp retn
long long bitmap_get_first_set(long long a1) { int *v1; // rcx unsigned long long v2; // rdx int v3; // eax int v4; // esi unsigned int v5; // edx int v6; // ecx _BYTE *v7; // rdi int v10; // [rsp+0h] [rbp-4h] BYREF v1 = *(int **)a1; v2 = *(_QWORD *)(a1 + 8); v3 = 0; if ( *(_QWORD *)a1 >= v2 ) { LABEL_5: v4 = *v1; if ( (~*(_DWORD *)(a1 + 24) & *v1) == 0 ) return 0xFFFFFFFFLL; } else { v3 = 0; while ( 1 ) { v4 = *v1; if ( *v1 ) break; ++v1; ++v3; if ( (unsigned long long)v1 >= v2 ) goto LABEL_5; } } v10 = v4; v5 = 0; v6 = 0; if ( !(_BYTE)v4 ) { v6 = 0; v7 = (char *)&v10 + 1; do { LOBYTE(v4) = *v7; v6 += 8; ++v7; } while ( !(_BYTE)v4 ); } v4 = (unsigned __int8)v4; while ( !_bittest(&v4, v5++) ) ; return v5 + 32 * v3 + v6 - 1; }
bitmap_get_first_set: PUSH RBP MOV RBP,RSP MOV RCX,qword ptr [RDI] MOV RDX,qword ptr [RDI + 0x8] XOR EAX,EAX CMP RCX,RDX JNC 0x0019d3be XOR EAX,EAX LAB_0019d3ad: MOV ESI,dword ptr [RCX] TEST ESI,ESI JNZ 0x0019d3c9 ADD RCX,0x4 INC EAX CMP RCX,RDX JC 0x0019d3ad LAB_0019d3be: MOV ESI,dword ptr [RCX] MOV ECX,dword ptr [RDI + 0x18] NOT ECX TEST ESI,ECX JZ 0x0019d404 LAB_0019d3c9: MOV dword ptr [RBP + -0x4],ESI XOR EDX,EDX MOV ECX,0x0 TEST SIL,SIL JNZ 0x0019d3ec XOR ECX,ECX LEA RDI,[RBP + -0x3] LAB_0019d3de: MOV SIL,byte ptr [RDI] ADD ECX,0x8 INC RDI TEST SIL,SIL JZ 0x0019d3de LAB_0019d3ec: MOVZX ESI,SIL LAB_0019d3f0: BT ESI,EDX LEA EDX,[RDX + 0x1] JNC 0x0019d3f0 SHL EAX,0x5 ADD ECX,EAX LEA EAX,[RDX + RCX*0x1] DEC EAX JMP 0x0019d409 LAB_0019d404: MOV EAX,0xffffffff LAB_0019d409: POP RBP RET
int bitmap_get_first_set(int8 *param_1) { byte bVar1; uint uVar2; int iVar3; int iVar4; uint *puVar5; uint uVar6; uint uVar7; byte *pbVar8; byte abStack_b [3]; puVar5 = (uint *)*param_1; iVar3 = 0; if (puVar5 < (uint *)param_1[1]) { iVar3 = 0; do { uVar7 = *puVar5; if (uVar7 != 0) goto LAB_0019d3c9; puVar5 = puVar5 + 1; iVar3 = iVar3 + 1; } while (puVar5 < (uint *)param_1[1]); } uVar7 = *puVar5; if ((uVar7 & ~*(uint *)(param_1 + 3)) == 0) { iVar3 = -1; } else { LAB_0019d3c9: uVar6 = 0; iVar4 = 0; if ((char)uVar7 == '\0') { iVar4 = 0; pbVar8 = abStack_b; do { bVar1 = *pbVar8; uVar7 = (uint)bVar1; iVar4 = iVar4 + 8; pbVar8 = pbVar8 + 1; } while (bVar1 == 0); } do { uVar2 = uVar6 & 0x1f; uVar6 = uVar6 + 1; } while (((uVar7 & 0xff) >> uVar2 & 1) == 0); iVar3 = uVar6 + iVar4 + iVar3 * 0x20 + -1; } return iVar3; }
29,527
psi_rwlock_wrlock
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_rwlock_wrlock(mysql_rwlock_t *that, const char *file, uint line) { PSI_rwlock_locker_state state; PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_wrwait) (&state, that->m_psi, PSI_RWLOCK_WRITELOCK, file, line); int result= rw_wrlock(&that->m_rwlock); if (locker) PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result); return result; }
O0
c
psi_rwlock_wrlock: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) leaq 0x1c96de(%rip), %rax # 0x2c00b8 movq (%rax), %rax movq 0x1b0(%rax), %rax movq -0x8(%rbp), %rcx movq 0x90(%rcx), %rsi movq -0x10(%rbp), %rcx movl -0x14(%rbp), %r8d leaq -0x48(%rbp), %rdi movl $0x1, %edx callq *%rax movq %rax, -0x50(%rbp) movq -0x8(%rbp), %rdi callq 0xfa040 movl %eax, -0x54(%rbp) cmpq $0x0, -0x50(%rbp) je 0xf6a33 leaq 0x1c9698(%rip), %rax # 0x2c00b8 movq (%rax), %rax movq 0x1b8(%rax), %rax movq -0x50(%rbp), %rdi movl -0x54(%rbp), %esi callq *%rax movl -0x54(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopl (%rax)
psi_rwlock_wrlock: 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+1B0h] mov rcx, [rbp+var_8] mov rsi, [rcx+90h] mov rcx, [rbp+var_10] mov r8d, [rbp+var_14] lea rdi, [rbp+var_48] mov edx, 1 call rax mov [rbp+var_50], rax mov rdi, [rbp+var_8] call my_rw_wrlock mov [rbp+var_54], eax cmp [rbp+var_50], 0 jz short loc_F6A33 lea rax, PSI_server mov rax, [rax] mov rax, [rax+1B8h] mov rdi, [rbp+var_50] mov esi, [rbp+var_54] call rax loc_F6A33: mov eax, [rbp+var_54] add rsp, 60h pop rbp retn
long long psi_rwlock_wrlock(long long a1, long long a2, unsigned int a3) { unsigned int v4; // [rsp+Ch] [rbp-54h] long long v5; // [rsp+10h] [rbp-50h] _BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF unsigned int v7; // [rsp+4Ch] [rbp-14h] long long v8; // [rsp+50h] [rbp-10h] long long v9; // [rsp+58h] [rbp-8h] v9 = a1; v8 = a2; v7 = a3; v5 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[54])( v6, *(_QWORD *)(a1 + 144), 1LL, a2, a3); v4 = my_rw_wrlock(v9); if ( v5 ) ((void ( *)(long long, _QWORD))PSI_server[55])(v5, v4); return v4; }
psi_rwlock_wrlock: 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,[0x3c00b8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1b0] MOV RCX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RCX + 0x90] MOV RCX,qword ptr [RBP + -0x10] MOV R8D,dword ptr [RBP + -0x14] LEA RDI,[RBP + -0x48] MOV EDX,0x1 CALL RAX MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x001fa040 MOV dword ptr [RBP + -0x54],EAX CMP qword ptr [RBP + -0x50],0x0 JZ 0x001f6a33 LEA RAX,[0x3c00b8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1b8] MOV RDI,qword ptr [RBP + -0x50] MOV ESI,dword ptr [RBP + -0x54] CALL RAX LAB_001f6a33: MOV EAX,dword ptr [RBP + -0x54] ADD RSP,0x60 POP RBP RET
int4 psi_rwlock_wrlock(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 + 0x1b0)) (local_50,*(int8 *)(param_1 + 0x90),1,param_2,param_3); uVar1 = my_rw_wrlock(local_10); if (lVar2 != 0) { (**(code **)(PSI_server + 0x1b8))(lVar2,uVar1); } return uVar1; }
29,528
psi_rwlock_wrlock
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_rwlock_wrlock(mysql_rwlock_t *that, const char *file, uint line) { PSI_rwlock_locker_state state; PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_wrwait) (&state, that->m_psi, PSI_RWLOCK_WRITELOCK, file, line); int result= rw_wrlock(&that->m_rwlock); if (locker) PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result); return result; }
O3
c
psi_rwlock_wrlock: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x38, %rsp movl %edx, %r8d movq %rsi, %rcx movq %rdi, %r14 leaq 0x357278(%rip), %r15 # 0x386010 movq (%r15), %rax movq 0x90(%rdi), %rsi leaq -0x48(%rbp), %rdi pushq $0x1 popq %rdx callq *0x1b0(%rax) movq %rax, %rbx movq %r14, %rdi callq 0xa441d movl %eax, %r14d testq %rbx, %rbx je 0x2edd1 movq (%r15), %rax movq %rbx, %rdi movl %r14d, %esi callq *0x1b8(%rax) movl %r14d, %eax addq $0x38, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
psi_rwlock_wrlock: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 38h mov r8d, edx mov rcx, rsi mov r14, rdi lea r15, PSI_server mov rax, [r15] mov rsi, [rdi+90h] lea rdi, [rbp+var_48] push 1 pop rdx call qword ptr [rax+1B0h] mov rbx, rax mov rdi, r14 call my_rw_wrlock mov r14d, eax test rbx, rbx jz short loc_2EDD1 mov rax, [r15] mov rdi, rbx mov esi, r14d call qword ptr [rax+1B8h] loc_2EDD1: mov eax, r14d add rsp, 38h pop rbx pop r14 pop r15 pop rbp retn
long long psi_rwlock_wrlock(long long a1, long long a2, unsigned int a3) { long long v3; // rbx unsigned int v4; // r14d _BYTE v6[72]; // [rsp+8h] [rbp-48h] BYREF v3 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[54])( v6, *(_QWORD *)(a1 + 144), 1LL, a2, a3); v4 = my_rw_wrlock(a1); if ( v3 ) ((void ( *)(long long, _QWORD))PSI_server[55])(v3, v4); return v4; }
psi_rwlock_wrlock: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x38 MOV R8D,EDX MOV RCX,RSI MOV R14,RDI LEA R15,[0x486010] MOV RAX,qword ptr [R15] MOV RSI,qword ptr [RDI + 0x90] LEA RDI,[RBP + -0x48] PUSH 0x1 POP RDX CALL qword ptr [RAX + 0x1b0] MOV RBX,RAX MOV RDI,R14 CALL 0x001a441d MOV R14D,EAX TEST RBX,RBX JZ 0x0012edd1 MOV RAX,qword ptr [R15] MOV RDI,RBX MOV ESI,R14D CALL qword ptr [RAX + 0x1b8] LAB_0012edd1: MOV EAX,R14D ADD RSP,0x38 POP RBX POP R14 POP R15 POP RBP RET
int4 psi_rwlock_wrlock(long param_1,int8 param_2,int4 param_3) { int4 uVar1; long lVar2; int1 local_50 [48]; lVar2 = (**(code **)(PSI_server + 0x1b0)) (local_50,*(int8 *)(param_1 + 0x90),1,param_2,param_3); uVar1 = my_rw_wrlock(param_1); if (lVar2 != 0) { (**(code **)(PSI_server + 0x1b8))(lVar2,uVar1); } return uVar1; }
29,529
coro::io_scheduler::spawn(coro::task<void>&&)
AlayaLite/build_O3/_deps/libcoro-src/src/io_scheduler.cpp
auto io_scheduler::spawn(coro::task<void>&& task) -> bool { m_size.fetch_add(1, std::memory_order::release); auto owned_task = detail::make_task_self_deleting(std::move(task)); owned_task.promise().executor_size(m_size); return resume(owned_task.handle()); }
O3
cpp
coro::io_scheduler::spawn(coro::task<void>&&): pushq %rbx subq $0x10, %rsp movq %rdi, %rbx lock incq 0xc0(%rdi) movq (%rsi), %rax movq $0x0, (%rsi) leaq 0x8(%rsp), %rsi movq %rax, (%rsi) movq %rsp, %rdi callq 0x5a41 movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x74e3 callq *0x8(%rdi) leaq 0xc0(%rbx), %rsi movq (%rsp), %rdi callq 0x5a20 movq (%rsp), %rsi addq $-0x10, %rsi movq %rbx, %rdi callq 0x84c8 movl %eax, %ebx movq %rsp, %rdi callq 0x5a28 movl %ebx, %eax addq $0x10, %rsp popq %rbx retq jmp 0x753e jmp 0x7519 movq %rax, %rbx movq %rsp, %rdi callq 0x5a28 jmp 0x7536 movq %rax, %rbx movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x7536 callq *0x8(%rdi) movq %rbx, %rdi callq 0x3390 movq %rax, %rdi callq 0x4a0a
_ZN4coro12io_scheduler5spawnEONS_4taskIvEE: push rbx sub rsp, 10h mov rbx, rdi lock inc qword ptr [rdi+0C0h] mov rax, [rsi] mov qword ptr [rsi], 0 lea rsi, [rsp+18h+var_10] mov [rsi], rax mov rdi, rsp; this call _ZN4coro6detail23make_task_self_deletingENS_4taskIvEE; coro::detail::make_task_self_deleting(coro::task<void>) mov rdi, [rsp+18h+var_10] test rdi, rdi jz short loc_74E3 call qword ptr [rdi+8] loc_74E3: lea rsi, [rbx+0C0h] mov rdi, [rsp+18h+var_18] call _ZN4coro6detail21promise_self_deleting13executor_sizeERSt6atomicImE; coro::detail::promise_self_deleting::executor_size(std::atomic<ulong> &) mov rsi, [rsp+18h+var_18] add rsi, 0FFFFFFFFFFFFFFF0h mov rdi, rbx call _ZN4coro12io_scheduler6resumeENSt7__n486116coroutine_handleIvEE; coro::io_scheduler::resume(std::__n4861::coroutine_handle<void>) mov ebx, eax mov rdi, rsp; this call _ZN4coro6detail18task_self_deletingD2Ev; coro::detail::task_self_deleting::~task_self_deleting() mov eax, ebx add rsp, 10h pop rbx retn jmp short loc_753E jmp short $+2 loc_7519: mov rbx, rax mov rdi, rsp; this call _ZN4coro6detail18task_self_deletingD2Ev; coro::detail::task_self_deleting::~task_self_deleting() jmp short loc_7536 mov rbx, rax mov rdi, [rsp+18h+var_10] test rdi, rdi jz short loc_7536 call qword ptr [rdi+8] loc_7536: mov rdi, rbx call __Unwind_Resume loc_753E: mov rdi, rax call __clang_call_terminate
long long coro::io_scheduler::spawn(long long a1, long long *a2) { long long v2; // rax unsigned int v3; // ebx _QWORD *v5; // [rsp+0h] [rbp-18h] BYREF long long v6; // [rsp+8h] [rbp-10h] BYREF _InterlockedIncrement64((volatile signed long long *)(a1 + 192)); v2 = *a2; *a2 = 0LL; v6 = v2; coro::detail::make_task_self_deleting((coro::detail::task_self_deleting *)&v5, &v6); if ( v6 ) (*(void (**)(void))(v6 + 8))(); coro::detail::promise_self_deleting::executor_size(v5, a1 + 192); v3 = coro::io_scheduler::resume(a1, v5 - 2); coro::detail::task_self_deleting::~task_self_deleting((coro::detail::task_self_deleting *)&v5); return v3; }
spawn: PUSH RBX SUB RSP,0x10 MOV RBX,RDI INC.LOCK qword ptr [RDI + 0xc0] MOV RAX,qword ptr [RSI] MOV qword ptr [RSI],0x0 LEA RSI,[RSP + 0x8] MOV qword ptr [RSI],RAX LAB_001074ce: MOV RDI,RSP CALL 0x00105a41 MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x001074e3 LAB_001074e0: CALL qword ptr [RDI + 0x8] LAB_001074e3: LEA RSI,[RBX + 0xc0] MOV RDI,qword ptr [RSP] LAB_001074ee: CALL 0x00105a20 MOV RSI,qword ptr [RSP] ADD RSI,-0x10 LAB_001074fb: MOV RDI,RBX CALL 0x001084c8 MOV EBX,EAX MOV RDI,RSP CALL 0x00105a28 MOV EAX,EBX ADD RSP,0x10 POP RBX RET
/* coro::io_scheduler::spawn(coro::task<void>&&) */ int4 __thiscall coro::io_scheduler::spawn(io_scheduler *this,task *param_1) { int4 uVar1; promise_self_deleting *local_18; long local_10; LOCK(); *(long *)(this + 0xc0) = *(long *)(this + 0xc0) + 1; UNLOCK(); local_10 = *(long *)param_1; *(int8 *)param_1 = 0; /* try { // try from 001074ce to 001074d5 has its CatchHandler @ 00107526 */ detail::make_task_self_deleting((detail *)&local_18); if (local_10 != 0) { /* try { // try from 001074e0 to 001074e2 has its CatchHandler @ 00107515 */ (**(code **)(local_10 + 8))(); } /* try { // try from 001074ee to 001074f2 has its CatchHandler @ 00107519 */ detail::promise_self_deleting::executor_size(local_18,(atomic *)(this + 0xc0)); /* try { // try from 001074fb to 00107502 has its CatchHandler @ 00107517 */ uVar1 = resume(this,local_18 + -0x10); detail::task_self_deleting::~task_self_deleting((task_self_deleting *)&local_18); return uVar1; }
29,530
test_sampler_queue(unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, float, float)
monkey531[P]llama/tests/test-sampling.cpp
static void test_sampler_queue(const size_t n_vocab, const std::string & samplers_sequence, const int top_k, const float top_p, const float min_p ) { sampler_tester tester(n_vocab); llama_token min_token_id = 0; const llama_token max_token_id = n_vocab-1; for (auto s : samplers_sequence) { switch (s){ case 'k': tester.apply(llama_sampler_init_top_k(top_k)); break; case 'y': GGML_ABORT("typical test not implemented"); case 'p': tester.apply(llama_sampler_init_top_p(top_p, 1)); break; case 'm': tester.apply(llama_sampler_init_min_p(min_p, 1)); break; case 't': GGML_ABORT("temperature test not implemented"); default : GGML_ABORT("Unknown sampler"); } tester.apply(llama_sampler_init_dist(0)); auto & cur_p = tester.cur_p; const int size = cur_p.size; if (s == 'k') { const int expected_size = std::min(size, top_k); min_token_id = std::max(min_token_id, (llama_token)(n_vocab - top_k)); GGML_ASSERT(size == expected_size); GGML_ASSERT(cur_p.data[0].id == max_token_id); GGML_ASSERT(cur_p.data[expected_size-1].id == min_token_id); } else if (s == 'p') { const int softmax_divisor = n_vocab * (n_vocab-1) / 2 - min_token_id * (min_token_id-1) / 2; const int softmax_numerator_target = ceilf(top_p * softmax_divisor); min_token_id = n_vocab; int expected_size = 0; int cumsum = 0; do { // do-while because always at least one token is sampled min_token_id--; expected_size++; cumsum += min_token_id; } while (cumsum < softmax_numerator_target); // token 0 has p == 0, need special consideration for cumsum because top_p immediately returns if (min_token_id == 1) { min_token_id--; expected_size += 1; } GGML_ASSERT(size == expected_size); GGML_ASSERT(cur_p.data[0].id == max_token_id); GGML_ASSERT(cur_p.data[expected_size-1].id == min_token_id); } else if (s == 'm') { int expected_size = ceilf((1.0f-min_p) * n_vocab); expected_size = std::max(expected_size, 1); expected_size = std::min(expected_size, size); min_token_id = floorf(min_p * n_vocab); min_token_id = std::max(min_token_id, 1); min_token_id = std::max(min_token_id, (llama_token)(n_vocab - size)); min_token_id = std::min(min_token_id, (llama_token)(n_vocab - 1)); GGML_ASSERT(size == expected_size); GGML_ASSERT(cur_p.data[0].id == max_token_id); GGML_ASSERT(cur_p.data[expected_size-1].id == min_token_id); } else { GGML_ABORT("fatal error"); } } printf("Sampler queue %3s OK with n_vocab=%05zu top_k=%05d top_p=%f min_p=%f\n", samplers_sequence.c_str(), n_vocab, top_k, top_p, min_p); }
O2
cpp
test_sampler_queue(unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, float, float): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movss %xmm1, 0x10(%rsp) movss %xmm0, 0x14(%rsp) movl %esi, %ebp movq %rdi, %rbx leaq 0x38(%rsp), %r15 movl $0x2710, %esi # imm = 0x2710 movq %r15, %rdi callq 0x55d4 movq (%rbx), %r13 movq %rbx, 0x28(%rsp) movq 0x8(%rbx), %rax addq %r13, %rax movq %rax, 0x30(%rsp) movss 0x169f(%rip), %xmm0 # 0x60f0 subss 0x10(%rsp), %xmm0 mulss 0x16f1(%rip), %xmm0 # 0x6150 callq 0x2120 cvttss2si %xmm0, %eax cmpl $0x2, %eax pushq $0x1 popq %rcx cmovll %ecx, %eax movl %eax, 0x24(%rsp) movss 0x16d3(%rip), %xmm0 # 0x6150 mulss 0x10(%rsp), %xmm0 callq 0x20b0 cvttss2si %xmm0, %eax movl %eax, 0x20(%rsp) movl $0x2710, %eax # imm = 0x2710 movl %ebp, 0x18(%rsp) subl %ebp, %eax movl %eax, 0x1c(%rsp) leaq 0x16ca(%rip), %r14 # 0x6170 leaq 0x19ed(%rip), %rax # 0x649a movq %rax, 0x8(%rsp) xorl %r12d, %r12d cmpq 0x30(%rsp), %r13 je 0x4c7e movzbl (%r13), %ebp leal -0x6b(%rbp), %eax cmpl $0x9, %eax ja 0x4cc5 movslq (%r14,%rax,4), %rax addq %r14, %rax jmpq *%rax movl 0x18(%rsp), %edi callq 0x20e0 jmp 0x4b03 movss 0x14(%rsp), %xmm0 pushq $0x1 popq %rdi callq 0x2040 jmp 0x4b03 movss 0x10(%rsp), %xmm0 pushq $0x1 popq %rdi callq 0x21e0 movq %r15, %rdi movq %rax, %rsi callq 0x5198 xorl %edi, %edi callq 0x2200 movq %r15, %rdi movq %rax, %rsi callq 0x5198 movq %r15, %rbx movq 0x40(%rsp), %r15 cmpl $0x70, %ebp je 0x4bed cmpl $0x6d, %ebp je 0x4b86 cmpl $0x6b, %ebp jne 0x4d00 movl 0x1c(%rsp), %eax cmpl %eax, %r12d cmovlel %eax, %r12d movl 0x18(%rsp), %eax cmpl %eax, %r15d cmovgel %eax, %r15d jg 0x4d57 movq 0x38(%rsp), %rax cmpl $0x270f, (%rax) # imm = 0x270F jne 0x4d28 movslq %r15d, %rcx imulq $0xc, %rcx, %rcx cmpl %r12d, -0xc(%rax,%rcx) movq %rbx, %r15 je 0x4c76 jmp 0x4d3d movl $0x2710, %r12d # imm = 0x2710 subl %r15d, %r12d movl 0x20(%rsp), %eax cmpl %r12d, %eax cmovgl %eax, %r12d cmpl $0x2, %r12d pushq $0x1 popq %rax cmovll %eax, %r12d movl $0x270f, %eax # imm = 0x270F cmpl %eax, %r12d cmovgel %eax, %r12d movl 0x24(%rsp), %eax cmpl %r15d, %eax cmovll %eax, %r15d jl 0x4d36 movq 0x38(%rsp), %rax cmpl $0x270f, (%rax) # imm = 0x270F jne 0x4d84 movslq %r15d, %rcx imulq $0xc, %rcx, %rcx cmpl %r12d, -0xc(%rax,%rcx) movq %rbx, %r15 je 0x4c76 jmp 0x4d1a movl %r15d, %ebp leal -0x1(%r12), %eax imull %r12d, %eax cltd pushq $-0x2 popq %rcx idivl %ecx addl $0x2fadcf8, %eax # imm = 0x2FADCF8 cvtsi2ss %eax, %xmm0 mulss 0x14(%rsp), %xmm0 callq 0x2120 cvttss2si %xmm0, %ecx xorl %eax, %eax xorl %edx, %edx addl %eax, %edx addl $0x270f, %edx # imm = 0x270F decl %eax cmpl %ecx, %edx jl 0x4c1b movl %eax, %ecx negl %ecx pushq $0x1 popq %rdx subl %eax, %edx leal 0x2710(%rax), %r12d cmpl $0xffffd8f1, %eax # imm = 0xFFFFD8F1 movl $0x0, %eax cmovel %eax, %r12d cmovnel %ecx, %edx cmpl %r15d, %edx jne 0x4d50 movq 0x38(%rsp), %rax cmpl $0x270f, (%rax) # imm = 0x270F jne 0x4d76 movq %rbx, %r15 imulq $0xc, %rbp, %rcx cmpl %r12d, -0xc(%rax,%rcx) jne 0x4daf incq %r13 jmp 0x4ab5 movq 0x28(%rsp), %rax movq (%rax), %rsi cvtss2sd 0x14(%rsp), %xmm0 cvtss2sd 0x10(%rsp), %xmm1 leaq 0x1873(%rip), %rdi # 0x650c movl $0x2710, %edx # imm = 0x2710 movl 0x18(%rsp), %ecx movb $0x2, %al callq 0x2030 leaq 0x38(%rsp), %rdi callq 0x523e addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpl $0x79, %ebp jne 0x4cd8 leaq 0x177b(%rip), %rdx # 0x644c movl $0xc2, %esi jmp 0x4cf2 leaq 0x17ab(%rip), %rdx # 0x648a movl $0xc6, %esi jmp 0x4cf2 leaq 0x177c(%rip), %rdx # 0x6469 movl $0xc5, %esi leaq 0x15ab(%rip), %rdi # 0x62a4 xorl %eax, %eax callq 0x2250 leaq 0x159d(%rip), %rdi # 0x62a4 leaq 0x17f2(%rip), %rdx # 0x6500 movl $0xfb, %esi xorl %eax, %eax callq 0x2250 movl $0xf9, %esi leaq 0x17ab(%rip), %rax # 0x64d1 jmp 0x4d90 movl $0xd4, %esi leaq 0x177c(%rip), %rax # 0x64b0 jmp 0x4d49 movl $0xf7, %esi jmp 0x4d95 movl $0xd5, %esi leaq 0x1788(%rip), %rax # 0x64d1 movq %rax, 0x8(%rsp) jmp 0x4d5c movl $0xea, %esi jmp 0x4dc0 movl $0xd3, %esi leaq 0x1541(%rip), %rdi # 0x62a4 leaq 0x15cd(%rip), %rdx # 0x6337 movq 0x8(%rsp), %rcx xorl %eax, %eax callq 0x2250 movl $0xeb, %esi leaq 0x172e(%rip), %rax # 0x64b0 jmp 0x4dbb movl $0xf8, %esi leaq 0x1720(%rip), %rax # 0x64b0 movq %rax, 0x8(%rsp) leaq 0x1508(%rip), %rdi # 0x62a4 leaq 0x1594(%rip), %rdx # 0x6337 movq 0x8(%rsp), %rcx xorl %eax, %eax callq 0x2250 movl $0xec, %esi leaq 0x1716(%rip), %rax # 0x64d1 movq %rax, 0x8(%rsp) leaq 0x14dd(%rip), %rdi # 0x62a4 leaq 0x1569(%rip), %rdx # 0x6337 movq 0x8(%rsp), %rcx xorl %eax, %eax callq 0x2250 jmp 0x4de4 jmp 0x4de4 jmp 0x4de4 jmp 0x4de4 jmp 0x4de4 movq %rax, %rbx leaq 0x38(%rsp), %rdi callq 0x523e movq %rbx, %rdi callq 0x2270
_ZL18test_sampler_queuemRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiff: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h movss [rsp+0B8h+var_A8], xmm1 movss [rsp+0B8h+var_A4], xmm0 mov ebp, esi mov rbx, rdi lea r15, [rsp+0B8h+var_80] mov esi, 2710h; unsigned __int64 mov rdi, r15; this call _ZN14sampler_testerC2Em; sampler_tester::sampler_tester(ulong) mov r13, [rbx] mov [rsp+0B8h+var_90], rbx mov rax, [rbx+8] add rax, r13 mov [rsp+0B8h+var_88], rax movss xmm0, cs:dword_60F0 subss xmm0, [rsp+0B8h+var_A8] mulss xmm0, cs:dword_6150 call _ceilf cvttss2si eax, xmm0 cmp eax, 2 push 1 pop rcx cmovl eax, ecx mov [rsp+0B8h+var_94], eax movss xmm0, cs:dword_6150 mulss xmm0, [rsp+0B8h+var_A8] call _floorf cvttss2si eax, xmm0 mov [rsp+0B8h+var_98], eax mov eax, 2710h mov [rsp+0B8h+var_A0], ebp sub eax, ebp mov [rsp+0B8h+var_9C], eax lea r14, jpt_4AD8 lea rax, aSizeExpectedSi; "size == expected_size" mov [rsp+0B8h+var_B0], rax xor r12d, r12d loc_4AB5: cmp r13, [rsp+0B8h+var_88] jz loc_4C7E movzx ebp, byte ptr [r13+0] lea eax, [rbp-6Bh]; switch 10 cases cmp eax, 9 ja def_4AD8; jumptable 0000000000004AD8 default case movsxd rax, ds:(jpt_4AD8 - 6170h)[r14+rax*4] add rax, r14 jmp rax; switch jump loc_4ADA: mov edi, [rsp+0B8h+var_A0]; jumptable 0000000000004AD8 case 107 call _llama_sampler_init_top_k jmp short loc_4B03 loc_4AE5: movss xmm0, [rsp+0B8h+var_A4]; jumptable 0000000000004AD8 case 112 push 1 pop rdi call _llama_sampler_init_top_p jmp short loc_4B03 loc_4AF5: movss xmm0, [rsp+0B8h+var_A8]; jumptable 0000000000004AD8 case 109 push 1 pop rdi call _llama_sampler_init_min_p loc_4B03: mov rdi, r15 mov rsi, rax call _ZN14sampler_tester5applyEP13llama_sampler; sampler_tester::apply(llama_sampler *) xor edi, edi call _llama_sampler_init_dist mov rdi, r15 mov rsi, rax call _ZN14sampler_tester5applyEP13llama_sampler; sampler_tester::apply(llama_sampler *) mov rbx, r15 mov r15, [rsp+0B8h+var_78] cmp ebp, 70h ; 'p' jz loc_4BED cmp ebp, 6Dh ; 'm' jz short loc_4B86 cmp ebp, 6Bh ; 'k' jnz loc_4D00 mov eax, [rsp+0B8h+var_9C] cmp r12d, eax cmovle r12d, eax mov eax, [rsp+0B8h+var_A0] cmp r15d, eax cmovge r15d, eax jg loc_4D57 mov rax, [rsp+0B8h+var_80] cmp dword ptr [rax], 270Fh jnz loc_4D28 movsxd rcx, r15d imul rcx, 0Ch cmp [rax+rcx-0Ch], r12d mov r15, rbx jz loc_4C76 jmp loc_4D3D loc_4B86: mov r12d, 2710h sub r12d, r15d mov eax, [rsp+0B8h+var_98] cmp eax, r12d cmovg r12d, eax cmp r12d, 2 push 1 pop rax cmovl r12d, eax mov eax, 270Fh cmp r12d, eax cmovge r12d, eax mov eax, [rsp+0B8h+var_94] cmp eax, r15d cmovl r15d, eax jl loc_4D36 mov rax, [rsp+0B8h+var_80] cmp dword ptr [rax], 270Fh jnz loc_4D84 movsxd rcx, r15d imul rcx, 0Ch cmp [rax+rcx-0Ch], r12d mov r15, rbx jz loc_4C76 jmp loc_4D1A loc_4BED: mov ebp, r15d lea eax, [r12-1] imul eax, r12d cdq push 0FFFFFFFFFFFFFFFEh pop rcx idiv ecx add eax, 2FADCF8h cvtsi2ss xmm0, eax mulss xmm0, [rsp+0B8h+var_A4] call _ceilf cvttss2si ecx, xmm0 xor eax, eax xor edx, edx loc_4C1B: add edx, eax add edx, 270Fh dec eax cmp edx, ecx jl short loc_4C1B mov ecx, eax neg ecx push 1 pop rdx sub edx, eax lea r12d, [rax+2710h] cmp eax, 0FFFFD8F1h mov eax, 0 cmovz r12d, eax cmovnz edx, ecx cmp edx, r15d jnz loc_4D50 mov rax, [rsp+0B8h+var_80] cmp dword ptr [rax], 270Fh jnz loc_4D76 mov r15, rbx imul rcx, rbp, 0Ch cmp [rax+rcx-0Ch], r12d jnz loc_4DAF loc_4C76: inc r13 jmp loc_4AB5 loc_4C7E: mov rax, [rsp+0B8h+var_90] mov rsi, [rax] cvtss2sd xmm0, [rsp+0B8h+var_A4] cvtss2sd xmm1, [rsp+0B8h+var_A8] lea rdi, aSamplerQueue3s; "Sampler queue %3s OK with n_vocab=%05zu"... mov edx, 2710h mov ecx, [rsp+0B8h+var_A0] mov al, 2 call _printf lea rdi, [rsp+0B8h+var_80]; this call _ZN14sampler_testerD2Ev; sampler_tester::~sampler_tester() add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn def_4AD8: cmp ebp, 79h ; 'y'; jumptable 0000000000004AD8 default case jnz short loc_4CD8; jumptable 0000000000004AD8 cases 108,110,111,113-115 lea rdx, aTypicalTestNot; "typical test not implemented" mov esi, 0C2h jmp short loc_4CF2 loc_4CD8: lea rdx, aUnknownSampler; jumptable 0000000000004AD8 cases 108,110,111,113-115 mov esi, 0C6h jmp short loc_4CF2 loc_4CE6: lea rdx, aTemperatureTes; jumptable 0000000000004AD8 case 116 mov esi, 0C5h loc_4CF2: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... xor eax, eax call _ggml_abort loc_4D00: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aFatalError; "fatal error" mov esi, 0FBh xor eax, eax call _ggml_abort loc_4D1A: mov esi, 0F9h lea rax, aCurPDataExpect; "cur_p.data[expected_size-1].id == min_t"... jmp short loc_4D90 loc_4D28: mov esi, 0D4h lea rax, aCurPData0IdMax; "cur_p.data[0].id == max_token_id" jmp short loc_4D49 loc_4D36: mov esi, 0F7h jmp short loc_4D95 loc_4D3D: mov esi, 0D5h lea rax, aCurPDataExpect; "cur_p.data[expected_size-1].id == min_t"... loc_4D49: mov [rsp+0B8h+var_B0], rax jmp short loc_4D5C loc_4D50: mov esi, 0EAh jmp short loc_4DC0 loc_4D57: mov esi, 0D3h loc_4D5C: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" mov rcx, [rsp+0B8h+var_B0] xor eax, eax call _ggml_abort loc_4D76: mov esi, 0EBh lea rax, aCurPData0IdMax; "cur_p.data[0].id == max_token_id" jmp short loc_4DBB loc_4D84: mov esi, 0F8h lea rax, aCurPData0IdMax; "cur_p.data[0].id == max_token_id" loc_4D90: mov [rsp+0B8h+var_B0], rax loc_4D95: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" mov rcx, [rsp+0B8h+var_B0] xor eax, eax call _ggml_abort loc_4DAF: mov esi, 0ECh lea rax, aCurPDataExpect; "cur_p.data[expected_size-1].id == min_t"... loc_4DBB: mov [rsp+0B8h+var_B0], rax loc_4DC0: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" mov rcx, [rsp+0B8h+var_B0] xor eax, eax call _ggml_abort jmp short loc_4DE4 jmp short loc_4DE4 jmp short loc_4DE4 jmp short loc_4DE4 jmp short $+2 loc_4DE4: mov rbx, rax lea rdi, [rsp+0B8h+var_80]; this call _ZN14sampler_testerD2Ev; sampler_tester::~sampler_tester() mov rdi, rbx call __Unwind_Resume
void test_sampler_queue(long long a1, int a2, float a3, float a4) { _DWORD **v4; // r15 _BYTE *v5; // r13 int v6; // eax int v7; // r12d int v8; // ebp long long inited; // rax long long v10; // rsi _DWORD **v11; // rbx int v12; // r15d long long v13; // rcx long long v14; // rbp int v15; // ecx int v16; // eax int v17; // edx int v18; // edx const char *v19; // rax long long v20; // rsi long long v21; // rsi const char *v22; // rax long long v23; // rsi const char *v24; // rax long long v25; // rbx const char *v26; // [rsp+8h] [rbp-B0h] int v29; // [rsp+1Ch] [rbp-9Ch] int v30; // [rsp+20h] [rbp-98h] int v31; // [rsp+24h] [rbp-94h] _BYTE *v32; // [rsp+30h] [rbp-88h] _DWORD *v33; // [rsp+38h] [rbp-80h] BYREF long long v34; // [rsp+40h] [rbp-78h] v4 = &v33; sampler_tester::sampler_tester((sampler_tester *)&v33, 0x2710uLL); v5 = *(_BYTE **)a1; v32 = (_BYTE *)(*(_QWORD *)a1 + *(_QWORD *)(a1 + 8)); v6 = (int)ceilf((float)(1.0 - a4) * 10000.0); if ( v6 < 2 ) v6 = 1; v31 = v6; v30 = (int)floorf(10000.0 * a4); v29 = 10000 - a2; v26 = "size == expected_size"; v7 = 0; while ( v5 != v32 ) { v8 = (unsigned __int8)*v5; switch ( *v5 ) { case 'k': inited = llama_sampler_init_top_k((unsigned int)a2); goto LABEL_9; case 'l': case 'n': case 'o': case 'q': case 'r': case 's': goto LABEL_43; case 'm': inited = llama_sampler_init_min_p(1LL, a4); goto LABEL_9; case 'p': inited = llama_sampler_init_top_p(1LL, a3); LABEL_9: sampler_tester::apply(v4, inited); v10 = llama_sampler_init_dist(0LL); sampler_tester::apply(v4, v10); v11 = v4; v12 = v34; switch ( v8 ) { case 'p': v14 = (unsigned int)v34; v15 = (int)ceilf((float)(v7 * (v7 - 1) / -2 + 49995000) * a3); v16 = 0; v17 = 0; do { v17 += v16 + 9999; --v16; } while ( v17 < v15 ); v18 = 1 - v16; v7 = v16 + 10000; if ( v16 == -9999 ) v7 = 0; else v18 = -v16; if ( v18 != v12 ) { v23 = 234LL; goto LABEL_57; } if ( *v33 != 9999 ) goto LABEL_51; v4 = v11; if ( v33[3 * v14 - 3] != v7 ) goto LABEL_55; break; case 'm': v7 = 10000 - v34; if ( v30 > 10000 - (int)v34 ) v7 = v30; if ( v7 < 2 ) v7 = 1; if ( v7 >= 9999 ) v7 = 9999; if ( v31 < (int)v34 ) { v20 = 247LL; LABEL_54: ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/tests/test-sampling.cpp", v20, "GGML_ASSERT(%s) failed", v26); LABEL_55: v23 = 236LL; v24 = "cur_p.data[expected_size-1].id == min_token_id"; LABEL_56: v26 = v24; LABEL_57: v25 = ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/tests/test-sampling.cpp", v23, "GGML_ASSERT(%s) failed", v26); sampler_tester::~sampler_tester((sampler_tester *)&v33); _Unwind_Resume(v25); } if ( *v33 != 9999 ) { v20 = 248LL; v19 = "cur_p.data[0].id == max_token_id"; LABEL_53: v26 = v19; goto LABEL_54; } v4 = v11; if ( v33[3 * (int)v34 - 3] != v7 ) goto LABEL_46; break; case 'k': if ( v7 <= v29 ) v7 = v29; if ( (int)v34 >= a2 ) v12 = a2; if ( (int)v34 > a2 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/tests/test-sampling.cpp", 211LL, "GGML_ASSERT(%s) failed", "size == expected_size"); goto LABEL_51; } if ( *v33 != 9999 ) { v21 = 212LL; v22 = "cur_p.data[0].id == max_token_id"; goto LABEL_48; } v13 = 3LL * v12; v4 = v11; if ( v33[v13 - 3] != v7 ) { v21 = 213LL; v22 = "cur_p.data[expected_size-1].id == min_token_id"; LABEL_48: ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/tests/test-sampling.cpp", v21, "GGML_ASSERT(%s) failed", v22); LABEL_51: v23 = 235LL; v24 = "cur_p.data[0].id == max_token_id"; goto LABEL_56; } break; default: LABEL_45: ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/tests/test-sampling.cpp", 251LL, "fatal error"); LABEL_46: v20 = 249LL; v19 = "cur_p.data[expected_size-1].id == min_token_id"; goto LABEL_53; } ++v5; break; case 't': ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/tests/test-sampling.cpp", 197LL, "temperature test not implemented"); goto LABEL_45; default: if ( v8 == 121 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/tests/test-sampling.cpp", 194LL, "typical test not implemented"); else LABEL_43: ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/tests/test-sampling.cpp", 198LL, "Unknown sampler"); goto LABEL_45; } } printf( "Sampler queue %3s OK with n_vocab=%05zu top_k=%05d top_p=%f min_p=%f\n", *(const char **)a1, 0x2710uLL, a2, a3, a4); sampler_tester::~sampler_tester((sampler_tester *)&v33); }
test_sampler_queue: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOVSS dword ptr [RSP + 0x10],XMM1 MOVSS dword ptr [RSP + 0x14],XMM0 MOV EBP,ESI MOV RBX,RDI LEA R15,[RSP + 0x38] MOV ESI,0x2710 MOV RDI,R15 CALL 0x001055d4 MOV R13,qword ptr [RBX] MOV qword ptr [RSP + 0x28],RBX MOV RAX,qword ptr [RBX + 0x8] ADD RAX,R13 MOV qword ptr [RSP + 0x30],RAX MOVSS XMM0,dword ptr [0x001060f0] SUBSS XMM0,dword ptr [RSP + 0x10] MULSS XMM0,dword ptr [0x00106150] CALL 0x00102120 CVTTSS2SI EAX,XMM0 CMP EAX,0x2 PUSH 0x1 POP RCX CMOVL EAX,ECX MOV dword ptr [RSP + 0x24],EAX MOVSS XMM0,dword ptr [0x00106150] MULSS XMM0,dword ptr [RSP + 0x10] CALL 0x001020b0 CVTTSS2SI EAX,XMM0 MOV dword ptr [RSP + 0x20],EAX MOV EAX,0x2710 MOV dword ptr [RSP + 0x18],EBP SUB EAX,EBP MOV dword ptr [RSP + 0x1c],EAX LEA R14,[0x106170] LEA RAX,[0x10649a] MOV qword ptr [RSP + 0x8],RAX XOR R12D,R12D LAB_00104ab5: CMP R13,qword ptr [RSP + 0x30] JZ 0x00104c7e MOVZX EBP,byte ptr [R13] LEA EAX,[RBP + -0x6b] CMP EAX,0x9 JA 0x00104cc5 MOVSXD RAX,dword ptr [R14 + RAX*0x4] ADD RAX,R14 switchD: JMP RAX caseD_6b: MOV EDI,dword ptr [RSP + 0x18] CALL 0x001020e0 JMP 0x00104b03 caseD_70: MOVSS XMM0,dword ptr [RSP + 0x14] PUSH 0x1 POP RDI CALL 0x00102040 JMP 0x00104b03 caseD_6d: MOVSS XMM0,dword ptr [RSP + 0x10] PUSH 0x1 POP RDI CALL 0x001021e0 LAB_00104b03: MOV RDI,R15 MOV RSI,RAX CALL 0x00105198 XOR EDI,EDI CALL 0x00102200 MOV RDI,R15 MOV RSI,RAX CALL 0x00105198 LAB_00104b20: MOV RBX,R15 MOV R15,qword ptr [RSP + 0x40] CMP EBP,0x70 JZ 0x00104bed CMP EBP,0x6d JZ 0x00104b86 CMP EBP,0x6b JNZ 0x00104d00 MOV EAX,dword ptr [RSP + 0x1c] CMP R12D,EAX CMOVLE R12D,EAX MOV EAX,dword ptr [RSP + 0x18] CMP R15D,EAX CMOVGE R15D,EAX JG 0x00104d57 MOV RAX,qword ptr [RSP + 0x38] CMP dword ptr [RAX],0x270f JNZ 0x00104d28 MOVSXD RCX,R15D IMUL RCX,RCX,0xc CMP dword ptr [RAX + RCX*0x1 + -0xc],R12D MOV R15,RBX JZ 0x00104c76 JMP 0x00104d3d LAB_00104b86: MOV R12D,0x2710 SUB R12D,R15D MOV EAX,dword ptr [RSP + 0x20] CMP EAX,R12D CMOVG R12D,EAX CMP R12D,0x2 PUSH 0x1 POP RAX CMOVL R12D,EAX MOV EAX,0x270f CMP R12D,EAX CMOVGE R12D,EAX MOV EAX,dword ptr [RSP + 0x24] CMP EAX,R15D CMOVL R15D,EAX JL 0x00104d36 MOV RAX,qword ptr [RSP + 0x38] CMP dword ptr [RAX],0x270f JNZ 0x00104d84 MOVSXD RCX,R15D IMUL RCX,RCX,0xc CMP dword ptr [RAX + RCX*0x1 + -0xc],R12D MOV R15,RBX JZ 0x00104c76 JMP 0x00104d1a LAB_00104bed: MOV EBP,R15D LEA EAX,[R12 + -0x1] IMUL EAX,R12D CDQ PUSH -0x2 POP RCX IDIV ECX ADD EAX,0x2fadcf8 CVTSI2SS XMM0,EAX MULSS XMM0,dword ptr [RSP + 0x14] CALL 0x00102120 CVTTSS2SI ECX,XMM0 XOR EAX,EAX XOR EDX,EDX LAB_00104c1b: ADD EDX,EAX ADD EDX,0x270f DEC EAX CMP EDX,ECX JL 0x00104c1b MOV ECX,EAX NEG ECX PUSH 0x1 POP RDX SUB EDX,EAX LEA R12D,[RAX + 0x2710] CMP EAX,0xffffd8f1 MOV EAX,0x0 CMOVZ R12D,EAX CMOVNZ EDX,ECX CMP EDX,R15D JNZ 0x00104d50 MOV RAX,qword ptr [RSP + 0x38] CMP dword ptr [RAX],0x270f JNZ 0x00104d76 MOV R15,RBX IMUL RCX,RBP,0xc CMP dword ptr [RAX + RCX*0x1 + -0xc],R12D JNZ 0x00104daf LAB_00104c76: INC R13 JMP 0x00104ab5 LAB_00104c7e: MOV RAX,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RAX] CVTSS2SD XMM0,dword ptr [RSP + 0x14] CVTSS2SD XMM1,dword ptr [RSP + 0x10] LEA RDI,[0x10650c] MOV EDX,0x2710 MOV ECX,dword ptr [RSP + 0x18] MOV AL,0x2 CALL 0x00102030 LEA RDI,[RSP + 0x38] CALL 0x0010523e ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET default: CMP EBP,0x79 JNZ 0x00104cd8 LEA RDX,[0x10644c] MOV ESI,0xc2 JMP 0x00104cf2 caseD_6c: LEA RDX,[0x10648a] MOV ESI,0xc6 JMP 0x00104cf2 caseD_74: LEA RDX,[0x106469] MOV ESI,0xc5 LAB_00104cf2: LEA RDI,[0x1062a4] XOR EAX,EAX CALL 0x00102250 LAB_00104d00: LEA RDI,[0x1062a4] LEA RDX,[0x106500] MOV ESI,0xfb XOR EAX,EAX CALL 0x00102250 LAB_00104d1a: MOV ESI,0xf9 LEA RAX,[0x1064d1] JMP 0x00104d90 LAB_00104d28: MOV ESI,0xd4 LEA RAX,[0x1064b0] JMP 0x00104d49 LAB_00104d36: MOV ESI,0xf7 JMP 0x00104d95 LAB_00104d3d: MOV ESI,0xd5 LEA RAX,[0x1064d1] LAB_00104d49: MOV qword ptr [RSP + 0x8],RAX JMP 0x00104d5c LAB_00104d50: MOV ESI,0xea JMP 0x00104dc0 LAB_00104d57: MOV ESI,0xd3 LAB_00104d5c: LEA RDI,[0x1062a4] LEA RDX,[0x106337] MOV RCX,qword ptr [RSP + 0x8] XOR EAX,EAX CALL 0x00102250 LAB_00104d76: MOV ESI,0xeb LEA RAX,[0x1064b0] JMP 0x00104dbb LAB_00104d84: MOV ESI,0xf8 LEA RAX,[0x1064b0] LAB_00104d90: MOV qword ptr [RSP + 0x8],RAX LAB_00104d95: LEA RDI,[0x1062a4] LEA RDX,[0x106337] MOV RCX,qword ptr [RSP + 0x8] XOR EAX,EAX CALL 0x00102250 LAB_00104daf: MOV ESI,0xec LEA RAX,[0x1064d1] LAB_00104dbb: MOV qword ptr [RSP + 0x8],RAX LAB_00104dc0: LEA RDI,[0x1062a4] LEA RDX,[0x106337] MOV RCX,qword ptr [RSP + 0x8] XOR EAX,EAX CALL 0x00102250 LAB_00104dda: JMP 0x00104de4 LAB_00104de4: MOV RBX,RAX LEA RDI,[RSP + 0x38] CALL 0x0010523e MOV RDI,RBX CALL 0x00102270
/* test_sampler_queue(unsigned long, std::__cxx11::string const&, int, float, float) */ void test_sampler_queue(ulong param_1,string *param_2,int param_3,float param_4,float param_5) { char cVar1; int iVar2; int iVar3; char *pcVar4; llama_sampler *plVar5; int iVar6; char *pcVar7; int iVar8; ulong uVar9; int8 uVar10; int iVar11; int iVar12; float fVar13; float fVar14; char *local_b0; int *local_80; ulong local_78; sampler_tester::sampler_tester((sampler_tester *)&local_80,10000); pcVar7 = *(char **)param_1; pcVar4 = pcVar7 + *(long *)(param_1 + 8); fVar13 = ceilf((DAT_001060f0 - param_5) * DAT_00106150); iVar2 = (int)fVar13; if (iVar2 < 2) { iVar2 = 1; } fVar13 = floorf(DAT_00106150 * param_5); iVar8 = (int)param_2; local_b0 = "size == expected_size"; iVar11 = 0; do { if (pcVar7 == pcVar4) { printf("Sampler queue %3s OK with n_vocab=%05zu top_k=%05d top_p=%f min_p=%f\n", (double)param_4,(double)param_5,*(int8 *)param_1,10000, (ulong)param_2 & 0xffffffff); sampler_tester::~sampler_tester((sampler_tester *)&local_80); return; } cVar1 = *pcVar7; switch(cVar1) { case 'k': /* try { // try from 00104ada to 00104b1f has its CatchHandler @ 00104de4 */ plVar5 = (llama_sampler *)llama_sampler_init_top_k(iVar8); break; case 'l': case 'n': case 'o': case 'q': case 'r': case 's': switchD_00104ad8_caseD_6c: pcVar7 = "Unknown sampler"; uVar10 = 0xc6; goto LAB_00104cf2; case 'm': plVar5 = (llama_sampler *)llama_sampler_init_min_p(param_5,1); break; case 'p': plVar5 = (llama_sampler *)llama_sampler_init_top_p(param_4,1); break; case 't': pcVar7 = "temperature test not implemented"; uVar10 = 0xc5; goto LAB_00104cf2; default: if (cVar1 != 'y') goto switchD_00104ad8_caseD_6c; pcVar7 = "typical test not implemented"; uVar10 = 0xc2; LAB_00104cf2: /* try { // try from 00104cf2 to 00104cff has its CatchHandler @ 00104dde */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/tests/test-sampling.cpp" ,uVar10,pcVar7); goto LAB_00104d00; } sampler_tester::apply((sampler_tester *)&local_80,plVar5); plVar5 = (llama_sampler *)llama_sampler_init_dist(0); sampler_tester::apply((sampler_tester *)&local_80,plVar5); iVar12 = (int)local_78; if (cVar1 != 'p') { if (cVar1 == 'm') { iVar11 = 10000 - iVar12; if (10000 - iVar12 < (int)fVar13) { iVar11 = (int)fVar13; } if (iVar11 < 2) { iVar11 = 1; } if (0x270e < iVar11) { iVar11 = 9999; } if (iVar2 < iVar12) { uVar10 = 0xf7; } else { if (*local_80 == 9999) { if (local_80[(long)iVar12 * 3 + -3] == iVar11) goto LAB_00104c76; goto LAB_00104d1a; } uVar10 = 0xf8; local_b0 = "cur_p.data[0].id == max_token_id"; } } else { if (cVar1 == 'k') { if (iVar11 <= 10000 - iVar8) { iVar11 = 10000 - iVar8; } iVar3 = iVar12; if (iVar8 <= iVar12) { iVar3 = iVar8; } if (iVar8 < iVar12) { uVar10 = 0xd3; } else if (*local_80 == 9999) { if (local_80[(long)iVar3 * 3 + -3] == iVar11) goto LAB_00104c76; uVar10 = 0xd5; local_b0 = "cur_p.data[expected_size-1].id == min_token_id"; } else { uVar10 = 0xd4; local_b0 = "cur_p.data[0].id == max_token_id"; } /* try { // try from 00104d5c to 00104d75 has its CatchHandler @ 00104de0 */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/tests/test-sampling.cpp" ,uVar10,"GGML_ASSERT(%s) failed",local_b0); goto LAB_00104d76; } LAB_00104d00: /* try { // try from 00104d00 to 00104d19 has its CatchHandler @ 00104dda */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/tests/test-sampling.cpp" ,0xfb,"fatal error"); LAB_00104d1a: uVar10 = 0xf9; local_b0 = "cur_p.data[expected_size-1].id == min_token_id"; } /* try { // try from 00104d95 to 00104dae has its CatchHandler @ 00104de2 */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/tests/test-sampling.cpp" ,uVar10,"GGML_ASSERT(%s) failed",local_b0); LAB_00104daf: uVar10 = 0xec; local_b0 = "cur_p.data[expected_size-1].id == min_token_id"; LAB_00104dc0: /* try { // try from 00104dc0 to 00104dd9 has its CatchHandler @ 00104ddc */ uVar10 = ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/tests/test-sampling.cpp" ,uVar10,"GGML_ASSERT(%s) failed",local_b0); /* catch() { ... } // from try @ 00104d00 with catch @ 00104dda */ /* catch() { ... } // from try @ 00104ada with catch @ 00104de4 */ sampler_tester::~sampler_tester((sampler_tester *)&local_80); /* WARNING: Subroutine does not return */ _Unwind_Resume(uVar10); } uVar9 = local_78 & 0xffffffff; fVar14 = ceilf((float)(((iVar11 + -1) * iVar11) / -2 + 0x2fadcf8) * param_4); iVar6 = 0; iVar3 = 0; do { iVar11 = iVar3; iVar6 = iVar6 + iVar11 + 9999; iVar3 = iVar11 + -1; } while (iVar6 < (int)fVar14); iVar6 = -iVar3; iVar11 = iVar11 + 9999; if (iVar3 == -9999) { iVar11 = 0; iVar6 = 1 - iVar3; } if (iVar6 != iVar12) { uVar10 = 0xea; goto LAB_00104dc0; } if (*local_80 != 9999) { LAB_00104d76: uVar10 = 0xeb; local_b0 = "cur_p.data[0].id == max_token_id"; goto LAB_00104dc0; } if (local_80[uVar9 * 3 + -3] != iVar11) goto LAB_00104daf; LAB_00104c76: pcVar7 = pcVar7 + 1; } while( true ); }
29,531
LoraModel::apply(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ggml_tensor*, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, ggml_tensor*>>>, int)
7CodeWizard[P]stablediffusion/lora.hpp
void apply(std::map<std::string, struct ggml_tensor*> model_tensors, int n_threads) { alloc_compute_buffer(model_tensors); auto get_graph = [&]() -> struct ggml_cgraph* { return build_graph(model_tensors); }; GGMLModule::compute(get_graph, n_threads); }
O0
cpp
LoraModel::apply(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ggml_tensor*, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, ggml_tensor*>>>, int): subq $0xa8, %rsp movq %rsi, 0x8(%rsp) movq %rdi, 0xa0(%rsp) movq %rsi, 0x98(%rsp) movl %edx, 0x94(%rsp) movq 0xa0(%rsp), %rax movq %rax, 0x10(%rsp) leaq 0x60(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0x6ee00 movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x6f9d0 jmp 0x6ed60 leaq 0x60(%rsp), %rdi callq 0x412d0 movq 0x8(%rsp), %rax movq 0x10(%rsp), %rcx movq %rcx, 0x40(%rsp) movq %rax, 0x48(%rsp) leaq 0x20(%rsp), %rdi movq %rdi, (%rsp) leaq 0x40(%rsp), %rsi callq 0x6fa50 movq 0x10(%rsp), %rdi movq (%rsp), %rsi movl 0x94(%rsp), %edx xorl %eax, %eax movl %eax, %ecx callq 0x69b30 jmp 0x6edac leaq 0x20(%rsp), %rdi callq 0x66640 addq $0xa8, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) leaq 0x60(%rsp), %rdi callq 0x412d0 jmp 0x6edf0 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) leaq 0x20(%rsp), %rdi callq 0x66640 movq 0x58(%rsp), %rdi callq 0xbd30 nopw (%rax,%rax)
_ZN9LoraModel5applyESt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS6_ESaISt4pairIKS6_S8_EEEi: sub rsp, 0A8h mov [rsp+0A8h+var_A0], rsi mov [rsp+0A8h+var_8], rdi mov [rsp+0A8h+var_10], rsi mov [rsp+0A8h+var_14], edx mov rax, [rsp+0A8h+var_8] mov [rsp+0A8h+var_98], rax lea rdi, [rsp+0A8h+var_48] mov [rsp+0A8h+var_90], rdi call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEC2ERKSE_; std::map<std::string,ggml_tensor *>::map(std::map<std::string,ggml_tensor *> const&) mov rdi, [rsp+0A8h+var_98] mov rsi, [rsp+0A8h+var_90] call _ZN9LoraModel20alloc_compute_bufferESt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS6_ESaISt4pairIKS6_S8_EEE; LoraModel::alloc_compute_buffer(std::map<std::string,ggml_tensor *>) jmp short $+2 loc_6ED60: lea rdi, [rsp+0A8h+var_48] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEED2Ev; std::map<std::string,ggml_tensor *>::~map() mov rax, [rsp+0A8h+var_A0] mov rcx, [rsp+0A8h+var_98] mov [rsp+0A8h+var_68], rcx mov [rsp+0A8h+var_60], rax lea rdi, [rsp+0A8h+var_88] mov [rsp+0A8h+var_A8], rdi lea rsi, [rsp+0A8h+var_68] call _ZNSt8functionIFP11ggml_cgraphvEEC2IRZN9LoraModel5applyESt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessISC_ESaISt4pairIKSC_SE_EEEiEUlvE_vEEOT_; std::function<ggml_cgraph * ()(void)>::function<LoraModel::apply(std::map<std::string,ggml_tensor *>,int)::{lambda(void)#1} &,void>(LoraModel::apply(std::map<std::string,ggml_tensor *>,int)::{lambda(void)#1} &) mov rdi, [rsp+0A8h+var_98] mov rsi, [rsp+0A8h+var_A8] mov edx, [rsp+0A8h+var_14] xor eax, eax mov ecx, eax call _ZN10GGMLModule7computeESt8functionIFP11ggml_cgraphvEEiP11ggml_tensor; GGMLModule::compute(std::function<ggml_cgraph * ()(void)>,int,ggml_tensor *) jmp short $+2 loc_6EDAC: lea rdi, [rsp+0A8h+var_88] call _ZNSt8functionIFP11ggml_cgraphvEED2Ev; std::function<ggml_cgraph * ()(void)>::~function() add rsp, 0A8h retn mov rcx, rax mov eax, edx mov [rsp+arg_50], rcx mov [rsp+arg_4C], eax lea rdi, [rsp+arg_58] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEED2Ev; std::map<std::string,ggml_tensor *>::~map() jmp short loc_6EDF0 mov rcx, rax mov eax, edx mov [rsp+arg_50], rcx mov [rsp+arg_4C], eax lea rdi, [rsp+arg_18] call _ZNSt8functionIFP11ggml_cgraphvEED2Ev; std::function<ggml_cgraph * ()(void)>::~function() loc_6EDF0: mov rdi, [rsp+arg_50] call __Unwind_Resume
std::_Function_base * LoraModel::apply(long long a1, long long a2, unsigned int a3) { int v3; // edx int v4; // ecx int v5; // r8d int v6; // r9d long long (*v8[4])(void); // [rsp+20h] [rbp-88h] BYREF _QWORD v9[4]; // [rsp+40h] [rbp-68h] BYREF _BYTE v10[52]; // [rsp+60h] [rbp-48h] BYREF unsigned int v11; // [rsp+94h] [rbp-14h] long long v12; // [rsp+98h] [rbp-10h] long long v13; // [rsp+A0h] [rbp-8h] v13 = a1; v12 = a2; v11 = a3; std::map<std::string,ggml_tensor *>::map(v10, a2); LoraModel::alloc_compute_buffer(a1, (unsigned int)v10, v3, v4, v5, v6); std::map<std::string,ggml_tensor *>::~map((long long)v10); v9[0] = a1; v9[1] = a2; std::function<ggml_cgraph * ()(void)>::function<LoraModel::apply(std::map<std::string,ggml_tensor *>,int)::{lambda(void)#1} &,void>( v8, v9); GGMLModule::compute(a1, v8, v11, 0LL); return std::function<ggml_cgraph * ()(void)>::~function((std::_Function_base *)v8); }
apply: SUB RSP,0xa8 MOV qword ptr [RSP + 0x8],RSI MOV qword ptr [RSP + 0xa0],RDI MOV qword ptr [RSP + 0x98],RSI MOV dword ptr [RSP + 0x94],EDX MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0x10],RAX LEA RDI,[RSP + 0x60] MOV qword ptr [RSP + 0x18],RDI CALL 0x0016ee00 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x18] LAB_0016ed59: CALL 0x0016f9d0 JMP 0x0016ed60 LAB_0016ed60: LEA RDI,[RSP + 0x60] CALL 0x001412d0 MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x40],RCX MOV qword ptr [RSP + 0x48],RAX LEA RDI,[RSP + 0x20] MOV qword ptr [RSP],RDI LEA RSI,[RSP + 0x40] CALL 0x0016fa50 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP] MOV EDX,dword ptr [RSP + 0x94] LAB_0016eda1: XOR EAX,EAX MOV ECX,EAX CALL 0x00169b30 LAB_0016edaa: JMP 0x0016edac LAB_0016edac: LEA RDI,[RSP + 0x20] CALL 0x00166640 ADD RSP,0xa8 RET
/* LoraModel::apply(std::map<std::__cxx11::string, ggml_tensor*, std::less<std::__cxx11::string >, std::allocator<std::pair<std::__cxx11::string const, ggml_tensor*> > >, int) */ void __thiscall LoraModel::apply(LoraModel *this,map *param_2,int4 param_3) { function<ggml_cgraph*()> local_88 [32]; LoraModel *local_68; map *local_60; map<std::__cxx11::string,ggml_tensor*,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>> local_48 [52]; int4 local_14; map *local_10; LoraModel *local_8; local_14 = param_3; local_10 = param_2; local_8 = this; std:: map<std::__cxx11::string,ggml_tensor*,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>> ::map(local_48,param_2); /* try { // try from 0016ed59 to 0016ed5d has its CatchHandler @ 0016edbe */ alloc_compute_buffer(this,local_48); std:: map<std::__cxx11::string,ggml_tensor*,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>> ::~map(local_48); local_68 = this; local_60 = param_2; std::function<ggml_cgraph*()>:: function<LoraModel::apply(std::map<std::__cxx11::string,ggml_tensor*,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>>,int)::_lambda()_1_&,void> (local_88,(_lambda___1_ *)&local_68); /* try { // try from 0016eda1 to 0016eda9 has its CatchHandler @ 0016edd8 */ GGMLModule::compute((GGMLModule *)this,local_88,local_14,0); std::function<ggml_cgraph*()>::~function(local_88); return; }
29,532
LoraModel::apply(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ggml_tensor*, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, ggml_tensor*>>>, int)
7CodeWizard[P]stablediffusion/lora.hpp
void apply(std::map<std::string, struct ggml_tensor*> model_tensors, int n_threads) { alloc_compute_buffer(model_tensors); auto get_graph = [&]() -> struct ggml_cgraph* { return build_graph(model_tensors); }; GGMLModule::compute(get_graph, n_threads); }
O2
cpp
LoraModel::apply(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ggml_tensor*, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, ggml_tensor*>>>, int): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x58, %rsp movl %edx, %ebx movq %rsi, %r15 movq %rdi, %r14 leaq 0x28(%rsp), %r12 movq %r12, %rdi callq 0x31282 movq %r14, %rdi movq %r12, %rsi callq 0x308c4 leaq 0x28(%rsp), %rdi callq 0x25e24 leaq 0x8(%rsp), %rsi movq %r14, (%rsi) movq %r15, 0x8(%rsi) leaq 0xc90(%rip), %rax # 0x311d8 movq %rax, 0x18(%rsi) leaq 0xc8b(%rip), %rax # 0x311de movq %rax, 0x10(%rsi) movq %r14, %rdi movl %ebx, %edx xorl %ecx, %ecx callq 0x2e91e leaq 0x8(%rsp), %rdi callq 0x3937c addq $0x58, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x3937c jmp 0x30595 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x25e24 movq %rbx, %rdi callq 0xaab0 nop
_ZN9LoraModel5applyESt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS6_ESaISt4pairIKS6_S8_EEEi: push r15 push r14 push r12 push rbx sub rsp, 58h mov ebx, edx mov r15, rsi mov r14, rdi lea r12, [rsp+78h+var_50] mov rdi, r12 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P11ggml_tensorESt10_Select1stISA_ESt4lessIS5_ESaISA_EEC2ERKSG_; std::_Rb_tree<std::string,std::pair<std::string const,ggml_tensor *>,std::_Select1st<std::pair<std::string const,ggml_tensor *>>,std::less<std::string>,std::allocator<std::pair<std::string const,ggml_tensor *>>>::_Rb_tree(std::_Rb_tree<std::string,std::pair<std::string const,ggml_tensor *>,std::_Select1st<std::pair<std::string const,ggml_tensor *>>,std::less<std::string>,std::allocator<std::pair<std::string const,ggml_tensor *>>> const&) mov rdi, r14 mov rsi, r12 call _ZN9LoraModel20alloc_compute_bufferESt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS6_ESaISt4pairIKS6_S8_EEE; LoraModel::alloc_compute_buffer(std::map<std::string,ggml_tensor *>) lea rdi, [rsp+78h+var_50] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P11ggml_tensorESt10_Select1stISA_ESt4lessIS5_ESaISA_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ggml_tensor *>,std::_Select1st<std::pair<std::string const,ggml_tensor *>>,std::less<std::string>,std::allocator<std::pair<std::string const,ggml_tensor *>>>::~_Rb_tree() lea rsi, [rsp+78h+var_70] mov [rsi], r14 mov [rsi+8], r15 lea rax, _ZNSt17_Function_handlerIFP11ggml_cgraphvEZN9LoraModel5applyESt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessISA_ESaISt4pairIKSA_SC_EEEiEUlvE_E9_M_invokeERKSt9_Any_data; std::_Function_handler<ggml_cgraph * ()(void),LoraModel::apply(std::map<std::string,ggml_tensor *>,int)::{lambda(void)#1}>::_M_invoke(std::_Any_data const&) mov [rsi+18h], rax lea rax, _ZNSt17_Function_handlerIFP11ggml_cgraphvEZN9LoraModel5applyESt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessISA_ESaISt4pairIKSA_SC_EEEiEUlvE_E10_M_managerERSt9_Any_dataRKSM_St18_Manager_operation; std::_Function_handler<ggml_cgraph * ()(void),LoraModel::apply(std::map<std::string,ggml_tensor *>,int)::{lambda(void)#1}>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsi+10h], rax mov rdi, r14 mov edx, ebx xor ecx, ecx call _ZN10GGMLModule7computeESt8functionIFP11ggml_cgraphvEEiP11ggml_tensor; GGMLModule::compute(std::function<ggml_cgraph * ()(void)>,int,ggml_tensor *) lea rdi, [rsp+78h+var_70]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() add rsp, 58h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_0]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() jmp short loc_30595 mov rbx, rax lea rdi, [rsp+arg_20] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P11ggml_tensorESt10_Select1stISA_ESt4lessIS5_ESaISA_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ggml_tensor *>,std::_Select1st<std::pair<std::string const,ggml_tensor *>>,std::less<std::string>,std::allocator<std::pair<std::string const,ggml_tensor *>>>::~_Rb_tree() loc_30595: mov rdi, rbx call __Unwind_Resume
void LoraModel::apply(long long a1, long long a2, unsigned int a3) { _QWORD v4[4]; // [rsp+8h] [rbp-70h] BYREF _BYTE v5[80]; // [rsp+28h] [rbp-50h] BYREF std::_Rb_tree<std::string,std::pair<std::string const,ggml_tensor *>,std::_Select1st<std::pair<std::string const,ggml_tensor *>>,std::less<std::string>,std::allocator<std::pair<std::string const,ggml_tensor *>>>::_Rb_tree( v5, a2); LoraModel::alloc_compute_buffer(a1, v5); std::_Rb_tree<std::string,std::pair<std::string const,ggml_tensor *>,std::_Select1st<std::pair<std::string const,ggml_tensor *>>,std::less<std::string>,std::allocator<std::pair<std::string const,ggml_tensor *>>>::~_Rb_tree((long long)v5); v4[0] = a1; v4[1] = a2; v4[3] = std::_Function_handler<ggml_cgraph * ()(void),LoraModel::apply(std::map<std::string,ggml_tensor *>,int)::{lambda(void)#1}>::_M_invoke; v4[2] = std::_Function_handler<ggml_cgraph * ()(void),LoraModel::apply(std::map<std::string,ggml_tensor *>,int)::{lambda(void)#1}>::_M_manager; GGMLModule::compute(a1, (long long)v4, a3, 0LL); std::_Function_base::~_Function_base((std::_Function_base *)v4); }
apply: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x58 MOV EBX,EDX MOV R15,RSI MOV R14,RDI LEA R12,[RSP + 0x28] MOV RDI,R12 CALL 0x00131282 LAB_00130520: MOV RDI,R14 MOV RSI,R12 CALL 0x001308c4 LEA RDI,[RSP + 0x28] CALL 0x00125e24 LEA RSI,[RSP + 0x8] MOV qword ptr [RSI],R14 MOV qword ptr [RSI + 0x8],R15 LEA RAX,[0x1311d8] MOV qword ptr [RSI + 0x18],RAX LEA RAX,[0x1311de] MOV qword ptr [RSI + 0x10],RAX LAB_00130557: MOV RDI,R14 MOV EDX,EBX XOR ECX,ECX CALL 0x0012e91e LAB_00130563: LEA RDI,[RSP + 0x8] CALL 0x0013937c ADD RSP,0x58 POP RBX POP R12 POP R14 POP R15 RET
/* LoraModel::apply(std::map<std::__cxx11::string, ggml_tensor*, std::less<std::__cxx11::string >, std::allocator<std::pair<std::__cxx11::string const, ggml_tensor*> > >, int) */ void __thiscall LoraModel::apply(LoraModel *this,_Rb_tree *param_2,int4 param_3) { LoraModel *local_70; _Rb_tree *local_68; code *local_60; code *local_58; _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,ggml_tensor*>,std::_Select1st<std::pair<std::__cxx11::string_const,ggml_tensor*>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>> local_50 [48]; std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,ggml_tensor*>,std::_Select1st<std::pair<std::__cxx11::string_const,ggml_tensor*>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>> ::_Rb_tree(local_50,param_2); /* try { // try from 00130520 to 0013052a has its CatchHandler @ 00130588 */ alloc_compute_buffer(this,local_50); std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,ggml_tensor*>,std::_Select1st<std::pair<std::__cxx11::string_const,ggml_tensor*>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>> ::~_Rb_tree(local_50); local_58 = std:: _Function_handler<ggml_cgraph*(),LoraModel::apply(std::map<std::__cxx11::string,ggml_tensor*,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>>,int)::{lambda()#1}> ::_M_invoke; local_60 = std:: _Function_handler<ggml_cgraph*(),LoraModel::apply(std::map<std::__cxx11::string,ggml_tensor*,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>>,int)::{lambda()#1}> ::_M_manager; local_70 = this; local_68 = param_2; /* try { // try from 00130557 to 00130562 has its CatchHandler @ 00130579 */ GGMLModule::compute((GGMLModule *)this,&local_70,param_3,0); std::_Function_base::~_Function_base((_Function_base *)&local_70); return; }
29,533
ok
eloqsql/unittest/mytap/tap.c
void ok(int pass, char const *fmt, ...) { va_list ap; va_start(ap, fmt); if (!pass && *g_test.todo == '\0') ++g_test.failed; vemit_tap(pass, fmt, ap); va_end(ap); if (*g_test.todo != '\0') emit_dir("todo", g_test.todo); emit_endl(); }
O0
c
ok: pushq %rbp movq %rsp, %rbp subq $0xe0, %rsp testb %al, %al je 0x26638 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 $0x0, -0x4(%rbp) jne 0x266a0 movsbl 0x361178(%rip), %eax # 0x387804 cmpl $0x0, %eax jne 0x266a0 movl 0x361169(%rip), %eax # 0x387800 addl $0x1, %eax movl %eax, 0x361160(%rip) # 0x387800 movl -0x4(%rbp), %edi movq -0x10(%rbp), %rsi leaq -0x30(%rbp), %rdx callq 0x266f0 leaq -0x30(%rbp), %rax movsbl 0x361149(%rip), %eax # 0x387804 cmpl $0x0, %eax je 0x266d7 leaq 0x54b85(%rip), %rdi # 0x7b24c leaq 0x36112a(%rip), %rsi # 0x3877f8 addq $0xc, %rsi callq 0x267d0 callq 0x26c30 addq $0xe0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ok: push rbp mov rbp, rsp sub rsp, 0E0h test al, al jz short loc_26638 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_26638: 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], 0 jnz short loc_266A0 movsx eax, cs:byte_387804 cmp eax, 0 jnz short loc_266A0 mov eax, cs:dword_387800 add eax, 1 mov cs:dword_387800, eax loc_266A0: mov edi, [rbp+var_4] mov rsi, [rbp+var_10] lea rdx, [rbp+var_30] call vemit_tap lea rax, [rbp+var_30] movsx eax, cs:byte_387804 cmp eax, 0 jz short loc_266D7 lea rdi, aTodo; "todo" lea rsi, g_test add rsi, 0Ch call emit_dir loc_266D7: call emit_endl add rsp, 0E0h pop rbp retn
long long ok(unsigned int a1, long long a2, ...) { va_list va; // [rsp+B0h] [rbp-30h] BYREF long long v4; // [rsp+D0h] [rbp-10h] unsigned int v5; // [rsp+DCh] [rbp-4h] va_start(va, a2); v5 = a1; v4 = a2; if ( !a1 && !byte_387804 ) ++dword_387800; vemit_tap(v5, v4, va); if ( byte_387804 ) emit_dir("todo", &g_test + 3); return emit_endl(); }
ok: PUSH RBP MOV RBP,RSP SUB RSP,0xe0 TEST AL,AL JZ 0x00126638 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_00126638: 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],0x0 JNZ 0x001266a0 MOVSX EAX,byte ptr [0x00487804] CMP EAX,0x0 JNZ 0x001266a0 MOV EAX,dword ptr [0x00487800] ADD EAX,0x1 MOV dword ptr [0x00487800],EAX LAB_001266a0: MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x10] LEA RDX,[RBP + -0x30] CALL 0x001266f0 LEA RAX,[RBP + -0x30] MOVSX EAX,byte ptr [0x00487804] CMP EAX,0x0 JZ 0x001266d7 LEA RDI,[0x17b24c] LEA RSI,[0x4877f8] ADD RSI,0xc CALL 0x001267d0 LAB_001266d7: CALL 0x00126c30 ADD RSP,0xe0 POP RBP RET
void ok(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, int8 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; int8 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; if ((param_9 == 0) && (DAT_00487804 == '\0')) { DAT_00487800 = DAT_00487800 + 1; } local_d8 = param_11; local_d0 = param_12; local_c8 = param_13; local_c0 = param_14; local_18 = param_10; local_c = param_9; vemit_tap(param_9,param_10,&local_38); if (DAT_00487804 != '\0') { emit_dir(&DAT_0017b24c,&DAT_00487804); } emit_endl(); return; }
29,534
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::json_value::json_value(nlohmann::json_abi_v3_11_3::detail::value_t)
monkey531[P]llama/common/json.hpp
json_value(value_t t) { switch (t) { case value_t::object: { object = create<object_t>(); break; } case value_t::array: { array = create<array_t>(); break; } case value_t::string: { string = create<string_t>(""); break; } case value_t::binary: { binary = create<binary_t>(); break; } case value_t::boolean: { boolean = static_cast<boolean_t>(false); break; } case value_t::number_integer: { number_integer = static_cast<number_integer_t>(0); break; } case value_t::number_unsigned: { number_unsigned = static_cast<number_unsigned_t>(0); break; } case value_t::number_float: { number_float = static_cast<number_float_t>(0.0); break; } case value_t::null: { object = nullptr; // silence warning, see #821 break; } case value_t::discarded: default: { object = nullptr; // silence warning, see #821 if (JSON_HEDLEY_UNLIKELY(t == value_t::null)) { JSON_THROW(other_error::create(500, "961c151d2e87f2686a955a9be24d316f1362bf21 3.11.3", nullptr)); // LCOV_EXCL_LINE } break; } } }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::json_value::json_value(nlohmann::json_abi_v3_11_3::detail::value_t): pushq %rbx movq %rdi, %rbx cmpl $0x8, %esi ja 0x66721 movl %esi, %eax leaq 0x8e018(%rip), %rcx # 0xf4730 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq $0x0, (%rbx) jmp 0x66779 movl $0x20, %edi jmp 0x6673b movb $0x0, (%rbx) jmp 0x66779 movl $0x18, %edi callq 0x1b8d0 xorps %xmm0, %xmm0 movups %xmm0, (%rax) movq $0x0, 0x10(%rax) jmp 0x66776 leaq 0x93545(%rip), %rdi # 0xf9c9c callq 0x6677c jmp 0x66776 movl $0x28, %edi callq 0x1b8d0 xorps %xmm0, %xmm0 movups %xmm0, (%rax) movups %xmm0, 0x10(%rax) movb $0x0, 0x20(%rax) movq %rax, (%rbx) popq %rbx retq nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10json_valueC2ENS0_6detail7value_tE: push rbx mov rbx, rdi cmp esi, 8; switch 9 cases ja short def_6671F; jumptable 000000000006671F default case, cases 0,5-7 mov eax, esi lea rcx, jpt_6671F movsxd rax, ds:(jpt_6671F - 0F4730h)[rcx+rax*4] add rax, rcx jmp rax; switch jump def_6671F: mov qword ptr [rbx], 0; jumptable 000000000006671F default case, cases 0,5-7 jmp short loc_66779 loc_6672A: mov edi, 20h ; ' '; jumptable 000000000006671F case 1 jmp short loc_6673B loc_66731: mov byte ptr [rbx], 0; jumptable 000000000006671F case 4 jmp short loc_66779 loc_66736: mov edi, 18h; jumptable 000000000006671F case 2 loc_6673B: call __Znwm; operator new(ulong) xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 mov qword ptr [rax+10h], 0 jmp short loc_66776 loc_66750: lea rdi, aErrorWhileHand_0+34h; jumptable 000000000006671F case 3 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS9_JRA1_KcEEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::string,char const(&)[1]>(char const(&)[1] &&) jmp short loc_66776 loc_6675E: mov edi, 28h ; '('; jumptable 000000000006671F case 8 call __Znwm; operator new(ulong) xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 movups xmmword ptr [rax+10h], xmm0 mov byte ptr [rax+20h], 0 loc_66776: mov [rbx], rax loc_66779: pop rbx retn
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::json_value::json_value( _BYTE *a1, unsigned int a2) { long long result; // rax unsigned long long v4; // rdi result = a2; switch ( a2 ) { case 1u: v4 = 32LL; goto LABEL_6; case 2u: v4 = 24LL; LABEL_6: result = operator new(v4); *(_OWORD *)result = 0LL; *(_QWORD *)(result + 16) = 0LL; goto LABEL_9; case 3u: result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<std::string,char const(&)[1]>(""); goto LABEL_9; case 4u: *a1 = 0; return result; case 8u: result = operator new(0x28uLL); *(_OWORD *)result = 0LL; *(_OWORD *)(result + 16) = 0LL; *(_BYTE *)(result + 32) = 0; LABEL_9: *(_QWORD *)a1 = result; break; default: *(_QWORD *)a1 = 0LL; break; } return result; }
json_value: PUSH RBX MOV RBX,RDI CMP ESI,0x8 JA 0x00166721 MOV EAX,ESI LEA RCX,[0x1f4730] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOV qword ptr [RBX],0x0 JMP 0x00166779 caseD_1: MOV EDI,0x20 JMP 0x0016673b caseD_4: MOV byte ptr [RBX],0x0 JMP 0x00166779 caseD_2: MOV EDI,0x18 LAB_0016673b: CALL 0x0011b8d0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],0x0 JMP 0x00166776 caseD_3: LEA RDI,[0x1f9c9c] CALL 0x0016677c JMP 0x00166776 caseD_8: MOV EDI,0x28 CALL 0x0011b8d0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOVUPS xmmword ptr [RAX + 0x10],XMM0 MOV byte ptr [RAX + 0x20],0x0 LAB_00166776: MOV qword ptr [RBX],RAX LAB_00166779: POP RBX RET
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::json_value::json_value(nlohmann::json_abi_v3_11_3::detail::value_t) */ void __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::json_value::json_value(json_value *this,int4 param_2) { string *psVar1; ulong uVar2; switch(param_2) { default: *(int8 *)this = 0; return; case 1: uVar2 = 0x20; break; case 2: uVar2 = 0x18; break; case 3: psVar1 = create<std::__cxx11::string,char_const(&)[1]>(""); goto LAB_00166776; case 4: *this = (json_value)0x0; return; case 8: psVar1 = (string *)operator_new(0x28); *(int8 *)psVar1 = 0; *(int8 *)(psVar1 + 8) = 0; *(int8 *)(psVar1 + 0x10) = 0; *(int8 *)(psVar1 + 0x18) = 0; psVar1[0x20] = (string)0x0; goto LAB_00166776; } psVar1 = (string *)operator_new(uVar2); *(int8 *)psVar1 = 0; *(int8 *)(psVar1 + 8) = 0; *(int8 *)(psVar1 + 0x10) = 0; LAB_00166776: *(string **)this = psVar1; return; }
29,535
stbi__convert_format16(unsigned short*, int, int, unsigned int, unsigned int)
llama.cpp/examples/llava/../../common/stb_image.h
static stbi__uint16 *stbi__convert_format16(stbi__uint16 *data, int img_n, int req_comp, unsigned int x, unsigned int y) { int i,j; stbi__uint16 *good; if (req_comp == img_n) return data; STBI_ASSERT(req_comp >= 1 && req_comp <= 4); good = (stbi__uint16 *) stbi__malloc(req_comp * x * y * 2); if (good == NULL) { STBI_FREE(data); return (stbi__uint16 *) stbi__errpuc("outofmem", "Out of memory"); } for (j=0; j < (int) y; ++j) { stbi__uint16 *src = data + j * x * img_n ; stbi__uint16 *dest = good + j * x * req_comp; #define STBI__COMBO(a,b) ((a)*8+(b)) #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) // convert source image with img_n components to one with req_comp components; // avoid switch per pixel, so use switch per scanline and massive macros switch (STBI__COMBO(img_n, req_comp)) { STBI__CASE(1,2) { dest[0]=src[0]; dest[1]=0xffff; } break; STBI__CASE(1,3) { dest[0]=dest[1]=dest[2]=src[0]; } break; STBI__CASE(1,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=0xffff; } break; STBI__CASE(2,1) { dest[0]=src[0]; } break; STBI__CASE(2,3) { dest[0]=dest[1]=dest[2]=src[0]; } break; STBI__CASE(2,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=src[1]; } break; STBI__CASE(3,4) { dest[0]=src[0];dest[1]=src[1];dest[2]=src[2];dest[3]=0xffff; } break; STBI__CASE(3,1) { dest[0]=stbi__compute_y_16(src[0],src[1],src[2]); } break; STBI__CASE(3,2) { dest[0]=stbi__compute_y_16(src[0],src[1],src[2]); dest[1] = 0xffff; } break; STBI__CASE(4,1) { dest[0]=stbi__compute_y_16(src[0],src[1],src[2]); } break; STBI__CASE(4,2) { dest[0]=stbi__compute_y_16(src[0],src[1],src[2]); dest[1] = src[3]; } break; STBI__CASE(4,3) { dest[0]=src[0];dest[1]=src[1];dest[2]=src[2]; } break; default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return (stbi__uint16*) stbi__errpuc("unsupported", "Unsupported format conversion"); } #undef STBI__CASE } STBI_FREE(data); return good; }
O3
c
stbi__convert_format16(unsigned short*, int, int, unsigned int, unsigned int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdi, %r14 movq %rsi, 0x10(%rsp) cmpl %esi, %edx jne 0x30420 movq %r14, %rbx jmp 0x307ff movl %r8d, %ebp movl %ecx, %r15d movl %edx, %r12d movl %edx, %eax imull %ecx, %eax movl %eax, 0x1c(%rsp) movl %eax, %edi imull %r8d, %edi addl %edi, %edi callq 0x1dae0 testq %rax, %rax je 0x307db movq %rax, %rbx movq %r12, 0x28(%rsp) testl %ebp, %ebp jle 0x307d1 movq 0x28(%rsp), %rax movq 0x10(%rsp), %rcx leal (%rax,%rcx,8), %eax cmpl $0x23, %eax ja 0x30811 movabsq $0xe161a1c00, %rcx # imm = 0xE161A1C00 btq %rax, %rcx jae 0x30811 leal -0x1(%r15), %ecx movl %ecx, 0xc(%rsp) movl %ebp, %ecx movq %rcx, 0x30(%rsp) movl %r15d, %esi movl %r15d, %ecx imull 0x10(%rsp), %ecx movl %ecx, 0x18(%rsp) leaq 0x4(%rbx), %rcx movq %rcx, 0x20(%rsp) xorl %r9d, %r9d addl $-0xa, %eax movdqa 0x1e179(%rip), %xmm0 # 0x4e630 xorl %r11d, %r11d xorl %edx, %edx leaq 0x1e379(%rip), %r13 # 0x4e83c movl %r9d, %ecx leaq (%r14,%rcx,2), %r10 movl %edx, %ebp imull %r15d, %ebp cmpl $0x18, %eax ja 0x3078a movl %r11d, %edi leaq (%rbx,%rdi,2), %r8 movl %ebp, %ecx imull 0x10(%rsp), %ecx leaq (%r14,%rcx,2), %rcx movslq (%r13,%rax,4), %r12 addq %r13, %r12 jmpq *%r12 cmpl $0x0, 0xc(%rsp) js 0x307b9 xorl %ecx, %ecx movzwl (%r10,%rcx,2), %edi movw %di, (%r8,%rcx,4) movw $0xffff, 0x2(%r8,%rcx,4) # imm = 0xFFFF incq %rcx cmpl %ecx, %esi jne 0x30503 jmp 0x307b9 cmpl $0x0, 0xc(%rsp) js 0x307b9 xorl %ecx, %ecx movzwl (%r10,%rcx,8), %edi movzwl 0x2(%r10,%rcx,8), %ebp movzwl 0x4(%r10,%rcx,8), %r12d imull $0x4d, %edi, %edi imull $0x96, %ebp, %ebp addl %edi, %ebp leal (%r12,%r12,8), %edi leal (%rdi,%rdi,2), %edi addl %r12d, %r12d addl %edi, %r12d addl %ebp, %r12d shrl $0x8, %r12d movw %r12w, (%r8,%rcx,4) movzwl 0x6(%r10,%rcx,8), %edi movw %di, 0x2(%r8,%rcx,4) incq %rcx cmpl %ecx, %esi jne 0x3052e jmp 0x307b9 cmpl $0x0, 0xc(%rsp) js 0x307b9 movq 0x20(%rsp), %rcx leaq (%rcx,%rdi,2), %rcx xorl %edi, %edi movzwl (%r10,%rdi,4), %r8d movw %r8w, (%rcx) movw %r8w, -0x2(%rcx) movw %r8w, -0x4(%rcx) incq %rdi addq $0x6, %rcx cmpl %edi, %esi jne 0x30591 jmp 0x307b9 cmpl $0x0, 0xc(%rsp) js 0x307b9 xorl %ecx, %ecx movd (%r10,%rcx,4), %xmm1 pshuflw $0x40, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,1,4,5,6,7] movq %xmm1, (%r8,%rcx,8) incq %rcx cmpl %ecx, %esi jne 0x305c1 jmp 0x307b9 cmpl $0x0, 0xc(%rsp) js 0x307b9 xorl %ecx, %ecx movzwl (%r10,%rcx,4), %edi movw %di, (%r8,%rcx,2) incq %rcx cmpl %ecx, %esi jne 0x305eb jmp 0x307b9 cmpl $0x0, 0xc(%rsp) js 0x307b9 xorl %ecx, %ecx movdqa %xmm0, %xmm1 pinsrw $0x0, (%r10,%rcx,2), %xmm1 pshuflw $0x40, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,1,4,5,6,7] movq %xmm1, (%r8,%rcx,8) incq %rcx cmpl %ecx, %esi jne 0x3060e jmp 0x307b9 cmpl $0x0, 0xc(%rsp) js 0x307b9 movq 0x20(%rsp), %rcx leaq (%rcx,%rdi,2), %rcx xorl %edi, %edi movzwl (%r10,%rdi,2), %r8d movw %r8w, (%rcx) movw %r8w, -0x2(%rcx) movw %r8w, -0x4(%rcx) incq %rdi addq $0x6, %rcx cmpl %edi, %esi jne 0x30646 jmp 0x307b9 cmpl $0x0, 0xc(%rsp) js 0x307b9 xorl %r10d, %r10d movzwl (%rcx), %edi movzwl 0x2(%rcx), %ebp movzwl 0x4(%rcx), %r12d imull $0x4d, %edi, %edi imull $0x96, %ebp, %ebp addl %edi, %ebp leal (%r12,%r12,8), %edi leal (%rdi,%rdi,2), %edi addl %r12d, %r12d addl %edi, %r12d addl %ebp, %r12d shrl $0x8, %r12d movw %r12w, (%r8,%r10,2) incq %r10 addq $0x6, %rcx cmpl %r10d, %esi jne 0x30677 jmp 0x307b9 cmpl $0x0, 0xc(%rsp) js 0x307b9 xorl %r10d, %r10d movzwl (%rcx), %edi movzwl 0x2(%rcx), %ebp movzwl 0x4(%rcx), %r12d imull $0x4d, %edi, %edi imull $0x96, %ebp, %ebp addl %edi, %ebp leal (%r12,%r12,8), %edi leal (%rdi,%rdi,2), %edi addl %r12d, %r12d addl %edi, %r12d addl %ebp, %r12d shrl $0x8, %r12d movw %r12w, (%r8,%r10,4) movw $0xffff, 0x2(%r8,%r10,4) # imm = 0xFFFF incq %r10 addq $0x6, %rcx cmpl %r10d, %esi jne 0x306c6 jmp 0x307b9 cmpl $0x0, 0xc(%rsp) js 0x307b9 xorl %ecx, %ecx movzwl (%r10,%rcx,8), %edi movzwl 0x2(%r10,%rcx,8), %ebp movzwl 0x4(%r10,%rcx,8), %r12d imull $0x4d, %edi, %edi imull $0x96, %ebp, %ebp addl %edi, %ebp leal (%r12,%r12,8), %edi leal (%rdi,%rdi,2), %edi addl %r12d, %r12d addl %edi, %r12d addl %ebp, %r12d shrl $0x8, %r12d movw %r12w, (%r8,%rcx,2) incq %rcx cmpl %ecx, %esi jne 0x3071c jmp 0x307b9 cmpl $0x0, 0xc(%rsp) js 0x307b9 xorl %edi, %edi movl (%rcx), %r10d movl %r10d, (%r8,%rdi,8) movzwl 0x4(%rcx), %r10d movw %r10w, 0x4(%r8,%rdi,8) movw $0xffff, 0x6(%r8,%rdi,8) # imm = 0xFFFF incq %rdi addq $0x6, %rcx cmpl %edi, %esi jne 0x30763 jmp 0x307b9 cmpl $0x0, 0xc(%rsp) js 0x307b9 imull 0x28(%rsp), %ebp leaq (%rbx,%rbp,2), %rcx xorl %edi, %edi movl (%r10,%rdi,8), %r8d movl %r8d, (%rcx) movzwl 0x4(%r10,%rdi,8), %r8d movw %r8w, 0x4(%rcx) incq %rdi addq $0x6, %rcx cmpl %edi, %esi jne 0x3079c incq %rdx addl 0x1c(%rsp), %r11d addl 0x18(%rsp), %r9d cmpq 0x30(%rsp), %rdx jne 0x304c3 movq %r14, %rdi callq 0x1d840 jmp 0x307ff movq %r14, %rdi callq 0x1d840 leaq 0x2d556(%rip), %rdi # 0x5dd40 callq 0x1e400 leaq 0x1ec93(%rip), %rcx # 0x4f489 movq %rcx, (%rax) xorl %ebx, %ebx movq %rbx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r14, %rdi callq 0x1d840 movq %rbx, %rdi callq 0x1d840 leaq 0x2d518(%rip), %rdi # 0x5dd40 callq 0x1e400 leaq 0x1ec91(%rip), %rcx # 0x4f4c5 jmp 0x307f6
_ZL22stbi__convert_format16Ptiijj: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r14, rdi mov [rsp+68h+var_58], rsi cmp edx, esi jnz short loc_30420 mov rbx, r14 jmp loc_307FF loc_30420: mov ebp, r8d mov r15d, ecx mov r12d, edx mov eax, edx imul eax, ecx mov [rsp+68h+var_4C], eax mov edi, eax imul edi, r8d add edi, edi call _malloc test rax, rax jz loc_307DB mov rbx, rax mov [rsp+68h+var_40], r12 test ebp, ebp jle loc_307D1 mov rax, [rsp+68h+var_40] mov rcx, [rsp+68h+var_58] lea eax, [rax+rcx*8] cmp eax, 23h ; '#' ja loc_30811 mov rcx, 0E161A1C00h bt rcx, rax jnb loc_30811 lea ecx, [r15-1] mov [rsp+68h+var_5C], ecx mov ecx, ebp mov [rsp+68h+var_38], rcx mov esi, r15d mov ecx, r15d imul ecx, dword ptr [rsp+68h+var_58] mov [rsp+68h+var_50], ecx lea rcx, [rbx+4] mov [rsp+68h+var_48], rcx xor r9d, r9d add eax, 0FFFFFFF6h movdqa xmm0, cs:xmmword_4E630 xor r11d, r11d xor edx, edx lea r13, jpt_304F3 loc_304C3: mov ecx, r9d lea r10, [r14+rcx*2] mov ebp, edx imul ebp, r15d cmp eax, 18h; switch 25 cases ja def_304F3; jumptable 00000000000304F3 default case, cases 3-6,8,11-14,17,19-22 mov edi, r11d lea r8, [rbx+rdi*2] mov ecx, ebp imul ecx, dword ptr [rsp+68h+var_58] lea rcx, [r14+rcx*2] movsxd r12, ds:(jpt_304F3 - 4E83Ch)[r13+rax*4] add r12, r13 jmp r12; switch jump loc_304F6: cmp [rsp+68h+var_5C], 0; jumptable 00000000000304F3 case 0 js loc_307B9 xor ecx, ecx loc_30503: movzx edi, word ptr [r10+rcx*2] mov [r8+rcx*4], di mov word ptr [r8+rcx*4+2], 0FFFFh inc rcx cmp esi, ecx jnz short loc_30503 jmp loc_307B9 loc_30521: cmp [rsp+68h+var_5C], 0; jumptable 00000000000304F3 case 24 js loc_307B9 xor ecx, ecx loc_3052E: movzx edi, word ptr [r10+rcx*8] movzx ebp, word ptr [r10+rcx*8+2] movzx r12d, word ptr [r10+rcx*8+4] imul edi, 4Dh ; 'M' imul ebp, 96h add ebp, edi lea edi, [r12+r12*8] lea edi, [rdi+rdi*2] add r12d, r12d add r12d, edi add r12d, ebp shr r12d, 8 mov [r8+rcx*4], r12w movzx edi, word ptr [r10+rcx*8+6] mov [r8+rcx*4+2], di inc rcx cmp esi, ecx jnz short loc_3052E jmp loc_307B9 loc_3057B: cmp [rsp+68h+var_5C], 0; jumptable 00000000000304F3 case 9 js loc_307B9 mov rcx, [rsp+68h+var_48] lea rcx, [rcx+rdi*2] xor edi, edi loc_30591: movzx r8d, word ptr [r10+rdi*4] mov [rcx], r8w mov [rcx-2], r8w mov [rcx-4], r8w inc rdi add rcx, 6 cmp esi, edi jnz short loc_30591 jmp loc_307B9 loc_305B4: cmp [rsp+68h+var_5C], 0; jumptable 00000000000304F3 case 10 js loc_307B9 xor ecx, ecx loc_305C1: movd xmm1, dword ptr [r10+rcx*4] pshuflw xmm1, xmm1, 40h ; '@' movq qword ptr [r8+rcx*8], xmm1 inc rcx cmp esi, ecx jnz short loc_305C1 jmp loc_307B9 loc_305DE: cmp [rsp+68h+var_5C], 0; jumptable 00000000000304F3 case 7 js loc_307B9 xor ecx, ecx loc_305EB: movzx edi, word ptr [r10+rcx*4] mov [r8+rcx*2], di inc rcx cmp esi, ecx jnz short loc_305EB jmp loc_307B9 loc_30601: cmp [rsp+68h+var_5C], 0; jumptable 00000000000304F3 case 2 js loc_307B9 xor ecx, ecx loc_3060E: movdqa xmm1, xmm0 pinsrw xmm1, word ptr [r10+rcx*2], 0 pshuflw xmm1, xmm1, 40h ; '@' movq qword ptr [r8+rcx*8], xmm1 inc rcx cmp esi, ecx jnz short loc_3060E jmp loc_307B9 loc_30630: cmp [rsp+68h+var_5C], 0; jumptable 00000000000304F3 case 1 js loc_307B9 mov rcx, [rsp+68h+var_48] lea rcx, [rcx+rdi*2] xor edi, edi loc_30646: movzx r8d, word ptr [r10+rdi*2] mov [rcx], r8w mov [rcx-2], r8w mov [rcx-4], r8w inc rdi add rcx, 6 cmp esi, edi jnz short loc_30646 jmp loc_307B9 loc_30669: cmp [rsp+68h+var_5C], 0; jumptable 00000000000304F3 case 15 js loc_307B9 xor r10d, r10d loc_30677: movzx edi, word ptr [rcx] movzx ebp, word ptr [rcx+2] movzx r12d, word ptr [rcx+4] imul edi, 4Dh ; 'M' imul ebp, 96h add ebp, edi lea edi, [r12+r12*8] lea edi, [rdi+rdi*2] add r12d, r12d add r12d, edi add r12d, ebp shr r12d, 8 mov [r8+r10*2], r12w inc r10 add rcx, 6 cmp esi, r10d jnz short loc_30677 jmp loc_307B9 loc_306B8: cmp [rsp+68h+var_5C], 0; jumptable 00000000000304F3 case 16 js loc_307B9 xor r10d, r10d loc_306C6: movzx edi, word ptr [rcx] movzx ebp, word ptr [rcx+2] movzx r12d, word ptr [rcx+4] imul edi, 4Dh ; 'M' imul ebp, 96h add ebp, edi lea edi, [r12+r12*8] lea edi, [rdi+rdi*2] add r12d, r12d add r12d, edi add r12d, ebp shr r12d, 8 mov [r8+r10*4], r12w mov word ptr [r8+r10*4+2], 0FFFFh inc r10 add rcx, 6 cmp esi, r10d jnz short loc_306C6 jmp loc_307B9 loc_3070F: cmp [rsp+68h+var_5C], 0; jumptable 00000000000304F3 case 23 js loc_307B9 xor ecx, ecx loc_3071C: movzx edi, word ptr [r10+rcx*8] movzx ebp, word ptr [r10+rcx*8+2] movzx r12d, word ptr [r10+rcx*8+4] imul edi, 4Dh ; 'M' imul ebp, 96h add ebp, edi lea edi, [r12+r12*8] lea edi, [rdi+rdi*2] add r12d, r12d add r12d, edi add r12d, ebp shr r12d, 8 mov [r8+rcx*2], r12w inc rcx cmp esi, ecx jnz short loc_3071C jmp short loc_307B9 loc_3075A: cmp [rsp+68h+var_5C], 0; jumptable 00000000000304F3 case 18 js short loc_307B9 xor edi, edi loc_30763: mov r10d, [rcx] mov [r8+rdi*8], r10d movzx r10d, word ptr [rcx+4] mov [r8+rdi*8+4], r10w mov word ptr [r8+rdi*8+6], 0FFFFh inc rdi add rcx, 6 cmp esi, edi jnz short loc_30763 jmp short loc_307B9 def_304F3: cmp [rsp+68h+var_5C], 0; jumptable 00000000000304F3 default case, cases 3-6,8,11-14,17,19-22 js short loc_307B9 imul ebp, dword ptr [rsp+68h+var_40] lea rcx, [rbx+rbp*2] xor edi, edi loc_3079C: mov r8d, [r10+rdi*8] mov [rcx], r8d movzx r8d, word ptr [r10+rdi*8+4] mov [rcx+4], r8w inc rdi add rcx, 6 cmp esi, edi jnz short loc_3079C loc_307B9: inc rdx add r11d, [rsp+68h+var_4C] add r9d, [rsp+68h+var_50] cmp rdx, [rsp+68h+var_38] jnz loc_304C3 loc_307D1: mov rdi, r14 call _free jmp short loc_307FF loc_307DB: mov rdi, r14 call _free lea rdi, _ZL22stbi__g_failure_reason_tlsind call ___tls_get_addr lea rcx, aOutofmem; "outofmem" loc_307F6: mov [rax+0], rcx xor ebx, ebx loc_307FF: mov rax, rbx add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_30811: mov rdi, r14 call _free mov rdi, rbx call _free lea rdi, _ZL22stbi__g_failure_reason_tlsind call ___tls_get_addr lea rcx, aUnsupported; "unsupported" jmp short loc_307F6
unsigned __int16 * stbi__convert_format16(unsigned __int16 *a1, int a2, int a3, int a4, int a5) { long long v6; // rbx long long v10; // rax unsigned long long v11; // rax long long v12; // rcx int v13; // r9d int v14; // eax __m128i si128; // xmm0 unsigned int v16; // r11d long long v17; // rdx unsigned __int16 *v18; // r10 long long v19; // r8 unsigned __int16 *v20; // rcx long long v21; // rcx long long v22; // rcx unsigned __int16 *v23; // rcx long long v24; // rdi unsigned __int16 v25; // r8 long long v26; // rcx long long v27; // rcx long long v28; // rcx unsigned __int16 *v29; // rcx long long v30; // rdi unsigned __int16 v31; // r8 long long v32; // r10 long long v33; // r10 long long v34; // rcx long long v35; // rdi long long v36; // rcx long long v37; // rdi const char **addr; // rax const char *v39; // rcx int v41; // [rsp+Ch] [rbp-5Ch] int v42; // [rsp+1Ch] [rbp-4Ch] long long v43; // [rsp+20h] [rbp-48h] if ( a3 != a2 ) { v42 = a4 * a3; v10 = malloc((unsigned int)(2 * a5 * a4 * a3)); if ( v10 ) { v6 = v10; if ( a5 <= 0 ) { LABEL_57: free(a1); return (unsigned __int16 *)v6; } v11 = (unsigned int)(a3 + 8 * a2); if ( (unsigned int)v11 <= 0x23 ) { v12 = 0xE161A1C00LL; if ( _bittest64(&v12, v11) ) { v41 = a4 - 1; v43 = v6 + 4; v13 = 0; v14 = v11 - 10; si128 = _mm_load_si128((const __m128i *)&xmmword_4E630); v16 = 0; v17 = 0LL; do { v18 = &a1[v13]; v19 = v6 + 2LL * v16; v20 = &a1[(unsigned int)(a2 * a4 * v17)]; switch ( v14 ) { case 0: if ( v41 >= 0 ) { v21 = 0LL; do { *(_WORD *)(v19 + 4 * v21) = v18[v21]; *(_WORD *)(v19 + 4 * v21++ + 2) = -1; } while ( a4 != (_DWORD)v21 ); } break; case 1: if ( v41 >= 0 ) { v29 = (unsigned __int16 *)(v43 + 2LL * v16); v30 = 0LL; do { v31 = v18[v30]; *v29 = v31; *(v29 - 1) = v31; *(v29 - 2) = v31; ++v30; v29 += 3; } while ( a4 != (_DWORD)v30 ); } break; case 2: if ( v41 >= 0 ) { v28 = 0LL; do { *(_QWORD *)(v19 + 8 * v28) = _mm_shufflelo_epi16(_mm_insert_epi16(si128, v18[v28], 0), 64).m128i_u64[0]; ++v28; } while ( a4 != (_DWORD)v28 ); } break; case 7: if ( v41 >= 0 ) { v27 = 0LL; do { *(_WORD *)(v19 + 2 * v27) = v18[2 * v27]; ++v27; } while ( a4 != (_DWORD)v27 ); } break; case 9: if ( v41 >= 0 ) { v23 = (unsigned __int16 *)(v43 + 2LL * v16); v24 = 0LL; do { v25 = v18[2 * v24]; *v23 = v25; *(v23 - 1) = v25; *(v23 - 2) = v25; ++v24; v23 += 3; } while ( a4 != (_DWORD)v24 ); } break; case 10: if ( v41 >= 0 ) { v26 = 0LL; do { *(_QWORD *)(v19 + 8 * v26) = _mm_shufflelo_epi16(_mm_cvtsi32_si128(*(_DWORD *)&v18[2 * v26]), 64).m128i_u64[0]; ++v26; } while ( a4 != (_DWORD)v26 ); } break; case 15: if ( v41 >= 0 ) { v32 = 0LL; do { *(_WORD *)(v19 + 2 * v32++) = (77 * *v20 + 150 * v20[1] + 29 * (unsigned int)v20[2]) >> 8; v20 += 3; } while ( a4 != (_DWORD)v32 ); } break; case 16: if ( v41 >= 0 ) { v33 = 0LL; do { *(_WORD *)(v19 + 4 * v33) = (77 * *v20 + 150 * v20[1] + 29 * (unsigned int)v20[2]) >> 8; *(_WORD *)(v19 + 4 * v33++ + 2) = -1; v20 += 3; } while ( a4 != (_DWORD)v33 ); } break; case 18: if ( v41 >= 0 ) { v35 = 0LL; do { *(_DWORD *)(v19 + 8 * v35) = *(_DWORD *)v20; *(_WORD *)(v19 + 8 * v35 + 4) = v20[2]; *(_WORD *)(v19 + 8 * v35++ + 6) = -1; v20 += 3; } while ( a4 != (_DWORD)v35 ); } break; case 23: if ( v41 >= 0 ) { v34 = 0LL; do { *(_WORD *)(v19 + 2 * v34) = (77 * v18[4 * v34] + 150 * v18[4 * v34 + 1] + 29 * (unsigned int)v18[4 * v34 + 2]) >> 8; ++v34; } while ( a4 != (_DWORD)v34 ); } break; case 24: if ( v41 >= 0 ) { v22 = 0LL; do { *(_WORD *)(v19 + 4 * v22) = (77 * v18[4 * v22] + 150 * v18[4 * v22 + 1] + 29 * (unsigned int)v18[4 * v22 + 2]) >> 8; *(_WORD *)(v19 + 4 * v22 + 2) = v18[4 * v22 + 3]; ++v22; } while ( a4 != (_DWORD)v22 ); } break; default: if ( v41 >= 0 ) { v36 = v6 + 2LL * (unsigned int)(a3 * a4 * v17); v37 = 0LL; do { *(_DWORD *)v36 = *(_DWORD *)&v18[4 * v37]; *(_WORD *)(v36 + 4) = v18[4 * v37++ + 2]; v36 += 6LL; } while ( a4 != (_DWORD)v37 ); } break; } ++v17; v16 += v42; v13 += a2 * a4; } while ( v17 != a5 ); goto LABEL_57; } } free(a1); free(v6); addr = (const char **)__tls_get_addr(&ZL22stbi__g_failure_reason_tlsind); v39 = "unsupported"; } else { free(a1); addr = (const char **)__tls_get_addr(&ZL22stbi__g_failure_reason_tlsind); v39 = "outofmem"; } *addr = v39; return 0LL; } return a1; }
stbi__convert_format16: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R14,RDI MOV qword ptr [RSP + 0x10],RSI CMP EDX,ESI JNZ 0x00130420 MOV RBX,R14 JMP 0x001307ff LAB_00130420: MOV EBP,R8D MOV R15D,ECX MOV R12D,EDX MOV EAX,EDX IMUL EAX,ECX MOV dword ptr [RSP + 0x1c],EAX MOV EDI,EAX IMUL EDI,R8D ADD EDI,EDI CALL 0x0011dae0 TEST RAX,RAX JZ 0x001307db MOV RBX,RAX MOV qword ptr [RSP + 0x28],R12 TEST EBP,EBP JLE 0x001307d1 MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x10] LEA EAX,[RAX + RCX*0x8] CMP EAX,0x23 JA 0x00130811 MOV RCX,0xe161a1c00 BT RCX,RAX JNC 0x00130811 LEA ECX,[R15 + -0x1] MOV dword ptr [RSP + 0xc],ECX MOV ECX,EBP MOV qword ptr [RSP + 0x30],RCX MOV ESI,R15D MOV ECX,R15D IMUL ECX,dword ptr [RSP + 0x10] MOV dword ptr [RSP + 0x18],ECX LEA RCX,[RBX + 0x4] MOV qword ptr [RSP + 0x20],RCX XOR R9D,R9D ADD EAX,-0xa MOVDQA XMM0,xmmword ptr [0x0014e630] XOR R11D,R11D XOR EDX,EDX LEA R13,[0x14e83c] LAB_001304c3: MOV ECX,R9D LEA R10,[R14 + RCX*0x2] MOV EBP,EDX IMUL EBP,R15D CMP EAX,0x18 JA 0x0013078a MOV EDI,R11D LEA R8,[RBX + RDI*0x2] MOV ECX,EBP IMUL ECX,dword ptr [RSP + 0x10] LEA RCX,[R14 + RCX*0x2] MOVSXD R12,dword ptr [R13 + RAX*0x4] ADD R12,R13 switchD: JMP R12 caseD_a: CMP dword ptr [RSP + 0xc],0x0 JS 0x001307b9 XOR ECX,ECX LAB_00130503: MOVZX EDI,word ptr [R10 + RCX*0x2] MOV word ptr [R8 + RCX*0x4],DI MOV word ptr [R8 + RCX*0x4 + 0x2],0xffff INC RCX CMP ESI,ECX JNZ 0x00130503 JMP 0x001307b9 caseD_22: CMP dword ptr [RSP + 0xc],0x0 JS 0x001307b9 XOR ECX,ECX LAB_0013052e: MOVZX EDI,word ptr [R10 + RCX*0x8] MOVZX EBP,word ptr [R10 + RCX*0x8 + 0x2] MOVZX R12D,word ptr [R10 + RCX*0x8 + 0x4] IMUL EDI,EDI,0x4d IMUL EBP,EBP,0x96 ADD EBP,EDI LEA EDI,[R12 + R12*0x8] LEA EDI,[RDI + RDI*0x2] ADD R12D,R12D ADD R12D,EDI ADD R12D,EBP SHR R12D,0x8 MOV word ptr [R8 + RCX*0x4],R12W MOVZX EDI,word ptr [R10 + RCX*0x8 + 0x6] MOV word ptr [R8 + RCX*0x4 + 0x2],DI INC RCX CMP ESI,ECX JNZ 0x0013052e JMP 0x001307b9 caseD_13: CMP dword ptr [RSP + 0xc],0x0 JS 0x001307b9 MOV RCX,qword ptr [RSP + 0x20] LEA RCX,[RCX + RDI*0x2] XOR EDI,EDI LAB_00130591: MOVZX R8D,word ptr [R10 + RDI*0x4] MOV word ptr [RCX],R8W MOV word ptr [RCX + -0x2],R8W MOV word ptr [RCX + -0x4],R8W INC RDI ADD RCX,0x6 CMP ESI,EDI JNZ 0x00130591 JMP 0x001307b9 caseD_14: CMP dword ptr [RSP + 0xc],0x0 JS 0x001307b9 XOR ECX,ECX LAB_001305c1: MOVD XMM1,dword ptr [R10 + RCX*0x4] PSHUFLW XMM1,XMM1,0x40 MOVQ qword ptr [R8 + RCX*0x8],XMM1 INC RCX CMP ESI,ECX JNZ 0x001305c1 JMP 0x001307b9 caseD_11: CMP dword ptr [RSP + 0xc],0x0 JS 0x001307b9 XOR ECX,ECX LAB_001305eb: MOVZX EDI,word ptr [R10 + RCX*0x4] MOV word ptr [R8 + RCX*0x2],DI INC RCX CMP ESI,ECX JNZ 0x001305eb JMP 0x001307b9 caseD_c: CMP dword ptr [RSP + 0xc],0x0 JS 0x001307b9 XOR ECX,ECX LAB_0013060e: MOVDQA XMM1,XMM0 PINSRW XMM1,word ptr [R10 + RCX*0x2],0x0 PSHUFLW XMM1,XMM1,0x40 MOVQ qword ptr [R8 + RCX*0x8],XMM1 INC RCX CMP ESI,ECX JNZ 0x0013060e JMP 0x001307b9 caseD_b: CMP dword ptr [RSP + 0xc],0x0 JS 0x001307b9 MOV RCX,qword ptr [RSP + 0x20] LEA RCX,[RCX + RDI*0x2] XOR EDI,EDI LAB_00130646: MOVZX R8D,word ptr [R10 + RDI*0x2] MOV word ptr [RCX],R8W MOV word ptr [RCX + -0x2],R8W MOV word ptr [RCX + -0x4],R8W INC RDI ADD RCX,0x6 CMP ESI,EDI JNZ 0x00130646 JMP 0x001307b9 caseD_19: CMP dword ptr [RSP + 0xc],0x0 JS 0x001307b9 XOR R10D,R10D LAB_00130677: MOVZX EDI,word ptr [RCX] MOVZX EBP,word ptr [RCX + 0x2] MOVZX R12D,word ptr [RCX + 0x4] IMUL EDI,EDI,0x4d IMUL EBP,EBP,0x96 ADD EBP,EDI LEA EDI,[R12 + R12*0x8] LEA EDI,[RDI + RDI*0x2] ADD R12D,R12D ADD R12D,EDI ADD R12D,EBP SHR R12D,0x8 MOV word ptr [R8 + R10*0x2],R12W INC R10 ADD RCX,0x6 CMP ESI,R10D JNZ 0x00130677 JMP 0x001307b9 caseD_1a: CMP dword ptr [RSP + 0xc],0x0 JS 0x001307b9 XOR R10D,R10D LAB_001306c6: MOVZX EDI,word ptr [RCX] MOVZX EBP,word ptr [RCX + 0x2] MOVZX R12D,word ptr [RCX + 0x4] IMUL EDI,EDI,0x4d IMUL EBP,EBP,0x96 ADD EBP,EDI LEA EDI,[R12 + R12*0x8] LEA EDI,[RDI + RDI*0x2] ADD R12D,R12D ADD R12D,EDI ADD R12D,EBP SHR R12D,0x8 MOV word ptr [R8 + R10*0x4],R12W MOV word ptr [R8 + R10*0x4 + 0x2],0xffff INC R10 ADD RCX,0x6 CMP ESI,R10D JNZ 0x001306c6 JMP 0x001307b9 caseD_21: CMP dword ptr [RSP + 0xc],0x0 JS 0x001307b9 XOR ECX,ECX LAB_0013071c: MOVZX EDI,word ptr [R10 + RCX*0x8] MOVZX EBP,word ptr [R10 + RCX*0x8 + 0x2] MOVZX R12D,word ptr [R10 + RCX*0x8 + 0x4] IMUL EDI,EDI,0x4d IMUL EBP,EBP,0x96 ADD EBP,EDI LEA EDI,[R12 + R12*0x8] LEA EDI,[RDI + RDI*0x2] ADD R12D,R12D ADD R12D,EDI ADD R12D,EBP SHR R12D,0x8 MOV word ptr [R8 + RCX*0x2],R12W INC RCX CMP ESI,ECX JNZ 0x0013071c JMP 0x001307b9 caseD_1c: CMP dword ptr [RSP + 0xc],0x0 JS 0x001307b9 XOR EDI,EDI LAB_00130763: MOV R10D,dword ptr [RCX] MOV dword ptr [R8 + RDI*0x8],R10D MOVZX R10D,word ptr [RCX + 0x4] MOV word ptr [R8 + RDI*0x8 + 0x4],R10W MOV word ptr [R8 + RDI*0x8 + 0x6],0xffff INC RDI ADD RCX,0x6 CMP ESI,EDI JNZ 0x00130763 JMP 0x001307b9 caseD_d: CMP dword ptr [RSP + 0xc],0x0 JS 0x001307b9 IMUL EBP,dword ptr [RSP + 0x28] LEA RCX,[RBX + RBP*0x2] XOR EDI,EDI LAB_0013079c: MOV R8D,dword ptr [R10 + RDI*0x8] MOV dword ptr [RCX],R8D MOVZX R8D,word ptr [R10 + RDI*0x8 + 0x4] MOV word ptr [RCX + 0x4],R8W INC RDI ADD RCX,0x6 CMP ESI,EDI JNZ 0x0013079c LAB_001307b9: INC RDX ADD R11D,dword ptr [RSP + 0x1c] ADD R9D,dword ptr [RSP + 0x18] CMP RDX,qword ptr [RSP + 0x30] JNZ 0x001304c3 LAB_001307d1: MOV RDI,R14 CALL 0x0011d840 JMP 0x001307ff LAB_001307db: MOV RDI,R14 CALL 0x0011d840 LEA RDI,[0x15dd40] CALL 0x0011e400 LEA RCX,[0x14f489] LAB_001307f6: MOV qword ptr [RAX],RCX XOR EBX,EBX LAB_001307ff: MOV RAX,RBX ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00130811: MOV RDI,R14 CALL 0x0011d840 MOV RDI,RBX CALL 0x0011d840 LEA RDI,[0x15dd40] CALL 0x0011e400 LEA RCX,[0x14f4c5] JMP 0x001307f6
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* stbi__convert_format16(unsigned short*, int, int, unsigned int, unsigned int) */ ushort * stbi__convert_format16(ushort *param_1,int param_2,int param_3,uint param_4,uint param_5) { int iVar1; ushort uVar2; ulong uVar3; int8 uVar4; uint uVar5; ushort *__ptr; int8 *puVar6; ushort *puVar7; char *pcVar8; ulong uVar9; int iVar10; long lVar11; ulong uVar12; ulong uVar13; int1 auVar14 [16]; if (param_3 == param_2) { return param_1; } __ptr = (ushort *)malloc((ulong)(param_3 * param_4 * param_5 * 2)); uVar4 = _UNK_0014e638; uVar3 = ram0x0014e630; if (__ptr == (ushort *)0x0) { free(param_1); puVar6 = (int8 *)__tls_get_addr(&PTR_0015dd40); pcVar8 = "outofmem"; LAB_001307f6: *puVar6 = pcVar8; __ptr = (ushort *)0x0; } else { if (0 < (int)param_5) { uVar5 = param_3 + param_2 * 8; if ((0x23 < uVar5) || ((0xe161a1c00U >> ((ulong)uVar5 & 0x3f) & 1) == 0)) { free(param_1); free(__ptr); puVar6 = (int8 *)__tls_get_addr(&PTR_0015dd40); pcVar8 = "unsupported"; goto LAB_001307f6; } iVar1 = param_4 - 1; uVar12 = 0; uVar13 = 0; uVar9 = 0; do { iVar10 = (int)uVar9 * param_4; if (uVar5 - 10 < 0x19) { puVar7 = param_1 + (uint)(iVar10 * param_2); switch(uVar5) { case 10: if (-1 < iVar1) { lVar11 = 0; do { __ptr[uVar13 + lVar11 * 2] = param_1[uVar12 + lVar11]; __ptr[uVar13 + lVar11 * 2 + 1] = 0xffff; lVar11 = lVar11 + 1; } while (param_4 != (uint)lVar11); } break; case 0xb: if (-1 < iVar1) { puVar7 = __ptr + uVar13 + 2; lVar11 = 0; do { uVar2 = param_1[uVar12 + lVar11]; *puVar7 = uVar2; puVar7[-1] = uVar2; puVar7[-2] = uVar2; lVar11 = lVar11 + 1; puVar7 = puVar7 + 3; } while (param_4 != (uint)lVar11); } break; case 0xc: if (-1 < iVar1) { lVar11 = 0; do { auVar14._8_8_ = uVar4; auVar14._0_8_ = uVar3 & 0xffffffffffff0000 | (ulong)param_1[uVar12 + lVar11]; auVar14 = pshuflw(auVar14,auVar14,0x40); *(long *)(__ptr + uVar13 + lVar11 * 4) = auVar14._0_8_; lVar11 = lVar11 + 1; } while (param_4 != (uint)lVar11); } break; default: goto switchD_001304f3_caseD_d; case 0x11: if (-1 < iVar1) { lVar11 = 0; do { __ptr[uVar13 + lVar11] = param_1[uVar12 + lVar11 * 2]; lVar11 = lVar11 + 1; } while (param_4 != (uint)lVar11); } break; case 0x13: if (-1 < iVar1) { puVar7 = __ptr + uVar13 + 2; lVar11 = 0; do { uVar2 = param_1[uVar12 + lVar11 * 2]; *puVar7 = uVar2; puVar7[-1] = uVar2; puVar7[-2] = uVar2; lVar11 = lVar11 + 1; puVar7 = puVar7 + 3; } while (param_4 != (uint)lVar11); } break; case 0x14: if (-1 < iVar1) { lVar11 = 0; do { auVar14 = pshuflw(ZEXT416(*(uint *)(param_1 + uVar12 + lVar11 * 2)), ZEXT416(*(uint *)(param_1 + uVar12 + lVar11 * 2)),0x40); *(long *)(__ptr + uVar13 + lVar11 * 4) = auVar14._0_8_; lVar11 = lVar11 + 1; } while (param_4 != (uint)lVar11); } break; case 0x19: if (-1 < iVar1) { lVar11 = 0; do { uVar2 = puVar7[2]; __ptr[uVar13 + lVar11] = (ushort)((uint)uVar2 * 2 + ((uint)uVar2 + (uint)uVar2 * 8) * 3 + (uint)puVar7[1] * 0x96 + (uint)*puVar7 * 0x4d >> 8); lVar11 = lVar11 + 1; puVar7 = puVar7 + 3; } while (param_4 != (uint)lVar11); } break; case 0x1a: if (-1 < iVar1) { lVar11 = 0; do { uVar2 = puVar7[2]; __ptr[uVar13 + lVar11 * 2] = (ushort)((uint)uVar2 * 2 + ((uint)uVar2 + (uint)uVar2 * 8) * 3 + (uint)puVar7[1] * 0x96 + (uint)*puVar7 * 0x4d >> 8); __ptr[uVar13 + lVar11 * 2 + 1] = 0xffff; lVar11 = lVar11 + 1; puVar7 = puVar7 + 3; } while (param_4 != (uint)lVar11); } break; case 0x1c: if (-1 < iVar1) { lVar11 = 0; do { *(int4 *)(__ptr + uVar13 + lVar11 * 4) = *(int4 *)puVar7; __ptr[uVar13 + lVar11 * 4 + 2] = puVar7[2]; __ptr[uVar13 + lVar11 * 4 + 3] = 0xffff; lVar11 = lVar11 + 1; puVar7 = puVar7 + 3; } while (param_4 != (uint)lVar11); } break; case 0x21: if (-1 < iVar1) { lVar11 = 0; do { uVar2 = param_1[uVar12 + lVar11 * 4 + 2]; __ptr[uVar13 + lVar11] = (ushort)((uint)uVar2 * 2 + ((uint)uVar2 + (uint)uVar2 * 8) * 3 + (uint)param_1[uVar12 + lVar11 * 4 + 1] * 0x96 + (uint)param_1[uVar12 + lVar11 * 4] * 0x4d >> 8); lVar11 = lVar11 + 1; } while (param_4 != (uint)lVar11); } break; case 0x22: if (-1 < iVar1) { lVar11 = 0; do { uVar2 = param_1[uVar12 + lVar11 * 4 + 2]; __ptr[uVar13 + lVar11 * 2] = (ushort)((uint)uVar2 * 2 + ((uint)uVar2 + (uint)uVar2 * 8) * 3 + (uint)param_1[uVar12 + lVar11 * 4 + 1] * 0x96 + (uint)param_1[uVar12 + lVar11 * 4] * 0x4d >> 8); __ptr[uVar13 + lVar11 * 2 + 1] = param_1[uVar12 + lVar11 * 4 + 3]; lVar11 = lVar11 + 1; } while (param_4 != (uint)lVar11); } } } else { switchD_001304f3_caseD_d: if (-1 < iVar1) { puVar7 = __ptr + (uint)(iVar10 * param_3); lVar11 = 0; do { *(int4 *)puVar7 = *(int4 *)(param_1 + uVar12 + lVar11 * 4); puVar7[2] = param_1[uVar12 + lVar11 * 4 + 2]; lVar11 = lVar11 + 1; puVar7 = puVar7 + 3; } while (param_4 != (uint)lVar11); } } uVar9 = uVar9 + 1; uVar13 = (ulong)((int)uVar13 + param_3 * param_4); uVar12 = (ulong)((int)uVar12 + param_4 * param_2); } while (uVar9 != param_5); } free(param_1); } return __ptr; }
29,536
common_arg::get_value_from_env(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
llama.cpp/common/arg.cpp
bool common_arg::get_value_from_env(std::string & output) { if (env == nullptr) return false; char * value = std::getenv(env); if (value) { output = value; return true; } return false; }
O3
cpp
common_arg::get_value_from_env(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&): movq 0x88(%rdi), %rdi testq %rdi, %rdi je 0x47662 pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx callq 0x21d20 testq %rax, %rax je 0x47665 movq %rax, %r14 movq 0x8(%rbx), %r15 movq %rax, %rdi callq 0x21690 movq %rbx, %rdi xorl %esi, %esi movq %r15, %rdx movq %r14, %rcx movq %rax, %r8 callq 0x21890 movb $0x1, %al jmp 0x47667 xorl %eax, %eax retq xorl %eax, %eax popq %rbx popq %r14 popq %r15 retq nop
_ZN10common_arg18get_value_from_envERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: mov rdi, [rdi+88h] test rdi, rdi jz short loc_47662 push r15 push r14 push rbx mov rbx, rsi call _getenv test rax, rax jz short loc_47665 mov r14, rax mov r15, [rbx+8] mov rdi, rax call _strlen mov rdi, rbx xor esi, esi mov rdx, r15 mov rcx, r14 mov r8, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) mov al, 1 jmp short loc_47667 loc_47662: xor eax, eax retn loc_47665: xor eax, eax loc_47667: pop rbx pop r14 pop r15 retn
char common_arg::get_value_from_env(long long a1, long long a2) { long long v2; // rax long long v3; // r14 long long v4; // r15 long long v5; // rax if ( !*(_QWORD *)(a1 + 136) ) return 0; v2 = getenv(); if ( !v2 ) return 0; v3 = v2; v4 = *(_QWORD *)(a2 + 8); v5 = strlen(v2); std::string::_M_replace(a2, 0LL, v4, v3, v5); return 1; }
get_value_from_env: MOV RDI,qword ptr [RDI + 0x88] TEST RDI,RDI JZ 0x00147662 PUSH R15 PUSH R14 PUSH RBX MOV RBX,RSI CALL 0x00121d20 TEST RAX,RAX JZ 0x00147665 MOV R14,RAX MOV R15,qword ptr [RBX + 0x8] MOV RDI,RAX CALL 0x00121690 MOV RDI,RBX XOR ESI,ESI MOV RDX,R15 MOV RCX,R14 MOV R8,RAX CALL 0x00121890 MOV AL,0x1 JMP 0x00147667 LAB_00147662: XOR EAX,EAX RET LAB_00147665: XOR EAX,EAX LAB_00147667: POP RBX POP R14 POP R15 RET
/* common_arg::get_value_from_env(std::__cxx11::string&) */ bool __thiscall common_arg::get_value_from_env(common_arg *this,string *param_1) { char *pcVar1; char *__s; if (*(char **)(this + 0x88) == (char *)0x0) { return false; } __s = getenv(*(char **)(this + 0x88)); if (__s != (char *)0x0) { pcVar1 = *(char **)(param_1 + 8); strlen(__s); std::__cxx11::string::_M_replace((ulong)param_1,0,pcVar1,(ulong)__s); } return __s != (char *)0x0; }
29,537
ma_mmap_pread
eloqsql/storage/maria/ma_dynrec.c
size_t _ma_mmap_pread(MARIA_HA *info, uchar *Buffer, size_t Count, my_off_t offset, myf MyFlags) { DBUG_PRINT("info", ("maria_read with mmap %d\n", info->dfile.file)); if (info->s->lock_key_trees) mysql_rwlock_rdlock(&info->s->mmap_lock); /* The following test may fail in the following cases: - We failed to remap a memory area (fragmented memory?) - This thread has done some writes, but not yet extended the memory mapped area. */ if (info->s->mmaped_length >= offset + Count) { memcpy(Buffer, info->s->file_map + offset, Count); if (info->s->lock_key_trees) mysql_rwlock_unlock(&info->s->mmap_lock); return 0; } else { if (info->s->lock_key_trees) mysql_rwlock_unlock(&info->s->mmap_lock); return mysql_file_pread(info->dfile.file, Buffer, Count, offset, MyFlags); } }
O3
c
ma_mmap_pread: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %r8, -0x30(%rbp) movq %rcx, %r15 movq %rdx, %rbx movq %rsi, %r12 movq %rdi, %r13 movq (%rdi), %rax cmpb $0x0, 0x7e3(%rax) je 0x3c0d8 leaq 0xb78(%rax), %rdi cmpq $0x0, 0xc08(%rax) jne 0x3c1ae callq 0xa429c movq (%r13), %r14 leaq (%r15,%rbx), %rax cmpq %rax, 0xa00(%r14) jae 0x3c158 cmpb $0x0, 0x7e3(%r14) je 0x3c112 movq 0xc08(%r14), %rdi addq $0xb78, %r14 # imm = 0xB78 testq %rdi, %rdi jne 0x3c235 movq %r14, %rdi callq 0xa43ca movl 0x480(%r13), %r14d leaq 0x349ef0(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0x78(%rbp), %rdi movl %r14d, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x3c1c4 movl %r14d, %edi movq %r12, %rsi movq %rbx, %rdx movq %r15, %rcx movq -0x30(%rbp), %r8 callq 0xa0544 movq %rax, %r15 jmp 0x3c19c addq 0x5f0(%r14), %r15 movq %r12, %rdi movq %r15, %rsi movq %rbx, %rdx callq 0x29080 movq (%r13), %rbx cmpb $0x0, 0x7e3(%rbx) je 0x3c199 movq 0xc08(%rbx), %rdi addq $0xb78, %rbx # imm = 0xB78 testq %rdi, %rdi jne 0x3c24a movq %rbx, %rdi callq 0xa43ca xorl %r15d, %r15d movq %r15, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x9d5a7(%rip), %rsi # 0xd975c movl $0x84, %edx callq 0x2ec50 jmp 0x3c0d8 movq %rax, %r13 leaq 0x349e42(%rip), %rax # 0x386010 movq (%rax), %rax leaq 0x9d584(%rip), %rdx # 0xd975c movq %r13, %rdi movq %rbx, %rsi movl $0x98, %ecx callq *0x210(%rax) movl %r14d, %edi movq %r12, %rsi movq %rbx, %rdx movq %r15, %rcx movq -0x30(%rbp), %r14 movq %r14, %r8 callq 0xa0544 movq %rax, %r15 xorl %esi, %esi testq %rax, %rax cmovneq %rsi, %rbx cmpq $-0x1, %rax cmovneq %rax, %rsi testb $0x6, %r14b cmovneq %rbx, %rsi leaq 0x349dec(%rip), %rax # 0x386010 movq (%rax), %rax movq %r13, %rdi callq *0x218(%rax) jmp 0x3c19c leaq 0x349dd4(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x168(%rax) jmp 0x3c10a leaq 0x349dbf(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x168(%rax) jmp 0x3c191
_ma_mmap_pread: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov [rbp+var_30], r8 mov r15, rcx mov rbx, rdx mov r12, rsi mov r13, rdi mov rax, [rdi] cmp byte ptr [rax+7E3h], 0 jz short loc_3C0D8 lea rdi, [rax+0B78h] cmp qword ptr [rax+0C08h], 0 jnz loc_3C1AE call my_rw_rdlock loc_3C0D8: mov r14, [r13+0] lea rax, [r15+rbx] cmp [r14+0A00h], rax jnb short loc_3C158 cmp byte ptr [r14+7E3h], 0 jz short loc_3C112 mov rdi, [r14+0C08h] add r14, 0B78h test rdi, rdi jnz loc_3C235 loc_3C10A: mov rdi, r14 call my_rw_unlock loc_3C112: mov r14d, [r13+480h] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_78] mov esi, r14d mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz loc_3C1C4 mov edi, r14d mov rsi, r12 mov rdx, rbx mov rcx, r15 mov r8, [rbp+var_30] call my_pread mov r15, rax jmp short loc_3C19C loc_3C158: add r15, [r14+5F0h] mov rdi, r12 mov rsi, r15 mov rdx, rbx call _memcpy mov rbx, [r13+0] cmp byte ptr [rbx+7E3h], 0 jz short loc_3C199 mov rdi, [rbx+0C08h] add rbx, 0B78h test rdi, rdi jnz loc_3C24A loc_3C191: mov rdi, rbx call my_rw_unlock loc_3C199: xor r15d, r15d loc_3C19C: mov rax, r15 add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3C1AE: lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 84h call psi_rwlock_rdlock jmp loc_3C0D8 loc_3C1C4: mov r13, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r13 mov rsi, rbx mov ecx, 98h call qword ptr [rax+210h] mov edi, r14d mov rsi, r12 mov rdx, rbx mov rcx, r15 mov r14, [rbp+var_30] mov r8, r14 call my_pread mov r15, rax xor esi, esi test rax, rax cmovnz rbx, rsi cmp rax, 0FFFFFFFFFFFFFFFFh cmovnz rsi, rax test r14b, 6 cmovnz rsi, rbx lea rax, PSI_server mov rax, [rax] mov rdi, r13 call qword ptr [rax+218h] jmp loc_3C19C loc_3C235: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+168h] jmp loc_3C10A loc_3C24A: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+168h] jmp loc_3C191
long long ma_mmap_pread(_DWORD *a1, long long a2, long long a3, long long a4, long long a5) { long long v8; // rax long long v9; // rdi long long v10; // r14 long long v11; // rdi long long v12; // r14 unsigned int v13; // r14d long long v14; // rax long long v15; // r15 long long v16; // rbx long long v17; // rdi long long v18; // rbx long long v20; // r13 _BYTE v21[72]; // [rsp+8h] [rbp-78h] BYREF long long v22; // [rsp+50h] [rbp-30h] v22 = a5; v8 = *(_QWORD *)a1; if ( *(_BYTE *)(*(_QWORD *)a1 + 2019LL) ) { v9 = v8 + 2936; if ( *(_QWORD *)(v8 + 3080) ) psi_rwlock_rdlock(v9, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c", 0x84u); else my_rw_rdlock(v9); } v10 = *(_QWORD *)a1; if ( *(_QWORD *)(*(_QWORD *)a1 + 2560LL) >= (unsigned long long)(a4 + a3) ) { memcpy(a2, *(_QWORD *)(v10 + 1520) + a4, a3); v16 = *(_QWORD *)a1; if ( *(_BYTE *)(*(_QWORD *)a1 + 2019LL) ) { v17 = *(_QWORD *)(v16 + 3080); v18 = v16 + 2936; if ( v17 ) PSI_server[45](); my_rw_unlock(v18); } return 0LL; } else { if ( *(_BYTE *)(v10 + 2019) ) { v11 = *(_QWORD *)(v10 + 3080); v12 = v10 + 2936; if ( v11 ) PSI_server[45](); my_rw_unlock(v12); } v13 = a1[288]; v14 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v21, v13, 6LL); if ( v14 ) { v20 = v14; ((void ( *)(long long, long long, const char *, long long))PSI_server[66])( v14, a3, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c", 152LL); v15 = my_pread(v13, a2, a3, a4, v22); ((void ( *)(long long))PSI_server[67])(v20); } else { return my_pread(v13, a2, a3, a4, v22); } } return v15; }
_ma_mmap_pread: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV qword ptr [RBP + -0x30],R8 MOV R15,RCX MOV RBX,RDX MOV R12,RSI MOV R13,RDI MOV RAX,qword ptr [RDI] CMP byte ptr [RAX + 0x7e3],0x0 JZ 0x0013c0d8 LEA RDI,[RAX + 0xb78] CMP qword ptr [RAX + 0xc08],0x0 JNZ 0x0013c1ae CALL 0x001a429c LAB_0013c0d8: MOV R14,qword ptr [R13] LEA RAX,[R15 + RBX*0x1] CMP qword ptr [R14 + 0xa00],RAX JNC 0x0013c158 CMP byte ptr [R14 + 0x7e3],0x0 JZ 0x0013c112 MOV RDI,qword ptr [R14 + 0xc08] ADD R14,0xb78 TEST RDI,RDI JNZ 0x0013c235 LAB_0013c10a: MOV RDI,R14 CALL 0x001a43ca LAB_0013c112: MOV R14D,dword ptr [R13 + 0x480] LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x78] MOV ESI,R14D MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0013c1c4 MOV EDI,R14D MOV RSI,R12 MOV RDX,RBX MOV RCX,R15 MOV R8,qword ptr [RBP + -0x30] CALL 0x001a0544 MOV R15,RAX JMP 0x0013c19c LAB_0013c158: ADD R15,qword ptr [R14 + 0x5f0] MOV RDI,R12 MOV RSI,R15 MOV RDX,RBX CALL 0x00129080 MOV RBX,qword ptr [R13] CMP byte ptr [RBX + 0x7e3],0x0 JZ 0x0013c199 MOV RDI,qword ptr [RBX + 0xc08] ADD RBX,0xb78 TEST RDI,RDI JNZ 0x0013c24a LAB_0013c191: MOV RDI,RBX CALL 0x001a43ca LAB_0013c199: XOR R15D,R15D LAB_0013c19c: MOV RAX,R15 ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013c1ae: LEA RSI,[0x1d975c] MOV EDX,0x84 CALL 0x0012ec50 JMP 0x0013c0d8 LAB_0013c1c4: MOV R13,RAX LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDX,[0x1d975c] MOV RDI,R13 MOV RSI,RBX MOV ECX,0x98 CALL qword ptr [RAX + 0x210] MOV EDI,R14D MOV RSI,R12 MOV RDX,RBX MOV RCX,R15 MOV R14,qword ptr [RBP + -0x30] MOV R8,R14 CALL 0x001a0544 MOV R15,RAX XOR ESI,ESI TEST RAX,RAX CMOVNZ RBX,RSI CMP RAX,-0x1 CMOVNZ RSI,RAX TEST R14B,0x6 CMOVNZ RSI,RBX LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] MOV RDI,R13 CALL qword ptr [RAX + 0x218] JMP 0x0013c19c LAB_0013c235: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x168] JMP 0x0013c10a LAB_0013c24a: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x168] JMP 0x0013c191
size_t _ma_mmap_pread(long *param_1,void *param_2,size_t param_3,long param_4,ulong param_5) { int4 uVar1; ulong uVar2; long lVar3; size_t sVar4; size_t sVar5; int1 local_80 [72]; ulong local_38; lVar3 = *param_1; local_38 = param_5; if (*(char *)(lVar3 + 0x7e3) != '\0') { if (*(long *)(lVar3 + 0xc08) == 0) { my_rw_rdlock(); } else { psi_rwlock_rdlock(lVar3 + 0xb78, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c",0x84); } } lVar3 = *param_1; if (*(ulong *)(lVar3 + 0xa00) < param_4 + param_3) { if (*(char *)(lVar3 + 0x7e3) != '\0') { if (*(long *)(lVar3 + 0xc08) != 0) { (**(code **)(PSI_server + 0x168))(); } my_rw_unlock(lVar3 + 0xb78); } uVar1 = (int4)param_1[0x90]; lVar3 = (**(code **)(PSI_server + 0x158))(local_80,uVar1,6); if (lVar3 == 0) { sVar4 = my_pread(uVar1,param_2,param_3,param_4,local_38); } else { (**(code **)(PSI_server + 0x210)) (lVar3,param_3,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c", 0x98); uVar2 = local_38; sVar4 = my_pread(uVar1,param_2,param_3,param_4,local_38); if (sVar4 != 0) { param_3 = 0; } sVar5 = 0; if (sVar4 != 0xffffffffffffffff) { sVar5 = sVar4; } if ((uVar2 & 6) != 0) { sVar5 = param_3; } (**(code **)(PSI_server + 0x218))(lVar3,sVar5); } } else { memcpy(param_2,(void *)(param_4 + *(long *)(lVar3 + 0x5f0)),param_3); lVar3 = *param_1; if (*(char *)(lVar3 + 0x7e3) != '\0') { if (*(long *)(lVar3 + 0xc08) != 0) { (**(code **)(PSI_server + 0x168))(); } my_rw_unlock(lVar3 + 0xb78); } sVar4 = 0; } return sVar4; }
29,538
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [17], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [3]>(char const (&) [17], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char const (&) [3])
monkey531[P]llama/common/json.hpp
inline OutStringType concat(Args && ... args) { OutStringType str; str.reserve(concat_length(args...)); concat_into(str, std::forward<Args>(args)...); return str; }
O2
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [17], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [3]>(char const (&) [17], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char const (&) [3]): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rdi) andq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi movq %rdx, %rsi movq %rcx, %rdx callq 0x99fdf movq %rbx, %rdi movq %rax, %rsi callq 0x27380 movq %rbx, %rdi movq %r12, %rsi movq %r15, %rdx movq %r14, %rcx callq 0x9a006 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %r14 movq %rbx, %rdi callq 0x27998 movq %r14, %rdi callq 0x27660
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_: push r15 push r14 push r12 push rbx push rax mov r14, rcx mov r15, rdx mov r12, rsi mov rbx, rdi lea rax, [rdi+10h] mov [rdi], rax and qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, rsi mov rsi, rdx mov rdx, rcx call _ZN8nlohmann16json_abi_v3_11_36detail13concat_lengthIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA12_cEEEmPKcDpRKT_; nlohmann::json_abi_v3_11_3::detail::concat_length<std::string,char [12]>(char const*,std::string,char [12] const&) mov rdi, rbx mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rdi, rbx mov rsi, r12 mov rdx, r15 mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA6_KcJS8_RA12_S9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSF_OSG_DpOT1_ mov rax, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn mov r14, rax mov rdi, rbx; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( long long a1, long long a2, long long a3, long long a4) { long long v6; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v6 = nlohmann::json_abi_v3_11_3::detail::concat_length<std::string,char [12]>(a2, a3, a4); std::string::reserve(a1, v6); ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA6_KcJS8_RA12_S9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSF_OSG_DpOT1_( a1, a2, a3, a4); return a1; }
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R14,RCX MOV R15,RDX MOV R12,RSI MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX AND qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 LAB_00199f93: MOV RDI,RSI MOV RSI,RDX MOV RDX,RCX CALL 0x00199fdf MOV RDI,RBX MOV RSI,RAX CALL 0x00127380 MOV RDI,RBX MOV RSI,R12 MOV RDX,R15 MOV RCX,R14 CALL 0x0019a006 LAB_00199fbd: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const (&) [6], std::__cxx11::string, char const (&) [12]>(char const (&) [6], std::__cxx11::string&&, char const (&) [12]) */ detail * __thiscall nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]> (detail *this,char *param_1,string *param_2,char *param_3) { *(detail **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (detail)0x0; /* try { // try from 00199f93 to 00199fbc has its CatchHandler @ 00199fcc */ concat_length<std::__cxx11::string,char[12]>(param_1,param_2,param_3); std::__cxx11::string::reserve((ulong)this); _ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA6_KcJS8_RA12_S9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSF_OSG_DpOT1_ (this,param_1,param_2,param_3); return this; }
29,539
my_coll_parser_exec
eloqsql/strings/ctype-uca.c
static int my_coll_parser_exec(MY_COLL_RULE_PARSER *p) { if (!my_coll_parser_scan_settings(p)) return 0; while (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_RESET) { if (!my_coll_parser_scan_rule(p)) return 0; } /* Make sure no unparsed input data left */ return my_coll_parser_scan_term(p, MY_COLL_LEXEM_EOF); }
O0
c
my_coll_parser_exec: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi callq 0x5f5d0 cmpl $0x0, %eax jne 0x5efa3 movl $0x0, -0x4(%rbp) jmp 0x5efda jmp 0x5efa5 movq -0x10(%rbp), %rdi callq 0x5f100 cmpl $0x4, (%rax) jne 0x5efcc movq -0x10(%rbp), %rdi callq 0x5f620 cmpl $0x0, %eax jne 0x5efca movl $0x0, -0x4(%rbp) jmp 0x5efda jmp 0x5efa5 movq -0x10(%rbp), %rdi xorl %esi, %esi callq 0x5f6d0 movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_coll_parser_exec: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_10], rdi mov rdi, [rbp+var_10] call my_coll_parser_scan_settings cmp eax, 0 jnz short loc_5EFA3 mov [rbp+var_4], 0 jmp short loc_5EFDA loc_5EFA3: jmp short $+2 loc_5EFA5: mov rdi, [rbp+var_10] call my_coll_parser_curr cmp dword ptr [rax], 4 jnz short loc_5EFCC mov rdi, [rbp+var_10] call my_coll_parser_scan_rule cmp eax, 0 jnz short loc_5EFCA mov [rbp+var_4], 0 jmp short loc_5EFDA loc_5EFCA: jmp short loc_5EFA5 loc_5EFCC: mov rdi, [rbp+var_10] xor esi, esi call my_coll_parser_scan_term mov [rbp+var_4], eax loc_5EFDA: mov eax, [rbp+var_4] add rsp, 10h pop rbp retn
long long my_coll_parser_exec(long long a1) { if ( (unsigned int)my_coll_parser_scan_settings(a1) ) { while ( *(_DWORD *)my_coll_parser_curr(a1) == 4 ) { if ( !(unsigned int)my_coll_parser_scan_rule(a1) ) return 0; } return (unsigned int)my_coll_parser_scan_term(a1, 0LL); } else { return 0; } }
my_coll_parser_exec: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x10],RDI MOV RDI,qword ptr [RBP + -0x10] CALL 0x0015f5d0 CMP EAX,0x0 JNZ 0x0015efa3 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0015efda LAB_0015efa3: JMP 0x0015efa5 LAB_0015efa5: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0015f100 CMP dword ptr [RAX],0x4 JNZ 0x0015efcc MOV RDI,qword ptr [RBP + -0x10] CALL 0x0015f620 CMP EAX,0x0 JNZ 0x0015efca MOV dword ptr [RBP + -0x4],0x0 JMP 0x0015efda LAB_0015efca: JMP 0x0015efa5 LAB_0015efcc: MOV RDI,qword ptr [RBP + -0x10] XOR ESI,ESI CALL 0x0015f6d0 MOV dword ptr [RBP + -0x4],EAX LAB_0015efda: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x10 POP RBP RET
int4 my_coll_parser_exec(int8 param_1) { int iVar1; int4 uVar2; int *piVar3; iVar1 = my_coll_parser_scan_settings(param_1); while( true ) { if (iVar1 == 0) { return 0; } piVar3 = (int *)my_coll_parser_curr(param_1); if (*piVar3 != 4) break; iVar1 = my_coll_parser_scan_rule(param_1); } uVar2 = my_coll_parser_scan_term(param_1,0); return uVar2; }
29,540
js_async_generator_resolve_or_reject
bluesky950520[P]quickjs/quickjs.c
static void js_async_generator_resolve_or_reject(JSContext *ctx, JSAsyncGeneratorData *s, JSValue result, int is_reject) { JSAsyncGeneratorRequest *next; JSValue ret; next = list_entry(s->queue.next, JSAsyncGeneratorRequest, link); list_del(&next->link); ret = JS_Call(ctx, next->resolving_funcs[is_reject], JS_UNDEFINED, 1, &result); JS_FreeValue(ctx, ret); JS_FreeValue(ctx, next->result); JS_FreeValue(ctx, next->promise); JS_FreeValue(ctx, next->resolving_funcs[0]); JS_FreeValue(ctx, next->resolving_funcs[1]); js_free(ctx, next); }
O3
c
js_async_generator_resolve_or_reject: pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %rbx movq %rdi, %r14 leaq 0x38(%rsp), %rax movq %rdx, (%rax) movq %rcx, 0x8(%rax) movq (%rsi), %rcx movq 0x8(%rsi), %rdx movq %rdx, 0x8(%rcx) movq %rcx, (%rdx) xorps %xmm0, %xmm0 movups %xmm0, (%rsi) movl %r8d, %ecx shlq $0x4, %rcx movq 0x38(%rsi,%rcx), %rsi movq 0x40(%rbx,%rcx), %rdx movl $0x0, 0x28(%rsp) movq $0x3, 0x30(%rsp) movups 0x28(%rsp), %xmm0 movups %xmm0, (%rsp) movq %rax, 0x10(%rsp) movl $0x2, 0x18(%rsp) movl $0x3, %r8d xorl %ecx, %ecx movl $0x1, %r9d callq 0x28b06 movq 0x18(%r14), %rdi cmpl $-0x9, %edx jb 0x58e0a movl (%rax), %ecx leal -0x1(%rcx), %esi movl %esi, (%rax) cmpl $0x1, %ecx jg 0x58e0a movq %rax, %rsi callq 0x219cc movq 0x18(%r14), %rdi movq 0x20(%rbx), %rdx cmpl $-0x9, %edx jb 0x58e2c movq 0x18(%rbx), %rsi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x58e2c callq 0x219cc movq 0x18(%r14), %rdi movq 0x30(%rbx), %rdx cmpl $-0x9, %edx jb 0x58e4e movq 0x28(%rbx), %rsi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x58e4e callq 0x219cc movq 0x18(%r14), %rdi movq 0x40(%rbx), %rdx cmpl $-0x9, %edx jb 0x58e70 movq 0x38(%rbx), %rsi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x58e70 callq 0x219cc movq 0x18(%r14), %rdi movq 0x50(%rbx), %rdx cmpl $-0x9, %edx jb 0x58e8e movq 0x48(%rbx), %rsi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x58e8e callq 0x219cc movq %r14, %rdi movq %rbx, %rsi callq 0x1d481 addq $0x48, %rsp popq %rbx popq %r14 retq
js_async_generator_resolve_or_reject: push r14 push rbx sub rsp, 48h mov rbx, rsi mov r14, rdi lea rax, [rsp+58h+var_20] mov [rax], rdx mov [rax+8], rcx mov rcx, [rsi] mov rdx, [rsi+8] mov [rcx+8], rdx mov [rdx], rcx xorps xmm0, xmm0 movups xmmword ptr [rsi], xmm0 mov ecx, r8d shl rcx, 4 mov rsi, [rsi+rcx+38h] mov rdx, [rbx+rcx+40h] mov dword ptr [rsp+58h+var_30], 0 mov qword ptr [rsp+58h+var_30+8], 3 movups xmm0, [rsp+58h+var_30] movups [rsp+58h+var_58], xmm0 mov [rsp+58h+var_48], rax mov [rsp+58h+var_40], 2 mov r8d, 3 xor ecx, ecx mov r9d, 1 call JS_CallInternal mov rdi, [r14+18h] cmp edx, 0FFFFFFF7h jb short loc_58E0A mov ecx, [rax] lea esi, [rcx-1] mov [rax], esi cmp ecx, 1 jg short loc_58E0A mov rsi, rax call js_free_value_rt mov rdi, [r14+18h] loc_58E0A: mov rdx, [rbx+20h] cmp edx, 0FFFFFFF7h jb short loc_58E2C mov rsi, [rbx+18h] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_58E2C call js_free_value_rt mov rdi, [r14+18h] loc_58E2C: mov rdx, [rbx+30h] cmp edx, 0FFFFFFF7h jb short loc_58E4E mov rsi, [rbx+28h] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_58E4E call js_free_value_rt mov rdi, [r14+18h] loc_58E4E: mov rdx, [rbx+40h] cmp edx, 0FFFFFFF7h jb short loc_58E70 mov rsi, [rbx+38h] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_58E70 call js_free_value_rt mov rdi, [r14+18h] loc_58E70: mov rdx, [rbx+50h] cmp edx, 0FFFFFFF7h jb short loc_58E8E mov rsi, [rbx+48h] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_58E8E call js_free_value_rt loc_58E8E: mov rdi, r14 mov rsi, rbx call js_free add rsp, 48h pop rbx pop r14 retn
long long js_async_generator_resolve_or_reject( long long a1, long long *a2, long long a3, long long a4, unsigned int a5, double a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13) { long long v15; // rcx _QWORD *v16; // rdx _QWORD *v17; // rax unsigned int v18; // edx long long v19; // rdi int v20; // ecx long long v21; // rdx _QWORD *v22; // rsi int v23; // eax long long v24; // rdx _QWORD *v25; // rsi int v26; // eax long long v27; // rdx _QWORD *v28; // rsi int v29; // eax long long v30; // rdx _QWORD *v31; // rsi int v32; // eax __m128i v34; // [rsp+28h] [rbp-30h] _QWORD v35[4]; // [rsp+38h] [rbp-20h] BYREF v35[0] = a3; v35[1] = a4; v15 = *a2; v16 = (_QWORD *)a2[1]; *(_QWORD *)(v15 + 8) = v16; *v16 = v15; *(_OWORD *)a2 = 0LL; v34.m128i_i32[0] = 0; v34.m128i_i64[1] = 3LL; v17 = (_QWORD *)JS_CallInternal( a1, a2[2 * a5 + 7], a2[2 * a5 + 8], 0LL, 3LL, 1LL, v34, a7, a8, a9, a10, a11, a12, a13, v34.m128i_i8[0], 3, (long long)v35, 2u); v19 = *(_QWORD *)(a1 + 24); if ( v18 >= 0xFFFFFFF7 ) { v20 = (*(_DWORD *)v17)--; if ( v20 <= 1 ) { js_free_value_rt(v19, v17, v18); v19 = *(_QWORD *)(a1 + 24); } } v21 = a2[4]; if ( (unsigned int)v21 >= 0xFFFFFFF7 ) { v22 = (_QWORD *)a2[3]; v23 = (*(_DWORD *)v22)--; if ( v23 <= 1 ) { js_free_value_rt(v19, v22, v21); v19 = *(_QWORD *)(a1 + 24); } } v24 = a2[6]; if ( (unsigned int)v24 >= 0xFFFFFFF7 ) { v25 = (_QWORD *)a2[5]; v26 = (*(_DWORD *)v25)--; if ( v26 <= 1 ) { js_free_value_rt(v19, v25, v24); v19 = *(_QWORD *)(a1 + 24); } } v27 = a2[8]; if ( (unsigned int)v27 >= 0xFFFFFFF7 ) { v28 = (_QWORD *)a2[7]; v29 = (*(_DWORD *)v28)--; if ( v29 <= 1 ) { js_free_value_rt(v19, v28, v27); v19 = *(_QWORD *)(a1 + 24); } } v30 = a2[10]; if ( (unsigned int)v30 >= 0xFFFFFFF7 ) { v31 = (_QWORD *)a2[9]; v32 = (*(_DWORD *)v31)--; if ( v32 <= 1 ) js_free_value_rt(v19, v31, v30); } return js_free(a1, (long long)a2); }
js_async_generator_resolve_or_reject: PUSH R14 PUSH RBX SUB RSP,0x48 MOV RBX,RSI MOV R14,RDI LEA RAX,[RSP + 0x38] MOV qword ptr [RAX],RDX MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RSI] MOV RDX,qword ptr [RSI + 0x8] MOV qword ptr [RCX + 0x8],RDX MOV qword ptr [RDX],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI],XMM0 MOV ECX,R8D SHL RCX,0x4 MOV RSI,qword ptr [RSI + RCX*0x1 + 0x38] MOV RDX,qword ptr [RBX + RCX*0x1 + 0x40] MOV dword ptr [RSP + 0x28],0x0 MOV qword ptr [RSP + 0x30],0x3 MOVUPS XMM0,xmmword ptr [RSP + 0x28] MOVUPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x10],RAX MOV dword ptr [RSP + 0x18],0x2 MOV R8D,0x3 XOR ECX,ECX MOV R9D,0x1 CALL 0x00128b06 MOV RDI,qword ptr [R14 + 0x18] CMP EDX,-0x9 JC 0x00158e0a MOV ECX,dword ptr [RAX] LEA ESI,[RCX + -0x1] MOV dword ptr [RAX],ESI CMP ECX,0x1 JG 0x00158e0a MOV RSI,RAX CALL 0x001219cc MOV RDI,qword ptr [R14 + 0x18] LAB_00158e0a: MOV RDX,qword ptr [RBX + 0x20] CMP EDX,-0x9 JC 0x00158e2c MOV RSI,qword ptr [RBX + 0x18] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x00158e2c CALL 0x001219cc MOV RDI,qword ptr [R14 + 0x18] LAB_00158e2c: MOV RDX,qword ptr [RBX + 0x30] CMP EDX,-0x9 JC 0x00158e4e MOV RSI,qword ptr [RBX + 0x28] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x00158e4e CALL 0x001219cc MOV RDI,qword ptr [R14 + 0x18] LAB_00158e4e: MOV RDX,qword ptr [RBX + 0x40] CMP EDX,-0x9 JC 0x00158e70 MOV RSI,qword ptr [RBX + 0x38] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x00158e70 CALL 0x001219cc MOV RDI,qword ptr [R14 + 0x18] LAB_00158e70: MOV RDX,qword ptr [RBX + 0x50] CMP EDX,-0x9 JC 0x00158e8e MOV RSI,qword ptr [RBX + 0x48] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x00158e8e CALL 0x001219cc LAB_00158e8e: MOV RDI,R14 MOV RSI,RBX CALL 0x0011d481 ADD RSP,0x48 POP RBX POP R14 RET
void js_async_generator_resolve_or_reject (long param_1,long *param_2,int8 param_3,int8 param_4,ulong param_5) { int iVar1; long lVar2; long *plVar3; int *piVar4; int8 uVar5; int1 auVar6 [12]; int8 local_20; int8 local_18; lVar2 = *param_2; plVar3 = (long *)param_2[1]; *(long **)(lVar2 + 8) = plVar3; *plVar3 = lVar2; *param_2 = 0; param_2[1] = 0; local_20 = param_3; local_18 = param_4; auVar6 = JS_CallInternal(param_1,param_2[(param_5 & 0xffffffff) * 2 + 7], param_2[(param_5 & 0xffffffff) * 2 + 8],0,3,1,0,3,&local_20,2); piVar4 = auVar6._0_8_; uVar5 = *(int8 *)(param_1 + 0x18); if (0xfffffff6 < auVar6._8_4_) { iVar1 = *piVar4; *piVar4 = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(uVar5,piVar4); uVar5 = *(int8 *)(param_1 + 0x18); } } if (0xfffffff6 < (uint)param_2[4]) { iVar1 = *(int *)param_2[3]; *(int *)param_2[3] = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(uVar5); uVar5 = *(int8 *)(param_1 + 0x18); } } if (0xfffffff6 < (uint)param_2[6]) { iVar1 = *(int *)param_2[5]; *(int *)param_2[5] = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(uVar5); uVar5 = *(int8 *)(param_1 + 0x18); } } if (0xfffffff6 < (uint)param_2[8]) { iVar1 = *(int *)param_2[7]; *(int *)param_2[7] = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(uVar5); uVar5 = *(int8 *)(param_1 + 0x18); } } if (0xfffffff6 < (uint)param_2[10]) { iVar1 = *(int *)param_2[9]; *(int *)param_2[9] = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(uVar5); } } js_free(param_1,param_2); return; }
29,541
multadd
eloqsql/libmariadb/libmariadb/ma_dtoa.c
static Bigint *multadd(Bigint *b, int m, int a, Stack_alloc *alloc) { int i, wds; ULong *x; ULLong carry, y; Bigint *b1; wds= b->wds; x= b->p.x; i= 0; carry= a; do { y= *x * (ULLong)m + carry; carry= y >> 32; *x++= (ULong)(y & FFFFFFFF); } while (++i < wds); if (carry) { if (wds >= b->maxwds) { b1= Balloc(b->k+1, alloc); Bcopy(b1, b); Bfree(b, alloc); b= b1; } b->p.x[wds++]= (ULong) carry; b->wds= wds; } return b; }
O0
c
multadd: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) movq %rcx, -0x18(%rbp) movq -0x8(%rbp), %rax movl 0x14(%rax), %eax movl %eax, -0x20(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movl $0x0, -0x1c(%rbp) movslq -0x10(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax movl (%rax), %eax movslq -0xc(%rbp), %rcx imulq %rcx, %rax addq -0x30(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax shrq $0x20, %rax movq %rax, -0x30(%rbp) movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq -0x38(%rbp), %rax movl %eax, %ecx movq -0x28(%rbp), %rax movq %rax, %rdx addq $0x4, %rdx movq %rdx, -0x28(%rbp) movl %ecx, (%rax) movl -0x1c(%rbp), %eax addl $0x1, %eax movl %eax, -0x1c(%rbp) cmpl -0x20(%rbp), %eax jl 0x34cfa cmpq $0x0, -0x30(%rbp) je 0x34ddb movl -0x20(%rbp), %eax movq -0x8(%rbp), %rcx cmpl 0xc(%rcx), %eax jl 0x34db3 movq -0x8(%rbp), %rax movl 0x8(%rax), %edi addl $0x1, %edi movq -0x18(%rbp), %rsi callq 0x34df0 movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rdi addq $0x10, %rdi movq -0x8(%rbp), %rsi addq $0x10, %rsi movq -0x8(%rbp), %rax movslq 0x14(%rax), %rdx shlq $0x2, %rdx addq $0x8, %rdx callq 0x13360 movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x348f0 movq -0x40(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x30(%rbp), %rax movl %eax, %edx movq -0x8(%rbp), %rax movq (%rax), %rax movl -0x20(%rbp), %ecx movl %ecx, %esi addl $0x1, %esi movl %esi, -0x20(%rbp) movslq %ecx, %rcx movl %edx, (%rax,%rcx,4) movl -0x20(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x14(%rax) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
multadd: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx mov [rbp+var_18], rcx mov rax, [rbp+var_8] mov eax, [rax+14h] mov [rbp+var_20], eax mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_28], rax mov [rbp+var_1C], 0 movsxd rax, [rbp+var_10] mov [rbp+var_30], rax loc_34CFA: mov rax, [rbp+var_28] mov eax, [rax] movsxd rcx, [rbp+var_C] imul rax, rcx add rax, [rbp+var_30] mov [rbp+var_38], rax mov rax, [rbp+var_38] shr rax, 20h mov [rbp+var_30], rax mov rax, 0FFFFFFFFh and rax, [rbp+var_38] mov ecx, eax mov rax, [rbp+var_28] mov rdx, rax add rdx, 4 mov [rbp+var_28], rdx mov [rax], ecx mov eax, [rbp+var_1C] add eax, 1 mov [rbp+var_1C], eax cmp eax, [rbp+var_20] jl short loc_34CFA cmp [rbp+var_30], 0 jz loc_34DDB mov eax, [rbp+var_20] mov rcx, [rbp+var_8] cmp eax, [rcx+0Ch] jl short loc_34DB3 mov rax, [rbp+var_8] mov edi, [rax+8] add edi, 1 mov rsi, [rbp+var_18] call Balloc mov [rbp+var_40], rax mov rdi, [rbp+var_40] add rdi, 10h mov rsi, [rbp+var_8] add rsi, 10h mov rax, [rbp+var_8] movsxd rdx, dword ptr [rax+14h] shl rdx, 2 add rdx, 8 call _memcpy mov rdi, [rbp+var_8] mov rsi, [rbp+var_18] call Bfree mov rax, [rbp+var_40] mov [rbp+var_8], rax loc_34DB3: mov rax, [rbp+var_30] mov edx, eax mov rax, [rbp+var_8] mov rax, [rax] mov ecx, [rbp+var_20] mov esi, ecx add esi, 1 mov [rbp+var_20], esi movsxd rcx, ecx mov [rax+rcx*4], edx mov ecx, [rbp+var_20] mov rax, [rbp+var_8] mov [rax+14h], ecx loc_34DDB: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
unsigned long long multadd(unsigned long long a1, int a2, int a3, unsigned long long *a4) { unsigned int *v4; // rax long long v6; // [rsp+0h] [rbp-40h] unsigned long long v7; // [rsp+8h] [rbp-38h] unsigned long long v8; // [rsp+10h] [rbp-30h] unsigned int *v9; // [rsp+18h] [rbp-28h] int v10; // [rsp+20h] [rbp-20h] int v11; // [rsp+24h] [rbp-1Ch] unsigned long long v13; // [rsp+38h] [rbp-8h] v13 = a1; v10 = *(_DWORD *)(a1 + 20); v9 = *(unsigned int **)a1; v11 = 0; v8 = a3; do { v7 = v8 + a2 * (unsigned long long)*v9; v8 = HIDWORD(v7); v4 = v9++; *v4 = v7; ++v11; } while ( v11 < v10 ); if ( v8 ) { if ( v10 >= *(_DWORD *)(a1 + 12) ) { v6 = Balloc((unsigned int)(*(_DWORD *)(a1 + 8) + 1), a4); memcpy(v6 + 16, a1 + 16, 4LL * *(int *)(a1 + 20) + 8); Bfree(a1, a4); v13 = v6; } *(_DWORD *)(*(_QWORD *)v13 + 4LL * v10) = HIDWORD(v7); *(_DWORD *)(v13 + 20) = v10 + 1; } return v13; }
multadd: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX MOV qword ptr [RBP + -0x18],RCX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x14] MOV dword ptr [RBP + -0x20],EAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOV dword ptr [RBP + -0x1c],0x0 MOVSXD RAX,dword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x30],RAX LAB_00134cfa: MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX] MOVSXD RCX,dword ptr [RBP + -0xc] IMUL RAX,RCX ADD RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] SHR RAX,0x20 MOV qword ptr [RBP + -0x30],RAX MOV RAX,0xffffffff AND RAX,qword ptr [RBP + -0x38] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x28] MOV RDX,RAX ADD RDX,0x4 MOV qword ptr [RBP + -0x28],RDX MOV dword ptr [RAX],ECX MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,0x1 MOV dword ptr [RBP + -0x1c],EAX CMP EAX,dword ptr [RBP + -0x20] JL 0x00134cfa CMP qword ptr [RBP + -0x30],0x0 JZ 0x00134ddb MOV EAX,dword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x8] CMP EAX,dword ptr [RCX + 0xc] JL 0x00134db3 MOV RAX,qword ptr [RBP + -0x8] MOV EDI,dword ptr [RAX + 0x8] ADD EDI,0x1 MOV RSI,qword ptr [RBP + -0x18] CALL 0x00134df0 MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x40] ADD RDI,0x10 MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0x10 MOV RAX,qword ptr [RBP + -0x8] MOVSXD RDX,dword ptr [RAX + 0x14] SHL RDX,0x2 ADD RDX,0x8 CALL 0x00113360 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001348f0 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x8],RAX LAB_00134db3: MOV RAX,qword ptr [RBP + -0x30] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x20] MOV ESI,ECX ADD ESI,0x1 MOV dword ptr [RBP + -0x20],ESI MOVSXD RCX,ECX MOV dword ptr [RAX + RCX*0x4],EDX MOV ECX,dword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x14],ECX LAB_00134ddb: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
long * multadd(long *param_1,int param_2,int param_3,int8 param_4) { int iVar1; ulong uVar2; ulong local_38; uint *local_30; int local_24; long *local_10; iVar1 = *(int *)((long)param_1 + 0x14); local_24 = 0; local_38 = (ulong)param_3; local_30 = (uint *)*param_1; do { uVar2 = (ulong)*local_30 * (long)param_2 + local_38; local_38 = uVar2 >> 0x20; *local_30 = (uint)uVar2; local_24 = local_24 + 1; local_30 = local_30 + 1; } while (local_24 < iVar1); local_10 = param_1; if (local_38 != 0) { if (*(int *)((long)param_1 + 0xc) <= iVar1) { local_10 = (long *)Balloc((int)param_1[1] + 1,param_4); memcpy(local_10 + 2,param_1 + 2,(long)*(int *)((long)param_1 + 0x14) * 4 + 8); Bfree(param_1,param_4); } *(int *)(*local_10 + (long)iVar1 * 4) = (int)(uVar2 >> 0x20); *(int *)((long)local_10 + 0x14) = iVar1 + 1; } return local_10; }
29,542
my_cset_init_8bit
eloqsql/strings/ctype-simple.c
static my_bool my_cset_init_8bit(struct charset_info_st *cs, MY_CHARSET_LOADER *loader) { cs->state|= my_8bit_charset_flags_from_data(cs); cs->caseup_multiply= 1; cs->casedn_multiply= 1; cs->pad_char= ' '; if (!cs->to_lower || !cs->to_upper || !cs->m_ctype || !cs->tab_to_uni) return TRUE; return create_fromuni(cs, loader); }
O0
c
my_cset_init_8bit: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rdi callq 0x47680 movl %eax, %ecx movq -0x10(%rbp), %rax orl 0xc(%rax), %ecx movl %ecx, 0xc(%rax) movq -0x10(%rbp), %rax movb $0x1, 0x94(%rax) movq -0x10(%rbp), %rax movb $0x1, 0x95(%rax) movq -0x10(%rbp), %rax movb $0x20, 0xb0(%rax) movq -0x10(%rbp), %rax cmpq $0x0, 0x48(%rax) je 0x48442 movq -0x10(%rbp), %rax cmpq $0x0, 0x50(%rax) je 0x48442 movq -0x10(%rbp), %rax cmpq $0x0, 0x40(%rax) je 0x48442 movq -0x10(%rbp), %rax cmpq $0x0, 0x68(%rax) jne 0x48448 movb $0x1, -0x1(%rbp) jmp 0x48458 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x48530 movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_cset_init_8bit: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rdi, [rbp+var_10] call my_8bit_charset_flags_from_data mov ecx, eax mov rax, [rbp+var_10] or ecx, [rax+0Ch] mov [rax+0Ch], ecx mov rax, [rbp+var_10] mov byte ptr [rax+94h], 1 mov rax, [rbp+var_10] mov byte ptr [rax+95h], 1 mov rax, [rbp+var_10] mov byte ptr [rax+0B0h], 20h ; ' ' mov rax, [rbp+var_10] cmp qword ptr [rax+48h], 0 jz short loc_48442 mov rax, [rbp+var_10] cmp qword ptr [rax+50h], 0 jz short loc_48442 mov rax, [rbp+var_10] cmp qword ptr [rax+40h], 0 jz short loc_48442 mov rax, [rbp+var_10] cmp qword ptr [rax+68h], 0 jnz short loc_48448 loc_48442: mov [rbp+var_1], 1 jmp short loc_48458 loc_48448: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call create_fromuni mov [rbp+var_1], al loc_48458: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char my_cset_init_8bit(long long a1, long long a2) { *(_DWORD *)(a1 + 12) |= my_8bit_charset_flags_from_data(a1); *(_BYTE *)(a1 + 148) = 1; *(_BYTE *)(a1 + 149) = 1; *(_BYTE *)(a1 + 176) = 32; if ( *(_QWORD *)(a1 + 72) && *(_QWORD *)(a1 + 80) && *(_QWORD *)(a1 + 64) && *(_QWORD *)(a1 + 104) ) return create_fromuni(a1, a2); else return 1; }
my_cset_init_8bit: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RDI,qword ptr [RBP + -0x10] CALL 0x00147680 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] OR ECX,dword ptr [RAX + 0xc] MOV dword ptr [RAX + 0xc],ECX MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x94],0x1 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x95],0x1 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0xb0],0x20 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x48],0x0 JZ 0x00148442 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x50],0x0 JZ 0x00148442 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x40],0x0 JZ 0x00148442 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x68],0x0 JNZ 0x00148448 LAB_00148442: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00148458 LAB_00148448: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00148530 MOV byte ptr [RBP + -0x1],AL LAB_00148458: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 my_cset_init_8bit(long param_1,int8 param_2) { uint uVar1; int1 local_9; uVar1 = my_8bit_charset_flags_from_data(param_1); *(uint *)(param_1 + 0xc) = uVar1 | *(uint *)(param_1 + 0xc); *(int1 *)(param_1 + 0x94) = 1; *(int1 *)(param_1 + 0x95) = 1; *(int1 *)(param_1 + 0xb0) = 0x20; if ((((*(long *)(param_1 + 0x48) == 0) || (*(long *)(param_1 + 0x50) == 0)) || (*(long *)(param_1 + 0x40) == 0)) || (*(long *)(param_1 + 0x68) == 0)) { local_9 = 1; } else { local_9 = create_fromuni(param_1,param_2); } return local_9; }
29,543
js_iterator_helper_mark
bluesky950520[P]quickjs/quickjs.c
static void js_iterator_helper_mark(JSRuntime *rt, JSValue val, JS_MarkFunc *mark_func) { JSObject *p = JS_VALUE_GET_OBJ(val); JSIteratorHelperData *it = p->u.iterator_helper_data; if (it) { JS_MarkValue(rt, it->obj, mark_func); JS_MarkValue(rt, it->func, mark_func); JS_MarkValue(rt, it->next, mark_func); JS_MarkValue(rt, it->inner, mark_func); } }
O3
c
js_iterator_helper_mark: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq 0x30(%rsi), %r14 testq %r14, %r14 je 0x3ba2e movq %rdi, %rbx movl $0xfffffffe, %r15d # imm = 0xFFFFFFFE movl 0x8(%r14), %eax andl $-0x2, %eax cmpl %r15d, %eax movq %rcx, %r12 jne 0x3b9dc movq (%r14), %rsi movq %rbx, %rdi callq *%r12 movq %r12, %rcx movl 0x28(%r14), %eax andl $-0x2, %eax cmpl %r15d, %eax jne 0x3b9f5 movq 0x20(%r14), %rsi movq %rbx, %rdi callq *%r12 movq %r12, %rcx movl 0x18(%r14), %eax andl $-0x2, %eax cmpl %r15d, %eax jne 0x3ba0e movq 0x10(%r14), %rsi movq %rbx, %rdi callq *%r12 movq %r12, %rcx movl 0x38(%r14), %eax andl $-0x2, %eax cmpl %r15d, %eax jne 0x3ba2e movq 0x30(%r14), %rsi movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmpq *%rcx addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
js_iterator_helper_mark: push r15 push r14 push r12 push rbx push rax mov r14, [rsi+30h] test r14, r14 jz short loc_3BA2E mov rbx, rdi mov r15d, 0FFFFFFFEh mov eax, [r14+8] and eax, 0FFFFFFFEh cmp eax, r15d mov r12, rcx jnz short loc_3B9DC mov rsi, [r14] mov rdi, rbx call r12 mov rcx, r12 loc_3B9DC: mov eax, [r14+28h] and eax, 0FFFFFFFEh cmp eax, r15d jnz short loc_3B9F5 mov rsi, [r14+20h] mov rdi, rbx call r12 mov rcx, r12 loc_3B9F5: mov eax, [r14+18h] and eax, 0FFFFFFFEh cmp eax, r15d jnz short loc_3BA0E mov rsi, [r14+10h] mov rdi, rbx call r12 mov rcx, r12 loc_3BA0E: mov eax, [r14+38h] and eax, 0FFFFFFFEh cmp eax, r15d jnz short loc_3BA2E mov rsi, [r14+30h] mov rdi, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp rcx loc_3BA2E: add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long js_iterator_helper_mark(long long a1, long long a2, long long a3, void ( *a4)(_QWORD, _QWORD)) { long long v4; // r14 void ( *v5)(_QWORD, _QWORD); // r12 long long result; // rax v4 = *(_QWORD *)(a2 + 48); if ( v4 ) { v5 = a4; if ( (*(_DWORD *)(v4 + 8) & 0xFFFFFFFE) == 0xFFFFFFFE ) { a4(a1, *(_QWORD *)v4); a4 = v5; } if ( (*(_DWORD *)(v4 + 40) & 0xFFFFFFFE) == 0xFFFFFFFE ) { v5(a1, *(_QWORD *)(v4 + 32)); a4 = v5; } if ( (*(_DWORD *)(v4 + 24) & 0xFFFFFFFE) == 0xFFFFFFFE ) { v5(a1, *(_QWORD *)(v4 + 16)); a4 = v5; } result = *(_DWORD *)(v4 + 56) & 0xFFFFFFFE; if ( (_DWORD)result == -2 ) return ((long long ( *)(long long, _QWORD))a4)(a1, *(_QWORD *)(v4 + 48)); } return result; }
js_iterator_helper_mark: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R14,qword ptr [RSI + 0x30] TEST R14,R14 JZ 0x0013ba2e MOV RBX,RDI MOV R15D,0xfffffffe MOV EAX,dword ptr [R14 + 0x8] AND EAX,0xfffffffe CMP EAX,R15D MOV R12,RCX JNZ 0x0013b9dc MOV RSI,qword ptr [R14] MOV RDI,RBX CALL R12 MOV RCX,R12 LAB_0013b9dc: MOV EAX,dword ptr [R14 + 0x28] AND EAX,0xfffffffe CMP EAX,R15D JNZ 0x0013b9f5 MOV RSI,qword ptr [R14 + 0x20] MOV RDI,RBX CALL R12 MOV RCX,R12 LAB_0013b9f5: MOV EAX,dword ptr [R14 + 0x18] AND EAX,0xfffffffe CMP EAX,R15D JNZ 0x0013ba0e MOV RSI,qword ptr [R14 + 0x10] MOV RDI,RBX CALL R12 MOV RCX,R12 LAB_0013ba0e: MOV EAX,dword ptr [R14 + 0x38] AND EAX,0xfffffffe CMP EAX,R15D JNZ 0x0013ba2e MOV RSI,qword ptr [R14 + 0x30] MOV RDI,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP RCX LAB_0013ba2e: ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
void js_iterator_helper_mark (int8 param_1,long param_2,int8 param_3,code *UNRECOVERED_JUMPTABLE) { int8 *puVar1; int8 extraout_RDX; int8 extraout_RDX_00; int8 extraout_RDX_01; puVar1 = *(int8 **)(param_2 + 0x30); if (puVar1 != (int8 *)0x0) { if ((*(uint *)(puVar1 + 1) & 0xfffffffe) == 0xfffffffe) { (*UNRECOVERED_JUMPTABLE)(param_1,*puVar1); param_3 = extraout_RDX; } if ((*(uint *)(puVar1 + 5) & 0xfffffffe) == 0xfffffffe) { (*UNRECOVERED_JUMPTABLE)(param_1,puVar1[4]); param_3 = extraout_RDX_00; } if ((*(uint *)(puVar1 + 3) & 0xfffffffe) == 0xfffffffe) { (*UNRECOVERED_JUMPTABLE)(param_1,puVar1[2]); param_3 = extraout_RDX_01; } if ((*(uint *)(puVar1 + 7) & 0xfffffffe) == 0xfffffffe) { /* WARNING: Could not recover jumptable at 0x0013ba2c. Too many branches */ /* WARNING: Treating indirect jump as call */ (*UNRECOVERED_JUMPTABLE)(param_1,puVar1[6],param_3,UNRECOVERED_JUMPTABLE); return; } } return; }
29,544
codegen_type_can_convert
tsotchke[P]eshkol/src/backend/codegen/type_conversion.c
bool codegen_type_can_convert(Type* from, Type* to) { assert(from != NULL); assert(to != NULL); // Same type if (type_equals(from, to)) { return true; } // Numeric conversions if ((from->kind == TYPE_INTEGER || from->kind == TYPE_FLOAT) && (to->kind == TYPE_INTEGER || to->kind == TYPE_FLOAT)) { return true; } // Char to int if (from->kind == TYPE_CHAR && to->kind == TYPE_INTEGER) { return true; } // Int to char if (from->kind == TYPE_INTEGER && to->kind == TYPE_CHAR) { return true; } // Any to void* if (to->kind == TYPE_ANY) { return true; } // String to void* (for mixed type conditionals) if (from->kind == TYPE_STRING && to->kind == TYPE_ANY) { return true; } // Numeric to void* (for mixed type conditionals) if ((from->kind == TYPE_INTEGER || from->kind == TYPE_FLOAT) && to->kind == TYPE_ANY) { return true; } return false; }
O0
c
codegen_type_can_convert: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) cmpq $0x0, -0x10(%rbp) je 0x10d59 jmp 0x10d78 leaq 0xab3c(%rip), %rdi # 0x1b89c leaq 0xa9ed(%rip), %rsi # 0x1b754 movl $0x70, %edx leaq 0xab36(%rip), %rcx # 0x1b8a9 callq 0x1120 cmpq $0x0, -0x18(%rbp) je 0x10d81 jmp 0x10da0 leaq 0xab50(%rip), %rdi # 0x1b8d8 leaq 0xa9c5(%rip), %rsi # 0x1b754 movl $0x71, %edx leaq 0xab0e(%rip), %rcx # 0x1b8a9 callq 0x1120 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x150f0 testb $0x1, %al jne 0x10db3 jmp 0x10dbc movb $0x1, -0x1(%rbp) jmp 0x10e62 movq -0x10(%rbp), %rax cmpl $0x2, (%rax) je 0x10dce movq -0x10(%rbp), %rax cmpl $0x3, (%rax) jne 0x10de6 movq -0x18(%rbp), %rax cmpl $0x2, (%rax) je 0x10de0 movq -0x18(%rbp), %rax cmpl $0x3, (%rax) jne 0x10de6 movb $0x1, -0x1(%rbp) jmp 0x10e62 movq -0x10(%rbp), %rax cmpl $0x4, (%rax) jne 0x10dfe movq -0x18(%rbp), %rax cmpl $0x2, (%rax) jne 0x10dfe movb $0x1, -0x1(%rbp) jmp 0x10e62 movq -0x10(%rbp), %rax cmpl $0x2, (%rax) jne 0x10e16 movq -0x18(%rbp), %rax cmpl $0x4, (%rax) jne 0x10e16 movb $0x1, -0x1(%rbp) jmp 0x10e62 movq -0x18(%rbp), %rax cmpl $0xc, (%rax) jne 0x10e25 movb $0x1, -0x1(%rbp) jmp 0x10e62 movq -0x10(%rbp), %rax cmpl $0x5, (%rax) jne 0x10e3d movq -0x18(%rbp), %rax cmpl $0xc, (%rax) jne 0x10e3d movb $0x1, -0x1(%rbp) jmp 0x10e62 movq -0x10(%rbp), %rax cmpl $0x2, (%rax) je 0x10e4f movq -0x10(%rbp), %rax cmpl $0x3, (%rax) jne 0x10e5e movq -0x18(%rbp), %rax cmpl $0xc, (%rax) jne 0x10e5e movb $0x1, -0x1(%rbp) jmp 0x10e62 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x20, %rsp popq %rbp retq nopl (%rax)
codegen_type_can_convert: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi cmp [rbp+var_10], 0 jz short loc_10D59 jmp short loc_10D78 loc_10D59: lea rdi, aFromNull; "from != NULL" lea rsi, aWorkspaceLlm4b_19; "/workspace/llm4binary/github/2025_star3"... mov edx, 70h ; 'p' lea rcx, aBoolCodegenTyp; "_Bool codegen_type_can_convert(Type *, "... call ___assert_fail loc_10D78: cmp [rbp+var_18], 0 jz short loc_10D81 jmp short loc_10DA0 loc_10D81: lea rdi, aToNull; "to != NULL" lea rsi, aWorkspaceLlm4b_19; "/workspace/llm4binary/github/2025_star3"... mov edx, 71h ; 'q' lea rcx, aBoolCodegenTyp; "_Bool codegen_type_can_convert(Type *, "... call ___assert_fail loc_10DA0: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call type_equals test al, 1 jnz short loc_10DB3 jmp short loc_10DBC loc_10DB3: mov [rbp+var_1], 1 jmp loc_10E62 loc_10DBC: mov rax, [rbp+var_10] cmp dword ptr [rax], 2 jz short loc_10DCE mov rax, [rbp+var_10] cmp dword ptr [rax], 3 jnz short loc_10DE6 loc_10DCE: mov rax, [rbp+var_18] cmp dword ptr [rax], 2 jz short loc_10DE0 mov rax, [rbp+var_18] cmp dword ptr [rax], 3 jnz short loc_10DE6 loc_10DE0: mov [rbp+var_1], 1 jmp short loc_10E62 loc_10DE6: mov rax, [rbp+var_10] cmp dword ptr [rax], 4 jnz short loc_10DFE mov rax, [rbp+var_18] cmp dword ptr [rax], 2 jnz short loc_10DFE mov [rbp+var_1], 1 jmp short loc_10E62 loc_10DFE: mov rax, [rbp+var_10] cmp dword ptr [rax], 2 jnz short loc_10E16 mov rax, [rbp+var_18] cmp dword ptr [rax], 4 jnz short loc_10E16 mov [rbp+var_1], 1 jmp short loc_10E62 loc_10E16: mov rax, [rbp+var_18] cmp dword ptr [rax], 0Ch jnz short loc_10E25 mov [rbp+var_1], 1 jmp short loc_10E62 loc_10E25: mov rax, [rbp+var_10] cmp dword ptr [rax], 5 jnz short loc_10E3D mov rax, [rbp+var_18] cmp dword ptr [rax], 0Ch jnz short loc_10E3D mov [rbp+var_1], 1 jmp short loc_10E62 loc_10E3D: mov rax, [rbp+var_10] cmp dword ptr [rax], 2 jz short loc_10E4F mov rax, [rbp+var_10] cmp dword ptr [rax], 3 jnz short loc_10E5E loc_10E4F: mov rax, [rbp+var_18] cmp dword ptr [rax], 0Ch jnz short loc_10E5E mov [rbp+var_1], 1 jmp short loc_10E62 loc_10E5E: mov [rbp+var_1], 0 loc_10E62: mov al, [rbp+var_1] and al, 1 add rsp, 20h pop rbp retn
bool codegen_type_can_convert(_DWORD *a1, _DWORD *a2) { if ( !a1 ) __assert_fail( "from != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/type_conversion.c", 112LL, "_Bool codegen_type_can_convert(Type *, Type *)"); if ( !a2 ) __assert_fail( "to != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/type_conversion.c", 113LL, "_Bool codegen_type_can_convert(Type *, Type *)"); if ( (type_equals(a1, a2) & 1) != 0 ) return 1; if ( (*a1 == 2 || *a1 == 3) && (*a2 == 2 || *a2 == 3) ) return 1; if ( *a1 == 4 && *a2 == 2 ) return 1; if ( *a1 == 2 && *a2 == 4 ) return 1; if ( *a2 == 12 ) return 1; if ( *a1 == 5 && *a2 == 12 ) return 1; return (*a1 == 2 || *a1 == 3) && *a2 == 12; }
codegen_type_can_convert: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI CMP qword ptr [RBP + -0x10],0x0 JZ 0x00110d59 JMP 0x00110d78 LAB_00110d59: LEA RDI,[0x11b89c] LEA RSI,[0x11b754] MOV EDX,0x70 LEA RCX,[0x11b8a9] CALL 0x00101120 LAB_00110d78: CMP qword ptr [RBP + -0x18],0x0 JZ 0x00110d81 JMP 0x00110da0 LAB_00110d81: LEA RDI,[0x11b8d8] LEA RSI,[0x11b754] MOV EDX,0x71 LEA RCX,[0x11b8a9] CALL 0x00101120 LAB_00110da0: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001150f0 TEST AL,0x1 JNZ 0x00110db3 JMP 0x00110dbc LAB_00110db3: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00110e62 LAB_00110dbc: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX],0x2 JZ 0x00110dce MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX],0x3 JNZ 0x00110de6 LAB_00110dce: MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX],0x2 JZ 0x00110de0 MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX],0x3 JNZ 0x00110de6 LAB_00110de0: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00110e62 LAB_00110de6: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX],0x4 JNZ 0x00110dfe MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX],0x2 JNZ 0x00110dfe MOV byte ptr [RBP + -0x1],0x1 JMP 0x00110e62 LAB_00110dfe: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX],0x2 JNZ 0x00110e16 MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX],0x4 JNZ 0x00110e16 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00110e62 LAB_00110e16: MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX],0xc JNZ 0x00110e25 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00110e62 LAB_00110e25: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX],0x5 JNZ 0x00110e3d MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX],0xc JNZ 0x00110e3d MOV byte ptr [RBP + -0x1],0x1 JMP 0x00110e62 LAB_00110e3d: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX],0x2 JZ 0x00110e4f MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX],0x3 JNZ 0x00110e5e LAB_00110e4f: MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX],0xc JNZ 0x00110e5e MOV byte ptr [RBP + -0x1],0x1 JMP 0x00110e62 LAB_00110e5e: MOV byte ptr [RBP + -0x1],0x0 LAB_00110e62: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x20 POP RBP RET
int1 codegen_type_can_convert(int *param_1,int *param_2) { ulong uVar1; int1 local_9; if (param_1 == (int *)0x0) { /* WARNING: Subroutine does not return */ __assert_fail("from != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/type_conversion.c" ,0x70,"_Bool codegen_type_can_convert(Type *, Type *)"); } if (param_2 != (int *)0x0) { uVar1 = type_equals(param_1,param_2); if ((uVar1 & 1) == 0) { if (((*param_1 == 2) || (*param_1 == 3)) && ((*param_2 == 2 || (*param_2 == 3)))) { local_9 = 1; } else if ((*param_1 == 4) && (*param_2 == 2)) { local_9 = 1; } else if ((*param_1 == 2) && (*param_2 == 4)) { local_9 = 1; } else if (*param_2 == 0xc) { local_9 = 1; } else if ((*param_1 == 5) && (*param_2 == 0xc)) { local_9 = 1; } else if (((*param_1 == 2) || (*param_1 == 3)) && (*param_2 == 0xc)) { local_9 = 1; } else { local_9 = 0; } } else { local_9 = 1; } return local_9; } /* WARNING: Subroutine does not return */ __assert_fail("to != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/type_conversion.c" ,0x71,"_Bool codegen_type_can_convert(Type *, Type *)"); }
29,545
minja::Value::to_bool() const
monkey531[P]llama/common/minja.hpp
bool to_bool() const { if (is_null()) return false; if (is_boolean()) return get<bool>(); if (is_number()) return get<double>() != 0; if (is_string()) return !get<std::string>().empty(); if (is_array()) return !empty(); return true; }
O3
cpp
minja::Value::to_bool() const: pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %rsi cmpq $0x0, 0x20(%rdi) movq 0x10(%rdi), %rax movb 0x40(%rdi), %cl jne 0xaa29a testq %rax, %rax jne 0xaa29a testb %cl, %cl jne 0xaa29a cmpq $0x0, 0x30(%rsi) jne 0xaa29a xorl %ebx, %ebx movl %ebx, %eax addq $0x28, %rsp popq %rbx popq %r14 retq cmpb $0x4, %cl jne 0xaa2ae movq %rsi, %rdi addq $0x28, %rsp popq %rbx popq %r14 jmp 0xab3ba leal -0x5(%rcx), %edx cmpb $0x2, %dl ja 0xaa2d1 movq %rsi, %rdi callq 0xaa530 xorpd %xmm1, %xmm1 cmpneqsd %xmm0, %xmm1 movq %xmm1, %rbx andl $0x1, %ebx jmp 0xaa290 cmpb $0x3, %cl jne 0xaa307 leaq 0x8(%rsp), %r14 movq %r14, %rdi callq 0xab4ca cmpq $0x0, 0x8(%r14) setne %bl movq (%r14), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0xaa290 movq 0x18(%rsp), %rsi incq %rsi callq 0x1dc50 jmp 0xaa290 testq %rax, %rax je 0xaa31e movq %rsi, %rdi callq 0xab5d4 movl %eax, %ebx xorb $0x1, %bl jmp 0xaa290 movb $0x1, %bl jmp 0xaa290 nop
_ZNK5minja5Value7to_boolEv: push r14 push rbx sub rsp, 28h mov rsi, rdi cmp qword ptr [rdi+20h], 0 mov rax, [rdi+10h] mov cl, [rdi+40h] jnz short loc_AA29A test rax, rax jnz short loc_AA29A test cl, cl jnz short loc_AA29A cmp qword ptr [rsi+30h], 0 jnz short loc_AA29A xor ebx, ebx loc_AA290: mov eax, ebx add rsp, 28h pop rbx pop r14 retn loc_AA29A: cmp cl, 4 jnz short loc_AA2AE mov rdi, rsi add rsp, 28h pop rbx pop r14 jmp _ZNK5minja5Value3getIbEET_v; minja::Value::get<bool>(void) loc_AA2AE: lea edx, [rcx-5] cmp dl, 2 ja short loc_AA2D1 mov rdi, rsi call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) xorpd xmm1, xmm1 cmpneqsd xmm1, xmm0 movq rbx, xmm1 and ebx, 1 jmp short loc_AA290 loc_AA2D1: cmp cl, 3 jnz short loc_AA307 lea r14, [rsp+38h+var_30] mov rdi, r14 call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void) cmp qword ptr [r14+8], 0 setnz bl mov rdi, [r14]; void * lea rax, [rsp+38h+var_20] cmp rdi, rax jz short loc_AA290 mov rsi, [rsp+38h+var_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_AA290 loc_AA307: test rax, rax jz short loc_AA31E mov rdi, rsi; this call _ZNK5minja5Value5emptyEv; minja::Value::empty(void) mov ebx, eax xor bl, 1 jmp loc_AA290 loc_AA31E: mov bl, 1 jmp loc_AA290
long long minja::Value::to_bool(minja::Value *this) { unsigned int v1; // ebx long long v2; // rax char v3; // cl __m128d v5; // xmm0 void *v6[2]; // [rsp+8h] [rbp-30h] BYREF long long v7; // [rsp+18h] [rbp-20h] BYREF v2 = *((_QWORD *)this + 2); v3 = *((_BYTE *)this + 64); if ( !*((_QWORD *)this + 4) && !v2 && !v3 && !*((_QWORD *)this + 6) ) return 0; if ( v3 != 4 ) { if ( (unsigned __int8)(v3 - 5) > 2u ) { if ( v3 == 3 ) { minja::Value::get<std::string>(v6, this); LOBYTE(v1) = v6[1] != 0LL; if ( v6[0] != &v7 ) operator delete(v6[0], v7 + 1); } else if ( v2 ) { v1 = minja::Value::empty(this); LOBYTE(v1) = v1 ^ 1; } else { LOBYTE(v1) = 1; } } else { v5.m128d_f64[0] = minja::Value::get<double>(this); return *(_OWORD *)&_mm_cmpneq_sd((__m128d)0LL, v5) & 1; } return v1; } return minja::Value::get<bool>(this); }
to_bool: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RSI,RDI CMP qword ptr [RDI + 0x20],0x0 MOV RAX,qword ptr [RDI + 0x10] MOV CL,byte ptr [RDI + 0x40] JNZ 0x001aa29a TEST RAX,RAX JNZ 0x001aa29a TEST CL,CL JNZ 0x001aa29a CMP qword ptr [RSI + 0x30],0x0 JNZ 0x001aa29a XOR EBX,EBX LAB_001aa290: MOV EAX,EBX ADD RSP,0x28 POP RBX POP R14 RET LAB_001aa29a: CMP CL,0x4 JNZ 0x001aa2ae MOV RDI,RSI ADD RSP,0x28 POP RBX POP R14 JMP 0x001ab3ba LAB_001aa2ae: LEA EDX,[RCX + -0x5] CMP DL,0x2 JA 0x001aa2d1 MOV RDI,RSI CALL 0x001aa530 XORPD XMM1,XMM1 CMPNEQSD XMM1,XMM0 MOVQ RBX,XMM1 AND EBX,0x1 JMP 0x001aa290 LAB_001aa2d1: CMP CL,0x3 JNZ 0x001aa307 LEA R14,[RSP + 0x8] MOV RDI,R14 CALL 0x001ab4ca CMP qword ptr [R14 + 0x8],0x0 SETNZ BL MOV RDI,qword ptr [R14] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x001aa290 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011dc50 JMP 0x001aa290 LAB_001aa307: TEST RAX,RAX JZ 0x001aa31e MOV RDI,RSI CALL 0x001ab5d4 MOV EBX,EAX XOR BL,0x1 JMP 0x001aa290 LAB_001aa31e: MOV BL,0x1 JMP 0x001aa290
/* minja::Value::to_bool() const */ byte __thiscall minja::Value::to_bool(Value *this) { Value VVar1; bool bVar2; byte bVar3; double dVar4; long *local_30; long local_28; long local_20 [2]; VVar1 = this[0x40]; if ((((*(long *)(this + 0x20) == 0) && (*(long *)(this + 0x10) == 0)) && (VVar1 == (Value)0x0)) && (*(long *)(this + 0x30) == 0)) { bVar3 = 0; } else { if (VVar1 == (Value)0x4) { bVar2 = get<bool>(this); return bVar2; } if ((byte)((char)VVar1 - 5U) < 3) { dVar4 = get<double>(this); bVar3 = -(dVar4 != 0.0) & 1; } else if (VVar1 == (Value)0x3) { get<std::__cxx11::string>(); bVar3 = local_28 != 0; if (local_30 != local_20) { operator_delete(local_30,local_20[0] + 1); } } else if (*(long *)(this + 0x10) == 0) { bVar3 = 1; } else { bVar3 = empty(this); bVar3 = bVar3 ^ 1; } } return bVar3; }
29,546
MNN::CreatePRelu(flatbuffers::FlatBufferBuilder&, MNN::PReluT const*, std::__1::function<unsigned long (void*)> const*)
mnn-tts/MNN/schema/current/CaffeOp_generated.h
inline flatbuffers::Offset<PRelu> CreatePRelu(flatbuffers::FlatBufferBuilder &_fbb, const PReluT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const PReluT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _slopeCount = _o->slopeCount; auto _slope = _o->slope.size() ? _fbb.CreateVector(_o->slope) : 0; return MNN::CreatePRelu( _fbb, _slopeCount, _slope); }
O0
c
MNN::CreatePRelu(flatbuffers::FlatBufferBuilder&, MNN::PReluT const*, std::__1::function<unsigned long (void*)> const*): subq $0x48, %rsp movq %rdi, 0x38(%rsp) movq %rsi, 0x30(%rsp) movq %rdx, 0x28(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x30(%rsp), %rax movl (%rax), %eax movl %eax, 0xc(%rsp) movq 0x30(%rsp), %rdi addq $0x8, %rdi callq 0xea20 cmpq $0x0, %rax je 0x43349 movq 0x38(%rsp), %rdi movq 0x30(%rsp), %rsi addq $0x8, %rsi callq 0x3b540 movl %eax, 0x8(%rsp) jmp 0x43355 leaq 0x8(%rsp), %rdi xorl %esi, %esi callq 0x3b590 movq 0x38(%rsp), %rdi movl 0xc(%rsp), %esi movl 0x8(%rsp), %eax movl %eax, 0x4(%rsp) movl 0x4(%rsp), %edx callq 0x4fbd0 movl %eax, 0x44(%rsp) movl 0x44(%rsp), %eax addq $0x48, %rsp retq nopl (%rax)
_ZN3MNN11CreatePReluERN11flatbuffers17FlatBufferBuilderEPKNS_6PReluTEPKNSt3__18functionIFmPvEEE: sub rsp, 48h mov [rsp+48h+var_10], rdi mov [rsp+48h+var_18], rsi mov [rsp+48h+var_20], rdx mov rax, [rsp+48h+var_10] mov [rsp+48h+var_38], rax mov rax, [rsp+48h+var_18] mov [rsp+48h+var_30], rax mov rax, [rsp+48h+var_20] mov [rsp+48h+var_28], rax mov rax, [rsp+48h+var_18] mov eax, [rax] mov [rsp+48h+var_3C], eax mov rdi, [rsp+48h+var_18] add rdi, 8 call _ZNKSt3__16vectorIfNS_9allocatorIfEEE4sizeB8nn200100Ev; std::vector<float>::size(void) cmp rax, 0 jz short loc_43349 mov rdi, [rsp+48h+var_10] mov rsi, [rsp+48h+var_18] add rsi, 8 call _ZN11flatbuffers17FlatBufferBuilder12CreateVectorIfEENS_6OffsetINS_6VectorIT_EEEERKNSt3__16vectorIS4_NS7_9allocatorIS4_EEEE; flatbuffers::FlatBufferBuilder::CreateVector<float>(std::vector<float> const&) mov [rsp+48h+var_40], eax jmp short loc_43355 loc_43349: lea rdi, [rsp+48h+var_40] xor esi, esi call _ZN11flatbuffers6OffsetINS_6VectorIfEEEC2Ej; flatbuffers::Offset<flatbuffers::Vector<float>>::Offset(uint) loc_43355: mov rdi, [rsp+48h+var_10] mov esi, [rsp+48h+var_3C] mov eax, [rsp+48h+var_40] mov [rsp+48h+var_44], eax mov edx, [rsp+48h+var_44] call _ZN3MNN11CreatePReluERN11flatbuffers17FlatBufferBuilderEiNS0_6OffsetINS0_6VectorIfEEEE; MNN::CreatePRelu(flatbuffers::FlatBufferBuilder &,int,flatbuffers::Offset<flatbuffers::Vector<float>>) mov [rsp+48h+var_4], eax mov eax, [rsp+48h+var_4] add rsp, 48h retn
long long MNN::CreatePRelu(long long a1, unsigned int *a2, long long a3) { unsigned int v4; // [rsp+8h] [rbp-40h] BYREF unsigned int v5; // [rsp+Ch] [rbp-3Ch] long long v6; // [rsp+10h] [rbp-38h] unsigned int *v7; // [rsp+18h] [rbp-30h] long long v8; // [rsp+20h] [rbp-28h] long long v9; // [rsp+28h] [rbp-20h] unsigned int *v10; // [rsp+30h] [rbp-18h] long long v11; // [rsp+38h] [rbp-10h] v11 = a1; v10 = a2; v9 = a3; v6 = a1; v7 = a2; v8 = a3; v5 = *a2; if ( std::vector<float>::size[abi:nn200100]((_QWORD *)a2 + 1) ) v4 = flatbuffers::FlatBufferBuilder::CreateVector<float>(v11, (_QWORD *)v10 + 1); else flatbuffers::Offset<flatbuffers::Vector<float>>::Offset(&v4, 0); return (unsigned int)MNN::CreatePRelu(v11, v5, v4); }
CreatePRelu: SUB RSP,0x48 MOV qword ptr [RSP + 0x38],RDI MOV qword ptr [RSP + 0x30],RSI MOV qword ptr [RSP + 0x28],RDX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x30] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0xc],EAX MOV RDI,qword ptr [RSP + 0x30] ADD RDI,0x8 CALL 0x0010ea20 CMP RAX,0x0 JZ 0x00143349 MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x30] ADD RSI,0x8 CALL 0x0013b540 MOV dword ptr [RSP + 0x8],EAX JMP 0x00143355 LAB_00143349: LEA RDI,[RSP + 0x8] XOR ESI,ESI CALL 0x0013b590 LAB_00143355: MOV RDI,qword ptr [RSP + 0x38] MOV ESI,dword ptr [RSP + 0xc] MOV EAX,dword ptr [RSP + 0x8] MOV dword ptr [RSP + 0x4],EAX MOV EDX,dword ptr [RSP + 0x4] CALL 0x0014fbd0 MOV dword ptr [RSP + 0x44],EAX MOV EAX,dword ptr [RSP + 0x44] ADD RSP,0x48 RET
/* MNN::CreatePRelu(flatbuffers::FlatBufferBuilder&, MNN::PReluT const*, std::function<unsigned long (void*)> const*) */ int4 MNN::CreatePRelu(FlatBufferBuilder *param_1,PReluT *param_2,function *param_3) { int4 uVar1; long lVar2; int4 local_40; int4 local_3c; FlatBufferBuilder *local_38; PReluT *local_30; function *local_28; function *local_20; PReluT *local_18; FlatBufferBuilder *local_10; local_3c = *(int4 *)param_2; local_38 = param_1; local_30 = param_2; local_28 = param_3; local_20 = param_3; local_18 = param_2; local_10 = param_1; lVar2 = std::vector<float,std::allocator<float>>::size_abi_nn200100_ ((vector<float,std::allocator<float>> *)(param_2 + 8)); if (lVar2 == 0) { flatbuffers::Offset<flatbuffers::Vector<float>>::Offset ((Offset<flatbuffers::Vector<float>> *)&local_40,0); } else { local_40 = flatbuffers::FlatBufferBuilder::CreateVector<float> (local_10,(vector *)(local_18 + 8)); } uVar1 = CreatePRelu(local_10,local_3c,local_40); return uVar1; }
29,547
my_printf_error
eloqsql/mysys/my_error.c
void my_printf_error(uint error, const char *format, myf MyFlags, ...) { va_list args; char ebuff[ERRMSGSIZE]; DBUG_ENTER("my_printf_error"); DBUG_PRINT("my", ("nr: %d MyFlags: %lu errno: %d format: %s", error, MyFlags, errno, format)); va_start(args,MyFlags); (void) my_vsnprintf_ex(&my_charset_utf8mb3_general_ci, ebuff, sizeof(ebuff), format, args); va_end(args); (*error_handler_hook)(error, ebuff, MyFlags); DBUG_VOID_RETURN; }
O3
c
my_printf_error: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x2d8, %rsp # imm = 0x2D8 movq %rdx, %rbx movq %rsi, %r10 movl %edi, %r14d leaq -0x2f0(%rbp), %rdx movq %rcx, 0x18(%rdx) movq %r8, 0x20(%rdx) movq %r9, 0x28(%rdx) testb %al, %al je 0x2ace5 movaps %xmm0, -0x2c0(%rbp) movaps %xmm1, -0x2b0(%rbp) movaps %xmm2, -0x2a0(%rbp) movaps %xmm3, -0x290(%rbp) movaps %xmm4, -0x280(%rbp) movaps %xmm5, -0x270(%rbp) movaps %xmm6, -0x260(%rbp) movaps %xmm7, -0x250(%rbp) movq %fs:0x28, %rax movq %rax, -0x20(%rbp) movabsq $0x3000000018, %rax # imm = 0x3000000018 leaq -0x240(%rbp), %r8 movq %rax, (%r8) leaq 0x10(%rbp), %rax movq %rax, 0x8(%r8) movq %rdx, 0x10(%r8) leaq 0x337b97(%rip), %rdi # 0x3628b0 leaq -0x220(%rbp), %r15 movl $0x200, %edx # imm = 0x200 movq %r15, %rsi movq %r10, %rcx callq 0x59010 leaq 0x2c4649(%rip), %rax # 0x2ef380 movl %r14d, %edi movq %r15, %rsi movq %rbx, %rdx callq *(%rax) movq %fs:0x28, %rax cmpq -0x20(%rbp), %rax jne 0x2ad5f addq $0x2d8, %rsp # imm = 0x2D8 popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x24320
my_printf_error: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 2D8h mov rbx, rdx mov r10, rsi mov r14d, edi lea rdx, [rbp+var_2F0] mov [rdx+18h], rcx mov [rdx+20h], r8 mov [rdx+28h], r9 test al, al jz short loc_2ACE5 movaps [rbp+var_2C0], xmm0 movaps [rbp+var_2B0], xmm1 movaps [rbp+var_2A0], xmm2 movaps [rbp+var_290], xmm3 movaps [rbp+var_280], xmm4 movaps [rbp+var_270], xmm5 movaps [rbp+var_260], xmm6 movaps [rbp+var_250], xmm7 loc_2ACE5: mov rax, fs:28h mov [rbp+var_20], rax mov rax, 3000000018h lea r8, [rbp+var_240] mov [r8], rax lea rax, [rbp+arg_0] mov [r8+8], rax mov [r8+10h], rdx lea rdi, my_charset_utf8mb3_general_ci lea r15, [rbp+var_220] mov edx, 200h mov rsi, r15 mov rcx, r10 call my_vsnprintf_ex lea rax, error_handler_hook mov edi, r14d mov rsi, r15 mov rdx, rbx call qword ptr [rax] mov rax, fs:28h cmp rax, [rbp+var_20] jnz short loc_2AD5F add rsp, 2D8h pop rbx pop r14 pop r15 pop rbp retn loc_2AD5F: call ___stack_chk_fail
unsigned long long my_printf_error( unsigned int a1, long long a2, __int16 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 v17; // [rsp+0h] [rbp-2F0h] BYREF long long v18; // [rsp+18h] [rbp-2D8h] long long v19; // [rsp+20h] [rbp-2D0h] long long v20; // [rsp+28h] [rbp-2C8h] __m128 v21; // [rsp+30h] [rbp-2C0h] __m128 v22; // [rsp+40h] [rbp-2B0h] __m128 v23; // [rsp+50h] [rbp-2A0h] __m128 v24; // [rsp+60h] [rbp-290h] __m128 v25; // [rsp+70h] [rbp-280h] __m128 v26; // [rsp+80h] [rbp-270h] __m128 v27; // [rsp+90h] [rbp-260h] __m128 v28; // [rsp+A0h] [rbp-250h] _QWORD v29[4]; // [rsp+B0h] [rbp-240h] BYREF _BYTE v30[512]; // [rsp+D0h] [rbp-220h] BYREF unsigned long long v31; // [rsp+2D0h] [rbp-20h] v21 = a7; v22 = a8; v23 = a9; v24 = a10; v25 = a11; v26 = a12; v27 = a13; v28 = a14; v18 = a4; v19 = a5; v20 = a6; v31 = __readfsqword(0x28u); v29[0] = 0x3000000018LL; v29[1] = &a15; v29[2] = &v17; my_vsnprintf_ex(&my_charset_utf8mb3_general_ci, v30, 512LL, a2, v29); error_handler_hook(a1, (long long)v30, a3); return __readfsqword(0x28u); }
my_printf_error: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x2d8 MOV RBX,RDX MOV R10,RSI MOV R14D,EDI LEA RDX,[RBP + -0x2f0] MOV qword ptr [RDX + 0x18],RCX MOV qword ptr [RDX + 0x20],R8 MOV qword ptr [RDX + 0x28],R9 TEST AL,AL JZ 0x0012ace5 MOVAPS xmmword ptr [RBP + -0x2c0],XMM0 MOVAPS xmmword ptr [RBP + -0x2b0],XMM1 MOVAPS xmmword ptr [RBP + -0x2a0],XMM2 MOVAPS xmmword ptr [RBP + -0x290],XMM3 MOVAPS xmmword ptr [RBP + -0x280],XMM4 MOVAPS xmmword ptr [RBP + -0x270],XMM5 MOVAPS xmmword ptr [RBP + -0x260],XMM6 MOVAPS xmmword ptr [RBP + -0x250],XMM7 LAB_0012ace5: MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,0x3000000018 LEA R8,[RBP + -0x240] MOV qword ptr [R8],RAX LEA RAX,[RBP + 0x10] MOV qword ptr [R8 + 0x8],RAX MOV qword ptr [R8 + 0x10],RDX LEA RDI,[0x4628b0] LEA R15,[RBP + -0x220] MOV EDX,0x200 MOV RSI,R15 MOV RCX,R10 CALL 0x00159010 LEA RAX,[0x3ef380] MOV EDI,R14D MOV RSI,R15 MOV RDX,RBX CALL qword ptr [RAX] MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x0012ad5f ADD RSP,0x2d8 POP RBX POP R14 POP R15 POP RBP RET LAB_0012ad5f: CALL 0x00124320
void my_printf_error(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int4 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; long in_FS_OFFSET; int1 local_2f8 [24]; int8 local_2e0; int8 local_2d8; int8 local_2d0; int8 local_2c8; int8 local_2b8; int8 local_2a8; int8 local_298; int8 local_288; int8 local_278; int8 local_268; int8 local_258; int8 local_248; int1 *local_240; int1 *local_238; int1 local_228 [512]; long local_28; local_238 = local_2f8; if (in_AL != '\0') { local_2c8 = param_1; local_2b8 = param_2; local_2a8 = param_3; local_298 = param_4; local_288 = param_5; local_278 = param_6; local_268 = param_7; local_258 = param_8; } local_28 = *(long *)(in_FS_OFFSET + 0x28); local_248 = 0x3000000018; local_240 = &stack0x00000008; local_2e0 = param_12; local_2d8 = param_13; local_2d0 = param_14; my_vsnprintf_ex(my_charset_utf8mb3_general_ci,local_228,0x200,param_10); (*(code *)error_handler_hook)(param_9,local_228,param_11); if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
29,548
my_instr_simple
eloqsql/strings/ctype-simple.c
uint my_instr_simple(CHARSET_INFO *cs, const char *b, size_t b_length, const char *s, size_t s_length, my_match_t *match, uint nmatch) { register const uchar *str, *search, *end, *search_end; if (s_length <= b_length) { if (!s_length) { if (nmatch) { match->beg= 0; match->end= 0; match->mb_len= 0; } return 1; /* Empty string is always found */ } str= (const uchar*) b; search= (const uchar*) s; end= (const uchar*) b+b_length-s_length+1; search_end= (const uchar*) s + s_length; skip: while (str != end) { if (cs->sort_order[*str++] == cs->sort_order[*search]) { register const uchar *i,*j; i= str; j= search+1; while (j != search_end) if (cs->sort_order[*i++] != cs->sort_order[*j++]) goto skip; if (nmatch > 0) { match[0].beg= 0; match[0].end= (uint) (str- (const uchar*)b-1); match[0].mb_len= match[0].end; if (nmatch > 1) { match[1].beg= match[0].end; match[1].end= (uint)(match[0].end+s_length); match[1].mb_len= match[1].end-match[1].beg; } } return 2; } } } return 0; }
O3
c
my_instr_simple: xorl %eax, %eax cmpq %rdx, %r8 ja 0xb6f94 pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movl 0x10(%rbp), %r11d testq %r8, %r8 je 0xb6f5a addq %rsi, %rdx subq %r8, %rdx incq %rdx movq %rsi, %r10 cmpq %rdx, %r10 je 0xb6f8a movq %r10, %rbx movq 0x58(%rdi), %r14 incq %r10 movzbl (%rbx), %r15d movb (%r14,%r15), %r15b movzbl (%rcx), %r12d cmpb (%r14,%r12), %r15b jne 0xb6eda movl $0x1, %r15d cmpq %r15, %r8 je 0xb6f23 movzbl (%rbx,%r15), %r12d movb (%r14,%r12), %r12b movzbl (%rcx,%r15), %r13d incq %r15 cmpb (%r14,%r13), %r12b je 0xb6f05 jmp 0xb6eda movl $0x2, %eax testl %r11d, %r11d je 0xb6f8a movl $0x0, (%r9) notl %esi addl %esi, %r10d movl %r10d, 0x4(%r9) movl %r10d, 0x8(%r9) cmpl $0x1, %r11d je 0xb6f8a movl %r10d, 0xc(%r9) addl %r8d, %r10d movl $0x14, %ecx movl $0x10, %edx jmp 0xb6f7b testl %r11d, %r11d je 0xb6f85 movl $0x0, (%r9) movl $0x1, %eax movl $0x8, %ecx xorl %r10d, %r10d movl $0x4, %edx xorl %r8d, %r8d movl %r10d, (%r9,%rdx) movl %r8d, (%r9,%rcx) jmp 0xb6f8a movl $0x1, %eax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_instr_simple: xor eax, eax cmp r8, rdx ja locret_B6F94 push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx mov r11d, [rbp+10h] test r8, r8 jz loc_B6F5A add rdx, rsi sub rdx, r8 inc rdx mov r10, rsi loc_B6EDA: cmp r10, rdx jz loc_B6F8A mov rbx, r10 mov r14, [rdi+58h] inc r10 movzx r15d, byte ptr [rbx] mov r15b, [r14+r15] movzx r12d, byte ptr [rcx] cmp r15b, [r14+r12] jnz short loc_B6EDA mov r15d, 1 loc_B6F05: cmp r8, r15 jz short loc_B6F23 movzx r12d, byte ptr [rbx+r15] mov r12b, [r14+r12] movzx r13d, byte ptr [rcx+r15] inc r15 cmp r12b, [r14+r13] jz short loc_B6F05 jmp short loc_B6EDA loc_B6F23: mov eax, 2 test r11d, r11d jz short loc_B6F8A mov dword ptr [r9], 0 not esi add r10d, esi mov [r9+4], r10d mov [r9+8], r10d cmp r11d, 1 jz short loc_B6F8A mov [r9+0Ch], r10d add r10d, r8d mov ecx, 14h mov edx, 10h jmp short loc_B6F7B loc_B6F5A: test r11d, r11d jz short loc_B6F85 mov dword ptr [r9], 0 mov eax, 1 mov ecx, 8 xor r10d, r10d mov edx, 4 xor r8d, r8d loc_B6F7B: mov [r9+rdx], r10d mov [r9+rcx], r8d jmp short loc_B6F8A loc_B6F85: mov eax, 1 loc_B6F8A: pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp locret_B6F94: retn
long long my_instr_simple( long long a1, unsigned __int8 *a2, unsigned long long a3, unsigned __int8 *a4, unsigned long long a5, _DWORD *a6, int a7) { long long result; // rax long long v8; // rdx unsigned __int8 *v9; // r10 unsigned __int8 *v10; // rbx long long v11; // r14 long long v12; // r15 char v13; // r12 long long v14; // r13 int v15; // r10d int v16; // r10d long long v17; // rcx long long v18; // rdx result = 0LL; if ( a5 <= a3 ) { if ( a5 ) { v8 = (long long)&a2[a3 - a5 + 1]; v9 = a2; LABEL_4: while ( v9 != (unsigned __int8 *)v8 ) { v10 = v9; v11 = *(_QWORD *)(a1 + 88); ++v9; if ( *(_BYTE *)(v11 + *v10) == *(_BYTE *)(v11 + *a4) ) { v12 = 1LL; while ( a5 != v12 ) { v13 = *(_BYTE *)(v11 + v10[v12]); v14 = a4[v12++]; if ( v13 != *(_BYTE *)(v11 + v14) ) goto LABEL_4; } result = 2LL; if ( a7 ) { *a6 = 0; v15 = ~(_DWORD)a2 + (_DWORD)v9; a6[1] = v15; a6[2] = v15; if ( a7 != 1 ) { a6[3] = v15; v16 = a5 + v15; v17 = 5LL; v18 = 4LL; goto LABEL_15; } } return result; } } } else if ( a7 ) { *a6 = 0; result = 1LL; v17 = 2LL; v16 = 0; v18 = 1LL; LODWORD(a5) = 0; LABEL_15: a6[v18] = v16; a6[v17] = a5; } else { return 1LL; } } return result; }
my_instr_simple: XOR EAX,EAX CMP R8,RDX JA 0x001b6f94 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R11D,dword ptr [RBP + 0x10] TEST R8,R8 JZ 0x001b6f5a ADD RDX,RSI SUB RDX,R8 INC RDX MOV R10,RSI LAB_001b6eda: CMP R10,RDX JZ 0x001b6f8a MOV RBX,R10 MOV R14,qword ptr [RDI + 0x58] INC R10 MOVZX R15D,byte ptr [RBX] MOV R15B,byte ptr [R14 + R15*0x1] MOVZX R12D,byte ptr [RCX] CMP R15B,byte ptr [R14 + R12*0x1] JNZ 0x001b6eda MOV R15D,0x1 LAB_001b6f05: CMP R8,R15 JZ 0x001b6f23 MOVZX R12D,byte ptr [RBX + R15*0x1] MOV R12B,byte ptr [R14 + R12*0x1] MOVZX R13D,byte ptr [RCX + R15*0x1] INC R15 CMP R12B,byte ptr [R14 + R13*0x1] JZ 0x001b6f05 JMP 0x001b6eda LAB_001b6f23: MOV EAX,0x2 TEST R11D,R11D JZ 0x001b6f8a MOV dword ptr [R9],0x0 NOT ESI ADD R10D,ESI MOV dword ptr [R9 + 0x4],R10D MOV dword ptr [R9 + 0x8],R10D CMP R11D,0x1 JZ 0x001b6f8a MOV dword ptr [R9 + 0xc],R10D ADD R10D,R8D MOV ECX,0x14 MOV EDX,0x10 JMP 0x001b6f7b LAB_001b6f5a: TEST R11D,R11D JZ 0x001b6f85 MOV dword ptr [R9],0x0 MOV EAX,0x1 MOV ECX,0x8 XOR R10D,R10D MOV EDX,0x4 XOR R8D,R8D LAB_001b6f7b: MOV dword ptr [R9 + RDX*0x1],R10D MOV dword ptr [R9 + RCX*0x1],R8D JMP 0x001b6f8a LAB_001b6f85: MOV EAX,0x1 LAB_001b6f8a: POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP LAB_001b6f94: RET
int8 my_instr_simple(long param_1,byte *param_2,ulong param_3,byte *param_4,ulong param_5, int4 *param_6,int param_7) { byte *pbVar1; byte *pbVar2; int8 uVar3; long lVar4; long lVar5; int iVar6; byte *pbVar7; byte *pbVar8; ulong uVar9; uVar3 = 0; if (param_5 <= param_3) { if (param_5 == 0) { if (param_7 == 0) { uVar3 = 1; } else { *param_6 = 0; uVar3 = 1; lVar4 = 8; iVar6 = 0; lVar5 = 4; param_5 = 0; LAB_001b6f7b: *(int *)((long)param_6 + lVar5) = iVar6; *(int *)((long)param_6 + lVar4) = (int)param_5; } } else { pbVar8 = param_2; while (pbVar7 = pbVar8, pbVar7 != param_2 + (param_3 - param_5) + 1) { lVar4 = *(long *)(param_1 + 0x58); pbVar8 = pbVar7 + 1; if (*(char *)(lVar4 + (ulong)*pbVar7) == *(char *)(lVar4 + (ulong)*param_4)) { uVar9 = 1; do { if (param_5 == uVar9) { uVar3 = 2; if (param_7 == 0) { return 2; } *param_6 = 0; iVar6 = (int)pbVar8 + ~(uint)param_2; param_6[1] = iVar6; param_6[2] = iVar6; if (param_7 == 1) { return 2; } param_6[3] = iVar6; iVar6 = iVar6 + (int)param_5; lVar4 = 0x14; lVar5 = 0x10; goto LAB_001b6f7b; } pbVar1 = pbVar7 + uVar9; pbVar2 = param_4 + uVar9; uVar9 = uVar9 + 1; } while (*(char *)(lVar4 + (ulong)*pbVar1) == *(char *)(lVar4 + (ulong)*pbVar2)); } } } } return uVar3; }
29,549
my_hash_sort_ucs2_nopad
eloqsql/strings/ctype-ucs2.c
static void my_hash_sort_ucs2_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen, ulong *nr1, ulong *nr2) { my_wc_t wc; int res; const uchar *e=s+slen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; register ulong m1= *nr1, m2= *nr2; while ((s < e) && (res=my_ucs2_uni(cs,&wc, (uchar *)s, (uchar*)e)) >0) { my_tosort_ucs2(uni_plane, &wc); MY_HASH_ADD_16(m1, m2, wc); s+=res; } *nr1= m1; *nr2= m2; }
O3
c
my_hash_sort_ucs2_nopad: movq (%rcx), %r9 movq (%r8), %rax cmpq $0x2, %rdx jl 0xca3a9 pushq %rbp movq %rsp, %rbp pushq %rbx addq %rsi, %rdx movq 0x78(%rdi), %rdi movq 0x8(%rdi), %rdi movzbl (%rsi), %r10d movzbl 0x1(%rsi), %r11d movq (%rdi,%r10,8), %rbx testq %rbx, %rbx je 0xca345 leaq (%r11,%r11,2), %r10 movl 0x8(%rbx,%r10,4), %r10d jmp 0xca34c shll $0x8, %r10d orq %r11, %r10 movl %r9d, %r11d andl $0x3f, %r11d addq %rax, %r11 movzbl %r10b, %ebx imulq %r11, %rbx movq %r9, %r11 shlq $0x8, %r11 addq %rbx, %r11 xorq %r9, %r11 movl %r11d, %r9d andl $0x3f, %r9d addq %rax, %r9 addq $0x3, %r9 shrl $0x8, %r10d imulq %r9, %r10 movq %r11, %r9 shlq $0x8, %r9 addq %r10, %r9 xorq %r11, %r9 addq $0x6, %rax leaq 0x2(%rsi), %r10 cmpq %rdx, %r10 jae 0xca3a7 addq $0x4, %rsi cmpq %rdx, %rsi movq %r10, %rsi jbe 0xca328 popq %rbx popq %rbp movq %r9, (%rcx) movq %rax, (%r8) retq
my_hash_sort_ucs2_nopad: mov r9, [rcx] mov rax, [r8] cmp rdx, 2 jl loc_CA3A9 push rbp mov rbp, rsp push rbx add rdx, rsi mov rdi, [rdi+78h] mov rdi, [rdi+8] loc_CA328: movzx r10d, byte ptr [rsi] movzx r11d, byte ptr [rsi+1] mov rbx, [rdi+r10*8] test rbx, rbx jz short loc_CA345 lea r10, [r11+r11*2] mov r10d, [rbx+r10*4+8] jmp short loc_CA34C loc_CA345: shl r10d, 8 or r10, r11 loc_CA34C: mov r11d, r9d and r11d, 3Fh add r11, rax movzx ebx, r10b imul rbx, r11 mov r11, r9 shl r11, 8 add r11, rbx xor r11, r9 mov r9d, r11d and r9d, 3Fh add r9, rax add r9, 3 shr r10d, 8 imul r10, r9 mov r9, r11 shl r9, 8 add r9, r10 xor r9, r11 add rax, 6 lea r10, [rsi+2] cmp r10, rdx jnb short loc_CA3A7 add rsi, 4 cmp rsi, rdx mov rsi, r10 jbe short loc_CA328 loc_CA3A7: pop rbx pop rbp loc_CA3A9: mov [rcx], r9 mov [r8], rax retn
long long my_hash_sort_ucs2_nopad(long long a1, unsigned __int8 *a2, long long a3, long long *a4, long long *a5) { long long v5; // r9 long long result; // rax unsigned long long v7; // rdx long long v8; // rdi long long v9; // r10 long long v10; // r11 long long v11; // rbx unsigned int v12; // r10d long long v13; // rbx bool v14; // cc v5 = *a4; result = *a5; if ( a3 >= 2 ) { v7 = (unsigned long long)&a2[a3]; v8 = *(_QWORD *)(*(_QWORD *)(a1 + 120) + 8LL); do { v9 = *a2; v10 = a2[1]; v11 = *(_QWORD *)(v8 + 8 * v9); if ( v11 ) v12 = *(_DWORD *)(v11 + 12 * v10 + 8); else v12 = v10 | ((_DWORD)v9 << 8); v13 = (result + (v5 & 0x3F)) * (unsigned __int8)v12; v5 ^= (v13 + (v5 << 8)) ^ ((result + (((unsigned __int8)v5 ^ (unsigned __int8)v13) & 0x3F) + 3) * (v12 >> 8) + ((v5 ^ (v13 + (v5 << 8))) << 8)); result += 6LL; if ( (unsigned long long)(a2 + 2) >= v7 ) break; v14 = (unsigned long long)(a2 + 4) <= v7; a2 += 2; } while ( v14 ); } *a4 = v5; *a5 = result; return result; }
my_hash_sort_ucs2_nopad: MOV R9,qword ptr [RCX] MOV RAX,qword ptr [R8] CMP RDX,0x2 JL 0x001ca3a9 PUSH RBP MOV RBP,RSP PUSH RBX ADD RDX,RSI MOV RDI,qword ptr [RDI + 0x78] MOV RDI,qword ptr [RDI + 0x8] LAB_001ca328: MOVZX R10D,byte ptr [RSI] MOVZX R11D,byte ptr [RSI + 0x1] MOV RBX,qword ptr [RDI + R10*0x8] TEST RBX,RBX JZ 0x001ca345 LEA R10,[R11 + R11*0x2] MOV R10D,dword ptr [RBX + R10*0x4 + 0x8] JMP 0x001ca34c LAB_001ca345: SHL R10D,0x8 OR R10,R11 LAB_001ca34c: MOV R11D,R9D AND R11D,0x3f ADD R11,RAX MOVZX EBX,R10B IMUL RBX,R11 MOV R11,R9 SHL R11,0x8 ADD R11,RBX XOR R11,R9 MOV R9D,R11D AND R9D,0x3f ADD R9,RAX ADD R9,0x3 SHR R10D,0x8 IMUL R10,R9 MOV R9,R11 SHL R9,0x8 ADD R9,R10 XOR R9,R11 ADD RAX,0x6 LEA R10,[RSI + 0x2] CMP R10,RDX JNC 0x001ca3a7 ADD RSI,0x4 CMP RSI,RDX MOV RSI,R10 JBE 0x001ca328 LAB_001ca3a7: POP RBX POP RBP LAB_001ca3a9: MOV qword ptr [RCX],R9 MOV qword ptr [R8],RAX RET
void my_hash_sort_ucs2_nopad(long param_1,byte *param_2,long param_3,ulong *param_4,long *param_5) { long lVar1; long lVar2; byte *pbVar3; byte *pbVar4; ulong uVar5; ulong uVar6; uVar6 = *param_4; lVar2 = *param_5; if (1 < param_3) { pbVar3 = param_2; do { lVar1 = *(long *)(*(long *)(*(long *)(param_1 + 0x78) + 8) + (ulong)*pbVar3 * 8); if (lVar1 == 0) { uVar5 = (ulong)CONCAT11(*pbVar3,pbVar3[1]); } else { uVar5 = (ulong)*(uint *)(lVar1 + 8 + (ulong)pbVar3[1] * 0xc); } uVar6 = uVar6 * 0x100 + (uVar5 & 0xff) * ((ulong)((uint)uVar6 & 0x3f) + lVar2) ^ uVar6; uVar6 = uVar6 * 0x100 + (uVar5 >> 8) * ((ulong)((uint)uVar6 & 0x3f) + lVar2 + 3) ^ uVar6; lVar2 = lVar2 + 6; } while ((pbVar3 + 2 < param_2 + param_3) && (pbVar4 = pbVar3 + 4, pbVar3 = pbVar3 + 2, pbVar4 <= param_2 + param_3)); } *param_4 = uVar6; *param_5 = lVar2; return; }
29,550
Item_sum_variance::fix_length_and_dec_decimal()
eloqsql/sql/item_sum.cc
void Item_sum_variance::fix_length_and_dec_decimal() { DBUG_ASSERT(Item_sum_variance::type_handler() == &type_handler_double); int precision= args[0]->decimal_precision() * 2 + prec_increment; decimals= MY_MIN(args[0]->decimals + prec_increment, FLOATING_POINT_DECIMALS - 1); max_length= my_decimal_precision_to_length_no_truncation(precision, decimals, unsigned_flag); }
O0
cpp
Item_sum_variance::fix_length_and_dec_decimal(): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) jmp 0x9c7436 movq -0x18(%rbp), %rax movq 0x70(%rax), %rax movq (%rax), %rdi movq (%rdi), %rax callq *0x18(%rax) movq -0x18(%rbp), %rcx movzwl %ax, %eax shll %eax addl 0x124(%rcx), %eax movl %eax, -0xc(%rbp) movq 0x70(%rcx), %rax movq (%rax), %rax movzwl 0xc(%rax), %eax addl 0x124(%rcx), %eax cmpl $0x1e, %eax jae 0x9c7489 movq -0x18(%rbp), %rcx movq 0x70(%rcx), %rax movq (%rax), %rax movzwl 0xc(%rax), %eax addl 0x124(%rcx), %eax movl %eax, -0x1c(%rbp) jmp 0x9c7493 movl $0x1e, %eax movl %eax, -0x1c(%rbp) jmp 0x9c7493 movq -0x18(%rbp), %rax movl -0x1c(%rbp), %ecx movw %cx, 0xc(%rax) movl -0xc(%rbp), %ecx movw %cx, %dx movw 0xc(%rax), %cx movb 0xe(%rax), %al andb $0x1, %al movzwl %dx, %edi movzwl %cx, %esi movzbl %al, %edx callq 0x6e6110 movw %ax, %cx movq -0x18(%rbp), %rax movzwl %cx, %ecx movl %ecx, 0x8(%rax) addq $0x20, %rsp popq %rbp retq nop
_ZN17Item_sum_variance26fix_length_and_dec_decimalEv: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_18], rax jmp short $+2 loc_9C7436: mov rax, [rbp+var_18] mov rax, [rax+70h] mov rdi, [rax] mov rax, [rdi] call qword ptr [rax+18h] mov rcx, [rbp+var_18] movzx eax, ax shl eax, 1 add eax, [rcx+124h] mov [rbp+var_C], eax mov rax, [rcx+70h] mov rax, [rax] movzx eax, word ptr [rax+0Ch] add eax, [rcx+124h] cmp eax, 1Eh jnb short loc_9C7489 mov rcx, [rbp+var_18] mov rax, [rcx+70h] mov rax, [rax] movzx eax, word ptr [rax+0Ch] add eax, [rcx+124h] mov [rbp+var_1C], eax jmp short loc_9C7493 loc_9C7489: mov eax, 1Eh mov [rbp+var_1C], eax jmp short $+2 loc_9C7493: mov rax, [rbp+var_18] mov ecx, [rbp+var_1C] mov [rax+0Ch], cx mov ecx, [rbp+var_C] mov dx, cx mov cx, [rax+0Ch] mov al, [rax+0Eh] and al, 1 movzx edi, dx; unsigned __int16 movzx esi, cx; unsigned __int16 movzx edx, al; bool call _Z44my_decimal_precision_to_length_no_truncationttb; my_decimal_precision_to_length_no_truncation(ushort,ushort,bool) mov cx, ax mov rax, [rbp+var_18] movzx ecx, cx mov [rax+8], ecx add rsp, 20h pop rbp retn
Item_sum_variance * Item_sum_variance::fix_length_and_dec_decimal(Item_sum_variance *this) { unsigned __int16 v1; // cx Item_sum_variance *result; // rax int v3; // [rsp+4h] [rbp-1Ch] int v5; // [rsp+14h] [rbp-Ch] v5 = *((_DWORD *)this + 73) + 2 * (*(unsigned __int16 ( **)(_QWORD))(***((_QWORD ***)this + 14) + 24LL))(**((_QWORD **)this + 14)); if ( *((_DWORD *)this + 73) + (unsigned int)*(unsigned __int16 *)(**((_QWORD **)this + 14) + 12LL) >= 0x1E ) LOWORD(v3) = 30; else v3 = *((_DWORD *)this + 73) + *(unsigned __int16 *)(**((_QWORD **)this + 14) + 12LL); *((_WORD *)this + 6) = v3; v1 = my_decimal_precision_to_length_no_truncation(v5, *((_WORD *)this + 6), *((_BYTE *)this + 14) & 1); result = this; *((_DWORD *)this + 2) = v1; return result; }
pack_length_to_packflag: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x8],EDI MOV EAX,dword ptr [RBP + -0x8] DEC EAX MOV ECX,EAX MOV qword ptr [RBP + -0x10],RCX SUB EAX,0x7 JA 0x009c7478 MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x1017a40] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV dword ptr [RBP + -0x4],0x8 JMP 0x009c747f caseD_2: MOV dword ptr [RBP + -0x4],0x10 JMP 0x009c747f caseD_3: MOV dword ptr [RBP + -0x4],0x48 JMP 0x009c747f caseD_4: MOV dword ptr [RBP + -0x4],0x18 JMP 0x009c747f caseD_8: MOV dword ptr [RBP + -0x4],0x40 JMP 0x009c747f caseD_5: MOV dword ptr [RBP + -0x4],0x0 LAB_009c747f: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
/* pack_length_to_packflag(unsigned int) */ int4 pack_length_to_packflag(uint param_1) { int4 local_c; switch(param_1) { case 1: local_c = 8; break; case 2: local_c = 0x10; break; case 3: local_c = 0x48; break; case 4: local_c = 0x18; break; default: local_c = 0; break; case 8: local_c = 0x40; } return local_c; }
29,551
ma_search_next
eloqsql/storage/maria/ma_search.c
int _ma_search_next(register MARIA_HA *info, MARIA_KEY *key, uint32 nextflag, my_off_t pos) { int error; uchar lastkey[MARIA_MAX_KEY_BUFF]; MARIA_KEYDEF *keyinfo= key->keyinfo; MARIA_KEY tmp_key; MARIA_PAGE page; DBUG_ENTER("_ma_search_next"); DBUG_PRINT("enter",("nextflag: %u lastpos: %lu int_keypos:%p page_changed %d keyread_buff_used: %d", nextflag, (ulong) info->cur_row.lastpos, info->int_keypos, info->page_changed, info->keyread_buff_used)); DBUG_EXECUTE("key", _ma_print_key(DBUG_FILE, key);); /* Force full read if we are at last key or if we are not on a leaf and the key tree has changed since we used it last time Note that even if the key tree has changed since last read, we can use the last read data from the leaf if we haven't used the buffer for something else. */ if (((nextflag & SEARCH_BIGGER) && info->int_keypos >= info->int_maxpos) || info->page_changed || (info->int_keytree_version != keyinfo->version && (info->int_nod_flag || info->keyread_buff_used))) DBUG_RETURN(_ma_search(info, key, nextflag | SEARCH_SAVE_BUFF, pos)); if (info->keyread_buff_used) { if (_ma_fetch_keypage(&page, info, keyinfo, info->last_search_keypage, PAGECACHE_LOCK_LEFT_UNLOCKED, DFLT_INIT_HITS, info->keyread_buff, 0)) DBUG_RETURN(-1); info->keyread_buff_used=0; } else { /* Last used buffer is in info->keyread_buff */ /* Todo: Add info->keyread_page to keep track of this */ _ma_page_setup(&page, info, keyinfo, 0, info->keyread_buff); } tmp_key.data= lastkey; tmp_key.keyinfo= keyinfo; if (nextflag & SEARCH_BIGGER) /* Next key */ { if (page.node) { my_off_t tmp_pos= _ma_kpos(page.node, info->int_keypos); if ((error= _ma_search(info, key, nextflag | SEARCH_SAVE_BUFF, tmp_pos)) <=0) DBUG_RETURN(error); } if (keyinfo->flag & (HA_PACK_KEY | HA_BINARY_PACK_KEY) && info->last_key.data != key->data) memcpy(info->last_key.data, key->data, key->data_length + key->ref_length); if (!(*keyinfo->get_key)(&info->last_key, page.flag, page.node, &info->int_keypos)) DBUG_RETURN(-1); } else /* Previous key */ { /* Find start of previous key */ info->int_keypos= _ma_get_last_key(&tmp_key, &page, info->int_keypos); if (!info->int_keypos) DBUG_RETURN(-1); if (info->int_keypos == info->keyread_buff + info->s->keypage_header) { /* Previous key was first key, read key before this one */ DBUG_RETURN(_ma_search(info, key, nextflag | SEARCH_SAVE_BUFF, pos)); } if (page.node && (error= _ma_search(info, key, nextflag | SEARCH_SAVE_BUFF, _ma_kpos(page.node,info->int_keypos))) <= 0) DBUG_RETURN(error); /* QQ: We should be able to optimize away the following call */ if (! _ma_get_last_key(&info->last_key, &page, info->int_keypos)) DBUG_RETURN(-1); } info->cur_row.lastpos= _ma_row_pos_from_key(&info->last_key); info->cur_row.trid= _ma_trid_from_key(&info->last_key); DBUG_PRINT("exit",("found key at %lu",(ulong) info->cur_row.lastpos)); DBUG_RETURN(0); }
O3
c
ma_search_next: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa48, %rsp # imm = 0xA48 movq %rcx, %r13 movl %edx, %r15d movq %rsi, %r14 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq 0x8(%rsi), %r12 testb $0x8, %r15b je 0x58dbe movq 0x3b0(%rbx), %rax cmpq 0x3b8(%rbx), %rax jae 0x58dc7 cmpb $0x0, 0x684(%rbx) je 0x58e00 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x59042 orl $0x20, %r15d movq %rbx, %rdi movq %r14, %rsi movl %r15d, %edx movq %r13, %rcx addq $0xa48, %rsp # imm = 0xA48 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x56e4b movl 0x3d4(%rbx), %eax cmpl 0xb8(%r12), %eax jne 0x58e5d cmpb $0x0, 0x685(%rbx) je 0x58e77 movq 0x448(%rbx), %rcx leaq -0xa48(%rbp), %rdi movq %rbx, %rsi movq %r12, %rdx xorl %r8d, %r8d movl $0x3, %r9d pushq $0x0 pushq 0x380(%rbx) callq 0x59e2a addq $0x10, %rsp movl $0xffffffff, %ecx # imm = 0xFFFFFFFF testb %al, %al jne 0x5901f movb $0x0, 0x685(%rbx) jmp 0x58e92 cmpl $0x0, 0x3d0(%rbx) jne 0x58dc7 cmpb $0x0, 0x685(%rbx) jne 0x58dc7 movq 0x380(%rbx), %r8 leaq -0xa48(%rbp), %rdi movq %rbx, %rsi movq %r12, %rdx xorl %ecx, %ecx callq 0x59dd8 leaq -0xa10(%rbp), %rax movq %rax, -0xa68(%rbp) movq %r12, -0xa60(%rbp) testb $0x8, %r15b jne 0x58f58 movq 0x3b0(%rbx), %rdx leaq -0xa68(%rbp), %rdi leaq -0xa48(%rbp), %rsi callq 0x58b84 movq %rax, 0x3b0(%rbx) movl $0xffffffff, %ecx # imm = 0xFFFFFFFF testq %rax, %rax je 0x5901f movq (%rbx), %rcx movl 0x744(%rcx), %ecx addq 0x380(%rbx), %rcx cmpq %rcx, %rax je 0x59008 movl -0xa20(%rbp), %edi testl %edi, %edi je 0x58f2f orl $0x20, %r15d movq %rax, %rsi callq 0x57e3b movq %rbx, %rdi movq %r14, %rsi movl %r15d, %edx movq %rax, %rcx callq 0x56e4b testl %eax, %eax jle 0x5901d movq 0x3b0(%rbx), %rax leaq 0x200(%rbx), %rdi leaq -0xa48(%rbp), %rsi movq %rax, %rdx callq 0x58b84 testq %rax, %rax movl $0xffffffff, %ecx # imm = 0xFFFFFFFF jne 0x58fd8 jmp 0x5901f movl -0xa20(%rbp), %edi testl %edi, %edi je 0x58f8b movq 0x3b0(%rbx), %rsi callq 0x57e3b orl $0x20, %r15d movq %rbx, %rdi movq %r14, %rsi movl %r15d, %edx movq %rax, %rcx callq 0x56e4b testl %eax, %eax jle 0x5901d testb $0x22, 0xa2(%r12) je 0x58fb2 movq 0x200(%rbx), %rdi movq (%r14), %rsi cmpq %rsi, %rdi je 0x58fb2 movl 0x14(%r14), %edx addl 0x10(%r14), %edx callq 0x29080 leaq 0x200(%rbx), %rdi movl -0xa20(%rbp), %edx movl -0xa1c(%rbp), %esi leaq 0x3b0(%rbx), %rcx callq *0xe0(%r12) testl %eax, %eax je 0x59001 leaq 0x200(%rbx), %r14 movq %r14, %rdi callq 0x57fa0 movq %rax, 0x98(%rbx) movq %r14, %rdi callq 0x58058 movq %rax, 0xc0(%rbx) xorl %ecx, %ecx jmp 0x5901f movl $0xffffffff, %ecx # imm = 0xFFFFFFFF jmp 0x5901f orl $0x20, %r15d movq %rbx, %rdi movq %r14, %rsi movl %r15d, %edx movq %r13, %rcx callq 0x56e4b movl %eax, %ecx movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x59042 movl %ecx, %eax addq $0xa48, %rsp # imm = 0xA48 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29270
_ma_search_next: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A48h mov r13, rcx mov r15d, edx mov r14, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax mov r12, [rsi+8] test r15b, 8 jz short loc_58DBE mov rax, [rbx+3B0h] cmp rax, [rbx+3B8h] jnb short loc_58DC7 loc_58DBE: cmp byte ptr [rbx+684h], 0 jz short loc_58E00 loc_58DC7: mov rax, fs:28h cmp rax, [rbp+var_30] jnz loc_59042 or r15d, 20h mov rdi, rbx mov rsi, r14 mov edx, r15d mov rcx, r13 add rsp, 0A48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _ma_search loc_58E00: mov eax, [rbx+3D4h] cmp eax, [r12+0B8h] jnz short loc_58E5D cmp byte ptr [rbx+685h], 0 jz short loc_58E77 mov rcx, [rbx+448h] lea rdi, [rbp+var_A48] mov rsi, rbx mov rdx, r12 xor r8d, r8d mov r9d, 3 push 0 push qword ptr [rbx+380h] call _ma_fetch_keypage add rsp, 10h mov ecx, 0FFFFFFFFh test al, al jnz loc_5901F mov byte ptr [rbx+685h], 0 jmp short loc_58E92 loc_58E5D: cmp dword ptr [rbx+3D0h], 0 jnz loc_58DC7 cmp byte ptr [rbx+685h], 0 jnz loc_58DC7 loc_58E77: mov r8, [rbx+380h] lea rdi, [rbp+var_A48] mov rsi, rbx mov rdx, r12 xor ecx, ecx call _ma_page_setup loc_58E92: lea rax, [rbp+var_A10] mov [rbp+var_A68], rax mov [rbp+var_A60], r12 test r15b, 8 jnz loc_58F58 mov rdx, [rbx+3B0h] lea rdi, [rbp+var_A68] lea rsi, [rbp+var_A48] call _ma_get_last_key mov [rbx+3B0h], rax mov ecx, 0FFFFFFFFh test rax, rax jz loc_5901F mov rcx, [rbx] mov ecx, [rcx+744h] add rcx, [rbx+380h] cmp rax, rcx jz loc_59008 mov edi, [rbp+var_A20] test edi, edi jz short loc_58F2F or r15d, 20h mov rsi, rax call _ma_kpos mov rdi, rbx mov rsi, r14 mov edx, r15d mov rcx, rax call _ma_search test eax, eax jle loc_5901D mov rax, [rbx+3B0h] loc_58F2F: lea rdi, [rbx+200h] lea rsi, [rbp+var_A48] mov rdx, rax call _ma_get_last_key test rax, rax mov ecx, 0FFFFFFFFh jnz loc_58FD8 jmp loc_5901F loc_58F58: mov edi, [rbp+var_A20] test edi, edi jz short loc_58F8B mov rsi, [rbx+3B0h] call _ma_kpos or r15d, 20h mov rdi, rbx mov rsi, r14 mov edx, r15d mov rcx, rax call _ma_search test eax, eax jle loc_5901D loc_58F8B: test byte ptr [r12+0A2h], 22h jz short loc_58FB2 mov rdi, [rbx+200h] mov rsi, [r14] cmp rdi, rsi jz short loc_58FB2 mov edx, [r14+14h] add edx, [r14+10h] call _memcpy loc_58FB2: lea rdi, [rbx+200h] mov edx, [rbp+var_A20] mov esi, [rbp+var_A1C] lea rcx, [rbx+3B0h] call qword ptr [r12+0E0h] test eax, eax jz short loc_59001 loc_58FD8: lea r14, [rbx+200h] mov rdi, r14 call _ma_row_pos_from_key mov [rbx+98h], rax mov rdi, r14 call _ma_trid_from_key mov [rbx+0C0h], rax xor ecx, ecx jmp short loc_5901F loc_59001: mov ecx, 0FFFFFFFFh jmp short loc_5901F loc_59008: or r15d, 20h mov rdi, rbx mov rsi, r14 mov edx, r15d mov rcx, r13 call _ma_search loc_5901D: mov ecx, eax loc_5901F: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_59042 mov eax, ecx add rsp, 0A48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_59042: call ___stack_chk_fail
long long ma_search_next(long long a1, long long a2, int a3, long long a4) { long long v8; // r12 char keypage; // al unsigned int v11; // ecx unsigned long long last_key; // rax long long v13; // rax int v14; // eax unsigned long long v15; // rax long long v16; // rax long long v17; // rdi long long v18; // rsi _QWORD v19[4]; // [rsp+8h] [rbp-A68h] BYREF _BYTE v20[40]; // [rsp+28h] [rbp-A48h] BYREF unsigned int v21; // [rsp+50h] [rbp-A20h] unsigned int v22; // [rsp+54h] [rbp-A1Ch] char v23; // [rsp+60h] [rbp-A10h] BYREF unsigned long long v24; // [rsp+A40h] [rbp-30h] v24 = __readfsqword(0x28u); v8 = *(_QWORD *)(a2 + 8); if ( (a3 & 8) != 0 && *(_QWORD *)(a1 + 944) >= *(_QWORD *)(a1 + 952) || *(_BYTE *)(a1 + 1668) ) return ma_search(a1, a2, a3 | 0x20u, a4); if ( *(_DWORD *)(a1 + 980) != *(_DWORD *)(v8 + 184) ) { if ( *(_DWORD *)(a1 + 976) || *(_BYTE *)(a1 + 1669) ) return ma_search(a1, a2, a3 | 0x20u, a4); goto LABEL_11; } if ( !*(_BYTE *)(a1 + 1669) ) { LABEL_11: ma_page_setup(v20, a1, v8, 0LL, *(_QWORD *)(a1 + 896)); goto LABEL_12; } keypage = ma_fetch_keypage((unsigned int)v20, a1, v8, *(_QWORD *)(a1 + 1096), 0, 3, *(_QWORD *)(a1 + 896)); v11 = -1; if ( keypage ) return v11; *(_BYTE *)(a1 + 1669) = 0; LABEL_12: v19[0] = &v23; v19[1] = v8; if ( (a3 & 8) != 0 ) { if ( !v21 || (v16 = ma_kpos(v21, *(_QWORD *)(a1 + 944)), v14 = ma_search(a1, a2, a3 | 0x20u, v16), v14 > 0) ) { if ( (*(_BYTE *)(v8 + 162) & 0x22) != 0 ) { v17 = *(_QWORD *)(a1 + 512); v18 = *(_QWORD *)a2; if ( v17 != *(_QWORD *)a2 ) memcpy(v17, v18, (unsigned int)(*(_DWORD *)(a2 + 16) + *(_DWORD *)(a2 + 20))); } if ( !(*(unsigned int ( **)(long long, _QWORD, _QWORD, long long))(v8 + 224))(a1 + 512, v22, v21, a1 + 944) ) return (unsigned int)-1; goto LABEL_26; } return (unsigned int)v14; } last_key = ma_get_last_key((long long)v19, (long long)v20, *(_QWORD *)(a1 + 944)); *(_QWORD *)(a1 + 944) = last_key; v11 = -1; if ( last_key ) { if ( last_key == *(_QWORD *)(a1 + 896) + *(unsigned int *)(*(_QWORD *)a1 + 1860LL) ) { return (unsigned int)ma_search(a1, a2, a3 | 0x20u, a4); } else { if ( !v21 ) goto LABEL_18; v13 = ma_kpos(v21, last_key); v14 = ma_search(a1, a2, a3 | 0x20u, v13); if ( v14 > 0 ) { last_key = *(_QWORD *)(a1 + 944); LABEL_18: v15 = ma_get_last_key(a1 + 512, (long long)v20, last_key); v11 = -1; if ( !v15 ) return v11; LABEL_26: *(_QWORD *)(a1 + 152) = ma_row_pos_from_key((long long *)(a1 + 512)); *(_QWORD *)(a1 + 192) = ma_trid_from_key(a1 + 512); return 0; } } return (unsigned int)v14; } return v11; }
_ma_search_next: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa48 MOV R13,RCX MOV R15D,EDX MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV R12,qword ptr [RSI + 0x8] TEST R15B,0x8 JZ 0x00158dbe MOV RAX,qword ptr [RBX + 0x3b0] CMP RAX,qword ptr [RBX + 0x3b8] JNC 0x00158dc7 LAB_00158dbe: CMP byte ptr [RBX + 0x684],0x0 JZ 0x00158e00 LAB_00158dc7: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00159042 OR R15D,0x20 MOV RDI,RBX MOV RSI,R14 MOV EDX,R15D MOV RCX,R13 ADD RSP,0xa48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00156e4b LAB_00158e00: MOV EAX,dword ptr [RBX + 0x3d4] CMP EAX,dword ptr [R12 + 0xb8] JNZ 0x00158e5d CMP byte ptr [RBX + 0x685],0x0 JZ 0x00158e77 MOV RCX,qword ptr [RBX + 0x448] LEA RDI,[RBP + -0xa48] MOV RSI,RBX MOV RDX,R12 XOR R8D,R8D MOV R9D,0x3 PUSH 0x0 PUSH qword ptr [RBX + 0x380] CALL 0x00159e2a ADD RSP,0x10 MOV ECX,0xffffffff TEST AL,AL JNZ 0x0015901f MOV byte ptr [RBX + 0x685],0x0 JMP 0x00158e92 LAB_00158e5d: CMP dword ptr [RBX + 0x3d0],0x0 JNZ 0x00158dc7 CMP byte ptr [RBX + 0x685],0x0 JNZ 0x00158dc7 LAB_00158e77: MOV R8,qword ptr [RBX + 0x380] LEA RDI,[RBP + -0xa48] MOV RSI,RBX MOV RDX,R12 XOR ECX,ECX CALL 0x00159dd8 LAB_00158e92: LEA RAX,[RBP + -0xa10] MOV qword ptr [RBP + -0xa68],RAX MOV qword ptr [RBP + -0xa60],R12 TEST R15B,0x8 JNZ 0x00158f58 MOV RDX,qword ptr [RBX + 0x3b0] LEA RDI,[RBP + -0xa68] LEA RSI,[RBP + -0xa48] CALL 0x00158b84 MOV qword ptr [RBX + 0x3b0],RAX MOV ECX,0xffffffff TEST RAX,RAX JZ 0x0015901f MOV RCX,qword ptr [RBX] MOV ECX,dword ptr [RCX + 0x744] ADD RCX,qword ptr [RBX + 0x380] CMP RAX,RCX JZ 0x00159008 MOV EDI,dword ptr [RBP + -0xa20] TEST EDI,EDI JZ 0x00158f2f OR R15D,0x20 MOV RSI,RAX CALL 0x00157e3b MOV RDI,RBX MOV RSI,R14 MOV EDX,R15D MOV RCX,RAX CALL 0x00156e4b TEST EAX,EAX JLE 0x0015901d MOV RAX,qword ptr [RBX + 0x3b0] LAB_00158f2f: LEA RDI,[RBX + 0x200] LEA RSI,[RBP + -0xa48] MOV RDX,RAX CALL 0x00158b84 TEST RAX,RAX MOV ECX,0xffffffff JNZ 0x00158fd8 JMP 0x0015901f LAB_00158f58: MOV EDI,dword ptr [RBP + -0xa20] TEST EDI,EDI JZ 0x00158f8b MOV RSI,qword ptr [RBX + 0x3b0] CALL 0x00157e3b OR R15D,0x20 MOV RDI,RBX MOV RSI,R14 MOV EDX,R15D MOV RCX,RAX CALL 0x00156e4b TEST EAX,EAX JLE 0x0015901d LAB_00158f8b: TEST byte ptr [R12 + 0xa2],0x22 JZ 0x00158fb2 MOV RDI,qword ptr [RBX + 0x200] MOV RSI,qword ptr [R14] CMP RDI,RSI JZ 0x00158fb2 MOV EDX,dword ptr [R14 + 0x14] ADD EDX,dword ptr [R14 + 0x10] CALL 0x00129080 LAB_00158fb2: LEA RDI,[RBX + 0x200] MOV EDX,dword ptr [RBP + -0xa20] MOV ESI,dword ptr [RBP + -0xa1c] LEA RCX,[RBX + 0x3b0] CALL qword ptr [R12 + 0xe0] TEST EAX,EAX JZ 0x00159001 LAB_00158fd8: LEA R14,[RBX + 0x200] MOV RDI,R14 CALL 0x00157fa0 MOV qword ptr [RBX + 0x98],RAX MOV RDI,R14 CALL 0x00158058 MOV qword ptr [RBX + 0xc0],RAX XOR ECX,ECX JMP 0x0015901f LAB_00159001: MOV ECX,0xffffffff JMP 0x0015901f LAB_00159008: OR R15D,0x20 MOV RDI,RBX MOV RSI,R14 MOV EDX,R15D MOV RCX,R13 CALL 0x00156e4b LAB_0015901d: MOV ECX,EAX LAB_0015901f: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00159042 MOV EAX,ECX ADD RSP,0xa48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00159042: CALL 0x00129270
ulong _ma_search_next(long *param_1,int8 *param_2,uint param_3,int8 param_4) { char cVar1; uint uVar2; int iVar3; ulong uVar4; long lVar5; int8 uVar6; long in_FS_OFFSET; int1 *local_a70; long local_a68; int1 local_a50 [40]; int local_a28; int4 local_a24; int1 local_a18 [2528]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); lVar5 = param_2[1]; if ((((param_3 & 8) == 0) || ((ulong)param_1[0x76] < (ulong)param_1[0x77])) && (*(char *)((long)param_1 + 0x684) == '\0')) { if (*(int *)((long)param_1 + 0x3d4) == *(int *)(lVar5 + 0xb8)) { if (*(char *)((long)param_1 + 0x685) == '\0') goto LAB_00158e77; cVar1 = _ma_fetch_keypage(local_a50,param_1,lVar5,param_1[0x89],0,3,param_1[0x70],0); uVar4 = 0xffffffff; if (cVar1 == '\0') { *(int1 *)((long)param_1 + 0x685) = 0; goto LAB_00158e92; } goto LAB_0015901f; } if (((int)param_1[0x7a] == 0) && (*(char *)((long)param_1 + 0x685) == '\0')) { LAB_00158e77: _ma_page_setup(local_a50,param_1,lVar5,0,param_1[0x70]); LAB_00158e92: local_a70 = local_a18; local_a68 = lVar5; if ((param_3 & 8) == 0) { lVar5 = _ma_get_last_key(&local_a70,local_a50,param_1[0x76]); param_1[0x76] = lVar5; uVar4 = 0xffffffff; if (lVar5 != 0) { if (lVar5 == (ulong)*(uint *)(*param_1 + 0x744) + param_1[0x70]) { uVar2 = _ma_search(param_1,param_2,param_3 | 0x20,param_4); LAB_0015901d: uVar4 = (ulong)uVar2; } else { if (local_a28 != 0) { uVar6 = _ma_kpos(local_a28,lVar5); uVar2 = _ma_search(param_1,param_2,param_3 | 0x20,uVar6); if ((int)uVar2 < 1) goto LAB_0015901d; lVar5 = param_1[0x76]; } lVar5 = _ma_get_last_key(param_1 + 0x40,local_a50,lVar5); uVar4 = 0xffffffff; if (lVar5 != 0) goto LAB_00158fd8; } } } else { if (local_a28 != 0) { uVar6 = _ma_kpos(local_a28,param_1[0x76]); uVar2 = _ma_search(param_1,param_2,param_3 | 0x20,uVar6); if ((int)uVar2 < 1) goto LAB_0015901d; } if ((*(byte *)(lVar5 + 0xa2) & 0x22) != 0) { if ((void *)param_1[0x40] != (void *)*param_2) { memcpy((void *)param_1[0x40],(void *)*param_2, (ulong)(uint)(*(int *)((long)param_2 + 0x14) + *(int *)(param_2 + 2))); } } iVar3 = (**(code **)(lVar5 + 0xe0))(param_1 + 0x40,local_a24,local_a28,param_1 + 0x76); if (iVar3 == 0) { uVar4 = 0xffffffff; } else { LAB_00158fd8: lVar5 = _ma_row_pos_from_key(param_1 + 0x40); param_1[0x13] = lVar5; lVar5 = _ma_trid_from_key(param_1 + 0x40); param_1[0x18] = lVar5; uVar4 = 0; } } LAB_0015901f: if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return uVar4; } goto LAB_00159042; } } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { uVar4 = _ma_search(param_1,param_2,param_3 | 0x20,param_4); return uVar4; } LAB_00159042: /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
29,552
write_hook_for_redo
eloqsql/storage/maria/ma_blockrec.c
my_bool write_hook_for_redo(enum translog_record_type type __attribute__ ((unused)), TRN *trn, MARIA_HA *tbl_info __attribute__ ((unused)), LSN *lsn, void *hook_arg __attribute__ ((unused))) { /* Users of dummy_transaction_object must keep this TRN clean as it is used by many threads (like those manipulating non-transactional tables). It might be dangerous if one user sets rec_lsn or some other member and it is picked up by another user (like putting this rec_lsn into a page of a non-transactional table); it's safer if all members stay 0. So non-transactional log records (REPAIR, CREATE, RENAME, DROP) should not call this hook; we trust them but verify ;) */ DBUG_ASSERT(trn->trid != 0); /* If the hook stays so simple, it would be faster to pass !trn->rec_lsn ? trn->rec_lsn : some_dummy_lsn to translog_write_record(), like Monty did in his original code, and not have a hook. For now we keep it like this. */ if (trn->rec_lsn == 0) trn->rec_lsn= *lsn; return 0; }
O3
c
write_hook_for_redo: pushq %rbp movq %rsp, %rbp cmpq $0x0, 0x90(%rsi) jne 0x4e194 movq (%rcx), %rax movq %rax, 0x90(%rsi) xorl %eax, %eax popq %rbp retq
write_hook_for_redo: push rbp mov rbp, rsp cmp qword ptr [rsi+90h], 0 jnz short loc_4E194 mov rax, [rcx] mov [rsi+90h], rax loc_4E194: xor eax, eax pop rbp retn
long long write_hook_for_redo(long long a1, long long a2, long long a3, _QWORD *a4) { if ( !*(_QWORD *)(a2 + 144) ) *(_QWORD *)(a2 + 144) = *a4; return 0LL; }
write_hook_for_redo: PUSH RBP MOV RBP,RSP CMP qword ptr [RSI + 0x90],0x0 JNZ 0x0014e194 MOV RAX,qword ptr [RCX] MOV qword ptr [RSI + 0x90],RAX LAB_0014e194: XOR EAX,EAX POP RBP RET
int8 write_hook_for_redo(int8 param_1,long param_2,int8 param_3,int8 *param_4) { if (*(long *)(param_2 + 0x90) == 0) { *(int8 *)(param_2 + 0x90) = *param_4; } return 0; }
29,553
mthd_supported_buffer_type
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
my_bool mthd_supported_buffer_type(enum enum_field_types type) { switch (type) { case MYSQL_TYPE_BIT: case MYSQL_TYPE_BLOB: case MYSQL_TYPE_DATE: case MYSQL_TYPE_DATETIME: case MYSQL_TYPE_DECIMAL: case MYSQL_TYPE_DOUBLE: case MYSQL_TYPE_FLOAT: case MYSQL_TYPE_GEOMETRY: case MYSQL_TYPE_INT24: case MYSQL_TYPE_LONG: case MYSQL_TYPE_LONG_BLOB: case MYSQL_TYPE_LONGLONG: case MYSQL_TYPE_MEDIUM_BLOB: case MYSQL_TYPE_NEWDATE: case MYSQL_TYPE_NEWDECIMAL: case MYSQL_TYPE_NULL: case MYSQL_TYPE_SHORT: case MYSQL_TYPE_STRING: case MYSQL_TYPE_JSON: case MYSQL_TYPE_TIME: case MYSQL_TYPE_TIMESTAMP: case MYSQL_TYPE_TINY: case MYSQL_TYPE_TINY_BLOB: case MYSQL_TYPE_VAR_STRING: case MYSQL_TYPE_YEAR: return 1; break; default: return 0; break; } }
O3
c
mthd_supported_buffer_type: pushq %rbp movq %rsp, %rbp movb $0x1, %al cmpl $0x10, %edi ja 0x22cbe cmpl $0xf, %edi jne 0x22cd3 addl $0xffffff0b, %edi # imm = 0xFFFFFF0B cmpl $0xa, %edi ja 0x22cd5 movl $0x7f3, %ecx # imm = 0x7F3 btl %edi, %ecx jae 0x22cd5 popq %rbp retq xorl %eax, %eax jmp 0x22cd3
mthd_supported_buffer_type: push rbp mov rbp, rsp mov al, 1 cmp edi, 10h ja short loc_22CBE cmp edi, 0Fh jnz short loc_22CD3 loc_22CBE: add edi, 0FFFFFF0Bh cmp edi, 0Ah ja short loc_22CD5 mov ecx, 7F3h bt ecx, edi jnb short loc_22CD5 loc_22CD3: pop rbp retn loc_22CD5: xor eax, eax jmp short loc_22CD3
char mthd_supported_buffer_type(unsigned int a1) { char result; // al unsigned int v2; // edi int v3; // ecx result = 1; if ( a1 > 0x10 || a1 == 15 ) { v2 = a1 - 245; if ( v2 > 0xA ) return 0; v3 = 2035; if ( !_bittest(&v3, v2) ) return 0; } return result; }
mthd_supported_buffer_type: PUSH RBP MOV RBP,RSP MOV AL,0x1 CMP EDI,0x10 JA 0x00122cbe CMP EDI,0xf JNZ 0x00122cd3 LAB_00122cbe: ADD EDI,0xffffff0b CMP EDI,0xa JA 0x00122cd5 MOV ECX,0x7f3 BT ECX,EDI JNC 0x00122cd5 LAB_00122cd3: POP RBP RET LAB_00122cd5: XOR EAX,EAX JMP 0x00122cd3
int8 mthd_supported_buffer_type(uint param_1) { int8 uVar1; uVar1 = 1; if (((0x10 < param_1) || (param_1 == 0xf)) && ((10 < param_1 - 0xf5 || ((0x7f3U >> (param_1 - 0xf5 & 0x1f) & 1) == 0)))) { uVar1 = 0; } return uVar1; }
29,554
uf_prespace_selected
eloqsql/storage/myisam/mi_packrec.c
static void uf_prespace_selected(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to, uchar *end) { uint spaces; if (get_bit(bit_buff)) { if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end) { bit_buff->error=1; return; } bfill((uchar*) to,spaces,' '); if (to+spaces != end) decode_bytes(rec,bit_buff,to+spaces,end); } else decode_bytes(rec,bit_buff,to,end); }
O3
c
uf_prespace_selected: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %r8 movq %rdx, %r12 movq %rsi, %r14 movq %rdi, %r15 movl 0x4(%rsi), %eax testl %eax, %eax je 0xa2b61 movl (%r14), %ebx decl %eax movl %eax, 0x4(%r14) btl %eax, %ebx jb 0xa2b94 jmp 0xa2b7e movq %r14, %rdi movq %r8, %rbx callq 0xa18dd movq %rbx, %r8 movl $0x1f, 0x4(%r14) movl (%r14), %ebx testl %ebx, %ebx js 0xa2b8f movq %r15, %rdi movq %r14, %rsi movq %r12, %rdx movq %r8, %rcx jmp 0xa2c34 movl $0x1f, %eax movl 0x1c(%r15), %r13d movl %eax, %ecx subl %r13d, %ecx jae 0xa2bea subl %eax, %r13d movl %eax, %eax leaq 0x6ba85(%rip), %rcx # 0x10e630 andl (%rcx,%rax,4), %ebx movl %r13d, %ecx shll %cl, %ebx movq %r14, %rdi movq %r15, -0x30(%rbp) movq %r12, %r15 movq %r8, %r12 callq 0xa18dd movq %r12, %r8 movq %r15, %r12 movq -0x30(%rbp), %r15 movl $0x20, %eax subl %r13d, %eax movl %eax, 0x4(%r14) movl (%r14), %eax negl %r13d movl %r13d, %ecx shrl %cl, %eax addl %eax, %ebx jmp 0xa2bfe movl %ecx, 0x4(%r14) shrl %cl, %ebx movl 0x1c(%r15), %eax leaq 0x6ba35(%rip), %rcx # 0x10e630 andl (%rcx,%rax,4), %ebx movl %ebx, %edx leaq (%r12,%rdx), %r13 cmpq %r8, %r13 jbe 0xa2c13 movl $0x1, 0x28(%r14) jmp 0xa2c47 movq %r12, %rdi movl $0x20, %esi movq %r8, %rbx callq 0x2b2f0 cmpq %rbx, %r13 je 0xa2c47 movq %rbx, %rcx movq %r15, %rdi movq %r14, %rsi movq %r13, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0xa21ce addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
uf_prespace_selected_0: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r8, rcx mov r12, rdx mov r14, rsi mov r15, rdi mov eax, [rsi+4] test eax, eax jz short loc_A2B61 mov ebx, [r14] dec eax mov [r14+4], eax bt ebx, eax jb short loc_A2B94 jmp short loc_A2B7E loc_A2B61: mov rdi, r14 mov rbx, r8 call fill_buffer_0 mov r8, rbx mov dword ptr [r14+4], 1Fh mov ebx, [r14] test ebx, ebx js short loc_A2B8F loc_A2B7E: mov rdi, r15 mov rsi, r14 mov rdx, r12 mov rcx, r8 jmp loc_A2C34 loc_A2B8F: mov eax, 1Fh loc_A2B94: mov r13d, [r15+1Ch] mov ecx, eax sub ecx, r13d jnb short loc_A2BEA sub r13d, eax mov eax, eax lea rcx, mask_0 and ebx, [rcx+rax*4] mov ecx, r13d shl ebx, cl mov rdi, r14 mov [rbp+var_30], r15 mov r15, r12 mov r12, r8 call fill_buffer_0 mov r8, r12 mov r12, r15 mov r15, [rbp+var_30] mov eax, 20h ; ' ' sub eax, r13d mov [r14+4], eax mov eax, [r14] neg r13d mov ecx, r13d shr eax, cl add ebx, eax jmp short loc_A2BFE loc_A2BEA: mov [r14+4], ecx shr ebx, cl mov eax, [r15+1Ch] lea rcx, mask_0 and ebx, [rcx+rax*4] loc_A2BFE: mov edx, ebx lea r13, [r12+rdx] cmp r13, r8 jbe short loc_A2C13 mov dword ptr [r14+28h], 1 jmp short loc_A2C47 loc_A2C13: mov rdi, r12 mov esi, 20h ; ' ' mov rbx, r8 call _memset cmp r13, rbx jz short loc_A2C47 mov rcx, rbx mov rdi, r15 mov rsi, r14 mov rdx, r13 loc_A2C34: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp decode_bytes_0 loc_A2C47: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long uf_prespace_selected_0(long long a1, unsigned int *a2, _BYTE *a3, _BYTE *a4) { _BYTE *v4; // r8 long long v6; // r15 unsigned int v7; // eax unsigned int v8; // ebx unsigned int v9; // eax _BYTE *v11; // rdx _BYTE *v12; // rcx unsigned int v13; // r13d unsigned int v14; // ecx int v15; // r13d int v16; // ebx _BYTE *v17; // r15 _BYTE *v18; // r12 long long result; // rax unsigned int v20; // ebx long long v21; // rdx _BYTE *v22; // r13 _BYTE *v23; // rbx v4 = a4; v6 = a1; v7 = a2[1]; if ( v7 ) { v8 = *a2; v9 = v7 - 1; a2[1] = v9; if ( !_bittest((const int *)&v8, v9) ) goto LABEL_5; } else { fill_buffer_0((long long)a2); v4 = a4; a2[1] = 31; v8 = *a2; if ( (*a2 & 0x80000000) == 0 ) { LABEL_5: v11 = a3; v12 = v4; return (long long)decode_bytes_0(a1, (long long)a2, v11, v12); } v9 = 31; } v13 = *(_DWORD *)(a1 + 28); v14 = v9 - v13; if ( v9 >= v13 ) { a2[1] = v14; result = *(unsigned int *)(a1 + 28); v20 = mask_0[result] & (v8 >> v14); } else { v15 = v13 - v9; v16 = (mask_0[v9] & v8) << v15; v17 = a3; v18 = v4; fill_buffer_0((long long)a2); v4 = v18; a3 = v17; v6 = a1; a2[1] = 32 - v15; result = *a2 >> -(char)v15; v20 = result + v16; } v21 = v20; v22 = &a3[v20]; if ( v22 > v4 ) { a2[10] = 1; return result; } v23 = v4; result = memset(a3, 32LL, v21); if ( v22 != v23 ) { v12 = v23; a1 = v6; v11 = v22; return (long long)decode_bytes_0(a1, (long long)a2, v11, v12); } return result; }
uf_prespace_selected: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R8,RCX MOV R12,RDX MOV R14,RSI MOV R15,RDI MOV EAX,dword ptr [RSI + 0x4] TEST EAX,EAX JZ 0x001a2b61 MOV EBX,dword ptr [R14] DEC EAX MOV dword ptr [R14 + 0x4],EAX BT EBX,EAX JC 0x001a2b94 JMP 0x001a2b7e LAB_001a2b61: MOV RDI,R14 MOV RBX,R8 CALL 0x001a18dd MOV R8,RBX MOV dword ptr [R14 + 0x4],0x1f MOV EBX,dword ptr [R14] TEST EBX,EBX JS 0x001a2b8f LAB_001a2b7e: MOV RDI,R15 MOV RSI,R14 MOV RDX,R12 MOV RCX,R8 JMP 0x001a2c34 LAB_001a2b8f: MOV EAX,0x1f LAB_001a2b94: MOV R13D,dword ptr [R15 + 0x1c] MOV ECX,EAX SUB ECX,R13D JNC 0x001a2bea SUB R13D,EAX MOV EAX,EAX LEA RCX,[0x20e630] AND EBX,dword ptr [RCX + RAX*0x4] MOV ECX,R13D SHL EBX,CL MOV RDI,R14 MOV qword ptr [RBP + -0x30],R15 MOV R15,R12 MOV R12,R8 CALL 0x001a18dd MOV R8,R12 MOV R12,R15 MOV R15,qword ptr [RBP + -0x30] MOV EAX,0x20 SUB EAX,R13D MOV dword ptr [R14 + 0x4],EAX MOV EAX,dword ptr [R14] NEG R13D MOV ECX,R13D SHR EAX,CL ADD EBX,EAX JMP 0x001a2bfe LAB_001a2bea: MOV dword ptr [R14 + 0x4],ECX SHR EBX,CL MOV EAX,dword ptr [R15 + 0x1c] LEA RCX,[0x20e630] AND EBX,dword ptr [RCX + RAX*0x4] LAB_001a2bfe: MOV EDX,EBX LEA R13,[R12 + RDX*0x1] CMP R13,R8 JBE 0x001a2c13 MOV dword ptr [R14 + 0x28],0x1 JMP 0x001a2c47 LAB_001a2c13: MOV RDI,R12 MOV ESI,0x20 MOV RBX,R8 CALL 0x0012b2f0 CMP R13,RBX JZ 0x001a2c47 MOV RCX,RBX MOV RDI,R15 MOV RSI,R14 MOV RDX,R13 LAB_001a2c34: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001a21ce LAB_001a2c47: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void uf_prespace_selected(long param_1,uint *param_2,void *param_3,void *param_4) { void *pvVar1; uint uVar2; uint uVar3; uint uVar4; byte bVar5; uint uVar6; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar6 = *param_2; if (-1 < (int)uVar6) goto LAB_001a2c34; uVar4 = 0x1f; } else { uVar6 = *param_2; uVar4 = param_2[1] - 1; param_2[1] = uVar4; if ((uVar6 >> (uVar4 & 0x1f) & 1) == 0) goto LAB_001a2c34; } uVar2 = *(uint *)(param_1 + 0x1c); if (uVar4 < uVar2) { uVar3 = (&mask)[uVar4]; bVar5 = (byte)(uVar2 - uVar4); fill_buffer(param_2); param_2[1] = 0x20 - (uVar2 - uVar4); uVar6 = ((uVar6 & uVar3) << (bVar5 & 0x1f)) + (*param_2 >> (-bVar5 & 0x1f)); } else { param_2[1] = uVar4 - uVar2; uVar6 = uVar6 >> ((byte)(uVar4 - uVar2) & 0x1f) & (&mask)[*(uint *)(param_1 + 0x1c)]; } pvVar1 = (void *)((long)param_3 + (ulong)uVar6); if (param_4 < pvVar1) { param_2[10] = 1; } else { memset(param_3,0x20,(ulong)uVar6); param_3 = pvVar1; if (pvVar1 != param_4) { LAB_001a2c34: decode_bytes(param_1,param_2,param_3,param_4); return; } } return; }
29,555
my_b_append
eloqsql/mysys/mf_iocache.c
int my_b_append(IO_CACHE *info, const uchar *Buffer, size_t Count) { size_t rest_length,length; MEM_CHECK_DEFINED(Buffer, Count); /* Assert that we cannot come here with a shared cache. If we do one day, we might need to add a call to copy_to_read_buffer(). */ DBUG_ASSERT(!info->share); DBUG_ASSERT(!(info->myflags & MY_ENCRYPT)); lock_append_buffer(info); rest_length= (size_t) (info->write_end - info->write_pos); if (Count <= rest_length) goto end; memcpy(info->write_pos, Buffer, rest_length); Buffer+=rest_length; Count-=rest_length; info->write_pos+=rest_length; if (my_b_flush_io_cache(info,0)) { unlock_append_buffer(info); return 1; } if (Count >= IO_SIZE) { /* Fill first intern buffer */ length= IO_ROUND_DN(Count); if (mysql_file_write(info->file,Buffer, length, info->myflags | MY_NABP)) { unlock_append_buffer(info); return info->error= -1; } Count-=length; Buffer+=length; info->end_of_file+=length; } end: memcpy(info->write_pos,Buffer,(size_t) Count); info->write_pos+=Count; unlock_append_buffer(info); return 0; }
O3
c
my_b_append: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdx, %r13 movq %rsi, %r15 movq %rdi, %r14 addq $0x50, %rdi cmpq $0x0, 0x90(%r14) movq %rdi, -0x38(%rbp) jne 0x5151a callq 0x28530 movq 0x40(%r14), %rdi movq 0x48(%r14), %rbx subq %rdi, %rbx movq %r13, %r12 subq %rbx, %r12 jbe 0x51423 movq %r15, %rsi movq %rbx, %rdx callq 0x282a0 addq %rbx, 0x40(%r14) movq %r14, %rdi xorl %esi, %esi callq 0x508d5 testl %eax, %eax je 0x51463 movq 0x90(%r14), %rdi testq %rdi, %rdi jne 0x51545 movq -0x38(%rbp), %rdi callq 0x28260 movl $0x1, %eax jmp 0x51454 movq %r13, %r12 movq 0x40(%r14), %rdi movq %r15, %rsi movq %r12, %rdx callq 0x282a0 addq %r12, 0x40(%r14) movq 0x90(%r14), %rdi testq %rdi, %rdi jne 0x51530 movq -0x38(%rbp), %rdi callq 0x28260 xorl %eax, %eax addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq addq %rbx, %r15 cmpq $0x1000, %r12 # imm = 0x1000 jb 0x51426 movl %r12d, %ebx andl $0xfffff000, %ebx # imm = 0xFFFFF000 movl 0xd4(%r14), %esi movq 0xf8(%r14), %r13 orq $0x4, %r13 leaq 0x2deebf(%rip), %rax # 0x330350 movq (%rax), %rax leaq -0x90(%rbp), %rdi movl %esi, -0x2c(%rbp) movl $0x7, %edx callq *0x158(%rax) testq %rax, %rax movq %rbx, -0x48(%rbp) jne 0x5155a movl -0x2c(%rbp), %edi movq %r15, %rsi movq %rbx, %rdx movq %r13, %rcx callq 0x2a301 movq %rax, %rbx testq %rbx, %rbx je 0x514fd movq 0x90(%r14), %rdi testq %rdi, %rdi jne 0x515bc movq -0x38(%rbp), %rdi callq 0x28260 movl $0xffffffff, 0xe4(%r14) # imm = 0xFFFFFFFF movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x51454 movabsq $-0xfffff001, %rax # imm = 0xFFFFFFFF00000FFF andq %rax, %r12 movq -0x48(%rbp), %rax addq %rax, %r15 addq %rax, 0x8(%r14) jmp 0x51426 leaq 0x414ce(%rip), %rsi # 0x929ef movl $0x62b, %edx # imm = 0x62B callq 0x29e8c jmp 0x513d3 leaq 0x2dee19(%rip), %rax # 0x330350 movq (%rax), %rax callq *0x160(%rax) jmp 0x51449 leaq 0x2dee04(%rip), %rax # 0x330350 movq (%rax), %rax callq *0x160(%rax) jmp 0x51413 movq %rax, %rcx leaq 0x2dedec(%rip), %rax # 0x330350 movq (%rax), %rax leaq 0x41481(%rip), %rdx # 0x929ef movq %rcx, -0x40(%rbp) movq %rcx, %rdi movq %rbx, %rsi movl $0x63b, %ecx # imm = 0x63B callq *0x210(%rax) movl -0x2c(%rbp), %edi movq %r15, %rsi movq %rbx, %rdx movq %r13, %rcx callq 0x2a301 movq %rbx, %rcx movq %rax, %rbx xorl %esi, %esi testq %rax, %rax cmoveq %rcx, %rsi leaq 0x2deda6(%rip), %rax # 0x330350 movq (%rax), %rax movq -0x40(%rbp), %rdi callq *0x218(%rax) jmp 0x514ca leaq 0x2ded8d(%rip), %rax # 0x330350 movq (%rax), %rax callq *0x160(%rax) jmp 0x514df
my_b_append: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r13, rdx mov r15, rsi mov r14, rdi add rdi, 50h ; 'P' cmp qword ptr [r14+90h], 0 mov [rbp+var_38], rdi jnz loc_5151A call _pthread_mutex_lock loc_513D3: mov rdi, [r14+40h] mov rbx, [r14+48h] sub rbx, rdi mov r12, r13 sub r12, rbx jbe short loc_51423 mov rsi, r15 mov rdx, rbx call _memcpy add [r14+40h], rbx mov rdi, r14 xor esi, esi call my_b_flush_io_cache test eax, eax jz short loc_51463 mov rdi, [r14+90h] test rdi, rdi jnz loc_51545 loc_51413: mov rdi, [rbp+var_38] call _pthread_mutex_unlock mov eax, 1 jmp short loc_51454 loc_51423: mov r12, r13 loc_51426: mov rdi, [r14+40h] mov rsi, r15 mov rdx, r12 call _memcpy add [r14+40h], r12 mov rdi, [r14+90h] test rdi, rdi jnz loc_51530 loc_51449: mov rdi, [rbp+var_38] call _pthread_mutex_unlock xor eax, eax loc_51454: add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_51463: add r15, rbx cmp r12, 1000h jb short loc_51426 mov ebx, r12d and ebx, 0FFFFF000h mov esi, [r14+0D4h] mov r13, [r14+0F8h] or r13, 4 lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_90] mov [rbp+var_2C], esi mov edx, 7 call qword ptr [rax+158h] test rax, rax mov [rbp+var_48], rbx jnz loc_5155A mov edi, [rbp+var_2C] mov rsi, r15 mov rdx, rbx mov rcx, r13 call my_write mov rbx, rax loc_514CA: test rbx, rbx jz short loc_514FD mov rdi, [r14+90h] test rdi, rdi jnz loc_515BC loc_514DF: mov rdi, [rbp+var_38] call _pthread_mutex_unlock mov dword ptr [r14+0E4h], 0FFFFFFFFh mov eax, 0FFFFFFFFh jmp loc_51454 loc_514FD: mov rax, 0FFFFFFFF00000FFFh and r12, rax mov rax, [rbp+var_48] add r15, rax add [r14+8], rax jmp loc_51426 loc_5151A: lea rsi, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 62Bh call psi_mutex_lock jmp loc_513D3 loc_51530: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_51449 loc_51545: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_51413 loc_5155A: mov rcx, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"... mov [rbp+var_40], rcx mov rdi, rcx mov rsi, rbx mov ecx, 63Bh call qword ptr [rax+210h] mov edi, [rbp+var_2C] mov rsi, r15 mov rdx, rbx mov rcx, r13 call my_write mov rcx, rbx mov rbx, rax xor esi, esi test rax, rax cmovz rsi, rcx lea rax, PSI_server mov rax, [rax] mov rdi, [rbp+var_40] call qword ptr [rax+218h] jmp loc_514CA loc_515BC: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_514DF
long long my_b_append(long long a1, long long a2, unsigned long long a3) { long long v4; // r15 long long v6; // rdi bool v7; // zf long long v8; // rdi unsigned long long v9; // rbx unsigned long long v10; // r12 long long v12; // r13 long long v13; // rax long long v14; // rbx long long v15; // rsi _BYTE v16[72]; // [rsp+0h] [rbp-90h] BYREF long long v17; // [rsp+48h] [rbp-48h] long long v18; // [rsp+50h] [rbp-40h] long long v19; // [rsp+58h] [rbp-38h] unsigned int v20; // [rsp+64h] [rbp-2Ch] v4 = a2; v6 = a1 + 80; v7 = *(_QWORD *)(a1 + 144) == 0LL; v19 = v6; if ( v7 ) pthread_mutex_lock(v6); else psi_mutex_lock(v6, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x62Bu); v8 = *(_QWORD *)(a1 + 64); v9 = *(_QWORD *)(a1 + 72) - v8; v10 = a3 - v9; if ( a3 <= v9 ) { v10 = a3; } else { memcpy(v8, a2, *(_QWORD *)(a1 + 72) - v8); *(_QWORD *)(a1 + 64) += v9; if ( (unsigned int)my_b_flush_io_cache((long long *)a1, 0) ) { if ( *(_QWORD *)(a1 + 144) ) PSI_server[44](); pthread_mutex_unlock(v19); return 1LL; } v4 = v9 + a2; if ( v10 >= 0x1000 ) { v12 = *(_QWORD *)(a1 + 248) | 4LL; v20 = *(_DWORD *)(a1 + 212); v13 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v16, v20, 7LL); v17 = (unsigned int)v10 & 0xFFFFF000; if ( v13 ) { v18 = v13; ((void ( *)(long long, unsigned long long, const char *, long long))PSI_server[66])( v13, v10 & 0xFFFFF000, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 1595LL); v14 = my_write(v20, v4, (unsigned int)v10 & 0xFFFFF000, v12); v15 = 0LL; if ( !v14 ) v15 = (unsigned int)v10 & 0xFFFFF000; ((void ( *)(long long, long long))PSI_server[67])(v18, v15); } else { v14 = my_write(v20, v4, (unsigned int)v10 & 0xFFFFF000, v12); } if ( v14 ) { if ( *(_QWORD *)(a1 + 144) ) PSI_server[44](); pthread_mutex_unlock(v19); *(_DWORD *)(a1 + 228) = -1; return 0xFFFFFFFFLL; } v10 &= 0xFFFFFFFF00000FFFLL; v4 += v17; *(_QWORD *)(a1 + 8) += v17; } } memcpy(*(_QWORD *)(a1 + 64), v4, v10); *(_QWORD *)(a1 + 64) += v10; if ( *(_QWORD *)(a1 + 144) ) PSI_server[44](); pthread_mutex_unlock(v19); return 0LL; }
my_b_append: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R13,RDX MOV R15,RSI MOV R14,RDI ADD RDI,0x50 CMP qword ptr [R14 + 0x90],0x0 MOV qword ptr [RBP + -0x38],RDI JNZ 0x0015151a CALL 0x00128530 LAB_001513d3: MOV RDI,qword ptr [R14 + 0x40] MOV RBX,qword ptr [R14 + 0x48] SUB RBX,RDI MOV R12,R13 SUB R12,RBX JBE 0x00151423 MOV RSI,R15 MOV RDX,RBX CALL 0x001282a0 ADD qword ptr [R14 + 0x40],RBX MOV RDI,R14 XOR ESI,ESI CALL 0x001508d5 TEST EAX,EAX JZ 0x00151463 MOV RDI,qword ptr [R14 + 0x90] TEST RDI,RDI JNZ 0x00151545 LAB_00151413: MOV RDI,qword ptr [RBP + -0x38] CALL 0x00128260 MOV EAX,0x1 JMP 0x00151454 LAB_00151423: MOV R12,R13 LAB_00151426: MOV RDI,qword ptr [R14 + 0x40] MOV RSI,R15 MOV RDX,R12 CALL 0x001282a0 ADD qword ptr [R14 + 0x40],R12 MOV RDI,qword ptr [R14 + 0x90] TEST RDI,RDI JNZ 0x00151530 LAB_00151449: MOV RDI,qword ptr [RBP + -0x38] CALL 0x00128260 XOR EAX,EAX LAB_00151454: ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00151463: ADD R15,RBX CMP R12,0x1000 JC 0x00151426 MOV EBX,R12D AND EBX,0xfffff000 MOV ESI,dword ptr [R14 + 0xd4] MOV R13,qword ptr [R14 + 0xf8] OR R13,0x4 LEA RAX,[0x430350] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x90] MOV dword ptr [RBP + -0x2c],ESI MOV EDX,0x7 CALL qword ptr [RAX + 0x158] TEST RAX,RAX MOV qword ptr [RBP + -0x48],RBX JNZ 0x0015155a MOV EDI,dword ptr [RBP + -0x2c] MOV RSI,R15 MOV RDX,RBX MOV RCX,R13 CALL 0x0012a301 MOV RBX,RAX LAB_001514ca: TEST RBX,RBX JZ 0x001514fd MOV RDI,qword ptr [R14 + 0x90] TEST RDI,RDI JNZ 0x001515bc LAB_001514df: MOV RDI,qword ptr [RBP + -0x38] CALL 0x00128260 MOV dword ptr [R14 + 0xe4],0xffffffff MOV EAX,0xffffffff JMP 0x00151454 LAB_001514fd: MOV RAX,-0xfffff001 AND R12,RAX MOV RAX,qword ptr [RBP + -0x48] ADD R15,RAX ADD qword ptr [R14 + 0x8],RAX JMP 0x00151426 LAB_0015151a: LEA RSI,[0x1929ef] MOV EDX,0x62b CALL 0x00129e8c JMP 0x001513d3 LAB_00151530: LEA RAX,[0x430350] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00151449 LAB_00151545: LEA RAX,[0x430350] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00151413 LAB_0015155a: MOV RCX,RAX LEA RAX,[0x430350] MOV RAX,qword ptr [RAX] LEA RDX,[0x1929ef] MOV qword ptr [RBP + -0x40],RCX MOV RDI,RCX MOV RSI,RBX MOV ECX,0x63b CALL qword ptr [RAX + 0x210] MOV EDI,dword ptr [RBP + -0x2c] MOV RSI,R15 MOV RDX,RBX MOV RCX,R13 CALL 0x0012a301 MOV RCX,RBX MOV RBX,RAX XOR ESI,ESI TEST RAX,RAX CMOVZ RSI,RCX LEA RAX,[0x430350] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x40] CALL qword ptr [RAX + 0x218] JMP 0x001514ca LAB_001515bc: LEA RAX,[0x430350] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x001514df
int8 my_b_append(long param_1,void *param_2,ulong param_3) { int iVar1; long lVar2; ulong uVar3; ulong uVar4; ulong uVar5; int1 local_98 [72]; ulong local_50; long local_48; pthread_mutex_t *local_40; int4 local_34; local_40 = (pthread_mutex_t *)(param_1 + 0x50); if (*(long *)(param_1 + 0x90) == 0) { pthread_mutex_lock(local_40); } else { psi_mutex_lock(local_40,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x62b); } uVar3 = *(long *)(param_1 + 0x48) - (long)*(void **)(param_1 + 0x40); uVar4 = param_3 - uVar3; if (uVar3 <= param_3 && uVar4 != 0) { memcpy(*(void **)(param_1 + 0x40),param_2,uVar3); *(long *)(param_1 + 0x40) = *(long *)(param_1 + 0x40) + uVar3; iVar1 = my_b_flush_io_cache(param_1,0); if (iVar1 != 0) { if (*(long *)(param_1 + 0x90) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(local_40); return 1; } param_2 = (void *)((long)param_2 + uVar3); param_3 = uVar4; if (0xfff < uVar4) { uVar3 = (ulong)((uint)uVar4 & 0xfffff000); local_34 = *(int4 *)(param_1 + 0xd4); uVar5 = *(ulong *)(param_1 + 0xf8) | 4; lVar2 = (**(code **)(PSI_server + 0x158))(local_98,local_34,7); local_50 = uVar3; if (lVar2 == 0) { lVar2 = my_write(local_34,param_2,uVar3,uVar5); } else { local_48 = lVar2; (**(code **)(PSI_server + 0x210)) (lVar2,uVar3,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x63b); lVar2 = my_write(local_34,param_2,uVar3,uVar5); uVar5 = 0; if (lVar2 == 0) { uVar5 = uVar3; } (**(code **)(PSI_server + 0x218))(local_48,uVar5); } if (lVar2 != 0) { if (*(long *)(param_1 + 0x90) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(local_40); *(int4 *)(param_1 + 0xe4) = 0xffffffff; return 0xffffffff; } param_3 = uVar4 & 0xffffffff00000fff; param_2 = (void *)((long)param_2 + local_50); *(long *)(param_1 + 8) = *(long *)(param_1 + 8) + local_50; } } memcpy(*(void **)(param_1 + 0x40),param_2,param_3); *(long *)(param_1 + 0x40) = *(long *)(param_1 + 0x40) + param_3; if (*(long *)(param_1 + 0x90) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(local_40); return 0; }
29,556
rtree_fill_reinsert_list
eloqsql/storage/myisam/rt_index.c
static int rtree_fill_reinsert_list(stPageList *ReinsertList, my_off_t page, int level) { DBUG_ENTER("rtree_fill_reinsert_list"); DBUG_PRINT("rtree", ("page: %lu level: %d", (ulong) page, level)); if (ReinsertList->n_pages == ReinsertList->m_pages) { ReinsertList->m_pages += REINSERT_BUFFER_INC; if (!(ReinsertList->pages = (stPageLevel*) my_realloc(mi_key_memory_stPageList_pages, (uchar*)ReinsertList->pages, ReinsertList->m_pages * sizeof(stPageLevel), MYF(MY_ALLOW_ZERO_PTR)))) goto err1; } /* save page to ReinsertList */ ReinsertList->pages[ReinsertList->n_pages].offs = page; ReinsertList->pages[ReinsertList->n_pages].level = level; ReinsertList->n_pages++; DBUG_RETURN(0); err1: DBUG_RETURN(-1); /* purecov: inspected */ }
O0
c
rtree_fill_reinsert_list: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) jmp 0xcc035 movq -0x10(%rbp), %rax movq (%rax), %rax movq -0x10(%rbp), %rcx cmpq 0x8(%rcx), %rax jne 0xcc08f movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx addq $0xa, %rcx movq %rcx, 0x8(%rax) leaq 0xbb94b7(%rip), %rax # 0xc85514 movl (%rax), %edi movq -0x10(%rbp), %rax movq 0x10(%rax), %rsi movq -0x10(%rbp), %rax movq 0x8(%rax), %rdx shlq $0x4, %rdx movl $0x40, %ecx callq 0xf8520 movq -0x10(%rbp), %rcx movq %rax, 0x10(%rcx) cmpq $0x0, %rax jne 0xcc08d jmp 0xcc0df jmp 0xcc08f movq -0x18(%rbp), %rcx movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq -0x10(%rbp), %rdx movq (%rdx), %rdx shlq $0x4, %rdx addq %rdx, %rax movq %rcx, 0x8(%rax) movl -0x1c(%rbp), %ecx movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq -0x10(%rbp), %rdx movq (%rdx), %rdx shlq $0x4, %rdx addq %rdx, %rax movl %ecx, (%rax) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x1, %rcx movq %rcx, (%rax) movl $0x0, -0x4(%rbp) jmp 0xcc0e8 jmp 0xcc0e1 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax,%rax)
rtree_fill_reinsert_list: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx jmp short $+2 loc_CC035: mov rax, [rbp+var_10] mov rax, [rax] mov rcx, [rbp+var_10] cmp rax, [rcx+8] jnz short loc_CC08F mov rax, [rbp+var_10] mov rcx, [rax+8] add rcx, 0Ah mov [rax+8], rcx lea rax, mi_key_memory_stPageList_pages mov edi, [rax] mov rax, [rbp+var_10] mov rsi, [rax+10h] mov rax, [rbp+var_10] mov rdx, [rax+8] shl rdx, 4 mov ecx, 40h ; '@' call my_realloc mov rcx, [rbp+var_10] mov [rcx+10h], rax cmp rax, 0 jnz short loc_CC08D jmp short loc_CC0DF loc_CC08D: jmp short $+2 loc_CC08F: mov rcx, [rbp+var_18] mov rax, [rbp+var_10] mov rax, [rax+10h] mov rdx, [rbp+var_10] mov rdx, [rdx] shl rdx, 4 add rax, rdx mov [rax+8], rcx mov ecx, [rbp+var_1C] mov rax, [rbp+var_10] mov rax, [rax+10h] mov rdx, [rbp+var_10] mov rdx, [rdx] shl rdx, 4 add rax, rdx mov [rax], ecx mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 1 mov [rax], rcx mov [rbp+var_4], 0 jmp short loc_CC0E8 loc_CC0DF: jmp short $+2 loc_CC0E1: mov [rbp+var_4], 0FFFFFFFFh loc_CC0E8: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long rtree_fill_reinsert_list(_QWORD *a1, long long a2, int a3) { long long v3; // rax if ( *a1 == a1[1] && (a1[1] += 10LL, v3 = my_realloc(mi_key_memory_stPageList_pages, a1[2], 16LL * a1[1], 64LL), (a1[2] = v3) == 0LL) ) { return (unsigned int)-1; } else { *(_QWORD *)(16LL * *a1 + a1[2] + 8) = a2; *(_DWORD *)(16LL * (*a1)++ + a1[2]) = a3; return 0; } }
rtree_fill_reinsert_list: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX JMP 0x001cc035 LAB_001cc035: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x8] JNZ 0x001cc08f MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] ADD RCX,0xa MOV qword ptr [RAX + 0x8],RCX LEA RAX,[0xd85514] MOV EDI,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x8] SHL RDX,0x4 MOV ECX,0x40 CALL 0x001f8520 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x10],RAX CMP RAX,0x0 JNZ 0x001cc08d JMP 0x001cc0df LAB_001cc08d: JMP 0x001cc08f LAB_001cc08f: MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RDX] SHL RDX,0x4 ADD RAX,RDX MOV qword ptr [RAX + 0x8],RCX MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RDX] SHL RDX,0x4 ADD RAX,RDX MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x1 MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x0 JMP 0x001cc0e8 LAB_001cc0df: JMP 0x001cc0e1 LAB_001cc0e1: MOV dword ptr [RBP + -0x4],0xffffffff LAB_001cc0e8: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 rtree_fill_reinsert_list(long *param_1,int8 param_2,int4 param_3) { long lVar1; if (*param_1 == param_1[1]) { param_1[1] = param_1[1] + 10; lVar1 = my_realloc(mi_key_memory_stPageList_pages,param_1[2],param_1[1] << 4,0x40); param_1[2] = lVar1; if (lVar1 == 0) { return 0xffffffff; } } *(int8 *)(param_1[2] + *param_1 * 0x10 + 8) = param_2; *(int4 *)(param_1[2] + *param_1 * 0x10) = param_3; *param_1 = *param_1 + 1; return 0; }
29,557
getopt_ll_limit_value
eloqsql/mysys/my_getopt.c
longlong getopt_ll_limit_value(longlong num, const struct my_option *optp, my_bool *fix) { longlong old= num; my_bool adjusted= FALSE; char buf1[255], buf2[255]; ulonglong block_size= (optp->block_size ? (ulonglong) optp->block_size : 1L); DBUG_ENTER("getopt_ll_limit_value"); if (num > 0 && ((ulonglong) num > (ulonglong) optp->max_value) && optp->max_value) /* if max value is not set -> no upper limit */ { num= (ulonglong) optp->max_value; adjusted= TRUE; } switch ((optp->var_type & GET_TYPE_MASK)) { case GET_INT: if (num > (longlong) INT_MAX) { num= ((longlong) INT_MAX); adjusted= TRUE; } break; case GET_LONG: #if SIZEOF_LONG < SIZEOF_LONG_LONG if (num > (longlong) LONG_MAX) { num= ((longlong) LONG_MAX); adjusted= TRUE; } #endif break; default: DBUG_ASSERT((optp->var_type & GET_TYPE_MASK) == GET_LL); break; } num= (num / block_size); num= (longlong) (num * block_size); if (num < optp->min_value) { num= optp->min_value; if (old < optp->min_value) adjusted= TRUE; } if (fix) *fix= old != num; else if (adjusted) my_getopt_error_reporter(WARNING_LEVEL, "option '%s': signed value %s adjusted to %s", optp->name, llstr(old, buf1), llstr(num, buf2)); DBUG_RETURN(num); }
O3
c
getopt_ll_limit_value: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x210, %rsp # imm = 0x210 movq %rdx, %rcx movq %fs:0x28, %rax movq %rax, -0x28(%rbp) movq 0x60(%rsi), %r10 cmpq $0x1, %r10 adcq $0x0, %r10 testq %rdi, %rdi jle 0xa2210 movq 0x50(%rsi), %rax cmpq %rdi, %rax setae %dl testq %rax, %rax sete %r9b orb %dl, %r9b cmovneq %rdi, %rax jmp 0xa2216 movb $0x1, %r9b movq %rdi, %rax movl 0x30(%rsi), %edx andl $0x3f, %edx cmpl $0x3, %edx setne %dl movl $0x80000000, %r8d # imm = 0x80000000 cmpq %r8, %rax setl %r11b orb %dl, %r11b movl $0x7fffffff, %r8d # imm = 0x7FFFFFFF cmovneq %rax, %r8 movq %r8, %rax xorl %edx, %edx divq %r10 subq %rdx, %r8 movq 0x48(%rsi), %rax cmpq %rax, %r8 movq %rax, %rbx cmovgq %r8, %rbx testq %rcx, %rcx je 0xa2262 cmpq %rdi, %rbx setne (%rcx) jmp 0xa22bd cmpq %rax, %r8 setge %cl cmpq %rdi, %rax setle %al orb %cl, %al andb %r11b, %al testb %r9b, %al jne 0xa22bd leaq 0x2eb699(%rip), %rax # 0x38d918 movq (%rax), %r12 movq (%rsi), %r14 leaq -0x130(%rbp), %rsi callq 0xdbda8 movq %rax, %r15 leaq -0x230(%rbp), %rsi movq %rbx, %rdi callq 0xdbda8 leaq 0x40ae9(%rip), %rsi # 0xe2d93 movl $0x1, %edi movq %r14, %rdx movq %r15, %rcx movq %rax, %r8 xorl %eax, %eax callq *%r12 movq %fs:0x28, %rax cmpq -0x28(%rbp), %rax jne 0xa22df movq %rbx, %rax addq $0x210, %rsp # imm = 0x210 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq callq 0x2a270
getopt_ll_limit_value: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 210h mov rcx, rdx mov rax, fs:28h mov [rbp+var_28], rax mov r10, [rsi+60h] cmp r10, 1 adc r10, 0 test rdi, rdi jle short loc_A2210 mov rax, [rsi+50h] cmp rax, rdi setnb dl test rax, rax setz r9b or r9b, dl cmovnz rax, rdi jmp short loc_A2216 loc_A2210: mov r9b, 1 mov rax, rdi loc_A2216: mov edx, [rsi+30h] and edx, 3Fh cmp edx, 3 setnz dl mov r8d, 80000000h cmp rax, r8 setl r11b or r11b, dl mov r8d, 7FFFFFFFh cmovnz r8, rax mov rax, r8 xor edx, edx div r10 sub r8, rdx mov rax, [rsi+48h] cmp r8, rax mov rbx, rax cmovg rbx, r8 test rcx, rcx jz short loc_A2262 cmp rbx, rdi setnz byte ptr [rcx] jmp short loc_A22BD loc_A2262: cmp r8, rax setnl cl cmp rax, rdi setle al or al, cl and al, r11b test al, r9b jnz short loc_A22BD lea rax, my_getopt_error_reporter mov r12, [rax] mov r14, [rsi] lea rsi, [rbp+var_130] call llstr mov r15, rax lea rsi, [rbp+var_230] mov rdi, rbx call llstr lea rsi, aOptionSSignedV; "option '%s': signed value %s adjusted t"... mov edi, 1 mov rdx, r14 mov rcx, r15 mov r8, rax xor eax, eax call r12 loc_A22BD: mov rax, fs:28h cmp rax, [rbp+var_28] jnz short loc_A22DF mov rax, rbx add rsp, 210h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_A22DF: call ___stack_chk_fail
long long getopt_ll_limit_value(long long a1, long long a2, bool *a3) { long long v3; // rax bool v4; // r9 bool v5; // r11 unsigned long long v6; // r8 signed long long v7; // r8 long long v8; // rax long long v9; // rbx long long (*v10)(int, const char *, ...); // r12 const char *v11; // r14 const char *v12; // r15 const char *v13; // rax char v15[256]; // [rsp+0h] [rbp-230h] BYREF char v16[264]; // [rsp+100h] [rbp-130h] BYREF unsigned long long v17; // [rsp+208h] [rbp-28h] v17 = __readfsqword(0x28u); if ( a1 <= 0 ) { v4 = 1; v3 = a1; } else { v3 = *(_QWORD *)(a2 + 80); v4 = v3 >= (unsigned long long)a1 || v3 == 0; if ( v4 ) v3 = a1; } v5 = (*(_DWORD *)(a2 + 48) & 0x3F) != 3 || v3 < 0x80000000LL; v6 = 0x7FFFFFFFLL; if ( v5 ) v6 = v3; v7 = v6 - v6 % ((unsigned long long)(*(_QWORD *)(a2 + 96) == 0LL) + *(_QWORD *)(a2 + 96)); v8 = *(_QWORD *)(a2 + 72); v9 = v8; if ( v7 > v8 ) v9 = v7; if ( a3 ) { *a3 = v9 != a1; } else if ( !v4 || !v5 || v7 < v8 && v8 > a1 ) { v10 = my_getopt_error_reporter; v11 = *(const char **)a2; v12 = (const char *)llstr(a1, v16); v13 = (const char *)llstr(v9, v15); v10(1, "option '%s': signed value %s adjusted to %s", v11, v12, v13); } return v9; }
getopt_ll_limit_value: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x210 MOV RCX,RDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX MOV R10,qword ptr [RSI + 0x60] CMP R10,0x1 ADC R10,0x0 TEST RDI,RDI JLE 0x001a2210 MOV RAX,qword ptr [RSI + 0x50] CMP RAX,RDI SETNC DL TEST RAX,RAX SETZ R9B OR R9B,DL CMOVNZ RAX,RDI JMP 0x001a2216 LAB_001a2210: MOV R9B,0x1 MOV RAX,RDI LAB_001a2216: MOV EDX,dword ptr [RSI + 0x30] AND EDX,0x3f CMP EDX,0x3 SETNZ DL MOV R8D,0x80000000 CMP RAX,R8 SETL R11B OR R11B,DL MOV R8D,0x7fffffff CMOVNZ R8,RAX MOV RAX,R8 XOR EDX,EDX DIV R10 SUB R8,RDX MOV RAX,qword ptr [RSI + 0x48] CMP R8,RAX MOV RBX,RAX CMOVG RBX,R8 TEST RCX,RCX JZ 0x001a2262 CMP RBX,RDI SETNZ byte ptr [RCX] JMP 0x001a22bd LAB_001a2262: CMP R8,RAX SETGE CL CMP RAX,RDI SETLE AL OR AL,CL AND AL,R11B TEST AL,R9B JNZ 0x001a22bd LEA RAX,[0x48d918] MOV R12,qword ptr [RAX] MOV R14,qword ptr [RSI] LEA RSI,[RBP + -0x130] CALL 0x001dbda8 MOV R15,RAX LEA RSI,[RBP + -0x230] MOV RDI,RBX CALL 0x001dbda8 LEA RSI,[0x1e2d93] MOV EDI,0x1 MOV RDX,R14 MOV RCX,R15 MOV R8,RAX XOR EAX,EAX CALL R12 LAB_001a22bd: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x28] JNZ 0x001a22df MOV RAX,RBX ADD RSP,0x210 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001a22df: CALL 0x0012a270
ulong getopt_ll_limit_value(ulong param_1,int8 *param_2,long param_3) { ulong uVar1; int8 uVar2; int *puVar3; ulong uVar4; int8 uVar5; int8 uVar6; ulong uVar7; ulong uVar8; bool bVar9; long in_FS_OFFSET; bool bVar10; int1 local_238 [256]; int1 local_138 [264]; long local_30; puVar3 = my_getopt_error_reporter; local_30 = *(long *)(in_FS_OFFSET + 0x28); if ((long)param_1 < 1) { bVar9 = true; uVar4 = param_1; } else { uVar4 = param_2[10]; bVar9 = uVar4 == 0 || param_1 <= uVar4; if (uVar4 == 0 || param_1 <= uVar4) { uVar4 = param_1; } } bVar10 = (*(uint *)(param_2 + 6) & 0x3f) != 3; uVar8 = 0x7fffffff; if ((long)uVar4 < 0x80000000 || bVar10) { uVar8 = uVar4; } uVar8 = uVar8 - uVar8 % (param_2[0xc] + (ulong)(param_2[0xc] == 0)); uVar1 = param_2[9]; uVar7 = uVar1; if ((long)uVar1 < (long)uVar8) { uVar7 = uVar8; } if (param_3 == 0) { if (!(bool)((((long)uVar1 <= (long)param_1 || (long)uVar1 <= (long)uVar8) && ((long)uVar4 < 0x80000000 || bVar10)) & bVar9)) { uVar2 = *param_2; uVar5 = llstr(param_1,local_138); uVar6 = llstr(uVar7,local_238); (*(code *)puVar3)(1,"option \'%s\': signed value %s adjusted to %s",uVar2,uVar5,uVar6); } } else { *(bool *)param_3 = uVar7 != param_1; } if (*(long *)(in_FS_OFFSET + 0x28) != local_30) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar7; }
29,558
get_charset_number_internal
eloqsql/mysys/charset.c
static uint get_charset_number_internal(const char *charset_name, uint cs_flags) { CHARSET_INFO **cs; for (cs= all_charsets; cs < all_charsets + array_elements(all_charsets); cs++) { if ( cs[0] && cs[0]->cs_name.str && (cs[0]->state & cs_flags) && !my_strcasecmp(&my_charset_latin1, cs[0]->cs_name.str, charset_name)) return cs[0]->number; } return 0; }
O0
c
get_charset_number_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) leaq 0x35e76a(%rip), %rax # 0x391e10 movq %rax, -0x20(%rbp) leaq 0x35e75f(%rip), %rax # 0x391e10 addq $0x4000, %rax # imm = 0x4000 cmpq %rax, -0x20(%rbp) jae 0x33737 movq -0x20(%rbp), %rax cmpq $0x0, (%rax) je 0x33724 movq -0x20(%rbp), %rax movq (%rax), %rax cmpq $0x0, 0x10(%rax) je 0x33724 movq -0x20(%rbp), %rax movq (%rax), %rax movl 0xc(%rax), %eax andl -0x14(%rbp), %eax cmpl $0x0, %eax je 0x33724 leaq 0x24c742(%rip), %rax # 0x27fe30 movq 0xc0(%rax), %rax movq 0x40(%rax), %rax movq -0x20(%rbp), %rcx movq (%rcx), %rcx movq 0x10(%rcx), %rsi movq -0x10(%rbp), %rdx leaq 0x24c721(%rip), %rdi # 0x27fe30 callq *%rax cmpl $0x0, %eax jne 0x33724 movq -0x20(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0x3373e jmp 0x33726 movq -0x20(%rbp), %rax addq $0x8, %rax movq %rax, -0x20(%rbp) jmp 0x336aa movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
get_charset_number_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_14], esi lea rax, all_charsets mov [rbp+var_20], rax loc_336AA: lea rax, all_charsets add rax, 4000h cmp [rbp+var_20], rax jnb short loc_33737 mov rax, [rbp+var_20] cmp qword ptr [rax], 0 jz short loc_33724 mov rax, [rbp+var_20] mov rax, [rax] cmp qword ptr [rax+10h], 0 jz short loc_33724 mov rax, [rbp+var_20] mov rax, [rax] mov eax, [rax+0Ch] and eax, [rbp+var_14] cmp eax, 0 jz short loc_33724 lea rax, my_charset_latin1 mov rax, [rax+0C0h] mov rax, [rax+40h] mov rcx, [rbp+var_20] mov rcx, [rcx] mov rsi, [rcx+10h] mov rdx, [rbp+var_10] lea rdi, my_charset_latin1 call rax cmp eax, 0 jnz short loc_33724 mov rax, [rbp+var_20] mov rax, [rax] mov eax, [rax] mov [rbp+var_4], eax jmp short loc_3373E loc_33724: jmp short $+2 loc_33726: mov rax, [rbp+var_20] add rax, 8 mov [rbp+var_20], rax jmp loc_336AA loc_33737: mov [rbp+var_4], 0 loc_3373E: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long get_charset_number_internal(long long a1, int a2) { unsigned int **i; // [rsp+0h] [rbp-20h] for ( i = (unsigned int **)all_charsets; i < &all_charsets[2048]; ++i ) { if ( *i && *((_QWORD *)*i + 2) && (a2 & (*i)[3]) != 0 && !(*(unsigned int ( **)(void *, _QWORD, long long))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, *((_QWORD *)*i + 2), a1) ) { return **i; } } return 0; }
get_charset_number_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI LEA RAX,[0x491e10] MOV qword ptr [RBP + -0x20],RAX LAB_001336aa: LEA RAX,[0x491e10] ADD RAX,0x4000 CMP qword ptr [RBP + -0x20],RAX JNC 0x00133737 MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX],0x0 JZ 0x00133724 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0x10],0x0 JZ 0x00133724 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0xc] AND EAX,dword ptr [RBP + -0x14] CMP EAX,0x0 JZ 0x00133724 LEA RAX,[0x37fe30] MOV RAX,qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX] MOV RSI,qword ptr [RCX + 0x10] MOV RDX,qword ptr [RBP + -0x10] LEA RDI,[0x37fe30] CALL RAX CMP EAX,0x0 JNZ 0x00133724 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX JMP 0x0013373e LAB_00133724: JMP 0x00133726 LAB_00133726: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x8 MOV qword ptr [RBP + -0x20],RAX JMP 0x001336aa LAB_00133737: MOV dword ptr [RBP + -0x4],0x0 LAB_0013373e: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 get_charset_number_internal(int8 param_1,uint param_2) { int iVar1; long *local_28; local_28 = &all_charsets; while( true ) { if ((long *)0x495e0f < local_28) { return 0; } if ((((*local_28 != 0) && (*(long *)(*local_28 + 0x10) != 0)) && ((*(uint *)(*local_28 + 0xc) & param_2) != 0)) && (iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_0037fef0 + 0x40)) (&my_charset_latin1,*(int8 *)(*local_28 + 0x10),param_1), iVar1 == 0 )) break; local_28 = local_28 + 1; } return *(int4 *)*local_28; }
29,559
my_numcells_sjis
eloqsql/strings/ctype-sjis.c
static size_t my_numcells_sjis(CHARSET_INFO *cs __attribute__((unused)), const char *str, const char *str_end) { size_t clen; const uchar *b= (const uchar *) str; const uchar *e= (const uchar *) str_end; for (clen= 0; b < e; ) { if (*b >= 0xA1 && *b <= 0xDF) { clen++; b++; } else if (*b > 0x7F) { clen+= 2; b+= 2; } else { clen++; b++; } } return clen; }
O0
c
my_numcells_sjis: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq $0x0, -0x20(%rbp) movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x5883d movq -0x28(%rbp), %rax movzbl (%rax), %eax cmpl $0xa1, %eax jl 0x587f8 movq -0x28(%rbp), %rax movzbl (%rax), %eax cmpl $0xdf, %eax jg 0x587f8 movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x58838 movq -0x28(%rbp), %rax movzbl (%rax), %eax cmpl $0x7f, %eax jle 0x5881e movq -0x20(%rbp), %rax addq $0x2, %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rax addq $0x2, %rax movq %rax, -0x28(%rbp) jmp 0x58836 movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x58838 jmp 0x587b8 movq -0x20(%rbp), %rax popq %rbp retq nopw %cs:(%rax,%rax)
my_numcells_sjis: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_10] mov [rbp+var_28], rax mov rax, [rbp+var_18] mov [rbp+var_30], rax mov [rbp+var_20], 0 loc_587B8: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jnb short loc_5883D mov rax, [rbp+var_28] movzx eax, byte ptr [rax] cmp eax, 0A1h jl short loc_587F8 mov rax, [rbp+var_28] movzx eax, byte ptr [rax] cmp eax, 0DFh jg short loc_587F8 mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax jmp short loc_58838 loc_587F8: mov rax, [rbp+var_28] movzx eax, byte ptr [rax] cmp eax, 7Fh jle short loc_5881E mov rax, [rbp+var_20] add rax, 2 mov [rbp+var_20], rax mov rax, [rbp+var_28] add rax, 2 mov [rbp+var_28], rax jmp short loc_58836 loc_5881E: mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax loc_58836: jmp short $+2 loc_58838: jmp loc_587B8 loc_5883D: mov rax, [rbp+var_20] pop rbp retn
long long my_numcells_sjis(long long a1, unsigned __int8 *a2, unsigned long long a3) { long long v5; // [rsp+10h] [rbp-20h] v5 = 0LL; while ( (unsigned long long)a2 < a3 ) { if ( *a2 < 0xA1u || *a2 > 0xDFu ) { if ( *a2 <= 0x7Fu ) { ++v5; ++a2; } else { v5 += 2LL; a2 += 2; } } else { ++v5; ++a2; } } return v5; }
my_numcells_sjis: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV qword ptr [RBP + -0x20],0x0 LAB_001587b8: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JNC 0x0015883d MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX] CMP EAX,0xa1 JL 0x001587f8 MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX] CMP EAX,0xdf JG 0x001587f8 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x00158838 LAB_001587f8: MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX] CMP EAX,0x7f JLE 0x0015881e MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x2 MOV qword ptr [RBP + -0x28],RAX JMP 0x00158836 LAB_0015881e: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX LAB_00158836: JMP 0x00158838 LAB_00158838: JMP 0x001587b8 LAB_0015883d: MOV RAX,qword ptr [RBP + -0x20] POP RBP RET
long my_numcells_sjis(int8 param_1,byte *param_2,byte *param_3) { byte *local_30; long local_28; local_28 = 0; local_30 = param_2; while (local_30 < param_3) { if ((*local_30 < 0xa1) || (0xdf < *local_30)) { if (*local_30 < 0x80) { local_28 = local_28 + 1; local_30 = local_30 + 1; } else { local_28 = local_28 + 2; local_30 = local_30 + 2; } } else { local_28 = local_28 + 1; local_30 = local_30 + 1; } } return local_28; }
29,560
my_numcells_sjis
eloqsql/strings/ctype-sjis.c
static size_t my_numcells_sjis(CHARSET_INFO *cs __attribute__((unused)), const char *str, const char *str_end) { size_t clen; const uchar *b= (const uchar *) str; const uchar *e= (const uchar *) str_end; for (clen= 0; b < e; ) { if (*b >= 0xA1 && *b <= 0xDF) { clen++; b++; } else if (*b > 0x7F) { clen+= 2; b+= 2; } else { clen++; b++; } } return clen; }
O3
c
my_numcells_sjis: cmpq %rdx, %rsi jae 0x4141b pushq %rbp movq %rsp, %rbp xorl %eax, %eax movl $0x1, %ecx movb (%rsi), %dil leal 0x5f(%rdi), %r8d shrb $0x7, %dil movzbl %dil, %edi incq %rdi cmpb $0x3f, %r8b cmovbq %rcx, %rdi addq %rdi, %rax addq %rdi, %rsi cmpq %rdx, %rsi jb 0x413f4 popq %rbp retq xorl %eax, %eax retq
my_numcells_sjis: cmp rsi, rdx jnb short loc_4141B push rbp mov rbp, rsp xor eax, eax mov ecx, 1 loc_413F4: mov dil, [rsi] lea r8d, [rdi+5Fh] shr dil, 7 movzx edi, dil inc rdi cmp r8b, 3Fh ; '?' cmovb rdi, rcx add rax, rdi add rsi, rdi cmp rsi, rdx jb short loc_413F4 pop rbp retn loc_4141B: xor eax, eax retn
long long my_numcells_sjis(long long a1, _BYTE *a2, unsigned long long a3) { long long result; // rax long long v4; // rdi if ( (unsigned long long)a2 >= a3 ) return 0LL; result = 0LL; do { v4 = (*a2 >> 7) + 1LL; if ( (unsigned __int8)(*a2 + 95) < 0x3Fu ) v4 = 1LL; result += v4; a2 += v4; } while ( (unsigned long long)a2 < a3 ); return result; }
my_numcells_sjis: CMP RSI,RDX JNC 0x0014141b PUSH RBP MOV RBP,RSP XOR EAX,EAX MOV ECX,0x1 LAB_001413f4: MOV DIL,byte ptr [RSI] LEA R8D,[RDI + 0x5f] SHR DIL,0x7 MOVZX EDI,DIL INC RDI CMP R8B,0x3f CMOVC RDI,RCX ADD RAX,RDI ADD RSI,RDI CMP RSI,RDX JC 0x001413f4 POP RBP RET LAB_0014141b: XOR EAX,EAX RET
long my_numcells_sjis(int8 param_1,byte *param_2,byte *param_3) { long lVar1; long lVar2; if (param_2 < param_3) { lVar1 = 0; do { lVar2 = (ulong)(*param_2 >> 7) + 1; if ((byte)(*param_2 + 0x5f) < 0x3f) { lVar2 = 1; } lVar1 = lVar1 + lVar2; param_2 = param_2 + lVar2; } while (param_2 < param_3); return lVar1; } return 0; }
29,561
ImageTextEx
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c
Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Color tint) { Image imText = { 0 }; #if defined(SUPPORT_MODULE_RTEXT) int size = (int)strlen(text); // Get size in bytes of text int textOffsetX = 0; // Image drawing position X int textOffsetY = 0; // Offset between lines (on linebreak '\n') // NOTE: Text image is generated at font base size, later scaled to desired font size Vector2 imSize = MeasureTextEx(font, text, (float)font.baseSize, spacing); // WARNING: Module required: rtext Vector2 textSize = MeasureTextEx(font, text, fontSize, spacing); // Create image to store text imText = GenImageColor((int)imSize.x, (int)imSize.y, BLANK); for (int i = 0; i < size;) { // Get next codepoint from byte string and glyph index in font int codepointByteCount = 0; int codepoint = GetCodepointNext(&text[i], &codepointByteCount); // WARNING: Module required: rtext int index = GetGlyphIndex(font, codepoint); // WARNING: Module required: rtext if (codepoint == '\n') { // NOTE: Fixed line spacing of 1.5 line-height // TODO: Support custom line spacing defined by user textOffsetY += (font.baseSize + font.baseSize/2); textOffsetX = 0; } else { if ((codepoint != ' ') && (codepoint != '\t')) { Rectangle rec = { (float)(textOffsetX + font.glyphs[index].offsetX), (float)(textOffsetY + font.glyphs[index].offsetY), (float)font.recs[index].width, (float)font.recs[index].height }; ImageDraw(&imText, font.glyphs[index].image, (Rectangle){ 0, 0, (float)font.glyphs[index].image.width, (float)font.glyphs[index].image.height }, rec, tint); } if (font.glyphs[index].advanceX == 0) textOffsetX += (int)(font.recs[index].width + spacing); else textOffsetX += font.glyphs[index].advanceX + (int)spacing; } i += codepointByteCount; // Move text bytes counter to next codepoint } // Scale image depending on text size if (textSize.y != imSize.y) { float scaleFactor = textSize.y/imSize.y; TRACELOG(LOG_INFO, "IMAGE: Text scaled by factor: %f", scaleFactor); // Using nearest-neighbor scaling algorithm for default font // TODO: Allow defining the preferred scaling mechanism externally if (font.texture.id == GetFontDefault().texture.id) ImageResizeNN(&imText, (int)(imSize.x*scaleFactor), (int)(imSize.y*scaleFactor)); else ImageResize(&imText, (int)(imSize.x*scaleFactor), (int)(imSize.y*scaleFactor)); } #else imText = GenImageColor(200, 60, BLACK); // Generating placeholder black image rectangle TRACELOG(LOG_WARNING, "IMAGE: ImageTextEx() requires module: rtext"); #endif return imText; }
O0
c
ImageTextEx: pushq %rbp movq %rsp, %rbp subq $0x110, %rsp # imm = 0x110 movq %rdi, -0xc0(%rbp) movq %rdi, %rax movq %rax, -0xd0(%rbp) leaq 0x10(%rbp), %rax movq %rax, -0xc8(%rbp) movl %edx, -0x4(%rbp) movq %rsi, -0x10(%rbp) movss %xmm0, -0x14(%rbp) movss %xmm1, -0x18(%rbp) xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq $0x0, 0x10(%rdi) movq -0x10(%rbp), %rdi callq 0xa230 movq %rax, %rcx movq -0xc8(%rbp), %rax movl %ecx, -0x1c(%rbp) movl $0x0, -0x20(%rbp) movl $0x0, -0x24(%rbp) movq -0x10(%rbp), %rdi cvtsi2ssl (%rax), %xmm0 movss -0x18(%rbp), %xmm1 movups (%rax), %xmm2 movups 0x10(%rax), %xmm3 movups 0x20(%rax), %xmm4 movq %rsp, %rax movups %xmm4, 0x20(%rax) movups %xmm3, 0x10(%rax) movups %xmm2, (%rax) callq 0xe6870 movq -0xc8(%rbp), %rax movlpd %xmm0, -0x2c(%rbp) movq -0x10(%rbp), %rdi movss -0x14(%rbp), %xmm0 movss -0x18(%rbp), %xmm1 movups (%rax), %xmm2 movups 0x10(%rax), %xmm3 movups 0x20(%rax), %xmm4 movq %rsp, %rax movups %xmm4, 0x20(%rax) movups %xmm3, 0x10(%rax) movups %xmm2, (%rax) callq 0xe6870 movlpd %xmm0, -0x34(%rbp) cvttss2si -0x2c(%rbp), %esi cvttss2si -0x28(%rbp), %edx movb $0x0, -0x54(%rbp) movb $0x0, -0x53(%rbp) movb $0x0, -0x52(%rbp) movb $0x0, -0x51(%rbp) movl -0x54(%rbp), %ecx leaq -0x50(%rbp), %rdi callq 0xfce70 movq -0xc0(%rbp), %rdi movq -0x50(%rbp), %rax movq %rax, (%rdi) movq -0x48(%rbp), %rax movq %rax, 0x8(%rdi) movq -0x40(%rbp), %rax movq %rax, 0x10(%rdi) movl $0x0, -0x58(%rbp) movl -0x58(%rbp), %eax cmpl -0x1c(%rbp), %eax jge 0x100399 movl $0x0, -0x5c(%rbp) movq -0x10(%rbp), %rdi movslq -0x58(%rbp), %rax addq %rax, %rdi leaq -0x5c(%rbp), %rsi callq 0xe6020 movl %eax, %ecx movq -0xc8(%rbp), %rax movl %ecx, -0x60(%rbp) movl -0x60(%rbp), %edi movups (%rax), %xmm0 movups 0x10(%rax), %xmm1 movups 0x20(%rax), %xmm2 movq %rsp, %rax movups %xmm2, 0x20(%rax) movups %xmm1, 0x10(%rax) movups %xmm0, (%rax) callq 0xe6220 movl %eax, -0x64(%rbp) cmpl $0xa, -0x60(%rbp) jne 0x10020f movq -0xc8(%rbp), %rax movl (%rax), %ecx movl %ecx, -0xd4(%rbp) movl (%rax), %eax movl $0x2, %ecx cltd idivl %ecx movl %eax, %ecx movl -0xd4(%rbp), %eax addl %ecx, %eax addl -0x24(%rbp), %eax movl %eax, -0x24(%rbp) movl $0x0, -0x20(%rbp) jmp 0x10038b cmpl $0x20, -0x60(%rbp) je 0x10031b cmpl $0x9, -0x60(%rbp) je 0x10031b movq -0xc0(%rbp), %rdi movq -0xc8(%rbp), %rax movl -0x20(%rbp), %ecx movq 0x28(%rax), %rdx movslq -0x64(%rbp), %rsi leaq (%rsi,%rsi,4), %rsi movl 0x4(%rdx,%rsi,8), %edx addl %edx, %ecx cvtsi2ss %ecx, %xmm0 movss %xmm0, -0x74(%rbp) movl -0x24(%rbp), %ecx movq 0x28(%rax), %rdx movslq -0x64(%rbp), %rsi leaq (%rsi,%rsi,4), %rsi movl 0x8(%rdx,%rsi,8), %edx addl %edx, %ecx cvtsi2ss %ecx, %xmm0 movss %xmm0, -0x70(%rbp) movq 0x20(%rax), %rcx movslq -0x64(%rbp), %rdx shlq $0x4, %rdx movss 0x8(%rcx,%rdx), %xmm0 movss %xmm0, -0x6c(%rbp) movq 0x20(%rax), %rcx movslq -0x64(%rbp), %rdx shlq $0x4, %rdx movss 0xc(%rcx,%rdx), %xmm0 movss %xmm0, -0x68(%rbp) movq 0x28(%rax), %rcx movslq -0x64(%rbp), %rdx leaq (%rdx,%rdx,4), %rdx leaq 0x10(%rcx,%rdx,8), %rcx movl $0x0, -0x84(%rbp) movl $0x0, -0x80(%rbp) movq 0x28(%rax), %rdx movslq -0x64(%rbp), %rsi leaq (%rsi,%rsi,4), %rsi cvtsi2ssl 0x18(%rdx,%rsi,8), %xmm0 movss %xmm0, -0x7c(%rbp) movq 0x28(%rax), %rax movslq -0x64(%rbp), %rdx leaq (%rdx,%rdx,4), %rdx cvtsi2ssl 0x1c(%rax,%rdx,8), %xmm0 movss %xmm0, -0x78(%rbp) movsd -0x84(%rbp), %xmm0 movsd -0x7c(%rbp), %xmm1 movsd -0x74(%rbp), %xmm2 movsd -0x6c(%rbp), %xmm3 movl -0x4(%rbp), %esi movq 0x10(%rcx), %rdx movq %rsp, %rax movq %rdx, 0x10(%rax) movups (%rcx), %xmm4 movups %xmm4, (%rax) callq 0x100480 movq -0xc8(%rbp), %rax movq 0x28(%rax), %rax movslq -0x64(%rbp), %rcx imulq $0x28, %rcx, %rcx addq %rcx, %rax cmpl $0x0, 0xc(%rax) jne 0x100363 movq -0xc8(%rbp), %rax movq 0x20(%rax), %rax movslq -0x64(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax movss 0x8(%rax), %xmm0 addss -0x18(%rbp), %xmm0 cvttss2si %xmm0, %eax addl -0x20(%rbp), %eax movl %eax, -0x20(%rbp) jmp 0x100389 movq -0xc8(%rbp), %rax movq 0x28(%rax), %rax movslq -0x64(%rbp), %rcx imulq $0x28, %rcx, %rcx addq %rcx, %rax movl 0xc(%rax), %eax cvttss2si -0x18(%rbp), %ecx addl %ecx, %eax addl -0x20(%rbp), %eax movl %eax, -0x20(%rbp) jmp 0x10038b movl -0x5c(%rbp), %eax addl -0x58(%rbp), %eax movl %eax, -0x58(%rbp) jmp 0x10017d movss -0x30(%rbp), %xmm0 ucomiss -0x28(%rbp), %xmm0 jne 0x1003ab jp 0x1003ab jmp 0x100466 movss -0x30(%rbp), %xmm0 divss -0x28(%rbp), %xmm0 movss %xmm0, -0x88(%rbp) movss -0x88(%rbp), %xmm0 cvtss2sd %xmm0, %xmm0 movl $0x3, %edi leaq 0xc13ef(%rip), %rsi # 0x1c17c4 movb $0x1, %al callq 0x182c40 movq -0xc8(%rbp), %rax movl 0xc(%rax), %eax movl %eax, -0xd8(%rbp) leaq -0xb8(%rbp), %rdi callq 0xe1500 movl -0xd8(%rbp), %eax cmpl -0xac(%rbp), %eax jne 0x100436 movq -0xc0(%rbp), %rdi movss -0x2c(%rbp), %xmm0 mulss -0x88(%rbp), %xmm0 cvttss2si %xmm0, %esi movss -0x28(%rbp), %xmm0 mulss -0x88(%rbp), %xmm0 cvttss2si %xmm0, %edx callq 0x100d00 jmp 0x100464 movq -0xc0(%rbp), %rdi movss -0x2c(%rbp), %xmm0 mulss -0x88(%rbp), %xmm0 cvttss2si %xmm0, %esi movss -0x28(%rbp), %xmm0 mulss -0x88(%rbp), %xmm0 cvttss2si %xmm0, %edx callq 0x100e80 jmp 0x100466 movq -0xd0(%rbp), %rax addq $0x110, %rsp # imm = 0x110 popq %rbp retq nopw %cs:(%rax,%rax)
ImageTextEx: push rbp mov rbp, rsp sub rsp, 110h mov [rbp+var_C0], rdi mov rax, rdi mov [rbp+var_D0], rax lea rax, [rbp+arg_0] mov [rbp+var_C8], rax mov [rbp+var_4], edx mov [rbp+var_10], rsi movss [rbp+var_14], xmm0 movss [rbp+var_18], xmm1 xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov qword ptr [rdi+10h], 0 mov rdi, [rbp+var_10] call _strlen mov rcx, rax mov rax, [rbp+var_C8] mov [rbp+var_1C], ecx mov [rbp+var_20], 0 mov [rbp+var_24], 0 mov rdi, [rbp+var_10] cvtsi2ss xmm0, dword ptr [rax] movss xmm1, [rbp+var_18] movups xmm2, xmmword ptr [rax] movups xmm3, xmmword ptr [rax+10h] movups xmm4, xmmword ptr [rax+20h] mov rax, rsp movups xmmword ptr [rax+20h], xmm4 movups xmmword ptr [rax+10h], xmm3 movups xmmword ptr [rax], xmm2 call MeasureTextEx mov rax, [rbp+var_C8] movlpd [rbp+var_2C], xmm0 mov rdi, [rbp+var_10] movss xmm0, [rbp+var_14] movss xmm1, [rbp+var_18] movups xmm2, xmmword ptr [rax] movups xmm3, xmmword ptr [rax+10h] movups xmm4, xmmword ptr [rax+20h] mov rax, rsp movups xmmword ptr [rax+20h], xmm4 movups xmmword ptr [rax+10h], xmm3 movups xmmword ptr [rax], xmm2 call MeasureTextEx movlpd [rbp+var_34], xmm0 cvttss2si esi, dword ptr [rbp+var_2C] cvttss2si edx, dword ptr [rbp+var_2C+4] mov byte ptr [rbp+var_54], 0 mov byte ptr [rbp+var_54+1], 0 mov byte ptr [rbp+var_54+2], 0 mov byte ptr [rbp+var_54+3], 0 mov ecx, [rbp+var_54] lea rdi, [rbp+var_50] call GenImageColor mov rdi, [rbp+var_C0] mov rax, [rbp+var_50] mov [rdi], rax mov rax, [rbp+var_48] mov [rdi+8], rax mov rax, [rbp+var_40] mov [rdi+10h], rax mov [rbp+var_58], 0 loc_10017D: mov eax, [rbp+var_58] cmp eax, [rbp+var_1C] jge loc_100399 mov [rbp+var_5C], 0 mov rdi, [rbp+var_10] movsxd rax, [rbp+var_58] add rdi, rax lea rsi, [rbp+var_5C] call GetCodepointNext mov ecx, eax mov rax, [rbp+var_C8] mov [rbp+var_60], ecx mov edi, [rbp+var_60] movups xmm0, xmmword ptr [rax] movups xmm1, xmmword ptr [rax+10h] movups xmm2, xmmword ptr [rax+20h] mov rax, rsp movups xmmword ptr [rax+20h], xmm2 movups xmmword ptr [rax+10h], xmm1 movups xmmword ptr [rax], xmm0 call GetGlyphIndex mov [rbp+var_64], eax cmp [rbp+var_60], 0Ah jnz short loc_10020F mov rax, [rbp+var_C8] mov ecx, [rax] mov [rbp+var_D4], ecx mov eax, [rax] mov ecx, 2 cdq idiv ecx mov ecx, eax mov eax, [rbp+var_D4] add eax, ecx add eax, [rbp+var_24] mov [rbp+var_24], eax mov [rbp+var_20], 0 jmp loc_10038B loc_10020F: cmp [rbp+var_60], 20h ; ' ' jz loc_10031B cmp [rbp+var_60], 9 jz loc_10031B mov rdi, [rbp+var_C0] mov rax, [rbp+var_C8] mov ecx, [rbp+var_20] mov rdx, [rax+28h] movsxd rsi, [rbp+var_64] lea rsi, [rsi+rsi*4] mov edx, [rdx+rsi*8+4] add ecx, edx cvtsi2ss xmm0, ecx movss dword ptr [rbp+var_74], xmm0 mov ecx, [rbp+var_24] mov rdx, [rax+28h] movsxd rsi, [rbp+var_64] lea rsi, [rsi+rsi*4] mov edx, [rdx+rsi*8+8] add ecx, edx cvtsi2ss xmm0, ecx movss dword ptr [rbp+var_74+4], xmm0 mov rcx, [rax+20h] movsxd rdx, [rbp+var_64] shl rdx, 4 movss xmm0, dword ptr [rcx+rdx+8] movss dword ptr [rbp+var_6C], xmm0 mov rcx, [rax+20h] movsxd rdx, [rbp+var_64] shl rdx, 4 movss xmm0, dword ptr [rcx+rdx+0Ch] movss dword ptr [rbp+var_6C+4], xmm0 mov rcx, [rax+28h] movsxd rdx, [rbp+var_64] lea rdx, [rdx+rdx*4] lea rcx, [rcx+rdx*8+10h] mov dword ptr [rbp+var_84], 0 mov dword ptr [rbp+var_84+4], 0 mov rdx, [rax+28h] movsxd rsi, [rbp+var_64] lea rsi, [rsi+rsi*4] cvtsi2ss xmm0, dword ptr [rdx+rsi*8+18h] movss dword ptr [rbp+var_7C], xmm0 mov rax, [rax+28h] movsxd rdx, [rbp+var_64] lea rdx, [rdx+rdx*4] cvtsi2ss xmm0, dword ptr [rax+rdx*8+1Ch] movss dword ptr [rbp+var_7C+4], xmm0 movsd xmm0, [rbp+var_84] movsd xmm1, [rbp+var_7C] movsd xmm2, [rbp+var_74] movsd xmm3, [rbp+var_6C] mov esi, [rbp+var_4] mov rdx, [rcx+10h] mov rax, rsp mov [rax+10h], rdx movups xmm4, xmmword ptr [rcx] movups xmmword ptr [rax], xmm4 call ImageDraw loc_10031B: mov rax, [rbp+var_C8] mov rax, [rax+28h] movsxd rcx, [rbp+var_64] imul rcx, 28h ; '(' add rax, rcx cmp dword ptr [rax+0Ch], 0 jnz short loc_100363 mov rax, [rbp+var_C8] mov rax, [rax+20h] movsxd rcx, [rbp+var_64] shl rcx, 4 add rax, rcx movss xmm0, dword ptr [rax+8] addss xmm0, [rbp+var_18] cvttss2si eax, xmm0 add eax, [rbp+var_20] mov [rbp+var_20], eax jmp short loc_100389 loc_100363: mov rax, [rbp+var_C8] mov rax, [rax+28h] movsxd rcx, [rbp+var_64] imul rcx, 28h ; '(' add rax, rcx mov eax, [rax+0Ch] cvttss2si ecx, [rbp+var_18] add eax, ecx add eax, [rbp+var_20] mov [rbp+var_20], eax loc_100389: jmp short $+2 loc_10038B: mov eax, [rbp+var_5C] add eax, [rbp+var_58] mov [rbp+var_58], eax jmp loc_10017D loc_100399: movss xmm0, dword ptr [rbp+var_34+4] ucomiss xmm0, dword ptr [rbp+var_2C+4] jnz short loc_1003AB jp short loc_1003AB jmp loc_100466 loc_1003AB: movss xmm0, dword ptr [rbp+var_34+4] divss xmm0, dword ptr [rbp+var_2C+4] movss [rbp+var_88], xmm0 movss xmm0, [rbp+var_88] cvtss2sd xmm0, xmm0 mov edi, 3 lea rsi, aImageTextScale; "IMAGE: Text scaled by factor: %f" mov al, 1 call TraceLog mov rax, [rbp+var_C8] mov eax, [rax+0Ch] mov [rbp+var_D8], eax lea rdi, [rbp+var_B8] call GetFontDefault mov eax, [rbp+var_D8] cmp eax, [rbp+var_AC] jnz short loc_100436 mov rdi, [rbp+var_C0] movss xmm0, dword ptr [rbp+var_2C] mulss xmm0, [rbp+var_88] cvttss2si esi, xmm0 movss xmm0, dword ptr [rbp+var_2C+4] mulss xmm0, [rbp+var_88] cvttss2si edx, xmm0 call ImageResizeNN jmp short loc_100464 loc_100436: mov rdi, [rbp+var_C0] movss xmm0, dword ptr [rbp+var_2C] mulss xmm0, [rbp+var_88] cvttss2si esi, xmm0 movss xmm0, dword ptr [rbp+var_2C+4] mulss xmm0, [rbp+var_88] cvttss2si edx, xmm0 call ImageResize loc_100464: jmp short $+2 loc_100466: mov rax, [rbp+var_D0] add rsp, 110h pop rbp retn
long long ImageTextEx( long long a1, _BYTE *a2, int a3, float a4, float a5, long long a6, long long a7, long long a8, long long a9, long long a10, long long a11, long long a12, long long a13, _DWORD *a14) { long long v14; // rax long long v15; // rdx long long v16; // r8 long long v17; // r9 long long v18; // rdx long long v19; // rcx long long v20; // r8 long long v21; // r9 int v22; // edx long long v23; // rcx int v24; // r8d int v25; // r9d int v26; // edx int v27; // r8d int v28; // r9d _BYTE v30[12]; // [rsp+58h] [rbp-B8h] BYREF int v31; // [rsp+64h] [rbp-ACh] float v32; // [rsp+88h] [rbp-88h] long long v33; // [rsp+8Ch] [rbp-84h] float v34; // [rsp+94h] [rbp-7Ch] float v35; // [rsp+98h] [rbp-78h] float v36; // [rsp+9Ch] [rbp-74h] float v37; // [rsp+A0h] [rbp-70h] long long v38; // [rsp+A4h] [rbp-6Ch] int GlyphIndex; // [rsp+ACh] [rbp-64h] int CodepointNext; // [rsp+B0h] [rbp-60h] int v41; // [rsp+B4h] [rbp-5Ch] BYREF int i; // [rsp+B8h] [rbp-58h] int v43; // [rsp+BCh] [rbp-54h] _QWORD v44[3]; // [rsp+C0h] [rbp-50h] BYREF double v45; // [rsp+DCh] [rbp-34h] double v46; // [rsp+E4h] [rbp-2Ch] int v47; // [rsp+ECh] [rbp-24h] int v48; // [rsp+F0h] [rbp-20h] int v49; // [rsp+F4h] [rbp-1Ch] float v50; // [rsp+F8h] [rbp-18h] float v51; // [rsp+FCh] [rbp-14h] _BYTE *v52; // [rsp+100h] [rbp-10h] int v53; // [rsp+10Ch] [rbp-4h] v53 = a3; v52 = a2; v51 = a4; v50 = a5; *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; v14 = strlen(v52); v49 = v14; v48 = 0; v47 = 0; v46 = MeasureTextEx(v52, (float)(int)a9, v50, (long long)a2, v15, v14, v16, v17, a9, a10, a11, a12, a13, a14); v45 = MeasureTextEx(v52, v51, v50, (long long)a2, v18, v19, v20, v21, a9, a10, a11, a12, a13, a14); v43 = 0; GenImageColor((long long)v44, (int)*(float *)&v46, (int)*((float *)&v46 + 1), 0); *(_QWORD *)a1 = v44[0]; *(_QWORD *)(a1 + 8) = v44[1]; *(_QWORD *)(a1 + 16) = v44[2]; for ( i = 0; i < v49; i += v41 ) { v41 = 0; CodepointNext = GetCodepointNext(&v52[i], &v41); GlyphIndex = GetGlyphIndex( CodepointNext, (unsigned int)&v41, v26, CodepointNext, v27, v28, a9, a10, a11, a12, a13, a14); if ( CodepointNext == 10 ) { v22 = (int)a9 % 2; LODWORD(v23) = (int)a9 / 2; v47 += (int)a9 / 2 + a9; v48 = 0; } else { if ( CodepointNext != 32 && CodepointNext != 9 ) { v36 = (float)(a14[10 * GlyphIndex + 1] + v48); v37 = (float)(a14[10 * GlyphIndex + 2] + v47); v38 = *(_QWORD *)(a13 + 16LL * GlyphIndex + 8); v33 = 0LL; v34 = (float)(int)a14[10 * GlyphIndex + 6]; v35 = (float)(int)a14[10 * GlyphIndex + 7]; ImageDraw( a1, v53, *(_QWORD *)&a14[10 * GlyphIndex + 8], (_DWORD)a14 + 40 * GlyphIndex + 16, v24, v25, *(_OWORD *)&a14[10 * GlyphIndex + 4]); } if ( a14[10 * GlyphIndex + 3] ) { LODWORD(v23) = (int)v50; v48 += (int)v50 + a14[10 * GlyphIndex + 3]; } else { v23 = 16LL * GlyphIndex; v48 += (int)(float)(*(float *)(v23 + a13 + 8) + v50); } } } if ( *((float *)&v45 + 1) != *((float *)&v46 + 1) ) { v32 = *((float *)&v45 + 1) / *((float *)&v46 + 1); TraceLog(3, (unsigned int)"IMAGE: Text scaled by factor: %f", v22, v23, v24, v25); GetFontDefault((long long)v30); if ( HIDWORD(a10) == v31 ) ImageResizeNN( a1, (unsigned int)(int)(float)(*(float *)&v46 * v32), (unsigned int)(int)(float)(*((float *)&v46 + 1) * v32)); else ImageResize( a1, (unsigned int)(int)(float)(*(float *)&v46 * v32), (unsigned int)(int)(float)(*((float *)&v46 + 1) * v32)); } return a1; }
29,562
ImageTextEx
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c
Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Color tint) { Image imText = { 0 }; #if defined(SUPPORT_MODULE_RTEXT) int size = (int)strlen(text); // Get size in bytes of text int textOffsetX = 0; // Image drawing position X int textOffsetY = 0; // Offset between lines (on linebreak '\n') // NOTE: Text image is generated at font base size, later scaled to desired font size Vector2 imSize = MeasureTextEx(font, text, (float)font.baseSize, spacing); // WARNING: Module required: rtext Vector2 textSize = MeasureTextEx(font, text, fontSize, spacing); // Create image to store text imText = GenImageColor((int)imSize.x, (int)imSize.y, BLANK); for (int i = 0; i < size;) { // Get next codepoint from byte string and glyph index in font int codepointByteCount = 0; int codepoint = GetCodepointNext(&text[i], &codepointByteCount); // WARNING: Module required: rtext int index = GetGlyphIndex(font, codepoint); // WARNING: Module required: rtext if (codepoint == '\n') { // NOTE: Fixed line spacing of 1.5 line-height // TODO: Support custom line spacing defined by user textOffsetY += (font.baseSize + font.baseSize/2); textOffsetX = 0; } else { if ((codepoint != ' ') && (codepoint != '\t')) { Rectangle rec = { (float)(textOffsetX + font.glyphs[index].offsetX), (float)(textOffsetY + font.glyphs[index].offsetY), (float)font.recs[index].width, (float)font.recs[index].height }; ImageDraw(&imText, font.glyphs[index].image, (Rectangle){ 0, 0, (float)font.glyphs[index].image.width, (float)font.glyphs[index].image.height }, rec, tint); } if (font.glyphs[index].advanceX == 0) textOffsetX += (int)(font.recs[index].width + spacing); else textOffsetX += font.glyphs[index].advanceX + (int)spacing; } i += codepointByteCount; // Move text bytes counter to next codepoint } // Scale image depending on text size if (textSize.y != imSize.y) { float scaleFactor = textSize.y/imSize.y; TRACELOG(LOG_INFO, "IMAGE: Text scaled by factor: %f", scaleFactor); // Using nearest-neighbor scaling algorithm for default font // TODO: Allow defining the preferred scaling mechanism externally if (font.texture.id == GetFontDefault().texture.id) ImageResizeNN(&imText, (int)(imSize.x*scaleFactor), (int)(imSize.y*scaleFactor)); else ImageResize(&imText, (int)(imSize.x*scaleFactor), (int)(imSize.y*scaleFactor)); } #else imText = GenImageColor(200, 60, BLACK); // Generating placeholder black image rectangle TRACELOG(LOG_WARNING, "IMAGE: ImageTextEx() requires module: rtext"); #endif return imText; }
O3
c
ImageTextEx: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movl %edx, 0x48(%rsp) movss %xmm1, 0x38(%rsp) movss %xmm0, 0x50(%rsp) movq %rsi, %r14 movq %rdi, %rbx leaq 0x100(%rsp), %rbp movq %rsi, %rdi callq 0xa230 movq %rax, %r15 xorps %xmm0, %xmm0 cvtsi2ssl (%rbp), %xmm0 movaps (%rbp), %xmm1 movaps 0x10(%rbp), %xmm2 movaps 0x20(%rbp), %xmm3 movups %xmm3, 0x20(%rsp) movups %xmm2, 0x10(%rsp) movups %xmm1, (%rsp) movq %r14, %rdi movss 0x38(%rsp), %xmm1 callq 0x85597 movaps %xmm0, 0x70(%rsp) movaps (%rbp), %xmm0 movaps 0x10(%rbp), %xmm1 movaps 0x20(%rbp), %xmm2 movups %xmm2, 0x20(%rsp) movups %xmm1, 0x10(%rsp) movups %xmm0, (%rsp) movq %r14, 0x80(%rsp) movq %r14, %rdi movss 0x50(%rsp), %xmm0 movss 0x38(%rsp), %xmm1 callq 0x85597 movaps %xmm0, 0x60(%rsp) cvttps2dq 0x70(%rsp), %xmm0 movdqa %xmm0, 0x50(%rsp) movd %xmm0, %eax pshufd $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1] movd %xmm0, %ecx imull %eax, %ecx movslq %ecx, %rdi movl $0x4, %esi callq 0xa330 movq %rax, (%rbx) movaps 0x50(%rsp), %xmm0 movlps %xmm0, 0x8(%rbx) movabsq $0x700000001, %rax # imm = 0x700000001 movq %rbx, 0x40(%rsp) movq %rax, 0x10(%rbx) movq %r15, 0x50(%rsp) testl %r15d, %r15d jle 0x954e9 cvttss2si 0x38(%rsp), %eax movl %eax, 0x4c(%rsp) xorl %r15d, %r15d xorl %ebx, %ebx xorl %r12d, %r12d movl $0x0, 0x3c(%rsp) movslq %r12d, %rdi addq 0x80(%rsp), %rdi leaq 0x3c(%rsp), %rsi callq 0x85040 movl %eax, %r13d movups (%rbp), %xmm0 movups 0x10(%rbp), %xmm1 movups 0x20(%rbp), %xmm2 movups %xmm2, 0x20(%rsp) movups %xmm1, 0x10(%rsp) movups %xmm0, (%rsp) movl %eax, %edi callq 0x8516f movslq %eax, %r14 cmpl $0x9, %r13d je 0x954a6 cmpl $0x20, %r13d je 0x954a6 cmpl $0xa, %r13d jne 0x95442 movl (%rbp), %eax movl %eax, %ecx shrl $0x1f, %ecx addl %eax, %ecx sarl %ecx addl %eax, %ebx addl %ecx, %ebx xorl %r15d, %r15d jmp 0x954d9 movq 0x28(%rbp), %rax leaq (%r14,%r14,4), %rcx movl 0x4(%rax,%rcx,8), %edx addl %r15d, %edx xorps %xmm2, %xmm2 cvtsi2ss %edx, %xmm2 movl 0x8(%rax,%rcx,8), %edx addl %ebx, %edx xorps %xmm0, %xmm0 cvtsi2ss %edx, %xmm0 movq 0x20(%rbp), %rdx unpcklps %xmm0, %xmm2 # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1] movq %r14, %rsi shlq $0x4, %rsi movsd 0x8(%rdx,%rsi), %xmm3 movsd 0x18(%rax,%rcx,8), %xmm0 cvtdq2ps %xmm0, %xmm1 movq 0x20(%rax,%rcx,8), %rdx movq %rdx, 0x10(%rsp) movups 0x10(%rax,%rcx,8), %xmm0 movups %xmm0, (%rsp) xorps %xmm0, %xmm0 movq 0x40(%rsp), %rdi movl 0x48(%rsp), %esi callq 0x95592 movq 0x28(%rbp), %rax leaq (%r14,%r14,4), %rcx movl 0xc(%rax,%rcx,8), %eax testl %eax, %eax je 0x954bd addl 0x4c(%rsp), %r15d jmp 0x954d6 movq 0x20(%rbp), %rax shlq $0x4, %r14 movss 0x8(%rax,%r14), %xmm0 addss 0x38(%rsp), %xmm0 cvttss2si %xmm0, %eax addl %eax, %r15d addl 0x3c(%rsp), %r12d cmpl 0x50(%rsp), %r12d jl 0x953cc movaps 0x60(%rsp), %xmm1 shufps $0x55, %xmm1, %xmm1 # xmm1 = xmm1[1,1,1,1] movaps 0x70(%rsp), %xmm2 shufps $0x55, %xmm2, %xmm2 # xmm2 = xmm2[1,1,1,1] ucomiss %xmm2, %xmm1 jne 0x95502 jnp 0x9557b divss %xmm2, %xmm1 movaps %xmm1, 0x60(%rsp) xorps %xmm0, %xmm0 cvtss2sd %xmm1, %xmm0 leaq 0x57b7b(%rip), %rsi # 0xed094 movl $0x3, %edi movb $0x1, %al movaps %xmm2, 0x80(%rsp) callq 0xb9db7 movl 0xc(%rbp), %ebx leaq 0x98(%rsp), %r14 movq %r14, %rdi callq 0x7f45d movaps 0x70(%rsp), %xmm0 movaps 0x60(%rsp), %xmm1 mulss %xmm1, %xmm0 cvttss2si %xmm0, %esi mulss 0x80(%rsp), %xmm1 cvttss2si %xmm1, %edx cmpl 0xc(%r14), %ebx jne 0x95571 movq 0x40(%rsp), %rdi callq 0x95bb6 jmp 0x9557b movq 0x40(%rsp), %rdi callq 0x95cef movq 0x40(%rsp), %rax addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ImageTextEx: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C8h mov [rsp+0F8h+var_B0], edx movss [rsp+0F8h+var_C0], xmm1 movss dword ptr [rsp+0F8h+var_A8], xmm0 mov r14, rsi mov rbx, rdi lea rbp, [rsp+0F8h+arg_0] mov rdi, rsi call _strlen mov r15, rax xorps xmm0, xmm0 cvtsi2ss xmm0, dword ptr [rbp+0] movaps xmm1, xmmword ptr [rbp+0] movaps xmm2, xmmword ptr [rbp+10h] movaps xmm3, xmmword ptr [rbp+20h] movups [rsp+0F8h+var_D8], xmm3 movups [rsp+0F8h+var_E8], xmm2 movups [rsp+0F8h+var_F8], xmm1 mov rdi, r14 movss xmm1, [rsp+0F8h+var_C0] call MeasureTextEx movaps [rsp+0F8h+var_88], xmm0 movaps xmm0, xmmword ptr [rbp+0] movaps xmm1, xmmword ptr [rbp+10h] movaps xmm2, xmmword ptr [rbp+20h] movups [rsp+0F8h+var_D8], xmm2 movups [rsp+0F8h+var_E8], xmm1 movups [rsp+0F8h+var_F8], xmm0 mov qword ptr [rsp+0F8h+var_78], r14 mov rdi, r14 movss xmm0, dword ptr [rsp+0F8h+var_A8] movss xmm1, [rsp+0F8h+var_C0] call MeasureTextEx movaps [rsp+0F8h+var_98], xmm0 cvttps2dq xmm0, [rsp+0F8h+var_88] movdqa [rsp+0F8h+var_A8], xmm0 movd eax, xmm0 pshufd xmm0, xmm0, 55h ; 'U' movd ecx, xmm0 imul ecx, eax movsxd rdi, ecx mov esi, 4 call _calloc mov [rbx], rax movaps xmm0, [rsp+0F8h+var_A8] movlps qword ptr [rbx+8], xmm0 mov rax, 700000001h mov [rsp+0F8h+var_B8], rbx mov [rbx+10h], rax mov qword ptr [rsp+0F8h+var_A8], r15 test r15d, r15d jle loc_954E9 cvttss2si eax, [rsp+0F8h+var_C0] mov [rsp+0F8h+var_AC], eax xor r15d, r15d xor ebx, ebx xor r12d, r12d loc_953CC: mov [rsp+0F8h+var_BC], 0 movsxd rdi, r12d add rdi, qword ptr [rsp+0F8h+var_78] lea rsi, [rsp+0F8h+var_BC] call GetCodepointNext mov r13d, eax movups xmm0, xmmword ptr [rbp+0] movups xmm1, xmmword ptr [rbp+10h] movups xmm2, xmmword ptr [rbp+20h] movups [rsp+0F8h+var_D8], xmm2 movups [rsp+0F8h+var_E8], xmm1 movups [rsp+0F8h+var_F8], xmm0 mov edi, eax call GetGlyphIndex movsxd r14, eax cmp r13d, 9 jz loc_954A6 cmp r13d, 20h ; ' ' jz loc_954A6 cmp r13d, 0Ah jnz short loc_95442 mov eax, [rbp+0] mov ecx, eax shr ecx, 1Fh add ecx, eax sar ecx, 1 add ebx, eax add ebx, ecx xor r15d, r15d jmp loc_954D9 loc_95442: mov rax, [rbp+28h] lea rcx, [r14+r14*4] mov edx, [rax+rcx*8+4] add edx, r15d xorps xmm2, xmm2 cvtsi2ss xmm2, edx mov edx, [rax+rcx*8+8] add edx, ebx xorps xmm0, xmm0 cvtsi2ss xmm0, edx mov rdx, [rbp+20h] unpcklps xmm2, xmm0 mov rsi, r14 shl rsi, 4 movsd xmm3, qword ptr [rdx+rsi+8] movsd xmm0, qword ptr [rax+rcx*8+18h] cvtdq2ps xmm1, xmm0 mov rdx, [rax+rcx*8+20h] mov qword ptr [rsp+0F8h+var_E8], rdx movups xmm0, xmmword ptr [rax+rcx*8+10h] movups [rsp+0F8h+var_F8], xmm0 xorps xmm0, xmm0 mov rdi, [rsp+0F8h+var_B8] mov esi, [rsp+0F8h+var_B0] call ImageDraw loc_954A6: mov rax, [rbp+28h] lea rcx, [r14+r14*4] mov eax, [rax+rcx*8+0Ch] test eax, eax jz short loc_954BD add r15d, [rsp+0F8h+var_AC] jmp short loc_954D6 loc_954BD: mov rax, [rbp+20h] shl r14, 4 movss xmm0, dword ptr [rax+r14+8] addss xmm0, [rsp+0F8h+var_C0] cvttss2si eax, xmm0 loc_954D6: add r15d, eax loc_954D9: add r12d, [rsp+0F8h+var_BC] cmp r12d, dword ptr [rsp+0F8h+var_A8] jl loc_953CC loc_954E9: movaps xmm1, [rsp+0F8h+var_98] shufps xmm1, xmm1, 55h ; 'U' movaps xmm2, [rsp+0F8h+var_88] shufps xmm2, xmm2, 55h ; 'U' ucomiss xmm1, xmm2 jnz short loc_95502 jnp short loc_9557B loc_95502: divss xmm1, xmm2 movaps [rsp+0F8h+var_98], xmm1 xorps xmm0, xmm0 cvtss2sd xmm0, xmm1 lea rsi, aImageTextScale; "IMAGE: Text scaled by factor: %f" mov edi, 3 mov al, 1 movaps [rsp+0F8h+var_78], xmm2 call TraceLog mov ebx, [rbp+0Ch] lea r14, [rsp+0F8h+var_60] mov rdi, r14 call GetFontDefault movaps xmm0, [rsp+0F8h+var_88] movaps xmm1, [rsp+0F8h+var_98] mulss xmm0, xmm1 cvttss2si esi, xmm0 mulss xmm1, dword ptr [rsp+0F8h+var_78] cvttss2si edx, xmm1 cmp ebx, [r14+0Ch] jnz short loc_95571 mov rdi, [rsp+0F8h+var_B8] call ImageResizeNN jmp short loc_9557B loc_95571: mov rdi, [rsp+0F8h+var_B8] call ImageResize loc_9557B: mov rax, [rsp+0F8h+var_B8] add rsp, 0C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ImageTextEx( long long a1, _BYTE *a2, int a3, float a4, float a5, long long a6, long long a7, long long a8, long long a9, long long a10, long long a11, long long a12, long long a13, _DWORD *a14) { long long v14; // r15 __m128 v15; // xmm0 long long v16; // rdx long long v17; // rcx long long v18; // r8 long long v19; // r9 long long v20; // rdx long long v21; // rcx long long v22; // r8 long long v23; // r9 int v24; // edx int v25; // ecx int v26; // r8d int v27; // r9d int v28; // r15d int v29; // ebx __int32 v30; // r12d int CodepointNext; // r13d long long v32; // rdx long long v33; // rcx long long v34; // r8 long long v35; // r9 long long GlyphIndex; // r14 int v37; // eax __m128 v38; // xmm1 __m128 v39; // xmm2 long long v40; // rsi long long v41; // rdx int v43; // [rsp+3Ch] [rbp-BCh] BYREF long long v44; // [rsp+40h] [rbp-B8h] int v45; // [rsp+48h] [rbp-B0h] int v46; // [rsp+4Ch] [rbp-ACh] __m128i v47; // [rsp+50h] [rbp-A8h] __m128 v48; // [rsp+60h] [rbp-98h] __m128 v49; // [rsp+70h] [rbp-88h] __m128 v50; // [rsp+80h] [rbp-78h] __int128 v51; // [rsp+98h] [rbp-60h] BYREF v45 = a3; *(float *)v47.m128i_i32 = a4; v14 = strlen(a2); v15 = 0LL; v15.m128_f32[0] = (float)(int)a9; v49 = MeasureTextEx(a2, v15, a5, (long long)a2, v16, v17, v18, v19, a9, a10, a11, a12, a13, a14); v50.m128_u64[0] = (unsigned long long)a2; v48 = MeasureTextEx(a2, (__m128)v47.m128i_u32[0], a5, (long long)a2, v20, v21, v22, v23, a9, a10, a11, a12, a13, a14); v47 = _mm_cvttps_epi32(v49); *(_QWORD *)a1 = calloc(_mm_cvtsi128_si32(v47) * _mm_cvtsi128_si32(_mm_shuffle_epi32(v47, 85)), 4LL); _mm_storel_ps((double *)(a1 + 8), (__m128)v47); v44 = a1; *(_QWORD *)(a1 + 16) = 0x700000001LL; v47.m128i_i64[0] = v14; if ( (int)v14 > 0 ) { v46 = (int)a5; v28 = 0; v29 = 0; v30 = 0; while ( 1 ) { v43 = 0; CodepointNext = GetCodepointNext((char *)(v50.m128_u64[0] + v30), &v43); GlyphIndex = (int)GetGlyphIndex(CodepointNext, (long long)&v43, v32, v33, v34, v35, a9, a10, a11, a12, a13, a14); if ( CodepointNext == 9 || CodepointNext == 32 ) goto LABEL_8; if ( CodepointNext != 10 ) break; v25 = (int)a9 / 2; v29 += (int)a9 / 2 + a9; v28 = 0; LABEL_12: v30 += v43; if ( v30 >= v47.m128i_i32[0] ) goto LABEL_13; } ImageDraw( v44, v45, *(_QWORD *)&a14[10 * GlyphIndex + 8], 5 * GlyphIndex, v26, v27, *(_OWORD *)&a14[10 * GlyphIndex + 4]); LABEL_8: v25 = 5 * GlyphIndex; v37 = a14[10 * GlyphIndex + 3]; if ( v37 ) v28 += v46; else v37 = (int)(float)(*(float *)(a13 + 16 * GlyphIndex + 8) + a5); v28 += v37; goto LABEL_12; } LABEL_13: v38 = _mm_shuffle_ps(v48, v48, 85); v39 = _mm_shuffle_ps(v49, v49, 85); if ( v38.m128_f32[0] != v39.m128_f32[0] ) { v38.m128_f32[0] = v38.m128_f32[0] / v39.m128_f32[0]; v48 = v38; v50 = v39; TraceLog(3, (unsigned int)"IMAGE: Text scaled by factor: %f", v24, v25, v26, v27); GetFontDefault(&v51); v40 = (unsigned int)(int)(float)(v49.m128_f32[0] * v48.m128_f32[0]); v41 = (unsigned int)(int)(float)(v48.m128_f32[0] * v50.m128_f32[0]); if ( HIDWORD(a10) == HIDWORD(v51) ) ImageResizeNN(v44, v40, v41); else ImageResize(v44, v40, v41); } return v44; }
ImageTextEx: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc8 MOV dword ptr [RSP + 0x48],EDX MOVSS dword ptr [RSP + 0x38],XMM1 MOVSS dword ptr [RSP + 0x50],XMM0 MOV R14,RSI MOV RBX,RDI LEA RBP,[RSP + 0x100] MOV RDI,RSI CALL 0x0010a230 MOV R15,RAX XORPS XMM0,XMM0 CVTSI2SS XMM0,dword ptr [RBP] MOVAPS XMM1,xmmword ptr [RBP] MOVAPS XMM2,xmmword ptr [RBP + 0x10] MOVAPS XMM3,xmmword ptr [RBP + 0x20] MOVUPS xmmword ptr [RSP + 0x20],XMM3 MOVUPS xmmword ptr [RSP + 0x10],XMM2 MOVUPS xmmword ptr [RSP],XMM1 MOV RDI,R14 MOVSS XMM1,dword ptr [RSP + 0x38] CALL 0x00185597 MOVAPS xmmword ptr [RSP + 0x70],XMM0 MOVAPS XMM0,xmmword ptr [RBP] MOVAPS XMM1,xmmword ptr [RBP + 0x10] MOVAPS XMM2,xmmword ptr [RBP + 0x20] MOVUPS xmmword ptr [RSP + 0x20],XMM2 MOVUPS xmmword ptr [RSP + 0x10],XMM1 MOVUPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x80],R14 MOV RDI,R14 MOVSS XMM0,dword ptr [RSP + 0x50] MOVSS XMM1,dword ptr [RSP + 0x38] CALL 0x00185597 MOVAPS xmmword ptr [RSP + 0x60],XMM0 CVTTPS2DQ XMM0,xmmword ptr [RSP + 0x70] MOVDQA xmmword ptr [RSP + 0x50],XMM0 MOVD EAX,XMM0 PSHUFD XMM0,XMM0,0x55 MOVD ECX,XMM0 IMUL ECX,EAX MOVSXD RDI,ECX MOV ESI,0x4 CALL 0x0010a330 MOV qword ptr [RBX],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x50] MOVLPS qword ptr [RBX + 0x8],XMM0 MOV RAX,0x700000001 MOV qword ptr [RSP + 0x40],RBX MOV qword ptr [RBX + 0x10],RAX MOV qword ptr [RSP + 0x50],R15 TEST R15D,R15D JLE 0x001954e9 CVTTSS2SI EAX,dword ptr [RSP + 0x38] MOV dword ptr [RSP + 0x4c],EAX XOR R15D,R15D XOR EBX,EBX XOR R12D,R12D LAB_001953cc: MOV dword ptr [RSP + 0x3c],0x0 MOVSXD RDI,R12D ADD RDI,qword ptr [RSP + 0x80] LEA RSI,[RSP + 0x3c] CALL 0x00185040 MOV R13D,EAX MOVUPS XMM0,xmmword ptr [RBP] MOVUPS XMM1,xmmword ptr [RBP + 0x10] MOVUPS XMM2,xmmword ptr [RBP + 0x20] MOVUPS xmmword ptr [RSP + 0x20],XMM2 MOVUPS xmmword ptr [RSP + 0x10],XMM1 MOVUPS xmmword ptr [RSP],XMM0 MOV EDI,EAX CALL 0x0018516f MOVSXD R14,EAX CMP R13D,0x9 JZ 0x001954a6 CMP R13D,0x20 JZ 0x001954a6 CMP R13D,0xa JNZ 0x00195442 MOV EAX,dword ptr [RBP] MOV ECX,EAX SHR ECX,0x1f ADD ECX,EAX SAR ECX,0x1 ADD EBX,EAX ADD EBX,ECX XOR R15D,R15D JMP 0x001954d9 LAB_00195442: MOV RAX,qword ptr [RBP + 0x28] LEA RCX,[R14 + R14*0x4] MOV EDX,dword ptr [RAX + RCX*0x8 + 0x4] ADD EDX,R15D XORPS XMM2,XMM2 CVTSI2SS XMM2,EDX MOV EDX,dword ptr [RAX + RCX*0x8 + 0x8] ADD EDX,EBX XORPS XMM0,XMM0 CVTSI2SS XMM0,EDX MOV RDX,qword ptr [RBP + 0x20] UNPCKLPS XMM2,XMM0 MOV RSI,R14 SHL RSI,0x4 MOVSD XMM3,qword ptr [RDX + RSI*0x1 + 0x8] MOVSD XMM0,qword ptr [RAX + RCX*0x8 + 0x18] CVTDQ2PS XMM1,XMM0 MOV RDX,qword ptr [RAX + RCX*0x8 + 0x20] MOV qword ptr [RSP + 0x10],RDX MOVUPS XMM0,xmmword ptr [RAX + RCX*0x8 + 0x10] MOVUPS xmmword ptr [RSP],XMM0 XORPS XMM0,XMM0 MOV RDI,qword ptr [RSP + 0x40] MOV ESI,dword ptr [RSP + 0x48] CALL 0x00195592 LAB_001954a6: MOV RAX,qword ptr [RBP + 0x28] LEA RCX,[R14 + R14*0x4] MOV EAX,dword ptr [RAX + RCX*0x8 + 0xc] TEST EAX,EAX JZ 0x001954bd ADD R15D,dword ptr [RSP + 0x4c] JMP 0x001954d6 LAB_001954bd: MOV RAX,qword ptr [RBP + 0x20] SHL R14,0x4 MOVSS XMM0,dword ptr [RAX + R14*0x1 + 0x8] ADDSS XMM0,dword ptr [RSP + 0x38] CVTTSS2SI EAX,XMM0 LAB_001954d6: ADD R15D,EAX LAB_001954d9: ADD R12D,dword ptr [RSP + 0x3c] CMP R12D,dword ptr [RSP + 0x50] JL 0x001953cc LAB_001954e9: MOVAPS XMM1,xmmword ptr [RSP + 0x60] SHUFPS XMM1,XMM1,0x55 MOVAPS XMM2,xmmword ptr [RSP + 0x70] SHUFPS XMM2,XMM2,0x55 UCOMISS XMM1,XMM2 JNZ 0x00195502 JNP 0x0019557b LAB_00195502: DIVSS XMM1,XMM2 MOVAPS xmmword ptr [RSP + 0x60],XMM1 XORPS XMM0,XMM0 CVTSS2SD XMM0,XMM1 LEA RSI,[0x1ed094] MOV EDI,0x3 MOV AL,0x1 MOVAPS xmmword ptr [RSP + 0x80],XMM2 CALL 0x001b9db7 MOV EBX,dword ptr [RBP + 0xc] LEA R14,[RSP + 0x98] MOV RDI,R14 CALL 0x0017f45d MOVAPS XMM0,xmmword ptr [RSP + 0x70] MOVAPS XMM1,xmmword ptr [RSP + 0x60] MULSS XMM0,XMM1 CVTTSS2SI ESI,XMM0 MULSS XMM1,dword ptr [RSP + 0x80] CVTTSS2SI EDX,XMM1 CMP EBX,dword ptr [R14 + 0xc] JNZ 0x00195571 MOV RDI,qword ptr [RSP + 0x40] CALL 0x00195bb6 JMP 0x0019557b LAB_00195571: MOV RDI,qword ptr [RSP + 0x40] CALL 0x00195cef LAB_0019557b: MOV RAX,qword ptr [RSP + 0x40] ADD RSP,0xc8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 * ImageTextEx(int4 param_1,float param_2,int8 *param_3,char *param_4,int4 param_5) { int8 uVar1; int8 uVar2; int iVar3; int iVar4; size_t sVar5; void *pvVar6; int4 uVar7; int iVar8; long lVar9; int iVar10; float extraout_XMM0_Dc; float extraout_XMM0_Dd; int in_stack_00000008; int8 in_stack_00000010; long in_stack_00000028; long in_stack_00000030; int local_bc; int8 *local_b8; int4 local_b0; int local_ac; int8 local_a8; int iStack_a0; int iStack_9c; int8 local_98; float fStack_90; float fStack_8c; int8 local_88; float fStack_80; float fStack_7c; int8 local_78; float fStack_70; float fStack_6c; int1 local_60 [12]; int local_54; local_a8 = CONCAT44(local_a8._4_4_,param_1); local_b0 = param_5; sVar5 = strlen(param_4); local_88 = MeasureTextEx((float)in_stack_00000008,param_2,param_4); fStack_80 = extraout_XMM0_Dc; fStack_7c = extraout_XMM0_Dd; local_78 = param_4; local_98 = MeasureTextEx((int)local_a8,param_2,param_4); local_a8._0_4_ = (int)(float)local_88; local_a8._4_4_ = (int)local_88._4_4_; iStack_a0 = (int)fStack_80; iStack_9c = (int)fStack_7c; pvVar6 = calloc((long)(local_a8._4_4_ * (int)local_a8),4); *param_3 = pvVar6; *(int *)(param_3 + 1) = (int)local_a8; *(int *)((long)param_3 + 0xc) = local_a8._4_4_; param_3[2] = 0x700000001; local_b8 = param_3; local_a8 = sVar5; uVar2 = local_88; if (0 < (int)sVar5) { local_ac = (int)param_2; iVar10 = 0; iVar8 = 0; uVar1 = local_98; do { local_bc = 0; local_98 = uVar1; local_88 = uVar2; iVar3 = GetCodepointNext(local_78 + iVar8,&local_bc); iVar4 = GetGlyphIndex(iVar3); lVar9 = (long)iVar4; if ((iVar3 == 9) || (iVar3 == 0x20)) { LAB_001954a6: iVar3 = *(int *)(in_stack_00000030 + 0xc + lVar9 * 0x28); if (iVar3 == 0) { iVar3 = (int)(*(float *)(in_stack_00000028 + 8 + lVar9 * 0x10) + param_2); } else { iVar10 = iVar10 + local_ac; } iVar10 = iVar10 + iVar3; uVar1 = local_98; uVar2 = local_88; } else { if (iVar3 != 10) { ImageDraw(0,(float)(int)*(int8 *)(in_stack_00000030 + 0x18 + lVar9 * 0x28), (float)(*(int *)(in_stack_00000030 + 4 + lVar9 * 0x28) + iVar10), (int)*(int8 *)(in_stack_00000028 + 8 + lVar9 * 0x10),local_b8,local_b0); goto LAB_001954a6; } iVar10 = 0; uVar1 = local_98; uVar2 = local_88; } local_98._4_4_ = (float)((ulong)uVar1 >> 0x20); iVar8 = iVar8 + local_bc; } while (iVar8 < (int)local_a8); } local_88._4_4_ = (float)((ulong)uVar2 >> 0x20); if ((local_98._4_4_ != local_88._4_4_) || (NAN(local_98._4_4_) || NAN(local_88._4_4_))) { local_98._0_4_ = local_98._4_4_ / local_88._4_4_; fStack_90 = local_98._4_4_; fStack_8c = local_98._4_4_; uVar7 = 0; local_78 = (char *)CONCAT44(local_88._4_4_,local_88._4_4_); fStack_70 = local_88._4_4_; fStack_6c = local_88._4_4_; local_88 = uVar2; TraceLog(SUB84((double)(float)local_98,0),3,"IMAGE: Text scaled by factor: %f"); GetFontDefault(local_60); if (in_stack_00000010._4_4_ == local_54) { ImageResizeNN(local_b8); } else { ImageResize(local_b8,CONCAT44(uVar7,(int)((float)local_88 * (float)local_98)), (int)((float)local_98 * (float)local_78)); } } return local_b8; }
29,563
mbedtls_pkcs12_pbe_sha1_rc4_128
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/pkcs12.c
int mbedtls_pkcs12_pbe_sha1_rc4_128(mbedtls_asn1_buf *pbe_params, int mode, const unsigned char *pwd, size_t pwdlen, const unsigned char *data, size_t len, unsigned char *output) { #if !defined(MBEDTLS_ARC4_C) ((void) pbe_params); ((void) mode); ((void) pwd); ((void) pwdlen); ((void) data); ((void) len); ((void) output); return MBEDTLS_ERR_PKCS12_FEATURE_UNAVAILABLE; #else int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; unsigned char key[16]; mbedtls_arc4_context ctx; ((void) mode); mbedtls_arc4_init(&ctx); if ((ret = pkcs12_pbe_derive_key_iv(pbe_params, MBEDTLS_MD_SHA1, pwd, pwdlen, key, 16, NULL, 0)) != 0) { return ret; } mbedtls_arc4_setup(&ctx, key, 16); if ((ret = mbedtls_arc4_crypt(&ctx, len, data, output)) != 0) { goto exit; } exit: mbedtls_platform_zeroize(key, sizeof(key)); mbedtls_arc4_free(&ctx); return ret; #endif /* MBEDTLS_ARC4_C */ }
O3
c
mbedtls_pkcs12_pbe_sha1_rc4_128: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x128, %rsp # imm = 0x128 movq %r9, %r14 movq %r8, %rbx movq %rcx, %r15 movq %rdx, %r12 movq %rdi, %r13 leaq 0x20(%rsp), %rdi callq 0x99ad0 xorps %xmm0, %xmm0 movups %xmm0, (%rsp) leaq 0x10(%rsp), %r8 movl $0x10, %r9d movq %r13, %rdi movl $0x4, %esi movq %r12, %rdx movq %r15, %rcx callq 0x98b97 movl %eax, %ebp testl %eax, %eax jne 0x98b83 movq 0x160(%rsp), %r15 leaq 0x20(%rsp), %r12 leaq 0x10(%rsp), %r13 movq %r12, %rdi movq %r13, %rsi movl $0x10, %edx callq 0x99aec movq %r12, %rdi movq %r14, %rsi movq %rbx, %rdx movq %r15, %rcx callq 0x99b5c movl %eax, %ebp movl $0x10, %esi movq %r13, %rdi callq 0x8db8c movq %r12, %rdi callq 0x99adc movl %ebp, %eax addq $0x128, %rsp # imm = 0x128 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
mbedtls_pkcs12_pbe_sha1_rc4_128: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 128h mov r14, r9 mov rbx, r8 mov r15, rcx mov r12, rdx mov r13, rdi lea rdi, [rsp+158h+var_138] call mbedtls_arc4_init xorps xmm0, xmm0 movups [rsp+158h+var_158], xmm0 lea r8, [rsp+158h+var_148] mov r9d, 10h mov rdi, r13 mov esi, 4 mov rdx, r12 mov rcx, r15 call pkcs12_pbe_derive_key_iv mov ebp, eax test eax, eax jnz short loc_98B83 mov r15, [rsp+158h+arg_0] lea r12, [rsp+158h+var_138] lea r13, [rsp+158h+var_148] mov rdi, r12 mov rsi, r13 mov edx, 10h call mbedtls_arc4_setup mov rdi, r12 mov rsi, r14 mov rdx, rbx mov rcx, r15 call mbedtls_arc4_crypt mov ebp, eax mov esi, 10h mov rdi, r13 call mbedtls_platform_zeroize mov rdi, r12 call mbedtls_arc4_free loc_98B83: mov eax, ebp add rsp, 128h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mbedtls_pkcs12_pbe_sha1_rc4_128( int a1, long long a2, int a3, int a4, long long a5, long long a6, long long a7) { unsigned int v11; // ebp _BYTE v13[16]; // [rsp+10h] [rbp-148h] BYREF _BYTE v14[312]; // [rsp+20h] [rbp-138h] BYREF mbedtls_arc4_init(v14); v11 = pkcs12_pbe_derive_key_iv(a1, 4, a3, a4, (unsigned int)v13, 16, 0LL, 0LL); if ( !v11 ) { mbedtls_arc4_setup(v14, v13, 16LL); v11 = mbedtls_arc4_crypt(v14, a6, a5, a7); mbedtls_platform_zeroize((long long)v13, 16LL); mbedtls_arc4_free(v14); } return v11; }
mbedtls_pkcs12_pbe_sha1_rc4_128: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x128 MOV R14,R9 MOV RBX,R8 MOV R15,RCX MOV R12,RDX MOV R13,RDI LEA RDI,[RSP + 0x20] CALL 0x00199ad0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP],XMM0 LEA R8,[RSP + 0x10] MOV R9D,0x10 MOV RDI,R13 MOV ESI,0x4 MOV RDX,R12 MOV RCX,R15 CALL 0x00198b97 MOV EBP,EAX TEST EAX,EAX JNZ 0x00198b83 MOV R15,qword ptr [RSP + 0x160] LEA R12,[RSP + 0x20] LEA R13,[RSP + 0x10] MOV RDI,R12 MOV RSI,R13 MOV EDX,0x10 CALL 0x00199aec MOV RDI,R12 MOV RSI,R14 MOV RDX,RBX MOV RCX,R15 CALL 0x00199b5c MOV EBP,EAX MOV ESI,0x10 MOV RDI,R13 CALL 0x0018db8c MOV RDI,R12 CALL 0x00199adc LAB_00198b83: MOV EAX,EBP ADD RSP,0x128 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int mbedtls_pkcs12_pbe_sha1_rc4_128 (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7) { int iVar1; int1 local_148 [16]; int1 local_138 [264]; mbedtls_arc4_init(local_138); iVar1 = pkcs12_pbe_derive_key_iv(param_1,4,param_3,param_4,local_148,0x10,0,0); if (iVar1 == 0) { mbedtls_arc4_setup(local_138,local_148,0x10); iVar1 = mbedtls_arc4_crypt(local_138,param_6,param_5,param_7); mbedtls_platform_zeroize(local_148,0x10); mbedtls_arc4_free(local_138); } return iVar1; }
29,564
js_parse_get_pos
bluesky950520[P]quickjs/quickjs.c
static int js_parse_get_pos(JSParseState *s, JSParsePos *sp) { sp->last_line_num = s->last_line_num; sp->last_col_num = s->last_col_num; sp->line_num = s->token.line_num; sp->col_num = s->token.col_num; sp->ptr = s->token.ptr; sp->eol = s->eol; sp->mark = s->mark; sp->got_lf = s->got_lf; return 0; }
O0
c
js_parse_get_pos: movq %rdi, -0x8(%rsp) movq %rsi, -0x10(%rsp) movq -0x8(%rsp), %rax movl 0x8(%rax), %ecx movq -0x10(%rsp), %rax movl %ecx, (%rax) movq -0x8(%rsp), %rax movl 0xc(%rax), %ecx movq -0x10(%rsp), %rax movl %ecx, 0x4(%rax) movq -0x8(%rsp), %rax movl 0x24(%rax), %ecx movq -0x10(%rsp), %rax movl %ecx, 0x8(%rax) movq -0x8(%rsp), %rax movl 0x28(%rax), %ecx movq -0x10(%rsp), %rax movl %ecx, 0xc(%rax) movq -0x8(%rsp), %rax movq 0x30(%rax), %rcx movq -0x10(%rsp), %rax movq %rcx, 0x18(%rax) movq -0x8(%rsp), %rax movq 0x80(%rax), %rcx movq -0x10(%rsp), %rax movq %rcx, 0x20(%rax) movq -0x8(%rsp), %rax movq 0x88(%rax), %rcx movq -0x10(%rsp), %rax movq %rcx, 0x28(%rax) movq -0x8(%rsp), %rax movl 0x58(%rax), %ecx movq -0x10(%rsp), %rax movl %ecx, 0x10(%rax) xorl %eax, %eax retq nopl (%rax,%rax)
js_parse_get_pos: mov [rsp+var_8], rdi mov [rsp+var_10], rsi mov rax, [rsp+var_8] mov ecx, [rax+8] mov rax, [rsp+var_10] mov [rax], ecx mov rax, [rsp+var_8] mov ecx, [rax+0Ch] mov rax, [rsp+var_10] mov [rax+4], ecx mov rax, [rsp+var_8] mov ecx, [rax+24h] mov rax, [rsp+var_10] mov [rax+8], ecx mov rax, [rsp+var_8] mov ecx, [rax+28h] mov rax, [rsp+var_10] mov [rax+0Ch], ecx mov rax, [rsp+var_8] mov rcx, [rax+30h] mov rax, [rsp+var_10] mov [rax+18h], rcx mov rax, [rsp+var_8] mov rcx, [rax+80h] mov rax, [rsp+var_10] mov [rax+20h], rcx mov rax, [rsp+var_8] mov rcx, [rax+88h] mov rax, [rsp+var_10] mov [rax+28h], rcx mov rax, [rsp+var_8] mov ecx, [rax+58h] mov rax, [rsp+var_10] mov [rax+10h], ecx xor eax, eax retn
long long js_parse_get_pos(long long a1, long long a2) { *(_DWORD *)a2 = *(_DWORD *)(a1 + 8); *(_DWORD *)(a2 + 4) = *(_DWORD *)(a1 + 12); *(_DWORD *)(a2 + 8) = *(_DWORD *)(a1 + 36); *(_DWORD *)(a2 + 12) = *(_DWORD *)(a1 + 40); *(_QWORD *)(a2 + 24) = *(_QWORD *)(a1 + 48); *(_QWORD *)(a2 + 32) = *(_QWORD *)(a1 + 128); *(_QWORD *)(a2 + 40) = *(_QWORD *)(a1 + 136); *(_DWORD *)(a2 + 16) = *(_DWORD *)(a1 + 88); return 0LL; }
js_parse_get_pos: MOV qword ptr [RSP + -0x8],RDI MOV qword ptr [RSP + -0x10],RSI MOV RAX,qword ptr [RSP + -0x8] MOV ECX,dword ptr [RAX + 0x8] MOV RAX,qword ptr [RSP + -0x10] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RSP + -0x8] MOV ECX,dword ptr [RAX + 0xc] MOV RAX,qword ptr [RSP + -0x10] MOV dword ptr [RAX + 0x4],ECX MOV RAX,qword ptr [RSP + -0x8] MOV ECX,dword ptr [RAX + 0x24] MOV RAX,qword ptr [RSP + -0x10] MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RSP + -0x8] MOV ECX,dword ptr [RAX + 0x28] MOV RAX,qword ptr [RSP + -0x10] MOV dword ptr [RAX + 0xc],ECX MOV RAX,qword ptr [RSP + -0x8] MOV RCX,qword ptr [RAX + 0x30] MOV RAX,qword ptr [RSP + -0x10] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RSP + -0x8] MOV RCX,qword ptr [RAX + 0x80] MOV RAX,qword ptr [RSP + -0x10] MOV qword ptr [RAX + 0x20],RCX MOV RAX,qword ptr [RSP + -0x8] MOV RCX,qword ptr [RAX + 0x88] MOV RAX,qword ptr [RSP + -0x10] MOV qword ptr [RAX + 0x28],RCX MOV RAX,qword ptr [RSP + -0x8] MOV ECX,dword ptr [RAX + 0x58] MOV RAX,qword ptr [RSP + -0x10] MOV dword ptr [RAX + 0x10],ECX XOR EAX,EAX RET
int8 js_parse_get_pos(long param_1,int4 *param_2) { *param_2 = *(int4 *)(param_1 + 8); param_2[1] = *(int4 *)(param_1 + 0xc); param_2[2] = *(int4 *)(param_1 + 0x24); param_2[3] = *(int4 *)(param_1 + 0x28); *(int8 *)(param_2 + 6) = *(int8 *)(param_1 + 0x30); *(int8 *)(param_2 + 8) = *(int8 *)(param_1 + 0x80); *(int8 *)(param_2 + 10) = *(int8 *)(param_1 + 0x88); param_2[4] = *(int4 *)(param_1 + 0x58); return 0; }
29,565
r3d_frustum_create
r3d/src/details/r3d_frustum.c
r3d_frustum_t r3d_frustum_create(Matrix matrixViewProjection) { r3d_frustum_t frustum = { 0 }; frustum.planes[R3D_PLANE_RIGHT] = r3d_frustum_normalize_plane((Vector4) { matrixViewProjection.m3 - matrixViewProjection.m0, matrixViewProjection.m7 - matrixViewProjection.m4, matrixViewProjection.m11 - matrixViewProjection.m8, matrixViewProjection.m15 - matrixViewProjection.m12 }); frustum.planes[R3D_PLANE_LEFT] = r3d_frustum_normalize_plane((Vector4) { matrixViewProjection.m3 + matrixViewProjection.m0, matrixViewProjection.m7 + matrixViewProjection.m4, matrixViewProjection.m11 + matrixViewProjection.m8, matrixViewProjection.m15 + matrixViewProjection.m12 }); frustum.planes[R3D_PLANE_TOP] = r3d_frustum_normalize_plane((Vector4) { matrixViewProjection.m3 - matrixViewProjection.m1, matrixViewProjection.m7 - matrixViewProjection.m5, matrixViewProjection.m11 - matrixViewProjection.m9, matrixViewProjection.m15 - matrixViewProjection.m13 }); frustum.planes[R3D_PLANE_BOTTOM] = r3d_frustum_normalize_plane((Vector4) { matrixViewProjection.m3 + matrixViewProjection.m1, matrixViewProjection.m7 + matrixViewProjection.m5, matrixViewProjection.m11 + matrixViewProjection.m9, matrixViewProjection.m15 + matrixViewProjection.m13 }); frustum.planes[R3D_PLANE_BACK] = r3d_frustum_normalize_plane((Vector4) { matrixViewProjection.m3 - matrixViewProjection.m2, matrixViewProjection.m7 - matrixViewProjection.m6, matrixViewProjection.m11 - matrixViewProjection.m10, matrixViewProjection.m15 - matrixViewProjection.m14 }); frustum.planes[R3D_PLANE_FRONT] = r3d_frustum_normalize_plane((Vector4) { matrixViewProjection.m3 + matrixViewProjection.m2, matrixViewProjection.m7 + matrixViewProjection.m6, matrixViewProjection.m11 + matrixViewProjection.m10, matrixViewProjection.m15 + matrixViewProjection.m14 }); return frustum; }
O3
c
r3d_frustum_create: pushq %rbp movq %rsp, %rbp movq %rdi, %rax movss 0x40(%rbp), %xmm0 movss 0x10(%rbp), %xmm5 movss 0x14(%rbp), %xmm7 movaps %xmm0, %xmm10 subss %xmm5, %xmm10 movss 0x44(%rbp), %xmm2 movaps %xmm2, %xmm12 subss %xmm7, %xmm12 movss 0x48(%rbp), %xmm1 movss 0x18(%rbp), %xmm6 movaps %xmm1, %xmm11 subss %xmm6, %xmm11 movss 0x4c(%rbp), %xmm3 movss 0x1c(%rbp), %xmm8 movaps %xmm12, %xmm4 mulss %xmm12, %xmm4 movaps %xmm10, %xmm9 mulss %xmm10, %xmm9 addss %xmm4, %xmm9 movaps %xmm11, %xmm4 mulss %xmm11, %xmm4 addss %xmm9, %xmm4 sqrtss %xmm4, %xmm13 xorps %xmm9, %xmm9 movss 0x29f7(%rip), %xmm4 # 0xe202c ucomiss %xmm13, %xmm4 xorps %xmm14, %xmm14 xorps %xmm15, %xmm15 jae 0xdf67e movaps %xmm3, %xmm14 subss %xmm8, %xmm14 movss 0x29af(%rip), %xmm15 # 0xe2004 divss %xmm13, %xmm15 mulss %xmm15, %xmm10 mulss %xmm15, %xmm12 unpcklps %xmm12, %xmm10 # xmm10 = xmm10[0],xmm12[0],xmm10[1],xmm12[1] mulss %xmm15, %xmm11 mulss %xmm14, %xmm15 unpcklps %xmm15, %xmm11 # xmm11 = xmm11[0],xmm15[0],xmm11[1],xmm15[1] movaps %xmm10, %xmm14 movaps %xmm11, %xmm15 movlhps %xmm15, %xmm14 # xmm14 = xmm14[0],xmm15[0] leaq 0x10(%rbp), %rcx movups %xmm14, 0x40(%rax) addss %xmm0, %xmm5 addss %xmm2, %xmm7 addss %xmm1, %xmm6 movaps %xmm7, %xmm10 mulss %xmm7, %xmm10 movaps %xmm5, %xmm11 mulss %xmm5, %xmm11 addss %xmm10, %xmm11 movaps %xmm6, %xmm10 mulss %xmm6, %xmm10 addss %xmm11, %xmm10 sqrtss %xmm10, %xmm10 ucomiss %xmm10, %xmm4 xorps %xmm11, %xmm11 jae 0xdf701 addss %xmm3, %xmm8 movss 0x292b(%rip), %xmm9 # 0xe2004 divss %xmm10, %xmm9 mulss %xmm9, %xmm5 mulss %xmm9, %xmm7 unpcklps %xmm7, %xmm5 # xmm5 = xmm5[0],xmm7[0],xmm5[1],xmm7[1] mulss %xmm9, %xmm6 mulss %xmm8, %xmm9 unpcklps %xmm9, %xmm6 # xmm6 = xmm6[0],xmm9[0],xmm6[1],xmm9[1] movaps %xmm5, %xmm9 movaps %xmm6, %xmm11 movlhps %xmm11, %xmm9 # xmm9 = xmm9[0],xmm11[0] movups %xmm9, 0x50(%rax) movss 0x10(%rcx), %xmm5 movss 0x14(%rcx), %xmm7 movaps %xmm0, %xmm10 subss %xmm5, %xmm10 movaps %xmm2, %xmm12 subss %xmm7, %xmm12 movss 0x18(%rcx), %xmm6 movaps %xmm1, %xmm11 subss %xmm6, %xmm11 movss 0x1c(%rcx), %xmm8 movaps %xmm12, %xmm9 mulss %xmm12, %xmm9 movaps %xmm10, %xmm13 mulss %xmm10, %xmm13 addss %xmm9, %xmm13 movaps %xmm11, %xmm9 mulss %xmm11, %xmm9 addss %xmm13, %xmm9 xorps %xmm13, %xmm13 sqrtss %xmm9, %xmm13 xorps %xmm9, %xmm9 ucomiss %xmm13, %xmm4 xorps %xmm14, %xmm14 xorps %xmm15, %xmm15 jae 0xdf7b5 movaps %xmm3, %xmm14 subss %xmm8, %xmm14 movss 0x2878(%rip), %xmm15 # 0xe2004 divss %xmm13, %xmm15 mulss %xmm15, %xmm10 mulss %xmm15, %xmm12 unpcklps %xmm12, %xmm10 # xmm10 = xmm10[0],xmm12[0],xmm10[1],xmm12[1] mulss %xmm15, %xmm11 mulss %xmm14, %xmm15 unpcklps %xmm15, %xmm11 # xmm11 = xmm11[0],xmm15[0],xmm11[1],xmm15[1] movaps %xmm10, %xmm14 movaps %xmm11, %xmm15 movlhps %xmm15, %xmm14 # xmm14 = xmm14[0],xmm15[0] movups %xmm14, 0x30(%rax) addss %xmm0, %xmm5 addss %xmm2, %xmm7 addss %xmm1, %xmm6 movaps %xmm7, %xmm10 mulss %xmm7, %xmm10 movaps %xmm5, %xmm11 mulss %xmm5, %xmm11 addss %xmm10, %xmm11 movaps %xmm6, %xmm10 mulss %xmm6, %xmm10 addss %xmm11, %xmm10 sqrtss %xmm10, %xmm10 ucomiss %xmm10, %xmm4 xorps %xmm11, %xmm11 jae 0xdf834 addss %xmm3, %xmm8 movss 0x27f8(%rip), %xmm9 # 0xe2004 divss %xmm10, %xmm9 mulss %xmm9, %xmm5 mulss %xmm9, %xmm7 unpcklps %xmm7, %xmm5 # xmm5 = xmm5[0],xmm7[0],xmm5[1],xmm7[1] mulss %xmm9, %xmm6 mulss %xmm8, %xmm9 unpcklps %xmm9, %xmm6 # xmm6 = xmm6[0],xmm9[0],xmm6[1],xmm9[1] movaps %xmm5, %xmm9 movaps %xmm6, %xmm11 movlhps %xmm11, %xmm9 # xmm9 = xmm9[0],xmm11[0] movups %xmm9, 0x20(%rax) movss 0x20(%rcx), %xmm8 movss 0x24(%rcx), %xmm7 movaps %xmm0, %xmm10 subss %xmm8, %xmm10 movaps %xmm2, %xmm12 subss %xmm7, %xmm12 movss 0x28(%rcx), %xmm9 movaps %xmm1, %xmm11 subss %xmm9, %xmm11 movss 0x2c(%rcx), %xmm5 movaps %xmm12, %xmm6 mulss %xmm12, %xmm6 movaps %xmm10, %xmm13 mulss %xmm10, %xmm13 addss %xmm6, %xmm13 movaps %xmm11, %xmm6 mulss %xmm11, %xmm6 addss %xmm13, %xmm6 xorps %xmm13, %xmm13 sqrtss %xmm6, %xmm13 xorps %xmm6, %xmm6 ucomiss %xmm13, %xmm4 xorps %xmm14, %xmm14 xorps %xmm15, %xmm15 jae 0xdf8e8 movaps %xmm3, %xmm14 subss %xmm5, %xmm14 movss 0x2745(%rip), %xmm15 # 0xe2004 divss %xmm13, %xmm15 mulss %xmm15, %xmm10 mulss %xmm15, %xmm12 unpcklps %xmm12, %xmm10 # xmm10 = xmm10[0],xmm12[0],xmm10[1],xmm12[1] mulss %xmm15, %xmm11 mulss %xmm14, %xmm15 unpcklps %xmm15, %xmm11 # xmm11 = xmm11[0],xmm15[0],xmm11[1],xmm15[1] movaps %xmm10, %xmm14 movaps %xmm11, %xmm15 movlhps %xmm15, %xmm14 # xmm14 = xmm14[0],xmm15[0] movups %xmm14, (%rax) addss %xmm8, %xmm0 addss %xmm7, %xmm2 addss %xmm9, %xmm1 movaps %xmm2, %xmm7 mulss %xmm2, %xmm7 movaps %xmm0, %xmm8 mulss %xmm0, %xmm8 addss %xmm7, %xmm8 movaps %xmm1, %xmm7 mulss %xmm1, %xmm7 addss %xmm8, %xmm7 sqrtss %xmm7, %xmm7 ucomiss %xmm7, %xmm4 xorps %xmm4, %xmm4 jae 0xdf957 addss %xmm5, %xmm3 movss 0x26cd(%rip), %xmm4 # 0xe2004 divss %xmm7, %xmm4 mulss %xmm4, %xmm0 mulss %xmm4, %xmm2 unpcklps %xmm2, %xmm0 # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1] mulss %xmm4, %xmm1 mulss %xmm3, %xmm4 unpcklps %xmm4, %xmm1 # xmm1 = xmm1[0],xmm4[0],xmm1[1],xmm4[1] movaps %xmm0, %xmm6 movaps %xmm1, %xmm4 movlhps %xmm4, %xmm6 # xmm6 = xmm6[0],xmm4[0] movups %xmm6, 0x10(%rax) popq %rbp retq
r3d_frustum_create: push rbp mov rbp, rsp mov rax, rdi movss xmm0, [rbp+arg_30] movss xmm5, [rbp+arg_0] movss xmm7, [rbp+arg_4] movaps xmm10, xmm0 subss xmm10, xmm5 movss xmm2, [rbp+arg_34] movaps xmm12, xmm2 subss xmm12, xmm7 movss xmm1, [rbp+arg_38] movss xmm6, [rbp+arg_8] movaps xmm11, xmm1 subss xmm11, xmm6 movss xmm3, [rbp+arg_3C] movss xmm8, [rbp+arg_C] movaps xmm4, xmm12 mulss xmm4, xmm12 movaps xmm9, xmm10 mulss xmm9, xmm10 addss xmm9, xmm4 movaps xmm4, xmm11 mulss xmm4, xmm11 addss xmm4, xmm9 sqrtss xmm13, xmm4 xorps xmm9, xmm9 movss xmm4, cs:dword_E202C ucomiss xmm4, xmm13 xorps xmm14, xmm14 xorps xmm15, xmm15 jnb short loc_DF67E movaps xmm14, xmm3 subss xmm14, xmm8 movss xmm15, cs:dword_E2004 divss xmm15, xmm13 mulss xmm10, xmm15 mulss xmm12, xmm15 unpcklps xmm10, xmm12 mulss xmm11, xmm15 mulss xmm15, xmm14 unpcklps xmm11, xmm15 movaps xmm14, xmm10 movaps xmm15, xmm11 loc_DF67E: movlhps xmm14, xmm15 lea rcx, [rbp+arg_0] movups xmmword ptr [rax+40h], xmm14 addss xmm5, xmm0 addss xmm7, xmm2 addss xmm6, xmm1 movaps xmm10, xmm7 mulss xmm10, xmm7 movaps xmm11, xmm5 mulss xmm11, xmm5 addss xmm11, xmm10 movaps xmm10, xmm6 mulss xmm10, xmm6 addss xmm10, xmm11 sqrtss xmm10, xmm10 ucomiss xmm4, xmm10 xorps xmm11, xmm11 jnb short loc_DF701 addss xmm8, xmm3 movss xmm9, cs:dword_E2004 divss xmm9, xmm10 mulss xmm5, xmm9 mulss xmm7, xmm9 unpcklps xmm5, xmm7 mulss xmm6, xmm9 mulss xmm9, xmm8 unpcklps xmm6, xmm9 movaps xmm9, xmm5 movaps xmm11, xmm6 loc_DF701: movlhps xmm9, xmm11 movups xmmword ptr [rax+50h], xmm9 movss xmm5, dword ptr [rcx+10h] movss xmm7, dword ptr [rcx+14h] movaps xmm10, xmm0 subss xmm10, xmm5 movaps xmm12, xmm2 subss xmm12, xmm7 movss xmm6, dword ptr [rcx+18h] movaps xmm11, xmm1 subss xmm11, xmm6 movss xmm8, dword ptr [rcx+1Ch] movaps xmm9, xmm12 mulss xmm9, xmm12 movaps xmm13, xmm10 mulss xmm13, xmm10 addss xmm13, xmm9 movaps xmm9, xmm11 mulss xmm9, xmm11 addss xmm9, xmm13 xorps xmm13, xmm13 sqrtss xmm13, xmm9 xorps xmm9, xmm9 ucomiss xmm4, xmm13 xorps xmm14, xmm14 xorps xmm15, xmm15 jnb short loc_DF7B5 movaps xmm14, xmm3 subss xmm14, xmm8 movss xmm15, cs:dword_E2004 divss xmm15, xmm13 mulss xmm10, xmm15 mulss xmm12, xmm15 unpcklps xmm10, xmm12 mulss xmm11, xmm15 mulss xmm15, xmm14 unpcklps xmm11, xmm15 movaps xmm14, xmm10 movaps xmm15, xmm11 loc_DF7B5: movlhps xmm14, xmm15 movups xmmword ptr [rax+30h], xmm14 addss xmm5, xmm0 addss xmm7, xmm2 addss xmm6, xmm1 movaps xmm10, xmm7 mulss xmm10, xmm7 movaps xmm11, xmm5 mulss xmm11, xmm5 addss xmm11, xmm10 movaps xmm10, xmm6 mulss xmm10, xmm6 addss xmm10, xmm11 sqrtss xmm10, xmm10 ucomiss xmm4, xmm10 xorps xmm11, xmm11 jnb short loc_DF834 addss xmm8, xmm3 movss xmm9, cs:dword_E2004 divss xmm9, xmm10 mulss xmm5, xmm9 mulss xmm7, xmm9 unpcklps xmm5, xmm7 mulss xmm6, xmm9 mulss xmm9, xmm8 unpcklps xmm6, xmm9 movaps xmm9, xmm5 movaps xmm11, xmm6 loc_DF834: movlhps xmm9, xmm11 movups xmmword ptr [rax+20h], xmm9 movss xmm8, dword ptr [rcx+20h] movss xmm7, dword ptr [rcx+24h] movaps xmm10, xmm0 subss xmm10, xmm8 movaps xmm12, xmm2 subss xmm12, xmm7 movss xmm9, dword ptr [rcx+28h] movaps xmm11, xmm1 subss xmm11, xmm9 movss xmm5, dword ptr [rcx+2Ch] movaps xmm6, xmm12 mulss xmm6, xmm12 movaps xmm13, xmm10 mulss xmm13, xmm10 addss xmm13, xmm6 movaps xmm6, xmm11 mulss xmm6, xmm11 addss xmm6, xmm13 xorps xmm13, xmm13 sqrtss xmm13, xmm6 xorps xmm6, xmm6 ucomiss xmm4, xmm13 xorps xmm14, xmm14 xorps xmm15, xmm15 jnb short loc_DF8E8 movaps xmm14, xmm3 subss xmm14, xmm5 movss xmm15, cs:dword_E2004 divss xmm15, xmm13 mulss xmm10, xmm15 mulss xmm12, xmm15 unpcklps xmm10, xmm12 mulss xmm11, xmm15 mulss xmm15, xmm14 unpcklps xmm11, xmm15 movaps xmm14, xmm10 movaps xmm15, xmm11 loc_DF8E8: movlhps xmm14, xmm15 movups xmmword ptr [rax], xmm14 addss xmm0, xmm8 addss xmm2, xmm7 addss xmm1, xmm9 movaps xmm7, xmm2 mulss xmm7, xmm2 movaps xmm8, xmm0 mulss xmm8, xmm0 addss xmm8, xmm7 movaps xmm7, xmm1 mulss xmm7, xmm1 addss xmm7, xmm8 sqrtss xmm7, xmm7 ucomiss xmm4, xmm7 xorps xmm4, xmm4 jnb short loc_DF957 addss xmm3, xmm5 movss xmm4, cs:dword_E2004 divss xmm4, xmm7 mulss xmm0, xmm4 mulss xmm2, xmm4 unpcklps xmm0, xmm2 mulss xmm1, xmm4 mulss xmm4, xmm3 unpcklps xmm1, xmm4 movaps xmm6, xmm0 movaps xmm4, xmm1 loc_DF957: movlhps xmm6, xmm4 movups xmmword ptr [rax+10h], xmm6 pop rbp retn
__m128 * r3d_frustum_create( __m128 *a1, long long a2, long long a3, long long a4, long long a5, long long a6, long long a7, long long a8, long long a9, long long a10, long long a11, long long a12, long long a13, long long a14) { __m128 *result; // rax __m128 v15; // xmm0 __m128 v16; // xmm5 __m128 v17; // xmm7 __m128 v18; // xmm10 __m128 v19; // xmm2 __m128 v20; // xmm12 __m128 v21; // xmm1 __m128 v22; // xmm6 __m128 v23; // xmm11 float v24; // xmm13_4 __m128 v25; // xmm9 __m128 v26; // xmm14 __m128 v27; // xmm15 __m128 v28; // xmm15 float v29; // xmm10_4 __m128 v30; // xmm11 __m128 v31; // xmm9 __m128 v32; // xmm6 __m128 v33; // xmm5 __m128 v34; // xmm7 __m128 v35; // xmm10 __m128 v36; // xmm12 __m128 v37; // xmm6 __m128 v38; // xmm11 float v39; // xmm13_4 __m128 v40; // xmm9 __m128 v41; // xmm14 __m128 v42; // xmm15 __m128 v43; // xmm15 float v44; // xmm10_4 __m128 v45; // xmm11 __m128 v46; // xmm9 __m128 v47; // xmm6 __m128 v48; // xmm10 __m128 v49; // xmm12 __m128 v50; // xmm11 float v51; // xmm13_4 __m128 v52; // xmm6 __m128 v53; // xmm14 __m128 v54; // xmm15 __m128 v55; // xmm15 float v56; // xmm7_4 __m128 v57; // xmm4 __m128 v58; // xmm4 result = a1; v15 = (__m128)(unsigned int)a13; v16 = (__m128)(unsigned int)a7; v17 = (__m128)HIDWORD(a7); v18 = (__m128)(unsigned int)a13; v18.m128_f32[0] = *(float *)&a13 - *(float *)&a7; v19 = (__m128)HIDWORD(a13); v20 = (__m128)HIDWORD(a13); v20.m128_f32[0] = *((float *)&a13 + 1) - *((float *)&a7 + 1); v21 = (__m128)(unsigned int)a14; v22 = (__m128)(unsigned int)a8; v23 = (__m128)(unsigned int)a14; v23.m128_f32[0] = *(float *)&a14 - *(float *)&a8; v24 = fsqrt( (float)(v23.m128_f32[0] * v23.m128_f32[0]) + (float)((float)(v18.m128_f32[0] * v18.m128_f32[0]) + (float)(v20.m128_f32[0] * v20.m128_f32[0]))); v25 = 0LL; v26 = 0LL; v27 = 0LL; if ( v24 > 0.000001 ) { v28 = (__m128)0x3F800000u; v18.m128_f32[0] = v18.m128_f32[0] * (float)(1.0 / v24); v20.m128_f32[0] = v20.m128_f32[0] * (float)(1.0 / v24); v23.m128_f32[0] = v23.m128_f32[0] * (float)(1.0 / v24); v28.m128_f32[0] = (float)(1.0 / v24) * (float)(*((float *)&a14 + 1) - *((float *)&a8 + 1)); v26 = _mm_unpacklo_ps(v18, v20); v27 = _mm_unpacklo_ps(v23, v28); } a1[4] = _mm_movelh_ps(v26, v27); v16.m128_f32[0] = *(float *)&a7 + *(float *)&a13; v17.m128_f32[0] = *((float *)&a7 + 1) + *((float *)&a13 + 1); v22.m128_f32[0] = *(float *)&a8 + *(float *)&a14; v29 = fsqrt( (float)(v22.m128_f32[0] * v22.m128_f32[0]) + (float)((float)(v16.m128_f32[0] * v16.m128_f32[0]) + (float)(v17.m128_f32[0] * v17.m128_f32[0]))); v30 = 0LL; if ( v29 > 0.000001 ) { v31 = (__m128)0x3F800000u; v16.m128_f32[0] = v16.m128_f32[0] * (float)(1.0 / v29); v17.m128_f32[0] = v17.m128_f32[0] * (float)(1.0 / v29); v22.m128_f32[0] = v22.m128_f32[0] * (float)(1.0 / v29); v31.m128_f32[0] = (float)(1.0 / v29) * (float)(*((float *)&a8 + 1) + *((float *)&a14 + 1)); v32 = _mm_unpacklo_ps(v22, v31); v25 = _mm_unpacklo_ps(v16, v17); v30 = v32; } a1[5] = _mm_movelh_ps(v25, v30); v33 = (__m128)(unsigned int)a9; v34 = (__m128)HIDWORD(a9); v35 = (__m128)(unsigned int)a13; v35.m128_f32[0] = *(float *)&a13 - *(float *)&a9; v36 = (__m128)HIDWORD(a13); v36.m128_f32[0] = *((float *)&a13 + 1) - *((float *)&a9 + 1); v37 = (__m128)(unsigned int)a10; v38 = (__m128)(unsigned int)a14; v38.m128_f32[0] = *(float *)&a14 - *(float *)&a10; v39 = fsqrt( (float)(v38.m128_f32[0] * v38.m128_f32[0]) + (float)((float)(v35.m128_f32[0] * v35.m128_f32[0]) + (float)(v36.m128_f32[0] * v36.m128_f32[0]))); v40 = 0LL; v41 = 0LL; v42 = 0LL; if ( v39 > 0.000001 ) { v43 = (__m128)0x3F800000u; v35.m128_f32[0] = v35.m128_f32[0] * (float)(1.0 / v39); v36.m128_f32[0] = v36.m128_f32[0] * (float)(1.0 / v39); v38.m128_f32[0] = v38.m128_f32[0] * (float)(1.0 / v39); v43.m128_f32[0] = (float)(1.0 / v39) * (float)(*((float *)&a14 + 1) - *((float *)&a10 + 1)); v41 = _mm_unpacklo_ps(v35, v36); v42 = _mm_unpacklo_ps(v38, v43); } a1[3] = _mm_movelh_ps(v41, v42); v33.m128_f32[0] = *(float *)&a9 + *(float *)&a13; v34.m128_f32[0] = *((float *)&a9 + 1) + *((float *)&a13 + 1); v37.m128_f32[0] = *(float *)&a10 + *(float *)&a14; v44 = fsqrt( (float)(v37.m128_f32[0] * v37.m128_f32[0]) + (float)((float)(v33.m128_f32[0] * v33.m128_f32[0]) + (float)(v34.m128_f32[0] * v34.m128_f32[0]))); v45 = 0LL; if ( v44 > 0.000001 ) { v46 = (__m128)0x3F800000u; v33.m128_f32[0] = v33.m128_f32[0] * (float)(1.0 / v44); v34.m128_f32[0] = v34.m128_f32[0] * (float)(1.0 / v44); v37.m128_f32[0] = v37.m128_f32[0] * (float)(1.0 / v44); v46.m128_f32[0] = (float)(1.0 / v44) * (float)(*((float *)&a10 + 1) + *((float *)&a14 + 1)); v47 = _mm_unpacklo_ps(v37, v46); v40 = _mm_unpacklo_ps(v33, v34); v45 = v47; } a1[2] = _mm_movelh_ps(v40, v45); v48 = (__m128)(unsigned int)a13; v48.m128_f32[0] = *(float *)&a13 - *(float *)&a11; v49 = (__m128)HIDWORD(a13); v49.m128_f32[0] = *((float *)&a13 + 1) - *((float *)&a11 + 1); v50 = (__m128)(unsigned int)a14; v50.m128_f32[0] = *(float *)&a14 - *(float *)&a12; v51 = fsqrt( (float)(v50.m128_f32[0] * v50.m128_f32[0]) + (float)((float)(v48.m128_f32[0] * v48.m128_f32[0]) + (float)(v49.m128_f32[0] * v49.m128_f32[0]))); v52 = 0LL; v53 = 0LL; v54 = 0LL; if ( v51 > 0.000001 ) { v55 = (__m128)0x3F800000u; v48.m128_f32[0] = v48.m128_f32[0] * (float)(1.0 / v51); v49.m128_f32[0] = v49.m128_f32[0] * (float)(1.0 / v51); v50.m128_f32[0] = v50.m128_f32[0] * (float)(1.0 / v51); v55.m128_f32[0] = (float)(1.0 / v51) * (float)(*((float *)&a14 + 1) - *((float *)&a12 + 1)); v53 = _mm_unpacklo_ps(v48, v49); v54 = _mm_unpacklo_ps(v50, v55); } *a1 = _mm_movelh_ps(v53, v54); v15.m128_f32[0] = *(float *)&a13 + *(float *)&a11; v19.m128_f32[0] = *((float *)&a13 + 1) + *((float *)&a11 + 1); v21.m128_f32[0] = *(float *)&a14 + *(float *)&a12; v56 = fsqrt( (float)(v21.m128_f32[0] * v21.m128_f32[0]) + (float)((float)(v15.m128_f32[0] * v15.m128_f32[0]) + (float)(v19.m128_f32[0] * v19.m128_f32[0]))); v57 = 0LL; if ( v56 > 0.000001 ) { v58 = (__m128)0x3F800000u; v15.m128_f32[0] = v15.m128_f32[0] * (float)(1.0 / v56); v19.m128_f32[0] = v19.m128_f32[0] * (float)(1.0 / v56); v21.m128_f32[0] = v21.m128_f32[0] * (float)(1.0 / v56); v58.m128_f32[0] = (float)(1.0 / v56) * (float)(*((float *)&a14 + 1) + *((float *)&a12 + 1)); v52 = _mm_unpacklo_ps(v15, v19); v57 = _mm_unpacklo_ps(v21, v58); } a1[1] = _mm_movelh_ps(v52, v57); return result; }
r3d_frustum_create: PUSH RBP MOV RBP,RSP MOV RAX,RDI MOVSS XMM0,dword ptr [RBP + 0x40] MOVSS XMM5,dword ptr [RBP + 0x10] MOVSS XMM7,dword ptr [RBP + 0x14] MOVAPS XMM10,XMM0 SUBSS XMM10,XMM5 MOVSS XMM2,dword ptr [RBP + 0x44] MOVAPS XMM12,XMM2 SUBSS XMM12,XMM7 MOVSS XMM1,dword ptr [RBP + 0x48] MOVSS XMM6,dword ptr [RBP + 0x18] MOVAPS XMM11,XMM1 SUBSS XMM11,XMM6 MOVSS XMM3,dword ptr [RBP + 0x4c] MOVSS XMM8,dword ptr [RBP + 0x1c] MOVAPS XMM4,XMM12 MULSS XMM4,XMM12 MOVAPS XMM9,XMM10 MULSS XMM9,XMM10 ADDSS XMM9,XMM4 MOVAPS XMM4,XMM11 MULSS XMM4,XMM11 ADDSS XMM4,XMM9 SQRTSS XMM13,XMM4 XORPS XMM9,XMM9 MOVSS XMM4,dword ptr [0x001e202c] UCOMISS XMM4,XMM13 XORPS XMM14,XMM14 XORPS XMM15,XMM15 JNC 0x001df67e MOVAPS XMM14,XMM3 SUBSS XMM14,XMM8 MOVSS XMM15,dword ptr [0x001e2004] DIVSS XMM15,XMM13 MULSS XMM10,XMM15 MULSS XMM12,XMM15 UNPCKLPS XMM10,XMM12 MULSS XMM11,XMM15 MULSS XMM15,XMM14 UNPCKLPS XMM11,XMM15 MOVAPS XMM14,XMM10 MOVAPS XMM15,XMM11 LAB_001df67e: MOVLHPS XMM14,XMM15 LEA RCX,[RBP + 0x10] MOVUPS xmmword ptr [RAX + 0x40],XMM14 ADDSS XMM5,XMM0 ADDSS XMM7,XMM2 ADDSS XMM6,XMM1 MOVAPS XMM10,XMM7 MULSS XMM10,XMM7 MOVAPS XMM11,XMM5 MULSS XMM11,XMM5 ADDSS XMM11,XMM10 MOVAPS XMM10,XMM6 MULSS XMM10,XMM6 ADDSS XMM10,XMM11 SQRTSS XMM10,XMM10 UCOMISS XMM4,XMM10 XORPS XMM11,XMM11 JNC 0x001df701 ADDSS XMM8,XMM3 MOVSS XMM9,dword ptr [0x001e2004] DIVSS XMM9,XMM10 MULSS XMM5,XMM9 MULSS XMM7,XMM9 UNPCKLPS XMM5,XMM7 MULSS XMM6,XMM9 MULSS XMM9,XMM8 UNPCKLPS XMM6,XMM9 MOVAPS XMM9,XMM5 MOVAPS XMM11,XMM6 LAB_001df701: MOVLHPS XMM9,XMM11 MOVUPS xmmword ptr [RAX + 0x50],XMM9 MOVSS XMM5,dword ptr [RCX + 0x10] MOVSS XMM7,dword ptr [RCX + 0x14] MOVAPS XMM10,XMM0 SUBSS XMM10,XMM5 MOVAPS XMM12,XMM2 SUBSS XMM12,XMM7 MOVSS XMM6,dword ptr [RCX + 0x18] MOVAPS XMM11,XMM1 SUBSS XMM11,XMM6 MOVSS XMM8,dword ptr [RCX + 0x1c] MOVAPS XMM9,XMM12 MULSS XMM9,XMM12 MOVAPS XMM13,XMM10 MULSS XMM13,XMM10 ADDSS XMM13,XMM9 MOVAPS XMM9,XMM11 MULSS XMM9,XMM11 ADDSS XMM9,XMM13 XORPS XMM13,XMM13 SQRTSS XMM13,XMM9 XORPS XMM9,XMM9 UCOMISS XMM4,XMM13 XORPS XMM14,XMM14 XORPS XMM15,XMM15 JNC 0x001df7b5 MOVAPS XMM14,XMM3 SUBSS XMM14,XMM8 MOVSS XMM15,dword ptr [0x001e2004] DIVSS XMM15,XMM13 MULSS XMM10,XMM15 MULSS XMM12,XMM15 UNPCKLPS XMM10,XMM12 MULSS XMM11,XMM15 MULSS XMM15,XMM14 UNPCKLPS XMM11,XMM15 MOVAPS XMM14,XMM10 MOVAPS XMM15,XMM11 LAB_001df7b5: MOVLHPS XMM14,XMM15 MOVUPS xmmword ptr [RAX + 0x30],XMM14 ADDSS XMM5,XMM0 ADDSS XMM7,XMM2 ADDSS XMM6,XMM1 MOVAPS XMM10,XMM7 MULSS XMM10,XMM7 MOVAPS XMM11,XMM5 MULSS XMM11,XMM5 ADDSS XMM11,XMM10 MOVAPS XMM10,XMM6 MULSS XMM10,XMM6 ADDSS XMM10,XMM11 SQRTSS XMM10,XMM10 UCOMISS XMM4,XMM10 XORPS XMM11,XMM11 JNC 0x001df834 ADDSS XMM8,XMM3 MOVSS XMM9,dword ptr [0x001e2004] DIVSS XMM9,XMM10 MULSS XMM5,XMM9 MULSS XMM7,XMM9 UNPCKLPS XMM5,XMM7 MULSS XMM6,XMM9 MULSS XMM9,XMM8 UNPCKLPS XMM6,XMM9 MOVAPS XMM9,XMM5 MOVAPS XMM11,XMM6 LAB_001df834: MOVLHPS XMM9,XMM11 MOVUPS xmmword ptr [RAX + 0x20],XMM9 MOVSS XMM8,dword ptr [RCX + 0x20] MOVSS XMM7,dword ptr [RCX + 0x24] MOVAPS XMM10,XMM0 SUBSS XMM10,XMM8 MOVAPS XMM12,XMM2 SUBSS XMM12,XMM7 MOVSS XMM9,dword ptr [RCX + 0x28] MOVAPS XMM11,XMM1 SUBSS XMM11,XMM9 MOVSS XMM5,dword ptr [RCX + 0x2c] MOVAPS XMM6,XMM12 MULSS XMM6,XMM12 MOVAPS XMM13,XMM10 MULSS XMM13,XMM10 ADDSS XMM13,XMM6 MOVAPS XMM6,XMM11 MULSS XMM6,XMM11 ADDSS XMM6,XMM13 XORPS XMM13,XMM13 SQRTSS XMM13,XMM6 XORPS XMM6,XMM6 UCOMISS XMM4,XMM13 XORPS XMM14,XMM14 XORPS XMM15,XMM15 JNC 0x001df8e8 MOVAPS XMM14,XMM3 SUBSS XMM14,XMM5 MOVSS XMM15,dword ptr [0x001e2004] DIVSS XMM15,XMM13 MULSS XMM10,XMM15 MULSS XMM12,XMM15 UNPCKLPS XMM10,XMM12 MULSS XMM11,XMM15 MULSS XMM15,XMM14 UNPCKLPS XMM11,XMM15 MOVAPS XMM14,XMM10 MOVAPS XMM15,XMM11 LAB_001df8e8: MOVLHPS XMM14,XMM15 MOVUPS xmmword ptr [RAX],XMM14 ADDSS XMM0,XMM8 ADDSS XMM2,XMM7 ADDSS XMM1,XMM9 MOVAPS XMM7,XMM2 MULSS XMM7,XMM2 MOVAPS XMM8,XMM0 MULSS XMM8,XMM0 ADDSS XMM8,XMM7 MOVAPS XMM7,XMM1 MULSS XMM7,XMM1 ADDSS XMM7,XMM8 SQRTSS XMM7,XMM7 UCOMISS XMM4,XMM7 XORPS XMM4,XMM4 JNC 0x001df957 ADDSS XMM3,XMM5 MOVSS XMM4,dword ptr [0x001e2004] DIVSS XMM4,XMM7 MULSS XMM0,XMM4 MULSS XMM2,XMM4 UNPCKLPS XMM0,XMM2 MULSS XMM1,XMM4 MULSS XMM4,XMM3 UNPCKLPS XMM1,XMM4 MOVAPS XMM6,XMM0 MOVAPS XMM4,XMM1 LAB_001df957: MOVLHPS XMM6,XMM4 MOVUPS xmmword ptr [RAX + 0x10],XMM6 POP RBP RET
void r3d_frustum_create(float *param_1) { float fVar1; float fVar2; float fVar3; float fVar4; float fVar5; float fVar6; float fVar7; float fVar8; float fVar9; float fVar10; float fVar11; float fStack0000000000000008; float fStack000000000000000c; float fStack0000000000000010; float fStack0000000000000014; float fStack0000000000000018; float fStack000000000000001c; float fStack0000000000000020; float fStack0000000000000024; float fStack0000000000000028; float fStack000000000000002c; float fStack0000000000000030; float fStack0000000000000034; float fStack0000000000000038; float fStack000000000000003c; float fStack0000000000000040; float fStack0000000000000044; fVar1 = DAT_001e202c; fVar4 = fStack0000000000000038 - fStack0000000000000008; fVar6 = fStack000000000000003c - fStack000000000000000c; fVar5 = fStack0000000000000040 - fStack0000000000000010; fVar7 = SQRT(fVar5 * fVar5 + fVar4 * fVar4 + fVar6 * fVar6); fVar2 = 0.0; fVar3 = 0.0; fVar8 = 0.0; fVar9 = 0.0; fVar10 = 0.0; fVar11 = 0.0; if (DAT_001e202c < fVar7) { fVar7 = DAT_001e2004 / fVar7; fVar8 = fVar4 * fVar7; fVar9 = fVar6 * fVar7; fVar10 = fVar5 * fVar7; fVar11 = fVar7 * (fStack0000000000000044 - fStack0000000000000014); } param_1[0x10] = fVar8; param_1[0x11] = fVar9; param_1[0x12] = fVar10; param_1[0x13] = fVar11; fStack0000000000000008 = fStack0000000000000008 + fStack0000000000000038; fStack000000000000000c = fStack000000000000000c + fStack000000000000003c; fStack0000000000000010 = fStack0000000000000010 + fStack0000000000000040; fVar8 = SQRT(fStack0000000000000010 * fStack0000000000000010 + fStack0000000000000008 * fStack0000000000000008 + fStack000000000000000c * fStack000000000000000c); fVar4 = 0.0; fVar5 = 0.0; if (fVar1 < fVar8) { fVar8 = DAT_001e2004 / fVar8; fVar2 = fStack0000000000000008 * fVar8; fVar3 = fStack000000000000000c * fVar8; fVar4 = fStack0000000000000010 * fVar8; fVar5 = fVar8 * (fStack0000000000000014 + fStack0000000000000044); } param_1[0x14] = fVar2; param_1[0x15] = fVar3; param_1[0x16] = fVar4; param_1[0x17] = fVar5; fVar4 = fStack0000000000000038 - fStack0000000000000018; fVar6 = fStack000000000000003c - fStack000000000000001c; fVar5 = fStack0000000000000040 - fStack0000000000000020; fVar7 = SQRT(fVar5 * fVar5 + fVar4 * fVar4 + fVar6 * fVar6); fVar2 = 0.0; fVar3 = 0.0; fVar8 = 0.0; fVar9 = 0.0; fVar10 = 0.0; fVar11 = 0.0; if (fVar1 < fVar7) { fVar7 = DAT_001e2004 / fVar7; fVar8 = fVar4 * fVar7; fVar9 = fVar6 * fVar7; fVar10 = fVar5 * fVar7; fVar11 = fVar7 * (fStack0000000000000044 - fStack0000000000000024); } param_1[0xc] = fVar8; param_1[0xd] = fVar9; param_1[0xe] = fVar10; param_1[0xf] = fVar11; fStack0000000000000018 = fStack0000000000000018 + fStack0000000000000038; fStack000000000000001c = fStack000000000000001c + fStack000000000000003c; fStack0000000000000020 = fStack0000000000000020 + fStack0000000000000040; fVar8 = SQRT(fStack0000000000000020 * fStack0000000000000020 + fStack0000000000000018 * fStack0000000000000018 + fStack000000000000001c * fStack000000000000001c); fVar4 = 0.0; fVar5 = 0.0; if (fVar1 < fVar8) { fVar8 = DAT_001e2004 / fVar8; fVar2 = fStack0000000000000018 * fVar8; fVar3 = fStack000000000000001c * fVar8; fVar4 = fStack0000000000000020 * fVar8; fVar5 = fVar8 * (fStack0000000000000024 + fStack0000000000000044); } param_1[8] = fVar2; param_1[9] = fVar3; param_1[10] = fVar4; param_1[0xb] = fVar5; fVar4 = fStack0000000000000038 - fStack0000000000000028; fVar6 = fStack000000000000003c - fStack000000000000002c; fVar5 = fStack0000000000000040 - fStack0000000000000030; fVar7 = SQRT(fVar5 * fVar5 + fVar4 * fVar4 + fVar6 * fVar6); fVar2 = 0.0; fVar3 = 0.0; fVar8 = 0.0; fVar9 = 0.0; fVar10 = 0.0; fVar11 = 0.0; if (fVar1 < fVar7) { fVar7 = DAT_001e2004 / fVar7; fVar8 = fVar4 * fVar7; fVar9 = fVar6 * fVar7; fVar10 = fVar5 * fVar7; fVar11 = fVar7 * (fStack0000000000000044 - fStack0000000000000034); } *param_1 = fVar8; param_1[1] = fVar9; param_1[2] = fVar10; param_1[3] = fVar11; fStack0000000000000038 = fStack0000000000000038 + fStack0000000000000028; fStack000000000000003c = fStack000000000000003c + fStack000000000000002c; fStack0000000000000040 = fStack0000000000000040 + fStack0000000000000030; fVar8 = SQRT(fStack0000000000000040 * fStack0000000000000040 + fStack0000000000000038 * fStack0000000000000038 + fStack000000000000003c * fStack000000000000003c); fVar4 = 0.0; fVar5 = 0.0; if (fVar1 < fVar8) { fVar8 = DAT_001e2004 / fVar8; fVar2 = fStack0000000000000038 * fVar8; fVar3 = fStack000000000000003c * fVar8; fVar4 = fStack0000000000000040 * fVar8; fVar5 = fVar8 * (fStack0000000000000044 + fStack0000000000000034); } param_1[4] = fVar2; param_1[5] = fVar3; param_1[6] = fVar4; param_1[7] = fVar5; return; }
29,566
Shader::init()
untodesu[P]riteg/riteg/shader.cc
void Shader::init(void) { s_vertex_shader = compile_shader(GL_VERTEX_SHADER, { GLSL_VERSION_SHADER_BIT, VERT_ENTRYPOINT_SHADER_BIT }); if(!s_vertex_shader) { riteg_fatal << "Vertex shader compilation failed" << std::endl; std::terminate(); } glGenVertexArrays(1, &s_vertex_array_object); }
O1
cpp
Shader::init(): pushq %r14 pushq %rbx subq $0x78, %rsp leaq 0x4aad8(%rip), %rax # 0x62c48 leaq 0x50(%rsp), %rsi movq %rax, (%rsi) leaq 0x4aed3(%rip), %rax # 0x63052 movq %rax, 0x8(%rsi) leaq 0x8(%rsp), %rdi leaq 0x30(%rsp), %rcx movl $0x2, %edx callq 0x18382 leaq 0x8(%rsp), %rsi movl $0x8b31, %edi # imm = 0x8B31 callq 0x17915 movl %eax, 0x8c480(%rip) # 0xa462c movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x181c3 movq 0x18(%rsp), %rsi subq %rdi, %rsi callq 0xc8d0 cmpl $0x0, 0x8c462(%rip) # 0xa462c je 0x181e9 leaq 0xad795(%rip), %rax # 0xc5968 leaq 0x8c456(%rip), %rsi # 0xa4630 movl $0x1, %edi callq *(%rax) addq $0x78, %rsp popq %rbx popq %r14 retq movq 0x8ae00(%rip), %rdi # 0xa2ff0 leaq 0x49f36(%rip), %rsi # 0x6212d movl $0x1, %edx callq 0xc9e0 leaq 0x4a9d0(%rip), %rsi # 0x62bd8 leaq 0x50(%rsp), %rbx movq %rbx, %rdi movl $0x2, %edx callq 0x183c8 leaq 0x8(%rsp), %rdi movq %rbx, %rsi callq 0xe21c movq 0x8(%rsp), %rsi leaq 0x40(%rsp), %r14 movq %r14, -0x10(%r14) movq 0x10(%rsp), %rdx addq %rsi, %rdx leaq 0x30(%rsp), %rdi callq 0xe3e0 movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rdx movq 0x8ad98(%rip), %rdi # 0xa2ff0 callq 0xc9e0 movq %rax, %rbx leaq 0x711a4(%rip), %rsi # 0x8940b movl $0x1, %edx movq %rax, %rdi callq 0xc9e0 movq %rbx, %rdi movl $0xc9, %esi callq 0xceb0 movq %rax, %rbx leaq 0x49ea4(%rip), %rsi # 0x6212f movl $0x3, %edx movq %rax, %rdi callq 0xc9e0 leaq 0x49e94(%rip), %rsi # 0x62133 movl $0x15, %edx movq %rbx, %rdi callq 0xc9e0 leaq 0x4ae93(%rip), %rsi # 0x63146 movl $0x20, %edx movq %rbx, %rdi callq 0xc9e0 movq %rbx, %rdi callq 0xc3f0 leaq 0x30(%rsp), %rdi callq 0xc3b0 leaq 0x8(%rsp), %rdi callq 0xe29a leaq 0x50(%rsp), %rdi callq 0xe29a callq 0xc1e0 movq %rax, %rbx movq 0x30(%rsp), %rdi cmpq %r14, %rdi je 0x1830a movq 0x40(%rsp), %rsi incq %rsi callq 0xc8d0 jmp 0x1830a movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0xe29a jmp 0x18319 movq %rax, %rbx leaq 0x50(%rsp), %rdi callq 0xe29a jmp 0x18344 movq %rax, %rbx movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x18344 movq 0x18(%rsp), %rsi subq %rdi, %rsi callq 0xc8d0 jmp 0x18344 movq %rax, %rbx movq %rbx, %rdi callq 0xcf00
_ZN6Shader4initEv: push r14 push rbx sub rsp, 78h lea rax, aVersion330Core; "\n #version 330 core\n" lea rsi, [rsp+88h+var_38] mov [rsi], rax lea rax, aVoidMainVoidVe; "\n void main(void)\n {\n v"... mov [rsi+8], rax lea rdi, [rsp+88h+var_80] lea rcx, [rsp+88h+var_58] mov edx, 2 call _ZNSt6vectorIPKcSaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<char const*>::vector(std::initializer_list<char const*>,std::allocator<char const*> const&) lea rsi, [rsp+88h+var_80] mov edi, 8B31h call _ZL14compile_shaderjRKSt6vectorIPKcSaIS1_EE; compile_shader(uint,std::vector<char const*> const&) mov cs:_ZL15s_vertex_shader, eax; s_vertex_shader mov rdi, [rsp+88h+var_80]; void * test rdi, rdi jz short loc_181C3 mov rsi, [rsp+88h+var_70] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_181C3: cmp cs:_ZL15s_vertex_shader, 0; s_vertex_shader jz short loc_181E9 lea rax, glad_glGenVertexArrays lea rsi, _ZL21s_vertex_array_object; s_vertex_array_object mov edi, 1 call qword ptr [rax] add rsp, 78h pop rbx pop r14 retn loc_181E9: mov rdi, cs:_ZSt4cerr_ptr lea rsi, asc_6212D; "[" mov edx, 1 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, aWorkspaceLlm4b_10; "/workspace/llm4binary/github/2025_star3"... lea rbx, [rsp+88h+var_38] mov rdi, rbx; this mov edx, 2 call _ZNSt10filesystem7__cxx114pathC2IA73_cS1_EERKT_NS1_6formatE; std::filesystem::__cxx11::path::path<char [73],std::filesystem::__cxx11::path>(char [73] const&,std::filesystem::__cxx11::path::format) lea rdi, [rsp+88h+var_80]; this mov rsi, rbx call _ZNKSt10filesystem7__cxx114path8filenameEv; std::filesystem::__cxx11::path::filename(void) mov rsi, [rsp+88h+var_80] lea r14, [rsp+88h+var_48] mov [r14-10h], r14 mov rdx, [rsp+88h+var_78] add rdx, rsi lea rdi, [rsp+88h+var_58] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rsi, [rsp+88h+var_58] mov rdx, [rsp+88h+var_50] mov rdi, cs:_ZSt4cerr_ptr call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rbx, rax lea rsi, asc_8940A+1; ":" mov edx, 1 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, rbx mov esi, 0C9h call __ZNSolsEi; std::ostream::operator<<(int) mov rbx, rax lea rsi, asc_6212F; "]: " mov edx, 3 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, a13191mfatal0m; "\x1B[1;31;91mfatal:\x1B[0m " mov edx, 15h mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, aVertexShaderCo; "Vertex shader compilation failed" mov edx, 20h ; ' ' mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, rbx call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &) lea rdi, [rsp+88h+var_58] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+88h+var_80]; this call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path() lea rdi, [rsp+88h+var_38]; this call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path() call __ZSt9terminatev; std::terminate(void) mov rbx, rax mov rdi, [rsp+88h+var_58]; void * cmp rdi, r14 jz short loc_1830A mov rsi, [rsp+88h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_1830A mov rbx, rax loc_1830A: lea rdi, [rsp+88h+var_80]; this call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path() jmp short loc_18319 mov rbx, rax loc_18319: lea rdi, [rsp+88h+var_38]; this call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path() jmp short loc_18344 mov rbx, rax mov rdi, [rsp+88h+var_80]; void * test rdi, rdi jz short loc_18344 mov rsi, [rsp+88h+var_70] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_18344 mov rbx, rax loc_18344: mov rdi, rbx call __Unwind_Resume
long long Shader::init(Shader *this) { long long v2; // rbx long long v3; // rbx void *v4[5]; // [rsp+8h] [rbp-80h] BYREF void *v5[2]; // [rsp+30h] [rbp-58h] BYREF long long v6; // [rsp+40h] [rbp-48h] BYREF _QWORD v7[7]; // [rsp+50h] [rbp-38h] BYREF v7[0] = "\n #version 330 core\n"; v7[1] = "\n" " void main(void)\n" " {\n" " vec2 coords[4] = vec2[4](vec2(-1.0, -1.0), vec2(1.0, -1.0), vec2(-1.0, 1.0), vec2(1.0, 1.0));\n" " gl_Position.xy = coords[gl_VertexID % 4];\n" " gl_Position.z = 0.0;\n" " gl_Position.w = 1.0;\n" " }\n"; std::vector<char const*>::vector(v4, v7, 2LL, v5); s_vertex_shader = compile_shader(35633, v4); if ( v4[0] ) operator delete(v4[0], (char *)v4[2] - (char *)v4[0]); if ( !s_vertex_shader ) { std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, "[", 1LL); std::filesystem::__cxx11::path::path<char [73],std::filesystem::__cxx11::path>((std::filesystem::__cxx11::path *)v7); std::filesystem::__cxx11::path::filename((std::filesystem::__cxx11::path *)v4, v7); v5[0] = &v6; std::string::_M_construct<char const*>(v5, (_BYTE *)v4[0], (long long)v4[0] + (unsigned long long)v4[1]); v2 = std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, v5[0], v5[1]); std::__ostream_insert<char,std::char_traits<char>>(v2, ":", 1LL); v3 = std::ostream::operator<<(v2, 201LL); std::__ostream_insert<char,std::char_traits<char>>(v3, "]: ", 3LL); std::__ostream_insert<char,std::char_traits<char>>(v3, "\x1B[1;31;91mfatal:\x1B[0m ", 21LL); std::__ostream_insert<char,std::char_traits<char>>(v3, "Vertex shader compilation failed", 32LL); std::endl<char,std::char_traits<char>>(v3); std::string::~string(v5); std::filesystem::__cxx11::path::~path((std::filesystem::__cxx11::path *)v4); std::filesystem::__cxx11::path::~path((std::filesystem::__cxx11::path *)v7); std::terminate(); } return glad_glGenVertexArrays(1LL, &s_vertex_array_object); }
init: PUSH R14 PUSH RBX SUB RSP,0x78 LEA RAX,[0x162c48] LEA RSI,[RSP + 0x50] MOV qword ptr [RSI],RAX LEA RAX,[0x163052] MOV qword ptr [RSI + 0x8],RAX LAB_00118183: LEA RDI,[RSP + 0x8] LEA RCX,[RSP + 0x30] MOV EDX,0x2 CALL 0x00118382 LAB_00118197: LEA RSI,[RSP + 0x8] MOV EDI,0x8b31 CALL 0x00117915 LAB_001181a6: MOV dword ptr [0x001a462c],EAX MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x001181c3 MOV RSI,qword ptr [RSP + 0x18] SUB RSI,RDI CALL 0x0010c8d0 LAB_001181c3: CMP dword ptr [0x001a462c],0x0 JZ 0x001181e9 LEA RAX,[0x1c5968] LEA RSI,[0x1a4630] MOV EDI,0x1 CALL qword ptr [RAX] ADD RSP,0x78 POP RBX POP R14 RET LAB_001181e9: MOV RDI,qword ptr [0x001a2ff0] LEA RSI,[0x16212d] MOV EDX,0x1 CALL 0x0010c9e0 LEA RSI,[0x162bd8] LEA RBX,[RSP + 0x50] MOV RDI,RBX MOV EDX,0x2 CALL 0x001183c8 LAB_0011821a: LEA RDI,[RSP + 0x8] MOV RSI,RBX CALL 0x0010e21c MOV RSI,qword ptr [RSP + 0x8] LEA R14,[RSP + 0x40] MOV qword ptr [R14 + -0x10],R14 MOV RDX,qword ptr [RSP + 0x10] ADD RDX,RSI LAB_0011823d: LEA RDI,[RSP + 0x30] CALL 0x0010e3e0 MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x38] LAB_00118251: MOV RDI,qword ptr [0x001a2ff0] CALL 0x0010c9e0 MOV RBX,RAX LEA RSI,[0x18940b] MOV EDX,0x1 MOV RDI,RAX CALL 0x0010c9e0 MOV RDI,RBX MOV ESI,0xc9 CALL 0x0010ceb0 MOV RBX,RAX LEA RSI,[0x16212f] MOV EDX,0x3 MOV RDI,RAX CALL 0x0010c9e0 LEA RSI,[0x162133] MOV EDX,0x15 MOV RDI,RBX CALL 0x0010c9e0 LEA RSI,[0x163146] MOV EDX,0x20 MOV RDI,RBX CALL 0x0010c9e0 MOV RDI,RBX CALL 0x0010c3f0 LAB_001182c8: LEA RDI,[RSP + 0x30] CALL 0x0010c3b0 LEA RDI,[RSP + 0x8] CALL 0x0010e29a LEA RDI,[RSP + 0x50] CALL 0x0010e29a CALL 0x0010c1e0
/* Shader::init() */ void Shader::init(void) { ostream *poVar1; void *local_80; long local_78; long local_70; char *local_58; long local_50; char local_48 [16]; char *local_38; char *local_30; local_38 = "\n #version 330 core\n"; local_30 = "\n void main(void)\n {\n vec2 coords[4] = vec2[4](vec2(-1.0, -1.0), vec2(1.0, -1.0), vec2(-1.0, 1.0), vec2(1.0, 1.0));\n gl_Position.xy = coords[gl_VertexID % 4];\n gl_Position.z = 0.0;\n gl_Position.w = 1.0;\n }\n" ; /* try { // try from 00118183 to 00118196 has its CatchHandler @ 00118341 */ std::vector<char_const*,std::allocator<char_const*>>::vector ((vector<char_const*,std::allocator<char_const*>> *)&local_80,&local_38,2,&local_58); /* try { // try from 00118197 to 001181a5 has its CatchHandler @ 00118325 */ s_vertex_shader = compile_shader(0x8b31,(vector *)&local_80); if (local_80 != (void *)0x0) { operator_delete(local_80,local_70 - (long)local_80); } if (s_vertex_shader != 0) { (*glad_glGenVertexArrays)(1,&s_vertex_array_object); return; } std::__ostream_insert<char,std::char_traits<char>>((ostream *)PTR_cerr_001a2ff0,"[",1); std::filesystem::__cxx11::path::path<char[73],std::filesystem::__cxx11::path> ((path *)&local_38, "/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/riteg/shader.cc",2); /* try { // try from 0011821a to 00118226 has its CatchHandler @ 00118316 */ std::filesystem::__cxx11::path::filename(); local_58 = local_48; /* try { // try from 0011823d to 00118246 has its CatchHandler @ 00118307 */ std::__cxx11::string::_M_construct<char_const*>(&local_58,local_80,local_78 + (long)local_80); /* try { // try from 00118251 to 001182c7 has its CatchHandler @ 001182eb */ poVar1 = std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cerr_001a2ff0,local_58,local_50); std::__ostream_insert<char,std::char_traits<char>>(poVar1,":",1); poVar1 = (ostream *)std::ostream::operator<<(poVar1,0xc9); std::__ostream_insert<char,std::char_traits<char>>(poVar1,"]: ",3); std::__ostream_insert<char,std::char_traits<char>>(poVar1,"\x1b[1;31;91mfatal:\x1b[0m ",0x15); std::__ostream_insert<char,std::char_traits<char>>(poVar1,"Vertex shader compilation failed",0x20) ; std::endl<char,std::char_traits<char>>(poVar1); std::__cxx11::string::~string((string *)&local_58); std::filesystem::__cxx11::path::~path((path *)&local_80); std::filesystem::__cxx11::path::~path((path *)&local_38); /* WARNING: Subroutine does not return */ std::terminate(); }
29,567
my_convert
eloqsql/strings/ctype.c
uint32 my_convert(char *to, uint32 to_length, CHARSET_INFO *to_cs, const char *from, uint32 from_length, CHARSET_INFO *from_cs, uint *errors) { uint32 length, length2; /* If any of the character sets is not ASCII compatible, immediately switch to slow mb_wc->wc_mb method. */ if ((to_cs->state | from_cs->state) & MY_CS_NONASCII) return my_convert_using_func(to, to_length, to_cs, to_cs->cset->wc_mb, from, from_length, from_cs, from_cs->cset->mb_wc, errors); length= length2= MY_MIN(to_length, from_length); #if defined(__i386__) || defined(__x86_64__) /* Special loop for i386, it allows to refer to a non-aligned memory block as UINT32, which makes it possible to copy four bytes at once. This gives about 10% performance improvement comparing to byte-by-byte loop. */ for ( ; length >= 4; length-= 4, from+= 4, to+= 4) { if ((*(uint32*)from) & 0x80808080) break; *((uint32*) to)= *((const uint32*) from); } #endif /* __i386__ */ for (; ; *to++= *from++, length--) { if (!length) { *errors= 0; return length2; } if (*((unsigned char*) from) > 0x7F) /* A non-ASCII character */ { uint32 copied_length= length2 - length; to_length-= copied_length; from_length-= copied_length; return copied_length + my_convert_using_func(to, to_length, to_cs, to_cs->cset->wc_mb, from, from_length, from_cs, from_cs->cset->mb_wc, errors); } } DBUG_ASSERT(FALSE); // Should never get to here return 0; // Make compiler happy }
O3
c
my_convert: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %r9, %rax movl %r8d, %r9d movq %rcx, %r8 movq 0x10(%rbp), %r10 movl 0xc(%rax), %ecx orl 0xc(%rdx), %ecx btl $0xd, %ecx jb 0xd1d54 cmpl %r9d, %esi movl %r9d, %ebx cmovbl %esi, %ebx movl %ebx, %ecx cmpl $0x4, %ebx jb 0xd1d2d movl (%r8), %r11d testl $0x80808080, %r11d # imm = 0x80808080 jne 0xd1d31 movl %r11d, (%rdi) addl $-0x4, %ecx addq $0x4, %r8 addq $0x4, %rdi cmpl $0x3, %ecx ja 0xd1d0e testl %ecx, %ecx je 0xd1d4b movl %ecx, %r14d xorl %r15d, %r15d movb (%r8,%r15), %cl testb %cl, %cl js 0xd1d81 movb %cl, (%rdi,%r15) incq %r15 cmpl %r15d, %r14d jne 0xd1d37 movl $0x0, (%r10) jmp 0xd1dc6 movl %esi, %esi movq 0xb8(%rdx), %rcx movq 0x30(%rcx), %rcx movl %r9d, %r9d movq 0xb8(%rax), %r11 subq $0x8, %rsp pushq %r10 pushq 0x28(%r11) pushq %rax callq 0xd1be3 addq $0x28, %rsp jmp 0xd1dcc addl %r14d, %esi subl %ebx, %esi subl %r15d, %esi addl %r14d, %r9d subl %ebx, %r9d subl %r15d, %r9d movq 0xb8(%rdx), %rcx movq 0x30(%rcx), %rcx movq 0xb8(%rax), %r11 addq %r15, %rdi addq %r15, %r8 subq $0x8, %rsp pushq %r10 pushq 0x28(%r11) pushq %rax callq 0xd1be3 addq $0x20, %rsp subl %r14d, %ebx addl %r15d, %ebx addl %eax, %ebx movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
my_convert: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rax, r9 mov r9d, r8d mov r8, rcx mov r10, [rbp+arg_0] mov ecx, [rax+0Ch] or ecx, [rdx+0Ch] bt ecx, 0Dh jb short loc_D1D54 cmp esi, r9d mov ebx, r9d cmovb ebx, esi mov ecx, ebx cmp ebx, 4 jb short loc_D1D2D loc_D1D0E: mov r11d, [r8] test r11d, 80808080h jnz short loc_D1D31 mov [rdi], r11d add ecx, 0FFFFFFFCh add r8, 4 add rdi, 4 cmp ecx, 3 ja short loc_D1D0E loc_D1D2D: test ecx, ecx jz short loc_D1D4B loc_D1D31: mov r14d, ecx xor r15d, r15d loc_D1D37: mov cl, [r8+r15] test cl, cl js short loc_D1D81 mov [rdi+r15], cl inc r15 cmp r14d, r15d jnz short loc_D1D37 loc_D1D4B: mov dword ptr [r10], 0 jmp short loc_D1DC6 loc_D1D54: mov esi, esi mov rcx, [rdx+0B8h] mov rcx, [rcx+30h] mov r9d, r9d mov r11, [rax+0B8h] sub rsp, 8 push r10 push qword ptr [r11+28h] push rax call my_convert_using_func add rsp, 28h jmp short loc_D1DCC loc_D1D81: add esi, r14d sub esi, ebx sub esi, r15d add r9d, r14d sub r9d, ebx sub r9d, r15d mov rcx, [rdx+0B8h] mov rcx, [rcx+30h] mov r11, [rax+0B8h] add rdi, r15 add r8, r15 sub rsp, 8 push r10 push qword ptr [r11+28h] push rax call my_convert_using_func add rsp, 20h sub ebx, r14d add ebx, r15d add ebx, eax loc_D1DC6: mov eax, ebx add rsp, 8 loc_D1DCC: pop rbx pop r14 pop r15 pop rbp retn
long long my_convert( _DWORD *a1, unsigned int a2, long long a3, long long a4, unsigned int a5, long long a6, _DWORD *a7) { _DWORD *v9; // r8 unsigned int v10; // ebx unsigned int v11; // ecx unsigned int v12; // r14d long long v13; // r15 char v14; // cl v9 = (_DWORD *)a4; if ( ((*(_DWORD *)(a3 + 12) | *(_DWORD *)(a6 + 12)) & 0x2000) != 0 ) return my_convert_using_func( (long long)a1, a2, a3, *(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a3 + 184) + 48LL), a4, a5, a6, *(long long ( **)(long long, long long *, long long, unsigned long long))(*(_QWORD *)(a6 + 184) + 40LL), a7); v10 = a5; if ( a2 < a5 ) v10 = a2; v11 = v10; if ( v10 >= 4 ) { while ( (*v9 & 0x80808080) == 0 ) { *a1 = *v9; v11 -= 4; ++v9; ++a1; if ( v11 <= 3 ) goto LABEL_7; } goto LABEL_8; } LABEL_7: if ( v11 ) { LABEL_8: v12 = v11; v13 = 0LL; do { v14 = *((_BYTE *)v9 + v13); if ( v14 < 0 ) return (unsigned int)my_convert_using_func( (long long)a1 + v13, v12 + a2 - v10 - (unsigned int)v13, a3, *(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a3 + 184) + 48LL), (long long)v9 + v13, v12 + a5 - v10 - (unsigned int)v13, a6, *(long long ( **)(long long, long long *, long long, unsigned long long))(*(_QWORD *)(a6 + 184) + 40LL), a7) + (_DWORD)v13 + v10 - v12; *((_BYTE *)a1 + v13++) = v14; } while ( v12 != (_DWORD)v13 ); } *a7 = 0; return v10; }
my_convert: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RAX,R9 MOV R9D,R8D MOV R8,RCX MOV R10,qword ptr [RBP + 0x10] MOV ECX,dword ptr [RAX + 0xc] OR ECX,dword ptr [RDX + 0xc] BT ECX,0xd JC 0x001d1d54 CMP ESI,R9D MOV EBX,R9D CMOVC EBX,ESI MOV ECX,EBX CMP EBX,0x4 JC 0x001d1d2d LAB_001d1d0e: MOV R11D,dword ptr [R8] TEST R11D,0x80808080 JNZ 0x001d1d31 MOV dword ptr [RDI],R11D ADD ECX,-0x4 ADD R8,0x4 ADD RDI,0x4 CMP ECX,0x3 JA 0x001d1d0e LAB_001d1d2d: TEST ECX,ECX JZ 0x001d1d4b LAB_001d1d31: MOV R14D,ECX XOR R15D,R15D LAB_001d1d37: MOV CL,byte ptr [R8 + R15*0x1] TEST CL,CL JS 0x001d1d81 MOV byte ptr [RDI + R15*0x1],CL INC R15 CMP R14D,R15D JNZ 0x001d1d37 LAB_001d1d4b: MOV dword ptr [R10],0x0 JMP 0x001d1dc6 LAB_001d1d54: MOV ESI,ESI MOV RCX,qword ptr [RDX + 0xb8] MOV RCX,qword ptr [RCX + 0x30] MOV R9D,R9D MOV R11,qword ptr [RAX + 0xb8] SUB RSP,0x8 PUSH R10 PUSH qword ptr [R11 + 0x28] PUSH RAX CALL 0x001d1be3 ADD RSP,0x28 JMP 0x001d1dcc LAB_001d1d81: ADD ESI,R14D SUB ESI,EBX SUB ESI,R15D ADD R9D,R14D SUB R9D,EBX SUB R9D,R15D MOV RCX,qword ptr [RDX + 0xb8] MOV RCX,qword ptr [RCX + 0x30] MOV R11,qword ptr [RAX + 0xb8] ADD RDI,R15 ADD R8,R15 SUB RSP,0x8 PUSH R10 PUSH qword ptr [R11 + 0x28] PUSH RAX CALL 0x001d1be3 ADD RSP,0x20 SUB EBX,R14D ADD EBX,R15D ADD EBX,EAX LAB_001d1dc6: MOV EAX,EBX ADD RSP,0x8 LAB_001d1dcc: POP RBX POP R14 POP R15 POP RBP RET
ulong my_convert(uint *param_1,uint param_2,long param_3,uint *param_4,uint param_5,long param_6, int4 *param_7) { int iVar1; ulong uVar2; uint uVar3; uint uVar5; int iVar6; long lVar7; ulong uVar4; uVar2 = (ulong)param_5; if (((*(uint *)(param_6 + 0xc) | *(uint *)(param_3 + 0xc)) >> 0xd & 1) == 0) { if (param_2 < param_5) { uVar2 = (ulong)param_2; } uVar5 = (uint)uVar2; uVar3 = uVar5; uVar4 = uVar2; while (3 < uVar3) { uVar3 = (uint)uVar4; if ((*param_4 & 0x80808080) != 0) goto LAB_001d1d31; *param_1 = *param_4; uVar3 = uVar3 - 4; uVar4 = (ulong)uVar3; param_4 = param_4 + 1; param_1 = param_1 + 1; } if (uVar3 != 0) { LAB_001d1d31: lVar7 = 0; do { if (*(char *)((long)param_4 + lVar7) < '\0') { iVar6 = (int)lVar7; iVar1 = my_convert_using_func ((long)param_1 + lVar7,((param_2 + uVar3) - uVar5) - iVar6,param_3, *(int8 *)(*(long *)(param_3 + 0xb8) + 0x30),(long)param_4 + lVar7 ,((param_5 + uVar3) - uVar5) - iVar6,param_6, *(int8 *)(*(long *)(param_6 + 0xb8) + 0x28),param_7); return (ulong)((uVar5 - uVar3) + iVar6 + iVar1); } *(char *)((long)param_1 + lVar7) = *(char *)((long)param_4 + lVar7); lVar7 = lVar7 + 1; } while (uVar3 != (uint)lVar7); } *param_7 = 0; } else { uVar2 = my_convert_using_func (param_1,param_2,param_3,*(int8 *)(*(long *)(param_3 + 0xb8) + 0x30), param_4,uVar2,param_6,*(int8 *)(*(long *)(param_6 + 0xb8) + 0x28), param_7); } return uVar2; }
29,568
ma_init_alloc_root
eloqsql/libmariadb/libmariadb/ma_alloc.c
void ma_init_alloc_root(MA_MEM_ROOT *mem_root, size_t block_size, size_t pre_alloc_size) { mem_root->free= mem_root->used= mem_root->pre_alloc= 0; mem_root->min_malloc=32; mem_root->block_size= (block_size-MALLOC_OVERHEAD-sizeof(MA_USED_MEM)+8); mem_root->error_handler=0; mem_root->block_num= 4; mem_root->first_block_usage= 0; #if !(defined(HAVE_purify) && defined(EXTRA_DEBUG)) if (pre_alloc_size) { if ((mem_root->free = mem_root->pre_alloc= (MA_USED_MEM*) malloc(pre_alloc_size+ ALIGN_SIZE(sizeof(MA_USED_MEM))))) { mem_root->free->size=pre_alloc_size+ALIGN_SIZE(sizeof(MA_USED_MEM)); mem_root->free->left=pre_alloc_size; mem_root->free->next=0; } } #endif }
O0
c
ma_init_alloc_root: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movq $0x0, 0x10(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x8(%rax) movq -0x8(%rbp), %rax movq $0x0, (%rax) movq -0x8(%rbp), %rax movq $0x20, 0x18(%rax) movq -0x10(%rbp), %rcx subq $0x8, %rcx subq $0x18, %rcx addq $0x8, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x20(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x30(%rax) movq -0x8(%rbp), %rax movl $0x4, 0x28(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x2c(%rax) cmpq $0x0, -0x18(%rbp) je 0x3f1b8 movq -0x18(%rbp), %rdi addq $0x18, %rdi callq 0x145c0 movq -0x8(%rbp), %rcx movq %rax, 0x10(%rcx) movq -0x8(%rbp), %rcx movq %rax, (%rcx) cmpq $0x0, %rax je 0x3f1b6 movq -0x18(%rbp), %rcx addq $0x18, %rcx movq -0x8(%rbp), %rax movq (%rax), %rax movq %rcx, 0x10(%rax) movq -0x18(%rbp), %rcx movq -0x8(%rbp), %rax movq (%rax), %rax movq %rcx, 0x8(%rax) movq -0x8(%rbp), %rax movq (%rax), %rax movq $0x0, (%rax) jmp 0x3f1b8 addq $0x20, %rsp popq %rbp retq nop
ma_init_alloc_root: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov qword ptr [rax+10h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+8], 0 mov rax, [rbp+var_8] mov qword ptr [rax], 0 mov rax, [rbp+var_8] mov qword ptr [rax+18h], 20h ; ' ' mov rcx, [rbp+var_10] sub rcx, 8 sub rcx, 18h add rcx, 8 mov rax, [rbp+var_8] mov [rax+20h], rcx mov rax, [rbp+var_8] mov qword ptr [rax+30h], 0 mov rax, [rbp+var_8] mov dword ptr [rax+28h], 4 mov rax, [rbp+var_8] mov dword ptr [rax+2Ch], 0 cmp [rbp+var_18], 0 jz short loc_3F1B8 mov rdi, [rbp+var_18] add rdi, 18h call _malloc mov rcx, [rbp+var_8] mov [rcx+10h], rax mov rcx, [rbp+var_8] mov [rcx], rax cmp rax, 0 jz short loc_3F1B6 mov rcx, [rbp+var_18] add rcx, 18h mov rax, [rbp+var_8] mov rax, [rax] mov [rax+10h], rcx mov rcx, [rbp+var_18] mov rax, [rbp+var_8] mov rax, [rax] mov [rax+8], rcx mov rax, [rbp+var_8] mov rax, [rax] mov qword ptr [rax], 0 loc_3F1B6: jmp short $+2 loc_3F1B8: add rsp, 20h pop rbp retn
long long ma_init_alloc_root(long long *a1, long long a2, long long a3) { long long result; // rax a1[2] = 0LL; a1[1] = 0LL; *a1 = 0LL; a1[3] = 32LL; a1[4] = a2 - 32 + 8; a1[6] = 0LL; *((_DWORD *)a1 + 10) = 4; result = (long long)a1; *((_DWORD *)a1 + 11) = 0; if ( a3 ) { result = malloc(a3 + 24); a1[2] = result; *a1 = result; if ( result ) { *(_QWORD *)(*a1 + 16) = a3 + 24; *(_QWORD *)(*a1 + 8) = a3; result = *a1; *(_QWORD *)*a1 = 0LL; } } return result; }
ma_init_alloc_root: 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 RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x8],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x18],0x20 MOV RCX,qword ptr [RBP + -0x10] SUB RCX,0x8 SUB RCX,0x18 ADD RCX,0x8 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x20],RCX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x30],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x28],0x4 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x2c],0x0 CMP qword ptr [RBP + -0x18],0x0 JZ 0x0013f1b8 MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x18 CALL 0x001145c0 MOV RCX,qword ptr [RBP + -0x8] MOV qword ptr [RCX + 0x10],RAX MOV RCX,qword ptr [RBP + -0x8] MOV qword ptr [RCX],RAX CMP RAX,0x0 JZ 0x0013f1b6 MOV RCX,qword ptr [RBP + -0x18] ADD RCX,0x18 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX],0x0 LAB_0013f1b6: JMP 0x0013f1b8 LAB_0013f1b8: ADD RSP,0x20 POP RBP RET
void ma_init_alloc_root(long *param_1,long param_2,long param_3) { void *pvVar1; param_1[2] = 0; param_1[1] = 0; *param_1 = 0; param_1[3] = 0x20; param_1[4] = param_2 + -0x18; param_1[6] = 0; *(int4 *)(param_1 + 5) = 4; *(int4 *)((long)param_1 + 0x2c) = 0; if (param_3 != 0) { pvVar1 = malloc(param_3 + 0x18); param_1[2] = (long)pvVar1; *param_1 = (long)pvVar1; if (pvVar1 != (void *)0x0) { *(long *)(*param_1 + 0x10) = param_3 + 0x18; *(long *)(*param_1 + 8) = param_3; *(int8 *)*param_1 = 0; } } return; }
29,569
ma_init_alloc_root
eloqsql/libmariadb/libmariadb/ma_alloc.c
void ma_init_alloc_root(MA_MEM_ROOT *mem_root, size_t block_size, size_t pre_alloc_size) { mem_root->free= mem_root->used= mem_root->pre_alloc= 0; mem_root->min_malloc=32; mem_root->block_size= (block_size-MALLOC_OVERHEAD-sizeof(MA_USED_MEM)+8); mem_root->error_handler=0; mem_root->block_num= 4; mem_root->first_block_usage= 0; #if !(defined(HAVE_purify) && defined(EXTRA_DEBUG)) if (pre_alloc_size) { if ((mem_root->free = mem_root->pre_alloc= (MA_USED_MEM*) malloc(pre_alloc_size+ ALIGN_SIZE(sizeof(MA_USED_MEM))))) { mem_root->free->size=pre_alloc_size+ALIGN_SIZE(sizeof(MA_USED_MEM)); mem_root->free->left=pre_alloc_size; mem_root->free->next=0; } } #endif }
O3
c
ma_init_alloc_root: xorps %xmm0, %xmm0 movups %xmm0, (%rdi) xorl %eax, %eax movq %rax, 0x10(%rdi) movq $0x20, 0x18(%rdi) addq $-0x18, %rsi movq %rsi, 0x20(%rdi) movq %rax, 0x30(%rdi) movq $0x4, 0x28(%rdi) testq %rdx, %rdx je 0x2f422 pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdx, %rbx movq %rdi, %r14 leaq 0x18(%rdx), %r15 movq %r15, %rdi callq 0x14620 movq %rax, 0x10(%r14) movq %rax, (%r14) testq %rax, %rax je 0x2f418 movq %r15, 0x10(%rax) movq %rbx, 0x8(%rax) movq $0x0, (%rax) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
ma_init_alloc_root: xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 xor eax, eax mov [rdi+10h], rax mov qword ptr [rdi+18h], 20h ; ' ' add rsi, 0FFFFFFFFFFFFFFE8h mov [rdi+20h], rsi mov [rdi+30h], rax mov qword ptr [rdi+28h], 4 test rdx, rdx jz short locret_2F422 push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdx mov r14, rdi lea r15, [rdx+18h] mov rdi, r15 call _malloc mov [r14+10h], rax mov [r14], rax test rax, rax jz short loc_2F418 mov [rax+10h], r15 mov [rax+8], rbx mov qword ptr [rax], 0 loc_2F418: add rsp, 8 pop rbx pop r14 pop r15 pop rbp locret_2F422: retn
_QWORD * ma_init_alloc_root(long long a1, long long a2, long long a3) { _QWORD *result; // rax long long v5; // r15 *(_OWORD *)a1 = 0LL; result = 0LL; *(_QWORD *)(a1 + 16) = 0LL; *(_QWORD *)(a1 + 24) = 32LL; *(_QWORD *)(a1 + 32) = a2 - 24; *(_QWORD *)(a1 + 48) = 0LL; *(_QWORD *)(a1 + 40) = 4LL; if ( a3 ) { v5 = a3 + 24; result = (_QWORD *)malloc(a3 + 24); *(_QWORD *)(a1 + 16) = result; *(_QWORD *)a1 = result; if ( result ) { result[2] = v5; result[1] = a3; *result = 0LL; } } return result; }
ma_init_alloc_root: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 XOR EAX,EAX MOV qword ptr [RDI + 0x10],RAX MOV qword ptr [RDI + 0x18],0x20 ADD RSI,-0x18 MOV qword ptr [RDI + 0x20],RSI MOV qword ptr [RDI + 0x30],RAX MOV qword ptr [RDI + 0x28],0x4 TEST RDX,RDX JZ 0x0012f422 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RDI LEA R15,[RDX + 0x18] MOV RDI,R15 CALL 0x00114620 MOV qword ptr [R14 + 0x10],RAX MOV qword ptr [R14],RAX TEST RAX,RAX JZ 0x0012f418 MOV qword ptr [RAX + 0x10],R15 MOV qword ptr [RAX + 0x8],RBX MOV qword ptr [RAX],0x0 LAB_0012f418: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP LAB_0012f422: RET
void ma_init_alloc_root(int8 *param_1,long param_2,long param_3) { int8 *puVar1; *param_1 = 0; param_1[1] = 0; param_1[2] = 0; param_1[3] = 0x20; param_1[4] = param_2 + -0x18; param_1[6] = 0; param_1[5] = 4; if (param_3 != 0) { puVar1 = (int8 *)malloc(param_3 + 0x18U); param_1[2] = puVar1; *param_1 = puVar1; if (puVar1 != (int8 *)0x0) { puVar1[2] = param_3 + 0x18U; puVar1[1] = param_3; *puVar1 = 0; } } return; }
29,570
peek_token
bluesky950520[P]quickjs/quickjs.c
static int peek_token(JSParseState *s, BOOL no_line_terminator) { const uint8_t *p = s->buf_ptr; return simple_next_token(&p, no_line_terminator); }
O2
c
peek_token: pushq %r15 pushq %r14 pushq %rbx movq 0x70(%rdi), %r15 pushq $0xa popq %rcx pushq $0x2f popq %rax movl $0x2401, %edx # imm = 0x2401 movq %r15, %r14 incq %r15 movzbl (%r14), %ebx leal -0xb(%rbx), %edi cmpl $0x2, %edi jb 0x55705 cmpl $0x9, %ebx je 0x55705 cmpl $0xa, %ebx je 0x55774 cmpl $0xd, %ebx je 0x55774 cmpl $0x20, %ebx je 0x55705 cmpl $0x2f, %ebx jne 0x557ae movzbl (%r15), %edi cmpl $0x2f, %edi je 0x5577a cmpl $0x2a, %edi jne 0x557a8 addq $0x2, %r14 movq %r14, %r15 movzbl (%r15), %edi cmpl $0xd, %edi je 0x5576b testl %edi, %edi je 0x55705 testl %esi, %esi je 0x5575c cmpb $0xa, %dil je 0x557a6 cmpb $0x2a, %dil jne 0x5576f cmpb $0x2f, 0x1(%r15) jne 0x5576f jmp 0x5579d testl %esi, %esi jne 0x557a6 incq %r15 jmp 0x55745 testl %esi, %esi je 0x55705 jmp 0x557a6 testl %esi, %esi jne 0x557a6 movb $0x2f, %dil cmpb $0xd, %dil ja 0x55794 movzbl %dil, %edi btl %edi, %edx jb 0x55705 movb 0x1(%r15), %dil incq %r15 jmp 0x55781 addq $0x2, %r15 jmp 0x55705 movl %ecx, %eax popq %rbx popq %r14 popq %r15 retq cmpl $0x3d, %ebx jne 0x557c2 cmpb $0x3e, (%r15) pushq $-0x5c popq %rcx pushq $0x3d popq %rax cmovel %ecx, %eax jmp 0x557a8 movl %ebx, %edi callq 0x553fd testl %eax, %eax je 0x55829 leal -0x61(%rbx), %eax cmpl $0x8, %eax ja 0x55830 leaq 0x31d94(%rip), %rcx # 0x87570 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax cmpb $0x77, (%r15) jne 0x55934 cmpb $0x61, 0x2(%r14) jne 0x55934 cmpb $0x69, 0x3(%r14) jne 0x55934 cmpb $0x74, 0x4(%r14) jne 0x55934 movzbl 0x5(%r14), %edi callq 0x55648 testl %eax, %eax jne 0x55934 pushq $-0x28 jmp 0x55936 movl %ebx, %eax jmp 0x557a8 cmpl $0x6f, %ebx jne 0x55934 cmpb $0x66, (%r15) jne 0x55934 movzbl 0x2(%r14), %edi callq 0x55648 testl %eax, %eax jne 0x55934 pushq $-0x27 jmp 0x55936 cmpb $0x75, (%r15) jne 0x55934 cmpb $0x6e, 0x2(%r14) jne 0x55934 cmpb $0x63, 0x3(%r14) jne 0x55934 cmpb $0x74, 0x4(%r14) jne 0x55934 cmpb $0x69, 0x5(%r14) jne 0x55934 cmpb $0x6f, 0x6(%r14) jne 0x55934 cmpb $0x6e, 0x7(%r14) jne 0x55934 movzbl 0x8(%r14), %edi callq 0x55648 testl %eax, %eax jne 0x55934 pushq $-0x3b jmp 0x55936 movb (%r15), %al cmpb $0x6e, %al jne 0x558d2 movzbl 0x2(%r14), %edi callq 0x55648 testl %eax, %eax je 0x5593c movb (%r15), %al cmpb $0x6d, %al jne 0x55934 cmpb $0x70, 0x2(%r14) jne 0x55934 cmpb $0x6f, 0x3(%r14) jne 0x55934 cmpb $0x72, 0x4(%r14) jne 0x55934 cmpb $0x74, 0x5(%r14) jne 0x55934 movzbl 0x6(%r14), %edi callq 0x55648 testl %eax, %eax jne 0x55934 pushq $-0x33 jmp 0x55936 cmpb $0x78, (%r15) jne 0x55934 cmpb $0x70, 0x2(%r14) jne 0x55934 cmpb $0x6f, 0x3(%r14) jne 0x55934 cmpb $0x72, 0x4(%r14) jne 0x55934 cmpb $0x74, 0x5(%r14) jne 0x55934 movzbl 0x6(%r14), %edi callq 0x55648 testl %eax, %eax je 0x55940 pushq $-0x7d popq %rax jmp 0x557a8 pushq $-0x49 jmp 0x55936 pushq $-0x35 jmp 0x55936
peek_token: push r15 push r14 push rbx mov r15, [rdi+70h] push 0Ah pop rcx push 2Fh ; '/' pop rax mov edx, 2401h loc_55705: mov r14, r15 inc r15 movzx ebx, byte ptr [r14] lea edi, [rbx-0Bh] cmp edi, 2 jb short loc_55705 cmp ebx, 9 jz short loc_55705 cmp ebx, 0Ah jz short loc_55774 cmp ebx, 0Dh jz short loc_55774 cmp ebx, 20h ; ' ' jz short loc_55705 cmp ebx, 2Fh ; '/' jnz short loc_557AE movzx edi, byte ptr [r15] cmp edi, 2Fh ; '/' jz short loc_5577A cmp edi, 2Ah ; '*' jnz short loc_557A8 add r14, 2 mov r15, r14 loc_55745: movzx edi, byte ptr [r15] cmp edi, 0Dh jz short loc_5576B test edi, edi jz short loc_55705 test esi, esi jz short loc_5575C cmp dil, 0Ah jz short loc_557A6 loc_5575C: cmp dil, 2Ah ; '*' jnz short loc_5576F cmp byte ptr [r15+1], 2Fh ; '/' jnz short loc_5576F jmp short loc_5579D loc_5576B: test esi, esi jnz short loc_557A6 loc_5576F: inc r15 jmp short loc_55745 loc_55774: test esi, esi jz short loc_55705 jmp short loc_557A6 loc_5577A: test esi, esi jnz short loc_557A6 mov dil, 2Fh ; '/' loc_55781: cmp dil, 0Dh ja short loc_55794 movzx edi, dil bt edx, edi jb loc_55705 loc_55794: mov dil, [r15+1] inc r15 jmp short loc_55781 loc_5579D: add r15, 2 jmp loc_55705 loc_557A6: mov eax, ecx loc_557A8: pop rbx pop r14 pop r15 retn loc_557AE: cmp ebx, 3Dh ; '=' jnz short loc_557C2 cmp byte ptr [r15], 3Eh ; '>' push 0FFFFFFFFFFFFFFA4h pop rcx push 3Dh ; '=' pop rax cmovz eax, ecx jmp short loc_557A8 loc_557C2: mov edi, ebx call lre_js_is_ident_first test eax, eax jz short loc_55829 lea eax, [rbx-61h]; switch 9 cases cmp eax, 8 ja short def_557E3; jumptable 00000000000557E3 default case lea rcx, jpt_557E3 movsxd rax, ds:(jpt_557E3 - 87570h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_557E5: cmp byte ptr [r15], 77h ; 'w'; jumptable 00000000000557E3 case 97 jnz loc_55934; jumptable 00000000000557E3 cases 98-100,103,104 cmp byte ptr [r14+2], 61h ; 'a' jnz loc_55934; jumptable 00000000000557E3 cases 98-100,103,104 cmp byte ptr [r14+3], 69h ; 'i' jnz loc_55934; jumptable 00000000000557E3 cases 98-100,103,104 cmp byte ptr [r14+4], 74h ; 't' jnz loc_55934; jumptable 00000000000557E3 cases 98-100,103,104 movzx edi, byte ptr [r14+5] call lre_js_is_ident_next test eax, eax jnz loc_55934; jumptable 00000000000557E3 cases 98-100,103,104 push 0FFFFFFFFFFFFFFD8h jmp loc_55936 loc_55829: mov eax, ebx jmp loc_557A8 def_557E3: cmp ebx, 6Fh ; 'o'; jumptable 00000000000557E3 default case jnz loc_55934; jumptable 00000000000557E3 cases 98-100,103,104 cmp byte ptr [r15], 66h ; 'f' jnz loc_55934; jumptable 00000000000557E3 cases 98-100,103,104 movzx edi, byte ptr [r14+2] call lre_js_is_ident_next test eax, eax jnz loc_55934; jumptable 00000000000557E3 cases 98-100,103,104 push 0FFFFFFFFFFFFFFD9h jmp loc_55936 loc_5585C: cmp byte ptr [r15], 75h ; 'u'; jumptable 00000000000557E3 case 102 jnz loc_55934; jumptable 00000000000557E3 cases 98-100,103,104 cmp byte ptr [r14+2], 6Eh ; 'n' jnz loc_55934; jumptable 00000000000557E3 cases 98-100,103,104 cmp byte ptr [r14+3], 63h ; 'c' jnz loc_55934; jumptable 00000000000557E3 cases 98-100,103,104 cmp byte ptr [r14+4], 74h ; 't' jnz loc_55934; jumptable 00000000000557E3 cases 98-100,103,104 cmp byte ptr [r14+5], 69h ; 'i' jnz loc_55934; jumptable 00000000000557E3 cases 98-100,103,104 cmp byte ptr [r14+6], 6Fh ; 'o' jnz loc_55934; jumptable 00000000000557E3 cases 98-100,103,104 cmp byte ptr [r14+7], 6Eh ; 'n' jnz loc_55934; jumptable 00000000000557E3 cases 98-100,103,104 movzx edi, byte ptr [r14+8] call lre_js_is_ident_next test eax, eax jnz short loc_55934; jumptable 00000000000557E3 cases 98-100,103,104 push 0FFFFFFFFFFFFFFC5h jmp short loc_55936 loc_558BA: mov al, [r15]; jumptable 00000000000557E3 case 105 cmp al, 6Eh ; 'n' jnz short loc_558D2 movzx edi, byte ptr [r14+2] call lre_js_is_ident_next test eax, eax jz short loc_5593C mov al, [r15] loc_558D2: cmp al, 6Dh ; 'm' jnz short loc_55934; jumptable 00000000000557E3 cases 98-100,103,104 cmp byte ptr [r14+2], 70h ; 'p' jnz short loc_55934; jumptable 00000000000557E3 cases 98-100,103,104 cmp byte ptr [r14+3], 6Fh ; 'o' jnz short loc_55934; jumptable 00000000000557E3 cases 98-100,103,104 cmp byte ptr [r14+4], 72h ; 'r' jnz short loc_55934; jumptable 00000000000557E3 cases 98-100,103,104 cmp byte ptr [r14+5], 74h ; 't' jnz short loc_55934; jumptable 00000000000557E3 cases 98-100,103,104 movzx edi, byte ptr [r14+6] call lre_js_is_ident_next test eax, eax jnz short loc_55934; jumptable 00000000000557E3 cases 98-100,103,104 push 0FFFFFFFFFFFFFFCDh jmp short loc_55936 loc_55904: cmp byte ptr [r15], 78h ; 'x'; jumptable 00000000000557E3 case 101 jnz short loc_55934; jumptable 00000000000557E3 cases 98-100,103,104 cmp byte ptr [r14+2], 70h ; 'p' jnz short loc_55934; jumptable 00000000000557E3 cases 98-100,103,104 cmp byte ptr [r14+3], 6Fh ; 'o' jnz short loc_55934; jumptable 00000000000557E3 cases 98-100,103,104 cmp byte ptr [r14+4], 72h ; 'r' jnz short loc_55934; jumptable 00000000000557E3 cases 98-100,103,104 cmp byte ptr [r14+5], 74h ; 't' jnz short loc_55934; jumptable 00000000000557E3 cases 98-100,103,104 movzx edi, byte ptr [r14+6] call lre_js_is_ident_next test eax, eax jz short loc_55940 loc_55934: push 0FFFFFFFFFFFFFF83h; jumptable 00000000000557E3 cases 98-100,103,104 loc_55936: pop rax jmp loc_557A8 loc_5593C: push 0FFFFFFFFFFFFFFB7h jmp short loc_55936 loc_55940: push 0FFFFFFFFFFFFFFCBh jmp short loc_55936
long long peek_token(long long a1, int a2) { unsigned __int8 *j; // r15 long long result; // rax int v4; // edx unsigned __int8 *v5; // r14 unsigned int v6; // ebx int v7; // edi int v8; // edi unsigned __int8 i; // di unsigned __int8 v10; // al long long v11; // [rsp-8h] [rbp-20h] j = *(unsigned __int8 **)(a1 + 112); result = 47LL; v4 = 9217; while ( 1 ) { do { while ( 1 ) { do { do { LABEL_2: v5 = j++; v6 = *v5; } while ( v6 - 11 < 2 ); } while ( v6 == 9 ); if ( v6 != 10 && v6 != 13 ) break; if ( a2 ) return 10LL; } } while ( v6 == 32 ); if ( v6 != 47 ) break; v7 = *j; if ( v7 == 47 ) { if ( !a2 ) { for ( i = 47; i > 0xDu || !_bittest(&v4, i); i = *++j ) ; goto LABEL_2; } return 10LL; } if ( v7 != 42 ) return result; for ( j = v5 + 2; ; ++j ) { v8 = *j; if ( v8 == 13 ) { if ( a2 ) return 10LL; continue; } if ( !*j ) goto LABEL_2; if ( a2 && (_BYTE)v8 == 10 ) return 10LL; if ( (_BYTE)v8 == 42 && j[1] == 47 ) break; } j += 2; } if ( v6 == 61 ) { result = 61LL; if ( *j == 62 ) return 4294967204LL; } else if ( (unsigned int)lre_js_is_ident_first(*v5) ) { switch ( v6 ) { case 'a': if ( *j != 119 || v5[2] != 97 || v5[3] != 105 || v5[4] != 116 || (unsigned int)lre_js_is_ident_next(v5[5]) ) goto LABEL_71; return -40LL; case 'b': case 'c': case 'd': case 'g': case 'h': goto LABEL_71; case 'e': if ( *j != 120 || v5[2] != 112 || v5[3] != 111 || v5[4] != 114 || v5[5] != 116 || (unsigned int)lre_js_is_ident_next(v5[6]) ) { goto LABEL_71; } v11 = -53LL; break; case 'f': if ( *j != 117 || v5[2] != 110 || v5[3] != 99 || v5[4] != 116 || v5[5] != 105 || v5[6] != 111 || v5[7] != 110 || (unsigned int)lre_js_is_ident_next(v5[8]) ) { goto LABEL_71; } v11 = -59LL; break; case 'i': v10 = *j; if ( *j != 110 ) goto LABEL_58; if ( (unsigned int)lre_js_is_ident_next(v5[2]) ) { v10 = *j; LABEL_58: if ( v10 == 109 && v5[2] == 112 && v5[3] == 111 && v5[4] == 114 && v5[5] == 116 && !(unsigned int)lre_js_is_ident_next(v5[6]) ) { v11 = -51LL; } else { LABEL_71: v11 = -125LL; } } else { v11 = -73LL; } break; default: if ( v6 != 111 || *j != 102 || (unsigned int)lre_js_is_ident_next(v5[2]) ) goto LABEL_71; v11 = -39LL; break; } return v11; } else { return v6; } return result; }
peek_token: PUSH R15 PUSH R14 PUSH RBX MOV R15,qword ptr [RDI + 0x70] PUSH 0xa POP RCX PUSH 0x2f POP RAX MOV EDX,0x2401 LAB_00155705: MOV R14,R15 INC R15 MOVZX EBX,byte ptr [R14] LEA EDI,[RBX + -0xb] CMP EDI,0x2 JC 0x00155705 CMP EBX,0x9 JZ 0x00155705 CMP EBX,0xa JZ 0x00155774 CMP EBX,0xd JZ 0x00155774 CMP EBX,0x20 JZ 0x00155705 CMP EBX,0x2f JNZ 0x001557ae MOVZX EDI,byte ptr [R15] CMP EDI,0x2f JZ 0x0015577a CMP EDI,0x2a JNZ 0x001557a8 ADD R14,0x2 MOV R15,R14 LAB_00155745: MOVZX EDI,byte ptr [R15] CMP EDI,0xd JZ 0x0015576b TEST EDI,EDI JZ 0x00155705 TEST ESI,ESI JZ 0x0015575c CMP DIL,0xa JZ 0x001557a6 LAB_0015575c: CMP DIL,0x2a JNZ 0x0015576f CMP byte ptr [R15 + 0x1],0x2f JNZ 0x0015576f JMP 0x0015579d LAB_0015576b: TEST ESI,ESI JNZ 0x001557a6 LAB_0015576f: INC R15 JMP 0x00155745 LAB_00155774: TEST ESI,ESI JZ 0x00155705 JMP 0x001557a6 LAB_0015577a: TEST ESI,ESI JNZ 0x001557a6 MOV DIL,0x2f LAB_00155781: CMP DIL,0xd JA 0x00155794 MOVZX EDI,DIL BT EDX,EDI JC 0x00155705 LAB_00155794: MOV DIL,byte ptr [R15 + 0x1] INC R15 JMP 0x00155781 LAB_0015579d: ADD R15,0x2 JMP 0x00155705 LAB_001557a6: MOV EAX,ECX LAB_001557a8: POP RBX POP R14 POP R15 RET LAB_001557ae: CMP EBX,0x3d JNZ 0x001557c2 CMP byte ptr [R15],0x3e PUSH -0x5c POP RCX PUSH 0x3d POP RAX CMOVZ EAX,ECX JMP 0x001557a8 LAB_001557c2: MOV EDI,EBX CALL 0x001553fd TEST EAX,EAX JZ 0x00155829 LEA EAX,[RBX + -0x61] CMP EAX,0x8 JA 0x00155830 LEA RCX,[0x187570] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_61: CMP byte ptr [R15],0x77 JNZ 0x00155934 CMP byte ptr [R14 + 0x2],0x61 JNZ 0x00155934 CMP byte ptr [R14 + 0x3],0x69 JNZ 0x00155934 CMP byte ptr [R14 + 0x4],0x74 JNZ 0x00155934 MOVZX EDI,byte ptr [R14 + 0x5] CALL 0x00155648 TEST EAX,EAX JNZ 0x00155934 PUSH -0x28 JMP 0x00155936 LAB_00155829: MOV EAX,EBX JMP 0x001557a8 default: CMP EBX,0x6f JNZ 0x00155934 CMP byte ptr [R15],0x66 JNZ 0x00155934 MOVZX EDI,byte ptr [R14 + 0x2] CALL 0x00155648 TEST EAX,EAX JNZ 0x00155934 PUSH -0x27 JMP 0x00155936 caseD_66: CMP byte ptr [R15],0x75 JNZ 0x00155934 CMP byte ptr [R14 + 0x2],0x6e JNZ 0x00155934 CMP byte ptr [R14 + 0x3],0x63 JNZ 0x00155934 CMP byte ptr [R14 + 0x4],0x74 JNZ 0x00155934 CMP byte ptr [R14 + 0x5],0x69 JNZ 0x00155934 CMP byte ptr [R14 + 0x6],0x6f JNZ 0x00155934 CMP byte ptr [R14 + 0x7],0x6e JNZ 0x00155934 MOVZX EDI,byte ptr [R14 + 0x8] CALL 0x00155648 TEST EAX,EAX JNZ 0x00155934 PUSH -0x3b JMP 0x00155936 caseD_69: MOV AL,byte ptr [R15] CMP AL,0x6e JNZ 0x001558d2 MOVZX EDI,byte ptr [R14 + 0x2] CALL 0x00155648 TEST EAX,EAX JZ 0x0015593c MOV AL,byte ptr [R15] LAB_001558d2: CMP AL,0x6d JNZ 0x00155934 CMP byte ptr [R14 + 0x2],0x70 JNZ 0x00155934 CMP byte ptr [R14 + 0x3],0x6f JNZ 0x00155934 CMP byte ptr [R14 + 0x4],0x72 JNZ 0x00155934 CMP byte ptr [R14 + 0x5],0x74 JNZ 0x00155934 MOVZX EDI,byte ptr [R14 + 0x6] CALL 0x00155648 TEST EAX,EAX JNZ 0x00155934 PUSH -0x33 JMP 0x00155936 caseD_65: CMP byte ptr [R15],0x78 JNZ 0x00155934 CMP byte ptr [R14 + 0x2],0x70 JNZ 0x00155934 CMP byte ptr [R14 + 0x3],0x6f JNZ 0x00155934 CMP byte ptr [R14 + 0x4],0x72 JNZ 0x00155934 CMP byte ptr [R14 + 0x5],0x74 JNZ 0x00155934 MOVZX EDI,byte ptr [R14 + 0x6] CALL 0x00155648 TEST EAX,EAX JZ 0x00155940 caseD_62: PUSH -0x7d LAB_00155936: POP RAX JMP 0x001557a8 LAB_0015593c: PUSH -0x49 JMP 0x00155936 LAB_00155940: PUSH -0x35 JMP 0x00155936
ulong peek_token(long param_1,int param_2) { ulong uVar1; int iVar2; uint uVar3; byte bVar4; byte *pbVar5; byte *pbVar6; pbVar6 = *(byte **)(param_1 + 0x70); LAB_00155705: do { do { while( true ) { do { do { pbVar5 = pbVar6; pbVar6 = pbVar5 + 1; bVar4 = *pbVar5; } while (bVar4 - 0xb < 2); } while (bVar4 == 9); if ((bVar4 != 10) && (bVar4 != 0xd)) break; if (param_2 != 0) { return 10; } } } while (bVar4 == 0x20); if (bVar4 != 0x2f) { if (bVar4 == 0x3d) { uVar1 = 0x3d; if (*pbVar6 == 0x3e) { uVar1 = 0xffffffffffffffa4; } return uVar1 & 0xffffffff; } uVar3 = (uint)bVar4; iVar2 = lre_js_is_ident_first(uVar3); if (iVar2 == 0) { return (ulong)uVar3; } switch(bVar4) { case 0x61: if (((*pbVar6 == 0x77) && (pbVar5[2] == 0x61)) && ((pbVar5[3] == 0x69 && ((pbVar5[4] == 0x74 && (iVar2 = lre_js_is_ident_next(pbVar5[5]), iVar2 == 0)))))) { return 0xffffffffffffffd8; } break; case 0x62: case 99: case 100: case 0x67: case 0x68: break; case 0x65: if (((((*pbVar6 == 0x78) && (pbVar5[2] == 0x70)) && (pbVar5[3] == 0x6f)) && ((pbVar5[4] == 0x72 && (pbVar5[5] == 0x74)))) && (iVar2 = lre_js_is_ident_next(pbVar5[6]), iVar2 == 0)) { return 0xffffffffffffffcb; } break; case 0x66: if (((((*pbVar6 == 0x75) && (pbVar5[2] == 0x6e)) && (pbVar5[3] == 99)) && ((pbVar5[4] == 0x74 && (pbVar5[5] == 0x69)))) && ((pbVar5[6] == 0x6f && ((pbVar5[7] == 0x6e && (iVar2 = lre_js_is_ident_next(pbVar5[8]), iVar2 == 0)))))) { return 0xffffffffffffffc5; } break; case 0x69: bVar4 = *pbVar6; if (bVar4 == 0x6e) { iVar2 = lre_js_is_ident_next(pbVar5[2]); if (iVar2 == 0) { return 0xffffffffffffffb7; } bVar4 = *pbVar6; } if ((((bVar4 == 0x6d) && (pbVar5[2] == 0x70)) && ((pbVar5[3] == 0x6f && ((pbVar5[4] == 0x72 && (pbVar5[5] == 0x74)))))) && (iVar2 = lre_js_is_ident_next(pbVar5[6]), iVar2 == 0)) { return 0xffffffffffffffcd; } break; default: if (((uVar3 == 0x6f) && (*pbVar6 == 0x66)) && (iVar2 = lre_js_is_ident_next(pbVar5[2]), iVar2 == 0)) { return 0xffffffffffffffd9; } } return 0xffffffffffffff83; } if (*pbVar6 != 0x2f) { if (*pbVar6 != 0x2a) { return 0x2f; } pbVar6 = pbVar5 + 2; do { bVar4 = *pbVar6; if (bVar4 == 0xd) { if (param_2 != 0) { return 10; } } else { if (bVar4 == 0) goto LAB_00155705; if ((param_2 != 0) && (bVar4 == 10)) { return 10; } if ((bVar4 == 0x2a) && (pbVar6[1] == 0x2f)) goto LAB_0015579d; } pbVar6 = pbVar6 + 1; } while( true ); } if (param_2 != 0) { return 10; } bVar4 = 0x2f; while ((0xd < bVar4 || ((0x2401U >> (bVar4 & 0x1f) & 1) == 0))) { bVar4 = pbVar6[1]; pbVar6 = pbVar6 + 1; } } while( true ); LAB_0015579d: pbVar6 = pbVar6 + 2; goto LAB_00155705; }
29,571
ggml_backend_sched_reserve
monkey531[P]llama/ggml/src/ggml-backend.cpp
bool ggml_backend_sched_reserve(ggml_backend_sched_t sched, struct ggml_cgraph * measure_graph) { GGML_ASSERT((int)sched->hash_set.size >= measure_graph->n_nodes + measure_graph->n_leafs); ggml_backend_sched_split_graph(sched, measure_graph); ggml_backend_sched_synchronize(sched); if (!ggml_gallocr_reserve_n(sched->galloc, &sched->graph, sched->node_backend_ids, sched->leaf_backend_ids)) { return false; } ggml_backend_sched_reset(sched); return true; }
O0
cpp
ggml_backend_sched_reserve: subq $0x18, %rsp movq %rdi, 0x8(%rsp) movq %rsi, (%rsp) movq 0x8(%rsp), %rax movq 0x110(%rax), %rax movq (%rsp), %rcx movl 0x4(%rcx), %ecx movq (%rsp), %rdx addl 0x8(%rdx), %ecx cmpl %ecx, %eax jge 0x5f4fc leaq 0x58017(%rip), %rdi # 0xb74f9 movl $0x605, %esi # imm = 0x605 leaq 0x55113(%rip), %rdx # 0xb4601 leaq 0x5841a(%rip), %rcx # 0xb790f movb $0x0, %al callq 0x46770 movq 0x8(%rsp), %rdi movq (%rsp), %rsi callq 0x5f570 movq 0x8(%rsp), %rdi callq 0x44fa0 movq 0x8(%rsp), %rax movq 0x108(%rax), %rdi movq 0x8(%rsp), %rsi addq $0x158, %rsi # imm = 0x158 movq 0x8(%rsp), %rax movq 0x138(%rax), %rdx movq 0x8(%rsp), %rax movq 0x140(%rax), %rcx callq 0x44a60 testb $0x1, %al jne 0x5f554 movb $0x0, 0x17(%rsp) jmp 0x5f563 movq 0x8(%rsp), %rdi callq 0x42700 movb $0x1, 0x17(%rsp) movb 0x17(%rsp), %al andb $0x1, %al addq $0x18, %rsp retq nop
ggml_backend_sched_reserve: sub rsp, 18h mov [rsp+18h+var_10], rdi mov [rsp+18h+var_18], rsi mov rax, [rsp+18h+var_10] mov rax, [rax+110h] mov rcx, [rsp+18h+var_18] mov ecx, [rcx+4] mov rdx, [rsp+18h+var_18] add ecx, [rdx+8] cmp eax, ecx jge short loc_5F4FC lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... mov esi, 605h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aIntSchedHashSe; "(int)sched->hash_set.size >= measure_gr"... mov al, 0 call _ggml_abort loc_5F4FC: mov rdi, [rsp+18h+var_10] mov rsi, [rsp+18h+var_18] call _ZL30ggml_backend_sched_split_graphP18ggml_backend_schedP11ggml_cgraph; ggml_backend_sched_split_graph(ggml_backend_sched *,ggml_cgraph *) mov rdi, [rsp+18h+var_10] call _ggml_backend_sched_synchronize mov rax, [rsp+18h+var_10] mov rdi, [rax+108h] mov rsi, [rsp+18h+var_10] add rsi, 158h mov rax, [rsp+18h+var_10] mov rdx, [rax+138h] mov rax, [rsp+18h+var_10] mov rcx, [rax+140h] call _ggml_gallocr_reserve_n test al, 1 jnz short loc_5F554 mov [rsp+18h+var_1], 0 jmp short loc_5F563 loc_5F554: mov rdi, [rsp+18h+var_10] call _ggml_backend_sched_reset mov [rsp+18h+var_1], 1 loc_5F563: mov al, [rsp+18h+var_1] and al, 1 add rsp, 18h retn
char ggml_backend_sched_reserve(long long *a1, long long a2) { if ( (int)a1[34] < *(_DWORD *)(a2 + 8) + *(_DWORD *)(a2 + 4) ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-backend.cpp", 1541, (long long)"GGML_ASSERT(%s) failed", "(int)sched->hash_set.size >= measure_graph->n_nodes + measure_graph->n_leafs"); ggml_backend_sched_split_graph(a1, a2); ggml_backend_sched_synchronize(a1); if ( (ggml_gallocr_reserve_n(a1[33], (long long)(a1 + 43), a1[39], a1[40]) & 1) == 0 ) return 0; ggml_backend_sched_reset(a1); return 1; }
ggml_backend_sched_reserve: SUB RSP,0x18 MOV qword ptr [RSP + 0x8],RDI MOV qword ptr [RSP],RSI MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x110] MOV RCX,qword ptr [RSP] MOV ECX,dword ptr [RCX + 0x4] MOV RDX,qword ptr [RSP] ADD ECX,dword ptr [RDX + 0x8] CMP EAX,ECX JGE 0x0015f4fc LEA RDI,[0x1b74f9] MOV ESI,0x605 LEA RDX,[0x1b4601] LEA RCX,[0x1b790f] MOV AL,0x0 CALL 0x00146770 LAB_0015f4fc: MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP] CALL 0x0015f570 MOV RDI,qword ptr [RSP + 0x8] CALL 0x00144fa0 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x108] MOV RSI,qword ptr [RSP + 0x8] ADD RSI,0x158 MOV RAX,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RAX + 0x138] MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RAX + 0x140] CALL 0x00144a60 TEST AL,0x1 JNZ 0x0015f554 MOV byte ptr [RSP + 0x17],0x0 JMP 0x0015f563 LAB_0015f554: MOV RDI,qword ptr [RSP + 0x8] CALL 0x00142700 MOV byte ptr [RSP + 0x17],0x1 LAB_0015f563: MOV AL,byte ptr [RSP + 0x17] AND AL,0x1 ADD RSP,0x18 RET
bool ggml_backend_sched_reserve(ggml_backend_sched *param_1,ggml_cgraph *param_2) { ulong uVar1; bool bVar2; if ((int)*(int8 *)(param_1 + 0x110) < *(int *)(param_2 + 4) + *(int *)(param_2 + 8)) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-backend.cpp" ,0x605,"GGML_ASSERT(%s) failed", "(int)sched->hash_set.size >= measure_graph->n_nodes + measure_graph->n_leafs"); } ggml_backend_sched_split_graph(param_1,param_2); ggml_backend_sched_synchronize(param_1); uVar1 = ggml_gallocr_reserve_n (*(int8 *)(param_1 + 0x108),param_1 + 0x158, *(int8 *)(param_1 + 0x138),*(int8 *)(param_1 + 0x140)); bVar2 = (uVar1 & 1) != 0; if (bVar2) { ggml_backend_sched_reset(param_1); } return bVar2; }
29,572
ggml_backend_sched_reserve
monkey531[P]llama/ggml/src/ggml-backend.cpp
bool ggml_backend_sched_reserve(ggml_backend_sched_t sched, struct ggml_cgraph * measure_graph) { GGML_ASSERT((int)sched->hash_set.size >= measure_graph->n_nodes + measure_graph->n_leafs); ggml_backend_sched_split_graph(sched, measure_graph); ggml_backend_sched_synchronize(sched); if (!ggml_gallocr_reserve_n(sched->galloc, &sched->graph, sched->node_backend_ids, sched->leaf_backend_ids)) { return false; } ggml_backend_sched_reset(sched); return true; }
O3
cpp
ggml_backend_sched_reserve: pushq %rbp pushq %r14 pushq %rbx movl 0x8(%rsi), %eax addl 0x4(%rsi), %eax cmpl 0x110(%rdi), %eax jg 0x25e23 movq %rdi, %rbx callq 0x25e44 movl 0x4(%rbx), %eax testl %eax, %eax jle 0x25ded xorl %r14d, %r14d movq 0x8(%rbx,%r14,8), %rdi movq 0x30(%rdi), %rcx testq %rcx, %rcx je 0x25de2 callq *%rcx movl 0x4(%rbx), %eax incq %r14 movslq %eax, %rcx cmpq %rcx, %r14 jl 0x25dcf leaq 0x158(%rbx), %rsi movq 0x108(%rbx), %rdi movq 0x138(%rbx), %rdx movq 0x140(%rbx), %rcx callq 0x17450 movl %eax, %ebp testb %al, %al je 0x25e1c movq %rbx, %rdi callq 0x16ac0 movl %ebp, %eax popq %rbx popq %r14 popq %rbp retq leaq 0x27454(%rip), %rdi # 0x4d27e leaq 0x2482c(%rip), %rdx # 0x4a65d leaq 0x2785c(%rip), %rcx # 0x4d694 movl $0x605, %esi # imm = 0x605 xorl %eax, %eax callq 0x17c60
ggml_backend_sched_reserve: push rbp push r14 push rbx mov eax, [rsi+8] add eax, [rsi+4] cmp eax, [rdi+110h] jg short loc_25E23 mov rbx, rdi call _ZL30ggml_backend_sched_split_graphP18ggml_backend_schedP11ggml_cgraph; ggml_backend_sched_split_graph(ggml_backend_sched *,ggml_cgraph *) mov eax, [rbx+4] test eax, eax jle short loc_25DED xor r14d, r14d loc_25DCF: mov rdi, [rbx+r14*8+8] mov rcx, [rdi+30h] test rcx, rcx jz short loc_25DE2 call rcx mov eax, [rbx+4] loc_25DE2: inc r14 movsxd rcx, eax cmp r14, rcx jl short loc_25DCF loc_25DED: lea rsi, [rbx+158h] mov rdi, [rbx+108h] mov rdx, [rbx+138h] mov rcx, [rbx+140h] call _ggml_gallocr_reserve_n mov ebp, eax test al, al jz short loc_25E1C mov rdi, rbx call _ggml_backend_sched_reset loc_25E1C: mov eax, ebp pop rbx pop r14 pop rbp retn loc_25E23: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aIntSchedHashSe; "(int)sched->hash_set.size >= measure_gr"... mov esi, 605h xor eax, eax call _ggml_abort
long long ggml_backend_sched_reserve( long long a1, long long a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10, long long a11, long long a12, int a13, int a14) { double v14; // xmm4_8 double v15; // xmm5_8 int v16; // eax long long i; // r14 void (*v18)(void); // rcx unsigned int v19; // ebp if ( *(_DWORD *)(a2 + 4) + *(_DWORD *)(a2 + 8) > *(_DWORD *)(a1 + 272) ) ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-backend.cpp", 1541, (unsigned int)"GGML_ASSERT(%s) failed", (unsigned int)"(int)sched->hash_set.size >= measure_graph->n_nodes + measure_graph->n_leafs", a13, a14); ggml_backend_sched_split_graph(); v16 = *(_DWORD *)(a1 + 4); if ( v16 > 0 ) { for ( i = 0LL; i < v16; ++i ) { v18 = *(void (**)(void))(*(_QWORD *)(a1 + 8 * i + 8) + 48LL); if ( v18 ) { v18(); v16 = *(_DWORD *)(a1 + 4); } } } v19 = ggml_gallocr_reserve_n( *(__m128 **)(a1 + 264), a1 + 344, *(_QWORD *)(a1 + 312), *(_QWORD *)(a1 + 320), a3, a4, a5, a6, v14, v15, a9, a10); if ( (_BYTE)v19 ) ggml_backend_sched_reset(a1); return v19; }
ggml_backend_sched_reserve: PUSH RBP PUSH R14 PUSH RBX MOV EAX,dword ptr [RSI + 0x8] ADD EAX,dword ptr [RSI + 0x4] CMP EAX,dword ptr [RDI + 0x110] JG 0x00125e23 MOV RBX,RDI CALL 0x00125e44 MOV EAX,dword ptr [RBX + 0x4] TEST EAX,EAX JLE 0x00125ded XOR R14D,R14D LAB_00125dcf: MOV RDI,qword ptr [RBX + R14*0x8 + 0x8] MOV RCX,qword ptr [RDI + 0x30] TEST RCX,RCX JZ 0x00125de2 CALL RCX MOV EAX,dword ptr [RBX + 0x4] LAB_00125de2: INC R14 MOVSXD RCX,EAX CMP R14,RCX JL 0x00125dcf LAB_00125ded: LEA RSI,[RBX + 0x158] MOV RDI,qword ptr [RBX + 0x108] MOV RDX,qword ptr [RBX + 0x138] MOV RCX,qword ptr [RBX + 0x140] CALL 0x00117450 MOV EBP,EAX TEST AL,AL JZ 0x00125e1c MOV RDI,RBX CALL 0x00116ac0 LAB_00125e1c: MOV EAX,EBP POP RBX POP R14 POP RBP RET LAB_00125e23: LEA RDI,[0x14d27e] LEA RDX,[0x14a65d] LEA RCX,[0x14d694] MOV ESI,0x605 XOR EAX,EAX CALL 0x00117c60
int4 ggml_backend_sched_reserve(ggml_backend_sched *param_1,ggml_cgraph *param_2) { int iVar1; int4 uVar2; long lVar3; if (*(int *)(param_2 + 8) + *(int *)(param_2 + 4) <= *(int *)(param_1 + 0x110)) { ggml_backend_sched_split_graph(param_1,param_2); iVar1 = *(int *)(param_1 + 4); if (0 < iVar1) { lVar3 = 0; do { if (*(code **)(*(long *)(param_1 + lVar3 * 8 + 8) + 0x30) != (code *)0x0) { (**(code **)(*(long *)(param_1 + lVar3 * 8 + 8) + 0x30))(); iVar1 = *(int *)(param_1 + 4); } lVar3 = lVar3 + 1; } while (lVar3 < iVar1); } uVar2 = ggml_gallocr_reserve_n (*(int8 *)(param_1 + 0x108),param_1 + 0x158, *(int8 *)(param_1 + 0x138),*(int8 *)(param_1 + 0x140)); if ((char)uVar2 != '\0') { ggml_backend_sched_reset(param_1); } return uVar2; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-backend.cpp", 0x605,"GGML_ASSERT(%s) failed", "(int)sched->hash_set.size >= measure_graph->n_nodes + measure_graph->n_leafs"); }
29,573
inline_mysql_file_open
eloqsql/include/mysql/psi/mysql_file.h
static inline File inline_mysql_file_open( #ifdef HAVE_PSI_FILE_INTERFACE PSI_file_key key, const char *src_file, uint src_line, #endif const char *filename, int flags, myf myFlags) { File file; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_OPEN, filename, &locker); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line); file= my_open(filename, flags, myFlags); PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file); return file; } #endif file= my_open(filename, flags, myFlags); return file; }
O0
c
inline_mysql_file_open: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq %rcx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movq %r9, -0x30(%rbp) leaq 0x23fc58(%rip), %rax # 0x2c75a0 movq (%rax), %rax movq 0x148(%rax), %rax movl -0x8(%rbp), %esi movq -0x20(%rbp), %rcx leaq -0x88(%rbp), %rdi movl $0x2, %edx leaq -0x40(%rbp), %r8 callq *%rax movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x879e2 leaq 0x23fc0a(%rip), %rax # 0x2c75a0 movq (%rax), %rax movq 0x1f0(%rax), %rax movq -0x40(%rbp), %rdi movq -0x10(%rbp), %rsi movl -0x14(%rbp), %edx callq *%rax movq -0x20(%rbp), %rdi movl -0x24(%rbp), %esi movq -0x30(%rbp), %rdx callq 0xfa360 movl %eax, -0x34(%rbp) leaq 0x23fbd9(%rip), %rax # 0x2c75a0 movq (%rax), %rax movq 0x200(%rax), %rax movq -0x40(%rbp), %rdi movl -0x34(%rbp), %esi callq *%rax movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x879fb movq -0x20(%rbp), %rdi movl -0x24(%rbp), %esi movq -0x30(%rbp), %rdx callq 0xfa360 movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x90, %rsp popq %rbp retq nopw (%rax,%rax)
inline_mysql_file_open_0: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_8], edi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_20], rcx mov [rbp+var_24], r8d mov [rbp+var_30], r9 lea rax, PSI_server mov rax, [rax] mov rax, [rax+148h] mov esi, [rbp+var_8] mov rcx, [rbp+var_20] lea rdi, [rbp+var_88] mov edx, 2 lea r8, [rbp+var_40] call rax mov [rbp+var_40], rax cmp [rbp+var_40], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_879E2 lea rax, PSI_server mov rax, [rax] mov rax, [rax+1F0h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_10] mov edx, [rbp+var_14] call rax mov rdi, [rbp+var_20] mov esi, [rbp+var_24] mov rdx, [rbp+var_30] call my_open mov [rbp+var_34], eax lea rax, PSI_server mov rax, [rax] mov rax, [rax+200h] mov rdi, [rbp+var_40] mov esi, [rbp+var_34] call rax mov eax, [rbp+var_34] mov [rbp+var_4], eax jmp short loc_879FB loc_879E2: mov rdi, [rbp+var_20] mov esi, [rbp+var_24] mov rdx, [rbp+var_30] call my_open mov [rbp+var_34], eax mov eax, [rbp+var_34] mov [rbp+var_4], eax loc_879FB: mov eax, [rbp+var_4] add rsp, 90h pop rbp retn
long long inline_mysql_file_open_0( unsigned int a1, long long a2, unsigned int a3, long long a4, unsigned int a5, long long a6) { _BYTE v7[72]; // [rsp+8h] [rbp-88h] BYREF long long v8; // [rsp+50h] [rbp-40h] BYREF unsigned int v9; // [rsp+5Ch] [rbp-34h] long long v10; // [rsp+60h] [rbp-30h] unsigned int v11; // [rsp+6Ch] [rbp-24h] long long v12; // [rsp+70h] [rbp-20h] unsigned int v13; // [rsp+7Ch] [rbp-14h] long long v14; // [rsp+80h] [rbp-10h] unsigned int v15; // [rsp+88h] [rbp-8h] v15 = a1; v14 = a2; v13 = a3; v12 = a4; v11 = a5; v10 = a6; v8 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, long long *))PSI_server[41])(v7, a1, 2LL, a4, &v8); if ( v8 ) { ((void ( *)(long long, long long, _QWORD))PSI_server[62])(v8, v14, v13); v9 = my_open(v12, v11, v10); ((void ( *)(long long, _QWORD))PSI_server[64])(v8, v9); } else { return (unsigned int)my_open(v12, v11, v10); } return v9; }
inline_mysql_file_open: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV dword ptr [RBP + -0x8],EDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],R8D MOV qword ptr [RBP + -0x30],R9 LEA RAX,[0x3c75a0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x148] MOV ESI,dword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x20] LEA RDI,[RBP + -0x88] MOV EDX,0x2 LEA R8,[RBP + -0x40] CALL RAX MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x40],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001879e2 LEA RAX,[0x3c75a0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1f0] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x14] CALL RAX MOV RDI,qword ptr [RBP + -0x20] MOV ESI,dword ptr [RBP + -0x24] MOV RDX,qword ptr [RBP + -0x30] CALL 0x001fa360 MOV dword ptr [RBP + -0x34],EAX LEA RAX,[0x3c75a0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x200] MOV RDI,qword ptr [RBP + -0x40] MOV ESI,dword ptr [RBP + -0x34] CALL RAX MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX JMP 0x001879fb LAB_001879e2: MOV RDI,qword ptr [RBP + -0x20] MOV ESI,dword ptr [RBP + -0x24] MOV RDX,qword ptr [RBP + -0x30] CALL 0x001fa360 MOV dword ptr [RBP + -0x34],EAX MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX LAB_001879fb: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x90 POP RBP RET
int4 inline_mysql_file_open (int4 param_1,int8 param_2,int4 param_3,int8 param_4, int4 param_5,int8 param_6) { int1 local_90 [72]; long local_48; int4 local_3c; int8 local_38; int4 local_2c; int8 local_28; int4 local_1c; int8 local_18; int4 local_10; int4 local_c; local_38 = param_6; local_2c = param_5; local_28 = param_4; local_1c = param_3; local_18 = param_2; local_10 = param_1; local_48 = (**(code **)(PSI_server + 0x148))(local_90,param_1,2,param_4,&local_48); if (local_48 == 0) { local_c = my_open(local_28,local_2c,local_38); } else { (**(code **)(PSI_server + 0x1f0))(local_48,local_18,local_1c); local_3c = my_open(local_28,local_2c,local_38); (**(code **)(PSI_server + 0x200))(local_48,local_3c); local_c = local_3c; } return local_c; }
29,574
arc4_ctx_alloc
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/cipher_wrap.c
static void *arc4_ctx_alloc(void) { mbedtls_arc4_context *ctx; ctx = mbedtls_calloc(1, sizeof(mbedtls_arc4_context)); if (ctx == NULL) { return NULL; } mbedtls_arc4_init(ctx); return ctx; }
O3
c
arc4_ctx_alloc: pushq %rbx movl $0x1, %edi movl $0x108, %esi # imm = 0x108 callq 0xf2f0 movq %rax, %rbx testq %rax, %rax je 0x9b208 movq %rbx, %rdi callq 0x99ad0 movq %rbx, %rax popq %rbx retq
arc4_ctx_alloc: push rbx mov edi, 1 mov esi, 108h call _calloc mov rbx, rax test rax, rax jz short loc_9B208 mov rdi, rbx call mbedtls_arc4_init loc_9B208: mov rax, rbx pop rbx retn
long long arc4_ctx_alloc() { long long v0; // rax long long v1; // rbx v0 = calloc(1LL, 264LL); v1 = v0; if ( v0 ) mbedtls_arc4_init(v0); return v1; }
arc4_ctx_alloc: PUSH RBX MOV EDI,0x1 MOV ESI,0x108 CALL 0x0010f2f0 MOV RBX,RAX TEST RAX,RAX JZ 0x0019b208 MOV RDI,RBX CALL 0x00199ad0 LAB_0019b208: MOV RAX,RBX POP RBX RET
void * arc4_ctx_alloc(void) { void *pvVar1; pvVar1 = calloc(1,0x108); if (pvVar1 != (void *)0x0) { mbedtls_arc4_init(pvVar1); } return pvVar1; }
29,575
getCursorPosition(int, int)
llama.cpp/examples/run/linenoise.cpp/linenoise.cpp
static int getCursorPosition(int ifd, int ofd) { char buf[32]; int cols, rows; unsigned int i = 0; /* Report cursor location */ if (write(ofd, "\x1b[6n", 4) != 4) return -1; /* Read the response: ESC [ rows ; cols R */ while (i < sizeof(buf)-1) { if (read(ifd,buf+i,1) != 1) break; if (buf[i] == 'R') break; i++; } buf[i] = '\0'; /* Parse it. */ if (buf[0] != ESC || buf[1] != '[') return -1; if (sscanf(buf+2,"%d;%d",&rows,&cols) != 2) return -1; return cols; }
O3
cpp
getCursorPosition(int, int): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x38, %rsp movl %esi, %eax movl %edi, %ebp leaq 0x9be5c(%rip), %rsi # 0xcff29 movl $0x4, %edx movl %eax, %edi callq 0x1de70 movl $0xffffffff, %ebx # imm = 0xFFFFFFFF cmpq $0x4, %rax jne 0x34158 xorl %r15d, %r15d leaq (%rsp,%r15), %r14 addq $0x10, %r14 movl $0x1, %edx movl %ebp, %edi movq %r14, %rsi callq 0x1da90 cmpq $0x1, %rax jne 0x34119 cmpb $0x52, (%r14) je 0x34119 incq %r15 cmpq $0x1f, %r15 jne 0x340e7 movl $0x1f, %r15d movb $0x0, 0x10(%rsp,%r15) cmpb $0x1b, 0x10(%rsp) jne 0x34158 cmpb $0x5b, 0x11(%rsp) jne 0x34158 leaq 0x12(%rsp), %rdi leaq 0x9bdf5(%rip), %rsi # 0xcff2e leaq 0xc(%rsp), %rdx leaq 0x8(%rsp), %rcx xorl %eax, %eax callq 0x1d100 movl $0xffffffff, %ebx # imm = 0xFFFFFFFF cmpl $0x2, %eax jne 0x34158 movl 0x8(%rsp), %ebx movl %ebx, %eax addq $0x38, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
_ZL17getCursorPositionii: push rbp push r15 push r14 push rbx sub rsp, 38h mov eax, esi mov ebp, edi lea rsi, a6n; "\x1B[6n" mov edx, 4 mov edi, eax call _write mov ebx, 0FFFFFFFFh cmp rax, 4 jnz short loc_34158 xor r15d, r15d loc_340E7: lea r14, [rsp+r15+58h+var_58] add r14, 10h mov edx, 1 mov edi, ebp mov rsi, r14 call _read cmp rax, 1 jnz short loc_34119 cmp byte ptr [r14], 52h ; 'R' jz short loc_34119 inc r15 cmp r15, 1Fh jnz short loc_340E7 mov r15d, 1Fh loc_34119: mov [rsp+r15+58h+var_48], 0 cmp [rsp+58h+var_48], 1Bh jnz short loc_34158 cmp [rsp+58h+var_47], 5Bh ; '[' jnz short loc_34158 lea rdi, [rsp+58h+var_46] lea rsi, aDD; "%d;%d" lea rdx, [rsp+58h+var_4C] lea rcx, [rsp+58h+var_50] xor eax, eax call ___isoc99_sscanf mov ebx, 0FFFFFFFFh cmp eax, 2 jnz short loc_34158 mov ebx, [rsp+58h+var_50] loc_34158: mov eax, ebx add rsp, 38h pop rbx pop r14 pop r15 pop rbp retn
long long getCursorPosition(unsigned int a1, unsigned int a2) { unsigned int v2; // ebx long long v3; // r15 unsigned int v5; // [rsp+8h] [rbp-50h] BYREF char v6; // [rsp+Ch] [rbp-4Ch] BYREF _BYTE v7[2]; // [rsp+10h] [rbp-48h] BYREF _BYTE v8[70]; // [rsp+12h] [rbp-46h] BYREF v2 = -1; if ( write(a2, "\x1B[6n", 4LL) == 4 ) { v3 = 0LL; while ( read(a1, &v7[v3], 1LL) == 1 && v7[v3] != 82 ) { if ( ++v3 == 31 ) { v3 = 31LL; break; } } v7[v3] = 0; if ( v7[0] == 27 && v7[1] == 91 ) { v2 = -1; if ( (unsigned int)__isoc99_sscanf(v8, "%d;%d", &v6, &v5) == 2 ) return v5; } } return v2; }
getCursorPosition: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x38 MOV EAX,ESI MOV EBP,EDI LEA RSI,[0x1cff29] MOV EDX,0x4 MOV EDI,EAX CALL 0x0011de70 MOV EBX,0xffffffff CMP RAX,0x4 JNZ 0x00134158 XOR R15D,R15D LAB_001340e7: LEA R14,[RSP + R15*0x1] ADD R14,0x10 MOV EDX,0x1 MOV EDI,EBP MOV RSI,R14 CALL 0x0011da90 CMP RAX,0x1 JNZ 0x00134119 CMP byte ptr [R14],0x52 JZ 0x00134119 INC R15 CMP R15,0x1f JNZ 0x001340e7 MOV R15D,0x1f LAB_00134119: MOV byte ptr [RSP + R15*0x1 + 0x10],0x0 CMP byte ptr [RSP + 0x10],0x1b JNZ 0x00134158 CMP byte ptr [RSP + 0x11],0x5b JNZ 0x00134158 LEA RDI,[RSP + 0x12] LEA RSI,[0x1cff2e] LEA RDX,[RSP + 0xc] LEA RCX,[RSP + 0x8] XOR EAX,EAX CALL 0x0011d100 MOV EBX,0xffffffff CMP EAX,0x2 JNZ 0x00134158 MOV EBX,dword ptr [RSP + 0x8] LAB_00134158: MOV EAX,EBX ADD RSP,0x38 POP RBX POP R14 POP R15 POP RBP RET
/* getCursorPosition(int, int) */ int4 getCursorPosition(int param_1,int param_2) { int iVar1; ssize_t sVar2; int4 uVar3; long lVar4; int4 local_50; int1 local_4c [4]; char local_48 [40]; sVar2 = write(param_2,&DAT_001cff29,4); uVar3 = 0xffffffff; if (sVar2 == 4) { lVar4 = 0; do { sVar2 = read(param_1,local_48 + lVar4,1); if ((sVar2 != 1) || (local_48[lVar4] == 'R')) goto LAB_00134119; lVar4 = lVar4 + 1; } while (lVar4 != 0x1f); lVar4 = 0x1f; LAB_00134119: local_48[lVar4] = '\0'; if ((local_48[0] == '\x1b') && (local_48[1] == '[')) { iVar1 = __isoc99_sscanf(local_48 + 2,"%d;%d",local_4c,&local_50); uVar3 = 0xffffffff; if (iVar1 == 2) { uVar3 = local_50; } } } return uVar3; }
29,576
js__gettimeofday_us
bluesky950520[P]quickjs/cutils.c
int64_t js__gettimeofday_us(void) { struct timeval tv; #ifdef _WIN32 gettimeofday_msvc(&tv); #else gettimeofday(&tv, NULL); #endif return ((int64_t)tv.tv_sec * 1000000) + tv.tv_usec; }
O0
c
js__gettimeofday_us: subq $0x18, %rsp leaq 0x8(%rsp), %rdi xorl %eax, %eax movl %eax, %esi callq 0xe350 imulq $0xf4240, 0x8(%rsp), %rax # imm = 0xF4240 addq 0x10(%rsp), %rax addq $0x18, %rsp retq nopw %cs:(%rax,%rax)
js__gettimeofday_us: sub rsp, 18h lea rdi, [rsp+18h+var_10] xor eax, eax mov esi, eax call _gettimeofday imul rax, [rsp+18h+var_10], 0F4240h add rax, [rsp+18h+var_8] add rsp, 18h retn
long long js__gettimeofday_us() { _QWORD v1[2]; // [rsp+8h] [rbp-10h] BYREF gettimeofday(v1, 0LL); return v1[1] + 1000000LL * v1[0]; }
js__gettimeofday_us: SUB RSP,0x18 LEA RDI,[RSP + 0x8] XOR EAX,EAX MOV ESI,EAX CALL 0x0010e350 IMUL RAX,qword ptr [RSP + 0x8],0xf4240 ADD RAX,qword ptr [RSP + 0x10] ADD RSP,0x18 RET
long js__gettimeofday_us(void) { timeval local_10; gettimeofday(&local_10,(__timezone_ptr_t)0x0); return local_10.tv_sec * 1000000 + local_10.tv_usec; }
29,577
js__gettimeofday_us
bluesky950520[P]quickjs/cutils.c
int64_t js__gettimeofday_us(void) { struct timeval tv; #ifdef _WIN32 gettimeofday_msvc(&tv); #else gettimeofday(&tv, NULL); #endif return ((int64_t)tv.tv_sec * 1000000) + tv.tv_usec; }
O2
c
js__gettimeofday_us: pushq %rbx subq $0x10, %rsp movq %rsp, %rbx movq %rbx, %rdi xorl %esi, %esi callq 0xe370 imulq $0xf4240, (%rbx), %rax # imm = 0xF4240 addq 0x8(%rbx), %rax addq $0x10, %rsp popq %rbx retq
js__gettimeofday_us: push rbx sub rsp, 10h mov rbx, rsp mov rdi, rbx xor esi, esi call _gettimeofday imul rax, [rbx], 0F4240h add rax, [rbx+8] add rsp, 10h pop rbx retn
long long js__gettimeofday_us() { _QWORD v1[3]; // [rsp+0h] [rbp-18h] BYREF gettimeofday(v1, 0LL); return v1[1] + 1000000LL * v1[0]; }
js__gettimeofday_us: PUSH RBX SUB RSP,0x10 MOV RBX,RSP MOV RDI,RBX XOR ESI,ESI CALL 0x0010e370 IMUL RAX,qword ptr [RBX],0xf4240 ADD RAX,qword ptr [RBX + 0x8] ADD RSP,0x10 POP RBX RET
long js__gettimeofday_us(void) { timeval local_18; gettimeofday(&local_18,(__timezone_ptr_t)0x0); return local_18.tv_sec * 1000000 + local_18.tv_usec; }
29,578
tree_search_key
eloqsql/mysys/tree.c
void *tree_search_key(TREE *tree, const void *key, TREE_ELEMENT **parents, TREE_ELEMENT ***last_pos, enum ha_rkey_function flag, void *custom_arg) { int cmp; TREE_ELEMENT *element= tree->root; TREE_ELEMENT **last_left_step_parent= NULL, **last_right_step_parent= NULL; TREE_ELEMENT **last_equal_element= NULL; /* TODO: support for HA_READ_KEY_OR_PREV, HA_READ_PREFIX flags if needed. */ *parents = &null_element; while (element != &null_element) { *++parents= element; if ((cmp= (*tree->compare)(custom_arg, ELEMENT_KEY(tree, element), key)) == 0) { switch (flag) { case HA_READ_KEY_EXACT: case HA_READ_KEY_OR_NEXT: case HA_READ_BEFORE_KEY: case HA_READ_KEY_OR_PREV: last_equal_element= parents; cmp= 1; break; case HA_READ_AFTER_KEY: cmp= -1; break; case HA_READ_PREFIX_LAST: case HA_READ_PREFIX_LAST_OR_PREV: last_equal_element= parents; cmp= -1; break; default: return NULL; } } if (cmp < 0) /* element < key */ { last_right_step_parent= parents; element= element->right; } else { last_left_step_parent= parents; element= element->left; } } switch (flag) { case HA_READ_KEY_EXACT: case HA_READ_PREFIX_LAST: *last_pos= last_equal_element; break; case HA_READ_KEY_OR_NEXT: *last_pos= last_equal_element ? last_equal_element : last_left_step_parent; break; case HA_READ_AFTER_KEY: *last_pos= last_left_step_parent; break; case HA_READ_PREFIX_LAST_OR_PREV: *last_pos= last_equal_element ? last_equal_element : last_right_step_parent; break; case HA_READ_BEFORE_KEY: *last_pos= last_right_step_parent; break; case HA_READ_KEY_OR_PREV: *last_pos= last_equal_element ? last_equal_element : last_right_step_parent; break; default: return NULL; } return *last_pos ? ELEMENT_KEY(tree, **last_pos) : NULL; }
O3
c
tree_search_key: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %r9, -0x50(%rbp) movl %r8d, -0x2c(%rbp) movq %rcx, -0x40(%rbp) movq %rsi, -0x48(%rbp) movq %rdi, %r8 movq (%rdi), %r14 leaq 0x2c8f59(%rip), %rax # 0x2f6458 movq %rax, (%rdx) cmpq %rax, %r14 je 0x2d5cc movq %rdx, %r13 addq $0x8, %r13 xorl %edx, %edx xorl %r15d, %r15d xorl %r12d, %r12d movq %r14, (%r13) movl 0x208(%r8), %esi testq %rsi, %rsi movq %rdx, -0x38(%rbp) je 0x2d533 addq %r14, %rsi jmp 0x2d537 movq 0x18(%r14), %rsi movq -0x50(%rbp), %rdi movq -0x48(%rbp), %rdx movq %r8, %rbx callq *0x228(%r8) testl %eax, %eax je 0x2d556 movq -0x38(%rbp), %rcx movq %rbx, %r8 jmp 0x2d5a0 movl -0x2c(%rbp), %ecx cmpl $0x7, %ecx ja 0x2d629 movq %rbx, %r8 movl $0x1, %eax movl $0x17, %edx btl %ecx, %edx movq %r13, %rcx jb 0x2d5a0 movl -0x2c(%rbp), %eax movl $0xc0, %ecx btl %eax, %ecx jae 0x2d58e movl $0xffffffff, %eax # imm = 0xFFFFFFFF movq %r13, %rcx jmp 0x2d5a0 cmpl $0x3, %eax jne 0x2d629 movl $0xffffffff, %eax # imm = 0xFFFFFFFF movq -0x38(%rbp), %rcx movl %eax, %edx shrl $0x1f, %edx testl %eax, %eax cmovnsq %r13, %r12 cmovsq %r13, %r15 movq (%r14,%rdx,8), %r14 addq $0x8, %r13 movq %rcx, %rdx leaq 0x2c8e97(%rip), %rax # 0x2f6458 cmpq %rax, %r14 jne 0x2d51a jmp 0x2d5d4 xorl %r12d, %r12d xorl %r15d, %r15d xorl %ecx, %ecx xorl %eax, %eax movl -0x2c(%rbp), %edx cmpl $0x7, %edx ja 0x2d631 movl %edx, %edx leaq 0x39925(%rip), %rsi # 0x66f0c movslq (%rsi,%rdx,4), %rdx addq %rsi, %rdx jmpq *%rdx movq %rcx, %r12 jmp 0x2d608 testq %rcx, %rcx cmovneq %rcx, %r15 movq %r15, %r12 jmp 0x2d608 testq %rcx, %rcx cmovneq %rcx, %r12 movq -0x40(%rbp), %rax movq %r12, (%rax) testq %r12, %r12 je 0x2d629 movl 0x208(%r8), %ecx movq (%r12), %rax testq %rcx, %rcx je 0x2d62d addq %rcx, %rax jmp 0x2d631 xorl %eax, %eax jmp 0x2d631 movq 0x18(%rax), %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
tree_search_key: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov [rbp+var_50], r9 mov [rbp+var_2C], r8d mov [rbp+var_40], rcx mov [rbp+var_48], rsi mov r8, rdi mov r14, [rdi] lea rax, null_element mov [rdx], rax cmp r14, rax jz loc_2D5CC mov r13, rdx add r13, 8 xor edx, edx xor r15d, r15d xor r12d, r12d loc_2D51A: mov [r13+0], r14 mov esi, [r8+208h] test rsi, rsi mov [rbp+var_38], rdx jz short loc_2D533 add rsi, r14 jmp short loc_2D537 loc_2D533: mov rsi, [r14+18h] loc_2D537: mov rdi, [rbp+var_50] mov rdx, [rbp+var_48] mov rbx, r8 call qword ptr [r8+228h] test eax, eax jz short loc_2D556 mov rcx, [rbp+var_38] mov r8, rbx jmp short loc_2D5A0 loc_2D556: mov ecx, [rbp+var_2C] cmp ecx, 7 ja loc_2D629 mov r8, rbx mov eax, 1 mov edx, 17h bt edx, ecx mov rcx, r13 jb short loc_2D5A0 mov eax, [rbp+var_2C] mov ecx, 0C0h bt ecx, eax jnb short loc_2D58E mov eax, 0FFFFFFFFh mov rcx, r13 jmp short loc_2D5A0 loc_2D58E: cmp eax, 3 jnz loc_2D629 mov eax, 0FFFFFFFFh mov rcx, [rbp+var_38] loc_2D5A0: mov edx, eax shr edx, 1Fh test eax, eax cmovns r12, r13 cmovs r15, r13 mov r14, [r14+rdx*8] add r13, 8 mov rdx, rcx lea rax, null_element cmp r14, rax jnz loc_2D51A jmp short loc_2D5D4 loc_2D5CC: xor r12d, r12d xor r15d, r15d xor ecx, ecx loc_2D5D4: xor eax, eax mov edx, [rbp+var_2C] cmp edx, 7; switch 8 cases ja short def_2D5EE; jumptable 000000000002D5EE default case, case 5 mov edx, edx lea rsi, jpt_2D5EE movsxd rdx, ds:(jpt_2D5EE - 66F0Ch)[rsi+rdx*4] add rdx, rsi jmp rdx; switch jump loc_2D5F0: mov r12, rcx; jumptable 000000000002D5EE cases 0,6 jmp short loc_2D608; jumptable 000000000002D5EE case 3 loc_2D5F5: test rcx, rcx; jumptable 000000000002D5EE cases 2,7 cmovnz r15, rcx loc_2D5FC: mov r12, r15; jumptable 000000000002D5EE case 4 jmp short loc_2D608; jumptable 000000000002D5EE case 3 loc_2D601: test rcx, rcx; jumptable 000000000002D5EE case 1 cmovnz r12, rcx loc_2D608: mov rax, [rbp+var_40]; jumptable 000000000002D5EE case 3 mov [rax], r12 test r12, r12 jz short loc_2D629 mov ecx, [r8+208h] mov rax, [r12] test rcx, rcx jz short loc_2D62D add rax, rcx jmp short def_2D5EE; jumptable 000000000002D5EE default case, case 5 loc_2D629: xor eax, eax jmp short def_2D5EE; jumptable 000000000002D5EE default case, case 5 loc_2D62D: mov rax, [rax+18h] def_2D5EE: add rsp, 28h; jumptable 000000000002D5EE default case, case 5 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long tree_search_key(_QWORD *a1, long long a2, _QWORD *a3, long long **a4, unsigned int a5, long long a6) { _QWORD *v6; // r8 long long v7; // r14 _QWORD *v8; // r13 _QWORD *v9; // rdx long long *v10; // r15 long long *v11; // r12 long long v12; // rsi _QWORD *v13; // rbx int v14; // eax _QWORD *v15; // rcx int v16; // edx int v17; // ecx long long result; // rax long long v19; // rax _QWORD *v23; // [rsp+18h] [rbp-38h] v6 = a1; v7 = *a1; *a3 = &null_element; if ( (_UNKNOWN *)v7 != &null_element ) { v8 = a3 + 1; v9 = 0LL; v10 = 0LL; v11 = 0LL; while ( 1 ) { *v8 = v7; v23 = v9; if ( *((_DWORD *)v6 + 130) ) v12 = v7 + *((unsigned int *)v6 + 130); else v12 = *(_QWORD *)(v7 + 24); v13 = v6; v14 = ((long long ( *)(long long, long long, long long))v6[69])(a6, v12, a2); if ( v14 ) { v15 = v23; v6 = v13; } else { if ( a5 > 7 ) return 0LL; v6 = v13; v14 = 1; v16 = 23; v15 = v8; if ( !_bittest(&v16, a5) ) { v17 = 192; if ( _bittest(&v17, a5) ) { v14 = -1; v15 = v8; } else { if ( a5 != 3 ) return 0LL; v14 = -1; v15 = v23; } } } if ( v14 < 0 ) v10 = v8; else v11 = v8; v7 = *(_QWORD *)(v7 + 8LL * ((unsigned int)v14 >> 31)); ++v8; v9 = v15; if ( (_UNKNOWN *)v7 == &null_element ) goto LABEL_20; } } v11 = 0LL; v10 = 0LL; v15 = 0LL; LABEL_20: result = 0LL; switch ( a5 ) { case 0u: case 6u: v11 = v15; goto LABEL_27; case 1u: if ( v15 ) v11 = v15; goto LABEL_27; case 2u: case 7u: if ( v15 ) v10 = v15; goto LABEL_24; case 3u: goto LABEL_27; case 4u: LABEL_24: v11 = v10; LABEL_27: *a4 = v11; if ( !v11 ) return 0LL; v19 = *v11; if ( *((_DWORD *)v6 + 130) ) result = *((unsigned int *)v6 + 130) + v19; else result = *(_QWORD *)(v19 + 24); break; default: return result; } return result; }
tree_search_key: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV qword ptr [RBP + -0x50],R9 MOV dword ptr [RBP + -0x2c],R8D MOV qword ptr [RBP + -0x40],RCX MOV qword ptr [RBP + -0x48],RSI MOV R8,RDI MOV R14,qword ptr [RDI] LEA RAX,[0x3f6458] MOV qword ptr [RDX],RAX CMP R14,RAX JZ 0x0012d5cc MOV R13,RDX ADD R13,0x8 XOR EDX,EDX XOR R15D,R15D XOR R12D,R12D LAB_0012d51a: MOV qword ptr [R13],R14 MOV ESI,dword ptr [R8 + 0x208] TEST RSI,RSI MOV qword ptr [RBP + -0x38],RDX JZ 0x0012d533 ADD RSI,R14 JMP 0x0012d537 LAB_0012d533: MOV RSI,qword ptr [R14 + 0x18] LAB_0012d537: MOV RDI,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x48] MOV RBX,R8 CALL qword ptr [R8 + 0x228] TEST EAX,EAX JZ 0x0012d556 MOV RCX,qword ptr [RBP + -0x38] MOV R8,RBX JMP 0x0012d5a0 LAB_0012d556: MOV ECX,dword ptr [RBP + -0x2c] CMP ECX,0x7 JA 0x0012d629 MOV R8,RBX MOV EAX,0x1 MOV EDX,0x17 BT EDX,ECX MOV RCX,R13 JC 0x0012d5a0 MOV EAX,dword ptr [RBP + -0x2c] MOV ECX,0xc0 BT ECX,EAX JNC 0x0012d58e MOV EAX,0xffffffff MOV RCX,R13 JMP 0x0012d5a0 LAB_0012d58e: CMP EAX,0x3 JNZ 0x0012d629 MOV EAX,0xffffffff MOV RCX,qword ptr [RBP + -0x38] LAB_0012d5a0: MOV EDX,EAX SHR EDX,0x1f TEST EAX,EAX CMOVNS R12,R13 CMOVS R15,R13 MOV R14,qword ptr [R14 + RDX*0x8] ADD R13,0x8 MOV RDX,RCX LEA RAX,[0x3f6458] CMP R14,RAX JNZ 0x0012d51a JMP 0x0012d5d4 LAB_0012d5cc: XOR R12D,R12D XOR R15D,R15D XOR ECX,ECX LAB_0012d5d4: XOR EAX,EAX MOV EDX,dword ptr [RBP + -0x2c] CMP EDX,0x7 JA 0x0012d631 MOV EDX,EDX LEA RSI,[0x166f0c] MOVSXD RDX,dword ptr [RSI + RDX*0x4] ADD RDX,RSI switchD: JMP RDX caseD_0: MOV R12,RCX JMP 0x0012d608 caseD_2: TEST RCX,RCX CMOVNZ R15,RCX caseD_4: MOV R12,R15 JMP 0x0012d608 caseD_1: TEST RCX,RCX CMOVNZ R12,RCX caseD_3: MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RAX],R12 TEST R12,R12 JZ 0x0012d629 MOV ECX,dword ptr [R8 + 0x208] MOV RAX,qword ptr [R12] TEST RCX,RCX JZ 0x0012d62d ADD RAX,RCX JMP 0x0012d631 LAB_0012d629: XOR EAX,EAX JMP 0x0012d631 LAB_0012d62d: MOV RAX,qword ptr [RAX + 0x18] caseD_5: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long tree_search_key(long *param_1,int8 param_2,int8 *param_3,int8 *param_4, uint param_5,int8 param_6) { uint uVar1; long lVar2; long *plVar3; long *plVar4; int1 *puVar5; long *plVar6; long *plVar7; int1 *puVar8; long *plVar9; puVar8 = (int1 *)*param_1; *param_3 = null_element; if (puVar8 == null_element) { plVar6 = (long *)0x0; plVar9 = (long *)0x0; plVar3 = (long *)0x0; } else { plVar7 = param_3 + 1; plVar9 = (long *)0x0; plVar6 = (long *)0x0; plVar4 = (long *)0x0; do { *plVar7 = (long)puVar8; if ((ulong)*(uint *)(param_1 + 0x41) == 0) { puVar5 = *(int1 **)(puVar8 + 0x18); } else { puVar5 = puVar8 + *(uint *)(param_1 + 0x41); } uVar1 = (*(code *)param_1[0x45])(param_6,puVar5,param_2); plVar3 = plVar4; if (uVar1 == 0) { if (7 < param_5) goto LAB_0012d629; uVar1 = 1; plVar3 = plVar7; if ((0x17U >> (param_5 & 0x1f) & 1) == 0) { if ((0xc0U >> (param_5 & 0x1f) & 1) == 0) { if (param_5 != 3) goto LAB_0012d629; uVar1 = 0xffffffff; plVar3 = plVar4; } else { uVar1 = 0xffffffff; } } } plVar4 = plVar7; if ((int)uVar1 < 0) { plVar9 = plVar7; plVar4 = plVar6; } plVar6 = plVar4; puVar8 = *(int1 **)(puVar8 + (ulong)(uVar1 >> 0x1f) * 8); plVar7 = plVar7 + 1; plVar4 = plVar3; } while (puVar8 != null_element); } lVar2 = 0; switch(param_5) { case 0: case 6: plVar6 = plVar3; break; case 1: if (plVar3 != (long *)0x0) { plVar6 = plVar3; } break; case 2: case 7: if (plVar3 != (long *)0x0) { plVar9 = plVar3; } case 4: plVar6 = plVar9; break; case 3: break; default: goto switchD_0012d5ee_caseD_5; } *param_4 = plVar6; if (plVar6 == (long *)0x0) { LAB_0012d629: lVar2 = 0; } else if ((ulong)*(uint *)(param_1 + 0x41) == 0) { lVar2 = *(long *)(*plVar6 + 0x18); } else { lVar2 = *plVar6 + (ulong)*(uint *)(param_1 + 0x41); } switchD_0012d5ee_caseD_5: return lVar2; }
29,579
ulight::css::(anonymous namespace)::Highlighter::consume_numeric_token()
ulight/src/main/cpp/css.cpp
void consume_numeric_token() { // https://www.w3.org/TR/css-syntax-3/#consume-numeric-token consume_number(); if (starts_with_ident_sequence(remainder)) { consume_ident_like_token(Highlight_Type::number_decor); } else if (remainder.starts_with(u8'%')) { emit_and_advance(1, Highlight_Type::number_decor); } }
O0
cpp
ulight::css::(anonymous namespace)::Highlighter::consume_numeric_token(): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x20(%rbp) callq 0xfa40 movq -0x20(%rbp), %rax movq 0x8(%rax), %rcx movq %rcx, -0x18(%rbp) movq 0x10(%rax), %rax movq %rax, -0x10(%rbp) movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0xe170 testb $0x1, %al jne 0xf760 jmp 0xf770 movq -0x20(%rbp), %rdi movl $0x18, %esi callq 0xf490 jmp 0xf79f movq -0x20(%rbp), %rdi addq $0x8, %rdi movl $0x25, %esi callq 0xb7b0 testb $0x1, %al jne 0xf788 jmp 0xf79d movq -0x20(%rbp), %rdi movl $0x1, %esi movl $0x18, %edx xorl %ecx, %ecx callq 0xf430 jmp 0xf79f addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN6ulight3css12_GLOBAL__N_111Highlighter21consume_numeric_tokenEv: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rdi, [rbp+var_8]; this mov [rbp+var_20], rdi call _ZN6ulight3css12_GLOBAL__N_111Highlighter14consume_numberEv; ulight::css::`anonymous namespace'::Highlighter::consume_number(void) mov rax, [rbp+var_20] mov rcx, [rax+8] mov [rbp+var_18], rcx mov rax, [rax+10h] mov [rbp+var_10], rax mov rdi, [rbp+var_18] mov rsi, [rbp+var_10] call _ZN6ulight3css26starts_with_ident_sequenceESt17basic_string_viewIDuSt11char_traitsIDuEE; ulight::css::starts_with_ident_sequence(std::u8string_view) test al, 1 jnz short loc_F760 jmp short loc_F770 loc_F760: mov rdi, [rbp+var_20] mov esi, 18h call _ZN6ulight3css12_GLOBAL__N_111Highlighter24consume_ident_like_tokenENS_14Highlight_TypeE; ulight::css::`anonymous namespace'::Highlighter::consume_ident_like_token(ulight::Highlight_Type) jmp short loc_F79F loc_F770: mov rdi, [rbp+var_20] add rdi, 8 mov esi, 25h ; '%' call _ZNKSt17basic_string_viewIDuSt11char_traitsIDuEE11starts_withEDu; std::u8string_view::starts_with(char8_t) test al, 1 jnz short loc_F788 jmp short loc_F79D loc_F788: mov rdi, [rbp+var_20] mov esi, 1 mov edx, 18h xor ecx, ecx call _ZN6ulight3css12_GLOBAL__N_111Highlighter16emit_and_advanceEmNS_14Highlight_TypeENS1_10CoalescingE; ulight::css::`anonymous namespace'::Highlighter::emit_and_advance(ulong,ulight::Highlight_Type,ulight::css::`anonymous namespace'::Coalescing) loc_F79D: jmp short $+2 loc_F79F: add rsp, 20h pop rbp retn
char ulight::css::`anonymous namespace'::Highlighter::consume_numeric_token( ulight::css::_anonymous_namespace_::Highlighter *this) { char result; // al ulight::css::`anonymous namespace'::Highlighter::consume_number(this); if ( (ulight::css::starts_with_ident_sequence(*((_QWORD *)this + 1), *((_QWORD *)this + 2)) & 1) != 0 ) return ulight::css::`anonymous namespace'::Highlighter::consume_ident_like_token(this, 24); result = std::u8string_view::starts_with((long long)this + 8, 0x25u); if ( (result & 1) != 0 ) return ulight::css::`anonymous namespace'::Highlighter::emit_and_advance(this, 1uLL, 0x18u, 0); return result; }
consume_numeric_token: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x20],RDI CALL 0x0010fa40 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x18],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x10],RAX MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x10] CALL 0x0010e170 TEST AL,0x1 JNZ 0x0010f760 JMP 0x0010f770 LAB_0010f760: MOV RDI,qword ptr [RBP + -0x20] MOV ESI,0x18 CALL 0x0010f490 JMP 0x0010f79f LAB_0010f770: MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x8 MOV ESI,0x25 CALL 0x0010b7b0 TEST AL,0x1 JNZ 0x0010f788 JMP 0x0010f79d LAB_0010f788: MOV RDI,qword ptr [RBP + -0x20] MOV ESI,0x1 MOV EDX,0x18 XOR ECX,ECX CALL 0x0010f430 LAB_0010f79d: JMP 0x0010f79f LAB_0010f79f: ADD RSP,0x20 POP RBP RET
/* ulight::css::(anonymous namespace)::Highlighter::consume_numeric_token() */ void __thiscall ulight::css::(anonymous_namespace)::Highlighter::consume_numeric_token(Highlighter *this) { ulong uVar1; consume_number(this); uVar1 = starts_with_ident_sequence(*(css **)(this + 8),*(int8 *)(this + 0x10)); if ((uVar1 & 1) == 0) { uVar1 = std::basic_string_view<char8_t,std::char_traits<char8_t>>::starts_with ((basic_string_view<char8_t,std::char_traits<char8_t>> *)(this + 8),'%'); if ((uVar1 & 1) != 0) { emit_and_advance(this,1,0x18,0); } } else { consume_ident_like_token(this,0x18); } return; }
29,580
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(int, OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
void GregoryTriConverter<REAL>::assignRegularFacePoints(int cIndex, Matrix & matrix) const { CornerTopology const & corner = _corners[cIndex]; int cNext = (cIndex+1) % 3; int cPrev = (cIndex+2) % 3; int const * cRing = corner.ringPoints; // // Regular face-points are computed the same for both face-points of a // a corner (fp and fm), so iterate through both and make appropriate // assignments when tagged as regular: // for (int fIsFm = 0; fIsFm < 2; ++fIsFm) { bool fIsRegular = fIsFm ? corner.fmIsRegular : corner.fpIsRegular; if (!fIsRegular) continue; Point f(matrix, 5*cIndex + 3 + fIsFm); if (corner.isCorner) { f.Assign(0, cIndex, 0.5f); f.Assign(1, cNext, 0.25f); f.Assign(2, cPrev, 0.25f); assert(f.GetSize() == 3); } else if (corner.epOnBoundary) { // Face is the first/leading face of the boundary ring: f.Assign(0, cIndex, (REAL) (11.0 / 24.0)); f.Assign(1, cRing[0], (REAL) ( 7.0 / 24.0)); f.Assign(2, cRing[1], (REAL) ( 5.0 / 24.0)); f.Assign(3, cRing[2], (REAL) ( 1.0 / 24.0)); assert(f.GetSize() == 4); } else if (corner.emOnBoundary) { // Face is the last/trailing face of the boundary ring: f.Assign(0, cIndex, (REAL) (11.0 / 24.0)); f.Assign(1, cRing[3], (REAL) ( 7.0 / 24.0)); f.Assign(2, cRing[2], (REAL) ( 5.0 / 24.0)); f.Assign(3, cRing[1], (REAL) ( 1.0 / 24.0)); assert(f.GetSize() == 4); } else { // Face is interior or the middle face of the boundary: int eNext = corner.isBoundary ? 0 : ((corner.faceInRing + 5) % 6); int ePrev = corner.isBoundary ? 3 : ((corner.faceInRing + 2) % 6); f.Assign(0, cIndex, (REAL) (10.0 / 24.0)); f.Assign(1, cPrev, 0.25f); f.Assign(2, cNext, 0.25f); f.Assign(3, cRing[ePrev], (REAL) ( 1.0 / 24.0)); f.Assign(4, cRing[eNext], (REAL) ( 1.0 / 24.0)); assert(f.GetSize() == 5); } } }
O0
cpp
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(int, OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&) const: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax addq $0x18, %rax movslq -0xc(%rbp), %rcx imulq $0xb0, %rcx, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) movl -0xc(%rbp), %eax addl $0x1, %eax movl $0x3, %ecx cltd idivl %ecx movl %edx, -0x24(%rbp) movl -0xc(%rbp), %eax addl $0x2, %eax movl $0x3, %ecx cltd idivl %ecx movl %edx, -0x28(%rbp) movq -0x20(%rbp), %rdi addq $0x20, %rdi callq 0xcf290 movq %rax, -0x30(%rbp) movl $0x0, -0x34(%rbp) cmpl $0x2, -0x34(%rbp) jge 0x127b89 cmpl $0x0, -0x34(%rbp) je 0x1277fe movq -0x20(%rbp), %rax movw (%rax), %ax shrw $0x9, %ax andw $0x1, %ax movzwl %ax, %eax movl %eax, -0x5c(%rbp) jmp 0x127813 movq -0x20(%rbp), %rax movw (%rax), %ax shrw $0x8, %ax andw $0x1, %ax movzwl %ax, %eax movl %eax, -0x5c(%rbp) movl -0x5c(%rbp), %eax cmpl $0x0, %eax setne %al andb $0x1, %al movb %al, -0x35(%rbp) testb $0x1, -0x35(%rbp) jne 0x12782c jmp 0x127b7b movq -0x18(%rbp), %rsi imull $0x5, -0xc(%rbp), %edx addl $0x3, %edx addl -0x34(%rbp), %edx leaq -0x50(%rbp), %rdi callq 0x11c780 movq -0x20(%rbp), %rax movw (%rax), %ax shrw $0x5, %ax andw $0x1, %ax movzwl %ax, %eax cmpl $0x0, %eax je 0x1278d6 movl -0xc(%rbp), %edx leaq -0x50(%rbp), %rdi xorl %esi, %esi movsd 0xc4d3d(%rip), %xmm0 # 0x1ec5a8 callq 0x11c820 movl -0x24(%rbp), %edx leaq -0x50(%rbp), %rdi movl $0x1, %esi movsd 0xc678c(%rip), %xmm0 # 0x1ee010 callq 0x11c820 movl -0x28(%rbp), %edx leaq -0x50(%rbp), %rdi movl $0x2, %esi movsd 0xc6773(%rip), %xmm0 # 0x1ee010 callq 0x11c820 leaq -0x50(%rbp), %rdi callq 0x11c860 cmpl $0x3, %eax jne 0x1278b2 jmp 0x1278d1 leaq 0xc7577(%rip), %rdi # 0x1eee30 leaq 0xc71d8(%rip), %rsi # 0x1eea98 movl $0x56b, %edx # imm = 0x56B leaq 0xc7c77(%rip), %rcx # 0x1ef543 callq 0xc9440 jmp 0x127b79 movq -0x20(%rbp), %rax movw (%rax), %ax shrw $0x6, %ax andw $0x1, %ax movzwl %ax, %eax cmpl $0x0, %eax je 0x127991 movl -0xc(%rbp), %edx leaq -0x50(%rbp), %rdi xorl %esi, %esi movsd 0xc679e(%rip), %xmm0 # 0x1ee0a0 callq 0x11c820 movq -0x30(%rbp), %rax movl (%rax), %edx leaq -0x50(%rbp), %rdi movl $0x1, %esi movsd 0xc677a(%rip), %xmm0 # 0x1ee098 callq 0x11c820 movq -0x30(%rbp), %rax movl 0x4(%rax), %edx leaq -0x50(%rbp), %rdi movl $0x2, %esi movsd 0xc6755(%rip), %xmm0 # 0x1ee090 callq 0x11c820 movq -0x30(%rbp), %rax movl 0x8(%rax), %edx leaq -0x50(%rbp), %rdi movl $0x3, %esi movsd 0xc6728(%rip), %xmm0 # 0x1ee080 callq 0x11c820 leaq -0x50(%rbp), %rdi callq 0x11c860 cmpl $0x4, %eax jne 0x12796d jmp 0x12798c leaq 0xc7543(%rip), %rdi # 0x1eeeb7 leaq 0xc711d(%rip), %rsi # 0x1eea98 movl $0x572, %edx # imm = 0x572 leaq 0xc7bbc(%rip), %rcx # 0x1ef543 callq 0xc9440 jmp 0x127b77 movq -0x20(%rbp), %rax movw (%rax), %ax shrw $0x7, %ax andw $0x1, %ax movzwl %ax, %eax cmpl $0x0, %eax je 0x127a4d movl -0xc(%rbp), %edx leaq -0x50(%rbp), %rdi xorl %esi, %esi movsd 0xc66e3(%rip), %xmm0 # 0x1ee0a0 callq 0x11c820 movq -0x30(%rbp), %rax movl 0xc(%rax), %edx leaq -0x50(%rbp), %rdi movl $0x1, %esi movsd 0xc66be(%rip), %xmm0 # 0x1ee098 callq 0x11c820 movq -0x30(%rbp), %rax movl 0x8(%rax), %edx leaq -0x50(%rbp), %rdi movl $0x2, %esi movsd 0xc6699(%rip), %xmm0 # 0x1ee090 callq 0x11c820 movq -0x30(%rbp), %rax movl 0x4(%rax), %edx leaq -0x50(%rbp), %rdi movl $0x3, %esi movsd 0xc666c(%rip), %xmm0 # 0x1ee080 callq 0x11c820 leaq -0x50(%rbp), %rdi callq 0x11c860 cmpl $0x4, %eax jne 0x127a29 jmp 0x127a48 leaq 0xc7487(%rip), %rdi # 0x1eeeb7 leaq 0xc7061(%rip), %rsi # 0x1eea98 movl $0x579, %edx # imm = 0x579 leaq 0xc7b00(%rip), %rcx # 0x1ef543 callq 0xc9440 jmp 0x127b75 movq -0x20(%rbp), %rax movw (%rax), %ax andw $0x1, %ax movzwl %ax, %eax cmpl $0x0, %eax je 0x127a67 xorl %edx, %edx movl %edx, -0x60(%rbp) jmp 0x127a7c movq -0x20(%rbp), %rax movl 0xc(%rax), %eax addl $0x5, %eax movl $0x6, %ecx cltd idivl %ecx movl %edx, -0x60(%rbp) movl -0x60(%rbp), %eax movl %eax, -0x54(%rbp) movq -0x20(%rbp), %rax movw (%rax), %ax andw $0x1, %ax movzwl %ax, %eax cmpl $0x0, %eax je 0x127a9f movl $0x3, %edx movl %edx, -0x64(%rbp) jmp 0x127ab4 movq -0x20(%rbp), %rax movl 0xc(%rax), %eax addl $0x2, %eax movl $0x6, %ecx cltd idivl %ecx movl %edx, -0x64(%rbp) movl -0x64(%rbp), %eax movl %eax, -0x58(%rbp) movl -0xc(%rbp), %edx leaq -0x50(%rbp), %rdi xorl %esi, %esi movsd 0xc65bd(%rip), %xmm0 # 0x1ee088 callq 0x11c820 movl -0x28(%rbp), %edx leaq -0x50(%rbp), %rdi movl $0x1, %esi movsd 0xc652c(%rip), %xmm0 # 0x1ee010 callq 0x11c820 movl -0x24(%rbp), %edx leaq -0x50(%rbp), %rdi movl $0x2, %esi movsd 0xc6513(%rip), %xmm0 # 0x1ee010 callq 0x11c820 movq -0x30(%rbp), %rax movslq -0x58(%rbp), %rcx movl (%rax,%rcx,4), %edx leaq -0x50(%rbp), %rdi movl $0x3, %esi movsd 0xc6562(%rip), %xmm0 # 0x1ee080 callq 0x11c820 movq -0x30(%rbp), %rax movslq -0x54(%rbp), %rcx movl (%rax,%rcx,4), %edx leaq -0x50(%rbp), %rdi movl $0x4, %esi movsd 0xc6541(%rip), %xmm0 # 0x1ee080 callq 0x11c820 leaq -0x50(%rbp), %rdi callq 0x11c860 cmpl $0x5, %eax jne 0x127b54 jmp 0x127b73 leaq 0xc736d(%rip), %rdi # 0x1eeec8 leaq 0xc6f36(%rip), %rsi # 0x1eea98 movl $0x584, %edx # imm = 0x584 leaq 0xc79d5(%rip), %rcx # 0x1ef543 callq 0xc9440 jmp 0x127b75 jmp 0x127b77 jmp 0x127b79 jmp 0x127b7b movl -0x34(%rbp), %eax addl $0x1, %eax movl %eax, -0x34(%rbp) jmp 0x1277d7 addq $0x70, %rsp popq %rbp retq nop
_ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE23assignRegularFacePointsEiRNS1_12SparseMatrixIdEE: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov rax, [rbp+var_8] add rax, 18h movsxd rcx, [rbp+var_C] imul rcx, 0B0h add rax, rcx mov [rbp+var_20], rax mov eax, [rbp+var_C] add eax, 1 mov ecx, 3 cdq idiv ecx mov [rbp+var_24], edx mov eax, [rbp+var_C] add eax, 2 mov ecx, 3 cdq idiv ecx mov [rbp+var_28], edx mov rdi, [rbp+var_20] add rdi, 20h ; ' ' call __ZNK10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIiLj30ELb1EEcvPKiEv; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,30u,true>::operator int const*(void) mov [rbp+var_30], rax mov [rbp+var_34], 0 loc_1277D7: cmp [rbp+var_34], 2 jge loc_127B89 cmp [rbp+var_34], 0 jz short loc_1277FE mov rax, [rbp+var_20] mov ax, [rax] shr ax, 9 and ax, 1 movzx eax, ax mov [rbp+var_5C], eax jmp short loc_127813 loc_1277FE: mov rax, [rbp+var_20] mov ax, [rax] shr ax, 8 and ax, 1 movzx eax, ax mov [rbp+var_5C], eax loc_127813: mov eax, [rbp+var_5C] cmp eax, 0 setnz al and al, 1 mov [rbp+var_35], al test [rbp+var_35], 1 jnz short loc_12782C jmp loc_127B7B loc_12782C: mov rsi, [rbp+var_18] imul edx, [rbp+var_C], 5 add edx, 3 add edx, [rbp+var_34] lea rdi, [rbp+var_50] call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdEC2ERNS1_12SparseMatrixIdEEi_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::SparseMatrixRow(OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &,int) mov rax, [rbp+var_20] mov ax, [rax] shr ax, 5 and ax, 1 movzx eax, ax cmp eax, 0 jz short loc_1278D6 mov edx, [rbp+var_C] lea rdi, [rbp+var_50] xor esi, esi movsd xmm0, cs:qword_1EC5A8 call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE6AssignEiid_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign(int,int,double) mov edx, [rbp+var_24] lea rdi, [rbp+var_50] mov esi, 1 movsd xmm0, cs:qword_1EE010 call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE6AssignEiid_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign(int,int,double) mov edx, [rbp+var_28] lea rdi, [rbp+var_50] mov esi, 2 movsd xmm0, cs:qword_1EE010 call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE6AssignEiid_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign(int,int,double) lea rdi, [rbp+var_50] call _ZNK10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE7GetSizeEv_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::GetSize(void) cmp eax, 3 jnz short loc_1278B2 jmp short loc_1278D1 loc_1278B2: lea rdi, aFGetsize3; "f.GetSize() == 3" lea rsi, aWorkspaceLlm4b_10; "/workspace/llm4binary/github/2025_star3"... mov edx, 56Bh lea rcx, aVoidOpensubdiv_54; "void OpenSubdiv::v3_6_0::Far::GregoryTr"... call ___assert_fail loc_1278D1: jmp loc_127B79 loc_1278D6: mov rax, [rbp+var_20] mov ax, [rax] shr ax, 6 and ax, 1 movzx eax, ax cmp eax, 0 jz loc_127991 mov edx, [rbp+var_C] lea rdi, [rbp+var_50] xor esi, esi movsd xmm0, cs:qword_1EE0A0 call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE6AssignEiid_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign(int,int,double) mov rax, [rbp+var_30] mov edx, [rax] lea rdi, [rbp+var_50] mov esi, 1 movsd xmm0, cs:qword_1EE098 call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE6AssignEiid_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign(int,int,double) mov rax, [rbp+var_30] mov edx, [rax+4] lea rdi, [rbp+var_50] mov esi, 2 movsd xmm0, cs:qword_1EE090 call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE6AssignEiid_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign(int,int,double) mov rax, [rbp+var_30] mov edx, [rax+8] lea rdi, [rbp+var_50] mov esi, 3 movsd xmm0, cs:qword_1EE080 call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE6AssignEiid_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign(int,int,double) lea rdi, [rbp+var_50] call _ZNK10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE7GetSizeEv_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::GetSize(void) cmp eax, 4 jnz short loc_12796D jmp short loc_12798C loc_12796D: lea rdi, aFGetsize4; "f.GetSize() == 4" lea rsi, aWorkspaceLlm4b_10; "/workspace/llm4binary/github/2025_star3"... mov edx, 572h lea rcx, aVoidOpensubdiv_54; "void OpenSubdiv::v3_6_0::Far::GregoryTr"... call ___assert_fail loc_12798C: jmp loc_127B77 loc_127991: mov rax, [rbp+var_20] mov ax, [rax] shr ax, 7 and ax, 1 movzx eax, ax cmp eax, 0 jz loc_127A4D mov edx, [rbp+var_C] lea rdi, [rbp+var_50] xor esi, esi movsd xmm0, cs:qword_1EE0A0 call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE6AssignEiid_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign(int,int,double) mov rax, [rbp+var_30] mov edx, [rax+0Ch] lea rdi, [rbp+var_50] mov esi, 1 movsd xmm0, cs:qword_1EE098 call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE6AssignEiid_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign(int,int,double) mov rax, [rbp+var_30] mov edx, [rax+8] lea rdi, [rbp+var_50] mov esi, 2 movsd xmm0, cs:qword_1EE090 call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE6AssignEiid_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign(int,int,double) mov rax, [rbp+var_30] mov edx, [rax+4] lea rdi, [rbp+var_50] mov esi, 3 movsd xmm0, cs:qword_1EE080 call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE6AssignEiid_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign(int,int,double) lea rdi, [rbp+var_50] call _ZNK10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE7GetSizeEv_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::GetSize(void) cmp eax, 4 jnz short loc_127A29 jmp short loc_127A48 loc_127A29: lea rdi, aFGetsize4; "f.GetSize() == 4" lea rsi, aWorkspaceLlm4b_10; "/workspace/llm4binary/github/2025_star3"... mov edx, 579h lea rcx, aVoidOpensubdiv_54; "void OpenSubdiv::v3_6_0::Far::GregoryTr"... call ___assert_fail loc_127A48: jmp loc_127B75 loc_127A4D: mov rax, [rbp+var_20] mov ax, [rax] and ax, 1 movzx eax, ax cmp eax, 0 jz short loc_127A67 xor edx, edx mov [rbp+var_60], edx jmp short loc_127A7C loc_127A67: mov rax, [rbp+var_20] mov eax, [rax+0Ch] add eax, 5 mov ecx, 6 cdq idiv ecx mov [rbp+var_60], edx loc_127A7C: mov eax, [rbp+var_60] mov [rbp+var_54], eax mov rax, [rbp+var_20] mov ax, [rax] and ax, 1 movzx eax, ax cmp eax, 0 jz short loc_127A9F mov edx, 3 mov [rbp+var_64], edx jmp short loc_127AB4 loc_127A9F: mov rax, [rbp+var_20] mov eax, [rax+0Ch] add eax, 2 mov ecx, 6 cdq idiv ecx mov [rbp+var_64], edx loc_127AB4: mov eax, [rbp+var_64] mov [rbp+var_58], eax mov edx, [rbp+var_C] lea rdi, [rbp+var_50] xor esi, esi movsd xmm0, cs:qword_1EE088 call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE6AssignEiid_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign(int,int,double) mov edx, [rbp+var_28] lea rdi, [rbp+var_50] mov esi, 1 movsd xmm0, cs:qword_1EE010 call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE6AssignEiid_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign(int,int,double) mov edx, [rbp+var_24] lea rdi, [rbp+var_50] mov esi, 2 movsd xmm0, cs:qword_1EE010 call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE6AssignEiid_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign(int,int,double) mov rax, [rbp+var_30] movsxd rcx, [rbp+var_58] mov edx, [rax+rcx*4] lea rdi, [rbp+var_50] mov esi, 3 movsd xmm0, cs:qword_1EE080 call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE6AssignEiid_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign(int,int,double) mov rax, [rbp+var_30] movsxd rcx, [rbp+var_54] mov edx, [rax+rcx*4] lea rdi, [rbp+var_50] mov esi, 4 movsd xmm0, cs:qword_1EE080 call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE6AssignEiid_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign(int,int,double) lea rdi, [rbp+var_50] call _ZNK10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE7GetSizeEv_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::GetSize(void) cmp eax, 5 jnz short loc_127B54 jmp short loc_127B73 loc_127B54: lea rdi, aFGetsize5; "f.GetSize() == 5" lea rsi, aWorkspaceLlm4b_10; "/workspace/llm4binary/github/2025_star3"... mov edx, 584h lea rcx, aVoidOpensubdiv_54; "void OpenSubdiv::v3_6_0::Far::GregoryTr"... call ___assert_fail loc_127B73: jmp short $+2 loc_127B75: jmp short $+2 loc_127B77: jmp short $+2 loc_127B79: jmp short $+2 loc_127B7B: mov eax, [rbp+var_34] add eax, 1 mov [rbp+var_34], eax jmp loc_1277D7 loc_127B89: add rsp, 70h pop rbp retn
long long OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints( long long a1, int a2, long long a3) { long long result; // rax int v4; // [rsp+Ch] [rbp-64h] int v5; // [rsp+10h] [rbp-60h] int v6; // [rsp+14h] [rbp-5Ch] unsigned int v7[6]; // [rsp+20h] [rbp-50h] BYREF bool v8; // [rsp+3Bh] [rbp-35h] int i; // [rsp+3Ch] [rbp-34h] int *v10; // [rsp+40h] [rbp-30h] int v11; // [rsp+48h] [rbp-28h] int v12; // [rsp+4Ch] [rbp-24h] long long v13; // [rsp+50h] [rbp-20h] long long v14; // [rsp+58h] [rbp-18h] int v15; // [rsp+64h] [rbp-Ch] long long v16; // [rsp+68h] [rbp-8h] v16 = a1; v15 = a2; v14 = a3; v13 = 176LL * a2 + a1 + 24; v12 = (a2 + 1) % 3; v11 = (a2 + 2) % 3; result = OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,30u,true>::operator int const*(v13 + 32); v10 = (int *)result; for ( i = 0; i < 2; ++i ) { if ( i ) v6 = (*(_WORD *)v13 >> 9) & 1; else v6 = HIBYTE(*(_WORD *)v13) & 1; v8 = v6 != 0; if ( v6 ) { OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::SparseMatrixRow( (long long)v7, v14, i + 5 * v15 + 3); if ( ((*(_WORD *)v13 >> 5) & 1) != 0 ) { OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign((long long)v7, 0, v15, 0.5); OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign((long long)v7, 1, v12, 0.25); OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign((long long)v7, 2, v11, 0.25); if ( (unsigned int)OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::GetSize(v7) != 3 ) __assert_fail( "f.GetSize() == 3", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1387LL, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(int, Matrix &) const [REAL = double]"); } else if ( ((*(_WORD *)v13 >> 6) & 1) != 0 ) { OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign( (long long)v7, 0, v15, 0.4583333333333333); OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign( (long long)v7, 1, *v10, 0.2916666666666667); OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign( (long long)v7, 2, v10[1], 0.2083333333333333); OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign( (long long)v7, 3, v10[2], 0.04166666666666666); if ( (unsigned int)OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::GetSize(v7) != 4 ) __assert_fail( "f.GetSize() == 4", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1394LL, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(int, Matrix &) const [REAL = double]"); } else if ( ((*(_WORD *)v13 >> 7) & 1) != 0 ) { OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign( (long long)v7, 0, v15, 0.4583333333333333); OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign( (long long)v7, 1, v10[3], 0.2916666666666667); OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign( (long long)v7, 2, v10[2], 0.2083333333333333); OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign( (long long)v7, 3, v10[1], 0.04166666666666666); if ( (unsigned int)OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::GetSize(v7) != 4 ) __assert_fail( "f.GetSize() == 4", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1401LL, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(int, Matrix &) const [REAL = double]"); } else { if ( (*(_WORD *)v13 & 1) != 0 ) v5 = 0; else v5 = (*(_DWORD *)(v13 + 12) + 5) % 6; if ( (*(_WORD *)v13 & 1) != 0 ) v4 = 3; else v4 = (*(_DWORD *)(v13 + 12) + 2) % 6; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign( (long long)v7, 0, v15, 0.4166666666666667); OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign((long long)v7, 1, v11, 0.25); OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign((long long)v7, 2, v12, 0.25); OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign( (long long)v7, 3, v10[v4], 0.04166666666666666); OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Assign( (long long)v7, 4, v10[v5], 0.04166666666666666); if ( (unsigned int)OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::GetSize(v7) != 5 ) __assert_fail( "f.GetSize() == 5", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1412LL, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(int, Matrix &) const [REAL = double]"); } } result = (unsigned int)(i + 1); } return result; }
29,581
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(int, OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
void GregoryTriConverter<REAL>::assignRegularFacePoints(int cIndex, Matrix & matrix) const { CornerTopology const & corner = _corners[cIndex]; int cNext = (cIndex+1) % 3; int cPrev = (cIndex+2) % 3; int const * cRing = corner.ringPoints; // // Regular face-points are computed the same for both face-points of a // a corner (fp and fm), so iterate through both and make appropriate // assignments when tagged as regular: // for (int fIsFm = 0; fIsFm < 2; ++fIsFm) { bool fIsRegular = fIsFm ? corner.fmIsRegular : corner.fpIsRegular; if (!fIsRegular) continue; Point f(matrix, 5*cIndex + 3 + fIsFm); if (corner.isCorner) { f.Assign(0, cIndex, 0.5f); f.Assign(1, cNext, 0.25f); f.Assign(2, cPrev, 0.25f); assert(f.GetSize() == 3); } else if (corner.epOnBoundary) { // Face is the first/leading face of the boundary ring: f.Assign(0, cIndex, (REAL) (11.0 / 24.0)); f.Assign(1, cRing[0], (REAL) ( 7.0 / 24.0)); f.Assign(2, cRing[1], (REAL) ( 5.0 / 24.0)); f.Assign(3, cRing[2], (REAL) ( 1.0 / 24.0)); assert(f.GetSize() == 4); } else if (corner.emOnBoundary) { // Face is the last/trailing face of the boundary ring: f.Assign(0, cIndex, (REAL) (11.0 / 24.0)); f.Assign(1, cRing[3], (REAL) ( 7.0 / 24.0)); f.Assign(2, cRing[2], (REAL) ( 5.0 / 24.0)); f.Assign(3, cRing[1], (REAL) ( 1.0 / 24.0)); assert(f.GetSize() == 4); } else { // Face is interior or the middle face of the boundary: int eNext = corner.isBoundary ? 0 : ((corner.faceInRing + 5) % 6); int ePrev = corner.isBoundary ? 3 : ((corner.faceInRing + 2) % 6); f.Assign(0, cIndex, (REAL) (10.0 / 24.0)); f.Assign(1, cPrev, 0.25f); f.Assign(2, cNext, 0.25f); f.Assign(3, cRing[ePrev], (REAL) ( 1.0 / 24.0)); f.Assign(4, cRing[eNext], (REAL) ( 1.0 / 24.0)); assert(f.GetSize() == 5); } } }
O1
cpp
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(int, OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movslq %esi, %r9 imulq $0xb0, %r9, %rax addq %rdi, %rax addq $0x18, %rax leal 0x1(%r9), %ecx movslq %ecx, %rcx imulq $0x55555556, %rcx, %rcx # imm = 0x55555556 movq %rcx, %rdi shrq $0x3f, %rdi shrq $0x20, %rcx addl %edi, %ecx leal (%rcx,%rcx,2), %ecx negl %ecx addl %r9d, %ecx incl %ecx movl %r9d, %edi addl $0x2, %edi movslq %edi, %rdi imulq $0x55555556, %rdi, %rdi # imm = 0x55555556 movq %rdi, %r8 shrq $0x3f, %r8 shrq $0x20, %rdi addl %r8d, %edi leal (%rdi,%rdi,2), %edi negl %edi addl %r9d, %edi addl $0x2, %edi movq 0x20(%rax), %r8 leal (%r9,%r9,4), %r10d movq 0x10(%rdx), %r11 movq 0x28(%rdx), %r9 movq 0x40(%rdx), %rdx movslq %r10d, %r10 leaq (%r11,%r10,4), %r10 addq $0x10, %r10 xorl %r11d, %r11d movabsq $0x3fd0000000000000, %r14 # imm = 0x3FD0000000000000 movabsq $0x3fa5555555555555, %r15 # imm = 0x3FA5555555555555 movl %ecx, 0x4(%rsp) xorl %ebx, %ebx testq %r11, %r11 setne %bl shll $0x8, %ebx addl $0x100, %ebx # imm = 0x100 testw %bx, (%rax) je 0x5c131 movl (%r10,%r11,4), %r12d movslq -0x4(%r10,%r11,4), %r13 subl %r13d, %r12d movzwl (%rax), %ebp testb $0x20, %bpl jne 0x5bfad testb $0x40, %bpl jne 0x5bfe2 testb %bpl, %bpl js 0x5c040 testb $0x1, %bpl jne 0x5c09f movl 0xc(%rax), %ebx addl $0x5, %ebx movslq %ebx, %rbx imulq $0x2aaaaaab, %rbx, %r15 # imm = 0x2AAAAAAB movq %r15, %rcx shrq $0x3f, %rcx shrq $0x20, %r15 addl %ecx, %r15d addl %r15d, %r15d leal (%r15,%r15,2), %ecx subl %ecx, %ebx movl 0x4(%rsp), %ecx movslq %ebx, %rbx jmp 0x5c0a1 movl %esi, (%r9,%r13,4) movabsq $0x3fe0000000000000, %rbx # imm = 0x3FE0000000000000 movq %rbx, (%rdx,%r13,8) movl %ecx, 0x4(%r9,%r13,4) movq %r14, 0x8(%rdx,%r13,8) movl %edi, 0x8(%r9,%r13,4) movq %r14, 0x10(%rdx,%r13,8) cmpl $0x3, %r12d je 0x5c131 jmp 0x5c14d movl %esi, (%r9,%r13,4) movabsq $0x3fdd555555555555, %rbx # imm = 0x3FDD555555555555 movq %rbx, (%rdx,%r13,8) movl (%r8), %ebx movl %ebx, 0x4(%r9,%r13,4) movabsq $0x3fd2aaaaaaaaaaab, %rbx # imm = 0x3FD2AAAAAAAAAAAB movq %rbx, 0x8(%rdx,%r13,8) movl 0x4(%r8), %ebx movl %ebx, 0x8(%r9,%r13,4) movabsq $0x3fcaaaaaaaaaaaab, %rbx # imm = 0x3FCAAAAAAAAAAAAB movq %rbx, 0x10(%rdx,%r13,8) movl 0x8(%r8), %ebx movl %ebx, 0xc(%r9,%r13,4) movq %r15, 0x18(%rdx,%r13,8) cmpl $0x4, %r12d je 0x5c131 jmp 0x5c16c movl %esi, (%r9,%r13,4) movabsq $0x3fdd555555555555, %rbx # imm = 0x3FDD555555555555 movq %rbx, (%rdx,%r13,8) movl 0xc(%r8), %ebx movl %ebx, 0x4(%r9,%r13,4) movabsq $0x3fd2aaaaaaaaaaab, %rbx # imm = 0x3FD2AAAAAAAAAAAB movq %rbx, 0x8(%rdx,%r13,8) movl 0x8(%r8), %ebx movl %ebx, 0x8(%r9,%r13,4) movabsq $0x3fcaaaaaaaaaaaab, %rbx # imm = 0x3FCAAAAAAAAAAAAB movq %rbx, 0x10(%rdx,%r13,8) movl 0x4(%r8), %ebx movl %ebx, 0xc(%r9,%r13,4) movq %r15, 0x18(%rdx,%r13,8) cmpl $0x4, %r12d je 0x5c131 jmp 0x5c18b xorl %ebx, %ebx movl $0x3, %r15d testb $0x1, %bpl jne 0x5c0db movl 0xc(%rax), %ecx addl $0x2, %ecx movslq %ecx, %rcx imulq $0x2aaaaaab, %rcx, %r15 # imm = 0x2AAAAAAB movq %r15, %rbp shrq $0x3f, %rbp shrq $0x20, %r15 addl %ebp, %r15d addl %r15d, %r15d leal (%r15,%r15,2), %ebp subl %ebp, %ecx movslq %ecx, %r15 movl 0x4(%rsp), %ecx movl %esi, (%r9,%r13,4) movabsq $0x3fdaaaaaaaaaaaab, %rbp # imm = 0x3FDAAAAAAAAAAAAB movq %rbp, (%rdx,%r13,8) movl %edi, 0x4(%r9,%r13,4) movq %r14, 0x8(%rdx,%r13,8) movl %ecx, 0x8(%r9,%r13,4) movq %r14, 0x10(%rdx,%r13,8) movl (%r8,%r15,4), %ecx movl %ecx, 0xc(%r9,%r13,4) movabsq $0x3fa5555555555555, %r15 # imm = 0x3FA5555555555555 movq %r15, 0x18(%rdx,%r13,8) movl (%r8,%rbx,4), %ecx movl %ecx, 0x10(%r9,%r13,4) movl 0x4(%rsp), %ecx movq %r15, 0x20(%rdx,%r13,8) cmpl $0x5, %r12d jne 0x5c1aa incq %r11 cmpq $0x1, %r11 je 0x5bf32 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x5ab5c(%rip), %rdi # 0xb6cb0 leaq 0x5a7bd(%rip), %rsi # 0xb6918 leaq 0x5b261(%rip), %rcx # 0xb73c3 movl $0x56b, %edx # imm = 0x56B callq 0x39560 leaq 0x5abc4(%rip), %rdi # 0xb6d37 leaq 0x5a79e(%rip), %rsi # 0xb6918 leaq 0x5b242(%rip), %rcx # 0xb73c3 movl $0x572, %edx # imm = 0x572 callq 0x39560 leaq 0x5aba5(%rip), %rdi # 0xb6d37 leaq 0x5a77f(%rip), %rsi # 0xb6918 leaq 0x5b223(%rip), %rcx # 0xb73c3 movl $0x579, %edx # imm = 0x579 callq 0x39560 leaq 0x5ab97(%rip), %rdi # 0xb6d48 leaq 0x5a760(%rip), %rsi # 0xb6918 leaq 0x5b204(%rip), %rcx # 0xb73c3 movl $0x584, %edx # imm = 0x584 callq 0x39560 nop
_ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE23assignRegularFacePointsEiRNS1_12SparseMatrixIdEE: push rbp push r15 push r14 push r13 push r12 push rbx push rax movsxd r9, esi imul rax, r9, 0B0h add rax, rdi add rax, 18h lea ecx, [r9+1] movsxd rcx, ecx imul rcx, 55555556h mov rdi, rcx shr rdi, 3Fh shr rcx, 20h add ecx, edi lea ecx, [rcx+rcx*2] neg ecx add ecx, r9d inc ecx mov edi, r9d add edi, 2 movsxd rdi, edi imul rdi, 55555556h mov r8, rdi shr r8, 3Fh shr rdi, 20h add edi, r8d lea edi, [rdi+rdi*2] neg edi add edi, r9d add edi, 2 mov r8, [rax+20h] lea r10d, [r9+r9*4] mov r11, [rdx+10h] mov r9, [rdx+28h] mov rdx, [rdx+40h] movsxd r10, r10d lea r10, [r11+r10*4] add r10, 10h xor r11d, r11d mov r14, 3FD0000000000000h mov r15, 3FA5555555555555h mov [rsp+38h+var_34], ecx loc_5BF32: xor ebx, ebx test r11, r11 setnz bl shl ebx, 8 add ebx, 100h test [rax], bx jz loc_5C131 mov r12d, [r10+r11*4] movsxd r13, dword ptr [r10+r11*4-4] sub r12d, r13d movzx ebp, word ptr [rax] test bpl, 20h jnz short loc_5BFAD test bpl, 40h jnz short loc_5BFE2 test bpl, bpl js loc_5C040 test bpl, 1 jnz loc_5C09F mov ebx, [rax+0Ch] add ebx, 5 movsxd rbx, ebx imul r15, rbx, 2AAAAAABh mov rcx, r15 shr rcx, 3Fh shr r15, 20h add r15d, ecx add r15d, r15d lea ecx, [r15+r15*2] sub ebx, ecx mov ecx, [rsp+38h+var_34] movsxd rbx, ebx jmp loc_5C0A1 loc_5BFAD: mov [r9+r13*4], esi mov rbx, 3FE0000000000000h mov [rdx+r13*8], rbx mov [r9+r13*4+4], ecx mov [rdx+r13*8+8], r14 mov [r9+r13*4+8], edi mov [rdx+r13*8+10h], r14 cmp r12d, 3 jz loc_5C131 jmp loc_5C14D loc_5BFE2: mov [r9+r13*4], esi mov rbx, 3FDD555555555555h mov [rdx+r13*8], rbx mov ebx, [r8] mov [r9+r13*4+4], ebx mov rbx, 3FD2AAAAAAAAAAABh mov [rdx+r13*8+8], rbx mov ebx, [r8+4] mov [r9+r13*4+8], ebx mov rbx, 3FCAAAAAAAAAAAABh mov [rdx+r13*8+10h], rbx mov ebx, [r8+8] mov [r9+r13*4+0Ch], ebx mov [rdx+r13*8+18h], r15 cmp r12d, 4 jz loc_5C131 jmp loc_5C16C loc_5C040: mov [r9+r13*4], esi mov rbx, 3FDD555555555555h mov [rdx+r13*8], rbx mov ebx, [r8+0Ch] mov [r9+r13*4+4], ebx mov rbx, 3FD2AAAAAAAAAAABh mov [rdx+r13*8+8], rbx mov ebx, [r8+8] mov [r9+r13*4+8], ebx mov rbx, 3FCAAAAAAAAAAAABh mov [rdx+r13*8+10h], rbx mov ebx, [r8+4] mov [r9+r13*4+0Ch], ebx mov [rdx+r13*8+18h], r15 cmp r12d, 4 jz loc_5C131 jmp loc_5C18B loc_5C09F: xor ebx, ebx loc_5C0A1: mov r15d, 3 test bpl, 1 jnz short loc_5C0DB mov ecx, [rax+0Ch] add ecx, 2 movsxd rcx, ecx imul r15, rcx, 2AAAAAABh mov rbp, r15 shr rbp, 3Fh shr r15, 20h add r15d, ebp add r15d, r15d lea ebp, [r15+r15*2] sub ecx, ebp movsxd r15, ecx mov ecx, [rsp+38h+var_34] loc_5C0DB: mov [r9+r13*4], esi mov rbp, 3FDAAAAAAAAAAAABh mov [rdx+r13*8], rbp mov [r9+r13*4+4], edi mov [rdx+r13*8+8], r14 mov [r9+r13*4+8], ecx mov [rdx+r13*8+10h], r14 mov ecx, [r8+r15*4] mov [r9+r13*4+0Ch], ecx mov r15, 3FA5555555555555h mov [rdx+r13*8+18h], r15 mov ecx, [r8+rbx*4] mov [r9+r13*4+10h], ecx mov ecx, [rsp+38h+var_34] mov [rdx+r13*8+20h], r15 cmp r12d, 5 jnz short loc_5C1AA loc_5C131: inc r11 cmp r11, 1 jz loc_5BF32 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_5C14D: lea rdi, aFGetsize3; "f.GetSize() == 3" lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_54; "void OpenSubdiv::v3_6_0::Far::GregoryTr"... mov edx, 56Bh call ___assert_fail loc_5C16C: lea rdi, aFGetsize4; "f.GetSize() == 4" lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_54; "void OpenSubdiv::v3_6_0::Far::GregoryTr"... mov edx, 572h call ___assert_fail loc_5C18B: lea rdi, aFGetsize4; "f.GetSize() == 4" lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_54; "void OpenSubdiv::v3_6_0::Far::GregoryTr"... mov edx, 579h call ___assert_fail loc_5C1AA: lea rdi, aFGetsize5; "f.GetSize() == 5" lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_54; "void OpenSubdiv::v3_6_0::Far::GregoryTr"... mov edx, 584h call ___assert_fail
long long OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints( long long a1, int a2, _QWORD *a3) { long long result; // rax int v4; // ecx int v5; // edi _DWORD *v6; // r8 long long v7; // r11 long long v8; // r9 long long v9; // rdx long long v10; // r10 long long v11; // r11 long long v12; // r13 int v13; // r12d __int16 v14; // bp long long v15; // rbx long long v16; // r15 result = a1 + 176LL * a2 + 24; v4 = a2 - 3 * ((a2 + 1) / 3) + 1; v5 = a2 - 3 * ((a2 + 2) / 3) + 2; v6 = *(_DWORD **)(result + 32); v7 = a3[2]; v8 = a3[5]; v9 = a3[8]; v10 = v7 + 20LL * a2 + 16; v11 = 0LL; do { if ( ((unsigned __int16)(((v11 != 0) << 8) + 256) & *(_WORD *)result) != 0 ) { v12 = *(int *)(v10 + 4 * v11 - 4); v13 = *(_DWORD *)(v10 + 4 * v11) - v12; v14 = *(_WORD *)result; if ( (*(_WORD *)result & 0x20) != 0 ) { *(_DWORD *)(v8 + 4 * v12) = a2; *(_QWORD *)(v9 + 8 * v12) = 0x3FE0000000000000LL; *(_DWORD *)(v8 + 4 * v12 + 4) = v4; *(_QWORD *)(v9 + 8 * v12 + 8) = 0x3FD0000000000000LL; *(_DWORD *)(v8 + 4 * v12 + 8) = v5; *(_QWORD *)(v9 + 8 * v12 + 16) = 0x3FD0000000000000LL; if ( v13 != 3 ) __assert_fail( "f.GetSize() == 3", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1387LL, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(int, Matrix &) const [REAL = double]"); } else if ( (v14 & 0x40) != 0 ) { *(_DWORD *)(v8 + 4 * v12) = a2; *(_QWORD *)(v9 + 8 * v12) = 0x3FDD555555555555LL; *(_DWORD *)(v8 + 4 * v12 + 4) = *v6; *(_QWORD *)(v9 + 8 * v12 + 8) = 0x3FD2AAAAAAAAAAABLL; *(_DWORD *)(v8 + 4 * v12 + 8) = v6[1]; *(_QWORD *)(v9 + 8 * v12 + 16) = 0x3FCAAAAAAAAAAAABLL; *(_DWORD *)(v8 + 4 * v12 + 12) = v6[2]; *(_QWORD *)(v9 + 8 * v12 + 24) = 0x3FA5555555555555LL; if ( v13 != 4 ) __assert_fail( "f.GetSize() == 4", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1394LL, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(int, Matrix &) const [REAL = double]"); } else if ( (v14 & 0x80u) != 0 ) { *(_DWORD *)(v8 + 4 * v12) = a2; *(_QWORD *)(v9 + 8 * v12) = 0x3FDD555555555555LL; *(_DWORD *)(v8 + 4 * v12 + 4) = v6[3]; *(_QWORD *)(v9 + 8 * v12 + 8) = 0x3FD2AAAAAAAAAAABLL; *(_DWORD *)(v8 + 4 * v12 + 8) = v6[2]; *(_QWORD *)(v9 + 8 * v12 + 16) = 0x3FCAAAAAAAAAAAABLL; *(_DWORD *)(v8 + 4 * v12 + 12) = v6[1]; *(_QWORD *)(v9 + 8 * v12 + 24) = 0x3FA5555555555555LL; if ( v13 != 4 ) __assert_fail( "f.GetSize() == 4", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1401LL, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(int, Matrix &) const [REAL = double]"); } else { if ( (v14 & 1) != 0 ) { v15 = 0LL; } else { v4 = a2 - 3 * ((a2 + 1) / 3) + 1; v15 = (*(_DWORD *)(result + 12) + 5) % 6; } v16 = 3LL; if ( (v14 & 1) == 0 ) { v16 = (*(_DWORD *)(result + 12) + 2) % 6; v4 = a2 - 3 * ((a2 + 1) / 3) + 1; } *(_DWORD *)(v8 + 4 * v12) = a2; *(_QWORD *)(v9 + 8 * v12) = 0x3FDAAAAAAAAAAAABLL; *(_DWORD *)(v8 + 4 * v12 + 4) = v5; *(_QWORD *)(v9 + 8 * v12 + 8) = 0x3FD0000000000000LL; *(_DWORD *)(v8 + 4 * v12 + 8) = v4; *(_QWORD *)(v9 + 8 * v12 + 16) = 0x3FD0000000000000LL; *(_DWORD *)(v8 + 4 * v12 + 12) = v6[v16]; *(_QWORD *)(v9 + 8 * v12 + 24) = 0x3FA5555555555555LL; *(_DWORD *)(v8 + 4 * v12 + 16) = v6[v15]; v4 = a2 - 3 * ((a2 + 1) / 3) + 1; *(_QWORD *)(v9 + 8 * v12 + 32) = 0x3FA5555555555555LL; if ( v13 != 5 ) __assert_fail( "f.GetSize() == 5", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1412LL, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(int, Matrix &) const [REAL = double]"); } } ++v11; } while ( v11 == 1 ); return result; }
assignRegularFacePoints: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOVSXD R9,ESI IMUL RAX,R9,0xb0 ADD RAX,RDI ADD RAX,0x18 LEA ECX,[R9 + 0x1] MOVSXD RCX,ECX IMUL RCX,RCX,0x55555556 MOV RDI,RCX SHR RDI,0x3f SHR RCX,0x20 ADD ECX,EDI LEA ECX,[RCX + RCX*0x2] NEG ECX ADD ECX,R9D INC ECX MOV EDI,R9D ADD EDI,0x2 MOVSXD RDI,EDI IMUL RDI,RDI,0x55555556 MOV R8,RDI SHR R8,0x3f SHR RDI,0x20 ADD EDI,R8D LEA EDI,[RDI + RDI*0x2] NEG EDI ADD EDI,R9D ADD EDI,0x2 MOV R8,qword ptr [RAX + 0x20] LEA R10D,[R9 + R9*0x4] MOV R11,qword ptr [RDX + 0x10] MOV R9,qword ptr [RDX + 0x28] MOV RDX,qword ptr [RDX + 0x40] MOVSXD R10,R10D LEA R10,[R11 + R10*0x4] ADD R10,0x10 XOR R11D,R11D MOV R14,0x3fd0000000000000 MOV R15,0x3fa5555555555555 MOV dword ptr [RSP + 0x4],ECX LAB_0015bf32: XOR EBX,EBX TEST R11,R11 SETNZ BL SHL EBX,0x8 ADD EBX,0x100 TEST word ptr [RAX],BX JZ 0x0015c131 MOV R12D,dword ptr [R10 + R11*0x4] MOVSXD R13,dword ptr [R10 + R11*0x4 + -0x4] SUB R12D,R13D MOVZX EBP,word ptr [RAX] TEST BPL,0x20 JNZ 0x0015bfad TEST BPL,0x40 JNZ 0x0015bfe2 TEST BPL,BPL JS 0x0015c040 TEST BPL,0x1 JNZ 0x0015c09f MOV EBX,dword ptr [RAX + 0xc] ADD EBX,0x5 MOVSXD RBX,EBX IMUL R15,RBX,0x2aaaaaab MOV RCX,R15 SHR RCX,0x3f SHR R15,0x20 ADD R15D,ECX ADD R15D,R15D LEA ECX,[R15 + R15*0x2] SUB EBX,ECX MOV ECX,dword ptr [RSP + 0x4] MOVSXD RBX,EBX JMP 0x0015c0a1 LAB_0015bfad: MOV dword ptr [R9 + R13*0x4],ESI MOV RBX,0x3fe0000000000000 MOV qword ptr [RDX + R13*0x8],RBX MOV dword ptr [R9 + R13*0x4 + 0x4],ECX MOV qword ptr [RDX + R13*0x8 + 0x8],R14 MOV dword ptr [R9 + R13*0x4 + 0x8],EDI MOV qword ptr [RDX + R13*0x8 + 0x10],R14 CMP R12D,0x3 JZ 0x0015c131 JMP 0x0015c14d LAB_0015bfe2: MOV dword ptr [R9 + R13*0x4],ESI MOV RBX,0x3fdd555555555555 MOV qword ptr [RDX + R13*0x8],RBX MOV EBX,dword ptr [R8] MOV dword ptr [R9 + R13*0x4 + 0x4],EBX MOV RBX,0x3fd2aaaaaaaaaaab MOV qword ptr [RDX + R13*0x8 + 0x8],RBX MOV EBX,dword ptr [R8 + 0x4] MOV dword ptr [R9 + R13*0x4 + 0x8],EBX MOV RBX,0x3fcaaaaaaaaaaaab MOV qword ptr [RDX + R13*0x8 + 0x10],RBX MOV EBX,dword ptr [R8 + 0x8] MOV dword ptr [R9 + R13*0x4 + 0xc],EBX MOV qword ptr [RDX + R13*0x8 + 0x18],R15 CMP R12D,0x4 JZ 0x0015c131 JMP 0x0015c16c LAB_0015c040: MOV dword ptr [R9 + R13*0x4],ESI MOV RBX,0x3fdd555555555555 MOV qword ptr [RDX + R13*0x8],RBX MOV EBX,dword ptr [R8 + 0xc] MOV dword ptr [R9 + R13*0x4 + 0x4],EBX MOV RBX,0x3fd2aaaaaaaaaaab MOV qword ptr [RDX + R13*0x8 + 0x8],RBX MOV EBX,dword ptr [R8 + 0x8] MOV dword ptr [R9 + R13*0x4 + 0x8],EBX MOV RBX,0x3fcaaaaaaaaaaaab MOV qword ptr [RDX + R13*0x8 + 0x10],RBX MOV EBX,dword ptr [R8 + 0x4] MOV dword ptr [R9 + R13*0x4 + 0xc],EBX MOV qword ptr [RDX + R13*0x8 + 0x18],R15 CMP R12D,0x4 JZ 0x0015c131 JMP 0x0015c18b LAB_0015c09f: XOR EBX,EBX LAB_0015c0a1: MOV R15D,0x3 TEST BPL,0x1 JNZ 0x0015c0db MOV ECX,dword ptr [RAX + 0xc] ADD ECX,0x2 MOVSXD RCX,ECX IMUL R15,RCX,0x2aaaaaab MOV RBP,R15 SHR RBP,0x3f SHR R15,0x20 ADD R15D,EBP ADD R15D,R15D LEA EBP,[R15 + R15*0x2] SUB ECX,EBP MOVSXD R15,ECX MOV ECX,dword ptr [RSP + 0x4] LAB_0015c0db: MOV dword ptr [R9 + R13*0x4],ESI MOV RBP,0x3fdaaaaaaaaaaaab MOV qword ptr [RDX + R13*0x8],RBP MOV dword ptr [R9 + R13*0x4 + 0x4],EDI MOV qword ptr [RDX + R13*0x8 + 0x8],R14 MOV dword ptr [R9 + R13*0x4 + 0x8],ECX MOV qword ptr [RDX + R13*0x8 + 0x10],R14 MOV ECX,dword ptr [R8 + R15*0x4] MOV dword ptr [R9 + R13*0x4 + 0xc],ECX MOV R15,0x3fa5555555555555 MOV qword ptr [RDX + R13*0x8 + 0x18],R15 MOV ECX,dword ptr [R8 + RBX*0x4] MOV dword ptr [R9 + R13*0x4 + 0x10],ECX MOV ECX,dword ptr [RSP + 0x4] MOV qword ptr [RDX + R13*0x8 + 0x20],R15 CMP R12D,0x5 JNZ 0x0015c1aa LAB_0015c131: INC R11 CMP R11,0x1 JZ 0x0015bf32 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0015c14d: LEA RDI,[0x1b6cb0] LEA RSI,[0x1b6918] LEA RCX,[0x1b73c3] MOV EDX,0x56b CALL 0x00139560 LAB_0015c16c: LEA RDI,[0x1b6d37] LEA RSI,[0x1b6918] LEA RCX,[0x1b73c3] MOV EDX,0x572 CALL 0x00139560 LAB_0015c18b: LEA RDI,[0x1b6d37] LEA RSI,[0x1b6918] LEA RCX,[0x1b73c3] MOV EDX,0x579 CALL 0x00139560 LAB_0015c1aa: LEA RDI,[0x1b6d48] LEA RSI,[0x1b6918] LEA RCX,[0x1b73c3] MOV EDX,0x584 CALL 0x00139560
/* OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(int, OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&) const */ void __thiscall OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints (GregoryTriConverter<double> *this,int param_1,SparseMatrix *param_2) { long lVar1; ushort uVar2; int4 *puVar3; long lVar4; long lVar5; int iVar6; long lVar7; int iVar8; long lVar9; int iVar10; long lVar11; long lVar12; iVar6 = ((param_1 + 1) / 3) * -3 + param_1 + 1; iVar8 = ((param_1 + 2) / 3) * -3 + param_1 + 2; puVar3 = *(int4 **)(this + (long)param_1 * 0xb0 + 0x38); lVar4 = *(long *)(param_2 + 0x28); lVar5 = *(long *)(param_2 + 0x40); lVar1 = *(long *)(param_2 + 0x10) + (long)(param_1 * 5) * 4; lVar9 = 0; do { if ((*(ushort *)(this + (long)param_1 * 0xb0 + 0x18) & (ushort)(lVar9 != 0) * 0x100 + 0x100) != 0) { iVar10 = *(int *)(lVar1 + 0xc + lVar9 * 4); lVar11 = (long)iVar10; iVar10 = *(int *)(lVar1 + 0x10 + lVar9 * 4) - iVar10; uVar2 = *(ushort *)(this + (long)param_1 * 0xb0 + 0x18); if ((uVar2 & 0x20) == 0) { if ((uVar2 & 0x40) == 0) { if ((char)uVar2 < '\0') { *(int *)(lVar4 + lVar11 * 4) = param_1; *(int8 *)(lVar5 + lVar11 * 8) = 0x3fdd555555555555; *(int4 *)(lVar4 + 4 + lVar11 * 4) = puVar3[3]; *(int8 *)(lVar5 + 8 + lVar11 * 8) = 0x3fd2aaaaaaaaaaab; *(int4 *)(lVar4 + 8 + lVar11 * 4) = puVar3[2]; *(int8 *)(lVar5 + 0x10 + lVar11 * 8) = 0x3fcaaaaaaaaaaaab; *(int4 *)(lVar4 + 0xc + lVar11 * 4) = puVar3[1]; *(int8 *)(lVar5 + 0x18 + lVar11 * 8) = 0x3fa5555555555555; if (iVar10 != 4) { /* WARNING: Subroutine does not return */ __assert_fail("f.GetSize() == 4", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp" ,0x579, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(int, Matrix &) const [REAL = double]" ); } } else { if ((uVar2 & 1) == 0) { lVar7 = (long)((*(int *)(this + (long)param_1 * 0xb0 + 0x24) + 5) % 6); } else { lVar7 = 0; } lVar12 = 3; if ((uVar2 & 1) == 0) { lVar12 = (long)((*(int *)(this + (long)param_1 * 0xb0 + 0x24) + 2) % 6); } *(int *)(lVar4 + lVar11 * 4) = param_1; *(int8 *)(lVar5 + lVar11 * 8) = 0x3fdaaaaaaaaaaaab; *(int *)(lVar4 + 4 + lVar11 * 4) = iVar8; *(int8 *)(lVar5 + 8 + lVar11 * 8) = 0x3fd0000000000000; *(int *)(lVar4 + 8 + lVar11 * 4) = iVar6; *(int8 *)(lVar5 + 0x10 + lVar11 * 8) = 0x3fd0000000000000; *(int4 *)(lVar4 + 0xc + lVar11 * 4) = puVar3[lVar12]; *(int8 *)(lVar5 + 0x18 + lVar11 * 8) = 0x3fa5555555555555; *(int4 *)(lVar4 + 0x10 + lVar11 * 4) = puVar3[lVar7]; *(int8 *)(lVar5 + 0x20 + lVar11 * 8) = 0x3fa5555555555555; if (iVar10 != 5) { /* WARNING: Subroutine does not return */ __assert_fail("f.GetSize() == 5", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp" ,0x584, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(int, Matrix &) const [REAL = double]" ); } } } else { *(int *)(lVar4 + lVar11 * 4) = param_1; *(int8 *)(lVar5 + lVar11 * 8) = 0x3fdd555555555555; *(int4 *)(lVar4 + 4 + lVar11 * 4) = *puVar3; *(int8 *)(lVar5 + 8 + lVar11 * 8) = 0x3fd2aaaaaaaaaaab; *(int4 *)(lVar4 + 8 + lVar11 * 4) = puVar3[1]; *(int8 *)(lVar5 + 0x10 + lVar11 * 8) = 0x3fcaaaaaaaaaaaab; *(int4 *)(lVar4 + 0xc + lVar11 * 4) = puVar3[2]; *(int8 *)(lVar5 + 0x18 + lVar11 * 8) = 0x3fa5555555555555; if (iVar10 != 4) { /* WARNING: Subroutine does not return */ __assert_fail("f.GetSize() == 4", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp" ,0x572, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(int, Matrix &) const [REAL = double]" ); } } } else { *(int *)(lVar4 + lVar11 * 4) = param_1; *(int8 *)(lVar5 + lVar11 * 8) = 0x3fe0000000000000; *(int *)(lVar4 + 4 + lVar11 * 4) = iVar6; *(int8 *)(lVar5 + 8 + lVar11 * 8) = 0x3fd0000000000000; *(int *)(lVar4 + 8 + lVar11 * 4) = iVar8; *(int8 *)(lVar5 + 0x10 + lVar11 * 8) = 0x3fd0000000000000; if (iVar10 != 3) { /* WARNING: Subroutine does not return */ __assert_fail("f.GetSize() == 3", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp" ,0x56b, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(int, Matrix &) const [REAL = double]" ); } } } lVar9 = lVar9 + 1; if (lVar9 != 1) { return; } } while( true ); }
29,582
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(int, OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
void GregoryTriConverter<REAL>::assignRegularFacePoints(int cIndex, Matrix & matrix) const { CornerTopology const & corner = _corners[cIndex]; int cNext = (cIndex+1) % 3; int cPrev = (cIndex+2) % 3; int const * cRing = corner.ringPoints; // // Regular face-points are computed the same for both face-points of a // a corner (fp and fm), so iterate through both and make appropriate // assignments when tagged as regular: // for (int fIsFm = 0; fIsFm < 2; ++fIsFm) { bool fIsRegular = fIsFm ? corner.fmIsRegular : corner.fpIsRegular; if (!fIsRegular) continue; Point f(matrix, 5*cIndex + 3 + fIsFm); if (corner.isCorner) { f.Assign(0, cIndex, 0.5f); f.Assign(1, cNext, 0.25f); f.Assign(2, cPrev, 0.25f); assert(f.GetSize() == 3); } else if (corner.epOnBoundary) { // Face is the first/leading face of the boundary ring: f.Assign(0, cIndex, (REAL) (11.0 / 24.0)); f.Assign(1, cRing[0], (REAL) ( 7.0 / 24.0)); f.Assign(2, cRing[1], (REAL) ( 5.0 / 24.0)); f.Assign(3, cRing[2], (REAL) ( 1.0 / 24.0)); assert(f.GetSize() == 4); } else if (corner.emOnBoundary) { // Face is the last/trailing face of the boundary ring: f.Assign(0, cIndex, (REAL) (11.0 / 24.0)); f.Assign(1, cRing[3], (REAL) ( 7.0 / 24.0)); f.Assign(2, cRing[2], (REAL) ( 5.0 / 24.0)); f.Assign(3, cRing[1], (REAL) ( 1.0 / 24.0)); assert(f.GetSize() == 4); } else { // Face is interior or the middle face of the boundary: int eNext = corner.isBoundary ? 0 : ((corner.faceInRing + 5) % 6); int ePrev = corner.isBoundary ? 3 : ((corner.faceInRing + 2) % 6); f.Assign(0, cIndex, (REAL) (10.0 / 24.0)); f.Assign(1, cPrev, 0.25f); f.Assign(2, cNext, 0.25f); f.Assign(3, cRing[ePrev], (REAL) ( 1.0 / 24.0)); f.Assign(4, cRing[eNext], (REAL) ( 1.0 / 24.0)); assert(f.GetSize() == 5); } } }
O2
cpp
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(int, OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r8 movslq %esi, %r11 imulq $0xa8, %r11, %rax leaq (%rdi,%rax), %r9 addq $0x18, %r9 leal 0x1(%r11), %eax pushq $0x3 popq %rdi cltd idivl %edi movl %edx, %ecx leal 0x2(%r11), %eax cltd idivl %edi movl %edx, %edi movq 0x18(%r9), %r10 leal (%r11,%r11,4), %eax movq 0x10(%r8), %rdx movq 0x28(%r8), %r11 movq 0x40(%r8), %rbx cltq leaq (%rdx,%rax,4), %r14 addq $0x10, %r14 xorl %r15d, %r15d movaps 0x51ea1(%rip), %xmm0 # 0xc01a0 movaps 0x51e8a(%rip), %xmm1 # 0xc0190 movsd 0x51e72(%rip), %xmm2 # 0xc0180 testq %r15, %r15 je 0x6e322 movw $0x9, %dx cmpq $0x2, %r15 jne 0x6e326 jmp 0x6e448 movw $0x8, %dx movl (%r9), %eax btl %edx, %eax jae 0x6e440 movl (%r14,%r15,4), %r13d movslq -0x4(%r14,%r15,4), %r12 subl %r12d, %r13d testb $0x20, %al jne 0x6e37e testb $0x40, %al jne 0x6e3aa testb %al, %al js 0x6e3d8 testb $0x1, %al jne 0x6e407 movl 0xc(%r9), %r8d leal 0x5(%r8), %eax cltd pushq $0x6 popq %rbp idivl %ebp movslq %edx, %rbp addl $0x2, %r8d movl %r8d, %eax cltd pushq $0x6 popq %r8 idivl %r8d movslq %edx, %rax jmp 0x6e40c movl %esi, (%r11,%r12,4) movl %ecx, 0x4(%r11,%r12,4) movsd %xmm2, (%rbx,%r12,4) movl %edi, 0x8(%r11,%r12,4) movl $0x3e800000, 0x8(%rbx,%r12,4) # imm = 0x3E800000 cmpl $0x3, %r13d je 0x6e440 jmp 0x6e457 movl %esi, (%r11,%r12,4) movl (%r10), %eax movl %eax, 0x4(%r11,%r12,4) movl 0x4(%r10), %eax movl %eax, 0x8(%r11,%r12,4) movl 0x8(%r10), %eax movl %eax, 0xc(%r11,%r12,4) movups %xmm1, (%rbx,%r12,4) cmpl $0x4, %r13d je 0x6e440 jmp 0x6e476 movl %esi, (%r11,%r12,4) movl 0xc(%r10), %eax movl %eax, 0x4(%r11,%r12,4) movl 0x8(%r10), %eax movl %eax, 0x8(%r11,%r12,4) movl 0x4(%r10), %eax movl %eax, 0xc(%r11,%r12,4) movups %xmm1, (%rbx,%r12,4) cmpl $0x4, %r13d je 0x6e440 jmp 0x6e495 xorl %ebp, %ebp pushq $0x3 popq %rax movl %esi, (%r11,%r12,4) movl %edi, 0x4(%r11,%r12,4) movl %ecx, 0x8(%r11,%r12,4) movl (%r10,%rax,4), %eax movl %eax, 0xc(%r11,%r12,4) movups %xmm0, (%rbx,%r12,4) movl (%r10,%rbp,4), %eax movl %eax, 0x10(%r11,%r12,4) movl $0x3d2aaaab, 0x10(%rbx,%r12,4) # imm = 0x3D2AAAAB cmpl $0x5, %r13d jne 0x6e4b4 incq %r15 jmp 0x6e30e addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x52c02(%rip), %rdi # 0xc1060 leaq 0x52863(%rip), %rsi # 0xc0cc8 leaq 0x52c05(%rip), %rcx # 0xc1071 movl $0x56b, %edx # imm = 0x56B callq 0x512a0 leaq 0x52c6a(%rip), %rdi # 0xc10e7 leaq 0x52844(%rip), %rsi # 0xc0cc8 leaq 0x52be6(%rip), %rcx # 0xc1071 movl $0x572, %edx # imm = 0x572 callq 0x512a0 leaq 0x52c4b(%rip), %rdi # 0xc10e7 leaq 0x52825(%rip), %rsi # 0xc0cc8 leaq 0x52bc7(%rip), %rcx # 0xc1071 movl $0x579, %edx # imm = 0x579 callq 0x512a0 leaq 0x52c3d(%rip), %rdi # 0xc10f8 leaq 0x52806(%rip), %rsi # 0xc0cc8 leaq 0x52ba8(%rip), %rcx # 0xc1071 movl $0x584, %edx # imm = 0x584 callq 0x512a0 nop
_ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIfE23assignRegularFacePointsEiRNS1_12SparseMatrixIfEE: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r8, rdx movsxd r11, esi imul rax, r11, 0A8h lea r9, [rdi+rax] add r9, 18h lea eax, [r11+1] push 3 pop rdi cdq idiv edi mov ecx, edx lea eax, [r11+2] cdq idiv edi mov edi, edx mov r10, [r9+18h] lea eax, [r11+r11*4] mov rdx, [r8+10h] mov r11, [r8+28h] mov rbx, [r8+40h] cdqe lea r14, [rdx+rax*4] add r14, 10h xor r15d, r15d movaps xmm0, cs:xmmword_C01A0 movaps xmm1, cs:xmmword_C0190 movsd xmm2, cs:qword_C0180 loc_6E30E: test r15, r15 jz short loc_6E322 mov dx, 9 cmp r15, 2 jnz short loc_6E326 jmp loc_6E448 loc_6E322: mov dx, 8 loc_6E326: mov eax, [r9] bt eax, edx jnb loc_6E440 mov r13d, [r14+r15*4] movsxd r12, dword ptr [r14+r15*4-4] sub r13d, r12d test al, 20h jnz short loc_6E37E test al, 40h jnz short loc_6E3AA test al, al js loc_6E3D8 test al, 1 jnz loc_6E407 mov r8d, [r9+0Ch] lea eax, [r8+5] cdq push 6 pop rbp idiv ebp movsxd rbp, edx add r8d, 2 mov eax, r8d cdq push 6 pop r8 idiv r8d movsxd rax, edx jmp loc_6E40C loc_6E37E: mov [r11+r12*4], esi mov [r11+r12*4+4], ecx movsd qword ptr [rbx+r12*4], xmm2 mov [r11+r12*4+8], edi mov dword ptr [rbx+r12*4+8], 3E800000h cmp r13d, 3 jz loc_6E440 jmp loc_6E457 loc_6E3AA: mov [r11+r12*4], esi mov eax, [r10] mov [r11+r12*4+4], eax mov eax, [r10+4] mov [r11+r12*4+8], eax mov eax, [r10+8] mov [r11+r12*4+0Ch], eax movups xmmword ptr [rbx+r12*4], xmm1 cmp r13d, 4 jz short loc_6E440 jmp loc_6E476 loc_6E3D8: mov [r11+r12*4], esi mov eax, [r10+0Ch] mov [r11+r12*4+4], eax mov eax, [r10+8] mov [r11+r12*4+8], eax mov eax, [r10+4] mov [r11+r12*4+0Ch], eax movups xmmword ptr [rbx+r12*4], xmm1 cmp r13d, 4 jz short loc_6E440 jmp loc_6E495 loc_6E407: xor ebp, ebp push 3 pop rax loc_6E40C: mov [r11+r12*4], esi mov [r11+r12*4+4], edi mov [r11+r12*4+8], ecx mov eax, [r10+rax*4] mov [r11+r12*4+0Ch], eax movups xmmword ptr [rbx+r12*4], xmm0 mov eax, [r10+rbp*4] mov [r11+r12*4+10h], eax mov dword ptr [rbx+r12*4+10h], 3D2AAAABh cmp r13d, 5 jnz short loc_6E4B4 loc_6E440: inc r15 jmp loc_6E30E loc_6E448: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6E457: lea rdi, aFGetsize3; "f.GetSize() == 3" lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_46; "void OpenSubdiv::v3_6_0::Far::GregoryTr"... mov edx, 56Bh call ___assert_fail loc_6E476: lea rdi, aFGetsize4; "f.GetSize() == 4" lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_46; "void OpenSubdiv::v3_6_0::Far::GregoryTr"... mov edx, 572h call ___assert_fail loc_6E495: lea rdi, aFGetsize4; "f.GetSize() == 4" lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_46; "void OpenSubdiv::v3_6_0::Far::GregoryTr"... mov edx, 579h call ___assert_fail loc_6E4B4: lea rdi, aFGetsize5; "f.GetSize() == 5" lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_46; "void OpenSubdiv::v3_6_0::Far::GregoryTr"... mov edx, 584h call ___assert_fail
long long OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::assignRegularFacePoints( long long a1, int a2, _QWORD *a3) { unsigned int *v4; // r9 int v5; // ecx int v6; // edi _DWORD *v7; // r10 long long v8; // rdx long long v9; // r11 long long v10; // rbx long long result; // rax long long v12; // r14 long long i; // r15 long long v14; // r12 int v15; // r13d unsigned int v16; // r8d long long v17; // rbp long long v18; // rax v4 = (unsigned int *)(a1 + 168LL * a2 + 24); v5 = (a2 + 1) % 3; v6 = (a2 + 2) % 3; v7 = (_DWORD *)*((_QWORD *)v4 + 3); v8 = a3[2]; v9 = a3[5]; v10 = a3[8]; result = 5 * a2; v12 = v8 + 4 * result + 16; for ( i = 0LL; !i; ++i ) { LOWORD(v8) = 8; LABEL_6: result = *v4; if ( _bittest((const int *)&result, v8) ) { v14 = *(int *)(v12 + 4 * i - 4); v15 = *(_DWORD *)(v12 + 4 * i) - v14; if ( (result & 0x20) != 0 ) { *(_DWORD *)(v9 + 4 * v14) = a2; *(_DWORD *)(v9 + 4 * v14 + 4) = v5; *(_QWORD *)(v10 + 4 * v14) = 0x3E8000003F000000LL; *(_DWORD *)(v9 + 4 * v14 + 8) = v6; *(_DWORD *)(v10 + 4 * v14 + 8) = 1048576000; if ( v15 != 3 ) __assert_fail( "f.GetSize() == 3", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1387LL, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::assignRegularFacePoints(int, Matrix &) const [REAL = float]"); } else if ( (result & 0x40) != 0 ) { *(_DWORD *)(v9 + 4 * v14) = a2; *(_DWORD *)(v9 + 4 * v14 + 4) = *v7; *(_DWORD *)(v9 + 4 * v14 + 8) = v7[1]; result = (unsigned int)v7[2]; *(_DWORD *)(v9 + 4 * v14 + 12) = result; *(_OWORD *)(v10 + 4 * v14) = xmmword_C0190; if ( v15 != 4 ) __assert_fail( "f.GetSize() == 4", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1394LL, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::assignRegularFacePoints(int, Matrix &) const [REAL = float]"); } else if ( (result & 0x80u) != 0LL ) { *(_DWORD *)(v9 + 4 * v14) = a2; *(_DWORD *)(v9 + 4 * v14 + 4) = v7[3]; *(_DWORD *)(v9 + 4 * v14 + 8) = v7[2]; result = (unsigned int)v7[1]; *(_DWORD *)(v9 + 4 * v14 + 12) = result; *(_OWORD *)(v10 + 4 * v14) = xmmword_C0190; if ( v15 != 4 ) __assert_fail( "f.GetSize() == 4", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1401LL, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::assignRegularFacePoints(int, Matrix &) const [REAL = float]"); } else { if ( (result & 1) != 0 ) { v17 = 0LL; v18 = 3LL; } else { v16 = v4[3]; v17 = (int)(v16 + 5) % 6; LODWORD(v8) = (int)(v16 + 2) % 6; v18 = (int)v8; } *(_DWORD *)(v9 + 4 * v14) = a2; *(_DWORD *)(v9 + 4 * v14 + 4) = v6; *(_DWORD *)(v9 + 4 * v14 + 8) = v5; *(_DWORD *)(v9 + 4 * v14 + 12) = v7[v18]; *(_OWORD *)(v10 + 4 * v14) = xmmword_C01A0; result = (unsigned int)v7[v17]; *(_DWORD *)(v9 + 4 * v14 + 16) = result; *(_DWORD *)(v10 + 4 * v14 + 16) = 1026206379; if ( v15 != 5 ) __assert_fail( "f.GetSize() == 5", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1412LL, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::assignRegularFacePoints(int, Matrix &) const [REAL = float]"); } } } LOWORD(v8) = 9; if ( i != 2 ) goto LABEL_6; return result; }
assignRegularFacePoints: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R8,RDX MOVSXD R11,ESI IMUL RAX,R11,0xa8 LEA R9,[RDI + RAX*0x1] ADD R9,0x18 LEA EAX,[R11 + 0x1] PUSH 0x3 POP RDI CDQ IDIV EDI MOV ECX,EDX LEA EAX,[R11 + 0x2] CDQ IDIV EDI MOV EDI,EDX MOV R10,qword ptr [R9 + 0x18] LEA EAX,[R11 + R11*0x4] MOV RDX,qword ptr [R8 + 0x10] MOV R11,qword ptr [R8 + 0x28] MOV RBX,qword ptr [R8 + 0x40] CDQE LEA R14,[RDX + RAX*0x4] ADD R14,0x10 XOR R15D,R15D MOVAPS XMM0,xmmword ptr [0x001c01a0] MOVAPS XMM1,xmmword ptr [0x001c0190] MOVSD XMM2,qword ptr [0x001c0180] LAB_0016e30e: TEST R15,R15 JZ 0x0016e322 MOV DX,0x9 CMP R15,0x2 JNZ 0x0016e326 JMP 0x0016e448 LAB_0016e322: MOV DX,0x8 LAB_0016e326: MOV EAX,dword ptr [R9] BT EAX,EDX JNC 0x0016e440 MOV R13D,dword ptr [R14 + R15*0x4] MOVSXD R12,dword ptr [R14 + R15*0x4 + -0x4] SUB R13D,R12D TEST AL,0x20 JNZ 0x0016e37e TEST AL,0x40 JNZ 0x0016e3aa TEST AL,AL JS 0x0016e3d8 TEST AL,0x1 JNZ 0x0016e407 MOV R8D,dword ptr [R9 + 0xc] LEA EAX,[R8 + 0x5] CDQ PUSH 0x6 POP RBP IDIV EBP MOVSXD RBP,EDX ADD R8D,0x2 MOV EAX,R8D CDQ PUSH 0x6 POP R8 IDIV R8D MOVSXD RAX,EDX JMP 0x0016e40c LAB_0016e37e: MOV dword ptr [R11 + R12*0x4],ESI MOV dword ptr [R11 + R12*0x4 + 0x4],ECX MOVSD qword ptr [RBX + R12*0x4],XMM2 MOV dword ptr [R11 + R12*0x4 + 0x8],EDI MOV dword ptr [RBX + R12*0x4 + 0x8],0x3e800000 CMP R13D,0x3 JZ 0x0016e440 JMP 0x0016e457 LAB_0016e3aa: MOV dword ptr [R11 + R12*0x4],ESI MOV EAX,dword ptr [R10] MOV dword ptr [R11 + R12*0x4 + 0x4],EAX MOV EAX,dword ptr [R10 + 0x4] MOV dword ptr [R11 + R12*0x4 + 0x8],EAX MOV EAX,dword ptr [R10 + 0x8] MOV dword ptr [R11 + R12*0x4 + 0xc],EAX MOVUPS xmmword ptr [RBX + R12*0x4],XMM1 CMP R13D,0x4 JZ 0x0016e440 JMP 0x0016e476 LAB_0016e3d8: MOV dword ptr [R11 + R12*0x4],ESI MOV EAX,dword ptr [R10 + 0xc] MOV dword ptr [R11 + R12*0x4 + 0x4],EAX MOV EAX,dword ptr [R10 + 0x8] MOV dword ptr [R11 + R12*0x4 + 0x8],EAX MOV EAX,dword ptr [R10 + 0x4] MOV dword ptr [R11 + R12*0x4 + 0xc],EAX MOVUPS xmmword ptr [RBX + R12*0x4],XMM1 CMP R13D,0x4 JZ 0x0016e440 JMP 0x0016e495 LAB_0016e407: XOR EBP,EBP PUSH 0x3 POP RAX LAB_0016e40c: MOV dword ptr [R11 + R12*0x4],ESI MOV dword ptr [R11 + R12*0x4 + 0x4],EDI MOV dword ptr [R11 + R12*0x4 + 0x8],ECX MOV EAX,dword ptr [R10 + RAX*0x4] MOV dword ptr [R11 + R12*0x4 + 0xc],EAX MOVUPS xmmword ptr [RBX + R12*0x4],XMM0 MOV EAX,dword ptr [R10 + RBP*0x4] MOV dword ptr [R11 + R12*0x4 + 0x10],EAX MOV dword ptr [RBX + R12*0x4 + 0x10],0x3d2aaaab CMP R13D,0x5 JNZ 0x0016e4b4 LAB_0016e440: INC R15 JMP 0x0016e30e LAB_0016e448: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016e457: LEA RDI,[0x1c1060] LEA RSI,[0x1c0cc8] LEA RCX,[0x1c1071] MOV EDX,0x56b CALL 0x001512a0 LAB_0016e476: LEA RDI,[0x1c10e7] LEA RSI,[0x1c0cc8] LEA RCX,[0x1c1071] MOV EDX,0x572 CALL 0x001512a0 LAB_0016e495: LEA RDI,[0x1c10e7] LEA RSI,[0x1c0cc8] LEA RCX,[0x1c1071] MOV EDX,0x579 CALL 0x001512a0 LAB_0016e4b4: LEA RDI,[0x1c10f8] LEA RSI,[0x1c0cc8] LEA RCX,[0x1c1071] MOV EDX,0x584 CALL 0x001512a0
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::assignRegularFacePoints(int, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&) const */ void __thiscall OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::assignRegularFacePoints (GregoryTriConverter<float> *this,int param_1,SparseMatrix *param_2) { long lVar1; int8 *puVar2; uint uVar3; int4 *puVar4; long lVar5; long lVar6; int8 uVar7; int8 uVar8; int8 uVar9; int8 uVar10; int8 uVar11; long lVar12; int iVar13; long lVar14; int iVar15; long lVar16; int iVar17; long lVar18; uVar11 = _UNK_001c01a8; uVar10 = _DAT_001c01a0; uVar9 = _UNK_001c0198; uVar8 = _DAT_001c0190; uVar7 = DAT_001c0180; iVar13 = (param_1 + 1) % 3; iVar15 = (param_1 + 2) % 3; puVar4 = *(int4 **)(this + (long)param_1 * 0xa8 + 0x30); lVar5 = *(long *)(param_2 + 0x28); lVar6 = *(long *)(param_2 + 0x40); lVar1 = *(long *)(param_2 + 0x10) + (long)(param_1 * 5) * 4; lVar18 = 0; do { if (lVar18 == 0) { iVar17 = 8; } else { iVar17 = 9; if (lVar18 == 2) { return; } } uVar3 = *(uint *)(this + (long)param_1 * 0xa8 + 0x18); if ((uVar3 >> iVar17 & 1) != 0) { iVar17 = *(int *)(lVar1 + 0xc + lVar18 * 4); lVar16 = (long)iVar17; iVar17 = *(int *)(lVar1 + 0x10 + lVar18 * 4) - iVar17; if ((uVar3 & 0x20) == 0) { if ((uVar3 & 0x40) == 0) { if ((char)uVar3 < '\0') { *(int *)(lVar5 + lVar16 * 4) = param_1; *(int4 *)(lVar5 + 4 + lVar16 * 4) = puVar4[3]; *(int4 *)(lVar5 + 8 + lVar16 * 4) = puVar4[2]; *(int4 *)(lVar5 + 0xc + lVar16 * 4) = puVar4[1]; puVar2 = (int8 *)(lVar6 + lVar16 * 4); *puVar2 = uVar8; puVar2[1] = uVar9; if (iVar17 != 4) { /* WARNING: Subroutine does not return */ __assert_fail("f.GetSize() == 4", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp" ,0x579, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::assignRegularFacePoints(int, Matrix &) const [REAL = float]" ); } } else { if ((uVar3 & 1) == 0) { lVar14 = (long)((*(int *)(this + (long)param_1 * 0xa8 + 0x24) + 5) % 6); lVar12 = (long)((*(int *)(this + (long)param_1 * 0xa8 + 0x24) + 2) % 6); } else { lVar14 = 0; lVar12 = 3; } *(int *)(lVar5 + lVar16 * 4) = param_1; *(int *)(lVar5 + 4 + lVar16 * 4) = iVar15; *(int *)(lVar5 + 8 + lVar16 * 4) = iVar13; *(int4 *)(lVar5 + 0xc + lVar16 * 4) = puVar4[lVar12]; puVar2 = (int8 *)(lVar6 + lVar16 * 4); *puVar2 = uVar10; puVar2[1] = uVar11; *(int4 *)(lVar5 + 0x10 + lVar16 * 4) = puVar4[lVar14]; *(int4 *)(lVar6 + 0x10 + lVar16 * 4) = 0x3d2aaaab; if (iVar17 != 5) { /* WARNING: Subroutine does not return */ __assert_fail("f.GetSize() == 5", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp" ,0x584, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::assignRegularFacePoints(int, Matrix &) const [REAL = float]" ); } } } else { *(int *)(lVar5 + lVar16 * 4) = param_1; *(int4 *)(lVar5 + 4 + lVar16 * 4) = *puVar4; *(int4 *)(lVar5 + 8 + lVar16 * 4) = puVar4[1]; *(int4 *)(lVar5 + 0xc + lVar16 * 4) = puVar4[2]; puVar2 = (int8 *)(lVar6 + lVar16 * 4); *puVar2 = uVar8; puVar2[1] = uVar9; if (iVar17 != 4) { /* WARNING: Subroutine does not return */ __assert_fail("f.GetSize() == 4", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp" ,0x572, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::assignRegularFacePoints(int, Matrix &) const [REAL = float]" ); } } } else { *(int *)(lVar5 + lVar16 * 4) = param_1; *(int *)(lVar5 + 4 + lVar16 * 4) = iVar13; *(int8 *)(lVar6 + lVar16 * 4) = uVar7; *(int *)(lVar5 + 8 + lVar16 * 4) = iVar15; *(int4 *)(lVar6 + 8 + lVar16 * 4) = 0x3e800000; if (iVar17 != 3) { /* WARNING: Subroutine does not return */ __assert_fail("f.GetSize() == 3", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp" ,0x56b, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::assignRegularFacePoints(int, Matrix &) const [REAL = float]" ); } } } lVar18 = lVar18 + 1; } while( true ); }
29,583
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(int, OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
void GregoryTriConverter<REAL>::assignRegularFacePoints(int cIndex, Matrix & matrix) const { CornerTopology const & corner = _corners[cIndex]; int cNext = (cIndex+1) % 3; int cPrev = (cIndex+2) % 3; int const * cRing = corner.ringPoints; // // Regular face-points are computed the same for both face-points of a // a corner (fp and fm), so iterate through both and make appropriate // assignments when tagged as regular: // for (int fIsFm = 0; fIsFm < 2; ++fIsFm) { bool fIsRegular = fIsFm ? corner.fmIsRegular : corner.fpIsRegular; if (!fIsRegular) continue; Point f(matrix, 5*cIndex + 3 + fIsFm); if (corner.isCorner) { f.Assign(0, cIndex, 0.5f); f.Assign(1, cNext, 0.25f); f.Assign(2, cPrev, 0.25f); assert(f.GetSize() == 3); } else if (corner.epOnBoundary) { // Face is the first/leading face of the boundary ring: f.Assign(0, cIndex, (REAL) (11.0 / 24.0)); f.Assign(1, cRing[0], (REAL) ( 7.0 / 24.0)); f.Assign(2, cRing[1], (REAL) ( 5.0 / 24.0)); f.Assign(3, cRing[2], (REAL) ( 1.0 / 24.0)); assert(f.GetSize() == 4); } else if (corner.emOnBoundary) { // Face is the last/trailing face of the boundary ring: f.Assign(0, cIndex, (REAL) (11.0 / 24.0)); f.Assign(1, cRing[3], (REAL) ( 7.0 / 24.0)); f.Assign(2, cRing[2], (REAL) ( 5.0 / 24.0)); f.Assign(3, cRing[1], (REAL) ( 1.0 / 24.0)); assert(f.GetSize() == 4); } else { // Face is interior or the middle face of the boundary: int eNext = corner.isBoundary ? 0 : ((corner.faceInRing + 5) % 6); int ePrev = corner.isBoundary ? 3 : ((corner.faceInRing + 2) % 6); f.Assign(0, cIndex, (REAL) (10.0 / 24.0)); f.Assign(1, cPrev, 0.25f); f.Assign(2, cNext, 0.25f); f.Assign(3, cRing[ePrev], (REAL) ( 1.0 / 24.0)); f.Assign(4, cRing[eNext], (REAL) ( 1.0 / 24.0)); assert(f.GetSize() == 5); } } }
O3
cpp
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(int, OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movslq %esi, %r9 imulq $0xb0, %r9, %rax addq %rdi, %rax addq $0x18, %rax leal 0x1(%r9), %ecx movslq %ecx, %rcx imulq $0x55555556, %rcx, %rcx # imm = 0x55555556 movq %rcx, %rdi shrq $0x3f, %rdi shrq $0x20, %rcx addl %edi, %ecx leal (%rcx,%rcx,2), %ecx negl %ecx addl %r9d, %ecx incl %ecx movl %r9d, %edi addl $0x2, %edi movslq %edi, %rdi imulq $0x55555556, %rdi, %rdi # imm = 0x55555556 movq %rdi, %r8 shrq $0x3f, %r8 shrq $0x20, %rdi addl %r8d, %edi leal (%rdi,%rdi,2), %edi negl %edi addl %r9d, %edi addl $0x2, %edi movq 0x20(%rax), %r8 leal (%r9,%r9,4), %r11d movq 0x28(%rdx), %r9 movq 0x40(%rdx), %r10 movslq %r11d, %r11 shlq $0x2, %r11 addq 0x10(%rdx), %r11 movb $0x1, %dl xorl %r15d, %r15d movaps 0x5aabf(%rip), %xmm0 # 0xb9330 movaps 0x5aac8(%rip), %xmm1 # 0xb9340 movabsq $0x3fa5555555555555, %r14 # imm = 0x3FA5555555555555 movaps 0x5aa87(%rip), %xmm2 # 0xb9310 movaps 0x5aa90(%rip), %xmm3 # 0xb9320 movaps 0x5aa69(%rip), %xmm4 # 0xb9300 movabsq $0x3fd0000000000000, %rbx # imm = 0x3FD0000000000000 movl %edi, 0x4(%rsp) movl (%rax), %r12d movl %edx, %ebp notb %bpl movzbl %bpl, %ebp andl $0x1, %ebp shll $0x8, %ebp addl $0x100, %ebp # imm = 0x100 testw %bp, %r12w je 0x5ea4d movl 0x10(%r11,%r15,4), %ebp movslq 0xc(%r11,%r15,4), %r15 subl %r15d, %ebp testb $0x20, %r12b jne 0x5e970 testb $0x40, %r12b jne 0x5e996 testb %r12b, %r12b js 0x5e9cd testb $0x1, %r12b jne 0x5ea01 movl 0xc(%rax), %r12d leal 0x5(%r12), %r13d movslq %r13d, %r13 imulq $0x2aaaaaab, %r13, %r13 # imm = 0x2AAAAAAB movq %r13, %rbx shrq $0x3f, %rbx shrq $0x20, %r13 addl %ebx, %r13d addl %r13d, %r13d leal (%r13,%r13,2), %ebx negl %ebx addl %r12d, %ebx addl $0x5, %ebx movslq %ebx, %r13 movl %r12d, %ebx addl $0x2, %ebx movslq %ebx, %rbx imulq $0x2aaaaaab, %rbx, %rbx # imm = 0x2AAAAAAB movl %ecx, %edi movq %r14, %rcx movq %rbx, %r14 shrq $0x3f, %r14 shrq $0x20, %rbx addl %r14d, %ebx movq %rcx, %r14 movl %edi, %ecx movl 0x4(%rsp), %edi addl %ebx, %ebx leal (%rbx,%rbx,2), %ebx negl %ebx addl %r12d, %ebx addl $0x2, %ebx movslq %ebx, %r12 jmp 0x5ea0a movl %esi, (%r9,%r15,4) movl %ecx, 0x4(%r9,%r15,4) movups %xmm4, (%r10,%r15,8) movl %edi, 0x8(%r9,%r15,4) movq %rbx, 0x10(%r10,%r15,8) cmpl $0x3, %ebp je 0x5ea4d jmp 0x5ea70 movl %esi, (%r9,%r15,4) movl (%r8), %r12d movl %r12d, 0x4(%r9,%r15,4) movups %xmm2, (%r10,%r15,8) movl 0x4(%r8), %r12d movl %r12d, 0x8(%r9,%r15,4) movl 0x8(%r8), %r12d movl %r12d, 0xc(%r9,%r15,4) movups %xmm3, 0x10(%r10,%r15,8) cmpl $0x4, %ebp je 0x5ea4d jmp 0x5ea8f movl %esi, (%r9,%r15,4) movl 0xc(%r8), %r12d movl %r12d, 0x4(%r9,%r15,4) movups %xmm2, (%r10,%r15,8) movl 0x8(%r8), %r12d movl %r12d, 0x8(%r9,%r15,4) movl 0x4(%r8), %r12d movl %r12d, 0xc(%r9,%r15,4) movups %xmm3, 0x10(%r10,%r15,8) cmpl $0x4, %ebp je 0x5ea4d jmp 0x5eaae movl $0x3, %r12d xorl %r13d, %r13d movl %esi, (%r9,%r15,4) movl %edi, 0x4(%r9,%r15,4) movups %xmm0, (%r10,%r15,8) movl %ecx, 0x8(%r9,%r15,4) movl (%r8,%r12,4), %ebx movl %ebx, 0xc(%r9,%r15,4) movups %xmm1, 0x10(%r10,%r15,8) movl (%r8,%r13,4), %ebx movl %ebx, 0x10(%r9,%r15,4) movq %r14, 0x20(%r10,%r15,8) cmpl $0x5, %ebp movabsq $0x3fd0000000000000, %rbx # imm = 0x3FD0000000000000 jne 0x5eacd movl $0x1, %r15d testb $0x1, %dl movl $0x0, %edx jne 0x5e8a5 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x5b6c9(%rip), %rdi # 0xba140 leaq 0x5b32a(%rip), %rsi # 0xb9da8 leaq 0x5bdce(%rip), %rcx # 0xba853 movl $0x56b, %edx # imm = 0x56B callq 0x39540 leaq 0x5b731(%rip), %rdi # 0xba1c7 leaq 0x5b30b(%rip), %rsi # 0xb9da8 leaq 0x5bdaf(%rip), %rcx # 0xba853 movl $0x572, %edx # imm = 0x572 callq 0x39540 leaq 0x5b712(%rip), %rdi # 0xba1c7 leaq 0x5b2ec(%rip), %rsi # 0xb9da8 leaq 0x5bd90(%rip), %rcx # 0xba853 movl $0x579, %edx # imm = 0x579 callq 0x39540 leaq 0x5b704(%rip), %rdi # 0xba1d8 leaq 0x5b2cd(%rip), %rsi # 0xb9da8 leaq 0x5bd71(%rip), %rcx # 0xba853 movl $0x584, %edx # imm = 0x584 callq 0x39540
_ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE23assignRegularFacePointsEiRNS1_12SparseMatrixIdEE: push rbp push r15 push r14 push r13 push r12 push rbx push rax movsxd r9, esi imul rax, r9, 0B0h add rax, rdi add rax, 18h lea ecx, [r9+1] movsxd rcx, ecx imul rcx, 55555556h mov rdi, rcx shr rdi, 3Fh shr rcx, 20h add ecx, edi lea ecx, [rcx+rcx*2] neg ecx add ecx, r9d inc ecx mov edi, r9d add edi, 2 movsxd rdi, edi imul rdi, 55555556h mov r8, rdi shr r8, 3Fh shr rdi, 20h add edi, r8d lea edi, [rdi+rdi*2] neg edi add edi, r9d add edi, 2 mov r8, [rax+20h] lea r11d, [r9+r9*4] mov r9, [rdx+28h] mov r10, [rdx+40h] movsxd r11, r11d shl r11, 2 add r11, [rdx+10h] mov dl, 1 xor r15d, r15d movaps xmm0, cs:xmmword_B9330 movaps xmm1, cs:xmmword_B9340 mov r14, 3FA5555555555555h movaps xmm2, cs:xmmword_B9310 movaps xmm3, cs:xmmword_B9320 movaps xmm4, cs:xmmword_B9300 mov rbx, 3FD0000000000000h mov [rsp+38h+var_34], edi loc_5E8A5: mov r12d, [rax] mov ebp, edx not bpl movzx ebp, bpl and ebp, 1 shl ebp, 8 add ebp, 100h test r12w, bp jz loc_5EA4D mov ebp, [r11+r15*4+10h] movsxd r15, dword ptr [r11+r15*4+0Ch] sub ebp, r15d test r12b, 20h jnz loc_5E970 test r12b, 40h jnz loc_5E996 test r12b, r12b js loc_5E9CD test r12b, 1 jnz loc_5EA01 mov r12d, [rax+0Ch] lea r13d, [r12+5] movsxd r13, r13d imul r13, 2AAAAAABh mov rbx, r13 shr rbx, 3Fh shr r13, 20h add r13d, ebx add r13d, r13d lea ebx, [r13+r13*2+0] neg ebx add ebx, r12d add ebx, 5 movsxd r13, ebx mov ebx, r12d add ebx, 2 movsxd rbx, ebx imul rbx, 2AAAAAABh mov edi, ecx mov rcx, r14 mov r14, rbx shr r14, 3Fh shr rbx, 20h add ebx, r14d mov r14, rcx mov ecx, edi mov edi, [rsp+38h+var_34] add ebx, ebx lea ebx, [rbx+rbx*2] neg ebx add ebx, r12d add ebx, 2 movsxd r12, ebx jmp loc_5EA0A loc_5E970: mov [r9+r15*4], esi mov [r9+r15*4+4], ecx movups xmmword ptr [r10+r15*8], xmm4 mov [r9+r15*4+8], edi mov [r10+r15*8+10h], rbx cmp ebp, 3 jz loc_5EA4D jmp loc_5EA70 loc_5E996: mov [r9+r15*4], esi mov r12d, [r8] mov [r9+r15*4+4], r12d movups xmmword ptr [r10+r15*8], xmm2 mov r12d, [r8+4] mov [r9+r15*4+8], r12d mov r12d, [r8+8] mov [r9+r15*4+0Ch], r12d movups xmmword ptr [r10+r15*8+10h], xmm3 cmp ebp, 4 jz loc_5EA4D jmp loc_5EA8F loc_5E9CD: mov [r9+r15*4], esi mov r12d, [r8+0Ch] mov [r9+r15*4+4], r12d movups xmmword ptr [r10+r15*8], xmm2 mov r12d, [r8+8] mov [r9+r15*4+8], r12d mov r12d, [r8+4] mov [r9+r15*4+0Ch], r12d movups xmmword ptr [r10+r15*8+10h], xmm3 cmp ebp, 4 jz short loc_5EA4D jmp loc_5EAAE loc_5EA01: mov r12d, 3 xor r13d, r13d loc_5EA0A: mov [r9+r15*4], esi mov [r9+r15*4+4], edi movups xmmword ptr [r10+r15*8], xmm0 mov [r9+r15*4+8], ecx mov ebx, [r8+r12*4] mov [r9+r15*4+0Ch], ebx movups xmmword ptr [r10+r15*8+10h], xmm1 mov ebx, [r8+r13*4] mov [r9+r15*4+10h], ebx mov [r10+r15*8+20h], r14 cmp ebp, 5 mov rbx, 3FD0000000000000h jnz loc_5EACD loc_5EA4D: mov r15d, 1 test dl, 1 mov edx, 0 jnz loc_5E8A5 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_5EA70: lea rdi, aFGetsize3; "f.GetSize() == 3" lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_54; "void OpenSubdiv::v3_6_0::Far::GregoryTr"... mov edx, 56Bh call ___assert_fail loc_5EA8F: lea rdi, aFGetsize4; "f.GetSize() == 4" lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_54; "void OpenSubdiv::v3_6_0::Far::GregoryTr"... mov edx, 572h call ___assert_fail loc_5EAAE: lea rdi, aFGetsize4; "f.GetSize() == 4" lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_54; "void OpenSubdiv::v3_6_0::Far::GregoryTr"... mov edx, 579h call ___assert_fail loc_5EACD: lea rdi, aFGetsize5; "f.GetSize() == 5" lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_54; "void OpenSubdiv::v3_6_0::Far::GregoryTr"... mov edx, 584h call ___assert_fail
long long OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints( long long a1, int a2, _QWORD *a3) { long long result; // rax int v4; // ecx int v5; // edi _DWORD *v6; // r8 long long v7; // r9 long long v8; // r10 long long v9; // r11 char v10; // dl long long v11; // r15 int v12; // r12d int v13; // ebp long long v14; // r15 int v15; // ebp int v16; // r12d long long v17; // r13 long long v18; // r12 bool v19; // zf result = a1 + 176LL * a2 + 24; v4 = a2 - 3 * ((a2 + 1) / 3) + 1; v5 = a2 - 3 * ((a2 + 2) / 3) + 2; v6 = *(_DWORD **)(result + 32); v7 = a3[5]; v8 = a3[8]; v9 = a3[2] + 20LL * a2; v10 = 1; v11 = 0LL; do { v12 = *(_DWORD *)result; if ( ((unsigned __int16)((((v10 & 1) == 0) << 8) + 256) & (unsigned __int16)*(_DWORD *)result) != 0 ) { v13 = *(_DWORD *)(v9 + 4 * v11 + 16); v14 = *(int *)(v9 + 4 * v11 + 12); v15 = v13 - v14; if ( (v12 & 0x20) != 0 ) { *(_DWORD *)(v7 + 4 * v14) = a2; *(_DWORD *)(v7 + 4 * v14 + 4) = v4; *(_OWORD *)(v8 + 8 * v14) = xmmword_B9300; *(_DWORD *)(v7 + 4 * v14 + 8) = v5; *(_QWORD *)(v8 + 8 * v14 + 16) = 0x3FD0000000000000LL; if ( v15 != 3 ) __assert_fail( "f.GetSize() == 3", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1387LL, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(int, Matrix &) const [REAL = double]"); } else if ( (v12 & 0x40) != 0 ) { *(_DWORD *)(v7 + 4 * v14) = a2; *(_DWORD *)(v7 + 4 * v14 + 4) = *v6; *(_OWORD *)(v8 + 8 * v14) = xmmword_B9310; *(_DWORD *)(v7 + 4 * v14 + 8) = v6[1]; *(_DWORD *)(v7 + 4 * v14 + 12) = v6[2]; *(_OWORD *)(v8 + 8 * v14 + 16) = xmmword_B9320; if ( v15 != 4 ) __assert_fail( "f.GetSize() == 4", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1394LL, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(int, Matrix &) const [REAL = double]"); } else if ( (v12 & 0x80u) != 0 ) { *(_DWORD *)(v7 + 4 * v14) = a2; *(_DWORD *)(v7 + 4 * v14 + 4) = v6[3]; *(_OWORD *)(v8 + 8 * v14) = xmmword_B9310; *(_DWORD *)(v7 + 4 * v14 + 8) = v6[2]; *(_DWORD *)(v7 + 4 * v14 + 12) = v6[1]; *(_OWORD *)(v8 + 8 * v14 + 16) = xmmword_B9320; if ( v15 != 4 ) __assert_fail( "f.GetSize() == 4", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1401LL, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(int, Matrix &) const [REAL = double]"); } else { if ( (v12 & 1) != 0 ) { v18 = 3LL; v17 = 0LL; } else { v16 = *(_DWORD *)(result + 12); v17 = v16 - 6 * ((v16 + 5) / 6) + 5; v5 = a2 - 3 * ((a2 + 2) / 3) + 2; v18 = v16 - 6 * ((v16 + 2) / 6) + 2; } *(_DWORD *)(v7 + 4 * v14) = a2; *(_DWORD *)(v7 + 4 * v14 + 4) = v5; *(_OWORD *)(v8 + 8 * v14) = xmmword_B9330; *(_DWORD *)(v7 + 4 * v14 + 8) = v4; *(_DWORD *)(v7 + 4 * v14 + 12) = v6[v18]; *(_OWORD *)(v8 + 8 * v14 + 16) = xmmword_B9340; *(_DWORD *)(v7 + 4 * v14 + 16) = v6[v17]; *(_QWORD *)(v8 + 8 * v14 + 32) = 0x3FA5555555555555LL; if ( v15 != 5 ) __assert_fail( "f.GetSize() == 5", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1412LL, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(int, Matrix &) const [REAL = double]"); } } v11 = 1LL; v19 = (v10 & 1) == 0; v10 = 0; } while ( !v19 ); return result; }
assignRegularFacePoints: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOVSXD R9,ESI IMUL RAX,R9,0xb0 ADD RAX,RDI ADD RAX,0x18 LEA ECX,[R9 + 0x1] MOVSXD RCX,ECX IMUL RCX,RCX,0x55555556 MOV RDI,RCX SHR RDI,0x3f SHR RCX,0x20 ADD ECX,EDI LEA ECX,[RCX + RCX*0x2] NEG ECX ADD ECX,R9D INC ECX MOV EDI,R9D ADD EDI,0x2 MOVSXD RDI,EDI IMUL RDI,RDI,0x55555556 MOV R8,RDI SHR R8,0x3f SHR RDI,0x20 ADD EDI,R8D LEA EDI,[RDI + RDI*0x2] NEG EDI ADD EDI,R9D ADD EDI,0x2 MOV R8,qword ptr [RAX + 0x20] LEA R11D,[R9 + R9*0x4] MOV R9,qword ptr [RDX + 0x28] MOV R10,qword ptr [RDX + 0x40] MOVSXD R11,R11D SHL R11,0x2 ADD R11,qword ptr [RDX + 0x10] MOV DL,0x1 XOR R15D,R15D MOVAPS XMM0,xmmword ptr [0x001b9330] MOVAPS XMM1,xmmword ptr [0x001b9340] MOV R14,0x3fa5555555555555 MOVAPS XMM2,xmmword ptr [0x001b9310] MOVAPS XMM3,xmmword ptr [0x001b9320] MOVAPS XMM4,xmmword ptr [0x001b9300] MOV RBX,0x3fd0000000000000 MOV dword ptr [RSP + 0x4],EDI LAB_0015e8a5: MOV R12D,dword ptr [RAX] MOV EBP,EDX NOT BPL MOVZX EBP,BPL AND EBP,0x1 SHL EBP,0x8 ADD EBP,0x100 TEST R12W,BP JZ 0x0015ea4d MOV EBP,dword ptr [R11 + R15*0x4 + 0x10] MOVSXD R15,dword ptr [R11 + R15*0x4 + 0xc] SUB EBP,R15D TEST R12B,0x20 JNZ 0x0015e970 TEST R12B,0x40 JNZ 0x0015e996 TEST R12B,R12B JS 0x0015e9cd TEST R12B,0x1 JNZ 0x0015ea01 MOV R12D,dword ptr [RAX + 0xc] LEA R13D,[R12 + 0x5] MOVSXD R13,R13D IMUL R13,R13,0x2aaaaaab MOV RBX,R13 SHR RBX,0x3f SHR R13,0x20 ADD R13D,EBX ADD R13D,R13D LEA EBX,[R13 + R13*0x2] NEG EBX ADD EBX,R12D ADD EBX,0x5 MOVSXD R13,EBX MOV EBX,R12D ADD EBX,0x2 MOVSXD RBX,EBX IMUL RBX,RBX,0x2aaaaaab MOV EDI,ECX MOV RCX,R14 MOV R14,RBX SHR R14,0x3f SHR RBX,0x20 ADD EBX,R14D MOV R14,RCX MOV ECX,EDI MOV EDI,dword ptr [RSP + 0x4] ADD EBX,EBX LEA EBX,[RBX + RBX*0x2] NEG EBX ADD EBX,R12D ADD EBX,0x2 MOVSXD R12,EBX JMP 0x0015ea0a LAB_0015e970: MOV dword ptr [R9 + R15*0x4],ESI MOV dword ptr [R9 + R15*0x4 + 0x4],ECX MOVUPS xmmword ptr [R10 + R15*0x8],XMM4 MOV dword ptr [R9 + R15*0x4 + 0x8],EDI MOV qword ptr [R10 + R15*0x8 + 0x10],RBX CMP EBP,0x3 JZ 0x0015ea4d JMP 0x0015ea70 LAB_0015e996: MOV dword ptr [R9 + R15*0x4],ESI MOV R12D,dword ptr [R8] MOV dword ptr [R9 + R15*0x4 + 0x4],R12D MOVUPS xmmword ptr [R10 + R15*0x8],XMM2 MOV R12D,dword ptr [R8 + 0x4] MOV dword ptr [R9 + R15*0x4 + 0x8],R12D MOV R12D,dword ptr [R8 + 0x8] MOV dword ptr [R9 + R15*0x4 + 0xc],R12D MOVUPS xmmword ptr [R10 + R15*0x8 + 0x10],XMM3 CMP EBP,0x4 JZ 0x0015ea4d JMP 0x0015ea8f LAB_0015e9cd: MOV dword ptr [R9 + R15*0x4],ESI MOV R12D,dword ptr [R8 + 0xc] MOV dword ptr [R9 + R15*0x4 + 0x4],R12D MOVUPS xmmword ptr [R10 + R15*0x8],XMM2 MOV R12D,dword ptr [R8 + 0x8] MOV dword ptr [R9 + R15*0x4 + 0x8],R12D MOV R12D,dword ptr [R8 + 0x4] MOV dword ptr [R9 + R15*0x4 + 0xc],R12D MOVUPS xmmword ptr [R10 + R15*0x8 + 0x10],XMM3 CMP EBP,0x4 JZ 0x0015ea4d JMP 0x0015eaae LAB_0015ea01: MOV R12D,0x3 XOR R13D,R13D LAB_0015ea0a: MOV dword ptr [R9 + R15*0x4],ESI MOV dword ptr [R9 + R15*0x4 + 0x4],EDI MOVUPS xmmword ptr [R10 + R15*0x8],XMM0 MOV dword ptr [R9 + R15*0x4 + 0x8],ECX MOV EBX,dword ptr [R8 + R12*0x4] MOV dword ptr [R9 + R15*0x4 + 0xc],EBX MOVUPS xmmword ptr [R10 + R15*0x8 + 0x10],XMM1 MOV EBX,dword ptr [R8 + R13*0x4] MOV dword ptr [R9 + R15*0x4 + 0x10],EBX MOV qword ptr [R10 + R15*0x8 + 0x20],R14 CMP EBP,0x5 MOV RBX,0x3fd0000000000000 JNZ 0x0015eacd LAB_0015ea4d: MOV R15D,0x1 TEST DL,0x1 MOV EDX,0x0 JNZ 0x0015e8a5 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0015ea70: LEA RDI,[0x1ba140] LEA RSI,[0x1b9da8] LEA RCX,[0x1ba853] MOV EDX,0x56b CALL 0x00139540 LAB_0015ea8f: LEA RDI,[0x1ba1c7] LEA RSI,[0x1b9da8] LEA RCX,[0x1ba853] MOV EDX,0x572 CALL 0x00139540 LAB_0015eaae: LEA RDI,[0x1ba1c7] LEA RSI,[0x1b9da8] LEA RCX,[0x1ba853] MOV EDX,0x579 CALL 0x00139540 LAB_0015eacd: LEA RDI,[0x1ba1d8] LEA RSI,[0x1b9da8] LEA RCX,[0x1ba853] MOV EDX,0x584 CALL 0x00139540
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(int, OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&) const */ void __thiscall OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints (GregoryTriConverter<double> *this,int param_1,SparseMatrix *param_2) { int8 *puVar1; uint uVar2; int iVar3; int4 *puVar4; long lVar5; long lVar6; bool bVar7; bool bVar8; int8 uVar9; int8 uVar10; int8 uVar11; int8 uVar12; int8 uVar13; int8 uVar14; int8 uVar15; int8 uVar16; int8 uVar17; int8 uVar18; int iVar19; int iVar20; int iVar21; long lVar22; long lVar23; long lVar24; long lVar25; uVar18 = _UNK_001b9348; uVar17 = _DAT_001b9340; uVar16 = _UNK_001b9338; uVar15 = _DAT_001b9330; uVar14 = _UNK_001b9328; uVar13 = _DAT_001b9320; uVar12 = _UNK_001b9318; uVar11 = _DAT_001b9310; uVar10 = _UNK_001b9308; uVar9 = _DAT_001b9300; iVar19 = ((param_1 + 1) / 3) * -3 + param_1 + 1; iVar21 = ((param_1 + 2) / 3) * -3 + param_1 + 2; puVar4 = *(int4 **)(this + (long)param_1 * 0xb0 + 0x38); lVar5 = *(long *)(param_2 + 0x28); lVar6 = *(long *)(param_2 + 0x40); lVar22 = (long)(param_1 * 5) * 4 + *(long *)(param_2 + 0x10); lVar23 = 0; bVar7 = true; do { uVar2 = *(uint *)(this + (long)param_1 * 0xb0 + 0x18); if ((ushort)((ushort)uVar2 & (short)(((byte)~bVar7 & 1) << 8) + 0x100U) != 0) { iVar20 = *(int *)(lVar22 + 0xc + lVar23 * 4); lVar25 = (long)iVar20; iVar20 = *(int *)(lVar22 + 0x10 + lVar23 * 4) - iVar20; if ((uVar2 & 0x20) == 0) { if ((uVar2 & 0x40) == 0) { if ((char)uVar2 < '\0') { *(int *)(lVar5 + lVar25 * 4) = param_1; *(int4 *)(lVar5 + 4 + lVar25 * 4) = puVar4[3]; puVar1 = (int8 *)(lVar6 + lVar25 * 8); *puVar1 = uVar11; puVar1[1] = uVar12; *(int4 *)(lVar5 + 8 + lVar25 * 4) = puVar4[2]; *(int4 *)(lVar5 + 0xc + lVar25 * 4) = puVar4[1]; puVar1 = (int8 *)(lVar6 + 0x10 + lVar25 * 8); *puVar1 = uVar13; puVar1[1] = uVar14; if (iVar20 != 4) { /* WARNING: Subroutine does not return */ __assert_fail("f.GetSize() == 4", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp" ,0x579, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(int, Matrix &) const [REAL = double]" ); } } else { if ((uVar2 & 1) == 0) { iVar3 = *(int *)(this + (long)param_1 * 0xb0 + 0x24); lVar24 = (long)(((iVar3 + 5) / 6) * -6 + iVar3 + 5); lVar23 = (long)(((iVar3 + 2) / 6) * -6 + iVar3 + 2); } else { lVar23 = 3; lVar24 = 0; } *(int *)(lVar5 + lVar25 * 4) = param_1; *(int *)(lVar5 + 4 + lVar25 * 4) = iVar21; puVar1 = (int8 *)(lVar6 + lVar25 * 8); *puVar1 = uVar15; puVar1[1] = uVar16; *(int *)(lVar5 + 8 + lVar25 * 4) = iVar19; *(int4 *)(lVar5 + 0xc + lVar25 * 4) = puVar4[lVar23]; puVar1 = (int8 *)(lVar6 + 0x10 + lVar25 * 8); *puVar1 = uVar17; puVar1[1] = uVar18; *(int4 *)(lVar5 + 0x10 + lVar25 * 4) = puVar4[lVar24]; *(int8 *)(lVar6 + 0x20 + lVar25 * 8) = 0x3fa5555555555555; if (iVar20 != 5) { /* WARNING: Subroutine does not return */ __assert_fail("f.GetSize() == 5", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp" ,0x584, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(int, Matrix &) const [REAL = double]" ); } } } else { *(int *)(lVar5 + lVar25 * 4) = param_1; *(int4 *)(lVar5 + 4 + lVar25 * 4) = *puVar4; puVar1 = (int8 *)(lVar6 + lVar25 * 8); *puVar1 = uVar11; puVar1[1] = uVar12; *(int4 *)(lVar5 + 8 + lVar25 * 4) = puVar4[1]; *(int4 *)(lVar5 + 0xc + lVar25 * 4) = puVar4[2]; puVar1 = (int8 *)(lVar6 + 0x10 + lVar25 * 8); *puVar1 = uVar13; puVar1[1] = uVar14; if (iVar20 != 4) { /* WARNING: Subroutine does not return */ __assert_fail("f.GetSize() == 4", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp" ,0x572, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(int, Matrix &) const [REAL = double]" ); } } } else { *(int *)(lVar5 + lVar25 * 4) = param_1; *(int *)(lVar5 + 4 + lVar25 * 4) = iVar19; puVar1 = (int8 *)(lVar6 + lVar25 * 8); *puVar1 = uVar9; puVar1[1] = uVar10; *(int *)(lVar5 + 8 + lVar25 * 4) = iVar21; *(int8 *)(lVar6 + 0x10 + lVar25 * 8) = 0x3fd0000000000000; if (iVar20 != 3) { /* WARNING: Subroutine does not return */ __assert_fail("f.GetSize() == 3", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp" ,0x56b, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::assignRegularFacePoints(int, Matrix &) const [REAL = double]" ); } } } lVar23 = 1; bVar8 = !bVar7; bVar7 = false; if (bVar8) { return; } } while( true ); }
29,584
google::protobuf::internal::WireFormat::MessageSetParser::ParseMessageSet(char const*, google::protobuf::internal::ParseContext*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/wire_format.cc
const char* ParseMessageSet(const char* ptr, internal::ParseContext* ctx) { while (!ctx->Done(&ptr)) { uint32_t tag; ptr = ReadTag(ptr, &tag); if (PROTOBUF_PREDICT_FALSE(ptr == nullptr)) return nullptr; if (tag == 0 || (tag & 7) == WireFormatLite::WIRETYPE_END_GROUP) { ctx->SetLastTag(tag); break; } if (tag == WireFormatLite::kMessageSetItemStartTag) { // A message set item starts ptr = ctx->ParseGroup(this, ptr, tag); } else { // Parse other fields as normal extensions. int field_number = WireFormatLite::GetTagFieldNumber(tag); const FieldDescriptor* field = nullptr; if (descriptor->IsExtensionNumber(field_number)) { if (ctx->data().pool == nullptr) { field = reflection->FindKnownExtensionByNumber(field_number); } else { field = ctx->data().pool->FindExtensionByNumber(descriptor, field_number); } } ptr = WireFormat::_InternalParseAndMergeField(msg, ptr, ctx, tag, reflection, field); } if (PROTOBUF_PREDICT_FALSE(ptr == nullptr)) return nullptr; } return ptr; }
O3
cpp
google::protobuf::internal::WireFormat::MessageSetParser::ParseMessageSet(char const*, google::protobuf::internal::ParseContext*): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdx, %rbx movq %rdi, %r14 leaq 0x8(%rsp), %r15 movq %rsi, (%r15) movl 0x5c(%rbx), %edx movq %rbx, %rdi movq %r15, %rsi callq 0x12fe7e movq 0x8(%rsp), %rdi testb %al, %al jne 0x87efd movzbl (%rdi), %r12d leaq 0x1(%rdi), %rax testb %r12b, %r12b jns 0x87e16 movzbl (%rax), %eax movl %eax, %ecx shll $0x7, %ecx addl %ecx, %r12d addl $-0x80, %r12d testb %al, %al js 0x87eac addq $0x2, %rdi movq %rdi, %rax movq %rax, 0x8(%rsp) testl %r12d, %r12d je 0x87f02 movl %r12d, %ecx andl $0x7, %ecx cmpl $0x4, %ecx je 0x87f02 cmpl $0xb, %r12d jne 0x87e7b movl 0x58(%rbx), %ecx leal -0x1(%rcx), %edx movl %edx, 0x58(%rbx) testl %ecx, %ecx jle 0x87ef9 incl 0x5c(%rbx) movq %r14, %rdi movq %rax, %rsi movq %rbx, %rdx callq 0x166834 movq 0x58(%rbx), %xmm0 paddd 0x1763c8(%rip), %xmm0 # 0x1fe230 movq %xmm0, 0x58(%rbx) movl 0x50(%rbx), %ecx andl $0x0, 0x50(%rbx) cmpl $0xb, %ecx je 0x87eeb jmp 0x87ef9 movl %r12d, %ebp shrl $0x3, %ebp movq 0x8(%r14), %rdi movl %ebp, %esi callq 0x17a446 testq %rax, %rax je 0x87ea7 movq 0x60(%rbx), %rdi testq %rdi, %rdi je 0x87ec6 movq 0x8(%r14), %rsi movl %ebp, %edx callq 0x1793e0 jmp 0x87ed1 xorl %r9d, %r9d jmp 0x87ed4 movl %r12d, %esi callq 0x135722 movq %rax, 0x8(%rsp) testq %rax, %rax je 0x87ef9 movl %edx, %r12d jmp 0x87e1b movq 0x10(%r14), %rdi movl %ebp, %esi callq 0x14d942 movq %rax, %r9 movq 0x8(%rsp), %rsi movl %r12d, %ecx movq (%r14), %rdi movq 0x10(%r14), %r8 movq %rbx, %rdx callq 0x1613de movq %rax, 0x8(%rsp) testq %rax, %rax jne 0x87dd0 xorl %eax, %eax jmp 0x87f09 movq %rdi, %rax jmp 0x87f09 decl %r12d movl %r12d, 0x50(%rbx) addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_ZN6google8protobuf8internal10WireFormat16MessageSetParser15ParseMessageSetEPKcPNS1_12ParseContextE: push rbp push r15 push r14 push r12 push rbx sub rsp, 10h mov rbx, rdx mov r14, rdi lea r15, [rsp+38h+var_30] mov [r15], rsi loc_87DD0: mov edx, [rbx+5Ch]; int mov rdi, rbx; this mov rsi, r15; char ** call _ZN6google8protobuf8internal18EpsCopyInputStream13DoneWithCheckEPPKci; google::protobuf::internal::EpsCopyInputStream::DoneWithCheck(char const**,int) mov rdi, [rsp+38h+var_30]; this test al, al jnz loc_87EFD movzx r12d, byte ptr [rdi] lea rax, [rdi+1] test r12b, r12b jns short loc_87E16 movzx eax, byte ptr [rax] mov ecx, eax shl ecx, 7 add r12d, ecx add r12d, 0FFFFFF80h test al, al js loc_87EAC add rdi, 2 mov rax, rdi loc_87E16: mov [rsp+38h+var_30], rax loc_87E1B: test r12d, r12d jz loc_87F02 mov ecx, r12d and ecx, 7 cmp ecx, 4 jz loc_87F02 cmp r12d, 0Bh jnz short loc_87E7B mov ecx, [rbx+58h] lea edx, [rcx-1] mov [rbx+58h], edx test ecx, ecx jle loc_87EF9 inc dword ptr [rbx+5Ch] mov rdi, r14; this mov rsi, rax; char * mov rdx, rbx; google::protobuf::internal::ParseContext * call _ZN6google8protobuf8internal10WireFormat16MessageSetParser14_InternalParseEPKcPNS1_12ParseContextE; google::protobuf::internal::WireFormat::MessageSetParser::_InternalParse(char const*,google::protobuf::internal::ParseContext *) movq xmm0, qword ptr [rbx+58h] paddd xmm0, cs:xmmword_1FE230 movq qword ptr [rbx+58h], xmm0 mov ecx, [rbx+50h] and dword ptr [rbx+50h], 0 cmp ecx, 0Bh jz short loc_87EEB jmp short loc_87EF9 loc_87E7B: mov ebp, r12d shr ebp, 3 mov rdi, [r14+8]; this mov esi, ebp; int call _ZNK6google8protobuf10Descriptor34FindExtensionRangeContainingNumberEi; google::protobuf::Descriptor::FindExtensionRangeContainingNumber(int) test rax, rax jz short loc_87EA7 mov rdi, [rbx+60h]; this test rdi, rdi jz short loc_87EC6 mov rsi, [r14+8]; google::protobuf::Descriptor * mov edx, ebp; int call _ZNK6google8protobuf14DescriptorPool21FindExtensionByNumberEPKNS0_10DescriptorEi; google::protobuf::DescriptorPool::FindExtensionByNumber(google::protobuf::Descriptor const*,int) jmp short loc_87ED1 loc_87EA7: xor r9d, r9d jmp short loc_87ED4 loc_87EAC: mov esi, r12d; char * call _ZN6google8protobuf8internal15ReadTagFallbackEPKcj; google::protobuf::internal::ReadTagFallback(char const*,uint) mov [rsp+38h+var_30], rax test rax, rax jz short loc_87EF9 mov r12d, edx jmp loc_87E1B loc_87EC6: mov rdi, [r14+10h]; this mov esi, ebp; int call _ZNK6google8protobuf10Reflection26FindKnownExtensionByNumberEi; google::protobuf::Reflection::FindKnownExtensionByNumber(int) loc_87ED1: mov r9, rax; google::protobuf::Reflection * loc_87ED4: mov rsi, [rsp+38h+var_30]; google::protobuf::Message * mov ecx, r12d; google::protobuf::internal::ParseContext * mov rdi, [r14]; this mov r8, [r14+10h]; google::protobuf::Reflection * mov rdx, rbx; char * call _ZN6google8protobuf8internal10WireFormat27_InternalParseAndMergeFieldEPNS0_7MessageEPKcPNS1_12ParseContextEmPKNS0_10ReflectionEPKNS0_15FieldDescriptorE; google::protobuf::internal::WireFormat::_InternalParseAndMergeField(google::protobuf::Message *,char const*,google::protobuf::internal::ParseContext *,ulong,google::protobuf::Reflection const*,google::protobuf::FieldDescriptor const*) loc_87EEB: mov [rsp+38h+var_30], rax test rax, rax jnz loc_87DD0 loc_87EF9: xor eax, eax jmp short loc_87F09 loc_87EFD: mov rax, rdi jmp short loc_87F09 loc_87F02: dec r12d mov [rbx+50h], r12d loc_87F09: add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn
google::protobuf::internal * google::protobuf::internal::WireFormat::MessageSetParser::ParseMessageSet( const google::protobuf::Descriptor **this, google::protobuf::internal *a2, google::protobuf::internal::ParseContext *a3) { unsigned int v5; // edx unsigned int v6; // r12d google::protobuf::internal *result; // rax int v8; // eax int v9; // ecx google::protobuf::internal *v10; // rax int v11; // ecx int v12; // ebp google::protobuf::DescriptorPool *v13; // rdi long long ExtensionByNumber; // rax const google::protobuf::Reflection *v15; // r9 unsigned int v16; // edx const google::protobuf::FieldDescriptor *v17; // [rsp+0h] [rbp-38h] google::protobuf::internal *v18; // [rsp+8h] [rbp-30h] BYREF v18 = a2; while ( 1 ) { if ( (unsigned __int8)google::protobuf::internal::EpsCopyInputStream::DoneWithCheck( a3, (const char **)&v18, *((_DWORD *)a3 + 23)) ) return v18; v6 = *(unsigned __int8 *)v18; result = (google::protobuf::internal *)((char *)v18 + 1); if ( (v6 & 0x80u) == 0 ) goto LABEL_6; v8 = *(unsigned __int8 *)result; v6 = (v8 << 7) + v6 - 128; if ( (v8 & 0x80u) == 0 ) { result = (google::protobuf::internal *)((char *)v18 + 2); LABEL_6: v18 = result; goto LABEL_7; } result = (google::protobuf::internal *)google::protobuf::internal::ReadTagFallback(v18, (const char *)v6, v5); v18 = result; if ( !result ) return 0LL; v6 = v16; LABEL_7: if ( !v6 || (v6 & 7) == 4 ) break; if ( v6 == 11 ) { v9 = *((_DWORD *)a3 + 22); *((_DWORD *)a3 + 22) = v9 - 1; if ( v9 <= 0 ) return 0LL; ++*((_DWORD *)a3 + 23); v10 = (google::protobuf::internal *)google::protobuf::internal::WireFormat::MessageSetParser::_InternalParse( (google::protobuf::internal::WireFormat::MessageSetParser *)this, (const char *)result, a3); *((_QWORD *)a3 + 11) = _mm_add_epi32(_mm_loadl_epi64((const __m128i *)((char *)a3 + 88)), (__m128i)xmmword_1FE230).m128i_u64[0]; v11 = *((_DWORD *)a3 + 20); *((_DWORD *)a3 + 20) = 0; if ( v11 != 11 ) return 0LL; } else { v12 = v6 >> 3; if ( google::protobuf::Descriptor::FindExtensionRangeContainingNumber(this[1], v6 >> 3) ) { v13 = (google::protobuf::DescriptorPool *)*((_QWORD *)a3 + 12); if ( v13 ) ExtensionByNumber = google::protobuf::DescriptorPool::FindExtensionByNumber(v13, this[1], v12); else ExtensionByNumber = google::protobuf::Reflection::FindKnownExtensionByNumber(this[2], v12); v15 = (const google::protobuf::Reflection *)ExtensionByNumber; } else { v15 = 0LL; } v10 = (google::protobuf::internal *)google::protobuf::internal::WireFormat::_InternalParseAndMergeField( *this, v18, (const char *)a3, (google::protobuf::internal::ParseContext *)v6, this[2], v15, v17); } v18 = v10; if ( !v10 ) return 0LL; } *((_DWORD *)a3 + 20) = v6 - 1; return result; }
ParseMessageSet: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV RBX,RDX MOV R14,RDI LEA R15,[RSP + 0x8] MOV qword ptr [R15],RSI LAB_00187dd0: MOV EDX,dword ptr [RBX + 0x5c] MOV RDI,RBX MOV RSI,R15 CALL 0x0022fe7e MOV RDI,qword ptr [RSP + 0x8] TEST AL,AL JNZ 0x00187efd MOVZX R12D,byte ptr [RDI] LEA RAX,[RDI + 0x1] TEST R12B,R12B JNS 0x00187e16 MOVZX EAX,byte ptr [RAX] MOV ECX,EAX SHL ECX,0x7 ADD R12D,ECX ADD R12D,-0x80 TEST AL,AL JS 0x00187eac ADD RDI,0x2 MOV RAX,RDI LAB_00187e16: MOV qword ptr [RSP + 0x8],RAX LAB_00187e1b: TEST R12D,R12D JZ 0x00187f02 MOV ECX,R12D AND ECX,0x7 CMP ECX,0x4 JZ 0x00187f02 CMP R12D,0xb JNZ 0x00187e7b MOV ECX,dword ptr [RBX + 0x58] LEA EDX,[RCX + -0x1] MOV dword ptr [RBX + 0x58],EDX TEST ECX,ECX JLE 0x00187ef9 INC dword ptr [RBX + 0x5c] MOV RDI,R14 MOV RSI,RAX MOV RDX,RBX CALL 0x00266834 MOVQ XMM0,qword ptr [RBX + 0x58] PADDD XMM0,xmmword ptr [0x002fe230] MOVQ qword ptr [RBX + 0x58],XMM0 MOV ECX,dword ptr [RBX + 0x50] AND dword ptr [RBX + 0x50],0x0 CMP ECX,0xb JZ 0x00187eeb JMP 0x00187ef9 LAB_00187e7b: MOV EBP,R12D SHR EBP,0x3 MOV RDI,qword ptr [R14 + 0x8] MOV ESI,EBP CALL 0x0027a446 TEST RAX,RAX JZ 0x00187ea7 MOV RDI,qword ptr [RBX + 0x60] TEST RDI,RDI JZ 0x00187ec6 MOV RSI,qword ptr [R14 + 0x8] MOV EDX,EBP CALL 0x002793e0 JMP 0x00187ed1 LAB_00187ea7: XOR R9D,R9D JMP 0x00187ed4 LAB_00187eac: MOV ESI,R12D CALL 0x00235722 MOV qword ptr [RSP + 0x8],RAX TEST RAX,RAX JZ 0x00187ef9 MOV R12D,EDX JMP 0x00187e1b LAB_00187ec6: MOV RDI,qword ptr [R14 + 0x10] MOV ESI,EBP CALL 0x0024d942 LAB_00187ed1: MOV R9,RAX LAB_00187ed4: MOV RSI,qword ptr [RSP + 0x8] MOV ECX,R12D MOV RDI,qword ptr [R14] MOV R8,qword ptr [R14 + 0x10] MOV RDX,RBX CALL 0x002613de LAB_00187eeb: MOV qword ptr [RSP + 0x8],RAX TEST RAX,RAX JNZ 0x00187dd0 LAB_00187ef9: XOR EAX,EAX JMP 0x00187f09 LAB_00187efd: MOV RAX,RDI JMP 0x00187f09 LAB_00187f02: DEC R12D MOV dword ptr [RBX + 0x50],R12D LAB_00187f09: ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* google::protobuf::internal::WireFormat::MessageSetParser::ParseMessageSet(char const*, google::protobuf::internal::ParseContext*) */ byte * __thiscall google::protobuf::internal::WireFormat::MessageSetParser::ParseMessageSet (MessageSetParser *this,char *param_1,ParseContext *param_2) { byte bVar1; byte bVar2; int iVar3; char cVar4; long lVar5; FieldDescriptor *pFVar6; uint uVar7; uint uVar8; int1 auVar9 [12]; byte *local_30; local_30 = (byte *)param_1; do { cVar4 = EpsCopyInputStream::DoneWithCheck ((EpsCopyInputStream *)param_2,(char **)&local_30,*(int *)(param_2 + 0x5c)); if (cVar4 != '\0') { return local_30; } bVar1 = *local_30; auVar9[8] = bVar1; auVar9._0_8_ = local_30 + 1; auVar9._9_3_ = 0; if ((char)bVar1 < '\0') { bVar2 = local_30[1]; uVar8 = ((uint)bVar1 + (uint)bVar2 * 0x80) - 0x80; if ((char)bVar2 < '\0') { auVar9 = ReadTagFallback((char *)local_30,uVar8); if (auVar9._0_8_ == 0) { return (byte *)0x0; } } else { auVar9._8_4_ = uVar8; auVar9._0_8_ = local_30 + 2; } } uVar8 = auVar9._8_4_; local_30 = auVar9._0_8_; if ((uVar8 == 0) || ((uVar8 & 7) == 4)) { *(uint *)(param_2 + 0x50) = uVar8 - 1; return local_30; } if (uVar8 == 0xb) { iVar3 = *(int *)(param_2 + 0x58); *(int *)(param_2 + 0x58) = iVar3 + -1; if (iVar3 < 1) { return (byte *)0x0; } *(int *)(param_2 + 0x5c) = *(int *)(param_2 + 0x5c) + 1; local_30 = (byte *)_InternalParse(this,(char *)local_30,param_2); *(ulong *)(param_2 + 0x58) = CONCAT44((int)((ulong)*(int8 *)(param_2 + 0x58) >> 0x20) + _UNK_002fe234, (int)*(int8 *)(param_2 + 0x58) + _DAT_002fe230); iVar3 = *(int *)(param_2 + 0x50); *(int4 *)(param_2 + 0x50) = 0; if (iVar3 != 0xb) { return (byte *)0x0; } } else { uVar7 = uVar8 >> 3; lVar5 = Descriptor::FindExtensionRangeContainingNumber(*(Descriptor **)(this + 8),uVar7); if (lVar5 == 0) { pFVar6 = (FieldDescriptor *)0x0; } else if (*(DescriptorPool **)(param_2 + 0x60) == (DescriptorPool *)0x0) { pFVar6 = (FieldDescriptor *) Reflection::FindKnownExtensionByNumber(*(Reflection **)(this + 0x10),uVar7); } else { pFVar6 = (FieldDescriptor *) DescriptorPool::FindExtensionByNumber (*(DescriptorPool **)(param_2 + 0x60),*(Descriptor **)(this + 8),uVar7); } local_30 = (byte *)_InternalParseAndMergeField (*(Message **)this,(char *)local_30,param_2,(ulong)uVar8, *(Reflection **)(this + 0x10),pFVar6); } if (local_30 == (byte *)0x0) { return (byte *)0x0; } } while( true ); }
29,585
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>, bool, nlohmann::json_abi_v3_11_3::detail::value_t)
llama.cpp/common/json.hpp
basic_json(initializer_list_t init, bool type_deduction = true, value_t manual_type = value_t::array) { // check if each element is an array with two elements whose first // element is a string bool is_an_object = std::all_of(init.begin(), init.end(), [](const detail::json_ref<basic_json>& element_ref) { // The cast is to ensure op[size_type] is called, bearing in mind size_type may not be int; // (many string types can be constructed from 0 via its null-pointer guise, so we get a // broken call to op[key_type], the wrong semantics and a 4804 warning on Windows) return element_ref->is_array() && element_ref->size() == 2 && (*element_ref)[static_cast<size_type>(0)].is_string(); }); // adjust type if type deduction is not wanted if (!type_deduction) { // if array is wanted, do not create an object though possible if (manual_type == value_t::array) { is_an_object = false; } // if object is wanted but impossible, throw an exception if (JSON_HEDLEY_UNLIKELY(manual_type == value_t::object && !is_an_object)) { JSON_THROW(type_error::create(301, "cannot create object from initializer list", nullptr)); } } if (is_an_object) { // the initializer list is a list of pairs -> create object m_data.m_type = value_t::object; m_data.m_value = value_t::object; for (auto& element_ref : init) { auto element = element_ref.moved_or_copied(); m_data.m_value.object->emplace( std::move(*((*element.m_data.m_value.array)[0].m_data.m_value.string)), std::move((*element.m_data.m_value.array)[1])); } } else { // the initializer list describes an array -> create array m_data.m_type = value_t::array; m_data.m_value.array = create<array_t>(init.begin(), init.end()); } set_parents(); assert_invariant(); }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>, bool, nlohmann::json_abi_v3_11_3::detail::value_t): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %r8d, %ebp movl %ecx, %r13d movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx leaq (%rdx,%rdx,2), %rax leaq (%rsi,%rax,8), %r12 xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq %rsi, %rdi movq %r12, %rsi callq 0xd2fa6 cmpq %r12, %rax sete %cl testb %r13b, %r13b jne 0xb36af cmpq %r12, %rax sete %al cmpb $0x2, %bpl setne %cl cmpb $0x1, %bpl setne %dl orb %al, %dl je 0xb375a andb %al, %cl testb %cl, %cl je 0xb3724 movb $0x1, (%rbx) movl $0x20, %edi callq 0x21220 xorps %xmm0, %xmm0 movups %xmm0, (%rax) movq $0x0, 0x10(%rax) movq %rax, 0x8(%rbx) testq %r15, %r15 je 0xb373e shlq $0x3, %r15 leaq (%r15,%r15,2), %r12 movq %rsp, %r15 movq %r15, %rdi movq %r14, %rsi callq 0xd2f00 movq 0x8(%rbx), %rdi movq 0x8(%rsp), %rax movq (%rax), %rdx movq 0x8(%rdx), %rsi addq $0x10, %rdx callq 0x8d2c0 movq %r15, %rdi xorl %esi, %esi callq 0x875ae movq %r15, %rdi callq 0x8bcc8 addq $0x18, %r14 addq $-0x18, %r12 jne 0xb36e2 jmp 0xb373e movb $0x2, (%rbx) movq %rsp, %rdi movq %r14, (%rdi) leaq 0x20(%rsp), %rsi movq %r12, (%rsi) callq 0xd2f52 movq %rax, 0x8(%rbx) movq %rbx, %rdi movl $0x1, %esi callq 0x875ae addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x216d0 movq %rax, %r14 leaq 0x10(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x69b53(%rip), %rsi # 0x11d2cb leaq 0x69b76(%rip), %rdx # 0x11d2f5 movq %rsp, %rdi callq 0x28f28 movb $0x1, %bpl movq %rsp, %rdx movq %r14, %rdi movl $0x12d, %esi # imm = 0x12D xorl %ecx, %ecx callq 0x81056 xorl %ebp, %ebp leaq 0xaf89b(%rip), %rsi # 0x163040 leaq -0x3abc4(%rip), %rdx # 0x78be8 movq %r14, %rdi callq 0x21b60 jmp 0xb37ba jmp 0xb37ba jmp 0xb37ba movq %rax, %r15 jmp 0xb3804 movq %rax, %r15 movq %rsp, %r14 movq %r14, %rdi xorl %esi, %esi callq 0x875ae movq %r14, %rdi callq 0x8bcc8 jmp 0xb3804 movq %rax, %r15 movq (%rsp), %rdi cmpq %r12, %rdi je 0xb37f2 movq 0x10(%rsp), %rsi incq %rsi callq 0x21190 testb %bpl, %bpl jne 0xb37fc jmp 0xb3804 movq %rax, %r15 movq %r14, %rdi callq 0x22080 movq %rbx, %rdi callq 0x8bcc8 movq %r15, %rdi callq 0x21c20
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ESt16initializer_listINS0_6detail8json_refISD_EEEbNSF_7value_tE: push rbp; __int64 push r15; int push r14; void * push r13; int push r12; __int64 push rbx; int sub rsp, 28h mov ebp, r8d mov r13d, ecx mov r15, rdx mov r14, rsi mov rbx, rdi lea rax, [rdx+rdx*2] lea r12, [rsi+rax*8] xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov rdi, rsi mov rsi, r12 call _ZSt9__find_ifIPKN8nlohmann16json_abi_v3_11_36detail8json_refINS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEN9__gnu_cxx5__ops12_Iter_negateIZNSG_C1ESt16initializer_listISH_EbNS2_7value_tEEUlRSI_E_EEET_ST_ST_T0_St26random_access_iterator_tag; std::__find_if<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,__gnu_cxx::__ops::_Iter_negate<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&)#1}>>(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,__gnu_cxx::__ops::_Iter_negate<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&)#1}>,std::random_access_iterator_tag) cmp rax, r12 setz cl test r13b, r13b jnz short loc_B36AF cmp rax, r12 setz al cmp bpl, 2 setnz cl cmp bpl, 1 setnz dl or dl, al jz loc_B375A and cl, al loc_B36AF: test cl, cl jz short loc_B3724 mov byte ptr [rbx], 1 mov edi, 20h ; ' '; unsigned __int64 call __Znwm; operator new(ulong) xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 mov qword ptr [rax+10h], 0 mov [rbx+8], rax test r15, r15 jz short loc_B373E shl r15, 3 lea r12, [r15+r15*2] mov r15, rsp loc_B36E2: mov rdi, r15 mov rsi, r14 call _ZNK8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15moved_or_copiedEv; nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::moved_or_copied(void) mov rdi, [rbx+8] mov rax, [rsp+58h+var_50] mov rdx, [rax] mov rsi, [rdx+8] add rdx, 10h call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE7emplaceERSH_OSD_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::emplace(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&&) mov rdi, r15 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() add r14, 18h add r12, 0FFFFFFFFFFFFFFE8h jnz short loc_B36E2 jmp short loc_B373E loc_B3724: mov byte ptr [rbx], 2 mov rdi, rsp mov [rdi], r14 lea rsi, [rsp+58h+var_38] mov [rsi], r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJPKNS0_6detail8json_refISD_EESL_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*>(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const* &&) mov [rbx+8], rax loc_B373E: mov rdi, rbx mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_B375A: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov r14, rax lea r12, [rsp+58h+var_48] mov [r12-10h], r12 lea rsi, aCannotCreateOb; "cannot create object from initializer l"... lea rdx, aCannotCreateOb+2Ah; "" mov rdi, rsp call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov bpl, 1 mov rdx, rsp mov rdi, r14; this mov esi, 12Dh; int xor ecx, ecx call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short loc_B37BA jmp short loc_B37BA jmp short $+2 loc_B37BA: mov r15, rax jmp short loc_B3804 mov r15, rax mov r14, rsp mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() jmp short loc_B3804 mov r15, rax mov rdi, [rsp+58h+var_58]; void * cmp rdi, r12 jz short loc_B37F2 mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B37F2: test bpl, bpl jnz short loc_B37FC jmp short loc_B3804 mov r15, rax loc_B37FC: mov rdi, r14; void * call ___cxa_free_exception loc_B3804: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, r15 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( long long a1, char *a2, long long a3, char a4, char a5) { char *v8; // r14 char *v9; // r12 long long v10; // rax bool v11; // cl bool v12; // al long long result; // rax long long v14; // r12 nlohmann::json_abi_v3_11_3::detail::exception *exception; // r14 void *v16; // [rsp+0h] [rbp-58h] BYREF long long v17; // [rsp+8h] [rbp-50h] _QWORD v18[9]; // [rsp+10h] [rbp-48h] BYREF v8 = a2; v9 = &a2[24 * a3]; *(_OWORD *)a1 = 0LL; v10 = std::__find_if<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> const*,__gnu_cxx::__ops::_Iter_negate<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> const&)#1}>>( a2, v9); v11 = v10 == (_QWORD)v9; if ( !a4 ) { v12 = v10 == (_QWORD)v9; if ( !v12 && a5 == 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v16 = v18; std::string::_M_construct<char const*>((long long)&v16, "cannot create object from initializer list", (long long)""); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_( exception, 301, &v16); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v11 = v12 && a5 != 2; } if ( v11 ) { *(_BYTE *)a1 = 1; result = operator new(0x20uLL); *(_OWORD *)result = 0LL; *(_QWORD *)(result + 16) = 0LL; *(_QWORD *)(a1 + 8) = result; if ( a3 ) { v14 = 24 * a3; do { nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::moved_or_copied( &v16, v8); nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::emplace( *(_QWORD **)(a1 + 8), *(long long **)(*(_QWORD *)v17 + 8LL), *(_QWORD *)v17 + 16LL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v16); result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v16); v8 += 24; v14 -= 24LL; } while ( v14 ); } } else { *(_BYTE *)a1 = 2; v16 = a2; v18[2] = v9; result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> const*>(&v16); *(_QWORD *)(a1 + 8) = result; } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); return result; }
basic_json: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV EBP,R8D MOV R13D,ECX MOV R15,RDX MOV R14,RSI MOV RBX,RDI LEA RAX,[RDX + RDX*0x2] LEA R12,[RSI + RAX*0x8] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 LAB_001b367b: MOV RDI,RSI MOV RSI,R12 CALL 0x001d2fa6 CMP RAX,R12 SETZ CL TEST R13B,R13B JNZ 0x001b36af CMP RAX,R12 SETZ AL CMP BPL,0x2 SETNZ CL CMP BPL,0x1 SETNZ DL OR DL,AL JZ 0x001b375a AND CL,AL LAB_001b36af: TEST CL,CL JZ 0x001b3724 MOV byte ptr [RBX],0x1 LAB_001b36b6: MOV EDI,0x20 CALL 0x00121220 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],0x0 MOV qword ptr [RBX + 0x8],RAX TEST R15,R15 JZ 0x001b373e SHL R15,0x3 LEA R12,[R15 + R15*0x2] MOV R15,RSP LAB_001b36e2: MOV RDI,R15 MOV RSI,R14 CALL 0x001d2f00 MOV RDI,qword ptr [RBX + 0x8] MOV RAX,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RAX] MOV RSI,qword ptr [RDX + 0x8] ADD RDX,0x10 LAB_001b3701: CALL 0x0018d2c0 MOV RDI,R15 XOR ESI,ESI CALL 0x001875ae MOV RDI,R15 CALL 0x0018bcc8 ADD R14,0x18 ADD R12,-0x18 JNZ 0x001b36e2 JMP 0x001b373e LAB_001b3724: MOV byte ptr [RBX],0x2 MOV RDI,RSP MOV qword ptr [RDI],R14 LEA RSI,[RSP + 0x20] MOV qword ptr [RSI],R12 LAB_001b3735: CALL 0x001d2f52 LAB_001b373a: MOV qword ptr [RBX + 0x8],RAX LAB_001b373e: MOV RDI,RBX MOV ESI,0x1 CALL 0x001875ae ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001b375a: MOV EDI,0x20 CALL 0x001216d0 MOV R14,RAX LEA R12,[RSP + 0x10] MOV qword ptr [R12 + -0x10],R12 LAB_001b3771: LEA RSI,[0x21d2cb] LEA RDX,[0x21d2f5] MOV RDI,RSP CALL 0x00128f28 MOV BPL,0x1 LAB_001b378a: MOV RDX,RSP MOV RDI,R14 MOV ESI,0x12d XOR ECX,ECX CALL 0x00181056 XOR EBP,EBP LEA RSI,[0x263040] LEA RDX,[0x178be8] MOV RDI,R14 CALL 0x00121b60
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > >, bool, nlohmann::json_abi_v3_11_3::detail::value_t) */ void nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(int8 *param_1,json_ref *param_2,long param_3,char param_4,char param_5) { json_ref *pjVar1; json_ref *pjVar2; int8 *puVar3; vector *pvVar4; int8 uVar5; bool bVar6; json_ref *local_58; long *local_50; json_ref local_48 [16]; json_ref *local_38; pjVar1 = param_2 + param_3 * 0x18; *param_1 = 0; param_1[1] = 0; /* try { // try from 001b367b to 001b3685 has its CatchHandler @ 001b37b8 */ pjVar2 = std:: __find_if<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const*,__gnu_cxx::__ops::_Iter_negate<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>::_Iter_negate(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::_lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const&)_1_>> (param_2,pjVar1); bVar6 = pjVar2 == pjVar1; if (param_4 == '\0') { if (param_5 == '\x01' && pjVar2 != pjVar1) { uVar5 = __cxa_allocate_exception(0x20); local_58 = local_48; /* try { // try from 001b3771 to 001b3786 has its CatchHandler @ 001b37f9 */ std::__cxx11::string::_M_construct<char_const*> (&local_58,"cannot create object from initializer list",""); /* try { // try from 001b378a to 001b37b3 has its CatchHandler @ 001b37d9 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ (uVar5,0x12d,&local_58,0); /* WARNING: Subroutine does not return */ __cxa_throw(uVar5,&detail::type_error::typeinfo,detail::exception::~exception); } bVar6 = param_5 != '\x02' && pjVar2 == pjVar1; } if (bVar6) { *(int1 *)param_1 = 1; /* try { // try from 001b36b6 to 001b36bf has its CatchHandler @ 001b37b6 */ puVar3 = (int8 *)operator_new(0x20); *puVar3 = 0; puVar3[1] = 0; puVar3[2] = 0; param_1[1] = puVar3; if (param_3 != 0) { param_3 = param_3 * 0x18; do { /* try { // try from 001b36e2 to 001b36ec has its CatchHandler @ 001b37ba */ detail:: json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::moved_or_copied(); /* try { // try from 001b3701 to 001b3705 has its CatchHandler @ 001b37bf */ ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::emplace((ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> *)param_1[1],*(string **)(*local_50 + 8),(basic_json *)(*local_50 + 0x10)); assert_invariant(SUB81(&local_58,0)); data::~data((data *)&local_58); param_3 = param_3 + -0x18; } while (param_3 != 0); } } else { *(int1 *)param_1 = 2; local_58 = param_2; local_38 = pjVar1; /* try { // try from 001b3735 to 001b3739 has its CatchHandler @ 001b37b4 */ pvVar4 = create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const*> (&local_58,&local_38); param_1[1] = pvVar4; } assert_invariant(SUB81(param_1,0)); return; }
29,586
ftxui::Ref<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::~Ref()
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/include/ftxui/util/ref.hpp
Ref(const Ref<T>&) = default;
O3
cpp
ftxui::Ref<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::~Ref(): pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movzbl 0x20(%rdi), %eax leaq 0x4160b(%rip), %rcx # 0x55eb8 leaq 0xf(%rsp), %rdi movq %rbx, %rsi callq *(%rcx,%rax,8) movb $-0x1, 0x20(%rbx) addq $0x10, %rsp popq %rbx retq movq %rax, %rdi callq 0x1049a
_ZN5ftxui3RefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev: push rbx sub rsp, 10h mov rbx, rdi movzx eax, byte ptr [rdi+20h] lea rcx, _ZNSt8__detail9__variant12__gen_vtableIvOZNS0_16_Variant_storageILb0EJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPS8_EE8_M_resetEvEUlOT_E_JRSt7variantIJS8_S9_EEEE9_S_vtableE; std::__detail::__variant::__gen_vtable<void,std::__detail::__variant::_Variant_storage<false,std::string,std::string*>::_M_reset(void)::{lambda(void &&)#1} &&,std::variant<std::string,std::string*> &>::_S_vtable lea rdi, [rsp+18h+var_9] mov rsi, rbx call ds:(_ZNSt8__detail9__variant12__gen_vtableIvOZNS0_16_Variant_storageILb0EJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPS8_EE8_M_resetEvEUlOT_E_JRSt7variantIJS8_S9_EEEE9_S_vtableE - 55EB8h)[rcx+rax*8]; std::__throw_logic_error(char const*) mov byte ptr [rbx+20h], 0FFh add rsp, 10h pop rbx retn mov rdi, rax call __clang_call_terminate
long long ftxui::Ref<std::string>::~Ref(long long a1) { long long result; // rax _BYTE v2[9]; // [rsp+Fh] [rbp-9h] BYREF result = ((long long ( *)(_BYTE *))std::__detail::__variant::__gen_vtable<void,std::__detail::__variant::_Variant_storage<false,std::string,std::string*>::_M_reset(void)::{lambda(void &&)#1} &&,std::variant<std::string,std::string*> &>::_S_vtable[*(unsigned __int8 *)(a1 + 32)])(v2); *(_BYTE *)(a1 + 32) = -1; return result; }
~Ref: PUSH RBX SUB RSP,0x10 MOV RBX,RDI MOVZX EAX,byte ptr [RDI + 0x20] LEA RCX,[0x155eb8] LAB_001148ad: LEA RDI,[RSP + 0xf] MOV RSI,RBX CALL qword ptr [RCX + RAX*0x8] MOV byte ptr [RBX + 0x20],0xff ADD RSP,0x10 POP RBX RET
/* ftxui::Ref<std::__cxx11::string >::~Ref() */ void __thiscall ftxui::Ref<std::__cxx11::string>::~Ref(Ref<std::__cxx11::string> *this) { int1 local_9; /* try { // try from 001148ad to 001148b7 has its CatchHandler @ 001148c2 */ (**(code **)(std::__detail::__variant:: __gen_vtable<void,std::__detail::__variant::_Variant_storage<false,std::__cxx11::string,std::__cxx11::string*>::_M_reset()::{lambda(auto:1&&)#1}&&,std::variant<std::__cxx11::string,std::__cxx11::string*>&> ::_S_vtable + (ulong)(byte)this[0x20] * 8))(&local_9,this); this[0x20] = (Ref<std::__cxx11::string>)0xff; return; }
29,587
evmone::(anonymous namespace)::destroy(evmc_vm*)
corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/vm.cpp
void destroy(evmc_vm* vm) noexcept { assert(vm != nullptr); delete static_cast<VM*>(vm); }
O3
cpp
evmone::(anonymous namespace)::destroy(evmc_vm*): pushq %rbx testq %rdi, %rdi je 0x2e39c movq %rdi, %rbx movq 0x58(%rdi), %rdi testq %rdi, %rdi je 0x2e37d movq (%rdi), %rax callq *0x8(%rax) movq $0x0, 0x58(%rbx) leaq 0x40(%rbx), %rdi callq 0x2e764 movl $0x60, %esi movq %rbx, %rdi popq %rbx jmp 0x21200 leaq 0x5295e(%rip), %rdi # 0x80d01 leaq 0x528a2(%rip), %rsi # 0x80c4c leaq 0x5295e(%rip), %rcx # 0x80d0f movl $0x15, %edx callq 0x21130
_ZN6evmone12_GLOBAL__N_17destroyEP7evmc_vm: push rbx test rdi, rdi jz short loc_2E39C mov rbx, rdi mov rdi, [rdi+58h] test rdi, rdi jz short loc_2E37D mov rax, [rdi] call qword ptr [rax+8] loc_2E37D: mov qword ptr [rbx+58h], 0 lea rdi, [rbx+40h] call _ZNSt6vectorIN6evmone14ExecutionStateESaIS1_EED2Ev; std::vector<evmone::ExecutionState>::~vector() mov esi, 60h ; '`'; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong) loc_2E39C: lea rdi, aVmNullptr; "vm != nullptr" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidEvmoneAnon; "void evmone::(anonymous namespace)::des"... mov edx, 15h call ___assert_fail
void evmone::`anonymous namespace'::destroy(_QWORD *a1) { long long v2; // rdi if ( !a1 ) __assert_fail( "vm != nullptr", "/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/vm.cpp", 21LL, "void evmone::(anonymous namespace)::destroy(evmc_vm *)"); v2 = a1[11]; if ( v2 ) (*(void ( **)(long long))(*(_QWORD *)v2 + 8LL))(v2); a1[11] = 0LL; std::vector<evmone::ExecutionState>::~vector(a1 + 8); operator delete(a1, 0x60uLL); }
destroy: PUSH RBX TEST RDI,RDI JZ 0x0012e39c MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x58] TEST RDI,RDI JZ 0x0012e37d MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0012e37d: MOV qword ptr [RBX + 0x58],0x0 LEA RDI,[RBX + 0x40] CALL 0x0012e764 MOV ESI,0x60 MOV RDI,RBX POP RBX JMP 0x00121200 LAB_0012e39c: LEA RDI,[0x180d01] LEA RSI,[0x180c4c] LEA RCX,[0x180d0f] MOV EDX,0x15 CALL 0x00121130
/* evmone::(anonymous namespace)::destroy(evmc_vm*) */ void evmone::(anonymous_namespace)::destroy(evmc_vm *param_1) { if (param_1 != (evmc_vm *)0x0) { if (*(long **)(param_1 + 0x58) != (long *)0x0) { (**(code **)(**(long **)(param_1 + 0x58) + 8))(); } *(int8 *)(param_1 + 0x58) = 0; std::vector<evmone::ExecutionState,std::allocator<evmone::ExecutionState>>::~vector ((vector<evmone::ExecutionState,std::allocator<evmone::ExecutionState>> *) (param_1 + 0x40)); operator_delete(param_1,0x60); return; } /* WARNING: Subroutine does not return */ __assert_fail("vm != nullptr", "/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/vm.cpp" ,0x15,"void evmone::(anonymous namespace)::destroy(evmc_vm *)"); }
29,588
add_compiled_extra_collation
eloqsql/mysys/charset.c
void add_compiled_extra_collation(struct charset_info_st *cs) { DBUG_ASSERT(cs->number < array_elements(all_charsets)); all_charsets[cs->number]= cs; cs->state|= MY_CS_AVAILABLE; if ((my_hash_insert(&charset_name_hash, (uchar*) cs))) { CHARSET_INFO *org= (CHARSET_INFO*) my_hash_search(&charset_name_hash, (uchar*) cs->cs_name.str, cs->cs_name.length); cs->cs_name= org->cs_name; } }
O3
c
add_compiled_extra_collation: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx movl (%rdi), %eax leaq 0x33d788(%rip), %rcx # 0x3658d0 movq %rdi, (%rcx,%rax,8) orb $0x2, 0xd(%rdi) leaq 0x341779(%rip), %rdi # 0x3698d0 movq %rbx, %rsi callq 0x24f48 testb %al, %al je 0x2817f movq 0x10(%rbx), %rsi movq 0x18(%rbx), %rdx leaq 0x34175e(%rip), %rdi # 0x3698d0 callq 0x24ce8 movups 0x10(%rax), %xmm0 movups %xmm0, 0x10(%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
add_compiled_extra_collation: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi mov eax, [rdi] lea rcx, all_charsets mov [rcx+rax*8], rdi or byte ptr [rdi+0Dh], 2 lea rdi, charset_name_hash mov rsi, rbx call my_hash_insert test al, al jz short loc_2817F mov rsi, [rbx+10h] mov rdx, [rbx+18h] lea rdi, charset_name_hash call my_hash_search movups xmm0, xmmword ptr [rax+10h] movups xmmword ptr [rbx+10h], xmm0 loc_2817F: add rsp, 8 pop rbx pop rbp retn
char add_compiled_extra_collation(unsigned int *a1) { long long v1; // rax all_charsets[*a1] = a1; *((_BYTE *)a1 + 13) |= 2u; LOBYTE(v1) = my_hash_insert((long long)&charset_name_hash, (long long)a1); if ( (_BYTE)v1 ) { v1 = my_hash_search((long long)&charset_name_hash, *((_QWORD *)a1 + 2), *((_QWORD *)a1 + 3)); *((_OWORD *)a1 + 1) = *(_OWORD *)(v1 + 16); } return v1; }
add_compiled_extra_collation: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI MOV EAX,dword ptr [RDI] LEA RCX,[0x4658d0] MOV qword ptr [RCX + RAX*0x8],RDI OR byte ptr [RDI + 0xd],0x2 LEA RDI,[0x4698d0] MOV RSI,RBX CALL 0x00124f48 TEST AL,AL JZ 0x0012817f MOV RSI,qword ptr [RBX + 0x10] MOV RDX,qword ptr [RBX + 0x18] LEA RDI,[0x4698d0] CALL 0x00124ce8 MOVUPS XMM0,xmmword ptr [RAX + 0x10] MOVUPS xmmword ptr [RBX + 0x10],XMM0 LAB_0012817f: ADD RSP,0x8 POP RBX POP RBP RET
void add_compiled_extra_collation(uint *param_1) { int8 uVar1; char cVar2; long lVar3; (&all_charsets)[*param_1] = param_1; *(byte *)((long)param_1 + 0xd) = *(byte *)((long)param_1 + 0xd) | 2; cVar2 = my_hash_insert(charset_name_hash,param_1); if (cVar2 != '\0') { lVar3 = my_hash_search(charset_name_hash,*(int8 *)(param_1 + 4), *(int8 *)(param_1 + 6)); uVar1 = *(int8 *)(lVar3 + 0x18); *(int8 *)(param_1 + 4) = *(int8 *)(lVar3 + 0x10); *(int8 *)(param_1 + 6) = uVar1; } return; }
29,589
google::protobuf::internal::WireFormat::MessageSetParser::ParseMessageSet(char const*, google::protobuf::internal::ParseContext*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/wire_format.cc
const char* ParseMessageSet(const char* ptr, internal::ParseContext* ctx) { while (!ctx->Done(&ptr)) { uint32_t tag; ptr = ReadTag(ptr, &tag); if (PROTOBUF_PREDICT_FALSE(ptr == nullptr)) return nullptr; if (tag == 0 || (tag & 7) == WireFormatLite::WIRETYPE_END_GROUP) { ctx->SetLastTag(tag); break; } if (tag == WireFormatLite::kMessageSetItemStartTag) { // A message set item starts ptr = ctx->ParseGroup(this, ptr, tag); } else { // Parse other fields as normal extensions. int field_number = WireFormatLite::GetTagFieldNumber(tag); const FieldDescriptor* field = nullptr; if (descriptor->IsExtensionNumber(field_number)) { if (ctx->data().pool == nullptr) { field = reflection->FindKnownExtensionByNumber(field_number); } else { field = ctx->data().pool->FindExtensionByNumber(descriptor, field_number); } } ptr = WireFormat::_InternalParseAndMergeField(msg, ptr, ctx, tag, reflection, field); } if (PROTOBUF_PREDICT_FALSE(ptr == nullptr)) return nullptr; } return ptr; }
O0
cpp
google::protobuf::internal::WireFormat::MessageSetParser::ParseMessageSet(char const*, google::protobuf::internal::ParseContext*): subq $0x68, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movq %rdx, 0x20(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x20(%rsp), %rdi leaq 0x28(%rsp), %rsi callq 0x154570 xorb $-0x1, %al testb $0x1, %al jne 0x202097 jmp 0x20226b movq 0x28(%rsp), %rdi leaq 0x1c(%rsp), %rsi xorl %edx, %edx callq 0x1545a0 movq %rax, 0x28(%rsp) cmpq $0x0, 0x28(%rsp) jne 0x2020c3 movq $0x0, 0x38(%rsp) jmp 0x202275 cmpl $0x0, 0x1c(%rsp) je 0x2020d6 movl 0x1c(%rsp), %eax andl $0x7, %eax cmpl $0x4, %eax jne 0x2020e9 movq 0x20(%rsp), %rdi movl 0x1c(%rsp), %esi callq 0x154730 jmp 0x20226b cmpl $0xb, 0x1c(%rsp) jne 0x2021a8 movq 0x8(%rsp), %rdx movq 0x20(%rsp), %rsi movq 0x28(%rsp), %rcx movl 0x1c(%rsp), %eax movq %rsi, 0x58(%rsp) movq %rdx, 0x50(%rsp) movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) movq 0x58(%rsp), %rcx movq %rcx, (%rsp) movl 0x58(%rcx), %eax addl $-0x1, %eax movl %eax, 0x58(%rcx) cmpl $0x0, %eax jge 0x20213c movq $0x0, 0x60(%rsp) jmp 0x202199 movq (%rsp), %rdx movl 0x5c(%rdx), %eax addl $0x1, %eax movl %eax, 0x5c(%rdx) movq 0x50(%rsp), %rdi movq 0x48(%rsp), %rsi callq 0x202bc0 movq (%rsp), %rdi movq %rax, 0x48(%rsp) movl 0x5c(%rdi), %eax addl $-0x1, %eax movl %eax, 0x5c(%rdi) movl 0x58(%rdi), %eax addl $0x1, %eax movl %eax, 0x58(%rdi) movl 0x44(%rsp), %esi callq 0x17f610 xorb $-0x1, %al testb $0x1, %al jne 0x202184 jmp 0x20218f movq $0x0, 0x60(%rsp) jmp 0x202199 movq 0x48(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x60(%rsp), %rax movq %rax, 0x28(%rsp) jmp 0x202253 movl 0x1c(%rsp), %edi callq 0x1ab820 movl %eax, %ecx movq 0x8(%rsp), %rax movl %ecx, 0x18(%rsp) movq $0x0, 0x10(%rsp) movq 0x8(%rax), %rdi movl 0x18(%rsp), %esi callq 0x201e40 testb $0x1, %al jne 0x2021d8 jmp 0x20222a movq 0x20(%rsp), %rdi callq 0x1766c0 cmpq $0x0, (%rax) jne 0x202201 movq 0x8(%rsp), %rax movq 0x10(%rax), %rdi movl 0x18(%rsp), %esi callq 0x1b6bc0 movq %rax, 0x10(%rsp) jmp 0x202228 movq 0x20(%rsp), %rdi callq 0x1766c0 movq %rax, %rcx movq 0x8(%rsp), %rax movq (%rcx), %rdi movq 0x8(%rax), %rsi movl 0x18(%rsp), %edx callq 0x2437c0 movq %rax, 0x10(%rsp) jmp 0x20222a movq 0x8(%rsp), %rax movq (%rax), %rdi movq 0x28(%rsp), %rsi movq 0x20(%rsp), %rdx movl 0x1c(%rsp), %ecx movq 0x10(%rax), %r8 movq 0x10(%rsp), %r9 callq 0x1f4930 movq %rax, 0x28(%rsp) cmpq $0x0, 0x28(%rsp) jne 0x202266 movq $0x0, 0x38(%rsp) jmp 0x202275 jmp 0x20207d movq 0x28(%rsp), %rax movq %rax, 0x38(%rsp) movq 0x38(%rsp), %rax addq $0x68, %rsp retq nop
_ZN6google8protobuf8internal10WireFormat16MessageSetParser15ParseMessageSetEPKcPNS1_12ParseContextE: sub rsp, 68h mov [rsp+68h+var_38], rdi mov [rsp+68h+var_40], rsi mov [rsp+68h+var_4C+4], rdx mov rax, [rsp+68h+var_38] mov [rsp+68h+var_60], rax loc_20207D: mov rdi, [rsp+68h+var_4C+4]; this lea rsi, [rsp+68h+var_40]; char ** call _ZN6google8protobuf8internal12ParseContext4DoneEPPKc; google::protobuf::internal::ParseContext::Done(char const**) xor al, 0FFh test al, 1 jnz short loc_202097 jmp loc_20226B loc_202097: mov rdi, [rsp+68h+var_40]; this lea rsi, [rsp+68h+var_4C]; unsigned int xor edx, edx; unsigned int * call _ZN6google8protobuf8internal7ReadTagEPKcPjj; google::protobuf::internal::ReadTag(char const*,uint *,uint) mov [rsp+68h+var_40], rax cmp [rsp+68h+var_40], 0 jnz short loc_2020C3 mov [rsp+68h+var_30], 0 jmp loc_202275 loc_2020C3: cmp dword ptr [rsp+68h+var_4C], 0 jz short loc_2020D6 mov eax, dword ptr [rsp+68h+var_4C] and eax, 7 cmp eax, 4 jnz short loc_2020E9 loc_2020D6: mov rdi, [rsp+68h+var_4C+4]; this mov esi, dword ptr [rsp+68h+var_4C]; unsigned int call _ZN6google8protobuf8internal18EpsCopyInputStream10SetLastTagEj; google::protobuf::internal::EpsCopyInputStream::SetLastTag(uint) jmp loc_20226B loc_2020E9: cmp dword ptr [rsp+68h+var_4C], 0Bh jnz loc_2021A8 mov rdx, [rsp+68h+var_60] mov rsi, [rsp+68h+var_4C+4] mov rcx, [rsp+68h+var_40] mov eax, dword ptr [rsp+68h+var_4C] mov [rsp+68h+var_10], rsi mov [rsp+68h+var_18], rdx mov [rsp+68h+var_20], rcx mov [rsp+68h+var_24], eax mov rcx, [rsp+68h+var_10] mov [rsp+68h+var_68], rcx mov eax, [rcx+58h] add eax, 0FFFFFFFFh mov [rcx+58h], eax cmp eax, 0 jge short loc_20213C mov [rsp+68h+var_8], 0 jmp short loc_202199 loc_20213C: mov rdx, [rsp+68h+var_68]; google::protobuf::internal::ParseContext * mov eax, [rdx+5Ch] add eax, 1 mov [rdx+5Ch], eax mov rdi, [rsp+68h+var_18]; this mov rsi, [rsp+68h+var_20]; char * call _ZN6google8protobuf8internal10WireFormat16MessageSetParser14_InternalParseEPKcPNS1_12ParseContextE; google::protobuf::internal::WireFormat::MessageSetParser::_InternalParse(char const*,google::protobuf::internal::ParseContext *) mov rdi, [rsp+68h+var_68]; this mov [rsp+68h+var_20], rax mov eax, [rdi+5Ch] add eax, 0FFFFFFFFh mov [rdi+5Ch], eax mov eax, [rdi+58h] add eax, 1 mov [rdi+58h], eax mov esi, [rsp+68h+var_24]; unsigned int call _ZN6google8protobuf8internal18EpsCopyInputStream15ConsumeEndGroupEj; google::protobuf::internal::EpsCopyInputStream::ConsumeEndGroup(uint) xor al, 0FFh test al, 1 jnz short loc_202184 jmp short loc_20218F loc_202184: mov [rsp+68h+var_8], 0 jmp short loc_202199 loc_20218F: mov rax, [rsp+68h+var_20] mov [rsp+68h+var_8], rax loc_202199: mov rax, [rsp+68h+var_8] mov [rsp+68h+var_40], rax jmp loc_202253 loc_2021A8: mov edi, dword ptr [rsp+68h+var_4C]; this call _ZN6google8protobuf8internal14WireFormatLite17GetTagFieldNumberEj; google::protobuf::internal::WireFormatLite::GetTagFieldNumber(uint) mov ecx, eax mov rax, [rsp+68h+var_60] mov [rsp+68h+var_50], ecx mov [rsp+68h+var_58], 0 mov rdi, [rax+8]; this mov esi, [rsp+68h+var_50]; int call _ZNK6google8protobuf10Descriptor17IsExtensionNumberEi; google::protobuf::Descriptor::IsExtensionNumber(int) test al, 1 jnz short loc_2021D8 jmp short loc_20222A loc_2021D8: mov rdi, [rsp+68h+var_4C+4]; this call _ZN6google8protobuf8internal12ParseContext4dataEv; google::protobuf::internal::ParseContext::data(void) cmp qword ptr [rax], 0 jnz short loc_202201 mov rax, [rsp+68h+var_60] mov rdi, [rax+10h]; this mov esi, [rsp+68h+var_50]; int call _ZNK6google8protobuf10Reflection26FindKnownExtensionByNumberEi; google::protobuf::Reflection::FindKnownExtensionByNumber(int) mov [rsp+68h+var_58], rax jmp short loc_202228 loc_202201: mov rdi, [rsp+68h+var_4C+4]; this call _ZN6google8protobuf8internal12ParseContext4dataEv; google::protobuf::internal::ParseContext::data(void) mov rcx, rax mov rax, [rsp+68h+var_60] mov rdi, [rcx]; this mov rsi, [rax+8]; google::protobuf::Descriptor * mov edx, [rsp+68h+var_50]; int call _ZNK6google8protobuf14DescriptorPool21FindExtensionByNumberEPKNS0_10DescriptorEi; google::protobuf::DescriptorPool::FindExtensionByNumber(google::protobuf::Descriptor const*,int) mov [rsp+68h+var_58], rax loc_202228: jmp short $+2 loc_20222A: mov rax, [rsp+68h+var_60] mov rdi, [rax]; this mov rsi, [rsp+68h+var_40]; google::protobuf::Message * mov rdx, [rsp+68h+var_4C+4]; char * mov ecx, dword ptr [rsp+68h+var_4C]; google::protobuf::internal::ParseContext * mov r8, [rax+10h]; unsigned __int64 mov r9, [rsp+68h+var_58]; google::protobuf::Reflection * call _ZN6google8protobuf8internal10WireFormat27_InternalParseAndMergeFieldEPNS0_7MessageEPKcPNS1_12ParseContextEmPKNS0_10ReflectionEPKNS0_15FieldDescriptorE; google::protobuf::internal::WireFormat::_InternalParseAndMergeField(google::protobuf::Message *,char const*,google::protobuf::internal::ParseContext *,ulong,google::protobuf::Reflection const*,google::protobuf::FieldDescriptor const*) mov [rsp+68h+var_40], rax loc_202253: cmp [rsp+68h+var_40], 0 jnz short loc_202266 mov [rsp+68h+var_30], 0 jmp short loc_202275 loc_202266: jmp loc_20207D loc_20226B: mov rax, [rsp+68h+var_40] mov [rsp+68h+var_30], rax loc_202275: mov rax, [rsp+68h+var_30] add rsp, 68h retn
google::protobuf::internal * google::protobuf::internal::WireFormat::MessageSetParser::ParseMessageSet( google::protobuf::Descriptor **this, google::protobuf::internal *a2, google::protobuf::internal::ParseContext *a3, double a4) { int v4; // eax google::protobuf::internal *v5; // rax google::protobuf::DescriptorPool **v6; // rax google::protobuf::internal::EpsCopyInputStream *v8; // [rsp+0h] [rbp-68h] google::protobuf::Reflection *ExtensionByNumber; // [rsp+10h] [rbp-58h] google::protobuf::Reflection *KnownExtensionByNumber; // [rsp+10h] [rbp-58h] int TagFieldNumber; // [rsp+18h] [rbp-50h] int v12[3]; // [rsp+1Ch] [rbp-4Ch] BYREF google::protobuf::internal *v13[2]; // [rsp+28h] [rbp-40h] BYREF unsigned int v15; // [rsp+44h] [rbp-24h] char *v16; // [rsp+48h] [rbp-20h] google::protobuf::internal::WireFormat::MessageSetParser *v17; // [rsp+50h] [rbp-18h] long long v18; // [rsp+58h] [rbp-10h] char *v19; // [rsp+60h] [rbp-8h] v13[1] = (google::protobuf::internal *)this; v13[0] = a2; *(_QWORD *)&v12[1] = a3; while ( (google::protobuf::internal::ParseContext::Done( *(google::protobuf::internal::ParseContext **)&v12[1], (const char **)v13) & 1) == 0 ) { v13[0] = (google::protobuf::internal *)google::protobuf::internal::ReadTag(v13[0], (char *)v12, 0LL); if ( !v13[0] ) return 0LL; if ( !v12[0] || (v12[0] & 7) == 4 ) { google::protobuf::internal::EpsCopyInputStream::SetLastTag( *(google::protobuf::internal::EpsCopyInputStream **)&v12[1], v12[0]); return v13[0]; } if ( v12[0] == 11 ) { v18 = *(_QWORD *)&v12[1]; v17 = (google::protobuf::internal::WireFormat::MessageSetParser *)this; v16 = (char *)v13[0]; v15 = 11; v8 = *(google::protobuf::internal::EpsCopyInputStream **)&v12[1]; v4 = *(_DWORD *)(*(_QWORD *)&v12[1] + 88LL) - 1; *(_DWORD *)(*(_QWORD *)&v12[1] + 88LL) = v4; if ( v4 >= 0 ) { ++*((_DWORD *)v8 + 23); v16 = (char *)google::protobuf::internal::WireFormat::MessageSetParser::_InternalParse(v17, v16, v8); --*((_DWORD *)v8 + 23); ++*((_DWORD *)v8 + 22); if ( google::protobuf::internal::EpsCopyInputStream::ConsumeEndGroup(v8, v15) ) v19 = v16; else v19 = 0LL; } else { v19 = 0LL; } v13[0] = (google::protobuf::internal *)v19; goto LABEL_21; } TagFieldNumber = google::protobuf::internal::WireFormatLite::GetTagFieldNumber((google::protobuf::internal::WireFormatLite *)(unsigned int)v12[0]); ExtensionByNumber = 0LL; if ( !google::protobuf::Descriptor::IsExtensionNumber(this[1], TagFieldNumber) ) goto LABEL_19; if ( *(_QWORD *)google::protobuf::internal::ParseContext::data(*(google::protobuf::internal::ParseContext **)&v12[1]) ) { v6 = (google::protobuf::DescriptorPool **)google::protobuf::internal::ParseContext::data(*(google::protobuf::internal::ParseContext **)&v12[1]); ExtensionByNumber = (google::protobuf::Reflection *)google::protobuf::DescriptorPool::FindExtensionByNumber( *v6, this[1], TagFieldNumber); LABEL_19: v5 = google::protobuf::internal::WireFormat::_InternalParseAndMergeField( (char **)*this, v13[0], *(google::protobuf::internal::ParseContext **)&v12[1], (google::protobuf::internal::ParseContext *)(unsigned int)v12[0], this[2], ExtensionByNumber, a4); goto LABEL_20; } KnownExtensionByNumber = (google::protobuf::Reflection *)google::protobuf::Reflection::FindKnownExtensionByNumber( (google::protobuf::DescriptorPool **)this[2], TagFieldNumber); v5 = google::protobuf::internal::WireFormat::_InternalParseAndMergeField( (char **)*this, v13[0], *(google::protobuf::internal::ParseContext **)&v12[1], (google::protobuf::internal::ParseContext *)(unsigned int)v12[0], this[2], KnownExtensionByNumber, a4); LABEL_20: v13[0] = v5; LABEL_21: if ( !v13[0] ) return 0LL; } return v13[0]; }
default_instance: PUSH RAX CALL 0x00202070 POP RCX RET
/* aimrt::protocols::sensor::ImuState::default_instance() */ void aimrt::protocols::sensor::ImuState::default_instance(void) { internal_default_instance(); return; }
29,590
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, 0>(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&)
llama.cpp/common/./json.hpp
basic_json(const JsonRef& ref) : basic_json(ref.moved_or_copied()) {}
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, 0>(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&): pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movq 0x10(%rsi), %rax testq %rax, %rax je 0x46f36 movq %rsp, %rdi movq %rax, %rsi callq 0x2d2fe jmp 0x46f48 movups (%rsi), %xmm0 movaps %xmm0, (%rsp) movb $0x0, (%rsi) movq $0x0, 0x8(%rsi) movq %rsp, %rdi movaps (%rdi), %xmm0 movups %xmm0, (%rbx) movb $0x0, (%rdi) movq $0x0, 0x8(%rdi) callq 0x3488a addq $0x10, %rsp popq %rbx retq nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2INS0_6detail8json_refISD_EETnNSt9enable_ifIXsr6detail11conjunctionINSF_11is_json_refIT_EESt7is_sameINSK_10value_typeESD_EEE5valueEiE4typeELi0EEERKSK_: push rbx sub rsp, 10h mov rbx, rdi mov rax, [rsi+10h] test rax, rax jz short loc_46F36 mov rdi, rsp mov rsi, rax call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) jmp short loc_46F48 loc_46F36: movups xmm0, xmmword ptr [rsi] movaps [rsp+18h+var_18], xmm0 mov byte ptr [rsi], 0 mov qword ptr [rsi+8], 0 loc_46F48: mov rdi, rsp movaps xmm0, xmmword ptr [rdi] movups xmmword ptr [rbx], xmm0 mov byte ptr [rdi], 0 mov qword ptr [rdi+8], 0 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() add rsp, 10h pop rbx retn
long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2INS0_6detail8json_refISD_EETnNSt9enable_ifIXsr6detail11conjunctionINSF_11is_json_refIT_EESt7is_sameINSK_10value_typeESD_EEE5valueEiE4typeELi0EEERKSK_( _OWORD *a1, unsigned __int8 **a2) { __int128 v3; // [rsp+0h] [rbp-18h] BYREF if ( a2[2] ) { nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( (long long)&v3, a2[2]); } else { v3 = *(_OWORD *)a2; *(_BYTE *)a2 = 0; a2[1] = 0LL; } *a1 = v3; LOBYTE(v3) = 0; *((_QWORD *)&v3 + 1) = 0LL; return nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v3); }
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2INS0_6detail8json_refISD_EETnNSt9enable_ifIXsr6detail11conjunctionINSF_11is_json_refIT_EESt7is_sameINSK_10value_typeESD_EEE5valueEiE4typeELi0EEERKSK_: PUSH RBX SUB RSP,0x10 MOV RBX,RDI MOV RAX,qword ptr [RSI + 0x10] TEST RAX,RAX JZ 0x00146f36 MOV RDI,RSP MOV RSI,RAX CALL 0x0012d2fe JMP 0x00146f48 LAB_00146f36: MOVUPS XMM0,xmmword ptr [RSI] MOVAPS xmmword ptr [RSP],XMM0 MOV byte ptr [RSI],0x0 MOV qword ptr [RSI + 0x8],0x0 LAB_00146f48: MOV RDI,RSP MOVAPS XMM0,xmmword ptr [RDI] MOVUPS xmmword ptr [RBX],XMM0 MOV byte ptr [RDI],0x0 MOV qword ptr [RDI + 0x8],0x0 CALL 0x0013488a ADD RSP,0x10 POP RBX RET
void _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2INS0_6detail8json_refISD_EETnNSt9enable_ifIXsr6detail11conjunctionINSF_11is_json_refIT_EESt7is_sameINSK_10value_typeESD_EEE5valueEiE4typeELi0EEERKSK_ (ulong *param_1,ulong *param_2) { ulong local_18; ulong uStack_10; if ((basic_json *)param_2[2] == (basic_json *)0x0) { local_18 = *param_2; uStack_10 = param_2[1]; *(int1 *)param_2 = 0; param_2[1] = 0; } else { nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)&local_18,(basic_json *)param_2[2]); } *param_1 = local_18; param_1[1] = uStack_10; local_18 = local_18 & 0xffffffffffffff00; uStack_10 = 0; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)&local_18); return; }
29,591
google::protobuf::EnumDescriptorProto_EnumReservedRange::_InternalParse(char const*, google::protobuf::internal::ParseContext*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
const char* EnumDescriptorProto_EnumReservedRange::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure _Internal::HasBits has_bits{}; while (!ctx->Done(&ptr)) { uint32_t tag; ptr = ::_pbi::ReadTag(ptr, &tag); switch (tag >> 3) { // optional int32 start = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) { _Internal::set_has_start(&has_bits); _impl_.start_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); CHK_(ptr); } else goto handle_unusual; continue; // optional int32 end = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) { _Internal::set_has_end(&has_bits); _impl_.end_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); CHK_(ptr); } else goto handle_unusual; continue; default: goto handle_unusual; } // switch handle_unusual: if ((tag == 0) || ((tag & 7) == 4)) { CHK_(ptr); ctx->SetLastTag(tag); goto message_done; } ptr = UnknownFieldParse( tag, _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), ptr, ctx); CHK_(ptr != nullptr); } // while message_done: _impl_._has_bits_.Or(has_bits); return ptr; failure: ptr = nullptr; goto message_done; #undef CHK_ }
O0
cpp
google::protobuf::EnumDescriptorProto_EnumReservedRange::_InternalParse(char const*, google::protobuf::internal::ParseContext*): subq $0x78, %rsp movq %rdi, 0x48(%rsp) movq %rsi, 0x40(%rsp) movq %rdx, 0x38(%rsp) movq 0x48(%rsp), %rax movq %rax, 0x18(%rsp) leaq 0x34(%rsp), %rax movq %rax, 0x68(%rsp) movq 0x68(%rsp), %rax movq %rax, %rcx addq $0x4, %rcx movq %rcx, 0x20(%rsp) movq %rax, 0x28(%rsp) movq 0x28(%rsp), %rax movq 0x20(%rsp), %rcx movl $0x0, (%rax) addq $0x4, %rax cmpq %rcx, %rax movq %rax, 0x28(%rsp) jne 0x51345d jmp 0x51347d movq 0x38(%rsp), %rdi leaq 0x40(%rsp), %rsi callq 0x3b6ab0 xorb $-0x1, %al testb $0x1, %al jne 0x513497 jmp 0x513637 movq 0x40(%rsp), %rdi leaq 0x30(%rsp), %rsi xorl %edx, %edx callq 0x3b6ae0 movq %rax, 0x40(%rsp) movl 0x30(%rsp), %eax shrl $0x3, %eax movl %eax, 0x14(%rsp) subl $0x1, %eax je 0x5134cd jmp 0x5134bf movl 0x14(%rsp), %eax subl $0x2, %eax je 0x513516 jmp 0x51355f movl 0x30(%rsp), %eax movzbl %al, %eax cmpl $0x8, %eax jne 0x51350f leaq 0x34(%rsp), %rdi callq 0x534a80 leaq 0x40(%rsp), %rdi callq 0x3b6be0 movl %eax, %ecx movq 0x18(%rsp), %rax movl %ecx, 0x18(%rax) cmpq $0x0, 0x40(%rsp) setne %al xorb $-0x1, %al testb $0x1, %al jne 0x513508 jmp 0x51350d jmp 0x513656 jmp 0x513511 jmp 0x513561 jmp 0x51347d movl 0x30(%rsp), %eax movzbl %al, %eax cmpl $0x10, %eax jne 0x513558 leaq 0x34(%rsp), %rdi callq 0x534ab0 leaq 0x40(%rsp), %rdi callq 0x3b6be0 movl %eax, %ecx movq 0x18(%rsp), %rax movl %ecx, 0x1c(%rax) cmpq $0x0, 0x40(%rsp) setne %al xorb $-0x1, %al testb $0x1, %al jne 0x513551 jmp 0x513556 jmp 0x513656 jmp 0x51355a jmp 0x513561 jmp 0x51347d jmp 0x513561 cmpl $0x0, 0x30(%rsp) je 0x513574 movl 0x30(%rsp), %eax andl $0x7, %eax cmpl $0x4, %eax jne 0x51359d cmpq $0x0, 0x40(%rsp) setne %al xorb $-0x1, %al testb $0x1, %al jne 0x513585 jmp 0x51358a jmp 0x513656 movq 0x38(%rsp), %rdi movl 0x30(%rsp), %esi callq 0x3b6c90 jmp 0x513639 movq 0x18(%rsp), %rax movl 0x30(%rsp), %ecx movq %rcx, (%rsp) addq $0x8, %rax movq %rax, 0x50(%rsp) movq 0x50(%rsp), %rax movq %rax, 0x8(%rsp) movq %rax, 0x60(%rsp) movq 0x60(%rsp), %rax movq %rax, 0x70(%rsp) movq 0x70(%rsp), %rax movq (%rax), %rax andq $0x1, %rax cmpq $0x0, %rax je 0x5135f3 movq 0x8(%rsp), %rdi callq 0x3b8270 addq $0x8, %rax movq %rax, 0x58(%rsp) jmp 0x513602 movq 0x8(%rsp), %rdi callq 0x3b8700 movq %rax, 0x58(%rsp) movq (%rsp), %rdi movq 0x58(%rsp), %rsi movq 0x40(%rsp), %rdx movq 0x38(%rsp), %rcx callq 0x43bdb0 movq %rax, 0x40(%rsp) cmpq $0x0, 0x40(%rsp) setne %al xorb $-0x1, %al testb $0x1, %al jne 0x513630 jmp 0x513632 jmp 0x513656 jmp 0x51347d jmp 0x513639 movq 0x18(%rsp), %rdi addq $0x10, %rdi leaq 0x34(%rsp), %rsi callq 0x532450 movq 0x40(%rsp), %rax addq $0x78, %rsp retq movq $0x0, 0x40(%rsp) jmp 0x513639 nopw %cs:(%rax,%rax)
_ZN6google8protobuf37EnumDescriptorProto_EnumReservedRange14_InternalParseEPKcPNS0_8internal12ParseContextE: sub rsp, 78h mov qword ptr [rsp+78h+var_30], rdi; int mov [rsp+78h+var_38], rsi mov [rsp+78h+var_40], rdx; int mov rax, qword ptr [rsp+78h+var_30] mov qword ptr [rsp+78h+var_60], rax; int lea rax, [rsp+78h+var_48+4] mov qword ptr [rsp+78h+var_10], rax; int mov rax, qword ptr [rsp+78h+var_10] mov rcx, rax add rcx, 4 mov qword ptr [rsp+78h+var_58], rcx; int mov qword ptr [rsp+78h+var_50], rax loc_51345D: mov rax, qword ptr [rsp+78h+var_50] mov rcx, qword ptr [rsp+78h+var_58] mov dword ptr [rax], 0 add rax, 4 cmp rax, rcx mov qword ptr [rsp+78h+var_50], rax; int jnz short loc_51345D jmp short $+2 loc_51347D: mov rdi, [rsp+78h+var_40]; this lea rsi, [rsp+78h+var_38]; char ** call _ZN6google8protobuf8internal12ParseContext4DoneEPPKc; google::protobuf::internal::ParseContext::Done(char const**) xor al, 0FFh test al, 1 jnz short loc_513497 jmp loc_513637 loc_513497: mov rdi, [rsp+78h+var_38]; this lea rsi, [rsp+78h+var_48]; char ** xor edx, edx; unsigned int * call _ZN6google8protobuf8internal7ReadTagEPKcPjj; google::protobuf::internal::ReadTag(char const*,uint *,uint) mov [rsp+78h+var_38], rax; int mov eax, dword ptr [rsp+78h+var_48] shr eax, 3 mov [rsp+78h+var_64], eax sub eax, 1 jz short loc_5134CD jmp short $+2 loc_5134BF: mov eax, [rsp+78h+var_64] sub eax, 2 jz short loc_513516 jmp loc_51355F loc_5134CD: mov eax, dword ptr [rsp+78h+var_48] movzx eax, al cmp eax, 8 jnz short loc_51350F lea rdi, [rsp+78h+var_48+4] call _ZN6google8protobuf37EnumDescriptorProto_EnumReservedRange9_Internal13set_has_startEPNS0_8internal7HasBitsILm1EEE; google::protobuf::EnumDescriptorProto_EnumReservedRange::_Internal::set_has_start(google::protobuf::internal::HasBits<1ul> *) lea rdi, [rsp+78h+var_38]; this call _ZN6google8protobuf8internal12ReadVarint32EPPKc; google::protobuf::internal::ReadVarint32(char const**) mov ecx, eax mov rax, qword ptr [rsp+78h+var_60] mov [rax+18h], ecx cmp [rsp+78h+var_38], 0 setnz al xor al, 0FFh test al, 1 jnz short loc_513508 jmp short loc_51350D loc_513508: jmp loc_513656 loc_51350D: jmp short loc_513511 loc_51350F: jmp short loc_513561 loc_513511: jmp loc_51347D loc_513516: mov eax, dword ptr [rsp+78h+var_48] movzx eax, al cmp eax, 10h jnz short loc_513558 lea rdi, [rsp+78h+var_48+4] call _ZN6google8protobuf37EnumDescriptorProto_EnumReservedRange9_Internal11set_has_endEPNS0_8internal7HasBitsILm1EEE; google::protobuf::EnumDescriptorProto_EnumReservedRange::_Internal::set_has_end(google::protobuf::internal::HasBits<1ul> *) lea rdi, [rsp+78h+var_38]; this call _ZN6google8protobuf8internal12ReadVarint32EPPKc; google::protobuf::internal::ReadVarint32(char const**) mov ecx, eax mov rax, qword ptr [rsp+78h+var_60] mov [rax+1Ch], ecx cmp [rsp+78h+var_38], 0 setnz al xor al, 0FFh test al, 1 jnz short loc_513551 jmp short loc_513556 loc_513551: jmp loc_513656 loc_513556: jmp short loc_51355A loc_513558: jmp short loc_513561 loc_51355A: jmp loc_51347D loc_51355F: jmp short $+2 loc_513561: cmp dword ptr [rsp+78h+var_48], 0 jz short loc_513574 mov eax, dword ptr [rsp+78h+var_48] and eax, 7 cmp eax, 4 jnz short loc_51359D loc_513574: cmp [rsp+78h+var_38], 0 setnz al xor al, 0FFh test al, 1 jnz short loc_513585 jmp short loc_51358A loc_513585: jmp loc_513656 loc_51358A: mov rdi, [rsp+78h+var_40]; this mov esi, dword ptr [rsp+78h+var_48]; unsigned int call _ZN6google8protobuf8internal18EpsCopyInputStream10SetLastTagEj; google::protobuf::internal::EpsCopyInputStream::SetLastTag(uint) jmp loc_513639 loc_51359D: mov rax, qword ptr [rsp+78h+var_60] mov ecx, dword ptr [rsp+78h+var_48]; int mov [rsp+78h+var_78], rcx; int add rax, 8 mov qword ptr [rsp+78h+var_28], rax; int mov rax, qword ptr [rsp+78h+var_28] mov qword ptr [rsp+78h+var_70], rax; int mov qword ptr [rsp+78h+var_18], rax; int mov rax, qword ptr [rsp+78h+var_18] mov qword ptr [rsp+78h+var_8], rax; int mov rax, qword ptr [rsp+78h+var_8] mov rax, [rax] and rax, 1 cmp rax, 0 jz short loc_5135F3 mov rdi, qword ptr [rsp+78h+var_70] call _ZNK6google8protobuf8internal16InternalMetadata8PtrValueINS2_9ContainerINS0_15UnknownFieldSetEEEEEPT_v; google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>(void) add rax, 8 mov [rsp+78h+var_20], rax jmp short loc_513602 loc_5135F3: mov rdi, qword ptr [rsp+78h+var_70]; int call _ZN6google8protobuf8internal16InternalMetadata27mutable_unknown_fields_slowINS0_15UnknownFieldSetEEEPT_v; google::protobuf::internal::InternalMetadata::mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>(void) mov [rsp+78h+var_20], rax loc_513602: mov rdi, [rsp+78h+var_78]; this mov rsi, [rsp+78h+var_20]; unsigned __int64 mov rdx, [rsp+78h+var_38]; google::protobuf::UnknownFieldSet * mov rcx, [rsp+78h+var_40]; char * call _ZN6google8protobuf8internal17UnknownFieldParseEmPNS0_15UnknownFieldSetEPKcPNS1_12ParseContextE; google::protobuf::internal::UnknownFieldParse(ulong,google::protobuf::UnknownFieldSet *,char const*,google::protobuf::internal::ParseContext *) mov [rsp+78h+var_38], rax cmp [rsp+78h+var_38], 0 setnz al xor al, 0FFh test al, 1 jnz short loc_513630 jmp short loc_513632 loc_513630: jmp short loc_513656 loc_513632: jmp loc_51347D loc_513637: jmp short $+2 loc_513639: mov rdi, qword ptr [rsp+78h+var_60] add rdi, 10h lea rsi, [rsp+78h+var_48+4] call _ZN6google8protobuf8internal7HasBitsILm1EE2OrERKS3_; google::protobuf::internal::HasBits<1ul>::Or(google::protobuf::internal::HasBits<1ul> const&) mov rax, [rsp+78h+var_38] add rsp, 78h retn loc_513656: mov [rsp+78h+var_38], 0 jmp short loc_513639
google::protobuf::internal * google::protobuf::EnumDescriptorProto_EnumReservedRange::_InternalParse( google::protobuf::EnumDescriptorProto_EnumReservedRange *this, google::protobuf::internal *a2, google::protobuf::internal::ParseContext *a3) { google::protobuf::internal::ParseContext *v3; // r8 google::protobuf::internal *v5; // [rsp+0h] [rbp-78h] _QWORD *v6; // [rsp+8h] [rbp-70h] google::protobuf::internal::EpsCopyInputStream **v7; // [rsp+28h] [rbp-50h] char *v8; // [rsp+30h] [rbp-48h] BYREF google::protobuf::internal::EpsCopyInputStream *v9; // [rsp+38h] [rbp-40h] BYREF google::protobuf::internal *Tag; // [rsp+40h] [rbp-38h] BYREF int v11[2]; // [rsp+48h] [rbp-30h] int v12[2]; // [rsp+50h] [rbp-28h] unsigned long long v13; // [rsp+58h] [rbp-20h] int v14[2]; // [rsp+60h] [rbp-18h] int v15[2]; // [rsp+68h] [rbp-10h] int v16[2]; // [rsp+70h] [rbp-8h] *(_QWORD *)v11 = this; Tag = a2; v9 = a3; *(_QWORD *)v15 = (char *)&v8 + 4; v7 = (google::protobuf::internal::EpsCopyInputStream **)((char *)&v8 + 4); do { *(_DWORD *)v7 = 0; v7 = (google::protobuf::internal::EpsCopyInputStream **)((char *)v7 + 4); } while ( v7 != &v9 ); while ( (google::protobuf::internal::ParseContext::Done(v9, (const char **)&Tag) & 1) == 0 ) { Tag = (google::protobuf::internal *)google::protobuf::internal::ReadTag(Tag, (char *)&v8, 0LL); if ( (unsigned int)v8 >> 3 == 1 ) { if ( (unsigned __int8)v8 != 8 ) goto LABEL_14; google::protobuf::EnumDescriptorProto_EnumReservedRange::_Internal::set_has_start((char *)&v8 + 4); *((_DWORD *)this + 6) = google::protobuf::internal::ReadVarint32( (google::protobuf::internal *)&Tag, (const char **)&v8); if ( !Tag ) goto LABEL_24; } else if ( (unsigned int)v8 >> 3 == 2 && (unsigned __int8)v8 == 16 ) { google::protobuf::EnumDescriptorProto_EnumReservedRange::_Internal::set_has_end((char *)&v8 + 4); *((_DWORD *)this + 7) = google::protobuf::internal::ReadVarint32( (google::protobuf::internal *)&Tag, (const char **)&v8); if ( !Tag ) goto LABEL_24; } else { LABEL_14: if ( !(_DWORD)v8 || ((unsigned __int8)v8 & 7) == 4 ) { if ( Tag ) { google::protobuf::internal::EpsCopyInputStream::SetLastTag(v9, (int)v8); break; } LABEL_24: Tag = 0LL; break; } v5 = (google::protobuf::internal *)(unsigned int)v8; *(_QWORD *)v12 = (char *)this + 8; v6 = (_QWORD *)((char *)this + 8); *(_QWORD *)v14 = (char *)this + 8; *(_QWORD *)v16 = (char *)this + 8; if ( (*((_QWORD *)this + 1) & 1LL) != 0 ) v13 = google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>(v6) + 8; else v13 = (unsigned long long)google::protobuf::internal::InternalMetadata::mutable_unknown_fields_slow<google::protobuf::UnknownFieldSet>( v6, (unsigned long long)&v8); Tag = (google::protobuf::internal *)google::protobuf::internal::UnknownFieldParse( v5, v13, Tag, (const char *)v9, v3); if ( !Tag ) goto LABEL_24; } } google::protobuf::internal::HasBits<1ul>::Or((char *)this + 16, (char *)&v8 + 4); return Tag; }
default_value_uint32_t: MOV qword ptr [RSP + -0x8],RDI MOV RAX,qword ptr [RSP + -0x8] MOV EAX,dword ptr [RAX + 0x40] RET
/* google::protobuf::FieldDescriptor::default_value_uint32_t() const */ int4 __thiscall google::protobuf::FieldDescriptor::default_value_uint32_t(FieldDescriptor *this) { return *(int4 *)(this + 0x40); }
29,592
merkle_get_data
corpus-core[P]colibri-stateless/src/util/ssz_merkle.c
static bytes_t merkle_get_data(merkle_proof_data_t* proof, gindex_t idx) { for (uint32_t i = 0; i < proof->leafes_len; i++) { if (proof->leafes_gindex[i] == idx) return bytes_slice(proof->leafes_data, i * BYTES_PER_CHUNK, BYTES_PER_CHUNK); } for (uint32_t i = 0; i < proof->witnesses_len; i++) { if (proof->witnesses_gindex[i] == idx) return bytes_slice(proof->witnesses_data, i * BYTES_PER_CHUNK, BYTES_PER_CHUNK); } return NULL_BYTES; }
O0
c
merkle_get_data: pushq %rbp movq %rsp, %rbp movq %rdi, -0x18(%rbp) movq %rsi, -0x20(%rbp) movl $0x0, -0x24(%rbp) movl -0x24(%rbp), %eax movq -0x18(%rbp), %rcx cmpl 0x38(%rcx), %eax jae 0xa37b1 movq -0x18(%rbp), %rax movq 0x30(%rax), %rax movl -0x24(%rbp), %ecx movq (%rax,%rcx,8), %rax cmpq -0x20(%rbp), %rax jne 0xa37a4 movl $0x20, -0x10(%rbp) movq -0x18(%rbp), %rax movq 0x28(%rax), %rax movl -0x24(%rbp), %ecx shll $0x5, %ecx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x8(%rbp) jmp 0xa3815 jmp 0xa37a6 movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0xa3763 movl $0x0, -0x28(%rbp) movl -0x28(%rbp), %eax movq -0x18(%rbp), %rcx cmpl 0x18(%rcx), %eax jae 0xa3806 movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movl -0x28(%rbp), %ecx movq (%rax,%rcx,8), %rax cmpq -0x20(%rbp), %rax jne 0xa37f9 movl $0x20, -0x10(%rbp) movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movl -0x28(%rbp), %ecx shll $0x5, %ecx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x8(%rbp) jmp 0xa3815 jmp 0xa37fb movl -0x28(%rbp), %eax addl $0x1, %eax movl %eax, -0x28(%rbp) jmp 0xa37b8 movl $0x0, -0x10(%rbp) movq $0x0, -0x8(%rbp) movl -0x10(%rbp), %eax movq -0x8(%rbp), %rdx popq %rbp retq nop
merkle_get_data: push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov [rbp+var_24], 0 loc_A3763: mov eax, [rbp+var_24] mov rcx, [rbp+var_18] cmp eax, [rcx+38h] jnb short loc_A37B1 mov rax, [rbp+var_18] mov rax, [rax+30h] mov ecx, [rbp+var_24] mov rax, [rax+rcx*8] cmp rax, [rbp+var_20] jnz short loc_A37A4 mov [rbp+var_10], 20h ; ' ' mov rax, [rbp+var_18] mov rax, [rax+28h] mov ecx, [rbp+var_24] shl ecx, 5 mov ecx, ecx add rax, rcx mov [rbp+var_8], rax jmp short loc_A3815 loc_A37A4: jmp short $+2 loc_A37A6: mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp short loc_A3763 loc_A37B1: mov [rbp+var_28], 0 loc_A37B8: mov eax, [rbp+var_28] mov rcx, [rbp+var_18] cmp eax, [rcx+18h] jnb short loc_A3806 mov rax, [rbp+var_18] mov rax, [rax+10h] mov ecx, [rbp+var_28] mov rax, [rax+rcx*8] cmp rax, [rbp+var_20] jnz short loc_A37F9 mov [rbp+var_10], 20h ; ' ' mov rax, [rbp+var_18] mov rax, [rax+8] mov ecx, [rbp+var_28] shl ecx, 5 mov ecx, ecx add rax, rcx mov [rbp+var_8], rax jmp short loc_A3815 loc_A37F9: jmp short $+2 loc_A37FB: mov eax, [rbp+var_28] add eax, 1 mov [rbp+var_28], eax jmp short loc_A37B8 loc_A3806: mov [rbp+var_10], 0 mov [rbp+var_8], 0 loc_A3815: mov eax, [rbp+var_10] mov rdx, [rbp+var_8] pop rbp retn
long long merkle_get_data(long long a1, long long a2) { unsigned int j; // [rsp+0h] [rbp-28h] unsigned int i; // [rsp+4h] [rbp-24h] for ( i = 0; i < *(_DWORD *)(a1 + 56); ++i ) { if ( *(_QWORD *)(*(_QWORD *)(a1 + 48) + 8LL * i) == a2 ) return 32; } for ( j = 0; j < *(_DWORD *)(a1 + 24); ++j ) { if ( *(_QWORD *)(*(_QWORD *)(a1 + 16) + 8LL * j) == a2 ) return 32; } return 0; }
merkle_get_data: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV dword ptr [RBP + -0x24],0x0 LAB_001a3763: MOV EAX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x18] CMP EAX,dword ptr [RCX + 0x38] JNC 0x001a37b1 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x30] MOV ECX,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RAX + RCX*0x8] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x001a37a4 MOV dword ptr [RBP + -0x10],0x20 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x28] MOV ECX,dword ptr [RBP + -0x24] SHL ECX,0x5 MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x8],RAX JMP 0x001a3815 LAB_001a37a4: JMP 0x001a37a6 LAB_001a37a6: MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x001a3763 LAB_001a37b1: MOV dword ptr [RBP + -0x28],0x0 LAB_001a37b8: MOV EAX,dword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x18] CMP EAX,dword ptr [RCX + 0x18] JNC 0x001a3806 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOV ECX,dword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + RCX*0x8] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x001a37f9 MOV dword ptr [RBP + -0x10],0x20 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV ECX,dword ptr [RBP + -0x28] SHL ECX,0x5 MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x8],RAX JMP 0x001a3815 LAB_001a37f9: JMP 0x001a37fb LAB_001a37fb: MOV EAX,dword ptr [RBP + -0x28] ADD EAX,0x1 MOV dword ptr [RBP + -0x28],EAX JMP 0x001a37b8 LAB_001a3806: MOV dword ptr [RBP + -0x10],0x0 MOV qword ptr [RBP + -0x8],0x0 LAB_001a3815: MOV EAX,dword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x8] POP RBP RET
int1 [16] merkle_get_data(long param_1,long param_2) { int1 auVar1 [16]; int4 local_30; int4 local_2c; int4 local_18; int8 local_10; for (local_2c = 0; local_2c < *(uint *)(param_1 + 0x38); local_2c = local_2c + 1) { if (*(long *)(*(long *)(param_1 + 0x30) + (ulong)local_2c * 8) == param_2) { local_18 = 0x20; local_10 = *(long *)(param_1 + 0x28) + (ulong)(local_2c << 5); goto LAB_001a3815; } } local_30 = 0; do { if (*(uint *)(param_1 + 0x18) <= local_30) { local_18 = 0; local_10 = 0; LAB_001a3815: auVar1._4_4_ = 0; auVar1._0_4_ = local_18; auVar1._8_8_ = local_10; return auVar1; } if (*(long *)(*(long *)(param_1 + 0x10) + (ulong)local_30 * 8) == param_2) { local_18 = 0x20; local_10 = *(long *)(param_1 + 8) + (ulong)(local_30 << 5); goto LAB_001a3815; } local_30 = local_30 + 1; } while( true ); }
29,593
merkle_get_data
corpus-core[P]colibri-stateless/src/util/ssz_merkle.c
static bytes_t merkle_get_data(merkle_proof_data_t* proof, gindex_t idx) { for (uint32_t i = 0; i < proof->leafes_len; i++) { if (proof->leafes_gindex[i] == idx) return bytes_slice(proof->leafes_data, i * BYTES_PER_CHUNK, BYTES_PER_CHUNK); } for (uint32_t i = 0; i < proof->witnesses_len; i++) { if (proof->witnesses_gindex[i] == idx) return bytes_slice(proof->witnesses_data, i * BYTES_PER_CHUNK, BYTES_PER_CHUNK); } return NULL_BYTES; }
O2
c
merkle_get_data: movl 0x38(%rdi), %eax xorl %edx, %edx pushq $0x28 popq %rcx cmpq %rdx, %rax je 0x4e19d movq 0x30(%rdi), %r8 cmpq %rsi, (%r8,%rdx,8) je 0x4e1bc incq %rdx jmp 0x4e189 movl 0x18(%rdi), %r8d xorl %eax, %eax pushq $0x8 popq %rcx xorl %edx, %edx cmpq %rdx, %r8 je 0x4e1c7 movq 0x10(%rdi), %r9 cmpq %rsi, (%r9,%rdx,8) je 0x4e1bc incq %rdx jmp 0x4e1a8 shll $0x5, %edx addq (%rdi,%rcx), %rdx pushq $0x20 popq %rax retq xorl %edx, %edx retq nop
merkle_get_data: mov eax, [rdi+38h] xor edx, edx push 28h ; '(' pop rcx loc_4E189: cmp rax, rdx jz short loc_4E19D mov r8, [rdi+30h] cmp [r8+rdx*8], rsi jz short loc_4E1BC inc rdx jmp short loc_4E189 loc_4E19D: mov r8d, [rdi+18h] xor eax, eax push 8 pop rcx xor edx, edx loc_4E1A8: cmp r8, rdx jz short loc_4E1C7 mov r9, [rdi+10h] cmp [r9+rdx*8], rsi jz short loc_4E1BC inc rdx jmp short loc_4E1A8 loc_4E1BC: shl edx, 5 add rdx, [rdi+rcx] push 20h ; ' ' pop rax retn loc_4E1C7: xor edx, edx retn
long long merkle_get_data(long long a1, long long a2) { long long i; // rdx long long result; // rax long long j; // rdx for ( i = 0LL; *(_DWORD *)(a1 + 56) != i; ++i ) { if ( *(_QWORD *)(*(_QWORD *)(a1 + 48) + 8 * i) == a2 ) return 32LL; } result = 0LL; for ( j = 0LL; *(_DWORD *)(a1 + 24) != j; ++j ) { if ( *(_QWORD *)(*(_QWORD *)(a1 + 16) + 8 * j) == a2 ) return 32LL; } return result; }
merkle_get_data: MOV EAX,dword ptr [RDI + 0x38] XOR EDX,EDX PUSH 0x28 POP RCX LAB_0014e189: CMP RAX,RDX JZ 0x0014e19d MOV R8,qword ptr [RDI + 0x30] CMP qword ptr [R8 + RDX*0x8],RSI JZ 0x0014e1bc INC RDX JMP 0x0014e189 LAB_0014e19d: MOV R8D,dword ptr [RDI + 0x18] XOR EAX,EAX PUSH 0x8 POP RCX XOR EDX,EDX LAB_0014e1a8: CMP R8,RDX JZ 0x0014e1c7 MOV R9,qword ptr [RDI + 0x10] CMP qword ptr [R9 + RDX*0x8],RSI JZ 0x0014e1bc INC RDX JMP 0x0014e1a8 LAB_0014e1bc: SHL EDX,0x5 ADD RDX,qword ptr [RDI + RCX*0x1] PUSH 0x20 POP RAX RET LAB_0014e1c7: XOR EDX,EDX RET
int1 [16] merkle_get_data(long param_1,long param_2) { long lVar1; ulong uVar2; int1 auVar3 [16]; lVar1 = 0x28; for (uVar2 = 0; *(uint *)(param_1 + 0x38) != uVar2; uVar2 = uVar2 + 1) { if (*(long *)(*(long *)(param_1 + 0x30) + uVar2 * 8) == param_2) goto LAB_0014e1bc; } lVar1 = 8; uVar2 = 0; while( true ) { if (*(uint *)(param_1 + 0x18) == uVar2) { return ZEXT816(0); } if (*(long *)(*(long *)(param_1 + 0x10) + uVar2 * 8) == param_2) break; uVar2 = uVar2 + 1; } LAB_0014e1bc: auVar3._8_8_ = (ulong)(uint)((int)uVar2 << 5) + *(long *)(param_1 + lVar1); auVar3._0_8_ = 0x20; return auVar3; }
29,594
merkle_get_data
corpus-core[P]colibri-stateless/src/util/ssz_merkle.c
static bytes_t merkle_get_data(merkle_proof_data_t* proof, gindex_t idx) { for (uint32_t i = 0; i < proof->leafes_len; i++) { if (proof->leafes_gindex[i] == idx) return bytes_slice(proof->leafes_data, i * BYTES_PER_CHUNK, BYTES_PER_CHUNK); } for (uint32_t i = 0; i < proof->witnesses_len; i++) { if (proof->witnesses_gindex[i] == idx) return bytes_slice(proof->witnesses_data, i * BYTES_PER_CHUNK, BYTES_PER_CHUNK); } return NULL_BYTES; }
O3
c
merkle_get_data: movl 0x38(%rdi), %eax testq %rax, %rax je 0x562c4 movq 0x30(%rdi), %rcx xorl %edx, %edx cmpq %rsi, (%rcx,%rdx,8) je 0x562e5 incq %rdx cmpq %rdx, %rax jne 0x562b6 movl 0x18(%rdi), %eax testq %rax, %rax je 0x562e0 movq 0x10(%rdi), %rcx xorl %edx, %edx cmpq %rsi, (%rcx,%rdx,8) je 0x562ec incq %rdx cmpq %rdx, %rax jne 0x562d2 xorl %eax, %eax xorl %edx, %edx retq movl $0x28, %eax jmp 0x562f1 movl $0x8, %eax shll $0x5, %edx addq (%rdi,%rax), %rdx movl $0x20, %eax retq nop
merkle_get_data: mov eax, [rdi+38h] test rax, rax jz short loc_562C4 mov rcx, [rdi+30h] xor edx, edx loc_562B6: cmp [rcx+rdx*8], rsi jz short loc_562E5 inc rdx cmp rax, rdx jnz short loc_562B6 loc_562C4: mov eax, [rdi+18h] test rax, rax jz short loc_562E0 mov rcx, [rdi+10h] xor edx, edx loc_562D2: cmp [rcx+rdx*8], rsi jz short loc_562EC inc rdx cmp rax, rdx jnz short loc_562D2 loc_562E0: xor eax, eax xor edx, edx retn loc_562E5: mov eax, 28h ; '(' jmp short loc_562F1 loc_562EC: mov eax, 8 loc_562F1: shl edx, 5 add rdx, [rdi+rax] mov eax, 20h ; ' ' retn
long long merkle_get_data(long long a1, long long a2) { long long v2; // rdx long long v3; // rdx if ( *(_DWORD *)(a1 + 56) ) { v2 = 0LL; while ( *(_QWORD *)(*(_QWORD *)(a1 + 48) + 8 * v2) != a2 ) { if ( *(_DWORD *)(a1 + 56) == ++v2 ) goto LABEL_5; } } else { LABEL_5: if ( !*(_DWORD *)(a1 + 24) ) return 0LL; v3 = 0LL; while ( *(_QWORD *)(*(_QWORD *)(a1 + 16) + 8 * v3) != a2 ) { if ( *(_DWORD *)(a1 + 24) == ++v3 ) return 0LL; } } return 32LL; }
merkle_get_data: MOV EAX,dword ptr [RDI + 0x38] TEST RAX,RAX JZ 0x001562c4 MOV RCX,qword ptr [RDI + 0x30] XOR EDX,EDX LAB_001562b6: CMP qword ptr [RCX + RDX*0x8],RSI JZ 0x001562e5 INC RDX CMP RAX,RDX JNZ 0x001562b6 LAB_001562c4: MOV EAX,dword ptr [RDI + 0x18] TEST RAX,RAX JZ 0x001562e0 MOV RCX,qword ptr [RDI + 0x10] XOR EDX,EDX LAB_001562d2: CMP qword ptr [RCX + RDX*0x8],RSI JZ 0x001562ec INC RDX CMP RAX,RDX JNZ 0x001562d2 LAB_001562e0: XOR EAX,EAX XOR EDX,EDX RET LAB_001562e5: MOV EAX,0x28 JMP 0x001562f1 LAB_001562ec: MOV EAX,0x8 LAB_001562f1: SHL EDX,0x5 ADD RDX,qword ptr [RDI + RAX*0x1] MOV EAX,0x20 RET
int1 [16] merkle_get_data(long param_1,long param_2) { long lVar1; ulong uVar2; int1 auVar3 [16]; if ((ulong)*(uint *)(param_1 + 0x38) != 0) { uVar2 = 0; do { if (*(long *)(*(long *)(param_1 + 0x30) + uVar2 * 8) == param_2) { lVar1 = 0x28; goto LAB_001562f1; } uVar2 = uVar2 + 1; } while (*(uint *)(param_1 + 0x38) != uVar2); } if ((ulong)*(uint *)(param_1 + 0x18) != 0) { uVar2 = 0; do { if (*(long *)(*(long *)(param_1 + 0x10) + uVar2 * 8) == param_2) { lVar1 = 8; LAB_001562f1: auVar3._8_8_ = (ulong)(uint)((int)uVar2 << 5) + *(long *)(param_1 + lVar1); auVar3._0_8_ = 0x20; return auVar3; } uVar2 = uVar2 + 1; } while (*(uint *)(param_1 + 0x18) != uVar2); } return ZEXT816(0); }
29,595
LefDefParser::defrData::validateMaskInput(int, int, int)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defrData.cpp
int defrData::validateMaskInput(int input, int warningIndex, int getWarningsIndex) { if (VersionNum < 5.8 && input > 0) { if (warningIndex++ < getWarningsIndex) { defMsg = (char*)malloc(1000); sprintf (defMsg, "The MASK statement is available in version 5.8 and later.\nHowever, your DEF file is defined with version %g", VersionNum); defError(7415, defMsg); free(defMsg); if (checkErrors()) { return 1; } return 0; } } return 1; }
O3
cpp
LefDefParser::defrData::validateMaskInput(int, int, int): movl $0x1, %eax cmpl %ecx, %edx jge 0x2dda9 testl %esi, %esi jle 0x2dda9 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movsd 0x260(%rdi), %xmm1 movsd 0x10425(%rip), %xmm0 # 0x3e150 ucomisd %xmm1, %xmm0 jbe 0x2dda4 movl $0x3e8, %edi # imm = 0x3E8 movsd %xmm1, 0x8(%rsp) callq 0x6270 movq %rax, 0x18(%rbx) leaq 0x15fef(%rip), %rsi # 0x43d3b movq %rax, %rdi movsd 0x8(%rsp), %xmm0 movb $0x1, %al callq 0x6060 movq 0x18(%rbx), %rdx movq %rbx, %rdi movl $0x1cf7, %esi # imm = 0x1CF7 callq 0x1693a movq 0x18(%rbx), %rdi callq 0x6220 xorl %eax, %eax cmpl $0x15, 0xe0(%rbx) jl 0x2dda4 leaq 0x16244(%rip), %rdx # 0x43fcc movq %rbx, %rdi movl $0x177b, %esi # imm = 0x177B callq 0x1693a movl $0x0, 0xe0(%rbx) movl $0x1, %eax addq $0x10, %rsp popq %rbx retq
_ZN12LefDefParser8defrData17validateMaskInputEiii: mov eax, 1 cmp edx, ecx jge locret_2DDA9 test esi, esi jle locret_2DDA9 push rbx sub rsp, 10h mov rbx, rdi movsd xmm1, qword ptr [rdi+260h] movsd xmm0, cs:qword_3E150 ucomisd xmm0, xmm1 jbe short loc_2DDA4 mov edi, 3E8h movsd [rsp+18h+var_10], xmm1 call _malloc mov [rbx+18h], rax lea rsi, aTheMaskStateme; "The MASK statement is available in vers"... mov rdi, rax movsd xmm0, [rsp+18h+var_10] mov al, 1 call _sprintf mov rdx, [rbx+18h]; char * mov rdi, rbx; this mov esi, 1CF7h; int call _ZN12LefDefParser8defrData8defErrorEiPKc; LefDefParser::defrData::defError(int,char const*) mov rdi, [rbx+18h] call _free xor eax, eax cmp dword ptr [rbx+0E0h], 15h jl short loc_2DDA4 lea rdx, aTooManySyntaxE; "Too many syntax errors have been report"... mov rdi, rbx; this mov esi, 177Bh; int call _ZN12LefDefParser8defrData8defErrorEiPKc; LefDefParser::defrData::defError(int,char const*) mov dword ptr [rbx+0E0h], 0 mov eax, 1 loc_2DDA4: add rsp, 10h pop rbx locret_2DDA9: retn
long long LefDefParser::defrData::validateMaskInput(LefDefParser::defrData *this, int a2, int a3, int a4) { long long result; // rax double v5; // xmm1_8 long long v6; // rax result = 1LL; if ( a3 < a4 && a2 > 0 ) { v5 = *((double *)this + 76); if ( v5 < 5.8 ) { v6 = malloc(1000LL); *((_QWORD *)this + 3) = v6; sprintf( v6, "The MASK statement is available in version 5.8 and later.\nHowever, your DEF file is defined with version %g", v5); LefDefParser::defrData::defError(this, 0x1CF7u, *((const char **)this + 3)); free(*((_QWORD *)this + 3)); result = 0LL; if ( *((int *)this + 56) >= 21 ) { LefDefParser::defrData::defError(this, 0x177Bu, "Too many syntax errors have been reported."); *((_DWORD *)this + 56) = 0; return 1LL; } } } return result; }
validateMaskInput: MOV EAX,0x1 CMP EDX,ECX JGE 0x0012dda9 TEST ESI,ESI JLE 0x0012dda9 PUSH RBX SUB RSP,0x10 MOV RBX,RDI MOVSD XMM1,qword ptr [RDI + 0x260] MOVSD XMM0,qword ptr [0x0013e150] UCOMISD XMM0,XMM1 JBE 0x0012dda4 MOV EDI,0x3e8 MOVSD qword ptr [RSP + 0x8],XMM1 CALL 0x00106270 MOV qword ptr [RBX + 0x18],RAX LEA RSI,[0x143d3b] MOV RDI,RAX MOVSD XMM0,qword ptr [RSP + 0x8] MOV AL,0x1 CALL 0x00106060 MOV RDX,qword ptr [RBX + 0x18] MOV RDI,RBX MOV ESI,0x1cf7 CALL 0x0011693a MOV RDI,qword ptr [RBX + 0x18] CALL 0x00106220 XOR EAX,EAX CMP dword ptr [RBX + 0xe0],0x15 JL 0x0012dda4 LEA RDX,[0x143fcc] MOV RDI,RBX MOV ESI,0x177b CALL 0x0011693a MOV dword ptr [RBX + 0xe0],0x0 MOV EAX,0x1 LAB_0012dda4: ADD RSP,0x10 POP RBX LAB_0012dda9: RET
/* LefDefParser::defrData::validateMaskInput(int, int, int) */ int8 __thiscall LefDefParser::defrData::validateMaskInput(defrData *this,int param_1,int param_2,int param_3) { double dVar1; int8 uVar2; char *__s; uVar2 = 1; if (((param_2 < param_3) && (0 < param_1)) && (dVar1 = *(double *)(this + 0x260), dVar1 < DAT_0013e150)) { __s = (char *)malloc(1000); *(char **)(this + 0x18) = __s; sprintf(__s, "The MASK statement is available in version 5.8 and later.\nHowever, your DEF file is defined with version %g" ,dVar1); defError(this,0x1cf7,*(char **)(this + 0x18)); free(*(void **)(this + 0x18)); uVar2 = 0; if (0x14 < *(int *)(this + 0xe0)) { defError(this,0x177b,"Too many syntax errors have been reported."); *(int4 *)(this + 0xe0) = 0; uVar2 = 1; } } return uVar2; }
29,596
inline_mysql_cond_init
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_cond_init( #ifdef HAVE_PSI_COND_INTERFACE PSI_cond_key key, #endif mysql_cond_t *that, const pthread_condattr_t *attr) { #ifdef HAVE_PSI_COND_INTERFACE that->m_psi= PSI_COND_CALL(init_cond)(key, &that->m_cond); #else that->m_psi= NULL; #endif return pthread_cond_init(&that->m_cond, attr); }
O0
c
inline_mysql_cond_init: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) leaq 0x1def1e(%rip), %rax # 0x2c00b8 movq (%rax), %rax movq 0x60(%rax), %rax movl -0x4(%rbp), %edi movq -0x10(%rbp), %rsi callq *%rax movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x30(%rax) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x2a370 addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
inline_mysql_cond_init_3: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx lea rax, PSI_server mov rax, [rax] mov rax, [rax+60h] mov edi, [rbp+var_4] mov rsi, [rbp+var_10] call rax mov rcx, rax mov rax, [rbp+var_10] mov [rax+30h], rcx mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call _pthread_cond_init add rsp, 20h pop rbp retn
long long inline_mysql_cond_init_3(unsigned int a1, long long a2, long long a3) { *(_QWORD *)(a2 + 48) = ((long long ( *)(_QWORD, long long))PSI_server[12])(a1, a2); return pthread_cond_init(a2, a3); }
inline_mysql_cond_init: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX LEA RAX,[0x3c00b8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x60] MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x10] CALL RAX MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x30],RCX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0012a370 ADD RSP,0x20 POP RBP RET
void inline_mysql_cond_init(int4 param_1,pthread_cond_t *param_2,pthread_condattr_t *param_3) { longlong lVar1; lVar1 = (**(code **)(PSI_server + 0x60))(param_1,param_2); param_2[1].__align = lVar1; pthread_cond_init(param_2,param_3); return; }
29,597
UpSample::map_by_name(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ggml_tensor*, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, ggml_tensor*>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
7CodeWizard[P]stablediffusion/common.hpp
void map_by_name(std::map<std::string, struct ggml_tensor*>& tensors, const std::string prefix) { tensors[prefix + "conv.weight"] = conv_w; tensors[prefix + "conv.bias"] = conv_b; }
O0
cpp
UpSample::map_by_name(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ggml_tensor*, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, ggml_tensor*>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>): subq $0xc8, %rsp movq %rdx, 0x28(%rsp) movq %rsi, %rax movq 0x28(%rsp), %rsi movq %rsi, 0x30(%rsp) movq %rdi, 0xc0(%rsp) movq %rax, 0xb8(%rsp) movq %rsi, 0xb0(%rsp) movq 0xc0(%rsp), %rax movq %rax, 0x38(%rsp) movq 0x8(%rax), %rax movq %rax, 0x40(%rsp) movq 0xb8(%rsp), %rax movq %rax, 0x48(%rsp) leaq 0x11f31d(%rip), %rdx # 0x1802c8 leaq 0x90(%rsp), %rdi movq %rdi, 0x50(%rsp) callq 0x303b0 movq 0x48(%rsp), %rdi movq 0x50(%rsp), %rsi callq 0x55460 movq %rax, 0x58(%rsp) jmp 0x60fd3 movq 0x58(%rsp), %rax movq 0x40(%rsp), %rcx movq %rcx, (%rax) leaq 0x90(%rsp), %rdi callq 0xbf00 movq 0x38(%rsp), %rax movq 0x30(%rsp), %rsi movq 0x10(%rax), %rax movq %rax, 0x8(%rsp) movq 0xb8(%rsp), %rax movq %rax, 0x10(%rsp) leaq 0x11f2cb(%rip), %rdx # 0x1802df leaq 0x60(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0x303b0 movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x55460 movq %rax, 0x20(%rsp) jmp 0x61039 movq 0x20(%rsp), %rax movq 0x8(%rsp), %rcx movq %rcx, (%rax) leaq 0x60(%rsp), %rdi callq 0xbf00 addq $0xc8, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x90(%rsp), %rdi callq 0xbf00 jmp 0x61099 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x60(%rsp), %rdi callq 0xbf00 movq 0x88(%rsp), %rdi callq 0xbd30 nopw %cs:(%rax,%rax)
_ZN8UpSample11map_by_nameERSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS6_ESaISt4pairIKS6_S8_EEES6_: sub rsp, 0C8h mov qword ptr [rsp+0C8h+var_A0], rdx mov rax, rsi mov rsi, qword ptr [rsp+0C8h+var_A0]; int mov qword ptr [rsp+0C8h+var_98], rsi mov [rsp+0C8h+var_8], rdi mov qword ptr [rsp+0C8h+var_10], rax mov [rsp+0C8h+var_18], rsi mov rax, [rsp+0C8h+var_8] mov [rsp+0C8h+var_90], rax mov rax, [rax+8] mov [rsp+0C8h+var_88], rax mov rax, qword ptr [rsp+0C8h+var_10] mov [rsp+0C8h+var_80], rax lea rdx, aPostQuantConvW+0Bh; int lea rdi, [rsp+0C8h+var_38]; int mov [rsp+0C8h+var_78], rdi call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) mov rdi, [rsp+0C8h+var_80] mov rsi, [rsp+0C8h+var_78] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rsp+0C8h+var_70], rax jmp short $+2 loc_60FD3: mov rax, [rsp+0C8h+var_70] mov rcx, [rsp+0C8h+var_88] mov [rax], rcx lea rdi, [rsp+0C8h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, [rsp+0C8h+var_90] mov rsi, qword ptr [rsp+0C8h+var_98]; int mov rax, [rax+10h] mov [rsp+0C8h+var_C0], rax; void * mov rax, qword ptr [rsp+0C8h+var_10] mov qword ptr [rsp+0C8h+var_B8], rax; int lea rdx, aPostQuantConvB+0Bh; int lea rdi, [rsp+0C8h+var_68]; int mov [rsp+0C8h+var_B0], rdi; __int64 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) mov rdi, qword ptr [rsp+0C8h+var_B8] mov rsi, [rsp+0C8h+var_B0] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rsp+0C8h+var_A8], rax jmp short $+2 loc_61039: mov rax, [rsp+0C8h+var_A8] mov rcx, [rsp+0C8h+var_C0] mov [rax], rcx lea rdi, [rsp+0C8h+var_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() add rsp, 0C8h retn mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax lea rdi, [rsp+arg_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_61099 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax lea rdi, [rsp+arg_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_61099: mov rdi, [rsp+arg_80] call __Unwind_Resume
void UpSample::map_by_name(long long a1, long long a2, long long a3) { void *v3; // [rsp+8h] [rbp-C0h] long long v4; // [rsp+10h] [rbp-B8h] long long v6; // [rsp+40h] [rbp-88h] long long v7[6]; // [rsp+60h] [rbp-68h] BYREF int v8[8]; // [rsp+90h] [rbp-38h] BYREF long long v9; // [rsp+B0h] [rbp-18h] int v10[2]; // [rsp+B8h] [rbp-10h] long long v11; // [rsp+C0h] [rbp-8h] v11 = a1; *(_QWORD *)v10 = a2; v9 = a3; v6 = *(_QWORD *)(a1 + 8); std::operator+<char>((long long)v8, a3, (long long)"conv.weight"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](a2, (long long)v8) = v6; std::string::~string(v8); v3 = *(void **)(a1 + 16); v4 = *(_QWORD *)v10; std::operator+<char>((long long)v7, a3, (long long)"conv.bias"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](v4, (long long)v7) = v3; std::string::~string(v7); }
map_by_name: SUB RSP,0xc8 MOV qword ptr [RSP + 0x28],RDX MOV RAX,RSI MOV RSI,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x30],RSI MOV qword ptr [RSP + 0xc0],RDI MOV qword ptr [RSP + 0xb8],RAX MOV qword ptr [RSP + 0xb0],RSI MOV RAX,qword ptr [RSP + 0xc0] MOV qword ptr [RSP + 0x38],RAX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0xb8] MOV qword ptr [RSP + 0x48],RAX LEA RDX,[0x2802c8] LEA RDI,[RSP + 0x90] MOV qword ptr [RSP + 0x50],RDI CALL 0x001303b0 MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x50] LAB_00160fc7: CALL 0x00155460 LAB_00160fcc: MOV qword ptr [RSP + 0x58],RAX JMP 0x00160fd3 LAB_00160fd3: MOV RAX,qword ptr [RSP + 0x58] MOV RCX,qword ptr [RSP + 0x40] MOV qword ptr [RAX],RCX LEA RDI,[RSP + 0x90] CALL 0x0010bf00 MOV RAX,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0xb8] MOV qword ptr [RSP + 0x10],RAX LEA RDX,[0x2802df] LEA RDI,[RSP + 0x60] MOV qword ptr [RSP + 0x18],RDI CALL 0x001303b0 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x18] LAB_0016102d: CALL 0x00155460 LAB_00161032: MOV qword ptr [RSP + 0x20],RAX JMP 0x00161039 LAB_00161039: MOV RAX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RAX],RCX LEA RDI,[RSP + 0x60] CALL 0x0010bf00 ADD RSP,0xc8 RET
/* UpSample::map_by_name(std::map<std::__cxx11::string, ggml_tensor*, std::less<std::__cxx11::string >, std::allocator<std::pair<std::__cxx11::string const, ggml_tensor*> > >&, std::__cxx11::string) */ void __thiscall UpSample::map_by_name (UpSample *this, map<std::__cxx11::string,ggml_tensor*,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>> *param_1,char *param_3) { int8 uVar1; map<std::__cxx11::string,ggml_tensor*,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>> *this_00; int8 *puVar2; string local_68 [48]; string local_38 [32]; char *local_18; map<std::__cxx11::string,ggml_tensor*,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>> *local_10; UpSample *local_8; uVar1 = *(int8 *)(this + 8); local_18 = param_3; local_10 = param_1; local_8 = this; std::operator+(local_38,param_3); /* try { // try from 00160fc7 to 00160fcb has its CatchHandler @ 00161058 */ puVar2 = (int8 *) std:: map<std::__cxx11::string,ggml_tensor*,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>> ::operator[](param_1,local_38); *puVar2 = uVar1; std::__cxx11::string::~string(local_38); this_00 = local_10; uVar1 = *(int8 *)(this + 0x10); std::operator+(local_68,param_3); /* try { // try from 0016102d to 00161031 has its CatchHandler @ 0016107b */ puVar2 = (int8 *) std:: map<std::__cxx11::string,ggml_tensor*,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>> ::operator[](this_00,local_68); *puVar2 = uVar1; std::__cxx11::string::~string(local_68); return; }
29,598
UpSample::map_by_name(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ggml_tensor*, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, ggml_tensor*>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
7CodeWizard[P]stablediffusion/common.hpp
void map_by_name(std::map<std::string, struct ggml_tensor*>& tensors, const std::string prefix) { tensors[prefix + "conv.weight"] = conv_w; tensors[prefix + "conv.bias"] = conv_b; }
O3
cpp
UpSample::map_by_name(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ggml_tensor*, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, ggml_tensor*>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %r14 movq %rsi, %rbx movq %rdi, %r15 movq 0x8(%rdi), %rbp leaq 0x18(%rsp), %r13 movq %r13, -0x10(%r13) movq (%rdx), %rsi movq 0x8(%rdx), %rdx addq %rsi, %rdx leaq 0x8(%rsp), %r12 movq %r12, %rdi callq 0x2ebc4 leaq 0x79b22(%rip), %rsi # 0xbd9ac movq %r12, %rdi callq 0xabe0 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x3f380 movq %rbp, (%rax) movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x43eb9 movq 0x18(%rsp), %rsi incq %rsi callq 0xa5d0 movq 0x10(%r15), %r12 leaq 0x8(%rsp), %r15 movq %r13, (%r15) movq (%r14), %rsi movq 0x8(%r14), %rdx addq %rsi, %rdx movq %r15, %rdi callq 0x2ebc4 leaq 0x79ae5(%rip), %rsi # 0xbd9c3 movq %r15, %rdi callq 0xabe0 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x3f380 movq %r12, (%rax) movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x43f0d movq 0x18(%rsp), %rsi incq %rsi callq 0xa5d0 addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x43f22 jmp 0x43f22 jmp 0x43f22 movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x43f3c movq 0x18(%rsp), %rsi incq %rsi callq 0xa5d0 movq %rbx, %rdi callq 0xaad0
_ZN8UpSample11map_by_nameERSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS6_ESaISt4pairIKS6_S8_EEES6_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r14, rdx mov rbx, rsi mov r15, rdi mov rbp, [rdi+8] lea r13, [rsp+58h+var_40] mov [r13-10h], r13 mov rsi, [rdx] mov rdx, [rdx+8] add rdx, rsi lea r12, [rsp+58h+var_50] mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, aPostQuantConvW+0Bh; "conv.weight" mov rdi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rax], rbp mov rdi, [rsp+58h+var_50]; void * cmp rdi, r13 jz short loc_43EB9 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_43EB9: mov r12, [r15+10h] lea r15, [rsp+58h+var_50] mov [r15], r13 mov rsi, [r14] mov rdx, [r14+8] add rdx, rsi mov rdi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, aPostQuantConvB+0Bh; "conv.bias" mov rdi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEEixEOS5_; std::map<std::string,ggml_tensor *>::operator[](std::string&&) mov [rax], r12 mov rdi, [rsp+58h+var_50]; void * cmp rdi, r13 jz short loc_43F0D mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_43F0D: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_43F22 jmp short loc_43F22 jmp short $+2 loc_43F22: mov rbx, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r13 jz short loc_43F3C mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_43F3C: mov rdi, rbx call __Unwind_Resume
void UpSample::map_by_name(long long a1, long long a2, _BYTE **a3) { long long v4; // rbp long long v5; // r12 void *v6[2]; // [rsp+8h] [rbp-50h] BYREF _QWORD v7[8]; // [rsp+18h] [rbp-40h] BYREF v4 = *(_QWORD *)(a1 + 8); v6[0] = v7; std::string::_M_construct<char *>((long long)v6, *a3, (long long)&a3[1][(_QWORD)*a3]); std::string::append(v6, "conv.weight"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](a2, (long long)v6) = v4; if ( v6[0] != v7 ) operator delete(v6[0], v7[0] + 1LL); v5 = *(_QWORD *)(a1 + 16); v6[0] = v7; std::string::_M_construct<char *>((long long)v6, *a3, (long long)&a3[1][(_QWORD)*a3]); std::string::append(v6, "conv.bias"); *(_QWORD *)std::map<std::string,ggml_tensor *>::operator[](a2, (long long)v6) = v5; if ( v6[0] != v7 ) operator delete(v6[0], v7[0] + 1LL); }
29,599
my_read
eloqsql/mysys/my_read.c
size_t my_read(File Filedes, uchar *Buffer, size_t Count, myf MyFlags) { size_t readbytes, save_count= 0; DBUG_ENTER("my_read"); DBUG_PRINT("my",("fd: %d Buffer: %p Count: %lu MyFlags: %lu", Filedes, Buffer, (ulong) Count, MyFlags)); if (!(MyFlags & (MY_WME | MY_FAE | MY_FNABP))) MyFlags|= my_global_flags; for (;;) { errno= 0; /* Linux, Windows don't reset this on EOF/success */ #ifdef _WIN32 readbytes= my_win_read(Filedes, Buffer, Count); #else readbytes= read(Filedes, Buffer, Count); #endif DBUG_EXECUTE_IF ("simulate_file_read_error", { errno= ENOSPC; readbytes= (size_t) -1; DBUG_SET("-d,simulate_file_read_error"); DBUG_SET("-d,simulate_my_b_fill_error"); }); if (readbytes != Count) { int got_errno= my_errno= errno; DBUG_PRINT("warning",("Read only %d bytes off %lu from %d, errno: %d", (int) readbytes, (ulong) Count, Filedes, got_errno)); if (got_errno == 0 || (readbytes != (size_t) -1 && (MyFlags & (MY_NABP | MY_FNABP)))) my_errno= HA_ERR_FILE_TOO_SHORT; if ((readbytes == 0 || (int) readbytes == -1) && got_errno == EINTR) { DBUG_PRINT("debug", ("my_read() was interrupted and returned %ld", (long) readbytes)); continue; /* Interrupted */ } /* Do a read retry if we didn't get enough data on first read */ if (readbytes != (size_t) -1 && readbytes != 0 && (MyFlags & MY_FULL_IO)) { Buffer+= readbytes; Count-= readbytes; save_count+= readbytes; continue; } if (MyFlags & (MY_WME | MY_FAE | MY_FNABP)) { if (readbytes == (size_t) -1) my_error(EE_READ, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))), my_filename(Filedes), got_errno); else if (MyFlags & (MY_NABP | MY_FNABP)) my_error(EE_EOFERR, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))), my_filename(Filedes), got_errno); } if (readbytes == (size_t) -1 || ((MyFlags & (MY_FNABP | MY_NABP)) && !(MyFlags & MY_FULL_IO))) DBUG_RETURN(MY_FILE_ERROR); /* Return with error */ } if (MyFlags & (MY_NABP | MY_FNABP)) readbytes= 0; /* Ok on read */ else readbytes+= save_count; break; } DBUG_RETURN(readbytes); }
O0
c
my_read: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movl %edi, -0xc(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq $0x0, -0x38(%rbp) jmp 0x65871 movq -0x28(%rbp), %rax andq $0x1a, %rax cmpq $0x0, %rax jne 0x65891 leaq 0x3a8e92(%rip), %rax # 0x40e718 movq (%rax), %rax orq -0x28(%rbp), %rax movq %rax, -0x28(%rbp) jmp 0x65893 callq 0x26050 movl $0x0, (%rax) movl -0xc(%rbp), %edi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x26490 movq %rax, -0x30(%rbp) jmp 0x658b4 movq -0x30(%rbp), %rax cmpq -0x20(%rbp), %rax je 0x65a29 callq 0x26050 movl (%rax), %eax movl %eax, -0x40(%rbp) callq 0x5a150 movq %rax, %rcx movl -0x40(%rbp), %eax movl %eax, (%rcx) movl %eax, -0x3c(%rbp) jmp 0x658de cmpl $0x0, -0x3c(%rbp) je 0x658f9 cmpq $-0x1, -0x30(%rbp) je 0x65904 movq -0x28(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0x65904 callq 0x5a150 movl $0xaf, (%rax) cmpq $0x0, -0x30(%rbp) je 0x65914 movq -0x30(%rbp), %rax cmpl $-0x1, %eax jne 0x65923 cmpl $0x4, -0x3c(%rbp) jne 0x65923 jmp 0x6591c jmp 0x6591e jmp 0x65893 cmpq $-0x1, -0x30(%rbp) je 0x6596d cmpq $0x0, -0x30(%rbp) je 0x6596d movq -0x28(%rbp), %rax andq $0x200, %rax # imm = 0x200 cmpq $0x0, %rax je 0x6596d movq -0x30(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x30(%rbp), %rcx movq -0x20(%rbp), %rax subq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x30(%rbp), %rax addq -0x38(%rbp), %rax movq %rax, -0x38(%rbp) jmp 0x65893 movq -0x28(%rbp), %rax andq $0x1a, %rax cmpq $0x0, %rax je 0x659f6 cmpq $-0x1, -0x30(%rbp) jne 0x659b4 movq -0x28(%rbp), %rax andq $0x440, %rax # imm = 0x440 orq $0x4, %rax movq %rax, -0x48(%rbp) movl -0xc(%rbp), %edi callq 0x644e0 movq -0x48(%rbp), %rsi movq %rax, %rdx movl -0x3c(%rbp), %ecx movl $0x2, %edi movb $0x0, %al callq 0x64630 jmp 0x659f4 movq -0x28(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0x659f2 movq -0x28(%rbp), %rax andq $0x440, %rax # imm = 0x440 orq $0x4, %rax movq %rax, -0x50(%rbp) movl -0xc(%rbp), %edi callq 0x644e0 movq -0x50(%rbp), %rsi movq %rax, %rdx movl -0x3c(%rbp), %ecx movl $0x9, %edi movb $0x0, %al callq 0x64630 jmp 0x659f4 jmp 0x659f6 cmpq $-0x1, -0x30(%rbp) je 0x65a1b movq -0x28(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0x65a27 movq -0x28(%rbp), %rax andq $0x200, %rax # imm = 0x200 cmpq $0x0, %rax jne 0x65a27 jmp 0x65a1d movq $-0x1, -0x8(%rbp) jmp 0x65a59 jmp 0x65a29 movq -0x28(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0x65a41 movq $0x0, -0x30(%rbp) jmp 0x65a4d movq -0x38(%rbp), %rax addq -0x30(%rbp), %rax movq %rax, -0x30(%rbp) jmp 0x65a4f jmp 0x65a51 movq -0x30(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
my_read: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_C], edi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_38], 0 jmp short $+2 loc_65871: mov rax, [rbp+var_28] and rax, 1Ah cmp rax, 0 jnz short loc_65891 lea rax, my_global_flags mov rax, [rax] or rax, [rbp+var_28] mov [rbp+var_28], rax loc_65891: jmp short $+2 loc_65893: call ___errno_location mov dword ptr [rax], 0 mov edi, [rbp+var_C] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call _read mov [rbp+var_30], rax jmp short $+2 loc_658B4: mov rax, [rbp+var_30] cmp rax, [rbp+var_20] jz loc_65A29 call ___errno_location mov eax, [rax] mov [rbp+var_40], eax call _my_thread_var mov rcx, rax mov eax, [rbp+var_40] mov [rcx], eax mov [rbp+var_3C], eax jmp short $+2 loc_658DE: cmp [rbp+var_3C], 0 jz short loc_658F9 cmp [rbp+var_30], 0FFFFFFFFFFFFFFFFh jz short loc_65904 mov rax, [rbp+var_28] and rax, 6 cmp rax, 0 jz short loc_65904 loc_658F9: call _my_thread_var mov dword ptr [rax], 0AFh loc_65904: cmp [rbp+var_30], 0 jz short loc_65914 mov rax, [rbp+var_30] cmp eax, 0FFFFFFFFh jnz short loc_65923 loc_65914: cmp [rbp+var_3C], 4 jnz short loc_65923 jmp short $+2 loc_6591C: jmp short $+2 loc_6591E: jmp loc_65893 loc_65923: cmp [rbp+var_30], 0FFFFFFFFFFFFFFFFh jz short loc_6596D cmp [rbp+var_30], 0 jz short loc_6596D mov rax, [rbp+var_28] and rax, 200h cmp rax, 0 jz short loc_6596D mov rax, [rbp+var_30] add rax, [rbp+var_18] mov [rbp+var_18], rax mov rcx, [rbp+var_30] mov rax, [rbp+var_20] sub rax, rcx mov [rbp+var_20], rax mov rax, [rbp+var_30] add rax, [rbp+var_38] mov [rbp+var_38], rax jmp loc_65893 loc_6596D: mov rax, [rbp+var_28] and rax, 1Ah cmp rax, 0 jz short loc_659F6 cmp [rbp+var_30], 0FFFFFFFFFFFFFFFFh jnz short loc_659B4 mov rax, [rbp+var_28] and rax, 440h or rax, 4 mov [rbp+var_48], rax mov edi, [rbp+var_C] call my_filename mov rsi, [rbp+var_48] mov rdx, rax mov ecx, [rbp+var_3C] mov edi, 2 mov al, 0 call my_error jmp short loc_659F4 loc_659B4: mov rax, [rbp+var_28] and rax, 6 cmp rax, 0 jz short loc_659F2 mov rax, [rbp+var_28] and rax, 440h or rax, 4 mov [rbp+var_50], rax mov edi, [rbp+var_C] call my_filename mov rsi, [rbp+var_50] mov rdx, rax mov ecx, [rbp+var_3C] mov edi, 9 mov al, 0 call my_error loc_659F2: jmp short $+2 loc_659F4: jmp short $+2 loc_659F6: cmp [rbp+var_30], 0FFFFFFFFFFFFFFFFh jz short loc_65A1B mov rax, [rbp+var_28] and rax, 6 cmp rax, 0 jz short loc_65A27 mov rax, [rbp+var_28] and rax, 200h cmp rax, 0 jnz short loc_65A27 loc_65A1B: jmp short $+2 loc_65A1D: mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp short loc_65A59 loc_65A27: jmp short $+2 loc_65A29: mov rax, [rbp+var_28] and rax, 6 cmp rax, 0 jz short loc_65A41 mov [rbp+var_30], 0 jmp short loc_65A4D loc_65A41: mov rax, [rbp+var_38] add rax, [rbp+var_30] mov [rbp+var_30], rax loc_65A4D: jmp short $+2 loc_65A4F: jmp short $+2 loc_65A51: mov rax, [rbp+var_30] mov [rbp+var_8], rax loc_65A59: mov rax, [rbp+var_8] add rsp, 50h pop rbp retn
long long my_read(unsigned int a1, long long a2, long long a3, __int16 a4) { const char *v4; // rax const char *v5; // rax unsigned int v7; // [rsp+10h] [rbp-40h] long long v8; // [rsp+18h] [rbp-38h] long long v9; // [rsp+20h] [rbp-30h] __int16 v11; // [rsp+28h] [rbp-28h] v11 = a4; v8 = 0LL; if ( (a4 & 0x1A) == 0 ) v11 = a4 | my_global_flags; while ( 1 ) { *(_DWORD *)__errno_location() = 0; v9 = read(a1, a2, a3); if ( v9 == a3 ) break; v7 = *(_DWORD *)__errno_location(); *(_DWORD *)my_thread_var() = v7; if ( !v7 || v9 != -1 && (v11 & 6) != 0 ) *(_DWORD *)my_thread_var() = 175; if ( v9 && (_DWORD)v9 != -1 || v7 != 4 ) { if ( v9 == -1 || !v9 || (v11 & 0x200) == 0 ) { if ( (v11 & 0x1A) != 0 ) { if ( v9 == -1 ) { v4 = my_filename(a1); my_error(2u, v11 & 0x440 | 4LL, v4, v7); } else if ( (v11 & 6) != 0 ) { v5 = my_filename(a1); my_error(9u, v11 & 0x440 | 4LL, v5, v7); } } if ( v9 == -1 || (v11 & 6) != 0 && (v11 & 0x200) == 0 ) return -1LL; break; } a2 += v9; a3 -= v9; v8 += v9; } } if ( (v11 & 6) != 0 ) return 0LL; else return v9 + v8; }
my_read: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV dword ptr [RBP + -0xc],EDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x38],0x0 JMP 0x00165871 LAB_00165871: MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x1a CMP RAX,0x0 JNZ 0x00165891 LEA RAX,[0x50e718] MOV RAX,qword ptr [RAX] OR RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x28],RAX LAB_00165891: JMP 0x00165893 LAB_00165893: CALL 0x00126050 MOV dword ptr [RAX],0x0 MOV EDI,dword ptr [RBP + -0xc] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x00126490 MOV qword ptr [RBP + -0x30],RAX JMP 0x001658b4 LAB_001658b4: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x20] JZ 0x00165a29 CALL 0x00126050 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x40],EAX CALL 0x0015a150 MOV RCX,RAX MOV EAX,dword ptr [RBP + -0x40] MOV dword ptr [RCX],EAX MOV dword ptr [RBP + -0x3c],EAX JMP 0x001658de LAB_001658de: CMP dword ptr [RBP + -0x3c],0x0 JZ 0x001658f9 CMP qword ptr [RBP + -0x30],-0x1 JZ 0x00165904 MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x6 CMP RAX,0x0 JZ 0x00165904 LAB_001658f9: CALL 0x0015a150 MOV dword ptr [RAX],0xaf LAB_00165904: CMP qword ptr [RBP + -0x30],0x0 JZ 0x00165914 MOV RAX,qword ptr [RBP + -0x30] CMP EAX,-0x1 JNZ 0x00165923 LAB_00165914: CMP dword ptr [RBP + -0x3c],0x4 JNZ 0x00165923 JMP 0x0016591c LAB_0016591c: JMP 0x0016591e LAB_0016591e: JMP 0x00165893 LAB_00165923: CMP qword ptr [RBP + -0x30],-0x1 JZ 0x0016596d CMP qword ptr [RBP + -0x30],0x0 JZ 0x0016596d MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x200 CMP RAX,0x0 JZ 0x0016596d MOV RAX,qword ptr [RBP + -0x30] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x18],RAX MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x20] SUB RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x38],RAX JMP 0x00165893 LAB_0016596d: MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x1a CMP RAX,0x0 JZ 0x001659f6 CMP qword ptr [RBP + -0x30],-0x1 JNZ 0x001659b4 MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x440 OR RAX,0x4 MOV qword ptr [RBP + -0x48],RAX MOV EDI,dword ptr [RBP + -0xc] CALL 0x001644e0 MOV RSI,qword ptr [RBP + -0x48] MOV RDX,RAX MOV ECX,dword ptr [RBP + -0x3c] MOV EDI,0x2 MOV AL,0x0 CALL 0x00164630 JMP 0x001659f4 LAB_001659b4: MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x6 CMP RAX,0x0 JZ 0x001659f2 MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x440 OR RAX,0x4 MOV qword ptr [RBP + -0x50],RAX MOV EDI,dword ptr [RBP + -0xc] CALL 0x001644e0 MOV RSI,qword ptr [RBP + -0x50] MOV RDX,RAX MOV ECX,dword ptr [RBP + -0x3c] MOV EDI,0x9 MOV AL,0x0 CALL 0x00164630 LAB_001659f2: JMP 0x001659f4 LAB_001659f4: JMP 0x001659f6 LAB_001659f6: CMP qword ptr [RBP + -0x30],-0x1 JZ 0x00165a1b MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x6 CMP RAX,0x0 JZ 0x00165a27 MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x200 CMP RAX,0x0 JNZ 0x00165a27 LAB_00165a1b: JMP 0x00165a1d LAB_00165a1d: MOV qword ptr [RBP + -0x8],-0x1 JMP 0x00165a59 LAB_00165a27: JMP 0x00165a29 LAB_00165a29: MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x6 CMP RAX,0x0 JZ 0x00165a41 MOV qword ptr [RBP + -0x30],0x0 JMP 0x00165a4d LAB_00165a41: MOV RAX,qword ptr [RBP + -0x38] ADD RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x30],RAX LAB_00165a4d: JMP 0x00165a4f LAB_00165a4f: JMP 0x00165a51 LAB_00165a51: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x8],RAX LAB_00165a59: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
long my_read(int param_1,void *param_2,size_t param_3,ulong param_4) { int iVar1; int *piVar2; size_t sVar3; int4 *puVar4; int8 uVar5; long local_40; long local_38; ulong local_30; size_t local_28; void *local_20; local_40 = 0; local_28 = param_3; local_20 = param_2; local_30 = param_4; if ((param_4 & 0x1a) == 0) { local_30 = my_global_flags | param_4; } do { do { piVar2 = __errno_location(); *piVar2 = 0; sVar3 = read(param_1,local_20,local_28); if (sVar3 == local_28) { LAB_00165a29: if ((local_30 & 6) == 0) { local_38 = local_40 + sVar3; } else { local_38 = 0; } return local_38; } piVar2 = __errno_location(); iVar1 = *piVar2; piVar2 = (int *)_my_thread_var(); *piVar2 = iVar1; if ((iVar1 == 0) || ((sVar3 != 0xffffffffffffffff && ((local_30 & 6) != 0)))) { puVar4 = (int4 *)_my_thread_var(); *puVar4 = 0xaf; } } while (((sVar3 == 0) || ((int)sVar3 == -1)) && (iVar1 == 4)); if (((sVar3 == 0xffffffffffffffff) || (sVar3 == 0)) || ((local_30 & 0x200) == 0)) { if ((local_30 & 0x1a) != 0) { if (sVar3 == 0xffffffffffffffff) { uVar5 = my_filename(param_1); my_error(2,local_30 & 0x440 | 4,uVar5,iVar1); } else if ((local_30 & 6) != 0) { uVar5 = my_filename(param_1); my_error(9,local_30 & 0x440 | 4,uVar5,iVar1); } } if ((sVar3 == 0xffffffffffffffff) || (((local_30 & 6) != 0 && ((local_30 & 0x200) == 0)))) { return -1; } goto LAB_00165a29; } local_20 = (void *)(sVar3 + (long)local_20); local_28 = local_28 - sVar3; local_40 = sVar3 + local_40; } while( true ); }