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
47,500
my_numcells_sjis
eloqsql/strings/ctype-sjis.c
static size_t my_numcells_sjis(CHARSET_INFO *cs __attribute__((unused)), const char *str, const char *str_end) { size_t clen; const uchar *b= (const uchar *) str; const uchar *e= (const uchar *) str_end; for (clen= 0; b < e; ) { if (*b >= 0xA1 && *b <= 0xDF) { clen++; b++; } else if (*b > 0x7F) { clen+= 2; b+= 2; } else { clen++; b++; } } return clen; }
O3
c
my_numcells_sjis: cmpq %rdx, %rsi jae 0xb69ef pushq %rbp movq %rsp, %rbp xorl %eax, %eax movl $0x1, %ecx movb (%rsi), %dil leal 0x5f(%rdi), %r8d shrb $0x7, %dil movzbl %dil, %edi incq %rdi cmpb $0x3f, %r8b cmovbq %rcx, %rdi addq %rdi, %rax addq %rdi, %rsi cmpq %rdx, %rsi jb 0xb69c8 popq %rbp retq xorl %eax, %eax retq
my_numcells_sjis: cmp rsi, rdx jnb short loc_B69EF push rbp mov rbp, rsp xor eax, eax mov ecx, 1 loc_B69C8: mov dil, [rsi] lea r8d, [rdi+5Fh] shr dil, 7 movzx edi, dil inc rdi cmp r8b, 3Fh ; '?' cmovb rdi, rcx add rax, rdi add rsi, rdi cmp rsi, rdx jb short loc_B69C8 pop rbp retn loc_B69EF: xor eax, eax retn
long long my_numcells_sjis(long long a1, _BYTE *a2, unsigned long long a3) { long long result; // rax long long v4; // rdi if ( (unsigned long long)a2 >= a3 ) return 0LL; result = 0LL; do { v4 = (*a2 >> 7) + 1LL; if ( (unsigned __int8)(*a2 + 95) < 0x3Fu ) v4 = 1LL; result += v4; a2 += v4; } while ( (unsigned long long)a2 < a3 ); return result; }
my_numcells_sjis: CMP RSI,RDX JNC 0x001b69ef PUSH RBP MOV RBP,RSP XOR EAX,EAX MOV ECX,0x1 LAB_001b69c8: MOV DIL,byte ptr [RSI] LEA R8D,[RDI + 0x5f] SHR DIL,0x7 MOVZX EDI,DIL INC RDI CMP R8B,0x3f CMOVC RDI,RCX ADD RAX,RDI ADD RSI,RDI CMP RSI,RDX JC 0x001b69c8 POP RBP RET LAB_001b69ef: XOR EAX,EAX RET
long my_numcells_sjis(int8 param_1,byte *param_2,byte *param_3) { long lVar1; long lVar2; if (param_2 < param_3) { lVar1 = 0; do { lVar2 = (ulong)(*param_2 >> 7) + 1; if ((byte)(*param_2 + 0x5f) < 0x3f) { lVar2 = 1; } lVar1 = lVar1 + lVar2; param_2 = param_2 + lVar2; } while (param_2 < param_3); return lVar1; } return 0; }
47,501
get_typed_array
bluesky950520[P]quickjs/quickjs.c
static JSObject *get_typed_array(JSContext *ctx, JSValue this_val) { JSObject *p; if (JS_VALUE_GET_TAG(this_val) != JS_TAG_OBJECT) goto fail; p = JS_VALUE_GET_OBJ(this_val); if (!(p->class_id >= JS_CLASS_UINT8C_ARRAY && p->class_id <= JS_CLASS_FLOAT64_ARRAY)) { fail: JS_ThrowTypeError(ctx, "not a TypedArray"); return NULL; } return p; }
O1
c
get_typed_array: pushq %rbx subq $0x10, %rsp movq %rsi, 0x8(%rsp) cmpl $-0x1, %edx jne 0x396ab movq 0x8(%rsp), %rbx movzwl 0x6(%rbx), %eax addl $-0x15, %eax cmpw $0xc, %ax jb 0x396bb leaq 0x68d5f(%rip), %rsi # 0xa2411 xorl %ebx, %ebx xorl %eax, %eax callq 0x22567 movq %rbx, %rax addq $0x10, %rsp popq %rbx retq
get_typed_array: push rbx sub rsp, 10h mov [rsp+18h+var_10], rsi cmp edx, 0FFFFFFFFh jnz short loc_396AB mov rbx, [rsp+18h+var_10] movzx eax, word ptr [rbx+6] add eax, 0FFFFFFEBh cmp ax, 0Ch jb short loc_396BB loc_396AB: lea rsi, aNotATypedarray; "not a TypedArray" xor ebx, ebx xor eax, eax call JS_ThrowTypeError loc_396BB: mov rax, rbx add rsp, 10h pop rbx retn
long long get_typed_array( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v14; // rbx char v16; // [rsp+0h] [rbp-18h] if ( (_DWORD)a3 != -1 || (v14 = a2, (unsigned __int16)(*(_WORD *)(a2 + 6) - 21) >= 0xCu) ) { v14 = 0LL; JS_ThrowTypeError(a1, (long long)"not a TypedArray", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v16); } return v14; }
47,502
get_typed_array
bluesky950520[P]quickjs/quickjs.c
static JSObject *get_typed_array(JSContext *ctx, JSValue this_val) { JSObject *p; if (JS_VALUE_GET_TAG(this_val) != JS_TAG_OBJECT) goto fail; p = JS_VALUE_GET_OBJ(this_val); if (!(p->class_id >= JS_CLASS_UINT8C_ARRAY && p->class_id <= JS_CLASS_FLOAT64_ARRAY)) { fail: JS_ThrowTypeError(ctx, "not a TypedArray"); return NULL; } return p; }
O2
c
get_typed_array: pushq %rbx cmpl $-0x1, %edx jne 0x32821 movq %rsi, %rbx movzwl 0x6(%rsi), %eax addl $-0x15, %eax cmpw $0xc, %ax jb 0x32831 leaq 0x56b23(%rip), %rsi # 0x8934b xorl %ebx, %ebx xorl %eax, %eax callq 0x1c64d movq %rbx, %rax popq %rbx retq
get_typed_array: push rbx cmp edx, 0FFFFFFFFh jnz short loc_32821 mov rbx, rsi movzx eax, word ptr [rsi+6] add eax, 0FFFFFFEBh cmp ax, 0Ch jb short loc_32831 loc_32821: lea rsi, aNotATypedarray; "not a TypedArray" xor ebx, ebx xor eax, eax call JS_ThrowTypeError loc_32831: mov rax, rbx pop rbx retn
long long get_typed_array( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v14; // rbx char v16; // [rsp+0h] [rbp-8h] if ( (_DWORD)a3 != -1 || (v14 = a2, (unsigned __int16)(*(_WORD *)(a2 + 6) - 21) >= 0xCu) ) { v14 = 0LL; JS_ThrowTypeError(a1, (long long)"not a TypedArray", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v16); } return v14; }
get_typed_array: PUSH RBX CMP EDX,-0x1 JNZ 0x00132821 MOV RBX,RSI MOVZX EAX,word ptr [RSI + 0x6] ADD EAX,-0x15 CMP AX,0xc JC 0x00132831 LAB_00132821: LEA RSI,[0x18934b] XOR EBX,EBX XOR EAX,EAX CALL 0x0011c64d LAB_00132831: MOV RAX,RBX POP RBX RET
long get_typed_array(int8 param_1,long param_2,int param_3) { if ((param_3 != -1) || (0xb < (ushort)(*(short *)(param_2 + 6) - 0x15U))) { param_2 = 0; JS_ThrowTypeError(param_1,"not a TypedArray"); } return param_2; }
47,503
coro::net::tcp::client::operator=(coro::net::tcp::client const&)
AlayaLite/build_O3/_deps/libcoro-src/src/net/tcp/client.cpp
auto client::operator=(const client& other) noexcept -> client& { if (std::addressof(other) != this) { m_io_scheduler = other.m_io_scheduler; m_options = other.m_options; m_socket = other.m_socket; m_connect_status = other.m_connect_status; } return *this; }
O3
cpp
coro::net::tcp::client::operator=(coro::net::tcp::client const&): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx cmpq %rdi, %rsi je 0x8fe0 movq %rsi, %r14 movq (%rsi), %rax movq %rax, (%rbx) leaq 0x8(%rbx), %rdi addq $0x8, %rsi callq 0x9354 movups 0x10(%r14), %xmm0 movups %xmm0, 0x10(%rbx) movq 0x1e(%r14), %rax movq %rax, 0x1e(%rbx) leaq 0x28(%r14), %rsi leaq 0x28(%rbx), %rdi callq 0x8a5c movq 0x2c(%r14), %rax movq %rax, 0x2c(%rbx) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq nop
_ZN4coro3net3tcp6clientaSERKS2_: push r14 push rbx push rax mov rbx, rdi cmp rsi, rdi jz short loc_8FE0 mov r14, rsi mov rax, [rsi] mov [rbx], rax lea rdi, [rbx+8] add rsi, 8 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEaSERKS2_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(std::__shared_count<(__gnu_cxx::_Lock_policy)2> const&) movups xmm0, xmmword ptr [r14+10h] movups xmmword ptr [rbx+10h], xmm0 mov rax, [r14+1Eh] mov [rbx+1Eh], rax lea rsi, [r14+28h] lea rdi, [rbx+28h] call _ZN4coro3net6socketaSERKS1_; coro::net::socket::operator=(coro::net::socket const&) mov rax, [r14+2Ch] mov [rbx+2Ch], rax loc_8FE0: mov rax, rbx add rsp, 8 pop rbx pop r14 retn
long long coro::net::tcp::client::operator=(long long a1, long long a2) { if ( a2 != a1 ) { *(_QWORD *)a1 = *(_QWORD *)a2; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(a1 + 8, a2 + 8); *(_OWORD *)(a1 + 16) = *(_OWORD *)(a2 + 16); *(_QWORD *)(a1 + 30) = *(_QWORD *)(a2 + 30); coro::net::socket::operator=((_DWORD *)(a1 + 40), (unsigned int *)(a2 + 40)); *(_QWORD *)(a1 + 44) = *(_QWORD *)(a2 + 44); } return a1; }
operator=: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI CMP RSI,RDI JZ 0x00108fe0 MOV R14,RSI MOV RAX,qword ptr [RSI] MOV qword ptr [RBX],RAX LEA RDI,[RBX + 0x8] ADD RSI,0x8 CALL 0x00109354 MOVUPS XMM0,xmmword ptr [R14 + 0x10] MOVUPS xmmword ptr [RBX + 0x10],XMM0 MOV RAX,qword ptr [R14 + 0x1e] MOV qword ptr [RBX + 0x1e],RAX LEA RSI,[R14 + 0x28] LEA RDI,[RBX + 0x28] CALL 0x00108a5c MOV RAX,qword ptr [R14 + 0x2c] MOV qword ptr [RBX + 0x2c],RAX LAB_00108fe0: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* coro::net::tcp::client::TEMPNAMEPLACEHOLDERVALUE(coro::net::tcp::client const&) */ client * __thiscall coro::net::tcp::client::operator=(client *this,client *param_1) { int8 uVar1; if (param_1 != this) { *(int8 *)this = *(int8 *)param_1; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator= ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(this + 8), (__shared_count *)(param_1 + 8)); uVar1 = *(int8 *)(param_1 + 0x18); *(int8 *)(this + 0x10) = *(int8 *)(param_1 + 0x10); *(int8 *)(this + 0x18) = uVar1; *(int8 *)(this + 0x1e) = *(int8 *)(param_1 + 0x1e); socket::operator=((socket *)(this + 0x28),(socket *)(param_1 + 0x28)); *(int8 *)(this + 0x2c) = *(int8 *)(param_1 + 0x2c); } return this; }
47,504
js_math_round
bluesky950520[P]quickjs/quickjs.c
static double js_math_round(double a) { JSFloat64Union u; uint64_t frac_mask, one; unsigned int e, s; u.d = a; e = (u.u64 >> 52) & 0x7ff; if (e < 1023) { /* abs(a) < 1 */ if (e == (1023 - 1) && u.u64 != 0xbfe0000000000000) { /* abs(a) > 0.5 or a = 0.5: return +/-1.0 */ u.u64 = (u.u64 & ((uint64_t)1 << 63)) | ((uint64_t)1023 << 52); } else { /* return +/-0.0 */ u.u64 &= (uint64_t)1 << 63; } } else if (e < (1023 + 52)) { s = u.u64 >> 63; one = (uint64_t)1 << (52 - (e - 1023)); frac_mask = one - 1; u.u64 += (one >> 1) - s; u.u64 &= ~frac_mask; /* truncate to an integer */ } /* otherwise: abs(a) >= 2^52, or NaN, +/-Infinity: no change */ return u.d; }
O0
c
js_math_round: movsd %xmm0, -0x8(%rsp) movsd -0x8(%rsp), %xmm0 movsd %xmm0, -0x10(%rsp) movq -0x10(%rsp), %rax shrq $0x34, %rax andq $0x7ff, %rax # imm = 0x7FF movl %eax, -0x24(%rsp) cmpl $0x3ff, -0x24(%rsp) # imm = 0x3FF jae 0xd7203 cmpl $0x3fe, -0x24(%rsp) # imm = 0x3FE jne 0xd71ed movabsq $-0x4020000000000000, %rax # imm = 0xBFE0000000000000 cmpq %rax, -0x10(%rsp) je 0xd71ed movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 andq -0x10(%rsp), %rax movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000 orq %rcx, %rax movq %rax, -0x10(%rsp) jmp 0xd7201 movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 andq -0x10(%rsp), %rax movq %rax, -0x10(%rsp) jmp 0xd7278 cmpl $0x433, -0x24(%rsp) # imm = 0x433 jae 0xd7276 movq -0x10(%rsp), %rax shrq $0x3f, %rax movl %eax, -0x28(%rsp) movl -0x24(%rsp), %ecx subl $0x3ff, %ecx # imm = 0x3FF movl $0x34, %eax subl %ecx, %eax movl %eax, %eax movl %eax, %ecx movl $0x1, %eax shlq %cl, %rax movq %rax, -0x20(%rsp) movq -0x20(%rsp), %rax subq $0x1, %rax movq %rax, -0x18(%rsp) movq -0x20(%rsp), %rax shrq %rax movl -0x28(%rsp), %ecx subq %rcx, %rax addq -0x10(%rsp), %rax movq %rax, -0x10(%rsp) movq -0x18(%rsp), %rax xorq $-0x1, %rax andq -0x10(%rsp), %rax movq %rax, -0x10(%rsp) jmp 0xd7278 movsd -0x10(%rsp), %xmm0 retq nop
js_math_round: movsd [rsp+var_8], xmm0 movsd xmm0, [rsp+var_8] movsd [rsp+var_10], xmm0 mov rax, [rsp+var_10] shr rax, 34h and rax, 7FFh mov [rsp+var_24], eax cmp [rsp+var_24], 3FFh jnb short loc_D7203 cmp [rsp+var_24], 3FEh jnz short loc_D71ED mov rax, 0BFE0000000000000h cmp [rsp+var_10], rax jz short loc_D71ED mov rax, 8000000000000000h and rax, [rsp+var_10] mov rcx, 3FF0000000000000h or rax, rcx mov [rsp+var_10], rax jmp short loc_D7201 loc_D71ED: mov rax, 8000000000000000h and rax, [rsp+var_10] mov [rsp+var_10], rax loc_D7201: jmp short loc_D7278 loc_D7203: cmp [rsp+var_24], 433h jnb short loc_D7276 mov rax, [rsp+var_10] shr rax, 3Fh mov [rsp+var_28], eax mov ecx, [rsp+var_24] sub ecx, 3FFh mov eax, 34h ; '4' sub eax, ecx mov eax, eax mov ecx, eax mov eax, 1 shl rax, cl mov [rsp+var_20], rax mov rax, [rsp+var_20] sub rax, 1 mov [rsp+var_18], rax mov rax, [rsp+var_20] shr rax, 1 mov ecx, [rsp+var_28] sub rax, rcx add rax, [rsp+var_10] mov [rsp+var_10], rax mov rax, [rsp+var_18] xor rax, 0FFFFFFFFFFFFFFFFh and rax, [rsp+var_10] mov [rsp+var_10], rax loc_D7276: jmp short $+2 loc_D7278: movsd xmm0, [rsp+var_10] retn
double js_math_round(double a1) { unsigned int v2; // [rsp+4h] [rbp-24h] double v3; // [rsp+18h] [rbp-10h] v3 = a1; v2 = (*(_QWORD *)&a1 >> 52) & 0x7FF; if ( v2 >= 0x3FF ) { if ( v2 < 0x433 ) *(_QWORD *)&v3 = (*(_QWORD *)&a1 + ((unsigned long long)(1LL << (52 - ((unsigned __int8)(*(_QWORD *)&a1 >> 52) + 1))) >> 1) - (*(_QWORD *)&a1 >> 63)) & ~((1LL << (52 - ((unsigned __int8)(*(_QWORD *)&a1 >> 52) + 1))) - 1); } else if ( v2 != 1022 || a1 == -0.5 ) { *(_QWORD *)&v3 = *(_QWORD *)&a1 & 0x8000000000000000LL; } else { *(_QWORD *)&v3 = *(_QWORD *)&a1 & 0x8000000000000000LL | 0x3FF0000000000000LL; } return v3; }
js_math_round: MOVSD qword ptr [RSP + -0x8],XMM0 MOVSD XMM0,qword ptr [RSP + -0x8] MOVSD qword ptr [RSP + -0x10],XMM0 MOV RAX,qword ptr [RSP + -0x10] SHR RAX,0x34 AND RAX,0x7ff MOV dword ptr [RSP + -0x24],EAX CMP dword ptr [RSP + -0x24],0x3ff JNC 0x001d7203 CMP dword ptr [RSP + -0x24],0x3fe JNZ 0x001d71ed MOV RAX,-0x4020000000000000 CMP qword ptr [RSP + -0x10],RAX JZ 0x001d71ed MOV RAX,-0x8000000000000000 AND RAX,qword ptr [RSP + -0x10] MOV RCX,0x3ff0000000000000 OR RAX,RCX MOV qword ptr [RSP + -0x10],RAX JMP 0x001d7201 LAB_001d71ed: MOV RAX,-0x8000000000000000 AND RAX,qword ptr [RSP + -0x10] MOV qword ptr [RSP + -0x10],RAX LAB_001d7201: JMP 0x001d7278 LAB_001d7203: CMP dword ptr [RSP + -0x24],0x433 JNC 0x001d7276 MOV RAX,qword ptr [RSP + -0x10] SHR RAX,0x3f MOV dword ptr [RSP + -0x28],EAX MOV ECX,dword ptr [RSP + -0x24] SUB ECX,0x3ff MOV EAX,0x34 SUB EAX,ECX MOV EAX,EAX MOV ECX,EAX MOV EAX,0x1 SHL RAX,CL MOV qword ptr [RSP + -0x20],RAX MOV RAX,qword ptr [RSP + -0x20] SUB RAX,0x1 MOV qword ptr [RSP + -0x18],RAX MOV RAX,qword ptr [RSP + -0x20] SHR RAX,0x1 MOV ECX,dword ptr [RSP + -0x28] SUB RAX,RCX ADD RAX,qword ptr [RSP + -0x10] MOV qword ptr [RSP + -0x10],RAX MOV RAX,qword ptr [RSP + -0x18] XOR RAX,-0x1 AND RAX,qword ptr [RSP + -0x10] MOV qword ptr [RSP + -0x10],RAX LAB_001d7276: JMP 0x001d7278 LAB_001d7278: MOVSD XMM0,qword ptr [RSP + -0x10] RET
ulong js_math_round(ulong param_1) { uint uVar1; uint uVar2; ulong uVar3; int8 local_10; uVar1 = (uint)(param_1 >> 0x20); uVar2 = uVar1 >> 0x14 & 0x7ff; if (uVar2 < 0x3ff) { if ((uVar2 == 0x3fe) && (param_1 != 0xbfe0000000000000)) { local_10 = param_1 & 0x8000000000000000 | 0x3ff0000000000000; } else { local_10 = param_1 & 0x8000000000000000; } } else { local_10 = param_1; if (uVar2 < 0x433) { uVar3 = 1L << (0x34U - ((char)uVar2 + '\x01') & 0x3f); local_10 = (uVar3 - 1 ^ 0xffffffffffffffff) & ((uVar3 >> 1) - (ulong)(uVar1 >> 0x1f)) + param_1; } } return local_10; }
47,505
js_math_round
bluesky950520[P]quickjs/quickjs.c
static double js_math_round(double a) { JSFloat64Union u; uint64_t frac_mask, one; unsigned int e, s; u.d = a; e = (u.u64 >> 52) & 0x7ff; if (e < 1023) { /* abs(a) < 1 */ if (e == (1023 - 1) && u.u64 != 0xbfe0000000000000) { /* abs(a) > 0.5 or a = 0.5: return +/-1.0 */ u.u64 = (u.u64 & ((uint64_t)1 << 63)) | ((uint64_t)1023 << 52); } else { /* return +/-0.0 */ u.u64 &= (uint64_t)1 << 63; } } else if (e < (1023 + 52)) { s = u.u64 >> 63; one = (uint64_t)1 << (52 - (e - 1023)); frac_mask = one - 1; u.u64 += (one >> 1) - s; u.u64 &= ~frac_mask; /* truncate to an integer */ } /* otherwise: abs(a) >= 2^52, or NaN, +/-Infinity: no change */ return u.d; }
O3
c
js_math_round: movq %xmm0, %rax movq %rax, %rdx shrq $0x34, %rdx andl $0x7ff, %edx # imm = 0x7FF cmpl $0x3fe, %edx # imm = 0x3FE ja 0x7fd02 setne %dl movabsq $-0x4020000000000000, %rcx # imm = 0xBFE0000000000000 cmpq %rcx, %rax sete %sil movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 andq %rax, %rcx orb %dl, %sil jne 0x7fcfc movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000 orq %rax, %rcx movq %rcx, %xmm0 retq cmpl $0x432, %edx # imm = 0x432 ja 0x7fd34 movq %rax, %rsi movb $0x33, %cl subb %dl, %cl movl $0x1, %edx shlq %cl, %rdx sarq $0x3f, %rsi movq %rdx, %rcx shrq %rcx addq %rax, %rsi addq %rcx, %rsi negq %rdx andq %rsi, %rdx movq %rdx, %xmm0 retq
js_math_round: movq rax, xmm0 mov rdx, rax shr rdx, 34h and edx, 7FFh cmp edx, 3FEh ja short loc_7FD02 setnz dl mov rcx, 0BFE0000000000000h cmp rax, rcx setz sil mov rcx, 8000000000000000h and rcx, rax or sil, dl jnz short loc_7FCFC mov rax, 3FF0000000000000h or rcx, rax loc_7FCFC: movq xmm0, rcx retn loc_7FD02: cmp edx, 432h ja short locret_7FD34 mov rsi, rax mov cl, 33h ; '3' sub cl, dl mov edx, 1 shl rdx, cl sar rsi, 3Fh mov rcx, rdx shr rcx, 1 add rsi, rax add rsi, rcx neg rdx and rdx, rsi movq xmm0, rdx locret_7FD34: retn
double js_math_round(double result) { long long v1; // rdx double v2; // rcx v1 = (*(_QWORD *)&result >> 52) & 0x7FFLL; if ( (unsigned int)v1 > 0x3FE ) { if ( (unsigned int)v1 <= 0x432 ) *(_QWORD *)&result = (((unsigned long long)(1LL << (51 - (unsigned __int8)(*(_QWORD *)&result >> 52))) >> 1) + *(_QWORD *)&result + (*(long long *)&result >> 63)) & -(1LL << (51 - (unsigned __int8)(*(_QWORD *)&result >> 52))); } else { *(_QWORD *)&v2 = *(_QWORD *)&result & 0x8000000000000000LL; if ( (_DWORD)v1 == 1022 && *(_QWORD *)&result != 0xBFE0000000000000LL ) *(_QWORD *)&v2 |= 0x3FF0000000000000uLL; return v2; } return result; }
js_math_round: MOVQ RAX,XMM0 MOV RDX,RAX SHR RDX,0x34 AND EDX,0x7ff CMP EDX,0x3fe JA 0x0017fd02 SETNZ DL MOV RCX,-0x4020000000000000 CMP RAX,RCX SETZ SIL MOV RCX,-0x8000000000000000 AND RCX,RAX OR SIL,DL JNZ 0x0017fcfc MOV RAX,0x3ff0000000000000 OR RCX,RAX LAB_0017fcfc: MOVQ XMM0,RCX RET LAB_0017fd02: CMP EDX,0x432 JA 0x0017fd34 MOV RSI,RAX MOV CL,0x33 SUB CL,DL MOV EDX,0x1 SHL RDX,CL SAR RSI,0x3f MOV RCX,RDX SHR RCX,0x1 ADD RSI,RAX ADD RSI,RCX NEG RDX AND RDX,RSI MOVQ XMM0,RDX LAB_0017fd34: RET
ulong js_math_round(ulong param_1) { ulong uVar1; uint uVar2; uVar2 = (uint)(param_1 >> 0x34) & 0x7ff; if (uVar2 < 0x3ff) { uVar1 = param_1 & 0x8000000000000000; if (param_1 != 0xbfe0000000000000 && uVar2 == 0x3fe) { uVar1 = uVar1 | 0x3ff0000000000000; } return uVar1; } if (uVar2 < 0x433) { uVar1 = 1L << (0x33U - (char)uVar2 & 0x3f); param_1 = -uVar1 & ((long)param_1 >> 0x3f) + param_1 + (uVar1 >> 1); } return param_1; }
47,506
normalize_dirname
eloqsql/mysys/mf_pack.c
size_t normalize_dirname(char *to, const char *from) { size_t length; char buff[FN_REFLEN + 1]; DBUG_ENTER("normalize_dirname"); /* Despite the name, this actually converts the name to the system's format (TODO: name this properly). */ (void) intern_filename(buff, from); length= strlen(buff); /* Fix that '/' is last */ if (length && #ifdef FN_DEVCHAR buff[length - 1] != FN_DEVCHAR && #endif buff[length - 1] != FN_LIBCHAR && buff[length - 1] != '/') { /* we need reserve 2 bytes for the trailing slash and the zero */ if (length >= sizeof (buff) - 1) length= sizeof (buff) - 2; buff[length]= FN_LIBCHAR; buff[length + 1]= '\0'; } length=cleanup_dirname(to, buff); DBUG_RETURN(length); }
O3
c
normalize_dirname: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x210, %rsp # imm = 0x210 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x18(%rbp) leaq -0x220(%rbp), %r14 movq %r14, %rdi callq 0x5ce15 movq %r14, %rdi callq 0x36420 testq %rax, %rax je 0x5d16b cmpb $0x2f, -0x1(%rax,%r14) je 0x5d16b movl $0x1ff, %ecx # imm = 0x1FF cmpq %rcx, %rax cmovbq %rax, %rcx movw $0x2f, -0x220(%rbp,%rcx) leaq -0x220(%rbp), %rsi movq %rbx, %rdi callq 0x5ceab movq %fs:0x28, %rcx cmpq -0x18(%rbp), %rcx jne 0x5d195 addq $0x210, %rsp # imm = 0x210 popq %rbx popq %r14 popq %rbp retq callq 0x362b0
normalize_dirname: push rbp mov rbp, rsp push r14 push rbx sub rsp, 210h mov rbx, rdi mov rax, fs:28h mov [rbp+var_18], rax lea r14, [rbp+var_220] mov rdi, r14 call intern_filename mov rdi, r14 call _strlen test rax, rax jz short loc_5D16B cmp byte ptr [rax+r14-1], 2Fh ; '/' jz short loc_5D16B mov ecx, 1FFh cmp rax, rcx cmovb rcx, rax mov [rbp+rcx+var_220], 2Fh ; '/' loc_5D16B: lea rsi, [rbp+var_220] mov rdi, rbx call cleanup_dirname mov rcx, fs:28h cmp rcx, [rbp+var_18] jnz short loc_5D195 add rsp, 210h pop rbx pop r14 pop rbp retn loc_5D195: call ___stack_chk_fail
long long normalize_dirname(long long a1, _BYTE *a2) { unsigned long long v2; // rax long long v3; // rcx unsigned __int8 v5[520]; // [rsp+0h] [rbp-220h] BYREF unsigned long long v6; // [rsp+208h] [rbp-18h] v6 = __readfsqword(0x28u); intern_filename((long long)v5, a2); v2 = strlen(v5); if ( v2 && v5[v2 - 1] != 47 ) { v3 = 511LL; if ( v2 < 0x1FF ) v3 = v2; *(_WORD *)&v5[v3] = 47; } return cleanup_dirname(a1, v5); }
normalize_dirname: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x210 MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX LEA R14,[RBP + -0x220] MOV RDI,R14 CALL 0x0015ce15 MOV RDI,R14 CALL 0x00136420 TEST RAX,RAX JZ 0x0015d16b CMP byte ptr [RAX + R14*0x1 + -0x1],0x2f JZ 0x0015d16b MOV ECX,0x1ff CMP RAX,RCX CMOVC RCX,RAX MOV word ptr [RBP + RCX*0x1 + -0x220],0x2f LAB_0015d16b: LEA RSI,[RBP + -0x220] MOV RDI,RBX CALL 0x0015ceab MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x18] JNZ 0x0015d195 ADD RSP,0x210 POP RBX POP R14 POP RBP RET LAB_0015d195: CALL 0x001362b0
void normalize_dirname(int8 param_1) { size_t sVar1; size_t sVar2; long in_FS_OFFSET; int8 uStack_230; char local_228 [520]; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); uStack_230 = (code *)0x15d140; intern_filename(local_228); uStack_230 = (code *)0x15d148; sVar1 = strlen(local_228); if ((sVar1 != 0) && (local_228[sVar1 - 1] != '/')) { sVar2 = 0x1ff; if (sVar1 < 0x1ff) { sVar2 = sVar1; } (local_228 + sVar2)[0] = '/'; (local_228 + sVar2)[1] = '\0'; } uStack_230 = (code *)0x15d17a; cleanup_dirname(param_1,local_228); if (*(long *)(in_FS_OFFSET + 0x28) == local_20) { return; } /* WARNING: Subroutine does not return */ uStack_230 = unpack_dirname; __stack_chk_fail(); }
47,507
my_wc_mb_big5
eloqsql/strings/ctype-big5.c
static int my_wc_mb_big5(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { int code; if (s >= e) return MY_CS_TOOSMALL; if ((int) wc < 0x80) { s[0]= (uchar) wc; return 1; } if (!(code=func_uni_big5_onechar(wc))) return MY_CS_ILUNI; if (s+2>e) return MY_CS_TOOSMALL; s[0]=code>>8; s[1]=code&0xFF; return 2; }
O0
c
my_wc_mb_big5: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x34b2b movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x34ba4 movq -0x18(%rbp), %rax cmpl $0x80, %eax jge 0x34b4b movq -0x18(%rbp), %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x1, -0x4(%rbp) jmp 0x34ba4 movq -0x18(%rbp), %rax movl %eax, %edi callq 0x34ea0 movl %eax, -0x2c(%rbp) cmpl $0x0, %eax jne 0x34b67 movl $0x0, -0x4(%rbp) jmp 0x34ba4 movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x34b7e movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x34ba4 movl -0x2c(%rbp), %eax sarl $0x8, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl -0x2c(%rbp), %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x1(%rax) movl $0x2, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax)
my_wc_mb_big5: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_34B2B mov [rbp+var_4], 0FFFFFF9Bh jmp short loc_34BA4 loc_34B2B: mov rax, [rbp+var_18] cmp eax, 80h jge short loc_34B4B mov rax, [rbp+var_18] mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 1 jmp short loc_34BA4 loc_34B4B: mov rax, [rbp+var_18] mov edi, eax call func_uni_big5_onechar mov [rbp+var_2C], eax cmp eax, 0 jnz short loc_34B67 mov [rbp+var_4], 0 jmp short loc_34BA4 loc_34B67: mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_34B7E mov [rbp+var_4], 0FFFFFF9Bh jmp short loc_34BA4 loc_34B7E: mov eax, [rbp+var_2C] sar eax, 8 mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov eax, [rbp+var_2C] and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax+1], cl mov [rbp+var_4], 2 loc_34BA4: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long my_wc_mb_big5(long long a1, int a2, _BYTE *a3, unsigned long long a4) { int v5; // [rsp+4h] [rbp-2Ch] if ( (unsigned long long)a3 < a4 ) { if ( a2 >= 128 ) { v5 = func_uni_big5_onechar((unsigned int)a2); if ( v5 ) { if ( (unsigned long long)(a3 + 2) <= a4 ) { *a3 = BYTE1(v5); a3[1] = v5; return 2; } else { return (unsigned int)-101; } } else { return 0; } } else { *a3 = a2; return 1; } } else { return (unsigned int)-101; } }
my_wc_mb_big5: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x00134b2b MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x00134ba4 LAB_00134b2b: MOV RAX,qword ptr [RBP + -0x18] CMP EAX,0x80 JGE 0x00134b4b MOV RAX,qword ptr [RBP + -0x18] MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x1 JMP 0x00134ba4 LAB_00134b4b: MOV RAX,qword ptr [RBP + -0x18] MOV EDI,EAX CALL 0x00134ea0 MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JNZ 0x00134b67 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00134ba4 LAB_00134b67: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x00134b7e MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x00134ba4 LAB_00134b7e: MOV EAX,dword ptr [RBP + -0x2c] SAR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x2c] AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x1],CL MOV dword ptr [RBP + -0x4],0x2 LAB_00134ba4: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 my_wc_mb_big5(int8 param_1,int param_2,int1 *param_3,int1 *param_4) { int iVar1; int4 local_c; if (param_3 < param_4) { if (param_2 < 0x80) { *param_3 = (char)param_2; local_c = 1; } else { iVar1 = func_uni_big5_onechar(param_2); if (iVar1 == 0) { local_c = 0; } else if (param_4 < param_3 + 2) { local_c = 0xffffff9b; } else { *param_3 = (char)((uint)iVar1 >> 8); param_3[1] = (char)iVar1; local_c = 2; } } } else { local_c = 0xffffff9b; } return local_c; }
47,508
my_wc_mb_big5
eloqsql/strings/ctype-big5.c
static int my_wc_mb_big5(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { int code; if (s >= e) return MY_CS_TOOSMALL; if ((int) wc < 0x80) { s[0]= (uchar) wc; return 1; } if (!(code=func_uni_big5_onechar(wc))) return MY_CS_ILUNI; if (s+2>e) return MY_CS_TOOSMALL; s[0]=code>>8; s[1]=code&0xFF; return 2; }
O3
c
my_wc_mb_big5: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x2e339 cmpl $0x7f, %esi jg 0x2e1fc movb %sil, (%rdx) movl $0x1, %eax jmp 0x2e339 leal -0xa2(%rsi), %edi cmpl $0x55, %edi ja 0x2e212 movl %edi, %esi leaq 0x3dd80(%rip), %rdi # 0x6bf90 jmp 0x2e274 leal -0x2c7(%rsi), %edi cmpl $0x18a, %edi # imm = 0x18A ja 0x2e22b movl %edi, %esi leaq 0x3de17(%rip), %rdi # 0x6c040 jmp 0x2e274 leal -0x2013(%rsi), %edi cmpl $0x2ac, %edi # imm = 0x2AC ja 0x2e244 movl %edi, %esi leaq 0x3e11e(%rip), %rdi # 0x6c360 jmp 0x2e274 leal -0x2460(%rsi), %edi cmpl $0x1e2, %edi # imm = 0x1E2 ja 0x2e25d movl %edi, %esi leaq 0x3e665(%rip), %rdi # 0x6c8c0 jmp 0x2e274 leal -0x3000(%rsi), %edi cmpl $0x129, %edi # imm = 0x129 ja 0x2e2a1 movl %edi, %esi leaq 0x3ea1c(%rip), %rdi # 0x6cc90 leaq (%rdi,%rsi,2), %rsi movzwl (%rsi), %edi testl %edi, %edi je 0x2e337 leaq 0x2(%rdx), %rsi cmpq %rcx, %rsi ja 0x2e339 rolw $0x8, %di movw %di, (%rdx) movl $0x2, %eax jmp 0x2e339 movl $0xa1c0, %edi # imm = 0xA1C0 cmpl $0x32a3, %esi # imm = 0x32A3 je 0x2e283 leal -0x338e(%rsi), %edi cmpl $0x47, %edi ja 0x2e2c4 movl %edi, %esi leaq 0x3ec2e(%rip), %rdi # 0x6cef0 jmp 0x2e274 leal -0x4e00(%rsi), %edi cmpl $0x4683, %edi # imm = 0x4683 ja 0x2e2dd movl %edi, %esi leaq 0x3eca5(%rip), %rdi # 0x6cf80 jmp 0x2e274 leal -0x9577(%rsi), %edi cmpl $0xa2d, %edi # imm = 0xA2D ja 0x2e2f9 movl %edi, %esi leaq 0x4799c(%rip), %rdi # 0x75c90 jmp 0x2e274 movl %esi, %edi andl $0x7ffffffe, %edi # imm = 0x7FFFFFFE cmpl $0xfa0c, %edi # imm = 0xFA0C jne 0x2e31b addl $0xffff05f4, %esi # imm = 0xFFFF05F4 leaq 0x49176(%rip), %rdi # 0x7748c jmp 0x2e274 addl $0xffff01d0, %esi # imm = 0xFFFF01D0 cmpl $0x1cd, %esi # imm = 0x1CD ja 0x2e337 movl %esi, %esi leaq 0x48dbe(%rip), %rdi # 0x770f0 jmp 0x2e274 xorl %eax, %eax popq %rbp retq
my_wc_mb_big5: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb loc_2E339 cmp esi, 7Fh jg short loc_2E1FC mov [rdx], sil mov eax, 1 jmp loc_2E339 loc_2E1FC: lea edi, [rsi-0A2h] cmp edi, 55h ; 'U' ja short loc_2E212 mov esi, edi lea rdi, tab_uni_big50 jmp short loc_2E274 loc_2E212: lea edi, [rsi-2C7h] cmp edi, 18Ah ja short loc_2E22B mov esi, edi lea rdi, tab_uni_big51 jmp short loc_2E274 loc_2E22B: lea edi, [rsi-2013h] cmp edi, 2ACh ja short loc_2E244 mov esi, edi lea rdi, tab_uni_big52 jmp short loc_2E274 loc_2E244: lea edi, [rsi-2460h] cmp edi, 1E2h ja short loc_2E25D mov esi, edi lea rdi, tab_uni_big53 jmp short loc_2E274 loc_2E25D: lea edi, [rsi-3000h] cmp edi, 129h ja short loc_2E2A1 mov esi, edi lea rdi, tab_uni_big54 loc_2E274: lea rsi, [rdi+rsi*2] movzx edi, word ptr [rsi] test edi, edi jz loc_2E337 loc_2E283: lea rsi, [rdx+2] cmp rsi, rcx ja loc_2E339 rol di, 8 mov [rdx], di mov eax, 2 jmp loc_2E339 loc_2E2A1: mov edi, 0A1C0h cmp esi, 32A3h jz short loc_2E283 lea edi, [rsi-338Eh] cmp edi, 47h ; 'G' ja short loc_2E2C4 mov esi, edi lea rdi, tab_uni_big56 jmp short loc_2E274 loc_2E2C4: lea edi, [rsi-4E00h] cmp edi, 4683h ja short loc_2E2DD mov esi, edi lea rdi, tab_uni_big57 jmp short loc_2E274 loc_2E2DD: lea edi, [rsi-9577h] cmp edi, 0A2Dh ja short loc_2E2F9 mov esi, edi lea rdi, tab_uni_big58 jmp loc_2E274 loc_2E2F9: mov edi, esi and edi, 7FFFFFFEh cmp edi, 0FA0Ch jnz short loc_2E31B add esi, 0FFFF05F4h lea rdi, tab_uni_big59 jmp loc_2E274 loc_2E31B: add esi, 0FFFF01D0h cmp esi, 1CDh ja short loc_2E337 mov esi, esi lea rdi, tab_uni_big510 jmp loc_2E274 loc_2E337: xor eax, eax loc_2E339: pop rbp retn
long long my_wc_mb_big5(long long a1, int a2, _BYTE *a3, unsigned long long a4) { long long result; // rax long long v5; // rsi _WORD *v6; // rdi __int16 v7; // di result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { if ( a2 <= 127 ) { *a3 = a2; return 1LL; } if ( (unsigned int)(a2 - 162) > 0x55 ) { if ( (unsigned int)(a2 - 711) > 0x18A ) { if ( (unsigned int)(a2 - 8211) > 0x2AC ) { if ( (unsigned int)(a2 - 9312) > 0x1E2 ) { if ( (unsigned int)(a2 - 12288) > 0x129 ) { v7 = -24128; if ( a2 == 12963 ) { LABEL_15: if ( (unsigned long long)(a3 + 2) <= a4 ) { *(_WORD *)a3 = __ROL2__(v7, 8); return 2LL; } return result; } if ( (unsigned int)(a2 - 13198) > 0x47 ) { if ( (unsigned int)(a2 - 19968) > 0x4683 ) { if ( (unsigned int)(a2 - 38263) > 0xA2D ) { if ( (a2 & 0x7FFFFFFE) == 0xFA0C ) { v5 = (unsigned int)(a2 - 64012); v6 = &tab_uni_big59; } else { LODWORD(v5) = a2 - 65072; if ( (unsigned int)v5 > 0x1CD ) return 0LL; v5 = (unsigned int)v5; v6 = &tab_uni_big510; } } else { v5 = (unsigned int)(a2 - 38263); v6 = &tab_uni_big58; } } else { v5 = (unsigned int)(a2 - 19968); v6 = &tab_uni_big57; } } else { v5 = (unsigned int)(a2 - 13198); v6 = &tab_uni_big56; } } else { v5 = (unsigned int)(a2 - 12288); v6 = &tab_uni_big54; } } else { v5 = (unsigned int)(a2 - 9312); v6 = &tab_uni_big53; } } else { v5 = (unsigned int)(a2 - 8211); v6 = &tab_uni_big52; } } else { v5 = (unsigned int)(a2 - 711); v6 = &tab_uni_big51; } } else { v5 = (unsigned int)(a2 - 162); v6 = &tab_uni_big50; } v7 = v6[v5]; if ( v7 ) goto LABEL_15; return 0LL; } return result; }
my_wc_mb_big5: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x0012e339 CMP ESI,0x7f JG 0x0012e1fc MOV byte ptr [RDX],SIL MOV EAX,0x1 JMP 0x0012e339 LAB_0012e1fc: LEA EDI,[RSI + -0xa2] CMP EDI,0x55 JA 0x0012e212 MOV ESI,EDI LEA RDI,[0x16bf90] JMP 0x0012e274 LAB_0012e212: LEA EDI,[RSI + -0x2c7] CMP EDI,0x18a JA 0x0012e22b MOV ESI,EDI LEA RDI,[0x16c040] JMP 0x0012e274 LAB_0012e22b: LEA EDI,[RSI + -0x2013] CMP EDI,0x2ac JA 0x0012e244 MOV ESI,EDI LEA RDI,[0x16c360] JMP 0x0012e274 LAB_0012e244: LEA EDI,[RSI + -0x2460] CMP EDI,0x1e2 JA 0x0012e25d MOV ESI,EDI LEA RDI,[0x16c8c0] JMP 0x0012e274 LAB_0012e25d: LEA EDI,[RSI + -0x3000] CMP EDI,0x129 JA 0x0012e2a1 MOV ESI,EDI LEA RDI,[0x16cc90] LAB_0012e274: LEA RSI,[RDI + RSI*0x2] MOVZX EDI,word ptr [RSI] TEST EDI,EDI JZ 0x0012e337 LAB_0012e283: LEA RSI,[RDX + 0x2] CMP RSI,RCX JA 0x0012e339 ROL DI,0x8 MOV word ptr [RDX],DI MOV EAX,0x2 JMP 0x0012e339 LAB_0012e2a1: MOV EDI,0xa1c0 CMP ESI,0x32a3 JZ 0x0012e283 LEA EDI,[RSI + -0x338e] CMP EDI,0x47 JA 0x0012e2c4 MOV ESI,EDI LEA RDI,[0x16cef0] JMP 0x0012e274 LAB_0012e2c4: LEA EDI,[RSI + -0x4e00] CMP EDI,0x4683 JA 0x0012e2dd MOV ESI,EDI LEA RDI,[0x16cf80] JMP 0x0012e274 LAB_0012e2dd: LEA EDI,[RSI + -0x9577] CMP EDI,0xa2d JA 0x0012e2f9 MOV ESI,EDI LEA RDI,[0x175c90] JMP 0x0012e274 LAB_0012e2f9: MOV EDI,ESI AND EDI,0x7ffffffe CMP EDI,0xfa0c JNZ 0x0012e31b ADD ESI,0xffff05f4 LEA RDI,[0x17748c] JMP 0x0012e274 LAB_0012e31b: ADD ESI,0xffff01d0 CMP ESI,0x1cd JA 0x0012e337 MOV ESI,ESI LEA RDI,[0x1770f0] JMP 0x0012e274 LAB_0012e337: XOR EAX,EAX LAB_0012e339: POP RBP RET
int8 my_wc_mb_big5(int8 param_1,uint param_2,ushort *param_3,ushort *param_4) { int8 uVar1; ulong uVar2; ushort uVar3; int1 *puVar4; uVar1 = 0xffffff9b; if (param_4 <= param_3) { return 0xffffff9b; } if ((int)param_2 < 0x80) { *(char *)param_3 = (char)param_2; return 1; } if (param_2 - 0xa2 < 0x56) { uVar2 = (ulong)(param_2 - 0xa2); puVar4 = tab_uni_big50; } else if (param_2 - 0x2c7 < 0x18b) { uVar2 = (ulong)(param_2 - 0x2c7); puVar4 = tab_uni_big51; } else if (param_2 - 0x2013 < 0x2ad) { uVar2 = (ulong)(param_2 - 0x2013); puVar4 = tab_uni_big52; } else if (param_2 - 0x2460 < 0x1e3) { uVar2 = (ulong)(param_2 - 0x2460); puVar4 = tab_uni_big53; } else if (param_2 - 0x3000 < 0x12a) { uVar2 = (ulong)(param_2 - 0x3000); puVar4 = tab_uni_big54; } else { uVar3 = 0xa1c0; if (param_2 == 0x32a3) goto LAB_0012e283; if (param_2 - 0x338e < 0x48) { uVar2 = (ulong)(param_2 - 0x338e); puVar4 = tab_uni_big56; } else if (param_2 - 0x4e00 < 0x4684) { uVar2 = (ulong)(param_2 - 0x4e00); puVar4 = tab_uni_big57; } else if (param_2 - 0x9577 < 0xa2e) { uVar2 = (ulong)(param_2 - 0x9577); puVar4 = tab_uni_big58; } else if ((param_2 & 0x7ffffffe) == 0xfa0c) { uVar2 = (ulong)(param_2 - 0xfa0c); puVar4 = (int1 *)&tab_uni_big59; } else { if (0x1cd < param_2 - 0xfe30) { return 0; } uVar2 = (ulong)(param_2 - 0xfe30); puVar4 = tab_uni_big510; } } uVar3 = *(ushort *)((long)puVar4 + uVar2 * 2); if (uVar3 == 0) { return 0; } LAB_0012e283: if (param_3 + 1 <= param_4) { *param_3 = uVar3 << 8 | uVar3 >> 8; uVar1 = 2; } return uVar1; }
47,509
ggml_compute_forward_argmax_f32(ggml_compute_params const*, ggml_tensor*)
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp
static void ggml_compute_forward_argmax_f32( const ggml_compute_params * params, ggml_tensor * dst) { const ggml_tensor * src0 = dst->src[0]; if (params->ith != 0) { return; } assert(src0->nb[0] == sizeof(float)); assert(dst->nb[0] == sizeof(float)); const int64_t ne00 = src0->ne[0]; const int64_t ne01 = src0->ne[1]; const size_t nb01 = src0->nb[1]; const size_t nb0 = dst->nb[0]; for (int64_t i1 = 0; i1 < ne01; i1++) { float * src = (float *) ((char *) src0->data + i1*nb01); int32_t * dst_ = (int32_t *) ((char *) dst->data + i1*nb0); int v = 0; ggml_vec_argmax_f32(ne00, &v, src); dst_[0] = v; } }
O0
cpp
ggml_compute_forward_argmax_f32(ggml_compute_params const*, ggml_tensor*): subq $0x58, %rsp movq %rdi, 0x50(%rsp) movq %rsi, 0x48(%rsp) movq 0x48(%rsp), %rax movq 0x98(%rax), %rax movq %rax, 0x40(%rsp) movq 0x50(%rsp), %rax cmpl $0x0, (%rax) je 0x8bf9e jmp 0x8c065 movq 0x40(%rsp), %rax movq 0x10(%rax), %rax movq %rax, 0x38(%rsp) movq 0x40(%rsp), %rax movq 0x18(%rax), %rax movq %rax, 0x30(%rsp) movq 0x40(%rsp), %rax movq 0x38(%rax), %rax movq %rax, 0x28(%rsp) movq 0x48(%rsp), %rax movq 0x30(%rax), %rax movq %rax, 0x20(%rsp) movq $0x0, 0x18(%rsp) movq 0x18(%rsp), %rax cmpq 0x30(%rsp), %rax jge 0x8c065 movq 0x40(%rsp), %rax movq 0xf8(%rax), %rax movq 0x18(%rsp), %rcx imulq 0x28(%rsp), %rcx addq %rcx, %rax movq %rax, 0x10(%rsp) movq 0x48(%rsp), %rax movq 0xf8(%rax), %rax movq 0x18(%rsp), %rcx imulq 0x20(%rsp), %rcx addq %rcx, %rax movq %rax, 0x8(%rsp) movl $0x0, 0x4(%rsp) movq 0x38(%rsp), %rax movl %eax, %edi movq 0x10(%rsp), %rdx leaq 0x4(%rsp), %rsi callq 0xa7e50 movl 0x4(%rsp), %ecx movq 0x8(%rsp), %rax movl %ecx, (%rax) movq 0x18(%rsp), %rax addq $0x1, %rax movq %rax, 0x18(%rsp) jmp 0x8bfdf addq $0x58, %rsp retq nopw (%rax,%rax)
_ZL31ggml_compute_forward_argmax_f32PK19ggml_compute_paramsP11ggml_tensor: sub rsp, 58h mov [rsp+58h+var_8], rdi mov [rsp+58h+var_10], rsi mov rax, [rsp+58h+var_10] mov rax, [rax+98h] mov [rsp+58h+var_18], rax mov rax, [rsp+58h+var_8] cmp dword ptr [rax], 0 jz short loc_8BF9E jmp loc_8C065 loc_8BF9E: mov rax, [rsp+58h+var_18] mov rax, [rax+10h] mov qword ptr [rsp+58h+var_20], rax mov rax, [rsp+58h+var_18] mov rax, [rax+18h] mov [rsp+58h+var_28], rax mov rax, [rsp+58h+var_18] mov rax, [rax+38h] mov [rsp+58h+var_30], rax mov rax, [rsp+58h+var_10] mov rax, [rax+30h] mov [rsp+58h+var_38], rax mov [rsp+58h+var_40], 0 loc_8BFDF: mov rax, [rsp+58h+var_40] cmp rax, [rsp+58h+var_28] jge short loc_8C065 mov rax, [rsp+58h+var_18] mov rax, [rax+0F8h] mov rcx, [rsp+58h+var_40] imul rcx, [rsp+58h+var_30] add rax, rcx mov [rsp+58h+var_48], rax mov rax, [rsp+58h+var_10] mov rax, [rax+0F8h] mov rcx, [rsp+58h+var_40] imul rcx, [rsp+58h+var_38] add rax, rcx mov [rsp+58h+var_50], rax mov [rsp+58h+var_54], 0 mov rax, qword ptr [rsp+58h+var_20] mov edi, eax; int mov rdx, [rsp+58h+var_48]; float * lea rsi, [rsp+58h+var_54]; int * call _ZL19ggml_vec_argmax_f32iPiPKf; ggml_vec_argmax_f32(int,int *,float const*) mov ecx, [rsp+58h+var_54] mov rax, [rsp+58h+var_50] mov [rax], ecx mov rax, [rsp+58h+var_40] add rax, 1 mov [rsp+58h+var_40], rax jmp loc_8BFDF loc_8C065: add rsp, 58h retn
_DWORD * ggml_compute_forward_argmax_f32(_DWORD *a1, long long a2) { _DWORD *result; // rax int v3; // [rsp+4h] [rbp-54h] BYREF int *v4; // [rsp+8h] [rbp-50h] float *v5; // [rsp+10h] [rbp-48h] long long i; // [rsp+18h] [rbp-40h] long long v7; // [rsp+20h] [rbp-38h] long long v8; // [rsp+28h] [rbp-30h] long long v9; // [rsp+30h] [rbp-28h] int v10[2]; // [rsp+38h] [rbp-20h] _QWORD *v11; // [rsp+40h] [rbp-18h] long long v12; // [rsp+48h] [rbp-10h] _DWORD *v13; // [rsp+50h] [rbp-8h] v13 = a1; v12 = a2; v11 = *(_QWORD **)(a2 + 152); result = a1; if ( !*a1 ) { *(_QWORD *)v10 = v11[2]; v9 = v11[3]; v8 = v11[7]; v7 = *(_QWORD *)(v12 + 48); for ( i = 0LL; ; ++i ) { result = (_DWORD *)i; if ( i >= v9 ) break; v5 = (float *)(v8 * i + v11[31]); v4 = (int *)(v7 * i + *(_QWORD *)(v12 + 248)); v3 = 0; ggml_vec_argmax_f32(v10[0], &v3, v5); *v4 = v3; } } return result; }
ggml_compute_forward_argmax_f32: SUB RSP,0x58 MOV qword ptr [RSP + 0x50],RDI MOV qword ptr [RSP + 0x48],RSI MOV RAX,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RAX + 0x98] MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x50] CMP dword ptr [RAX],0x0 JZ 0x0018bf9e JMP 0x0018c065 LAB_0018bf9e: MOV RAX,qword ptr [RSP + 0x40] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x38],RAX MOV RAX,qword ptr [RSP + 0x40] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x40] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RSP + 0x28],RAX MOV RAX,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x18],0x0 LAB_0018bfdf: MOV RAX,qword ptr [RSP + 0x18] CMP RAX,qword ptr [RSP + 0x30] JGE 0x0018c065 MOV RAX,qword ptr [RSP + 0x40] MOV RAX,qword ptr [RAX + 0xf8] MOV RCX,qword ptr [RSP + 0x18] IMUL RCX,qword ptr [RSP + 0x28] ADD RAX,RCX MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RAX + 0xf8] MOV RCX,qword ptr [RSP + 0x18] IMUL RCX,qword ptr [RSP + 0x20] ADD RAX,RCX MOV qword ptr [RSP + 0x8],RAX MOV dword ptr [RSP + 0x4],0x0 MOV RAX,qword ptr [RSP + 0x38] MOV EDI,EAX MOV RDX,qword ptr [RSP + 0x10] LEA RSI,[RSP + 0x4] CALL 0x001a7e50 MOV ECX,dword ptr [RSP + 0x4] MOV RAX,qword ptr [RSP + 0x8] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RSP + 0x18] ADD RAX,0x1 MOV qword ptr [RSP + 0x18],RAX JMP 0x0018bfdf LAB_0018c065: ADD RSP,0x58 RET
/* ggml_compute_forward_argmax_f32(ggml_compute_params const*, ggml_tensor*) */ void ggml_compute_forward_argmax_f32(ggml_compute_params *param_1,ggml_tensor *param_2) { int local_54; int *local_50; float *local_48; long local_40; long local_38; long local_30; long local_28; int8 local_20; long local_18; ggml_tensor *local_10; ggml_compute_params *local_8; local_18 = *(long *)(param_2 + 0x98); if (*(int *)param_1 == 0) { local_20 = *(int8 *)(local_18 + 0x10); local_28 = *(long *)(local_18 + 0x18); local_30 = *(long *)(local_18 + 0x38); local_38 = *(long *)(param_2 + 0x30); local_10 = param_2; local_8 = param_1; for (local_40 = 0; local_40 < local_28; local_40 = local_40 + 1) { local_48 = (float *)(*(long *)(local_18 + 0xf8) + local_40 * local_30); local_50 = (int *)(*(long *)(local_10 + 0xf8) + local_40 * local_38); local_54 = 0; ggml_vec_argmax_f32((int)local_20,&local_54,local_48); *local_50 = local_54; } } return; }
47,510
my_strntoll_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static longlong my_strntoll_mb2_or_mb4(CHARSET_INFO *cs, const char *nptr, size_t l, int base, char **endptr, int *err) { int negative=0; int overflow; int cnv; my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; register ulonglong cutoff; register unsigned int cutlim; register ulonglong res; register const uchar *s= (const uchar*) nptr; register const uchar *e= (const uchar*) nptr+l; const uchar *save; *err= 0; do { if ((cnv= mb_wc(cs, &wc, s, e)) > 0) { switch (wc) { case ' ' : break; case '\t': break; case '-' : negative= !negative; break; case '+' : break; default : goto bs; } } else /* No more characters or bad multibyte sequence */ { if (endptr !=NULL ) *endptr = (char*)s; err[0] = (cnv==MY_CS_ILSEQ) ? EILSEQ : EDOM; return 0; } s+=cnv; } while (1); bs: overflow = 0; res = 0; save = s; cutoff = (~(ulonglong) 0) / (unsigned long int) base; cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base); do { if ((cnv= mb_wc(cs, &wc, s, e)) > 0) { s+=cnv; if ( wc>='0' && wc<='9') wc -= '0'; else if ( wc>='A' && wc<='Z') wc = wc - 'A' + 10; else if ( wc>='a' && wc<='z') wc = wc - 'a' + 10; else break; if ((int)wc >= base) break; if (res > cutoff || (res == cutoff && wc > cutlim)) overflow = 1; else { res *= (ulonglong) base; res += wc; } } else if (cnv==MY_CS_ILSEQ) { if (endptr !=NULL ) *endptr = (char*)s; err[0]=EILSEQ; return 0; } else { /* No more characters */ break; } } while(1); if (endptr != NULL) *endptr = (char *) s; if (s == save) { err[0]=EDOM; return 0L; } if (negative) { if (res > (ulonglong) LONGLONG_MIN) overflow = 1; } else if (res > (ulonglong) LONGLONG_MAX) overflow = 1; if (overflow) { err[0]=ERANGE; return negative ? LONGLONG_MIN : LONGLONG_MAX; } return (negative ? -((longlong)res) : (longlong)res); }
O0
c
my_strntoll_mb2_or_mb4: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) movl $0x0, -0x3c(%rbp) movq -0x10(%rbp), %rax movq 0xb8(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x58(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x78(%rbp) movq -0x18(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x80(%rbp) movq -0x38(%rbp), %rax movl $0x0, (%rax) movq -0x58(%rbp), %rax movq -0x10(%rbp), %rdi movq -0x78(%rbp), %rdx movq -0x80(%rbp), %rcx leaq -0x50(%rbp), %rsi callq *%rax movl %eax, -0x44(%rbp) cmpl $0x0, %eax jle 0xb82e1 movq -0x50(%rbp), %rax addq $-0x9, %rax movq %rax, -0x90(%rbp) subq $0x24, %rax ja 0xb82dd movq -0x90(%rbp), %rax leaq 0x15ae3d(%rip), %rcx # 0x2130f8 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax jmp 0xb82df jmp 0xb82df cmpl $0x0, -0x3c(%rbp) setne %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x3c(%rbp) jmp 0xb82df jmp 0xb82df jmp 0xb8338 jmp 0xb8319 cmpq $0x0, -0x30(%rbp) je 0xb82f3 movq -0x78(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movl -0x44(%rbp), %edx movl $0x21, %ecx movl $0x54, %eax cmpl $0x0, %edx cmovel %eax, %ecx movq -0x38(%rbp), %rax movl %ecx, (%rax) movq $0x0, -0x8(%rbp) jmp 0xb8571 movl -0x44(%rbp), %ecx movq -0x78(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x78(%rbp) movb $0x1, %al testb $0x1, %al jne 0xb827a jmp 0xb8336 jmp 0xb8338 movl $0x0, -0x40(%rbp) movq $0x0, -0x70(%rbp) movq -0x78(%rbp), %rax movq %rax, -0x88(%rbp) movslq -0x24(%rbp), %rcx movq $-0x1, %rax xorl %edx, %edx divq %rcx movq %rax, -0x60(%rbp) movslq -0x24(%rbp), %rcx movq $-0x1, %rax xorl %edx, %edx divq %rcx movl %edx, %eax movl %eax, -0x64(%rbp) movq -0x58(%rbp), %rax movq -0x10(%rbp), %rdi movq -0x78(%rbp), %rdx movq -0x80(%rbp), %rcx leaq -0x50(%rbp), %rsi callq *%rax movl %eax, -0x44(%rbp) cmpl $0x0, %eax jle 0xb8465 movl -0x44(%rbp), %ecx movq -0x78(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x78(%rbp) cmpq $0x30, -0x50(%rbp) jb 0xb83ca cmpq $0x39, -0x50(%rbp) ja 0xb83ca movq -0x50(%rbp), %rax subq $0x30, %rax movq %rax, -0x50(%rbp) jmp 0xb8413 cmpq $0x41, -0x50(%rbp) jb 0xb83ea cmpq $0x5a, -0x50(%rbp) ja 0xb83ea movq -0x50(%rbp), %rax subq $0x41, %rax addq $0xa, %rax movq %rax, -0x50(%rbp) jmp 0xb8411 cmpq $0x61, -0x50(%rbp) jb 0xb840a cmpq $0x7a, -0x50(%rbp) ja 0xb840a movq -0x50(%rbp), %rax subq $0x61, %rax addq $0xa, %rax movq %rax, -0x50(%rbp) jmp 0xb840f jmp 0xb84a4 jmp 0xb8411 jmp 0xb8413 movq -0x50(%rbp), %rax cmpl -0x24(%rbp), %eax jl 0xb8421 jmp 0xb84a4 movq -0x70(%rbp), %rax cmpq -0x60(%rbp), %rax ja 0xb8441 movq -0x70(%rbp), %rax cmpq -0x60(%rbp), %rax jne 0xb844a movq -0x50(%rbp), %rax movl -0x64(%rbp), %ecx cmpq %rcx, %rax jbe 0xb844a movl $0x1, -0x40(%rbp) jmp 0xb8463 movslq -0x24(%rbp), %rax imulq -0x70(%rbp), %rax movq %rax, -0x70(%rbp) movq -0x50(%rbp), %rax addq -0x70(%rbp), %rax movq %rax, -0x70(%rbp) jmp 0xb8496 cmpl $0x0, -0x44(%rbp) jne 0xb8494 cmpq $0x0, -0x30(%rbp) je 0xb847d movq -0x78(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movq -0x38(%rbp), %rax movl $0x54, (%rax) movq $0x0, -0x8(%rbp) jmp 0xb8571 jmp 0xb84a4 jmp 0xb8498 movb $0x1, %al testb $0x1, %al jne 0xb837b jmp 0xb84a4 cmpq $0x0, -0x30(%rbp) je 0xb84b6 movq -0x78(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movq -0x78(%rbp), %rax cmpq -0x88(%rbp), %rax jne 0xb84da movq -0x38(%rbp), %rax movl $0x21, (%rax) movq $0x0, -0x8(%rbp) jmp 0xb8571 cmpl $0x0, -0x3c(%rbp) je 0xb84f9 movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 cmpq %rax, -0x70(%rbp) jbe 0xb84f7 movl $0x1, -0x40(%rbp) jmp 0xb8512 movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF cmpq %rax, -0x70(%rbp) jbe 0xb8510 movl $0x1, -0x40(%rbp) jmp 0xb8512 cmpl $0x0, -0x40(%rbp) je 0xb8546 movq -0x38(%rbp), %rax movl $0x22, (%rax) movl -0x3c(%rbp), %edx movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 cmpl $0x0, %edx cmovneq %rcx, %rax movq %rax, -0x8(%rbp) jmp 0xb8571 cmpl $0x0, -0x3c(%rbp) je 0xb855b xorl %eax, %eax subq -0x70(%rbp), %rax movq %rax, -0x98(%rbp) jmp 0xb8566 movq -0x70(%rbp), %rax movq %rax, -0x98(%rbp) movq -0x98(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xa0, %rsp popq %rbp retq nop
my_strntoll_mb2_or_mb4: push rbp mov rbp, rsp sub rsp, 0A0h 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 [rbp+var_3C], 0 mov rax, [rbp+var_10] mov rax, [rax+0B8h] mov rax, [rax+28h] mov [rbp+var_58], rax mov rax, [rbp+var_18] mov [rbp+var_78], rax mov rax, [rbp+var_18] add rax, [rbp+var_20] mov [rbp+var_80], rax mov rax, [rbp+var_38] mov dword ptr [rax], 0 loc_B827A: mov rax, [rbp+var_58] mov rdi, [rbp+var_10] mov rdx, [rbp+var_78] mov rcx, [rbp+var_80] lea rsi, [rbp+var_50] call rax mov [rbp+var_44], eax cmp eax, 0 jle short loc_B82E1 mov rax, [rbp+var_50] add rax, 0FFFFFFFFFFFFFFF7h; switch 37 cases mov [rbp+var_90], rax sub rax, 24h ja short def_B82C2; jumptable 00000000000B82C2 default case, cases 10-31,33-42,44 mov rax, [rbp+var_90] lea rcx, jpt_B82C2 movsxd rax, ds:(jpt_B82C2 - 2130F8h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_B82C4: jmp short loc_B82DF; jumptable 00000000000B82C2 case 32 loc_B82C6: jmp short loc_B82DF; jumptable 00000000000B82C2 case 9 loc_B82C8: cmp [rbp+var_3C], 0; jumptable 00000000000B82C2 case 45 setnz al xor al, 0FFh and al, 1 movzx eax, al mov [rbp+var_3C], eax jmp short loc_B82DF loc_B82DB: jmp short loc_B82DF; jumptable 00000000000B82C2 case 43 def_B82C2: jmp short loc_B8338; jumptable 00000000000B82C2 default case, cases 10-31,33-42,44 loc_B82DF: jmp short loc_B8319 loc_B82E1: cmp [rbp+var_30], 0 jz short loc_B82F3 mov rcx, [rbp+var_78] mov rax, [rbp+var_30] mov [rax], rcx loc_B82F3: mov edx, [rbp+var_44] mov ecx, 21h ; '!' mov eax, 54h ; 'T' cmp edx, 0 cmovz ecx, eax mov rax, [rbp+var_38] mov [rax], ecx mov [rbp+var_8], 0 jmp loc_B8571 loc_B8319: mov ecx, [rbp+var_44] mov rax, [rbp+var_78] movsxd rcx, ecx add rax, rcx mov [rbp+var_78], rax mov al, 1 test al, 1 jnz loc_B827A jmp short $+2 loc_B8336: jmp short $+2 loc_B8338: mov [rbp+var_40], 0 mov [rbp+var_70], 0 mov rax, [rbp+var_78] mov [rbp+var_88], rax movsxd rcx, [rbp+var_24] mov rax, 0FFFFFFFFFFFFFFFFh xor edx, edx div rcx mov [rbp+var_60], rax movsxd rcx, [rbp+var_24] mov rax, 0FFFFFFFFFFFFFFFFh xor edx, edx div rcx mov eax, edx mov [rbp+var_64], eax loc_B837B: mov rax, [rbp+var_58] mov rdi, [rbp+var_10] mov rdx, [rbp+var_78] mov rcx, [rbp+var_80] lea rsi, [rbp+var_50] call rax mov [rbp+var_44], eax cmp eax, 0 jle loc_B8465 mov ecx, [rbp+var_44] mov rax, [rbp+var_78] movsxd rcx, ecx add rax, rcx mov [rbp+var_78], rax cmp [rbp+var_50], 30h ; '0' jb short loc_B83CA cmp [rbp+var_50], 39h ; '9' ja short loc_B83CA mov rax, [rbp+var_50] sub rax, 30h ; '0' mov [rbp+var_50], rax jmp short loc_B8413 loc_B83CA: cmp [rbp+var_50], 41h ; 'A' jb short loc_B83EA cmp [rbp+var_50], 5Ah ; 'Z' ja short loc_B83EA mov rax, [rbp+var_50] sub rax, 41h ; 'A' add rax, 0Ah mov [rbp+var_50], rax jmp short loc_B8411 loc_B83EA: cmp [rbp+var_50], 61h ; 'a' jb short loc_B840A cmp [rbp+var_50], 7Ah ; 'z' ja short loc_B840A mov rax, [rbp+var_50] sub rax, 61h ; 'a' add rax, 0Ah mov [rbp+var_50], rax jmp short loc_B840F loc_B840A: jmp loc_B84A4 loc_B840F: jmp short $+2 loc_B8411: jmp short $+2 loc_B8413: mov rax, [rbp+var_50] cmp eax, [rbp+var_24] jl short loc_B8421 jmp loc_B84A4 loc_B8421: mov rax, [rbp+var_70] cmp rax, [rbp+var_60] ja short loc_B8441 mov rax, [rbp+var_70] cmp rax, [rbp+var_60] jnz short loc_B844A mov rax, [rbp+var_50] mov ecx, [rbp+var_64] cmp rax, rcx jbe short loc_B844A loc_B8441: mov [rbp+var_40], 1 jmp short loc_B8463 loc_B844A: movsxd rax, [rbp+var_24] imul rax, [rbp+var_70] mov [rbp+var_70], rax mov rax, [rbp+var_50] add rax, [rbp+var_70] mov [rbp+var_70], rax loc_B8463: jmp short loc_B8496 loc_B8465: cmp [rbp+var_44], 0 jnz short loc_B8494 cmp [rbp+var_30], 0 jz short loc_B847D mov rcx, [rbp+var_78] mov rax, [rbp+var_30] mov [rax], rcx loc_B847D: mov rax, [rbp+var_38] mov dword ptr [rax], 54h ; 'T' mov [rbp+var_8], 0 jmp loc_B8571 loc_B8494: jmp short loc_B84A4 loc_B8496: jmp short $+2 loc_B8498: mov al, 1 test al, 1 jnz loc_B837B jmp short $+2 loc_B84A4: cmp [rbp+var_30], 0 jz short loc_B84B6 mov rcx, [rbp+var_78] mov rax, [rbp+var_30] mov [rax], rcx loc_B84B6: mov rax, [rbp+var_78] cmp rax, [rbp+var_88] jnz short loc_B84DA mov rax, [rbp+var_38] mov dword ptr [rax], 21h ; '!' mov [rbp+var_8], 0 jmp loc_B8571 loc_B84DA: cmp [rbp+var_3C], 0 jz short loc_B84F9 mov rax, 8000000000000000h cmp [rbp+var_70], rax jbe short loc_B84F7 mov [rbp+var_40], 1 loc_B84F7: jmp short loc_B8512 loc_B84F9: mov rax, 7FFFFFFFFFFFFFFFh cmp [rbp+var_70], rax jbe short loc_B8510 mov [rbp+var_40], 1 loc_B8510: jmp short $+2 loc_B8512: cmp [rbp+var_40], 0 jz short loc_B8546 mov rax, [rbp+var_38] mov dword ptr [rax], 22h ; '"' mov edx, [rbp+var_3C] mov rax, 7FFFFFFFFFFFFFFFh mov rcx, 8000000000000000h cmp edx, 0 cmovnz rax, rcx mov [rbp+var_8], rax jmp short loc_B8571 loc_B8546: cmp [rbp+var_3C], 0 jz short loc_B855B xor eax, eax sub rax, [rbp+var_70] mov [rbp+var_98], rax jmp short loc_B8566 loc_B855B: mov rax, [rbp+var_70] mov [rbp+var_98], rax loc_B8566: mov rax, [rbp+var_98] mov [rbp+var_8], rax loc_B8571: mov rax, [rbp+var_8] add rsp, 0A0h pop rbp retn
unsigned long long my_strntoll_mb2_or_mb4(long long a1, long long a2, long long a3, int a4, _QWORD *a5, int *a6) { int v6; // ecx long long v7; // rax long long v10; // [rsp+18h] [rbp-88h] long long v11; // [rsp+20h] [rbp-80h] long long v12; // [rsp+28h] [rbp-78h] unsigned long long v13; // [rsp+30h] [rbp-70h] unsigned int v14; // [rsp+3Ch] [rbp-64h] unsigned long long v15; // [rsp+40h] [rbp-60h] long long ( *v16)(long long, unsigned long long *, long long, long long); // [rsp+48h] [rbp-58h] unsigned long long v17; // [rsp+50h] [rbp-50h] BYREF int v18; // [rsp+5Ch] [rbp-44h] int v19; // [rsp+60h] [rbp-40h] BOOL v20; // [rsp+64h] [rbp-3Ch] int *v21; // [rsp+68h] [rbp-38h] _QWORD *v22; // [rsp+70h] [rbp-30h] int v23; // [rsp+7Ch] [rbp-24h] long long v24; // [rsp+80h] [rbp-20h] long long v25; // [rsp+88h] [rbp-18h] long long v26; // [rsp+90h] [rbp-10h] v26 = a1; v25 = a2; v24 = a3; v23 = a4; v22 = a5; v21 = a6; v20 = 0; v16 = *(long long ( **)(long long, unsigned long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL); v12 = a2; v11 = a3 + a2; *a6 = 0; while ( 2 ) { v18 = v16(v26, &v17, v12, v11); if ( v18 <= 0 ) { if ( v22 ) *v22 = v12; v6 = 33; if ( !v18 ) v6 = 84; *v21 = v6; return 0LL; } else { switch ( v17 ) { case 9uLL: case 0x20uLL: case 0x2BuLL: goto LABEL_10; case 0x2DuLL: v20 = !v20; LABEL_10: v12 += v18; continue; default: v19 = 0; v13 = 0LL; v10 = v12; v15 = 0xFFFFFFFFFFFFFFFFLL / v23; v14 = 0xFFFFFFFFFFFFFFFFLL % v23; break; } while ( 1 ) { v18 = v16(v26, &v17, v12, v11); if ( v18 <= 0 ) break; v12 += v18; if ( v17 < 0x30 || v17 > 0x39 ) { if ( v17 < 0x41 || v17 > 0x5A ) { if ( v17 < 0x61 || v17 > 0x7A ) goto LABEL_33; v17 = v17 - 97 + 10; } else { v17 = v17 - 65 + 10; } } else { v17 -= 48LL; } if ( (int)v17 >= v23 ) goto LABEL_33; if ( v13 > v15 || v13 == v15 && v17 > v14 ) v19 = 1; else v13 = v13 * v23 + v17; } if ( v18 ) { LABEL_33: if ( v22 ) *v22 = v12; if ( v12 == v10 ) { *v21 = 33; return 0LL; } else { if ( v20 ) { if ( v13 > 0x8000000000000000LL ) v19 = 1; } else if ( v13 > 0x7FFFFFFFFFFFFFFFLL ) { v19 = 1; } if ( v19 ) { *v21 = 34; v7 = 0x7FFFFFFFFFFFFFFFLL; if ( v20 ) return 0x8000000000000000LL; return v7; } else if ( v20 ) { return -(long long)v13; } else { return v13; } } } if ( v22 ) *v22 = v12; *v21 = 84; return 0LL; } } }
my_strntoll_mb2_or_mb4: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 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 dword ptr [RBP + -0x3c],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x0 LAB_001b827a: MOV RAX,qword ptr [RBP + -0x58] MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RBP + -0x80] LEA RSI,[RBP + -0x50] CALL RAX MOV dword ptr [RBP + -0x44],EAX CMP EAX,0x0 JLE 0x001b82e1 MOV RAX,qword ptr [RBP + -0x50] ADD RAX,-0x9 MOV qword ptr [RBP + -0x90],RAX SUB RAX,0x24 JA 0x001b82dd MOV RAX,qword ptr [RBP + -0x90] LEA RCX,[0x3130f8] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_20: JMP 0x001b82df caseD_9: JMP 0x001b82df caseD_2d: CMP dword ptr [RBP + -0x3c],0x0 SETNZ AL XOR AL,0xff AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x3c],EAX JMP 0x001b82df caseD_2b: JMP 0x001b82df caseD_a: JMP 0x001b8338 LAB_001b82df: JMP 0x001b8319 LAB_001b82e1: CMP qword ptr [RBP + -0x30],0x0 JZ 0x001b82f3 MOV RCX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX LAB_001b82f3: MOV EDX,dword ptr [RBP + -0x44] MOV ECX,0x21 MOV EAX,0x54 CMP EDX,0x0 CMOVZ ECX,EAX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],ECX MOV qword ptr [RBP + -0x8],0x0 JMP 0x001b8571 LAB_001b8319: MOV ECX,dword ptr [RBP + -0x44] MOV RAX,qword ptr [RBP + -0x78] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x78],RAX MOV AL,0x1 TEST AL,0x1 JNZ 0x001b827a JMP 0x001b8336 LAB_001b8336: JMP 0x001b8338 LAB_001b8338: MOV dword ptr [RBP + -0x40],0x0 MOV qword ptr [RBP + -0x70],0x0 MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x88],RAX MOVSXD RCX,dword ptr [RBP + -0x24] MOV RAX,-0x1 XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x60],RAX MOVSXD RCX,dword ptr [RBP + -0x24] MOV RAX,-0x1 XOR EDX,EDX DIV RCX MOV EAX,EDX MOV dword ptr [RBP + -0x64],EAX LAB_001b837b: MOV RAX,qword ptr [RBP + -0x58] MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RBP + -0x80] LEA RSI,[RBP + -0x50] CALL RAX MOV dword ptr [RBP + -0x44],EAX CMP EAX,0x0 JLE 0x001b8465 MOV ECX,dword ptr [RBP + -0x44] MOV RAX,qword ptr [RBP + -0x78] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x78],RAX CMP qword ptr [RBP + -0x50],0x30 JC 0x001b83ca CMP qword ptr [RBP + -0x50],0x39 JA 0x001b83ca MOV RAX,qword ptr [RBP + -0x50] SUB RAX,0x30 MOV qword ptr [RBP + -0x50],RAX JMP 0x001b8413 LAB_001b83ca: CMP qword ptr [RBP + -0x50],0x41 JC 0x001b83ea CMP qword ptr [RBP + -0x50],0x5a JA 0x001b83ea MOV RAX,qword ptr [RBP + -0x50] SUB RAX,0x41 ADD RAX,0xa MOV qword ptr [RBP + -0x50],RAX JMP 0x001b8411 LAB_001b83ea: CMP qword ptr [RBP + -0x50],0x61 JC 0x001b840a CMP qword ptr [RBP + -0x50],0x7a JA 0x001b840a MOV RAX,qword ptr [RBP + -0x50] SUB RAX,0x61 ADD RAX,0xa MOV qword ptr [RBP + -0x50],RAX JMP 0x001b840f LAB_001b840a: JMP 0x001b84a4 LAB_001b840f: JMP 0x001b8411 LAB_001b8411: JMP 0x001b8413 LAB_001b8413: MOV RAX,qword ptr [RBP + -0x50] CMP EAX,dword ptr [RBP + -0x24] JL 0x001b8421 JMP 0x001b84a4 LAB_001b8421: MOV RAX,qword ptr [RBP + -0x70] CMP RAX,qword ptr [RBP + -0x60] JA 0x001b8441 MOV RAX,qword ptr [RBP + -0x70] CMP RAX,qword ptr [RBP + -0x60] JNZ 0x001b844a MOV RAX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x64] CMP RAX,RCX JBE 0x001b844a LAB_001b8441: MOV dword ptr [RBP + -0x40],0x1 JMP 0x001b8463 LAB_001b844a: MOVSXD RAX,dword ptr [RBP + -0x24] IMUL RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x50] ADD RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x70],RAX LAB_001b8463: JMP 0x001b8496 LAB_001b8465: CMP dword ptr [RBP + -0x44],0x0 JNZ 0x001b8494 CMP qword ptr [RBP + -0x30],0x0 JZ 0x001b847d MOV RCX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX LAB_001b847d: MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x54 MOV qword ptr [RBP + -0x8],0x0 JMP 0x001b8571 LAB_001b8494: JMP 0x001b84a4 LAB_001b8496: JMP 0x001b8498 LAB_001b8498: MOV AL,0x1 TEST AL,0x1 JNZ 0x001b837b JMP 0x001b84a4 LAB_001b84a4: CMP qword ptr [RBP + -0x30],0x0 JZ 0x001b84b6 MOV RCX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX LAB_001b84b6: MOV RAX,qword ptr [RBP + -0x78] CMP RAX,qword ptr [RBP + -0x88] JNZ 0x001b84da MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x21 MOV qword ptr [RBP + -0x8],0x0 JMP 0x001b8571 LAB_001b84da: CMP dword ptr [RBP + -0x3c],0x0 JZ 0x001b84f9 MOV RAX,-0x8000000000000000 CMP qword ptr [RBP + -0x70],RAX JBE 0x001b84f7 MOV dword ptr [RBP + -0x40],0x1 LAB_001b84f7: JMP 0x001b8512 LAB_001b84f9: MOV RAX,0x7fffffffffffffff CMP qword ptr [RBP + -0x70],RAX JBE 0x001b8510 MOV dword ptr [RBP + -0x40],0x1 LAB_001b8510: JMP 0x001b8512 LAB_001b8512: CMP dword ptr [RBP + -0x40],0x0 JZ 0x001b8546 MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x22 MOV EDX,dword ptr [RBP + -0x3c] MOV RAX,0x7fffffffffffffff MOV RCX,-0x8000000000000000 CMP EDX,0x0 CMOVNZ RAX,RCX MOV qword ptr [RBP + -0x8],RAX JMP 0x001b8571 LAB_001b8546: CMP dword ptr [RBP + -0x3c],0x0 JZ 0x001b855b XOR EAX,EAX SUB RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x98],RAX JMP 0x001b8566 LAB_001b855b: MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x98],RAX LAB_001b8566: MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x8],RAX LAB_001b8571: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0xa0 POP RBP RET
/* WARNING: Removing unreachable block (ram,0x001b8334) */ /* WARNING: Removing unreachable block (ram,0x001b84a2) */ ulong my_strntoll_mb2_or_mb4 (long param_1,long param_2,long param_3,int param_4,long *param_5, int4 *param_6) { code *pcVar1; int1 auVar2 [16]; int1 auVar3 [16]; long lVar4; ulong uVar5; int4 uVar6; ulong local_a0; long local_80; ulong local_78; ulong local_58; int local_4c; int local_48; uint local_44; int4 *local_40; long *local_38; int local_2c; long local_28; long local_20; long local_18; ulong local_10; local_44 = 0; pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); *param_6 = 0; local_80 = param_2; local_40 = param_6; local_38 = param_5; local_2c = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; do { lVar4 = local_80; local_4c = (*pcVar1)(local_18,&local_58,local_80,param_2 + param_3); if (local_4c < 1) { if (local_38 != (long *)0x0) { *local_38 = local_80; } uVar6 = 0x21; if (local_4c == 0) { uVar6 = 0x54; } *local_40 = uVar6; return 0; } switch(local_58) { case 9: break; default: local_48 = 0; local_78 = 0; auVar2._8_8_ = 0; auVar2._0_8_ = (long)local_2c; uVar5 = SUB168((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) / auVar2,0); auVar3._8_8_ = 0; auVar3._0_8_ = (long)local_2c; goto LAB_001b837b; case 0x20: break; case 0x2b: break; case 0x2d: local_44 = (uint)((local_44 != 0 ^ 0xffU) & 1); } local_80 = local_80 + local_4c; } while( true ); LAB_001b837b: local_4c = (*pcVar1)(local_18,&local_58,local_80,param_2 + param_3); if (local_4c < 1) { if (local_4c == 0) { if (local_38 != (long *)0x0) { *local_38 = local_80; } *local_40 = 0x54; local_10 = 0; } else { LAB_001b84a4: if (local_38 != (long *)0x0) { *local_38 = local_80; } if (local_80 == lVar4) { *local_40 = 0x21; local_10 = 0; } else { if (local_44 == 0) { if (0x7fffffffffffffff < local_78) { local_48 = 1; } } else if (0x8000000000000000 < local_78) { local_48 = 1; } if (local_48 == 0) { if (local_44 == 0) { local_a0 = local_78; } else { local_a0 = -local_78; } local_10 = local_a0; } else { *local_40 = 0x22; local_10 = 0x7fffffffffffffff; if (local_44 != 0) { local_10 = 0x8000000000000000; } } } } return local_10; } local_80 = local_80 + local_4c; if ((local_58 < 0x30) || (0x39 < local_58)) { if ((local_58 < 0x41) || (0x5a < local_58)) { if ((local_58 < 0x61) || (0x7a < local_58)) goto LAB_001b84a4; local_58 = local_58 - 0x57; } else { local_58 = local_58 - 0x37; } } else { local_58 = local_58 - 0x30; } if (local_2c <= (int)local_58) goto LAB_001b84a4; if ((uVar5 < local_78) || ((local_78 == uVar5 && (SUB164((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) % auVar3,0) < local_58)))) { local_48 = 1; } else { local_78 = local_58 + (long)local_2c * local_78; } goto LAB_001b837b; }
47,511
testing::internal::PrintTo(char32_t, std::ostream*)
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest-printers.cc
void PrintTo(char32_t c, ::std::ostream* os) { *os << std::hex << "U+" << std::uppercase << std::setfill('0') << std::setw(4) << static_cast<uint32_t>(c); }
O1
cpp
testing::internal::PrintTo(char32_t, std::ostream*): pushq %rbp pushq %r14 pushq %rbx movq %rsi, %rbx movl %edi, %ebp movq (%rsi), %rax movq -0x18(%rax), %rax movl 0x18(%rsi,%rax), %ecx andl $-0x4b, %ecx orl $0x8, %ecx movl %ecx, 0x18(%rsi,%rax) leaq 0x2aa7c(%rip), %rsi # 0x42529 movl $0x2, %edx movq %rbx, %rdi callq 0x85b0 movq (%rbx), %rax movq -0x18(%rax), %rcx orl $0x4000, 0x18(%rbx,%rcx) # imm = 0x4000 movq -0x18(%rax), %rax leaq (%rbx,%rax), %r14 cmpb $0x0, 0xe1(%rbx,%rax) jne 0x17af7 movq %r14, %rdi movl $0x20, %esi callq 0x8490 movb %al, 0xe0(%r14) movb $0x1, 0xe1(%r14) movb $0x30, 0xe0(%r14) movq (%rbx), %rax movq -0x18(%rax), %rax movq $0x4, 0x10(%rbx,%rax) movl %ebp, %esi movq %rbx, %rdi popq %rbx popq %r14 popq %rbp jmp 0x8310
_ZN7testing8internal7PrintToEDiPSo: push rbp push r14 push rbx mov rbx, rsi mov ebp, edi mov rax, [rsi] mov rax, [rax-18h] mov ecx, [rsi+rax+18h] and ecx, 0FFFFFFB5h or ecx, 8 mov [rsi+rax+18h], ecx lea rsi, aU; "U+" mov edx, 2 mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rax, [rbx] mov rcx, [rax-18h] or dword ptr [rbx+rcx+18h], 4000h mov rax, [rax-18h] lea r14, [rbx+rax] cmp byte ptr [rbx+rax+0E1h], 0 jnz short loc_17AF7 mov rdi, r14 mov esi, 20h ; ' ' call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) mov [r14+0E0h], al mov byte ptr [r14+0E1h], 1 loc_17AF7: mov byte ptr [r14+0E0h], 30h ; '0' mov rax, [rbx] mov rax, [rax-18h] mov qword ptr [rbx+rax+10h], 4 mov esi, ebp mov rdi, rbx pop rbx pop r14 pop rbp jmp __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
long long testing::internal::PrintTo(unsigned int a1, _QWORD *a2) { long long v2; // rdx long long v3; // rax long long v4; // rcx long long v5; // rax char *v6; // r14 *(_DWORD *)((char *)a2 + *(_QWORD *)(*a2 - 24LL) + 24) = *(_DWORD *)((_BYTE *)a2 + *(_QWORD *)(*a2 - 24LL) + 24) & 0xFFFFFFB5 | 8; std::__ostream_insert<char,std::char_traits<char>>(a2, "U+", 2LL); v3 = *a2; v4 = *(_QWORD *)(*a2 - 24LL); *(_DWORD *)((char *)a2 + v4 + 24) |= 0x4000u; v5 = *(_QWORD *)(v3 - 24); v6 = (char *)a2 + v5; if ( !*((_BYTE *)a2 + v5 + 225) ) { v6[224] = std::ios::widen((char *)a2 + v5, 32LL, v2, v4); v6[225] = 1; } v6[224] = 48; *(_QWORD *)((char *)a2 + *(_QWORD *)(*a2 - 24LL) + 16) = 4LL; return std::ostream::_M_insert<unsigned long>(a2, a1); }
PrintTo: PUSH RBP PUSH R14 PUSH RBX MOV RBX,RSI MOV EBP,EDI MOV RAX,qword ptr [RSI] MOV RAX,qword ptr [RAX + -0x18] MOV ECX,dword ptr [RSI + RAX*0x1 + 0x18] AND ECX,0xffffffb5 OR ECX,0x8 MOV dword ptr [RSI + RAX*0x1 + 0x18],ECX LEA RSI,[0x142529] MOV EDX,0x2 MOV RDI,RBX CALL 0x001085b0 MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RAX + -0x18] OR dword ptr [RBX + RCX*0x1 + 0x18],0x4000 MOV RAX,qword ptr [RAX + -0x18] LEA R14,[RBX + RAX*0x1] CMP byte ptr [RBX + RAX*0x1 + 0xe1],0x0 JNZ 0x00117af7 MOV RDI,R14 MOV ESI,0x20 CALL 0x00108490 MOV byte ptr [R14 + 0xe0],AL MOV byte ptr [R14 + 0xe1],0x1 LAB_00117af7: MOV byte ptr [R14 + 0xe0],0x30 MOV RAX,qword ptr [RBX] MOV RAX,qword ptr [RAX + -0x18] MOV qword ptr [RBX + RAX*0x1 + 0x10],0x4 MOV ESI,EBP MOV RDI,RBX POP RBX POP R14 POP RBP JMP 0x00108310
/* testing::internal::PrintTo(char32_t, std::ostream*) */ void testing::internal::PrintTo(wchar32 param_1,ostream *param_2) { ostream *poVar1; long lVar2; ostream oVar3; *(uint *)(param_2 + *(long *)(*(long *)param_2 + -0x18) + 0x18) = *(uint *)(param_2 + *(long *)(*(long *)param_2 + -0x18) + 0x18) & 0xffffffb5 | 8; std::__ostream_insert<char,std::char_traits<char>>(param_2,"U+",2); lVar2 = *(long *)param_2; *(uint *)(param_2 + *(long *)(lVar2 + -0x18) + 0x18) = *(uint *)(param_2 + *(long *)(lVar2 + -0x18) + 0x18) | 0x4000; lVar2 = *(long *)(lVar2 + -0x18); poVar1 = param_2 + lVar2; if (param_2[lVar2 + 0xe1] == (ostream)0x0) { oVar3 = (ostream)std::ios::widen((char)poVar1); poVar1[0xe0] = oVar3; poVar1[0xe1] = (ostream)0x1; } poVar1[0xe0] = (ostream)0x30; *(int8 *)(param_2 + *(long *)(*(long *)param_2 + -0x18) + 0x10) = 4; std::ostream::_M_insert<unsigned_long>((ulong)param_2); return; }
47,512
partitioned_key_cache_read
eloqsql/mysys/mf_keycache.c
static uchar *partitioned_key_cache_read(PARTITIONED_KEY_CACHE_CB *keycache, File file, my_off_t filepos, int level, uchar *buff, uint length, uint block_length __attribute__((unused)), int return_buffer __attribute__((unused))) { uint r_length; uint offset= (uint) (filepos % keycache->key_cache_block_size); uchar *start= buff; DBUG_ENTER("partitioned_key_cache_read"); DBUG_PRINT("enter", ("fd: %u pos: %lu length: %u", (uint) file, (ulong) filepos, length)); /* Read data in key_cache_block_size increments */ do { SIMPLE_KEY_CACHE_CB *partition= get_key_cache_partition(keycache, file, filepos); uchar *ret_buff= 0; r_length= length; set_if_smaller(r_length, keycache->key_cache_block_size - offset); ret_buff= simple_key_cache_read((void *) partition, file, filepos, level, buff, r_length, block_length, return_buffer); if (ret_buff == 0) DBUG_RETURN(0); filepos+= r_length; buff+= r_length; offset= 0; } while ((length-= r_length)); DBUG_RETURN(start); }
O0
c
partitioned_key_cache_read: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movl 0x18(%rbp), %eax movl 0x10(%rbp), %eax movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq %r8, -0x30(%rbp) movl %r9d, -0x34(%rbp) movq -0x20(%rbp), %rax movq -0x10(%rbp), %rcx movl 0x18(%rcx), %ecx xorl %edx, %edx divq %rcx movl %edx, %eax movl %eax, -0x3c(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x48(%rbp) jmp 0xe94a3 jmp 0xe94a5 movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi movq -0x20(%rbp), %rdx callq 0xe9ae0 movq %rax, -0x50(%rbp) movq $0x0, -0x58(%rbp) movl -0x34(%rbp), %eax movl %eax, -0x38(%rbp) movl -0x38(%rbp), %eax movq -0x10(%rbp), %rcx movl 0x18(%rcx), %ecx subl -0x3c(%rbp), %ecx cmpl %ecx, %eax jbe 0xe94e5 movq -0x10(%rbp), %rax movl 0x18(%rax), %eax subl -0x3c(%rbp), %eax movl %eax, -0x38(%rbp) jmp 0xe94e7 movq -0x50(%rbp), %rdi movl -0x14(%rbp), %esi movq -0x20(%rbp), %rdx movl -0x24(%rbp), %ecx movq -0x30(%rbp), %r8 movl -0x38(%rbp), %r9d movl 0x10(%rbp), %r10d movl 0x18(%rbp), %eax movl %r10d, (%rsp) movl %eax, 0x8(%rsp) callq 0xe4590 movq %rax, -0x58(%rbp) cmpq $0x0, -0x58(%rbp) jne 0xe9528 jmp 0xe951e movq $0x0, -0x8(%rbp) jmp 0xe9568 movl -0x38(%rbp), %eax addq -0x20(%rbp), %rax movq %rax, -0x20(%rbp) movl -0x38(%rbp), %ecx movq -0x30(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x30(%rbp) movl $0x0, -0x3c(%rbp) movl -0x38(%rbp), %ecx movl -0x34(%rbp), %eax subl %ecx, %eax movl %eax, -0x34(%rbp) cmpl $0x0, %eax jne 0xe94a5 jmp 0xe9560 movq -0x48(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x70, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
partitioned_key_cache_read: push rbp mov rbp, rsp sub rsp, 70h mov eax, [rbp+arg_8] mov eax, [rbp+arg_0] mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov [rbp+var_30], r8 mov [rbp+var_34], r9d mov rax, [rbp+var_20] mov rcx, [rbp+var_10] mov ecx, [rcx+18h] xor edx, edx div rcx mov eax, edx mov [rbp+var_3C], eax mov rax, [rbp+var_30] mov [rbp+var_48], rax jmp short $+2 loc_E94A3: jmp short $+2 loc_E94A5: mov rdi, [rbp+var_10] mov esi, [rbp+var_14] mov rdx, [rbp+var_20] call get_key_cache_partition mov [rbp+var_50], rax mov [rbp+var_58], 0 mov eax, [rbp+var_34] mov [rbp+var_38], eax mov eax, [rbp+var_38] mov rcx, [rbp+var_10] mov ecx, [rcx+18h] sub ecx, [rbp+var_3C] cmp eax, ecx jbe short loc_E94E5 mov rax, [rbp+var_10] mov eax, [rax+18h] sub eax, [rbp+var_3C] mov [rbp+var_38], eax loc_E94E5: jmp short $+2 loc_E94E7: mov rdi, [rbp+var_50] mov esi, [rbp+var_14] mov rdx, [rbp+var_20] mov ecx, [rbp+var_24] mov r8, [rbp+var_30] mov r9d, [rbp+var_38] mov r10d, [rbp+arg_0] mov eax, [rbp+arg_8] mov [rsp+70h+var_70], r10d mov [rsp+70h+var_68], eax call simple_key_cache_read mov [rbp+var_58], rax cmp [rbp+var_58], 0 jnz short loc_E9528 jmp short $+2 loc_E951E: mov [rbp+var_8], 0 jmp short loc_E9568 loc_E9528: mov eax, [rbp+var_38] add rax, [rbp+var_20] mov [rbp+var_20], rax mov ecx, [rbp+var_38] mov rax, [rbp+var_30] mov ecx, ecx add rax, rcx mov [rbp+var_30], rax mov [rbp+var_3C], 0 mov ecx, [rbp+var_38] mov eax, [rbp+var_34] sub eax, ecx mov [rbp+var_34], eax cmp eax, 0 jnz loc_E94A5 jmp short $+2 loc_E9560: mov rax, [rbp+var_48] mov [rbp+var_8], rax loc_E9568: mov rax, [rbp+var_8] add rsp, 70h pop rbp retn
long long partitioned_key_cache_read( long long a1, unsigned int a2, unsigned long long a3, unsigned int a4, long long a5, unsigned int a6) { _BYTE *key_cache_partition; // [rsp+20h] [rbp-50h] int v9; // [rsp+34h] [rbp-3Ch] unsigned int v10; // [rsp+38h] [rbp-38h] long long v12; // [rsp+40h] [rbp-30h] unsigned long long v14; // [rsp+50h] [rbp-20h] v14 = a3; v12 = a5; v9 = a3 % *(unsigned int *)(a1 + 24); do { key_cache_partition = (_BYTE *)get_key_cache_partition(a1, a2, v14); v10 = a6; if ( a6 > *(_DWORD *)(a1 + 24) - v9 ) v10 = *(_DWORD *)(a1 + 24) - v9; if ( !simple_key_cache_read(key_cache_partition, a2, v14, a4, v12, v10) ) return 0LL; v14 += v10; v12 += v10; v9 = 0; a6 -= v10; } while ( a6 ); return a5; }
partitioned_key_cache_read: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV EAX,dword ptr [RBP + 0x18] MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV qword ptr [RBP + -0x30],R8 MOV dword ptr [RBP + -0x34],R9D MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x18] XOR EDX,EDX DIV RCX MOV EAX,EDX MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x48],RAX JMP 0x001e94a3 LAB_001e94a3: JMP 0x001e94a5 LAB_001e94a5: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] MOV RDX,qword ptr [RBP + -0x20] CALL 0x001e9ae0 MOV qword ptr [RBP + -0x50],RAX MOV qword ptr [RBP + -0x58],0x0 MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x38],EAX MOV EAX,dword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x18] SUB ECX,dword ptr [RBP + -0x3c] CMP EAX,ECX JBE 0x001e94e5 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x18] SUB EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x38],EAX LAB_001e94e5: JMP 0x001e94e7 LAB_001e94e7: MOV RDI,qword ptr [RBP + -0x50] MOV ESI,dword ptr [RBP + -0x14] MOV RDX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x24] MOV R8,qword ptr [RBP + -0x30] MOV R9D,dword ptr [RBP + -0x38] MOV R10D,dword ptr [RBP + 0x10] MOV EAX,dword ptr [RBP + 0x18] MOV dword ptr [RSP],R10D MOV dword ptr [RSP + 0x8],EAX CALL 0x001e4590 MOV qword ptr [RBP + -0x58],RAX CMP qword ptr [RBP + -0x58],0x0 JNZ 0x001e9528 JMP 0x001e951e LAB_001e951e: MOV qword ptr [RBP + -0x8],0x0 JMP 0x001e9568 LAB_001e9528: MOV EAX,dword ptr [RBP + -0x38] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x20],RAX MOV ECX,dword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x30] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV dword ptr [RBP + -0x3c],0x0 MOV ECX,dword ptr [RBP + -0x38] MOV EAX,dword ptr [RBP + -0x34] SUB EAX,ECX MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JNZ 0x001e94a5 JMP 0x001e9560 LAB_001e9560: MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x8],RAX LAB_001e9568: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x70 POP RBP RET
long partitioned_key_cache_read (long param_1,int4 param_2,ulong param_3,int4 param_4,long param_5, uint param_6,int4 param_7,int4 param_8) { int8 uVar1; long lVar2; int local_44; uint local_40; uint local_3c; long local_38; ulong local_28; local_44 = (int)(param_3 % (ulong)*(uint *)(param_1 + 0x18)); local_3c = param_6; local_38 = param_5; local_28 = param_3; while( true ) { uVar1 = get_key_cache_partition(param_1,param_2,local_28); local_40 = local_3c; if ((uint)(*(int *)(param_1 + 0x18) - local_44) < local_3c) { local_40 = *(int *)(param_1 + 0x18) - local_44; } lVar2 = simple_key_cache_read(uVar1,param_2,local_28,param_4,local_38,local_40,param_7,param_8); if (lVar2 == 0) break; local_28 = local_40 + local_28; local_38 = local_38 + (ulong)local_40; local_44 = 0; local_3c = local_3c - local_40; if (local_3c == 0) { return param_5; } } return 0; }
47,513
my_hash_next
eloqsql/mysys/hash.c
uchar* my_hash_next(const HASH *hash, const uchar *key, size_t length, HASH_SEARCH_STATE *current_record) { HASH_LINK *pos; uint idx; if (*current_record != NO_RECORD) { HASH_LINK *data=dynamic_element(&hash->array,0,HASH_LINK*); for (idx=data[*current_record].next; idx != NO_RECORD ; idx=pos->next) { pos=data+idx; if (!hashcmp(hash,pos,key,length)) { *current_record= idx; return pos->data; } } *current_record= NO_RECORD; } return 0; }
O0
c
my_hash_next: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x28(%rbp), %rax cmpl $-0x1, (%rax) je 0xe26b7 movq -0x10(%rbp), %rax movq 0x28(%rax), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq -0x28(%rbp), %rcx movl (%rcx), %ecx shlq $0x4, %rcx addq %rcx, %rax movl (%rax), %eax movl %eax, -0x34(%rbp) cmpl $-0x1, -0x34(%rbp) je 0xe26ad movq -0x40(%rbp), %rax movl -0x34(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx callq 0xe2540 cmpl $0x0, %eax jne 0xe26a0 movl -0x34(%rbp), %ecx movq -0x28(%rbp), %rax movl %ecx, (%rax) movq -0x30(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x8(%rbp) jmp 0xe26bf jmp 0xe26a2 movq -0x30(%rbp), %rax movl (%rax), %eax movl %eax, -0x34(%rbp) jmp 0xe2657 movq -0x28(%rbp), %rax movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopl (%rax)
my_hash_next: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_28] cmp dword ptr [rax], 0FFFFFFFFh jz loc_E26B7 mov rax, [rbp+var_10] mov rax, [rax+28h] mov [rbp+var_40], rax mov rax, [rbp+var_40] mov rcx, [rbp+var_28] mov ecx, [rcx] shl rcx, 4 add rax, rcx mov eax, [rax] mov [rbp+var_34], eax loc_E2657: cmp [rbp+var_34], 0FFFFFFFFh jz short loc_E26AD mov rax, [rbp+var_40] mov ecx, [rbp+var_34] shl rcx, 4 add rax, rcx mov [rbp+var_30], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_30] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] call hashcmp cmp eax, 0 jnz short loc_E26A0 mov ecx, [rbp+var_34] mov rax, [rbp+var_28] mov [rax], ecx mov rax, [rbp+var_30] mov rax, [rax+8] mov [rbp+var_8], rax jmp short loc_E26BF loc_E26A0: jmp short $+2 loc_E26A2: mov rax, [rbp+var_30] mov eax, [rax] mov [rbp+var_34], eax jmp short loc_E2657 loc_E26AD: mov rax, [rbp+var_28] mov dword ptr [rax], 0FFFFFFFFh loc_E26B7: mov [rbp+var_8], 0 loc_E26BF: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long my_hash_next(long long a1, long long a2, long long a3, unsigned int *a4) { long long v5; // [rsp+0h] [rbp-40h] unsigned int i; // [rsp+Ch] [rbp-34h] long long v7; // [rsp+10h] [rbp-30h] if ( *a4 != -1 ) { v5 = *(_QWORD *)(a1 + 40); for ( i = *(_DWORD *)(16LL * *a4 + v5); i != -1; i = *(_DWORD *)v7 ) { v7 = 16LL * i + v5; if ( !hashcmp(a1, v7, a2, a3) ) { *a4 = i; return *(_QWORD *)(v7 + 8); } } *a4 = -1; } return 0LL; }
my_hash_next: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x28] CMP dword ptr [RAX],-0x1 JZ 0x001e26b7 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RCX] SHL RCX,0x4 ADD RAX,RCX MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x34],EAX LAB_001e2657: CMP dword ptr [RBP + -0x34],-0x1 JZ 0x001e26ad MOV RAX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RBP + -0x34] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] CALL 0x001e2540 CMP EAX,0x0 JNZ 0x001e26a0 MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x8],RAX JMP 0x001e26bf LAB_001e26a0: JMP 0x001e26a2 LAB_001e26a2: MOV RAX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x34],EAX JMP 0x001e2657 LAB_001e26ad: MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX],0xffffffff LAB_001e26b7: MOV qword ptr [RBP + -0x8],0x0 LAB_001e26bf: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
int8 my_hash_next(long param_1,int8 param_2,int8 param_3,uint *param_4) { long lVar1; int iVar2; uint *puVar3; uint local_3c; if (*param_4 != 0xffffffff) { lVar1 = *(long *)(param_1 + 0x28); local_3c = *(uint *)(lVar1 + (ulong)*param_4 * 0x10); while (local_3c != 0xffffffff) { puVar3 = (uint *)(lVar1 + (ulong)local_3c * 0x10); iVar2 = hashcmp(param_1,puVar3,param_2,param_3); if (iVar2 == 0) { *param_4 = local_3c; return *(int8 *)(puVar3 + 2); } local_3c = *puVar3; } *param_4 = 0xffffffff; } return 0; }
47,514
fill_quick_table
eloqsql/storage/myisam/mi_packrec.c
static void fill_quick_table(uint16 *table, uint bits, uint max_bits, uint value) { uint16 *end; DBUG_ENTER("fill_quick_table"); /* Bits 1..8 of value represent the decoded byte value. Bits 9..14 become the length of the Huffman code for this byte value. Bit 16 flags a valid code (IS_CHAR). */ value|= (max_bits - bits) << 8 | IS_CHAR; for (end= table + ((my_ptrdiff_t) 1 << bits); table < end; table++) { *table= (uint16) value; } DBUG_VOID_RETURN; }
O0
c
fill_quick_table: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) movl %ecx, -0x14(%rbp) movl -0x10(%rbp), %eax subl -0xc(%rbp), %eax shll $0x8, %eax orl $0x8000, %eax # imm = 0x8000 orl -0x14(%rbp), %eax movl %eax, -0x14(%rbp) movq -0x8(%rbp), %rax movl -0xc(%rbp), %ecx movl $0x1, %edx shlq %cl, %rdx movq %rdx, %rcx shlq %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0xc1746 movl -0x14(%rbp), %eax movw %ax, %cx movq -0x8(%rbp), %rax movw %cx, (%rax) movq -0x8(%rbp), %rax addq $0x2, %rax movq %rax, -0x8(%rbp) jmp 0xc1721 jmp 0xc1748 jmp 0xc174a popq %rbp retq nopl (%rax)
fill_quick_table_0: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx mov [rbp+var_14], ecx mov eax, [rbp+var_10] sub eax, [rbp+var_C] shl eax, 8 or eax, 8000h or eax, [rbp+var_14] mov [rbp+var_14], eax mov rax, [rbp+var_8] mov ecx, [rbp+var_C] mov edx, 1 shl rdx, cl mov rcx, rdx shl rcx, 1 add rax, rcx mov [rbp+var_20], rax loc_C1721: mov rax, [rbp+var_8] cmp rax, [rbp+var_20] jnb short loc_C1746 mov eax, [rbp+var_14] mov cx, ax mov rax, [rbp+var_8] mov [rax], cx mov rax, [rbp+var_8] add rax, 2 mov [rbp+var_8], rax jmp short loc_C1721 loc_C1746: jmp short $+2 loc_C1748: jmp short $+2 loc_C174A: pop rbp retn
_WORD * fill_quick_table_0(_WORD *a1, __int16 a2, __int16 a3, __int16 a4) { _WORD *result; // rax _WORD *i; // [rsp+18h] [rbp-8h] for ( i = a1; ; ++i ) { result = i; if ( i >= &a1[1LL << a2] ) break; *i = a4 | ((a3 - a2) << 8) | 0x8000; } return result; }
fill_quick_table: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX MOV dword ptr [RBP + -0x14],ECX MOV EAX,dword ptr [RBP + -0x10] SUB EAX,dword ptr [RBP + -0xc] SHL EAX,0x8 OR EAX,0x8000 OR EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x14],EAX MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0xc] MOV EDX,0x1 SHL RDX,CL MOV RCX,RDX SHL RCX,0x1 ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX LAB_001c1721: MOV RAX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RBP + -0x20] JNC 0x001c1746 MOV EAX,dword ptr [RBP + -0x14] MOV CX,AX MOV RAX,qword ptr [RBP + -0x8] MOV word ptr [RAX],CX MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x2 MOV qword ptr [RBP + -0x8],RAX JMP 0x001c1721 LAB_001c1746: JMP 0x001c1748 LAB_001c1748: JMP 0x001c174a LAB_001c174a: POP RBP RET
void fill_quick_table(ushort *param_1,short param_2,short param_3,ushort param_4) { ushort *local_10; for (local_10 = param_1; local_10 < param_1 + (1L << ((byte)param_2 & 0x3f)); local_10 = local_10 + 1) { *local_10 = (param_3 - param_2) * 0x100 | 0x8000U | param_4; } return; }
47,515
LefDefParser::lefwLayerRoutingDiagSpacing(double)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwLayerRoutingDiagSpacing(double diagSpacing) { if (!lefwFile) return LEFW_UNINITIALIZED; if (lefwState != LEFW_LAYERROUTING_START && lefwState != LEFW_LAYERROUTING) return LEFW_BAD_ORDER; if (!lefwIsRouting) return LEFW_BAD_DATA; // only routing calls this func if (prtSemiColon) { // the previous statement hasn't written the ; yet if (lefwWriteEncrypt) encPrint(lefwFile, (char*) ";\n"); else fprintf(lefwFile, ";\n"); prtSemiColon = 0; } // this routine should call only once per layer routing // it is required for SE only, other is optional if (lefwWriteEncrypt) encPrint(lefwFile, (char*) " DIAGSPACING %.11g ;\n", diagSpacing); else fprintf(lefwFile, " DIAGSPACING %.11g ;\n", diagSpacing); lefwLines++; return LEFW_OK; }
O3
cpp
LefDefParser::lefwLayerRoutingDiagSpacing(double): pushq %rbx subq $0x10, %rsp leaq 0x7a67c(%rip), %rbx # 0x8d0f0 movq (%rbx), %rcx testq %rcx, %rcx je 0x12acf leaq 0x7a8bd(%rip), %rax # 0x8d340 movl (%rax), %edx cmpl $0x1f, %edx je 0x12a98 movl $0x2, %eax cmpl $0x7, %edx jne 0x12b35 leaq 0x7a915(%rip), %rax # 0x8d3b4 cmpl $0x0, (%rax) je 0x12ad6 cmpb $0x1, 0x7a939(%rip) # 0x8d3e4 jne 0x12b00 movsd %xmm0, 0x8(%rsp) cmpb $0x1, 0x7a922(%rip) # 0x8d3dc jne 0x12add leaq 0x47d3e(%rip), %rsi # 0x5a801 movq %rcx, %rdi xorl %eax, %eax callq 0x55afd jmp 0x12af3 movl $0x1, %eax jmp 0x12b35 movl $0x3, %eax jmp 0x12b35 leaq 0x47d1d(%rip), %rdi # 0x5a801 movl $0x2, %esi movl $0x1, %edx callq 0x23d0 movb $0x0, 0x7a8ea(%rip) # 0x8d3e4 movsd 0x8(%rsp), %xmm0 movq (%rbx), %rdi cmpb $0x1, 0x7a8d2(%rip) # 0x8d3dc jne 0x12b1c leaq 0x48162(%rip), %rsi # 0x5ac75 movb $0x1, %al callq 0x55afd jmp 0x12b2a leaq 0x48152(%rip), %rsi # 0x5ac75 movb $0x1, %al callq 0x22e0 leaq 0x7a80b(%rip), %rax # 0x8d33c incl (%rax) xorl %eax, %eax addq $0x10, %rsp popq %rbx retq
_ZN12LefDefParser27lefwLayerRoutingDiagSpacingEd: push rbx sub rsp, 10h lea rbx, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rcx, [rbx] test rcx, rcx jz short loc_12ACF lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov edx, [rax] cmp edx, 1Fh jz short loc_12A98 mov eax, 2 cmp edx, 7 jnz loc_12B35 loc_12A98: lea rax, _ZN12LefDefParser13lefwIsRoutingE; LefDefParser::lefwIsRouting cmp dword ptr [rax], 0 jz short loc_12AD6 cmp cs:_ZN12LefDefParserL12prtSemiColonE, 1; LefDefParser::prtSemiColon jnz short loc_12B00 movsd [rsp+18h+var_10], xmm0 cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt jnz short loc_12ADD lea rsi, aDividercharS+11h; ";\n" mov rdi, rcx xor eax, eax call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_12AF3 loc_12ACF: mov eax, 1 jmp short loc_12B35 loc_12AD6: mov eax, 3 jmp short loc_12B35 loc_12ADD: lea rdi, aDividercharS+11h; ";\n" mov esi, 2 mov edx, 1 call _fwrite loc_12AF3: mov cs:_ZN12LefDefParserL12prtSemiColonE, 0; LefDefParser::prtSemiColon movsd xmm0, [rsp+18h+var_10] loc_12B00: mov rdi, [rbx] cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt jnz short loc_12B1C lea rsi, aDiagspacing11g; " DIAGSPACING %.11g ;\n" mov al, 1 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_12B2A loc_12B1C: lea rsi, aDiagspacing11g; " DIAGSPACING %.11g ;\n" mov al, 1 call _fprintf loc_12B2A: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines inc dword ptr [rax] xor eax, eax loc_12B35: add rsp, 10h pop rbx retn
long long LefDefParser::lefwLayerRoutingDiagSpacing( LefDefParser *this, double a2, long long a3, long long a4, long long a5, int a6, int a7) { int v7; // ecx unsigned int v8; // edx long long result; // rax v7 = LefDefParser::lefwFile; if ( !*(_QWORD *)&LefDefParser::lefwFile ) return 1LL; v8 = LefDefParser::lefwState; if ( LefDefParser::lefwState == 31 || (result = 2LL, LefDefParser::lefwState == 7) ) { if ( LefDefParser::lefwIsRouting ) { if ( LefDefParser::prtSemiColon == 1 ) { if ( LefDefParser::lefwWriteEncrypt == 1 ) LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)";\n", LefDefParser::lefwState, LefDefParser::lefwFile, a6, a7); else fwrite(";\n", 2LL, 1LL, *(_QWORD *)&LefDefParser::lefwFile); LefDefParser::prtSemiColon = 0; } if ( LefDefParser::lefwWriteEncrypt == 1 ) LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)" DIAGSPACING %.11g ;\n", v8, v7, a6, a7); else fprintf(*(_QWORD *)&LefDefParser::lefwFile, " DIAGSPACING %.11g ;\n", a2); ++LefDefParser::lefwLines; return 0LL; } else { return 3LL; } } return result; }
lefwLayerRoutingDiagSpacing: PUSH RBX SUB RSP,0x10 LEA RBX,[0x18d0f0] MOV RCX,qword ptr [RBX] TEST RCX,RCX JZ 0x00112acf LEA RAX,[0x18d340] MOV EDX,dword ptr [RAX] CMP EDX,0x1f JZ 0x00112a98 MOV EAX,0x2 CMP EDX,0x7 JNZ 0x00112b35 LAB_00112a98: LEA RAX,[0x18d3b4] CMP dword ptr [RAX],0x0 JZ 0x00112ad6 CMP byte ptr [0x0018d3e4],0x1 JNZ 0x00112b00 MOVSD qword ptr [RSP + 0x8],XMM0 CMP byte ptr [0x0018d3dc],0x1 JNZ 0x00112add LEA RSI,[0x15a801] MOV RDI,RCX XOR EAX,EAX CALL 0x00155afd JMP 0x00112af3 LAB_00112acf: MOV EAX,0x1 JMP 0x00112b35 LAB_00112ad6: MOV EAX,0x3 JMP 0x00112b35 LAB_00112add: LEA RDI,[0x15a801] MOV ESI,0x2 MOV EDX,0x1 CALL 0x001023d0 LAB_00112af3: MOV byte ptr [0x0018d3e4],0x0 MOVSD XMM0,qword ptr [RSP + 0x8] LAB_00112b00: MOV RDI,qword ptr [RBX] CMP byte ptr [0x0018d3dc],0x1 JNZ 0x00112b1c LEA RSI,[0x15ac75] MOV AL,0x1 CALL 0x00155afd JMP 0x00112b2a LAB_00112b1c: LEA RSI,[0x15ac75] MOV AL,0x1 CALL 0x001022e0 LAB_00112b2a: LEA RAX,[0x18d33c] INC dword ptr [RAX] XOR EAX,EAX LAB_00112b35: ADD RSP,0x10 POP RBX RET
/* LefDefParser::lefwLayerRoutingDiagSpacing(double) */ int8 LefDefParser::lefwLayerRoutingDiagSpacing(double param_1) { int8 uVar1; if (lefwFile == (_IO_FILE *)0x0) { uVar1 = 1; } else if ((lefwState == 0x1f) || (uVar1 = 2, lefwState == 7)) { if (lefwIsRouting == 0) { uVar1 = 3; } else { if (prtSemiColon == '\x01') { if (lefwWriteEncrypt == '\x01') { encPrint(lefwFile,";\n"); } else { fwrite(";\n",2,1,lefwFile); } prtSemiColon = '\0'; } if (lefwWriteEncrypt == '\x01') { encPrint(lefwFile," DIAGSPACING %.11g ;\n"); } else { fprintf(lefwFile," DIAGSPACING %.11g ;\n",param_1); } lefwLines = lefwLines + 1; uVar1 = 0; } } return uVar1; }
47,516
js_aggregate_error_constructor
bluesky950520[P]quickjs/quickjs.c
static JSValue js_aggregate_error_constructor(JSContext *ctx, JSValue errors) { JSValue obj; obj = JS_NewObjectProtoClass(ctx, ctx->native_error_proto[JS_AGGREGATE_ERROR], JS_CLASS_ERROR); if (JS_IsException(obj)) return obj; JS_DefinePropertyValue(ctx, obj, JS_ATOM_errors, js_dup(errors), JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE); return obj; }
O2
c
js_aggregate_error_constructor: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movq 0x108(%rdi), %rsi movq 0x110(%rdi), %rdx pushq $0x3 popq %rcx callq 0x1b069 movq %rax, %r12 movq %rdx, %r13 cmpl $0x6, %r13d je 0x48cbf cmpl $-0x9, %ebx jb 0x48ca1 incl (%r14) movl $0x3, (%rsp) pushq $0x35 popq %rcx movq %r15, %rdi movq %r12, %rsi movq %r13, %rdx movq %r14, %r8 movq %rbx, %r9 callq 0x20872 movq %r12, %rax movq %r13, %rdx addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
js_aggregate_error_constructor: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov rbx, rdx mov r14, rsi mov r15, rdi mov rsi, [rdi+108h] mov rdx, [rdi+110h] push 3 pop rcx call JS_NewObjectProtoClass mov r12, rax mov r13, rdx cmp r13d, 6 jz short loc_48CBF cmp ebx, 0FFFFFFF7h jb short loc_48CA1 inc dword ptr [r14] loc_48CA1: mov [rsp+38h+var_38], 3 push 35h ; '5' pop rcx mov rdi, r15 mov rsi, r12 mov rdx, r13 mov r8, r14 mov r9, rbx call JS_DefinePropertyValue loc_48CBF: mov rax, r12 mov rdx, r13 add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long js_aggregate_error_constructor( long long a1, _DWORD *a2, long long a3, double a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { long long v12; // rax long long v13; // rdx __m128 v14; // xmm4 __m128 v15; // xmm5 long long v16; // r12 v12 = JS_NewObjectProtoClass(a1, *(_QWORD *)(a1 + 264), *(_QWORD *)(a1 + 272), 3u); v16 = v12; if ( (_DWORD)v13 != 6 ) { if ( (unsigned int)a3 >= 0xFFFFFFF7 ) ++*a2; JS_DefinePropertyValue(a1, v12, v13, 53LL, a2, a3, a4, a5, a6, a7, v14, v15, a10, a11, 3); } return v16; }
js_aggregate_error_constructor: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV RBX,RDX MOV R14,RSI MOV R15,RDI MOV RSI,qword ptr [RDI + 0x108] MOV RDX,qword ptr [RDI + 0x110] PUSH 0x3 POP RCX CALL 0x0011b069 MOV R12,RAX MOV R13,RDX CMP R13D,0x6 JZ 0x00148cbf CMP EBX,-0x9 JC 0x00148ca1 INC dword ptr [R14] LAB_00148ca1: MOV dword ptr [RSP],0x3 PUSH 0x35 POP RCX MOV RDI,R15 MOV RSI,R12 MOV RDX,R13 MOV R8,R14 MOV R9,RBX CALL 0x00120872 LAB_00148cbf: MOV RAX,R12 MOV RDX,R13 ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET
int1 [16] js_aggregate_error_constructor(long param_1,int *param_2,int8 param_3) { int1 auVar1 [16]; auVar1 = JS_NewObjectProtoClass (param_1,*(int8 *)(param_1 + 0x108),*(int8 *)(param_1 + 0x110),3); if (auVar1._8_4_ != 6) { if (0xfffffff6 < (uint)param_3) { *param_2 = *param_2 + 1; } JS_DefinePropertyValue(param_1,auVar1._0_8_,auVar1._8_8_,0x35,param_2,param_3,3); } return auVar1; }
47,517
my_next_large_page_size
eloqsql/mysys/my_largepage.c
static size_t my_next_large_page_size(size_t sz, int *start) { DBUG_ENTER("my_next_large_page_size"); while (*start < my_large_page_sizes_length && my_large_page_sizes[*start] > 0) { size_t cur= *start; (*start)++; if (my_large_page_sizes[cur] <= sz) { DBUG_RETURN(my_large_page_sizes[cur]); } } DBUG_RETURN(0); }
O0
c
my_next_large_page_size: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x18(%rbp), %rcx xorl %eax, %eax cmpl $0x8, (%rcx) movb %al, -0x21(%rbp) jge 0x8d813 movq -0x18(%rbp), %rax movslq (%rax), %rcx leaq 0x372fe8(%rip), %rax # 0x4007f0 cmpq $0x0, (%rax,%rcx,8) seta %al movb %al, -0x21(%rbp) movb -0x21(%rbp), %al testb $0x1, %al jne 0x8d81c jmp 0x8d860 movq -0x18(%rbp), %rax movslq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movl (%rax), %ecx addl $0x1, %ecx movl %ecx, (%rax) movq -0x20(%rbp), %rcx leaq 0x372fb3(%rip), %rax # 0x4007f0 movq (%rax,%rcx,8), %rax cmpq -0x10(%rbp), %rax ja 0x8d85e jmp 0x8d849 movq -0x20(%rbp), %rcx leaq 0x372f9c(%rip), %rax # 0x4007f0 movq (%rax,%rcx,8), %rax movq %rax, -0x8(%rbp) jmp 0x8d86a jmp 0x8d7ec jmp 0x8d862 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq
my_next_large_page_size: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi loc_8D7EC: mov rcx, [rbp+var_18] xor eax, eax cmp dword ptr [rcx], 8 mov [rbp+var_21], al jge short loc_8D813 mov rax, [rbp+var_18] movsxd rcx, dword ptr [rax] lea rax, my_large_page_sizes cmp qword ptr [rax+rcx*8], 0 setnbe al mov [rbp+var_21], al loc_8D813: mov al, [rbp+var_21] test al, 1 jnz short loc_8D81C jmp short loc_8D860 loc_8D81C: mov rax, [rbp+var_18] movsxd rax, dword ptr [rax] mov [rbp+var_20], rax mov rax, [rbp+var_18] mov ecx, [rax] add ecx, 1 mov [rax], ecx mov rcx, [rbp+var_20] lea rax, my_large_page_sizes mov rax, [rax+rcx*8] cmp rax, [rbp+var_10] ja short loc_8D85E jmp short $+2 loc_8D849: mov rcx, [rbp+var_20] lea rax, my_large_page_sizes mov rax, [rax+rcx*8] mov [rbp+var_8], rax jmp short loc_8D86A loc_8D85E: jmp short loc_8D7EC loc_8D860: jmp short $+2 loc_8D862: mov [rbp+var_8], 0 loc_8D86A: mov rax, [rbp+var_8] pop rbp retn
long long my_next_large_page_size(unsigned long long a1, int *a2) { bool v3; // [rsp+1h] [rbp-21h] long long v4; // [rsp+2h] [rbp-20h] while ( 1 ) { v3 = 0; if ( *a2 < 8 ) v3 = my_large_page_sizes[*a2] != 0LL; if ( !v3 ) break; v4 = (*a2)++; if ( my_large_page_sizes[v4] <= a1 ) return my_large_page_sizes[v4]; } return 0LL; }
my_next_large_page_size: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI LAB_0018d7ec: MOV RCX,qword ptr [RBP + -0x18] XOR EAX,EAX CMP dword ptr [RCX],0x8 MOV byte ptr [RBP + -0x21],AL JGE 0x0018d813 MOV RAX,qword ptr [RBP + -0x18] MOVSXD RCX,dword ptr [RAX] LEA RAX,[0x5007f0] CMP qword ptr [RAX + RCX*0x8],0x0 SETA AL MOV byte ptr [RBP + -0x21],AL LAB_0018d813: MOV AL,byte ptr [RBP + -0x21] TEST AL,0x1 JNZ 0x0018d81c JMP 0x0018d860 LAB_0018d81c: MOV RAX,qword ptr [RBP + -0x18] MOVSXD RAX,dword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RAX] ADD ECX,0x1 MOV dword ptr [RAX],ECX MOV RCX,qword ptr [RBP + -0x20] LEA RAX,[0x5007f0] MOV RAX,qword ptr [RAX + RCX*0x8] CMP RAX,qword ptr [RBP + -0x10] JA 0x0018d85e JMP 0x0018d849 LAB_0018d849: MOV RCX,qword ptr [RBP + -0x20] LEA RAX,[0x5007f0] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x8],RAX JMP 0x0018d86a LAB_0018d85e: JMP 0x0018d7ec LAB_0018d860: JMP 0x0018d862 LAB_0018d862: MOV qword ptr [RBP + -0x8],0x0 LAB_0018d86a: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
int8 my_next_large_page_size(ulong param_1,int *param_2) { int iVar1; bool bVar2; while( true ) { bVar2 = false; if (*param_2 < 8) { bVar2 = *(long *)(my_large_page_sizes + (long)*param_2 * 8) != 0; } if (!bVar2) break; iVar1 = *param_2; *param_2 = *param_2 + 1; if (*(ulong *)(my_large_page_sizes + (long)iVar1 * 8) <= param_1) { return *(int8 *)(my_large_page_sizes + (long)iVar1 * 8); } } return 0; }
47,518
my_strnxfrm_unicode_full_nopad_bin
eloqsql/strings/ctype-utf8.c
size_t my_strnxfrm_unicode_full_nopad_bin(CHARSET_INFO *cs, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags) { uchar *dst0= dst; uchar *de= dst + dstlen; dst+= my_strnxfrm_unicode_full_bin_internal(cs, dst, de, &nweights, src, src + srclen); DBUG_ASSERT(dst <= de); /* Safety */ if (dst < de && nweights && (flags & MY_STRXFRM_PAD_WITH_SPACE)) { size_t len= de - dst; set_if_smaller(len, nweights * 3); memset(dst, 0x00, len); dst+= len; } my_strxfrm_desc_and_reverse(dst0, dst, flags, 0); if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && dst < de) { memset(dst, 0x00, de - dst); dst= de; } return dst - dst0; }
O3
c
my_strnxfrm_unicode_full_nopad_bin: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r13 movq %rsi, %rbx movl 0x10(%rbp), %r12d leaq -0x2c(%rbp), %rax movl %ecx, (%rax) leaq (%rsi,%rdx), %r14 addq %r8, %r9 movq %r14, %rdx movq %rax, %rcx callq 0x8fdab leaq (%rbx,%rax), %r15 testb $0x40, %r12b je 0x8ffb8 subq %rax, %r13 jle 0x8ffb8 movl -0x2c(%rbp), %eax testl %eax, %eax je 0x8ffb8 leal (%rax,%rax,2), %r12d cmpq %r12, %r13 cmovbq %r13, %r12 movq %r15, %rdi xorl %esi, %esi movq %r12, %rdx callq 0x37300 addq %r12, %r15 movl 0x10(%rbp), %r12d movq %rbx, %rdi movq %r15, %rsi movl %r12d, %edx xorl %ecx, %ecx callq 0x7ad52 testb %r12b, %r12b jns 0x8ffe5 cmpq %r14, %r15 jae 0x8ffe5 movq %r14, %rdx subq %r15, %rdx movq %r15, %rdi xorl %esi, %esi callq 0x37300 movq %r14, %r15 subq %rbx, %r15 movq %r15, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strnxfrm_unicode_full_nopad_bin: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r13, rdx mov rbx, rsi mov r12d, [rbp+arg_0] lea rax, [rbp+var_2C] mov [rax], ecx lea r14, [rsi+rdx] add r9, r8 mov rdx, r14 mov rcx, rax call my_strnxfrm_unicode_full_bin_internal lea r15, [rbx+rax] test r12b, 40h jz short loc_8FFB8 sub r13, rax jle short loc_8FFB8 mov eax, [rbp+var_2C] test eax, eax jz short loc_8FFB8 lea r12d, [rax+rax*2] cmp r13, r12 cmovb r12, r13 mov rdi, r15 xor esi, esi mov rdx, r12 call _memset add r15, r12 mov r12d, [rbp+arg_0] loc_8FFB8: mov rdi, rbx mov rsi, r15 mov edx, r12d xor ecx, ecx call my_strxfrm_desc_and_reverse test r12b, r12b jns short loc_8FFE5 cmp r15, r14 jnb short loc_8FFE5 mov rdx, r14 sub rdx, r15 mov rdi, r15 xor esi, esi call _memset mov r15, r14 loc_8FFE5: sub r15, rbx mov rax, r15 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_strnxfrm_unicode_full_nopad_bin( long long a1, _BYTE *a2, long long a3, int a4, long long a5, long long a6, unsigned int a7) { unsigned int v8; // r12d _BYTE *v9; // r14 long long v10; // rax _BYTE *v11; // r15 bool v12; // cc unsigned long long v13; // r13 unsigned long long v14; // r12 int v16[11]; // [rsp+0h] [rbp-2Ch] BYREF v8 = a7; v16[0] = a4; v9 = &a2[a3]; v10 = my_strnxfrm_unicode_full_bin_internal(a1, a2, (unsigned long long)&a2[a3], v16, a5, a5 + a6); v11 = &a2[v10]; if ( (a7 & 0x40) != 0 ) { v12 = a3 <= v10; v13 = a3 - v10; if ( !v12 ) { if ( v16[0] ) { v14 = (unsigned int)(3 * v16[0]); if ( v13 < v14 ) v14 = v13; memset(v11, 0LL, v14); v11 += v14; v8 = a7; } } } my_strxfrm_desc_and_reverse(a2, v11, v8, 0); if ( (v8 & 0x80u) != 0 && v11 < v9 ) { memset(v11, 0LL, v9 - v11); v11 = v9; } return v11 - a2; }
my_strnxfrm_unicode_full_nopad_bin: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R13,RDX MOV RBX,RSI MOV R12D,dword ptr [RBP + 0x10] LEA RAX,[RBP + -0x2c] MOV dword ptr [RAX],ECX LEA R14,[RSI + RDX*0x1] ADD R9,R8 MOV RDX,R14 MOV RCX,RAX CALL 0x0018fdab LEA R15,[RBX + RAX*0x1] TEST R12B,0x40 JZ 0x0018ffb8 SUB R13,RAX JLE 0x0018ffb8 MOV EAX,dword ptr [RBP + -0x2c] TEST EAX,EAX JZ 0x0018ffb8 LEA R12D,[RAX + RAX*0x2] CMP R13,R12 CMOVC R12,R13 MOV RDI,R15 XOR ESI,ESI MOV RDX,R12 CALL 0x00137300 ADD R15,R12 MOV R12D,dword ptr [RBP + 0x10] LAB_0018ffb8: MOV RDI,RBX MOV RSI,R15 MOV EDX,R12D XOR ECX,ECX CALL 0x0017ad52 TEST R12B,R12B JNS 0x0018ffe5 CMP R15,R14 JNC 0x0018ffe5 MOV RDX,R14 SUB RDX,R15 MOV RDI,R15 XOR ESI,ESI CALL 0x00137300 MOV R15,R14 LAB_0018ffe5: SUB R15,RBX MOV RAX,R15 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_strnxfrm_unicode_full_nopad_bin (int8 param_1,long param_2,long param_3,int param_4,long param_5,long param_6, uint param_7) { void *pvVar1; long lVar2; ulong __n; ulong uVar3; void *__s; int local_34; pvVar1 = (void *)(param_2 + param_3); local_34 = param_4; lVar2 = my_strnxfrm_unicode_full_bin_internal (param_1,param_2,pvVar1,&local_34,param_5,param_6 + param_5); __s = (void *)(param_2 + lVar2); if ((((param_7 & 0x40) != 0) && (uVar3 = param_3 - lVar2, uVar3 != 0 && lVar2 <= param_3)) && (local_34 != 0)) { __n = (ulong)(uint)(local_34 * 3); if (uVar3 < (uint)(local_34 * 3)) { __n = uVar3; } memset(__s,0,__n); __s = (void *)((long)__s + __n); } my_strxfrm_desc_and_reverse(param_2,__s,param_7,0); if (((char)param_7 < '\0') && (__s < pvVar1)) { memset(__s,0,(long)pvVar1 - (long)__s); __s = pvVar1; } return (long)__s - param_2; }
47,519
my_thread_destroy_internal_mutex
eloqsql/mysys/my_thr_init.c
void my_thread_destroy_internal_mutex(void) { mysql_mutex_destroy(&THR_LOCK_threads); mysql_mutex_destroy(&THR_LOCK_malloc); mysql_cond_destroy(&THR_COND_threads); }
O3
c
my_thread_destroy_internal_mutex: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax leaq 0xb6710c(%rip), %rbx # 0xc08928 movq 0x40(%rbx), %rdi testq %rdi, %rdi je 0xa183a leaq 0x2e47e4(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x48(%rax) movq $0x0, 0x40(%rbx) leaq 0xb670e7(%rip), %rdi # 0xc08928 callq 0x290c0 leaq 0xb67123(%rip), %rbx # 0xc08970 movq 0x40(%rbx), %rdi testq %rdi, %rdi je 0xa186b leaq 0x2e47b3(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x48(%rax) movq $0x0, 0x40(%rbx) leaq 0xb670fe(%rip), %rdi # 0xc08970 callq 0x290c0 leaq 0xb6713a(%rip), %rax # 0xc089b8 movq 0x30(%rax), %rdi testq %rdi, %rdi jne 0xa1899 leaq 0xb6712a(%rip), %rdi # 0xc089b8 addq $0x8, %rsp popq %rbx popq %rbp jmp 0x29280 callq 0x2ef8d jmp 0xa1887
my_thread_destroy_internal_mutex: push rbp mov rbp, rsp push rbx push rax lea rbx, THR_LOCK_threads mov rdi, [rbx+40h] test rdi, rdi jz short loc_A183A lea rax, PSI_server mov rax, [rax] call qword ptr [rax+48h] mov qword ptr [rbx+40h], 0 loc_A183A: lea rdi, THR_LOCK_threads call _pthread_mutex_destroy lea rbx, THR_LOCK_malloc mov rdi, [rbx+40h] test rdi, rdi jz short loc_A186B lea rax, PSI_server mov rax, [rax] call qword ptr [rax+48h] mov qword ptr [rbx+40h], 0 loc_A186B: lea rdi, THR_LOCK_malloc call _pthread_mutex_destroy lea rax, THR_COND_threads mov rdi, [rax+30h] test rdi, rdi jnz short loc_A1899 loc_A1887: lea rdi, THR_COND_threads add rsp, 8 pop rbx pop rbp jmp _pthread_cond_destroy loc_A1899: call my_thread_destroy_internal_mutex_cold_1 jmp short loc_A1887
long long my_thread_destroy_internal_mutex() { long long v0; // rdi long long v1; // rdi v0 = THR_LOCK_threads[8]; if ( v0 ) { ((void ( *)(long long))PSI_server[9])(v0); THR_LOCK_threads[8] = 0LL; } pthread_mutex_destroy(THR_LOCK_threads); v1 = THR_LOCK_malloc[8]; if ( v1 ) { ((void ( *)(long long))PSI_server[9])(v1); THR_LOCK_malloc[8] = 0LL; } pthread_mutex_destroy(THR_LOCK_malloc); if ( THR_COND_threads[6] ) my_thread_destroy_internal_mutex_cold_1(); return pthread_cond_destroy(THR_COND_threads); }
my_thread_destroy_internal_mutex: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX LEA RBX,[0xd08928] MOV RDI,qword ptr [RBX + 0x40] TEST RDI,RDI JZ 0x001a183a LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x48] MOV qword ptr [RBX + 0x40],0x0 LAB_001a183a: LEA RDI,[0xd08928] CALL 0x001290c0 LEA RBX,[0xd08970] MOV RDI,qword ptr [RBX + 0x40] TEST RDI,RDI JZ 0x001a186b LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x48] MOV qword ptr [RBX + 0x40],0x0 LAB_001a186b: LEA RDI,[0xd08970] CALL 0x001290c0 LEA RAX,[0xd089b8] MOV RDI,qword ptr [RAX + 0x30] TEST RDI,RDI JNZ 0x001a1899 LAB_001a1887: LEA RDI,[0xd089b8] ADD RSP,0x8 POP RBX POP RBP JMP 0x00129280 LAB_001a1899: CALL 0x0012ef8d JMP 0x001a1887
void my_thread_destroy_internal_mutex(void) { if (THR_LOCK_threads._64_8_ != 0) { (**(code **)(PSI_server + 0x48))(); THR_LOCK_threads._64_8_ = 0; } pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_threads); if (THR_LOCK_malloc._64_8_ != 0) { (**(code **)(PSI_server + 0x48))(); THR_LOCK_malloc._64_8_ = 0; } pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_malloc); if (THR_COND_threads._48_8_ != 0) { my_thread_destroy_internal_mutex_cold_1(); } pthread_cond_destroy((pthread_cond_t *)THR_COND_threads); return; }
47,520
minja::CommentTemplateToken::~CommentTemplateToken()
monkey531[P]llama/common/minja.hpp
CommentTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, const std::string& t) : TemplateToken(Type::Comment, location, pre, post), text(t) {}
O3
cpp
minja::CommentTemplateToken::~CommentTemplateToken(): pushq %rbx movq %rdi, %rbx leaq 0x7b7a5(%rip), %rax # 0xe6760 addq $0x10, %rax movq %rax, (%rdi) movq 0x30(%rdi), %rdi leaq 0x40(%rbx), %rax cmpq %rax, %rdi je 0x6afda movq (%rax), %rsi incq %rsi callq 0x197b0 leaq 0x7b7c7(%rip), %rax # 0xe67a8 addq $0x10, %rax movq %rax, (%rbx) movq 0x18(%rbx), %rdi testq %rdi, %rdi je 0x6aff6 callq 0x33e7e movl $0x50, %esi movq %rbx, %rdi popq %rbx jmp 0x197b0
_ZN5minja20CommentTemplateTokenD0Ev: push rbx mov rbx, rdi lea rax, _ZTVN5minja20CommentTemplateTokenE; `vtable for'minja::CommentTemplateToken add rax, 10h mov [rdi], rax mov rdi, [rdi+30h]; void * lea rax, [rbx+40h] cmp rdi, rax jz short loc_6AFDA mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6AFDA: lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken add rax, 10h mov [rbx], rax mov rdi, [rbx+18h] test rdi, rdi jz short loc_6AFF6 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6AFF6: mov esi, 50h ; 'P'; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong)
void minja::CommentTemplateToken::~CommentTemplateToken(minja::CommentTemplateToken *this) { char *v2; // rdi volatile signed __int32 *v3; // rdi *(_QWORD *)this = &`vtable for'minja::CommentTemplateToken + 2; v2 = (char *)*((_QWORD *)this + 6); if ( v2 != (char *)this + 64 ) operator delete(v2, *((_QWORD *)this + 8) + 1LL); *(_QWORD *)this = &`vtable for'minja::TemplateToken + 2; v3 = (volatile signed __int32 *)*((_QWORD *)this + 3); if ( v3 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3); operator delete(this, 0x50uLL); }
~CommentTemplateToken: PUSH RBX MOV RBX,RDI LEA RAX,[0x1e6760] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x30] LEA RAX,[RBX + 0x40] CMP RDI,RAX JZ 0x0016afda MOV RSI,qword ptr [RAX] INC RSI CALL 0x001197b0 LAB_0016afda: LEA RAX,[0x1e67a8] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RBX + 0x18] TEST RDI,RDI JZ 0x0016aff6 CALL 0x00133e7e LAB_0016aff6: MOV ESI,0x50 MOV RDI,RBX POP RBX JMP 0x001197b0
/* minja::CommentTemplateToken::~CommentTemplateToken() */ void __thiscall minja::CommentTemplateToken::~CommentTemplateToken(CommentTemplateToken *this) { *(int ***)this = &PTR__CommentTemplateToken_001e6770; if (*(CommentTemplateToken **)(this + 0x30) != this + 0x40) { operator_delete(*(CommentTemplateToken **)(this + 0x30),*(long *)(this + 0x40) + 1); } *(int ***)this = &PTR__TemplateToken_001e67b8; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18)); } operator_delete(this,0x50); return; }
47,521
my_strnncollsp_padspace_bin
eloqsql/strings/ctype-bin.c
int my_strnncollsp_padspace_bin(const uchar *str, size_t length) { for ( ; length ; str++, length--) { if (*str < ' ') return -1; else if (*str > ' ') return 1; } return 0; }
O0
c
my_strnncollsp_padspace_bin: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x41dcb movq -0x10(%rbp), %rax movzbl (%rax), %eax cmpl $0x20, %eax jge 0x41d98 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x41dd2 movq -0x10(%rbp), %rax movzbl (%rax), %eax cmpl $0x20, %eax jle 0x41dad movl $0x1, -0x4(%rbp) jmp 0x41dd2 jmp 0x41daf jmp 0x41db1 movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) movq -0x18(%rbp), %rax addq $-0x1, %rax movq %rax, -0x18(%rbp) jmp 0x41d7c movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
my_strnncollsp_padspace_bin: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi loc_41D7C: cmp [rbp+var_18], 0 jz short loc_41DCB mov rax, [rbp+var_10] movzx eax, byte ptr [rax] cmp eax, 20h ; ' ' jge short loc_41D98 mov [rbp+var_4], 0FFFFFFFFh jmp short loc_41DD2 loc_41D98: mov rax, [rbp+var_10] movzx eax, byte ptr [rax] cmp eax, 20h ; ' ' jle short loc_41DAD mov [rbp+var_4], 1 jmp short loc_41DD2 loc_41DAD: jmp short $+2 loc_41DAF: jmp short $+2 loc_41DB1: mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_18], rax jmp short loc_41D7C loc_41DCB: mov [rbp+var_4], 0 loc_41DD2: mov eax, [rbp+var_4] pop rbp retn
long long my_strnncollsp_padspace_bin(unsigned __int8 *a1, long long a2) { while ( a2 ) { if ( *a1 < 0x20u ) return (unsigned int)-1; if ( *a1 > 0x20u ) return 1; ++a1; --a2; } return 0; }
my_strnncollsp_padspace_bin: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI LAB_00141d7c: CMP qword ptr [RBP + -0x18],0x0 JZ 0x00141dcb MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] CMP EAX,0x20 JGE 0x00141d98 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x00141dd2 LAB_00141d98: MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] CMP EAX,0x20 JLE 0x00141dad MOV dword ptr [RBP + -0x4],0x1 JMP 0x00141dd2 LAB_00141dad: JMP 0x00141daf LAB_00141daf: JMP 0x00141db1 LAB_00141db1: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x00141d7c LAB_00141dcb: MOV dword ptr [RBP + -0x4],0x0 LAB_00141dd2: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_strnncollsp_padspace_bin(byte *param_1,long param_2) { long local_20; byte *local_18; local_20 = param_2; local_18 = param_1; while( true ) { if (local_20 == 0) { return 0; } if (*local_18 < 0x20) break; if (0x20 < *local_18) { return 1; } local_18 = local_18 + 1; local_20 = local_20 + -1; } return 0xffffffff; }
47,522
crc32_combine_op
3fs/build_O3/src/apache-arrow-cpp/cpp/zlib_ep-prefix/src/zlib_ep/crc32.c
uLong ZEXPORT crc32_combine_op(crc1, crc2, op) uLong crc1; uLong crc2; uLong op; { return multmodp(op, crc1) ^ (crc2 & 0xffffffff); }
O3
c
crc32_combine_op: xorl %eax, %eax movl $0x80000000, %ecx # imm = 0x80000000 testl %edx, %ecx je 0x3dbd xorl %edi, %eax leal -0x1(%rcx), %r8d testl %edx, %r8d je 0x3ddc shrl %ecx movl %edi, %r8d shrl %r8d movl %r8d, %r9d xorl $0xedb88320, %r9d # imm = 0xEDB88320 testb $0x1, %dil cmovel %r8d, %r9d movl %r9d, %edi jmp 0x3dae movl %eax, %ecx movl %esi, %eax xorq %rcx, %rax retq
crc32_combine_op: xor eax, eax mov ecx, 80000000h loc_3DAE: test ecx, edx jz short loc_3DBD xor eax, edi lea r8d, [rcx-1] test r8d, edx jz short loc_3DDC loc_3DBD: shr ecx, 1 mov r8d, edi shr r8d, 1 mov r9d, r8d xor r9d, 0EDB88320h test dil, 1 cmovz r9d, r8d mov edi, r9d jmp short loc_3DAE loc_3DDC: mov ecx, eax mov eax, esi xor rax, rcx retn
unsigned long long crc32_combine_op(unsigned int a1, unsigned int a2, int a3) { unsigned int v3; // eax unsigned int v4; // ecx unsigned int v5; // r9d v3 = 0; v4 = 0x80000000; while ( 1 ) { if ( (a3 & v4) != 0 ) { v3 ^= a1; if ( (a3 & (v4 - 1)) == 0 ) break; } v4 >>= 1; v5 = (a1 >> 1) ^ 0xEDB88320; if ( (a1 & 1) == 0 ) v5 = a1 >> 1; a1 = v5; } return v3 ^ (unsigned long long)a2; }
crc32_combine_op: XOR EAX,EAX MOV ECX,0x80000000 LAB_00103dae: TEST ECX,EDX JZ 0x00103dbd XOR EAX,EDI LEA R8D,[RCX + -0x1] TEST R8D,EDX JZ 0x00103ddc LAB_00103dbd: SHR ECX,0x1 MOV R8D,EDI SHR R8D,0x1 MOV R9D,R8D XOR R9D,0xedb88320 TEST DIL,0x1 CMOVZ R9D,R8D MOV EDI,R9D JMP 0x00103dae LAB_00103ddc: MOV ECX,EAX MOV EAX,ESI XOR RAX,RCX RET
uint crc32_combine_op(uint param_1,uint param_2,uint param_3) { uint uVar1; uint uVar2; uint uVar3; uint uVar4; uVar2 = 0; uVar3 = 0x80000000; while (((uVar3 & param_3) == 0 || (uVar2 = uVar2 ^ param_1, (uVar3 - 1 & param_3) != 0))) { uVar3 = uVar3 >> 1; uVar4 = param_1 >> 1; uVar1 = param_1 & 1; param_1 = uVar4 ^ 0xedb88320; if (uVar1 == 0) { param_1 = uVar4; } } return param_2 ^ uVar2; }
47,523
reset_key_cache_counters
eloqsql/mysys/mf_keycache.c
int reset_key_cache_counters(const char *name __attribute__((unused)), KEY_CACHE *keycache, void *unused __attribute__((unused))) { int rc= 0; if (keycache->key_cache_inited) { pthread_mutex_lock(&keycache->op_lock); rc= keycache->interface_funcs->reset_counters(name, keycache->keycache_cb); pthread_mutex_unlock(&keycache->op_lock); } return rc; }
O3
c
reset_key_cache_counters: cmpb $0x0, 0x48(%rsi) je 0x9964d pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx leaq 0x58(%rsi), %r15 movq %r15, %rdi callq 0x29220 movq 0x8(%r14), %rsi movq 0x10(%r14), %rax movq %rbx, %rdi callq *0x38(%rax) movl %eax, %ebx movq %r15, %rdi callq 0x291e0 movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq xorl %eax, %eax retq
reset_key_cache_counters: cmp byte ptr [rsi+48h], 0 jz short loc_9964D push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, rsi mov rbx, rdi lea r15, [rsi+58h] mov rdi, r15 call _pthread_mutex_lock mov rsi, [r14+8] mov rax, [r14+10h] mov rdi, rbx call qword ptr [rax+38h] mov ebx, eax mov rdi, r15 call _pthread_mutex_unlock mov eax, ebx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_9964D: xor eax, eax retn
long long reset_key_cache_counters(long long a1, long long a2) { unsigned int v2; // ebx if ( !*(_BYTE *)(a2 + 72) ) return 0LL; pthread_mutex_lock(a2 + 88); v2 = (*(long long ( **)(long long, _QWORD))(*(_QWORD *)(a2 + 16) + 56LL))(a1, *(_QWORD *)(a2 + 8)); pthread_mutex_unlock(a2 + 88); return v2; }
reset_key_cache_counters: CMP byte ptr [RSI + 0x48],0x0 JZ 0x0019964d PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI LEA R15,[RSI + 0x58] MOV RDI,R15 CALL 0x00129220 MOV RSI,qword ptr [R14 + 0x8] MOV RAX,qword ptr [R14 + 0x10] MOV RDI,RBX CALL qword ptr [RAX + 0x38] MOV EBX,EAX MOV RDI,R15 CALL 0x001291e0 MOV EAX,EBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_0019964d: XOR EAX,EAX RET
int4 reset_key_cache_counters(int8 param_1,long param_2) { int4 uVar1; if (*(char *)(param_2 + 0x48) != '\0') { pthread_mutex_lock((pthread_mutex_t *)(param_2 + 0x58)); uVar1 = (**(code **)(*(long *)(param_2 + 0x10) + 0x38))(param_1,*(int8 *)(param_2 + 8)); pthread_mutex_unlock((pthread_mutex_t *)(param_2 + 0x58)); return uVar1; } return 0; }
47,524
diagnostic_context_print
tsotchke[P]eshkol/src/core/diagnostics/diagnostics.c
void diagnostic_context_print(DiagnosticContext* context) { assert(context != NULL); const char* reset_color = "\033[0m"; // Print verbosity level in debug mode if (context->verbosity == VERBOSITY_DEBUG) { printf("Diagnostic verbosity: DEBUG\n"); } // Print each diagnostic for (size_t i = 0; i < context->diagnostics.count; i++) { const Diagnostic* diagnostic = &context->diagnostics.items[i]; // Skip info messages in normal mode if (diagnostic->severity == DIAGNOSTIC_INFO && context->verbosity == VERBOSITY_NORMAL) { continue; } // Get severity name and color const char* severity_name = get_severity_name(diagnostic->severity); const char* severity_color = get_severity_color(diagnostic->severity); // Print location if (diagnostic->location.file) { printf("%s:%d:%d: ", diagnostic->location.file, diagnostic->location.line, diagnostic->location.column); } // Print severity printf("%s%s%s", severity_color, severity_name, reset_color); // Print error code if (diagnostic->code) { printf("[%s]: ", diagnostic->code); } else { printf(": "); } // Print message printf("%s\n", diagnostic->message); // In debug mode, print additional information about the diagnostic if (context->verbosity == VERBOSITY_DEBUG) { printf(" - Severity: %d\n", diagnostic->severity); printf(" - Location: file=%s, line=%d, column=%d, length=%d\n", diagnostic->location.file ? diagnostic->location.file : "(null)", diagnostic->location.line, diagnostic->location.column, diagnostic->location.length); } } // Print summary in verbose or debug mode if (context->verbosity >= VERBOSITY_VERBOSE) { printf("\nDiagnostic summary:\n"); printf(" - Total messages: %zu\n", context->diagnostics.count); printf(" - Error messages: %zu\n", context->error_count); } }
O0
c
diagnostic_context_print: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) je 0x4555 jmp 0x4574 leaq 0x2283f(%rip), %rdi # 0x26d9b leaq 0x227a5(%rip), %rsi # 0x26d08 movl $0xa1, %edx leaq 0x229b4(%rip), %rcx # 0x26f23 callq 0x2160 leaq 0x229db(%rip), %rax # 0x26f56 movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax cmpl $0x2, 0x28(%rax) jne 0x4597 leaq 0x229cb(%rip), %rdi # 0x26f5b movb $0x0, %al callq 0x2120 movq $0x0, -0x18(%rbp) movq -0x18(%rbp), %rax movq -0x8(%rbp), %rcx cmpq 0x10(%rcx), %rax jae 0x470a movq -0x8(%rbp), %rax movq 0x8(%rax), %rax imulq $0x30, -0x18(%rbp), %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax cmpl $0x0, (%rax) jne 0x45dd movq -0x8(%rbp), %rax cmpl $0x0, 0x28(%rax) jne 0x45dd jmp 0x46f9 movq -0x20(%rbp), %rax movl (%rax), %edi callq 0x4760 movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rax movl (%rax), %edi callq 0x47d0 movq %rax, -0x30(%rbp) movq -0x20(%rbp), %rax cmpq $0x0, 0x8(%rax) je 0x462a movq -0x20(%rbp), %rax movq 0x8(%rax), %rsi movq -0x20(%rbp), %rax movl 0x10(%rax), %edx movq -0x20(%rbp), %rax movl 0x14(%rax), %ecx leaq 0x22955(%rip), %rdi # 0x26f78 movb $0x0, %al callq 0x2120 movq -0x30(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x10(%rbp), %rcx leaq 0x22946(%rip), %rdi # 0x26f83 movb $0x0, %al callq 0x2120 movq -0x20(%rbp), %rax cmpq $0x0, 0x28(%rax) je 0x4667 movq -0x20(%rbp), %rax movq 0x28(%rax), %rsi leaq 0x2292c(%rip), %rdi # 0x26f8a movb $0x0, %al callq 0x2120 jmp 0x4675 leaq 0x22920(%rip), %rdi # 0x26f8e movb $0x0, %al callq 0x2120 movq -0x20(%rbp), %rax movq 0x20(%rax), %rsi leaq 0x252f2(%rip), %rdi # 0x29976 movb $0x0, %al callq 0x2120 movq -0x8(%rbp), %rax cmpl $0x2, 0x28(%rax) jne 0x46f7 movq -0x20(%rbp), %rax movl (%rax), %esi leaq 0x228ef(%rip), %rdi # 0x26f91 movb $0x0, %al callq 0x2120 movq -0x20(%rbp), %rax cmpq $0x0, 0x8(%rax) je 0x46c2 movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x38(%rbp) jmp 0x46cf leaq 0x22910(%rip), %rax # 0x26fd9 movq %rax, -0x38(%rbp) jmp 0x46cf movq -0x38(%rbp), %rsi movq -0x20(%rbp), %rax movl 0x10(%rax), %edx movq -0x20(%rbp), %rax movl 0x14(%rax), %ecx movq -0x20(%rbp), %rax movl 0x18(%rax), %r8d leaq 0x228b3(%rip), %rdi # 0x26fa3 movb $0x0, %al callq 0x2120 jmp 0x46f9 movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) jmp 0x459f movq -0x8(%rbp), %rax cmpl $0x1, 0x28(%rax) jb 0x474e leaq 0x228c5(%rip), %rdi # 0x26fe0 movb $0x0, %al callq 0x2120 movq -0x8(%rbp), %rax movq 0x10(%rax), %rsi leaq 0x228c5(%rip), %rdi # 0x26ff6 movb $0x0, %al callq 0x2120 movq -0x8(%rbp), %rax movq 0x20(%rax), %rsi leaq 0x228c8(%rip), %rdi # 0x2700f movb $0x0, %al callq 0x2120 addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
diagnostic_context_print: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi cmp [rbp+var_8], 0 jz short loc_4555 jmp short loc_4574 loc_4555: lea rdi, aContextNull; "context != NULL" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov edx, 0A1h lea rcx, aVoidDiagnostic_0; "void diagnostic_context_print(Diagnosti"... call ___assert_fail loc_4574: lea rax, a0m; "\x1B[0m" mov [rbp+var_10], rax mov rax, [rbp+var_8] cmp dword ptr [rax+28h], 2 jnz short loc_4597 lea rdi, aDiagnosticVerb; "Diagnostic verbosity: DEBUG\n" mov al, 0 call _printf loc_4597: mov [rbp+var_18], 0 loc_459F: mov rax, [rbp+var_18] mov rcx, [rbp+var_8] cmp rax, [rcx+10h] jnb loc_470A mov rax, [rbp+var_8] mov rax, [rax+8] imul rcx, [rbp+var_18], 30h ; '0' add rax, rcx mov [rbp+var_20], rax mov rax, [rbp+var_20] cmp dword ptr [rax], 0 jnz short loc_45DD mov rax, [rbp+var_8] cmp dword ptr [rax+28h], 0 jnz short loc_45DD jmp loc_46F9 loc_45DD: mov rax, [rbp+var_20] mov edi, [rax] call get_severity_name mov [rbp+var_28], rax mov rax, [rbp+var_20] mov edi, [rax] call get_severity_color mov [rbp+var_30], rax mov rax, [rbp+var_20] cmp qword ptr [rax+8], 0 jz short loc_462A mov rax, [rbp+var_20] mov rsi, [rax+8] mov rax, [rbp+var_20] mov edx, [rax+10h] mov rax, [rbp+var_20] mov ecx, [rax+14h] lea rdi, aSDD; "%s:%d:%d: " mov al, 0 call _printf loc_462A: mov rsi, [rbp+var_30] mov rdx, [rbp+var_28] mov rcx, [rbp+var_10] lea rdi, aSSS; "%s%s%s" mov al, 0 call _printf mov rax, [rbp+var_20] cmp qword ptr [rax+28h], 0 jz short loc_4667 mov rax, [rbp+var_20] mov rsi, [rax+28h] lea rdi, aS; "[%s]: " mov al, 0 call _printf jmp short loc_4675 loc_4667: lea rdi, aS+4; ": " mov al, 0 call _printf loc_4675: mov rax, [rbp+var_20] mov rsi, [rax+20h] lea rdi, aNodeS+6; "%s\n" mov al, 0 call _printf mov rax, [rbp+var_8] cmp dword ptr [rax+28h], 2 jnz short loc_46F7 mov rax, [rbp+var_20] mov esi, [rax] lea rdi, aSeverityD; " - Severity: %d\n" mov al, 0 call _printf mov rax, [rbp+var_20] cmp qword ptr [rax+8], 0 jz short loc_46C2 mov rax, [rbp+var_20] mov rax, [rax+8] mov [rbp+var_38], rax jmp short loc_46CF loc_46C2: lea rax, aNull; "(null)" mov [rbp+var_38], rax jmp short $+2 loc_46CF: mov rsi, [rbp+var_38] mov rax, [rbp+var_20] mov edx, [rax+10h] mov rax, [rbp+var_20] mov ecx, [rax+14h] mov rax, [rbp+var_20] mov r8d, [rax+18h] lea rdi, aLocationFileSL; " - Location: file=%s, line=%d, column="... mov al, 0 call _printf loc_46F7: jmp short $+2 loc_46F9: mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax jmp loc_459F loc_470A: mov rax, [rbp+var_8] cmp dword ptr [rax+28h], 1 jb short loc_474E lea rdi, aDiagnosticSumm; "\nDiagnostic summary:\n" mov al, 0 call _printf mov rax, [rbp+var_8] mov rsi, [rax+10h] lea rdi, aTotalMessagesZ; " - Total messages: %zu\n" mov al, 0 call _printf mov rax, [rbp+var_8] mov rsi, [rax+20h] lea rdi, aErrorMessagesZ; " - Error messages: %zu\n" mov al, 0 call _printf loc_474E: add rsp, 40h pop rbp retn
long long diagnostic_context_print(long long a1) { long long result; // rax const char *severity_color; // [rsp+10h] [rbp-30h] const char *severity_name; // [rsp+18h] [rbp-28h] const char **v4; // [rsp+20h] [rbp-20h] unsigned long long i; // [rsp+28h] [rbp-18h] if ( !a1 ) __assert_fail( "context != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/diagnostics/diagnostics.c", 161LL, "void diagnostic_context_print(DiagnosticContext *)"); if ( *(_DWORD *)(a1 + 40) == 2 ) printf("Diagnostic verbosity: DEBUG\n"); for ( i = 0LL; i < *(_QWORD *)(a1 + 16); ++i ) { v4 = (const char **)(48 * i + *(_QWORD *)(a1 + 8)); if ( *(_DWORD *)v4 || *(_DWORD *)(a1 + 40) ) { severity_name = (const char *)get_severity_name(*(unsigned int *)v4); severity_color = (const char *)get_severity_color(*(unsigned int *)v4); if ( v4[1] ) printf("%s:%d:%d: ", v4[1], *((_DWORD *)v4 + 4), *((_DWORD *)v4 + 5)); printf("%s%s%s", severity_color, severity_name, "\x1B[0m"); if ( v4[5] ) printf("[%s]: ", v4[5]); else printf(": "); printf("%s\n", v4[4]); if ( *(_DWORD *)(a1 + 40) == 2 ) { printf(" - Severity: %d\n", *(_DWORD *)v4); if ( v4[1] ) printf( " - Location: file=%s, line=%d, column=%d, length=%d\n", v4[1], *((_DWORD *)v4 + 4), *((_DWORD *)v4 + 5), *((_DWORD *)v4 + 6)); else printf( " - Location: file=%s, line=%d, column=%d, length=%d\n", "(null)", *((_DWORD *)v4 + 4), *((_DWORD *)v4 + 5), *((_DWORD *)v4 + 6)); } } } result = a1; if ( *(_DWORD *)(a1 + 40) ) { printf("\nDiagnostic summary:\n"); printf(" - Total messages: %zu\n", *(_QWORD *)(a1 + 16)); return printf(" - Error messages: %zu\n", *(_QWORD *)(a1 + 32)); } return result; }
diagnostic_context_print: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI CMP qword ptr [RBP + -0x8],0x0 JZ 0x00104555 JMP 0x00104574 LAB_00104555: LEA RDI,[0x126d9b] LEA RSI,[0x126d08] MOV EDX,0xa1 LEA RCX,[0x126f23] CALL 0x00102160 LAB_00104574: LEA RAX,[0x126f56] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x28],0x2 JNZ 0x00104597 LEA RDI,[0x126f5b] MOV AL,0x0 CALL 0x00102120 LAB_00104597: MOV qword ptr [RBP + -0x18],0x0 LAB_0010459f: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x10] JNC 0x0010470a MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] IMUL RCX,qword ptr [RBP + -0x18],0x30 ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX],0x0 JNZ 0x001045dd MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x28],0x0 JNZ 0x001045dd JMP 0x001046f9 LAB_001045dd: MOV RAX,qword ptr [RBP + -0x20] MOV EDI,dword ptr [RAX] CALL 0x00104760 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x20] MOV EDI,dword ptr [RAX] CALL 0x001047d0 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX + 0x8],0x0 JZ 0x0010462a MOV RAX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x14] LEA RDI,[0x126f78] MOV AL,0x0 CALL 0x00102120 LAB_0010462a: MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x10] LEA RDI,[0x126f83] MOV AL,0x0 CALL 0x00102120 MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX + 0x28],0x0 JZ 0x00104667 MOV RAX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RAX + 0x28] LEA RDI,[0x126f8a] MOV AL,0x0 CALL 0x00102120 JMP 0x00104675 LAB_00104667: LEA RDI,[0x126f8e] MOV AL,0x0 CALL 0x00102120 LAB_00104675: MOV RAX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RAX + 0x20] LEA RDI,[0x129976] MOV AL,0x0 CALL 0x00102120 MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x28],0x2 JNZ 0x001046f7 MOV RAX,qword ptr [RBP + -0x20] MOV ESI,dword ptr [RAX] LEA RDI,[0x126f91] MOV AL,0x0 CALL 0x00102120 MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX + 0x8],0x0 JZ 0x001046c2 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x38],RAX JMP 0x001046cf LAB_001046c2: LEA RAX,[0x126fd9] MOV qword ptr [RBP + -0x38],RAX JMP 0x001046cf LAB_001046cf: MOV RSI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x14] MOV RAX,qword ptr [RBP + -0x20] MOV R8D,dword ptr [RAX + 0x18] LEA RDI,[0x126fa3] MOV AL,0x0 CALL 0x00102120 LAB_001046f7: JMP 0x001046f9 LAB_001046f9: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x0010459f LAB_0010470a: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x28],0x1 JC 0x0010474e LEA RDI,[0x126fe0] MOV AL,0x0 CALL 0x00102120 MOV RAX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RAX + 0x10] LEA RDI,[0x126ff6] MOV AL,0x0 CALL 0x00102120 MOV RAX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RAX + 0x20] LEA RDI,[0x12700f] MOV AL,0x0 CALL 0x00102120 LAB_0010474e: ADD RSP,0x40 POP RBP RET
void diagnostic_context_print(long param_1) { uint *puVar1; int8 uVar2; int8 uVar3; char *local_40; ulong local_20; if (param_1 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("context != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/diagnostics/diagnostics.c" ,0xa1,"void diagnostic_context_print(DiagnosticContext *)"); } if (*(int *)(param_1 + 0x28) == 2) { printf("Diagnostic verbosity: DEBUG\n"); } for (local_20 = 0; local_20 < *(ulong *)(param_1 + 0x10); local_20 = local_20 + 1) { puVar1 = (uint *)(*(long *)(param_1 + 8) + local_20 * 0x30); if ((*puVar1 != 0) || (*(int *)(param_1 + 0x28) != 0)) { uVar2 = get_severity_name(*puVar1); uVar3 = get_severity_color(*puVar1); if (*(long *)(puVar1 + 2) != 0) { printf("%s:%d:%d: ",*(int8 *)(puVar1 + 2),(ulong)puVar1[4],(ulong)puVar1[5]); } printf("%s%s%s",uVar3,uVar2,&DAT_00126f56); if (*(long *)(puVar1 + 10) == 0) { printf(": "); } else { printf("[%s]: ",*(int8 *)(puVar1 + 10)); } printf("%s\n",*(int8 *)(puVar1 + 8)); if (*(int *)(param_1 + 0x28) == 2) { printf(" - Severity: %d\n",(ulong)*puVar1); if (*(long *)(puVar1 + 2) == 0) { local_40 = "(null)"; } else { local_40 = *(char **)(puVar1 + 2); } printf(" - Location: file=%s, line=%d, column=%d, length=%d\n",local_40,(ulong)puVar1[4], (ulong)puVar1[5],(ulong)puVar1[6]); } } } if (*(int *)(param_1 + 0x28) != 0) { printf("\nDiagnostic summary:\n"); printf(" - Total messages: %zu\n",*(int8 *)(param_1 + 0x10)); printf(" - Error messages: %zu\n",*(int8 *)(param_1 + 0x20)); } return; }
47,525
diagnostic_context_print
tsotchke[P]eshkol/src/core/diagnostics/diagnostics.c
void diagnostic_context_print(DiagnosticContext* context) { assert(context != NULL); const char* reset_color = "\033[0m"; // Print verbosity level in debug mode if (context->verbosity == VERBOSITY_DEBUG) { printf("Diagnostic verbosity: DEBUG\n"); } // Print each diagnostic for (size_t i = 0; i < context->diagnostics.count; i++) { const Diagnostic* diagnostic = &context->diagnostics.items[i]; // Skip info messages in normal mode if (diagnostic->severity == DIAGNOSTIC_INFO && context->verbosity == VERBOSITY_NORMAL) { continue; } // Get severity name and color const char* severity_name = get_severity_name(diagnostic->severity); const char* severity_color = get_severity_color(diagnostic->severity); // Print location if (diagnostic->location.file) { printf("%s:%d:%d: ", diagnostic->location.file, diagnostic->location.line, diagnostic->location.column); } // Print severity printf("%s%s%s", severity_color, severity_name, reset_color); // Print error code if (diagnostic->code) { printf("[%s]: ", diagnostic->code); } else { printf(": "); } // Print message printf("%s\n", diagnostic->message); // In debug mode, print additional information about the diagnostic if (context->verbosity == VERBOSITY_DEBUG) { printf(" - Severity: %d\n", diagnostic->severity); printf(" - Location: file=%s, line=%d, column=%d, length=%d\n", diagnostic->location.file ? diagnostic->location.file : "(null)", diagnostic->location.line, diagnostic->location.column, diagnostic->location.length); } } // Print summary in verbose or debug mode if (context->verbosity >= VERBOSITY_VERBOSE) { printf("\nDiagnostic summary:\n"); printf(" - Total messages: %zu\n", context->diagnostics.count); printf(" - Error messages: %zu\n", context->error_count); } }
O2
c
diagnostic_context_print: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax testq %rdi, %rdi je 0x3aa3 movq %rdi, %rbx cmpl $0x2, 0x28(%rdi) jne 0x3908 leaq 0x14851(%rip), %rdi # 0x18154 callq 0x20a0 xorl %r15d, %r15d xorl %r12d, %r12d cmpq 0x10(%rbx), %r12 jae 0x3a50 movq 0x8(%rbx), %r13 movl (%r13,%r15), %eax cmpq $0x3, %rax ja 0x397e leaq 0x1438e(%rip), %rcx # 0x17cbc movslq (%rcx,%rax,4), %rax addq %rcx, %rax leaq 0x147e4(%rip), %rbp # 0x18120 leaq 0x147ff(%rip), %r14 # 0x18142 jmpq *%rax cmpl $0x0, 0x28(%rbx) leaq 0x147cb(%rip), %rbp # 0x1811b leaq 0x147e5(%rip), %r14 # 0x1813c jne 0x398c jmp 0x3a44 leaq 0x147c3(%rip), %rbp # 0x18128 leaq 0x147dc(%rip), %r14 # 0x18148 jmp 0x398c leaq 0x147b9(%rip), %rbp # 0x1812e leaq 0x147d2(%rip), %r14 # 0x1814e jmp 0x398c leaq 0x147af(%rip), %rbp # 0x18134 leaq 0x1458e(%rip), %r14 # 0x17f1a movq 0x8(%r13,%r15), %rsi testq %rsi, %rsi je 0x39ae movl 0x10(%r13,%r15), %edx movl 0x14(%r13,%r15), %ecx leaq 0x14578(%rip), %rdi # 0x17f1f xorl %eax, %eax callq 0x2140 leaq 0x14575(%rip), %rdi # 0x17f2a movq %r14, %rsi movq %rbp, %rdx leaq 0x14558(%rip), %rcx # 0x17f1a xorl %eax, %eax callq 0x2140 movq 0x28(%r13,%r15), %rsi testq %rsi, %rsi je 0x39e3 leaq 0x14557(%rip), %rdi # 0x17f31 xorl %eax, %eax callq 0x2140 jmp 0x39f1 leaq 0x1454b(%rip), %rdi # 0x17f35 xorl %eax, %eax callq 0x2140 movq 0x20(%r13,%r15), %rdi callq 0x20a0 cmpl $0x2, 0x28(%rbx) jne 0x3a44 movl (%r13,%r15), %esi leaq 0x1452b(%rip), %rdi # 0x17f38 xorl %eax, %eax callq 0x2140 movq 0x8(%r13,%r15), %rsi testq %rsi, %rsi leaq 0x1455d(%rip), %rax # 0x17f80 cmoveq %rax, %rsi movl 0x10(%r13,%r15), %edx movl 0x14(%r13,%r15), %ecx movl 0x18(%r13,%r15), %r8d leaq 0x1450d(%rip), %rdi # 0x17f4a xorl %eax, %eax callq 0x2140 incq %r12 addq $0x30, %r15 jmp 0x390e cmpl $0x0, 0x28(%rbx) je 0x3a94 leaq 0x14713(%rip), %rdi # 0x18170 callq 0x20a0 movq 0x10(%rbx), %rsi leaq 0x1451a(%rip), %rdi # 0x17f87 xorl %eax, %eax callq 0x2140 movq 0x20(%rbx), %rsi leaq 0x14521(%rip), %rdi # 0x17fa0 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x2140 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x142b5(%rip), %rdi # 0x17d5f leaq 0x1421b(%rip), %rsi # 0x17ccc leaq 0x1442f(%rip), %rcx # 0x17ee7 movl $0xa1, %edx callq 0x2180
diagnostic_context_print: push rbp push r15 push r14 push r13 push r12 push rbx push rax test rdi, rdi jz loc_3AA3 mov rbx, rdi cmp dword ptr [rdi+28h], 2 jnz short loc_3908 lea rdi, aDiagnosticVerb; "Diagnostic verbosity: DEBUG" call _puts loc_3908: xor r15d, r15d xor r12d, r12d loc_390E: cmp r12, [rbx+10h] jnb loc_3A50 mov r13, [rbx+8] mov eax, [r13+r15+0] cmp rax, 3; switch 4 cases ja short def_3943; jumptable 0000000000003943 default case lea rcx, jpt_3943 movsxd rax, ds:(jpt_3943 - 17CBCh)[rcx+rax*4] add rax, rcx lea rbp, aWarning; "warning" lea r14, a33m; "\x1B[33m" jmp rax; switch jump loc_3945: cmp dword ptr [rbx+28h], 0; jumptable 0000000000003943 case 0 lea rbp, aInfo; "info" lea r14, a36m; "\x1B[36m" jnz short loc_398C; jumptable 0000000000003943 case 1 jmp loc_3A44 loc_395E: lea rbp, aError; jumptable 0000000000003943 case 2 lea r14, a31m; "\x1B[31m" jmp short loc_398C; jumptable 0000000000003943 case 1 loc_396E: lea rbp, aFatal; jumptable 0000000000003943 case 3 lea r14, a35m; "\x1B[35m" jmp short loc_398C; jumptable 0000000000003943 case 1 def_3943: lea rbp, aUnknown; jumptable 0000000000003943 default case lea r14, a0m; "\x1B[0m" loc_398C: mov rsi, [r13+r15+8]; jumptable 0000000000003943 case 1 test rsi, rsi jz short loc_39AE mov edx, [r13+r15+10h] mov ecx, [r13+r15+14h] lea rdi, aSDD; "%s:%d:%d: " xor eax, eax call _printf loc_39AE: lea rdi, aSSS; "%s%s%s" mov rsi, r14 mov rdx, rbp lea rcx, a0m; "\x1B[0m" xor eax, eax call _printf mov rsi, [r13+r15+28h] test rsi, rsi jz short loc_39E3 lea rdi, aS; "[%s]: " xor eax, eax call _printf jmp short loc_39F1 loc_39E3: lea rdi, aS+4; ": " xor eax, eax call _printf loc_39F1: mov rdi, [r13+r15+20h] call _puts cmp dword ptr [rbx+28h], 2 jnz short loc_3A44 mov esi, [r13+r15+0] lea rdi, aSeverityD; " - Severity: %d\n" xor eax, eax call _printf mov rsi, [r13+r15+8] test rsi, rsi lea rax, aNull; "(null)" cmovz rsi, rax mov edx, [r13+r15+10h] mov ecx, [r13+r15+14h] mov r8d, [r13+r15+18h] lea rdi, aLocationFileSL; " - Location: file=%s, line=%d, column="... xor eax, eax call _printf loc_3A44: inc r12 add r15, 30h ; '0' jmp loc_390E loc_3A50: cmp dword ptr [rbx+28h], 0 jz short loc_3A94 lea rdi, aDiagnosticSumm; "\nDiagnostic summary:" call _puts mov rsi, [rbx+10h] lea rdi, aTotalMessagesZ; " - Total messages: %zu\n" xor eax, eax call _printf mov rsi, [rbx+20h] lea rdi, aErrorMessagesZ; " - Error messages: %zu\n" xor eax, eax add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _printf loc_3A94: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3AA3: lea rdi, aContextNull; "context != NULL" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidDiagnostic_0; "void diagnostic_context_print(Diagnosti"... mov edx, 0A1h call ___assert_fail
long long diagnostic_context_print(long long a1, const char *a2, long long a3) { long long result; // rax long long v4; // r15 unsigned long long v5; // r12 long long v6; // r13 const char *v7; // rbp const char *v8; // r14 const char *v9; // rsi long long v10; // rdx if ( !a1 ) __assert_fail( "context != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/diagnostics/diagnostics.c", 161LL, "void diagnostic_context_print(DiagnosticContext *)"); if ( *(_DWORD *)(a1 + 40) == 2 ) result = puts("Diagnostic verbosity: DEBUG", a2, a3); v4 = 0LL; v5 = 0LL; while ( v5 < *(_QWORD *)(a1 + 16) ) { v6 = *(_QWORD *)(a1 + 8); result = *(unsigned int *)(v6 + v4); v7 = "warning"; v8 = "\x1B[33m"; switch ( *(_DWORD *)(v6 + v4) ) { case 0: v7 = "info"; v8 = "\x1B[36m"; if ( *(_DWORD *)(a1 + 40) ) goto LABEL_12; goto LABEL_21; case 1: goto LABEL_12; case 2: v7 = "error"; v8 = "\x1B[31m"; goto LABEL_12; case 3: v7 = "fatal"; v8 = "\x1B[35m"; goto LABEL_12; default: v7 = "unknown"; v8 = "\x1B[0m"; LABEL_12: v9 = *(const char **)(v6 + v4 + 8); if ( v9 ) printf("%s:%d:%d: ", v9, *(_DWORD *)(v6 + v4 + 16), *(_DWORD *)(v6 + v4 + 20)); printf("%s%s%s", v8, v7, "\x1B[0m"); a2 = *(const char **)(v6 + v4 + 40); if ( a2 ) printf("[%s]: ", a2); else printf(": "); result = puts(*(_QWORD *)(v6 + v4 + 32), a2, v10); if ( *(_DWORD *)(a1 + 40) == 2 ) { printf(" - Severity: %d\n", *(_DWORD *)(v6 + v4)); a2 = *(const char **)(v6 + v4 + 8); if ( !a2 ) a2 = "(null)"; result = printf( " - Location: file=%s, line=%d, column=%d, length=%d\n", a2, *(_DWORD *)(v6 + v4 + 16), *(_DWORD *)(v6 + v4 + 20), *(_DWORD *)(v6 + v4 + 24)); } LABEL_21: ++v5; v4 += 48LL; break; } } if ( *(_DWORD *)(a1 + 40) ) { puts("\nDiagnostic summary:", a2, a3); printf(" - Total messages: %zu\n", *(_QWORD *)(a1 + 16)); return printf(" - Error messages: %zu\n", *(_QWORD *)(a1 + 32)); } return result; }
diagnostic_context_print: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX TEST RDI,RDI JZ 0x00103aa3 MOV RBX,RDI CMP dword ptr [RDI + 0x28],0x2 JNZ 0x00103908 LEA RDI,[0x118154] CALL 0x001020a0 LAB_00103908: XOR R15D,R15D XOR R12D,R12D LAB_0010390e: CMP R12,qword ptr [RBX + 0x10] JNC 0x00103a50 MOV R13,qword ptr [RBX + 0x8] MOV EAX,dword ptr [R13 + R15*0x1] CMP RAX,0x3 JA 0x0010397e LEA RCX,[0x117cbc] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX LEA RBP,[0x118120] LEA R14,[0x118142] switchD: JMP RAX caseD_0: CMP dword ptr [RBX + 0x28],0x0 LEA RBP,[0x11811b] LEA R14,[0x11813c] JNZ 0x0010398c JMP 0x00103a44 caseD_2: LEA RBP,[0x118128] LEA R14,[0x118148] JMP 0x0010398c caseD_3: LEA RBP,[0x11812e] LEA R14,[0x11814e] JMP 0x0010398c default: LEA RBP,[0x118134] LEA R14,[0x117f1a] caseD_1: MOV RSI,qword ptr [R13 + R15*0x1 + 0x8] TEST RSI,RSI JZ 0x001039ae MOV EDX,dword ptr [R13 + R15*0x1 + 0x10] MOV ECX,dword ptr [R13 + R15*0x1 + 0x14] LEA RDI,[0x117f1f] XOR EAX,EAX CALL 0x00102140 LAB_001039ae: LEA RDI,[0x117f2a] MOV RSI,R14 MOV RDX,RBP LEA RCX,[0x117f1a] XOR EAX,EAX CALL 0x00102140 MOV RSI,qword ptr [R13 + R15*0x1 + 0x28] TEST RSI,RSI JZ 0x001039e3 LEA RDI,[0x117f31] XOR EAX,EAX CALL 0x00102140 JMP 0x001039f1 LAB_001039e3: LEA RDI,[0x117f35] XOR EAX,EAX CALL 0x00102140 LAB_001039f1: MOV RDI,qword ptr [R13 + R15*0x1 + 0x20] CALL 0x001020a0 CMP dword ptr [RBX + 0x28],0x2 JNZ 0x00103a44 MOV ESI,dword ptr [R13 + R15*0x1] LEA RDI,[0x117f38] XOR EAX,EAX CALL 0x00102140 MOV RSI,qword ptr [R13 + R15*0x1 + 0x8] TEST RSI,RSI LEA RAX,[0x117f80] CMOVZ RSI,RAX MOV EDX,dword ptr [R13 + R15*0x1 + 0x10] MOV ECX,dword ptr [R13 + R15*0x1 + 0x14] MOV R8D,dword ptr [R13 + R15*0x1 + 0x18] LEA RDI,[0x117f4a] XOR EAX,EAX CALL 0x00102140 LAB_00103a44: INC R12 ADD R15,0x30 JMP 0x0010390e LAB_00103a50: CMP dword ptr [RBX + 0x28],0x0 JZ 0x00103a94 LEA RDI,[0x118170] CALL 0x001020a0 MOV RSI,qword ptr [RBX + 0x10] LEA RDI,[0x117f87] XOR EAX,EAX CALL 0x00102140 MOV RSI,qword ptr [RBX + 0x20] LEA RDI,[0x117fa0] XOR EAX,EAX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00102140 LAB_00103a94: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00103aa3: LEA RDI,[0x117d5f] LEA RSI,[0x117ccc] LEA RCX,[0x117ee7] MOV EDX,0xa1 CALL 0x00102180
void diagnostic_context_print(long param_1) { long lVar1; long lVar2; char *pcVar3; ulong uVar4; int *puVar5; long lVar6; if (param_1 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("context != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/diagnostics/diagnostics.c" ,0xa1,"void diagnostic_context_print(DiagnosticContext *)"); } if (*(int *)(param_1 + 0x28) == 2) { puts("Diagnostic verbosity: DEBUG"); } lVar6 = 0; uVar4 = 0; do { if (*(ulong *)(param_1 + 0x10) <= uVar4) { if (*(int *)(param_1 + 0x28) == 0) { return; } puts("\nDiagnostic summary:"); printf(" - Total messages: %zu\n",*(int8 *)(param_1 + 0x10)); printf(" - Error messages: %zu\n",*(int8 *)(param_1 + 0x20)); return; } lVar1 = *(long *)(param_1 + 8); pcVar3 = "warning"; puVar5 = &DAT_00118142; switch(*(int4 *)(lVar1 + lVar6)) { case 0: pcVar3 = "info"; puVar5 = &DAT_0011813c; if (*(int *)(param_1 + 0x28) != 0) break; goto LAB_00103a44; case 1: break; case 2: pcVar3 = "error"; puVar5 = &DAT_00118148; break; case 3: pcVar3 = "fatal"; puVar5 = &DAT_0011814e; break; default: pcVar3 = "unknown"; puVar5 = &DAT_00117f1a; } lVar2 = *(long *)(lVar1 + 8 + lVar6); if (lVar2 != 0) { printf("%s:%d:%d: ",lVar2,(ulong)*(uint *)(lVar1 + 0x10 + lVar6), (ulong)*(uint *)(lVar1 + 0x14 + lVar6)); } printf("%s%s%s",puVar5,pcVar3,&DAT_00117f1a); if (*(long *)(lVar1 + 0x28 + lVar6) == 0) { printf(": "); } else { printf("[%s]: "); } puts(*(char **)(lVar1 + 0x20 + lVar6)); if (*(int *)(param_1 + 0x28) == 2) { printf(" - Severity: %d\n",(ulong)*(uint *)(lVar1 + lVar6)); pcVar3 = *(char **)(lVar1 + 8 + lVar6); if (pcVar3 == (char *)0x0) { pcVar3 = "(null)"; } printf(" - Location: file=%s, line=%d, column=%d, length=%d\n",pcVar3, (ulong)*(uint *)(lVar1 + 0x10 + lVar6),(ulong)*(uint *)(lVar1 + 0x14 + lVar6), (ulong)*(uint *)(lVar1 + 0x18 + lVar6)); } LAB_00103a44: uVar4 = uVar4 + 1; lVar6 = lVar6 + 0x30; } while( true ); }
47,526
my_setwd
eloqsql/mysys/my_getwd.c
int my_setwd(const char *dir, myf MyFlags) { int res; size_t length; char *start, *pos; DBUG_ENTER("my_setwd"); DBUG_PRINT("my",("dir: '%s' MyFlags %lu", dir, MyFlags)); start=(char *) dir; if (! dir[0] || (dir[0] == FN_LIBCHAR && dir[1] == 0)) dir=FN_ROOTDIR; if ((res=chdir((char*) dir)) != 0) { my_errno=errno; if (MyFlags & MY_WME) my_error(EE_SETWD,MYF(ME_BELL),start,errno); } else { if (test_if_hard_path(start)) { /* Hard pathname */ pos= strmake(&curr_dir[0],start,(size_t) FN_REFLEN-1); if (pos[-1] != FN_LIBCHAR) { length=(uint) (pos-(char*) curr_dir); curr_dir[length]=FN_LIBCHAR; /* must end with '/' */ curr_dir[length+1]='\0'; } } else curr_dir[0]='\0'; /* Don't save name */ } DBUG_RETURN(res); }
O3
c
my_setwd: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r15 movq %rdi, %r14 movzbl (%rdi), %eax testl %eax, %eax je 0x2b08f movq %r14, %rdi cmpl $0x2f, %eax jne 0x2b096 cmpb $0x0, 0x1(%r14) movq %r14, %rdi jne 0x2b096 leaq 0x3226b(%rip), %rdi # 0x5d301 callq 0x24450 movl %eax, %ebx testl %eax, %eax je 0x2b0d4 callq 0x24060 movq %rax, %r12 movl (%rax), %r13d callq 0x26d22 movl %r13d, (%rax) testb $0x10, %r15b je 0x2b131 movl (%r12), %ecx movl $0x4, %esi movl $0x11, %edi movq %r14, %rdx xorl %eax, %eax callq 0x2ab63 jmp 0x2b131 leaq 0x33ac2d(%rip), %rax # 0x365d08 movq (%rax), %rax movq %r14, %rcx movzbl (%rcx), %edx cmpl $0x7e, %edx jne 0x2b0f9 cmpb $0x2f, 0x1(%rcx) jne 0x2b127 movq %rax, %rcx testq %rax, %rax jne 0x2b0e1 jmp 0x2b127 cmpl $0x2f, %edx jne 0x2b127 leaq 0x33ac1b(%rip), %r15 # 0x365d20 movl $0x1ff, %edx # imm = 0x1FF movq %r15, %rdi movq %r14, %rsi callq 0x5a5c4 cmpb $0x2f, -0x1(%rax) je 0x2b131 subl %r15d, %eax movw $0x2f, (%r15,%rax) jmp 0x2b131 leaq 0x33abf2(%rip), %rax # 0x365d20 movb $0x0, (%rax) movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_setwd: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r15, rsi mov r14, rdi movzx eax, byte ptr [rdi] test eax, eax jz short loc_2B08F mov rdi, r14 cmp eax, 2Fh ; '/' jnz short loc_2B096 cmp byte ptr [r14+1], 0 mov rdi, r14 jnz short loc_2B096 loc_2B08F: lea rdi, unk_5D301 loc_2B096: call _chdir mov ebx, eax test eax, eax jz short loc_2B0D4 call ___errno_location mov r12, rax mov r13d, [rax] call _my_thread_var mov [rax], r13d test r15b, 10h jz short loc_2B131 mov ecx, [r12] mov esi, 4 mov edi, 11h mov rdx, r14 xor eax, eax call my_error jmp short loc_2B131 loc_2B0D4: lea rax, home_dir mov rax, [rax] mov rcx, r14 loc_2B0E1: movzx edx, byte ptr [rcx] cmp edx, 7Eh ; '~' jnz short loc_2B0F9 cmp byte ptr [rcx+1], 2Fh ; '/' jnz short loc_2B127 mov rcx, rax test rax, rax jnz short loc_2B0E1 jmp short loc_2B127 loc_2B0F9: cmp edx, 2Fh ; '/' jnz short loc_2B127 lea r15, curr_dir mov edx, 1FFh mov rdi, r15 mov rsi, r14 call strmake cmp byte ptr [rax-1], 2Fh ; '/' jz short loc_2B131 sub eax, r15d mov word ptr [r15+rax], 2Fh ; '/' jmp short loc_2B131 loc_2B127: lea rax, curr_dir mov byte ptr [rax], 0 loc_2B131: mov eax, ebx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_setwd(unsigned __int8 *a1, char a2) { unsigned __int8 *v2; // r14 unsigned int v3; // ebx unsigned int *v4; // r12 unsigned int v5; // r13d unsigned __int8 *v6; // rcx int v7; // edx long long v8; // rax v2 = a1; if ( !*a1 || *a1 == 47 && !a1[1] ) a1 = (unsigned __int8 *)&unk_5D301; v3 = chdir(a1); if ( v3 ) { v4 = (unsigned int *)__errno_location(a1); v5 = *v4; *(_DWORD *)my_thread_var() = v5; if ( (a2 & 0x10) != 0 ) my_error(0x11u, 4, v2, *v4); } else { v6 = v2; while ( 1 ) { v7 = *v6; if ( v7 != 126 ) break; if ( v6[1] == 47 ) { v6 = (unsigned __int8 *)home_dir; if ( home_dir ) continue; } goto LABEL_16; } if ( v7 != 47 ) { LABEL_16: curr_dir[0] = 0; return v3; } v8 = strmake(curr_dir, v2, 511LL); if ( *(_BYTE *)(v8 - 1) != 47 ) *(_WORD *)&curr_dir[(unsigned int)v8 - (unsigned int)curr_dir] = 47; } return v3; }
my_setwd: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15,RSI MOV R14,RDI MOVZX EAX,byte ptr [RDI] TEST EAX,EAX JZ 0x0012b08f MOV RDI,R14 CMP EAX,0x2f JNZ 0x0012b096 CMP byte ptr [R14 + 0x1],0x0 MOV RDI,R14 JNZ 0x0012b096 LAB_0012b08f: LEA RDI,[0x15d301] LAB_0012b096: CALL 0x00124450 MOV EBX,EAX TEST EAX,EAX JZ 0x0012b0d4 CALL 0x00124060 MOV R12,RAX MOV R13D,dword ptr [RAX] CALL 0x00126d22 MOV dword ptr [RAX],R13D TEST R15B,0x10 JZ 0x0012b131 MOV ECX,dword ptr [R12] MOV ESI,0x4 MOV EDI,0x11 MOV RDX,R14 XOR EAX,EAX CALL 0x0012ab63 JMP 0x0012b131 LAB_0012b0d4: LEA RAX,[0x465d08] MOV RAX,qword ptr [RAX] MOV RCX,R14 LAB_0012b0e1: MOVZX EDX,byte ptr [RCX] CMP EDX,0x7e JNZ 0x0012b0f9 CMP byte ptr [RCX + 0x1],0x2f JNZ 0x0012b127 MOV RCX,RAX TEST RAX,RAX JNZ 0x0012b0e1 JMP 0x0012b127 LAB_0012b0f9: CMP EDX,0x2f JNZ 0x0012b127 LEA R15,[0x465d20] MOV EDX,0x1ff MOV RDI,R15 MOV RSI,R14 CALL 0x0015a5c4 CMP byte ptr [RAX + -0x1],0x2f JZ 0x0012b131 SUB EAX,R15D MOV word ptr [R15 + RAX*0x1],0x2f JMP 0x0012b131 LAB_0012b127: LEA RAX,[0x465d20] MOV byte ptr [RAX],0x0 LAB_0012b131: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int my_setwd(char *param_1,ulong param_2) { int iVar1; int iVar2; int *piVar3; int *piVar4; long lVar5; char *pcVar6; if ((*param_1 == '\0') || ((pcVar6 = param_1, *param_1 == '/' && (param_1[1] == '\0')))) { pcVar6 = "/"; } iVar2 = chdir(pcVar6); pcVar6 = param_1; if (iVar2 == 0) { while (*pcVar6 == '~') { if ((pcVar6[1] != '/') || (pcVar6 = home_dir, home_dir == (char *)0x0)) goto LAB_0012b127; } if (*pcVar6 == '/') { lVar5 = strmake(&curr_dir,param_1,0x1ff); if (*(char *)(lVar5 + -1) == '/') { return 0; } *(int2 *)(&curr_dir + ((int)lVar5 - 0x465d20)) = 0x2f; return 0; } LAB_0012b127: curr_dir = 0; } else { piVar3 = __errno_location(); iVar1 = *piVar3; piVar4 = (int *)_my_thread_var(); *piVar4 = iVar1; if ((param_2 & 0x10) != 0) { my_error(0x11,4,param_1,*piVar3); } } return iVar2; }
47,527
mi_get_last_key
eloqsql/storage/myisam/mi_search.c
uchar *_mi_get_last_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *lastkey, uchar *endpos, uint *return_key_length) { uint nod_flag; uchar *lastpos; DBUG_ENTER("_mi_get_last_key"); DBUG_PRINT("enter",("page:%p endpos: %p", page, endpos)); nod_flag=mi_test_if_nod(page); if (! (keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY))) { lastpos=endpos-keyinfo->keylength-nod_flag; *return_key_length=keyinfo->keylength; if (lastpos > page) bmove((uchar*) lastkey,(uchar*) lastpos,keyinfo->keylength+nod_flag); } else { lastpos=(page+=2+nod_flag); lastkey[0]=0; while (page < endpos) { lastpos=page; *return_key_length=(*keyinfo->get_key)(keyinfo,nod_flag,&page,lastkey); if (*return_key_length == 0) { DBUG_PRINT("error",("Couldn't find last key: page: %p", page)); mi_print_error(info->s, HA_ERR_CRASHED); my_errno=HA_ERR_CRASHED; DBUG_RETURN(0); } } } DBUG_PRINT("exit",("lastpos: %p length: %u", lastpos, *return_key_length)); DBUG_RETURN(lastpos); }
O3
c
mi_get_last_key: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r9, %r12 movq %r8, %rbx movq %rcx, -0x30(%rbp) movq %rsi, %r15 xorl %r14d, %r14d cmpb $0x0, (%rdx) jns 0xa0a1e movq (%rdi), %rax movl 0x17c(%rax), %r14d testb $0x28, 0xa(%r15) je 0xa0a68 leal 0x2(%r14), %eax addq %rax, %rdx movq %rdx, -0x38(%rbp) movq -0x30(%rbp), %rax movb $0x0, (%rax) cmpq %rbx, %rdx jae 0xa0a9b movq %rdi, -0x40(%rbp) movq %rdx, %r13 movq %r15, %rdi movl %r14d, %esi leaq -0x38(%rbp), %rdx movq -0x30(%rbp), %rcx callq *0x48(%r15) movl %eax, (%r12) testl %eax, %eax je 0xa0aa0 movq -0x38(%rbp), %rdx cmpq %rbx, %rdx jb 0xa0a40 jmp 0xa0ac6 movzwl 0x12(%r15), %eax subq %rax, %rbx movl %r14d, %ecx movq %rbx, %r13 subq %rcx, %r13 movl %eax, (%r12) cmpq %rdx, %r13 jbe 0xa0ac6 movzwl 0x12(%r15), %eax addl %eax, %r14d movq -0x30(%rbp), %rdi movq %r13, %rsi movq %r14, %rdx callq 0x2a150 jmp 0xa0ac6 movq %rdx, %r13 jmp 0xa0ac6 movq -0x40(%rbp), %rax movq (%rax), %rax movq 0x268(%rax), %rsi movl $0x7e, %edi callq 0x95dfa callq 0xc14ee movl $0x7e, (%rax) xorl %r13d, %r13d movq %r13, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_mi_get_last_key: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r12, r9 mov rbx, r8 mov [rbp+var_30], rcx mov r15, rsi xor r14d, r14d cmp byte ptr [rdx], 0 jns short loc_A0A1E mov rax, [rdi] mov r14d, [rax+17Ch] loc_A0A1E: test byte ptr [r15+0Ah], 28h jz short loc_A0A68 lea eax, [r14+2] add rdx, rax mov [rbp+var_38], rdx mov rax, [rbp+var_30] mov byte ptr [rax], 0 cmp rdx, rbx jnb short loc_A0A9B mov [rbp+var_40], rdi loc_A0A40: mov r13, rdx mov rdi, r15 mov esi, r14d lea rdx, [rbp+var_38] mov rcx, [rbp+var_30] call qword ptr [r15+48h] mov [r12], eax test eax, eax jz short loc_A0AA0 mov rdx, [rbp+var_38] cmp rdx, rbx jb short loc_A0A40 jmp short loc_A0AC6 loc_A0A68: movzx eax, word ptr [r15+12h] sub rbx, rax mov ecx, r14d mov r13, rbx sub r13, rcx mov [r12], eax cmp r13, rdx jbe short loc_A0AC6 movzx eax, word ptr [r15+12h] add r14d, eax mov rdi, [rbp+var_30] mov rsi, r13 mov rdx, r14 call _memmove jmp short loc_A0AC6 loc_A0A9B: mov r13, rdx jmp short loc_A0AC6 loc_A0AA0: mov rax, [rbp+var_40] mov rax, [rax] mov rsi, [rax+268h] mov edi, 7Eh ; '~' call mi_report_error call _my_thread_var mov dword ptr [rax], 7Eh ; '~' xor r13d, r13d loc_A0AC6: mov rax, r13 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char * mi_get_last_key(long long a1, long long a2, char *a3, _BYTE *a4, unsigned long long a5, _DWORD *a6) { unsigned int v8; // r14d char *v9; // rdx unsigned long long v10; // r13 int v11; // eax long long v12; // rax char *v14; // [rsp+8h] [rbp-38h] BYREF _BYTE *v15; // [rsp+10h] [rbp-30h] v15 = a4; v8 = 0; if ( *a3 < 0 ) v8 = *(_DWORD *)(*(_QWORD *)a1 + 380LL); if ( (*(_BYTE *)(a2 + 10) & 0x28) != 0 ) { v9 = &a3[v8 + 2]; v14 = v9; *v15 = 0; if ( (unsigned long long)v9 >= a5 ) { return v9; } else { while ( 1 ) { v10 = (unsigned long long)v9; v11 = (*(long long ( **)(long long, _QWORD, char **, _BYTE *))(a2 + 72))(a2, v8, &v14, v15); *a6 = v11; if ( !v11 ) break; v9 = v14; if ( (unsigned long long)v14 >= a5 ) return (char *)v10; } mi_report_error(126, *(_QWORD *)(*(_QWORD *)a1 + 616LL)); *(_DWORD *)my_thread_var(126LL) = 126; return 0LL; } } else { v12 = *(unsigned __int16 *)(a2 + 18); v10 = a5 - v12 - v8; *a6 = v12; if ( v10 > (unsigned long long)a3 ) memmove(v15, v10, *(unsigned __int16 *)(a2 + 18) + v8); } return (char *)v10; }
_mi_get_last_key: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R12,R9 MOV RBX,R8 MOV qword ptr [RBP + -0x30],RCX MOV R15,RSI XOR R14D,R14D CMP byte ptr [RDX],0x0 JNS 0x001a0a1e MOV RAX,qword ptr [RDI] MOV R14D,dword ptr [RAX + 0x17c] LAB_001a0a1e: TEST byte ptr [R15 + 0xa],0x28 JZ 0x001a0a68 LEA EAX,[R14 + 0x2] ADD RDX,RAX MOV qword ptr [RBP + -0x38],RDX MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],0x0 CMP RDX,RBX JNC 0x001a0a9b MOV qword ptr [RBP + -0x40],RDI LAB_001a0a40: MOV R13,RDX MOV RDI,R15 MOV ESI,R14D LEA RDX,[RBP + -0x38] MOV RCX,qword ptr [RBP + -0x30] CALL qword ptr [R15 + 0x48] MOV dword ptr [R12],EAX TEST EAX,EAX JZ 0x001a0aa0 MOV RDX,qword ptr [RBP + -0x38] CMP RDX,RBX JC 0x001a0a40 JMP 0x001a0ac6 LAB_001a0a68: MOVZX EAX,word ptr [R15 + 0x12] SUB RBX,RAX MOV ECX,R14D MOV R13,RBX SUB R13,RCX MOV dword ptr [R12],EAX CMP R13,RDX JBE 0x001a0ac6 MOVZX EAX,word ptr [R15 + 0x12] ADD R14D,EAX MOV RDI,qword ptr [RBP + -0x30] MOV RSI,R13 MOV RDX,R14 CALL 0x0012a150 JMP 0x001a0ac6 LAB_001a0a9b: MOV R13,RDX JMP 0x001a0ac6 LAB_001a0aa0: MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x268] MOV EDI,0x7e CALL 0x00195dfa CALL 0x001c14ee MOV dword ptr [RAX],0x7e XOR R13D,R13D LAB_001a0ac6: MOV RAX,R13 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
char * _mi_get_last_key(long *param_1,long param_2,char *param_3,int1 *param_4,char *param_5, uint *param_6) { char *pcVar1; char *pcVar2; uint uVar3; int4 *puVar4; uint uVar5; char *local_40; int1 *local_38; uVar5 = 0; if (*param_3 < '\0') { uVar5 = *(uint *)(*param_1 + 0x17c); } local_38 = param_4; if ((*(byte *)(param_2 + 10) & 0x28) == 0) { param_5 = param_5 + (-(ulong)uVar5 - (ulong)*(ushort *)(param_2 + 0x12)); *param_6 = (uint)*(ushort *)(param_2 + 0x12); if (param_3 < param_5) { memmove(param_4,param_5,(ulong)(uVar5 + *(ushort *)(param_2 + 0x12))); } } else { *param_4 = 0; local_40 = param_3 + (uVar5 + 2); pcVar2 = param_3 + (uVar5 + 2); do { pcVar1 = local_40; if (param_5 <= pcVar1) { return pcVar2; } local_40 = pcVar1; uVar3 = (**(code **)(param_2 + 0x48))(param_2,uVar5,&local_40,local_38); *param_6 = uVar3; pcVar2 = pcVar1; } while (uVar3 != 0); mi_report_error(0x7e,*(int8 *)(*param_1 + 0x268)); puVar4 = (int4 *)_my_thread_var(); *puVar4 = 0x7e; param_5 = (char *)0x0; } return param_5; }
47,528
common_lcs(std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&)
monkey531[P]llama/common/common.cpp
size_t common_lcs(const llama_tokens & a, const llama_tokens & b) { // check for empty sequences if (a.empty() || b.empty()) { return 0; } // get the lengths of the input sequences size_t a_len = a.size(); size_t b_len = b.size(); // initialize the maximum length of the longest common subsequence (LCS) size_t max_length = 0; // use two rows instead of a 2D matrix to optimize space std::vector<size_t> prev_row(b_len + 1, 0); std::vector<size_t> curr_row(b_len + 1, 0); // iterate through the elements of a for (size_t i = 1; i <= a_len; i++) { // iterate through the elements of b for (size_t j = 1; j <= b_len; j++) { // if elements at the current positions match if (a[i - 1] == b[j - 1]) { // if it's the first element of either sequences, set LCS length to 1 if (i == 1 || j == 1) { curr_row[j] = 1; } else { // increment LCS length by 1 compared to the previous element curr_row[j] = prev_row[j - 1] + 1; } // update max_length if necessary if (curr_row[j] > max_length) { max_length = curr_row[j]; } } else { // reset LCS length if elements don't match curr_row[j] = 0; } } // update the previous row for the next iteration prev_row = curr_row; } // return the maximum length of the LCS return max_length; }
O0
cpp
common_lcs(std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&): subq $0xd8, %rsp movq %rdi, 0xc8(%rsp) movq %rsi, 0xc0(%rsp) movq 0xc8(%rsp), %rdi callq 0x102140 testb $0x1, %al jne 0xfa7ab movq 0xc0(%rsp), %rdi callq 0x102140 testb $0x1, %al jne 0xfa7ab jmp 0xfa7bc movq $0x0, 0xd0(%rsp) jmp 0xfaa90 movq 0xc8(%rsp), %rdi callq 0x6d0d0 movq %rax, 0xb8(%rsp) movq 0xc0(%rsp), %rdi callq 0x6d0d0 movq %rax, 0xb0(%rsp) movq $0x0, 0xa8(%rsp) movq 0xb0(%rsp), %rax incq %rax movq %rax, 0x28(%rsp) movq $0x0, 0x88(%rsp) leaq 0x87(%rsp), %rdi movq %rdi, 0x30(%rsp) callq 0xb5720 movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rcx leaq 0x90(%rsp), %rdi leaq 0x88(%rsp), %rdx callq 0x102410 jmp 0xfa841 leaq 0x87(%rsp), %rdi callq 0xb76b0 movq 0xb0(%rsp), %rax incq %rax movq %rax, 0x18(%rsp) movq $0x0, 0x50(%rsp) leaq 0x4f(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0xb5720 movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rcx leaq 0x58(%rsp), %rdi leaq 0x50(%rsp), %rdx callq 0x102410 jmp 0xfa891 leaq 0x4f(%rsp), %rdi callq 0xb76b0 movq $0x1, 0x40(%rsp) movq 0x40(%rsp), %rax cmpq 0xb8(%rsp), %rax ja 0xfaa58 movq $0x1, 0x38(%rsp) movq 0x38(%rsp), %rax cmpq 0xb0(%rsp), %rax ja 0xfaa15 movq 0xc8(%rsp), %rdi movq 0x40(%rsp), %rsi subq $0x1, %rsi callq 0xf03f0 movl (%rax), %eax movl %eax, 0x14(%rsp) movq 0xc0(%rsp), %rdi movq 0x38(%rsp), %rsi subq $0x1, %rsi callq 0xf03f0 movq %rax, %rcx movl 0x14(%rsp), %eax cmpl (%rcx), %eax jne 0xfa9ea cmpq $0x1, 0x40(%rsp) je 0xfa924 cmpq $0x1, 0x38(%rsp) jne 0xfa979 movq 0x38(%rsp), %rsi leaq 0x58(%rsp), %rdi callq 0x102490 movq $0x1, (%rax) jmp 0xfa9b2 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x78(%rsp) movl %eax, 0x74(%rsp) leaq 0x87(%rsp), %rdi callq 0xb76b0 jmp 0xfaaa0 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x78(%rsp) movl %eax, 0x74(%rsp) leaq 0x4f(%rsp), %rdi callq 0xb76b0 jmp 0xfaa81 movq 0x38(%rsp), %rsi subq $0x1, %rsi leaq 0x90(%rsp), %rdi callq 0x102490 movq (%rax), %rax addq $0x1, %rax movq %rax, 0x8(%rsp) movq 0x38(%rsp), %rsi leaq 0x58(%rsp), %rdi callq 0x102490 movq 0x8(%rsp), %rcx movq %rcx, (%rax) movq 0x38(%rsp), %rsi leaq 0x58(%rsp), %rdi callq 0x102490 movq (%rax), %rax cmpq 0xa8(%rsp), %rax jbe 0xfa9e8 movq 0x38(%rsp), %rsi leaq 0x58(%rsp), %rdi callq 0x102490 movq (%rax), %rax movq %rax, 0xa8(%rsp) jmp 0xfaa00 movq 0x38(%rsp), %rsi leaq 0x58(%rsp), %rdi callq 0x102490 movq $0x0, (%rax) jmp 0xfaa02 movq 0x38(%rsp), %rax addq $0x1, %rax movq %rax, 0x38(%rsp) jmp 0xfa8c0 leaq 0x90(%rsp), %rdi leaq 0x58(%rsp), %rsi callq 0x1024b0 jmp 0xfaa29 jmp 0xfaa2b movq 0x40(%rsp), %rax addq $0x1, %rax movq %rax, 0x40(%rsp) jmp 0xfa8a4 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x78(%rsp) movl %eax, 0x74(%rsp) leaq 0x58(%rsp), %rdi callq 0xcc490 jmp 0xfaa81 movq 0xa8(%rsp), %rax movq %rax, 0xd0(%rsp) leaq 0x58(%rsp), %rdi callq 0xcc490 leaq 0x90(%rsp), %rdi callq 0xcc490 jmp 0xfaa90 leaq 0x90(%rsp), %rdi callq 0xcc490 jmp 0xfaaa0 movq 0xd0(%rsp), %rax addq $0xd8, %rsp retq movq 0x78(%rsp), %rdi callq 0x5ccd0 nopw (%rax,%rax)
_Z10common_lcsRKSt6vectorIiSaIiEES3_: sub rsp, 0D8h mov [rsp+0D8h+var_10], rdi mov [rsp+0D8h+var_18], rsi mov rdi, [rsp+0D8h+var_10] call _ZNKSt6vectorIiSaIiEE5emptyEv; std::vector<int>::empty(void) test al, 1 jnz short loc_FA7AB mov rdi, [rsp+0D8h+var_18] call _ZNKSt6vectorIiSaIiEE5emptyEv; std::vector<int>::empty(void) test al, 1 jnz short loc_FA7AB jmp short loc_FA7BC loc_FA7AB: mov [rsp+0D8h+var_8], 0 jmp loc_FAA90 loc_FA7BC: mov rdi, [rsp+0D8h+var_10] call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void) mov [rsp+0D8h+var_20], rax mov rdi, [rsp+0D8h+var_18] call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void) mov [rsp+0D8h+var_28], rax mov [rsp+0D8h+var_30], 0 mov rax, [rsp+0D8h+var_28] inc rax mov [rsp+0D8h+var_B0], rax mov [rsp+0D8h+var_50], 0 lea rdi, [rsp+0D8h+var_51] mov [rsp+0D8h+var_A8], rdi call _ZNSaImEC2Ev; std::allocator<ulong>::allocator(void) mov rsi, [rsp+0D8h+var_B0] mov rcx, [rsp+0D8h+var_A8] lea rdi, [rsp+0D8h+var_48] lea rdx, [rsp+0D8h+var_50] call _ZNSt6vectorImSaImEEC2EmRKmRKS0_; std::vector<ulong>::vector(ulong,ulong const&,std::allocator<ulong> const&) jmp short $+2 loc_FA841: lea rdi, [rsp+0D8h+var_51] call _ZNSaImED2Ev; std::allocator<ulong>::~allocator() mov rax, [rsp+0D8h+var_28] inc rax mov [rsp+0D8h+var_C0], rax mov [rsp+0D8h+var_88], 0 lea rdi, [rsp+0D8h+var_89] mov [rsp+0D8h+var_B8], rdi call _ZNSaImEC2Ev; std::allocator<ulong>::allocator(void) mov rsi, [rsp+0D8h+var_C0] mov rcx, [rsp+0D8h+var_B8] lea rdi, [rsp+0D8h+var_80] lea rdx, [rsp+0D8h+var_88] call _ZNSt6vectorImSaImEEC2EmRKmRKS0_; std::vector<ulong>::vector(ulong,ulong const&,std::allocator<ulong> const&) jmp short $+2 loc_FA891: lea rdi, [rsp+0D8h+var_89] call _ZNSaImED2Ev; std::allocator<ulong>::~allocator() mov [rsp+0D8h+var_98], 1 loc_FA8A4: mov rax, [rsp+0D8h+var_98] cmp rax, [rsp+0D8h+var_20] ja loc_FAA58 mov [rsp+0D8h+var_A0], 1 loc_FA8C0: mov rax, [rsp+0D8h+var_A0] cmp rax, [rsp+0D8h+var_28] ja loc_FAA15 mov rdi, [rsp+0D8h+var_10] mov rsi, [rsp+0D8h+var_98] sub rsi, 1 call _ZNKSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong) mov eax, [rax] mov [rsp+0D8h+var_C4], eax mov rdi, [rsp+0D8h+var_18] mov rsi, [rsp+0D8h+var_A0] sub rsi, 1 call _ZNKSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong) mov rcx, rax mov eax, [rsp+0D8h+var_C4] cmp eax, [rcx] jnz loc_FA9EA cmp [rsp+0D8h+var_98], 1 jz short loc_FA924 cmp [rsp+0D8h+var_A0], 1 jnz short loc_FA979 loc_FA924: mov rsi, [rsp+0D8h+var_A0] lea rdi, [rsp+0D8h+var_80] call _ZNSt6vectorImSaImEEixEm; std::vector<ulong>::operator[](ulong) mov qword ptr [rax], 1 jmp short loc_FA9B2 mov rcx, rax mov eax, edx mov [rsp+arg_70], rcx mov [rsp+arg_6C], eax lea rdi, [rsp+arg_7F] call _ZNSaImED2Ev; std::allocator<ulong>::~allocator() jmp loc_FAAA0 mov rcx, rax mov eax, edx mov [rsp+arg_70], rcx mov [rsp+arg_6C], eax lea rdi, [rsp+arg_47] call _ZNSaImED2Ev; std::allocator<ulong>::~allocator() jmp loc_FAA81 loc_FA979: mov rsi, [rsp+0D8h+var_A0] sub rsi, 1 lea rdi, [rsp+0D8h+var_48] call _ZNSt6vectorImSaImEEixEm; std::vector<ulong>::operator[](ulong) mov rax, [rax] add rax, 1 mov [rsp+0D8h+var_D0], rax mov rsi, [rsp+0D8h+var_A0] lea rdi, [rsp+0D8h+var_80] call _ZNSt6vectorImSaImEEixEm; std::vector<ulong>::operator[](ulong) mov rcx, [rsp+0D8h+var_D0] mov [rax], rcx loc_FA9B2: mov rsi, [rsp+0D8h+var_A0] lea rdi, [rsp+0D8h+var_80] call _ZNSt6vectorImSaImEEixEm; std::vector<ulong>::operator[](ulong) mov rax, [rax] cmp rax, [rsp+0D8h+var_30] jbe short loc_FA9E8 mov rsi, [rsp+0D8h+var_A0] lea rdi, [rsp+0D8h+var_80] call _ZNSt6vectorImSaImEEixEm; std::vector<ulong>::operator[](ulong) mov rax, [rax] mov [rsp+0D8h+var_30], rax loc_FA9E8: jmp short loc_FAA00 loc_FA9EA: mov rsi, [rsp+0D8h+var_A0] lea rdi, [rsp+0D8h+var_80] call _ZNSt6vectorImSaImEEixEm; std::vector<ulong>::operator[](ulong) mov qword ptr [rax], 0 loc_FAA00: jmp short $+2 loc_FAA02: mov rax, [rsp+0D8h+var_A0] add rax, 1 mov [rsp+0D8h+var_A0], rax jmp loc_FA8C0 loc_FAA15: lea rdi, [rsp+0D8h+var_48] lea rsi, [rsp+0D8h+var_80] call _ZNSt6vectorImSaImEEaSERKS1_; std::vector<ulong>::operator=(std::vector<ulong> const&) jmp short $+2 loc_FAA29: jmp short $+2 loc_FAA2B: mov rax, [rsp+0D8h+var_98] add rax, 1 mov [rsp+0D8h+var_98], rax jmp loc_FA8A4 mov rcx, rax mov eax, edx mov [rsp+arg_70], rcx mov [rsp+arg_6C], eax lea rdi, [rsp+arg_50] call _ZNSt6vectorImSaImEED2Ev; std::vector<ulong>::~vector() jmp short loc_FAA81 loc_FAA58: mov rax, [rsp+0D8h+var_30] mov [rsp+0D8h+var_8], rax lea rdi, [rsp+0D8h+var_80] call _ZNSt6vectorImSaImEED2Ev; std::vector<ulong>::~vector() lea rdi, [rsp+0D8h+var_48] call _ZNSt6vectorImSaImEED2Ev; std::vector<ulong>::~vector() jmp short loc_FAA90 loc_FAA81: lea rdi, [rsp+arg_88] call _ZNSt6vectorImSaImEED2Ev; std::vector<ulong>::~vector() jmp short loc_FAAA0 loc_FAA90: mov rax, [rsp+0D8h+var_8] add rsp, 0D8h retn loc_FAAA0: mov rdi, [rsp+arg_70] call __Unwind_Resume
unsigned long long common_lcs(_QWORD *a1, _QWORD *a2) { int v2; // r8d int v3; // r9d int v4; // r8d int v5; // r9d unsigned long long *v6; // rax long long v8; // [rsp+8h] [rbp-D0h] int v9; // [rsp+14h] [rbp-C4h] int v10; // [rsp+18h] [rbp-C0h] int v11; // [rsp+28h] [rbp-B0h] unsigned long long j; // [rsp+38h] [rbp-A0h] unsigned long long i; // [rsp+40h] [rbp-98h] char v14; // [rsp+4Fh] [rbp-89h] BYREF long long v15; // [rsp+50h] [rbp-88h] BYREF long long v16[5]; // [rsp+58h] [rbp-80h] BYREF char v17; // [rsp+87h] [rbp-51h] BYREF long long v18; // [rsp+88h] [rbp-50h] BYREF long long v19[3]; // [rsp+90h] [rbp-48h] BYREF unsigned long long v20; // [rsp+A8h] [rbp-30h] unsigned long long v21; // [rsp+B0h] [rbp-28h] unsigned long long v22; // [rsp+B8h] [rbp-20h] _QWORD *v23; // [rsp+C0h] [rbp-18h] _QWORD *v24; // [rsp+C8h] [rbp-10h] unsigned long long v25; // [rsp+D0h] [rbp-8h] v24 = a1; v23 = a2; if ( (std::vector<int>::empty(a1) & 1) != 0 || (std::vector<int>::empty(v23) & 1) != 0 ) return 0LL; v22 = std::vector<int>::size(v24); v21 = std::vector<int>::size(v23); v20 = 0LL; v11 = v21 + 1; v18 = 0LL; std::allocator<unsigned long>::allocator((long long)&v17); std::vector<unsigned long>::vector((unsigned int)v19, v11, (unsigned int)&v18, (unsigned int)&v17, v2, v3); std::allocator<unsigned long>::~allocator((long long)&v17); v10 = v21 + 1; v15 = 0LL; std::allocator<unsigned long>::allocator((long long)&v14); std::vector<unsigned long>::vector((unsigned int)v16, v10, (unsigned int)&v15, (unsigned int)&v14, v4, v5); std::allocator<unsigned long>::~allocator((long long)&v14); for ( i = 1LL; i <= v22; ++i ) { for ( j = 1LL; j <= v21; ++j ) { v9 = *(_DWORD *)std::vector<int>::operator[](v24, i - 1); if ( v9 == *(_DWORD *)std::vector<int>::operator[](v23, j - 1) ) { if ( i == 1 || j == 1 ) { *(_QWORD *)std::vector<unsigned long>::operator[](v16, j) = 1LL; } else { v8 = *(_QWORD *)std::vector<unsigned long>::operator[](v19, j - 1) + 1LL; *(_QWORD *)std::vector<unsigned long>::operator[](v16, j) = v8; } v6 = (unsigned long long *)std::vector<unsigned long>::operator[](v16, j); if ( *v6 > v20 ) v20 = *(_QWORD *)std::vector<unsigned long>::operator[](v16, j); } else { *(_QWORD *)std::vector<unsigned long>::operator[](v16, j) = 0LL; } } std::vector<unsigned long>::operator=(v19, v16); } v25 = v20; std::vector<unsigned long>::~vector(v16); std::vector<unsigned long>::~vector(v19); return v25; }
common_lcs: SUB RSP,0xd8 MOV qword ptr [RSP + 0xc8],RDI MOV qword ptr [RSP + 0xc0],RSI MOV RDI,qword ptr [RSP + 0xc8] CALL 0x00202140 TEST AL,0x1 JNZ 0x001fa7ab MOV RDI,qword ptr [RSP + 0xc0] CALL 0x00202140 TEST AL,0x1 JNZ 0x001fa7ab JMP 0x001fa7bc LAB_001fa7ab: MOV qword ptr [RSP + 0xd0],0x0 JMP 0x001faa90 LAB_001fa7bc: MOV RDI,qword ptr [RSP + 0xc8] CALL 0x0016d0d0 MOV qword ptr [RSP + 0xb8],RAX MOV RDI,qword ptr [RSP + 0xc0] CALL 0x0016d0d0 MOV qword ptr [RSP + 0xb0],RAX MOV qword ptr [RSP + 0xa8],0x0 MOV RAX,qword ptr [RSP + 0xb0] INC RAX MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x88],0x0 LEA RDI,[RSP + 0x87] MOV qword ptr [RSP + 0x30],RDI CALL 0x001b5720 MOV RSI,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x30] LAB_001fa82a: LEA RDI,[RSP + 0x90] LEA RDX,[RSP + 0x88] CALL 0x00202410 JMP 0x001fa841 LAB_001fa841: LEA RDI,[RSP + 0x87] CALL 0x001b76b0 MOV RAX,qword ptr [RSP + 0xb0] INC RAX MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x50],0x0 LEA RDI,[RSP + 0x4f] MOV qword ptr [RSP + 0x20],RDI CALL 0x001b5720 MOV RSI,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x20] LAB_001fa880: LEA RDI,[RSP + 0x58] LEA RDX,[RSP + 0x50] CALL 0x00202410 JMP 0x001fa891 LAB_001fa891: LEA RDI,[RSP + 0x4f] CALL 0x001b76b0 MOV qword ptr [RSP + 0x40],0x1 LAB_001fa8a4: MOV RAX,qword ptr [RSP + 0x40] CMP RAX,qword ptr [RSP + 0xb8] JA 0x001faa58 MOV qword ptr [RSP + 0x38],0x1 LAB_001fa8c0: MOV RAX,qword ptr [RSP + 0x38] CMP RAX,qword ptr [RSP + 0xb0] JA 0x001faa15 MOV RDI,qword ptr [RSP + 0xc8] MOV RSI,qword ptr [RSP + 0x40] SUB RSI,0x1 CALL 0x001f03f0 MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x14],EAX MOV RDI,qword ptr [RSP + 0xc0] MOV RSI,qword ptr [RSP + 0x38] SUB RSI,0x1 CALL 0x001f03f0 MOV RCX,RAX MOV EAX,dword ptr [RSP + 0x14] CMP EAX,dword ptr [RCX] JNZ 0x001fa9ea CMP qword ptr [RSP + 0x40],0x1 JZ 0x001fa924 CMP qword ptr [RSP + 0x38],0x1 JNZ 0x001fa979 LAB_001fa924: MOV RSI,qword ptr [RSP + 0x38] LEA RDI,[RSP + 0x58] CALL 0x00202490 MOV qword ptr [RAX],0x1 JMP 0x001fa9b2 LAB_001fa979: MOV RSI,qword ptr [RSP + 0x38] SUB RSI,0x1 LEA RDI,[RSP + 0x90] CALL 0x00202490 MOV RAX,qword ptr [RAX] ADD RAX,0x1 MOV qword ptr [RSP + 0x8],RAX MOV RSI,qword ptr [RSP + 0x38] LEA RDI,[RSP + 0x58] CALL 0x00202490 MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RAX],RCX LAB_001fa9b2: MOV RSI,qword ptr [RSP + 0x38] LEA RDI,[RSP + 0x58] CALL 0x00202490 MOV RAX,qword ptr [RAX] CMP RAX,qword ptr [RSP + 0xa8] JBE 0x001fa9e8 MOV RSI,qword ptr [RSP + 0x38] LEA RDI,[RSP + 0x58] CALL 0x00202490 MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0xa8],RAX LAB_001fa9e8: JMP 0x001faa00 LAB_001fa9ea: MOV RSI,qword ptr [RSP + 0x38] LEA RDI,[RSP + 0x58] CALL 0x00202490 MOV qword ptr [RAX],0x0 LAB_001faa00: JMP 0x001faa02 LAB_001faa02: MOV RAX,qword ptr [RSP + 0x38] ADD RAX,0x1 MOV qword ptr [RSP + 0x38],RAX JMP 0x001fa8c0 LAB_001faa15: LEA RDI,[RSP + 0x90] LEA RSI,[RSP + 0x58] CALL 0x002024b0 LAB_001faa27: JMP 0x001faa29 LAB_001faa29: JMP 0x001faa2b LAB_001faa2b: MOV RAX,qword ptr [RSP + 0x40] ADD RAX,0x1 MOV qword ptr [RSP + 0x40],RAX JMP 0x001fa8a4 LAB_001faa58: MOV RAX,qword ptr [RSP + 0xa8] MOV qword ptr [RSP + 0xd0],RAX LEA RDI,[RSP + 0x58] CALL 0x001cc490 LEA RDI,[RSP + 0x90] CALL 0x001cc490 JMP 0x001faa90 LAB_001faa90: MOV RAX,qword ptr [RSP + 0xd0] ADD RSP,0xd8 RET
/* common_lcs(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&) */ ulong common_lcs(vector *param_1,vector *param_2) { int iVar1; long lVar2; ulong uVar3; int *piVar4; int8 *puVar5; long *plVar6; ulong *puVar7; ulong local_a0; ulong local_98; allocator<unsigned_long> local_89; ulong local_88; vector<unsigned_long,std::allocator<unsigned_long>> local_80 [47]; allocator<unsigned_long> local_51; ulong local_50; vector<unsigned_long,std::allocator<unsigned_long>> local_48 [24]; ulong local_30; ulong local_28; ulong local_20; vector<int,std::allocator<int>> *local_18; vector *local_10; ulong local_8; local_18 = (vector<int,std::allocator<int>> *)param_2; local_10 = param_1; uVar3 = std::vector<int,std::allocator<int>>::empty((vector<int,std::allocator<int>> *)param_1); if (((uVar3 & 1) == 0) && (uVar3 = std::vector<int,std::allocator<int>>::empty(local_18), (uVar3 & 1) == 0)) { local_20 = std::vector<int,std::allocator<int>>::size ((vector<int,std::allocator<int>> *)local_10); local_28 = std::vector<int,std::allocator<int>>::size(local_18); local_30 = 0; uVar3 = local_28 + 1; local_50 = 0; std::allocator<unsigned_long>::allocator(&local_51); /* try { // try from 001fa82a to 001fa83e has its CatchHandler @ 001fa93c */ std::vector<unsigned_long,std::allocator<unsigned_long>>::vector (local_48,uVar3,&local_50,(allocator *)&local_51); std::allocator<unsigned_long>::~allocator(&local_51); uVar3 = local_28 + 1; local_88 = 0; std::allocator<unsigned_long>::allocator(&local_89); /* try { // try from 001fa880 to 001fa88e has its CatchHandler @ 001fa95c */ std::vector<unsigned_long,std::allocator<unsigned_long>>::vector (local_80,uVar3,&local_88,(allocator *)&local_89); std::allocator<unsigned_long>::~allocator(&local_89); for (local_98 = 1; local_98 <= local_20; local_98 = local_98 + 1) { for (local_a0 = 1; local_a0 <= local_28; local_a0 = local_a0 + 1) { piVar4 = (int *)std::vector<int,std::allocator<int>>::operator[] ((vector<int,std::allocator<int>> *)local_10,local_98 - 1); iVar1 = *piVar4; piVar4 = (int *)std::vector<int,std::allocator<int>>::operator[](local_18,local_a0 - 1); if (iVar1 == *piVar4) { if ((local_98 == 1) || (local_a0 == 1)) { puVar5 = (int8 *) std::vector<unsigned_long,std::allocator<unsigned_long>>::operator[] (local_80,local_a0); *puVar5 = 1; } else { plVar6 = (long *)std::vector<unsigned_long,std::allocator<unsigned_long>>::operator[] (local_48,local_a0 - 1); lVar2 = *plVar6; plVar6 = (long *)std::vector<unsigned_long,std::allocator<unsigned_long>>::operator[] (local_80,local_a0); *plVar6 = lVar2 + 1; } puVar7 = (ulong *)std::vector<unsigned_long,std::allocator<unsigned_long>>::operator[] (local_80,local_a0); if (local_30 < *puVar7) { puVar7 = (ulong *)std::vector<unsigned_long,std::allocator<unsigned_long>>::operator[] (local_80,local_a0); local_30 = *puVar7; } } else { puVar5 = (int8 *) std::vector<unsigned_long,std::allocator<unsigned_long>>::operator[] (local_80,local_a0); *puVar5 = 0; } } /* try { // try from 001faa15 to 001faa26 has its CatchHandler @ 001faa3e */ std::vector<unsigned_long,std::allocator<unsigned_long>>::operator= (local_48,(vector *)local_80); } local_8 = local_30; std::vector<unsigned_long,std::allocator<unsigned_long>>::~vector(local_80); std::vector<unsigned_long,std::allocator<unsigned_long>>::~vector(local_48); } else { local_8 = 0; } return local_8; }
47,529
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::key() const
monkey531[P]llama/common/json.hpp
const string_type& key() const { JSON_ASSERT(anchor.m_object != nullptr); switch (anchor.m_object->type()) { // use integer array index as key case value_t::array: { if (array_index != array_index_last) { int_to_string( array_index_str, array_index ); array_index_last = array_index; } return array_index_str; } // use key from the object case value_t::object: return anchor.key(); // use an empty key for all primitive types case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: return empty_str; } }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::key() const: pushq %rbx movq (%rdi), %rax testq %rax, %rax je 0x9983a movq %rdi, %rbx movzbl (%rax), %eax cmpl $0x1, %eax je 0x99828 cmpl $0x2, %eax jne 0x99831 movq 0x20(%rbx), %rsi cmpq 0x28(%rbx), %rsi je 0x99822 leaq 0x30(%rbx), %rdi callq 0x9c11f movq 0x20(%rbx), %rax movq %rax, 0x28(%rbx) addq $0x30, %rbx jmp 0x99835 movq %rbx, %rdi popq %rbx jmp 0x83c56 addq $0x50, %rbx movq %rbx, %rax popq %rbx retq leaq 0x34a3e(%rip), %rdi # 0xce27f leaq 0x2d0fb(%rip), %rdx # 0xc6943 leaq 0x38d2e(%rip), %rcx # 0xd257d movl $0x1491, %esi # imm = 0x1491 xorl %eax, %eax callq 0x27520 nop
_ZNK8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3keyEv: push rbx mov rax, [rdi] test rax, rax jz short loc_9983A mov rbx, rdi movzx eax, byte ptr [rax] cmp eax, 1 jz short loc_99828 cmp eax, 2 jnz short loc_99831 mov rsi, [rbx+20h] cmp rsi, [rbx+28h] jz short loc_99822 lea rdi, [rbx+30h] call _ZN8nlohmann16json_abi_v3_11_36detail13int_to_stringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRT_m; nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(std::string &,ulong) mov rax, [rbx+20h] mov [rbx+28h], rax loc_99822: add rbx, 30h ; '0' jmp short loc_99835 loc_99828: mov rdi, rbx pop rbx jmp _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::key(void) loc_99831: add rbx, 50h ; 'P' loc_99835: mov rax, rbx pop rbx retn loc_9983A: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN; "anchor.m_object != nullptr" mov esi, 1491h xor eax, eax call _ggml_abort nop
long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::key( unsigned __int8 **a1) { int v1; // eax if ( *a1 ) { v1 = **a1; if ( v1 == 1 ) { return nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::key(a1); } else { if ( v1 != 2 ) return (long long)(a1 + 10); if ( a1[4] != a1[5] ) { nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(a1 + 6); a1[5] = a1[4]; } return (long long)(a1 + 6); } } else { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 5265LL, "GGML_ASSERT(%s) failed", "anchor.m_object != nullptr"); return nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::operator++("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp"); } }
key: PUSH RBX MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x0019983a MOV RBX,RDI MOVZX EAX,byte ptr [RAX] CMP EAX,0x1 JZ 0x00199828 CMP EAX,0x2 JNZ 0x00199831 MOV RSI,qword ptr [RBX + 0x20] CMP RSI,qword ptr [RBX + 0x28] JZ 0x00199822 LEA RDI,[RBX + 0x30] CALL 0x0019c11f MOV RAX,qword ptr [RBX + 0x20] MOV qword ptr [RBX + 0x28],RAX LAB_00199822: ADD RBX,0x30 JMP 0x00199835 LAB_00199828: MOV RDI,RBX POP RBX JMP 0x00183c56 LAB_00199831: ADD RBX,0x50 LAB_00199835: MOV RAX,RBX POP RBX RET LAB_0019983a: LEA RDI,[0x1ce27f] LEA RDX,[0x1c6943] LEA RCX,[0x1d257d] MOV ESI,0x1491 XOR EAX,EAX CALL 0x00127520
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const> >::key() const */ iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> * __thiscall nlohmann::json_abi_v3_11_3::detail:: iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> ::key(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> *this) { char cVar1; iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> *piVar2; if (*(char **)this == (char *)0x0) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1491, "GGML_ASSERT(%s) failed","anchor.m_object != nullptr"); } cVar1 = **(char **)this; if (cVar1 != '\x01') { if (cVar1 == '\x02') { if (*(ulong *)(this + 0x20) != *(ulong *)(this + 0x28)) { int_to_string<std::__cxx11::string>((string *)(this + 0x30),*(ulong *)(this + 0x20)); *(int8 *)(this + 0x28) = *(int8 *)(this + 0x20); } piVar2 = this + 0x30; } else { piVar2 = this + 0x50; } return piVar2; } piVar2 = (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> *)iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> ::key((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> *)this); return piVar2; }
47,530
ggml_new_f32
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
struct ggml_tensor * ggml_new_f32(struct ggml_context * ctx, float value) { ggml_scratch_save(ctx); struct ggml_tensor * result = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, 1); ggml_scratch_load(ctx); ggml_set_f32(result, value); return result; }
O2
c
ggml_new_f32: pushq %rbx subq $0x10, %rsp vmovss %xmm0, 0xc(%rsp) movq %rdi, %rbx movb 0x11(%rdi), %al movb %al, 0x12(%rdi) movb $0x0, 0x11(%rdi) vmovups 0x28(%rdi), %xmm0 vmovups %xmm0, 0x40(%rdi) movq 0x38(%rdi), %rax movq %rax, 0x50(%rdi) andq $0x0, 0x38(%rdi) pushq $0x1 popq %rdx xorl %esi, %esi callq 0x68616 movb 0x12(%rbx), %cl movb %cl, 0x11(%rbx) vmovups 0x40(%rbx), %xmm0 vmovups %xmm0, 0x28(%rbx) movq 0x50(%rbx), %rcx movq %rcx, 0x38(%rbx) movq %rax, %rdi vmovss 0xc(%rsp), %xmm0 addq $0x10, %rsp popq %rbx jmp 0x688d8
ggml_new_f32: push rbx sub rsp, 10h vmovss [rsp+18h+var_C], xmm0 mov rbx, rdi mov al, [rdi+11h] mov [rdi+12h], al mov byte ptr [rdi+11h], 0 vmovups xmm0, xmmword ptr [rdi+28h] vmovups xmmword ptr [rdi+40h], xmm0 mov rax, [rdi+38h] mov [rdi+50h], rax and qword ptr [rdi+38h], 0 push 1 pop rdx xor esi, esi call ggml_new_tensor_1d mov cl, [rbx+12h] mov [rbx+11h], cl vmovups xmm0, xmmword ptr [rbx+40h] vmovups xmmword ptr [rbx+28h], xmm0 mov rcx, [rbx+50h] mov [rbx+38h], rcx mov rdi, rax vmovss xmm0, [rsp+18h+var_C] add rsp, 10h pop rbx jmp $+5
long long ggml_new_f32(long long _RDI, __m128 _XMM0) { long long v4; // rax __asm { vmovss [rsp+18h+var_C], xmm0 } _RBX = _RDI; *(_BYTE *)(_RDI + 18) = *(_BYTE *)(_RDI + 17); *(_BYTE *)(_RDI + 17) = 0; __asm { vmovups xmm0, xmmword ptr [rdi+28h] vmovups xmmword ptr [rdi+40h], xmm0 } *(_QWORD *)(_RDI + 80) = *(_QWORD *)(_RDI + 56); *(_QWORD *)(_RDI + 56) = 0LL; v4 = ggml_new_tensor_1d(_RDI, 0LL, 1LL); *(_BYTE *)(_RDI + 17) = *(_BYTE *)(_RDI + 18); __asm { vmovups xmm0, xmmword ptr [rbx+40h] vmovups xmmword ptr [rbx+28h], xmm0 } *(_QWORD *)(_RDI + 56) = *(_QWORD *)(_RDI + 80); __asm { vmovss xmm0, [rsp+18h+var_C] } return ggml_set_f32(v4, *(float *)&_XMM0); }
ggml_new_f32: PUSH RBX SUB RSP,0x10 VMOVSS dword ptr [RSP + 0xc],XMM0 MOV RBX,RDI MOV AL,byte ptr [RDI + 0x11] MOV byte ptr [RDI + 0x12],AL MOV byte ptr [RDI + 0x11],0x0 VMOVUPS XMM0,xmmword ptr [RDI + 0x28] VMOVUPS xmmword ptr [RDI + 0x40],XMM0 MOV RAX,qword ptr [RDI + 0x38] MOV qword ptr [RDI + 0x50],RAX AND qword ptr [RDI + 0x38],0x0 PUSH 0x1 POP RDX XOR ESI,ESI CALL 0x00168616 MOV CL,byte ptr [RBX + 0x12] MOV byte ptr [RBX + 0x11],CL VMOVUPS XMM0,xmmword ptr [RBX + 0x40] VMOVUPS xmmword ptr [RBX + 0x28],XMM0 MOV RCX,qword ptr [RBX + 0x50] MOV qword ptr [RBX + 0x38],RCX MOV RDI,RAX VMOVSS XMM0,dword ptr [RSP + 0xc] ADD RSP,0x10 POP RBX JMP 0x001688d8
void ggml_new_f32(int4 param_1,long param_2) { int8 uVar1; *(int1 *)(param_2 + 0x12) = *(int1 *)(param_2 + 0x11); *(int1 *)(param_2 + 0x11) = 0; *(int8 *)(param_2 + 0x40) = *(int8 *)(param_2 + 0x28); *(int8 *)(param_2 + 0x48) = *(int8 *)(param_2 + 0x30); *(int8 *)(param_2 + 0x50) = *(int8 *)(param_2 + 0x38); *(int8 *)(param_2 + 0x38) = 0; uVar1 = ggml_new_tensor_1d(param_2,0,1); *(int1 *)(param_2 + 0x11) = *(int1 *)(param_2 + 0x12); *(int8 *)(param_2 + 0x28) = *(int8 *)(param_2 + 0x40); *(int8 *)(param_2 + 0x30) = *(int8 *)(param_2 + 0x48); *(int8 *)(param_2 + 0x38) = *(int8 *)(param_2 + 0x50); ggml_set_f32(param_1,uVar1); return; }
47,531
google::protobuf::OneofDescriptor::DebugStringWithOptions[abi:cxx11](google::protobuf::DebugStringOptions const&) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
std::string OneofDescriptor::DebugStringWithOptions( const DebugStringOptions& options) const { std::string contents; DebugString(0, &contents, options); return contents; }
O3
cpp
google::protobuf::OneofDescriptor::DebugStringWithOptions[abi:cxx11](google::protobuf::DebugStringOptions const&) const: pushq %r15 pushq %r14 pushq %rbx movq %rdx, %rcx movq %rdi, %rbx leaq 0x10(%rdi), %r15 movq %r15, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi xorl %esi, %esi movq %rbx, %rdx callq 0xc727a movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq (%rbx), %rdi cmpq %r15, %rdi je 0xc79a0 callq 0x2d160 movq %r14, %rdi callq 0x2e220
_ZNK6google8protobuf15OneofDescriptor22DebugStringWithOptionsB5cxx11ERKNS0_18DebugStringOptionsE: push r15; int push r14; char push rbx; int mov rcx, rdx 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; this xor esi, esi mov rdx, rbx call _ZNK6google8protobuf15OneofDescriptor11DebugStringEiPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_18DebugStringOptionsE; google::protobuf::OneofDescriptor::DebugString(int,std::string *,google::protobuf::DebugStringOptions const&) mov rax, rbx pop rbx pop r14 pop r15 retn mov r14, rax mov rdi, [rbx]; void * cmp rdi, r15 jz short loc_C79A0 call __ZdlPv; operator delete(void *) loc_C79A0: mov rdi, r14 call __Unwind_Resume
long long google::protobuf::OneofDescriptor::DebugStringWithOptions[abi:cxx11]( long long a1, google::protobuf::OneofDescriptor *a2, long long a3) { *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; google::protobuf::OneofDescriptor::DebugString(a2, 0, a1, a3); return a1; }
DebugStringWithOptions[abi:cxx11]: PUSH R15 PUSH R14 PUSH RBX MOV RCX,RDX MOV RBX,RDI LEA R15,[RDI + 0x10] MOV qword ptr [RDI],R15 MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 LAB_001c797a: MOV RDI,RSI XOR ESI,ESI MOV RDX,RBX CALL 0x001c727a LAB_001c7987: MOV RAX,RBX POP RBX POP R14 POP R15 RET
/* google::protobuf::OneofDescriptor::DebugStringWithOptions[abi:cxx11](google::protobuf::DebugStringOptions const&) const */ DebugStringOptions * google::protobuf::OneofDescriptor::DebugStringWithOptions_abi_cxx11_(DebugStringOptions *param_1) { DebugStringOptions *in_RDX; OneofDescriptor *in_RSI; *(DebugStringOptions **)param_1 = param_1 + 0x10; *(int8 *)(param_1 + 8) = 0; param_1[0x10] = (DebugStringOptions)0x0; /* try { // try from 001c797a to 001c7986 has its CatchHandler @ 001c7990 */ DebugString(in_RSI,0,(string *)param_1,in_RDX); return param_1; }
47,532
mysql_fetch_row_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_fetch_row_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_fetch_row, (parms->result), parms->result->handle, MYSQL_ROW, r_ptr) }
O3
c
mysql_fetch_row_start_internal: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq (%rdi), %rdi movq 0x78(%rdi), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rbx callq 0x1b3f8 movq %rax, 0x8(%rbx) movl $0x0, (%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
mysql_fetch_row_start_internal: push rbp mov rbp, rsp push rbx push rax mov rdi, [rdi] mov rax, [rdi+78h] mov rax, [rax+480h] mov rbx, [rax+28h] call mysql_fetch_row mov [rbx+8], rax mov dword ptr [rbx], 0 add rsp, 8 pop rbx pop rbp retn
long long mysql_fetch_row_start_internal(long long *a1) { long long v1; // rdi long long v2; // rbx long long result; // rax v1 = *a1; v2 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(v1 + 120) + 1152LL) + 40LL); result = mysql_fetch_row(v1); *(_QWORD *)(v2 + 8) = result; *(_DWORD *)v2 = 0; return result; }
mysql_fetch_row_start_internal: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RDI,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x78] MOV RAX,qword ptr [RAX + 0x480] MOV RBX,qword ptr [RAX + 0x28] CALL 0x0011b3f8 MOV qword ptr [RBX + 0x8],RAX MOV dword ptr [RBX],0x0 ADD RSP,0x8 POP RBX POP RBP RET
void mysql_fetch_row_start_internal(long *param_1) { int4 *puVar1; int8 uVar2; puVar1 = *(int4 **)(*(long *)(*(long *)(*param_1 + 0x78) + 0x480) + 0x28); uVar2 = mysql_fetch_row(); *(int8 *)(puVar1 + 2) = uVar2; *puVar1 = 0; return; }
47,533
my_longlong10_to_str_8bit
eloqsql/strings/ctype-simple.c
size_t my_longlong10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)), char *dst, size_t len, int radix, longlong val) { char buffer[65]; register char *p, *e; long long_val; uint sign= 0; ulonglong uval = (ulonglong)val; if (radix < 0) { if (val < 0) { /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */ uval = (ulonglong)0 - uval; *dst++= '-'; len--; sign= 1; } } e = p = &buffer[sizeof(buffer)-1]; *p= 0; if (uval == 0) { *--p= '0'; len= 1; goto cnv; } while (uval > (ulonglong) LONG_MAX) { ulonglong quo= uval/(uint) 10; uint rem= (uint) (uval- quo* (uint) 10); *--p = '0' + rem; uval= quo; } long_val= (long) uval; while (long_val != 0) { long quo= long_val/10; *--p = (char) ('0' + (long_val - quo*10)); long_val= quo; } len= MY_MIN(len, (size_t) (e-p)); cnv: memcpy(dst, p, len); return len+sign; }
O3
c
my_longlong10_to_str_8bit: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x50, %rsp movq %rdx, %r9 movq %rsi, %rdi movq %fs:0x28, %rax movq %rax, -0x18(%rbp) testl %ecx, %ecx setns %al testq %r8, %r8 setns %cl orb %al, %cl jne 0x71456 negq %r8 movb $0x2d, (%rdi) incq %rdi decq %r9 leaq -0x20(%rbp), %rbx movb $0x0, (%rbx) movl $0x1, %r14d jmp 0x7146a movb $0x0, -0x20(%rbp) testq %r8, %r8 je 0x714f6 leaq -0x20(%rbp), %rbx xorl %r14d, %r14d movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD testq %r8, %r8 js 0x7147e movq %rbx, %rsi jmp 0x7149f movq %r8, %rax mulq %rcx shrq $0x3, %rdx leaq -0x21(%rbp), %rsi imull $0xf6, %edx, %eax addl %eax, %r8d addb $0x30, %r8b movb %r8b, (%rsi) movq %rdx, %r8 subq %rsi, %rbx movq %r8, %rax mulq %rcx shrq $0x3, %rdx imull $0xf6, %edx, %eax addl %r8d, %eax addb $0x30, %al movb %al, -0x1(%rsi) decq %rsi incq %rbx cmpq $0x9, %r8 movq %rdx, %r8 ja 0x714a2 cmpq %rbx, %r9 cmovbq %r9, %rbx movq %rbx, %rdx callq 0x282d0 movq %fs:0x28, %rax cmpq -0x18(%rbp), %rax jne 0x71507 addq %r14, %rbx movq %rbx, %rax addq $0x50, %rsp popq %rbx popq %r14 popq %rbp retq leaq -0x21(%rbp), %rsi movb $0x30, (%rsi) movl $0x1, %ebx xorl %r14d, %r14d jmp 0x714d0 callq 0x28440
my_longlong10_to_str_8bit: push rbp mov rbp, rsp push r14 push rbx sub rsp, 50h mov r9, rdx mov rdi, rsi mov rax, fs:28h mov [rbp+var_18], rax test ecx, ecx setns al test r8, r8 setns cl or cl, al jnz short loc_71456 neg r8 mov byte ptr [rdi], 2Dh ; '-' inc rdi dec r9 lea rbx, [rbp+var_20] mov byte ptr [rbx], 0 mov r14d, 1 jmp short loc_7146A loc_71456: mov [rbp+var_20], 0 test r8, r8 jz loc_714F6 lea rbx, [rbp+var_20] xor r14d, r14d loc_7146A: mov rcx, 0CCCCCCCCCCCCCCCDh test r8, r8 js short loc_7147E mov rsi, rbx jmp short loc_7149F loc_7147E: mov rax, r8 mul rcx shr rdx, 3 lea rsi, [rbp+var_21] imul eax, edx, 0F6h add r8d, eax add r8b, 30h ; '0' mov [rsi], r8b mov r8, rdx loc_7149F: sub rbx, rsi loc_714A2: mov rax, r8 mul rcx shr rdx, 3 imul eax, edx, 0F6h add eax, r8d add al, 30h ; '0' mov [rsi-1], al dec rsi inc rbx cmp r8, 9 mov r8, rdx ja short loc_714A2 cmp r9, rbx cmovb rbx, r9 loc_714D0: mov rdx, rbx call _memcpy mov rax, fs:28h cmp rax, [rbp+var_18] jnz short loc_71507 add rbx, r14 mov rax, rbx add rsp, 50h pop rbx pop r14 pop rbp retn loc_714F6: lea rsi, [rbp+var_21] mov byte ptr [rsi], 30h ; '0' mov ebx, 1 xor r14d, r14d jmp short loc_714D0 loc_71507: call ___stack_chk_fail
_BYTE * my_longlong10_to_str_8bit(long long a1, _BYTE *a2, _BYTE *a3, int a4, unsigned long long a5) { _BYTE *v5; // r9 _BYTE *v6; // rdi long long v7; // r14 char *v8; // rsi _BYTE *v9; // rbx bool v10; // cc char v12; // [rsp+3Fh] [rbp-21h] BYREF _BYTE v13[8]; // [rsp+40h] [rbp-20h] BYREF unsigned long long v14; // [rsp+48h] [rbp-18h] v5 = a3; v6 = a2; v14 = __readfsqword(0x28u); if ( a4 >= 0 || (a5 & 0x8000000000000000LL) == 0LL ) { v13[0] = 0; if ( !a5 ) { v8 = &v12; v12 = 48; v9 = (_BYTE *)(&dword_0 + 1); v7 = 0LL; goto LABEL_12; } v7 = 0LL; } else { a5 = -(long long)a5; *a2 = 45; v6 = a2 + 1; v5 = a3 - 1; v13[0] = 0; v7 = 1LL; } if ( (a5 & 0x8000000000000000LL) != 0LL ) { v8 = &v12; v12 = a5 % 0xA + 48; a5 /= 0xAuLL; } else { v8 = v13; } v9 = (_BYTE *)(v13 - v8); do { *--v8 = a5 % 0xA + 48; ++v9; v10 = a5 <= 9; a5 /= 0xAuLL; } while ( !v10 ); if ( v5 < v9 ) v9 = v5; LABEL_12: memcpy(v6, v8, v9); return &v9[v7]; }
my_longlong10_to_str_8bit: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x50 MOV R9,RDX MOV RDI,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX TEST ECX,ECX SETNS AL TEST R8,R8 SETNS CL OR CL,AL JNZ 0x00171456 NEG R8 MOV byte ptr [RDI],0x2d INC RDI DEC R9 LEA RBX,[RBP + -0x20] MOV byte ptr [RBX],0x0 MOV R14D,0x1 JMP 0x0017146a LAB_00171456: MOV byte ptr [RBP + -0x20],0x0 TEST R8,R8 JZ 0x001714f6 LEA RBX,[RBP + -0x20] XOR R14D,R14D LAB_0017146a: MOV RCX,-0x3333333333333333 TEST R8,R8 JS 0x0017147e MOV RSI,RBX JMP 0x0017149f LAB_0017147e: MOV RAX,R8 MUL RCX SHR RDX,0x3 LEA RSI,[RBP + -0x21] IMUL EAX,EDX,0xf6 ADD R8D,EAX ADD R8B,0x30 MOV byte ptr [RSI],R8B MOV R8,RDX LAB_0017149f: SUB RBX,RSI LAB_001714a2: MOV RAX,R8 MUL RCX SHR RDX,0x3 IMUL EAX,EDX,0xf6 ADD EAX,R8D ADD AL,0x30 MOV byte ptr [RSI + -0x1],AL DEC RSI INC RBX CMP R8,0x9 MOV R8,RDX JA 0x001714a2 CMP R9,RBX CMOVC RBX,R9 LAB_001714d0: MOV RDX,RBX CALL 0x001282d0 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x00171507 ADD RBX,R14 MOV RAX,RBX ADD RSP,0x50 POP RBX POP R14 POP RBP RET LAB_001714f6: LEA RSI,[RBP + -0x21] MOV byte ptr [RSI],0x30 MOV EBX,0x1 XOR R14D,R14D JMP 0x001714d0 LAB_00171507: CALL 0x00128440
long my_longlong10_to_str_8bit (int8 param_1,int1 *param_2,ulong param_3,int param_4,ulong param_5) { bool bVar1; ulong __n; char *__src; long lVar2; long in_FS_OFFSET; char local_29 [9]; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); if ((long)param_5 < 0 && param_4 < 0) { param_5 = -param_5; *param_2 = 0x2d; param_2 = param_2 + 1; param_3 = param_3 - 1; lVar2 = 1; } else { if (param_5 == 0) { __src = local_29; local_29[0] = '0'; __n = 1; lVar2 = 0; goto LAB_001714d0; } lVar2 = 0; } __src = local_29 + 1; if ((long)param_5 < 0) { local_29[0] = (char)param_5 + (char)(param_5 / 10) * -10 + '0'; __src = local_29; param_5 = param_5 / 10; } __n = (long)(local_29 + 1) - (long)__src; do { __src[-1] = (char)(param_5 / 10) * -10 + (char)param_5 + '0'; __src = __src + -1; __n = __n + 1; bVar1 = 9 < param_5; param_5 = param_5 / 10; } while (bVar1); if (param_3 < __n) { __n = param_3; } LAB_001714d0: local_29[1] = 0; memcpy(param_2,__src,__n); if (*(long *)(in_FS_OFFSET + 0x28) != local_20) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return __n + lVar2; }
47,534
create_fromuni
eloqsql/strings/ctype-simple.c
static my_bool create_fromuni(struct charset_info_st *cs, MY_CHARSET_LOADER *loader) { uni_idx idx[PLANE_NUM]; int i,n; /* Check that Unicode map is loaded. It can be not loaded when the collation is listed in Index.xml but not specified in the character set specific XML file. */ if (!cs->tab_to_uni) return TRUE; /* Clear plane statistics */ bzero(idx,sizeof(idx)); /* Count number of characters in each plane */ for (i=0; i< 0x100; i++) { uint16 wc=cs->tab_to_uni[i]; int pl= PLANE_NUMBER(wc); if (wc || !i) { if (!idx[pl].nchars) { idx[pl].uidx.from=wc; idx[pl].uidx.to=wc; }else { idx[pl].uidx.from=wc<idx[pl].uidx.from?wc:idx[pl].uidx.from; idx[pl].uidx.to=wc>idx[pl].uidx.to?wc:idx[pl].uidx.to; } idx[pl].nchars++; } } /* Sort planes in descending order */ qsort(&idx,PLANE_NUM,sizeof(uni_idx),&pcmp); for (i=0; i < PLANE_NUM; i++) { int ch,numchars; uchar *tab; /* Skip empty plane */ if (!idx[i].nchars) break; numchars=idx[i].uidx.to-idx[i].uidx.from+1; if (!(idx[i].uidx.tab= tab= (uchar*) (loader->once_alloc) (numchars * sizeof(*idx[i].uidx.tab)))) return TRUE; bzero(tab,numchars*sizeof(*tab)); for (ch=1; ch < PLANE_SIZE; ch++) { uint16 wc=cs->tab_to_uni[ch]; if (wc >= idx[i].uidx.from && wc <= idx[i].uidx.to && wc) { int ofs= wc - idx[i].uidx.from; if (!tab[ofs] || tab[ofs] > 0x7F) /* Prefer ASCII*/ { /* Some character sets can have double encoding. For example, in ARMSCII8, the following characters are encoded twice: Encoding#1 Encoding#2 Unicode Character Name ---------- ---------- ------- -------------- 0x27 0xFF U+0027 APOSTROPHE 0x28 0xA5 U+0028 LEFT PARENTHESIS 0x29 0xA4 U+0029 RIGHT PARENTHESIS 0x2C 0xAB U+002C COMMA 0x2D 0xAC U+002D HYPHEN-MINUS 0x2E 0xA9 U+002E FULL STOP That is, both 0x27 and 0xFF convert to Unicode U+0027. When converting back from Unicode to ARMSCII, we prefer the ASCII range, that is we want U+0027 to convert to 0x27 rather than to 0xFF. */ tab[ofs]= ch; } } } } /* Allocate and fill reverse table for each plane */ n=i; if (!(cs->tab_from_uni= (MY_UNI_IDX *) (loader->once_alloc)(sizeof(MY_UNI_IDX) * (n + 1)))) return TRUE; for (i=0; i< n; i++) ((struct my_uni_idx_st*)cs->tab_from_uni)[i]= idx[i].uidx; /* Set end-of-list marker */ bzero((char*) &cs->tab_from_uni[i],sizeof(MY_UNI_IDX)); return FALSE; }
O0
c
create_fromuni: pushq %rbp movq %rsp, %rbp subq $0x1850, %rsp # imm = 0x1850 movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x68(%rax) jne 0xa5137 movb $0x1, -0x1(%rbp) jmp 0xa560a leaq -0x1820(%rbp), %rdi xorl %esi, %esi movl $0x1800, %edx # imm = 0x1800 callq 0x281c0 movl $0x0, -0x1824(%rbp) cmpl $0x100, -0x1824(%rbp) # imm = 0x100 jge 0xa5328 movq -0x10(%rbp), %rax movq 0x68(%rax), %rax movslq -0x1824(%rbp), %rcx movw (%rax,%rcx,2), %ax movw %ax, -0x182a(%rbp) movzwl -0x182a(%rbp), %eax sarl $0x8, %eax movl $0x100, %ecx # imm = 0x100 cltd idivl %ecx movl %edx, -0x1830(%rbp) movzwl -0x182a(%rbp), %eax cmpl $0x0, %eax jne 0xa51af cmpl $0x0, -0x1824(%rbp) jne 0xa5312 movslq -0x1830(%rbp), %rcx leaq -0x1820(%rbp), %rax imulq $0x18, %rcx, %rcx addq %rcx, %rax cmpl $0x0, (%rax) jne 0xa520e movw -0x182a(%rbp), %cx movslq -0x1830(%rbp), %rdx leaq -0x1820(%rbp), %rax imulq $0x18, %rdx, %rdx addq %rdx, %rax movw %cx, 0x8(%rax) movw -0x182a(%rbp), %cx movslq -0x1830(%rbp), %rdx leaq -0x1820(%rbp), %rax imulq $0x18, %rdx, %rdx addq %rdx, %rax movw %cx, 0xa(%rax) jmp 0xa52f6 movzwl -0x182a(%rbp), %eax movslq -0x1830(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movzwl 0x8(%rcx), %ecx cmpl %ecx, %eax jge 0xa5241 movzwl -0x182a(%rbp), %eax movl %eax, -0x184c(%rbp) jmp 0xa5260 movslq -0x1830(%rbp), %rcx leaq -0x1820(%rbp), %rax imulq $0x18, %rcx, %rcx addq %rcx, %rax movzwl 0x8(%rax), %eax movl %eax, -0x184c(%rbp) movl -0x184c(%rbp), %eax movw %ax, %cx movslq -0x1830(%rbp), %rdx leaq -0x1820(%rbp), %rax imulq $0x18, %rdx, %rdx addq %rdx, %rax movw %cx, 0x8(%rax) movzwl -0x182a(%rbp), %eax movslq -0x1830(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movzwl 0xa(%rcx), %ecx cmpl %ecx, %eax jle 0xa52b5 movzwl -0x182a(%rbp), %eax movl %eax, -0x1850(%rbp) jmp 0xa52d4 movslq -0x1830(%rbp), %rcx leaq -0x1820(%rbp), %rax imulq $0x18, %rcx, %rcx addq %rcx, %rax movzwl 0xa(%rax), %eax movl %eax, -0x1850(%rbp) movl -0x1850(%rbp), %eax movw %ax, %cx movslq -0x1830(%rbp), %rdx leaq -0x1820(%rbp), %rax imulq $0x18, %rdx, %rdx addq %rdx, %rax movw %cx, 0xa(%rax) movslq -0x1830(%rbp), %rcx leaq -0x1820(%rbp), %rax imulq $0x18, %rcx, %rcx addq %rcx, %rax movl (%rax), %ecx addl $0x1, %ecx movl %ecx, (%rax) jmp 0xa5314 movl -0x1824(%rbp), %eax addl $0x1, %eax movl %eax, -0x1824(%rbp) jmp 0xa5154 leaq -0x1820(%rbp), %rdi movl $0x100, %esi # imm = 0x100 movl $0x18, %edx leaq 0x2e0(%rip), %rcx # 0xa5620 callq 0x28660 movl $0x0, -0x1824(%rbp) cmpl $0x100, -0x1824(%rbp) # imm = 0x100 jge 0xa5541 movslq -0x1824(%rbp), %rcx leaq -0x1820(%rbp), %rax imulq $0x18, %rcx, %rcx addq %rcx, %rax cmpl $0x0, (%rax) jne 0xa537e jmp 0xa5541 movslq -0x1824(%rbp), %rcx leaq -0x1820(%rbp), %rax imulq $0x18, %rcx, %rcx addq %rcx, %rax movzwl 0xa(%rax), %eax movslq -0x1824(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movzwl 0x8(%rcx), %ecx subl %ecx, %eax addl $0x1, %eax movl %eax, -0x1838(%rbp) movq -0x18(%rbp), %rax movq 0x80(%rax), %rax movslq -0x1838(%rbp), %rdi shlq $0x0, %rdi callq *%rax movq %rax, -0x1840(%rbp) movslq -0x1824(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movq %rax, 0x10(%rcx) cmpq $0x0, %rax jne 0xa5402 movb $0x1, -0x1(%rbp) jmp 0xa560a movq -0x1840(%rbp), %rdi movslq -0x1838(%rbp), %rdx shlq $0x0, %rdx xorl %esi, %esi callq 0x281c0 movl $0x1, -0x1834(%rbp) cmpl $0x100, -0x1834(%rbp) # imm = 0x100 jge 0xa552b movq -0x10(%rbp), %rax movq 0x68(%rax), %rax movslq -0x1834(%rbp), %rcx movw (%rax,%rcx,2), %ax movw %ax, -0x1842(%rbp) movzwl -0x1842(%rbp), %eax movslq -0x1824(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movzwl 0x8(%rcx), %ecx cmpl %ecx, %eax jl 0xa5515 movzwl -0x1842(%rbp), %eax movslq -0x1824(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movzwl 0xa(%rcx), %ecx cmpl %ecx, %eax jg 0xa5515 movzwl -0x1842(%rbp), %eax cmpl $0x0, %eax je 0xa5515 movzwl -0x1842(%rbp), %eax movslq -0x1824(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movzwl 0x8(%rcx), %ecx subl %ecx, %eax movl %eax, -0x1848(%rbp) movq -0x1840(%rbp), %rax movslq -0x1848(%rbp), %rcx cmpb $0x0, (%rax,%rcx) je 0xa54fa movq -0x1840(%rbp), %rax movslq -0x1848(%rbp), %rcx movzbl (%rax,%rcx), %eax cmpl $0x7f, %eax jle 0xa5513 movl -0x1834(%rbp), %eax movb %al, %dl movq -0x1840(%rbp), %rax movslq -0x1848(%rbp), %rcx movb %dl, (%rax,%rcx) jmp 0xa5515 jmp 0xa5517 movl -0x1834(%rbp), %eax addl $0x1, %eax movl %eax, -0x1834(%rbp) jmp 0xa5425 jmp 0xa552d movl -0x1824(%rbp), %eax addl $0x1, %eax movl %eax, -0x1824(%rbp) jmp 0xa534f movl -0x1824(%rbp), %eax movl %eax, -0x1828(%rbp) movq -0x18(%rbp), %rax movq 0x80(%rax), %rax movl -0x1828(%rbp), %ecx addl $0x1, %ecx movslq %ecx, %rdi shlq $0x4, %rdi callq *%rax movq -0x10(%rbp), %rcx movq %rax, 0x70(%rcx) cmpq $0x0, %rax jne 0xa5581 movb $0x1, -0x1(%rbp) jmp 0xa560a movl $0x0, -0x1824(%rbp) movl -0x1824(%rbp), %eax cmpl -0x1828(%rbp), %eax jge 0xa55e4 movq -0x10(%rbp), %rax movq 0x70(%rax), %rax movslq -0x1824(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax movslq -0x1824(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movq 0x8(%rcx), %rdx movq %rdx, (%rax) movq 0x10(%rcx), %rcx movq %rcx, 0x8(%rax) movl -0x1824(%rbp), %eax addl $0x1, %eax movl %eax, -0x1824(%rbp) jmp 0xa558b movq -0x10(%rbp), %rax movq 0x70(%rax), %rdi movslq -0x1824(%rbp), %rax shlq $0x4, %rax addq %rax, %rdi xorl %esi, %esi movl $0x10, %edx callq 0x281c0 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x1850, %rsp # imm = 0x1850 popq %rbp retq nopw %cs:(%rax,%rax)
create_fromuni: push rbp mov rbp, rsp sub rsp, 1850h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] cmp qword ptr [rax+68h], 0 jnz short loc_A5137 mov [rbp+var_1], 1 jmp loc_A560A loc_A5137: lea rdi, [rbp+var_1820] xor esi, esi mov edx, 1800h call _memset mov [rbp+var_1824], 0 loc_A5154: cmp [rbp+var_1824], 100h jge loc_A5328 mov rax, [rbp+var_10] mov rax, [rax+68h] movsxd rcx, [rbp+var_1824] mov ax, [rax+rcx*2] mov [rbp+var_182A], ax movzx eax, [rbp+var_182A] sar eax, 8 mov ecx, 100h cdq idiv ecx mov [rbp+var_1830], edx movzx eax, [rbp+var_182A] cmp eax, 0 jnz short loc_A51AF cmp [rbp+var_1824], 0 jnz loc_A5312 loc_A51AF: movsxd rcx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rcx, 18h add rax, rcx cmp dword ptr [rax], 0 jnz short loc_A520E mov cx, [rbp+var_182A] movsxd rdx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rdx, 18h add rax, rdx mov [rax+8], cx mov cx, [rbp+var_182A] movsxd rdx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rdx, 18h add rax, rdx mov [rax+0Ah], cx jmp loc_A52F6 loc_A520E: movzx eax, [rbp+var_182A] movsxd rdx, [rbp+var_1830] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx movzx ecx, word ptr [rcx+8] cmp eax, ecx jge short loc_A5241 movzx eax, [rbp+var_182A] mov [rbp+var_184C], eax jmp short loc_A5260 loc_A5241: movsxd rcx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rcx, 18h add rax, rcx movzx eax, word ptr [rax+8] mov [rbp+var_184C], eax loc_A5260: mov eax, [rbp+var_184C] mov cx, ax movsxd rdx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rdx, 18h add rax, rdx mov [rax+8], cx movzx eax, [rbp+var_182A] movsxd rdx, [rbp+var_1830] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx movzx ecx, word ptr [rcx+0Ah] cmp eax, ecx jle short loc_A52B5 movzx eax, [rbp+var_182A] mov [rbp+var_1850], eax jmp short loc_A52D4 loc_A52B5: movsxd rcx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rcx, 18h add rax, rcx movzx eax, word ptr [rax+0Ah] mov [rbp+var_1850], eax loc_A52D4: mov eax, [rbp+var_1850] mov cx, ax movsxd rdx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rdx, 18h add rax, rdx mov [rax+0Ah], cx loc_A52F6: movsxd rcx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rcx, 18h add rax, rcx mov ecx, [rax] add ecx, 1 mov [rax], ecx loc_A5312: jmp short $+2 loc_A5314: mov eax, [rbp+var_1824] add eax, 1 mov [rbp+var_1824], eax jmp loc_A5154 loc_A5328: lea rdi, [rbp+var_1820] mov esi, 100h mov edx, 18h lea rcx, pcmp call _qsort mov [rbp+var_1824], 0 loc_A534F: cmp [rbp+var_1824], 100h jge loc_A5541 movsxd rcx, [rbp+var_1824] lea rax, [rbp+var_1820] imul rcx, 18h add rax, rcx cmp dword ptr [rax], 0 jnz short loc_A537E jmp loc_A5541 loc_A537E: movsxd rcx, [rbp+var_1824] lea rax, [rbp+var_1820] imul rcx, 18h add rax, rcx movzx eax, word ptr [rax+0Ah] movsxd rdx, [rbp+var_1824] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx movzx ecx, word ptr [rcx+8] sub eax, ecx add eax, 1 mov [rbp+var_1838], eax mov rax, [rbp+var_18] mov rax, [rax+80h] movsxd rdi, [rbp+var_1838] shl rdi, 0 call rax mov [rbp+var_1840], rax movsxd rdx, [rbp+var_1824] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx mov [rcx+10h], rax cmp rax, 0 jnz short loc_A5402 mov [rbp+var_1], 1 jmp loc_A560A loc_A5402: mov rdi, [rbp+var_1840] movsxd rdx, [rbp+var_1838] shl rdx, 0 xor esi, esi call _memset mov [rbp+var_1834], 1 loc_A5425: cmp [rbp+var_1834], 100h jge loc_A552B mov rax, [rbp+var_10] mov rax, [rax+68h] movsxd rcx, [rbp+var_1834] mov ax, [rax+rcx*2] mov [rbp+var_1842], ax movzx eax, [rbp+var_1842] movsxd rdx, [rbp+var_1824] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx movzx ecx, word ptr [rcx+8] cmp eax, ecx jl loc_A5515 movzx eax, [rbp+var_1842] movsxd rdx, [rbp+var_1824] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx movzx ecx, word ptr [rcx+0Ah] cmp eax, ecx jg short loc_A5515 movzx eax, [rbp+var_1842] cmp eax, 0 jz short loc_A5515 movzx eax, [rbp+var_1842] movsxd rdx, [rbp+var_1824] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx movzx ecx, word ptr [rcx+8] sub eax, ecx mov [rbp+var_1848], eax mov rax, [rbp+var_1840] movsxd rcx, [rbp+var_1848] cmp byte ptr [rax+rcx], 0 jz short loc_A54FA mov rax, [rbp+var_1840] movsxd rcx, [rbp+var_1848] movzx eax, byte ptr [rax+rcx] cmp eax, 7Fh jle short loc_A5513 loc_A54FA: mov eax, [rbp+var_1834] mov dl, al mov rax, [rbp+var_1840] movsxd rcx, [rbp+var_1848] mov [rax+rcx], dl loc_A5513: jmp short $+2 loc_A5515: jmp short $+2 loc_A5517: mov eax, [rbp+var_1834] add eax, 1 mov [rbp+var_1834], eax jmp loc_A5425 loc_A552B: jmp short $+2 loc_A552D: mov eax, [rbp+var_1824] add eax, 1 mov [rbp+var_1824], eax jmp loc_A534F loc_A5541: mov eax, [rbp+var_1824] mov [rbp+var_1828], eax mov rax, [rbp+var_18] mov rax, [rax+80h] mov ecx, [rbp+var_1828] add ecx, 1 movsxd rdi, ecx shl rdi, 4 call rax mov rcx, [rbp+var_10] mov [rcx+70h], rax cmp rax, 0 jnz short loc_A5581 mov [rbp+var_1], 1 jmp loc_A560A loc_A5581: mov [rbp+var_1824], 0 loc_A558B: mov eax, [rbp+var_1824] cmp eax, [rbp+var_1828] jge short loc_A55E4 mov rax, [rbp+var_10] mov rax, [rax+70h] movsxd rcx, [rbp+var_1824] shl rcx, 4 add rax, rcx movsxd rdx, [rbp+var_1824] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx mov rdx, [rcx+8] mov [rax], rdx mov rcx, [rcx+10h] mov [rax+8], rcx mov eax, [rbp+var_1824] add eax, 1 mov [rbp+var_1824], eax jmp short loc_A558B loc_A55E4: mov rax, [rbp+var_10] mov rdi, [rax+70h] movsxd rax, [rbp+var_1824] shl rax, 4 add rdi, rax xor esi, esi mov edx, 10h call _memset mov [rbp+var_1], 0 loc_A560A: mov al, [rbp+var_1] add rsp, 1850h pop rbp retn
char create_fromuni(long long a1, long long a2) { long long v2; // rax _QWORD *v3; // rax unsigned __int16 v5; // [rsp+0h] [rbp-1850h] __int16 v6; // [rsp+4h] [rbp-184Ch] int v7; // [rsp+8h] [rbp-1848h] unsigned __int16 v8; // [rsp+Eh] [rbp-1842h] long long v9; // [rsp+10h] [rbp-1840h] int v10; // [rsp+18h] [rbp-1838h] int k; // [rsp+1Ch] [rbp-1834h] int v12; // [rsp+20h] [rbp-1830h] unsigned __int16 v13; // [rsp+26h] [rbp-182Ah] int v14; // [rsp+28h] [rbp-1828h] int i; // [rsp+2Ch] [rbp-1824h] int j; // [rsp+2Ch] [rbp-1824h] int m; // [rsp+2Ch] [rbp-1824h] _DWORD v18[1538]; // [rsp+30h] [rbp-1820h] BYREF long long v19; // [rsp+1838h] [rbp-18h] long long v20; // [rsp+1840h] [rbp-10h] v20 = a1; v19 = a2; if ( !*(_QWORD *)(a1 + 104) ) return 1; memset(v18, 0LL, 6144LL); for ( i = 0; i < 256; ++i ) { v13 = *(_WORD *)(*(_QWORD *)(v20 + 104) + 2LL * i); v12 = ((int)v13 >> 8) % 256; if ( v13 || !i ) { if ( v18[6 * v12] ) { if ( v13 >= (int)LOWORD(v18[6 * v12 + 2]) ) v6 = v18[6 * v12 + 2]; else v6 = *(_WORD *)(*(_QWORD *)(v20 + 104) + 2LL * i); LOWORD(v18[6 * v12 + 2]) = v6; if ( v13 <= (int)HIWORD(v18[6 * v12 + 2]) ) v5 = HIWORD(v18[6 * v12 + 2]); else v5 = v13; HIWORD(v18[6 * v12 + 2]) = v5; } else { LOWORD(v18[6 * v12 + 2]) = v13; HIWORD(v18[6 * v12 + 2]) = v13; } ++v18[6 * v12]; } } qsort(v18, 256LL, 24LL, pcmp); for ( j = 0; j < 256 && v18[6 * j]; ++j ) { v10 = HIWORD(v18[6 * j + 2]) - LOWORD(v18[6 * j + 2]) + 1; v9 = (*(long long ( **)(_QWORD))(v19 + 128))(v10); *(_QWORD *)&v18[6 * j + 4] = v9; if ( !v9 ) return 1; memset(v9, 0LL, v10); for ( k = 1; k < 256; ++k ) { v8 = *(_WORD *)(*(_QWORD *)(v20 + 104) + 2LL * k); if ( v8 >= (int)LOWORD(v18[6 * j + 2]) && v8 <= (int)HIWORD(v18[6 * j + 2]) ) { if ( v8 ) { v7 = v8 - LOWORD(v18[6 * j + 2]); if ( !*(_BYTE *)(v9 + v7) || *(unsigned __int8 *)(v9 + v7) > 0x7Fu ) *(_BYTE *)(v9 + v7) = k; } } } } v14 = j; v2 = (*(long long ( **)(long long))(v19 + 128))(16LL * (j + 1)); *(_QWORD *)(v20 + 112) = v2; if ( !v2 ) return 1; for ( m = 0; m < v14; ++m ) { v3 = (_QWORD *)(16LL * m + *(_QWORD *)(v20 + 112)); *v3 = *(_QWORD *)&v18[6 * m + 2]; v3[1] = *(_QWORD *)&v18[6 * m + 4]; } memset(16LL * m + *(_QWORD *)(v20 + 112), 0LL, 16LL); return 0; }
create_fromuni: PUSH RBP MOV RBP,RSP SUB RSP,0x1850 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x68],0x0 JNZ 0x001a5137 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001a560a LAB_001a5137: LEA RDI,[RBP + -0x1820] XOR ESI,ESI MOV EDX,0x1800 CALL 0x001281c0 MOV dword ptr [RBP + -0x1824],0x0 LAB_001a5154: CMP dword ptr [RBP + -0x1824],0x100 JGE 0x001a5328 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x68] MOVSXD RCX,dword ptr [RBP + -0x1824] MOV AX,word ptr [RAX + RCX*0x2] MOV word ptr [RBP + -0x182a],AX MOVZX EAX,word ptr [RBP + -0x182a] SAR EAX,0x8 MOV ECX,0x100 CDQ IDIV ECX MOV dword ptr [RBP + -0x1830],EDX MOVZX EAX,word ptr [RBP + -0x182a] CMP EAX,0x0 JNZ 0x001a51af CMP dword ptr [RBP + -0x1824],0x0 JNZ 0x001a5312 LAB_001a51af: MOVSXD RCX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RCX,RCX,0x18 ADD RAX,RCX CMP dword ptr [RAX],0x0 JNZ 0x001a520e MOV CX,word ptr [RBP + -0x182a] MOVSXD RDX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RAX,RDX MOV word ptr [RAX + 0x8],CX MOV CX,word ptr [RBP + -0x182a] MOVSXD RDX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RAX,RDX MOV word ptr [RAX + 0xa],CX JMP 0x001a52f6 LAB_001a520e: MOVZX EAX,word ptr [RBP + -0x182a] MOVSXD RDX,dword ptr [RBP + -0x1830] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOVZX ECX,word ptr [RCX + 0x8] CMP EAX,ECX JGE 0x001a5241 MOVZX EAX,word ptr [RBP + -0x182a] MOV dword ptr [RBP + -0x184c],EAX JMP 0x001a5260 LAB_001a5241: MOVSXD RCX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RCX,RCX,0x18 ADD RAX,RCX MOVZX EAX,word ptr [RAX + 0x8] MOV dword ptr [RBP + -0x184c],EAX LAB_001a5260: MOV EAX,dword ptr [RBP + -0x184c] MOV CX,AX MOVSXD RDX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RAX,RDX MOV word ptr [RAX + 0x8],CX MOVZX EAX,word ptr [RBP + -0x182a] MOVSXD RDX,dword ptr [RBP + -0x1830] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOVZX ECX,word ptr [RCX + 0xa] CMP EAX,ECX JLE 0x001a52b5 MOVZX EAX,word ptr [RBP + -0x182a] MOV dword ptr [RBP + -0x1850],EAX JMP 0x001a52d4 LAB_001a52b5: MOVSXD RCX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RCX,RCX,0x18 ADD RAX,RCX MOVZX EAX,word ptr [RAX + 0xa] MOV dword ptr [RBP + -0x1850],EAX LAB_001a52d4: MOV EAX,dword ptr [RBP + -0x1850] MOV CX,AX MOVSXD RDX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RAX,RDX MOV word ptr [RAX + 0xa],CX LAB_001a52f6: MOVSXD RCX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RCX,RCX,0x18 ADD RAX,RCX MOV ECX,dword ptr [RAX] ADD ECX,0x1 MOV dword ptr [RAX],ECX LAB_001a5312: JMP 0x001a5314 LAB_001a5314: MOV EAX,dword ptr [RBP + -0x1824] ADD EAX,0x1 MOV dword ptr [RBP + -0x1824],EAX JMP 0x001a5154 LAB_001a5328: LEA RDI,[RBP + -0x1820] MOV ESI,0x100 MOV EDX,0x18 LEA RCX,[0x1a5620] CALL 0x00128660 MOV dword ptr [RBP + -0x1824],0x0 LAB_001a534f: CMP dword ptr [RBP + -0x1824],0x100 JGE 0x001a5541 MOVSXD RCX,dword ptr [RBP + -0x1824] LEA RAX,[RBP + -0x1820] IMUL RCX,RCX,0x18 ADD RAX,RCX CMP dword ptr [RAX],0x0 JNZ 0x001a537e JMP 0x001a5541 LAB_001a537e: MOVSXD RCX,dword ptr [RBP + -0x1824] LEA RAX,[RBP + -0x1820] IMUL RCX,RCX,0x18 ADD RAX,RCX MOVZX EAX,word ptr [RAX + 0xa] MOVSXD RDX,dword ptr [RBP + -0x1824] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOVZX ECX,word ptr [RCX + 0x8] SUB EAX,ECX ADD EAX,0x1 MOV dword ptr [RBP + -0x1838],EAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x80] MOVSXD RDI,dword ptr [RBP + -0x1838] SHL RDI,0x0 CALL RAX MOV qword ptr [RBP + -0x1840],RAX MOVSXD RDX,dword ptr [RBP + -0x1824] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOV qword ptr [RCX + 0x10],RAX CMP RAX,0x0 JNZ 0x001a5402 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001a560a LAB_001a5402: MOV RDI,qword ptr [RBP + -0x1840] MOVSXD RDX,dword ptr [RBP + -0x1838] SHL RDX,0x0 XOR ESI,ESI CALL 0x001281c0 MOV dword ptr [RBP + -0x1834],0x1 LAB_001a5425: CMP dword ptr [RBP + -0x1834],0x100 JGE 0x001a552b MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x68] MOVSXD RCX,dword ptr [RBP + -0x1834] MOV AX,word ptr [RAX + RCX*0x2] MOV word ptr [RBP + -0x1842],AX MOVZX EAX,word ptr [RBP + -0x1842] MOVSXD RDX,dword ptr [RBP + -0x1824] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOVZX ECX,word ptr [RCX + 0x8] CMP EAX,ECX JL 0x001a5515 MOVZX EAX,word ptr [RBP + -0x1842] MOVSXD RDX,dword ptr [RBP + -0x1824] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOVZX ECX,word ptr [RCX + 0xa] CMP EAX,ECX JG 0x001a5515 MOVZX EAX,word ptr [RBP + -0x1842] CMP EAX,0x0 JZ 0x001a5515 MOVZX EAX,word ptr [RBP + -0x1842] MOVSXD RDX,dword ptr [RBP + -0x1824] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOVZX ECX,word ptr [RCX + 0x8] SUB EAX,ECX MOV dword ptr [RBP + -0x1848],EAX MOV RAX,qword ptr [RBP + -0x1840] MOVSXD RCX,dword ptr [RBP + -0x1848] CMP byte ptr [RAX + RCX*0x1],0x0 JZ 0x001a54fa MOV RAX,qword ptr [RBP + -0x1840] MOVSXD RCX,dword ptr [RBP + -0x1848] MOVZX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x7f JLE 0x001a5513 LAB_001a54fa: MOV EAX,dword ptr [RBP + -0x1834] MOV DL,AL MOV RAX,qword ptr [RBP + -0x1840] MOVSXD RCX,dword ptr [RBP + -0x1848] MOV byte ptr [RAX + RCX*0x1],DL LAB_001a5513: JMP 0x001a5515 LAB_001a5515: JMP 0x001a5517 LAB_001a5517: MOV EAX,dword ptr [RBP + -0x1834] ADD EAX,0x1 MOV dword ptr [RBP + -0x1834],EAX JMP 0x001a5425 LAB_001a552b: JMP 0x001a552d LAB_001a552d: MOV EAX,dword ptr [RBP + -0x1824] ADD EAX,0x1 MOV dword ptr [RBP + -0x1824],EAX JMP 0x001a534f LAB_001a5541: MOV EAX,dword ptr [RBP + -0x1824] MOV dword ptr [RBP + -0x1828],EAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x80] MOV ECX,dword ptr [RBP + -0x1828] ADD ECX,0x1 MOVSXD RDI,ECX SHL RDI,0x4 CALL RAX MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x70],RAX CMP RAX,0x0 JNZ 0x001a5581 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001a560a LAB_001a5581: MOV dword ptr [RBP + -0x1824],0x0 LAB_001a558b: MOV EAX,dword ptr [RBP + -0x1824] CMP EAX,dword ptr [RBP + -0x1828] JGE 0x001a55e4 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x70] MOVSXD RCX,dword ptr [RBP + -0x1824] SHL RCX,0x4 ADD RAX,RCX MOVSXD RDX,dword ptr [RBP + -0x1824] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOV RDX,qword ptr [RCX + 0x8] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV EAX,dword ptr [RBP + -0x1824] ADD EAX,0x1 MOV dword ptr [RBP + -0x1824],EAX JMP 0x001a558b LAB_001a55e4: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x70] MOVSXD RAX,dword ptr [RBP + -0x1824] SHL RAX,0x4 ADD RDI,RAX XOR ESI,ESI MOV EDX,0x10 CALL 0x001281c0 MOV byte ptr [RBP + -0x1],0x0 LAB_001a560a: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x1850 POP RBP RET
int1 create_fromuni(long param_1,long param_2) { ushort uVar1; ushort uVar2; int iVar3; void *__s; long lVar4; int8 *puVar5; uint uVar6; int local_183c; int local_182c; int local_1828 [2]; ushort auStack_1820 [4]; int8 auStack_1818 [767]; long local_20; long local_18; int1 local_9; if (*(long *)(param_1 + 0x68) == 0) { local_9 = 1; } else { local_20 = param_2; local_18 = param_1; memset(local_1828,0,0x1800); for (local_182c = 0; local_182c < 0x100; local_182c = local_182c + 1) { uVar1 = *(ushort *)(*(long *)(local_18 + 0x68) + (long)local_182c * 2); uVar6 = (uint)((int)(uint)uVar1 >> 8) % 0x100; if ((uVar1 != 0) || (local_182c == 0)) { if (local_1828[(long)(int)uVar6 * 6] == 0) { auStack_1820[(long)(int)uVar6 * 0xc] = uVar1; auStack_1820[(long)(int)uVar6 * 0xc + 1] = uVar1; } else { uVar2 = uVar1; if (auStack_1820[(long)(int)uVar6 * 0xc] <= uVar1) { uVar2 = auStack_1820[(long)(int)uVar6 * 0xc]; } auStack_1820[(long)(int)uVar6 * 0xc] = uVar2; if (uVar1 <= auStack_1820[(long)(int)uVar6 * 0xc + 1]) { uVar1 = auStack_1820[(long)(int)uVar6 * 0xc + 1]; } auStack_1820[(long)(int)uVar6 * 0xc + 1] = uVar1; } local_1828[(long)(int)uVar6 * 6] = local_1828[(long)(int)uVar6 * 6] + 1; } } qsort(local_1828,0x100,0x18,pcmp); local_182c = 0; while ((iVar3 = local_182c, local_182c < 0x100 && (local_1828[(long)local_182c * 6] != 0))) { iVar3 = ((uint)auStack_1820[(long)local_182c * 0xc + 1] - (uint)auStack_1820[(long)local_182c * 0xc]) + 1; __s = (void *)(**(code **)(local_20 + 0x80))((long)iVar3); auStack_1818[(long)local_182c * 3] = __s; if (__s == (void *)0x0) { return 1; } memset(__s,0,(long)iVar3); for (local_183c = 1; local_183c < 0x100; local_183c = local_183c + 1) { uVar1 = *(ushort *)(*(long *)(local_18 + 0x68) + (long)local_183c * 2); if ((((auStack_1820[(long)local_182c * 0xc] <= uVar1) && (uVar1 <= auStack_1820[(long)local_182c * 0xc + 1])) && (uVar1 != 0)) && ((iVar3 = (uint)uVar1 - (uint)auStack_1820[(long)local_182c * 0xc], *(char *)((long)__s + (long)iVar3) == '\0' || (0x7f < *(byte *)((long)__s + (long)iVar3))))) { *(char *)((long)__s + (long)iVar3) = (char)local_183c; } } local_182c = local_182c + 1; } lVar4 = (**(code **)(local_20 + 0x80))((long)(local_182c + 1) << 4); *(long *)(local_18 + 0x70) = lVar4; if (lVar4 == 0) { local_9 = 1; } else { for (local_182c = 0; local_182c < iVar3; local_182c = local_182c + 1) { puVar5 = (int8 *)(*(long *)(local_18 + 0x70) + (long)local_182c * 0x10); *puVar5 = *(int8 *)(auStack_1820 + (long)local_182c * 0xc); puVar5[1] = auStack_1818[(long)local_182c * 3]; } memset((void *)(*(long *)(local_18 + 0x70) + (long)local_182c * 0x10),0,0x10); local_9 = 0; } } return local_9; }
47,535
translog_close_log_file
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_close_log_file(TRANSLOG_FILE *file) { int rc= 0; flush_pagecache_blocks(log_descriptor.pagecache, &file->handler, FLUSH_RELEASE); /* Sync file when we close it TODO: sync only we have changed the log */ if (!file->is_sync) { rc= mysql_file_sync(file->handler.file, MYF(MY_WME)); translog_syncs++; } rc|= mysql_file_close(file->handler.file, MYF(MY_WME)); my_free(file); return MY_TEST(rc); }
O3
c
translog_close_log_file: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x50, %rsp movq %rdi, %rbx movq 0x3c8d0f(%rip), %rdi # 0x3fdef0 leaq 0x8(%rbx), %rsi movl $0x1, %edx xorl %ecx, %ecx xorl %r8d, %r8d callq 0x3cc0c cmpb $0x0, 0x51(%rbx) jne 0x35233 movl 0x18(%rbx), %r14d leaq 0x350e0b(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0x58(%rbp), %rdi movl %r14d, %esi movl $0x10, %edx callq *0x158(%rax) testq %rax, %rax jne 0x35283 movl $0x10, %esi movl %r14d, %edi callq 0xa1444 incq 0x3c7ab5(%rip) # 0x3fcce8 movl 0x18(%rbx), %r14d leaq 0x350dd2(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0x58(%rbp), %rdi movl %r14d, %esi movl $0x4, %edx callq *0x158(%rax) testq %rax, %rax jne 0x35276 movl $0x10, %esi movl %r14d, %edi callq 0xa0525 movq %rbx, %rdi callq 0x9ff7e addq $0x50, %rsp popq %rbx popq %r14 popq %rbp retq movq %rax, %rdi movl %r14d, %esi callq 0x2bd58 jmp 0x35265 movq %rax, %rdi movl %r14d, %esi callq 0x2bd06 jmp 0x3522c
translog_close_log_file: push rbp mov rbp, rsp push r14 push rbx sub rsp, 50h mov rbx, rdi mov rdi, cs:log_descriptor lea rsi, [rbx+8] mov edx, 1 xor ecx, ecx xor r8d, r8d call flush_pagecache_blocks_with_filter cmp byte ptr [rbx+51h], 0 jnz short loc_35233 mov r14d, [rbx+18h] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_58] mov esi, r14d mov edx, 10h call qword ptr [rax+158h] test rax, rax jnz short loc_35283 mov esi, 10h mov edi, r14d call my_sync loc_3522C: inc cs:translog_syncs loc_35233: mov r14d, [rbx+18h] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_58] mov esi, r14d mov edx, 4 call qword ptr [rax+158h] test rax, rax jnz short loc_35276 mov esi, 10h mov edi, r14d call my_close loc_35265: mov rdi, rbx call my_free add rsp, 50h pop rbx pop r14 pop rbp retn loc_35276: mov rdi, rax mov esi, r14d call translog_close_log_file_cold_2 jmp short loc_35265 loc_35283: mov rdi, rax mov esi, r14d call translog_close_log_file_cold_1 jmp short loc_3522C
long long translog_close_log_file(long long a1) { unsigned int v1; // r14d long long v2; // rax unsigned int v3; // r14d long long v4; // rax _BYTE v6[88]; // [rsp+8h] [rbp-58h] BYREF flush_pagecache_blocks_with_filter(log_descriptor[0], a1 + 8, 1LL, 0LL, 0LL); if ( !*(_BYTE *)(a1 + 81) ) { v1 = *(_DWORD *)(a1 + 24); v2 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v6, v1, 16LL); if ( v2 ) translog_close_log_file_cold_1(v2, v1); else my_sync(v1, 16LL); ++translog_syncs; } v3 = *(_DWORD *)(a1 + 24); v4 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v6, v3, 4LL); if ( v4 ) translog_close_log_file_cold_2(v4, v3); else my_close(v3, 16LL); return my_free(a1); }
translog_close_log_file: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x50 MOV RBX,RDI MOV RDI,qword ptr [0x004fdef0] LEA RSI,[RBX + 0x8] MOV EDX,0x1 XOR ECX,ECX XOR R8D,R8D CALL 0x0013cc0c CMP byte ptr [RBX + 0x51],0x0 JNZ 0x00135233 MOV R14D,dword ptr [RBX + 0x18] LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x58] MOV ESI,R14D MOV EDX,0x10 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00135283 MOV ESI,0x10 MOV EDI,R14D CALL 0x001a1444 LAB_0013522c: INC qword ptr [0x004fcce8] LAB_00135233: MOV R14D,dword ptr [RBX + 0x18] LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x58] MOV ESI,R14D MOV EDX,0x4 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00135276 MOV ESI,0x10 MOV EDI,R14D CALL 0x001a0525 LAB_00135265: MOV RDI,RBX CALL 0x0019ff7e ADD RSP,0x50 POP RBX POP R14 POP RBP RET LAB_00135276: MOV RDI,RAX MOV ESI,R14D CALL 0x0012bd58 JMP 0x00135265 LAB_00135283: MOV RDI,RAX MOV ESI,R14D CALL 0x0012bd06 JMP 0x0013522c
void translog_close_log_file(long param_1) { int4 uVar1; long lVar2; int1 local_60 [72]; flush_pagecache_blocks_with_filter(log_descriptor,param_1 + 8,1,0,0); if (*(char *)(param_1 + 0x51) == '\0') { uVar1 = *(int4 *)(param_1 + 0x18); lVar2 = (**(code **)(PSI_server + 0x158))(local_60,uVar1,0x10); if (lVar2 == 0) { my_sync(uVar1,0x10); } else { translog_close_log_file_cold_1(lVar2,uVar1); } translog_syncs = translog_syncs + 1; } uVar1 = *(int4 *)(param_1 + 0x18); lVar2 = (**(code **)(PSI_server + 0x158))(local_60,uVar1,4); if (lVar2 == 0) { my_close(uVar1,0x10); } else { translog_close_log_file_cold_2(lVar2,uVar1); } my_free(param_1); return; }
47,536
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char>(char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char&&)
monkey531[P]llama/common/json.hpp
inline OutStringType concat(Args && ... args) { OutStringType str; str.reserve(concat_length(args...)); concat_into(str, std::forward<Args>(args)...); return str; }
O1
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char>(char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char&&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %r14 movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %r13 movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rsp) movq %rax, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi callq 0x1b3e0 movq %rax, %rbp addq 0x8(%r12), %rbp movq %r15, %rdi callq 0x1b3e0 addq %rax, %rbp addq 0x8(%r14), %rbp movq %rbx, %rdi movq %rbp, %rsi callq 0x1bd60 movq %rbx, %rdi movq %r13, %rsi callq 0x1c0d0 movq (%r12), %rsi movq 0x8(%r12), %rdx movq %rbx, %rdi callq 0x1b260 movq %rbx, %rdi movq %r15, %rsi callq 0x1c0d0 movq (%r14), %rsi movq 0x8(%r14), %rdx movq %rbx, %rdi callq 0x1b260 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq (%rbx), %rdi cmpq (%rsp), %rdi je 0xb7bac movq (%rsp), %rax movq (%rax), %rsi incq %rsi callq 0x1b8b0 movq %r14, %rdi callq 0x1bf70
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcS8_RA5_S9_S8_EEET_DpOT0_: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, r8 mov r15, rcx mov r12, rdx mov r13, rsi mov rbx, rdi lea rax, [rdi+10h] mov [rsp+38h+var_38], rax mov [rdi], rax mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, rsi call _strlen mov rbp, rax add rbp, [r12+8] mov rdi, r15 call _strlen add rbp, rax add rbp, [r14+8] mov rdi, rbx mov rsi, rbp call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rdi, rbx mov rsi, r13 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r12] mov rdx, [r12+8] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r14] mov rdx, [r14+8] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, [rbx]; void * cmp rdi, [rsp+0] jz short loc_B7BAC mov rax, [rsp+0] mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B7BAC: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],std::string,char const(&)[5],std::string>( long long a1, long long a2, _QWORD *a3, long long a4, _QWORD *a5) { long long v8; // rbp long long v9; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v8 = a3[1] + strlen(a2); v9 = strlen(a4); std::string::reserve(a1, a5[1] + v9 + v8); std::string::append(a1, a2); std::string::_M_append(a1, *a3, a3[1]); std::string::append(a1, a4); std::string::_M_append(a1, *a5, a5[1]); return a1; }
47,537
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char>(char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char&&)
monkey531[P]llama/common/json.hpp
inline OutStringType concat(Args && ... args) { OutStringType str; str.reserve(concat_length(args...)); concat_into(str, std::forward<Args>(args)...); return str; }
O2
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char>(char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char&&): pushq %r15 pushq %r14 pushq %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rdi) andq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi movq %rdx, %rsi callq 0x421bf movq %rbx, %rdi movq %rax, %rsi callq 0x24d60 movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x87a3e movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq %rbx, %rdi callq 0x251b8 movq %r14, %rdi callq 0x24f60
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA39_KcS8_EEET_DpOT0_: push r15 push r14 push rbx mov r14, rdx mov r15, rsi mov rbx, rdi lea rax, [rdi+10h] mov [rdi], rax and qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, rsi mov rsi, rdx call _ZN8nlohmann16json_abi_v3_11_36detail13concat_lengthIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEmPKcDpRKT_; nlohmann::json_abi_v3_11_3::detail::concat_length<std::string>(char const*,std::string const&) mov rdi, rbx mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rdi, rbx mov rsi, r15 mov rdx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA39_KcJS8_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSD_OSE_DpOT1_ mov rax, rbx pop rbx pop r14 pop r15 retn mov r14, rax mov rdi, rbx; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[39],std::string>( long long a1, long long a2, long long a3) { long long v4; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v4 = nlohmann::json_abi_v3_11_3::detail::concat_length<std::string>(a2, a3); std::string::reserve(a1, v4); ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA39_KcJS8_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSD_OSE_DpOT1_( a1, a2, a3); return a1; }
concat<std::__cxx11::string,char_const(&)[39],std::__cxx11::string>: PUSH R15 PUSH R14 PUSH RBX MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX AND qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 LAB_00187937: MOV RDI,RSI MOV RSI,RDX CALL 0x001421bf MOV RDI,RBX MOV RSI,RAX CALL 0x00124d60 MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x00187a3e LAB_0018795b: MOV RAX,RBX POP RBX POP R14 POP R15 RET
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string, char const (&) [39], std::__cxx11::string >(char const (&) [39], std::__cxx11::string&&) */ detail * __thiscall nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[39],std::__cxx11::string> (detail *this,char *param_1,string *param_2) { *(detail **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (detail)0x0; /* try { // try from 00187937 to 0018795a has its CatchHandler @ 00187964 */ concat_length<std::__cxx11::string>(param_1,param_2); std::__cxx11::string::reserve((ulong)this); _ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA39_KcJS8_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSD_OSE_DpOT1_ (this,param_1,param_2); return this; }
47,538
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char>(char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char&&)
monkey531[P]llama/common/json.hpp
inline OutStringType concat(Args && ... args) { OutStringType str; str.reserve(concat_length(args...)); concat_into(str, std::forward<Args>(args)...); return str; }
O3
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char>(char const (&) [26], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, char&&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x10(%rdi), %r13 movq %r13, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movq %rsi, %rdi callq 0x1b3e0 movq %rax, %r12 movq (%r14), %rdi callq 0x1b3e0 addq %rax, %r12 movq %rbx, %rdi movq %r12, %rsi callq 0x1bd60 movq %rbx, %rdi movq %r15, %rsi callq 0x1c0d0 movq (%r14), %rsi movq %rbx, %rdi callq 0x1c0d0 movq %rbx, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r14 movq (%rbx), %rdi cmpq %r13, %rdi je 0xc5ebd movq (%r13), %rsi incq %rsi callq 0x1b8b0 movq %r14, %rdi callq 0x1bf70 nop
_ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA28_KcPS9_EEET_DpOT0_: push r15 push r14 push r13 push r12 push rbx mov r14, rdx mov r15, rsi mov rbx, rdi lea r13, [rdi+10h] mov [rdi], r13 mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov rdi, rsi call _strlen mov r12, rax mov rdi, [r14] call _strlen add r12, rax mov rdi, rbx mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r14] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rax, rbx pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r14, rax mov rdi, [rbx]; void * cmp rdi, r13 jz short loc_C5EBD mov rsi, [r13+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C5EBD: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[28],char const*>( long long a1, long long a2, _QWORD *a3) { long long v4; // r12 long long v5; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; v4 = strlen(a2); v5 = strlen(*a3); std::string::reserve(a1, v5 + v4); std::string::append(a1, a2); std::string::append(a1, *a3); return a1; }
47,539
js_closure2
bluesky950520[P]quickjs/quickjs.c
static JSValue js_closure2(JSContext *ctx, JSValue func_obj, JSFunctionBytecode *b, JSVarRef **cur_var_refs, JSStackFrame *sf) { JSObject *p; JSVarRef **var_refs; int i; p = JS_VALUE_GET_OBJ(func_obj); p->u.func.function_bytecode = b; p->u.func.home_object = NULL; p->u.func.var_refs = NULL; if (b->closure_var_count) { var_refs = js_mallocz(ctx, sizeof(var_refs[0]) * b->closure_var_count); if (!var_refs) goto fail; p->u.func.var_refs = var_refs; for(i = 0; i < b->closure_var_count; i++) { JSClosureVar *cv = &b->closure_var[i]; JSVarRef *var_ref; if (cv->is_local) { /* reuse the existing variable reference if it already exists */ var_ref = get_var_ref(ctx, sf, cv->var_idx, cv->is_arg); if (!var_ref) goto fail; } else { var_ref = cur_var_refs[cv->var_idx]; var_ref->header.ref_count++; } var_refs[i] = var_ref; } } return func_obj; fail: /* bfunc is freed when func_obj is freed */ JS_FreeValue(ctx, func_obj); return JS_EXCEPTION; }
O0
c
js_closure2: subq $0x68, %rsp movq %rsi, 0x48(%rsp) movq %rdx, 0x50(%rsp) movq %rdi, 0x40(%rsp) movq %rcx, 0x38(%rsp) movq %r8, 0x30(%rsp) movq %r9, 0x28(%rsp) movq 0x48(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x38(%rsp), %rcx movq 0x20(%rsp), %rax movq %rcx, 0x30(%rax) movq 0x20(%rsp), %rax movq $0x0, 0x40(%rax) movq 0x20(%rsp), %rax movq $0x0, 0x38(%rax) movq 0x38(%rsp), %rax cmpl $0x0, 0x5c(%rax) je 0x73ab5 movq 0x40(%rsp), %rdi movq 0x38(%rsp), %rax movslq 0x5c(%rax), %rsi shlq $0x3, %rsi callq 0x28020 movq %rax, 0x18(%rsp) cmpq $0x0, 0x18(%rsp) jne 0x739ec jmp 0x73acb movq 0x18(%rsp), %rcx movq 0x20(%rsp), %rax movq %rcx, 0x38(%rax) movl $0x0, 0x14(%rsp) movl 0x14(%rsp), %eax movq 0x38(%rsp), %rcx cmpl 0x5c(%rcx), %eax jge 0x73ab3 movq 0x38(%rsp), %rax movq 0x38(%rax), %rax movslq 0x14(%rsp), %rcx shlq $0x3, %rcx addq %rcx, %rax movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax movb (%rax), %al andb $0x1, %al cmpb $0x0, %al je 0x73a70 movq 0x40(%rsp), %rdi movq 0x28(%rsp), %rsi movq 0x8(%rsp), %rax movzwl 0x2(%rax), %edx movq 0x8(%rsp), %rax movb (%rax), %al shrb %al andb $0x1, %al movzbl %al, %ecx callq 0x6d560 movq %rax, (%rsp) cmpq $0x0, (%rsp) jne 0x73a6e jmp 0x73acb jmp 0x73a91 movq 0x30(%rsp), %rax movq 0x8(%rsp), %rcx movzwl 0x2(%rcx), %ecx movq (%rax,%rcx,8), %rax movq %rax, (%rsp) movq (%rsp), %rax movl (%rax), %ecx addl $0x1, %ecx movl %ecx, (%rax) movq (%rsp), %rdx movq 0x18(%rsp), %rax movslq 0x14(%rsp), %rcx movq %rdx, (%rax,%rcx,8) movl 0x14(%rsp), %eax addl $0x1, %eax movl %eax, 0x14(%rsp) jmp 0x73a02 jmp 0x73ab5 movq 0x48(%rsp), %rax movq %rax, 0x58(%rsp) movq 0x50(%rsp), %rax movq %rax, 0x60(%rsp) jmp 0x73af0 movq 0x40(%rsp), %rdi movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx callq 0x29f80 movl $0x0, 0x58(%rsp) movq $0x6, 0x60(%rsp) movq 0x58(%rsp), %rax movq 0x60(%rsp), %rdx addq $0x68, %rsp retq nop
js_closure2: sub rsp, 68h mov [rsp+68h+var_20], rsi mov [rsp+68h+var_18], rdx mov [rsp+68h+var_28], rdi mov [rsp+68h+var_30], rcx mov [rsp+68h+var_38], r8 mov [rsp+68h+var_40], r9 mov rax, [rsp+68h+var_20] mov [rsp+68h+var_48], rax mov rcx, [rsp+68h+var_30] mov rax, [rsp+68h+var_48] mov [rax+30h], rcx mov rax, [rsp+68h+var_48] mov qword ptr [rax+40h], 0 mov rax, [rsp+68h+var_48] mov qword ptr [rax+38h], 0 mov rax, [rsp+68h+var_30] cmp dword ptr [rax+5Ch], 0 jz loc_73AB5 mov rdi, [rsp+68h+var_28] mov rax, [rsp+68h+var_30] movsxd rsi, dword ptr [rax+5Ch] shl rsi, 3 call js_mallocz mov [rsp+68h+var_50], rax cmp [rsp+68h+var_50], 0 jnz short loc_739EC jmp loc_73ACB loc_739EC: mov rcx, [rsp+68h+var_50] mov rax, [rsp+68h+var_48] mov [rax+38h], rcx mov [rsp+68h+var_54], 0 loc_73A02: mov eax, [rsp+68h+var_54] mov rcx, [rsp+68h+var_30] cmp eax, [rcx+5Ch] jge loc_73AB3 mov rax, [rsp+68h+var_30] mov rax, [rax+38h] movsxd rcx, [rsp+68h+var_54] shl rcx, 3 add rax, rcx mov [rsp+68h+var_60], rax mov rax, [rsp+68h+var_60] mov al, [rax] and al, 1 cmp al, 0 jz short loc_73A70 mov rdi, [rsp+68h+var_28] mov rsi, [rsp+68h+var_40] mov rax, [rsp+68h+var_60] movzx edx, word ptr [rax+2] mov rax, [rsp+68h+var_60] mov al, [rax] shr al, 1 and al, 1 movzx ecx, al call get_var_ref mov [rsp+68h+var_68], rax cmp [rsp+68h+var_68], 0 jnz short loc_73A6E jmp short loc_73ACB loc_73A6E: jmp short loc_73A91 loc_73A70: mov rax, [rsp+68h+var_38] mov rcx, [rsp+68h+var_60] movzx ecx, word ptr [rcx+2] mov rax, [rax+rcx*8] mov [rsp+68h+var_68], rax mov rax, [rsp+68h+var_68] mov ecx, [rax] add ecx, 1 mov [rax], ecx loc_73A91: mov rdx, [rsp+68h+var_68] mov rax, [rsp+68h+var_50] movsxd rcx, [rsp+68h+var_54] mov [rax+rcx*8], rdx mov eax, [rsp+68h+var_54] add eax, 1 mov [rsp+68h+var_54], eax jmp loc_73A02 loc_73AB3: jmp short $+2 loc_73AB5: mov rax, [rsp+68h+var_20] mov [rsp+68h+var_10], rax mov rax, [rsp+68h+var_18] mov [rsp+68h+var_8], rax jmp short loc_73AF0 loc_73ACB: mov rdi, [rsp+68h+var_28] mov rsi, [rsp+68h+var_20] mov rdx, [rsp+68h+var_18] call JS_FreeValue mov dword ptr [rsp+68h+var_10], 0 mov [rsp+68h+var_8], 6 loc_73AF0: mov rax, [rsp+68h+var_10] mov rdx, [rsp+68h+var_8] add rsp, 68h retn
_QWORD * js_closure2(long long a1, _QWORD *a2, long long a3, long long a4, long long a5, _QWORD *a6) { _DWORD *var_ref; // [rsp+0h] [rbp-68h] long long v8; // [rsp+8h] [rbp-60h] int i; // [rsp+14h] [rbp-54h] long long v10; // [rsp+18h] [rbp-50h] long long v15; // [rsp+58h] [rbp-10h] a2[6] = a4; a2[8] = 0LL; a2[7] = 0LL; if ( *(_DWORD *)(a4 + 92) ) { v10 = js_mallocz(a1, 8LL * *(int *)(a4 + 92)); if ( !v10 ) { LABEL_11: JS_FreeValue(a1, (long long)a2, a3); LODWORD(v15) = 0; return (_QWORD *)v15; } a2[7] = v10; for ( i = 0; i < *(_DWORD *)(a4 + 92); ++i ) { v8 = 8LL * i + *(_QWORD *)(a4 + 56); if ( (*(_BYTE *)v8 & 1) != 0 ) { var_ref = (_DWORD *)get_var_ref(a1, a6, *(unsigned __int16 *)(v8 + 2), (*(_BYTE *)v8 & 2) != 0); if ( !var_ref ) goto LABEL_11; } else { var_ref = *(_DWORD **)(a5 + 8LL * *(unsigned __int16 *)(v8 + 2)); ++*var_ref; } *(_QWORD *)(v10 + 8LL * i) = var_ref; } } return a2; }
js_closure2: SUB RSP,0x68 MOV qword ptr [RSP + 0x48],RSI MOV qword ptr [RSP + 0x50],RDX MOV qword ptr [RSP + 0x40],RDI MOV qword ptr [RSP + 0x38],RCX MOV qword ptr [RSP + 0x30],R8 MOV qword ptr [RSP + 0x28],R9 MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x20],RAX MOV RCX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x30],RCX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x40],0x0 MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x38],0x0 MOV RAX,qword ptr [RSP + 0x38] CMP dword ptr [RAX + 0x5c],0x0 JZ 0x00173ab5 MOV RDI,qword ptr [RSP + 0x40] MOV RAX,qword ptr [RSP + 0x38] MOVSXD RSI,dword ptr [RAX + 0x5c] SHL RSI,0x3 CALL 0x00128020 MOV qword ptr [RSP + 0x18],RAX CMP qword ptr [RSP + 0x18],0x0 JNZ 0x001739ec JMP 0x00173acb LAB_001739ec: MOV RCX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x38],RCX MOV dword ptr [RSP + 0x14],0x0 LAB_00173a02: MOV EAX,dword ptr [RSP + 0x14] MOV RCX,qword ptr [RSP + 0x38] CMP EAX,dword ptr [RCX + 0x5c] JGE 0x00173ab3 MOV RAX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RAX + 0x38] MOVSXD RCX,dword ptr [RSP + 0x14] SHL RCX,0x3 ADD RAX,RCX MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x8] MOV AL,byte ptr [RAX] AND AL,0x1 CMP AL,0x0 JZ 0x00173a70 MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x8] MOVZX EDX,word ptr [RAX + 0x2] MOV RAX,qword ptr [RSP + 0x8] MOV AL,byte ptr [RAX] SHR AL,0x1 AND AL,0x1 MOVZX ECX,AL CALL 0x0016d560 MOV qword ptr [RSP],RAX CMP qword ptr [RSP],0x0 JNZ 0x00173a6e JMP 0x00173acb LAB_00173a6e: JMP 0x00173a91 LAB_00173a70: MOV RAX,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RSP + 0x8] MOVZX ECX,word ptr [RCX + 0x2] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP],RAX MOV RAX,qword ptr [RSP] MOV ECX,dword ptr [RAX] ADD ECX,0x1 MOV dword ptr [RAX],ECX LAB_00173a91: MOV RDX,qword ptr [RSP] MOV RAX,qword ptr [RSP + 0x18] MOVSXD RCX,dword ptr [RSP + 0x14] MOV qword ptr [RAX + RCX*0x8],RDX MOV EAX,dword ptr [RSP + 0x14] ADD EAX,0x1 MOV dword ptr [RSP + 0x14],EAX JMP 0x00173a02 LAB_00173ab3: JMP 0x00173ab5 LAB_00173ab5: MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x60],RAX JMP 0x00173af0 LAB_00173acb: MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] CALL 0x00129f80 MOV dword ptr [RSP + 0x58],0x0 MOV qword ptr [RSP + 0x60],0x6 LAB_00173af0: MOV RAX,qword ptr [RSP + 0x58] MOV RDX,qword ptr [RSP + 0x60] ADD RSP,0x68 RET
int1 [16] js_closure2(int8 param_1,long param_2,int8 param_3,long param_4,long param_5, int8 param_6) { int1 auVar1 [16]; long lVar2; byte *pbVar3; int *local_68; int local_54; int4 local_10; int4 uStack_c; int8 local_8; *(long *)(param_2 + 0x30) = param_4; *(int8 *)(param_2 + 0x40) = 0; *(int8 *)(param_2 + 0x38) = 0; if (*(int *)(param_4 + 0x5c) != 0) { lVar2 = js_mallocz(param_1,(long)*(int *)(param_4 + 0x5c) << 3); if (lVar2 == 0) { LAB_00173acb: JS_FreeValue(param_1,param_2,param_3); local_10 = 0; local_8 = 6; goto LAB_00173af0; } *(long *)(param_2 + 0x38) = lVar2; for (local_54 = 0; local_54 < *(int *)(param_4 + 0x5c); local_54 = local_54 + 1) { pbVar3 = (byte *)(*(long *)(param_4 + 0x38) + (long)local_54 * 8); if ((*pbVar3 & 1) == 0) { local_68 = *(int **)(param_5 + (ulong)*(ushort *)(pbVar3 + 2) * 8); *local_68 = *local_68 + 1; } else { local_68 = (int *)get_var_ref(param_1,param_6,*(int2 *)(pbVar3 + 2),*pbVar3 >> 1 & 1); if (local_68 == (int *)0x0) goto LAB_00173acb; } *(int **)(lVar2 + (long)local_54 * 8) = local_68; } } local_10 = (int4)param_2; uStack_c = (int4)((ulong)param_2 >> 0x20); local_8 = param_3; LAB_00173af0: auVar1._4_4_ = uStack_c; auVar1._0_4_ = local_10; auVar1._8_8_ = local_8; return auVar1; }
47,540
js_closure2
bluesky950520[P]quickjs/quickjs.c
static JSValue js_closure2(JSContext *ctx, JSValue func_obj, JSFunctionBytecode *b, JSVarRef **cur_var_refs, JSStackFrame *sf) { JSObject *p; JSVarRef **var_refs; int i; p = JS_VALUE_GET_OBJ(func_obj); p->u.func.function_bytecode = b; p->u.func.home_object = NULL; p->u.func.var_refs = NULL; if (b->closure_var_count) { var_refs = js_mallocz(ctx, sizeof(var_refs[0]) * b->closure_var_count); if (!var_refs) goto fail; p->u.func.var_refs = var_refs; for(i = 0; i < b->closure_var_count; i++) { JSClosureVar *cv = &b->closure_var[i]; JSVarRef *var_ref; if (cv->is_local) { /* reuse the existing variable reference if it already exists */ var_ref = get_var_ref(ctx, sf, cv->var_idx, cv->is_arg); if (!var_ref) goto fail; } else { var_ref = cur_var_refs[cv->var_idx]; var_ref->header.ref_count++; } var_refs[i] = var_ref; } } return func_obj; fail: /* bfunc is freed when func_obj is freed */ JS_FreeValue(ctx, func_obj); return JS_EXCEPTION; }
O2
c
js_closure2: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %rax movq %rcx, 0x30(%rsi) xorps %xmm0, %xmm0 movups %xmm0, 0x38(%rsi) movslq 0x5c(%rcx), %rsi testq %rsi, %rsi je 0x3cf93 movq %r9, %r15 movq %r8, %r12 movq %rcx, %r13 movq %rdi, %rbp movq %rax, 0x8(%rsp) movq %rdx, 0x10(%rsp) shlq $0x3, %rsi callq 0x1adf1 testq %rax, %rax je 0x3cf70 movq %rax, %rbx movq 0x8(%rsp), %rax addq $0x38, %rax movq %rbx, (%rax) xorl %r14d, %r14d movslq 0x5c(%r13), %rax cmpq %rax, %r14 jge 0x3cf89 movq 0x38(%r13), %rax movzbl (%rax,%r14,8), %ecx movzwl 0x2(%rax,%r14,8), %edx testb $0x1, %cl jne 0x3cf52 movl %edx, %eax movq (%r12,%rax,8), %rax incl (%rax) jmp 0x3cf67 shrl %ecx andl $0x1, %ecx movq %rbp, %rdi movq %r15, %rsi callq 0x3b7b6 testq %rax, %rax je 0x3cf70 movq %rax, (%rbx,%r14,8) incq %r14 jmp 0x3cf2b movq %rbp, %rdi movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx callq 0x1bbce pushq $0x6 popq %rdx xorl %eax, %eax jmp 0x3cf93 movq 0x10(%rsp), %rdx movq 0x8(%rsp), %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_closure2: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rax, rsi mov [rsi+30h], rcx xorps xmm0, xmm0 movups xmmword ptr [rsi+38h], xmm0 movsxd rsi, dword ptr [rcx+5Ch] test rsi, rsi jz loc_3CF93 mov r15, r9 mov r12, r8 mov r13, rcx mov rbp, rdi mov [rsp+48h+var_40], rax mov [rsp+48h+var_38], rdx shl rsi, 3 call js_mallocz test rax, rax jz short loc_3CF70 mov rbx, rax mov rax, [rsp+48h+var_40] add rax, 38h ; '8' mov [rax], rbx xor r14d, r14d loc_3CF2B: movsxd rax, dword ptr [r13+5Ch] cmp r14, rax jge short loc_3CF89 mov rax, [r13+38h] movzx ecx, byte ptr [rax+r14*8] movzx edx, word ptr [rax+r14*8+2] test cl, 1 jnz short loc_3CF52 mov eax, edx mov rax, [r12+rax*8] inc dword ptr [rax] jmp short loc_3CF67 loc_3CF52: shr ecx, 1 and ecx, 1 mov rdi, rbp mov rsi, r15 call get_var_ref test rax, rax jz short loc_3CF70 loc_3CF67: mov [rbx+r14*8], rax inc r14 jmp short loc_3CF2B loc_3CF70: mov rdi, rbp mov rsi, [rsp+48h+var_40] mov rdx, [rsp+48h+var_38] call JS_FreeValue push 6 pop rdx xor eax, eax jmp short loc_3CF93 loc_3CF89: mov rdx, [rsp+48h+var_38] mov rax, [rsp+48h+var_40] loc_3CF93: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_closure2(long long a1, long long a2, long long a3, long long a4, long long a5, long long a6) { long long result; // rax long long v10; // rax long long v11; // rbx long long i; // r14 long long v13; // rax unsigned int v14; // ecx _DWORD *var_ref; // rax result = a2; *(_QWORD *)(a2 + 48) = a4; *(_OWORD *)(a2 + 56) = 0LL; if ( *(_DWORD *)(a4 + 92) ) { v10 = js_mallocz(a1, 8LL * *(int *)(a4 + 92)); if ( v10 ) { v11 = v10; *(_QWORD *)(a2 + 56) = v10; for ( i = 0LL; i < *(int *)(a4 + 92); ++i ) { v13 = *(_QWORD *)(a4 + 56); v14 = *(unsigned __int8 *)(v13 + 8 * i); if ( (v14 & 1) != 0 ) { var_ref = (_DWORD *)get_var_ref(a1, a6, *(unsigned __int16 *)(v13 + 8 * i + 2), (v14 >> 1) & 1); if ( !var_ref ) goto LABEL_9; } else { var_ref = *(_DWORD **)(a5 + 8LL * *(unsigned __int16 *)(v13 + 8 * i + 2)); ++*var_ref; } *(_QWORD *)(v11 + 8 * i) = var_ref; } return a2; } else { LABEL_9: JS_FreeValue(a1, a2, a3); return 0LL; } } return result; }
js_closure2: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RAX,RSI MOV qword ptr [RSI + 0x30],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI + 0x38],XMM0 MOVSXD RSI,dword ptr [RCX + 0x5c] TEST RSI,RSI JZ 0x0013cf93 MOV R15,R9 MOV R12,R8 MOV R13,RCX MOV RBP,RDI MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RDX SHL RSI,0x3 CALL 0x0011adf1 TEST RAX,RAX JZ 0x0013cf70 MOV RBX,RAX MOV RAX,qword ptr [RSP + 0x8] ADD RAX,0x38 MOV qword ptr [RAX],RBX XOR R14D,R14D LAB_0013cf2b: MOVSXD RAX,dword ptr [R13 + 0x5c] CMP R14,RAX JGE 0x0013cf89 MOV RAX,qword ptr [R13 + 0x38] MOVZX ECX,byte ptr [RAX + R14*0x8] MOVZX EDX,word ptr [RAX + R14*0x8 + 0x2] TEST CL,0x1 JNZ 0x0013cf52 MOV EAX,EDX MOV RAX,qword ptr [R12 + RAX*0x8] INC dword ptr [RAX] JMP 0x0013cf67 LAB_0013cf52: SHR ECX,0x1 AND ECX,0x1 MOV RDI,RBP MOV RSI,R15 CALL 0x0013b7b6 TEST RAX,RAX JZ 0x0013cf70 LAB_0013cf67: MOV qword ptr [RBX + R14*0x8],RAX INC R14 JMP 0x0013cf2b LAB_0013cf70: MOV RDI,RBP MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] CALL 0x0011bbce PUSH 0x6 POP RDX XOR EAX,EAX JMP 0x0013cf93 LAB_0013cf89: MOV RDX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP + 0x8] LAB_0013cf93: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_closure2(int8 param_1,long param_2,int8 param_3,long param_4,long param_5, int8 param_6) { byte bVar1; long lVar2; int *piVar3; ulong uVar4; long lVar5; int1 auVar6 [16]; *(long *)(param_2 + 0x30) = param_4; *(int8 *)(param_2 + 0x38) = 0; *(int8 *)(param_2 + 0x40) = 0; if ((long)*(int *)(param_4 + 0x5c) != 0) { lVar2 = js_mallocz(param_1,(long)*(int *)(param_4 + 0x5c) << 3); if (lVar2 == 0) { LAB_0013cf70: JS_FreeValue(param_1,param_2,param_3); param_3 = 6; param_2 = 0; } else { *(long *)(param_2 + 0x38) = lVar2; for (lVar5 = 0; lVar5 < *(int *)(param_4 + 0x5c); lVar5 = lVar5 + 1) { bVar1 = *(byte *)(*(long *)(param_4 + 0x38) + lVar5 * 8); uVar4 = (ulong)*(ushort *)(*(long *)(param_4 + 0x38) + 2 + lVar5 * 8); if ((bVar1 & 1) == 0) { piVar3 = *(int **)(param_5 + uVar4 * 8); *piVar3 = *piVar3 + 1; } else { piVar3 = (int *)get_var_ref(param_1,param_6,uVar4,bVar1 >> 1 & 1); if (piVar3 == (int *)0x0) goto LAB_0013cf70; } *(int **)(lVar2 + lVar5 * 8) = piVar3; } } } auVar6._8_8_ = param_3; auVar6._0_8_ = param_2; return auVar6; }
47,541
ma_tls_end
eloqsql/libmariadb/libmariadb/secure/openssl.c
void ma_tls_end() { if (ma_tls_initialized) { pthread_mutex_lock(&LOCK_openssl_config); #ifndef HAVE_OPENSSL_1_1_API if (LOCK_crypto) { int i; CRYPTO_set_locking_callback(NULL); CRYPTO_THREADID_set_callback(NULL); for (i=0; i < CRYPTO_num_locks(); i++) pthread_mutex_destroy(&LOCK_crypto[i]); ma_free((gptr)LOCK_crypto); LOCK_crypto= NULL; } #endif if (mariadb_deinitialize_ssl) { #ifndef HAVE_OPENSSL_1_1_API ERR_remove_thread_state(NULL); EVP_cleanup(); CRYPTO_cleanup_all_ex_data(); ERR_free_strings(); CONF_modules_free(); CONF_modules_unload(1); #endif } ma_tls_initialized= FALSE; pthread_mutex_unlock(&LOCK_openssl_config); pthread_mutex_destroy(&LOCK_openssl_config); } return; }
O3
c
ma_tls_end: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx leaq 0x22a86(%rip), %r14 # 0x4af50 cmpb $0x0, (%r14) je 0x284f7 leaq 0x24359(%rip), %rbx # 0x4c830 movq %rbx, %rdi callq 0x136a0 movb $0x0, (%r14) movq %rbx, %rdi callq 0x13330 movq %rbx, %rdi popq %rbx popq %r14 popq %rbp jmp 0x13540 popq %rbx popq %r14 popq %rbp retq
ma_tls_end: push rbp mov rbp, rsp push r14 push rbx lea r14, ma_tls_initialized cmp byte ptr [r14], 0 jz short loc_284F7 lea rbx, LOCK_openssl_config mov rdi, rbx call _pthread_mutex_lock mov byte ptr [r14], 0 mov rdi, rbx call _pthread_mutex_unlock mov rdi, rbx pop rbx pop r14 pop rbp jmp _pthread_mutex_destroy loc_284F7: pop rbx pop r14 pop rbp retn
long long ma_tls_end() { long long result; // rax if ( ma_tls_initialized ) { pthread_mutex_lock(&LOCK_openssl_config); ma_tls_initialized = 0; pthread_mutex_unlock(&LOCK_openssl_config); return pthread_mutex_destroy(&LOCK_openssl_config); } return result; }
ma_tls_end: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX LEA R14,[0x14af50] CMP byte ptr [R14],0x0 JZ 0x001284f7 LEA RBX,[0x14c830] MOV RDI,RBX CALL 0x001136a0 MOV byte ptr [R14],0x0 MOV RDI,RBX CALL 0x00113330 MOV RDI,RBX POP RBX POP R14 POP RBP JMP 0x00113540 LAB_001284f7: POP RBX POP R14 POP RBP RET
void ma_tls_end(void) { if (ma_tls_initialized != '\0') { pthread_mutex_lock((pthread_mutex_t *)LOCK_openssl_config); ma_tls_initialized = 0; pthread_mutex_unlock((pthread_mutex_t *)LOCK_openssl_config); pthread_mutex_destroy((pthread_mutex_t *)LOCK_openssl_config); return; } return; }
47,542
lunasvg::isDisallowedElement(lunasvg::SVGElement const*)
dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp
inline bool isDisallowedElement(const SVGElement* element) { switch(element->id()) { case ElementID::Circle: case ElementID::Ellipse: case ElementID::G: case ElementID::Image: case ElementID::Line: case ElementID::Path: case ElementID::Polygon: case ElementID::Polyline: case ElementID::Rect: case ElementID::Svg: case ElementID::Symbol: case ElementID::Text: case ElementID::Tspan: case ElementID::Use: return false; default: return true; } }
O0
cpp
lunasvg::isDisallowedElement(lunasvg::SVGElement const*): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi callq 0x1fe70 movb %al, %cl movb %cl, -0x11(%rbp) subb $0x2, %al je 0x21313 jmp 0x212e0 movb -0x11(%rbp), %al addb $-0x5, %al subb $0x4, %al jb 0x21313 jmp 0x212eb movb -0x11(%rbp), %al subb $0xc, %al je 0x21313 jmp 0x212f4 movb -0x11(%rbp), %al addb $-0xe, %al subb $0x2, %al jb 0x21313 jmp 0x212ff movb -0x11(%rbp), %al subb $0x11, %al je 0x21313 jmp 0x21308 movb -0x11(%rbp), %al addb $-0x14, %al subb $0x4, %al ja 0x21319 jmp 0x21313 movb $0x0, -0x1(%rbp) jmp 0x2131d movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
_ZN7lunasvg19isDisallowedElementEPKNS_10SVGElementE: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov rdi, [rbp+var_10]; this call _ZNK7lunasvg10SVGElement2idEv; lunasvg::SVGElement::id(void) mov cl, al mov [rbp+var_11], cl sub al, 2 jz short loc_21313 jmp short $+2 loc_212E0: mov al, [rbp+var_11] add al, 0FBh sub al, 4 jb short loc_21313 jmp short $+2 loc_212EB: mov al, [rbp+var_11] sub al, 0Ch jz short loc_21313 jmp short $+2 loc_212F4: mov al, [rbp+var_11] add al, 0F2h sub al, 2 jb short loc_21313 jmp short $+2 loc_212FF: mov al, [rbp+var_11] sub al, 11h jz short loc_21313 jmp short $+2 loc_21308: mov al, [rbp+var_11] add al, 0ECh sub al, 4 ja short loc_21319 jmp short $+2 loc_21313: mov [rbp+var_1], 0 jmp short loc_2131D loc_21319: mov [rbp+var_1], 1 loc_2131D: mov al, [rbp+var_1] and al, 1 add rsp, 20h pop rbp retn
bool lunasvg::isDisallowedElement(lunasvg *this, const lunasvg::SVGElement *a2) { char v3; // [rsp+Fh] [rbp-11h] v3 = lunasvg::SVGElement::id(this); return v3 != 2 && (unsigned __int8)(v3 - 5) >= 4u && v3 != 12 && (unsigned __int8)(v3 - 14) >= 2u && v3 != 17 && (unsigned __int8)(v3 - 20) > 4u; }
isDisallowedElement: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV RDI,qword ptr [RBP + -0x10] CALL 0x0011fe70 MOV CL,AL MOV byte ptr [RBP + -0x11],CL SUB AL,0x2 JZ 0x00121313 JMP 0x001212e0 LAB_001212e0: MOV AL,byte ptr [RBP + -0x11] ADD AL,0xfb SUB AL,0x4 JC 0x00121313 JMP 0x001212eb LAB_001212eb: MOV AL,byte ptr [RBP + -0x11] SUB AL,0xc JZ 0x00121313 JMP 0x001212f4 LAB_001212f4: MOV AL,byte ptr [RBP + -0x11] ADD AL,0xf2 SUB AL,0x2 JC 0x00121313 JMP 0x001212ff LAB_001212ff: MOV AL,byte ptr [RBP + -0x11] SUB AL,0x11 JZ 0x00121313 JMP 0x00121308 LAB_00121308: MOV AL,byte ptr [RBP + -0x11] ADD AL,0xec SUB AL,0x4 JA 0x00121319 JMP 0x00121313 LAB_00121313: MOV byte ptr [RBP + -0x1],0x0 JMP 0x0012131d LAB_00121319: MOV byte ptr [RBP + -0x1],0x1 LAB_0012131d: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x20 POP RBP RET
/* lunasvg::isDisallowedElement(lunasvg::SVGElement const*) */ int1 lunasvg::isDisallowedElement(SVGElement *param_1) { char cVar1; int1 local_9; cVar1 = SVGElement::id(param_1); if ((((cVar1 == '\x02') || ((byte)(cVar1 - 5U) < 4)) || (cVar1 == '\f')) || ((((byte)(cVar1 - 0xeU) < 2 || (cVar1 == '\x11')) || ((byte)(cVar1 - 0x14U) < 5)))) { local_9 = 0; } else { local_9 = 1; } return local_9; }
47,543
ggml_get_f32_1d
monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c
float ggml_get_f32_1d(const struct ggml_tensor * tensor, int i) { if (!ggml_is_contiguous(tensor)) { int64_t id[4] = { 0, 0, 0, 0 }; ggml_unravel_index(tensor, i, &id[0], &id[1], &id[2], &id[3]); return ggml_get_f32_nd(tensor, id[0], id[1], id[2], id[3]); } switch (tensor->type) { case GGML_TYPE_I8: { return ((int8_t *)(tensor->data))[i]; } case GGML_TYPE_I16: { return ((int16_t *)(tensor->data))[i]; } case GGML_TYPE_I32: { return ((int32_t *)(tensor->data))[i]; } case GGML_TYPE_F16: { return GGML_FP16_TO_FP32(((ggml_fp16_t *)(tensor->data))[i]); } case GGML_TYPE_BF16: { return GGML_BF16_TO_FP32(((ggml_bf16_t *)(tensor->data))[i]); } case GGML_TYPE_F32: { return ((float *)(tensor->data))[i]; } default: { GGML_ABORT("fatal error"); } } }
O3
c
ggml_get_f32_1d: pushq %rbp pushq %r14 pushq %rbx subq $0x20, %rsp movl %esi, %ebp movq %rdi, %rbx callq 0x8170 testb %al, %al je 0xa216 movl (%rbx), %eax leal -0x18(%rax), %ecx cmpl $0x6, %ecx ja 0xa25b leaq 0x4902b(%rip), %rax # 0x53228 movslq (%rax,%rcx,4), %rcx addq %rax, %rcx jmpq *%rcx movq 0xf8(%rbx), %rax movslq %ebp, %rcx movsbl (%rax,%rcx), %eax jmp 0xa28e vpxor %xmm0, %xmm0, %xmm0 leaq 0x8(%rsp), %rcx vmovdqu %ymm0, -0x8(%rcx) movslq %ebp, %rsi leaq 0x10(%rsp), %r8 leaq 0x18(%rsp), %r9 movq %rsp, %r14 movq %rbx, %rdi movq %r14, %rdx vzeroupper callq 0x8450 movl (%r14), %esi movl 0x8(%r14), %edx movl 0x10(%r14), %ecx movl 0x18(%r14), %r8d movq %rbx, %rdi callq 0x80d0 jmp 0xa2cb testl %eax, %eax je 0xa2bc cmpl $0x1, %eax jne 0xa2d4 movq 0xf8(%rbx), %rax movslq %ebp, %rcx movzwl (%rax,%rcx,2), %eax movq 0x5acf7(%rip), %rcx # 0x64f70 vmovd (%rcx,%rax,4), %xmm0 jmp 0xa2cb movq 0xf8(%rbx), %rax movslq %ebp, %rcx movswl (%rax,%rcx,2), %eax vcvtsi2ss %eax, %xmm0, %xmm0 jmp 0xa2cb movq 0xf8(%rbx), %rax movslq %ebp, %rcx vcvtsi2ssl (%rax,%rcx,4), %xmm0, %xmm0 jmp 0xa2cb movq 0xf8(%rbx), %rax movslq %ebp, %rcx movzwl (%rax,%rcx,2), %eax shll $0x10, %eax vmovd %eax, %xmm0 jmp 0xa2cb movq 0xf8(%rbx), %rax movslq %ebp, %rcx vmovd (%rax,%rcx,4), %xmm0 addq $0x20, %rsp popq %rbx popq %r14 popq %rbp retq leaq 0x4958f(%rip), %rdi # 0x5386a leaq 0x496f5(%rip), %rdx # 0x539d7 movl $0xacc, %esi # imm = 0xACC xorl %eax, %eax callq 0x8950
ggml_get_f32_1d: push rbp push r14 push rbx sub rsp, 20h mov ebp, esi mov rbx, rdi call _ggml_is_contiguous test al, al jz short loc_A216 mov eax, [rbx] lea ecx, [rax-18h]; switch 7 cases cmp ecx, 6 ja short def_A204; jumptable 000000000000A204 default case lea rax, jpt_A204 movsxd rcx, ds:(jpt_A204 - 53228h)[rax+rcx*4] add rcx, rax jmp rcx; switch jump loc_A206: mov rax, [rbx+0F8h]; jumptable 000000000000A204 case 24 movsxd rcx, ebp movsx eax, byte ptr [rax+rcx] jmp short loc_A28E loc_A216: vpxor xmm0, xmm0, xmm0 lea rcx, [rsp+38h+var_30] vmovdqu ymmword ptr [rcx-8], ymm0 movsxd rsi, ebp lea r8, [rsp+38h+var_28] lea r9, [rsp+38h+var_20] mov r14, rsp mov rdi, rbx mov rdx, r14 vzeroupper call _ggml_unravel_index mov esi, [r14] mov edx, [r14+8] mov ecx, [r14+10h] mov r8d, [r14+18h] mov rdi, rbx call _ggml_get_f32_nd jmp short loc_A2CB def_A204: test eax, eax; jumptable 000000000000A204 default case jz short loc_A2BC cmp eax, 1 jnz short loc_A2D4; jumptable 000000000000A204 cases 27-29 mov rax, [rbx+0F8h] movsxd rcx, ebp movzx eax, word ptr [rax+rcx*2] mov rcx, cs:ggml_table_f32_f16_ptr vmovd xmm0, dword ptr [rcx+rax*4] jmp short loc_A2CB loc_A280: mov rax, [rbx+0F8h]; jumptable 000000000000A204 case 25 movsxd rcx, ebp movsx eax, word ptr [rax+rcx*2] loc_A28E: vcvtsi2ss xmm0, xmm0, eax jmp short loc_A2CB loc_A294: mov rax, [rbx+0F8h]; jumptable 000000000000A204 case 26 movsxd rcx, ebp vcvtsi2ss xmm0, xmm0, dword ptr [rax+rcx*4] jmp short loc_A2CB loc_A2A5: mov rax, [rbx+0F8h]; jumptable 000000000000A204 case 30 movsxd rcx, ebp movzx eax, word ptr [rax+rcx*2] shl eax, 10h vmovd xmm0, eax jmp short loc_A2CB loc_A2BC: mov rax, [rbx+0F8h] movsxd rcx, ebp vmovd xmm0, dword ptr [rax+rcx*4] loc_A2CB: add rsp, 20h pop rbx pop r14 pop rbp retn loc_A2D4: lea rdi, aWorkspaceLlm4b_0; jumptable 000000000000A204 cases 27-29 lea rdx, aFatalError; "fatal error" mov esi, 0ACCh xor eax, eax call _ggml_abort
long long ggml_get_f32_1d(int *a1, int a2, __m128 _XMM0) { int v4; // eax long long result; // rax unsigned int v15; // [rsp+0h] [rbp-38h] BYREF unsigned int v16; // [rsp+8h] [rbp-30h] BYREF unsigned int v17; // [rsp+10h] [rbp-28h] BYREF _DWORD v18[8]; // [rsp+18h] [rbp-20h] BYREF if ( (unsigned __int8)ggml_is_contiguous() ) { v4 = *a1; switch ( *a1 ) { case 24: result = (unsigned int)*(char *)(*((_QWORD *)a1 + 31) + a2); goto LABEL_9; case 25: result = (unsigned int)*(__int16 *)(*((_QWORD *)a1 + 31) + 2LL * a2); LABEL_9: __asm { vcvtsi2ss xmm0, xmm0, eax } return result; case 26: result = *((_QWORD *)a1 + 31); __asm { vcvtsi2ss xmm0, xmm0, dword ptr [rax+rcx*4] } return result; case 27: case 28: case 29: goto LABEL_14; case 30: result = *(unsigned __int16 *)(*((_QWORD *)a1 + 31) + 2LL * a2) << 16; __asm { vmovd xmm0, eax } return result; default: if ( v4 ) { if ( v4 == 1 ) { result = *(unsigned __int16 *)(*((_QWORD *)a1 + 31) + 2LL * a2); _RCX = &ggml_table_f32_f16; __asm { vmovd xmm0, dword ptr [rcx+rax*4] } } else { LABEL_14: ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c", 2764LL, "fatal error"); result = ggml_get_f32_nd(); } } else { result = *((_QWORD *)a1 + 31); _RCX = a2; __asm { vmovd xmm0, dword ptr [rax+rcx*4] } } break; } } else { __asm { vpxor xmm0, xmm0, xmm0 } _RCX = &v16; __asm { vmovdqu ymmword ptr [rcx-8], ymm0 vzeroupper } ggml_unravel_index(a1, a2, &v15, &v16, &v17, v18, *(double *)&_XMM0); return ggml_get_f32_nd(a1, v15, v16, v17, v18[0]); } return result; }
ggml_get_f32_1d: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x20 MOV EBP,ESI MOV RBX,RDI CALL 0x00108170 TEST AL,AL JZ 0x0010a216 MOV EAX,dword ptr [RBX] LEA ECX,[RAX + -0x18] CMP ECX,0x6 JA 0x0010a25b LEA RAX,[0x153228] MOVSXD RCX,dword ptr [RAX + RCX*0x4] ADD RCX,RAX switchD: JMP RCX caseD_18: MOV RAX,qword ptr [RBX + 0xf8] MOVSXD RCX,EBP MOVSX EAX,byte ptr [RAX + RCX*0x1] JMP 0x0010a28e LAB_0010a216: VPXOR XMM0,XMM0,XMM0 LEA RCX,[RSP + 0x8] VMOVDQU ymmword ptr [RCX + -0x8],YMM0 MOVSXD RSI,EBP LEA R8,[RSP + 0x10] LEA R9,[RSP + 0x18] MOV R14,RSP MOV RDI,RBX MOV RDX,R14 VZEROUPPER CALL 0x00108450 MOV ESI,dword ptr [R14] MOV EDX,dword ptr [R14 + 0x8] MOV ECX,dword ptr [R14 + 0x10] MOV R8D,dword ptr [R14 + 0x18] MOV RDI,RBX CALL 0x001080d0 JMP 0x0010a2cb default: TEST EAX,EAX JZ 0x0010a2bc CMP EAX,0x1 JNZ 0x0010a2d4 MOV RAX,qword ptr [RBX + 0xf8] MOVSXD RCX,EBP MOVZX EAX,word ptr [RAX + RCX*0x2] MOV RCX,qword ptr [0x00164f70] VMOVD XMM0,dword ptr [RCX + RAX*0x4] JMP 0x0010a2cb caseD_19: MOV RAX,qword ptr [RBX + 0xf8] MOVSXD RCX,EBP MOVSX EAX,word ptr [RAX + RCX*0x2] LAB_0010a28e: VCVTSI2SS XMM0,XMM0,EAX JMP 0x0010a2cb caseD_1a: MOV RAX,qword ptr [RBX + 0xf8] MOVSXD RCX,EBP VCVTSI2SS XMM0,XMM0,dword ptr [RAX + RCX*0x4] JMP 0x0010a2cb caseD_1e: MOV RAX,qword ptr [RBX + 0xf8] MOVSXD RCX,EBP MOVZX EAX,word ptr [RAX + RCX*0x2] SHL EAX,0x10 VMOVD XMM0,EAX JMP 0x0010a2cb LAB_0010a2bc: MOV RAX,qword ptr [RBX + 0xf8] MOVSXD RCX,EBP VMOVD XMM0,dword ptr [RAX + RCX*0x4] LAB_0010a2cb: ADD RSP,0x20 POP RBX POP R14 POP RBP RET caseD_1b: LEA RDI,[0x15386a] LEA RDX,[0x1539d7] MOV ESI,0xacc XOR EAX,EAX CALL 0x00108950
ulong ggml_get_f32_1d(int *param_1,int param_2) { char cVar1; int iVar2; int8 extraout_XMM0_Qa; ulong uVar3; int1 auVar4 [16]; int1 auVar5 [16]; int1 extraout_var [56]; ulong local_38; ulong uStack_30; ulong uStack_28; ulong uStack_20; int1 auVar6 [64]; cVar1 = ggml_is_contiguous(); auVar6._8_56_ = extraout_var; auVar6._0_8_ = extraout_XMM0_Qa; if (cVar1 == '\0') { local_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; ggml_unravel_index(param_1,(long)param_2,&local_38,&uStack_30,&uStack_28,&uStack_20); uVar3 = ggml_get_f32_nd(param_1,local_38 & 0xffffffff,uStack_30 & 0xffffffff, uStack_28 & 0xffffffff,uStack_20 & 0xffffffff); return uVar3; } iVar2 = *param_1; auVar4._4_12_ = auVar6._4_12_; switch(iVar2) { case 0x18: iVar2 = (int)*(char *)(*(long *)(param_1 + 0x3e) + (long)param_2); goto LAB_0010a28e; case 0x19: iVar2 = (int)*(short *)(*(long *)(param_1 + 0x3e) + (long)param_2 * 2); LAB_0010a28e: auVar4._0_4_ = (float)iVar2; uVar3 = auVar4._0_8_; break; case 0x1a: auVar5._0_4_ = (float)*(int *)(*(long *)(param_1 + 0x3e) + (long)param_2 * 4); auVar5._4_12_ = auVar4._4_12_; uVar3 = auVar5._0_8_; break; case 0x1b: case 0x1c: case 0x1d: switchD_0010a204_caseD_1b: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c" ,0xacc,"fatal error"); case 0x1e: uVar3 = (ulong)*(ushort *)(*(long *)(param_1 + 0x3e) + (long)param_2 * 2) << 0x10; break; default: if (iVar2 == 0) { uVar3 = (ulong)*(uint *)(*(long *)(param_1 + 0x3e) + (long)param_2 * 4); } else { if (iVar2 != 1) goto switchD_0010a204_caseD_1b; uVar3 = (ulong)*(uint *)(PTR_ggml_table_f32_f16_00164f70 + (ulong)*(ushort *)(*(long *)(param_1 + 0x3e) + (long)param_2 * 2) * 4) ; } } return uVar3; }
47,544
common_chat_format_single[abi:cxx11](minja::chat_template const&, std::vector<common_chat_msg, std::allocator<common_chat_msg>> const&, common_chat_msg const&, bool, bool)
monkey531[P]llama/common/common.cpp
std::string common_chat_format_single( const common_chat_template & tmpl, const std::vector<common_chat_msg> & past_msg, const common_chat_msg & new_msg, bool add_ass, bool use_jinja) { std::ostringstream ss; auto fmt_past_msg = past_msg.empty() ? "" : common_chat_apply_template(tmpl, past_msg, false, use_jinja); std::vector<common_chat_msg> chat_new(past_msg); // if the past_msg ends with a newline, we must preserve it in the formatted version if (add_ass && !fmt_past_msg.empty() && fmt_past_msg.back() == '\n') { ss << "\n"; }; // format chat with new_msg chat_new.push_back(new_msg); auto fmt_new_msg = common_chat_apply_template(tmpl, chat_new, add_ass, use_jinja); // get the diff part ss << fmt_new_msg.substr(fmt_past_msg.size(), fmt_new_msg.size() - fmt_past_msg.size()); return ss.str(); }
O1
cpp
common_chat_format_single[abi:cxx11](minja::chat_template const&, std::vector<common_chat_msg, std::allocator<common_chat_msg>> const&, common_chat_msg const&, bool, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1f8, %rsp # imm = 0x1F8 movl %r9d, %r15d movl %r8d, %ebp movq %rcx, %r12 movq %rdx, %r13 movq %rsi, %r14 movq %rdi, %rbx leaq 0x80(%rsp), %rdi callq 0x198d0 movq (%r13), %rax movzbl %r15b, %r15d cmpq 0x8(%r13), %rax je 0x5c6bc leaq 0x8(%rsp), %rdi movq %r14, %rsi movq %r13, %rdx xorl %ecx, %ecx movl %r15d, %r8d callq 0x5beff jmp 0x5c6d9 leaq 0x18(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x59570(%rip), %rdx # 0xb5c3c leaq 0x8(%rsp), %rdi movq %rdx, %rsi callq 0x32ea4 leaq 0x48(%rsp), %rdi movq %r13, %rsi callq 0x64b3a testb %bpl, %bpl je 0x5c71a movq 0x10(%rsp), %rax testq %rax, %rax je 0x5c71a movq 0x8(%rsp), %rcx cmpb $0xa, -0x1(%rcx,%rax) jne 0x5c71a leaq 0x59533(%rip), %rsi # 0xb5c3b leaq 0x80(%rsp), %rdi movl $0x1, %edx callq 0x19780 leaq 0x48(%rsp), %rdi movq %r12, %rsi callq 0x64bd2 movzbl %bpl, %ecx leaq 0x60(%rsp), %rdi leaq 0x48(%rsp), %rdx movq %r14, %rsi movl %r15d, %r8d callq 0x5beff movq 0x10(%rsp), %rdx leaq 0x60(%rsp), %rsi movq 0x8(%rsi), %rcx subq %rdx, %rcx leaq 0x28(%rsp), %rdi callq 0x19700 movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx leaq 0x80(%rsp), %rdi callq 0x19780 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5c78d movq 0x38(%rsp), %rsi incq %rsi callq 0x196b0 leaq 0x88(%rsp), %rsi movq %rbx, %rdi callq 0x19a80 leaq 0x70(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5c7b8 movq 0x70(%rsp), %rsi incq %rsi callq 0x196b0 leaq 0x48(%rsp), %rdi callq 0x64bfe leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5c7dd movq 0x18(%rsp), %rsi incq %rsi callq 0x196b0 movq 0x9279c(%rip), %rsi # 0xeef80 leaq 0x80(%rsp), %rdi callq 0x193c0 leaq 0xf0(%rsp), %rdi callq 0x19200 movq %rbx, %rax addq $0x1f8, %rsp # imm = 0x1F8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x5c835 movq %rax, %rbx leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5c838 movq 0x38(%rsp), %rsi incq %rsi callq 0x196b0 jmp 0x5c838 movq %rax, %rbx leaq 0x70(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5c864 movq 0x70(%rsp), %rsi incq %rsi callq 0x196b0 jmp 0x5c864 jmp 0x5c861 movq %rax, %rbx jmp 0x5c86e movq %rax, %rbx jmp 0x5c889 movq %rax, %rbx leaq 0x48(%rsp), %rdi callq 0x64bfe leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5c889 movq 0x18(%rsp), %rsi incq %rsi callq 0x196b0 movq 0x926f0(%rip), %rsi # 0xeef80 leaq 0x80(%rsp), %rdi callq 0x193c0 leaq 0xf0(%rsp), %rdi callq 0x19200 movq %rbx, %rdi callq 0x19be0
_Z25common_chat_format_singleB5cxx11RKN5minja13chat_templateERKSt6vectorI15common_chat_msgSaIS4_EERKS4_bb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1F8h mov r15d, r9d mov ebp, r8d mov r12, rcx mov r13, rdx mov r14, rsi mov rbx, rdi lea rdi, [rsp+228h+var_1A8] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) mov rax, [r13+0] movzx r15d, r15b cmp rax, [r13+8] jz short loc_5C6BC lea rdi, [rsp+228h+var_220] mov rsi, r14 mov rdx, r13 xor ecx, ecx mov r8d, r15d call _Z26common_chat_apply_templateB5cxx11RKN5minja13chat_templateERKSt6vectorI15common_chat_msgSaIS4_EEbb; common_chat_apply_template(minja::chat_template const&,std::vector<common_chat_msg> const&,bool,bool) jmp short loc_5C6D9 loc_5C6BC: lea rax, [rsp+228h+var_210] mov [rax-10h], rax lea rdx, aNoteDebugGramm+0CAh; "" lea rdi, [rsp+228h+var_220] mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) loc_5C6D9: lea rdi, [rsp+228h+var_1E0] mov rsi, r13 call _ZNSt6vectorI15common_chat_msgSaIS0_EEC2ERKS2_; std::vector<common_chat_msg>::vector(std::vector<common_chat_msg> const&) test bpl, bpl jz short loc_5C71A mov rax, [rsp+228h+var_218] test rax, rax jz short loc_5C71A mov rcx, [rsp+228h+var_220] cmp byte ptr [rcx+rax-1], 0Ah jnz short loc_5C71A lea rsi, aNoteDebugGramm+0C9h; "\n" lea rdi, [rsp+228h+var_1A8] mov edx, 1 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_5C71A: lea rdi, [rsp+228h+var_1E0] mov rsi, r12 call _ZNSt6vectorI15common_chat_msgSaIS0_EE9push_backERKS0_; std::vector<common_chat_msg>::push_back(common_chat_msg const&) movzx ecx, bpl lea rdi, [rsp+228h+var_1C8] lea rdx, [rsp+228h+var_1E0] mov rsi, r14 mov r8d, r15d call _Z26common_chat_apply_templateB5cxx11RKN5minja13chat_templateERKSt6vectorI15common_chat_msgSaIS4_EEbb; common_chat_apply_template(minja::chat_template const&,std::vector<common_chat_msg> const&,bool,bool) mov rdx, [rsp+228h+var_218] lea rsi, [rsp+228h+var_1C8] mov rcx, [rsi+8] sub rcx, rdx lea rdi, [rsp+228h+var_200] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rsi, [rsp+228h+var_200] mov rdx, [rsp+228h+var_1F8] lea rdi, [rsp+228h+var_1A8] call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rax, [rsp+228h+var_1F0] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_5C78D mov rsi, [rsp+228h+var_1F0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5C78D: lea rsi, [rsp+228h+var_1A0] mov rdi, rbx call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) lea rax, [rsp+228h+var_1B8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_5C7B8 mov rsi, [rsp+228h+var_1B8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5C7B8: lea rdi, [rsp+228h+var_1E0] call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector() lea rax, [rsp+228h+var_210] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_5C7DD mov rsi, [rsp+228h+var_210] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5C7DD: mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+228h+var_1A8] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+228h+var_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rax, rbx add rsp, 1F8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_5C835 mov rbx, rax lea rax, [rsp+arg_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_5C838 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_5C838 loc_5C835: mov rbx, rax loc_5C838: lea rax, [rsp+arg_68] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_5C864 mov rsi, [rsp+arg_68] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_5C864 jmp short loc_5C861 mov rbx, rax jmp short loc_5C86E mov rbx, rax jmp short loc_5C889 loc_5C861: mov rbx, rax loc_5C864: lea rdi, [rsp+arg_40] call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector() loc_5C86E: lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_5C889 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5C889: mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_78] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+arg_E8]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rbx call __Unwind_Resume
long long common_chat_format_single[abi:cxx11]( long long a1, common_chat_inputs *a2, long long *a3, long long a4, unsigned __int8 a5, unsigned __int8 a6) { char *v11; // [rsp+8h] [rbp-220h] BYREF long long v12; // [rsp+10h] [rbp-218h] _QWORD v13[2]; // [rsp+18h] [rbp-210h] BYREF void *v14[2]; // [rsp+28h] [rbp-200h] BYREF long long v15; // [rsp+38h] [rbp-1F0h] BYREF long long v16[3]; // [rsp+48h] [rbp-1E0h] BYREF void *v17[2]; // [rsp+60h] [rbp-1C8h] BYREF long long v18; // [rsp+70h] [rbp-1B8h] BYREF _BYTE v19[8]; // [rsp+80h] [rbp-1A8h] BYREF _BYTE v20[104]; // [rsp+88h] [rbp-1A0h] BYREF _BYTE v21[312]; // [rsp+F0h] [rbp-138h] BYREF std::ostringstream::basic_ostringstream(v19); if ( *a3 == a3[1] ) { v11 = (char *)v13; std::string::_M_construct<char const*>(&v11, "", (long long)""); } else { common_chat_apply_template[abi:cxx11](&v11, a2, a3, 0, a6); } std::vector<common_chat_msg>::vector(v16, a3); if ( a5 && v12 && v11[v12 - 1] == 10 ) std::__ostream_insert<char,std::char_traits<char>>(v19, "\n", 1LL); std::vector<common_chat_msg>::push_back(v16, a4); common_chat_apply_template[abi:cxx11](v17, a2, v16, a5, a6); std::string::substr(v14, v17, v12, (char *)v17[1] - v12); std::__ostream_insert<char,std::char_traits<char>>(v19, v14[0], v14[1]); if ( v14[0] != &v15 ) operator delete(v14[0], v15 + 1); std::stringbuf::str(a1, v20); if ( v17[0] != &v18 ) operator delete(v17[0], v18 + 1); std::vector<common_chat_msg>::~vector(v16); if ( v11 != (char *)v13 ) operator delete(v11, v13[0] + 1LL); std::ostringstream::~ostringstream(v19, &`VTT for'std::ostringstream); std::ios_base::~ios_base((std::ios_base *)v21); return a1; }
common_chat_format_single[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1f8 MOV R15D,R9D MOV EBP,R8D MOV R12,RCX MOV R13,RDX MOV R14,RSI MOV RBX,RDI LEA RDI,[RSP + 0x80] CALL 0x001198d0 MOV RAX,qword ptr [R13] MOVZX R15D,R15B CMP RAX,qword ptr [R13 + 0x8] JZ 0x0015c6bc LAB_0015c6a5: LEA RDI,[RSP + 0x8] MOV RSI,R14 MOV RDX,R13 XOR ECX,ECX MOV R8D,R15D CALL 0x0015beff JMP 0x0015c6d9 LAB_0015c6bc: LEA RAX,[RSP + 0x18] MOV qword ptr [RAX + -0x10],RAX LEA RDX,[0x1b5c3c] LEA RDI,[RSP + 0x8] MOV RSI,RDX CALL 0x00132ea4 LAB_0015c6d9: LEA RDI,[RSP + 0x48] MOV RSI,R13 CALL 0x00164b3a TEST BPL,BPL JZ 0x0015c71a MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x0015c71a MOV RCX,qword ptr [RSP + 0x8] CMP byte ptr [RCX + RAX*0x1 + -0x1],0xa JNZ 0x0015c71a LAB_0015c701: LEA RSI,[0x1b5c3b] LEA RDI,[RSP + 0x80] MOV EDX,0x1 CALL 0x00119780 LAB_0015c71a: LEA RDI,[RSP + 0x48] MOV RSI,R12 CALL 0x00164bd2 LAB_0015c727: MOVZX ECX,BPL LEA RDI,[RSP + 0x60] LEA RDX,[RSP + 0x48] MOV RSI,R14 MOV R8D,R15D CALL 0x0015beff MOV RDX,qword ptr [RSP + 0x10] LEA RSI,[RSP + 0x60] MOV RCX,qword ptr [RSI + 0x8] SUB RCX,RDX LAB_0015c751: LEA RDI,[RSP + 0x28] CALL 0x00119700 MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x30] LAB_0015c765: LEA RDI,[RSP + 0x80] CALL 0x00119780 LEA RAX,[RSP + 0x38] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0015c78d MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001196b0 LAB_0015c78d: LEA RSI,[RSP + 0x88] LAB_0015c795: MOV RDI,RBX CALL 0x00119a80 LAB_0015c79d: LEA RAX,[RSP + 0x70] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0015c7b8 MOV RSI,qword ptr [RSP + 0x70] INC RSI CALL 0x001196b0 LAB_0015c7b8: LEA RDI,[RSP + 0x48] CALL 0x00164bfe LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0015c7dd MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001196b0 LAB_0015c7dd: MOV RSI,qword ptr [0x001eef80] LEA RDI,[RSP + 0x80] CALL 0x001193c0 LEA RDI,[RSP + 0xf0] CALL 0x00119200 MOV RAX,RBX ADD RSP,0x1f8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_chat_format_single[abi:cxx11](minja::chat_template const&, std::vector<common_chat_msg, std::allocator<common_chat_msg> > const&, common_chat_msg const&, bool, bool) */ chat_template * common_chat_format_single_abi_cxx11_ (chat_template *param_1,vector *param_2,common_chat_msg *param_3,bool param_4,bool param_5 ) { int7 in_register_00000009; long *local_220; long local_218; long local_210 [2]; long *local_200; long local_1f8; long local_1f0 [2]; vector<common_chat_msg,std::allocator<common_chat_msg>> local_1e0 [24]; long *local_1c8 [2]; long local_1b8 [2]; ostringstream local_1a8 [112]; ios_base local_138 [264]; std::__cxx11::ostringstream::ostringstream(local_1a8); if (*(long *)param_3 == *(long *)(param_3 + 8)) { local_220 = local_210; std::__cxx11::string::_M_construct<char_const*>(&local_220,""); } else { /* try { // try from 0015c6a5 to 0015c6d8 has its CatchHandler @ 0015c85c */ common_chat_apply_template_abi_cxx11_ ((chat_template *)&local_220,param_2,SUB81(param_3,0),false); } /* try { // try from 0015c6d9 to 0015c6e5 has its CatchHandler @ 0015c857 */ std::vector<common_chat_msg,std::allocator<common_chat_msg>>::vector(local_1e0,(vector *)param_3); if (((param_5) && (local_218 != 0)) && (*(char *)((long)local_220 + local_218 + -1) == '\n')) { /* try { // try from 0015c701 to 0015c726 has its CatchHandler @ 0015c861 */ std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_1a8,"\n",1); } std::vector<common_chat_msg,std::allocator<common_chat_msg>>::push_back (local_1e0,(common_chat_msg *)CONCAT71(in_register_00000009,param_4)); /* try { // try from 0015c727 to 0015c73f has its CatchHandler @ 0015c855 */ common_chat_apply_template_abi_cxx11_ ((chat_template *)local_1c8,param_2,SUB81(local_1e0,0),param_5); /* try { // try from 0015c751 to 0015c75a has its CatchHandler @ 0015c835 */ std::__cxx11::string::substr((ulong)&local_200,(ulong)local_1c8); /* try { // try from 0015c765 to 0015c771 has its CatchHandler @ 0015c815 */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)local_1a8,(char *)local_200,local_1f8); if (local_200 != local_1f0) { operator_delete(local_200,local_1f0[0] + 1); } /* try { // try from 0015c795 to 0015c79c has its CatchHandler @ 0015c813 */ std::__cxx11::stringbuf::str(); if (local_1c8[0] != local_1b8) { operator_delete(local_1c8[0],local_1b8[0] + 1); } std::vector<common_chat_msg,std::allocator<common_chat_msg>>::~vector(local_1e0); if (local_220 != local_210) { operator_delete(local_220,local_210[0] + 1); } std::__cxx11::ostringstream::~ostringstream(local_1a8); std::ios_base::~ios_base(local_138); return param_1; }
47,545
common_chat_format_single[abi:cxx11](minja::chat_template const&, std::vector<common_chat_msg, std::allocator<common_chat_msg>> const&, common_chat_msg const&, bool, bool)
monkey531[P]llama/common/common.cpp
std::string common_chat_format_single( const common_chat_template & tmpl, const std::vector<common_chat_msg> & past_msg, const common_chat_msg & new_msg, bool add_ass, bool use_jinja) { std::ostringstream ss; auto fmt_past_msg = past_msg.empty() ? "" : common_chat_apply_template(tmpl, past_msg, false, use_jinja); std::vector<common_chat_msg> chat_new(past_msg); // if the past_msg ends with a newline, we must preserve it in the formatted version if (add_ass && !fmt_past_msg.empty() && fmt_past_msg.back() == '\n') { ss << "\n"; }; // format chat with new_msg chat_new.push_back(new_msg); auto fmt_new_msg = common_chat_apply_template(tmpl, chat_new, add_ass, use_jinja); // get the diff part ss << fmt_new_msg.substr(fmt_past_msg.size(), fmt_new_msg.size() - fmt_past_msg.size()); return ss.str(); }
O3
cpp
common_chat_format_single[abi:cxx11](minja::chat_template const&, std::vector<common_chat_msg, std::allocator<common_chat_msg>> const&, common_chat_msg const&, bool, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1f8, %rsp # imm = 0x1F8 movl %r9d, %r15d movl %r8d, %ebp movq %rcx, %r12 movq %rdx, %r13 movq %rsi, %r14 movq %rdi, %rbx leaq 0x80(%rsp), %rdi callq 0x198d0 movq (%r13), %rax movzbl %r15b, %r15d cmpq 0x8(%r13), %rax je 0x5b437 leaq 0x8(%rsp), %rdi movq %r14, %rsi movq %r13, %rdx xorl %ecx, %ecx movl %r15d, %r8d callq 0x5ac90 jmp 0x5b454 leaq 0x18(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x57805(%rip), %rdx # 0xb2c4c leaq 0x8(%rsp), %rdi movq %rdx, %rsi callq 0x320e8 leaq 0x48(%rsp), %rdi movq %r13, %rsi callq 0x631fc testb %bpl, %bpl je 0x5b495 movq 0x10(%rsp), %rax testq %rax, %rax je 0x5b495 movq 0x8(%rsp), %rcx cmpb $0xa, -0x1(%rcx,%rax) jne 0x5b495 leaq 0x577c8(%rip), %rsi # 0xb2c4b leaq 0x80(%rsp), %rdi movl $0x1, %edx callq 0x19780 leaq 0x48(%rsp), %rdi movq %r12, %rsi callq 0x63294 movzbl %bpl, %ecx leaq 0x60(%rsp), %rdi leaq 0x48(%rsp), %rdx movq %r14, %rsi movl %r15d, %r8d callq 0x5ac90 movq 0x10(%rsp), %rdx leaq 0x60(%rsp), %rsi movq 0x8(%rsi), %rcx subq %rdx, %rcx leaq 0x28(%rsp), %rdi callq 0x19700 movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx leaq 0x80(%rsp), %rdi callq 0x19780 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5b508 movq 0x38(%rsp), %rsi incq %rsi callq 0x196b0 leaq 0x88(%rsp), %rsi movq %rbx, %rdi callq 0x19a80 leaq 0x70(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5b533 movq 0x70(%rsp), %rsi incq %rsi callq 0x196b0 leaq 0x48(%rsp), %rdi callq 0x632c0 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5b558 movq 0x18(%rsp), %rsi incq %rsi callq 0x196b0 movq 0x90a21(%rip), %rsi # 0xebf80 leaq 0x80(%rsp), %rdi callq 0x193c0 leaq 0xf0(%rsp), %rdi callq 0x19200 movq %rbx, %rax addq $0x1f8, %rsp # imm = 0x1F8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x5b590 movq %rax, %rbx jmp 0x5b606 jmp 0x5b5b7 movq %rax, %rbx leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5b5ba movq 0x38(%rsp), %rsi incq %rsi callq 0x196b0 jmp 0x5b5ba movq %rax, %rbx leaq 0x70(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5b5e1 movq 0x70(%rsp), %rsi incq %rsi callq 0x196b0 jmp 0x5b5e1 jmp 0x5b5de movq %rax, %rbx jmp 0x5b5eb movq %rax, %rbx leaq 0x48(%rsp), %rdi callq 0x632c0 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5b606 movq 0x18(%rsp), %rsi incq %rsi callq 0x196b0 movq 0x90973(%rip), %rsi # 0xebf80 leaq 0x80(%rsp), %rdi callq 0x193c0 leaq 0xf0(%rsp), %rdi callq 0x19200 movq %rbx, %rdi callq 0x19be0
_Z25common_chat_format_singleB5cxx11RKN5minja13chat_templateERKSt6vectorI15common_chat_msgSaIS4_EERKS4_bb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1F8h mov r15d, r9d mov ebp, r8d mov r12, rcx mov r13, rdx mov r14, rsi mov rbx, rdi lea rdi, [rsp+228h+var_1A8] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) mov rax, [r13+0] movzx r15d, r15b cmp rax, [r13+8] jz short loc_5B437 lea rdi, [rsp+228h+var_220] mov rsi, r14 mov rdx, r13 xor ecx, ecx mov r8d, r15d call _Z26common_chat_apply_templateB5cxx11RKN5minja13chat_templateERKSt6vectorI15common_chat_msgSaIS4_EEbb; common_chat_apply_template(minja::chat_template const&,std::vector<common_chat_msg> const&,bool,bool) jmp short loc_5B454 loc_5B437: lea rax, [rsp+228h+var_210] mov [rax-10h], rax lea rdx, aNoteDebugGramm+0CAh; "" lea rdi, [rsp+228h+var_220] mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) loc_5B454: lea rdi, [rsp+228h+var_1E0] mov rsi, r13 call _ZNSt6vectorI15common_chat_msgSaIS0_EEC2ERKS2_; std::vector<common_chat_msg>::vector(std::vector<common_chat_msg> const&) test bpl, bpl jz short loc_5B495 mov rax, [rsp+228h+var_218] test rax, rax jz short loc_5B495 mov rcx, [rsp+228h+var_220] cmp byte ptr [rcx+rax-1], 0Ah jnz short loc_5B495 lea rsi, aNoteDebugGramm+0C9h; "\n" lea rdi, [rsp+228h+var_1A8] mov edx, 1 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_5B495: lea rdi, [rsp+228h+var_1E0] mov rsi, r12 call _ZNSt6vectorI15common_chat_msgSaIS0_EE9push_backERKS0_; std::vector<common_chat_msg>::push_back(common_chat_msg const&) movzx ecx, bpl lea rdi, [rsp+228h+var_1C8] lea rdx, [rsp+228h+var_1E0] mov rsi, r14 mov r8d, r15d call _Z26common_chat_apply_templateB5cxx11RKN5minja13chat_templateERKSt6vectorI15common_chat_msgSaIS4_EEbb; common_chat_apply_template(minja::chat_template const&,std::vector<common_chat_msg> const&,bool,bool) mov rdx, [rsp+228h+var_218] lea rsi, [rsp+228h+var_1C8] mov rcx, [rsi+8] sub rcx, rdx lea rdi, [rsp+228h+var_200] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rsi, [rsp+228h+var_200] mov rdx, [rsp+228h+var_1F8] lea rdi, [rsp+228h+var_1A8] call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rax, [rsp+228h+var_1F0] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_5B508 mov rsi, [rsp+228h+var_1F0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5B508: lea rsi, [rsp+228h+var_1A0] mov rdi, rbx call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) lea rax, [rsp+228h+var_1B8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_5B533 mov rsi, [rsp+228h+var_1B8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5B533: lea rdi, [rsp+228h+var_1E0] call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector() lea rax, [rsp+228h+var_210] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_5B558 mov rsi, [rsp+228h+var_210] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5B558: mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+228h+var_1A8] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+228h+var_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rax, rbx add rsp, 1F8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_5B590: mov rbx, rax jmp short loc_5B606 jmp short loc_5B5B7 mov rbx, rax lea rax, [rsp+arg_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_5B5BA mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_5B5BA loc_5B5B7: mov rbx, rax loc_5B5BA: lea rax, [rsp+arg_68] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_5B5E1 mov rsi, [rsp+arg_68] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_5B5E1 jmp short loc_5B5DE mov rbx, rax jmp short loc_5B5EB loc_5B5DE: mov rbx, rax loc_5B5E1: lea rdi, [rsp+arg_40] call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector() loc_5B5EB: lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_5B606 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5B606: mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_78] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+arg_E8]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rbx call __Unwind_Resume
long long common_chat_format_single[abi:cxx11]( long long a1, common_chat_inputs *a2, long long *a3, long long a4, unsigned __int8 a5, unsigned __int8 a6) { char *v11; // [rsp+8h] [rbp-220h] BYREF long long v12; // [rsp+10h] [rbp-218h] _QWORD v13[2]; // [rsp+18h] [rbp-210h] BYREF void *v14[2]; // [rsp+28h] [rbp-200h] BYREF long long v15; // [rsp+38h] [rbp-1F0h] BYREF long long v16[3]; // [rsp+48h] [rbp-1E0h] BYREF void *v17[2]; // [rsp+60h] [rbp-1C8h] BYREF long long v18; // [rsp+70h] [rbp-1B8h] BYREF _BYTE v19[8]; // [rsp+80h] [rbp-1A8h] BYREF _BYTE v20[104]; // [rsp+88h] [rbp-1A0h] BYREF _BYTE v21[312]; // [rsp+F0h] [rbp-138h] BYREF std::ostringstream::basic_ostringstream(v19); if ( *a3 == a3[1] ) { v11 = (char *)v13; std::string::_M_construct<char const*>((long long)&v11, "", (long long)""); } else { common_chat_apply_template[abi:cxx11](&v11, a2, a3, 0, a6); } std::vector<common_chat_msg>::vector(v16, a3); if ( a5 && v12 && v11[v12 - 1] == 10 ) std::__ostream_insert<char,std::char_traits<char>>(v19, "\n", 1LL); std::vector<common_chat_msg>::push_back(v16, a4); common_chat_apply_template[abi:cxx11](v17, a2, v16, a5, a6); std::string::substr(v14, v17, v12, (char *)v17[1] - v12); std::__ostream_insert<char,std::char_traits<char>>(v19, v14[0], v14[1]); if ( v14[0] != &v15 ) operator delete(v14[0], v15 + 1); std::stringbuf::str(a1, v20); if ( v17[0] != &v18 ) operator delete(v17[0], v18 + 1); std::vector<common_chat_msg>::~vector(v16); if ( v11 != (char *)v13 ) operator delete(v11, v13[0] + 1LL); std::ostringstream::~ostringstream(v19, &`VTT for'std::ostringstream); std::ios_base::~ios_base((std::ios_base *)v21); return a1; }
common_chat_format_single[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1f8 MOV R15D,R9D MOV EBP,R8D MOV R12,RCX MOV R13,RDX MOV R14,RSI MOV RBX,RDI LEA RDI,[RSP + 0x80] CALL 0x001198d0 MOV RAX,qword ptr [R13] MOVZX R15D,R15B CMP RAX,qword ptr [R13 + 0x8] JZ 0x0015b437 LAB_0015b420: LEA RDI,[RSP + 0x8] MOV RSI,R14 MOV RDX,R13 XOR ECX,ECX MOV R8D,R15D CALL 0x0015ac90 JMP 0x0015b454 LAB_0015b437: LEA RAX,[RSP + 0x18] MOV qword ptr [RAX + -0x10],RAX LAB_0015b440: LEA RDX,[0x1b2c4c] LEA RDI,[RSP + 0x8] MOV RSI,RDX CALL 0x001320e8 LAB_0015b454: LEA RDI,[RSP + 0x48] MOV RSI,R13 CALL 0x001631fc TEST BPL,BPL JZ 0x0015b495 MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x0015b495 MOV RCX,qword ptr [RSP + 0x8] CMP byte ptr [RCX + RAX*0x1 + -0x1],0xa JNZ 0x0015b495 LAB_0015b47c: LEA RSI,[0x1b2c4b] LEA RDI,[RSP + 0x80] MOV EDX,0x1 CALL 0x00119780 LAB_0015b495: LEA RDI,[RSP + 0x48] MOV RSI,R12 CALL 0x00163294 LAB_0015b4a2: MOVZX ECX,BPL LEA RDI,[RSP + 0x60] LEA RDX,[RSP + 0x48] MOV RSI,R14 MOV R8D,R15D CALL 0x0015ac90 MOV RDX,qword ptr [RSP + 0x10] LEA RSI,[RSP + 0x60] MOV RCX,qword ptr [RSI + 0x8] SUB RCX,RDX LAB_0015b4cc: LEA RDI,[RSP + 0x28] CALL 0x00119700 MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x30] LAB_0015b4e0: LEA RDI,[RSP + 0x80] CALL 0x00119780 LEA RAX,[RSP + 0x38] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0015b508 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001196b0 LAB_0015b508: LEA RSI,[RSP + 0x88] LAB_0015b510: MOV RDI,RBX CALL 0x00119a80 LAB_0015b518: LEA RAX,[RSP + 0x70] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0015b533 MOV RSI,qword ptr [RSP + 0x70] INC RSI CALL 0x001196b0 LAB_0015b533: LEA RDI,[RSP + 0x48] CALL 0x001632c0 LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0015b558 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001196b0 LAB_0015b558: MOV RSI,qword ptr [0x001ebf80] LEA RDI,[RSP + 0x80] CALL 0x001193c0 LEA RDI,[RSP + 0xf0] CALL 0x00119200 MOV RAX,RBX ADD RSP,0x1f8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_chat_format_single[abi:cxx11](minja::chat_template const&, std::vector<common_chat_msg, std::allocator<common_chat_msg> > const&, common_chat_msg const&, bool, bool) */ chat_template * common_chat_format_single_abi_cxx11_ (chat_template *param_1,vector *param_2,common_chat_msg *param_3,bool param_4,bool param_5 ) { int7 in_register_00000009; long *local_220; long local_218; long local_210 [2]; long *local_200; long local_1f8; long local_1f0 [2]; vector<common_chat_msg,std::allocator<common_chat_msg>> local_1e0 [24]; long *local_1c8 [2]; long local_1b8 [2]; ostringstream local_1a8 [112]; ios_base local_138 [264]; std::__cxx11::ostringstream::ostringstream(local_1a8); if (*(long *)param_3 == *(long *)(param_3 + 8)) { local_220 = local_210; /* try { // try from 0015b440 to 0015b453 has its CatchHandler @ 0015b58e */ std::__cxx11::string::_M_construct<char_const*>(&local_220,""); } else { /* try { // try from 0015b420 to 0015b434 has its CatchHandler @ 0015b590 */ common_chat_apply_template_abi_cxx11_ ((chat_template *)&local_220,param_2,SUB81(param_3,0),false); } /* try { // try from 0015b454 to 0015b460 has its CatchHandler @ 0015b5d9 */ std::vector<common_chat_msg,std::allocator<common_chat_msg>>::vector(local_1e0,(vector *)param_3); if (((param_5) && (local_218 != 0)) && (*(char *)((long)local_220 + local_218 + -1) == '\n')) { /* try { // try from 0015b47c to 0015b4a1 has its CatchHandler @ 0015b5de */ std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_1a8,"\n",1); } std::vector<common_chat_msg,std::allocator<common_chat_msg>>::push_back (local_1e0,(common_chat_msg *)CONCAT71(in_register_00000009,param_4)); /* try { // try from 0015b4a2 to 0015b4ba has its CatchHandler @ 0015b5d7 */ common_chat_apply_template_abi_cxx11_ ((chat_template *)local_1c8,param_2,SUB81(local_1e0,0),param_5); /* try { // try from 0015b4cc to 0015b4d5 has its CatchHandler @ 0015b5b7 */ std::__cxx11::string::substr((ulong)&local_200,(ulong)local_1c8); /* try { // try from 0015b4e0 to 0015b4ec has its CatchHandler @ 0015b597 */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)local_1a8,(char *)local_200,local_1f8); if (local_200 != local_1f0) { operator_delete(local_200,local_1f0[0] + 1); } /* try { // try from 0015b510 to 0015b517 has its CatchHandler @ 0015b595 */ std::__cxx11::stringbuf::str(); if (local_1c8[0] != local_1b8) { operator_delete(local_1c8[0],local_1b8[0] + 1); } std::vector<common_chat_msg,std::allocator<common_chat_msg>>::~vector(local_1e0); if (local_220 != local_210) { operator_delete(local_220,local_210[0] + 1); } std::__cxx11::ostringstream::~ostringstream(local_1a8); std::ios_base::~ios_base(local_138); return param_1; }
47,546
evmone::Memory::grow(unsigned long)
corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/execution_state.hpp
void grow(size_t new_size) noexcept { // Restriction for future changes. EVM always has memory size as multiple of 32 bytes. INTX_REQUIRE(new_size % 32 == 0); // Allow only growing memory. Include hint for optimizing compiler. INTX_REQUIRE(new_size > m_size); if (new_size > m_capacity) { m_capacity *= 2; // Double the capacity. if (m_capacity < new_size) // If not enough. { // Set capacity to required size rounded to multiple of page_size. m_capacity = ((new_size + (page_size - 1)) / page_size) * page_size; } allocate_capacity(); } std::memset(&m_data[m_size], 0, new_size - m_size); m_size = new_size; }
O0
cpp
evmone::Memory::grow(unsigned long): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax andq $0x1f, %rax cmpq $0x0, %rax jne 0x671a8 jmp 0x671c7 leaq 0x7634d(%rip), %rdi # 0xdd4fc leaq 0x76359(%rip), %rsi # 0xdd50f movl $0x7c, %edx leaq 0x763d7(%rip), %rcx # 0xdd599 callq 0x23160 movq -0x18(%rbp), %rcx movq -0x10(%rbp), %rax cmpq 0x8(%rcx), %rax jbe 0x671d7 jmp 0x671f6 leaq 0x763dd(%rip), %rdi # 0xdd5bb leaq 0x7632a(%rip), %rsi # 0xdd50f movl $0x7f, %edx leaq 0x763a8(%rip), %rcx # 0xdd599 callq 0x23160 movq -0x18(%rbp), %rcx movq -0x10(%rbp), %rax cmpq 0x10(%rcx), %rax jbe 0x67241 movq -0x18(%rbp), %rax movq 0x10(%rax), %rcx shlq %rcx movq %rcx, 0x10(%rax) movq 0x10(%rax), %rax cmpq -0x10(%rbp), %rax jae 0x67238 movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx addq $0xfff, %rcx # imm = 0xFFF shrq $0xc, %rcx shlq $0xc, %rcx movq %rcx, 0x10(%rax) movq -0x18(%rbp), %rdi callq 0x3bcb0 movq -0x18(%rbp), %rdi movq 0x8(%rdi), %rsi callq 0x67290 movq %rax, -0x20(%rbp) jmp 0x67254 movq -0x18(%rbp), %rax movq -0x20(%rbp), %rdi movq -0x10(%rbp), %rdx subq 0x8(%rax), %rdx xorl %esi, %esi callq 0x23140 movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx movq %rcx, 0x8(%rax) addq $0x20, %rsp popq %rbp retq movq %rax, %rdi callq 0x36420 nopw %cs:(%rax,%rax) nop
_ZN6evmone6Memory4growEm: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_18], rax mov rax, [rbp+var_10] and rax, 1Fh cmp rax, 0 jnz short loc_671A8 jmp short loc_671C7 loc_671A8: lea rdi, aNewSize320; "new_size % 32 == 0" lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"... mov edx, 7Ch ; '|' lea rcx, aVoidEvmoneMemo; "void evmone::Memory::grow(size_t)" call ___assert_fail loc_671C7: mov rcx, [rbp+var_18] mov rax, [rbp+var_10] cmp rax, [rcx+8] jbe short loc_671D7 jmp short loc_671F6 loc_671D7: lea rdi, aNewSizeMSize; "new_size > m_size" lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"... mov edx, 7Fh lea rcx, aVoidEvmoneMemo; "void evmone::Memory::grow(size_t)" call ___assert_fail loc_671F6: mov rcx, [rbp+var_18] mov rax, [rbp+var_10] cmp rax, [rcx+10h] jbe short loc_67241 mov rax, [rbp+var_18] mov rcx, [rax+10h] shl rcx, 1 mov [rax+10h], rcx mov rax, [rax+10h] cmp rax, [rbp+var_10] jnb short loc_67238 mov rax, [rbp+var_18] mov rcx, [rbp+var_10] add rcx, 0FFFh shr rcx, 0Ch shl rcx, 0Ch mov [rax+10h], rcx loc_67238: mov rdi, [rbp+var_18]; this call _ZN6evmone6Memory17allocate_capacityEv; evmone::Memory::allocate_capacity(void) loc_67241: mov rdi, [rbp+var_18] mov rsi, [rdi+8] call _ZNKSt10unique_ptrIA_hN6evmone6Memory11FreeDeleterEEixEm; std::unique_ptr<uchar [],evmone::Memory::FreeDeleter>::operator[](ulong) mov [rbp+var_20], rax jmp short $+2 loc_67254: mov rax, [rbp+var_18] mov rdi, [rbp+var_20] mov rdx, [rbp+var_10] sub rdx, [rax+8] xor esi, esi call _memset mov rax, [rbp+var_18] mov rcx, [rbp+var_10] mov [rax+8], rcx add rsp, 20h pop rbp retn mov rdi, rax call __clang_call_terminate
evmone::Memory * evmone::Memory::grow(evmone::Memory *this, unsigned long long a2) { evmone::Memory *result; // rax long long v3; // [rsp+0h] [rbp-20h] if ( (a2 & 0x1F) != 0 ) __assert_fail( "new_size % 32 == 0", "/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evm" "one/execution_state.hpp", 124LL, "void evmone::Memory::grow(size_t)"); if ( a2 <= *((_QWORD *)this + 1) ) __assert_fail( "new_size > m_size", "/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evm" "one/execution_state.hpp", 127LL, "void evmone::Memory::grow(size_t)"); if ( a2 > *((_QWORD *)this + 2) ) { *((_QWORD *)this + 2) *= 2LL; if ( *((_QWORD *)this + 2) < a2 ) *((_QWORD *)this + 2) = (a2 + 4095) >> 12 << 12; evmone::Memory::allocate_capacity(this); } v3 = std::unique_ptr<unsigned char [],evmone::Memory::FreeDeleter>::operator[](this, *((_QWORD *)this + 1)); memset(v3, 0LL, a2 - *((_QWORD *)this + 1)); result = this; *((_QWORD *)this + 1) = a2; return result; }
grow: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] AND RAX,0x1f CMP RAX,0x0 JNZ 0x001671a8 JMP 0x001671c7 LAB_001671a8: LEA RDI,[0x1dd4fc] LEA RSI,[0x1dd50f] MOV EDX,0x7c LEA RCX,[0x1dd599] CALL 0x00123160 LAB_001671c7: MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x8] JBE 0x001671d7 JMP 0x001671f6 LAB_001671d7: LEA RDI,[0x1dd5bb] LEA RSI,[0x1dd50f] MOV EDX,0x7f LEA RCX,[0x1dd599] CALL 0x00123160 LAB_001671f6: MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x10] JBE 0x00167241 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX + 0x10] SHL RCX,0x1 MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RAX + 0x10] CMP RAX,qword ptr [RBP + -0x10] JNC 0x00167238 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] ADD RCX,0xfff SHR RCX,0xc SHL RCX,0xc MOV qword ptr [RAX + 0x10],RCX LAB_00167238: MOV RDI,qword ptr [RBP + -0x18] CALL 0x0013bcb0 LAB_00167241: MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RDI + 0x8] LAB_00167249: CALL 0x00167290 LAB_0016724e: MOV qword ptr [RBP + -0x20],RAX JMP 0x00167254 LAB_00167254: MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x10] SUB RDX,qword ptr [RAX + 0x8] XOR ESI,ESI CALL 0x00123140 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX ADD RSP,0x20 POP RBP RET
/* evmone::Memory::grow(unsigned long) */ void __thiscall evmone::Memory::grow(Memory *this,ulong param_1) { void *__s; if ((param_1 & 0x1f) != 0) { /* WARNING: Subroutine does not return */ __assert_fail("new_size % 32 == 0", "/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/execution_state.hpp" ,0x7c,"void evmone::Memory::grow(size_t)"); } if (*(ulong *)(this + 8) < param_1) { if (*(ulong *)(this + 0x10) < param_1) { *(long *)(this + 0x10) = *(long *)(this + 0x10) << 1; if (*(ulong *)(this + 0x10) < param_1) { *(ulong *)(this + 0x10) = param_1 + 0xfff & 0xfffffffffffff000; } allocate_capacity(this); } /* try { // try from 00167249 to 0016724d has its CatchHandler @ 0016727d */ __s = (void *)std::unique_ptr<unsigned_char[],evmone::Memory::FreeDeleter>::operator[] ((unique_ptr<unsigned_char[],evmone::Memory::FreeDeleter> *)this, *(ulong *)(this + 8)); memset(__s,0,param_1 - *(long *)(this + 8)); *(ulong *)(this + 8) = param_1; return; } /* WARNING: Subroutine does not return */ __assert_fail("new_size > m_size", "/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/execution_state.hpp" ,0x7f,"void evmone::Memory::grow(size_t)"); }
47,547
maria_ft_simple_get_word
eloqsql/storage/maria/ma_ft_parser.c
uchar maria_ft_simple_get_word(CHARSET_INFO *cs, uchar **start, const uchar *end, FT_WORD *word, my_bool skip_stopwords) { uchar *doc= *start; uint mwc, length; int ctype, mbl; DBUG_ENTER("maria_ft_simple_get_word"); do { for (;; doc+= (mbl > 0 ? mbl : (mbl < 0 ? -mbl : 1))) { if (doc >= end) DBUG_RETURN(0); mbl= my_ci_ctype(cs, &ctype, doc, end); if (true_word_char(ctype, *doc)) break; } mwc= length= 0; for (word->pos= doc; doc < end; length++, doc+= (mbl > 0 ? mbl : (mbl < 0 ? -mbl : 1))) { mbl= my_ci_ctype(cs, &ctype, doc, end); if (true_word_char(ctype, *doc)) mwc= 0; else if (!misc_word_char(*doc) || mwc) break; else mwc++; } word->len= (uint)(doc-word->pos) - mwc; if (skip_stopwords == FALSE || (length >= ft_min_word_len && length < ft_max_word_len && !is_stopword((char *) word->pos, word->len))) { *start= doc; DBUG_RETURN(1); } } while (doc < end); DBUG_RETURN(0); }
O0
c
maria_ft_simple_get_word: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movb %r8b, %al movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movb %al, -0x29(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) jmp 0x758bb movq -0x38(%rbp), %rax cmpq -0x20(%rbp), %rax jb 0x758d0 jmp 0x758c7 movb $0x0, -0x1(%rbp) jmp 0x75a91 movq -0x10(%rbp), %rax movq 0xb8(%rax), %rax movq 0x38(%rax), %rax movq -0x10(%rbp), %rdi movq -0x38(%rbp), %rdx movq -0x20(%rbp), %rcx leaq -0x44(%rbp), %rsi callq *%rax movl %eax, -0x48(%rbp) movl -0x44(%rbp), %eax andl $0x7, %eax cmpl $0x0, %eax jne 0x7590b movq -0x38(%rbp), %rax movzbl (%rax), %eax cmpl $0x5f, %eax jne 0x7590d jmp 0x75953 jmp 0x7590f cmpl $0x0, -0x48(%rbp) jle 0x7591d movl -0x48(%rbp), %eax movl %eax, -0x4c(%rbp) jmp 0x7593d cmpl $0x0, -0x48(%rbp) jge 0x7592d xorl %eax, %eax subl -0x48(%rbp), %eax movl %eax, -0x50(%rbp) jmp 0x75937 movl $0x1, %eax movl %eax, -0x50(%rbp) jmp 0x75937 movl -0x50(%rbp), %eax movl %eax, -0x4c(%rbp) movl -0x4c(%rbp), %ecx movq -0x38(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x38(%rbp) jmp 0x758bb movl $0x0, -0x40(%rbp) movl $0x0, -0x3c(%rbp) movq -0x38(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) movq -0x38(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0x75a0f movq -0x10(%rbp), %rax movq 0xb8(%rax), %rax movq 0x38(%rax), %rax movq -0x10(%rbp), %rdi movq -0x38(%rbp), %rdx movq -0x20(%rbp), %rcx leaq -0x44(%rbp), %rsi callq *%rax movl %eax, -0x48(%rbp) movl -0x44(%rbp), %eax andl $0x7, %eax cmpl $0x0, %eax jne 0x759b5 movq -0x38(%rbp), %rax movzbl (%rax), %eax cmpl $0x5f, %eax jne 0x759be movl $0x0, -0x3c(%rbp) jmp 0x759c0 jmp 0x75a0f jmp 0x759c2 movl -0x40(%rbp), %eax addl $0x1, %eax movl %eax, -0x40(%rbp) cmpl $0x0, -0x48(%rbp) jle 0x759d9 movl -0x48(%rbp), %eax movl %eax, -0x54(%rbp) jmp 0x759f9 cmpl $0x0, -0x48(%rbp) jge 0x759e9 xorl %eax, %eax subl -0x48(%rbp), %eax movl %eax, -0x58(%rbp) jmp 0x759f3 movl $0x1, %eax movl %eax, -0x58(%rbp) jmp 0x759f3 movl -0x58(%rbp), %eax movl %eax, -0x54(%rbp) movl -0x54(%rbp), %ecx movq -0x38(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x38(%rbp) jmp 0x7596c movq -0x38(%rbp), %rax movq -0x28(%rbp), %rcx movq (%rcx), %rcx subq %rcx, %rax movl %eax, %ecx subl -0x3c(%rbp), %ecx movq -0x28(%rbp), %rax movl %ecx, 0x8(%rax) movsbl -0x29(%rbp), %eax cmpl $0x0, %eax je 0x75a6a movl -0x40(%rbp), %eax leaq 0x256434(%rip), %rcx # 0x2cbe70 cmpq (%rcx), %rax jb 0x75a7b movl -0x40(%rbp), %eax leaq 0x25642d(%rip), %rcx # 0x2cbe78 cmpq (%rcx), %rax jae 0x75a7b movq -0x28(%rbp), %rax movq (%rax), %rdi movq -0x28(%rbp), %rax movl 0x8(%rax), %eax movl %eax, %esi callq 0xa2f90 cmpl $0x0, %eax jne 0x75a7b movq -0x38(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movb $0x1, -0x1(%rbp) jmp 0x75a91 jmp 0x75a7d movq -0x38(%rbp), %rax cmpq -0x20(%rbp), %rax jb 0x758b9 jmp 0x75a8d movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x60, %rsp popq %rbp retq nopw (%rax,%rax)
maria_ft_simple_get_word: push rbp mov rbp, rsp sub rsp, 60h mov al, r8b mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_29], al mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_38], rax loc_758B9: jmp short $+2 loc_758BB: mov rax, [rbp+var_38] cmp rax, [rbp+var_20] jb short loc_758D0 jmp short $+2 loc_758C7: mov [rbp+var_1], 0 jmp loc_75A91 loc_758D0: mov rax, [rbp+var_10] mov rax, [rax+0B8h] mov rax, [rax+38h] mov rdi, [rbp+var_10] mov rdx, [rbp+var_38] mov rcx, [rbp+var_20] lea rsi, [rbp+var_44] call rax mov [rbp+var_48], eax mov eax, [rbp+var_44] and eax, 7 cmp eax, 0 jnz short loc_7590B mov rax, [rbp+var_38] movzx eax, byte ptr [rax] cmp eax, 5Fh ; '_' jnz short loc_7590D loc_7590B: jmp short loc_75953 loc_7590D: jmp short $+2 loc_7590F: cmp [rbp+var_48], 0 jle short loc_7591D mov eax, [rbp+var_48] mov [rbp+var_4C], eax jmp short loc_7593D loc_7591D: cmp [rbp+var_48], 0 jge short loc_7592D xor eax, eax sub eax, [rbp+var_48] mov [rbp+var_50], eax jmp short loc_75937 loc_7592D: mov eax, 1 mov [rbp+var_50], eax jmp short $+2 loc_75937: mov eax, [rbp+var_50] mov [rbp+var_4C], eax loc_7593D: mov ecx, [rbp+var_4C] mov rax, [rbp+var_38] movsxd rcx, ecx add rax, rcx mov [rbp+var_38], rax jmp loc_758BB loc_75953: mov [rbp+var_40], 0 mov [rbp+var_3C], 0 mov rcx, [rbp+var_38] mov rax, [rbp+var_28] mov [rax], rcx loc_7596C: mov rax, [rbp+var_38] cmp rax, [rbp+var_20] jnb loc_75A0F mov rax, [rbp+var_10] mov rax, [rax+0B8h] mov rax, [rax+38h] mov rdi, [rbp+var_10] mov rdx, [rbp+var_38] mov rcx, [rbp+var_20] lea rsi, [rbp+var_44] call rax mov [rbp+var_48], eax mov eax, [rbp+var_44] and eax, 7 cmp eax, 0 jnz short loc_759B5 mov rax, [rbp+var_38] movzx eax, byte ptr [rax] cmp eax, 5Fh ; '_' jnz short loc_759BE loc_759B5: mov [rbp+var_3C], 0 jmp short loc_759C0 loc_759BE: jmp short loc_75A0F loc_759C0: jmp short $+2 loc_759C2: mov eax, [rbp+var_40] add eax, 1 mov [rbp+var_40], eax cmp [rbp+var_48], 0 jle short loc_759D9 mov eax, [rbp+var_48] mov [rbp+var_54], eax jmp short loc_759F9 loc_759D9: cmp [rbp+var_48], 0 jge short loc_759E9 xor eax, eax sub eax, [rbp+var_48] mov [rbp+var_58], eax jmp short loc_759F3 loc_759E9: mov eax, 1 mov [rbp+var_58], eax jmp short $+2 loc_759F3: mov eax, [rbp+var_58] mov [rbp+var_54], eax loc_759F9: mov ecx, [rbp+var_54] mov rax, [rbp+var_38] movsxd rcx, ecx add rax, rcx mov [rbp+var_38], rax jmp loc_7596C loc_75A0F: mov rax, [rbp+var_38] mov rcx, [rbp+var_28] mov rcx, [rcx] sub rax, rcx mov ecx, eax sub ecx, [rbp+var_3C] mov rax, [rbp+var_28] mov [rax+8], ecx movsx eax, [rbp+var_29] cmp eax, 0 jz short loc_75A6A mov eax, [rbp+var_40] lea rcx, ft_min_word_len cmp rax, [rcx] jb short loc_75A7B mov eax, [rbp+var_40] lea rcx, ft_max_word_len cmp rax, [rcx] jnb short loc_75A7B mov rax, [rbp+var_28] mov rdi, [rax] mov rax, [rbp+var_28] mov eax, [rax+8] mov esi, eax call is_stopword cmp eax, 0 jnz short loc_75A7B loc_75A6A: mov rcx, [rbp+var_38] mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_1], 1 jmp short loc_75A91 loc_75A7B: jmp short $+2 loc_75A7D: mov rax, [rbp+var_38] cmp rax, [rbp+var_20] jb loc_758B9 jmp short $+2 loc_75A8D: mov [rbp+var_1], 0 loc_75A91: mov al, [rbp+var_1] add rsp, 60h pop rbp retn
char maria_ft_simple_get_word(long long a1, _BYTE **a2, unsigned long long a3, long long a4, char a5) { int v6; // [rsp+8h] [rbp-58h] int v7; // [rsp+Ch] [rbp-54h] int v8; // [rsp+10h] [rbp-50h] int v9; // [rsp+14h] [rbp-4Ch] int v10; // [rsp+18h] [rbp-48h] int v11; // [rsp+18h] [rbp-48h] int v12; // [rsp+1Ch] [rbp-44h] BYREF unsigned int v13; // [rsp+20h] [rbp-40h] int v14; // [rsp+24h] [rbp-3Ch] _BYTE *v15; // [rsp+28h] [rbp-38h] char v16; // [rsp+37h] [rbp-29h] long long v17; // [rsp+38h] [rbp-28h] unsigned long long v18; // [rsp+40h] [rbp-20h] _QWORD *v19; // [rsp+48h] [rbp-18h] long long v20; // [rsp+50h] [rbp-10h] v20 = a1; v19 = a2; v18 = a3; v17 = a4; v16 = a5; v15 = *a2; do { while ( 1 ) { if ( (unsigned long long)v15 >= v18 ) return 0; v10 = (*(long long ( **)(long long, int *, _BYTE *, unsigned long long))(*(_QWORD *)(v20 + 184) + 56LL))( v20, &v12, v15, v18); if ( (v12 & 7) != 0 || *v15 == 95 ) break; if ( v10 <= 0 ) { if ( v10 >= 0 ) v8 = 1; else v8 = -v10; v9 = v8; } else { v9 = v10; } v15 += v9; } v13 = 0; v14 = 0; *(_QWORD *)v17 = v15; while ( (unsigned long long)v15 < v18 ) { v11 = (*(long long ( **)(long long, int *, _BYTE *, unsigned long long))(*(_QWORD *)(v20 + 184) + 56LL))( v20, &v12, v15, v18); if ( (v12 & 7) == 0 && *v15 != 95 ) break; v14 = 0; ++v13; if ( v11 <= 0 ) { if ( v11 >= 0 ) v6 = 1; else v6 = -v11; v7 = v6; } else { v7 = v11; } v15 += v7; } *(_DWORD *)(v17 + 8) = (_DWORD)v15 - *(_QWORD *)v17 - v14; if ( !v16 || (unsigned long long)v13 >= ft_min_word_len && (unsigned long long)v13 < ft_max_word_len && !(unsigned int)is_stopword(*(_QWORD *)v17, *(unsigned int *)(v17 + 8)) ) { *v19 = v15; return 1; } } while ( (unsigned long long)v15 < v18 ); return 0; }
maria_ft_simple_get_word: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV AL,R8B 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 byte ptr [RBP + -0x29],AL MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX LAB_001758b9: JMP 0x001758bb LAB_001758bb: MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x20] JC 0x001758d0 JMP 0x001758c7 LAB_001758c7: MOV byte ptr [RBP + -0x1],0x0 JMP 0x00175a91 LAB_001758d0: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x38] MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0x44] CALL RAX MOV dword ptr [RBP + -0x48],EAX MOV EAX,dword ptr [RBP + -0x44] AND EAX,0x7 CMP EAX,0x0 JNZ 0x0017590b MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,byte ptr [RAX] CMP EAX,0x5f JNZ 0x0017590d LAB_0017590b: JMP 0x00175953 LAB_0017590d: JMP 0x0017590f LAB_0017590f: CMP dword ptr [RBP + -0x48],0x0 JLE 0x0017591d MOV EAX,dword ptr [RBP + -0x48] MOV dword ptr [RBP + -0x4c],EAX JMP 0x0017593d LAB_0017591d: CMP dword ptr [RBP + -0x48],0x0 JGE 0x0017592d XOR EAX,EAX SUB EAX,dword ptr [RBP + -0x48] MOV dword ptr [RBP + -0x50],EAX JMP 0x00175937 LAB_0017592d: MOV EAX,0x1 MOV dword ptr [RBP + -0x50],EAX JMP 0x00175937 LAB_00175937: MOV EAX,dword ptr [RBP + -0x50] MOV dword ptr [RBP + -0x4c],EAX LAB_0017593d: MOV ECX,dword ptr [RBP + -0x4c] MOV RAX,qword ptr [RBP + -0x38] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX JMP 0x001758bb LAB_00175953: MOV dword ptr [RBP + -0x40],0x0 MOV dword ptr [RBP + -0x3c],0x0 MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX LAB_0017596c: MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x20] JNC 0x00175a0f MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x38] MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0x44] CALL RAX MOV dword ptr [RBP + -0x48],EAX MOV EAX,dword ptr [RBP + -0x44] AND EAX,0x7 CMP EAX,0x0 JNZ 0x001759b5 MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,byte ptr [RAX] CMP EAX,0x5f JNZ 0x001759be LAB_001759b5: MOV dword ptr [RBP + -0x3c],0x0 JMP 0x001759c0 LAB_001759be: JMP 0x00175a0f LAB_001759c0: JMP 0x001759c2 LAB_001759c2: MOV EAX,dword ptr [RBP + -0x40] ADD EAX,0x1 MOV dword ptr [RBP + -0x40],EAX CMP dword ptr [RBP + -0x48],0x0 JLE 0x001759d9 MOV EAX,dword ptr [RBP + -0x48] MOV dword ptr [RBP + -0x54],EAX JMP 0x001759f9 LAB_001759d9: CMP dword ptr [RBP + -0x48],0x0 JGE 0x001759e9 XOR EAX,EAX SUB EAX,dword ptr [RBP + -0x48] MOV dword ptr [RBP + -0x58],EAX JMP 0x001759f3 LAB_001759e9: MOV EAX,0x1 MOV dword ptr [RBP + -0x58],EAX JMP 0x001759f3 LAB_001759f3: MOV EAX,dword ptr [RBP + -0x58] MOV dword ptr [RBP + -0x54],EAX LAB_001759f9: MOV ECX,dword ptr [RBP + -0x54] MOV RAX,qword ptr [RBP + -0x38] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX JMP 0x0017596c LAB_00175a0f: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RCX] SUB RAX,RCX MOV ECX,EAX SUB ECX,dword ptr [RBP + -0x3c] MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x8],ECX MOVSX EAX,byte ptr [RBP + -0x29] CMP EAX,0x0 JZ 0x00175a6a MOV EAX,dword ptr [RBP + -0x40] LEA RCX,[0x3cbe70] CMP RAX,qword ptr [RCX] JC 0x00175a7b MOV EAX,dword ptr [RBP + -0x40] LEA RCX,[0x3cbe78] CMP RAX,qword ptr [RCX] JNC 0x00175a7b MOV RAX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x8] MOV ESI,EAX CALL 0x001a2f90 CMP EAX,0x0 JNZ 0x00175a7b LAB_00175a6a: MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV byte ptr [RBP + -0x1],0x1 JMP 0x00175a91 LAB_00175a7b: JMP 0x00175a7d LAB_00175a7d: MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x20] JC 0x001758b9 JMP 0x00175a8d LAB_00175a8d: MOV byte ptr [RBP + -0x1],0x0 LAB_00175a91: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x60 POP RBP RET
int1 maria_ft_simple_get_word (long param_1,int8 *param_2,char *param_3,int8 *param_4,char param_5) { int iVar1; int local_60; int local_5c; int local_58; int local_54; uint local_4c; uint local_48; int local_44; char *local_40; char local_31; int8 *local_30; char *local_28; int8 *local_20; long local_18; local_40 = (char *)*param_2; local_31 = param_5; local_30 = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; while( true ) { while( true ) { if (local_28 <= local_40) { return 0; } local_54 = (**(code **)(*(long *)(local_18 + 0xb8) + 0x38)) (local_18,&local_4c,local_40,local_28); if (((local_4c & 7) != 0) || (*local_40 == '_')) break; if (local_54 < 1) { if (local_54 < 0) { local_58 = -local_54; } else { local_58 = 1; } local_54 = local_58; } local_40 = local_40 + local_54; } local_48 = 0; *local_30 = local_40; while ((local_44 = 0, local_40 < local_28 && ((local_5c = (**(code **)(*(long *)(local_18 + 0xb8) + 0x38)) (local_18,&local_4c,local_40,local_28), (local_4c & 7) != 0 || (*local_40 == '_'))))) { local_48 = local_48 + 1; if (local_5c < 1) { if (local_5c < 0) { local_60 = -local_5c; } else { local_60 = 1; } local_5c = local_60; } local_40 = local_40 + local_5c; } *(int *)(local_30 + 1) = ((int)local_40 - (int)*local_30) - local_44; if ((local_31 == '\0') || (((ft_min_word_len <= local_48 && (local_48 < ft_max_word_len)) && (iVar1 = is_stopword(*local_30,*(int4 *)(local_30 + 1)), iVar1 == 0)))) break; if (local_28 <= local_40) { return 0; } } *local_20 = local_40; return 1; }
47,548
main
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/MainCPU.cpp
int main(int argc, char **argv) { if (!parseParameters(argc, argv)) { printUsage(); exit(-1); } // Init cache Cache::Policy l1Policy, l2Policy, l3Policy; l1Policy.cacheSize = 32 * 1024; l1Policy.blockSize = 64; l1Policy.blockNum = l1Policy.cacheSize / l1Policy.blockSize; l1Policy.associativity = 8; l1Policy.hitLatency = 0; l1Policy.missLatency = 8; l2Policy.cacheSize = 256 * 1024; l2Policy.blockSize = 64; l2Policy.blockNum = l2Policy.cacheSize / l2Policy.blockSize; l2Policy.associativity = 8; l2Policy.hitLatency = 8; l2Policy.missLatency = 20; l3Policy.cacheSize = 8 * 1024 * 1024; l3Policy.blockSize = 64; l3Policy.blockNum = l3Policy.cacheSize / l3Policy.blockSize; l3Policy.associativity = 8; l3Policy.hitLatency = 20; l3Policy.missLatency = 100; l3Cache = new Cache(&memory, l3Policy); l2Cache = new Cache(&memory, l2Policy, l3Cache); l1Cache = new Cache(&memory, l1Policy, l2Cache); memory.setCache(l1Cache); // Read ELF file ELFIO::elfio reader; if (!reader.load(elfFile)) { fprintf(stderr, "Fail to load ELF file %s!\n", elfFile); return -1; } if (verbose) { printElfInfo(&reader); } loadElfToMemory(&reader, &memory); if (verbose) { memory.printInfo(); } simulator.isSingleStep = isSingleStep; simulator.verbose = verbose; simulator.shouldDumpHistory = dumpHistory; simulator.branchPredictor->strategy = strategy; simulator.pc = reader.get_entry(); simulator.initStack(stackBaseAddr, stackSize); simulator.simulate(); if (dumpHistory) { printf("Dumping history to dump.txt...\n"); simulator.dumpHistory(); } delete l1Cache; delete l2Cache; delete l3Cache; return 0; }
O1
cpp
main: pushq %r15 pushq %r14 pushq %rbx subq $0xf0, %rsp callq 0xbb59 testb %al, %al je 0xbafe movl $0x60, %edi callq 0xb1c0 movq %rax, %r14 movaps 0x97d7(%rip), %xmm0 # 0x15010 movaps %xmm0, 0x60(%rsp) movabsq $0x6400000014, %rax # imm = 0x6400000014 movq %rax, 0x70(%rsp) movq 0x70(%rsp), %rax movq %rax, 0x10(%rsp) movaps 0x60(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0x10c69(%rip), %rsi # 0x1c4d0 movq %r14, %rdi xorl %edx, %edx movl $0x1, %ecx movl $0x1, %r8d callq 0x13400 movq %r14, 0x10c6d(%rip) # 0x1c4f0 movl $0x60, %edi callq 0xb1c0 movq %rax, %r15 movaps 0x9789(%rip), %xmm0 # 0x15020 movaps %xmm0, 0x40(%rsp) movabsq $0x1400000008, %rax # imm = 0x1400000008 movq %rax, 0x50(%rsp) movq 0x50(%rsp), %rax movq %rax, 0x10(%rsp) movaps 0x40(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0x10c0b(%rip), %rsi # 0x1c4d0 movq %r15, %rdi movq %r14, %rdx movl $0x1, %ecx movl $0x1, %r8d callq 0x13400 movq %r15, 0x10c06(%rip) # 0x1c4e8 movl $0x60, %edi callq 0xb1c0 movq %rax, %r14 movaps 0x973a(%rip), %xmm0 # 0x15030 movaps %xmm0, 0x20(%rsp) movabsq $0x800000000, %rax # imm = 0x800000000 movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x10(%rsp) movaps 0x20(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0x10bac(%rip), %rsi # 0x1c4d0 movq %r14, %rdi movq %r15, %rdx movl $0x1, %ecx movl $0x1, %r8d callq 0x13400 movq %r14, 0x10b9f(%rip) # 0x1c4e0 leaq 0x10b88(%rip), %rdi # 0x1c4d0 movq %r14, %rsi callq 0xf0d4 leaq 0x98(%rsp), %rdi callq 0xc0c8 movq 0x10b5c(%rip), %rsi # 0x1c4c0 leaq 0x78(%rsp), %rdi leaq 0x1f(%rsp), %rdx callq 0xb0c0 leaq 0x98(%rsp), %rdi leaq 0x78(%rsp), %rsi callq 0xc130 movl %eax, %ebx leaq 0x88(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb99d callq 0xb1a0 testb %bl, %bl je 0xbaf2 cmpb $0x1, 0x10b1c(%rip) # 0x1c4c8 jne 0xb9bb leaq 0x98(%rsp), %rdi callq 0xbd10 leaq 0x10b0e(%rip), %rsi # 0x1c4d0 leaq 0x98(%rsp), %rdi callq 0xbf9a cmpb $0x1, 0x10af2(%rip) # 0x1c4c8 jne 0xb9e4 leaq 0x10af1(%rip), %rdi # 0x1c4d0 callq 0xefbe movb 0x10adf(%rip), %al # 0x1c4c9 movb %al, 0x14b10(%rip) # 0x20500 movb 0x10ad2(%rip), %al # 0x1c4c8 movb %al, 0x14b05(%rip) # 0x20501 movb 0x10ac8(%rip), %al # 0x1c4ca movb %al, 0x14afa(%rip) # 0x20502 movl 0x107da(%rip), %eax # 0x1c1e8 movq 0x14c0b(%rip), %rcx # 0x20620 movl %eax, (%rcx) movq 0xa8(%rsp), %rdi testq %rdi, %rdi je 0xba2f movq (%rdi), %rax callq *0xb0(%rax) jmp 0xba31 xorl %eax, %eax movq %rax, 0x14ad0(%rip) # 0x20508 leaq 0x14ac1(%rip), %rdi # 0x20500 movl 0x1079b(%rip), %esi # 0x1c1e0 movl 0x10799(%rip), %edx # 0x1c1e4 callq 0xf16a leaq 0x14aa9(%rip), %rdi # 0x20500 callq 0xf17e cmpb $0x1, 0x10a67(%rip) # 0x1c4ca jne 0xba7d leaq 0x9718(%rip), %rdi # 0x15184 callq 0xb320 leaq 0x14a88(%rip), %rdi # 0x20500 callq 0x1282a movq 0x10a5c(%rip), %rbx # 0x1c4e0 testq %rbx, %rbx je 0xba9a leaq 0x48(%rbx), %rdi callq 0xea1a movq %rbx, %rdi callq 0xb1a0 movq 0x10a47(%rip), %rbx # 0x1c4e8 testq %rbx, %rbx je 0xbab7 leaq 0x48(%rbx), %rdi callq 0xea1a movq %rbx, %rdi callq 0xb1a0 movq 0x10a32(%rip), %r14 # 0x1c4f0 xorl %ebx, %ebx testq %r14, %r14 je 0xbad6 leaq 0x48(%r14), %rdi callq 0xea1a movq %r14, %rdi callq 0xb1a0 leaq 0x98(%rsp), %rdi callq 0xc1b0 movl %ebx, %eax addq $0xf0, %rsp popq %rbx popq %r14 popq %r15 retq callq 0xb45d movl $0xffffffff, %ebx # imm = 0xFFFFFFFF jmp 0xbad6 callq 0xbcde movl $0xffffffff, %edi # imm = 0xFFFFFFFF callq 0xb240 movq %rax, %rbx leaq 0x88(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xbb44 callq 0xb1a0 jmp 0xbb44 jmp 0xbb41 jmp 0xbb34 movq %rax, %rbx movq %r15, %rdi jmp 0xbb3a movq %rax, %rbx movq %r14, %rdi callq 0xb1a0 jmp 0xbb51 movq %rax, %rbx leaq 0x98(%rsp), %rdi callq 0xc1b0 movq %rbx, %rdi callq 0xb360
main: push r15 push r14 push rbx sub rsp, 0F0h call _Z15parseParametersiPPc; parseParameters(int,char **) test al, al jz loc_BAFE mov edi, 60h ; '`'; unsigned __int64 call __Znwm; operator new(ulong) mov r14, rax movaps xmm0, cs:xmmword_15010 movaps [rsp+108h+var_A8], xmm0 mov rax, 6400000014h mov [rsp+108h+var_98], rax mov rax, [rsp+108h+var_98] mov [rsp+108h+var_F8], rax; __int64 movaps xmm0, [rsp+108h+var_A8] movups xmmword ptr [rsp+108h+var_108], xmm0; __int128 lea rsi, memory mov rdi, r14; this xor edx, edx mov ecx, 1 mov r8d, 1 call _ZN5CacheC2EP13MemoryManagerNS_6PolicyEPS_bb; Cache::Cache(MemoryManager *,Cache::Policy,Cache*,bool,bool) mov cs:l3Cache, r14 mov edi, 60h ; '`'; unsigned __int64 call __Znwm; operator new(ulong) mov r15, rax movaps xmm0, cs:xmmword_15020 movaps [rsp+108h+var_C8], xmm0 mov rax, 1400000008h mov [rsp+108h+var_B8], rax mov rax, [rsp+108h+var_B8] mov [rsp+108h+var_F8], rax; __int64 movaps xmm0, [rsp+108h+var_C8] movups xmmword ptr [rsp+108h+var_108], xmm0; __int128 lea rsi, memory mov rdi, r15; this mov rdx, r14 mov ecx, 1 mov r8d, 1 call _ZN5CacheC2EP13MemoryManagerNS_6PolicyEPS_bb; Cache::Cache(MemoryManager *,Cache::Policy,Cache*,bool,bool) mov cs:l2Cache, r15 mov edi, 60h ; '`'; unsigned __int64 call __Znwm; operator new(ulong) mov r14, rax movaps xmm0, cs:xmmword_15030 movaps xmmword ptr [rsp+108h+var_E8], xmm0 mov rax, 800000000h mov [rsp+108h+var_D8], rax mov rax, [rsp+108h+var_D8] mov [rsp+108h+var_F8], rax; __int64 movaps xmm0, xmmword ptr [rsp+108h+var_E8] movups xmmword ptr [rsp+108h+var_108], xmm0; char lea rsi, memory mov rdi, r14; this mov rdx, r15 mov ecx, 1 mov r8d, 1 call _ZN5CacheC2EP13MemoryManagerNS_6PolicyEPS_bb; Cache::Cache(MemoryManager *,Cache::Policy,Cache*,bool,bool) mov cs:l1Cache, r14 lea rdi, memory mov rsi, r14 call _ZN13MemoryManager8setCacheEP5Cache; MemoryManager::setCache(Cache *) lea rdi, [rsp+108h+var_70]; this call _ZN5ELFIO5elfioC2Ev; ELFIO::elfio::elfio(void) mov rsi, cs:elfFile lea rdi, [rsp+108h+var_90] lea rdx, [rsp+108h+var_E9] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&) lea rdi, [rsp+108h+var_70]; this lea rsi, [rsp+108h+var_90] call _ZN5ELFIO5elfio4loadERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; ELFIO::elfio::load(std::string const&) mov ebx, eax lea rax, [rsp+108h+var_80] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B99D call __ZdlPv; operator delete(void *) loc_B99D: test bl, bl jz loc_BAF2 cmp cs:verbose, 1 jnz short loc_B9BB lea rdi, [rsp+108h+var_70]; this call _Z12printElfInfoPN5ELFIO5elfioE; printElfInfo(ELFIO::elfio *) loc_B9BB: lea rsi, memory; MemoryManager * lea rdi, [rsp+108h+var_70]; ELFIO::elfio * call _Z15loadElfToMemoryPN5ELFIO5elfioEP13MemoryManager; loadElfToMemory(ELFIO::elfio *,MemoryManager *) cmp cs:verbose, 1 jnz short loc_B9E4 lea rdi, memory; this call _ZN13MemoryManager9printInfoEv; MemoryManager::printInfo(void) loc_B9E4: mov al, cs:isSingleStep mov cs:simulator, al mov al, cs:verbose mov cs:byte_20501, al mov al, cs:dumpHistory mov cs:byte_20502, al mov eax, cs:strategy mov rcx, cs:qword_20620 mov [rcx], eax mov rdi, [rsp+108h+var_60] test rdi, rdi jz short loc_BA2F mov rax, [rdi] call qword ptr [rax+0B0h] jmp short loc_BA31 loc_BA2F: xor eax, eax loc_BA31: mov cs:qword_20508, rax lea rdi, simulator; this mov esi, cs:stackBaseAddr; unsigned int mov edx, cs:stackSize; unsigned int call _ZN9Simulator9initStackEjj; Simulator::initStack(uint,uint) lea rdi, simulator; this call _ZN9Simulator8simulateEv; Simulator::simulate(void) cmp cs:dumpHistory, 1 jnz short loc_BA7D lea rdi, aDumpingHistory; "Dumping history to dump.txt..." call _puts lea rdi, simulator; this call _ZN9Simulator11dumpHistoryEv; Simulator::dumpHistory(void) loc_BA7D: mov rbx, cs:l1Cache test rbx, rbx jz short loc_BA9A lea rdi, [rbx+48h] call _ZNSt6vectorIN5Cache5BlockESaIS1_EED2Ev; std::vector<Cache::Block>::~vector() mov rdi, rbx; void * call __ZdlPv; operator delete(void *) loc_BA9A: mov rbx, cs:l2Cache test rbx, rbx jz short loc_BAB7 lea rdi, [rbx+48h] call _ZNSt6vectorIN5Cache5BlockESaIS1_EED2Ev; std::vector<Cache::Block>::~vector() mov rdi, rbx; void * call __ZdlPv; operator delete(void *) loc_BAB7: mov r14, cs:l3Cache xor ebx, ebx test r14, r14 jz short loc_BAD6 lea rdi, [r14+48h] call _ZNSt6vectorIN5Cache5BlockESaIS1_EED2Ev; std::vector<Cache::Block>::~vector() mov rdi, r14; void * call __ZdlPv; operator delete(void *) loc_BAD6: lea rdi, [rsp+108h+var_70]; this call _ZN5ELFIO5elfioD2Ev; ELFIO::elfio::~elfio() mov eax, ebx add rsp, 0F0h pop rbx pop r14 pop r15 retn loc_BAF2: call main_cold_1 mov ebx, 0FFFFFFFFh jmp short loc_BAD6 loc_BAFE: call _Z10printUsagev; printUsage(void) mov edi, 0FFFFFFFFh call _exit mov rbx, rax lea rax, [rsp+108h+var_80] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_BB44 call __ZdlPv; operator delete(void *) jmp short loc_BB44 jmp short loc_BB41 jmp short loc_BB34 mov rbx, rax mov rdi, r15 jmp short loc_BB3A loc_BB34: mov rbx, rax mov rdi, r14; void * loc_BB3A: call __ZdlPv; operator delete(void *) jmp short loc_BB51 loc_BB41: mov rbx, rax loc_BB44: lea rdi, [rsp+108h+var_70]; this call _ZN5ELFIO5elfioD2Ev; ELFIO::elfio::~elfio() loc_BB51: mov rdi, rbx call __Unwind_Resume
int main(int argc, const char **argv, const char **envp) { Cache *v3; // r14 Cache *v4; // r15 Cache *v5; // r14 char v6; // bl void *v7; // rdi long long v8; // rax char v10; // [rsp+0h] [rbp-108h] char v11; // [rsp+1Fh] [rbp-E9h] BYREF char v12[16]; // [rsp+20h] [rbp-E8h] long long v13; // [rsp+30h] [rbp-D8h] __int128 v14; // [rsp+40h] [rbp-C8h] long long v15; // [rsp+50h] [rbp-B8h] __int128 v16; // [rsp+60h] [rbp-A8h] long long v17; // [rsp+70h] [rbp-98h] void *v18[2]; // [rsp+78h] [rbp-90h] BYREF char v19; // [rsp+88h] [rbp-80h] BYREF _BYTE v20[16]; // [rsp+98h] [rbp-70h] BYREF long long v21; // [rsp+A8h] [rbp-60h] if ( !(unsigned __int8)parseParameters(argc, (char **)argv) ) { printUsage(); exit(0xFFFFFFFFLL); } v3 = (Cache *)operator new(0x60uLL); v16 = xmmword_15010; v17 = 0x6400000014LL; Cache::Cache(v3, xmmword_15010, 0x6400000014LL); l3Cache = v3; v4 = (Cache *)operator new(0x60uLL); v14 = xmmword_15020; v15 = 0x1400000008LL; Cache::Cache(v4, xmmword_15020, 0x1400000008LL); l2Cache = v4; v5 = (Cache *)operator new(0x60uLL); *(_OWORD *)v12 = xmmword_15030; v13 = 0x800000000LL; Cache::Cache(v5, xmmword_15030, 0x800000000LL); l1Cache = v5; MemoryManager::setCache((MemoryManager *)&memory, v5); ELFIO::elfio::elfio((ELFIO::elfio *)v20); std::string::basic_string(v18, elfFile, &v11); v6 = ELFIO::elfio::load((ELFIO::elfio *)v20, v10); v7 = v18[0]; if ( v18[0] != &v19 ) operator delete(v18[0]); if ( v6 ) { if ( verbose == 1 ) printElfInfo((ELFIO::elfio *)v20); loadElfToMemory((ELFIO::elfio *)v20, (MemoryManager *)&memory); if ( verbose == 1 ) MemoryManager::printInfo((MemoryManager *)&memory); simulator = isSingleStep; byte_20501 = verbose; byte_20502 = dumpHistory; *(_DWORD *)qword_20620 = strategy; if ( v21 ) v8 = (*(long long ( **)(long long))(*(_QWORD *)v21 + 176LL))(v21); else v8 = 0LL; qword_20508 = v8; Simulator::initStack((Simulator *)&simulator, stackBaseAddr, stackSize); Simulator::simulate((Simulator *)&simulator); } main_cold_1(v7, v18); ELFIO::elfio::~elfio((ELFIO::elfio *)v20); return -1; }
main: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0xf0 CALL 0x0010bb59 TEST AL,AL JZ 0x0010bafe MOV EDI,0x60 CALL 0x0010b1c0 MOV R14,RAX MOVAPS XMM0,xmmword ptr [0x00115010] MOVAPS xmmword ptr [RSP + 0x60],XMM0 MOV RAX,0x6400000014 MOV qword ptr [RSP + 0x70],RAX LAB_0010b84d: MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x10],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x60] MOVUPS xmmword ptr [RSP],XMM0 LEA RSI,[0x11c4d0] MOV RDI,R14 XOR EDX,EDX MOV ECX,0x1 MOV R8D,0x1 CALL 0x00113400 LAB_0010b87c: MOV qword ptr [0x0011c4f0],R14 MOV EDI,0x60 CALL 0x0010b1c0 MOV R15,RAX MOVAPS XMM0,xmmword ptr [0x00115020] MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOV RAX,0x1400000008 MOV qword ptr [RSP + 0x50],RAX LAB_0010b8ab: MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x10],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x40] MOVUPS xmmword ptr [RSP],XMM0 LEA RSI,[0x11c4d0] MOV RDI,R15 MOV RDX,R14 MOV ECX,0x1 MOV R8D,0x1 CALL 0x00113400 LAB_0010b8db: MOV qword ptr [0x0011c4e8],R15 MOV EDI,0x60 CALL 0x0010b1c0 MOV R14,RAX MOVAPS XMM0,xmmword ptr [0x00115030] MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOV RAX,0x800000000 MOV qword ptr [RSP + 0x30],RAX LAB_0010b90a: MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x10],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x20] MOVUPS xmmword ptr [RSP],XMM0 LEA RSI,[0x11c4d0] MOV RDI,R14 MOV RDX,R15 MOV ECX,0x1 MOV R8D,0x1 CALL 0x00113400 LAB_0010b93a: MOV qword ptr [0x0011c4e0],R14 LEA RDI,[0x11c4d0] MOV RSI,R14 CALL 0x0010f0d4 LEA RDI,[RSP + 0x98] CALL 0x0010c0c8 MOV RSI,qword ptr [0x0011c4c0] LAB_0010b964: LEA RDI,[RSP + 0x78] LEA RDX,[RSP + 0x1f] CALL 0x0010b0c0 LAB_0010b973: LEA RDI,[RSP + 0x98] LEA RSI,[RSP + 0x78] CALL 0x0010c130 MOV EBX,EAX LEA RAX,[RSP + 0x88] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0010b99d CALL 0x0010b1a0 LAB_0010b99d: TEST BL,BL JZ 0x0010baf2 CMP byte ptr [0x0011c4c8],0x1 JNZ 0x0010b9bb LAB_0010b9ae: LEA RDI,[RSP + 0x98] CALL 0x0010bd10 LAB_0010b9bb: LEA RSI,[0x11c4d0] LEA RDI,[RSP + 0x98] CALL 0x0010bf9a CMP byte ptr [0x0011c4c8],0x1 JNZ 0x0010b9e4 LEA RDI,[0x11c4d0] CALL 0x0010efbe LAB_0010b9e4: MOV AL,byte ptr [0x0011c4c9] MOV byte ptr [0x00120500],AL MOV AL,byte ptr [0x0011c4c8] MOV byte ptr [0x00120501],AL MOV AL,byte ptr [0x0011c4ca] MOV byte ptr [0x00120502],AL MOV EAX,dword ptr [0x0011c1e8] MOV RCX,qword ptr [0x00120620] MOV dword ptr [RCX],EAX MOV RDI,qword ptr [RSP + 0xa8] TEST RDI,RDI JZ 0x0010ba2f MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0xb0] JMP 0x0010ba31 LAB_0010ba2f: XOR EAX,EAX LAB_0010ba31: MOV qword ptr [0x00120508],RAX LEA RDI,[0x120500] MOV ESI,dword ptr [0x0011c1e0] MOV EDX,dword ptr [0x0011c1e4] CALL 0x0010f16a LEA RDI,[0x120500] CALL 0x0010f17e CMP byte ptr [0x0011c4ca],0x1 JNZ 0x0010ba7d LEA RDI,[0x115184] CALL 0x0010b320 LEA RDI,[0x120500] CALL 0x0011282a LAB_0010ba7d: MOV RBX,qword ptr [0x0011c4e0] TEST RBX,RBX JZ 0x0010ba9a LEA RDI,[RBX + 0x48] CALL 0x0010ea1a MOV RDI,RBX CALL 0x0010b1a0 LAB_0010ba9a: MOV RBX,qword ptr [0x0011c4e8] TEST RBX,RBX JZ 0x0010bab7 LEA RDI,[RBX + 0x48] CALL 0x0010ea1a MOV RDI,RBX CALL 0x0010b1a0 LAB_0010bab7: MOV R14,qword ptr [0x0011c4f0] XOR EBX,EBX TEST R14,R14 JZ 0x0010bad6 LEA RDI,[R14 + 0x48] CALL 0x0010ea1a MOV RDI,R14 CALL 0x0010b1a0 LAB_0010bad6: LEA RDI,[RSP + 0x98] CALL 0x0010c1b0 MOV EAX,EBX ADD RSP,0xf0 POP RBX POP R14 POP R15 RET LAB_0010baf2: CALL 0x0010b45d MOV EBX,0xffffffff JMP 0x0010bad6 LAB_0010bafe: CALL 0x0010bcde MOV EDI,0xffffffff CALL 0x0010b240
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int8 main(int param_1,char **param_2) { int4 uVar1; int4 uVar2; int8 uVar3; char cVar4; Cache *pCVar5; Cache *pCVar6; int8 uVar7; int8 in_R9; allocator local_e9; int8 local_e8; int8 uStack_e0; int8 local_d8; int8 local_c8; int8 uStack_c0; int8 local_b8; int8 local_a8; int8 uStack_a0; int8 local_98; int1 *local_90 [2]; int1 local_80 [16]; elfio local_70 [16]; long *local_60; cVar4 = parseParameters(param_1,param_2); if (cVar4 != '\0') { pCVar5 = (Cache *)operator_new(0x60); local_a8 = _DAT_00115010; uVar7 = local_a8; uStack_a0 = _UNK_00115018; uVar3 = uStack_a0; local_98 = 0x6400000014; /* try { // try from 0010b84d to 0010b87b has its CatchHandler @ 0010bb34 */ local_a8._0_4_ = (int4)_DAT_00115010; uVar1 = (int4)local_a8; uStack_a0._0_4_ = (int4)_UNK_00115018; uVar2 = (int4)uStack_a0; local_a8 = uVar7; uStack_a0 = uVar3; Cache::Cache(pCVar5,memory,0,1,1,in_R9,uVar1,uVar2,0x6400000014); l3Cache = pCVar5; pCVar6 = (Cache *)operator_new(0x60); local_c8 = _DAT_00115020; uVar7 = local_c8; uStack_c0 = _UNK_00115028; uVar3 = uStack_c0; local_b8 = 0x1400000008; /* try { // try from 0010b8ab to 0010b8da has its CatchHandler @ 0010bb2c */ local_c8._0_4_ = (int4)_DAT_00115020; uVar1 = (int4)local_c8; uStack_c0._0_4_ = (int4)_UNK_00115028; uVar2 = (int4)uStack_c0; local_c8 = uVar7; uStack_c0 = uVar3; Cache::Cache(pCVar6,memory,pCVar5,1,1,in_R9,uVar1,uVar2,0x1400000008); l2Cache = pCVar6; pCVar5 = (Cache *)operator_new(0x60); local_e8 = _DAT_00115030; uVar7 = local_e8; uStack_e0 = _UNK_00115038; uVar3 = uStack_e0; local_d8 = 0x800000000; /* try { // try from 0010b90a to 0010b939 has its CatchHandler @ 0010bb2a */ local_e8._0_4_ = (int4)_DAT_00115030; uVar1 = (int4)local_e8; uStack_e0._0_4_ = (int4)_UNK_00115038; uVar2 = (int4)uStack_e0; local_e8 = uVar7; uStack_e0 = uVar3; Cache::Cache(pCVar5,memory,pCVar6,1,1,in_R9,uVar1,uVar2,0x800000000); l1Cache = pCVar5; MemoryManager::setCache((MemoryManager *)memory,pCVar5); ELFIO::elfio::elfio(local_70); /* try { // try from 0010b964 to 0010b972 has its CatchHandler @ 0010bb28 */ std::__cxx11::string::string((string *)local_90,elfFile,&local_e9); /* try { // try from 0010b973 to 0010b984 has its CatchHandler @ 0010bb0d */ cVar4 = ELFIO::elfio::load(local_70,(string *)local_90); if (local_90[0] != local_80) { operator_delete(local_90[0]); } if (cVar4 == '\0') { main_cold_1(); uVar7 = 0xffffffff; } else { if (verbose == '\x01') { /* try { // try from 0010b9ae to 0010ba7c has its CatchHandler @ 0010bb41 */ printElfInfo(local_70); } loadElfToMemory(local_70,(MemoryManager *)memory); if (verbose == '\x01') { MemoryManager::printInfo(); } simulator[0] = isSingleStep; simulator[1] = verbose; simulator[2] = dumpHistory; *(int4 *)simulator._288_8_ = strategy; if (local_60 == (long *)0x0) { simulator._8_8_ = 0; } else { simulator._8_8_ = (**(code **)(*local_60 + 0xb0))(); } Simulator::initStack((Simulator *)simulator,stackBaseAddr,stackSize); Simulator::simulate((Simulator *)simulator); if (dumpHistory == '\x01') { puts("Dumping history to dump.txt..."); Simulator::dumpHistory((Simulator *)simulator); } pCVar5 = l1Cache; if (l1Cache != (Cache *)0x0) { std::vector<Cache::Block,std::allocator<Cache::Block>>::~vector ((vector<Cache::Block,std::allocator<Cache::Block>> *)(l1Cache + 0x48)); operator_delete(pCVar5); } pCVar5 = l2Cache; if (l2Cache != (Cache *)0x0) { std::vector<Cache::Block,std::allocator<Cache::Block>>::~vector ((vector<Cache::Block,std::allocator<Cache::Block>> *)(l2Cache + 0x48)); operator_delete(pCVar5); } pCVar5 = l3Cache; uVar7 = 0; if (l3Cache != (Cache *)0x0) { std::vector<Cache::Block,std::allocator<Cache::Block>>::~vector ((vector<Cache::Block,std::allocator<Cache::Block>> *)(l3Cache + 0x48)); operator_delete(pCVar5); } } ELFIO::elfio::~elfio(local_70); return uVar7; } printUsage(); /* WARNING: Subroutine does not return */ exit(-1); }
47,549
Catch::Generators::GeneratorTracker::close()
AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp
void close() override { TrackerBase::close(); // If a generator has a child (it is followed by a section) // and none of its children have started, then we must wait // until later to start consuming its values. // This catches cases where `GENERATE` is placed between two // `SECTION`s. // **The check for m_children.empty cannot be removed**. // doing so would break `GENERATE` _not_ followed by `SECTION`s. const bool should_wait_for_child = [&]() { // No children -> nobody to wait for if ( m_children.empty() ) { return false; } // If at least one child started executing, don't wait if ( std::find_if( m_children.begin(), m_children.end(), []( TestCaseTracking::ITrackerPtr const& tracker ) { return tracker->hasStarted(); } ) != m_children.end() ) { return false; } // No children have started. We need to check if they _can_ // start, and thus we should wait for them, or they cannot // start (due to filters), and we shouldn't wait for them ITracker* parent = m_parent; // This is safe: there is always at least one section // tracker in a test case tracking tree while ( !parent->isSectionTracker() ) { parent = parent->parent(); } assert( parent && "Missing root (test case) level section" ); auto const& parentSection = static_cast<SectionTracker const&>( *parent ); auto const& filters = parentSection.getFilters(); // No filters -> no restrictions on running sections if ( filters.empty() ) { return true; } for ( auto const& child : m_children ) { if ( child->isSectionTracker() && std::find( filters.begin(), filters.end(), static_cast<SectionTracker const&>( *child ) .trimmedName() ) != filters.end() ) { return true; } } return false; }(); // This check is a bit tricky, because m_generator->next() // has a side-effect, where it consumes generator's current // value, but we do not want to invoke the side-effect if // this generator is still waiting for any child to start. assert( m_generator && "Tracker without generator" ); if ( should_wait_for_child || ( m_runState == CompletedSuccessfully && m_generator->countedNext() ) ) { m_children.clear(); m_runState = Executing; } }
O3
cpp
Catch::Generators::GeneratorTracker::close(): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx callq 0x6269e movq 0x40(%rbx), %rdi movq 0x48(%rbx), %rsi cmpq %rsi, %rdi je 0x7a3ff callq 0x80769 cmpq 0x48(%rbx), %rax je 0x7a432 cmpl $0x4, 0x58(%rbx) jne 0x7a4d4 movq 0x70(%rbx), %r14 movq (%r14), %rax movq %r14, %rdi callq *(%rax) testb %al, %al je 0x7a4d4 movq $0x0, 0x10(%r14) movq 0x8(%r14), %rax movb $0x0, (%rax) incq 0x28(%r14) jmp 0x7a4a1 movq %rbx, %r14 movq 0x38(%r14), %r14 movq (%r14), %rax movq %r14, %rdi callq *0x28(%rax) testb %al, %al je 0x7a435 movq 0x68(%r14), %rax cmpq 0x70(%r14), %rax je 0x7a4a1 movq 0x40(%rbx), %r12 movq 0x48(%rbx), %r13 cmpq %r13, %r12 je 0x7a3ff movq %rsp, %r15 movq (%r12), %rdi movq (%rdi), %rax callq *0x28(%rax) testb %al, %al je 0x7a493 movq 0x68(%r14), %rdi movq 0x70(%r14), %rsi movq (%r12), %rax movups 0x80(%rax), %xmm0 movups %xmm0, (%rsp) movq %r15, %rdx callq 0x7fbd0 cmpq 0x70(%r14), %rax jne 0x7a4a1 addq $0x8, %r12 cmpq %r13, %r12 jne 0x7a460 jmp 0x7a3ff movq 0x40(%rbx), %r14 movq 0x48(%rbx), %r15 cmpq %r14, %r15 je 0x7a4cd movq %r14, %r12 movq (%r12), %rdi testq %rdi, %rdi je 0x7a4c0 movq (%rdi), %rax callq *0x8(%rax) addq $0x8, %r12 cmpq %r15, %r12 jne 0x7a4b1 movq %r14, 0x48(%rbx) movl $0x1, 0x58(%rbx) addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
_ZN5Catch10Generators16GeneratorTracker5closeEv: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov rbx, rdi call _ZN5Catch16TestCaseTracking11TrackerBase5closeEv; Catch::TestCaseTracking::TrackerBase::close(void) mov rdi, [rbx+40h] mov rsi, [rbx+48h] cmp rdi, rsi jz short loc_7A3FF call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPN5Catch6Detail10unique_ptrINS2_16TestCaseTracking8ITrackerEEESt6vectorIS7_SaIS7_EEEENS0_5__ops10_Iter_predIZZNS2_10Generators16GeneratorTracker5closeEvENKUlvE_clEvEUlRKS7_E_EEET_SM_SM_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<Catch::Detail::unique_ptr<Catch::TestCaseTracking::ITracker> *,std::vector<Catch::Detail::unique_ptr<Catch::TestCaseTracking::ITracker>>>,__gnu_cxx::__ops::_Iter_pred<Catch::Generators::GeneratorTracker::close(void)::{lambda(void)#1}::operator() const(void)::{lambda(Catch::Detail::unique_ptr<Catch::TestCaseTracking::ITracker> const&)#1}>>(__gnu_cxx::__normal_iterator<Catch::Detail::unique_ptr<Catch::TestCaseTracking::ITracker> *,std::vector<Catch::Detail::unique_ptr<Catch::TestCaseTracking::ITracker>>>,__gnu_cxx::__normal_iterator<Catch::Detail::unique_ptr<Catch::TestCaseTracking::ITracker> *,std::vector<Catch::Detail::unique_ptr<Catch::TestCaseTracking::ITracker>>>,__gnu_cxx::__ops::_Iter_pred<Catch::Generators::GeneratorTracker::close(void)::{lambda(void)#1}::operator() const(void)::{lambda(Catch::Detail::unique_ptr<Catch::TestCaseTracking::ITracker> const&)#1}>,std::random_access_iterator_tag) cmp rax, [rbx+48h] jz short loc_7A432 loc_7A3FF: cmp dword ptr [rbx+58h], 4 jnz loc_7A4D4 mov r14, [rbx+70h] mov rax, [r14] mov rdi, r14 call qword ptr [rax] test al, al jz loc_7A4D4 mov qword ptr [r14+10h], 0 mov rax, [r14+8] mov byte ptr [rax], 0 inc qword ptr [r14+28h] jmp short loc_7A4A1 loc_7A432: mov r14, rbx loc_7A435: mov r14, [r14+38h] mov rax, [r14] mov rdi, r14 call qword ptr [rax+28h] test al, al jz short loc_7A435 mov rax, [r14+68h] cmp rax, [r14+70h] jz short loc_7A4A1 mov r12, [rbx+40h] mov r13, [rbx+48h] cmp r12, r13 jz short loc_7A3FF mov r15, rsp loc_7A460: mov rdi, [r12] mov rax, [rdi] call qword ptr [rax+28h] test al, al jz short loc_7A493 mov rdi, [r14+68h] mov rsi, [r14+70h] mov rax, [r12] movups xmm0, xmmword ptr [rax+80h] movups [rsp+38h+var_38], xmm0 mov rdx, r15 call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKN5Catch9StringRefESt6vectorIS3_SaIS3_EEEENS0_5__ops16_Iter_equals_valIS4_EEET_SD_SD_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<Catch::StringRef const*,std::vector<Catch::StringRef>>,__gnu_cxx::__ops::_Iter_equals_val<Catch::StringRef const>>(__gnu_cxx::__normal_iterator<Catch::StringRef const*,std::vector<Catch::StringRef>>,__gnu_cxx::__normal_iterator<Catch::StringRef const*,std::vector<Catch::StringRef>>,__gnu_cxx::__ops::_Iter_equals_val<Catch::StringRef const>,std::random_access_iterator_tag) cmp rax, [r14+70h] jnz short loc_7A4A1 loc_7A493: add r12, 8 cmp r12, r13 jnz short loc_7A460 jmp loc_7A3FF loc_7A4A1: mov r14, [rbx+40h] mov r15, [rbx+48h] cmp r15, r14 jz short loc_7A4CD mov r12, r14 loc_7A4B1: mov rdi, [r12] test rdi, rdi jz short loc_7A4C0 mov rax, [rdi] call qword ptr [rax+8] loc_7A4C0: add r12, 8 cmp r12, r15 jnz short loc_7A4B1 mov [rbx+48h], r14 loc_7A4CD: mov dword ptr [rbx+58h], 1 loc_7A4D4: add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn
_BYTE * Catch::Generators::GeneratorTracker::close(Catch::Generators::GeneratorTracker *this, double a2) { _BYTE *result; // rax long long v4; // r14 Catch::Generators::GeneratorTracker *v5; // r14 _QWORD *v6; // r12 _QWORD *i; // r13 long long v8; // rdi long long v9; // rsi _QWORD *v10; // r14 _QWORD *v11; // r15 _QWORD *v12; // r12 __int128 v13[3]; // [rsp+0h] [rbp-38h] BYREF result = (_BYTE *)Catch::TestCaseTracking::TrackerBase::close(this, a2); if ( *((_QWORD *)this + 8) != *((_QWORD *)this + 9) ) { result = (_BYTE *)std::__find_if<__gnu_cxx::__normal_iterator<Catch::Detail::unique_ptr<Catch::TestCaseTracking::ITracker> *,std::vector<Catch::Detail::unique_ptr<Catch::TestCaseTracking::ITracker>>>,__gnu_cxx::__ops::_Iter_pred<Catch::Generators::GeneratorTracker::close(void)::{lambda(void)#1}::operator() const(void)::{lambda(Catch::Detail::unique_ptr<Catch::TestCaseTracking::ITracker> const&)#1}>>(); if ( result == *((_BYTE **)this + 9) ) { v5 = this; do v5 = (Catch::Generators::GeneratorTracker *)*((_QWORD *)v5 + 7); while ( !(*(unsigned __int8 ( **)(Catch::Generators::GeneratorTracker *))(*(_QWORD *)v5 + 40LL))(v5) ); result = (_BYTE *)*((_QWORD *)v5 + 13); if ( result == *((_BYTE **)v5 + 14) ) goto LABEL_14; v6 = (_QWORD *)*((_QWORD *)this + 8); for ( i = (_QWORD *)*((_QWORD *)this + 9); v6 != i; ++v6 ) { result = (_BYTE *)(*(long long ( **)(_QWORD))(*(_QWORD *)*v6 + 40LL))(*v6); if ( (_BYTE)result ) { v8 = *((_QWORD *)v5 + 13); v9 = *((_QWORD *)v5 + 14); v13[0] = *(_OWORD *)(*v6 + 128LL); result = (_BYTE *)std::__find_if<__gnu_cxx::__normal_iterator<Catch::StringRef const*,std::vector<Catch::StringRef>>,__gnu_cxx::__ops::_Iter_equals_val<Catch::StringRef const>>( v8, v9, v13); if ( result != *((_BYTE **)v5 + 14) ) goto LABEL_14; } } } } if ( *((_DWORD *)this + 22) != 4 ) return result; v4 = *((_QWORD *)this + 14); result = (_BYTE *)(**(long long ( ***)(long long))v4)(v4); if ( !(_BYTE)result ) return result; *(_QWORD *)(v4 + 16) = 0LL; result = *(_BYTE **)(v4 + 8); *result = 0; ++*(_QWORD *)(v4 + 40); LABEL_14: v10 = (_QWORD *)*((_QWORD *)this + 8); v11 = (_QWORD *)*((_QWORD *)this + 9); if ( v11 != v10 ) { v12 = (_QWORD *)*((_QWORD *)this + 8); do { if ( *v12 ) result = (_BYTE *)(*(long long ( **)(_QWORD))(*(_QWORD *)*v12 + 8LL))(*v12); ++v12; } while ( v12 != v11 ); *((_QWORD *)this + 9) = v10; } *((_DWORD *)this + 22) = 1; return result; }
close: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV RBX,RDI CALL 0x0016269e MOV RDI,qword ptr [RBX + 0x40] MOV RSI,qword ptr [RBX + 0x48] CMP RDI,RSI JZ 0x0017a3ff CALL 0x00180769 CMP RAX,qword ptr [RBX + 0x48] JZ 0x0017a432 LAB_0017a3ff: CMP dword ptr [RBX + 0x58],0x4 JNZ 0x0017a4d4 MOV R14,qword ptr [RBX + 0x70] MOV RAX,qword ptr [R14] MOV RDI,R14 CALL qword ptr [RAX] TEST AL,AL JZ 0x0017a4d4 MOV qword ptr [R14 + 0x10],0x0 MOV RAX,qword ptr [R14 + 0x8] MOV byte ptr [RAX],0x0 INC qword ptr [R14 + 0x28] JMP 0x0017a4a1 LAB_0017a432: MOV R14,RBX LAB_0017a435: MOV R14,qword ptr [R14 + 0x38] MOV RAX,qword ptr [R14] MOV RDI,R14 CALL qword ptr [RAX + 0x28] TEST AL,AL JZ 0x0017a435 MOV RAX,qword ptr [R14 + 0x68] CMP RAX,qword ptr [R14 + 0x70] JZ 0x0017a4a1 MOV R12,qword ptr [RBX + 0x40] MOV R13,qword ptr [RBX + 0x48] CMP R12,R13 JZ 0x0017a3ff MOV R15,RSP LAB_0017a460: MOV RDI,qword ptr [R12] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x28] TEST AL,AL JZ 0x0017a493 MOV RDI,qword ptr [R14 + 0x68] MOV RSI,qword ptr [R14 + 0x70] MOV RAX,qword ptr [R12] MOVUPS XMM0,xmmword ptr [RAX + 0x80] MOVUPS xmmword ptr [RSP],XMM0 MOV RDX,R15 CALL 0x0017fbd0 CMP RAX,qword ptr [R14 + 0x70] JNZ 0x0017a4a1 LAB_0017a493: ADD R12,0x8 CMP R12,R13 JNZ 0x0017a460 JMP 0x0017a3ff LAB_0017a4a1: MOV R14,qword ptr [RBX + 0x40] MOV R15,qword ptr [RBX + 0x48] CMP R15,R14 JZ 0x0017a4cd MOV R12,R14 LAB_0017a4b1: MOV RDI,qword ptr [R12] TEST RDI,RDI JZ 0x0017a4c0 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0017a4c0: ADD R12,0x8 CMP R12,R15 JNZ 0x0017a4b1 MOV qword ptr [RBX + 0x48],R14 LAB_0017a4cd: MOV dword ptr [RBX + 0x58],0x1 LAB_0017a4d4: ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* Catch::Generators::GeneratorTracker::close() */ void __thiscall Catch::Generators::GeneratorTracker::close(GeneratorTracker *this) { int8 *puVar1; long *plVar2; char cVar3; long lVar4; long *plVar5; long *plVar6; GeneratorTracker *pGVar7; int4 local_38; int4 uStack_34; int4 uStack_30; int4 uStack_2c; TestCaseTracking::TrackerBase::close((TrackerBase *)this); if ((*(long *)(this + 0x40) != *(long *)(this + 0x48)) && (lVar4 = std::operator()(), pGVar7 = this, lVar4 == *(long *)(this + 0x48))) { do { pGVar7 = *(GeneratorTracker **)(pGVar7 + 0x38); cVar3 = (**(code **)(*(long *)pGVar7 + 0x28))(pGVar7); } while (cVar3 == '\0'); if (*(long *)(pGVar7 + 0x68) == *(long *)(pGVar7 + 0x70)) goto LAB_0017a4a1; plVar2 = *(long **)(this + 0x48); for (plVar5 = *(long **)(this + 0x40); plVar5 != plVar2; plVar5 = plVar5 + 1) { cVar3 = (**(code **)(*(long *)*plVar5 + 0x28))(); if (cVar3 != '\0') { lVar4 = *plVar5; local_38 = *(int4 *)(lVar4 + 0x80); uStack_34 = *(int4 *)(lVar4 + 0x84); uStack_30 = *(int4 *)(lVar4 + 0x88); uStack_2c = *(int4 *)(lVar4 + 0x8c); lVar4 = std:: __find_if<__gnu_cxx::__normal_iterator<Catch::StringRef_const*,std::vector<Catch::StringRef,std::allocator<Catch::StringRef>>>,__gnu_cxx::__ops::_Iter_equals_val<Catch::StringRef_const>> (*(long *)(pGVar7 + 0x68),*(long *)(pGVar7 + 0x70),&local_38); if (lVar4 != *(long *)(pGVar7 + 0x70)) goto LAB_0017a4a1; } } } if (*(int *)(this + 0x58) != 4) { return; } puVar1 = *(int8 **)(this + 0x70); cVar3 = (**(code **)*puVar1)(puVar1); if (cVar3 == '\0') { return; } puVar1[2] = 0; *(int1 *)puVar1[1] = 0; puVar1[5] = puVar1[5] + 1; LAB_0017a4a1: plVar5 = *(long **)(this + 0x40); plVar2 = *(long **)(this + 0x48); plVar6 = plVar5; if (plVar2 != plVar5) { do { if ((long *)*plVar6 != (long *)0x0) { (**(code **)(*(long *)*plVar6 + 8))(); } plVar6 = plVar6 + 1; } while (plVar6 != plVar2); *(long **)(this + 0x48) = plVar5; } *(int4 *)(this + 0x58) = 1; return; }
47,550
LefDefParser::defwEndSlots()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp
int defwEndSlots() { defwFunc = DEFW_SLOT_END; // Current function of writer if (!defwFile) return DEFW_UNINITIALIZED; if (defwState != DEFW_SLOT_RECT) return DEFW_BAD_ORDER; if (defwCounter > 0) return DEFW_BAD_DATA; else if (defwCounter < 0) return DEFW_TOO_MANY_STMS; fprintf(defwFile, " ;\n"); fprintf(defwFile, "END SLOTS\n\n"); defwLines++; defwState = DEFW_SLOT_END; return DEFW_OK; }
O3
cpp
LefDefParser::defwEndSlots(): pushq %r14 pushq %rbx pushq %rax leaq 0xbcfd(%rip), %rax # 0x1e178 movl $0x53, (%rax) leaq 0xbce0(%rip), %r14 # 0x1e168 movq (%r14), %rcx testq %rcx, %rcx je 0x124f6 leaq 0xbcdd(%rip), %rbx # 0x1e174 movl $0x2, %eax cmpl $0x52, (%rbx) jne 0x124fb leaq 0xbce0(%rip), %rdx # 0x1e188 movl $0x3, %eax cmpl $0x0, (%rdx) jg 0x124fb js 0x12503 leaq 0x2ad6(%rip), %rdi # 0x14f91 movl $0x3, %esi movl $0x1, %edx callq 0x1110 movq (%r14), %rcx leaq 0x3eb4(%rip), %rdi # 0x16388 movl $0xb, %esi movl $0x1, %edx callq 0x1110 leaq 0xbc86(%rip), %rax # 0x1e170 incl (%rax) movl $0x53, (%rbx) xorl %eax, %eax jmp 0x124fb movl $0x1, %eax addq $0x8, %rsp popq %rbx popq %r14 retq movl $0x7, %eax jmp 0x124fb
_ZN12LefDefParser12defwEndSlotsEv: push r14 push rbx push rax lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc mov dword ptr [rax], 53h ; 'S' lea r14, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile mov rcx, [r14] test rcx, rcx jz short loc_124F6 lea rbx, _ZN12LefDefParser9defwStateE; LefDefParser::defwState mov eax, 2 cmp dword ptr [rbx], 52h ; 'R' jnz short loc_124FB lea rdx, _ZN12LefDefParser11defwCounterE; LefDefParser::defwCounter mov eax, 3 cmp dword ptr [rdx], 0 jg short loc_124FB js short loc_12503 lea rdi, aDividercharS+10h; " ;\n" mov esi, 3 mov edx, 1 call _fwrite mov rcx, [r14] lea rdi, aEndSlots; "END SLOTS\n\n" mov esi, 0Bh mov edx, 1 call _fwrite lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines inc dword ptr [rax] mov dword ptr [rbx], 53h ; 'S' xor eax, eax jmp short loc_124FB loc_124F6: mov eax, 1 loc_124FB: add rsp, 8 pop rbx pop r14 retn loc_12503: mov eax, 7 jmp short loc_124FB
long long LefDefParser::defwEndSlots(LefDefParser *this) { long long result; // rax LefDefParser::defwFunc = 83; if ( !LefDefParser::defwFile ) return 1LL; result = 2LL; if ( LefDefParser::defwState == 82 ) { result = 3LL; if ( LefDefParser::defwCounter <= 0 ) { if ( LefDefParser::defwCounter < 0 ) { return 7LL; } else { fwrite(" ;\n", 3LL, 1LL, LefDefParser::defwFile); fwrite("END SLOTS\n\n", 11LL, 1LL, LefDefParser::defwFile); ++LefDefParser::defwLines; LefDefParser::defwState = 83; return 0LL; } } } return result; }
defwEndSlots: PUSH R14 PUSH RBX PUSH RAX LEA RAX,[0x11e178] MOV dword ptr [RAX],0x53 LEA R14,[0x11e168] MOV RCX,qword ptr [R14] TEST RCX,RCX JZ 0x001124f6 LEA RBX,[0x11e174] MOV EAX,0x2 CMP dword ptr [RBX],0x52 JNZ 0x001124fb LEA RDX,[0x11e188] MOV EAX,0x3 CMP dword ptr [RDX],0x0 JG 0x001124fb JS 0x00112503 LEA RDI,[0x114f91] MOV ESI,0x3 MOV EDX,0x1 CALL 0x00101110 MOV RCX,qword ptr [R14] LEA RDI,[0x116388] MOV ESI,0xb MOV EDX,0x1 CALL 0x00101110 LEA RAX,[0x11e170] INC dword ptr [RAX] MOV dword ptr [RBX],0x53 XOR EAX,EAX JMP 0x001124fb LAB_001124f6: MOV EAX,0x1 LAB_001124fb: ADD RSP,0x8 POP RBX POP R14 RET LAB_00112503: MOV EAX,0x7 JMP 0x001124fb
/* LefDefParser::defwEndSlots() */ int8 LefDefParser::defwEndSlots(void) { int8 uVar1; defwFunc = 0x53; if (defwFile == (FILE *)0x0) { uVar1 = 1; } else { uVar1 = 2; if (defwState == 0x52) { uVar1 = 3; if (defwCounter < 1) { if (defwCounter < 0) { uVar1 = 7; } else { fwrite(" ;\n",3,1,defwFile); fwrite("END SLOTS\n\n",0xb,1,defwFile); defwLines = defwLines + 1; defwState = 0x53; uVar1 = 0; } } } } return uVar1; }
47,551
ma_net_read
eloqsql/libmariadb/libmariadb/ma_net.c
ulong ma_net_read(NET *net) { size_t len,complen; #ifdef HAVE_COMPRESS if (!net->compress) { #endif len = ma_real_read (net,(size_t *)&complen); if (len == MAX_PACKET_LENGTH) { /* multi packet read */ size_t length= 0; ulong last_pos= net->where_b; do { length+= len; net->where_b+= (unsigned long)len; len= ma_real_read(net, &complen); } while (len == MAX_PACKET_LENGTH); net->where_b= last_pos; if (len != packet_error) len+= length; } net->read_pos = net->buff + net->where_b; if (len != packet_error) net->read_pos[len]=0; /* Safeguard for mysql_use_result */ return (ulong)len; #ifdef HAVE_COMPRESS } else { /* compressed protocol: -------------------------------------- packet_length 3 sequence_id 1 uncompressed_length 3 -------------------------------------- compressed data packet_length - 7 -------------------------------------- Another packet will follow if: packet_length == MAX_PACKET_LENGTH Last package will be identified by - packet_length is zero (special case) - packet_length < MAX_PACKET_LENGTH */ size_t packet_length, buffer_length; size_t current= 0, start= 0; my_bool is_multi_packet= 0; /* check if buffer is empty */ if (!net->remain_in_buf) { buffer_length= 0; } else { /* save position and restore \0 character */ buffer_length= net->buf_length; current= net->buf_length - net->remain_in_buf; start= current; net->buff[net->buf_length - net->remain_in_buf]=net->save_char; } for (;;) { if (buffer_length - current >= 4) { uchar *pos= net->buff + current; packet_length= uint3korr(pos); /* check if we have last package (special case: zero length) */ if (!packet_length) { current+= 4; /* length + sequence_id, no more data will follow */ break; } if (packet_length + 4 <= buffer_length - current) { if (!is_multi_packet) { current= current + packet_length + 4; } else { /* remove packet_header */ memmove(net->buff + current, net->buff + current + 4, buffer_length - current); buffer_length-= 4; current+= packet_length; } /* do we have last packet ? */ if (packet_length != MAX_PACKET_LENGTH) { is_multi_packet= 0; break; } else is_multi_packet= 1; if (start) { memmove(net->buff, net->buff + start, buffer_length - start); /* decrease buflen*/ buffer_length-= start; start= 0; } continue; } } if (start) { memmove(net->buff, net->buff + start, buffer_length - start); /* decrease buflen and current */ current -= start; buffer_length-= start; start= 0; } net->where_b=(unsigned long)buffer_length; if ((packet_length = ma_real_read(net,(size_t *)&complen)) == packet_error) return packet_error; if (_mariadb_uncompress(net, (unsigned char*) net->buff + net->where_b, &packet_length, &complen)) { net->error=2; /* caller will close socket */ net->pvio->set_error(net->pvio->mysql, CR_ERR_NET_UNCOMPRESS, SQLSTATE_UNKNOWN, 0); return packet_error; } buffer_length+= complen; } /* set values */ net->buf_length= (unsigned long)buffer_length; net->remain_in_buf= (unsigned long)(buffer_length - current); net->read_pos= net->buff + start + 4; len= current - start - 4; if (is_multi_packet) len-= 4; net->save_char= net->read_pos[len]; /* Must be saved */ net->read_pos[len]=0; /* Safeguard for mysql_use_result */ } #endif return (ulong)len; }
O3
c
ma_net_read: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx cmpb $0x0, 0x84(%rdi) je 0x360ac movq 0x30(%rbx), %rax testq %rax, %rax je 0x3610c movq 0x8(%rbx), %rcx movq 0x40(%rbx), %r15 movq %r15, %r14 subq %rax, %r14 movb 0x81(%rbx), %al movb %al, (%rcx,%r14) jmp 0x36112 leaq -0x38(%rbp), %rsi movq %rbx, %rdi callq 0x362be movq 0x48(%rbx), %r15 cmpq $0xffffff, %rax # imm = 0xFFFFFF jne 0x36284 xorl %r12d, %r12d movl $0xffffff, %r13d # imm = 0xFFFFFF leaq -0x38(%rbp), %r14 addq %r13, %r12 addq %r13, 0x48(%rbx) movq %rbx, %rdi movq %r14, %rsi callq 0x362be cmpq %r13, %rax je 0x360d5 movq %r15, 0x48(%rbx) movl $0xffffffff, %r14d # imm = 0xFFFFFFFF cmpq %r14, %rax jne 0x36281 addq 0x8(%rbx), %r15 movq %r15, 0x20(%rbx) jmp 0x3629f xorl %r15d, %r15d xorl %r14d, %r14d movb $0x1, %cl leaq -0x38(%rbp), %r12 movq %r14, %rax movq %rcx, -0x40(%rbp) movq %rax, %r13 movq %r15, %rdx subq %r14, %rdx cmpq $0x4, %rdx jb 0x36156 movq 0x8(%rbx), %rdi movzwl (%rdi,%r14), %ecx movzbl 0x2(%rdi,%r14), %eax shll $0x10, %eax orq %rcx, %rax movq %rax, -0x30(%rbp) je 0x36244 leaq 0x4(%rax), %rcx cmpq %rdx, %rcx jbe 0x361b9 testq %r13, %r13 je 0x36171 movq 0x8(%rbx), %rdi leaq (%rdi,%r13), %rsi subq %r13, %r15 movq %r15, %rdx callq 0x13750 subq %r13, %r14 movq %r15, 0x48(%rbx) movq %rbx, %rdi movq %r12, %rsi callq 0x362be movq %rax, -0x30(%rbp) movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpq %rcx, %rax je 0x3623c movq 0x8(%rbx), %rsi addq 0x48(%rbx), %rsi movq %rbx, %rdi leaq -0x30(%rbp), %rdx movq %r12, %rcx callq 0x22ae9 testb %al, %al jne 0x36217 addq -0x38(%rbp), %r15 xorl %r13d, %r13d jmp 0x36122 testb $0x1, -0x40(%rbp) je 0x361c8 addq %rax, %r14 addq $0x4, %r14 jmp 0x361df addq %r14, %rdi leaq 0x4(%rdi), %rsi callq 0x13750 addq $-0x4, %r15 movq -0x30(%rbp), %rax addq %rax, %r14 cmpq $0xffffff, %rax # imm = 0xFFFFFF jne 0x362b1 xorl %eax, %eax movl $0x0, %ecx testq %r13, %r13 je 0x3611b movq 0x8(%rbx), %rdi leaq (%rdi,%r13), %rsi subq %r13, %r15 movq %r15, %rdx callq 0x13750 xorl %eax, %eax xorl %ecx, %ecx jmp 0x3611b movb $0x2, 0x94(%rbx) movq (%rbx), %r8 movq 0x40(%r8), %rdi leaq 0x19dd4(%rip), %rax # 0x50000 movq (%rax), %rdx movl $0x1397, %esi # imm = 0x1397 xorl %ecx, %ecx xorl %eax, %eax callq *0x50(%r8) movl $0xffffffff, %r14d # imm = 0xFFFFFFFF jmp 0x3629f addq $0x4, %r14 movzbl -0x40(%rbp), %eax shll $0x2, %eax orq $-0x8, %rax movq %r15, 0x40(%rbx) subq %r14, %r15 movq %r15, 0x30(%rbx) leaq (%rdi,%r13), %rcx addq $0x4, %rcx movq %rcx, 0x20(%rbx) subq %r13, %r14 addq %rax, %r14 movb (%rcx,%r14), %al movb %al, 0x81(%rbx) movb $0x0, (%rcx,%r14) jmp 0x3629f addq %r12, %rax movl $0xffffffff, %r14d # imm = 0xFFFFFFFF addq 0x8(%rbx), %r15 movq %r15, 0x20(%rbx) cmpq %r14, %rax je 0x3629f movb $0x0, (%r15,%rax) movq %rax, %r14 movq %r14, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x8(%rbx), %rdi movq $-0x4, %rax jmp 0x36253
ma_net_read: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdi cmp byte ptr [rdi+84h], 0 jz short loc_360AC mov rax, [rbx+30h] test rax, rax jz short loc_3610C mov rcx, [rbx+8] mov r15, [rbx+40h] mov r14, r15 sub r14, rax mov al, [rbx+81h] mov [rcx+r14], al jmp short loc_36112 loc_360AC: lea rsi, [rbp+var_38] mov rdi, rbx call ma_real_read mov r15, [rbx+48h] cmp rax, 0FFFFFFh jnz loc_36284 xor r12d, r12d mov r13d, 0FFFFFFh lea r14, [rbp+var_38] loc_360D5: add r12, r13 add [rbx+48h], r13 mov rdi, rbx mov rsi, r14 call ma_real_read cmp rax, r13 jz short loc_360D5 mov [rbx+48h], r15 mov r14d, 0FFFFFFFFh cmp rax, r14 jnz loc_36281 add r15, [rbx+8] mov [rbx+20h], r15 jmp loc_3629F loc_3610C: xor r15d, r15d xor r14d, r14d loc_36112: mov cl, 1 lea r12, [rbp+var_38] mov rax, r14 loc_3611B: mov [rbp+var_40], rcx mov r13, rax loc_36122: mov rdx, r15 sub rdx, r14 cmp rdx, 4 jb short loc_36156 mov rdi, [rbx+8] movzx ecx, word ptr [rdi+r14] movzx eax, byte ptr [rdi+r14+2] shl eax, 10h or rax, rcx mov [rbp+var_30], rax jz loc_36244 lea rcx, [rax+4] cmp rcx, rdx jbe short loc_361B9 loc_36156: test r13, r13 jz short loc_36171 mov rdi, [rbx+8] lea rsi, [rdi+r13] sub r15, r13 mov rdx, r15 call _memmove sub r14, r13 loc_36171: mov [rbx+48h], r15 mov rdi, rbx mov rsi, r12 call ma_real_read mov [rbp+var_30], rax mov ecx, 0FFFFFFFFh cmp rax, rcx jz loc_3623C mov rsi, [rbx+8] add rsi, [rbx+48h] mov rdi, rbx lea rdx, [rbp+var_30] mov rcx, r12 call _mariadb_uncompress test al, al jnz short loc_36217 add r15, [rbp+var_38] xor r13d, r13d jmp loc_36122 loc_361B9: test byte ptr [rbp+var_40], 1 jz short loc_361C8 add r14, rax add r14, 4 jmp short loc_361DF loc_361C8: add rdi, r14 lea rsi, [rdi+4] call _memmove add r15, 0FFFFFFFFFFFFFFFCh mov rax, [rbp+var_30] add r14, rax loc_361DF: cmp rax, 0FFFFFFh jnz loc_362B1 xor eax, eax mov ecx, 0 test r13, r13 jz loc_3611B mov rdi, [rbx+8] lea rsi, [rdi+r13] sub r15, r13 mov rdx, r15 call _memmove xor eax, eax xor ecx, ecx jmp loc_3611B loc_36217: mov byte ptr [rbx+94h], 2 mov r8, [rbx] mov rdi, [r8+40h] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov esi, 1397h xor ecx, ecx xor eax, eax call qword ptr [r8+50h] loc_3623C: mov r14d, 0FFFFFFFFh jmp short loc_3629F loc_36244: add r14, 4 movzx eax, byte ptr [rbp+var_40] shl eax, 2 or rax, 0FFFFFFFFFFFFFFF8h loc_36253: mov [rbx+40h], r15 sub r15, r14 mov [rbx+30h], r15 lea rcx, [rdi+r13] add rcx, 4 mov [rbx+20h], rcx sub r14, r13 add r14, rax mov al, [rcx+r14] mov [rbx+81h], al mov byte ptr [rcx+r14], 0 jmp short loc_3629F loc_36281: add rax, r12 loc_36284: mov r14d, 0FFFFFFFFh add r15, [rbx+8] mov [rbx+20h], r15 cmp rax, r14 jz short loc_3629F mov byte ptr [r15+rax], 0 mov r14, rax loc_3629F: mov rax, r14 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_362B1: mov rdi, [rbx+8] mov rax, 0FFFFFFFFFFFFFFFCh jmp short loc_36253
long long ma_net_read(long long a1) { long long v2; // rax long long v3; // r15 long long v4; // r14 long long v5; // rax long long v6; // r15 long long v7; // r12 long long v8; // rax long long v9; // r14 char v10; // cl long long v11; // rax long long i; // r13 unsigned long long v13; // rdx long long v14; // rdi unsigned long long v15; // rax unsigned long long v16; // rax long long v17; // rcx long long v18; // r15 char v20; // [rsp+0h] [rbp-40h] long long v21; // [rsp+8h] [rbp-38h] BYREF long long v22[6]; // [rsp+10h] [rbp-30h] BYREF if ( *(_BYTE *)(a1 + 132) ) { v2 = *(_QWORD *)(a1 + 48); if ( v2 ) { v3 = *(_QWORD *)(a1 + 64); v4 = v3 - v2; *(_BYTE *)(*(_QWORD *)(a1 + 8) + v3 - v2) = *(_BYTE *)(a1 + 129); } else { v3 = 0LL; v4 = 0LL; } v10 = 1; v11 = v4; while ( 1 ) { v20 = v10; for ( i = v11; ; i = 0LL ) { v13 = v3 - v4; if ( (unsigned long long)(v3 - v4) >= 4 ) { v14 = *(_QWORD *)(a1 + 8); v15 = *(unsigned __int16 *)(v14 + v4) | (unsigned long long)(*(unsigned __int8 *)(v14 + v4 + 2) << 16); v22[0] = v15; if ( !v15 ) { v4 += 4LL; v16 = (4 * v20) | 0xFFFFFFFFFFFFFFF8LL; goto LABEL_29; } if ( v15 + 4 <= v13 ) break; } if ( i ) { v3 -= i; memmove(*(_QWORD *)(a1 + 8), *(_QWORD *)(a1 + 8) + i, v3); v4 -= i; } *(_QWORD *)(a1 + 72) = v3; v22[0] = ma_real_read(a1, &v21); if ( v22[0] == 0xFFFFFFFFLL ) return 0xFFFFFFFFLL; if ( (unsigned __int8)mariadb_uncompress(a1, *(_QWORD *)(a1 + 72) + *(_QWORD *)(a1 + 8), v22, &v21) ) { *(_BYTE *)(a1 + 148) = 2; (*(void ( **)(_QWORD, long long, char *, _QWORD))(*(_QWORD *)a1 + 80LL))( *(_QWORD *)(*(_QWORD *)a1 + 64LL), 5015LL, SQLSTATE_UNKNOWN, 0LL); return 0xFFFFFFFFLL; } v3 += v21; } if ( (v20 & 1) != 0 ) { v4 += v15 + 4; } else { memmove(v4 + v14, v4 + v14 + 4, v13); v3 -= 4LL; v15 = v22[0]; v4 += v22[0]; } if ( v15 != 0xFFFFFF ) break; v11 = 0LL; v10 = 0; if ( i ) { v3 -= i; memmove(*(_QWORD *)(a1 + 8), *(_QWORD *)(a1 + 8) + i, v3); v11 = 0LL; v10 = 0; } } v14 = *(_QWORD *)(a1 + 8); v16 = -4LL; LABEL_29: *(_QWORD *)(a1 + 64) = v3; *(_QWORD *)(a1 + 48) = v3 - v4; v17 = v14 + i + 4; *(_QWORD *)(a1 + 32) = v17; v9 = v16 + v4 - i; *(_BYTE *)(a1 + 129) = *(_BYTE *)(v17 + v9); *(_BYTE *)(v17 + v9) = 0; } else { v5 = ma_real_read(a1, &v21); v6 = *(_QWORD *)(a1 + 72); if ( v5 == 0xFFFFFF ) { v7 = 0LL; do { v7 += 0xFFFFFFLL; *(_QWORD *)(a1 + 72) += 0xFFFFFFLL; v8 = ma_real_read(a1, &v21); } while ( v8 == 0xFFFFFF ); *(_QWORD *)(a1 + 72) = v6; v9 = 0xFFFFFFFFLL; if ( v8 == 0xFFFFFFFFLL ) { *(_QWORD *)(a1 + 32) = *(_QWORD *)(a1 + 8) + v6; return v9; } v5 = v7 + v8; } v9 = 0xFFFFFFFFLL; v18 = *(_QWORD *)(a1 + 8) + v6; *(_QWORD *)(a1 + 32) = v18; if ( v5 != 0xFFFFFFFFLL ) { *(_BYTE *)(v18 + v5) = 0; return v5; } } return v9; }
ma_net_read: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDI CMP byte ptr [RDI + 0x84],0x0 JZ 0x001360ac MOV RAX,qword ptr [RBX + 0x30] TEST RAX,RAX JZ 0x0013610c MOV RCX,qword ptr [RBX + 0x8] MOV R15,qword ptr [RBX + 0x40] MOV R14,R15 SUB R14,RAX MOV AL,byte ptr [RBX + 0x81] MOV byte ptr [RCX + R14*0x1],AL JMP 0x00136112 LAB_001360ac: LEA RSI,[RBP + -0x38] MOV RDI,RBX CALL 0x001362be MOV R15,qword ptr [RBX + 0x48] CMP RAX,0xffffff JNZ 0x00136284 XOR R12D,R12D MOV R13D,0xffffff LEA R14,[RBP + -0x38] LAB_001360d5: ADD R12,R13 ADD qword ptr [RBX + 0x48],R13 MOV RDI,RBX MOV RSI,R14 CALL 0x001362be CMP RAX,R13 JZ 0x001360d5 MOV qword ptr [RBX + 0x48],R15 MOV R14D,0xffffffff CMP RAX,R14 JNZ 0x00136281 ADD R15,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x20],R15 JMP 0x0013629f LAB_0013610c: XOR R15D,R15D XOR R14D,R14D LAB_00136112: MOV CL,0x1 LEA R12,[RBP + -0x38] MOV RAX,R14 LAB_0013611b: MOV qword ptr [RBP + -0x40],RCX MOV R13,RAX LAB_00136122: MOV RDX,R15 SUB RDX,R14 CMP RDX,0x4 JC 0x00136156 MOV RDI,qword ptr [RBX + 0x8] MOVZX ECX,word ptr [RDI + R14*0x1] MOVZX EAX,byte ptr [RDI + R14*0x1 + 0x2] SHL EAX,0x10 OR RAX,RCX MOV qword ptr [RBP + -0x30],RAX JZ 0x00136244 LEA RCX,[RAX + 0x4] CMP RCX,RDX JBE 0x001361b9 LAB_00136156: TEST R13,R13 JZ 0x00136171 MOV RDI,qword ptr [RBX + 0x8] LEA RSI,[RDI + R13*0x1] SUB R15,R13 MOV RDX,R15 CALL 0x00113750 SUB R14,R13 LAB_00136171: MOV qword ptr [RBX + 0x48],R15 MOV RDI,RBX MOV RSI,R12 CALL 0x001362be MOV qword ptr [RBP + -0x30],RAX MOV ECX,0xffffffff CMP RAX,RCX JZ 0x0013623c MOV RSI,qword ptr [RBX + 0x8] ADD RSI,qword ptr [RBX + 0x48] MOV RDI,RBX LEA RDX,[RBP + -0x30] MOV RCX,R12 CALL 0x00122ae9 TEST AL,AL JNZ 0x00136217 ADD R15,qword ptr [RBP + -0x38] XOR R13D,R13D JMP 0x00136122 LAB_001361b9: TEST byte ptr [RBP + -0x40],0x1 JZ 0x001361c8 ADD R14,RAX ADD R14,0x4 JMP 0x001361df LAB_001361c8: ADD RDI,R14 LEA RSI,[RDI + 0x4] CALL 0x00113750 ADD R15,-0x4 MOV RAX,qword ptr [RBP + -0x30] ADD R14,RAX LAB_001361df: CMP RAX,0xffffff JNZ 0x001362b1 XOR EAX,EAX MOV ECX,0x0 TEST R13,R13 JZ 0x0013611b MOV RDI,qword ptr [RBX + 0x8] LEA RSI,[RDI + R13*0x1] SUB R15,R13 MOV RDX,R15 CALL 0x00113750 XOR EAX,EAX XOR ECX,ECX JMP 0x0013611b LAB_00136217: MOV byte ptr [RBX + 0x94],0x2 MOV R8,qword ptr [RBX] MOV RDI,qword ptr [R8 + 0x40] LEA RAX,[0x150000] MOV RDX,qword ptr [RAX] MOV ESI,0x1397 XOR ECX,ECX XOR EAX,EAX CALL qword ptr [R8 + 0x50] LAB_0013623c: MOV R14D,0xffffffff JMP 0x0013629f LAB_00136244: ADD R14,0x4 MOVZX EAX,byte ptr [RBP + -0x40] SHL EAX,0x2 OR RAX,-0x8 LAB_00136253: MOV qword ptr [RBX + 0x40],R15 SUB R15,R14 MOV qword ptr [RBX + 0x30],R15 LEA RCX,[RDI + R13*0x1] ADD RCX,0x4 MOV qword ptr [RBX + 0x20],RCX SUB R14,R13 ADD R14,RAX MOV AL,byte ptr [RCX + R14*0x1] MOV byte ptr [RBX + 0x81],AL MOV byte ptr [RCX + R14*0x1],0x0 JMP 0x0013629f LAB_00136281: ADD RAX,R12 LAB_00136284: MOV R14D,0xffffffff ADD R15,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x20],R15 CMP RAX,R14 JZ 0x0013629f MOV byte ptr [R15 + RAX*0x1],0x0 MOV R14,RAX LAB_0013629f: MOV RAX,R14 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001362b1: MOV RDI,qword ptr [RBX + 0x8] MOV RAX,-0x4 JMP 0x00136253
long ma_net_read(long *param_1) { char cVar1; ulong uVar2; long lVar3; long lVar4; size_t __n; long lVar5; long lVar6; size_t __n_00; long local_40; ulong local_38; if (*(char *)((long)param_1 + 0x84) == '\0') { lVar4 = ma_real_read(param_1,&local_40); lVar6 = param_1[9]; if (lVar4 == 0xffffff) { lVar3 = 0; do { lVar3 = lVar3 + 0xffffff; param_1[9] = param_1[9] + 0xffffff; lVar4 = ma_real_read(param_1,&local_40); } while (lVar4 == 0xffffff); param_1[9] = lVar6; if (lVar4 == 0xffffffff) { param_1[4] = lVar6 + param_1[1]; return 0xffffffff; } lVar4 = lVar4 + lVar3; } param_1[4] = lVar6 + param_1[1]; lVar3 = 0xffffffff; if (lVar4 != 0xffffffff) { *(int1 *)(lVar6 + param_1[1] + lVar4) = 0; lVar3 = lVar4; } return lVar3; } if (param_1[6] == 0) { __n_00 = 0; lVar6 = 0; } else { __n_00 = param_1[8]; lVar6 = __n_00 - param_1[6]; *(int1 *)(param_1[1] + lVar6) = *(int1 *)((long)param_1 + 0x81); } lVar3 = 1; lVar4 = lVar6; LAB_00136122: do { lVar5 = lVar4; __n = __n_00 - lVar6; if (3 < __n) { lVar4 = param_1[1]; local_38 = (ulong)CONCAT12(*(int1 *)(lVar4 + 2 + lVar6),*(int2 *)(lVar4 + lVar6)); if (local_38 == 0) { lVar6 = lVar6 + 4; uVar2 = lVar3 << 2 | 0xfffffffffffffff8; LAB_00136253: param_1[8] = __n_00; param_1[6] = __n_00 - lVar6; lVar4 = lVar4 + lVar5 + 4; param_1[4] = lVar4; lVar6 = (lVar6 - lVar5) + uVar2; *(int1 *)((long)param_1 + 0x81) = *(int1 *)(lVar4 + lVar6); *(int1 *)(lVar4 + lVar6) = 0; return lVar6; } if (local_38 + 4 <= __n) { if (lVar3 == 0) { memmove((void *)(lVar4 + lVar6),(void *)(lVar4 + lVar6 + 4),__n); __n_00 = __n_00 - 4; lVar6 = lVar6 + local_38; } else { lVar6 = lVar6 + local_38 + 4; } if (local_38 != 0xffffff) { lVar4 = param_1[1]; uVar2 = 0xfffffffffffffffc; goto LAB_00136253; } lVar3 = 0; lVar4 = 0; if (lVar5 != 0) { __n_00 = __n_00 - lVar5; memmove((void *)param_1[1],(void *)(param_1[1] + lVar5),__n_00); lVar3 = 0; lVar4 = 0; } goto LAB_00136122; } } if (lVar5 != 0) { __n_00 = __n_00 - lVar5; memmove((void *)param_1[1],(void *)(param_1[1] + lVar5),__n_00); lVar6 = lVar6 - lVar5; } param_1[9] = __n_00; local_38 = ma_real_read(param_1,&local_40); if (local_38 == 0xffffffff) { return 0xffffffff; } cVar1 = _mariadb_uncompress(param_1,param_1[1] + param_1[9],&local_38,&local_40); if (cVar1 != '\0') { *(int1 *)((long)param_1 + 0x94) = 2; (**(code **)(*param_1 + 0x50))(*(int8 *)(*param_1 + 0x40),0x1397,SQLSTATE_UNKNOWN,0); return 0xffffffff; } __n_00 = __n_00 + local_40; lVar4 = 0; } while( true ); }
47,552
my_xml_scan
eloqsql/strings/xml.c
static int my_xml_scan(MY_XML_PARSER *p,MY_XML_ATTR *a) { int lex; for (; ( p->cur < p->end) && my_xml_is_space(p->cur[0]) ; p->cur++); if (p->cur >= p->end) { a->beg=p->end; a->end=p->end; lex=MY_XML_EOF; goto ret; } a->beg=p->cur; a->end=p->cur; if (!my_xml_parser_prefix_cmp(p, C_STRING_WITH_LEN("<!--"))) { for (; p->cur < p->end; p->cur++) { if (!my_xml_parser_prefix_cmp(p, C_STRING_WITH_LEN("-->"))) { p->cur+= 3; break; } } a->end=p->cur; lex=MY_XML_COMMENT; } else if (!my_xml_parser_prefix_cmp(p, C_STRING_WITH_LEN("<![CDATA["))) { p->cur+= 9; for (; p->cur < p->end - 2 ; p->cur++) { if (p->cur[0] == ']' && p->cur[1] == ']' && p->cur[2] == '>') { p->cur+= 3; a->end= p->cur; break; } } lex= MY_XML_CDATA; } else if (strchr("?=/<>!",p->cur[0])) { p->cur++; a->end=p->cur; lex=a->beg[0]; } else if ( (p->cur[0] == '"') || (p->cur[0] == '\'') ) { /* "string" or 'string' found. Scan until the closing quote/doublequote, or until the END-OF-INPUT. */ p->cur++; for (; ( p->cur < p->end ) && (p->cur[0] != a->beg[0]); p->cur++) {} a->end=p->cur; if (p->cur < p->end) /* Closing quote or doublequote has been found */ p->cur++; a->beg++; if (!(p->flags & MY_XML_FLAG_SKIP_TEXT_NORMALIZATION)) my_xml_norm_text(a); lex=MY_XML_STRING; } else if (my_xml_is_id0(p->cur[0])) { p->cur++; while (p->cur < p->end && my_xml_is_id1(p->cur[0])) p->cur++; a->end=p->cur; my_xml_norm_text(a); lex=MY_XML_IDENT; } else lex= MY_XML_UNKNOWN; #if 0 printf("LEX=%s[%d]\n",lex2str(lex),a->end-a->beg); #endif ret: return lex; }
O0
c
my_xml_scan: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx movq -0x8(%rbp), %rdx xorl %eax, %eax cmpq 0x138(%rdx), %rcx movb %al, -0x15(%rbp) jae 0x77f14 movq -0x8(%rbp), %rax movq 0x130(%rax), %rax movzbl (%rax), %eax movl %eax, %ecx leaq 0x30d7dc(%rip), %rax # 0x3856e0 movsbl (%rax,%rcx), %eax andl $0x8, %eax cmpl $0x0, %eax setne %al movb %al, -0x15(%rbp) movb -0x15(%rbp), %al testb $0x1, %al jne 0x77f1d jmp 0x77f37 jmp 0x77f1f movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x130(%rax) jmp 0x77ed0 movq -0x8(%rbp), %rax movq 0x130(%rax), %rax movq -0x8(%rbp), %rcx cmpq 0x138(%rcx), %rax jb 0x77f80 movq -0x8(%rbp), %rax movq 0x138(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x8(%rbp), %rax movq 0x138(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movl $0x45, -0x14(%rbp) jmp 0x78370 movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x8(%rbp), %rdi leaq 0x5cba(%rip), %rsi # 0x7dc6a movl $0x4, %edx callq 0x78bb0 cmpb $0x0, %al jne 0x78046 jmp 0x77fc4 movq -0x8(%rbp), %rax movq 0x130(%rax), %rax movq -0x8(%rbp), %rcx cmpq 0x138(%rcx), %rax jae 0x78027 movq -0x8(%rbp), %rdi leaq 0x5c88(%rip), %rsi # 0x7dc6f movl $0x3, %edx callq 0x78bb0 cmpb $0x0, %al jne 0x7800d movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx addq $0x3, %rcx movq %rcx, 0x130(%rax) jmp 0x78027 jmp 0x7800f movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x130(%rax) jmp 0x77fc4 movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movl $0x43, -0x14(%rbp) jmp 0x7836e movq -0x8(%rbp), %rdi leaq 0x5c22(%rip), %rsi # 0x7dc73 movl $0x9, %edx callq 0x78bb0 cmpb $0x0, %al jne 0x7812b movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx addq $0x9, %rcx movq %rcx, 0x130(%rax) movq -0x8(%rbp), %rax movq 0x130(%rax), %rax movq -0x8(%rbp), %rcx movq 0x138(%rcx), %rcx addq $-0x2, %rcx cmpq %rcx, %rax jae 0x7811f movq -0x8(%rbp), %rax movq 0x130(%rax), %rax movsbl (%rax), %eax cmpl $0x5d, %eax jne 0x78102 movq -0x8(%rbp), %rax movq 0x130(%rax), %rax movsbl 0x1(%rax), %eax cmpl $0x5d, %eax jne 0x78102 movq -0x8(%rbp), %rax movq 0x130(%rax), %rax movsbl 0x2(%rax), %eax cmpl $0x3e, %eax jne 0x78102 movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx addq $0x3, %rcx movq %rcx, 0x130(%rax) movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) jmp 0x7811f jmp 0x78104 movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x130(%rax) jmp 0x78079 movl $0x44, -0x14(%rbp) jmp 0x7836c movq -0x8(%rbp), %rax movq 0x130(%rax), %rax movsbl (%rax), %esi leaq 0x5b3d(%rip), %rdi # 0x7dc7d callq 0x24110 cmpq $0x0, %rax je 0x78186 movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x130(%rax) movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax movq (%rax), %rax movsbl (%rax), %eax movl %eax, -0x14(%rbp) jmp 0x7836a movq -0x8(%rbp), %rax movq 0x130(%rax), %rax movsbl (%rax), %eax cmpl $0x22, %eax je 0x781b0 movq -0x8(%rbp), %rax movq 0x130(%rax), %rax movsbl (%rax), %eax cmpl $0x27, %eax jne 0x78298 movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x130(%rax) movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx movq -0x8(%rbp), %rdx xorl %eax, %eax cmpq 0x138(%rdx), %rcx movb %al, -0x16(%rbp) jae 0x78203 movq -0x8(%rbp), %rax movq 0x130(%rax), %rax movsbl (%rax), %eax movq -0x10(%rbp), %rcx movq (%rcx), %rcx movsbl (%rcx), %ecx cmpl %ecx, %eax setne %al movb %al, -0x16(%rbp) movb -0x16(%rbp), %al testb $0x1, %al jne 0x7820c jmp 0x78226 jmp 0x7820e movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x130(%rax) jmp 0x781c6 movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x8(%rbp), %rax movq 0x130(%rax), %rax movq -0x8(%rbp), %rcx cmpq 0x138(%rcx), %rax jae 0x78267 movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x130(%rax) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x1, %rcx movq %rcx, (%rax) movq -0x8(%rbp), %rax movl (%rax), %eax andl $0x2, %eax cmpl $0x0, %eax jne 0x7828c movq -0x10(%rbp), %rdi callq 0x788e0 movl $0x53, -0x14(%rbp) jmp 0x78368 movq -0x8(%rbp), %rax movq 0x130(%rax), %rax movzbl (%rax), %eax movl %eax, %ecx leaq 0x30d431(%rip), %rax # 0x3856e0 movsbl (%rax,%rcx), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x7835f movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x130(%rax) movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx movq -0x8(%rbp), %rdx xorl %eax, %eax cmpq 0x138(%rdx), %rcx movb %al, -0x17(%rbp) jae 0x78319 movq -0x8(%rbp), %rax movq 0x130(%rax), %rax movzbl (%rax), %eax movl %eax, %ecx leaq 0x30d3d7(%rip), %rax # 0x3856e0 movsbl (%rax,%rcx), %eax andl $0x2, %eax cmpl $0x0, %eax setne %al movb %al, -0x17(%rbp) movb -0x17(%rbp), %al testb $0x1, %al jne 0x78322 jmp 0x7833a movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x130(%rax) jmp 0x782d5 movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rdi callq 0x788e0 movl $0x49, -0x14(%rbp) jmp 0x78366 movl $0x55, -0x14(%rbp) jmp 0x78368 jmp 0x7836a jmp 0x7836c jmp 0x7836e jmp 0x78370 movl -0x14(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopl (%rax)
my_xml_scan: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi loc_77ED0: mov rax, [rbp+var_8] mov rcx, [rax+130h] mov rdx, [rbp+var_8] xor eax, eax cmp rcx, [rdx+138h] mov [rbp+var_15], al jnb short loc_77F14 mov rax, [rbp+var_8] mov rax, [rax+130h] movzx eax, byte ptr [rax] mov ecx, eax lea rax, my_xml_ctype movsx eax, byte ptr [rax+rcx] and eax, 8 cmp eax, 0 setnz al mov [rbp+var_15], al loc_77F14: mov al, [rbp+var_15] test al, 1 jnz short loc_77F1D jmp short loc_77F37 loc_77F1D: jmp short $+2 loc_77F1F: mov rax, [rbp+var_8] mov rcx, [rax+130h] add rcx, 1 mov [rax+130h], rcx jmp short loc_77ED0 loc_77F37: mov rax, [rbp+var_8] mov rax, [rax+130h] mov rcx, [rbp+var_8] cmp rax, [rcx+138h] jb short loc_77F80 mov rax, [rbp+var_8] mov rcx, [rax+138h] mov rax, [rbp+var_10] mov [rax], rcx mov rax, [rbp+var_8] mov rcx, [rax+138h] mov rax, [rbp+var_10] mov [rax+8], rcx mov [rbp+var_14], 45h ; 'E' jmp loc_78370 loc_77F80: mov rax, [rbp+var_8] mov rcx, [rax+130h] mov rax, [rbp+var_10] mov [rax], rcx mov rax, [rbp+var_8] mov rcx, [rax+130h] mov rax, [rbp+var_10] mov [rax+8], rcx mov rdi, [rbp+var_8] lea rsi, asc_7DC6A; "<!--" mov edx, 4 call my_xml_parser_prefix_cmp cmp al, 0 jnz loc_78046 jmp short $+2 loc_77FC4: mov rax, [rbp+var_8] mov rax, [rax+130h] mov rcx, [rbp+var_8] cmp rax, [rcx+138h] jnb short loc_78027 mov rdi, [rbp+var_8] lea rsi, asc_7DC6F; "-->" mov edx, 3 call my_xml_parser_prefix_cmp cmp al, 0 jnz short loc_7800D mov rax, [rbp+var_8] mov rcx, [rax+130h] add rcx, 3 mov [rax+130h], rcx jmp short loc_78027 loc_7800D: jmp short $+2 loc_7800F: mov rax, [rbp+var_8] mov rcx, [rax+130h] add rcx, 1 mov [rax+130h], rcx jmp short loc_77FC4 loc_78027: mov rax, [rbp+var_8] mov rcx, [rax+130h] mov rax, [rbp+var_10] mov [rax+8], rcx mov [rbp+var_14], 43h ; 'C' jmp loc_7836E loc_78046: mov rdi, [rbp+var_8] lea rsi, aCdata; "<![CDATA[" mov edx, 9 call my_xml_parser_prefix_cmp cmp al, 0 jnz loc_7812B mov rax, [rbp+var_8] mov rcx, [rax+130h] add rcx, 9 mov [rax+130h], rcx loc_78079: mov rax, [rbp+var_8] mov rax, [rax+130h] mov rcx, [rbp+var_8] mov rcx, [rcx+138h] add rcx, 0FFFFFFFFFFFFFFFEh cmp rax, rcx jnb loc_7811F mov rax, [rbp+var_8] mov rax, [rax+130h] movsx eax, byte ptr [rax] cmp eax, 5Dh ; ']' jnz short loc_78102 mov rax, [rbp+var_8] mov rax, [rax+130h] movsx eax, byte ptr [rax+1] cmp eax, 5Dh ; ']' jnz short loc_78102 mov rax, [rbp+var_8] mov rax, [rax+130h] movsx eax, byte ptr [rax+2] cmp eax, 3Eh ; '>' jnz short loc_78102 mov rax, [rbp+var_8] mov rcx, [rax+130h] add rcx, 3 mov [rax+130h], rcx mov rax, [rbp+var_8] mov rcx, [rax+130h] mov rax, [rbp+var_10] mov [rax+8], rcx jmp short loc_7811F loc_78102: jmp short $+2 loc_78104: mov rax, [rbp+var_8] mov rcx, [rax+130h] add rcx, 1 mov [rax+130h], rcx jmp loc_78079 loc_7811F: mov [rbp+var_14], 44h ; 'D' jmp loc_7836C loc_7812B: mov rax, [rbp+var_8] mov rax, [rax+130h] movsx esi, byte ptr [rax] lea rdi, asc_7DC7D; "?=/<>!" call _strchr cmp rax, 0 jz short loc_78186 mov rax, [rbp+var_8] mov rcx, [rax+130h] add rcx, 1 mov [rax+130h], rcx mov rax, [rbp+var_8] mov rcx, [rax+130h] mov rax, [rbp+var_10] mov [rax+8], rcx mov rax, [rbp+var_10] mov rax, [rax] movsx eax, byte ptr [rax] mov [rbp+var_14], eax jmp loc_7836A loc_78186: mov rax, [rbp+var_8] mov rax, [rax+130h] movsx eax, byte ptr [rax] cmp eax, 22h ; '"' jz short loc_781B0 mov rax, [rbp+var_8] mov rax, [rax+130h] movsx eax, byte ptr [rax] cmp eax, 27h ; ''' jnz loc_78298 loc_781B0: mov rax, [rbp+var_8] mov rcx, [rax+130h] add rcx, 1 mov [rax+130h], rcx loc_781C6: mov rax, [rbp+var_8] mov rcx, [rax+130h] mov rdx, [rbp+var_8] xor eax, eax cmp rcx, [rdx+138h] mov [rbp+var_16], al jnb short loc_78203 mov rax, [rbp+var_8] mov rax, [rax+130h] movsx eax, byte ptr [rax] mov rcx, [rbp+var_10] mov rcx, [rcx] movsx ecx, byte ptr [rcx] cmp eax, ecx setnz al mov [rbp+var_16], al loc_78203: mov al, [rbp+var_16] test al, 1 jnz short loc_7820C jmp short loc_78226 loc_7820C: jmp short $+2 loc_7820E: mov rax, [rbp+var_8] mov rcx, [rax+130h] add rcx, 1 mov [rax+130h], rcx jmp short loc_781C6 loc_78226: mov rax, [rbp+var_8] mov rcx, [rax+130h] mov rax, [rbp+var_10] mov [rax+8], rcx mov rax, [rbp+var_8] mov rax, [rax+130h] mov rcx, [rbp+var_8] cmp rax, [rcx+138h] jnb short loc_78267 mov rax, [rbp+var_8] mov rcx, [rax+130h] add rcx, 1 mov [rax+130h], rcx loc_78267: mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 1 mov [rax], rcx mov rax, [rbp+var_8] mov eax, [rax] and eax, 2 cmp eax, 0 jnz short loc_7828C mov rdi, [rbp+var_10] call my_xml_norm_text loc_7828C: mov [rbp+var_14], 53h ; 'S' jmp loc_78368 loc_78298: mov rax, [rbp+var_8] mov rax, [rax+130h] movzx eax, byte ptr [rax] mov ecx, eax lea rax, my_xml_ctype movsx eax, byte ptr [rax+rcx] and eax, 1 cmp eax, 0 jz loc_7835F mov rax, [rbp+var_8] mov rcx, [rax+130h] add rcx, 1 mov [rax+130h], rcx loc_782D5: mov rax, [rbp+var_8] mov rcx, [rax+130h] mov rdx, [rbp+var_8] xor eax, eax cmp rcx, [rdx+138h] mov [rbp+var_17], al jnb short loc_78319 mov rax, [rbp+var_8] mov rax, [rax+130h] movzx eax, byte ptr [rax] mov ecx, eax lea rax, my_xml_ctype movsx eax, byte ptr [rax+rcx] and eax, 2 cmp eax, 0 setnz al mov [rbp+var_17], al loc_78319: mov al, [rbp+var_17] test al, 1 jnz short loc_78322 jmp short loc_7833A loc_78322: mov rax, [rbp+var_8] mov rcx, [rax+130h] add rcx, 1 mov [rax+130h], rcx jmp short loc_782D5 loc_7833A: mov rax, [rbp+var_8] mov rcx, [rax+130h] mov rax, [rbp+var_10] mov [rax+8], rcx mov rdi, [rbp+var_10] call my_xml_norm_text mov [rbp+var_14], 49h ; 'I' jmp short loc_78366 loc_7835F: mov [rbp+var_14], 55h ; 'U' loc_78366: jmp short $+2 loc_78368: jmp short $+2 loc_7836A: jmp short $+2 loc_7836C: jmp short $+2 loc_7836E: jmp short $+2 loc_78370: mov eax, [rbp+var_14] add rsp, 20h pop rbp retn
long long my_xml_scan(long long a1, char **a2) { bool v3; // [rsp+9h] [rbp-17h] bool v4; // [rsp+Ah] [rbp-16h] bool v5; // [rsp+Bh] [rbp-15h] while ( 1 ) { v5 = 0; if ( *(_QWORD *)(a1 + 304) < *(_QWORD *)(a1 + 312) ) v5 = (my_xml_ctype[**(unsigned __int8 **)(a1 + 304)] & 8) != 0; if ( !v5 ) break; ++*(_QWORD *)(a1 + 304); } if ( *(_QWORD *)(a1 + 304) < *(_QWORD *)(a1 + 312) ) { *a2 = *(char **)(a1 + 304); a2[1] = *(char **)(a1 + 304); if ( (unsigned __int8)my_xml_parser_prefix_cmp(a1, "<!--", 4LL) ) { if ( (unsigned __int8)my_xml_parser_prefix_cmp(a1, "<![CDATA[", 9LL) ) { if ( strchr("?=/<>!", (unsigned int)**(char **)(a1 + 304)) ) { a2[1] = (char *)++*(_QWORD *)(a1 + 304); return (unsigned int)**a2; } else if ( **(_BYTE **)(a1 + 304) == 34 || **(_BYTE **)(a1 + 304) == 39 ) { ++*(_QWORD *)(a1 + 304); while ( 1 ) { v4 = 0; if ( *(_QWORD *)(a1 + 304) < *(_QWORD *)(a1 + 312) ) v4 = **(char **)(a1 + 304) != **a2; if ( !v4 ) break; ++*(_QWORD *)(a1 + 304); } a2[1] = *(char **)(a1 + 304); if ( *(_QWORD *)(a1 + 304) < *(_QWORD *)(a1 + 312) ) ++*(_QWORD *)(a1 + 304); ++*a2; if ( (*(_DWORD *)a1 & 2) == 0 ) my_xml_norm_text(a2); return 83; } else if ( (my_xml_ctype[**(unsigned __int8 **)(a1 + 304)] & 1) != 0 ) { ++*(_QWORD *)(a1 + 304); while ( 1 ) { v3 = 0; if ( *(_QWORD *)(a1 + 304) < *(_QWORD *)(a1 + 312) ) v3 = (my_xml_ctype[**(unsigned __int8 **)(a1 + 304)] & 2) != 0; if ( !v3 ) break; ++*(_QWORD *)(a1 + 304); } a2[1] = *(char **)(a1 + 304); my_xml_norm_text(a2); return 73; } else { return 85; } } else { for ( *(_QWORD *)(a1 + 304) += 9LL; *(_QWORD *)(a1 + 304) < (unsigned long long)(*(_QWORD *)(a1 + 312) - 2LL); ++*(_QWORD *)(a1 + 304) ) { if ( **(_BYTE **)(a1 + 304) == 93 && *(_BYTE *)(*(_QWORD *)(a1 + 304) + 1LL) == 93 && *(_BYTE *)(*(_QWORD *)(a1 + 304) + 2LL) == 62 ) { *(_QWORD *)(a1 + 304) += 3LL; a2[1] = *(char **)(a1 + 304); break; } } return 68; } } else { while ( *(_QWORD *)(a1 + 304) < *(_QWORD *)(a1 + 312) ) { if ( !(unsigned __int8)my_xml_parser_prefix_cmp(a1, "-->", 3LL) ) { *(_QWORD *)(a1 + 304) += 3LL; break; } ++*(_QWORD *)(a1 + 304); } a2[1] = *(char **)(a1 + 304); return 67; } } else { *a2 = *(char **)(a1 + 312); a2[1] = *(char **)(a1 + 312); return 69; } }
my_xml_scan: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI LAB_00177ed0: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] MOV RDX,qword ptr [RBP + -0x8] XOR EAX,EAX CMP RCX,qword ptr [RDX + 0x138] MOV byte ptr [RBP + -0x15],AL JNC 0x00177f14 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x130] MOVZX EAX,byte ptr [RAX] MOV ECX,EAX LEA RAX,[0x4856e0] MOVSX EAX,byte ptr [RAX + RCX*0x1] AND EAX,0x8 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x15],AL LAB_00177f14: MOV AL,byte ptr [RBP + -0x15] TEST AL,0x1 JNZ 0x00177f1d JMP 0x00177f37 LAB_00177f1d: JMP 0x00177f1f LAB_00177f1f: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] ADD RCX,0x1 MOV qword ptr [RAX + 0x130],RCX JMP 0x00177ed0 LAB_00177f37: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x130] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x138] JC 0x00177f80 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x138] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x138] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RBP + -0x14],0x45 JMP 0x00178370 LAB_00177f80: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x17dc6a] MOV EDX,0x4 CALL 0x00178bb0 CMP AL,0x0 JNZ 0x00178046 JMP 0x00177fc4 LAB_00177fc4: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x130] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x138] JNC 0x00178027 MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x17dc6f] MOV EDX,0x3 CALL 0x00178bb0 CMP AL,0x0 JNZ 0x0017800d MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] ADD RCX,0x3 MOV qword ptr [RAX + 0x130],RCX JMP 0x00178027 LAB_0017800d: JMP 0x0017800f LAB_0017800f: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] ADD RCX,0x1 MOV qword ptr [RAX + 0x130],RCX JMP 0x00177fc4 LAB_00178027: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RBP + -0x14],0x43 JMP 0x0017836e LAB_00178046: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x17dc73] MOV EDX,0x9 CALL 0x00178bb0 CMP AL,0x0 JNZ 0x0017812b MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] ADD RCX,0x9 MOV qword ptr [RAX + 0x130],RCX LAB_00178079: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x130] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x138] ADD RCX,-0x2 CMP RAX,RCX JNC 0x0017811f MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x130] MOVSX EAX,byte ptr [RAX] CMP EAX,0x5d JNZ 0x00178102 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x130] MOVSX EAX,byte ptr [RAX + 0x1] CMP EAX,0x5d JNZ 0x00178102 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x130] MOVSX EAX,byte ptr [RAX + 0x2] CMP EAX,0x3e JNZ 0x00178102 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] ADD RCX,0x3 MOV qword ptr [RAX + 0x130],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX JMP 0x0017811f LAB_00178102: JMP 0x00178104 LAB_00178104: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] ADD RCX,0x1 MOV qword ptr [RAX + 0x130],RCX JMP 0x00178079 LAB_0017811f: MOV dword ptr [RBP + -0x14],0x44 JMP 0x0017836c LAB_0017812b: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x130] MOVSX ESI,byte ptr [RAX] LEA RDI,[0x17dc7d] CALL 0x00124110 CMP RAX,0x0 JZ 0x00178186 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] ADD RCX,0x1 MOV qword ptr [RAX + 0x130],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOVSX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x14],EAX JMP 0x0017836a LAB_00178186: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x130] MOVSX EAX,byte ptr [RAX] CMP EAX,0x22 JZ 0x001781b0 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x130] MOVSX EAX,byte ptr [RAX] CMP EAX,0x27 JNZ 0x00178298 LAB_001781b0: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] ADD RCX,0x1 MOV qword ptr [RAX + 0x130],RCX LAB_001781c6: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] MOV RDX,qword ptr [RBP + -0x8] XOR EAX,EAX CMP RCX,qword ptr [RDX + 0x138] MOV byte ptr [RBP + -0x16],AL JNC 0x00178203 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x130] MOVSX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] MOVSX ECX,byte ptr [RCX] CMP EAX,ECX SETNZ AL MOV byte ptr [RBP + -0x16],AL LAB_00178203: MOV AL,byte ptr [RBP + -0x16] TEST AL,0x1 JNZ 0x0017820c JMP 0x00178226 LAB_0017820c: JMP 0x0017820e LAB_0017820e: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] ADD RCX,0x1 MOV qword ptr [RAX + 0x130],RCX JMP 0x001781c6 LAB_00178226: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x130] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x138] JNC 0x00178267 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] ADD RCX,0x1 MOV qword ptr [RAX + 0x130],RCX LAB_00178267: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x1 MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX] AND EAX,0x2 CMP EAX,0x0 JNZ 0x0017828c MOV RDI,qword ptr [RBP + -0x10] CALL 0x001788e0 LAB_0017828c: MOV dword ptr [RBP + -0x14],0x53 JMP 0x00178368 LAB_00178298: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x130] MOVZX EAX,byte ptr [RAX] MOV ECX,EAX LEA RAX,[0x4856e0] MOVSX EAX,byte ptr [RAX + RCX*0x1] AND EAX,0x1 CMP EAX,0x0 JZ 0x0017835f MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] ADD RCX,0x1 MOV qword ptr [RAX + 0x130],RCX LAB_001782d5: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] MOV RDX,qword ptr [RBP + -0x8] XOR EAX,EAX CMP RCX,qword ptr [RDX + 0x138] MOV byte ptr [RBP + -0x17],AL JNC 0x00178319 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x130] MOVZX EAX,byte ptr [RAX] MOV ECX,EAX LEA RAX,[0x4856e0] MOVSX EAX,byte ptr [RAX + RCX*0x1] AND EAX,0x2 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x17],AL LAB_00178319: MOV AL,byte ptr [RBP + -0x17] TEST AL,0x1 JNZ 0x00178322 JMP 0x0017833a LAB_00178322: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] ADD RCX,0x1 MOV qword ptr [RAX + 0x130],RCX JMP 0x001782d5 LAB_0017833a: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RDI,qword ptr [RBP + -0x10] CALL 0x001788e0 MOV dword ptr [RBP + -0x14],0x49 JMP 0x00178366 LAB_0017835f: MOV dword ptr [RBP + -0x14],0x55 LAB_00178366: JMP 0x00178368 LAB_00178368: JMP 0x0017836a LAB_0017836a: JMP 0x0017836c LAB_0017836c: JMP 0x0017836e LAB_0017836e: JMP 0x00178370 LAB_00178370: MOV EAX,dword ptr [RBP + -0x14] ADD RSP,0x20 POP RBP RET
int my_xml_scan(uint *param_1,long *param_2) { char cVar1; char *pcVar2; bool bVar3; int local_1c; while( true ) { bVar3 = false; if (*(ulong *)(param_1 + 0x4c) < *(ulong *)(param_1 + 0x4e)) { bVar3 = (my_xml_ctype[**(byte **)(param_1 + 0x4c)] & 8) != 0; } if (!bVar3) break; *(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1; } if (*(ulong *)(param_1 + 0x4c) < *(ulong *)(param_1 + 0x4e)) { *param_2 = *(long *)(param_1 + 0x4c); param_2[1] = *(long *)(param_1 + 0x4c); cVar1 = my_xml_parser_prefix_cmp(param_1,&DAT_0017dc6a,4); if (cVar1 == '\0') { while (*(ulong *)(param_1 + 0x4c) < *(ulong *)(param_1 + 0x4e)) { cVar1 = my_xml_parser_prefix_cmp(param_1,&DAT_0017dc6f,3); if (cVar1 == '\0') { *(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 3; break; } *(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1; } param_2[1] = *(long *)(param_1 + 0x4c); local_1c = 0x43; } else { cVar1 = my_xml_parser_prefix_cmp(param_1,"<![CDATA[",9); if (cVar1 == '\0') { *(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 9; while (*(ulong *)(param_1 + 0x4c) < *(long *)(param_1 + 0x4e) - 2U) { if (((**(char **)(param_1 + 0x4c) == ']') && (*(char *)(*(long *)(param_1 + 0x4c) + 1) == ']')) && (*(char *)(*(long *)(param_1 + 0x4c) + 2) == '>')) { *(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 3; param_2[1] = *(long *)(param_1 + 0x4c); break; } *(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1; } local_1c = 0x44; } else { pcVar2 = strchr("?=/<>!",(int)**(char **)(param_1 + 0x4c)); if (pcVar2 == (char *)0x0) { if ((**(char **)(param_1 + 0x4c) == '\"') || (**(char **)(param_1 + 0x4c) == '\'')) { *(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1; while( true ) { bVar3 = false; if (*(ulong *)(param_1 + 0x4c) < *(ulong *)(param_1 + 0x4e)) { bVar3 = **(char **)(param_1 + 0x4c) != *(char *)*param_2; } if (!bVar3) break; *(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1; } param_2[1] = *(long *)(param_1 + 0x4c); if (*(ulong *)(param_1 + 0x4c) < *(ulong *)(param_1 + 0x4e)) { *(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1; } *param_2 = *param_2 + 1; if ((*param_1 & 2) == 0) { my_xml_norm_text(param_2); } local_1c = 0x53; } else if ((my_xml_ctype[**(byte **)(param_1 + 0x4c)] & 1) == 0) { local_1c = 0x55; } else { *(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1; while( true ) { bVar3 = false; if (*(ulong *)(param_1 + 0x4c) < *(ulong *)(param_1 + 0x4e)) { bVar3 = (my_xml_ctype[**(byte **)(param_1 + 0x4c)] & 2) != 0; } if (!bVar3) break; *(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1; } param_2[1] = *(long *)(param_1 + 0x4c); my_xml_norm_text(param_2); local_1c = 0x49; } } else { *(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1; param_2[1] = *(long *)(param_1 + 0x4c); local_1c = (int)*(char *)*param_2; } } } } else { *param_2 = *(long *)(param_1 + 0x4e); param_2[1] = *(long *)(param_1 + 0x4e); local_1c = 0x45; } return local_1c; }
47,553
MakeDirectory
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c
int MakeDirectory(const char *dirPath) { if ((dirPath == NULL) || (dirPath[0] == '\0')) return 1; // Path is not valid if (DirectoryExists(dirPath)) return 0; // Path already exists (is valid) // Copy path string to avoid modifying original int len = (int)strlen(dirPath) + 1; char *pathcpy = (char *)RL_CALLOC(len, 1); memcpy(pathcpy, dirPath, len); // Iterate over pathcpy, create each subdirectory as needed for (int i = 0; (i < len) && (pathcpy[i] != '\0'); i++) { if (pathcpy[i] == ':') i++; else { if ((pathcpy[i] == '\\') || (pathcpy[i] == '/')) { pathcpy[i] = '\0'; if (!DirectoryExists(pathcpy)) MKDIR(pathcpy); pathcpy[i] = '/'; } } } // Create final directory if (!DirectoryExists(pathcpy)) MKDIR(pathcpy); RL_FREE(pathcpy); return 0; }
O1
c
MakeDirectory: movl $0x1, %eax testq %rdi, %rdi je 0x7a93a pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r15 cmpb $0x0, (%rdi) je 0x7a92f movq %r15, %rdi callq 0x9810 testq %rax, %rax je 0x7a868 movq %rax, %rdi callq 0x9900 jmp 0x7a92d movq %r15, %rdi callq 0x9230 movq %rax, %r14 incl %eax movslq %eax, %r12 movl $0x1, %esi movq %r12, %rdi callq 0x9330 movq %rax, %rbx movq %rax, %rdi movq %r15, %rsi movq %r12, %rdx callq 0x9410 testl %r14d, %r14d js 0x7a901 xorl %r15d, %r15d movslq %r15d, %r12 movzbl (%rbx,%r12), %eax cmpl $0x39, %eax jle 0x7a8b7 cmpl $0x3a, %eax je 0x7a8d8 cmpl $0x5c, %eax je 0x7a8bc jmp 0x7a8ef cmpl $0x2f, %eax jne 0x7a8fd movb $0x0, (%rbx,%r12) movq %rbx, %rdi callq 0x9810 testq %rax, %rax je 0x7a8dd movq %rax, %rdi callq 0x9900 jmp 0x7a8ea incl %r15d jmp 0x7a8ef movq %rbx, %rdi movl $0x1ff, %esi # imm = 0x1FF callq 0x9250 movb $0x2f, (%rbx,%r12) leal 0x1(%r15), %eax cmpl %r14d, %r15d movl %eax, %r15d jl 0x7a89e jmp 0x7a901 testl %eax, %eax jne 0x7a8ef movq %rbx, %rdi callq 0x9810 testq %rax, %rax je 0x7a918 movq %rax, %rdi callq 0x9900 jmp 0x7a925 movq %rbx, %rdi movl $0x1ff, %esi # imm = 0x1FF callq 0x9250 movq %rbx, %rdi callq 0x9650 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
MakeDirectory: mov eax, 1 test rdi, rdi jz locret_7A93A push r15 push r14 push r12 push rbx push rax mov r15, rdi cmp byte ptr [rdi], 0 jz loc_7A92F mov rdi, r15 call _opendir test rax, rax jz short loc_7A868 mov rdi, rax call _closedir jmp loc_7A92D loc_7A868: mov rdi, r15 call _strlen mov r14, rax inc eax movsxd r12, eax mov esi, 1 mov rdi, r12 call _calloc mov rbx, rax mov rdi, rax mov rsi, r15 mov rdx, r12 call _memcpy test r14d, r14d js short loc_7A901 xor r15d, r15d loc_7A89E: movsxd r12, r15d movzx eax, byte ptr [rbx+r12] cmp eax, 39h ; '9' jle short loc_7A8B7 cmp eax, 3Ah ; ':' jz short loc_7A8D8 cmp eax, 5Ch ; '\' jz short loc_7A8BC jmp short loc_7A8EF loc_7A8B7: cmp eax, 2Fh ; '/' jnz short loc_7A8FD loc_7A8BC: mov byte ptr [rbx+r12], 0 mov rdi, rbx call _opendir test rax, rax jz short loc_7A8DD mov rdi, rax call _closedir jmp short loc_7A8EA loc_7A8D8: inc r15d jmp short loc_7A8EF loc_7A8DD: mov rdi, rbx mov esi, 1FFh call _mkdir loc_7A8EA: mov byte ptr [rbx+r12], 2Fh ; '/' loc_7A8EF: lea eax, [r15+1] cmp r15d, r14d mov r15d, eax jl short loc_7A89E jmp short loc_7A901 loc_7A8FD: test eax, eax jnz short loc_7A8EF loc_7A901: mov rdi, rbx call _opendir test rax, rax jz short loc_7A918 mov rdi, rax call _closedir jmp short loc_7A925 loc_7A918: mov rdi, rbx mov esi, 1FFh call _mkdir loc_7A925: mov rdi, rbx call _free loc_7A92D: xor eax, eax loc_7A92F: add rsp, 8 pop rbx pop r12 pop r14 pop r15 locret_7A93A: retn
long long MakeDirectory(_BYTE *a1) { long long result; // rax long long v2; // rax int v3; // r14d long long v4; // rbx int v5; // r15d unsigned int v6; // eax long long v7; // rax long long v9; // rax result = 1LL; if ( a1 && *a1 ) { v2 = opendir(a1); if ( v2 ) { closedir(v2); return 0LL; } v3 = strlen(a1); v4 = calloc(v3 + 1, 1LL); memcpy(v4); if ( v3 < 0 ) { LABEL_20: v9 = opendir(v4); if ( v9 ) closedir(v9); else mkdir(v4, 511LL); free(v4); return 0LL; } v5 = 0; while ( 1 ) { v6 = *(unsigned __int8 *)(v4 + v5); if ( v6 <= 0x39 ) { if ( v6 == 47 ) { LABEL_12: *(_BYTE *)(v4 + v5) = 0; v7 = opendir(v4); if ( v7 ) closedir(v7); else mkdir(v4, 511LL); *(_BYTE *)(v4 + v5) = 47; goto LABEL_17; } if ( !*(_BYTE *)(v4 + v5) ) goto LABEL_20; } else if ( v6 == 58 ) { ++v5; } else if ( v6 == 92 ) { goto LABEL_12; } LABEL_17: if ( v5++ >= v3 ) goto LABEL_20; } } return result; }
MakeDirectory: MOV EAX,0x1 TEST RDI,RDI JZ 0x0017a93a PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R15,RDI CMP byte ptr [RDI],0x0 JZ 0x0017a92f MOV RDI,R15 CALL 0x00109810 TEST RAX,RAX JZ 0x0017a868 MOV RDI,RAX CALL 0x00109900 JMP 0x0017a92d LAB_0017a868: MOV RDI,R15 CALL 0x00109230 MOV R14,RAX INC EAX MOVSXD R12,EAX MOV ESI,0x1 MOV RDI,R12 CALL 0x00109330 MOV RBX,RAX MOV RDI,RAX MOV RSI,R15 MOV RDX,R12 CALL 0x00109410 TEST R14D,R14D JS 0x0017a901 XOR R15D,R15D LAB_0017a89e: MOVSXD R12,R15D MOVZX EAX,byte ptr [RBX + R12*0x1] CMP EAX,0x39 JLE 0x0017a8b7 CMP EAX,0x3a JZ 0x0017a8d8 CMP EAX,0x5c JZ 0x0017a8bc JMP 0x0017a8ef LAB_0017a8b7: CMP EAX,0x2f JNZ 0x0017a8fd LAB_0017a8bc: MOV byte ptr [RBX + R12*0x1],0x0 MOV RDI,RBX CALL 0x00109810 TEST RAX,RAX JZ 0x0017a8dd MOV RDI,RAX CALL 0x00109900 JMP 0x0017a8ea LAB_0017a8d8: INC R15D JMP 0x0017a8ef LAB_0017a8dd: MOV RDI,RBX MOV ESI,0x1ff CALL 0x00109250 LAB_0017a8ea: MOV byte ptr [RBX + R12*0x1],0x2f LAB_0017a8ef: LEA EAX,[R15 + 0x1] CMP R15D,R14D MOV R15D,EAX JL 0x0017a89e JMP 0x0017a901 LAB_0017a8fd: TEST EAX,EAX JNZ 0x0017a8ef LAB_0017a901: MOV RDI,RBX CALL 0x00109810 TEST RAX,RAX JZ 0x0017a918 MOV RDI,RAX CALL 0x00109900 JMP 0x0017a925 LAB_0017a918: MOV RDI,RBX MOV ESI,0x1ff CALL 0x00109250 LAB_0017a925: MOV RDI,RBX CALL 0x00109650 LAB_0017a92d: XOR EAX,EAX LAB_0017a92f: ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 LAB_0017a93a: RET
int8 MakeDirectory(char *param_1) { byte bVar1; int iVar2; int8 uVar3; DIR *pDVar4; size_t sVar5; char *__name; int iVar6; int iVar7; uVar3 = 1; if ((param_1 != (char *)0x0) && (*param_1 != '\0')) { pDVar4 = opendir(param_1); if (pDVar4 == (DIR *)0x0) { sVar5 = strlen(param_1); iVar2 = (int)sVar5; __name = (char *)calloc((long)(iVar2 + 1),1); memcpy(__name,param_1,(long)(iVar2 + 1)); if (-1 < iVar2) { iVar6 = 0; do { bVar1 = __name[iVar6]; iVar7 = iVar6; if (bVar1 < 0x3a) { if (bVar1 == 0x2f) { LAB_0017a8bc: __name[iVar6] = '\0'; pDVar4 = opendir(__name); if (pDVar4 == (DIR *)0x0) { mkdir(__name,0x1ff); } else { closedir(pDVar4); } __name[iVar6] = '/'; } else if (bVar1 == 0) break; } else if (bVar1 == 0x3a) { iVar7 = iVar6 + 1; } else if (bVar1 == 0x5c) goto LAB_0017a8bc; iVar6 = iVar7 + 1; } while (iVar7 < iVar2); } pDVar4 = opendir(__name); if (pDVar4 == (DIR *)0x0) { mkdir(__name,0x1ff); } else { closedir(pDVar4); } free(__name); } else { closedir(pDVar4); } uVar3 = 0; } return uVar3; }
47,554
MakeDirectory
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c
int MakeDirectory(const char *dirPath) { if ((dirPath == NULL) || (dirPath[0] == '\0')) return 1; // Path is not valid if (DirectoryExists(dirPath)) return 0; // Path already exists (is valid) // Copy path string to avoid modifying original int len = (int)strlen(dirPath) + 1; char *pathcpy = (char *)RL_CALLOC(len, 1); memcpy(pathcpy, dirPath, len); // Iterate over pathcpy, create each subdirectory as needed for (int i = 0; (i < len) && (pathcpy[i] != '\0'); i++) { if (pathcpy[i] == ':') i++; else { if ((pathcpy[i] == '\\') || (pathcpy[i] == '/')) { pathcpy[i] = '\0'; if (!DirectoryExists(pathcpy)) MKDIR(pathcpy); pathcpy[i] = '/'; } } } // Create final directory if (!DirectoryExists(pathcpy)) MKDIR(pathcpy); RL_FREE(pathcpy); return 0; }
O3
c
MakeDirectory: movl $0x1, %eax testq %rdi, %rdi je 0x76527 pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r15 cmpb $0x0, (%rdi) je 0x7651c movq %r15, %rdi callq 0xa810 testq %rax, %rax je 0x76455 movq %rax, %rdi callq 0xa900 jmp 0x7651a movq %r15, %rdi callq 0xa230 movq %rax, %r14 incl %eax movslq %eax, %r12 movl $0x1, %esi movq %r12, %rdi callq 0xa330 movq %rax, %rbx movq %rax, %rdi movq %r15, %rsi movq %r12, %rdx callq 0xa410 testl %r14d, %r14d js 0x764ee xorl %r15d, %r15d movslq %r15d, %r12 movzbl (%rbx,%r12), %eax cmpl $0x39, %eax jle 0x764a4 cmpl $0x3a, %eax je 0x764c5 cmpl $0x5c, %eax je 0x764a9 jmp 0x764dc cmpl $0x2f, %eax jne 0x764ea movb $0x0, (%rbx,%r12) movq %rbx, %rdi callq 0xa810 testq %rax, %rax je 0x764ca movq %rax, %rdi callq 0xa900 jmp 0x764d7 incl %r15d jmp 0x764dc movq %rbx, %rdi movl $0x1ff, %esi # imm = 0x1FF callq 0xa250 movb $0x2f, (%rbx,%r12) leal 0x1(%r15), %eax cmpl %r14d, %r15d movl %eax, %r15d jl 0x7648b jmp 0x764ee testl %eax, %eax jne 0x764dc movq %rbx, %rdi callq 0xa810 testq %rax, %rax je 0x76505 movq %rax, %rdi callq 0xa900 jmp 0x76512 movq %rbx, %rdi movl $0x1ff, %esi # imm = 0x1FF callq 0xa250 movq %rbx, %rdi callq 0xa650 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
MakeDirectory: mov eax, 1 test rdi, rdi jz locret_76527 push r15 push r14 push r12 push rbx push rax mov r15, rdi cmp byte ptr [rdi], 0 jz loc_7651C mov rdi, r15 call _opendir test rax, rax jz short loc_76455 mov rdi, rax call _closedir jmp loc_7651A loc_76455: mov rdi, r15 call _strlen mov r14, rax inc eax movsxd r12, eax mov esi, 1 mov rdi, r12 call _calloc mov rbx, rax mov rdi, rax mov rsi, r15 mov rdx, r12 call _memcpy test r14d, r14d js short loc_764EE xor r15d, r15d loc_7648B: movsxd r12, r15d movzx eax, byte ptr [rbx+r12] cmp eax, 39h ; '9' jle short loc_764A4 cmp eax, 3Ah ; ':' jz short loc_764C5 cmp eax, 5Ch ; '\' jz short loc_764A9 jmp short loc_764DC loc_764A4: cmp eax, 2Fh ; '/' jnz short loc_764EA loc_764A9: mov byte ptr [rbx+r12], 0 mov rdi, rbx call _opendir test rax, rax jz short loc_764CA mov rdi, rax call _closedir jmp short loc_764D7 loc_764C5: inc r15d jmp short loc_764DC loc_764CA: mov rdi, rbx mov esi, 1FFh call _mkdir loc_764D7: mov byte ptr [rbx+r12], 2Fh ; '/' loc_764DC: lea eax, [r15+1] cmp r15d, r14d mov r15d, eax jl short loc_7648B jmp short loc_764EE loc_764EA: test eax, eax jnz short loc_764DC loc_764EE: mov rdi, rbx call _opendir test rax, rax jz short loc_76505 mov rdi, rax call _closedir jmp short loc_76512 loc_76505: mov rdi, rbx mov esi, 1FFh call _mkdir loc_76512: mov rdi, rbx call _free loc_7651A: xor eax, eax loc_7651C: add rsp, 8 pop rbx pop r12 pop r14 pop r15 locret_76527: retn
long long MakeDirectory(_BYTE *a1) { long long result; // rax long long v2; // rax int v3; // r14d long long v4; // rbx int v5; // r15d unsigned int v6; // eax long long v7; // rax long long v9; // rax result = 1LL; if ( a1 && *a1 ) { v2 = opendir(a1); if ( v2 ) { closedir(v2); return 0LL; } v3 = strlen(a1); v4 = calloc(v3 + 1, 1LL); memcpy(v4); if ( v3 < 0 ) { LABEL_20: v9 = opendir(v4); if ( v9 ) closedir(v9); else mkdir(v4, 511LL); free(v4); return 0LL; } v5 = 0; while ( 1 ) { v6 = *(unsigned __int8 *)(v4 + v5); if ( v6 <= 0x39 ) { if ( v6 == 47 ) { LABEL_12: *(_BYTE *)(v4 + v5) = 0; v7 = opendir(v4); if ( v7 ) closedir(v7); else mkdir(v4, 511LL); *(_BYTE *)(v4 + v5) = 47; goto LABEL_17; } if ( !*(_BYTE *)(v4 + v5) ) goto LABEL_20; } else if ( v6 == 58 ) { ++v5; } else if ( v6 == 92 ) { goto LABEL_12; } LABEL_17: if ( v5++ >= v3 ) goto LABEL_20; } } return result; }
MakeDirectory: MOV EAX,0x1 TEST RDI,RDI JZ 0x00176527 PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R15,RDI CMP byte ptr [RDI],0x0 JZ 0x0017651c MOV RDI,R15 CALL 0x0010a810 TEST RAX,RAX JZ 0x00176455 MOV RDI,RAX CALL 0x0010a900 JMP 0x0017651a LAB_00176455: MOV RDI,R15 CALL 0x0010a230 MOV R14,RAX INC EAX MOVSXD R12,EAX MOV ESI,0x1 MOV RDI,R12 CALL 0x0010a330 MOV RBX,RAX MOV RDI,RAX MOV RSI,R15 MOV RDX,R12 CALL 0x0010a410 TEST R14D,R14D JS 0x001764ee XOR R15D,R15D LAB_0017648b: MOVSXD R12,R15D MOVZX EAX,byte ptr [RBX + R12*0x1] CMP EAX,0x39 JLE 0x001764a4 CMP EAX,0x3a JZ 0x001764c5 CMP EAX,0x5c JZ 0x001764a9 JMP 0x001764dc LAB_001764a4: CMP EAX,0x2f JNZ 0x001764ea LAB_001764a9: MOV byte ptr [RBX + R12*0x1],0x0 MOV RDI,RBX CALL 0x0010a810 TEST RAX,RAX JZ 0x001764ca MOV RDI,RAX CALL 0x0010a900 JMP 0x001764d7 LAB_001764c5: INC R15D JMP 0x001764dc LAB_001764ca: MOV RDI,RBX MOV ESI,0x1ff CALL 0x0010a250 LAB_001764d7: MOV byte ptr [RBX + R12*0x1],0x2f LAB_001764dc: LEA EAX,[R15 + 0x1] CMP R15D,R14D MOV R15D,EAX JL 0x0017648b JMP 0x001764ee LAB_001764ea: TEST EAX,EAX JNZ 0x001764dc LAB_001764ee: MOV RDI,RBX CALL 0x0010a810 TEST RAX,RAX JZ 0x00176505 MOV RDI,RAX CALL 0x0010a900 JMP 0x00176512 LAB_00176505: MOV RDI,RBX MOV ESI,0x1ff CALL 0x0010a250 LAB_00176512: MOV RDI,RBX CALL 0x0010a650 LAB_0017651a: XOR EAX,EAX LAB_0017651c: ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 LAB_00176527: RET
int8 MakeDirectory(char *param_1) { byte bVar1; int iVar2; int8 uVar3; DIR *pDVar4; size_t sVar5; char *__name; int iVar6; int iVar7; uVar3 = 1; if ((param_1 != (char *)0x0) && (*param_1 != '\0')) { pDVar4 = opendir(param_1); if (pDVar4 == (DIR *)0x0) { sVar5 = strlen(param_1); iVar2 = (int)sVar5; __name = (char *)calloc((long)(iVar2 + 1),1); memcpy(__name,param_1,(long)(iVar2 + 1)); if (-1 < iVar2) { iVar6 = 0; do { bVar1 = __name[iVar6]; iVar7 = iVar6; if (bVar1 < 0x3a) { if (bVar1 == 0x2f) { LAB_001764a9: __name[iVar6] = '\0'; pDVar4 = opendir(__name); if (pDVar4 == (DIR *)0x0) { mkdir(__name,0x1ff); } else { closedir(pDVar4); } __name[iVar6] = '/'; } else if (bVar1 == 0) break; } else if (bVar1 == 0x3a) { iVar7 = iVar6 + 1; } else if (bVar1 == 0x5c) goto LAB_001764a9; iVar6 = iVar7 + 1; } while (iVar7 < iVar2); } pDVar4 = opendir(__name); if (pDVar4 == (DIR *)0x0) { mkdir(__name,0x1ff); } else { closedir(pDVar4); } free(__name); } else { closedir(pDVar4); } uVar3 = 0; } return uVar3; }
47,555
my_wildcmp_uca_impl
eloqsql/strings/ctype-uca.c
static int my_wildcmp_uca_impl(CHARSET_INFO *cs, const char *str,const char *str_end, const char *wildstr,const char *wildend, int escape, int w_one, int w_many, int recurse_level) { int result= -1; /* Not found, using wildcards */ my_wc_t s_wc, w_wc; int scan; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; if (my_string_stack_guard && my_string_stack_guard(recurse_level)) return 1; while (wildstr != wildend) { while (1) { my_bool escaped= 0; if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, (const uchar*)wildend)) <= 0) return 1; if (w_wc == (my_wc_t) w_many) { result= 1; /* Found an anchor char */ break; } wildstr+= scan; if (w_wc == (my_wc_t) escape && wildstr < wildend) { if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, (const uchar*)wildend)) <= 0) return 1; wildstr+= scan; escaped= 1; } if ((scan= mb_wc(cs, &s_wc, (const uchar*)str, (const uchar*)str_end)) <= 0) return 1; str+= scan; if (!escaped && w_wc == (my_wc_t) w_one) { result= 1; /* Found an anchor char */ } else { if (my_uca_charcmp(cs,s_wc,w_wc)) return 1; /* No match */ } if (wildstr == wildend) return (str != str_end); /* Match if both are at end */ } if (w_wc == (my_wc_t) w_many) { /* Found w_many */ /* Remove any '%' and '_' from the wild search string */ for ( ; wildstr != wildend ; ) { if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, (const uchar*)wildend)) <= 0) return 1; if (w_wc == (my_wc_t) w_many) { wildstr+= scan; continue; } if (w_wc == (my_wc_t) w_one) { wildstr+= scan; if ((scan= mb_wc(cs, &s_wc, (const uchar*)str, (const uchar*)str_end)) <= 0) return 1; str+= scan; continue; } break; /* Not a wild character */ } if (wildstr == wildend) return 0; /* Ok if w_many is last */ if (str == str_end) return -1; if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, (const uchar*)wildend)) <= 0) return 1; wildstr+= scan; if (w_wc == (my_wc_t) escape) { if (wildstr < wildend) { if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, (const uchar*)wildend)) <= 0) return 1; wildstr+= scan; } } while (1) { /* Skip until the first character from wildstr is found */ while (str != str_end) { if ((scan= mb_wc(cs, &s_wc, (const uchar*)str, (const uchar*)str_end)) <= 0) return 1; if (!my_uca_charcmp(cs,s_wc,w_wc)) break; str+= scan; } if (str == str_end) return -1; str+= scan; result= my_wildcmp_uca_impl(cs, str, str_end, wildstr, wildend, escape, w_one, w_many, recurse_level + 1); if (result <= 0) return result; } } } return (str != str_end ? 1 : 0); }
O3
c
my_wildcmp_uca_impl: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movl %r9d, -0x54(%rbp) movq %r8, %r12 movq %rcx, %r13 movq %rdx, -0x40(%rbp) movq %rsi, -0x30(%rbp) movq %rdi, %r15 movl 0x20(%rbp), %eax movq %rax, -0x60(%rbp) movq 0xb8(%rdi), %rax movq 0x28(%rax), %r14 leaq 0x3376eb(%rip), %rax # 0x37a2c0 movq (%rax), %rax testq %rax, %rax je 0x42bef movl 0x20(%rbp), %edi callq *%rax movl $0x1, %ebx testl %eax, %eax jne 0x42e6c cmpq %r12, %r13 je 0x42cf0 movl 0x18(%rbp), %eax movl 0x10(%rbp), %ecx cltq movq %rax, -0x78(%rbp) movslq -0x54(%rbp), %rax movq %rax, -0x70(%rbp) movslq %ecx, %rax movq %rax, -0x68(%rbp) movq %r14, -0x48(%rbp) movq %r15, %rdi leaq -0x38(%rbp), %rsi movq %r13, %rdx movq %r12, %rcx callq *%r14 testl %eax, %eax jle 0x42e67 movq -0x38(%rbp), %rcx cmpq -0x78(%rbp), %rcx je 0x42d02 movl %eax, %eax addq %rax, %r13 cmpq -0x70(%rbp), %rcx jne 0x42c9e cmpq %r12, %r13 jae 0x42c9e movq %r15, %rdi leaq -0x38(%rbp), %rsi movq %r13, %rdx movq %r12, %rcx callq *%r14 testl %eax, %eax jle 0x42e67 movl %eax, %ebx movq %r15, %rdi leaq -0x50(%rbp), %rsi movq %r14, %rax movq -0x30(%rbp), %r14 movq %r14, %rdx movq -0x40(%rbp), %rcx callq *%rax testl %eax, %eax jle 0x42e67 movl %ebx, %ecx addq %rcx, %r13 movl %eax, %eax addq %rax, %r14 movq %r14, -0x30(%rbp) movq -0x38(%rbp), %rdx movq -0x48(%rbp), %r14 jmp 0x42cce movq %r15, %rdi leaq -0x50(%rbp), %rsi movq -0x30(%rbp), %rbx movq %rbx, %rdx movq -0x40(%rbp), %rcx callq *%r14 testl %eax, %eax jle 0x42e67 movl %eax, %eax addq %rax, %rbx movq %rbx, -0x30(%rbp) movq -0x38(%rbp), %rdx cmpq -0x68(%rbp), %rdx je 0x42ce7 movq -0x50(%rbp), %rsi movq %r15, %rdi callq 0x4768c movl $0x1, %ebx testl %eax, %eax jne 0x42e6c cmpq %r12, %r13 jne 0x42c17 xorl %ebx, %ebx movq -0x40(%rbp), %rax cmpq %rax, -0x30(%rbp) setne %bl jmp 0x42e6c xorl %ebx, %ebx cmpq %r12, %r13 je 0x42e6c movq %r15, %rdi leaq -0x38(%rbp), %rsi movq %r13, %rdx movq %r12, %rcx callq *%r14 testl %eax, %eax jle 0x42e67 movl %eax, %r14d movq -0x38(%rbp), %rax cmpq -0x78(%rbp), %rax jne 0x42d46 movl %r14d, %eax addq %rax, %r13 cmpq %r12, %r13 movq -0x48(%rbp), %r14 jne 0x42d0d jmp 0x42e6c cmpq -0x68(%rbp), %rax jne 0x42d74 movq %r15, %rdi leaq -0x50(%rbp), %rsi movq -0x30(%rbp), %rdx movq -0x40(%rbp), %rcx callq *-0x48(%rbp) testl %eax, %eax jle 0x42e67 movl %r14d, %ecx addq %rcx, %r13 movl %eax, %eax addq %rax, -0x30(%rbp) jmp 0x42d38 movq -0x40(%rbp), %rax cmpq %rax, -0x30(%rbp) je 0x42e7d leaq -0x38(%rbp), %rsi movq %r15, %rdi movq %r13, %rdx movq %r12, %rcx movq -0x48(%rbp), %r14 callq *%r14 testl %eax, %eax jle 0x42e67 movl %eax, %eax addq %rax, %r13 movq -0x70(%rbp), %rax cmpq %rax, -0x38(%rbp) jne 0x42dcf cmpq %r12, %r13 jae 0x42dcf leaq -0x38(%rbp), %rsi movq %r15, %rdi movq %r13, %rdx movq %r12, %rcx callq *%r14 testl %eax, %eax jle 0x42e67 movl %eax, %eax addq %rax, %r13 movq -0x60(%rbp), %rax incl %eax movq %rax, -0x60(%rbp) movq -0x30(%rbp), %rbx movq -0x40(%rbp), %rcx cmpq %rcx, %rbx je 0x42e7d movq %r15, %rdi leaq -0x50(%rbp), %rsi movq %rbx, %rdx callq *%r14 testl %eax, %eax jle 0x42e67 movl %eax, %r14d movq -0x50(%rbp), %rsi movq -0x38(%rbp), %rdx movq %r15, %rdi callq 0x4768c movl %r14d, %ecx addq %rcx, %rbx testl %eax, %eax je 0x42e27 movq -0x40(%rbp), %rcx cmpq %rcx, %rbx movq -0x48(%rbp), %r14 jne 0x42dea jmp 0x42e7d subq $0x8, %rsp movq %r15, %rdi movq %rbx, -0x30(%rbp) movq %rbx, %rsi movq -0x40(%rbp), %rdx movq %r13, %rcx movq %r12, %r8 movl -0x54(%rbp), %r9d pushq -0x60(%rbp) movl 0x18(%rbp), %eax pushq %rax movl 0x10(%rbp), %eax pushq %rax callq 0x42b96 addq $0x20, %rsp movl %eax, %ebx testl %eax, %eax movq -0x48(%rbp), %r14 jg 0x42dd9 jmp 0x42e6c movl $0x1, %ebx movl %ebx, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0xffffffff, %ebx # imm = 0xFFFFFFFF jmp 0x42e6c
my_wildcmp_uca_impl: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov [rbp+var_54], r9d mov r12, r8 mov r13, rcx mov [rbp+var_40], rdx mov [rbp+var_30], rsi mov r15, rdi mov eax, [rbp+arg_10] mov [rbp+var_60], rax mov rax, [rdi+0B8h] mov r14, [rax+28h] lea rax, my_string_stack_guard mov rax, [rax] test rax, rax jz short loc_42BEF mov edi, [rbp+arg_10] call rax mov ebx, 1 test eax, eax jnz loc_42E6C loc_42BEF: cmp r13, r12 jz loc_42CF0 mov eax, [rbp+arg_8] mov ecx, [rbp+arg_0] cdqe mov [rbp+var_78], rax movsxd rax, [rbp+var_54] mov [rbp+var_70], rax movsxd rax, ecx mov [rbp+var_68], rax mov [rbp+var_48], r14 loc_42C17: mov rdi, r15 lea rsi, [rbp+var_38] mov rdx, r13 mov rcx, r12 call r14 test eax, eax jle loc_42E67 mov rcx, [rbp+var_38] cmp rcx, [rbp+var_78] jz loc_42D02 mov eax, eax add r13, rax cmp rcx, [rbp+var_70] jnz short loc_42C9E cmp r13, r12 jnb short loc_42C9E mov rdi, r15 lea rsi, [rbp+var_38] mov rdx, r13 mov rcx, r12 call r14 test eax, eax jle loc_42E67 mov ebx, eax mov rdi, r15 lea rsi, [rbp+var_50] mov rax, r14 mov r14, [rbp+var_30] mov rdx, r14 mov rcx, [rbp+var_40] call rax test eax, eax jle loc_42E67 mov ecx, ebx add r13, rcx mov eax, eax add r14, rax mov [rbp+var_30], r14 mov rdx, [rbp+var_38] mov r14, [rbp+var_48] jmp short loc_42CCE loc_42C9E: mov rdi, r15 lea rsi, [rbp+var_50] mov rbx, [rbp+var_30] mov rdx, rbx mov rcx, [rbp+var_40] call r14 test eax, eax jle loc_42E67 mov eax, eax add rbx, rax mov [rbp+var_30], rbx mov rdx, [rbp+var_38] cmp rdx, [rbp+var_68] jz short loc_42CE7 loc_42CCE: mov rsi, [rbp+var_50] mov rdi, r15 call my_uca_charcmp mov ebx, 1 test eax, eax jnz loc_42E6C loc_42CE7: cmp r13, r12 jnz loc_42C17 loc_42CF0: xor ebx, ebx mov rax, [rbp+var_40] cmp [rbp+var_30], rax setnz bl jmp loc_42E6C loc_42D02: xor ebx, ebx cmp r13, r12 jz loc_42E6C loc_42D0D: mov rdi, r15 lea rsi, [rbp+var_38] mov rdx, r13 mov rcx, r12 call r14 test eax, eax jle loc_42E67 mov r14d, eax mov rax, [rbp+var_38] cmp rax, [rbp+var_78] jnz short loc_42D46 mov eax, r14d add r13, rax loc_42D38: cmp r13, r12 mov r14, [rbp+var_48] jnz short loc_42D0D jmp loc_42E6C loc_42D46: cmp rax, [rbp+var_68] jnz short loc_42D74 mov rdi, r15 lea rsi, [rbp+var_50] mov rdx, [rbp+var_30] mov rcx, [rbp+var_40] call [rbp+var_48] test eax, eax jle loc_42E67 mov ecx, r14d add r13, rcx mov eax, eax add [rbp+var_30], rax jmp short loc_42D38 loc_42D74: mov rax, [rbp+var_40] cmp [rbp+var_30], rax jz loc_42E7D lea rsi, [rbp+var_38] mov rdi, r15 mov rdx, r13 mov rcx, r12 mov r14, [rbp+var_48] call r14 test eax, eax jle loc_42E67 mov eax, eax add r13, rax mov rax, [rbp+var_70] cmp [rbp+var_38], rax jnz short loc_42DCF cmp r13, r12 jnb short loc_42DCF lea rsi, [rbp+var_38] mov rdi, r15 mov rdx, r13 mov rcx, r12 call r14 test eax, eax jle loc_42E67 mov eax, eax add r13, rax loc_42DCF: mov rax, [rbp+var_60] inc eax mov [rbp+var_60], rax loc_42DD9: mov rbx, [rbp+var_30] mov rcx, [rbp+var_40] cmp rbx, rcx jz loc_42E7D loc_42DEA: mov rdi, r15 lea rsi, [rbp+var_50] mov rdx, rbx call r14 test eax, eax jle short loc_42E67 mov r14d, eax mov rsi, [rbp+var_50] mov rdx, [rbp+var_38] mov rdi, r15 call my_uca_charcmp mov ecx, r14d add rbx, rcx test eax, eax jz short loc_42E27 mov rcx, [rbp+var_40] cmp rbx, rcx mov r14, [rbp+var_48] jnz short loc_42DEA jmp short loc_42E7D loc_42E27: sub rsp, 8 mov rdi, r15 mov [rbp+var_30], rbx mov rsi, rbx mov rdx, [rbp+var_40] mov rcx, r13 mov r8, r12 mov r9d, [rbp+var_54] push [rbp+var_60] mov eax, [rbp+arg_8] push rax mov eax, [rbp+arg_0] push rax call my_wildcmp_uca_impl add rsp, 20h mov ebx, eax test eax, eax mov r14, [rbp+var_48] jg loc_42DD9 jmp short loc_42E6C loc_42E67: mov ebx, 1 loc_42E6C: mov eax, ebx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_42E7D: mov ebx, 0FFFFFFFFh jmp short loc_42E6C
long long my_wildcmp_uca_impl( long long a1, long long a2, long long a3, unsigned long long a4, unsigned long long a5, int a6, int a7, int a8, unsigned int a9) { long long ( *v11)(long long, long long *, unsigned long long, unsigned long long); // r14 unsigned int v12; // ebx int v13; // eax int v14; // eax unsigned int v15; // ebx long long ( *v16)(long long, long long *, long long, long long); // rax long long v17; // r14 int v18; // eax long long v19; // rdx long long v20; // rbx int v21; // eax int v22; // eax unsigned int v23; // r14d int v24; // eax long long ( *v25)(long long, long long *, unsigned long long, unsigned long long); // r14 int v26; // eax unsigned long long v27; // r13 int v28; // eax long long v29; // rbx int v30; // eax long long v33; // [rsp+30h] [rbp-50h] BYREF long long ( *v34)(long long, long long *, unsigned long long, unsigned long long); // [rsp+38h] [rbp-48h] long long v35; // [rsp+40h] [rbp-40h] long long v36; // [rsp+48h] [rbp-38h] BYREF long long v37; // [rsp+50h] [rbp-30h] v35 = a3; v37 = a2; v11 = *(long long ( **)(long long, long long *, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 40LL); if ( !my_string_stack_guard || (v12 = 1, !(unsigned int)my_string_stack_guard(a9)) ) { if ( a4 != a5 ) { v34 = v11; while ( 1 ) { v13 = v11(a1, &v36, a4, a5); if ( v13 <= 0 ) return 1; if ( v36 == a8 ) { v12 = 0; if ( a4 == a5 ) return v12; while ( 1 ) { v22 = v11(a1, &v36, a4, a5); if ( v22 <= 0 ) return 1; v23 = v22; if ( v36 == a8 ) { a4 += (unsigned int)v22; } else { if ( v36 != a7 ) { if ( v37 == v35 ) return (unsigned int)-1; v25 = v34; v26 = v34(a1, &v36, a4, a5); if ( v26 <= 0 ) return 1; v27 = (unsigned int)v26 + a4; if ( v36 == a6 && v27 < a5 ) { v28 = v25(a1, &v36, v27, a5); if ( v28 <= 0 ) return 1; LODWORD(v27) = v28 + v27; } LABEL_32: v29 = v37; if ( v37 == v35 ) return (unsigned int)-1; while ( 1 ) { v30 = ((long long ( *)(long long, long long *, long long))v25)(a1, &v33, v29); if ( v30 <= 0 ) return 1; v29 += (unsigned int)v30; if ( !(unsigned int)my_uca_charcmp(a1, v33, v36) ) { v37 = v29; v12 = my_wildcmp_uca_impl(a1, v29, v35, v27, a5, a6, a7, a8, a9 + 1); v25 = v34; if ( (int)v12 > 0 ) goto LABEL_32; return v12; } v25 = v34; if ( v29 == v35 ) return (unsigned int)-1; } } v24 = v34(a1, &v33, v37, v35); if ( v24 <= 0 ) return 1; a4 += v23; v37 += (unsigned int)v24; } v11 = v34; if ( a4 == a5 ) return v12; } } a4 += (unsigned int)v13; if ( v36 == a6 && a4 < a5 ) break; v20 = v37; v21 = v11(a1, &v33, v37, v35); if ( v21 <= 0 ) return 1; v37 = (unsigned int)v21 + v20; v19 = v36; if ( v36 != a7 ) goto LABEL_14; LABEL_15: if ( a4 == a5 ) return v37 != v35; } v14 = v11(a1, &v36, a4, a5); if ( v14 <= 0 ) return 1; v15 = v14; v16 = (long long ( *)(long long, long long *, long long, long long))v11; v17 = v37; v18 = v16(a1, &v33, v37, v35); if ( v18 <= 0 ) return 1; a4 += v15; v37 = (unsigned int)v18 + v17; v19 = v36; v11 = v34; LABEL_14: v12 = 1; if ( (unsigned int)my_uca_charcmp(a1, v33, v19) ) return v12; goto LABEL_15; } return v37 != v35; } return v12; }
my_wildcmp_uca_impl: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV dword ptr [RBP + -0x54],R9D MOV R12,R8 MOV R13,RCX MOV qword ptr [RBP + -0x40],RDX MOV qword ptr [RBP + -0x30],RSI MOV R15,RDI MOV EAX,dword ptr [RBP + 0x20] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RDI + 0xb8] MOV R14,qword ptr [RAX + 0x28] LEA RAX,[0x47a2c0] MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x00142bef MOV EDI,dword ptr [RBP + 0x20] CALL RAX MOV EBX,0x1 TEST EAX,EAX JNZ 0x00142e6c LAB_00142bef: CMP R13,R12 JZ 0x00142cf0 MOV EAX,dword ptr [RBP + 0x18] MOV ECX,dword ptr [RBP + 0x10] CDQE MOV qword ptr [RBP + -0x78],RAX MOVSXD RAX,dword ptr [RBP + -0x54] MOV qword ptr [RBP + -0x70],RAX MOVSXD RAX,ECX MOV qword ptr [RBP + -0x68],RAX MOV qword ptr [RBP + -0x48],R14 LAB_00142c17: MOV RDI,R15 LEA RSI,[RBP + -0x38] MOV RDX,R13 MOV RCX,R12 CALL R14 TEST EAX,EAX JLE 0x00142e67 MOV RCX,qword ptr [RBP + -0x38] CMP RCX,qword ptr [RBP + -0x78] JZ 0x00142d02 MOV EAX,EAX ADD R13,RAX CMP RCX,qword ptr [RBP + -0x70] JNZ 0x00142c9e CMP R13,R12 JNC 0x00142c9e MOV RDI,R15 LEA RSI,[RBP + -0x38] MOV RDX,R13 MOV RCX,R12 CALL R14 TEST EAX,EAX JLE 0x00142e67 MOV EBX,EAX MOV RDI,R15 LEA RSI,[RBP + -0x50] MOV RAX,R14 MOV R14,qword ptr [RBP + -0x30] MOV RDX,R14 MOV RCX,qword ptr [RBP + -0x40] CALL RAX TEST EAX,EAX JLE 0x00142e67 MOV ECX,EBX ADD R13,RCX MOV EAX,EAX ADD R14,RAX MOV qword ptr [RBP + -0x30],R14 MOV RDX,qword ptr [RBP + -0x38] MOV R14,qword ptr [RBP + -0x48] JMP 0x00142cce LAB_00142c9e: MOV RDI,R15 LEA RSI,[RBP + -0x50] MOV RBX,qword ptr [RBP + -0x30] MOV RDX,RBX MOV RCX,qword ptr [RBP + -0x40] CALL R14 TEST EAX,EAX JLE 0x00142e67 MOV EAX,EAX ADD RBX,RAX MOV qword ptr [RBP + -0x30],RBX MOV RDX,qword ptr [RBP + -0x38] CMP RDX,qword ptr [RBP + -0x68] JZ 0x00142ce7 LAB_00142cce: MOV RSI,qword ptr [RBP + -0x50] MOV RDI,R15 CALL 0x0014768c MOV EBX,0x1 TEST EAX,EAX JNZ 0x00142e6c LAB_00142ce7: CMP R13,R12 JNZ 0x00142c17 LAB_00142cf0: XOR EBX,EBX MOV RAX,qword ptr [RBP + -0x40] CMP qword ptr [RBP + -0x30],RAX SETNZ BL JMP 0x00142e6c LAB_00142d02: XOR EBX,EBX CMP R13,R12 JZ 0x00142e6c LAB_00142d0d: MOV RDI,R15 LEA RSI,[RBP + -0x38] MOV RDX,R13 MOV RCX,R12 CALL R14 TEST EAX,EAX JLE 0x00142e67 MOV R14D,EAX MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x78] JNZ 0x00142d46 MOV EAX,R14D ADD R13,RAX LAB_00142d38: CMP R13,R12 MOV R14,qword ptr [RBP + -0x48] JNZ 0x00142d0d JMP 0x00142e6c LAB_00142d46: CMP RAX,qword ptr [RBP + -0x68] JNZ 0x00142d74 MOV RDI,R15 LEA RSI,[RBP + -0x50] MOV RDX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x40] CALL qword ptr [RBP + -0x48] TEST EAX,EAX JLE 0x00142e67 MOV ECX,R14D ADD R13,RCX MOV EAX,EAX ADD qword ptr [RBP + -0x30],RAX JMP 0x00142d38 LAB_00142d74: MOV RAX,qword ptr [RBP + -0x40] CMP qword ptr [RBP + -0x30],RAX JZ 0x00142e7d LEA RSI,[RBP + -0x38] MOV RDI,R15 MOV RDX,R13 MOV RCX,R12 MOV R14,qword ptr [RBP + -0x48] CALL R14 TEST EAX,EAX JLE 0x00142e67 MOV EAX,EAX ADD R13,RAX MOV RAX,qword ptr [RBP + -0x70] CMP qword ptr [RBP + -0x38],RAX JNZ 0x00142dcf CMP R13,R12 JNC 0x00142dcf LEA RSI,[RBP + -0x38] MOV RDI,R15 MOV RDX,R13 MOV RCX,R12 CALL R14 TEST EAX,EAX JLE 0x00142e67 MOV EAX,EAX ADD R13,RAX LAB_00142dcf: MOV RAX,qword ptr [RBP + -0x60] INC EAX MOV qword ptr [RBP + -0x60],RAX LAB_00142dd9: MOV RBX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x40] CMP RBX,RCX JZ 0x00142e7d LAB_00142dea: MOV RDI,R15 LEA RSI,[RBP + -0x50] MOV RDX,RBX CALL R14 TEST EAX,EAX JLE 0x00142e67 MOV R14D,EAX MOV RSI,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x38] MOV RDI,R15 CALL 0x0014768c MOV ECX,R14D ADD RBX,RCX TEST EAX,EAX JZ 0x00142e27 MOV RCX,qword ptr [RBP + -0x40] CMP RBX,RCX MOV R14,qword ptr [RBP + -0x48] JNZ 0x00142dea JMP 0x00142e7d LAB_00142e27: SUB RSP,0x8 MOV RDI,R15 MOV qword ptr [RBP + -0x30],RBX MOV RSI,RBX MOV RDX,qword ptr [RBP + -0x40] MOV RCX,R13 MOV R8,R12 MOV R9D,dword ptr [RBP + -0x54] PUSH qword ptr [RBP + -0x60] MOV EAX,dword ptr [RBP + 0x18] PUSH RAX MOV EAX,dword ptr [RBP + 0x10] PUSH RAX CALL 0x00142b96 ADD RSP,0x20 MOV EBX,EAX TEST EAX,EAX MOV R14,qword ptr [RBP + -0x48] JG 0x00142dd9 JMP 0x00142e6c LAB_00142e67: MOV EBX,0x1 LAB_00142e6c: MOV EAX,EBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00142e7d: MOV EBX,0xffffffff JMP 0x00142e6c
uint my_wildcmp_uca_impl(long param_1,long param_2,long param_3,ulong param_4,ulong param_5, int param_6,int param_7,int param_8,int param_9) { int iVar1; uint uVar2; uint uVar3; long lVar4; code *pcVar5; int8 local_58; code *local_50; long local_48; long local_40; long local_38; pcVar5 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); local_48 = param_3; local_38 = param_2; if ((my_string_stack_guard != (code *)0x0) && (iVar1 = (*my_string_stack_guard)(param_9), iVar1 != 0)) { return 1; } if (param_4 != param_5) { local_50 = pcVar5; do { uVar2 = (*pcVar5)(param_1,&local_40,param_4,param_5); lVar4 = local_38; if ((int)uVar2 < 1) { return 1; } if (local_40 == param_8) { do { if (param_4 == param_5) { return 0; } uVar2 = (*pcVar5)(param_1,&local_40,param_4,param_5); pcVar5 = local_50; if ((int)uVar2 < 1) { return 1; } if (local_40 != param_8) { if (local_40 != param_7) { if (local_38 == local_48) { return 0xffffffff; } uVar2 = (*local_50)(param_1,&local_40,param_4,param_5); if (0 < (int)uVar2) { param_4 = param_4 + uVar2; if ((local_40 == param_6) && (param_4 < param_5)) { uVar2 = (*pcVar5)(param_1,&local_40,param_4,param_5); if ((int)uVar2 < 1) { return 1; } param_4 = param_4 + uVar2; } do { lVar4 = local_38; if (local_38 == local_48) { return 0xffffffff; } while( true ) { uVar2 = (*pcVar5)(param_1,&local_58,lVar4); if ((int)uVar2 < 1) { return 1; } iVar1 = my_uca_charcmp(param_1,local_58,local_40); lVar4 = lVar4 + (ulong)uVar2; if (iVar1 == 0) break; pcVar5 = local_50; if (lVar4 == local_48) { return 0xffffffff; } } local_38 = lVar4; uVar2 = my_wildcmp_uca_impl(param_1,lVar4,local_48,param_4,param_5,param_6,param_7 ,param_8,param_9 + 1); pcVar5 = local_50; if ((int)uVar2 < 1) { return uVar2; } } while( true ); } return 1; } uVar3 = (*local_50)(param_1,&local_58,local_38,local_48); if ((int)uVar3 < 1) { return 1; } local_38 = local_38 + (ulong)uVar3; } param_4 = param_4 + uVar2; pcVar5 = local_50; } while( true ); } param_4 = param_4 + uVar2; if ((local_40 == param_6) && (param_4 < param_5)) { uVar2 = (*pcVar5)(param_1,&local_40,param_4,param_5); lVar4 = local_38; if ((int)uVar2 < 1) { return 1; } uVar3 = (*pcVar5)(param_1,&local_58,local_38,local_48); if ((int)uVar3 < 1) { return 1; } param_4 = param_4 + uVar2; local_38 = lVar4 + (ulong)uVar3; pcVar5 = local_50; LAB_00142cce: iVar1 = my_uca_charcmp(param_1,local_58,local_40); if (iVar1 != 0) { return 1; } } else { uVar2 = (*pcVar5)(param_1,&local_58,local_38,local_48); if ((int)uVar2 < 1) { return 1; } local_38 = lVar4 + (ulong)uVar2; if (local_40 != param_7) goto LAB_00142cce; } } while (param_4 != param_5); } return (uint)(local_38 != local_48); }
47,556
write_hook_for_redo
eloqsql/storage/maria/ma_blockrec.c
my_bool write_hook_for_redo(enum translog_record_type type __attribute__ ((unused)), TRN *trn, MARIA_HA *tbl_info __attribute__ ((unused)), LSN *lsn, void *hook_arg __attribute__ ((unused))) { /* Users of dummy_transaction_object must keep this TRN clean as it is used by many threads (like those manipulating non-transactional tables). It might be dangerous if one user sets rec_lsn or some other member and it is picked up by another user (like putting this rec_lsn into a page of a non-transactional table); it's safer if all members stay 0. So non-transactional log records (REPAIR, CREATE, RENAME, DROP) should not call this hook; we trust them but verify ;) */ DBUG_ASSERT(trn->trid != 0); /* If the hook stays so simple, it would be faster to pass !trn->rec_lsn ? trn->rec_lsn : some_dummy_lsn to translog_write_record(), like Monty did in his original code, and not have a hook. For now we keep it like this. */ if (trn->rec_lsn == 0) trn->rec_lsn= *lsn; return 0; }
O0
c
write_hook_for_redo: pushq %rbp movq %rsp, %rbp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) jmp 0x57549 movq -0x10(%rbp), %rax cmpq $0x0, 0x90(%rax) jne 0x57569 movq -0x20(%rbp), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x90(%rax) xorl %eax, %eax popq %rbp retq nopl (%rax)
write_hook_for_redo: push rbp mov rbp, rsp mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 jmp short $+2 loc_57549: mov rax, [rbp+var_10] cmp qword ptr [rax+90h], 0 jnz short loc_57569 mov rax, [rbp+var_20] mov rcx, [rax] mov rax, [rbp+var_10] mov [rax+90h], rcx loc_57569: xor eax, eax pop rbp retn
long long write_hook_for_redo(long long a1, long long a2, long long a3, _QWORD *a4) { if ( !*(_QWORD *)(a2 + 144) ) *(_QWORD *)(a2 + 144) = *a4; return 0LL; }
write_hook_for_redo: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 JMP 0x00157549 LAB_00157549: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x90],0x0 JNZ 0x00157569 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x90],RCX LAB_00157569: XOR EAX,EAX POP RBP RET
int8 write_hook_for_redo(int8 param_1,long param_2,int8 param_3,int8 *param_4) { if (*(long *)(param_2 + 0x90) == 0) { *(int8 *)(param_2 + 0x90) = *param_4; } return 0; }
47,557
pvio_socket_keepalive
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
int pvio_socket_keepalive(MARIADB_PVIO *pvio) { int opt= 1; struct st_pvio_socket *csock= NULL; if (!pvio || !pvio->data) return 1; csock= (struct st_pvio_socket *)pvio->data; return setsockopt(csock->socket, SOL_SOCKET, SO_KEEPALIVE, #ifndef _WIN32 (const void *)&opt, sizeof(opt)); #else (char *)&opt, (int)sizeof(opt)); #endif }
O0
c
pvio_socket_keepalive: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movl $0x1, -0x14(%rbp) movq $0x0, -0x20(%rbp) cmpq $0x0, -0x10(%rbp) je 0x1a96c movq -0x10(%rbp), %rax cmpq $0x0, (%rax) jne 0x1a975 movl $0x1, -0x4(%rbp) jmp 0x1a9a2 movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movl (%rax), %edi movl $0x1, %esi movl $0x9, %edx leaq -0x14(%rbp), %rcx movl $0x4, %r8d callq 0x17a30 movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
pvio_socket_keepalive: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_14], 1 mov [rbp+var_20], 0 cmp [rbp+var_10], 0 jz short loc_1A96C mov rax, [rbp+var_10] cmp qword ptr [rax], 0 jnz short loc_1A975 loc_1A96C: mov [rbp+var_4], 1 jmp short loc_1A9A2 loc_1A975: mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_20], rax mov rax, [rbp+var_20] mov edi, [rax] mov esi, 1 mov edx, 9 lea rcx, [rbp+var_14] mov r8d, 4 call _setsockopt mov [rbp+var_4], eax loc_1A9A2: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long pvio_socket_keepalive(_QWORD *a1) { int v2; // [rsp+Ch] [rbp-14h] BYREF _QWORD *v3; // [rsp+10h] [rbp-10h] v3 = a1; v2 = 1; if ( a1 && *v3 ) return (unsigned int)setsockopt(*(unsigned int *)*v3, 1LL, 9LL, &v2, 4LL); else return 1; }
pvio_socket_keepalive: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],0x1 MOV qword ptr [RBP + -0x20],0x0 CMP qword ptr [RBP + -0x10],0x0 JZ 0x0011a96c MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX],0x0 JNZ 0x0011a975 LAB_0011a96c: MOV dword ptr [RBP + -0x4],0x1 JMP 0x0011a9a2 LAB_0011a975: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV EDI,dword ptr [RAX] MOV ESI,0x1 MOV EDX,0x9 LEA RCX,[RBP + -0x14] MOV R8D,0x4 CALL 0x00117a30 MOV dword ptr [RBP + -0x4],EAX LAB_0011a9a2: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int pvio_socket_keepalive(long *param_1) { int4 local_1c; long *local_18; int local_c; local_1c = 1; if ((param_1 == (long *)0x0) || (*param_1 == 0)) { local_c = 1; } else { local_18 = param_1; local_c = setsockopt(*(int *)*param_1,1,9,&local_1c,4); } return local_c; }
47,558
bchange
eloqsql/strings/bchange.c
void bchange(register uchar *dst, size_t old_length, register const uchar *src, size_t new_length, size_t tot_length) { size_t rest=tot_length-old_length; if (old_length < new_length) bmove_upp(dst+rest+new_length,dst+tot_length,rest); else bmove(dst+new_length,dst+old_length,rest); memcpy(dst,src,new_length); }
O3
c
bchange: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rcx, %rbx movq %rdx, %r14 movq %rdi, %r15 movq %r8, %rdx subq %rsi, %rdx cmpq %rcx, %rsi jae 0x2df56 leaq (%r15,%rdx), %rdi addq %rbx, %rdi addq %r15, %r8 movq %r8, %rsi callq 0x2df7c jmp 0x2df62 leaq (%r15,%rbx), %rdi addq %r15, %rsi callq 0x24510 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x24240 nop
bchange: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rcx mov r14, rdx mov r15, rdi mov rdx, r8 sub rdx, rsi cmp rsi, rcx jnb short loc_2DF56 lea rdi, [r15+rdx] add rdi, rbx add r8, r15 mov rsi, r8 call bmove_upp jmp short loc_2DF62 loc_2DF56: lea rdi, [r15+rbx] add rsi, r15 call _memmove loc_2DF62: mov rdi, r15 mov rsi, r14 mov rdx, rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _memcpy
long long bchange(long long a1, unsigned long long a2, long long a3, unsigned long long a4, long long a5) { long long v7; // rdx v7 = a5 - a2; if ( a2 >= a4 ) memmove(a1 + a4, a1 + a2, v7); else bmove_upp(a4 + a1 + v7, a1 + a5, v7); return memcpy(a1, a3, a4); }
bchange: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RCX MOV R14,RDX MOV R15,RDI MOV RDX,R8 SUB RDX,RSI CMP RSI,RCX JNC 0x0012df56 LEA RDI,[R15 + RDX*0x1] ADD RDI,RBX ADD R8,R15 MOV RSI,R8 CALL 0x0012df7c JMP 0x0012df62 LAB_0012df56: LEA RDI,[R15 + RBX*0x1] ADD RSI,R15 CALL 0x00124510 LAB_0012df62: MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x00124240
void bchange(void *param_1,ulong param_2,void *param_3,ulong param_4,long param_5) { if (param_2 < param_4) { bmove_upp((long)param_1 + param_4 + (param_5 - param_2),param_5 + (long)param_1); } else { memmove((void *)((long)param_1 + param_4),(void *)(param_2 + (long)param_1),param_5 - param_2); } memcpy(param_1,param_3,param_4); return; }
47,559
my_coll_parser_init
eloqsql/strings/ctype-uca.c
static void my_coll_parser_init(MY_COLL_RULE_PARSER *p, MY_COLL_RULES *rules, const char *str, const char *str_end) { /* Initialize parser to the input buffer and scan two tokens, to make the current token and the next token known. */ memset(p, 0, sizeof(*p)); p->rules= rules; p->errstr[0]= '\0'; my_coll_lexem_init(my_coll_parser_curr(p), str, str_end); my_coll_lexem_next(my_coll_parser_curr(p)); my_coll_parser_next(p)[0]= my_coll_parser_curr(p)[0]; my_coll_lexem_next(my_coll_parser_next(p)); }
O0
c
my_coll_parser_init: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x8(%rbp), %rdi xorl %esi, %esi movl $0x178, %edx # imm = 0x178 callq 0x24190 movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0xf0(%rax) movq -0x8(%rbp), %rax movb $0x0, 0xf8(%rax) movq -0x8(%rbp), %rdi callq 0x4e7e0 movq %rax, %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x4e7f0 movq -0x8(%rbp), %rdi callq 0x4e7e0 movq %rax, %rdi callq 0x4e840 movq -0x8(%rbp), %rdi callq 0x4ec30 movq %rax, -0x28(%rbp) movq -0x8(%rbp), %rdi callq 0x4e7e0 movq -0x28(%rbp), %rdi movq %rax, %rsi movl $0x28, %edx callq 0x24230 movq -0x8(%rbp), %rdi callq 0x4ec30 movq %rax, %rdi callq 0x4e840 addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
my_coll_parser_init: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rdi, [rbp+var_8] xor esi, esi mov edx, 178h call _memset mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov [rax+0F0h], rcx mov rax, [rbp+var_8] mov byte ptr [rax+0F8h], 0 mov rdi, [rbp+var_8] call my_coll_parser_curr mov rdi, rax mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call my_coll_lexem_init mov rdi, [rbp+var_8] call my_coll_parser_curr mov rdi, rax call my_coll_lexem_next mov rdi, [rbp+var_8] call my_coll_parser_next mov [rbp+var_28], rax mov rdi, [rbp+var_8] call my_coll_parser_curr mov rdi, [rbp+var_28] mov rsi, rax mov edx, 28h ; '(' call _memcpy mov rdi, [rbp+var_8] call my_coll_parser_next mov rdi, rax call my_coll_lexem_next add rsp, 30h pop rbp retn
long long my_coll_parser_init(long long a1, long long a2, long long a3, long long a4) { long long v4; // rax long long v5; // rax long long v6; // rsi long long v7; // rax long long v9; // [rsp+8h] [rbp-28h] memset(a1, 0LL, 376LL); *(_QWORD *)(a1 + 240) = a2; *(_BYTE *)(a1 + 248) = 0; v4 = my_coll_parser_curr(a1); my_coll_lexem_init(v4, a3, a4); v5 = my_coll_parser_curr(a1); my_coll_lexem_next(v5); v9 = my_coll_parser_next(a1); v6 = my_coll_parser_curr(a1); memcpy(v9, v6, 40LL); v7 = my_coll_parser_next(a1); return my_coll_lexem_next(v7); }
my_coll_parser_init: 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 MOV qword ptr [RBP + -0x20],RCX MOV RDI,qword ptr [RBP + -0x8] XOR ESI,ESI MOV EDX,0x178 CALL 0x00124190 MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xf0],RCX MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0xf8],0x0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x0014e7e0 MOV RDI,RAX MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x0014e7f0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x0014e7e0 MOV RDI,RAX CALL 0x0014e840 MOV RDI,qword ptr [RBP + -0x8] CALL 0x0014ec30 MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x0014e7e0 MOV RDI,qword ptr [RBP + -0x28] MOV RSI,RAX MOV EDX,0x28 CALL 0x00124230 MOV RDI,qword ptr [RBP + -0x8] CALL 0x0014ec30 MOV RDI,RAX CALL 0x0014e840 ADD RSP,0x30 POP RBP RET
void my_coll_parser_init(void *param_1,int8 param_2,int8 param_3,int8 param_4) { int8 uVar1; void *__dest; void *__src; memset(param_1,0,0x178); *(int8 *)((long)param_1 + 0xf0) = param_2; *(int1 *)((long)param_1 + 0xf8) = 0; uVar1 = my_coll_parser_curr(param_1); my_coll_lexem_init(uVar1,param_3,param_4); uVar1 = my_coll_parser_curr(param_1); my_coll_lexem_next(uVar1); __dest = (void *)my_coll_parser_next(param_1); __src = (void *)my_coll_parser_curr(param_1); memcpy(__dest,__src,0x28); uVar1 = my_coll_parser_next(param_1); my_coll_lexem_next(uVar1); return; }
47,560
alaya::HNSWImpl<alaya::RawSpace<float, float, unsigned int, alaya::SequentialStorage<float, unsigned int>>, float, float, unsigned int>::search_base_layer(unsigned int, unsigned int, unsigned int)
AlayaLite/include/index/graph/hnsw/hnswlib.hpp
auto search_base_layer(InternalID enterpoint_id, ExternalID data_label, uint32_t layer) -> std::priority_queue<std::pair<DistanceType, InternalID>, std::vector<std::pair<DistanceType, InternalID>>, CompareByFirst> { // Obtain a free visited list from the pool to track visited nodes during the search. VisitedList *vl = visited_list_pool_->get_free_visited_list(); vl_type *visited_array = vl->mass_; vl_type visited_array_tag = vl->cur_v_; // Priority queues to store top candidates and the current candidate set. std::priority_queue<std::pair<DistanceType, InternalID>, std::vector<std::pair<DistanceType, InternalID>>, CompareByFirst> top_candidates; std::priority_queue<std::pair<DistanceType, InternalID>, std::vector<std::pair<DistanceType, InternalID>>, CompareByFirst> candidate_set; DistanceType lower_bound; // Variable to track the lower bound of distances. // Calculate the distance from the data point to the entry point node and initialize queues. DistanceType dist = space_->get_distance(data_label, get_external_label(enterpoint_id)); top_candidates.emplace(dist, enterpoint_id); // Add the entry point as the first candidate. lower_bound = dist; // Set the initial lower bound. candidate_set.emplace( -dist, enterpoint_id); // Add to candidate set with negative distance for max-heap behavior. // Mark the entry point as visited. visited_array[enterpoint_id] = visited_array_tag; // Main search loop to explore candidates. while (!candidate_set.empty()) { std::pair<DistanceType, InternalID> curr_el_pair = candidate_set.top(); // Get the current candidate. // Break the loop if the current candidate's distance exceeds the lower bound and we have // enough candidates. if ((-curr_el_pair.first) > lower_bound && top_candidates.size() == ef_construction_) { break; } candidate_set.pop(); // Remove the current candidate from the set. InternalID cur_node_num = curr_el_pair.second; // Get the current node's ID. // Lock the link list for the current node to ensure thread safety. std::unique_lock<std::mutex> lock(link_list_locks_[cur_node_num]); LinkListSizeType *data; // Get the link list based on the specified layer. if (layer == 0) { data = get_linklist0(cur_node_num); } else { data = get_linklist(cur_node_num, layer); } LinkListSizeType size = get_list_count( reinterpret_cast<LinkListSizeType *>(data)); // Get the size of the link list. auto *datal = reinterpret_cast<InternalID *>( data + 1); // Pointer to the candidate IDs in the link list. #ifdef USE_SSE // Prefetch data for performance optimization. _mm_prefetch(reinterpret_cast<char *>(visited_array + *(data + 1)), _MM_HINT_T0); _mm_prefetch(reinterpret_cast<char *>(visited_array + *(data + 1) + 64), _MM_HINT_T0); _mm_prefetch(get_data_by_internal_id(*datal), _MM_HINT_T0); _mm_prefetch(get_data_by_internal_id(*(datal + 1)), _MM_HINT_T0); #endif // Iterate through the candidates in the link list. for (size_t j = 0; j < size; j++) { InternalID candidate_id = *(datal + j); // Get the candidate ID. #ifdef USE_SSE if (j < size - 1) { _mm_prefetch(reinterpret_cast<char *>(visited_array + *(datal + j + 1)), _MM_HINT_T0); _mm_prefetch(get_data_by_internal_id(*(datal + j + 1)), _MM_HINT_T0); } #endif // Skip if the candidate has already been visited. if (visited_array[candidate_id] == visited_array_tag) { continue; } visited_array[candidate_id] = visited_array_tag; // Mark the candidate as visited. char *curr_obj1 = (get_data_by_internal_id(candidate_id)); // Get data for the candidate. // Calculate the distance to the current candidate. DistanceType dist1 = space_->get_distance(data_label, get_external_label(candidate_id)); // If the candidate is a better match, update the candidate sets. if (top_candidates.size() < ef_construction_ || lower_bound > dist1) { candidate_set.emplace(-dist1, candidate_id); // Add candidate to the candidate set. #ifdef USE_SSE _mm_prefetch(get_data_by_internal_id(candidate_set.top().second), _MM_HINT_T0); #endif top_candidates.emplace(dist1, candidate_id); // Add candidate to the top candidates. // Maintain the size of the top candidates. if (top_candidates.size() > ef_construction_) { top_candidates.pop(); // Remove the worst candidate if exceeding size. } // Update the lower bound based on the top candidates. if (!top_candidates.empty()) { lower_bound = top_candidates.top().first; } } } } // Release the visited list back to the pool. visited_list_pool_->release_visited_list(vl); // Return the top candidates found during the search. return top_candidates; }
O0
cpp
alaya::HNSWImpl<alaya::RawSpace<float, float, unsigned int, alaya::SequentialStorage<float, unsigned int>>, float, float, unsigned int>::search_base_layer(unsigned int, unsigned int, unsigned int): subq $0x158, %rsp # imm = 0x158 movq %rdi, 0x88(%rsp) movq %rdi, %rax movq %rax, 0x78(%rsp) movq %rdi, 0x150(%rsp) movq %rsi, 0x148(%rsp) movl %edx, 0x144(%rsp) movl %ecx, 0x140(%rsp) movl %r8d, 0x13c(%rsp) movq 0x148(%rsp), %rax movq %rax, 0x80(%rsp) movq 0x50(%rax), %rdi callq 0x337a0 movq 0x88(%rsp), %rdi movq %rax, 0x130(%rsp) movq 0x130(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x128(%rsp) movq 0x130(%rsp), %rax movw (%rax), %ax movw %ax, 0x126(%rsp) movb $0x0, 0x125(%rsp) callq 0x33880 leaq 0x100(%rsp), %rdi callq 0x33880 jmp 0x31419 movq 0x80(%rsp), %rdi addq $0xe8, %rdi callq 0x1c550 movq 0x80(%rsp), %rdi movq %rax, 0x68(%rsp) movl 0x140(%rsp), %eax movl %eax, 0x70(%rsp) movl 0x144(%rsp), %esi callq 0x2c4f0 movl %eax, 0x74(%rsp) jmp 0x31457 movl 0x74(%rsp), %edx movl 0x70(%rsp), %esi movq 0x68(%rsp), %rdi callq 0x31270 movss %xmm0, 0x64(%rsp) jmp 0x31471 movq 0x88(%rsp), %rdi movss 0x64(%rsp), %xmm0 movss %xmm0, 0xec(%rsp) leaq 0xec(%rsp), %rsi leaq 0x144(%rsp), %rdx callq 0x338b0 jmp 0x3149f movss 0xec(%rsp), %xmm0 movss %xmm0, 0xf0(%rsp) movaps 0x11bb88(%rip), %xmm1 # 0x14d040 movss 0xec(%rsp), %xmm0 pxor %xmm1, %xmm0 movss %xmm0, 0xe8(%rsp) leaq 0x100(%rsp), %rdi leaq 0xe8(%rsp), %rsi leaq 0x144(%rsp), %rdx callq 0x33910 jmp 0x314ed movw 0x126(%rsp), %dx movq 0x128(%rsp), %rax movl 0x144(%rsp), %ecx movw %dx, (%rax,%rcx,2) leaq 0x100(%rsp), %rdi callq 0x33970 movb %al, 0x63(%rsp) jmp 0x3151b movb 0x63(%rsp), %al xorb $-0x1, %al testb $0x1, %al jne 0x3152a jmp 0x31911 leaq 0x100(%rsp), %rdi callq 0x33990 movq %rax, 0x58(%rsp) jmp 0x3153e movq 0x58(%rsp), %rax movq (%rax), %rax movq %rax, 0xe0(%rsp) movss 0xe0(%rsp), %xmm0 movd %xmm0, %eax xorl $0x80000000, %eax # imm = 0x80000000 movd %eax, %xmm0 ucomiss 0xf0(%rsp), %xmm0 jbe 0x315cc movq 0x88(%rsp), %rdi callq 0x339a0 movq %rax, 0x50(%rsp) jmp 0x31582 movq 0x50(%rsp), %rax movq 0x80(%rsp), %rcx cmpq 0x30(%rcx), %rax jne 0x315cc jmp 0x31911 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf8(%rsp) movl %eax, 0xf4(%rsp) jmp 0x31976 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf8(%rsp) movl %eax, 0xf4(%rsp) jmp 0x3194d leaq 0x100(%rsp), %rdi callq 0x339b0 jmp 0x315db movq 0x80(%rsp), %rdi movl 0xe4(%rsp), %eax movl %eax, 0xdc(%rsp) subq $-0x80, %rdi movl 0xdc(%rsp), %eax movl %eax, %esi callq 0x311b0 movq %rax, %rsi leaq 0xc8(%rsp), %rdi callq 0x30f30 jmp 0x31615 cmpl $0x0, 0x13c(%rsp) jne 0x3166f movq 0x80(%rsp), %rdi movl 0xdc(%rsp), %esi callq 0x2c4c0 movq %rax, 0x48(%rsp) jmp 0x3163a movq 0x48(%rsp), %rax movq %rax, 0xc0(%rsp) jmp 0x31692 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf8(%rsp) movl %eax, 0xf4(%rsp) leaq 0xc8(%rsp), %rdi callq 0x31170 jmp 0x3194d movq 0x80(%rsp), %rdi movl 0xdc(%rsp), %esi movl 0x13c(%rsp), %edx callq 0x312d0 movq %rax, 0xc0(%rsp) movq 0x80(%rsp), %rdi movq 0xc0(%rsp), %rsi callq 0x31310 movl %eax, 0xbc(%rsp) movq 0xc0(%rsp), %rax addq $0x4, %rax movq %rax, 0xb0(%rsp) movq $0x0, 0xa8(%rsp) movq 0xa8(%rsp), %rax movl 0xbc(%rsp), %ecx cmpq %rcx, %rax jae 0x318ff movq 0xb0(%rsp), %rax movq 0xa8(%rsp), %rcx movl (%rax,%rcx,4), %eax movl %eax, 0xa4(%rsp) movq 0x128(%rsp), %rax movl 0xa4(%rsp), %ecx movzwl (%rax,%rcx,2), %eax movzwl 0x126(%rsp), %ecx cmpl %ecx, %eax jne 0x31724 jmp 0x318e6 movq 0x80(%rsp), %rdi movw 0x126(%rsp), %dx movq 0x128(%rsp), %rax movl 0xa4(%rsp), %ecx movw %dx, (%rax,%rcx,2) movl 0xa4(%rsp), %esi callq 0x33a00 movq %rax, 0x40(%rsp) jmp 0x3175a movq 0x80(%rsp), %rdi movq 0x40(%rsp), %rax movq %rax, 0x98(%rsp) addq $0xe8, %rdi callq 0x1c550 movq 0x80(%rsp), %rdi movq %rax, 0x30(%rsp) movl 0x140(%rsp), %eax movl %eax, 0x38(%rsp) movl 0xa4(%rsp), %esi callq 0x2c4f0 movl %eax, 0x3c(%rsp) jmp 0x317a5 movl 0x3c(%rsp), %edx movl 0x38(%rsp), %esi movq 0x30(%rsp), %rdi callq 0x31270 movss %xmm0, 0x2c(%rsp) jmp 0x317bf movq 0x88(%rsp), %rdi movss 0x2c(%rsp), %xmm0 movss %xmm0, 0x94(%rsp) callq 0x339a0 movq %rax, 0x20(%rsp) jmp 0x317e2 movq 0x20(%rsp), %rax movq 0x80(%rsp), %rcx cmpq 0x30(%rcx), %rax jb 0x3180c movss 0xf0(%rsp), %xmm0 ucomiss 0x94(%rsp), %xmm0 jbe 0x318e4 movaps 0x11b82d(%rip), %xmm1 # 0x14d040 movss 0x94(%rsp), %xmm0 pxor %xmm1, %xmm0 movss %xmm0, 0x90(%rsp) leaq 0x100(%rsp), %rdi leaq 0x90(%rsp), %rsi leaq 0xa4(%rsp), %rdx callq 0x33910 jmp 0x31848 movq 0x88(%rsp), %rdi leaq 0x94(%rsp), %rsi leaq 0xa4(%rsp), %rdx callq 0x338b0 jmp 0x31867 movq 0x88(%rsp), %rdi callq 0x339a0 movq %rax, 0x18(%rsp) jmp 0x3187b movq 0x18(%rsp), %rax movq 0x80(%rsp), %rcx cmpq 0x30(%rcx), %rax jbe 0x3189f movq 0x88(%rsp), %rdi callq 0x339b0 jmp 0x3189d jmp 0x3189f movq 0x88(%rsp), %rdi callq 0x33970 movb %al, 0x17(%rsp) jmp 0x318b2 movb 0x17(%rsp), %al testb $0x1, %al jne 0x318e2 jmp 0x318bc movq 0x88(%rsp), %rdi callq 0x33990 movq %rax, 0x8(%rsp) jmp 0x318d0 movq 0x8(%rsp), %rax movss (%rax), %xmm0 movss %xmm0, 0xf0(%rsp) jmp 0x318e4 jmp 0x318e6 movq 0xa8(%rsp), %rax addq $0x1, %rax movq %rax, 0xa8(%rsp) jmp 0x316ce leaq 0xc8(%rsp), %rdi callq 0x31170 jmp 0x31508 movq 0x80(%rsp), %rax movq 0x50(%rax), %rdi movq 0x130(%rsp), %rsi callq 0x33a50 jmp 0x3192c movb $0x1, 0x125(%rsp) leaq 0x100(%rsp), %rdi callq 0x320f0 testb $0x1, 0x125(%rsp) jne 0x31969 jmp 0x3195c leaq 0x100(%rsp), %rdi callq 0x320f0 jmp 0x31976 movq 0x88(%rsp), %rdi callq 0x320f0 movq 0x78(%rsp), %rax addq $0x158, %rsp # imm = 0x158 retq movq 0x88(%rsp), %rdi callq 0x320f0 movq 0xf8(%rsp), %rdi callq 0x15dd0
_ZN5alaya8HNSWImplINS_8RawSpaceIffjNS_17SequentialStorageIfjEEEEffjE17search_base_layerEjjj: sub rsp, 158h mov [rsp+158h+var_D0], rdi mov rax, rdi mov [rsp+158h+var_E0], rax mov [rsp+158h+var_8], rdi mov [rsp+158h+var_10], rsi mov [rsp+158h+var_14], edx mov [rsp+158h+var_18], ecx mov [rsp+158h+var_1C], r8d mov rax, [rsp+158h+var_10] mov [rsp+158h+var_D8], rax mov rdi, [rax+50h]; this call _ZN5alaya15VisitedListPool21get_free_visited_listEv; alaya::VisitedListPool::get_free_visited_list(void) mov rdi, [rsp+158h+var_D0] mov [rsp+158h+var_28], rax mov rax, [rsp+158h+var_28] mov rax, [rax+8] mov [rsp+158h+var_30], rax mov rax, [rsp+158h+var_28] mov ax, [rax] mov [rsp+158h+var_32], ax mov [rsp+158h+var_33], 0 call _ZNSt14priority_queueISt4pairIfjESt6vectorIS1_SaIS1_EEN5alaya8HNSWImplINS5_8RawSpaceIffjNS5_17SequentialStorageIfjEEEEffjE14CompareByFirstEEC2IS4_vEEv; std::priority_queue<std::pair<float,uint>,std::vector<std::pair<float,uint>>,alaya::HNSWImpl<alaya::RawSpace<float,float,uint,alaya::SequentialStorage<float,uint>>,float,float,uint>::CompareByFirst>::priority_queue<std::vector<std::pair<float,uint>>,void>(void) lea rdi, [rsp+158h+var_58] call _ZNSt14priority_queueISt4pairIfjESt6vectorIS1_SaIS1_EEN5alaya8HNSWImplINS5_8RawSpaceIffjNS5_17SequentialStorageIfjEEEEffjE14CompareByFirstEEC2IS4_vEEv; std::priority_queue<std::pair<float,uint>,std::vector<std::pair<float,uint>>,alaya::HNSWImpl<alaya::RawSpace<float,float,uint,alaya::SequentialStorage<float,uint>>,float,float,uint>::CompareByFirst>::priority_queue<std::vector<std::pair<float,uint>>,void>(void) jmp short $+2 loc_31419: mov rdi, [rsp+158h+var_D8] add rdi, 0E8h call _ZNKSt19__shared_ptr_accessIN5alaya8RawSpaceIffjNS0_17SequentialStorageIfjEEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<alaya::RawSpace<float,float,uint,alaya::SequentialStorage<float,uint>>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, [rsp+158h+var_D8] mov [rsp+158h+var_F0], rax mov eax, [rsp+158h+var_18] mov [rsp+158h+var_E8], eax mov esi, [rsp+158h+var_14] call _ZNK5alaya8HNSWImplINS_8RawSpaceIffjNS_17SequentialStorageIfjEEEEffjE18get_external_labelEj; alaya::HNSWImpl<alaya::RawSpace<float,float,uint,alaya::SequentialStorage<float,uint>>,float,float,uint>::get_external_label(uint) mov [rsp+158h+var_E4], eax jmp short $+2 loc_31457: mov edx, [rsp+158h+var_E4] mov esi, [rsp+158h+var_E8] mov rdi, [rsp+158h+var_F0] call _ZN5alaya8RawSpaceIffjNS_17SequentialStorageIfjEEE12get_distanceEjj; alaya::RawSpace<float,float,uint,alaya::SequentialStorage<float,uint>>::get_distance(uint,uint) movss [rsp+158h+var_F4], xmm0 jmp short $+2 loc_31471: mov rdi, [rsp+158h+var_D0] movss xmm0, [rsp+158h+var_F4] movss [rsp+158h+var_6C], xmm0 lea rsi, [rsp+158h+var_6C] lea rdx, [rsp+158h+var_14] call _ZNSt14priority_queueISt4pairIfjESt6vectorIS1_SaIS1_EEN5alaya8HNSWImplINS5_8RawSpaceIffjNS5_17SequentialStorageIfjEEEEffjE14CompareByFirstEE7emplaceIJRfRjEEEvDpOT_; std::priority_queue<std::pair<float,uint>,std::vector<std::pair<float,uint>>,alaya::HNSWImpl<alaya::RawSpace<float,float,uint,alaya::SequentialStorage<float,uint>>,float,float,uint>::CompareByFirst>::emplace<float &,uint &>(float &,uint &) jmp short $+2 loc_3149F: movss xmm0, [rsp+158h+var_6C] movss [rsp+158h+var_68], xmm0 movaps xmm1, cs:xmmword_14D040 movss xmm0, [rsp+158h+var_6C] pxor xmm0, xmm1 movss [rsp+158h+var_70], xmm0 lea rdi, [rsp+158h+var_58] lea rsi, [rsp+158h+var_70] lea rdx, [rsp+158h+var_14] call _ZNSt14priority_queueISt4pairIfjESt6vectorIS1_SaIS1_EEN5alaya8HNSWImplINS5_8RawSpaceIffjNS5_17SequentialStorageIfjEEEEffjE14CompareByFirstEE7emplaceIJfRjEEEvDpOT_; std::priority_queue<std::pair<float,uint>,std::vector<std::pair<float,uint>>,alaya::HNSWImpl<alaya::RawSpace<float,float,uint,alaya::SequentialStorage<float,uint>>,float,float,uint>::CompareByFirst>::emplace<float,uint &>(float,uint &) jmp short $+2 loc_314ED: mov dx, [rsp+158h+var_32] mov rax, [rsp+158h+var_30] mov ecx, [rsp+158h+var_14] mov [rax+rcx*2], dx loc_31508: lea rdi, [rsp+158h+var_58] call _ZNKSt14priority_queueISt4pairIfjESt6vectorIS1_SaIS1_EEN5alaya8HNSWImplINS5_8RawSpaceIffjNS5_17SequentialStorageIfjEEEEffjE14CompareByFirstEE5emptyEv; std::priority_queue<std::pair<float,uint>,std::vector<std::pair<float,uint>>,alaya::HNSWImpl<alaya::RawSpace<float,float,uint,alaya::SequentialStorage<float,uint>>,float,float,uint>::CompareByFirst>::empty(void) mov [rsp+158h+var_F5], al jmp short $+2 loc_3151B: mov al, [rsp+158h+var_F5] xor al, 0FFh test al, 1 jnz short loc_3152A jmp loc_31911 loc_3152A: lea rdi, [rsp+158h+var_58] call _ZNKSt14priority_queueISt4pairIfjESt6vectorIS1_SaIS1_EEN5alaya8HNSWImplINS5_8RawSpaceIffjNS5_17SequentialStorageIfjEEEEffjE14CompareByFirstEE3topEv; std::priority_queue<std::pair<float,uint>,std::vector<std::pair<float,uint>>,alaya::HNSWImpl<alaya::RawSpace<float,float,uint,alaya::SequentialStorage<float,uint>>,float,float,uint>::CompareByFirst>::top(void) mov [rsp+158h+var_100], rax jmp short $+2 loc_3153E: mov rax, [rsp+158h+var_100] mov rax, [rax] mov [rsp+158h+var_78], rax movss xmm0, dword ptr [rsp+158h+var_78] movd eax, xmm0 xor eax, 80000000h movd xmm0, eax ucomiss xmm0, [rsp+158h+var_68] jbe short loc_315CC mov rdi, [rsp+158h+var_D0] call _ZNKSt14priority_queueISt4pairIfjESt6vectorIS1_SaIS1_EEN5alaya8HNSWImplINS5_8RawSpaceIffjNS5_17SequentialStorageIfjEEEEffjE14CompareByFirstEE4sizeEv; std::priority_queue<std::pair<float,uint>,std::vector<std::pair<float,uint>>,alaya::HNSWImpl<alaya::RawSpace<float,float,uint,alaya::SequentialStorage<float,uint>>,float,float,uint>::CompareByFirst>::size(void) mov [rsp+158h+var_108], rax jmp short $+2 loc_31582: mov rax, [rsp+158h+var_108] mov rcx, [rsp+158h+var_D8] cmp rax, [rcx+30h] jnz short loc_315CC jmp loc_31911 mov rcx, rax mov eax, edx mov [rsp+arg_F0], rcx mov [rsp+arg_EC], eax jmp loc_31976 mov rcx, rax mov eax, edx mov [rsp+arg_F0], rcx mov [rsp+arg_EC], eax jmp loc_3194D loc_315CC: lea rdi, [rsp+158h+var_58] call _ZNSt14priority_queueISt4pairIfjESt6vectorIS1_SaIS1_EEN5alaya8HNSWImplINS5_8RawSpaceIffjNS5_17SequentialStorageIfjEEEEffjE14CompareByFirstEE3popEv; std::priority_queue<std::pair<float,uint>,std::vector<std::pair<float,uint>>,alaya::HNSWImpl<alaya::RawSpace<float,float,uint,alaya::SequentialStorage<float,uint>>,float,float,uint>::CompareByFirst>::pop(void) jmp short $+2 loc_315DB: mov rdi, [rsp+158h+var_D8] mov eax, dword ptr [rsp+158h+var_78+4] mov [rsp+158h+var_7C], eax sub rdi, 0FFFFFFFFFFFFFF80h mov eax, [rsp+158h+var_7C] mov esi, eax call _ZNSt6vectorISt5mutexSaIS0_EEixEm; std::vector<std::mutex>::operator[](ulong) mov rsi, rax lea rdi, [rsp+158h+var_90] call _ZNSt11unique_lockISt5mutexEC2ERS0_; std::unique_lock<std::mutex>::unique_lock(std::mutex&) jmp short $+2 loc_31615: cmp [rsp+158h+var_1C], 0 jnz short loc_3166F mov rdi, [rsp+158h+var_D8] mov esi, [rsp+158h+var_7C] call _ZNK5alaya8HNSWImplINS_8RawSpaceIffjNS_17SequentialStorageIfjEEEEffjE13get_linklist0Ej; alaya::HNSWImpl<alaya::RawSpace<float,float,uint,alaya::SequentialStorage<float,uint>>,float,float,uint>::get_linklist0(uint) mov [rsp+158h+var_110], rax jmp short $+2 loc_3163A: mov rax, [rsp+158h+var_110] mov [rsp+158h+var_98], rax jmp short loc_31692 mov rcx, rax mov eax, edx mov [rsp+arg_F0], rcx mov [rsp+arg_EC], eax lea rdi, [rsp+arg_C0] call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock() jmp loc_3194D loc_3166F: mov rdi, [rsp+158h+var_D8] mov esi, [rsp+158h+var_7C] mov edx, [rsp+158h+var_1C] call _ZNK5alaya8HNSWImplINS_8RawSpaceIffjNS_17SequentialStorageIfjEEEEffjE12get_linklistEji; alaya::HNSWImpl<alaya::RawSpace<float,float,uint,alaya::SequentialStorage<float,uint>>,float,float,uint>::get_linklist(uint,int) mov [rsp+158h+var_98], rax loc_31692: mov rdi, [rsp+158h+var_D8] mov rsi, [rsp+158h+var_98] call _ZNK5alaya8HNSWImplINS_8RawSpaceIffjNS_17SequentialStorageIfjEEEEffjE14get_list_countEPKj; alaya::HNSWImpl<alaya::RawSpace<float,float,uint,alaya::SequentialStorage<float,uint>>,float,float,uint>::get_list_count(uint const*) mov [rsp+158h+var_9C], eax mov rax, [rsp+158h+var_98] add rax, 4 mov [rsp+158h+var_A8], rax mov [rsp+158h+var_B0], 0 loc_316CE: mov rax, [rsp+158h+var_B0] mov ecx, [rsp+158h+var_9C] cmp rax, rcx jnb loc_318FF mov rax, [rsp+158h+var_A8] mov rcx, [rsp+158h+var_B0] mov eax, [rax+rcx*4] mov [rsp+158h+var_B4], eax mov rax, [rsp+158h+var_30] mov ecx, [rsp+158h+var_B4] movzx eax, word ptr [rax+rcx*2] movzx ecx, [rsp+158h+var_32] cmp eax, ecx jnz short loc_31724 jmp loc_318E6 loc_31724: mov rdi, [rsp+158h+var_D8] mov dx, [rsp+158h+var_32] mov rax, [rsp+158h+var_30] mov ecx, [rsp+158h+var_B4] mov [rax+rcx*2], dx mov esi, [rsp+158h+var_B4] call _ZNK5alaya8HNSWImplINS_8RawSpaceIffjNS_17SequentialStorageIfjEEEEffjE23get_data_by_internal_idEj; alaya::HNSWImpl<alaya::RawSpace<float,float,uint,alaya::SequentialStorage<float,uint>>,float,float,uint>::get_data_by_internal_id(uint) mov [rsp+158h+var_118], rax jmp short $+2 loc_3175A: mov rdi, [rsp+158h+var_D8] mov rax, [rsp+158h+var_118] mov [rsp+158h+var_C0], rax add rdi, 0E8h call _ZNKSt19__shared_ptr_accessIN5alaya8RawSpaceIffjNS0_17SequentialStorageIfjEEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<alaya::RawSpace<float,float,uint,alaya::SequentialStorage<float,uint>>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, [rsp+158h+var_D8] mov [rsp+158h+var_128], rax mov eax, [rsp+158h+var_18] mov [rsp+158h+var_120], eax mov esi, [rsp+158h+var_B4] call _ZNK5alaya8HNSWImplINS_8RawSpaceIffjNS_17SequentialStorageIfjEEEEffjE18get_external_labelEj; alaya::HNSWImpl<alaya::RawSpace<float,float,uint,alaya::SequentialStorage<float,uint>>,float,float,uint>::get_external_label(uint) mov [rsp+158h+var_11C], eax jmp short $+2 loc_317A5: mov edx, [rsp+158h+var_11C] mov esi, [rsp+158h+var_120] mov rdi, [rsp+158h+var_128] call _ZN5alaya8RawSpaceIffjNS_17SequentialStorageIfjEEE12get_distanceEjj; alaya::RawSpace<float,float,uint,alaya::SequentialStorage<float,uint>>::get_distance(uint,uint) movss [rsp+158h+var_12C], xmm0 jmp short $+2 loc_317BF: mov rdi, [rsp+158h+var_D0] movss xmm0, [rsp+158h+var_12C] movss [rsp+158h+var_C4], xmm0 call _ZNKSt14priority_queueISt4pairIfjESt6vectorIS1_SaIS1_EEN5alaya8HNSWImplINS5_8RawSpaceIffjNS5_17SequentialStorageIfjEEEEffjE14CompareByFirstEE4sizeEv; std::priority_queue<std::pair<float,uint>,std::vector<std::pair<float,uint>>,alaya::HNSWImpl<alaya::RawSpace<float,float,uint,alaya::SequentialStorage<float,uint>>,float,float,uint>::CompareByFirst>::size(void) mov [rsp+158h+var_138], rax jmp short $+2 loc_317E2: mov rax, [rsp+158h+var_138] mov rcx, [rsp+158h+var_D8] cmp rax, [rcx+30h] jb short loc_3180C movss xmm0, [rsp+158h+var_68] ucomiss xmm0, [rsp+158h+var_C4] jbe loc_318E4 loc_3180C: movaps xmm1, cs:xmmword_14D040 movss xmm0, [rsp+158h+var_C4] pxor xmm0, xmm1 movss [rsp+158h+var_C8], xmm0 lea rdi, [rsp+158h+var_58] lea rsi, [rsp+158h+var_C8] lea rdx, [rsp+158h+var_B4] call _ZNSt14priority_queueISt4pairIfjESt6vectorIS1_SaIS1_EEN5alaya8HNSWImplINS5_8RawSpaceIffjNS5_17SequentialStorageIfjEEEEffjE14CompareByFirstEE7emplaceIJfRjEEEvDpOT_; std::priority_queue<std::pair<float,uint>,std::vector<std::pair<float,uint>>,alaya::HNSWImpl<alaya::RawSpace<float,float,uint,alaya::SequentialStorage<float,uint>>,float,float,uint>::CompareByFirst>::emplace<float,uint &>(float,uint &) jmp short $+2 loc_31848: mov rdi, [rsp+158h+var_D0] lea rsi, [rsp+158h+var_C4] lea rdx, [rsp+158h+var_B4] call _ZNSt14priority_queueISt4pairIfjESt6vectorIS1_SaIS1_EEN5alaya8HNSWImplINS5_8RawSpaceIffjNS5_17SequentialStorageIfjEEEEffjE14CompareByFirstEE7emplaceIJRfRjEEEvDpOT_; std::priority_queue<std::pair<float,uint>,std::vector<std::pair<float,uint>>,alaya::HNSWImpl<alaya::RawSpace<float,float,uint,alaya::SequentialStorage<float,uint>>,float,float,uint>::CompareByFirst>::emplace<float &,uint &>(float &,uint &) jmp short $+2 loc_31867: mov rdi, [rsp+158h+var_D0] call _ZNKSt14priority_queueISt4pairIfjESt6vectorIS1_SaIS1_EEN5alaya8HNSWImplINS5_8RawSpaceIffjNS5_17SequentialStorageIfjEEEEffjE14CompareByFirstEE4sizeEv; std::priority_queue<std::pair<float,uint>,std::vector<std::pair<float,uint>>,alaya::HNSWImpl<alaya::RawSpace<float,float,uint,alaya::SequentialStorage<float,uint>>,float,float,uint>::CompareByFirst>::size(void) mov [rsp+158h+var_140], rax jmp short $+2 loc_3187B: mov rax, [rsp+158h+var_140] mov rcx, [rsp+158h+var_D8] cmp rax, [rcx+30h] jbe short loc_3189F mov rdi, [rsp+158h+var_D0] call _ZNSt14priority_queueISt4pairIfjESt6vectorIS1_SaIS1_EEN5alaya8HNSWImplINS5_8RawSpaceIffjNS5_17SequentialStorageIfjEEEEffjE14CompareByFirstEE3popEv; std::priority_queue<std::pair<float,uint>,std::vector<std::pair<float,uint>>,alaya::HNSWImpl<alaya::RawSpace<float,float,uint,alaya::SequentialStorage<float,uint>>,float,float,uint>::CompareByFirst>::pop(void) jmp short $+2 loc_3189D: jmp short $+2 loc_3189F: mov rdi, [rsp+158h+var_D0] call _ZNKSt14priority_queueISt4pairIfjESt6vectorIS1_SaIS1_EEN5alaya8HNSWImplINS5_8RawSpaceIffjNS5_17SequentialStorageIfjEEEEffjE14CompareByFirstEE5emptyEv; std::priority_queue<std::pair<float,uint>,std::vector<std::pair<float,uint>>,alaya::HNSWImpl<alaya::RawSpace<float,float,uint,alaya::SequentialStorage<float,uint>>,float,float,uint>::CompareByFirst>::empty(void) mov [rsp+158h+var_141], al jmp short $+2 loc_318B2: mov al, [rsp+158h+var_141] test al, 1 jnz short loc_318E2 jmp short $+2 loc_318BC: mov rdi, [rsp+158h+var_D0] call _ZNKSt14priority_queueISt4pairIfjESt6vectorIS1_SaIS1_EEN5alaya8HNSWImplINS5_8RawSpaceIffjNS5_17SequentialStorageIfjEEEEffjE14CompareByFirstEE3topEv; std::priority_queue<std::pair<float,uint>,std::vector<std::pair<float,uint>>,alaya::HNSWImpl<alaya::RawSpace<float,float,uint,alaya::SequentialStorage<float,uint>>,float,float,uint>::CompareByFirst>::top(void) mov [rsp+158h+var_150], rax jmp short $+2 loc_318D0: mov rax, [rsp+158h+var_150] movss xmm0, dword ptr [rax] movss [rsp+158h+var_68], xmm0 loc_318E2: jmp short $+2 loc_318E4: jmp short $+2 loc_318E6: mov rax, [rsp+158h+var_B0] add rax, 1 mov [rsp+158h+var_B0], rax jmp loc_316CE loc_318FF: lea rdi, [rsp+158h+var_90] call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock() jmp loc_31508 loc_31911: mov rax, [rsp+158h+var_D8] mov rdi, [rax+50h]; this mov rsi, [rsp+158h+var_28]; alaya::VisitedList * call _ZN5alaya15VisitedListPool20release_visited_listEPNS_11VisitedListE; alaya::VisitedListPool::release_visited_list(alaya::VisitedList *) jmp short $+2 loc_3192C: mov [rsp+158h+var_33], 1 lea rdi, [rsp+158h+var_58] call _ZNSt14priority_queueISt4pairIfjESt6vectorIS1_SaIS1_EEN5alaya8HNSWImplINS5_8RawSpaceIffjNS5_17SequentialStorageIfjEEEEffjE14CompareByFirstEED2Ev; std::priority_queue<std::pair<float,uint>,std::vector<std::pair<float,uint>>,alaya::HNSWImpl<alaya::RawSpace<float,float,uint,alaya::SequentialStorage<float,uint>>,float,float,uint>::CompareByFirst>::~priority_queue() test [rsp+158h+var_33], 1 jnz short loc_31969 jmp short loc_3195C loc_3194D: lea rdi, [rsp+arg_F8] call _ZNSt14priority_queueISt4pairIfjESt6vectorIS1_SaIS1_EEN5alaya8HNSWImplINS5_8RawSpaceIffjNS5_17SequentialStorageIfjEEEEffjE14CompareByFirstEED2Ev; std::priority_queue<std::pair<float,uint>,std::vector<std::pair<float,uint>>,alaya::HNSWImpl<alaya::RawSpace<float,float,uint,alaya::SequentialStorage<float,uint>>,float,float,uint>::CompareByFirst>::~priority_queue() jmp short loc_31976 loc_3195C: mov rdi, [rsp+158h+var_D0] call _ZNSt14priority_queueISt4pairIfjESt6vectorIS1_SaIS1_EEN5alaya8HNSWImplINS5_8RawSpaceIffjNS5_17SequentialStorageIfjEEEEffjE14CompareByFirstEED2Ev; std::priority_queue<std::pair<float,uint>,std::vector<std::pair<float,uint>>,alaya::HNSWImpl<alaya::RawSpace<float,float,uint,alaya::SequentialStorage<float,uint>>,float,float,uint>::CompareByFirst>::~priority_queue() loc_31969: mov rax, [rsp+158h+var_E0] add rsp, 158h retn loc_31976: mov rdi, [rsp+arg_80] call _ZNSt14priority_queueISt4pairIfjESt6vectorIS1_SaIS1_EEN5alaya8HNSWImplINS5_8RawSpaceIffjNS5_17SequentialStorageIfjEEEEffjE14CompareByFirstEED2Ev; std::priority_queue<std::pair<float,uint>,std::vector<std::pair<float,uint>>,alaya::HNSWImpl<alaya::RawSpace<float,float,uint,alaya::SequentialStorage<float,uint>>,float,float,uint>::CompareByFirst>::~priority_queue() mov rdi, [rsp+arg_F0] call __Unwind_Resume
long long alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned int,alaya::SequentialStorage<float,unsigned int>>,float,float,unsigned int>::search_base_layer( long long a1, long long a2, unsigned int a3, unsigned int a4, int a5, float a6) { unsigned int v6; // xmm0_4 long long v7; // rax long long v9; // [rsp+30h] [rbp-128h] unsigned int v10; // [rsp+38h] [rbp-120h] unsigned int v11; // [rsp+3Ch] [rbp-11Ch] long long v12; // [rsp+68h] [rbp-F0h] unsigned int v13; // [rsp+70h] [rbp-E8h] unsigned int external_label; // [rsp+74h] [rbp-E4h] unsigned int v15; // [rsp+90h] [rbp-C8h] BYREF float v16; // [rsp+94h] [rbp-C4h] BYREF long long data_by_internal_id; // [rsp+98h] [rbp-C0h] unsigned int v18; // [rsp+A4h] [rbp-B4h] BYREF unsigned long long i; // [rsp+A8h] [rbp-B0h] unsigned int *v20; // [rsp+B0h] [rbp-A8h] unsigned int list_count; // [rsp+BCh] [rbp-9Ch] unsigned int *linklist; // [rsp+C0h] [rbp-98h] _BYTE v23[20]; // [rsp+C8h] [rbp-90h] BYREF unsigned int v24; // [rsp+DCh] [rbp-7Ch] long long v25; // [rsp+E0h] [rbp-78h] unsigned __int32 v26; // [rsp+E8h] [rbp-70h] BYREF float v27; // [rsp+ECh] [rbp-6Ch] BYREF float v28; // [rsp+F0h] [rbp-68h] _BYTE v29[37]; // [rsp+100h] [rbp-58h] BYREF char v30; // [rsp+125h] [rbp-33h] unsigned __int16 v31; // [rsp+126h] [rbp-32h] long long v32; // [rsp+128h] [rbp-30h] alaya::VisitedList *free_visited_list; // [rsp+130h] [rbp-28h] int v34; // [rsp+13Ch] [rbp-1Ch] unsigned int v35; // [rsp+140h] [rbp-18h] unsigned int v36; // [rsp+144h] [rbp-14h] BYREF long long v37; // [rsp+148h] [rbp-10h] long long v38; // [rsp+150h] [rbp-8h] v38 = a1; v37 = a2; v36 = a3; v35 = a4; v34 = a5; free_visited_list = (alaya::VisitedList *)alaya::VisitedListPool::get_free_visited_list(*(alaya::VisitedListPool **)(a2 + 80)); v32 = *((_QWORD *)free_visited_list + 1); v31 = *(_WORD *)free_visited_list; v30 = 0; std::priority_queue<std::pair<float,unsigned int>,std::vector<std::pair<float,unsigned int>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned int,alaya::SequentialStorage<float,unsigned int>>,float,float,unsigned int>::CompareByFirst>::priority_queue<std::vector<std::pair<float,unsigned int>>,void>(a1); std::priority_queue<std::pair<float,unsigned int>,std::vector<std::pair<float,unsigned int>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned int,alaya::SequentialStorage<float,unsigned int>>,float,float,unsigned int>::CompareByFirst>::priority_queue<std::vector<std::pair<float,unsigned int>>,void>(v29); v12 = std::__shared_ptr_access<alaya::RawSpace<float,float,unsigned int,alaya::SequentialStorage<float,unsigned int>>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a2 + 232); v13 = v35; external_label = alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned int,alaya::SequentialStorage<float,unsigned int>>,float,float,unsigned int>::get_external_label( a2, v36); alaya::RawSpace<float,float,unsigned int,alaya::SequentialStorage<float,unsigned int>>::get_distance( v12, v13, external_label); v27 = a6; std::priority_queue<std::pair<float,unsigned int>,std::vector<std::pair<float,unsigned int>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned int,alaya::SequentialStorage<float,unsigned int>>,float,float,unsigned int>::CompareByFirst>::emplace<float &,unsigned int &>( a1, &v27, &v36); v28 = v27; v26 = _mm_xor_si128((__m128i)LODWORD(v27), (__m128i)xmmword_14D040).m128i_u32[0]; std::priority_queue<std::pair<float,unsigned int>,std::vector<std::pair<float,unsigned int>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned int,alaya::SequentialStorage<float,unsigned int>>,float,float,unsigned int>::CompareByFirst>::emplace<float,unsigned int &>( v29, &v26, &v36); *(_WORD *)(v32 + 2LL * v36) = v31; while ( (std::priority_queue<std::pair<float,unsigned int>,std::vector<std::pair<float,unsigned int>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned int,alaya::SequentialStorage<float,unsigned int>>,float,float,unsigned int>::CompareByFirst>::empty(v29) & 1) == 0 ) { v25 = *(_QWORD *)std::priority_queue<std::pair<float,unsigned int>,std::vector<std::pair<float,unsigned int>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned int,alaya::SequentialStorage<float,unsigned int>>,float,float,unsigned int>::CompareByFirst>::top(v29); v6 = _mm_cvtsi128_si32((__m128i)(unsigned int)v25) ^ 0x80000000; if ( *(float *)&v6 > v28 && std::priority_queue<std::pair<float,unsigned int>,std::vector<std::pair<float,unsigned int>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned int,alaya::SequentialStorage<float,unsigned int>>,float,float,unsigned int>::CompareByFirst>::size(a1) == *(_QWORD *)(a2 + 48) ) { break; } std::priority_queue<std::pair<float,unsigned int>,std::vector<std::pair<float,unsigned int>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned int,alaya::SequentialStorage<float,unsigned int>>,float,float,unsigned int>::CompareByFirst>::pop(v29); v24 = HIDWORD(v25); v7 = std::vector<std::mutex>::operator[]((_QWORD *)(a2 + 128), HIDWORD(v25)); std::unique_lock<std::mutex>::unique_lock((long long)v23, v7); if ( v34 ) linklist = (unsigned int *)alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned int,alaya::SequentialStorage<float,unsigned int>>,float,float,unsigned int>::get_linklist( a2, v24, v34); else linklist = (unsigned int *)alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned int,alaya::SequentialStorage<float,unsigned int>>,float,float,unsigned int>::get_linklist0( (_QWORD *)a2, v24); list_count = alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned int,alaya::SequentialStorage<float,unsigned int>>,float,float,unsigned int>::get_list_count( a2, linklist); v20 = linklist + 1; for ( i = 0LL; i < list_count; ++i ) { v18 = v20[i]; if ( *(unsigned __int16 *)(v32 + 2LL * v18) != v31 ) { *(_WORD *)(v32 + 2LL * v18) = v31; data_by_internal_id = alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned int,alaya::SequentialStorage<float,unsigned int>>,float,float,unsigned int>::get_data_by_internal_id( a2, v18); v9 = std::__shared_ptr_access<alaya::RawSpace<float,float,unsigned int,alaya::SequentialStorage<float,unsigned int>>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a2 + 232); v10 = v35; v11 = alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned int,alaya::SequentialStorage<float,unsigned int>>,float,float,unsigned int>::get_external_label( a2, v18); alaya::RawSpace<float,float,unsigned int,alaya::SequentialStorage<float,unsigned int>>::get_distance( v9, v10, v11); v16 = *(float *)&v6; if ( (unsigned long long)std::priority_queue<std::pair<float,unsigned int>,std::vector<std::pair<float,unsigned int>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned int,alaya::SequentialStorage<float,unsigned int>>,float,float,unsigned int>::CompareByFirst>::size(a1) < *(_QWORD *)(a2 + 48) || (*(float *)&v6 = v28, v28 > v16) ) { v6 = _mm_xor_si128((__m128i)LODWORD(v16), (__m128i)xmmword_14D040).m128i_u32[0]; v15 = v6; std::priority_queue<std::pair<float,unsigned int>,std::vector<std::pair<float,unsigned int>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned int,alaya::SequentialStorage<float,unsigned int>>,float,float,unsigned int>::CompareByFirst>::emplace<float,unsigned int &>( v29, &v15, &v18); std::priority_queue<std::pair<float,unsigned int>,std::vector<std::pair<float,unsigned int>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned int,alaya::SequentialStorage<float,unsigned int>>,float,float,unsigned int>::CompareByFirst>::emplace<float &,unsigned int &>( a1, &v16, &v18); if ( (unsigned long long)std::priority_queue<std::pair<float,unsigned int>,std::vector<std::pair<float,unsigned int>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned int,alaya::SequentialStorage<float,unsigned int>>,float,float,unsigned int>::CompareByFirst>::size(a1) > *(_QWORD *)(a2 + 48) ) std::priority_queue<std::pair<float,unsigned int>,std::vector<std::pair<float,unsigned int>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned int,alaya::SequentialStorage<float,unsigned int>>,float,float,unsigned int>::CompareByFirst>::pop(a1); if ( (std::priority_queue<std::pair<float,unsigned int>,std::vector<std::pair<float,unsigned int>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned int,alaya::SequentialStorage<float,unsigned int>>,float,float,unsigned int>::CompareByFirst>::empty(a1) & 1) == 0 ) { v6 = *(unsigned int *)std::priority_queue<std::pair<float,unsigned int>,std::vector<std::pair<float,unsigned int>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned int,alaya::SequentialStorage<float,unsigned int>>,float,float,unsigned int>::CompareByFirst>::top(a1); v28 = *(float *)&v6; } } } } std::unique_lock<std::mutex>::~unique_lock((long long)v23); } alaya::VisitedListPool::release_visited_list(*(alaya::VisitedListPool **)(a2 + 80), free_visited_list); v30 = 1; std::priority_queue<std::pair<float,unsigned int>,std::vector<std::pair<float,unsigned int>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned int,alaya::SequentialStorage<float,unsigned int>>,float,float,unsigned int>::CompareByFirst>::~priority_queue(v29); if ( (v30 & 1) == 0 ) std::priority_queue<std::pair<float,unsigned int>,std::vector<std::pair<float,unsigned int>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned int,alaya::SequentialStorage<float,unsigned int>>,float,float,unsigned int>::CompareByFirst>::~priority_queue(a1); return a1; }
search_base_layer: SUB RSP,0x158 MOV qword ptr [RSP + 0x88],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x78],RAX MOV qword ptr [RSP + 0x150],RDI MOV qword ptr [RSP + 0x148],RSI MOV dword ptr [RSP + 0x144],EDX MOV dword ptr [RSP + 0x140],ECX MOV dword ptr [RSP + 0x13c],R8D MOV RAX,qword ptr [RSP + 0x148] MOV qword ptr [RSP + 0x80],RAX MOV RDI,qword ptr [RAX + 0x50] CALL 0x001337a0 MOV RDI,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0x130],RAX MOV RAX,qword ptr [RSP + 0x130] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x128],RAX MOV RAX,qword ptr [RSP + 0x130] MOV AX,word ptr [RAX] MOV word ptr [RSP + 0x126],AX MOV byte ptr [RSP + 0x125],0x0 CALL 0x00133880 LAB_0013140a: LEA RDI,[RSP + 0x100] CALL 0x00133880 JMP 0x00131419 LAB_00131419: MOV RDI,qword ptr [RSP + 0x80] ADD RDI,0xe8 CALL 0x0011c550 MOV RDI,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x68],RAX MOV EAX,dword ptr [RSP + 0x140] MOV dword ptr [RSP + 0x70],EAX MOV ESI,dword ptr [RSP + 0x144] LAB_0013144c: CALL 0x0012c4f0 MOV dword ptr [RSP + 0x74],EAX JMP 0x00131457 LAB_00131457: MOV EDX,dword ptr [RSP + 0x74] MOV ESI,dword ptr [RSP + 0x70] MOV RDI,qword ptr [RSP + 0x68] CALL 0x00131270 MOVSS dword ptr [RSP + 0x64],XMM0 JMP 0x00131471 LAB_00131471: MOV RDI,qword ptr [RSP + 0x88] MOVSS XMM0,dword ptr [RSP + 0x64] MOVSS dword ptr [RSP + 0xec],XMM0 LEA RSI,[RSP + 0xec] LEA RDX,[RSP + 0x144] CALL 0x001338b0 JMP 0x0013149f LAB_0013149f: MOVSS XMM0,dword ptr [RSP + 0xec] MOVSS dword ptr [RSP + 0xf0],XMM0 MOVAPS XMM1,xmmword ptr [0x0024d040] MOVSS XMM0,dword ptr [RSP + 0xec] PXOR XMM0,XMM1 MOVSS dword ptr [RSP + 0xe8],XMM0 LEA RDI,[RSP + 0x100] LEA RSI,[RSP + 0xe8] LEA RDX,[RSP + 0x144] CALL 0x00133910 JMP 0x001314ed LAB_001314ed: MOV DX,word ptr [RSP + 0x126] MOV RAX,qword ptr [RSP + 0x128] MOV ECX,dword ptr [RSP + 0x144] MOV word ptr [RAX + RCX*0x2],DX LAB_00131508: LEA RDI,[RSP + 0x100] CALL 0x00133970 MOV byte ptr [RSP + 0x63],AL JMP 0x0013151b LAB_0013151b: MOV AL,byte ptr [RSP + 0x63] XOR AL,0xff TEST AL,0x1 JNZ 0x0013152a JMP 0x00131911 LAB_0013152a: LEA RDI,[RSP + 0x100] CALL 0x00133990 MOV qword ptr [RSP + 0x58],RAX JMP 0x0013153e LAB_0013153e: MOV RAX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0xe0],RAX MOVSS XMM0,dword ptr [RSP + 0xe0] MOVD EAX,XMM0 XOR EAX,0x80000000 MOVD XMM0,EAX UCOMISS XMM0,dword ptr [RSP + 0xf0] JBE 0x001315cc MOV RDI,qword ptr [RSP + 0x88] CALL 0x001339a0 MOV qword ptr [RSP + 0x50],RAX JMP 0x00131582 LAB_00131582: MOV RAX,qword ptr [RSP + 0x50] MOV RCX,qword ptr [RSP + 0x80] CMP RAX,qword ptr [RCX + 0x30] JNZ 0x001315cc JMP 0x00131911 LAB_001315cc: LEA RDI,[RSP + 0x100] CALL 0x001339b0 JMP 0x001315db LAB_001315db: MOV RDI,qword ptr [RSP + 0x80] MOV EAX,dword ptr [RSP + 0xe4] MOV dword ptr [RSP + 0xdc],EAX SUB RDI,-0x80 MOV EAX,dword ptr [RSP + 0xdc] MOV ESI,EAX CALL 0x001311b0 MOV RSI,RAX LEA RDI,[RSP + 0xc8] CALL 0x00130f30 JMP 0x00131615 LAB_00131615: CMP dword ptr [RSP + 0x13c],0x0 JNZ 0x0013166f MOV RDI,qword ptr [RSP + 0x80] MOV ESI,dword ptr [RSP + 0xdc] LAB_0013162e: CALL 0x0012c4c0 MOV qword ptr [RSP + 0x48],RAX JMP 0x0013163a LAB_0013163a: MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0xc0],RAX JMP 0x00131692 LAB_0013166f: MOV RDI,qword ptr [RSP + 0x80] MOV ESI,dword ptr [RSP + 0xdc] MOV EDX,dword ptr [RSP + 0x13c] CALL 0x001312d0 MOV qword ptr [RSP + 0xc0],RAX LAB_00131692: MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0xc0] CALL 0x00131310 MOV dword ptr [RSP + 0xbc],EAX MOV RAX,qword ptr [RSP + 0xc0] ADD RAX,0x4 MOV qword ptr [RSP + 0xb0],RAX MOV qword ptr [RSP + 0xa8],0x0 LAB_001316ce: MOV RAX,qword ptr [RSP + 0xa8] MOV ECX,dword ptr [RSP + 0xbc] CMP RAX,RCX JNC 0x001318ff MOV RAX,qword ptr [RSP + 0xb0] MOV RCX,qword ptr [RSP + 0xa8] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0xa4],EAX MOV RAX,qword ptr [RSP + 0x128] MOV ECX,dword ptr [RSP + 0xa4] MOVZX EAX,word ptr [RAX + RCX*0x2] MOVZX ECX,word ptr [RSP + 0x126] CMP EAX,ECX JNZ 0x00131724 JMP 0x001318e6 LAB_00131724: MOV RDI,qword ptr [RSP + 0x80] MOV DX,word ptr [RSP + 0x126] MOV RAX,qword ptr [RSP + 0x128] MOV ECX,dword ptr [RSP + 0xa4] MOV word ptr [RAX + RCX*0x2],DX MOV ESI,dword ptr [RSP + 0xa4] CALL 0x00133a00 MOV qword ptr [RSP + 0x40],RAX JMP 0x0013175a LAB_0013175a: MOV RDI,qword ptr [RSP + 0x80] MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x98],RAX ADD RDI,0xe8 CALL 0x0011c550 MOV RDI,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x30],RAX MOV EAX,dword ptr [RSP + 0x140] MOV dword ptr [RSP + 0x38],EAX MOV ESI,dword ptr [RSP + 0xa4] CALL 0x0012c4f0 MOV dword ptr [RSP + 0x3c],EAX JMP 0x001317a5 LAB_001317a5: MOV EDX,dword ptr [RSP + 0x3c] MOV ESI,dword ptr [RSP + 0x38] MOV RDI,qword ptr [RSP + 0x30] CALL 0x00131270 MOVSS dword ptr [RSP + 0x2c],XMM0 JMP 0x001317bf LAB_001317bf: MOV RDI,qword ptr [RSP + 0x88] MOVSS XMM0,dword ptr [RSP + 0x2c] MOVSS dword ptr [RSP + 0x94],XMM0 CALL 0x001339a0 MOV qword ptr [RSP + 0x20],RAX JMP 0x001317e2 LAB_001317e2: MOV RAX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x80] CMP RAX,qword ptr [RCX + 0x30] JC 0x0013180c MOVSS XMM0,dword ptr [RSP + 0xf0] UCOMISS XMM0,dword ptr [RSP + 0x94] JBE 0x001318e4 LAB_0013180c: MOVAPS XMM1,xmmword ptr [0x0024d040] MOVSS XMM0,dword ptr [RSP + 0x94] PXOR XMM0,XMM1 MOVSS dword ptr [RSP + 0x90],XMM0 LEA RDI,[RSP + 0x100] LEA RSI,[RSP + 0x90] LEA RDX,[RSP + 0xa4] CALL 0x00133910 JMP 0x00131848 LAB_00131848: MOV RDI,qword ptr [RSP + 0x88] LEA RSI,[RSP + 0x94] LEA RDX,[RSP + 0xa4] CALL 0x001338b0 JMP 0x00131867 LAB_00131867: MOV RDI,qword ptr [RSP + 0x88] CALL 0x001339a0 MOV qword ptr [RSP + 0x18],RAX JMP 0x0013187b LAB_0013187b: MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x80] CMP RAX,qword ptr [RCX + 0x30] JBE 0x0013189f MOV RDI,qword ptr [RSP + 0x88] CALL 0x001339b0 JMP 0x0013189d LAB_0013189d: JMP 0x0013189f LAB_0013189f: MOV RDI,qword ptr [RSP + 0x88] CALL 0x00133970 MOV byte ptr [RSP + 0x17],AL JMP 0x001318b2 LAB_001318b2: MOV AL,byte ptr [RSP + 0x17] TEST AL,0x1 JNZ 0x001318e2 JMP 0x001318bc LAB_001318bc: MOV RDI,qword ptr [RSP + 0x88] CALL 0x00133990 MOV qword ptr [RSP + 0x8],RAX JMP 0x001318d0 LAB_001318d0: MOV RAX,qword ptr [RSP + 0x8] MOVSS XMM0,dword ptr [RAX] MOVSS dword ptr [RSP + 0xf0],XMM0 LAB_001318e2: JMP 0x001318e4 LAB_001318e4: JMP 0x001318e6 LAB_001318e6: MOV RAX,qword ptr [RSP + 0xa8] ADD RAX,0x1 MOV qword ptr [RSP + 0xa8],RAX JMP 0x001316ce LAB_001318ff: LEA RDI,[RSP + 0xc8] CALL 0x00131170 JMP 0x00131508 LAB_00131911: MOV RAX,qword ptr [RSP + 0x80] MOV RDI,qword ptr [RAX + 0x50] MOV RSI,qword ptr [RSP + 0x130] LAB_00131925: CALL 0x00133a50 LAB_0013192a: JMP 0x0013192c LAB_0013192c: MOV byte ptr [RSP + 0x125],0x1 LEA RDI,[RSP + 0x100] CALL 0x001320f0 TEST byte ptr [RSP + 0x125],0x1 JNZ 0x00131969 JMP 0x0013195c LAB_0013195c: MOV RDI,qword ptr [RSP + 0x88] CALL 0x001320f0 LAB_00131969: MOV RAX,qword ptr [RSP + 0x78] ADD RSP,0x158 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* alaya::HNSWImpl<alaya::RawSpace<float, float, unsigned int, alaya::SequentialStorage<float, unsigned int> >, float, float, unsigned int>::search_base_layer(unsigned int, unsigned int, unsigned int) */ priority_queue<std::pair<float,unsigned_int>,std::vector<std::pair<float,unsigned_int>,std::allocator<std::pair<float,unsigned_int>>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,float,float,unsigned_int>::CompareByFirst> * alaya:: HNSWImpl<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,float,float,unsigned_int> ::search_base_layer(uint param_1,uint param_2,uint param_3) { uint uVar1; byte bVar2; uint uVar3; RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>> *pRVar4; int8 *puVar5; long lVar6; mutex *pmVar7; ulong uVar8; float *pfVar9; uint in_ECX; int4 in_register_00000034; HNSWImpl<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,float,float,unsigned_int> *this; int4 in_register_0000003c; priority_queue<std::pair<float,unsigned_int>,std::vector<std::pair<float,unsigned_int>,std::allocator<std::pair<float,unsigned_int>>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,float,float,unsigned_int>::CompareByFirst> *this_00; int in_R8D; float local_c8; float local_c4; int8 local_c0; uint local_b4; ulong local_b0; uint *local_a8; uint local_9c; uint *local_98; unique_lock<std::mutex> local_90 [20]; uint local_7c; int8 local_78; float local_70; float local_6c; float local_68; priority_queue<std::pair<float,unsigned_int>,std::vector<std::pair<float,unsigned_int>,std::allocator<std::pair<float,unsigned_int>>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,float,float,unsigned_int>::CompareByFirst> local_58 [37]; byte local_33; short local_32; long local_30; VisitedList *local_28; int local_1c; uint local_18; uint local_14; HNSWImpl<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,float,float,unsigned_int> *local_10; priority_queue<std::pair<float,unsigned_int>,std::vector<std::pair<float,unsigned_int>,std::allocator<std::pair<float,unsigned_int>>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,float,float,unsigned_int>::CompareByFirst> *local_8; this_00 = (priority_queue<std::pair<float,unsigned_int>,std::vector<std::pair<float,unsigned_int>,std::allocator<std::pair<float,unsigned_int>>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,float,float,unsigned_int>::CompareByFirst> *)CONCAT44(in_register_0000003c,param_1); this = (HNSWImpl<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,float,float,unsigned_int> *)CONCAT44(in_register_00000034,param_2); local_1c = in_R8D; local_18 = in_ECX; local_14 = param_3; local_10 = this; local_8 = this_00; local_28 = (VisitedList *) VisitedListPool::get_free_visited_list(*(VisitedListPool **)(this + 0x50)); local_30 = *(long *)(local_28 + 8); local_32 = *(short *)local_28; local_33 = 0; std:: priority_queue<std::pair<float,unsigned_int>,std::vector<std::pair<float,unsigned_int>,std::allocator<std::pair<float,unsigned_int>>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,float,float,unsigned_int>::CompareByFirst> :: priority_queue<std::vector<std::pair<float,unsigned_int>,std::allocator<std::pair<float,unsigned_int>>>,void> (this_00); /* try { // try from 0013140a to 00131416 has its CatchHandler @ 0013159a */ std:: priority_queue<std::pair<float,unsigned_int>,std::vector<std::pair<float,unsigned_int>,std::allocator<std::pair<float,unsigned_int>>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,float,float,unsigned_int>::CompareByFirst> :: priority_queue<std::vector<std::pair<float,unsigned_int>,std::allocator<std::pair<float,unsigned_int>>>,void> (local_58); pRVar4 = (RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>> *) std:: __shared_ptr_access<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,(__gnu_cxx::_Lock_policy)2,false,false> ::operator->((__shared_ptr_access<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,(__gnu_cxx::_Lock_policy)2,false,false> *)(this + 0xe8)); uVar1 = local_18; /* try { // try from 0013144c to 00131612 has its CatchHandler @ 001315b3 */ uVar3 = get_external_label(this,local_14); local_6c = (float)RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>> ::get_distance(pRVar4,uVar1,uVar3); std:: priority_queue<std::pair<float,unsigned_int>,std::vector<std::pair<float,unsigned_int>,std::allocator<std::pair<float,unsigned_int>>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,float,float,unsigned_int>::CompareByFirst> ::emplace<float&,unsigned_int&>(this_00,&local_6c,&local_14); local_68 = local_6c; local_70 = (float)((uint)local_6c ^ _DAT_0024d040); std:: priority_queue<std::pair<float,unsigned_int>,std::vector<std::pair<float,unsigned_int>,std::allocator<std::pair<float,unsigned_int>>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,float,float,unsigned_int>::CompareByFirst> ::emplace<float,unsigned_int&>(local_58,&local_70,&local_14); *(short *)(local_30 + (ulong)local_14 * 2) = local_32; while (bVar2 = std:: priority_queue<std::pair<float,unsigned_int>,std::vector<std::pair<float,unsigned_int>,std::allocator<std::pair<float,unsigned_int>>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,float,float,unsigned_int>::CompareByFirst> ::empty(local_58), ((bVar2 ^ 0xff) & 1) != 0) { puVar5 = (int8 *) std:: priority_queue<std::pair<float,unsigned_int>,std::vector<std::pair<float,unsigned_int>,std::allocator<std::pair<float,unsigned_int>>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,float,float,unsigned_int>::CompareByFirst> ::top(local_58); local_78 = *puVar5; if ((local_68 < -(float)local_78) && (lVar6 = std:: priority_queue<std::pair<float,unsigned_int>,std::vector<std::pair<float,unsigned_int>,std::allocator<std::pair<float,unsigned_int>>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,float,float,unsigned_int>::CompareByFirst> ::size(this_00), lVar6 == *(long *)(this + 0x30))) break; std:: priority_queue<std::pair<float,unsigned_int>,std::vector<std::pair<float,unsigned_int>,std::allocator<std::pair<float,unsigned_int>>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,float,float,unsigned_int>::CompareByFirst> ::pop(local_58); local_7c = local_78._4_4_; pmVar7 = (mutex *)std::vector<std::mutex,std::allocator<std::mutex>>::operator[] ((vector<std::mutex,std::allocator<std::mutex>> *)(this + 0x80), (ulong)local_78._4_4_); std::unique_lock<std::mutex>::unique_lock(local_90,pmVar7); if (local_1c == 0) { /* try { // try from 0013162e to 001318c8 has its CatchHandler @ 00131649 */ local_98 = (uint *)get_linklist0(this,local_7c); } else { local_98 = (uint *)get_linklist(this,local_7c,local_1c); } local_9c = get_list_count(this,local_98); local_a8 = local_98 + 1; for (local_b0 = 0; local_b0 < local_9c; local_b0 = local_b0 + 1) { local_b4 = local_a8[local_b0]; if (*(short *)(local_30 + (ulong)local_b4 * 2) != local_32) { *(short *)(local_30 + (ulong)local_b4 * 2) = local_32; local_c0 = get_data_by_internal_id(this,local_b4); pRVar4 = (RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>> *) std:: __shared_ptr_access<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,(__gnu_cxx::_Lock_policy)2,false,false> ::operator->((__shared_ptr_access<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,(__gnu_cxx::_Lock_policy)2,false,false> *)(this + 0xe8)); uVar1 = local_18; uVar3 = get_external_label(this,local_b4); local_c4 = (float)RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>> ::get_distance(pRVar4,uVar1,uVar3); uVar8 = std:: priority_queue<std::pair<float,unsigned_int>,std::vector<std::pair<float,unsigned_int>,std::allocator<std::pair<float,unsigned_int>>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,float,float,unsigned_int>::CompareByFirst> ::size(this_00); if ((uVar8 < *(ulong *)(this + 0x30)) || (local_c4 < local_68)) { local_c8 = (float)((uint)local_c4 ^ _DAT_0024d040); std:: priority_queue<std::pair<float,unsigned_int>,std::vector<std::pair<float,unsigned_int>,std::allocator<std::pair<float,unsigned_int>>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,float,float,unsigned_int>::CompareByFirst> ::emplace<float,unsigned_int&>(local_58,&local_c8,&local_b4); std:: priority_queue<std::pair<float,unsigned_int>,std::vector<std::pair<float,unsigned_int>,std::allocator<std::pair<float,unsigned_int>>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,float,float,unsigned_int>::CompareByFirst> ::emplace<float&,unsigned_int&>(this_00,&local_c4,&local_b4); uVar8 = std:: priority_queue<std::pair<float,unsigned_int>,std::vector<std::pair<float,unsigned_int>,std::allocator<std::pair<float,unsigned_int>>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,float,float,unsigned_int>::CompareByFirst> ::size(this_00); if (*(ulong *)(this + 0x30) < uVar8) { std:: priority_queue<std::pair<float,unsigned_int>,std::vector<std::pair<float,unsigned_int>,std::allocator<std::pair<float,unsigned_int>>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,float,float,unsigned_int>::CompareByFirst> ::pop(this_00); } bVar2 = std:: priority_queue<std::pair<float,unsigned_int>,std::vector<std::pair<float,unsigned_int>,std::allocator<std::pair<float,unsigned_int>>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,float,float,unsigned_int>::CompareByFirst> ::empty(this_00); if ((bVar2 & 1) == 0) { pfVar9 = (float *)std:: priority_queue<std::pair<float,unsigned_int>,std::vector<std::pair<float,unsigned_int>,std::allocator<std::pair<float,unsigned_int>>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,float,float,unsigned_int>::CompareByFirst> ::top(this_00); local_68 = *pfVar9; } } } } std::unique_lock<std::mutex>::~unique_lock(local_90); } /* try { // try from 00131925 to 00131929 has its CatchHandler @ 001315b3 */ VisitedListPool::release_visited_list(*(VisitedListPool **)(this + 0x50),local_28); local_33 = 1; std:: priority_queue<std::pair<float,unsigned_int>,std::vector<std::pair<float,unsigned_int>,std::allocator<std::pair<float,unsigned_int>>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,float,float,unsigned_int>::CompareByFirst> ::~priority_queue(local_58); if ((local_33 & 1) == 0) { std:: priority_queue<std::pair<float,unsigned_int>,std::vector<std::pair<float,unsigned_int>,std::allocator<std::pair<float,unsigned_int>>>,alaya::HNSWImpl<alaya::RawSpace<float,float,unsigned_int,alaya::SequentialStorage<float,unsigned_int>>,float,float,unsigned_int>::CompareByFirst> ::~priority_queue(this_00); } return this_00; }
47,561
ma_update_static_record
eloqsql/storage/maria/ma_statrec.c
my_bool _ma_update_static_record(MARIA_HA *info, MARIA_RECORD_POS pos, const uchar *oldrec __attribute__ ((unused)), const uchar *record) { info->rec_cache.seek_not_done=1; /* We have done a seek */ return (info->s->file_write(info, record, info->s->base.reclength, pos, MYF(MY_NABP)) != 0); }
O3
c
ma_update_static_record: pushq %rbp movq %rsp, %rbp movq %rsi, %rax movl $0x1, 0x598(%rdi) movq (%rdi), %r9 movq 0x398(%r9), %rdx movl $0x4, %r8d movq %rcx, %rsi movq %rax, %rcx callq *0x6e8(%r9) testq %rax, %rax setne %al popq %rbp retq
_ma_update_static_record: push rbp mov rbp, rsp mov rax, rsi mov dword ptr [rdi+598h], 1 mov r9, [rdi] mov rdx, [r9+398h] mov r8d, 4 mov rsi, rcx mov rcx, rax call qword ptr [r9+6E8h] test rax, rax setnz al pop rbp retn
bool ma_update_static_record(_DWORD *a1, long long a2, long long a3, long long a4) { a1[358] = 1; return (*(long long ( **)(_DWORD *, long long, _QWORD, long long, long long))(*(_QWORD *)a1 + 1768LL))( a1, a4, *(_QWORD *)(*(_QWORD *)a1 + 920LL), a2, 4LL) != 0; }
_ma_update_static_record: PUSH RBP MOV RBP,RSP MOV RAX,RSI MOV dword ptr [RDI + 0x598],0x1 MOV R9,qword ptr [RDI] MOV RDX,qword ptr [R9 + 0x398] MOV R8D,0x4 MOV RSI,RCX MOV RCX,RAX CALL qword ptr [R9 + 0x6e8] TEST RAX,RAX SETNZ AL POP RBP RET
bool _ma_update_static_record (long *param_1,int8 param_2,int8 param_3,int8 param_4) { long lVar1; *(int4 *)(param_1 + 0xb3) = 1; lVar1 = (**(code **)(*param_1 + 0x6e8)) (param_1,param_4,*(int8 *)(*param_1 + 0x398),param_2,4); return lVar1 != 0; }
47,562
ps_fetch_from_1_to_8_bytes
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
void ps_fetch_from_1_to_8_bytes(MYSQL_BIND *r_param, const MYSQL_FIELD * const field, unsigned char **row, unsigned int byte_count) { my_bool is_unsigned= test(field->flags & UNSIGNED_FLAG); r_param->buffer_length= byte_count; switch (byte_count) { case 1: *(uchar *)r_param->buffer= **row; *r_param->error= is_unsigned != r_param->is_unsigned && *(uchar *)r_param->buffer > INT_MAX8; break; case 2: shortstore(r_param->buffer, ((ushort) sint2korr(*row))); *r_param->error= is_unsigned != r_param->is_unsigned && *(ushort *)r_param->buffer > INT_MAX16; break; case 4: { longstore(r_param->buffer, ((uint32)sint4korr(*row))); *r_param->error= is_unsigned != r_param->is_unsigned && *(uint32 *)r_param->buffer > INT_MAX32; } break; case 8: { ulonglong val= (ulonglong)sint8korr(*row); longlongstore(r_param->buffer, val); *r_param->error= is_unsigned != r_param->is_unsigned && val > LONGLONG_MAX ; } break; default: r_param->buffer_length= 0; break; } (*row)+= byte_count; }
O0
c
ps_fetch_from_1_to_8_bytes: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq -0x10(%rbp), %rax movl 0x64(%rax), %eax andl $0x20, %eax shrl $0x5, %eax movb %al, -0x1d(%rbp) movl -0x1c(%rbp), %eax movl %eax, %ecx movq -0x8(%rbp), %rax movq %rcx, 0x40(%rax) movl -0x1c(%rbp), %eax decl %eax movl %eax, %ecx movq %rcx, -0x38(%rbp) subl $0x7, %eax ja 0x2de91 movq -0x38(%rbp), %rax leaq 0x21241(%rip), %rcx # 0x4eda0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x18(%rbp), %rax movq (%rax), %rax movb (%rax), %cl movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movb %cl, (%rax) movsbl -0x1d(%rbp), %ecx movq -0x8(%rbp), %rax movsbl 0x65(%rax), %edx xorl %eax, %eax cmpl %edx, %ecx movb %al, -0x39(%rbp) je 0x2dba4 movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movzbl (%rax), %eax cmpl $0x7f, %eax setg %al movb %al, -0x39(%rbp) movb -0x39(%rbp), %al andb $0x1, %al movzbl %al, %eax movb %al, %cl movq -0x8(%rbp), %rax movq 0x18(%rax), %rax movb %cl, (%rax) jmp 0x2de9d jmp 0x2dbbf movq -0x18(%rbp), %rax movq (%rax), %rax movzbl (%rax), %eax cwtl movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x1(%rcx), %ecx movswl %cx, %ecx shll $0x8, %ecx addl %ecx, %eax movzwl %ax, %eax movl %eax, -0x24(%rbp) movl -0x24(%rbp), %eax movb %al, %cl movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movb %cl, (%rax) movl -0x24(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movb %cl, 0x1(%rax) movsbl -0x1d(%rbp), %ecx movq -0x8(%rbp), %rax movsbl 0x65(%rax), %edx xorl %eax, %eax cmpl %edx, %ecx movb %al, -0x3a(%rbp) je 0x2dc30 movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movzwl (%rax), %eax cmpl $0x7fff, %eax # imm = 0x7FFF setg %al movb %al, -0x3a(%rbp) movb -0x3a(%rbp), %al andb $0x1, %al movzbl %al, %eax movb %al, %cl movq -0x8(%rbp), %rax movq 0x18(%rax), %rax movb %cl, (%rax) jmp 0x2de9d jmp 0x2dc4b movq -0x18(%rbp), %rax movq (%rax), %rax movzbl (%rax), %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx addl %ecx, %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x2(%rcx), %ecx shll $0x10, %ecx addl %ecx, %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x3(%rcx), %ecx movswl %cx, %ecx shll $0x18, %ecx addl %ecx, %eax movb %al, %cl movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movb %cl, (%rax) movq -0x18(%rbp), %rax movq (%rax), %rax movzbl (%rax), %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx addl %ecx, %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x2(%rcx), %ecx shll $0x10, %ecx addl %ecx, %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x3(%rcx), %ecx movswl %cx, %ecx shll $0x18, %ecx addl %ecx, %eax shrl $0x8, %eax movb %al, %cl movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movb %cl, 0x1(%rax) movq -0x18(%rbp), %rax movq (%rax), %rax movzbl (%rax), %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx addl %ecx, %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x2(%rcx), %ecx shll $0x10, %ecx addl %ecx, %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x3(%rcx), %ecx movswl %cx, %ecx shll $0x18, %ecx addl %ecx, %eax shrl $0x10, %eax movb %al, %cl movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movb %cl, 0x2(%rax) movq -0x18(%rbp), %rax movq (%rax), %rax movzbl (%rax), %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx addl %ecx, %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x2(%rcx), %ecx shll $0x10, %ecx addl %ecx, %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x3(%rcx), %ecx movswl %cx, %ecx shll $0x18, %ecx addl %ecx, %eax shrl $0x18, %eax movb %al, %cl movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movb %cl, 0x3(%rax) movsbl -0x1d(%rbp), %ecx movq -0x8(%rbp), %rax movsbl 0x65(%rax), %edx xorl %eax, %eax cmpl %edx, %ecx movb %al, -0x3b(%rbp) je 0x2dda6 movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movl (%rax), %eax cmpq $0x7fffffff, %rax # imm = 0x7FFFFFFF setg %al movb %al, -0x3b(%rbp) movb -0x3b(%rbp), %al andb $0x1, %al movzbl %al, %eax movb %al, %cl movq -0x8(%rbp), %rax movq 0x18(%rax), %rax movb %cl, (%rax) jmp 0x2de9d movq -0x18(%rbp), %rax movq (%rax), %rax movzbl (%rax), %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx addl %ecx, %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x2(%rcx), %ecx shll $0x10, %ecx addl %ecx, %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x3(%rcx), %ecx shll $0x18, %ecx addl %ecx, %eax movl %eax, %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x4(%rcx), %ecx movq -0x18(%rbp), %rdx movq (%rdx), %rdx movzbl 0x5(%rdx), %edx shll $0x8, %edx addl %edx, %ecx movq -0x18(%rbp), %rdx movq (%rdx), %rdx movzbl 0x6(%rdx), %edx shll $0x10, %edx addl %edx, %ecx movq -0x18(%rbp), %rdx movq (%rdx), %rdx movzbl 0x7(%rdx), %edx shll $0x18, %edx addl %edx, %ecx movl %ecx, %ecx shlq $0x20, %rcx addq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movq -0x30(%rbp), %rcx movq %rcx, (%rax) movsbl -0x1d(%rbp), %ecx movq -0x8(%rbp), %rax movsbl 0x65(%rax), %edx xorl %eax, %eax cmpl %edx, %ecx movb %al, -0x3c(%rbp) je 0x2de7b movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF cmpq %rax, -0x30(%rbp) seta %al movb %al, -0x3c(%rbp) movb -0x3c(%rbp), %al andb $0x1, %al movzbl %al, %eax movb %al, %cl movq -0x8(%rbp), %rax movq 0x18(%rax), %rax movb %cl, (%rax) jmp 0x2de9d movq -0x8(%rbp), %rax movq $0x0, 0x40(%rax) movl -0x1c(%rbp), %edx movq -0x18(%rbp), %rax movq (%rax), %rcx movl %edx, %edx addq %rdx, %rcx movq %rcx, (%rax) popq %rbp retq nopw %cs:(%rax,%rax)
ps_fetch_from_1_to_8_bytes: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov rax, [rbp+var_10] mov eax, [rax+64h] and eax, 20h shr eax, 5 mov [rbp+var_1D], al mov eax, [rbp+var_1C] mov ecx, eax mov rax, [rbp+var_8] mov [rax+40h], rcx mov eax, [rbp+var_1C] dec eax; switch 8 cases mov ecx, eax mov [rbp+var_38], rcx sub eax, 7 ja def_2DB66; jumptable 000000000002DB66 default case, cases 3,5-7 mov rax, [rbp+var_38] lea rcx, jpt_2DB66 movsxd rax, ds:(jpt_2DB66 - 4EDA0h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_2DB68: mov rax, [rbp+var_18]; jumptable 000000000002DB66 case 1 mov rax, [rax] mov cl, [rax] mov rax, [rbp+var_8] mov rax, [rax+10h] mov [rax], cl movsx ecx, [rbp+var_1D] mov rax, [rbp+var_8] movsx edx, byte ptr [rax+65h] xor eax, eax cmp ecx, edx mov [rbp+var_39], al jz short loc_2DBA4 mov rax, [rbp+var_8] mov rax, [rax+10h] movzx eax, byte ptr [rax] cmp eax, 7Fh setnle al mov [rbp+var_39], al loc_2DBA4: mov al, [rbp+var_39] and al, 1 movzx eax, al mov cl, al mov rax, [rbp+var_8] mov rax, [rax+18h] mov [rax], cl jmp loc_2DE9D loc_2DBBD: jmp short $+2; jumptable 000000000002DB66 case 2 loc_2DBBF: mov rax, [rbp+var_18] mov rax, [rax] movzx eax, byte ptr [rax] cwde mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+1] movsx ecx, cx shl ecx, 8 add eax, ecx movzx eax, ax mov [rbp+var_24], eax mov eax, [rbp+var_24] mov cl, al mov rax, [rbp+var_8] mov rax, [rax+10h] mov [rax], cl mov eax, [rbp+var_24] shr eax, 8 mov cl, al mov rax, [rbp+var_8] mov rax, [rax+10h] mov [rax+1], cl movsx ecx, [rbp+var_1D] mov rax, [rbp+var_8] movsx edx, byte ptr [rax+65h] xor eax, eax cmp ecx, edx mov [rbp+var_3A], al jz short loc_2DC30 mov rax, [rbp+var_8] mov rax, [rax+10h] movzx eax, word ptr [rax] cmp eax, 7FFFh setnle al mov [rbp+var_3A], al loc_2DC30: mov al, [rbp+var_3A] and al, 1 movzx eax, al mov cl, al mov rax, [rbp+var_8] mov rax, [rax+18h] mov [rax], cl jmp loc_2DE9D loc_2DC49: jmp short $+2; jumptable 000000000002DB66 case 4 loc_2DC4B: mov rax, [rbp+var_18] mov rax, [rax] movzx eax, byte ptr [rax] mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+1] shl ecx, 8 add eax, ecx mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+2] shl ecx, 10h add eax, ecx mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+3] movsx ecx, cx shl ecx, 18h add eax, ecx mov cl, al mov rax, [rbp+var_8] mov rax, [rax+10h] mov [rax], cl mov rax, [rbp+var_18] mov rax, [rax] movzx eax, byte ptr [rax] mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+1] shl ecx, 8 add eax, ecx mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+2] shl ecx, 10h add eax, ecx mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+3] movsx ecx, cx shl ecx, 18h add eax, ecx shr eax, 8 mov cl, al mov rax, [rbp+var_8] mov rax, [rax+10h] mov [rax+1], cl mov rax, [rbp+var_18] mov rax, [rax] movzx eax, byte ptr [rax] mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+1] shl ecx, 8 add eax, ecx mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+2] shl ecx, 10h add eax, ecx mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+3] movsx ecx, cx shl ecx, 18h add eax, ecx shr eax, 10h mov cl, al mov rax, [rbp+var_8] mov rax, [rax+10h] mov [rax+2], cl mov rax, [rbp+var_18] mov rax, [rax] movzx eax, byte ptr [rax] mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+1] shl ecx, 8 add eax, ecx mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+2] shl ecx, 10h add eax, ecx mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+3] movsx ecx, cx shl ecx, 18h add eax, ecx shr eax, 18h mov cl, al mov rax, [rbp+var_8] mov rax, [rax+10h] mov [rax+3], cl movsx ecx, [rbp+var_1D] mov rax, [rbp+var_8] movsx edx, byte ptr [rax+65h] xor eax, eax cmp ecx, edx mov [rbp+var_3B], al jz short loc_2DDA6 mov rax, [rbp+var_8] mov rax, [rax+10h] mov eax, [rax] cmp rax, 7FFFFFFFh setnle al mov [rbp+var_3B], al loc_2DDA6: mov al, [rbp+var_3B] and al, 1 movzx eax, al mov cl, al mov rax, [rbp+var_8] mov rax, [rax+18h] mov [rax], cl jmp loc_2DE9D loc_2DDBF: mov rax, [rbp+var_18]; jumptable 000000000002DB66 case 8 mov rax, [rax] movzx eax, byte ptr [rax] mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+1] shl ecx, 8 add eax, ecx mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+2] shl ecx, 10h add eax, ecx mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+3] shl ecx, 18h add eax, ecx mov eax, eax mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+4] mov rdx, [rbp+var_18] mov rdx, [rdx] movzx edx, byte ptr [rdx+5] shl edx, 8 add ecx, edx mov rdx, [rbp+var_18] mov rdx, [rdx] movzx edx, byte ptr [rdx+6] shl edx, 10h add ecx, edx mov rdx, [rbp+var_18] mov rdx, [rdx] movzx edx, byte ptr [rdx+7] shl edx, 18h add ecx, edx mov ecx, ecx shl rcx, 20h add rax, rcx mov [rbp+var_30], rax mov rax, [rbp+var_8] mov rax, [rax+10h] mov rcx, [rbp+var_30] mov [rax], rcx movsx ecx, [rbp+var_1D] mov rax, [rbp+var_8] movsx edx, byte ptr [rax+65h] xor eax, eax cmp ecx, edx mov [rbp+var_3C], al jz short loc_2DE7B mov rax, 7FFFFFFFFFFFFFFFh cmp [rbp+var_30], rax setnbe al mov [rbp+var_3C], al loc_2DE7B: mov al, [rbp+var_3C] and al, 1 movzx eax, al mov cl, al mov rax, [rbp+var_8] mov rax, [rax+18h] mov [rax], cl jmp short loc_2DE9D def_2DB66: mov rax, [rbp+var_8]; jumptable 000000000002DB66 default case, cases 3,5-7 mov qword ptr [rax+40h], 0 loc_2DE9D: mov edx, [rbp+var_1C] mov rax, [rbp+var_18] mov rcx, [rax] mov edx, edx add rcx, rdx mov [rax], rcx pop rbp retn
_BYTE ** ps_fetch_from_1_to_8_bytes(long long a1, long long a2, _BYTE **a3, unsigned int a4) { _BYTE **result; // rax bool v5; // [rsp+0h] [rbp-3Ch] bool v6; // [rsp+1h] [rbp-3Bh] bool v7; // [rsp+2h] [rbp-3Ah] bool v8; // [rsp+3h] [rbp-39h] unsigned long long v9; // [rsp+Ch] [rbp-30h] char v10; // [rsp+1Fh] [rbp-1Dh] v10 = (*(_DWORD *)(a2 + 100) & 0x20u) >> 5; *(_QWORD *)(a1 + 64) = a4; switch ( a4 ) { case 1u: **(_BYTE **)(a1 + 16) = **a3; v8 = 0; if ( v10 != *(char *)(a1 + 101) ) v8 = **(unsigned __int8 **)(a1 + 16) > 0x7Fu; **(_BYTE **)(a1 + 24) = v8; break; case 2u: **(_WORD **)(a1 + 16) = ((unsigned __int8)(*a3)[1] << 8) + (unsigned __int8)**a3; v7 = 0; if ( v10 != *(char *)(a1 + 101) ) v7 = **(unsigned __int16 **)(a1 + 16) > 0x7FFFu; **(_BYTE **)(a1 + 24) = v7; break; case 4u: **(_BYTE **)(a1 + 16) = **a3; *(_BYTE *)(*(_QWORD *)(a1 + 16) + 1LL) = (unsigned __int16)(((unsigned __int8)(*a3)[1] << 8) + (unsigned __int8)**a3) >> 8; *(_BYTE *)(*(_QWORD *)(a1 + 16) + 2LL) = (((unsigned __int8)(*a3)[3] << 24) + ((unsigned __int8)(*a3)[2] << 16) + ((unsigned __int8)(*a3)[1] << 8) + (unsigned int)(unsigned __int8)**a3) >> 16; *(_BYTE *)(*(_QWORD *)(a1 + 16) + 3LL) = (((unsigned __int8)(*a3)[3] << 24) + ((unsigned __int8)(*a3)[2] << 16) + ((unsigned __int8)(*a3)[1] << 8) + (unsigned int)(unsigned __int8)**a3) >> 24; v6 = 0; if ( v10 != *(char *)(a1 + 101) ) v6 = **(unsigned int **)(a1 + 16) > 0x7FFFFFFFuLL; **(_BYTE **)(a1 + 24) = v6; break; case 8u: v9 = ((unsigned long long)(((unsigned __int8)(*a3)[7] << 24) + ((unsigned __int8)(*a3)[6] << 16) + ((unsigned __int8)(*a3)[5] << 8) + (unsigned int)(unsigned __int8)(*a3)[4]) << 32) + ((unsigned __int8)(*a3)[3] << 24) + ((unsigned __int8)(*a3)[2] << 16) + ((unsigned __int8)(*a3)[1] << 8) + (unsigned int)(unsigned __int8)**a3; **(_QWORD **)(a1 + 16) = v9; v5 = 0; if ( v10 != *(char *)(a1 + 101) ) v5 = v9 > 0x7FFFFFFFFFFFFFFFLL; **(_BYTE **)(a1 + 24) = v5; break; default: *(_QWORD *)(a1 + 64) = 0LL; break; } result = a3; *a3 += a4; return result; }
ps_fetch_from_1_to_8_bytes: PUSH RBP MOV RBP,RSP 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 RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x64] AND EAX,0x20 SHR EAX,0x5 MOV byte ptr [RBP + -0x1d],AL MOV EAX,dword ptr [RBP + -0x1c] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x40],RCX MOV EAX,dword ptr [RBP + -0x1c] DEC EAX MOV ECX,EAX MOV qword ptr [RBP + -0x38],RCX SUB EAX,0x7 JA 0x0012de91 MOV RAX,qword ptr [RBP + -0x38] LEA RCX,[0x14eda0] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV byte ptr [RAX],CL MOVSX ECX,byte ptr [RBP + -0x1d] MOV RAX,qword ptr [RBP + -0x8] MOVSX EDX,byte ptr [RAX + 0x65] XOR EAX,EAX CMP ECX,EDX MOV byte ptr [RBP + -0x39],AL JZ 0x0012dba4 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOVZX EAX,byte ptr [RAX] CMP EAX,0x7f SETG AL MOV byte ptr [RBP + -0x39],AL LAB_0012dba4: MOV AL,byte ptr [RBP + -0x39] AND AL,0x1 MOVZX EAX,AL MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x18] MOV byte ptr [RAX],CL JMP 0x0012de9d caseD_2: JMP 0x0012dbbf LAB_0012dbbf: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOVZX EAX,byte ptr [RAX] CWDE MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x1] MOVSX ECX,CX SHL ECX,0x8 ADD EAX,ECX MOVZX EAX,AX MOV dword ptr [RBP + -0x24],EAX MOV EAX,dword ptr [RBP + -0x24] MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x24] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV byte ptr [RAX + 0x1],CL MOVSX ECX,byte ptr [RBP + -0x1d] MOV RAX,qword ptr [RBP + -0x8] MOVSX EDX,byte ptr [RAX + 0x65] XOR EAX,EAX CMP ECX,EDX MOV byte ptr [RBP + -0x3a],AL JZ 0x0012dc30 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOVZX EAX,word ptr [RAX] CMP EAX,0x7fff SETG AL MOV byte ptr [RBP + -0x3a],AL LAB_0012dc30: MOV AL,byte ptr [RBP + -0x3a] AND AL,0x1 MOVZX EAX,AL MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x18] MOV byte ptr [RAX],CL JMP 0x0012de9d caseD_4: JMP 0x0012dc4b LAB_0012dc4b: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x3] MOVSX ECX,CX SHL ECX,0x18 ADD EAX,ECX MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x3] MOVSX ECX,CX SHL ECX,0x18 ADD EAX,ECX SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x3] MOVSX ECX,CX SHL ECX,0x18 ADD EAX,ECX SHR EAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x3] MOVSX ECX,CX SHL ECX,0x18 ADD EAX,ECX SHR EAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV byte ptr [RAX + 0x3],CL MOVSX ECX,byte ptr [RBP + -0x1d] MOV RAX,qword ptr [RBP + -0x8] MOVSX EDX,byte ptr [RAX + 0x65] XOR EAX,EAX CMP ECX,EDX MOV byte ptr [RBP + -0x3b],AL JZ 0x0012dda6 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV EAX,dword ptr [RAX] CMP RAX,0x7fffffff SETG AL MOV byte ptr [RBP + -0x3b],AL LAB_0012dda6: MOV AL,byte ptr [RBP + -0x3b] AND AL,0x1 MOVZX EAX,AL MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x18] MOV byte ptr [RAX],CL JMP 0x0012de9d caseD_8: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x3] SHL ECX,0x18 ADD EAX,ECX MOV EAX,EAX MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x4] MOV RDX,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RDX] MOVZX EDX,byte ptr [RDX + 0x5] SHL EDX,0x8 ADD ECX,EDX MOV RDX,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RDX] MOVZX EDX,byte ptr [RDX + 0x6] SHL EDX,0x10 ADD ECX,EDX MOV RDX,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RDX] MOVZX EDX,byte ptr [RDX + 0x7] SHL EDX,0x18 ADD ECX,EDX MOV ECX,ECX SHL RCX,0x20 ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX MOVSX ECX,byte ptr [RBP + -0x1d] MOV RAX,qword ptr [RBP + -0x8] MOVSX EDX,byte ptr [RAX + 0x65] XOR EAX,EAX CMP ECX,EDX MOV byte ptr [RBP + -0x3c],AL JZ 0x0012de7b MOV RAX,0x7fffffffffffffff CMP qword ptr [RBP + -0x30],RAX SETA AL MOV byte ptr [RBP + -0x3c],AL LAB_0012de7b: MOV AL,byte ptr [RBP + -0x3c] AND AL,0x1 MOVZX EAX,AL MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x18] MOV byte ptr [RAX],CL JMP 0x0012de9d caseD_3: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x40],0x0 LAB_0012de9d: MOV EDX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX] MOV EDX,EDX ADD RCX,RDX MOV qword ptr [RAX],RCX POP RBP RET
void ps_fetch_from_1_to_8_bytes(long param_1,long param_2,long *param_3,uint param_4) { char cVar1; uint uVar2; ulong uVar3; bool local_44; bool local_43; bool local_42; bool local_41; cVar1 = (char)((*(uint *)(param_2 + 100) & 0x20) >> 5); *(ulong *)(param_1 + 0x40) = (ulong)param_4; switch(param_4) { case 1: **(int1 **)(param_1 + 0x10) = *(int1 *)*param_3; local_41 = false; if (cVar1 != *(char *)(param_1 + 0x65)) { local_41 = 0x7f < **(byte **)(param_1 + 0x10); } *(bool *)*(int8 *)(param_1 + 0x18) = local_41; break; case 2: uVar2 = (int)(short)(ushort)*(byte *)*param_3 + (short)(ushort)*(byte *)(*param_3 + 1) * 0x100 & 0xffff; **(int1 **)(param_1 + 0x10) = (char)uVar2; *(char *)(*(long *)(param_1 + 0x10) + 1) = (char)(uVar2 >> 8); local_42 = false; if (cVar1 != *(char *)(param_1 + 0x65)) { local_42 = 0x7fff < **(ushort **)(param_1 + 0x10); } *(bool *)*(int8 *)(param_1 + 0x18) = local_42; break; default: *(int8 *)(param_1 + 0x40) = 0; break; case 4: **(int1 **)(param_1 + 0x10) = *(int1 *)*param_3; *(char *)(*(long *)(param_1 + 0x10) + 1) = (char)((uint)*(byte *)*param_3 + (uint)*(byte *)(*param_3 + 1) * 0x100 >> 8); *(char *)(*(long *)(param_1 + 0x10) + 2) = (char)((uint)*(byte *)*param_3 + (uint)*(byte *)(*param_3 + 1) * 0x100 + (uint)*(byte *)(*param_3 + 2) * 0x10000 >> 0x10); *(char *)(*(long *)(param_1 + 0x10) + 3) = (char)((uint)*(byte *)*param_3 + (uint)*(byte *)(*param_3 + 1) * 0x100 + (uint)*(byte *)(*param_3 + 2) * 0x10000 + (short)(ushort)*(byte *)(*param_3 + 3) * 0x1000000 >> 0x18); local_43 = false; if (cVar1 != *(char *)(param_1 + 0x65)) { local_43 = 0x7fffffff < **(uint **)(param_1 + 0x10); } *(bool *)*(int8 *)(param_1 + 0x18) = local_43; break; case 8: uVar3 = CONCAT44((uint)*(byte *)(*param_3 + 4) + (uint)*(byte *)(*param_3 + 5) * 0x100 + (uint)*(byte *)(*param_3 + 6) * 0x10000 + (uint)*(byte *)(*param_3 + 7) * 0x1000000, (uint)*(byte *)*param_3 + (uint)*(byte *)(*param_3 + 1) * 0x100 + (uint)*(byte *)(*param_3 + 2) * 0x10000 + (uint)*(byte *)(*param_3 + 3) * 0x1000000); **(ulong **)(param_1 + 0x10) = uVar3; local_44 = cVar1 != *(char *)(param_1 + 0x65) && 0x7fffffffffffffff < uVar3; *(bool *)*(int8 *)(param_1 + 0x18) = local_44; } *param_3 = *param_3 + (ulong)param_4; return; }
47,563
mysql_close_options
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static void mysql_close_options(MYSQL *mysql) { if (mysql->options.init_command) { char **begin= (char **)mysql->options.init_command->buffer; char **end= begin + mysql->options.init_command->elements; for (;begin < end; begin++) free(*begin); ma_delete_dynamic(mysql->options.init_command); free(mysql->options.init_command); } free(mysql->options.user); free(mysql->options.host); free(mysql->options.password); free(mysql->options.unix_socket); free(mysql->options.db); free(mysql->options.my_cnf_file); free(mysql->options.my_cnf_group); free(mysql->options.charset_dir); free(mysql->options.charset_name); free(mysql->options.bind_address); free(mysql->options.ssl_key); free(mysql->options.ssl_cert); free(mysql->options.ssl_ca); free(mysql->options.ssl_capath); free(mysql->options.ssl_cipher); if (mysql->options.extension) { struct mysql_async_context *ctxt; if ((ctxt = mysql->options.extension->async_context)) { my_context_destroy(&ctxt->async_context); free(ctxt); mysql->options.extension->async_context= 0; } free(mysql->options.extension->plugin_dir); free(mysql->options.extension->default_auth); free(mysql->options.extension->db_driver); free(mysql->options.extension->ssl_crl); free(mysql->options.extension->ssl_crlpath); free(mysql->options.extension->tls_fp); free(mysql->options.extension->tls_fp_list); free(mysql->options.extension->tls_pw); free(mysql->options.extension->tls_version); free(mysql->options.extension->url); free(mysql->options.extension->connection_handler); free(mysql->options.extension->proxy_header); if(ma_hashtbl_inited(&mysql->options.extension->connect_attrs)) ma_hashtbl_free(&mysql->options.extension->connect_attrs); if (ma_hashtbl_inited(&mysql->options.extension->userdata)) ma_hashtbl_free(&mysql->options.extension->userdata); free(mysql->options.extension->restricted_auth); free(mysql->options.extension->rpl_host); } free(mysql->options.extension); /* clear all pointer */ memset(&mysql->options, 0, sizeof(mysql->options)); }
O3
c
mysql_close_options: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x3d8(%rdi), %rdi testq %rdi, %rdi je 0x48a19 movl 0x8(%rdi), %eax testq %rax, %rax je 0x48a08 movq (%rdi), %r14 leaq (%r14,%rax,8), %r15 movq (%r14), %rdi callq 0x37190 addq $0x8, %r14 cmpq %r15, %r14 jb 0x489f0 movq 0x3d8(%rbx), %rdi callq 0x5e838 movq 0x3d8(%rbx), %rdi callq 0x37190 movq 0x3b8(%rbx), %rdi callq 0x37190 movq 0x3b0(%rbx), %rdi callq 0x37190 movq 0x3c0(%rbx), %rdi callq 0x37190 movq 0x3c8(%rbx), %rdi callq 0x37190 movq 0x3d0(%rbx), %rdi callq 0x37190 movq 0x3e0(%rbx), %rdi callq 0x37190 movq 0x3e8(%rbx), %rdi callq 0x37190 movq 0x3f0(%rbx), %rdi callq 0x37190 movq 0x3f8(%rbx), %rdi callq 0x37190 movq 0x448(%rbx), %rdi callq 0x37190 movq 0x400(%rbx), %rdi callq 0x37190 movq 0x408(%rbx), %rdi callq 0x37190 movq 0x410(%rbx), %rdi callq 0x37190 movq 0x418(%rbx), %rdi callq 0x37190 movq 0x420(%rbx), %rdi callq 0x37190 movq 0x480(%rbx), %rax testq %rax, %rax je 0x48c40 movq 0x28(%rax), %r14 testq %r14, %r14 je 0x48b0d leaq 0x38(%r14), %rdi callq 0x5c81d movq %r14, %rdi callq 0x37190 movq 0x480(%rbx), %rax movq $0x0, 0x28(%rax) movq 0x480(%rbx), %rax movq (%rax), %rdi callq 0x37190 movq 0x480(%rbx), %rax movq 0x8(%rax), %rdi callq 0x37190 movq 0x480(%rbx), %rax movq 0x88(%rax), %rdi callq 0x37190 movq 0x480(%rbx), %rax movq 0x10(%rax), %rdi callq 0x37190 movq 0x480(%rbx), %rax movq 0x18(%rax), %rdi callq 0x37190 movq 0x480(%rbx), %rax movq 0x90(%rax), %rdi callq 0x37190 movq 0x480(%rbx), %rax movq 0x98(%rax), %rdi callq 0x37190 movq 0x480(%rbx), %rax movq 0xa0(%rax), %rdi callq 0x37190 movq 0x480(%rbx), %rax movq 0xc0(%rax), %rdi callq 0x37190 movq 0x480(%rbx), %rax movq 0xb0(%rax), %rdi callq 0x37190 movq 0x480(%rbx), %rax movq 0xd0(%rax), %rdi callq 0x37190 movq 0x480(%rbx), %rax movq 0x130(%rax), %rdi callq 0x37190 movq 0x480(%rbx), %rdi cmpq $0x0, 0x48(%rdi) je 0x48bfb addq $0x30, %rdi callq 0x5f41d movq 0x480(%rbx), %rdi cmpq $0x0, 0xf8(%rdi) je 0x48c18 addq $0xe0, %rdi callq 0x5f41d movq 0x480(%rbx), %rdi movq 0x150(%rdi), %rdi callq 0x37190 movq 0x480(%rbx), %rax movq 0x158(%rax), %rdi callq 0x37190 movq 0x480(%rbx), %rdi jmp 0x48c42 xorl %edi, %edi addq $0x390, %rbx # imm = 0x390 callq 0x37190 movl $0xf8, %edx movq %rbx, %rdi xorl %esi, %esi addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x37300
mysql_close_options: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi mov rdi, [rdi+3D8h] test rdi, rdi jz short loc_48A19 mov eax, [rdi+8] test rax, rax jz short loc_48A08 mov r14, [rdi] lea r15, [r14+rax*8] loc_489F0: mov rdi, [r14] call _free add r14, 8 cmp r14, r15 jb short loc_489F0 mov rdi, [rbx+3D8h] loc_48A08: call ma_delete_dynamic mov rdi, [rbx+3D8h] call _free loc_48A19: mov rdi, [rbx+3B8h] call _free mov rdi, [rbx+3B0h] call _free mov rdi, [rbx+3C0h] call _free mov rdi, [rbx+3C8h] call _free mov rdi, [rbx+3D0h] call _free mov rdi, [rbx+3E0h] call _free mov rdi, [rbx+3E8h] call _free mov rdi, [rbx+3F0h] call _free mov rdi, [rbx+3F8h] call _free mov rdi, [rbx+448h] call _free mov rdi, [rbx+400h] call _free mov rdi, [rbx+408h] call _free mov rdi, [rbx+410h] call _free mov rdi, [rbx+418h] call _free mov rdi, [rbx+420h] call _free mov rax, [rbx+480h] test rax, rax jz loc_48C40 mov r14, [rax+28h] test r14, r14 jz short loc_48B0D lea rdi, [r14+38h] call my_context_destroy mov rdi, r14 call _free mov rax, [rbx+480h] mov qword ptr [rax+28h], 0 mov rax, [rbx+480h] loc_48B0D: mov rdi, [rax] call _free mov rax, [rbx+480h] mov rdi, [rax+8] call _free mov rax, [rbx+480h] mov rdi, [rax+88h] call _free mov rax, [rbx+480h] mov rdi, [rax+10h] call _free mov rax, [rbx+480h] mov rdi, [rax+18h] call _free mov rax, [rbx+480h] mov rdi, [rax+90h] call _free mov rax, [rbx+480h] mov rdi, [rax+98h] call _free mov rax, [rbx+480h] mov rdi, [rax+0A0h] call _free mov rax, [rbx+480h] mov rdi, [rax+0C0h] call _free mov rax, [rbx+480h] mov rdi, [rax+0B0h] call _free mov rax, [rbx+480h] mov rdi, [rax+0D0h] call _free mov rax, [rbx+480h] mov rdi, [rax+130h] call _free mov rdi, [rbx+480h] cmp qword ptr [rdi+48h], 0 jz short loc_48BFB add rdi, 30h ; '0' call ma_hashtbl_free mov rdi, [rbx+480h] loc_48BFB: cmp qword ptr [rdi+0F8h], 0 jz short loc_48C18 add rdi, 0E0h call ma_hashtbl_free mov rdi, [rbx+480h] loc_48C18: mov rdi, [rdi+150h] call _free mov rax, [rbx+480h] mov rdi, [rax+158h] call _free mov rdi, [rbx+480h] jmp short loc_48C42 loc_48C40: xor edi, edi loc_48C42: add rbx, 390h call _free mov edx, 0F8h mov rdi, rbx xor esi, esi add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _memset
double mysql_close_options(_QWORD *a1) { long long v2; // rdi _QWORD *v3; // r14 unsigned long long v4; // r15 _QWORD *v5; // rax long long v6; // r14 _QWORD *v7; // rdi long long v8; // rdi v2 = a1[123]; if ( v2 ) { if ( *(_DWORD *)(v2 + 8) ) { v3 = *(_QWORD **)v2; v4 = *(_QWORD *)v2 + 8LL * *(unsigned int *)(v2 + 8); do free(*v3++); while ( (unsigned long long)v3 < v4 ); v2 = a1[123]; } ma_delete_dynamic(v2); free(a1[123]); } free(a1[119]); free(a1[118]); free(a1[120]); free(a1[121]); free(a1[122]); free(a1[124]); free(a1[125]); free(a1[126]); free(a1[127]); free(a1[137]); free(a1[128]); free(a1[129]); free(a1[130]); free(a1[131]); free(a1[132]); v5 = (_QWORD *)a1[144]; if ( v5 ) { v6 = v5[5]; if ( v6 ) { my_context_destroy(v6 + 56); free(v6); *(_QWORD *)(a1[144] + 40LL) = 0LL; v5 = (_QWORD *)a1[144]; } free(*v5); free(*(_QWORD *)(a1[144] + 8LL)); free(*(_QWORD *)(a1[144] + 136LL)); free(*(_QWORD *)(a1[144] + 16LL)); free(*(_QWORD *)(a1[144] + 24LL)); free(*(_QWORD *)(a1[144] + 144LL)); free(*(_QWORD *)(a1[144] + 152LL)); free(*(_QWORD *)(a1[144] + 160LL)); free(*(_QWORD *)(a1[144] + 192LL)); free(*(_QWORD *)(a1[144] + 176LL)); free(*(_QWORD *)(a1[144] + 208LL)); free(*(_QWORD *)(a1[144] + 304LL)); v7 = (_QWORD *)a1[144]; if ( v7[9] ) { ma_hashtbl_free(v7 + 6); v7 = (_QWORD *)a1[144]; } if ( v7[31] ) { ma_hashtbl_free(v7 + 28); v7 = (_QWORD *)a1[144]; } free(v7[42]); free(*(_QWORD *)(a1[144] + 344LL)); v8 = a1[144]; } else { v8 = 0LL; } free(v8); return memset(a1 + 114, 0LL, 248LL); }
mysql_close_options: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x3d8] TEST RDI,RDI JZ 0x00148a19 MOV EAX,dword ptr [RDI + 0x8] TEST RAX,RAX JZ 0x00148a08 MOV R14,qword ptr [RDI] LEA R15,[R14 + RAX*0x8] LAB_001489f0: MOV RDI,qword ptr [R14] CALL 0x00137190 ADD R14,0x8 CMP R14,R15 JC 0x001489f0 MOV RDI,qword ptr [RBX + 0x3d8] LAB_00148a08: CALL 0x0015e838 MOV RDI,qword ptr [RBX + 0x3d8] CALL 0x00137190 LAB_00148a19: MOV RDI,qword ptr [RBX + 0x3b8] CALL 0x00137190 MOV RDI,qword ptr [RBX + 0x3b0] CALL 0x00137190 MOV RDI,qword ptr [RBX + 0x3c0] CALL 0x00137190 MOV RDI,qword ptr [RBX + 0x3c8] CALL 0x00137190 MOV RDI,qword ptr [RBX + 0x3d0] CALL 0x00137190 MOV RDI,qword ptr [RBX + 0x3e0] CALL 0x00137190 MOV RDI,qword ptr [RBX + 0x3e8] CALL 0x00137190 MOV RDI,qword ptr [RBX + 0x3f0] CALL 0x00137190 MOV RDI,qword ptr [RBX + 0x3f8] CALL 0x00137190 MOV RDI,qword ptr [RBX + 0x448] CALL 0x00137190 MOV RDI,qword ptr [RBX + 0x400] CALL 0x00137190 MOV RDI,qword ptr [RBX + 0x408] CALL 0x00137190 MOV RDI,qword ptr [RBX + 0x410] CALL 0x00137190 MOV RDI,qword ptr [RBX + 0x418] CALL 0x00137190 MOV RDI,qword ptr [RBX + 0x420] CALL 0x00137190 MOV RAX,qword ptr [RBX + 0x480] TEST RAX,RAX JZ 0x00148c40 MOV R14,qword ptr [RAX + 0x28] TEST R14,R14 JZ 0x00148b0d LEA RDI,[R14 + 0x38] CALL 0x0015c81d MOV RDI,R14 CALL 0x00137190 MOV RAX,qword ptr [RBX + 0x480] MOV qword ptr [RAX + 0x28],0x0 MOV RAX,qword ptr [RBX + 0x480] LAB_00148b0d: MOV RDI,qword ptr [RAX] CALL 0x00137190 MOV RAX,qword ptr [RBX + 0x480] MOV RDI,qword ptr [RAX + 0x8] CALL 0x00137190 MOV RAX,qword ptr [RBX + 0x480] MOV RDI,qword ptr [RAX + 0x88] CALL 0x00137190 MOV RAX,qword ptr [RBX + 0x480] MOV RDI,qword ptr [RAX + 0x10] CALL 0x00137190 MOV RAX,qword ptr [RBX + 0x480] MOV RDI,qword ptr [RAX + 0x18] CALL 0x00137190 MOV RAX,qword ptr [RBX + 0x480] MOV RDI,qword ptr [RAX + 0x90] CALL 0x00137190 MOV RAX,qword ptr [RBX + 0x480] MOV RDI,qword ptr [RAX + 0x98] CALL 0x00137190 MOV RAX,qword ptr [RBX + 0x480] MOV RDI,qword ptr [RAX + 0xa0] CALL 0x00137190 MOV RAX,qword ptr [RBX + 0x480] MOV RDI,qword ptr [RAX + 0xc0] CALL 0x00137190 MOV RAX,qword ptr [RBX + 0x480] MOV RDI,qword ptr [RAX + 0xb0] CALL 0x00137190 MOV RAX,qword ptr [RBX + 0x480] MOV RDI,qword ptr [RAX + 0xd0] CALL 0x00137190 MOV RAX,qword ptr [RBX + 0x480] MOV RDI,qword ptr [RAX + 0x130] CALL 0x00137190 MOV RDI,qword ptr [RBX + 0x480] CMP qword ptr [RDI + 0x48],0x0 JZ 0x00148bfb ADD RDI,0x30 CALL 0x0015f41d MOV RDI,qword ptr [RBX + 0x480] LAB_00148bfb: CMP qword ptr [RDI + 0xf8],0x0 JZ 0x00148c18 ADD RDI,0xe0 CALL 0x0015f41d MOV RDI,qword ptr [RBX + 0x480] LAB_00148c18: MOV RDI,qword ptr [RDI + 0x150] CALL 0x00137190 MOV RAX,qword ptr [RBX + 0x480] MOV RDI,qword ptr [RAX + 0x158] CALL 0x00137190 MOV RDI,qword ptr [RBX + 0x480] JMP 0x00148c42 LAB_00148c40: XOR EDI,EDI LAB_00148c42: ADD RBX,0x390 CALL 0x00137190 MOV EDX,0xf8 MOV RDI,RBX XOR ESI,ESI ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x00137300
void mysql_close_options(long param_1) { int8 *puVar1; long *plVar2; long lVar3; void *pvVar4; int8 *puVar5; plVar2 = *(long **)(param_1 + 0x3d8); if (plVar2 != (long *)0x0) { if ((ulong)*(uint *)(plVar2 + 1) != 0) { puVar5 = (int8 *)*plVar2; puVar1 = puVar5 + *(uint *)(plVar2 + 1); do { free((void *)*puVar5); puVar5 = puVar5 + 1; } while (puVar5 < puVar1); plVar2 = *(long **)(param_1 + 0x3d8); } ma_delete_dynamic(plVar2); free(*(void **)(param_1 + 0x3d8)); } free(*(void **)(param_1 + 0x3b8)); free(*(void **)(param_1 + 0x3b0)); free(*(void **)(param_1 + 0x3c0)); free(*(void **)(param_1 + 0x3c8)); free(*(void **)(param_1 + 0x3d0)); free(*(void **)(param_1 + 0x3e0)); free(*(void **)(param_1 + 1000)); free(*(void **)(param_1 + 0x3f0)); free(*(void **)(param_1 + 0x3f8)); free(*(void **)(param_1 + 0x448)); free(*(void **)(param_1 + 0x400)); free(*(void **)(param_1 + 0x408)); free(*(void **)(param_1 + 0x410)); free(*(void **)(param_1 + 0x418)); free(*(void **)(param_1 + 0x420)); puVar1 = *(int8 **)(param_1 + 0x480); if (puVar1 == (int8 *)0x0) { pvVar4 = (void *)0x0; } else { pvVar4 = (void *)puVar1[5]; if (pvVar4 != (void *)0x0) { my_context_destroy((long)pvVar4 + 0x38); free(pvVar4); *(int8 *)(*(long *)(param_1 + 0x480) + 0x28) = 0; puVar1 = *(int8 **)(param_1 + 0x480); } free((void *)*puVar1); free(*(void **)(*(long *)(param_1 + 0x480) + 8)); free(*(void **)(*(long *)(param_1 + 0x480) + 0x88)); free(*(void **)(*(long *)(param_1 + 0x480) + 0x10)); free(*(void **)(*(long *)(param_1 + 0x480) + 0x18)); free(*(void **)(*(long *)(param_1 + 0x480) + 0x90)); free(*(void **)(*(long *)(param_1 + 0x480) + 0x98)); free(*(void **)(*(long *)(param_1 + 0x480) + 0xa0)); free(*(void **)(*(long *)(param_1 + 0x480) + 0xc0)); free(*(void **)(*(long *)(param_1 + 0x480) + 0xb0)); free(*(void **)(*(long *)(param_1 + 0x480) + 0xd0)); free(*(void **)(*(long *)(param_1 + 0x480) + 0x130)); lVar3 = *(long *)(param_1 + 0x480); if (*(long *)(lVar3 + 0x48) != 0) { ma_hashtbl_free(lVar3 + 0x30); lVar3 = *(long *)(param_1 + 0x480); } if (*(long *)(lVar3 + 0xf8) != 0) { ma_hashtbl_free(lVar3 + 0xe0); lVar3 = *(long *)(param_1 + 0x480); } free(*(void **)(lVar3 + 0x150)); free(*(void **)(*(long *)(param_1 + 0x480) + 0x158)); pvVar4 = *(void **)(param_1 + 0x480); } free(pvVar4); memset((void *)(param_1 + 0x390),0,0xf8); return; }
47,564
get_charset
eloqsql/mysys/charset.c
CHARSET_INFO *get_charset(uint cs_number, myf flags) { CHARSET_INFO *cs= NULL; if (cs_number == default_charset_info->number) return default_charset_info; my_pthread_once(&charsets_initialized, init_available_charsets); if (cs_number < array_elements(all_charsets)) { MY_CHARSET_LOADER loader; my_charset_loader_init_mysys(&loader); cs= get_internal_charset(&loader, cs_number, flags); } if (!cs && (flags & MY_WME)) { char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)], cs_string[23]; strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX); cs_string[0]='#'; int10_to_str(cs_number, cs_string+1, 10); my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_string, index_file); } return cs; }
O3
c
get_charset: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x238, %rsp # imm = 0x238 movq %fs:0x28, %rax movq %rax, -0x20(%rbp) leaq 0x2d138e(%rip), %rax # 0x2f95a8 movq (%rax), %r15 cmpl %edi, (%r15) je 0x28321 movq %rsi, %r14 movl %edi, %ebx leaq 0x352f2e(%rip), %rdi # 0x37b160 leaq -0x382(%rip), %rsi # 0x27eb7 callq 0x242b0 cmpl $0x7ff, %ebx # imm = 0x7FF ja 0x282b6 leaq -0x230(%rbp), %rdi movb $0x0, (%rdi) leaq -0xb6d(%rip), %rax # 0x276ea movq %rax, 0x80(%rdi) leaq -0xb6c(%rip), %rax # 0x276f9 movq %rax, 0x88(%rdi) leaq -0xb5f(%rip), %rax # 0x27714 movq %rax, 0x90(%rdi) leaq 0x5721(%rip), %rax # 0x2d9a2 movq %rax, 0x98(%rdi) leaq 0x2d1311(%rip), %rax # 0x2f95a0 movq (%rax), %rax movq %rax, 0xa0(%rdi) leaq -0xb6e(%rip), %rax # 0x27732 movq %rax, 0xa8(%rdi) movl %ebx, %esi movq %r14, %rdx callq 0x28346 movq %rax, %r15 jmp 0x282b9 xorl %r15d, %r15d testq %r15, %r15 setne %al testb $0x10, %r14b sete %cl orb %al, %cl jne 0x28321 leaq -0x230(%rbp), %r14 movq %r14, %rdi callq 0x27c77 movabsq $0x6d782e7865646e49, %rcx # imm = 0x6D782E7865646E49 movq %rcx, (%rax) movw $0x6c, 0x8(%rax) leaq -0x24f(%rbp), %rsi movb $0x23, -0x1(%rsi) movl %ebx, %edi movl $0xa, %edx callq 0x5f69a xorl %r15d, %r15d leaq -0x250(%rbp), %rdx movl $0x4, %esi movl $0x16, %edi movq %r14, %rcx xorl %eax, %eax callq 0x2a00f movq %fs:0x28, %rax cmpq -0x20(%rbp), %rax jne 0x28341 movq %r15, %rax addq $0x238, %rsp # imm = 0x238 popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x24390
get_charset: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 238h mov rax, fs:28h mov [rbp+var_20], rax lea rax, default_charset_info mov r15, [rax] cmp [r15], edi jz loc_28321 mov r14, rsi mov ebx, edi lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once cmp ebx, 7FFh ja short loc_282B6 lea rdi, [rbp+var_230] 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 mov esi, ebx mov rdx, r14 call get_internal_charset mov r15, rax jmp short loc_282B9 loc_282B6: xor r15d, r15d loc_282B9: test r15, r15 setnz al test r14b, 10h setz cl or cl, al jnz short loc_28321 lea r14, [rbp+var_230] mov rdi, r14 call get_charsets_dir mov rcx, 6D782E7865646E49h mov [rax], rcx mov word ptr [rax+8], 6Ch ; 'l' lea rsi, [rbp+var_24F] mov byte ptr [rsi-1], 23h ; '#' mov edi, ebx mov edx, 0Ah call int10_to_str xor r15d, r15d lea rdx, [rbp+var_250] mov esi, 4 mov edi, 16h mov rcx, r14 xor eax, eax call my_error loc_28321: mov rax, fs:28h cmp rax, [rbp+var_20] jnz short loc_28341 mov rax, r15 add rsp, 238h pop rbx pop r14 pop r15 pop rbp retn loc_28341: call ___stack_chk_fail
void * get_charset(unsigned int a1, long long a2) { void *internal_charset; // r15 int v3; // r8d int v4; // r9d char v6; // [rsp+0h] [rbp-250h] BYREF _BYTE v7[31]; // [rsp+1h] [rbp-24Fh] BYREF _BYTE v8[128]; // [rsp+20h] [rbp-230h] BYREF long long ( *v9)(long long); // [rsp+A0h] [rbp-1B0h] long long ( *v10)(long long); // [rsp+A8h] [rbp-1A8h] long long ( *v11)(long long, long long); // [rsp+B0h] [rbp-1A0h] long long ( *v12)(_QWORD); // [rsp+B8h] [rbp-198h] long long ( *v13)(); // [rsp+C0h] [rbp-190h] long long ( *v14)(unsigned int *); // [rsp+C8h] [rbp-188h] unsigned long long v15; // [rsp+230h] [rbp-20h] v15 = __readfsqword(0x28u); internal_charset = default_charset_info; if ( *(_DWORD *)default_charset_info != a1 ) { pthread_once(&charsets_initialized, init_available_charsets); if ( a1 > 0x7FF ) { internal_charset = 0LL; } else { v8[0] = 0; v9 = my_once_alloc_c; v10 = my_malloc_c; v11 = my_realloc_c; v12 = my_free; v13 = my_charset_error_reporter; v14 = add_collation; internal_charset = (void *)get_internal_charset(v8, a1, a2); } if ( internal_charset == 0LL && (a2 & 0x10) != 0 ) { strcpy((char *)get_charsets_dir((long long)v8), "Index.xml"); int10_to_str(a1, v7, 10LL); internal_charset = 0LL; my_error(22, 4, (unsigned int)&v6, (unsigned int)v8, v3, v4, 35); } } return internal_charset; }
get_charset: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x238 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX LEA RAX,[0x3f95a8] MOV R15,qword ptr [RAX] CMP dword ptr [R15],EDI JZ 0x00128321 MOV R14,RSI MOV EBX,EDI LEA RDI,[0x47b160] LEA RSI,[0x127eb7] CALL 0x001242b0 CMP EBX,0x7ff JA 0x001282b6 LEA RDI,[RBP + -0x230] MOV byte ptr [RDI],0x0 LEA RAX,[0x1276ea] MOV qword ptr [RDI + 0x80],RAX LEA RAX,[0x1276f9] MOV qword ptr [RDI + 0x88],RAX LEA RAX,[0x127714] MOV qword ptr [RDI + 0x90],RAX LEA RAX,[0x12d9a2] MOV qword ptr [RDI + 0x98],RAX LEA RAX,[0x3f95a0] MOV RAX,qword ptr [RAX] MOV qword ptr [RDI + 0xa0],RAX LEA RAX,[0x127732] MOV qword ptr [RDI + 0xa8],RAX MOV ESI,EBX MOV RDX,R14 CALL 0x00128346 MOV R15,RAX JMP 0x001282b9 LAB_001282b6: XOR R15D,R15D LAB_001282b9: TEST R15,R15 SETNZ AL TEST R14B,0x10 SETZ CL OR CL,AL JNZ 0x00128321 LEA R14,[RBP + -0x230] MOV RDI,R14 CALL 0x00127c77 MOV RCX,0x6d782e7865646e49 MOV qword ptr [RAX],RCX MOV word ptr [RAX + 0x8],0x6c LEA RSI,[RBP + -0x24f] MOV byte ptr [RSI + -0x1],0x23 MOV EDI,EBX MOV EDX,0xa CALL 0x0015f69a XOR R15D,R15D LEA RDX,[RBP + -0x250] MOV ESI,0x4 MOV EDI,0x16 MOV RCX,R14 XOR EAX,EAX CALL 0x0012a00f LAB_00128321: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x00128341 MOV RAX,R15 ADD RSP,0x238 POP RBX POP R14 POP R15 POP RBP RET LAB_00128341: CALL 0x00124390
int * get_charset(uint param_1,ulong param_2) { int *puVar1; int8 *puVar2; long in_FS_OFFSET; int1 local_258; int1 local_257 [31]; int1 local_238 [128]; code *local_1b8; code *local_1b0; code *local_1a8; code *local_1a0; int *local_198; code *local_190; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); puVar1 = default_charset_info; if (*(uint *)default_charset_info != param_1) { pthread_once(&charsets_initialized,init_available_charsets); if (param_1 < 0x800) { local_238[0] = 0; local_1b8 = my_once_alloc_c; local_1b0 = my_malloc_c; local_1a8 = my_realloc_c; local_1a0 = my_free; local_198 = my_charset_error_reporter; local_190 = add_collation; puVar1 = (int *)get_internal_charset(local_238,param_1,param_2); } else { puVar1 = (int *)0x0; } if ((param_2 & 0x10) != 0 && puVar1 == (int *)0x0) { puVar2 = (int8 *)get_charsets_dir(local_238); *puVar2 = 0x6d782e7865646e49; *(int2 *)(puVar2 + 1) = 0x6c; local_258 = 0x23; int10_to_str(param_1,local_257,10); puVar1 = (int *)0x0; my_error(0x16,4,&local_258,local_238); } } if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return puVar1; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
47,565
intx::internal::submul(unsigned long*, unsigned long const*, unsigned long const*, int, unsigned long)
corpus-core[P]colibri-stateless/build_O2/_deps/intx-src/include/intx/intx.hpp
inline uint64_t submul( uint64_t r[], const uint64_t x[], const uint64_t y[], int len, uint64_t multiplier) noexcept { // OPT: Add MinLen template parameter and unroll first loop iterations. INTX_REQUIRE(len >= 1); uint64_t borrow = 0; for (int i = 0; i < len; ++i) { const auto s = x[i] - borrow; const auto p = umul(y[i], multiplier); borrow = p[1] + (x[i] < s); r[i] = s - p[0]; borrow += (s < r[i]); } return borrow; }
O2
cpp
intx::internal::submul(unsigned long*, unsigned long const*, unsigned long const*, int, unsigned long): pushq %rbx testl %ecx, %ecx jle 0x399cf movq %rdx, %r9 movl %ecx, %ecx xorl %r10d, %r10d xorl %eax, %eax cmpq %r10, %rcx je 0x399cd movq (%rsi,%r10,8), %r11 xorl %ebx, %ebx subq %rax, %r11 setb %bl movq %r8, %rax mulq (%r9,%r10,8) subq %rax, %r11 movq %r11, (%rdi,%r10,8) adcq %rdx, %rbx incq %r10 movq %rbx, %rax jmp 0x399a3 popq %rbx retq leaq 0x3d726(%rip), %rdi # 0x770fc leaq 0x3d541(%rip), %rsi # 0x76f1e leaq 0x3d721(%rip), %rcx # 0x77105 movl $0x67d, %edx # imm = 0x67D callq 0x22110
_ZN4intx8internal6submulEPmPKmS3_im: push rbx test ecx, ecx jle short loc_399CF mov r9, rdx mov ecx, ecx xor r10d, r10d xor eax, eax loc_399A3: cmp rcx, r10 jz short loc_399CD mov r11, [rsi+r10*8] xor ebx, ebx sub r11, rax setb bl mov rax, r8 mul qword ptr [r9+r10*8] sub r11, rax mov [rdi+r10*8], r11 adc rbx, rdx inc r10 mov rax, rbx jmp short loc_399A3 loc_399CD: pop rbx retn loc_399CF: lea rdi, aLen1; "len >= 1" lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rcx, aUint64TIntxInt_0; "uint64_t intx::internal::submul(uint64_"... mov edx, 67Dh call ___assert_fail
unsigned long long intx::internal::submul( intx::internal *this, unsigned long long *a2, const unsigned long long *a3, const unsigned long long *a4, unsigned long long a5) { long long v6; // r10 unsigned long long result; // rax unsigned long long v8; // r11 bool v9; // cf unsigned long long v10; // r11 unsigned __int128 v11; // rax if ( (int)a4 <= 0 ) __assert_fail( "len >= 1", "/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O2/_deps/intx-src/include/intx/intx.hpp", 1661LL, "uint64_t intx::internal::submul(uint64_t *, const uint64_t *, const uint64_t *, int, uint64_t)"); v6 = 0LL; result = 0LL; while ( (unsigned int)a4 != v6 ) { v8 = a2[v6]; v9 = v8 < result; v10 = v8 - result; v11 = a3[v6] * (unsigned __int128)a5; *((_QWORD *)this + v6++) = v10 - v11; result = *((_QWORD *)&v11 + 1) + (v10 < (unsigned long long)v11) + (unsigned long long)v9; } return result; }
submul: PUSH RBX TEST ECX,ECX JLE 0x001399cf MOV R9,RDX MOV ECX,ECX XOR R10D,R10D XOR EAX,EAX LAB_001399a3: CMP RCX,R10 JZ 0x001399cd MOV R11,qword ptr [RSI + R10*0x8] XOR EBX,EBX SUB R11,RAX SETC BL MOV RAX,R8 MUL qword ptr [R9 + R10*0x8] SUB R11,RAX MOV qword ptr [RDI + R10*0x8],R11 ADC RBX,RDX INC R10 MOV RAX,RBX JMP 0x001399a3 LAB_001399cd: POP RBX RET LAB_001399cf: LEA RDI,[0x1770fc] LEA RSI,[0x176f1e] LEA RCX,[0x177105] MOV EDX,0x67d CALL 0x00122110
/* intx::internal::submul(unsigned long*, unsigned long const*, unsigned long const*, int, unsigned long) */ void intx::internal::submul(ulong *param_1,ulong *param_2,ulong *param_3,int param_4,ulong param_5) { ulong uVar1; int1 auVar2 [16]; int1 auVar3 [16]; ulong uVar4; ulong uVar5; ulong uVar6; ulong uVar7; if (0 < param_4) { uVar5 = 0; for (uVar6 = 0; (uint)param_4 != uVar6; uVar6 = uVar6 + 1) { uVar1 = param_2[uVar6]; uVar7 = uVar1 - uVar5; auVar2._8_8_ = 0; auVar2._0_8_ = param_5; auVar3._8_8_ = 0; auVar3._0_8_ = param_3[uVar6]; uVar4 = SUB168(auVar2 * auVar3,0); param_1[uVar6] = uVar7 - uVar4; uVar5 = (ulong)(uVar1 < uVar5) + SUB168(auVar2 * auVar3,8) + (ulong)(uVar7 < uVar4); } return; } /* WARNING: Subroutine does not return */ __assert_fail("len >= 1", "/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O2/_deps/intx-src/include/intx/intx.hpp" ,0x67d, "uint64_t intx::internal::submul(uint64_t *, const uint64_t *, const uint64_t *, int, uint64_t)" ); }
47,566
google::protobuf::SourceCodeInfo::SourceCodeInfo(google::protobuf::SourceCodeInfo const&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
SourceCodeInfo::SourceCodeInfo(const SourceCodeInfo& from) : ::PROTOBUF_NAMESPACE_ID::Message() { SourceCodeInfo* const _this = this; (void)_this; new (&_impl_) Impl_{ decltype(_impl_.location_){from._impl_.location_} , /*decltype(_impl_._cached_size_)*/{}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); // @@protoc_insertion_point(copy_constructor:google.protobuf.SourceCodeInfo) }
O3
cpp
google::protobuf::SourceCodeInfo::SourceCodeInfo(google::protobuf::SourceCodeInfo const&): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r15 movq %rdi, %r14 leaq 0x8(%rdi), %rbx xorl %eax, %eax movq %rax, 0x8(%rdi) leaq 0x114670(%rip), %rcx # 0x20d650 movq %rcx, (%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rdi) movq %rax, 0x20(%rdi) cmpl $0x0, 0x18(%rsi) je 0xf900a leaq 0x10(%r14), %rdi leaq 0x10(%r15), %rsi leaq -0xfa37(%rip), %rdx # 0xe95cc xorl %ecx, %ecx callq 0x74546 movl $0x0, 0x28(%r14) movq 0x8(%r15), %rsi testb $0x1, %sil je 0xf902c andq $-0x4, %rsi addq $0x8, %rsi movq %rbx, %rdi callq 0x734be popq %rbx popq %r14 popq %r15 retq movq %rax, %r15 leaq 0x1114e4(%rip), %rax # 0x20a520 addq $0x10, %rax movq %rax, (%r14) movq %rbx, %rdi callq 0x73456 movq %r15, %rdi callq 0x2e220 nop
_ZN6google8protobuf14SourceCodeInfoC2ERKS1_: push r15 push r14 push rbx mov r15, rsi mov r14, rdi lea rbx, [rdi+8] xor eax, eax mov [rdi+8], rax lea rcx, off_20D650 mov [rdi], rcx xorps xmm0, xmm0 movups xmmword ptr [rdi+10h], xmm0 mov [rdi+20h], rax cmp dword ptr [rsi+18h], 0 jz short loc_F900A lea rdi, [r14+10h] lea rsi, [r15+10h] lea rdx, _ZN6google8protobuf8internal20RepeatedPtrFieldBase18MergeFromInnerLoopINS0_16RepeatedPtrFieldINS0_23SourceCodeInfo_LocationEE11TypeHandlerEEEvPPvS9_ii; google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInnerLoop<google::protobuf::RepeatedPtrField<google::protobuf::SourceCodeInfo_Location>::TypeHandler>(void **,void **,int,int) xor ecx, ecx call _ZN6google8protobuf8internal20RepeatedPtrFieldBase17MergeFromInternalERKS2_MS2_FvPPvS6_iiE; google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInternal(google::protobuf::internal::RepeatedPtrFieldBase const&,void (google::protobuf::internal::RepeatedPtrFieldBase::*)(void **,void **,int,int)) loc_F900A: mov dword ptr [r14+28h], 0 mov rsi, [r15+8] test sil, 1 jz short loc_F902C and rsi, 0FFFFFFFFFFFFFFFCh add rsi, 8 mov rdi, rbx call _ZN6google8protobuf8internal16InternalMetadata11DoMergeFromINS0_15UnknownFieldSetEEEvRKT_; google::protobuf::internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>(google::protobuf::UnknownFieldSet const&) loc_F902C: pop rbx pop r14 pop r15 retn mov r15, rax lea rax, _ZTVN6google8protobuf11MessageLiteE; `vtable for'google::protobuf::MessageLite add rax, 10h mov [r14], rax mov rdi, rbx; this call _ZN6google8protobuf8internal16InternalMetadataD2Ev; google::protobuf::internal::InternalMetadata::~InternalMetadata() mov rdi, r15 call __Unwind_Resume
signed int * google::protobuf::SourceCodeInfo::SourceCodeInfo( google::protobuf::SourceCodeInfo *this, const google::protobuf::SourceCodeInfo *a2) { signed int *result; // rax long long v3; // rsi result = 0LL; *((_QWORD *)this + 1) = 0LL; *(_QWORD *)this = off_20D650; *((_OWORD *)this + 1) = 0LL; *((_QWORD *)this + 4) = 0LL; if ( *((_DWORD *)a2 + 6) ) result = google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInternal( (long long)this + 16, (long long)a2 + 16, (char *)google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInnerLoop<google::protobuf::RepeatedPtrField<google::protobuf::SourceCodeInfo_Location>::TypeHandler>, 0LL); *((_DWORD *)this + 10) = 0; v3 = *((_QWORD *)a2 + 1); if ( (v3 & 1) != 0 ) return (signed int *)google::protobuf::internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet>( (long long *)this + 1, (const google::protobuf::UnknownFieldSet *)((v3 & 0xFFFFFFFFFFFFFFFCLL) + 8)); return result; }
SourceCodeInfo: PUSH R15 PUSH R14 PUSH RBX MOV R15,RSI MOV R14,RDI LEA RBX,[RDI + 0x8] XOR EAX,EAX MOV qword ptr [RDI + 0x8],RAX LEA RCX,[0x30d650] MOV qword ptr [RDI],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x10],XMM0 MOV qword ptr [RDI + 0x20],RAX CMP dword ptr [RSI + 0x18],0x0 JZ 0x001f900a LEA RDI,[R14 + 0x10] LEA RSI,[R15 + 0x10] LAB_001f8ffc: LEA RDX,[0x1e95cc] XOR ECX,ECX CALL 0x00174546 LAB_001f900a: MOV dword ptr [R14 + 0x28],0x0 MOV RSI,qword ptr [R15 + 0x8] TEST SIL,0x1 JZ 0x001f902c AND RSI,-0x4 ADD RSI,0x8 MOV RDI,RBX CALL 0x001734be LAB_001f902c: POP RBX POP R14 POP R15 RET
/* google::protobuf::SourceCodeInfo::SourceCodeInfo(google::protobuf::SourceCodeInfo const&) */ void __thiscall google::protobuf::SourceCodeInfo::SourceCodeInfo(SourceCodeInfo *this,SourceCodeInfo *param_1) { *(int8 *)(this + 8) = 0; *(int ***)this = &PTR__SourceCodeInfo_0030d650; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; if (*(int *)(param_1 + 0x18) != 0) { /* try { // try from 001f8ffc to 001f902b has its CatchHandler @ 001f9032 */ internal::RepeatedPtrFieldBase::MergeFromInternal ((RepeatedPtrFieldBase *)(this + 0x10), (_func_void_void_ptr_ptr_void_ptr_ptr_int_int *)(param_1 + 0x10)); } *(int4 *)(this + 0x28) = 0; if ((*(ulong *)(param_1 + 8) & 1) != 0) { internal::InternalMetadata::DoMergeFrom<google::protobuf::UnknownFieldSet> ((InternalMetadata *)(this + 8), (UnknownFieldSet *)((*(ulong *)(param_1 + 8) & 0xfffffffffffffffc) + 8)); } return; }
47,567
find_collation_data_inheritance_source
eloqsql/mysys/charset.c
static CHARSET_INFO *find_collation_data_inheritance_source(CHARSET_INFO *cs, myf flags) { const char *beg, *end; if (cs->tailoring && !strncmp(cs->tailoring, "[import ", 8) && (end= strchr(cs->tailoring + 8, ']')) && (beg= cs->tailoring + 8) + MY_CS_NAME_SIZE > end) { char name[MY_CS_NAME_SIZE + 1]; memcpy(name, beg, end - beg); name[end - beg]= '\0'; return inheritance_source_by_id(cs, get_collation_number(name,MYF(flags))); } return NULL; }
O0
c
find_collation_data_inheritance_source: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x40(%rbp) movq %rsi, -0x48(%rbp) movq -0x40(%rbp), %rax cmpq $0x0, 0x38(%rax) je 0x61ec6 movq -0x40(%rbp), %rax movq 0x38(%rax), %rdi leaq 0x4da9d(%rip), %rsi # 0xaf8c8 movl $0x8, %edx callq 0x26170 cmpl $0x0, %eax jne 0x61ec6 movq -0x40(%rbp), %rax movq 0x38(%rax), %rdi addq $0x8, %rdi movl $0x5d, %esi callq 0x26120 movq %rax, -0x58(%rbp) cmpq $0x0, %rax je 0x61ec6 movq -0x40(%rbp), %rax movq 0x38(%rax), %rax addq $0x8, %rax movq %rax, -0x50(%rbp) addq $0x20, %rax cmpq -0x58(%rbp), %rax jbe 0x61ec6 leaq -0x30(%rbp), %rdi movq -0x50(%rbp), %rsi movq -0x58(%rbp), %rdx movq -0x50(%rbp), %rax subq %rax, %rdx callq 0x26280 movq -0x58(%rbp), %rax movq -0x50(%rbp), %rcx subq %rcx, %rax movb $0x0, -0x30(%rbp,%rax) movq -0x40(%rbp), %rax movq %rax, -0x60(%rbp) leaq -0x30(%rbp), %rdi movq -0x48(%rbp), %rsi callq 0x5fc00 movq -0x60(%rbp), %rdi movl %eax, %esi callq 0x62040 movq %rax, -0x38(%rbp) jmp 0x61ece movq $0x0, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x68(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x61ef2 movq -0x68(%rbp), %rax addq $0x70, %rsp popq %rbp retq callq 0x26360 nopw (%rax,%rax)
find_collation_data_inheritance_source: push rbp mov rbp, rsp sub rsp, 70h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_40], rdi mov [rbp+var_48], rsi mov rax, [rbp+var_40] cmp qword ptr [rax+38h], 0 jz loc_61EC6 mov rax, [rbp+var_40] mov rdi, [rax+38h] lea rsi, aImport; "[import " mov edx, 8 call _strncmp cmp eax, 0 jnz loc_61EC6 mov rax, [rbp+var_40] mov rdi, [rax+38h] add rdi, 8 mov esi, 5Dh ; ']' call _strchr mov [rbp+var_58], rax cmp rax, 0 jz short loc_61EC6 mov rax, [rbp+var_40] mov rax, [rax+38h] add rax, 8 mov [rbp+var_50], rax add rax, 20h ; ' ' cmp rax, [rbp+var_58] jbe short loc_61EC6 lea rdi, [rbp+var_30] mov rsi, [rbp+var_50] mov rdx, [rbp+var_58] mov rax, [rbp+var_50] sub rdx, rax call _memcpy mov rax, [rbp+var_58] mov rcx, [rbp+var_50] sub rax, rcx mov [rbp+rax+var_30], 0 mov rax, [rbp+var_40] mov [rbp+var_60], rax lea rdi, [rbp+var_30] mov rsi, [rbp+var_48] call get_collation_number mov rdi, [rbp+var_60] mov esi, eax call inheritance_source_by_id mov [rbp+var_38], rax jmp short loc_61ECE loc_61EC6: mov [rbp+var_38], 0 loc_61ECE: mov rax, [rbp+var_38] mov [rbp+var_68], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_61EF2 mov rax, [rbp+var_68] add rsp, 70h pop rbp retn loc_61EF2: call ___stack_chk_fail
long long find_collation_data_inheritance_source(long long a1, long long a2) { unsigned int collation_number; // eax unsigned long long v4; // [rsp+18h] [rbp-58h] long long v5; // [rsp+20h] [rbp-50h] _BYTE v7[40]; // [rsp+40h] [rbp-30h] BYREF unsigned long long v8; // [rsp+68h] [rbp-8h] v8 = __readfsqword(0x28u); if ( !*(_QWORD *)(a1 + 56) ) return 0LL; if ( (unsigned int)strncmp(*(_QWORD *)(a1 + 56), "[import ", 8LL) ) return 0LL; v4 = strchr(*(_QWORD *)(a1 + 56) + 8LL, 93LL); if ( !v4 ) return 0LL; v5 = *(_QWORD *)(a1 + 56) + 8LL; if ( *(_QWORD *)(a1 + 56) + 40LL <= v4 ) return 0LL; memcpy(v7, v5, v4 - v5); v7[v4 - v5] = 0; collation_number = get_collation_number((long long)v7, a2); return inheritance_source_by_id(a1, collation_number); }
find_collation_data_inheritance_source: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x40],RDI MOV qword ptr [RBP + -0x48],RSI MOV RAX,qword ptr [RBP + -0x40] CMP qword ptr [RAX + 0x38],0x0 JZ 0x00161ec6 MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RAX + 0x38] LEA RSI,[0x1af8c8] MOV EDX,0x8 CALL 0x00126170 CMP EAX,0x0 JNZ 0x00161ec6 MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x8 MOV ESI,0x5d CALL 0x00126120 MOV qword ptr [RBP + -0x58],RAX CMP RAX,0x0 JZ 0x00161ec6 MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x38] ADD RAX,0x8 MOV qword ptr [RBP + -0x50],RAX ADD RAX,0x20 CMP RAX,qword ptr [RBP + -0x58] JBE 0x00161ec6 LEA RDI,[RBP + -0x30] MOV RSI,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + -0x50] SUB RDX,RAX CALL 0x00126280 MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x50] SUB RAX,RCX MOV byte ptr [RBP + RAX*0x1 + -0x30],0x0 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x60],RAX LEA RDI,[RBP + -0x30] MOV RSI,qword ptr [RBP + -0x48] CALL 0x0015fc00 MOV RDI,qword ptr [RBP + -0x60] MOV ESI,EAX CALL 0x00162040 MOV qword ptr [RBP + -0x38],RAX JMP 0x00161ece LAB_00161ec6: MOV qword ptr [RBP + -0x38],0x0 LAB_00161ece: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00161ef2 MOV RAX,qword ptr [RBP + -0x68] ADD RSP,0x70 POP RBP RET LAB_00161ef2: CALL 0x00126360
int8 find_collation_data_inheritance_source(long param_1,int8 param_2) { int iVar1; int4 uVar2; char *pcVar3; void *__src; long in_FS_OFFSET; int8 local_40; char local_38 [40]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); if (*(long *)(param_1 + 0x38) != 0) { iVar1 = strncmp(*(char **)(param_1 + 0x38),"[import ",8); if (iVar1 == 0) { pcVar3 = strchr((char *)(*(long *)(param_1 + 0x38) + 8),0x5d); if ((pcVar3 != (char *)0x0) && (__src = (void *)(*(long *)(param_1 + 0x38) + 8), pcVar3 < (char *)(*(long *)(param_1 + 0x38) + 0x28))) { memcpy(local_38,__src,(long)pcVar3 - (long)__src); pcVar3[(long)(local_38 + -(long)__src)] = '\0'; uVar2 = get_collation_number(local_38,param_2); local_40 = inheritance_source_by_id(param_1,uVar2); goto LAB_00161ece; } } } local_40 = 0; LAB_00161ece: if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_40; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
47,568
vector_d_create
tsotchke[P]eshkol/src/core/utils/vector.c
VectorD* vector_d_create(Arena* arena, size_t dim) { assert(arena != NULL); assert(dim > 0 && dim <= VECTOR_MAX_DIM); VectorD* vec = arena_alloc_aligned(arena, sizeof(VectorD), VECTOR_ALIGNMENT); if (!vec) { return NULL; } vec->dim = dim; memset(vec->data, 0, sizeof(vec->data)); return vec; }
O3
c
vector_d_create: pushq %rbx testq %rdi, %rdi je 0x4299 movq %rsi, %rbx leaq -0x1(%rsi), %rax cmpq $0x4, %rax jae 0x42b8 movl $0x40, %esi movl $0x20, %edx callq 0x3e09 testq %rax, %rax je 0x4297 movq %rbx, 0x20(%rax) xorps %xmm0, %xmm0 movaps %xmm0, (%rax) movaps %xmm0, 0x10(%rax) popq %rbx retq leaq 0x2e9f(%rip), %rdi # 0x713f leaq 0x4449(%rip), %rsi # 0x86f0 leaq 0x456d(%rip), %rcx # 0x881b movl $0x57, %edx callq 0x1090 leaq 0x44ad(%rip), %rdi # 0x876c leaq 0x442a(%rip), %rsi # 0x86f0 leaq 0x454e(%rip), %rcx # 0x881b movl $0x58, %edx callq 0x1090
vector_d_create: push rbx test rdi, rdi jz short loc_4299 mov rbx, rsi lea rax, [rsi-1] cmp rax, 4 jnb short loc_42B8 mov esi, 40h ; '@' mov edx, 20h ; ' ' call arena_alloc_aligned test rax, rax jz short loc_4297 mov [rax+20h], rbx xorps xmm0, xmm0 movaps xmmword ptr [rax], xmm0 movaps xmmword ptr [rax+10h], xmm0 loc_4297: pop rbx retn loc_4299: lea rdi, aArenaNull; "arena != NULL" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVectordVectorD; "VectorD *vector_d_create(Arena *, size_"... mov edx, 57h ; 'W' call ___assert_fail loc_42B8: lea rdi, aDim0DimVectorM; "dim > 0 && dim <= VECTOR_MAX_DIM" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVectordVectorD; "VectorD *vector_d_create(Arena *, size_"... mov edx, 58h ; 'X' call ___assert_fail
long long vector_d_create(_QWORD *a1, long long a2) { long long result; // rax if ( !a1 ) __assert_fail( "arena != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c", 87LL, "VectorD *vector_d_create(Arena *, size_t)"); if ( (unsigned long long)(a2 - 1) >= 4 ) __assert_fail( "dim > 0 && dim <= VECTOR_MAX_DIM", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c", 88LL, "VectorD *vector_d_create(Arena *, size_t)"); result = arena_alloc_aligned(a1, 64LL, 0x20uLL); if ( result ) { *(_QWORD *)(result + 32) = a2; *(_OWORD *)result = 0LL; *(_OWORD *)(result + 16) = 0LL; } return result; }
vector_d_create: PUSH RBX TEST RDI,RDI JZ 0x00104299 MOV RBX,RSI LEA RAX,[RSI + -0x1] CMP RAX,0x4 JNC 0x001042b8 MOV ESI,0x40 MOV EDX,0x20 CALL 0x00103e09 TEST RAX,RAX JZ 0x00104297 MOV qword ptr [RAX + 0x20],RBX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RAX],XMM0 MOVAPS xmmword ptr [RAX + 0x10],XMM0 LAB_00104297: POP RBX RET LAB_00104299: LEA RDI,[0x10713f] LEA RSI,[0x1086f0] LEA RCX,[0x10881b] MOV EDX,0x57 CALL 0x00101090 LAB_001042b8: LEA RDI,[0x10876c] LEA RSI,[0x1086f0] LEA RCX,[0x10881b] MOV EDX,0x58 CALL 0x00101090
void vector_d_create(long param_1,long param_2) { int8 *puVar1; if (param_1 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("arena != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c" ,0x57,"VectorD *vector_d_create(Arena *, size_t)"); } if (param_2 - 1U < 4) { puVar1 = (int8 *)arena_alloc_aligned(param_1,0x40,0x20); if (puVar1 != (int8 *)0x0) { puVar1[4] = param_2; *puVar1 = 0; puVar1[1] = 0; puVar1[2] = 0; puVar1[3] = 0; } return; } /* WARNING: Subroutine does not return */ __assert_fail("dim > 0 && dim <= VECTOR_MAX_DIM", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c", 0x58,"VectorD *vector_d_create(Arena *, size_t)"); }
47,569
ma_open
eloqsql/libmariadb/libmariadb/ma_io.c
MA_FILE *ma_open(const char *location, const char *mode, MYSQL *mysql) { int CodePage= -1; FILE *fp= NULL; MA_FILE *ma_file= NULL; if (!location || !location[0]) return NULL; #ifdef HAVE_REMOTEIO if (strstr(location, "://")) goto remote; #endif #ifdef _WIN32 if (mysql && mysql->charset) CodePage= madb_get_windows_cp(mysql->charset->csname); #endif if (CodePage == -1) { if (!(fp= fopen(location, mode))) { return NULL; } } #ifdef _WIN32 /* See CONC-44: we need to support non ascii filenames too, so we convert current character set to wchar_t and try to open the file via _wsopen */ else { wchar_t *w_filename= NULL; wchar_t *w_mode= NULL; int len; DWORD Length; len= MultiByteToWideChar(CodePage, 0, location, (int)strlen(location), NULL, 0); if (!len) return NULL; if (!(w_filename= (wchar_t *)calloc(1, (len + 1) * sizeof(wchar_t)))) { my_set_error(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); return NULL; } Length= len; len= MultiByteToWideChar(CodePage, 0, location, (int)strlen(location), w_filename, (int)Length); if (!len) { /* todo: error handling */ free(w_filename); return NULL; } len= (int)strlen(mode); if (!(w_mode= (wchar_t *)calloc(1, (len + 1) * sizeof(wchar_t)))) { my_set_error(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); free(w_filename); return NULL; } Length= len; len= MultiByteToWideChar(CodePage, 0, mode, (int)strlen(mode), w_mode, (int)Length); if (!len) { /* todo: error handling */ free(w_filename); free(w_mode); return NULL; } fp= _wfopen(w_filename, w_mode); free(w_filename); free(w_mode); } #endif if (fp) { ma_file= (MA_FILE *)malloc(sizeof(MA_FILE)); if (!ma_file) { fclose(fp); my_set_error(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); return NULL; } ma_file->type= MA_FILE_LOCAL; ma_file->ptr= (void *)fp; } return ma_file; #ifdef HAVE_REMOTEIO remote: /* check if plugin for remote io is available and try * to open location */ { MYSQL mysql; if (rio_plugin ||(rio_plugin= (struct st_mysql_client_plugin_REMOTEIO *) mysql_client_find_plugin(&mysql, NULL, MARIADB_CLIENT_REMOTEIO_PLUGIN))) return rio_plugin->methods->mopen(location, mode); return NULL; } #endif }
O0
c
ma_open: pushq %rbp movq %rsp, %rbp subq $0x540, %rsp # imm = 0x540 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x510(%rbp) movq %rsi, -0x518(%rbp) movq %rdx, -0x520(%rbp) movl $0xffffffff, -0x524(%rbp) # imm = 0xFFFFFFFF movq $0x0, -0x530(%rbp) movq $0x0, -0x538(%rbp) cmpq $0x0, -0x510(%rbp) je 0x50c43 movq -0x510(%rbp), %rax cmpb $0x0, (%rax) jne 0x50c53 movq $0x0, -0x508(%rbp) jmp 0x50da4 movq -0x510(%rbp), %rdi leaq 0x1a231(%rip), %rsi # 0x6ae92 callq 0x14100 cmpq $0x0, %rax je 0x50c71 jmp 0x50d3d cmpl $-0x1, -0x524(%rbp) jne 0x50cac movq -0x510(%rbp), %rdi movq -0x518(%rbp), %rsi callq 0x144e0 movq %rax, -0x530(%rbp) cmpq $0x0, %rax jne 0x50caa movq $0x0, -0x508(%rbp) jmp 0x50da4 jmp 0x50cac cmpq $0x0, -0x530(%rbp) je 0x50d2d movl $0x10, %edi callq 0x145c0 movq %rax, -0x538(%rbp) cmpq $0x0, -0x538(%rbp) jne 0x50d0e movq -0x530(%rbp), %rdi callq 0x14430 movq -0x520(%rbp), %rdi leaq 0x301b5(%rip), %rax # 0x80ea0 movq (%rax), %rdx movl $0x7d8, %esi # imm = 0x7D8 xorl %eax, %eax movl %eax, %ecx movb $0x0, %al callq 0x307d0 movq $0x0, -0x508(%rbp) jmp 0x50da4 movq -0x538(%rbp), %rax movl $0x1, (%rax) movq -0x530(%rbp), %rcx movq -0x538(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x538(%rbp), %rax movq %rax, -0x508(%rbp) jmp 0x50da4 leaq 0x31f8c(%rip), %rax # 0x82cd0 cmpq $0x0, (%rax) jne 0x50d6f leaq -0x500(%rbp), %rdi xorl %eax, %eax movl %eax, %esi movl $0x64, %edx callq 0x50a10 leaq 0x31f6a(%rip), %rcx # 0x82cd0 movq %rax, (%rcx) cmpq $0x0, %rax je 0x50d99 leaq 0x31f5a(%rip), %rax # 0x82cd0 movq (%rax), %rax movq 0x58(%rax), %rax movq (%rax), %rax movq -0x510(%rbp), %rdi movq -0x518(%rbp), %rsi callq *%rax movq %rax, -0x508(%rbp) jmp 0x50da4 movq $0x0, -0x508(%rbp) movq -0x508(%rbp), %rax movq %rax, -0x540(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x50dd4 movq -0x540(%rbp), %rax addq $0x540, %rsp # imm = 0x540 popq %rbp retq callq 0x144c0 nopl (%rax)
ma_open: push rbp mov rbp, rsp sub rsp, 540h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_510], rdi mov [rbp+var_518], rsi mov [rbp+var_520], rdx mov [rbp+var_524], 0FFFFFFFFh mov [rbp+var_530], 0 mov [rbp+var_538], 0 cmp [rbp+var_510], 0 jz short loc_50C43 mov rax, [rbp+var_510] cmp byte ptr [rax], 0 jnz short loc_50C53 loc_50C43: mov [rbp+var_508], 0 jmp loc_50DA4 loc_50C53: mov rdi, [rbp+var_510] lea rsi, asc_6AE92; "://" call _strstr cmp rax, 0 jz short loc_50C71 jmp loc_50D3D loc_50C71: cmp [rbp+var_524], 0FFFFFFFFh jnz short loc_50CAC mov rdi, [rbp+var_510] mov rsi, [rbp+var_518] call _fopen64 mov [rbp+var_530], rax cmp rax, 0 jnz short loc_50CAA mov [rbp+var_508], 0 jmp loc_50DA4 loc_50CAA: jmp short $+2 loc_50CAC: cmp [rbp+var_530], 0 jz short loc_50D2D mov edi, 10h call _malloc mov [rbp+var_538], rax cmp [rbp+var_538], 0 jnz short loc_50D0E mov rdi, [rbp+var_530] call _fclose mov rdi, [rbp+var_520] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov esi, 7D8h xor eax, eax mov ecx, eax mov al, 0 call my_set_error mov [rbp+var_508], 0 jmp loc_50DA4 loc_50D0E: mov rax, [rbp+var_538] mov dword ptr [rax], 1 mov rcx, [rbp+var_530] mov rax, [rbp+var_538] mov [rax+8], rcx loc_50D2D: mov rax, [rbp+var_538] mov [rbp+var_508], rax jmp short loc_50DA4 loc_50D3D: lea rax, rio_plugin cmp qword ptr [rax], 0 jnz short loc_50D6F lea rdi, [rbp+var_500] xor eax, eax mov esi, eax mov edx, 64h ; 'd' call mysql_client_find_plugin lea rcx, rio_plugin mov [rcx], rax cmp rax, 0 jz short loc_50D99 loc_50D6F: lea rax, rio_plugin mov rax, [rax] mov rax, [rax+58h] mov rax, [rax] mov rdi, [rbp+var_510] mov rsi, [rbp+var_518] call rax mov [rbp+var_508], rax jmp short loc_50DA4 loc_50D99: mov [rbp+var_508], 0 loc_50DA4: mov rax, [rbp+var_508] mov [rbp+var_540], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_50DD4 mov rax, [rbp+var_540] add rsp, 540h pop rbp retn loc_50DD4: call ___stack_chk_fail
long long ma_open(_BYTE *a1, long long a2, long long a3) { long long v4; // [rsp+8h] [rbp-538h] long long v5; // [rsp+10h] [rbp-530h] _BYTE v8[1272]; // [rsp+40h] [rbp-500h] BYREF unsigned long long v9; // [rsp+538h] [rbp-8h] v9 = __readfsqword(0x28u); if ( !a1 || !*a1 ) return 0LL; if ( strstr(a1, "://") ) { if ( rio_plugin ) return (**(long long ( ***)(_BYTE *, long long))(rio_plugin + 88LL))(a1, a2); rio_plugin = mysql_client_find_plugin((long long)v8, 0LL, 0x64u); if ( rio_plugin ) return (**(long long ( ***)(_BYTE *, long long))(rio_plugin + 88LL))(a1, a2); else return 0LL; } else { v5 = fopen64(a1, a2); if ( v5 ) { v4 = malloc(16LL); if ( v4 ) { *(_DWORD *)v4 = 1; *(_QWORD *)(v4 + 8) = v5; return v4; } else { fclose(v5); my_set_error(a3, 0x7D8u, (long long)SQLSTATE_UNKNOWN, 0LL); return 0LL; } } else { return 0LL; } } }
ma_open: PUSH RBP MOV RBP,RSP SUB RSP,0x540 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x510],RDI MOV qword ptr [RBP + -0x518],RSI MOV qword ptr [RBP + -0x520],RDX MOV dword ptr [RBP + -0x524],0xffffffff MOV qword ptr [RBP + -0x530],0x0 MOV qword ptr [RBP + -0x538],0x0 CMP qword ptr [RBP + -0x510],0x0 JZ 0x00150c43 MOV RAX,qword ptr [RBP + -0x510] CMP byte ptr [RAX],0x0 JNZ 0x00150c53 LAB_00150c43: MOV qword ptr [RBP + -0x508],0x0 JMP 0x00150da4 LAB_00150c53: MOV RDI,qword ptr [RBP + -0x510] LEA RSI,[0x16ae92] CALL 0x00114100 CMP RAX,0x0 JZ 0x00150c71 JMP 0x00150d3d LAB_00150c71: CMP dword ptr [RBP + -0x524],-0x1 JNZ 0x00150cac MOV RDI,qword ptr [RBP + -0x510] MOV RSI,qword ptr [RBP + -0x518] CALL 0x001144e0 MOV qword ptr [RBP + -0x530],RAX CMP RAX,0x0 JNZ 0x00150caa MOV qword ptr [RBP + -0x508],0x0 JMP 0x00150da4 LAB_00150caa: JMP 0x00150cac LAB_00150cac: CMP qword ptr [RBP + -0x530],0x0 JZ 0x00150d2d MOV EDI,0x10 CALL 0x001145c0 MOV qword ptr [RBP + -0x538],RAX CMP qword ptr [RBP + -0x538],0x0 JNZ 0x00150d0e MOV RDI,qword ptr [RBP + -0x530] CALL 0x00114430 MOV RDI,qword ptr [RBP + -0x520] LEA RAX,[0x180ea0] MOV RDX,qword ptr [RAX] MOV ESI,0x7d8 XOR EAX,EAX MOV ECX,EAX MOV AL,0x0 CALL 0x001307d0 MOV qword ptr [RBP + -0x508],0x0 JMP 0x00150da4 LAB_00150d0e: MOV RAX,qword ptr [RBP + -0x538] MOV dword ptr [RAX],0x1 MOV RCX,qword ptr [RBP + -0x530] MOV RAX,qword ptr [RBP + -0x538] MOV qword ptr [RAX + 0x8],RCX LAB_00150d2d: MOV RAX,qword ptr [RBP + -0x538] MOV qword ptr [RBP + -0x508],RAX JMP 0x00150da4 LAB_00150d3d: LEA RAX,[0x182cd0] CMP qword ptr [RAX],0x0 JNZ 0x00150d6f LEA RDI,[RBP + -0x500] XOR EAX,EAX MOV ESI,EAX MOV EDX,0x64 CALL 0x00150a10 LEA RCX,[0x182cd0] MOV qword ptr [RCX],RAX CMP RAX,0x0 JZ 0x00150d99 LAB_00150d6f: LEA RAX,[0x182cd0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x58] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x510] MOV RSI,qword ptr [RBP + -0x518] CALL RAX MOV qword ptr [RBP + -0x508],RAX JMP 0x00150da4 LAB_00150d99: MOV qword ptr [RBP + -0x508],0x0 LAB_00150da4: MOV RAX,qword ptr [RBP + -0x508] MOV qword ptr [RBP + -0x540],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00150dd4 MOV RAX,qword ptr [RBP + -0x540] ADD RSP,0x540 POP RBP RET LAB_00150dd4: CALL 0x001144c0
int4 * ma_open(char *param_1,char *param_2,int8 param_3) { char *pcVar1; FILE *__stream; long in_FS_OFFSET; int4 *local_540; int4 *local_510; int1 local_508 [1272]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_540 = (int4 *)0x0; if ((param_1 == (char *)0x0) || (*param_1 == '\0')) { local_510 = (int4 *)0x0; } else { pcVar1 = strstr(param_1,"://"); if (pcVar1 == (char *)0x0) { __stream = fopen64(param_1,param_2); if (__stream == (FILE *)0x0) { local_510 = (int4 *)0x0; } else { if (__stream != (FILE *)0x0) { local_540 = (int4 *)malloc(0x10); if (local_540 == (int4 *)0x0) { fclose(__stream); my_set_error(param_3,0x7d8,SQLSTATE_UNKNOWN,0); local_510 = (int4 *)0x0; goto LAB_00150da4; } *local_540 = 1; *(FILE **)(local_540 + 2) = __stream; } local_510 = local_540; } } else if ((rio_plugin == 0) && (rio_plugin = mysql_client_find_plugin(local_508,0,100), rio_plugin == 0)) { local_510 = (int4 *)0x0; } else { local_510 = (int4 *)(*(code *)**(int8 **)(rio_plugin + 0x58))(param_1,param_2); } } LAB_00150da4: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_510; }
47,570
minja::Value::operator+(minja::Value const&) const
monkey531[P]llama/common/minja.hpp
Value operator+(const Value& rhs) const { if (is_string() || rhs.is_string()) { return to_str() + rhs.to_str(); } else if (is_number_integer() && rhs.is_number_integer()) { return get<int64_t>() + rhs.get<int64_t>(); } else if (is_array() && rhs.is_array()) { auto res = Value::array(); for (const auto& item : *array_) res.push_back(item); for (const auto& item : *rhs.array_) res.push_back(item); return res; } else { return get<double>() + rhs.get<double>(); } }
O3
cpp
minja::Value::operator+(minja::Value const&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movb 0x40(%rsi), %al cmpb $0x3, %al je 0x6accb movb 0x40(%r14), %cl cmpb $0x3, %cl jne 0x6ad39 leaq 0x50(%rsp), %rdi movq %r15, %rsi callq 0x6ab0a leaq 0x28(%rsp), %rdi movq %r14, %rsi callq 0x6ab0a leaq 0x60(%rsp), %r14 movq -0x10(%r14), %rcx movq -0x8(%r14), %r8 movq 0x30(%rsp), %rdx leaq (%rdx,%r8), %rax movl $0xf, %edi cmpq %r14, %rcx je 0x6ad0a movq 0x60(%rsp), %rdi movq 0x28(%rsp), %rsi cmpq %rdi, %rax jbe 0x6ad2d leaq 0x38(%rsp), %r9 movl $0xf, %edi cmpq %r9, %rsi je 0x6ad28 movq 0x38(%rsp), %rdi cmpq %rdi, %rax jbe 0x6ad8f leaq 0x50(%rsp), %rdi callq 0x19210 jmp 0x6ad9d addb $-0x5, %al addb $-0x5, %cl orb %al, %cl cmpb $0x1, %cl ja 0x6ae49 movq %r15, %rdi callq 0x50a3a movq %rax, %r15 movq %r14, %rdi callq 0x50a3a addq %rax, %r15 leaq 0x40(%rbx), %r14 xorpd %xmm0, %xmm0 movupd %xmm0, (%rbx) movupd %xmm0, 0x10(%rbx) movupd %xmm0, 0x20(%rbx) movupd %xmm0, 0x30(%rbx) movupd %xmm0, 0x40(%rbx) movq %r14, %rdi movq %r15, %rsi callq 0x51ba4 jmp 0x6aedd leaq 0x28(%rsp), %rdi xorl %esi, %esi xorl %edx, %edx callq 0x198b0 leaq 0x18(%rsp), %rdx movq %rdx, -0x10(%rdx) movq (%rax), %rsi leaq 0x10(%rax), %rcx cmpq %rcx, %rsi je 0x6adc1 movq %rsi, 0x8(%rsp) movq (%rcx), %rdx movq %rdx, 0x18(%rsp) jmp 0x6adc9 movupd (%rcx), %xmm0 movupd %xmm0, (%rdx) movq %rax, %rdx addq $0x8, %rdx movq 0x8(%rax), %rsi movq %rsi, 0x10(%rsp) movq %rcx, (%rax) movq $0x0, (%rdx) movb $0x0, (%rcx) leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x55588 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x6ae0e movq 0x18(%rsp), %rsi incq %rsi callq 0x197f0 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x6ae29 movq 0x38(%rsp), %rsi incq %rsi callq 0x197f0 movq 0x50(%rsp), %rdi cmpq %r14, %rdi je 0x6aeea movq 0x60(%rsp), %rsi incq %rsi callq 0x197f0 jmp 0x6aeea cmpq $0x0, 0x10(%r15) je 0x6ae9f cmpq $0x0, 0x10(%r14) je 0x6ae9f xorpd %xmm0, %xmm0 leaq 0x70(%rsp), %rsi movapd %xmm0, (%rsi) movq $0x0, 0x10(%rsi) movq %rbx, %rdi callq 0x62202 leaq 0x70(%rsp), %rdi callq 0x619ec movq 0x10(%r15), %rax movq (%rax), %r15 movq 0x8(%rax), %r12 cmpq %r12, %r15 je 0x6aefc movq %rbx, %rdi movq %r15, %rsi callq 0x622ba addq $0x50, %r15 jmp 0x6ae89 movq %r15, %rdi callq 0x50b84 movsd %xmm0, 0x48(%rsp) movq %r14, %rdi callq 0x50b84 addsd 0x48(%rsp), %xmm0 leaq 0x40(%rbx), %r14 xorps %xmm1, %xmm1 movups %xmm1, (%rbx) movups %xmm1, 0x10(%rbx) movups %xmm1, 0x20(%rbx) movups %xmm1, 0x30(%rbx) movups %xmm1, 0x40(%rbx) movq %r14, %rdi callq 0x5250e movq %r14, %rdi movl $0x1, %esi callq 0x5099a movq %rbx, %rax addq $0x88, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq 0x10(%r14), %rax movq (%rax), %r14 movq 0x8(%rax), %r15 cmpq %r15, %r14 je 0x6aeea movq %rbx, %rdi movq %r14, %rsi callq 0x622ba addq $0x50, %r14 jmp 0x6af07 movq %rax, %r14 leaq 0x70(%rsp), %rdi callq 0x619ec jmp 0x6af99 movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x6af4f movq 0x18(%rsp), %rsi incq %rsi callq 0x197f0 jmp 0x6af4f movq %rax, %r14 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x6af6f movq 0x38(%rsp), %rsi incq %rsi callq 0x197f0 jmp 0x6af6f movq %rax, %r14 leaq 0x60(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x6af99 movq 0x60(%rsp), %rsi incq %rsi callq 0x197f0 jmp 0x6af99 jmp 0x6af8e movq %rax, %r14 movq %rbx, %rdi callq 0x5090e movq %r14, %rdi callq 0x19dc0 nop
_ZNK5minja5ValueplERKS0_: push r15 push r14 push r12 push rbx sub rsp, 88h mov r14, rdx mov r15, rsi mov rbx, rdi mov al, [rsi+40h] cmp al, 3 jz short loc_6ACCB mov cl, [r14+40h] cmp cl, 3 jnz short loc_6AD39 loc_6ACCB: lea rdi, [rsp+0A8h+var_58] mov rsi, r15 call _ZNK5minja5Value6to_strB5cxx11Ev; minja::Value::to_str(void) lea rdi, [rsp+0A8h+var_80] mov rsi, r14 call _ZNK5minja5Value6to_strB5cxx11Ev; minja::Value::to_str(void) lea r14, [rsp+0A8h+var_48] mov rcx, [r14-10h] mov r8, [r14-8] mov rdx, [rsp+0A8h+var_78] lea rax, [rdx+r8] mov edi, 0Fh cmp rcx, r14 jz short loc_6AD0A mov rdi, [rsp+0A8h+var_48] loc_6AD0A: mov rsi, [rsp+0A8h+var_80] cmp rax, rdi jbe short loc_6AD2D lea r9, [rsp+0A8h+var_70] mov edi, 0Fh cmp rsi, r9 jz short loc_6AD28 mov rdi, [rsp+0A8h+var_70] loc_6AD28: cmp rax, rdi jbe short loc_6AD8F loc_6AD2D: lea rdi, [rsp+0A8h+var_58] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) jmp short loc_6AD9D loc_6AD39: add al, 0FBh add cl, 0FBh or cl, al cmp cl, 1 ja loc_6AE49 mov rdi, r15 call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void) mov r15, rax mov rdi, r14 call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void) add r15, rax lea r14, [rbx+40h] xorpd xmm0, xmm0 movupd xmmword ptr [rbx], xmm0 movupd xmmword ptr [rbx+10h], xmm0 movupd xmmword ptr [rbx+20h], xmm0 movupd xmmword ptr [rbx+30h], xmm0 movupd xmmword ptr [rbx+40h], xmm0 mov rdi, r14 mov rsi, r15 call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE5EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_16number_integer_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::number_integer_t) jmp loc_6AEDD loc_6AD8F: lea rdi, [rsp+0A8h+var_80] xor esi, esi xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong) loc_6AD9D: lea rdx, [rsp+0A8h+var_90] mov [rdx-10h], rdx mov rsi, [rax] lea rcx, [rax+10h] cmp rsi, rcx jz short loc_6ADC1 mov [rsp+0A8h+var_A0], rsi mov rdx, [rcx] mov [rsp+0A8h+var_90], rdx jmp short loc_6ADC9 loc_6ADC1: movupd xmm0, xmmword ptr [rcx] movupd xmmword ptr [rdx], xmm0 loc_6ADC9: mov rdx, rax add rdx, 8 mov rsi, [rax+8] mov [rsp+0A8h+var_98], rsi mov [rax], rcx mov qword ptr [rdx], 0 mov byte ptr [rcx], 0 lea rsi, [rsp+0A8h+var_A0] mov rdi, rbx call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) lea rax, [rsp+0A8h+var_90] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_6AE0E mov rsi, [rsp+0A8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6AE0E: lea rax, [rsp+0A8h+var_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_6AE29 mov rsi, [rsp+0A8h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6AE29: mov rdi, [rsp+0A8h+var_58]; void * cmp rdi, r14 jz loc_6AEEA mov rsi, [rsp+0A8h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp loc_6AEEA loc_6AE49: cmp qword ptr [r15+10h], 0 jz short loc_6AE9F cmp qword ptr [r14+10h], 0 jz short loc_6AE9F xorpd xmm0, xmm0 lea rsi, [rsp+0A8h+var_38] movapd xmmword ptr [rsi], xmm0 mov qword ptr [rsi+10h], 0 mov rdi, rbx call _ZN5minja5Value5arrayESt6vectorIS0_SaIS0_EE; minja::Value::array(std::vector<minja::Value>) lea rdi, [rsp+0A8h+var_38] call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() mov rax, [r15+10h] mov r15, [rax] mov r12, [rax+8] loc_6AE89: cmp r15, r12 jz short loc_6AEFC mov rdi, rbx; this mov rsi, r15; minja::Value * call _ZN5minja5Value9push_backERKS0_; minja::Value::push_back(minja::Value const&) add r15, 50h ; 'P' jmp short loc_6AE89 loc_6AE9F: mov rdi, r15 call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) movsd [rsp+0A8h+var_60], xmm0 mov rdi, r14 call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) addsd xmm0, [rsp+0A8h+var_60] lea r14, [rbx+40h] xorps xmm1, xmm1 movups xmmword ptr [rbx], xmm1 movups xmmword ptr [rbx+10h], xmm1 movups xmmword ptr [rbx+20h], xmm1 movups xmmword ptr [rbx+30h], xmm1 movups xmmword ptr [rbx+40h], xmm1 mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE7EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_14number_float_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::number_float_t) loc_6AEDD: 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) loc_6AEEA: mov rax, rbx add rsp, 88h pop rbx pop r12 pop r14 pop r15 retn loc_6AEFC: mov rax, [r14+10h] mov r14, [rax] mov r15, [rax+8] loc_6AF07: cmp r14, r15 jz short loc_6AEEA mov rdi, rbx; this mov rsi, r14; minja::Value * call _ZN5minja5Value9push_backERKS0_; minja::Value::push_back(minja::Value const&) add r14, 50h ; 'P' jmp short loc_6AF07 mov r14, rax lea rdi, [rsp+arg_68] call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() jmp short loc_6AF99 mov r14, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_6AF4F mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_6AF4F mov r14, rax loc_6AF4F: lea rax, [rsp+arg_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_6AF6F mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_6AF6F mov r14, rax loc_6AF6F: lea rax, [rsp+arg_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_6AF99 mov rsi, [rsp+arg_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_6AF99 jmp short $+2 loc_6AF8E: mov r14, rax mov rdi, rbx; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_6AF99: mov rdi, r14 call __Unwind_Resume
minja::Value * minja::Value::operator+( minja::Value *this, long long a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { char v13; // al char v14; // cl double v15; // xmm4_8 double v16; // xmm5_8 char *v17; // rax unsigned long long v18; // rdi unsigned long long v19; // rdi __int128 **v20; // rax long long v21; // r15 long long v22; // rax char *v23; // r14 __int128 *v24; // rcx const minja::Value **v25; // rax const minja::Value *v26; // r15 const minja::Value *v27; // r12 double v28; // xmm0_8 const minja::Value **v30; // rax const minja::Value *v31; // r14 const minja::Value *v32; // r15 __int128 *v33; // [rsp+8h] [rbp-A0h] __int128 v34; // [rsp+18h] [rbp-90h] BYREF void *v35[2]; // [rsp+28h] [rbp-80h] BYREF _QWORD v36[2]; // [rsp+38h] [rbp-70h] BYREF double v37; // [rsp+48h] [rbp-60h] void *v38; // [rsp+50h] [rbp-58h] BYREF long long v39; // [rsp+58h] [rbp-50h] _QWORD v40[2]; // [rsp+60h] [rbp-48h] BYREF __int128 v41; // [rsp+70h] [rbp-38h] BYREF long long v42; // [rsp+80h] [rbp-28h] v13 = *(_BYTE *)(a2 + 64); if ( v13 != 3 ) { v14 = *(_BYTE *)(a3 + 64); if ( v14 != 3 ) { if ( (unsigned __int8)((v13 - 5) | (v14 - 5)) > 1u ) { if ( *(_QWORD *)(a2 + 16) && *(_QWORD *)(a3 + 16) ) { v41 = 0LL; v42 = 0LL; minja::Value::array((long long)this, (long long *)&v41); std::vector<minja::Value>::~vector(&v41); v25 = *(const minja::Value ***)(a2 + 16); v26 = *v25; v27 = v25[1]; while ( v26 != v27 ) { minja::Value::push_back(this, v26); v26 = (const minja::Value *)((char *)v26 + 80); } v30 = *(const minja::Value ***)(a3 + 16); v31 = *v30; v32 = v30[1]; while ( v31 != v32 ) { minja::Value::push_back(this, v31); v31 = (const minja::Value *)((char *)v31 + 80); } return this; } v37 = minja::Value::get<double>(a2); v28 = minja::Value::get<double>(a3) + v37; v23 = (char *)this + 64; *(_OWORD *)this = 0LL; *((_OWORD *)this + 1) = 0LL; *((_OWORD *)this + 2) = 0LL; *((_OWORD *)this + 3) = 0LL; *((_OWORD *)this + 4) = 0LL; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( (unsigned __int8 *)this + 64, v28); } else { v21 = minja::Value::get<long>(a2); v22 = minja::Value::get<long>(a3); v23 = (char *)this + 64; *(_OWORD *)this = 0LL; *((_OWORD *)this + 1) = 0LL; *((_OWORD *)this + 2) = 0LL; *((_OWORD *)this + 3) = 0LL; *((_OWORD *)this + 4) = 0LL; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( (char *)this + 64, v22 + v21); } 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(v23); return this; } } minja::Value::to_str[abi:cxx11](&v38, a2, a4, a5, a6, a7, a8, a9, a10, a11); minja::Value::to_str[abi:cxx11](v35, a3, a4, a5, a6, a7, v15, v16, a10, a11); v17 = (char *)v35[1] + v39; v18 = 15LL; if ( v38 != v40 ) v18 = v40[0]; if ( (unsigned long long)v17 <= v18 ) goto LABEL_9; v19 = 15LL; if ( v35[0] != v36 ) v19 = v36[0]; if ( (unsigned long long)v17 <= v19 ) v20 = (__int128 **)std::string::replace(v35, 0LL, 0LL, v38, v39); else LABEL_9: v20 = (__int128 **)std::string::_M_append(&v38, v35[0]); v33 = &v34; v24 = (__int128 *)(v20 + 2); if ( *v20 == (__int128 *)(v20 + 2) ) { v34 = *v24; } else { v33 = *v20; *(_QWORD *)&v34 = *(_QWORD *)v24; } *v20 = v24; v20[1] = 0LL; *(_BYTE *)v24 = 0; minja::Value::Value(this); if ( v33 != &v34 ) operator delete(v33, v34 + 1); if ( v35[0] != v36 ) operator delete(v35[0], v36[0] + 1LL); if ( v38 != v40 ) operator delete(v38, v40[0] + 1LL); return this; }
operator+: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x88 MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV AL,byte ptr [RSI + 0x40] CMP AL,0x3 JZ 0x0016accb MOV CL,byte ptr [R14 + 0x40] CMP CL,0x3 JNZ 0x0016ad39 LAB_0016accb: LEA RDI,[RSP + 0x50] MOV RSI,R15 CALL 0x0016ab0a LAB_0016acd8: LEA RDI,[RSP + 0x28] MOV RSI,R14 CALL 0x0016ab0a LEA R14,[RSP + 0x60] MOV RCX,qword ptr [R14 + -0x10] MOV R8,qword ptr [R14 + -0x8] MOV RDX,qword ptr [RSP + 0x30] LEA RAX,[RDX + R8*0x1] MOV EDI,0xf CMP RCX,R14 JZ 0x0016ad0a MOV RDI,qword ptr [RSP + 0x60] LAB_0016ad0a: MOV RSI,qword ptr [RSP + 0x28] CMP RAX,RDI JBE 0x0016ad2d LEA R9,[RSP + 0x38] MOV EDI,0xf CMP RSI,R9 JZ 0x0016ad28 MOV RDI,qword ptr [RSP + 0x38] LAB_0016ad28: CMP RAX,RDI JBE 0x0016ad8f LAB_0016ad2d: LEA RDI,[RSP + 0x50] CALL 0x00119210 LAB_0016ad37: JMP 0x0016ad9d LAB_0016ad39: ADD AL,0xfb ADD CL,0xfb OR CL,AL CMP CL,0x1 JA 0x0016ae49 MOV RDI,R15 CALL 0x00150a3a MOV R15,RAX MOV RDI,R14 CALL 0x00150a3a ADD R15,RAX LEA R14,[RBX + 0x40] XORPD XMM0,XMM0 MOVUPD xmmword ptr [RBX],XMM0 MOVUPD xmmword ptr [RBX + 0x10],XMM0 MOVUPD xmmword ptr [RBX + 0x20],XMM0 MOVUPD xmmword ptr [RBX + 0x30],XMM0 MOVUPD xmmword ptr [RBX + 0x40],XMM0 MOV RDI,R14 MOV RSI,R15 CALL 0x00151ba4 JMP 0x0016aedd LAB_0016ad8f: LEA RDI,[RSP + 0x28] XOR ESI,ESI XOR EDX,EDX CALL 0x001198b0 LAB_0016ad9d: LEA RDX,[RSP + 0x18] MOV qword ptr [RDX + -0x10],RDX MOV RSI,qword ptr [RAX] LEA RCX,[RAX + 0x10] CMP RSI,RCX JZ 0x0016adc1 MOV qword ptr [RSP + 0x8],RSI MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x18],RDX JMP 0x0016adc9 LAB_0016adc1: MOVUPD XMM0,xmmword ptr [RCX] MOVUPD xmmword ptr [RDX],XMM0 LAB_0016adc9: MOV RDX,RAX ADD RDX,0x8 MOV RSI,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RSI MOV qword ptr [RAX],RCX MOV qword ptr [RDX],0x0 MOV byte ptr [RCX],0x0 LAB_0016ade6: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x00155588 LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0016ae0e MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001197f0 LAB_0016ae0e: LEA RAX,[RSP + 0x38] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0016ae29 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001197f0 LAB_0016ae29: MOV RDI,qword ptr [RSP + 0x50] CMP RDI,R14 JZ 0x0016aeea MOV RSI,qword ptr [RSP + 0x60] INC RSI CALL 0x001197f0 JMP 0x0016aeea LAB_0016ae49: CMP qword ptr [R15 + 0x10],0x0 JZ 0x0016ae9f CMP qword ptr [R14 + 0x10],0x0 JZ 0x0016ae9f XORPD XMM0,XMM0 LEA RSI,[RSP + 0x70] MOVAPD xmmword ptr [RSI],XMM0 MOV qword ptr [RSI + 0x10],0x0 LAB_0016ae6c: MOV RDI,RBX CALL 0x00162202 LEA RDI,[RSP + 0x70] CALL 0x001619ec MOV RAX,qword ptr [R15 + 0x10] MOV R15,qword ptr [RAX] MOV R12,qword ptr [RAX + 0x8] LAB_0016ae89: CMP R15,R12 JZ 0x0016aefc LAB_0016ae8e: MOV RDI,RBX MOV RSI,R15 CALL 0x001622ba LAB_0016ae99: ADD R15,0x50 JMP 0x0016ae89 LAB_0016ae9f: MOV RDI,R15 CALL 0x00150b84 MOVSD qword ptr [RSP + 0x48],XMM0 MOV RDI,R14 CALL 0x00150b84 ADDSD XMM0,qword ptr [RSP + 0x48] LEA R14,[RBX + 0x40] XORPS XMM1,XMM1 MOVUPS xmmword ptr [RBX],XMM1 MOVUPS xmmword ptr [RBX + 0x10],XMM1 MOVUPS xmmword ptr [RBX + 0x20],XMM1 MOVUPS xmmword ptr [RBX + 0x30],XMM1 MOVUPS xmmword ptr [RBX + 0x40],XMM1 MOV RDI,R14 CALL 0x0015250e LAB_0016aedd: MOV RDI,R14 MOV ESI,0x1 CALL 0x0015099a LAB_0016aeea: MOV RAX,RBX ADD RSP,0x88 POP RBX POP R12 POP R14 POP R15 RET LAB_0016aefc: MOV RAX,qword ptr [R14 + 0x10] MOV R14,qword ptr [RAX] MOV R15,qword ptr [RAX + 0x8] LAB_0016af07: CMP R14,R15 JZ 0x0016aeea LAB_0016af0c: MOV RDI,RBX MOV RSI,R14 CALL 0x001622ba LAB_0016af17: ADD R14,0x50 JMP 0x0016af07
/* minja::Value::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */ Value * __thiscall minja::Value::operator+(Value *this,Value *param_1) { long *plVar1; Value *pVVar2; int8 *puVar3; long lVar4; long lVar5; Value *in_RDX; ulong uVar6; Value *pVVar7; double dVar8; long *local_a0; int8 local_98; long local_90; int8 uStack_88; ulong *local_80; long local_78; ulong local_70 [2]; double local_60; ulong *local_58; long local_50; ulong local_48 [2]; int8 local_38; int8 uStack_30; int8 local_28; if ((param_1[0x40] != (Value)0x3) && (in_RDX[0x40] != (Value)0x3)) { if ((byte)((char)in_RDX[0x40] - 5U | (char)param_1[0x40] - 5U) < 2) { lVar4 = get<long>(param_1); lVar5 = get<long>(in_RDX); *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; nlohmann::json_abi_v3_11_3::detail:: external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>:: construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (this + 0x40,lVar4 + lVar5); } else { if ((*(long *)(param_1 + 0x10) != 0) && (*(long *)(in_RDX + 0x10) != 0)) { local_38 = 0; uStack_30 = 0; local_28 = 0; /* try { // try from 0016ae6c to 0016ae73 has its CatchHandler @ 0016af1d */ array(this); std::vector<minja::Value,std::allocator<minja::Value>>::~vector ((vector<minja::Value,std::allocator<minja::Value>> *)&local_38); pVVar2 = (Value *)(*(int8 **)(param_1 + 0x10))[1]; for (pVVar7 = (Value *)**(int8 **)(param_1 + 0x10); pVVar7 != pVVar2; pVVar7 = pVVar7 + 0x50) { /* try { // try from 0016ae8e to 0016ae98 has its CatchHandler @ 0016af8e */ push_back(this,pVVar7); } pVVar2 = (Value *)(*(int8 **)(in_RDX + 0x10))[1]; for (pVVar7 = (Value *)**(int8 **)(in_RDX + 0x10); pVVar7 != pVVar2; pVVar7 = pVVar7 + 0x50) { /* try { // try from 0016af0c to 0016af16 has its CatchHandler @ 0016af8c */ push_back(this,pVVar7); } return this; } local_60 = get<double>(param_1); dVar8 = get<double>(in_RDX); *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; nlohmann::json_abi_v3_11_3::detail:: external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>:: construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (dVar8 + local_60,this + 0x40); } 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((bool)((char)this + '@')); return this; } to_str_abi_cxx11_(); /* try { // try from 0016acd8 to 0016ace4 has its CatchHandler @ 0016af6c */ to_str_abi_cxx11_(); uVar6 = 0xf; if (local_58 != local_48) { uVar6 = local_48[0]; } if (uVar6 < (ulong)(local_78 + local_50)) { uVar6 = 0xf; if (local_80 != local_70) { uVar6 = local_70[0]; } if ((ulong)(local_78 + local_50) <= uVar6) { /* try { // try from 0016ad8f to 0016ad9c has its CatchHandler @ 0016af4c */ puVar3 = (int8 *) std::__cxx11::string::replace((ulong)&local_80,0,(char *)0x0,(ulong)local_58); goto LAB_0016ad9d; } } /* try { // try from 0016ad2d to 0016ad36 has its CatchHandler @ 0016af4c */ puVar3 = (int8 *)std::__cxx11::string::_M_append((char *)&local_58,(ulong)local_80); LAB_0016ad9d: local_a0 = &local_90; plVar1 = puVar3 + 2; if ((long *)*puVar3 == plVar1) { local_90 = *plVar1; uStack_88 = puVar3[3]; } else { local_90 = *plVar1; local_a0 = (long *)*puVar3; } local_98 = puVar3[1]; *puVar3 = plVar1; puVar3[1] = 0; *(int1 *)plVar1 = 0; /* try { // try from 0016ade6 to 0016adf2 has its CatchHandler @ 0016af2c */ Value(this,(string *)&local_a0); if (local_a0 != &local_90) { operator_delete(local_a0,local_90 + 1); } if (local_80 != local_70) { operator_delete(local_80,local_70[0] + 1); } if (local_58 != local_48) { operator_delete(local_58,local_48[0] + 1); } return this; }
47,571
host_get_balance
corpus-core[P]colibri-stateless/src/chains/eth/verifier/call_evmone.c
static evmc_bytes32 host_get_balance(void* context, const evmc_address* addr) { evmone_context_t* ctx = (evmone_context_t*) context; debug_print_address("get_balance for", addr); evmc_bytes32 result = {0}; changed_account_t* acc = get_changed_account(ctx, addr->bytes); if (acc) memcpy(result.bytes, acc->balance, 32); else { ssz_ob_t account = get_src_account(ctx, addr->bytes, false); if (account.def) eth_get_account_value(account, ETH_ACCOUNT_BALANCE, result.bytes); } debug_print_bytes32("get_balance result", &result); return result; }
O0
c
host_get_balance: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x40(%rbp) movq %rdi, -0x48(%rbp) movq %rsi, -0x8(%rbp) movq %rdx, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rsi leaq 0xafaca(%rip), %rdi # 0xdd945 callq 0x2db70 movq -0x40(%rbp), %rdi xorl %esi, %esi movl $0x20, %edx callq 0x231c0 movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x2d960 movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) je 0x2ded1 movq -0x40(%rbp), %rax movq -0x20(%rbp), %rcx movq 0x14(%rcx), %rdx movq %rdx, (%rax) movq 0x1c(%rcx), %rdx movq %rdx, 0x8(%rax) movq 0x24(%rcx), %rdx movq %rdx, 0x10(%rax) movq 0x2c(%rcx), %rcx movq %rcx, 0x18(%rax) jmp 0x2df18 movq -0x18(%rbp), %rsi movq -0x10(%rbp), %rdx leaq -0x38(%rbp), %rdi xorl %ecx, %ecx callq 0x2d9f0 cmpq $0x0, -0x28(%rbp) je 0x2df16 movq -0x40(%rbp), %rsi leaq -0x38(%rbp), %rax movl $0x2, %edi movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0x337b0 jmp 0x2df18 movq -0x40(%rbp), %rsi leaq 0xafa32(%rip), %rdi # 0xdd955 callq 0x2db80 movq -0x48(%rbp), %rax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
host_get_balance: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_40], rdi mov [rbp+var_48], rdi mov [rbp+var_8], rsi mov [rbp+var_10], rdx mov rax, [rbp+var_8] mov [rbp+var_18], rax mov rsi, [rbp+var_10] lea rdi, aGetBalanceFor; "get_balance for" call debug_print_address mov rdi, [rbp+var_40] xor esi, esi mov edx, 20h ; ' ' call _memset mov rdi, [rbp+var_18] mov rsi, [rbp+var_10] call get_changed_account mov [rbp+var_20], rax cmp [rbp+var_20], 0 jz short loc_2DED1 mov rax, [rbp+var_40] mov rcx, [rbp+var_20] mov rdx, [rcx+14h] mov [rax], rdx mov rdx, [rcx+1Ch] mov [rax+8], rdx mov rdx, [rcx+24h] mov [rax+10h], rdx mov rcx, [rcx+2Ch] mov [rax+18h], rcx jmp short loc_2DF18 loc_2DED1: mov rsi, [rbp+var_18] mov rdx, [rbp+var_10] lea rdi, [rbp+var_38] xor ecx, ecx call get_src_account cmp [rbp+var_28], 0 jz short loc_2DF16 mov rsi, [rbp+var_40] lea rax, [rbp+var_38] mov edi, 2 mov rcx, [rax] mov [rsp+60h+var_60], rcx mov rcx, [rax+8] mov [rsp+60h+var_58], rcx mov rax, [rax+10h] mov [rsp+60h+var_50], rax call eth_get_account_value loc_2DF16: jmp short $+2 loc_2DF18: mov rsi, [rbp+var_40] lea rdi, aGetBalanceResu; "get_balance result" call debug_print_bytes32 mov rax, [rbp+var_48] add rsp, 60h pop rbp retn
_QWORD * host_get_balance(_QWORD *a1, _QWORD *a2, long long a3) { int v3; // r8d int v4; // r9d long long v5; // rcx int v6; // edx int v7; // r8d int v8; // r9d long long v10; // [rsp+28h] [rbp-38h] BYREF long long v11; // [rsp+30h] [rbp-30h] long long v12; // [rsp+38h] [rbp-28h] long long changed_account; // [rsp+40h] [rbp-20h] _QWORD *v14; // [rsp+48h] [rbp-18h] long long v15; // [rsp+50h] [rbp-10h] _QWORD *v16; // [rsp+58h] [rbp-8h] v16 = a2; v15 = a3; v14 = a2; debug_print_address(); memset(a1, 0LL, 32LL); changed_account = get_changed_account((long long)a2, v15); if ( changed_account ) { v5 = changed_account; *a1 = *(_QWORD *)(changed_account + 20); a1[1] = *(_QWORD *)(v5 + 28); a1[2] = *(_QWORD *)(v5 + 36); a1[3] = *(_QWORD *)(v5 + 44); } else { get_src_account((long long)&v10, v14, v15, 0, v3, v4); if ( v12 ) eth_get_account_value(2, (_DWORD)a1, v6, v11, v7, v8, v10, v11, v12); } debug_print_bytes32(); return a1; }
host_get_balance: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x40],RDI MOV qword ptr [RBP + -0x48],RDI MOV qword ptr [RBP + -0x8],RSI MOV qword ptr [RBP + -0x10],RDX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX MOV RSI,qword ptr [RBP + -0x10] LEA RDI,[0x1dd945] CALL 0x0012db70 MOV RDI,qword ptr [RBP + -0x40] XOR ESI,ESI MOV EDX,0x20 CALL 0x001231c0 MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x10] CALL 0x0012d960 MOV qword ptr [RBP + -0x20],RAX CMP qword ptr [RBP + -0x20],0x0 JZ 0x0012ded1 MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RCX + 0x14] MOV qword ptr [RAX],RDX MOV RDX,qword ptr [RCX + 0x1c] MOV qword ptr [RAX + 0x8],RDX MOV RDX,qword ptr [RCX + 0x24] MOV qword ptr [RAX + 0x10],RDX MOV RCX,qword ptr [RCX + 0x2c] MOV qword ptr [RAX + 0x18],RCX JMP 0x0012df18 LAB_0012ded1: MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x10] LEA RDI,[RBP + -0x38] XOR ECX,ECX CALL 0x0012d9f0 CMP qword ptr [RBP + -0x28],0x0 JZ 0x0012df16 MOV RSI,qword ptr [RBP + -0x40] LEA RAX,[RBP + -0x38] MOV EDI,0x2 MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x001337b0 LAB_0012df16: JMP 0x0012df18 LAB_0012df18: MOV RSI,qword ptr [RBP + -0x40] LEA RDI,[0x1dd955] CALL 0x0012db80 MOV RAX,qword ptr [RBP + -0x48] ADD RSP,0x60 POP RBP RET
int8 * host_get_balance(int8 *param_1,int8 param_2,int8 param_3) { int1 local_40 [16]; long local_30; long local_28; int8 local_20; int8 local_18; int8 local_10; local_20 = param_2; local_18 = param_3; local_10 = param_2; debug_print_address("get_balance for"); memset(param_1,0,0x20); local_28 = get_changed_account(local_20,local_18); if (local_28 == 0) { get_src_account(local_40,local_20,local_18,0); if (local_30 != 0) { eth_get_account_value(2,param_1); } } else { *param_1 = *(int8 *)(local_28 + 0x14); param_1[1] = *(int8 *)(local_28 + 0x1c); param_1[2] = *(int8 *)(local_28 + 0x24); param_1[3] = *(int8 *)(local_28 + 0x2c); } debug_print_bytes32("get_balance result",param_1); return param_1; }
47,572
host_get_balance
corpus-core[P]colibri-stateless/src/chains/eth/verifier/call_evmone.c
static evmc_bytes32 host_get_balance(void* context, const evmc_address* addr) { evmone_context_t* ctx = (evmone_context_t*) context; debug_print_address("get_balance for", addr); evmc_bytes32 result = {0}; changed_account_t* acc = get_changed_account(ctx, addr->bytes); if (acc) memcpy(result.bytes, acc->balance, 32); else { ssz_ob_t account = get_src_account(ctx, addr->bytes, false); if (account.def) eth_get_account_value(account, ETH_ACCOUNT_BALANCE, result.bytes); } debug_print_bytes32("get_balance result", &result); return result; }
O2
c
host_get_balance: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rdi) movups %xmm0, (%rdi) movq %rsi, %rdi movq %rdx, %rsi callq 0x29118 testq %rax, %rax je 0x2952c movups 0x14(%rax), %xmm0 movups 0x24(%rax), %xmm1 movups %xmm1, 0x10(%rbx) movups %xmm0, (%rbx) jmp 0x29567 leaq 0x20(%rsp), %r12 movq %r12, %rdi movq %r15, %rsi movq %r14, %rdx xorl %ecx, %ecx callq 0x2916a cmpq $0x0, 0x10(%r12) je 0x29567 movq 0x30(%rsp), %rax movq %rax, 0x10(%rsp) movups 0x20(%rsp), %xmm0 movups %xmm0, (%rsp) pushq $0x2 popq %rdi movq %rbx, %rsi callq 0x2c693 movq %rbx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
host_get_balance: push r15 push r14 push r12 push rbx sub rsp, 38h mov r14, rdx mov r15, rsi mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi+10h], xmm0 movups xmmword ptr [rdi], xmm0 mov rdi, rsi mov rsi, rdx call get_changed_account test rax, rax jz short loc_2952C movups xmm0, xmmword ptr [rax+14h] movups xmm1, xmmword ptr [rax+24h] movups xmmword ptr [rbx+10h], xmm1 movups xmmword ptr [rbx], xmm0 jmp short loc_29567 loc_2952C: lea r12, [rsp+58h+var_38] mov rdi, r12 mov rsi, r15 mov rdx, r14 xor ecx, ecx call get_src_account cmp qword ptr [r12+10h], 0 jz short loc_29567 mov rax, [rsp+58h+var_28] mov [rsp+58h+var_48], rax movups xmm0, [rsp+58h+var_38] movups [rsp+58h+var_58], xmm0 push 2 pop rdi mov rsi, rbx call eth_get_account_value loc_29567: mov rax, rbx add rsp, 38h pop rbx pop r12 pop r14 pop r15 retn
_OWORD * host_get_balance(_OWORD *a1, long long a2, long long a3) { long long changed_account; // rax int v5; // r8d int v6; // r9d __int128 v7; // xmm0 int v8; // edx int v9; // ecx int v10; // r8d int v11; // r9d __int128 v13; // [rsp+20h] [rbp-38h] BYREF long long v14; // [rsp+30h] [rbp-28h] a1[1] = 0LL; *a1 = 0LL; changed_account = get_changed_account(a2, a3); if ( changed_account ) { v7 = *(_OWORD *)(changed_account + 20); a1[1] = *(_OWORD *)(changed_account + 36); *a1 = v7; } else { get_src_account((long long)&v13, a2, a3, 0, v5, v6); if ( v14 ) eth_get_account_value(2, (_DWORD)a1, v8, v9, v10, v11, v13, v14); } return a1; }
host_get_balance: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R14,RDX MOV R15,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x10],XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV RDI,RSI MOV RSI,RDX CALL 0x00129118 TEST RAX,RAX JZ 0x0012952c MOVUPS XMM0,xmmword ptr [RAX + 0x14] MOVUPS XMM1,xmmword ptr [RAX + 0x24] MOVUPS xmmword ptr [RBX + 0x10],XMM1 MOVUPS xmmword ptr [RBX],XMM0 JMP 0x00129567 LAB_0012952c: LEA R12,[RSP + 0x20] MOV RDI,R12 MOV RSI,R15 MOV RDX,R14 XOR ECX,ECX CALL 0x0012916a CMP qword ptr [R12 + 0x10],0x0 JZ 0x00129567 MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [RSP + 0x20] MOVUPS xmmword ptr [RSP],XMM0 PUSH 0x2 POP RDI MOV RSI,RBX CALL 0x0012c693 LAB_00129567: MOV RAX,RBX ADD RSP,0x38 POP RBX POP R12 POP R14 POP R15 RET
int8 * host_get_balance(int8 *param_1,int8 param_2,int8 param_3) { int8 uVar1; int8 uVar2; int8 uVar3; long lVar4; int1 local_38 [16]; long local_28; param_1[2] = 0; param_1[3] = 0; *param_1 = 0; param_1[1] = 0; lVar4 = get_changed_account(param_2,param_3); if (lVar4 == 0) { get_src_account(local_38,param_2,param_3,0); if (local_28 != 0) { eth_get_account_value(2,param_1); } } else { uVar1 = *(int8 *)(lVar4 + 0x14); uVar2 = *(int8 *)(lVar4 + 0x1c); uVar3 = *(int8 *)(lVar4 + 0x2c); param_1[2] = *(int8 *)(lVar4 + 0x24); param_1[3] = uVar3; *param_1 = uVar1; param_1[1] = uVar2; } return param_1; }
47,573
host_get_balance
corpus-core[P]colibri-stateless/src/chains/eth/verifier/call_evmone.c
static evmc_bytes32 host_get_balance(void* context, const evmc_address* addr) { evmone_context_t* ctx = (evmone_context_t*) context; debug_print_address("get_balance for", addr); evmc_bytes32 result = {0}; changed_account_t* acc = get_changed_account(ctx, addr->bytes); if (acc) memcpy(result.bytes, acc->balance, 32); else { ssz_ob_t account = get_src_account(ctx, addr->bytes, false); if (account.def) eth_get_account_value(account, ETH_ACCOUNT_BALANCE, result.bytes); } debug_print_bytes32("get_balance result", &result); return result; }
O3
c
host_get_balance: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rdi) movups %xmm0, (%rdi) movq %rsi, %rdi movq %rdx, %rsi callq 0x2a314 testq %rax, %rax je 0x2a794 movups 0x14(%rax), %xmm0 movups 0x24(%rax), %xmm1 movups %xmm1, 0x10(%rbx) movups %xmm0, (%rbx) jmp 0x2a7d1 leaq 0x20(%rsp), %r12 movq %r12, %rdi movq %r15, %rsi movq %r14, %rdx xorl %ecx, %ecx callq 0x2a35c cmpq $0x0, 0x10(%r12) je 0x2a7d1 movq 0x30(%rsp), %rax movq %rax, 0x10(%rsp) movups 0x20(%rsp), %xmm0 movups %xmm0, (%rsp) movl $0x2, %edi movq %rbx, %rsi callq 0x2dbe9 movq %rbx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
host_get_balance: push r15 push r14 push r12 push rbx sub rsp, 38h mov r14, rdx mov r15, rsi mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi+10h], xmm0 movups xmmword ptr [rdi], xmm0 mov rdi, rsi mov rsi, rdx call get_changed_account test rax, rax jz short loc_2A794 movups xmm0, xmmword ptr [rax+14h] movups xmm1, xmmword ptr [rax+24h] movups xmmword ptr [rbx+10h], xmm1 movups xmmword ptr [rbx], xmm0 jmp short loc_2A7D1 loc_2A794: lea r12, [rsp+58h+var_38] mov rdi, r12 mov rsi, r15 mov rdx, r14 xor ecx, ecx call get_src_account cmp qword ptr [r12+10h], 0 jz short loc_2A7D1 mov rax, [rsp+58h+var_28] mov [rsp+58h+var_48], rax movups xmm0, [rsp+58h+var_38] movups [rsp+58h+var_58], xmm0 mov edi, 2 mov rsi, rbx call eth_get_account_value loc_2A7D1: mov rax, rbx add rsp, 38h pop rbx pop r12 pop r14 pop r15 retn
_OWORD * host_get_balance(_OWORD *a1, const __m128i *a2, const __m128i *a3) { const __m128i *changed_account; // rax int v5; // r8d int v6; // r9d __int128 v7; // xmm0 int v8; // edx int v9; // ecx int v10; // r8d int v11; // r9d __int128 v13; // [rsp+20h] [rbp-38h] BYREF long long v14; // [rsp+30h] [rbp-28h] a1[1] = 0LL; *a1 = 0LL; changed_account = get_changed_account((long long)a2, a3); if ( changed_account ) { v7 = *(__int128 *)((char *)&changed_account[1] + 4); a1[1] = *(const __m128i *)((char *)&changed_account[2] + 4); *a1 = v7; } else { get_src_account((long long)&v13, a2, a3, 0, v5, v6); if ( v14 ) eth_get_account_value(2, (_DWORD)a1, v8, v9, v10, v11, v13, v14); } return a1; }
host_get_balance: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R14,RDX MOV R15,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x10],XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV RDI,RSI MOV RSI,RDX CALL 0x0012a314 TEST RAX,RAX JZ 0x0012a794 MOVUPS XMM0,xmmword ptr [RAX + 0x14] MOVUPS XMM1,xmmword ptr [RAX + 0x24] MOVUPS xmmword ptr [RBX + 0x10],XMM1 MOVUPS xmmword ptr [RBX],XMM0 JMP 0x0012a7d1 LAB_0012a794: LEA R12,[RSP + 0x20] MOV RDI,R12 MOV RSI,R15 MOV RDX,R14 XOR ECX,ECX CALL 0x0012a35c CMP qword ptr [R12 + 0x10],0x0 JZ 0x0012a7d1 MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [RSP + 0x20] MOVUPS xmmword ptr [RSP],XMM0 MOV EDI,0x2 MOV RSI,RBX CALL 0x0012dbe9 LAB_0012a7d1: MOV RAX,RBX ADD RSP,0x38 POP RBX POP R12 POP R14 POP R15 RET
int8 * host_get_balance(int8 *param_1,int8 param_2,int8 param_3) { int8 uVar1; int8 uVar2; int8 uVar3; long lVar4; int1 local_38 [16]; long local_28; param_1[2] = 0; param_1[3] = 0; *param_1 = 0; param_1[1] = 0; lVar4 = get_changed_account(param_2,param_3); if (lVar4 == 0) { get_src_account(local_38,param_2,param_3,0); if (local_28 != 0) { eth_get_account_value(2,param_1); } } else { uVar1 = *(int8 *)(lVar4 + 0x14); uVar2 = *(int8 *)(lVar4 + 0x1c); uVar3 = *(int8 *)(lVar4 + 0x2c); param_1[2] = *(int8 *)(lVar4 + 0x24); param_1[3] = uVar3; *param_1 = uVar1; param_1[1] = uVar2; } return param_1; }
47,574
ma_sync_table_files
eloqsql/storage/maria/ma_extra.c
int _ma_sync_table_files(const MARIA_HA *info) { return (mysql_file_sync(info->dfile.file, MYF(MY_WME)) || mysql_file_sync(info->s->kfile.file, MYF(MY_WME))); }
O3
c
ma_sync_table_files: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x50, %rsp movq %rdi, %rbx movl 0x480(%rdi), %r14d leaq 0x34cc56(%rip), %r12 # 0x38f258 movq (%r12), %rax leaq -0x70(%rbp), %rdi movl %r14d, %esi movl $0x10, %edx callq *0x158(%rax) testq %rax, %rax jne 0x4267a movl $0x10, %esi movl %r14d, %edi callq 0xa7ad8 movl %eax, %ecx movl $0x1, %eax testl %ecx, %ecx jne 0x4266d movq (%rbx), %rax movl 0x760(%rax), %ebx movq (%r12), %rax leaq -0x70(%rbp), %rdi movl %ebx, %esi movl $0x10, %edx callq *0x158(%rax) testq %rax, %rax jne 0x42691 movl $0x10, %esi movl %ebx, %edi callq 0xa7ad8 movl %eax, %ecx xorl %eax, %eax testl %ecx, %ecx setne %al addq $0x50, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq -0x24(%rbp), %r15 movq %rax, %rdi movl %r14d, %esi movq %r15, %rdx callq 0x2d3f4 movl (%r15), %ecx jmp 0x4262c leaq -0x24(%rbp), %r14 movq %rax, %rdi movl %ebx, %esi movq %r14, %rdx callq 0x2d44d movl (%r14), %ecx jmp 0x42666
_ma_sync_table_files: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 50h mov rbx, rdi mov r14d, [rdi+480h] lea r12, PSI_server mov rax, [r12] lea rdi, [rbp+var_70] mov esi, r14d mov edx, 10h call qword ptr [rax+158h] test rax, rax jnz short loc_4267A mov esi, 10h mov edi, r14d call my_sync mov ecx, eax loc_4262C: mov eax, 1 test ecx, ecx jnz short loc_4266D mov rax, [rbx] mov ebx, [rax+760h] mov rax, [r12] lea rdi, [rbp+var_70] mov esi, ebx mov edx, 10h call qword ptr [rax+158h] test rax, rax jnz short loc_42691 mov esi, 10h mov edi, ebx call my_sync mov ecx, eax loc_42666: xor eax, eax test ecx, ecx setnz al loc_4266D: add rsp, 50h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_4267A: lea r15, [rbp+var_24] mov rdi, rax mov esi, r14d mov rdx, r15 call _ma_sync_table_files_cold_1 mov ecx, [r15] jmp short loc_4262C loc_42691: lea r14, [rbp+var_24] mov rdi, rax mov esi, ebx mov rdx, r14 call _ma_sync_table_files_cold_2 mov ecx, [r14] jmp short loc_42666
_BOOL8 ma_sync_table_files(_DWORD *a1) { unsigned int v1; // r14d long long v2; // rax int v3; // ecx _BOOL8 result; // rax unsigned int v5; // ebx long long v6; // rax int v7; // ecx _BYTE v8[76]; // [rsp+0h] [rbp-70h] BYREF _DWORD v9[9]; // [rsp+4Ch] [rbp-24h] BYREF v1 = a1[288]; v2 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v8, v1, 16LL); if ( v2 ) { ma_sync_table_files_cold_1(v2, v1, v9); v3 = v9[0]; } else { v3 = my_sync(v1, 16LL); } result = 1LL; if ( !v3 ) { v5 = *(_DWORD *)(*(_QWORD *)a1 + 1888LL); v6 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v8, v5, 16LL); if ( v6 ) { ma_sync_table_files_cold_2(v6, v5, v9); v7 = v9[0]; } else { v7 = my_sync(v5, 16LL); } return v7 != 0; } return result; }
_ma_sync_table_files: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x50 MOV RBX,RDI MOV R14D,dword ptr [RDI + 0x480] LEA R12,[0x48f258] MOV RAX,qword ptr [R12] LEA RDI,[RBP + -0x70] MOV ESI,R14D MOV EDX,0x10 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0014267a MOV ESI,0x10 MOV EDI,R14D CALL 0x001a7ad8 MOV ECX,EAX LAB_0014262c: MOV EAX,0x1 TEST ECX,ECX JNZ 0x0014266d MOV RAX,qword ptr [RBX] MOV EBX,dword ptr [RAX + 0x760] MOV RAX,qword ptr [R12] LEA RDI,[RBP + -0x70] MOV ESI,EBX MOV EDX,0x10 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00142691 MOV ESI,0x10 MOV EDI,EBX CALL 0x001a7ad8 MOV ECX,EAX LAB_00142666: XOR EAX,EAX TEST ECX,ECX SETNZ AL LAB_0014266d: ADD RSP,0x50 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0014267a: LEA R15,[RBP + -0x24] MOV RDI,RAX MOV ESI,R14D MOV RDX,R15 CALL 0x0012d3f4 MOV ECX,dword ptr [R15] JMP 0x0014262c LAB_00142691: LEA R14,[RBP + -0x24] MOV RDI,RAX MOV ESI,EBX MOV RDX,R14 CALL 0x0012d44d MOV ECX,dword ptr [R14] JMP 0x00142666
bool _ma_sync_table_files(long *param_1) { int4 uVar1; int iVar2; long lVar3; bool bVar4; int1 local_78 [76]; int local_2c; uVar1 = (int4)param_1[0x90]; lVar3 = (**(code **)(PSI_server + 0x158))(local_78,uVar1,0x10); if (lVar3 == 0) { iVar2 = my_sync(uVar1,0x10); } else { _ma_sync_table_files_cold_1(lVar3,uVar1,&local_2c); iVar2 = local_2c; } bVar4 = true; if (iVar2 == 0) { uVar1 = *(int4 *)(*param_1 + 0x760); lVar3 = (**(code **)(PSI_server + 0x158))(local_78,uVar1,0x10); if (lVar3 == 0) { local_2c = my_sync(uVar1,0x10); } else { _ma_sync_table_files_cold_2(lVar3,uVar1,&local_2c); } bVar4 = local_2c != 0; } return bVar4; }
47,575
markdown_printer::get_field_display_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/examples/llama-bench/llama-bench.cpp
static std::string get_field_display_name(const std::string & field) { if (field == "n_gpu_layers") { return "ngl"; } if (field == "split_mode") { return "sm"; } if (field == "n_threads") { return "threads"; } if (field == "no_kv_offload") { return "nkvo"; } if (field == "flash_attn") { return "fa"; } if (field == "use_mmap") { return "mmap"; } if (field == "embeddings") { return "embd"; } if (field == "tensor_split") { return "ts"; } return field; }
O2
cpp
markdown_printer::get_field_display_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx leaq 0x6010d(%rip), %rsi # 0x9b698 movq %r14, %rdi callq 0x29b97 testb %al, %al je 0x3b5a8 leaq 0x5eec3(%rip), %rsi # 0x9a461 leaq 0x7(%rsp), %rdx jmp 0x3b694 leaq 0x600f6(%rip), %rsi # 0x9b6a5 movq %r14, %rdi callq 0x29b97 testb %al, %al je 0x3b5cc leaq 0x5eeb9(%rip), %rsi # 0x9a47b leaq 0x6(%rsp), %rdx jmp 0x3b694 leaq 0x60099(%rip), %rsi # 0x9b66c movq %r14, %rdi callq 0x29b97 testb %al, %al je 0x3b5f0 leaq 0x5ee50(%rip), %rsi # 0x9a436 leaq 0x5(%rsp), %rdx jmp 0x3b694 leaq 0x600c2(%rip), %rsi # 0x9b6b9 movq %r14, %rdi callq 0x29b97 testb %al, %al je 0x3b614 leaq 0x5eea0(%rip), %rsi # 0x9a4aa leaq 0x4(%rsp), %rdx jmp 0x3b694 leaq 0x600ac(%rip), %rsi # 0x9b6c7 movq %r14, %rdi callq 0x29b97 testb %al, %al je 0x3b635 leaq 0x5eeb4(%rip), %rsi # 0x9a4e2 leaq 0x3(%rsp), %rdx jmp 0x3b694 leaq 0x600a3(%rip), %rsi # 0x9b6df movq %r14, %rdi callq 0x29b97 testb %al, %al je 0x3b656 leaq 0x5eeaa(%rip), %rsi # 0x9a4f9 leaq 0x2(%rsp), %rdx jmp 0x3b694 leaq 0x5eea9(%rip), %rsi # 0x9a506 movq %r14, %rdi callq 0x29b97 testb %al, %al je 0x3b677 leaq 0x5ee8f(%rip), %rsi # 0x9a4ff leaq 0x1(%rsp), %rdx jmp 0x3b694 leaq 0x60054(%rip), %rsi # 0x9b6d2 movq %r14, %rdi callq 0x29b97 testb %al, %al je 0x3b6a7 leaq 0x5ee81(%rip), %rsi # 0x9a512 movq %rsp, %rdx movq %rbx, %rdi callq 0x29014 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq movq %rbx, %rdi movq %r14, %rsi callq 0x22ac0 jmp 0x3b69c
_ZN16markdown_printer22get_field_display_nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r14 push rbx push rax mov r14, rsi mov rbx, rdi lea rsi, aNGpuLayers_0; "n_gpu_layers" mov rdi, r14 call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jz short loc_3B5A8 lea rsi, aNgl+1; "ngl" lea rdx, [rsp+18h+var_11] jmp loc_3B694 loc_3B5A8: lea rsi, aSplitMode_0; "split_mode" mov rdi, r14 call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jz short loc_3B5CC lea rsi, aSm+1; "sm" lea rdx, [rsp+18h+var_12] jmp loc_3B694 loc_3B5CC: lea rsi, aNThreads; "n_threads" mov rdi, r14 call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jz short loc_3B5F0 lea rsi, aThreads+2; "threads" lea rdx, [rsp+18h+var_13] jmp loc_3B694 loc_3B5F0: lea rsi, aNoKvOffload_0; "no_kv_offload" mov rdi, r14 call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jz short loc_3B614 lea rsi, aNkvo+1; "nkvo" lea rdx, [rsp+18h+var_14] jmp loc_3B694 loc_3B614: lea rsi, aFlashAttn_0; "flash_attn" mov rdi, r14 call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jz short loc_3B635 lea rsi, aFa+1; "fa" lea rdx, [rsp+18h+var_15] jmp short loc_3B694 loc_3B635: lea rsi, aUseMmap; "use_mmap" mov rdi, r14 call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jz short loc_3B656 lea rsi, aMmap+2; "mmap" lea rdx, [rsp+18h+var_16] jmp short loc_3B694 loc_3B656: lea rsi, aEmbeddings+2; "embeddings" mov rdi, r14 call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jz short loc_3B677 lea rsi, aEmbd+1; "embd" lea rdx, [rsp+18h+var_17] jmp short loc_3B694 loc_3B677: lea rsi, aTensorSplit_0; "tensor_split" mov rdi, r14 call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jz short loc_3B6A7 lea rsi, aTs+1; "ts" mov rdx, rsp loc_3B694: mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) loc_3B69C: mov rax, rbx add rsp, 8 pop rbx pop r14 retn loc_3B6A7: mov rdi, rbx mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) jmp short loc_3B69C
_QWORD * markdown_printer::get_field_display_name(_QWORD *a1, long long a2) { char *v2; // rsi if ( std::operator==<char>(a2) ) { v2 = "ngl"; } else if ( std::operator==<char>(a2) ) { v2 = "sm"; } else if ( std::operator==<char>(a2) ) { v2 = "threads"; } else if ( std::operator==<char>(a2) ) { v2 = "nkvo"; } else if ( std::operator==<char>(a2) ) { v2 = "fa"; } else if ( std::operator==<char>(a2) ) { v2 = "mmap"; } else if ( std::operator==<char>(a2) ) { v2 = "embd"; } else { if ( !std::operator==<char>(a2) ) { std::string::basic_string(a1, a2); return a1; } v2 = "ts"; } std::string::basic_string<std::allocator<char>>(a1, (long long)v2); return a1; }
get_field_display_name: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI LEA RSI,[0x19b698] MOV RDI,R14 CALL 0x00129b97 TEST AL,AL JZ 0x0013b5a8 LEA RSI,[0x19a461] LEA RDX,[RSP + 0x7] JMP 0x0013b694 LAB_0013b5a8: LEA RSI,[0x19b6a5] MOV RDI,R14 CALL 0x00129b97 TEST AL,AL JZ 0x0013b5cc LEA RSI,[0x19a47b] LEA RDX,[RSP + 0x6] JMP 0x0013b694 LAB_0013b5cc: LEA RSI,[0x19b66c] MOV RDI,R14 CALL 0x00129b97 TEST AL,AL JZ 0x0013b5f0 LEA RSI,[0x19a436] LEA RDX,[RSP + 0x5] JMP 0x0013b694 LAB_0013b5f0: LEA RSI,[0x19b6b9] MOV RDI,R14 CALL 0x00129b97 TEST AL,AL JZ 0x0013b614 LEA RSI,[0x19a4aa] LEA RDX,[RSP + 0x4] JMP 0x0013b694 LAB_0013b614: LEA RSI,[0x19b6c7] MOV RDI,R14 CALL 0x00129b97 TEST AL,AL JZ 0x0013b635 LEA RSI,[0x19a4e2] LEA RDX,[RSP + 0x3] JMP 0x0013b694 LAB_0013b635: LEA RSI,[0x19b6df] MOV RDI,R14 CALL 0x00129b97 TEST AL,AL JZ 0x0013b656 LEA RSI,[0x19a4f9] LEA RDX,[RSP + 0x2] JMP 0x0013b694 LAB_0013b656: LEA RSI,[0x19a506] MOV RDI,R14 CALL 0x00129b97 TEST AL,AL JZ 0x0013b677 LEA RSI,[0x19a4ff] LEA RDX,[RSP + 0x1] JMP 0x0013b694 LAB_0013b677: LEA RSI,[0x19b6d2] MOV RDI,R14 CALL 0x00129b97 TEST AL,AL JZ 0x0013b6a7 LEA RSI,[0x19a512] MOV RDX,RSP LAB_0013b694: MOV RDI,RBX CALL 0x00129014 LAB_0013b69c: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET LAB_0013b6a7: MOV RDI,RBX MOV RSI,R14 CALL 0x00122ac0 JMP 0x0013b69c
/* markdown_printer::get_field_display_name(std::__cxx11::string const&) */ markdown_printer * __thiscall markdown_printer::get_field_display_name(markdown_printer *this,string *param_1) { bool bVar1; allocator *paVar2; char *pcVar3; allocator aStack_18; allocator local_17; allocator local_16; allocator local_15; allocator local_14; allocator local_13; allocator local_12; allocator local_11; paVar2 = &aStack_18; bVar1 = std::operator==(param_1,"n_gpu_layers"); if (bVar1) { pcVar3 = "ngl"; paVar2 = &local_11; } else { bVar1 = std::operator==(param_1,"split_mode"); if (bVar1) { pcVar3 = "sm"; paVar2 = &local_12; } else { bVar1 = std::operator==(param_1,"n_threads"); if (bVar1) { pcVar3 = "threads"; paVar2 = &local_13; } else { bVar1 = std::operator==(param_1,"no_kv_offload"); if (bVar1) { pcVar3 = "nkvo"; paVar2 = &local_14; } else { bVar1 = std::operator==(param_1,"flash_attn"); if (bVar1) { pcVar3 = "fa"; paVar2 = &local_15; } else { bVar1 = std::operator==(param_1,"use_mmap"); if (bVar1) { pcVar3 = "mmap"; paVar2 = &local_16; } else { bVar1 = std::operator==(param_1,"embeddings"); if (bVar1) { pcVar3 = "embd"; paVar2 = &local_17; } else { bVar1 = std::operator==(param_1,"tensor_split"); if (!bVar1) { std::__cxx11::string::string((string *)this,param_1); return this; } pcVar3 = "ts"; } } } } } } } std::__cxx11::string::string<std::allocator<char>>((string *)this,pcVar3,paVar2); return this; }
47,576
my_sync_dir
eloqsql/mysys/my_sync.c
int my_sync_dir(const char *dir_name __attribute__((unused)), myf my_flags __attribute__((unused))) { #ifdef NEED_EXPLICIT_SYNC_DIR static const char cur_dir_name[]= {FN_CURLIB, 0}; File dir_fd; int res= 0; const char *correct_dir_name; DBUG_ENTER("my_sync_dir"); DBUG_PRINT("my",("Dir: '%s' my_flags: %lu", dir_name, my_flags)); /* Sometimes the path does not contain an explicit directory */ correct_dir_name= (dir_name[0] == 0) ? cur_dir_name : dir_name; /* Syncing a dir may give EINVAL on tmpfs on Linux, which is ok. EIO on the other hand is very important. Hence MY_IGNORE_BADFD. */ if ((dir_fd= my_open(correct_dir_name, O_RDONLY, MYF(my_flags))) >= 0) { if (my_sync(dir_fd, MYF(my_flags | MY_IGNORE_BADFD))) res= 2; if (my_close(dir_fd, MYF(my_flags))) res= 3; } else res= 1; DBUG_RETURN(res); #else return 0; #endif }
O0
c
my_sync_dir: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl $0x0, -0x18(%rbp) jmp 0xf7049 movq -0x8(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax jne 0xf7062 leaq 0x63b04(%rip), %rax # 0x15ab60 movq %rax, -0x28(%rbp) jmp 0xf706a movq -0x8(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rdi movq -0x10(%rbp), %rdx xorl %esi, %esi callq 0xf55f0 movl %eax, -0x14(%rbp) cmpl $0x0, %eax jl 0xf70bf movl -0x14(%rbp), %edi movq -0x10(%rbp), %rsi orq $0x20, %rsi callq 0xf6ea0 cmpl $0x0, %eax je 0xf70a5 movl $0x2, -0x18(%rbp) movl -0x14(%rbp), %edi movq -0x10(%rbp), %rsi callq 0xf5880 cmpl $0x0, %eax je 0xf70bd movl $0x3, -0x18(%rbp) jmp 0xf70c6 movl $0x1, -0x18(%rbp) jmp 0xf70c8 movl -0x18(%rbp), %eax movl %eax, -0x2c(%rbp) movl -0x2c(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
my_sync_dir: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], 0 jmp short $+2 loc_F7049: mov rax, [rbp+var_8] movsx eax, byte ptr [rax] cmp eax, 0 jnz short loc_F7062 lea rax, my_sync_dir_cur_dir_name mov [rbp+var_28], rax jmp short loc_F706A loc_F7062: mov rax, [rbp+var_8] mov [rbp+var_28], rax loc_F706A: mov rax, [rbp+var_28] mov [rbp+var_20], rax mov rdi, [rbp+var_20] mov rdx, [rbp+var_10] xor esi, esi call my_open mov [rbp+var_14], eax cmp eax, 0 jl short loc_F70BF mov edi, [rbp+var_14] mov rsi, [rbp+var_10] or rsi, 20h call my_sync cmp eax, 0 jz short loc_F70A5 mov [rbp+var_18], 2 loc_F70A5: mov edi, [rbp+var_14] mov rsi, [rbp+var_10] call my_close cmp eax, 0 jz short loc_F70BD mov [rbp+var_18], 3 loc_F70BD: jmp short loc_F70C6 loc_F70BF: mov [rbp+var_18], 1 loc_F70C6: jmp short $+2 loc_F70C8: mov eax, [rbp+var_18] mov [rbp+var_2C], eax mov eax, [rbp+var_2C] add rsp, 30h pop rbp retn
long long my_sync_dir(_BYTE *a1, long long a2) { void *v3; // [rsp+8h] [rbp-28h] unsigned int v4; // [rsp+18h] [rbp-18h] signed int v5; // [rsp+1Ch] [rbp-14h] v4 = 0; if ( *a1 ) v3 = a1; else v3 = &my_sync_dir_cur_dir_name; v5 = my_open((long long)v3, 0, a2); if ( v5 < 0 ) { return 1; } else { if ( (unsigned int)my_sync(v5, (const char *)(a2 | 0x20)) ) v4 = 2; if ( (unsigned int)my_close(v5, (const char *)a2) ) return 3; } return v4; }
my_sync_dir: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x18],0x0 JMP 0x001f7049 LAB_001f7049: MOV RAX,qword ptr [RBP + -0x8] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JNZ 0x001f7062 LEA RAX,[0x25ab60] MOV qword ptr [RBP + -0x28],RAX JMP 0x001f706a LAB_001f7062: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x28],RAX LAB_001f706a: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x10] XOR ESI,ESI CALL 0x001f55f0 MOV dword ptr [RBP + -0x14],EAX CMP EAX,0x0 JL 0x001f70bf MOV EDI,dword ptr [RBP + -0x14] MOV RSI,qword ptr [RBP + -0x10] OR RSI,0x20 CALL 0x001f6ea0 CMP EAX,0x0 JZ 0x001f70a5 MOV dword ptr [RBP + -0x18],0x2 LAB_001f70a5: MOV EDI,dword ptr [RBP + -0x14] MOV RSI,qword ptr [RBP + -0x10] CALL 0x001f5880 CMP EAX,0x0 JZ 0x001f70bd MOV dword ptr [RBP + -0x18],0x3 LAB_001f70bd: JMP 0x001f70c6 LAB_001f70bf: MOV dword ptr [RBP + -0x18],0x1 LAB_001f70c6: JMP 0x001f70c8 LAB_001f70c8: MOV EAX,dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x2c],EAX MOV EAX,dword ptr [RBP + -0x2c] ADD RSP,0x30 POP RBP RET
int4 my_sync_dir(char *param_1,ulong param_2) { int iVar1; int iVar2; char *local_30; int4 local_20; local_20 = 0; local_30 = param_1; if (*param_1 == '\0') { local_30 = "."; } iVar1 = my_open(local_30,0,param_2); if (iVar1 < 0) { local_20 = 1; } else { iVar2 = my_sync(iVar1,param_2 | 0x20); if (iVar2 != 0) { local_20 = 2; } iVar1 = my_close(iVar1,param_2); if (iVar1 != 0) { local_20 = 3; } } return local_20; }
47,577
get_internal_charset
eloqsql/mysys/charset.c
static CHARSET_INFO * get_internal_charset(MY_CHARSET_LOADER *loader, uint cs_number, myf flags) { char buf[FN_REFLEN]; struct charset_info_st *cs; DBUG_ASSERT(cs_number < array_elements(all_charsets)); if ((cs= (struct charset_info_st*) all_charsets[cs_number])) { if (cs->state & MY_CS_READY) /* if CS is already initialized */ { my_collation_statistics_inc_use_count(cs_number); return cs; } /* To make things thread safe we are not allowing other threads to interfere while we may changing the cs_info_table */ mysql_mutex_lock(&THR_LOCK_charset); if (!(cs->state & (MY_CS_COMPILED|MY_CS_LOADED))) /* if CS is not in memory */ { MY_CHARSET_LOADER loader; strxmov(get_charsets_dir(buf), cs->cs_name.str, ".xml", NullS); my_charset_loader_init_mysys(&loader); my_read_charset_file(&loader, buf, flags); } if (cs->state & MY_CS_AVAILABLE) { if (!(cs->state & MY_CS_READY)) { if (!simple_8bit_charset_data_is_full(cs)) { CHARSET_INFO *refcs= find_charset_data_inheritance_source(cs); if (refcs) inherit_charset_data(cs, refcs); } if (!simple_8bit_collation_data_is_full(cs)) { CHARSET_INFO *refcl= find_collation_data_inheritance_source(cs, flags); if (refcl) inherit_collation_data(cs, refcl); } if (my_ci_init_charset(cs, loader) || my_ci_init_collation(cs, loader)) { cs= NULL; } else cs->state|= MY_CS_READY; } my_collation_statistics_inc_use_count(cs_number); } else cs= NULL; mysql_mutex_unlock(&THR_LOCK_charset); } return cs; }
O3
c
get_internal_charset: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x2c8, %rsp # imm = 0x2C8 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movl %esi, %r13d leaq 0xb6cfd7(%rip), %r12 # 0xbffac0 movq (%r12,%r13,8), %rbx testq %rbx, %rbx je 0x92bd2 testb $0x1, 0xd(%rbx) jne 0x92bd9 movq %rdx, %r15 movq %rdi, %r14 leaq 0xb75dd3(%rip), %rax # 0xc088e0 cmpq $0x0, 0x40(%rax) jne 0x92dbb leaq 0xb75dc1(%rip), %rdi # 0xc088e0 callq 0x29220 movl 0xc(%rbx), %eax testb $0x9, %al jne 0x92bc5 leaq -0x230(%rbp), %rdi callq 0x923ef movq 0x10(%rbx), %rsi leaq 0x49502(%rip), %rdx # 0xdc048 movq %rax, %rdi xorl %ecx, %ecx xorl %eax, %eax callq 0xd7114 leaq -0x2e0(%rbp), %rdi movb $0x0, (%rdi) leaq -0xd01(%rip), %rax # 0x91e62 movq %rax, 0x80(%rdi) leaq -0xd00(%rip), %rax # 0x91e71 movq %rax, 0x88(%rdi) leaq -0xcf3(%rip), %rax # 0x91e8c movq %rax, 0x90(%rdi) leaq 0xd335(%rip), %rax # 0x9fec2 movq %rax, 0x98(%rdi) leaq 0x2f2b55(%rip), %rax # 0x3856f0 movq (%rax), %rax movq %rax, 0xa0(%rdi) leaq -0xd02(%rip), %rax # 0x91eaa movq %rax, 0xa8(%rdi) leaq -0x230(%rbp), %rsi movq %r15, %rdx callq 0x93798 movl 0xc(%rbx), %eax btl $0x9, %eax jb 0x92be9 xorl %ebx, %ebx jmp 0x92d7b xorl %ebx, %ebx jmp 0x92d97 leaq 0xb70f50(%rip), %rax # 0xc03b30 incq (%rax,%r13,8) jmp 0x92d97 btl $0x8, %eax jb 0x92d70 cmpq $0x0, 0x40(%rbx) je 0x92c0f cmpq $0x0, 0x50(%rbx) je 0x92c0f cmpq $0x0, 0x48(%rbx) je 0x92c0f cmpq $0x0, 0x68(%rbx) jne 0x92c3e movq 0x10(%rbx), %rdi movl $0x20, %esi callq 0x928a0 testl %eax, %eax je 0x92c3e cmpl %eax, (%rbx) je 0x92c3e movl %eax, %eax movq (%r12,%rax,8), %rsi testq %rsi, %rsi je 0x92c3e testb $0x2, 0xd(%rsi) je 0x92c3e movq %rbx, %rdi callq 0x939e1 cmpq $0x0, 0x58(%rbx) jne 0x92d32 testb $0x10, 0xc(%rbx) jne 0x92d32 movq 0x38(%rbx), %rax testq %rax, %rax je 0x92d32 leaq 0x49467(%rip), %rsi # 0xdc0ce movl $0x8, %edx movq %rax, -0x2e8(%rbp) movq -0x2e8(%rbp), %rdi callq 0x291d0 movq -0x2e8(%rbp), %rcx testl %eax, %eax jne 0x92d32 leaq 0x8(%rcx), %rdi movq %rdi, -0x2f0(%rbp) movl $0x5d, %esi callq 0x29440 testq %rax, %rax setne %dl movq -0x2e8(%rbp), %rcx addq $0x28, %rcx cmpq %rax, %rcx seta %cl andb %dl, %cl cmpb $0x1, %cl jne 0x92d32 movq -0x2f0(%rbp), %rsi subq %rsi, %rax leaq -0x2e0(%rbp), %rdi movl $0x21, %ecx movq %rax, %rdx movq %rax, -0x2e8(%rbp) callq 0x29420 movq -0x2e8(%rbp), %rax movb $0x0, -0x2e0(%rbp,%rax) leaq -0x2e0(%rbp), %rdi movq %r15, %rsi callq 0x92583 testl %eax, %eax je 0x92d32 cmpl %eax, (%rbx) je 0x92d32 movl %eax, %eax movq (%r12,%rax,8), %rax testq %rax, %rax je 0x92d32 testb $0x2, 0xd(%rax) je 0x92d32 cmpq $0x0, 0x58(%rbx) jne 0x92d32 testb $0x10, 0xc(%rbx) jne 0x92d32 movq 0x58(%rax), %rax movq %rax, 0x58(%rbx) movq 0xb8(%rbx), %rax movq (%rax), %rax testq %rax, %rax je 0x92d4d movq %rbx, %rdi movq %r14, %rsi callq *%rax testb %al, %al jne 0x92d68 movq 0xc0(%rbx), %rax movq (%rax), %rax testq %rax, %rax je 0x92d6c movq %rbx, %rdi movq %r14, %rsi callq *%rax testb %al, %al je 0x92d6c xorl %ebx, %ebx jmp 0x92d70 orb $0x1, 0xd(%rbx) leaq 0xb70db9(%rip), %rax # 0xc03b30 incq (%rax,%r13,8) leaq 0xb75b5e(%rip), %rax # 0xc088e0 movq 0x40(%rax), %rdi testq %rdi, %rdi jne 0x92dc5 leaq 0xb75b4e(%rip), %rdi # 0xc088e0 callq 0x291e0 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x92dd7 movq %rbx, %rax addq $0x2c8, %rsp # imm = 0x2C8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x2e8a7 jmp 0x92b24 leaq 0x2f3244(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x92d8b callq 0x29270
get_internal_charset: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 2C8h mov rax, fs:28h mov [rbp+var_30], rax mov r13d, esi lea r12, all_charsets mov rbx, [r12+r13*8] test rbx, rbx jz loc_92BD2 test byte ptr [rbx+0Dh], 1 jnz loc_92BD9 mov r15, rdx mov r14, rdi lea rax, THR_LOCK_charset cmp qword ptr [rax+40h], 0 jnz loc_92DBB lea rdi, THR_LOCK_charset call _pthread_mutex_lock loc_92B24: mov eax, [rbx+0Ch] test al, 9 jnz loc_92BC5 lea rdi, [rbp+var_230] call get_charsets_dir mov rsi, [rbx+10h] lea rdx, aIndexXml+5; ".xml" mov rdi, rax xor ecx, ecx xor eax, eax call strxmov lea rdi, [rbp+var_2E0] 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 lea rsi, [rbp+var_230] mov rdx, r15 call my_read_charset_file mov eax, [rbx+0Ch] loc_92BC5: bt eax, 9 jb short loc_92BE9 xor ebx, ebx jmp loc_92D7B loc_92BD2: xor ebx, ebx jmp loc_92D97 loc_92BD9: lea rax, my_collation_statistics inc qword ptr [rax+r13*8] jmp loc_92D97 loc_92BE9: bt eax, 8 jb loc_92D70 cmp qword ptr [rbx+40h], 0 jz short loc_92C0F cmp qword ptr [rbx+50h], 0 jz short loc_92C0F cmp qword ptr [rbx+48h], 0 jz short loc_92C0F cmp qword ptr [rbx+68h], 0 jnz short loc_92C3E loc_92C0F: mov rdi, [rbx+10h] mov esi, 20h ; ' ' call get_charset_number_internal test eax, eax jz short loc_92C3E cmp [rbx], eax jz short loc_92C3E mov eax, eax mov rsi, [r12+rax*8] test rsi, rsi jz short loc_92C3E test byte ptr [rsi+0Dh], 2 jz short loc_92C3E mov rdi, rbx call inherit_charset_data loc_92C3E: cmp qword ptr [rbx+58h], 0 jnz loc_92D32 test byte ptr [rbx+0Ch], 10h jnz loc_92D32 mov rax, [rbx+38h] test rax, rax jz loc_92D32 lea rsi, aImport; "[import " mov edx, 8 mov [rbp+var_2E8], rax mov rdi, [rbp+var_2E8] call _strncmp mov rcx, [rbp+var_2E8] test eax, eax jnz loc_92D32 lea rdi, [rcx+8] mov [rbp+var_2F0], rdi mov esi, 5Dh ; ']' call _strchr test rax, rax setnz dl mov rcx, [rbp+var_2E8] add rcx, 28h ; '(' cmp rcx, rax setnbe cl and cl, dl cmp cl, 1 jnz short loc_92D32 mov rsi, [rbp+var_2F0] sub rax, rsi lea rdi, [rbp+var_2E0] mov ecx, 21h ; '!' mov rdx, rax mov [rbp+var_2E8], rax call ___memcpy_chk mov rax, [rbp+var_2E8] mov [rbp+rax+var_2E0], 0 lea rdi, [rbp+var_2E0] mov rsi, r15 call get_collation_number test eax, eax jz short loc_92D32 cmp [rbx], eax jz short loc_92D32 mov eax, eax mov rax, [r12+rax*8] test rax, rax jz short loc_92D32 test byte ptr [rax+0Dh], 2 jz short loc_92D32 cmp qword ptr [rbx+58h], 0 jnz short loc_92D32 test byte ptr [rbx+0Ch], 10h jnz short loc_92D32 mov rax, [rax+58h] mov [rbx+58h], rax loc_92D32: mov rax, [rbx+0B8h] mov rax, [rax] test rax, rax jz short loc_92D4D mov rdi, rbx mov rsi, r14 call rax test al, al jnz short loc_92D68 loc_92D4D: mov rax, [rbx+0C0h] mov rax, [rax] test rax, rax jz short loc_92D6C mov rdi, rbx mov rsi, r14 call rax test al, al jz short loc_92D6C loc_92D68: xor ebx, ebx jmp short loc_92D70 loc_92D6C: or byte ptr [rbx+0Dh], 1 loc_92D70: lea rax, my_collation_statistics inc qword ptr [rax+r13*8] loc_92D7B: lea rax, THR_LOCK_charset mov rdi, [rax+40h] test rdi, rdi jnz short loc_92DC5 loc_92D8B: lea rdi, THR_LOCK_charset call _pthread_mutex_unlock loc_92D97: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_92DD7 mov rax, rbx add rsp, 2C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_92DBB: call get_internal_charset_cold_1 jmp loc_92B24 loc_92DC5: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_92D8B loc_92DD7: call ___stack_chk_fail
long long get_internal_charset(long long a1, unsigned int a2, long long a3) { long long v3; // r13 long long v4; // rbx long long v6; // rdx long long v7; // rcx int v8; // eax int charsets_dir; // eax int v10; // r8d int v11; // r9d int charset_number_internal; // eax long long v13; // rsi long long v14; // rax int v15; // eax unsigned long long v16; // rax int collation_number; // eax long long v18; // rax unsigned __int8 ( *v19)(long long, long long, long long, long long); // rax unsigned __int8 ( *v20)(long long, long long, long long, long long); // rax long long v22; // [rsp+0h] [rbp-2F0h] long long v23; // [rsp+8h] [rbp-2E8h] _BYTE v24[128]; // [rsp+10h] [rbp-2E0h] BYREF long long ( *v25)(long long); // [rsp+90h] [rbp-260h] long long ( *v26)(long long); // [rsp+98h] [rbp-258h] long long ( *v27)(long long, long long, long long, long long, long long, long long); // [rsp+A0h] [rbp-250h] long long ( *v28)(_QWORD); // [rsp+A8h] [rbp-248h] long long ( *v29)(); // [rsp+B0h] [rbp-240h] long long ( *v30)(unsigned int *); // [rsp+B8h] [rbp-238h] _BYTE v31[512]; // [rsp+C0h] [rbp-230h] BYREF unsigned long long v32; // [rsp+2C0h] [rbp-30h] v32 = __readfsqword(0x28u); v3 = a2; v4 = all_charsets[a2]; if ( !v4 ) return 0LL; if ( (*(_BYTE *)(v4 + 13) & 1) != 0 ) { ++my_collation_statistics[a2]; } else { if ( THR_LOCK_charset[8] ) get_internal_charset_cold_1(); else pthread_mutex_lock(THR_LOCK_charset); v8 = *(_DWORD *)(v4 + 12); if ( (v8 & 9) == 0 ) { charsets_dir = get_charsets_dir((long long)v31); strxmov(charsets_dir, *(_QWORD *)(v4 + 16), (unsigned int)".xml", 0, v10, v11); v24[0] = 0; v25 = my_once_alloc_c; v26 = my_malloc_c; v27 = my_realloc_c; v28 = my_free; v29 = my_charset_error_reporter; v30 = add_collation; my_read_charset_file(v24, v31, a3); v8 = *(_DWORD *)(v4 + 12); } if ( (v8 & 0x200) != 0 ) { if ( (v8 & 0x100) == 0 ) { if ( !*(_QWORD *)(v4 + 64) || !*(_QWORD *)(v4 + 80) || !*(_QWORD *)(v4 + 72) || !*(_QWORD *)(v4 + 104) ) { charset_number_internal = get_charset_number_internal(*(_QWORD *)(v4 + 16), 32); if ( charset_number_internal ) { if ( *(_DWORD *)v4 != charset_number_internal ) { v13 = all_charsets[charset_number_internal]; if ( v13 ) { if ( (*(_BYTE *)(v13 + 13) & 2) != 0 ) inherit_charset_data(v4); } } } } if ( !*(_QWORD *)(v4 + 88) && (*(_BYTE *)(v4 + 12) & 0x10) == 0 ) { v14 = *(_QWORD *)(v4 + 56); if ( v14 ) { v23 = *(_QWORD *)(v4 + 56); v15 = strncmp(v14, "[import ", 8LL); v7 = v23; if ( !v15 ) { v22 = v23 + 8; v16 = strchr(v23 + 8, 93LL); LOBYTE(v6) = v16 != 0; v7 = v23 + 40; LOBYTE(v7) = v16 != 0 && v23 + 40 > v16; if ( (_BYTE)v7 == 1 ) { v23 = v16 - v22; __memcpy_chk(v24, v22, v16 - v22, 33LL); v24[v23] = 0; collation_number = get_collation_number((long long)v24, a3); if ( collation_number ) { if ( *(_DWORD *)v4 != collation_number ) { v18 = all_charsets[collation_number]; if ( v18 ) { if ( (*(_BYTE *)(v18 + 13) & 2) != 0 && !*(_QWORD *)(v4 + 88) && (*(_BYTE *)(v4 + 12) & 0x10) == 0 ) *(_QWORD *)(v4 + 88) = *(_QWORD *)(v18 + 88); } } } } } } } v19 = **(unsigned __int8 ( ***)(long long, long long, long long, long long))(v4 + 184); if ( v19 && v19(v4, a1, v6, v7) || (v20 = **(unsigned __int8 ( ***)(long long, long long, long long, long long))(v4 + 192)) != 0LL && v20(v4, a1, v6, v7) ) { v4 = 0LL; } else { *(_BYTE *)(v4 + 13) |= 1u; } } ++my_collation_statistics[v3]; } else { v4 = 0LL; } if ( THR_LOCK_charset[8] ) PSI_server[44](); pthread_mutex_unlock(THR_LOCK_charset); } return v4; }
get_internal_charset: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x2c8 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV R13D,ESI LEA R12,[0xcffac0] MOV RBX,qword ptr [R12 + R13*0x8] TEST RBX,RBX JZ 0x00192bd2 TEST byte ptr [RBX + 0xd],0x1 JNZ 0x00192bd9 MOV R15,RDX MOV R14,RDI LEA RAX,[0xd088e0] CMP qword ptr [RAX + 0x40],0x0 JNZ 0x00192dbb LEA RDI,[0xd088e0] CALL 0x00129220 LAB_00192b24: MOV EAX,dword ptr [RBX + 0xc] TEST AL,0x9 JNZ 0x00192bc5 LEA RDI,[RBP + -0x230] CALL 0x001923ef MOV RSI,qword ptr [RBX + 0x10] LEA RDX,[0x1dc048] MOV RDI,RAX XOR ECX,ECX XOR EAX,EAX CALL 0x001d7114 LEA RDI,[RBP + -0x2e0] MOV byte ptr [RDI],0x0 LEA RAX,[0x191e62] MOV qword ptr [RDI + 0x80],RAX LEA RAX,[0x191e71] MOV qword ptr [RDI + 0x88],RAX LEA RAX,[0x191e8c] MOV qword ptr [RDI + 0x90],RAX LEA RAX,[0x19fec2] MOV qword ptr [RDI + 0x98],RAX LEA RAX,[0x4856f0] MOV RAX,qword ptr [RAX] MOV qword ptr [RDI + 0xa0],RAX LEA RAX,[0x191eaa] MOV qword ptr [RDI + 0xa8],RAX LEA RSI,[RBP + -0x230] MOV RDX,R15 CALL 0x00193798 MOV EAX,dword ptr [RBX + 0xc] LAB_00192bc5: BT EAX,0x9 JC 0x00192be9 XOR EBX,EBX JMP 0x00192d7b LAB_00192bd2: XOR EBX,EBX JMP 0x00192d97 LAB_00192bd9: LEA RAX,[0xd03b30] INC qword ptr [RAX + R13*0x8] JMP 0x00192d97 LAB_00192be9: BT EAX,0x8 JC 0x00192d70 CMP qword ptr [RBX + 0x40],0x0 JZ 0x00192c0f CMP qword ptr [RBX + 0x50],0x0 JZ 0x00192c0f CMP qword ptr [RBX + 0x48],0x0 JZ 0x00192c0f CMP qword ptr [RBX + 0x68],0x0 JNZ 0x00192c3e LAB_00192c0f: MOV RDI,qword ptr [RBX + 0x10] MOV ESI,0x20 CALL 0x001928a0 TEST EAX,EAX JZ 0x00192c3e CMP dword ptr [RBX],EAX JZ 0x00192c3e MOV EAX,EAX MOV RSI,qword ptr [R12 + RAX*0x8] TEST RSI,RSI JZ 0x00192c3e TEST byte ptr [RSI + 0xd],0x2 JZ 0x00192c3e MOV RDI,RBX CALL 0x001939e1 LAB_00192c3e: CMP qword ptr [RBX + 0x58],0x0 JNZ 0x00192d32 TEST byte ptr [RBX + 0xc],0x10 JNZ 0x00192d32 MOV RAX,qword ptr [RBX + 0x38] TEST RAX,RAX JZ 0x00192d32 LEA RSI,[0x1dc0ce] MOV EDX,0x8 MOV qword ptr [RBP + -0x2e8],RAX MOV RDI,qword ptr [RBP + -0x2e8] CALL 0x001291d0 MOV RCX,qword ptr [RBP + -0x2e8] TEST EAX,EAX JNZ 0x00192d32 LEA RDI,[RCX + 0x8] MOV qword ptr [RBP + -0x2f0],RDI MOV ESI,0x5d CALL 0x00129440 TEST RAX,RAX SETNZ DL MOV RCX,qword ptr [RBP + -0x2e8] ADD RCX,0x28 CMP RCX,RAX SETA CL AND CL,DL CMP CL,0x1 JNZ 0x00192d32 MOV RSI,qword ptr [RBP + -0x2f0] SUB RAX,RSI LEA RDI,[RBP + -0x2e0] MOV ECX,0x21 MOV RDX,RAX MOV qword ptr [RBP + -0x2e8],RAX CALL 0x00129420 MOV RAX,qword ptr [RBP + -0x2e8] MOV byte ptr [RBP + RAX*0x1 + -0x2e0],0x0 LEA RDI,[RBP + -0x2e0] MOV RSI,R15 CALL 0x00192583 TEST EAX,EAX JZ 0x00192d32 CMP dword ptr [RBX],EAX JZ 0x00192d32 MOV EAX,EAX MOV RAX,qword ptr [R12 + RAX*0x8] TEST RAX,RAX JZ 0x00192d32 TEST byte ptr [RAX + 0xd],0x2 JZ 0x00192d32 CMP qword ptr [RBX + 0x58],0x0 JNZ 0x00192d32 TEST byte ptr [RBX + 0xc],0x10 JNZ 0x00192d32 MOV RAX,qword ptr [RAX + 0x58] MOV qword ptr [RBX + 0x58],RAX LAB_00192d32: MOV RAX,qword ptr [RBX + 0xb8] MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x00192d4d MOV RDI,RBX MOV RSI,R14 CALL RAX TEST AL,AL JNZ 0x00192d68 LAB_00192d4d: MOV RAX,qword ptr [RBX + 0xc0] MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x00192d6c MOV RDI,RBX MOV RSI,R14 CALL RAX TEST AL,AL JZ 0x00192d6c LAB_00192d68: XOR EBX,EBX JMP 0x00192d70 LAB_00192d6c: OR byte ptr [RBX + 0xd],0x1 LAB_00192d70: LEA RAX,[0xd03b30] INC qword ptr [RAX + R13*0x8] LAB_00192d7b: LEA RAX,[0xd088e0] MOV RDI,qword ptr [RAX + 0x40] TEST RDI,RDI JNZ 0x00192dc5 LAB_00192d8b: LEA RDI,[0xd088e0] CALL 0x001291e0 LAB_00192d97: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00192dd7 MOV RAX,RBX ADD RSP,0x2c8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00192dbb: CALL 0x0012e8a7 JMP 0x00192b24 LAB_00192dc5: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00192d8b LAB_00192dd7: CALL 0x00129270
uint * get_internal_charset(int8 param_1,ulong param_2,int8 param_3) { char *__s; char *__s1; long lVar1; char cVar2; uint uVar3; int iVar4; int8 uVar5; char *pcVar6; uint *puVar7; long in_FS_OFFSET; int1 local_2e8 [128]; code *local_268; code *local_260; code *local_258; code *local_250; int *local_248; code *local_240; int1 local_238 [512]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); param_2 = param_2 & 0xffffffff; puVar7 = (uint *)(&all_charsets)[param_2]; if (puVar7 == (uint *)0x0) { puVar7 = (uint *)0x0; goto LAB_00192d97; } if ((*(byte *)((long)puVar7 + 0xd) & 1) != 0) { *(long *)(my_collation_statistics + param_2 * 8) = *(long *)(my_collation_statistics + param_2 * 8) + 1; goto LAB_00192d97; } if (THR_LOCK_charset._64_8_ == 0) { pthread_mutex_lock((pthread_mutex_t *)THR_LOCK_charset); } else { get_internal_charset_cold_1(); } uVar3 = puVar7[3]; if ((uVar3 & 9) == 0) { uVar5 = get_charsets_dir(local_238); strxmov(uVar5,*(int8 *)(puVar7 + 4),".xml",0); local_2e8[0] = 0; local_268 = my_once_alloc_c; local_260 = my_malloc_c; local_258 = my_realloc_c; local_250 = my_free; local_248 = my_charset_error_reporter; local_240 = add_collation; my_read_charset_file(local_2e8,local_238,param_3); uVar3 = puVar7[3]; } if ((uVar3 >> 9 & 1) == 0) { puVar7 = (uint *)0x0; } else { if ((uVar3 >> 8 & 1) == 0) { if ((((*(long *)(puVar7 + 0x10) == 0) || (*(long *)(puVar7 + 0x14) == 0)) || (*(long *)(puVar7 + 0x12) == 0)) || (*(long *)(puVar7 + 0x1a) == 0)) { uVar3 = get_charset_number_internal(*(int8 *)(puVar7 + 4),0x20); if (((uVar3 != 0) && (*puVar7 != uVar3)) && (((&all_charsets)[uVar3] != 0 && ((*(byte *)((&all_charsets)[uVar3] + 0xd) & 2) != 0)))) { inherit_charset_data(puVar7); } } if (((*(long *)(puVar7 + 0x16) == 0) && ((puVar7[3] & 0x10) == 0)) && (__s1 = *(char **)(puVar7 + 0xe), __s1 != (char *)0x0)) { iVar4 = strncmp(__s1,"[import ",8); if (iVar4 == 0) { __s = __s1 + 8; pcVar6 = strchr(__s,0x5d); if (pcVar6 < __s1 + 0x28 && pcVar6 != (char *)0x0) { __memcpy_chk(local_2e8,__s,(long)pcVar6 - (long)__s,0x21); local_2e8[(long)pcVar6 - (long)__s] = 0; uVar3 = get_collation_number(local_2e8,param_3); if (((((uVar3 != 0) && (*puVar7 != uVar3)) && (lVar1 = (&all_charsets)[uVar3], lVar1 != 0)) && (((*(byte *)(lVar1 + 0xd) & 2) != 0 && (*(long *)(puVar7 + 0x16) == 0)))) && ((puVar7[3] & 0x10) == 0)) { *(int8 *)(puVar7 + 0x16) = *(int8 *)(lVar1 + 0x58); } } } } if ((code *)**(int8 **)(puVar7 + 0x2e) == (code *)0x0) { LAB_00192d4d: if ((code *)**(int8 **)(puVar7 + 0x30) != (code *)0x0) { cVar2 = (*(code *)**(int8 **)(puVar7 + 0x30))(puVar7,param_1); if (cVar2 != '\0') goto LAB_00192d68; } *(byte *)((long)puVar7 + 0xd) = *(byte *)((long)puVar7 + 0xd) | 1; } else { cVar2 = (*(code *)**(int8 **)(puVar7 + 0x2e))(puVar7,param_1); if (cVar2 == '\0') goto LAB_00192d4d; LAB_00192d68: puVar7 = (uint *)0x0; } } *(long *)(my_collation_statistics + param_2 * 8) = *(long *)(my_collation_statistics + param_2 * 8) + 1; } if (THR_LOCK_charset._64_8_ != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)THR_LOCK_charset); LAB_00192d97: if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return puVar7; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
47,578
js_alloc_string_rt
bluesky950520[P]quickjs/quickjs.c
static JSString *js_alloc_string_rt(JSRuntime *rt, int max_len, int is_wide_char) { JSString *str; str = js_malloc_rt(rt, sizeof(JSString) + (max_len << is_wide_char) + 1 - is_wide_char); if (unlikely(!str)) return NULL; str->header.ref_count = 1; str->is_wide_char = is_wide_char; str->len = max_len; str->atom_type = 0; str->hash = 0; /* optional but costless */ str->hash_next = 0; /* optional */ #ifdef DUMP_LEAKS list_add_tail(&str->link, &rt->string_list); #endif return str; }
O0
c
js_alloc_string_rt: subq $0x28, %rsp movq %rdi, 0x18(%rsp) movl %esi, 0x14(%rsp) movl %edx, 0x10(%rsp) movq 0x18(%rsp), %rdi movl 0x14(%rsp), %eax movl 0x10(%rsp), %ecx shll %cl, %eax movslq %eax, %rsi addq $0x18, %rsi addq $0x1, %rsi movslq 0x10(%rsp), %rax subq %rax, %rsi callq 0x21890 movq %rax, 0x8(%rsp) cmpq $0x0, 0x8(%rsp) setne %al xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x5d587 movq $0x0, 0x20(%rsp) jmp 0x5d634 movq 0x8(%rsp), %rax movl $0x1, (%rax) movl 0x10(%rsp), %eax movb %al, %cl movq 0x8(%rsp), %rax movzbl %cl, %ecx movl %ecx, %edx movq 0x4(%rax), %rcx andq $0x1, %rdx shlq $0x1f, %rdx movabsq $-0x80000001, %rsi # imm = 0xFFFFFFFF7FFFFFFF andq %rsi, %rcx orq %rdx, %rcx movq %rcx, 0x4(%rax) movl 0x14(%rsp), %ecx movq 0x8(%rsp), %rax movl %ecx, %ecx movl %ecx, %edx movq 0x4(%rax), %rcx andq $0x7fffffff, %rdx # imm = 0x7FFFFFFF andq $-0x80000000, %rcx # imm = 0x80000000 orq %rdx, %rcx movq %rcx, 0x4(%rax) movq 0x8(%rsp), %rax movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF andq 0x4(%rax), %rcx orq $0x0, %rcx movq %rcx, 0x4(%rax) movq 0x8(%rsp), %rax movabsq $-0x3fffffff00000001, %rcx # imm = 0xC0000000FFFFFFFF andq 0x4(%rax), %rcx orq $0x0, %rcx movq %rcx, 0x4(%rax) movq 0x8(%rsp), %rax movl $0x0, 0xc(%rax) movq 0x8(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax addq $0x28, %rsp retq nop
js_alloc_string_rt: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_14], esi mov [rsp+28h+var_18], edx mov rdi, [rsp+28h+var_10] mov eax, [rsp+28h+var_14] mov ecx, [rsp+28h+var_18] shl eax, cl movsxd rsi, eax add rsi, 18h add rsi, 1 movsxd rax, [rsp+28h+var_18] sub rsi, rax call js_malloc_rt mov [rsp+28h+var_20], rax cmp [rsp+28h+var_20], 0 setnz al xor al, 0FFh xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_5D587 mov [rsp+28h+var_8], 0 jmp loc_5D634 loc_5D587: mov rax, [rsp+28h+var_20] mov dword ptr [rax], 1 mov eax, [rsp+28h+var_18] mov cl, al mov rax, [rsp+28h+var_20] movzx ecx, cl mov edx, ecx mov rcx, [rax+4] and rdx, 1 shl rdx, 1Fh mov rsi, 0FFFFFFFF7FFFFFFFh and rcx, rsi or rcx, rdx mov [rax+4], rcx mov ecx, [rsp+28h+var_14] mov rax, [rsp+28h+var_20] mov ecx, ecx mov edx, ecx mov rcx, [rax+4] and rdx, 7FFFFFFFh and rcx, 0FFFFFFFF80000000h or rcx, rdx mov [rax+4], rcx mov rax, [rsp+28h+var_20] mov rcx, 3FFFFFFFFFFFFFFFh and rcx, [rax+4] or rcx, 0 mov [rax+4], rcx mov rax, [rsp+28h+var_20] mov rcx, 0C0000000FFFFFFFFh and rcx, [rax+4] or rcx, 0 mov [rax+4], rcx mov rax, [rsp+28h+var_20] mov dword ptr [rax+0Ch], 0 mov rax, [rsp+28h+var_20] mov [rsp+28h+var_8], rax loc_5D634: mov rax, [rsp+28h+var_8] add rsp, 28h retn
long long js_alloc_string_rt(long long a1, int a2, int a3) { long long v4; // [rsp+8h] [rbp-20h] char v5; // [rsp+10h] [rbp-18h] v5 = a3; v4 = js_malloc_rt(a1, (a2 << a3) + 25LL - a3); if ( !v4 ) return 0LL; *(_DWORD *)v4 = 1; *(_QWORD *)(v4 + 4) = ((unsigned long long)(v5 & 1) << 31) | *(_QWORD *)(v4 + 4) & 0xFFFFFFFF7FFFFFFFLL; *(_QWORD *)(v4 + 4) = a2 & 0x7FFFFFFF | *(_QWORD *)(v4 + 4) & 0xFFFFFFFF80000000LL; *(_QWORD *)(v4 + 4) &= 0x3FFFFFFFFFFFFFFFuLL; *(_QWORD *)(v4 + 4) &= 0xC0000000FFFFFFFFLL; *(_DWORD *)(v4 + 12) = 0; return v4; }
js_alloc_string_rt: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV dword ptr [RSP + 0x14],ESI MOV dword ptr [RSP + 0x10],EDX MOV RDI,qword ptr [RSP + 0x18] MOV EAX,dword ptr [RSP + 0x14] MOV ECX,dword ptr [RSP + 0x10] SHL EAX,CL MOVSXD RSI,EAX ADD RSI,0x18 ADD RSI,0x1 MOVSXD RAX,dword ptr [RSP + 0x10] SUB RSI,RAX CALL 0x00121890 MOV qword ptr [RSP + 0x8],RAX CMP qword ptr [RSP + 0x8],0x0 SETNZ AL XOR AL,0xff XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x0015d587 MOV qword ptr [RSP + 0x20],0x0 JMP 0x0015d634 LAB_0015d587: MOV RAX,qword ptr [RSP + 0x8] MOV dword ptr [RAX],0x1 MOV EAX,dword ptr [RSP + 0x10] MOV CL,AL MOV RAX,qword ptr [RSP + 0x8] MOVZX ECX,CL MOV EDX,ECX MOV RCX,qword ptr [RAX + 0x4] AND RDX,0x1 SHL RDX,0x1f MOV RSI,-0x80000001 AND RCX,RSI OR RCX,RDX MOV qword ptr [RAX + 0x4],RCX MOV ECX,dword ptr [RSP + 0x14] MOV RAX,qword ptr [RSP + 0x8] MOV ECX,ECX MOV EDX,ECX MOV RCX,qword ptr [RAX + 0x4] AND RDX,0x7fffffff AND RCX,-0x80000000 OR RCX,RDX MOV qword ptr [RAX + 0x4],RCX MOV RAX,qword ptr [RSP + 0x8] MOV RCX,0x3fffffffffffffff AND RCX,qword ptr [RAX + 0x4] OR RCX,0x0 MOV qword ptr [RAX + 0x4],RCX MOV RAX,qword ptr [RSP + 0x8] MOV RCX,-0x3fffffff00000001 AND RCX,qword ptr [RAX + 0x4] OR RCX,0x0 MOV qword ptr [RAX + 0x4],RCX MOV RAX,qword ptr [RSP + 0x8] MOV dword ptr [RAX + 0xc],0x0 MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x20],RAX LAB_0015d634: MOV RAX,qword ptr [RSP + 0x20] ADD RSP,0x28 RET
int4 * js_alloc_string_rt(int8 param_1,uint param_2,uint param_3) { int4 *local_8; local_8 = (int4 *) js_malloc_rt(param_1,((long)(int)(param_2 << ((byte)param_3 & 0x1f)) + 0x19) - (long)(int)param_3); if (local_8 == (int4 *)0x0) { local_8 = (int4 *)0x0; } else { *local_8 = 1; *(ulong *)(local_8 + 1) = *(ulong *)(local_8 + 1) & 0xffffffff7fffffff | ((ulong)(param_3 & 0xff) & 1) << 0x1f; *(ulong *)(local_8 + 1) = *(ulong *)(local_8 + 1) & 0xffffffff80000000 | (ulong)param_2 & 0x7fffffff; *(ulong *)(local_8 + 1) = *(ulong *)(local_8 + 1) & 0x3fffffffffffffff; *(ulong *)(local_8 + 1) = *(ulong *)(local_8 + 1) & 0xc0000000ffffffff; local_8[3] = 0; } return local_8; }
47,579
js_alloc_string_rt
bluesky950520[P]quickjs/quickjs.c
static JSString *js_alloc_string_rt(JSRuntime *rt, int max_len, int is_wide_char) { JSString *str; str = js_malloc_rt(rt, sizeof(JSString) + (max_len << is_wide_char) + 1 - is_wide_char); if (unlikely(!str)) return NULL; str->header.ref_count = 1; str->is_wide_char = is_wide_char; str->len = max_len; str->atom_type = 0; str->hash = 0; /* optional but costless */ str->hash_next = 0; /* optional */ #ifdef DUMP_LEAKS list_add_tail(&str->link, &rt->string_list); #endif return str; }
O1
c
js_alloc_string_rt: pushq %rbp pushq %rbx pushq %rax movl %edx, %ebp movl %esi, %ebx movl %esi, %eax movl %ebp, %ecx shll %cl, %eax movslq %eax, %rsi movl %edx, %eax subq %rax, %rsi addq $0x19, %rsi callq 0xed69 testq %rax, %rax je 0x10a1d movl $0x1, (%rax) shll $0x1f, %ebp andl $0x7fffffff, %ebx # imm = 0x7FFFFFFF orl %ebp, %ebx movq %rbx, 0x4(%rax) andl $0x0, 0xc(%rax) addq $0x8, %rsp popq %rbx popq %rbp retq xorl %eax, %eax jmp 0x10a16
js_alloc_string_rt: push rbp push rbx push rax mov ebp, edx mov ebx, esi mov eax, esi mov ecx, ebp shl eax, cl movsxd rsi, eax mov eax, edx sub rsi, rax add rsi, 19h call js_malloc_rt test rax, rax jz short loc_10A1D mov dword ptr [rax], 1 shl ebp, 1Fh and ebx, 7FFFFFFFh or ebx, ebp mov [rax+4], rbx and dword ptr [rax+0Ch], 0 loc_10A16: add rsp, 8 pop rbx pop rbp retn loc_10A1D: xor eax, eax jmp short loc_10A16
long long js_alloc_string_rt(long long a1, int a2, unsigned int a3) { long long result; // rax result = js_malloc_rt(a1, (a2 << a3) - (unsigned long long)a3 + 25); if ( !result ) return 0LL; *(_DWORD *)result = 1; *(_QWORD *)(result + 4) = (a3 << 31) | a2 & 0x7FFFFFFF; *(_DWORD *)(result + 12) = 0; return result; }
js_alloc_string_rt: PUSH RBP PUSH RBX PUSH RAX MOV EBP,EDX MOV EBX,ESI MOV EAX,ESI MOV ECX,EBP SHL EAX,CL MOVSXD RSI,EAX MOV EAX,EDX SUB RSI,RAX ADD RSI,0x19 CALL 0x0010ed69 TEST RAX,RAX JZ 0x00110a1d MOV dword ptr [RAX],0x1 SHL EBP,0x1f AND EBX,0x7fffffff OR EBX,EBP MOV qword ptr [RAX + 0x4],RBX AND dword ptr [RAX + 0xc],0x0 LAB_00110a16: ADD RSP,0x8 POP RBX POP RBP RET LAB_00110a1d: XOR EAX,EAX JMP 0x00110a16
int4 * js_alloc_string_rt(int8 param_1,uint param_2,uint param_3) { int4 *puVar1; puVar1 = (int4 *) js_malloc_rt(param_1,((long)(int)(param_2 << ((byte)param_3 & 0x1f)) - (ulong)param_3) + 0x19); if (puVar1 == (int4 *)0x0) { puVar1 = (int4 *)0x0; } else { *puVar1 = 1; *(ulong *)(puVar1 + 1) = (ulong)(param_2 & 0x7fffffff | param_3 << 0x1f); puVar1[3] = 0; } return puVar1; }
47,580
js_alloc_string_rt
bluesky950520[P]quickjs/quickjs.c
static JSString *js_alloc_string_rt(JSRuntime *rt, int max_len, int is_wide_char) { JSString *str; str = js_malloc_rt(rt, sizeof(JSString) + (max_len << is_wide_char) + 1 - is_wide_char); if (unlikely(!str)) return NULL; str->header.ref_count = 1; str->is_wide_char = is_wide_char; str->len = max_len; str->atom_type = 0; str->hash = 0; /* optional but costless */ str->hash_next = 0; /* optional */ #ifdef DUMP_LEAKS list_add_tail(&str->link, &rt->string_list); #endif return str; }
O2
c
js_alloc_string_rt: pushq %rbp pushq %rbx pushq %rax movl %edx, %ebp movl %esi, %ebx movl %esi, %eax movl %ebp, %ecx shll %cl, %eax movslq %eax, %rsi movl %edx, %eax subq %rax, %rsi addq $0x19, %rsi callq 0x17079 testq %rax, %rax je 0x34aa1 movl $0x1, (%rax) shll $0x1f, %ebp andl $0x7fffffff, %ebx # imm = 0x7FFFFFFF orl %ebp, %ebx movq %rbx, 0x4(%rax) andl $0x0, 0xc(%rax) addq $0x8, %rsp popq %rbx popq %rbp retq
js_alloc_string_rt: push rbp push rbx push rax mov ebp, edx mov ebx, esi mov eax, esi mov ecx, ebp shl eax, cl movsxd rsi, eax mov eax, edx sub rsi, rax add rsi, 19h call js_malloc_rt test rax, rax jz short loc_34AA1 mov dword ptr [rax], 1 shl ebp, 1Fh and ebx, 7FFFFFFFh or ebx, ebp mov [rax+4], rbx and dword ptr [rax+0Ch], 0 loc_34AA1: add rsp, 8 pop rbx pop rbp retn
long long js_alloc_string_rt(long long a1, int a2, unsigned int a3) { long long result; // rax result = js_malloc_rt(a1, (a2 << a3) - (unsigned long long)a3 + 25); if ( result ) { *(_DWORD *)result = 1; *(_QWORD *)(result + 4) = (a3 << 31) | a2 & 0x7FFFFFFF; *(_DWORD *)(result + 12) = 0; } return result; }
js_alloc_string_rt: PUSH RBP PUSH RBX PUSH RAX MOV EBP,EDX MOV EBX,ESI MOV EAX,ESI MOV ECX,EBP SHL EAX,CL MOVSXD RSI,EAX MOV EAX,EDX SUB RSI,RAX ADD RSI,0x19 CALL 0x00117079 TEST RAX,RAX JZ 0x00134aa1 MOV dword ptr [RAX],0x1 SHL EBP,0x1f AND EBX,0x7fffffff OR EBX,EBP MOV qword ptr [RAX + 0x4],RBX AND dword ptr [RAX + 0xc],0x0 LAB_00134aa1: ADD RSP,0x8 POP RBX POP RBP RET
void js_alloc_string_rt(int8 param_1,uint param_2,uint param_3) { int4 *puVar1; puVar1 = (int4 *) js_malloc_rt(param_1,((long)(int)(param_2 << ((byte)param_3 & 0x1f)) - (ulong)param_3) + 0x19); if (puVar1 != (int4 *)0x0) { *puVar1 = 1; *(ulong *)(puVar1 + 1) = (ulong)(param_2 & 0x7fffffff | param_3 << 0x1f); puVar1[3] = 0; } return; }
47,581
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::skip_bom()
monkey531[P]llama/common/json.hpp
bool skip_bom() { if (get() == 0xEF) { // check if we completely parse the BOM return get() == 0xBB && get() == 0xBF; } // the first character is not the beginning of the BOM; unget it to // process is later unget(); return true; }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::skip_bom(): pushq %rbx movq %rdi, %rbx callq 0x1c626 cmpl $0xef, %eax je 0x5c2d2 movq %rbx, %rdi callq 0x5cc22 movb $0x1, %al popq %rbx retq movq %rbx, %rdi callq 0x1c626 cmpl $0xbb, %eax je 0x5c2e5 xorl %eax, %eax jmp 0x5c2d0 movq %rbx, %rdi callq 0x1c626 cmpl $0xbf, %eax sete %al jmp 0x5c2d0 nop
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE8skip_bomEv: push rbx mov rbx, rdi call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) cmp eax, 0EFh jz short loc_5C2D2 mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(void) mov al, 1 loc_5C2D0: pop rbx retn loc_5C2D2: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) cmp eax, 0BBh jz short loc_5C2E5 xor eax, eax jmp short loc_5C2D0 loc_5C2E5: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) cmp eax, 0BFh setz al jmp short loc_5C2D0
bool nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::skip_bom( __m128i *a1) { if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 239 ) return (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 187 && (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 191; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(a1); return 1; }
skip_bom: PUSH RBX MOV RBX,RDI CALL 0x0011c626 CMP EAX,0xef JZ 0x0015c2d2 MOV RDI,RBX CALL 0x0015cc22 MOV AL,0x1 LAB_0015c2d0: POP RBX RET LAB_0015c2d2: MOV RDI,RBX CALL 0x0011c626 CMP EAX,0xbb JZ 0x0015c2e5 XOR EAX,EAX JMP 0x0015c2d0 LAB_0015c2e5: MOV RDI,RBX CALL 0x0011c626 CMP EAX,0xbf SETZ AL JMP 0x0015c2d0
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::skip_bom() */ bool __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::skip_bom(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *this) { int iVar1; bool bVar2; iVar1 = get(this); if (iVar1 == 0xef) { iVar1 = get(this); if (iVar1 == 0xbb) { iVar1 = get(this); bVar2 = iVar1 == 0xbf; } else { bVar2 = false; } } else { unget(this); bVar2 = true; } return bVar2; }
47,582
mysql_load_plugin_v
eloqsql/build_O3/libmariadb/libmariadb/ma_client_plugin.c
struct st_mysql_client_plugin * STDCALL mysql_load_plugin_v(MYSQL *mysql, const char *name, int type, int argc, va_list args) { const char *errmsg; #ifdef _WIN32 char errbuf[1024]; #endif char dlpath[FN_REFLEN+1]; void *sym, *dlhandle = NULL; struct st_mysql_client_plugin *plugin; char *env_plugin_dir= getenv("MARIADB_PLUGIN_DIR"); CLEAR_CLIENT_ERROR(mysql); if (is_not_initialized(mysql, name)) return NULL; pthread_mutex_lock(&LOCK_load_client_plugin); /* make sure the plugin wasn't loaded meanwhile */ if (type >= 0 && find_plugin(name, type)) { errmsg= "it is already loaded"; goto err; } /* Compile dll path */ #ifndef WIN32 snprintf(dlpath, sizeof(dlpath) - 1, "%s/%s%s", mysql->options.extension && mysql->options.extension->plugin_dir ? mysql->options.extension->plugin_dir : (env_plugin_dir) ? env_plugin_dir : MARIADB_PLUGINDIR, name, SO_EXT); #else { char *p= (mysql->options.extension && mysql->options.extension->plugin_dir) ? mysql->options.extension->plugin_dir : env_plugin_dir; snprintf(dlpath, sizeof(dlpath), "%s%s%s%s", p ? p : "", p ? "\\" : "", name, SO_EXT); } #endif if (strpbrk(name, "()[]!@#$%^&/*;.,'?\\")) { errmsg= "invalid plugin name"; goto err; } /* Open new dll handle */ if (!(dlhandle= dlopen((const char *)dlpath, RTLD_NOW))) { #ifdef _WIN32 char winmsg[255]; size_t len; winmsg[0] = 0; FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), winmsg, 255, NULL); len= strlen(winmsg); while (len > 0 && (winmsg[len - 1] == '\n' || winmsg[len - 1] == '\r')) len--; if (len) winmsg[len] = 0; snprintf(errbuf, sizeof(errbuf), "%s Library path is '%s'", winmsg, dlpath); errmsg= errbuf; #else errmsg= dlerror(); #endif goto err; } if (!(sym= dlsym(dlhandle, plugin_declarations_sym))) { errmsg= "not a plugin"; (void)dlclose(dlhandle); goto err; } plugin= (struct st_mysql_client_plugin*)sym; if (type >=0 && type != plugin->type) { errmsg= "type mismatch"; goto err; } if (strcmp(name, plugin->name)) { errmsg= "name mismatch"; goto err; } if (type < 0 && find_plugin(name, plugin->type)) { errmsg= "it is already loaded"; goto err; } plugin= add_plugin(mysql, plugin, dlhandle, argc, args); pthread_mutex_unlock(&LOCK_load_client_plugin); return plugin; err: if (dlhandle) dlclose(dlhandle); pthread_mutex_unlock(&LOCK_load_client_plugin); my_set_error(mysql, CR_AUTH_PLUGIN_CANNOT_LOAD, SQLSTATE_UNKNOWN, ER(CR_AUTH_PLUGIN_CANNOT_LOAD), name, errmsg); return NULL; }
O3
c
mysql_load_plugin_v: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x238, %rsp # imm = 0x238 movq %r8, -0x258(%rbp) movl %ecx, %r12d movl %edx, %r13d movq %rsi, %rbx movq %rdi, %r14 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) leaq 0xd85e(%rip), %rdi # 0x34de8 callq 0x13590 movq %rax, %r15 movl $0x0, 0x90(%r14) movl $0x30303030, 0x297(%r14) # imm = 0x30303030 movw $0x30, 0x29b(%r14) movb $0x0, 0x97(%r14) movq 0x2a0(%r14), %rax testq %rax, %rax je 0x275cd movl $0x0, 0x4(%rax) cmpb $0x0, 0x2316c(%rip) # 0x4a740 je 0x27603 leaq 0x2316b(%rip), %rdi # 0x4a748 callq 0x136a0 testl %r13d, %r13d js 0x27635 movq %rbx, %rdi movl %r13d, %esi callq 0x274df testq %rax, %rax je 0x27635 leaq 0xd7fd(%rip), %r15 # 0x34dfb jmp 0x2773f leaq 0x213f6(%rip), %rax # 0x48a00 movq (%rax), %rdx leaq 0x213fc(%rip), %rax # 0x48a10 movq 0x1d8(%rax), %rcx leaq 0xd8f7(%rip), %r9 # 0x34f19 xorl %r12d, %r12d movq %r14, %rdi movl $0x80b, %esi # imm = 0x80B movq %rbx, %r8 jmp 0x27774 movq 0x480(%r14), %rax testq %rax, %rax je 0x27649 movq (%rax), %r9 testq %r9, %r9 jne 0x27657 testq %r15, %r15 leaq 0xd7c5(%rip), %r9 # 0x34e18 cmovneq %r15, %r9 leaq 0xd7d8(%rip), %r10 # 0x34e36 leaq 0xd7ab(%rip), %r8 # 0x34e10 leaq -0x240(%rbp), %rdi movl $0x200, %esi # imm = 0x200 movl $0x201, %ecx # imm = 0x201 movl $0x1, %edx xorl %eax, %eax pushq %r10 pushq %rbx callq 0x132c0 addq $0x10, %rsp leaq 0xd7aa(%rip), %rsi # 0x34e3a movq %rbx, %rdi callq 0x137a0 testq %rax, %rax je 0x276a9 leaq 0xd7aa(%rip), %r15 # 0x34e4e jmp 0x2773f leaq -0x240(%rbp), %rdi movl $0x2, %esi callq 0x13630 testq %rax, %rax je 0x2770e movl %r12d, -0x24c(%rbp) leaq 0xd795(%rip), %rsi # 0x34e62 movq %rax, %r12 movq %rax, %rdi callq 0x13410 testq %rax, %rax je 0x27718 movq %rax, %r15 movq %r12, -0x248(%rbp) testl %r13d, %r13d js 0x276f1 cmpl %r13d, (%r15) jne 0x27729 movq 0x8(%r15), %rsi movq %rbx, %rdi callq 0x13640 testl %eax, %eax je 0x2779f leaq 0xd793(%rip), %r15 # 0x34e9f jmp 0x27730 callq 0x13420 movq %rax, %r15 jmp 0x2773f movq %r12, %rdi callq 0x13360 leaq 0xd75d(%rip), %r15 # 0x34e84 jmp 0x27737 leaq 0xd761(%rip), %r15 # 0x34e91 movq -0x248(%rbp), %r12 movq %r12, %rdi callq 0x13360 leaq 0x23002(%rip), %rdi # 0x4a748 callq 0x13330 leaq 0x212ae(%rip), %rax # 0x48a00 movq (%rax), %rdx leaq 0x212b4(%rip), %rax # 0x48a10 movq 0x1d8(%rax), %rcx xorl %r12d, %r12d movq %r14, %rdi movl $0x80b, %esi # imm = 0x80B movq %rbx, %r8 movq %r15, %r9 xorl %eax, %eax callq 0x15595 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x277f0 movq %r12, %rax addq $0x238, %rsp # imm = 0x238 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq testl %r13d, %r13d js 0x277d4 movq %r14, %rdi movq %r15, %rsi movq -0x248(%rbp), %rdx movl -0x24c(%rbp), %ecx movq -0x258(%rbp), %r8 callq 0x27250 movq %rax, %r12 leaq 0x22f7b(%rip), %rdi # 0x4a748 callq 0x13330 jmp 0x2777b movl (%r15), %esi movq %rbx, %rdi callq 0x274df testq %rax, %rax je 0x277a4 leaq 0xd610(%rip), %r15 # 0x34dfb jmp 0x27730 callq 0x13500
mysql_load_plugin_v: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 238h mov [rbp+var_258], r8 mov r12d, ecx mov r13d, edx mov rbx, rsi mov r14, rdi mov rax, fs:28h mov [rbp+var_30], rax lea rdi, aMariadbPluginD; "MARIADB_PLUGIN_DIR" call _getenv mov r15, rax mov dword ptr [r14+90h], 0 mov dword ptr [r14+297h], 30303030h mov word ptr [r14+29Bh], 30h ; '0' mov byte ptr [r14+97h], 0 mov rax, [r14+2A0h] test rax, rax jz short loc_275CD mov dword ptr [rax+4], 0 loc_275CD: cmp cs:initialized, 0 jz short loc_27603 lea rdi, LOCK_load_client_plugin call _pthread_mutex_lock test r13d, r13d js short loc_27635 mov rdi, rbx mov esi, r13d call find_plugin test rax, rax jz short loc_27635 lea r15, aItIsAlreadyLoa; "it is already loaded" jmp loc_2773F loc_27603: lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] lea rax, client_errors mov rcx, [rax+1D8h] lea r9, aNotInitialized; "not initialized" xor r12d, r12d mov rdi, r14 mov esi, 80Bh mov r8, rbx jmp loc_27774 loc_27635: mov rax, [r14+480h] test rax, rax jz short loc_27649 mov r9, [rax] test r9, r9 jnz short loc_27657 loc_27649: test r15, r15 lea r9, aHomeMonoInstal; "/home/mono/install/lib/plugin" cmovnz r9, r15 loc_27657: lea r10, aSo; ".so" lea r8, aSSS; "%s/%s%s" lea rdi, [rbp+var_240] mov esi, 200h mov ecx, 201h mov edx, 1 xor eax, eax push r10 push rbx call ___snprintf_chk add rsp, 10h lea rsi, asc_34E3A; "()[]!@#$%^&/*;.,'?\\" mov rdi, rbx call _strpbrk test rax, rax jz short loc_276A9 lea r15, aInvalidPluginN; "invalid plugin name" jmp loc_2773F loc_276A9: lea rdi, [rbp+var_240] mov esi, 2 call _dlopen test rax, rax jz short loc_2770E mov [rbp+var_24C], r12d lea rsi, aMysqlClientPlu; "_mysql_client_plugin_declaration_" mov r12, rax mov rdi, rax call _dlsym test rax, rax jz short loc_27718 mov r15, rax mov [rbp+var_248], r12 test r13d, r13d js short loc_276F1 cmp [r15], r13d jnz short loc_27729 loc_276F1: mov rsi, [r15+8] mov rdi, rbx call _strcmp test eax, eax jz loc_2779F lea r15, aNameMismatch; "name mismatch" jmp short loc_27730 loc_2770E: call _dlerror mov r15, rax jmp short loc_2773F loc_27718: mov rdi, r12 call _dlclose lea r15, aNotAPlugin; "not a plugin" jmp short loc_27737 loc_27729: lea r15, aTypeMismatch; "type mismatch" loc_27730: mov r12, [rbp+var_248] loc_27737: mov rdi, r12 call _dlclose loc_2773F: lea rdi, LOCK_load_client_plugin call _pthread_mutex_unlock lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] lea rax, client_errors mov rcx, [rax+1D8h] xor r12d, r12d mov rdi, r14 mov esi, 80Bh mov r8, rbx mov r9, r15 loc_27774: xor eax, eax call my_set_error loc_2777B: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_277F0 mov rax, r12 add rsp, 238h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2779F: test r13d, r13d js short loc_277D4 loc_277A4: mov rdi, r14 mov rsi, r15 mov rdx, [rbp+var_248] mov ecx, [rbp+var_24C] mov r8, [rbp+var_258] call add_plugin mov r12, rax lea rdi, LOCK_load_client_plugin call _pthread_mutex_unlock jmp short loc_2777B loc_277D4: mov esi, [r15] mov rdi, rbx call find_plugin test rax, rax jz short loc_277A4 lea r15, aItIsAlreadyLoa; "it is already loaded" jmp loc_27730 loc_277F0: call ___stack_chk_fail
long long mysql_load_plugin_v(long long a1, const char *a2, int a3, unsigned int a4, long long a5) { long long v7; // r15 long long v8; // rax const char *v9; // r15 long long v10; // r12 const char **v11; // rax const char *v12; // r9 double v13; // xmm0_8 long long v14; // rax long long v15; // r12 long long v16; // rax int *v17; // r15 unsigned int v20; // [rsp+14h] [rbp-24Ch] _BYTE v21[528]; // [rsp+20h] [rbp-240h] BYREF unsigned long long v22; // [rsp+230h] [rbp-30h] v22 = __readfsqword(0x28u); v7 = getenv("MARIADB_PLUGIN_DIR"); *(_DWORD *)(a1 + 144) = 0; strcpy((char *)(a1 + 663), "00000"); *(_BYTE *)(a1 + 151) = 0; v8 = *(_QWORD *)(a1 + 672); if ( v8 ) *(_DWORD *)(v8 + 4) = 0; if ( initialized ) { pthread_mutex_lock(&LOCK_load_client_plugin); if ( a3 >= 0 && find_plugin((long long)a2, a3) ) { v9 = "it is already loaded"; } else { v11 = *(const char ***)(a1 + 1152); if ( !v11 || (v12 = *v11) == 0LL ) { v12 = "/home/mono/install/lib/plugin"; if ( v7 ) v12 = (const char *)v7; } v13 = __snprintf_chk(v21, 512LL, 1LL, 513LL, "%s/%s%s", v12, a2, ".so"); if ( strpbrk(a2, "()[]!@#$%^&/*;.,'?\\", v13) ) { v9 = "invalid plugin name"; } else { v14 = dlopen(v21, 2LL); if ( v14 ) { v20 = a4; v15 = v14; v16 = dlsym(v14, "_mysql_client_plugin_declaration_"); if ( v16 ) { v17 = (int *)v16; if ( a3 < 0 || *(_DWORD *)v16 == a3 ) { if ( !(unsigned int)strcmp(a2, *(_QWORD *)(v16 + 8)) ) { if ( a3 >= 0 || !find_plugin((long long)a2, *v17) ) { v10 = add_plugin(a1, (long long)v17, v15, v20, a5); pthread_mutex_unlock(&LOCK_load_client_plugin); return v10; } v9 = "it is already loaded"; } else { v9 = "name mismatch"; } } else { v9 = "type mismatch"; } } else { dlclose(v15); v9 = "not a plugin"; } dlclose(v15); } else { v9 = (const char *)dlerror(); } } } pthread_mutex_unlock(&LOCK_load_client_plugin); v10 = 0LL; my_set_error(a1, 2059, (long long)SQLSTATE_UNKNOWN, client_errors[59], a2, v9); } else { v10 = 0LL; my_set_error(a1, 2059, (long long)SQLSTATE_UNKNOWN, client_errors[59], a2, "not initialized"); } return v10; }
mysql_load_plugin_v: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x238 MOV qword ptr [RBP + -0x258],R8 MOV R12D,ECX MOV R13D,EDX MOV RBX,RSI MOV R14,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX LEA RDI,[0x134de8] CALL 0x00113590 MOV R15,RAX MOV dword ptr [R14 + 0x90],0x0 MOV dword ptr [R14 + 0x297],0x30303030 MOV word ptr [R14 + 0x29b],0x30 MOV byte ptr [R14 + 0x97],0x0 MOV RAX,qword ptr [R14 + 0x2a0] TEST RAX,RAX JZ 0x001275cd MOV dword ptr [RAX + 0x4],0x0 LAB_001275cd: CMP byte ptr [0x0014a740],0x0 JZ 0x00127603 LEA RDI,[0x14a748] CALL 0x001136a0 TEST R13D,R13D JS 0x00127635 MOV RDI,RBX MOV ESI,R13D CALL 0x001274df TEST RAX,RAX JZ 0x00127635 LEA R15,[0x134dfb] JMP 0x0012773f LAB_00127603: LEA RAX,[0x148a00] MOV RDX,qword ptr [RAX] LEA RAX,[0x148a10] MOV RCX,qword ptr [RAX + 0x1d8] LEA R9,[0x134f19] XOR R12D,R12D MOV RDI,R14 MOV ESI,0x80b MOV R8,RBX JMP 0x00127774 LAB_00127635: MOV RAX,qword ptr [R14 + 0x480] TEST RAX,RAX JZ 0x00127649 MOV R9,qword ptr [RAX] TEST R9,R9 JNZ 0x00127657 LAB_00127649: TEST R15,R15 LEA R9,[0x134e18] CMOVNZ R9,R15 LAB_00127657: LEA R10,[0x134e36] LEA R8,[0x134e10] LEA RDI,[RBP + -0x240] MOV ESI,0x200 MOV ECX,0x201 MOV EDX,0x1 XOR EAX,EAX PUSH R10 PUSH RBX CALL 0x001132c0 ADD RSP,0x10 LEA RSI,[0x134e3a] MOV RDI,RBX CALL 0x001137a0 TEST RAX,RAX JZ 0x001276a9 LEA R15,[0x134e4e] JMP 0x0012773f LAB_001276a9: LEA RDI,[RBP + -0x240] MOV ESI,0x2 CALL 0x00113630 TEST RAX,RAX JZ 0x0012770e MOV dword ptr [RBP + -0x24c],R12D LEA RSI,[0x134e62] MOV R12,RAX MOV RDI,RAX CALL 0x00113410 TEST RAX,RAX JZ 0x00127718 MOV R15,RAX MOV qword ptr [RBP + -0x248],R12 TEST R13D,R13D JS 0x001276f1 CMP dword ptr [R15],R13D JNZ 0x00127729 LAB_001276f1: MOV RSI,qword ptr [R15 + 0x8] MOV RDI,RBX CALL 0x00113640 TEST EAX,EAX JZ 0x0012779f LEA R15,[0x134e9f] JMP 0x00127730 LAB_0012770e: CALL 0x00113420 MOV R15,RAX JMP 0x0012773f LAB_00127718: MOV RDI,R12 CALL 0x00113360 LEA R15,[0x134e84] JMP 0x00127737 LAB_00127729: LEA R15,[0x134e91] LAB_00127730: MOV R12,qword ptr [RBP + -0x248] LAB_00127737: MOV RDI,R12 CALL 0x00113360 LAB_0012773f: LEA RDI,[0x14a748] CALL 0x00113330 LEA RAX,[0x148a00] MOV RDX,qword ptr [RAX] LEA RAX,[0x148a10] MOV RCX,qword ptr [RAX + 0x1d8] XOR R12D,R12D MOV RDI,R14 MOV ESI,0x80b MOV R8,RBX MOV R9,R15 LAB_00127774: XOR EAX,EAX CALL 0x00115595 LAB_0012777b: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001277f0 MOV RAX,R12 ADD RSP,0x238 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012779f: TEST R13D,R13D JS 0x001277d4 LAB_001277a4: MOV RDI,R14 MOV RSI,R15 MOV RDX,qword ptr [RBP + -0x248] MOV ECX,dword ptr [RBP + -0x24c] MOV R8,qword ptr [RBP + -0x258] CALL 0x00127250 MOV R12,RAX LEA RDI,[0x14a748] CALL 0x00113330 JMP 0x0012777b LAB_001277d4: MOV ESI,dword ptr [R15] MOV RDI,RBX CALL 0x001274df TEST RAX,RAX JZ 0x001277a4 LEA R15,[0x134dfb] JMP 0x00127730 LAB_001277f0: CALL 0x00113500
int8 mysql_load_plugin_v(long param_1,char *param_2,int param_3,int4 param_4,int8 param_5) { int iVar1; char *pcVar2; long lVar3; int *piVar4; int8 uVar5; long lVar6; char *pcVar7; long in_FS_OFFSET; int1 local_248 [528]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); pcVar2 = getenv("MARIADB_PLUGIN_DIR"); *(int4 *)(param_1 + 0x90) = 0; *(int4 *)(param_1 + 0x297) = 0x30303030; *(int2 *)(param_1 + 0x29b) = 0x30; *(int1 *)(param_1 + 0x97) = 0; if (*(long *)(param_1 + 0x2a0) != 0) { *(int4 *)(*(long *)(param_1 + 0x2a0) + 4) = 0; } if (initialized == '\0') { pcVar2 = "not initialized"; } else { pthread_mutex_lock((pthread_mutex_t *)LOCK_load_client_plugin); if ((param_3 < 0) || (lVar3 = find_plugin(param_2,param_3), lVar3 == 0)) { if (((*(long **)(param_1 + 0x480) == (long *)0x0) || (pcVar7 = (char *)**(long **)(param_1 + 0x480), pcVar7 == (char *)0x0)) && (pcVar7 = "/home/mono/install/lib/plugin", pcVar2 != (char *)0x0)) { pcVar7 = pcVar2; } __snprintf_chk(local_248,0x200,1,0x201,"%s/%s%s",pcVar7,param_2,&DAT_00134e36); pcVar2 = strpbrk(param_2,"()[]!@#$%^&/*;.,\'?\\"); if (pcVar2 == (char *)0x0) { lVar3 = dlopen(local_248,2); if (lVar3 == 0) { pcVar2 = (char *)dlerror(); } else { piVar4 = (int *)dlsym(lVar3,"_mysql_client_plugin_declaration_"); if (piVar4 == (int *)0x0) { dlclose(lVar3); pcVar2 = "not a plugin"; } else if ((param_3 < 0) || (*piVar4 == param_3)) { iVar1 = strcmp(param_2,*(char **)(piVar4 + 2)); if (iVar1 == 0) { if ((-1 < param_3) || (lVar6 = find_plugin(param_2,*piVar4), lVar6 == 0)) { uVar5 = add_plugin(param_1,piVar4,lVar3,param_4,param_5); pthread_mutex_unlock((pthread_mutex_t *)LOCK_load_client_plugin); goto LAB_0012777b; } pcVar2 = "it is already loaded"; } else { pcVar2 = "name mismatch"; } } else { pcVar2 = "type mismatch"; } dlclose(lVar3); } } else { pcVar2 = "invalid plugin name"; } } else { pcVar2 = "it is already loaded"; } pthread_mutex_unlock((pthread_mutex_t *)LOCK_load_client_plugin); } uVar5 = 0; my_set_error(param_1,0x80b,SQLSTATE_UNKNOWN,PTR_s_Plugin__s_could_not_be_loaded____00148be8, param_2,pcVar2); LAB_0012777b: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar5; }
47,583
my_scan_utf32
eloqsql/strings/ctype-ucs2.c
static size_t my_scan_utf32(CHARSET_INFO *cs, const char *str, const char *end, int sequence_type) { const char *str0= str; switch (sequence_type) { case MY_SEQ_SPACES: for ( ; str < end; ) { my_wc_t wc; int res= my_utf32_uni(cs, &wc, (uchar*) str, (uchar*) end); if (res < 0 || wc != ' ') break; str+= res; } return (size_t) (str - str0); case MY_SEQ_NONSPACES: DBUG_ASSERT(0); /* Not implemented */ /* pass through */ default: return 0; } }
O0
c
my_scan_utf32: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movl -0x24(%rbp), %eax movl %eax, -0x40(%rbp) subl $0x2, %eax je 0xad206 jmp 0xad1fc movl -0x40(%rbp), %eax subl $0x3, %eax je 0xad25d jmp 0xad263 jmp 0xad208 movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0xad24c movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx leaq -0x38(%rbp), %rsi callq 0xac670 movl %eax, -0x3c(%rbp) cmpl $0x0, -0x3c(%rbp) jl 0xad237 cmpq $0x20, -0x38(%rbp) je 0xad239 jmp 0xad24c movl -0x3c(%rbp), %ecx movq -0x18(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x18(%rbp) jmp 0xad208 movq -0x18(%rbp), %rax movq -0x30(%rbp), %rcx subq %rcx, %rax movq %rax, -0x8(%rbp) jmp 0xad26b jmp 0xad25f jmp 0xad261 jmp 0xad263 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_scan_utf32: 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_24], ecx mov rax, [rbp+var_18] mov [rbp+var_30], rax mov eax, [rbp+var_24] mov [rbp+var_40], eax sub eax, 2 jz short loc_AD206 jmp short $+2 loc_AD1FC: mov eax, [rbp+var_40] sub eax, 3 jz short loc_AD25D jmp short loc_AD263 loc_AD206: jmp short $+2 loc_AD208: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnb short loc_AD24C mov rdi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] lea rsi, [rbp+var_38] call my_utf32_uni mov [rbp+var_3C], eax cmp [rbp+var_3C], 0 jl short loc_AD237 cmp [rbp+var_38], 20h ; ' ' jz short loc_AD239 loc_AD237: jmp short loc_AD24C loc_AD239: mov ecx, [rbp+var_3C] mov rax, [rbp+var_18] movsxd rcx, ecx add rax, rcx mov [rbp+var_18], rax jmp short loc_AD208 loc_AD24C: mov rax, [rbp+var_18] mov rcx, [rbp+var_30] sub rax, rcx mov [rbp+var_8], rax jmp short loc_AD26B loc_AD25D: jmp short $+2 loc_AD25F: jmp short $+2 loc_AD261: jmp short $+2 loc_AD263: mov [rbp+var_8], 0 loc_AD26B: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
unsigned long long my_scan_utf32( long long a1, unsigned long long a2, unsigned long long a3, int a4, long long a5, long long a6) { int v7; // [rsp+4h] [rbp-3Ch] long long v8; // [rsp+8h] [rbp-38h] BYREF unsigned long long v9; // [rsp+10h] [rbp-30h] int v10; // [rsp+1Ch] [rbp-24h] unsigned long long v11; // [rsp+20h] [rbp-20h] unsigned long long v12; // [rsp+28h] [rbp-18h] long long v13; // [rsp+30h] [rbp-10h] v13 = a1; v12 = a2; v11 = a3; v10 = a4; v9 = a2; if ( a4 != 2 ) return 0LL; while ( v12 < v11 ) { v7 = my_utf32_uni(v13, (long long)&v8, v12, v11, a5, a6); if ( v7 < 0 || v8 != 32 ) break; v12 += v7; } return v12 - v9; }
my_scan_utf32: 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 dword ptr [RBP + -0x24],ECX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x40],EAX SUB EAX,0x2 JZ 0x001ad206 JMP 0x001ad1fc LAB_001ad1fc: MOV EAX,dword ptr [RBP + -0x40] SUB EAX,0x3 JZ 0x001ad25d JMP 0x001ad263 LAB_001ad206: JMP 0x001ad208 LAB_001ad208: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNC 0x001ad24c MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0x38] CALL 0x001ac670 MOV dword ptr [RBP + -0x3c],EAX CMP dword ptr [RBP + -0x3c],0x0 JL 0x001ad237 CMP qword ptr [RBP + -0x38],0x20 JZ 0x001ad239 LAB_001ad237: JMP 0x001ad24c LAB_001ad239: MOV ECX,dword ptr [RBP + -0x3c] MOV RAX,qword ptr [RBP + -0x18] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX JMP 0x001ad208 LAB_001ad24c: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x30] SUB RAX,RCX MOV qword ptr [RBP + -0x8],RAX JMP 0x001ad26b LAB_001ad25d: JMP 0x001ad25f LAB_001ad25f: JMP 0x001ad261 LAB_001ad261: JMP 0x001ad263 LAB_001ad263: MOV qword ptr [RBP + -0x8],0x0 LAB_001ad26b: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
long my_scan_utf32(int8 param_1,ulong param_2,ulong param_3,int param_4) { int iVar1; long local_40; ulong local_38; int4 local_2c; ulong local_28; ulong local_20; int8 local_18; long local_10; if (param_4 == 2) { local_2c = 2; local_38 = param_2; local_28 = param_3; local_20 = param_2; local_18 = param_1; while (((local_20 < local_28 && (iVar1 = my_utf32_uni(local_18,&local_40,local_20,local_28), -1 < iVar1)) && (local_40 == 0x20))) { local_20 = local_20 + (long)iVar1; } local_10 = local_20 - local_38; } else { local_10 = 0; } return local_10; }
47,584
nglog::LogDestination::SetLogSymlink(nglog::LogSeverity, char const*)
ng-log[P]ng-log/src/logging.cc
inline void LogDestination::SetLogSymlink(LogSeverity severity, const char* symlink_basename) { CHECK_GE(severity, 0); CHECK_LT(severity, NUM_SEVERITIES); std::lock_guard<std::mutex> l{log_mutex}; log_destination(severity)->fileobject_.SetSymlinkBasename(symlink_basename); }
O1
cpp
nglog::LogDestination::SetLogSymlink(nglog::LogSeverity, char const*): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rsi, %rbx movl %edi, 0xc(%rsp) movl $0x0, 0x28(%rsp) testl %edi, %edi js 0x10e55 movq $0x0, (%rsp) cmpq $0x0, (%rsp) jne 0x10e91 movl $0x4, 0x28(%rsp) cmpl $0x3, 0xc(%rsp) jg 0x10e73 movq $0x0, (%rsp) cmpq $0x0, (%rsp) jne 0x10ec8 leaq 0x2debd(%rip), %rdi # 0x3ec58 callq 0x7820 testl %eax, %eax jne 0x10eff movl 0xc(%rsp), %r12d leaq 0x1edec(%rip), %rax # 0x2fba0 leaq (%rax,%r12,8), %r14 cmpq $0x0, (%r14) jne 0x10df8 movl $0xd0, %edi callq 0x7530 movq %rax, %r15 movq %rax, %rdi movl %r12d, %esi xorl %edx, %edx callq 0x9598 leaq 0x28(%rsp), %r12 movq $0x0, (%r12) movq %r14, %rdi movq %r15, %rsi callq 0x11a4c movq %r12, %rdi callq 0x105c8 movq (%r14), %r15 leaq 0x8(%r15), %r14 movq %r14, %rdi callq 0x7820 testl %eax, %eax jne 0x10f06 movq 0x60(%r15), %r12 addq $0x58, %r15 movq %rbx, %rdi callq 0x71f0 movq %r15, %rdi xorl %esi, %esi movq %r12, %rdx movq %rbx, %rcx movq %rax, %r8 callq 0x7880 movq %r14, %rdi callq 0x73e0 leaq 0x2de17(%rip), %rdi # 0x3ec58 callq 0x73e0 addq $0x88, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq leaq 0x11d19(%rip), %rcx # 0x22b75 movq %rsp, %rdi leaq 0xc(%rsp), %rsi leaq 0x28(%rsp), %rdx callq 0x11add jmp 0x10d63 leaq 0x11d09(%rip), %rcx # 0x22b83 movq %rsp, %rdi leaq 0xc(%rsp), %rsi leaq 0x28(%rsp), %rdx callq 0x11add jmp 0x10d89 movq (%rsp), %rax xorl %edx, %edx movq %rdx, (%rsp) leaq 0x10(%rsp), %rcx movq %rax, (%rcx) movq %rdx, 0x20(%rsp) leaq 0x11743(%rip), %rsi # 0x225f2 leaq 0x28(%rsp), %rdi movl $0x291, %edx # imm = 0x291 callq 0xdd72 leaq 0x28(%rsp), %rdi callq 0xdd78 movq (%rsp), %rax xorl %edx, %edx movq %rdx, (%rsp) leaq 0x10(%rsp), %rcx movq %rax, (%rcx) movq %rdx, 0x18(%rsp) leaq 0x1170c(%rip), %rsi # 0x225f2 leaq 0x28(%rsp), %rdi movl $0x292, %edx # imm = 0x292 callq 0xdd72 leaq 0x28(%rsp), %rdi callq 0xdd78 movl %eax, %edi callq 0x7350 movl %eax, %edi callq 0x7350 movq %rax, %rbx movl $0xd0, %esi movq %r15, %rdi callq 0x7540 jmp 0x10f8f movq %rax, %rbx movq %r14, %rdi callq 0x73e0 jmp 0x10f8f movq %rax, %rbx movq 0x10(%rsp), %rsi testq %rsi, %rsi je 0x10f43 leaq 0x10(%rsp), %rdi callq 0x11b5e leaq 0x10(%rsp), %rdi leaq 0x18(%rsp), %rsi leaq 0x28(%rsp), %rdx movq %rsp, %rcx callq 0x7be1 jmp 0x10f9b movq %rax, %rbx movq 0x10(%rsp), %rsi testq %rsi, %rsi je 0x10f73 leaq 0x10(%rsp), %rdi callq 0x11b5e leaq 0x10(%rsp), %rdi leaq 0x20(%rsp), %rsi leaq 0x28(%rsp), %rdx movq %rsp, %rcx callq 0x7ba3 jmp 0x10f9b movq %rax, %rbx leaq 0x2dcc2(%rip), %rdi # 0x3ec58 callq 0x73e0 movq %rbx, %rdi callq 0x7980 nop
_ZN5nglog14LogDestination13SetLogSymlinkENS_11LogSeverityEPKc: push r15 push r14 push r12 push rbx sub rsp, 88h mov rbx, rsi mov [rsp+0A8h+var_9C], edi mov [rsp+0A8h+var_80], 0 test edi, edi js loc_10E55 mov [rsp+0A8h+var_A8], 0 loc_10D63: cmp [rsp+0A8h+var_A8], 0 jnz loc_10E91 mov [rsp+0A8h+var_80], 4 cmp [rsp+0A8h+var_9C], 3 jg loc_10E73 mov [rsp+0A8h+var_A8], 0 loc_10D89: cmp [rsp+0A8h+var_A8], 0 jnz loc_10EC8 lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex call _pthread_mutex_lock test eax, eax jnz loc_10EFF mov r12d, [rsp+0A8h+var_9C] lea rax, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_ lea r14, [rax+r12*8] cmp qword ptr [r14], 0 jnz short loc_10DF8 mov edi, 0D0h; unsigned __int64 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax mov esi, r12d xor edx, edx call _ZN5nglog14LogDestinationC2ENS_11LogSeverityEPKc; nglog::LogDestination::LogDestination(nglog::LogSeverity,char const*) lea r12, [rsp+0A8h+var_80] mov qword ptr [r12], 0 mov rdi, r14 mov rsi, r15 call _ZNSt15__uniq_ptr_implIN5nglog14LogDestinationESt14default_deleteIS1_EE5resetEPS1_; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(nglog::LogDestination*) mov rdi, r12 call _ZNSt10unique_ptrIN5nglog14LogDestinationESt14default_deleteIS1_EED2Ev; std::unique_ptr<nglog::LogDestination>::~unique_ptr() loc_10DF8: mov r15, [r14] lea r14, [r15+8] mov rdi, r14 call _pthread_mutex_lock test eax, eax jnz loc_10F06 mov r12, [r15+60h] add r15, 58h ; 'X' mov rdi, rbx call _strlen mov rdi, r15 xor esi, esi mov rdx, r12 mov rcx, rbx mov r8, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) mov rdi, r14 call _pthread_mutex_unlock lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex call _pthread_mutex_unlock add rsp, 88h pop rbx pop r12 pop r14 pop r15 retn loc_10E55: lea rcx, aSeverity0; "severity >= 0" mov rdi, rsp lea rsi, [rsp+0A8h+var_9C] lea rdx, [rsp+0A8h+var_80] call _ZN5nglog8internal17MakeCheckOpStringINS_11LogSeverityEiEESt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS9_EERKT_RKT0_PKc; nglog::internal::MakeCheckOpString<nglog::LogSeverity,int>(nglog::LogSeverity const&,int const&,char const*) jmp loc_10D63 loc_10E73: lea rcx, aSeverityNumSev; "severity < NUM_SEVERITIES" mov rdi, rsp lea rsi, [rsp+0A8h+var_9C] lea rdx, [rsp+0A8h+var_80] call _ZN5nglog8internal17MakeCheckOpStringINS_11LogSeverityEiEESt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS9_EERKT_RKT0_PKc; nglog::internal::MakeCheckOpString<nglog::LogSeverity,int>(nglog::LogSeverity const&,int const&,char const*) jmp loc_10D89 loc_10E91: mov rax, [rsp+0A8h+var_A8] xor edx, edx mov [rsp+0A8h+var_A8], rdx lea rcx, [rsp+0A8h+var_98] mov [rcx], rax mov [rsp+0A8h+var_88], rdx lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rsp+0A8h+var_80] mov edx, 291h call _ZN5nglog15LogMessageFatalC2EPKciRKNS_8internal13CheckOpStringE; nglog::LogMessageFatal::LogMessageFatal(char const*,int,nglog::internal::CheckOpString const&) lea rdi, [rsp+0A8h+var_80]; this call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal() loc_10EC8: mov rax, [rsp+0A8h+var_A8] xor edx, edx mov [rsp+0A8h+var_A8], rdx lea rcx, [rsp+0A8h+var_98] mov [rcx], rax mov [rsp+0A8h+var_90], rdx lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rsp+0A8h+var_80] mov edx, 292h call _ZN5nglog15LogMessageFatalC2EPKciRKNS_8internal13CheckOpStringE; nglog::LogMessageFatal::LogMessageFatal(char const*,int,nglog::internal::CheckOpString const&) lea rdi, [rsp+0A8h+var_80]; this call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal() loc_10EFF: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) loc_10F06: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) mov rbx, rax mov esi, 0D0h; unsigned __int64 mov rdi, r15; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_10F8F mov rbx, rax mov rdi, r14 call _pthread_mutex_unlock jmp short loc_10F8F mov rbx, rax mov rsi, [rsp+0A8h+var_98] test rsi, rsi jz short loc_10F43 lea rdi, [rsp+0A8h+var_98] call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*) loc_10F43: lea rdi, [rsp+0A8h+var_98] lea rsi, [rsp+0A8h+var_90] lea rdx, [rsp+0A8h+var_80] mov rcx, rsp call _ZN5nglog14LogDestination13SetLogSymlinkENS_11LogSeverityEPKc_cold_2; nglog::LogDestination::SetLogSymlink(nglog::LogSeverity,char const*) [clone] jmp short loc_10F9B mov rbx, rax mov rsi, [rsp+0A8h+var_98] test rsi, rsi jz short loc_10F73 lea rdi, [rsp+0A8h+var_98] call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*) loc_10F73: lea rdi, [rsp+0A8h+var_98] lea rsi, [rsp+0A8h+var_88] lea rdx, [rsp+0A8h+var_80] mov rcx, rsp call _ZN5nglog14LogDestination13SetLogSymlinkENS_11LogSeverityEPKc_cold_1; nglog::LogDestination::SetLogSymlink(nglog::LogSeverity,char const*) [clone] jmp short loc_10F9B mov rbx, rax loc_10F8F: lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex call _pthread_mutex_unlock loc_10F9B: mov rdi, rbx call __Unwind_Resume
long long nglog::LogDestination::SetLogSymlink(int a1, long long a2) { int v2; // eax int v3; // r12d long long *v4; // r14 long long v5; // r15 long long v6; // r15 long long v7; // r14 int v8; // eax long long v9; // r12 long long v10; // rax _QWORD *v12; // rax _QWORD *v13; // rax _QWORD *v14; // [rsp+0h] [rbp-A8h] BYREF int v15; // [rsp+Ch] [rbp-9Ch] BYREF _QWORD *v16[3]; // [rsp+10h] [rbp-98h] BYREF nglog::LogDestination *v17[16]; // [rsp+28h] [rbp-80h] BYREF v15 = a1; LODWORD(v17[0]) = 0; if ( a1 < 0 ) nglog::internal::MakeCheckOpString<nglog::LogSeverity,int>(&v14, &v15, v17, "severity >= 0"); else v14 = 0LL; if ( v14 ) { v12 = v14; v14 = 0LL; v16[0] = v12; v16[2] = 0LL; nglog::LogMessageFatal::LogMessageFatal( v17, (nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc", 657, v16); nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v17); } LODWORD(v17[0]) = 4; if ( v15 > 3 ) nglog::internal::MakeCheckOpString<nglog::LogSeverity,int>(&v14, &v15, v17, "severity < NUM_SEVERITIES"); else v14 = 0LL; if ( v14 ) { v13 = v14; v14 = 0LL; v16[0] = v13; v16[1] = 0LL; nglog::LogMessageFatal::LogMessageFatal( v17, (nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc", 658, v16); nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v17); } v2 = pthread_mutex_lock(&nglog::log_mutex); if ( v2 ) std::__throw_system_error(v2); v3 = v15; v4 = (long long *)((char *)&nglog::LogDestination::log_destinations_ + 8 * (unsigned int)v15); if ( !*v4 ) { v5 = operator new(0xD0uLL); nglog::LogDestination::LogDestination(v5, v3, 0LL); v17[0] = 0LL; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(v4, v5); std::unique_ptr<nglog::LogDestination>::~unique_ptr(v17); } v6 = *v4; v7 = *v4 + 8; v8 = pthread_mutex_lock(v7); if ( v8 ) std::__throw_system_error(v8); v9 = *(_QWORD *)(v6 + 96); v10 = strlen(a2); std::string::_M_replace(v6 + 88, 0LL, v9, a2, v10); pthread_mutex_unlock(v7); return pthread_mutex_unlock(&nglog::log_mutex); }
SetLogSymlink: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x88 MOV RBX,RSI MOV dword ptr [RSP + 0xc],EDI MOV dword ptr [RSP + 0x28],0x0 TEST EDI,EDI JS 0x00110e55 MOV qword ptr [RSP],0x0 LAB_00110d63: CMP qword ptr [RSP],0x0 JNZ 0x00110e91 MOV dword ptr [RSP + 0x28],0x4 CMP dword ptr [RSP + 0xc],0x3 JG 0x00110e73 MOV qword ptr [RSP],0x0 LAB_00110d89: CMP qword ptr [RSP],0x0 JNZ 0x00110ec8 LEA RDI,[0x13ec58] CALL 0x00107820 TEST EAX,EAX JNZ 0x00110eff MOV R12D,dword ptr [RSP + 0xc] LEA RAX,[0x12fba0] LEA R14,[RAX + R12*0x8] CMP qword ptr [R14],0x0 JNZ 0x00110df8 LAB_00110dbe: MOV EDI,0xd0 CALL 0x00107530 LAB_00110dc8: MOV R15,RAX MOV RDI,RAX MOV ESI,R12D XOR EDX,EDX CALL 0x00109598 LEA R12,[RSP + 0x28] MOV qword ptr [R12],0x0 MOV RDI,R14 MOV RSI,R15 CALL 0x00111a4c MOV RDI,R12 CALL 0x001105c8 LAB_00110df8: MOV R15,qword ptr [R14] LEA R14,[R15 + 0x8] MOV RDI,R14 CALL 0x00107820 TEST EAX,EAX JNZ 0x00110f06 MOV R12,qword ptr [R15 + 0x60] ADD R15,0x58 MOV RDI,RBX CALL 0x001071f0 LAB_00110e1f: MOV RDI,R15 XOR ESI,ESI MOV RDX,R12 MOV RCX,RBX MOV R8,RAX CALL 0x00107880 LAB_00110e32: MOV RDI,R14 CALL 0x001073e0 LEA RDI,[0x13ec58] CALL 0x001073e0 ADD RSP,0x88 POP RBX POP R12 POP R14 POP R15 RET LAB_00110e55: LEA RCX,[0x122b75] MOV RDI,RSP LEA RSI,[RSP + 0xc] LEA RDX,[RSP + 0x28] CALL 0x00111add JMP 0x00110d63 LAB_00110e73: LEA RCX,[0x122b83] MOV RDI,RSP LEA RSI,[RSP + 0xc] LEA RDX,[RSP + 0x28] CALL 0x00111add JMP 0x00110d89 LAB_00110e91: MOV RAX,qword ptr [RSP] XOR EDX,EDX MOV qword ptr [RSP],RDX LEA RCX,[RSP + 0x10] MOV qword ptr [RCX],RAX MOV qword ptr [RSP + 0x20],RDX LAB_00110ea8: LEA RSI,[0x1225f2] LEA RDI,[RSP + 0x28] MOV EDX,0x291 CALL 0x0010dd72 LEA RDI,[RSP + 0x28] CALL 0x0010dd78 LAB_00110ec8: MOV RAX,qword ptr [RSP] XOR EDX,EDX MOV qword ptr [RSP],RDX LEA RCX,[RSP + 0x10] MOV qword ptr [RCX],RAX MOV qword ptr [RSP + 0x18],RDX LAB_00110edf: LEA RSI,[0x1225f2] LEA RDI,[RSP + 0x28] MOV EDX,0x292 CALL 0x0010dd72 LEA RDI,[RSP + 0x28] CALL 0x0010dd78 LAB_00110eff: MOV EDI,EAX CALL 0x00107350 LAB_00110f06: MOV EDI,EAX CALL 0x00107350
/* nglog::LogDestination::SetLogSymlink(nglog::LogSeverity, char const*) */ void nglog::LogDestination::SetLogSymlink(uint param_1,char *param_2) { __uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *this; long lVar1; char *pcVar2; int iVar3; LogDestination *pLVar4; ulong uVar5; long local_a8; uint local_9c; long local_98 [3]; ulong local_80 [12]; local_80[0] = local_80[0] & 0xffffffff00000000; local_9c = param_1; if ((int)param_1 < 0) { internal::MakeCheckOpString<nglog::LogSeverity,int> ((internal *)&local_a8,(LogSeverity *)&local_9c,(int *)local_80,"severity >= 0"); } else { local_a8 = 0; } lVar1 = local_a8; if (local_a8 == 0) { local_80[0] = CONCAT44(local_80[0]._4_4_,4); if ((int)local_9c < 4) { local_a8 = 0; } else { internal::MakeCheckOpString<nglog::LogSeverity,int> ((internal *)&local_a8,(LogSeverity *)&local_9c,(int *)local_80, "severity < NUM_SEVERITIES"); } if (local_a8 == 0) { iVar3 = pthread_mutex_lock((pthread_mutex_t *)log_mutex); if (iVar3 == 0) { uVar5 = (ulong)local_9c; this = (__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *) (&log_destinations_ + uVar5); if (*(long *)this == 0) { /* try { // try from 00110dbe to 00110dc7 has its CatchHandler @ 00110f8c */ pLVar4 = (LogDestination *)operator_new(0xd0); /* try { // try from 00110dc8 to 00110dd7 has its CatchHandler @ 00110f0d */ LogDestination(pLVar4,uVar5,0); local_80[0] = 0; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>:: reset(this,pLVar4); std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>:: ~unique_ptr((unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *)local_80); } lVar1 = *(long *)this; iVar3 = pthread_mutex_lock((pthread_mutex_t *)(lVar1 + 8)); if (iVar3 == 0) { pcVar2 = *(char **)(lVar1 + 0x60); strlen(param_2); /* try { // try from 00110e1f to 00110e31 has its CatchHandler @ 00110f1f */ std::__cxx11::string::_M_replace(lVar1 + 0x58,0,pcVar2,(ulong)param_2); pthread_mutex_unlock((pthread_mutex_t *)(lVar1 + 8)); pthread_mutex_unlock((pthread_mutex_t *)log_mutex); return; } /* try { // try from 00110f06 to 00110f0c has its CatchHandler @ 00110f8c */ /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar3); } goto LAB_00110eff; } } else { local_a8 = 0; local_98[0] = lVar1; local_98[2] = 0; /* try { // try from 00110ea8 to 00110ec7 has its CatchHandler @ 00110f5c */ LogMessageFatal::LogMessageFatal ((LogMessageFatal *)local_80, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",0x291, (CheckOpString *)local_98); LogMessageFatal::~LogMessageFatal((LogMessageFatal *)local_80); } local_98[0] = local_a8; local_a8 = 0; local_98[1] = 0; /* try { // try from 00110edf to 00110efe has its CatchHandler @ 00110f2c */ LogMessageFatal::LogMessageFatal ((LogMessageFatal *)local_80, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",0x292, (CheckOpString *)local_98); iVar3 = LogMessageFatal::~LogMessageFatal((LogMessageFatal *)local_80); LAB_00110eff: /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar3); }
47,585
LefDefParser::defwSpecialNetShieldWidth(int)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp
int defwSpecialNetShieldWidth(int w) { defwFunc = DEFW_SHIELD; // Current function of writer if (!defwFile) return DEFW_UNINITIALIZED; if (defwState != DEFW_SHIELD) return DEFW_BAD_ORDER; if ((++defwLineItemCounter & 3) == 0) { fprintf(defwFile, "\n "); defwLines++; } fprintf(defwFile, " %d", w); return DEFW_OK; }
O0
cpp
LefDefParser::defwSpecialNetShieldWidth(int): pushq %rax movl %edi, (%rsp) leaq 0x120ed(%rip), %rax # 0x2b168 movl $0x38, (%rax) leaq 0x120d0(%rip), %rax # 0x2b158 cmpq $0x0, (%rax) jne 0x1909b movl $0x1, 0x4(%rsp) jmp 0x1911e leaq 0x120c2(%rip), %rax # 0x2b164 cmpl $0x38, (%rax) je 0x190b1 movl $0x2, 0x4(%rsp) jmp 0x1911e leaq 0x120c4(%rip), %rax # 0x2b17c movl (%rax), %eax addl $0x1, %eax leaq 0x120b8(%rip), %rcx # 0x2b17c movl %eax, (%rcx) andl $0x3, %eax cmpl $0x0, %eax jne 0x190fb leaq 0x12083(%rip), %rax # 0x2b158 movq (%rax), %rdi leaq 0xb919(%rip), %rsi # 0x249f8 movb $0x0, %al callq 0x10f0 leaq 0x12073(%rip), %rax # 0x2b160 movl (%rax), %ecx addl $0x1, %ecx leaq 0x12067(%rip), %rax # 0x2b160 movl %ecx, (%rax) leaq 0x12056(%rip), %rax # 0x2b158 movq (%rax), %rdi movl (%rsp), %edx leaq 0xb5c4(%rip), %rsi # 0x246d3 movb $0x0, %al callq 0x10f0 movl $0x0, 0x4(%rsp) movl 0x4(%rsp), %eax popq %rcx retq nopw %cs:(%rax,%rax)
_ZN12LefDefParser25defwSpecialNetShieldWidthEi: push rax mov [rsp+8+var_8], edi lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc mov dword ptr [rax], 38h ; '8' lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile cmp qword ptr [rax], 0 jnz short loc_1909B mov [rsp+8+var_4], 1 jmp loc_1911E loc_1909B: lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState cmp dword ptr [rax], 38h ; '8' jz short loc_190B1 mov [rsp+8+var_4], 2 jmp short loc_1911E loc_190B1: lea rax, _ZN12LefDefParser19defwLineItemCounterE; LefDefParser::defwLineItemCounter mov eax, [rax] add eax, 1 lea rcx, _ZN12LefDefParser19defwLineItemCounterE; LefDefParser::defwLineItemCounter mov [rcx], eax and eax, 3 cmp eax, 0 jnz short loc_190FB lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile mov rdi, [rax] lea rsi, asc_249F8; "\n " mov al, 0 call _fprintf lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines mov [rax], ecx loc_190FB: lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile mov rdi, [rax] mov edx, [rsp+8+var_8] lea rsi, aDesignrulewidt+19h; " %d" mov al, 0 call _fprintf mov [rsp+8+var_4], 0 loc_1911E: mov eax, [rsp+8+var_4] pop rcx retn
long long LefDefParser::defwSpecialNetShieldWidth(LefDefParser *this) { LefDefParser::defwFunc = 56; if ( LefDefParser::defwFile ) { if ( LefDefParser::defwState == 56 ) { if ( (++LefDefParser::defwLineItemCounter & 3) == 0 ) { fprintf(LefDefParser::defwFile, "\n "); ++LefDefParser::defwLines; } fprintf(LefDefParser::defwFile, " %d", (_DWORD)this); return 0; } else { return 2; } } else { return 1; } }
defwSpecialNetShieldWidth: PUSH RAX MOV dword ptr [RSP],EDI LEA RAX,[0x12b168] MOV dword ptr [RAX],0x38 LEA RAX,[0x12b158] CMP qword ptr [RAX],0x0 JNZ 0x0011909b MOV dword ptr [RSP + 0x4],0x1 JMP 0x0011911e LAB_0011909b: LEA RAX,[0x12b164] CMP dword ptr [RAX],0x38 JZ 0x001190b1 MOV dword ptr [RSP + 0x4],0x2 JMP 0x0011911e LAB_001190b1: LEA RAX,[0x12b17c] MOV EAX,dword ptr [RAX] ADD EAX,0x1 LEA RCX,[0x12b17c] MOV dword ptr [RCX],EAX AND EAX,0x3 CMP EAX,0x0 JNZ 0x001190fb LEA RAX,[0x12b158] MOV RDI,qword ptr [RAX] LEA RSI,[0x1249f8] MOV AL,0x0 CALL 0x001010f0 LEA RAX,[0x12b160] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x12b160] MOV dword ptr [RAX],ECX LAB_001190fb: LEA RAX,[0x12b158] MOV RDI,qword ptr [RAX] MOV EDX,dword ptr [RSP] LEA RSI,[0x1246d3] MOV AL,0x0 CALL 0x001010f0 MOV dword ptr [RSP + 0x4],0x0 LAB_0011911e: MOV EAX,dword ptr [RSP + 0x4] POP RCX RET
/* LefDefParser::defwSpecialNetShieldWidth(int) */ int4 LefDefParser::defwSpecialNetShieldWidth(int param_1) { int4 local_4; defwFunc = 0x38; if (defwFile == (FILE *)0x0) { local_4 = 1; } else if (defwState == 0x38) { defwLineItemCounter = defwLineItemCounter + 1; if ((defwLineItemCounter & 3) == 0) { fprintf(defwFile,"\n "); defwLines = defwLines + 1; } fprintf(defwFile," %d",param_1); local_4 = 0; } else { local_4 = 2; } return local_4; }
47,586
LefDefParser::defwSpecialNetShieldWidth(int)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp
int defwSpecialNetShieldWidth(int w) { defwFunc = DEFW_SHIELD; // Current function of writer if (!defwFile) return DEFW_UNINITIALIZED; if (defwState != DEFW_SHIELD) return DEFW_BAD_ORDER; if ((++defwLineItemCounter & 3) == 0) { fprintf(defwFile, "\n "); defwLines++; } fprintf(defwFile, " %d", w); return DEFW_OK; }
O3
cpp
LefDefParser::defwSpecialNetShieldWidth(int): pushq %rbp pushq %r14 pushq %rbx leaq 0x11252(%rip), %rax # 0x1e178 movl $0x38, (%rax) leaq 0x11235(%rip), %r14 # 0x1e168 movq (%r14), %rcx testq %rcx, %rcx je 0xcf99 leaq 0x11232(%rip), %rax # 0x1e174 movl $0x2, %ebp cmpl $0x38, (%rax) jne 0xcf9e movl %edi, %ebx leaq 0x11237(%rip), %rax # 0x1e18c movl (%rax), %edx incl %edx movl %edx, (%rax) testb $0x3, %dl jne 0xcf82 leaq 0x8bd0(%rip), %rdi # 0x15b37 movl $0x6, %esi movl $0x1, %edx callq 0x1110 leaq 0x111f3(%rip), %rax # 0x1e170 incl (%rax) movq (%r14), %rcx leaq 0x8889(%rip), %rsi # 0x15812 xorl %ebp, %ebp movq %rcx, %rdi movl %ebx, %edx xorl %eax, %eax callq 0x10e0 jmp 0xcf9e movl $0x1, %ebp movl %ebp, %eax popq %rbx popq %r14 popq %rbp retq
_ZN12LefDefParser25defwSpecialNetShieldWidthEi: push rbp push r14 push rbx lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc mov dword ptr [rax], 38h ; '8' lea r14, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile mov rcx, [r14] test rcx, rcx jz short loc_CF99 lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState mov ebp, 2 cmp dword ptr [rax], 38h ; '8' jnz short loc_CF9E mov ebx, edi lea rax, _ZN12LefDefParser19defwLineItemCounterE; LefDefParser::defwLineItemCounter mov edx, [rax] inc edx mov [rax], edx test dl, 3 jnz short loc_CF82 lea rdi, asc_15B37; "\n " mov esi, 6 mov edx, 1 call _fwrite lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines inc dword ptr [rax] mov rcx, [r14] loc_CF82: lea rsi, aDesignrulewidt+19h; " %d" xor ebp, ebp mov rdi, rcx mov edx, ebx xor eax, eax call _fprintf jmp short loc_CF9E loc_CF99: mov ebp, 1 loc_CF9E: mov eax, ebp pop rbx pop r14 pop rbp retn
long long LefDefParser::defwSpecialNetShieldWidth(LefDefParser *this) { long long v1; // rcx unsigned int v2; // ebp LefDefParser::defwFunc = 56; v1 = LefDefParser::defwFile; if ( LefDefParser::defwFile ) { v2 = 2; if ( LefDefParser::defwState == 56 ) { if ( (++LefDefParser::defwLineItemCounter & 3) == 0 ) { fwrite("\n ", 6LL, 1LL, LefDefParser::defwFile); ++LefDefParser::defwLines; v1 = LefDefParser::defwFile; } v2 = 0; fprintf(v1, " %d", (_DWORD)this); } } else { return 1; } return v2; }
defwSpecialNetShieldWidth: PUSH RBP PUSH R14 PUSH RBX LEA RAX,[0x11e178] MOV dword ptr [RAX],0x38 LEA R14,[0x11e168] MOV RCX,qword ptr [R14] TEST RCX,RCX JZ 0x0010cf99 LEA RAX,[0x11e174] MOV EBP,0x2 CMP dword ptr [RAX],0x38 JNZ 0x0010cf9e MOV EBX,EDI LEA RAX,[0x11e18c] MOV EDX,dword ptr [RAX] INC EDX MOV dword ptr [RAX],EDX TEST DL,0x3 JNZ 0x0010cf82 LEA RDI,[0x115b37] MOV ESI,0x6 MOV EDX,0x1 CALL 0x00101110 LEA RAX,[0x11e170] INC dword ptr [RAX] MOV RCX,qword ptr [R14] LAB_0010cf82: LEA RSI,[0x115812] XOR EBP,EBP MOV RDI,RCX MOV EDX,EBX XOR EAX,EAX CALL 0x001010e0 JMP 0x0010cf9e LAB_0010cf99: MOV EBP,0x1 LAB_0010cf9e: MOV EAX,EBP POP RBX POP R14 POP RBP RET
/* LefDefParser::defwSpecialNetShieldWidth(int) */ int8 LefDefParser::defwSpecialNetShieldWidth(int param_1) { int8 uVar1; defwFunc = 0x38; if (defwFile == (FILE *)0x0) { uVar1 = 1; } else { uVar1 = 2; if (defwState == 0x38) { defwLineItemCounter = defwLineItemCounter + 1; if ((defwLineItemCounter & 3) == 0) { fwrite(&DAT_00115b37,6,1,defwFile); defwLines = defwLines + 1; } uVar1 = 0; fprintf(defwFile," %d",param_1); } } return uVar1; }
47,587
minja::Value::Value(std::shared_ptr<std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&)>> const&)
monkey531[P]llama/common/minja.hpp
Value(const std::shared_ptr<CallableType> & callable) : object_(std::make_shared<ObjectType>()), callable_(callable) {}
O3
cpp
minja::Value::Value(std::shared_ptr<std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&)>> const&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rdi) movups %xmm0, (%rdi) movl $0x30, %edi callq 0x1dc20 movabsq $0x100000001, %rcx # imm = 0x100000001 movq %rcx, 0x8(%rax) leaq 0x9a57d(%rip), %rcx # 0x154428 addq $0x10, %rcx movq %rcx, (%rax) movq %rax, %rcx addq $0x10, %rcx xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rax) movq $0x0, 0x20(%rax) movq %rax, 0x28(%rbx) movq %rcx, 0x20(%rbx) movq (%r14), %rax movq %rax, 0x30(%rbx) movq 0x8(%r14), %rax movq %rax, 0x38(%rbx) testq %rax, %rax je 0xb9ef9 movq 0x9c095(%rip), %rcx # 0x155f80 cmpb $0x0, (%rcx) je 0xb9ef5 incl 0x8(%rax) jmp 0xb9ef9 lock incl 0x8(%rax) leaq 0x40(%rbx), %r14 movb $0x0, 0x40(%rbx) movq $0x0, 0x48(%rbx) movq %r14, %rdi movl $0x1, %esi callq 0x89206 movq %r14, %rdi movl $0x1, %esi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x89206 movq %rax, %r14 movq 0x18(%rbx), %rdi testq %rdi, %rdi je 0xb9f3b callq 0x51000 movq %rbx, %rdi callq 0xab246 movq %r14, %rdi callq 0x1e660 nop
_ZN5minja5ValueC2ERKSt10shared_ptrISt8functionIFS0_RKS1_INS_7ContextEERNS_14ArgumentsValueEEEE: push r14 push rbx push rax mov r14, rsi mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi+10h], xmm0 movups xmmword ptr [rdi], xmm0 mov edi, 30h ; '0'; unsigned __int64 call __Znwm; operator new(ulong) mov rcx, 100000001h mov [rax+8], rcx lea rcx, _ZTVSt23_Sp_counted_ptr_inplaceIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEESaISN_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<nlohmann::json_abi_v3_11_3::ordered_map<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>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<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,minja::Value>>>,std::allocator<nlohmann::json_abi_v3_11_3::ordered_map<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>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<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,minja::Value>>>>,(__gnu_cxx::_Lock_policy)2> add rcx, 10h mov [rax], rcx mov rcx, rax add rcx, 10h xorps xmm0, xmm0 movups xmmword ptr [rax+10h], xmm0 mov qword ptr [rax+20h], 0 mov [rbx+28h], rax mov [rbx+20h], rcx mov rax, [r14] mov [rbx+30h], rax mov rax, [r14+8] mov [rbx+38h], rax test rax, rax jz short loc_B9EF9 mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_B9EF5 inc dword ptr [rax+8] jmp short loc_B9EF9 loc_B9EF5: lock inc dword ptr [rax+8] loc_B9EF9: lea r14, [rbx+40h] mov byte ptr [rbx+40h], 0 mov qword ptr [rbx+48h], 0 mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 mov esi, 1 add rsp, 8 pop rbx pop r14 jmp _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 r14, rax mov rdi, [rbx+18h] test rdi, rdi jz short loc_B9F3B call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_B9F3B: mov rdi, rbx call _ZNSt23enable_shared_from_thisIN5minja5ValueEED2Ev; std::enable_shared_from_this<minja::Value>::~enable_shared_from_this() mov rdi, r14 call __Unwind_Resume
long long minja::Value::Value(long long a1, _QWORD *a2) { long long v2; // rax long long result; // rax *(_OWORD *)(a1 + 16) = 0LL; *(_OWORD *)a1 = 0LL; v2 = operator new(0x30uLL); *(_QWORD *)(v2 + 8) = 0x100000001LL; *(_QWORD *)v2 = &`vtable for'std::_Sp_counted_ptr_inplace<nlohmann::json_abi_v3_11_3::ordered_map<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>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>,std::allocator<nlohmann::json_abi_v3_11_3::ordered_map<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>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>>,(__gnu_cxx::_Lock_policy)2> + 2; *(_OWORD *)(v2 + 16) = 0LL; *(_QWORD *)(v2 + 32) = 0LL; *(_QWORD *)(a1 + 40) = v2; *(_QWORD *)(a1 + 32) = v2 + 16; *(_QWORD *)(a1 + 48) = *a2; result = a2[1]; *(_QWORD *)(a1 + 56) = result; if ( result ) { if ( _libc_single_threaded ) ++*(_DWORD *)(result + 8); else _InterlockedIncrement((volatile signed __int32 *)(result + 8)); } *(_BYTE *)(a1 + 64) = 0; *(_QWORD *)(a1 + 72) = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a1 + 64)); 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 + 64)); return result; }
Value: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x10],XMM0 MOVUPS xmmword ptr [RDI],XMM0 LAB_001b9e8c: MOV EDI,0x30 CALL 0x0011dc20 LAB_001b9e96: MOV RCX,0x100000001 MOV qword ptr [RAX + 0x8],RCX LEA RCX,[0x254428] ADD RCX,0x10 MOV qword ptr [RAX],RCX MOV RCX,RAX ADD RCX,0x10 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x10],XMM0 MOV qword ptr [RAX + 0x20],0x0 MOV qword ptr [RBX + 0x28],RAX MOV qword ptr [RBX + 0x20],RCX MOV RAX,qword ptr [R14] MOV qword ptr [RBX + 0x30],RAX MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RBX + 0x38],RAX TEST RAX,RAX JZ 0x001b9ef9 MOV RCX,qword ptr [0x00255f80] CMP byte ptr [RCX],0x0 JZ 0x001b9ef5 INC dword ptr [RAX + 0x8] JMP 0x001b9ef9 LAB_001b9ef5: INC.LOCK dword ptr [RAX + 0x8] LAB_001b9ef9: LEA R14,[RBX + 0x40] MOV byte ptr [RBX + 0x40],0x0 MOV qword ptr [RBX + 0x48],0x0 MOV RDI,R14 MOV ESI,0x1 CALL 0x00189206 MOV RDI,R14 MOV ESI,0x1 ADD RSP,0x8 POP RBX POP R14 JMP 0x00189206
/* minja::Value::Value(std::shared_ptr<std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&)> > const&) */ void __thiscall minja::Value::Value(Value *this,shared_ptr *param_1) { long lVar1; int8 *puVar2; bool bVar3; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; /* try { // try from 001b9e8c to 001b9e95 has its CatchHandler @ 001b9f2a */ puVar2 = (int8 *)operator_new(0x30); puVar2[1] = 0x100000001; *puVar2 = &PTR___Sp_counted_ptr_inplace_00254438; puVar2[2] = 0; puVar2[3] = 0; puVar2[4] = 0; *(int8 **)(this + 0x28) = puVar2; *(int8 **)(this + 0x20) = puVar2 + 2; *(int8 *)(this + 0x30) = *(int8 *)param_1; lVar1 = *(long *)(param_1 + 8); *(long *)(this + 0x38) = lVar1; if (lVar1 != 0) { if (*PTR___libc_single_threaded_00255f80 == '\0') { LOCK(); *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; UNLOCK(); } else { *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; } } bVar3 = (bool)((char)this + '@'); this[0x40] = (Value)0x0; *(int8 *)(this + 0x48) = 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> ::assert_invariant(bVar3); 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(bVar3); return; }
47,588
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 0x7bf56 movq -0x18(%rbp), %rax movq %rax, -0x28(%rbp) jmp 0x7bf58 jmp 0x7bf5a movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jbe 0x7bf6c movq -0x30(%rbp), %rax movq %rax, -0x28(%rbp) jmp 0x7bf6e cmpq $0x0, -0x28(%rbp) je 0x7bf86 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0x265b0 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_7BF56 mov rax, [rbp+var_18] mov [rbp+var_28], rax loc_7BF56: jmp short $+2 loc_7BF58: jmp short $+2 loc_7BF5A: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jbe short loc_7BF6C mov rax, [rbp+var_30] mov [rbp+var_28], rax loc_7BF6C: jmp short $+2 loc_7BF6E: cmp [rbp+var_28], 0 jz short loc_7BF86 mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] call _memmove loc_7BF86: 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 0x0017bf56 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x28],RAX LAB_0017bf56: JMP 0x0017bf58 LAB_0017bf58: JMP 0x0017bf5a LAB_0017bf5a: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JBE 0x0017bf6c MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x28],RAX LAB_0017bf6c: JMP 0x0017bf6e LAB_0017bf6e: CMP qword ptr [RBP + -0x28],0x0 JZ 0x0017bf86 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] CALL 0x001265b0 LAB_0017bf86: 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; }
47,589
psi_rwlock_wrlock
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_rwlock_wrlock(mysql_rwlock_t *that, const char *file, uint line) { PSI_rwlock_locker_state state; PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_wrwait) (&state, that->m_psi, PSI_RWLOCK_WRITELOCK, file, line); int result= rw_wrlock(&that->m_rwlock); if (locker) PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result); return result; }
O3
c
psi_rwlock_wrlock: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x38, %rsp movl %edx, %r8d movq %rsi, %rcx movq %rdi, %r14 leaq 0x2cb00d(%rip), %r15 # 0x2ef820 movq (%r15), %rax movq 0x90(%rdi), %rsi leaq -0x48(%rbp), %rdi pushq $0x1 popq %rdx callq *0x1b0(%rax) movq %rax, %rbx movq %r14, %rdi callq 0x273c9 movl %eax, %r14d testq %rbx, %rbx je 0x2484c movq (%r15), %rax movq %rbx, %rdi movl %r14d, %esi callq *0x1b8(%rax) movl %r14d, %eax addq $0x38, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
psi_rwlock_wrlock: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 38h mov r8d, edx mov rcx, rsi mov r14, rdi lea r15, PSI_server mov rax, [r15] mov rsi, [rdi+90h] lea rdi, [rbp+var_48] push 1 pop rdx call qword ptr [rax+1B0h] mov rbx, rax mov rdi, r14 call my_rw_wrlock mov r14d, eax test rbx, rbx jz short loc_2484C mov rax, [r15] mov rdi, rbx mov esi, r14d call qword ptr [rax+1B8h] loc_2484C: mov eax, r14d add rsp, 38h pop rbx pop r14 pop r15 pop rbp retn
long long psi_rwlock_wrlock(long long a1, long long a2, unsigned int a3) { long long v3; // rbx unsigned int v4; // r14d _BYTE v6[72]; // [rsp+8h] [rbp-48h] BYREF v3 = (*((long long ( **)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[0] + 54))( v6, *(_QWORD *)(a1 + 144), 1LL, a2, a3); v4 = my_rw_wrlock(a1); if ( v3 ) (*((void ( **)(long long, _QWORD))PSI_server[0] + 55))(v3, v4); return v4; }
psi_rwlock_wrlock: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x38 MOV R8D,EDX MOV RCX,RSI MOV R14,RDI LEA R15,[0x3ef820] MOV RAX,qword ptr [R15] MOV RSI,qword ptr [RDI + 0x90] LEA RDI,[RBP + -0x48] PUSH 0x1 POP RDX CALL qword ptr [RAX + 0x1b0] MOV RBX,RAX MOV RDI,R14 CALL 0x001273c9 MOV R14D,EAX TEST RBX,RBX JZ 0x0012484c MOV RAX,qword ptr [R15] MOV RDI,RBX MOV ESI,R14D CALL qword ptr [RAX + 0x1b8] LAB_0012484c: MOV EAX,R14D ADD RSP,0x38 POP RBX POP R14 POP R15 POP RBP RET
int4 psi_rwlock_wrlock(long param_1,int8 param_2,int4 param_3) { int4 uVar1; long lVar2; int1 local_50 [48]; lVar2 = (**(code **)(PSI_server + 0x1b0)) (local_50,*(int8 *)(param_1 + 0x90),1,param_2,param_3); uVar1 = my_rw_wrlock(param_1); if (lVar2 != 0) { (**(code **)(PSI_server + 0x1b8))(lVar2,uVar1); } return uVar1; }
47,590
LefDefParser::defiBlockage::Init()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiBlockage.cpp
void defiBlockage::Init() { numPolys_ = 0; clear(); layerName_ = 0; componentName_ = 0; layerNameLength_ = 0; componentNameLength_ = 0; xl_ = 0; yl_ = 0; xh_ = 0; yh_ = 0; rectsAllocated_ = 0; polysAllocated_ = 0; polygons_ = 0; }
O0
cpp
LefDefParser::defiBlockage::Init(): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rdi movq %rdi, 0x8(%rsp) movl $0x0, 0x80(%rdi) callq 0x4b6a0 movq 0x8(%rsp), %rax movq $0x0, 0x8(%rax) movq $0x0, 0x20(%rax) movl $0x0, 0x10(%rax) movl $0x0, 0x28(%rax) movq $0x0, 0x60(%rax) movq $0x0, 0x68(%rax) movq $0x0, 0x70(%rax) movq $0x0, 0x78(%rax) movl $0x0, 0x54(%rax) movl $0x0, 0x84(%rax) movq $0x0, 0x88(%rax) addq $0x18, %rsp retq nopw %cs:(%rax,%rax)
_ZN12LefDefParser12defiBlockage4InitEv: sub rsp, 18h mov [rsp+18h+var_8], rdi mov rdi, [rsp+18h+var_8]; this mov [rsp+18h+var_10], rdi mov dword ptr [rdi+80h], 0 call _ZN12LefDefParser12defiBlockage5clearEv; LefDefParser::defiBlockage::clear(void) mov rax, [rsp+18h+var_10] mov qword ptr [rax+8], 0 mov qword ptr [rax+20h], 0 mov dword ptr [rax+10h], 0 mov dword ptr [rax+28h], 0 mov qword ptr [rax+60h], 0 mov qword ptr [rax+68h], 0 mov qword ptr [rax+70h], 0 mov qword ptr [rax+78h], 0 mov dword ptr [rax+54h], 0 mov dword ptr [rax+84h], 0 mov qword ptr [rax+88h], 0 add rsp, 18h retn
LefDefParser::defiBlockage * LefDefParser::defiBlockage::Init(LefDefParser::defiBlockage *this) { LefDefParser::defiBlockage *result; // rax *((_DWORD *)this + 32) = 0; LefDefParser::defiBlockage::clear(this); result = this; *((_QWORD *)this + 1) = 0LL; *((_QWORD *)this + 4) = 0LL; *((_DWORD *)this + 4) = 0; *((_DWORD *)this + 10) = 0; *((_QWORD *)this + 12) = 0LL; *((_QWORD *)this + 13) = 0LL; *((_QWORD *)this + 14) = 0LL; *((_QWORD *)this + 15) = 0LL; *((_DWORD *)this + 21) = 0; *((_DWORD *)this + 33) = 0; *((_QWORD *)this + 17) = 0LL; return result; }
Init: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV RDI,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x8],RDI MOV dword ptr [RDI + 0x80],0x0 CALL 0x0014b6a0 MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x8],0x0 MOV qword ptr [RAX + 0x20],0x0 MOV dword ptr [RAX + 0x10],0x0 MOV dword ptr [RAX + 0x28],0x0 MOV qword ptr [RAX + 0x60],0x0 MOV qword ptr [RAX + 0x68],0x0 MOV qword ptr [RAX + 0x70],0x0 MOV qword ptr [RAX + 0x78],0x0 MOV dword ptr [RAX + 0x54],0x0 MOV dword ptr [RAX + 0x84],0x0 MOV qword ptr [RAX + 0x88],0x0 ADD RSP,0x18 RET
/* LefDefParser::defiBlockage::Init() */ void __thiscall LefDefParser::defiBlockage::Init(defiBlockage *this) { *(int4 *)(this + 0x80) = 0; clear(this); *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x20) = 0; *(int4 *)(this + 0x10) = 0; *(int4 *)(this + 0x28) = 0; *(int8 *)(this + 0x60) = 0; *(int8 *)(this + 0x68) = 0; *(int8 *)(this + 0x70) = 0; *(int8 *)(this + 0x78) = 0; *(int4 *)(this + 0x54) = 0; *(int4 *)(this + 0x84) = 0; *(int8 *)(this + 0x88) = 0; return; }
47,591
cs_copy_data
eloqsql/mysys/charset.c
static int cs_copy_data(struct charset_info_st *to, CHARSET_INFO *from) { to->number= from->number ? from->number : to->number; /* Don't replace csname if already set */ if (from->cs_name.str && !to->cs_name.str) { if (!(to->cs_name.str= my_once_memdup(from->cs_name.str, from->cs_name.length + 1, MYF(MY_WME)))) goto err; to->cs_name.length= from->cs_name.length; } if (from->coll_name.str) { if (!(to->coll_name.str= my_once_memdup(from->coll_name.str, from->coll_name.length + 1, MYF(MY_WME)))) goto err; to->coll_name.length= from->coll_name.length; } if (from->comment) if (!(to->comment= my_once_strdup(from->comment,MYF(MY_WME)))) goto err; if (from->m_ctype) { if (!(to->m_ctype= (uchar*) my_once_memdup((char*) from->m_ctype, MY_CS_CTYPE_TABLE_SIZE, MYF(MY_WME)))) goto err; if (init_state_maps(to)) goto err; } if (from->to_lower) if (!(to->to_lower= (uchar*) my_once_memdup((char*) from->to_lower, MY_CS_TO_LOWER_TABLE_SIZE, MYF(MY_WME)))) goto err; if (from->to_upper) if (!(to->to_upper= (uchar*) my_once_memdup((char*) from->to_upper, MY_CS_TO_UPPER_TABLE_SIZE, MYF(MY_WME)))) goto err; if (from->sort_order) { if (!(to->sort_order= (uchar*) my_once_memdup((char*) from->sort_order, MY_CS_SORT_ORDER_TABLE_SIZE, MYF(MY_WME)))) goto err; } if (from->tab_to_uni) { uint sz= MY_CS_TO_UNI_TABLE_SIZE*sizeof(uint16); if (!(to->tab_to_uni= (uint16*) my_once_memdup((char*)from->tab_to_uni, sz, MYF(MY_WME)))) goto err; } if (from->tailoring) if (!(to->tailoring= my_once_strdup(from->tailoring,MYF(MY_WME)))) goto err; return 0; err: return 1; }
O0
c
cs_copy_data: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x18(%rbp), %rax cmpl $0x0, (%rax) je 0x369e4 movq -0x18(%rbp), %rax movl (%rax), %eax movl %eax, -0x20(%rbp) jmp 0x369ed movq -0x10(%rbp), %rax movl (%rax), %eax movl %eax, -0x20(%rbp) movl -0x20(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movq -0x18(%rbp), %rax cmpq $0x0, 0x10(%rax) je 0x36a4d movq -0x10(%rbp), %rax cmpq $0x0, 0x10(%rax) jne 0x36a4d movq -0x18(%rbp), %rax movq 0x10(%rax), %rdi movq -0x18(%rbp), %rax movq 0x18(%rax), %rsi addq $0x1, %rsi movl $0x10, %edx callq 0x2e670 movq -0x10(%rbp), %rcx movq %rax, 0x10(%rcx) cmpq $0x0, %rax jne 0x36a3d jmp 0x36c29 movq -0x18(%rbp), %rax movq 0x18(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x18(%rbp), %rax cmpq $0x0, 0x20(%rax) je 0x36a99 movq -0x18(%rbp), %rax movq 0x20(%rax), %rdi movq -0x18(%rbp), %rax movq 0x28(%rax), %rsi addq $0x1, %rsi movl $0x10, %edx callq 0x2e670 movq -0x10(%rbp), %rcx movq %rax, 0x20(%rcx) cmpq $0x0, %rax jne 0x36a89 jmp 0x36c29 movq -0x18(%rbp), %rax movq 0x28(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x28(%rax) movq -0x18(%rbp), %rax cmpq $0x0, 0x30(%rax) je 0x36acb movq -0x18(%rbp), %rax movq 0x30(%rax), %rdi movl $0x10, %esi callq 0x2e610 movq -0x10(%rbp), %rcx movq %rax, 0x30(%rcx) cmpq $0x0, %rax jne 0x36ac9 jmp 0x36c29 jmp 0x36acb movq -0x18(%rbp), %rax cmpq $0x0, 0x40(%rax) je 0x36b14 movq -0x18(%rbp), %rax movq 0x40(%rax), %rdi movl $0x101, %esi # imm = 0x101 movl $0x10, %edx callq 0x2e670 movq -0x10(%rbp), %rcx movq %rax, 0x40(%rcx) cmpq $0x0, %rax jne 0x36b00 jmp 0x36c29 movq -0x10(%rbp), %rdi callq 0x36d40 cmpb $0x0, %al je 0x36b12 jmp 0x36c29 jmp 0x36b14 movq -0x18(%rbp), %rax cmpq $0x0, 0x48(%rax) je 0x36b4b movq -0x18(%rbp), %rax movq 0x48(%rax), %rdi movl $0x100, %esi # imm = 0x100 movl $0x10, %edx callq 0x2e670 movq -0x10(%rbp), %rcx movq %rax, 0x48(%rcx) cmpq $0x0, %rax jne 0x36b49 jmp 0x36c29 jmp 0x36b4b movq -0x18(%rbp), %rax cmpq $0x0, 0x50(%rax) je 0x36b82 movq -0x18(%rbp), %rax movq 0x50(%rax), %rdi movl $0x100, %esi # imm = 0x100 movl $0x10, %edx callq 0x2e670 movq -0x10(%rbp), %rcx movq %rax, 0x50(%rcx) cmpq $0x0, %rax jne 0x36b80 jmp 0x36c29 jmp 0x36b82 movq -0x18(%rbp), %rax cmpq $0x0, 0x58(%rax) je 0x36bb6 movq -0x18(%rbp), %rax movq 0x58(%rax), %rdi movl $0x100, %esi # imm = 0x100 movl $0x10, %edx callq 0x2e670 movq -0x10(%rbp), %rcx movq %rax, 0x58(%rcx) cmpq $0x0, %rax jne 0x36bb4 jmp 0x36c29 jmp 0x36bb6 movq -0x18(%rbp), %rax cmpq $0x0, 0x68(%rax) je 0x36bf1 movl $0x200, -0x1c(%rbp) # imm = 0x200 movq -0x18(%rbp), %rax movq 0x68(%rax), %rdi movl -0x1c(%rbp), %eax movl %eax, %esi movl $0x10, %edx callq 0x2e670 movq -0x10(%rbp), %rcx movq %rax, 0x68(%rcx) cmpq $0x0, %rax jne 0x36bef jmp 0x36c29 jmp 0x36bf1 movq -0x18(%rbp), %rax cmpq $0x0, 0x38(%rax) je 0x36c20 movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi movl $0x10, %esi callq 0x2e610 movq -0x10(%rbp), %rcx movq %rax, 0x38(%rcx) cmpq $0x0, %rax jne 0x36c1e jmp 0x36c29 jmp 0x36c20 movl $0x0, -0x4(%rbp) jmp 0x36c30 movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopl (%rax)
cs_copy_data: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_18] cmp dword ptr [rax], 0 jz short loc_369E4 mov rax, [rbp+var_18] mov eax, [rax] mov [rbp+var_20], eax jmp short loc_369ED loc_369E4: mov rax, [rbp+var_10] mov eax, [rax] mov [rbp+var_20], eax loc_369ED: mov ecx, [rbp+var_20] mov rax, [rbp+var_10] mov [rax], ecx mov rax, [rbp+var_18] cmp qword ptr [rax+10h], 0 jz short loc_36A4D mov rax, [rbp+var_10] cmp qword ptr [rax+10h], 0 jnz short loc_36A4D mov rax, [rbp+var_18] mov rdi, [rax+10h] mov rax, [rbp+var_18] mov rsi, [rax+18h] add rsi, 1 mov edx, 10h call my_once_memdup mov rcx, [rbp+var_10] mov [rcx+10h], rax cmp rax, 0 jnz short loc_36A3D jmp loc_36C29 loc_36A3D: mov rax, [rbp+var_18] mov rcx, [rax+18h] mov rax, [rbp+var_10] mov [rax+18h], rcx loc_36A4D: mov rax, [rbp+var_18] cmp qword ptr [rax+20h], 0 jz short loc_36A99 mov rax, [rbp+var_18] mov rdi, [rax+20h] mov rax, [rbp+var_18] mov rsi, [rax+28h] add rsi, 1 mov edx, 10h call my_once_memdup mov rcx, [rbp+var_10] mov [rcx+20h], rax cmp rax, 0 jnz short loc_36A89 jmp loc_36C29 loc_36A89: mov rax, [rbp+var_18] mov rcx, [rax+28h] mov rax, [rbp+var_10] mov [rax+28h], rcx loc_36A99: mov rax, [rbp+var_18] cmp qword ptr [rax+30h], 0 jz short loc_36ACB mov rax, [rbp+var_18] mov rdi, [rax+30h] mov esi, 10h call my_once_strdup mov rcx, [rbp+var_10] mov [rcx+30h], rax cmp rax, 0 jnz short loc_36AC9 jmp loc_36C29 loc_36AC9: jmp short $+2 loc_36ACB: mov rax, [rbp+var_18] cmp qword ptr [rax+40h], 0 jz short loc_36B14 mov rax, [rbp+var_18] mov rdi, [rax+40h] mov esi, 101h mov edx, 10h call my_once_memdup mov rcx, [rbp+var_10] mov [rcx+40h], rax cmp rax, 0 jnz short loc_36B00 jmp loc_36C29 loc_36B00: mov rdi, [rbp+var_10] call init_state_maps cmp al, 0 jz short loc_36B12 jmp loc_36C29 loc_36B12: jmp short $+2 loc_36B14: mov rax, [rbp+var_18] cmp qword ptr [rax+48h], 0 jz short loc_36B4B mov rax, [rbp+var_18] mov rdi, [rax+48h] mov esi, 100h mov edx, 10h call my_once_memdup mov rcx, [rbp+var_10] mov [rcx+48h], rax cmp rax, 0 jnz short loc_36B49 jmp loc_36C29 loc_36B49: jmp short $+2 loc_36B4B: mov rax, [rbp+var_18] cmp qword ptr [rax+50h], 0 jz short loc_36B82 mov rax, [rbp+var_18] mov rdi, [rax+50h] mov esi, 100h mov edx, 10h call my_once_memdup mov rcx, [rbp+var_10] mov [rcx+50h], rax cmp rax, 0 jnz short loc_36B80 jmp loc_36C29 loc_36B80: jmp short $+2 loc_36B82: mov rax, [rbp+var_18] cmp qword ptr [rax+58h], 0 jz short loc_36BB6 mov rax, [rbp+var_18] mov rdi, [rax+58h] mov esi, 100h mov edx, 10h call my_once_memdup mov rcx, [rbp+var_10] mov [rcx+58h], rax cmp rax, 0 jnz short loc_36BB4 jmp short loc_36C29 loc_36BB4: jmp short $+2 loc_36BB6: mov rax, [rbp+var_18] cmp qword ptr [rax+68h], 0 jz short loc_36BF1 mov [rbp+var_1C], 200h mov rax, [rbp+var_18] mov rdi, [rax+68h] mov eax, [rbp+var_1C] mov esi, eax mov edx, 10h call my_once_memdup mov rcx, [rbp+var_10] mov [rcx+68h], rax cmp rax, 0 jnz short loc_36BEF jmp short loc_36C29 loc_36BEF: jmp short $+2 loc_36BF1: mov rax, [rbp+var_18] cmp qword ptr [rax+38h], 0 jz short loc_36C20 mov rax, [rbp+var_18] mov rdi, [rax+38h] mov esi, 10h call my_once_strdup mov rcx, [rbp+var_10] mov [rcx+38h], rax cmp rax, 0 jnz short loc_36C1E jmp short loc_36C29 loc_36C1E: jmp short $+2 loc_36C20: mov [rbp+var_4], 0 jmp short loc_36C30 loc_36C29: mov [rbp+var_4], 1 loc_36C30: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long cs_copy_data(int *a1, int *a2) { char *v2; // rax char *v3; // rax char *v4; // rax char *v5; // rax char *v6; // rax char *v7; // rax char *v8; // rax char *v9; // rax char *v10; // rax int v12; // [rsp+0h] [rbp-20h] if ( *a2 ) v12 = *a2; else v12 = *a1; *a1 = v12; if ( *((_QWORD *)a2 + 2) && !*((_QWORD *)a1 + 2) ) { v2 = my_once_memdup(*((_QWORD *)a2 + 2), *((_QWORD *)a2 + 3) + 1LL, 16LL); *((_QWORD *)a1 + 2) = v2; if ( !v2 ) return 1; *((_QWORD *)a1 + 3) = *((_QWORD *)a2 + 3); } if ( !*((_QWORD *)a2 + 4) ) goto LABEL_11; v3 = my_once_memdup(*((_QWORD *)a2 + 4), *((_QWORD *)a2 + 5) + 1LL, 16LL); *((_QWORD *)a1 + 4) = v3; if ( !v3 ) return 1; *((_QWORD *)a1 + 5) = *((_QWORD *)a2 + 5); LABEL_11: if ( *((_QWORD *)a2 + 6) ) { v4 = my_once_strdup(*((_QWORD *)a2 + 6), 16LL); *((_QWORD *)a1 + 6) = v4; if ( !v4 ) return 1; } if ( *((_QWORD *)a2 + 8) ) { v5 = my_once_memdup(*((_QWORD *)a2 + 8), 257LL, 16LL); *((_QWORD *)a1 + 8) = v5; if ( !v5 || (unsigned __int8)init_state_maps(a1) ) return 1; } if ( *((_QWORD *)a2 + 9) ) { v6 = my_once_memdup(*((_QWORD *)a2 + 9), 256LL, 16LL); *((_QWORD *)a1 + 9) = v6; if ( !v6 ) return 1; } if ( *((_QWORD *)a2 + 10) ) { v7 = my_once_memdup(*((_QWORD *)a2 + 10), 256LL, 16LL); *((_QWORD *)a1 + 10) = v7; if ( !v7 ) return 1; } if ( *((_QWORD *)a2 + 11) ) { v8 = my_once_memdup(*((_QWORD *)a2 + 11), 256LL, 16LL); *((_QWORD *)a1 + 11) = v8; if ( !v8 ) return 1; } if ( *((_QWORD *)a2 + 13) ) { v9 = my_once_memdup(*((_QWORD *)a2 + 13), 512LL, 16LL); *((_QWORD *)a1 + 13) = v9; if ( !v9 ) return 1; } if ( *((_QWORD *)a2 + 7) ) { v10 = my_once_strdup(*((_QWORD *)a2 + 7), 16LL); *((_QWORD *)a1 + 7) = v10; if ( !v10 ) return 1; } return 0; }
cs_copy_data: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX],0x0 JZ 0x001369e4 MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x20],EAX JMP 0x001369ed LAB_001369e4: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x20],EAX LAB_001369ed: MOV ECX,dword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x10],0x0 JZ 0x00136a4d MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x10],0x0 JNZ 0x00136a4d MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x18] ADD RSI,0x1 MOV EDX,0x10 CALL 0x0012e670 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x10],RAX CMP RAX,0x0 JNZ 0x00136a3d JMP 0x00136c29 LAB_00136a3d: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],RCX LAB_00136a4d: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x20],0x0 JZ 0x00136a99 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x20] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x28] ADD RSI,0x1 MOV EDX,0x10 CALL 0x0012e670 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x20],RAX CMP RAX,0x0 JNZ 0x00136a89 JMP 0x00136c29 LAB_00136a89: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX + 0x28] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x28],RCX LAB_00136a99: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x30],0x0 JZ 0x00136acb MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x30] MOV ESI,0x10 CALL 0x0012e610 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x30],RAX CMP RAX,0x0 JNZ 0x00136ac9 JMP 0x00136c29 LAB_00136ac9: JMP 0x00136acb LAB_00136acb: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x40],0x0 JZ 0x00136b14 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x40] MOV ESI,0x101 MOV EDX,0x10 CALL 0x0012e670 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x40],RAX CMP RAX,0x0 JNZ 0x00136b00 JMP 0x00136c29 LAB_00136b00: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00136d40 CMP AL,0x0 JZ 0x00136b12 JMP 0x00136c29 LAB_00136b12: JMP 0x00136b14 LAB_00136b14: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x48],0x0 JZ 0x00136b4b MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x48] MOV ESI,0x100 MOV EDX,0x10 CALL 0x0012e670 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x48],RAX CMP RAX,0x0 JNZ 0x00136b49 JMP 0x00136c29 LAB_00136b49: JMP 0x00136b4b LAB_00136b4b: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x50],0x0 JZ 0x00136b82 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x50] MOV ESI,0x100 MOV EDX,0x10 CALL 0x0012e670 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x50],RAX CMP RAX,0x0 JNZ 0x00136b80 JMP 0x00136c29 LAB_00136b80: JMP 0x00136b82 LAB_00136b82: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x58],0x0 JZ 0x00136bb6 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x58] MOV ESI,0x100 MOV EDX,0x10 CALL 0x0012e670 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x58],RAX CMP RAX,0x0 JNZ 0x00136bb4 JMP 0x00136c29 LAB_00136bb4: JMP 0x00136bb6 LAB_00136bb6: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x68],0x0 JZ 0x00136bf1 MOV dword ptr [RBP + -0x1c],0x200 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x68] MOV EAX,dword ptr [RBP + -0x1c] MOV ESI,EAX MOV EDX,0x10 CALL 0x0012e670 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x68],RAX CMP RAX,0x0 JNZ 0x00136bef JMP 0x00136c29 LAB_00136bef: JMP 0x00136bf1 LAB_00136bf1: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x38],0x0 JZ 0x00136c20 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x38] MOV ESI,0x10 CALL 0x0012e610 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x38],RAX CMP RAX,0x0 JNZ 0x00136c1e JMP 0x00136c29 LAB_00136c1e: JMP 0x00136c20 LAB_00136c20: MOV dword ptr [RBP + -0x4],0x0 JMP 0x00136c30 LAB_00136c29: MOV dword ptr [RBP + -0x4],0x1 LAB_00136c30: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 cs_copy_data(int *param_1,int *param_2) { char cVar1; long lVar2; int local_28; int4 local_c; if (*param_2 == 0) { local_28 = *param_1; } else { local_28 = *param_2; } *param_1 = local_28; if ((*(long *)(param_2 + 4) == 0) || (*(long *)(param_1 + 4) != 0)) { LAB_00136a4d: if (*(long *)(param_2 + 8) != 0) { lVar2 = my_once_memdup(*(int8 *)(param_2 + 8),*(long *)(param_2 + 10) + 1,0x10); *(long *)(param_1 + 8) = lVar2; if (lVar2 == 0) goto LAB_00136c29; *(int8 *)(param_1 + 10) = *(int8 *)(param_2 + 10); } if (*(long *)(param_2 + 0xc) != 0) { lVar2 = my_once_strdup(*(int8 *)(param_2 + 0xc),0x10); *(long *)(param_1 + 0xc) = lVar2; if (lVar2 == 0) goto LAB_00136c29; } if (*(long *)(param_2 + 0x10) != 0) { lVar2 = my_once_memdup(*(int8 *)(param_2 + 0x10),0x101,0x10); *(long *)(param_1 + 0x10) = lVar2; if ((lVar2 == 0) || (cVar1 = init_state_maps(param_1), cVar1 != '\0')) goto LAB_00136c29; } if (*(long *)(param_2 + 0x12) != 0) { lVar2 = my_once_memdup(*(int8 *)(param_2 + 0x12),0x100,0x10); *(long *)(param_1 + 0x12) = lVar2; if (lVar2 == 0) goto LAB_00136c29; } if (*(long *)(param_2 + 0x14) != 0) { lVar2 = my_once_memdup(*(int8 *)(param_2 + 0x14),0x100,0x10); *(long *)(param_1 + 0x14) = lVar2; if (lVar2 == 0) goto LAB_00136c29; } if (*(long *)(param_2 + 0x16) != 0) { lVar2 = my_once_memdup(*(int8 *)(param_2 + 0x16),0x100,0x10); *(long *)(param_1 + 0x16) = lVar2; if (lVar2 == 0) goto LAB_00136c29; } if (*(long *)(param_2 + 0x1a) != 0) { lVar2 = my_once_memdup(*(int8 *)(param_2 + 0x1a),0x200,0x10); *(long *)(param_1 + 0x1a) = lVar2; if (lVar2 == 0) goto LAB_00136c29; } if (*(long *)(param_2 + 0xe) != 0) { lVar2 = my_once_strdup(*(int8 *)(param_2 + 0xe),0x10); *(long *)(param_1 + 0xe) = lVar2; if (lVar2 == 0) goto LAB_00136c29; } local_c = 0; } else { lVar2 = my_once_memdup(*(int8 *)(param_2 + 4),*(long *)(param_2 + 6) + 1,0x10); *(long *)(param_1 + 4) = lVar2; if (lVar2 != 0) { *(int8 *)(param_1 + 6) = *(int8 *)(param_2 + 6); goto LAB_00136a4d; } LAB_00136c29: local_c = 1; } return local_c; }
47,592
ma_bitmap_flush
eloqsql/storage/maria/ma_bitmap.c
my_bool _ma_bitmap_flush(MARIA_SHARE *share) { my_bool res= 0; DBUG_ENTER("_ma_bitmap_flush"); if (share->bitmap.changed) { mysql_mutex_lock(&share->bitmap.bitmap_lock); if (share->bitmap.changed) { /* We have to mark the file changed here, as otherwise the following write to pagecache may force a page out from this file, which would cause _ma_mark_file_changed() to be called with bitmaplock hold! */ _ma_bitmap_mark_file_changed(share, 1); res= write_changed_bitmap(share, &share->bitmap); share->bitmap.changed= 0; } mysql_mutex_unlock(&share->bitmap.bitmap_lock); } DBUG_RETURN(res); }
O3
c
ma_bitmap_flush: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp cmpb $0x0, 0xa30(%rdi) je 0x53002 movq %rdi, %r14 leaq 0xa98(%rdi), %rbx cmpq $0x0, 0xad8(%rdi) jne 0x53091 movq %rbx, %rdi callq 0x2a1f0 leaq 0xad8(%r14), %r15 cmpb $0x0, 0xa30(%r14) je 0x53007 cmpb $0x0, 0x7df(%r14) jne 0x52f80 testb $0x1, 0x170(%r14) jne 0x530bc movb $0x1, 0xa31(%r14) cmpl $0x0, 0xa48(%r14) je 0x5300c movq 0x600(%r14), %rdi leaq 0xa50(%r14), %rsi movq 0xa20(%r14), %rdx movq 0xa18(%r14), %r8 movl 0x80(%rdi), %eax subq $0x8, %rsp movq %r15, -0x30(%rbp) xorl %r15d, %r15d leaq -0x48(%rbp), %r13 xorl %ecx, %ecx movl $0x1, %r9d pushq %rax pushq %r15 pushq $0x0 pushq %r13 pushq %r15 pushq $0x2 pushq %r15 callq 0x3ce2e addq $0x40, %rsp movl %eax, %r12d movl %r15d, 0x8(%r13) movq -0x30(%rbp), %r15 movb $0x1, 0x10(%r13) leaq 0xb50(%r14), %rdi movq %r13, %rsi callq 0x92dda jmp 0x53067 xorl %r12d, %r12d jmp 0x5307f xorl %r12d, %r12d jmp 0x5306f movq 0x600(%r14), %rdi leaq 0xa50(%r14), %rsi movq 0xa20(%r14), %rdx movq 0xa18(%r14), %r8 movl 0x80(%rdi), %eax subq $0x40, %rsp movl %eax, 0x30(%rsp) xorl %eax, %eax movl %eax, 0x28(%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%rsp) movl %eax, 0x10(%rsp) movl %eax, (%rsp) movl $0x1, 0x8(%rsp) xorl %ecx, %ecx movl $0x1, %r9d callq 0x3ce2e addq $0x40, %rsp movl %eax, %r12d movb $0x0, 0xa30(%r14) movq (%r15), %rdi testq %rdi, %rdi jne 0x530aa movq %rbx, %rdi callq 0x2a1c0 movl %r12d, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x8b143(%rip), %rsi # 0xde1db movq %rbx, %rdi movl $0x1a9, %edx # imm = 0x1A9 callq 0x306c5 jmp 0x52f53 leaq 0x339317(%rip), %rax # 0x38c3c8 movq (%rax), %rax callq *0x160(%rax) jmp 0x53077 movq %r15, %rdi movq %rbx, %rsi movq %r14, %rdx callq 0x2d457 jmp 0x52f80
_ma_bitmap_flush: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h cmp byte ptr [rdi+0A30h], 0 jz loc_53002 mov r14, rdi lea rbx, [rdi+0A98h] cmp qword ptr [rdi+0AD8h], 0 jnz loc_53091 mov rdi, rbx call _pthread_mutex_lock loc_52F53: lea r15, [r14+0AD8h] cmp byte ptr [r14+0A30h], 0 jz loc_53007 cmp byte ptr [r14+7DFh], 0 jnz short loc_52F80 test byte ptr [r14+170h], 1 jnz loc_530BC loc_52F80: mov byte ptr [r14+0A31h], 1 cmp dword ptr [r14+0A48h], 0 jz short loc_5300C mov rdi, [r14+600h] lea rsi, [r14+0A50h] mov rdx, [r14+0A20h] mov r8, [r14+0A18h] mov eax, [rdi+80h] sub rsp, 8 mov [rbp+var_30], r15 xor r15d, r15d lea r13, [rbp+var_48] xor ecx, ecx mov r9d, 1 push rax push r15 push 0 push r13 push r15 push 2 push r15 call pagecache_write_part add rsp, 40h mov r12d, eax mov [r13+8], r15d mov r15, [rbp+var_30] mov byte ptr [r13+10h], 1 lea rdi, [r14+0B50h] mov rsi, r13 call insert_dynamic jmp short loc_53067 loc_53002: xor r12d, r12d jmp short loc_5307F loc_53007: xor r12d, r12d jmp short loc_5306F loc_5300C: mov rdi, [r14+600h] lea rsi, [r14+0A50h] mov rdx, [r14+0A20h] mov r8, [r14+0A18h] mov eax, [rdi+80h] sub rsp, 40h mov [rsp+90h+var_60], eax xor eax, eax mov [rsp+90h+var_68], eax xorps xmm0, xmm0 movups [rsp+90h+var_78], xmm0 mov [rsp+90h+var_80], eax mov [rsp+90h+var_90], eax mov [rsp+90h+var_88], 1 xor ecx, ecx mov r9d, 1 call pagecache_write_part add rsp, 40h mov r12d, eax loc_53067: mov byte ptr [r14+0A30h], 0 loc_5306F: mov rdi, [r15] test rdi, rdi jnz short loc_530AA loc_53077: mov rdi, rbx call _pthread_mutex_unlock loc_5307F: mov eax, r12d add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_53091: lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, rbx mov edx, 1A9h call psi_mutex_lock jmp loc_52F53 loc_530AA: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_53077 loc_530BC: mov rdi, r15 mov rsi, rbx mov rdx, r14 call _ma_bitmap_flush_cold_1 jmp loc_52F80
long long ma_bitmap_flush(long long a1) { long long v2; // rbx _QWORD *v3; // r15 __m128i *v4; // rdi long long v5; // rdx char *v6; // r8 unsigned __int32 v7; // eax unsigned int v8; // r12d long long v10; // [rsp+48h] [rbp-48h] BYREF int v11; // [rsp+50h] [rbp-40h] char v12; // [rsp+58h] [rbp-38h] _QWORD *v13; // [rsp+60h] [rbp-30h] if ( *(_BYTE *)(a1 + 2608) ) { v2 = a1 + 2712; if ( *(_QWORD *)(a1 + 2776) ) psi_mutex_lock(a1 + 2712, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c", 0x1A9u); else pthread_mutex_lock(a1 + 2712); v3 = (_QWORD *)(a1 + 2776); if ( *(_BYTE *)(a1 + 2608) ) { if ( !*(_BYTE *)(a1 + 2015) && (*(_BYTE *)(a1 + 368) & 1) != 0 ) ma_bitmap_flush_cold_1((_QWORD *)(a1 + 2776), v2, a1); *(_BYTE *)(a1 + 2609) = 1; if ( *(_DWORD *)(a1 + 2632) ) { v4 = *(__m128i **)(a1 + 1536); v5 = *(_QWORD *)(a1 + 2592); v6 = *(char **)(a1 + 2584); v7 = v4[8].m128i_u32[0]; v13 = (_QWORD *)(a1 + 2776); v8 = pagecache_write_part(v4, (char *)(a1 + 2640), v5, 0, v6, 1, 0, 2u, 0, &v10, 0LL, 0, v7); v11 = 0; v3 = v13; v12 = 1; insert_dynamic(a1 + 2896, &v10); } else { v8 = pagecache_write_part( *(__m128i **)(a1 + 1536), (char *)(a1 + 2640), *(_QWORD *)(a1 + 2592), 0, *(char **)(a1 + 2584), 1, 0, 1u, 0, 0LL, 0LL, 0, *(_DWORD *)(*(_QWORD *)(a1 + 1536) + 128LL)); } *(_BYTE *)(a1 + 2608) = 0; } else { v8 = 0; } if ( *v3 ) PSI_server[44](); pthread_mutex_unlock(v2); } else { return 0; } return v8; }
_ma_bitmap_flush: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 CMP byte ptr [RDI + 0xa30],0x0 JZ 0x00153002 MOV R14,RDI LEA RBX,[RDI + 0xa98] CMP qword ptr [RDI + 0xad8],0x0 JNZ 0x00153091 MOV RDI,RBX CALL 0x0012a1f0 LAB_00152f53: LEA R15,[R14 + 0xad8] CMP byte ptr [R14 + 0xa30],0x0 JZ 0x00153007 CMP byte ptr [R14 + 0x7df],0x0 JNZ 0x00152f80 TEST byte ptr [R14 + 0x170],0x1 JNZ 0x001530bc LAB_00152f80: MOV byte ptr [R14 + 0xa31],0x1 CMP dword ptr [R14 + 0xa48],0x0 JZ 0x0015300c MOV RDI,qword ptr [R14 + 0x600] LEA RSI,[R14 + 0xa50] MOV RDX,qword ptr [R14 + 0xa20] MOV R8,qword ptr [R14 + 0xa18] MOV EAX,dword ptr [RDI + 0x80] SUB RSP,0x8 MOV qword ptr [RBP + -0x30],R15 XOR R15D,R15D LEA R13,[RBP + -0x48] XOR ECX,ECX MOV R9D,0x1 PUSH RAX PUSH R15 PUSH 0x0 PUSH R13 PUSH R15 PUSH 0x2 PUSH R15 CALL 0x0013ce2e ADD RSP,0x40 MOV R12D,EAX MOV dword ptr [R13 + 0x8],R15D MOV R15,qword ptr [RBP + -0x30] MOV byte ptr [R13 + 0x10],0x1 LEA RDI,[R14 + 0xb50] MOV RSI,R13 CALL 0x00192dda JMP 0x00153067 LAB_00153002: XOR R12D,R12D JMP 0x0015307f LAB_00153007: XOR R12D,R12D JMP 0x0015306f LAB_0015300c: MOV RDI,qword ptr [R14 + 0x600] LEA RSI,[R14 + 0xa50] MOV RDX,qword ptr [R14 + 0xa20] MOV R8,qword ptr [R14 + 0xa18] MOV EAX,dword ptr [RDI + 0x80] SUB RSP,0x40 MOV dword ptr [RSP + 0x30],EAX XOR EAX,EAX MOV dword ptr [RSP + 0x28],EAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x18],XMM0 MOV dword ptr [RSP + 0x10],EAX MOV dword ptr [RSP],EAX MOV dword ptr [RSP + 0x8],0x1 XOR ECX,ECX MOV R9D,0x1 CALL 0x0013ce2e ADD RSP,0x40 MOV R12D,EAX LAB_00153067: MOV byte ptr [R14 + 0xa30],0x0 LAB_0015306f: MOV RDI,qword ptr [R15] TEST RDI,RDI JNZ 0x001530aa LAB_00153077: MOV RDI,RBX CALL 0x0012a1c0 LAB_0015307f: MOV EAX,R12D ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00153091: LEA RSI,[0x1de1db] MOV RDI,RBX MOV EDX,0x1a9 CALL 0x001306c5 JMP 0x00152f53 LAB_001530aa: LEA RAX,[0x48c3c8] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00153077 LAB_001530bc: MOV RDI,R15 MOV RSI,RBX MOV RDX,R14 CALL 0x0012d457 JMP 0x00152f80
int4 _ma_bitmap_flush(long param_1) { pthread_mutex_t *__mutex; int4 uVar1; long *plVar2; ulong in_stack_ffffffffffffff68; ulong in_stack_ffffffffffffff78; ulong in_stack_ffffffffffffff90; int1 local_50 [8]; int4 local_48; int1 local_40; long *local_38; if (*(char *)(param_1 + 0xa30) == '\0') { uVar1 = 0; } else { __mutex = (pthread_mutex_t *)(param_1 + 0xa98); if (*(long *)(param_1 + 0xad8) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c", 0x1a9); } plVar2 = (long *)(param_1 + 0xad8); if (*(char *)(param_1 + 0xa30) == '\0') { uVar1 = 0; } else { if ((*(char *)(param_1 + 0x7df) == '\0') && ((*(byte *)(param_1 + 0x170) & 1) != 0)) { _ma_bitmap_flush_cold_1(plVar2,__mutex,param_1); } *(int1 *)(param_1 + 0xa31) = 1; if (*(int *)(param_1 + 0xa48) == 0) { uVar1 = pagecache_write_part (*(long *)(param_1 + 0x600),param_1 + 0xa50, *(int8 *)(param_1 + 0xa20),0,*(int8 *)(param_1 + 0xa18),1, in_stack_ffffffffffffff68 & 0xffffffff00000000,1, in_stack_ffffffffffffff78 & 0xffffffff00000000,0,0, in_stack_ffffffffffffff90 & 0xffffffff00000000, *(int4 *)(*(long *)(param_1 + 0x600) + 0x80)); } else { local_38 = plVar2; uVar1 = pagecache_write_part (*(long *)(param_1 + 0x600),param_1 + 0xa50, *(int8 *)(param_1 + 0xa20),0,*(int8 *)(param_1 + 0xa18),1,0,2 ,0,local_50,0,0,*(int4 *)(*(long *)(param_1 + 0x600) + 0x80)); plVar2 = local_38; local_48 = 0; local_40 = 1; insert_dynamic(param_1 + 0xb50,local_50); } *(int1 *)(param_1 + 0xa30) = 0; } if (*plVar2 != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); } return uVar1; }
47,593
fmt::v10::appender fmt::v10::detail::write_float<char, fmt::v10::appender, float>(fmt::v10::appender, float, fmt::v10::format_specs<char>, fmt::v10::detail::locale_ref)
aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h
FMT_CONSTEXPR20 auto write_float(OutputIt out, T value, format_specs<Char> specs, locale_ref loc) -> OutputIt { float_specs fspecs = parse_float_type_spec(specs); fspecs.sign = specs.sign; if (detail::signbit(value)) { // value < 0 is false for NaN so use signbit. fspecs.sign = sign::minus; value = -value; } else if (fspecs.sign == sign::minus) { fspecs.sign = sign::none; } if (!detail::isfinite(value)) return write_nonfinite(out, detail::isnan(value), specs, fspecs); if (specs.align == align::numeric && fspecs.sign) { auto it = reserve(out, 1); *it++ = detail::sign<Char>(fspecs.sign); out = base_iterator(out, it); fspecs.sign = sign::none; if (specs.width != 0) --specs.width; } memory_buffer buffer; if (fspecs.format == float_format::hex) { if (fspecs.sign) buffer.push_back(detail::sign<char>(fspecs.sign)); format_hexfloat(convert_float(value), specs.precision, fspecs, buffer); return write_bytes<align::right>(out, {buffer.data(), buffer.size()}, specs); } int precision = specs.precision >= 0 || specs.type == presentation_type::none ? specs.precision : 6; if (fspecs.format == float_format::exp) { if (precision == max_value<int>()) throw_format_error("number is too big"); else ++precision; } else if (fspecs.format != float_format::fixed && precision == 0) { precision = 1; } if (const_check(std::is_same<T, float>())) fspecs.binary32 = true; int exp = format_float(convert_float(value), precision, fspecs, buffer); fspecs.precision = precision; auto f = big_decimal_fp{buffer.data(), static_cast<int>(buffer.size()), exp}; return write_float(out, f, specs, fspecs, loc); }
O3
c
fmt::v10::appender fmt::v10::detail::write_float<char, fmt::v10::appender, float>(fmt::v10::appender, float, fmt::v10::format_specs<char>, fmt::v10::detail::locale_ref): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x260, %rsp # imm = 0x260 movq %rcx, %r14 movaps %xmm0, 0x20(%rsp) movq %rdi, %r15 leaq 0x10(%rsp), %r12 movq %rsi, (%r12) movq %rdx, 0x8(%r12) movq %r12, %rdi callq 0x2c336 movdqa 0x20(%rsp), %xmm0 movq %rax, %rbx movq %rax, 0x8(%rsp) movzwl 0x9(%r12), %eax shrq $0x20, %rbx movl %eax, %ecx andl $0x70, %ecx shll $0x4, %ecx andl $0xffff00ff, %ebx # imm = 0xFFFF00FF leal (%rbx,%rcx), %edx movl %edx, 0xc(%rsp) movd %xmm0, %esi testl %esi, %esi js 0x31cf7 movzwl %cx, %ecx cmpl $0x100, %ecx # imm = 0x100 jne 0x31d0b movl %ebx, 0xc(%rsp) jmp 0x31d0d orl $0x100, %ebx # imm = 0x100 movl %ebx, 0xc(%rsp) pxor 0x51317(%rip), %xmm0 # 0x83020 jmp 0x31d0d movl %edx, %ebx ucomiss 0x514c0(%rip), %xmm0 # 0x831d4 je 0x31e1b andl $0xf, %eax cmpw $0x4, %ax jne 0x31d86 movl %ebx, %eax andl $0xff00, %eax # imm = 0xFF00 je 0x31d86 movzbl %bh, %eax leaq 0x520ce(%rip), %rcx # 0x83e04 movb (%rax,%rcx), %bpl movq 0x10(%r15), %rax leaq 0x1(%rax), %rsi cmpq %rsi, 0x18(%r15) jae 0x31d62 movq (%r15), %rax movq %r15, %rdi movaps %xmm0, 0x20(%rsp) callq *(%rax) movaps 0x20(%rsp), %xmm0 movq 0x10(%r15), %rax leaq 0x1(%rax), %rsi movq 0x8(%r15), %rcx movq %rsi, 0x10(%r15) movb %bpl, (%rcx,%rax) andl $0xffff00ff, %ebx # imm = 0xFFFF00FF movl %ebx, 0xc(%rsp) movl 0x10(%rsp), %eax testl %eax, %eax je 0x31d86 decl %eax movl %eax, 0x10(%rsp) leaq 0x68(%rsp), %r12 movq $0x0, -0x10(%r12) leaq 0x7c6dd(%rip), %rax # 0xae478 movq %rax, -0x20(%r12) movq %r12, -0x18(%r12) movq $0x1f4, -0x8(%r12) # imm = 0x1F4 cmpb $0x3, %bl jne 0x31e43 testl $0xff00, %ebx # imm = 0xFF00 je 0x31dd9 movzbl %bh, %eax leaq 0x5203b(%rip), %rcx # 0x83e04 movb (%rax,%rcx), %al movq $0x1, 0x58(%rsp) movb %al, 0x68(%rsp) cvtss2sd %xmm0, %xmm0 movl 0x14(%rsp), %edi movq 0x8(%rsp), %rsi leaq 0x48(%rsp), %rdx callq 0x31f28 movq 0x50(%rsp), %rax movq 0x58(%rsp), %rcx leaq 0x38(%rsp), %r8 movq %rax, (%r8) movq %rcx, 0x8(%r8) leaq 0x10(%rsp), %rsi movq %r15, %rdi movq %rcx, %rdx callq 0x2c9b4 jmp 0x31ecd xorl %esi, %esi ucomiss %xmm0, %xmm0 setp %sil movq 0x10(%rsp), %rdx movq 0x18(%rsp), %rcx leaq 0x8(%rsp), %r8 movq %r15, %rdi callq 0x293d3 movq %rax, %rbx jmp 0x31ee4 cmpb $0x0, 0x18(%rsp) movl 0x14(%rsp), %eax movl $0x6, %ebp cmovel %eax, %ebp testl %eax, %eax cmovnsl %eax, %ebp cmpb $0x1, %bl jne 0x31e6e cmpl $0x7fffffff, %ebp # imm = 0x7FFFFFFF je 0x31ef7 incl %ebp jmp 0x31e7e testl %ebp, %ebp movl $0x1, %eax cmovnel %ebp, %eax cmpb $0x2, %bl cmovnel %eax, %ebp orl $0x40000, %ebx # imm = 0x40000 movl %ebx, 0xc(%rsp) cvtss2sd %xmm0, %xmm0 movq 0x8(%rsp), %rsi leaq 0x48(%rsp), %rdx movl %ebp, %edi callq 0x32252 movl %ebp, 0x8(%rsp) movq 0x50(%rsp), %rcx leaq 0x38(%rsp), %rsi movq %rcx, (%rsi) movl 0x58(%rsp), %ecx movl %ecx, 0x8(%rsi) movl %eax, 0xc(%rsi) movq 0x8(%rsp), %rcx leaq 0x10(%rsp), %rdx movq %r15, %rdi movq %r14, %r8 callq 0x2dc56 movq %rax, %rbx movq 0x50(%rsp), %rdi cmpq %r12, %rdi je 0x31ee4 movq 0x60(%rsp), %rsi callq 0x1f250 movq %rbx, %rax addq $0x260, %rsp # imm = 0x260 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x51aa3(%rip), %rdi # 0x839a1 callq 0x254fc jmp 0x31f09 jmp 0x31f09 jmp 0x31f09 movq %rax, %rbx movq 0x50(%rsp), %rdi cmpq %r12, %rdi je 0x31f20 movq 0x60(%rsp), %rsi callq 0x1f250 movq %rbx, %rdi callq 0x1ffd0
_ZN3fmt3v106detail11write_floatIcNS0_8appenderEfEET0_S4_T1_NS0_12format_specsIT_EENS1_10locale_refE: push rbp push r15 push r14 push r12 push rbx sub rsp, 260h mov r14, rcx movaps xmmword ptr [rsp+288h+var_268], xmm0 mov r15, rdi lea r12, [rsp+288h+var_278] mov [r12], rsi mov [r12+8], rdx mov rdi, r12 call _ZN3fmt3v106detail21parse_float_type_specIcEENS1_11float_specsERKNS0_12format_specsIT_EE; fmt::v10::detail::parse_float_type_spec<char>(fmt::v10::format_specs<char> const&) movdqa xmm0, xmmword ptr [rsp+288h+var_268] mov rbx, rax mov qword ptr [rsp+288h+var_280], rax movzx eax, word ptr [r12+9] shr rbx, 20h mov ecx, eax and ecx, 70h shl ecx, 4 and ebx, 0FFFF00FFh lea edx, [rbx+rcx] mov [rsp+288h+var_280+4], edx movd esi, xmm0 test esi, esi js short loc_31CF7 movzx ecx, cx cmp ecx, 100h jnz short loc_31D0B mov [rsp+288h+var_280+4], ebx jmp short loc_31D0D loc_31CF7: or ebx, 100h mov [rsp+288h+var_280+4], ebx pxor xmm0, cs:xmmword_83020 jmp short loc_31D0D loc_31D0B: mov ebx, edx loc_31D0D: ucomiss xmm0, cs:flt_831D4 jz loc_31E1B and eax, 0Fh cmp ax, 4 jnz short loc_31D86 mov eax, ebx and eax, 0FF00h jz short loc_31D86 movzx eax, bh lea rcx, byte_83E04 mov bpl, [rax+rcx] mov rax, [r15+10h] lea rsi, [rax+1] cmp [r15+18h], rsi jnb short loc_31D62 mov rax, [r15] mov rdi, r15 movaps xmmword ptr [rsp+288h+var_268], xmm0; int call qword ptr [rax] movaps xmm0, xmmword ptr [rsp+288h+var_268] mov rax, [r15+10h] lea rsi, [rax+1]; char * loc_31D62: mov rcx, [r15+8] mov [r15+10h], rsi mov [rcx+rax], bpl and ebx, 0FFFF00FFh mov [rsp+288h+var_280+4], ebx mov eax, [rsp+288h+var_278] test eax, eax jz short loc_31D86 dec eax mov [rsp+288h+var_278], eax; int loc_31D86: lea r12, [rsp+288h+var_220] mov qword ptr [r12-10h], 0 lea rax, off_AE478 mov [r12-20h], rax mov [r12-18h], r12 mov qword ptr [r12-8], 1F4h cmp bl, 3 jnz loc_31E43 test ebx, 0FF00h jz short loc_31DD9 movzx eax, bh lea rcx, byte_83E04 mov al, [rax+rcx] mov [rsp+288h+var_230], 1 mov [rsp+288h+var_220], al loc_31DD9: cvtss2sd xmm0, xmm0 mov edi, [rsp+288h+var_278+4] mov rsi, qword ptr [rsp+288h+var_280] lea rdx, [rsp+288h+var_240] call _ZN3fmt3v106detail15format_hexfloatIdTnNSt9enable_ifIXntsr16is_double_doubleIT_EE5valueEiE4typeELi0EEEvS4_iNS1_11float_specsERNS1_6bufferIcEE mov rax, [rsp+288h+var_238] mov rcx, [rsp+288h+var_230] lea r8, [rsp+288h+var_250] mov [r8], rax mov [r8+8], rcx lea rsi, [rsp+288h+var_278] mov rdi, r15 mov rdx, rcx call _ZN3fmt3v106detail12write_paddedILNS0_5align4typeE2ENS0_8appenderEcRZNS1_11write_bytesILS4_2EcS5_EET1_S7_NS0_17basic_string_viewIcEERKNS0_12format_specsIT0_EEEUlS5_E_EESB_SB_RKNSA_IS7_EEmmOT2_; fmt::v10::detail::write_padded<(fmt::v10::align::type)2,fmt::v10::appender,char,fmt::v10::detail::write_bytes<(fmt::v10::align::type)2,char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char> const&)::{lambda(fmt::v10::appender)#1} &>(char,fmt::v10::format_specs<fmt::v10::appender> const&,ulong,ulong,fmt::v10::detail::write_bytes<(fmt::v10::align::type)2,char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char> const&)::{lambda(fmt::v10::appender)#1} &) jmp loc_31ECD loc_31E1B: xor esi, esi ucomiss xmm0, xmm0 setp sil mov rdx, qword ptr [rsp+288h+var_278] mov rcx, [rsp+288h+var_270] lea r8, [rsp+288h+var_280] mov rdi, r15 call _ZN3fmt3v106detail15write_nonfiniteIcNS0_8appenderEEET0_S4_bNS0_12format_specsIT_EERKNS1_11float_specsE; fmt::v10::detail::write_nonfinite<char,fmt::v10::appender>(fmt::v10::appender,bool,fmt::v10::format_specs<char>,fmt::v10::detail::float_specs const&) mov rbx, rax jmp loc_31EE4 loc_31E43: cmp byte ptr [rsp+288h+var_270], 0 mov eax, [rsp+288h+var_278+4] mov ebp, 6 cmovz ebp, eax test eax, eax cmovns ebp, eax cmp bl, 1 jnz short loc_31E6E cmp ebp, 7FFFFFFFh jz loc_31EF7 inc ebp jmp short loc_31E7E loc_31E6E: test ebp, ebp mov eax, 1 cmovnz eax, ebp cmp bl, 2 cmovnz ebp, eax loc_31E7E: or ebx, 40000h mov [rsp+288h+var_280+4], ebx cvtss2sd xmm0, xmm0 mov rsi, qword ptr [rsp+288h+var_280] lea rdx, [rsp+288h+var_240] mov edi, ebp call _ZN3fmt3v106detail12format_floatIdEEiT_iNS1_11float_specsERNS1_6bufferIcEE; fmt::v10::detail::format_float<double>(double,int,fmt::v10::detail::float_specs,fmt::v10::detail::buffer<char> &) mov [rsp+288h+var_280], ebp; int mov rcx, [rsp+288h+var_238] lea rsi, [rsp+288h+var_250]; int mov [rsi], rcx mov ecx, dword ptr [rsp+288h+var_230] mov [rsi+8], ecx mov [rsi+0Ch], eax mov rcx, qword ptr [rsp+288h+var_280] lea rdx, [rsp+288h+var_278]; int mov rdi, r15; int mov r8, r14 call _ZN3fmt3v106detail14do_write_floatINS0_8appenderENS1_14big_decimal_fpEcNS1_14digit_groupingIcEEEET_S7_RKT0_RKNS0_12format_specsIT1_EENS1_11float_specsENS1_10locale_refE; fmt::v10::detail::do_write_float<fmt::v10::appender,fmt::v10::detail::big_decimal_fp,char,fmt::v10::detail::digit_grouping<char>>(fmt::v10::appender,fmt::v10::detail::big_decimal_fp const&,fmt::v10::format_specs<char> const&,fmt::v10::detail::float_specs,fmt::v10::detail::locale_ref) loc_31ECD: mov rbx, rax mov rdi, [rsp+288h+var_238]; void * cmp rdi, r12 jz short loc_31EE4 mov rsi, [rsp+288h+var_228]; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_31EE4: mov rax, rbx add rsp, 260h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_31EF7: lea rdi, aNumberIsTooBig; "number is too big" call _ZN3fmt3v106detail18throw_format_errorEPKc; fmt::v10::detail::throw_format_error(char const*) jmp short loc_31F09 jmp short loc_31F09 jmp short $+2 loc_31F09: mov rbx, rax mov rdi, [rsp+288h+var_238]; void * cmp rdi, r12 jz short loc_31F20 mov rsi, [rsp+288h+var_228]; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_31F20: mov rdi, rbx call __Unwind_Resume
long long fmt::v10::detail::write_float<char,fmt::v10::appender,float>( _QWORD *a1, long long a2, long long a3, const std::locale *a4, __m128 a5) { long long v6; // rax __m128i si128; // xmm0 int v8; // ecx unsigned int v9; // ebx const char *v10; // rsi char v11; // bp long long v12; // rax void ( **v13)(_QWORD *); // rax long long v14; // rcx char v15; // al long long v16; // rax long long v17; // rbx unsigned int v18; // ebp int v19; // eax unsigned int v20; // eax int v21; // r9d int v23[2]; // [rsp+8h] [rbp-280h] BYREF int v24[2]; // [rsp+10h] [rbp-278h] BYREF long long v25; // [rsp+18h] [rbp-270h] int v26[4]; // [rsp+20h] [rbp-268h] BYREF void *v27; // [rsp+38h] [rbp-250h] BYREF unsigned long long v28; // [rsp+40h] [rbp-248h] _UNKNOWN **v29; // [rsp+48h] [rbp-240h] BYREF void *v30; // [rsp+50h] [rbp-238h] long long v31; // [rsp+58h] [rbp-230h] unsigned long long v32; // [rsp+60h] [rbp-228h] _BYTE v33[544]; // [rsp+68h] [rbp-220h] BYREF *(__m128 *)v26 = a5; *(_QWORD *)v24 = a2; v25 = a3; v6 = fmt::v10::detail::parse_float_type_spec<char>((long long)v24); si128 = _mm_load_si128((const __m128i *)v26); v23[0] = v6; v8 = 16 * (BYTE1(v25) & 0x70); v9 = HIDWORD(v6) & 0xFFFF00FF; v23[1] = (HIDWORD(v6) & 0xFFFF00FF) + v8; v10 = (const char *)(unsigned int)_mm_cvtsi128_si32(si128); if ( (int)v10 < 0 ) { v9 |= 0x100u; v23[1] = v9; si128 = _mm_xor_si128(si128, (__m128i)xmmword_83020); } else if ( (unsigned __int16)v8 == 256 ) { v23[1] = HIDWORD(v6) & 0xFFFF00FF; } else { v9 = (HIDWORD(v6) & 0xFFFF00FF) + v8; } if ( *(float *)si128.m128i_i32 == INFINITY ) return fmt::v10::detail::write_nonfinite<char,fmt::v10::appender>( (long long)a1, 0, *(long long *)v24, v25, (long long)v23); if ( (BYTE1(v25) & 0xF) == 4 && (v9 & 0xFF00) != 0 ) { v11 = byte_83E04[BYTE1(v9)]; v12 = a1[2]; v10 = (const char *)(v12 + 1); if ( a1[3] < (unsigned long long)(v12 + 1) ) { v13 = (void ( **)(_QWORD *))*a1; *(__m128i *)v26 = si128; (*v13)(a1); si128.m128i_i32[0] = v26[0]; v12 = a1[2]; v10 = (const char *)(v12 + 1); } v14 = a1[1]; a1[2] = v10; *(_BYTE *)(v14 + v12) = v11; v9 &= 0xFFFF00FF; v23[1] = v9; if ( v24[0] ) --v24[0]; } v31 = 0LL; v29 = &off_AE478; v30 = v33; v32 = 500LL; if ( (_BYTE)v9 == 3 ) { if ( (v9 & 0xFF00) != 0 ) { v15 = byte_83E04[BYTE1(v9)]; v31 = 1LL; v33[0] = v15; } ZN3fmt3v106detail15format_hexfloatIdTnNSt9enable_ifIXntsr16is_double_doubleIT_EE5valueEiE4typeELi0EEEvS4_iNS1_11float_specsERNS1_6bufferIcEE( (unsigned int)v24[1], *(_QWORD *)v23, &v29, *(float *)si128.m128i_i32); v27 = v30; v28 = v31; v16 = fmt::v10::detail::write_padded<(fmt::v10::align::type)2,fmt::v10::appender,char,fmt::v10::appender fmt::v10::detail::write_bytes<(fmt::v10::align::type)2,char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char> const&)::{lambda(fmt::v10::appender)#1} &>( (long long)a1, (unsigned int *)v24, v31, v31, (long long *)&v27); } else { v18 = 6; if ( !(_BYTE)v25 ) v18 = v24[1]; if ( v24[1] >= 0 ) v18 = v24[1]; if ( (_BYTE)v9 == 1 ) { if ( v18 == 0x7FFFFFFF ) fmt::v10::detail::throw_format_error((fmt::v10::detail *)"number is too big", v10); ++v18; } else { v19 = 1; if ( v18 ) v19 = v18; if ( (_BYTE)v9 != 2 ) v18 = v19; } v23[1] = v9 | 0x40000; v20 = fmt::v10::detail::format_float<double>(v18, *(_QWORD *)v23, &v29, *(float *)si128.m128i_i32); v23[0] = v18; v27 = v30; v28 = __PAIR64__(v20, v31); v16 = fmt::v10::detail::do_write_float<fmt::v10::appender,fmt::v10::detail::big_decimal_fp,char,fmt::v10::detail::digit_grouping<char>>( (long long)a1, (char *)&v27, v24, *(unsigned long long *)v23, a4, v21); } v17 = v16; if ( v30 != v33 ) operator delete(v30, v32); return v17; }
write_float<char,fmt::v10::appender,float>: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x260 MOV R14,RCX MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOV R15,RDI LEA R12,[RSP + 0x10] MOV qword ptr [R12],RSI MOV qword ptr [R12 + 0x8],RDX MOV RDI,R12 CALL 0x0012c336 MOVDQA XMM0,xmmword ptr [RSP + 0x20] MOV RBX,RAX MOV qword ptr [RSP + 0x8],RAX MOVZX EAX,word ptr [R12 + 0x9] SHR RBX,0x20 MOV ECX,EAX AND ECX,0x70 SHL ECX,0x4 AND EBX,0xffff00ff LEA EDX,[RBX + RCX*0x1] MOV dword ptr [RSP + 0xc],EDX MOVD ESI,XMM0 TEST ESI,ESI JS 0x00131cf7 MOVZX ECX,CX CMP ECX,0x100 JNZ 0x00131d0b MOV dword ptr [RSP + 0xc],EBX JMP 0x00131d0d LAB_00131cf7: OR EBX,0x100 MOV dword ptr [RSP + 0xc],EBX PXOR XMM0,xmmword ptr [0x00183020] JMP 0x00131d0d LAB_00131d0b: MOV EBX,EDX LAB_00131d0d: UCOMISS XMM0,dword ptr [0x001831d4] JZ 0x00131e1b AND EAX,0xf CMP AX,0x4 JNZ 0x00131d86 MOV EAX,EBX AND EAX,0xff00 JZ 0x00131d86 MOVZX EAX,BH LEA RCX,[0x183e04] MOV BPL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [R15 + 0x10] LEA RSI,[RAX + 0x1] CMP qword ptr [R15 + 0x18],RSI JNC 0x00131d62 MOV RAX,qword ptr [R15] MOV RDI,R15 MOVAPS xmmword ptr [RSP + 0x20],XMM0 CALL qword ptr [RAX] MOVAPS XMM0,xmmword ptr [RSP + 0x20] MOV RAX,qword ptr [R15 + 0x10] LEA RSI,[RAX + 0x1] LAB_00131d62: MOV RCX,qword ptr [R15 + 0x8] MOV qword ptr [R15 + 0x10],RSI MOV byte ptr [RCX + RAX*0x1],BPL AND EBX,0xffff00ff MOV dword ptr [RSP + 0xc],EBX MOV EAX,dword ptr [RSP + 0x10] TEST EAX,EAX JZ 0x00131d86 DEC EAX MOV dword ptr [RSP + 0x10],EAX LAB_00131d86: LEA R12,[RSP + 0x68] MOV qword ptr [R12 + -0x10],0x0 LEA RAX,[0x1ae478] MOV qword ptr [R12 + -0x20],RAX MOV qword ptr [R12 + -0x18],R12 MOV qword ptr [R12 + -0x8],0x1f4 CMP BL,0x3 JNZ 0x00131e43 TEST EBX,0xff00 JZ 0x00131dd9 MOVZX EAX,BH LEA RCX,[0x183e04] MOV AL,byte ptr [RAX + RCX*0x1] MOV qword ptr [RSP + 0x58],0x1 MOV byte ptr [RSP + 0x68],AL LAB_00131dd9: CVTSS2SD XMM0,XMM0 MOV EDI,dword ptr [RSP + 0x14] MOV RSI,qword ptr [RSP + 0x8] LAB_00131de6: LEA RDX,[RSP + 0x48] CALL 0x00131f28 MOV RAX,qword ptr [RSP + 0x50] MOV RCX,qword ptr [RSP + 0x58] LEA R8,[RSP + 0x38] MOV qword ptr [R8],RAX MOV qword ptr [R8 + 0x8],RCX LEA RSI,[RSP + 0x10] MOV RDI,R15 MOV RDX,RCX CALL 0x0012c9b4 LAB_00131e16: JMP 0x00131ecd LAB_00131e1b: XOR ESI,ESI UCOMISS XMM0,XMM0 SETP SIL MOV RDX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x18] LEA R8,[RSP + 0x8] MOV RDI,R15 CALL 0x001293d3 MOV RBX,RAX JMP 0x00131ee4 LAB_00131e43: CMP byte ptr [RSP + 0x18],0x0 MOV EAX,dword ptr [RSP + 0x14] MOV EBP,0x6 CMOVZ EBP,EAX TEST EAX,EAX CMOVNS EBP,EAX CMP BL,0x1 JNZ 0x00131e6e CMP EBP,0x7fffffff JZ 0x00131ef7 INC EBP JMP 0x00131e7e LAB_00131e6e: TEST EBP,EBP MOV EAX,0x1 CMOVNZ EAX,EBP CMP BL,0x2 CMOVNZ EBP,EAX LAB_00131e7e: OR EBX,0x40000 MOV dword ptr [RSP + 0xc],EBX CVTSS2SD XMM0,XMM0 MOV RSI,qword ptr [RSP + 0x8] LAB_00131e91: LEA RDX,[RSP + 0x48] MOV EDI,EBP CALL 0x00132252 MOV dword ptr [RSP + 0x8],EBP MOV RCX,qword ptr [RSP + 0x50] LEA RSI,[RSP + 0x38] MOV qword ptr [RSI],RCX MOV ECX,dword ptr [RSP + 0x58] MOV dword ptr [RSI + 0x8],ECX MOV dword ptr [RSI + 0xc],EAX MOV RCX,qword ptr [RSP + 0x8] LAB_00131ebd: LEA RDX,[RSP + 0x10] MOV RDI,R15 MOV R8,R14 CALL 0x0012dc56 LAB_00131ecd: MOV RBX,RAX MOV RDI,qword ptr [RSP + 0x50] CMP RDI,R12 JZ 0x00131ee4 MOV RSI,qword ptr [RSP + 0x60] CALL 0x0011f250 LAB_00131ee4: MOV RAX,RBX ADD RSP,0x260 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00131ef7: LEA RDI,[0x1839a1] CALL 0x001254fc
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* fmt::v10::appender fmt::v10::detail::write_float<char, fmt::v10::appender, float>(fmt::v10::appender, float, fmt::v10::format_specs<char>, fmt::v10::detail::locale_ref) */ int8 __thiscall fmt::v10::detail::write_float<char,fmt::v10::appender,float> (ulong param_1,detail *this,long param_3,int8 param_4,int8 param_5) { int1 uVar1; int iVar2; ulong uVar3; long lVar4; int8 uVar5; uint uVar6; char cVar7; uint uVar8; int iVar9; bool bVar10; ulong uVar11; ulong in_XMM0_Qb; ulong uVar12; int8 local_280; int8 local_278; int8 local_270; ulong local_268; ulong uStack_260; int1 *local_250; ulong local_248; int **local_240; int1 *local_238; ulong local_230; ulong local_228; int1 local_220 [504]; local_278 = param_3; local_270 = param_4; local_268 = param_1; uStack_260 = in_XMM0_Qb; uVar3 = parse_float_type_spec<char>((format_specs *)&local_278); uVar8 = (uint)(uVar3 >> 0x20) & 0xffff00ff; uVar6 = uVar8 + (local_270._1_2_ & 0x70) * 0x10; local_280._0_4_ = (int4)uVar3; local_280 = CONCAT44(uVar6,(int4)local_280); if ((int)local_268 < 0) { uVar6 = uVar8 | 0x100; local_280 = uVar3 & 0xffff00ffffffffff | 0x10000000000; uVar11 = local_268 ^ _DAT_00183020; uVar12 = uStack_260 ^ _UNK_00183028; } else { uVar11 = local_268; uVar12 = uStack_260; if ((local_270._1_2_ & 0x70) == 0x10) { local_280 = uVar3 & 0xffff00ffffffffff; uVar6 = uVar8; } } if ((float)uVar11 == _DAT_001831d4) { uVar5 = write_nonfinite<char,fmt::v10::appender> (this,NAN((float)uVar11),local_278,local_270,&local_280); } else { uVar8 = uVar6; if (((local_270._1_2_ & 0xf) == 4) && ((uVar6 & 0xff00) != 0)) { uVar1 = (&DAT_00183e04)[uVar6 >> 8 & 0xff]; lVar4 = *(long *)(this + 0x10); uVar3 = lVar4 + 1; if (*(ulong *)(this + 0x18) < uVar3) { local_268 = uVar11; uStack_260 = uVar12; (*(code *)**(int8 **)this)(this); lVar4 = *(long *)(this + 0x10); uVar3 = lVar4 + 1; uVar11 = local_268; } *(ulong *)(this + 0x10) = uVar3; *(int1 *)(*(long *)(this + 8) + lVar4) = uVar1; uVar8 = uVar6 & 0xffff00ff; local_280 = CONCAT44(uVar6,(int4)local_280) & 0xffff00ffffffffff; if ((int)local_278 != 0) { local_278 = CONCAT44(local_278._4_4_,(int)local_278 + -1); } } local_230 = 0; local_240 = &PTR_grow_001ae478; local_228 = 500; cVar7 = (char)uVar8; local_238 = local_220; if (cVar7 == '\x03') { bVar10 = (uVar8 & 0xff00) != 0; if (bVar10) { local_220[0] = (&DAT_00183e04)[uVar8 >> 8 & 0xff]; } local_230 = (ulong)bVar10; /* try { // try from 00131de6 to 00131e15 has its CatchHandler @ 00131f09 */ _ZN3fmt3v106detail15format_hexfloatIdTnNSt9enable_ifIXntsr16is_double_doubleIT_EE5valueEiE4typeELi0EEEvS4_iNS1_11float_specsERNS1_6bufferIcEE ((double)(float)uVar11,local_278._4_4_,local_280,&local_240); local_250 = local_238; local_248 = local_230; uVar5 = write_padded<(fmt::v10::align::type)2,fmt::v10::appender,char,fmt::v10::detail::write_bytes<(fmt::v10::align::type)2,char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char>const&)::_lambda(fmt::v10::appender)_1_&> (this,&local_278,local_230); } else { iVar9 = 6; if ((char)local_270 == '\0') { iVar9 = local_278._4_4_; } if (-1 < local_278) { iVar9 = local_278._4_4_; } if (cVar7 == '\x01') { if (iVar9 == 0x7fffffff) { /* try { // try from 00131ef7 to 00131f02 has its CatchHandler @ 00131f03 */ /* WARNING: Subroutine does not return */ throw_format_error("number is too big"); } iVar9 = iVar9 + 1; } else { iVar2 = 1; if (iVar9 != 0) { iVar2 = iVar9; } if (cVar7 != '\x02') { iVar9 = iVar2; } } local_280 = CONCAT44(uVar8,(int4)local_280) | 0x4000000000000; /* try { // try from 00131e91 to 00131e9c has its CatchHandler @ 00131f07 */ iVar2 = format_float<double>((double)(float)uVar11,iVar9,local_280,&local_240); local_280 = CONCAT44(local_280._4_4_,iVar9); local_250 = local_238; local_248 = CONCAT44(iVar2,(int)local_230); /* try { // try from 00131ebd to 00131ecc has its CatchHandler @ 00131f05 */ uVar5 = do_write_float<fmt::v10::appender,fmt::v10::detail::big_decimal_fp,char,fmt::v10::detail::digit_grouping<char>> (this,&local_250,&local_278,local_280,param_5); } if (local_238 != local_220) { operator_delete(local_238,local_228); } } return uVar5; }
47,594
Proc_table_intact::report_error(unsigned int, char const*, ...)
eloqsql/sql/sp.cc
void Proc_table_intact::report_error(uint code, const char *fmt, ...) { va_list args; char buf[512]; va_start(args, fmt); my_vsnprintf(buf, sizeof(buf), fmt, args); va_end(args); if (code) my_message(code, buf, MYF(0)); else my_error(ER_CANNOT_LOAD_FROM_TABLE_V2, MYF(0), "mysql", "proc"); if (m_print_once) { m_print_once= FALSE; sql_print_error("%s", buf); } }
O0
cpp
Proc_table_intact::report_error(unsigned int, char const*, ...): pushq %rbp movq %rsp, %rbp subq $0x300, %rsp # imm = 0x300 testb %al, %al je 0xda53a7 movaps %xmm0, -0x2c0(%rbp) movaps %xmm1, -0x2b0(%rbp) movaps %xmm2, -0x2a0(%rbp) movaps %xmm3, -0x290(%rbp) movaps %xmm4, -0x280(%rbp) movaps %xmm5, -0x270(%rbp) movaps %xmm6, -0x260(%rbp) movaps %xmm7, -0x250(%rbp) movq %r9, -0x2c8(%rbp) movq %r8, -0x2d0(%rbp) movq %rcx, -0x2d8(%rbp) movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x218(%rbp) movl %esi, -0x21c(%rbp) movq %rdx, -0x228(%rbp) movq -0x218(%rbp), %rax movq %rax, -0x2f8(%rbp) leaq -0x240(%rbp), %rax leaq -0x2f0(%rbp), %rcx movq %rcx, 0x10(%rax) leaq 0x10(%rbp), %rcx movq %rcx, 0x8(%rax) movl $0x30, 0x4(%rax) movl $0x18, (%rax) leaq -0x210(%rbp), %rdi movq -0x228(%rbp), %rdx leaq -0x240(%rbp), %rcx movl $0x200, %esi # imm = 0x200 callq 0x1337960 leaq -0x240(%rbp), %rax cmpl $0x0, -0x21c(%rbp) je 0xda5459 movl -0x21c(%rbp), %edi leaq -0x210(%rbp), %rsi xorl %eax, %eax movl %eax, %edx callq 0x12bf3e0 jmp 0xda5477 movl $0x6c0, %edi # imm = 0x6C0 xorl %eax, %eax movl %eax, %esi leaq 0x686b71(%rip), %rdx # 0x142bfda leaq 0x5e0362(%rip), %rcx # 0x13857d2 movb $0x0, %al callq 0x12bf0d0 movq -0x2f8(%rbp), %rax testb $0x1, 0x9(%rax) je 0xda54b0 movq -0x2f8(%rbp), %rax movb $0x0, 0x9(%rax) leaq -0x210(%rbp), %rcx leaq 0x636abf(%rip), %rdi # 0x13dbf5c movl $0x1d0, %esi # imm = 0x1D0 leaq 0x63fa1c(%rip), %rdx # 0x13e4ec5 movb $0x0, %al callq 0xd29700 movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xda54cb addq $0x300, %rsp # imm = 0x300 popq %rbp retq callq 0x758480
_ZN17Proc_table_intact12report_errorEjPKcz: push rbp mov rbp, rsp sub rsp, 300h test al, al jz short loc_DA53A7 movaps [rbp+var_2C0], xmm0 movaps [rbp+var_2B0], xmm1 movaps [rbp+var_2A0], xmm2 movaps [rbp+var_290], xmm3 movaps [rbp+var_280], xmm4 movaps [rbp+var_270], xmm5 movaps [rbp+var_260], xmm6 movaps [rbp+var_250], xmm7 loc_DA53A7: mov [rbp+var_2C8], r9 mov [rbp+var_2D0], r8 mov [rbp+var_2D8], rcx mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_218], rdi mov [rbp+var_21C], esi mov [rbp+var_228], rdx mov rax, [rbp+var_218] mov [rbp+var_2F8], rax lea rax, [rbp+var_240] lea rcx, [rbp+var_2F0] mov [rax+10h], rcx lea rcx, [rbp+arg_0] mov [rax+8], rcx mov dword ptr [rax+4], 30h ; '0' mov dword ptr [rax], 18h lea rdi, [rbp+var_210] mov rdx, [rbp+var_228] lea rcx, [rbp+var_240] mov esi, 200h call my_vsnprintf lea rax, [rbp+var_240] cmp [rbp+var_21C], 0 jz short loc_DA5459 mov edi, [rbp+var_21C] lea rsi, [rbp+var_210] xor eax, eax mov edx, eax call my_message jmp short loc_DA5477 loc_DA5459: mov edi, 6C0h xor eax, eax mov esi, eax lea rdx, aRow0mysql+4; "mysql" lea rcx, aShowCreateProc+0Ch; "proc" mov al, 0 call my_error loc_DA5477: mov rax, [rbp+var_2F8] test byte ptr [rax+9], 1 jz short loc_DA54B0 mov rax, [rbp+var_2F8] mov byte ptr [rax+9], 0 lea rcx, [rbp+var_210] lea rdi, aWorkspaceLlm4b_105; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 1D0h; int lea rdx, aFailedToMoveIn+37h; char * mov al, 0 call _Z16glog_print_errorPKciS0_z; glog_print_error(char const*,int,char const*,...) loc_DA54B0: mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_DA54CB add rsp, 300h pop rbp retn loc_DA54CB: call ___stack_chk_fail
unsigned long long Proc_table_intact::report_error(Proc_table_intact *this, unsigned int a2, const char *a3, ...) { int v3; // r8d int v4; // r9d va_list va; // [rsp+C0h] [rbp-240h] BYREF const char *v7; // [rsp+D8h] [rbp-228h] unsigned int v8; // [rsp+E4h] [rbp-21Ch] Proc_table_intact *v9; // [rsp+E8h] [rbp-218h] char v10[520]; // [rsp+F0h] [rbp-210h] BYREF unsigned long long v11; // [rsp+2F8h] [rbp-8h] va_start(va, a3); va_arg(va, _QWORD); va_arg(va, _QWORD); va_arg(va, _QWORD); va_end(va); va_start(va, a3); v11 = __readfsqword(0x28u); v9 = this; v8 = a2; v7 = a3; my_vsnprintf(v10, 512LL, a3, va); if ( v8 ) my_message(v8, v10, 0LL); else my_error(1728, 0, (unsigned int)"mysql", (unsigned int)"proc", v3, v4); if ( (*((_BYTE *)this + 9) & 1) != 0 ) { *((_BYTE *)this + 9) = 0; glog_print_error("/workspace/llm4binary/github2025/eloqsql/sql/sp.cc", 0x1D0u, "%s", v10); } return __readfsqword(0x28u); }
uuid_short_init: PUSH RBP MOV RBP,RSP LEA RAX,[0x1dc9580] MOV RAX,qword ptr [RAX + 0x2b8] SHL RAX,0x38 LEA RCX,[0x1dc82c0] MOV RCX,qword ptr [RCX] SHL RCX,0x18 ADD RAX,RCX MOV qword ptr [0x01dfecc0],RAX POP RBP RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* uuid_short_init() */ void uuid_short_init(void) { uuid_value = (DAT_01dc9838 << 0x38) + server_start_time * 0x1000000; return; }
47,595
Proc_table_intact::report_error(unsigned int, char const*, ...)
eloqsql/sql/sp.cc
void Proc_table_intact::report_error(uint code, const char *fmt, ...) { va_list args; char buf[512]; va_start(args, fmt); my_vsnprintf(buf, sizeof(buf), fmt, args); va_end(args); if (code) my_message(code, buf, MYF(0)); else my_error(ER_CANNOT_LOAD_FROM_TABLE_V2, MYF(0), "mysql", "proc"); if (m_print_once) { m_print_once= FALSE; sql_print_error("%s", buf); } }
O3
cpp
Proc_table_intact::report_error(unsigned int, char const*, ...): pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x2e0, %rsp # imm = 0x2E0 movl %esi, %r14d movq %rdi, %rbx leaq -0x2f0(%rbp), %rsi movq %rcx, 0x18(%rsi) movq %r8, 0x20(%rsi) movq %r9, 0x28(%rsi) testb %al, %al je 0x9f85af movaps %xmm0, -0x2c0(%rbp) movaps %xmm1, -0x2b0(%rbp) movaps %xmm2, -0x2a0(%rbp) movaps %xmm3, -0x290(%rbp) movaps %xmm4, -0x280(%rbp) movaps %xmm5, -0x270(%rbp) movaps %xmm6, -0x260(%rbp) movaps %xmm7, -0x250(%rbp) movq %fs:0x28, %rax movq %rax, -0x18(%rbp) movabsq $0x3000000018, %rax # imm = 0x3000000018 leaq -0x240(%rbp), %rcx movq %rax, (%rcx) leaq 0x10(%rbp), %rax movq %rax, 0x8(%rcx) movq %rsi, 0x10(%rcx) leaq -0x220(%rbp), %rdi movl $0x200, %esi # imm = 0x200 callq 0xd0845d testl %r14d, %r14d je 0x9f8605 leaq -0x220(%rbp), %rsi movl %r14d, %edi xorl %edx, %edx callq 0xcbf8f2 jmp 0x9f8621 leaq 0x3dde0a(%rip), %rdx # 0xdd6416 leaq 0x33819d(%rip), %rcx # 0xd307b0 movl $0x6c0, %edi # imm = 0x6C0 xorl %esi, %esi xorl %eax, %eax callq 0xcbf683 cmpb $0x1, 0x9(%rbx) jne 0x9f864c movb $0x0, 0x9(%rbx) leaq 0x38e062(%rip), %rdi # 0xd86694 leaq 0x396fc7(%rip), %rdx # 0xd8f600 leaq -0x220(%rbp), %rcx movl $0x1d0, %esi # imm = 0x1D0 xorl %eax, %eax callq 0x9b0bc8 movq %fs:0x28, %rax cmpq -0x18(%rbp), %rax jne 0x9f8667 addq $0x2e0, %rsp # imm = 0x2E0 popq %rbx popq %r14 popq %rbp retq callq 0x61b680
_ZN17Proc_table_intact12report_errorEjPKcz: push rbp mov rbp, rsp push r14 push rbx sub rsp, 2E0h mov r14d, esi mov rbx, rdi lea rsi, [rbp+var_2F0] mov [rsi+18h], rcx mov [rsi+20h], r8 mov [rsi+28h], r9 test al, al jz short loc_9F85AF movaps [rbp+var_2C0], xmm0 movaps [rbp+var_2B0], xmm1 movaps [rbp+var_2A0], xmm2 movaps [rbp+var_290], xmm3 movaps [rbp+var_280], xmm4 movaps [rbp+var_270], xmm5 movaps [rbp+var_260], xmm6 movaps [rbp+var_250], xmm7 loc_9F85AF: mov rax, fs:28h mov [rbp+var_18], rax mov rax, 3000000018h lea rcx, [rbp+var_240] mov [rcx], rax lea rax, [rbp+arg_0] mov [rcx+8], rax mov [rcx+10h], rsi lea rdi, [rbp+var_220] mov esi, 200h call my_vsnprintf test r14d, r14d jz short loc_9F8605 lea rsi, [rbp+var_220] mov edi, r14d xor edx, edx call my_message jmp short loc_9F8621 loc_9F8605: lea rdx, aRow0mysql+4; "mysql" lea rcx, aShowCreateProc+0Ch; "proc" mov edi, 6C0h xor esi, esi xor eax, eax call my_error loc_9F8621: cmp byte ptr [rbx+9], 1 jnz short loc_9F864C mov byte ptr [rbx+9], 0 lea rdi, aWorkspaceLlm4b_53; "/workspace/llm4binary/github2025/eloqsq"... lea rdx, aFailedToMoveIn+37h; char * lea rcx, [rbp+var_220] mov esi, 1D0h; int xor eax, eax call _Z16glog_print_errorPKciS0_z; glog_print_error(char const*,int,char const*,...) loc_9F864C: mov rax, fs:28h cmp rax, [rbp+var_18] jnz short loc_9F8667 add rsp, 2E0h pop rbx pop r14 pop rbp retn loc_9F8667: call ___stack_chk_fail
unsigned long long Proc_table_intact::report_error( Proc_table_intact *this, unsigned int a2, const char *a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, char a15) { int v15; // r8d int v16; // r9d long long v17; // r8 long long v18; // r9 __m128 v19; // xmm4 __m128 v20; // xmm5 char v22; // [rsp+0h] [rbp-2F0h] BYREF long long v23; // [rsp+18h] [rbp-2D8h] long long v24; // [rsp+20h] [rbp-2D0h] long long v25; // [rsp+28h] [rbp-2C8h] __m128 v26; // [rsp+30h] [rbp-2C0h] __m128 v27; // [rsp+40h] [rbp-2B0h] __m128 v28; // [rsp+50h] [rbp-2A0h] __m128 v29; // [rsp+60h] [rbp-290h] __m128 v30; // [rsp+70h] [rbp-280h] __m128 v31; // [rsp+80h] [rbp-270h] __m128 v32; // [rsp+90h] [rbp-260h] __m128 v33; // [rsp+A0h] [rbp-250h] _QWORD v34[4]; // [rsp+B0h] [rbp-240h] BYREF _BYTE v35[520]; // [rsp+D0h] [rbp-220h] BYREF unsigned long long v36; // [rsp+2D8h] [rbp-18h] v26 = a7; v27 = a8; v28 = a9; v29 = a10; v30 = a11; v31 = a12; v32 = a13; v33 = a14; v23 = a4; v24 = a5; v25 = a6; v36 = __readfsqword(0x28u); v34[0] = 0x3000000018LL; v34[1] = &a15; v34[2] = &v22; my_vsnprintf(v35, 512LL, a3, v34); if ( a2 ) my_message(a2, v35, 0LL); else my_error(1728, 0, (unsigned int)"mysql", (unsigned int)"proc", v15, v16); if ( *((_BYTE *)this + 9) == 1 ) { *((_BYTE *)this + 9) = 0; glog_print_error( "/workspace/llm4binary/github2025/eloqsql/sql/sp.cc", 0x1D0u, "%s", (long long)v35, v17, v18, a7, a8, a9, a10, v19, v20, a13, a14, v22); } return __readfsqword(0x28u); }
47,596
end_io_cache
eloqsql/mysys/mf_iocache.c
int end_io_cache(IO_CACHE *info) { int error=0; DBUG_ENTER("end_io_cache"); DBUG_PRINT("enter",("cache: %p", info)); /* Every thread must call remove_io_thread(). The last one destroys the share elements. */ DBUG_ASSERT(!info->share || !info->share->total_threads); if (info->alloced_buffer) { info->alloced_buffer=0; if (info->file != -1) /* File doesn't exist */ error= my_b_flush_io_cache(info,1); my_free(info->buffer); info->buffer=info->read_pos=(uchar*) 0; } if (info->type == SEQ_READ_APPEND) { /* Destroy allocated mutex */ mysql_mutex_destroy(&info->append_buffer_lock); } info->share= 0; info->type= TYPE_NOT_SET; /* Ensure that flush_io_cache() does nothing */ info->write_end= 0; /* Ensure that my_b_write() fails */ info->write_function= 0; /* my_b_write will crash if used */ DBUG_RETURN(error); }
O0
c
end_io_cache: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movl $0x0, -0xc(%rbp) jmp 0xe21f5 jmp 0xe21f7 jmp 0xe21f9 movq -0x8(%rbp), %rax cmpq $0x0, 0x100(%rax) je 0xe2259 movq -0x8(%rbp), %rax movq $0x0, 0x100(%rax) movq -0x8(%rbp), %rax cmpl $-0x1, 0xd4(%rax) je 0xe2234 movq -0x8(%rbp), %rdi movl $0x1, %esi callq 0xe0be0 movl %eax, -0xc(%rbp) movq -0x8(%rbp), %rax movq 0x20(%rax), %rdi callq 0xf3be0 movq -0x8(%rbp), %rax movq $0x0, 0x10(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x20(%rax) movq -0x8(%rbp), %rax cmpl $0x3, 0xb0(%rax) jne 0xe2273 movq -0x8(%rbp), %rdi addq $0x50, %rdi callq 0xe19c0 movq -0x8(%rbp), %rax movq $0x0, 0x98(%rax) movq -0x8(%rbp), %rax movl $0x0, 0xb0(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x48(%rax) movq -0x8(%rbp), %rax movq $0x0, 0xa8(%rax) movl -0xc(%rbp), %eax movl %eax, -0x10(%rbp) movl -0x10(%rbp), %eax addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
end_io_cache: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov [rbp+var_C], 0 jmp short $+2 loc_E21F5: jmp short $+2 loc_E21F7: jmp short $+2 loc_E21F9: mov rax, [rbp+var_8] cmp qword ptr [rax+100h], 0 jz short loc_E2259 mov rax, [rbp+var_8] mov qword ptr [rax+100h], 0 mov rax, [rbp+var_8] cmp dword ptr [rax+0D4h], 0FFFFFFFFh jz short loc_E2234 mov rdi, [rbp+var_8] mov esi, 1 call my_b_flush_io_cache mov [rbp+var_C], eax loc_E2234: mov rax, [rbp+var_8] mov rdi, [rax+20h] call my_free mov rax, [rbp+var_8] mov qword ptr [rax+10h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+20h], 0 loc_E2259: mov rax, [rbp+var_8] cmp dword ptr [rax+0B0h], 3 jnz short loc_E2273 mov rdi, [rbp+var_8] add rdi, 50h ; 'P' call inline_mysql_mutex_destroy_6 loc_E2273: mov rax, [rbp+var_8] mov qword ptr [rax+98h], 0 mov rax, [rbp+var_8] mov dword ptr [rax+0B0h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+48h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+0A8h], 0 mov eax, [rbp+var_C] mov [rbp+var_10], eax mov eax, [rbp+var_10] add rsp, 10h pop rbp retn
long long end_io_cache(long long a1) { unsigned int v2; // [rsp+4h] [rbp-Ch] v2 = 0; if ( *(_QWORD *)(a1 + 256) ) { *(_QWORD *)(a1 + 256) = 0LL; if ( *(_DWORD *)(a1 + 212) != -1 ) v2 = my_b_flush_io_cache(a1, 1); my_free(*(_QWORD *)(a1 + 32)); *(_QWORD *)(a1 + 16) = 0LL; *(_QWORD *)(a1 + 32) = 0LL; } if ( *(_DWORD *)(a1 + 176) == 3 ) inline_mysql_mutex_destroy_6(a1 + 80); *(_QWORD *)(a1 + 152) = 0LL; *(_DWORD *)(a1 + 176) = 0; *(_QWORD *)(a1 + 72) = 0LL; *(_QWORD *)(a1 + 168) = 0LL; return v2; }
end_io_cache: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],0x0 JMP 0x001e21f5 LAB_001e21f5: JMP 0x001e21f7 LAB_001e21f7: JMP 0x001e21f9 LAB_001e21f9: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x100],0x0 JZ 0x001e2259 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x100],0x0 MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0xd4],-0x1 JZ 0x001e2234 MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x1 CALL 0x001e0be0 MOV dword ptr [RBP + -0xc],EAX LAB_001e2234: MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x20] CALL 0x001f3be0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x20],0x0 LAB_001e2259: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0xb0],0x3 JNZ 0x001e2273 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x50 CALL 0x001e19c0 LAB_001e2273: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x98],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0xb0],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x48],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xa8],0x0 MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x10],EAX MOV EAX,dword ptr [RBP + -0x10] ADD RSP,0x10 POP RBP RET
int4 end_io_cache(long param_1) { int4 local_14; local_14 = 0; if (*(long *)(param_1 + 0x100) != 0) { *(int8 *)(param_1 + 0x100) = 0; if (*(int *)(param_1 + 0xd4) != -1) { local_14 = my_b_flush_io_cache(param_1,1); } my_free(*(int8 *)(param_1 + 0x20)); *(int8 *)(param_1 + 0x10) = 0; *(int8 *)(param_1 + 0x20) = 0; } if (*(int *)(param_1 + 0xb0) == 3) { inline_mysql_mutex_destroy(param_1 + 0x50); } *(int8 *)(param_1 + 0x98) = 0; *(int4 *)(param_1 + 0xb0) = 0; *(int8 *)(param_1 + 0x48) = 0; *(int8 *)(param_1 + 0xa8) = 0; return local_14; }
47,597
ma_unlock_key_del
eloqsql/storage/maria/ma_key_recover.c
void _ma_unlock_key_del(MARIA_HA *info) { DBUG_ASSERT(info->key_del_used); if (info->key_del_used == 1) /* Ignore insert-with-append */ { MARIA_SHARE *share= info->s; mysql_mutex_lock(&share->key_del_lock); share->key_del_used= 0; share->state.key_del= share->key_del_current; mysql_mutex_unlock(&share->key_del_lock); mysql_cond_signal(&share->key_del_cond); } info->key_del_used= 0; }
O0
c
ma_unlock_key_del: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) jmp 0x79cce movq -0x8(%rbp), %rax movzbl 0x67e(%rax), %eax cmpl $0x1, %eax jne 0x79d46 movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rdi addq $0x938, %rdi # imm = 0x938 leaq 0x106cfc(%rip), %rsi # 0x1809f7 movl $0x59a, %edx # imm = 0x59A callq 0x77610 movq -0x10(%rbp), %rax movb $0x0, 0x7e9(%rax) movq -0x10(%rbp), %rax movq 0x700(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x120(%rax) movq -0x10(%rbp), %rdi addq $0x938, %rdi # imm = 0x938 callq 0x77680 movq -0x10(%rbp), %rdi addq $0x980, %rdi # imm = 0x980 callq 0x79d60 movq -0x8(%rbp), %rax movb $0x0, 0x67e(%rax) addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
_ma_unlock_key_del: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi jmp short $+2 loc_79CCE: mov rax, [rbp+var_8] movzx eax, byte ptr [rax+67Eh] cmp eax, 1 jnz short loc_79D46 mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_10], rax mov rdi, [rbp+var_10] add rdi, 938h lea rsi, aWorkspaceLlm4b_17; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 59Ah call inline_mysql_mutex_lock_14 mov rax, [rbp+var_10] mov byte ptr [rax+7E9h], 0 mov rax, [rbp+var_10] mov rcx, [rax+700h] mov rax, [rbp+var_10] mov [rax+120h], rcx mov rdi, [rbp+var_10] add rdi, 938h call inline_mysql_mutex_unlock_14 mov rdi, [rbp+var_10] add rdi, 980h call inline_mysql_cond_signal_0 loc_79D46: mov rax, [rbp+var_8] mov byte ptr [rax+67Eh], 0 add rsp, 10h pop rbp retn
long long * ma_unlock_key_del(long long *a1) { long long *result; // rax long long v2; // [rsp+0h] [rbp-10h] if ( *((_BYTE *)a1 + 1662) == 1 ) { v2 = *a1; inline_mysql_mutex_lock_14( *a1 + 2360, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_key_recover.c", 0x59Au); *(_BYTE *)(v2 + 2025) = 0; *(_QWORD *)(v2 + 288) = *(_QWORD *)(v2 + 1792); inline_mysql_mutex_unlock_14(v2 + 2360); inline_mysql_cond_signal_0(v2 + 2432); } result = a1; *((_BYTE *)a1 + 1662) = 0; return result; }
_ma_unlock_key_del: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI JMP 0x00179cce LAB_00179cce: MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x67e] CMP EAX,0x1 JNZ 0x00179d46 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x10],RAX MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x938 LEA RSI,[0x2809f7] MOV EDX,0x59a CALL 0x00177610 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x7e9],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x700] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x120],RCX MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x938 CALL 0x00177680 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x980 CALL 0x00179d60 LAB_00179d46: MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x67e],0x0 ADD RSP,0x10 POP RBP RET
void _ma_unlock_key_del(long *param_1) { long lVar1; if (*(char *)((long)param_1 + 0x67e) == '\x01') { lVar1 = *param_1; inline_mysql_mutex_lock (lVar1 + 0x938, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_key_recover.c",0x59a); *(int1 *)(lVar1 + 0x7e9) = 0; *(int8 *)(lVar1 + 0x120) = *(int8 *)(lVar1 + 0x700); inline_mysql_mutex_unlock(lVar1 + 0x938); inline_mysql_cond_signal(lVar1 + 0x980); } *(int1 *)((long)param_1 + 0x67e) = 0; return; }
47,598
ma_unlock_key_del
eloqsql/storage/maria/ma_key_recover.c
void _ma_unlock_key_del(MARIA_HA *info) { DBUG_ASSERT(info->key_del_used); if (info->key_del_used == 1) /* Ignore insert-with-append */ { MARIA_SHARE *share= info->s; mysql_mutex_lock(&share->key_del_lock); share->key_del_used= 0; share->state.key_del= share->key_del_current; mysql_mutex_unlock(&share->key_del_lock); mysql_cond_signal(&share->key_del_cond); } info->key_del_used= 0; }
O3
c
ma_unlock_key_del: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx cmpb $0x1, 0x67e(%rdi) jne 0x61c29 movq (%rbx), %r14 leaq 0x938(%r14), %r15 cmpq $0x0, 0x978(%r14) jne 0x61c3b movq %r15, %rdi callq 0x2a230 movb $0x0, 0x7e9(%r14) movq 0x700(%r14), %rax movq %rax, 0x120(%r14) movq 0x978(%r14), %rdi testq %rdi, %rdi jne 0x61c51 movq %r15, %rdi callq 0x2a1f0 movq 0x9b0(%r14), %rdi addq $0x980, %r14 # imm = 0x980 testq %rdi, %rdi jne 0x61c63 movq %r14, %rdi callq 0x2a630 movb $0x0, 0x67e(%rbx) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x99d55(%rip), %rsi # 0xfb997 movq %r15, %rdi movl $0x59a, %edx # imm = 0x59A callq 0x312ea jmp 0x61be4 leaq 0x34cdc0(%rip), %rax # 0x3aea18 movq (%rax), %rax callq *0x160(%rax) jmp 0x61c06 leaq 0x34cdae(%rip), %rax # 0x3aea18 movq (%rax), %rax callq *0x170(%rax) jmp 0x61c21 nopl (%rax)
_ma_unlock_key_del: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi cmp byte ptr [rdi+67Eh], 1 jnz short loc_61C29 mov r14, [rbx] lea r15, [r14+938h] cmp qword ptr [r14+978h], 0 jnz short loc_61C3B mov rdi, r15 call _pthread_mutex_lock loc_61BE4: mov byte ptr [r14+7E9h], 0 mov rax, [r14+700h] mov [r14+120h], rax mov rdi, [r14+978h] test rdi, rdi jnz short loc_61C51 loc_61C06: mov rdi, r15 call _pthread_mutex_unlock mov rdi, [r14+9B0h] add r14, 980h test rdi, rdi jnz short loc_61C63 loc_61C21: mov rdi, r14 call _pthread_cond_signal loc_61C29: mov byte ptr [rbx+67Eh], 0 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_61C3B: lea rsi, aWorkspaceLlm4b_37; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r15 mov edx, 59Ah call psi_mutex_lock jmp short loc_61BE4 loc_61C51: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_61C06 loc_61C63: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+170h] jmp short loc_61C21
long long ma_unlock_key_del(_BYTE *a1) { long long v2; // r14 long long v3; // r15 long long v4; // rdi long long v5; // rdi long long v6; // r14 long long result; // rax if ( a1[1662] == 1 ) { v2 = *(_QWORD *)a1; v3 = *(_QWORD *)a1 + 2360LL; if ( *(_QWORD *)(*(_QWORD *)a1 + 2424LL) ) psi_mutex_lock( *(_QWORD *)a1 + 2360LL, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_key_recover.c", 0x59Au); else pthread_mutex_lock(*(_QWORD *)a1 + 2360LL); *(_BYTE *)(v2 + 2025) = 0; *(_QWORD *)(v2 + 288) = *(_QWORD *)(v2 + 1792); v4 = *(_QWORD *)(v2 + 2424); if ( v4 ) ((void ( *)(long long))PSI_server[44])(v4); pthread_mutex_unlock(v3); v5 = *(_QWORD *)(v2 + 2480); v6 = v2 + 2432; if ( v5 ) ((void ( *)(long long))PSI_server[46])(v5); result = pthread_cond_signal(v6); } a1[1662] = 0; return result; }
_ma_unlock_key_del: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI CMP byte ptr [RDI + 0x67e],0x1 JNZ 0x00161c29 MOV R14,qword ptr [RBX] LEA R15,[R14 + 0x938] CMP qword ptr [R14 + 0x978],0x0 JNZ 0x00161c3b MOV RDI,R15 CALL 0x0012a230 LAB_00161be4: MOV byte ptr [R14 + 0x7e9],0x0 MOV RAX,qword ptr [R14 + 0x700] MOV qword ptr [R14 + 0x120],RAX MOV RDI,qword ptr [R14 + 0x978] TEST RDI,RDI JNZ 0x00161c51 LAB_00161c06: MOV RDI,R15 CALL 0x0012a1f0 MOV RDI,qword ptr [R14 + 0x9b0] ADD R14,0x980 TEST RDI,RDI JNZ 0x00161c63 LAB_00161c21: MOV RDI,R14 CALL 0x0012a630 LAB_00161c29: MOV byte ptr [RBX + 0x67e],0x0 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_00161c3b: LEA RSI,[0x1fb997] MOV RDI,R15 MOV EDX,0x59a CALL 0x001312ea JMP 0x00161be4 LAB_00161c51: LEA RAX,[0x4aea18] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00161c06 LAB_00161c63: LEA RAX,[0x4aea18] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x170] JMP 0x00161c21
void _ma_unlock_key_del(long *param_1) { pthread_mutex_t *__mutex; long lVar1; if (*(char *)((long)param_1 + 0x67e) == '\x01') { lVar1 = *param_1; __mutex = (pthread_mutex_t *)(lVar1 + 0x938); if (*(long *)(lVar1 + 0x978) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_key_recover.c",0x59a ); } *(int1 *)(lVar1 + 0x7e9) = 0; *(int8 *)(lVar1 + 0x120) = *(int8 *)(lVar1 + 0x700); if (*(long *)(lVar1 + 0x978) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); if (*(long *)(lVar1 + 0x9b0) != 0) { (**(code **)(PSI_server + 0x170))(); } pthread_cond_signal((pthread_cond_t *)(lVar1 + 0x980)); } *(int1 *)((long)param_1 + 0x67e) = 0; return; }
47,599
int fmt::v10::detail::get_dynamic_spec<fmt::v10::detail::width_checker, fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender, char>>>(fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender, char>>)
aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h
FMT_CONSTEXPR auto get_dynamic_spec(FormatArg arg) -> int { unsigned long long value = visit_format_arg(Handler(), arg); if (value > to_unsigned(max_value<int>())) throw_format_error("number is too big"); return static_cast<int>(value); }
O3
c
int fmt::v10::detail::get_dynamic_spec<fmt::v10::detail::width_checker, fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender, char>>>(fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender, char>>): pushq %rax movl 0x20(%rsp), %ecx decl %ecx cmpl $0xe, %ecx ja 0x94cdd leaq 0x10(%rsp), %rax leaq 0x15a7b3(%rip), %rdx # 0x1ef450 movslq (%rdx,%rcx,4), %rcx addq %rdx, %rcx jmpq *%rcx movslq (%rax), %rax testq %rax, %rax jns 0x94cdb jmp 0x94cc4 cmpq $0x0, 0x8(%rax) js 0x94cc4 movq (%rax), %rax jmp 0x94cd2 movq (%rax), %rax testq %rax, %rax jns 0x94cd2 leaq 0x15ab9a(%rip), %rdi # 0x1ef865 callq 0x89ed4 movl (%rax), %eax movq %rax, %rcx shrq $0x1f, %rcx jne 0x94ce9 popq %rcx retq leaq 0x15ab90(%rip), %rdi # 0x1ef874 callq 0x89ed4 leaq 0x15aa17(%rip), %rdi # 0x1ef707 callq 0x89ed4
_ZN3fmt3v106detail16get_dynamic_specINS1_13width_checkerENS0_16basic_format_argINS0_20basic_format_contextINS0_8appenderEcEEEEEEiT0_: push rax mov ecx, [rsp+8+arg_10] dec ecx; switch 15 cases cmp ecx, 0Eh ja short def_94CA4; jumptable 0000000000094CA4 default case, cases 7-15 lea rax, [rsp+8+arg_0] lea rdx, jpt_94CA4 movsxd rcx, ds:(jpt_94CA4 - 1EF450h)[rdx+rcx*4] add rcx, rdx jmp rcx; switch jump loc_94CA6: movsxd rax, dword ptr [rax]; jumptable 0000000000094CA4 case 1 test rax, rax jns short loc_94CDB jmp short loc_94CC4 loc_94CB0: cmp qword ptr [rax+8], 0; jumptable 0000000000094CA4 case 5 js short loc_94CC4 loc_94CB7: mov rax, [rax]; jumptable 0000000000094CA4 cases 4,6 jmp short loc_94CD2 loc_94CBC: mov rax, [rax]; jumptable 0000000000094CA4 case 3 test rax, rax jns short loc_94CD2 loc_94CC4: lea rdi, aNegativeWidth; "negative width" call _ZN3fmt3v106detail18throw_format_errorEPKc; fmt::v10::detail::throw_format_error(char const*) loc_94CD0: mov eax, [rax]; jumptable 0000000000094CA4 case 2 loc_94CD2: mov rcx, rax shr rcx, 1Fh jnz short loc_94CE9 loc_94CDB: pop rcx retn def_94CA4: lea rdi, aWidthIsNotInte; jumptable 0000000000094CA4 default case, cases 7-15 call _ZN3fmt3v106detail18throw_format_errorEPKc; fmt::v10::detail::throw_format_error(char const*) loc_94CE9: lea rdi, aNumberIsTooBig; "number is too big" call _ZN3fmt3v106detail18throw_format_errorEPKc; fmt::v10::detail::throw_format_error(char const*)
unsigned long long fmt::v10::detail::get_dynamic_spec<fmt::v10::detail::width_checker,fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>>>( long long a1, const char *a2, long long a3, long long a4, long long a5, long long a6, long long a7, long long a8, int a9) { unsigned long long result; // rax switch ( a9 ) { case 1: result = (int)a7; if ( (int)a7 < 0LL ) goto LABEL_7; return result; case 2: result = (unsigned int)a7; goto LABEL_9; case 3: result = a7; if ( a7 < 0 ) goto LABEL_7; goto LABEL_9; case 4: case 6: goto LABEL_5; case 5: if ( a8 < 0 ) LABEL_7: fmt::v10::detail::throw_format_error((fmt::v10::detail *)"negative width", a2); LABEL_5: result = a7; LABEL_9: if ( result >> 31 ) fmt::v10::detail::throw_format_error((fmt::v10::detail *)"number is too big", a2); return result; default: fmt::v10::detail::throw_format_error((fmt::v10::detail *)"width is not integer", a2); } }
get_dynamic_spec<fmt::v10::detail::width_checker,fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>>>: PUSH RAX MOV ECX,dword ptr [RSP + 0x20] DEC ECX CMP ECX,0xe JA 0x00194cdd LEA RAX,[RSP + 0x10] LEA RDX,[0x2ef450] MOVSXD RCX,dword ptr [RDX + RCX*0x4] ADD RCX,RDX switchD: JMP RCX caseD_1: MOVSXD RAX,dword ptr [RAX] TEST RAX,RAX JNS 0x00194cdb JMP 0x00194cc4 caseD_5: CMP qword ptr [RAX + 0x8],0x0 JS 0x00194cc4 caseD_4: MOV RAX,qword ptr [RAX] JMP 0x00194cd2 caseD_3: MOV RAX,qword ptr [RAX] TEST RAX,RAX JNS 0x00194cd2 LAB_00194cc4: LEA RDI,[0x2ef865] CALL 0x00189ed4 caseD_2: MOV EAX,dword ptr [RAX] LAB_00194cd2: MOV RCX,RAX SHR RCX,0x1f JNZ 0x00194ce9 LAB_00194cdb: POP RCX RET caseD_7: LEA RDI,[0x2ef874] CALL 0x00189ed4 LAB_00194ce9: LEA RDI,[0x2ef707] CALL 0x00189ed4
/* int fmt::v10::detail::get_dynamic_spec<fmt::v10::detail::width_checker, fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender, char> > >(fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender, char> >) */ int fmt::v10::detail:: get_dynamic_spec<fmt::v10::detail::width_checker,fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>>> (void) { int iStack0000000000000008; long in_stack_00000010; int4 in_stack_00000018; switch(in_stack_00000018) { case 1: _iStack0000000000000008 = (ulong)iStack0000000000000008; if ((long)_iStack0000000000000008 < 0) { LAB_00194cc4: /* WARNING: Subroutine does not return */ throw_format_error("negative width"); } goto LAB_00194cdb; case 2: _iStack0000000000000008 = _iStack0000000000000008 & 0xffffffff; break; case 3: if ((long)_iStack0000000000000008 < 0) goto LAB_00194cc4; break; case 5: if (in_stack_00000010 < 0) goto LAB_00194cc4; case 4: case 6: break; default: /* WARNING: Subroutine does not return */ throw_format_error("width is not integer"); } if (_iStack0000000000000008 >> 0x1f != 0) { /* WARNING: Subroutine does not return */ throw_format_error("number is too big"); } LAB_00194cdb: return (int)_iStack0000000000000008; }