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
20,600
ggml_threadpool_params_from_cpu_params(cpu_params const&)
llama.cpp/common/common.cpp
struct ggml_threadpool_params ggml_threadpool_params_from_cpu_params(const cpu_params & params) { struct ggml_threadpool_params tpp; ggml_threadpool_params_init(&tpp, params.n_threads); // setup the defaults if (params.mask_valid) { std::memcpy(&tpp.cpumask, &params.cpumask, GGML_MAX_N_THREADS); } tpp.prio = params.priority; tpp.poll = params.poll; tpp.strict_cpu = params.strict_cpu; return tpp; }
O3
cpp
ggml_threadpool_params_from_cpu_params(cpu_params const&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movl (%rsi), %esi callq 0x21330 cmpb $0x1, 0x204(%r14) jne 0xf9d19 leaq 0x4(%r14), %rsi movl $0x200, %edx # imm = 0x200 movq %rbx, %rdi callq 0x200f0 movl 0x208(%r14), %eax movl %eax, 0x204(%rbx) movl 0x210(%r14), %eax movl %eax, 0x208(%rbx) movb 0x20c(%r14), %al movb %al, 0x20c(%rbx) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_Z38ggml_threadpool_params_from_cpu_paramsRK10cpu_params: push r14 push rbx push rax mov r14, rsi mov rbx, rdi mov esi, [rsi] call _ggml_threadpool_params_init cmp byte ptr [r14+204h], 1 jnz short loc_F9D19 lea rsi, [r14+4] mov edx, 200h mov rdi, rbx call _memcpy loc_F9D19: mov eax, [r14+208h] mov [rbx+204h], eax mov eax, [r14+210h] mov [rbx+208h], eax mov al, [r14+20Ch] mov [rbx+20Ch], al mov rax, rbx add rsp, 8 pop rbx pop r14 retn
long long ggml_threadpool_params_from_cpu_params(long long a1, unsigned int *a2) { ggml_threadpool_params_init(a1, *a2); if ( *((_BYTE *)a2 + 516) == 1 ) memcpy(a1, a2 + 1, 512LL); *(_DWORD *)(a1 + 516) = a2[130]; *(_DWORD *)(a1 + 520) = a2[132]; *(_BYTE *)(a1 + 524) = *((_BYTE *)a2 + 524); return a1; }
ggml_threadpool_params_from_cpu_params: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV ESI,dword ptr [RSI] CALL 0x00121330 CMP byte ptr [R14 + 0x204],0x1 JNZ 0x001f9d19 LEA RSI,[R14 + 0x4] MOV EDX,0x200 MOV RDI,RBX CALL 0x001200f0 LAB_001f9d19: MOV EAX,dword ptr [R14 + 0x208] MOV dword ptr [RBX + 0x204],EAX MOV EAX,dword ptr [R14 + 0x210] MOV dword ptr [RBX + 0x208],EAX MOV AL,byte ptr [R14 + 0x20c] MOV byte ptr [RBX + 0x20c],AL MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* ggml_threadpool_params_from_cpu_params(cpu_params const&) */ cpu_params * ggml_threadpool_params_from_cpu_params(cpu_params *param_1) { int4 *in_RSI; ggml_threadpool_params_init(param_1,*in_RSI); if (*(char *)(in_RSI + 0x81) == '\x01') { memcpy(param_1,in_RSI + 1,0x200); } *(int4 *)(param_1 + 0x204) = in_RSI[0x82]; *(int4 *)(param_1 + 0x208) = in_RSI[0x84]; param_1[0x20c] = *(cpu_params *)(in_RSI + 0x83); return param_1; }
20,601
Cache::writeBlockToLowerLevel(Cache::Block&)
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Cache.cpp
void Cache::writeBlockToLowerLevel(Cache::Block &b) { uint32_t addrBegin = this->getAddr(b); if (this->lowerCache == nullptr) { for (uint32_t i = 0; i < b.size; ++i) { this->memory->setByteNoCache(addrBegin + i, b.data[i]); } } else { for (uint32_t i = 0; i < b.size; ++i) { this->lowerCache->setByte(addrBegin + i, b.data[i]); } } }
O0
cpp
Cache::writeBlockToLowerLevel(Cache::Block&): subq $0x48, %rsp movq %rdi, 0x40(%rsp) movq %rsi, 0x38(%rsp) movq 0x40(%rsp), %rdi movq %rdi, 0x20(%rsp) movq 0x38(%rsp), %rsi callq 0x8e40 movl %eax, %ecx movq 0x20(%rsp), %rax movl %ecx, 0x34(%rsp) cmpq $0x0, 0x28(%rax) jne 0x89d8 movl $0x0, 0x30(%rsp) movl 0x30(%rsp), %eax movq 0x38(%rsp), %rcx cmpl 0xc(%rcx), %eax jae 0x89d6 movq 0x20(%rsp), %rax movq 0x20(%rax), %rax movq %rax, 0x10(%rsp) movl 0x34(%rsp), %eax addl 0x30(%rsp), %eax movl %eax, 0x1c(%rsp) movq 0x38(%rsp), %rdi addq $0x18, %rdi movl 0x30(%rsp), %eax movl %eax, %esi callq 0x8ee0 movq 0x10(%rsp), %rdi movl 0x1c(%rsp), %esi movzbl (%rax), %edx callq 0x7200 movl 0x30(%rsp), %eax addl $0x1, %eax movl %eax, 0x30(%rsp) jmp 0x897c jmp 0x8a3c movl $0x0, 0x2c(%rsp) movl 0x2c(%rsp), %eax movq 0x38(%rsp), %rcx cmpl 0xc(%rcx), %eax jae 0x8a3a movq 0x20(%rsp), %rax movq 0x28(%rax), %rax movq %rax, (%rsp) movl 0x34(%rsp), %eax addl 0x2c(%rsp), %eax movl %eax, 0xc(%rsp) movq 0x38(%rsp), %rdi addq $0x18, %rdi movl 0x2c(%rsp), %eax movl %eax, %esi callq 0x8ee0 movq (%rsp), %rdi movl 0xc(%rsp), %esi xorl %ecx, %ecx movzbl (%rax), %edx callq 0x86d0 movl 0x2c(%rsp), %eax addl $0x1, %eax movl %eax, 0x2c(%rsp) jmp 0x89e0 jmp 0x8a3c addq $0x48, %rsp retq nopw %cs:(%rax,%rax)
_ZN5Cache22writeBlockToLowerLevelERNS_5BlockE: sub rsp, 48h mov [rsp+48h+var_8], rdi mov [rsp+48h+var_10], rsi mov rdi, [rsp+48h+var_8] mov [rsp+48h+var_28], rdi mov rsi, [rsp+48h+var_10] call _ZN5Cache7getAddrERNS_5BlockE; Cache::getAddr(Cache::Block &) mov ecx, eax mov rax, [rsp+48h+var_28] mov [rsp+48h+var_14], ecx cmp qword ptr [rax+28h], 0 jnz short loc_89D8 mov [rsp+48h+var_18], 0 loc_897C: mov eax, [rsp+48h+var_18] mov rcx, [rsp+48h+var_10] cmp eax, [rcx+0Ch] jnb short loc_89D6 mov rax, [rsp+48h+var_28] mov rax, [rax+20h] mov [rsp+48h+var_38], rax mov eax, [rsp+48h+var_14] add eax, [rsp+48h+var_18] mov [rsp+48h+var_2C], eax mov rdi, [rsp+48h+var_10] add rdi, 18h mov eax, [rsp+48h+var_18] mov esi, eax call _ZNSt6vectorIhSaIhEEixEm; std::vector<uchar>::operator[](ulong) mov rdi, [rsp+48h+var_38]; this mov esi, [rsp+48h+var_2C]; unsigned int movzx edx, byte ptr [rax]; unsigned __int8 call _ZN13MemoryManager14setByteNoCacheEjh; MemoryManager::setByteNoCache(uint,uchar) mov eax, [rsp+48h+var_18] add eax, 1 mov [rsp+48h+var_18], eax jmp short loc_897C loc_89D6: jmp short loc_8A3C loc_89D8: mov [rsp+48h+var_1C], 0 loc_89E0: mov eax, [rsp+48h+var_1C] mov rcx, [rsp+48h+var_10] cmp eax, [rcx+0Ch] jnb short loc_8A3A mov rax, [rsp+48h+var_28] mov rax, [rax+28h] mov [rsp+48h+var_48], rax mov eax, [rsp+48h+var_14] add eax, [rsp+48h+var_1C] mov [rsp+48h+var_3C], eax mov rdi, [rsp+48h+var_10] add rdi, 18h mov eax, [rsp+48h+var_1C] mov esi, eax call _ZNSt6vectorIhSaIhEEixEm; std::vector<uchar>::operator[](ulong) mov rdi, [rsp+48h+var_48]; this mov esi, [rsp+48h+var_3C]; unsigned int xor ecx, ecx; unsigned int * movzx edx, byte ptr [rax]; unsigned __int8 call _ZN5Cache7setByteEjhPj; Cache::setByte(uint,uchar,uint *) mov eax, [rsp+48h+var_1C] add eax, 1 mov [rsp+48h+var_1C], eax jmp short loc_89E0 loc_8A3A: jmp short $+2 loc_8A3C: add rsp, 48h retn
long long Cache::writeBlockToLowerLevel( MemoryManager **this, Cache::Block *a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10) { long long result; // rax char *v11; // rax double v12; // xmm4_8 double v13; // xmm5_8 char *v14; // rax double v15; // xmm4_8 double v16; // xmm5_8 Cache *v17; // [rsp+0h] [rbp-48h] MemoryManager *v18; // [rsp+10h] [rbp-38h] unsigned int i; // [rsp+2Ch] [rbp-1Ch] unsigned int j; // [rsp+30h] [rbp-18h] int Addr; // [rsp+34h] [rbp-14h] Addr = Cache::getAddr((Cache *)this, a2); if ( this[5] ) { for ( i = 0; ; ++i ) { result = i; if ( i >= *((_DWORD *)a2 + 3) ) break; v17 = this[5]; v14 = (char *)std::vector<unsigned char>::operator[]((char *)a2 + 24, i); Cache::setByte(v17, i + Addr, *v14, 0LL, a3, a4, a5, a6, v15, v16, a9, a10); } } else { for ( j = 0; ; ++j ) { result = j; if ( j >= *((_DWORD *)a2 + 3) ) break; v18 = this[4]; v11 = (char *)std::vector<unsigned char>::operator[]((char *)a2 + 24, j); MemoryManager::setByteNoCache(v18, j + Addr, *v11, a3, a4, a5, a6, v12, v13, a9, a10); } } return result; }
writeBlockToLowerLevel: SUB RSP,0x48 MOV qword ptr [RSP + 0x40],RDI MOV qword ptr [RSP + 0x38],RSI MOV RDI,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x20],RDI MOV RSI,qword ptr [RSP + 0x38] CALL 0x00108e40 MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x20] MOV dword ptr [RSP + 0x34],ECX CMP qword ptr [RAX + 0x28],0x0 JNZ 0x001089d8 MOV dword ptr [RSP + 0x30],0x0 LAB_0010897c: MOV EAX,dword ptr [RSP + 0x30] MOV RCX,qword ptr [RSP + 0x38] CMP EAX,dword ptr [RCX + 0xc] JNC 0x001089d6 MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RSP + 0x10],RAX MOV EAX,dword ptr [RSP + 0x34] ADD EAX,dword ptr [RSP + 0x30] MOV dword ptr [RSP + 0x1c],EAX MOV RDI,qword ptr [RSP + 0x38] ADD RDI,0x18 MOV EAX,dword ptr [RSP + 0x30] MOV ESI,EAX CALL 0x00108ee0 MOV RDI,qword ptr [RSP + 0x10] MOV ESI,dword ptr [RSP + 0x1c] MOVZX EDX,byte ptr [RAX] CALL 0x00107200 MOV EAX,dword ptr [RSP + 0x30] ADD EAX,0x1 MOV dword ptr [RSP + 0x30],EAX JMP 0x0010897c LAB_001089d6: JMP 0x00108a3c LAB_001089d8: MOV dword ptr [RSP + 0x2c],0x0 LAB_001089e0: MOV EAX,dword ptr [RSP + 0x2c] MOV RCX,qword ptr [RSP + 0x38] CMP EAX,dword ptr [RCX + 0xc] JNC 0x00108a3a MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RSP],RAX MOV EAX,dword ptr [RSP + 0x34] ADD EAX,dword ptr [RSP + 0x2c] MOV dword ptr [RSP + 0xc],EAX MOV RDI,qword ptr [RSP + 0x38] ADD RDI,0x18 MOV EAX,dword ptr [RSP + 0x2c] MOV ESI,EAX CALL 0x00108ee0 MOV RDI,qword ptr [RSP] MOV ESI,dword ptr [RSP + 0xc] XOR ECX,ECX MOVZX EDX,byte ptr [RAX] CALL 0x001086d0 MOV EAX,dword ptr [RSP + 0x2c] ADD EAX,0x1 MOV dword ptr [RSP + 0x2c],EAX JMP 0x001089e0 LAB_00108a3a: JMP 0x00108a3c LAB_00108a3c: ADD RSP,0x48 RET
/* Cache::writeBlockToLowerLevel(Cache::Block&) */ void __thiscall Cache::writeBlockToLowerLevel(Cache *this,Block *param_1) { MemoryManager *this_00; Cache *this_01; int iVar1; uchar *puVar2; uint local_1c; uint local_18; iVar1 = getAddr(this,param_1); if (*(long *)(this + 0x28) == 0) { for (local_18 = 0; local_18 < *(uint *)(param_1 + 0xc); local_18 = local_18 + 1) { this_00 = *(MemoryManager **)(this + 0x20); puVar2 = (uchar *)std::vector<unsigned_char,std::allocator<unsigned_char>>::operator[] ((vector<unsigned_char,std::allocator<unsigned_char>> *) (param_1 + 0x18),(ulong)local_18); MemoryManager::setByteNoCache(this_00,iVar1 + local_18,*puVar2); } } else { for (local_1c = 0; local_1c < *(uint *)(param_1 + 0xc); local_1c = local_1c + 1) { this_01 = *(Cache **)(this + 0x28); puVar2 = (uchar *)std::vector<unsigned_char,std::allocator<unsigned_char>>::operator[] ((vector<unsigned_char,std::allocator<unsigned_char>> *) (param_1 + 0x18),(ulong)local_1c); setByte(this_01,iVar1 + local_1c,*puVar2,(uint *)0x0); } } return; }
20,602
js_os_readlink
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_readlink(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { const char *path; char buf[PATH_MAX]; int err; ssize_t res; path = JS_ToCString(ctx, argv[0]); if (!path) return JS_EXCEPTION; res = readlink(path, buf, sizeof(buf) - 1); if (res < 0) { buf[0] = '\0'; err = errno; } else { buf[res] = '\0'; err = 0; } JS_FreeCString(ctx, path); return make_string_error(ctx, buf, err); }
O2
c
js_os_readlink: pushq %rbp pushq %r14 pushq %rbx subq $0x1000, %rsp # imm = 0x1000 movq %rdi, %rbx movq (%r8), %rsi movq 0x8(%r8), %rdx callq 0x1561c testq %rax, %rax je 0x1854d movq %rax, %r14 movq %rsp, %rsi movl $0xfff, %edx # imm = 0xFFF movq %rax, %rdi callq 0xe1e0 testq %rax, %rax js 0x18554 movb $0x0, (%rsp,%rax) xorl %ebp, %ebp jmp 0x1855f pushq $0x6 popq %rdx xorl %eax, %eax jmp 0x18577 movb $0x0, (%rsp) callq 0xe0b0 movl (%rax), %ebp movq %rbx, %rdi movq %r14, %rsi callq 0x1ec07 movq %rsp, %rsi movq %rbx, %rdi movl %ebp, %edx callq 0x1936c addq $0x1000, %rsp # imm = 0x1000 popq %rbx popq %r14 popq %rbp retq
js_os_readlink: push rbp push r14 push rbx sub rsp, 1000h mov rbx, rdi mov rsi, [r8] mov rdx, [r8+8] call JS_ToCString_0 test rax, rax jz short loc_1854D mov r14, rax mov rsi, rsp mov edx, 0FFFh mov rdi, rax call _readlink test rax, rax js short loc_18554 mov [rsp+rax+1018h+var_1018], 0 xor ebp, ebp jmp short loc_1855F loc_1854D: push 6 pop rdx xor eax, eax jmp short loc_18577 loc_18554: mov [rsp+1018h+var_1018], 0 call ___errno_location mov ebp, [rax] loc_1855F: mov rdi, rbx mov rsi, r14 call JS_FreeCString mov rsi, rsp mov rdi, rbx mov edx, ebp call make_string_error loc_18577: add rsp, 1000h pop rbx pop r14 pop rbp retn
long long js_os_readlink(long long a1, long long a2, long long a3, long long a4, long long *a5) { long long v6; // rax long long v7; // r14 long long v8; // rdi long long v9; // rax unsigned int v10; // ebp _BYTE v12[4120]; // [rsp+0h] [rbp-1018h] BYREF v6 = JS_ToCString_0(a1, *a5, a5[1]); if ( !v6 ) return 0LL; v7 = v6; v8 = v6; v9 = readlink(v6, v12, 4095LL); if ( v9 < 0 ) { v12[0] = 0; v10 = *(_DWORD *)__errno_location(v8); } else { v12[v9] = 0; v10 = 0; } JS_FreeCString(a1, v7); return make_string_error(a1, v12, v10); }
js_os_readlink: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x1000 MOV RBX,RDI MOV RSI,qword ptr [R8] MOV RDX,qword ptr [R8 + 0x8] CALL 0x0011561c TEST RAX,RAX JZ 0x0011854d MOV R14,RAX MOV RSI,RSP MOV EDX,0xfff MOV RDI,RAX CALL 0x0010e1e0 TEST RAX,RAX JS 0x00118554 MOV byte ptr [RSP + RAX*0x1],0x0 XOR EBP,EBP JMP 0x0011855f LAB_0011854d: PUSH 0x6 POP RDX XOR EAX,EAX JMP 0x00118577 LAB_00118554: MOV byte ptr [RSP],0x0 CALL 0x0010e0b0 MOV EBP,dword ptr [RAX] LAB_0011855f: MOV RDI,RBX MOV RSI,R14 CALL 0x0011ec07 MOV RSI,RSP MOV RDI,RBX MOV EDX,EBP CALL 0x0011936c LAB_00118577: ADD RSP,0x1000 POP RBX POP R14 POP RBP RET
int8 js_os_readlink(int8 param_1) { char *__path; ssize_t sVar1; int *piVar2; int8 uVar3; int iVar4; int8 *in_R8; char local_1018 [4096]; __path = (char *)JS_ToCString(param_1,*in_R8,in_R8[1]); if (__path == (char *)0x0) { uVar3 = 0; } else { sVar1 = readlink(__path,local_1018,0xfff); if (sVar1 < 0) { local_1018[0] = '\0'; piVar2 = __errno_location(); iVar4 = *piVar2; } else { local_1018[sVar1] = '\0'; iVar4 = 0; } JS_FreeCString(param_1,__path); uVar3 = make_string_error(param_1,local_1018,iVar4); } return uVar3; }
20,603
mysql_stmt_execute_start
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_stmt_execute_start(int *ret, MYSQL_STMT *stmt) { MK_ASYNC_START_BODY( mysql_stmt_execute, stmt->mysql, { WIN_SET_NONBLOCKING(stmt->mysql) parms.stmt= stmt; }, 1, r_int, /* If eg. mysql_change_user(), stmt->mysql will be NULL. In this case, we cannot block. */ if (!stmt->mysql) { *ret= mysql_stmt_execute(stmt); return 0; }) }
O3
c
mysql_stmt_execute_start: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq 0x38(%rsi), %rax testq %rax, %rax je 0x4cd97 movq 0x480(%rax), %rax movq 0x28(%rax), %r15 leaq -0x20(%rbp), %rdx movq %r14, (%rdx) movb $0x1, 0x14(%r15) leaq 0x38(%r15), %rdi leaq 0xa2(%rip), %rsi # 0x4ce1f callq 0x4e720 movw $0x0, 0x14(%r15) testl %eax, %eax jle 0x4cda1 movb $0x1, 0x15(%r15) movl (%r15), %eax jmp 0x4ce14 movq %r14, %rdi callq 0x42a15 jmp 0x4ce10 js 0x4cda9 movl 0x8(%r15), %eax jmp 0x4ce10 movq 0x38(%r14), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movl $0x297, %edi # imm = 0x297 addq 0x38(%r14), %rdi leaq 0x2e0bf9(%rip), %rax # 0x32d9c0 movq (%rax), %rsi movl $0x5, %edx callq 0x35110 movq 0x38(%r14), %rax xorl %r15d, %r15d movb %r15b, 0x29c(%rax) movl $0x97, %edi addq 0x38(%r14), %rdi leaq 0x2e0bde(%rip), %rax # 0x32d9d0 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x35110 movq 0x38(%r14), %rax movb %r15b, 0x296(%rax) movl $0x1, %eax movl %eax, (%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
mysql_stmt_execute_start: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, rsi mov rbx, rdi mov rax, [rsi+38h] test rax, rax jz short loc_4CD97 mov rax, [rax+480h] mov r15, [rax+28h] lea rdx, [rbp+var_20] mov [rdx], r14 mov byte ptr [r15+14h], 1 lea rdi, [r15+38h] lea rsi, mysql_stmt_execute_start_internal call my_context_spawn mov word ptr [r15+14h], 0 test eax, eax jle short loc_4CDA1 mov byte ptr [r15+15h], 1 mov eax, [r15] jmp short loc_4CE14 loc_4CD97: mov rdi, r14 call mysql_stmt_execute jmp short loc_4CE10 loc_4CDA1: js short loc_4CDA9 mov eax, [r15+8] jmp short loc_4CE10 loc_4CDA9: mov rax, [r14+38h] mov dword ptr [rax+90h], 7D8h mov edi, 297h add rdi, [r14+38h] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [r14+38h] xor r15d, r15d mov [rax+29Ch], r15b mov edi, 97h add rdi, [r14+38h] lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy mov rax, [r14+38h] mov [rax+296h], r15b mov eax, 1 loc_4CE10: mov [rbx], eax xor eax, eax loc_4CE14: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long mysql_stmt_execute_start(int *a1, long long a2) { long long v2; // rax long long v3; // rax unsigned int *v4; // r15 int v5; // eax int v7; // eax long long v8[4]; // [rsp+0h] [rbp-20h] BYREF v8[0] = v2; v3 = *(_QWORD *)(a2 + 56); if ( v3 ) { v4 = *(unsigned int **)(*(_QWORD *)(v3 + 1152) + 40LL); v8[0] = a2; *((_BYTE *)v4 + 20) = 1; v5 = my_context_spawn(v4 + 14, mysql_stmt_execute_start_internal, v8); *((_WORD *)v4 + 10) = 0; if ( v5 > 0 ) { *((_BYTE *)v4 + 21) = 1; return *v4; } if ( v5 < 0 ) { *(_DWORD *)(*(_QWORD *)(a2 + 56) + 144LL) = 2008; strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[8], 511LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0; v7 = 1; } else { v7 = v4[2]; } } else { v7 = mysql_stmt_execute(a2); } *a1 = v7; return 0LL; }
mysql_stmt_execute_start: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr [RSI + 0x38] TEST RAX,RAX JZ 0x0014cd97 MOV RAX,qword ptr [RAX + 0x480] MOV R15,qword ptr [RAX + 0x28] LEA RDX,[RBP + -0x20] MOV qword ptr [RDX],R14 MOV byte ptr [R15 + 0x14],0x1 LEA RDI,[R15 + 0x38] LEA RSI,[0x14ce1f] CALL 0x0014e720 MOV word ptr [R15 + 0x14],0x0 TEST EAX,EAX JLE 0x0014cda1 MOV byte ptr [R15 + 0x15],0x1 MOV EAX,dword ptr [R15] JMP 0x0014ce14 LAB_0014cd97: MOV RDI,R14 CALL 0x00142a15 JMP 0x0014ce10 LAB_0014cda1: JS 0x0014cda9 MOV EAX,dword ptr [R15 + 0x8] JMP 0x0014ce10 LAB_0014cda9: MOV RAX,qword ptr [R14 + 0x38] MOV dword ptr [RAX + 0x90],0x7d8 MOV EDI,0x297 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x42d9c0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00135110 MOV RAX,qword ptr [R14 + 0x38] XOR R15D,R15D MOV byte ptr [RAX + 0x29c],R15B MOV EDI,0x97 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x42d9d0] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x00135110 MOV RAX,qword ptr [R14 + 0x38] MOV byte ptr [RAX + 0x296],R15B MOV EAX,0x1 LAB_0014ce10: MOV dword ptr [RBX],EAX XOR EAX,EAX LAB_0014ce14: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int4 mysql_stmt_execute_start(int4 *param_1,long param_2) { int4 *puVar1; int iVar2; int4 uVar3; if (*(long *)(param_2 + 0x38) == 0) { uVar3 = mysql_stmt_execute(param_2); } else { puVar1 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28); *(int1 *)(puVar1 + 5) = 1; iVar2 = my_context_spawn(puVar1 + 0xe,mysql_stmt_execute_start_internal); *(int2 *)(puVar1 + 5) = 0; if (0 < iVar2) { *(int1 *)((long)puVar1 + 0x15) = 1; return *puVar1; } if (iVar2 < 0) { *(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7d8; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_0042da10, 0x1ff); *(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0; uVar3 = 1; } else { uVar3 = puVar1[2]; } } *param_1 = uVar3; return 0; }
20,604
minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
llama.cpp/common/minja/minja.hpp
Value do_evaluate(const std::shared_ptr<Context> & context) const override { auto result = Value::array(); for (const auto& e : elements) { if (!e) throw std::runtime_error("Array element is null"); result.push_back(e->evaluate(context)); } return result; }
O3
cpp
minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx xorps %xmm0, %xmm0 movq %rsp, %rsi movaps %xmm0, (%rsi) movq $0x0, 0x10(%rsi) callq 0xcbf80 movq %rsp, %rdi callq 0xc7af6 movq 0x20(%r15), %r13 movq 0x28(%r15), %rbp cmpq %rbp, %r13 je 0xeecfa leaq 0x58(%rsp), %r15 leaq 0x18(%rsp), %r12 movq (%r13), %rsi testq %rsi, %rsi je 0xeed0c movq %r12, %rdi movq %r14, %rdx callq 0xe9d3e movq %rbx, %rdi movq %r12, %rsi callq 0xcc0a2 movq %r15, %rdi xorl %esi, %esi callq 0x9524a movq %r15, %rdi callq 0x3488a leaq 0x50(%rsp), %rdi callq 0x46496 leaq 0x40(%rsp), %rdi callq 0x46496 leaq 0x30(%rsp), %rdi callq 0x46496 movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0xeeced movq 0x7f2d0(%rip), %rax # 0x16df98 cmpb $0x0, (%rax) je 0xeecd8 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0xeece2 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0xeeced movq (%rdi), %rax callq *0x18(%rax) addq $0x10, %r13 cmpq %rbp, %r13 jne 0xeec64 movq %rbx, %rax addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x21660 movq %rax, %r15 leaq 0x3cbaf(%rip), %rsi # 0x12b8cf movq %rax, %rdi callq 0x21430 movq 0x7f291(%rip), %rsi # 0x16dfc0 movq 0x7f24a(%rip), %rdx # 0x16df80 movq %r15, %rdi callq 0x21a80 movq %rax, %r14 movq %rsp, %rdi callq 0xc7af6 jmp 0xeed74 jmp 0xeed5a movq %rax, %r14 movq %r15, %rdi callq 0x21f50 jmp 0xeed6c movq %rax, %r14 jmp 0xeed6c movq %rax, %r14 leaq 0x18(%rsp), %rdi callq 0xc03a8 movq %rbx, %rdi callq 0xc03a8 movq %r14, %rdi callq 0x21b20
_ZNK5minja9ArrayExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r14, rdx mov r15, rsi mov rbx, rdi xorps xmm0, xmm0 mov rsi, rsp movaps xmmword ptr [rsi], xmm0 mov qword ptr [rsi+10h], 0 call _ZN5minja5Value5arrayESt6vectorIS0_SaIS0_EE; minja::Value::array(std::vector<minja::Value>) mov rdi, rsp call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() mov r13, [r15+20h] mov rbp, [r15+28h] cmp r13, rbp jz loc_EECFA lea r15, [rsp+98h+var_40] lea r12, [rsp+98h+var_80] loc_EEC64: mov rsi, [r13+0] test rsi, rsi jz loc_EED0C mov rdi, r12 mov rdx, r14 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov rdi, rbx; this mov rsi, r12; minja::Value * call _ZN5minja5Value9push_backERKS0_; minja::Value::push_back(minja::Value const&) mov rdi, r15 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea rdi, [rsp+98h+var_48] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+98h+var_58] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+98h+var_68] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, [rsp+98h+var_78] test rdi, rdi jz short loc_EECED mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag cmp byte ptr [rax], 0 jz short loc_EECD8 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_EECE2 loc_EECD8: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_EECE2: cmp eax, 1 jnz short loc_EECED mov rax, [rdi] call qword ptr [rax+18h] loc_EECED: add r13, 10h cmp r13, rbp jnz loc_EEC64 loc_EECFA: mov rax, rbx add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_EED0C: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aArrayElementIs; "Array element is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r15; void * call ___cxa_throw mov r14, rax mov rdi, rsp call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() jmp short loc_EED74 jmp short loc_EED5A mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_EED6C loc_EED5A: mov r14, rax jmp short loc_EED6C mov r14, rax lea rdi, [rsp+98h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_EED6C: mov rdi, rbx; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_EED74: mov rdi, r14 call __Unwind_Resume
minja::Value * minja::ArrayExpr::do_evaluate(minja::Value *this, long long a2) { void (****v3)(void); // r13 void (****i)(void); // rbp long long v5; // rdi signed __int32 v6; // eax std::runtime_error *exception; // r15 __int128 v9; // [rsp+0h] [rbp-98h] BYREF long long v10; // [rsp+10h] [rbp-88h] _BYTE v11[8]; // [rsp+18h] [rbp-80h] BYREF long long v12; // [rsp+20h] [rbp-78h] volatile signed __int32 *v13; // [rsp+30h] [rbp-68h] BYREF volatile signed __int32 *v14; // [rsp+40h] [rbp-58h] BYREF volatile signed __int32 *v15; // [rsp+50h] [rbp-48h] BYREF char v16[64]; // [rsp+58h] [rbp-40h] BYREF v9 = 0LL; v10 = 0LL; minja::Value::array((long long)this, (long long *)&v9); std::vector<minja::Value>::~vector(&v9); v3 = *(void (*****)(void))(a2 + 32); for ( i = *(void (*****)(void))(a2 + 40); v3 != i; v3 += 2 ) { if ( !*v3 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Array element is null"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)v11, *v3); minja::Value::push_back(this, (const minja::Value *)v11); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v16); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v16); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v15); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v14); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v13); v5 = v12; if ( v12 ) { if ( _libc_single_threaded ) { v6 = *(_DWORD *)(v12 + 12); *(_DWORD *)(v12 + 12) = v6 - 1; } else { v6 = _InterlockedExchangeAdd((volatile signed __int32 *)(v12 + 12), 0xFFFFFFFF); } if ( v6 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v5 + 24LL))(v5, 0LL); } } return this; }
do_evaluate: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R14,RDX MOV R15,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOV RSI,RSP MOVAPS xmmword ptr [RSI],XMM0 MOV qword ptr [RSI + 0x10],0x0 LAB_001eec3c: CALL 0x001cbf80 MOV RDI,RSP CALL 0x001c7af6 MOV R13,qword ptr [R15 + 0x20] MOV RBP,qword ptr [R15 + 0x28] CMP R13,RBP JZ 0x001eecfa LEA R15,[RSP + 0x58] LEA R12,[RSP + 0x18] LAB_001eec64: MOV RSI,qword ptr [R13] TEST RSI,RSI JZ 0x001eed0c LAB_001eec71: MOV RDI,R12 MOV RDX,R14 CALL 0x001e9d3e LAB_001eec7c: MOV RDI,RBX MOV RSI,R12 CALL 0x001cc0a2 LAB_001eec87: MOV RDI,R15 XOR ESI,ESI CALL 0x0019524a MOV RDI,R15 CALL 0x0013488a LEA RDI,[RSP + 0x50] CALL 0x00146496 LEA RDI,[RSP + 0x40] CALL 0x00146496 LEA RDI,[RSP + 0x30] CALL 0x00146496 MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x001eeced MOV RAX,qword ptr [0x0026df98] CMP byte ptr [RAX],0x0 JZ 0x001eecd8 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001eece2 LAB_001eecd8: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001eece2: CMP EAX,0x1 JNZ 0x001eeced MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001eeced: ADD R13,0x10 CMP R13,RBP JNZ 0x001eec64 LAB_001eecfa: MOV RAX,RBX ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001eed0c: MOV EDI,0x10 CALL 0x00121660 MOV R15,RAX LAB_001eed19: LEA RSI,[0x22b8cf] MOV RDI,RAX CALL 0x00121430 LAB_001eed28: MOV RSI,qword ptr [0x0026dfc0] MOV RDX,qword ptr [0x0026df80] MOV RDI,R15 CALL 0x00121a80
/* minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */ ArrayExpr * __thiscall minja::ArrayExpr::do_evaluate(ArrayExpr *this,shared_ptr *param_1) { int *piVar1; int8 *puVar2; int iVar3; runtime_error *this_00; int8 *puVar4; int8 local_98; int8 uStack_90; int8 local_88; Expression local_80 [8]; long *local_78; __shared_count<(__gnu_cxx::_Lock_policy)2> local_68 [16]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_58 [16]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_48 [8]; data local_40 [16]; local_98 = 0; uStack_90 = 0; local_88 = 0; /* try { // try from 001eec3c to 001eec40 has its CatchHandler @ 001eed3e */ Value::array(); std::vector<minja::Value,std::allocator<minja::Value>>::~vector ((vector<minja::Value,std::allocator<minja::Value>> *)&local_98); puVar4 = *(int8 **)(param_1 + 0x20); puVar2 = *(int8 **)(param_1 + 0x28); if (puVar4 != puVar2) { do { if ((shared_ptr *)*puVar4 == (shared_ptr *)0x0) { this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001eed19 to 001eed27 has its CatchHandler @ 001eed4d */ std::runtime_error::runtime_error(this_00,"Array element is null"); /* try { // try from 001eed28 to 001eed3d has its CatchHandler @ 001eed4b */ /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_0026dfc0,PTR__runtime_error_0026df80); } /* try { // try from 001eec71 to 001eec7b has its CatchHandler @ 001eed5a */ Expression::evaluate(local_80,(shared_ptr *)*puVar4); /* try { // try from 001eec7c to 001eec86 has its CatchHandler @ 001eed5f */ Value::push_back((Value *)this,(Value *)local_80); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_40,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_40); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_48); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_58); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_68); if (local_78 != (long *)0x0) { if (*PTR___libc_single_threaded_0026df98 == '\0') { LOCK(); piVar1 = (int *)((long)local_78 + 0xc); iVar3 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar3 = *(int *)((long)local_78 + 0xc); *(int *)((long)local_78 + 0xc) = iVar3 + -1; } if (iVar3 == 1) { (**(code **)(*local_78 + 0x18))(); } } puVar4 = puVar4 + 2; } while (puVar4 != puVar2); } return this; }
20,605
LefDefParser::defwOrient(int)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp
char * defwOrient(int num) { switch (num) { case 0: return defwAddr("N"); case 1: return defwAddr("W"); case 2: return defwAddr("S"); case 3: return defwAddr("E"); case 4: return defwAddr("FN"); case 5: return defwAddr("FW"); case 6: return defwAddr("FS"); case 7: return defwAddr("FE"); }; return defwAddr("BOGUS "); }
O0
cpp
LefDefParser::defwOrient(int): subq $0x18, %rsp movl %edi, 0xc(%rsp) movl 0xc(%rsp), %eax movq %rax, (%rsp) subq $0x7, %rax ja 0x1221c movq (%rsp), %rax leaq 0x1336b(%rip), %rcx # 0x254e0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x116a6(%rip), %rdi # 0x2382b callq 0x12140 movq %rax, 0x10(%rsp) jmp 0x1222d leaq 0x12b67(%rip), %rdi # 0x24d02 callq 0x12140 movq %rax, 0x10(%rsp) jmp 0x1222d leaq 0x114c6(%rip), %rdi # 0x23677 callq 0x12140 movq %rax, 0x10(%rsp) jmp 0x1222d leaq 0x11b09(%rip), %rdi # 0x23ccd callq 0x12140 movq %rax, 0x10(%rsp) jmp 0x1222d leaq 0x11469(%rip), %rdi # 0x23640 callq 0x12140 movq %rax, 0x10(%rsp) jmp 0x1222d leaq 0x115d2(%rip), %rdi # 0x237bc callq 0x12140 movq %rax, 0x10(%rsp) jmp 0x1222d leaq 0x11479(%rip), %rdi # 0x23676 callq 0x12140 movq %rax, 0x10(%rsp) jmp 0x1222d leaq 0x11eae(%rip), %rdi # 0x240be callq 0x12140 movq %rax, 0x10(%rsp) jmp 0x1222d leaq 0x11e9e(%rip), %rdi # 0x240c1 callq 0x12140 movq %rax, 0x10(%rsp) movq 0x10(%rsp), %rax addq $0x18, %rsp retq nopw (%rax,%rax)
_ZN12LefDefParser10defwOrientEi: sub rsp, 18h mov [rsp+18h+var_C], edi mov eax, [rsp+18h+var_C] mov [rsp+18h+var_18], rax sub rax, 7; switch 8 cases ja def_1217C; jumptable 000000000001217C default case mov rax, [rsp+18h+var_18] lea rcx, jpt_1217C movsxd rax, ds:(jpt_1217C - 254E0h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_1217E: lea rdi, aScan+3; jumptable 000000000001217C case 0 call _ZN12LefDefParser8defwAddrEPKc; LefDefParser::defwAddr(char const*) mov [rsp+18h+var_8], rax jmp loc_1222D loc_12194: lea rdi, aNew+0Ch; jumptable 000000000001217C case 1 call _ZN12LefDefParser8defwAddrEPKc; LefDefParser::defwAddr(char const*) mov [rsp+18h+var_8], rax jmp loc_1222D loc_121AA: lea rdi, aP1435543Ij1fs+0Fh; jumptable 000000000001217C case 2 call _ZN12LefDefParser8defwAddrEPKc; LefDefParser::defwAddr(char const*) mov [rsp+18h+var_8], rax jmp short loc_1222D loc_121BD: lea rdi, aCadence+6; jumptable 000000000001217C case 3 call _ZN12LefDefParser8defwAddrEPKc; LefDefParser::defwAddr(char const*) mov [rsp+18h+var_8], rax jmp short loc_1222D loc_121D0: lea rdi, aFn; jumptable 000000000001217C case 4 call _ZN12LefDefParser8defwAddrEPKc; LefDefParser::defwAddr(char const*) mov [rsp+18h+var_8], rax jmp short loc_1222D loc_121E3: lea rdi, aFw; jumptable 000000000001217C case 5 call _ZN12LefDefParser8defwAddrEPKc; LefDefParser::defwAddr(char const*) mov [rsp+18h+var_8], rax jmp short loc_1222D loc_121F6: lea rdi, aP1435543Ij1fs+0Eh; jumptable 000000000001217C case 6 call _ZN12LefDefParser8defwAddrEPKc; LefDefParser::defwAddr(char const*) mov [rsp+18h+var_8], rax jmp short loc_1222D loc_12209: lea rdi, aFe; jumptable 000000000001217C case 7 call _ZN12LefDefParser8defwAddrEPKc; LefDefParser::defwAddr(char const*) mov [rsp+18h+var_8], rax jmp short loc_1222D def_1217C: lea rdi, aBogus; jumptable 000000000001217C default case call _ZN12LefDefParser8defwAddrEPKc; LefDefParser::defwAddr(char const*) mov [rsp+18h+var_8], rax loc_1222D: mov rax, [rsp+18h+var_8] add rsp, 18h retn
LefDefParser * LefDefParser::defwOrient(LefDefParser *this, const char *a2) { LefDefParser *v3; // [rsp+10h] [rbp-8h] switch ( (int)this ) { case 0: v3 = LefDefParser::defwAddr((LefDefParser *)"N", a2); break; case 1: v3 = LefDefParser::defwAddr((LefDefParser *)"W", a2); break; case 2: v3 = LefDefParser::defwAddr((LefDefParser *)"S", a2); break; case 3: v3 = LefDefParser::defwAddr((LefDefParser *)"E", a2); break; case 4: v3 = LefDefParser::defwAddr((LefDefParser *)"FN", a2); break; case 5: v3 = LefDefParser::defwAddr((LefDefParser *)"FW", a2); break; case 6: v3 = LefDefParser::defwAddr((LefDefParser *)"FS", a2); break; case 7: v3 = LefDefParser::defwAddr((LefDefParser *)"FE", a2); break; default: v3 = LefDefParser::defwAddr((LefDefParser *)"BOGUS ", a2); break; } return v3; }
defwOrient: SUB RSP,0x18 MOV dword ptr [RSP + 0xc],EDI MOV EAX,dword ptr [RSP + 0xc] MOV qword ptr [RSP],RAX SUB RAX,0x7 JA 0x0011221c MOV RAX,qword ptr [RSP] LEA RCX,[0x1254e0] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: LEA RDI,[0x12382b] CALL 0x00112140 MOV qword ptr [RSP + 0x10],RAX JMP 0x0011222d caseD_1: LEA RDI,[0x124d02] CALL 0x00112140 MOV qword ptr [RSP + 0x10],RAX JMP 0x0011222d caseD_2: LEA RDI,[0x123677] CALL 0x00112140 MOV qword ptr [RSP + 0x10],RAX JMP 0x0011222d caseD_3: LEA RDI,[0x123ccd] CALL 0x00112140 MOV qword ptr [RSP + 0x10],RAX JMP 0x0011222d caseD_4: LEA RDI,[0x123640] CALL 0x00112140 MOV qword ptr [RSP + 0x10],RAX JMP 0x0011222d caseD_5: LEA RDI,[0x1237bc] CALL 0x00112140 MOV qword ptr [RSP + 0x10],RAX JMP 0x0011222d caseD_6: LEA RDI,[0x123676] CALL 0x00112140 MOV qword ptr [RSP + 0x10],RAX JMP 0x0011222d caseD_7: LEA RDI,[0x1240be] CALL 0x00112140 MOV qword ptr [RSP + 0x10],RAX JMP 0x0011222d default: LEA RDI,[0x1240c1] CALL 0x00112140 MOV qword ptr [RSP + 0x10],RAX LAB_0011222d: MOV RAX,qword ptr [RSP + 0x10] ADD RSP,0x18 RET
/* LefDefParser::defwOrient(int) */ int8 LefDefParser::defwOrient(int param_1) { int8 local_8; switch(param_1) { case 0: local_8 = defwAddr("N"); break; case 1: local_8 = defwAddr("W"); break; case 2: local_8 = defwAddr("S"); break; case 3: local_8 = defwAddr("E"); break; case 4: local_8 = defwAddr("FN"); break; case 5: local_8 = defwAddr("FW"); break; case 6: local_8 = defwAddr("FS"); break; case 7: local_8 = defwAddr("FE"); break; default: local_8 = defwAddr("BOGUS "); } return local_8; }
20,606
google::protobuf::internal::DuplicateIfNonNullInternal(google::protobuf::MessageLite*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/generated_message_util.cc
MessageLite* DuplicateIfNonNullInternal(MessageLite* message) { if (message) { MessageLite* ret = message->New(); ret->CheckTypeAndMergeFrom(*message); return ret; } else { return nullptr; } }
O0
cpp
google::protobuf::internal::DuplicateIfNonNullInternal(google::protobuf::MessageLite*): subq $0x18, %rsp movq %rdi, 0x8(%rsp) cmpq $0x0, 0x8(%rsp) je 0x1e9769 movq 0x8(%rsp), %rdi callq 0x1e9d80 movq %rax, (%rsp) movq (%rsp), %rdi movq 0x8(%rsp), %rsi movq (%rdi), %rax callq *0x38(%rax) movq (%rsp), %rax movq %rax, 0x10(%rsp) jmp 0x1e9772 movq $0x0, 0x10(%rsp) movq 0x10(%rsp), %rax addq $0x18, %rsp retq nopl (%rax)
_ZN6google8protobuf8internal26DuplicateIfNonNullInternalEPNS0_11MessageLiteE: sub rsp, 18h mov [rsp+18h+var_10], rdi cmp [rsp+18h+var_10], 0 jz short loc_1E9769 mov rdi, [rsp+18h+var_10]; this call _ZNK6google8protobuf11MessageLite3NewEv; google::protobuf::MessageLite::New(void) mov [rsp+18h+var_18], rax mov rdi, [rsp+18h+var_18] mov rsi, [rsp+18h+var_10] mov rax, [rdi] call qword ptr [rax+38h] mov rax, [rsp+18h+var_18] mov [rsp+18h+var_8], rax jmp short loc_1E9772 loc_1E9769: mov [rsp+18h+var_8], 0 loc_1E9772: mov rax, [rsp+18h+var_8] add rsp, 18h retn
long long google::protobuf::internal::DuplicateIfNonNullInternal( google::protobuf::internal *this, google::protobuf::MessageLite *a2) { long long v3; // [rsp+0h] [rbp-18h] if ( !this ) return 0LL; v3 = google::protobuf::MessageLite::New(this); (*(void ( **)(long long, google::protobuf::internal *))(*(_QWORD *)v3 + 56LL))(v3, this); return v3; }
_M_get_Tp_allocator: MOV qword ptr [RSP + -0x8],RDI MOV RAX,qword ptr [RSP + -0x8] RET
/* std::_Vector_base<std::unique_ptr<google::protobuf::compiler::cpp::ServiceGenerator, std::default_delete<google::protobuf::compiler::cpp::ServiceGenerator> >, std::allocator<std::unique_ptr<google::protobuf::compiler::cpp::ServiceGenerator, std::default_delete<google::protobuf::compiler::cpp::ServiceGenerator> > > >::_M_get_Tp_allocator() const */ _Vector_base<std::unique_ptr<google::protobuf::compiler::cpp::ServiceGenerator,std::default_delete<google::protobuf::compiler::cpp::ServiceGenerator>>,std::allocator<std::unique_ptr<google::protobuf::compiler::cpp::ServiceGenerator,std::default_delete<google::protobuf::compiler::cpp::ServiceGenerator>>>> * __thiscall std:: _Vector_base<std::unique_ptr<google::protobuf::compiler::cpp::ServiceGenerator,std::default_delete<google::protobuf::compiler::cpp::ServiceGenerator>>,std::allocator<std::unique_ptr<google::protobuf::compiler::cpp::ServiceGenerator,std::default_delete<google::protobuf::compiler::cpp::ServiceGenerator>>>> ::_M_get_Tp_allocator (_Vector_base<std::unique_ptr<google::protobuf::compiler::cpp::ServiceGenerator,std::default_delete<google::protobuf::compiler::cpp::ServiceGenerator>>,std::allocator<std::unique_ptr<google::protobuf::compiler::cpp::ServiceGenerator,std::default_delete<google::protobuf::compiler::cpp::ServiceGenerator>>>> *this) { return this; }
20,607
my_hash_next
eloqsql/mysys/hash.c
uchar* my_hash_next(const HASH *hash, const uchar *key, size_t length, HASH_SEARCH_STATE *current_record) { HASH_LINK *pos; uint idx; if (*current_record != NO_RECORD) { HASH_LINK *data=dynamic_element(&hash->array,0,HASH_LINK*); for (idx=data[*current_record].next; idx != NO_RECORD ; idx=pos->next) { pos=data+idx; if (!hashcmp(hash,pos,key,length)) { *current_record= idx; return pos->data; } } *current_record= NO_RECORD; } return 0; }
O3
c
my_hash_next: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, -0x38(%rbp) movl (%rcx), %ebx movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq %rax, %rbx je 0x29afd movq %rsi, %r15 movq %rdi, %r12 movq %rcx, -0x30(%rbp) movq 0x28(%rdi), %r13 shlq $0x4, %rbx addq %r13, %rbx movl (%rbx), %r14d movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq %rax, %r14 je 0x29af3 movq %r14, %rax shlq $0x4, %rax leaq (%rax,%r13), %rbx movq 0x8(%r13,%rax), %rsi movq %r12, %rdi movq %r15, %rdx movq -0x38(%rbp), %rcx callq 0x299f5 testl %eax, %eax jne 0x29ab6 movq -0x30(%rbp), %rax movl %r14d, (%rax) movq 0x8(%rbx), %rax jmp 0x29aff movq -0x30(%rbp), %rax movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF xorl %eax, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_hash_next: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_38], rdx mov ebx, [rcx] mov eax, 0FFFFFFFFh cmp rbx, rax jz short loc_29AFD mov r15, rsi mov r12, rdi mov [rbp+var_30], rcx mov r13, [rdi+28h] shl rbx, 4 add rbx, r13 loc_29AB6: mov r14d, [rbx] mov eax, 0FFFFFFFFh cmp r14, rax jz short loc_29AF3 mov rax, r14 shl rax, 4 lea rbx, [rax+r13] mov rsi, [r13+rax+8] mov rdi, r12 mov rdx, r15 mov rcx, [rbp+var_38] call hashcmp test eax, eax jnz short loc_29AB6 mov rax, [rbp+var_30] mov [rax], r14d mov rax, [rbx+8] jmp short loc_29AFF loc_29AF3: mov rax, [rbp+var_30] mov dword ptr [rax], 0FFFFFFFFh loc_29AFD: xor eax, eax loc_29AFF: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_hash_next(_QWORD *a1, long long a2, long long a3, _DWORD *a4) { long long v4; // rbx long long v5; // r13 unsigned int *v6; // rbx long long v7; // r14 v4 = (unsigned int)*a4; if ( v4 != 0xFFFFFFFFLL ) { v5 = a1[5]; v6 = (unsigned int *)(v5 + 16 * v4); while ( 1 ) { v7 = *v6; if ( v7 == 0xFFFFFFFFLL ) break; v6 = (unsigned int *)(16 * v7 + v5); if ( !hashcmp(a1, *((_QWORD *)v6 + 1), a2, a3) ) { *a4 = v7; return *((_QWORD *)v6 + 1); } } *a4 = -1; } return 0LL; }
my_hash_next: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x38],RDX MOV EBX,dword ptr [RCX] MOV EAX,0xffffffff CMP RBX,RAX JZ 0x00129afd MOV R15,RSI MOV R12,RDI MOV qword ptr [RBP + -0x30],RCX MOV R13,qword ptr [RDI + 0x28] SHL RBX,0x4 ADD RBX,R13 LAB_00129ab6: MOV R14D,dword ptr [RBX] MOV EAX,0xffffffff CMP R14,RAX JZ 0x00129af3 MOV RAX,R14 SHL RAX,0x4 LEA RBX,[RAX + R13*0x1] MOV RSI,qword ptr [R13 + RAX*0x1 + 0x8] MOV RDI,R12 MOV RDX,R15 MOV RCX,qword ptr [RBP + -0x38] CALL 0x001299f5 TEST EAX,EAX JNZ 0x00129ab6 MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX],R14D MOV RAX,qword ptr [RBX + 0x8] JMP 0x00129aff LAB_00129af3: MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX],0xffffffff LAB_00129afd: XOR EAX,EAX LAB_00129aff: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 my_hash_next(long param_1,int8 param_2,int8 param_3,uint *param_4) { uint uVar1; long lVar2; int iVar3; long lVar4; int8 uVar5; uint *puVar6; if ((ulong)*param_4 == 0xffffffff) { LAB_00129afd: uVar5 = 0; } else { lVar2 = *(long *)(param_1 + 0x28); puVar6 = (uint *)((ulong)*param_4 * 0x10 + lVar2); do { uVar1 = *puVar6; if ((ulong)uVar1 == 0xffffffff) { *param_4 = 0xffffffff; goto LAB_00129afd; } lVar4 = (ulong)uVar1 * 0x10; puVar6 = (uint *)(lVar4 + lVar2); iVar3 = hashcmp(param_1,*(int8 *)(lVar2 + 8 + lVar4),param_2,param_3); } while (iVar3 != 0); *param_4 = uVar1; uVar5 = *(int8 *)(puVar6 + 2); } return uVar5; }
20,608
lunasvg::elementid(std::basic_string_view<char, std::char_traits<char>> const&)
dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp
ElementID elementid(const std::string_view& name) { static const struct { std::string_view name; ElementID value; } table[] = { {"a", ElementID::G}, {"circle", ElementID::Circle}, {"clipPath", ElementID::ClipPath}, {"defs", ElementID::Defs}, {"ellipse", ElementID::Ellipse}, {"g", ElementID::G}, {"image", ElementID::Image}, {"line", ElementID::Line}, {"linearGradient", ElementID::LinearGradient}, {"marker", ElementID::Marker}, {"mask", ElementID::Mask}, {"path", ElementID::Path}, {"pattern", ElementID::Pattern}, {"polygon", ElementID::Polygon}, {"polyline", ElementID::Polyline}, {"radialGradient", ElementID::RadialGradient}, {"rect", ElementID::Rect}, {"stop", ElementID::Stop}, {"style", ElementID::Style}, {"svg", ElementID::Svg}, {"symbol", ElementID::Symbol}, {"text", ElementID::Text}, {"tspan", ElementID::Tspan}, {"use", ElementID::Use} }; auto it = std::lower_bound(table, std::end(table), name, [](const auto& item, const auto& name) { return item.name < name; }); if(it == std::end(table) || it->name != name) return ElementID::Unknown; return it->value; }
O0
cpp
lunasvg::elementid(std::basic_string_view<char, std::char_traits<char>> const&): pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) leaq 0xa94cd(%rip), %rdi # 0xc1630 callq 0x18250 movq %rax, %rsi movq -0x10(%rbp), %rdx leaq 0xa94ba(%rip), %rdi # 0xc1630 callq 0x18200 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x48(%rbp) leaq 0xa94a2(%rip), %rdi # 0xc1630 callq 0x18250 movq %rax, %rcx movq -0x48(%rbp), %rax cmpq %rcx, %rax je 0x181e0 movq -0x18(%rbp), %rax movq (%rax), %rcx movq %rcx, -0x30(%rbp) movq 0x8(%rax), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx movq %rcx, -0x40(%rbp) movq 0x8(%rax), %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x40(%rbp), %rdx movq -0x38(%rbp), %rcx callq 0x1db60 testb $0x1, %al jne 0x181e0 jmp 0x181e6 movb $0x0, -0x1(%rbp) jmp 0x181f0 movq -0x18(%rbp), %rax movb 0x10(%rax), %al movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x50, %rsp popq %rbp retq nopl (%rax)
_ZN7lunasvg9elementidERKSt17basic_string_viewIcSt11char_traitsIcEE: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi lea rdi, _ZZN7lunasvg9elementidERKSt17basic_string_viewIcSt11char_traitsIcEEE5table; lunasvg::elementid(std::string_view const&)::table call _ZSt3endIKZN7lunasvg9elementidERKSt17basic_string_viewIcSt11char_traitsIcEEE3$_0Lm24EEPT_RAT0__S9_; std::end<lunasvg::elementid(std::string_view const&)::$_0 const,24ul>(lunasvg::elementid(std::string_view const&)::$_0 const(&)[24ul]) mov rsi, rax mov rdx, [rbp+var_10] lea rdi, _ZZN7lunasvg9elementidERKSt17basic_string_viewIcSt11char_traitsIcEEE5table; lunasvg::elementid(std::string_view const&)::table call _ZSt11lower_boundIPKZN7lunasvg9elementidERKSt17basic_string_viewIcSt11char_traitsIcEEE3$_0S4_ZNS0_9elementidES6_E3$_1ET_SB_SB_RKT0_T1_; std::lower_bound<lunasvg::elementid(std::string_view const&)::$_0 const*,std::string_view,lunasvg::elementid(std::string_view const&)::$_1>(lunasvg::elementid(std::string_view const&)::$_0 const*,lunasvg::elementid(std::string_view const&)::$_0 const*,std::string_view const&,lunasvg::elementid(std::string_view const&)::$_1) mov [rbp+var_18], rax mov rax, [rbp+var_18] mov [rbp+var_48], rax lea rdi, _ZZN7lunasvg9elementidERKSt17basic_string_viewIcSt11char_traitsIcEEE5table; lunasvg::elementid(std::string_view const&)::table call _ZSt3endIKZN7lunasvg9elementidERKSt17basic_string_viewIcSt11char_traitsIcEEE3$_0Lm24EEPT_RAT0__S9_; std::end<lunasvg::elementid(std::string_view const&)::$_0 const,24ul>(lunasvg::elementid(std::string_view const&)::$_0 const(&)[24ul]) mov rcx, rax mov rax, [rbp+var_48] cmp rax, rcx jz short loc_181E0 mov rax, [rbp+var_18] mov rcx, [rax] mov [rbp+var_30], rcx mov rax, [rax+8] mov [rbp+var_28], rax mov rax, [rbp+var_10] mov rcx, [rax] mov [rbp+var_40], rcx mov rax, [rax+8] mov [rbp+var_38], rax mov rdi, [rbp+var_30] mov rsi, [rbp+var_28] mov rdx, [rbp+var_40] mov rcx, [rbp+var_38] call _ZStneIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ES5_; std::operator!=<char,std::char_traits<char>>(std::string_view,std::string_view) test al, 1 jnz short loc_181E0 jmp short loc_181E6 loc_181E0: mov [rbp+var_1], 0 jmp short loc_181F0 loc_181E6: mov rax, [rbp+var_18] mov al, [rax+10h] mov [rbp+var_1], al loc_181F0: mov al, [rbp+var_1] add rsp, 50h pop rbp retn
char lunasvg::elementid(_QWORD *a1) { long long v1; // rax long long v3; // [rsp+38h] [rbp-18h] v1 = std::end<lunasvg::elementid(std::string_view const&)::$_0 const,24ul>(&lunasvg::elementid(std::string_view const&)::table); v3 = std::lower_bound<lunasvg::elementid(std::string_view const&)::$_0 const*,std::string_view,lunasvg::elementid(std::string_view const&)::$_1>( &lunasvg::elementid(std::string_view const&)::table, v1, a1); if ( v3 == std::end<lunasvg::elementid(std::string_view const&)::$_0 const,24ul>(&lunasvg::elementid(std::string_view const&)::table) || (std::operator!=<char,std::char_traits<char>>(*(_QWORD *)v3, *(_QWORD *)(v3 + 8), *a1, a1[1]) & 1) != 0 ) { return 0; } else { return *(_BYTE *)(v3 + 16); } }
elementid: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI LEA RDI,[0x1c1630] CALL 0x00118250 MOV RSI,RAX MOV RDX,qword ptr [RBP + -0x10] LEA RDI,[0x1c1630] CALL 0x00118200 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x48],RAX LEA RDI,[0x1c1630] CALL 0x00118250 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x48] CMP RAX,RCX JZ 0x001181e0 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RCX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] MOV qword ptr [RBP + -0x40],RCX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x38] CALL 0x0011db60 TEST AL,0x1 JNZ 0x001181e0 JMP 0x001181e6 LAB_001181e0: MOV byte ptr [RBP + -0x1],0x0 JMP 0x001181f0 LAB_001181e6: MOV RAX,qword ptr [RBP + -0x18] MOV AL,byte ptr [RAX + 0x10] MOV byte ptr [RBP + -0x1],AL LAB_001181f0: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x50 POP RBP RET
/* lunasvg::elementid(std::basic_string_view<char, std::char_traits<char> > const&) */ __0 lunasvg::elementid(basic_string_view *param_1) { bool bVar1; __0 *p_Var2; __0 *p_Var3; p_Var2 = std:: end<lunasvg::elementid(std::basic_string_view<char,std::char_traits<char>>const&)::__0_const,24ul> ((__0 *)elementid(std::basic_string_view<char,std::char_traits<char>>const&):: table); p_Var2 = std:: lower_bound<lunasvg::elementid(std::basic_string_view<char,std::char_traits<char>>const&)::__0_const*,std::basic_string_view<char,std::char_traits<char>>,lunasvg::elementid(std::basic_string_view<char,std::char_traits<char>>const&)::__1> (elementid(std::basic_string_view<char,std::char_traits<char>>const&)::table, p_Var2,param_1); p_Var3 = std:: end<lunasvg::elementid(std::basic_string_view<char,std::char_traits<char>>const&)::__0_const,24ul> ((__0 *)elementid(std::basic_string_view<char,std::char_traits<char>>const&):: table); if ((p_Var2 != p_Var3) && (bVar1 = std::operator!=(*(int8 *)p_Var2,*(int8 *)(p_Var2 + 8), *(int8 *)param_1,*(int8 *)(param_1 + 8)), !bVar1)) { return p_Var2[0x10]; } return (__0)0x0; }
20,609
lunasvg::elementid(std::basic_string_view<char, std::char_traits<char>> const&)
dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp
ElementID elementid(const std::string_view& name) { static const struct { std::string_view name; ElementID value; } table[] = { {"a", ElementID::G}, {"circle", ElementID::Circle}, {"clipPath", ElementID::ClipPath}, {"defs", ElementID::Defs}, {"ellipse", ElementID::Ellipse}, {"g", ElementID::G}, {"image", ElementID::Image}, {"line", ElementID::Line}, {"linearGradient", ElementID::LinearGradient}, {"marker", ElementID::Marker}, {"mask", ElementID::Mask}, {"path", ElementID::Path}, {"pattern", ElementID::Pattern}, {"polygon", ElementID::Polygon}, {"polyline", ElementID::Polyline}, {"radialGradient", ElementID::RadialGradient}, {"rect", ElementID::Rect}, {"stop", ElementID::Stop}, {"style", ElementID::Style}, {"svg", ElementID::Svg}, {"symbol", ElementID::Symbol}, {"text", ElementID::Text}, {"tspan", ElementID::Tspan}, {"use", ElementID::Use} }; auto it = std::lower_bound(table, std::end(table), name, [](const auto& item, const auto& name) { return item.name < name; }); if(it == std::end(table) || it->name != name) return ElementID::Unknown; return it->value; }
O1
cpp
lunasvg::elementid(std::basic_string_view<char, std::char_traits<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq (%rdi), %r15 movq 0x8(%rdi), %rax movq %rax, (%rsp) movl $0x18, %r13d leaq 0x49af9(%rip), %r14 # 0x58610 movq %r13, %r12 shrq %r12 leaq (%r12,%r12,2), %rax movq (%r14,%rax,8), %rdx movq %rdx, %rbx subq %r15, %rbx jb 0xeb30 movq %r15, %rdx leaq (%r14,%rax,8), %rbp testq %rdx, %rdx je 0xeb48 movq 0x8(%rbp), %rdi movq (%rsp), %rsi callq 0xa190 jmp 0xeb4a xorl %eax, %eax testl %eax, %eax jne 0xeb6f cmpq $-0x7fffffff, %rbx # imm = 0x80000001 jge 0xeb5e movq $-0x80000000, %rbx # imm = 0x80000000 movl $0x7fffffff, %eax # imm = 0x7FFFFFFF cmpq %rax, %rbx jl 0xeb6d movl $0x7fffffff, %ebx # imm = 0x7FFFFFFF movl %ebx, %eax testl %eax, %eax jns 0xeb80 addq $0x18, %rbp notq %r12 addq %r13, %r12 movq %rbp, %r14 movq %r12, %r13 testq %r12, %r12 jg 0xeb1a leaq 0x49cc1(%rip), %rax # 0x58850 cmpq %rax, %r14 je 0xebb2 movq (%r14), %rdx cmpq %r15, %rdx jne 0xebb2 testq %rdx, %rdx je 0xebc3 movq 0x8(%r14), %rdi movq (%rsp), %rsi callq 0xa330 testl %eax, %eax je 0xebc3 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movb 0x10(%r14), %al jmp 0xebb4 nop
_ZN7lunasvg9elementidERKSt17basic_string_viewIcSt11char_traitsIcEE: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r15, [rdi] mov rax, [rdi+8] mov [rsp+38h+var_38], rax mov r13d, 18h lea r14, _ZZN7lunasvg9elementidERKSt17basic_string_viewIcSt11char_traitsIcEEE5table; lunasvg::elementid(std::string_view const&)::table mov r12, r13 loc_EB1A: shr r12, 1 lea rax, [r12+r12*2] mov rdx, [r14+rax*8] mov rbx, rdx sub rbx, r15 jb short loc_EB30 mov rdx, r15 loc_EB30: lea rbp, [r14+rax*8] test rdx, rdx jz short loc_EB48 mov rdi, [rbp+8] mov rsi, [rsp+38h+var_38] call _memcmp jmp short loc_EB4A loc_EB48: xor eax, eax loc_EB4A: test eax, eax jnz short loc_EB6F cmp rbx, 0FFFFFFFF80000001h jge short loc_EB5E mov rbx, 0FFFFFFFF80000000h loc_EB5E: mov eax, 7FFFFFFFh cmp rbx, rax jl short loc_EB6D mov ebx, 7FFFFFFFh loc_EB6D: mov eax, ebx loc_EB6F: test eax, eax jns short loc_EB80 add rbp, 18h not r12 add r12, r13 mov r14, rbp loc_EB80: mov r13, r12 test r12, r12 jg short loc_EB1A lea rax, _ZTVN7lunasvg11SVGTextNodeE; `vtable for'lunasvg::SVGTextNode cmp r14, rax jz short loc_EBB2 mov rdx, [r14] cmp rdx, r15 jnz short loc_EBB2 test rdx, rdx jz short loc_EBC3 mov rdi, [r14+8] mov rsi, [rsp+38h+var_38] call _bcmp test eax, eax jz short loc_EBC3 loc_EBB2: xor eax, eax loc_EBB4: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_EBC3: mov al, [r14+10h] jmp short loc_EBB4
char lunasvg::elementid(unsigned long long *a1) { unsigned long long v1; // r15 long long v2; // r13 long long *v3; // r14 long long i; // r12 unsigned long long v5; // rdx long long v6; // rbx long long *v7; // rbp int v8; // eax unsigned long long v10; // [rsp+0h] [rbp-38h] v1 = *a1; v10 = a1[1]; v2 = 24LL; v3 = (long long *)&lunasvg::elementid(std::string_view const&)::table; for ( i = 24LL; i > 0; v2 = i ) { i = (unsigned long long)i >> 1; v5 = v3[3 * i]; v6 = v5 - v1; if ( v5 >= v1 ) v5 = v1; v7 = &v3[3 * i]; if ( v5 ) v8 = memcmp(v7[1], v10); else v8 = 0; if ( !v8 ) { if ( v6 < -2147483647 ) v6 = 0xFFFFFFFF80000000LL; if ( v6 >= 0x7FFFFFFF ) LODWORD(v6) = 0x7FFFFFFF; v8 = v6; } if ( v8 < 0 ) { i = v2 + ~i; v3 = v7 + 3; } } if ( v3 == &`vtable for'lunasvg::SVGTextNode || *v3 != v1 || *v3 && (unsigned int)bcmp(v3[1], v10) ) return 0; else return *((_BYTE *)v3 + 16); }
elementid: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x8] MOV qword ptr [RSP],RAX MOV R13D,0x18 LEA R14,[0x158610] MOV R12,R13 LAB_0010eb1a: SHR R12,0x1 LEA RAX,[R12 + R12*0x2] MOV RDX,qword ptr [R14 + RAX*0x8] MOV RBX,RDX SUB RBX,R15 JC 0x0010eb30 MOV RDX,R15 LAB_0010eb30: LEA RBP,[R14 + RAX*0x8] TEST RDX,RDX JZ 0x0010eb48 MOV RDI,qword ptr [RBP + 0x8] MOV RSI,qword ptr [RSP] CALL 0x0010a190 JMP 0x0010eb4a LAB_0010eb48: XOR EAX,EAX LAB_0010eb4a: TEST EAX,EAX JNZ 0x0010eb6f CMP RBX,-0x7fffffff JGE 0x0010eb5e MOV RBX,-0x80000000 LAB_0010eb5e: MOV EAX,0x7fffffff CMP RBX,RAX JL 0x0010eb6d MOV EBX,0x7fffffff LAB_0010eb6d: MOV EAX,EBX LAB_0010eb6f: TEST EAX,EAX JNS 0x0010eb80 ADD RBP,0x18 NOT R12 ADD R12,R13 MOV R14,RBP LAB_0010eb80: MOV R13,R12 TEST R12,R12 JG 0x0010eb1a LEA RAX,[0x158850] CMP R14,RAX JZ 0x0010ebb2 MOV RDX,qword ptr [R14] CMP RDX,R15 JNZ 0x0010ebb2 TEST RDX,RDX JZ 0x0010ebc3 MOV RDI,qword ptr [R14 + 0x8] MOV RSI,qword ptr [RSP] CALL 0x0010a330 TEST EAX,EAX JZ 0x0010ebc3 LAB_0010ebb2: XOR EAX,EAX LAB_0010ebb4: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0010ebc3: MOV AL,byte ptr [R14 + 0x10] JMP 0x0010ebb4
/* lunasvg::elementid(std::basic_string_view<char, std::char_traits<char> > const&) */ int8 lunasvg::elementid(basic_string_view *param_1) { ulong uVar1; void *__s2; size_t __n; int iVar2; int *puVar3; int4 extraout_var; int8 uVar4; ulong __n_00; long lVar5; ulong uVar6; ulong uVar7; int1 *puVar8; uVar1 = *(ulong *)param_1; __s2 = *(void **)(param_1 + 8); puVar8 = elementid(std::basic_string_view<char,std::char_traits<char>>const&)::table; uVar7 = 0x18; do { uVar6 = uVar7 >> 1; __n_00 = *(ulong *)((long)puVar8 + uVar6 * 3 * 8); lVar5 = __n_00 - uVar1; if (uVar1 <= __n_00) { __n_00 = uVar1; } if (__n_00 == 0) { iVar2 = 0; } else { iVar2 = memcmp(*(void **)((long)puVar8 + (uVar6 * 3 + 1) * 8),__s2,__n_00); } if (iVar2 == 0) { if (lVar5 < -0x7fffffff) { lVar5 = -0x80000000; } if (0x7ffffffe < lVar5) { lVar5 = 0x7fffffff; } iVar2 = (int)lVar5; } if (iVar2 < 0) { puVar8 = (int1 *)((long)puVar8 + (uVar6 * 3 + 3) * 8); uVar6 = ~uVar6 + uVar7; } uVar7 = uVar6; } while (0 < (long)uVar6); puVar3 = &SVGTextNode::vtable; if ((puVar8 == &SVGTextNode::vtable) || (__n = *(size_t *)puVar8, __n != uVar1)) { LAB_0010ebb2: uVar4 = 0; } else { if (__n != 0) { iVar2 = bcmp(*(void **)((long)puVar8 + 8),__s2,__n); puVar3 = (int *)CONCAT44(extraout_var,iVar2); if (iVar2 != 0) goto LAB_0010ebb2; } uVar4 = CONCAT71((int7)((ulong)puVar3 >> 8),(char)*(size_t *)((long)puVar8 + 0x10)); } return uVar4; }
20,610
tailoring_append
eloqsql/strings/ctype.c
static int tailoring_append(MY_XML_PARSER *st, const char *fmt, size_t len, const char *attr) { struct my_cs_file_info *i= (struct my_cs_file_info *) st->user_data; size_t newlen= i->tailoring_length + len + 64; /* 64 for format */ if (MY_XML_OK == my_charset_file_tailoring_realloc(i, newlen)) { char *dst= i->tailoring + i->tailoring_length; sprintf(dst, fmt, (int) len, attr); i->tailoring_length+= strlen(dst); return MY_XML_OK; } return MY_XML_ERROR; }
O0
c
tailoring_append: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax movq 0x140(%rax), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq 0x690(%rax), %rax addq -0x20(%rbp), %rax addq $0x40, %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rdi movq -0x38(%rbp), %rsi callq 0x76750 movl %eax, %ecx xorl %eax, %eax cmpl %ecx, %eax jne 0x7673d movq -0x30(%rbp), %rax movq 0x688(%rax), %rax movq -0x30(%rbp), %rcx addq 0x690(%rcx), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rax movl %eax, %edx movq -0x28(%rbp), %rcx movb $0x0, %al callq 0x250b0 movq -0x40(%rbp), %rdi callq 0x25130 movq %rax, %rcx movq -0x30(%rbp), %rax addq 0x690(%rax), %rcx movq %rcx, 0x690(%rax) movl $0x0, -0x4(%rbp) jmp 0x76744 movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopl (%rax)
tailoring_append: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_10] mov rax, [rax+140h] mov [rbp+var_30], rax mov rax, [rbp+var_30] mov rax, [rax+690h] add rax, [rbp+var_20] add rax, 40h ; '@' mov [rbp+var_38], rax mov rdi, [rbp+var_30] mov rsi, [rbp+var_38] call my_charset_file_tailoring_realloc mov ecx, eax xor eax, eax cmp eax, ecx jnz short loc_7673D mov rax, [rbp+var_30] mov rax, [rax+688h] mov rcx, [rbp+var_30] add rax, [rcx+690h] mov [rbp+var_40], rax mov rdi, [rbp+var_40] mov rsi, [rbp+var_18] mov rax, [rbp+var_20] mov edx, eax mov rcx, [rbp+var_28] mov al, 0 call _sprintf mov rdi, [rbp+var_40] call _strlen mov rcx, rax mov rax, [rbp+var_30] add rcx, [rax+690h] mov [rax+690h], rcx mov [rbp+var_4], 0 jmp short loc_76744 loc_7673D: mov [rbp+var_4], 1 loc_76744: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long tailoring_append(long long a1, const char *a2, long long a3, long long a4) { long long v5; // [rsp+0h] [rbp-40h] long long v6; // [rsp+10h] [rbp-30h] unsigned int v8; // [rsp+20h] [rbp-20h] v8 = a3; v6 = *(_QWORD *)(a1 + 320); if ( (unsigned int)my_charset_file_tailoring_realloc(v6, a3 + *(_QWORD *)(v6 + 1680) + 64) ) { return 1; } else { v5 = *(_QWORD *)(v6 + 1680) + *(_QWORD *)(v6 + 1672); sprintf(v5, a2, v8, a4); *(_QWORD *)(v6 + 1680) += strlen(v5); return 0; } }
tailoring_append: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x140] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x690] ADD RAX,qword ptr [RBP + -0x20] ADD RAX,0x40 MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x38] CALL 0x00176750 MOV ECX,EAX XOR EAX,EAX CMP EAX,ECX JNZ 0x0017673d MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x688] MOV RCX,qword ptr [RBP + -0x30] ADD RAX,qword ptr [RCX + 0x690] MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] MOV EDX,EAX MOV RCX,qword ptr [RBP + -0x28] MOV AL,0x0 CALL 0x001250b0 MOV RDI,qword ptr [RBP + -0x40] CALL 0x00125130 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x30] ADD RCX,qword ptr [RAX + 0x690] MOV qword ptr [RAX + 0x690],RCX MOV dword ptr [RBP + -0x4],0x0 JMP 0x00176744 LAB_0017673d: MOV dword ptr [RBP + -0x4],0x1 LAB_00176744: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
bool tailoring_append(long param_1,char *param_2,ulong param_3,int8 param_4) { long lVar1; int iVar2; char *__s; size_t sVar3; lVar1 = *(long *)(param_1 + 0x140); iVar2 = my_charset_file_tailoring_realloc(lVar1,*(long *)(lVar1 + 0x690) + param_3 + 0x40); if (iVar2 == 0) { __s = (char *)(*(long *)(lVar1 + 0x688) + *(long *)(lVar1 + 0x690)); sprintf(__s,param_2,param_3 & 0xffffffff,param_4); sVar3 = strlen(__s); *(size_t *)(lVar1 + 0x690) = sVar3 + *(long *)(lVar1 + 0x690); } return iVar2 != 0; }
20,611
mi_ft_segiterator_init
eloqsql/storage/myisam/ft_update.c
void _mi_ft_segiterator_init(MI_INFO *info, uint keynr, const uchar *record, FT_SEG_ITERATOR *ftsi) { DBUG_ENTER("_mi_ft_segiterator_init"); ftsi->num=info->s->keyinfo[keynr].keysegs; ftsi->seg=info->s->keyinfo[keynr].seg; ftsi->rec=record; ftsi->pos= 0; /* Avoid warnings from gcc */ ftsi->len= 0; /* Avoid warnings from gcc */ DBUG_VOID_RETURN; }
O0
c
mi_ft_segiterator_init: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x218(%rax), %rax movl -0xc(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax movzwl 0x8(%rax), %ecx movq -0x20(%rbp), %rax movl %ecx, (%rax) movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x218(%rax), %rax movl -0xc(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax movq 0x28(%rax), %rcx movq -0x20(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x18(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x20(%rbp), %rax movq $0x0, 0x18(%rax) movq -0x20(%rbp), %rax movl $0x0, 0x4(%rax) jmp 0x63c7e popq %rbp retq
_mi_ft_segiterator_init: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_8] mov rax, [rax] mov rax, [rax+218h] mov ecx, [rbp+var_C] imul rcx, 70h ; 'p' add rax, rcx movzx ecx, word ptr [rax+8] mov rax, [rbp+var_20] mov [rax], ecx mov rax, [rbp+var_8] mov rax, [rax] mov rax, [rax+218h] mov ecx, [rbp+var_C] imul rcx, 70h ; 'p' add rax, rcx mov rcx, [rax+28h] mov rax, [rbp+var_20] mov [rax+8], rcx mov rcx, [rbp+var_18] mov rax, [rbp+var_20] mov [rax+10h], rcx mov rax, [rbp+var_20] mov qword ptr [rax+18h], 0 mov rax, [rbp+var_20] mov dword ptr [rax+4], 0 jmp short $+2 loc_63C7E: pop rbp retn
long long mi_ft_segiterator_init(long long a1, unsigned int a2, long long a3, long long a4) { long long result; // rax *(_DWORD *)a4 = *(unsigned __int16 *)(112LL * a2 + *(_QWORD *)(*(_QWORD *)a1 + 536LL) + 8); *(_QWORD *)(a4 + 8) = *(_QWORD *)(112LL * a2 + *(_QWORD *)(*(_QWORD *)a1 + 536LL) + 40); *(_QWORD *)(a4 + 16) = a3; *(_QWORD *)(a4 + 24) = 0LL; result = a4; *(_DWORD *)(a4 + 4) = 0; return result; }
_mi_ft_segiterator_init: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV ECX,dword ptr [RBP + -0xc] IMUL RCX,RCX,0x70 ADD RAX,RCX MOVZX ECX,word ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV ECX,dword ptr [RBP + -0xc] IMUL RCX,RCX,0x70 ADD RAX,RCX MOV RCX,qword ptr [RAX + 0x28] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x18],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x4],0x0 JMP 0x00163c7e LAB_00163c7e: POP RBP RET
void _mi_ft_segiterator_init(long *param_1,uint param_2,int8 param_3,uint *param_4) { *param_4 = (uint)*(ushort *)(*(long *)(*param_1 + 0x218) + (ulong)param_2 * 0x70 + 8); *(int8 *)(param_4 + 2) = *(int8 *)(*(long *)(*param_1 + 0x218) + (ulong)param_2 * 0x70 + 0x28); *(int8 *)(param_4 + 4) = param_3; param_4[6] = 0; param_4[7] = 0; param_4[1] = 0; return; }
20,612
my_casefold_mb
eloqsql/strings/ctype-mb.c
static size_t my_casefold_mb(CHARSET_INFO *cs, const char *src, size_t srclen, char *dst, size_t dstlen __attribute__((unused)), const uchar *map, size_t is_upper) { const char *srcend= src + srclen; char *dst0= dst; DBUG_ASSERT(cs->mbmaxlen == 2); while (src < srcend) { size_t mblen= my_ismbchar(cs, src, srcend); if (mblen) { MY_UNICASE_CHARACTER *ch; if ((ch= get_case_info_for_ch(cs, (uchar) src[0], (uchar) src[1]))) { int code= is_upper ? ch->toupper : ch->tolower; src+= 2; if (code > 0xFF) *dst++= code >> 8; *dst++= code & 0xFF; } else { *dst++= *src++; *dst++= *src++; } } else { *dst++= (char) map[(uchar) *src++]; } } return (size_t) (dst - dst0); }
O0
c
my_casefold_mb: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq 0x10(%rbp), %rax movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x40(%rbp) jmp 0x4280a jmp 0x4280c movq -0x10(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0x42940 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x38(%rbp), %rdx callq 0x42670 movl %eax, %eax movq %rax, -0x48(%rbp) cmpq $0x0, -0x48(%rbp) je 0x42911 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rax movzbl (%rax), %esi movq -0x10(%rbp), %rax movzbl 0x1(%rax), %edx callq 0x45350 movq %rax, -0x50(%rbp) cmpq $0x0, %rax je 0x428cb cmpq $0x0, 0x10(%rbp) je 0x42870 movq -0x50(%rbp), %rax movl (%rax), %eax movl %eax, -0x58(%rbp) jmp 0x4287a movq -0x50(%rbp), %rax movl 0x4(%rax), %eax movl %eax, -0x58(%rbp) movl -0x58(%rbp), %eax movl %eax, -0x54(%rbp) movq -0x10(%rbp), %rax addq $0x2, %rax movq %rax, -0x10(%rbp) cmpl $0xff, -0x54(%rbp) jle 0x428ae movl -0x54(%rbp), %eax sarl $0x8, %eax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movl -0x54(%rbp), %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) jmp 0x4290f movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movb (%rax), %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movb (%rax), %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) jmp 0x4293b movq -0x30(%rbp), %rax movq -0x10(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movzbl (%rcx), %ecx movb (%rax,%rcx), %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) jmp 0x4280c movq -0x20(%rbp), %rax movq -0x40(%rbp), %rcx subq %rcx, %rax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_casefold_mb: push rbp mov rbp, rsp sub rsp, 60h mov rax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_38], rax mov rax, [rbp+var_20] mov [rbp+var_40], rax jmp short $+2 loc_4280A: jmp short $+2 loc_4280C: mov rax, [rbp+var_10] cmp rax, [rbp+var_38] jnb loc_42940 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_38] call my_ismbchar_0 mov eax, eax mov [rbp+var_48], rax cmp [rbp+var_48], 0 jz loc_42911 mov rdi, [rbp+var_8] mov rax, [rbp+var_10] movzx esi, byte ptr [rax] mov rax, [rbp+var_10] movzx edx, byte ptr [rax+1] call get_case_info_for_ch mov [rbp+var_50], rax cmp rax, 0 jz short loc_428CB cmp [rbp+arg_0], 0 jz short loc_42870 mov rax, [rbp+var_50] mov eax, [rax] mov [rbp+var_58], eax jmp short loc_4287A loc_42870: mov rax, [rbp+var_50] mov eax, [rax+4] mov [rbp+var_58], eax loc_4287A: mov eax, [rbp+var_58] mov [rbp+var_54], eax mov rax, [rbp+var_10] add rax, 2 mov [rbp+var_10], rax cmp [rbp+var_54], 0FFh jle short loc_428AE mov eax, [rbp+var_54] sar eax, 8 mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl loc_428AE: mov eax, [rbp+var_54] and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl jmp short loc_4290F loc_428CB: mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx mov cl, [rax] mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx mov cl, [rax] mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl loc_4290F: jmp short loc_4293B loc_42911: mov rax, [rbp+var_30] mov rcx, [rbp+var_10] mov rdx, rcx add rdx, 1 mov [rbp+var_10], rdx movzx ecx, byte ptr [rcx] mov cl, [rax+rcx] mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl loc_4293B: jmp loc_4280C loc_42940: mov rax, [rbp+var_20] mov rcx, [rbp+var_40] sub rax, rcx add rsp, 60h pop rbp retn
_BYTE * my_casefold_mb( long long a1, unsigned __int8 *a2, long long a3, unsigned __int8 *a4, long long a5, long long a6, long long a7) { unsigned __int8 *v7; // rax unsigned __int8 *v8; // rax char *v9; // rax char v10; // cl _BYTE *v11; // rax unsigned __int8 *v12; // rcx unsigned __int8 *v13; // rax int v15; // [rsp+8h] [rbp-58h] int *case_info_for_ch; // [rsp+10h] [rbp-50h] unsigned long long v18; // [rsp+28h] [rbp-38h] unsigned __int8 *v20; // [rsp+40h] [rbp-20h] unsigned __int8 *v21; // [rsp+50h] [rbp-10h] v21 = a2; v20 = a4; v18 = (unsigned long long)&a2[a3]; while ( (unsigned long long)v21 < v18 ) { if ( (unsigned int)my_ismbchar_0(a1, (long long)v21, v18) ) { case_info_for_ch = (int *)get_case_info_for_ch(a1, *v21, v21[1]); if ( case_info_for_ch ) { if ( a7 ) v15 = *case_info_for_ch; else v15 = case_info_for_ch[1]; v21 += 2; if ( v15 > 255 ) { v7 = v20++; *v7 = BYTE1(v15); } v8 = v20++; *v8 = v15; } else { *v20 = *v21; v9 = (char *)(v21 + 1); v21 += 2; v10 = *v9; v11 = v20 + 1; v20 += 2; *v11 = v10; } } else { v12 = v21++; v13 = v20++; *v13 = *(_BYTE *)(a6 + *v12); } } return (_BYTE *)(v20 - a4); }
my_casefold_mb: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x40],RAX JMP 0x0014280a LAB_0014280a: JMP 0x0014280c LAB_0014280c: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x38] JNC 0x00142940 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x38] CALL 0x00142670 MOV EAX,EAX MOV qword ptr [RBP + -0x48],RAX CMP qword ptr [RBP + -0x48],0x0 JZ 0x00142911 MOV RDI,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x10] MOVZX ESI,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOVZX EDX,byte ptr [RAX + 0x1] CALL 0x00145350 MOV qword ptr [RBP + -0x50],RAX CMP RAX,0x0 JZ 0x001428cb CMP qword ptr [RBP + 0x10],0x0 JZ 0x00142870 MOV RAX,qword ptr [RBP + -0x50] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x58],EAX JMP 0x0014287a LAB_00142870: MOV RAX,qword ptr [RBP + -0x50] MOV EAX,dword ptr [RAX + 0x4] MOV dword ptr [RBP + -0x58],EAX LAB_0014287a: MOV EAX,dword ptr [RBP + -0x58] MOV dword ptr [RBP + -0x54],EAX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 MOV qword ptr [RBP + -0x10],RAX CMP dword ptr [RBP + -0x54],0xff JLE 0x001428ae MOV EAX,dword ptr [RBP + -0x54] SAR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL LAB_001428ae: MOV EAX,dword ptr [RBP + -0x54] AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL JMP 0x0014290f LAB_001428cb: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL LAB_0014290f: JMP 0x0014293b LAB_00142911: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x10] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOVZX ECX,byte ptr [RCX] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL LAB_0014293b: JMP 0x0014280c LAB_00142940: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x40] SUB RAX,RCX ADD RSP,0x60 POP RBP RET
long my_casefold_mb(int8 param_1,byte *param_2,long param_3,byte *param_4,int8 param_5, long param_6,long param_7) { int iVar1; int *piVar2; byte *pbVar3; int local_60; byte *local_28; byte *local_18; local_28 = param_4; local_18 = param_2; while (local_18 < param_2 + param_3) { iVar1 = my_ismbchar(param_1,local_18,param_2 + param_3); if (iVar1 == 0) { *local_28 = *(byte *)(param_6 + (ulong)*local_18); local_28 = local_28 + 1; local_18 = local_18 + 1; } else { piVar2 = (int *)get_case_info_for_ch(param_1,*local_18,local_18[1]); if (piVar2 == (int *)0x0) { pbVar3 = local_28 + 1; *local_28 = *local_18; local_28 = local_28 + 2; *pbVar3 = local_18[1]; } else { if (param_7 == 0) { local_60 = piVar2[1]; } else { local_60 = *piVar2; } if (0xff < local_60) { *local_28 = (byte)((uint)local_60 >> 8); local_28 = local_28 + 1; } *local_28 = (byte)local_60; local_28 = local_28 + 1; } local_18 = local_18 + 2; } } return (long)local_28 - (long)param_4; }
20,613
TinyEncoder::get_num_tensors()
7CodeWizard[P]stablediffusion/tae.hpp
int get_num_tensors() { int num_tensors = 7; for (int i = 0; i < num_blocks; i++) { num_tensors += input_blocks[i].get_num_tensors(); num_tensors += middle_blocks[i].get_num_tensors(); num_tensors += output_blocks[i].get_num_tensors(); } num_tensors += initial_block.get_num_tensors(); return num_tensors; }
O0
cpp
TinyEncoder::get_num_tensors(): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rax movq %rax, (%rsp) movl $0x7, 0xc(%rsp) movl $0x0, 0x8(%rsp) movq (%rsp), %rcx movl 0x8(%rsp), %eax cmpl 0xc(%rcx), %eax jge 0x4d058 movq (%rsp), %rdi addq $0x68, %rdi movslq 0x8(%rsp), %rax shlq $0x6, %rax addq %rax, %rdi callq 0x4d080 movq (%rsp), %rdi addl 0xc(%rsp), %eax movl %eax, 0xc(%rsp) addq $0x130, %rdi # imm = 0x130 movslq 0x8(%rsp), %rax shlq $0x6, %rax addq %rax, %rdi callq 0x4d080 movq (%rsp), %rdi addl 0xc(%rsp), %eax movl %eax, 0xc(%rsp) addq $0x1f8, %rdi # imm = 0x1F8 movslq 0x8(%rsp), %rax shlq $0x6, %rax addq %rax, %rdi callq 0x4d080 addl 0xc(%rsp), %eax movl %eax, 0xc(%rsp) movl 0x8(%rsp), %eax addl $0x1, %eax movl %eax, 0x8(%rsp) jmp 0x4cfd2 movq (%rsp), %rdi addq $0x20, %rdi callq 0x4d080 addl 0xc(%rsp), %eax movl %eax, 0xc(%rsp) movl 0xc(%rsp), %eax addq $0x18, %rsp retq nopw %cs:(%rax,%rax)
_ZN11TinyEncoder15get_num_tensorsEv: sub rsp, 18h mov [rsp+18h+var_8], rdi mov rax, [rsp+18h+var_8] mov [rsp+18h+var_18], rax mov [rsp+18h+var_C], 7 mov [rsp+18h+var_10], 0 loc_4CFD2: mov rcx, [rsp+18h+var_18] mov eax, [rsp+18h+var_10] cmp eax, [rcx+0Ch] jge short loc_4D058 mov rdi, [rsp+18h+var_18] add rdi, 68h ; 'h' movsxd rax, [rsp+18h+var_10] shl rax, 6 add rdi, rax; this call _ZN8TAEBlock15get_num_tensorsEv; TAEBlock::get_num_tensors(void) mov rdi, [rsp+18h+var_18] add eax, [rsp+18h+var_C] mov [rsp+18h+var_C], eax add rdi, 130h movsxd rax, [rsp+18h+var_10] shl rax, 6 add rdi, rax; this call _ZN8TAEBlock15get_num_tensorsEv; TAEBlock::get_num_tensors(void) mov rdi, [rsp+18h+var_18] add eax, [rsp+18h+var_C] mov [rsp+18h+var_C], eax add rdi, 1F8h movsxd rax, [rsp+18h+var_10] shl rax, 6 add rdi, rax; this call _ZN8TAEBlock15get_num_tensorsEv; TAEBlock::get_num_tensors(void) add eax, [rsp+18h+var_C] mov [rsp+18h+var_C], eax mov eax, [rsp+18h+var_10] add eax, 1 mov [rsp+18h+var_10], eax jmp loc_4CFD2 loc_4D058: mov rdi, [rsp+18h+var_18] add rdi, 20h ; ' '; this call _ZN8TAEBlock15get_num_tensorsEv; TAEBlock::get_num_tensors(void) add eax, [rsp+18h+var_C] mov [rsp+18h+var_C], eax mov eax, [rsp+18h+var_C] add rsp, 18h retn
long long TinyEncoder::get_num_tensors(TinyEncoder *this) { int i; // [rsp+8h] [rbp-10h] int v3; // [rsp+Ch] [rbp-Ch] int v4; // [rsp+Ch] [rbp-Ch] int v5; // [rsp+Ch] [rbp-Ch] v3 = 7; for ( i = 0; i < *((_DWORD *)this + 3); ++i ) { v4 = v3 + TAEBlock::get_num_tensors((TinyEncoder *)((char *)this + 64 * (long long)i + 104)); v5 = v4 + TAEBlock::get_num_tensors((TinyEncoder *)((char *)this + 64 * (long long)i + 304)); v3 = v5 + TAEBlock::get_num_tensors((TinyEncoder *)((char *)this + 64 * (long long)i + 504)); } return v3 + (unsigned int)TAEBlock::get_num_tensors((TinyEncoder *)((char *)this + 32)); }
get_num_tensors: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP],RAX MOV dword ptr [RSP + 0xc],0x7 MOV dword ptr [RSP + 0x8],0x0 LAB_0014cfd2: MOV RCX,qword ptr [RSP] MOV EAX,dword ptr [RSP + 0x8] CMP EAX,dword ptr [RCX + 0xc] JGE 0x0014d058 MOV RDI,qword ptr [RSP] ADD RDI,0x68 MOVSXD RAX,dword ptr [RSP + 0x8] SHL RAX,0x6 ADD RDI,RAX CALL 0x0014d080 MOV RDI,qword ptr [RSP] ADD EAX,dword ptr [RSP + 0xc] MOV dword ptr [RSP + 0xc],EAX ADD RDI,0x130 MOVSXD RAX,dword ptr [RSP + 0x8] SHL RAX,0x6 ADD RDI,RAX CALL 0x0014d080 MOV RDI,qword ptr [RSP] ADD EAX,dword ptr [RSP + 0xc] MOV dword ptr [RSP + 0xc],EAX ADD RDI,0x1f8 MOVSXD RAX,dword ptr [RSP + 0x8] SHL RAX,0x6 ADD RDI,RAX CALL 0x0014d080 ADD EAX,dword ptr [RSP + 0xc] MOV dword ptr [RSP + 0xc],EAX MOV EAX,dword ptr [RSP + 0x8] ADD EAX,0x1 MOV dword ptr [RSP + 0x8],EAX JMP 0x0014cfd2 LAB_0014d058: MOV RDI,qword ptr [RSP] ADD RDI,0x20 CALL 0x0014d080 ADD EAX,dword ptr [RSP + 0xc] MOV dword ptr [RSP + 0xc],EAX MOV EAX,dword ptr [RSP + 0xc] ADD RSP,0x18 RET
/* TinyEncoder::get_num_tensors() */ int __thiscall TinyEncoder::get_num_tensors(TinyEncoder *this) { int iVar1; int iVar2; int iVar3; int local_10; int local_c; local_c = 7; for (local_10 = 0; local_10 < *(int *)(this + 0xc); local_10 = local_10 + 1) { iVar1 = TAEBlock::get_num_tensors((TAEBlock *)(this + (long)local_10 * 0x40 + 0x68)); iVar2 = TAEBlock::get_num_tensors((TAEBlock *)(this + (long)local_10 * 0x40 + 0x130)); iVar3 = TAEBlock::get_num_tensors((TAEBlock *)(this + (long)local_10 * 0x40 + 0x1f8)); local_c = iVar3 + iVar2 + iVar1 + local_c; } iVar1 = TAEBlock::get_num_tensors((TAEBlock *)(this + 0x20)); return iVar1 + local_c; }
20,614
TinyEncoder::get_num_tensors()
7CodeWizard[P]stablediffusion/tae.hpp
int get_num_tensors() { int num_tensors = 7; for (int i = 0; i < num_blocks; i++) { num_tensors += input_blocks[i].get_num_tensors(); num_tensors += middle_blocks[i].get_num_tensors(); num_tensors += output_blocks[i].get_num_tensors(); } num_tensors += initial_block.get_num_tensors(); return num_tensors; }
O1
cpp
TinyEncoder::get_num_tensors(): movslq 0xc(%rdi), %rax testq %rax, %rax jle 0x3b831 shlq $0x6, %rax movl $0x7, %ecx xorl %edx, %edx movl 0x68(%rdi,%rdx), %esi movl 0x130(%rdi,%rdx), %r8d xorl %r9d, %r9d cmpl 0x6c(%rdi,%rdx), %esi sete %r9b xorl $0x7, %r9d addl %ecx, %r9d xorl %esi, %esi cmpl 0x134(%rdi,%rdx), %r8d sete %sil xorl $0x7, %esi movl 0x1f8(%rdi,%rdx), %r8d xorl %ecx, %ecx cmpl 0x1fc(%rdi,%rdx), %r8d sete %cl xorl $0x7, %ecx addl %esi, %ecx addl %r9d, %ecx addq $0x40, %rdx cmpq %rdx, %rax jne 0x3b7da jmp 0x3b836 movl $0x7, %ecx movl 0x20(%rdi), %edx xorl %eax, %eax cmpl 0x24(%rdi), %edx sete %al xorl $0x7, %eax addl %ecx, %eax retq nop
_ZN11TinyEncoder15get_num_tensorsEv: movsxd rax, dword ptr [rdi+0Ch] test rax, rax jle short loc_3B831 shl rax, 6 mov ecx, 7 xor edx, edx loc_3B7DA: mov esi, [rdi+rdx+68h] mov r8d, [rdi+rdx+130h] xor r9d, r9d cmp esi, [rdi+rdx+6Ch] setz r9b xor r9d, 7 add r9d, ecx xor esi, esi cmp r8d, [rdi+rdx+134h] setz sil xor esi, 7 mov r8d, [rdi+rdx+1F8h] xor ecx, ecx cmp r8d, [rdi+rdx+1FCh] setz cl xor ecx, 7 add ecx, esi add ecx, r9d add rdx, 40h ; '@' cmp rax, rdx jnz short loc_3B7DA jmp short loc_3B836 loc_3B831: mov ecx, 7 loc_3B836: mov edx, [rdi+20h] xor eax, eax cmp edx, [rdi+24h] setz al xor eax, 7 add eax, ecx retn
long long TinyEncoder::get_num_tensors(TinyEncoder *this) { long long v1; // rax long long v2; // rax int v3; // ecx long long v4; // rdx v1 = *((int *)this + 3); if ( v1 <= 0 ) { v3 = 7; } else { v2 = v1 << 6; v3 = 7; v4 = 0LL; do { v3 += ((*(_DWORD *)((char *)this + v4 + 104) == *(_DWORD *)((char *)this + v4 + 108)) ^ 7) + ((*(_DWORD *)((char *)this + v4 + 304) == *(_DWORD *)((char *)this + v4 + 308)) ^ 7) + ((*(_DWORD *)((char *)this + v4 + 504) == *(_DWORD *)((char *)this + v4 + 508)) ^ 7); v4 += 64LL; } while ( v2 != v4 ); } return v3 + ((*((_DWORD *)this + 8) == *((_DWORD *)this + 9)) ^ 7u); }
20,615
TinyEncoder::get_num_tensors()
7CodeWizard[P]stablediffusion/tae.hpp
int get_num_tensors() { int num_tensors = 7; for (int i = 0; i < num_blocks; i++) { num_tensors += input_blocks[i].get_num_tensors(); num_tensors += middle_blocks[i].get_num_tensors(); num_tensors += output_blocks[i].get_num_tensors(); } num_tensors += initial_block.get_num_tensors(); return num_tensors; }
O3
cpp
TinyEncoder::get_num_tensors(): movslq 0xc(%rdi), %rax testq %rax, %rax jle 0x3ac17 shlq $0x6, %rax movl $0x7, %ecx xorl %edx, %edx movl 0x68(%rdi,%rdx), %esi movl 0x130(%rdi,%rdx), %r8d xorl %r9d, %r9d cmpl 0x6c(%rdi,%rdx), %esi sete %r9b xorl $0x7, %r9d addl %ecx, %r9d xorl %esi, %esi cmpl 0x134(%rdi,%rdx), %r8d sete %sil xorl $0x7, %esi movl 0x1f8(%rdi,%rdx), %r8d xorl %ecx, %ecx cmpl 0x1fc(%rdi,%rdx), %r8d sete %cl xorl $0x7, %ecx addl %esi, %ecx addl %r9d, %ecx addq $0x40, %rdx cmpq %rdx, %rax jne 0x3abc0 jmp 0x3ac1c movl $0x7, %ecx movl 0x20(%rdi), %edx xorl %eax, %eax cmpl 0x24(%rdi), %edx sete %al xorl $0x7, %eax addl %ecx, %eax retq nop
_ZN11TinyEncoder15get_num_tensorsEv: movsxd rax, dword ptr [rdi+0Ch] test rax, rax jle short loc_3AC17 shl rax, 6 mov ecx, 7 xor edx, edx loc_3ABC0: mov esi, [rdi+rdx+68h] mov r8d, [rdi+rdx+130h] xor r9d, r9d cmp esi, [rdi+rdx+6Ch] setz r9b xor r9d, 7 add r9d, ecx xor esi, esi cmp r8d, [rdi+rdx+134h] setz sil xor esi, 7 mov r8d, [rdi+rdx+1F8h] xor ecx, ecx cmp r8d, [rdi+rdx+1FCh] setz cl xor ecx, 7 add ecx, esi add ecx, r9d add rdx, 40h ; '@' cmp rax, rdx jnz short loc_3ABC0 jmp short loc_3AC1C loc_3AC17: mov ecx, 7 loc_3AC1C: mov edx, [rdi+20h] xor eax, eax cmp edx, [rdi+24h] setz al xor eax, 7 add eax, ecx retn
long long TinyEncoder::get_num_tensors(TinyEncoder *this) { long long v1; // rax long long v2; // rax int v3; // ecx long long v4; // rdx v1 = *((int *)this + 3); if ( v1 <= 0 ) { v3 = 7; } else { v2 = v1 << 6; v3 = 7; v4 = 0LL; do { v3 += ((*(_DWORD *)((char *)this + v4 + 104) == *(_DWORD *)((char *)this + v4 + 108)) ^ 7) + ((*(_DWORD *)((char *)this + v4 + 304) == *(_DWORD *)((char *)this + v4 + 308)) ^ 7) + ((*(_DWORD *)((char *)this + v4 + 504) == *(_DWORD *)((char *)this + v4 + 508)) ^ 7); v4 += 64LL; } while ( v2 != v4 ); } return v3 + ((*((_DWORD *)this + 8) == *((_DWORD *)this + 9)) ^ 7u); }
20,616
google::protobuf::FileDescriptor::GetSourceLocation(google::protobuf::SourceLocation*) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
bool FileDescriptor::GetSourceLocation(SourceLocation* out_location) const { std::vector<int> path; // empty path for root FileDescriptor return GetSourceLocation(path, out_location); }
O3
cpp
google::protobuf::FileDescriptor::GetSourceLocation(google::protobuf::SourceLocation*) const: pushq %rbx subq $0x20, %rsp movq %rsi, %rdx xorps %xmm0, %xmm0 movq %rsp, %rsi movaps %xmm0, (%rsi) movq $0x0, 0x10(%rsi) callq 0xc83e4 movl %eax, %ebx movq (%rsp), %rdi testq %rdi, %rdi je 0xc8534 callq 0x2d160 movl %ebx, %eax addq $0x20, %rsp popq %rbx retq movq %rax, %rbx movq (%rsp), %rdi testq %rdi, %rdi je 0xc854d callq 0x2d160 movq %rbx, %rdi callq 0x2e220 nop
_ZNK6google8protobuf14FileDescriptor17GetSourceLocationEPNS0_14SourceLocationE: push rbx sub rsp, 20h mov rdx, rsi xorps xmm0, xmm0 mov rsi, rsp movaps xmmword ptr [rsi], xmm0 mov qword ptr [rsi+10h], 0 call _ZNK6google8protobuf14FileDescriptor17GetSourceLocationERKSt6vectorIiSaIiEEPNS0_14SourceLocationE; google::protobuf::FileDescriptor::GetSourceLocation(std::vector<int> const&,google::protobuf::SourceLocation *) mov ebx, eax mov rdi, [rsp+28h+var_28]; void * test rdi, rdi jz short loc_C8534 call __ZdlPv; operator delete(void *) loc_C8534: mov eax, ebx add rsp, 20h pop rbx retn mov rbx, rax mov rdi, [rsp+0]; void * test rdi, rdi jz short loc_C854D call __ZdlPv; operator delete(void *) loc_C854D: mov rdi, rbx call __Unwind_Resume
long long google::protobuf::FileDescriptor::GetSourceLocation( google::protobuf::FileDescriptor *this, google::protobuf::SourceLocation *a2) { unsigned int v2; // eax unsigned int v3; // ebx void *v5[5]; // [rsp+0h] [rbp-28h] BYREF memset(v5, 0, 24); LOBYTE(v2) = google::protobuf::FileDescriptor::GetSourceLocation((long long)this, (long long)v5, a2); v3 = v2; if ( v5[0] ) operator delete(v5[0]); return v3; }
GetSourceLocation: PUSH RBX SUB RSP,0x20 MOV RDX,RSI XORPS XMM0,XMM0 MOV RSI,RSP MOVAPS xmmword ptr [RSI],XMM0 MOV qword ptr [RSI + 0x10],0x0 LAB_001c851f: CALL 0x001c83e4 LAB_001c8524: MOV EBX,EAX MOV RDI,qword ptr [RSP] TEST RDI,RDI JZ 0x001c8534 CALL 0x0012d160 LAB_001c8534: MOV EAX,EBX ADD RSP,0x20 POP RBX RET
/* google::protobuf::FileDescriptor::GetSourceLocation(google::protobuf::SourceLocation*) const */ int4 __thiscall google::protobuf::FileDescriptor::GetSourceLocation(FileDescriptor *this,SourceLocation *param_1) { int4 uVar1; void *local_28; int8 uStack_20; int8 local_18; local_28 = (void *)0x0; uStack_20 = 0; local_18 = 0; /* try { // try from 001c851f to 001c8523 has its CatchHandler @ 001c853c */ uVar1 = GetSourceLocation(this,(vector *)&local_28,param_1); if (local_28 != (void *)0x0) { operator_delete(local_28); } return uVar1; }
20,617
check_text
pnggroup[P]pngcheck/pngcheck.c
int check_text(uch *buffer, int maxsize, const char *chunkid, const char *fname) { int j, ctrlwarn = verbose? 1 : 0; /* print message once, only if verbose */ for (j = 0; j < maxsize; ++j) { if (buffer[j] == 0) { printf("%s %s text contains NULL character(s)\n", verbose? ":":fname, verbose? "":chunkid); return 1; } else if (ctrlwarn && latin1_text_discouraged[buffer[j]]) { printf(": text has control character(s) (%u) (discouraged)\n", buffer[j]); ctrlwarn = 0; } } return 0; }
O1
c
check_text: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp testl %esi, %esi jle 0x11a76 movq %rdi, %r15 movq %rcx, 0x8(%rsp) movq %rdx, 0x10(%rsp) xorl %r12d, %r12d cmpl $0x0, 0x97ec(%rip) # 0x1b210 setne %r12b movl %esi, %r13d xorl %ebx, %ebx leaq 0x8fc(%rip), %r14 # 0x12330 xorl %ebp, %ebp movzbl (%r15,%rbx), %esi testl %esi, %esi je 0x11a7a testl %r12d, %r12d movl $0x0, %r12d je 0x11a6c movl %esi, %eax cmpb $0x0, (%rax,%r14) je 0x11a66 xorl %r12d, %r12d leaq 0x575a(%rip), %rdi # 0x171b7 xorl %eax, %eax callq 0x20e0 jmp 0x11a6c movl $0x1, %r12d incq %rbx cmpq %rbx, %r13 jne 0x11a36 jmp 0x11aae xorl %ebp, %ebp jmp 0x11aae cmpl $0x0, 0x978f(%rip) # 0x1b210 leaq 0x5fa2(%rip), %rsi # 0x17a2a cmoveq 0x8(%rsp), %rsi leaq 0x55da(%rip), %rdx # 0x1706f cmoveq 0x10(%rsp), %rdx leaq 0x56ed(%rip), %rdi # 0x1718f xorl %eax, %eax callq 0x20e0 movl $0x1, %ebp movl %ebp, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
check_text: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h test esi, esi jle short loc_11A76 mov r15, rdi mov [rsp+48h+var_40], rcx mov [rsp+48h+var_38], rdx xor r12d, r12d cmp cs:verbose, 0 setnz r12b mov r13d, esi xor ebx, ebx lea r14, latin1_text_discouraged xor ebp, ebp loc_11A36: movzx esi, byte ptr [r15+rbx] test esi, esi jz short loc_11A7A test r12d, r12d mov r12d, 0 jz short loc_11A6C mov eax, esi cmp byte ptr [rax+r14], 0 jz short loc_11A66 xor r12d, r12d lea rdi, aTextHasControl; ": text has control character(s) (%u) "... xor eax, eax call _printf jmp short loc_11A6C loc_11A66: mov r12d, 1 loc_11A6C: inc rbx cmp r13, rbx jnz short loc_11A36 jmp short loc_11AAE loc_11A76: xor ebp, ebp jmp short loc_11AAE loc_11A7A: cmp cs:verbose, 0 lea rsi, aChangeSyncIdLi+25h; ":" cmovz rsi, [rsp+48h+var_40] lea rdx, unk_1706F cmovz rdx, [rsp+48h+var_38] lea rdi, aSSTextContains; "%s %s text contains NULL character(s)"... xor eax, eax call _printf mov ebp, 1 loc_11AAE: mov eax, ebp add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long check_text(long long a1, int a2, const char *a3, const char *a4) { BOOL v4; // r12d long long v5; // rbx unsigned int v6; // ebp bool v7; // zf const char *v8; // rsi const char *v9; // rdx if ( a2 <= 0 ) { return 0; } else { v4 = verbose != 0; v5 = 0LL; v6 = 0; while ( *(_BYTE *)(a1 + v5) ) { v7 = !v4; v4 = 0; if ( !v7 ) { if ( latin1_text_discouraged[*(unsigned __int8 *)(a1 + v5)] ) { v4 = 0; printf(": text has control character(s) (%u) (discouraged)\n", *(unsigned __int8 *)(a1 + v5)); } else { v4 = 1; } } if ( a2 == ++v5 ) return v6; } v8 = ":"; if ( !verbose ) v8 = a4; v9 = (const char *)&unk_1706F; if ( !verbose ) v9 = a3; printf("%s %s text contains NULL character(s)\n", v8, v9); return 1; } }
check_text: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 TEST ESI,ESI JLE 0x00111a76 MOV R15,RDI MOV qword ptr [RSP + 0x8],RCX MOV qword ptr [RSP + 0x10],RDX XOR R12D,R12D CMP dword ptr [0x0011b210],0x0 SETNZ R12B MOV R13D,ESI XOR EBX,EBX LEA R14,[0x112330] XOR EBP,EBP LAB_00111a36: MOVZX ESI,byte ptr [R15 + RBX*0x1] TEST ESI,ESI JZ 0x00111a7a TEST R12D,R12D MOV R12D,0x0 JZ 0x00111a6c MOV EAX,ESI CMP byte ptr [RAX + R14*0x1],0x0 JZ 0x00111a66 XOR R12D,R12D LEA RDI,[0x1171b7] XOR EAX,EAX CALL 0x001020e0 JMP 0x00111a6c LAB_00111a66: MOV R12D,0x1 LAB_00111a6c: INC RBX CMP R13,RBX JNZ 0x00111a36 JMP 0x00111aae LAB_00111a76: XOR EBP,EBP JMP 0x00111aae LAB_00111a7a: CMP dword ptr [0x0011b210],0x0 LEA RSI,[0x117a2a] CMOVZ RSI,qword ptr [RSP + 0x8] LEA RDX,[0x11706f] CMOVZ RDX,qword ptr [RSP + 0x10] LEA RDI,[0x11718f] XOR EAX,EAX CALL 0x001020e0 MOV EBP,0x1 LAB_00111aae: MOV EAX,EBP ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 check_text(long param_1,uint param_2,int *param_3,char *param_4) { bool bVar1; int *puVar2; ulong uVar3; char *pcVar4; bool bVar5; if (0 < (int)param_2) { bVar5 = verbose != 0; uVar3 = 0; do { if (*(byte *)(param_1 + uVar3) == 0) { pcVar4 = ":"; if (verbose == 0) { pcVar4 = param_4; } puVar2 = &DAT_0011706f; if (verbose == 0) { puVar2 = param_3; } printf("%s %s text contains NULL character(s)\n",pcVar4,puVar2); return 1; } bVar1 = false; if (bVar5) { if (latin1_text_discouraged[*(byte *)(param_1 + uVar3)] == '\0') { bVar1 = true; } else { printf(": text has control character(s) (%u) (discouraged)\n"); bVar1 = false; } } bVar5 = bVar1; uVar3 = uVar3 + 1; } while (param_2 != uVar3); } return 0; }
20,618
check_text
pnggroup[P]pngcheck/pngcheck.c
int check_text(uch *buffer, int maxsize, const char *chunkid, const char *fname) { int j, ctrlwarn = verbose? 1 : 0; /* print message once, only if verbose */ for (j = 0; j < maxsize; ++j) { if (buffer[j] == 0) { printf("%s %s text contains NULL character(s)\n", verbose? ":":fname, verbose? "":chunkid); return 1; } else if (ctrlwarn && latin1_text_discouraged[buffer[j]]) { printf(": text has control character(s) (%u) (discouraged)\n", buffer[j]); ctrlwarn = 0; } } return 0; }
O3
c
check_text: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp testl %esi, %esi jle 0x124f7 movq %rdi, %r15 movq %rcx, 0x8(%rsp) movq %rdx, 0x10(%rsp) xorl %r12d, %r12d cmpl $0x0, 0x9d6b(%rip) # 0x1c210 setne %r12b movl %esi, %r13d xorl %ebx, %ebx leaq 0xe7b(%rip), %r14 # 0x13330 xorl %ebp, %ebp movzbl (%r15,%rbx), %esi testl %esi, %esi je 0x124fb testl %r12d, %r12d movl $0x0, %r12d je 0x124ed movl %esi, %eax cmpb $0x0, (%rax,%r14) je 0x124e7 xorl %r12d, %r12d leaq 0x5c03(%rip), %rdi # 0x180e1 xorl %eax, %eax callq 0x20e0 jmp 0x124ed movl $0x1, %r12d incq %rbx cmpq %rbx, %r13 jne 0x124b7 jmp 0x1252f xorl %ebp, %ebp jmp 0x1252f cmpl $0x0, 0x9d0e(%rip) # 0x1c210 leaq 0x644b(%rip), %rsi # 0x18954 cmoveq 0x8(%rsp), %rsi leaq 0x12ce(%rip), %rdx # 0x137e4 cmoveq 0x10(%rsp), %rdx leaq 0x5b96(%rip), %rdi # 0x180b9 xorl %eax, %eax callq 0x20e0 movl $0x1, %ebp movl %ebp, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
check_text: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h test esi, esi jle short loc_124F7 mov r15, rdi mov [rsp+48h+var_40], rcx mov [rsp+48h+var_38], rdx xor r12d, r12d cmp cs:verbose, 0 setnz r12b mov r13d, esi xor ebx, ebx lea r14, latin1_text_discouraged xor ebp, ebp loc_124B7: movzx esi, byte ptr [r15+rbx] test esi, esi jz short loc_124FB test r12d, r12d mov r12d, 0 jz short loc_124ED mov eax, esi cmp byte ptr [rax+r14], 0 jz short loc_124E7 xor r12d, r12d lea rdi, aTextHasControl; ": text has control character(s) (%u) "... xor eax, eax call _printf jmp short loc_124ED loc_124E7: mov r12d, 1 loc_124ED: inc rbx cmp r13, rbx jnz short loc_124B7 jmp short loc_1252F loc_124F7: xor ebp, ebp jmp short loc_1252F loc_124FB: cmp cs:verbose, 0 lea rsi, aChangeSyncIdLi+25h; ":" cmovz rsi, [rsp+48h+var_40] lea rdx, aZlibWarningDif+3Ah; "" cmovz rdx, [rsp+48h+var_38] lea rdi, aSSTextContains; "%s %s text contains NULL character(s)"... xor eax, eax call _printf mov ebp, 1 loc_1252F: mov eax, ebp add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long check_text(long long a1, int a2, const char *a3, const char *a4) { BOOL v4; // r12d long long v5; // rbx unsigned int v6; // ebp bool v7; // zf const char *v8; // rsi const char *v9; // rdx if ( a2 <= 0 ) { return 0; } else { v4 = verbose != 0; v5 = 0LL; v6 = 0; while ( *(_BYTE *)(a1 + v5) ) { v7 = !v4; v4 = 0; if ( !v7 ) { if ( latin1_text_discouraged[*(unsigned __int8 *)(a1 + v5)] ) { v4 = 0; printf(": text has control character(s) (%u) (discouraged)\n", *(unsigned __int8 *)(a1 + v5)); } else { v4 = 1; } } if ( a2 == ++v5 ) return v6; } v8 = ":"; if ( !verbose ) v8 = a4; v9 = ""; if ( !verbose ) v9 = a3; printf("%s %s text contains NULL character(s)\n", v8, v9); return 1; } }
check_text: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 TEST ESI,ESI JLE 0x001124f7 MOV R15,RDI MOV qword ptr [RSP + 0x8],RCX MOV qword ptr [RSP + 0x10],RDX XOR R12D,R12D CMP dword ptr [0x0011c210],0x0 SETNZ R12B MOV R13D,ESI XOR EBX,EBX LEA R14,[0x113330] XOR EBP,EBP LAB_001124b7: MOVZX ESI,byte ptr [R15 + RBX*0x1] TEST ESI,ESI JZ 0x001124fb TEST R12D,R12D MOV R12D,0x0 JZ 0x001124ed MOV EAX,ESI CMP byte ptr [RAX + R14*0x1],0x0 JZ 0x001124e7 XOR R12D,R12D LEA RDI,[0x1180e1] XOR EAX,EAX CALL 0x001020e0 JMP 0x001124ed LAB_001124e7: MOV R12D,0x1 LAB_001124ed: INC RBX CMP R13,RBX JNZ 0x001124b7 JMP 0x0011252f LAB_001124f7: XOR EBP,EBP JMP 0x0011252f LAB_001124fb: CMP dword ptr [0x0011c210],0x0 LEA RSI,[0x118954] CMOVZ RSI,qword ptr [RSP + 0x8] LEA RDX,[0x1137e4] CMOVZ RDX,qword ptr [RSP + 0x10] LEA RDI,[0x1180b9] XOR EAX,EAX CALL 0x001020e0 MOV EBP,0x1 LAB_0011252f: MOV EAX,EBP ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 check_text(long param_1,uint param_2,char *param_3,char *param_4) { bool bVar1; char *pcVar2; ulong uVar3; char *pcVar4; bool bVar5; if (0 < (int)param_2) { bVar5 = verbose != 0; uVar3 = 0; do { if (*(byte *)(param_1 + uVar3) == 0) { pcVar4 = ":"; if (verbose == 0) { pcVar4 = param_4; } pcVar2 = ""; if (verbose == 0) { pcVar2 = param_3; } printf("%s %s text contains NULL character(s)\n",pcVar4,pcVar2); return 1; } bVar1 = false; if (bVar5) { if (latin1_text_discouraged[*(byte *)(param_1 + uVar3)] == '\0') { bVar1 = true; } else { printf(": text has control character(s) (%u) (discouraged)\n"); bVar1 = false; } } bVar5 = bVar1; uVar3 = uVar3 + 1; } while (param_2 != uVar3); } return 0; }
20,619
SchemaConverter::_generate_union_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<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>, std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>> const&)
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string _generate_union_rule(const std::string & name, const std::vector<json> & alt_schemas) { std::vector<std::string> rules; for (size_t i = 0; i < alt_schemas.size(); i++) { rules.push_back(visit(alt_schemas[i], name + (name.empty() ? "alternative-" : "-") + std::to_string(i))); } return string_join(rules, " | "); }
O0
cpp
SchemaConverter::_generate_union_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<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>, std::allocator<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&): subq $0x138, %rsp # imm = 0x138 movq %rdi, 0x28(%rsp) movq %rdi, %rax movq %rax, 0x30(%rsp) movq %rdi, 0x130(%rsp) movq %rsi, 0x128(%rsp) movq %rdx, 0x120(%rsp) movq %rcx, 0x118(%rsp) movq 0x128(%rsp), %rax movq %rax, 0x38(%rsp) leaq 0x100(%rsp), %rdi callq 0x60e60 movq $0x0, 0xf8(%rsp) movq 0xf8(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x118(%rsp), %rdi callq 0xac5e0 movq %rax, %rcx movq 0x20(%rsp), %rax cmpq %rcx, %rax jae 0x1aae62 movq 0x118(%rsp), %rdi movq 0xf8(%rsp), %rsi callq 0x1af580 movq %rax, 0x10(%rsp) movq 0x120(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0x594c0 movq 0x18(%rsp), %rsi movb %al, %cl leaq 0x68490(%rip), %rax # 0x21317f leaq 0x5f0a3(%rip), %rdx # 0x209d99 testb %cl, %cl cmovneq %rax, %rdx leaq 0x98(%rsp), %rdi callq 0x87ff0 jmp 0x1aad0b movq 0xf8(%rsp), %rsi leaq 0x68(%rsp), %rdi callq 0xabce0 jmp 0x1aad1f leaq 0xb8(%rsp), %rdi leaq 0x98(%rsp), %rsi leaq 0x68(%rsp), %rdx callq 0x8a450 jmp 0x1aad3b movq 0x10(%rsp), %rdx movq 0x38(%rsp), %rsi leaq 0xd8(%rsp), %rdi leaq 0xb8(%rsp), %rcx callq 0x1a73d0 jmp 0x1aad5c leaq 0x100(%rsp), %rdi leaq 0xd8(%rsp), %rsi callq 0xf5200 jmp 0x1aad73 leaq 0xd8(%rsp), %rdi callq 0x5a4d8 leaq 0xb8(%rsp), %rdi callq 0x5a4d8 leaq 0x68(%rsp), %rdi callq 0x5a4d8 leaq 0x98(%rsp), %rdi callq 0x5a4d8 movq 0xf8(%rsp), %rax addq $0x1, %rax movq %rax, 0xf8(%rsp) jmp 0x1aac8a movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) jmp 0x1aaf0e movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) jmp 0x1aae50 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) jmp 0x1aae46 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) jmp 0x1aae39 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) leaq 0xd8(%rsp), %rdi callq 0x5a4d8 leaq 0xb8(%rsp), %rdi callq 0x5a4d8 leaq 0x68(%rsp), %rdi callq 0x5a4d8 leaq 0x98(%rsp), %rdi callq 0x5a4d8 jmp 0x1aaf0e leaq 0x47(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x5a080 movq 0x8(%rsp), %rdx leaq 0x684b9(%rip), %rsi # 0x213336 leaq 0x48(%rsp), %rdi callq 0x5ea00 jmp 0x1aae89 movq 0x28(%rsp), %rdi leaq 0x100(%rsp), %rsi leaq 0x48(%rsp), %rdx callq 0xea270 jmp 0x1aaea2 leaq 0x48(%rsp), %rdi callq 0x5a4d8 leaq 0x47(%rsp), %rdi callq 0x5a4b0 leaq 0x100(%rsp), %rdi callq 0x60eb0 movq 0x30(%rsp), %rax addq $0x138, %rsp # imm = 0x138 retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) jmp 0x1aaf04 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) leaq 0x48(%rsp), %rdi callq 0x5a4d8 leaq 0x47(%rsp), %rdi callq 0x5a4b0 leaq 0x100(%rsp), %rdi callq 0x60eb0 movq 0x90(%rsp), %rdi callq 0x59b80 nopl (%rax,%rax)
_ZN15SchemaConverter20_generate_union_ruleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapES8_S5_blmdSaNSA_14adl_serializerES8_IhSaIhEEvEESaISG_EE: sub rsp, 138h mov [rsp+138h+var_110], rdi mov rax, rdi mov [rsp+138h+var_108], rax mov [rsp+138h+var_8], rdi mov [rsp+138h+var_10], rsi mov [rsp+138h+var_18], rdx mov [rsp+138h+var_20], rcx mov rax, [rsp+138h+var_10] mov [rsp+138h+var_100], rax lea rdi, [rsp+138h+var_38] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev; std::vector<std::string>::vector(void) mov [rsp+138h+var_40], 0 loc_1AAC8A: mov rax, [rsp+138h+var_40] mov [rsp+138h+var_118], rax mov rdi, [rsp+138h+var_20] call _ZNKSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE4sizeEv; 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>>::size(void) mov rcx, rax mov rax, [rsp+138h+var_118] cmp rax, rcx jnb loc_1AAE62 mov rdi, [rsp+138h+var_20] mov rsi, [rsp+138h+var_40] call _ZNKSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EEixEm; 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>>::operator[](ulong) mov qword ptr [rsp+138h+var_128], rax; int mov rdi, [rsp+138h+var_18] mov [rsp+138h+var_120], rdi; __int64 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) mov rsi, [rsp+138h+var_120]; int mov cl, al; int lea rax, aAlternative; "alternative-" lea rdx, asc_209D98+1; "-" test cl, cl cmovnz rdx, rax; int lea rdi, [rsp+138h+var_A0]; int call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) jmp short $+2 loc_1AAD0B: mov rsi, [rsp+138h+var_40]; unsigned __int64 lea rdi, [rsp+138h+var_D0]; this call _ZNSt7__cxx119to_stringEm; std::to_string(ulong) jmp short $+2 loc_1AAD1F: lea rdi, [rsp+138h+var_80] lea rsi, [rsp+138h+var_A0] lea rdx, [rsp+138h+var_D0] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) jmp short $+2 loc_1AAD3B: mov rdx, qword ptr [rsp+138h+var_128] mov rsi, [rsp+138h+var_100] lea rdi, [rsp+138h+var_60] lea rcx, [rsp+138h+var_80] call _ZN15SchemaConverter5visitERKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_; SchemaConverter::visit(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&,std::string const&) jmp short $+2 loc_1AAD5C: lea rdi, [rsp+138h+var_38] lea rsi, [rsp+138h+var_60] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_; std::vector<std::string>::push_back(std::string&&) jmp short $+2 loc_1AAD73: lea rdi, [rsp+138h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+138h+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+138h+var_D0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+138h+var_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, [rsp+138h+var_40] add rax, 1 mov [rsp+138h+var_40], rax jmp loc_1AAC8A mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax jmp loc_1AAF0E mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax jmp short loc_1AAE50 mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax jmp short loc_1AAE46 mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax jmp short loc_1AAE39 mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax lea rdi, [rsp+arg_D0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1AAE39: lea rdi, [rsp+arg_B0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1AAE46: lea rdi, [rsp+arg_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1AAE50: lea rdi, [rsp+arg_90]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_1AAF0E loc_1AAE62: lea rdi, [rsp+138h+var_F1] mov [rsp+138h+var_130], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rsp+138h+var_130] lea rsi, asc_213335+1; " | " lea rdi, [rsp+138h+var_F0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_1AAE89: mov rdi, [rsp+138h+var_110] lea rsi, [rsp+138h+var_38] lea rdx, [rsp+138h+var_F0] call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&) jmp short $+2 loc_1AAEA2: lea rdi, [rsp+138h+var_F0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+138h+var_F1] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rsp+138h+var_38] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rax, [rsp+138h+var_108] add rsp, 138h retn mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax jmp short loc_1AAF04 mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax lea rdi, [rsp+arg_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1AAF04: lea rdi, [rsp+arg_3F] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() loc_1AAF0E: lea rdi, [rsp+arg_F8] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, [rsp+arg_88] call __Unwind_Resume
long long SchemaConverter::_generate_union_rule(long long a1, _BYTE *a2, long long a3, _QWORD *a4) { long long v4; // rdx char v5; // al char *v6; // rdx long long v7; // rdx long long v8; // rcx long long v9; // r8 long long v10; // r9 long long v12; // [rsp+10h] [rbp-128h] long long v13; // [rsp+18h] [rbp-120h] unsigned long long v14; // [rsp+20h] [rbp-118h] long long v15; // [rsp+38h] [rbp-100h] char v16; // [rsp+47h] [rbp-F1h] BYREF _BYTE v17[32]; // [rsp+48h] [rbp-F0h] BYREF _BYTE v18[48]; // [rsp+68h] [rbp-D0h] BYREF int v19[8]; // [rsp+98h] [rbp-A0h] BYREF _BYTE v20[32]; // [rsp+B8h] [rbp-80h] BYREF _BYTE v21[32]; // [rsp+D8h] [rbp-60h] BYREF unsigned long long i; // [rsp+F8h] [rbp-40h] long long v23[3]; // [rsp+100h] [rbp-38h] BYREF _QWORD *v24; // [rsp+118h] [rbp-20h] long long v25; // [rsp+120h] [rbp-18h] _BYTE *v26; // [rsp+128h] [rbp-10h] long long v27; // [rsp+130h] [rbp-8h] v27 = a1; v26 = a2; v25 = a3; v24 = a4; v15 = (long long)a2; std::vector<std::string>::vector((long long)v23); for ( i = 0LL; ; ++i ) { v14 = i; if ( v14 >= 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>>::size(v24) ) break; v12 = 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>>::operator[]( v24, i); v13 = v25; v5 = std::string::empty(v25); v6 = "-"; if ( v5 ) v6 = "alternative-"; std::operator+<char>((long long)v19, v13, (long long)v6); std::to_string((std::__cxx11 *)v18, i); std::operator+<char>((long long)v20, (long long)v19, (long long)v18); SchemaConverter::visit((long long)v21, v15, v12, (long long)v20); a2 = v21; std::vector<std::string>::push_back((long long)v23, (long long)v21, v7, v8, v9, v10); std::string::~string(v21); std::string::~string(v20); std::string::~string(v18); std::string::~string(v19); } std::allocator<char>::allocator(&v16, a2, v4); std::string::basic_string<std::allocator<char>>((long long)v17, (long long)" | ", (long long)&v16); string_join(a1, v23, (long long)v17); std::string::~string(v17); std::allocator<char>::~allocator(&v16); std::vector<std::string>::~vector(v23); return a1; }
20,620
SchemaConverter::_generate_union_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<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>, std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>> const&)
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string _generate_union_rule(const std::string & name, const std::vector<json> & alt_schemas) { std::vector<std::string> rules; for (size_t i = 0; i < alt_schemas.size(); i++) { rules.push_back(visit(alt_schemas[i], name + (name.empty() ? "alternative-" : "-") + std::to_string(i))); } return string_join(rules, " | "); }
O2
cpp
SchemaConverter::_generate_union_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<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>, std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb8, %rsp movq %rcx, %r14 movq %rdx, 0x18(%rsp) movq %rsi, 0x10(%rsp) movq %rdi, 0x8(%rsp) xorps %xmm0, %xmm0 leaq 0x20(%rsp), %rax movaps %xmm0, (%rax) andq $0x0, 0x10(%rax) xorl %r13d, %r13d xorl %ebp, %ebp movq (%r14), %rbx movq 0x8(%r14), %rax subq %rbx, %rax sarq $0x4, %rax cmpq %rax, %rbp jae 0x8fc4d movq 0x18(%rsp), %rsi cmpq $0x0, 0x8(%rsi) leaq 0x1ece1(%rip), %rdx # 0xae899 leaq 0x27be4(%rip), %rax # 0xb77a3 cmoveq %rax, %rdx leaq 0x58(%rsp), %rdi callq 0x37977 leaq 0x78(%rsp), %r12 movq %r12, %rdi movq %rbp, %rsi callq 0x40e69 leaq 0x98(%rsp), %r15 movq %r15, %rdi leaq 0x58(%rsp), %rsi movq %r12, %rdx callq 0x389bb addq %r13, %rbx leaq 0x38(%rsp), %r12 movq %r12, %rdi movq 0x10(%rsp), %rsi movq %rbx, %rdx movq %r15, %rcx callq 0x8dcec leaq 0x20(%rsp), %rdi movq %r12, %rsi callq 0x3a210 movq %r12, %rdi callq 0x24158 movq %r15, %rdi callq 0x24158 leaq 0x78(%rsp), %rdi callq 0x24158 leaq 0x58(%rsp), %rdi callq 0x24158 incq %rbp addq $0x10, %r13 jmp 0x8fb90 leaq 0x27d06(%rip), %rsi # 0xb795a leaq 0x38(%rsp), %rdi leaq 0x98(%rsp), %rdx callq 0x25c26 leaq 0x20(%rsp), %rsi leaq 0x38(%rsp), %rdx movq 0x8(%rsp), %rbx movq %rbx, %rdi callq 0x5306a leaq 0x38(%rsp), %rdi callq 0x24158 leaq 0x20(%rsp), %rdi callq 0x26bfa movq %rbx, %rax addq $0xb8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x38(%rsp), %rdi jmp 0x8fcea jmp 0x8fcf1 movq %rax, %rbx leaq 0x38(%rsp), %rdi callq 0x24158 jmp 0x8fcc4 movq %rax, %rbx leaq 0x98(%rsp), %rdi callq 0x24158 jmp 0x8fcdb movq %rax, %rbx jmp 0x8fce5 movq %rax, %rbx leaq 0x78(%rsp), %rdi callq 0x24158 leaq 0x58(%rsp), %rdi callq 0x24158 jmp 0x8fcf4 movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x26bfa movq %rbx, %rdi callq 0x23f10
_ZN15SchemaConverter20_generate_union_ruleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapES8_S5_blmdSaNSA_14adl_serializerES8_IhSaIhEEvEESaISG_EE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0B8h mov r14, rcx mov [rsp+0E8h+var_D0], rdx mov [rsp+0E8h+var_D8], rsi mov [rsp+0E8h+var_E0], rdi xorps xmm0, xmm0 lea rax, [rsp+0E8h+var_C8] movaps xmmword ptr [rax], xmm0 and qword ptr [rax+10h], 0 xor r13d, r13d xor ebp, ebp loc_8FB90: mov rbx, [r14] mov rax, [r14+8] sub rax, rbx sar rax, 4 cmp rbp, rax jnb loc_8FC4D mov rsi, [rsp+0E8h+var_D0] cmp qword ptr [rsi+8], 0 lea rdx, asc_AE898+1; "-" lea rax, aAlternative; "alternative-" cmovz rdx, rax lea rdi, [rsp+0E8h+var_90] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) lea r12, [rsp+0E8h+var_70] mov rdi, r12; this mov rsi, rbp; unsigned __int64 call _ZNSt7__cxx119to_stringEm; std::to_string(ulong) lea r15, [rsp+0E8h+var_50] mov rdi, r15 lea rsi, [rsp+0E8h+var_90] mov rdx, r12 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) add rbx, r13 lea r12, [rsp+0E8h+var_B0] mov rdi, r12 mov rsi, [rsp+0E8h+var_D8] mov rdx, rbx mov rcx, r15 call _ZN15SchemaConverter5visitERKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_; SchemaConverter::visit(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&,std::string const&) lea rdi, [rsp+0E8h+var_C8] mov rsi, r12 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) mov rdi, r12; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r15; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0E8h+var_70]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0E8h+var_90]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() inc rbp add r13, 10h jmp loc_8FB90 loc_8FC4D: lea rsi, asc_B7959+1; " | " lea rdi, [rsp+0E8h+var_B0] lea rdx, [rsp+0E8h+var_50] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, [rsp+0E8h+var_C8] lea rdx, [rsp+0E8h+var_B0] mov rbx, [rsp+0E8h+var_E0] mov rdi, rbx call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&) lea rdi, [rsp+0E8h+var_B0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0E8h+var_C8] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rax, rbx add rsp, 0B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_30] jmp short loc_8FCEA jmp short loc_8FCF1 mov rbx, rax lea rdi, [rsp+arg_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_8FCC4 mov rbx, rax loc_8FCC4: lea rdi, [rsp+arg_90]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_8FCDB mov rbx, rax jmp short loc_8FCE5 mov rbx, rax loc_8FCDB: lea rdi, [rsp+arg_70]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_8FCE5: lea rdi, [rsp+arg_50]; void * loc_8FCEA: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_8FCF4 loc_8FCF1: mov rbx, rax loc_8FCF4: lea rdi, [rsp+arg_18] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, rbx call __Unwind_Resume
long long SchemaConverter::_generate_union_rule(long long a1, long long a2, long long a3, long long *a4) { long long v5; // r13 unsigned long long i; // rbp long long v7; // rbx char *v8; // rdx __int128 v11; // [rsp+20h] [rbp-C8h] BYREF long long v12; // [rsp+30h] [rbp-B8h] _QWORD v13[4]; // [rsp+38h] [rbp-B0h] BYREF _QWORD v14[4]; // [rsp+58h] [rbp-90h] BYREF _QWORD v15[4]; // [rsp+78h] [rbp-70h] BYREF _BYTE v16[80]; // [rsp+98h] [rbp-50h] BYREF v11 = 0LL; v12 = 0LL; v5 = 0LL; for ( i = 0LL; ; ++i ) { v7 = *a4; if ( i >= (a4[1] - *a4) >> 4 ) break; v8 = "-"; if ( !*(_QWORD *)(a3 + 8) ) v8 = "alternative-"; std::operator+<char>((long long)v14, a3, (long long)v8); std::to_string((std::__cxx11 *)v15, i); std::operator+<char>((long long)v16, v14, v15); SchemaConverter::visit(v13, a2, (unsigned __int8 *)(v5 + v7), (long long)v16, (__m128d)0LL); std::vector<std::string>::emplace_back<std::string>((long long)&v11, (long long)v13); std::string::~string(v13); std::string::~string(v16); std::string::~string(v15); std::string::~string(v14); v5 += 16LL; } std::string::basic_string<std::allocator<char>>(v13, (long long)" | "); string_join(a1, (long long *)&v11, (long long)v13); std::string::~string(v13); std::vector<std::string>::~vector((long long)&v11); return a1; }
_generate_union_rule: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xb8 MOV R14,RCX MOV qword ptr [RSP + 0x18],RDX MOV qword ptr [RSP + 0x10],RSI MOV qword ptr [RSP + 0x8],RDI XORPS XMM0,XMM0 LEA RAX,[RSP + 0x20] MOVAPS xmmword ptr [RAX],XMM0 AND qword ptr [RAX + 0x10],0x0 XOR R13D,R13D XOR EBP,EBP LAB_0018fb90: MOV RBX,qword ptr [R14] MOV RAX,qword ptr [R14 + 0x8] SUB RAX,RBX SAR RAX,0x4 CMP RBP,RAX JNC 0x0018fc4d MOV RSI,qword ptr [RSP + 0x18] CMP qword ptr [RSI + 0x8],0x0 LEA RDX,[0x1ae899] LEA RAX,[0x1b77a3] CMOVZ RDX,RAX LAB_0018fbc3: LEA RDI,[RSP + 0x58] CALL 0x00137977 LAB_0018fbcd: LEA R12,[RSP + 0x78] MOV RDI,R12 MOV RSI,RBP CALL 0x00140e69 LAB_0018fbdd: LEA R15,[RSP + 0x98] MOV RDI,R15 LEA RSI,[RSP + 0x58] MOV RDX,R12 CALL 0x001389bb LAB_0018fbf5: ADD RBX,R13 LEA R12,[RSP + 0x38] MOV RDI,R12 MOV RSI,qword ptr [RSP + 0x10] MOV RDX,RBX MOV RCX,R15 CALL 0x0018dcec LAB_0018fc10: LEA RDI,[RSP + 0x20] MOV RSI,R12 CALL 0x0013a210 MOV RDI,R12 CALL 0x00124158 MOV RDI,R15 CALL 0x00124158 LEA RDI,[RSP + 0x78] CALL 0x00124158 LEA RDI,[RSP + 0x58] CALL 0x00124158 INC RBP ADD R13,0x10 JMP 0x0018fb90 LAB_0018fc4d: LEA RSI,[0x1b795a] LEA RDI,[RSP + 0x38] LEA RDX,[RSP + 0x98] CALL 0x00125c26 LAB_0018fc66: LEA RSI,[RSP + 0x20] LEA RDX,[RSP + 0x38] MOV RBX,qword ptr [RSP + 0x8] MOV RDI,RBX CALL 0x0015306a LAB_0018fc7d: LEA RDI,[RSP + 0x38] CALL 0x00124158 LEA RDI,[RSP + 0x20] CALL 0x00126bfa MOV RAX,RBX ADD RSP,0xb8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* SchemaConverter::_generate_union_rule(std::__cxx11::string const&, 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> > > const&) */ string * SchemaConverter::_generate_union_rule(string *param_1,vector *param_2) { long *in_RCX; char *in_RDX; ulong uVar1; int8 local_c8; int8 uStack_c0; int8 local_b8; string local_b0 [32]; string local_90 [32]; __cxx11 local_70 [32]; string local_50 [32]; local_c8 = 0; uStack_c0 = 0; local_b8 = 0; for (uVar1 = 0; uVar1 < (ulong)(in_RCX[1] - *in_RCX >> 4); uVar1 = uVar1 + 1) { /* try { // try from 0018fbc3 to 0018fbcc has its CatchHandler @ 0018fcf1 */ std::operator+(local_90,in_RDX); /* try { // try from 0018fbcd to 0018fbdc has its CatchHandler @ 0018fcd3 */ std::__cxx11::to_string(local_70,uVar1); /* try { // try from 0018fbdd to 0018fbf4 has its CatchHandler @ 0018fcd8 */ std::operator+(local_50,local_90); /* try { // try from 0018fbf5 to 0018fc0f has its CatchHandler @ 0018fcc1 */ visit(local_b0,(string *)param_2); /* try { // try from 0018fc10 to 0018fc1c has its CatchHandler @ 0018fcb2 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_c8, local_b0); std::__cxx11::string::~string(local_b0); std::__cxx11::string::~string(local_50); std::__cxx11::string::~string((string *)local_70); std::__cxx11::string::~string(local_90); } /* try { // try from 0018fc4d to 0018fc65 has its CatchHandler @ 0018fcb0 */ std::__cxx11::string::string<std::allocator<char>>(local_b0," | ",(allocator *)local_50); /* try { // try from 0018fc66 to 0018fc7c has its CatchHandler @ 0018fca6 */ string_join((vector *)param_1,(string *)&local_c8); std::__cxx11::string::~string(local_b0); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_c8); return param_1; }
20,621
LefDefParser::lefwBusBitChars(char const*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwBusBitChars(const char *busBitChars) { if (!lefwFile) return LEFW_UNINITIALIZED; if (!lefwDidInit) return LEFW_BAD_ORDER; if (lefwState != LEFW_INIT && lefwState < LEFW_END) return LEFW_BAD_ORDER; // not of the ENDs if (lefwSynArray[LEFW_BUSBITCHARS]) return LEFW_ALREADY_DEFINED; if (busBitChars && busBitChars != 0 && *busBitChars != 0) { if (lefwWriteEncrypt) encPrint(lefwFile, (char*) "BUSBITCHARS \"%s\" ;\n", busBitChars); else fprintf(lefwFile, "BUSBITCHARS \"%s\" ;\n", busBitChars); } lefwLines++; lefwSynArray[LEFW_BUSBITCHARS] = 1; return LEFW_OK; }
O0
cpp
LefDefParser::lefwBusBitChars(char const*): subq $0x18, %rsp movq %rdi, 0x8(%rsp) leaq 0xacbf0(%rip), %rax # 0xc5250 cmpq $0x0, (%rax) jne 0x18673 movl $0x1, 0x14(%rsp) jmp 0x1875a leaq 0xace2a(%rip), %rax # 0xc54a4 cmpl $0x0, (%rax) jne 0x1868c movl $0x2, 0x14(%rsp) jmp 0x1875a leaq 0xace0d(%rip), %rax # 0xc54a0 cmpl $0x1, (%rax) je 0x186b1 leaq 0xace01(%rip), %rax # 0xc54a0 cmpl $0x4f, (%rax) jge 0x186b1 movl $0x2, 0x14(%rsp) jmp 0x1875a leaq 0xacba8(%rip), %rax # 0xc5260 cmpl $0x0, 0x54(%rax) je 0x186cb movl $0x4, 0x14(%rsp) jmp 0x1875a cmpq $0x0, 0x8(%rsp) je 0x1872f cmpq $0x0, 0x8(%rsp) je 0x1872f movq 0x8(%rsp), %rax movsbl (%rax), %eax cmpl $0x0, %eax je 0x1872f cmpl $0x0, 0xace4d(%rip) # 0xc553c je 0x18710 leaq 0xacb58(%rip), %rax # 0xc5250 movq (%rax), %rdi movq 0x8(%rsp), %rdx leaq 0x7a0ed(%rip), %rsi # 0x927f4 movb $0x0, %al callq 0x8bf50 jmp 0x1872d leaq 0xacb39(%rip), %rax # 0xc5250 movq (%rax), %rdi movq 0x8(%rsp), %rdx leaq 0x7a0ce(%rip), %rsi # 0x927f4 movb $0x0, %al callq 0x2370 jmp 0x1872f leaq 0xacd66(%rip), %rax # 0xc549c movl (%rax), %ecx addl $0x1, %ecx leaq 0xacd5a(%rip), %rax # 0xc549c movl %ecx, (%rax) leaq 0xacb15(%rip), %rax # 0xc5260 movl $0x1, 0x54(%rax) movl $0x0, 0x14(%rsp) movl 0x14(%rsp), %eax addq $0x18, %rsp retq nopw %cs:(%rax,%rax)
_ZN12LefDefParser15lefwBusBitCharsEPKc: sub rsp, 18h mov [rsp+18h+var_10], rdi lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile cmp qword ptr [rax], 0 jnz short loc_18673 mov [rsp+18h+var_4], 1 jmp loc_1875A loc_18673: lea rax, _ZN12LefDefParser11lefwDidInitE; LefDefParser::lefwDidInit cmp dword ptr [rax], 0 jnz short loc_1868C mov [rsp+18h+var_4], 2 jmp loc_1875A loc_1868C: lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 1 jz short loc_186B1 lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 4Fh ; 'O' jge short loc_186B1 mov [rsp+18h+var_4], 2 jmp loc_1875A loc_186B1: lea rax, _ZN12LefDefParser12lefwSynArrayE; LefDefParser::lefwSynArray cmp dword ptr [rax+54h], 0 jz short loc_186CB mov [rsp+18h+var_4], 4 jmp loc_1875A loc_186CB: cmp [rsp+18h+var_10], 0 jz short loc_1872F cmp [rsp+18h+var_10], 0 jz short loc_1872F mov rax, [rsp+18h+var_10] movsx eax, byte ptr [rax] cmp eax, 0 jz short loc_1872F cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt jz short loc_18710 lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] mov rdx, [rsp+18h+var_10] lea rsi, aBusbitcharsS; "BUSBITCHARS \"%s\" ;\n" mov al, 0 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_1872D loc_18710: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] mov rdx, [rsp+18h+var_10] lea rsi, aBusbitcharsS; "BUSBITCHARS \"%s\" ;\n" mov al, 0 call _fprintf loc_1872D: jmp short $+2 loc_1872F: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov [rax], ecx lea rax, _ZN12LefDefParser12lefwSynArrayE; LefDefParser::lefwSynArray mov dword ptr [rax+54h], 1 mov [rsp+18h+var_4], 0 loc_1875A: mov eax, [rsp+18h+var_4] add rsp, 18h retn
long long LefDefParser::lefwBusBitChars( LefDefParser *this, const char *a2, long long a3, int a4, int a5, int a6) { if ( *(_QWORD *)&LefDefParser::lefwFile ) { if ( LefDefParser::lefwDidInit ) { if ( LefDefParser::lefwState == 1 || LefDefParser::lefwState >= 79 ) { if ( LefDefParser::lefwSynArray[21] ) { return 4; } else { if ( this && *(_BYTE *)this ) { if ( LefDefParser::lefwWriteEncrypt ) LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)"BUSBITCHARS \"%s\" ;\n", (_DWORD)this, a4, a5, a6); else fprintf(*(_QWORD *)&LefDefParser::lefwFile, "BUSBITCHARS \"%s\" ;\n", (const char *)this); } ++LefDefParser::lefwLines; LefDefParser::lefwSynArray[21] = 1; return 0; } } else { return 2; } } else { return 2; } } else { return 1; } }
lefwBusBitChars: SUB RSP,0x18 MOV qword ptr [RSP + 0x8],RDI LEA RAX,[0x1c5250] CMP qword ptr [RAX],0x0 JNZ 0x00118673 MOV dword ptr [RSP + 0x14],0x1 JMP 0x0011875a LAB_00118673: LEA RAX,[0x1c54a4] CMP dword ptr [RAX],0x0 JNZ 0x0011868c MOV dword ptr [RSP + 0x14],0x2 JMP 0x0011875a LAB_0011868c: LEA RAX,[0x1c54a0] CMP dword ptr [RAX],0x1 JZ 0x001186b1 LEA RAX,[0x1c54a0] CMP dword ptr [RAX],0x4f JGE 0x001186b1 MOV dword ptr [RSP + 0x14],0x2 JMP 0x0011875a LAB_001186b1: LEA RAX,[0x1c5260] CMP dword ptr [RAX + 0x54],0x0 JZ 0x001186cb MOV dword ptr [RSP + 0x14],0x4 JMP 0x0011875a LAB_001186cb: CMP qword ptr [RSP + 0x8],0x0 JZ 0x0011872f CMP qword ptr [RSP + 0x8],0x0 JZ 0x0011872f MOV RAX,qword ptr [RSP + 0x8] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JZ 0x0011872f CMP dword ptr [0x001c553c],0x0 JZ 0x00118710 LEA RAX,[0x1c5250] MOV RDI,qword ptr [RAX] MOV RDX,qword ptr [RSP + 0x8] LEA RSI,[0x1927f4] MOV AL,0x0 CALL 0x0018bf50 JMP 0x0011872d LAB_00118710: LEA RAX,[0x1c5250] MOV RDI,qword ptr [RAX] MOV RDX,qword ptr [RSP + 0x8] LEA RSI,[0x1927f4] MOV AL,0x0 CALL 0x00102370 LAB_0011872d: JMP 0x0011872f LAB_0011872f: LEA RAX,[0x1c549c] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x1c549c] MOV dword ptr [RAX],ECX LEA RAX,[0x1c5260] MOV dword ptr [RAX + 0x54],0x1 MOV dword ptr [RSP + 0x14],0x0 LAB_0011875a: MOV EAX,dword ptr [RSP + 0x14] ADD RSP,0x18 RET
/* LefDefParser::lefwBusBitChars(char const*) */ int4 LefDefParser::lefwBusBitChars(char *param_1) { int4 local_4; if (lefwFile == (_IO_FILE *)0x0) { local_4 = 1; } else if (lefwDidInit == 0) { local_4 = 2; } else if ((lefwState == 1) || (0x4e < lefwState)) { if (lefwSynArray._84_4_ == 0) { if (((param_1 != (char *)0x0) && (param_1 != (char *)0x0)) && (*param_1 != '\0')) { if (lefwWriteEncrypt == 0) { fprintf(lefwFile,"BUSBITCHARS \"%s\" ;\n",param_1); } else { encPrint(lefwFile,"BUSBITCHARS \"%s\" ;\n",param_1); } } lefwLines = lefwLines + 1; lefwSynArray._84_4_ = 1; local_4 = 0; } else { local_4 = 4; } } else { local_4 = 2; } return local_4; }
20,622
LefDefParser::lefwBusBitChars(char const*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwBusBitChars(const char *busBitChars) { if (!lefwFile) return LEFW_UNINITIALIZED; if (!lefwDidInit) return LEFW_BAD_ORDER; if (lefwState != LEFW_INIT && lefwState < LEFW_END) return LEFW_BAD_ORDER; // not of the ENDs if (lefwSynArray[LEFW_BUSBITCHARS]) return LEFW_ALREADY_DEFINED; if (busBitChars && busBitChars != 0 && *busBitChars != 0) { if (lefwWriteEncrypt) encPrint(lefwFile, (char*) "BUSBITCHARS \"%s\" ;\n", busBitChars); else fprintf(lefwFile, "BUSBITCHARS \"%s\" ;\n", busBitChars); } lefwLines++; lefwSynArray[LEFW_BUSBITCHARS] = 1; return LEFW_OK; }
O3
cpp
LefDefParser::lefwBusBitChars(char const*): pushq %rbx movq %rdi, %rdx leaq 0x7cda7(%rip), %rax # 0x8d0f0 movq (%rax), %rdi testq %rdi, %rdi je 0x103b2 leaq 0x7cfec(%rip), %rcx # 0x8d344 movl $0x2, %eax cmpl $0x0, (%rcx) je 0x103b7 leaq 0x7cfd7(%rip), %rcx # 0x8d340 movl (%rcx), %ecx cmpl $0x1, %ecx setne %sil cmpl $0x4f, %ecx setl %cl testb %cl, %sil jne 0x103b7 leaq 0x7cd7c(%rip), %rbx # 0x8d100 movl $0x4, %eax cmpl $0x0, 0x54(%rbx) jne 0x103b7 testq %rdx, %rdx je 0x103c7 cmpb $0x0, (%rdx) je 0x103c7 cmpb $0x1, 0x7d03c(%rip) # 0x8d3dc jne 0x103b9 leaq 0x4a433(%rip), %rsi # 0x5a7dc xorl %eax, %eax callq 0x55afd jmp 0x103c7 movl $0x1, %eax popq %rbx retq leaq 0x4a41c(%rip), %rsi # 0x5a7dc xorl %eax, %eax callq 0x22e0 leaq 0x7cf6e(%rip), %rax # 0x8d33c incl (%rax) movl $0x1, 0x54(%rbx) xorl %eax, %eax jmp 0x103b7
_ZN12LefDefParser15lefwBusBitCharsEPKc: push rbx mov rdx, rdi lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] test rdi, rdi jz short loc_103B2 lea rcx, _ZN12LefDefParser11lefwDidInitE; LefDefParser::lefwDidInit mov eax, 2 cmp dword ptr [rcx], 0 jz short loc_103B7 lea rcx, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov ecx, [rcx] cmp ecx, 1 setnz sil cmp ecx, 4Fh ; 'O' setl cl test sil, cl jnz short loc_103B7 lea rbx, _ZN12LefDefParser12lefwSynArrayE; LefDefParser::lefwSynArray mov eax, 4 cmp dword ptr [rbx+54h], 0 jnz short loc_103B7 test rdx, rdx jz short loc_103C7 cmp byte ptr [rdx], 0 jz short loc_103C7 cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt jnz short loc_103B9 lea rsi, aBusbitcharsS; "BUSBITCHARS \"%s\" ;\n" xor eax, eax call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_103C7 loc_103B2: mov eax, 1 loc_103B7: pop rbx retn loc_103B9: lea rsi, aBusbitcharsS; "BUSBITCHARS \"%s\" ;\n" xor eax, eax call _fprintf loc_103C7: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines inc dword ptr [rax] mov dword ptr [rbx+54h], 1 xor eax, eax jmp short loc_103B7
long long LefDefParser::lefwBusBitChars( LefDefParser *this, const char *a2, long long a3, long long a4, int a5, int a6) { long long result; // rax int v7; // ecx if ( !*(_QWORD *)&LefDefParser::lefwFile ) return 1LL; result = 2LL; if ( LefDefParser::lefwDidInit ) { v7 = LefDefParser::lefwState; if ( LefDefParser::lefwState >= 79 || LefDefParser::lefwState == 1 ) { result = 4LL; if ( !LefDefParser::lefwSynArray[21] ) { if ( this && *(_BYTE *)this ) { if ( LefDefParser::lefwWriteEncrypt == 1 ) { LOBYTE(v7) = LefDefParser::lefwState < 79; LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)"BUSBITCHARS \"%s\" ;\n", (_DWORD)this, v7, a5, a6); } else { fprintf(*(_QWORD *)&LefDefParser::lefwFile, "BUSBITCHARS \"%s\" ;\n", (const char *)this); } } ++LefDefParser::lefwLines; LefDefParser::lefwSynArray[21] = 1; return 0LL; } } } return result; }
lefwBusBitChars: PUSH RBX MOV RDX,RDI LEA RAX,[0x18d0f0] MOV RDI,qword ptr [RAX] TEST RDI,RDI JZ 0x001103b2 LEA RCX,[0x18d344] MOV EAX,0x2 CMP dword ptr [RCX],0x0 JZ 0x001103b7 LEA RCX,[0x18d340] MOV ECX,dword ptr [RCX] CMP ECX,0x1 SETNZ SIL CMP ECX,0x4f SETL CL TEST SIL,CL JNZ 0x001103b7 LEA RBX,[0x18d100] MOV EAX,0x4 CMP dword ptr [RBX + 0x54],0x0 JNZ 0x001103b7 TEST RDX,RDX JZ 0x001103c7 CMP byte ptr [RDX],0x0 JZ 0x001103c7 CMP byte ptr [0x0018d3dc],0x1 JNZ 0x001103b9 LEA RSI,[0x15a7dc] XOR EAX,EAX CALL 0x00155afd JMP 0x001103c7 LAB_001103b2: MOV EAX,0x1 LAB_001103b7: POP RBX RET LAB_001103b9: LEA RSI,[0x15a7dc] XOR EAX,EAX CALL 0x001022e0 LAB_001103c7: LEA RAX,[0x18d33c] INC dword ptr [RAX] MOV dword ptr [RBX + 0x54],0x1 XOR EAX,EAX JMP 0x001103b7
/* LefDefParser::lefwBusBitChars(char const*) */ int8 LefDefParser::lefwBusBitChars(char *param_1) { int8 uVar1; if (lefwFile == (_IO_FILE *)0x0) { uVar1 = 1; } else { uVar1 = 2; if (lefwDidInit != 0) { if ((lefwState == 1 || 0x4e < lefwState) && (uVar1 = 4, lefwSynArray._84_4_ == 0)) { if ((param_1 != (char *)0x0) && (*param_1 != '\0')) { if (lefwWriteEncrypt == '\x01') { encPrint(lefwFile,"BUSBITCHARS \"%s\" ;\n"); } else { fprintf(lefwFile,"BUSBITCHARS \"%s\" ;\n"); } } lefwLines = lefwLines + 1; lefwSynArray._84_4_ = 1; uVar1 = 0; } } } return uVar1; }
20,623
my_thread_init_common_mutex
eloqsql/mysys/my_thr_init.c
static void my_thread_init_common_mutex(void) { mysql_mutex_init(key_THR_LOCK_open, &THR_LOCK_open, MY_MUTEX_INIT_FAST); mysql_mutex_init(key_THR_LOCK_lock, &THR_LOCK_lock, MY_MUTEX_INIT_FAST); mysql_mutex_init(key_THR_LOCK_myisam, &THR_LOCK_myisam, MY_MUTEX_INIT_SLOW); mysql_mutex_init(key_THR_LOCK_myisam_mmap, &THR_LOCK_myisam_mmap, MY_MUTEX_INIT_FAST); mysql_mutex_init(key_THR_LOCK_heap, &THR_LOCK_heap, MY_MUTEX_INIT_FAST); mysql_mutex_init(key_THR_LOCK_net, &THR_LOCK_net, MY_MUTEX_INIT_FAST); mysql_mutex_init(key_THR_LOCK_charset, &THR_LOCK_charset, MY_MUTEX_INIT_FAST); #if !defined(HAVE_LOCALTIME_R) || !defined(HAVE_GMTIME_R) mysql_mutex_init(key_LOCK_localtime_r, &LOCK_localtime_r, MY_MUTEX_INIT_SLOW); #endif }
O3
c
my_thread_init_common_mutex: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax leaq 0x34176d(%rip), %rax # 0x36d538 movl (%rax), %edi leaq 0x2cb094(%rip), %r15 # 0x2f6e68 movq (%r15), %rax leaq 0x342142(%rip), %r14 # 0x36df20 movq %r14, %rsi callq *0x40(%rax) movq %rax, 0x40(%r14) movq %r14, 0x38(%r14) xorps %xmm0, %xmm0 movups %xmm0, 0x28(%r14) leaq 0x3423f5(%rip), %rbx # 0x36e1f0 movq %r14, %rdi movq %rbx, %rsi callq 0x24580 leaq 0x341717(%rip), %rax # 0x36d524 movl (%rax), %edi movq (%r15), %rax leaq 0x34214f(%rip), %r14 # 0x36df68 movq %r14, %rsi callq *0x40(%rax) movq %rax, 0x40(%r14) movq %r14, 0x38(%r14) xorps %xmm0, %xmm0 movups %xmm0, 0x28(%r14) movq %r14, %rdi movq %rbx, %rsi callq 0x24580 leaq 0x3416ef(%rip), %rax # 0x36d530 movl (%rax), %edi movq (%r15), %rax leaq 0x342163(%rip), %r14 # 0x36dfb0 movq %r14, %rsi callq *0x40(%rax) movq %rax, 0x40(%r14) movq %r14, 0x38(%r14) xorps %xmm0, %xmm0 movups %xmm0, 0x28(%r14) movq %r14, %rdi xorl %esi, %esi callq 0x24580 leaq 0x3416d0(%rip), %rax # 0x36d544 movl (%rax), %edi movq (%r15), %rax leaq 0x342178(%rip), %r14 # 0x36dff8 movq %r14, %rsi callq *0x40(%rax) movq %rax, 0x40(%r14) movq %r14, 0x38(%r14) xorps %xmm0, %xmm0 movups %xmm0, 0x28(%r14) movq %r14, %rdi movq %rbx, %rsi callq 0x24580 leaq 0x341678(%rip), %rax # 0x36d520 movl (%rax), %edi movq (%r15), %rax leaq 0x34218c(%rip), %r14 # 0x36e040 movq %r14, %rsi callq *0x40(%rax) movq %rax, 0x40(%r14) movq %r14, 0x38(%r14) xorps %xmm0, %xmm0 movups %xmm0, 0x28(%r14) movq %r14, %rdi movq %rbx, %rsi callq 0x24580 leaq 0x341658(%rip), %rax # 0x36d534 movl (%rax), %edi movq (%r15), %rax leaq 0x3421a0(%rip), %r14 # 0x36e088 movq %r14, %rsi callq *0x40(%rax) movq %rax, 0x40(%r14) movq %r14, 0x38(%r14) xorps %xmm0, %xmm0 movups %xmm0, 0x28(%r14) movq %r14, %rdi movq %rbx, %rsi callq 0x24580 leaq 0x34160c(%rip), %rax # 0x36d51c movl (%rax), %edi movq (%r15), %rax leaq 0x3421b4(%rip), %r14 # 0x36e0d0 movq %r14, %rsi callq *0x40(%rax) movq %rax, 0x40(%r14) movq %r14, 0x38(%r14) xorps %xmm0, %xmm0 movups %xmm0, 0x28(%r14) movq %r14, %rdi movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x24580
my_thread_init_common_mutex: push rbp mov rbp, rsp push r15 push r14 push rbx push rax lea rax, key_THR_LOCK_open mov edi, [rax] lea r15, PSI_server mov rax, [r15] lea r14, THR_LOCK_open mov rsi, r14 call qword ptr [rax+40h] mov [r14+40h], rax mov [r14+38h], r14 xorps xmm0, xmm0 movups xmmword ptr [r14+28h], xmm0 lea rbx, my_fast_mutexattr mov rdi, r14 mov rsi, rbx call _pthread_mutex_init lea rax, key_THR_LOCK_lock mov edi, [rax] mov rax, [r15] lea r14, THR_LOCK_lock mov rsi, r14 call qword ptr [rax+40h] mov [r14+40h], rax mov [r14+38h], r14 xorps xmm0, xmm0 movups xmmword ptr [r14+28h], xmm0 mov rdi, r14 mov rsi, rbx call _pthread_mutex_init lea rax, key_THR_LOCK_myisam mov edi, [rax] mov rax, [r15] lea r14, THR_LOCK_myisam mov rsi, r14 call qword ptr [rax+40h] mov [r14+40h], rax mov [r14+38h], r14 xorps xmm0, xmm0 movups xmmword ptr [r14+28h], xmm0 mov rdi, r14 xor esi, esi call _pthread_mutex_init lea rax, key_THR_LOCK_myisam_mmap mov edi, [rax] mov rax, [r15] lea r14, THR_LOCK_myisam_mmap mov rsi, r14 call qword ptr [rax+40h] mov [r14+40h], rax mov [r14+38h], r14 xorps xmm0, xmm0 movups xmmword ptr [r14+28h], xmm0 mov rdi, r14 mov rsi, rbx call _pthread_mutex_init lea rax, key_THR_LOCK_heap mov edi, [rax] mov rax, [r15] lea r14, THR_LOCK_heap mov rsi, r14 call qword ptr [rax+40h] mov [r14+40h], rax mov [r14+38h], r14 xorps xmm0, xmm0 movups xmmword ptr [r14+28h], xmm0 mov rdi, r14 mov rsi, rbx call _pthread_mutex_init lea rax, key_THR_LOCK_net mov edi, [rax] mov rax, [r15] lea r14, THR_LOCK_net mov rsi, r14 call qword ptr [rax+40h] mov [r14+40h], rax mov [r14+38h], r14 xorps xmm0, xmm0 movups xmmword ptr [r14+28h], xmm0 mov rdi, r14 mov rsi, rbx call _pthread_mutex_init lea rax, key_THR_LOCK_charset mov edi, [rax] mov rax, [r15] lea r14, THR_LOCK_charset mov rsi, r14 call qword ptr [rax+40h] mov [r14+40h], rax mov [r14+38h], r14 xorps xmm0, xmm0 movups xmmword ptr [r14+28h], xmm0 mov rdi, r14 mov rsi, rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _pthread_mutex_init
long long my_thread_init_common_mutex() { THR_LOCK_open[8] = (*((long long ( **)(_QWORD, _QWORD *))PSI_server[0] + 8))(key_THR_LOCK_open, THR_LOCK_open); THR_LOCK_open[7] = THR_LOCK_open; *(_OWORD *)&THR_LOCK_open[5] = 0LL; pthread_mutex_init(THR_LOCK_open, &my_fast_mutexattr); THR_LOCK_lock[8] = (*((long long ( **)(_QWORD, _QWORD *))PSI_server[0] + 8))(key_THR_LOCK_lock, THR_LOCK_lock); THR_LOCK_lock[7] = THR_LOCK_lock; *(_OWORD *)&THR_LOCK_lock[5] = 0LL; pthread_mutex_init(THR_LOCK_lock, &my_fast_mutexattr); THR_LOCK_myisam[8] = (*((long long ( **)(_QWORD, _QWORD *))PSI_server[0] + 8))( key_THR_LOCK_myisam, THR_LOCK_myisam); THR_LOCK_myisam[7] = THR_LOCK_myisam; *(_OWORD *)&THR_LOCK_myisam[5] = 0LL; pthread_mutex_init(THR_LOCK_myisam, 0LL); THR_LOCK_myisam_mmap[8] = (*((long long ( **)(_QWORD, _QWORD *))PSI_server[0] + 8))( key_THR_LOCK_myisam_mmap, THR_LOCK_myisam_mmap); THR_LOCK_myisam_mmap[7] = THR_LOCK_myisam_mmap; *(_OWORD *)&THR_LOCK_myisam_mmap[5] = 0LL; pthread_mutex_init(THR_LOCK_myisam_mmap, &my_fast_mutexattr); THR_LOCK_heap[8] = (*((long long ( **)(_QWORD, _QWORD *))PSI_server[0] + 8))(key_THR_LOCK_heap, THR_LOCK_heap); THR_LOCK_heap[7] = THR_LOCK_heap; *(_OWORD *)&THR_LOCK_heap[5] = 0LL; pthread_mutex_init(THR_LOCK_heap, &my_fast_mutexattr); THR_LOCK_net[8] = (*((long long ( **)(_QWORD, _QWORD *))PSI_server[0] + 8))(key_THR_LOCK_net, THR_LOCK_net); THR_LOCK_net[7] = THR_LOCK_net; *(_OWORD *)&THR_LOCK_net[5] = 0LL; pthread_mutex_init(THR_LOCK_net, &my_fast_mutexattr); THR_LOCK_charset[8] = (*((long long ( **)(_QWORD, _QWORD *))PSI_server[0] + 8))( key_THR_LOCK_charset, THR_LOCK_charset); THR_LOCK_charset[7] = THR_LOCK_charset; *(_OWORD *)&THR_LOCK_charset[5] = 0LL; return pthread_mutex_init(THR_LOCK_charset, &my_fast_mutexattr); }
my_thread_init_common_mutex: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX LEA RAX,[0x46d538] MOV EDI,dword ptr [RAX] LEA R15,[0x3f6e68] MOV RAX,qword ptr [R15] LEA R14,[0x46df20] MOV RSI,R14 CALL qword ptr [RAX + 0x40] MOV qword ptr [R14 + 0x40],RAX MOV qword ptr [R14 + 0x38],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0x28],XMM0 LEA RBX,[0x46e1f0] MOV RDI,R14 MOV RSI,RBX CALL 0x00124580 LEA RAX,[0x46d524] MOV EDI,dword ptr [RAX] MOV RAX,qword ptr [R15] LEA R14,[0x46df68] MOV RSI,R14 CALL qword ptr [RAX + 0x40] MOV qword ptr [R14 + 0x40],RAX MOV qword ptr [R14 + 0x38],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0x28],XMM0 MOV RDI,R14 MOV RSI,RBX CALL 0x00124580 LEA RAX,[0x46d530] MOV EDI,dword ptr [RAX] MOV RAX,qword ptr [R15] LEA R14,[0x46dfb0] MOV RSI,R14 CALL qword ptr [RAX + 0x40] MOV qword ptr [R14 + 0x40],RAX MOV qword ptr [R14 + 0x38],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0x28],XMM0 MOV RDI,R14 XOR ESI,ESI CALL 0x00124580 LEA RAX,[0x46d544] MOV EDI,dword ptr [RAX] MOV RAX,qword ptr [R15] LEA R14,[0x46dff8] MOV RSI,R14 CALL qword ptr [RAX + 0x40] MOV qword ptr [R14 + 0x40],RAX MOV qword ptr [R14 + 0x38],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0x28],XMM0 MOV RDI,R14 MOV RSI,RBX CALL 0x00124580 LEA RAX,[0x46d520] MOV EDI,dword ptr [RAX] MOV RAX,qword ptr [R15] LEA R14,[0x46e040] MOV RSI,R14 CALL qword ptr [RAX + 0x40] MOV qword ptr [R14 + 0x40],RAX MOV qword ptr [R14 + 0x38],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0x28],XMM0 MOV RDI,R14 MOV RSI,RBX CALL 0x00124580 LEA RAX,[0x46d534] MOV EDI,dword ptr [RAX] MOV RAX,qword ptr [R15] LEA R14,[0x46e088] MOV RSI,R14 CALL qword ptr [RAX + 0x40] MOV qword ptr [R14 + 0x40],RAX MOV qword ptr [R14 + 0x38],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0x28],XMM0 MOV RDI,R14 MOV RSI,RBX CALL 0x00124580 LEA RAX,[0x46d51c] MOV EDI,dword ptr [RAX] MOV RAX,qword ptr [R15] LEA R14,[0x46e0d0] MOV RSI,R14 CALL qword ptr [RAX + 0x40] MOV qword ptr [R14 + 0x40],RAX MOV qword ptr [R14 + 0x38],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0x28],XMM0 MOV RDI,R14 MOV RSI,RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x00124580
void my_thread_init_common_mutex(void) { THR_LOCK_open._64_8_ = (**(code **)(PSI_server + 0x40))(key_THR_LOCK_open,THR_LOCK_open); THR_LOCK_open._56_8_ = THR_LOCK_open; THR_LOCK_open._40_8_ = 0; THR_LOCK_open._48_8_ = 0; pthread_mutex_init((pthread_mutex_t *)THR_LOCK_open,(pthread_mutexattr_t *)&my_fast_mutexattr); THR_LOCK_lock._64_8_ = (**(code **)(PSI_server + 0x40))(key_THR_LOCK_lock,THR_LOCK_lock); THR_LOCK_lock._56_8_ = THR_LOCK_lock; THR_LOCK_lock._40_8_ = 0; THR_LOCK_lock._48_8_ = 0; pthread_mutex_init((pthread_mutex_t *)THR_LOCK_lock,(pthread_mutexattr_t *)&my_fast_mutexattr); THR_LOCK_myisam._64_8_ = (**(code **)(PSI_server + 0x40))(key_THR_LOCK_myisam); THR_LOCK_myisam._56_8_ = THR_LOCK_myisam; THR_LOCK_myisam._40_8_ = 0; THR_LOCK_myisam._48_8_ = 0; pthread_mutex_init((pthread_mutex_t *)THR_LOCK_myisam,(pthread_mutexattr_t *)0x0); THR_LOCK_myisam_mmap._64_8_ = (**(code **)(PSI_server + 0x40))(key_THR_LOCK_myisam_mmap,THR_LOCK_myisam_mmap); THR_LOCK_myisam_mmap._56_8_ = THR_LOCK_myisam_mmap; THR_LOCK_myisam_mmap._40_8_ = 0; THR_LOCK_myisam_mmap._48_8_ = 0; pthread_mutex_init((pthread_mutex_t *)THR_LOCK_myisam_mmap, (pthread_mutexattr_t *)&my_fast_mutexattr); THR_LOCK_heap._64_8_ = (**(code **)(PSI_server + 0x40))(key_THR_LOCK_heap,THR_LOCK_heap); THR_LOCK_heap._56_8_ = THR_LOCK_heap; THR_LOCK_heap._40_8_ = 0; THR_LOCK_heap._48_8_ = 0; pthread_mutex_init((pthread_mutex_t *)THR_LOCK_heap,(pthread_mutexattr_t *)&my_fast_mutexattr); THR_LOCK_net._64_8_ = (**(code **)(PSI_server + 0x40))(key_THR_LOCK_net,THR_LOCK_net); THR_LOCK_net._56_8_ = THR_LOCK_net; THR_LOCK_net._40_8_ = 0; THR_LOCK_net._48_8_ = 0; pthread_mutex_init((pthread_mutex_t *)THR_LOCK_net,(pthread_mutexattr_t *)&my_fast_mutexattr); THR_LOCK_charset._64_8_ = (**(code **)(PSI_server + 0x40))(key_THR_LOCK_charset,THR_LOCK_charset); THR_LOCK_charset._56_8_ = THR_LOCK_charset; THR_LOCK_charset._40_8_ = 0; THR_LOCK_charset._48_8_ = 0; pthread_mutex_init((pthread_mutex_t *)THR_LOCK_charset,(pthread_mutexattr_t *)&my_fast_mutexattr); return; }
20,624
safe_hash_free
eloqsql/mysys/my_safehash.c
void safe_hash_free(SAFE_HASH *hash) { /* Test if safe_hash_init succeeded. This will also guard us against multiple free calls. */ if (hash->default_value) { my_hash_free(&hash->hash); mysql_rwlock_destroy(&hash->mutex); hash->default_value=0; } }
O3
c
safe_hash_free: cmpq $0x0, 0x108(%rdi) je 0xacbb5 pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx addq $0x98, %rdi callq 0x975cd movq 0x90(%rbx), %rdi testq %rdi, %rdi jne 0xacbb6 movq %rbx, %rdi callq 0xaa9c0 movq $0x0, 0x108(%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq leaq 0x2e269b(%rip), %rax # 0x38f258 movq (%rax), %rax callq *0x58(%rax) movq $0x0, 0x90(%rbx) jmp 0xacb9c
safe_hash_free: cmp qword ptr [rdi+108h], 0 jz short locret_ACBB5 push rbp mov rbp, rsp push rbx push rax mov rbx, rdi add rdi, 98h call my_hash_free mov rdi, [rbx+90h] test rdi, rdi jnz short loc_ACBB6 loc_ACB9C: mov rdi, rbx call my_rw_destroy mov qword ptr [rbx+108h], 0 add rsp, 8 pop rbx pop rbp locret_ACBB5: retn loc_ACBB6: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+58h] mov qword ptr [rbx+90h], 0 jmp short loc_ACB9C
long long safe_hash_free(long long a1) { long long v2; // rdi long long result; // rax if ( *(_QWORD *)(a1 + 264) ) { my_hash_free(a1 + 152); v2 = *(_QWORD *)(a1 + 144); if ( v2 ) { ((void ( *)(long long))PSI_server[11])(v2); *(_QWORD *)(a1 + 144) = 0LL; } result = my_rw_destroy(a1); *(_QWORD *)(a1 + 264) = 0LL; } return result; }
safe_hash_free: CMP qword ptr [RDI + 0x108],0x0 JZ 0x001acbb5 PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI ADD RDI,0x98 CALL 0x001975cd MOV RDI,qword ptr [RBX + 0x90] TEST RDI,RDI JNZ 0x001acbb6 LAB_001acb9c: MOV RDI,RBX CALL 0x001aa9c0 MOV qword ptr [RBX + 0x108],0x0 ADD RSP,0x8 POP RBX POP RBP LAB_001acbb5: RET LAB_001acbb6: LEA RAX,[0x48f258] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x58] MOV qword ptr [RBX + 0x90],0x0 JMP 0x001acb9c
void safe_hash_free(long param_1) { if (*(long *)(param_1 + 0x108) != 0) { my_hash_free(param_1 + 0x98); if (*(long *)(param_1 + 0x90) != 0) { (**(code **)(PSI_server + 0x58))(); *(int8 *)(param_1 + 0x90) = 0; } my_rw_destroy(param_1); *(int8 *)(param_1 + 0x108) = 0; } return; }
20,625
getsolparam
aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_core_constraint.c
static void getsolparam(const mjModel* m, const mjData* d, int i, mjtNum* solref, mjtNum* solreffriction, mjtNum* solimp) { // get constraint id int id = d->efc_id[i]; // clear solreffriction (applies only to contacts) mju_zero(solreffriction, mjNREF); // extract solver parameters from corresponding model element switch ((mjtConstraint) d->efc_type[i]) { case mjCNSTR_EQUALITY: mju_copy(solref, m->eq_solref+mjNREF*id, mjNREF); mju_copy(solimp, m->eq_solimp+mjNIMP*id, mjNIMP); break; case mjCNSTR_LIMIT_JOINT: mju_copy(solref, m->jnt_solref+mjNREF*id, mjNREF); mju_copy(solimp, m->jnt_solimp+mjNIMP*id, mjNIMP); break; case mjCNSTR_FRICTION_DOF: mju_copy(solref, m->dof_solref+mjNREF*id, mjNREF); mju_copy(solimp, m->dof_solimp+mjNIMP*id, mjNIMP); break; case mjCNSTR_LIMIT_TENDON: mju_copy(solref, m->tendon_solref_lim+mjNREF*id, mjNREF); mju_copy(solimp, m->tendon_solimp_lim+mjNIMP*id, mjNIMP); break; case mjCNSTR_FRICTION_TENDON: mju_copy(solref, m->tendon_solref_fri+mjNREF*id, mjNREF); mju_copy(solimp, m->tendon_solimp_fri+mjNIMP*id, mjNIMP); break; case mjCNSTR_CONTACT_FRICTIONLESS: case mjCNSTR_CONTACT_PYRAMIDAL: case mjCNSTR_CONTACT_ELLIPTIC: mju_copy(solref, d->contact[id].solref, mjNREF); mju_copy(solreffriction, d->contact[id].solreffriction, mjNREF); mju_copy(solimp, d->contact[id].solimp, mjNIMP); } // check reference format: standard or direct, cannot be mixed if ((solref[0] > 0) ^ (solref[1] > 0)) { mju_warning("mixed solref format, replacing with default"); mj_defaultSolRefImp(solref, NULL); } // integrator safety: impose ref[0]>=2*timestep for standard format if (!mjDISABLED(mjDSBL_REFSAFE) && solref[0] > 0) { solref[0] = mju_max(solref[0], 2*m->opt.timestep); } // check reference format: standard or direct, cannot be mixed if ((solreffriction[0] > 0) ^ (solreffriction[1] > 0)) { mju_warning("solreffriction values should have the same sign, replacing with default"); mju_zero(solreffriction, mjNREF); // default solreffriction is (0, 0) } // integrator safety: impose ref[0]>=2*timestep for standard format if (!mjDISABLED(mjDSBL_REFSAFE) && solreffriction[0] > 0) { solreffriction[0] = mju_max(solreffriction[0], 2*m->opt.timestep); } // enforce constraints on solimp solimp[0] = mju_min(mjMAXIMP, mju_max(mjMINIMP, solimp[0])); solimp[1] = mju_min(mjMAXIMP, mju_max(mjMINIMP, solimp[1])); solimp[2] = mju_max(0, solimp[2]); solimp[3] = mju_min(mjMAXIMP, mju_max(mjMINIMP, solimp[3])); solimp[4] = mju_max(1, solimp[4]); }
O0
c
getsolparam: subq $0x48, %rsp movq %rdi, 0x40(%rsp) movq %rsi, 0x38(%rsp) movl %edx, 0x34(%rsp) movq %rcx, 0x28(%rsp) movq %r8, 0x20(%rsp) movq %r9, 0x18(%rsp) movq 0x38(%rsp), %rax movq 0x27a68(%rax), %rax movslq 0x34(%rsp), %rcx movl (%rax,%rcx,4), %eax movl %eax, 0x14(%rsp) movq 0x20(%rsp), %rdi movl $0x2, %esi callq 0x493b0 movq 0x38(%rsp), %rax movq 0x27a60(%rax), %rax movslq 0x34(%rsp), %rcx movl (%rax,%rcx,4), %eax movq %rax, 0x8(%rsp) subq $0x7, %rax ja 0x74e0b movq 0x8(%rsp), %rax leaq 0x4d7b29(%rip), %rcx # 0x54c6e0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x28(%rsp), %rdi movq 0x40(%rsp), %rax movq 0xd58(%rax), %rsi movl 0x14(%rsp), %eax shll %eax cltq shlq $0x3, %rax addq %rax, %rsi movl $0x2, %edx callq 0x492d0 movq 0x18(%rsp), %rdi movq 0x40(%rsp), %rax movq 0xd60(%rax), %rsi imull $0x5, 0x14(%rsp), %eax cltq shlq $0x3, %rax addq %rax, %rsi movl $0x5, %edx callq 0x492d0 jmp 0x74e0b movq 0x28(%rsp), %rdi movq 0x40(%rsp), %rax movq 0x678(%rax), %rsi movl 0x14(%rsp), %eax shll %eax cltq shlq $0x3, %rax addq %rax, %rsi movl $0x2, %edx callq 0x492d0 movq 0x18(%rsp), %rdi movq 0x40(%rsp), %rax movq 0x680(%rax), %rsi imull $0x5, 0x14(%rsp), %eax cltq shlq $0x3, %rax addq %rax, %rsi movl $0x5, %edx callq 0x492d0 jmp 0x74e0b movq 0x28(%rsp), %rdi movq 0x40(%rsp), %rax movq 0x6f0(%rax), %rsi movl 0x14(%rsp), %eax shll %eax cltq shlq $0x3, %rax addq %rax, %rsi movl $0x2, %edx callq 0x492d0 movq 0x18(%rsp), %rdi movq 0x40(%rsp), %rax movq 0x6f8(%rax), %rsi imull $0x5, 0x14(%rsp), %eax cltq shlq $0x3, %rax addq %rax, %rsi movl $0x5, %edx callq 0x492d0 jmp 0x74e0b movq 0x28(%rsp), %rdi movq 0x40(%rsp), %rax movq 0xda0(%rax), %rsi movl 0x14(%rsp), %eax shll %eax cltq shlq $0x3, %rax addq %rax, %rsi movl $0x2, %edx callq 0x492d0 movq 0x18(%rsp), %rdi movq 0x40(%rsp), %rax movq 0xda8(%rax), %rsi imull $0x5, 0x14(%rsp), %eax cltq shlq $0x3, %rax addq %rax, %rsi movl $0x5, %edx callq 0x492d0 jmp 0x74e0b movq 0x28(%rsp), %rdi movq 0x40(%rsp), %rax movq 0xdb0(%rax), %rsi movl 0x14(%rsp), %eax shll %eax cltq shlq $0x3, %rax addq %rax, %rsi movl $0x2, %edx callq 0x492d0 movq 0x18(%rsp), %rdi movq 0x40(%rsp), %rax movq 0xdb8(%rax), %rsi imull $0x5, 0x14(%rsp), %eax cltq shlq $0x3, %rax addq %rax, %rsi movl $0x5, %edx callq 0x492d0 jmp 0x74e0b movq 0x28(%rsp), %rdi movq 0x38(%rsp), %rax movq 0x27a58(%rax), %rsi movslq 0x14(%rsp), %rax imulq $0x240, %rax, %rax # imm = 0x240 addq %rax, %rsi addq $0x98, %rsi movl $0x2, %edx callq 0x492d0 movq 0x20(%rsp), %rdi movq 0x38(%rsp), %rax movq 0x27a58(%rax), %rsi movslq 0x14(%rsp), %rax imulq $0x240, %rax, %rax # imm = 0x240 addq %rax, %rsi addq $0xa8, %rsi movl $0x2, %edx callq 0x492d0 movq 0x18(%rsp), %rdi movq 0x38(%rsp), %rax movq 0x27a58(%rax), %rsi movslq 0x14(%rsp), %rax imulq $0x240, %rax, %rax # imm = 0x240 addq %rax, %rsi addq $0xb8, %rsi movl $0x5, %edx callq 0x492d0 movq 0x28(%rsp), %rax vmovsd (%rax), %xmm0 vxorps %xmm1, %xmm1, %xmm1 vucomisd %xmm1, %xmm0 seta %al andb $0x1, %al movzbl %al, %eax movq 0x28(%rsp), %rcx vmovsd 0x8(%rcx), %xmm0 vxorps %xmm1, %xmm1, %xmm1 vucomisd %xmm1, %xmm0 seta %cl andb $0x1, %cl movzbl %cl, %ecx xorl %ecx, %eax cmpl $0x0, %eax je 0x74e62 leaq 0x4a3789(%rip), %rdi # 0x5185d6 movb $0x0, %al callq 0x493f0 movq 0x28(%rsp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x49870 movq 0x40(%rsp), %rax movl 0x258(%rax), %eax andl $0x800, %eax # imm = 0x800 cmpl $0x0, %eax jne 0x74eb6 movq 0x28(%rsp), %rax vmovsd (%rax), %xmm0 vxorps %xmm1, %xmm1, %xmm1 vucomisd %xmm1, %xmm0 jbe 0x74eb6 movq 0x28(%rsp), %rax vmovsd (%rax), %xmm0 movq 0x40(%rsp), %rax vmovsd 0x4a2ca0(%rip), %xmm1 # 0x517b40 vmulsd 0x140(%rax), %xmm1, %xmm1 callq 0x494b0 movq 0x28(%rsp), %rax vmovsd %xmm0, (%rax) movq 0x20(%rsp), %rax vmovsd (%rax), %xmm0 vxorps %xmm1, %xmm1, %xmm1 vucomisd %xmm1, %xmm0 seta %al andb $0x1, %al movzbl %al, %eax movq 0x20(%rsp), %rcx vmovsd 0x8(%rcx), %xmm0 vxorps %xmm1, %xmm1, %xmm1 vucomisd %xmm1, %xmm0 seta %cl andb $0x1, %cl movzbl %cl, %ecx xorl %ecx, %eax cmpl $0x0, %eax je 0x74f0e leaq 0x4a370a(%rip), %rdi # 0x518602 movb $0x0, %al callq 0x493f0 movq 0x20(%rsp), %rdi movl $0x2, %esi callq 0x493b0 movq 0x40(%rsp), %rax movl 0x258(%rax), %eax andl $0x800, %eax # imm = 0x800 cmpl $0x0, %eax jne 0x74f62 movq 0x20(%rsp), %rax vmovsd (%rax), %xmm0 vxorps %xmm1, %xmm1, %xmm1 vucomisd %xmm1, %xmm0 jbe 0x74f62 movq 0x20(%rsp), %rax vmovsd (%rax), %xmm0 movq 0x40(%rsp), %rax vmovsd 0x4a2bf4(%rip), %xmm1 # 0x517b40 vmulsd 0x140(%rax), %xmm1, %xmm1 callq 0x494b0 movq 0x20(%rsp), %rax vmovsd %xmm0, (%rax) movq 0x18(%rsp), %rax vmovsd (%rax), %xmm1 vmovsd 0x4a2c1d(%rip), %xmm0 # 0x517b90 callq 0x494b0 vmovaps %xmm0, %xmm1 vmovsd 0x4a2c9c(%rip), %xmm0 # 0x517c20 callq 0x49440 movq 0x18(%rsp), %rax vmovsd %xmm0, (%rax) movq 0x18(%rsp), %rax vmovsd 0x8(%rax), %xmm1 vmovsd 0x4a2bec(%rip), %xmm0 # 0x517b90 callq 0x494b0 vmovaps %xmm0, %xmm1 vmovsd 0x4a2c6b(%rip), %xmm0 # 0x517c20 callq 0x49440 movq 0x18(%rsp), %rax vmovsd %xmm0, 0x8(%rax) movq 0x18(%rsp), %rax vmovsd 0x10(%rax), %xmm1 vxorps %xmm0, %xmm0, %xmm0 callq 0x494b0 movq 0x18(%rsp), %rax vmovsd %xmm0, 0x10(%rax) movq 0x18(%rsp), %rax vmovsd 0x18(%rax), %xmm1 vmovsd 0x4a2b9d(%rip), %xmm0 # 0x517b90 callq 0x494b0 vmovaps %xmm0, %xmm1 vmovsd 0x4a2c1c(%rip), %xmm0 # 0x517c20 callq 0x49440 movq 0x18(%rsp), %rax vmovsd %xmm0, 0x18(%rax) movq 0x18(%rsp), %rax vmovsd 0x20(%rax), %xmm1 vmovsd 0x4a2b33(%rip), %xmm0 # 0x517b58 callq 0x494b0 movq 0x18(%rsp), %rax vmovsd %xmm0, 0x20(%rax) addq $0x48, %rsp retq nopl (%rax)
getsolparam: sub rsp, 48h mov [rsp+48h+var_8], rdi mov [rsp+48h+var_10], rsi mov [rsp+48h+var_14], edx mov [rsp+48h+var_20], rcx mov [rsp+48h+var_28], r8 mov [rsp+48h+var_30], r9 mov rax, [rsp+48h+var_10] mov rax, [rax+27A68h] movsxd rcx, [rsp+48h+var_14] mov eax, [rax+rcx*4] mov [rsp+48h+var_34], eax mov rdi, [rsp+48h+var_28] mov esi, 2 call _mju_zero mov rax, [rsp+48h+var_10] mov rax, [rax+27A60h] movsxd rcx, [rsp+48h+var_14] mov eax, [rax+rcx*4] mov [rsp+48h+var_40], rax sub rax, 7; switch 8 cases ja def_74BBE; jumptable 0000000000074BBE default case mov rax, [rsp+48h+var_40] lea rcx, jpt_74BBE movsxd rax, ds:(jpt_74BBE - 54C6E0h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_74BC0: mov rdi, [rsp+48h+var_20]; jumptable 0000000000074BBE case 0 mov rax, [rsp+48h+var_8] mov rsi, [rax+0D58h] mov eax, [rsp+48h+var_34] shl eax, 1 cdqe shl rax, 3 add rsi, rax mov edx, 2 call _mju_copy mov rdi, [rsp+48h+var_30] mov rax, [rsp+48h+var_8] mov rsi, [rax+0D60h] imul eax, [rsp+48h+var_34], 5 cdqe shl rax, 3 add rsi, rax mov edx, 5 call _mju_copy jmp def_74BBE; jumptable 0000000000074BBE default case loc_74C18: mov rdi, [rsp+48h+var_20]; jumptable 0000000000074BBE case 3 mov rax, [rsp+48h+var_8] mov rsi, [rax+678h] mov eax, [rsp+48h+var_34] shl eax, 1 cdqe shl rax, 3 add rsi, rax mov edx, 2 call _mju_copy mov rdi, [rsp+48h+var_30] mov rax, [rsp+48h+var_8] mov rsi, [rax+680h] imul eax, [rsp+48h+var_34], 5 cdqe shl rax, 3 add rsi, rax mov edx, 5 call _mju_copy jmp def_74BBE; jumptable 0000000000074BBE default case loc_74C70: mov rdi, [rsp+48h+var_20]; jumptable 0000000000074BBE case 1 mov rax, [rsp+48h+var_8] mov rsi, [rax+6F0h] mov eax, [rsp+48h+var_34] shl eax, 1 cdqe shl rax, 3 add rsi, rax mov edx, 2 call _mju_copy mov rdi, [rsp+48h+var_30] mov rax, [rsp+48h+var_8] mov rsi, [rax+6F8h] imul eax, [rsp+48h+var_34], 5 cdqe shl rax, 3 add rsi, rax mov edx, 5 call _mju_copy jmp def_74BBE; jumptable 0000000000074BBE default case loc_74CC8: mov rdi, [rsp+48h+var_20]; jumptable 0000000000074BBE case 4 mov rax, [rsp+48h+var_8] mov rsi, [rax+0DA0h] mov eax, [rsp+48h+var_34] shl eax, 1 cdqe shl rax, 3 add rsi, rax mov edx, 2 call _mju_copy mov rdi, [rsp+48h+var_30] mov rax, [rsp+48h+var_8] mov rsi, [rax+0DA8h] imul eax, [rsp+48h+var_34], 5 cdqe shl rax, 3 add rsi, rax mov edx, 5 call _mju_copy jmp def_74BBE; jumptable 0000000000074BBE default case loc_74D20: mov rdi, [rsp+48h+var_20]; jumptable 0000000000074BBE case 2 mov rax, [rsp+48h+var_8] mov rsi, [rax+0DB0h] mov eax, [rsp+48h+var_34] shl eax, 1 cdqe shl rax, 3 add rsi, rax mov edx, 2 call _mju_copy mov rdi, [rsp+48h+var_30] mov rax, [rsp+48h+var_8] mov rsi, [rax+0DB8h] imul eax, [rsp+48h+var_34], 5 cdqe shl rax, 3 add rsi, rax mov edx, 5 call _mju_copy jmp def_74BBE; jumptable 0000000000074BBE default case loc_74D78: mov rdi, [rsp+48h+var_20]; jumptable 0000000000074BBE cases 5-7 mov rax, [rsp+48h+var_10] mov rsi, [rax+27A58h] movsxd rax, [rsp+48h+var_34] imul rax, 240h add rsi, rax add rsi, 98h mov edx, 2 call _mju_copy mov rdi, [rsp+48h+var_28] mov rax, [rsp+48h+var_10] mov rsi, [rax+27A58h] movsxd rax, [rsp+48h+var_34] imul rax, 240h add rsi, rax add rsi, 0A8h mov edx, 2 call _mju_copy mov rdi, [rsp+48h+var_30] mov rax, [rsp+48h+var_10] mov rsi, [rax+27A58h] movsxd rax, [rsp+48h+var_34] imul rax, 240h add rsi, rax add rsi, 0B8h mov edx, 5 call _mju_copy def_74BBE: mov rax, [rsp+48h+var_20]; jumptable 0000000000074BBE default case vmovsd xmm0, qword ptr [rax] vxorps xmm1, xmm1, xmm1 vucomisd xmm0, xmm1 setnbe al and al, 1 movzx eax, al mov rcx, [rsp+48h+var_20] vmovsd xmm0, qword ptr [rcx+8] vxorps xmm1, xmm1, xmm1 vucomisd xmm0, xmm1 setnbe cl and cl, 1 movzx ecx, cl xor eax, ecx cmp eax, 0 jz short loc_74E62 lea rdi, aMixedSolrefFor; "mixed solref format, replacing with def"... mov al, 0 call _mju_warning mov rdi, [rsp+48h+var_20] xor eax, eax mov esi, eax call _mj_defaultSolRefImp loc_74E62: mov rax, [rsp+48h+var_8] mov eax, [rax+258h] and eax, 800h cmp eax, 0 jnz short loc_74EB6 mov rax, [rsp+48h+var_20] vmovsd xmm0, qword ptr [rax] vxorps xmm1, xmm1, xmm1 vucomisd xmm0, xmm1 jbe short loc_74EB6 mov rax, [rsp+48h+var_20] vmovsd xmm0, qword ptr [rax] mov rax, [rsp+48h+var_8] vmovsd xmm1, cs:qword_517B40 vmulsd xmm1, xmm1, qword ptr [rax+140h] call _mju_max mov rax, [rsp+48h+var_20] vmovsd qword ptr [rax], xmm0 loc_74EB6: mov rax, [rsp+48h+var_28] vmovsd xmm0, qword ptr [rax] vxorps xmm1, xmm1, xmm1 vucomisd xmm0, xmm1 setnbe al and al, 1 movzx eax, al mov rcx, [rsp+48h+var_28] vmovsd xmm0, qword ptr [rcx+8] vxorps xmm1, xmm1, xmm1 vucomisd xmm0, xmm1 setnbe cl and cl, 1 movzx ecx, cl xor eax, ecx cmp eax, 0 jz short loc_74F0E lea rdi, aSolreffriction; "solreffriction values should have the s"... mov al, 0 call _mju_warning mov rdi, [rsp+48h+var_28] mov esi, 2 call _mju_zero loc_74F0E: mov rax, [rsp+48h+var_8] mov eax, [rax+258h] and eax, 800h cmp eax, 0 jnz short loc_74F62 mov rax, [rsp+48h+var_28] vmovsd xmm0, qword ptr [rax] vxorps xmm1, xmm1, xmm1 vucomisd xmm0, xmm1 jbe short loc_74F62 mov rax, [rsp+48h+var_28] vmovsd xmm0, qword ptr [rax] mov rax, [rsp+48h+var_8] vmovsd xmm1, cs:qword_517B40 vmulsd xmm1, xmm1, qword ptr [rax+140h] call _mju_max mov rax, [rsp+48h+var_28] vmovsd qword ptr [rax], xmm0 loc_74F62: mov rax, [rsp+48h+var_30] vmovsd xmm1, qword ptr [rax] vmovsd xmm0, cs:qword_517B90 call _mju_max vmovaps xmm1, xmm0 vmovsd xmm0, cs:qword_517C20 call _mju_min mov rax, [rsp+48h+var_30] vmovsd qword ptr [rax], xmm0 mov rax, [rsp+48h+var_30] vmovsd xmm1, qword ptr [rax+8] vmovsd xmm0, cs:qword_517B90 call _mju_max vmovaps xmm1, xmm0 vmovsd xmm0, cs:qword_517C20 call _mju_min mov rax, [rsp+48h+var_30] vmovsd qword ptr [rax+8], xmm0 mov rax, [rsp+48h+var_30] vmovsd xmm1, qword ptr [rax+10h] vxorps xmm0, xmm0, xmm0 call _mju_max mov rax, [rsp+48h+var_30] vmovsd qword ptr [rax+10h], xmm0 mov rax, [rsp+48h+var_30] vmovsd xmm1, qword ptr [rax+18h] vmovsd xmm0, cs:qword_517B90 call _mju_max vmovaps xmm1, xmm0 vmovsd xmm0, cs:qword_517C20 call _mju_min mov rax, [rsp+48h+var_30] vmovsd qword ptr [rax+18h], xmm0 mov rax, [rsp+48h+var_30] vmovsd xmm1, qword ptr [rax+20h] vmovsd xmm0, cs:qword_517B58 call _mju_max mov rax, [rsp+48h+var_30] vmovsd qword ptr [rax+20h], xmm0 add rsp, 48h retn
long long getsolparam( long long a1, long long a2, int a3, long long a4, long long a5, long long a6, double a7, __m128 _XMM1) { char v8; // cf char v9; // zf int v10; // edx int v11; // r8d int v12; // r9d int v19; // ecx int v20; // eax char v21; // cf bool v22; // zf int v35; // ecx int v36; // eax bool v37; // zf long long result; // rax int v72; // [rsp+14h] [rbp-34h] long long v77; // [rsp+38h] [rbp-10h] v77 = a2; v72 = *(_DWORD *)(*(_QWORD *)(a2 + 162408) + 4LL * a3); LODWORD(a2) = 2; mju_zero(a5, 2LL); switch ( *(_DWORD *)(*(_QWORD *)(v77 + 162400) + 4LL * a3) ) { case 0: mju_copy(a4, 16LL * v72 + *(_QWORD *)(a1 + 3416), 2LL); a2 = 40LL * v72 + *(_QWORD *)(a1 + 3424); mju_copy(a6, a2, 5LL); break; case 1: mju_copy(a4, 16LL * v72 + *(_QWORD *)(a1 + 1776), 2LL); a2 = 40LL * v72 + *(_QWORD *)(a1 + 1784); mju_copy(a6, a2, 5LL); break; case 2: mju_copy(a4, 16LL * v72 + *(_QWORD *)(a1 + 3504), 2LL); a2 = 40LL * v72 + *(_QWORD *)(a1 + 3512); mju_copy(a6, a2, 5LL); break; case 3: mju_copy(a4, 16LL * v72 + *(_QWORD *)(a1 + 1656), 2LL); a2 = 40LL * v72 + *(_QWORD *)(a1 + 1664); mju_copy(a6, a2, 5LL); break; case 4: mju_copy(a4, 16LL * v72 + *(_QWORD *)(a1 + 3488), 2LL); a2 = 40LL * v72 + *(_QWORD *)(a1 + 3496); mju_copy(a6, a2, 5LL); break; case 5: case 6: case 7: mju_copy(a4, 576LL * v72 + *(_QWORD *)(v77 + 162392) + 152, 2LL); mju_copy(a5, 576LL * v72 + *(_QWORD *)(v77 + 162392) + 168, 2LL); a2 = 576LL * v72 + *(_QWORD *)(v77 + 162392) + 184; mju_copy(a6, a2, 5LL); break; default: break; } _RAX = a4; __asm { vmovsd xmm0, qword ptr [rax] vxorps xmm1, xmm1, xmm1 vucomisd xmm0, xmm1 } LOBYTE(_RAX) = !(v8 | v9); _RCX = a4; __asm { vmovsd xmm0, qword ptr [rcx+8] vxorps xmm1, xmm1, xmm1 vucomisd xmm0, xmm1 } v19 = (_BYTE)_RAX != 0; if ( v19 != (unsigned __int8)_RAX ) { mju_warning((unsigned int)"mixed solref format, replacing with default", a2, v10, v19, v11, v12); LODWORD(a2) = 0; mj_defaultSolRefImp(a4, 0LL); } v20 = *(_DWORD *)(a1 + 600) & 0x800; v21 = 0; v22 = v20 == 0; if ( !v20 ) { _RAX = a4; __asm { vmovsd xmm0, qword ptr [rax] vxorps xmm1, xmm1, xmm1 vucomisd xmm0, xmm1 } if ( !v22 ) { _RAX = a4; __asm { vmovsd xmm0, qword ptr [rax] vmovsd xmm1, cs:qword_517B40 vmulsd xmm1, xmm1, qword ptr [rax+140h] } *(double *)&_XMM0 = mju_max(*(double *)&_XMM0, *(double *)&_XMM1); _RAX = a4; __asm { vmovsd qword ptr [rax], xmm0 } } } _RAX = a5; __asm { vmovsd xmm0, qword ptr [rax] vxorps xmm1, xmm1, xmm1 vucomisd xmm0, xmm1 } LOBYTE(_RAX) = !(v21 | v22); _RCX = a5; __asm { vmovsd xmm0, qword ptr [rcx+8] vxorps xmm1, xmm1, xmm1 vucomisd xmm0, xmm1 } v35 = (_BYTE)_RAX != 0; if ( v35 != (unsigned __int8)_RAX ) { mju_warning( (unsigned int)"solreffriction values should have the same sign, replacing with default", a2, v10, v35, v11, v12); mju_zero(a5, 2LL); } v36 = *(_DWORD *)(a1 + 600) & 0x800; v37 = v36 == 0; if ( !v36 ) { _RAX = a5; __asm { vmovsd xmm0, qword ptr [rax] vxorps xmm1, xmm1, xmm1 vucomisd xmm0, xmm1 } if ( !v37 ) { _RAX = a5; __asm { vmovsd xmm0, qword ptr [rax] vmovsd xmm1, cs:qword_517B40 vmulsd xmm1, xmm1, qword ptr [rax+140h] } *(double *)&_XMM0 = mju_max(*(double *)&_XMM0, *(double *)&_XMM1); _RAX = a5; __asm { vmovsd qword ptr [rax], xmm0 } } } _RAX = a6; __asm { vmovsd xmm1, qword ptr [rax] vmovsd xmm0, cs:qword_517B90 } *(double *)&_XMM0 = mju_max(*(double *)&_XMM0, *(double *)&_XMM1); __asm { vmovaps xmm1, xmm0 vmovsd xmm0, cs:qword_517C20 } *(double *)&_XMM0 = mju_min(*(double *)&_XMM0, *(double *)&_XMM1); _RAX = a6; __asm { vmovsd qword ptr [rax], xmm0 } _RAX = a6; __asm { vmovsd xmm1, qword ptr [rax+8] vmovsd xmm0, cs:qword_517B90 } *(double *)&_XMM0 = mju_max(*(double *)&_XMM0, *(double *)&_XMM1); __asm { vmovaps xmm1, xmm0 vmovsd xmm0, cs:qword_517C20 } *(double *)&_XMM0 = mju_min(*(double *)&_XMM0, *(double *)&_XMM1); _RAX = a6; __asm { vmovsd qword ptr [rax+8], xmm0 } _RAX = a6; __asm { vmovsd xmm1, qword ptr [rax+10h] vxorps xmm0, xmm0, xmm0 } *(double *)&_XMM0 = mju_max(*(double *)&_XMM0, *(double *)&_XMM1); _RAX = a6; __asm { vmovsd qword ptr [rax+10h], xmm0 } _RAX = a6; __asm { vmovsd xmm1, qword ptr [rax+18h] vmovsd xmm0, cs:qword_517B90 } *(double *)&_XMM0 = mju_max(*(double *)&_XMM0, *(double *)&_XMM1); __asm { vmovaps xmm1, xmm0 vmovsd xmm0, cs:qword_517C20 } *(double *)&_XMM0 = mju_min(*(double *)&_XMM0, *(double *)&_XMM1); _RAX = a6; __asm { vmovsd qword ptr [rax+18h], xmm0 } _RAX = a6; __asm { vmovsd xmm1, qword ptr [rax+20h] vmovsd xmm0, cs:qword_517B58 } *(double *)&_XMM0 = mju_max(*(double *)&_XMM0, *(double *)&_XMM1); result = a6; __asm { vmovsd qword ptr [rax+20h], xmm0 } return result; }
getsolparam: SUB RSP,0x48 MOV qword ptr [RSP + 0x40],RDI MOV qword ptr [RSP + 0x38],RSI MOV dword ptr [RSP + 0x34],EDX MOV qword ptr [RSP + 0x28],RCX MOV qword ptr [RSP + 0x20],R8 MOV qword ptr [RSP + 0x18],R9 MOV RAX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RAX + 0x27a68] MOVSXD RCX,dword ptr [RSP + 0x34] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0x14],EAX MOV RDI,qword ptr [RSP + 0x20] MOV ESI,0x2 CALL 0x001493b0 MOV RAX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RAX + 0x27a60] MOVSXD RCX,dword ptr [RSP + 0x34] MOV EAX,dword ptr [RAX + RCX*0x4] MOV qword ptr [RSP + 0x8],RAX SUB RAX,0x7 JA 0x00174e0b MOV RAX,qword ptr [RSP + 0x8] LEA RCX,[0x64c6e0] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOV RDI,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RAX + 0xd58] MOV EAX,dword ptr [RSP + 0x14] SHL EAX,0x1 CDQE SHL RAX,0x3 ADD RSI,RAX MOV EDX,0x2 CALL 0x001492d0 MOV RDI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RAX + 0xd60] IMUL EAX,dword ptr [RSP + 0x14],0x5 CDQE SHL RAX,0x3 ADD RSI,RAX MOV EDX,0x5 CALL 0x001492d0 JMP 0x00174e0b caseD_3: MOV RDI,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RAX + 0x678] MOV EAX,dword ptr [RSP + 0x14] SHL EAX,0x1 CDQE SHL RAX,0x3 ADD RSI,RAX MOV EDX,0x2 CALL 0x001492d0 MOV RDI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RAX + 0x680] IMUL EAX,dword ptr [RSP + 0x14],0x5 CDQE SHL RAX,0x3 ADD RSI,RAX MOV EDX,0x5 CALL 0x001492d0 JMP 0x00174e0b caseD_1: MOV RDI,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RAX + 0x6f0] MOV EAX,dword ptr [RSP + 0x14] SHL EAX,0x1 CDQE SHL RAX,0x3 ADD RSI,RAX MOV EDX,0x2 CALL 0x001492d0 MOV RDI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RAX + 0x6f8] IMUL EAX,dword ptr [RSP + 0x14],0x5 CDQE SHL RAX,0x3 ADD RSI,RAX MOV EDX,0x5 CALL 0x001492d0 JMP 0x00174e0b caseD_4: MOV RDI,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RAX + 0xda0] MOV EAX,dword ptr [RSP + 0x14] SHL EAX,0x1 CDQE SHL RAX,0x3 ADD RSI,RAX MOV EDX,0x2 CALL 0x001492d0 MOV RDI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RAX + 0xda8] IMUL EAX,dword ptr [RSP + 0x14],0x5 CDQE SHL RAX,0x3 ADD RSI,RAX MOV EDX,0x5 CALL 0x001492d0 JMP 0x00174e0b caseD_2: MOV RDI,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RAX + 0xdb0] MOV EAX,dword ptr [RSP + 0x14] SHL EAX,0x1 CDQE SHL RAX,0x3 ADD RSI,RAX MOV EDX,0x2 CALL 0x001492d0 MOV RDI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RAX + 0xdb8] IMUL EAX,dword ptr [RSP + 0x14],0x5 CDQE SHL RAX,0x3 ADD RSI,RAX MOV EDX,0x5 CALL 0x001492d0 JMP 0x00174e0b caseD_5: MOV RDI,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RAX + 0x27a58] MOVSXD RAX,dword ptr [RSP + 0x14] IMUL RAX,RAX,0x240 ADD RSI,RAX ADD RSI,0x98 MOV EDX,0x2 CALL 0x001492d0 MOV RDI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RAX + 0x27a58] MOVSXD RAX,dword ptr [RSP + 0x14] IMUL RAX,RAX,0x240 ADD RSI,RAX ADD RSI,0xa8 MOV EDX,0x2 CALL 0x001492d0 MOV RDI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RAX + 0x27a58] MOVSXD RAX,dword ptr [RSP + 0x14] IMUL RAX,RAX,0x240 ADD RSI,RAX ADD RSI,0xb8 MOV EDX,0x5 CALL 0x001492d0 default: MOV RAX,qword ptr [RSP + 0x28] VMOVSD XMM0,qword ptr [RAX] VXORPS XMM1,XMM1,XMM1 VUCOMISD XMM0,XMM1 SETA AL AND AL,0x1 MOVZX EAX,AL MOV RCX,qword ptr [RSP + 0x28] VMOVSD XMM0,qword ptr [RCX + 0x8] VXORPS XMM1,XMM1,XMM1 VUCOMISD XMM0,XMM1 SETA CL AND CL,0x1 MOVZX ECX,CL XOR EAX,ECX CMP EAX,0x0 JZ 0x00174e62 LEA RDI,[0x6185d6] MOV AL,0x0 CALL 0x001493f0 MOV RDI,qword ptr [RSP + 0x28] XOR EAX,EAX MOV ESI,EAX CALL 0x00149870 LAB_00174e62: MOV RAX,qword ptr [RSP + 0x40] MOV EAX,dword ptr [RAX + 0x258] AND EAX,0x800 CMP EAX,0x0 JNZ 0x00174eb6 MOV RAX,qword ptr [RSP + 0x28] VMOVSD XMM0,qword ptr [RAX] VXORPS XMM1,XMM1,XMM1 VUCOMISD XMM0,XMM1 JBE 0x00174eb6 MOV RAX,qword ptr [RSP + 0x28] VMOVSD XMM0,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x40] VMOVSD XMM1,qword ptr [0x00617b40] VMULSD XMM1,XMM1,qword ptr [RAX + 0x140] CALL 0x001494b0 MOV RAX,qword ptr [RSP + 0x28] VMOVSD qword ptr [RAX],XMM0 LAB_00174eb6: MOV RAX,qword ptr [RSP + 0x20] VMOVSD XMM0,qword ptr [RAX] VXORPS XMM1,XMM1,XMM1 VUCOMISD XMM0,XMM1 SETA AL AND AL,0x1 MOVZX EAX,AL MOV RCX,qword ptr [RSP + 0x20] VMOVSD XMM0,qword ptr [RCX + 0x8] VXORPS XMM1,XMM1,XMM1 VUCOMISD XMM0,XMM1 SETA CL AND CL,0x1 MOVZX ECX,CL XOR EAX,ECX CMP EAX,0x0 JZ 0x00174f0e LEA RDI,[0x618602] MOV AL,0x0 CALL 0x001493f0 MOV RDI,qword ptr [RSP + 0x20] MOV ESI,0x2 CALL 0x001493b0 LAB_00174f0e: MOV RAX,qword ptr [RSP + 0x40] MOV EAX,dword ptr [RAX + 0x258] AND EAX,0x800 CMP EAX,0x0 JNZ 0x00174f62 MOV RAX,qword ptr [RSP + 0x20] VMOVSD XMM0,qword ptr [RAX] VXORPS XMM1,XMM1,XMM1 VUCOMISD XMM0,XMM1 JBE 0x00174f62 MOV RAX,qword ptr [RSP + 0x20] VMOVSD XMM0,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x40] VMOVSD XMM1,qword ptr [0x00617b40] VMULSD XMM1,XMM1,qword ptr [RAX + 0x140] CALL 0x001494b0 MOV RAX,qword ptr [RSP + 0x20] VMOVSD qword ptr [RAX],XMM0 LAB_00174f62: MOV RAX,qword ptr [RSP + 0x18] VMOVSD XMM1,qword ptr [RAX] VMOVSD XMM0,qword ptr [0x00617b90] CALL 0x001494b0 VMOVAPS XMM1,XMM0 VMOVSD XMM0,qword ptr [0x00617c20] CALL 0x00149440 MOV RAX,qword ptr [RSP + 0x18] VMOVSD qword ptr [RAX],XMM0 MOV RAX,qword ptr [RSP + 0x18] VMOVSD XMM1,qword ptr [RAX + 0x8] VMOVSD XMM0,qword ptr [0x00617b90] CALL 0x001494b0 VMOVAPS XMM1,XMM0 VMOVSD XMM0,qword ptr [0x00617c20] CALL 0x00149440 MOV RAX,qword ptr [RSP + 0x18] VMOVSD qword ptr [RAX + 0x8],XMM0 MOV RAX,qword ptr [RSP + 0x18] VMOVSD XMM1,qword ptr [RAX + 0x10] VXORPS XMM0,XMM0,XMM0 CALL 0x001494b0 MOV RAX,qword ptr [RSP + 0x18] VMOVSD qword ptr [RAX + 0x10],XMM0 MOV RAX,qword ptr [RSP + 0x18] VMOVSD XMM1,qword ptr [RAX + 0x18] VMOVSD XMM0,qword ptr [0x00617b90] CALL 0x001494b0 VMOVAPS XMM1,XMM0 VMOVSD XMM0,qword ptr [0x00617c20] CALL 0x00149440 MOV RAX,qword ptr [RSP + 0x18] VMOVSD qword ptr [RAX + 0x18],XMM0 MOV RAX,qword ptr [RSP + 0x18] VMOVSD XMM1,qword ptr [RAX + 0x20] VMOVSD XMM0,qword ptr [0x00617b58] CALL 0x001494b0 MOV RAX,qword ptr [RSP + 0x18] VMOVSD qword ptr [RAX + 0x20],XMM0 ADD RSP,0x48 RET
void getsolparam(long param_1,long param_2,int param_3,double *param_4,double *param_5, int8 *param_6) { int iVar1; double dVar2; int8 uVar3; iVar1 = *(int *)(*(long *)(param_2 + 0x27a68) + (long)param_3 * 4); mju_zero(param_5,2); switch(*(int4 *)(*(long *)(param_2 + 0x27a60) + (long)param_3 * 4)) { case 0: mju_copy(param_4,*(long *)(param_1 + 0xd58) + (long)(iVar1 << 1) * 8,2); mju_copy(param_6,*(long *)(param_1 + 0xd60) + (long)(iVar1 * 5) * 8,5); break; case 1: mju_copy(param_4,*(long *)(param_1 + 0x6f0) + (long)(iVar1 << 1) * 8,2); mju_copy(param_6,*(long *)(param_1 + 0x6f8) + (long)(iVar1 * 5) * 8,5); break; case 2: mju_copy(param_4,*(long *)(param_1 + 0xdb0) + (long)(iVar1 << 1) * 8,2); mju_copy(param_6,*(long *)(param_1 + 0xdb8) + (long)(iVar1 * 5) * 8,5); break; case 3: mju_copy(param_4,*(long *)(param_1 + 0x678) + (long)(iVar1 << 1) * 8,2); mju_copy(param_6,*(long *)(param_1 + 0x680) + (long)(iVar1 * 5) * 8,5); break; case 4: mju_copy(param_4,*(long *)(param_1 + 0xda0) + (long)(iVar1 << 1) * 8,2); mju_copy(param_6,*(long *)(param_1 + 0xda8) + (long)(iVar1 * 5) * 8,5); break; case 5: case 6: case 7: mju_copy(param_4,*(long *)(param_2 + 0x27a58) + (long)iVar1 * 0x240 + 0x98,2); mju_copy(param_5,*(long *)(param_2 + 0x27a58) + (long)iVar1 * 0x240 + 0xa8,2); mju_copy(param_6,*(long *)(param_2 + 0x27a58) + (long)iVar1 * 0x240 + 0xb8,5); } if (0.0 < *param_4 != 0.0 < param_4[1]) { mju_warning("mixed solref format, replacing with default"); mj_defaultSolRefImp(param_4,0); } if (((*(uint *)(param_1 + 600) & 0x800) == 0) && (0.0 < *param_4)) { dVar2 = (double)mju_max(*param_4,DAT_00617b40 * *(double *)(param_1 + 0x140)); *param_4 = dVar2; } if (0.0 < *param_5 != 0.0 < param_5[1]) { mju_warning("solreffriction values should have the same sign, replacing with default"); mju_zero(param_5,2); } if (((*(uint *)(param_1 + 600) & 0x800) == 0) && (0.0 < *param_5)) { dVar2 = (double)mju_max(*param_5,DAT_00617b40 * *(double *)(param_1 + 0x140)); *param_5 = dVar2; } uVar3 = mju_max(DAT_00617b90,*param_6); uVar3 = mju_min(DAT_00617c20,uVar3); *param_6 = uVar3; uVar3 = mju_max(DAT_00617b90,param_6[1]); uVar3 = mju_min(DAT_00617c20,uVar3); param_6[1] = uVar3; uVar3 = mju_max(0,param_6[2]); param_6[2] = uVar3; uVar3 = mju_max(DAT_00617b90,param_6[3]); uVar3 = mju_min(DAT_00617c20,uVar3); param_6[3] = uVar3; uVar3 = mju_max(DAT_00617b58,param_6[4]); param_6[4] = uVar3; return; }
20,626
run_plugin_auth
eloqsql/libmariadb/plugins/auth/my_auth.c
int run_plugin_auth(MYSQL *mysql, char *data, uint data_len, const char *data_plugin, const char *db) { const char *auth_plugin_name= NULL; auth_plugin_t *auth_plugin; MCPVIO_EXT mpvio; ulong pkt_length; int res; /* determine the default/initial plugin to use */ if (mysql->server_capabilities & CLIENT_PLUGIN_AUTH) { if (mysql->options.extension && mysql->options.extension->default_auth) auth_plugin_name= mysql->options.extension->default_auth; else if (data_plugin) auth_plugin_name= data_plugin; } if (!auth_plugin_name) { if (mysql->server_capabilities & CLIENT_PROTOCOL_41) auth_plugin_name= native_password_plugin_name; else auth_plugin_name= "mysql_old_password"; } if (!(auth_plugin= (auth_plugin_t*) mysql_client_find_plugin(mysql, auth_plugin_name, MYSQL_CLIENT_AUTHENTICATION_PLUGIN))) auth_plugin= &dummy_fallback_client_plugin; mysql->net.last_errno= 0; /* just in case */ if (data_plugin && strcmp(data_plugin, auth_plugin_name)) { /* data was prepared for a different plugin, so we don't send any data */ data= 0; data_len= 0; } mpvio.mysql_change_user= data_plugin == 0; mpvio.cached_server_reply.pkt= (uchar*)data; mpvio.cached_server_reply.pkt_len= data_len; mpvio.read_packet= client_mpvio_read_packet; mpvio.write_packet= client_mpvio_write_packet; mpvio.info= client_mpvio_info; mpvio.mysql= mysql; mpvio.packets_read= mpvio.packets_written= 0; mpvio.db= db; retry: mpvio.plugin= auth_plugin; if (auth_plugin_name && mysql->options.extension && mysql->options.extension->restricted_auth) { if (!strstr(mysql->options.extension->restricted_auth, auth_plugin_name)) { my_set_error(mysql, CR_PLUGIN_NOT_ALLOWED, SQLSTATE_UNKNOWN, 0, data_plugin); return 1; } } mysql->net.read_pos[0]= 0; res= auth_plugin->authenticate_user((struct st_plugin_vio *)&mpvio, mysql); if ((res == CR_ERROR && !mysql->net.buff) || (res > CR_OK && mysql->net.read_pos[0] != 254)) { /* the plugin returned an error. write it down in mysql, unless the error code is CR_ERROR and mysql->net.last_errno is already set (the plugin has done it) */ if (res > CR_ERROR) my_set_error(mysql, res, SQLSTATE_UNKNOWN, 0); else if (!mysql->net.last_errno) { my_set_error(mysql, CR_UNKNOWN_ERROR, SQLSTATE_UNKNOWN, 0); } return 1; } /* read the OK packet (or use the cached value in mysql->net.read_pos */ if (res == CR_OK) pkt_length= ma_net_safe_read(mysql); else /* res == CR_OK_HANDSHAKE_COMPLETE or an error */ pkt_length= mpvio.last_read_packet_len; if (pkt_length == packet_error) { if (mysql->net.last_errno == CR_SERVER_LOST) my_set_error(mysql, CR_SERVER_LOST, SQLSTATE_UNKNOWN, ER(CR_SERVER_LOST_EXTENDED), "reading authorization packet", errno); return 1; } if (mysql->net.read_pos[0] == 254) { /* The server asked to use a different authentication plugin */ if (pkt_length == 1) { /* old "use short scramble" packet */ auth_plugin_name= old_password_plugin_name; mpvio.cached_server_reply.pkt= (uchar*)mysql->scramble_buff; mpvio.cached_server_reply.pkt_len= SCRAMBLE_LENGTH + 1; } else { /* new "use different plugin" packet */ uint len; auth_plugin_name= (char*)mysql->net.read_pos + 1; len= (uint)strlen(auth_plugin_name); /* safe as ma_net_read always appends \0 */ mpvio.cached_server_reply.pkt_len= pkt_length - len - 2; mpvio.cached_server_reply.pkt= mysql->net.read_pos + len + 2; } if (!(auth_plugin= (auth_plugin_t *) mysql_client_find_plugin(mysql, auth_plugin_name, MYSQL_CLIENT_AUTHENTICATION_PLUGIN))) auth_plugin= &dummy_fallback_client_plugin; goto retry; } /* net->read_pos[0] should always be 0 here if the server implements the protocol correctly */ if (mysql->net.read_pos[0] == 0) return ma_read_ok_packet(mysql, mysql->net.read_pos + 1, pkt_length); return 1; }
O3
c
run_plugin_auth: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %r8, -0x38(%rbp) movq %rcx, %r15 movl %edx, -0x30(%rbp) movq %rsi, %r14 movq %rdi, %rbx movq 0x370(%rdi), %rax btl $0x13, %eax jb 0x30993 btl $0x9, %eax leaq 0x8111(%rip), %rax # 0x38a97 leaq 0x811d(%rip), %r12 # 0x38aaa cmovaeq %rax, %r12 jmp 0x309b0 movq 0x480(%rbx), %rcx testq %rcx, %rcx je 0x309a8 movq 0x8(%rcx), %r12 testq %r12, %r12 jne 0x309b0 movq %r15, %r12 testq %r15, %r15 je 0x3097b movq %rbx, %rdi movq %r12, %rsi movl $0x2, %edx callq 0x2a7a0 movq %rax, %r13 testq %rax, %rax jne 0x309cf leaq 0x1c6c9(%rip), %r13 # 0x4d098 movl $0x0, 0x90(%rbx) testq %r15, %r15 je 0x309f9 movq %r15, %rdi movq %r12, %rsi callq 0x13650 xorl %ecx, %ecx testl %eax, %eax movl -0x30(%rbp), %eax cmovnel %ecx, %eax cmovneq %rcx, %r14 jmp 0x309fc movl -0x30(%rbp), %eax movq %r15, -0x30(%rbp) testq %r15, %r15 leaq -0x88(%rbp), %rcx sete 0x48(%rcx) movq %r14, 0x30(%rcx) movl %eax, 0x38(%rcx) leaq 0x22a(%rip), %rax # 0x30c46 movq %rax, (%rcx) leaq 0x2c2(%rip), %rax # 0x30ce8 movq %rax, 0x8(%rcx) leaq 0xa41(%rip), %rax # 0x31472 movq %rax, 0x10(%rcx) movq %rbx, 0x18(%rcx) movq $0x0, 0x40(%rcx) movq -0x38(%rbp), %rax movq %rax, 0x28(%rcx) leaq 0x48e(%rbx), %r15 movq %r13, -0x68(%rbp) movq 0x480(%rbx), %rax testq %rax, %rax je 0x30a7d movq 0x150(%rax), %rdi testq %rdi, %rdi je 0x30a7d movq %r12, %rsi callq 0x13100 testq %rax, %rax je 0x30bf5 movq 0x20(%rbx), %rax movb $0x0, (%rax) leaq -0x88(%rbp), %rdi movq %rbx, %rsi callq *0x58(%r13) testl %eax, %eax je 0x30aa6 js 0x30abf movq 0x20(%rbx), %rcx cmpb $-0x2, (%rcx) je 0x30ac4 jmp 0x30c16 cmpq $0x0, 0x8(%rbx) je 0x30bc9 movq 0x20(%rbx), %rax cmpb $-0x2, (%rax) je 0x30ac4 jmp 0x30bc9 cmpl $-0x1, %eax je 0x30b3f movslq -0x3c(%rbp), %r14 movq 0x20(%rbx), %r13 movzbl (%r13), %eax cmpl $0xfe, %eax jne 0x30baf movl $0x15, %eax movq %r15, %rcx leaq 0x7fac(%rip), %r12 # 0x38a97 cmpq $0x1, %r14 je 0x30b10 leaq 0x1(%r13), %r12 movq %r12, %rdi callq 0x131c0 movl %eax, %ecx subl %eax, %r14d addl $-0x2, %r14d addq %r13, %rcx addq $0x2, %rcx movl %r14d, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x50(%rbp) movq %rbx, %rdi movq %r12, %rsi movl $0x2, %edx callq 0x2a7a0 movq %rax, %r13 testq %rax, %rax jne 0x30a50 leaq 0x1c55e(%rip), %r13 # 0x4d098 jmp 0x30a50 movq %rbx, %rdi callq 0x18237 movq %rax, %r14 movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq %rax, %r14 jne 0x30ac8 movl $0x1, %r14d cmpl $0x7dd, 0x90(%rbx) # imm = 0x7DD jne 0x30c34 leaq 0x1d20b(%rip), %rax # 0x4dd80 movq (%rax), %r15 leaq 0x1d211(%rip), %rax # 0x4dd90 movq 0x1b8(%rax), %r12 callq 0x13060 movl (%rax), %r9d leaq 0x8452(%rip), %r8 # 0x38fe7 movq %rbx, %rdi movl $0x7dd, %esi # imm = 0x7DD movq %r15, %rdx movq %r12, %rcx xorl %eax, %eax callq 0x184d1 jmp 0x30c34 testl %eax, %eax jne 0x30c2e incq %r13 movq %rbx, %rdi movq %r13, %rsi movq %r14, %rdx callq 0x1d51e movl %eax, %r14d jmp 0x30c34 movl $0x1, %r14d cmpl $0x0, 0x90(%rbx) jne 0x30c34 leaq 0x1d1a1(%rip), %rax # 0x4dd80 movq (%rax), %rdx movq %rbx, %rdi movl $0x7d0, %esi # imm = 0x7D0 xorl %ecx, %ecx xorl %eax, %eax callq 0x184d1 jmp 0x30c34 leaq 0x1d184(%rip), %rax # 0x4dd80 movq (%rax), %rdx movq %rbx, %rdi movl $0x1392, %esi # imm = 0x1392 xorl %ecx, %ecx movq -0x30(%rbp), %r8 xorl %eax, %eax callq 0x184d1 jmp 0x30c2e leaq 0x1d163(%rip), %rcx # 0x4dd80 movq (%rcx), %rdx movq %rbx, %rdi movl %eax, %esi xorl %ecx, %ecx xorl %eax, %eax callq 0x184d1 movl $0x1, %r14d movl %r14d, %eax addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
run_plugin_auth: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov [rbp+var_38], r8 mov r15, rcx mov dword ptr [rbp+var_30], edx mov r14, rsi mov rbx, rdi mov rax, [rdi+370h] bt eax, 13h jb short loc_30993 loc_3097B: bt eax, 9 lea rax, aMysqlOldPasswo; "mysql_old_password" lea r12, aMysqlNativePas; "mysql_native_password" cmovnb r12, rax jmp short loc_309B0 loc_30993: mov rcx, [rbx+480h] test rcx, rcx jz short loc_309A8 mov r12, [rcx+8] test r12, r12 jnz short loc_309B0 loc_309A8: mov r12, r15 test r15, r15 jz short loc_3097B loc_309B0: mov rdi, rbx mov rsi, r12 mov edx, 2 call mysql_client_find_plugin mov r13, rax test rax, rax jnz short loc_309CF lea r13, dummy_fallback_client_plugin loc_309CF: mov dword ptr [rbx+90h], 0 test r15, r15 jz short loc_309F9 mov rdi, r15 mov rsi, r12 call _strcmp xor ecx, ecx test eax, eax mov eax, dword ptr [rbp+var_30] cmovnz eax, ecx cmovnz r14, rcx jmp short loc_309FC loc_309F9: mov eax, dword ptr [rbp+var_30] loc_309FC: mov [rbp+var_30], r15 test r15, r15 lea rcx, [rbp+var_88] setz byte ptr [rcx+48h] mov [rcx+30h], r14 mov [rcx+38h], eax lea rax, client_mpvio_read_packet mov [rcx], rax lea rax, client_mpvio_write_packet mov [rcx+8], rax lea rax, client_mpvio_info mov [rcx+10h], rax mov [rcx+18h], rbx mov qword ptr [rcx+40h], 0 mov rax, [rbp+var_38] mov [rcx+28h], rax lea r15, [rbx+48Eh] loc_30A50: mov [rbp+var_68], r13 mov rax, [rbx+480h] test rax, rax jz short loc_30A7D mov rdi, [rax+150h] test rdi, rdi jz short loc_30A7D mov rsi, r12 call _strstr test rax, rax jz loc_30BF5 loc_30A7D: mov rax, [rbx+20h] mov byte ptr [rax], 0 lea rdi, [rbp+var_88] mov rsi, rbx call qword ptr [r13+58h] test eax, eax jz short loc_30AA6 js short loc_30ABF mov rcx, [rbx+20h] cmp byte ptr [rcx], 0FEh jz short loc_30AC4 jmp loc_30C16 loc_30AA6: cmp qword ptr [rbx+8], 0 jz loc_30BC9 mov rax, [rbx+20h] cmp byte ptr [rax], 0FEh jz short loc_30AC4 jmp loc_30BC9 loc_30ABF: cmp eax, 0FFFFFFFFh jz short loc_30B3F loc_30AC4: movsxd r14, [rbp+var_3C] loc_30AC8: mov r13, [rbx+20h] movzx eax, byte ptr [r13+0] cmp eax, 0FEh jnz loc_30BAF mov eax, 15h mov rcx, r15 lea r12, aMysqlOldPasswo; "mysql_old_password" cmp r14, 1 jz short loc_30B10 lea r12, [r13+1] mov rdi, r12 call _strlen mov ecx, eax sub r14d, eax add r14d, 0FFFFFFFEh add rcx, r13 add rcx, 2 mov eax, r14d loc_30B10: mov [rbp+var_58], rcx mov [rbp+var_50], eax mov rdi, rbx mov rsi, r12 mov edx, 2 call mysql_client_find_plugin mov r13, rax test rax, rax jnz loc_30A50 lea r13, dummy_fallback_client_plugin jmp loc_30A50 loc_30B3F: mov rdi, rbx call ma_net_safe_read mov r14, rax mov eax, 0FFFFFFFFh cmp r14, rax jnz loc_30AC8 mov r14d, 1 cmp dword ptr [rbx+90h], 7DDh jnz loc_30C34 lea rax, SQLSTATE_UNKNOWN mov r15, [rax] lea rax, client_errors mov r12, [rax+1B8h] call ___errno_location mov r9d, [rax] lea r8, aReadingAuthori; "reading authorization packet" mov rdi, rbx mov esi, 7DDh mov rdx, r15 mov rcx, r12 xor eax, eax call my_set_error jmp loc_30C34 loc_30BAF: test eax, eax jnz short loc_30C2E inc r13 mov rdi, rbx mov rsi, r13 mov rdx, r14 call ma_read_ok_packet mov r14d, eax jmp short loc_30C34 loc_30BC9: mov r14d, 1 cmp dword ptr [rbx+90h], 0 jnz short loc_30C34 lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov rdi, rbx mov esi, 7D0h xor ecx, ecx xor eax, eax call my_set_error jmp short loc_30C34 loc_30BF5: lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov rdi, rbx mov esi, 1392h xor ecx, ecx mov r8, [rbp+var_30] xor eax, eax call my_set_error jmp short loc_30C2E loc_30C16: lea rcx, SQLSTATE_UNKNOWN mov rdx, [rcx] mov rdi, rbx mov esi, eax xor ecx, ecx xor eax, eax call my_set_error loc_30C2E: mov r14d, 1 loc_30C34: mov eax, r14d add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long run_plugin_auth( long long a1, long long a2, int a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14) { const char *v14; // r15 long long v17; // rax const char *v18; // r12 long long ( **plugin)(_QWORD *, long long); // r13 bool v20; // zf int v21; // eax long long v22; // rax long long v23; // rdi int v24; // eax long long v25; // rdx long long v26; // rcx unsigned long long v27; // r8 long long v28; // r9 double v29; // xmm4_8 double v30; // xmm5_8 unsigned long long v31; // r14 unsigned __int8 *v32; // r13 int v33; // eax long long v34; // rcx int v35; // eax unsigned int v36; // r14d char *v37; // r15 char *v38; // r12 unsigned int *v39; // rax char v41; // [rsp+0h] [rbp-90h] char v42; // [rsp+0h] [rbp-90h] _QWORD v43[6]; // [rsp+8h] [rbp-88h] BYREF long long v44; // [rsp+38h] [rbp-58h] int v45; // [rsp+40h] [rbp-50h] long long v46; // [rsp+48h] [rbp-48h] bool v47; // [rsp+50h] [rbp-40h] int v48; // [rsp+54h] [rbp-3Ch] long long v49; // [rsp+58h] [rbp-38h] const char *v50; // [rsp+60h] [rbp-30h] v49 = a5; v14 = (const char *)a4; LODWORD(v50) = a3; v17 = *(_QWORD *)(a1 + 880); if ( (v17 & 0x80000) == 0 || ((a4 = *(_QWORD *)(a1 + 1152)) == 0 || (v18 = *(const char **)(a4 + 8)) == 0LL) && (v18 = v14) == 0LL ) { v18 = "mysql_native_password"; if ( (v17 & 0x200) == 0 ) v18 = "mysql_old_password"; } plugin = (long long ( **)(_QWORD *, long long))mysql_client_find_plugin( a1, v18, 2, a7, a8, a9, a10, a11, a12, a13, a14, a4, a5, a6, v41); if ( !plugin ) plugin = (long long ( **)(_QWORD *, long long))&dummy_fallback_client_plugin; *(_DWORD *)(a1 + 144) = 0; if ( v14 ) { v20 = (unsigned int)strcmp(v14, v18) == 0; v21 = (int)v50; if ( !v20 ) { v21 = 0; a2 = 0LL; } } else { v21 = (int)v50; } v50 = v14; v47 = v14 == 0LL; v44 = a2; v45 = v21; v43[0] = client_mpvio_read_packet; v43[1] = client_mpvio_write_packet; v43[2] = client_mpvio_info; v43[3] = a1; v46 = 0LL; v43[5] = v49; while ( 1 ) { v43[4] = plugin; v22 = *(_QWORD *)(a1 + 1152); if ( v22 ) { v23 = *(_QWORD *)(v22 + 336); if ( v23 ) { if ( !strstr(v23, v18) ) { my_set_error(a1, 5010, (long long)SQLSTATE_UNKNOWN, 0LL, v50); return 1; } } } **(_BYTE **)(a1 + 32) = 0; v24 = plugin[11](v43, a1); if ( !v24 ) break; if ( v24 >= 0 ) { if ( **(_BYTE **)(a1 + 32) != 0xFE ) { my_set_error(a1, v24, (long long)SQLSTATE_UNKNOWN, 0LL); return 1; } goto LABEL_27; } if ( v24 != -1 ) goto LABEL_27; v31 = ma_net_safe_read(a1, a1, v25, v26, v27, v28); if ( v31 == 0xFFFFFFFF ) { v36 = 1; if ( *(_DWORD *)(a1 + 144) == 2013 ) { v37 = SQLSTATE_UNKNOWN; v38 = client_errors[55]; v39 = (unsigned int *)__errno_location(a1); my_set_error(a1, 2013, (long long)v37, v38, "reading authorization packet", *v39); } return v36; } LABEL_28: v32 = *(unsigned __int8 **)(a1 + 32); if ( *v32 != 254 ) { if ( !*v32 ) return (unsigned int)ma_read_ok_packet(a1, v32 + 1, v31); return 1; } v33 = 21; v34 = a1 + 1166; v18 = "mysql_old_password"; if ( v31 != 1 ) { v18 = (const char *)(v32 + 1); v35 = strlen(v32 + 1); v34 = (long long)&v32[v35 + 2]; v33 = v31 - v35 - 2; } v44 = v34; v45 = v33; plugin = (long long ( **)(_QWORD *, long long))mysql_client_find_plugin( a1, v18, 2, a7, a8, a9, a10, v29, v30, a13, a14, v34, v27, v28, v42); if ( !plugin ) plugin = (long long ( **)(_QWORD *, long long))&dummy_fallback_client_plugin; } if ( *(_QWORD *)(a1 + 8) && **(_BYTE **)(a1 + 32) == 0xFE ) { LABEL_27: v31 = v48; goto LABEL_28; } v36 = 1; if ( !*(_DWORD *)(a1 + 144) ) my_set_error(a1, 2000, (long long)SQLSTATE_UNKNOWN, 0LL); return v36; }
run_plugin_auth: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV qword ptr [RBP + -0x38],R8 MOV R15,RCX MOV dword ptr [RBP + -0x30],EDX MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x370] BT EAX,0x13 JC 0x00130993 LAB_0013097b: BT EAX,0x9 LEA RAX,[0x138a97] LEA R12,[0x138aaa] CMOVNC R12,RAX JMP 0x001309b0 LAB_00130993: MOV RCX,qword ptr [RBX + 0x480] TEST RCX,RCX JZ 0x001309a8 MOV R12,qword ptr [RCX + 0x8] TEST R12,R12 JNZ 0x001309b0 LAB_001309a8: MOV R12,R15 TEST R15,R15 JZ 0x0013097b LAB_001309b0: MOV RDI,RBX MOV RSI,R12 MOV EDX,0x2 CALL 0x0012a7a0 MOV R13,RAX TEST RAX,RAX JNZ 0x001309cf LEA R13,[0x14d098] LAB_001309cf: MOV dword ptr [RBX + 0x90],0x0 TEST R15,R15 JZ 0x001309f9 MOV RDI,R15 MOV RSI,R12 CALL 0x00113650 XOR ECX,ECX TEST EAX,EAX MOV EAX,dword ptr [RBP + -0x30] CMOVNZ EAX,ECX CMOVNZ R14,RCX JMP 0x001309fc LAB_001309f9: MOV EAX,dword ptr [RBP + -0x30] LAB_001309fc: MOV qword ptr [RBP + -0x30],R15 TEST R15,R15 LEA RCX,[RBP + -0x88] SETZ byte ptr [RCX + 0x48] MOV qword ptr [RCX + 0x30],R14 MOV dword ptr [RCX + 0x38],EAX LEA RAX,[0x130c46] MOV qword ptr [RCX],RAX LEA RAX,[0x130ce8] MOV qword ptr [RCX + 0x8],RAX LEA RAX,[0x131472] MOV qword ptr [RCX + 0x10],RAX MOV qword ptr [RCX + 0x18],RBX MOV qword ptr [RCX + 0x40],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RCX + 0x28],RAX LEA R15,[RBX + 0x48e] LAB_00130a50: MOV qword ptr [RBP + -0x68],R13 MOV RAX,qword ptr [RBX + 0x480] TEST RAX,RAX JZ 0x00130a7d MOV RDI,qword ptr [RAX + 0x150] TEST RDI,RDI JZ 0x00130a7d MOV RSI,R12 CALL 0x00113100 TEST RAX,RAX JZ 0x00130bf5 LAB_00130a7d: MOV RAX,qword ptr [RBX + 0x20] MOV byte ptr [RAX],0x0 LEA RDI,[RBP + -0x88] MOV RSI,RBX CALL qword ptr [R13 + 0x58] TEST EAX,EAX JZ 0x00130aa6 JS 0x00130abf MOV RCX,qword ptr [RBX + 0x20] CMP byte ptr [RCX],0xfe JZ 0x00130ac4 JMP 0x00130c16 LAB_00130aa6: CMP qword ptr [RBX + 0x8],0x0 JZ 0x00130bc9 MOV RAX,qword ptr [RBX + 0x20] CMP byte ptr [RAX],0xfe JZ 0x00130ac4 JMP 0x00130bc9 LAB_00130abf: CMP EAX,-0x1 JZ 0x00130b3f LAB_00130ac4: MOVSXD R14,dword ptr [RBP + -0x3c] LAB_00130ac8: MOV R13,qword ptr [RBX + 0x20] MOVZX EAX,byte ptr [R13] CMP EAX,0xfe JNZ 0x00130baf MOV EAX,0x15 MOV RCX,R15 LEA R12,[0x138a97] CMP R14,0x1 JZ 0x00130b10 LEA R12,[R13 + 0x1] MOV RDI,R12 CALL 0x001131c0 MOV ECX,EAX SUB R14D,EAX ADD R14D,-0x2 ADD RCX,R13 ADD RCX,0x2 MOV EAX,R14D LAB_00130b10: MOV qword ptr [RBP + -0x58],RCX MOV dword ptr [RBP + -0x50],EAX MOV RDI,RBX MOV RSI,R12 MOV EDX,0x2 CALL 0x0012a7a0 MOV R13,RAX TEST RAX,RAX JNZ 0x00130a50 LEA R13,[0x14d098] JMP 0x00130a50 LAB_00130b3f: MOV RDI,RBX CALL 0x00118237 MOV R14,RAX MOV EAX,0xffffffff CMP R14,RAX JNZ 0x00130ac8 MOV R14D,0x1 CMP dword ptr [RBX + 0x90],0x7dd JNZ 0x00130c34 LEA RAX,[0x14dd80] MOV R15,qword ptr [RAX] LEA RAX,[0x14dd90] MOV R12,qword ptr [RAX + 0x1b8] CALL 0x00113060 MOV R9D,dword ptr [RAX] LEA R8,[0x138fe7] MOV RDI,RBX MOV ESI,0x7dd MOV RDX,R15 MOV RCX,R12 XOR EAX,EAX CALL 0x001184d1 JMP 0x00130c34 LAB_00130baf: TEST EAX,EAX JNZ 0x00130c2e INC R13 MOV RDI,RBX MOV RSI,R13 MOV RDX,R14 CALL 0x0011d51e MOV R14D,EAX JMP 0x00130c34 LAB_00130bc9: MOV R14D,0x1 CMP dword ptr [RBX + 0x90],0x0 JNZ 0x00130c34 LEA RAX,[0x14dd80] MOV RDX,qword ptr [RAX] MOV RDI,RBX MOV ESI,0x7d0 XOR ECX,ECX XOR EAX,EAX CALL 0x001184d1 JMP 0x00130c34 LAB_00130bf5: LEA RAX,[0x14dd80] MOV RDX,qword ptr [RAX] MOV RDI,RBX MOV ESI,0x1392 XOR ECX,ECX MOV R8,qword ptr [RBP + -0x30] XOR EAX,EAX CALL 0x001184d1 JMP 0x00130c2e LAB_00130c16: LEA RCX,[0x14dd80] MOV RDX,qword ptr [RCX] MOV RDI,RBX MOV ESI,EAX XOR ECX,ECX XOR EAX,EAX CALL 0x001184d1 LAB_00130c2e: MOV R14D,0x1 LAB_00130c34: MOV EAX,R14D ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int4 run_plugin_auth(long param_1,char *param_2,int4 param_3,char *param_4,int8 param_5) { char *pcVar1; int *puVar2; int *puVar3; uint uVar4; int iVar5; int4 uVar6; int1 *puVar7; size_t sVar8; int *piVar9; char *pcVar10; char *pcVar11; long lVar12; code *local_90; code *local_88; code *local_80; long local_78; int1 *local_70; int8 local_68; char *local_60; int local_58; int8 local_50; int1 local_48; int local_44; int8 local_40; char *local_38; local_38 = (char *)CONCAT44(local_38._4_4_,param_3); uVar4 = (uint)*(int8 *)(param_1 + 0x370); if ((((uVar4 >> 0x13 & 1) == 0) || (((*(long *)(param_1 + 0x480) == 0 || (pcVar11 = *(char **)(*(long *)(param_1 + 0x480) + 8), pcVar11 == (char *)0x0)) && (pcVar11 = param_4, param_4 == (char *)0x0)))) && (pcVar11 = "mysql_native_password", (uVar4 >> 9 & 1) == 0)) { pcVar11 = "mysql_old_password"; } local_40 = param_5; puVar7 = (int1 *)mysql_client_find_plugin(param_1,pcVar11,2); if (puVar7 == (int1 *)0x0) { puVar7 = dummy_fallback_client_plugin; } *(int4 *)(param_1 + 0x90) = 0; local_60 = param_2; if (param_4 == (char *)0x0) { local_58 = (int)local_38; } else { iVar5 = strcmp(param_4,pcVar11); local_58 = (int)local_38; if (iVar5 != 0) { local_60 = (char *)0x0; local_58 = 0; } } local_48 = param_4 == (char *)0x0; local_90 = client_mpvio_read_packet; local_88 = client_mpvio_write_packet; local_80 = client_mpvio_info; local_50 = 0; local_68 = local_40; local_78 = param_1; local_38 = param_4; do { local_70 = puVar7; if (((*(long *)(param_1 + 0x480) != 0) && (pcVar1 = *(char **)(*(long *)(param_1 + 0x480) + 0x150), pcVar1 != (char *)0x0)) && (pcVar11 = strstr(pcVar1,pcVar11), pcVar11 == (char *)0x0)) { my_set_error(param_1,0x1392,SQLSTATE_UNKNOWN,0,local_38); goto LAB_00130c2e; } **(int1 **)(param_1 + 0x20) = 0; iVar5 = (**(code **)(puVar7 + 0x58))(&local_90,param_1); if (iVar5 == 0) { if ((*(long *)(param_1 + 8) == 0) || (**(char **)(param_1 + 0x20) != -2)) { if (*(int *)(param_1 + 0x90) != 0) { return 1; } my_set_error(param_1,2000,SQLSTATE_UNKNOWN,0); return 1; } LAB_00130ac4: lVar12 = (long)local_44; } else { if (-1 < iVar5) { if (**(char **)(param_1 + 0x20) == -2) goto LAB_00130ac4; my_set_error(param_1,iVar5,SQLSTATE_UNKNOWN,0); goto LAB_00130c2e; } if (iVar5 != -1) goto LAB_00130ac4; lVar12 = ma_net_safe_read(param_1); puVar3 = PTR_s_Lost_connection_to_server_at___s_0014df48; puVar2 = SQLSTATE_UNKNOWN; if (lVar12 == 0xffffffff) { if (*(int *)(param_1 + 0x90) != 0x7dd) { return 1; } piVar9 = __errno_location(); my_set_error(param_1,0x7dd,puVar2,puVar3,"reading authorization packet",*piVar9); return 1; } } pcVar1 = *(char **)(param_1 + 0x20); if (*pcVar1 != -2) { if (*pcVar1 == '\0') { uVar6 = ma_read_ok_packet(param_1,pcVar1 + 1,lVar12); } else { LAB_00130c2e: uVar6 = 1; } return uVar6; } iVar5 = 0x15; pcVar11 = "mysql_old_password"; pcVar10 = (char *)(param_1 + 0x48e); if (lVar12 != 1) { pcVar11 = pcVar1 + 1; sVar8 = strlen(pcVar11); iVar5 = ((int)lVar12 - (int)sVar8) + -2; pcVar10 = pcVar1 + (sVar8 & 0xffffffff) + 2; } local_60 = pcVar10; local_58 = iVar5; puVar7 = (int1 *)mysql_client_find_plugin(param_1,pcVar11,2); if (puVar7 == (int1 *)0x0) { puVar7 = dummy_fallback_client_plugin; } } while( true ); }
20,627
my_copy_8bit
eloqsql/strings/ctype-simple.c
size_t my_copy_8bit(CHARSET_INFO *cs __attribute__((unused)), char *dst, size_t dst_length, const char *src, size_t src_length, size_t nchars, MY_STRCOPY_STATUS *status) { set_if_smaller(src_length, dst_length); set_if_smaller(src_length, nchars); if (src_length) memmove(dst, src, src_length); status->m_source_end_pos= src + src_length; status->m_well_formed_error_pos= NULL; return src_length; }
O0
c
my_copy_8bit: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq 0x10(%rbp), %rax movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x28(%rbp), %rax cmpq -0x18(%rbp), %rax jbe 0x44a66 movq -0x18(%rbp), %rax movq %rax, -0x28(%rbp) jmp 0x44a68 jmp 0x44a6a movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jbe 0x44a7c movq -0x30(%rbp), %rax movq %rax, -0x28(%rbp) jmp 0x44a7e cmpq $0x0, -0x28(%rbp) je 0x44a96 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0x24500 movq -0x20(%rbp), %rcx addq -0x28(%rbp), %rcx movq 0x10(%rbp), %rax movq %rcx, (%rax) movq 0x10(%rbp), %rax movq $0x0, 0x8(%rax) movq -0x28(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
my_copy_8bit: push rbp mov rbp, rsp sub rsp, 30h mov rax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov rax, [rbp+var_28] cmp rax, [rbp+var_18] jbe short loc_44A66 mov rax, [rbp+var_18] mov [rbp+var_28], rax loc_44A66: jmp short $+2 loc_44A68: jmp short $+2 loc_44A6A: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jbe short loc_44A7C mov rax, [rbp+var_30] mov [rbp+var_28], rax loc_44A7C: jmp short $+2 loc_44A7E: cmp [rbp+var_28], 0 jz short loc_44A96 mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] call _memmove loc_44A96: mov rcx, [rbp+var_20] add rcx, [rbp+var_28] mov rax, [rbp+arg_0] mov [rax], rcx mov rax, [rbp+arg_0] mov qword ptr [rax+8], 0 mov rax, [rbp+var_28] add rsp, 30h pop rbp retn
unsigned long long my_copy_8bit( long long a1, long long a2, unsigned long long a3, long long a4, unsigned long long a5, unsigned long long a6, _QWORD *a7) { unsigned long long v8; // [rsp+8h] [rbp-28h] v8 = a5; if ( a5 > a3 ) v8 = a3; if ( v8 > a6 ) v8 = a6; if ( v8 ) memmove(a2, a4, v8); *a7 = v8 + a4; a7[1] = 0LL; return v8; }
my_copy_8bit: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x18] JBE 0x00144a66 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x28],RAX LAB_00144a66: JMP 0x00144a68 LAB_00144a68: JMP 0x00144a6a LAB_00144a6a: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JBE 0x00144a7c MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x28],RAX LAB_00144a7c: JMP 0x00144a7e LAB_00144a7e: CMP qword ptr [RBP + -0x28],0x0 JZ 0x00144a96 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] CALL 0x00124500 LAB_00144a96: MOV RCX,qword ptr [RBP + -0x20] ADD RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RAX + 0x8],0x0 MOV RAX,qword ptr [RBP + -0x28] ADD RSP,0x30 POP RBP RET
size_t my_copy_8bit(int8 param_1,void *param_2,ulong param_3,void *param_4,ulong param_5, ulong param_6,long *param_7) { ulong local_30; local_30 = param_5; if (param_3 < param_5) { local_30 = param_3; } if (param_6 < local_30) { local_30 = param_6; } if (local_30 != 0) { memmove(param_2,param_4,local_30); } *param_7 = (long)param_4 + local_30; param_7[1] = 0; return local_30; }
20,628
ma_ft_store
eloqsql/storage/maria/ma_ft_update.c
static int _ma_ft_store(MARIA_HA *info, uint keynr, uchar *keybuf, FT_WORD *wlist, my_off_t filepos) { DBUG_ENTER("_ma_ft_store"); for (; wlist->pos; wlist++) { MARIA_KEY key; _ma_ft_make_key(info, &key, keynr, keybuf, wlist, filepos); if (_ma_ck_write(info, &key)) DBUG_RETURN(1); } DBUG_RETURN(0); }
O0
c
ma_ft_store: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq -0x28(%rbp), %rax cmpq $0x0, (%rax) je 0x8ce9d movq -0x10(%rbp), %rdi movl -0x14(%rbp), %edx movq -0x20(%rbp), %rcx movq -0x28(%rbp), %r8 movq -0x30(%rbp), %r9 leaq -0x50(%rbp), %rsi callq 0x8cc30 movq -0x10(%rbp), %rdi leaq -0x50(%rbp), %rsi callq 0x825a0 cmpb $0x0, %al je 0x8ce8d jmp 0x8ce84 movl $0x1, -0x4(%rbp) jmp 0x8cea6 jmp 0x8ce8f movq -0x28(%rbp), %rax addq $0x18, %rax movq %rax, -0x28(%rbp) jmp 0x8ce4b jmp 0x8ce9f movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nop
_ma_ft_store: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 loc_8CE4B: mov rax, [rbp+var_28] cmp qword ptr [rax], 0 jz short loc_8CE9D mov rdi, [rbp+var_10] mov edx, [rbp+var_14] mov rcx, [rbp+var_20] mov r8, [rbp+var_28] mov r9, [rbp+var_30] lea rsi, [rbp+var_50] call _ma_ft_make_key mov rdi, [rbp+var_10] lea rsi, [rbp+var_50] call _ma_ck_write cmp al, 0 jz short loc_8CE8D jmp short $+2 loc_8CE84: mov [rbp+var_4], 1 jmp short loc_8CEA6 loc_8CE8D: jmp short $+2 loc_8CE8F: mov rax, [rbp+var_28] add rax, 18h mov [rbp+var_28], rax jmp short loc_8CE4B loc_8CE9D: jmp short $+2 loc_8CE9F: mov [rbp+var_4], 0 loc_8CEA6: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long ma_ft_store(_DWORD *a1, unsigned int a2, _BYTE *a3, _QWORD *a4, long long a5) { _BYTE v6[32]; // [rsp+0h] [rbp-50h] BYREF long long v7; // [rsp+20h] [rbp-30h] _QWORD *v8; // [rsp+28h] [rbp-28h] _BYTE *v9; // [rsp+30h] [rbp-20h] unsigned int v10; // [rsp+3Ch] [rbp-14h] _DWORD *v11; // [rsp+40h] [rbp-10h] v11 = a1; v10 = a2; v9 = a3; v8 = a4; v7 = a5; while ( *v8 ) { ma_ft_make_key(v11, (long long)v6, v10, v9, (long long)v8, v7); if ( ma_ck_write((long long)v11, (long long)v6) ) return 1; v8 += 3; } return 0; }
_ma_ft_store: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 LAB_0018ce4b: MOV RAX,qword ptr [RBP + -0x28] CMP qword ptr [RAX],0x0 JZ 0x0018ce9d MOV RDI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x28] MOV R9,qword ptr [RBP + -0x30] LEA RSI,[RBP + -0x50] CALL 0x0018cc30 MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0x50] CALL 0x001825a0 CMP AL,0x0 JZ 0x0018ce8d JMP 0x0018ce84 LAB_0018ce84: MOV dword ptr [RBP + -0x4],0x1 JMP 0x0018cea6 LAB_0018ce8d: JMP 0x0018ce8f LAB_0018ce8f: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x18 MOV qword ptr [RBP + -0x28],RAX JMP 0x0018ce4b LAB_0018ce9d: JMP 0x0018ce9f LAB_0018ce9f: MOV dword ptr [RBP + -0x4],0x0 LAB_0018cea6: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int4 _ma_ft_store(int8 param_1,int4 param_2,int8 param_3,long *param_4, int8 param_5) { char cVar1; int1 local_58 [32]; int8 local_38; long *local_30; int8 local_28; int4 local_1c; int8 local_18; local_38 = param_5; local_30 = param_4; local_28 = param_3; local_1c = param_2; local_18 = param_1; while( true ) { if (*local_30 == 0) { return 0; } _ma_ft_make_key(local_18,local_58,local_1c,local_28,local_30,local_38); cVar1 = _ma_ck_write(local_18,local_58); if (cVar1 != '\0') break; local_30 = local_30 + 3; } return 1; }
20,629
ma_ft_store
eloqsql/storage/maria/ma_ft_update.c
static int _ma_ft_store(MARIA_HA *info, uint keynr, uchar *keybuf, FT_WORD *wlist, my_off_t filepos) { DBUG_ENTER("_ma_ft_store"); for (; wlist->pos; wlist++) { MARIA_KEY key; _ma_ft_make_key(info, &key, keynr, keybuf, wlist, filepos); if (_ma_ck_write(info, &key)) DBUG_RETURN(1); } DBUG_RETURN(0); }
O3
c
ma_ft_store: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %r8, -0x30(%rbp) xorl %eax, %eax cmpq $0x0, (%rcx) je 0x6a98c movq %rcx, %r12 movq %rdx, %r15 movl %esi, %r13d movq %rdi, %rbx leaq -0x50(%rbp), %r14 movq %rbx, %rdi movq %r14, %rsi movl %r13d, %edx movq %r15, %rcx movq %r12, %r8 movq -0x30(%rbp), %r9 callq 0x6a7f5 movq %rbx, %rdi movq %r14, %rsi callq 0x64714 testb %al, %al jne 0x6a987 cmpq $0x0, 0x18(%r12) leaq 0x18(%r12), %r12 jne 0x6a94f xorl %eax, %eax jmp 0x6a98c movl $0x1, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ma_ft_store: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov [rbp+var_30], r8 xor eax, eax cmp qword ptr [rcx], 0 jz short loc_6A98C mov r12, rcx mov r15, rdx mov r13d, esi mov rbx, rdi lea r14, [rbp+var_50] loc_6A94F: mov rdi, rbx mov rsi, r14 mov edx, r13d mov rcx, r15 mov r8, r12 mov r9, [rbp+var_30] call _ma_ft_make_key mov rdi, rbx mov rsi, r14 call _ma_ck_write test al, al jnz short loc_6A987 cmp qword ptr [r12+18h], 0 lea r12, [r12+18h] jnz short loc_6A94F xor eax, eax jmp short loc_6A98C loc_6A987: mov eax, 1 loc_6A98C: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ma_ft_store(_DWORD *a1, unsigned int a2, char *a3, _QWORD *a4, long long a5, __m128i a6) { long long result; // rax long long i; // r12 _BYTE v10[32]; // [rsp+0h] [rbp-50h] BYREF long long v11; // [rsp+20h] [rbp-30h] v11 = a5; result = 0LL; if ( *a4 ) { for ( i = (long long)a4; ; i += 24LL ) { ma_ft_make_key(a1, (long long)v10, a2, a3, i, v11, a6); if ( ma_ck_write((long long)a1, (long long)v10) ) break; if ( *(_QWORD *)(i + 24) == 0LL ) return 0LL; } return 1LL; } return result; }
_ma_ft_store: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV qword ptr [RBP + -0x30],R8 XOR EAX,EAX CMP qword ptr [RCX],0x0 JZ 0x0016a98c MOV R12,RCX MOV R15,RDX MOV R13D,ESI MOV RBX,RDI LEA R14,[RBP + -0x50] LAB_0016a94f: MOV RDI,RBX MOV RSI,R14 MOV EDX,R13D MOV RCX,R15 MOV R8,R12 MOV R9,qword ptr [RBP + -0x30] CALL 0x0016a7f5 MOV RDI,RBX MOV RSI,R14 CALL 0x00164714 TEST AL,AL JNZ 0x0016a987 CMP qword ptr [R12 + 0x18],0x0 LEA R12,[R12 + 0x18] JNZ 0x0016a94f XOR EAX,EAX JMP 0x0016a98c LAB_0016a987: MOV EAX,0x1 LAB_0016a98c: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 _ma_ft_store(int8 param_1,int4 param_2,int8 param_3,long *param_4, int8 param_5) { long *plVar1; char cVar2; int1 local_58 [32]; int8 local_38; if (*param_4 != 0) { local_38 = param_5; do { _ma_ft_make_key(param_1,local_58,param_2,param_3,param_4,local_38); cVar2 = _ma_ck_write(param_1,local_58); if (cVar2 != '\0') { return 1; } plVar1 = param_4 + 3; param_4 = param_4 + 3; } while (*plVar1 != 0); } return 0; }
20,630
ImageFromChannel
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c
Image ImageFromChannel(Image image, int selectedChannel) { Image result = { 0 }; // Security check to avoid program crash if ((image.data == NULL) || (image.width == 0) || (image.height == 0)) return result; // Check selected channel is valid if (selectedChannel < 0) { TRACELOG(LOG_WARNING, "Channel cannot be negative. Setting channel to 0."); selectedChannel = 0; } if (image.format == PIXELFORMAT_UNCOMPRESSED_GRAYSCALE || image.format == PIXELFORMAT_UNCOMPRESSED_R32 || image.format == PIXELFORMAT_UNCOMPRESSED_R16) { if (selectedChannel > 0) { TRACELOG(LOG_WARNING, "This image has only 1 channel. Setting channel to it."); selectedChannel = 0; } } else if (image.format == PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA) { if (selectedChannel > 1) { TRACELOG(LOG_WARNING, "This image has only 2 channels. Setting channel to alpha."); selectedChannel = 1; } } else if (image.format == PIXELFORMAT_UNCOMPRESSED_R5G6B5 || image.format == PIXELFORMAT_UNCOMPRESSED_R8G8B8 || image.format == PIXELFORMAT_UNCOMPRESSED_R32G32B32 || image.format == PIXELFORMAT_UNCOMPRESSED_R16G16B16) { if (selectedChannel > 2) { TRACELOG(LOG_WARNING, "This image has only 3 channels. Setting channel to red."); selectedChannel = 0; } } // Check for RGBA formats if (selectedChannel > 3) { TRACELOG(LOG_WARNING, "ImageFromChannel supports channels 0 to 3 (rgba). Setting channel to alpha."); selectedChannel = 3; } // TODO: Consider other one-channel formats: R16, R32 result.format = PIXELFORMAT_UNCOMPRESSED_GRAYSCALE; result.height = image.height; result.width = image.width; result.mipmaps = 1; unsigned char *pixels = (unsigned char *)RL_CALLOC(image.width*image.height, sizeof(unsigned char)); // Values from 0 to 255 if (image.format >= PIXELFORMAT_COMPRESSED_DXT1_RGB) TRACELOG(LOG_WARNING, "IMAGE: Pixel data retrieval not supported for compressed image formats"); else { for (int i = 0, k = 0; i < image.width*image.height; i++) { float pixelValue = -1; switch (image.format) { case PIXELFORMAT_UNCOMPRESSED_GRAYSCALE: { pixelValue = (float)((unsigned char *)image.data)[i + selectedChannel]/255.0f; } break; case PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA: { pixelValue = (float)((unsigned char *)image.data)[k + selectedChannel]/255.0f; k += 2; } break; case PIXELFORMAT_UNCOMPRESSED_R5G5B5A1: { unsigned short pixel = ((unsigned short *)image.data)[i]; if (selectedChannel == 0) pixelValue = (float)((pixel & 0b1111100000000000) >> 11)*(1.0f/31); else if (selectedChannel == 1) pixelValue = (float)((pixel & 0b0000011111000000) >> 6)*(1.0f/31); else if (selectedChannel == 2) pixelValue = (float)((pixel & 0b0000000000111110) >> 1)*(1.0f/31); else if (selectedChannel == 3) pixelValue = ((pixel & 0b0000000000000001) == 0)? 0.0f : 1.0f; } break; case PIXELFORMAT_UNCOMPRESSED_R5G6B5: { unsigned short pixel = ((unsigned short *)image.data)[i]; if (selectedChannel == 0) pixelValue = (float)((pixel & 0b1111100000000000) >> 11)*(1.0f/31); else if (selectedChannel == 1) pixelValue = (float)((pixel & 0b0000011111100000) >> 5)*(1.0f/63); else if (selectedChannel == 2) pixelValue = (float)(pixel & 0b0000000000011111)*(1.0f/31); } break; case PIXELFORMAT_UNCOMPRESSED_R4G4B4A4: { unsigned short pixel = ((unsigned short *)image.data)[i]; if (selectedChannel == 0) pixelValue = (float)((pixel & 0b1111000000000000) >> 12)*(1.0f/15); else if (selectedChannel == 1) pixelValue = (float)((pixel & 0b0000111100000000) >> 8)*(1.0f/15); else if (selectedChannel == 2) pixelValue = (float)((pixel & 0b0000000011110000) >> 4)*(1.0f/15); else if (selectedChannel == 3) pixelValue = (float)(pixel & 0b0000000000001111)*(1.0f/15); } break; case PIXELFORMAT_UNCOMPRESSED_R8G8B8A8: { pixelValue = (float)((unsigned char *)image.data)[k + selectedChannel]/255.0f; k += 4; } break; case PIXELFORMAT_UNCOMPRESSED_R8G8B8: { pixelValue = (float)((unsigned char *)image.data)[k + selectedChannel]/255.0f; k += 3; } break; case PIXELFORMAT_UNCOMPRESSED_R32: { pixelValue = ((float *)image.data)[k]; k += 1; } break; case PIXELFORMAT_UNCOMPRESSED_R32G32B32: { pixelValue = ((float *)image.data)[k + selectedChannel]; k += 3; } break; case PIXELFORMAT_UNCOMPRESSED_R32G32B32A32: { pixelValue = ((float *)image.data)[k + selectedChannel]; k += 4; } break; case PIXELFORMAT_UNCOMPRESSED_R16: { pixelValue = HalfToFloat(((unsigned short *)image.data)[k]); k += 1; } break; case PIXELFORMAT_UNCOMPRESSED_R16G16B16: { pixelValue = HalfToFloat(((unsigned short *)image.data)[k+selectedChannel]); k += 3; } break; case PIXELFORMAT_UNCOMPRESSED_R16G16B16A16: { pixelValue = HalfToFloat(((unsigned short *)image.data)[k + selectedChannel]); k += 4; } break; default: break; } pixels[i] = (unsigned char)(pixelValue*255); } } result.data = pixels; return result; }
O1
c
ImageFromChannel: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %r12 xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq $0x0, 0x10(%rdi) movq 0x50(%rsp), %rdx testq %rdx, %rdx sete %al movl 0x58(%rsp), %ebp testl %ebp, %ebp sete %cl orb %al, %cl movl 0x5c(%rsp), %ebx testl %ebx, %ebx sete %al orb %cl, %al jne 0x9bc00 movl %esi, %r14d leaq 0x50(%rsp), %r15 testl %esi, %esi movq %rdx, (%rsp) jns 0x9b8b0 leaq 0x57614(%rip), %rsi # 0xf2eb5 xorl %r14d, %r14d movl $0x4, %edi xorl %eax, %eax callq 0xbfa73 movl 0x14(%r15), %r13d cmpl $0x7, %r13d jg 0x9b8db cmpl $0x1, %r13d je 0x9b8e7 cmpl $0x2, %r13d jne 0x9b8fd cmpl $0x1, %r14d jbe 0x9b93a movl $0x1, %r15d leaq 0x57644(%rip), %rsi # 0xf2f1d jmp 0x9b92b cmpl $0xb, %r13d je 0x9b8e7 cmpl $0x8, %r13d jne 0x9b8fd xorl %r15d, %r15d testl %r14d, %r14d je 0x9b8f8 leaq 0x575f1(%rip), %rsi # 0xf2ee7 jmp 0x9b92b xorl %r14d, %r14d jmp 0x9b93a leal -0x3(%r13), %eax cmpl $0x2, %eax setb %al cmpl $0x9, %r13d sete %cl cmpl $0xc, %r13d sete %dl cmpl $0x3, %r14d jb 0x9b93a orb %dl, %cl orb %al, %cl je 0x9b93a xorl %r15d, %r15d leaq 0x5762c(%rip), %rsi # 0xf2f57 movl $0x4, %edi xorl %eax, %eax callq 0xbfa73 movl %r15d, %r14d cmpl $0x4, %r14d jl 0x9b959 leaq 0x57648(%rip), %rsi # 0xf2f8f movl $0x4, %edi xorl %eax, %eax callq 0xbfa73 movl $0x3, %r14d movl %ebx, 0xc(%r12) movl %ebp, 0x8(%r12) movabsq $0x100000001, %rax # imm = 0x100000001 movq %r12, 0x10(%rsp) movq %rax, 0x10(%r12) imull %ebp, %ebx movslq %ebx, %rdi movl $0x1, %esi callq 0x9330 movq %rax, %r15 cmpl $0xd, %r13d jle 0x9b9a8 leaq 0x57644(%rip), %rsi # 0xf2fdb movl $0x4, %edi xorl %eax, %eax callq 0xbfa73 jmp 0x9bbf7 testl %ebx, %ebx movq (%rsp), %rcx jle 0x9bbf7 movslq %r14d, %rax movl %ebx, %ebp addq %rcx, %rax movq %rax, 0x8(%rsp) xorl %ebx, %ebx decl %r13d movss 0x3dffa(%rip), %xmm1 # 0xd99c8 leaq 0x53e07(%rip), %rdx # 0xef7dc xorl %r12d, %r12d cmpl $0xc, %r13d ja 0x9babf movslq (%rdx,%r13,4), %rax addq %rdx, %rax jmpq *%rax movq 0x8(%rsp), %rax movzbl (%rax,%rbx), %eax xorps %xmm0, %xmm0 cvtsi2ss %eax, %xmm0 divss %xmm1, %xmm0 jmp 0x9bbdf leal (%r12,%r14), %eax cltq movzwl (%rcx,%rax,2), %edi callq 0x9bc12 leaq 0x53dc2(%rip), %rdx # 0xef7dc movss 0x3dfa6(%rip), %xmm1 # 0xd99c8 movq (%rsp), %rcx jmp 0x9bb8a movzwl (%rcx,%rbx,2), %eax cmpl $0x2, %r14d je 0x9bb95 cmpl $0x1, %r14d je 0x9bb90 testl %r14d, %r14d je 0x9bab4 xorps %xmm0, %xmm0 testb $0x1, %al je 0x9bbdf movss 0x3dee9(%rip), %xmm0 # 0xd9944 jmp 0x9bbdf leal (%r12,%r14), %eax cltq movzwl (%rcx,%rax,2), %edi callq 0x9bc12 leaq 0x53d66(%rip), %rdx # 0xef7dc movss 0x3df4a(%rip), %xmm1 # 0xd99c8 movq (%rsp), %rcx jmp 0x9bb52 leal (%r12,%r14), %eax cltq movss (%rcx,%rax,4), %xmm0 jmp 0x9bb52 movzwl (%rcx,%rbx,2), %eax cmpl $0x2, %r14d je 0x9bb97 cmpl $0x1, %r14d je 0x9bbab testl %r14d, %r14d jne 0x9babf movzwl %ax, %eax shrl $0xb, %eax jmp 0x9bb9a movss 0x3de81(%rip), %xmm0 # 0xd9948 jmp 0x9bbdf leal (%r12,%r14), %eax cltq movzbl (%rcx,%rax), %eax xorps %xmm0, %xmm0 cvtsi2ss %eax, %xmm0 divss %xmm1, %xmm0 jmp 0x9bb8a movslq %r12d, %rax movss (%rcx,%rax,4), %xmm0 jmp 0x9bb7a leal (%r12,%r14), %eax cltq movzbl (%rcx,%rax), %eax xorps %xmm0, %xmm0 cvtsi2ss %eax, %xmm0 divss %xmm1, %xmm0 addl $0x2, %r12d jmp 0x9bbdf movzwl (%rcx,%rbx,2), %eax cmpl $0x2, %r14d je 0x9bbc7 cmpl $0x1, %r14d je 0x9bbc2 testl %r14d, %r14d jne 0x9bbca movzwl %ax, %eax shrl $0xc, %eax jmp 0x9bbcd leal (%r12,%r14), %eax cltq movzbl (%rcx,%rax), %eax xorps %xmm0, %xmm0 cvtsi2ss %eax, %xmm0 divss %xmm1, %xmm0 addl $0x4, %r12d jmp 0x9bbdf movslq %r12d, %rax movzwl (%rcx,%rax,2), %edi callq 0x9bc12 leaq 0x53c6e(%rip), %rdx # 0xef7dc movss 0x3de52(%rip), %xmm1 # 0xd99c8 movq (%rsp), %rcx incl %r12d jmp 0x9bbdf leal (%r12,%r14), %eax cltq movss (%rcx,%rax,4), %xmm0 addl $0x3, %r12d jmp 0x9bbdf shrl $0x6, %eax jmp 0x9bb97 shrl %eax andl $0x1f, %eax xorps %xmm0, %xmm0 cvtsi2ss %eax, %xmm0 mulss 0x537a3(%rip), %xmm0 # 0xef34c jmp 0x9bbdf shrl $0x5, %eax andl $0x3f, %eax xorps %xmm0, %xmm0 cvtsi2ss %eax, %xmm0 mulss 0x53790(%rip), %xmm0 # 0xef350 jmp 0x9bbdf shrl $0x8, %eax jmp 0x9bbca shrl $0x4, %eax andl $0xf, %eax movzwl %ax, %eax xorps %xmm0, %xmm0 cvtsi2ss %eax, %xmm0 mulss 0x53769(%rip), %xmm0 # 0xef348 mulss %xmm1, %xmm0 cvttss2si %xmm0, %eax movb %al, (%r15,%rbx) incq %rbx cmpq %rbx, %rbp jne 0x9b9d8 movq 0x10(%rsp), %r12 movq %r15, (%r12) movq %r12, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ImageFromChannel: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r12, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov qword ptr [rdi+10h], 0 mov rdx, [rsp+48h+arg_0] test rdx, rdx setz al mov ebp, [rsp+48h+arg_8] test ebp, ebp setz cl or cl, al mov ebx, [rsp+48h+arg_C] test ebx, ebx setz al or al, cl jnz loc_9BC00 mov r14d, esi lea r15, [rsp+48h+arg_0] test esi, esi mov [rsp+48h+var_48], rdx jns short loc_9B8B0 lea rsi, aChannelCannotB; "Channel cannot be negative. Setting cha"... xor r14d, r14d mov edi, 4 xor eax, eax call TraceLog loc_9B8B0: mov r13d, [r15+14h] cmp r13d, 7 jg short loc_9B8DB cmp r13d, 1 jz short loc_9B8E7 cmp r13d, 2 jnz short loc_9B8FD cmp r14d, 1 jbe short loc_9B93A mov r15d, 1 lea rsi, aThisImageHasOn; "This image has only 2 channels. Setting"... jmp short loc_9B92B loc_9B8DB: cmp r13d, 0Bh jz short loc_9B8E7 cmp r13d, 8 jnz short loc_9B8FD loc_9B8E7: xor r15d, r15d test r14d, r14d jz short loc_9B8F8 lea rsi, aThisImageHasOn_0; "This image has only 1 channel. Setting "... jmp short loc_9B92B loc_9B8F8: xor r14d, r14d jmp short loc_9B93A loc_9B8FD: lea eax, [r13-3] cmp eax, 2 setb al cmp r13d, 9 setz cl cmp r13d, 0Ch setz dl cmp r14d, 3 jb short loc_9B93A or cl, dl or cl, al jz short loc_9B93A xor r15d, r15d lea rsi, aThisImageHasOn_1; "This image has only 3 channels. Setting"... loc_9B92B: mov edi, 4 xor eax, eax call TraceLog mov r14d, r15d loc_9B93A: cmp r14d, 4 jl short loc_9B959 lea rsi, aImagefromchann; "ImageFromChannel supports channels 0 to"... mov edi, 4 xor eax, eax call TraceLog mov r14d, 3 loc_9B959: mov [r12+0Ch], ebx mov [r12+8], ebp mov rax, 100000001h mov [rsp+48h+var_38], r12 mov [r12+10h], rax imul ebx, ebp movsxd rdi, ebx mov esi, 1 call _calloc mov r15, rax cmp r13d, 0Dh jle short loc_9B9A8 lea rsi, aImagePixelData; "IMAGE: Pixel data retrieval not support"... mov edi, 4 xor eax, eax call TraceLog jmp loc_9BBF7 loc_9B9A8: test ebx, ebx mov rcx, [rsp+48h+var_48] jle loc_9BBF7 movsxd rax, r14d mov ebp, ebx add rax, rcx mov [rsp+48h+var_40], rax xor ebx, ebx dec r13d movss xmm1, cs:dword_D99C8 lea rdx, jpt_9B9E9 xor r12d, r12d loc_9B9D8: cmp r13d, 0Ch; switch 13 cases ja def_9B9E9; jumptable 000000000009B9E9 default case movsxd rax, ds:(jpt_9B9E9 - 0EF7DCh)[rdx+r13*4] add rax, rdx jmp rax; switch jump loc_9B9EB: mov rax, [rsp+48h+var_40]; jumptable 000000000009B9E9 case 0 movzx eax, byte ptr [rax+rbx] xorps xmm0, xmm0 cvtsi2ss xmm0, eax divss xmm0, xmm1 jmp loc_9BBDF loc_9BA04: lea eax, [r12+r14]; jumptable 000000000009B9E9 case 11 cdqe movzx edi, word ptr [rcx+rax*2] call HalfToFloat lea rdx, jpt_9B9E9 movss xmm1, cs:dword_D99C8 mov rcx, [rsp+48h+var_48] jmp loc_9BB8A loc_9BA2B: movzx eax, word ptr [rcx+rbx*2]; jumptable 000000000009B9E9 case 4 cmp r14d, 2 jz loc_9BB95 cmp r14d, 1 jz loc_9BB90 test r14d, r14d jz short loc_9BAB4 xorps xmm0, xmm0 test al, 1 jz loc_9BBDF movss xmm0, cs:dword_D9944 jmp loc_9BBDF loc_9BA60: lea eax, [r12+r14]; jumptable 000000000009B9E9 case 12 cdqe movzx edi, word ptr [rcx+rax*2] call HalfToFloat lea rdx, jpt_9B9E9 movss xmm1, cs:dword_D99C8 mov rcx, [rsp+48h+var_48] jmp loc_9BB52 loc_9BA87: lea eax, [r12+r14]; jumptable 000000000009B9E9 case 9 cdqe movss xmm0, dword ptr [rcx+rax*4] jmp loc_9BB52 loc_9BA97: movzx eax, word ptr [rcx+rbx*2]; jumptable 000000000009B9E9 case 2 cmp r14d, 2 jz loc_9BB97 cmp r14d, 1 jz loc_9BBAB test r14d, r14d jnz short def_9B9E9; jumptable 000000000009B9E9 default case loc_9BAB4: movzx eax, ax shr eax, 0Bh jmp loc_9BB9A def_9B9E9: movss xmm0, cs:dword_D9948; jumptable 000000000009B9E9 default case jmp loc_9BBDF loc_9BACC: lea eax, [r12+r14]; jumptable 000000000009B9E9 case 3 cdqe movzx eax, byte ptr [rcx+rax] xorps xmm0, xmm0 cvtsi2ss xmm0, eax divss xmm0, xmm1 jmp loc_9BB8A loc_9BAE6: movsxd rax, r12d; jumptable 000000000009B9E9 case 7 movss xmm0, dword ptr [rcx+rax*4] jmp loc_9BB7A loc_9BAF3: lea eax, [r12+r14]; jumptable 000000000009B9E9 case 1 cdqe movzx eax, byte ptr [rcx+rax] xorps xmm0, xmm0 cvtsi2ss xmm0, eax divss xmm0, xmm1 add r12d, 2 jmp loc_9BBDF loc_9BB11: movzx eax, word ptr [rcx+rbx*2]; jumptable 000000000009B9E9 case 5 cmp r14d, 2 jz loc_9BBC7 cmp r14d, 1 jz loc_9BBC2 test r14d, r14d jnz loc_9BBCA movzx eax, ax shr eax, 0Ch jmp loc_9BBCD loc_9BB3D: lea eax, [r12+r14]; jumptable 000000000009B9E9 case 6 cdqe movzx eax, byte ptr [rcx+rax] xorps xmm0, xmm0 cvtsi2ss xmm0, eax divss xmm0, xmm1 loc_9BB52: add r12d, 4 jmp loc_9BBDF loc_9BB5B: movsxd rax, r12d; jumptable 000000000009B9E9 case 10 movzx edi, word ptr [rcx+rax*2] call HalfToFloat lea rdx, jpt_9B9E9 movss xmm1, cs:dword_D99C8 mov rcx, [rsp+48h+var_48] loc_9BB7A: inc r12d jmp short loc_9BBDF loc_9BB7F: lea eax, [r12+r14]; jumptable 000000000009B9E9 case 8 cdqe movss xmm0, dword ptr [rcx+rax*4] loc_9BB8A: add r12d, 3 jmp short loc_9BBDF loc_9BB90: shr eax, 6 jmp short loc_9BB97 loc_9BB95: shr eax, 1 loc_9BB97: and eax, 1Fh loc_9BB9A: xorps xmm0, xmm0 cvtsi2ss xmm0, eax mulss xmm0, cs:dword_EF34C jmp short loc_9BBDF loc_9BBAB: shr eax, 5 and eax, 3Fh xorps xmm0, xmm0 cvtsi2ss xmm0, eax mulss xmm0, cs:dword_EF350 jmp short loc_9BBDF loc_9BBC2: shr eax, 8 jmp short loc_9BBCA loc_9BBC7: shr eax, 4 loc_9BBCA: and eax, 0Fh loc_9BBCD: movzx eax, ax xorps xmm0, xmm0 cvtsi2ss xmm0, eax mulss xmm0, cs:dword_EF348 loc_9BBDF: mulss xmm0, xmm1 cvttss2si eax, xmm0 mov [r15+rbx], al inc rbx cmp rbp, rbx jnz loc_9B9D8 loc_9BBF7: mov r12, [rsp+48h+var_38] mov [r12], r15 loc_9BC00: mov rax, r12 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ImageFromChannel( long long a1, int a2, long long a3, long long a4, int a5, int a6, long long a7, long long a8, long long a9) { long long v9; // r12 float v10; // xmm0_4 int v11; // edx unsigned __int8 v12; // cl int v13; // r14d int v14; // r15d const char *v15; // rsi int v16; // ebx int v17; // edx char v18; // cl int v19; // r8d int v20; // r9d long long v21; // r15 long long v22; // rcx long long v23; // rbp long long v24; // rbx int v25; // r12d unsigned int v26; // eax int v27; // eax unsigned int v28; // eax v9 = a1; v10 = 0.0; *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; v11 = a7; v12 = a7 == 0 || (_DWORD)a8 == 0; if ( v12 | (HIDWORD(a8) == 0) ) return v9; v13 = a2; if ( a2 < 0 ) { v13 = 0; TraceLog(4, (unsigned int)"Channel cannot be negative. Setting channel to 0.", a7, v12, a5, a6); } if ( SHIDWORD(a9) > 7 ) { if ( HIDWORD(a9) != 11 && HIDWORD(a9) != 8 ) goto LABEL_14; } else if ( HIDWORD(a9) != 1 ) { if ( HIDWORD(a9) == 2 ) { if ( (unsigned int)v13 > 1 ) { v14 = 1; v15 = "This image has only 2 channels. Setting channel to alpha."; LABEL_17: TraceLog(4, (_DWORD)v15, v11, v12, a5, a6); v13 = v14; goto LABEL_18; } goto LABEL_18; } LABEL_14: v12 = HIDWORD(a9) == 9; LOBYTE(v11) = HIDWORD(a9) == 12; if ( (unsigned int)v13 < 3 ) goto LABEL_18; v12 |= ((unsigned int)(HIDWORD(a9) - 3) < 2) | (unsigned __int8)v11; if ( !v12 ) goto LABEL_18; v14 = 0; v15 = "This image has only 3 channels. Setting channel to red."; goto LABEL_17; } v14 = 0; if ( v13 ) { v15 = "This image has only 1 channel. Setting channel to it."; goto LABEL_17; } v13 = 0; LABEL_18: if ( v13 >= 4 ) { TraceLog( 4, (unsigned int)"ImageFromChannel supports channels 0 to 3 (rgba). Setting channel to alpha.", v11, v12, a5, a6); v13 = 3; } *(_QWORD *)(a1 + 8) = a8; *(_QWORD *)(a1 + 16) = 0x100000001LL; v16 = a8 * HIDWORD(a8); v21 = calloc((int)a8 * HIDWORD(a8), 1LL); if ( SHIDWORD(a9) <= 13 ) { v22 = a7; if ( v16 > 0 ) { v23 = (unsigned int)v16; v24 = 0LL; v25 = 0; while ( 1 ) { switch ( HIDWORD(a9) ) { case 1: v10 = (float)*(unsigned __int8 *)(a7 + v13 + v24) / 255.0; goto LABEL_61; case 2: v10 = (float)*(unsigned __int8 *)(v22 + v25 + v13) / 255.0; v25 += 2; goto LABEL_61; case 3: v26 = *(unsigned __int16 *)(v22 + 2 * v24); if ( v13 == 2 ) goto LABEL_54; if ( v13 != 1 ) { if ( v13 ) goto LABEL_38; goto LABEL_37; } v10 = (float)((v26 >> 5) & 0x3F) * 0.015873017; goto LABEL_61; case 4: v10 = (float)*(unsigned __int8 *)(v22 + v25 + v13) / 255.0; goto LABEL_51; case 5: v26 = *(unsigned __int16 *)(v22 + 2 * v24); switch ( v13 ) { case 2: v26 >>= 1; goto LABEL_54; case 1: v26 >>= 6; LABEL_54: v27 = v26 & 0x1F; goto LABEL_55; case 0: LABEL_37: v27 = (unsigned __int16)v26 >> 11; LABEL_55: v10 = (float)v27 * 0.032258064; goto LABEL_61; } v10 = 0.0; if ( (v26 & 1) != 0 ) v10 = 1.0; LABEL_61: v10 = v10 * 255.0; *(_BYTE *)(v21 + v24++) = (int)v10; if ( v23 == v24 ) goto LABEL_62; break; case 6: v28 = *(unsigned __int16 *)(v22 + 2 * v24); switch ( v13 ) { case 2: v28 >>= 4; break; case 1: v28 >>= 8; break; case 0: v28 = (unsigned __int16)v28 >> 12; goto LABEL_60; } LOWORD(v28) = v28 & 0xF; LABEL_60: v10 = (float)(unsigned __int16)v28 * 0.06666667; goto LABEL_61; case 7: v10 = (float)*(unsigned __int8 *)(v22 + v25 + v13) / 255.0; goto LABEL_47; case 8: v10 = *(float *)(v22 + 4LL * v25); goto LABEL_49; case 9: v10 = *(float *)(v22 + 4LL * (v25 + v13)); goto LABEL_51; case 0xA: v10 = *(float *)(v22 + 4LL * (v25 + v13)); goto LABEL_47; case 0xB: HalfToFloat(*(unsigned __int16 *)(v22 + 2LL * v25)); v22 = a7; LABEL_49: ++v25; goto LABEL_61; case 0xC: HalfToFloat(*(unsigned __int16 *)(v22 + 2LL * (v25 + v13))); v22 = a7; LABEL_51: v25 += 3; goto LABEL_61; case 0xD: HalfToFloat(*(unsigned __int16 *)(v22 + 2LL * (v25 + v13))); v22 = a7; LABEL_47: v25 += 4; goto LABEL_61; default: LABEL_38: v10 = -1.0; goto LABEL_61; } } } } else { TraceLog( 4, (unsigned int)"IMAGE: Pixel data retrieval not supported for compressed image formats", v17, v18, v19, v20); } LABEL_62: v9 = a1; *(_QWORD *)a1 = v21; return v9; }
ImageFromChannel: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R12,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x10],0x0 MOV RDX,qword ptr [RSP + 0x50] TEST RDX,RDX SETZ AL MOV EBP,dword ptr [RSP + 0x58] TEST EBP,EBP SETZ CL OR CL,AL MOV EBX,dword ptr [RSP + 0x5c] TEST EBX,EBX SETZ AL OR AL,CL JNZ 0x0019bc00 MOV R14D,ESI LEA R15,[RSP + 0x50] TEST ESI,ESI MOV qword ptr [RSP],RDX JNS 0x0019b8b0 LEA RSI,[0x1f2eb5] XOR R14D,R14D MOV EDI,0x4 XOR EAX,EAX CALL 0x001bfa73 LAB_0019b8b0: MOV R13D,dword ptr [R15 + 0x14] CMP R13D,0x7 JG 0x0019b8db CMP R13D,0x1 JZ 0x0019b8e7 CMP R13D,0x2 JNZ 0x0019b8fd CMP R14D,0x1 JBE 0x0019b93a MOV R15D,0x1 LEA RSI,[0x1f2f1d] JMP 0x0019b92b LAB_0019b8db: CMP R13D,0xb JZ 0x0019b8e7 CMP R13D,0x8 JNZ 0x0019b8fd LAB_0019b8e7: XOR R15D,R15D TEST R14D,R14D JZ 0x0019b8f8 LEA RSI,[0x1f2ee7] JMP 0x0019b92b LAB_0019b8f8: XOR R14D,R14D JMP 0x0019b93a LAB_0019b8fd: LEA EAX,[R13 + -0x3] CMP EAX,0x2 SETC AL CMP R13D,0x9 SETZ CL CMP R13D,0xc SETZ DL CMP R14D,0x3 JC 0x0019b93a OR CL,DL OR CL,AL JZ 0x0019b93a XOR R15D,R15D LEA RSI,[0x1f2f57] LAB_0019b92b: MOV EDI,0x4 XOR EAX,EAX CALL 0x001bfa73 MOV R14D,R15D LAB_0019b93a: CMP R14D,0x4 JL 0x0019b959 LEA RSI,[0x1f2f8f] MOV EDI,0x4 XOR EAX,EAX CALL 0x001bfa73 MOV R14D,0x3 LAB_0019b959: MOV dword ptr [R12 + 0xc],EBX MOV dword ptr [R12 + 0x8],EBP MOV RAX,0x100000001 MOV qword ptr [RSP + 0x10],R12 MOV qword ptr [R12 + 0x10],RAX IMUL EBX,EBP MOVSXD RDI,EBX MOV ESI,0x1 CALL 0x00109330 MOV R15,RAX CMP R13D,0xd JLE 0x0019b9a8 LEA RSI,[0x1f2fdb] MOV EDI,0x4 XOR EAX,EAX CALL 0x001bfa73 JMP 0x0019bbf7 LAB_0019b9a8: TEST EBX,EBX MOV RCX,qword ptr [RSP] JLE 0x0019bbf7 MOVSXD RAX,R14D MOV EBP,EBX ADD RAX,RCX MOV qword ptr [RSP + 0x8],RAX XOR EBX,EBX DEC R13D MOVSS XMM1,dword ptr [0x001d99c8] LEA RDX,[0x1ef7dc] XOR R12D,R12D LAB_0019b9d8: CMP R13D,0xc JA 0x0019babf MOVSXD RAX,dword ptr [RDX + R13*0x4] ADD RAX,RDX switchD: JMP RAX caseD_1: MOV RAX,qword ptr [RSP + 0x8] MOVZX EAX,byte ptr [RAX + RBX*0x1] XORPS XMM0,XMM0 CVTSI2SS XMM0,EAX DIVSS XMM0,XMM1 JMP 0x0019bbdf caseD_c: LEA EAX,[R12 + R14*0x1] CDQE MOVZX EDI,word ptr [RCX + RAX*0x2] CALL 0x0019bc12 LEA RDX,[0x1ef7dc] MOVSS XMM1,dword ptr [0x001d99c8] MOV RCX,qword ptr [RSP] JMP 0x0019bb8a caseD_5: MOVZX EAX,word ptr [RCX + RBX*0x2] CMP R14D,0x2 JZ 0x0019bb95 CMP R14D,0x1 JZ 0x0019bb90 TEST R14D,R14D JZ 0x0019bab4 XORPS XMM0,XMM0 TEST AL,0x1 JZ 0x0019bbdf MOVSS XMM0,dword ptr [0x001d9944] JMP 0x0019bbdf caseD_d: LEA EAX,[R12 + R14*0x1] CDQE MOVZX EDI,word ptr [RCX + RAX*0x2] CALL 0x0019bc12 LEA RDX,[0x1ef7dc] MOVSS XMM1,dword ptr [0x001d99c8] MOV RCX,qword ptr [RSP] JMP 0x0019bb52 caseD_a: LEA EAX,[R12 + R14*0x1] CDQE MOVSS XMM0,dword ptr [RCX + RAX*0x4] JMP 0x0019bb52 caseD_3: MOVZX EAX,word ptr [RCX + RBX*0x2] CMP R14D,0x2 JZ 0x0019bb97 CMP R14D,0x1 JZ 0x0019bbab TEST R14D,R14D JNZ 0x0019babf LAB_0019bab4: MOVZX EAX,AX SHR EAX,0xb JMP 0x0019bb9a default: MOVSS XMM0,dword ptr [0x001d9948] JMP 0x0019bbdf caseD_4: LEA EAX,[R12 + R14*0x1] CDQE MOVZX EAX,byte ptr [RCX + RAX*0x1] XORPS XMM0,XMM0 CVTSI2SS XMM0,EAX DIVSS XMM0,XMM1 JMP 0x0019bb8a caseD_8: MOVSXD RAX,R12D MOVSS XMM0,dword ptr [RCX + RAX*0x4] JMP 0x0019bb7a caseD_2: LEA EAX,[R12 + R14*0x1] CDQE MOVZX EAX,byte ptr [RCX + RAX*0x1] XORPS XMM0,XMM0 CVTSI2SS XMM0,EAX DIVSS XMM0,XMM1 ADD R12D,0x2 JMP 0x0019bbdf caseD_6: MOVZX EAX,word ptr [RCX + RBX*0x2] CMP R14D,0x2 JZ 0x0019bbc7 CMP R14D,0x1 JZ 0x0019bbc2 TEST R14D,R14D JNZ 0x0019bbca MOVZX EAX,AX SHR EAX,0xc JMP 0x0019bbcd caseD_7: LEA EAX,[R12 + R14*0x1] CDQE MOVZX EAX,byte ptr [RCX + RAX*0x1] XORPS XMM0,XMM0 CVTSI2SS XMM0,EAX DIVSS XMM0,XMM1 LAB_0019bb52: ADD R12D,0x4 JMP 0x0019bbdf caseD_b: MOVSXD RAX,R12D MOVZX EDI,word ptr [RCX + RAX*0x2] CALL 0x0019bc12 LEA RDX,[0x1ef7dc] MOVSS XMM1,dword ptr [0x001d99c8] MOV RCX,qword ptr [RSP] LAB_0019bb7a: INC R12D JMP 0x0019bbdf caseD_9: LEA EAX,[R12 + R14*0x1] CDQE MOVSS XMM0,dword ptr [RCX + RAX*0x4] LAB_0019bb8a: ADD R12D,0x3 JMP 0x0019bbdf LAB_0019bb90: SHR EAX,0x6 JMP 0x0019bb97 LAB_0019bb95: SHR EAX,0x1 LAB_0019bb97: AND EAX,0x1f LAB_0019bb9a: XORPS XMM0,XMM0 CVTSI2SS XMM0,EAX MULSS XMM0,dword ptr [0x001ef34c] JMP 0x0019bbdf LAB_0019bbab: SHR EAX,0x5 AND EAX,0x3f XORPS XMM0,XMM0 CVTSI2SS XMM0,EAX MULSS XMM0,dword ptr [0x001ef350] JMP 0x0019bbdf LAB_0019bbc2: SHR EAX,0x8 JMP 0x0019bbca LAB_0019bbc7: SHR EAX,0x4 LAB_0019bbca: AND EAX,0xf LAB_0019bbcd: MOVZX EAX,AX XORPS XMM0,XMM0 CVTSI2SS XMM0,EAX MULSS XMM0,dword ptr [0x001ef348] LAB_0019bbdf: MULSS XMM0,XMM1 CVTTSS2SI EAX,XMM0 MOV byte ptr [R15 + RBX*0x1],AL INC RBX CMP RBP,RBX JNZ 0x0019b9d8 LAB_0019bbf7: MOV R12,qword ptr [RSP + 0x10] MOV qword ptr [R12],R15 LAB_0019bc00: MOV RAX,R12 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int8 * ImageFromChannel(int8 *param_1,uint param_2) { ushort uVar1; void *pvVar2; uint uVar3; ulong uVar4; char *pcVar5; int iVar6; float fVar7; float fVar8; long in_stack_00000008; int iStack0000000000000010; int iStack0000000000000014; int8 in_stack_00000018; *param_1 = 0; param_1[1] = 0; param_1[2] = 0; if (iStack0000000000000014 == 0 || (iStack0000000000000010 == 0 || in_stack_00000008 == 0)) { return param_1; } if ((int)param_2 < 0) { param_2 = 0; TraceLog(4,"Channel cannot be negative. Setting channel to 0."); } if (in_stack_00000018._4_4_ < 8) { if (in_stack_00000018._4_4_ == 1) { LAB_0019b8e7: if (param_2 == 0) { param_2 = 0; goto LAB_0019b93a; } pcVar5 = "This image has only 1 channel. Setting channel to it."; param_2 = 0; } else { if (in_stack_00000018._4_4_ != 2) goto LAB_0019b8fd; if (param_2 < 2) goto LAB_0019b93a; pcVar5 = "This image has only 2 channels. Setting channel to alpha."; param_2 = 1; } } else { if ((in_stack_00000018._4_4_ == 0xb) || (in_stack_00000018._4_4_ == 8)) goto LAB_0019b8e7; LAB_0019b8fd: if ((param_2 < 3) || ((in_stack_00000018._4_4_ != 9 && in_stack_00000018._4_4_ != 0xc) && 1 < in_stack_00000018._4_4_ - 3U)) goto LAB_0019b93a; pcVar5 = "This image has only 3 channels. Setting channel to red."; param_2 = 0; } TraceLog(4,pcVar5); LAB_0019b93a: if (3 < (int)param_2) { TraceLog(4,"ImageFromChannel supports channels 0 to 3 (rgba). Setting channel to alpha."); param_2 = 3; } *(int *)((long)param_1 + 0xc) = iStack0000000000000014; *(int *)(param_1 + 1) = iStack0000000000000010; param_1[2] = 0x100000001; uVar3 = iStack0000000000000014 * iStack0000000000000010; pvVar2 = calloc((long)(int)uVar3,1); if (in_stack_00000018._4_4_ < 0xe) { if (0 < (int)uVar3) { uVar4 = 0; iVar6 = 0; fVar8 = DAT_001d99c8; do { fVar7 = DAT_001d9948; switch(in_stack_00000018._4_4_) { case 1: fVar7 = (float)*(byte *)((int)param_2 + in_stack_00000008 + uVar4) / fVar8; break; case 2: fVar7 = (float)*(byte *)(in_stack_00000008 + (int)(iVar6 + param_2)) / fVar8; iVar6 = iVar6 + 2; break; case 3: uVar1 = *(ushort *)(in_stack_00000008 + uVar4 * 2); if (param_2 == 2) goto LAB_0019bb97; if (param_2 == 1) { fVar7 = (float)(uVar1 >> 5 & 0x3f) * _DAT_001ef350; break; } if (param_2 != 0) break; LAB_0019bab4: uVar1 = uVar1 >> 0xb; goto LAB_0019bb9a; case 4: fVar7 = (float)*(byte *)(in_stack_00000008 + (int)(iVar6 + param_2)) / fVar8; goto LAB_0019bb8a; case 5: uVar1 = *(ushort *)(in_stack_00000008 + uVar4 * 2); if (param_2 == 2) { uVar1 = uVar1 >> 1; } else { if (param_2 != 1) { if (param_2 == 0) goto LAB_0019bab4; fVar7 = 0.0; if ((uVar1 & 1) != 0) { fVar7 = DAT_001d9944; } break; } uVar1 = uVar1 >> 6; } LAB_0019bb97: uVar1 = uVar1 & 0x1f; LAB_0019bb9a: fVar7 = (float)uVar1 * DAT_001ef34c; break; case 6: uVar1 = *(ushort *)(in_stack_00000008 + uVar4 * 2); if (param_2 == 2) { uVar1 = uVar1 >> 4; LAB_0019bbca: uVar1 = uVar1 & 0xf; } else { if (param_2 == 1) { uVar1 = uVar1 >> 8; goto LAB_0019bbca; } if (param_2 != 0) goto LAB_0019bbca; uVar1 = uVar1 >> 0xc; } fVar7 = (float)uVar1 * DAT_001ef348; break; case 7: fVar7 = (float)*(byte *)(in_stack_00000008 + (int)(iVar6 + param_2)) / fVar8; goto LAB_0019bb52; case 8: fVar7 = *(float *)(in_stack_00000008 + (long)iVar6 * 4); goto LAB_0019bb7a; case 9: fVar7 = *(float *)(in_stack_00000008 + (long)(int)(iVar6 + param_2) * 4); goto LAB_0019bb8a; case 10: fVar7 = *(float *)(in_stack_00000008 + (long)(int)(iVar6 + param_2) * 4); goto LAB_0019bb52; case 0xb: fVar7 = (float)HalfToFloat(*(int2 *)(in_stack_00000008 + (long)iVar6 * 2)); fVar8 = DAT_001d99c8; LAB_0019bb7a: iVar6 = iVar6 + 1; break; case 0xc: fVar7 = (float)HalfToFloat(*(int2 *) (in_stack_00000008 + (long)(int)(iVar6 + param_2) * 2)); fVar8 = DAT_001d99c8; LAB_0019bb8a: iVar6 = iVar6 + 3; break; case 0xd: fVar7 = (float)HalfToFloat(*(int2 *) (in_stack_00000008 + (long)(int)(iVar6 + param_2) * 2)); fVar8 = DAT_001d99c8; LAB_0019bb52: iVar6 = iVar6 + 4; } *(char *)((long)pvVar2 + uVar4) = (char)(int)(fVar7 * fVar8); uVar4 = uVar4 + 1; } while (uVar3 != uVar4); } } else { TraceLog(4,"IMAGE: Pixel data retrieval not supported for compressed image formats"); } *param_1 = pvVar2; return param_1; }
20,631
ImageFromChannel
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c
Image ImageFromChannel(Image image, int selectedChannel) { Image result = { 0 }; // Security check to avoid program crash if ((image.data == NULL) || (image.width == 0) || (image.height == 0)) return result; // Check selected channel is valid if (selectedChannel < 0) { TRACELOG(LOG_WARNING, "Channel cannot be negative. Setting channel to 0."); selectedChannel = 0; } if (image.format == PIXELFORMAT_UNCOMPRESSED_GRAYSCALE || image.format == PIXELFORMAT_UNCOMPRESSED_R32 || image.format == PIXELFORMAT_UNCOMPRESSED_R16) { if (selectedChannel > 0) { TRACELOG(LOG_WARNING, "This image has only 1 channel. Setting channel to it."); selectedChannel = 0; } } else if (image.format == PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA) { if (selectedChannel > 1) { TRACELOG(LOG_WARNING, "This image has only 2 channels. Setting channel to alpha."); selectedChannel = 1; } } else if (image.format == PIXELFORMAT_UNCOMPRESSED_R5G6B5 || image.format == PIXELFORMAT_UNCOMPRESSED_R8G8B8 || image.format == PIXELFORMAT_UNCOMPRESSED_R32G32B32 || image.format == PIXELFORMAT_UNCOMPRESSED_R16G16B16) { if (selectedChannel > 2) { TRACELOG(LOG_WARNING, "This image has only 3 channels. Setting channel to red."); selectedChannel = 0; } } // Check for RGBA formats if (selectedChannel > 3) { TRACELOG(LOG_WARNING, "ImageFromChannel supports channels 0 to 3 (rgba). Setting channel to alpha."); selectedChannel = 3; } // TODO: Consider other one-channel formats: R16, R32 result.format = PIXELFORMAT_UNCOMPRESSED_GRAYSCALE; result.height = image.height; result.width = image.width; result.mipmaps = 1; unsigned char *pixels = (unsigned char *)RL_CALLOC(image.width*image.height, sizeof(unsigned char)); // Values from 0 to 255 if (image.format >= PIXELFORMAT_COMPRESSED_DXT1_RGB) TRACELOG(LOG_WARNING, "IMAGE: Pixel data retrieval not supported for compressed image formats"); else { for (int i = 0, k = 0; i < image.width*image.height; i++) { float pixelValue = -1; switch (image.format) { case PIXELFORMAT_UNCOMPRESSED_GRAYSCALE: { pixelValue = (float)((unsigned char *)image.data)[i + selectedChannel]/255.0f; } break; case PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA: { pixelValue = (float)((unsigned char *)image.data)[k + selectedChannel]/255.0f; k += 2; } break; case PIXELFORMAT_UNCOMPRESSED_R5G5B5A1: { unsigned short pixel = ((unsigned short *)image.data)[i]; if (selectedChannel == 0) pixelValue = (float)((pixel & 0b1111100000000000) >> 11)*(1.0f/31); else if (selectedChannel == 1) pixelValue = (float)((pixel & 0b0000011111000000) >> 6)*(1.0f/31); else if (selectedChannel == 2) pixelValue = (float)((pixel & 0b0000000000111110) >> 1)*(1.0f/31); else if (selectedChannel == 3) pixelValue = ((pixel & 0b0000000000000001) == 0)? 0.0f : 1.0f; } break; case PIXELFORMAT_UNCOMPRESSED_R5G6B5: { unsigned short pixel = ((unsigned short *)image.data)[i]; if (selectedChannel == 0) pixelValue = (float)((pixel & 0b1111100000000000) >> 11)*(1.0f/31); else if (selectedChannel == 1) pixelValue = (float)((pixel & 0b0000011111100000) >> 5)*(1.0f/63); else if (selectedChannel == 2) pixelValue = (float)(pixel & 0b0000000000011111)*(1.0f/31); } break; case PIXELFORMAT_UNCOMPRESSED_R4G4B4A4: { unsigned short pixel = ((unsigned short *)image.data)[i]; if (selectedChannel == 0) pixelValue = (float)((pixel & 0b1111000000000000) >> 12)*(1.0f/15); else if (selectedChannel == 1) pixelValue = (float)((pixel & 0b0000111100000000) >> 8)*(1.0f/15); else if (selectedChannel == 2) pixelValue = (float)((pixel & 0b0000000011110000) >> 4)*(1.0f/15); else if (selectedChannel == 3) pixelValue = (float)(pixel & 0b0000000000001111)*(1.0f/15); } break; case PIXELFORMAT_UNCOMPRESSED_R8G8B8A8: { pixelValue = (float)((unsigned char *)image.data)[k + selectedChannel]/255.0f; k += 4; } break; case PIXELFORMAT_UNCOMPRESSED_R8G8B8: { pixelValue = (float)((unsigned char *)image.data)[k + selectedChannel]/255.0f; k += 3; } break; case PIXELFORMAT_UNCOMPRESSED_R32: { pixelValue = ((float *)image.data)[k]; k += 1; } break; case PIXELFORMAT_UNCOMPRESSED_R32G32B32: { pixelValue = ((float *)image.data)[k + selectedChannel]; k += 3; } break; case PIXELFORMAT_UNCOMPRESSED_R32G32B32A32: { pixelValue = ((float *)image.data)[k + selectedChannel]; k += 4; } break; case PIXELFORMAT_UNCOMPRESSED_R16: { pixelValue = HalfToFloat(((unsigned short *)image.data)[k]); k += 1; } break; case PIXELFORMAT_UNCOMPRESSED_R16G16B16: { pixelValue = HalfToFloat(((unsigned short *)image.data)[k+selectedChannel]); k += 3; } break; case PIXELFORMAT_UNCOMPRESSED_R16G16B16A16: { pixelValue = HalfToFloat(((unsigned short *)image.data)[k + selectedChannel]); k += 4; } break; default: break; } pixels[i] = (unsigned char)(pixelValue*255); } } result.data = pixels; return result; }
O3
c
ImageFromChannel: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %r15 xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq $0x0, 0x10(%rdi) movq 0x60(%rsp), %rdx testq %rdx, %rdx sete %al movl 0x68(%rsp), %ebp testl %ebp, %ebp sete %cl orb %al, %cl movl 0x6c(%rsp), %ebx testl %ebx, %ebx sete %al orb %cl, %al jne 0x96220 leaq 0x60(%rsp), %r14 testl %esi, %esi movq %rdx, 0x8(%rsp) jns 0x95eeb leaq 0x571d8(%rip), %rsi # 0xed0b5 movl $0x4, %edi xorl %eax, %eax callq 0xb9db7 xorl %esi, %esi movl 0x14(%r14), %r13d cmpl $0x7, %r13d jg 0x95f15 cmpl $0x1, %r13d je 0x95f21 cmpl $0x2, %r13d jne 0x95f35 cmpl $0x1, %esi jbe 0x95f85 movl $0x1, %r14d leaq 0x5720a(%rip), %rsi # 0xed11d jmp 0x95f76 cmpl $0xb, %r13d je 0x95f21 cmpl $0x8, %r13d jne 0x95f35 xorl %r14d, %r14d testl %esi, %esi je 0x95f31 leaq 0x571b8(%rip), %rsi # 0xed0e7 jmp 0x95f76 xorl %esi, %esi jmp 0x95f85 leal -0x3(%r13), %eax cmpl $0x2, %eax setb %al cmpl $0x9, %r13d sete %cl cmpl $0xc, %r13d sete %dl cmpl $0x3, %esi jb 0x95f64 orb %dl, %cl orb %al, %cl je 0x95f64 xorl %r14d, %r14d leaq 0x571f5(%rip), %rsi # 0xed157 jmp 0x95f76 cmpl $0x4, %esi jb 0x95f85 movl $0x3, %r14d leaq 0x57219(%rip), %rsi # 0xed18f movl $0x4, %edi xorl %eax, %eax callq 0xb9db7 movl %r14d, %esi movq %rsi, (%rsp) movl %ebx, 0xc(%r15) movl %ebp, 0x8(%r15) movabsq $0x100000001, %rax # imm = 0x100000001 movq %r15, 0x20(%rsp) movq %rax, 0x10(%r15) imull %ebp, %ebx movslq %ebx, %rdi movl $0x1, %esi callq 0xa330 movq %rax, %r15 cmpl $0xd, %r13d jle 0x95fd5 leaq 0x57217(%rip), %rsi # 0xed1db movl $0x4, %edi xorl %eax, %eax callq 0xb9db7 jmp 0x96215 testl %ebx, %ebx movq 0x8(%rsp), %rdx movq (%rsp), %rsi jle 0x96215 movl %esi, %eax movl %ebx, %ebp movq %rax, 0x10(%rsp) addq %rdx, %rax movq %rax, 0x18(%rsp) xorl %r14d, %r14d decl %r13d movss 0x3db8f(%rip), %xmm1 # 0xd3b94 leaq 0x539a0(%rip), %rbx # 0xe99ac xorl %r12d, %r12d cmpl $0xc, %r13d ja 0x960dd movslq (%rbx,%r13,4), %rax addq %rbx, %rax jmpq *%rax movq 0x18(%rsp), %rax movzbl (%rax,%r14), %eax xorps %xmm0, %xmm0 cvtsi2ss %eax, %xmm0 divss %xmm1, %xmm0 jmp 0x961fd leal (%r12,%rsi), %eax cltq movzwl (%rdx,%rax,2), %edi callq 0x96232 movss 0x3db41(%rip), %xmm1 # 0xd3b94 movq (%rsp), %rsi movq 0x8(%rsp), %rdx jmp 0x9619c movzwl (%rdx,%r14,2), %eax movq 0x10(%rsp), %rcx leaq 0x5398e(%rip), %rdi # 0xe9a00 movslq (%rdi,%rcx,4), %rcx addq %rdi, %rcx jmpq *%rcx shrl $0x6, %eax jmp 0x961a4 leal (%r12,%rsi), %eax cltq movzwl (%rdx,%rax,2), %edi callq 0x96232 movss 0x3dafa(%rip), %xmm1 # 0xd3b94 movq (%rsp), %rsi movq 0x8(%rsp), %rdx jmp 0x96166 leal (%r12,%rsi), %eax cltq movss (%rdx,%rax,4), %xmm0 jmp 0x96166 movzwl (%rdx,%r14,2), %eax movq 0x10(%rsp), %rcx leaq 0x53927(%rip), %rdi # 0xe99f0 movslq (%rdi,%rcx,4), %rcx addq %rdi, %rcx jmpq *%rcx movzwl %ax, %eax shrl $0xb, %eax jmp 0x961a7 movss 0x3da3b(%rip), %xmm0 # 0xd3b20 jmp 0x961fd leal (%r12,%rsi), %eax cltq movzbl (%rdx,%rax), %eax xorps %xmm0, %xmm0 cvtsi2ss %eax, %xmm0 divss %xmm1, %xmm0 jmp 0x9619c movslq %r12d, %rax movss (%rdx,%rax,4), %xmm0 jmp 0x9618c leal (%r12,%rsi), %eax cltq movzbl (%rdx,%rax), %eax xorps %xmm0, %xmm0 cvtsi2ss %eax, %xmm0 divss %xmm1, %xmm0 addl $0x2, %r12d jmp 0x961fd movzwl (%rdx,%r14,2), %eax movq 0x10(%rsp), %rcx leaq 0x538a3(%rip), %rdi # 0xe99e0 movslq (%rdi,%rcx,4), %rcx addq %rdi, %rcx jmpq *%rcx movzwl %ax, %eax shrl $0xc, %eax jmp 0x961eb leal (%r12,%rsi), %eax cltq movzbl (%rdx,%rax), %eax xorps %xmm0, %xmm0 cvtsi2ss %eax, %xmm0 divss %xmm1, %xmm0 addl $0x4, %r12d jmp 0x961fd movslq %r12d, %rax movzwl (%rdx,%rax,2), %edi callq 0x96232 movss 0x3da11(%rip), %xmm1 # 0xd3b94 movq (%rsp), %rsi movq 0x8(%rsp), %rdx incl %r12d jmp 0x961fd leal (%r12,%rsi), %eax cltq movss (%rdx,%rax,4), %xmm0 addl $0x3, %r12d jmp 0x961fd shrl %eax andl $0x1f, %eax xorps %xmm0, %xmm0 cvtsi2ss %eax, %xmm0 mulss 0x53276(%rip), %xmm0 # 0xe942c jmp 0x961fd xorps %xmm0, %xmm0 testb $0x1, %al je 0x961fd movss 0x3d955(%rip), %xmm0 # 0xd3b1c jmp 0x961fd shrl $0x5, %eax andl $0x3f, %eax xorps %xmm0, %xmm0 cvtsi2ss %eax, %xmm0 mulss 0x53252(%rip), %xmm0 # 0xe9430 jmp 0x961fd shrl $0x8, %eax jmp 0x961e8 shrl $0x4, %eax andl $0xf, %eax movzwl %ax, %eax xorps %xmm0, %xmm0 cvtsi2ss %eax, %xmm0 mulss 0x5322b(%rip), %xmm0 # 0xe9428 mulss %xmm1, %xmm0 cvttss2si %xmm0, %eax movb %al, (%r15,%r14) incq %r14 cmpq %r14, %rbp jne 0x9600f movq 0x20(%rsp), %rax movq %r15, (%rax) movq %rax, %r15 movq %r15, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ImageFromChannel: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r15, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov qword ptr [rdi+10h], 0 mov rdx, [rsp+58h+arg_0] test rdx, rdx setz al mov ebp, [rsp+58h+arg_8] test ebp, ebp setz cl or cl, al mov ebx, [rsp+58h+arg_C] test ebx, ebx setz al or al, cl jnz loc_96220 lea r14, [rsp+58h+arg_0] test esi, esi mov [rsp+58h+var_50], rdx jns short loc_95EEB lea rsi, aChannelCannotB; "Channel cannot be negative. Setting cha"... mov edi, 4 xor eax, eax call TraceLog xor esi, esi loc_95EEB: mov r13d, [r14+14h] cmp r13d, 7 jg short loc_95F15 cmp r13d, 1 jz short loc_95F21 cmp r13d, 2 jnz short loc_95F35 cmp esi, 1 jbe short loc_95F85 mov r14d, 1 lea rsi, aThisImageHasOn; "This image has only 2 channels. Setting"... jmp short loc_95F76 loc_95F15: cmp r13d, 0Bh jz short loc_95F21 cmp r13d, 8 jnz short loc_95F35 loc_95F21: xor r14d, r14d test esi, esi jz short loc_95F31 lea rsi, aThisImageHasOn_0; "This image has only 1 channel. Setting "... jmp short loc_95F76 loc_95F31: xor esi, esi jmp short loc_95F85 loc_95F35: lea eax, [r13-3] cmp eax, 2 setb al cmp r13d, 9 setz cl cmp r13d, 0Ch setz dl cmp esi, 3 jb short loc_95F64 or cl, dl or cl, al jz short loc_95F64 xor r14d, r14d lea rsi, aThisImageHasOn_1; "This image has only 3 channels. Setting"... jmp short loc_95F76 loc_95F64: cmp esi, 4 jb short loc_95F85 def_96079: mov r14d, 3; jumptable 0000000000096079 default case lea rsi, aImagefromchann; "ImageFromChannel supports channels 0 to"... loc_95F76: mov edi, 4 xor eax, eax call TraceLog mov esi, r14d loc_95F85: mov [rsp+58h+var_58], rsi mov [r15+0Ch], ebx mov [r15+8], ebp mov rax, 100000001h mov [rsp+58h+var_38], r15 mov [r15+10h], rax imul ebx, ebp movsxd rdi, ebx mov esi, 1 call _calloc mov r15, rax cmp r13d, 0Dh jle short loc_95FD5 lea rsi, aImagePixelData; "IMAGE: Pixel data retrieval not support"... mov edi, 4 xor eax, eax call TraceLog jmp loc_96215 loc_95FD5: test ebx, ebx mov rdx, [rsp+58h+var_50] mov rsi, [rsp+58h+var_58] jle loc_96215 mov eax, esi mov ebp, ebx mov [rsp+58h+var_48], rax add rax, rdx mov [rsp+58h+var_40], rax xor r14d, r14d dec r13d movss xmm1, cs:dword_D3B94 lea rbx, jpt_96020 xor r12d, r12d loc_9600F: cmp r13d, 0Ch; switch 13 cases ja def_96020; jumptable 0000000000096020 default case movsxd rax, ds:(jpt_96020 - 0E99ACh)[rbx+r13*4] add rax, rbx jmp rax; switch jump loc_96022: mov rax, [rsp+58h+var_40]; jumptable 0000000000096020 case 0 movzx eax, byte ptr [rax+r14] xorps xmm0, xmm0 cvtsi2ss xmm0, eax divss xmm0, xmm1 jmp loc_961FD loc_9603C: lea eax, [r12+rsi]; jumptable 0000000000096020 case 11 cdqe movzx edi, word ptr [rdx+rax*2] call HalfToFloat movss xmm1, cs:dword_D3B94 mov rsi, [rsp+58h+var_58] mov rdx, [rsp+58h+var_50] jmp loc_9619C loc_96061: movzx eax, word ptr [rdx+r14*2]; jumptable 0000000000096020 case 4 mov rcx, [rsp+58h+var_48] lea rdi, jpt_96079 movsxd rcx, ds:(jpt_96079 - 0E9A00h)[rdi+rcx*4]; switch 4 cases add rcx, rdi jmp rcx; switch jump loc_9607B: shr eax, 6; jumptable 0000000000096079 case 1 jmp loc_961A4; jumptable 00000000000960D0 case 2 loc_96083: lea eax, [r12+rsi]; jumptable 0000000000096020 case 12 cdqe movzx edi, word ptr [rdx+rax*2] call HalfToFloat movss xmm1, cs:dword_D3B94 mov rsi, [rsp+58h+var_58] mov rdx, [rsp+58h+var_50] jmp loc_96166 loc_960A8: lea eax, [r12+rsi]; jumptable 0000000000096020 case 9 cdqe movss xmm0, dword ptr [rdx+rax*4] jmp loc_96166 loc_960B8: movzx eax, word ptr [rdx+r14*2]; jumptable 0000000000096020 case 2 mov rcx, [rsp+58h+var_48] lea rdi, jpt_960D0 movsxd rcx, ds:(jpt_960D0 - 0E99F0h)[rdi+rcx*4]; switch 4 cases add rcx, rdi jmp rcx; switch jump loc_960D2: movzx eax, ax; jumptable 0000000000096079 case 0 shr eax, 0Bh jmp loc_961A7 def_96020: movss xmm0, cs:dword_D3B20; jumptable 0000000000096020 default case jmp loc_961FD loc_960EA: lea eax, [r12+rsi]; jumptable 0000000000096020 case 3 cdqe movzx eax, byte ptr [rdx+rax] xorps xmm0, xmm0 cvtsi2ss xmm0, eax divss xmm0, xmm1 jmp loc_9619C loc_96104: movsxd rax, r12d; jumptable 0000000000096020 case 7 movss xmm0, dword ptr [rdx+rax*4] jmp short loc_9618C loc_9610E: lea eax, [r12+rsi]; jumptable 0000000000096020 case 1 cdqe movzx eax, byte ptr [rdx+rax] xorps xmm0, xmm0 cvtsi2ss xmm0, eax divss xmm0, xmm1 add r12d, 2 jmp loc_961FD loc_9612C: movzx eax, word ptr [rdx+r14*2]; jumptable 0000000000096020 case 5 mov rcx, [rsp+58h+var_48] lea rdi, jpt_96144 movsxd rcx, ds:(jpt_96144 - 0E99E0h)[rdi+rcx*4]; switch 4 cases add rcx, rdi jmp rcx; switch jump loc_96146: movzx eax, ax; jumptable 0000000000096144 case 0 shr eax, 0Ch jmp loc_961EB loc_96151: lea eax, [r12+rsi]; jumptable 0000000000096020 case 6 cdqe movzx eax, byte ptr [rdx+rax] xorps xmm0, xmm0 cvtsi2ss xmm0, eax divss xmm0, xmm1 loc_96166: add r12d, 4 jmp loc_961FD loc_9616F: movsxd rax, r12d; jumptable 0000000000096020 case 10 movzx edi, word ptr [rdx+rax*2] call HalfToFloat movss xmm1, cs:dword_D3B94 mov rsi, [rsp+58h+var_58] mov rdx, [rsp+58h+var_50] loc_9618C: inc r12d jmp short loc_961FD loc_96191: lea eax, [r12+rsi]; jumptable 0000000000096020 case 8 cdqe movss xmm0, dword ptr [rdx+rax*4] loc_9619C: add r12d, 3 jmp short loc_961FD loc_961A2: shr eax, 1; jumptable 0000000000096079 case 2 loc_961A4: and eax, 1Fh; jumptable 00000000000960D0 case 2 loc_961A7: xorps xmm0, xmm0 cvtsi2ss xmm0, eax mulss xmm0, cs:dword_E942C jmp short loc_961FD loc_961B8: xorps xmm0, xmm0; jumptable 0000000000096079 case 3 test al, 1 jz short loc_961FD movss xmm0, cs:dword_D3B1C jmp short loc_961FD loc_961C9: shr eax, 5; jumptable 00000000000960D0 case 1 and eax, 3Fh xorps xmm0, xmm0 cvtsi2ss xmm0, eax mulss xmm0, cs:dword_E9430 jmp short loc_961FD loc_961E0: shr eax, 8; jumptable 0000000000096144 case 1 jmp short loc_961E8; jumptable 0000000000096144 case 3 loc_961E5: shr eax, 4; jumptable 0000000000096144 case 2 loc_961E8: and eax, 0Fh; jumptable 0000000000096144 case 3 loc_961EB: movzx eax, ax xorps xmm0, xmm0 cvtsi2ss xmm0, eax mulss xmm0, cs:dword_E9428 loc_961FD: mulss xmm0, xmm1 cvttss2si eax, xmm0 mov [r15+r14], al inc r14 cmp rbp, r14 jnz loc_9600F loc_96215: mov rax, [rsp+58h+var_38] mov [rax], r15 mov r15, rax loc_96220: mov rax, r15 add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_QWORD * ImageFromChannel( long long a1, unsigned int a2, long long a3, long long a4, int a5, int a6, long long a7, long long a8, long long a9) { long long v9; // r15 float v10; // xmm0_4 long long v11; // rdx int v12; // ebp unsigned __int8 v13; // cl int v14; // ebx int v15; // r13d int v16; // r14d const char *v17; // rsi int v18; // edx char v19; // cl long long v20; // r14 int v21; // r12d unsigned int v22; // eax int v23; // eax unsigned int v24; // eax unsigned int v26; // [rsp+0h] [rbp-58h] _QWORD *v27; // [rsp+20h] [rbp-38h] v9 = a1; v10 = 0.0; *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; LODWORD(v11) = a7; v12 = a8; v13 = a7 == 0 || (_DWORD)a8 == 0; v14 = HIDWORD(a8); if ( v13 | (HIDWORD(a8) == 0) ) return (_QWORD *)v9; if ( (a2 & 0x80000000) != 0 ) { TraceLog(4, (unsigned int)"Channel cannot be negative. Setting channel to 0.", a7, v13, a5, a6); a2 = 0; } v15 = HIDWORD(a9); if ( SHIDWORD(a9) > 7 ) { if ( HIDWORD(a9) != 11 && HIDWORD(a9) != 8 ) goto LABEL_14; } else if ( HIDWORD(a9) != 1 ) { if ( HIDWORD(a9) == 2 ) { if ( a2 > 1 ) { v16 = 1; v17 = "This image has only 2 channels. Setting channel to alpha."; LABEL_19: TraceLog(4, (_DWORD)v17, v11, v13, a5, a6); a2 = v16; goto LABEL_20; } goto LABEL_20; } LABEL_14: v13 = HIDWORD(a9) == 9; LOBYTE(v11) = HIDWORD(a9) == 12; if ( a2 >= 3 ) { v13 |= ((unsigned int)(HIDWORD(a9) - 3) < 2) | (unsigned __int8)v11; if ( v13 ) { v16 = 0; v17 = "This image has only 3 channels. Setting channel to red."; goto LABEL_19; } } if ( a2 >= 4 ) { LABEL_18: v16 = 3; v17 = "ImageFromChannel supports channels 0 to 3 (rgba). Setting channel to alpha."; goto LABEL_19; } goto LABEL_20; } v16 = 0; if ( a2 ) { v17 = "This image has only 1 channel. Setting channel to it."; goto LABEL_19; } a2 = 0; LABEL_20: v26 = a2; *(_DWORD *)(v9 + 12) = v14; *(_DWORD *)(v9 + 8) = v12; v27 = (_QWORD *)v9; *(_QWORD *)(v9 + 16) = 0x100000001LL; v14 *= v12; v9 = calloc(v14, 1LL); if ( v15 <= 13 ) { v11 = a7; if ( v14 > 0 ) { v12 = v14; v20 = 0LL; --v15; v21 = 0; do { switch ( v15 ) { case 0: v10 = (float)*(unsigned __int8 *)(a7 + v26 + v20) / 255.0; break; case 1: v10 = (float)*(unsigned __int8 *)(v11 + (int)(v21 + a2)) / 255.0; v21 += 2; break; case 2: v22 = *(unsigned __int16 *)(v11 + 2 * v20); v13 = v26; switch ( a2 ) { case 0u: goto LABEL_32; case 1u: v10 = (float)((v22 >> 5) & 0x3F) * 0.015873017; goto LABEL_55; case 2u: goto LABEL_46; case 3u: goto LABEL_33; default: goto LABEL_18; } case 3: v10 = (float)*(unsigned __int8 *)(v11 + (int)(v21 + a2)) / 255.0; goto LABEL_44; case 4: v22 = *(unsigned __int16 *)(v11 + 2 * v20); v13 = v26; switch ( a2 ) { case 0u: LABEL_32: v23 = (unsigned __int16)v22 >> 11; goto LABEL_47; case 1u: v22 >>= 6; goto LABEL_46; case 2u: v22 >>= 1; LABEL_46: v23 = v22 & 0x1F; LABEL_47: v10 = (float)v23 * 0.032258064; goto LABEL_55; case 3u: v10 = 0.0; if ( (v22 & 1) != 0 ) v10 = 1.0; goto LABEL_55; default: goto LABEL_18; } case 5: v24 = *(unsigned __int16 *)(v11 + 2 * v20); v13 = v26; switch ( a2 ) { case 0u: v24 = (unsigned __int16)v24 >> 12; goto LABEL_54; case 1u: v24 >>= 8; goto LABEL_53; case 2u: v24 >>= 4; goto LABEL_53; case 3u: LABEL_53: LOWORD(v24) = v24 & 0xF; LABEL_54: v10 = (float)(unsigned __int16)v24 * 0.06666667; goto LABEL_55; default: goto LABEL_18; } case 6: v10 = (float)*(unsigned __int8 *)(v11 + (int)(v21 + a2)) / 255.0; goto LABEL_40; case 7: v10 = *(float *)(v11 + 4LL * v21); goto LABEL_42; case 8: v10 = *(float *)(v11 + 4LL * (int)(v21 + a2)); goto LABEL_44; case 9: v10 = *(float *)(v11 + 4LL * (int)(v21 + a2)); goto LABEL_40; case 10: HalfToFloat(*(unsigned __int16 *)(v11 + 2LL * v21)); a2 = v26; v11 = a7; LABEL_42: ++v21; break; case 11: HalfToFloat(*(unsigned __int16 *)(v11 + 2LL * (int)(v21 + a2))); a2 = v26; v11 = a7; LABEL_44: v21 += 3; break; case 12: HalfToFloat(*(unsigned __int16 *)(v11 + 2LL * (int)(v21 + a2))); a2 = v26; v11 = a7; LABEL_40: v21 += 4; break; default: LABEL_33: v10 = -1.0; break; } LABEL_55: v10 = v10 * 255.0; *(_BYTE *)(v9 + v20++) = (int)v10; } while ( v14 != v20 ); } } else { TraceLog( 4, (unsigned int)"IMAGE: Pixel data retrieval not supported for compressed image formats", v18, v19, a5, a6); } *v27 = v9; return v27; }
ImageFromChannel: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R15,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x10],0x0 MOV RDX,qword ptr [RSP + 0x60] TEST RDX,RDX SETZ AL MOV EBP,dword ptr [RSP + 0x68] TEST EBP,EBP SETZ CL OR CL,AL MOV EBX,dword ptr [RSP + 0x6c] TEST EBX,EBX SETZ AL OR AL,CL JNZ 0x00196220 LEA R14,[RSP + 0x60] TEST ESI,ESI MOV qword ptr [RSP + 0x8],RDX JNS 0x00195eeb LEA RSI,[0x1ed0b5] MOV EDI,0x4 XOR EAX,EAX CALL 0x001b9db7 XOR ESI,ESI LAB_00195eeb: MOV R13D,dword ptr [R14 + 0x14] CMP R13D,0x7 JG 0x00195f15 CMP R13D,0x1 JZ 0x00195f21 CMP R13D,0x2 JNZ 0x00195f35 CMP ESI,0x1 JBE 0x00195f85 MOV R14D,0x1 LEA RSI,[0x1ed11d] JMP 0x00195f76 LAB_00195f15: CMP R13D,0xb JZ 0x00195f21 CMP R13D,0x8 JNZ 0x00195f35 LAB_00195f21: XOR R14D,R14D TEST ESI,ESI JZ 0x00195f31 LEA RSI,[0x1ed0e7] JMP 0x00195f76 LAB_00195f31: XOR ESI,ESI JMP 0x00195f85 LAB_00195f35: LEA EAX,[R13 + -0x3] CMP EAX,0x2 SETC AL CMP R13D,0x9 SETZ CL CMP R13D,0xc SETZ DL CMP ESI,0x3 JC 0x00195f64 OR CL,DL OR CL,AL JZ 0x00195f64 XOR R14D,R14D LEA RSI,[0x1ed157] JMP 0x00195f76 LAB_00195f64: CMP ESI,0x4 JC 0x00195f85 MOV R14D,0x3 LEA RSI,[0x1ed18f] LAB_00195f76: MOV EDI,0x4 XOR EAX,EAX CALL 0x001b9db7 MOV ESI,R14D LAB_00195f85: MOV qword ptr [RSP],RSI MOV dword ptr [R15 + 0xc],EBX MOV dword ptr [R15 + 0x8],EBP MOV RAX,0x100000001 MOV qword ptr [RSP + 0x20],R15 MOV qword ptr [R15 + 0x10],RAX IMUL EBX,EBP MOVSXD RDI,EBX MOV ESI,0x1 CALL 0x0010a330 MOV R15,RAX CMP R13D,0xd JLE 0x00195fd5 LEA RSI,[0x1ed1db] MOV EDI,0x4 XOR EAX,EAX CALL 0x001b9db7 JMP 0x00196215 LAB_00195fd5: TEST EBX,EBX MOV RDX,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP] JLE 0x00196215 MOV EAX,ESI MOV EBP,EBX MOV qword ptr [RSP + 0x10],RAX ADD RAX,RDX MOV qword ptr [RSP + 0x18],RAX XOR R14D,R14D DEC R13D MOVSS XMM1,dword ptr [0x001d3b94] LEA RBX,[0x1e99ac] XOR R12D,R12D LAB_0019600f: CMP R13D,0xc JA 0x001960dd MOVSXD RAX,dword ptr [RBX + R13*0x4] ADD RAX,RBX switchD: JMP RAX caseD_1: MOV RAX,qword ptr [RSP + 0x18] MOVZX EAX,byte ptr [RAX + R14*0x1] XORPS XMM0,XMM0 CVTSI2SS XMM0,EAX DIVSS XMM0,XMM1 JMP 0x001961fd caseD_c: LEA EAX,[R12 + RSI*0x1] CDQE MOVZX EDI,word ptr [RDX + RAX*0x2] CALL 0x00196232 MOVSS XMM1,dword ptr [0x001d3b94] MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] JMP 0x0019619c caseD_5: MOVZX EAX,word ptr [RDX + R14*0x2] MOV RCX,qword ptr [RSP + 0x10] LEA RDI,[0x1e9a00] MOVSXD RCX,dword ptr [RDI + RCX*0x4] ADD RCX,RDI JMP RCX caseD_d: LEA EAX,[R12 + RSI*0x1] CDQE MOVZX EDI,word ptr [RDX + RAX*0x2] CALL 0x00196232 MOVSS XMM1,dword ptr [0x001d3b94] MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] JMP 0x00196166 caseD_a: LEA EAX,[R12 + RSI*0x1] CDQE MOVSS XMM0,dword ptr [RDX + RAX*0x4] JMP 0x00196166 caseD_3: MOVZX EAX,word ptr [RDX + R14*0x2] MOV RCX,qword ptr [RSP + 0x10] LEA RDI,[0x1e99f0] MOVSXD RCX,dword ptr [RDI + RCX*0x4] ADD RCX,RDI JMP RCX default: MOVSS XMM0,dword ptr [0x001d3b20] JMP 0x001961fd caseD_4: LEA EAX,[R12 + RSI*0x1] CDQE MOVZX EAX,byte ptr [RDX + RAX*0x1] XORPS XMM0,XMM0 CVTSI2SS XMM0,EAX DIVSS XMM0,XMM1 JMP 0x0019619c caseD_8: MOVSXD RAX,R12D MOVSS XMM0,dword ptr [RDX + RAX*0x4] JMP 0x0019618c caseD_2: LEA EAX,[R12 + RSI*0x1] CDQE MOVZX EAX,byte ptr [RDX + RAX*0x1] XORPS XMM0,XMM0 CVTSI2SS XMM0,EAX DIVSS XMM0,XMM1 ADD R12D,0x2 JMP 0x001961fd caseD_6: MOVZX EAX,word ptr [RDX + R14*0x2] MOV RCX,qword ptr [RSP + 0x10] LEA RDI,[0x1e99e0] MOVSXD RCX,dword ptr [RDI + RCX*0x4] ADD RCX,RDI JMP RCX caseD_7: LEA EAX,[R12 + RSI*0x1] CDQE MOVZX EAX,byte ptr [RDX + RAX*0x1] XORPS XMM0,XMM0 CVTSI2SS XMM0,EAX DIVSS XMM0,XMM1 LAB_00196166: ADD R12D,0x4 JMP 0x001961fd caseD_b: MOVSXD RAX,R12D MOVZX EDI,word ptr [RDX + RAX*0x2] CALL 0x00196232 MOVSS XMM1,dword ptr [0x001d3b94] MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] LAB_0019618c: INC R12D JMP 0x001961fd caseD_9: LEA EAX,[R12 + RSI*0x1] CDQE MOVSS XMM0,dword ptr [RDX + RAX*0x4] LAB_0019619c: ADD R12D,0x3 JMP 0x001961fd LAB_001961fd: MULSS XMM0,XMM1 CVTTSS2SI EAX,XMM0 MOV byte ptr [R15 + R14*0x1],AL INC R14 CMP RBP,R14 JNZ 0x0019600f LAB_00196215: MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX],R15 MOV R15,RAX LAB_00196220: MOV RAX,R15 ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 * ImageFromChannel(int8 *param_1,uint param_2) { int iVar1; void *pvVar2; ulong uVar3; int8 *puVar4; uint uVar5; char *pcVar6; int iVar7; ulong uVar8; float fVar9; float fVar10; long in_stack_00000008; int iStack0000000000000010; int iStack0000000000000014; int8 in_stack_00000018; *param_1 = 0; param_1[1] = 0; param_1[2] = 0; if (iStack0000000000000014 == 0 || (iStack0000000000000010 == 0 || in_stack_00000008 == 0)) { return param_1; } if ((int)param_2 < 0) { TraceLog(4); param_2 = 0; } if (in_stack_00000018._4_4_ < 8) { if (in_stack_00000018._4_4_ == 1) { LAB_00195f21: if (param_2 == 0) { param_2 = 0; goto LAB_00195f85; } pcVar6 = "This image has only 1 channel. Setting channel to it."; param_2 = 0; } else { if (in_stack_00000018._4_4_ != 2) goto LAB_00195f35; if (param_2 < 2) goto LAB_00195f85; pcVar6 = "This image has only 2 channels. Setting channel to alpha."; param_2 = 1; } } else { if ((in_stack_00000018._4_4_ == 0xb) || (in_stack_00000018._4_4_ == 8)) goto LAB_00195f21; LAB_00195f35: if ((param_2 < 3) || ((in_stack_00000018._4_4_ != 9 && in_stack_00000018._4_4_ != 0xc) && 1 < in_stack_00000018._4_4_ - 3U)) { if (param_2 < 4) goto LAB_00195f85; pcVar6 = "ImageFromChannel supports channels 0 to 3 (rgba). Setting channel to alpha."; param_2 = 3; } else { pcVar6 = "This image has only 3 channels. Setting channel to red."; param_2 = 0; } } TraceLog(4,pcVar6); LAB_00195f85: *(int *)((long)param_1 + 0xc) = iStack0000000000000014; *(int *)(param_1 + 1) = iStack0000000000000010; param_1[2] = 0x100000001; uVar5 = iStack0000000000000014 * iStack0000000000000010; pvVar2 = calloc((long)(int)uVar5,1); if (in_stack_00000018._4_4_ < 0xe) { if (0 < (int)uVar5) { uVar3 = (ulong)param_2; uVar8 = 0; iVar7 = 0; fVar10 = DAT_001d3b94; do { fVar9 = DAT_001d3b20; switch(in_stack_00000018._4_4_) { case 1: fVar9 = (float)*(byte *)(uVar3 + in_stack_00000008 + uVar8) / fVar10; break; case 2: iVar1 = iVar7 + param_2; iVar7 = iVar7 + 2; fVar9 = (float)*(byte *)(in_stack_00000008 + iVar1) / fVar10; break; case 3: /* WARNING: Could not recover jumptable at 0x001960d0. Too many branches */ /* WARNING: Treating indirect jump as call */ puVar4 = (int8 *)(*(code *)(&DAT_001e99f0 + *(int *)(&DAT_001e99f0 + uVar3 * 4)))(); return puVar4; case 4: fVar9 = (float)*(byte *)(in_stack_00000008 + (int)(iVar7 + param_2)) / fVar10; goto LAB_0019619c; case 5: /* WARNING: Could not recover jumptable at 0x00196079. Too many branches */ /* WARNING: Treating indirect jump as call */ puVar4 = (int8 *)(*(code *)(&DAT_001e9a00 + *(int *)(&DAT_001e9a00 + uVar3 * 4)))(); return puVar4; case 6: /* WARNING: Could not recover jumptable at 0x00196144. Too many branches */ /* WARNING: Treating indirect jump as call */ puVar4 = (int8 *)(*(code *)(&DAT_001e99e0 + *(int *)(&DAT_001e99e0 + uVar3 * 4)))(); return puVar4; case 7: fVar9 = (float)*(byte *)(in_stack_00000008 + (int)(iVar7 + param_2)) / fVar10; goto LAB_00196166; case 8: fVar9 = *(float *)(in_stack_00000008 + (long)iVar7 * 4); goto LAB_0019618c; case 9: fVar9 = *(float *)(in_stack_00000008 + (long)(int)(iVar7 + param_2) * 4); goto LAB_0019619c; case 10: fVar9 = *(float *)(in_stack_00000008 + (long)(int)(iVar7 + param_2) * 4); goto LAB_00196166; case 0xb: fVar9 = (float)HalfToFloat(*(int2 *)(in_stack_00000008 + (long)iVar7 * 2)); fVar10 = DAT_001d3b94; LAB_0019618c: iVar7 = iVar7 + 1; break; case 0xc: fVar9 = (float)HalfToFloat(*(int2 *) (in_stack_00000008 + (long)(int)(iVar7 + param_2) * 2)); fVar10 = DAT_001d3b94; LAB_0019619c: iVar7 = iVar7 + 3; break; case 0xd: fVar9 = (float)HalfToFloat(*(int2 *) (in_stack_00000008 + (long)(int)(iVar7 + param_2) * 2)); fVar10 = DAT_001d3b94; LAB_00196166: iVar7 = iVar7 + 4; } *(char *)((long)pvVar2 + uVar8) = (char)(int)(fVar9 * fVar10); uVar8 = uVar8 + 1; } while (uVar5 != uVar8); } } else { TraceLog(4,"IMAGE: Pixel data retrieval not supported for compressed image formats"); } *param_1 = pvVar2; return param_1; }
20,632
mysql_stmt_prepare_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_stmt_prepare_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_stmt_prepare, (parms->stmt, parms->query, parms->length), parms->stmt->mysql, int, r_int) }
O0
c
mysql_stmt_prepare_start_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x38(%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rax movq 0x8(%rax), %rsi movq -0x10(%rbp), %rax movq 0x10(%rax), %rdx callq 0x2a870 movl %eax, -0x14(%rbp) movl -0x14(%rbp), %ecx movq -0x20(%rbp), %rax movl %ecx, 0x8(%rax) movq -0x20(%rbp), %rax movl $0x0, (%rax) addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
mysql_stmt_prepare_start_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+38h] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax] mov rax, [rbp+var_10] mov rsi, [rax+8] mov rax, [rbp+var_10] mov rdx, [rax+10h] call mysql_stmt_prepare mov [rbp+var_14], eax mov ecx, [rbp+var_14] mov rax, [rbp+var_20] mov [rax+8], ecx mov rax, [rbp+var_20] mov dword ptr [rax], 0 add rsp, 20h pop rbp retn
_DWORD * mysql_stmt_prepare_start_internal(long long *a1) { _DWORD *result; // rax _DWORD *v2; // [rsp+0h] [rbp-20h] v2 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*a1 + 56) + 1152LL) + 40LL); v2[2] = mysql_stmt_prepare(*a1, a1[1], a1[2]); result = v2; *v2 = 0; return result; }
mysql_stmt_prepare_start_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x10] CALL 0x0012a870 MOV dword ptr [RBP + -0x14],EAX MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x0 ADD RSP,0x20 POP RBP RET
void mysql_stmt_prepare_start_internal(long *param_1) { int4 *puVar1; int4 uVar2; puVar1 = *(int4 **)(*(long *)(*(long *)(*param_1 + 0x38) + 0x480) + 0x28); uVar2 = mysql_stmt_prepare(*param_1,param_1[1],param_1[2]); puVar1[2] = uVar2; *puVar1 = 0; return; }
20,633
flush_bits
eloqsql/storage/maria/aria_pack.c
static void flush_bits(void) { int bits; ulonglong bit_buffer; bits= file_buffer.bits & ~7; bit_buffer= file_buffer.bitbucket >> bits; bits= BITS_SAVED - bits; while (bits > 0) { bits-= 8; *file_buffer.pos++= (uchar) (bit_buffer >> bits); } if (file_buffer.pos >= file_buffer.end) flush_buffer(~ (ulong) 0); file_buffer.bits= BITS_SAVED; file_buffer.bitbucket= 0; }
O3
c
flush_bits: pushq %rbp movq %rsp, %rbp movl 0x3d3c72(%rip), %ecx # 0x40a068 andl $-0x8, %ecx movq 0x3d3c70(%rip), %rdx # 0x40a070 shrq %cl, %rdx movq 0x3d3c46(%rip), %rax # 0x40a050 cmpl $0x3f, %ecx jg 0x36445 movl $0x40, %esi subl %ecx, %esi movl $0x48, %edi subl %ecx, %edi addq $-0x8, %rsi movl %esi, %ecx andb $-0x8, %cl movq %rdx, %r8 shrq %cl, %r8 movb %r8b, (%rax) incq %rax addl $-0x8, %edi addq $-0x8, %rsi cmpl $0x8, %edi jg 0x36421 movq %rax, 0x3d3c0b(%rip) # 0x40a050 cmpq 0x3d3c0c(%rip), %rax # 0x40a058 jb 0x3645a movq $-0x1, %rdi callq 0x36471 movl $0x40, 0x3d3c04(%rip) # 0x40a068 movq $0x0, 0x3d3c01(%rip) # 0x40a070 popq %rbp retq
flush_bits: push rbp mov rbp, rsp mov ecx, cs:file_buffer_5 and ecx, 0FFFFFFF8h mov rdx, cs:file_buffer_6 shr rdx, cl mov rax, cs:file_buffer_2 cmp ecx, 3Fh ; '?' jg short loc_36445 mov esi, 40h ; '@' sub esi, ecx mov edi, 48h ; 'H' sub edi, ecx add rsi, 0FFFFFFFFFFFFFFF8h loc_36421: mov ecx, esi and cl, 0F8h mov r8, rdx shr r8, cl mov [rax], r8b inc rax add edi, 0FFFFFFF8h add rsi, 0FFFFFFFFFFFFFFF8h cmp edi, 8 jg short loc_36421 mov cs:file_buffer_2, rax loc_36445: cmp rax, cs:file_buffer_3 jb short loc_3645A mov rdi, 0FFFFFFFFFFFFFFFFh call flush_buffer loc_3645A: mov cs:file_buffer_5, 40h ; '@' mov cs:file_buffer_6, 0 pop rbp retn
_BYTE * flush_bits(long long a1, long long a2) { unsigned int v2; // ecx unsigned long long v3; // rdx _BYTE *result; // rax int v5; // edi v2 = file_buffer_5 & 0xFFFFFFF8; v3 = (unsigned long long)file_buffer_6 >> (file_buffer_5 & 0xF8); result = (_BYTE *)file_buffer_2; if ( (int)(file_buffer_5 & 0xFFFFFFF8) <= 63 ) { v5 = 72 - v2; a2 = 64 - v2 - 8LL; do { *result++ = v3 >> (a2 & 0xF8); v5 -= 8; a2 -= 8LL; } while ( v5 > 8 ); file_buffer_2 = (long long)result; } if ( (unsigned long long)result >= file_buffer_3 ) result = (_BYTE *)flush_buffer(-1LL, a2); file_buffer_5 = 64; file_buffer_6 = 0LL; return result; }
flush_bits: PUSH RBP MOV RBP,RSP MOV ECX,dword ptr [0x0050a068] AND ECX,0xfffffff8 MOV RDX,qword ptr [0x0050a070] SHR RDX,CL MOV RAX,qword ptr [0x0050a050] CMP ECX,0x3f JG 0x00136445 MOV ESI,0x40 SUB ESI,ECX MOV EDI,0x48 SUB EDI,ECX ADD RSI,-0x8 LAB_00136421: MOV ECX,ESI AND CL,0xf8 MOV R8,RDX SHR R8,CL MOV byte ptr [RAX],R8B INC RAX ADD EDI,-0x8 ADD RSI,-0x8 CMP EDI,0x8 JG 0x00136421 MOV qword ptr [0x0050a050],RAX LAB_00136445: CMP RAX,qword ptr [0x0050a058] JC 0x0013645a MOV RDI,-0x1 CALL 0x00136471 LAB_0013645a: MOV dword ptr [0x0050a068],0x40 MOV qword ptr [0x0050a070],0x0 POP RBP RET
void flush_bits(void) { uint uVar1; ulong uVar2; int iVar3; int iVar4; uVar1 = file_buffer_5 & 0xfffffff8; uVar2 = file_buffer_6 >> ((byte)uVar1 & 0x3f); if ((int)uVar1 < 0x40) { iVar3 = 0x40 - uVar1; iVar4 = 0x48 - uVar1; do { iVar3 = iVar3 + -8; *file_buffer_2 = (char)(uVar2 >> ((byte)iVar3 & 0x38)); file_buffer_2 = file_buffer_2 + 1; iVar4 = iVar4 + -8; } while (8 < iVar4); } if (file_buffer_3 <= file_buffer_2) { flush_buffer(0xffffffffffffffff); } file_buffer_5 = 0x40; file_buffer_6 = 0; return; }
20,634
fill_block
eloqsql/storage/maria/ma_bitmap.c
static void fill_block(MARIA_FILE_BITMAP *bitmap, MARIA_BITMAP_BLOCK *block, uchar *best_data, uint best_pos, uint best_bits, uint fill_pattern) { uint page, offset, tmp; uchar *data; DBUG_ENTER("fill_block"); /* For each 6 bytes we have 6*8/3= 16 patterns */ page= ((uint) (best_data - bitmap->map)) / 6 * 16 + best_pos; DBUG_ASSERT(page + 1 < bitmap->pages_covered); block->page= bitmap->page + 1 + page; block->page_count= TAIL_PAGE_COUNT_MARKER; block->empty_space= pattern_to_size(bitmap, best_bits); block->sub_blocks= 0; block->org_bitmap_value= best_bits; block->used= BLOCKUSED_TAIL; /* See _ma_bitmap_release_unused() */ /* Mark place used by reading/writing 2 bytes at a time to handle bitmaps in overlapping bytes */ best_pos*= 3; data= best_data+ best_pos / 8; offset= best_pos & 7; tmp= uint2korr(data); /* we turn off the 3 bits and replace them with fill_pattern */ tmp= (tmp & ~(7 << offset)) | (fill_pattern << offset); int2store(data, tmp); bitmap->changed= 1; DBUG_EXECUTE("bitmap", _ma_print_bitmap_changes(bitmap);); DBUG_VOID_RETURN; }
O0
c
fill_block: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movl %r8d, -0x20(%rbp) movl %r9d, -0x24(%rbp) movq -0x18(%rbp), %rax movq -0x8(%rbp), %rcx movq 0x8(%rcx), %rcx subq %rcx, %rax movl $0x6, %ecx xorl %edx, %edx divl %ecx shll $0x4, %eax addl -0x1c(%rbp), %eax movl %eax, -0x28(%rbp) jmp 0x65452 movq -0x8(%rbp), %rax movq 0x10(%rax), %rcx addq $0x1, %rcx movl -0x28(%rbp), %eax addq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rax movl $0xffff, 0x8(%rax) # imm = 0xFFFF movq -0x8(%rbp), %rdi movl -0x20(%rbp), %esi callq 0x65530 movl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0xc(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x10(%rax) movl -0x20(%rbp), %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x15(%rax) movq -0x10(%rbp), %rax movb $0x4, 0x14(%rax) imull $0x3, -0x1c(%rbp), %eax movl %eax, -0x1c(%rbp) movq -0x18(%rbp), %rax movl -0x1c(%rbp), %ecx shrl $0x3, %ecx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x38(%rbp) movl -0x1c(%rbp), %eax andl $0x7, %eax movl %eax, -0x2c(%rbp) movq -0x38(%rbp), %rax movzwl (%rax), %eax movl %eax, -0x30(%rbp) movl -0x30(%rbp), %eax movl -0x2c(%rbp), %ecx movl $0x7, %edx shll %cl, %edx movl %edx, %ecx xorl $-0x1, %ecx andl %ecx, %eax movl -0x24(%rbp), %edx movl -0x2c(%rbp), %ecx shll %cl, %edx movl %edx, %ecx orl %ecx, %eax movl %eax, -0x30(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x40(%rbp) movl -0x30(%rbp), %eax movw %ax, %cx movq -0x40(%rbp), %rax movw %cx, (%rax) movq -0x8(%rbp), %rax movb $0x1, 0x20(%rax) jmp 0x65519 jmp 0x6551b jmp 0x6551d addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
fill_block: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov [rbp+var_20], r8d mov [rbp+var_24], r9d mov rax, [rbp+var_18] mov rcx, [rbp+var_8] mov rcx, [rcx+8] sub rax, rcx mov ecx, 6 xor edx, edx div ecx shl eax, 4 add eax, [rbp+var_1C] mov [rbp+var_28], eax jmp short $+2 loc_65452: mov rax, [rbp+var_8] mov rcx, [rax+10h] add rcx, 1 mov eax, [rbp+var_28] add rcx, rax mov rax, [rbp+var_10] mov [rax], rcx mov rax, [rbp+var_10] mov dword ptr [rax+8], 0FFFFh mov rdi, [rbp+var_8] mov esi, [rbp+var_20] call pattern_to_size mov ecx, eax mov rax, [rbp+var_10] mov [rax+0Ch], ecx mov rax, [rbp+var_10] mov dword ptr [rax+10h], 0 mov eax, [rbp+var_20] mov cl, al mov rax, [rbp+var_10] mov [rax+15h], cl mov rax, [rbp+var_10] mov byte ptr [rax+14h], 4 imul eax, [rbp+var_1C], 3 mov [rbp+var_1C], eax mov rax, [rbp+var_18] mov ecx, [rbp+var_1C] shr ecx, 3 mov ecx, ecx add rax, rcx mov [rbp+var_38], rax mov eax, [rbp+var_1C] and eax, 7 mov [rbp+var_2C], eax mov rax, [rbp+var_38] movzx eax, word ptr [rax] mov [rbp+var_30], eax mov eax, [rbp+var_30] mov ecx, [rbp+var_2C] mov edx, 7 shl edx, cl mov ecx, edx xor ecx, 0FFFFFFFFh and eax, ecx mov edx, [rbp+var_24] mov ecx, [rbp+var_2C] shl edx, cl mov ecx, edx or eax, ecx mov [rbp+var_30], eax mov rax, [rbp+var_38] mov [rbp+var_40], rax mov eax, [rbp+var_30] mov cx, ax mov rax, [rbp+var_40] mov [rax], cx mov rax, [rbp+var_8] mov byte ptr [rax+20h], 1 jmp short $+2 loc_65519: jmp short $+2 loc_6551B: jmp short $+2 loc_6551D: add rsp, 40h pop rbp retn
long long fill_block(long long a1, long long a2, long long a3, int a4, unsigned int a5, int a6) { unsigned int v6; // eax long long result; // rax char v9; // [rsp+20h] [rbp-20h] v9 = a5; v6 = a3 - *(_QWORD *)(a1 + 8); *(_QWORD *)a2 = a4 + 16 * (v6 / 6) + *(_QWORD *)(a1 + 16) + 1LL; *(_DWORD *)(a2 + 8) = 0xFFFF; *(_DWORD *)(a2 + 12) = pattern_to_size(a1, a5, v6 % 6); *(_DWORD *)(a2 + 16) = 0; *(_BYTE *)(a2 + 21) = v9; *(_BYTE *)(a2 + 20) = 4; *(_WORD *)(((unsigned int)(3 * a4) >> 3) + a3) = (a6 << ((3 * a4) & 7)) | ~(7 << ((3 * a4) & 7)) & *(_WORD *)(((unsigned int)(3 * a4) >> 3) + a3); result = a1; *(_BYTE *)(a1 + 32) = 1; return result; }
fill_block: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX MOV dword ptr [RBP + -0x20],R8D MOV dword ptr [RBP + -0x24],R9D MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x8] SUB RAX,RCX MOV ECX,0x6 XOR EDX,EDX DIV ECX SHL EAX,0x4 ADD EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x28],EAX JMP 0x00165452 LAB_00165452: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x10] ADD RCX,0x1 MOV EAX,dword ptr [RBP + -0x28] ADD RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x8],0xffff MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0x20] CALL 0x00165530 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xc],ECX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x10],0x0 MOV EAX,dword ptr [RBP + -0x20] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x15],CL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x14],0x4 IMUL EAX,dword ptr [RBP + -0x1c],0x3 MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x1c] SHR ECX,0x3 MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX MOV EAX,dword ptr [RBP + -0x1c] AND EAX,0x7 MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,word ptr [RAX] MOV dword ptr [RBP + -0x30],EAX MOV EAX,dword ptr [RBP + -0x30] MOV ECX,dword ptr [RBP + -0x2c] MOV EDX,0x7 SHL EDX,CL MOV ECX,EDX XOR ECX,0xffffffff AND EAX,ECX MOV EDX,dword ptr [RBP + -0x24] MOV ECX,dword ptr [RBP + -0x2c] SHL EDX,CL MOV ECX,EDX OR EAX,ECX MOV dword ptr [RBP + -0x30],EAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x40],RAX MOV EAX,dword ptr [RBP + -0x30] MOV CX,AX MOV RAX,qword ptr [RBP + -0x40] MOV word ptr [RAX],CX MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x20],0x1 JMP 0x00165519 LAB_00165519: JMP 0x0016551b LAB_0016551b: JMP 0x0016551d LAB_0016551d: ADD RSP,0x40 POP RBP RET
void fill_block(long param_1,long *param_2,long param_3,int param_4,int4 param_5,int param_6) { ulong uVar1; int4 uVar2; ushort *puVar3; byte bVar4; uVar1 = param_3 - *(long *)(param_1 + 8) & 0xffffffff; *param_2 = *(long *)(param_1 + 0x10) + 1 + (ulong)(uint)((int)(uVar1 / 6) * 0x10 + param_4); *(int4 *)(param_2 + 1) = 0xffff; uVar2 = pattern_to_size(param_1,param_5,uVar1 % 6); *(int4 *)((long)param_2 + 0xc) = uVar2; *(int4 *)(param_2 + 2) = 0; *(char *)((long)param_2 + 0x15) = (char)param_5; *(int1 *)((long)param_2 + 0x14) = 4; puVar3 = (ushort *)(param_3 + (ulong)((uint)(param_4 * 3) >> 3)); bVar4 = (byte)(param_4 * 3) & 7; *puVar3 = *puVar3 & ((ushort)(7 << bVar4) ^ 0xffff) | (ushort)(param_6 << bVar4); *(int1 *)(param_1 + 0x20) = 1; return; }
20,635
psi_mutex_lock
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_mutex_lock(mysql_mutex_t *that, const char *file, uint line) { PSI_mutex_locker_state state; PSI_mutex_locker *locker= PSI_MUTEX_CALL(start_mutex_wait) (&state, that->m_psi, PSI_MUTEX_LOCK, file, line); # ifdef SAFE_MUTEX int result= safe_mutex_lock(&that->m_mutex, FALSE, file, line); # else int result= pthread_mutex_lock(&that->m_mutex); # endif if (locker) PSI_MUTEX_CALL(end_mutex_wait)(locker, result); return result; }
O0
c
psi_mutex_lock: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) leaq 0x1ad8ae(%rip), %rax # 0x1da0f8 movq (%rax), %rax movq 0x190(%rax), %rax movq -0x8(%rbp), %rcx movq 0x40(%rcx), %rsi movq -0x10(%rbp), %rcx movl -0x14(%rbp), %r8d leaq -0x48(%rbp), %rdi xorl %edx, %edx callq *%rax movq %rax, -0x50(%rbp) movq -0x8(%rbp), %rdi callq 0x25490 movl %eax, -0x54(%rbp) cmpq $0x0, -0x50(%rbp) je 0x2c89d leaq 0x1ad86e(%rip), %rax # 0x1da0f8 movq (%rax), %rax movq 0x198(%rax), %rax movq -0x50(%rbp), %rdi movl -0x54(%rbp), %esi callq *%rax movl -0x54(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
psi_mutex_lock: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx lea rax, PSI_server mov rax, [rax] mov rax, [rax+190h] mov rcx, [rbp+var_8] mov rsi, [rcx+40h] mov rcx, [rbp+var_10] mov r8d, [rbp+var_14] lea rdi, [rbp+var_48] xor edx, edx call rax mov [rbp+var_50], rax mov rdi, [rbp+var_8] call _pthread_mutex_lock mov [rbp+var_54], eax cmp [rbp+var_50], 0 jz short loc_2C89D lea rax, PSI_server mov rax, [rax] mov rax, [rax+198h] mov rdi, [rbp+var_50] mov esi, [rbp+var_54] call rax loc_2C89D: mov eax, [rbp+var_54] add rsp, 60h pop rbp retn
long long psi_mutex_lock(long long a1, long long a2, unsigned int a3) { unsigned int v4; // [rsp+Ch] [rbp-54h] long long v5; // [rsp+10h] [rbp-50h] _BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF unsigned int v7; // [rsp+4Ch] [rbp-14h] long long v8; // [rsp+50h] [rbp-10h] long long v9; // [rsp+58h] [rbp-8h] v9 = a1; v8 = a2; v7 = a3; v5 = (*((long long ( **)(_BYTE *, _QWORD, _QWORD, long long, _QWORD))PSI_server[0] + 50))( v6, *(_QWORD *)(a1 + 64), 0LL, a2, a3); v4 = pthread_mutex_lock(v9); if ( v5 ) (*((void ( **)(long long, _QWORD))PSI_server[0] + 51))(v5, v4); return v4; }
psi_mutex_lock: 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,[0x2da0f8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x190] MOV RCX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RCX + 0x40] MOV RCX,qword ptr [RBP + -0x10] MOV R8D,dword ptr [RBP + -0x14] LEA RDI,[RBP + -0x48] XOR EDX,EDX CALL RAX MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x00125490 MOV dword ptr [RBP + -0x54],EAX CMP qword ptr [RBP + -0x50],0x0 JZ 0x0012c89d LEA RAX,[0x2da0f8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x198] MOV RDI,qword ptr [RBP + -0x50] MOV ESI,dword ptr [RBP + -0x54] CALL RAX LAB_0012c89d: MOV EAX,dword ptr [RBP + -0x54] ADD RSP,0x60 POP RBP RET
int psi_mutex_lock(pthread_mutex_t *param_1,int8 param_2,int4 param_3) { int iVar1; long lVar2; int1 local_50 [52]; int4 local_1c; int8 local_18; pthread_mutex_t *local_10; local_1c = param_3; local_18 = param_2; local_10 = param_1; lVar2 = (**(code **)(PSI_server + 400)) (local_50,*(int8 *)((long)param_1 + 0x40),0,param_2,param_3); iVar1 = pthread_mutex_lock(local_10); if (lVar2 != 0) { (**(code **)(PSI_server + 0x198))(lVar2,iVar1); } return iVar1; }
20,636
fn_same
eloqsql/mysys/mf_same.c
char * fn_same(char *to, const char *name, int flag) { char dev[FN_REFLEN]; const char *ext; size_t dev_length; DBUG_ENTER("fn_same"); DBUG_PRINT("enter",("to: %s name: %s flag: %d",to,name,flag)); if ((ext=strrchr(name+dirname_part(dev, name, &dev_length),FN_EXTCHAR)) == 0) ext=""; DBUG_RETURN(fn_format(to,to,dev,ext,flag)); }
O3
c
fn_same: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x220, %rsp # imm = 0x220 movl %edx, %ebx movq %rsi, %r14 movq %rdi, %r15 movq %fs:0x28, %rax movq %rax, -0x28(%rbp) leaq -0x230(%rbp), %r12 leaq -0x238(%rbp), %rdx movq %r12, %rdi callq 0x94929 addq %rax, %r14 movq %r14, %rdi movl $0x2e, %esi callq 0x29770 testq %rax, %rax leaq 0x3708e(%rip), %rcx # 0xdfe19 cmovneq %rax, %rcx movq %r15, %rdi movq %r15, %rsi movq %r12, %rdx movl %ebx, %r8d callq 0x949d4 movq %fs:0x28, %rcx cmpq -0x28(%rbp), %rcx jne 0xa8dbf addq $0x220, %rsp # imm = 0x220 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq callq 0x29270
fn_same: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 220h mov ebx, edx mov r14, rsi mov r15, rdi mov rax, fs:28h mov [rbp+var_28], rax lea r12, [rbp+var_230] lea rdx, [rbp+var_238] mov rdi, r12 call dirname_part add r14, rax mov rdi, r14 mov esi, 2Eh ; '.' call _strrchr test rax, rax lea rcx, asc_DFE15+4; "" cmovnz rcx, rax mov rdi, r15 mov rsi, r15 mov rdx, r12 mov r8d, ebx call fn_format mov rcx, fs:28h cmp rcx, [rbp+var_28] jnz short loc_A8DBF add rsp, 220h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_A8DBF: call ___stack_chk_fail
_BYTE * fn_same(_BYTE *a1, _BYTE *a2, __int16 a3) { long long v4; // rax long long v5; // rax char *v6; // rcx long long v8; // [rsp+8h] [rbp-238h] BYREF _BYTE v9[520]; // [rsp+10h] [rbp-230h] BYREF unsigned long long v10; // [rsp+218h] [rbp-28h] v10 = __readfsqword(0x28u); v4 = dirname_part((long long)v9, a2, &v8); v5 = strrchr(&a2[v4], 46LL); v6 = ""; if ( v5 ) v6 = (char *)v5; return fn_format(a1, a1, (long long)v9, v6, a3); }
fn_same: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x220 MOV EBX,EDX MOV R14,RSI MOV R15,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX LEA R12,[RBP + -0x230] LEA RDX,[RBP + -0x238] MOV RDI,R12 CALL 0x00194929 ADD R14,RAX MOV RDI,R14 MOV ESI,0x2e CALL 0x00129770 TEST RAX,RAX LEA RCX,[0x1dfe19] CMOVNZ RCX,RAX MOV RDI,R15 MOV RSI,R15 MOV RDX,R12 MOV R8D,EBX CALL 0x001949d4 MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x28] JNZ 0x001a8dbf ADD RSP,0x220 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001a8dbf: CALL 0x00129270
void fn_same(int8 param_1,long param_2,int4 param_3) { long lVar1; char *pcVar2; char *pcVar3; long in_FS_OFFSET; int1 local_240 [8]; int1 local_238 [520]; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); lVar1 = dirname_part(local_238,param_2,local_240); pcVar2 = strrchr((char *)(param_2 + lVar1),0x2e); pcVar3 = ""; if (pcVar2 != (char *)0x0) { pcVar3 = pcVar2; } fn_format(param_1,param_1,local_238,pcVar3,param_3); if (*(long *)(in_FS_OFFSET + 0x28) == local_30) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
20,637
serial_cpp::Serial::flush()
ami-iit[P]serial_cpp/src/serial.cc
void Serial::flush () { ScopedReadLock rlock(this->pimpl_); ScopedWriteLock wlock(this->pimpl_); pimpl_->flush (); }
O3
cpp
serial_cpp::Serial::flush(): pushq %r15 pushq %r14 pushq %rbx movq %rdi, %r14 movq 0x8(%rdi), %rbx movq %rbx, %rdi callq 0x7b98 movq 0x8(%r14), %r15 movq %r15, %rdi callq 0x7d04 movq 0x8(%r14), %rdi callq 0x6c16 movq %r15, %rdi callq 0x7dbc movq %rbx, %rdi callq 0x7c4e popq %rbx popq %r14 popq %r15 retq jmp 0x4e29 jmp 0x4e29 movq %rax, %r14 movq %r15, %rdi callq 0x7dbc jmp 0x4e19 jmp 0x4e29 movq %rax, %r14 movq %rbx, %rdi callq 0x7c4e movq %r14, %rdi callq 0x34f0 movq %rax, %rdi callq 0x41cf nop
_ZN10serial_cpp6Serial5flushEv: push r15 push r14 push rbx mov r14, rdi mov rbx, [rdi+8] mov rdi, rbx; this call _ZN10serial_cpp6Serial10SerialImpl8readLockEv; serial_cpp::Serial::SerialImpl::readLock(void) mov r15, [r14+8] mov rdi, r15; this call _ZN10serial_cpp6Serial10SerialImpl9writeLockEv; serial_cpp::Serial::SerialImpl::writeLock(void) mov rdi, [r14+8]; this call _ZN10serial_cpp6Serial10SerialImpl5flushEv; serial_cpp::Serial::SerialImpl::flush(void) mov rdi, r15; this call _ZN10serial_cpp6Serial10SerialImpl11writeUnlockEv; serial_cpp::Serial::SerialImpl::writeUnlock(void) mov rdi, rbx; this call _ZN10serial_cpp6Serial10SerialImpl10readUnlockEv; serial_cpp::Serial::SerialImpl::readUnlock(void) pop rbx pop r14 pop r15 retn jmp short loc_4E29 jmp short loc_4E29 mov r14, rax mov rdi, r15; this call _ZN10serial_cpp6Serial10SerialImpl11writeUnlockEv; serial_cpp::Serial::SerialImpl::writeUnlock(void) jmp short loc_4E19 jmp short loc_4E29 mov r14, rax loc_4E19: mov rdi, rbx; this call _ZN10serial_cpp6Serial10SerialImpl10readUnlockEv; serial_cpp::Serial::SerialImpl::readUnlock(void) mov rdi, r14 call __Unwind_Resume loc_4E29: mov rdi, rax call __clang_call_terminate
long long serial_cpp::Serial::flush(serial_cpp::Serial *this) { serial_cpp::Serial::SerialImpl *v1; // rbx serial_cpp::Serial::SerialImpl *v2; // r15 v1 = (serial_cpp::Serial::SerialImpl *)*((_QWORD *)this + 1); serial_cpp::Serial::SerialImpl::readLock(v1); v2 = (serial_cpp::Serial::SerialImpl *)*((_QWORD *)this + 1); serial_cpp::Serial::SerialImpl::writeLock(v2); serial_cpp::Serial::SerialImpl::flush(*((serial_cpp::Serial::SerialImpl **)this + 1)); serial_cpp::Serial::SerialImpl::writeUnlock(v2); return serial_cpp::Serial::SerialImpl::readUnlock(v1); }
flush: PUSH R15 PUSH R14 PUSH RBX MOV R14,RDI MOV RBX,qword ptr [RDI + 0x8] MOV RDI,RBX CALL 0x00107b98 MOV R15,qword ptr [R14 + 0x8] LAB_00104ddc: MOV RDI,R15 CALL 0x00107d04 MOV RDI,qword ptr [R14 + 0x8] LAB_00104de8: CALL 0x00106c16 LAB_00104ded: MOV RDI,R15 CALL 0x00107dbc LAB_00104df5: MOV RDI,RBX CALL 0x00107c4e POP RBX POP R14 POP R15 RET
/* serial_cpp::Serial::flush() */ void __thiscall serial_cpp::Serial::flush(Serial *this) { SerialImpl *this_00; SerialImpl *this_01; this_00 = *(SerialImpl **)(this + 8); SerialImpl::readLock(this_00); this_01 = *(SerialImpl **)(this + 8); /* try { // try from 00104ddc to 00104de3 has its CatchHandler @ 00104e16 */ SerialImpl::writeLock(this_01); /* try { // try from 00104de8 to 00104dec has its CatchHandler @ 00104e07 */ SerialImpl::flush(*(SerialImpl **)(this + 8)); /* try { // try from 00104ded to 00104df4 has its CatchHandler @ 00104e05 */ SerialImpl::writeUnlock(this_01); /* try { // try from 00104df5 to 00104dfc has its CatchHandler @ 00104e03 */ SerialImpl::readUnlock(this_00); return; }
20,638
ankerl::nanobench::templates::pyperf()
BadAccessGuards/build_O0/_deps/nanobench-src/src/include/nanobench.h
char const* pyperf() noexcept { return R"DELIM({ "benchmarks": [ { "runs": [ { "values": [ {{#measurement}} {{elapsed}}{{^-last}}, {{/last}}{{/measurement}} ] } ] } ], "metadata": { "loops": {{sum(iterations)}}, "inner_loops": {{batch}}, "name": "{{title}}", "unit": "second" }, "version": "1.0" })DELIM"; }
O0
c
ankerl::nanobench::templates::pyperf(): pushq %rbp movq %rsp, %rbp leaq 0x237df(%rip), %rax # 0x3583a popq %rbp retq nopl (%rax)
_ZN6ankerl9nanobench9templates6pyperfEv: push rbp mov rbp, rsp lea rax, aBenchmarksRuns; "{\n \"benchmarks\": [\n {\n "... pop rbp retn
const char * ankerl::nanobench::templates::pyperf(ankerl::nanobench::templates *this) { return "{\n" " \"benchmarks\": [\n" " {\n" " \"runs\": [\n" " {\n" " \"values\": [\n" "{{#measurement}} {{elapsed}}{{^-last}},\n" "{{/last}}{{/measurement}}\n" " ]\n" " }\n" " ]\n" " }\n" " ],\n" " \"metadata\": {\n" " \"loops\": {{sum(iterations)}},\n" " \"inner_loops\": {{batch}},\n" " \"name\": \"{{title}}\",\n" " \"unit\": \"second\"\n" " },\n" " \"version\": \"1.0\"\n" "}"; }
pyperf: PUSH RBP MOV RBP,RSP LEA RAX,[0x13583a] POP RBP RET
/* ankerl::nanobench::templates::pyperf() */ char * ankerl::nanobench::templates::pyperf(void) { return "{\n \"benchmarks\": [\n {\n \"runs\": [\n {\n \"values\": [\n{{#measurement}} {{elapsed}}{{^-last}},\n{{/last}}{{/measurement}}\n ]\n }\n ]\n }\n ],\n \"metadata\": {\n \"loops\": {{sum(iterations)}},\n \"inner_loops\": {{batch}},\n \"name\": \"{{title}}\",\n \"unit\": \"second\"\n },\n \"version\": \"1.0\"\n}" ; }
20,639
inline_mysql_cond_signal
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_cond_signal( mysql_cond_t *that) { int result; #ifdef HAVE_PSI_COND_INTERFACE if (psi_likely(that->m_psi != NULL)) PSI_COND_CALL(signal_cond)(that->m_psi); #endif result= pthread_cond_signal(&that->m_cond); return result; }
O0
c
inline_mysql_cond_signal: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x30(%rax) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x2c76b leaq 0x1ad9a1(%rip), %rax # 0x1da0f8 movq (%rax), %rax movq 0x170(%rax), %rax movq -0x8(%rbp), %rcx movq 0x30(%rcx), %rdi callq *%rax movq -0x8(%rbp), %rdi callq 0x25030 movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax addq $0x10, %rsp popq %rbp retq
inline_mysql_cond_signal: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp qword ptr [rax+30h], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_2C76B lea rax, PSI_server mov rax, [rax] mov rax, [rax+170h] mov rcx, [rbp+var_8] mov rdi, [rcx+30h] call rax loc_2C76B: mov rdi, [rbp+var_8] call _pthread_cond_signal mov [rbp+var_C], eax mov eax, [rbp+var_C] add rsp, 10h pop rbp retn
long long inline_mysql_cond_signal(long long a1) { if ( *(_QWORD *)(a1 + 48) ) (*((void ( **)(_QWORD))PSI_server[0] + 46))(*(_QWORD *)(a1 + 48)); return (unsigned int)pthread_cond_signal(a1); }
inline_mysql_cond_signal: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x30],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x0012c76b LEA RAX,[0x2da0f8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x170] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x30] CALL RAX LAB_0012c76b: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00125030 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0xc] ADD RSP,0x10 POP RBP RET
int inline_mysql_cond_signal(pthread_cond_t *param_1) { int iVar1; if (param_1[1].__align != 0) { (**(code **)(PSI_server + 0x170))(param_1[1].__align); } iVar1 = pthread_cond_signal(param_1); return iVar1; }
20,640
my_strxfrm_pad_nweights_unicode
eloqsql/strings/ctype-utf8.c
size_t my_strxfrm_pad_nweights_unicode(uchar *str, uchar *strend, size_t nweights) { uchar *str0; DBUG_ASSERT(str && str <= strend); for (str0= str; str < strend && nweights; nweights--) { *str++= 0x00; if (str < strend) *str++= 0x20; } return str - str0; }
O3
c
my_strxfrm_pad_nweights_unicode: cmpq %rsi, %rdi setae %al testq %rdx, %rdx sete %cl orb %al, %cl movq %rdi, %rax jne 0x8530d pushq %rbp movq %rsp, %rbp decq %rdx movq %rdi, %rcx leaq 0x1(%rcx), %rax movb $0x0, (%rcx) cmpq %rsi, %rax jae 0x852f7 movb $0x20, 0x1(%rcx) addq $0x2, %rcx movq %rcx, %rax addq $-0x1, %rdx setb %r8b cmpq %rsi, %rax jae 0x8530c movq %rax, %rcx testb %r8b, %r8b jne 0x852e0 popq %rbp subq %rdi, %rax retq
my_strxfrm_pad_nweights_unicode: cmp rdi, rsi setnb al test rdx, rdx setz cl or cl, al mov rax, rdi jnz short loc_8530D push rbp mov rbp, rsp dec rdx mov rcx, rdi loc_852E0: lea rax, [rcx+1] mov byte ptr [rcx], 0 cmp rax, rsi jnb short loc_852F7 mov byte ptr [rcx+1], 20h ; ' ' add rcx, 2 mov rax, rcx loc_852F7: add rdx, 0FFFFFFFFFFFFFFFFh setb r8b cmp rax, rsi jnb short loc_8530C mov rcx, rax test r8b, r8b jnz short loc_852E0 loc_8530C: pop rbp loc_8530D: sub rax, rdi retn
long long my_strxfrm_pad_nweights_unicode(_BYTE *a1, unsigned long long a2, long long a3) { _BYTE *v3; // rax long long v4; // rdx _BYTE *v5; // rcx bool v6; // cf v3 = a1; if ( (unsigned long long)a1 < a2 && a3 != 0 ) { v4 = a3 - 1; v5 = a1; do { v3 = v5 + 1; *v5 = 0; if ( (unsigned long long)(v5 + 1) < a2 ) { v5[1] = 32; v3 = v5 + 2; } v6 = v4-- != 0; if ( (unsigned long long)v3 >= a2 ) break; v5 = v3; } while ( v6 ); } return v3 - a1; }
my_strxfrm_pad_nweights_unicode: CMP RDI,RSI SETNC AL TEST RDX,RDX SETZ CL OR CL,AL MOV RAX,RDI JNZ 0x0018530d PUSH RBP MOV RBP,RSP DEC RDX MOV RCX,RDI LAB_001852e0: LEA RAX,[RCX + 0x1] MOV byte ptr [RCX],0x0 CMP RAX,RSI JNC 0x001852f7 MOV byte ptr [RCX + 0x1],0x20 ADD RCX,0x2 MOV RAX,RCX LAB_001852f7: ADD RDX,-0x1 SETC R8B CMP RAX,RSI JNC 0x0018530c MOV RCX,RAX TEST R8B,R8B JNZ 0x001852e0 LAB_0018530c: POP RBP LAB_0018530d: SUB RAX,RDI RET
long my_strxfrm_pad_nweights_unicode(int1 *param_1,int1 *param_2,long param_3) { int1 *puVar1; int1 *puVar2; bool bVar3; puVar2 = param_1; if (param_3 != 0 && param_1 < param_2) { param_3 = param_3 + -1; puVar1 = param_1; do { puVar2 = puVar1 + 1; *puVar1 = 0; if (puVar2 < param_2) { puVar1[1] = 0x20; puVar2 = puVar1 + 2; } bVar3 = param_3 != 0; param_3 = param_3 + -1; } while ((puVar2 < param_2) && (puVar1 = puVar2, bVar3)); } return (long)puVar2 - (long)param_1; }
20,641
my_fread
eloqsql/mysys/my_fstream.c
size_t my_fread(FILE *stream, uchar *Buffer, size_t Count, myf MyFlags) { size_t readbytes; DBUG_ENTER("my_fread"); DBUG_PRINT("my",("stream: %p Buffer %p Count: %u MyFlags: %lu", stream, Buffer, (uint) Count, MyFlags)); if ((readbytes= fread(Buffer, sizeof(char), Count, stream)) != Count) { DBUG_PRINT("error",("Read only %d bytes", (int) readbytes)); if (MyFlags & (MY_WME | MY_FAE | MY_FNABP)) { if (ferror(stream)) my_error(EE_READ, MYF(ME_BELL), my_filename(my_fileno(stream)),errno); else if (MyFlags & (MY_NABP | MY_FNABP)) my_error(EE_EOFERR, MYF(ME_BELL), my_filename(my_fileno(stream)),errno); } my_errno=errno ? errno : -1; if (ferror(stream) || MyFlags & (MY_NABP | MY_FNABP)) DBUG_RETURN((size_t) -1); /* Return with error */ } if (MyFlags & (MY_NABP | MY_FNABP)) DBUG_RETURN(0); /* Read ok */ DBUG_RETURN(readbytes); }
O0
c
my_fread: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) jmp 0x98e0a movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rdx movq -0x10(%rbp), %rcx movl $0x1, %esi callq 0x2a610 movq %rax, -0x30(%rbp) cmpq -0x20(%rbp), %rax je 0x98f20 jmp 0x98e30 jmp 0x98e32 movq -0x28(%rbp), %rax andq $0x1a, %rax cmpq $0x0, %rax je 0x98ec6 movq -0x10(%rbp), %rdi callq 0x2a7a0 cmpl $0x0, %eax je 0x98e84 movq -0x10(%rbp), %rdi callq 0x98f50 movl %eax, %edi callq 0xac0c0 movq %rax, -0x38(%rbp) callq 0x2a040 movq -0x38(%rbp), %rdx movl (%rax), %ecx movl $0x2, %edi movl $0x4, %esi movb $0x0, %al callq 0x98310 jmp 0x98ec4 movq -0x28(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0x98ec2 movq -0x10(%rbp), %rdi callq 0x98f50 movl %eax, %edi callq 0xac0c0 movq %rax, -0x40(%rbp) callq 0x2a040 movq -0x40(%rbp), %rdx movl (%rax), %ecx movl $0x9, %edi movl $0x4, %esi movb $0x0, %al callq 0x98310 jmp 0x98ec4 jmp 0x98ec6 callq 0x2a040 cmpl $0x0, (%rax) je 0x98edc callq 0x2a040 movl (%rax), %eax movl %eax, -0x44(%rbp) jmp 0x98ee6 movl $0xffffffff, %eax # imm = 0xFFFFFFFF movl %eax, -0x44(%rbp) jmp 0x98ee6 movl -0x44(%rbp), %eax movl %eax, -0x48(%rbp) callq 0xa2e50 movl -0x48(%rbp), %ecx movl %ecx, (%rax) movq -0x10(%rbp), %rdi callq 0x2a7a0 cmpl $0x0, %eax jne 0x98f12 movq -0x28(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0x98f1e jmp 0x98f14 movq $-0x1, -0x8(%rbp) jmp 0x98f44 jmp 0x98f20 movq -0x28(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0x98f3a jmp 0x98f30 movq $0x0, -0x8(%rbp) jmp 0x98f44 jmp 0x98f3c movq -0x30(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x50, %rsp popq %rbp retq nop
my_fread: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx jmp short $+2 loc_98E0A: mov rdi, [rbp+var_18] mov rdx, [rbp+var_20] mov rcx, [rbp+var_10] mov esi, 1 call _fread mov [rbp+var_30], rax cmp rax, [rbp+var_20] jz loc_98F20 jmp short $+2 loc_98E30: jmp short $+2 loc_98E32: mov rax, [rbp+var_28] and rax, 1Ah cmp rax, 0 jz loc_98EC6 mov rdi, [rbp+var_10] call _ferror cmp eax, 0 jz short loc_98E84 mov rdi, [rbp+var_10] call my_fileno mov edi, eax call my_filename mov [rbp+var_38], rax call ___errno_location mov rdx, [rbp+var_38] mov ecx, [rax] mov edi, 2 mov esi, 4 mov al, 0 call my_error jmp short loc_98EC4 loc_98E84: mov rax, [rbp+var_28] and rax, 6 cmp rax, 0 jz short loc_98EC2 mov rdi, [rbp+var_10] call my_fileno mov edi, eax call my_filename mov [rbp+var_40], rax call ___errno_location mov rdx, [rbp+var_40] mov ecx, [rax] mov edi, 9 mov esi, 4 mov al, 0 call my_error loc_98EC2: jmp short $+2 loc_98EC4: jmp short $+2 loc_98EC6: call ___errno_location cmp dword ptr [rax], 0 jz short loc_98EDC call ___errno_location mov eax, [rax] mov [rbp+var_44], eax jmp short loc_98EE6 loc_98EDC: mov eax, 0FFFFFFFFh mov [rbp+var_44], eax jmp short $+2 loc_98EE6: mov eax, [rbp+var_44] mov [rbp+var_48], eax call _my_thread_var mov ecx, [rbp+var_48] mov [rax], ecx mov rdi, [rbp+var_10] call _ferror cmp eax, 0 jnz short loc_98F12 mov rax, [rbp+var_28] and rax, 6 cmp rax, 0 jz short loc_98F1E loc_98F12: jmp short $+2 loc_98F14: mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp short loc_98F44 loc_98F1E: jmp short $+2 loc_98F20: mov rax, [rbp+var_28] and rax, 6 cmp rax, 0 jz short loc_98F3A jmp short $+2 loc_98F30: mov [rbp+var_8], 0 jmp short loc_98F44 loc_98F3A: jmp short $+2 loc_98F3C: mov rax, [rbp+var_30] mov [rbp+var_8], rax loc_98F44: mov rax, [rbp+var_8] add rsp, 50h pop rbp retn
long long my_fread(long long a1, long long a2, long long a3, char a4) { long long v5; // rsi unsigned int v6; // eax unsigned int *v7; // rax unsigned int v8; // eax unsigned int *v9; // rax long long v10; // rdx int v12; // [rsp+Ch] [rbp-44h] long long v13; // [rsp+10h] [rbp-40h] long long v14; // [rsp+18h] [rbp-38h] long long v15; // [rsp+20h] [rbp-30h] v5 = 1LL; v15 = fread(a2, 1LL, a3, a1); if ( v15 == a3 ) goto LABEL_13; if ( (a4 & 0x1A) != 0 ) { a2 = a1; if ( (unsigned int)ferror(a1) ) { v6 = my_fileno(a1); v14 = my_filename(v6); v7 = (unsigned int *)__errno_location(); a2 = 2LL; v5 = 4LL; my_error(2u, 4LL, v14, *v7); } else if ( (a4 & 6) != 0 ) { v8 = my_fileno(a1); v13 = my_filename(v8); v9 = (unsigned int *)__errno_location(); a2 = 9LL; v5 = 4LL; my_error(9u, 4LL, v13, *v9); } } v12 = *(_DWORD *)__errno_location() ? *(_DWORD *)__errno_location() : -1; *(_DWORD *)my_thread_var(a2, v5, v10) = v12; if ( (unsigned int)ferror(a1) || (a4 & 6) != 0 ) return -1LL; LABEL_13: if ( (a4 & 6) != 0 ) return 0LL; return v15; }
my_fread: 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 qword ptr [RBP + -0x28],RCX JMP 0x00198e0a LAB_00198e0a: MOV RDI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] MOV ESI,0x1 CALL 0x0012a610 MOV qword ptr [RBP + -0x30],RAX CMP RAX,qword ptr [RBP + -0x20] JZ 0x00198f20 JMP 0x00198e30 LAB_00198e30: JMP 0x00198e32 LAB_00198e32: MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x1a CMP RAX,0x0 JZ 0x00198ec6 MOV RDI,qword ptr [RBP + -0x10] CALL 0x0012a7a0 CMP EAX,0x0 JZ 0x00198e84 MOV RDI,qword ptr [RBP + -0x10] CALL 0x00198f50 MOV EDI,EAX CALL 0x001ac0c0 MOV qword ptr [RBP + -0x38],RAX CALL 0x0012a040 MOV RDX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX] MOV EDI,0x2 MOV ESI,0x4 MOV AL,0x0 CALL 0x00198310 JMP 0x00198ec4 LAB_00198e84: MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x6 CMP RAX,0x0 JZ 0x00198ec2 MOV RDI,qword ptr [RBP + -0x10] CALL 0x00198f50 MOV EDI,EAX CALL 0x001ac0c0 MOV qword ptr [RBP + -0x40],RAX CALL 0x0012a040 MOV RDX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RAX] MOV EDI,0x9 MOV ESI,0x4 MOV AL,0x0 CALL 0x00198310 LAB_00198ec2: JMP 0x00198ec4 LAB_00198ec4: JMP 0x00198ec6 LAB_00198ec6: CALL 0x0012a040 CMP dword ptr [RAX],0x0 JZ 0x00198edc CALL 0x0012a040 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x44],EAX JMP 0x00198ee6 LAB_00198edc: MOV EAX,0xffffffff MOV dword ptr [RBP + -0x44],EAX JMP 0x00198ee6 LAB_00198ee6: MOV EAX,dword ptr [RBP + -0x44] MOV dword ptr [RBP + -0x48],EAX CALL 0x001a2e50 MOV ECX,dword ptr [RBP + -0x48] MOV dword ptr [RAX],ECX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0012a7a0 CMP EAX,0x0 JNZ 0x00198f12 MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x6 CMP RAX,0x0 JZ 0x00198f1e LAB_00198f12: JMP 0x00198f14 LAB_00198f14: MOV qword ptr [RBP + -0x8],-0x1 JMP 0x00198f44 LAB_00198f1e: JMP 0x00198f20 LAB_00198f20: MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x6 CMP RAX,0x0 JZ 0x00198f3a JMP 0x00198f30 LAB_00198f30: MOV qword ptr [RBP + -0x8],0x0 JMP 0x00198f44 LAB_00198f3a: JMP 0x00198f3c LAB_00198f3c: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x8],RAX LAB_00198f44: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
size_t my_fread(FILE *param_1,void *param_2,size_t param_3,ulong param_4) { int iVar1; int4 uVar2; int8 uVar3; int *piVar4; int local_4c; size_t local_10; local_10 = fread(param_2,1,param_3,param_1); if (local_10 != param_3) { if ((param_4 & 0x1a) != 0) { iVar1 = ferror(param_1); if (iVar1 == 0) { if ((param_4 & 6) != 0) { uVar2 = my_fileno(param_1); uVar3 = my_filename(uVar2); piVar4 = __errno_location(); my_error(9,4,uVar3,*piVar4); } } else { uVar2 = my_fileno(param_1); uVar3 = my_filename(uVar2); piVar4 = __errno_location(); my_error(2,4,uVar3,*piVar4); } } piVar4 = __errno_location(); if (*piVar4 == 0) { local_4c = -1; } else { piVar4 = __errno_location(); local_4c = *piVar4; } piVar4 = (int *)_my_thread_var(); *piVar4 = local_4c; iVar1 = ferror(param_1); if ((iVar1 != 0) || ((param_4 & 6) != 0)) { return 0xffffffffffffffff; } } if ((param_4 & 6) != 0) { local_10 = 0; } return local_10; }
20,642
apply_one_rule
eloqsql/strings/ctype-uca.c
static my_bool apply_one_rule(MY_CHARSET_LOADER *loader, MY_COLL_RULES *rules, MY_COLL_RULE *r, MY_UCA_WEIGHT_LEVEL *dst) { size_t nweights; size_t nreset= my_coll_rule_reset_length(r); /* Length of reset sequence */ size_t nshift= my_coll_rule_shift_length(r); /* Length of shift sequence */ uint16 *to; my_bool rc; if ((rules->shift_after_method == my_shift_method_expand && r->diff[0]) || r->before_level == 1) { /* Suppose we have this rule: &B[before primary] < C i.e. we need to put C before B, but after A, so the result order is: A < C < B. Let primary weight of B be [BBBB]. We cannot just use [BBBB-1] as weight for C: DUCET does not have enough unused weights between any two characters, so using [BBBB-1] will likely make C equal to the previous character, which is A, so we'll get this order instead of the desired: A = C < B. To guarantee that that C is sorted after A, we'll use expansion with a kind of "biggest possible character". As "biggest possible character" we'll use "last_non_ignorable": We'll compose weight for C as: [BBBB-1][MMMM+1] where [MMMM] is weight for "last_non_ignorable". We also do the same trick for "reset after" if the collation option says so. E.g. for the rules "&B < C", weight for C will be calculated as: [BBBB][MMMM+1] At this point we only need to store codepoints 'B' and 'last_non_ignorable'. Actual weights for 'C' will be calculated according to the above formula later, in create_tailoring(). */ if (!my_coll_rule_expand(r->base, MY_UCA_MAX_EXPANSION, rules->uca->last_non_ignorable)) { my_charset_loader_error_for_rule(loader, r, "Expansion", r->base, nreset); return TRUE; } nreset= my_coll_rule_reset_length(r); } if (nshift >= 2) /* Contraction */ { MY_CONTRACTIONS *contractions= &dst->contractions; to= my_uca_init_one_contraction(contractions, r->curr, (uint)nshift, r->with_context); /* Store weights of the "reset to" character */ dst->contractions.nitems--; /* Temporarily hide - it's incomplete */ rc= my_char_weight_put(dst, to, MY_UCA_CONTRACTION_MAX_WEIGHT_SIZE, &nweights, r->base, nreset); dst->contractions.nitems++; /* Activate, now it's complete */ } else { my_wc_t pagec= (r->curr[0] >> 8); DBUG_ASSERT(dst->weights[pagec]); to= my_char_weight_addr(dst, r->curr[0]); /* Store weights of the "reset to" character */ rc= my_char_weight_put(dst, to, dst->lengths[pagec], &nweights, r->base, nreset); } if (rc) { my_charset_loader_error_for_rule(loader, r, "Expansion", r->base, nreset); return rc; } /* Apply level difference. */ return apply_shift(loader, rules, r, dst->levelno, to, nweights); }
O0
c
apply_one_rule: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rdi callq 0x50e50 movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rdi callq 0x50e70 movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax cmpl $0x1, 0x30(%rax) jne 0x50829 movq -0x20(%rbp), %rax cmpl $0x0, 0x80(%rax) jne 0x50837 movq -0x20(%rbp), %rax cmpq $0x1, 0x90(%rax) jne 0x50888 movq -0x20(%rbp), %rdi movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq 0x78(%rax), %rdx movl $0xa, %esi callq 0x50230 cmpl $0x0, %eax jne 0x5087b movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x20(%rbp), %rcx movq -0x38(%rbp), %r8 leaq 0x2c1fa(%rip), %rdx # 0x7ca67 callq 0x50ea0 movb $0x1, -0x1(%rbp) jmp 0x509a8 movq -0x20(%rbp), %rdi callq 0x50e50 movq %rax, -0x38(%rbp) cmpq $0x2, -0x40(%rbp) jb 0x50904 movq -0x28(%rbp), %rax addq $0x18, %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rdi movq -0x20(%rbp), %rsi addq $0x50, %rsi movq -0x40(%rbp), %rax movl %eax, %edx movq -0x20(%rbp), %rax movsbl 0x98(%rax), %ecx callq 0x509c0 movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rax movq 0x18(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x18(%rax) movq -0x28(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x20(%rbp), %r8 movq -0x38(%rbp), %r9 movl $0x11, %edx leaq -0x30(%rbp), %rcx callq 0x50f60 movb %al, -0x49(%rbp) movq -0x28(%rbp), %rax movq 0x18(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x18(%rax) jmp 0x5095b movq -0x20(%rbp), %rax movq 0x50(%rax), %rax shrq $0x8, %rax movq %rax, -0x60(%rbp) jmp 0x50916 movq -0x28(%rbp), %rdi movq -0x20(%rbp), %rax movq 0x50(%rax), %rax movl %eax, %esi callq 0x4e720 movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq -0x60(%rbp), %rcx movzbl (%rax,%rcx), %eax movl %eax, %edx movq -0x20(%rbp), %r8 movq -0x38(%rbp), %r9 leaq -0x30(%rbp), %rcx callq 0x50f60 movb %al, -0x49(%rbp) cmpb $0x0, -0x49(%rbp) je 0x50985 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x20(%rbp), %rcx movq -0x38(%rbp), %r8 leaq 0x2c0ef(%rip), %rdx # 0x7ca67 callq 0x50ea0 movb -0x49(%rbp), %al movb %al, -0x1(%rbp) jmp 0x509a8 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x28(%rbp), %rax movl 0x30(%rax), %ecx movq -0x48(%rbp), %r8 movq -0x30(%rbp), %r9 callq 0x51160 movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
apply_one_rule: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rdi, [rbp+var_20] call my_coll_rule_reset_length mov [rbp+var_38], rax mov rdi, [rbp+var_20] call my_coll_rule_shift_length mov [rbp+var_40], rax mov rax, [rbp+var_18] cmp dword ptr [rax+30h], 1 jnz short loc_50829 mov rax, [rbp+var_20] cmp dword ptr [rax+80h], 0 jnz short loc_50837 loc_50829: mov rax, [rbp+var_20] cmp qword ptr [rax+90h], 1 jnz short loc_50888 loc_50837: mov rdi, [rbp+var_20] mov rax, [rbp+var_18] mov rax, [rax+8] mov rdx, [rax+78h] mov esi, 0Ah call my_coll_rule_expand cmp eax, 0 jnz short loc_5087B mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] mov rcx, [rbp+var_20] mov r8, [rbp+var_38] lea rdx, aExpansion; "Expansion" call my_charset_loader_error_for_rule mov [rbp+var_1], 1 jmp loc_509A8 loc_5087B: mov rdi, [rbp+var_20] call my_coll_rule_reset_length mov [rbp+var_38], rax loc_50888: cmp [rbp+var_40], 2 jb short loc_50904 mov rax, [rbp+var_28] add rax, 18h mov [rbp+var_58], rax mov rdi, [rbp+var_58] mov rsi, [rbp+var_20] add rsi, 50h ; 'P' mov rax, [rbp+var_40] mov edx, eax mov rax, [rbp+var_20] movsx ecx, byte ptr [rax+98h] call my_uca_init_one_contraction mov [rbp+var_48], rax mov rax, [rbp+var_28] mov rcx, [rax+18h] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+18h], rcx mov rdi, [rbp+var_28] mov rsi, [rbp+var_48] mov r8, [rbp+var_20] mov r9, [rbp+var_38] mov edx, 11h lea rcx, [rbp+var_30] call my_char_weight_put mov [rbp+var_49], al mov rax, [rbp+var_28] mov rcx, [rax+18h] add rcx, 1 mov [rax+18h], rcx jmp short loc_5095B loc_50904: mov rax, [rbp+var_20] mov rax, [rax+50h] shr rax, 8 mov [rbp+var_60], rax jmp short $+2 loc_50916: mov rdi, [rbp+var_28] mov rax, [rbp+var_20] mov rax, [rax+50h] mov esi, eax call my_char_weight_addr mov [rbp+var_48], rax mov rdi, [rbp+var_28] mov rsi, [rbp+var_48] mov rax, [rbp+var_28] mov rax, [rax+8] mov rcx, [rbp+var_60] movzx eax, byte ptr [rax+rcx] mov edx, eax mov r8, [rbp+var_20] mov r9, [rbp+var_38] lea rcx, [rbp+var_30] call my_char_weight_put mov [rbp+var_49], al loc_5095B: cmp [rbp+var_49], 0 jz short loc_50985 mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] mov rcx, [rbp+var_20] mov r8, [rbp+var_38] lea rdx, aExpansion; "Expansion" call my_charset_loader_error_for_rule mov al, [rbp+var_49] mov [rbp+var_1], al jmp short loc_509A8 loc_50985: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] mov rax, [rbp+var_28] mov ecx, [rax+30h] mov r8, [rbp+var_48] mov r9, [rbp+var_30] call apply_shift mov [rbp+var_1], al loc_509A8: mov al, [rbp+var_1] add rsp, 60h pop rbp retn
char apply_one_rule(long long a1, long long a2, long long a3, _QWORD *a4) { long long v5; // [rsp+0h] [rbp-60h] char v6; // [rsp+17h] [rbp-49h] long long inited; // [rsp+18h] [rbp-48h] unsigned long long v8; // [rsp+20h] [rbp-40h] long long v9; // [rsp+28h] [rbp-38h] long long v10; // [rsp+30h] [rbp-30h] BYREF _QWORD *v11; // [rsp+38h] [rbp-28h] long long v12; // [rsp+40h] [rbp-20h] long long v13; // [rsp+48h] [rbp-18h] long long v14; // [rsp+50h] [rbp-10h] v14 = a1; v13 = a2; v12 = a3; v11 = a4; v9 = my_coll_rule_reset_length(a3); v8 = my_coll_rule_shift_length(v12); if ( *(_DWORD *)(a2 + 48) == 1 && *(_DWORD *)(v12 + 128) || *(_QWORD *)(v12 + 144) == 1LL ) { if ( !(unsigned int)my_coll_rule_expand(v12, 0xAuLL, *(_QWORD *)(*(_QWORD *)(v13 + 8) + 120LL)) ) { my_charset_loader_error_for_rule(v14, v12, "Expansion", v12, v9); return 1; } v9 = my_coll_rule_reset_length(v12); } if ( v8 < 2 ) { v5 = *(_QWORD *)(v12 + 80) >> 8; inited = my_char_weight_addr(v11, *(_QWORD *)(v12 + 80)); v6 = my_char_weight_put(v11, inited, *(unsigned __int8 *)(v11[1] + v5), &v10, v12, v9); } else { inited = my_uca_init_one_contraction(v11 + 3, v12 + 80, (unsigned int)v8, (unsigned int)*(char *)(v12 + 152)); --v11[3]; v6 = my_char_weight_put(v11, inited, 17LL, &v10, v12, v9); ++v11[3]; } if ( !v6 ) return apply_shift(v14, v13, v12, *((unsigned int *)v11 + 12), inited, v10); my_charset_loader_error_for_rule(v14, v12, "Expansion", v12, v9); return v6; }
apply_one_rule: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RDI,qword ptr [RBP + -0x20] CALL 0x00150e50 MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x20] CALL 0x00150e70 MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x30],0x1 JNZ 0x00150829 MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0x80],0x0 JNZ 0x00150837 LAB_00150829: MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX + 0x90],0x1 JNZ 0x00150888 LAB_00150837: MOV RDI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV RDX,qword ptr [RAX + 0x78] MOV ESI,0xa CALL 0x00150230 CMP EAX,0x0 JNZ 0x0015087b MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x38] LEA RDX,[0x17ca67] CALL 0x00150ea0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001509a8 LAB_0015087b: MOV RDI,qword ptr [RBP + -0x20] CALL 0x00150e50 MOV qword ptr [RBP + -0x38],RAX LAB_00150888: CMP qword ptr [RBP + -0x40],0x2 JC 0x00150904 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x18 MOV qword ptr [RBP + -0x58],RAX MOV RDI,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RBP + -0x20] ADD RSI,0x50 MOV RAX,qword ptr [RBP + -0x40] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x20] MOVSX ECX,byte ptr [RAX + 0x98] CALL 0x001509c0 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RAX + 0x18] ADD RCX,-0x1 MOV qword ptr [RAX + 0x18],RCX MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x48] MOV R8,qword ptr [RBP + -0x20] MOV R9,qword ptr [RBP + -0x38] MOV EDX,0x11 LEA RCX,[RBP + -0x30] CALL 0x00150f60 MOV byte ptr [RBP + -0x49],AL MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RAX + 0x18] ADD RCX,0x1 MOV qword ptr [RAX + 0x18],RCX JMP 0x0015095b LAB_00150904: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x50] SHR RAX,0x8 MOV qword ptr [RBP + -0x60],RAX JMP 0x00150916 LAB_00150916: MOV RDI,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x50] MOV ESI,EAX CALL 0x0014e720 MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x60] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV EDX,EAX MOV R8,qword ptr [RBP + -0x20] MOV R9,qword ptr [RBP + -0x38] LEA RCX,[RBP + -0x30] CALL 0x00150f60 MOV byte ptr [RBP + -0x49],AL LAB_0015095b: CMP byte ptr [RBP + -0x49],0x0 JZ 0x00150985 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x38] LEA RDX,[0x17ca67] CALL 0x00150ea0 MOV AL,byte ptr [RBP + -0x49] MOV byte ptr [RBP + -0x1],AL JMP 0x001509a8 LAB_00150985: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX + 0x30] MOV R8,qword ptr [RBP + -0x48] MOV R9,qword ptr [RBP + -0x30] CALL 0x00151160 MOV byte ptr [RBP + -0x1],AL LAB_001509a8: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x60 POP RBP RET
int8 apply_one_rule(int8 param_1,long param_2,long param_3,long param_4) { char extraout_AL; int iVar1; ulong uVar2; int7 extraout_var; int8 uVar3; int7 uVar4; int7 extraout_var_00; char local_51; int8 local_50; int8 local_40; int8 local_38; long local_30; long local_28; long local_20; int8 local_18; char local_9; local_30 = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; local_40 = my_coll_rule_reset_length(param_3); uVar2 = my_coll_rule_shift_length(local_28); if (((*(int *)(local_20 + 0x30) == 1) && (*(int *)(local_28 + 0x80) != 0)) || (*(long *)(local_28 + 0x90) == 1)) { iVar1 = my_coll_rule_expand(local_28,10,*(int8 *)(*(long *)(local_20 + 8) + 0x78)); if (iVar1 == 0) { my_charset_loader_error_for_rule(local_18,local_28,"Expansion",local_28,local_40); local_9 = '\x01'; uVar4 = extraout_var; goto LAB_001509a8; } local_40 = my_coll_rule_reset_length(local_28); } if (uVar2 < 2) { uVar2 = *(ulong *)(local_28 + 0x50); local_50 = my_char_weight_addr(local_30,*(ulong *)(local_28 + 0x50) & 0xffffffff); local_51 = my_char_weight_put(local_30,local_50, *(int1 *)(*(long *)(local_30 + 8) + (uVar2 >> 8)),&local_38, local_28,local_40); } else { local_50 = my_uca_init_one_contraction (local_30 + 0x18,local_28 + 0x50,uVar2 & 0xffffffff, (int)*(char *)(local_28 + 0x98)); *(long *)(local_30 + 0x18) = *(long *)(local_30 + 0x18) + -1; local_51 = my_char_weight_put(local_30,local_50,0x11,&local_38,local_28,local_40); *(long *)(local_30 + 0x18) = *(long *)(local_30 + 0x18) + 1; } if (local_51 == '\0') { apply_shift(local_18,local_20,local_28,*(int4 *)(local_30 + 0x30),local_50,local_38); uVar4 = extraout_var_00; local_9 = extraout_AL; } else { uVar3 = my_charset_loader_error_for_rule(local_18,local_28,"Expansion",local_28,local_40); uVar4 = (int7)((ulong)uVar3 >> 8); local_9 = local_51; } LAB_001509a8: return CONCAT71(uVar4,local_9); }
20,643
rb_delete_fixup
eloqsql/mysys/tree.c
static void rb_delete_fixup(TREE *tree, TREE_ELEMENT ***parent) { TREE_ELEMENT *x,*w,*par; x= **parent; while (x != tree->root && x->colour == BLACK) { if (x == (par=parent[-1][0])->left) { w=par->right; if (w->colour == RED) { w->colour=BLACK; par->colour=RED; left_rotate(parent[-1],par); parent[0]= &w->left; *++parent= &par->left; w=par->right; } if (w->left->colour == BLACK && w->right->colour == BLACK) { w->colour=RED; x=par; parent--; } else { if (w->right->colour == BLACK) { w->left->colour=BLACK; w->colour=RED; right_rotate(&par->right,w); w=par->right; } w->colour=par->colour; par->colour=BLACK; w->right->colour=BLACK; left_rotate(parent[-1],par); x=tree->root; break; } } else { w=par->left; if (w->colour == RED) { w->colour=BLACK; par->colour=RED; right_rotate(parent[-1],par); parent[0]= &w->right; *++parent= &par->right; w=par->left; } if (w->right->colour == BLACK && w->left->colour == BLACK) { w->colour=RED; x=par; parent--; } else { if (w->left->colour == BLACK) { w->right->colour=BLACK; w->colour=RED; left_rotate(&par->left,w); w=par->left; } w->colour=par->colour; par->colour=BLACK; w->left->colour=BLACK; right_rotate(parent[-1],par); x=tree->root; break; } } } x->colour=BLACK; }
O0
c
rb_delete_fixup: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rcx movq -0x8(%rbp), %rdx xorl %eax, %eax cmpq (%rdx), %rcx movb %al, -0x29(%rbp) je 0xfb0e3 movq -0x18(%rbp), %rax movl 0x10(%rax), %eax shrl $0x1f, %eax cmpl $0x1, %eax sete %al movb %al, -0x29(%rbp) movb -0x29(%rbp), %al testb $0x1, %al jne 0xfb0ef jmp 0xfb45a movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx movq -0x8(%rcx), %rcx movq (%rcx), %rcx movq %rcx, -0x28(%rbp) cmpq (%rcx), %rax jne 0xfb2b3 movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movl 0x10(%rax), %eax shrl $0x1f, %eax cmpl $0x0, %eax jne 0xfb18e movq -0x20(%rbp), %rax movl 0x10(%rax), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl $0x80000000, %ecx # imm = 0x80000000 movl %ecx, 0x10(%rax) movq -0x28(%rbp), %rax movl 0x10(%rax), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl $0x0, %ecx movl %ecx, 0x10(%rax) movq -0x10(%rbp), %rax movq -0x8(%rax), %rdi movq -0x28(%rbp), %rsi callq 0xfc090 movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x28(%rbp), %rcx movq -0x10(%rbp), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, -0x10(%rbp) movq %rcx, 0x8(%rax) movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movl 0x10(%rax), %eax shrl $0x1f, %eax cmpl $0x1, %eax jne 0xfb1df movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movl 0x10(%rax), %eax shrl $0x1f, %eax cmpl $0x1, %eax jne 0xfb1df movq -0x20(%rbp), %rax movl 0x10(%rax), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl $0x0, %ecx movl %ecx, 0x10(%rax) movq -0x28(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax addq $-0x8, %rax movq %rax, -0x10(%rbp) jmp 0xfb2ae movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movl 0x10(%rax), %eax shrl $0x1f, %eax cmpl $0x1, %eax jne 0xfb23b movq -0x20(%rbp), %rax movq (%rax), %rax movl 0x10(%rax), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl $0x80000000, %ecx # imm = 0x80000000 movl %ecx, 0x10(%rax) movq -0x20(%rbp), %rax movl 0x10(%rax), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl $0x0, %ecx movl %ecx, 0x10(%rax) movq -0x28(%rbp), %rdi addq $0x8, %rdi movq -0x20(%rbp), %rsi callq 0xfc0d0 movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rax movl 0x10(%rax), %edx shrl $0x1f, %edx movq -0x20(%rbp), %rax movl 0x10(%rax), %ecx andl $0x1, %edx shll $0x1f, %edx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl %edx, %ecx movl %ecx, 0x10(%rax) movq -0x28(%rbp), %rax movl 0x10(%rax), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl $0x80000000, %ecx # imm = 0x80000000 movl %ecx, 0x10(%rax) movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movl 0x10(%rax), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl $0x80000000, %ecx # imm = 0x80000000 movl %ecx, 0x10(%rax) movq -0x10(%rbp), %rax movq -0x8(%rax), %rdi movq -0x28(%rbp), %rsi callq 0xfc090 movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) jmp 0xfb45a jmp 0xfb455 movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movl 0x10(%rax), %eax shrl $0x1f, %eax cmpl $0x0, %eax jne 0xfb33c movq -0x20(%rbp), %rax movl 0x10(%rax), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl $0x80000000, %ecx # imm = 0x80000000 movl %ecx, 0x10(%rax) movq -0x28(%rbp), %rax movl 0x10(%rax), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl $0x0, %ecx movl %ecx, 0x10(%rax) movq -0x10(%rbp), %rax movq -0x8(%rax), %rdi movq -0x28(%rbp), %rsi callq 0xfc0d0 movq -0x20(%rbp), %rcx addq $0x8, %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x28(%rbp), %rcx addq $0x8, %rcx movq -0x10(%rbp), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, -0x10(%rbp) movq %rcx, 0x8(%rax) movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movl 0x10(%rax), %eax shrl $0x1f, %eax cmpl $0x1, %eax jne 0xfb38d movq -0x20(%rbp), %rax movq (%rax), %rax movl 0x10(%rax), %eax shrl $0x1f, %eax cmpl $0x1, %eax jne 0xfb38d movq -0x20(%rbp), %rax movl 0x10(%rax), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl $0x0, %ecx movl %ecx, 0x10(%rax) movq -0x28(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax addq $-0x8, %rax movq %rax, -0x10(%rbp) jmp 0xfb453 movq -0x20(%rbp), %rax movq (%rax), %rax movl 0x10(%rax), %eax shrl $0x1f, %eax cmpl $0x1, %eax jne 0xfb3e4 movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movl 0x10(%rax), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl $0x80000000, %ecx # imm = 0x80000000 movl %ecx, 0x10(%rax) movq -0x20(%rbp), %rax movl 0x10(%rax), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl $0x0, %ecx movl %ecx, 0x10(%rax) movq -0x28(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0xfc090 movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rax movl 0x10(%rax), %edx shrl $0x1f, %edx movq -0x20(%rbp), %rax movl 0x10(%rax), %ecx andl $0x1, %edx shll $0x1f, %edx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl %edx, %ecx movl %ecx, 0x10(%rax) movq -0x28(%rbp), %rax movl 0x10(%rax), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl $0x80000000, %ecx # imm = 0x80000000 movl %ecx, 0x10(%rax) movq -0x20(%rbp), %rax movq (%rax), %rax movl 0x10(%rax), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl $0x80000000, %ecx # imm = 0x80000000 movl %ecx, 0x10(%rax) movq -0x10(%rbp), %rax movq -0x8(%rax), %rdi movq -0x28(%rbp), %rsi callq 0xfc0d0 movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) jmp 0xfb45a jmp 0xfb455 jmp 0xfb0be movq -0x18(%rbp), %rax movl 0x10(%rax), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl $0x80000000, %ecx # imm = 0x80000000 movl %ecx, 0x10(%rax) addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
rb_delete_fixup: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax] mov [rbp+var_18], rax loc_FB0BE: mov rcx, [rbp+var_18] mov rdx, [rbp+var_8] xor eax, eax cmp rcx, [rdx] mov [rbp+var_29], al jz short loc_FB0E3 mov rax, [rbp+var_18] mov eax, [rax+10h] shr eax, 1Fh cmp eax, 1 setz al mov [rbp+var_29], al loc_FB0E3: mov al, [rbp+var_29] test al, 1 jnz short loc_FB0EF jmp loc_FB45A loc_FB0EF: mov rax, [rbp+var_18] mov rcx, [rbp+var_10] mov rcx, [rcx-8] mov rcx, [rcx] mov [rbp+var_28], rcx cmp rax, [rcx] jnz loc_FB2B3 mov rax, [rbp+var_28] mov rax, [rax+8] mov [rbp+var_20], rax mov rax, [rbp+var_20] mov eax, [rax+10h] shr eax, 1Fh cmp eax, 0 jnz short loc_FB18E mov rax, [rbp+var_20] mov ecx, [rax+10h] and ecx, 7FFFFFFFh or ecx, 80000000h mov [rax+10h], ecx mov rax, [rbp+var_28] mov ecx, [rax+10h] and ecx, 7FFFFFFFh or ecx, 0 mov [rax+10h], ecx mov rax, [rbp+var_10] mov rdi, [rax-8] mov rsi, [rbp+var_28] call left_rotate mov rcx, [rbp+var_20] mov rax, [rbp+var_10] mov [rax], rcx mov rcx, [rbp+var_28] mov rax, [rbp+var_10] mov rdx, rax add rdx, 8 mov [rbp+var_10], rdx mov [rax+8], rcx mov rax, [rbp+var_28] mov rax, [rax+8] mov [rbp+var_20], rax loc_FB18E: mov rax, [rbp+var_20] mov rax, [rax] mov eax, [rax+10h] shr eax, 1Fh cmp eax, 1 jnz short loc_FB1DF mov rax, [rbp+var_20] mov rax, [rax+8] mov eax, [rax+10h] shr eax, 1Fh cmp eax, 1 jnz short loc_FB1DF mov rax, [rbp+var_20] mov ecx, [rax+10h] and ecx, 7FFFFFFFh or ecx, 0 mov [rax+10h], ecx mov rax, [rbp+var_28] mov [rbp+var_18], rax mov rax, [rbp+var_10] add rax, 0FFFFFFFFFFFFFFF8h mov [rbp+var_10], rax jmp loc_FB2AE loc_FB1DF: mov rax, [rbp+var_20] mov rax, [rax+8] mov eax, [rax+10h] shr eax, 1Fh cmp eax, 1 jnz short loc_FB23B mov rax, [rbp+var_20] mov rax, [rax] mov ecx, [rax+10h] and ecx, 7FFFFFFFh or ecx, 80000000h mov [rax+10h], ecx mov rax, [rbp+var_20] mov ecx, [rax+10h] and ecx, 7FFFFFFFh or ecx, 0 mov [rax+10h], ecx mov rdi, [rbp+var_28] add rdi, 8 mov rsi, [rbp+var_20] call right_rotate mov rax, [rbp+var_28] mov rax, [rax+8] mov [rbp+var_20], rax loc_FB23B: mov rax, [rbp+var_28] mov edx, [rax+10h] shr edx, 1Fh mov rax, [rbp+var_20] mov ecx, [rax+10h] and edx, 1 shl edx, 1Fh and ecx, 7FFFFFFFh or ecx, edx mov [rax+10h], ecx mov rax, [rbp+var_28] mov ecx, [rax+10h] and ecx, 7FFFFFFFh or ecx, 80000000h mov [rax+10h], ecx mov rax, [rbp+var_20] mov rax, [rax+8] mov ecx, [rax+10h] and ecx, 7FFFFFFFh or ecx, 80000000h mov [rax+10h], ecx mov rax, [rbp+var_10] mov rdi, [rax-8] mov rsi, [rbp+var_28] call left_rotate mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_18], rax jmp loc_FB45A loc_FB2AE: jmp loc_FB455 loc_FB2B3: mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_20], rax mov rax, [rbp+var_20] mov eax, [rax+10h] shr eax, 1Fh cmp eax, 0 jnz short loc_FB33C mov rax, [rbp+var_20] mov ecx, [rax+10h] and ecx, 7FFFFFFFh or ecx, 80000000h mov [rax+10h], ecx mov rax, [rbp+var_28] mov ecx, [rax+10h] and ecx, 7FFFFFFFh or ecx, 0 mov [rax+10h], ecx mov rax, [rbp+var_10] mov rdi, [rax-8] mov rsi, [rbp+var_28] call right_rotate mov rcx, [rbp+var_20] add rcx, 8 mov rax, [rbp+var_10] mov [rax], rcx mov rcx, [rbp+var_28] add rcx, 8 mov rax, [rbp+var_10] mov rdx, rax add rdx, 8 mov [rbp+var_10], rdx mov [rax+8], rcx mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_20], rax loc_FB33C: mov rax, [rbp+var_20] mov rax, [rax+8] mov eax, [rax+10h] shr eax, 1Fh cmp eax, 1 jnz short loc_FB38D mov rax, [rbp+var_20] mov rax, [rax] mov eax, [rax+10h] shr eax, 1Fh cmp eax, 1 jnz short loc_FB38D mov rax, [rbp+var_20] mov ecx, [rax+10h] and ecx, 7FFFFFFFh or ecx, 0 mov [rax+10h], ecx mov rax, [rbp+var_28] mov [rbp+var_18], rax mov rax, [rbp+var_10] add rax, 0FFFFFFFFFFFFFFF8h mov [rbp+var_10], rax jmp loc_FB453 loc_FB38D: mov rax, [rbp+var_20] mov rax, [rax] mov eax, [rax+10h] shr eax, 1Fh cmp eax, 1 jnz short loc_FB3E4 mov rax, [rbp+var_20] mov rax, [rax+8] mov ecx, [rax+10h] and ecx, 7FFFFFFFh or ecx, 80000000h mov [rax+10h], ecx mov rax, [rbp+var_20] mov ecx, [rax+10h] and ecx, 7FFFFFFFh or ecx, 0 mov [rax+10h], ecx mov rdi, [rbp+var_28] mov rsi, [rbp+var_20] call left_rotate mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_20], rax loc_FB3E4: mov rax, [rbp+var_28] mov edx, [rax+10h] shr edx, 1Fh mov rax, [rbp+var_20] mov ecx, [rax+10h] and edx, 1 shl edx, 1Fh and ecx, 7FFFFFFFh or ecx, edx mov [rax+10h], ecx mov rax, [rbp+var_28] mov ecx, [rax+10h] and ecx, 7FFFFFFFh or ecx, 80000000h mov [rax+10h], ecx mov rax, [rbp+var_20] mov rax, [rax] mov ecx, [rax+10h] and ecx, 7FFFFFFFh or ecx, 80000000h mov [rax+10h], ecx mov rax, [rbp+var_10] mov rdi, [rax-8] mov rsi, [rbp+var_28] call right_rotate mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_18], rax jmp short loc_FB45A loc_FB453: jmp short $+2 loc_FB455: jmp loc_FB0BE loc_FB45A: mov rax, [rbp+var_18] mov ecx, [rax+10h] and ecx, 7FFFFFFFh or ecx, 80000000h mov [rax+10h], ecx add rsp, 30h pop rbp retn
long long * rb_delete_fixup(long long **a1, _QWORD **a2) { _QWORD *v2; // rax _QWORD *v3; // rax long long *result; // rax bool v5; // [rsp+7h] [rbp-29h] long long *v6; // [rsp+8h] [rbp-28h] long long v7; // [rsp+10h] [rbp-20h] long long v8; // [rsp+10h] [rbp-20h] long long *v9; // [rsp+18h] [rbp-18h] _QWORD *v10; // [rsp+20h] [rbp-10h] v10 = a2; v9 = (long long *)**a2; while ( 1 ) { v5 = 0; if ( v9 != *a1 ) v5 = *((_DWORD *)v9 + 4) >> 31 == 1; if ( !v5 ) break; v6 = *(long long **)*(v10 - 1); if ( v9 == (long long *)*v6 ) { v7 = v6[1]; if ( *(int *)(v7 + 16) >= 0 ) { *(_DWORD *)(v7 + 16) = *(_DWORD *)(v7 + 16) & 0x7FFFFFFF | 0x80000000; *((_DWORD *)v6 + 4) &= ~0x80000000; left_rotate(*(v10 - 1), v6); *v10 = v7; v2 = v10++; v2[1] = v6; v7 = v6[1]; } if ( *(_DWORD *)(*(_QWORD *)v7 + 16LL) >> 31 != 1 || *(_DWORD *)(*(_QWORD *)(v7 + 8) + 16LL) >> 31 != 1 ) { if ( *(_DWORD *)(*(_QWORD *)(v7 + 8) + 16LL) >> 31 == 1 ) { *(_DWORD *)(*(_QWORD *)v7 + 16LL) = *(_DWORD *)(*(_QWORD *)v7 + 16LL) & 0x7FFFFFFF | 0x80000000; *(_DWORD *)(v7 + 16) &= ~0x80000000; right_rotate(v6 + 1, v7); v7 = v6[1]; } *(_DWORD *)(v7 + 16) = (*((_DWORD *)v6 + 4) >> 31 << 31) | *(_DWORD *)(v7 + 16) & 0x7FFFFFFF; *((_DWORD *)v6 + 4) = v6[2] & 0x7FFFFFFF | 0x80000000; *(_DWORD *)(*(_QWORD *)(v7 + 8) + 16LL) = *(_DWORD *)(*(_QWORD *)(v7 + 8) + 16LL) & 0x7FFFFFFF | 0x80000000; left_rotate(*(v10 - 1), v6); v9 = *a1; break; } *(_DWORD *)(v7 + 16) &= ~0x80000000; v9 = v6; --v10; } else { v8 = *v6; if ( *(int *)(*v6 + 16) >= 0 ) { *(_DWORD *)(v8 + 16) = *(_DWORD *)(v8 + 16) & 0x7FFFFFFF | 0x80000000; *((_DWORD *)v6 + 4) &= ~0x80000000; right_rotate(*(v10 - 1), v6); *v10 = v8 + 8; v3 = v10++; v3[1] = v6 + 1; v8 = *v6; } if ( *(_DWORD *)(*(_QWORD *)(v8 + 8) + 16LL) >> 31 != 1 || *(_DWORD *)(*(_QWORD *)v8 + 16LL) >> 31 != 1 ) { if ( *(_DWORD *)(*(_QWORD *)v8 + 16LL) >> 31 == 1 ) { *(_DWORD *)(*(_QWORD *)(v8 + 8) + 16LL) = *(_DWORD *)(*(_QWORD *)(v8 + 8) + 16LL) & 0x7FFFFFFF | 0x80000000; *(_DWORD *)(v8 + 16) &= ~0x80000000; left_rotate(v6, v8); v8 = *v6; } *(_DWORD *)(v8 + 16) = (*((_DWORD *)v6 + 4) >> 31 << 31) | *(_DWORD *)(v8 + 16) & 0x7FFFFFFF; *((_DWORD *)v6 + 4) = v6[2] & 0x7FFFFFFF | 0x80000000; *(_DWORD *)(*(_QWORD *)v8 + 16LL) = *(_DWORD *)(*(_QWORD *)v8 + 16LL) & 0x7FFFFFFF | 0x80000000; right_rotate(*(v10 - 1), v6); v9 = *a1; break; } *(_DWORD *)(v8 + 16) &= ~0x80000000; v9 = v6; --v10; } } result = v9; *((_DWORD *)v9 + 4) = v9[2] & 0x7FFFFFFF | 0x80000000; return result; }
rb_delete_fixup: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX LAB_001fb0be: MOV RCX,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x8] XOR EAX,EAX CMP RCX,qword ptr [RDX] MOV byte ptr [RBP + -0x29],AL JZ 0x001fb0e3 MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x10] SHR EAX,0x1f CMP EAX,0x1 SETZ AL MOV byte ptr [RBP + -0x29],AL LAB_001fb0e3: MOV AL,byte ptr [RBP + -0x29] TEST AL,0x1 JNZ 0x001fb0ef JMP 0x001fb45a LAB_001fb0ef: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + -0x8] MOV RCX,qword ptr [RCX] MOV qword ptr [RBP + -0x28],RCX CMP RAX,qword ptr [RCX] JNZ 0x001fb2b3 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x10] SHR EAX,0x1f CMP EAX,0x0 JNZ 0x001fb18e MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x10] AND ECX,0x7fffffff OR ECX,0x80000000 MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX + 0x10] AND ECX,0x7fffffff OR ECX,0x0 MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + -0x8] MOV RSI,qword ptr [RBP + -0x28] CALL 0x001fc090 MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RBP + -0x10],RDX MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x20],RAX LAB_001fb18e: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x10] SHR EAX,0x1f CMP EAX,0x1 JNZ 0x001fb1df MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOV EAX,dword ptr [RAX + 0x10] SHR EAX,0x1f CMP EAX,0x1 JNZ 0x001fb1df MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x10] AND ECX,0x7fffffff OR ECX,0x0 MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,-0x8 MOV qword ptr [RBP + -0x10],RAX JMP 0x001fb2ae LAB_001fb1df: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOV EAX,dword ptr [RAX + 0x10] SHR EAX,0x1f CMP EAX,0x1 JNZ 0x001fb23b MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RAX + 0x10] AND ECX,0x7fffffff OR ECX,0x80000000 MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x10] AND ECX,0x7fffffff OR ECX,0x0 MOV dword ptr [RAX + 0x10],ECX MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x8 MOV RSI,qword ptr [RBP + -0x20] CALL 0x001fc0d0 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x20],RAX LAB_001fb23b: MOV RAX,qword ptr [RBP + -0x28] MOV EDX,dword ptr [RAX + 0x10] SHR EDX,0x1f MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x10] AND EDX,0x1 SHL EDX,0x1f AND ECX,0x7fffffff OR ECX,EDX MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX + 0x10] AND ECX,0x7fffffff OR ECX,0x80000000 MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOV ECX,dword ptr [RAX + 0x10] AND ECX,0x7fffffff OR ECX,0x80000000 MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + -0x8] MOV RSI,qword ptr [RBP + -0x28] CALL 0x001fc090 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX JMP 0x001fb45a LAB_001fb2ae: JMP 0x001fb455 LAB_001fb2b3: MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x10] SHR EAX,0x1f CMP EAX,0x0 JNZ 0x001fb33c MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x10] AND ECX,0x7fffffff OR ECX,0x80000000 MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX + 0x10] AND ECX,0x7fffffff OR ECX,0x0 MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + -0x8] MOV RSI,qword ptr [RBP + -0x28] CALL 0x001fc0d0 MOV RCX,qword ptr [RBP + -0x20] ADD RCX,0x8 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x28] ADD RCX,0x8 MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RBP + -0x10],RDX MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX LAB_001fb33c: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOV EAX,dword ptr [RAX + 0x10] SHR EAX,0x1f CMP EAX,0x1 JNZ 0x001fb38d MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x10] SHR EAX,0x1f CMP EAX,0x1 JNZ 0x001fb38d MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x10] AND ECX,0x7fffffff OR ECX,0x0 MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,-0x8 MOV qword ptr [RBP + -0x10],RAX JMP 0x001fb453 LAB_001fb38d: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x10] SHR EAX,0x1f CMP EAX,0x1 JNZ 0x001fb3e4 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOV ECX,dword ptr [RAX + 0x10] AND ECX,0x7fffffff OR ECX,0x80000000 MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x10] AND ECX,0x7fffffff OR ECX,0x0 MOV dword ptr [RAX + 0x10],ECX MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x20] CALL 0x001fc090 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX LAB_001fb3e4: MOV RAX,qword ptr [RBP + -0x28] MOV EDX,dword ptr [RAX + 0x10] SHR EDX,0x1f MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x10] AND EDX,0x1 SHL EDX,0x1f AND ECX,0x7fffffff OR ECX,EDX MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX + 0x10] AND ECX,0x7fffffff OR ECX,0x80000000 MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RAX + 0x10] AND ECX,0x7fffffff OR ECX,0x80000000 MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + -0x8] MOV RSI,qword ptr [RBP + -0x28] CALL 0x001fc0d0 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX JMP 0x001fb45a LAB_001fb453: JMP 0x001fb455 LAB_001fb455: JMP 0x001fb0be LAB_001fb45a: MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RAX + 0x10] AND ECX,0x7fffffff OR ECX,0x80000000 MOV dword ptr [RAX + 0x10],ECX ADD RSP,0x30 POP RBP RET
void rb_delete_fixup(long *param_1,long *param_2) { long *plVar1; bool bVar2; long *local_28; long *local_20; long *local_18; local_20 = *(long **)*param_2; local_18 = param_2; do { bVar2 = false; if (local_20 != (long *)*param_1) { bVar2 = (int)local_20[2] < 0; } if (!bVar2) goto LAB_001fb45a; plVar1 = *(long **)local_18[-1]; if (local_20 == (long *)*plVar1) { local_28 = (long *)plVar1[1]; if (-1 < (int)local_28[2]) { *(uint *)(local_28 + 2) = *(uint *)(local_28 + 2) & 0x7fffffff | 0x80000000; *(uint *)(plVar1 + 2) = *(uint *)(plVar1 + 2) & 0x7fffffff; left_rotate(local_18[-1],plVar1); *local_18 = (long)local_28; local_18[1] = (long)plVar1; local_28 = (long *)plVar1[1]; local_18 = local_18 + 1; } if ((-1 < *(int *)(*local_28 + 0x10)) || (-1 < *(int *)(local_28[1] + 0x10))) { if (*(int *)(local_28[1] + 0x10) < 0) { *(uint *)(*local_28 + 0x10) = *(uint *)(*local_28 + 0x10) & 0x7fffffff | 0x80000000; *(uint *)(local_28 + 2) = *(uint *)(local_28 + 2) & 0x7fffffff; right_rotate(plVar1 + 1,local_28); local_28 = (long *)plVar1[1]; } *(uint *)(local_28 + 2) = *(uint *)(local_28 + 2) & 0x7fffffff | *(uint *)(plVar1 + 2) & 0x80000000; *(uint *)(plVar1 + 2) = *(uint *)(plVar1 + 2) & 0x7fffffff | 0x80000000; *(uint *)(local_28[1] + 0x10) = *(uint *)(local_28[1] + 0x10) & 0x7fffffff | 0x80000000; left_rotate(local_18[-1],plVar1); local_20 = (long *)*param_1; LAB_001fb45a: *(uint *)(local_20 + 2) = *(uint *)(local_20 + 2) & 0x7fffffff | 0x80000000; return; } *(uint *)(local_28 + 2) = *(uint *)(local_28 + 2) & 0x7fffffff; } else { local_28 = (long *)*plVar1; if (-1 < (int)local_28[2]) { *(uint *)(local_28 + 2) = *(uint *)(local_28 + 2) & 0x7fffffff | 0x80000000; *(uint *)(plVar1 + 2) = *(uint *)(plVar1 + 2) & 0x7fffffff; right_rotate(local_18[-1],plVar1); *local_18 = (long)(local_28 + 1); local_18[1] = (long)(plVar1 + 1); local_28 = (long *)*plVar1; local_18 = local_18 + 1; } if ((-1 < *(int *)(local_28[1] + 0x10)) || (-1 < *(int *)(*local_28 + 0x10))) { if (*(int *)(*local_28 + 0x10) < 0) { *(uint *)(local_28[1] + 0x10) = *(uint *)(local_28[1] + 0x10) & 0x7fffffff | 0x80000000; *(uint *)(local_28 + 2) = *(uint *)(local_28 + 2) & 0x7fffffff; left_rotate(plVar1,local_28); local_28 = (long *)*plVar1; } *(uint *)(local_28 + 2) = *(uint *)(local_28 + 2) & 0x7fffffff | *(uint *)(plVar1 + 2) & 0x80000000; *(uint *)(plVar1 + 2) = *(uint *)(plVar1 + 2) & 0x7fffffff | 0x80000000; *(uint *)(*local_28 + 0x10) = *(uint *)(*local_28 + 0x10) & 0x7fffffff | 0x80000000; right_rotate(local_18[-1],plVar1); local_20 = (long *)*param_1; goto LAB_001fb45a; } *(uint *)(local_28 + 2) = *(uint *)(local_28 + 2) & 0x7fffffff; } local_18 = local_18 + -1; local_20 = plVar1; } while( true ); }
20,644
google::protobuf::compiler::java::RepeatedImmutablePrimitiveFieldLiteGenerator::GenerateKotlinDslMembers(google::protobuf::io::Printer*) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/primitive_field_lite.cc
void RepeatedImmutablePrimitiveFieldLiteGenerator::GenerateKotlinDslMembers( io::Printer* printer) const { printer->Print( variables_, "/**\n" " * An uninstantiable, behaviorless type to represent the field in\n" " * generics.\n" " */\n" "@kotlin.OptIn" "(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\n" "public class ${$$kt_capitalized_name$Proxy$}$ private constructor()" " : com.google.protobuf.kotlin.DslProxy()\n"); WriteFieldDocComment(printer, descriptor_); printer->Print(variables_, "$kt_deprecation$ public val $kt_name$: " "com.google.protobuf.kotlin.DslList" "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>\n" " @kotlin.jvm.JvmSynthetic\n" " get() = com.google.protobuf.kotlin.DslList(\n" " $kt_dsl_builder$.${$get$capitalized_name$List$}$()\n" " )\n"); WriteFieldAccessorDocComment(printer, descriptor_, LIST_ADDER, /* builder */ false); printer->Print(variables_, "@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmName(\"add$kt_capitalized_name$\")\n" "public fun com.google.protobuf.kotlin.DslList" "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "add(value: $kt_type$) {\n" " $kt_dsl_builder$.${$add$capitalized_name$$}$(value)\n" "}"); WriteFieldAccessorDocComment(printer, descriptor_, LIST_ADDER, /* builder */ false); printer->Print(variables_, "@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmName(\"plusAssign$kt_capitalized_name$\")\n" "@Suppress(\"NOTHING_TO_INLINE\")\n" "public inline operator fun com.google.protobuf.kotlin.DslList" "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "plusAssign(value: $kt_type$) {\n" " add(value)\n" "}"); WriteFieldAccessorDocComment(printer, descriptor_, LIST_MULTI_ADDER, /* builder */ false); printer->Print(variables_, "@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmName(\"addAll$kt_capitalized_name$\")\n" "public fun com.google.protobuf.kotlin.DslList" "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "addAll(values: kotlin.collections.Iterable<$kt_type$>) {\n" " $kt_dsl_builder$.${$addAll$capitalized_name$$}$(values)\n" "}"); WriteFieldAccessorDocComment(printer, descriptor_, LIST_MULTI_ADDER, /* builder */ false); printer->Print( variables_, "@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmName(\"plusAssignAll$kt_capitalized_name$\")\n" "@Suppress(\"NOTHING_TO_INLINE\")\n" "public inline operator fun com.google.protobuf.kotlin.DslList" "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "plusAssign(values: kotlin.collections.Iterable<$kt_type$>) {\n" " addAll(values)\n" "}"); WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_SETTER, /* builder */ false); printer->Print( variables_, "@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmName(\"set$kt_capitalized_name$\")\n" "public operator fun com.google.protobuf.kotlin.DslList" "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "set(index: kotlin.Int, value: $kt_type$) {\n" " $kt_dsl_builder$.${$set$capitalized_name$$}$(index, value)\n" "}"); WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, /* builder */ false); printer->Print(variables_, "@kotlin.jvm.JvmSynthetic\n" "@kotlin.jvm.JvmName(\"clear$kt_capitalized_name$\")\n" "public fun com.google.protobuf.kotlin.DslList" "<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>." "clear() {\n" " $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n" "}"); }
O3
cpp
google::protobuf::compiler::java::RepeatedImmutablePrimitiveFieldLiteGenerator::GenerateKotlinDslMembers(google::protobuf::io::Printer*) const: pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r15 leaq 0x10(%rdi), %r14 leaq 0xef477(%rip), %rdx # 0x1d5261 movq %rsi, %rdi movq %r14, %rsi callq 0x16cd32 movq 0x8(%r15), %rsi movq %rbx, %rdi callq 0xcfb21 leaq 0xf6ea6(%rip), %rdx # 0x1dccae movq %rbx, %rdi movq %r14, %rsi callq 0x16cd32 movq 0x8(%r15), %rsi movq %rbx, %rdi movl $0x8, %edx xorl %ecx, %ecx callq 0xcff9a leaq 0xfa261(%rip), %rdx # 0x1e008e movq %rbx, %rdi movq %r14, %rsi callq 0x16cd32 movq 0x8(%r15), %rsi movq %rbx, %rdi movl $0x8, %edx xorl %ecx, %ecx callq 0xcff9a leaq 0xfa330(%rip), %rdx # 0x1e0182 movq %rbx, %rdi movq %r14, %rsi callq 0x16cd32 movq 0x8(%r15), %rsi movq %rbx, %rdi movl $0x9, %edx xorl %ecx, %ecx callq 0xcff9a leaq 0xfa413(%rip), %rdx # 0x1e028a movq %rbx, %rdi movq %r14, %rsi callq 0x16cd32 movq 0x8(%r15), %rsi movq %rbx, %rdi movl $0x9, %edx xorl %ecx, %ecx callq 0xcff9a leaq 0xfa50a(%rip), %rdx # 0x1e03a6 movq %rbx, %rdi movq %r14, %rsi callq 0x16cd32 movq 0x8(%r15), %rsi movq %rbx, %rdi movl $0x7, %edx xorl %ecx, %ecx callq 0xcff9a leaq 0xfa612(%rip), %rdx # 0x1e04d3 movq %rbx, %rdi movq %r14, %rsi callq 0x16cd32 movq 0x8(%r15), %rsi movq %rbx, %rdi movl $0x3, %edx xorl %ecx, %ecx callq 0xcff9a leaq 0xfa704(%rip), %rdx # 0x1e05ea movq %rbx, %rdi movq %r14, %rsi popq %rbx popq %r14 popq %r15 jmp 0x16cd32
_ZNK6google8protobuf8compiler4java44RepeatedImmutablePrimitiveFieldLiteGenerator24GenerateKotlinDslMembersEPNS0_2io7PrinterE: push r15; int push r14; char push rbx; int mov rbx, rsi mov r15, rdi lea r14, [rdi+10h] lea rdx, aAnUninstantiab; "/**\n * An uninstantiable, behaviorless"... mov rdi, rsi; this mov rsi, r14 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rsi, [r15+8]; google::protobuf::io::Printer * mov rdi, rbx; this call _ZN6google8protobuf8compiler4java20WriteFieldDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorE; google::protobuf::compiler::java::WriteFieldDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*) lea rdx, aKtDeprecationP_1; "$kt_deprecation$ public val $kt_name$: "... mov rdi, rbx; this mov rsi, r14 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rsi, [r15+8]; google::protobuf::FieldDescriptor * mov rdi, rbx; this mov edx, 8 xor ecx, ecx call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) lea rdx, aKotlinJvmJvmsy_27; "@kotlin.jvm.JvmSynthetic\n@kotlin.jvm.J"... mov rdi, rbx; this mov rsi, r14 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rsi, [r15+8]; google::protobuf::FieldDescriptor * mov rdi, rbx; this mov edx, 8 xor ecx, ecx call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) lea rdx, aKotlinJvmJvmsy_28; "@kotlin.jvm.JvmSynthetic\n@kotlin.jvm.J"... mov rdi, rbx; this mov rsi, r14 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rsi, [r15+8]; google::protobuf::FieldDescriptor * mov rdi, rbx; this mov edx, 9 xor ecx, ecx call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) lea rdx, aKotlinJvmJvmsy_29; "@kotlin.jvm.JvmSynthetic\n@kotlin.jvm.J"... mov rdi, rbx; this mov rsi, r14 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rsi, [r15+8]; google::protobuf::FieldDescriptor * mov rdi, rbx; this mov edx, 9 xor ecx, ecx call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) lea rdx, aKotlinJvmJvmsy_30; "@kotlin.jvm.JvmSynthetic\n@kotlin.jvm.J"... mov rdi, rbx; this mov rsi, r14 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rsi, [r15+8]; google::protobuf::FieldDescriptor * mov rdi, rbx; this mov edx, 7 xor ecx, ecx call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) lea rdx, aKotlinJvmJvmsy_31; "@kotlin.jvm.JvmSynthetic\n@kotlin.jvm.J"... mov rdi, rbx; this mov rsi, r14 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rsi, [r15+8]; google::protobuf::FieldDescriptor * mov rdi, rbx; this mov edx, 3 xor ecx, ecx call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) lea rdx, aKotlinJvmJvmsy_32; "@kotlin.jvm.JvmSynthetic\n@kotlin.jvm.J"... mov rdi, rbx; this mov rsi, r14 pop rbx pop r14 pop r15 jmp _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
GenerateKotlinDslMembers: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RSI MOV R15,RDI LEA R14,[RDI + 0x10] LEA RDX,[0x2d5261] MOV RDI,RSI MOV RSI,R14 CALL 0x0026cd32 MOV RSI,qword ptr [R15 + 0x8] MOV RDI,RBX CALL 0x001cfb21 LEA RDX,[0x2dccae] MOV RDI,RBX MOV RSI,R14 CALL 0x0026cd32 MOV RSI,qword ptr [R15 + 0x8] MOV RDI,RBX MOV EDX,0x8 XOR ECX,ECX CALL 0x001cff9a LEA RDX,[0x2e008e] MOV RDI,RBX MOV RSI,R14 CALL 0x0026cd32 MOV RSI,qword ptr [R15 + 0x8] MOV RDI,RBX MOV EDX,0x8 XOR ECX,ECX CALL 0x001cff9a LEA RDX,[0x2e0182] MOV RDI,RBX MOV RSI,R14 CALL 0x0026cd32 MOV RSI,qword ptr [R15 + 0x8] MOV RDI,RBX MOV EDX,0x9 XOR ECX,ECX CALL 0x001cff9a LEA RDX,[0x2e028a] MOV RDI,RBX MOV RSI,R14 CALL 0x0026cd32 MOV RSI,qword ptr [R15 + 0x8] MOV RDI,RBX MOV EDX,0x9 XOR ECX,ECX CALL 0x001cff9a LEA RDX,[0x2e03a6] MOV RDI,RBX MOV RSI,R14 CALL 0x0026cd32 MOV RSI,qword ptr [R15 + 0x8] MOV RDI,RBX MOV EDX,0x7 XOR ECX,ECX CALL 0x001cff9a LEA RDX,[0x2e04d3] MOV RDI,RBX MOV RSI,R14 CALL 0x0026cd32 MOV RSI,qword ptr [R15 + 0x8] MOV RDI,RBX MOV EDX,0x3 XOR ECX,ECX CALL 0x001cff9a LEA RDX,[0x2e05ea] MOV RDI,RBX MOV RSI,R14 POP RBX POP R14 POP R15 JMP 0x0026cd32
/* google::protobuf::compiler::java::RepeatedImmutablePrimitiveFieldLiteGenerator::GenerateKotlinDslMembers(google::protobuf::io::Printer*) const */ void __thiscall google::protobuf::compiler::java::RepeatedImmutablePrimitiveFieldLiteGenerator:: GenerateKotlinDslMembers(RepeatedImmutablePrimitiveFieldLiteGenerator *this,Printer *param_1) { map *pmVar1; pmVar1 = (map *)(this + 0x10); io::Printer::Print(param_1,pmVar1, "/**\n * An uninstantiable, behaviorless type to represent the field in\n * generics.\n */\n@kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)\npublic class ${$$kt_capitalized_name$Proxy$}$ private constructor() : com.google.protobuf.kotlin.DslProxy()\n" ); WriteFieldDocComment(param_1,*(FieldDescriptor **)(this + 8)); io::Printer::Print(param_1,pmVar1, "$kt_deprecation$ public val $kt_name$: com.google.protobuf.kotlin.DslList<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>\n @kotlin.jvm.JvmSynthetic\n get() = com.google.protobuf.kotlin.DslList(\n $kt_dsl_builder$.${$get$capitalized_name$List$}$()\n )\n" ); WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),8,0); io::Printer::Print(param_1,pmVar1, "@kotlin.jvm.JvmSynthetic\n@kotlin.jvm.JvmName(\"add$kt_capitalized_name$\")\npublic fun com.google.protobuf.kotlin.DslList<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>.add(value: $kt_type$) {\n $kt_dsl_builder$.${$add$capitalized_name$$}$(value)\n}" ); WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),8,0); io::Printer::Print(param_1,pmVar1, "@kotlin.jvm.JvmSynthetic\n@kotlin.jvm.JvmName(\"plusAssign$kt_capitalized_name$\")\n@Suppress(\"NOTHING_TO_INLINE\")\npublic inline operator fun com.google.protobuf.kotlin.DslList<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>.plusAssign(value: $kt_type$) {\n add(value)\n}" ); WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),9,0); io::Printer::Print(param_1,pmVar1, "@kotlin.jvm.JvmSynthetic\n@kotlin.jvm.JvmName(\"addAll$kt_capitalized_name$\")\npublic fun com.google.protobuf.kotlin.DslList<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>.addAll(values: kotlin.collections.Iterable<$kt_type$>) {\n $kt_dsl_builder$.${$addAll$capitalized_name$$}$(values)\n}" ); WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),9,0); io::Printer::Print(param_1,pmVar1, "@kotlin.jvm.JvmSynthetic\n@kotlin.jvm.JvmName(\"plusAssignAll$kt_capitalized_name$\")\n@Suppress(\"NOTHING_TO_INLINE\")\npublic inline operator fun com.google.protobuf.kotlin.DslList<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>.plusAssign(values: kotlin.collections.Iterable<$kt_type$>) {\n addAll(values)\n}" ); WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),7,0); io::Printer::Print(param_1,pmVar1, "@kotlin.jvm.JvmSynthetic\n@kotlin.jvm.JvmName(\"set$kt_capitalized_name$\")\npublic operator fun com.google.protobuf.kotlin.DslList<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>.set(index: kotlin.Int, value: $kt_type$) {\n $kt_dsl_builder$.${$set$capitalized_name$$}$(index, value)\n}" ); WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),3,0); io::Printer::Print(param_1,pmVar1, "@kotlin.jvm.JvmSynthetic\n@kotlin.jvm.JvmName(\"clear$kt_capitalized_name$\")\npublic fun com.google.protobuf.kotlin.DslList<$kt_type$, ${$$kt_capitalized_name$Proxy$}$>.clear() {\n $kt_dsl_builder$.${$clear$capitalized_name$$}$()\n}" ); return; }
20,645
free_all_read_locks
eloqsql/mysys/thr_lock.c
static inline void free_all_read_locks(THR_LOCK *lock, my_bool using_concurrent_insert) { THR_LOCK_DATA *data=lock->read_wait.data; check_locks(lock,"before freeing read locks", TL_UNLOCK, 1); /* move all locks from read_wait list to read list */ (*lock->read.last)=data; data->prev=lock->read.last; lock->read.last=lock->read_wait.last; /* Clear read_wait list */ lock->read_wait.last= &lock->read_wait.data; do { mysql_cond_t *cond= data->cond; if ((int) data->type == (int) TL_READ_NO_INSERT) { if (using_concurrent_insert) { /* We can't free this lock; Link lock away from read chain back into read_wait chain */ if (((*data->prev)=data->next)) data->next->prev=data->prev; else lock->read.last=data->prev; *lock->read_wait.last= data; data->prev= lock->read_wait.last; lock->read_wait.last= &data->next; continue; } lock->read_no_write_count++; } /* purecov: begin inspected */ DBUG_PRINT("lock",("giving read lock to thread: %lu", (ulong)data->owner->thread_id)); /* purecov: end */ data->cond=0; /* Mark thread free */ mysql_cond_signal(cond); } while ((data=data->next)); *lock->read_wait.last=0; if (!lock->read_wait.data) lock->write_lock_count=0; check_locks(lock,"after giving read locks", TL_UNLOCK, 0); }
O3
c
free_all_read_locks: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %esi, %r14d movq %rdi, %rbx leaq 0x60(%rdi), %rax movq 0x60(%rdi), %r12 movq 0x78(%rdi), %rcx leaq 0x78(%rdi), %r13 movq %r12, (%rcx) movq 0x78(%rdi), %rcx movq %rcx, 0x10(%r12) movq 0x68(%rdi), %rcx movq %rcx, 0x78(%rdi) movq %rax, 0x68(%rdi) movq 0x20(%r12), %r15 cmpl $0x5, 0x40(%r12) jne 0xa5357 testb %r14b, %r14b je 0xa5351 leaq 0x8(%r12), %rax movq 0x8(%r12), %rcx movq 0x10(%r12), %rdx movq %rcx, (%rdx) leaq 0x10(%rcx), %rdx testq %rcx, %rcx movq 0x10(%r12), %rcx cmoveq %r13, %rdx movq %rcx, (%rdx) movq 0x68(%rbx), %rcx movq %r12, (%rcx) movq 0x68(%rbx), %rcx movq %rcx, 0x10(%r12) movq %rax, 0x68(%rbx) jmp 0xa5371 incl 0xa8(%rbx) movq $0x0, 0x20(%r12) movq 0x30(%r15), %rdi testq %rdi, %rdi jne 0xa537d movq %r15, %rdi callq 0x295b0 movq 0x8(%r12), %r12 testq %r12, %r12 jne 0xa5304 jmp 0xa538f leaq 0x2e2c8c(%rip), %rax # 0x388010 movq (%rax), %rax callq *0x170(%rax) jmp 0xa5369 movq 0x68(%rbx), %rax movq $0x0, (%rax) cmpq $0x0, 0x60(%rbx) jne 0xa53ac movq $0x0, 0xa0(%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
free_all_read_locks: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14d, esi mov rbx, rdi lea rax, [rdi+60h] mov r12, [rdi+60h] mov rcx, [rdi+78h] lea r13, [rdi+78h] mov [rcx], r12 mov rcx, [rdi+78h] mov [r12+10h], rcx mov rcx, [rdi+68h] mov [rdi+78h], rcx mov [rdi+68h], rax loc_A5304: mov r15, [r12+20h] cmp dword ptr [r12+40h], 5 jnz short loc_A5357 test r14b, r14b jz short loc_A5351 lea rax, [r12+8] mov rcx, [r12+8] mov rdx, [r12+10h] mov [rdx], rcx lea rdx, [rcx+10h] test rcx, rcx mov rcx, [r12+10h] cmovz rdx, r13 mov [rdx], rcx mov rcx, [rbx+68h] mov [rcx], r12 mov rcx, [rbx+68h] mov [r12+10h], rcx mov [rbx+68h], rax jmp short loc_A5371 loc_A5351: inc dword ptr [rbx+0A8h] loc_A5357: mov qword ptr [r12+20h], 0 mov rdi, [r15+30h] test rdi, rdi jnz short loc_A537D loc_A5369: mov rdi, r15 call _pthread_cond_signal loc_A5371: mov r12, [r12+8] test r12, r12 jnz short loc_A5304 jmp short loc_A538F loc_A537D: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+170h] jmp short loc_A5369 loc_A538F: mov rax, [rbx+68h] mov qword ptr [rax], 0 cmp qword ptr [rbx+60h], 0 jnz short loc_A53AC mov qword ptr [rbx+0A0h], 0 loc_A53AC: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_QWORD * free_all_read_locks(long long a1, char a2) { long long v3; // r12 _QWORD *v4; // r13 long long v5; // r15 long long v6; // rcx _QWORD *v7; // rdx long long v8; // rdi _QWORD *result; // rax v3 = *(_QWORD *)(a1 + 96); v4 = (_QWORD *)(a1 + 120); **(_QWORD **)(a1 + 120) = v3; *(_QWORD *)(v3 + 16) = *(_QWORD *)(a1 + 120); *(_QWORD *)(a1 + 120) = *(_QWORD *)(a1 + 104); *(_QWORD *)(a1 + 104) = a1 + 96; do { v5 = *(_QWORD *)(v3 + 32); if ( *(_DWORD *)(v3 + 64) == 5 ) { if ( a2 ) { v6 = *(_QWORD *)(v3 + 8); **(_QWORD **)(v3 + 16) = v6; v7 = (_QWORD *)(v6 + 16); if ( !v6 ) v7 = v4; *v7 = *(_QWORD *)(v3 + 16); **(_QWORD **)(a1 + 104) = v3; *(_QWORD *)(v3 + 16) = *(_QWORD *)(a1 + 104); *(_QWORD *)(a1 + 104) = v3 + 8; goto LABEL_11; } ++*(_DWORD *)(a1 + 168); } *(_QWORD *)(v3 + 32) = 0LL; v8 = *(_QWORD *)(v5 + 48); if ( v8 ) ((void ( *)(long long))PSI_server[46])(v8); pthread_cond_signal(v5); LABEL_11: v3 = *(_QWORD *)(v3 + 8); } while ( v3 ); result = *(_QWORD **)(a1 + 104); *result = 0LL; if ( !*(_QWORD *)(a1 + 96) ) *(_QWORD *)(a1 + 160) = 0LL; return result; }
free_all_read_locks: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14D,ESI MOV RBX,RDI LEA RAX,[RDI + 0x60] MOV R12,qword ptr [RDI + 0x60] MOV RCX,qword ptr [RDI + 0x78] LEA R13,[RDI + 0x78] MOV qword ptr [RCX],R12 MOV RCX,qword ptr [RDI + 0x78] MOV qword ptr [R12 + 0x10],RCX MOV RCX,qword ptr [RDI + 0x68] MOV qword ptr [RDI + 0x78],RCX MOV qword ptr [RDI + 0x68],RAX LAB_001a5304: MOV R15,qword ptr [R12 + 0x20] CMP dword ptr [R12 + 0x40],0x5 JNZ 0x001a5357 TEST R14B,R14B JZ 0x001a5351 LEA RAX,[R12 + 0x8] MOV RCX,qword ptr [R12 + 0x8] MOV RDX,qword ptr [R12 + 0x10] MOV qword ptr [RDX],RCX LEA RDX,[RCX + 0x10] TEST RCX,RCX MOV RCX,qword ptr [R12 + 0x10] CMOVZ RDX,R13 MOV qword ptr [RDX],RCX MOV RCX,qword ptr [RBX + 0x68] MOV qword ptr [RCX],R12 MOV RCX,qword ptr [RBX + 0x68] MOV qword ptr [R12 + 0x10],RCX MOV qword ptr [RBX + 0x68],RAX JMP 0x001a5371 LAB_001a5351: INC dword ptr [RBX + 0xa8] LAB_001a5357: MOV qword ptr [R12 + 0x20],0x0 MOV RDI,qword ptr [R15 + 0x30] TEST RDI,RDI JNZ 0x001a537d LAB_001a5369: MOV RDI,R15 CALL 0x001295b0 LAB_001a5371: MOV R12,qword ptr [R12 + 0x8] TEST R12,R12 JNZ 0x001a5304 JMP 0x001a538f LAB_001a537d: LEA RAX,[0x488010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x170] JMP 0x001a5369 LAB_001a538f: MOV RAX,qword ptr [RBX + 0x68] MOV qword ptr [RAX],0x0 CMP qword ptr [RBX + 0x60],0x0 JNZ 0x001a53ac MOV qword ptr [RBX + 0xa0],0x0 LAB_001a53ac: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void free_all_read_locks(long param_1,char param_2) { pthread_cond_t *__cond; long lVar1; int8 *puVar2; long lVar3; lVar3 = *(long *)(param_1 + 0x60); **(long **)(param_1 + 0x78) = lVar3; *(int8 *)(lVar3 + 0x10) = *(int8 *)(param_1 + 0x78); *(int8 *)(param_1 + 0x78) = *(int8 *)(param_1 + 0x68); *(long *)(param_1 + 0x68) = param_1 + 0x60; do { __cond = *(pthread_cond_t **)(lVar3 + 0x20); if (*(int *)(lVar3 + 0x40) == 5) { if (param_2 == '\0') { *(int *)(param_1 + 0xa8) = *(int *)(param_1 + 0xa8) + 1; goto LAB_001a5357; } lVar1 = *(long *)(lVar3 + 8); **(long **)(lVar3 + 0x10) = lVar1; puVar2 = (int8 *)(lVar1 + 0x10); if (lVar1 == 0) { puVar2 = (int8 *)(param_1 + 0x78); } *puVar2 = *(int8 *)(lVar3 + 0x10); **(long **)(param_1 + 0x68) = lVar3; *(int8 *)(lVar3 + 0x10) = *(int8 *)(param_1 + 0x68); *(long *)(param_1 + 0x68) = lVar3 + 8; } else { LAB_001a5357: *(int8 *)(lVar3 + 0x20) = 0; if (__cond[1].__align != 0) { (**(code **)(PSI_server + 0x170))(); } pthread_cond_signal(__cond); } lVar3 = *(long *)(lVar3 + 8); if (lVar3 == 0) { **(int8 **)(param_1 + 0x68) = 0; if (*(long *)(param_1 + 0x60) == 0) { *(int8 *)(param_1 + 0xa0) = 0; } return; } } while( true ); }
20,646
rtree_delete_req
eloqsql/storage/myisam/rt_index.c
static int rtree_delete_req(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key, uint key_length, my_off_t page, uint *page_size, stPageList *ReinsertList, int level) { uchar *k; uchar *last; ulong i; uint nod_flag; uchar *page_buf; int res; DBUG_ENTER("rtree_delete_req"); if (!(page_buf = (uchar*)my_alloca((uint)keyinfo->block_length))) { my_errno = HA_ERR_OUT_OF_MEM; DBUG_RETURN(-1); /* purecov: inspected */ } if (!_mi_fetch_keypage(info, keyinfo, page, DFLT_INIT_HITS, page_buf, 0)) goto err1; nod_flag = mi_test_if_nod(page_buf); DBUG_PRINT("rtree", ("page: %lu level: %d nod_flag: %u", (ulong) page, level, nod_flag)); k = rt_PAGE_FIRST_KEY(page_buf, nod_flag); last = rt_PAGE_END(page_buf); for (i = 0; k < last; k = rt_PAGE_NEXT_KEY(k, key_length, nod_flag), ++i) { if (nod_flag) { /* not leaf */ if (!rtree_key_cmp(keyinfo->seg, key, k, key_length, MBR_WITHIN)) { switch ((res = rtree_delete_req(info, keyinfo, key, key_length, _mi_kpos(nod_flag, k), page_size, ReinsertList, level + 1))) { case 0: /* deleted */ { /* test page filling */ if (*page_size + key_length >= rt_PAGE_MIN_SIZE(keyinfo->block_length)) { /* OK */ /* Calculate a new key value (MBR) for the shrinked block. */ if (rtree_set_key_mbr(info, keyinfo, k, key_length, _mi_kpos(nod_flag, k))) goto err1; if (_mi_write_keypage(info, keyinfo, page, DFLT_INIT_HITS, page_buf)) goto err1; } else { /* Too small: delete key & add it descendant to reinsert list. Store position and level of the block so that it can be accessed later for inserting the remaining keys. */ DBUG_PRINT("rtree", ("too small. move block to reinsert list")); if (rtree_fill_reinsert_list(ReinsertList, _mi_kpos(nod_flag, k), level + 1)) goto err1; /* Delete the key that references the block. This makes the block disappear from the index. Hence we need to insert its remaining keys later. Note: if the block is a branch block, we do not only remove this block, but the whole subtree. So we need to re-insert its keys on the same level later to reintegrate the subtrees. */ rtree_delete_key(info, page_buf, k, key_length, nod_flag); if (_mi_write_keypage(info, keyinfo, page, DFLT_INIT_HITS, page_buf)) goto err1; *page_size = mi_getint(page_buf); } goto ok; } case 1: /* not found - continue searching */ { break; } case 2: /* vacuous case: last key in the leaf */ { rtree_delete_key(info, page_buf, k, key_length, nod_flag); if (_mi_write_keypage(info, keyinfo, page, DFLT_INIT_HITS, page_buf)) goto err1; *page_size = mi_getint(page_buf); res = 0; goto ok; } default: /* error */ case -1: { goto err1; } } } } else { /* leaf */ if (!rtree_key_cmp(keyinfo->seg, key, k, key_length, MBR_EQUAL | MBR_DATA)) { rtree_delete_key(info, page_buf, k, key_length, nod_flag); *page_size = mi_getint(page_buf); if (*page_size == 2) { /* last key in the leaf */ res = 2; if (_mi_dispose(info, keyinfo, page, DFLT_INIT_HITS)) goto err1; } else { res = 0; if (_mi_write_keypage(info, keyinfo, page, DFLT_INIT_HITS, page_buf)) goto err1; } goto ok; } } } res = 1; ok: my_afree((uchar*)page_buf); DBUG_RETURN(res); err1: my_afree((uchar*)page_buf); DBUG_RETURN(-1); /* purecov: inspected */ }
O3
c
rtree_delete_req: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %r9, -0x60(%rbp) movl %ecx, -0x34(%rbp) movq %rdx, %r14 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movzwl 0xe(%rsi), %eax movq %rsp, %r12 addl $0xf, %eax andl $-0x10, %eax subq %rax, %r12 movq %r12, %rsp xorl %ebx, %ebx movq %rdi, -0x48(%rbp) movq %rsi, -0x40(%rbp) movq %r8, -0x50(%rbp) movq %r8, %rdx movl $0x3, %ecx movq %r12, %r8 xorl %r9d, %r9d callq 0x84424 testq %rax, %rax je 0x8b358 movzbl (%r12), %r15d testb %r15b, %r15b jns 0x8b073 movq -0x48(%rbp), %rax movq (%rax), %rax movl 0x17c(%rax), %ebx movl %ebx, %r13d leaq (%r12,%r13), %rbx addq $0x2, %rbx movzbl 0x1(%r12), %eax andl $0x7f, %r15d shll $0x8, %r15d orq %rax, %r15 addq %r12, %r15 movl $0x1, %eax cmpq %r15, %rbx movq -0x40(%rbp), %rsi movl -0x34(%rbp), %ecx jae 0x8b35d movq %r12, -0x58(%rbp) movl 0x18(%rbp), %edx incl %edx movq %rdx, -0x68(%rbp) movl %ecx, %r12d movq 0x28(%rsi), %rdi movq %r14, %rsi movq %rbx, %rdx testq %r13, %r13 je 0x8b111 movl $0x800, %r8d # imm = 0x800 callq 0x8bbe0 movq %r13, %rcx testl %eax, %eax jne 0x8b131 movl %r13d, %edi movq %rbx, %rsi callq 0x84d9e movq -0x48(%rbp), %rdi movq -0x40(%rbp), %rsi movq %r14, %rdx movl -0x34(%rbp), %ecx movq %rax, %r8 movq -0x60(%rbp), %r9 pushq -0x68(%rbp) pushq 0x10(%rbp) callq 0x8aff7 addq $0x10, %rsp movq %r13, %rcx cmpl $0x1, %eax je 0x8b131 jmp 0x8b151 movl $0x6000, %r8d # imm = 0x6000 callq 0x8bbe0 testl %eax, %eax je 0x8b1f4 movq -0x48(%rbp), %rax movq (%rax), %rax movl 0x178(%rax), %ecx addq %r12, %rbx addq %rcx, %rbx cmpq %r15, %rbx movq -0x40(%rbp), %rsi movl -0x34(%rbp), %ecx jb 0x8b0b7 movl $0x1, %eax jmp 0x8b35d cmpl $0x2, %eax je 0x8b252 testl %eax, %eax jne 0x8b358 movq -0x60(%rbp), %rax movl (%rax), %r15d addl -0x34(%rbp), %r15d movq -0x40(%rbp), %r14 movzwl 0xe(%r14), %eax imull $0xaaab, %eax, %r12d # imm = 0xAAAB shrl $0x11, %r12d movl %r13d, %edi movq %rbx, %rsi callq 0x84d9e movq %rax, %r8 cmpl %r12d, %r15d jae 0x8b2c2 movq 0x10(%rbp), %r14 movq (%r14), %rdx cmpq 0x8(%r14), %rdx jne 0x8b2fb movq %r8, -0x70(%rbp) addq $0xa, %rdx movq %rdx, 0x8(%r14) leaq 0xb74478(%rip), %rax # 0xbff634 movl (%rax), %edi movq 0x10(%r14), %rsi shlq $0x4, %rdx movl $0x40, %ecx callq 0xa07c4 movq %rax, 0x10(%r14) testq %rax, %rax movq -0x58(%rbp), %r15 je 0x8b358 movq (%r14), %rdx movq -0x50(%rbp), %r12 movl -0x34(%rbp), %ecx movq -0x70(%rbp), %r8 jmp 0x8b30a movq -0x48(%rbp), %r15 movq %r15, %rdi movq -0x58(%rbp), %r14 movq %r14, %rsi movq %rbx, %rdx movl -0x34(%rbp), %ecx xorl %r8d, %r8d callq 0x8baeb movzbl 0x1(%r14), %eax movl (%r14), %ecx andl $0x7f, %ecx shll $0x8, %ecx orl %eax, %ecx movq -0x60(%rbp), %rax movl %ecx, (%rax) movq %r15, %rdi cmpl $0x2, %ecx jne 0x8b29b movq -0x40(%rbp), %rsi movq -0x50(%rbp), %rdx movl $0x3, %ecx callq 0x845a3 testl %eax, %eax jne 0x8b358 movl $0x2, %eax jmp 0x8b35d movq -0x48(%rbp), %r15 movq %r15, %rdi movq -0x58(%rbp), %r14 movq %r14, %rsi movq %rbx, %rdx movl -0x34(%rbp), %ecx movl %r13d, %r8d callq 0x8baeb movq %r15, %rdi movq -0x40(%rbp), %rsi movq -0x50(%rbp), %rdx movl $0x3, %ecx movq %r14, %r8 callq 0x844d0 testl %eax, %eax jne 0x8b358 movzbl 0x1(%r14), %eax movl (%r14), %ecx jmp 0x8b383 movq -0x40(%rbp), %rsi movq -0x50(%rbp), %rdx movl $0x3, %ecx movq %r14, %r8 callq 0x844d0 testl %eax, %eax movl $0x0, %eax jne 0x8b358 jmp 0x8b35d movq -0x48(%rbp), %rdi movq %r14, %rsi movq %rbx, %rdx movl -0x34(%rbp), %ecx callq 0x8bb78 testl %eax, %eax movq -0x58(%rbp), %r8 jne 0x8b358 movq -0x48(%rbp), %rdi movq -0x40(%rbp), %rsi movq -0x50(%rbp), %rdx movl $0x3, %ecx callq 0x844d0 testl %eax, %eax jne 0x8b358 jmp 0x8b391 movq 0x10(%r14), %rax movq -0x58(%rbp), %r15 movq -0x50(%rbp), %r12 movl -0x34(%rbp), %ecx shlq $0x4, %rdx movq %r8, 0x8(%rax,%rdx) movq (%r14), %rax movq 0x10(%r14), %rdx shlq $0x4, %rax movq -0x68(%rbp), %rsi movl %esi, (%rdx,%rax) incq (%r14) movq -0x48(%rbp), %r14 movq %r14, %rdi movq %r15, %rsi movq %rbx, %rdx movl %r13d, %r8d callq 0x8baeb movq %r14, %rdi movq -0x40(%rbp), %rsi movq %r12, %rdx movl $0x3, %ecx movq %r15, %r8 callq 0x844d0 testl %eax, %eax je 0x8b37b movl $0xffffffff, %eax # imm = 0xFFFFFFFF movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x8b395 leaq -0x28(%rbp), %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movzbl 0x1(%r15), %eax movl (%r15), %ecx andl $0x7f, %ecx shll $0x8, %ecx orl %eax, %ecx movq -0x60(%rbp), %rax movl %ecx, (%rax) xorl %eax, %eax jmp 0x8b35d callq 0x29260
rtree_delete_req: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov [rbp+var_60], r9 mov [rbp+var_34], ecx mov r14, rdx mov rax, fs:28h mov [rbp+var_30], rax movzx eax, word ptr [rsi+0Eh] mov r12, rsp add eax, 0Fh and eax, 0FFFFFFF0h sub r12, rax mov rsp, r12 xor ebx, ebx mov [rbp+var_48], rdi mov [rbp+var_40], rsi mov [rbp+var_50], r8 mov rdx, r8 mov ecx, 3 mov r8, r12 xor r9d, r9d call _mi_fetch_keypage test rax, rax jz loc_8B358 movzx r15d, byte ptr [r12] test r15b, r15b jns short loc_8B073 mov rax, [rbp+var_48] mov rax, [rax] mov ebx, [rax+17Ch] loc_8B073: mov r13d, ebx lea rbx, [r12+r13] add rbx, 2 movzx eax, byte ptr [r12+1] and r15d, 7Fh shl r15d, 8 or r15, rax add r15, r12 mov eax, 1 cmp rbx, r15 mov rsi, [rbp+var_40] mov ecx, [rbp+var_34] jnb loc_8B35D mov [rbp+var_58], r12 mov edx, [rbp+arg_8] inc edx mov [rbp+var_68], rdx mov r12d, ecx loc_8B0B7: mov rdi, [rsi+28h] mov rsi, r14 mov rdx, rbx test r13, r13 jz short loc_8B111 mov r8d, 800h call rtree_key_cmp mov rcx, r13 test eax, eax jnz short loc_8B131 mov edi, r13d mov rsi, rbx call _mi_kpos mov rdi, [rbp+var_48] mov rsi, [rbp+var_40] mov rdx, r14 mov ecx, [rbp+var_34] mov r8, rax mov r9, [rbp+var_60] push [rbp+var_68] push [rbp+arg_0] call rtree_delete_req add rsp, 10h mov rcx, r13 cmp eax, 1 jz short loc_8B131 jmp short loc_8B151 loc_8B111: mov r8d, 6000h call rtree_key_cmp test eax, eax jz loc_8B1F4 mov rax, [rbp+var_48] mov rax, [rax] mov ecx, [rax+178h] loc_8B131: add rbx, r12 add rbx, rcx cmp rbx, r15 mov rsi, [rbp+var_40] mov ecx, [rbp+var_34] jb loc_8B0B7 mov eax, 1 jmp loc_8B35D loc_8B151: cmp eax, 2 jz loc_8B252 test eax, eax jnz loc_8B358 mov rax, [rbp+var_60] mov r15d, [rax] add r15d, [rbp+var_34] mov r14, [rbp+var_40] movzx eax, word ptr [r14+0Eh] imul r12d, eax, 0AAABh shr r12d, 11h mov edi, r13d mov rsi, rbx call _mi_kpos mov r8, rax cmp r15d, r12d jnb loc_8B2C2 mov r14, [rbp+arg_0] mov rdx, [r14] cmp rdx, [r14+8] jnz loc_8B2FB mov [rbp+var_70], r8 add rdx, 0Ah mov [r14+8], rdx lea rax, mi_key_memory_stPageList_pages mov edi, [rax] mov rsi, [r14+10h] shl rdx, 4 mov ecx, 40h ; '@' call my_realloc mov [r14+10h], rax test rax, rax mov r15, [rbp+var_58] jz loc_8B358 mov rdx, [r14] mov r12, [rbp+var_50] mov ecx, [rbp+var_34] mov r8, [rbp+var_70] jmp loc_8B30A loc_8B1F4: mov r15, [rbp+var_48] mov rdi, r15 mov r14, [rbp+var_58] mov rsi, r14 mov rdx, rbx mov ecx, [rbp+var_34] xor r8d, r8d call rtree_delete_key movzx eax, byte ptr [r14+1] mov ecx, [r14] and ecx, 7Fh shl ecx, 8 or ecx, eax mov rax, [rbp+var_60] mov [rax], ecx mov rdi, r15 cmp ecx, 2 jnz short loc_8B29B mov rsi, [rbp+var_40] mov rdx, [rbp+var_50] mov ecx, 3 call _mi_dispose test eax, eax jnz loc_8B358 mov eax, 2 jmp loc_8B35D loc_8B252: mov r15, [rbp+var_48] mov rdi, r15 mov r14, [rbp+var_58] mov rsi, r14 mov rdx, rbx mov ecx, [rbp+var_34] mov r8d, r13d call rtree_delete_key mov rdi, r15 mov rsi, [rbp+var_40] mov rdx, [rbp+var_50] mov ecx, 3 mov r8, r14 call _mi_write_keypage test eax, eax jnz loc_8B358 movzx eax, byte ptr [r14+1] mov ecx, [r14] jmp loc_8B383 loc_8B29B: mov rsi, [rbp+var_40] mov rdx, [rbp+var_50] mov ecx, 3 mov r8, r14 call _mi_write_keypage test eax, eax mov eax, 0 jnz loc_8B358 jmp loc_8B35D loc_8B2C2: mov rdi, [rbp+var_48] mov rsi, r14 mov rdx, rbx mov ecx, [rbp+var_34] call rtree_set_key_mbr test eax, eax mov r8, [rbp+var_58] jnz short loc_8B358 mov rdi, [rbp+var_48] mov rsi, [rbp+var_40] mov rdx, [rbp+var_50] mov ecx, 3 call _mi_write_keypage test eax, eax jnz short loc_8B358 jmp loc_8B391 loc_8B2FB: mov rax, [r14+10h] mov r15, [rbp+var_58] mov r12, [rbp+var_50] mov ecx, [rbp+var_34] loc_8B30A: shl rdx, 4 mov [rax+rdx+8], r8 mov rax, [r14] mov rdx, [r14+10h] shl rax, 4 mov rsi, [rbp+var_68] mov [rdx+rax], esi inc qword ptr [r14] mov r14, [rbp+var_48] mov rdi, r14 mov rsi, r15 mov rdx, rbx mov r8d, r13d call rtree_delete_key mov rdi, r14 mov rsi, [rbp+var_40] mov rdx, r12 mov ecx, 3 mov r8, r15 call _mi_write_keypage test eax, eax jz short loc_8B37B loc_8B358: mov eax, 0FFFFFFFFh loc_8B35D: mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz short loc_8B395 lea rsp, [rbp-28h] pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8B37B: movzx eax, byte ptr [r15+1] mov ecx, [r15] loc_8B383: and ecx, 7Fh shl ecx, 8 or ecx, eax mov rax, [rbp+var_60] mov [rax], ecx loc_8B391: xor eax, eax jmp short loc_8B35D loc_8B395: call ___stack_chk_fail
long long rtree_delete_req( long long *a1, long long a2, long long a3, unsigned int a4, long long a5, int *a6, long long *a7, int a8) { char *v9; // r12 unsigned int v10; // ebx long long v11; // r13 unsigned long long v12; // rbx char *v13; // r15 long long result; // rax long long v15; // rsi long long v16; // rcx long long v17; // r12 long long v18; // rdi int v19; // eax long long v20; // rcx int v21; // eax int v22; // eax unsigned int v23; // r15d long long v24; // r14 unsigned int v25; // r12d unsigned long long v26; // rax long long v27; // r9 unsigned long long v28; // r8 long long v29; // rdx long long v30; // rdx long long v31; // rax _BYTE *v32; // r15 unsigned long long v33; // r12 long long v34; // rcx long long *v35; // r15 _BYTE *v36; // r14 int v37; // ecx long long *v38; // r15 _BYTE *v39; // r14 int v40; // eax int v41; // ecx bool v42; // zf long long *v43; // r14 unsigned long long v44; // [rsp+0h] [rbp-70h] BYREF long long v45; // [rsp+8h] [rbp-68h] int *v46; // [rsp+10h] [rbp-60h] _BYTE *v47; // [rsp+18h] [rbp-58h] unsigned long long v48; // [rsp+20h] [rbp-50h] long long *v49; // [rsp+28h] [rbp-48h] long long v50; // [rsp+30h] [rbp-40h] unsigned int v51; // [rsp+3Ch] [rbp-34h] unsigned long long v52; // [rsp+40h] [rbp-30h] v46 = a6; v51 = a4; v52 = __readfsqword(0x28u); v9 = (char *)&v44 - ((*(unsigned __int16 *)(a2 + 14) + 15) & 0xFFFFFFF0); v10 = 0; v49 = a1; v50 = a2; v48 = a5; if ( !mi_fetch_keypage(a1, a2, a5) ) return 0xFFFFFFFFLL; if ( *v9 < 0 ) v10 = *(_DWORD *)(*v49 + 380); v11 = v10; v12 = (unsigned long long)&v9[v10 + 2]; v13 = &v9[(unsigned __int8)v9[1] | (unsigned long long)((unsigned __int8)(*v9 & 0x7F) << 8)]; result = 1LL; v15 = v50; v16 = v51; if ( v12 < (unsigned long long)v13 ) { v47 = v9; v45 = (unsigned int)(a8 + 1); v17 = v51; while ( 1 ) { v18 = *(_QWORD *)(v15 + 40); if ( v11 ) { v19 = rtree_key_cmp(v18, a3, v12, v16, 2048LL); v20 = v11; if ( !v19 ) { v21 = mi_kpos(v11, v12); v22 = rtree_delete_req((_DWORD)v49, v50, a3, v51, v21, (_DWORD)v46, (long long)a7, v45); v20 = v11; if ( v22 != 1 ) { if ( v22 != 2 ) { if ( v22 ) return 0xFFFFFFFFLL; v23 = v51 + *v46; v24 = v50; v25 = *(unsigned __int16 *)(v50 + 14) / 3u; v26 = mi_kpos(v11, v12); v28 = v26; if ( v23 >= v25 ) { if ( (unsigned int)rtree_set_key_mbr(v49, v24, v12, v51, v26) || (unsigned int)mi_write_keypage(v49, v50, v48, 3u, v47) ) { return 0xFFFFFFFFLL; } } else { v29 = *a7; if ( *a7 == a7[1] ) { v44 = v26; v30 = v29 + 10; a7[1] = v30; v31 = my_realloc(mi_key_memory_stPageList_pages, a7[2], 16 * v30, 64LL, v26, v27); a7[2] = v31; v32 = v47; if ( !v31 ) return 0xFFFFFFFFLL; v29 = *a7; v33 = v48; v34 = v51; v28 = v44; } else { v31 = a7[2]; v32 = v47; v33 = v48; v34 = v51; } *(_QWORD *)(v31 + 16 * v29 + 8) = v28; *(_DWORD *)(a7[2] + 16 * (*a7)++) = v45; v43 = v49; rtree_delete_key(v49, v32, v12, v34, (unsigned int)v11); if ( (unsigned int)mi_write_keypage(v43, v50, v33, 3u, v32) ) return 0xFFFFFFFFLL; v40 = (unsigned __int8)v32[1]; v41 = *(_DWORD *)v32; LABEL_35: *v46 = v40 | ((v41 & 0x7F) << 8); } return 0LL; } v38 = v49; v39 = v47; rtree_delete_key(v49, v47, v12, v51, (unsigned int)v11); if ( (unsigned int)mi_write_keypage(v38, v50, v48, 3u, v39) ) return 0xFFFFFFFFLL; v40 = (unsigned __int8)v39[1]; v41 = *(_DWORD *)v39; goto LABEL_35; } } } else { if ( !(unsigned int)rtree_key_cmp(v18, a3, v12, v16, 24576LL) ) { v35 = v49; v36 = v47; rtree_delete_key(v49, v47, v12, v51, 0LL); v37 = (unsigned __int8)v36[1] | ((*(_DWORD *)v36 & 0x7F) << 8); *v46 = v37; if ( v37 == 2 ) { if ( (unsigned int)mi_dispose(v35, v50, v48, 3u) ) return 0xFFFFFFFFLL; return 2LL; } else { v42 = (unsigned int)mi_write_keypage(v35, v50, v48, 3u, v36) == 0; result = 0LL; if ( !v42 ) return 0xFFFFFFFFLL; } return result; } v20 = *(unsigned int *)(*v49 + 376); } v12 += v20 + v17; v15 = v50; v16 = v51; if ( v12 >= (unsigned long long)v13 ) return 1LL; } } return result; }
rtree_delete_req: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV qword ptr [RBP + -0x60],R9 MOV dword ptr [RBP + -0x34],ECX MOV R14,RDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOVZX EAX,word ptr [RSI + 0xe] MOV R12,RSP ADD EAX,0xf AND EAX,0xfffffff0 SUB R12,RAX MOV RSP,R12 XOR EBX,EBX MOV qword ptr [RBP + -0x48],RDI MOV qword ptr [RBP + -0x40],RSI MOV qword ptr [RBP + -0x50],R8 MOV RDX,R8 MOV ECX,0x3 MOV R8,R12 XOR R9D,R9D CALL 0x00184424 TEST RAX,RAX JZ 0x0018b358 MOVZX R15D,byte ptr [R12] TEST R15B,R15B JNS 0x0018b073 MOV RAX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RAX] MOV EBX,dword ptr [RAX + 0x17c] LAB_0018b073: MOV R13D,EBX LEA RBX,[R12 + R13*0x1] ADD RBX,0x2 MOVZX EAX,byte ptr [R12 + 0x1] AND R15D,0x7f SHL R15D,0x8 OR R15,RAX ADD R15,R12 MOV EAX,0x1 CMP RBX,R15 MOV RSI,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RBP + -0x34] JNC 0x0018b35d MOV qword ptr [RBP + -0x58],R12 MOV EDX,dword ptr [RBP + 0x18] INC EDX MOV qword ptr [RBP + -0x68],RDX MOV R12D,ECX LAB_0018b0b7: MOV RDI,qword ptr [RSI + 0x28] MOV RSI,R14 MOV RDX,RBX TEST R13,R13 JZ 0x0018b111 MOV R8D,0x800 CALL 0x0018bbe0 MOV RCX,R13 TEST EAX,EAX JNZ 0x0018b131 MOV EDI,R13D MOV RSI,RBX CALL 0x00184d9e MOV RDI,qword ptr [RBP + -0x48] MOV RSI,qword ptr [RBP + -0x40] MOV RDX,R14 MOV ECX,dword ptr [RBP + -0x34] MOV R8,RAX MOV R9,qword ptr [RBP + -0x60] PUSH qword ptr [RBP + -0x68] PUSH qword ptr [RBP + 0x10] CALL 0x0018aff7 ADD RSP,0x10 MOV RCX,R13 CMP EAX,0x1 JZ 0x0018b131 JMP 0x0018b151 LAB_0018b111: MOV R8D,0x6000 CALL 0x0018bbe0 TEST EAX,EAX JZ 0x0018b1f4 MOV RAX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RAX + 0x178] LAB_0018b131: ADD RBX,R12 ADD RBX,RCX CMP RBX,R15 MOV RSI,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RBP + -0x34] JC 0x0018b0b7 MOV EAX,0x1 JMP 0x0018b35d LAB_0018b151: CMP EAX,0x2 JZ 0x0018b252 TEST EAX,EAX JNZ 0x0018b358 MOV RAX,qword ptr [RBP + -0x60] MOV R15D,dword ptr [RAX] ADD R15D,dword ptr [RBP + -0x34] MOV R14,qword ptr [RBP + -0x40] MOVZX EAX,word ptr [R14 + 0xe] IMUL R12D,EAX,0xaaab SHR R12D,0x11 MOV EDI,R13D MOV RSI,RBX CALL 0x00184d9e MOV R8,RAX CMP R15D,R12D JNC 0x0018b2c2 MOV R14,qword ptr [RBP + 0x10] MOV RDX,qword ptr [R14] CMP RDX,qword ptr [R14 + 0x8] JNZ 0x0018b2fb MOV qword ptr [RBP + -0x70],R8 ADD RDX,0xa MOV qword ptr [R14 + 0x8],RDX LEA RAX,[0xcff634] MOV EDI,dword ptr [RAX] MOV RSI,qword ptr [R14 + 0x10] SHL RDX,0x4 MOV ECX,0x40 CALL 0x001a07c4 MOV qword ptr [R14 + 0x10],RAX TEST RAX,RAX MOV R15,qword ptr [RBP + -0x58] JZ 0x0018b358 MOV RDX,qword ptr [R14] MOV R12,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x34] MOV R8,qword ptr [RBP + -0x70] JMP 0x0018b30a LAB_0018b1f4: MOV R15,qword ptr [RBP + -0x48] MOV RDI,R15 MOV R14,qword ptr [RBP + -0x58] MOV RSI,R14 MOV RDX,RBX MOV ECX,dword ptr [RBP + -0x34] XOR R8D,R8D CALL 0x0018baeb MOVZX EAX,byte ptr [R14 + 0x1] MOV ECX,dword ptr [R14] AND ECX,0x7f SHL ECX,0x8 OR ECX,EAX MOV RAX,qword ptr [RBP + -0x60] MOV dword ptr [RAX],ECX MOV RDI,R15 CMP ECX,0x2 JNZ 0x0018b29b MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x50] MOV ECX,0x3 CALL 0x001845a3 TEST EAX,EAX JNZ 0x0018b358 MOV EAX,0x2 JMP 0x0018b35d LAB_0018b252: MOV R15,qword ptr [RBP + -0x48] MOV RDI,R15 MOV R14,qword ptr [RBP + -0x58] MOV RSI,R14 MOV RDX,RBX MOV ECX,dword ptr [RBP + -0x34] MOV R8D,R13D CALL 0x0018baeb MOV RDI,R15 MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x50] MOV ECX,0x3 MOV R8,R14 CALL 0x001844d0 TEST EAX,EAX JNZ 0x0018b358 MOVZX EAX,byte ptr [R14 + 0x1] MOV ECX,dword ptr [R14] JMP 0x0018b383 LAB_0018b29b: MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x50] MOV ECX,0x3 MOV R8,R14 CALL 0x001844d0 TEST EAX,EAX MOV EAX,0x0 JNZ 0x0018b358 JMP 0x0018b35d LAB_0018b2c2: MOV RDI,qword ptr [RBP + -0x48] MOV RSI,R14 MOV RDX,RBX MOV ECX,dword ptr [RBP + -0x34] CALL 0x0018bb78 TEST EAX,EAX MOV R8,qword ptr [RBP + -0x58] JNZ 0x0018b358 MOV RDI,qword ptr [RBP + -0x48] MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x50] MOV ECX,0x3 CALL 0x001844d0 TEST EAX,EAX JNZ 0x0018b358 JMP 0x0018b391 LAB_0018b2fb: MOV RAX,qword ptr [R14 + 0x10] MOV R15,qword ptr [RBP + -0x58] MOV R12,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x34] LAB_0018b30a: SHL RDX,0x4 MOV qword ptr [RAX + RDX*0x1 + 0x8],R8 MOV RAX,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x10] SHL RAX,0x4 MOV RSI,qword ptr [RBP + -0x68] MOV dword ptr [RDX + RAX*0x1],ESI INC qword ptr [R14] MOV R14,qword ptr [RBP + -0x48] MOV RDI,R14 MOV RSI,R15 MOV RDX,RBX MOV R8D,R13D CALL 0x0018baeb MOV RDI,R14 MOV RSI,qword ptr [RBP + -0x40] MOV RDX,R12 MOV ECX,0x3 MOV R8,R15 CALL 0x001844d0 TEST EAX,EAX JZ 0x0018b37b LAB_0018b358: MOV EAX,0xffffffff LAB_0018b35d: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x0018b395 LEA RSP,[RBP + -0x28] POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0018b37b: MOVZX EAX,byte ptr [R15 + 0x1] MOV ECX,dword ptr [R15] LAB_0018b383: AND ECX,0x7f SHL ECX,0x8 OR ECX,EAX MOV RAX,qword ptr [RBP + -0x60] MOV dword ptr [RAX],ECX LAB_0018b391: XOR EAX,EAX JMP 0x0018b35d LAB_0018b395: CALL 0x00129260
int8 rtree_delete_req(long *param_1,long param_2,int8 param_3,uint param_4,int8 param_5, uint *param_6,long *param_7,int param_8) { byte bVar1; ushort uVar2; long lVar3; int8 uVar4; long *plVar5; uint uVar6; int iVar7; long lVar8; int8 uVar9; long lVar10; uint uVar11; ulong uVar12; byte *pbVar13; uint *puVar14; ulong uVar15; ulong uVar16; uint uVar17; byte *pbVar18; long in_FS_OFFSET; ulong auStack_90 [3]; int8 local_78; ulong local_70; uint *local_68; uint *local_60; int8 local_58; long *local_50; long local_48; uint local_3c; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); lVar3 = -(ulong)(*(ushort *)(param_2 + 0xe) + 0xf & 0xfffffff0); puVar14 = (uint *)((long)&local_78 + lVar3); uVar11 = 0; local_68 = param_6; local_58 = param_5; local_50 = param_1; local_48 = param_2; local_3c = param_4; *(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18b053; lVar8 = _mi_fetch_keypage(param_1,param_2,param_5,3,puVar14,0); if (lVar8 == 0) { LAB_0018b358: uVar9 = 0xffffffff; } else { if ((char)(byte)*puVar14 < '\0') { uVar11 = *(uint *)(*local_50 + 0x17c); } uVar16 = (ulong)uVar11; pbVar13 = (byte *)((long)puVar14 + uVar16 + 2); pbVar18 = (byte *)(((ulong)(((byte)*puVar14 & 0x7f) << 8) | (ulong)*(byte *)((long)&local_78 + lVar3 + 1)) + (long)puVar14); uVar9 = 1; if (pbVar13 < pbVar18) { local_70 = (ulong)(param_8 + 1); uVar15 = (ulong)local_3c; local_60 = puVar14; do { uVar6 = local_3c; uVar9 = *(int8 *)(local_48 + 0x28); if (uVar16 == 0) { *(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18b11c; iVar7 = rtree_key_cmp(uVar9,param_3,pbVar13,uVar6,0x6000); uVar6 = local_3c; plVar5 = local_50; puVar14 = local_60; if (iVar7 == 0) { *(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18b210; rtree_delete_key(plVar5,puVar14,pbVar13,uVar6,0); lVar8 = local_48; uVar9 = local_58; uVar11 = (*puVar14 & 0x7f) << 8 | (uint)*(byte *)((long)puVar14 + 1); *local_68 = uVar11; if (uVar11 != 2) { *(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18b2b0; iVar7 = _mi_write_keypage(plVar5,lVar8,uVar9,3,puVar14); uVar9 = 0; if (iVar7 == 0) goto LAB_0018b35d; goto LAB_0018b358; } *(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18b240; iVar7 = _mi_dispose(plVar5,lVar8,uVar9,3); if (iVar7 != 0) goto LAB_0018b358; uVar9 = 2; goto LAB_0018b35d; } uVar12 = (ulong)*(uint *)(*local_50 + 0x178); } else { *(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18b0d1; iVar7 = rtree_key_cmp(uVar9,param_3,pbVar13,uVar6,0x800); uVar12 = uVar16; if (iVar7 == 0) { *(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18b0e3; uVar9 = _mi_kpos(uVar16,pbVar13); uVar6 = local_3c; lVar8 = local_48; plVar5 = local_50; puVar14 = local_68; *(ulong *)((long)auStack_90 + lVar3 + 0x10) = local_70; *(long **)((long)auStack_90 + lVar3 + 8) = param_7; *(int8 *)((long)auStack_90 + lVar3) = 0x18b103; iVar7 = rtree_delete_req(plVar5,lVar8,param_3,uVar6,uVar9,puVar14); uVar6 = local_3c; lVar8 = local_48; plVar5 = local_50; puVar14 = local_60; if (iVar7 != 1) { if (iVar7 == 2) { *(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18b26e; rtree_delete_key(plVar5,puVar14,pbVar13,uVar6,uVar11); lVar8 = local_48; uVar9 = local_58; *(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18b286; iVar7 = _mi_write_keypage(plVar5,lVar8,uVar9,3,puVar14); if (iVar7 != 0) goto LAB_0018b358; bVar1 = *(byte *)((long)puVar14 + 1); uVar11 = *puVar14; LAB_0018b383: *local_68 = (uVar11 & 0x7f) << 8 | (uint)bVar1; } else { if (iVar7 != 0) goto LAB_0018b358; uVar17 = *local_68 + local_3c; uVar2 = *(ushort *)(local_48 + 0xe); *(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18b18c; uVar9 = _mi_kpos(uVar16,pbVar13); uVar6 = local_3c; plVar5 = local_50; if (uVar17 < uVar2 / 3) { lVar8 = *param_7; if (lVar8 == param_7[1]) { param_7[1] = lVar8 + 10; lVar10 = param_7[2]; local_78 = uVar9; *(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18b1d0; lVar10 = my_realloc(mi_key_memory_stPageList_pages,lVar10,(lVar8 + 10) * 0x10, 0x40); param_7[2] = lVar10; if (lVar10 == 0) goto LAB_0018b358; lVar8 = *param_7; uVar9 = local_78; } else { lVar10 = param_7[2]; } uVar6 = local_3c; plVar5 = local_50; uVar4 = local_58; puVar14 = local_60; *(int8 *)(lVar10 + 8 + lVar8 * 0x10) = uVar9; *(int *)(param_7[2] + *param_7 * 0x10) = (int)local_70; *param_7 = *param_7 + 1; *(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18b33d; rtree_delete_key(plVar5,puVar14,pbVar13,uVar6,uVar11); lVar8 = local_48; *(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18b354; iVar7 = _mi_write_keypage(plVar5,lVar8,uVar4,3,puVar14); if (iVar7 == 0) { bVar1 = *(byte *)((long)puVar14 + 1); uVar11 = *puVar14; goto LAB_0018b383; } goto LAB_0018b358; } *(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18b2d4; iVar7 = rtree_set_key_mbr(plVar5,lVar8,pbVar13,uVar6); lVar8 = local_48; plVar5 = local_50; uVar9 = local_58; puVar14 = local_60; if (iVar7 != 0) goto LAB_0018b358; *(int8 *)((long)auStack_90 + lVar3 + 0x10) = 0x18b2f2; iVar7 = _mi_write_keypage(plVar5,lVar8,uVar9,3,puVar14); if (iVar7 != 0) goto LAB_0018b358; } uVar9 = 0; goto LAB_0018b35d; } } } pbVar13 = pbVar13 + uVar12 + uVar15; } while (pbVar13 < pbVar18); uVar9 = 1; } } LAB_0018b35d: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ *(code **)((long)auStack_90 + lVar3 + 0x10) = rtree_estimate; __stack_chk_fail(); } return uVar9; }
20,647
my_utf16le_uni
eloqsql/strings/ctype-ucs2.c
static int my_utf16le_uni(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc, const uchar *s, const uchar *e) { my_wc_t lo; if (s + 2 > e) return MY_CS_TOOSMALL2; if ((*pwc= uint2korr(s)) < MY_UTF16_SURROGATE_HIGH_FIRST || (*pwc > MY_UTF16_SURROGATE_LOW_LAST)) return 2; /* [0000-D7FF,E000-FFFF] */ if (*pwc >= MY_UTF16_SURROGATE_LOW_FIRST) return MY_CS_ILSEQ; /* [DC00-DFFF] Low surrogate part without high part */ if (s + 4 > e) return MY_CS_TOOSMALL4; s+= 2; if ((lo= uint2korr(s)) < MY_UTF16_SURROGATE_LOW_FIRST || lo > MY_UTF16_SURROGATE_LOW_LAST) return MY_CS_ILSEQ; /* Expected low surrogate part, got something else */ *pwc= 0x10000 + (((*pwc & 0x3FF) << 10) | (lo & 0x3FF)); return 4; }
O0
c
my_utf16le_uni: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x6041e movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x604e0 movq -0x20(%rbp), %rax movzwl (%rax), %eax movq -0x18(%rbp), %rcx movq %rax, (%rcx) cmpq $0xd800, %rax # imm = 0xD800 jb 0x60441 movq -0x18(%rbp), %rax cmpq $0xdfff, (%rax) # imm = 0xDFFF jbe 0x6044d movl $0x2, -0x4(%rbp) jmp 0x604e0 movq -0x18(%rbp), %rax cmpq $0xdc00, (%rax) # imm = 0xDC00 jb 0x60463 movl $0x0, -0x4(%rbp) jmp 0x604e0 movq -0x20(%rbp), %rax addq $0x4, %rax cmpq -0x28(%rbp), %rax jbe 0x6047a movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98 jmp 0x604e0 movq -0x20(%rbp), %rax addq $0x2, %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movzwl (%rax), %eax movq %rax, -0x30(%rbp) cmpq $0xdc00, %rax # imm = 0xDC00 jb 0x604a3 cmpq $0xdfff, -0x30(%rbp) # imm = 0xDFFF jbe 0x604ac movl $0x0, -0x4(%rbp) jmp 0x604e0 movq -0x18(%rbp), %rax movq (%rax), %rcx andq $0x3ff, %rcx # imm = 0x3FF shlq $0xa, %rcx movq -0x30(%rbp), %rax andq $0x3ff, %rax # imm = 0x3FF orq %rax, %rcx addq $0x10000, %rcx # imm = 0x10000 movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x4, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
my_utf16le_uni: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_6041E mov [rbp+var_4], 0FFFFFF9Ah jmp loc_604E0 loc_6041E: mov rax, [rbp+var_20] movzx eax, word ptr [rax] mov rcx, [rbp+var_18] mov [rcx], rax cmp rax, 0D800h jb short loc_60441 mov rax, [rbp+var_18] cmp qword ptr [rax], 0DFFFh jbe short loc_6044D loc_60441: mov [rbp+var_4], 2 jmp loc_604E0 loc_6044D: mov rax, [rbp+var_18] cmp qword ptr [rax], 0DC00h jb short loc_60463 mov [rbp+var_4], 0 jmp short loc_604E0 loc_60463: mov rax, [rbp+var_20] add rax, 4 cmp rax, [rbp+var_28] jbe short loc_6047A mov [rbp+var_4], 0FFFFFF98h jmp short loc_604E0 loc_6047A: mov rax, [rbp+var_20] add rax, 2 mov [rbp+var_20], rax mov rax, [rbp+var_20] movzx eax, word ptr [rax] mov [rbp+var_30], rax cmp rax, 0DC00h jb short loc_604A3 cmp [rbp+var_30], 0DFFFh jbe short loc_604AC loc_604A3: mov [rbp+var_4], 0 jmp short loc_604E0 loc_604AC: mov rax, [rbp+var_18] mov rcx, [rax] and rcx, 3FFh shl rcx, 0Ah mov rax, [rbp+var_30] and rax, 3FFh or rcx, rax add rcx, 10000h mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 4 loc_604E0: mov eax, [rbp+var_4] pop rbp retn
long long my_utf16le_uni(long long a1, unsigned long long *a2, unsigned __int16 *a3, unsigned long long a4) { unsigned long long v4; // rax unsigned long long v6; // [rsp+0h] [rbp-30h] if ( (unsigned long long)(a3 + 1) <= a4 ) { v4 = *a3; *a2 = v4; if ( v4 >= 0xD800 && *a2 <= 0xDFFF ) { if ( *a2 < 0xDC00 ) { if ( (unsigned long long)(a3 + 2) <= a4 ) { v6 = a3[1]; if ( v6 >= 0xDC00 && v6 <= 0xDFFF ) { *a2 = (v6 & 0x3FF | ((*a2 & 0x3FF) << 10)) + 0x10000; return 4; } else { return 0; } } else { return (unsigned int)-104; } } else { return 0; } } else { return 2; } } else { return (unsigned int)-102; } }
my_utf16le_uni: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x0016041e MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x001604e0 LAB_0016041e: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,word ptr [RAX] MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RCX],RAX CMP RAX,0xd800 JC 0x00160441 MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX],0xdfff JBE 0x0016044d LAB_00160441: MOV dword ptr [RBP + -0x4],0x2 JMP 0x001604e0 LAB_0016044d: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX],0xdc00 JC 0x00160463 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001604e0 LAB_00160463: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x4 CMP RAX,qword ptr [RBP + -0x28] JBE 0x0016047a MOV dword ptr [RBP + -0x4],0xffffff98 JMP 0x001604e0 LAB_0016047a: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,word ptr [RAX] MOV qword ptr [RBP + -0x30],RAX CMP RAX,0xdc00 JC 0x001604a3 CMP qword ptr [RBP + -0x30],0xdfff JBE 0x001604ac LAB_001604a3: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001604e0 LAB_001604ac: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX] AND RCX,0x3ff SHL RCX,0xa MOV RAX,qword ptr [RBP + -0x30] AND RAX,0x3ff OR RCX,RAX ADD RCX,0x10000 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x4 LAB_001604e0: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_utf16le_uni(int8 param_1,ulong *param_2,ushort *param_3,ushort *param_4) { ushort uVar1; ulong uVar2; int4 local_c; if (param_4 < param_3 + 1) { local_c = 0xffffff9a; } else { uVar1 = *param_3; *param_2 = (ulong)uVar1; if (((ulong)uVar1 < 0xd800) || (0xdfff < *param_2)) { local_c = 2; } else if (*param_2 < 0xdc00) { if (param_4 < param_3 + 2) { local_c = 0xffffff98; } else { uVar2 = (ulong)param_3[1]; if ((uVar2 < 0xdc00) || (0xdfff < uVar2)) { local_c = 0; } else { *param_2 = ((*param_2 & 0x3ff) << 10 | uVar2 & 0x3ff) + 0x10000; local_c = 4; } } } else { local_c = 0; } } return local_c; }
20,648
mthd_stmt_read_prepare_response
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
my_bool mthd_stmt_read_prepare_response(MYSQL_STMT *stmt) { ulong packet_length; uchar *p; if ((packet_length= ma_net_safe_read(stmt->mysql)) == packet_error) return(1); p= (uchar *)stmt->mysql->net.read_pos; if (0xFF == p[0]) /* Error occurred */ { return(1); } p++; stmt->stmt_id= uint4korr(p); p+= 4; stmt->field_count= uint2korr(p); p+= 2; stmt->param_count= uint2korr(p); p+= 2; /* filler */ p++; /* for backward compatibility we also update mysql->warning_count */ stmt->mysql->warning_count= stmt->upsert_status.warning_count= uint2korr(p); /* metadata not supported yet */ if (stmt->param_count && stmt->mysql->methods->db_stmt_get_param_metadata(stmt)) { return 1; } /* allocated bind buffer for parameters */ if (stmt->field_count && stmt->mysql->methods->db_stmt_get_result_metadata(stmt)) { return 1; } if (stmt->param_count) { if (stmt->prebind_params) { if (stmt->prebind_params != stmt->param_count) { SET_CLIENT_STMT_ERROR(stmt, CR_INVALID_PARAMETER_NO, SQLSTATE_UNKNOWN, 0); stmt->param_count= stmt->prebind_params; return 1; } } else { if (!(stmt->params= (MYSQL_BIND *)ma_alloc_root(&stmt->mem_root, stmt->param_count * sizeof(MYSQL_BIND)))) { SET_CLIENT_STMT_ERROR(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); return 1; } memset(stmt->params, '\0', stmt->param_count * sizeof(MYSQL_BIND)); } } /* allocated bind buffer for result */ if (stmt->field_count) { MA_MEM_ROOT *fields_ma_alloc_root= &((MADB_STMT_EXTENSION *)stmt->extension)->fields_ma_alloc_root; if (!(stmt->bind= (MYSQL_BIND *)ma_alloc_root(fields_ma_alloc_root, stmt->field_count * sizeof(MYSQL_BIND)))) { SET_CLIENT_STMT_ERROR(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); return 1; } memset(stmt->bind, 0, sizeof(MYSQL_BIND) * stmt->field_count); } stmt->state = MYSQL_STMT_PREPARED; return(0); }
O0
c
mthd_stmt_read_prepare_response: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x38(%rax), %rdi callq 0x17060 movq %rax, -0x18(%rbp) movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpq %rcx, %rax jne 0x2b6c0 movb $0x1, -0x1(%rbp) jmp 0x2ba80 movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq 0x20(%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movzbl (%rax), %ecx movl $0xff, %eax cmpl %ecx, %eax jne 0x2b6e9 movb $0x1, -0x1(%rbp) jmp 0x2ba80 movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movzbl (%rax), %eax movq -0x20(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx addl %ecx, %eax movq -0x20(%rbp), %rcx movzbl 0x2(%rcx), %ecx shll $0x10, %ecx addl %ecx, %eax movq -0x20(%rbp), %rcx movzbl 0x3(%rcx), %ecx shll $0x18, %ecx addl %ecx, %eax movl %eax, %eax movl %eax, %ecx movq -0x10(%rbp), %rax movq %rcx, 0x40(%rax) movq -0x20(%rbp), %rax addq $0x4, %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movzbl (%rax), %eax movzwl %ax, %eax movq -0x20(%rbp), %rcx movzbl 0x1(%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx addl %ecx, %eax movzwl %ax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x60(%rax) movq -0x20(%rbp), %rax addq $0x2, %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movzbl (%rax), %eax movzwl %ax, %eax movq -0x20(%rbp), %rcx movzbl 0x1(%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx addl %ecx, %eax movzwl %ax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x64(%rax) movq -0x20(%rbp), %rax addq $0x2, %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movzbl (%rax), %eax movzwl %ax, %eax movq -0x20(%rbp), %rcx movzbl 0x1(%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx addl %ecx, %eax movzwl %ax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0xf0(%rax) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movl %ecx, 0x388(%rax) movq -0x10(%rbp), %rax cmpl $0x0, 0x64(%rax) je 0x2b810 movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq 0x4d0(%rax), %rax movq 0x58(%rax), %rax movq -0x10(%rbp), %rdi callq *%rax movsbl %al, %eax cmpl $0x0, %eax je 0x2b810 movb $0x1, -0x1(%rbp) jmp 0x2ba80 movq -0x10(%rbp), %rax cmpl $0x0, 0x60(%rax) je 0x2b844 movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq 0x4d0(%rax), %rax movq 0x50(%rax), %rax movq -0x10(%rbp), %rdi callq *%rax movsbl %al, %eax cmpl $0x0, %eax je 0x2b844 movb $0x1, -0x1(%rbp) jmp 0x2ba80 movq -0x10(%rbp), %rax cmpl $0x0, 0x64(%rax) je 0x2b9ad movq -0x10(%rbp), %rax cmpl $0x0, 0x378(%rax) je 0x2b901 movq -0x10(%rbp), %rax movl 0x378(%rax), %eax movq -0x10(%rbp), %rcx cmpl 0x64(%rcx), %eax je 0x2b8fc jmp 0x2b87c movq -0x10(%rbp), %rax movl $0x7f2, 0x108(%rax) # imm = 0x7F2 movq -0x10(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D leaq 0x357c4(%rip), %rax # 0x61060 movq (%rax), %rsi movl $0x5, %edx callq 0x13210 movq -0x10(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x10(%rbp), %rdi addq $0x10c, %rdi # imm = 0x10C leaq 0x357aa(%rip), %rax # 0x61070 movq 0x110(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x13210 movq -0x10(%rbp), %rax movb $0x0, 0x30b(%rax) movq -0x10(%rbp), %rax movl 0x378(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x64(%rax) movb $0x1, -0x1(%rbp) jmp 0x2ba80 jmp 0x2b9ab movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rax movl 0x64(%rax), %eax imulq $0x70, %rax, %rsi callq 0x25d60 movq -0x10(%rbp), %rcx movq %rax, 0x70(%rcx) cmpq $0x0, %rax jne 0x2b991 jmp 0x2b925 movq -0x10(%rbp), %rax movl $0x7d8, 0x108(%rax) # imm = 0x7D8 movq -0x10(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D leaq 0x3571b(%rip), %rax # 0x61060 movq (%rax), %rsi movl $0x5, %edx callq 0x13210 movq -0x10(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x10(%rbp), %rdi addq $0x10c, %rdi # imm = 0x10C leaq 0x35701(%rip), %rax # 0x61070 movq 0x40(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x13210 movq -0x10(%rbp), %rax movb $0x0, 0x30b(%rax) movb $0x1, -0x1(%rbp) jmp 0x2ba80 movq -0x10(%rbp), %rax movq 0x70(%rax), %rdi movq -0x10(%rbp), %rax movl 0x64(%rax), %eax imulq $0x70, %rax, %rdx xorl %esi, %esi callq 0x13250 jmp 0x2b9ad movq -0x10(%rbp), %rax cmpl $0x0, 0x60(%rax) je 0x2ba71 movq -0x10(%rbp), %rax movq 0x340(%rax), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rdi movq -0x10(%rbp), %rax movl 0x60(%rax), %eax imulq $0x70, %rax, %rsi callq 0x25d60 movq -0x10(%rbp), %rcx movq %rax, 0x78(%rcx) cmpq $0x0, %rax jne 0x2ba57 jmp 0x2b9ee movq -0x10(%rbp), %rax movl $0x7d8, 0x108(%rax) # imm = 0x7D8 movq -0x10(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D leaq 0x35652(%rip), %rax # 0x61060 movq (%rax), %rsi movl $0x5, %edx callq 0x13210 movq -0x10(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x10(%rbp), %rdi addq $0x10c, %rdi # imm = 0x10C leaq 0x35638(%rip), %rax # 0x61070 movq 0x40(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x13210 movq -0x10(%rbp), %rax movb $0x0, 0x30b(%rax) movb $0x1, -0x1(%rbp) jmp 0x2ba80 movq -0x10(%rbp), %rax movq 0x78(%rax), %rdi movq -0x10(%rbp), %rax movl 0x60(%rax), %eax imulq $0x70, %rax, %rdx xorl %esi, %esi callq 0x13250 movq -0x10(%rbp), %rax movl $0x1, 0x50(%rax) movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopl (%rax)
mthd_stmt_read_prepare_response: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rdi, [rax+38h] call ma_net_safe_read mov [rbp+var_18], rax mov ecx, 0FFFFFFFFh cmp rax, rcx jnz short loc_2B6C0 mov [rbp+var_1], 1 jmp loc_2BA80 loc_2B6C0: mov rax, [rbp+var_10] mov rax, [rax+38h] mov rax, [rax+20h] mov [rbp+var_20], rax mov rax, [rbp+var_20] movzx ecx, byte ptr [rax] mov eax, 0FFh cmp eax, ecx jnz short loc_2B6E9 mov [rbp+var_1], 1 jmp loc_2BA80 loc_2B6E9: mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax mov rax, [rbp+var_20] movzx eax, byte ptr [rax] mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+1] shl ecx, 8 add eax, ecx mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+2] shl ecx, 10h add eax, ecx mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+3] shl ecx, 18h add eax, ecx mov eax, eax mov ecx, eax mov rax, [rbp+var_10] mov [rax+40h], rcx mov rax, [rbp+var_20] add rax, 4 mov [rbp+var_20], rax mov rax, [rbp+var_20] movzx eax, byte ptr [rax] movzx eax, ax mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+1] movzx ecx, cx shl ecx, 8 add eax, ecx movzx ecx, ax mov rax, [rbp+var_10] mov [rax+60h], ecx mov rax, [rbp+var_20] add rax, 2 mov [rbp+var_20], rax mov rax, [rbp+var_20] movzx eax, byte ptr [rax] movzx eax, ax mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+1] movzx ecx, cx shl ecx, 8 add eax, ecx movzx ecx, ax mov rax, [rbp+var_10] mov [rax+64h], ecx mov rax, [rbp+var_20] add rax, 2 mov [rbp+var_20], rax mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax mov rax, [rbp+var_20] movzx eax, byte ptr [rax] movzx eax, ax mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+1] movzx ecx, cx shl ecx, 8 add eax, ecx movzx ecx, ax mov rax, [rbp+var_10] mov [rax+0F0h], ecx mov rax, [rbp+var_10] mov rax, [rax+38h] mov [rax+388h], ecx mov rax, [rbp+var_10] cmp dword ptr [rax+64h], 0 jz short loc_2B810 mov rax, [rbp+var_10] mov rax, [rax+38h] mov rax, [rax+4D0h] mov rax, [rax+58h] mov rdi, [rbp+var_10] call rax movsx eax, al cmp eax, 0 jz short loc_2B810 mov [rbp+var_1], 1 jmp loc_2BA80 loc_2B810: mov rax, [rbp+var_10] cmp dword ptr [rax+60h], 0 jz short loc_2B844 mov rax, [rbp+var_10] mov rax, [rax+38h] mov rax, [rax+4D0h] mov rax, [rax+50h] mov rdi, [rbp+var_10] call rax movsx eax, al cmp eax, 0 jz short loc_2B844 mov [rbp+var_1], 1 jmp loc_2BA80 loc_2B844: mov rax, [rbp+var_10] cmp dword ptr [rax+64h], 0 jz loc_2B9AD mov rax, [rbp+var_10] cmp dword ptr [rax+378h], 0 jz loc_2B901 mov rax, [rbp+var_10] mov eax, [rax+378h] mov rcx, [rbp+var_10] cmp eax, [rcx+64h] jz loc_2B8FC jmp short $+2 loc_2B87C: mov rax, [rbp+var_10] mov dword ptr [rax+108h], 7F2h mov rdi, [rbp+var_10] add rdi, 30Dh lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+312h], 0 mov rdi, [rbp+var_10] add rdi, 10Ch lea rax, client_errors mov rsi, [rax+110h] mov edx, 200h call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+30Bh], 0 mov rax, [rbp+var_10] mov ecx, [rax+378h] mov rax, [rbp+var_10] mov [rax+64h], ecx mov [rbp+var_1], 1 jmp loc_2BA80 loc_2B8FC: jmp loc_2B9AB loc_2B901: mov rdi, [rbp+var_10] mov rax, [rbp+var_10] mov eax, [rax+64h] imul rsi, rax, 70h ; 'p' call ma_alloc_root mov rcx, [rbp+var_10] mov [rcx+70h], rax cmp rax, 0 jnz short loc_2B991 jmp short $+2 loc_2B925: mov rax, [rbp+var_10] mov dword ptr [rax+108h], 7D8h mov rdi, [rbp+var_10] add rdi, 30Dh lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+312h], 0 mov rdi, [rbp+var_10] add rdi, 10Ch lea rax, client_errors mov rsi, [rax+40h] mov edx, 200h call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+30Bh], 0 mov [rbp+var_1], 1 jmp loc_2BA80 loc_2B991: mov rax, [rbp+var_10] mov rdi, [rax+70h] mov rax, [rbp+var_10] mov eax, [rax+64h] imul rdx, rax, 70h ; 'p' xor esi, esi call _memset loc_2B9AB: jmp short $+2 loc_2B9AD: mov rax, [rbp+var_10] cmp dword ptr [rax+60h], 0 jz loc_2BA71 mov rax, [rbp+var_10] mov rax, [rax+340h] mov [rbp+var_28], rax mov rdi, [rbp+var_28] mov rax, [rbp+var_10] mov eax, [rax+60h] imul rsi, rax, 70h ; 'p' call ma_alloc_root mov rcx, [rbp+var_10] mov [rcx+78h], rax cmp rax, 0 jnz short loc_2BA57 jmp short $+2 loc_2B9EE: mov rax, [rbp+var_10] mov dword ptr [rax+108h], 7D8h mov rdi, [rbp+var_10] add rdi, 30Dh lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+312h], 0 mov rdi, [rbp+var_10] add rdi, 10Ch lea rax, client_errors mov rsi, [rax+40h] mov edx, 200h call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+30Bh], 0 mov [rbp+var_1], 1 jmp short loc_2BA80 loc_2BA57: mov rax, [rbp+var_10] mov rdi, [rax+78h] mov rax, [rbp+var_10] mov eax, [rax+60h] imul rdx, rax, 70h ; 'p' xor esi, esi call _memset loc_2BA71: mov rax, [rbp+var_10] mov dword ptr [rax+50h], 1 mov [rbp+var_1], 0 loc_2BA80: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char mthd_stmt_read_prepare_response(long long a1, long long a2, long long a3, long long a4, int a5, int a6) { int v6; // ecx char *v7; // rax char *v8; // rax unsigned __int8 *v10; // [rsp+10h] [rbp-20h] unsigned __int8 *v11; // [rsp+10h] [rbp-20h] if ( ma_net_safe_read(*(_QWORD *)(a1 + 56), a2, a3, a4, a5, a6) != 0xFFFFFFFFLL ) { v10 = *(unsigned __int8 **)(*(_QWORD *)(a1 + 56) + 32LL); if ( *v10 == 255 ) return 1; v11 = v10 + 1; *(_QWORD *)(a1 + 64) = (v11[3] << 24) + (v11[2] << 16) + (v11[1] << 8) + (unsigned int)*v11; v11 += 4; *(_DWORD *)(a1 + 96) = (unsigned __int16)((v11[1] << 8) + *v11); v11 += 2; *(_DWORD *)(a1 + 100) = (unsigned __int16)((v11[1] << 8) + *v11); v6 = (unsigned __int16)((v11[4] << 8) + v11[3]); *(_DWORD *)(a1 + 240) = v6; *(_DWORD *)(*(_QWORD *)(a1 + 56) + 904LL) = v6; if ( *(_DWORD *)(a1 + 100) && (*(unsigned __int8 ( **)(long long))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 88LL))(a1) ) { return 1; } if ( *(_DWORD *)(a1 + 96) && (*(unsigned __int8 ( **)(long long))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 80LL))(a1) ) { return 1; } if ( *(_DWORD *)(a1 + 100) ) { if ( *(_DWORD *)(a1 + 888) ) { if ( *(_DWORD *)(a1 + 888) != *(_DWORD *)(a1 + 100) ) { *(_DWORD *)(a1 + 264) = 2034; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; strncpy(a1 + 268, client_errors[34], 512LL); *(_BYTE *)(a1 + 779) = 0; *(_DWORD *)(a1 + 100) = *(_DWORD *)(a1 + 888); return 1; } } else { v7 = ma_alloc_root((_QWORD **)a1, 112LL * *(unsigned int *)(a1 + 100)); *(_QWORD *)(a1 + 112) = v7; if ( !v7 ) goto LABEL_17; memset(*(_QWORD *)(a1 + 112), 0LL, 112LL * *(unsigned int *)(a1 + 100)); } } if ( !*(_DWORD *)(a1 + 96) ) { LABEL_22: *(_DWORD *)(a1 + 80) = 1; return 0; } v8 = ma_alloc_root(*(_QWORD ***)(a1 + 832), 112LL * *(unsigned int *)(a1 + 96)); *(_QWORD *)(a1 + 120) = v8; if ( v8 ) { memset(*(_QWORD *)(a1 + 120), 0LL, 112LL * *(unsigned int *)(a1 + 96)); goto LABEL_22; } LABEL_17: *(_DWORD *)(a1 + 264) = 2008; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; strncpy(a1 + 268, client_errors[8], 512LL); *(_BYTE *)(a1 + 779) = 0; return 1; } return 1; }
mthd_stmt_read_prepare_response: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x38] CALL 0x00117060 MOV qword ptr [RBP + -0x18],RAX MOV ECX,0xffffffff CMP RAX,RCX JNZ 0x0012b6c0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012ba80 LAB_0012b6c0: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX] MOV EAX,0xff CMP EAX,ECX JNZ 0x0012b6e9 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012ba80 LAB_0012b6e9: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x3] SHL ECX,0x18 ADD EAX,ECX MOV EAX,EAX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x40],RCX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x4 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x1] MOVZX ECX,CX SHL ECX,0x8 ADD EAX,ECX MOVZX ECX,AX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x60],ECX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x1] MOVZX ECX,CX SHL ECX,0x8 ADD EAX,ECX MOVZX ECX,AX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x64],ECX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x1] MOVZX ECX,CX SHL ECX,0x8 ADD EAX,ECX MOVZX ECX,AX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xf0],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV dword ptr [RAX + 0x388],ECX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x64],0x0 JZ 0x0012b810 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x4d0] MOV RAX,qword ptr [RAX + 0x58] MOV RDI,qword ptr [RBP + -0x10] CALL RAX MOVSX EAX,AL CMP EAX,0x0 JZ 0x0012b810 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012ba80 LAB_0012b810: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x60],0x0 JZ 0x0012b844 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x4d0] MOV RAX,qword ptr [RAX + 0x50] MOV RDI,qword ptr [RBP + -0x10] CALL RAX MOVSX EAX,AL CMP EAX,0x0 JZ 0x0012b844 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012ba80 LAB_0012b844: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x64],0x0 JZ 0x0012b9ad MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x378],0x0 JZ 0x0012b901 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x378] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x64] JZ 0x0012b8fc JMP 0x0012b87c LAB_0012b87c: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x108],0x7f2 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x30d LEA RAX,[0x161060] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x312],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x10c LEA RAX,[0x161070] MOV RSI,qword ptr [RAX + 0x110] MOV EDX,0x200 CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x30b],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x378] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x64],ECX MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012ba80 LAB_0012b8fc: JMP 0x0012b9ab LAB_0012b901: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x64] IMUL RSI,RAX,0x70 CALL 0x00125d60 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x70],RAX CMP RAX,0x0 JNZ 0x0012b991 JMP 0x0012b925 LAB_0012b925: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x108],0x7d8 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x30d LEA RAX,[0x161060] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x312],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x10c LEA RAX,[0x161070] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x200 CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x30b],0x0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012ba80 LAB_0012b991: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x70] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x64] IMUL RDX,RAX,0x70 XOR ESI,ESI CALL 0x00113250 LAB_0012b9ab: JMP 0x0012b9ad LAB_0012b9ad: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x60],0x0 JZ 0x0012ba71 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x340] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x60] IMUL RSI,RAX,0x70 CALL 0x00125d60 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x78],RAX CMP RAX,0x0 JNZ 0x0012ba57 JMP 0x0012b9ee LAB_0012b9ee: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x108],0x7d8 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x30d LEA RAX,[0x161060] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x312],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x10c LEA RAX,[0x161070] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x200 CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x30b],0x0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012ba80 LAB_0012ba57: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x78] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x60] IMUL RDX,RAX,0x70 XOR ESI,ESI CALL 0x00113250 LAB_0012ba71: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x50],0x1 MOV byte ptr [RBP + -0x1],0x0 LAB_0012ba80: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 mthd_stmt_read_prepare_response(long param_1) { char *pcVar1; char cVar2; long lVar3; uint uVar4; int1 local_9; lVar3 = ma_net_safe_read(*(int8 *)(param_1 + 0x38)); if (lVar3 == 0xffffffff) { local_9 = 1; } else { pcVar1 = *(char **)(*(long *)(param_1 + 0x38) + 0x20); if (*pcVar1 == -1) { local_9 = 1; } else { *(ulong *)(param_1 + 0x40) = (ulong)((uint)(byte)pcVar1[1] + (uint)(byte)pcVar1[2] * 0x100 + (uint)(byte)pcVar1[3] * 0x10000 + (uint)(byte)pcVar1[4] * 0x1000000); *(uint *)(param_1 + 0x60) = (uint)(byte)pcVar1[5] + (uint)(byte)pcVar1[6] * 0x100 & 0xffff; *(uint *)(param_1 + 100) = (uint)(byte)pcVar1[7] + (uint)(byte)pcVar1[8] * 0x100 & 0xffff; uVar4 = (uint)(byte)pcVar1[10] + (uint)(byte)pcVar1[0xb] * 0x100 & 0xffff; *(uint *)(param_1 + 0xf0) = uVar4; *(uint *)(*(long *)(param_1 + 0x38) + 0x388) = uVar4; if ((*(int *)(param_1 + 100) == 0) || (cVar2 = (**(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x58))(param_1), cVar2 == '\0')) { if ((*(int *)(param_1 + 0x60) == 0) || (cVar2 = (**(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x50))(param_1), cVar2 == '\0')) { if (*(int *)(param_1 + 100) != 0) { if (*(int *)(param_1 + 0x378) == 0) { lVar3 = ma_alloc_root(param_1); *(long *)(param_1 + 0x70) = lVar3; if (lVar3 == 0) { *(int4 *)(param_1 + 0x108) = 0x7d8; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; strncpy((char *)(param_1 + 0x10c),PTR_s_Client_run_out_of_memory_001610b0,0x200); *(int1 *)(param_1 + 0x30b) = 0; return 1; } memset(*(void **)(param_1 + 0x70),0,(ulong)*(uint *)(param_1 + 100) * 0x70); } else if (*(int *)(param_1 + 0x378) != *(int *)(param_1 + 100)) { *(int4 *)(param_1 + 0x108) = 0x7f2; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; strncpy((char *)(param_1 + 0x10c),PTR_s_Invalid_parameter_number_00161180,0x200); *(int1 *)(param_1 + 0x30b) = 0; *(int4 *)(param_1 + 100) = *(int4 *)(param_1 + 0x378); return 1; } } if (*(int *)(param_1 + 0x60) != 0) { lVar3 = ma_alloc_root(*(int8 *)(param_1 + 0x340)); *(long *)(param_1 + 0x78) = lVar3; if (lVar3 == 0) { *(int4 *)(param_1 + 0x108) = 0x7d8; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; strncpy((char *)(param_1 + 0x10c),PTR_s_Client_run_out_of_memory_001610b0,0x200); *(int1 *)(param_1 + 0x30b) = 0; return 1; } memset(*(void **)(param_1 + 0x78),0,(ulong)*(uint *)(param_1 + 0x60) * 0x70); } *(int4 *)(param_1 + 0x50) = 1; local_9 = 0; } else { local_9 = 1; } } else { local_9 = 1; } } } return local_9; }
20,649
ma_init_dynamic_string
eloqsql/libmariadb/libmariadb/ma_string.c
my_bool ma_init_dynamic_string(DYNAMIC_STRING *str, const char *init_str, size_t init_alloc, size_t alloc_increment) { uint length; if (!alloc_increment) alloc_increment=128; length=1; if (init_str && (length= (uint) strlen(init_str)+1) < init_alloc) init_alloc=((length+alloc_increment-1)/alloc_increment)*alloc_increment; if (!init_alloc) init_alloc=alloc_increment; if (!(str->str=(char*) malloc(init_alloc))) return(TRUE); str->length=length-1; if (init_str) memcpy(str->str,init_str,length); str->max_length=init_alloc; str->alloc_increment=alloc_increment; return(FALSE); }
O3
c
ma_init_dynamic_string: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx testq %rcx, %rcx movl $0x80, %r13d cmovneq %rcx, %r13 testq %rsi, %rsi je 0x95b20 movq %r15, %rdi callq 0x39400 movq %rax, %r12 incl %r12d cmpq %r14, %r12 jae 0x95b26 leaq (%r12,%r13), %r14 decq %r14 movq %r14, %rax xorl %edx, %edx divq %r13 subq %rdx, %r14 jmp 0x95b26 movl $0x1, %r12d testq %r14, %r14 cmoveq %r13, %r14 movq %r14, %rdi callq 0x39930 movq %rax, (%rbx) testq %rax, %rax je 0x95b65 leal -0x1(%r12), %ecx movq %rcx, 0x8(%rbx) testq %r15, %r15 je 0x95b59 movl %r12d, %edx movq %rax, %rdi movq %r15, %rsi callq 0x390a0 movq %r14, 0x10(%rbx) movq %r13, 0x18(%rbx) xorl %eax, %eax jmp 0x95b67 movb $0x1, %al addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ma_init_dynamic_string: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rdx mov r15, rsi mov rbx, rdi test rcx, rcx mov r13d, 80h cmovnz r13, rcx test rsi, rsi jz short loc_95B20 mov rdi, r15 call _strlen mov r12, rax inc r12d cmp r12, r14 jnb short loc_95B26 lea r14, [r12+r13] dec r14 mov rax, r14 xor edx, edx div r13 sub r14, rdx jmp short loc_95B26 loc_95B20: mov r12d, 1 loc_95B26: test r14, r14 cmovz r14, r13 mov rdi, r14 call _malloc mov [rbx], rax test rax, rax jz short loc_95B65 lea ecx, [r12-1] mov [rbx+8], rcx test r15, r15 jz short loc_95B59 mov edx, r12d mov rdi, rax mov rsi, r15 call _memcpy loc_95B59: mov [rbx+10h], r14 mov [rbx+18h], r13 xor eax, eax jmp short loc_95B67 loc_95B65: mov al, 1 loc_95B67: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ma_init_dynamic_string(long long *a1, long long a2, unsigned long long a3, unsigned long long a4) { unsigned long long v5; // r13 unsigned long long v6; // r12 long long v7; // rax v5 = 128LL; if ( a4 ) v5 = a4; if ( a2 ) { v6 = (unsigned int)strlen(a2) + 1; if ( v6 < a3 ) a3 = v6 + v5 - 1 - (v6 + v5 - 1) % v5; } else { LODWORD(v6) = 1; } if ( !a3 ) a3 = v5; v7 = malloc(a3); *a1 = v7; if ( !v7 ) return 1LL; a1[1] = (unsigned int)(v6 - 1); if ( a2 ) memcpy(v7, a2, (unsigned int)v6); a1[2] = a3; a1[3] = v5; return 0LL; }
ma_init_dynamic_string: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDX MOV R15,RSI MOV RBX,RDI TEST RCX,RCX MOV R13D,0x80 CMOVNZ R13,RCX TEST RSI,RSI JZ 0x00195b20 MOV RDI,R15 CALL 0x00139400 MOV R12,RAX INC R12D CMP R12,R14 JNC 0x00195b26 LEA R14,[R12 + R13*0x1] DEC R14 MOV RAX,R14 XOR EDX,EDX DIV R13 SUB R14,RDX JMP 0x00195b26 LAB_00195b20: MOV R12D,0x1 LAB_00195b26: TEST R14,R14 CMOVZ R14,R13 MOV RDI,R14 CALL 0x00139930 MOV qword ptr [RBX],RAX TEST RAX,RAX JZ 0x00195b65 LEA ECX,[R12 + -0x1] MOV qword ptr [RBX + 0x8],RCX TEST R15,R15 JZ 0x00195b59 MOV EDX,R12D MOV RDI,RAX MOV RSI,R15 CALL 0x001390a0 LAB_00195b59: MOV qword ptr [RBX + 0x10],R14 MOV qword ptr [RBX + 0x18],R13 XOR EAX,EAX JMP 0x00195b67 LAB_00195b65: MOV AL,0x1 LAB_00195b67: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 ma_init_dynamic_string(int8 *param_1,char *param_2,ulong param_3,ulong param_4) { size_t sVar1; void *__dest; int8 uVar2; ulong uVar3; uVar3 = 0x80; if (param_4 != 0) { uVar3 = param_4; } if (param_2 == (char *)0x0) { sVar1 = 1; } else { sVar1 = strlen(param_2); sVar1 = (size_t)((int)sVar1 + 1); if (sVar1 < param_3) { param_3 = (sVar1 + uVar3) - 1; param_3 = param_3 - param_3 % uVar3; } } if (param_3 == 0) { param_3 = uVar3; } __dest = malloc(param_3); *param_1 = __dest; if (__dest == (void *)0x0) { uVar2 = 1; } else { param_1[1] = (ulong)((int)sVar1 - 1); if (param_2 != (char *)0x0) { memcpy(__dest,param_2,sVar1); } param_1[2] = param_3; param_1[3] = uVar3; uVar2 = 0; } return uVar2; }
20,650
ma_readinfo
eloqsql/storage/maria/ma_locking.c
int _ma_readinfo(register MARIA_HA *info __attribute__ ((unused)), int lock_type __attribute__ ((unused)), int check_keybuffer __attribute__ ((unused))) { #ifdef MARIA_EXTERNAL_LOCKING DBUG_ENTER("_ma_readinfo"); if (info->lock_type == F_UNLCK) { MARIA_SHARE *share= info->s; if (!share->tot_locks) { /* should not be done for transactional tables */ if (_ma_state_info_read_dsk(share->kfile.file, &share->state)) { if (!my_errno) my_errno= HA_ERR_FILE_TOO_SHORT; DBUG_RETURN(1); } } if (check_keybuffer) VOID(_ma_test_if_changed(info)); info->invalidator=share->invalidator; } else if (lock_type == F_WRLCK && info->lock_type == F_RDLCK) { my_errno=EACCES; /* Not allowed to change */ DBUG_RETURN(-1); /* when have read_lock() */ } DBUG_RETURN(0); #else return 0; #endif /* defined(MARIA_EXTERNAL_LOCKING) */ }
O0
c
ma_readinfo: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) xorl %eax, %eax popq %rbp retq nopw %cs:(%rax,%rax)
_ma_readinfo: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx xor eax, eax pop rbp retn
long long ma_readinfo() { return 0LL; }
_ma_readinfo: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX XOR EAX,EAX POP RBP RET
int8 _ma_readinfo(void) { return 0; }
20,651
ma_readinfo
eloqsql/storage/maria/ma_locking.c
int _ma_readinfo(register MARIA_HA *info __attribute__ ((unused)), int lock_type __attribute__ ((unused)), int check_keybuffer __attribute__ ((unused))) { #ifdef MARIA_EXTERNAL_LOCKING DBUG_ENTER("_ma_readinfo"); if (info->lock_type == F_UNLCK) { MARIA_SHARE *share= info->s; if (!share->tot_locks) { /* should not be done for transactional tables */ if (_ma_state_info_read_dsk(share->kfile.file, &share->state)) { if (!my_errno) my_errno= HA_ERR_FILE_TOO_SHORT; DBUG_RETURN(1); } } if (check_keybuffer) VOID(_ma_test_if_changed(info)); info->invalidator=share->invalidator; } else if (lock_type == F_WRLCK && info->lock_type == F_RDLCK) { my_errno=EACCES; /* Not allowed to change */ DBUG_RETURN(-1); /* when have read_lock() */ } DBUG_RETURN(0); #else return 0; #endif /* defined(MARIA_EXTERNAL_LOCKING) */ }
O3
c
ma_readinfo: pushq %rbp movq %rsp, %rbp xorl %eax, %eax popq %rbp retq
_ma_readinfo: push rbp mov rbp, rsp xor eax, eax pop rbp retn
long long ma_readinfo() { return 0LL; }
_ma_readinfo: PUSH RBP MOV RBP,RSP XOR EAX,EAX POP RBP RET
int8 _ma_readinfo(void) { return 0; }
20,652
JS_ToFloat64Free
bluesky950520[P]quickjs/quickjs.c
static inline int JS_ToFloat64Free(JSContext *ctx, double *pres, JSValue val) { uint32_t tag; tag = JS_VALUE_GET_TAG(val); if (tag <= JS_TAG_NULL) { *pres = JS_VALUE_GET_INT(val); return 0; } else if (JS_TAG_IS_FLOAT64(tag)) { *pres = JS_VALUE_GET_FLOAT64(val); return 0; } else { return __JS_ToFloat64Free(ctx, pres, val); } }
O0
c
JS_ToFloat64Free: subq $0x38, %rsp movq %rdx, 0x20(%rsp) movq %rcx, 0x28(%rsp) movq %rdi, 0x18(%rsp) movq %rsi, 0x10(%rsp) movq 0x28(%rsp), %rax movl %eax, 0xc(%rsp) cmpl $0x2, 0xc(%rsp) ja 0x38631 cvtsi2sdl 0x20(%rsp), %xmm0 movq 0x10(%rsp), %rax movsd %xmm0, (%rax) movl $0x0, 0x34(%rsp) jmp 0x3866e cmpl $0x7, 0xc(%rsp) jne 0x38651 movsd 0x20(%rsp), %xmm0 movq 0x10(%rsp), %rax movsd %xmm0, (%rax) movl $0x0, 0x34(%rsp) jmp 0x3866e movq 0x18(%rsp), %rdi movq 0x10(%rsp), %rsi movq 0x20(%rsp), %rdx movq 0x28(%rsp), %rcx callq 0x61c90 movl %eax, 0x34(%rsp) movl 0x34(%rsp), %eax addq $0x38, %rsp retq nopw (%rax,%rax)
JS_ToFloat64Free: sub rsp, 38h mov [rsp+38h+var_18], rdx mov [rsp+38h+var_10], rcx mov [rsp+38h+var_20], rdi mov [rsp+38h+var_28], rsi mov rax, [rsp+38h+var_10] mov [rsp+38h+var_2C], eax cmp [rsp+38h+var_2C], 2 ja short loc_38631 cvtsi2sd xmm0, dword ptr [rsp+38h+var_18] mov rax, [rsp+38h+var_28] movsd qword ptr [rax], xmm0 mov [rsp+38h+var_4], 0 jmp short loc_3866E loc_38631: cmp [rsp+38h+var_2C], 7 jnz short loc_38651 movsd xmm0, [rsp+38h+var_18] mov rax, [rsp+38h+var_28] movsd qword ptr [rax], xmm0 mov [rsp+38h+var_4], 0 jmp short loc_3866E loc_38651: mov rdi, [rsp+38h+var_20] mov rsi, [rsp+38h+var_28] mov rdx, [rsp+38h+var_18] mov rcx, [rsp+38h+var_10] call __JS_ToFloat64Free mov [rsp+38h+var_4], eax loc_3866E: mov eax, [rsp+38h+var_4] add rsp, 38h retn
long long JS_ToFloat64Free(long long a1, double *a2, long long a3, long long a4) { if ( (unsigned int)a4 > 2 ) { if ( (_DWORD)a4 == 7 ) { *(_QWORD *)a2 = a3; return 0; } else { return (unsigned int)_JS_ToFloat64Free(a1, a2, a3, a4); } } else { *a2 = (double)(int)a3; return 0; } }
JS_ToFloat64Free: SUB RSP,0x38 MOV qword ptr [RSP + 0x20],RDX MOV qword ptr [RSP + 0x28],RCX MOV qword ptr [RSP + 0x18],RDI MOV qword ptr [RSP + 0x10],RSI MOV RAX,qword ptr [RSP + 0x28] MOV dword ptr [RSP + 0xc],EAX CMP dword ptr [RSP + 0xc],0x2 JA 0x00138631 CVTSI2SD XMM0,dword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x10] MOVSD qword ptr [RAX],XMM0 MOV dword ptr [RSP + 0x34],0x0 JMP 0x0013866e LAB_00138631: CMP dword ptr [RSP + 0xc],0x7 JNZ 0x00138651 MOVSD XMM0,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x10] MOVSD qword ptr [RAX],XMM0 MOV dword ptr [RSP + 0x34],0x0 JMP 0x0013866e LAB_00138651: MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x28] CALL 0x00161c90 MOV dword ptr [RSP + 0x34],EAX LAB_0013866e: MOV EAX,dword ptr [RSP + 0x34] ADD RSP,0x38 RET
int4 JS_ToFloat64Free(int8 param_1,double *param_2,double param_3,int8 param_4) { int4 local_18; int4 local_4; if ((uint)param_4 < 3) { local_18 = SUB84(param_3,0); *param_2 = (double)local_18; local_4 = 0; } else if ((uint)param_4 == 7) { *param_2 = param_3; local_4 = 0; } else { local_4 = __JS_ToFloat64Free(param_1,param_2,param_3,param_4); } return local_4; }
20,653
JS_ToFloat64Free
bluesky950520[P]quickjs/quickjs.c
static inline int JS_ToFloat64Free(JSContext *ctx, double *pres, JSValue val) { uint32_t tag; tag = JS_VALUE_GET_TAG(val); if (tag <= JS_TAG_NULL) { *pres = JS_VALUE_GET_INT(val); return 0; } else if (JS_TAG_IS_FLOAT64(tag)) { *pres = JS_VALUE_GET_FLOAT64(val); return 0; } else { return __JS_ToFloat64Free(ctx, pres, val); } }
O2
c
JS_ToFloat64Free: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx cmpl $0x2, %ecx ja 0x212a5 cvtsi2sd %edx, %xmm0 movsd %xmm0, (%rbx) jmp 0x212ad cmpl $0x7, %ecx jne 0x212b1 movq %rdx, (%rbx) xorl %ebp, %ebp jmp 0x21327 movq %rdi, %r14 movq %rdx, %rsi movq %rcx, %rdx callq 0x2e216 movq %rdx, %r12 cmpl $0x6, %r12d jne 0x212d5 pushq $-0x1 popq %rbp movsd 0x644fd(%rip), %xmm0 # 0x857d0 jmp 0x21323 movq %rax, %r15 cmpl $-0x9, %r12d je 0x212f9 xorl %ebp, %ebp cmpl $0x7, %r12d je 0x212f2 testl %r12d, %r12d jne 0x21338 cvtsi2sd %r15d, %xmm0 jmp 0x21323 movq %r15, %xmm0 jmp 0x21323 movq %r15, %rdi addq $0x8, %rdi movq %rsp, %r13 xorl %ebp, %ebp movq %r13, %rsi xorl %edx, %edx callq 0x723c2 movq %r14, %rdi movq %r15, %rsi movq %r12, %rdx callq 0x1801e movsd (%r13), %xmm0 movsd %xmm0, (%rbx) movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0xe090
JS_ToFloat64Free: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi cmp ecx, 2 ja short loc_212A5 cvtsi2sd xmm0, edx movsd qword ptr [rbx], xmm0 jmp short loc_212AD loc_212A5: cmp ecx, 7 jnz short loc_212B1 mov [rbx], rdx loc_212AD: xor ebp, ebp jmp short loc_21327 loc_212B1: mov r14, rdi mov rsi, rdx mov rdx, rcx call JS_ToNumberFree mov r12, rdx cmp r12d, 6 jnz short loc_212D5 push 0FFFFFFFFFFFFFFFFh pop rbp movsd xmm0, cs:qword_857D0 jmp short loc_21323 loc_212D5: mov r15, rax cmp r12d, 0FFFFFFF7h jz short loc_212F9 xor ebp, ebp cmp r12d, 7 jz short loc_212F2 test r12d, r12d jnz short loc_21338 cvtsi2sd xmm0, r15d jmp short loc_21323 loc_212F2: movq xmm0, r15 jmp short loc_21323 loc_212F9: mov rdi, r15 add rdi, 8 mov r13, rsp xor ebp, ebp mov rsi, r13 xor edx, edx call bf_get_float64 mov rdi, r14 mov rsi, r15 mov rdx, r12 call JS_FreeValue movsd xmm0, qword ptr [r13+0] loc_21323: movsd qword ptr [rbx], xmm0 loc_21327: mov eax, ebp add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_21338: call _abort
long long JS_ToFloat64Free(const char *a1, double *a2, long long a3, long long a4) { double v4; // rax unsigned int v5; // ebp long long v6; // rax long long v7; // rdx long long v8; // r12 double v9; // xmm0_8 long long v10; // r15 double v12; // [rsp-8h] [rbp-38h] BYREF v12 = v4; if ( (unsigned int)a4 <= 2 ) { *a2 = (double)(int)a3; return 0; } if ( (_DWORD)a4 == 7 ) { *(_QWORD *)a2 = a3; return 0; } *(double *)&v6 = COERCE_DOUBLE(JS_ToNumberFree(a1, a3, a4)); v8 = v7; if ( (_DWORD)v7 == 6 ) { v5 = -1; v9 = NAN; } else { v10 = v6; if ( (_DWORD)v7 == -9 ) { v5 = 0; bf_get_float64(v6 + 8, &v12, 0LL); JS_FreeValue((long long)a1, v10, v8); v9 = v12; } else { v5 = 0; if ( (_DWORD)v7 == 7 ) { v9 = *(double *)&v6; } else { if ( (_DWORD)v7 ) abort(a1); v9 = (double)(int)v6; } } } *a2 = v9; return v5; }
JS_ToFloat64Free: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI CMP ECX,0x2 JA 0x001212a5 CVTSI2SD XMM0,EDX MOVSD qword ptr [RBX],XMM0 JMP 0x001212ad LAB_001212a5: CMP ECX,0x7 JNZ 0x001212b1 MOV qword ptr [RBX],RDX LAB_001212ad: XOR EBP,EBP JMP 0x00121327 LAB_001212b1: MOV R14,RDI MOV RSI,RDX MOV RDX,RCX CALL 0x0012e216 MOV R12,RDX CMP R12D,0x6 JNZ 0x001212d5 PUSH -0x1 POP RBP MOVSD XMM0,qword ptr [0x001857d0] JMP 0x00121323 LAB_001212d5: MOV R15,RAX CMP R12D,-0x9 JZ 0x001212f9 XOR EBP,EBP CMP R12D,0x7 JZ 0x001212f2 TEST R12D,R12D JNZ 0x00121338 CVTSI2SD XMM0,R15D JMP 0x00121323 LAB_001212f2: MOVQ XMM0,R15 JMP 0x00121323 LAB_001212f9: MOV RDI,R15 ADD RDI,0x8 MOV R13,RSP XOR EBP,EBP MOV RSI,R13 XOR EDX,EDX CALL 0x001723c2 MOV RDI,R14 MOV RSI,R15 MOV RDX,R12 CALL 0x0011801e MOVSD XMM0,qword ptr [R13] LAB_00121323: MOVSD qword ptr [RBX],XMM0 LAB_00121327: MOV EAX,EBP ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00121338: CALL 0x0010e090
int4 JS_ToFloat64Free(int8 param_1,double *param_2,double param_3,int8 param_4) { double in_RAX; int4 uVar1; int iVar2; double dVar3; int1 auVar4 [16]; double local_38; if ((uint)param_4 < 3) { *param_2 = (double)SUB84(param_3,0); } else { if ((uint)param_4 != 7) { local_38 = in_RAX; auVar4 = JS_ToNumberFree(param_1,param_3,param_4); dVar3 = auVar4._0_8_; iVar2 = auVar4._8_4_; if (iVar2 == 6) { uVar1 = 0xffffffff; dVar3 = DAT_001857d0; } else if (iVar2 == -9) { uVar1 = 0; bf_get_float64((long)dVar3 + 8,&local_38,0); JS_FreeValue(param_1,dVar3,auVar4._8_8_); dVar3 = local_38; } else { uVar1 = 0; if (iVar2 != 7) { if (iVar2 != 0) { /* WARNING: Subroutine does not return */ abort(); } dVar3 = (double)auVar4._0_4_; } } *param_2 = dVar3; return uVar1; } *param_2 = param_3; } return 0; }
20,654
SchemaConverter::format_grammar[abi:cxx11]()
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string format_grammar() { std::stringstream ss; for (const auto & kv : _rules) { ss << kv.first << " ::= " << kv.second << std::endl; } return ss.str(); }
O0
cpp
SchemaConverter::format_grammar[abi:cxx11](): subq $0x1f8, %rsp # imm = 0x1F8 movq %rdi, 0x18(%rsp) movq %rdi, %rax movq %rax, 0x20(%rsp) movq %rdi, 0x1f0(%rsp) movq %rsi, 0x1e8(%rsp) movq 0x1e8(%rsp), %rax movq %rax, 0x28(%rsp) leaq 0x60(%rsp), %rdi callq 0x5d550 movq 0x28(%rsp), %rax addq $0x28, %rax movq %rax, 0x58(%rsp) movq 0x58(%rsp), %rdi callq 0x1a7070 movq %rax, 0x50(%rsp) movq 0x58(%rsp), %rdi callq 0x1a5b00 movq %rax, 0x48(%rsp) leaq 0x50(%rsp), %rdi leaq 0x48(%rsp), %rsi callq 0x1a70a0 testb $0x1, %al jne 0x1a483f jmp 0x1a48d2 leaq 0x50(%rsp), %rdi callq 0x1a5b50 movq %rax, 0x40(%rsp) leaq 0x70(%rsp), %rdi movq 0x40(%rsp), %rsi callq 0x5d540 movq %rax, 0x10(%rsp) jmp 0x1a4864 movq 0x10(%rsp), %rdi leaq 0x797f3(%rip), %rsi # 0x21e063 callq 0x5da30 movq %rax, 0x8(%rsp) jmp 0x1a487c movq 0x8(%rsp), %rdi movq 0x40(%rsp), %rsi addq $0x20, %rsi callq 0x5d540 movq %rax, (%rsp) jmp 0x1a4895 movq (%rsp), %rdi movq 0x109718(%rip), %rsi # 0x2adfb8 callq 0x5e190 jmp 0x1a48a7 jmp 0x1a48a9 leaq 0x50(%rsp), %rdi callq 0x1a69d0 jmp 0x1a4827 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x38(%rsp) movl %eax, 0x34(%rsp) leaq 0x60(%rsp), %rdi callq 0x5d670 jmp 0x1a48fa movq 0x18(%rsp), %rdi leaq 0x60(%rsp), %rsi callq 0x5dc90 jmp 0x1a48e3 leaq 0x60(%rsp), %rdi callq 0x5d670 movq 0x20(%rsp), %rax addq $0x1f8, %rsp # imm = 0x1F8 retq movq 0x38(%rsp), %rdi callq 0x5dbc0 nopw %cs:(%rax,%rax) nop
_ZN15SchemaConverter14format_grammarB5cxx11Ev: sub rsp, 1F8h mov [rsp+1F8h+var_1E0], rdi mov rax, rdi mov [rsp+1F8h+var_1D8], rax mov [rsp+1F8h+var_8], rdi mov [rsp+1F8h+var_10], rsi mov rax, [rsp+1F8h+var_10] mov [rsp+1F8h+var_1D0], rax lea rdi, [rsp+1F8h+var_198] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) mov rax, [rsp+1F8h+var_1D0] add rax, 28h ; '(' mov [rsp+1F8h+var_1A0], rax mov rdi, [rsp+1F8h+var_1A0] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEE5beginEv; std::map<std::string,std::string>::begin(void) mov [rsp+1F8h+var_1A8], rax mov rdi, [rsp+1F8h+var_1A0] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEE3endEv; std::map<std::string,std::string>::end(void) mov [rsp+1F8h+var_1B0], rax loc_1A4827: lea rdi, [rsp+1F8h+var_1A8] lea rsi, [rsp+1F8h+var_1B0] call _ZStneRKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EESB_; std::operator!=(std::_Rb_tree_iterator<std::pair<std::string const,std::string>> const&,std::_Rb_tree_iterator<std::pair<std::string const,std::string>> const&) test al, 1 jnz short loc_1A483F jmp loc_1A48D2 loc_1A483F: lea rdi, [rsp+1F8h+var_1A8] call _ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEdeEv; std::_Rb_tree_iterator<std::pair<std::string const,std::string>>::operator*(void) mov [rsp+1F8h+var_1B8], rax lea rdi, [rsp+1F8h+var_188] mov rsi, [rsp+1F8h+var_1B8] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov [rsp+1F8h+var_1E8], rax jmp short $+2 loc_1A4864: mov rdi, [rsp+1F8h+var_1E8] lea rsi, asc_21E063; " ::= " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+1F8h+var_1F0], rax jmp short $+2 loc_1A487C: mov rdi, [rsp+1F8h+var_1F0] mov rsi, [rsp+1F8h+var_1B8] add rsi, 20h ; ' ' call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov [rsp+1F8h+var_1F8], rax jmp short $+2 loc_1A4895: mov rdi, [rsp+1F8h+var_1F8] mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &)) jmp short $+2 loc_1A48A7: jmp short $+2 loc_1A48A9: lea rdi, [rsp+1F8h+var_1A8] call _ZNSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEppEv; std::_Rb_tree_iterator<std::pair<std::string const,std::string>>::operator++(void) jmp loc_1A4827 mov rcx, rax mov eax, edx mov [rsp+arg_30], rcx mov [rsp+arg_2C], eax lea rdi, [rsp+arg_58] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() jmp short loc_1A48FA loc_1A48D2: mov rdi, [rsp+1F8h+var_1E0] lea rsi, [rsp+1F8h+var_198] call __ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(void) jmp short $+2 loc_1A48E3: lea rdi, [rsp+1F8h+var_198] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() mov rax, [rsp+1F8h+var_1D8] add rsp, 1F8h retn loc_1A48FA: mov rdi, [rsp+arg_30] call __Unwind_Resume
long long SchemaConverter::format_grammar[abi:cxx11](long long a1, long long a2) { long long v3; // [rsp+0h] [rbp-1F8h] long long v4; // [rsp+8h] [rbp-1F0h] long long v5; // [rsp+10h] [rbp-1E8h] long long v6; // [rsp+40h] [rbp-1B8h] long long v7; // [rsp+48h] [rbp-1B0h] BYREF _QWORD v8[2]; // [rsp+50h] [rbp-1A8h] BYREF _BYTE v9[16]; // [rsp+60h] [rbp-198h] BYREF _BYTE v10[376]; // [rsp+70h] [rbp-188h] BYREF long long v11; // [rsp+1E8h] [rbp-10h] long long v12; // [rsp+1F0h] [rbp-8h] v12 = a1; v11 = a2; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v9); v8[1] = a2 + 40; v8[0] = std::map<std::string,std::string>::begin(a2 + 40); v7 = std::map<std::string,std::string>::end(a2 + 40); while ( (std::operator!=(v8, &v7) & 1) != 0 ) { v6 = std::_Rb_tree_iterator<std::pair<std::string const,std::string>>::operator*(v8); v5 = std::operator<<<char>(v10, v6); v4 = std::operator<<<std::char_traits<char>>(v5, " ::= "); v3 = std::operator<<<char>(v4, v6 + 32); std::ostream::operator<<(v3, &std::endl<char,std::char_traits<char>>); std::_Rb_tree_iterator<std::pair<std::string const,std::string>>::operator++(v8); } std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(a1, v9); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v9); return a1; }
20,655
SchemaConverter::format_grammar[abi:cxx11]()
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string format_grammar() { std::stringstream ss; for (const auto & kv : _rules) { ss << kv.first << " ::= " << kv.second << std::endl; } return ss.str(); }
O2
cpp
SchemaConverter::format_grammar[abi:cxx11](): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x190, %rsp # imm = 0x190 movq %rsi, %r14 movq %rdi, %rbx leaq 0x8(%rsp), %rdi callq 0x24640 movq 0x40(%r14), %r12 addq $0x30, %r14 leaq 0x18(%rsp), %r15 leaq 0x2d63f(%rip), %r13 # 0xba687 cmpq %r14, %r12 je 0x8d087 leaq 0x20(%r12), %rsi movq %r15, %rdi callq 0x247b0 movq %rax, %rdi movq %r13, %rsi callq 0x24880 leaq 0x40(%r12), %rsi movq %rax, %rdi callq 0x247b0 movq %rax, %rdi callq 0x24450 movq %r12, %rdi callq 0x24630 movq %rax, %r12 jmp 0x8d048 leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x24d90 leaq 0x8(%rsp), %rdi callq 0x24690 movq %rbx, %rax addq $0x190, %rsp # imm = 0x190 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq jmp 0x8d0b4 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x24690 movq %rbx, %rdi callq 0x24f60 nop
_ZN15SchemaConverter14format_grammarB5cxx11Ev: push r15 push r14 push r13 push r12 push rbx sub rsp, 190h mov r14, rsi mov rbx, rdi lea rdi, [rsp+1B8h+var_1B0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) mov r12, [r14+40h] add r14, 30h ; '0' lea r15, [rsp+1B8h+var_1A0] lea r13, asc_BA687; " ::= " loc_8D048: cmp r12, r14 jz short loc_8D087 lea rsi, [r12+20h] mov rdi, r15 call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov rdi, rax mov rsi, r13 call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) lea rsi, [r12+40h] mov rdi, rax call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov rdi, rax call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &) mov rdi, r12 call __ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base *) mov r12, rax jmp short loc_8D048 loc_8D087: lea rsi, [rsp+1B8h+var_198] mov rdi, rbx call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) lea rdi, [rsp+1B8h+var_1B0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() mov rax, rbx add rsp, 190h pop rbx pop r12 pop r13 pop r14 pop r15 retn jmp short $+2 loc_8D0B4: mov rbx, rax lea rdi, [rsp+arg_0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() mov rdi, rbx call __Unwind_Resume
long long SchemaConverter::format_grammar[abi:cxx11](long long a1, long long a2) { long long i; // r12 long long v3; // rax long long v4; // rax long long v5; // rax _BYTE v7[16]; // [rsp+8h] [rbp-1B0h] BYREF _BYTE v8[8]; // [rsp+18h] [rbp-1A0h] BYREF _BYTE v9[408]; // [rsp+20h] [rbp-198h] BYREF std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v7); for ( i = *(_QWORD *)(a2 + 64); i != a2 + 48; i = std::_Rb_tree_increment(i) ) { v3 = std::operator<<<char>(v8, i + 32); v4 = std::operator<<<std::char_traits<char>>(v3, " ::= "); v5 = std::operator<<<char>(v4, i + 64); std::endl<char,std::char_traits<char>>(v5); } std::stringbuf::str(a1, v9); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v7); return a1; }
format_grammar[abi:cxx11]: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x190 MOV R14,RSI MOV RBX,RDI LEA RDI,[RSP + 0x8] CALL 0x00124640 MOV R12,qword ptr [R14 + 0x40] ADD R14,0x30 LEA R15,[RSP + 0x18] LEA R13,[0x1ba687] LAB_0018d048: CMP R12,R14 JZ 0x0018d087 LEA RSI,[R12 + 0x20] LAB_0018d052: MOV RDI,R15 CALL 0x001247b0 MOV RDI,RAX MOV RSI,R13 CALL 0x00124880 LEA RSI,[R12 + 0x40] MOV RDI,RAX CALL 0x001247b0 MOV RDI,RAX CALL 0x00124450 MOV RDI,R12 CALL 0x00124630 MOV R12,RAX JMP 0x0018d048 LAB_0018d087: LEA RSI,[RSP + 0x20] LAB_0018d08c: MOV RDI,RBX CALL 0x00124d90 LAB_0018d094: LEA RDI,[RSP + 0x8] CALL 0x00124690 MOV RAX,RBX ADD RSP,0x190 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* SchemaConverter::format_grammar[abi:cxx11]() */ void SchemaConverter::format_grammar_abi_cxx11_(void) { ostream *poVar1; _Rb_tree_node_base *p_Var2; long in_RSI; stringstream local_1b0 [16]; ostream local_1a0 [376]; std::__cxx11::stringstream::stringstream(local_1b0); for (p_Var2 = *(_Rb_tree_node_base **)(in_RSI + 0x40); p_Var2 != (_Rb_tree_node_base *)(in_RSI + 0x30); p_Var2 = (_Rb_tree_node_base *)std::_Rb_tree_increment(p_Var2)) { /* try { // try from 0018d052 to 0018d079 has its CatchHandler @ 0018d0b4 */ poVar1 = std::operator<<(local_1a0,(string *)(p_Var2 + 0x20)); poVar1 = std::operator<<(poVar1," ::= "); poVar1 = std::operator<<(poVar1,(string *)(p_Var2 + 0x40)); std::endl<char,std::char_traits<char>>(poVar1); } /* try { // try from 0018d08c to 0018d093 has its CatchHandler @ 0018d0b2 */ std::__cxx11::stringbuf::str(); std::__cxx11::stringstream::~stringstream(local_1b0); return; }
20,656
testing::GetReservedOutputAttributesForElement(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
seiftnesse[P]memoryallocator/build_O0/_deps/googletest-src/googletest/src/gtest.cc
static std::vector<std::string> GetReservedOutputAttributesForElement( const std::string& xml_element) { if (xml_element == "testsuites") { return ArrayAsVector(kReservedTestSuitesAttributes); } else if (xml_element == "testsuite") { return ArrayAsVector(kReservedTestSuiteAttributes); } else if (xml_element == "testcase") { return ArrayAsVector(kReservedOutputTestCaseAttributes); } else { GTEST_CHECK_(false) << "Unrecognized xml_element provided: " << xml_element; } // This code is unreachable but some compilers may not realizes that. return std::vector<std::string>(); }
O0
cpp
testing::GetReservedOutputAttributesForElement(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x38(%rbp) movq %rdi, %rax movq %rax, -0x30(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rdi leaq 0x3b8e2(%rip), %rsi # 0x74f48 callq 0x4a630 testb $0x1, %al jne 0x39671 jmp 0x39686 movq -0x38(%rbp), %rdi leaq 0x69c34(%rip), %rsi # 0xa32b0 callq 0x5d4f0 jmp 0x39790 movq -0x10(%rbp), %rdi leaq 0x3b79e(%rip), %rsi # 0x74e2f callq 0x4a630 testb $0x1, %al jne 0x3969c jmp 0x396b1 movq -0x38(%rbp), %rdi leaq 0x69c49(%rip), %rsi # 0xa32f0 callq 0x5d4f0 jmp 0x39790 movq -0x10(%rbp), %rdi leaq 0x3b7b8(%rip), %rsi # 0x74e74 callq 0x4a630 testb $0x1, %al jne 0x396c7 jmp 0x396dc movq -0x38(%rbp), %rdi leaq 0x69c9e(%rip), %rsi # 0xa3370 callq 0x5df10 jmp 0x39790 xorl %edi, %edi callq 0x21ef0 testb $0x1, %al jne 0x396e9 jmp 0x396ee jmp 0x39771 leaq 0x3a932(%rip), %rdx # 0x74027 leaq -0x14(%rbp), %rdi movq %rdi, -0x48(%rbp) movl $0x3, %esi movl $0x909, %ecx # imm = 0x909 callq 0x27170 movq -0x48(%rbp), %rdi callq 0x18810 movq %rax, %rdi leaq 0x3c34c(%rip), %rsi # 0x75a6b callq 0xb640 movq %rax, -0x40(%rbp) jmp 0x3972a movq -0x40(%rbp), %rdi leaq 0x3c34f(%rip), %rsi # 0x75a84 callq 0xb640 movq %rax, -0x50(%rbp) jmp 0x39740 movq -0x50(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0xb5a0 jmp 0x3974f leaq -0x14(%rbp), %rdi callq 0x272b0 jmp 0x39771 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x20(%rbp) movl %eax, -0x24(%rbp) leaq -0x14(%rbp), %rdi callq 0x272b0 jmp 0x3979a jmp 0x39773 jmp 0x39775 jmp 0x39777 movq -0x38(%rbp), %rdi xorl %esi, %esi movl $0x18, %edx callq 0xb370 movq -0x38(%rbp), %rdi callq 0x4b550 movq -0x30(%rbp), %rax addq $0x50, %rsp popq %rbp retq movq -0x20(%rbp), %rdi callq 0xbcd0 nopw %cs:(%rax,%rax)
_ZN7testingL37GetReservedOutputAttributesForElementERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_38], rdi mov rax, rdi mov [rbp+var_30], rax mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_10] lea rsi, aTestsuites; "testsuites" call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, 1 jnz short loc_39671 jmp short loc_39686 loc_39671: mov rdi, [rbp+var_38] lea rsi, _ZN7testingL29kReservedTestSuitesAttributesE; testing::kReservedTestSuitesAttributes call _ZN7testing13ArrayAsVectorILm8EEESt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EERAT__KPKc; testing::ArrayAsVector<8ul>(char const* const(&)[8ul]) jmp loc_39790 loc_39686: mov rdi, [rbp+var_10] lea rsi, aTestsuite+3; "testsuite" call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, 1 jnz short loc_3969C jmp short loc_396B1 loc_3969C: mov rdi, [rbp+var_38] lea rsi, _ZN7testingL28kReservedTestSuiteAttributesE; testing::kReservedTestSuiteAttributes call _ZN7testing13ArrayAsVectorILm8EEESt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EERAT__KPKc; testing::ArrayAsVector<8ul>(char const* const(&)[8ul]) jmp loc_39790 loc_396B1: mov rdi, [rbp+var_10] lea rsi, aTestcase+5; bool call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, 1 jnz short loc_396C7 jmp short loc_396DC loc_396C7: mov rdi, [rbp+var_38] lea rsi, _ZN7testingL33kReservedOutputTestCaseAttributesE; testing::kReservedOutputTestCaseAttributes call _ZN7testing13ArrayAsVectorILm10EEESt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EERAT__KPKc; testing::ArrayAsVector<10ul>(char const* const(&)[10ul]) jmp loc_39790 loc_396DC: xor edi, edi; this call _ZN7testing8internal6IsTrueEb; testing::internal::IsTrue(bool) test al, 1 jnz short loc_396E9 jmp short loc_396EE loc_396E9: jmp loc_39771 loc_396EE: lea rdx, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rbp+var_14] mov [rbp+var_48], rdi mov esi, 3 mov ecx, 909h call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int) mov rdi, [rbp+var_48]; this call _ZN7testing8internal8GTestLog9GetStreamEv; testing::internal::GTestLog::GetStream(void) mov rdi, rax lea rsi, aConditionFalse; "Condition false failed. " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_40], rax jmp short $+2 loc_3972A: mov rdi, [rbp+var_40] lea rsi, aUnrecognizedXm; "Unrecognized xml_element provided: " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_50], rax jmp short $+2 loc_39740: mov rdi, [rbp+var_50] mov rsi, [rbp+var_10] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) jmp short $+2 loc_3974F: lea rdi, [rbp+var_14]; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() jmp short loc_39771 mov rcx, rax mov eax, edx mov [rbp+var_20], rcx mov [rbp+var_24], eax lea rdi, [rbp+var_14]; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() jmp short loc_3979A loc_39771: jmp short $+2 loc_39773: jmp short $+2 loc_39775: jmp short $+2 loc_39777: mov rdi, [rbp+var_38] xor esi, esi mov edx, 18h call _memset mov rdi, [rbp+var_38] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev; std::vector<std::string>::vector(void) loc_39790: mov rax, [rbp+var_30] add rsp, 50h pop rbp retn loc_3979A: mov rdi, [rbp+var_20] call __Unwind_Resume
long long testing::GetReservedOutputAttributesForElement(long long a1, long long a2) { void *Stream; // rax long long v4; // [rsp+0h] [rbp-50h] long long v5; // [rsp+10h] [rbp-40h] _BYTE v6[4]; // [rsp+3Ch] [rbp-14h] BYREF long long v7; // [rsp+40h] [rbp-10h] long long v8; // [rsp+48h] [rbp-8h] v8 = a1; v7 = a2; if ( (std::operator==<char>(a2, "testsuites") & 1) != 0 ) { testing::ArrayAsVector<8ul>(a1, testing::kReservedTestSuitesAttributes); } else if ( (std::operator==<char>(v7, "testsuite") & 1) != 0 ) { testing::ArrayAsVector<8ul>(a1, testing::kReservedTestSuiteAttributes); } else if ( (std::operator==<char>(v7, "testcase") & 1) != 0 ) { testing::ArrayAsVector<10ul>(a1, &testing::kReservedOutputTestCaseAttributes); } else { if ( (testing::internal::IsTrue(0LL) & 1) == 0 ) { testing::internal::GTestLog::GTestLog( (testing::internal::GTestLog *)v6, 3, "/workspace/llm4binary/github/2025_star3/seiftnesse[P]memoryallocator/build_O0/_deps/googletest-src/googletest/src/gtest.cc", 2313); Stream = testing::internal::GTestLog::GetStream((testing::internal::GTestLog *)v6); v5 = std::operator<<<std::char_traits<char>>(Stream, "Condition false failed. "); v4 = std::operator<<<std::char_traits<char>>(v5, "Unrecognized xml_element provided: "); std::operator<<<char>(v4, v7); testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)v6); } memset(a1, 0LL, 24LL); std::vector<std::string>::vector(a1); } return a1; }
GetReservedOutputAttributesForElement: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x38],RDI MOV RAX,RDI MOV qword ptr [RBP + -0x30],RAX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x174f48] CALL 0x0014a630 TEST AL,0x1 JNZ 0x00139671 JMP 0x00139686 LAB_00139671: MOV RDI,qword ptr [RBP + -0x38] LEA RSI,[0x1a32b0] CALL 0x0015d4f0 JMP 0x00139790 LAB_00139686: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x174e2f] CALL 0x0014a630 TEST AL,0x1 JNZ 0x0013969c JMP 0x001396b1 LAB_0013969c: MOV RDI,qword ptr [RBP + -0x38] LEA RSI,[0x1a32f0] CALL 0x0015d4f0 JMP 0x00139790 LAB_001396b1: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x174e74] CALL 0x0014a630 TEST AL,0x1 JNZ 0x001396c7 JMP 0x001396dc LAB_001396c7: MOV RDI,qword ptr [RBP + -0x38] LEA RSI,[0x1a3370] CALL 0x0015df10 JMP 0x00139790 LAB_001396dc: XOR EDI,EDI CALL 0x00121ef0 TEST AL,0x1 JNZ 0x001396e9 JMP 0x001396ee LAB_001396e9: JMP 0x00139771 LAB_001396ee: LEA RDX,[0x174027] LEA RDI,[RBP + -0x14] MOV qword ptr [RBP + -0x48],RDI MOV ESI,0x3 MOV ECX,0x909 CALL 0x00127170 MOV RDI,qword ptr [RBP + -0x48] CALL 0x00118810 MOV RDI,RAX LAB_00139718: LEA RSI,[0x175a6b] CALL 0x0010b640 MOV qword ptr [RBP + -0x40],RAX JMP 0x0013972a LAB_0013972a: MOV RDI,qword ptr [RBP + -0x40] LEA RSI,[0x175a84] CALL 0x0010b640 MOV qword ptr [RBP + -0x50],RAX JMP 0x00139740 LAB_00139740: MOV RDI,qword ptr [RBP + -0x50] MOV RSI,qword ptr [RBP + -0x10] CALL 0x0010b5a0 LAB_0013974d: JMP 0x0013974f LAB_0013974f: LEA RDI,[RBP + -0x14] CALL 0x001272b0 JMP 0x00139771 LAB_00139771: JMP 0x00139773 LAB_00139773: JMP 0x00139775 LAB_00139775: JMP 0x00139777 LAB_00139777: MOV RDI,qword ptr [RBP + -0x38] XOR ESI,ESI MOV EDX,0x18 CALL 0x0010b370 MOV RDI,qword ptr [RBP + -0x38] CALL 0x0014b550 LAB_00139790: MOV RAX,qword ptr [RBP + -0x30] ADD RSP,0x50 POP RBP RET
/* testing::GetReservedOutputAttributesForElement(std::__cxx11::string const&) */ testing * __thiscall testing::GetReservedOutputAttributesForElement(testing *this,string *param_1) { bool bVar1; ulong uVar2; ostream *poVar3; GTestLog local_1c [4]; string *local_18; testing *local_10; local_18 = param_1; local_10 = this; bVar1 = std::operator==(param_1,"testsuites"); if (bVar1) { ArrayAsVector<8ul>(this,(char **)kReservedTestSuitesAttributes); } else { bVar1 = std::operator==(local_18,"testsuite"); if (bVar1) { ArrayAsVector<8ul>(this,(char **)kReservedTestSuiteAttributes); } else { bVar1 = std::operator==(local_18,"testcase"); if (bVar1) { ArrayAsVector<10ul>(this,(char **)kReservedOutputTestCaseAttributes); } else { uVar2 = internal::IsTrue(false); if ((uVar2 & 1) == 0) { internal::GTestLog::GTestLog (local_1c,3, "/workspace/llm4binary/github/2025_star3/seiftnesse[P]memoryallocator/build_O0/_deps/googletest-src/googletest/src/gtest.cc" ,0x909); poVar3 = (ostream *)internal::GTestLog::GetStream(); /* try { // try from 00139718 to 0013974c has its CatchHandler @ 0013975a */ poVar3 = std::operator<<(poVar3,"Condition false failed. "); poVar3 = std::operator<<(poVar3,"Unrecognized xml_element provided: "); std::operator<<(poVar3,local_18); internal::GTestLog::~GTestLog(local_1c); } memset(this,0,0x18); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)this); } } } return this; }
20,657
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& 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>::at<char const (&) [11], 0>(char const (&) [11]) const
monkey531[P]llama/common/./json.hpp
const_reference at(KeyType && key) const { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return it->second; }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [11], 0>(char const (&) [11]) const: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0xb405b movq %rsi, %r15 movq 0x8(%r14), %rdi callq 0x89e30 movq 0x8(%r14), %rcx cmpq 0x8(%rcx), %rax je 0xb40b9 addq $0x20, %rax addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq pushq $0x20 popq %rdi callq 0x24470 movq %rax, %rbx movq %r14, %rdi callq 0x4efc4 leaq 0x28(%rsp), %rdx movq %rax, (%rdx) leaq 0xcf97(%rip), %rsi # 0xc1014 leaq 0x8(%rsp), %rdi callq 0x89735 movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0x130, %esi # imm = 0x130 movq %r14, %rcx callq 0x6edd2 xorl %ebp, %ebp leaq 0x55ea0(%rip), %rsi # 0x109f48 leaq -0x6855b(%rip), %rdx # 0x4bb54 movq %rbx, %rdi callq 0x24f80 jmp 0xb4123 pushq $0x20 popq %rdi callq 0x24470 movq %rax, %rbx leaq 0x28(%rsp), %rdi leaq 0x7(%rsp), %rdx movq %r15, %rsi callq 0x30aea leaq 0xcf67(%rip), %rsi # 0xc1044 leaq 0xcf66(%rip), %rcx # 0xc104a leaq 0x8(%rsp), %rdi leaq 0x28(%rsp), %rdx callq 0x89d3f movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0x193, %esi # imm = 0x193 movq %r14, %rcx callq 0x8a1aa xorl %ebp, %ebp leaq 0x55db4(%rip), %rsi # 0x109ec8 leaq -0x685c7(%rip), %rdx # 0x4bb54 movq %rbx, %rdi callq 0x24f80 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x25298 jmp 0xb4138 movq %rax, %r14 movb $0x1, %bpl leaq 0x28(%rsp), %rdi jmp 0xb4149 jmp 0xb4155 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x25298 testb %bpl, %bpl jne 0xb4158 jmp 0xb4160 movq %rax, %r14 movq %rbx, %rdi callq 0x246a0 movq %r14, %rdi callq 0x25010
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: push rbp; char push r15; int push r14; int push rbx; int sub rsp, 48h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_B405B mov r15, rsi mov rdi, [r14+8] call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA11_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ mov rcx, [r14+8] cmp rax, [rcx+8] jz short loc_B40B9 add rax, 20h ; ' ' add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn loc_B405B: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+68h+var_40] mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+68h+var_60] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) mov bpl, 1 lea rdx, [rsp+68h+var_60] mov rdi, rbx; this mov esi, 130h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_B4123 loc_B40B9: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_61] mov rsi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+68h+var_60] lea rdx, [rsp+68h+var_40] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) mov bpl, 1 lea rdx, [rsp+68h+var_60] mov rdi, rbx; this mov esi, 193h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_B4123: mov r14, rax lea rdi, [rsp+68h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_B4138 mov r14, rax mov bpl, 1 loc_B4138: lea rdi, [rsp+68h+var_40] jmp short loc_B4149 jmp short loc_B4155 mov r14, rax lea rdi, [rsp+68h+var_60]; void * loc_B4149: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_B4158 jmp short loc_B4160 loc_B4155: mov r14, rax loc_B4158: mov rdi, rbx; void * call ___cxa_free_exception loc_B4160: mov rdi, r14 call __Unwind_Resume
long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_( long long a1, long long a2) { long long v2; // rax nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx nlohmann::json_abi_v3_11_3::detail::out_of_range *v5; // rbx _BYTE v6[32]; // [rsp+8h] [rbp-60h] BYREF _QWORD v7[8]; // [rsp+28h] [rbp-40h] BYREF if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); v7[0] = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>( (long long)v6, (long long)"cannot use at() with ", v7); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 304, (long long)v6); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v2 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA11_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(*(long long **)(a1 + 8)); if ( v2 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) ) { v5 = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL); std::string::basic_string<std::allocator<char>>(v7, a2); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( (long long)v6, (long long)"key '", (long long)v7, (long long)"' not found"); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( v5, 403, (long long)v6); __cxa_throw( v5, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return v2 + 32; }
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x001b405b MOV R15,RSI MOV RDI,qword ptr [R14 + 0x8] CALL 0x00189e30 MOV RCX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [RCX + 0x8] JZ 0x001b40b9 ADD RAX,0x20 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET LAB_001b405b: PUSH 0x20 POP RDI CALL 0x00124470 MOV RBX,RAX MOV RDI,R14 CALL 0x0014efc4 LEA RDX,[RSP + 0x28] MOV qword ptr [RDX],RAX LAB_001b4076: LEA RSI,[0x1c1014] LEA RDI,[RSP + 0x8] CALL 0x00189735 MOV BPL,0x1 LAB_001b408a: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0x130 MOV RCX,R14 CALL 0x0016edd2 XOR EBP,EBP LEA RSI,[0x209f48] LEA RDX,[0x14bb54] MOV RDI,RBX CALL 0x00124f80 LAB_001b40b9: PUSH 0x20 POP RDI CALL 0x00124470 MOV RBX,RAX LAB_001b40c4: LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x7] MOV RSI,R15 CALL 0x00130aea LAB_001b40d6: LEA RSI,[0x1c1044] LEA RCX,[0x1c104a] LEA RDI,[RSP + 0x8] LEA RDX,[RSP + 0x28] CALL 0x00189d3f MOV BPL,0x1 LAB_001b40f6: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0x193 MOV RCX,R14 CALL 0x0018a1aa XOR EBP,EBP LEA RSI,[0x209ec8] LEA RDX,[0x14bb54] MOV RDI,RBX CALL 0x00124f80
long _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_ (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,char *param_2) { long lVar1; int8 uVar2; allocator local_61; detail local_60 [32]; char *local_40 [4]; if (*param_1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar2 = __cxa_allocate_exception(0x20); local_40[0] = (char *)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> ::type_name(param_1); /* try { // try from 001b4076 to 001b4086 has its CatchHandler @ 001b4155 */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*> (local_60,"cannot use at() with ",local_40); /* try { // try from 001b408a to 001b40b6 has its CatchHandler @ 001b4141 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar2,0x130,local_60,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } lVar1 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA11_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ (*(int8 *)(param_1 + 8)); if (lVar1 != *(long *)(*(long *)(param_1 + 8) + 8)) { return lVar1 + 0x20; } uVar2 = __cxa_allocate_exception(0x20); /* try { // try from 001b40c4 to 001b40d5 has its CatchHandler @ 001b413f */ std::__cxx11::string::string<std::allocator<char>>((string *)local_40,param_2,&local_61); /* try { // try from 001b40d6 to 001b40f2 has its CatchHandler @ 001b4132 */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]> (local_60,"key \'",(string *)local_40,"\' not found"); /* try { // try from 001b40f6 to 001b4122 has its CatchHandler @ 001b4123 */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar2,0x193,local_60,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); }
20,658
fill_uchar
eloqsql/strings/ctype.c
static int fill_uchar(uchar *a,uint size,const char *str, size_t len) { uint i= 0; const char *s, *b, *e=str+len; for (s=str ; s < e ; i++) { for ( ; (s < e) && strchr(" \t\r\n",s[0]); s++) ; b=s; for ( ; (s < e) && !strchr(" \t\r\n",s[0]); s++) ; if (s == b || i > size) break; a[i]= (uchar) strtoul(b,NULL,16); } return 0; }
O3
c
fill_uchar: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, -0x38(%rbp) testq %rcx, %rcx jle 0x554c8 movq %rcx, %rbx movq %rdx, %r12 addq %rdx, %rbx movl %esi, %eax movq %rax, -0x30(%rbp) xorl %r14d, %r14d leaq 0xa824(%rip), %r15 # 0x5fc79 movq %r12, %r13 movsbl (%r13), %esi movl $0x5, %edx movq %r15, %rdi callq 0x24310 testq %rax, %rax je 0x55477 incq %r13 cmpq %rbx, %r13 jb 0x55458 cmpq %rbx, %r13 jae 0x554c8 movq %r13, %r12 movsbl (%r12), %esi movl $0x5, %edx movq %r15, %rdi callq 0x24310 testq %rax, %rax jne 0x5549e incq %r12 cmpq %rbx, %r12 jb 0x5547f cmpq %r13, %r12 je 0x554c8 cmpq -0x30(%rbp), %r14 ja 0x554c8 movq %r13, %rdi xorl %esi, %esi movl $0x10, %edx callq 0x243e0 movq -0x38(%rbp), %rcx movb %al, (%rcx,%r14) incq %r14 cmpq %rbx, %r12 jb 0x55455 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
fill_uchar: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_38], rdi test rcx, rcx jle loc_554C8 mov rbx, rcx mov r12, rdx add rbx, rdx mov eax, esi mov [rbp+var_30], rax xor r14d, r14d lea r15, asc_5FC79; " \t\r\n" loc_55455: mov r13, r12 loc_55458: movsx esi, byte ptr [r13+0] mov edx, 5 mov rdi, r15 call _memchr test rax, rax jz short loc_55477 inc r13 cmp r13, rbx jb short loc_55458 loc_55477: cmp r13, rbx jnb short loc_554C8 mov r12, r13 loc_5547F: movsx esi, byte ptr [r12] mov edx, 5 mov rdi, r15 call _memchr test rax, rax jnz short loc_5549E inc r12 cmp r12, rbx jb short loc_5547F loc_5549E: cmp r12, r13 jz short loc_554C8 cmp r14, [rbp+var_30] ja short loc_554C8 mov rdi, r13 xor esi, esi mov edx, 10h call ___isoc23_strtoul mov rcx, [rbp+var_38] mov [rcx+r14], al inc r14 cmp r12, rbx jb short loc_55455 loc_554C8: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
void fill_uchar(long long a1, unsigned int a2, char *a3, long long a4) { char *v4; // r12 unsigned long long v5; // rbx unsigned long long v6; // r14 char *v7; // r13 if ( a4 > 0 ) { v4 = a3; v5 = (unsigned long long)&a3[a4]; v6 = 0LL; do { v7 = v4; do { if ( !memchr(" \t\r\n", (unsigned int)*v7, 5LL) ) break; ++v7; } while ( (unsigned long long)v7 < v5 ); if ( (unsigned long long)v7 >= v5 ) break; v4 = v7; do { if ( memchr(" \t\r\n", (unsigned int)*v4, 5LL) ) break; ++v4; } while ( (unsigned long long)v4 < v5 ); if ( v4 == v7 ) break; if ( v6 > a2 ) break; *(_BYTE *)(a1 + v6++) = __isoc23_strtoul(v7, 0LL, 16LL); } while ( (unsigned long long)v4 < v5 ); } }
fill_uchar: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x38],RDI TEST RCX,RCX JLE 0x001554c8 MOV RBX,RCX MOV R12,RDX ADD RBX,RDX MOV EAX,ESI MOV qword ptr [RBP + -0x30],RAX XOR R14D,R14D LEA R15,[0x15fc79] LAB_00155455: MOV R13,R12 LAB_00155458: MOVSX ESI,byte ptr [R13] MOV EDX,0x5 MOV RDI,R15 CALL 0x00124310 TEST RAX,RAX JZ 0x00155477 INC R13 CMP R13,RBX JC 0x00155458 LAB_00155477: CMP R13,RBX JNC 0x001554c8 MOV R12,R13 LAB_0015547f: MOVSX ESI,byte ptr [R12] MOV EDX,0x5 MOV RDI,R15 CALL 0x00124310 TEST RAX,RAX JNZ 0x0015549e INC R12 CMP R12,RBX JC 0x0015547f LAB_0015549e: CMP R12,R13 JZ 0x001554c8 CMP R14,qword ptr [RBP + -0x30] JA 0x001554c8 MOV RDI,R13 XOR ESI,ESI MOV EDX,0x10 CALL 0x001243e0 MOV RCX,qword ptr [RBP + -0x38] MOV byte ptr [RCX + R14*0x1],AL INC R14 CMP R12,RBX JC 0x00155455 LAB_001554c8: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void fill_uchar(long param_1,ulong param_2,char *param_3,long param_4) { int1 uVar1; void *pvVar2; char *pcVar3; char *pcVar4; ulong uVar5; if (param_4 < 1) { return; } pcVar3 = param_3 + param_4; uVar5 = 0; LAB_00155458: do { pvVar2 = memchr(&DAT_0015fc79,(int)*param_3,5); pcVar4 = param_3; if (pvVar2 != (void *)0x0) { param_3 = param_3 + 1; pcVar4 = param_3; if (param_3 < pcVar3) goto LAB_00155458; } param_3 = pcVar4; if (pcVar3 <= pcVar4) { return; } do { pvVar2 = memchr(&DAT_0015fc79,(int)*param_3,5); if (pvVar2 != (void *)0x0) break; param_3 = param_3 + 1; } while (param_3 < pcVar3); if (param_3 == pcVar4) { return; } if ((param_2 & 0xffffffff) < uVar5) { return; } uVar1 = __isoc23_strtoul(pcVar4,0,0x10); *(int1 *)(param_1 + uVar5) = uVar1; uVar5 = uVar5 + 1; if (pcVar3 <= param_3) { return; } } while( true ); }
20,659
mysql_set_server_option_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_set_server_option_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_set_server_option, (parms->mysql, parms->option), parms->mysql, int, r_int) }
O0
c
mysql_set_server_option_start_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rax movl 0x8(%rax), %esi callq 0x3c740 movl %eax, -0x14(%rbp) movl -0x14(%rbp), %ecx movq -0x20(%rbp), %rax movl %ecx, 0x8(%rax) movq -0x20(%rbp), %rax movl $0x0, (%rax) addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
mysql_set_server_option_start_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax] mov rax, [rbp+var_10] mov esi, [rax+8] call mysql_set_server_option mov [rbp+var_14], eax mov ecx, [rbp+var_14] mov rax, [rbp+var_20] mov [rax+8], ecx mov rax, [rbp+var_20] mov dword ptr [rax], 0 add rsp, 20h pop rbp retn
_DWORD * mysql_set_server_option_start_internal(long long a1) { _DWORD *result; // rax _DWORD *v2; // [rsp+0h] [rbp-20h] v2 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)a1 + 1152LL) + 40LL); v2[2] = mysql_set_server_option(*(_QWORD *)a1, *(_DWORD *)(a1 + 8)); result = v2; *v2 = 0; return result; }
mysql_set_server_option_start_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RAX + 0x8] CALL 0x0013c740 MOV dword ptr [RBP + -0x14],EAX MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x0 ADD RSP,0x20 POP RBP RET
void mysql_set_server_option_start_internal(long *param_1) { int4 *puVar1; int4 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_set_server_option(*param_1,(int)param_1[1]); puVar1[2] = uVar2; *puVar1 = 0; return; }
20,660
MainWindow::add_outstair(int, QPushButton*, int)
LeafBlue[P]myElevetor/mainwindow.cpp
void MainWindow::add_outstair(int newstair, QPushButton *btn1, int direct_) { bool ispress = btn1->property("pressedState").toBool(); if(ispress){ //不允许多次请求,也不允许取消请求 return; } //变颜色 btn1->setProperty("pressedState","true"); btn1->style()->unpolish(btn1); btn1->style()->polish(btn1); btn1->update(); int addresult = ele_B.add_out(newstair,direct_); if(addresult == 1){ //需找一台空电梯去接 if(ele_A.status == 1 && ele_B.status == 1){ if(abs(ele_A.nowstair - newstair) > abs(ele_B.nowstair - newstair)){ ele_B.out_to_inside(newstair,direct_); ele_B.endstair = newstair; ele_B.status = 3; move_ele(ele_B); }else{ ele_A.out_to_inside(newstair,direct_); ele_A.endstair = newstair; ele_A.status = 3; move_ele(ele_A); } } else if(ele_A.status == 1){ //只有A是静止的,启用A电梯 ele_A.out_to_inside(newstair,direct_); ele_A.endstair = newstair; ele_A.status = 3; move_ele(ele_A); }else if(ele_B.status == 1){ ele_B.out_to_inside(newstair,direct_); ele_B.endstair = newstair; ele_B.status = 3; move_ele(ele_B); } } //其他情况无需处理,等待计时器处理 }
O0
cpp
MainWindow::add_outstair(int, QPushButton*, int): pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x88(%rbp) movq -0x18(%rbp), %rsi leaq 0xde0e(%rip), %rdx # 0x1729d leaq -0x40(%rbp), %rdi movq %rdi, -0x80(%rbp) callq 0x53c0 movq -0x80(%rbp), %rdi callq 0x5210 movb %al, -0x75(%rbp) jmp 0x94aa leaq -0x40(%rbp), %rdi callq 0x5180 movb -0x75(%rbp), %al andb $0x1, %al movb %al, -0x1d(%rbp) testb $0x1, -0x1d(%rbp) je 0x94e0 jmp 0x971a movq %rax, %rcx movl %edx, %eax movq %rcx, -0x48(%rbp) movl %eax, -0x4c(%rbp) leaq -0x40(%rbp), %rdi callq 0x5180 jmp 0x9723 movq -0x18(%rbp), %rax movq %rax, -0x98(%rbp) leaq 0xe18c(%rip), %rsi # 0x1767e leaq -0x70(%rbp), %rdi movq %rdi, -0x90(%rbp) callq 0xcdf0 movq -0x98(%rbp), %rdi movq -0x90(%rbp), %rdx leaq 0xdd86(%rip), %rsi # 0x1729d callq 0x51a0 jmp 0x951e leaq -0x70(%rbp), %rdi callq 0x5180 movq -0x18(%rbp), %rdi callq 0x5460 movq %rax, %rdi movq -0x18(%rbp), %rsi movq (%rdi), %rax callq *0x68(%rax) movq -0x18(%rbp), %rdi callq 0x5460 movq %rax, %rdi movq -0x18(%rbp), %rsi movq (%rdi), %rax callq *0x60(%rax) movq -0x18(%rbp), %rdi callq 0x5130 movq -0x88(%rbp), %rdi addq $0xf8, %rdi movl -0xc(%rbp), %esi movl -0x1c(%rbp), %edx callq 0x124d0 movl %eax, -0x74(%rbp) cmpl $0x1, -0x74(%rbp) jne 0x971a movq -0x88(%rbp), %rax cmpl $0x1, 0xa4(%rax) jne 0x9674 movq -0x88(%rbp), %rax cmpl $0x1, 0x144(%rax) jne 0x9674 movq -0x88(%rbp), %rcx movl 0x98(%rcx), %eax subl -0xc(%rbp), %eax movl %eax, %edx negl %edx cmovnsl %edx, %eax movl 0x138(%rcx), %ecx subl -0xc(%rbp), %ecx movl %ecx, %edx negl %edx cmovnsl %edx, %ecx cmpl %ecx, %eax jle 0x9633 movq -0x88(%rbp), %rdi addq $0xf8, %rdi movl -0xc(%rbp), %esi movl -0x1c(%rbp), %edx callq 0x12280 movq -0x88(%rbp), %rdi movl -0xc(%rbp), %eax movl %eax, 0x13c(%rdi) movl $0x3, 0x144(%rdi) movq %rdi, %rsi addq $0xf8, %rsi callq 0x89d0 jmp 0x966f movq %rax, %rcx movl %edx, %eax movq %rcx, -0x48(%rbp) movl %eax, -0x4c(%rbp) leaq -0x70(%rbp), %rdi callq 0x5180 jmp 0x9723 movq -0x88(%rbp), %rdi addq $0x58, %rdi movl -0xc(%rbp), %esi movl -0x1c(%rbp), %edx callq 0x12280 movq -0x88(%rbp), %rdi movl -0xc(%rbp), %eax movl %eax, 0x9c(%rdi) movl $0x3, 0xa4(%rdi) movq %rdi, %rsi addq $0x58, %rsi callq 0x89d0 jmp 0x9718 movq -0x88(%rbp), %rax cmpl $0x1, 0xa4(%rax) jne 0x96c2 movq -0x88(%rbp), %rdi addq $0x58, %rdi movl -0xc(%rbp), %esi movl -0x1c(%rbp), %edx callq 0x12280 movq -0x88(%rbp), %rdi movl -0xc(%rbp), %eax movl %eax, 0x9c(%rdi) movl $0x3, 0xa4(%rdi) movq %rdi, %rsi addq $0x58, %rsi callq 0x89d0 jmp 0x9716 movq -0x88(%rbp), %rax cmpl $0x1, 0x144(%rax) jne 0x9714 movq -0x88(%rbp), %rdi addq $0xf8, %rdi movl -0xc(%rbp), %esi movl -0x1c(%rbp), %edx callq 0x12280 movq -0x88(%rbp), %rdi movl -0xc(%rbp), %eax movl %eax, 0x13c(%rdi) movl $0x3, 0x144(%rdi) movq %rdi, %rsi addq $0xf8, %rsi callq 0x89d0 jmp 0x9716 jmp 0x9718 jmp 0x971a addq $0xa0, %rsp popq %rbp retq movq -0x48(%rbp), %rdi callq 0x51e0 nopl (%rax)
_ZN10MainWindow12add_outstairEiP11QPushButtoni: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov rax, [rbp+var_8] mov [rbp+var_88], rax mov rsi, [rbp+var_18]; char * lea rdx, aPressedstate; "pressedState" lea rdi, [rbp+var_40]; this mov [rbp+var_80], rdi call __ZNK7QObject8propertyEPKc; QObject::property(char const*) mov rdi, [rbp+var_80]; this call __ZNK8QVariant6toBoolEv; QVariant::toBool(void) mov [rbp+var_75], al jmp short $+2 loc_94AA: lea rdi, [rbp+var_40]; this call __ZN8QVariantD1Ev; QVariant::~QVariant() mov al, [rbp+var_75] and al, 1 mov [rbp+var_1D], al test [rbp+var_1D], 1 jz short loc_94E0 jmp loc_971A mov rcx, rax mov eax, edx mov [rbp+var_48], rcx mov [rbp+var_4C], eax lea rdi, [rbp+var_40]; this call __ZN8QVariantD1Ev; QVariant::~QVariant() jmp loc_9723 loc_94E0: mov rax, [rbp+var_18] mov [rbp+var_98], rax lea rsi, aTrue; "true" lea rdi, [rbp+var_70]; this mov [rbp+var_90], rdi call _ZN8QVariantC2EPKc; QVariant::QVariant(char const*) mov rdi, [rbp+var_98]; this mov rdx, [rbp+var_90]; QVariant * lea rsi, aPressedstate; "pressedState" call __ZN7QObject11setPropertyEPKcRK8QVariant; QObject::setProperty(char const*,QVariant const&) jmp short $+2 loc_951E: lea rdi, [rbp+var_70]; this call __ZN8QVariantD1Ev; QVariant::~QVariant() mov rdi, [rbp+var_18]; this call __ZNK7QWidget5styleEv; QWidget::style(void) mov rdi, rax mov rsi, [rbp+var_18] mov rax, [rdi] call qword ptr [rax+68h] mov rdi, [rbp+var_18]; this call __ZNK7QWidget5styleEv; QWidget::style(void) mov rdi, rax mov rsi, [rbp+var_18] mov rax, [rdi] call qword ptr [rax+60h] mov rdi, [rbp+var_18]; this call __ZN7QWidget6updateEv; QWidget::update(void) mov rdi, [rbp+var_88] add rdi, 0F8h; this mov esi, [rbp+var_C]; int mov edx, [rbp+var_1C]; int call _ZN8Elevetor7add_outEii; Elevetor::add_out(int,int) mov [rbp+var_74], eax cmp [rbp+var_74], 1 jnz loc_971A mov rax, [rbp+var_88] cmp dword ptr [rax+0A4h], 1 jnz loc_9674 mov rax, [rbp+var_88] cmp dword ptr [rax+144h], 1 jnz loc_9674 mov rcx, [rbp+var_88] mov eax, [rcx+98h] sub eax, [rbp+var_C] mov edx, eax neg edx cmovns eax, edx mov ecx, [rcx+138h] sub ecx, [rbp+var_C] mov edx, ecx neg edx cmovns ecx, edx cmp eax, ecx jle short loc_9633 mov rdi, [rbp+var_88] add rdi, 0F8h; this mov esi, [rbp+var_C]; int mov edx, [rbp+var_1C]; int call _ZN8Elevetor13out_to_insideEii; Elevetor::out_to_inside(int,int) mov rdi, [rbp+var_88]; this mov eax, [rbp+var_C] mov [rdi+13Ch], eax mov dword ptr [rdi+144h], 3 mov rsi, rdi add rsi, 0F8h; Elevetor * call _ZN10MainWindow8move_eleER8Elevetor; MainWindow::move_ele(Elevetor &) jmp short loc_966F mov rcx, rax mov eax, edx mov [rbp+var_48], rcx mov [rbp+var_4C], eax lea rdi, [rbp+var_70]; this call __ZN8QVariantD1Ev; QVariant::~QVariant() jmp loc_9723 loc_9633: mov rdi, [rbp+var_88] add rdi, 58h ; 'X'; this mov esi, [rbp+var_C]; int mov edx, [rbp+var_1C]; int call _ZN8Elevetor13out_to_insideEii; Elevetor::out_to_inside(int,int) mov rdi, [rbp+var_88]; this mov eax, [rbp+var_C] mov [rdi+9Ch], eax mov dword ptr [rdi+0A4h], 3 mov rsi, rdi add rsi, 58h ; 'X'; Elevetor * call _ZN10MainWindow8move_eleER8Elevetor; MainWindow::move_ele(Elevetor &) loc_966F: jmp loc_9718 loc_9674: mov rax, [rbp+var_88] cmp dword ptr [rax+0A4h], 1 jnz short loc_96C2 mov rdi, [rbp+var_88] add rdi, 58h ; 'X'; this mov esi, [rbp+var_C]; int mov edx, [rbp+var_1C]; int call _ZN8Elevetor13out_to_insideEii; Elevetor::out_to_inside(int,int) mov rdi, [rbp+var_88]; this mov eax, [rbp+var_C] mov [rdi+9Ch], eax mov dword ptr [rdi+0A4h], 3 mov rsi, rdi add rsi, 58h ; 'X'; Elevetor * call _ZN10MainWindow8move_eleER8Elevetor; MainWindow::move_ele(Elevetor &) jmp short loc_9716 loc_96C2: mov rax, [rbp+var_88] cmp dword ptr [rax+144h], 1 jnz short loc_9714 mov rdi, [rbp+var_88] add rdi, 0F8h; this mov esi, [rbp+var_C]; int mov edx, [rbp+var_1C]; int call _ZN8Elevetor13out_to_insideEii; Elevetor::out_to_inside(int,int) mov rdi, [rbp+var_88]; this mov eax, [rbp+var_C] mov [rdi+13Ch], eax mov dword ptr [rdi+144h], 3 mov rsi, rdi add rsi, 0F8h; Elevetor * call _ZN10MainWindow8move_eleER8Elevetor; MainWindow::move_ele(Elevetor &) loc_9714: jmp short $+2 loc_9716: jmp short $+2 loc_9718: jmp short $+2 loc_971A: add rsp, 0A0h pop rbp retn loc_9723: mov rdi, [rbp+var_48] call __Unwind_Resume
char MainWindow::add_outstair(MainWindow *this, int a2, QPushButton *a3, int a4) { int v4; // eax long long v5; // rax long long v6; // rax int v7; // eax int v8; // ecx QWidget *v10; // [rsp+8h] [rbp-98h] char v11; // [rsp+2Bh] [rbp-75h] _BYTE v12[36]; // [rsp+30h] [rbp-70h] BYREF _BYTE v13[36]; // [rsp+60h] [rbp-40h] BYREF int v14; // [rsp+84h] [rbp-1Ch] QWidget *v15; // [rsp+88h] [rbp-18h] int v16; // [rsp+94h] [rbp-Ch] MainWindow *v17; // [rsp+98h] [rbp-8h] v17 = this; v16 = a2; v15 = a3; v14 = a4; QObject::property((QObject *)v13, (const char *)a3); v11 = QVariant::toBool((QVariant *)v13); QVariant::~QVariant((QVariant *)v13); LOBYTE(v4) = v11 & 1; v13[35] = v11 & 1; if ( (v11 & 1) == 0 ) { v10 = v15; QVariant::QVariant((QVariant *)v12, "true"); QObject::setProperty(v10, "pressedState", (const QVariant *)v12); QVariant::~QVariant((QVariant *)v12); v5 = QWidget::style(v15); (*(void ( **)(long long, QWidget *))(*(_QWORD *)v5 + 104LL))(v5, v15); v6 = QWidget::style(v15); (*(void ( **)(long long, QWidget *))(*(_QWORD *)v6 + 96LL))(v6, v15); QWidget::update(v15); v4 = Elevetor::add_out((MainWindow *)((char *)this + 248), v16, v14); if ( v4 == 1 ) { if ( *((_DWORD *)this + 41) == 1 && *((_DWORD *)this + 81) == 1 ) { v7 = *((_DWORD *)this + 38) - v16; if ( v16 - *((_DWORD *)this + 38) >= 0 ) v7 = v16 - *((_DWORD *)this + 38); v8 = *((_DWORD *)this + 78) - v16; if ( v8 <= 0 ) v8 = v16 - *((_DWORD *)this + 78); if ( v7 <= v8 ) goto LABEL_10; } else { if ( *((_DWORD *)this + 41) == 1 ) { LABEL_10: Elevetor::out_to_inside((MainWindow *)((char *)this + 88), v16, v14); *((_DWORD *)this + 39) = v16; *((_DWORD *)this + 41) = 3; LOBYTE(v4) = MainWindow::move_ele(this, (MainWindow *)((char *)this + 88)); return v4; } LOBYTE(v4) = (_BYTE)this; if ( *((_DWORD *)this + 81) != 1 ) return v4; } Elevetor::out_to_inside((MainWindow *)((char *)this + 248), v16, v14); *((_DWORD *)this + 79) = v16; *((_DWORD *)this + 81) = 3; LOBYTE(v4) = MainWindow::move_ele(this, (MainWindow *)((char *)this + 248)); } } return v4; }
add_outstair: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x88],RAX MOV RSI,qword ptr [RBP + -0x18] LEA RDX,[0x11729d] LEA RDI,[RBP + -0x40] MOV qword ptr [RBP + -0x80],RDI CALL 0x001053c0 MOV RDI,qword ptr [RBP + -0x80] LAB_001094a0: CALL 0x00105210 LAB_001094a5: MOV byte ptr [RBP + -0x75],AL JMP 0x001094aa LAB_001094aa: LEA RDI,[RBP + -0x40] CALL 0x00105180 MOV AL,byte ptr [RBP + -0x75] AND AL,0x1 MOV byte ptr [RBP + -0x1d],AL TEST byte ptr [RBP + -0x1d],0x1 JZ 0x001094e0 JMP 0x0010971a LAB_001094e0: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x98],RAX LEA RSI,[0x11767e] LEA RDI,[RBP + -0x70] MOV qword ptr [RBP + -0x90],RDI CALL 0x0010cdf0 MOV RDI,qword ptr [RBP + -0x98] MOV RDX,qword ptr [RBP + -0x90] LAB_00109510: LEA RSI,[0x11729d] CALL 0x001051a0 LAB_0010951c: JMP 0x0010951e LAB_0010951e: LEA RDI,[RBP + -0x70] CALL 0x00105180 MOV RDI,qword ptr [RBP + -0x18] CALL 0x00105460 MOV RDI,RAX MOV RSI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x68] MOV RDI,qword ptr [RBP + -0x18] CALL 0x00105460 MOV RDI,RAX MOV RSI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x60] MOV RDI,qword ptr [RBP + -0x18] CALL 0x00105130 MOV RDI,qword ptr [RBP + -0x88] ADD RDI,0xf8 MOV ESI,dword ptr [RBP + -0xc] MOV EDX,dword ptr [RBP + -0x1c] CALL 0x001124d0 MOV dword ptr [RBP + -0x74],EAX CMP dword ptr [RBP + -0x74],0x1 JNZ 0x0010971a MOV RAX,qword ptr [RBP + -0x88] CMP dword ptr [RAX + 0xa4],0x1 JNZ 0x00109674 MOV RAX,qword ptr [RBP + -0x88] CMP dword ptr [RAX + 0x144],0x1 JNZ 0x00109674 MOV RCX,qword ptr [RBP + -0x88] MOV EAX,dword ptr [RCX + 0x98] SUB EAX,dword ptr [RBP + -0xc] MOV EDX,EAX NEG EDX CMOVNS EAX,EDX MOV ECX,dword ptr [RCX + 0x138] SUB ECX,dword ptr [RBP + -0xc] MOV EDX,ECX NEG EDX CMOVNS ECX,EDX CMP EAX,ECX JLE 0x00109633 MOV RDI,qword ptr [RBP + -0x88] ADD RDI,0xf8 MOV ESI,dword ptr [RBP + -0xc] MOV EDX,dword ptr [RBP + -0x1c] CALL 0x00112280 MOV RDI,qword ptr [RBP + -0x88] MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RDI + 0x13c],EAX MOV dword ptr [RDI + 0x144],0x3 MOV RSI,RDI ADD RSI,0xf8 CALL 0x001089d0 JMP 0x0010966f LAB_00109633: MOV RDI,qword ptr [RBP + -0x88] ADD RDI,0x58 MOV ESI,dword ptr [RBP + -0xc] MOV EDX,dword ptr [RBP + -0x1c] CALL 0x00112280 MOV RDI,qword ptr [RBP + -0x88] MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RDI + 0x9c],EAX MOV dword ptr [RDI + 0xa4],0x3 MOV RSI,RDI ADD RSI,0x58 CALL 0x001089d0 LAB_0010966f: JMP 0x00109718 LAB_00109674: MOV RAX,qword ptr [RBP + -0x88] CMP dword ptr [RAX + 0xa4],0x1 JNZ 0x001096c2 MOV RDI,qword ptr [RBP + -0x88] ADD RDI,0x58 MOV ESI,dword ptr [RBP + -0xc] MOV EDX,dword ptr [RBP + -0x1c] CALL 0x00112280 MOV RDI,qword ptr [RBP + -0x88] MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RDI + 0x9c],EAX MOV dword ptr [RDI + 0xa4],0x3 MOV RSI,RDI ADD RSI,0x58 CALL 0x001089d0 JMP 0x00109716 LAB_001096c2: MOV RAX,qword ptr [RBP + -0x88] CMP dword ptr [RAX + 0x144],0x1 JNZ 0x00109714 MOV RDI,qword ptr [RBP + -0x88] ADD RDI,0xf8 MOV ESI,dword ptr [RBP + -0xc] MOV EDX,dword ptr [RBP + -0x1c] CALL 0x00112280 MOV RDI,qword ptr [RBP + -0x88] MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RDI + 0x13c],EAX MOV dword ptr [RDI + 0x144],0x3 MOV RSI,RDI ADD RSI,0xf8 CALL 0x001089d0 LAB_00109714: JMP 0x00109716 LAB_00109716: JMP 0x00109718 LAB_00109718: JMP 0x0010971a LAB_0010971a: ADD RSP,0xa0 POP RBP RET
/* MainWindow::add_outstair(int, QPushButton*, int) */ void __thiscall MainWindow::add_outstair(MainWindow *this,int param_1,QPushButton *param_2,int param_3) { QPushButton *pQVar1; byte bVar2; int iVar3; long *plVar4; int iVar5; QVariant local_78 [48]; QVariant local_48 [35]; byte local_25; int local_24; QPushButton *local_20; int local_14; MainWindow *local_10; local_24 = param_3; local_20 = param_2; local_14 = param_1; local_10 = this; QObject::property((char *)local_48); /* try { // try from 001094a0 to 001094a4 has its CatchHandler @ 001094c6 */ bVar2 = QVariant::toBool(); QVariant::~QVariant(local_48); pQVar1 = local_20; local_25 = bVar2 & 1; if (local_25 == 0) { QVariant::QVariant(local_78,"true"); /* try { // try from 00109510 to 0010951b has its CatchHandler @ 00109619 */ QObject::setProperty((char *)pQVar1,(QVariant *)"pressedState"); QVariant::~QVariant(local_78); plVar4 = (long *)QWidget::style(); (**(code **)(*plVar4 + 0x68))(plVar4,local_20); plVar4 = (long *)QWidget::style(); (**(code **)(*plVar4 + 0x60))(plVar4,local_20); QWidget::update(); iVar3 = Elevetor::add_out((Elevetor *)(this + 0xf8),local_14,local_24); if (iVar3 == 1) { if ((*(int *)(this + 0xa4) == 1) && (*(int *)(this + 0x144) == 1)) { iVar3 = *(int *)(this + 0x98) - local_14; if (iVar3 < 1) { iVar3 = -iVar3; } iVar5 = *(int *)(this + 0x138) - local_14; if (iVar5 < 1) { iVar5 = -iVar5; } if (iVar5 < iVar3) { Elevetor::out_to_inside((Elevetor *)(this + 0xf8),local_14,local_24); *(int *)(this + 0x13c) = local_14; *(int4 *)(this + 0x144) = 3; move_ele(this,(Elevetor *)(this + 0xf8)); } else { Elevetor::out_to_inside((Elevetor *)(this + 0x58),local_14,local_24); *(int *)(this + 0x9c) = local_14; *(int4 *)(this + 0xa4) = 3; move_ele(this,(Elevetor *)(this + 0x58)); } } else if (*(int *)(this + 0xa4) == 1) { Elevetor::out_to_inside((Elevetor *)(this + 0x58),local_14,local_24); *(int *)(this + 0x9c) = local_14; *(int4 *)(this + 0xa4) = 3; move_ele(this,(Elevetor *)(this + 0x58)); } else if (*(int *)(this + 0x144) == 1) { Elevetor::out_to_inside((Elevetor *)(this + 0xf8),local_14,local_24); *(int *)(this + 0x13c) = local_14; *(int4 *)(this + 0x144) = 3; move_ele(this,(Elevetor *)(this + 0xf8)); } } } return; }
20,661
MainWindow::add_outstair(int, QPushButton*, int)
LeafBlue[P]myElevetor/mainwindow.cpp
void MainWindow::add_outstair(int newstair, QPushButton *btn1, int direct_) { bool ispress = btn1->property("pressedState").toBool(); if(ispress){ //不允许多次请求,也不允许取消请求 return; } //变颜色 btn1->setProperty("pressedState","true"); btn1->style()->unpolish(btn1); btn1->style()->polish(btn1); btn1->update(); int addresult = ele_B.add_out(newstair,direct_); if(addresult == 1){ //需找一台空电梯去接 if(ele_A.status == 1 && ele_B.status == 1){ if(abs(ele_A.nowstair - newstair) > abs(ele_B.nowstair - newstair)){ ele_B.out_to_inside(newstair,direct_); ele_B.endstair = newstair; ele_B.status = 3; move_ele(ele_B); }else{ ele_A.out_to_inside(newstair,direct_); ele_A.endstair = newstair; ele_A.status = 3; move_ele(ele_A); } } else if(ele_A.status == 1){ //只有A是静止的,启用A电梯 ele_A.out_to_inside(newstair,direct_); ele_A.endstair = newstair; ele_A.status = 3; move_ele(ele_A); }else if(ele_B.status == 1){ ele_B.out_to_inside(newstair,direct_); ele_B.endstair = newstair; ele_B.status = 3; move_ele(ele_B); } } //其他情况无需处理,等待计时器处理 }
O1
cpp
MainWindow::add_outstair(int, QPushButton*, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %ecx, %r14d movq %rdx, %r15 movl %esi, %ebp movq %rdi, %rbx leaq 0x42ab(%rip), %rdx # 0xb2b5 leaq 0x8(%rsp), %r12 movq %r12, %rdi movq %r15, %rsi callq 0x43a0 movq %r12, %rdi callq 0x4200 movl %eax, %r12d leaq 0x8(%rsp), %rdi callq 0x4170 testb %r12b, %r12b jne 0x715f leaq 0x4657(%rip), %rsi # 0xb696 leaq 0x8(%rsp), %r12 movq %r12, %rdi callq 0x7da2 leaq 0x4262(%rip), %rsi # 0xb2b5 movq %r15, %rdi movq %r12, %rdx callq 0x4190 leaq 0x8(%rsp), %rdi callq 0x4170 movq %r15, %rdi callq 0x4430 movq (%rax), %rcx movq %rax, %rdi movq %r15, %rsi callq *0x68(%rcx) movq %r15, %rdi callq 0x4430 movq (%rax), %rcx movq %rax, %rdi movq %r15, %rsi callq *0x60(%rcx) movq %r15, %rdi callq 0x4120 leaq 0xf8(%rbx), %r12 movq %r12, %rdi movl %ebp, %esi movl %r14d, %edx callq 0x8fea cmpl $0x1, %eax jne 0x715f movl 0xa4(%rbx), %eax cmpl $0x1, %eax jne 0x711f leaq 0x58(%rbx), %r15 leaq 0xa4(%rbx), %rsi cmpl $0x1, 0x144(%rbx) jne 0x7114 movl 0x98(%rbx), %eax movl 0x138(%rbx), %ecx subl %ebp, %eax movl %eax, %edx negl %edx cmovsl %eax, %edx subl %ebp, %ecx movl %ecx, %eax negl %eax cmovsl %ecx, %eax cmpl %eax, %edx cmovaq %r12, %r15 movl $0x13c, %eax # imm = 0x13C movl $0x9c, %r13d cmovaq %rax, %r13 leaq 0x144(%rbx), %rax cmovaq %rax, %rsi jmp 0x7138 movl $0x9c, %r13d cmpl $0x1, %eax je 0x7138 cmpl $0x1, 0x144(%rbx) jne 0x715f leaq 0x144(%rbx), %rsi movl $0x13c, %r13d # imm = 0x13C movq %r12, %r15 movq %r15, %rdi movq %rsi, %r12 movl %ebp, %esi movl %r14d, %edx callq 0x8eb4 movl %ebp, (%rbx,%r13) movl $0x3, (%r12) movq %rbx, %rdi movq %r15, %rsi callq 0x6a7e addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x7170 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x4170 movq %rbx, %rdi callq 0x41d0 nop
_ZN10MainWindow12add_outstairEiP11QPushButtoni: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r14d, ecx mov r15, rdx mov ebp, esi mov rbx, rdi lea rdx, aPressedstate; "pressedState" lea r12, [rsp+58h+var_50] mov rdi, r12; this mov rsi, r15; char * call __ZNK7QObject8propertyEPKc; QObject::property(char const*) mov rdi, r12; this call __ZNK8QVariant6toBoolEv; QVariant::toBool(void) mov r12d, eax lea rdi, [rsp+58h+var_50]; this call __ZN8QVariantD1Ev; QVariant::~QVariant() test r12b, r12b jnz loc_715F lea rsi, aTrue; "true" lea r12, [rsp+58h+var_50] mov rdi, r12; this call _ZN8QVariantC2EPKc; QVariant::QVariant(char const*) lea rsi, aPressedstate; "pressedState" mov rdi, r15; this mov rdx, r12; QVariant * call __ZN7QObject11setPropertyEPKcRK8QVariant; QObject::setProperty(char const*,QVariant const&) lea rdi, [rsp+58h+var_50]; this call __ZN8QVariantD1Ev; QVariant::~QVariant() mov rdi, r15; this call __ZNK7QWidget5styleEv; QWidget::style(void) mov rcx, [rax] mov rdi, rax mov rsi, r15 call qword ptr [rcx+68h] mov rdi, r15; this call __ZNK7QWidget5styleEv; QWidget::style(void) mov rcx, [rax] mov rdi, rax mov rsi, r15 call qword ptr [rcx+60h] mov rdi, r15; this call __ZN7QWidget6updateEv; QWidget::update(void) lea r12, [rbx+0F8h] mov rdi, r12; this mov esi, ebp; int mov edx, r14d; int call _ZN8Elevetor7add_outEii; Elevetor::add_out(int,int) cmp eax, 1 jnz loc_715F mov eax, [rbx+0A4h] cmp eax, 1 jnz short loc_711F lea r15, [rbx+58h] lea rsi, [rbx+0A4h] cmp dword ptr [rbx+144h], 1 jnz short loc_7114 mov eax, [rbx+98h] mov ecx, [rbx+138h] sub eax, ebp mov edx, eax neg edx cmovs edx, eax sub ecx, ebp mov eax, ecx neg eax cmovs eax, ecx cmp edx, eax cmova r15, r12 mov eax, 13Ch mov r13d, 9Ch cmova r13, rax lea rax, [rbx+144h] cmova rsi, rax jmp short loc_7138 loc_7114: mov r13d, 9Ch cmp eax, 1 jz short loc_7138 loc_711F: cmp dword ptr [rbx+144h], 1 jnz short loc_715F lea rsi, [rbx+144h] mov r13d, 13Ch mov r15, r12 loc_7138: mov rdi, r15; this mov r12, rsi mov esi, ebp; int mov edx, r14d; int call _ZN8Elevetor13out_to_insideEii; Elevetor::out_to_inside(int,int) mov [rbx+r13], ebp mov dword ptr [r12], 3 mov rdi, rbx; this mov rsi, r15; Elevetor * call _ZN10MainWindow8move_eleER8Elevetor; MainWindow::move_ele(Elevetor &) loc_715F: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_7170: mov rbx, rax lea rdi, [rsp+arg_0]; this call __ZN8QVariantD1Ev; QVariant::~QVariant() mov rdi, rbx call __Unwind_Resume
void MainWindow::add_outstair(MainWindow *this, int a2, QPushButton *a3, int a4) { char v7; // r12 long long v8; // rax long long v9; // rax Elevetor *v10; // r15 char *v11; // rsi int v12; // edx unsigned int v13; // eax long long v14; // r13 _BYTE v15[80]; // [rsp+8h] [rbp-50h] BYREF QObject::property((QObject *)v15, (const char *)a3); v7 = QVariant::toBool((QVariant *)v15); QVariant::~QVariant((QVariant *)v15); if ( !v7 ) { QVariant::QVariant((QVariant *)v15, "true"); QObject::setProperty(a3, "pressedState", (const QVariant *)v15); QVariant::~QVariant((QVariant *)v15); v8 = QWidget::style(a3); (*(void ( **)(long long, QPushButton *))(*(_QWORD *)v8 + 104LL))(v8, a3); v9 = QWidget::style(a3); (*(void ( **)(long long, QPushButton *))(*(_QWORD *)v9 + 96LL))(v9, a3); QWidget::update(a3); if ( (unsigned int)Elevetor::add_out((MainWindow *)((char *)this + 248), a2, a4) == 1 ) { if ( *((_DWORD *)this + 41) == 1 ) { v10 = (MainWindow *)((char *)this + 88); v11 = (char *)this + 164; if ( *((_DWORD *)this + 81) == 1 ) { v12 = a2 - *((_DWORD *)this + 38); if ( v12 < 0 ) v12 = *((_DWORD *)this + 38) - a2; v13 = a2 - *((_DWORD *)this + 78); if ( *((_DWORD *)this + 78) - a2 > 0 ) v13 = *((_DWORD *)this + 78) - a2; if ( v12 > v13 ) v10 = (MainWindow *)((char *)this + 248); v14 = 156LL; if ( v12 > v13 ) { v14 = 316LL; v11 = (char *)this + 324; } } else { v14 = 156LL; } } else { if ( *((_DWORD *)this + 81) != 1 ) return; v11 = (char *)this + 324; v14 = 316LL; v10 = (MainWindow *)((char *)this + 248); } Elevetor::out_to_inside(v10, a2, a4); *(_DWORD *)((char *)this + v14) = a2; *(_DWORD *)v11 = 3; MainWindow::move_ele(this, v10); } } }
add_outstair: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14D,ECX MOV R15,RDX MOV EBP,ESI MOV RBX,RDI LEA RDX,[0x10b2b5] LEA R12,[RSP + 0x8] MOV RDI,R12 MOV RSI,R15 CALL 0x001043a0 LAB_0010701a: MOV RDI,R12 CALL 0x00104200 LAB_00107022: MOV R12D,EAX LEA RDI,[RSP + 0x8] CALL 0x00104170 TEST R12B,R12B JNZ 0x0010715f LEA RSI,[0x10b696] LEA R12,[RSP + 0x8] MOV RDI,R12 CALL 0x00107da2 LAB_0010704c: LEA RSI,[0x10b2b5] MOV RDI,R15 MOV RDX,R12 CALL 0x00104190 LAB_0010705e: LEA RDI,[RSP + 0x8] CALL 0x00104170 MOV RDI,R15 CALL 0x00104430 MOV RCX,qword ptr [RAX] MOV RDI,RAX MOV RSI,R15 CALL qword ptr [RCX + 0x68] MOV RDI,R15 CALL 0x00104430 MOV RCX,qword ptr [RAX] MOV RDI,RAX MOV RSI,R15 CALL qword ptr [RCX + 0x60] MOV RDI,R15 CALL 0x00104120 LEA R12,[RBX + 0xf8] MOV RDI,R12 MOV ESI,EBP MOV EDX,R14D CALL 0x00108fea CMP EAX,0x1 JNZ 0x0010715f MOV EAX,dword ptr [RBX + 0xa4] CMP EAX,0x1 JNZ 0x0010711f LEA R15,[RBX + 0x58] LEA RSI,[RBX + 0xa4] CMP dword ptr [RBX + 0x144],0x1 JNZ 0x00107114 MOV EAX,dword ptr [RBX + 0x98] MOV ECX,dword ptr [RBX + 0x138] SUB EAX,EBP MOV EDX,EAX NEG EDX CMOVS EDX,EAX SUB ECX,EBP MOV EAX,ECX NEG EAX CMOVS EAX,ECX CMP EDX,EAX CMOVA R15,R12 MOV EAX,0x13c MOV R13D,0x9c CMOVA R13,RAX LEA RAX,[RBX + 0x144] CMOVA RSI,RAX JMP 0x00107138 LAB_00107114: MOV R13D,0x9c CMP EAX,0x1 JZ 0x00107138 LAB_0010711f: CMP dword ptr [RBX + 0x144],0x1 JNZ 0x0010715f LEA RSI,[RBX + 0x144] MOV R13D,0x13c MOV R15,R12 LAB_00107138: MOV RDI,R15 MOV R12,RSI MOV ESI,EBP MOV EDX,R14D CALL 0x00108eb4 MOV dword ptr [RBX + R13*0x1],EBP MOV dword ptr [R12],0x3 MOV RDI,RBX MOV RSI,R15 CALL 0x00106a7e LAB_0010715f: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* MainWindow::add_outstair(int, QPushButton*, int) */ void __thiscall MainWindow::add_outstair(MainWindow *this,int param_1,QPushButton *param_2,int param_3) { Elevetor *this_00; uint uVar1; char cVar2; int iVar3; uint uVar4; long *plVar5; uint uVar6; MainWindow *pMVar7; long lVar8; Elevetor *pEVar9; QVariant local_50 [32]; QObject::property((char *)local_50); /* try { // try from 0010701a to 00107021 has its CatchHandler @ 00107170 */ cVar2 = QVariant::toBool(); QVariant::~QVariant(local_50); if (cVar2 == '\0') { QVariant::QVariant(local_50,"true"); /* try { // try from 0010704c to 0010705d has its CatchHandler @ 0010716e */ QObject::setProperty((char *)param_2,(QVariant *)"pressedState"); QVariant::~QVariant(local_50); plVar5 = (long *)QWidget::style(); (**(code **)(*plVar5 + 0x68))(plVar5,param_2); plVar5 = (long *)QWidget::style(); (**(code **)(*plVar5 + 0x60))(plVar5,param_2); QWidget::update(); this_00 = (Elevetor *)(this + 0xf8); iVar3 = Elevetor::add_out(this_00,param_1,param_3); if (iVar3 == 1) { if (*(int *)(this + 0xa4) == 1) { pMVar7 = this + 0xa4; pEVar9 = (Elevetor *)(this + 0x58); if (*(int *)(this + 0x144) == 1) { uVar4 = *(int *)(this + 0x98) - param_1; uVar1 = -uVar4; if (0 < (int)uVar4) { uVar1 = uVar4; } uVar6 = *(int *)(this + 0x138) - param_1; uVar4 = -uVar6; if (0 < (int)uVar6) { uVar4 = uVar6; } if (uVar4 < uVar1) { pEVar9 = this_00; } lVar8 = 0x9c; if (uVar4 < uVar1) { lVar8 = 0x13c; } if (uVar4 < uVar1) { pMVar7 = this + 0x144; } } else { lVar8 = 0x9c; } } else { if (*(int *)(this + 0x144) != 1) { return; } lVar8 = 0x13c; pMVar7 = this + 0x144; pEVar9 = this_00; } Elevetor::out_to_inside(pEVar9,param_1,param_3); *(int *)(this + lVar8) = param_1; *(int4 *)pMVar7 = 3; move_ele(this,pEVar9); } } return; }
20,662
my_stat
eloqsql/mysys/my_lib.c
MY_STAT *my_stat(const char *path, MY_STAT *stat_area, myf my_flags) { int m_used; DBUG_ENTER("my_stat"); DBUG_PRINT("my", ("path: '%s' stat_area: %p MyFlags: %lu", path, stat_area, my_flags)); if ((m_used= (stat_area == NULL))) if (!(stat_area= (MY_STAT *) my_malloc(key_memory_MY_STAT, sizeof(MY_STAT), my_flags))) goto error; #ifndef _WIN32 if (!stat((char *) path, (struct stat *) stat_area)) { MSAN_STAT_WORKAROUND(stat_area); DBUG_RETURN(stat_area); } #else if (!my_win_stat(path, stat_area)) DBUG_RETURN(stat_area); #endif DBUG_PRINT("error",("Got errno: %d from stat", errno)); my_errno= errno; if (m_used) /* Free if new area */ my_free(stat_area); error: if (my_flags & (MY_FAE+MY_WME)) { my_error(EE_STAT, MYF(ME_BELL), path, my_errno); DBUG_RETURN((MY_STAT *) NULL); } DBUG_RETURN((MY_STAT *) NULL); }
O0
c
my_stat: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) jmp 0xfaf26 cmpq $0x0, -0x18(%rbp) sete %al movb %al, %cl andb $0x1, %cl movzbl %cl, %ecx movl %ecx, -0x24(%rbp) testb $0x1, %al jne 0xfaf3f jmp 0xfaf64 leaq 0xb93522(%rip), %rax # 0xc8e468 movl (%rax), %edi movq -0x20(%rbp), %rdx movl $0x90, %esi callq 0xfb390 movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0xfaf62 jmp 0xfafab jmp 0xfaf64 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x29770 cmpl $0x0, %eax jne 0xfaf82 jmp 0xfaf78 movq -0x18(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0xfaff1 jmp 0xfaf84 jmp 0xfaf86 callq 0x29700 movl (%rax), %eax movl %eax, -0x28(%rbp) callq 0xfdd30 movl -0x28(%rbp), %ecx movl %ecx, (%rax) cmpl $0x0, -0x24(%rbp) je 0xfafa9 movq -0x18(%rbp), %rdi callq 0xfb710 jmp 0xfafab movq -0x20(%rbp), %rax andq $0x18, %rax cmpq $0x0, %rax je 0xfafe7 movq -0x10(%rbp), %rax movq %rax, -0x30(%rbp) callq 0xfdd30 movq -0x30(%rbp), %rdx movl (%rax), %ecx movl $0xd, %edi movl $0x4, %esi movb $0x0, %al callq 0xf76a0 movq $0x0, -0x8(%rbp) jmp 0xfaff1 jmp 0xfafe9 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
my_stat: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx jmp short $+2 loc_FAF26: cmp [rbp+var_18], 0 setz al mov cl, al and cl, 1 movzx ecx, cl mov [rbp+var_24], ecx test al, 1 jnz short loc_FAF3F jmp short loc_FAF64 loc_FAF3F: lea rax, key_memory_MY_STAT mov edi, [rax] mov rdx, [rbp+var_20] mov esi, 90h call my_malloc mov [rbp+var_18], rax cmp rax, 0 jnz short loc_FAF62 jmp short loc_FAFAB loc_FAF62: jmp short $+2 loc_FAF64: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call _stat64 cmp eax, 0 jnz short loc_FAF82 jmp short $+2 loc_FAF78: mov rax, [rbp+var_18] mov [rbp+var_8], rax jmp short loc_FAFF1 loc_FAF82: jmp short $+2 loc_FAF84: jmp short $+2 loc_FAF86: call ___errno_location mov eax, [rax] mov [rbp+var_28], eax call _my_thread_var mov ecx, [rbp+var_28] mov [rax], ecx cmp [rbp+var_24], 0 jz short loc_FAFA9 mov rdi, [rbp+var_18] call my_free loc_FAFA9: jmp short $+2 loc_FAFAB: mov rax, [rbp+var_20] and rax, 18h cmp rax, 0 jz short loc_FAFE7 mov rax, [rbp+var_10] mov [rbp+var_30], rax call _my_thread_var mov rdx, [rbp+var_30] mov ecx, [rax] mov edi, 0Dh mov esi, 4 mov al, 0 call my_error mov [rbp+var_8], 0 jmp short loc_FAFF1 loc_FAFE7: jmp short $+2 loc_FAFE9: mov [rbp+var_8], 0 loc_FAFF1: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
const char * my_stat(const char *a1, const char *a2, long long a3) { const char *v3; // rdi const char *v4; // rsi unsigned int *v5; // rax int v7; // [rsp+8h] [rbp-28h] BOOL v8; // [rsp+Ch] [rbp-24h] char v9; // [rsp+10h] [rbp-20h] const char *v10; // [rsp+18h] [rbp-18h] v10 = a2; v9 = a3; v8 = a2 == 0LL; if ( a2 || (v3 = (const char *)key_memory_MY_STAT, v4 = (const char *)&qword_90, (v10 = (const char *)my_malloc(key_memory_MY_STAT, 144LL, a3)) != 0LL) ) { v3 = a1; v4 = v10; if ( !(unsigned int)stat64(a1, v10) ) return v10; v7 = *(_DWORD *)__errno_location(); *(_DWORD *)my_thread_var(a1, v10) = v7; if ( v8 ) { v3 = v10; my_free(v10); } } if ( (v9 & 0x18) != 0 ) { v5 = (unsigned int *)my_thread_var(v3, v4); my_error(0xDu, 4LL, a1, *v5); } return 0LL; }
my_stat: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX JMP 0x001faf26 LAB_001faf26: CMP qword ptr [RBP + -0x18],0x0 SETZ AL MOV CL,AL AND CL,0x1 MOVZX ECX,CL MOV dword ptr [RBP + -0x24],ECX TEST AL,0x1 JNZ 0x001faf3f JMP 0x001faf64 LAB_001faf3f: LEA RAX,[0xd8e468] MOV EDI,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x20] MOV ESI,0x90 CALL 0x001fb390 MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x001faf62 JMP 0x001fafab LAB_001faf62: JMP 0x001faf64 LAB_001faf64: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00129770 CMP EAX,0x0 JNZ 0x001faf82 JMP 0x001faf78 LAB_001faf78: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX JMP 0x001faff1 LAB_001faf82: JMP 0x001faf84 LAB_001faf84: JMP 0x001faf86 LAB_001faf86: CALL 0x00129700 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x28],EAX CALL 0x001fdd30 MOV ECX,dword ptr [RBP + -0x28] MOV dword ptr [RAX],ECX CMP dword ptr [RBP + -0x24],0x0 JZ 0x001fafa9 MOV RDI,qword ptr [RBP + -0x18] CALL 0x001fb710 LAB_001fafa9: JMP 0x001fafab LAB_001fafab: MOV RAX,qword ptr [RBP + -0x20] AND RAX,0x18 CMP RAX,0x0 JZ 0x001fafe7 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x30],RAX CALL 0x001fdd30 MOV RDX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RAX] MOV EDI,0xd MOV ESI,0x4 MOV AL,0x0 CALL 0x001f76a0 MOV qword ptr [RBP + -0x8],0x0 JMP 0x001faff1 LAB_001fafe7: JMP 0x001fafe9 LAB_001fafe9: MOV qword ptr [RBP + -0x8],0x0 LAB_001faff1: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
stat64 * my_stat(char *param_1,stat64 *param_2,ulong param_3) { int iVar1; int *piVar2; int4 *puVar3; stat64 *local_20; local_20 = param_2; if ((param_2 != (stat64 *)0x0) || (local_20 = (stat64 *)my_malloc(key_memory_MY_STAT,0x90,param_3), local_20 != (stat64 *)0x0)) { iVar1 = stat64(param_1,local_20); if (iVar1 == 0) { return local_20; } piVar2 = __errno_location(); iVar1 = *piVar2; piVar2 = (int *)_my_thread_var(); *piVar2 = iVar1; if (param_2 == (stat64 *)0x0) { my_free(local_20); } } if ((param_3 & 0x18) != 0) { puVar3 = (int4 *)_my_thread_var(); my_error(0xd,4,param_1,*puVar3); } return (stat64 *)0x0; }
20,663
my_stat
eloqsql/mysys/my_lib.c
MY_STAT *my_stat(const char *path, MY_STAT *stat_area, myf my_flags) { int m_used; DBUG_ENTER("my_stat"); DBUG_PRINT("my", ("path: '%s' stat_area: %p MyFlags: %lu", path, stat_area, my_flags)); if ((m_used= (stat_area == NULL))) if (!(stat_area= (MY_STAT *) my_malloc(key_memory_MY_STAT, sizeof(MY_STAT), my_flags))) goto error; #ifndef _WIN32 if (!stat((char *) path, (struct stat *) stat_area)) { MSAN_STAT_WORKAROUND(stat_area); DBUG_RETURN(stat_area); } #else if (!my_win_stat(path, stat_area)) DBUG_RETURN(stat_area); #endif DBUG_PRINT("error",("Got errno: %d from stat", errno)); my_errno= errno; if (m_used) /* Free if new area */ my_free(stat_area); error: if (my_flags & (MY_FAE+MY_WME)) { my_error(EE_STAT, MYF(ME_BELL), path, my_errno); DBUG_RETURN((MY_STAT *) NULL); } DBUG_RETURN((MY_STAT *) NULL); }
O3
c
my_stat: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx movq %rsi, %r14 testq %rsi, %rsi jne 0xa5b00 leaq 0xb6ce6f(%rip), %rax # 0xc12958 movl (%rax), %edi movl $0x90, %esi movq %r15, %rdx callq 0xa5de1 movq %rax, %r14 testq %rax, %rax je 0xa5b2c movq %rbx, %rdi movq %r14, %rsi callq 0x297d0 testl %eax, %eax je 0xa5b55 callq 0x29750 movl (%rax), %r13d callq 0xa7c22 movl %r13d, (%rax) testq %r12, %r12 jne 0xa5b2c movq %r14, %rdi callq 0xa600e testb $0x18, %r15b je 0xa5b52 callq 0xa7c22 movl (%rax), %ecx xorl %r14d, %r14d movl $0x4, %esi movl $0xd, %edi movq %rbx, %rdx xorl %eax, %eax callq 0xa4207 jmp 0xa5b55 xorl %r14d, %r14d movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_stat: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r15, rdx mov r12, rsi mov rbx, rdi mov r14, rsi test rsi, rsi jnz short loc_A5B00 lea rax, key_memory_MY_STAT mov edi, [rax] mov esi, 90h mov rdx, r15 call my_malloc mov r14, rax test rax, rax jz short loc_A5B2C loc_A5B00: mov rdi, rbx mov rsi, r14 call _stat64 test eax, eax jz short loc_A5B55 call ___errno_location mov r13d, [rax] call _my_thread_var mov [rax], r13d test r12, r12 jnz short loc_A5B2C mov rdi, r14 call my_free loc_A5B2C: test r15b, 18h jz short loc_A5B52 call _my_thread_var mov ecx, [rax] xor r14d, r14d mov esi, 4 mov edi, 0Dh mov rdx, rbx xor eax, eax call my_error jmp short loc_A5B55 loc_A5B52: xor r14d, r14d loc_A5B55: mov rax, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
const char * my_stat(const char *a1, const char *a2, long long a3) { char v3; // r15 const char *v6; // r14 const char *v7; // rdi const char *v8; // rsi int v9; // r13d unsigned int *v10; // rax v3 = a3; v6 = a2; if ( a2 || (v7 = (const char *)key_memory_MY_STAT, v8 = (const char *)&qword_90, (v6 = (const char *)my_malloc(key_memory_MY_STAT, 144LL, a3)) != 0LL) ) { v7 = a1; v8 = v6; if ( !(unsigned int)stat64(a1, v6) ) return v6; v9 = *(_DWORD *)__errno_location(a1); *(_DWORD *)my_thread_var(a1, v6) = v9; if ( !a2 ) { v7 = v6; my_free(v6); } } if ( (v3 & 0x18) == 0 ) return 0LL; v10 = (unsigned int *)my_thread_var(v7, v8); v6 = 0LL; my_error(0xDu, 4LL, a1, *v10); return v6; }
my_stat: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15,RDX MOV R12,RSI MOV RBX,RDI MOV R14,RSI TEST RSI,RSI JNZ 0x001a5b00 LEA RAX,[0xd12958] MOV EDI,dword ptr [RAX] MOV ESI,0x90 MOV RDX,R15 CALL 0x001a5de1 MOV R14,RAX TEST RAX,RAX JZ 0x001a5b2c LAB_001a5b00: MOV RDI,RBX MOV RSI,R14 CALL 0x001297d0 TEST EAX,EAX JZ 0x001a5b55 CALL 0x00129750 MOV R13D,dword ptr [RAX] CALL 0x001a7c22 MOV dword ptr [RAX],R13D TEST R12,R12 JNZ 0x001a5b2c MOV RDI,R14 CALL 0x001a600e LAB_001a5b2c: TEST R15B,0x18 JZ 0x001a5b52 CALL 0x001a7c22 MOV ECX,dword ptr [RAX] XOR R14D,R14D MOV ESI,0x4 MOV EDI,0xd MOV RDX,RBX XOR EAX,EAX CALL 0x001a4207 JMP 0x001a5b55 LAB_001a5b52: XOR R14D,R14D LAB_001a5b55: MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
stat64 * my_stat(char *param_1,stat64 *param_2,ulong param_3) { int iVar1; stat64 *__buf; int *piVar2; int4 *puVar3; __buf = param_2; if ((param_2 != (stat64 *)0x0) || (__buf = (stat64 *)my_malloc(key_memory_MY_STAT,0x90,param_3), __buf != (stat64 *)0x0)) { iVar1 = stat64(param_1,__buf); if (iVar1 == 0) { return __buf; } piVar2 = __errno_location(); iVar1 = *piVar2; piVar2 = (int *)_my_thread_var(); *piVar2 = iVar1; if (param_2 == (stat64 *)0x0) { my_free(__buf); } } if ((param_3 & 0x18) != 0) { puVar3 = (int4 *)_my_thread_var(); my_error(0xd,4,param_1,*puVar3); } return (stat64 *)0x0; }
20,664
ggml_get_rows
ngxson[P]ggml-easy/ggml/src/ggml.c
struct ggml_tensor * ggml_get_rows( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * b) { GGML_ASSERT(a->ne[2] == b->ne[1]); GGML_ASSERT(b->ne[3] == 1); GGML_ASSERT(b->type == GGML_TYPE_I32); // TODO: implement non F32 return enum ggml_type type = GGML_TYPE_F32; if (a->type == GGML_TYPE_I32) { type = a->type; } struct ggml_tensor * result = ggml_new_tensor_4d(ctx, type, a->ne[0], b->ne[0], b->ne[1], b->ne[2]); result->op = GGML_OP_GET_ROWS; result->src[0] = a; result->src[1] = b; return result; }
O1
c
ggml_get_rows: pushq %r14 pushq %rbx subq $0x28, %rsp movq 0x18(%rdx), %rax cmpq %rax, 0x20(%rsi) jne 0x1c460 movq %rdx, %rbx cmpq $0x1, 0x28(%rdx) jne 0x1c47c cmpl $0x1a, (%rbx) jne 0x1c498 movq %rsi, %r14 movl (%rsi), %esi xorl %ecx, %ecx cmpl $0x1a, %esi cmovnel %ecx, %esi movq 0x10(%r14), %rdx movq 0x10(%rbx), %r8 movq 0x20(%rbx), %r9 movq %rsp, %rcx movq %rdx, (%rcx) movq %r8, 0x8(%rcx) movq %rax, 0x10(%rcx) movq %r9, 0x18(%rcx) movl $0x4, %edx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x19cd9 movl $0x26, 0x50(%rax) movq %r14, 0x98(%rax) movq %rbx, 0xa0(%rax) addq $0x28, %rsp popq %rbx popq %r14 retq leaq 0x2e1a8(%rip), %rdi # 0x4a60f leaq 0x2e1ec(%rip), %rdx # 0x4a65a leaq 0x2e6e6(%rip), %rcx # 0x4ab5b movl $0xcff, %esi # imm = 0xCFF jmp 0x1c4b2 leaq 0x2e18c(%rip), %rdi # 0x4a60f leaq 0x2e1d0(%rip), %rdx # 0x4a65a leaq 0x2e42f(%rip), %rcx # 0x4a8c0 movl $0xd00, %esi # imm = 0xD00 jmp 0x1c4b2 leaq 0x2e170(%rip), %rdi # 0x4a60f leaq 0x2e1b4(%rip), %rdx # 0x4a65a leaq 0x2e6ed(%rip), %rcx # 0x4ab9a movl $0xd01, %esi # imm = 0xD01 xorl %eax, %eax callq 0x17c70
ggml_get_rows: push r14 push rbx sub rsp, 28h mov rax, [rdx+18h] cmp [rsi+20h], rax jnz short loc_1C460 mov rbx, rdx cmp qword ptr [rdx+28h], 1 jnz short loc_1C47C cmp dword ptr [rbx], 1Ah jnz loc_1C498 mov r14, rsi mov esi, [rsi] xor ecx, ecx cmp esi, 1Ah cmovnz esi, ecx mov rdx, [r14+10h] mov r8, [rbx+10h] mov r9, [rbx+20h] mov rcx, rsp mov [rcx], rdx mov [rcx+8], r8 mov [rcx+10h], rax mov [rcx+18h], r9 mov edx, 4 xor r8d, r8d xor r9d, r9d call ggml_new_tensor_impl mov dword ptr [rax+50h], 26h ; '&' mov [rax+98h], r14 mov [rax+0A0h], rbx add rsp, 28h pop rbx pop r14 retn loc_1C460: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aANe2BNe1; "a->ne[2] == b->ne[1]" mov esi, 0CFFh jmp short loc_1C4B2 loc_1C47C: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aBNe31; "b->ne[3] == 1" mov esi, 0D00h jmp short loc_1C4B2 loc_1C498: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsMatrixAG+2Ah; "b->type == GGML_TYPE_I32" mov esi, 0D01h loc_1C4B2: xor eax, eax call _ggml_abort
long long ggml_get_rows(long long a1, long long a2, long long a3, long long a4, int a5, int a6) { long long v6; // rax unsigned int v9; // esi long long v10; // r8 long long v11; // r9 long long result; // rax char *v13; // rcx int v14; // esi _QWORD v15[7]; // [rsp+0h] [rbp-38h] BYREF v6 = *(_QWORD *)(a3 + 24); if ( *(_QWORD *)(a2 + 32) != v6 ) { v13 = "a->ne[2] == b->ne[1]"; v14 = 3327; goto LABEL_10; } if ( *(_QWORD *)(a3 + 40) != 1LL ) { v13 = "b->ne[3] == 1"; v14 = 3328; goto LABEL_10; } if ( *(_DWORD *)a3 != 26 ) { v13 = "b->type == GGML_TYPE_I32"; v14 = 3329; LABEL_10: ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c", v14, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v13, a5, a6); } v9 = *(_DWORD *)a2; if ( v9 != 26 ) v9 = 0; v10 = *(_QWORD *)(a3 + 16); v11 = *(_QWORD *)(a3 + 32); v15[0] = *(_QWORD *)(a2 + 16); v15[1] = v10; v15[2] = v6; v15[3] = v11; result = ggml_new_tensor_impl(a1, v9, 4, v15, 0LL, 0LL); *(_DWORD *)(result + 80) = 38; *(_QWORD *)(result + 152) = a2; *(_QWORD *)(result + 160) = a3; return result; }
ggml_get_rows: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RAX,qword ptr [RDX + 0x18] CMP qword ptr [RSI + 0x20],RAX JNZ 0x0011c460 MOV RBX,RDX CMP qword ptr [RDX + 0x28],0x1 JNZ 0x0011c47c CMP dword ptr [RBX],0x1a JNZ 0x0011c498 MOV R14,RSI MOV ESI,dword ptr [RSI] XOR ECX,ECX CMP ESI,0x1a CMOVNZ ESI,ECX MOV RDX,qword ptr [R14 + 0x10] MOV R8,qword ptr [RBX + 0x10] MOV R9,qword ptr [RBX + 0x20] MOV RCX,RSP MOV qword ptr [RCX],RDX MOV qword ptr [RCX + 0x8],R8 MOV qword ptr [RCX + 0x10],RAX MOV qword ptr [RCX + 0x18],R9 MOV EDX,0x4 XOR R8D,R8D XOR R9D,R9D CALL 0x00119cd9 MOV dword ptr [RAX + 0x50],0x26 MOV qword ptr [RAX + 0x98],R14 MOV qword ptr [RAX + 0xa0],RBX ADD RSP,0x28 POP RBX POP R14 RET LAB_0011c460: LEA RDI,[0x14a60f] LEA RDX,[0x14a65a] LEA RCX,[0x14ab5b] MOV ESI,0xcff JMP 0x0011c4b2 LAB_0011c47c: LEA RDI,[0x14a60f] LEA RDX,[0x14a65a] LEA RCX,[0x14a8c0] MOV ESI,0xd00 JMP 0x0011c4b2 LAB_0011c498: LEA RDI,[0x14a60f] LEA RDX,[0x14a65a] LEA RCX,[0x14ab9a] MOV ESI,0xd01 LAB_0011c4b2: XOR EAX,EAX CALL 0x00117c70
void ggml_get_rows(int8 param_1,int *param_2,int *param_3) { int iVar1; long lVar2; char *pcVar3; int8 uVar4; int8 local_38; int8 local_30; long local_28; int8 local_20; local_28 = *(long *)(param_3 + 6); if (*(long *)(param_2 + 8) == local_28) { if (*(long *)(param_3 + 10) == 1) { if (*param_3 == 0x1a) { iVar1 = *param_2; if (*param_2 != 0x1a) { iVar1 = 0; } local_38 = *(int8 *)(param_2 + 4); local_30 = *(int8 *)(param_3 + 4); local_20 = *(int8 *)(param_3 + 8); lVar2 = ggml_new_tensor_impl(param_1,iVar1,4,&local_38,0,0); *(int4 *)(lVar2 + 0x50) = 0x26; *(int **)(lVar2 + 0x98) = param_2; *(int **)(lVar2 + 0xa0) = param_3; return; } pcVar3 = "b->type == GGML_TYPE_I32"; uVar4 = 0xd01; } else { pcVar3 = "b->ne[3] == 1"; uVar4 = 0xd00; } } else { pcVar3 = "a->ne[2] == b->ne[1]"; uVar4 = 0xcff; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",uVar4, "GGML_ASSERT(%s) failed",pcVar3); }
20,665
crypto_sign_ed25519_ref10_ge_add
eloqsql/libmariadb/plugins/auth/ref10/ge_add.c
void ge_add(ge_p1p1 *r,const ge_p3 *p,const ge_cached *q) { fe t0; #include "ge_add.h" }
O0
c
crypto_sign_ed25519_ref10_ge_add: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi addq $0x28, %rsi movq -0x10(%rbp), %rdx callq 0x2050 movq -0x8(%rbp), %rdi addq $0x28, %rdi movq -0x10(%rbp), %rsi addq $0x28, %rsi movq -0x10(%rbp), %rdx callq 0x2040 movq -0x8(%rbp), %rdi addq $0x50, %rdi movq -0x8(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x20d0 movq -0x8(%rbp), %rdi addq $0x28, %rdi movq -0x8(%rbp), %rsi addq $0x28, %rsi movq -0x18(%rbp), %rdx addq $0x28, %rdx callq 0x20d0 movq -0x8(%rbp), %rdi addq $0x78, %rdi movq -0x18(%rbp), %rsi addq $0x78, %rsi movq -0x10(%rbp), %rdx addq $0x78, %rdx callq 0x20d0 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi addq $0x50, %rsi movq -0x18(%rbp), %rdx addq $0x50, %rdx callq 0x20d0 leaq -0x40(%rbp), %rdi movq -0x8(%rbp), %rsi movq -0x8(%rbp), %rdx callq 0x2050 movq -0x8(%rbp), %rdi movq -0x8(%rbp), %rsi addq $0x50, %rsi movq -0x8(%rbp), %rdx addq $0x28, %rdx callq 0x2040 movq -0x8(%rbp), %rdi addq $0x28, %rdi movq -0x8(%rbp), %rsi addq $0x50, %rsi movq -0x8(%rbp), %rdx addq $0x28, %rdx callq 0x2050 movq -0x8(%rbp), %rdi addq $0x50, %rdi leaq -0x40(%rbp), %rsi movq -0x8(%rbp), %rdx addq $0x78, %rdx callq 0x2050 movq -0x8(%rbp), %rdi addq $0x78, %rdi leaq -0x40(%rbp), %rsi movq -0x8(%rbp), %rdx addq $0x78, %rdx callq 0x2040 addq $0x40, %rsp popq %rbp retq nopl (%rax)
crypto_sign_ed25519_ref10_ge_add: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] add rsi, 28h ; '(' mov rdx, [rbp+var_10] call _crypto_sign_ed25519_ref10_fe_add mov rdi, [rbp+var_8] add rdi, 28h ; '(' mov rsi, [rbp+var_10] add rsi, 28h ; '(' mov rdx, [rbp+var_10] call _crypto_sign_ed25519_ref10_fe_sub mov rdi, [rbp+var_8] add rdi, 50h ; 'P' mov rsi, [rbp+var_8] mov rdx, [rbp+var_18] call _crypto_sign_ed25519_ref10_fe_mul mov rdi, [rbp+var_8] add rdi, 28h ; '(' mov rsi, [rbp+var_8] add rsi, 28h ; '(' mov rdx, [rbp+var_18] add rdx, 28h ; '(' call _crypto_sign_ed25519_ref10_fe_mul mov rdi, [rbp+var_8] add rdi, 78h ; 'x' mov rsi, [rbp+var_18] add rsi, 78h ; 'x' mov rdx, [rbp+var_10] add rdx, 78h ; 'x' call _crypto_sign_ed25519_ref10_fe_mul mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] add rsi, 50h ; 'P' mov rdx, [rbp+var_18] add rdx, 50h ; 'P' call _crypto_sign_ed25519_ref10_fe_mul lea rdi, [rbp+var_40] mov rsi, [rbp+var_8] mov rdx, [rbp+var_8] call _crypto_sign_ed25519_ref10_fe_add mov rdi, [rbp+var_8] mov rsi, [rbp+var_8] add rsi, 50h ; 'P' mov rdx, [rbp+var_8] add rdx, 28h ; '(' call _crypto_sign_ed25519_ref10_fe_sub mov rdi, [rbp+var_8] add rdi, 28h ; '(' mov rsi, [rbp+var_8] add rsi, 50h ; 'P' mov rdx, [rbp+var_8] add rdx, 28h ; '(' call _crypto_sign_ed25519_ref10_fe_add mov rdi, [rbp+var_8] add rdi, 50h ; 'P' lea rsi, [rbp+var_40] mov rdx, [rbp+var_8] add rdx, 78h ; 'x' call _crypto_sign_ed25519_ref10_fe_add mov rdi, [rbp+var_8] add rdi, 78h ; 'x' lea rsi, [rbp+var_40] mov rdx, [rbp+var_8] add rdx, 78h ; 'x' call _crypto_sign_ed25519_ref10_fe_sub add rsp, 40h pop rbp retn
_DWORD * crypto_sign_ed25519_ref10_ge_add(_DWORD *a1, _DWORD *a2, long long a3) { _DWORD v4[10]; // [rsp+0h] [rbp-40h] BYREF long long v5; // [rsp+28h] [rbp-18h] _DWORD *v6; // [rsp+30h] [rbp-10h] _DWORD *v7; // [rsp+38h] [rbp-8h] v7 = a1; v6 = a2; v5 = a3; crypto_sign_ed25519_ref10_fe_add(a1, a2 + 10, a2); crypto_sign_ed25519_ref10_fe_sub(a1 + 10, v6 + 10, v6); crypto_sign_ed25519_ref10_fe_mul(v7 + 20, v7, v5); crypto_sign_ed25519_ref10_fe_mul(v7 + 10, v7 + 10, v5 + 40); crypto_sign_ed25519_ref10_fe_mul(a1 + 30, v5 + 120, a2 + 30); crypto_sign_ed25519_ref10_fe_mul(a1, a2 + 20, v5 + 80); crypto_sign_ed25519_ref10_fe_add(v4, v7, v7); crypto_sign_ed25519_ref10_fe_sub(v7, v7 + 20, v7 + 10); crypto_sign_ed25519_ref10_fe_add(v7 + 10, v7 + 20, v7 + 10); crypto_sign_ed25519_ref10_fe_add(v7 + 20, v4, v7 + 30); return crypto_sign_ed25519_ref10_fe_sub(v7 + 30, v4, v7 + 30); }
crypto_sign_ed25519_ref10_ge_add: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x28 MOV RDX,qword ptr [RBP + -0x10] CALL 0x00102050 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x28 MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x28 MOV RDX,qword ptr [RBP + -0x10] CALL 0x00102040 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x50 MOV RSI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x18] CALL 0x001020d0 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x28 MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0x28 MOV RDX,qword ptr [RBP + -0x18] ADD RDX,0x28 CALL 0x001020d0 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x78 MOV RSI,qword ptr [RBP + -0x18] ADD RSI,0x78 MOV RDX,qword ptr [RBP + -0x10] ADD RDX,0x78 CALL 0x001020d0 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x50 MOV RDX,qword ptr [RBP + -0x18] ADD RDX,0x50 CALL 0x001020d0 LEA RDI,[RBP + -0x40] MOV RSI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x8] CALL 0x00102050 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0x50 MOV RDX,qword ptr [RBP + -0x8] ADD RDX,0x28 CALL 0x00102040 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x28 MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0x50 MOV RDX,qword ptr [RBP + -0x8] ADD RDX,0x28 CALL 0x00102050 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x50 LEA RSI,[RBP + -0x40] MOV RDX,qword ptr [RBP + -0x8] ADD RDX,0x78 CALL 0x00102050 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x78 LEA RSI,[RBP + -0x40] MOV RDX,qword ptr [RBP + -0x8] ADD RDX,0x78 CALL 0x00102040 ADD RSP,0x40 POP RBP RET
void crypto_sign_ed25519_ref10_ge_add(long param_1,long param_2,long param_3) { int1 local_48 [40]; long local_20; long local_18; long local_10; local_20 = param_3; local_18 = param_2; local_10 = param_1; crypto_sign_ed25519_ref10_fe_add(param_1,param_2 + 0x28,param_2); crypto_sign_ed25519_ref10_fe_sub(local_10 + 0x28,local_18 + 0x28,local_18); crypto_sign_ed25519_ref10_fe_mul(local_10 + 0x50,local_10,local_20); crypto_sign_ed25519_ref10_fe_mul(local_10 + 0x28,local_10 + 0x28,local_20 + 0x28); crypto_sign_ed25519_ref10_fe_mul(local_10 + 0x78,local_20 + 0x78,local_18 + 0x78); crypto_sign_ed25519_ref10_fe_mul(local_10,local_18 + 0x50,local_20 + 0x50); crypto_sign_ed25519_ref10_fe_add(local_48,local_10,local_10); crypto_sign_ed25519_ref10_fe_sub(local_10,local_10 + 0x50,local_10 + 0x28); crypto_sign_ed25519_ref10_fe_add(local_10 + 0x28,local_10 + 0x50,local_10 + 0x28); crypto_sign_ed25519_ref10_fe_add(local_10 + 0x50,local_48,local_10 + 0x78); crypto_sign_ed25519_ref10_fe_sub(local_10 + 0x78,local_48,local_10 + 0x78); return; }
20,666
bitmap_set_next
eloqsql/mysys/my_bitmap.c
uint bitmap_set_next(MY_BITMAP *map) { uint bit_found; DBUG_ASSERT(map->bitmap); if ((bit_found= bitmap_get_first(map)) != MY_BIT_NONE) bitmap_set_bit(map, bit_found); return bit_found; }
O3
c
bitmap_set_next: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx callq 0x9d2e8 cmpl $-0x1, %eax je 0x9d2e1 movq (%rbx), %rdx movl %eax, %esi movl %eax, %ecx andb $0x7, %cl movl $0x1, %edi shll %cl, %edi shrl $0x3, %esi orb %dil, (%rdx,%rsi) addq $0x8, %rsp popq %rbx popq %rbp retq
bitmap_set_next: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi call bitmap_get_first cmp eax, 0FFFFFFFFh jz short loc_9D2E1 mov rdx, [rbx] mov esi, eax mov ecx, eax and cl, 7 mov edi, 1 shl edi, cl shr esi, 3 or [rdx+rsi], dil loc_9D2E1: add rsp, 8 pop rbx pop rbp retn
long long bitmap_set_next(_QWORD *a1) { long long result; // rax result = bitmap_get_first(a1); if ( (_DWORD)result != -1 ) *(_BYTE *)(*a1 + ((unsigned int)result >> 3)) |= 1 << (result & 7); return result; }
bitmap_set_next: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI CALL 0x0019d2e8 CMP EAX,-0x1 JZ 0x0019d2e1 MOV RDX,qword ptr [RBX] MOV ESI,EAX MOV ECX,EAX AND CL,0x7 MOV EDI,0x1 SHL EDI,CL SHR ESI,0x3 OR byte ptr [RDX + RSI*0x1],DIL LAB_0019d2e1: ADD RSP,0x8 POP RBX POP RBP RET
void bitmap_set_next(long *param_1) { byte *pbVar1; uint uVar2; uVar2 = bitmap_get_first(); if (uVar2 != 0xffffffff) { pbVar1 = (byte *)(*param_1 + (ulong)(uVar2 >> 3)); *pbVar1 = *pbVar1 | (byte)(1 << ((byte)uVar2 & 7)); } return; }
20,667
mthd_my_skip_result
eloqsql/libmariadb/libmariadb/mariadb_lib.c
void mthd_my_skip_result(MYSQL *mysql) { ulong pkt_len; do { pkt_len= ma_net_safe_read(mysql); if (pkt_len == packet_error) break; } while (pkt_len > 8 || mysql->net.read_pos[0] != 254); return; }
O0
c
mthd_my_skip_result: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi callq 0x20850 movq %rax, -0x10(%rbp) movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq %rax, -0x10(%rbp) jne 0x21c56 jmp 0x21c81 jmp 0x21c58 movb $0x1, %al cmpq $0x8, -0x10(%rbp) movb %al, -0x11(%rbp) ja 0x21c7a movq -0x8(%rbp), %rax movq 0x20(%rax), %rax movzbl (%rax), %eax cmpl $0xfe, %eax setne %al movb %al, -0x11(%rbp) movb -0x11(%rbp), %al testb $0x1, %al jne 0x21c3c addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
mthd_my_skip_result: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi loc_21C3C: mov rdi, [rbp+var_8] call ma_net_safe_read mov [rbp+var_10], rax mov eax, 0FFFFFFFFh cmp [rbp+var_10], rax jnz short loc_21C56 jmp short loc_21C81 loc_21C56: jmp short $+2 loc_21C58: mov al, 1 cmp [rbp+var_10], 8 mov [rbp+var_11], al ja short loc_21C7A mov rax, [rbp+var_8] mov rax, [rax+20h] movzx eax, byte ptr [rax] cmp eax, 0FEh setnz al mov [rbp+var_11], al loc_21C7A: mov al, [rbp+var_11] test al, 1 jnz short loc_21C3C loc_21C81: add rsp, 20h pop rbp retn
char mthd_my_skip_result(long long a1, long long a2, long long a3, long long a4, int a5, int a6) { char result; // al bool v7; // [rsp+Fh] [rbp-11h] unsigned long long v8; // [rsp+10h] [rbp-10h] do { v8 = ma_net_safe_read(a1, a2, a3, a4, a5, a6); result = -1; if ( v8 == 0xFFFFFFFF ) break; v7 = 1; if ( v8 <= 8 ) v7 = **(unsigned __int8 **)(a1 + 32) != 254; result = v7; } while ( v7 ); return result; }
mthd_my_skip_result: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI LAB_00121c3c: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00120850 MOV qword ptr [RBP + -0x10],RAX MOV EAX,0xffffffff CMP qword ptr [RBP + -0x10],RAX JNZ 0x00121c56 JMP 0x00121c81 LAB_00121c56: JMP 0x00121c58 LAB_00121c58: MOV AL,0x1 CMP qword ptr [RBP + -0x10],0x8 MOV byte ptr [RBP + -0x11],AL JA 0x00121c7a MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x20] MOVZX EAX,byte ptr [RAX] CMP EAX,0xfe SETNZ AL MOV byte ptr [RBP + -0x11],AL LAB_00121c7a: MOV AL,byte ptr [RBP + -0x11] TEST AL,0x1 JNZ 0x00121c3c LAB_00121c81: ADD RSP,0x20 POP RBP RET
void mthd_my_skip_result(long param_1) { ulong uVar1; bool bVar2; do { uVar1 = ma_net_safe_read(param_1); if (uVar1 == 0xffffffff) { return; } bVar2 = true; if (uVar1 < 9) { bVar2 = **(char **)(param_1 + 0x20) != -2; } } while (bVar2); return; }
20,668
ma_control_file_write_and_force
eloqsql/storage/maria/ma_control_file.c
int ma_control_file_write_and_force(LSN last_checkpoint_lsn_arg, uint32 last_logno_arg, TrID max_trid_arg, uint8 recovery_failures_arg) { uchar buffer[CF_MAX_SIZE]; uint32 sum; my_bool no_need_sync; DBUG_ENTER("ma_control_file_write_and_force"); /* We don't need to sync if this is just an increase of recovery_failures: it's even good if that counter is not increased on disk in case of power or hardware failure (less false positives when removing logs). */ no_need_sync= ((last_checkpoint_lsn == last_checkpoint_lsn_arg) && (last_logno == last_logno_arg) && (max_trid_in_control_file == max_trid_arg) && (recovery_failures_arg > 0)); if (control_file_fd < 0) DBUG_RETURN(1); #ifndef DBUG_OFF if (maria_multi_threaded) translog_lock_handler_assert_owner(); #endif lsn_store(buffer + CF_LSN_OFFSET, last_checkpoint_lsn_arg); int4store(buffer + CF_FILENO_OFFSET, last_logno_arg); transid_store(buffer + CF_MAX_TRID_OFFSET, max_trid_arg); (buffer + CF_RECOV_FAIL_OFFSET)[0]= recovery_failures_arg; if (cf_changeable_size > CF_CHANGEABLE_TOTAL_SIZE) { /* More room than needed for us. Must be a newer version. Clear part which we cannot maintain, so that any future version notices we didn't maintain its extra data. */ uint zeroed= cf_changeable_size - CF_CHANGEABLE_TOTAL_SIZE; char msg[150]; bzero(buffer + CF_CHANGEABLE_TOTAL_SIZE, zeroed); my_snprintf(msg, sizeof(msg), "Control file must be from a newer version; zero-ing out %u" " unknown bytes in control file at offset %u", zeroed, cf_changeable_size + cf_create_time_size); ma_message_no_user(ME_WARNING, msg); } else { /* not enough room for what we need to store: enlarge */ cf_changeable_size= CF_CHANGEABLE_TOTAL_SIZE; } /* Note that the create-time portion is not touched */ /* Checksum is stored first */ compile_time_assert(CF_CHECKSUM_OFFSET == 0); sum= my_checksum(0, buffer + CF_CHECKSUM_SIZE, cf_changeable_size - CF_CHECKSUM_SIZE); int4store(buffer, sum); if (my_pwrite(control_file_fd, buffer, cf_changeable_size, cf_create_time_size, MYF(MY_FNABP | MY_WME)) || (!no_need_sync && mysql_file_sync(control_file_fd, MYF(MY_WME)))) DBUG_RETURN(1); last_checkpoint_lsn= last_checkpoint_lsn_arg; last_logno= last_logno_arg; max_trid_in_control_file= max_trid_arg; recovery_failures= recovery_failures_arg; cf_changeable_size= CF_CHANGEABLE_TOTAL_SIZE; /* no more warning */ DBUG_RETURN(0); }
O0
c
ma_control_file_write_and_force: pushq %rbp movq %rsp, %rbp subq $0x310, %rsp # imm = 0x310 movb %cl, %al movq %fs:0x28, %rcx movq %rcx, -0x8(%rbp) movq %rdi, -0x2c0(%rbp) movl %esi, -0x2c4(%rbp) movq %rdx, -0x2d0(%rbp) movb %al, -0x2d1(%rbp) movq 0x42991d(%rip), %rcx # 0x478168 xorl %eax, %eax cmpq -0x2c0(%rbp), %rcx movb %al, -0x309(%rbp) jne 0x4e89d movl 0x42990e(%rip), %ecx # 0x478170 xorl %eax, %eax cmpl -0x2c4(%rbp), %ecx movb %al, -0x309(%rbp) jne 0x4e89d movq 0x4298ff(%rip), %rcx # 0x478178 xorl %eax, %eax cmpq -0x2d0(%rbp), %rcx movb %al, -0x309(%rbp) jne 0x4e89d movzbl -0x2d1(%rbp), %eax cmpl $0x0, %eax setg %al movb %al, -0x309(%rbp) movb -0x309(%rbp), %al andb $0x1, %al movzbl %al, %eax movb %al, -0x2d9(%rbp) cmpl $0x0, 0x26eb0b(%rip) # 0x2bd3c0 jge 0x4e8c8 jmp 0x4e8b9 movl $0x1, -0x2b4(%rbp) jmp 0x4eb28 jmp 0x4e8ca jmp 0x4e8cc movq -0x2c0(%rbp), %rax sarq $0x20, %rax movb %al, -0x20c(%rbp) movq -0x2c0(%rbp), %rax sarq $0x20, %rax shrl $0x8, %eax movb %al, -0x20b(%rbp) movq -0x2c0(%rbp), %rax sarq $0x20, %rax shrl $0x10, %eax movb %al, -0x20a(%rbp) jmp 0x4e907 leaq -0x210(%rbp), %rax addq $0x4, %rax addq $0x3, %rax movq %rax, -0x2e8(%rbp) movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq -0x2c0(%rbp), %rax movl %eax, %ecx movq -0x2e8(%rbp), %rax movl %ecx, (%rax) jmp 0x4e93b jmp 0x4e93d leaq -0x210(%rbp), %rax addq $0xb, %rax movq %rax, -0x2f0(%rbp) movl -0x2c4(%rbp), %ecx movq -0x2f0(%rbp), %rax movl %ecx, (%rax) jmp 0x4e960 leaq -0x210(%rbp), %rax addq $0xf, %rax movq %rax, -0x2f8(%rbp) movq -0x2d0(%rbp), %rax movl %eax, %ecx movq -0x2f8(%rbp), %rax movl %ecx, (%rax) movq -0x2d0(%rbp), %rax shrq $0x20, %rax movw %ax, %cx movq -0x2f8(%rbp), %rax movw %cx, 0x4(%rax) movb -0x2d1(%rbp), %al movb %al, -0x1fb(%rbp) cmpl $0x16, 0x4297d8(%rip) # 0x478188 jbe 0x4ea2a movl 0x4297d0(%rip), %eax # 0x478188 subl $0x16, %eax movl %eax, -0x2fc(%rbp) leaq -0x210(%rbp), %rdi addq $0x16, %rdi movl -0x2fc(%rbp), %eax movl %eax, %edx xorl %esi, %esi callq 0x2a2c0 leaq -0x2b0(%rbp), %rdi movl -0x2fc(%rbp), %ecx movl 0x429799(%rip), %r8d # 0x478188 addl 0x42978e(%rip), %r8d # 0x478184 movl $0x96, %esi leaq 0x103132(%rip), %rdx # 0x151b34 movb $0x0, %al callq 0x14d300 leaq -0x2b0(%rbp), %rcx movl $0xa8, %edi leaq 0x10317e(%rip), %rsi # 0x151b9a movl $0x800, %edx # imm = 0x800 movb $0x0, %al callq 0xefc90 jmp 0x4ea34 movl $0x16, 0x429754(%rip) # 0x478188 jmp 0x4ea36 jmp 0x4ea38 leaq -0x210(%rbp), %rsi addq $0x4, %rsi movl 0x42973f(%rip), %eax # 0x478188 subl $0x4, %eax movl %eax, %eax movl %eax, %edx xorl %edi, %edi callq 0x1021d0 movl %eax, -0x2d8(%rbp) leaq -0x210(%rbp), %rax movq %rax, -0x308(%rbp) movl -0x2d8(%rbp), %ecx movq -0x308(%rbp), %rax movl %ecx, (%rax) movl 0x26e940(%rip), %edi # 0x2bd3c0 leaq -0x210(%rbp), %rsi movl 0x4296fb(%rip), %eax # 0x478188 movl %eax, %edx movl 0x4296ef(%rip), %eax # 0x478184 movl %eax, %ecx movl $0x12, %r8d callq 0xf4860 cmpq $0x0, %rax jne 0x4ead2 cmpb $0x0, -0x2d9(%rbp) jne 0x4eae0 movl 0x26e909(%rip), %edx # 0x2bd3c0 leaq 0x102e1d(%rip), %rdi # 0x1518db movl $0x22c, %esi # imm = 0x22C movl $0x10, %ecx callq 0x4eb60 cmpl $0x0, %eax je 0x4eae0 jmp 0x4ead4 movl $0x1, -0x2b4(%rbp) jmp 0x4eb28 movq -0x2c0(%rbp), %rax movq %rax, 0x42967a(%rip) # 0x478168 movl -0x2c4(%rbp), %eax movl %eax, 0x429676(%rip) # 0x478170 movq -0x2d0(%rbp), %rax movq %rax, 0x429670(%rip) # 0x478178 movb -0x2d1(%rbp), %al movb %al, 0x42966c(%rip) # 0x478180 movl $0x16, 0x42966a(%rip) # 0x478188 movl $0x0, -0x2b4(%rbp) movl -0x2b4(%rbp), %eax movl %eax, -0x310(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x4eb55 movl -0x310(%rbp), %eax addq $0x310, %rsp # imm = 0x310 popq %rbp retq callq 0x2a270 nopw (%rax,%rax)
ma_control_file_write_and_force: push rbp mov rbp, rsp sub rsp, 310h mov al, cl mov rcx, fs:28h mov [rbp+var_8], rcx mov [rbp+var_2C0], rdi mov [rbp+var_2C4], esi mov [rbp+var_2D0], rdx mov [rbp+var_2D1], al mov rcx, cs:last_checkpoint_lsn xor eax, eax cmp rcx, [rbp+var_2C0] mov [rbp+var_309], al jnz short loc_4E89D mov ecx, cs:last_logno xor eax, eax cmp ecx, [rbp+var_2C4] mov [rbp+var_309], al jnz short loc_4E89D mov rcx, cs:max_trid_in_control_file xor eax, eax cmp rcx, [rbp+var_2D0] mov [rbp+var_309], al jnz short loc_4E89D movzx eax, [rbp+var_2D1] cmp eax, 0 setnle al mov [rbp+var_309], al loc_4E89D: mov al, [rbp+var_309] and al, 1 movzx eax, al mov [rbp+var_2D9], al cmp cs:control_file_fd, 0 jge short loc_4E8C8 jmp short $+2 loc_4E8B9: mov [rbp+var_2B4], 1 jmp loc_4EB28 loc_4E8C8: jmp short $+2 loc_4E8CA: jmp short $+2 loc_4E8CC: mov rax, [rbp+var_2C0] sar rax, 20h mov [rbp+var_20C], al mov rax, [rbp+var_2C0] sar rax, 20h shr eax, 8 mov [rbp+var_20B], al mov rax, [rbp+var_2C0] sar rax, 20h shr eax, 10h mov [rbp+var_20A], al jmp short $+2 loc_4E907: lea rax, [rbp+var_210] add rax, 4 add rax, 3 mov [rbp+var_2E8], rax mov rax, 0FFFFFFFFh and rax, [rbp+var_2C0] mov ecx, eax mov rax, [rbp+var_2E8] mov [rax], ecx jmp short $+2 loc_4E93B: jmp short $+2 loc_4E93D: lea rax, [rbp+var_210] add rax, 0Bh mov [rbp+var_2F0], rax mov ecx, [rbp+var_2C4] mov rax, [rbp+var_2F0] mov [rax], ecx jmp short $+2 loc_4E960: lea rax, [rbp+var_210] add rax, 0Fh mov [rbp+var_2F8], rax mov rax, [rbp+var_2D0] mov ecx, eax mov rax, [rbp+var_2F8] mov [rax], ecx mov rax, [rbp+var_2D0] shr rax, 20h mov cx, ax mov rax, [rbp+var_2F8] mov [rax+4], cx mov al, [rbp+var_2D1] mov [rbp+var_1FB], al cmp cs:cf_changeable_size, 16h jbe short loc_4EA2A mov eax, cs:cf_changeable_size sub eax, 16h mov [rbp+var_2FC], eax lea rdi, [rbp+var_210] add rdi, 16h mov eax, [rbp+var_2FC] mov edx, eax xor esi, esi call _memset lea rdi, [rbp+var_2B0] mov ecx, [rbp+var_2FC] mov r8d, cs:cf_changeable_size add r8d, cs:cf_create_time_size mov esi, 96h lea rdx, aControlFileMus; "Control file must be from a newer versi"... mov al, 0 call my_snprintf lea rcx, [rbp+var_2B0] mov edi, 0A8h lea rsi, aAriaEngineS; "Aria engine: %s" mov edx, 800h mov al, 0 call my_printf_error jmp short loc_4EA34 loc_4EA2A: mov cs:cf_changeable_size, 16h loc_4EA34: jmp short $+2 loc_4EA36: jmp short $+2 loc_4EA38: lea rsi, [rbp+var_210] add rsi, 4 mov eax, cs:cf_changeable_size sub eax, 4 mov eax, eax mov edx, eax xor edi, edi call my_checksum mov [rbp+var_2D8], eax lea rax, [rbp+var_210] mov [rbp+var_308], rax mov ecx, [rbp+var_2D8] mov rax, [rbp+var_308] mov [rax], ecx mov edi, cs:control_file_fd lea rsi, [rbp+var_210] mov eax, cs:cf_changeable_size mov edx, eax mov eax, cs:cf_create_time_size mov ecx, eax mov r8d, 12h call my_pwrite cmp rax, 0 jnz short loc_4EAD2 cmp [rbp+var_2D9], 0 jnz short loc_4EAE0 mov edx, cs:control_file_fd lea rdi, aWorkspaceLlm4b_10; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 22Ch mov ecx, 10h call inline_mysql_file_sync_2 cmp eax, 0 jz short loc_4EAE0 loc_4EAD2: jmp short $+2 loc_4EAD4: mov [rbp+var_2B4], 1 jmp short loc_4EB28 loc_4EAE0: mov rax, [rbp+var_2C0] mov cs:last_checkpoint_lsn, rax mov eax, [rbp+var_2C4] mov cs:last_logno, eax mov rax, [rbp+var_2D0] mov cs:max_trid_in_control_file, rax mov al, [rbp+var_2D1] mov cs:recovery_failures, al mov cs:cf_changeable_size, 16h mov [rbp+var_2B4], 0 loc_4EB28: mov eax, [rbp+var_2B4] mov [rbp+var_310], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_4EB55 mov eax, [rbp+var_310] add rsp, 310h pop rbp retn loc_4EB55: call ___stack_chk_fail
long long ma_control_file_write_and_force(long long a1, int a2, long long a3, char a4) { int v4; // r9d int v5; // r8d int v6; // r9d bool v8; // [rsp+7h] [rbp-309h] int v9; // [rsp+14h] [rbp-2FCh] _BYTE v13[160]; // [rsp+60h] [rbp-2B0h] BYREF int v14; // [rsp+100h] [rbp-210h] BYREF __int16 v15; // [rsp+104h] [rbp-20Ch] BYREF char v16; // [rsp+106h] [rbp-20Ah] int v17; // [rsp+107h] [rbp-209h] int v18; // [rsp+10Bh] [rbp-205h] int v19; // [rsp+10Fh] [rbp-201h] __int16 v20; // [rsp+113h] [rbp-1FDh] char v21; // [rsp+115h] [rbp-1FBh] _BYTE v22[506]; // [rsp+116h] [rbp-1FAh] BYREF *(_QWORD *)&v22[498] = __readfsqword(0x28u); v8 = 0; if ( last_checkpoint_lsn == a1 ) { v8 = 0; if ( last_logno == a2 ) { v8 = 0; if ( max_trid_in_control_file == a3 ) v8 = a4 != 0; } } if ( control_file_fd >= 0 ) { v15 = WORD2(a1); v16 = BYTE6(a1); v17 = a1; v18 = a2; v19 = a3; v20 = WORD2(a3); v21 = a4; if ( (unsigned int)cf_changeable_size <= 0x16 ) { cf_changeable_size = 22; } else { v9 = cf_changeable_size - 22; memset(v22, 0LL, (unsigned int)(cf_changeable_size - 22)); my_snprintf( (unsigned int)v13, 150, (unsigned int)"Control file must be from a newer version; zero-ing out %u unknown bytes in control file at offset %u", v9, cf_create_time_size + cf_changeable_size, v4); my_printf_error(168, (unsigned int)"Aria engine: %s", 2048, (unsigned int)v13, v5, v6); } v14 = my_checksum(0LL, &v15, (unsigned int)(cf_changeable_size - 4)); if ( my_pwrite( (unsigned int)control_file_fd, &v14, (unsigned int)cf_changeable_size, (unsigned int)cf_create_time_size) || !v8 && (unsigned int)inline_mysql_file_sync_2( "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_control_file.c", 556LL, (unsigned int)control_file_fd, 16LL) ) { return 1; } else { last_checkpoint_lsn = a1; last_logno = a2; max_trid_in_control_file = a3; recovery_failures = a4; cf_changeable_size = 22; return 0; } } else { return 1; } }
ma_control_file_write_and_force: PUSH RBP MOV RBP,RSP SUB RSP,0x310 MOV AL,CL MOV RCX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RCX MOV qword ptr [RBP + -0x2c0],RDI MOV dword ptr [RBP + -0x2c4],ESI MOV qword ptr [RBP + -0x2d0],RDX MOV byte ptr [RBP + -0x2d1],AL MOV RCX,qword ptr [0x00578168] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x2c0] MOV byte ptr [RBP + -0x309],AL JNZ 0x0014e89d MOV ECX,dword ptr [0x00578170] XOR EAX,EAX CMP ECX,dword ptr [RBP + -0x2c4] MOV byte ptr [RBP + -0x309],AL JNZ 0x0014e89d MOV RCX,qword ptr [0x00578178] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x2d0] MOV byte ptr [RBP + -0x309],AL JNZ 0x0014e89d MOVZX EAX,byte ptr [RBP + -0x2d1] CMP EAX,0x0 SETG AL MOV byte ptr [RBP + -0x309],AL LAB_0014e89d: MOV AL,byte ptr [RBP + -0x309] AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x2d9],AL CMP dword ptr [0x003bd3c0],0x0 JGE 0x0014e8c8 JMP 0x0014e8b9 LAB_0014e8b9: MOV dword ptr [RBP + -0x2b4],0x1 JMP 0x0014eb28 LAB_0014e8c8: JMP 0x0014e8ca LAB_0014e8ca: JMP 0x0014e8cc LAB_0014e8cc: MOV RAX,qword ptr [RBP + -0x2c0] SAR RAX,0x20 MOV byte ptr [RBP + -0x20c],AL MOV RAX,qword ptr [RBP + -0x2c0] SAR RAX,0x20 SHR EAX,0x8 MOV byte ptr [RBP + -0x20b],AL MOV RAX,qword ptr [RBP + -0x2c0] SAR RAX,0x20 SHR EAX,0x10 MOV byte ptr [RBP + -0x20a],AL JMP 0x0014e907 LAB_0014e907: LEA RAX,[RBP + -0x210] ADD RAX,0x4 ADD RAX,0x3 MOV qword ptr [RBP + -0x2e8],RAX MOV RAX,0xffffffff AND RAX,qword ptr [RBP + -0x2c0] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x2e8] MOV dword ptr [RAX],ECX JMP 0x0014e93b LAB_0014e93b: JMP 0x0014e93d LAB_0014e93d: LEA RAX,[RBP + -0x210] ADD RAX,0xb MOV qword ptr [RBP + -0x2f0],RAX MOV ECX,dword ptr [RBP + -0x2c4] MOV RAX,qword ptr [RBP + -0x2f0] MOV dword ptr [RAX],ECX JMP 0x0014e960 LAB_0014e960: LEA RAX,[RBP + -0x210] ADD RAX,0xf MOV qword ptr [RBP + -0x2f8],RAX MOV RAX,qword ptr [RBP + -0x2d0] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x2f8] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x2d0] SHR RAX,0x20 MOV CX,AX MOV RAX,qword ptr [RBP + -0x2f8] MOV word ptr [RAX + 0x4],CX MOV AL,byte ptr [RBP + -0x2d1] MOV byte ptr [RBP + -0x1fb],AL CMP dword ptr [0x00578188],0x16 JBE 0x0014ea2a MOV EAX,dword ptr [0x00578188] SUB EAX,0x16 MOV dword ptr [RBP + -0x2fc],EAX LEA RDI,[RBP + -0x210] ADD RDI,0x16 MOV EAX,dword ptr [RBP + -0x2fc] MOV EDX,EAX XOR ESI,ESI CALL 0x0012a2c0 LEA RDI,[RBP + -0x2b0] MOV ECX,dword ptr [RBP + -0x2fc] MOV R8D,dword ptr [0x00578188] ADD R8D,dword ptr [0x00578184] MOV ESI,0x96 LEA RDX,[0x251b34] MOV AL,0x0 CALL 0x0024d300 LEA RCX,[RBP + -0x2b0] MOV EDI,0xa8 LEA RSI,[0x251b9a] MOV EDX,0x800 MOV AL,0x0 CALL 0x001efc90 JMP 0x0014ea34 LAB_0014ea2a: MOV dword ptr [0x00578188],0x16 LAB_0014ea34: JMP 0x0014ea36 LAB_0014ea36: JMP 0x0014ea38 LAB_0014ea38: LEA RSI,[RBP + -0x210] ADD RSI,0x4 MOV EAX,dword ptr [0x00578188] SUB EAX,0x4 MOV EAX,EAX MOV EDX,EAX XOR EDI,EDI CALL 0x002021d0 MOV dword ptr [RBP + -0x2d8],EAX LEA RAX,[RBP + -0x210] MOV qword ptr [RBP + -0x308],RAX MOV ECX,dword ptr [RBP + -0x2d8] MOV RAX,qword ptr [RBP + -0x308] MOV dword ptr [RAX],ECX MOV EDI,dword ptr [0x003bd3c0] LEA RSI,[RBP + -0x210] MOV EAX,dword ptr [0x00578188] MOV EDX,EAX MOV EAX,dword ptr [0x00578184] MOV ECX,EAX MOV R8D,0x12 CALL 0x001f4860 CMP RAX,0x0 JNZ 0x0014ead2 CMP byte ptr [RBP + -0x2d9],0x0 JNZ 0x0014eae0 MOV EDX,dword ptr [0x003bd3c0] LEA RDI,[0x2518db] MOV ESI,0x22c MOV ECX,0x10 CALL 0x0014eb60 CMP EAX,0x0 JZ 0x0014eae0 LAB_0014ead2: JMP 0x0014ead4 LAB_0014ead4: MOV dword ptr [RBP + -0x2b4],0x1 JMP 0x0014eb28 LAB_0014eae0: MOV RAX,qword ptr [RBP + -0x2c0] MOV qword ptr [0x00578168],RAX MOV EAX,dword ptr [RBP + -0x2c4] MOV dword ptr [0x00578170],EAX MOV RAX,qword ptr [RBP + -0x2d0] MOV qword ptr [0x00578178],RAX MOV AL,byte ptr [RBP + -0x2d1] MOV byte ptr [0x00578180],AL MOV dword ptr [0x00578188],0x16 MOV dword ptr [RBP + -0x2b4],0x0 LAB_0014eb28: MOV EAX,dword ptr [RBP + -0x2b4] MOV dword ptr [RBP + -0x310],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0014eb55 MOV EAX,dword ptr [RBP + -0x310] ADD RSP,0x310 POP RBP RET LAB_0014eb55: CALL 0x0012a270
int4 ma_control_file_write_and_force(long param_1,int param_2,long param_3,char param_4) { bool bVar1; uint uVar2; int iVar3; long lVar4; long in_FS_OFFSET; int4 local_2bc; int1 local_2b8 [160]; int4 local_218; int1 local_214; int1 local_213; int1 local_212; int4 local_211; int local_20d; int4 local_209; int2 local_205; char local_203; int1 auStack_202 [498]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); bVar1 = false; if (((last_checkpoint_lsn == param_1) && (bVar1 = false, last_logno == param_2)) && (bVar1 = false, max_trid_in_control_file == param_3)) { bVar1 = param_4 != '\0'; } if (control_file_fd < 0) { local_2bc = 1; goto LAB_0014eb28; } local_214 = (int1)((ulong)param_1 >> 0x20); local_213 = (int1)((ulong)param_1 >> 0x28); local_212 = (int1)((ulong)param_1 >> 0x30); local_211 = (int4)param_1; local_209 = (int4)param_3; local_205 = (int2)((ulong)param_3 >> 0x20); local_203 = param_4; local_20d = param_2; if (cf_changeable_size < 0x17) { cf_changeable_size = 0x16; } else { uVar2 = cf_changeable_size - 0x16; memset(auStack_202,0,(ulong)uVar2); my_snprintf(local_2b8,0x96, "Control file must be from a newer version; zero-ing out %u unknown bytes in control file at offset %u" ,uVar2,cf_changeable_size + cf_create_time_size); my_printf_error(0xa8,"Aria engine: %s",0x800,local_2b8); } local_218 = my_checksum(0,&local_214,cf_changeable_size - 4); lVar4 = my_pwrite(control_file_fd,&local_218,cf_changeable_size,cf_create_time_size,0x12); if (lVar4 == 0) { if (!bVar1) { iVar3 = inline_mysql_file_sync ("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_control_file.c", 0x22c,control_file_fd,0x10); if (iVar3 != 0) goto LAB_0014ead2; } cf_changeable_size = 0x16; local_2bc = 0; last_checkpoint_lsn = param_1; last_logno = param_2; max_trid_in_control_file = param_3; recovery_failures = param_4; } else { LAB_0014ead2: local_2bc = 1; } LAB_0014eb28: if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_2bc; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
20,669
my_hash_iterate
eloqsql/mysys/hash.c
my_bool my_hash_iterate(HASH *hash, my_hash_walk_action action, void *argument) { uint records, i; records= hash->records; for (i= 0 ; i < records ; i++) { if ((*action)(dynamic_element(&hash->array, i, HASH_LINK *)->data, argument)) return 1; } return 0; }
O3
c
my_hash_iterate: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl 0x18(%rdi), %r12d testq %r12, %r12 je 0x2a63c movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 shlq $0x4, %r12 xorl %r13d, %r13d movq 0x28(%r15), %rax movq 0x8(%rax,%r13), %rdi movq %rbx, %rsi callq *%r14 testb %al, %al jne 0x2a640 addq $0x10, %r13 cmpq %r13, %r12 jne 0x2a620 xorl %eax, %eax jmp 0x2a642 movb $0x1, %al addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nopl (%rax)
my_hash_iterate: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r12d, [rdi+18h] test r12, r12 jz short loc_2A63C mov rbx, rdx mov r14, rsi mov r15, rdi shl r12, 4 xor r13d, r13d loc_2A620: mov rax, [r15+28h] mov rdi, [rax+r13+8] mov rsi, rbx call r14 test al, al jnz short loc_2A640 add r13, 10h cmp r12, r13 jnz short loc_2A620 loc_2A63C: xor eax, eax jmp short loc_2A642 loc_2A640: mov al, 1 loc_2A642: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char my_hash_iterate(long long a1, unsigned __int8 ( *a2)(_QWORD, long long), long long a3) { long long v4; // r12 long long v5; // r13 if ( !*(_DWORD *)(a1 + 24) ) return 0; v4 = 16LL * *(unsigned int *)(a1 + 24); v5 = 0LL; while ( !a2(*(_QWORD *)(*(_QWORD *)(a1 + 40) + v5 + 8), a3) ) { v5 += 16LL; if ( v4 == v5 ) return 0; } return 1; }
my_hash_iterate: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R12D,dword ptr [RDI + 0x18] TEST R12,R12 JZ 0x0012a63c MOV RBX,RDX MOV R14,RSI MOV R15,RDI SHL R12,0x4 XOR R13D,R13D LAB_0012a620: MOV RAX,qword ptr [R15 + 0x28] MOV RDI,qword ptr [RAX + R13*0x1 + 0x8] MOV RSI,RBX CALL R14 TEST AL,AL JNZ 0x0012a640 ADD R13,0x10 CMP R12,R13 JNZ 0x0012a620 LAB_0012a63c: XOR EAX,EAX JMP 0x0012a642 LAB_0012a640: MOV AL,0x1 LAB_0012a642: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 my_hash_iterate(long param_1,code *param_2,int8 param_3) { uint uVar1; char cVar2; long lVar3; uVar1 = *(uint *)(param_1 + 0x18); if ((ulong)uVar1 != 0) { lVar3 = 0; do { cVar2 = (*param_2)(*(int8 *)(*(long *)(param_1 + 0x28) + 8 + lVar3),param_3); if (cVar2 != '\0') { return 1; } lVar3 = lVar3 + 0x10; } while ((ulong)uVar1 << 4 != lVar3); } return 0; }
20,670
mysql_stmt_prepare_cont
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_stmt_prepare_cont(int *ret, MYSQL_STMT *stmt, int ready_status) { MK_ASYNC_CONT_BODY( stmt->mysql, 1, r_int) }
O3
c
mysql_stmt_prepare_cont: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq 0x38(%rsi), %rax movq 0x480(%rax), %rcx movq 0x28(%rcx), %r15 cmpb $0x0, 0x15(%r15) je 0x893d9 movb $0x1, 0x14(%r15) movl %edx, 0x4(%r15) leaq 0x38(%r15), %rdi callq 0x8aefb movb $0x0, 0x14(%r15) testl %eax, %eax jle 0x8943f movl (%r15), %r15d jmp 0x894b8 movl $0x7de, 0x90(%rax) # imm = 0x7DE movl $0x297, %edi # imm = 0x297 addq 0x38(%r14), %rdi leaq 0x35bb2d(%rip), %rax # 0x3e4f20 movq (%rax), %rsi movl $0x5, %edx callq 0x5f180 movq 0x38(%r14), %rax xorl %r15d, %r15d movb %r15b, 0x29c(%rax) movl $0x97, %edi addq 0x38(%r14), %rdi leaq 0x35bb12(%rip), %rax # 0x3e4f30 movq 0x70(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x5f180 movq 0x38(%r14), %rax movb %r15b, 0x296(%rax) movl $0x1, (%rbx) jmp 0x894b8 movb $0x0, 0x15(%r15) js 0x8944c movl 0x8(%r15), %eax jmp 0x894b3 movq 0x38(%r14), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movl $0x297, %edi # imm = 0x297 addq 0x38(%r14), %rdi leaq 0x35bab6(%rip), %rax # 0x3e4f20 movq (%rax), %rsi movl $0x5, %edx callq 0x5f180 movq 0x38(%r14), %rax xorl %r15d, %r15d movb %r15b, 0x29c(%rax) movl $0x97, %edi addq 0x38(%r14), %rdi leaq 0x35ba9b(%rip), %rax # 0x3e4f30 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x5f180 movq 0x38(%r14), %rax movb %r15b, 0x296(%rax) movl $0x1, %eax movl %eax, (%rbx) xorl %r15d, %r15d movl %r15d, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
mysql_stmt_prepare_cont: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, rsi mov rbx, rdi mov rax, [rsi+38h] mov rcx, [rax+480h] mov r15, [rcx+28h] cmp byte ptr [r15+15h], 0 jz short loc_893D9 mov byte ptr [r15+14h], 1 mov [r15+4], edx lea rdi, [r15+38h] call my_context_continue mov byte ptr [r15+14h], 0 test eax, eax jle short loc_8943F mov r15d, [r15] jmp loc_894B8 loc_893D9: mov dword ptr [rax+90h], 7DEh mov edi, 297h add rdi, [r14+38h] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [r14+38h] xor r15d, r15d mov [rax+29Ch], r15b mov edi, 97h add rdi, [r14+38h] lea rax, client_errors mov rsi, [rax+70h] mov edx, 1FFh call _strncpy mov rax, [r14+38h] mov [rax+296h], r15b mov dword ptr [rbx], 1 jmp short loc_894B8 loc_8943F: mov byte ptr [r15+15h], 0 js short loc_8944C mov eax, [r15+8] jmp short loc_894B3 loc_8944C: mov rax, [r14+38h] mov dword ptr [rax+90h], 7D8h mov edi, 297h add rdi, [r14+38h] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [r14+38h] xor r15d, r15d mov [rax+29Ch], r15b mov edi, 97h add rdi, [r14+38h] lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy mov rax, [r14+38h] mov [rax+296h], r15b mov eax, 1 loc_894B3: mov [rbx], eax xor r15d, r15d loc_894B8: mov eax, r15d add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long mysql_stmt_prepare_cont(int *a1, long long a2, unsigned int a3) { long long v3; // rax unsigned int *v4; // r15 int v5; // eax unsigned int v6; // r15d int v7; // eax v3 = *(_QWORD *)(a2 + 56); v4 = *(unsigned int **)(*(_QWORD *)(v3 + 1152) + 40LL); if ( *((_BYTE *)v4 + 21) ) { *((_BYTE *)v4 + 20) = 1; v4[1] = a3; v5 = my_context_continue(v4 + 14); *((_BYTE *)v4 + 20) = 0; if ( v5 <= 0 ) { *((_BYTE *)v4 + 21) = 0; if ( v5 < 0 ) { *(_DWORD *)(*(_QWORD *)(a2 + 56) + 144LL) = 2008; strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[8], 511LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0; v7 = 1; } else { v7 = v4[2]; } *a1 = v7; return 0; } else { return *v4; } } else { *(_DWORD *)(v3 + 144) = 2014; strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); v6 = 0; *(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[14], 511LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0; *a1 = 1; } return v6; }
mysql_stmt_prepare_cont: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr [RSI + 0x38] MOV RCX,qword ptr [RAX + 0x480] MOV R15,qword ptr [RCX + 0x28] CMP byte ptr [R15 + 0x15],0x0 JZ 0x001893d9 MOV byte ptr [R15 + 0x14],0x1 MOV dword ptr [R15 + 0x4],EDX LEA RDI,[R15 + 0x38] CALL 0x0018aefb MOV byte ptr [R15 + 0x14],0x0 TEST EAX,EAX JLE 0x0018943f MOV R15D,dword ptr [R15] JMP 0x001894b8 LAB_001893d9: MOV dword ptr [RAX + 0x90],0x7de MOV EDI,0x297 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x4e4f20] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x0015f180 MOV RAX,qword ptr [R14 + 0x38] XOR R15D,R15D MOV byte ptr [RAX + 0x29c],R15B MOV EDI,0x97 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x4e4f30] MOV RSI,qword ptr [RAX + 0x70] MOV EDX,0x1ff CALL 0x0015f180 MOV RAX,qword ptr [R14 + 0x38] MOV byte ptr [RAX + 0x296],R15B MOV dword ptr [RBX],0x1 JMP 0x001894b8 LAB_0018943f: MOV byte ptr [R15 + 0x15],0x0 JS 0x0018944c MOV EAX,dword ptr [R15 + 0x8] JMP 0x001894b3 LAB_0018944c: MOV RAX,qword ptr [R14 + 0x38] MOV dword ptr [RAX + 0x90],0x7d8 MOV EDI,0x297 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x4e4f20] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x0015f180 MOV RAX,qword ptr [R14 + 0x38] XOR R15D,R15D MOV byte ptr [RAX + 0x29c],R15B MOV EDI,0x97 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x4e4f30] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x0015f180 MOV RAX,qword ptr [R14 + 0x38] MOV byte ptr [RAX + 0x296],R15B MOV EAX,0x1 LAB_001894b3: MOV dword ptr [RBX],EAX XOR R15D,R15D LAB_001894b8: MOV EAX,R15D ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int4 mysql_stmt_prepare_cont(int4 *param_1,long param_2,int4 param_3) { int4 *puVar1; int iVar2; int4 uVar3; puVar1 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28); if (*(char *)((long)puVar1 + 0x15) == '\0') { *(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7de; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); uVar3 = 0; *(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97), PTR_s_Commands_out_of_sync__you_can_t_r_004e4fa0,0x1ff); *(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0; *param_1 = 1; } else { *(int1 *)(puVar1 + 5) = 1; puVar1[1] = param_3; iVar2 = my_context_continue(puVar1 + 0xe); *(int1 *)(puVar1 + 5) = 0; if (iVar2 < 1) { *(int1 *)((long)puVar1 + 0x15) = 0; if (iVar2 < 0) { *(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7d8; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_004e4f70, 0x1ff); *(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0; uVar3 = 1; } else { uVar3 = puVar1[2]; } *param_1 = uVar3; uVar3 = 0; } else { uVar3 = *puVar1; } } return uVar3; }
20,671
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> google::protobuf::Join<std::vector<int, std::allocator<int>>>(std::vector<int, std::allocator<int>> const&, char const*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/stubs/strutil.h
std::string Join(const Range& components, const char* delim) { std::string result; Join(components.begin(), components.end(), delim, &result); return result; }
O3
c
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> google::protobuf::Join<std::vector<int, std::allocator<int>>>(std::vector<int, std::allocator<int>> const&, char const*): pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx leaq 0x10(%rdi), %r15 movq %r15, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq (%rsi), %rdi movq 0x8(%rsi), %rsi movq %rbx, %rcx callq 0xe4a84 movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq (%rbx), %rdi cmpq %r15, %rdi je 0xe04e9 callq 0x2d160 movq %r14, %rdi callq 0x2e220 nop
_ZN6google8protobuf4JoinISt6vectorIiSaIiEEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_PKc: push r15 push r14 push rbx mov rbx, rdi lea r15, [rdi+10h] mov [rdi], r15 mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, [rsi] mov rsi, [rsi+8] mov rcx, rbx call _ZN6google8protobuf4JoinIN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEEEEvT_SA_PKcPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::Join<__gnu_cxx::__normal_iterator<int const*,std::vector<int>>>(__gnu_cxx::__normal_iterator<int const*,std::vector<int>>,__gnu_cxx::__normal_iterator<int const*,std::vector<int>>,char const*,std::string *) mov rax, rbx pop rbx pop r14 pop r15 retn mov r14, rax mov rdi, [rbx]; void * cmp rdi, r15 jz short loc_E04E9 call __ZdlPv; operator delete(void *) loc_E04E9: mov rdi, r14 call __Unwind_Resume
long long google::protobuf::Join<std::vector<int>>(long long a1, _QWORD *a2, long long a3) { *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; google::protobuf::Join<__gnu_cxx::__normal_iterator<int const*,std::vector<int>>>(*a2, a2[1], a3, a1); return a1; }
Join<std::vector<int,std::allocator<int>>>: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDI LEA R15,[RDI + 0x10] MOV qword ptr [RDI],R15 MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 MOV RDI,qword ptr [RSI] MOV RSI,qword ptr [RSI + 0x8] LAB_001e04c8: MOV RCX,RBX CALL 0x001e4a84 LAB_001e04d0: MOV RAX,RBX POP RBX POP R14 POP R15 RET
/* std::__cxx11::string google::protobuf::Join<std::vector<int, std::allocator<int> > >(std::vector<int, std::allocator<int> > const&, char const*) */ protobuf * __thiscall google::protobuf::Join<std::vector<int,std::allocator<int>>> (protobuf *this,vector *param_1,char *param_2) { *(protobuf **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (protobuf)0x0; /* try { // try from 001e04c8 to 001e04cf has its CatchHandler @ 001e04d9 */ Join<__gnu_cxx::__normal_iterator<int_const*,std::vector<int,std::allocator<int>>>> (*(int8 *)param_1,*(int8 *)(param_1 + 8),param_2,this); return this; }
20,672
get_charset_by_csname
eloqsql/mysys/charset.c
CHARSET_INFO * get_charset_by_csname(const char *cs_name, uint cs_flags, myf flags) { MY_CHARSET_LOADER loader; my_charset_loader_init_mysys(&loader); return my_charset_get_by_name(&loader, cs_name, cs_flags, flags); }
O3
c
get_charset_by_csname: pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %rdx, %rcx movl %esi, %edx movq %rdi, %rsi movq %fs:0x28, %rax movq %rax, -0x8(%rbp) leaq -0xb8(%rbp), %rdi movb $0x0, (%rdi) leaq -0x1249(%rip), %rax # 0x276ae movq %rax, 0x80(%rdi) leaq -0x1248(%rip), %rax # 0x276bd movq %rax, 0x88(%rdi) leaq -0x123b(%rip), %rax # 0x276d8 movq %rax, 0x90(%rdi) leaq 0x2b55(%rip), %rax # 0x2b476 movq %rax, 0x98(%rdi) leaq 0x2c6f11(%rip), %rax # 0x2ef840 movq (%rax), %rax movq %rax, 0xa0(%rdi) leaq -0x124a(%rip), %rax # 0x276f6 movq %rax, 0xa8(%rdi) callq 0x287f0 movq %fs:0x28, %rcx cmpq -0x8(%rbp), %rcx jne 0x28964 addq $0xc0, %rsp popq %rbp retq callq 0x24380
get_charset_by_csname: push rbp mov rbp, rsp sub rsp, 0C0h mov rcx, rdx mov edx, esi mov rsi, rdi mov rax, fs:28h mov [rbp+var_8], rax lea rdi, [rbp+var_B8] mov byte ptr [rdi], 0 lea rax, my_once_alloc_c mov [rdi+80h], rax lea rax, my_malloc_c mov [rdi+88h], rax lea rax, my_realloc_c mov [rdi+90h], rax lea rax, my_free mov [rdi+98h], rax lea rax, my_charset_error_reporter mov rax, [rax] mov [rdi+0A0h], rax lea rax, add_collation mov [rdi+0A8h], rax call my_charset_get_by_name mov rcx, fs:28h cmp rcx, [rbp+var_8] jnz short loc_28964 add rsp, 0C0h pop rbp retn loc_28964: call ___stack_chk_fail
long long get_charset_by_csname(long long a1, unsigned int a2, long long a3) { _BYTE v4[128]; // [rsp+8h] [rbp-B8h] BYREF long long ( *v5)(long long); // [rsp+88h] [rbp-38h] long long ( *v6)(long long); // [rsp+90h] [rbp-30h] long long ( *v7)(long long, long long); // [rsp+98h] [rbp-28h] long long ( *v8)(); // [rsp+A0h] [rbp-20h] long long ( *v9)(); // [rsp+A8h] [rbp-18h] long long ( *v10)(unsigned int *); // [rsp+B0h] [rbp-10h] unsigned long long v11; // [rsp+B8h] [rbp-8h] v11 = __readfsqword(0x28u); v4[0] = 0; v5 = my_once_alloc_c; v6 = my_malloc_c; v7 = my_realloc_c; v8 = my_free; v9 = my_charset_error_reporter; v10 = add_collation; return my_charset_get_by_name((long long)v4, a1, a2, a3); }
get_charset_by_csname: PUSH RBP MOV RBP,RSP SUB RSP,0xc0 MOV RCX,RDX MOV EDX,ESI MOV RSI,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX LEA RDI,[RBP + -0xb8] MOV byte ptr [RDI],0x0 LEA RAX,[0x1276ae] MOV qword ptr [RDI + 0x80],RAX LEA RAX,[0x1276bd] MOV qword ptr [RDI + 0x88],RAX LEA RAX,[0x1276d8] MOV qword ptr [RDI + 0x90],RAX LEA RAX,[0x12b476] MOV qword ptr [RDI + 0x98],RAX LEA RAX,[0x3ef840] MOV RAX,qword ptr [RAX] MOV qword ptr [RDI + 0xa0],RAX LEA RAX,[0x1276f6] MOV qword ptr [RDI + 0xa8],RAX CALL 0x001287f0 MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x8] JNZ 0x00128964 ADD RSP,0xc0 POP RBP RET LAB_00128964: CALL 0x00124380
void get_charset_by_csname(int8 param_1,int4 param_2,int8 param_3) { long in_FS_OFFSET; int1 local_c0 [128]; code *local_40; code *local_38; code *local_30; code *local_28; int *local_20; code *local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_c0[0] = 0; local_40 = my_once_alloc_c; local_38 = my_malloc_c; local_30 = my_realloc_c; local_28 = my_free; local_20 = my_charset_error_reporter; local_18 = add_collation; my_charset_get_by_name(local_c0,param_1,param_2,param_3); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
20,673
my_strntoull_8bit
eloqsql/strings/ctype-simple.c
ulonglong my_strntoull_8bit(CHARSET_INFO *cs, const char *nptr, size_t l, int base, char **endptr, int *err) { int negative; register ulonglong cutoff; register uint cutlim; register ulonglong i; register const char *s, *e; const char *save; int overflow; *err= 0; /* Initialize error indicator */ s = nptr; e = nptr+l; for(; s<e && my_isspace(cs,*s); s++); if (s == e) { goto noconv; } if (*s == '-') { negative = 1; ++s; } else if (*s == '+') { negative = 0; ++s; } else negative = 0; save = s; cutoff = (~(ulonglong) 0) / (unsigned long int) base; cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base); overflow = 0; i = 0; for ( ; s != e; s++) { register uchar c= *s; if (c>='0' && c<='9') c -= '0'; else if (c>='A' && c<='Z') c = c - 'A' + 10; else if (c>='a' && c<='z') c = c - 'a' + 10; else break; if (c >= base) break; if (i > cutoff || (i == cutoff && c > cutlim)) overflow = 1; else { i *= (ulonglong) base; i += c; } } if (s == save) goto noconv; if (endptr != NULL) *endptr = (char *) s; if (overflow) { err[0]= ERANGE; return (~(ulonglong) 0); } return (negative ? -((longlong) i) : (longlong) i); noconv: err[0]= EDOM; if (endptr != NULL) *endptr = (char *) nptr; return 0L; }
O0
c
my_strntoull_8bit: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) movq -0x38(%rbp), %rax movl $0x0, (%rax) movq -0x18(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x18(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x60(%rbp), %rcx xorl %eax, %eax cmpq -0x68(%rbp), %rcx movb %al, -0x76(%rbp) jae 0x954a8 movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq -0x60(%rbp), %rcx movzbl (%rcx), %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x8, %eax cmpl $0x0, %eax setne %al movb %al, -0x76(%rbp) movb -0x76(%rbp), %al testb $0x1, %al jne 0x954b1 jmp 0x954c1 jmp 0x954b3 movq -0x60(%rbp), %rax addq $0x1, %rax movq %rax, -0x60(%rbp) jmp 0x95479 movq -0x60(%rbp), %rax cmpq -0x68(%rbp), %rax jne 0x954d0 jmp 0x95691 movq -0x60(%rbp), %rax movsbl (%rax), %eax cmpl $0x2d, %eax jne 0x954f1 movl $0x1, -0x3c(%rbp) movq -0x60(%rbp), %rax addq $0x1, %rax movq %rax, -0x60(%rbp) jmp 0x9551b movq -0x60(%rbp), %rax movsbl (%rax), %eax cmpl $0x2b, %eax jne 0x95512 movl $0x0, -0x3c(%rbp) movq -0x60(%rbp), %rax addq $0x1, %rax movq %rax, -0x60(%rbp) jmp 0x95519 movl $0x0, -0x3c(%rbp) jmp 0x9551b movq -0x60(%rbp), %rax movq %rax, -0x70(%rbp) movslq -0x24(%rbp), %rcx movq $-0x1, %rax xorl %edx, %edx divq %rcx movq %rax, -0x48(%rbp) movslq -0x24(%rbp), %rcx movq $-0x1, %rax xorl %edx, %edx divq %rcx movl %edx, %eax movl %eax, -0x4c(%rbp) movl $0x0, -0x74(%rbp) movq $0x0, -0x58(%rbp) movq -0x60(%rbp), %rax cmpq -0x68(%rbp), %rax je 0x95635 movq -0x60(%rbp), %rax movb (%rax), %al movb %al, -0x75(%rbp) movzbl -0x75(%rbp), %eax cmpl $0x30, %eax jl 0x95590 movzbl -0x75(%rbp), %eax cmpl $0x39, %eax jg 0x95590 movzbl -0x75(%rbp), %eax subl $0x30, %eax movb %al, -0x75(%rbp) jmp 0x955d8 movzbl -0x75(%rbp), %eax cmpl $0x41, %eax jl 0x955b1 movzbl -0x75(%rbp), %eax cmpl $0x5a, %eax jg 0x955b1 movzbl -0x75(%rbp), %eax subl $0x41, %eax addl $0xa, %eax movb %al, -0x75(%rbp) jmp 0x955d6 movzbl -0x75(%rbp), %eax cmpl $0x61, %eax jl 0x955d2 movzbl -0x75(%rbp), %eax cmpl $0x7a, %eax jg 0x955d2 movzbl -0x75(%rbp), %eax subl $0x61, %eax addl $0xa, %eax movb %al, -0x75(%rbp) jmp 0x955d4 jmp 0x95635 jmp 0x955d6 jmp 0x955d8 movzbl -0x75(%rbp), %eax cmpl -0x24(%rbp), %eax jl 0x955e3 jmp 0x95635 movq -0x58(%rbp), %rax cmpq -0x48(%rbp), %rax ja 0x95600 movq -0x58(%rbp), %rax cmpq -0x48(%rbp), %rax jne 0x95609 movzbl -0x75(%rbp), %eax cmpl -0x4c(%rbp), %eax jbe 0x95609 movl $0x1, -0x74(%rbp) jmp 0x95622 movslq -0x24(%rbp), %rax imulq -0x58(%rbp), %rax movq %rax, -0x58(%rbp) movzbl -0x75(%rbp), %eax addq -0x58(%rbp), %rax movq %rax, -0x58(%rbp) jmp 0x95624 movq -0x60(%rbp), %rax addq $0x1, %rax movq %rax, -0x60(%rbp) jmp 0x9555b movq -0x60(%rbp), %rax cmpq -0x70(%rbp), %rax jne 0x95641 jmp 0x95691 cmpq $0x0, -0x30(%rbp) je 0x95653 movq -0x60(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) cmpl $0x0, -0x74(%rbp) je 0x9566d movq -0x38(%rbp), %rax movl $0x22, (%rax) movq $-0x1, -0x8(%rbp) jmp 0x956b5 cmpl $0x0, -0x3c(%rbp) je 0x9567f xorl %eax, %eax subq -0x58(%rbp), %rax movq %rax, -0x80(%rbp) jmp 0x95687 movq -0x58(%rbp), %rax movq %rax, -0x80(%rbp) movq -0x80(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x956b5 movq -0x38(%rbp), %rax movl $0x21, (%rax) cmpq $0x0, -0x30(%rbp) je 0x956ad movq -0x18(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq nopl (%rax,%rax)
my_strntoull_8bit: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov [rbp+var_30], r8 mov [rbp+var_38], r9 mov rax, [rbp+var_38] mov dword ptr [rax], 0 mov rax, [rbp+var_18] mov [rbp+var_60], rax mov rax, [rbp+var_18] add rax, [rbp+var_20] mov [rbp+var_68], rax loc_95479: mov rcx, [rbp+var_60] xor eax, eax cmp rcx, [rbp+var_68] mov [rbp+var_76], al jnb short loc_954A8 mov rax, [rbp+var_10] mov rax, [rax+40h] mov rcx, [rbp+var_60] movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx+1] and eax, 8 cmp eax, 0 setnz al mov [rbp+var_76], al loc_954A8: mov al, [rbp+var_76] test al, 1 jnz short loc_954B1 jmp short loc_954C1 loc_954B1: jmp short $+2 loc_954B3: mov rax, [rbp+var_60] add rax, 1 mov [rbp+var_60], rax jmp short loc_95479 loc_954C1: mov rax, [rbp+var_60] cmp rax, [rbp+var_68] jnz short loc_954D0 jmp loc_95691 loc_954D0: mov rax, [rbp+var_60] movsx eax, byte ptr [rax] cmp eax, 2Dh ; '-' jnz short loc_954F1 mov [rbp+var_3C], 1 mov rax, [rbp+var_60] add rax, 1 mov [rbp+var_60], rax jmp short loc_9551B loc_954F1: mov rax, [rbp+var_60] movsx eax, byte ptr [rax] cmp eax, 2Bh ; '+' jnz short loc_95512 mov [rbp+var_3C], 0 mov rax, [rbp+var_60] add rax, 1 mov [rbp+var_60], rax jmp short loc_95519 loc_95512: mov [rbp+var_3C], 0 loc_95519: jmp short $+2 loc_9551B: mov rax, [rbp+var_60] mov [rbp+var_70], rax movsxd rcx, [rbp+var_24] mov rax, 0FFFFFFFFFFFFFFFFh xor edx, edx div rcx mov [rbp+var_48], rax movsxd rcx, [rbp+var_24] mov rax, 0FFFFFFFFFFFFFFFFh xor edx, edx div rcx mov eax, edx mov [rbp+var_4C], eax mov [rbp+var_74], 0 mov [rbp+var_58], 0 loc_9555B: mov rax, [rbp+var_60] cmp rax, [rbp+var_68] jz loc_95635 mov rax, [rbp+var_60] mov al, [rax] mov [rbp+var_75], al movzx eax, [rbp+var_75] cmp eax, 30h ; '0' jl short loc_95590 movzx eax, [rbp+var_75] cmp eax, 39h ; '9' jg short loc_95590 movzx eax, [rbp+var_75] sub eax, 30h ; '0' mov [rbp+var_75], al jmp short loc_955D8 loc_95590: movzx eax, [rbp+var_75] cmp eax, 41h ; 'A' jl short loc_955B1 movzx eax, [rbp+var_75] cmp eax, 5Ah ; 'Z' jg short loc_955B1 movzx eax, [rbp+var_75] sub eax, 41h ; 'A' add eax, 0Ah mov [rbp+var_75], al jmp short loc_955D6 loc_955B1: movzx eax, [rbp+var_75] cmp eax, 61h ; 'a' jl short loc_955D2 movzx eax, [rbp+var_75] cmp eax, 7Ah ; 'z' jg short loc_955D2 movzx eax, [rbp+var_75] sub eax, 61h ; 'a' add eax, 0Ah mov [rbp+var_75], al jmp short loc_955D4 loc_955D2: jmp short loc_95635 loc_955D4: jmp short $+2 loc_955D6: jmp short $+2 loc_955D8: movzx eax, [rbp+var_75] cmp eax, [rbp+var_24] jl short loc_955E3 jmp short loc_95635 loc_955E3: mov rax, [rbp+var_58] cmp rax, [rbp+var_48] ja short loc_95600 mov rax, [rbp+var_58] cmp rax, [rbp+var_48] jnz short loc_95609 movzx eax, [rbp+var_75] cmp eax, [rbp+var_4C] jbe short loc_95609 loc_95600: mov [rbp+var_74], 1 jmp short loc_95622 loc_95609: movsxd rax, [rbp+var_24] imul rax, [rbp+var_58] mov [rbp+var_58], rax movzx eax, [rbp+var_75] add rax, [rbp+var_58] mov [rbp+var_58], rax loc_95622: jmp short $+2 loc_95624: mov rax, [rbp+var_60] add rax, 1 mov [rbp+var_60], rax jmp loc_9555B loc_95635: mov rax, [rbp+var_60] cmp rax, [rbp+var_70] jnz short loc_95641 jmp short loc_95691 loc_95641: cmp [rbp+var_30], 0 jz short loc_95653 mov rcx, [rbp+var_60] mov rax, [rbp+var_30] mov [rax], rcx loc_95653: cmp [rbp+var_74], 0 jz short loc_9566D mov rax, [rbp+var_38] mov dword ptr [rax], 22h ; '"' mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp short loc_956B5 loc_9566D: cmp [rbp+var_3C], 0 jz short loc_9567F xor eax, eax sub rax, [rbp+var_58] mov [rbp+var_80], rax jmp short loc_95687 loc_9567F: mov rax, [rbp+var_58] mov [rbp+var_80], rax loc_95687: mov rax, [rbp+var_80] mov [rbp+var_8], rax jmp short loc_956B5 loc_95691: mov rax, [rbp+var_38] mov dword ptr [rax], 21h ; '!' cmp [rbp+var_30], 0 jz short loc_956AD mov rcx, [rbp+var_18] mov rax, [rbp+var_30] mov [rax], rcx loc_956AD: mov [rbp+var_8], 0 loc_956B5: mov rax, [rbp+var_8] pop rbp retn
long long my_strntoull_8bit(long long a1, _BYTE *a2, long long a3, int a4, _QWORD *a5, _DWORD *a6) { bool v8; // [rsp+Ah] [rbp-76h] unsigned __int8 v9; // [rsp+Bh] [rbp-75h] unsigned __int8 v10; // [rsp+Bh] [rbp-75h] int v11; // [rsp+Ch] [rbp-74h] _BYTE *v12; // [rsp+10h] [rbp-70h] _BYTE *v13; // [rsp+18h] [rbp-68h] _BYTE *v14; // [rsp+20h] [rbp-60h] unsigned long long v15; // [rsp+28h] [rbp-58h] unsigned long long v16; // [rsp+38h] [rbp-48h] int v17; // [rsp+44h] [rbp-3Ch] *a6 = 0; v14 = a2; v13 = &a2[a3]; while ( 1 ) { v8 = 0; if ( v14 < v13 ) v8 = (*(_BYTE *)(*(_QWORD *)(a1 + 64) + (unsigned __int8)*v14 + 1LL) & 8) != 0; if ( !v8 ) break; ++v14; } if ( v14 == v13 ) goto LABEL_39; if ( *v14 == 45 ) { v17 = 1; ++v14; } else { v17 = 0; if ( *v14 == 43 ) ++v14; } v12 = v14; v16 = 0xFFFFFFFFFFFFFFFFLL / a4; v11 = 0; v15 = 0LL; while ( v14 != v13 ) { v9 = *v14; if ( (unsigned __int8)*v14 < 0x30u || v9 > 0x39u ) { if ( v9 < 0x41u || v9 > 0x5Au ) { if ( v9 < 0x61u || v9 > 0x7Au ) break; v10 = v9 - 97 + 10; } else { v10 = v9 - 65 + 10; } } else { v10 = v9 - 48; } if ( v10 >= a4 ) break; if ( v15 > v16 || v15 == v16 && v10 > (unsigned int)(0xFFFFFFFFFFFFFFFFLL % a4) ) v11 = 1; else v15 = v15 * a4 + v10; ++v14; } if ( v14 == v12 ) { LABEL_39: *a6 = 33; if ( a5 ) *a5 = a2; return 0LL; } else { if ( a5 ) *a5 = v14; if ( v11 ) { *a6 = 34; return -1LL; } else if ( v17 ) { return -(long long)v15; } else { return v15; } } }
my_strntoull_8bit: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],R9 MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x68],RAX LAB_00195479: MOV RCX,qword ptr [RBP + -0x60] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x68] MOV byte ptr [RBP + -0x76],AL JNC 0x001954a8 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x60] MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x8 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x76],AL LAB_001954a8: MOV AL,byte ptr [RBP + -0x76] TEST AL,0x1 JNZ 0x001954b1 JMP 0x001954c1 LAB_001954b1: JMP 0x001954b3 LAB_001954b3: MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x1 MOV qword ptr [RBP + -0x60],RAX JMP 0x00195479 LAB_001954c1: MOV RAX,qword ptr [RBP + -0x60] CMP RAX,qword ptr [RBP + -0x68] JNZ 0x001954d0 JMP 0x00195691 LAB_001954d0: MOV RAX,qword ptr [RBP + -0x60] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2d JNZ 0x001954f1 MOV dword ptr [RBP + -0x3c],0x1 MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x1 MOV qword ptr [RBP + -0x60],RAX JMP 0x0019551b LAB_001954f1: MOV RAX,qword ptr [RBP + -0x60] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2b JNZ 0x00195512 MOV dword ptr [RBP + -0x3c],0x0 MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x1 MOV qword ptr [RBP + -0x60],RAX JMP 0x00195519 LAB_00195512: MOV dword ptr [RBP + -0x3c],0x0 LAB_00195519: JMP 0x0019551b LAB_0019551b: MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x70],RAX MOVSXD RCX,dword ptr [RBP + -0x24] MOV RAX,-0x1 XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x48],RAX MOVSXD RCX,dword ptr [RBP + -0x24] MOV RAX,-0x1 XOR EDX,EDX DIV RCX MOV EAX,EDX MOV dword ptr [RBP + -0x4c],EAX MOV dword ptr [RBP + -0x74],0x0 MOV qword ptr [RBP + -0x58],0x0 LAB_0019555b: MOV RAX,qword ptr [RBP + -0x60] CMP RAX,qword ptr [RBP + -0x68] JZ 0x00195635 MOV RAX,qword ptr [RBP + -0x60] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x75],AL MOVZX EAX,byte ptr [RBP + -0x75] CMP EAX,0x30 JL 0x00195590 MOVZX EAX,byte ptr [RBP + -0x75] CMP EAX,0x39 JG 0x00195590 MOVZX EAX,byte ptr [RBP + -0x75] SUB EAX,0x30 MOV byte ptr [RBP + -0x75],AL JMP 0x001955d8 LAB_00195590: MOVZX EAX,byte ptr [RBP + -0x75] CMP EAX,0x41 JL 0x001955b1 MOVZX EAX,byte ptr [RBP + -0x75] CMP EAX,0x5a JG 0x001955b1 MOVZX EAX,byte ptr [RBP + -0x75] SUB EAX,0x41 ADD EAX,0xa MOV byte ptr [RBP + -0x75],AL JMP 0x001955d6 LAB_001955b1: MOVZX EAX,byte ptr [RBP + -0x75] CMP EAX,0x61 JL 0x001955d2 MOVZX EAX,byte ptr [RBP + -0x75] CMP EAX,0x7a JG 0x001955d2 MOVZX EAX,byte ptr [RBP + -0x75] SUB EAX,0x61 ADD EAX,0xa MOV byte ptr [RBP + -0x75],AL JMP 0x001955d4 LAB_001955d2: JMP 0x00195635 LAB_001955d4: JMP 0x001955d6 LAB_001955d6: JMP 0x001955d8 LAB_001955d8: MOVZX EAX,byte ptr [RBP + -0x75] CMP EAX,dword ptr [RBP + -0x24] JL 0x001955e3 JMP 0x00195635 LAB_001955e3: MOV RAX,qword ptr [RBP + -0x58] CMP RAX,qword ptr [RBP + -0x48] JA 0x00195600 MOV RAX,qword ptr [RBP + -0x58] CMP RAX,qword ptr [RBP + -0x48] JNZ 0x00195609 MOVZX EAX,byte ptr [RBP + -0x75] CMP EAX,dword ptr [RBP + -0x4c] JBE 0x00195609 LAB_00195600: MOV dword ptr [RBP + -0x74],0x1 JMP 0x00195622 LAB_00195609: MOVSXD RAX,dword ptr [RBP + -0x24] IMUL RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x58],RAX MOVZX EAX,byte ptr [RBP + -0x75] ADD RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x58],RAX LAB_00195622: JMP 0x00195624 LAB_00195624: MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x1 MOV qword ptr [RBP + -0x60],RAX JMP 0x0019555b LAB_00195635: MOV RAX,qword ptr [RBP + -0x60] CMP RAX,qword ptr [RBP + -0x70] JNZ 0x00195641 JMP 0x00195691 LAB_00195641: CMP qword ptr [RBP + -0x30],0x0 JZ 0x00195653 MOV RCX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX LAB_00195653: CMP dword ptr [RBP + -0x74],0x0 JZ 0x0019566d MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x22 MOV qword ptr [RBP + -0x8],-0x1 JMP 0x001956b5 LAB_0019566d: CMP dword ptr [RBP + -0x3c],0x0 JZ 0x0019567f XOR EAX,EAX SUB RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x80],RAX JMP 0x00195687 LAB_0019567f: MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x80],RAX LAB_00195687: MOV RAX,qword ptr [RBP + -0x80] MOV qword ptr [RBP + -0x8],RAX JMP 0x001956b5 LAB_00195691: MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x21 CMP qword ptr [RBP + -0x30],0x0 JZ 0x001956ad MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX LAB_001956ad: MOV qword ptr [RBP + -0x8],0x0 LAB_001956b5: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
ulong my_strntoull_8bit(long param_1,byte *param_2,long param_3,int param_4,int8 *param_5, int4 *param_6) { int1 auVar1 [16]; int1 auVar2 [16]; bool bVar3; byte *pbVar4; byte *pbVar5; ulong uVar6; bool bVar7; ulong local_88; byte local_7d; byte *local_68; ulong local_60; *param_6 = 0; pbVar5 = param_2 + param_3; local_68 = param_2; while( true ) { bVar7 = false; if (local_68 < pbVar5) { bVar7 = (*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*local_68) & 8) != 0; } if (!bVar7) break; local_68 = local_68 + 1; } if (local_68 != pbVar5) { if (*local_68 == 0x2d) { bVar7 = true; local_68 = local_68 + 1; } else { if (*local_68 == 0x2b) { local_68 = local_68 + 1; } bVar7 = false; } pbVar4 = local_68; auVar1._8_8_ = 0; auVar1._0_8_ = (long)param_4; uVar6 = SUB168((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) / auVar1,0); auVar2._8_8_ = 0; auVar2._0_8_ = (long)param_4; bVar3 = false; local_60 = 0; for (; local_68 != pbVar5; local_68 = local_68 + 1) { local_7d = *local_68; if ((local_7d < 0x30) || (0x39 < local_7d)) { if ((local_7d < 0x41) || (0x5a < local_7d)) { if ((local_7d < 0x61) || (0x7a < local_7d)) break; local_7d = local_7d + 0xa9; } else { local_7d = local_7d - 0x37; } } else { local_7d = local_7d - 0x30; } if (param_4 <= (int)(uint)local_7d) break; if ((uVar6 < local_60) || ((local_60 == uVar6 && (SUB164((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) % auVar2,0) < (uint)local_7d))) ) { bVar3 = true; } else { local_60 = (ulong)local_7d + (long)param_4 * local_60; } } if (local_68 != pbVar4) { if (param_5 != (int8 *)0x0) { *param_5 = local_68; } if (bVar3) { *param_6 = 0x22; return 0xffffffffffffffff; } if (bVar7) { local_88 = -local_60; } else { local_88 = local_60; } return local_88; } } *param_6 = 0x21; if (param_5 != (int8 *)0x0) { *param_5 = param_2; } return 0; }
20,674
reset_root_defaults
eloqsql/mysys/my_alloc.c
void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size, size_t pre_alloc_size __attribute__((unused))) { DBUG_ENTER("reset_root_defaults"); DBUG_ASSERT(alloc_root_inited(mem_root)); mem_root->block_size= (((block_size - ALLOC_ROOT_MIN_BLOCK_SIZE) & ~1) | (mem_root->block_size & 1)); #if !(defined(HAVE_valgrind) && defined(EXTRA_DEBUG)) if (pre_alloc_size) { size_t size= pre_alloc_size + ALIGN_SIZE(sizeof(USED_MEM)); if (!mem_root->pre_alloc || mem_root->pre_alloc->size != size) { USED_MEM *mem, **prev= &mem_root->free; /* Free unused blocks, so that consequent calls to reset_root_defaults won't eat away memory. */ while (*prev) { mem= *prev; if (mem->size == size) { /* We found a suitable block, no need to do anything else */ mem_root->pre_alloc= mem; DBUG_VOID_RETURN; } if (mem->left + ALIGN_SIZE(sizeof(USED_MEM)) == mem->size) { /* remove block from the list and free it */ *prev= mem->next; my_free(mem); } else prev= &mem->next; } /* Allocate new prealloc block and add it to the end of free list */ if ((mem= (USED_MEM *) my_malloc(mem_root->m_psi_key, size, MYF(MALLOC_FLAG(mem_root-> block_size))))) { mem->size= size; mem->left= pre_alloc_size; mem->next= *prev; *prev= mem_root->pre_alloc= mem; TRASH_MEM(mem); } else { mem_root->pre_alloc= 0; } } } else #endif mem_root->pre_alloc= 0; DBUG_VOID_RETURN; }
O0
c
reset_root_defaults: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) jmp 0x3a296 movq -0x10(%rbp), %rcx subq $0x28, %rcx andq $-0x2, %rcx movq -0x8(%rbp), %rax movq 0x20(%rax), %rax andq $0x1, %rax orq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x20(%rax) cmpq $0x0, -0x18(%rbp) je 0x3a3ef movq -0x18(%rbp), %rax addq $0x18, %rax movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x10(%rax) je 0x3a2f1 movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movq 0x10(%rax), %rax cmpq -0x20(%rbp), %rax je 0x3a3ed movq -0x8(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax cmpq $0x0, (%rax) je 0x3a366 movq -0x30(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movq 0x10(%rax), %rax cmpq -0x20(%rbp), %rax jne 0x3a32d movq -0x28(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x10(%rax) jmp 0x3a3ff movq -0x28(%rbp), %rax movq 0x8(%rax), %rax addq $0x18, %rax movq -0x28(%rbp), %rcx cmpq 0x10(%rcx), %rax jne 0x3a35c movq -0x28(%rbp), %rax movq (%rax), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movq -0x28(%rbp), %rdi callq 0x2e170 jmp 0x3a364 movq -0x28(%rbp), %rax movq %rax, -0x30(%rbp) jmp 0x3a2f9 movq -0x8(%rbp), %rax movl 0x38(%rax), %edi movq -0x20(%rbp), %rsi movq -0x8(%rbp), %rax movq 0x20(%rax), %rdx andq $0x1, %rdx xorl %eax, %eax movl $0x10000, %ecx # imm = 0x10000 cmpq $0x0, %rdx cmovnel %ecx, %eax movl %eax, %eax movl %eax, %edx callq 0x2ddf0 movq %rax, -0x28(%rbp) cmpq $0x0, %rax je 0x3a3df movq -0x20(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x18(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x30(%rbp), %rax movq (%rax), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) movq -0x28(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x30(%rbp), %rax movq %rcx, (%rax) jmp 0x3a3d9 jmp 0x3a3db jmp 0x3a3dd jmp 0x3a3eb movq -0x8(%rbp), %rax movq $0x0, 0x10(%rax) jmp 0x3a3ed jmp 0x3a3fb movq -0x8(%rbp), %rax movq $0x0, 0x10(%rax) jmp 0x3a3fd jmp 0x3a3ff addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
reset_root_defaults: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx jmp short $+2 loc_3A296: mov rcx, [rbp+var_10] sub rcx, 28h ; '(' and rcx, 0FFFFFFFFFFFFFFFEh mov rax, [rbp+var_8] mov rax, [rax+20h] and rax, 1 or rcx, rax mov rax, [rbp+var_8] mov [rax+20h], rcx cmp [rbp+var_18], 0 jz loc_3A3EF mov rax, [rbp+var_18] add rax, 18h mov [rbp+var_20], rax mov rax, [rbp+var_8] cmp qword ptr [rax+10h], 0 jz short loc_3A2F1 mov rax, [rbp+var_8] mov rax, [rax+10h] mov rax, [rax+10h] cmp rax, [rbp+var_20] jz loc_3A3ED loc_3A2F1: mov rax, [rbp+var_8] mov [rbp+var_30], rax loc_3A2F9: mov rax, [rbp+var_30] cmp qword ptr [rax], 0 jz short loc_3A366 mov rax, [rbp+var_30] mov rax, [rax] mov [rbp+var_28], rax mov rax, [rbp+var_28] mov rax, [rax+10h] cmp rax, [rbp+var_20] jnz short loc_3A32D mov rcx, [rbp+var_28] mov rax, [rbp+var_8] mov [rax+10h], rcx jmp loc_3A3FF loc_3A32D: mov rax, [rbp+var_28] mov rax, [rax+8] add rax, 18h mov rcx, [rbp+var_28] cmp rax, [rcx+10h] jnz short loc_3A35C mov rax, [rbp+var_28] mov rcx, [rax] mov rax, [rbp+var_30] mov [rax], rcx mov rdi, [rbp+var_28] call my_free jmp short loc_3A364 loc_3A35C: mov rax, [rbp+var_28] mov [rbp+var_30], rax loc_3A364: jmp short loc_3A2F9 loc_3A366: mov rax, [rbp+var_8] mov edi, [rax+38h] mov rsi, [rbp+var_20] mov rax, [rbp+var_8] mov rdx, [rax+20h] and rdx, 1 xor eax, eax mov ecx, 10000h cmp rdx, 0 cmovnz eax, ecx mov eax, eax mov edx, eax call my_malloc mov [rbp+var_28], rax cmp rax, 0 jz short loc_3A3DF mov rcx, [rbp+var_20] mov rax, [rbp+var_28] mov [rax+10h], rcx mov rcx, [rbp+var_18] mov rax, [rbp+var_28] mov [rax+8], rcx mov rax, [rbp+var_30] mov rcx, [rax] mov rax, [rbp+var_28] mov [rax], rcx mov rcx, [rbp+var_28] mov rax, [rbp+var_8] mov [rax+10h], rcx mov rax, [rbp+var_30] mov [rax], rcx jmp short $+2 loc_3A3D9: jmp short $+2 loc_3A3DB: jmp short $+2 loc_3A3DD: jmp short loc_3A3EB loc_3A3DF: mov rax, [rbp+var_8] mov qword ptr [rax+10h], 0 loc_3A3EB: jmp short $+2 loc_3A3ED: jmp short loc_3A3FB loc_3A3EF: mov rax, [rbp+var_8] mov qword ptr [rax+10h], 0 loc_3A3FB: jmp short $+2 loc_3A3FD: jmp short $+2 loc_3A3FF: add rsp, 30h pop rbp retn
long long * reset_root_defaults(long long *a1, long long a2, long long a3) { long long *result; // rax unsigned int v4; // edi int v5; // eax long long *v6; // [rsp+0h] [rbp-30h] long long *v7; // [rsp+8h] [rbp-28h] _QWORD *v8; // [rsp+8h] [rbp-28h] unsigned long long v9; // [rsp+10h] [rbp-20h] a1[4] = a1[4] & 1 | (a2 - 40) & 0xFFFFFFFFFFFFFFFELL; if ( a3 ) { v9 = a3 + 24; if ( !a1[2] || (result = *(long long **)(a1[2] + 16), result != (long long *)v9) ) { v6 = a1; while ( *v6 ) { v7 = (long long *)*v6; if ( *(_QWORD *)(*v6 + 16) == v9 ) { result = a1; a1[2] = (long long)v7; return result; } if ( v7[1] + 24 == v7[2] ) { *v6 = *v7; my_free((long long)v7); } else { v6 = (long long *)*v6; } } v4 = *((_DWORD *)a1 + 14); v5 = 0; if ( (a1[4] & 1) != 0 ) v5 = 0x10000; v8 = (_QWORD *)my_malloc(v4, v9, v5); if ( v8 ) { v8[2] = v9; v8[1] = a3; *v8 = *v6; a1[2] = (long long)v8; result = v6; *v6 = (long long)v8; } else { result = a1; a1[2] = 0LL; } } } else { result = a1; a1[2] = 0LL; } return result; }
reset_root_defaults: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX JMP 0x0013a296 LAB_0013a296: MOV RCX,qword ptr [RBP + -0x10] SUB RCX,0x28 AND RCX,-0x2 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x20] AND RAX,0x1 OR RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x20],RCX CMP qword ptr [RBP + -0x18],0x0 JZ 0x0013a3ef MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x18 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x10],0x0 JZ 0x0013a2f1 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RAX + 0x10] CMP RAX,qword ptr [RBP + -0x20] JZ 0x0013a3ed LAB_0013a2f1: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x30],RAX LAB_0013a2f9: MOV RAX,qword ptr [RBP + -0x30] CMP qword ptr [RAX],0x0 JZ 0x0013a366 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x10] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x0013a32d MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],RCX JMP 0x0013a3ff LAB_0013a32d: MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] ADD RAX,0x18 MOV RCX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RCX + 0x10] JNZ 0x0013a35c MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RBP + -0x28] CALL 0x0012e170 JMP 0x0013a364 LAB_0013a35c: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x30],RAX LAB_0013a364: JMP 0x0013a2f9 LAB_0013a366: MOV RAX,qword ptr [RBP + -0x8] MOV EDI,dword ptr [RAX + 0x38] MOV RSI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RAX + 0x20] AND RDX,0x1 XOR EAX,EAX MOV ECX,0x10000 CMP RDX,0x0 CMOVNZ EAX,ECX MOV EAX,EAX MOV EDX,EAX CALL 0x0012ddf0 MOV qword ptr [RBP + -0x28],RAX CMP RAX,0x0 JZ 0x0013a3df MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX JMP 0x0013a3d9 LAB_0013a3d9: JMP 0x0013a3db LAB_0013a3db: JMP 0x0013a3dd LAB_0013a3dd: JMP 0x0013a3eb LAB_0013a3df: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],0x0 LAB_0013a3eb: JMP 0x0013a3ed LAB_0013a3ed: JMP 0x0013a3fb LAB_0013a3ef: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],0x0 LAB_0013a3fb: JMP 0x0013a3fd LAB_0013a3fd: JMP 0x0013a3ff LAB_0013a3ff: ADD RSP,0x30 POP RBP RET
void reset_root_defaults(long *param_1,long param_2,long param_3) { int4 uVar1; long lVar2; long *plVar3; long *local_38; param_1[4] = param_2 - 0x28U & 0xfffffffffffffffe | param_1[4] & 1U; if (param_3 == 0) { param_1[2] = 0; } else { lVar2 = param_3 + 0x18; plVar3 = param_1; if ((param_1[2] == 0) || (plVar3 = param_1, *(long *)(param_1[2] + 0x10) != lVar2)) { while (local_38 = plVar3, *local_38 != 0) { plVar3 = (long *)*local_38; if (plVar3[2] == lVar2) { param_1[2] = (long)plVar3; return; } if (plVar3[1] + 0x18 == plVar3[2]) { *local_38 = *plVar3; my_free(plVar3); plVar3 = local_38; } } uVar1 = 0; if ((param_1[4] & 1U) != 0) { uVar1 = 0x10000; } plVar3 = (long *)my_malloc((int)param_1[7],lVar2,uVar1); if (plVar3 == (long *)0x0) { param_1[2] = 0; } else { plVar3[2] = lVar2; plVar3[1] = param_3; *plVar3 = *local_38; param_1[2] = (long)plVar3; *local_38 = (long)plVar3; } } } return; }
20,675
std::hash<minja::Value>::operator()(minja::Value const&) const
monkey531[P]llama/common/minja.hpp
size_t operator()(const minja::Value & v) const { if (!v.is_hashable()) throw std::runtime_error("Unsupported type for hashing: " + v.dump()); return std::hash<json>()(v.get<json>()); }
O3
cpp
std::hash<minja::Value>::operator()(minja::Value const&) const: pushq %rbp pushq %r14 pushq %rbx subq $0x40, %rsp movq %rsi, %r14 cmpq $0x0, 0x10(%rsi) jne 0xb0a6e cmpq $0x0, 0x20(%r14) jne 0xb0a6e cmpq $0x0, 0x30(%r14) jne 0xb0a6e movq %rsp, %rbx movq %rbx, %rdi movq %r14, %rsi callq 0xb0b56 movq %rbx, %rdi callq 0xb1073 movq %rax, %rbx movq %rsp, %r14 movq %r14, %rdi xorl %esi, %esi callq 0x57ee4 movq %r14, %rdi callq 0x5d352 movq %rbx, %rax addq $0x40, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x10, %edi callq 0x1a440 movq %rax, %rbx leaq 0x20(%rsp), %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x85b54 leaq 0x3f62f(%rip), %rsi # 0xf00c5 movq %rsp, %rdi leaq 0x20(%rsp), %rdx callq 0x782e9 movb $0x1, %bpl movq %rsp, %rsi movq %rbx, %rdi callq 0x1ae30 xorl %ebp, %ebp movq 0x7a536(%rip), %rsi # 0x12aff0 movq 0x7a49f(%rip), %rdx # 0x12af60 movq %rbx, %rdi callq 0x1af20 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb0ae7 movq 0x10(%rsp), %rsi incq %rsi callq 0x1a8e0 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb0b02 movq 0x30(%rsp), %rsi incq %rsi callq 0x1a8e0 testb %bpl, %bpl jne 0xb0b2c jmp 0xb0b4e movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb0b2c movq 0x30(%rsp), %rsi incq %rsi callq 0x1a8e0 jmp 0xb0b2c movq %rax, %r14 movq %rbx, %rdi callq 0x1a690 jmp 0xb0b4e movq %rax, %r14 movq %rsp, %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x57ee4 movq %rbx, %rdi callq 0x5d352 movq %r14, %rdi callq 0x1afa0
_ZNKSt4hashIN5minja5ValueEEclERKS1_: push rbp push r14 push rbx sub rsp, 40h mov r14, rsi cmp qword ptr [rsi+10h], 0 jnz short loc_B0A6E cmp qword ptr [r14+20h], 0 jnz short loc_B0A6E cmp qword ptr [r14+30h], 0 jnz short loc_B0A6E mov rbx, rsp mov rdi, rbx mov rsi, r14 call _ZNK5minja5Value3getIN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEEET_v; minja::Value::get<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>>(void) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail4hashINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEmRKT_; nlohmann::json_abi_v3_11_3::detail::hash<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> const&) mov rbx, 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() mov rax, rbx add rsp, 40h pop rbx pop r14 pop rbp retn loc_B0A6E: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+58h+var_38] mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aUnsupportedTyp; "Unsupported type for hashing: " mov rdi, rsp lea rdx, [rsp+58h+var_38] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 mov rsi, rsp mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_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+58h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B0AE7 mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B0AE7: lea rax, [rsp+58h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B0B02 mov rsi, [rsp+58h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B0B02: test bpl, bpl jnz short loc_B0B2C jmp short loc_B0B4E mov r14, rax lea rax, [rsp+58h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B0B2C mov rsi, [rsp+58h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_B0B2C mov r14, rax loc_B0B2C: mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_B0B4E mov r14, rax mov rbx, rsp mov rdi, rbx xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() loc_B0B4E: mov rdi, r14 call __Unwind_Resume
long long std::hash<minja::Value>::operator()(long long a1, _QWORD *a2) { long long v2; // rbx void *exception; // rbx char v5[16]; // [rsp+0h] [rbp-58h] BYREF _BYTE v6[16]; // [rsp+20h] [rbp-38h] BYREF if ( a2[2] || a2[4] || a2[6] ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v6, (long long)a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)v5, (long long)"Unsupported type for hashing: ", (long long)v6); std::runtime_error::runtime_error(exception, v5); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Value::get<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>>( v5, a2); v2 = nlohmann::json_abi_v3_11_3::detail::hash<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>>(v5); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v5); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v5); return v2; }
operator(): PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RSI CMP qword ptr [RSI + 0x10],0x0 JNZ 0x001b0a6e CMP qword ptr [R14 + 0x20],0x0 JNZ 0x001b0a6e CMP qword ptr [R14 + 0x30],0x0 JNZ 0x001b0a6e MOV RBX,RSP MOV RDI,RBX MOV RSI,R14 CALL 0x001b0b56 LAB_001b0a42: MOV RDI,RBX CALL 0x001b1073 LAB_001b0a4a: MOV RBX,RAX MOV R14,RSP MOV RDI,R14 XOR ESI,ESI CALL 0x00157ee4 MOV RDI,R14 CALL 0x0015d352 MOV RAX,RBX ADD RSP,0x40 POP RBX POP R14 POP RBP RET LAB_001b0a6e: MOV EDI,0x10 CALL 0x0011a440 MOV RBX,RAX LAB_001b0a7b: LEA RDI,[RSP + 0x20] MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x00185b54 LAB_001b0a8f: LEA RSI,[0x1f00c5] MOV RDI,RSP LEA RDX,[RSP + 0x20] CALL 0x001782e9 MOV BPL,0x1 LAB_001b0aa6: MOV RSI,RSP MOV RDI,RBX CALL 0x0011ae30 XOR EBP,EBP MOV RSI,qword ptr [0x0022aff0] MOV RDX,qword ptr [0x0022af60] MOV RDI,RBX CALL 0x0011af20
/* std::hash<minja::Value>::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */ ulong __thiscall std::hash<minja::Value>::operator()(hash<minja::Value> *this,Value *param_1) { ulong uVar1; runtime_error *this_00; basic_json abStack_58 [32]; int1 local_38 [32]; if (((*(long *)(param_1 + 0x10) == 0) && (*(long *)(param_1 + 0x20) == 0)) && (*(long *)(param_1 + 0x30) == 0)) { minja::Value:: get<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>> (); /* try { // try from 001b0a42 to 001b0a49 has its CatchHandler @ 001b0b36 */ uVar1 = nlohmann::json_abi_v3_11_3::detail:: hash<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>> (abStack_58); 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(abStack_58,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 *)abStack_58); return uVar1; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001b0a7b to 001b0a8e has its CatchHandler @ 001b0b29 */ minja::Value::dump_abi_cxx11_((int)local_38,SUB81(param_1,0)); /* try { // try from 001b0a8f to 001b0aa2 has its CatchHandler @ 001b0b09 */ operator+((char *)abStack_58,(string *)"Unsupported type for hashing: "); /* try { // try from 001b0aa6 to 001b0ac8 has its CatchHandler @ 001b0ac9 */ std::runtime_error::runtime_error(this_00,(string *)abStack_58); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_0022aff0,PTR__runtime_error_0022af60); }
20,676
ok1
eloqsql/unittest/mytap/tap.c
void ok1(int const pass) { va_list ap; memset(&ap, 0, sizeof(ap)); if (!pass && *g_test.todo == '\0') ++g_test.failed; vemit_tap(pass, NULL, ap); if (*g_test.todo != '\0') emit_dir("todo", g_test.todo); emit_endl(); }
O3
c
ok1: pushq %rbp movq %rsp, %rbp pushq %rbx subq $0x18, %rsp xorps %xmm0, %xmm0 movaps %xmm0, -0x20(%rbp) movq $0x0, -0x10(%rbp) testl %edi, %edi jne 0x30d52 cmpb $0x0, 0x36254a(%rip) # 0x393294 jne 0x30d52 incl 0x36253e(%rip) # 0x393290 leaq -0x20(%rbp), %rdx xorl %esi, %esi callq 0x30c79 cmpb $0x0, 0x362530(%rip) # 0x393294 je 0x30d99 movq 0x2eb233(%rip), %rbx # 0x31bfa0 movq (%rbx), %rdi leaq 0x4ee37(%rip), %rdx # 0x7fbae leaq 0x4edbf(%rip), %rcx # 0x7fb3d leaq 0x36250f(%rip), %r8 # 0x393294 movl $0x1, %esi xorl %eax, %eax callq 0x265d0 movq (%rbx), %rdi callq 0x263e0 movq 0x2eb200(%rip), %rbx # 0x31bfa0 movq (%rbx), %rdi leaq 0x5398c(%rip), %rdx # 0x84736 movl $0x1, %esi xorl %eax, %eax callq 0x265d0 movq (%rbx), %rdi callq 0x263e0 addq $0x18, %rsp popq %rbx popq %rbp retq
ok1: push rbp mov rbp, rsp push rbx sub rsp, 18h xorps xmm0, xmm0 movaps [rbp+var_20], xmm0 mov [rbp+var_10], 0 test edi, edi jnz short loc_30D52 cmp cs:byte_393294, 0 jnz short loc_30D52 inc cs:dword_393290 loc_30D52: lea rdx, [rbp+var_20] xor esi, esi call vemit_tap cmp cs:byte_393294, 0 jz short loc_30D99 mov rbx, cs:stdout_ptr mov rdi, [rbx] lea rdx, aSS; " # %s %s" lea rcx, aTodo; "todo" lea r8, byte_393294 mov esi, 1 xor eax, eax call ___fprintf_chk mov rdi, [rbx] call _fflush loc_30D99: mov rbx, cs:stdout_ptr mov rdi, [rbx] lea rdx, asc_84733+3; "\n" mov esi, 1 xor eax, eax call ___fprintf_chk mov rdi, [rbx] call _fflush add rsp, 18h pop rbx pop rbp retn
long long ok1(int a1) { long long v1; // rcx long long v2; // r8 long long v3; // r9 __int128 v5; // [rsp+0h] [rbp-20h] BYREF long long v6; // [rsp+10h] [rbp-10h] v5 = 0LL; v6 = 0LL; if ( !a1 && !byte_393294 ) ++dword_393290; vemit_tap(a1, 0LL, (long long)&v5); if ( byte_393294 ) { __fprintf_chk(stdout, 1LL, " # %s %s", "todo", &byte_393294); fflush(stdout); } __fprintf_chk(stdout, 1LL, "\n", v1, v2, v3, v5, v6); return fflush(stdout); }
ok1: PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x18 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RBP + -0x20],XMM0 MOV qword ptr [RBP + -0x10],0x0 TEST EDI,EDI JNZ 0x00130d52 CMP byte ptr [0x00493294],0x0 JNZ 0x00130d52 INC dword ptr [0x00493290] LAB_00130d52: LEA RDX,[RBP + -0x20] XOR ESI,ESI CALL 0x00130c79 CMP byte ptr [0x00493294],0x0 JZ 0x00130d99 MOV RBX,qword ptr [0x0041bfa0] MOV RDI,qword ptr [RBX] LEA RDX,[0x17fbae] LEA RCX,[0x17fb3d] LEA R8,[0x493294] MOV ESI,0x1 XOR EAX,EAX CALL 0x001265d0 MOV RDI,qword ptr [RBX] CALL 0x001263e0 LAB_00130d99: MOV RBX,qword ptr [0x0041bfa0] MOV RDI,qword ptr [RBX] LEA RDX,[0x184736] MOV ESI,0x1 XOR EAX,EAX CALL 0x001265d0 MOV RDI,qword ptr [RBX] CALL 0x001263e0 ADD RSP,0x18 POP RBX POP RBP RET
void ok1(int8 param_1) { int *puVar1; int8 local_28; int8 uStack_20; int8 local_18; local_28 = 0; uStack_20 = 0; local_18 = 0; if (((int)param_1 == 0) && (DAT_00493294 == '\0')) { DAT_00493290 = DAT_00493290 + 1; } vemit_tap(param_1,0,&local_28); puVar1 = PTR_stdout_0041bfa0; if (DAT_00493294 != '\0') { __fprintf_chk(*(int8 *)PTR_stdout_0041bfa0,1," # %s %s",&DAT_0017fb3d,&DAT_00493294); fflush(*(FILE **)puVar1); } puVar1 = PTR_stdout_0041bfa0; __fprintf_chk(*(int8 *)PTR_stdout_0041bfa0,1,&DAT_00184736); fflush(*(FILE **)puVar1); return; }
20,677
fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender, char>>::get(int) const
AlayaLite/build_O3/_deps/spdlog-src/include/spdlog/fmt/bundled/core.h
FMT_CONSTEXPR auto get(int id) const -> format_arg { format_arg arg; if (!is_packed()) { if (id < max_size()) arg = args_[id]; return arg; } if (id >= detail::max_packed_args) return arg; arg.type_ = type(id); if (arg.type_ == detail::type::none_type) return arg; arg.value_ = values_[id]; return arg; }
O3
c
fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender, char>>::get(int) const: movq %rdi, %rax movl $0x0, 0x10(%rdi) movq (%rsi), %rdi testq %rdi, %rdi js 0x42108 cmpl $0xe, %edx jg 0x42125 leal (,%rdx,4), %ecx shrq %cl, %rdi andl $0xf, %edi movl %edi, 0x10(%rax) je 0x42125 movq 0x8(%rsi), %rcx movslq %edx, %rdx shlq $0x4, %rdx jmp 0x4211e cmpl %edx, %edi jle 0x42125 movq 0x8(%rsi), %rcx movslq %edx, %rdx shlq $0x5, %rdx movl 0x10(%rcx,%rdx), %esi movl %esi, 0x10(%rax) movaps (%rcx,%rdx), %xmm0 movaps %xmm0, (%rax) retq
_ZNK3fmt3v1017basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEE3getEi: mov rax, rdi mov dword ptr [rdi+10h], 0 mov rdi, [rsi] test rdi, rdi js short loc_42108 cmp edx, 0Eh jg short locret_42125 lea ecx, ds:0[rdx*4] shr rdi, cl and edi, 0Fh mov [rax+10h], edi jz short locret_42125 mov rcx, [rsi+8] movsxd rdx, edx shl rdx, 4 jmp short loc_4211E loc_42108: cmp edi, edx jle short locret_42125 mov rcx, [rsi+8] movsxd rdx, edx shl rdx, 5 mov esi, [rcx+rdx+10h] mov [rax+10h], esi loc_4211E: movaps xmm0, xmmword ptr [rcx+rdx] movaps xmmword ptr [rax], xmm0 locret_42125: retn
long long fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>::get( long long a1, unsigned long long *a2, int a3) { long long result; // rax unsigned long long v4; // rdi int v5; // edi unsigned long long v6; // rcx long long v7; // rdx result = a1; *(_DWORD *)(a1 + 16) = 0; v4 = *a2; if ( (*a2 & 0x8000000000000000LL) != 0LL ) { if ( (int)v4 <= a3 ) return result; v6 = a2[1]; v7 = 32LL * a3; *(_DWORD *)(result + 16) = *(_DWORD *)(v6 + v7 + 16); goto LABEL_7; } if ( a3 <= 14 ) { v5 = (v4 >> (4 * (unsigned __int8)a3)) & 0xF; *(_DWORD *)(result + 16) = v5; if ( v5 ) { v6 = a2[1]; v7 = 16LL * a3; LABEL_7: *(_OWORD *)result = *(_OWORD *)(v6 + v7); } } return result; }
get: MOV RAX,RDI MOV dword ptr [RDI + 0x10],0x0 MOV RDI,qword ptr [RSI] TEST RDI,RDI JS 0x00142108 CMP EDX,0xe JG 0x00142125 LEA ECX,[RDX*0x4] SHR RDI,CL AND EDI,0xf MOV dword ptr [RAX + 0x10],EDI JZ 0x00142125 MOV RCX,qword ptr [RSI + 0x8] MOVSXD RDX,EDX SHL RDX,0x4 JMP 0x0014211e LAB_00142108: CMP EDI,EDX JLE 0x00142125 MOV RCX,qword ptr [RSI + 0x8] MOVSXD RDX,EDX SHL RDX,0x5 MOV ESI,dword ptr [RCX + RDX*0x1 + 0x10] MOV dword ptr [RAX + 0x10],ESI LAB_0014211e: MOVAPS XMM0,xmmword ptr [RCX + RDX*0x1] MOVAPS xmmword ptr [RAX],XMM0 LAB_00142125: RET
/* fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender, char> >::get(int) const */ void fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>::get (int param_1) { int8 uVar1; int in_EDX; long lVar2; ulong *in_RSI; int4 in_register_0000003c; int8 *puVar3; ulong uVar4; puVar3 = (int8 *)CONCAT44(in_register_0000003c,param_1); *(int4 *)(puVar3 + 2) = 0; uVar4 = *in_RSI; if ((long)uVar4 < 0) { if ((int)uVar4 <= in_EDX) { return; } uVar4 = in_RSI[1]; lVar2 = (long)in_EDX * 0x20; *(int4 *)(puVar3 + 2) = *(int4 *)(uVar4 + 0x10 + lVar2); } else { if (0xe < in_EDX) { return; } uVar4 = uVar4 >> ((char)in_EDX * '\x04' & 0x3fU); *(uint *)(puVar3 + 2) = (uint)uVar4 & 0xf; if ((uVar4 & 0xf) == 0) { return; } uVar4 = in_RSI[1]; lVar2 = (long)in_EDX << 4; } uVar1 = ((int8 *)(uVar4 + lVar2))[1]; *puVar3 = *(int8 *)(uVar4 + lVar2); puVar3[1] = uVar1; return; }
20,678
ggml_view_3d
monkey531[P]llama/ggml/src/ggml.c
struct ggml_tensor * ggml_view_3d( struct ggml_context * ctx, struct ggml_tensor * a, int64_t ne0, int64_t ne1, int64_t ne2, size_t nb1, size_t nb2, size_t offset) { const int64_t ne[3] = { ne0, ne1, ne2 }; struct ggml_tensor * result = ggml_view_impl(ctx, a, 3, ne, offset); result->nb[1] = nb1; result->nb[2] = nb2; result->nb[3] = result->nb[2]*ne2; return result; }
O0
c
ggml_view_3d: subq $0x58, %rsp movq 0x68(%rsp), %rax movq 0x60(%rsp), %rax movq %rdi, 0x50(%rsp) movq %rsi, 0x48(%rsp) movq %rdx, 0x40(%rsp) movq %rcx, 0x38(%rsp) movq %r8, 0x30(%rsp) movq %r9, 0x28(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x50(%rsp), %rdi movq 0x48(%rsp), %rsi leaq 0x10(%rsp), %rcx movq 0x68(%rsp), %r8 movl $0x3, %edx callq 0x4def0 movq %rax, 0x8(%rsp) movq 0x28(%rsp), %rcx movq 0x8(%rsp), %rax movq %rcx, 0x38(%rax) movq 0x60(%rsp), %rcx movq 0x8(%rsp), %rax movq %rcx, 0x40(%rax) movq 0x8(%rsp), %rax movq 0x40(%rax), %rcx imulq 0x30(%rsp), %rcx movq 0x8(%rsp), %rax movq %rcx, 0x48(%rax) movq 0x8(%rsp), %rax addq $0x58, %rsp retq nopl (%rax,%rax)
ggml_view_3d: sub rsp, 58h mov rax, [rsp+58h+arg_8] mov rax, [rsp+58h+arg_0] mov [rsp+58h+var_8], rdi mov [rsp+58h+var_10], rsi mov [rsp+58h+var_18], rdx mov [rsp+58h+var_20], rcx mov [rsp+58h+var_28], r8 mov [rsp+58h+var_30], r9 mov rax, [rsp+58h+var_18] mov [rsp+58h+var_48], rax mov rax, [rsp+58h+var_20] mov [rsp+58h+var_40], rax mov rax, [rsp+58h+var_28] mov [rsp+58h+var_38], rax mov rdi, [rsp+58h+var_8] mov rsi, [rsp+58h+var_10] lea rcx, [rsp+58h+var_48] mov r8, [rsp+58h+arg_8] mov edx, 3 call ggml_view_impl mov [rsp+58h+var_50], rax mov rcx, [rsp+58h+var_30] mov rax, [rsp+58h+var_50] mov [rax+38h], rcx mov rcx, [rsp+58h+arg_0] mov rax, [rsp+58h+var_50] mov [rax+40h], rcx mov rax, [rsp+58h+var_50] mov rcx, [rax+40h] imul rcx, [rsp+58h+var_28] mov rax, [rsp+58h+var_50] mov [rax+48h], rcx mov rax, [rsp+58h+var_50] add rsp, 58h retn
_QWORD * ggml_view_3d( long long a1, unsigned int *a2, 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, long long a16) { _QWORD *result; // rax long long v17[3]; // [rsp+10h] [rbp-48h] BYREF long long v18; // [rsp+28h] [rbp-30h] long long v19; // [rsp+30h] [rbp-28h] long long v20; // [rsp+38h] [rbp-20h] long long v21; // [rsp+40h] [rbp-18h] unsigned int *v22; // [rsp+48h] [rbp-10h] long long v23; // [rsp+50h] [rbp-8h] v23 = a1; v22 = a2; v21 = a3; v20 = a4; v19 = a5; v18 = a6; v17[0] = a3; v17[1] = a4; v17[2] = a5; result = ggml_view_impl(a1, a2, 3, v17, a16, a7, a8, a9, a10, a11, a12, a13, a14); result[7] = v18; result[8] = a15; result[9] = v19 * result[8]; return result; }
ggml_view_3d: SUB RSP,0x58 MOV RAX,qword ptr [RSP + 0x68] MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x50],RDI MOV qword ptr [RSP + 0x48],RSI MOV qword ptr [RSP + 0x40],RDX MOV qword ptr [RSP + 0x38],RCX MOV qword ptr [RSP + 0x30],R8 MOV qword ptr [RSP + 0x28],R9 MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x20],RAX MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x48] LEA RCX,[RSP + 0x10] MOV R8,qword ptr [RSP + 0x68] MOV EDX,0x3 CALL 0x0014def0 MOV qword ptr [RSP + 0x8],RAX MOV RCX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x38],RCX MOV RCX,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x40],RCX MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RAX + 0x40] IMUL RCX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x48],RCX MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0x58 RET
long ggml_view_3d(int8 param_1,int8 param_2,int8 param_3,int8 param_4, long param_5,int8 param_6,int8 param_7,int8 param_8) { long lVar1; int8 local_48; int8 local_40; long local_38; int8 local_30; long local_28; int8 local_20; int8 local_18; int8 local_10; int8 local_8; local_48 = param_3; local_40 = param_4; local_38 = param_5; local_30 = param_6; local_28 = param_5; local_20 = param_4; local_18 = param_3; local_10 = param_2; local_8 = param_1; lVar1 = ggml_view_impl(param_1,param_2,3,&local_48,param_8); *(int8 *)(lVar1 + 0x38) = local_30; *(int8 *)(lVar1 + 0x40) = param_7; *(long *)(lVar1 + 0x48) = *(long *)(lVar1 + 0x40) * local_28; return lVar1; }
20,679
cleanup_dirname
eloqsql/mysys/mf_pack.c
size_t cleanup_dirname(register char *to, const char *from) { reg5 size_t length; reg2 char * pos; reg3 char * from_ptr; reg4 char * start; char parent[5], /* for "FN_PARENTDIR" */ buff[FN_REFLEN + 1],*end_parentdir; #ifdef BACKSLASH_MBTAIL CHARSET_INFO *fs= fs_character_set(); #endif DBUG_ENTER("cleanup_dirname"); DBUG_PRINT("enter",("from: '%s'",from)); start=buff; from_ptr=(char *) from; #ifdef FN_DEVCHAR if ((pos=strrchr(from_ptr,FN_DEVCHAR)) != 0) { /* Skip device part */ length=(size_t) (pos-from_ptr)+1; start=strnmov(buff,from_ptr,length); from_ptr+=length; } #endif parent[0]=FN_LIBCHAR; length=(size_t) (strmov(parent+1,FN_PARENTDIR)-parent); for (pos=start ; (*pos= *from_ptr++) != 0 ; pos++) { #ifdef BACKSLASH_MBTAIL uint l; if (my_ci_use_mb(fs) && (l= my_ismbchar(fs, from_ptr - 1, from_ptr + 2))) { for (l-- ; l ; *++pos= *from_ptr++, l--); start= pos + 1; /* Don't look inside multi-byte char */ continue; } #endif if (*pos == '/') *pos = FN_LIBCHAR; if (*pos == FN_LIBCHAR) { if ((size_t) (pos-start) > length && memcmp(pos-length,parent,length) == 0) { /* If .../../; skip prev */ pos-=length; if (pos != start) { /* not /../ */ pos--; if (*pos == FN_HOMELIB && (pos == start || pos[-1] == FN_LIBCHAR)) { if (!home_dir) { pos+=length+1; /* Don't unpack ~/.. */ continue; } pos=strmov(buff,home_dir)-1; /* Unpacks ~/.. */ if (*pos == FN_LIBCHAR) pos--; /* home ended with '/' */ } if (*pos == FN_CURLIB && (pos == start || pos[-1] == FN_LIBCHAR)) { if (my_getwd(curr_dir,FN_REFLEN,MYF(0))) { pos+=length+1; /* Don't unpack ./.. */ continue; } pos=strmov(buff,curr_dir)-1; /* Unpacks ./.. */ if (*pos == FN_LIBCHAR) pos--; /* home ended with '/' */ } end_parentdir=pos; while (pos >= start && *pos != FN_LIBCHAR) /* remove prev dir */ pos--; if (pos[1] == FN_HOMELIB || (pos >= start && memcmp(pos, parent, length) == 0)) { /* Don't remove ~user/ */ pos=strmov(end_parentdir+1,parent); *pos=FN_LIBCHAR; continue; } } } else if ((size_t) (pos-start) == length-1 && !memcmp(start,parent+1,length-1)) start=pos; /* Starts with "../" */ else if (pos-start > 0 && pos[-1] == FN_LIBCHAR) { #ifdef FN_NETWORK_DRIVES if (pos-start != 1) #endif pos--; /* Remove dupplicate '/' */ } else if (pos-start > 1 && pos[-1] == FN_CURLIB && pos[-2] == FN_LIBCHAR) pos-=2; /* Skip /./ */ } } (void) strmov(to,buff); DBUG_PRINT("exit",("to: '%s'",to)); DBUG_RETURN((size_t) (pos-buff)); }
O0
c
cleanup_dirname: pushq %rbp movq %rsp, %rbp subq $0x260, %rsp # imm = 0x260 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x218(%rbp) movq %rsi, -0x220(%rbp) jmp 0xda1b8 leaq -0x210(%rbp), %rax movq %rax, -0x240(%rbp) movq -0x220(%rbp), %rax movq %rax, -0x238(%rbp) movb $0x2f, -0xd(%rbp) leaq -0xd(%rbp), %rdi addq $0x1, %rdi leaq 0x5424c(%rip), %rsi # 0x12e433 callq 0x3a9c0 leaq -0xd(%rbp), %rcx subq %rcx, %rax movq %rax, -0x228(%rbp) movq -0x240(%rbp), %rax movq %rax, -0x230(%rbp) movq -0x238(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x238(%rbp) movb (%rax), %al movq -0x230(%rbp), %rcx movb %al, (%rcx) movsbl %al, %eax cmpl $0x0, %eax je 0xda601 movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0xda24d movq -0x230(%rbp), %rax movb $0x2f, (%rax) movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0xda5e8 movq -0x230(%rbp), %rax movq -0x240(%rbp), %rcx subq %rcx, %rax cmpq -0x228(%rbp), %rax jbe 0xda504 movq -0x230(%rbp), %rdi xorl %eax, %eax subq -0x228(%rbp), %rax addq %rax, %rdi leaq -0xd(%rbp), %rsi movq -0x228(%rbp), %rdx callq 0x3ab20 cmpl $0x0, %eax jne 0xda504 movq -0x228(%rbp), %rdx movq -0x230(%rbp), %rax xorl %ecx, %ecx subq %rdx, %rcx addq %rcx, %rax movq %rax, -0x230(%rbp) movq -0x230(%rbp), %rax cmpq -0x240(%rbp), %rax je 0xda4ff movq -0x230(%rbp), %rax addq $-0x1, %rax movq %rax, -0x230(%rbp) movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x7e, %eax jne 0xda38f movq -0x230(%rbp), %rax cmpq -0x240(%rbp), %rax je 0xda320 movq -0x230(%rbp), %rax movsbl -0x1(%rax), %eax cmpl $0x2f, %eax jne 0xda38f leaq 0x39d3d1(%rip), %rax # 0x4776f8 cmpq $0x0, (%rax) jne 0xda34b movq -0x228(%rbp), %rax addq $0x1, %rax addq -0x230(%rbp), %rax movq %rax, -0x230(%rbp) jmp 0xda5ea leaq -0x210(%rbp), %rdi leaq 0x39d39f(%rip), %rax # 0x4776f8 movq (%rax), %rsi callq 0x3a9c0 addq $-0x1, %rax movq %rax, -0x230(%rbp) movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0xda38d movq -0x230(%rbp), %rax addq $-0x1, %rax movq %rax, -0x230(%rbp) jmp 0xda38f movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x2e, %eax jne 0xda43b movq -0x230(%rbp), %rax cmpq -0x240(%rbp), %rax je 0xda3c2 movq -0x230(%rbp), %rax movsbl -0x1(%rax), %eax cmpl $0x2f, %eax jne 0xda43b leaq 0x39d347(%rip), %rdi # 0x477710 movl $0x200, %esi # imm = 0x200 xorl %eax, %eax movl %eax, %edx callq 0xe0000 cmpl $0x0, %eax je 0xda3fa movq -0x228(%rbp), %rax addq $0x1, %rax addq -0x230(%rbp), %rax movq %rax, -0x230(%rbp) jmp 0xda5ea leaq -0x210(%rbp), %rdi leaq 0x39d308(%rip), %rsi # 0x477710 callq 0x3a9c0 addq $-0x1, %rax movq %rax, -0x230(%rbp) movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0xda439 movq -0x230(%rbp), %rax addq $-0x1, %rax movq %rax, -0x230(%rbp) jmp 0xda43b movq -0x230(%rbp), %rax movq %rax, -0x248(%rbp) movq -0x230(%rbp), %rcx xorl %eax, %eax cmpq -0x240(%rbp), %rcx movb %al, -0x249(%rbp) jb 0xda477 movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax setne %al movb %al, -0x249(%rbp) movb -0x249(%rbp), %al testb $0x1, %al jne 0xda483 jmp 0xda497 movq -0x230(%rbp), %rax addq $-0x1, %rax movq %rax, -0x230(%rbp) jmp 0xda449 movq -0x230(%rbp), %rax movsbl 0x1(%rax), %eax cmpl $0x7e, %eax je 0xda4d3 movq -0x230(%rbp), %rax cmpq -0x240(%rbp), %rax jb 0xda4fd movq -0x230(%rbp), %rdi leaq -0xd(%rbp), %rsi movq -0x228(%rbp), %rdx callq 0x3ab20 cmpl $0x0, %eax jne 0xda4fd movq -0x248(%rbp), %rdi addq $0x1, %rdi leaq -0xd(%rbp), %rsi callq 0x3a9c0 movq %rax, -0x230(%rbp) movq -0x230(%rbp), %rax movb $0x2f, (%rax) jmp 0xda5ea jmp 0xda4ff jmp 0xda5e6 movq -0x230(%rbp), %rax movq -0x240(%rbp), %rcx subq %rcx, %rax movq -0x228(%rbp), %rcx subq $0x1, %rcx cmpq %rcx, %rax jne 0xda55c movq -0x240(%rbp), %rdi leaq -0xd(%rbp), %rsi addq $0x1, %rsi movq -0x228(%rbp), %rdx subq $0x1, %rdx callq 0x3ab20 cmpl $0x0, %eax jne 0xda55c movq -0x230(%rbp), %rax movq %rax, -0x240(%rbp) jmp 0xda5e4 movq -0x230(%rbp), %rax movq -0x240(%rbp), %rcx subq %rcx, %rax cmpq $0x0, %rax jle 0xda597 movq -0x230(%rbp), %rax movsbl -0x1(%rax), %eax cmpl $0x2f, %eax jne 0xda597 movq -0x230(%rbp), %rax addq $-0x1, %rax movq %rax, -0x230(%rbp) jmp 0xda5e2 movq -0x230(%rbp), %rax movq -0x240(%rbp), %rcx subq %rcx, %rax cmpq $0x1, %rax jle 0xda5e0 movq -0x230(%rbp), %rax movsbl -0x1(%rax), %eax cmpl $0x2e, %eax jne 0xda5e0 movq -0x230(%rbp), %rax movsbl -0x2(%rax), %eax cmpl $0x2f, %eax jne 0xda5e0 movq -0x230(%rbp), %rax addq $-0x2, %rax movq %rax, -0x230(%rbp) jmp 0xda5e2 jmp 0xda5e4 jmp 0xda5e6 jmp 0xda5e8 jmp 0xda5ea movq -0x230(%rbp), %rax addq $0x1, %rax movq %rax, -0x230(%rbp) jmp 0xda208 movq -0x218(%rbp), %rdi leaq -0x210(%rbp), %rsi callq 0x3a9c0 jmp 0xda616 jmp 0xda618 movq -0x230(%rbp), %rax leaq -0x210(%rbp), %rcx subq %rcx, %rax movq %rax, -0x258(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xda652 movq -0x258(%rbp), %rax addq $0x260, %rsp # imm = 0x260 popq %rbp retq callq 0x3a2a0 nopw (%rax,%rax)
cleanup_dirname: push rbp mov rbp, rsp sub rsp, 260h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_218], rdi mov [rbp+var_220], rsi jmp short $+2 loc_DA1B8: lea rax, [rbp+var_210] mov [rbp+var_240], rax mov rax, [rbp+var_220] mov [rbp+var_238], rax mov [rbp+var_D], 2Fh ; '/' lea rdi, [rbp+var_D] add rdi, 1 lea rsi, aCreatingATestD+21h; ".." call _stpcpy lea rcx, [rbp+var_D] sub rax, rcx mov [rbp+var_228], rax mov rax, [rbp+var_240] mov [rbp+var_230], rax loc_DA208: mov rax, [rbp+var_238] mov rcx, rax add rcx, 1 mov [rbp+var_238], rcx mov al, [rax] mov rcx, [rbp+var_230] mov [rcx], al movsx eax, al cmp eax, 0 jz loc_DA601 mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz short loc_DA24D mov rax, [rbp+var_230] mov byte ptr [rax], 2Fh ; '/' loc_DA24D: mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz loc_DA5E8 mov rax, [rbp+var_230] mov rcx, [rbp+var_240] sub rax, rcx cmp rax, [rbp+var_228] jbe loc_DA504 mov rdi, [rbp+var_230] xor eax, eax sub rax, [rbp+var_228] add rdi, rax lea rsi, [rbp+var_D] mov rdx, [rbp+var_228] call _memcmp cmp eax, 0 jnz loc_DA504 mov rdx, [rbp+var_228] mov rax, [rbp+var_230] xor ecx, ecx sub rcx, rdx add rax, rcx mov [rbp+var_230], rax mov rax, [rbp+var_230] cmp rax, [rbp+var_240] jz loc_DA4FF mov rax, [rbp+var_230] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 7Eh ; '~' jnz loc_DA38F mov rax, [rbp+var_230] cmp rax, [rbp+var_240] jz short loc_DA320 mov rax, [rbp+var_230] movsx eax, byte ptr [rax-1] cmp eax, 2Fh ; '/' jnz short loc_DA38F loc_DA320: lea rax, home_dir cmp qword ptr [rax], 0 jnz short loc_DA34B mov rax, [rbp+var_228] add rax, 1 add rax, [rbp+var_230] mov [rbp+var_230], rax jmp loc_DA5EA loc_DA34B: lea rdi, [rbp+var_210] lea rax, home_dir mov rsi, [rax] call _stpcpy add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz short loc_DA38D mov rax, [rbp+var_230] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax loc_DA38D: jmp short $+2 loc_DA38F: mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 2Eh ; '.' jnz loc_DA43B mov rax, [rbp+var_230] cmp rax, [rbp+var_240] jz short loc_DA3C2 mov rax, [rbp+var_230] movsx eax, byte ptr [rax-1] cmp eax, 2Fh ; '/' jnz short loc_DA43B loc_DA3C2: lea rdi, curr_dir mov esi, 200h xor eax, eax mov edx, eax call my_getwd cmp eax, 0 jz short loc_DA3FA mov rax, [rbp+var_228] add rax, 1 add rax, [rbp+var_230] mov [rbp+var_230], rax jmp loc_DA5EA loc_DA3FA: lea rdi, [rbp+var_210] lea rsi, curr_dir call _stpcpy add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz short loc_DA439 mov rax, [rbp+var_230] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax loc_DA439: jmp short $+2 loc_DA43B: mov rax, [rbp+var_230] mov [rbp+var_248], rax loc_DA449: mov rcx, [rbp+var_230] xor eax, eax cmp rcx, [rbp+var_240] mov [rbp+var_249], al jb short loc_DA477 mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' setnz al mov [rbp+var_249], al loc_DA477: mov al, [rbp+var_249] test al, 1 jnz short loc_DA483 jmp short loc_DA497 loc_DA483: mov rax, [rbp+var_230] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax jmp short loc_DA449 loc_DA497: mov rax, [rbp+var_230] movsx eax, byte ptr [rax+1] cmp eax, 7Eh ; '~' jz short loc_DA4D3 mov rax, [rbp+var_230] cmp rax, [rbp+var_240] jb short loc_DA4FD mov rdi, [rbp+var_230] lea rsi, [rbp+var_D] mov rdx, [rbp+var_228] call _memcmp cmp eax, 0 jnz short loc_DA4FD loc_DA4D3: mov rdi, [rbp+var_248] add rdi, 1 lea rsi, [rbp+var_D] call _stpcpy mov [rbp+var_230], rax mov rax, [rbp+var_230] mov byte ptr [rax], 2Fh ; '/' jmp loc_DA5EA loc_DA4FD: jmp short $+2 loc_DA4FF: jmp loc_DA5E6 loc_DA504: mov rax, [rbp+var_230] mov rcx, [rbp+var_240] sub rax, rcx mov rcx, [rbp+var_228] sub rcx, 1 cmp rax, rcx jnz short loc_DA55C mov rdi, [rbp+var_240] lea rsi, [rbp+var_D] add rsi, 1 mov rdx, [rbp+var_228] sub rdx, 1 call _memcmp cmp eax, 0 jnz short loc_DA55C mov rax, [rbp+var_230] mov [rbp+var_240], rax jmp loc_DA5E4 loc_DA55C: mov rax, [rbp+var_230] mov rcx, [rbp+var_240] sub rax, rcx cmp rax, 0 jle short loc_DA597 mov rax, [rbp+var_230] movsx eax, byte ptr [rax-1] cmp eax, 2Fh ; '/' jnz short loc_DA597 mov rax, [rbp+var_230] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax jmp short loc_DA5E2 loc_DA597: mov rax, [rbp+var_230] mov rcx, [rbp+var_240] sub rax, rcx cmp rax, 1 jle short loc_DA5E0 mov rax, [rbp+var_230] movsx eax, byte ptr [rax-1] cmp eax, 2Eh ; '.' jnz short loc_DA5E0 mov rax, [rbp+var_230] movsx eax, byte ptr [rax-2] cmp eax, 2Fh ; '/' jnz short loc_DA5E0 mov rax, [rbp+var_230] add rax, 0FFFFFFFFFFFFFFFEh mov [rbp+var_230], rax loc_DA5E0: jmp short $+2 loc_DA5E2: jmp short $+2 loc_DA5E4: jmp short $+2 loc_DA5E6: jmp short $+2 loc_DA5E8: jmp short $+2 loc_DA5EA: mov rax, [rbp+var_230] add rax, 1 mov [rbp+var_230], rax jmp loc_DA208 loc_DA601: mov rdi, [rbp+var_218] lea rsi, [rbp+var_210] call _stpcpy jmp short $+2 loc_DA616: jmp short $+2 loc_DA618: mov rax, [rbp+var_230] lea rcx, [rbp+var_210] sub rax, rcx mov [rbp+var_258], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_DA652 mov rax, [rbp+var_258] add rsp, 260h pop rbp retn loc_DA652: call ___stack_chk_fail
long long cleanup_dirname(long long a1, _BYTE *a2) { _BYTE *v2; // rax bool v4; // [rsp+17h] [rbp-249h] _BYTE *v5; // [rsp+18h] [rbp-248h] _BYTE *v6; // [rsp+20h] [rbp-240h] _BYTE *i; // [rsp+30h] [rbp-230h] unsigned long long v9; // [rsp+38h] [rbp-228h] long long v10; // [rsp+48h] [rbp-218h] _BYTE v11[515]; // [rsp+50h] [rbp-210h] BYREF char v12; // [rsp+253h] [rbp-Dh] BYREF _BYTE v13[12]; // [rsp+254h] [rbp-Ch] BYREF *(_QWORD *)&v13[4] = __readfsqword(0x28u); v10 = a1; v6 = v11; v12 = 47; v9 = stpcpy(v13, "..") - (_QWORD)&v12; for ( i = v11; ; ++i ) { v2 = a2++; LOBYTE(v2) = *v2; *i = (_BYTE)v2; if ( !(_BYTE)v2 ) break; if ( *i == 47 ) *i = 47; if ( *i == 47 ) { if ( i - v6 > v9 && !(unsigned int)memcmp(&i[-v9], &v12, v9) ) { i -= v9; if ( i != v6 ) { if ( *--i == 126 && (i == v6 || *(i - 1) == 47) ) { if ( !home_dir ) { i += v9 + 1; continue; } i = (_BYTE *)(stpcpy(v11, home_dir) - 1); if ( *i == 47 ) --i; } if ( *i == 46 && (i == v6 || *(i - 1) == 47) ) { if ( (unsigned int)my_getwd(&curr_dir, 512LL, 0LL) ) { i += v9 + 1; continue; } i = (_BYTE *)(stpcpy(v11, &curr_dir) - 1); if ( *i == 47 ) --i; } v5 = i; while ( 1 ) { v4 = 0; if ( i >= v6 ) v4 = *i != 47; if ( !v4 ) break; --i; } if ( i[1] == 126 || i >= v6 && !(unsigned int)memcmp(i, &v12, v9) ) { i = (_BYTE *)stpcpy(v5 + 1, &v12); *i = 47; } } } else if ( i - v6 == v9 - 1 && !(unsigned int)memcmp(v6, v13, v9 - 1) ) { v6 = i; } else if ( i - v6 > 0 && *(i - 1) == 47 ) { --i; } else if ( i - v6 > 1 && *(i - 1) == 46 && *(i - 2) == 47 ) { i -= 2; } } } stpcpy(v10, v11); return i - v11; }
cleanup_dirname: PUSH RBP MOV RBP,RSP SUB RSP,0x260 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x218],RDI MOV qword ptr [RBP + -0x220],RSI JMP 0x001da1b8 LAB_001da1b8: LEA RAX,[RBP + -0x210] MOV qword ptr [RBP + -0x240],RAX MOV RAX,qword ptr [RBP + -0x220] MOV qword ptr [RBP + -0x238],RAX MOV byte ptr [RBP + -0xd],0x2f LEA RDI,[RBP + -0xd] ADD RDI,0x1 LEA RSI,[0x22e433] CALL 0x0013a9c0 LEA RCX,[RBP + -0xd] SUB RAX,RCX MOV qword ptr [RBP + -0x228],RAX MOV RAX,qword ptr [RBP + -0x240] MOV qword ptr [RBP + -0x230],RAX LAB_001da208: MOV RAX,qword ptr [RBP + -0x238] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x238],RCX MOV AL,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x230] MOV byte ptr [RCX],AL MOVSX EAX,AL CMP EAX,0x0 JZ 0x001da601 MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JNZ 0x001da24d MOV RAX,qword ptr [RBP + -0x230] MOV byte ptr [RAX],0x2f LAB_001da24d: MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JNZ 0x001da5e8 MOV RAX,qword ptr [RBP + -0x230] MOV RCX,qword ptr [RBP + -0x240] SUB RAX,RCX CMP RAX,qword ptr [RBP + -0x228] JBE 0x001da504 MOV RDI,qword ptr [RBP + -0x230] XOR EAX,EAX SUB RAX,qword ptr [RBP + -0x228] ADD RDI,RAX LEA RSI,[RBP + -0xd] MOV RDX,qword ptr [RBP + -0x228] CALL 0x0013ab20 CMP EAX,0x0 JNZ 0x001da504 MOV RDX,qword ptr [RBP + -0x228] MOV RAX,qword ptr [RBP + -0x230] XOR ECX,ECX SUB RCX,RDX ADD RAX,RCX MOV qword ptr [RBP + -0x230],RAX MOV RAX,qword ptr [RBP + -0x230] CMP RAX,qword ptr [RBP + -0x240] JZ 0x001da4ff MOV RAX,qword ptr [RBP + -0x230] ADD RAX,-0x1 MOV qword ptr [RBP + -0x230],RAX MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX] CMP EAX,0x7e JNZ 0x001da38f MOV RAX,qword ptr [RBP + -0x230] CMP RAX,qword ptr [RBP + -0x240] JZ 0x001da320 MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX + -0x1] CMP EAX,0x2f JNZ 0x001da38f LAB_001da320: LEA RAX,[0x5776f8] CMP qword ptr [RAX],0x0 JNZ 0x001da34b MOV RAX,qword ptr [RBP + -0x228] ADD RAX,0x1 ADD RAX,qword ptr [RBP + -0x230] MOV qword ptr [RBP + -0x230],RAX JMP 0x001da5ea LAB_001da34b: LEA RDI,[RBP + -0x210] LEA RAX,[0x5776f8] MOV RSI,qword ptr [RAX] CALL 0x0013a9c0 ADD RAX,-0x1 MOV qword ptr [RBP + -0x230],RAX MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JNZ 0x001da38d MOV RAX,qword ptr [RBP + -0x230] ADD RAX,-0x1 MOV qword ptr [RBP + -0x230],RAX LAB_001da38d: JMP 0x001da38f LAB_001da38f: MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2e JNZ 0x001da43b MOV RAX,qword ptr [RBP + -0x230] CMP RAX,qword ptr [RBP + -0x240] JZ 0x001da3c2 MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX + -0x1] CMP EAX,0x2f JNZ 0x001da43b LAB_001da3c2: LEA RDI,[0x577710] MOV ESI,0x200 XOR EAX,EAX MOV EDX,EAX CALL 0x001e0000 CMP EAX,0x0 JZ 0x001da3fa MOV RAX,qword ptr [RBP + -0x228] ADD RAX,0x1 ADD RAX,qword ptr [RBP + -0x230] MOV qword ptr [RBP + -0x230],RAX JMP 0x001da5ea LAB_001da3fa: LEA RDI,[RBP + -0x210] LEA RSI,[0x577710] CALL 0x0013a9c0 ADD RAX,-0x1 MOV qword ptr [RBP + -0x230],RAX MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JNZ 0x001da439 MOV RAX,qword ptr [RBP + -0x230] ADD RAX,-0x1 MOV qword ptr [RBP + -0x230],RAX LAB_001da439: JMP 0x001da43b LAB_001da43b: MOV RAX,qword ptr [RBP + -0x230] MOV qword ptr [RBP + -0x248],RAX LAB_001da449: MOV RCX,qword ptr [RBP + -0x230] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x240] MOV byte ptr [RBP + -0x249],AL JC 0x001da477 MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f SETNZ AL MOV byte ptr [RBP + -0x249],AL LAB_001da477: MOV AL,byte ptr [RBP + -0x249] TEST AL,0x1 JNZ 0x001da483 JMP 0x001da497 LAB_001da483: MOV RAX,qword ptr [RBP + -0x230] ADD RAX,-0x1 MOV qword ptr [RBP + -0x230],RAX JMP 0x001da449 LAB_001da497: MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX + 0x1] CMP EAX,0x7e JZ 0x001da4d3 MOV RAX,qword ptr [RBP + -0x230] CMP RAX,qword ptr [RBP + -0x240] JC 0x001da4fd MOV RDI,qword ptr [RBP + -0x230] LEA RSI,[RBP + -0xd] MOV RDX,qword ptr [RBP + -0x228] CALL 0x0013ab20 CMP EAX,0x0 JNZ 0x001da4fd LAB_001da4d3: MOV RDI,qword ptr [RBP + -0x248] ADD RDI,0x1 LEA RSI,[RBP + -0xd] CALL 0x0013a9c0 MOV qword ptr [RBP + -0x230],RAX MOV RAX,qword ptr [RBP + -0x230] MOV byte ptr [RAX],0x2f JMP 0x001da5ea LAB_001da4fd: JMP 0x001da4ff LAB_001da4ff: JMP 0x001da5e6 LAB_001da504: MOV RAX,qword ptr [RBP + -0x230] MOV RCX,qword ptr [RBP + -0x240] SUB RAX,RCX MOV RCX,qword ptr [RBP + -0x228] SUB RCX,0x1 CMP RAX,RCX JNZ 0x001da55c MOV RDI,qword ptr [RBP + -0x240] LEA RSI,[RBP + -0xd] ADD RSI,0x1 MOV RDX,qword ptr [RBP + -0x228] SUB RDX,0x1 CALL 0x0013ab20 CMP EAX,0x0 JNZ 0x001da55c MOV RAX,qword ptr [RBP + -0x230] MOV qword ptr [RBP + -0x240],RAX JMP 0x001da5e4 LAB_001da55c: MOV RAX,qword ptr [RBP + -0x230] MOV RCX,qword ptr [RBP + -0x240] SUB RAX,RCX CMP RAX,0x0 JLE 0x001da597 MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX + -0x1] CMP EAX,0x2f JNZ 0x001da597 MOV RAX,qword ptr [RBP + -0x230] ADD RAX,-0x1 MOV qword ptr [RBP + -0x230],RAX JMP 0x001da5e2 LAB_001da597: MOV RAX,qword ptr [RBP + -0x230] MOV RCX,qword ptr [RBP + -0x240] SUB RAX,RCX CMP RAX,0x1 JLE 0x001da5e0 MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX + -0x1] CMP EAX,0x2e JNZ 0x001da5e0 MOV RAX,qword ptr [RBP + -0x230] MOVSX EAX,byte ptr [RAX + -0x2] CMP EAX,0x2f JNZ 0x001da5e0 MOV RAX,qword ptr [RBP + -0x230] ADD RAX,-0x2 MOV qword ptr [RBP + -0x230],RAX LAB_001da5e0: JMP 0x001da5e2 LAB_001da5e2: JMP 0x001da5e4 LAB_001da5e4: JMP 0x001da5e6 LAB_001da5e6: JMP 0x001da5e8 LAB_001da5e8: JMP 0x001da5ea LAB_001da5ea: MOV RAX,qword ptr [RBP + -0x230] ADD RAX,0x1 MOV qword ptr [RBP + -0x230],RAX JMP 0x001da208 LAB_001da601: MOV RDI,qword ptr [RBP + -0x218] LEA RSI,[RBP + -0x210] CALL 0x0013a9c0 JMP 0x001da616 LAB_001da616: JMP 0x001da618 LAB_001da618: MOV RAX,qword ptr [RBP + -0x230] LEA RCX,[RBP + -0x210] SUB RAX,RCX MOV qword ptr [RBP + -0x258],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001da652 MOV RAX,qword ptr [RBP + -0x258] ADD RSP,0x260 POP RBP RET LAB_001da652: CALL 0x0013a2a0
long cleanup_dirname(char *param_1,char *param_2) { char cVar1; int iVar2; char *pcVar3; ulong __n; char *pcVar4; long in_FS_OFFSET; bool bVar5; char *local_248; char *local_240; char *local_238; char local_218 [515]; char local_15; char acStack_14 [4]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_248 = local_218; local_15 = '/'; pcVar3 = stpcpy(acStack_14,".."); __n = (long)pcVar3 - (long)&local_15; local_240 = param_2; local_238 = local_248; do { cVar1 = *local_240; *local_238 = cVar1; if (cVar1 == '\0') { stpcpy(param_1,local_218); if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return (long)local_238 - (long)local_218; } if (*local_238 == '/') { *local_238 = '/'; } if (*local_238 == '/') { if ((__n < (ulong)((long)local_238 - (long)local_248)) && (iVar2 = memcmp(local_238 + -__n,&local_15,__n), iVar2 == 0)) { local_238 = local_238 + -__n; if (local_238 != local_248) { pcVar3 = local_238 + -1; if ((*pcVar3 == '~') && ((pcVar3 == local_248 || (local_238[-2] == '/')))) { if (home_dir == (char *)0x0) { local_238 = pcVar3 + __n + 1; goto LAB_001da5ea; } pcVar4 = stpcpy(local_218,home_dir); pcVar3 = pcVar4 + -1; if (pcVar4[-1] == '/') { pcVar3 = pcVar4 + -2; } } local_238 = pcVar3; pcVar3 = local_238; if ((*local_238 == '.') && ((local_238 == local_248 || (local_238[-1] == '/')))) { iVar2 = my_getwd(&curr_dir,0x200,0); if (iVar2 != 0) { local_238 = local_238 + __n + 1; goto LAB_001da5ea; } pcVar4 = stpcpy(local_218,&curr_dir); local_238 = pcVar4 + -1; pcVar3 = local_238; if (*local_238 == '/') { local_238 = pcVar4 + -2; pcVar3 = local_238; } } while( true ) { bVar5 = false; if (local_248 <= local_238) { bVar5 = *local_238 != '/'; } if (!bVar5) break; local_238 = local_238 + -1; } if ((local_238[1] == '~') || ((local_248 <= local_238 && (iVar2 = memcmp(local_238,&local_15,__n), iVar2 == 0)))) { local_238 = stpcpy(pcVar3 + 1,&local_15); *local_238 = '/'; } } } else if (((long)local_238 - (long)local_248 == __n - 1) && (iVar2 = memcmp(local_248,acStack_14,__n - 1), iVar2 == 0)) { local_248 = local_238; } else if (((long)local_238 - (long)local_248 < 1) || (local_238[-1] != '/')) { if ((1 < (long)local_238 - (long)local_248) && ((local_238[-1] == '.' && (local_238[-2] == '/')))) { local_238 = local_238 + -2; } } else { local_238 = local_238 + -1; } } LAB_001da5ea: local_238 = local_238 + 1; local_240 = local_240 + 1; } while( true ); }
20,680
evmone::advanced::Instruction const* evmone::advanced::(anonymous namespace)::op_create<(evmone::Opcode)240>(evmone::advanced::Instruction const*, evmone::advanced::AdvancedExecutionState&)
corpus-core[P]colibri-stateless/build_O1/_deps/evmone_external-src/lib/evmone/advanced_instructions.cpp
const Instruction* op_create(const Instruction* instr, AdvancedExecutionState& state) noexcept { const auto gas_left_correction = state.current_block_cost - instr->arg.number; state.gas_left += gas_left_correction; const auto status = instr::impl<Op>(state); if (status != EVMC_SUCCESS) return state.exit(status); if ((state.gas_left -= gas_left_correction) < 0) return state.exit(EVMC_OUT_OF_GAS); return ++instr; }
O1
cpp
evmone::advanced::Instruction const* evmone::advanced::(anonymous namespace)::op_create<(evmone::Opcode)240>(evmone::advanced::Instruction const*, evmone::advanced::AdvancedExecutionState&): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx movl 0x230(%rsi), %r15d subq 0x8(%rdi), %r15 movq 0x220(%rsi), %rsi addq %r15, %rsi movq %rsi, 0x220(%r14) movq 0x228(%r14), %rdi movq %r14, %rdx callq 0x4db02 movq %rdx, 0x220(%r14) addq $-0x40, 0x228(%r14) testl %eax, %eax je 0x53b77 movl %eax, 0x78(%r14) xorl %ebx, %ebx jmp 0x53b87 subq %r15, %rdx movq %rdx, 0x220(%r14) js 0x53b90 addq $0x10, %rbx movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq movl $0x3, 0x78(%r14) jmp 0x53b73
_ZN6evmone8advanced12_GLOBAL__N_19op_createILNS_6OpcodeE240EEEPKNS0_11InstructionES6_RNS0_22AdvancedExecutionStateE: push r15 push r14 push rbx mov r14, rsi mov rbx, rdi mov r15d, [rsi+230h] sub r15, [rdi+8] mov rsi, [rsi+220h] add rsi, r15 mov [r14+220h], rsi mov rdi, [r14+228h] mov rdx, r14 call _ZN6evmone5instr4core11create_implILNS_6OpcodeE240EEENS_6ResultENS_8StackTopElRNS_14ExecutionStateE; evmone::instr::core::create_impl<(evmone::Opcode)240>(evmone::StackTop,long,evmone::ExecutionState &) mov [r14+220h], rdx add qword ptr [r14+228h], 0FFFFFFFFFFFFFFC0h test eax, eax jz short loc_53B77 mov [r14+78h], eax loc_53B73: xor ebx, ebx jmp short loc_53B87 loc_53B77: sub rdx, r15 mov [r14+220h], rdx js short loc_53B90 add rbx, 10h loc_53B87: mov rax, rbx pop rbx pop r14 pop r15 retn loc_53B90: mov dword ptr [r14+78h], 3 jmp short loc_53B73
long long evmone::advanced::`anonymous namespace'::op_create<(evmone::Opcode)240>(long long a1, long long a2) { long long v3; // r15 evmone *v4; // rsi int v5; // eax long long v6; // rdx long long v8; // rdx v3 = *(unsigned int *)(a2 + 560) - *(_QWORD *)(a1 + 8); v4 = (evmone *)(v3 + *(_QWORD *)(a2 + 544)); *(_QWORD *)(a2 + 544) = v4; v5 = evmone::instr::core::create_impl<(evmone::Opcode)240>(*(unsigned __int128 **)(a2 + 552), v4, a2); *(_QWORD *)(a2 + 544) = v6; *(_QWORD *)(a2 + 552) -= 64LL; if ( v5 ) { *(_DWORD *)(a2 + 120) = v5; } else { v8 = v6 - v3; *(_QWORD *)(a2 + 544) = v8; if ( v8 >= 0 ) return a1 + 16; *(_DWORD *)(a2 + 120) = 3; } return 0LL; }
op_create<(evmone::Opcode)240>: PUSH R15 PUSH R14 PUSH RBX MOV R14,RSI MOV RBX,RDI MOV R15D,dword ptr [RSI + 0x230] SUB R15,qword ptr [RDI + 0x8] MOV RSI,qword ptr [RSI + 0x220] ADD RSI,R15 MOV qword ptr [R14 + 0x220],RSI MOV RDI,qword ptr [R14 + 0x228] MOV RDX,R14 CALL 0x0014db02 MOV qword ptr [R14 + 0x220],RDX ADD qword ptr [R14 + 0x228],-0x40 TEST EAX,EAX JZ 0x00153b77 MOV dword ptr [R14 + 0x78],EAX LAB_00153b73: XOR EBX,EBX JMP 0x00153b87 LAB_00153b77: SUB RDX,R15 MOV qword ptr [R14 + 0x220],RDX JS 0x00153b90 ADD RBX,0x10 LAB_00153b87: MOV RAX,RBX POP RBX POP R14 POP R15 RET LAB_00153b90: MOV dword ptr [R14 + 0x78],0x3 JMP 0x00153b73
/* evmone::advanced::Instruction const* evmone::advanced::(anonymous namespace)::op_create<(evmone::Opcode)240>(evmone::advanced::Instruction const*, evmone::advanced::AdvancedExecutionState&) */ Instruction * evmone::advanced::(anonymous_namespace)::op_create<(evmone::Opcode)240> (Instruction *param_1,AdvancedExecutionState *param_2) { uint uVar1; int iVar2; long extraout_RDX; long lVar3; long lVar4; uVar1 = *(uint *)(param_2 + 0x230); lVar3 = *(long *)(param_1 + 8); lVar4 = *(long *)(param_2 + 0x220) + ((ulong)uVar1 - lVar3); *(long *)(param_2 + 0x220) = lVar4; iVar2 = instr::core::create_impl<(evmone::Opcode)240> (*(int8 *)(param_2 + 0x228),lVar4,param_2); *(long *)(param_2 + 0x220) = extraout_RDX; *(long *)(param_2 + 0x228) = *(long *)(param_2 + 0x228) + -0x40; if (iVar2 == 0) { lVar3 = extraout_RDX - ((ulong)uVar1 - lVar3); *(long *)(param_2 + 0x220) = lVar3; if (-1 < lVar3) { return param_1 + 0x10; } *(int4 *)(param_2 + 0x78) = 3; } else { *(int *)(param_2 + 0x78) = iVar2; } return (Instruction *)0x0; }
20,681
finish_resize_simple_key_cache
eloqsql/mysys/mf_keycache.c
static void finish_resize_simple_key_cache(SIMPLE_KEY_CACHE_CB *keycache) { DBUG_ENTER("finish_resize_simple_key_cache"); mysql_mutex_assert_owner(&keycache->cache_lock); /* Mark the resize finished. This allows other threads to start a resize or to request new cache blocks. */ keycache->in_resize= 0; /* Signal waiting threads. */ release_whole_queue(&keycache->resize_queue); keycache_pthread_mutex_unlock(&keycache->cache_lock); DBUG_VOID_RETURN; }
O3
c
finish_resize_simple_key_cache: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx movb $0x0, 0x1(%rdi) addq $0x108, %rdi # imm = 0x108 callq 0x989b9 movq 0x100(%rbx), %rdi testq %rdi, %rdi jne 0x99e9c addq $0xc0, %rbx movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %rbp jmp 0x291e0 leaq 0x2ec16d(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x99e87
finish_resize_simple_key_cache: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi mov byte ptr [rdi+1], 0 add rdi, 108h call release_whole_queue mov rdi, [rbx+100h] test rdi, rdi jnz short loc_99E9C loc_99E87: add rbx, 0C0h mov rdi, rbx add rsp, 8 pop rbx pop rbp jmp _pthread_mutex_unlock loc_99E9C: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_99E87
long long finish_resize_simple_key_cache(long long a1) { long long v2; // rdi *(_BYTE *)(a1 + 1) = 0; release_whole_queue((long long *)(a1 + 264)); v2 = *(_QWORD *)(a1 + 256); if ( v2 ) ((void ( *)(long long))PSI_server[44])(v2); return pthread_mutex_unlock(a1 + 192); }
finish_resize_simple_key_cache: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI MOV byte ptr [RDI + 0x1],0x0 ADD RDI,0x108 CALL 0x001989b9 MOV RDI,qword ptr [RBX + 0x100] TEST RDI,RDI JNZ 0x00199e9c LAB_00199e87: ADD RBX,0xc0 MOV RDI,RBX ADD RSP,0x8 POP RBX POP RBP JMP 0x001291e0 LAB_00199e9c: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00199e87
void finish_resize_simple_key_cache(long param_1) { *(int1 *)(param_1 + 1) = 0; release_whole_queue(param_1 + 0x108); if (*(long *)(param_1 + 0x100) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0xc0)); return; }
20,682
write_tail
eloqsql/storage/maria/ma_blockrec.c
static my_bool write_tail(MARIA_HA *info, MARIA_BITMAP_BLOCK *block, uchar *row_part, uint org_length) { MARIA_SHARE *share= info->s; MARIA_PINNED_PAGE page_link; uint block_size= share->block_size, empty_space, length= org_length; struct st_row_pos_info row_pos; my_off_t position; my_bool res, block_is_read; DBUG_ENTER("write_tail"); DBUG_PRINT("enter", ("page: %lu length: %u", (ulong) block->page, length)); info->keyread_buff_used= 1; /* Don't allocate smaller block than MIN_TAIL_SIZE (we want to give rows some place to grow in the future) */ if (length < MIN_TAIL_SIZE) length= MIN_TAIL_SIZE; if (block->page_count == TAIL_PAGE_COUNT_MARKER) { /* Create new tail page will be pinned & locked by get_head_or_tail_page */ if (get_head_or_tail_page(info, block, info->keyread_buff, length, TAIL_PAGE, PAGECACHE_LOCK_WRITE, &row_pos)) DBUG_RETURN(1); } else { /* Write tail on predefined row position */ if (get_rowpos_in_head_or_tail_page(info, block, info->keyread_buff, length, TAIL_PAGE, PAGECACHE_LOCK_WRITE, block->page_count & ~TAIL_BIT, &row_pos)) DBUG_RETURN(1); } DBUG_PRINT("info", ("tailid: %lu (%lu:%u)", (ulong) ma_recordpos(block->page, row_pos.rownr), (ulong) block->page, row_pos.rownr)); block_is_read= block->org_bitmap_value != 0; memcpy(row_pos.data, row_part, org_length); if (share->now_transactional) { /* Log changes in tail block */ uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE + DIRPOS_STORE_SIZE]; LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 2]; LSN lsn; /* Log REDO changes of tail page Note that we have to log length, not org_length, to be sure that REDO, which doesn't use write_tail, also creates a block of at least MIN_TAIL_SIZE */ page_store(log_data + FILEID_STORE_SIZE, block->page); dirpos_store(log_data + FILEID_STORE_SIZE + PAGE_STORE_SIZE, row_pos.rownr); log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data; log_array[TRANSLOG_INTERNAL_PARTS + 0].length= sizeof(log_data); log_array[TRANSLOG_INTERNAL_PARTS + 1].str= row_pos.data; log_array[TRANSLOG_INTERNAL_PARTS + 1].length= length; if (translog_write_record(&lsn, (block_is_read ? LOGREC_REDO_INSERT_ROW_TAIL : LOGREC_REDO_NEW_ROW_TAIL), info->trn, info, (translog_size_t) (sizeof(log_data) + length), TRANSLOG_INTERNAL_PARTS + 2, log_array, log_data, NULL)) DBUG_RETURN(1); } int2store(row_pos.dir + 2, length); empty_space= row_pos.empty_space - length; int2store(row_pos.buff + EMPTY_SPACE_OFFSET, empty_space); block->page_count= row_pos.rownr + TAIL_BIT; /* If there is less directory entries free than number of possible tails we can write for a row, we mark the page full to ensure that we don't during _ma_bitmap_find_place() allocate more entries on the tail page than it can hold */ block->empty_space= (enough_free_entries(row_pos.buff, share->block_size, 1 + share->base.blobs) ? empty_space : 0); /* Keep BLOCKUSED_USE_ORG_BITMAP */ block->used|= BLOCKUSED_USED | BLOCKUSED_TAIL; if (block_is_read) { /* Current page link is last element in pinned_pages */ MARIA_PINNED_PAGE *page_link; page_link= dynamic_element(&info->pinned_pages, info->pinned_pages.elements-1, MARIA_PINNED_PAGE*); pagecache_unlock_by_link(share->pagecache, page_link->link, PAGECACHE_LOCK_WRITE_TO_READ, PAGECACHE_PIN_LEFT_PINNED, LSN_IMPOSSIBLE, LSN_IMPOSSIBLE, 1, FALSE); DBUG_ASSERT(page_link->changed); page_link->unlock= PAGECACHE_LOCK_READ_UNLOCK; res= 0; } else { if (!(res= pagecache_write(share->pagecache, &info->dfile, block->page, 0, row_pos.buff,share->page_type, PAGECACHE_LOCK_READ, PAGECACHE_PIN, PAGECACHE_WRITE_DELAY, &page_link.link, LSN_IMPOSSIBLE))) { DBUG_ASSERT(page_link.link); page_link.unlock= PAGECACHE_LOCK_READ_UNLOCK; page_link.changed= 1; push_dynamic(&info->pinned_pages, (void*) &page_link); } /* Increase data file size, if extended */ position= (my_off_t) block->page * block_size; if (share->state.state.data_file_length <= position) { /* We are modifying a state member before writing the UNDO; this is a WAL violation. But for data_file_length this is ok, as long as we change data_file_length after writing any log record (FILE_ID/REDO/UNDO) (see collect_tables()). */ _ma_set_share_data_file_length(share, position + block_size); } } DBUG_RETURN(res); }
O0
c
write_tail: pushq %rbp movq %rsp, %rbp subq $0x150, %rsp # imm = 0x150 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x20(%rbp) movq %rsi, -0x28(%rbp) movq %rdx, -0x30(%rbp) movl %ecx, -0x34(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movl 0x7bc(%rax), %eax movl %eax, -0x5c(%rbp) movl -0x34(%rbp), %eax movl %eax, -0x64(%rbp) jmp 0x5e4c7 movq -0x20(%rbp), %rax movb $0x1, 0x685(%rax) cmpl $0x20, -0x64(%rbp) jae 0x5e4df movl $0x20, -0x64(%rbp) movq -0x28(%rbp), %rax cmpl $0xffff, 0x8(%rax) # imm = 0xFFFF jne 0x5e52f movq -0x20(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x20(%rbp), %rax movq 0x380(%rax), %rdx movl -0x64(%rbp), %ecx movl $0x2, %r8d movl $0x4, %r9d leaq -0x90(%rbp), %rax movq %rax, (%rsp) callq 0x5db70 cmpb $0x0, %al je 0x5e52d jmp 0x5e524 movb $0x1, -0x11(%rbp) jmp 0x5e8d8 jmp 0x5e586 movq -0x20(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x20(%rbp), %rax movq 0x380(%rax), %rdx movl -0x64(%rbp), %ecx movq -0x28(%rbp), %rax movl 0x8(%rax), %r10d andl $0xffff7fff, %r10d # imm = 0xFFFF7FFF movl $0x2, %r8d movl $0x4, %r9d leaq -0x90(%rbp), %rax movl %r10d, (%rsp) movq %rax, 0x8(%rsp) callq 0x5aa60 cmpb $0x0, %al je 0x5e584 jmp 0x5e57b movb $0x1, -0x11(%rbp) jmp 0x5e8d8 jmp 0x5e586 jmp 0x5e588 jmp 0x5e58a movq -0x28(%rbp), %rax movzbl 0x15(%rax), %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax movb %al, -0x9a(%rbp) movq -0x88(%rbp), %rdi movq -0x30(%rbp), %rsi movl -0x34(%rbp), %eax movl %eax, %edx callq 0x2a0b0 movq -0x40(%rbp), %rax cmpb $0x0, 0x7e7(%rax) je 0x5e6a7 jmp 0x5e5cb leaq -0x10(%rbp), %rax addq $0x2, %rax movq %rax, -0xf0(%rbp) movq -0x28(%rbp), %rax movq (%rax), %rax movl %eax, %ecx movq -0xf0(%rbp), %rax movl %ecx, (%rax) movq -0x28(%rbp), %rax movq (%rax), %rax shrq $0x20, %rax movb %al, %cl movq -0xf0(%rbp), %rax movb %cl, 0x4(%rax) movl -0x74(%rbp), %eax movb %al, -0x9(%rbp) leaq -0x10(%rbp), %rax movq %rax, -0xc0(%rbp) movq $0x8, -0xb8(%rbp) movq -0x88(%rbp), %rax movq %rax, -0xb0(%rbp) movl -0x64(%rbp), %eax movq %rax, -0xa8(%rbp) movsbl -0x9a(%rbp), %ecx movl $0x4, %esi movl $0x2, %eax cmpl $0x0, %ecx cmovnel %eax, %esi movq -0x20(%rbp), %rax movq 0x8(%rax), %rdx movq -0x20(%rbp), %rcx movl -0x64(%rbp), %eax addq $0x8, %rax movl %eax, %r8d leaq -0xe0(%rbp), %r10 leaq -0x10(%rbp), %rax leaq -0xe8(%rbp), %rdi movl $0x4, %r9d xorl %r11d, %r11d movq %r10, (%rsp) movq %rax, 0x8(%rsp) movq $0x0, 0x10(%rsp) callq 0x8e280 cmpb $0x0, %al je 0x5e6a5 jmp 0x5e69c movb $0x1, -0x11(%rbp) jmp 0x5e8d8 jmp 0x5e6a7 jmp 0x5e6a9 movq -0x80(%rbp), %rax addq $0x2, %rax movq %rax, -0xf8(%rbp) movl -0x64(%rbp), %eax movw %ax, %cx movq -0xf8(%rbp), %rax movw %cx, (%rax) movl -0x70(%rbp), %eax subl -0x64(%rbp), %eax movl %eax, -0x60(%rbp) movq -0x90(%rbp), %rax addq $0xa, %rax movq %rax, -0x100(%rbp) movl -0x60(%rbp), %eax movw %ax, %cx movq -0x100(%rbp), %rax movw %cx, (%rax) movl -0x74(%rbp), %ecx addl $0x8000, %ecx # imm = 0x8000 movq -0x28(%rbp), %rax movl %ecx, 0x8(%rax) movq -0x90(%rbp), %rdi movq -0x40(%rbp), %rax movl 0x7bc(%rax), %esi movq -0x40(%rbp), %rax movl 0x3f0(%rax), %edx addl $0x1, %edx callq 0x525f0 movsbl %al, %eax cmpl $0x0, %eax je 0x5e739 movl -0x60(%rbp), %eax movl %eax, -0x10c(%rbp) jmp 0x5e743 xorl %eax, %eax movl %eax, -0x10c(%rbp) jmp 0x5e743 movl -0x10c(%rbp), %ecx movq -0x28(%rbp), %rax movl %ecx, 0xc(%rax) movq -0x28(%rbp), %rax movzbl 0x14(%rax), %ecx orl $0x5, %ecx movb %cl, 0x14(%rax) cmpb $0x0, -0x9a(%rbp) je 0x5e7e3 movq -0x20(%rbp), %rax movq 0x2e8(%rax), %rax movq -0x20(%rbp), %rcx movl 0x2f0(%rcx), %ecx subl $0x1, %ecx movl %ecx, %ecx imulq $0x18, %rcx, %rcx addq %rcx, %rax movq %rax, -0x108(%rbp) movq -0x40(%rbp), %rax movq 0x600(%rax), %rdi movq -0x108(%rbp), %rax movq (%rax), %rsi movl $0x7, %edx xorl %ecx, %ecx xorl %eax, %eax movl %eax, %r9d movq %r9, %r8 movl $0x1, (%rsp) movl $0x0, 0x8(%rsp) callq 0x991d0 jmp 0x5e7c9 movq -0x108(%rbp), %rax movl $0x5, 0x8(%rax) movb $0x0, -0x99(%rbp) jmp 0x5e8cd movq -0x40(%rbp), %rax movq 0x600(%rax), %rdi movq -0x20(%rbp), %rsi addq $0x470, %rsi # imm = 0x470 movq -0x28(%rbp), %rax movq (%rax), %rdx movq -0x90(%rbp), %r8 movq -0x40(%rbp), %rax movl 0x7d4(%rax), %r9d leaq -0x58(%rbp), %r10 movq -0x40(%rbp), %rax movq 0x600(%rax), %rax movl 0x80(%rax), %eax xorl %ecx, %ecx xorl %r11d, %r11d movl $0x3, (%rsp) movl $0x2, 0x8(%rsp) movl $0x0, 0x10(%rsp) movq %r10, 0x18(%rsp) movq $0x0, 0x20(%rsp) movl $0x0, 0x28(%rsp) movl %eax, 0x30(%rsp) callq 0x9ab30 movb %al, -0x99(%rbp) cmpb $0x0, %al jne 0x5e88f jmp 0x5e86e jmp 0x5e870 movl $0x5, -0x50(%rbp) movb $0x1, -0x48(%rbp) movq -0x20(%rbp), %rdi addq $0x2e8, %rdi # imm = 0x2E8 leaq -0x58(%rbp), %rsi callq 0xdf950 movq -0x28(%rbp), %rax movq (%rax), %rax movl -0x5c(%rbp), %ecx imulq %rcx, %rax movq %rax, -0x98(%rbp) movq -0x40(%rbp), %rax movq 0x40(%rax), %rax cmpq -0x98(%rbp), %rax ja 0x5e8cb movq -0x40(%rbp), %rdi movq -0x98(%rbp), %rsi movl -0x5c(%rbp), %eax addq %rax, %rsi callq 0x46dc0 jmp 0x5e8cd jmp 0x5e8cf movb -0x99(%rbp), %al movb %al, -0x11(%rbp) movb -0x11(%rbp), %al movb %al, -0x10d(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x5e902 movb -0x10d(%rbp), %al addq $0x150, %rsp # imm = 0x150 popq %rbp retq callq 0x2a250 nopw (%rax,%rax)
write_tail: push rbp mov rbp, rsp sub rsp, 150h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_20], rdi mov [rbp+var_28], rsi mov [rbp+var_30], rdx mov [rbp+var_34], ecx mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_40], rax mov rax, [rbp+var_40] mov eax, [rax+7BCh] mov [rbp+var_5C], eax mov eax, [rbp+var_34] mov [rbp+var_64], eax jmp short $+2 loc_5E4C7: mov rax, [rbp+var_20] mov byte ptr [rax+685h], 1 cmp [rbp+var_64], 20h ; ' ' jnb short loc_5E4DF mov [rbp+var_64], 20h ; ' ' loc_5E4DF: mov rax, [rbp+var_28] cmp dword ptr [rax+8], 0FFFFh jnz short loc_5E52F mov rdi, [rbp+var_20] mov rsi, [rbp+var_28] mov rax, [rbp+var_20] mov rdx, [rax+380h] mov ecx, [rbp+var_64] mov r8d, 2 mov r9d, 4 lea rax, [rbp+var_90] mov [rsp+150h+var_150], rax call get_head_or_tail_page cmp al, 0 jz short loc_5E52D jmp short $+2 loc_5E524: mov [rbp+var_11], 1 jmp loc_5E8D8 loc_5E52D: jmp short loc_5E586 loc_5E52F: mov rdi, [rbp+var_20] mov rsi, [rbp+var_28] mov rax, [rbp+var_20] mov rdx, [rax+380h] mov ecx, [rbp+var_64] mov rax, [rbp+var_28] mov r10d, [rax+8] and r10d, 0FFFF7FFFh mov r8d, 2 mov r9d, 4 lea rax, [rbp+var_90] mov dword ptr [rsp+150h+var_150], r10d mov [rsp+150h+var_148], rax call get_rowpos_in_head_or_tail_page cmp al, 0 jz short loc_5E584 jmp short $+2 loc_5E57B: mov [rbp+var_11], 1 jmp loc_5E8D8 loc_5E584: jmp short $+2 loc_5E586: jmp short $+2 loc_5E588: jmp short $+2 loc_5E58A: mov rax, [rbp+var_28] movzx eax, byte ptr [rax+15h] cmp eax, 0 setnz al and al, 1 movzx eax, al mov [rbp+var_9A], al mov rdi, [rbp+var_88] mov rsi, [rbp+var_30] mov eax, [rbp+var_34] mov edx, eax call _memcpy mov rax, [rbp+var_40] cmp byte ptr [rax+7E7h], 0 jz loc_5E6A7 jmp short $+2 loc_5E5CB: lea rax, [rbp+var_10] add rax, 2 mov [rbp+var_F0], rax mov rax, [rbp+var_28] mov rax, [rax] mov ecx, eax mov rax, [rbp+var_F0] mov [rax], ecx mov rax, [rbp+var_28] mov rax, [rax] shr rax, 20h mov cl, al mov rax, [rbp+var_F0] mov [rax+4], cl mov eax, [rbp+var_74] mov [rbp+var_9], al lea rax, [rbp+var_10] mov [rbp+var_C0], rax mov [rbp+var_B8], 8 mov rax, [rbp+var_88] mov [rbp+var_B0], rax mov eax, [rbp+var_64] mov [rbp+var_A8], rax movsx ecx, [rbp+var_9A] mov esi, 4 mov eax, 2 cmp ecx, 0 cmovnz esi, eax mov rax, [rbp+var_20] mov rdx, [rax+8] mov rcx, [rbp+var_20] mov eax, [rbp+var_64] add rax, 8 mov r8d, eax lea r10, [rbp+var_E0] lea rax, [rbp+var_10] lea rdi, [rbp+var_E8] mov r9d, 4 xor r11d, r11d mov [rsp+150h+var_150], r10 mov [rsp+150h+var_148], rax mov [rsp+150h+var_140], 0 call translog_write_record cmp al, 0 jz short loc_5E6A5 jmp short $+2 loc_5E69C: mov [rbp+var_11], 1 jmp loc_5E8D8 loc_5E6A5: jmp short $+2 loc_5E6A7: jmp short $+2 loc_5E6A9: mov rax, [rbp+var_80] add rax, 2 mov [rbp+var_F8], rax mov eax, [rbp+var_64] mov cx, ax mov rax, [rbp+var_F8] mov [rax], cx mov eax, [rbp+var_70] sub eax, [rbp+var_64] mov [rbp+var_60], eax mov rax, [rbp+var_90] add rax, 0Ah mov [rbp+var_100], rax mov eax, [rbp+var_60] mov cx, ax mov rax, [rbp+var_100] mov [rax], cx mov ecx, [rbp+var_74] add ecx, 8000h mov rax, [rbp+var_28] mov [rax+8], ecx mov rdi, [rbp+var_90] mov rax, [rbp+var_40] mov esi, [rax+7BCh] mov rax, [rbp+var_40] mov edx, [rax+3F0h] add edx, 1 call enough_free_entries movsx eax, al cmp eax, 0 jz short loc_5E739 mov eax, [rbp+var_60] mov [rbp+var_10C], eax jmp short loc_5E743 loc_5E739: xor eax, eax mov [rbp+var_10C], eax jmp short $+2 loc_5E743: mov ecx, [rbp+var_10C] mov rax, [rbp+var_28] mov [rax+0Ch], ecx mov rax, [rbp+var_28] movzx ecx, byte ptr [rax+14h] or ecx, 5 mov [rax+14h], cl cmp [rbp+var_9A], 0 jz short loc_5E7E3 mov rax, [rbp+var_20] mov rax, [rax+2E8h] mov rcx, [rbp+var_20] mov ecx, [rcx+2F0h] sub ecx, 1 mov ecx, ecx imul rcx, 18h add rax, rcx mov [rbp+var_108], rax mov rax, [rbp+var_40] mov rdi, [rax+600h] mov rax, [rbp+var_108] mov rsi, [rax] mov edx, 7 xor ecx, ecx xor eax, eax mov r9d, eax mov r8, r9 mov dword ptr [rsp+150h+var_150], 1 mov dword ptr [rsp+150h+var_148], 0 call pagecache_unlock_by_link jmp short $+2 loc_5E7C9: mov rax, [rbp+var_108] mov dword ptr [rax+8], 5 mov [rbp+var_99], 0 jmp loc_5E8CD loc_5E7E3: mov rax, [rbp+var_40] mov rdi, [rax+600h] mov rsi, [rbp+var_20] add rsi, 470h mov rax, [rbp+var_28] mov rdx, [rax] mov r8, [rbp+var_90] mov rax, [rbp+var_40] mov r9d, [rax+7D4h] lea r10, [rbp+var_58] mov rax, [rbp+var_40] mov rax, [rax+600h] mov eax, [rax+80h] xor ecx, ecx xor r11d, r11d mov dword ptr [rsp+150h+var_150], 3 mov dword ptr [rsp+150h+var_148], 2 mov dword ptr [rsp+150h+var_140], 0 mov [rsp+150h+var_138], r10 mov [rsp+150h+var_130], 0 mov [rsp+150h+var_128], 0 mov [rsp+150h+var_120], eax call pagecache_write_part mov [rbp+var_99], al cmp al, 0 jnz short loc_5E88F jmp short $+2 loc_5E86E: jmp short $+2 loc_5E870: mov [rbp+var_50], 5 mov [rbp+var_48], 1 mov rdi, [rbp+var_20] add rdi, 2E8h lea rsi, [rbp+var_58] call insert_dynamic loc_5E88F: mov rax, [rbp+var_28] mov rax, [rax] mov ecx, [rbp+var_5C] imul rax, rcx mov [rbp+var_98], rax mov rax, [rbp+var_40] mov rax, [rax+40h] cmp rax, [rbp+var_98] ja short loc_5E8CB mov rdi, [rbp+var_40] mov rsi, [rbp+var_98] mov eax, [rbp+var_5C] add rsi, rax call _ma_set_share_data_file_length loc_5E8CB: jmp short $+2 loc_5E8CD: jmp short $+2 loc_5E8CF: mov al, [rbp+var_99] mov [rbp+var_11], al loc_5E8D8: mov al, [rbp+var_11] mov [rbp+var_10D], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_5E902 mov al, [rbp+var_10D] add rsp, 150h pop rbp retn loc_5E902: call ___stack_chk_fail
char write_tail(long long a1, long long a2, long long a3, unsigned int a4) { int v4; // esi int v6; // [rsp+44h] [rbp-10Ch] long long v7; // [rsp+48h] [rbp-108h] char v8; // [rsp+68h] [rbp-E8h] BYREF _BYTE v9[32]; // [rsp+70h] [rbp-E0h] BYREF _BYTE *v10; // [rsp+90h] [rbp-C0h] long long v11; // [rsp+98h] [rbp-B8h] long long v12; // [rsp+A0h] [rbp-B0h] long long v13; // [rsp+A8h] [rbp-A8h] bool v14; // [rsp+B6h] [rbp-9Ah] char v15; // [rsp+B7h] [rbp-99h] unsigned long long v16; // [rsp+B8h] [rbp-98h] long long v17; // [rsp+C0h] [rbp-90h] BYREF long long v18; // [rsp+C8h] [rbp-88h] long long v19; // [rsp+D0h] [rbp-80h] int v20; // [rsp+DCh] [rbp-74h] int v21; // [rsp+E0h] [rbp-70h] unsigned int v22; // [rsp+ECh] [rbp-64h] int v23; // [rsp+F0h] [rbp-60h] unsigned int v24; // [rsp+F4h] [rbp-5Ch] _BYTE v25[8]; // [rsp+F8h] [rbp-58h] BYREF int v26; // [rsp+100h] [rbp-50h] char v27; // [rsp+108h] [rbp-48h] long long v28; // [rsp+110h] [rbp-40h] unsigned int v29; // [rsp+11Ch] [rbp-34h] long long v30; // [rsp+120h] [rbp-30h] long long v31; // [rsp+128h] [rbp-28h] long long *v32; // [rsp+130h] [rbp-20h] _BYTE v34[2]; // [rsp+140h] [rbp-10h] BYREF int v35; // [rsp+142h] [rbp-Eh] char v36; // [rsp+146h] [rbp-Ah] char v37; // [rsp+147h] [rbp-9h] unsigned long long v38; // [rsp+148h] [rbp-8h] v38 = __readfsqword(0x28u); v32 = (long long *)a1; v31 = a2; v30 = a3; v29 = a4; v28 = *(_QWORD *)a1; v24 = *(_DWORD *)(v28 + 1980); v22 = a4; *(_BYTE *)(a1 + 1669) = 1; if ( v22 < 0x20 ) v22 = 32; if ( *(_DWORD *)(v31 + 8) == 0xFFFF ) { if ( get_head_or_tail_page(v32, v31, (_BYTE *)v32[112], v22, 2, 4, (long long)&v17) ) return 1; } else if ( get_rowpos_in_head_or_tail_page( v32, v31, (_BYTE *)v32[112], v22, 2, 4, *(_DWORD *)(v31 + 8) & 0xFFFF7FFF, (long long)&v17) ) { return 1; } v14 = *(_BYTE *)(v31 + 21) != 0; memcpy(v18, v30, v29); if ( !*(_BYTE *)(v28 + 2023) ) goto LABEL_14; v35 = *(_QWORD *)v31; v36 = BYTE4(*(_QWORD *)v31); v37 = v20; v10 = v34; v11 = 8LL; v12 = v18; v13 = v22; v4 = 4; if ( v14 ) v4 = 2; if ( (unsigned __int8)translog_write_record( (unsigned int)&v8, v4, v32[1], (_DWORD)v32, v22 + 8, 4, (long long)v9, (long long)v34, 0LL) ) return 1; LABEL_14: *(_WORD *)(v19 + 2) = v22; v23 = v21 - v22; *(_WORD *)(v17 + 10) = v21 - v22; *(_DWORD *)(v31 + 8) = v20 + 0x8000; if ( enough_free_entries(v17, *(_DWORD *)(v28 + 1980), *(_DWORD *)(v28 + 1008) + 1) ) v6 = v23; else v6 = 0; *(_DWORD *)(v31 + 12) = v6; *(_BYTE *)(v31 + 20) |= 5u; if ( v14 ) { v7 = 24LL * (unsigned int)(*((_DWORD *)v32 + 188) - 1) + v32[93]; pagecache_unlock_by_link(*(_QWORD *)(v28 + 1536), *(_QWORD *)v7, 7, 0, 0, 0, 1, 0); *(_DWORD *)(v7 + 8) = 5; return 0; } else { v15 = pagecache_write_part( *(_QWORD *)(v28 + 1536), (int)v32 + 1136, *(_QWORD *)v31, 0, v17, *(_DWORD *)(v28 + 2004), 3, 2, 0, (long long)v25, 0LL, 0, *(_DWORD *)(*(_QWORD *)(v28 + 1536) + 128LL)); if ( !v15 ) { v26 = 5; v27 = 1; insert_dynamic(v32 + 93, v25); } v16 = v24 * *(_QWORD *)v31; if ( *(_QWORD *)(v28 + 64) <= v16 ) ma_set_share_data_file_length(v28, v24 + v16); } return v15; }
write_tail: PUSH RBP MOV RBP,RSP SUB RSP,0x150 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x20],RDI MOV qword ptr [RBP + -0x28],RSI MOV qword ptr [RBP + -0x30],RDX MOV dword ptr [RBP + -0x34],ECX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RAX + 0x7bc] MOV dword ptr [RBP + -0x5c],EAX MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x64],EAX JMP 0x0015e4c7 LAB_0015e4c7: MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x685],0x1 CMP dword ptr [RBP + -0x64],0x20 JNC 0x0015e4df MOV dword ptr [RBP + -0x64],0x20 LAB_0015e4df: MOV RAX,qword ptr [RBP + -0x28] CMP dword ptr [RAX + 0x8],0xffff JNZ 0x0015e52f MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RAX + 0x380] MOV ECX,dword ptr [RBP + -0x64] MOV R8D,0x2 MOV R9D,0x4 LEA RAX,[RBP + -0x90] MOV qword ptr [RSP],RAX CALL 0x0015db70 CMP AL,0x0 JZ 0x0015e52d JMP 0x0015e524 LAB_0015e524: MOV byte ptr [RBP + -0x11],0x1 JMP 0x0015e8d8 LAB_0015e52d: JMP 0x0015e586 LAB_0015e52f: MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RAX + 0x380] MOV ECX,dword ptr [RBP + -0x64] MOV RAX,qword ptr [RBP + -0x28] MOV R10D,dword ptr [RAX + 0x8] AND R10D,0xffff7fff MOV R8D,0x2 MOV R9D,0x4 LEA RAX,[RBP + -0x90] MOV dword ptr [RSP],R10D MOV qword ptr [RSP + 0x8],RAX CALL 0x0015aa60 CMP AL,0x0 JZ 0x0015e584 JMP 0x0015e57b LAB_0015e57b: MOV byte ptr [RBP + -0x11],0x1 JMP 0x0015e8d8 LAB_0015e584: JMP 0x0015e586 LAB_0015e586: JMP 0x0015e588 LAB_0015e588: JMP 0x0015e58a LAB_0015e58a: MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX + 0x15] CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x9a],AL MOV RDI,qword ptr [RBP + -0x88] MOV RSI,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RBP + -0x34] MOV EDX,EAX CALL 0x0012a0b0 MOV RAX,qword ptr [RBP + -0x40] CMP byte ptr [RAX + 0x7e7],0x0 JZ 0x0015e6a7 JMP 0x0015e5cb LAB_0015e5cb: LEA RAX,[RBP + -0x10] ADD RAX,0x2 MOV qword ptr [RBP + -0xf0],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0xf0] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] SHR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0xf0] MOV byte ptr [RAX + 0x4],CL MOV EAX,dword ptr [RBP + -0x74] MOV byte ptr [RBP + -0x9],AL LEA RAX,[RBP + -0x10] MOV qword ptr [RBP + -0xc0],RAX MOV qword ptr [RBP + -0xb8],0x8 MOV RAX,qword ptr [RBP + -0x88] MOV qword ptr [RBP + -0xb0],RAX MOV EAX,dword ptr [RBP + -0x64] MOV qword ptr [RBP + -0xa8],RAX MOVSX ECX,byte ptr [RBP + -0x9a] MOV ESI,0x4 MOV EAX,0x2 CMP ECX,0x0 CMOVNZ ESI,EAX MOV RAX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x64] ADD RAX,0x8 MOV R8D,EAX LEA R10,[RBP + -0xe0] LEA RAX,[RBP + -0x10] LEA RDI,[RBP + -0xe8] MOV R9D,0x4 XOR R11D,R11D MOV qword ptr [RSP],R10 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],0x0 CALL 0x0018e280 CMP AL,0x0 JZ 0x0015e6a5 JMP 0x0015e69c LAB_0015e69c: MOV byte ptr [RBP + -0x11],0x1 JMP 0x0015e8d8 LAB_0015e6a5: JMP 0x0015e6a7 LAB_0015e6a7: JMP 0x0015e6a9 LAB_0015e6a9: MOV RAX,qword ptr [RBP + -0x80] ADD RAX,0x2 MOV qword ptr [RBP + -0xf8],RAX MOV EAX,dword ptr [RBP + -0x64] MOV CX,AX MOV RAX,qword ptr [RBP + -0xf8] MOV word ptr [RAX],CX MOV EAX,dword ptr [RBP + -0x70] SUB EAX,dword ptr [RBP + -0x64] MOV dword ptr [RBP + -0x60],EAX MOV RAX,qword ptr [RBP + -0x90] ADD RAX,0xa MOV qword ptr [RBP + -0x100],RAX MOV EAX,dword ptr [RBP + -0x60] MOV CX,AX MOV RAX,qword ptr [RBP + -0x100] MOV word ptr [RAX],CX MOV ECX,dword ptr [RBP + -0x74] ADD ECX,0x8000 MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x8],ECX MOV RDI,qword ptr [RBP + -0x90] MOV RAX,qword ptr [RBP + -0x40] MOV ESI,dword ptr [RAX + 0x7bc] MOV RAX,qword ptr [RBP + -0x40] MOV EDX,dword ptr [RAX + 0x3f0] ADD EDX,0x1 CALL 0x001525f0 MOVSX EAX,AL CMP EAX,0x0 JZ 0x0015e739 MOV EAX,dword ptr [RBP + -0x60] MOV dword ptr [RBP + -0x10c],EAX JMP 0x0015e743 LAB_0015e739: XOR EAX,EAX MOV dword ptr [RBP + -0x10c],EAX JMP 0x0015e743 LAB_0015e743: MOV ECX,dword ptr [RBP + -0x10c] MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0xc],ECX MOV RAX,qword ptr [RBP + -0x28] MOVZX ECX,byte ptr [RAX + 0x14] OR ECX,0x5 MOV byte ptr [RAX + 0x14],CL CMP byte ptr [RBP + -0x9a],0x0 JZ 0x0015e7e3 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x2e8] MOV RCX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RCX + 0x2f0] SUB ECX,0x1 MOV ECX,ECX IMUL RCX,RCX,0x18 ADD RAX,RCX MOV qword ptr [RBP + -0x108],RAX MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RAX + 0x600] MOV RAX,qword ptr [RBP + -0x108] MOV RSI,qword ptr [RAX] MOV EDX,0x7 XOR ECX,ECX XOR EAX,EAX MOV R9D,EAX MOV R8,R9 MOV dword ptr [RSP],0x1 MOV dword ptr [RSP + 0x8],0x0 CALL 0x001991d0 JMP 0x0015e7c9 LAB_0015e7c9: MOV RAX,qword ptr [RBP + -0x108] MOV dword ptr [RAX + 0x8],0x5 MOV byte ptr [RBP + -0x99],0x0 JMP 0x0015e8cd LAB_0015e7e3: MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RAX + 0x600] MOV RSI,qword ptr [RBP + -0x20] ADD RSI,0x470 MOV RAX,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RAX] MOV R8,qword ptr [RBP + -0x90] MOV RAX,qword ptr [RBP + -0x40] MOV R9D,dword ptr [RAX + 0x7d4] LEA R10,[RBP + -0x58] MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x600] MOV EAX,dword ptr [RAX + 0x80] XOR ECX,ECX XOR R11D,R11D MOV dword ptr [RSP],0x3 MOV dword ptr [RSP + 0x8],0x2 MOV dword ptr [RSP + 0x10],0x0 MOV qword ptr [RSP + 0x18],R10 MOV qword ptr [RSP + 0x20],0x0 MOV dword ptr [RSP + 0x28],0x0 MOV dword ptr [RSP + 0x30],EAX CALL 0x0019ab30 MOV byte ptr [RBP + -0x99],AL CMP AL,0x0 JNZ 0x0015e88f JMP 0x0015e86e LAB_0015e86e: JMP 0x0015e870 LAB_0015e870: MOV dword ptr [RBP + -0x50],0x5 MOV byte ptr [RBP + -0x48],0x1 MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x2e8 LEA RSI,[RBP + -0x58] CALL 0x001df950 LAB_0015e88f: MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x5c] IMUL RAX,RCX MOV qword ptr [RBP + -0x98],RAX MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x40] CMP RAX,qword ptr [RBP + -0x98] JA 0x0015e8cb MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x98] MOV EAX,dword ptr [RBP + -0x5c] ADD RSI,RAX CALL 0x00146dc0 LAB_0015e8cb: JMP 0x0015e8cd LAB_0015e8cd: JMP 0x0015e8cf LAB_0015e8cf: MOV AL,byte ptr [RBP + -0x99] MOV byte ptr [RBP + -0x11],AL LAB_0015e8d8: MOV AL,byte ptr [RBP + -0x11] MOV byte ptr [RBP + -0x10d],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0015e902 MOV AL,byte ptr [RBP + -0x10d] ADD RSP,0x150 POP RBP RET LAB_0015e902: CALL 0x0012a250
int8 write_tail(long *param_1,long *param_2,void *param_3,uint param_4) { char cVar1; int8 *puVar2; int8 uVar3; long in_FS_OFFSET; int8 in_stack_fffffffffffffea8; long *plVar4; ulong uVar5; int1 *puVar6; int4 uVar7; int8 in_stack_fffffffffffffeb0; int1 *puVar8; uint uVar9; ulong in_stack_fffffffffffffeb8; int local_114; int1 local_f0 [8]; int1 local_e8 [32]; int1 *local_c8; int8 local_c0; void *local_b8; ulong local_b0; char local_a2; char local_a1; ulong local_a0; long local_98; void *local_90; long local_88; int local_7c; int local_78; uint local_6c; int local_68; uint local_64; int1 local_60 [8]; int4 local_58; int1 local_50; long local_48; uint local_3c; void *local_38; long *local_30; long *local_28; char local_19; int1 local_18 [2]; int4 local_16; int1 local_12; int1 local_11; long local_10; uVar9 = (uint)((ulong)in_stack_fffffffffffffeb0 >> 0x20); local_10 = *(long *)(in_FS_OFFSET + 0x28); local_48 = *param_1; local_64 = *(uint *)(local_48 + 0x7bc); *(int1 *)((long)param_1 + 0x685) = 1; local_6c = param_4; if (param_4 < 0x20) { local_6c = 0x20; } local_3c = param_4; local_38 = param_3; local_30 = param_2; local_28 = param_1; if ((int)param_2[1] == 0xffff) { plVar4 = &local_98; cVar1 = get_head_or_tail_page(param_1,param_2,param_1[0x70],local_6c,2,4,plVar4); uVar7 = (int4)((ulong)plVar4 >> 0x20); if (cVar1 != '\0') { local_19 = '\x01'; goto LAB_0015e8d8; } } else { plVar4 = &local_98; uVar5 = CONCAT44((int)((ulong)in_stack_fffffffffffffea8 >> 0x20),(int)param_2[1]) & 0xffffffffffff7fff; cVar1 = get_rowpos_in_head_or_tail_page(param_1,param_2,param_1[0x70],local_6c,2,4,uVar5,plVar4) ; uVar9 = (uint)((ulong)plVar4 >> 0x20); uVar7 = (int4)(uVar5 >> 0x20); if (cVar1 != '\0') { local_19 = '\x01'; goto LAB_0015e8d8; } } local_a2 = *(char *)((long)local_30 + 0x15) != '\0'; memcpy(local_90,local_38,(ulong)local_3c); if (*(char *)(local_48 + 0x7e7) != '\0') { local_16 = (int4)*local_30; local_12 = (int1)((ulong)*local_30 >> 0x20); local_11 = (int1)local_7c; local_c8 = local_18; local_c0 = 8; local_b8 = local_90; local_b0 = (ulong)local_6c; uVar3 = 4; if (local_a2 != '\0') { uVar3 = 2; } puVar6 = local_e8; puVar8 = local_18; in_stack_fffffffffffffeb8 = 0; cVar1 = translog_write_record (local_f0,uVar3,local_28[1],local_28,local_6c + 8,4,puVar6,puVar8,0); uVar9 = (uint)((ulong)puVar8 >> 0x20); uVar7 = (int4)((ulong)puVar6 >> 0x20); if (cVar1 != '\0') { local_19 = '\x01'; goto LAB_0015e8d8; } } *(short *)(local_88 + 2) = (short)local_6c; local_68 = local_78 - local_6c; *(short *)(local_98 + 10) = (short)local_68; *(int *)(local_30 + 1) = local_7c + 0x8000; cVar1 = enough_free_entries(local_98,*(int4 *)(local_48 + 0x7bc), *(int *)(local_48 + 0x3f0) + 1); if (cVar1 == '\0') { local_114 = 0; } else { local_114 = local_68; } *(int *)((long)local_30 + 0xc) = local_114; *(byte *)((long)local_30 + 0x14) = *(byte *)((long)local_30 + 0x14) | 5; if (local_a2 == '\0') { local_a1 = pagecache_write_part (*(int8 *)(local_48 + 0x600),local_28 + 0x8e,*local_30,0,local_98, *(int4 *)(local_48 + 0x7d4),CONCAT44(uVar7,3),CONCAT44(uVar9,2), in_stack_fffffffffffffeb8 & 0xffffffff00000000,local_60,0,0, *(int4 *)(*(long *)(local_48 + 0x600) + 0x80)); if (local_a1 == '\0') { local_58 = 5; local_50 = 1; insert_dynamic(local_28 + 0x5d,local_60); } local_a0 = *local_30 * (ulong)local_64; if (*(ulong *)(local_48 + 0x40) <= local_a0) { _ma_set_share_data_file_length(local_48,local_a0 + local_64); } } else { puVar2 = (int8 *)(local_28[0x5d] + (ulong)((int)local_28[0x5e] - 1) * 0x18); pagecache_unlock_by_link (*(int8 *)(local_48 + 0x600),*puVar2,7,0,0,0,CONCAT44(uVar7,1), (ulong)uVar9 << 0x20); *(int4 *)(puVar2 + 1) = 5; local_a1 = '\0'; } local_19 = local_a1; LAB_0015e8d8: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_19); }
20,683
pcmp
eloqsql/strings/ctype-simple.c
static int pcmp(const void * f, const void * s) { const uni_idx *F= (const uni_idx*) f; const uni_idx *S= (const uni_idx*) s; int res; if (!(res=((S->nchars)-(F->nchars)))) res=((F->uidx.from)-(S->uidx.to)); return res; }
O3
c
pcmp: pushq %rbp movq %rsp, %rbp movl (%rsi), %eax subl (%rdi), %eax jne 0x3e519 movzwl 0x8(%rdi), %eax movzwl 0xa(%rsi), %ecx subl %ecx, %eax popq %rbp retq nop
pcmp: push rbp mov rbp, rsp mov eax, [rsi] sub eax, [rdi] jnz short loc_3E519 movzx eax, word ptr [rdi+8] movzx ecx, word ptr [rsi+0Ah] sub eax, ecx loc_3E519: pop rbp retn
long long pcmp(long long a1, long long a2) { long long result; // rax result = (unsigned int)(*(_DWORD *)a2 - *(_DWORD *)a1); if ( *(_DWORD *)a2 == *(_DWORD *)a1 ) return *(unsigned __int16 *)(a1 + 8) - (unsigned int)*(unsigned __int16 *)(a2 + 10); return result; }
pcmp: PUSH RBP MOV RBP,RSP MOV EAX,dword ptr [RSI] SUB EAX,dword ptr [RDI] JNZ 0x0013e519 MOVZX EAX,word ptr [RDI + 0x8] MOVZX ECX,word ptr [RSI + 0xa] SUB EAX,ECX LAB_0013e519: POP RBP RET
int pcmp(int *param_1,int *param_2) { int iVar1; iVar1 = *param_2 - *param_1; if (iVar1 == 0) { iVar1 = (uint)*(ushort *)(param_1 + 2) - (uint)*(ushort *)((long)param_2 + 10); } return iVar1; }
20,684
string_view::operator==(string_view const&) const
monkey531[P]llama/common/json-schema-to-grammar.cpp
bool operator==(const string_view & other) const { std::string this_str = *this; std::string other_str = other; return this_str == other_str; }
O3
cpp
string_view::operator==(string_view const&) const: pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %rbx movq (%rdi), %rsi movq 0x8(%rdi), %rdx movq 0x10(%rdi), %rcx subq %rdx, %rcx leaq 0x8(%rsp), %rdi callq 0x186f0 movq (%rbx), %rsi movq 0x8(%rbx), %rdx movq 0x10(%rbx), %rcx subq %rdx, %rcx leaq 0x28(%rsp), %rdi callq 0x186f0 movq 0x10(%rsp), %rdx cmpq 0x30(%rsp), %rdx jne 0xa57d8 movq 0x28(%rsp), %r14 testq %rdx, %rdx je 0xa57e1 movq 0x8(%rsp), %rdi movq %r14, %rsi callq 0x186e0 testl %eax, %eax sete %bl jmp 0xa57e3 movq 0x28(%rsp), %r14 xorl %ebx, %ebx jmp 0xa57e3 movb $0x1, %bl leaq 0x38(%rsp), %rax cmpq %rax, %r14 je 0xa57fd movq 0x38(%rsp), %rsi incq %rsi movq %r14, %rdi callq 0x186a0 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa5818 movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 movl %ebx, %eax addq $0x48, %rsp popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa5840 movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 movq %rbx, %rdi callq 0x18bb0
_ZNK11string_vieweqERKS_: push r14 push rbx sub rsp, 48h mov rbx, rsi mov rsi, [rdi] mov rdx, [rdi+8] mov rcx, [rdi+10h] sub rcx, rdx lea rdi, [rsp+58h+var_50] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rsi, [rbx] mov rdx, [rbx+8] mov rcx, [rbx+10h] sub rcx, rdx lea rdi, [rsp+58h+var_30] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rdx, [rsp+58h+var_48] cmp rdx, [rsp+58h+var_28] jnz short loc_A57D8 mov r14, [rsp+58h+var_30] test rdx, rdx jz short loc_A57E1 mov rdi, [rsp+58h+var_50] mov rsi, r14 call _bcmp test eax, eax setz bl jmp short loc_A57E3 loc_A57D8: mov r14, [rsp+58h+var_30] xor ebx, ebx jmp short loc_A57E3 loc_A57E1: mov bl, 1 loc_A57E3: lea rax, [rsp+58h+var_20] cmp r14, rax jz short loc_A57FD mov rsi, [rsp+58h+var_20] inc rsi; unsigned __int64 mov rdi, r14; void * call __ZdlPvm; operator delete(void *,ulong) loc_A57FD: lea rax, [rsp+58h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A5818 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A5818: mov eax, ebx add rsp, 48h pop rbx pop r14 retn mov rbx, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A5840 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A5840: mov rdi, rbx call __Unwind_Resume
long long string_view::operator==(_QWORD *a1, _QWORD *a2) { long long *v3; // r14 long long *v5; // [rsp+8h] [rbp-50h] BYREF void *v6; // [rsp+10h] [rbp-48h] long long v7; // [rsp+18h] [rbp-40h] BYREF void *v8[2]; // [rsp+28h] [rbp-30h] BYREF long long v9; // [rsp+38h] [rbp-20h] BYREF std::string::substr(&v5, *a1, a1[1], a1[2] - a1[1]); std::string::substr(v8, *a2, a2[1], a2[2] - a2[1]); if ( v6 == v8[1] ) { v3 = (long long *)v8[0]; if ( v6 ) LOBYTE(a2) = (unsigned int)bcmp(v5, v8[0], v6) == 0; else LOBYTE(a2) = 1; } else { v3 = (long long *)v8[0]; LODWORD(a2) = 0; } if ( v3 != &v9 ) operator delete(v3, v9 + 1); if ( v5 != &v7 ) operator delete(v5, v7 + 1); return (unsigned int)a2; }
operator==: PUSH R14 PUSH RBX SUB RSP,0x48 MOV RBX,RSI MOV RSI,qword ptr [RDI] MOV RDX,qword ptr [RDI + 0x8] MOV RCX,qword ptr [RDI + 0x10] SUB RCX,RDX LEA RDI,[RSP + 0x8] CALL 0x001186f0 MOV RSI,qword ptr [RBX] MOV RDX,qword ptr [RBX + 0x8] MOV RCX,qword ptr [RBX + 0x10] SUB RCX,RDX LAB_001a57a4: LEA RDI,[RSP + 0x28] CALL 0x001186f0 LAB_001a57ae: MOV RDX,qword ptr [RSP + 0x10] CMP RDX,qword ptr [RSP + 0x30] JNZ 0x001a57d8 MOV R14,qword ptr [RSP + 0x28] TEST RDX,RDX JZ 0x001a57e1 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,R14 CALL 0x001186e0 TEST EAX,EAX SETZ BL JMP 0x001a57e3 LAB_001a57d8: MOV R14,qword ptr [RSP + 0x28] XOR EBX,EBX JMP 0x001a57e3 LAB_001a57e1: MOV BL,0x1 LAB_001a57e3: LEA RAX,[RSP + 0x38] CMP R14,RAX JZ 0x001a57fd MOV RSI,qword ptr [RSP + 0x38] INC RSI MOV RDI,R14 CALL 0x001186a0 LAB_001a57fd: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001a5818 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001186a0 LAB_001a5818: MOV EAX,EBX ADD RSP,0x48 POP RBX POP R14 RET
/* string_view::TEMPNAMEPLACEHOLDERVALUE(string_view const&) const */ ulong __thiscall string_view::operator==(string_view *this,string_view *param_1) { int iVar1; int7 uVar3; ulong uVar2; long *local_50; size_t local_48; long local_40 [2]; long *local_30; size_t local_28; long local_20 [2]; std::__cxx11::string::substr((ulong)&local_50,*(ulong *)this); /* try { // try from 001a57a4 to 001a57ad has its CatchHandler @ 001a5822 */ std::__cxx11::string::substr((ulong)&local_30,*(ulong *)param_1); if (local_48 == local_28) { uVar3 = (int7)((ulong)param_1 >> 8); if (local_48 == 0) { uVar2 = CONCAT71(uVar3,1); } else { iVar1 = bcmp(local_50,local_30,local_48); uVar2 = CONCAT71(uVar3,iVar1 == 0); } } else { uVar2 = 0; } if (local_30 != local_20) { operator_delete(local_30,local_20[0] + 1); } if (local_50 != local_40) { operator_delete(local_50,local_40[0] + 1); } return uVar2 & 0xffffffff; }
20,685
my_strerror
eloqsql/strings/my_vsnprintf.c
const char* my_strerror(char *buf, size_t len, int nr) { char *msg= NULL; buf[0]= '\0'; /* failsafe */ if (nr <= 0) { strmake(buf, (nr == 0 ? "Internal error/check (Not system error)" : "Internal error < 0 (Not system error)"), len-1); return buf; } /* These (handler-) error messages are shared by perror, as required by the principle of least surprise. */ if ((nr >= HA_ERR_FIRST) && (nr <= HA_ERR_LAST)) { msg= (char *) handler_error_messages[nr - HA_ERR_FIRST]; strmake(buf, msg, len - 1); } else { /* On Windows, do things the Windows way. On a system that supports both the GNU and the XSI variant, use whichever was configured (GNU); if this choice is not advertised, use the default (POSIX/XSI). Testing for __GNUC__ is not sufficient to determine whether this choice exists. */ #if defined(_WIN32) strerror_s(buf, len, nr); #elif ((defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE >= 200112L)) || \ (defined _XOPEN_SOURCE && (_XOPEN_SOURCE >= 600))) && \ ! defined _GNU_SOURCE strerror_r(nr, buf, len); /* I can build with or without GNU */ #elif defined(__GLIBC__) && defined (_GNU_SOURCE) char *r= strerror_r(nr, buf, len); if (r != buf) /* Want to help, GNU? */ strmake(buf, r, len - 1); /* Then don't. */ #else strerror_r(nr, buf, len); #endif } /* strerror() return values are implementation-dependent, so let's be pragmatic. */ if (!buf[0]) strmake(buf, "unknown error", len - 1); return buf; }
O3
c
my_strerror: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx movb $0x0, (%rdi) testl %edx, %edx jle 0x5daa6 leal -0x78(%rdx), %eax cmpl $0x4e, %eax ja 0x5daba movl %eax, %eax leaq 0x27f4cf(%rip), %rcx # 0x2dcf6c movslq (%rcx,%rax,4), %rsi addq %rcx, %rsi jmp 0x5dacf leaq 0x5e78(%rip), %rax # 0x63925 leaq 0x5e99(%rip), %rsi # 0x6394d cmoveq %rax, %rsi jmp 0x5dae7 movl %edx, %edi movq %rbx, %rsi movq %r14, %rdx callq 0x240c0 movq %rax, %rsi cmpq %rbx, %rax je 0x5dadb leaq -0x1(%r14), %rdx movq %rbx, %rdi callq 0x5df08 cmpb $0x0, (%rbx) jne 0x5daf5 leaq 0x5e8c(%rip), %rsi # 0x63973 decq %r14 movq %rbx, %rdi movq %r14, %rdx callq 0x5df08 movq %rbx, %rax popq %rbx popq %r14 popq %rbp retq
my_strerror: push rbp mov rbp, rsp push r14 push rbx mov r14, rsi mov rbx, rdi mov byte ptr [rdi], 0 test edx, edx jle short loc_5DAA6 lea eax, [rdx-78h] cmp eax, 4Eh ; 'N' ja short loc_5DABA mov eax, eax lea rcx, handler_error_messages_rel movsxd rsi, dword ptr [rcx+rax*4] add rsi, rcx jmp short loc_5DACF loc_5DAA6: lea rax, aInternalErrorC; "Internal error/check (Not system error)" lea rsi, aInternalError0; "Internal error < 0 (Not system error)" cmovz rsi, rax jmp short loc_5DAE7 loc_5DABA: mov edi, edx mov rsi, rbx mov rdx, r14 call _strerror_r mov rsi, rax cmp rax, rbx jz short loc_5DADB loc_5DACF: lea rdx, [r14-1] mov rdi, rbx call strmake loc_5DADB: cmp byte ptr [rbx], 0 jnz short loc_5DAF5 lea rsi, aUnknownError; "unknown error" loc_5DAE7: dec r14 mov rdi, rbx mov rdx, r14 call strmake loc_5DAF5: mov rax, rbx pop rbx pop r14 pop rbp retn
char * my_strerror(char *a1, long long a2, int a3) { char *v4; // rsi const char *v5; // rsi *a1 = 0; if ( a3 <= 0 ) { v5 = "Internal error < 0 (Not system error)"; if ( !a3 ) v5 = "Internal error/check (Not system error)"; goto LABEL_11; } if ( (unsigned int)(a3 - 120) > 0x4E ) { v4 = (char *)strerror_r((unsigned int)a3, a1, a2); if ( v4 == a1 ) goto LABEL_9; } else { v4 = (char *)handler_error_messages_rel + handler_error_messages_rel[a3 - 120]; } strmake(a1, v4, a2 - 1); LABEL_9: if ( !*a1 ) { v5 = "unknown error"; LABEL_11: strmake(a1, v5, a2 - 1); } return a1; }
my_strerror: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV R14,RSI MOV RBX,RDI MOV byte ptr [RDI],0x0 TEST EDX,EDX JLE 0x0015daa6 LEA EAX,[RDX + -0x78] CMP EAX,0x4e JA 0x0015daba MOV EAX,EAX LEA RCX,[0x3dcf6c] MOVSXD RSI,dword ptr [RCX + RAX*0x4] ADD RSI,RCX JMP 0x0015dacf LAB_0015daa6: LEA RAX,[0x163925] LEA RSI,[0x16394d] CMOVZ RSI,RAX JMP 0x0015dae7 LAB_0015daba: MOV EDI,EDX MOV RSI,RBX MOV RDX,R14 CALL 0x001240c0 MOV RSI,RAX CMP RAX,RBX JZ 0x0015dadb LAB_0015dacf: LEA RDX,[R14 + -0x1] MOV RDI,RBX CALL 0x0015df08 LAB_0015dadb: CMP byte ptr [RBX],0x0 JNZ 0x0015daf5 LEA RSI,[0x163973] LAB_0015dae7: DEC R14 MOV RDI,RBX MOV RDX,R14 CALL 0x0015df08 LAB_0015daf5: MOV RAX,RBX POP RBX POP R14 POP RBP RET
char * my_strerror(char *param_1,size_t param_2,int param_3) { char *pcVar1; *param_1 = '\0'; if (param_3 < 1) { pcVar1 = "Internal error < 0 (Not system error)"; if (param_3 == 0) { pcVar1 = "Internal error/check (Not system error)"; } goto LAB_0015dae7; } if (param_3 - 0x78U < 0x4f) { pcVar1 = handler_error_messages_rel + *(int *)(handler_error_messages_rel + (ulong)(param_3 - 0x78U) * 4); LAB_0015dacf: strmake(param_1,pcVar1,param_2 - 1); } else { pcVar1 = strerror_r(param_3,param_1,param_2); if (pcVar1 != param_1) goto LAB_0015dacf; } if (*param_1 != '\0') { return param_1; } pcVar1 = "unknown error"; LAB_0015dae7: strmake(param_1,pcVar1,param_2 - 1); return param_1; }
20,686
safe_hash_search
eloqsql/mysys/my_safehash.c
uchar *safe_hash_search(SAFE_HASH *hash, const uchar *key, uint length, uchar *def) { uchar *result; DBUG_ENTER("safe_hash_search"); mysql_rwlock_rdlock(&hash->mutex); result= my_hash_search(&hash->hash, key, length); mysql_rwlock_unlock(&hash->mutex); if (!result) result= def; else result= ((SAFE_HASH_ENTRY*) result)->data; DBUG_PRINT("exit",("data: %p", result)); DBUG_RETURN(result); }
O3
c
safe_hash_search: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rcx, %rbx movl %edx, %r12d movq %rsi, %r15 movq %rdi, %r14 cmpq $0x0, 0x90(%rdi) jne 0xa5f63 movq %r14, %rdi callq 0xa4358 leaq 0x98(%r14), %rdi movl %r12d, %edx movq %r15, %rsi callq 0x93aa6 movq %rax, %r15 movq 0x90(%r14), %rdi testq %rdi, %rdi jne 0xa5f79 movq %r14, %rdi callq 0xa4486 testq %r15, %r15 je 0xa5f57 movq 0x10(%r15), %rbx movq %rbx, %rax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x367ce(%rip), %rsi # 0xdc738 movq %r14, %rdi movl $0xa7, %edx callq 0x2ec30 jmp 0xa5f25 leaq 0x2e0090(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x168(%rax) jmp 0xa5f46
safe_hash_search: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rcx mov r12d, edx mov r15, rsi mov r14, rdi cmp qword ptr [rdi+90h], 0 jnz short loc_A5F63 mov rdi, r14 call my_rw_rdlock loc_A5F25: lea rdi, [r14+98h] mov edx, r12d mov rsi, r15 call my_hash_search mov r15, rax mov rdi, [r14+90h] test rdi, rdi jnz short loc_A5F79 loc_A5F46: mov rdi, r14 call my_rw_unlock test r15, r15 jz short loc_A5F57 mov rbx, [r15+10h] loc_A5F57: mov rax, rbx pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_A5F63: lea rsi, aWorkspaceLlm4b_41; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r14 mov edx, 0A7h call psi_rwlock_rdlock jmp short loc_A5F25 loc_A5F79: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+168h] jmp short loc_A5F46
long long safe_hash_search(long long a1, long long a2, unsigned int a3, long long a4) { long long v6; // r15 if ( *(_QWORD *)(a1 + 144) ) psi_rwlock_rdlock(a1, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/my_safehash.c", 0xA7u); else my_rw_rdlock(a1); v6 = my_hash_search(a1 + 152, a2, a3); if ( *(_QWORD *)(a1 + 144) ) PSI_server[45](); my_rw_unlock(a1); if ( v6 ) return *(_QWORD *)(v6 + 16); return a4; }
safe_hash_search: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RCX MOV R12D,EDX MOV R15,RSI MOV R14,RDI CMP qword ptr [RDI + 0x90],0x0 JNZ 0x001a5f63 MOV RDI,R14 CALL 0x001a4358 LAB_001a5f25: LEA RDI,[R14 + 0x98] MOV EDX,R12D MOV RSI,R15 CALL 0x00193aa6 MOV R15,RAX MOV RDI,qword ptr [R14 + 0x90] TEST RDI,RDI JNZ 0x001a5f79 LAB_001a5f46: MOV RDI,R14 CALL 0x001a4486 TEST R15,R15 JZ 0x001a5f57 MOV RBX,qword ptr [R15 + 0x10] LAB_001a5f57: MOV RAX,RBX POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001a5f63: LEA RSI,[0x1dc738] MOV RDI,R14 MOV EDX,0xa7 CALL 0x0012ec30 JMP 0x001a5f25 LAB_001a5f79: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x168] JMP 0x001a5f46
int8 safe_hash_search(long param_1,int8 param_2,int4 param_3,int8 param_4) { long lVar1; if (*(long *)(param_1 + 0x90) == 0) { my_rw_rdlock(param_1); } else { psi_rwlock_rdlock(param_1,"/workspace/llm4binary/github2025/eloqsql/mysys/my_safehash.c",0xa7); } lVar1 = my_hash_search(param_1 + 0x98,param_2,param_3); if (*(long *)(param_1 + 0x90) != 0) { (**(code **)(PSI_server + 0x168))(); } my_rw_unlock(param_1); if (lVar1 != 0) { param_4 = *(int8 *)(lVar1 + 0x10); } return param_4; }
20,687
JS_ThrowSyntaxError
bluesky950520[P]quickjs/quickjs.c
JSValue __attribute__((format(printf, 2, 3))) JS_ThrowSyntaxError(JSContext *ctx, const char *fmt, ...) { JSValue val; va_list ap; va_start(ap, fmt); val = JS_ThrowError(ctx, JS_SYNTAX_ERROR, fmt, ap); va_end(ap); return val; }
O1
c
JS_ThrowSyntaxError: subq $0xd8, %rsp movq %rsi, %r10 leaq 0x20(%rsp), %rsi movq %rdx, 0x10(%rsi) movq %rcx, 0x18(%rsi) movq %r8, 0x20(%rsi) movq %r9, 0x28(%rsi) testb %al, %al je 0x21917 movaps %xmm0, 0x50(%rsp) movaps %xmm1, 0x60(%rsp) movaps %xmm2, 0x70(%rsp) movaps %xmm3, 0x80(%rsp) movaps %xmm4, 0x90(%rsp) movaps %xmm5, 0xa0(%rsp) movaps %xmm6, 0xb0(%rsp) movaps %xmm7, 0xc0(%rsp) movq %rsp, %rcx movq %rsi, 0x10(%rcx) leaq 0xe0(%rsp), %rax movq %rax, 0x8(%rcx) movabsq $0x3000000010, %rax # imm = 0x3000000010 movq %rax, (%rcx) movl $0x3, %esi movq %r10, %rdx callq 0x2183c movl $0x6, %edx xorl %eax, %eax addq $0xd8, %rsp retq
JS_ThrowSyntaxError: sub rsp, 0D8h mov r10, rsi lea rsi, [rsp+0D8h+var_B8] mov [rsi+10h], rdx mov [rsi+18h], rcx mov [rsi+20h], r8 mov [rsi+28h], r9 test al, al jz short loc_21917 movaps [rsp+0D8h+var_88], xmm0 movaps [rsp+0D8h+var_78], xmm1 movaps [rsp+0D8h+var_68], xmm2 movaps [rsp+0D8h+var_58], xmm3 movaps [rsp+0D8h+var_48], xmm4 movaps [rsp+0D8h+var_38], xmm5 movaps [rsp+0D8h+var_28], xmm6 movaps [rsp+0D8h+var_18], xmm7 loc_21917: mov rcx, rsp mov [rcx+10h], rsi lea rax, [rsp+0D8h+arg_0] mov [rcx+8], rax mov rax, 3000000010h mov [rcx], rax mov esi, 3 mov rdx, r10 call JS_ThrowError mov edx, 6 xor eax, eax add rsp, 0D8h retn
long long JS_ThrowSyntaxError( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, char a15) { _QWORD v16[4]; // [rsp+0h] [rbp-D8h] BYREF char v17; // [rsp+20h] [rbp-B8h] BYREF long long v18; // [rsp+30h] [rbp-A8h] long long v19; // [rsp+38h] [rbp-A0h] long long v20; // [rsp+40h] [rbp-98h] long long v21; // [rsp+48h] [rbp-90h] __m128 v22; // [rsp+50h] [rbp-88h] __m128 v23; // [rsp+60h] [rbp-78h] __m128 v24; // [rsp+70h] [rbp-68h] __m128 v25; // [rsp+80h] [rbp-58h] __m128 v26; // [rsp+90h] [rbp-48h] __m128 v27; // [rsp+A0h] [rbp-38h] __m128 v28; // [rsp+B0h] [rbp-28h] __m128 v29; // [rsp+C0h] [rbp-18h] v22 = a7; v23 = a8; v24 = a9; v25 = a10; v26 = a11; v27 = a12; v28 = a13; v29 = a14; v18 = a3; v19 = a4; v20 = a5; v21 = a6; v16[2] = &v17; v16[1] = &a15; v16[0] = 0x3000000010LL; JS_ThrowError(a1, 3LL, a2, (long long)v16); return 0LL; }
JS_ThrowSyntaxError: SUB RSP,0xd8 MOV R10,RSI LEA RSI,[RSP + 0x20] MOV qword ptr [RSI + 0x10],RDX MOV qword ptr [RSI + 0x18],RCX MOV qword ptr [RSI + 0x20],R8 MOV qword ptr [RSI + 0x28],R9 TEST AL,AL JZ 0x00121917 MOVAPS xmmword ptr [RSP + 0x50],XMM0 MOVAPS xmmword ptr [RSP + 0x60],XMM1 MOVAPS xmmword ptr [RSP + 0x70],XMM2 MOVAPS xmmword ptr [RSP + 0x80],XMM3 MOVAPS xmmword ptr [RSP + 0x90],XMM4 MOVAPS xmmword ptr [RSP + 0xa0],XMM5 MOVAPS xmmword ptr [RSP + 0xb0],XMM6 MOVAPS xmmword ptr [RSP + 0xc0],XMM7 LAB_00121917: MOV RCX,RSP MOV qword ptr [RCX + 0x10],RSI LEA RAX,[RSP + 0xe0] MOV qword ptr [RCX + 0x8],RAX MOV RAX,0x3000000010 MOV qword ptr [RCX],RAX MOV ESI,0x3 MOV RDX,R10 CALL 0x0012183c MOV EDX,0x6 XOR EAX,EAX ADD RSP,0xd8 RET
int1 [16] JS_ThrowSyntaxError(int8 param_1,int8 param_2) { JS_ThrowError(param_1,3,param_2); return ZEXT816(6) << 0x40; }
20,688
JS_ThrowSyntaxError
bluesky950520[P]quickjs/quickjs.c
JSValue __attribute__((format(printf, 2, 3))) JS_ThrowSyntaxError(JSContext *ctx, const char *fmt, ...) { JSValue val; va_list ap; va_start(ap, fmt); val = JS_ThrowError(ctx, JS_SYNTAX_ERROR, fmt, ap); va_end(ap); return val; }
O2
c
JS_ThrowSyntaxError: subq $0xd8, %rsp movq %rsi, %r10 leaq 0x20(%rsp), %rsi movq %rdx, 0x10(%rsi) movq %rcx, 0x18(%rsi) movq %r8, 0x20(%rsi) movq %r9, 0x28(%rsi) testb %al, %al je 0x1ba99 movaps %xmm0, 0x50(%rsp) movaps %xmm1, 0x60(%rsp) movaps %xmm2, 0x70(%rsp) movaps %xmm3, 0x80(%rsp) movaps %xmm4, 0x90(%rsp) movaps %xmm5, 0xa0(%rsp) movaps %xmm6, 0xb0(%rsp) movaps %xmm7, 0xc0(%rsp) movq %rsp, %rcx movq %rsi, 0x10(%rcx) leaq 0xe0(%rsp), %rax movq %rax, 0x8(%rcx) movabsq $0x3000000010, %rax # imm = 0x3000000010 movq %rax, (%rcx) pushq $0x3 popq %rsi movq %r10, %rdx callq 0x1b9d5 pushq $0x6 popq %rdx xorl %eax, %eax addq $0xd8, %rsp retq
JS_ThrowSyntaxError: sub rsp, 0D8h mov r10, rsi lea rsi, [rsp+0D8h+var_B8] mov [rsi+10h], rdx mov [rsi+18h], rcx mov [rsi+20h], r8 mov [rsi+28h], r9 test al, al jz short loc_1BA99 movaps [rsp+0D8h+var_88], xmm0 movaps [rsp+0D8h+var_78], xmm1 movaps [rsp+0D8h+var_68], xmm2 movaps [rsp+0D8h+var_58], xmm3 movaps [rsp+0D8h+var_48], xmm4 movaps [rsp+0D8h+var_38], xmm5 movaps [rsp+0D8h+var_28], xmm6 movaps [rsp+0D8h+var_18], xmm7 loc_1BA99: mov rcx, rsp mov [rcx+10h], rsi lea rax, [rsp+0D8h+arg_0] mov [rcx+8], rax mov rax, 3000000010h mov [rcx], rax push 3 pop rsi mov rdx, r10 call JS_ThrowError push 6 pop rdx xor eax, eax add rsp, 0D8h retn
long long JS_ThrowSyntaxError( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, char a15) { _QWORD v16[4]; // [rsp+0h] [rbp-D8h] BYREF char v17; // [rsp+20h] [rbp-B8h] BYREF long long v18; // [rsp+30h] [rbp-A8h] long long v19; // [rsp+38h] [rbp-A0h] long long v20; // [rsp+40h] [rbp-98h] long long v21; // [rsp+48h] [rbp-90h] __m128 v22; // [rsp+50h] [rbp-88h] __m128 v23; // [rsp+60h] [rbp-78h] __m128 v24; // [rsp+70h] [rbp-68h] __m128 v25; // [rsp+80h] [rbp-58h] __m128 v26; // [rsp+90h] [rbp-48h] __m128 v27; // [rsp+A0h] [rbp-38h] __m128 v28; // [rsp+B0h] [rbp-28h] __m128 v29; // [rsp+C0h] [rbp-18h] v22 = a7; v23 = a8; v24 = a9; v25 = a10; v26 = a11; v27 = a12; v28 = a13; v29 = a14; v18 = a3; v19 = a4; v20 = a5; v21 = a6; v16[2] = &v17; v16[1] = &a15; v16[0] = 0x3000000010LL; JS_ThrowError(a1, 3LL, a2, (long long)v16); return 0LL; }
JS_ThrowSyntaxError: SUB RSP,0xd8 MOV R10,RSI LEA RSI,[RSP + 0x20] MOV qword ptr [RSI + 0x10],RDX MOV qword ptr [RSI + 0x18],RCX MOV qword ptr [RSI + 0x20],R8 MOV qword ptr [RSI + 0x28],R9 TEST AL,AL JZ 0x0011ba99 MOVAPS xmmword ptr [RSP + 0x50],XMM0 MOVAPS xmmword ptr [RSP + 0x60],XMM1 MOVAPS xmmword ptr [RSP + 0x70],XMM2 MOVAPS xmmword ptr [RSP + 0x80],XMM3 MOVAPS xmmword ptr [RSP + 0x90],XMM4 MOVAPS xmmword ptr [RSP + 0xa0],XMM5 MOVAPS xmmword ptr [RSP + 0xb0],XMM6 MOVAPS xmmword ptr [RSP + 0xc0],XMM7 LAB_0011ba99: MOV RCX,RSP MOV qword ptr [RCX + 0x10],RSI LEA RAX,[RSP + 0xe0] MOV qword ptr [RCX + 0x8],RAX MOV RAX,0x3000000010 MOV qword ptr [RCX],RAX PUSH 0x3 POP RSI MOV RDX,R10 CALL 0x0011b9d5 PUSH 0x6 POP RDX XOR EAX,EAX ADD RSP,0xd8 RET
int1 [16] JS_ThrowSyntaxError(int8 param_1,int8 param_2) { JS_ThrowError(param_1,3,param_2); return ZEXT816(6) << 0x40; }
20,689
JS_ThrowSyntaxError
bluesky950520[P]quickjs/quickjs.c
JSValue __attribute__((format(printf, 2, 3))) JS_ThrowSyntaxError(JSContext *ctx, const char *fmt, ...) { JSValue val; va_list ap; va_start(ap, fmt); val = JS_ThrowError(ctx, JS_SYNTAX_ERROR, fmt, ap); va_end(ap); return val; }
O3
c
JS_ThrowSyntaxError: subq $0xd8, %rsp movq %rsi, %r10 leaq 0x20(%rsp), %rsi movq %rdx, 0x10(%rsi) movq %rcx, 0x18(%rsi) movq %r8, 0x20(%rsi) movq %r9, 0x28(%rsi) testb %al, %al je 0x22113 movaps %xmm0, 0x50(%rsp) movaps %xmm1, 0x60(%rsp) movaps %xmm2, 0x70(%rsp) movaps %xmm3, 0x80(%rsp) movaps %xmm4, 0x90(%rsp) movaps %xmm5, 0xa0(%rsp) movaps %xmm6, 0xb0(%rsp) movaps %xmm7, 0xc0(%rsp) movq %rsp, %rcx movq %rsi, 0x10(%rcx) leaq 0xe0(%rsp), %rax movq %rax, 0x8(%rcx) movabsq $0x3000000010, %rax # imm = 0x3000000010 movq %rax, (%rcx) movl $0x3, %esi movq %r10, %rdx callq 0x2204d movl $0x6, %edx xorl %eax, %eax addq $0xd8, %rsp retq
JS_ThrowSyntaxError: sub rsp, 0D8h mov r10, rsi lea rsi, [rsp+0D8h+var_B8] mov [rsi+10h], rdx mov [rsi+18h], rcx mov [rsi+20h], r8 mov [rsi+28h], r9 test al, al jz short loc_22113 movaps [rsp+0D8h+var_88], xmm0 movaps [rsp+0D8h+var_78], xmm1 movaps [rsp+0D8h+var_68], xmm2 movaps [rsp+0D8h+var_58], xmm3 movaps [rsp+0D8h+var_48], xmm4 movaps [rsp+0D8h+var_38], xmm5 movaps [rsp+0D8h+var_28], xmm6 movaps [rsp+0D8h+var_18], xmm7 loc_22113: mov rcx, rsp mov [rcx+10h], rsi lea rax, [rsp+0D8h+arg_0] mov [rcx+8], rax mov rax, 3000000010h mov [rcx], rax mov esi, 3 mov rdx, r10 call JS_ThrowError mov edx, 6 xor eax, eax add rsp, 0D8h retn
long long JS_ThrowSyntaxError( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, char a15) { _QWORD v16[4]; // [rsp+0h] [rbp-D8h] BYREF char v17; // [rsp+20h] [rbp-B8h] BYREF long long v18; // [rsp+30h] [rbp-A8h] long long v19; // [rsp+38h] [rbp-A0h] long long v20; // [rsp+40h] [rbp-98h] long long v21; // [rsp+48h] [rbp-90h] __m128 v22; // [rsp+50h] [rbp-88h] __m128 v23; // [rsp+60h] [rbp-78h] __m128 v24; // [rsp+70h] [rbp-68h] __m128 v25; // [rsp+80h] [rbp-58h] __m128 v26; // [rsp+90h] [rbp-48h] __m128 v27; // [rsp+A0h] [rbp-38h] __m128 v28; // [rsp+B0h] [rbp-28h] __m128 v29; // [rsp+C0h] [rbp-18h] v22 = a7; v23 = a8; v24 = a9; v25 = a10; v26 = a11; v27 = a12; v28 = a13; v29 = a14; v18 = a3; v19 = a4; v20 = a5; v21 = a6; v16[2] = &v17; v16[1] = &a15; v16[0] = 0x3000000010LL; JS_ThrowError(a1, 3LL, a2, (long long)v16); return 0LL; }
JS_ThrowSyntaxError: SUB RSP,0xd8 MOV R10,RSI LEA RSI,[RSP + 0x20] MOV qword ptr [RSI + 0x10],RDX MOV qword ptr [RSI + 0x18],RCX MOV qword ptr [RSI + 0x20],R8 MOV qword ptr [RSI + 0x28],R9 TEST AL,AL JZ 0x00122113 MOVAPS xmmword ptr [RSP + 0x50],XMM0 MOVAPS xmmword ptr [RSP + 0x60],XMM1 MOVAPS xmmword ptr [RSP + 0x70],XMM2 MOVAPS xmmword ptr [RSP + 0x80],XMM3 MOVAPS xmmword ptr [RSP + 0x90],XMM4 MOVAPS xmmword ptr [RSP + 0xa0],XMM5 MOVAPS xmmword ptr [RSP + 0xb0],XMM6 MOVAPS xmmword ptr [RSP + 0xc0],XMM7 LAB_00122113: MOV RCX,RSP MOV qword ptr [RCX + 0x10],RSI LEA RAX,[RSP + 0xe0] MOV qword ptr [RCX + 0x8],RAX MOV RAX,0x3000000010 MOV qword ptr [RCX],RAX MOV ESI,0x3 MOV RDX,R10 CALL 0x0012204d MOV EDX,0x6 XOR EAX,EAX ADD RSP,0xd8 RET
int1 [16] JS_ThrowSyntaxError(int8 param_1,int8 param_2) { JS_ThrowError(param_1,3,param_2); return ZEXT816(6) << 0x40; }
20,690
tree_search_next
eloqsql/mysys/tree.c
void *tree_search_next(TREE *tree, TREE_ELEMENT ***last_pos, int l_offs, int r_offs) { TREE_ELEMENT *x= **last_pos; if (ELEMENT_CHILD(x, r_offs) != &null_element) { x= ELEMENT_CHILD(x, r_offs); *++*last_pos= x; while (ELEMENT_CHILD(x, l_offs) != &null_element) { x= ELEMENT_CHILD(x, l_offs); *++*last_pos= x; } return ELEMENT_KEY(tree, x); } else { TREE_ELEMENT *y= *--*last_pos; while (y != &null_element && x == ELEMENT_CHILD(y, r_offs)) { x= y; y= *--*last_pos; } return y == &null_element ? NULL : ELEMENT_KEY(tree, y); } }
O3
c
tree_search_next: pushq %rbp movq %rsp, %rbp movq (%rsi), %r8 movq (%r8), %r10 movslq %ecx, %r9 movq (%r10,%r9), %rax leaq 0x2c8db1(%rip), %rcx # 0x2f6458 cmpq %rcx, %rax je 0x2d6e6 leaq 0x8(%r8), %r9 movq %r9, (%rsi) movq %rax, 0x8(%r8) movslq %edx, %rdx movq (%rax,%rdx), %r8 cmpq %rcx, %r8 je 0x2d6d6 movq %r8, %rax movq (%rsi), %r8 leaq 0x8(%r8), %r9 movq %r9, (%rsi) movq %rax, 0x8(%r8) jmp 0x2d6ba movl 0x208(%rdi), %ecx testq %rcx, %rcx je 0x2d717 addq %rcx, %rax jmp 0x2d721 addq $-0x8, %r8 xorl %eax, %eax movq %r8, (%rsi) movq (%r8), %rdx cmpq %rcx, %rdx je 0x2d721 addq $-0x8, %r8 cmpq (%rdx,%r9), %r10 movq %rdx, %r10 je 0x2d6ec movl 0x208(%rdi), %eax testq %rax, %rax je 0x2d71d addq %rax, %rdx movq %rdx, %rax jmp 0x2d721 movq 0x18(%rax), %rax jmp 0x2d721 movq 0x18(%rdx), %rax popq %rbp retq
tree_search_next: push rbp mov rbp, rsp mov r8, [rsi] mov r10, [r8] movsxd r9, ecx mov rax, [r10+r9] lea rcx, null_element cmp rax, rcx jz short loc_2D6E6 lea r9, [r8+8] mov [rsi], r9 mov [r8+8], rax movsxd rdx, edx loc_2D6BA: mov r8, [rax+rdx] cmp r8, rcx jz short loc_2D6D6 mov rax, r8 mov r8, [rsi] lea r9, [r8+8] mov [rsi], r9 mov [r8+8], rax jmp short loc_2D6BA loc_2D6D6: mov ecx, [rdi+208h] test rcx, rcx jz short loc_2D717 add rax, rcx jmp short loc_2D721 loc_2D6E6: add r8, 0FFFFFFFFFFFFFFF8h xor eax, eax loc_2D6EC: mov [rsi], r8 mov rdx, [r8] cmp rdx, rcx jz short loc_2D721 add r8, 0FFFFFFFFFFFFFFF8h cmp r10, [rdx+r9] mov r10, rdx jz short loc_2D6EC mov eax, [rdi+208h] test rax, rax jz short loc_2D71D add rdx, rax mov rax, rdx jmp short loc_2D721 loc_2D717: mov rax, [rax+18h] jmp short loc_2D721 loc_2D71D: mov rax, [rdx+18h] loc_2D721: pop rbp retn
char * tree_search_next(long long a1, _QWORD **a2, int a3, int a4) { _QWORD *v4; // r8 _QWORD *v5; // r10 long long v6; // rax _QWORD *v7; // r9 char *result; // rax _QWORD *v9; // r8 _QWORD *v10; // rdx bool v11; // zf v4 = *a2; v5 = (_QWORD *)**a2; v6 = *(_QWORD *)((char *)v5 + a4); if ( (_UNKNOWN *)v6 == &null_element ) { v9 = v4 - 1; result = 0LL; while ( 1 ) { *a2 = v9; v10 = (_QWORD *)*v9; if ( (_UNKNOWN *)*v9 == &null_element ) break; --v9; v11 = v5 == *(_QWORD **)((char *)v10 + a4); v5 = v10; if ( !v11 ) { if ( *(_DWORD *)(a1 + 520) ) return (char *)v10 + *(unsigned int *)(a1 + 520); else return (char *)v10[3]; } } } else { *a2 = v4 + 1; v4[1] = v6; while ( *(_UNKNOWN **)(v6 + a3) != &null_element ) { v6 = *(_QWORD *)(v6 + a3); v7 = *a2 + 1; *a2 = v7; *v7 = v6; } if ( *(_DWORD *)(a1 + 520) ) return (char *)(*(unsigned int *)(a1 + 520) + v6); else return *(char **)(v6 + 24); } return result; }
tree_search_next: PUSH RBP MOV RBP,RSP MOV R8,qword ptr [RSI] MOV R10,qword ptr [R8] MOVSXD R9,ECX MOV RAX,qword ptr [R10 + R9*0x1] LEA RCX,[0x3f6458] CMP RAX,RCX JZ 0x0012d6e6 LEA R9,[R8 + 0x8] MOV qword ptr [RSI],R9 MOV qword ptr [R8 + 0x8],RAX MOVSXD RDX,EDX LAB_0012d6ba: MOV R8,qword ptr [RAX + RDX*0x1] CMP R8,RCX JZ 0x0012d6d6 MOV RAX,R8 MOV R8,qword ptr [RSI] LEA R9,[R8 + 0x8] MOV qword ptr [RSI],R9 MOV qword ptr [R8 + 0x8],RAX JMP 0x0012d6ba LAB_0012d6d6: MOV ECX,dword ptr [RDI + 0x208] TEST RCX,RCX JZ 0x0012d717 ADD RAX,RCX JMP 0x0012d721 LAB_0012d6e6: ADD R8,-0x8 XOR EAX,EAX LAB_0012d6ec: MOV qword ptr [RSI],R8 MOV RDX,qword ptr [R8] CMP RDX,RCX JZ 0x0012d721 ADD R8,-0x8 CMP R10,qword ptr [RDX + R9*0x1] MOV R10,RDX JZ 0x0012d6ec MOV EAX,dword ptr [RDI + 0x208] TEST RAX,RAX JZ 0x0012d71d ADD RDX,RAX MOV RAX,RDX JMP 0x0012d721 LAB_0012d717: MOV RAX,qword ptr [RAX + 0x18] JMP 0x0012d721 LAB_0012d71d: MOV RAX,qword ptr [RDX + 0x18] LAB_0012d721: POP RBP RET
int1 * tree_search_next(long param_1,long *param_2,int param_3,int param_4) { long lVar1; int1 *puVar2; long *plVar3; int1 *puVar4; bool bVar5; plVar3 = (long *)*param_2; puVar4 = (int1 *)*plVar3; puVar2 = *(int1 **)(puVar4 + param_4); if (puVar2 == null_element) { do { plVar3 = plVar3 + -1; *param_2 = (long)plVar3; puVar2 = (int1 *)*plVar3; if (puVar2 == null_element) { return (int1 *)0x0; } bVar5 = puVar4 == *(int1 **)(puVar2 + param_4); puVar4 = puVar2; } while (bVar5); if ((ulong)*(uint *)(param_1 + 0x208) == 0) { puVar2 = *(int1 **)(puVar2 + 0x18); } else { puVar2 = puVar2 + *(uint *)(param_1 + 0x208); } } else { *param_2 = (long)(plVar3 + 1); plVar3[1] = (long)puVar2; while (puVar4 = *(int1 **)(puVar2 + param_3), puVar4 != null_element) { lVar1 = *param_2; *param_2 = lVar1 + 8; *(int1 **)(lVar1 + 8) = puVar4; puVar2 = puVar4; } if ((ulong)*(uint *)(param_1 + 0x208) == 0) { puVar2 = *(int1 **)(puVar2 + 0x18); } else { puVar2 = puVar2 + *(uint *)(param_1 + 0x208); } } return puVar2; }
20,691
_bfdec_div
bluesky950520[P]quickjs/libbf.c
static int __bfdec_div(bfdec_t *r, const bfdec_t *a, const bfdec_t *b, limb_t prec, bf_flags_t flags) { int ret, r_sign; limb_t n, nb, precl; r_sign = a->sign ^ b->sign; if (a->expn >= BF_EXP_INF || b->expn >= BF_EXP_INF) { if (a->expn == BF_EXP_NAN || b->expn == BF_EXP_NAN) { bfdec_set_nan(r); return 0; } else if (a->expn == BF_EXP_INF && b->expn == BF_EXP_INF) { bfdec_set_nan(r); return BF_ST_INVALID_OP; } else if (a->expn == BF_EXP_INF) { bfdec_set_inf(r, r_sign); return 0; } else { bfdec_set_zero(r, r_sign); return 0; } } else if (a->expn == BF_EXP_ZERO) { if (b->expn == BF_EXP_ZERO) { bfdec_set_nan(r); return BF_ST_INVALID_OP; } else { bfdec_set_zero(r, r_sign); return 0; } } else if (b->expn == BF_EXP_ZERO) { bfdec_set_inf(r, r_sign); return BF_ST_DIVIDE_ZERO; } nb = b->len; if (prec == BF_PREC_INF) { /* infinite precision: return BF_ST_INVALID_OP if not an exact result */ /* XXX: check */ precl = nb + 1; } else if (flags & BF_FLAG_RADPNT_PREC) { /* number of digits after the decimal point */ /* XXX: check (2 extra digits for rounding + 2 digits) */ precl = (bf_max(a->expn - b->expn, 0) + 2 + prec + 2 + LIMB_DIGITS - 1) / LIMB_DIGITS; } else { /* number of limbs of the quotient (2 extra digits for rounding) */ precl = (prec + 2 + LIMB_DIGITS - 1) / LIMB_DIGITS; } n = bf_max(a->len, precl); { limb_t *taba, na, i; slimb_t d; na = n + nb; taba = bf_malloc(r->ctx, (na + 1) * sizeof(limb_t)); if (!taba) goto fail; d = na - a->len; memset(taba, 0, d * sizeof(limb_t)); memcpy(taba + d, a->tab, a->len * sizeof(limb_t)); if (bfdec_resize(r, n + 1)) goto fail1; if (mp_div_dec(r->ctx, r->tab, taba, na, b->tab, nb)) { fail1: bf_free(r->ctx, taba); goto fail; } /* see if non zero remainder */ for(i = 0; i < nb; i++) { if (taba[i] != 0) break; } bf_free(r->ctx, taba); if (i != nb) { if (prec == BF_PREC_INF) { bfdec_set_nan(r); return BF_ST_INVALID_OP; } else { r->tab[0] |= 1; } } r->expn = a->expn - b->expn + LIMB_DIGITS; r->sign = r_sign; ret = bfdec_normalize_and_round(r, prec, flags); } return ret; fail: bfdec_set_nan(r); return BF_ST_MEM_ERROR; }
O0
c
_bfdec_div: subq $0x78, %rsp movq %rdi, 0x68(%rsp) movq %rsi, 0x60(%rsp) movq %rdx, 0x58(%rsp) movq %rcx, 0x50(%rsp) movl %r8d, 0x4c(%rsp) movq 0x60(%rsp), %rax movl 0x8(%rax), %eax movq 0x58(%rsp), %rcx xorl 0x8(%rcx), %eax movl %eax, 0x44(%rsp) movq 0x60(%rsp), %rax movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE cmpq %rcx, 0x10(%rax) jge 0xf43bf movq 0x58(%rsp), %rax movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE cmpq %rcx, 0x10(%rax) jl 0xf448c movq 0x60(%rsp), %rax movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF cmpq %rcx, 0x10(%rax) je 0xf43e9 movq 0x58(%rsp), %rax movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF cmpq %rcx, 0x10(%rax) jne 0xf4400 movq 0x68(%rsp), %rdi callq 0xf3cc0 movl $0x0, 0x74(%rsp) jmp 0xf47b7 movq 0x60(%rsp), %rax movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE cmpq %rcx, 0x10(%rax) jne 0xf4441 movq 0x58(%rsp), %rax movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE cmpq %rcx, 0x10(%rax) jne 0xf4441 movq 0x68(%rsp), %rdi callq 0xf3cc0 movl $0x1, 0x74(%rsp) jmp 0xf47b7 movq 0x60(%rsp), %rax movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE cmpq %rcx, 0x10(%rax) jne 0xf4471 movq 0x68(%rsp), %rdi movl 0x44(%rsp), %esi callq 0xf4160 movl $0x0, 0x74(%rsp) jmp 0xf47b7 movq 0x68(%rsp), %rdi movl 0x44(%rsp), %esi callq 0xf4180 movl $0x0, 0x74(%rsp) jmp 0xf47b7 movq 0x60(%rsp), %rax movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 cmpq %rcx, 0x10(%rax) jne 0xf44e8 movq 0x58(%rsp), %rax movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 cmpq %rcx, 0x10(%rax) jne 0xf44cd movq 0x68(%rsp), %rdi callq 0xf3cc0 movl $0x1, 0x74(%rsp) jmp 0xf47b7 movq 0x68(%rsp), %rdi movl 0x44(%rsp), %esi callq 0xf4180 movl $0x0, 0x74(%rsp) jmp 0xf47b7 movq 0x58(%rsp), %rax movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 cmpq %rcx, 0x10(%rax) jne 0xf4518 movq 0x68(%rsp), %rdi movl 0x44(%rsp), %esi callq 0xf4160 movl $0x2, 0x74(%rsp) jmp 0xf47b7 jmp 0xf451a jmp 0xf451c movq 0x58(%rsp), %rax movq 0x18(%rax), %rax movq %rax, 0x30(%rsp) movabsq $0x3fffffffffffffff, %rax # imm = 0x3FFFFFFFFFFFFFFF cmpq %rax, 0x50(%rsp) jne 0xf454b movq 0x30(%rsp), %rax addq $0x1, %rax movq %rax, 0x28(%rsp) jmp 0xf45ba movl 0x4c(%rsp), %eax andl $0x10, %eax cmpl $0x0, %eax je 0xf4598 movq 0x60(%rsp), %rax movq 0x10(%rax), %rdi movq 0x58(%rsp), %rax subq 0x10(%rax), %rdi xorl %eax, %eax movl %eax, %esi callq 0xe7060 addq $0x2, %rax addq 0x50(%rsp), %rax addq $0x2, %rax addq $0x13, %rax subq $0x1, %rax movl $0x13, %ecx xorl %edx, %edx divq %rcx movq %rax, 0x28(%rsp) jmp 0xf45b8 movq 0x50(%rsp), %rax addq $0x2, %rax addq $0x13, %rax subq $0x1, %rax movl $0x13, %ecx xorl %edx, %edx divq %rcx movq %rax, 0x28(%rsp) jmp 0xf45ba movq 0x60(%rsp), %rax movq 0x18(%rax), %rdi movq 0x28(%rsp), %rsi callq 0xe7060 movq %rax, 0x38(%rsp) movq 0x38(%rsp), %rax addq 0x30(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x68(%rsp), %rax movq (%rax), %rdi movq 0x18(%rsp), %rsi addq $0x1, %rsi shlq $0x3, %rsi callq 0xe8060 movq %rax, 0x20(%rsp) cmpq $0x0, 0x20(%rsp) jne 0xf460d jmp 0xf47a5 movq 0x18(%rsp), %rax movq 0x60(%rsp), %rcx subq 0x18(%rcx), %rax movq %rax, 0x8(%rsp) movq 0x20(%rsp), %rdi movq 0x8(%rsp), %rdx shlq $0x3, %rdx xorl %esi, %esi callq 0xe350 movq 0x20(%rsp), %rdi movq 0x8(%rsp), %rax shlq $0x3, %rax addq %rax, %rdi movq 0x60(%rsp), %rax movq 0x20(%rax), %rsi movq 0x60(%rsp), %rax movq 0x18(%rax), %rdx shlq $0x3, %rdx callq 0xe5b0 movq 0x68(%rsp), %rdi movq 0x38(%rsp), %rsi addq $0x1, %rsi callq 0xf3560 cmpl $0x0, %eax je 0xf467b jmp 0xf46b0 movq 0x68(%rsp), %rax movq (%rax), %rdi movq 0x68(%rsp), %rax movq 0x20(%rax), %rsi movq 0x20(%rsp), %rdx movq 0x18(%rsp), %rcx movq 0x58(%rsp), %rax movq 0x20(%rax), %r8 movq 0x30(%rsp), %r9 callq 0xf9c90 cmpl $0x0, %eax je 0xf46c7 jmp 0xf46b0 movq 0x68(%rsp), %rax movq (%rax), %rdi movq 0x20(%rsp), %rsi callq 0xe63d0 jmp 0xf47a5 movq $0x0, 0x10(%rsp) movq 0x10(%rsp), %rax cmpq 0x30(%rsp), %rax jae 0xf4701 movq 0x20(%rsp), %rax movq 0x10(%rsp), %rcx cmpq $0x0, (%rax,%rcx,8) je 0xf46ef jmp 0xf4701 jmp 0xf46f1 movq 0x10(%rsp), %rax addq $0x1, %rax movq %rax, 0x10(%rsp) jmp 0xf46d0 movq 0x68(%rsp), %rax movq (%rax), %rdi movq 0x20(%rsp), %rsi callq 0xe63d0 movq 0x10(%rsp), %rax cmpq 0x30(%rsp), %rax je 0xf4759 movabsq $0x3fffffffffffffff, %rax # imm = 0x3FFFFFFFFFFFFFFF cmpq %rax, 0x50(%rsp) jne 0xf4744 movq 0x68(%rsp), %rdi callq 0xf3cc0 movl $0x1, 0x74(%rsp) jmp 0xf47b7 movq 0x68(%rsp), %rax movq 0x20(%rax), %rax movq (%rax), %rcx orq $0x1, %rcx movq %rcx, (%rax) jmp 0xf4759 movq 0x60(%rsp), %rax movq 0x10(%rax), %rcx movq 0x58(%rsp), %rax subq 0x10(%rax), %rcx addq $0x13, %rcx movq 0x68(%rsp), %rax movq %rcx, 0x10(%rax) movl 0x44(%rsp), %ecx movq 0x68(%rsp), %rax movl %ecx, 0x8(%rax) movq 0x68(%rsp), %rdi movq 0x50(%rsp), %rsi movl 0x4c(%rsp), %edx callq 0xf3410 movl %eax, 0x48(%rsp) movl 0x48(%rsp), %eax movl %eax, 0x74(%rsp) jmp 0xf47b7 movq 0x68(%rsp), %rdi callq 0xf3cc0 movl $0x20, 0x74(%rsp) movl 0x74(%rsp), %eax addq $0x78, %rsp retq
__bfdec_div: sub rsp, 78h mov [rsp+78h+var_10], rdi mov [rsp+78h+var_18], rsi mov [rsp+78h+var_20], rdx mov [rsp+78h+var_28], rcx mov [rsp+78h+var_2C], r8d mov rax, [rsp+78h+var_18] mov eax, [rax+8] mov rcx, [rsp+78h+var_20] xor eax, [rcx+8] mov [rsp+78h+var_34], eax mov rax, [rsp+78h+var_18] mov rcx, 7FFFFFFFFFFFFFFEh cmp [rax+10h], rcx jge short loc_F43BF mov rax, [rsp+78h+var_20] mov rcx, 7FFFFFFFFFFFFFFEh cmp [rax+10h], rcx jl loc_F448C loc_F43BF: mov rax, [rsp+78h+var_18] mov rcx, 7FFFFFFFFFFFFFFFh cmp [rax+10h], rcx jz short loc_F43E9 mov rax, [rsp+78h+var_20] mov rcx, 7FFFFFFFFFFFFFFFh cmp [rax+10h], rcx jnz short loc_F4400 loc_F43E9: mov rdi, [rsp+78h+var_10] call bfdec_set_nan mov [rsp+78h+var_4], 0 jmp loc_F47B7 loc_F4400: mov rax, [rsp+78h+var_18] mov rcx, 7FFFFFFFFFFFFFFEh cmp [rax+10h], rcx jnz short loc_F4441 mov rax, [rsp+78h+var_20] mov rcx, 7FFFFFFFFFFFFFFEh cmp [rax+10h], rcx jnz short loc_F4441 mov rdi, [rsp+78h+var_10] call bfdec_set_nan mov [rsp+78h+var_4], 1 jmp loc_F47B7 loc_F4441: mov rax, [rsp+78h+var_18] mov rcx, 7FFFFFFFFFFFFFFEh cmp [rax+10h], rcx jnz short loc_F4471 mov rdi, [rsp+78h+var_10] mov esi, [rsp+78h+var_34] call bfdec_set_inf mov [rsp+78h+var_4], 0 jmp loc_F47B7 loc_F4471: mov rdi, [rsp+78h+var_10] mov esi, [rsp+78h+var_34] call bfdec_set_zero mov [rsp+78h+var_4], 0 jmp loc_F47B7 loc_F448C: mov rax, [rsp+78h+var_18] mov rcx, 8000000000000000h cmp [rax+10h], rcx jnz short loc_F44E8 mov rax, [rsp+78h+var_20] mov rcx, 8000000000000000h cmp [rax+10h], rcx jnz short loc_F44CD mov rdi, [rsp+78h+var_10] call bfdec_set_nan mov [rsp+78h+var_4], 1 jmp loc_F47B7 loc_F44CD: mov rdi, [rsp+78h+var_10] mov esi, [rsp+78h+var_34] call bfdec_set_zero mov [rsp+78h+var_4], 0 jmp loc_F47B7 loc_F44E8: mov rax, [rsp+78h+var_20] mov rcx, 8000000000000000h cmp [rax+10h], rcx jnz short loc_F4518 mov rdi, [rsp+78h+var_10] mov esi, [rsp+78h+var_34] call bfdec_set_inf mov [rsp+78h+var_4], 2 jmp loc_F47B7 loc_F4518: jmp short $+2 loc_F451A: jmp short $+2 loc_F451C: mov rax, [rsp+78h+var_20] mov rax, [rax+18h] mov [rsp+78h+var_48], rax mov rax, 3FFFFFFFFFFFFFFFh cmp [rsp+78h+var_28], rax jnz short loc_F454B mov rax, [rsp+78h+var_48] add rax, 1 mov [rsp+78h+var_50], rax jmp short loc_F45BA loc_F454B: mov eax, [rsp+78h+var_2C] and eax, 10h cmp eax, 0 jz short loc_F4598 mov rax, [rsp+78h+var_18] mov rdi, [rax+10h] mov rax, [rsp+78h+var_20] sub rdi, [rax+10h] xor eax, eax mov esi, eax call bf_max add rax, 2 add rax, [rsp+78h+var_28] add rax, 2 add rax, 13h sub rax, 1 mov ecx, 13h xor edx, edx div rcx mov [rsp+78h+var_50], rax jmp short loc_F45B8 loc_F4598: mov rax, [rsp+78h+var_28] add rax, 2 add rax, 13h sub rax, 1 mov ecx, 13h xor edx, edx div rcx mov [rsp+78h+var_50], rax loc_F45B8: jmp short $+2 loc_F45BA: mov rax, [rsp+78h+var_18] mov rdi, [rax+18h] mov rsi, [rsp+78h+var_50] call bf_max mov [rsp+78h+var_40], rax mov rax, [rsp+78h+var_40] add rax, [rsp+78h+var_48] mov [rsp+78h+var_60], rax mov rax, [rsp+78h+var_10] mov rdi, [rax] mov rsi, [rsp+78h+var_60] add rsi, 1 shl rsi, 3 call bf_malloc mov [rsp+78h+var_58], rax cmp [rsp+78h+var_58], 0 jnz short loc_F460D jmp loc_F47A5 loc_F460D: mov rax, [rsp+78h+var_60] mov rcx, [rsp+78h+var_18] sub rax, [rcx+18h] mov [rsp+78h+var_70], rax mov rdi, [rsp+78h+var_58] mov rdx, [rsp+78h+var_70] shl rdx, 3 xor esi, esi call _memset mov rdi, [rsp+78h+var_58] mov rax, [rsp+78h+var_70] shl rax, 3 add rdi, rax mov rax, [rsp+78h+var_18] mov rsi, [rax+20h] mov rax, [rsp+78h+var_18] mov rdx, [rax+18h] shl rdx, 3 call _memcpy mov rdi, [rsp+78h+var_10] mov rsi, [rsp+78h+var_40] add rsi, 1 call bfdec_resize cmp eax, 0 jz short loc_F467B jmp short loc_F46B0 loc_F467B: mov rax, [rsp+78h+var_10] mov rdi, [rax] mov rax, [rsp+78h+var_10] mov rsi, [rax+20h] mov rdx, [rsp+78h+var_58] mov rcx, [rsp+78h+var_60] mov rax, [rsp+78h+var_20] mov r8, [rax+20h] mov r9, [rsp+78h+var_48] call mp_div_dec cmp eax, 0 jz short loc_F46C7 jmp short $+2 loc_F46B0: mov rax, [rsp+78h+var_10] mov rdi, [rax] mov rsi, [rsp+78h+var_58] call bf_free_0 jmp loc_F47A5 loc_F46C7: mov [rsp+78h+var_68], 0 loc_F46D0: mov rax, [rsp+78h+var_68] cmp rax, [rsp+78h+var_48] jnb short loc_F4701 mov rax, [rsp+78h+var_58] mov rcx, [rsp+78h+var_68] cmp qword ptr [rax+rcx*8], 0 jz short loc_F46EF jmp short loc_F4701 loc_F46EF: jmp short $+2 loc_F46F1: mov rax, [rsp+78h+var_68] add rax, 1 mov [rsp+78h+var_68], rax jmp short loc_F46D0 loc_F4701: mov rax, [rsp+78h+var_10] mov rdi, [rax] mov rsi, [rsp+78h+var_58] call bf_free_0 mov rax, [rsp+78h+var_68] cmp rax, [rsp+78h+var_48] jz short loc_F4759 mov rax, 3FFFFFFFFFFFFFFFh cmp [rsp+78h+var_28], rax jnz short loc_F4744 mov rdi, [rsp+78h+var_10] call bfdec_set_nan mov [rsp+78h+var_4], 1 jmp short loc_F47B7 loc_F4744: mov rax, [rsp+78h+var_10] mov rax, [rax+20h] mov rcx, [rax] or rcx, 1 mov [rax], rcx jmp short $+2 loc_F4759: mov rax, [rsp+78h+var_18] mov rcx, [rax+10h] mov rax, [rsp+78h+var_20] sub rcx, [rax+10h] add rcx, 13h mov rax, [rsp+78h+var_10] mov [rax+10h], rcx mov ecx, [rsp+78h+var_34] mov rax, [rsp+78h+var_10] mov [rax+8], ecx mov rdi, [rsp+78h+var_10] mov rsi, [rsp+78h+var_28] mov edx, [rsp+78h+var_2C] call bfdec_normalize_and_round mov [rsp+78h+var_30], eax mov eax, [rsp+78h+var_30] mov [rsp+78h+var_4], eax jmp short loc_F47B7 loc_F47A5: mov rdi, [rsp+78h+var_10] call bfdec_set_nan mov [rsp+78h+var_4], 20h ; ' ' loc_F47B7: mov eax, [rsp+78h+var_4] add rsp, 78h retn
long long _bfdec_div(long long *a1, long long a2, long long a3, long long a4, unsigned int a5) { long long v5; // rax long long v6; // rdx long long v7; // rcx long long v8; // r8 long long v9; // r9 long long v10; // rdx long long v11; // rcx long long v12; // r8 long long v13; // r9 unsigned long long v15; // [rsp+8h] [rbp-70h] unsigned long long i; // [rsp+10h] [rbp-68h] unsigned long long v17; // [rsp+18h] [rbp-60h] long long v18; // [rsp+20h] [rbp-58h] unsigned long long v19; // [rsp+28h] [rbp-50h] unsigned long long v20; // [rsp+30h] [rbp-48h] long long v21; // [rsp+38h] [rbp-40h] int v22; // [rsp+44h] [rbp-34h] v22 = *(_DWORD *)(a3 + 8) ^ *(_DWORD *)(a2 + 8); if ( *(long long *)(a2 + 16) < 0x7FFFFFFFFFFFFFFELL && *(long long *)(a3 + 16) < 0x7FFFFFFFFFFFFFFELL ) { if ( *(_QWORD *)(a2 + 16) != 0x8000000000000000LL ) { if ( *(_QWORD *)(a3 + 16) == 0x8000000000000000LL ) { bfdec_set_inf((long long)a1, v22); return 2; } v20 = *(_QWORD *)(a3 + 24); if ( a4 == 0x3FFFFFFFFFFFFFFFLL ) { v5 = bf_max(*(_QWORD *)(a2 + 24), v20 + 1); } else if ( (a5 & 0x10) != 0 ) { v19 = (a4 + bf_max(*(_QWORD *)(a2 + 16) - *(_QWORD *)(a3 + 16), 0LL) + 2 + 20) / 0x13uLL; v5 = bf_max(*(_QWORD *)(a2 + 24), v19); } else { v5 = bf_max(*(_QWORD *)(a2 + 24), (a4 + 20) / 0x13uLL); } v21 = v5; v17 = v20 + v5; v18 = bf_malloc(*a1, 8 * (v20 + v5 + 1), v6, v7, v8, v9); if ( v18 ) { v15 = v17 - *(_QWORD *)(a2 + 24); memset(v18, 0LL, 8 * v15); memcpy(8 * v15 + v18, *(_QWORD *)(a2 + 32), 8LL * *(_QWORD *)(a2 + 24)); if ( !(unsigned int)bfdec_resize(a1, v21 + 1) && !(unsigned int)mp_div_dec(*a1, a1[4], v18, v17, *(_QWORD *)(a3 + 32), v20) ) { for ( i = 0LL; i < v20; ++i ) { v11 = i; if ( *(_QWORD *)(v18 + 8 * i) ) break; } bf_free_0(*a1, v18, v10, v11, v12, v13); if ( i != v20 ) { if ( a4 == 0x3FFFFFFFFFFFFFFFLL ) goto LABEL_33; *(_QWORD *)a1[4] |= 1uLL; } a1[2] = *(_QWORD *)(a2 + 16) - *(_QWORD *)(a3 + 16) + 19LL; *((_DWORD *)a1 + 2) = v22; return (unsigned int)bfdec_normalize_and_round(a1, a4, a5); } bf_free_0(*a1, v18, v10, v11, v12, v13); } bfdec_set_nan((long long)a1); return 32; } if ( *(_QWORD *)(a3 + 16) != 0x8000000000000000LL ) { bfdec_set_zero((long long)a1, v22); return 0; } LABEL_33: bfdec_set_nan((long long)a1); return 1; } if ( *(_QWORD *)(a2 + 16) == 0x7FFFFFFFFFFFFFFFLL || *(_QWORD *)(a3 + 16) == 0x7FFFFFFFFFFFFFFFLL ) { bfdec_set_nan((long long)a1); return 0; } if ( *(_QWORD *)(a2 + 16) == 0x7FFFFFFFFFFFFFFELL && *(_QWORD *)(a3 + 16) == 0x7FFFFFFFFFFFFFFELL ) goto LABEL_33; if ( *(_QWORD *)(a2 + 16) == 0x7FFFFFFFFFFFFFFELL ) bfdec_set_inf((long long)a1, v22); else bfdec_set_zero((long long)a1, v22); return 0; }
__bfdec_div: SUB RSP,0x78 MOV qword ptr [RSP + 0x68],RDI MOV qword ptr [RSP + 0x60],RSI MOV qword ptr [RSP + 0x58],RDX MOV qword ptr [RSP + 0x50],RCX MOV dword ptr [RSP + 0x4c],R8D MOV RAX,qword ptr [RSP + 0x60] MOV EAX,dword ptr [RAX + 0x8] MOV RCX,qword ptr [RSP + 0x58] XOR EAX,dword ptr [RCX + 0x8] MOV dword ptr [RSP + 0x44],EAX MOV RAX,qword ptr [RSP + 0x60] MOV RCX,0x7ffffffffffffffe CMP qword ptr [RAX + 0x10],RCX JGE 0x001f43bf MOV RAX,qword ptr [RSP + 0x58] MOV RCX,0x7ffffffffffffffe CMP qword ptr [RAX + 0x10],RCX JL 0x001f448c LAB_001f43bf: MOV RAX,qword ptr [RSP + 0x60] MOV RCX,0x7fffffffffffffff CMP qword ptr [RAX + 0x10],RCX JZ 0x001f43e9 MOV RAX,qword ptr [RSP + 0x58] MOV RCX,0x7fffffffffffffff CMP qword ptr [RAX + 0x10],RCX JNZ 0x001f4400 LAB_001f43e9: MOV RDI,qword ptr [RSP + 0x68] CALL 0x001f3cc0 MOV dword ptr [RSP + 0x74],0x0 JMP 0x001f47b7 LAB_001f4400: MOV RAX,qword ptr [RSP + 0x60] MOV RCX,0x7ffffffffffffffe CMP qword ptr [RAX + 0x10],RCX JNZ 0x001f4441 MOV RAX,qword ptr [RSP + 0x58] MOV RCX,0x7ffffffffffffffe CMP qword ptr [RAX + 0x10],RCX JNZ 0x001f4441 MOV RDI,qword ptr [RSP + 0x68] CALL 0x001f3cc0 MOV dword ptr [RSP + 0x74],0x1 JMP 0x001f47b7 LAB_001f4441: MOV RAX,qword ptr [RSP + 0x60] MOV RCX,0x7ffffffffffffffe CMP qword ptr [RAX + 0x10],RCX JNZ 0x001f4471 MOV RDI,qword ptr [RSP + 0x68] MOV ESI,dword ptr [RSP + 0x44] CALL 0x001f4160 MOV dword ptr [RSP + 0x74],0x0 JMP 0x001f47b7 LAB_001f4471: MOV RDI,qword ptr [RSP + 0x68] MOV ESI,dword ptr [RSP + 0x44] CALL 0x001f4180 MOV dword ptr [RSP + 0x74],0x0 JMP 0x001f47b7 LAB_001f448c: MOV RAX,qword ptr [RSP + 0x60] MOV RCX,-0x8000000000000000 CMP qword ptr [RAX + 0x10],RCX JNZ 0x001f44e8 MOV RAX,qword ptr [RSP + 0x58] MOV RCX,-0x8000000000000000 CMP qword ptr [RAX + 0x10],RCX JNZ 0x001f44cd MOV RDI,qword ptr [RSP + 0x68] CALL 0x001f3cc0 MOV dword ptr [RSP + 0x74],0x1 JMP 0x001f47b7 LAB_001f44cd: MOV RDI,qword ptr [RSP + 0x68] MOV ESI,dword ptr [RSP + 0x44] CALL 0x001f4180 MOV dword ptr [RSP + 0x74],0x0 JMP 0x001f47b7 LAB_001f44e8: MOV RAX,qword ptr [RSP + 0x58] MOV RCX,-0x8000000000000000 CMP qword ptr [RAX + 0x10],RCX JNZ 0x001f4518 MOV RDI,qword ptr [RSP + 0x68] MOV ESI,dword ptr [RSP + 0x44] CALL 0x001f4160 MOV dword ptr [RSP + 0x74],0x2 JMP 0x001f47b7 LAB_001f4518: JMP 0x001f451a LAB_001f451a: JMP 0x001f451c LAB_001f451c: MOV RAX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x30],RAX MOV RAX,0x3fffffffffffffff CMP qword ptr [RSP + 0x50],RAX JNZ 0x001f454b MOV RAX,qword ptr [RSP + 0x30] ADD RAX,0x1 MOV qword ptr [RSP + 0x28],RAX JMP 0x001f45ba LAB_001f454b: MOV EAX,dword ptr [RSP + 0x4c] AND EAX,0x10 CMP EAX,0x0 JZ 0x001f4598 MOV RAX,qword ptr [RSP + 0x60] MOV RDI,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RSP + 0x58] SUB RDI,qword ptr [RAX + 0x10] XOR EAX,EAX MOV ESI,EAX CALL 0x001e7060 ADD RAX,0x2 ADD RAX,qword ptr [RSP + 0x50] ADD RAX,0x2 ADD RAX,0x13 SUB RAX,0x1 MOV ECX,0x13 XOR EDX,EDX DIV RCX MOV qword ptr [RSP + 0x28],RAX JMP 0x001f45b8 LAB_001f4598: MOV RAX,qword ptr [RSP + 0x50] ADD RAX,0x2 ADD RAX,0x13 SUB RAX,0x1 MOV ECX,0x13 XOR EDX,EDX DIV RCX MOV qword ptr [RSP + 0x28],RAX LAB_001f45b8: JMP 0x001f45ba LAB_001f45ba: MOV RAX,qword ptr [RSP + 0x60] MOV RDI,qword ptr [RAX + 0x18] MOV RSI,qword ptr [RSP + 0x28] CALL 0x001e7060 MOV qword ptr [RSP + 0x38],RAX MOV RAX,qword ptr [RSP + 0x38] ADD RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x68] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RSP + 0x18] ADD RSI,0x1 SHL RSI,0x3 CALL 0x001e8060 MOV qword ptr [RSP + 0x20],RAX CMP qword ptr [RSP + 0x20],0x0 JNZ 0x001f460d JMP 0x001f47a5 LAB_001f460d: MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x60] SUB RAX,qword ptr [RCX + 0x18] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x8] SHL RDX,0x3 XOR ESI,ESI CALL 0x0010e350 MOV RDI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x8] SHL RAX,0x3 ADD RDI,RAX MOV RAX,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RAX + 0x20] MOV RAX,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RAX + 0x18] SHL RDX,0x3 CALL 0x0010e5b0 MOV RDI,qword ptr [RSP + 0x68] MOV RSI,qword ptr [RSP + 0x38] ADD RSI,0x1 CALL 0x001f3560 CMP EAX,0x0 JZ 0x001f467b JMP 0x001f46b0 LAB_001f467b: MOV RAX,qword ptr [RSP + 0x68] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x68] MOV RSI,qword ptr [RAX + 0x20] MOV RDX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x58] MOV R8,qword ptr [RAX + 0x20] MOV R9,qword ptr [RSP + 0x30] CALL 0x001f9c90 CMP EAX,0x0 JZ 0x001f46c7 JMP 0x001f46b0 LAB_001f46b0: MOV RAX,qword ptr [RSP + 0x68] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RSP + 0x20] CALL 0x001e63d0 JMP 0x001f47a5 LAB_001f46c7: MOV qword ptr [RSP + 0x10],0x0 LAB_001f46d0: MOV RAX,qword ptr [RSP + 0x10] CMP RAX,qword ptr [RSP + 0x30] JNC 0x001f4701 MOV RAX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x10] CMP qword ptr [RAX + RCX*0x8],0x0 JZ 0x001f46ef JMP 0x001f4701 LAB_001f46ef: JMP 0x001f46f1 LAB_001f46f1: MOV RAX,qword ptr [RSP + 0x10] ADD RAX,0x1 MOV qword ptr [RSP + 0x10],RAX JMP 0x001f46d0 LAB_001f4701: MOV RAX,qword ptr [RSP + 0x68] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RSP + 0x20] CALL 0x001e63d0 MOV RAX,qword ptr [RSP + 0x10] CMP RAX,qword ptr [RSP + 0x30] JZ 0x001f4759 MOV RAX,0x3fffffffffffffff CMP qword ptr [RSP + 0x50],RAX JNZ 0x001f4744 MOV RDI,qword ptr [RSP + 0x68] CALL 0x001f3cc0 MOV dword ptr [RSP + 0x74],0x1 JMP 0x001f47b7 LAB_001f4744: MOV RAX,qword ptr [RSP + 0x68] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RAX] OR RCX,0x1 MOV qword ptr [RAX],RCX JMP 0x001f4759 LAB_001f4759: MOV RAX,qword ptr [RSP + 0x60] MOV RCX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RSP + 0x58] SUB RCX,qword ptr [RAX + 0x10] ADD RCX,0x13 MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RAX + 0x10],RCX MOV ECX,dword ptr [RSP + 0x44] MOV RAX,qword ptr [RSP + 0x68] MOV dword ptr [RAX + 0x8],ECX MOV RDI,qword ptr [RSP + 0x68] MOV RSI,qword ptr [RSP + 0x50] MOV EDX,dword ptr [RSP + 0x4c] CALL 0x001f3410 MOV dword ptr [RSP + 0x48],EAX MOV EAX,dword ptr [RSP + 0x48] MOV dword ptr [RSP + 0x74],EAX JMP 0x001f47b7 LAB_001f47a5: MOV RDI,qword ptr [RSP + 0x68] CALL 0x001f3cc0 MOV dword ptr [RSP + 0x74],0x20 LAB_001f47b7: MOV EAX,dword ptr [RSP + 0x74] ADD RSP,0x78 RET
int4 __bfdec_div(int8 *param_1,long param_2,ulong param_3,long param_4,uint param_5) { ulong uVar1; uint uVar2; int iVar3; int4 uVar4; ulong uVar5; long lVar6; void *__s; long lVar7; ulong local_68; ulong local_50; int4 local_4; uVar2 = *(uint *)(param_2 + 8) ^ *(uint *)(param_3 + 8); if ((*(long *)(param_2 + 0x10) < 0x7ffffffffffffffe) && (*(long *)(param_3 + 0x10) < 0x7ffffffffffffffe)) { if (*(long *)(param_2 + 0x10) == -0x8000000000000000) { if (*(long *)(param_3 + 0x10) == -0x8000000000000000) { bfdec_set_nan(param_1); local_4 = 1; } else { bfdec_set_zero(param_1,uVar2); local_4 = 0; } } else if (*(long *)(param_3 + 0x10) == -0x8000000000000000) { bfdec_set_inf(param_1,uVar2); local_4 = 2; } else { uVar1 = *(ulong *)(param_3 + 0x18); if (param_4 == 0x3fffffffffffffff) { local_50 = uVar1 + 1; uVar5 = param_3; } else { if ((param_5 & 0x10) == 0) { uVar5 = param_4 + 0x14; } else { lVar6 = bf_max(*(long *)(param_2 + 0x10) - *(long *)(param_3 + 0x10),0); uVar5 = lVar6 + param_4 + 0x16; } local_50 = uVar5 / 0x13; uVar5 = uVar5 % 0x13; } lVar6 = bf_max(*(int8 *)(param_2 + 0x18),local_50,uVar5); __s = (void *)bf_malloc(*param_1); if (__s != (void *)0x0) { lVar7 = (lVar6 + uVar1) - *(long *)(param_2 + 0x18); memset(__s,0,lVar7 * 8); memcpy((void *)((long)__s + lVar7 * 8),*(void **)(param_2 + 0x20), *(long *)(param_2 + 0x18) << 3); iVar3 = bfdec_resize(param_1,lVar6 + 1); if ((iVar3 == 0) && (iVar3 = mp_div_dec(*param_1,param_1[4],__s,lVar6 + uVar1,*(int8 *)(param_3 + 0x20) ,uVar1), iVar3 == 0)) { for (local_68 = 0; (local_68 < uVar1 && (*(long *)((long)__s + local_68 * 8) == 0)); local_68 = local_68 + 1) { } bf_free(*param_1,__s); if (local_68 != uVar1) { if (param_4 == 0x3fffffffffffffff) { bfdec_set_nan(param_1); return 1; } *(ulong *)param_1[4] = *(ulong *)param_1[4] | 1; } param_1[2] = (*(long *)(param_2 + 0x10) - *(long *)(param_3 + 0x10)) + 0x13; *(uint *)(param_1 + 1) = uVar2; uVar4 = bfdec_normalize_and_round(param_1,param_4,param_5); return uVar4; } bf_free(*param_1,__s); } bfdec_set_nan(param_1); local_4 = 0x20; } } else if ((*(long *)(param_2 + 0x10) == 0x7fffffffffffffff) || (*(long *)(param_3 + 0x10) == 0x7fffffffffffffff)) { bfdec_set_nan(param_1); local_4 = 0; } else if ((*(long *)(param_2 + 0x10) == 0x7ffffffffffffffe) && (*(long *)(param_3 + 0x10) == 0x7ffffffffffffffe)) { bfdec_set_nan(param_1); local_4 = 1; } else if (*(long *)(param_2 + 0x10) == 0x7ffffffffffffffe) { bfdec_set_inf(param_1,uVar2); local_4 = 0; } else { bfdec_set_zero(param_1,uVar2); local_4 = 0; } return local_4; }
20,692
_bfdec_div
bluesky950520[P]quickjs/libbf.c
static int __bfdec_div(bfdec_t *r, const bfdec_t *a, const bfdec_t *b, limb_t prec, bf_flags_t flags) { int ret, r_sign; limb_t n, nb, precl; r_sign = a->sign ^ b->sign; if (a->expn >= BF_EXP_INF || b->expn >= BF_EXP_INF) { if (a->expn == BF_EXP_NAN || b->expn == BF_EXP_NAN) { bfdec_set_nan(r); return 0; } else if (a->expn == BF_EXP_INF && b->expn == BF_EXP_INF) { bfdec_set_nan(r); return BF_ST_INVALID_OP; } else if (a->expn == BF_EXP_INF) { bfdec_set_inf(r, r_sign); return 0; } else { bfdec_set_zero(r, r_sign); return 0; } } else if (a->expn == BF_EXP_ZERO) { if (b->expn == BF_EXP_ZERO) { bfdec_set_nan(r); return BF_ST_INVALID_OP; } else { bfdec_set_zero(r, r_sign); return 0; } } else if (b->expn == BF_EXP_ZERO) { bfdec_set_inf(r, r_sign); return BF_ST_DIVIDE_ZERO; } nb = b->len; if (prec == BF_PREC_INF) { /* infinite precision: return BF_ST_INVALID_OP if not an exact result */ /* XXX: check */ precl = nb + 1; } else if (flags & BF_FLAG_RADPNT_PREC) { /* number of digits after the decimal point */ /* XXX: check (2 extra digits for rounding + 2 digits) */ precl = (bf_max(a->expn - b->expn, 0) + 2 + prec + 2 + LIMB_DIGITS - 1) / LIMB_DIGITS; } else { /* number of limbs of the quotient (2 extra digits for rounding) */ precl = (prec + 2 + LIMB_DIGITS - 1) / LIMB_DIGITS; } n = bf_max(a->len, precl); { limb_t *taba, na, i; slimb_t d; na = n + nb; taba = bf_malloc(r->ctx, (na + 1) * sizeof(limb_t)); if (!taba) goto fail; d = na - a->len; memset(taba, 0, d * sizeof(limb_t)); memcpy(taba + d, a->tab, a->len * sizeof(limb_t)); if (bfdec_resize(r, n + 1)) goto fail1; if (mp_div_dec(r->ctx, r->tab, taba, na, b->tab, nb)) { fail1: bf_free(r->ctx, taba); goto fail; } /* see if non zero remainder */ for(i = 0; i < nb; i++) { if (taba[i] != 0) break; } bf_free(r->ctx, taba); if (i != nb) { if (prec == BF_PREC_INF) { bfdec_set_nan(r); return BF_ST_INVALID_OP; } else { r->tab[0] |= 1; } } r->expn = a->expn - b->expn + LIMB_DIGITS; r->sign = r_sign; ret = bfdec_normalize_and_round(r, prec, flags); } return ret; fail: bfdec_set_nan(r); return BF_ST_MEM_ERROR; }
O2
c
_bfdec_div: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %r12 movq %rdi, %rbx movabsq $0x7ffffffffffffffd, %rdi # imm = 0x7FFFFFFFFFFFFFFD movl 0x8(%rdx), %ebp xorl 0x8(%rsi), %ebp movq 0x10(%rsi), %rax cmpq %rdi, %rax jle 0x77794 leaq 0x2(%rdi), %rdx cmpq %rdx, %rax je 0x777a7 movq 0x10(%r12), %rdx jmp 0x7779e movq 0x10(%r12), %rdx cmpq %rdi, %rdx jle 0x777b6 leaq 0x2(%rdi), %rsi cmpq %rsi, %rdx jne 0x777c6 movq %rbx, %rdi callq 0x6f5cd xorl %eax, %eax jmp 0x7792c addq $0x3, %rdi cmpq %rdi, %rax jne 0x777e6 cmpq %rdi, %rdx je 0x777d7 jmp 0x7780d incq %rdi movq %rax, %rsi xorq %rdi, %rsi xorq %rdi, %rdx orq %rsi, %rdx jne 0x777fc movq %rbx, %rdi callq 0x6f5cd pushq $0x1 jmp 0x7792b cmpq %rdi, %rdx jne 0x77819 movq %rbx, %rdi movl %ebp, %esi callq 0x6f63c pushq $0x2 jmp 0x7792b cmpq %rdi, %rax jne 0x7780d movq %rbx, %rdi movl %ebp, %esi callq 0x6f63c jmp 0x777af movq %rbx, %rdi movl %ebp, %esi callq 0x6f612 jmp 0x777af movl %r8d, %r15d movq %rsi, %r13 movq 0x18(%r12), %rdi movabsq $0x3fffffffffffffff, %rsi # imm = 0x3FFFFFFFFFFFFFFF cmpq %rsi, %rcx movq %rcx, 0x18(%rsp) jne 0x7783e leaq 0x1(%rdi), %r14 jmp 0x77868 testb $0x10, %r15b jne 0x7784a leaq 0x14(%rcx), %rax jmp 0x7785d subq %rdx, %rax xorl %edx, %edx testq %rax, %rax cmovleq %rdx, %rax addq %rcx, %rax addq $0x16, %rax pushq $0x13 popq %rcx xorl %edx, %edx divq %rcx movq %rax, %r14 movq 0x18(%r13), %rax cmpq %r14, %rax cmovgq %rax, %r14 movq %rdi, 0x8(%rsp) leaq (%r14,%rdi), %rcx movq (%rbx), %rax movq %rcx, 0x10(%rsp) leaq 0x8(,%rcx,8), %rdx movq (%rax), %rdi xorl %esi, %esi callq *0x8(%rax) testq %rax, %rax je 0x77921 movl %r15d, 0x4(%rsp) movq 0x10(%rsp), %r15 subq 0x18(%r13), %r15 leaq (,%r15,8), %rdx movq %rax, %rdi movq %rax, 0x20(%rsp) xorl %esi, %esi callq 0xe360 movq 0x20(%rsp), %rax leaq (%rax,%r15,8), %rdi movq %rax, %r15 movq 0x18(%r13), %rdx movq 0x20(%r13), %rsi shlq $0x3, %rdx callq 0xe5c0 incq %r14 movq %rbx, %rdi movq %r14, %rsi callq 0x6f50f testl %eax, %eax jne 0x77913 movq (%rbx), %rdi movq 0x20(%rbx), %rsi movq 0x20(%r12), %r8 movq %r15, %rdx movq 0x10(%rsp), %rcx movq 0x8(%rsp), %r9 callq 0x7a2e0 testl %eax, %eax je 0x7793b movq (%rbx), %rax movq (%rax), %rdi movq %r15, %rsi xorl %edx, %edx callq *0x8(%rax) movq %rbx, %rdi callq 0x6f5cd pushq $0x20 popq %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq xorl %r14d, %r14d movq 0x8(%rsp), %rax movq %r15, %rsi cmpq %r14, %rax je 0x77957 cmpq $0x0, (%rsi,%r14,8) jne 0x7795a incq %r14 jmp 0x77946 movq %rax, %r14 movq %rax, %r15 movq (%rbx), %rax movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) cmpq %r15, %r14 movq 0x18(%rsp), %rsi je 0x7798d movabsq $0x3fffffffffffffff, %rax # imm = 0x3FFFFFFFFFFFFFFF cmpq %rax, %rsi je 0x777d7 movq 0x20(%rbx), %rax orq $0x1, (%rax) movq 0x10(%r13), %rax subq 0x10(%r12), %rax addq $0x13, %rax movq %rax, 0x10(%rbx) movl %ebp, 0x8(%rbx) movq %rbx, %rdi movl 0x4(%rsp), %edx addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x770bb
__bfdec_div: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r12, rdx mov rbx, rdi mov rdi, 7FFFFFFFFFFFFFFDh mov ebp, [rdx+8] xor ebp, [rsi+8] mov rax, [rsi+10h] cmp rax, rdi jle short loc_77794 lea rdx, [rdi+2] cmp rax, rdx jz short loc_777A7 mov rdx, [r12+10h] jmp short loc_7779E loc_77794: mov rdx, [r12+10h] cmp rdx, rdi jle short loc_777B6 loc_7779E: lea rsi, [rdi+2] cmp rdx, rsi jnz short loc_777C6 loc_777A7: mov rdi, rbx call bf_set_nan loc_777AF: xor eax, eax jmp loc_7792C loc_777B6: add rdi, 3 cmp rax, rdi jnz short loc_777E6 cmp rdx, rdi jz short loc_777D7 jmp short loc_7780D loc_777C6: inc rdi mov rsi, rax xor rsi, rdi xor rdx, rdi or rdx, rsi jnz short loc_777FC loc_777D7: mov rdi, rbx call bf_set_nan push 1 jmp loc_7792B loc_777E6: cmp rdx, rdi jnz short loc_77819 mov rdi, rbx mov esi, ebp call bf_set_inf push 2 jmp loc_7792B loc_777FC: cmp rax, rdi jnz short loc_7780D mov rdi, rbx mov esi, ebp call bf_set_inf jmp short loc_777AF loc_7780D: mov rdi, rbx mov esi, ebp call bf_set_zero jmp short loc_777AF loc_77819: mov r15d, r8d mov r13, rsi mov rdi, [r12+18h] mov rsi, 3FFFFFFFFFFFFFFFh cmp rcx, rsi mov [rsp+58h+var_40], rcx jnz short loc_7783E lea r14, [rdi+1] jmp short loc_77868 loc_7783E: test r15b, 10h jnz short loc_7784A lea rax, [rcx+14h] jmp short loc_7785D loc_7784A: sub rax, rdx xor edx, edx test rax, rax cmovle rax, rdx add rax, rcx add rax, 16h loc_7785D: push 13h pop rcx xor edx, edx div rcx mov r14, rax loc_77868: mov rax, [r13+18h] cmp rax, r14 cmovg r14, rax mov [rsp+58h+var_50], rdi lea rcx, [r14+rdi] mov rax, [rbx] mov [rsp+58h+var_48], rcx lea rdx, ds:8[rcx*8] mov rdi, [rax] xor esi, esi call qword ptr [rax+8] test rax, rax jz loc_77921 mov [rsp+58h+var_54], r15d mov r15, [rsp+58h+var_48] sub r15, [r13+18h] lea rdx, ds:0[r15*8] mov rdi, rax mov [rsp+58h+var_38], rax xor esi, esi call _memset mov rax, [rsp+58h+var_38] lea rdi, [rax+r15*8] mov r15, rax mov rdx, [r13+18h] mov rsi, [r13+20h] shl rdx, 3 call _memcpy inc r14 mov rdi, rbx mov rsi, r14 call bf_resize test eax, eax jnz short loc_77913 mov rdi, [rbx] mov rsi, [rbx+20h] mov r8, [r12+20h] mov rdx, r15 mov rcx, [rsp+58h+var_48] mov r9, [rsp+58h+var_50] call mp_div_dec test eax, eax jz short loc_7793B loc_77913: mov rax, [rbx] mov rdi, [rax] mov rsi, r15 xor edx, edx call qword ptr [rax+8] loc_77921: mov rdi, rbx call bf_set_nan push 20h ; ' ' loc_7792B: pop rax loc_7792C: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7793B: xor r14d, r14d mov rax, [rsp+58h+var_50] mov rsi, r15 loc_77946: cmp rax, r14 jz short loc_77957 cmp qword ptr [rsi+r14*8], 0 jnz short loc_7795A inc r14 jmp short loc_77946 loc_77957: mov r14, rax loc_7795A: mov r15, rax mov rax, [rbx] mov rdi, [rax] xor edx, edx call qword ptr [rax+8] cmp r14, r15 mov rsi, [rsp+58h+var_40] jz short loc_7798D mov rax, 3FFFFFFFFFFFFFFFh cmp rsi, rax jz loc_777D7 mov rax, [rbx+20h] or qword ptr [rax], 1 loc_7798D: mov rax, [r13+10h] sub rax, [r12+10h] add rax, 13h mov [rbx+10h], rax mov [rbx+8], ebp mov rdi, rbx mov edx, [rsp+58h+var_54] add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp bfdec_normalize_and_round
long long _bfdec_div(_QWORD *a1, long long a2, long long a3, long long a4, unsigned int a5) { int v7; // ebp long long v8; // rax long long v9; // rdx long long v12; // rdi signed long long v13; // r14 unsigned long long v14; // rax long long v15; // rax long long v16; // rax long long v17; // r15 long long i; // r14 unsigned int v20; // [rsp+4h] [rbp-54h] long long v21; // [rsp+8h] [rbp-50h] long long v22; // [rsp+10h] [rbp-48h] long long v24; // [rsp+20h] [rbp-38h] v7 = *(_DWORD *)(a2 + 8) ^ *(_DWORD *)(a3 + 8); v8 = *(_QWORD *)(a2 + 16); if ( v8 > 0x7FFFFFFFFFFFFFFDLL ) { if ( v8 == 0x7FFFFFFFFFFFFFFFLL ) { LABEL_6: bf_set_nan((long long)a1); return 0LL; } v9 = *(_QWORD *)(a3 + 16); goto LABEL_5; } v9 = *(_QWORD *)(a3 + 16); if ( v9 > 0x7FFFFFFFFFFFFFFDLL ) { LABEL_5: if ( v9 == 0x7FFFFFFFFFFFFFFFLL ) goto LABEL_6; if ( !(v8 ^ 0x7FFFFFFFFFFFFFFELL | v9 ^ 0x7FFFFFFFFFFFFFFELL) ) goto LABEL_12; if ( v8 == 0x7FFFFFFFFFFFFFFELL ) { bf_set_inf((long long)a1, v7); return 0LL; } LABEL_17: bf_set_zero((long long)a1, v7); return 0LL; } if ( v8 == 0x8000000000000000LL ) { if ( v9 != 0x8000000000000000LL ) goto LABEL_17; LABEL_12: bf_set_nan((long long)a1); return 1LL; } if ( v9 == 0x8000000000000000LL ) { bf_set_inf((long long)a1, v7); return 2LL; } v12 = *(_QWORD *)(a3 + 24); if ( a4 == 0x3FFFFFFFFFFFFFFFLL ) { v13 = v12 + 1; } else { if ( (a5 & 0x10) != 0 ) { v15 = v8 - v9; if ( v15 <= 0 ) v15 = 0LL; v14 = a4 + v15 + 22; } else { v14 = a4 + 20; } v13 = v14 / 0x13; } if ( *(_QWORD *)(a2 + 24) > v13 ) v13 = *(_QWORD *)(a2 + 24); v21 = *(_QWORD *)(a3 + 24); v22 = v13 + v12; v16 = (*(long long ( **)(_QWORD, _QWORD, signed long long))(*a1 + 8LL))( *(_QWORD *)*a1, 0LL, 8 * (v13 + v12) + 8); if ( !v16 ) { LABEL_32: bf_set_nan((long long)a1); return 32LL; } v20 = a5; v17 = v22 - *(_QWORD *)(a2 + 24); v24 = v16; memset(v16, 0LL, 8 * v17); memcpy(v24 + 8 * v17, *(_QWORD *)(a2 + 32), 8LL * *(_QWORD *)(a2 + 24)); if ( (unsigned int)bf_resize((long long)a1, v13 + 1) || (unsigned int)mp_div_dec(*a1, a1[4], v24, v22, *(_QWORD *)(a3 + 32), v21) ) { (*(void ( **)(_QWORD, long long, _QWORD))(*a1 + 8LL))(*(_QWORD *)*a1, v24, 0LL); goto LABEL_32; } for ( i = 0LL; v21 != i; ++i ) { if ( *(_QWORD *)(v24 + 8 * i) ) goto LABEL_39; } i = v21; LABEL_39: (*(void ( **)(_QWORD, long long, _QWORD))(*a1 + 8LL))(*(_QWORD *)*a1, v24, 0LL); if ( i != v21 ) { if ( a4 == 0x3FFFFFFFFFFFFFFFLL ) goto LABEL_12; *(_QWORD *)a1[4] |= 1uLL; } a1[2] = *(_QWORD *)(a2 + 16) - *(_QWORD *)(a3 + 16) + 19LL; *((_DWORD *)a1 + 2) = v7; return bfdec_normalize_and_round(a1, a4, v20); }
__bfdec_div: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R12,RDX MOV RBX,RDI MOV RDI,0x7ffffffffffffffd MOV EBP,dword ptr [RDX + 0x8] XOR EBP,dword ptr [RSI + 0x8] MOV RAX,qword ptr [RSI + 0x10] CMP RAX,RDI JLE 0x00177794 LEA RDX,[RDI + 0x2] CMP RAX,RDX JZ 0x001777a7 MOV RDX,qword ptr [R12 + 0x10] JMP 0x0017779e LAB_00177794: MOV RDX,qword ptr [R12 + 0x10] CMP RDX,RDI JLE 0x001777b6 LAB_0017779e: LEA RSI,[RDI + 0x2] CMP RDX,RSI JNZ 0x001777c6 LAB_001777a7: MOV RDI,RBX CALL 0x0016f5cd LAB_001777af: XOR EAX,EAX JMP 0x0017792c LAB_001777b6: ADD RDI,0x3 CMP RAX,RDI JNZ 0x001777e6 CMP RDX,RDI JZ 0x001777d7 JMP 0x0017780d LAB_001777c6: INC RDI MOV RSI,RAX XOR RSI,RDI XOR RDX,RDI OR RDX,RSI JNZ 0x001777fc LAB_001777d7: MOV RDI,RBX CALL 0x0016f5cd PUSH 0x1 JMP 0x0017792b LAB_001777e6: CMP RDX,RDI JNZ 0x00177819 MOV RDI,RBX MOV ESI,EBP CALL 0x0016f63c PUSH 0x2 JMP 0x0017792b LAB_001777fc: CMP RAX,RDI JNZ 0x0017780d MOV RDI,RBX MOV ESI,EBP CALL 0x0016f63c JMP 0x001777af LAB_0017780d: MOV RDI,RBX MOV ESI,EBP CALL 0x0016f612 JMP 0x001777af LAB_00177819: MOV R15D,R8D MOV R13,RSI MOV RDI,qword ptr [R12 + 0x18] MOV RSI,0x3fffffffffffffff CMP RCX,RSI MOV qword ptr [RSP + 0x18],RCX JNZ 0x0017783e LEA R14,[RDI + 0x1] JMP 0x00177868 LAB_0017783e: TEST R15B,0x10 JNZ 0x0017784a LEA RAX,[RCX + 0x14] JMP 0x0017785d LAB_0017784a: SUB RAX,RDX XOR EDX,EDX TEST RAX,RAX CMOVLE RAX,RDX ADD RAX,RCX ADD RAX,0x16 LAB_0017785d: PUSH 0x13 POP RCX XOR EDX,EDX DIV RCX MOV R14,RAX LAB_00177868: MOV RAX,qword ptr [R13 + 0x18] CMP RAX,R14 CMOVG R14,RAX MOV qword ptr [RSP + 0x8],RDI LEA RCX,[R14 + RDI*0x1] MOV RAX,qword ptr [RBX] MOV qword ptr [RSP + 0x10],RCX LEA RDX,[0x8 + RCX*0x8] MOV RDI,qword ptr [RAX] XOR ESI,ESI CALL qword ptr [RAX + 0x8] TEST RAX,RAX JZ 0x00177921 MOV dword ptr [RSP + 0x4],R15D MOV R15,qword ptr [RSP + 0x10] SUB R15,qword ptr [R13 + 0x18] LEA RDX,[R15*0x8] MOV RDI,RAX MOV qword ptr [RSP + 0x20],RAX XOR ESI,ESI CALL 0x0010e360 MOV RAX,qword ptr [RSP + 0x20] LEA RDI,[RAX + R15*0x8] MOV R15,RAX MOV RDX,qword ptr [R13 + 0x18] MOV RSI,qword ptr [R13 + 0x20] SHL RDX,0x3 CALL 0x0010e5c0 INC R14 MOV RDI,RBX MOV RSI,R14 CALL 0x0016f50f TEST EAX,EAX JNZ 0x00177913 MOV RDI,qword ptr [RBX] MOV RSI,qword ptr [RBX + 0x20] MOV R8,qword ptr [R12 + 0x20] MOV RDX,R15 MOV RCX,qword ptr [RSP + 0x10] MOV R9,qword ptr [RSP + 0x8] CALL 0x0017a2e0 TEST EAX,EAX JZ 0x0017793b LAB_00177913: MOV RAX,qword ptr [RBX] MOV RDI,qword ptr [RAX] MOV RSI,R15 XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_00177921: MOV RDI,RBX CALL 0x0016f5cd PUSH 0x20 LAB_0017792b: POP RAX LAB_0017792c: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017793b: XOR R14D,R14D MOV RAX,qword ptr [RSP + 0x8] MOV RSI,R15 LAB_00177946: CMP RAX,R14 JZ 0x00177957 CMP qword ptr [RSI + R14*0x8],0x0 JNZ 0x0017795a INC R14 JMP 0x00177946 LAB_00177957: MOV R14,RAX LAB_0017795a: MOV R15,RAX MOV RAX,qword ptr [RBX] MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] CMP R14,R15 MOV RSI,qword ptr [RSP + 0x18] JZ 0x0017798d MOV RAX,0x3fffffffffffffff CMP RSI,RAX JZ 0x001777d7 MOV RAX,qword ptr [RBX + 0x20] OR qword ptr [RAX],0x1 LAB_0017798d: MOV RAX,qword ptr [R13 + 0x10] SUB RAX,qword ptr [R12 + 0x10] ADD RAX,0x13 MOV qword ptr [RBX + 0x10],RAX MOV dword ptr [RBX + 0x8],EBP MOV RDI,RBX MOV EDX,dword ptr [RSP + 0x4] ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001770bb
int8 __bfdec_div(long *param_1,long param_2,long param_3,long param_4,uint param_5) { long lVar1; int iVar2; long lVar3; ulong uVar4; void *__s; int8 uVar5; uint uVar6; long lVar7; long lVar8; uVar6 = *(uint *)(param_3 + 8) ^ *(uint *)(param_2 + 8); lVar7 = *(long *)(param_2 + 0x10); if (lVar7 < 0x7ffffffffffffffe) { lVar8 = *(long *)(param_3 + 0x10); if (0x7ffffffffffffffd < lVar8) goto LAB_0017779e; if (lVar7 != -0x8000000000000000) { if (lVar8 == -0x8000000000000000) { bf_set_inf(param_1,uVar6); return 2; } lVar1 = *(long *)(param_3 + 0x18); if (param_4 == 0x3fffffffffffffff) { uVar4 = lVar1 + 1; } else { if ((param_5 & 0x10) == 0) { uVar4 = param_4 + 0x14; } else { lVar3 = lVar7 - lVar8; if (lVar7 - lVar8 < 1) { lVar3 = 0; } uVar4 = lVar3 + param_4 + 0x16; } uVar4 = uVar4 / 0x13; } if ((long)uVar4 < (long)*(ulong *)(param_2 + 0x18)) { uVar4 = *(ulong *)(param_2 + 0x18); } lVar7 = uVar4 + lVar1; __s = (void *)(*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,0,lVar7 * 8 + 8); if (__s != (void *)0x0) { lVar8 = lVar7 - *(long *)(param_2 + 0x18); memset(__s,0,lVar8 * 8); memcpy((void *)((long)__s + lVar8 * 8),*(void **)(param_2 + 0x20), *(long *)(param_2 + 0x18) << 3); iVar2 = bf_resize(param_1,uVar4 + 1); if ((iVar2 == 0) && (iVar2 = mp_div_dec(*param_1,param_1[4],__s,lVar7,*(int8 *)(param_3 + 0x20),lVar1), iVar2 == 0)) { for (lVar7 = 0; (lVar8 = lVar1, lVar1 != lVar7 && (lVar8 = lVar7, *(long *)((long)__s + lVar7 * 8) == 0)); lVar7 = lVar7 + 1) { } (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,__s,0); if (lVar8 != lVar1) { if (param_4 == 0x3fffffffffffffff) goto LAB_001777d7; *(ulong *)param_1[4] = *(ulong *)param_1[4] | 1; } param_1[2] = (*(long *)(param_2 + 0x10) - *(long *)(param_3 + 0x10)) + 0x13; *(uint *)(param_1 + 1) = uVar6; uVar5 = bfdec_normalize_and_round(param_1,param_4,param_5); return uVar5; } (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,__s,0); } bf_set_nan(param_1); return 0x20; } if (lVar8 == -0x8000000000000000) goto LAB_001777d7; LAB_0017780d: bf_set_zero(param_1,uVar6); } else { if (lVar7 != 0x7fffffffffffffff) { lVar8 = *(long *)(param_3 + 0x10); LAB_0017779e: if (lVar8 != 0x7fffffffffffffff) { if (lVar8 == 0x7ffffffffffffffe && lVar7 == 0x7ffffffffffffffe) { LAB_001777d7: bf_set_nan(param_1); return 1; } if (lVar7 == 0x7ffffffffffffffe) { bf_set_inf(param_1,uVar6); return 0; } goto LAB_0017780d; } } bf_set_nan(param_1); } return 0; }
20,693
my_test_connect
eloqsql/libmariadb/unittest/libmariadb/my_test.h
MYSQL *my_test_connect(MYSQL *mysql, const char *host, const char *user, const char *passwd, const char *db, unsigned int port, const char *unix_socket, unsigned long clientflag) { if (force_tls) mysql_options(mysql, MYSQL_OPT_SSL_ENFORCE, &force_tls); if (!mysql_real_connect(mysql, host, user, passwd, db, port, unix_socket, clientflag)) { diag("error: %s", mysql_error(mysql)); return NULL; } if (mysql && force_tls && !mysql_get_ssl_cipher(mysql)) { diag("Error: TLS connection not established"); return NULL; } if (!this_host) get_this_host(mysql); return mysql; }
O3
c
my_test_connect: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq 0x18(%rbp), %r10 movq 0x10(%rbp), %rax cmpl $0x0, 0x3d140(%rip) # 0x51340 je 0x14238 movq %rdx, -0x30(%rbp) leaq 0x3d133(%rip), %rdx # 0x51340 movq %rbx, %rdi movl $0x26, %esi movl %r9d, %r15d movq %r8, %r12 movq %rcx, %r13 callq 0x215d9 movq -0x30(%rbp), %rdx movq 0x18(%rbp), %r10 movq 0x10(%rbp), %rax movq %r13, %rcx movq %r12, %r8 movl %r15d, %r9d movq %rbx, %rdi movq %r14, %rsi pushq %r10 pushq %rax callq 0x1d6a6 addq $0x10, %rsp testq %rax, %rax je 0x1427e testq %rbx, %rbx je 0x1426a cmpl $0x0, 0x3d0e5(%rip) # 0x51340 je 0x1426a movq %rbx, %rdi callq 0x1d598 testq %rax, %rax je 0x1429b cmpq $0x0, 0x3cf66(%rip) # 0x511d8 jne 0x142ab movq %rbx, %rdi callq 0x13ada jmp 0x142ab movq %rbx, %rdi callq 0x216ca leaq 0x25249(%rip), %rdi # 0x394d6 xorl %ebx, %ebx movq %rax, %rsi xorl %eax, %eax callq 0x19f47 jmp 0x142ab leaq 0x2523e(%rip), %rdi # 0x394e0 xorl %ebx, %ebx xorl %eax, %eax callq 0x19f47 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_test_connect: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rsi mov rbx, rdi mov r10, [rbp+arg_8] mov rax, [rbp+arg_0] cmp cs:force_tls, 0 jz short loc_14238 mov [rbp+var_30], rdx lea rdx, force_tls mov rdi, rbx mov esi, 26h ; '&' mov r15d, r9d mov r12, r8 mov r13, rcx call mysql_options mov rdx, [rbp+var_30] mov r10, [rbp+arg_8] mov rax, [rbp+arg_0] mov rcx, r13 mov r8, r12 mov r9d, r15d loc_14238: mov rdi, rbx mov rsi, r14 push r10 push rax call mysql_real_connect add rsp, 10h test rax, rax jz short loc_1427E test rbx, rbx jz short loc_1426A cmp cs:force_tls, 0 jz short loc_1426A mov rdi, rbx call mysql_get_ssl_cipher test rax, rax jz short loc_1429B loc_1426A: cmp cs:this_host, 0 jnz short loc_142AB mov rdi, rbx call get_this_host jmp short loc_142AB loc_1427E: mov rdi, rbx call mysql_error lea rdi, aErrorS; "error: %s" xor ebx, ebx mov rsi, rax xor eax, eax call diag jmp short loc_142AB loc_1429B: lea rdi, aErrorTlsConnec; "Error: TLS connection not established" xor ebx, ebx xor eax, eax call diag loc_142AB: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_test_connect(long long a1, int a2, int a3, int a4, int a5, int a6, long long a7, long long a8) { long long v8; // rbx long long v9; // r10 long long v10; // rax int v11; // r15d int v12; // r12d int v13; // r13d int v14; // edx int v15; // ecx int v16; // r8d int v17; // r9d int v18; // eax int v19; // edx int v20; // ecx int v21; // r8d int v22; // r9d int v24; // [rsp+0h] [rbp-30h] v8 = a1; v9 = a8; v10 = a7; if ( force_tls ) { v24 = a3; v11 = a6; v12 = a5; v13 = a4; mysql_options(a1, 38LL, &force_tls); a3 = v24; v9 = a8; v10 = a7; a4 = v13; a5 = v12; a6 = v11; } if ( mysql_real_connect(a1, a2, a3, a4, a5, a6, v10, v9) ) { if ( a1 && force_tls && !mysql_get_ssl_cipher(a1) ) { v8 = 0LL; diag((unsigned int)"Error: TLS connection not established", a2, v14, v15, v16, v17); } else if ( !this_host ) { get_this_host(a1); } } else { v18 = mysql_error(a1); v8 = 0LL; diag((unsigned int)"error: %s", v18, v19, v20, v21, v22); } return v8; }
my_test_connect: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV R10,qword ptr [RBP + 0x18] MOV RAX,qword ptr [RBP + 0x10] CMP dword ptr [0x00151340],0x0 JZ 0x00114238 MOV qword ptr [RBP + -0x30],RDX LEA RDX,[0x151340] MOV RDI,RBX MOV ESI,0x26 MOV R15D,R9D MOV R12,R8 MOV R13,RCX CALL 0x001215d9 MOV RDX,qword ptr [RBP + -0x30] MOV R10,qword ptr [RBP + 0x18] MOV RAX,qword ptr [RBP + 0x10] MOV RCX,R13 MOV R8,R12 MOV R9D,R15D LAB_00114238: MOV RDI,RBX MOV RSI,R14 PUSH R10 PUSH RAX CALL 0x0011d6a6 ADD RSP,0x10 TEST RAX,RAX JZ 0x0011427e TEST RBX,RBX JZ 0x0011426a CMP dword ptr [0x00151340],0x0 JZ 0x0011426a MOV RDI,RBX CALL 0x0011d598 TEST RAX,RAX JZ 0x0011429b LAB_0011426a: CMP qword ptr [0x001511d8],0x0 JNZ 0x001142ab MOV RDI,RBX CALL 0x00113ada JMP 0x001142ab LAB_0011427e: MOV RDI,RBX CALL 0x001216ca LEA RDI,[0x1394d6] XOR EBX,EBX MOV RSI,RAX XOR EAX,EAX CALL 0x00119f47 JMP 0x001142ab LAB_0011429b: LEA RDI,[0x1394e0] XOR EBX,EBX XOR EAX,EAX CALL 0x00119f47 LAB_001142ab: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_test_connect(long param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,ulong param_6,int8 param_7,int8 param_8) { long lVar1; int8 uVar2; if (force_tls != 0) { param_6 = param_6 & 0xffffffff; mysql_options(param_1,0x26,&force_tls); } lVar1 = mysql_real_connect(param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8); if (lVar1 == 0) { uVar2 = mysql_error(param_1); param_1 = 0; diag("error: %s",uVar2); } else { if (((param_1 != 0) && (force_tls != 0)) && (lVar1 = mysql_get_ssl_cipher(param_1), lVar1 == 0)) { diag("Error: TLS connection not established"); return 0; } if (this_host == 0) { get_this_host(param_1); } } return param_1; }
20,694
options_add_initcommand
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static void options_add_initcommand(struct st_mysql_options *options, const char *init_cmd) { char *insert= strdup(init_cmd); if (!options->init_command) { options->init_command= (DYNAMIC_ARRAY*)malloc(sizeof(DYNAMIC_ARRAY)); ma_init_dynamic_array(options->init_command, sizeof(char*), 5, 5); } if (ma_insert_dynamic(options->init_command, (gptr)&insert)) free(insert); }
O0
c
options_add_initcommand: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rdi callq 0x37030 movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x48(%rax) jne 0x47846 movl $0x18, %edi callq 0x37920 movq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x48(%rax) movq -0x8(%rbp), %rax movq 0x48(%rax), %rdi movl $0x8, %esi movl $0x5, %ecx movl %ecx, %edx callq 0x69860 movq -0x8(%rbp), %rax movq 0x48(%rax), %rdi leaq -0x18(%rbp), %rsi callq 0x69940 cmpb $0x0, %al je 0x47864 movq -0x18(%rbp), %rdi callq 0x371c0 addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
options_add_initcommand: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_10] call _strdup mov [rbp+var_18], rax mov rax, [rbp+var_8] cmp qword ptr [rax+48h], 0 jnz short loc_47846 mov edi, 18h call _malloc mov rcx, rax mov rax, [rbp+var_8] mov [rax+48h], rcx mov rax, [rbp+var_8] mov rdi, [rax+48h] mov esi, 8 mov ecx, 5 mov edx, ecx call ma_init_dynamic_array loc_47846: mov rax, [rbp+var_8] mov rdi, [rax+48h] lea rsi, [rbp+var_18] call ma_insert_dynamic cmp al, 0 jz short loc_47864 mov rdi, [rbp+var_18] call _free loc_47864: add rsp, 20h pop rbp retn
long long options_add_initcommand(long long a1, long long a2) { long long result; // rax _QWORD v3[2]; // [rsp+8h] [rbp-18h] BYREF long long v4; // [rsp+18h] [rbp-8h] v4 = a1; v3[1] = a2; v3[0] = strdup(a2); if ( !*(_QWORD *)(a1 + 72) ) { *(_QWORD *)(v4 + 72) = malloc(24LL); ma_init_dynamic_array(*(_QWORD *)(v4 + 72), 8LL, 5LL); } result = ma_insert_dynamic(*(_QWORD *)(v4 + 72), v3); if ( (_BYTE)result ) return free(v3[0]); return result; }
options_add_initcommand: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x10] CALL 0x00137030 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x48],0x0 JNZ 0x00147846 MOV EDI,0x18 CALL 0x00137920 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x48],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x48] MOV ESI,0x8 MOV ECX,0x5 MOV EDX,ECX CALL 0x00169860 LAB_00147846: MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x48] LEA RSI,[RBP + -0x18] CALL 0x00169940 CMP AL,0x0 JZ 0x00147864 MOV RDI,qword ptr [RBP + -0x18] CALL 0x001371c0 LAB_00147864: ADD RSP,0x20 POP RBP RET
void options_add_initcommand(long param_1,char *param_2) { char cVar1; void *pvVar2; char *local_20; char *local_18; long local_10; local_18 = param_2; local_10 = param_1; local_20 = strdup(param_2); if (*(long *)(local_10 + 0x48) == 0) { pvVar2 = malloc(0x18); *(void **)(local_10 + 0x48) = pvVar2; ma_init_dynamic_array(*(int8 *)(local_10 + 0x48),8,5); } cVar1 = ma_insert_dynamic(*(int8 *)(local_10 + 0x48),&local_20); if (cVar1 != '\0') { free(local_20); } return; }
20,695
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
monkey531[P]llama/common/json.hpp
void push_back(const basic_json& val) { // push_back only works for null objects or arrays if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array()))) { JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this)); } // transform null object into an array if (is_null()) { m_data.m_type = value_t::array; m_data.m_value = value_t::array; assert_invariant(); } // add element to array const auto old_capacity = m_data.m_value.array->capacity(); m_data.m_value.array->push_back(val); set_parent(m_data.m_value.array->back(), old_capacity); }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %rbx movq %rdi, %r14 movzbl (%rdi), %eax testl %eax, %eax jne 0x7b317 movb $0x2, (%r14) callq 0x3db48 movq %rax, 0x8(%r14) pushq $0x1 popq %rsi movq %r14, %rdi callq 0x3da0e jmp 0x7b31c cmpl $0x2, %eax jne 0x7b330 movq 0x8(%r14), %rdi movq %rbx, %rsi addq $0x30, %rsp popq %rbx popq %r14 popq %rbp jmp 0x7ea78 pushq $0x20 popq %rdi callq 0x24460 movq %rax, %rbx movq %r14, %rdi callq 0x434f0 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x3ba68(%rip), %rsi # 0xb6dba leaq 0x10(%rsp), %rdi callq 0x6355f movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x134, %esi # imm = 0x134 movq %r14, %rcx callq 0x433a4 xorl %ebp, %ebp leaq 0x82bbb(%rip), %rsi # 0xfdf38 leaq -0x3b304(%rip), %rdx # 0x40080 movq %rbx, %rdi callq 0x24ee0 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x251b8 testb %bpl, %bpl jne 0x7b3a3 jmp 0x7b3ab movq %rax, %r14 movq %rbx, %rdi callq 0x24670 movq %r14, %rdi callq 0x24f60 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backERKSD_: push rbp; char push r14; int push rbx; int sub rsp, 30h mov rbx, rsi mov r14, rdi movzx eax, byte ptr [rdi] test eax, eax jnz short loc_7B317 mov byte ptr [r14], 2 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJEEEPT_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>>>() mov [r14+8], rax push 1 pop rsi mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) jmp short loc_7B31C loc_7B317: cmp eax, 2 jnz short loc_7B330 loc_7B31C: mov rdi, [r14+8] mov rsi, rbx add rsp, 30h pop rbx pop r14 pop rbp jmp _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE9push_backERKSD_; 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>>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) loc_7B330: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUsePushB; "cannot use push_back() with " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 134h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_7B3A3 jmp short loc_7B3AB mov r14, rax loc_7B3A3: mov rdi, rbx; void * call ___cxa_free_exception loc_7B3AB: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::push_back( long long a1, long long a2) { nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx const char *v4; // [rsp+8h] [rbp-40h] BYREF _BYTE v5[56]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 ) { if ( *(_BYTE *)a1 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v5, (long long)"cannot use push_back() with ", &v4); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 308, (long long)v5); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } } else { *(_BYTE *)a1 = 2; *(_QWORD *)(a1 + 8) = 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::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 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>>::push_back( *(_QWORD *)(a1 + 8), a2); }
push_back: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RSI MOV R14,RDI MOVZX EAX,byte ptr [RDI] TEST EAX,EAX JNZ 0x0017b317 MOV byte ptr [R14],0x2 CALL 0x0013db48 MOV qword ptr [R14 + 0x8],RAX PUSH 0x1 POP RSI MOV RDI,R14 CALL 0x0013da0e JMP 0x0017b31c LAB_0017b317: CMP EAX,0x2 JNZ 0x0017b330 LAB_0017b31c: MOV RDI,qword ptr [R14 + 0x8] MOV RSI,RBX ADD RSP,0x30 POP RBX POP R14 POP RBP JMP 0x0017ea78 LAB_0017b330: PUSH 0x20 POP RDI CALL 0x00124460 MOV RBX,RAX MOV RDI,R14 CALL 0x001434f0 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_0017b34b: LEA RSI,[0x1b6dba] LEA RDI,[RSP + 0x10] CALL 0x0016355f MOV BPL,0x1 LAB_0017b35f: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x134 MOV RCX,R14 CALL 0x001433a4 XOR EBP,EBP LEA RSI,[0x1fdf38] LEA RDX,[0x140080] MOV RDI,RBX CALL 0x00124ee0
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&) */ void __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::push_back(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,basic_json *param_1) { vector *pvVar1; int8 uVar2; char *local_40; detail local_38 [32]; if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0) { *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2; pvVar1 = 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>>>> (); *(vector **)(this + 8) = pvVar1; assert_invariant(SUB81(this,0)); } else if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { uVar2 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 0017b34b to 0017b35b has its CatchHandler @ 0017b3a0 */ detail::concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_38,"cannot use push_back() with ",&local_40); /* try { // try from 0017b35f to 0017b38b has its CatchHandler @ 0017b38c */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x134,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception); } 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>>> ::push_back(*(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>>> **)(this + 8),param_1); return; }
20,696
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
monkey531[P]llama/common/json.hpp
void push_back(const basic_json& val) { // push_back only works for null objects or arrays if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array()))) { JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this)); } // transform null object into an array if (is_null()) { m_data.m_type = value_t::array; m_data.m_value = value_t::array; assert_invariant(); } // add element to array const auto old_capacity = m_data.m_value.array->capacity(); m_data.m_value.array->push_back(val); set_parent(m_data.m_value.array->back(), old_capacity); }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %rbx movq %rdi, %r14 movzbl (%rdi), %eax testl %eax, %eax jne 0xa557a movb $0x2, (%r14) movl $0x18, %edi callq 0x1b890 xorps %xmm0, %xmm0 movups %xmm0, (%rax) movq $0x0, 0x10(%rax) movq %rax, 0x8(%r14) movq %r14, %rdi movl $0x1, %esi callq 0x58644 jmp 0xa557f cmpl $0x2, %eax jne 0xa5593 movq 0x8(%r14), %rdi movq %rbx, %rsi addq $0x30, %rsp popq %rbx popq %r14 popq %rbp jmp 0xab79a movl $0x20, %edi callq 0x1b440 movq %rax, %rbx movq %r14, %rdi callq 0x5eb8c leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x4d813(%rip), %rsi # 0xf2dca leaq 0x10(%rsp), %rdi callq 0x86669 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x134, %esi # imm = 0x134 movq %r14, %rcx callq 0x5e934 xorl %ebp, %ebp leaq 0x86956(%rip), %rsi # 0x12bf38 leaq -0x4a827(%rip), %rdx # 0x5adc2 movq %rbx, %rdi callq 0x1bef0 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa560f movq 0x20(%rsp), %rsi incq %rsi callq 0x1b8b0 testb %bpl, %bpl jne 0xa5619 jmp 0xa5621 movq %rax, %r14 movq %rbx, %rdi callq 0x1b650 movq %r14, %rdi callq 0x1bf70 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backERKSD_: push rbp; char push r14; int push rbx; __int64 sub rsp, 30h mov rbx, rsi mov r14, rdi movzx eax, byte ptr [rdi] test eax, eax jnz short loc_A557A mov byte ptr [r14], 2 mov edi, 18h; unsigned __int64 call __Znwm; operator new(ulong) xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 mov qword ptr [rax+10h], 0 mov [r14+8], rax mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) jmp short loc_A557F loc_A557A: cmp eax, 2 jnz short loc_A5593 loc_A557F: mov rdi, [r14+8] mov rsi, rbx add rsp, 30h pop rbx pop r14 pop rbp jmp _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE9push_backERKSD_; 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>>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) loc_A5593: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUsePushB; "cannot use push_back() with " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 134h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A560F mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A560F: test bpl, bpl jnz short loc_A5619 jmp short loc_A5621 mov r14, rax loc_A5619: mov rdi, rbx; void * call ___cxa_free_exception loc_A5621: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::push_back( long long a1, long long a2) { long long v2; // rax nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx const char *v5; // [rsp+8h] [rbp-40h] BYREF _QWORD v6[2]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 ) { if ( *(_BYTE *)a1 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v5 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v6, (long long)"cannot use push_back() with ", &v5); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 308, v6); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } } else { *(_BYTE *)a1 = 2; v2 = operator new(0x18uLL); *(_OWORD *)v2 = 0LL; *(_QWORD *)(v2 + 16) = 0LL; *(_QWORD *)(a1 + 8) = v2; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); } return 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>>::push_back( *(_QWORD *)(a1 + 8), a2); }
20,697
evmone::EOF1Header::get_data(std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>>) const
corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/eof.hpp
[[nodiscard]] bytes_view get_data(bytes_view container) const noexcept { return container.substr(data_offset); }
O3
cpp
evmone::EOF1Header::get_data(std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>>) const: pushq %rax movq %rdx, %r8 movl 0x44(%rdi), %edx movq %rsi, %rax subq %rdx, %rax jb 0x42b8f addq %rdx, %r8 movq %r8, %rdx popq %rcx retq movq %rsi, %rcx leaq 0x407da(%rip), %rdi # 0x83373 leaq 0x407b9(%rip), %rsi # 0x83359 xorl %eax, %eax callq 0x22050 movq %rax, %rdi callq 0x30061
_ZNK6evmone10EOF1Header8get_dataESt17basic_string_viewIhN4evmc11byte_traitsIhEEE: push rax mov r8, rdx mov edx, [rdi+44h] mov rax, rsi sub rax, rdx jb short loc_42B8F add r8, rdx mov rdx, r8 pop rcx retn loc_42B8F: mov rcx, rsi lea rdi, aSPosWhichIsZuS; "%s: __pos (which is %zu) > __size (whic"... lea rsi, aBasicStringVie; "basic_string_view::substr" xor eax, eax call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...) mov rdi, rax call __clang_call_terminate
unsigned long long evmone::EOF1Header::get_data(long long a1, unsigned long long a2) { unsigned long long v2; // rdx unsigned long long result; // rax v2 = *(unsigned int *)(a1 + 68); result = a2 - v2; if ( a2 < v2 ) std::__throw_out_of_range_fmt( "%s: __pos (which is %zu) > __size (which is %zu)", "basic_string_view::substr", v2, a2); return result; }
get_data: PUSH RAX MOV R8,RDX MOV EDX,dword ptr [RDI + 0x44] MOV RAX,RSI SUB RAX,RDX JC 0x00142b8f ADD R8,RDX MOV RDX,R8 POP RCX RET LAB_00142b8f: MOV RCX,RSI LEA RDI,[0x183373] LEA RSI,[0x183359] XOR EAX,EAX CALL 0x00122050
/* evmone::EOF1Header::get_data(std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char> >) const */ int1 [16] evmone::EOF1Header::get_data(long param_1,ulong param_2,long param_3) { ulong uVar1; int1 auVar2 [16]; uVar1 = (ulong)*(uint *)(param_1 + 0x44); auVar2._0_8_ = param_2 - uVar1; if (uVar1 <= param_2) { auVar2._8_8_ = param_3 + uVar1; return auVar2; } /* try { // try from 00142b8f to 00142ba6 has its CatchHandler @ 00142ba7 */ /* WARNING: Subroutine does not return */ std::__throw_out_of_range_fmt ("%s: __pos (which is %zu) > __size (which is %zu)","basic_string_view::substr",uVar1, param_2); }
20,698
test_bin_bcast::initialize_tensors(ggml_context*)
monkey531[P]llama/tests/test-backend-ops.cpp
void initialize_tensors(ggml_context * ctx) override { for (ggml_tensor * t = ggml_get_first_tensor(ctx); t != NULL; t = ggml_get_next_tensor(ctx, t)) { if (op == ggml_mul || op == ggml_div) { // MUL and DIV have numerical issues around zero: init_tensor_uniform(t, 0.9f, 1.1f); } else { init_tensor_uniform(t); } } }
O2
cpp
test_bin_bcast::initialize_tensors(ggml_context*): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 movq %rsi, %rdi callq 0xf1f0 movq %rax, %r15 movq 0x1e913(%rip), %r12 # 0x40fc8 movq 0x1e8cc(%rip), %r13 # 0x40f88 testq %r15, %r15 je 0x2270f movq 0x38(%r14), %rax cmpq %r12, %rax setne %cl cmpq %r13, %rax setne %al movq %r15, %rdi testb %al, %cl jne 0x226ea movss 0xd954(%rip), %xmm0 # 0x30034 movss 0xd950(%rip), %xmm1 # 0x30038 jmp 0x226fa movss 0xd936(%rip), %xmm0 # 0x30028 movss 0xd90a(%rip), %xmm1 # 0x30004 callq 0x179db movq %rbx, %rdi movq %r15, %rsi callq 0xf5f0 movq %rax, %r15 jmp 0x226bc popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq nop
_ZN14test_bin_bcast18initialize_tensorsEP12ggml_context: push r15 push r14 push r13 push r12 push rbx mov rbx, rsi mov r14, rdi mov rdi, rsi call _ggml_get_first_tensor mov r15, rax mov r12, cs:ggml_mul_ptr mov r13, cs:ggml_div_ptr loc_226BC: test r15, r15 jz short loc_2270F mov rax, [r14+38h] cmp rax, r12 setnz cl cmp rax, r13 setnz al mov rdi, r15 test cl, al jnz short loc_226EA movss xmm0, cs:dword_30034 movss xmm1, cs:dword_30038 jmp short loc_226FA loc_226EA: movss xmm0, cs:dword_30028 movss xmm1, cs:dword_30004 loc_226FA: call _ZL19init_tensor_uniformP11ggml_tensorff; init_tensor_uniform(ggml_tensor *,float,float) mov rdi, rbx mov rsi, r15 call _ggml_get_next_tensor mov r15, rax jmp short loc_226BC loc_2270F: pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long test_bin_bcast::initialize_tensors(long long a1, long long a2) { long long result; // rax unsigned int *i; // r15 float v4; // xmm0_4 float v5; // xmm1_4 result = ggml_get_first_tensor(a2); for ( i = (unsigned int *)result; i; i = (unsigned int *)result ) { if ( *(_QWORD *)(a1 + 56) != (_QWORD)&ggml_div && *(_QWORD *)(a1 + 56) != (_QWORD)&ggml_mul ) { v4 = -1.0; v5 = 1.0; } else { v4 = 0.89999998; v5 = 1.1; } init_tensor_uniform(i, v4, v5); result = ggml_get_next_tensor(a2, i); } return result; }
initialize_tensors: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV RBX,RSI MOV R14,RDI MOV RDI,RSI CALL 0x0010f1f0 MOV R15,RAX MOV R12,qword ptr [0x00140fc8] MOV R13,qword ptr [0x00140f88] LAB_001226bc: TEST R15,R15 JZ 0x0012270f MOV RAX,qword ptr [R14 + 0x38] CMP RAX,R12 SETNZ CL CMP RAX,R13 SETNZ AL MOV RDI,R15 TEST CL,AL JNZ 0x001226ea MOVSS XMM0,dword ptr [0x00130034] MOVSS XMM1,dword ptr [0x00130038] JMP 0x001226fa LAB_001226ea: MOVSS XMM0,dword ptr [0x00130028] MOVSS XMM1,dword ptr [0x00130004] LAB_001226fa: CALL 0x001179db MOV RDI,RBX MOV RSI,R15 CALL 0x0010f5f0 MOV R15,RAX JMP 0x001226bc LAB_0012270f: POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* test_bin_bcast::initialize_tensors(ggml_context*) */ void __thiscall test_bin_bcast::initialize_tensors(test_bin_bcast *this,ggml_context *param_1) { int *puVar1; int *puVar2; ggml_tensor *pgVar3; float fVar4; float fVar5; pgVar3 = (ggml_tensor *)ggml_get_first_tensor(param_1); puVar2 = PTR_ggml_mul_00140fc8; puVar1 = PTR_ggml_div_00140f88; for (; pgVar3 != (ggml_tensor *)0x0; pgVar3 = (ggml_tensor *)ggml_get_next_tensor(param_1,pgVar3)) { fVar4 = DAT_00130028; fVar5 = DAT_00130004; if (*(int **)(this + 0x38) == puVar2 || *(int **)(this + 0x38) == puVar1) { fVar4 = DAT_00130034; fVar5 = DAT_00130038; } init_tensor_uniform(pgVar3,fVar4,fVar5); } return; }
20,699
glfwSetCursorPos
untodesu[P]riteg/build_O0/_deps/glfw-src/src/input.c
GLFWAPI void glfwSetCursorPos(GLFWwindow* handle, double xpos, double ypos) { _GLFWwindow* window = (_GLFWwindow*) handle; assert(window != NULL); _GLFW_REQUIRE_INIT(); if (xpos != xpos || xpos < -DBL_MAX || xpos > DBL_MAX || ypos != ypos || ypos < -DBL_MAX || ypos > DBL_MAX) { _glfwInputError(GLFW_INVALID_VALUE, "Invalid cursor position %f %f", xpos, ypos); return; } if (!_glfwPlatformWindowFocused(window)) return; if (window->cursorMode == GLFW_CURSOR_DISABLED) { // Only update the accumulated position if the cursor is disabled window->virtualCursorPosX = xpos; window->virtualCursorPosY = ypos; } else { // Update system cursor position _glfwPlatformSetCursorPos(window, xpos, ypos); } }
O0
c
glfwSetCursorPos: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movsd %xmm0, -0x10(%rbp) movsd %xmm1, -0x18(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) je 0x23a47 jmp 0x23a66 leaq 0x78bb0(%rip), %rdi # 0x9c5fe leaq 0x9418b(%rip), %rsi # 0xb7be0 movl $0x2bb, %edx # imm = 0x2BB leaq 0x94343(%rip), %rcx # 0xb7da4 callq 0xc5a0 leaq 0xbd1fb(%rip), %rax # 0xe0c68 cmpl $0x0, (%rax) jne 0x23a87 movl $0x10001, %edi # imm = 0x10001 xorl %eax, %eax movl %eax, %esi movb $0x0, %al callq 0x221a0 jmp 0x23b5a movsd -0x10(%rbp), %xmm0 ucomisd -0x10(%rbp), %xmm0 jne 0x23ae7 jp 0x23ae7 movsd 0x940e3(%rip), %xmm0 # 0xb7b80 ucomisd -0x10(%rbp), %xmm0 ja 0x23ae7 movsd -0x10(%rbp), %xmm0 movsd 0x940d7(%rip), %xmm1 # 0xb7b88 ucomisd %xmm1, %xmm0 ja 0x23ae7 movsd -0x18(%rbp), %xmm0 ucomisd -0x18(%rbp), %xmm0 jne 0x23ae7 jp 0x23ae7 movsd 0x940b3(%rip), %xmm0 # 0xb7b80 ucomisd -0x18(%rbp), %xmm0 ja 0x23ae7 movsd -0x18(%rbp), %xmm0 movsd 0x940a7(%rip), %xmm1 # 0xb7b88 ucomisd %xmm1, %xmm0 jbe 0x23b06 movsd -0x10(%rbp), %xmm0 movsd -0x18(%rbp), %xmm1 movl $0x10004, %edi # imm = 0x10004 leaq 0x942db(%rip), %rsi # 0xb7dd8 movb $0x2, %al callq 0x221a0 jmp 0x23b5a movq -0x20(%rbp), %rdi callq 0x32950 cmpl $0x0, %eax jne 0x23b16 jmp 0x23b5a movq -0x20(%rbp), %rax cmpl $0x34003, 0x74(%rax) # imm = 0x34003 jne 0x23b47 movsd -0x10(%rbp), %xmm0 movq -0x20(%rbp), %rax movsd %xmm0, 0x1e0(%rax) movsd -0x18(%rbp), %xmm0 movq -0x20(%rbp), %rax movsd %xmm0, 0x1e8(%rax) jmp 0x23b5a movq -0x20(%rbp), %rdi movsd -0x10(%rbp), %xmm0 movsd -0x18(%rbp), %xmm1 callq 0x34730 addq $0x20, %rsp popq %rbp retq
glfwSetCursorPos: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi movsd [rbp+var_10], xmm0 movsd [rbp+var_18], xmm1 mov rax, [rbp+var_8] mov [rbp+var_20], rax cmp [rbp+var_20], 0 jz short loc_23A47 jmp short loc_23A66 loc_23A47: lea rdi, aWindowNull; "window != NULL" lea rsi, aWorkspaceLlm4b_12; "/workspace/llm4binary/github/2025_star3"... mov edx, 2BBh lea rcx, aVoidGlfwsetcur; "void glfwSetCursorPos(GLFWwindow *, dou"... call ___assert_fail loc_23A66: lea rax, _glfw cmp dword ptr [rax], 0 jnz short loc_23A87 mov edi, 10001h xor eax, eax mov esi, eax mov al, 0 call _glfwInputError jmp loc_23B5A loc_23A87: movsd xmm0, [rbp+var_10] ucomisd xmm0, [rbp+var_10] jnz short loc_23AE7 jp short loc_23AE7 movsd xmm0, cs:qword_B7B80 ucomisd xmm0, [rbp+var_10] ja short loc_23AE7 movsd xmm0, [rbp+var_10] movsd xmm1, cs:qword_B7B88 ucomisd xmm0, xmm1 ja short loc_23AE7 movsd xmm0, [rbp+var_18] ucomisd xmm0, [rbp+var_18] jnz short loc_23AE7 jp short loc_23AE7 movsd xmm0, cs:qword_B7B80 ucomisd xmm0, [rbp+var_18] ja short loc_23AE7 movsd xmm0, [rbp+var_18] movsd xmm1, cs:qword_B7B88 ucomisd xmm0, xmm1 jbe short loc_23B06 loc_23AE7: movsd xmm0, [rbp+var_10] movsd xmm1, [rbp+var_18] mov edi, offset loc_10004 lea rsi, aInvalidCursorP; "Invalid cursor position %f %f" mov al, 2 call _glfwInputError jmp short loc_23B5A loc_23B06: mov rdi, [rbp+var_20] call _glfwPlatformWindowFocused cmp eax, 0 jnz short loc_23B16 jmp short loc_23B5A loc_23B16: mov rax, [rbp+var_20] cmp dword ptr [rax+74h], offset loc_34003 jnz short loc_23B47 movsd xmm0, [rbp+var_10] mov rax, [rbp+var_20] movsd qword ptr [rax+1E0h], xmm0 movsd xmm0, [rbp+var_18] mov rax, [rbp+var_20] movsd qword ptr [rax+1E8h], xmm0 jmp short loc_23B5A loc_23B47: mov rdi, [rbp+var_20] movsd xmm0, [rbp+var_10] movsd xmm1, [rbp+var_18] call _glfwPlatformSetCursorPos loc_23B5A: add rsp, 20h pop rbp retn
long long glfwSetCursorPos(long long a1, double a2, double a3) { long long result; // rax if ( !a1 ) __assert_fail( "window != NULL", "/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O0/_deps/glfw-src/src/input.c", 699LL, "void glfwSetCursorPos(GLFWwindow *, double, double)"); if ( !glfw[0] ) return glfwInputError(0x10001u, 0LL); if ( a2 < -1.797693134862316e308 || a2 > 1.797693134862316e308 || a3 < -1.797693134862316e308 || a3 > 1.797693134862316e308 ) { return glfwInputError((unsigned int)&loc_10004, (long long)"Invalid cursor position %f %f", a2, a3); } result = glfwPlatformWindowFocused(a1); if ( (_DWORD)result ) { if ( *(_DWORD *)(a1 + 116) == (_DWORD)&loc_34003 ) { *(double *)(a1 + 480) = a2; result = a1; *(double *)(a1 + 488) = a3; } else { return glfwPlatformSetCursorPos(a1, a2, a3); } } return result; }
glfwSetCursorPos: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOVSD qword ptr [RBP + -0x10],XMM0 MOVSD qword ptr [RBP + -0x18],XMM1 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x20],RAX CMP qword ptr [RBP + -0x20],0x0 JZ 0x00123a47 JMP 0x00123a66 LAB_00123a47: LEA RDI,[0x19c5fe] LEA RSI,[0x1b7be0] MOV EDX,0x2bb LEA RCX,[0x1b7da4] CALL 0x0010c5a0 LAB_00123a66: LEA RAX,[0x1e0c68] CMP dword ptr [RAX],0x0 JNZ 0x00123a87 MOV EDI,0x10001 XOR EAX,EAX MOV ESI,EAX MOV AL,0x0 CALL 0x001221a0 JMP 0x00123b5a LAB_00123a87: MOVSD XMM0,qword ptr [RBP + -0x10] UCOMISD XMM0,qword ptr [RBP + -0x10] JNZ 0x00123ae7 JP 0x00123ae7 MOVSD XMM0,qword ptr [0x001b7b80] UCOMISD XMM0,qword ptr [RBP + -0x10] JA 0x00123ae7 MOVSD XMM0,qword ptr [RBP + -0x10] MOVSD XMM1,qword ptr [0x001b7b88] UCOMISD XMM0,XMM1 JA 0x00123ae7 MOVSD XMM0,qword ptr [RBP + -0x18] UCOMISD XMM0,qword ptr [RBP + -0x18] JNZ 0x00123ae7 JP 0x00123ae7 MOVSD XMM0,qword ptr [0x001b7b80] UCOMISD XMM0,qword ptr [RBP + -0x18] JA 0x00123ae7 MOVSD XMM0,qword ptr [RBP + -0x18] MOVSD XMM1,qword ptr [0x001b7b88] UCOMISD XMM0,XMM1 JBE 0x00123b06 LAB_00123ae7: MOVSD XMM0,qword ptr [RBP + -0x10] MOVSD XMM1,qword ptr [RBP + -0x18] MOV EDI,0x10004 LEA RSI,[0x1b7dd8] MOV AL,0x2 CALL 0x001221a0 JMP 0x00123b5a LAB_00123b06: MOV RDI,qword ptr [RBP + -0x20] CALL 0x00132950 CMP EAX,0x0 JNZ 0x00123b16 JMP 0x00123b5a LAB_00123b16: MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0x74],0x34003 JNZ 0x00123b47 MOVSD XMM0,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x20] MOVSD qword ptr [RAX + 0x1e0],XMM0 MOVSD XMM0,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] MOVSD qword ptr [RAX + 0x1e8],XMM0 JMP 0x00123b5a LAB_00123b47: MOV RDI,qword ptr [RBP + -0x20] MOVSD XMM0,qword ptr [RBP + -0x10] MOVSD XMM1,qword ptr [RBP + -0x18] CALL 0x00134730 LAB_00123b5a: ADD RSP,0x20 POP RBP RET
void glfwSetCursorPos(double param_1,double param_2,long param_3) { int iVar1; if (param_3 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("window != NULL", "/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O0/_deps/glfw-src/src/input.c" ,699,"void glfwSetCursorPos(GLFWwindow *, double, double)"); } if (_glfw == 0) { _glfwInputError(0x10001,0); } else if ((((param_1 < DAT_001b7b80) || (DAT_001b7b88 < param_1)) || (param_2 < DAT_001b7b80)) || (DAT_001b7b88 < param_2)) { _glfwInputError(param_1,param_2,0x10004,"Invalid cursor position %f %f"); } else { iVar1 = _glfwPlatformWindowFocused(param_3); if (iVar1 != 0) { if (*(int *)(param_3 + 0x74) == 0x34003) { *(double *)(param_3 + 0x1e0) = param_1; *(double *)(param_3 + 0x1e8) = param_2; } else { _glfwPlatformSetCursorPos(param_1,param_2,param_3); } } } return; }