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
45,300
bug_conc1
eloqsql/libmariadb/unittest/libmariadb/basic-t.c
static int bug_conc1(MYSQL *mysql) { my_test_connect(mysql, hostname, username, password, schema, port, socketname, 0); diag("errno: %d", mysql_errno(mysql)); FAIL_IF(mysql_errno(mysql) != CR_ALREADY_CONNECTED, "Expected errno=CR_ALREADY_CONNECTED"); return OK; }
O3
c
bug_conc1: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdi, %rbx movq 0x36af3(%rip), %rsi # 0x4e1b0 movq 0x36af4(%rip), %rdx # 0x4e1b8 movq 0x36af5(%rip), %rcx # 0x4e1c0 movq 0x36af6(%rip), %r8 # 0x4e1c8 movl 0x36af7(%rip), %r9d # 0x4e1d0 pushq $0x0 pushq 0x36af7(%rip) # 0x4e1d8 callq 0x141ed addq $0x10, %rsp movq %rbx, %rdi callq 0x1f2a9 leaq 0x20f0f(%rip), %rdi # 0x38608 xorl %r14d, %r14d movl %eax, %esi xorl %eax, %eax callq 0x17b3b movq %rbx, %rdi callq 0x1f2a9 cmpl $0x80a, %eax # imm = 0x80A je 0x1773b leaq 0x1f8ed(%rip), %rdi # 0x37008 leaq 0x20ef0(%rip), %rsi # 0x38612 leaq 0x1fe79(%rip), %rdx # 0x375a2 movl $0x2a5, %ecx # imm = 0x2A5 xorl %eax, %eax callq 0x17b3b movl $0x1, %r14d movl %r14d, %eax popq %rbx popq %r14 popq %rbp retq
bug_conc1: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdi mov rsi, cs:hostname mov rdx, cs:username mov rcx, cs:password mov r8, cs:schema mov r9d, cs:port push 0 push cs:socketname call my_test_connect add rsp, 10h mov rdi, rbx call mysql_errno lea rdi, aErrnoD; "errno: %d" xor r14d, r14d mov esi, eax xor eax, eax call diag mov rdi, rbx call mysql_errno cmp eax, 80Ah jz short loc_1773B lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rsi, aExpectedErrnoC; "Expected errno=CR_ALREADY_CONNECTED" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 2A5h xor eax, eax call diag mov r14d, 1 loc_1773B: mov eax, r14d pop rbx pop r14 pop rbp retn
long long bug_conc1(long long a1) { int v1; // eax unsigned int v2; // r14d int v3; // edx int v4; // ecx int v5; // r8d int v6; // r9d int v7; // r8d int v8; // r9d my_test_connect(a1, hostname, username, password, schema, port, socketname, 0LL); v1 = mysql_errno(a1); v2 = 0; diag((unsigned int)"errno: %d", v1, v3, v4, v5, v6); if ( (unsigned int)mysql_errno(a1) != 2058 ) { diag( (unsigned int)"Error: %s (%s: %d)", (unsigned int)"Expected errno=CR_ALREADY_CONNECTED", (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/basic-t.c", 677, v7, v8); return 1; } return v2; }
bug_conc1: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDI MOV RSI,qword ptr [0x0014e1b0] MOV RDX,qword ptr [0x0014e1b8] MOV RCX,qword ptr [0x0014e1c0] MOV R8,qword ptr [0x0014e1c8] MOV R9D,dword ptr [0x0014e1d0] PUSH 0x0 PUSH qword ptr [0x0014e1d8] CALL 0x001141ed ADD RSP,0x10 MOV RDI,RBX CALL 0x0011f2a9 LEA RDI,[0x138608] XOR R14D,R14D MOV ESI,EAX XOR EAX,EAX CALL 0x00117b3b MOV RDI,RBX CALL 0x0011f2a9 CMP EAX,0x80a JZ 0x0011773b LEA RDI,[0x137008] LEA RSI,[0x138612] LEA RDX,[0x1375a2] MOV ECX,0x2a5 XOR EAX,EAX CALL 0x00117b3b MOV R14D,0x1 LAB_0011773b: MOV EAX,R14D POP RBX POP R14 POP RBP RET
bool bug_conc1(int8 param_1) { int4 uVar1; int iVar2; my_test_connect(param_1,hostname,username,password,schema,port,socketname,0); uVar1 = mysql_errno(param_1); diag("errno: %d",uVar1); iVar2 = mysql_errno(param_1); if (iVar2 != 0x80a) { diag("Error: %s (%s: %d)","Expected errno=CR_ALREADY_CONNECTED", "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/basic-t.c",0x2a5); } return iVar2 != 0x80a; }
45,301
my_hash_sort_utf32_nopad
eloqsql/strings/ctype-ucs2.c
static void my_hash_sort_utf32_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen, ulong *nr1, ulong *nr2) { my_wc_t wc; int res; const uchar *e= s + slen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; register ulong m1= *nr1, m2= *nr2; while ((res= my_utf32_uni(cs, &wc, (uchar*) s, (uchar*) e)) > 0) { my_tosort_utf32(uni_plane, &wc); MY_HASH_ADD(m1, m2, (uint) (wc >> 24)); MY_HASH_ADD(m1, m2, (uint) (wc >> 16) & 0xFF); MY_HASH_ADD(m1, m2, (uint) (wc >> 8) & 0xFF); MY_HASH_ADD(m1, m2, (uint) (wc & 0xFF)); s+= res; } *nr1= m1; *nr2= m2; }
O3
c
my_hash_sort_utf32_nopad: movq (%rcx), %r10 movq (%r8), %rax cmpq $0x4, %rdx jl 0xc81ed pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx addq %rsi, %rdx movq 0x78(%rdi), %rdi movl $0xff, %r9d movzbl (%rsi), %ebx shll $0x18, %ebx movzbl 0x1(%rsi), %r11d shll $0x10, %r11d orl %ebx, %r11d cmpl $0x10ffff, %r11d # imm = 0x10FFFF ja 0xc81e7 movzbl 0x2(%rsi), %r14d shll $0x8, %r14d movzbl 0x3(%rsi), %ebx orq %rbx, %r14 orq %r11, %r14 movl $0xfffd, %r11d # imm = 0xFFFD cmpq (%rdi), %r14 ja 0xc813d movq 0x8(%rdi), %r11 movl %r14d, %r15d shrl $0x8, %r15d movq (%r11,%r15,8), %r15 movq %r14, %r11 testq %r15, %r15 je 0xc813d leaq (%rbx,%rbx,2), %r11 movl 0x8(%r15,%r11,4), %r11d movl %r10d, %ebx andl $0x3f, %ebx addq %rax, %rbx movl %r11d, %r14d shrl $0x18, %r14d imulq %rbx, %r14 movq %r10, %rbx shlq $0x8, %rbx addq %r14, %rbx xorq %r10, %rbx movl %ebx, %r10d andl $0x3f, %r10d addq %rax, %r10 addq $0x3, %r10 movl %r11d, %r14d shrl $0x10, %r14d andl %r9d, %r14d imulq %r10, %r14 movq %rbx, %r10 shlq $0x8, %r10 addq %r14, %r10 xorq %rbx, %r10 movl %r10d, %ebx andl $0x3f, %ebx addq %rax, %rbx addq $0x6, %rbx movl %r11d, %r14d shrl $0x8, %r14d andl %r9d, %r14d imulq %rbx, %r14 movq %r10, %rbx shlq $0x8, %rbx addq %r14, %rbx xorq %r10, %rbx movl %ebx, %r10d andl $0x3f, %r10d addq %rax, %r10 addq $0x9, %r10 movzbl %r11b, %r11d imulq %r10, %r11 movq %rbx, %r10 shlq $0x8, %r10 addq %r11, %r10 xorq %rbx, %r10 addq $0xc, %rax leaq 0x8(%rsi), %r11 addq $0x4, %rsi cmpq %rdx, %r11 jbe 0xc80e0 popq %rbx popq %r14 popq %r15 popq %rbp movq %r10, (%rcx) movq %rax, (%r8) retq
my_hash_sort_utf32_nopad: mov r10, [rcx] mov rax, [r8] cmp rdx, 4 jl loc_C81ED push rbp mov rbp, rsp push r15 push r14 push rbx add rdx, rsi mov rdi, [rdi+78h] mov r9d, 0FFh loc_C80E0: movzx ebx, byte ptr [rsi] shl ebx, 18h movzx r11d, byte ptr [rsi+1] shl r11d, 10h or r11d, ebx cmp r11d, offset unk_10FFFF ja loc_C81E7 movzx r14d, byte ptr [rsi+2] shl r14d, 8 movzx ebx, byte ptr [rsi+3] or r14, rbx or r14, r11 mov r11d, 0FFFDh cmp r14, [rdi] ja short loc_C813D mov r11, [rdi+8] mov r15d, r14d shr r15d, 8 mov r15, [r11+r15*8] mov r11, r14 test r15, r15 jz short loc_C813D lea r11, [rbx+rbx*2] mov r11d, [r15+r11*4+8] loc_C813D: mov ebx, r10d and ebx, 3Fh add rbx, rax mov r14d, r11d shr r14d, 18h imul r14, rbx mov rbx, r10 shl rbx, 8 add rbx, r14 xor rbx, r10 mov r10d, ebx and r10d, 3Fh add r10, rax add r10, 3 mov r14d, r11d shr r14d, 10h and r14d, r9d imul r14, r10 mov r10, rbx shl r10, 8 add r10, r14 xor r10, rbx mov ebx, r10d and ebx, 3Fh add rbx, rax add rbx, 6 mov r14d, r11d shr r14d, 8 and r14d, r9d imul r14, rbx mov rbx, r10 shl rbx, 8 add rbx, r14 xor rbx, r10 mov r10d, ebx and r10d, 3Fh add r10, rax add r10, 9 movzx r11d, r11b imul r11, r10 mov r10, rbx shl r10, 8 add r10, r11 xor r10, rbx add rax, 0Ch lea r11, [rsi+8] add rsi, 4 cmp r11, rdx jbe loc_C80E0 loc_C81E7: pop rbx pop r14 pop r15 pop rbp loc_C81ED: mov [rcx], r10 mov [r8], rax retn
long long my_hash_sort_utf32_nopad(long long a1, unsigned __int8 *a2, long long a3, long long *a4, long long *a5) { long long v5; // r10 long long result; // rax unsigned __int8 *v7; // rdx unsigned long long *v8; // rdi long long v9; // r11 long long v10; // rbx unsigned long long v11; // r14 unsigned int v12; // r11d long long v13; // r15 long long v14; // r10 long long v15; // r14 unsigned __int8 *v16; // r11 v5 = *a4; result = *a5; if ( a3 >= 4 ) { v7 = &a2[a3]; v8 = *(unsigned long long **)(a1 + 120); do { v9 = (*a2 << 24) | (a2[1] << 16); if ( (unsigned int)v9 > (unsigned int)&unk_10FFFF ) break; v10 = a2[3]; v11 = v9 | v10 | (a2[2] << 8); v12 = 65533; if ( v11 <= *v8 ) { v13 = *(_QWORD *)(v8[1] + 8LL * ((unsigned int)v11 >> 8)); v12 = v11; if ( v13 ) v12 = *(_DWORD *)(v13 + 12 * v10 + 8); } v14 = v5 ^ ((result + (v5 & 0x3F)) * HIBYTE(v12) + (v5 << 8)) ^ ((result + (((unsigned __int8)v5 ^ (unsigned __int8)((result + (v5 & 0x3F)) * HIBYTE(v12))) & 0x3F) + 3) * BYTE2(v12) + ((v5 ^ ((result + (v5 & 0x3F)) * HIBYTE(v12) + (v5 << 8))) << 8)); v15 = (result + (v14 & 0x3F) + 6) * BYTE1(v12); v5 = v14 ^ (v15 + (v14 << 8)) ^ ((result + (((unsigned __int8)v14 ^ (unsigned __int8)v15) & 0x3F) + 9) * (unsigned __int8)v12 + ((v14 ^ (v15 + (v14 << 8))) << 8)); result += 12LL; v16 = a2 + 8; a2 += 4; } while ( v16 <= v7 ); } *a4 = v5; *a5 = result; return result; }
my_hash_sort_utf32_nopad: MOV R10,qword ptr [RCX] MOV RAX,qword ptr [R8] CMP RDX,0x4 JL 0x001c81ed PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX ADD RDX,RSI MOV RDI,qword ptr [RDI + 0x78] MOV R9D,0xff LAB_001c80e0: MOVZX EBX,byte ptr [RSI] SHL EBX,0x18 MOVZX R11D,byte ptr [RSI + 0x1] SHL R11D,0x10 OR R11D,EBX CMP R11D,0x10ffff JA 0x001c81e7 MOVZX R14D,byte ptr [RSI + 0x2] SHL R14D,0x8 MOVZX EBX,byte ptr [RSI + 0x3] OR R14,RBX OR R14,R11 MOV R11D,0xfffd CMP R14,qword ptr [RDI] JA 0x001c813d MOV R11,qword ptr [RDI + 0x8] MOV R15D,R14D SHR R15D,0x8 MOV R15,qword ptr [R11 + R15*0x8] MOV R11,R14 TEST R15,R15 JZ 0x001c813d LEA R11,[RBX + RBX*0x2] MOV R11D,dword ptr [R15 + R11*0x4 + 0x8] LAB_001c813d: MOV EBX,R10D AND EBX,0x3f ADD RBX,RAX MOV R14D,R11D SHR R14D,0x18 IMUL R14,RBX MOV RBX,R10 SHL RBX,0x8 ADD RBX,R14 XOR RBX,R10 MOV R10D,EBX AND R10D,0x3f ADD R10,RAX ADD R10,0x3 MOV R14D,R11D SHR R14D,0x10 AND R14D,R9D IMUL R14,R10 MOV R10,RBX SHL R10,0x8 ADD R10,R14 XOR R10,RBX MOV EBX,R10D AND EBX,0x3f ADD RBX,RAX ADD RBX,0x6 MOV R14D,R11D SHR R14D,0x8 AND R14D,R9D IMUL R14,RBX MOV RBX,R10 SHL RBX,0x8 ADD RBX,R14 XOR RBX,R10 MOV R10D,EBX AND R10D,0x3f ADD R10,RAX ADD R10,0x9 MOVZX R11D,R11B IMUL R11,R10 MOV R10,RBX SHL R10,0x8 ADD R10,R11 XOR R10,RBX ADD RAX,0xc LEA R11,[RSI + 0x8] ADD RSI,0x4 CMP R11,RDX JBE 0x001c80e0 LAB_001c81e7: POP RBX POP R14 POP R15 POP RBP LAB_001c81ed: MOV qword ptr [RCX],R10 MOV qword ptr [R8],RAX RET
void my_hash_sort_utf32_nopad(long param_1,byte *param_2,long param_3,ulong *param_4,long *param_5) { byte *pbVar1; long lVar2; long lVar3; byte *pbVar4; ulong uVar5; uint uVar6; ulong uVar7; ulong uVar8; uVar5 = *param_4; lVar3 = *param_5; if (3 < param_3) { pbVar4 = param_2 + param_3; do { uVar6 = (uint)param_2[1] << 0x10 | (uint)*param_2 << 0x18; if (0x10ffff < uVar6) break; uVar8 = (ulong)CONCAT11(param_2[2],param_2[3]) | (ulong)uVar6; uVar7 = 0xfffd; if ((uVar8 <= **(ulong **)(param_1 + 0x78)) && (lVar2 = *(long *)((*(ulong **)(param_1 + 0x78))[1] + (uVar8 >> 8) * 8), uVar7 = uVar8, lVar2 != 0)) { uVar7 = (ulong)*(uint *)(lVar2 + 8 + (ulong)param_2[3] * 0xc); } uVar5 = uVar5 * 0x100 + (uVar7 >> 0x18) * ((ulong)((uint)uVar5 & 0x3f) + lVar3) ^ uVar5; uVar5 = uVar5 * 0x100 + (ulong)((uint)(uVar7 >> 0x10) & 0xff) * ((ulong)((uint)uVar5 & 0x3f) + lVar3 + 3) ^ uVar5; uVar5 = uVar5 * 0x100 + (ulong)((uint)(uVar7 >> 8) & 0xff) * ((ulong)((uint)uVar5 & 0x3f) + lVar3 + 6) ^ uVar5 ; uVar5 = uVar5 * 0x100 + (uVar7 & 0xff) * ((ulong)((uint)uVar5 & 0x3f) + lVar3 + 9) ^ uVar5; lVar3 = lVar3 + 0xc; pbVar1 = param_2 + 8; param_2 = param_2 + 4; } while (pbVar1 <= pbVar4); } *param_4 = uVar5; *param_5 = lVar3; return; }
45,302
OpenSubdiv::v3_6_0::Far::TopologyRefiner::TopologyRefiner(OpenSubdiv::v3_6_0::Sdc::SchemeType, OpenSubdiv::v3_6_0::Sdc::Options)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/topologyRefiner.cpp
TopologyRefiner::TopologyRefiner(Sdc::SchemeType schemeType, Sdc::Options schemeOptions) : _subdivType(schemeType), _subdivOptions(schemeOptions), _isUniform(true), _hasHoles(false), _hasIrregFaces(false), _regFaceSize(Sdc::SchemeTypeTraits::GetRegularFaceSize(schemeType)), _maxLevel(0), _uniformOptions(0), _adaptiveOptions(0), _totalVertices(0), _totalEdges(0), _totalFaces(0), _totalFaceVertices(0), _maxValence(0), _baseLevelOwned(true) { // Need to revisit allocation scheme here -- want to use smart-ptrs for these // but will probably have to settle for explicit new/delete... _levels.reserve(10); _levels.push_back(new Vtr::internal::Level); _farLevels.reserve(10); assembleFarLevels(); }
O1
cpp
OpenSubdiv::v3_6_0::Far::TopologyRefiner::TopologyRefiner(OpenSubdiv::v3_6_0::Sdc::SchemeType, OpenSubdiv::v3_6_0::Sdc::Options): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movl %esi, (%rdi) movl %edx, 0x4(%rdi) movl 0x8(%rdi), %eax andl $-0x8, %eax incl %eax movw %ax, 0x8(%rdi) movl %esi, %edi callq 0x39360 andl $0x7, %eax movl $0xfffffc07, %ecx # imm = 0xFFFFFC07 andl 0x8(%rbx), %ecx leal (%rcx,%rax,8), %eax movw %ax, 0x8(%rbx) andb $-0x40, 0xc(%rbx) movl $0xfffff000, %eax # imm = 0xFFFFF000 andl 0x10(%rbx), %eax orl $0xf0, %eax movw %ax, 0x10(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x14(%rbx) movl $0x0, 0x24(%rbx) movb $0x1, 0x28(%rbx) leaq 0x30(%rbx), %r14 leaq 0x60(%rbx), %r15 movups %xmm0, 0x30(%rbx) movups %xmm0, 0x40(%rbx) movups %xmm0, 0x50(%rbx) movups %xmm0, 0x60(%rbx) movq $0x0, 0x70(%rbx) movl $0xa, %esi movq %r14, %rdi callq 0x38c00 movl $0x1e0, %edi # imm = 0x1E0 callq 0x3a230 movq %rax, %r13 movq %rax, %rdi callq 0x3c470 leaq 0x8(%rsp), %rsi movq %r13, (%rsi) movq %r14, %rdi callq 0x389f0 movl $0xa, %esi movq %r15, %rdi callq 0x38110 movq %rbx, %rdi callq 0x3a210 addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r12 movl $0x1e0, %esi # imm = 0x1E0 movq %r13, %rdi callq 0x3a2d0 jmp 0x838a1 jmp 0x8389e movq %rax, %r12 movq (%r15), %rdi testq %rdi, %rdi je 0x838b5 movq 0x70(%rbx), %rsi subq %rdi, %rsi callq 0x3a2d0 movq 0x48(%rbx), %rdi testq %rdi, %rdi je 0x838ca movq 0x58(%rbx), %rsi subq %rdi, %rsi callq 0x3a2d0 movq (%r14), %rdi testq %rdi, %rdi je 0x838de movq 0x40(%rbx), %rsi subq %rdi, %rsi callq 0x3a2d0 movq %r12, %rdi callq 0x3bd70
_ZN10OpenSubdiv6v3_6_03Far15TopologyRefinerC2ENS0_3Sdc10SchemeTypeENS3_7OptionsE: push r15; Alternative name is 'OpenSubdiv::v3_6_0::Far::TopologyRefiner::TopologyRefiner(OpenSubdiv::v3_6_0::Sdc::SchemeType, OpenSubdiv::v3_6_0::Sdc::Options)' push r14 push r13 push r12 push rbx sub rsp, 10h mov rbx, rdi mov [rdi], esi mov [rdi+4], edx mov eax, [rdi+8] and eax, 0FFFFFFF8h inc eax mov [rdi+8], ax mov edi, esi call __ZN10OpenSubdiv6v3_6_03Sdc16SchemeTypeTraits18GetRegularFaceSizeENS1_10SchemeTypeE; OpenSubdiv::v3_6_0::Sdc::SchemeTypeTraits::GetRegularFaceSize(OpenSubdiv::v3_6_0::Sdc::SchemeType) and eax, 7 mov ecx, 0FFFFFC07h and ecx, [rbx+8] lea eax, [rcx+rax*8] mov [rbx+8], ax and byte ptr [rbx+0Ch], 0C0h mov eax, 0FFFFF000h and eax, [rbx+10h] or eax, 0F0h mov [rbx+10h], ax xorps xmm0, xmm0 movups xmmword ptr [rbx+14h], xmm0 mov dword ptr [rbx+24h], 0 mov byte ptr [rbx+28h], 1 lea r14, [rbx+30h] lea r15, [rbx+60h] movups xmmword ptr [rbx+30h], xmm0 movups xmmword ptr [rbx+40h], xmm0 movups xmmword ptr [rbx+50h], xmm0 movups xmmword ptr [rbx+60h], xmm0 mov qword ptr [rbx+70h], 0 mov esi, 0Ah mov rdi, r14 call __ZNSt6vectorIPN10OpenSubdiv6v3_6_03Vtr8internal5LevelESaIS5_EE7reserveEm; std::vector<OpenSubdiv::v3_6_0::Vtr::internal::Level *>::reserve(ulong) mov edi, 1E0h; unsigned __int64 call __Znwm; operator new(ulong) mov r13, rax mov rdi, rax; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal5LevelC2Ev; OpenSubdiv::v3_6_0::Vtr::internal::Level::Level(void) lea rsi, [rsp+38h+var_30] mov [rsi], r13 mov rdi, r14 call __ZNSt6vectorIPN10OpenSubdiv6v3_6_03Vtr8internal5LevelESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<OpenSubdiv::v3_6_0::Vtr::internal::Level *>::emplace_back<OpenSubdiv::v3_6_0::Vtr::internal::Level *>(OpenSubdiv::v3_6_0::Vtr::internal::Level * &&) mov esi, 0Ah mov rdi, r15 call __ZNSt6vectorIN10OpenSubdiv6v3_6_03Far13TopologyLevelESaIS3_EE7reserveEm; std::vector<OpenSubdiv::v3_6_0::Far::TopologyLevel>::reserve(ulong) mov rdi, rbx; this call __ZN10OpenSubdiv6v3_6_03Far15TopologyRefiner17assembleFarLevelsEv; OpenSubdiv::v3_6_0::Far::TopologyRefiner::assembleFarLevels(void) add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r12, rax mov esi, 1E0h; unsigned __int64 mov rdi, r13; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_838A1 jmp short $+2 loc_8389E: mov r12, rax loc_838A1: mov rdi, [r15]; void * test rdi, rdi jz short loc_838B5 mov rsi, [rbx+70h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_838B5: mov rdi, [rbx+48h]; void * test rdi, rdi jz short loc_838CA mov rsi, [rbx+58h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_838CA: mov rdi, [r14]; void * test rdi, rdi jz short loc_838DE mov rsi, [rbx+40h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_838DE: mov rdi, r12 call __Unwind_Resume
long long OpenSubdiv::v3_6_0::Far::TopologyRefiner::TopologyRefiner( OpenSubdiv::v3_6_0::Far::TopologyRefiner *this, unsigned int a2, int a3) { OpenSubdiv::v3_6_0::Vtr::internal::Level *v3; // r13 *(_DWORD *)this = a2; *((_DWORD *)this + 1) = a3; *((_WORD *)this + 4) = (*((_WORD *)this + 4) & 0xFFF8) + 1; *((_WORD *)this + 4) = (*((_WORD *)this + 4) & 0xFC07) + 8 * (OpenSubdiv::v3_6_0::Sdc::SchemeTypeTraits::GetRegularFaceSize(a2) & 7); *((_BYTE *)this + 12) &= 0xC0u; *((_WORD *)this + 8) = *((_WORD *)this + 8) & 0xF000 | 0xF0; *(_OWORD *)((char *)this + 20) = 0LL; *((_DWORD *)this + 9) = 0; *((_BYTE *)this + 40) = 1; *((_OWORD *)this + 3) = 0LL; *((_OWORD *)this + 4) = 0LL; *((_OWORD *)this + 5) = 0LL; *((_OWORD *)this + 6) = 0LL; *((_QWORD *)this + 14) = 0LL; std::vector<OpenSubdiv::v3_6_0::Vtr::internal::Level *>::reserve((char *)this + 48, 10LL); v3 = (OpenSubdiv::v3_6_0::Vtr::internal::Level *)operator new(0x1E0uLL); OpenSubdiv::v3_6_0::Vtr::internal::Level::Level(v3); std::vector<OpenSubdiv::v3_6_0::Vtr::internal::Level *>::emplace_back<OpenSubdiv::v3_6_0::Vtr::internal::Level *>((char *)this + 48); std::vector<OpenSubdiv::v3_6_0::Far::TopologyLevel>::reserve((char *)this + 96, 10LL); return OpenSubdiv::v3_6_0::Far::TopologyRefiner::assembleFarLevels(this); }
TopologyRefiner: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV RBX,RDI MOV dword ptr [RDI],ESI MOV dword ptr [RDI + 0x4],EDX MOV EAX,dword ptr [RDI + 0x8] AND EAX,0xfffffff8 INC EAX MOV word ptr [RDI + 0x8],AX MOV EDI,ESI CALL 0x00139360 AND EAX,0x7 MOV ECX,0xfffffc07 AND ECX,dword ptr [RBX + 0x8] LEA EAX,[RCX + RAX*0x8] MOV word ptr [RBX + 0x8],AX AND byte ptr [RBX + 0xc],0xc0 MOV EAX,0xfffff000 AND EAX,dword ptr [RBX + 0x10] OR EAX,0xf0 MOV word ptr [RBX + 0x10],AX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x14],XMM0 MOV dword ptr [RBX + 0x24],0x0 MOV byte ptr [RBX + 0x28],0x1 LEA R14,[RBX + 0x30] LEA R15,[RBX + 0x60] MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOVUPS xmmword ptr [RBX + 0x40],XMM0 MOVUPS xmmword ptr [RBX + 0x50],XMM0 MOVUPS xmmword ptr [RBX + 0x60],XMM0 MOV qword ptr [RBX + 0x70],0x0 LAB_00183835: MOV ESI,0xa MOV RDI,R14 CALL 0x00138c00 LAB_00183842: MOV EDI,0x1e0 CALL 0x0013a230 LAB_0018384c: MOV R13,RAX MOV RDI,RAX CALL 0x0013c470 LEA RSI,[RSP + 0x8] MOV qword ptr [RSI],R13 LAB_0018385f: MOV RDI,R14 CALL 0x001389f0 LAB_00183867: MOV ESI,0xa MOV RDI,R15 CALL 0x00138110 MOV RDI,RBX CALL 0x0013a210 LAB_0018387c: ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* OpenSubdiv::v3_6_0::Far::TopologyRefiner::TopologyRefiner(OpenSubdiv::v3_6_0::Sdc::SchemeType, OpenSubdiv::v3_6_0::Sdc::Options) */ void __thiscall OpenSubdiv::v3_6_0::Far::TopologyRefiner::TopologyRefiner (TopologyRefiner *this,int4 param_2,int4 param_3) { ushort uVar1; Level *this_00; Level *local_30; *(int4 *)this = param_2; *(int4 *)(this + 4) = param_3; *(ushort *)(this + 8) = ((ushort)*(int4 *)(this + 8) & 0xfff8) + 1; uVar1 = Sdc::SchemeTypeTraits::GetRegularFaceSize(param_2); *(ushort *)(this + 8) = ((ushort)*(int4 *)(this + 8) & 0xfc07) + (uVar1 & 7) * 8; this[0xc] = (TopologyRefiner)((byte)this[0xc] & 0xc0); *(ushort *)(this + 0x10) = (ushort)*(int4 *)(this + 0x10) & 0xf000 | 0xf0; *(int8 *)(this + 0x14) = 0; *(int8 *)(this + 0x1c) = 0; *(int4 *)(this + 0x24) = 0; this[0x28] = (TopologyRefiner)0x1; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; *(int8 *)(this + 0x50) = 0; *(int8 *)(this + 0x58) = 0; *(int8 *)(this + 0x60) = 0; *(int8 *)(this + 0x68) = 0; *(int8 *)(this + 0x70) = 0; /* try { // try from 00183835 to 00183841 has its CatchHandler @ 0018389e */ std:: vector<OpenSubdiv::v3_6_0::Vtr::internal::Level*,std::allocator<OpenSubdiv::v3_6_0::Vtr::internal::Level*>> ::reserve((vector<OpenSubdiv::v3_6_0::Vtr::internal::Level*,std::allocator<OpenSubdiv::v3_6_0::Vtr::internal::Level*>> *)(this + 0x30),10); /* try { // try from 00183842 to 0018384b has its CatchHandler @ 0018389c */ this_00 = (Level *)operator_new(0x1e0); /* try { // try from 0018384c to 00183856 has its CatchHandler @ 0018388a */ Vtr::internal::Level::Level(this_00); local_30 = this_00; /* try { // try from 0018385f to 00183866 has its CatchHandler @ 0018389c */ std:: vector<OpenSubdiv::v3_6_0::Vtr::internal::Level*,std::allocator<OpenSubdiv::v3_6_0::Vtr::internal::Level*>> ::emplace_back<OpenSubdiv::v3_6_0::Vtr::internal::Level*> ((vector<OpenSubdiv::v3_6_0::Vtr::internal::Level*,std::allocator<OpenSubdiv::v3_6_0::Vtr::internal::Level*>> *)(this + 0x30),&local_30); /* try { // try from 00183867 to 0018387b has its CatchHandler @ 0018389e */ std:: vector<OpenSubdiv::v3_6_0::Far::TopologyLevel,std::allocator<OpenSubdiv::v3_6_0::Far::TopologyLevel>> ::reserve((vector<OpenSubdiv::v3_6_0::Far::TopologyLevel,std::allocator<OpenSubdiv::v3_6_0::Far::TopologyLevel>> *)(this + 0x60),10); assembleFarLevels(this); return; }
45,303
OpenSubdiv::v3_6_0::Far::TopologyRefiner::TopologyRefiner(OpenSubdiv::v3_6_0::Sdc::SchemeType, OpenSubdiv::v3_6_0::Sdc::Options)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/topologyRefiner.cpp
TopologyRefiner::TopologyRefiner(Sdc::SchemeType schemeType, Sdc::Options schemeOptions) : _subdivType(schemeType), _subdivOptions(schemeOptions), _isUniform(true), _hasHoles(false), _hasIrregFaces(false), _regFaceSize(Sdc::SchemeTypeTraits::GetRegularFaceSize(schemeType)), _maxLevel(0), _uniformOptions(0), _adaptiveOptions(0), _totalVertices(0), _totalEdges(0), _totalFaces(0), _totalFaceVertices(0), _maxValence(0), _baseLevelOwned(true) { // Need to revisit allocation scheme here -- want to use smart-ptrs for these // but will probably have to settle for explicit new/delete... _levels.reserve(10); _levels.push_back(new Vtr::internal::Level); _farLevels.reserve(10); assembleFarLevels(); }
O3
cpp
OpenSubdiv::v3_6_0::Far::TopologyRefiner::TopologyRefiner(OpenSubdiv::v3_6_0::Sdc::SchemeType, OpenSubdiv::v3_6_0::Sdc::Options): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movl %esi, (%rdi) movl %edx, 0x4(%rdi) movl 0x8(%rdi), %eax andl $-0x8, %eax incl %eax movw %ax, 0x8(%rdi) movl %esi, %edi callq 0x39350 andl $0x7, %eax movl $0xfffffc07, %ecx # imm = 0xFFFFFC07 andl 0x8(%rbx), %ecx leal (%rcx,%rax,8), %eax movw %ax, 0x8(%rbx) andb $-0x40, 0xc(%rbx) movl $0xfffff000, %eax # imm = 0xFFFFF000 andl 0x10(%rbx), %eax orl $0xf0, %eax movw %ax, 0x10(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x14(%rbx) movl $0x0, 0x24(%rbx) movb $0x1, 0x28(%rbx) leaq 0x30(%rbx), %r14 leaq 0x60(%rbx), %r15 movups %xmm0, 0x30(%rbx) movups %xmm0, 0x40(%rbx) movups %xmm0, 0x50(%rbx) movups %xmm0, 0x60(%rbx) movq $0x0, 0x70(%rbx) movl $0xa, %esi movq %r14, %rdi callq 0x38c00 movl $0x1e0, %edi # imm = 0x1E0 callq 0x3a210 movq %rax, %r13 movq %rax, %rdi callq 0x3c420 leaq 0x8(%rsp), %rsi movq %r13, (%rsi) movq %r14, %rdi callq 0x389f0 movl $0xa, %esi movq %r15, %rdi callq 0x38110 movq %rbx, %rdi callq 0x3a1f0 addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r12 movl $0x1e0, %esi # imm = 0x1E0 movq %r13, %rdi callq 0x3a2b0 jmp 0x860d9 jmp 0x860d6 movq %rax, %r12 movq (%r15), %rdi testq %rdi, %rdi je 0x860ed movq 0x70(%rbx), %rsi subq %rdi, %rsi callq 0x3a2b0 movq 0x48(%rbx), %rdi testq %rdi, %rdi je 0x86102 movq 0x58(%rbx), %rsi subq %rdi, %rsi callq 0x3a2b0 movq (%r14), %rdi testq %rdi, %rdi je 0x86116 movq 0x40(%rbx), %rsi subq %rdi, %rsi callq 0x3a2b0 movq %r12, %rdi callq 0x3bd30
_ZN10OpenSubdiv6v3_6_03Far15TopologyRefinerC2ENS0_3Sdc10SchemeTypeENS3_7OptionsE: push r15; Alternative name is 'OpenSubdiv::v3_6_0::Far::TopologyRefiner::TopologyRefiner(OpenSubdiv::v3_6_0::Sdc::SchemeType, OpenSubdiv::v3_6_0::Sdc::Options)' push r14 push r13 push r12 push rbx sub rsp, 10h mov rbx, rdi mov [rdi], esi mov [rdi+4], edx mov eax, [rdi+8] and eax, 0FFFFFFF8h inc eax mov [rdi+8], ax mov edi, esi call __ZN10OpenSubdiv6v3_6_03Sdc16SchemeTypeTraits18GetRegularFaceSizeENS1_10SchemeTypeE; OpenSubdiv::v3_6_0::Sdc::SchemeTypeTraits::GetRegularFaceSize(OpenSubdiv::v3_6_0::Sdc::SchemeType) and eax, 7 mov ecx, 0FFFFFC07h and ecx, [rbx+8] lea eax, [rcx+rax*8] mov [rbx+8], ax and byte ptr [rbx+0Ch], 0C0h mov eax, 0FFFFF000h and eax, [rbx+10h] or eax, 0F0h mov [rbx+10h], ax xorps xmm0, xmm0 movups xmmword ptr [rbx+14h], xmm0 mov dword ptr [rbx+24h], 0 mov byte ptr [rbx+28h], 1 lea r14, [rbx+30h] lea r15, [rbx+60h] movups xmmword ptr [rbx+30h], xmm0 movups xmmword ptr [rbx+40h], xmm0 movups xmmword ptr [rbx+50h], xmm0 movups xmmword ptr [rbx+60h], xmm0 mov qword ptr [rbx+70h], 0 mov esi, 0Ah mov rdi, r14 call __ZNSt6vectorIPN10OpenSubdiv6v3_6_03Vtr8internal5LevelESaIS5_EE7reserveEm; std::vector<OpenSubdiv::v3_6_0::Vtr::internal::Level *>::reserve(ulong) mov edi, 1E0h; unsigned __int64 call __Znwm; operator new(ulong) mov r13, rax mov rdi, rax; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal5LevelC2Ev; OpenSubdiv::v3_6_0::Vtr::internal::Level::Level(void) lea rsi, [rsp+38h+var_30] mov [rsi], r13 mov rdi, r14 call __ZNSt6vectorIPN10OpenSubdiv6v3_6_03Vtr8internal5LevelESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<OpenSubdiv::v3_6_0::Vtr::internal::Level *>::emplace_back<OpenSubdiv::v3_6_0::Vtr::internal::Level *>(OpenSubdiv::v3_6_0::Vtr::internal::Level * &&) mov esi, 0Ah mov rdi, r15 call __ZNSt6vectorIN10OpenSubdiv6v3_6_03Far13TopologyLevelESaIS3_EE7reserveEm; std::vector<OpenSubdiv::v3_6_0::Far::TopologyLevel>::reserve(ulong) mov rdi, rbx; this call __ZN10OpenSubdiv6v3_6_03Far15TopologyRefiner17assembleFarLevelsEv; OpenSubdiv::v3_6_0::Far::TopologyRefiner::assembleFarLevels(void) add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r12, rax mov esi, 1E0h; unsigned __int64 mov rdi, r13; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_860D9 jmp short $+2 loc_860D6: mov r12, rax loc_860D9: mov rdi, [r15]; void * test rdi, rdi jz short loc_860ED mov rsi, [rbx+70h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_860ED: mov rdi, [rbx+48h]; void * test rdi, rdi jz short loc_86102 mov rsi, [rbx+58h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_86102: mov rdi, [r14]; void * test rdi, rdi jz short loc_86116 mov rsi, [rbx+40h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_86116: mov rdi, r12 call __Unwind_Resume
long long OpenSubdiv::v3_6_0::Far::TopologyRefiner::TopologyRefiner( OpenSubdiv::v3_6_0::Far::TopologyRefiner *this, unsigned int a2, int a3) { OpenSubdiv::v3_6_0::Vtr::internal::Level *v3; // r13 *(_DWORD *)this = a2; *((_DWORD *)this + 1) = a3; *((_WORD *)this + 4) = (*((_WORD *)this + 4) & 0xFFF8) + 1; *((_WORD *)this + 4) = (*((_WORD *)this + 4) & 0xFC07) + 8 * (OpenSubdiv::v3_6_0::Sdc::SchemeTypeTraits::GetRegularFaceSize(a2) & 7); *((_BYTE *)this + 12) &= 0xC0u; *((_WORD *)this + 8) = *((_WORD *)this + 8) & 0xF000 | 0xF0; *(_OWORD *)((char *)this + 20) = 0LL; *((_DWORD *)this + 9) = 0; *((_BYTE *)this + 40) = 1; *((_OWORD *)this + 3) = 0LL; *((_OWORD *)this + 4) = 0LL; *((_OWORD *)this + 5) = 0LL; *((_OWORD *)this + 6) = 0LL; *((_QWORD *)this + 14) = 0LL; std::vector<OpenSubdiv::v3_6_0::Vtr::internal::Level *>::reserve((char *)this + 48, 10LL); v3 = (OpenSubdiv::v3_6_0::Vtr::internal::Level *)operator new(0x1E0uLL); OpenSubdiv::v3_6_0::Vtr::internal::Level::Level(v3); std::vector<OpenSubdiv::v3_6_0::Vtr::internal::Level *>::emplace_back<OpenSubdiv::v3_6_0::Vtr::internal::Level *>((char *)this + 48); std::vector<OpenSubdiv::v3_6_0::Far::TopologyLevel>::reserve((char *)this + 96, 10LL); return OpenSubdiv::v3_6_0::Far::TopologyRefiner::assembleFarLevels(this); }
TopologyRefiner: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV RBX,RDI MOV dword ptr [RDI],ESI MOV dword ptr [RDI + 0x4],EDX MOV EAX,dword ptr [RDI + 0x8] AND EAX,0xfffffff8 INC EAX MOV word ptr [RDI + 0x8],AX MOV EDI,ESI CALL 0x00139350 AND EAX,0x7 MOV ECX,0xfffffc07 AND ECX,dword ptr [RBX + 0x8] LEA EAX,[RCX + RAX*0x8] MOV word ptr [RBX + 0x8],AX AND byte ptr [RBX + 0xc],0xc0 MOV EAX,0xfffff000 AND EAX,dword ptr [RBX + 0x10] OR EAX,0xf0 MOV word ptr [RBX + 0x10],AX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x14],XMM0 MOV dword ptr [RBX + 0x24],0x0 MOV byte ptr [RBX + 0x28],0x1 LEA R14,[RBX + 0x30] LEA R15,[RBX + 0x60] MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOVUPS xmmword ptr [RBX + 0x40],XMM0 MOVUPS xmmword ptr [RBX + 0x50],XMM0 MOVUPS xmmword ptr [RBX + 0x60],XMM0 MOV qword ptr [RBX + 0x70],0x0 LAB_0018606d: MOV ESI,0xa MOV RDI,R14 CALL 0x00138c00 LAB_0018607a: MOV EDI,0x1e0 CALL 0x0013a210 LAB_00186084: MOV R13,RAX MOV RDI,RAX CALL 0x0013c420 LEA RSI,[RSP + 0x8] MOV qword ptr [RSI],R13 LAB_00186097: MOV RDI,R14 CALL 0x001389f0 LAB_0018609f: MOV ESI,0xa MOV RDI,R15 CALL 0x00138110 MOV RDI,RBX CALL 0x0013a1f0 LAB_001860b4: ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* OpenSubdiv::v3_6_0::Far::TopologyRefiner::TopologyRefiner(OpenSubdiv::v3_6_0::Sdc::SchemeType, OpenSubdiv::v3_6_0::Sdc::Options) */ void __thiscall OpenSubdiv::v3_6_0::Far::TopologyRefiner::TopologyRefiner (TopologyRefiner *this,int4 param_2,int4 param_3) { ushort uVar1; Level *this_00; Level *local_30; *(int4 *)this = param_2; *(int4 *)(this + 4) = param_3; *(ushort *)(this + 8) = ((ushort)*(int4 *)(this + 8) & 0xfff8) + 1; uVar1 = Sdc::SchemeTypeTraits::GetRegularFaceSize(param_2); *(ushort *)(this + 8) = ((ushort)*(int4 *)(this + 8) & 0xfc07) + (uVar1 & 7) * 8; this[0xc] = (TopologyRefiner)((byte)this[0xc] & 0xc0); *(ushort *)(this + 0x10) = (ushort)*(int4 *)(this + 0x10) & 0xf000 | 0xf0; *(int8 *)(this + 0x14) = 0; *(int8 *)(this + 0x1c) = 0; *(int4 *)(this + 0x24) = 0; this[0x28] = (TopologyRefiner)0x1; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; *(int8 *)(this + 0x50) = 0; *(int8 *)(this + 0x58) = 0; *(int8 *)(this + 0x60) = 0; *(int8 *)(this + 0x68) = 0; *(int8 *)(this + 0x70) = 0; /* try { // try from 0018606d to 00186079 has its CatchHandler @ 001860d6 */ std:: vector<OpenSubdiv::v3_6_0::Vtr::internal::Level*,std::allocator<OpenSubdiv::v3_6_0::Vtr::internal::Level*>> ::reserve((vector<OpenSubdiv::v3_6_0::Vtr::internal::Level*,std::allocator<OpenSubdiv::v3_6_0::Vtr::internal::Level*>> *)(this + 0x30),10); /* try { // try from 0018607a to 00186083 has its CatchHandler @ 001860d4 */ this_00 = (Level *)operator_new(0x1e0); /* try { // try from 00186084 to 0018608e has its CatchHandler @ 001860c2 */ Vtr::internal::Level::Level(this_00); local_30 = this_00; /* try { // try from 00186097 to 0018609e has its CatchHandler @ 001860d4 */ std:: vector<OpenSubdiv::v3_6_0::Vtr::internal::Level*,std::allocator<OpenSubdiv::v3_6_0::Vtr::internal::Level*>> ::emplace_back<OpenSubdiv::v3_6_0::Vtr::internal::Level*> ((vector<OpenSubdiv::v3_6_0::Vtr::internal::Level*,std::allocator<OpenSubdiv::v3_6_0::Vtr::internal::Level*>> *)(this + 0x30),&local_30); /* try { // try from 0018609f to 001860b3 has its CatchHandler @ 001860d6 */ std:: vector<OpenSubdiv::v3_6_0::Far::TopologyLevel,std::allocator<OpenSubdiv::v3_6_0::Far::TopologyLevel>> ::reserve((vector<OpenSubdiv::v3_6_0::Far::TopologyLevel,std::allocator<OpenSubdiv::v3_6_0::Far::TopologyLevel>> *)(this + 0x60),10); assembleFarLevels(this); return; }
45,304
hello_close
xtate/src/probe-modules/hello-probe.c
static void hello_close() { FREE(hello_conf.hello); hello_conf.hello_len = 0; #ifndef NOT_FOUND_PCRE2 FREE(hello_conf.regex); hello_conf.regex_len = 0; if (hello_conf.compiled_re) { pcre2_code_free(hello_conf.compiled_re); hello_conf.compiled_re = NULL; } if (hello_conf.match_ctx) { pcre2_match_context_free(hello_conf.match_ctx); hello_conf.match_ctx = NULL; } #endif }
O3
c
hello_close: movq 0x17bec7(%rip), %rdi # 0x1a3598 testq %rdi, %rdi je 0x276eb pushq %rax callq 0x151e0 movq $0x0, 0x17beb1(%rip) # 0x1a3598 addq $0x8, %rsp movq $0x0, 0x17beaa(%rip) # 0x1a35a0 retq nop
hello_close: mov rdi, cs:hello_conf_0 test rdi, rdi jz short loc_276EB push rax call _free mov cs:hello_conf_0, 0 add rsp, 8 loc_276EB: mov cs:hello_conf_1, 0 retn
long long hello_close() { long long result; // rax if ( hello_conf_0 ) { result = free(hello_conf_0); hello_conf_0 = 0LL; } hello_conf_1 = 0LL; return result; }
hello_close: MOV RDI,qword ptr [0x002a3598] TEST RDI,RDI JZ 0x001276eb PUSH RAX CALL 0x001151e0 MOV qword ptr [0x002a3598],0x0 ADD RSP,0x8 LAB_001276eb: MOV qword ptr [0x002a35a0],0x0 RET
void hello_close(void) { if (hello_conf_0 != (void *)0x0) { free(hello_conf_0); hello_conf_0 = (void *)0x0; } hello_conf_1 = 0; return; }
45,305
init_key_cache_internal
eloqsql/mysys/mf_keycache.c
static int init_key_cache_internal(KEY_CACHE *keycache, uint key_cache_block_size, size_t use_mem, uint division_limit, uint age_threshold, uint changed_blocks_hash_size, uint partitions, my_bool use_op_lock) { void *keycache_cb; int blocks; if (keycache->key_cache_inited) { if (use_op_lock) pthread_mutex_lock(&keycache->op_lock); keycache_cb= keycache->keycache_cb; } else { if (partitions == 0) { if (!(keycache_cb= (void *) my_malloc(key_memory_KEY_CACHE, sizeof(SIMPLE_KEY_CACHE_CB), MYF(0)))) return 0; ((SIMPLE_KEY_CACHE_CB *) keycache_cb)->key_cache_inited= 0; keycache->key_cache_type= SIMPLE_KEY_CACHE; keycache->interface_funcs= &simple_key_cache_funcs; } else { if (!(keycache_cb= (void *) my_malloc(key_memory_KEY_CACHE, sizeof(PARTITIONED_KEY_CACHE_CB), MYF(0)))) return 0; ((PARTITIONED_KEY_CACHE_CB *) keycache_cb)->key_cache_inited= 0; keycache->key_cache_type= PARTITIONED_KEY_CACHE; keycache->interface_funcs= &partitioned_key_cache_funcs; } /* Initialize op_lock if it's not initialized before. The mutex may have been initialized before if we are being called from repartition_key_cache_internal(). */ if (use_op_lock) pthread_mutex_init(&keycache->op_lock, MY_MUTEX_INIT_FAST); keycache->keycache_cb= keycache_cb; keycache->key_cache_inited= 1; if (use_op_lock) pthread_mutex_lock(&keycache->op_lock); } if (partitions != 0) { ((PARTITIONED_KEY_CACHE_CB *) keycache_cb)->partitions= partitions; } keycache->can_be_used= 0; blocks= keycache->interface_funcs->init(keycache_cb, key_cache_block_size, use_mem, division_limit, age_threshold, changed_blocks_hash_size); keycache->partitions= partitions ? ((PARTITIONED_KEY_CACHE_CB *) keycache_cb)->partitions : 0; DBUG_ASSERT(partitions <= MAX_KEY_CACHE_PARTITIONS); keycache->key_cache_mem_size= keycache->partitions ? ((PARTITIONED_KEY_CACHE_CB *) keycache_cb)->key_cache_mem_size : ((SIMPLE_KEY_CACHE_CB *) keycache_cb)->key_cache_mem_size; if (blocks > 0) keycache->can_be_used= 1; if (use_op_lock) pthread_mutex_unlock(&keycache->op_lock); return blocks; }
O3
c
init_key_cache_internal: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %r9d, %r12d movl %ecx, %r13d movq %rdx, %r14 movq %rdi, %rbx movl 0x10(%rbp), %ecx cmpb $0x0, 0x48(%rdi) je 0x97c0c cmpb $0x0, 0x18(%rbp) je 0x97c03 leaq 0x58(%rbx), %rdi movl %r8d, %r15d movl %r13d, -0x2c(%rbp) movl %esi, %r13d callq 0x29210 movl %r13d, %esi movl 0x10(%rbp), %ecx movl -0x2c(%rbp), %r13d movl %r15d, %r8d movq 0x8(%rbx), %r15 jmp 0x97cb9 movl %esi, -0x30(%rbp) movl %r8d, -0x34(%rbp) movl %r12d, -0x2c(%rbp) leaq 0xb6f44a(%rip), %rax # 0xc07068 movl (%rax), %edi xorl %r12d, %r12d testl %ecx, %ecx je 0x97c4e movl $0x20, %esi xorl %edx, %edx callq 0x9f6e1 testq %rax, %rax je 0x97d24 movq %rax, %r15 leaq 0x2ecb12(%rip), %rax # 0x384758 movl $0x1, %r12d jmp 0x97c6d movl $0x170, %esi # imm = 0x170 xorl %edx, %edx callq 0x9f6e1 testq %rax, %rax je 0x97d24 movq %rax, %r15 leaq 0x2eca9b(%rip), %rax # 0x384708 movb $0x0, (%r15) movl %r12d, (%rbx) movq %rax, 0x10(%rbx) cmpb $0x0, 0x18(%rbp) je 0x97ca3 leaq 0x58(%rbx), %r12 leaq 0xb6f757(%rip), %rsi # 0xc073e0 movq %r12, %rdi callq 0x29330 movq %r15, 0x8(%rbx) movb $0x1, 0x48(%rbx) movq %r12, %rdi callq 0x29210 jmp 0x97cab movq %r15, 0x8(%rbx) movb $0x1, 0x48(%rbx) movl -0x2c(%rbp), %r12d movl -0x34(%rbp), %r8d movl 0x10(%rbp), %ecx movl -0x30(%rbp), %esi testl %ecx, %ecx je 0x97cc1 movl %ecx, 0x1c(%r15) movb $0x0, 0x49(%rbx) movq 0x10(%rbx), %rax movq %r15, %rdi movq %r14, %rdx movl %ecx, %r14d movl %r13d, %ecx movl %r12d, %r9d callq *(%rax) movl %eax, %r12d testl %r14d, %r14d je 0x97cf7 movl 0x1c(%r15), %eax xorl %ecx, %ecx testl %eax, %eax setne %cl leaq 0x8(,%rcx,8), %rcx jmp 0x97cfe xorl %eax, %eax movl $0x8, %ecx movl %eax, 0x4c(%rbx) movq (%r15,%rcx), %rax movq %rax, 0x50(%rbx) testl %r12d, %r12d jle 0x97d12 movb $0x1, 0x49(%rbx) cmpb $0x0, 0x18(%rbp) je 0x97d24 addq $0x58, %rbx movq %rbx, %rdi callq 0x291e0 movl %r12d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
init_key_cache_internal: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r12d, r9d mov r13d, ecx mov r14, rdx mov rbx, rdi mov ecx, [rbp+arg_0] cmp byte ptr [rdi+48h], 0 jz short loc_97C0C cmp [rbp+arg_8], 0 jz short loc_97C03 lea rdi, [rbx+58h] mov r15d, r8d mov [rbp+var_2C], r13d mov r13d, esi call _pthread_mutex_lock mov esi, r13d mov ecx, [rbp+arg_0] mov r13d, [rbp+var_2C] mov r8d, r15d loc_97C03: mov r15, [rbx+8] jmp loc_97CB9 loc_97C0C: mov [rbp+var_30], esi mov [rbp+var_34], r8d mov [rbp+var_2C], r12d lea rax, key_memory_KEY_CACHE mov edi, [rax] xor r12d, r12d test ecx, ecx jz short loc_97C4E mov esi, 20h ; ' ' xor edx, edx call my_malloc test rax, rax jz loc_97D24 mov r15, rax lea rax, partitioned_key_cache_funcs mov r12d, 1 jmp short loc_97C6D loc_97C4E: mov esi, 170h xor edx, edx call my_malloc test rax, rax jz loc_97D24 mov r15, rax lea rax, simple_key_cache_funcs loc_97C6D: mov byte ptr [r15], 0 mov [rbx], r12d mov [rbx+10h], rax cmp [rbp+arg_8], 0 jz short loc_97CA3 lea r12, [rbx+58h] lea rsi, my_fast_mutexattr mov rdi, r12 call _pthread_mutex_init mov [rbx+8], r15 mov byte ptr [rbx+48h], 1 mov rdi, r12 call _pthread_mutex_lock jmp short loc_97CAB loc_97CA3: mov [rbx+8], r15 mov byte ptr [rbx+48h], 1 loc_97CAB: mov r12d, [rbp+var_2C] mov r8d, [rbp+var_34] mov ecx, [rbp+arg_0] mov esi, [rbp+var_30] loc_97CB9: test ecx, ecx jz short loc_97CC1 mov [r15+1Ch], ecx loc_97CC1: mov byte ptr [rbx+49h], 0 mov rax, [rbx+10h] mov rdi, r15 mov rdx, r14 mov r14d, ecx mov ecx, r13d mov r9d, r12d call qword ptr [rax] mov r12d, eax test r14d, r14d jz short loc_97CF7 mov eax, [r15+1Ch] xor ecx, ecx test eax, eax setnz cl lea rcx, ds:8[rcx*8] jmp short loc_97CFE loc_97CF7: xor eax, eax mov ecx, 8 loc_97CFE: mov [rbx+4Ch], eax mov rax, [r15+rcx] mov [rbx+50h], rax test r12d, r12d jle short loc_97D12 mov byte ptr [rbx+49h], 1 loc_97D12: cmp [rbp+arg_8], 0 jz short loc_97D24 add rbx, 58h ; 'X' mov rdi, rbx call _pthread_mutex_unlock loc_97D24: mov eax, r12d add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long init_key_cache_internal( long long a1, long long a2, long long a3, unsigned int a4, long long a5, unsigned int a6, int a7, char a8) { unsigned int v8; // r12d int v11; // ecx unsigned int v12; // r15d long long v13; // r15 unsigned int v14; // r12d long long v15; // rax long long ( **v16)(); // rax long long v17; // rax long long v18; // rdx int v19; // r14d int v20; // eax long long v21; // rcx unsigned int v23; // [rsp+Ch] [rbp-34h] v8 = a6; v11 = a7; if ( *(_BYTE *)(a1 + 72) ) { if ( a8 ) { v12 = a5; pthread_mutex_lock(a1 + 88); a2 = (unsigned int)a2; v11 = a7; a5 = v12; } v13 = *(_QWORD *)(a1 + 8); } else { v23 = a5; v14 = 0; if ( a7 ) { v15 = my_malloc(key_memory_KEY_CACHE, 32LL, 0LL); if ( !v15 ) return v14; v13 = v15; v16 = partitioned_key_cache_funcs; v14 = 1; } else { v17 = my_malloc(key_memory_KEY_CACHE, 368LL, 0LL); if ( !v17 ) return v14; v13 = v17; v16 = simple_key_cache_funcs; } *(_BYTE *)v13 = 0; *(_DWORD *)a1 = v14; *(_QWORD *)(a1 + 16) = v16; if ( a8 ) { pthread_mutex_init(a1 + 88, &my_fast_mutexattr); *(_QWORD *)(a1 + 8) = v13; *(_BYTE *)(a1 + 72) = 1; pthread_mutex_lock(a1 + 88); } else { *(_QWORD *)(a1 + 8) = v13; *(_BYTE *)(a1 + 72) = 1; } v8 = a6; a5 = v23; v11 = a7; a2 = (unsigned int)a2; } if ( v11 ) *(_DWORD *)(v13 + 28) = v11; *(_BYTE *)(a1 + 73) = 0; v18 = a3; v19 = v11; v14 = (**(long long ( ***)(long long, long long, long long, _QWORD, long long, _QWORD))(a1 + 16))( v13, a2, v18, a4, a5, v8); if ( v19 ) { v20 = *(_DWORD *)(v13 + 28); v21 = 8LL * (v20 != 0) + 8; } else { v20 = 0; v21 = 8LL; } *(_DWORD *)(a1 + 76) = v20; *(_QWORD *)(a1 + 80) = *(_QWORD *)(v13 + v21); if ( (int)v14 > 0 ) *(_BYTE *)(a1 + 73) = 1; if ( a8 ) pthread_mutex_unlock(a1 + 88); return v14; }
init_key_cache_internal: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R12D,R9D MOV R13D,ECX MOV R14,RDX MOV RBX,RDI MOV ECX,dword ptr [RBP + 0x10] CMP byte ptr [RDI + 0x48],0x0 JZ 0x00197c0c CMP byte ptr [RBP + 0x18],0x0 JZ 0x00197c03 LEA RDI,[RBX + 0x58] MOV R15D,R8D MOV dword ptr [RBP + -0x2c],R13D MOV R13D,ESI CALL 0x00129210 MOV ESI,R13D MOV ECX,dword ptr [RBP + 0x10] MOV R13D,dword ptr [RBP + -0x2c] MOV R8D,R15D LAB_00197c03: MOV R15,qword ptr [RBX + 0x8] JMP 0x00197cb9 LAB_00197c0c: MOV dword ptr [RBP + -0x30],ESI MOV dword ptr [RBP + -0x34],R8D MOV dword ptr [RBP + -0x2c],R12D LEA RAX,[0xd07068] MOV EDI,dword ptr [RAX] XOR R12D,R12D TEST ECX,ECX JZ 0x00197c4e MOV ESI,0x20 XOR EDX,EDX CALL 0x0019f6e1 TEST RAX,RAX JZ 0x00197d24 MOV R15,RAX LEA RAX,[0x484758] MOV R12D,0x1 JMP 0x00197c6d LAB_00197c4e: MOV ESI,0x170 XOR EDX,EDX CALL 0x0019f6e1 TEST RAX,RAX JZ 0x00197d24 MOV R15,RAX LEA RAX,[0x484708] LAB_00197c6d: MOV byte ptr [R15],0x0 MOV dword ptr [RBX],R12D MOV qword ptr [RBX + 0x10],RAX CMP byte ptr [RBP + 0x18],0x0 JZ 0x00197ca3 LEA R12,[RBX + 0x58] LEA RSI,[0xd073e0] MOV RDI,R12 CALL 0x00129330 MOV qword ptr [RBX + 0x8],R15 MOV byte ptr [RBX + 0x48],0x1 MOV RDI,R12 CALL 0x00129210 JMP 0x00197cab LAB_00197ca3: MOV qword ptr [RBX + 0x8],R15 MOV byte ptr [RBX + 0x48],0x1 LAB_00197cab: MOV R12D,dword ptr [RBP + -0x2c] MOV R8D,dword ptr [RBP + -0x34] MOV ECX,dword ptr [RBP + 0x10] MOV ESI,dword ptr [RBP + -0x30] LAB_00197cb9: TEST ECX,ECX JZ 0x00197cc1 MOV dword ptr [R15 + 0x1c],ECX LAB_00197cc1: MOV byte ptr [RBX + 0x49],0x0 MOV RAX,qword ptr [RBX + 0x10] MOV RDI,R15 MOV RDX,R14 MOV R14D,ECX MOV ECX,R13D MOV R9D,R12D CALL qword ptr [RAX] MOV R12D,EAX TEST R14D,R14D JZ 0x00197cf7 MOV EAX,dword ptr [R15 + 0x1c] XOR ECX,ECX TEST EAX,EAX SETNZ CL LEA RCX,[0x8 + RCX*0x8] JMP 0x00197cfe LAB_00197cf7: XOR EAX,EAX MOV ECX,0x8 LAB_00197cfe: MOV dword ptr [RBX + 0x4c],EAX MOV RAX,qword ptr [R15 + RCX*0x1] MOV qword ptr [RBX + 0x50],RAX TEST R12D,R12D JLE 0x00197d12 MOV byte ptr [RBX + 0x49],0x1 LAB_00197d12: CMP byte ptr [RBP + 0x18],0x0 JZ 0x00197d24 ADD RBX,0x58 MOV RDI,RBX CALL 0x001291e0 LAB_00197d24: MOV EAX,R12D ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int init_key_cache_internal (int4 *param_1,ulong param_2,int8 param_3,int4 param_4,ulong param_5 ,int4 param_6,int param_7,char param_8) { int iVar1; int iVar2; int1 *puVar3; int1 *puVar4; long lVar5; int4 uVar6; if (*(char *)(param_1 + 0x12) == '\0') { uVar6 = 0; if (param_7 == 0) { puVar3 = (int1 *)my_malloc(key_memory_KEY_CACHE,0x170,0); if (puVar3 == (int1 *)0x0) { return 0; } puVar4 = simple_key_cache_funcs; } else { puVar3 = (int1 *)my_malloc(key_memory_KEY_CACHE,0x20,0); if (puVar3 == (int1 *)0x0) { return 0; } puVar4 = partitioned_key_cache_funcs; uVar6 = 1; } *puVar3 = 0; *param_1 = uVar6; *(int1 **)(param_1 + 4) = puVar4; if (param_8 == '\0') { *(int1 **)(param_1 + 2) = puVar3; *(int1 *)(param_1 + 0x12) = 1; } else { pthread_mutex_init((pthread_mutex_t *)(param_1 + 0x16), (pthread_mutexattr_t *)&my_fast_mutexattr); *(int1 **)(param_1 + 2) = puVar3; *(int1 *)(param_1 + 0x12) = 1; pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x16)); } param_5 = param_5 & 0xffffffff; param_2 = param_2 & 0xffffffff; } else { if (param_8 != '\0') { param_5 = param_5 & 0xffffffff; param_2 = param_2 & 0xffffffff; pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x16)); } puVar3 = *(int1 **)(param_1 + 2); } if (param_7 != 0) { *(int *)(puVar3 + 0x1c) = param_7; } *(int1 *)((long)param_1 + 0x49) = 0; iVar1 = (*(code *)**(int8 **)(param_1 + 4))(puVar3,param_2,param_3,param_4,param_5,param_6); if (param_7 == 0) { iVar2 = 0; lVar5 = 8; } else { iVar2 = *(int *)(puVar3 + 0x1c); lVar5 = (ulong)(iVar2 != 0) * 8 + 8; } param_1[0x13] = iVar2; *(int8 *)(param_1 + 0x14) = *(int8 *)(puVar3 + lVar5); if (0 < iVar1) { *(int1 *)((long)param_1 + 0x49) = 1; } if (param_8 != '\0') { pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x16)); } return iVar1; }
45,306
my_fopen
eloqsql/mysys/my_fopen.c
FILE *my_fopen(const char *filename, int flags, myf MyFlags) { FILE *fd; char type[10]; DBUG_ENTER("my_fopen"); DBUG_PRINT("my",("Name: '%s' flags: %d MyFlags: %lu", filename, flags, MyFlags)); make_ftype(type,flags); #ifdef _WIN32 fd= my_win_fopen(filename, type); #else fd= fopen(filename, type); #endif if (fd != 0) { /* The test works if MY_NFILE < 128. The problem is that fileno() is char on some OS (SUNOS). Actually the filename save isn't that important so we can ignore if this doesn't work. */ int filedesc= my_fileno(fd); if ((uint)filedesc >= my_file_limit) { statistic_increment(my_stream_opened,&THR_LOCK_open); DBUG_RETURN(fd); /* safeguard */ } my_file_info[filedesc].name= my_strdup(key_memory_my_file_info, filename, MyFlags); statistic_increment(my_stream_opened, &THR_LOCK_open); statistic_increment(my_file_total_opened, &THR_LOCK_open); my_file_info[filedesc].type= STREAM_BY_FOPEN; DBUG_PRINT("exit",("stream: %p", fd)); DBUG_RETURN(fd); } else my_errno=errno; DBUG_PRINT("error",("Got error %d on open",my_errno)); if (MyFlags & (MY_FFNF | MY_FAE | MY_WME)) my_error((flags & O_RDONLY) ? EE_FILENOTFOUND : EE_CANTCREATEFILE, MYF(ME_BELL), filename, my_errno); DBUG_RETURN((FILE*) 0); }
O3
c
my_fopen: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp movq %rdx, %r14 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x28(%rbp) testb $0x1, %sil jne 0x36860 testb $0x2, %sil jne 0x3687a leaq -0x31(%rbp), %rax movb $0x72, -0x1(%rax) jmp 0x368a4 btl $0xa, %esi movl $0x77, %eax movl $0x61, %ecx cmovael %eax, %ecx leaq -0x31(%rbp), %rax movb %cl, -0x1(%rax) jmp 0x368a4 btl $0xa, %esi movl $0x72, %eax movl $0x61, %ecx cmovael %eax, %ecx testl $0x240, %esi # imm = 0x240 movl $0x77, %edx cmovel %ecx, %edx leaq -0x30(%rbp), %rax movb %dl, -0x2(%rax) movb $0x2b, -0x1(%rax) movw $0x65, (%rax) leaq -0x32(%rbp), %rsi movq %rbx, %rdi callq 0x243f0 movq %rax, %r15 testq %rax, %rax je 0x3691e movq %r15, %rdi callq 0x2d14e movl %eax, %r12d leaq 0x2c3da1(%rip), %rax # 0x2fa670 cmpl (%rax), %r12d jae 0x36951 leaq 0x3430f9(%rip), %rax # 0x3799d4 movl (%rax), %edi movq %rbx, %rsi movq %r14, %rdx callq 0x3039c leaq 0x2c3d89(%rip), %rcx # 0x2fa678 movq (%rcx), %rdx movslq %r12d, %rsi shlq $0x4, %rsi movq %rax, (%rdx,%rsi) leaq 0x342b7c(%rip), %rax # 0x379480 incq (%rax) leaq 0x342b82(%rip), %rax # 0x379490 incq (%rax) movq (%rcx), %rax movl $0x3, 0x8(%rax,%rsi) jmp 0x3695b callq 0x24050 movl (%rax), %r12d callq 0x3193e movl %r12d, (%rax) testb $0x19, %r14b je 0x3695b callq 0x3193e movl (%rax), %ecx movl $0x4, %esi movl $0x1, %edi movq %rbx, %rdx xorl %eax, %eax callq 0x2cce7 jmp 0x3695b leaq 0x342b28(%rip), %rax # 0x379480 incq (%rax) movq %fs:0x28, %rax cmpq -0x28(%rbp), %rax jne 0x3697a movq %r15, %rax addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq callq 0x243e0
my_fopen: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 20h mov r14, rdx mov rbx, rdi mov rax, fs:28h mov [rbp+var_28], rax test sil, 1 jnz short loc_36860 test sil, 2 jnz short loc_3687A lea rax, [rbp+var_31] mov byte ptr [rax-1], 72h ; 'r' jmp short loc_368A4 loc_36860: bt esi, 0Ah mov eax, 77h ; 'w' mov ecx, 61h ; 'a' cmovnb ecx, eax lea rax, [rbp+var_31] mov [rax-1], cl jmp short loc_368A4 loc_3687A: bt esi, 0Ah mov eax, 72h ; 'r' mov ecx, 61h ; 'a' cmovnb ecx, eax test esi, 240h mov edx, 77h ; 'w' cmovz edx, ecx lea rax, [rbp+var_30] mov [rax-2], dl mov byte ptr [rax-1], 2Bh ; '+' loc_368A4: mov word ptr [rax], 65h ; 'e' lea rsi, [rbp+var_32] mov rdi, rbx call _fopen64 mov r15, rax test rax, rax jz short loc_3691E mov rdi, r15 call my_fileno mov r12d, eax lea rax, my_file_limit cmp r12d, [rax] jnb short loc_36951 lea rax, key_memory_my_file_info mov edi, [rax] mov rsi, rbx mov rdx, r14 call my_strdup lea rcx, my_file_info mov rdx, [rcx] movsxd rsi, r12d shl rsi, 4 mov [rdx+rsi], rax lea rax, my_stream_opened inc qword ptr [rax] lea rax, my_file_total_opened inc qword ptr [rax] mov rax, [rcx] mov dword ptr [rax+rsi+8], 3 jmp short loc_3695B loc_3691E: call ___errno_location mov r12d, [rax] call _my_thread_var mov [rax], r12d test r14b, 19h jz short loc_3695B call _my_thread_var mov ecx, [rax] mov esi, 4 mov edi, 1 mov rdx, rbx xor eax, eax call my_error jmp short loc_3695B loc_36951: lea rax, my_stream_opened inc qword ptr [rax] loc_3695B: mov rax, fs:28h cmp rax, [rbp+var_28] jnz short loc_3697A mov rax, r15 add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_3697A: call ___stack_chk_fail
long long my_fopen(long long a1, __int16 a2, int a3) { char *v4; // rax char v5; // cl char v6; // cl char v7; // dl long long v8; // rax long long v9; // r15 unsigned int v10; // r12d long long v11; // rsi int v12; // r12d unsigned int *v13; // rax char v15; // [rsp+Eh] [rbp-32h] BYREF char v16; // [rsp+Fh] [rbp-31h] BYREF char v17; // [rsp+10h] [rbp-30h] BYREF unsigned long long v18; // [rsp+18h] [rbp-28h] v18 = __readfsqword(0x28u); if ( (a2 & 1) != 0 ) { v5 = 97; if ( (a2 & 0x400) == 0 ) v5 = 119; v4 = &v16; v15 = v5; } else if ( (a2 & 2) != 0 ) { v6 = 97; if ( (a2 & 0x400) == 0 ) v6 = 114; v7 = 119; if ( (a2 & 0x240) == 0 ) v7 = v6; v4 = &v17; v15 = v7; v16 = 43; } else { v4 = &v16; v15 = 114; } *(_WORD *)v4 = 101; v8 = fopen64(a1, &v15); v9 = v8; if ( v8 ) { v10 = my_fileno(v8); if ( v10 >= my_file_limit ) { ++my_stream_opened; } else { v11 = 16LL * (int)v10; *(_QWORD *)((char *)my_file_info + v11) = my_strdup(key_memory_my_file_info, a1, a3); ++my_stream_opened; ++my_file_total_opened; *(_DWORD *)((char *)my_file_info + v11 + 8) = 3; } } else { v12 = *(_DWORD *)__errno_location(a1); *(_DWORD *)my_thread_var() = v12; if ( (a3 & 0x19) != 0 ) { v13 = (unsigned int *)my_thread_var(); my_error(1u, 4LL, a1, *v13); } } return v9; }
my_fopen: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x20 MOV R14,RDX MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX TEST SIL,0x1 JNZ 0x00136860 TEST SIL,0x2 JNZ 0x0013687a LEA RAX,[RBP + -0x31] MOV byte ptr [RAX + -0x1],0x72 JMP 0x001368a4 LAB_00136860: BT ESI,0xa MOV EAX,0x77 MOV ECX,0x61 CMOVNC ECX,EAX LEA RAX,[RBP + -0x31] MOV byte ptr [RAX + -0x1],CL JMP 0x001368a4 LAB_0013687a: BT ESI,0xa MOV EAX,0x72 MOV ECX,0x61 CMOVNC ECX,EAX TEST ESI,0x240 MOV EDX,0x77 CMOVZ EDX,ECX LEA RAX,[RBP + -0x30] MOV byte ptr [RAX + -0x2],DL MOV byte ptr [RAX + -0x1],0x2b LAB_001368a4: MOV word ptr [RAX],0x65 LEA RSI,[RBP + -0x32] MOV RDI,RBX CALL 0x001243f0 MOV R15,RAX TEST RAX,RAX JZ 0x0013691e MOV RDI,R15 CALL 0x0012d14e MOV R12D,EAX LEA RAX,[0x3fa670] CMP R12D,dword ptr [RAX] JNC 0x00136951 LEA RAX,[0x4799d4] MOV EDI,dword ptr [RAX] MOV RSI,RBX MOV RDX,R14 CALL 0x0013039c LEA RCX,[0x3fa678] MOV RDX,qword ptr [RCX] MOVSXD RSI,R12D SHL RSI,0x4 MOV qword ptr [RDX + RSI*0x1],RAX LEA RAX,[0x479480] INC qword ptr [RAX] LEA RAX,[0x479490] INC qword ptr [RAX] MOV RAX,qword ptr [RCX] MOV dword ptr [RAX + RSI*0x1 + 0x8],0x3 JMP 0x0013695b LAB_0013691e: CALL 0x00124050 MOV R12D,dword ptr [RAX] CALL 0x0013193e MOV dword ptr [RAX],R12D TEST R14B,0x19 JZ 0x0013695b CALL 0x0013193e MOV ECX,dword ptr [RAX] MOV ESI,0x4 MOV EDI,0x1 MOV RDX,RBX XOR EAX,EAX CALL 0x0012cce7 JMP 0x0013695b LAB_00136951: LEA RAX,[0x479480] INC qword ptr [RAX] LAB_0013695b: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x28] JNZ 0x0013697a MOV RAX,R15 ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0013697a: CALL 0x001243e0
FILE * my_fopen(char *param_1,uint param_2,ulong param_3) { int iVar1; uint uVar2; int2 *puVar3; FILE *pFVar4; int8 uVar5; int *piVar6; int4 *puVar7; char cVar8; long in_FS_OFFSET; char local_3a; int1 local_39 [9]; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); if ((param_2 & 1) == 0) { if ((param_2 & 2) == 0) { puVar3 = (int2 *)local_39; local_3a = 'r'; } else { cVar8 = 'a'; if ((param_2 >> 10 & 1) == 0) { cVar8 = 'r'; } local_3a = 'w'; if ((param_2 & 0x240) == 0) { local_3a = cVar8; } puVar3 = (int2 *)(local_39 + 1); local_39[0] = 0x2b; } } else { local_3a = 'a'; if ((param_2 >> 10 & 1) == 0) { local_3a = 'w'; } puVar3 = (int2 *)local_39; } *puVar3 = 0x65; pFVar4 = fopen64(param_1,&local_3a); if (pFVar4 == (FILE *)0x0) { piVar6 = __errno_location(); iVar1 = *piVar6; piVar6 = (int *)_my_thread_var(); *piVar6 = iVar1; if ((param_3 & 0x19) != 0) { puVar7 = (int4 *)_my_thread_var(); my_error(1,4,param_1,*puVar7); } } else { uVar2 = my_fileno(pFVar4); if (uVar2 < my_file_limit) { uVar5 = my_strdup(key_memory_my_file_info,param_1,param_3); *(int8 *)(my_file_info + (long)(int)uVar2 * 0x10) = uVar5; my_stream_opened = my_stream_opened + 1; my_file_total_opened = my_file_total_opened + 1; *(int4 *)(my_file_info + (long)(int)uVar2 * 0x10 + 8) = 3; } else { my_stream_opened = my_stream_opened + 1; } } if (*(long *)(in_FS_OFFSET + 0x28) == local_30) { return pFVar4; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
45,307
my_uca_contraction_find
eloqsql/strings/ctype-uca.c
static inline const MY_CONTRACTION * my_uca_contraction_find(const MY_CONTRACTIONS *list, my_wc_t *wc, size_t len) { MY_CONTRACTION *c, *last; DBUG_ASSERT(len <= MY_UCA_MAX_CONTRACTION); for (c= list->item, last= c + list->nitems; c < last; c++) { if ((len >= MY_UCA_MAX_CONTRACTION || c->ch[len] == 0) && !c->with_context && !my_wmemcmp(c->ch, wc, len)) return c; } return NULL; }
O0
c
my_uca_contraction_find: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) jmp 0x51026 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movq -0x10(%rbp), %rcx imulq $0x58, (%rcx), %rcx addq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x5109f cmpq $0x6, -0x20(%rbp) jae 0x51065 movq -0x28(%rbp), %rax movq -0x20(%rbp), %rcx cmpq $0x0, (%rax,%rcx,8) jne 0x5108f movq -0x28(%rbp), %rax cmpb $0x0, 0x52(%rax) jne 0x5108f movq -0x28(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x510c0 cmpl $0x0, %eax jne 0x5108f movq -0x28(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x510a7 jmp 0x51091 movq -0x28(%rbp), %rax addq $0x58, %rax movq %rax, -0x28(%rbp) jmp 0x51045 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_uca_contraction_find: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx jmp short $+2 loc_51026: mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_28], rax mov rax, [rbp+var_28] mov rcx, [rbp+var_10] imul rcx, [rcx], 58h ; 'X' add rax, rcx mov [rbp+var_30], rax loc_51045: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jnb short loc_5109F cmp [rbp+var_20], 6 jnb short loc_51065 mov rax, [rbp+var_28] mov rcx, [rbp+var_20] cmp qword ptr [rax+rcx*8], 0 jnz short loc_5108F loc_51065: mov rax, [rbp+var_28] cmp byte ptr [rax+52h], 0 jnz short loc_5108F mov rdi, [rbp+var_28] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call my_wmemcmp cmp eax, 0 jnz short loc_5108F mov rax, [rbp+var_28] mov [rbp+var_8], rax jmp short loc_510A7 loc_5108F: jmp short $+2 loc_51091: mov rax, [rbp+var_28] add rax, 58h ; 'X' mov [rbp+var_28], rax jmp short loc_51045 loc_5109F: mov [rbp+var_8], 0 loc_510A7: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
unsigned long long my_uca_contraction_find(_QWORD *a1, long long a2, unsigned long long a3) { unsigned long long v4; // [rsp+0h] [rbp-30h] unsigned long long v5; // [rsp+8h] [rbp-28h] v5 = a1[1]; v4 = 88LL * *a1 + v5; while ( v5 < v4 ) { if ( (a3 >= 6 || !*(_QWORD *)(v5 + 8 * a3)) && !*(_BYTE *)(v5 + 82) && !(unsigned int)my_wmemcmp(v5, a2, a3) ) return v5; v5 += 88LL; } return 0LL; }
my_uca_contraction_find: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX JMP 0x00151026 LAB_00151026: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x10] IMUL RCX,qword ptr [RCX],0x58 ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX LAB_00151045: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JNC 0x0015109f CMP qword ptr [RBP + -0x20],0x6 JNC 0x00151065 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x20] CMP qword ptr [RAX + RCX*0x8],0x0 JNZ 0x0015108f LAB_00151065: MOV RAX,qword ptr [RBP + -0x28] CMP byte ptr [RAX + 0x52],0x0 JNZ 0x0015108f MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x001510c0 CMP EAX,0x0 JNZ 0x0015108f MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x8],RAX JMP 0x001510a7 LAB_0015108f: JMP 0x00151091 LAB_00151091: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x58 MOV qword ptr [RBP + -0x28],RAX JMP 0x00151045 LAB_0015109f: MOV qword ptr [RBP + -0x8],0x0 LAB_001510a7: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
ulong my_uca_contraction_find(long *param_1,int8 param_2,ulong param_3) { int iVar1; ulong uVar2; ulong local_30; local_30 = param_1[1]; uVar2 = local_30 + *param_1 * 0x58; while( true ) { if (uVar2 <= local_30) { return 0; } if ((((5 < param_3) || (*(long *)(local_30 + param_3 * 8) == 0)) && (*(char *)(local_30 + 0x52) == '\0')) && (iVar1 = my_wmemcmp(local_30,param_2,param_3), iVar1 == 0)) break; local_30 = local_30 + 0x58; } return local_30; }
45,308
purge_account(PFS_thread*, PFS_account*)
eloqsql/storage/perfschema/pfs_account.cc
void purge_account(PFS_thread *thread, PFS_account *account) { LF_PINS *pins= get_account_hash_pins(thread); if (unlikely(pins == NULL)) return; PFS_account **entry; entry= reinterpret_cast<PFS_account**> (lf_hash_search(&account_hash, pins, account->m_key.m_hash_key, account->m_key.m_key_length)); if (entry && (entry != MY_ERRPTR)) { assert(*entry == account); if (account->get_refcount() == 0) { lf_hash_delete(&account_hash, pins, account->m_key.m_hash_key, account->m_key.m_key_length); account->aggregate(false, account->m_user, account->m_host); if (account->m_user != NULL) { account->m_user->release(); account->m_user= NULL; } if (account->m_host != NULL) { account->m_host->release(); account->m_host= NULL; } global_account_container.deallocate(account); } } lf_hash_search_unpin(pins); }
O0
cpp
purge_account(PFS_thread*, PFS_account*): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rdi callq 0x52a60 movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) sete %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x53454 jmp 0x53575 movq -0x18(%rbp), %rsi movq -0x10(%rbp), %rdx addq $0x7e4, %rdx # imm = 0x7E4 movq -0x10(%rbp), %rax movl 0xa68(%rax), %ecx leaq 0x3bd05c(%rip), %rdi # 0x4104d0 callq 0x5fc80 movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) je 0x5355b movl $0x1, %eax cmpq %rax, -0x20(%rbp) je 0x5355b movq -0x10(%rbp), %rdi callq 0x53e40 cmpl $0x0, %eax jne 0x53559 movq -0x18(%rbp), %rsi movq -0x10(%rbp), %rdx addq $0x7e4, %rdx # imm = 0x7E4 movq -0x10(%rbp), %rax movl 0xa68(%rax), %ecx leaq 0x3bd007(%rip), %rdi # 0x4104d0 callq 0x5f260 movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rax movq 0xa90(%rax), %rdx movq -0x10(%rbp), %rax movq 0xa98(%rax), %rcx xorl %esi, %esi callq 0x52b90 movq -0x10(%rbp), %rax cmpq $0x0, 0xa90(%rax) je 0x5351c movq -0x10(%rbp), %rax movq 0xa90(%rax), %rdi callq 0x46d70 movq -0x10(%rbp), %rax movq $0x0, 0xa90(%rax) movq -0x10(%rbp), %rax cmpq $0x0, 0xa98(%rax) je 0x53549 movq -0x10(%rbp), %rax movq 0xa98(%rax), %rdi callq 0x59100 movq -0x10(%rbp), %rax movq $0x0, 0xa98(%rax) movq -0x10(%rbp), %rsi leaq 0x3b3484(%rip), %rdi # 0x4069d8 callq 0x53ce0 jmp 0x5355b jmp 0x5355d jmp 0x5355f jmp 0x53561 movq -0x18(%rbp), %rcx movq $0x0, -0x28(%rbp) movq -0x28(%rbp), %rax xchgq %rax, 0x10(%rcx) addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
_Z13purge_accountP10PFS_threadP11PFS_account: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_8]; PFS_thread * call _ZL21get_account_hash_pinsP10PFS_thread; get_account_hash_pins(PFS_thread *) mov [rbp+var_18], rax cmp [rbp+var_18], 0 setz al and al, 1 movzx eax, al cmp eax, 0 jz short loc_53454 jmp loc_53575 loc_53454: mov rsi, [rbp+var_18] mov rdx, [rbp+var_10] add rdx, 7E4h mov rax, [rbp+var_10] mov ecx, [rax+0A68h] lea rdi, account_hash call lf_hash_search mov [rbp+var_20], rax cmp [rbp+var_20], 0 jz loc_5355B mov eax, 1 cmp [rbp+var_20], rax jz loc_5355B mov rdi, [rbp+var_10]; this call _ZN11PFS_account12get_refcountEv; PFS_account::get_refcount(void) cmp eax, 0 jnz loc_53559 mov rsi, [rbp+var_18] mov rdx, [rbp+var_10] add rdx, 7E4h mov rax, [rbp+var_10] mov ecx, [rax+0A68h] lea rdi, account_hash call lf_hash_delete mov rdi, [rbp+var_10]; this mov rax, [rbp+var_10] mov rdx, [rax+0A90h]; PFS_user * mov rax, [rbp+var_10] mov rcx, [rax+0A98h]; PFS_host * xor esi, esi; bool call _ZN11PFS_account9aggregateEbP8PFS_userP8PFS_host; PFS_account::aggregate(bool,PFS_user *,PFS_host *) mov rax, [rbp+var_10] cmp qword ptr [rax+0A90h], 0 jz short loc_5351C mov rax, [rbp+var_10] mov rdi, [rax+0A90h]; this call _ZN8PFS_user7releaseEv; PFS_user::release(void) mov rax, [rbp+var_10] mov qword ptr [rax+0A90h], 0 loc_5351C: mov rax, [rbp+var_10] cmp qword ptr [rax+0A98h], 0 jz short loc_53549 mov rax, [rbp+var_10] mov rdi, [rax+0A98h]; this call _ZN8PFS_host7releaseEv; PFS_host::release(void) mov rax, [rbp+var_10] mov qword ptr [rax+0A98h], 0 loc_53549: mov rsi, [rbp+var_10] lea rdi, global_account_container call _ZN29PFS_buffer_scalable_containerI11PFS_accountLi128ELi128E17PFS_account_array21PFS_account_allocatorE10deallocateEPS0_; PFS_buffer_scalable_container<PFS_account,128,128,PFS_account_array,PFS_account_allocator>::deallocate(PFS_account*) loc_53559: jmp short $+2 loc_5355B: jmp short $+2 loc_5355D: jmp short $+2 loc_5355F: jmp short $+2 loc_53561: mov rcx, [rbp+var_18] mov [rbp+var_28], 0 mov rax, [rbp+var_28] xchg rax, [rcx+10h] loc_53575: add rsp, 30h pop rbp retn
long long purge_account(PFS_thread *a1, PFS_user **a2) { long long result; // rax long long account_hash_pins; // [rsp+18h] [rbp-18h] account_hash_pins = get_account_hash_pins(a1); result = account_hash_pins == 0; if ( account_hash_pins ) { if ( (unsigned long long)lf_hash_search( &account_hash, account_hash_pins, (char *)a2 + 2020, *((unsigned int *)a2 + 666)) >= 2 && !(unsigned int)PFS_account::get_refcount((PFS_account *)a2) ) { lf_hash_delete(&account_hash, account_hash_pins, (char *)a2 + 2020, *((unsigned int *)a2 + 666)); PFS_account::aggregate((PFS_account *)a2, 0, a2[338], a2[339]); if ( a2[338] ) { PFS_user::release(a2[338]); a2[338] = 0LL; } if ( a2[339] ) { PFS_host::release(a2[339]); a2[339] = 0LL; } PFS_buffer_scalable_container<PFS_account,128,128,PFS_account_array,PFS_account_allocator>::deallocate( global_account_container, a2); } return _InterlockedExchange64((volatile long long *)(account_hash_pins + 16), 0LL); } return result; }
purge_account: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x8] CALL 0x00152a60 MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],0x0 SETZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x00153454 JMP 0x00153575 LAB_00153454: MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x10] ADD RDX,0x7e4 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0xa68] LEA RDI,[0x5104d0] CALL 0x0015fc80 MOV qword ptr [RBP + -0x20],RAX CMP qword ptr [RBP + -0x20],0x0 JZ 0x0015355b MOV EAX,0x1 CMP qword ptr [RBP + -0x20],RAX JZ 0x0015355b MOV RDI,qword ptr [RBP + -0x10] CALL 0x00153e40 CMP EAX,0x0 JNZ 0x00153559 MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x10] ADD RDX,0x7e4 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0xa68] LEA RDI,[0x5104d0] CALL 0x0015f260 MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0xa90] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0xa98] XOR ESI,ESI CALL 0x00152b90 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0xa90],0x0 JZ 0x0015351c MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0xa90] CALL 0x00146d70 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xa90],0x0 LAB_0015351c: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0xa98],0x0 JZ 0x00153549 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0xa98] CALL 0x00159100 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xa98],0x0 LAB_00153549: MOV RSI,qword ptr [RBP + -0x10] LEA RDI,[0x5069d8] CALL 0x00153ce0 LAB_00153559: JMP 0x0015355b LAB_0015355b: JMP 0x0015355d LAB_0015355d: JMP 0x0015355f LAB_0015355f: JMP 0x00153561 LAB_00153561: MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x28],0x0 MOV RAX,qword ptr [RBP + -0x28] XCHG qword ptr [RCX + 0x10],RAX LAB_00153575: ADD RSP,0x30 POP RBP RET
/* purge_account(PFS_thread*, PFS_account*) */ ulong purge_account(PFS_thread *param_1,PFS_account *param_2) { int iVar1; long lVar2; ulong uVar3; long lVar4; lVar2 = get_account_hash_pins(param_1); uVar3 = (ulong)(lVar2 == 0); if (lVar2 != 0) { lVar4 = lf_hash_search(account_hash,lVar2,param_2 + 0x7e4,*(int4 *)(param_2 + 0xa68)); if (((lVar4 != 0) && (lVar4 != 1)) && (iVar1 = PFS_account::get_refcount(param_2), iVar1 == 0)) { lf_hash_delete(account_hash,lVar2,param_2 + 0x7e4,*(int4 *)(param_2 + 0xa68)); PFS_account::aggregate (param_2,false,*(PFS_user **)(param_2 + 0xa90),*(PFS_host **)(param_2 + 0xa98)); if (*(long *)(param_2 + 0xa90) != 0) { PFS_user::release(*(PFS_user **)(param_2 + 0xa90)); *(int8 *)(param_2 + 0xa90) = 0; } if (*(long *)(param_2 + 0xa98) != 0) { PFS_host::release(*(PFS_host **)(param_2 + 0xa98)); *(int8 *)(param_2 + 0xa98) = 0; } PFS_buffer_scalable_container<PFS_account,128,128,PFS_account_array,PFS_account_allocator>:: deallocate((PFS_buffer_scalable_container<PFS_account,128,128,PFS_account_array,PFS_account_allocator> *)&global_account_container,param_2); } LOCK(); uVar3 = *(ulong *)(lVar2 + 0x10); *(ulong *)(lVar2 + 0x10) = 0; UNLOCK(); } return uVar3; }
45,309
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp)
monkey531[P]llama/common/json.hpp
static diyfp normalize(diyfp x) noexcept { JSON_ASSERT(x.f != 0); while ((x.f >> 63u) == 0) { x.f <<= 1u; x.e--; } return x; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp): pushq %rax testq %rdi, %rdi je 0xb7b51 js 0xb7b4a addq %rdi, %rdi decl %esi testq %rdi, %rdi jns 0xb7b40 movq %rdi, %rax movl %esi, %edx popq %rcx retq leaq 0x3608b(%rip), %rdi # 0xedbe3 leaq 0x305e1(%rip), %rdx # 0xe8140 leaq 0x3b83e(%rip), %rcx # 0xf33a4 movl $0x42a1, %esi # imm = 0x42A1 xorl %eax, %eax callq 0x1be80 movq %rax, %rdi callq 0x21ae5
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp9normalizeES3_: push rax test rdi, rdi jz short loc_B7B51 js short loc_B7B4A loc_B7B40: add rdi, rdi dec esi test rdi, rdi jns short loc_B7B40 loc_B7B4A: mov rax, rdi mov edx, esi pop rcx retn loc_B7B51: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aXF0; "x.f != 0" mov esi, 42A1h xor eax, eax call _ggml_abort mov rdi, rax call __clang_call_terminate
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(long long a1, int a2) { void *v3; // rax if ( !a1 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17057LL, "GGML_ASSERT(%s) failed", "x.f != 0"); _clang_call_terminate(v3); } for ( ; a1 >= 0; --a2 ) a1 *= 2LL; return a1; }
normalize: PUSH RAX TEST RDI,RDI JZ 0x001b7b51 JS 0x001b7b4a LAB_001b7b40: ADD RDI,RDI DEC ESI TEST RDI,RDI JNS 0x001b7b40 LAB_001b7b4a: MOV RAX,RDI MOV EDX,ESI POP RCX RET LAB_001b7b51: LEA RDI,[0x1edbe3] LEA RDX,[0x1e8140] LEA RCX,[0x1f33a4] MOV ESI,0x42a1 XOR EAX,EAX CALL 0x0011be80
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) */ int1 [16] __thiscall nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(diyfp *this,int param_2) { int1 auVar1 [16]; if (this != (diyfp *)0x0) { if (-1 < (long)this) { do { this = (diyfp *)((long)this * 2); param_2 = param_2 + -1; } while (-1 < (long)this); } auVar1._8_4_ = param_2; auVar1._0_8_ = this; auVar1._12_4_ = 0; return auVar1; } /* try { // try from 001b7b51 to 001b7b71 has its CatchHandler @ 001b7b72 */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x42a1, "GGML_ASSERT(%s) failed","x.f != 0"); }
45,310
stbi_info_from_memory
llama.cpp/examples/llava/../../common/stb_image.h
STBIDEF int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp) { stbi__context s; stbi__start_mem(&s,buffer,len); return stbi__info_main(&s,x,y,comp); }
O3
c
stbi_info_from_memory: subq $0xe8, %rsp leaq 0x8(%rsp), %rax movq $0x0, 0x10(%rax) xorl %r9d, %r9d movl %r9d, 0x30(%rax) movl %r9d, 0xb8(%rax) movq %rdi, 0xd0(%rax) movq %rdi, 0xc0(%rax) movslq %esi, %rsi addq %rdi, %rsi movq %rsi, 0xd8(%rax) movq %rsi, 0xc8(%rax) movq %rax, %rdi movq %rdx, %rsi movq %rcx, %rdx movq %r8, %rcx callq 0x1a5bd addq $0xe8, %rsp retq
stbi_info_from_memory: sub rsp, 0E8h lea rax, [rsp+0E8h+var_E0] mov qword ptr [rax+10h], 0 xor r9d, r9d mov [rax+30h], r9d mov [rax+0B8h], r9d mov [rax+0D0h], rdi mov [rax+0C0h], rdi movsxd rsi, esi add rsi, rdi mov [rax+0D8h], rsi mov [rax+0C8h], rsi mov rdi, rax mov rsi, rdx mov rdx, rcx mov rcx, r8 call _ZL15stbi__info_mainP13stbi__contextPiS1_S1_; stbi__info_main(stbi__context *,int *,int *,int *) add rsp, 0E8h retn
long long stbi_info_from_memory(long long a1, int a2, _DWORD *a3, _DWORD *a4, _DWORD *a5) { _BYTE v6[16]; // [rsp+8h] [rbp-E0h] BYREF long long v7; // [rsp+18h] [rbp-D0h] int v8; // [rsp+38h] [rbp-B0h] int v9; // [rsp+C0h] [rbp-28h] long long v10; // [rsp+C8h] [rbp-20h] long long v11; // [rsp+D0h] [rbp-18h] long long v12; // [rsp+D8h] [rbp-10h] long long v13; // [rsp+E0h] [rbp-8h] v7 = 0LL; v8 = 0; v9 = 0; v12 = a1; v10 = a1; v13 = a1 + a2; v11 = v13; return stbi__info_main((long long)v6, a3, a4, a5); }
stbi_info_from_memory: SUB RSP,0xe8 LEA RAX,[RSP + 0x8] MOV qword ptr [RAX + 0x10],0x0 XOR R9D,R9D MOV dword ptr [RAX + 0x30],R9D MOV dword ptr [RAX + 0xb8],R9D MOV qword ptr [RAX + 0xd0],RDI MOV qword ptr [RAX + 0xc0],RDI MOVSXD RSI,ESI ADD RSI,RDI MOV qword ptr [RAX + 0xd8],RSI MOV qword ptr [RAX + 0xc8],RSI MOV RDI,RAX MOV RSI,RDX MOV RDX,RCX MOV RCX,R8 CALL 0x0011a5bd ADD RSP,0xe8 RET
void stbi_info_from_memory(long param_1,int param_2,int *param_3,int *param_4,int *param_5) { stbi__context local_e0 [16]; int8 local_d0; int4 local_b0; int4 local_28; long local_20; long local_18; long local_10; long local_8; local_d0 = 0; local_b0 = 0; local_28 = 0; local_18 = param_2 + param_1; local_20 = param_1; local_10 = param_1; local_8 = local_18; stbi__info_main(local_e0,param_3,param_4,param_5); return; }
45,311
mj_freeStack
aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_io.c
void mj__freeStack(mjData* d) #endif { if (!d->threadpool) { mjStackInfo stack_info = get_stack_info_from_data(d); freestackinternal(&stack_info); d->pstack = stack_info.bottom - stack_info.top; d->pbase = stack_info.stack_base; return; } size_t thread_id = mju_threadPoolCurrentWorkerId((mjThreadPool*)d->threadpool); mjStackInfo* stack_info = mju_getStackInfoForThread(d, thread_id); freestackinternal(stack_info); }
O0
c
mj_freeStack: subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq 0x30(%rsp), %rax cmpq $0x0, 0x27b90(%rax) jne 0xe1084 movq 0x30(%rsp), %rsi leaq 0x10(%rsp), %rdi callq 0xe0f60 leaq 0x10(%rsp), %rdi callq 0xe10c0 movq 0x10(%rsp), %rcx subq 0x18(%rsp), %rcx movq 0x30(%rsp), %rax movq %rcx, 0x18(%rax) movq 0x28(%rsp), %rcx movq 0x30(%rsp), %rax movq %rcx, 0x20(%rax) jmp 0xe10b6 movq 0x30(%rsp), %rax movq 0x27b90(%rax), %rdi callq 0x4a000 movq %rax, 0x8(%rsp) movq 0x30(%rsp), %rdi movq 0x8(%rsp), %rsi callq 0x48a710 movq %rax, (%rsp) movq (%rsp), %rdi callq 0xe10c0 addq $0x38, %rsp retq nopl (%rax,%rax)
mj_freeStack: sub rsp, 38h mov [rsp+38h+var_8], rdi mov rax, [rsp+38h+var_8] cmp qword ptr [rax+27B90h], 0 jnz short loc_E1084 mov rsi, [rsp+38h+var_8] lea rdi, [rsp+38h+var_28] call get_stack_info_from_data lea rdi, [rsp+38h+var_28] call freestackinternal mov rcx, [rsp+38h+var_28] sub rcx, [rsp+38h+var_20] mov rax, [rsp+38h+var_8] mov [rax+18h], rcx mov rcx, [rsp+38h+var_10] mov rax, [rsp+38h+var_8] mov [rax+20h], rcx jmp short loc_E10B6 loc_E1084: mov rax, [rsp+38h+var_8] mov rdi, [rax+27B90h] call _mju_threadPoolCurrentWorkerId mov [rsp+38h+var_30], rax mov rdi, [rsp+38h+var_8] mov rsi, [rsp+38h+var_30] call mju_getStackInfoForThread mov [rsp+38h+var_38], rax mov rdi, [rsp+38h+var_38] call freestackinternal loc_E10B6: add rsp, 38h retn
_QWORD * mj_freeStack(_QWORD *a1) { _QWORD *result; // rax long long v2; // rsi long long StackInfoForThread; // [rsp+0h] [rbp-38h] _QWORD v4[4]; // [rsp+10h] [rbp-28h] BYREF _QWORD *v5; // [rsp+30h] [rbp-8h] v5 = a1; if ( a1[20338] ) { v2 = mju_threadPoolCurrentWorkerId(v5[20338]); StackInfoForThread = mju_getStackInfoForThread(v5, v2); return (_QWORD *)freestackinternal(StackInfoForThread); } else { get_stack_info_from_data(v4, v5); freestackinternal(v4); v5[3] = v4[0] - v4[1]; result = v5; v5[4] = v4[3]; } return result; }
mj_freeStack: SUB RSP,0x38 MOV qword ptr [RSP + 0x30],RDI MOV RAX,qword ptr [RSP + 0x30] CMP qword ptr [RAX + 0x27b90],0x0 JNZ 0x001e1084 MOV RSI,qword ptr [RSP + 0x30] LEA RDI,[RSP + 0x10] CALL 0x001e0f60 LEA RDI,[RSP + 0x10] CALL 0x001e10c0 MOV RCX,qword ptr [RSP + 0x10] SUB RCX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x18],RCX MOV RCX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x20],RCX JMP 0x001e10b6 LAB_001e1084: MOV RAX,qword ptr [RSP + 0x30] MOV RDI,qword ptr [RAX + 0x27b90] CALL 0x0014a000 MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x8] CALL 0x0058a710 MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP] CALL 0x001e10c0 LAB_001e10b6: ADD RSP,0x38 RET
void mj_freeStack(long param_1) { int8 uVar1; long local_28; long local_20; int8 local_10; long local_8; local_8 = param_1; if (*(long *)(param_1 + 0x27b90) == 0) { get_stack_info_from_data(&local_28,param_1); freestackinternal(&local_28); *(long *)(local_8 + 0x18) = local_28 - local_20; *(int8 *)(local_8 + 0x20) = local_10; } else { uVar1 = mju_threadPoolCurrentWorkerId(*(int8 *)(param_1 + 0x27b90)); uVar1 = mju_getStackInfoForThread(local_8,uVar1); freestackinternal(uVar1); } return; }
45,312
mi_dynmap_file
eloqsql/storage/myisam/mi_dynrec.c
my_bool mi_dynmap_file(MI_INFO *info, my_off_t size) { DBUG_ENTER("mi_dynmap_file"); if (size == 0 || size > (my_off_t) (~((size_t) 0))) { if (size) DBUG_PRINT("warning", ("File is too large for mmap")); else DBUG_PRINT("warning", ("Do not mmap zero-length")); DBUG_RETURN(1); } /* I wonder if it is good to use MAP_NORESERVE. From the Linux man page: MAP_NORESERVE Do not reserve swap space for this mapping. When swap space is reserved, one has the guarantee that it is possible to modify the mapping. When swap space is not reserved one might get SIGSEGV upon a write if no physical memory is available. */ info->s->file_map= (uchar*) my_mmap(0, (size_t) size, info->s->mode==O_RDONLY ? PROT_READ : PROT_READ | PROT_WRITE, MAP_SHARED | MAP_NORESERVE, info->dfile, 0L); if (info->s->file_map == (uchar*) MAP_FAILED) { info->s->file_map= NULL; DBUG_RETURN(1); } #if defined(HAVE_MADVISE) madvise((char*) info->s->file_map, size, MADV_RANDOM); #endif info->s->mmaped_length= (size_t) size; info->s->file_read= mi_mmap_pread; info->s->file_write= mi_mmap_pwrite; DBUG_RETURN(0); }
O0
c
mi_dynmap_file: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0xa660e cmpq $-0x1, -0x18(%rbp) jbe 0xa662c cmpq $0x0, -0x18(%rbp) je 0xa661b jmp 0xa6617 jmp 0xa6619 jmp 0xa6621 jmp 0xa661d jmp 0xa661f jmp 0xa6621 jmp 0xa6623 movb $0x1, -0x1(%rbp) jmp 0xa6706 movq -0x18(%rbp), %rsi movq -0x10(%rbp), %rax movq (%rax), %rax movl 0x358(%rax), %ecx movl $0x3, %edx movl $0x1, %eax cmpl $0x0, %ecx cmovel %eax, %edx movq -0x10(%rbp), %rax movl 0x1c0(%rax), %r8d xorl %eax, %eax movl %eax, %r9d movl $0x4001, %ecx # imm = 0x4001 movq %r9, %rdi callq 0x2a590 movq %rax, %rcx movq -0x10(%rbp), %rax movq (%rax), %rax movq %rcx, 0x270(%rax) movq -0x10(%rbp), %rax movq (%rax), %rax movq $-0x1, %rcx cmpq %rcx, 0x270(%rax) jne 0xa66aa movq -0x10(%rbp), %rax movq (%rax), %rax movq $0x0, 0x270(%rax) movb $0x1, -0x1(%rbp) jmp 0xa6706 movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x270(%rax), %rdi movq -0x18(%rbp), %rsi movl $0x1, %edx callq 0x2a450 movq -0x18(%rbp), %rcx movq -0x10(%rbp), %rax movq (%rax), %rax movq %rcx, 0x4d0(%rax) movq -0x10(%rbp), %rax movq (%rax), %rax leaq 0x2a(%rip), %rcx # 0xa6710 movq %rcx, 0x2e0(%rax) movq -0x10(%rbp), %rax movq (%rax), %rax leaq 0x135(%rip), %rcx # 0xa6830 movq %rcx, 0x2e8(%rax) movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nop
mi_dynmap_file: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi cmp [rbp+var_18], 0 jz short loc_A660E cmp [rbp+var_18], 0FFFFFFFFFFFFFFFFh jbe short loc_A662C loc_A660E: cmp [rbp+var_18], 0 jz short loc_A661B jmp short $+2 loc_A6617: jmp short $+2 loc_A6619: jmp short loc_A6621 loc_A661B: jmp short $+2 loc_A661D: jmp short $+2 loc_A661F: jmp short $+2 loc_A6621: jmp short $+2 loc_A6623: mov [rbp+var_1], 1 jmp loc_A6706 loc_A662C: mov rsi, [rbp+var_18] mov rax, [rbp+var_10] mov rax, [rax] mov ecx, [rax+358h] mov edx, 3 mov eax, 1 cmp ecx, 0 cmovz edx, eax mov rax, [rbp+var_10] mov r8d, [rax+1C0h] xor eax, eax mov r9d, eax mov ecx, 4001h mov rdi, r9 call _mmap64 mov rcx, rax mov rax, [rbp+var_10] mov rax, [rax] mov [rax+270h], rcx mov rax, [rbp+var_10] mov rax, [rax] mov rcx, 0FFFFFFFFFFFFFFFFh cmp [rax+270h], rcx jnz short loc_A66AA mov rax, [rbp+var_10] mov rax, [rax] mov qword ptr [rax+270h], 0 mov [rbp+var_1], 1 jmp short loc_A6706 loc_A66AA: mov rax, [rbp+var_10] mov rax, [rax] mov rdi, [rax+270h] mov rsi, [rbp+var_18] mov edx, 1 call _madvise mov rcx, [rbp+var_18] mov rax, [rbp+var_10] mov rax, [rax] mov [rax+4D0h], rcx mov rax, [rbp+var_10] mov rax, [rax] lea rcx, mi_mmap_pread mov [rax+2E0h], rcx mov rax, [rbp+var_10] mov rax, [rax] lea rcx, mi_mmap_pwrite mov [rax+2E8h], rcx mov [rbp+var_1], 0 loc_A6706: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char mi_dynmap_file(unsigned int *a1, long long a2) { long long v2; // rdx if ( !a2 ) return 1; v2 = 3LL; if ( !*(_DWORD *)(*(_QWORD *)a1 + 856LL) ) v2 = 1LL; *(_QWORD *)(*(_QWORD *)a1 + 624LL) = mmap64(0LL, a2, v2, 16385LL, a1[112]); if ( *(_QWORD *)(*(_QWORD *)a1 + 624LL) == -1LL ) { *(_QWORD *)(*(_QWORD *)a1 + 624LL) = 0LL; return 1; } else { madvise(*(_QWORD *)(*(_QWORD *)a1 + 624LL), a2, 1LL); *(_QWORD *)(*(_QWORD *)a1 + 1232LL) = a2; *(_QWORD *)(*(_QWORD *)a1 + 736LL) = mi_mmap_pread; *(_QWORD *)(*(_QWORD *)a1 + 744LL) = mi_mmap_pwrite; return 0; } }
mi_dynmap_file: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI CMP qword ptr [RBP + -0x18],0x0 JZ 0x001a660e CMP qword ptr [RBP + -0x18],-0x1 JBE 0x001a662c LAB_001a660e: CMP qword ptr [RBP + -0x18],0x0 JZ 0x001a661b JMP 0x001a6617 LAB_001a6617: JMP 0x001a6619 LAB_001a6619: JMP 0x001a6621 LAB_001a661b: JMP 0x001a661d LAB_001a661d: JMP 0x001a661f LAB_001a661f: JMP 0x001a6621 LAB_001a6621: JMP 0x001a6623 LAB_001a6623: MOV byte ptr [RBP + -0x1],0x1 JMP 0x001a6706 LAB_001a662c: MOV RSI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RAX + 0x358] MOV EDX,0x3 MOV EAX,0x1 CMP ECX,0x0 CMOVZ EDX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV R8D,dword ptr [RAX + 0x1c0] XOR EAX,EAX MOV R9D,EAX MOV ECX,0x4001 MOV RDI,R9 CALL 0x0012a590 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x270],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RCX,-0x1 CMP qword ptr [RAX + 0x270],RCX JNZ 0x001a66aa MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x270],0x0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001a6706 LAB_001a66aa: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + 0x270] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,0x1 CALL 0x0012a450 MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x4d0],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] LEA RCX,[0x1a6710] MOV qword ptr [RAX + 0x2e0],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] LEA RCX,[0x1a6830] MOV qword ptr [RAX + 0x2e8],RCX MOV byte ptr [RBP + -0x1],0x0 LAB_001a6706: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
/* WARNING: Removing unreachable block (ram,0x001a6615) */ int1 mi_dynmap_file(long *param_1,size_t param_2) { void *pvVar1; int __prot; int1 local_9; if (param_2 == 0) { local_9 = 1; } else { __prot = 3; if (*(int *)(*param_1 + 0x358) == 0) { __prot = 1; } pvVar1 = mmap64((void *)0x0,param_2,__prot,0x4001,(int)param_1[0x38],0); *(void **)(*param_1 + 0x270) = pvVar1; if (*(long *)(*param_1 + 0x270) == -1) { *(int8 *)(*param_1 + 0x270) = 0; local_9 = 1; } else { madvise(*(void **)(*param_1 + 0x270),param_2,1); *(size_t *)(*param_1 + 0x4d0) = param_2; *(code **)(*param_1 + 0x2e0) = mi_mmap_pread; *(code **)(*param_1 + 0x2e8) = mi_mmap_pwrite; local_9 = 0; } } return local_9; }
45,313
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 0xe0307 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 0xe02fd 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 0xe0190 cmpl $0x0, %eax jne 0xe02f0 movl -0x34(%rbp), %ecx movq -0x28(%rbp), %rax movl %ecx, (%rax) movq -0x30(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x8(%rbp) jmp 0xe030f jmp 0xe02f2 movq -0x30(%rbp), %rax movl (%rax), %eax movl %eax, -0x34(%rbp) jmp 0xe02a7 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_E0307 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_E02A7: cmp [rbp+var_34], 0FFFFFFFFh jz short loc_E02FD 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_E02F0 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_E030F loc_E02F0: jmp short $+2 loc_E02F2: mov rax, [rbp+var_30] mov eax, [rax] mov [rbp+var_34], eax jmp short loc_E02A7 loc_E02FD: mov rax, [rbp+var_28] mov dword ptr [rax], 0FFFFFFFFh loc_E0307: mov [rbp+var_8], 0 loc_E030F: 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 0x001e0307 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_001e02a7: CMP dword ptr [RBP + -0x34],-0x1 JZ 0x001e02fd 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 0x001e0190 CMP EAX,0x0 JNZ 0x001e02f0 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 0x001e030f LAB_001e02f0: JMP 0x001e02f2 LAB_001e02f2: MOV RAX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x34],EAX JMP 0x001e02a7 LAB_001e02fd: MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX],0xffffffff LAB_001e0307: MOV qword ptr [RBP + -0x8],0x0 LAB_001e030f: 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; }
45,314
mysql_stmt_prepare
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, unsigned long length) { MYSQL *mysql= stmt->mysql; int rc= 1; my_bool is_multi= 0; if (!stmt->mysql) { SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); return(1); } if (length == (unsigned long) -1) length= (unsigned long)strlen(query); /* clear flags */ CLEAR_CLIENT_STMT_ERROR(stmt); CLEAR_CLIENT_ERROR(stmt->mysql); stmt->upsert_status.affected_rows= mysql->affected_rows= (unsigned long long) ~0; /* check if we have to clear results */ if (stmt->state > MYSQL_STMT_INITTED) { char stmt_id[STMT_ID_LENGTH]; is_multi= (mysql->net.extension->multi_status > COM_MULTI_OFF); /* We need to semi-close the prepared statement: reset stmt and free all buffers and close the statement on server side. Statement handle will get a new stmt_id */ if (!is_multi) ma_multi_command(mysql, COM_MULTI_ENABLED); if (mysql_stmt_internal_reset(stmt, 1)) goto fail; ma_free_root(&stmt->mem_root, MYF(MY_KEEP_PREALLOC)); ma_free_root(&((MADB_STMT_EXTENSION *)stmt->extension)->fields_ma_alloc_root, MYF(0)); stmt->param_count= 0; stmt->field_count= 0; stmt->fields= NULL; stmt->params= NULL; int4store(stmt_id, stmt->stmt_id); if (mysql->methods->db_command(mysql, COM_STMT_CLOSE, stmt_id, sizeof(stmt_id), 1, stmt)) goto fail; } if (mysql->methods->db_command(mysql, COM_STMT_PREPARE, query, length, 1, stmt)) goto fail; if (!is_multi && mysql->net.extension->multi_status == COM_MULTI_ENABLED) if (ma_multi_command(mysql, COM_MULTI_END)) goto fail; if (mysql->net.extension->multi_status > COM_MULTI_OFF || mysql->options.extension->skip_read_response) return 0; if (mysql->methods->db_read_prepare_response && mysql->methods->db_read_prepare_response(stmt)) goto fail; return(0); fail: stmt->state= MYSQL_STMT_INITTED; UPDATE_STMT_ERROR(stmt); return(rc); }
O3
c
mysql_stmt_prepare: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq 0x38(%rdi), %r14 testq %r14, %r14 je 0x259e4 movq %rdx, %r12 movq %rsi, %r15 cmpq $-0x1, %rdx jne 0x258dd movq %r15, %rdi callq 0x131c0 movq %rax, %r12 xorl %eax, %eax movl %eax, 0x108(%rbx) movl $0x30303030, %ecx # imm = 0x30303030 movl %ecx, 0x30d(%rbx) movw $0x30, %dx movw %dx, 0x311(%rbx) movb %al, 0x10c(%rbx) movl %eax, 0x90(%r14) movq 0x38(%rbx), %rsi movw %dx, 0x29b(%rsi) movl %ecx, 0x297(%rsi) movq 0x38(%rbx), %rcx movb %al, 0x97(%rcx) movq 0x38(%rbx), %rax movq 0x2a0(%rax), %rax testq %rax, %rax je 0x2593a movl $0x0, 0x4(%rax) movq $-0x1, %rax movq %rax, 0x338(%r14) movq %rax, 0xf8(%rbx) cmpl $0x0, 0x50(%rbx) je 0x25a29 movq 0x2a0(%r14), %rax cmpl $0x0, (%rax) sete %r13b jne 0x25976 movq %r14, %rdi movl $0x2, %esi callq 0x1a945 movq %rbx, %rdi movl $0x1, %esi callq 0x245ec testb %al, %al jne 0x25a55 movq %rbx, %rdi movl $0x1, %esi callq 0x22757 movq 0x340(%rbx), %rdi xorl %esi, %esi callq 0x22757 movq $0x0, 0x70(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x58(%rbx) movl 0x40(%rbx), %eax leaq -0x34(%rbp), %rdx movl %eax, (%rdx) movq 0x4d0(%r14), %rax movl $0x4, %ecx movq %r14, %rdi movl $0x19, %esi movl $0x1, %r8d movq %rbx, %r9 callq *0x10(%rax) testl %eax, %eax jne 0x25a55 jmp 0x25a2c movl $0x7dd, 0x108(%rbx) # imm = 0x7DD leaq 0x30d(%rbx), %rdi leaq 0x2a604(%rip), %rax # 0x50000 movq (%rax), %rsi movl $0x5, %edx callq 0x13230 movb $0x0, 0x312(%rbx) leaq 0x10c(%rbx), %rdi leaq 0x2a5f2(%rip), %rax # 0x50010 movq 0x68(%rax), %rsi movl $0x200, %edx # imm = 0x200 jmp 0x25aa3 movb $0x1, %r13b movq 0x4d0(%r14), %rax movq %r14, %rdi movl $0x16, %esi movq %r15, %rdx movq %r12, %rcx movl $0x1, %r8d movq %rbx, %r9 callq *0x10(%rax) testl %eax, %eax je 0x25ad6 leaq 0x30d(%rbx), %rdi leaq 0x10c(%rbx), %r14 movl $0x0, 0x50(%rbx) movq 0x38(%rbx), %rsi movl 0x90(%rsi), %eax movl %eax, 0x108(%rbx) addq $0x297, %rsi # imm = 0x297 movl $0x5, %edx callq 0x13230 movb $0x0, 0x312(%rbx) movl $0x97, %esi addq 0x38(%rbx), %rsi movl $0x200, %edx # imm = 0x200 movq %r14, %rdi callq 0x13230 movb $0x0, 0x30b(%rbx) movl $0x1, %r15d movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x25b3d movl %r15d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq testb %r13b, %r13b je 0x25afc movq 0x2a0(%r14), %rax cmpl $0x2, (%rax) jne 0x25afc movq %r14, %rdi movl $0x4, %esi callq 0x1a945 testl %eax, %eax jne 0x25a55 movq 0x2a0(%r14), %rax xorl %r15d, %r15d cmpl $0x0, (%rax) jne 0x25ab5 movq 0x480(%r14), %rax cmpb $0x0, 0x148(%rax) jne 0x25ab5 movq 0x4d0(%r14), %rax movq 0x40(%rax), %rax testq %rax, %rax je 0x25ab5 movq %rbx, %rdi callq *%rax testb %al, %al jne 0x25a55 jmp 0x25ab5 callq 0x13510
mysql_stmt_prepare: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax mov r14, [rdi+38h] test r14, r14 jz loc_259E4 mov r12, rdx mov r15, rsi cmp rdx, 0FFFFFFFFFFFFFFFFh jnz short loc_258DD mov rdi, r15 call _strlen mov r12, rax loc_258DD: xor eax, eax mov [rbx+108h], eax mov ecx, 30303030h mov [rbx+30Dh], ecx mov dx, 30h ; '0' mov [rbx+311h], dx mov [rbx+10Ch], al mov [r14+90h], eax mov rsi, [rbx+38h] mov [rsi+29Bh], dx mov [rsi+297h], ecx mov rcx, [rbx+38h] mov [rcx+97h], al mov rax, [rbx+38h] mov rax, [rax+2A0h] test rax, rax jz short loc_2593A mov dword ptr [rax+4], 0 loc_2593A: mov rax, 0FFFFFFFFFFFFFFFFh mov [r14+338h], rax mov [rbx+0F8h], rax cmp dword ptr [rbx+50h], 0 jz loc_25A29 mov rax, [r14+2A0h] cmp dword ptr [rax], 0 setz r13b jnz short loc_25976 mov rdi, r14 mov esi, 2 call ma_multi_command loc_25976: mov rdi, rbx mov esi, 1 call mysql_stmt_internal_reset test al, al jnz loc_25A55 mov rdi, rbx mov esi, 1 call ma_free_root mov rdi, [rbx+340h] xor esi, esi call ma_free_root mov qword ptr [rbx+70h], 0 xorps xmm0, xmm0 movups xmmword ptr [rbx+58h], xmm0 mov eax, [rbx+40h] lea rdx, [rbp+var_34] mov [rdx], eax mov rax, [r14+4D0h] mov ecx, 4 mov rdi, r14 mov esi, 19h mov r8d, 1 mov r9, rbx call qword ptr [rax+10h] test eax, eax jnz short loc_25A55 jmp short loc_25A2C loc_259E4: mov dword ptr [rbx+108h], 7DDh lea rdi, [rbx+30Dh] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov byte ptr [rbx+312h], 0 lea rdi, [rbx+10Ch] lea rax, client_errors mov rsi, [rax+68h] mov edx, 200h jmp short loc_25AA3 loc_25A29: mov r13b, 1 loc_25A2C: mov rax, [r14+4D0h] mov rdi, r14 mov esi, 16h mov rdx, r15 mov rcx, r12 mov r8d, 1 mov r9, rbx call qword ptr [rax+10h] test eax, eax jz loc_25AD6 loc_25A55: lea rdi, [rbx+30Dh] lea r14, [rbx+10Ch] mov dword ptr [rbx+50h], 0 mov rsi, [rbx+38h] mov eax, [rsi+90h] mov [rbx+108h], eax add rsi, 297h mov edx, 5 call _strncpy mov byte ptr [rbx+312h], 0 mov esi, 97h add rsi, [rbx+38h] mov edx, 200h mov rdi, r14 loc_25AA3: call _strncpy mov byte ptr [rbx+30Bh], 0 mov r15d, 1 loc_25AB5: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_25B3D mov eax, r15d add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_25AD6: test r13b, r13b jz short loc_25AFC mov rax, [r14+2A0h] cmp dword ptr [rax], 2 jnz short loc_25AFC mov rdi, r14 mov esi, 4 call ma_multi_command test eax, eax jnz loc_25A55 loc_25AFC: mov rax, [r14+2A0h] xor r15d, r15d cmp dword ptr [rax], 0 jnz short loc_25AB5 mov rax, [r14+480h] cmp byte ptr [rax+148h], 0 jnz short loc_25AB5 mov rax, [r14+4D0h] mov rax, [rax+40h] test rax, rax jz short loc_25AB5 mov rdi, rbx call rax test al, al jnz loc_25A55 jmp loc_25AB5 loc_25B3D: call ___stack_chk_fail
long long mysql_stmt_prepare(long long a1, long long a2, long long a3) { long long v4; // r14 long long v5; // r12 long long v6; // rax _DWORD *v7; // rax bool v8; // r13 long long v9; // rdi char *v10; // rsi long long v11; // rsi unsigned int v12; // r15d unsigned __int8 ( *v14)(long long); // rax int v15; // [rsp+Ch] [rbp-34h] BYREF unsigned long long v16; // [rsp+10h] [rbp-30h] v16 = __readfsqword(0x28u); v4 = *(_QWORD *)(a1 + 56); if ( !v4 ) { *(_DWORD *)(a1 + 264) = 2013; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; v9 = a1 + 268; v10 = client_errors[13]; LABEL_16: strncpy(v9, v10, 512LL); *(_BYTE *)(a1 + 779) = 0; return 1; } v5 = a3; if ( a3 == -1 ) v5 = strlen(a2); *(_DWORD *)(a1 + 264) = 0; strcpy((char *)(a1 + 781), "00000"); *(_BYTE *)(a1 + 268) = 0; *(_DWORD *)(v4 + 144) = 0; strcpy((char *)(*(_QWORD *)(a1 + 56) + 663LL), "00000"); *(_BYTE *)(*(_QWORD *)(a1 + 56) + 151LL) = 0; v6 = *(_QWORD *)(*(_QWORD *)(a1 + 56) + 672LL); if ( v6 ) *(_DWORD *)(v6 + 4) = 0; *(_QWORD *)(v4 + 824) = -1LL; *(_QWORD *)(a1 + 248) = -1LL; if ( *(_DWORD *)(a1 + 80) ) { v7 = *(_DWORD **)(v4 + 672); v8 = *v7 == 0; if ( !*v7 ) ma_multi_command(v4, 2); if ( (unsigned __int8)mysql_stmt_internal_reset(a1, 1) ) goto LABEL_15; ma_free_root(a1, 1); ma_free_root(*(_QWORD *)(a1 + 832), 0); *(_QWORD *)(a1 + 112) = 0LL; *(_OWORD *)(a1 + 88) = 0LL; v15 = *(_DWORD *)(a1 + 64); if ( (*(unsigned int ( **)(long long, long long, int *, long long, long long, long long))(*(_QWORD *)(v4 + 1232) + 16LL))( v4, 25LL, &v15, 4LL, 1LL, a1) ) { goto LABEL_15; } } else { v8 = 1; } if ( (*(unsigned int ( **)(long long, long long, long long, long long, long long, long long))(*(_QWORD *)(v4 + 1232) + 16LL))( v4, 22LL, a2, v5, 1LL, a1) || v8 && **(_DWORD **)(v4 + 672) == 2 && (unsigned int)ma_multi_command(v4, 4) || (v12 = 0, !**(_DWORD **)(v4 + 672)) && !*(_BYTE *)(*(_QWORD *)(v4 + 1152) + 328LL) && (v14 = *(unsigned __int8 ( **)(long long))(*(_QWORD *)(v4 + 1232) + 64LL)) != 0LL && v14(a1) ) { LABEL_15: *(_DWORD *)(a1 + 80) = 0; v11 = *(_QWORD *)(a1 + 56); *(_DWORD *)(a1 + 264) = *(_DWORD *)(v11 + 144); strncpy(a1 + 781, v11 + 663, 5LL); *(_BYTE *)(a1 + 786) = 0; v10 = (char *)(*(_QWORD *)(a1 + 56) + 151LL); v9 = a1 + 268; goto LABEL_16; } return v12; }
mysql_stmt_prepare: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV R14,qword ptr [RDI + 0x38] TEST R14,R14 JZ 0x001259e4 MOV R12,RDX MOV R15,RSI CMP RDX,-0x1 JNZ 0x001258dd MOV RDI,R15 CALL 0x001131c0 MOV R12,RAX LAB_001258dd: XOR EAX,EAX MOV dword ptr [RBX + 0x108],EAX MOV ECX,0x30303030 MOV dword ptr [RBX + 0x30d],ECX MOV DX,0x30 MOV word ptr [RBX + 0x311],DX MOV byte ptr [RBX + 0x10c],AL MOV dword ptr [R14 + 0x90],EAX MOV RSI,qword ptr [RBX + 0x38] MOV word ptr [RSI + 0x29b],DX MOV dword ptr [RSI + 0x297],ECX MOV RCX,qword ptr [RBX + 0x38] MOV byte ptr [RCX + 0x97],AL MOV RAX,qword ptr [RBX + 0x38] MOV RAX,qword ptr [RAX + 0x2a0] TEST RAX,RAX JZ 0x0012593a MOV dword ptr [RAX + 0x4],0x0 LAB_0012593a: MOV RAX,-0x1 MOV qword ptr [R14 + 0x338],RAX MOV qword ptr [RBX + 0xf8],RAX CMP dword ptr [RBX + 0x50],0x0 JZ 0x00125a29 MOV RAX,qword ptr [R14 + 0x2a0] CMP dword ptr [RAX],0x0 SETZ R13B JNZ 0x00125976 MOV RDI,R14 MOV ESI,0x2 CALL 0x0011a945 LAB_00125976: MOV RDI,RBX MOV ESI,0x1 CALL 0x001245ec TEST AL,AL JNZ 0x00125a55 MOV RDI,RBX MOV ESI,0x1 CALL 0x00122757 MOV RDI,qword ptr [RBX + 0x340] XOR ESI,ESI CALL 0x00122757 MOV qword ptr [RBX + 0x70],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x58],XMM0 MOV EAX,dword ptr [RBX + 0x40] LEA RDX,[RBP + -0x34] MOV dword ptr [RDX],EAX MOV RAX,qword ptr [R14 + 0x4d0] MOV ECX,0x4 MOV RDI,R14 MOV ESI,0x19 MOV R8D,0x1 MOV R9,RBX CALL qword ptr [RAX + 0x10] TEST EAX,EAX JNZ 0x00125a55 JMP 0x00125a2c LAB_001259e4: MOV dword ptr [RBX + 0x108],0x7dd LEA RDI,[RBX + 0x30d] LEA RAX,[0x150000] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113230 MOV byte ptr [RBX + 0x312],0x0 LEA RDI,[RBX + 0x10c] LEA RAX,[0x150010] MOV RSI,qword ptr [RAX + 0x68] MOV EDX,0x200 JMP 0x00125aa3 LAB_00125a29: MOV R13B,0x1 LAB_00125a2c: MOV RAX,qword ptr [R14 + 0x4d0] MOV RDI,R14 MOV ESI,0x16 MOV RDX,R15 MOV RCX,R12 MOV R8D,0x1 MOV R9,RBX CALL qword ptr [RAX + 0x10] TEST EAX,EAX JZ 0x00125ad6 LAB_00125a55: LEA RDI,[RBX + 0x30d] LEA R14,[RBX + 0x10c] MOV dword ptr [RBX + 0x50],0x0 MOV RSI,qword ptr [RBX + 0x38] MOV EAX,dword ptr [RSI + 0x90] MOV dword ptr [RBX + 0x108],EAX ADD RSI,0x297 MOV EDX,0x5 CALL 0x00113230 MOV byte ptr [RBX + 0x312],0x0 MOV ESI,0x97 ADD RSI,qword ptr [RBX + 0x38] MOV EDX,0x200 MOV RDI,R14 LAB_00125aa3: CALL 0x00113230 MOV byte ptr [RBX + 0x30b],0x0 MOV R15D,0x1 LAB_00125ab5: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00125b3d MOV EAX,R15D ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00125ad6: TEST R13B,R13B JZ 0x00125afc MOV RAX,qword ptr [R14 + 0x2a0] CMP dword ptr [RAX],0x2 JNZ 0x00125afc MOV RDI,R14 MOV ESI,0x4 CALL 0x0011a945 TEST EAX,EAX JNZ 0x00125a55 LAB_00125afc: MOV RAX,qword ptr [R14 + 0x2a0] XOR R15D,R15D CMP dword ptr [RAX],0x0 JNZ 0x00125ab5 MOV RAX,qword ptr [R14 + 0x480] CMP byte ptr [RAX + 0x148],0x0 JNZ 0x00125ab5 MOV RAX,qword ptr [R14 + 0x4d0] MOV RAX,qword ptr [RAX + 0x40] TEST RAX,RAX JZ 0x00125ab5 MOV RDI,RBX CALL RAX TEST AL,AL JNZ 0x00125a55 JMP 0x00125ab5 LAB_00125b3d: CALL 0x00113510
int8 mysql_stmt_prepare(long param_1,char *param_2,size_t param_3) { long lVar1; long lVar2; code *pcVar3; char cVar4; int iVar5; char *__src; int8 uVar6; long in_FS_OFFSET; bool bVar7; int4 local_3c; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); lVar1 = *(long *)(param_1 + 0x38); if (lVar1 == 0) { *(int4 *)(param_1 + 0x108) = 0x7dd; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; __src = PTR_s_Lost_connection_to_server_during_00150078; } else { if (param_3 == 0xffffffffffffffff) { param_3 = strlen(param_2); } *(int4 *)(param_1 + 0x108) = 0; *(int4 *)(param_1 + 0x30d) = 0x30303030; *(int2 *)(param_1 + 0x311) = 0x30; *(int1 *)(param_1 + 0x10c) = 0; *(int4 *)(lVar1 + 0x90) = 0; lVar2 = *(long *)(param_1 + 0x38); *(int2 *)(lVar2 + 0x29b) = 0x30; *(int4 *)(lVar2 + 0x297) = 0x30303030; *(int1 *)(*(long *)(param_1 + 0x38) + 0x97) = 0; lVar2 = *(long *)(*(long *)(param_1 + 0x38) + 0x2a0); if (lVar2 != 0) { *(int4 *)(lVar2 + 4) = 0; } *(int8 *)(lVar1 + 0x338) = 0xffffffffffffffff; *(int8 *)(param_1 + 0xf8) = 0xffffffffffffffff; if (*(int *)(param_1 + 0x50) == 0) { bVar7 = true; LAB_00125a2c: iVar5 = (**(code **)(*(long *)(lVar1 + 0x4d0) + 0x10))(lVar1,0x16,param_2,param_3,1,param_1); if ((iVar5 == 0) && (((!bVar7 || (**(int **)(lVar1 + 0x2a0) != 2)) || (iVar5 = ma_multi_command(lVar1,4), iVar5 == 0)))) { uVar6 = 0; if ((((**(int **)(lVar1 + 0x2a0) != 0) || (*(char *)(*(long *)(lVar1 + 0x480) + 0x148) != '\0')) || (pcVar3 = *(code **)(*(long *)(lVar1 + 0x4d0) + 0x40), pcVar3 == (code *)0x0)) || (cVar4 = (*pcVar3)(param_1), uVar6 = 0, cVar4 == '\0')) goto LAB_00125ab5; } } else { bVar7 = **(int **)(lVar1 + 0x2a0) == 0; if (bVar7) { ma_multi_command(lVar1,2); } cVar4 = mysql_stmt_internal_reset(param_1,1); if (cVar4 == '\0') { ma_free_root(param_1,1); ma_free_root(*(int8 *)(param_1 + 0x340),0); *(int8 *)(param_1 + 0x70) = 0; *(int8 *)(param_1 + 0x58) = 0; *(int8 *)(param_1 + 0x60) = 0; local_3c = *(int4 *)(param_1 + 0x40); iVar5 = (**(code **)(*(long *)(lVar1 + 0x4d0) + 0x10))(lVar1,0x19,&local_3c,4,1,param_1); if (iVar5 == 0) goto LAB_00125a2c; } } *(int4 *)(param_1 + 0x50) = 0; *(int4 *)(param_1 + 0x108) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x90); strncpy((char *)(param_1 + 0x30d),(char *)(*(long *)(param_1 + 0x38) + 0x297),5); *(int1 *)(param_1 + 0x312) = 0; __src = (char *)(*(long *)(param_1 + 0x38) + 0x97); } strncpy((char *)(param_1 + 0x10c),__src,0x200); *(int1 *)(param_1 + 0x30b) = 0; uVar6 = 1; LAB_00125ab5: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar6; }
45,315
cpu_get_num_physical_cores()
monkey531[P]llama/common/common.cpp
std::string string_from(bool value) { return value ? "true" : "false"; }
O3
cpp
cpu_get_num_physical_cores(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x2a8, %rsp # imm = 0x2A8 leaq 0x98(%rsp), %rax movq %rax, -0x30(%rax) movq $0x1, -0x28(%rax) xorps %xmm0, %xmm0 movups %xmm0, -0x20(%rax) movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000 movups %xmm0, -0x8(%rax) leaq 0x38(%rsp), %rbp leaq 0x18(%rsp), %r13 xorl %r14d, %r14d leaq 0x48(%rsp), %r12 leaq 0xa0(%rsp), %rbx movl $0xd1b71759, %esi # imm = 0xD1B71759 movl $0x1, %eax cmpl $0xa, %r14d jb 0x1cbc5 movl $0x4, %eax movl %r14d, %ecx cmpl $0x63, %ecx jbe 0x1cbbe cmpl $0x3e7, %ecx # imm = 0x3E7 jbe 0x1cbc3 cmpl $0x2710, %ecx # imm = 0x2710 jb 0x1cbc5 movl %ecx, %edx imulq %rsi, %rdx shrq $0x2d, %rdx addl $0x4, %eax cmpl $0x1869f, %ecx # imm = 0x1869F movl %edx, %ecx ja 0x1cb8d addl $-0x3, %eax jmp 0x1cbc5 addl $-0x2, %eax jmp 0x1cbc5 decl %eax movq %rbp, %r15 movl %eax, %esi leaq 0x58(%rsp), %rax movq %rax, 0x48(%rsp) movq %r12, %rbp movq %r12, %rdi xorl %edx, %edx callq 0x187a0 movq 0x48(%rsp), %rdi movl 0x50(%rsp), %esi movl %r14d, %edx callq 0x2a67f movl $0x1b, %r8d movq %rbp, %r12 movq %rbp, %rdi xorl %esi, %esi xorl %edx, %edx leaq 0x8b0bb(%rip), %rcx # 0xa7cc4 callq 0x18750 movq %r15, %rbp movq %r15, 0x28(%rsp) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0x1cc34 movq %rdx, 0x28(%rsp) movq (%rcx), %rdx movq %rdx, 0x38(%rsp) jmp 0x1cc3b movups (%rcx), %xmm0 movups %xmm0, (%rbp) movq 0x8(%rax), %rdx movq %rdx, 0x30(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) leaq 0x28(%rsp), %rdi leaq 0x8b081(%rip), %rsi # 0xa7ce0 callq 0x18cd0 movq %r13, 0x8(%rsp) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0x1cc87 movq %rdx, 0x8(%rsp) movq (%rcx), %rdx movq %rdx, 0x18(%rsp) jmp 0x1cc8f movups (%rcx), %xmm0 movups %xmm0, (%r13) movq 0x8(%rax), %rdx movq %rdx, 0x10(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq %rbx, %rdi leaq 0x8(%rsp), %rsi movl $0x8, %edx callq 0x18a70 movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x1ccd0 movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 movq 0x28(%rsp), %rdi cmpq %rbp, %rdi je 0x1cce7 movq 0x38(%rsp), %rsi incq %rsi callq 0x186a0 movq 0x48(%rsp), %rdi leaq 0x58(%rsp), %rax cmpq %rax, %rdi je 0x1cd03 movq 0x58(%rsp), %rsi incq %rsi callq 0x186a0 leaq 0x118(%rsp), %rdi callq 0x18150 testb %al, %al je 0x1cdae movq %r13, 0x8(%rsp) movq $0x0, 0x10(%rsp) movb $0x0, 0x18(%rsp) movq 0xa0(%rsp), %rax movq -0x18(%rax), %rdi addq %rbx, %rdi movl $0xa, %esi callq 0x18660 movsbl %al, %edx movq %rbx, %rdi leaq 0x8(%rsp), %rsi callq 0x18c60 movq (%rax), %rcx movq -0x18(%rcx), %rcx testb $0x5, 0x20(%rax,%rcx) jne 0x1cd7b leaq 0x68(%rsp), %rdi movq %rdi, 0x28(%rsp) leaq 0x8(%rsp), %rsi leaq 0x28(%rsp), %rdx callq 0x7c498 movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x1cd92 movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 movq %rbx, %rdi callq 0x18160 incl %r14d cmpl $-0x1, %r14d movl $0xd1b71759, %esi # imm = 0xD1B71759 jne 0x1cb7a jmp 0x1cdbb leaq 0xa0(%rsp), %rdi callq 0x18160 movq 0x80(%rsp), %rbx testq %rbx, %rbx jne 0x1cde1 callq 0x188d0 cmpl $0x5, %eax setae %cl movl %eax, %edx shrl %cl, %edx testl %eax, %eax movl $0x4, %ebx cmovnel %edx, %ebx leaq 0x68(%rsp), %rdi callq 0x2a6f2 movl %ebx, %eax addq $0x2a8, %rsp # imm = 0x2A8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx jmp 0x1ce23 movq %rax, %rbx jmp 0x1ce84 movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x1ce23 movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 movq 0x28(%rsp), %rdi cmpq %r15, %rdi je 0x1ce3f movq 0x38(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x1ce3f movq %rax, %rbx movq 0x48(%rsp), %rdi leaq 0x58(%rsp), %rax cmpq %rax, %rdi je 0x1ce84 movq 0x58(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x1ce84 movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x1ce77 movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 leaq 0xa0(%rsp), %rdi callq 0x18160 leaq 0x68(%rsp), %rdi callq 0x2a6f2 movq %rbx, %rdi callq 0x18bb0
_Z26cpu_get_num_physical_coresv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 2A8h lea rax, [rsp+2D8h+var_240] mov [rax-30h], rax mov qword ptr [rax-28h], 1 xorps xmm0, xmm0 movups xmmword ptr [rax-20h], xmm0 mov dword ptr [rax-10h], 3F800000h movups xmmword ptr [rax-8], xmm0 lea rbp, [rsp+2D8h+var_2A0] lea r13, [rsp+2D8h+var_2C0] xor r14d, r14d lea r12, [rsp+2D8h+var_290] lea rbx, [rsp+2D8h+var_238] mov esi, 0D1B71759h loc_1CB7A: mov eax, 1 cmp r14d, 0Ah jb short loc_1CBC5 mov eax, 4 mov ecx, r14d loc_1CB8D: cmp ecx, 63h ; 'c' jbe short loc_1CBBE cmp ecx, 3E7h jbe short loc_1CBC3 cmp ecx, 2710h jb short loc_1CBC5 mov edx, ecx imul rdx, rsi shr rdx, 2Dh add eax, 4 cmp ecx, 1869Fh mov ecx, edx ja short loc_1CB8D add eax, 0FFFFFFFDh jmp short loc_1CBC5 loc_1CBBE: add eax, 0FFFFFFFEh jmp short loc_1CBC5 loc_1CBC3: dec eax loc_1CBC5: mov r15, rbp mov esi, eax lea rax, [rsp+2D8h+var_280] mov [rsp+2D8h+var_290], rax mov rbp, r12 mov rdi, r12 xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) mov rdi, [rsp+2D8h+var_290] mov esi, [rsp+2D8h+var_288] mov edx, r14d call _ZNSt8__detail18__to_chars_10_implIjEEvPcjT_; std::__detail::__to_chars_10_impl<uint>(char *,uint,uint) mov r8d, 1Bh mov r12, rbp mov rdi, rbp xor esi, esi xor edx, edx lea rcx, aSysDevicesSyst; "/sys/devices/system/cpu/cpu" call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong) mov rbp, r15 mov [rsp+2D8h+var_2B0], r15 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_1CC34 mov [rsp+2D8h+var_2B0], rdx mov rdx, [rcx] mov [rsp+2D8h+var_2A0], rdx jmp short loc_1CC3B loc_1CC34: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rbp+0], xmm0 loc_1CC3B: mov rdx, [rax+8] mov [rsp+2D8h+var_2A8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 lea rdi, [rsp+2D8h+var_2B0] lea rsi, aTopologyThread; "/topology/thread_siblings" call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov [rsp+2D8h+var_2D0], r13 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_1CC87 mov [rsp+2D8h+var_2D0], rdx mov rdx, [rcx] mov [rsp+2D8h+var_2C0], rdx jmp short loc_1CC8F loc_1CC87: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r13+0], xmm0 loc_1CC8F: mov rdx, [rax+8] mov [rsp+2D8h+var_2C8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov rdi, rbx lea rsi, [rsp+2D8h+var_2D0] mov edx, 8 call __ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ifstream::basic_ifstream(std::string const&,std::_Ios_Openmode) mov rdi, [rsp+2D8h+var_2D0]; void * cmp rdi, r13 jz short loc_1CCD0 mov rsi, [rsp+2D8h+var_2C0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1CCD0: mov rdi, [rsp+2D8h+var_2B0]; void * cmp rdi, rbp jz short loc_1CCE7 mov rsi, [rsp+2D8h+var_2A0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1CCE7: mov rdi, [rsp+2D8h+var_290]; void * lea rax, [rsp+2D8h+var_280] cmp rdi, rax jz short loc_1CD03 mov rsi, [rsp+2D8h+var_280] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1CD03: lea rdi, [rsp+2D8h+var_1C0] call __ZNKSt12__basic_fileIcE7is_openEv; std::__basic_file<char>::is_open(void) test al, al jz loc_1CDAE mov [rsp+2D8h+var_2D0], r13 mov [rsp+2D8h+var_2C8], 0 mov byte ptr [rsp+2D8h+var_2C0], 0 mov rax, [rsp+2D8h+var_238] mov rdi, [rax-18h] add rdi, rbx mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx edx, al mov rdi, rbx lea rsi, [rsp+2D8h+var_2D0] call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &,char) mov rcx, [rax] mov rcx, [rcx-18h] test byte ptr [rax+rcx+20h], 5 jnz short loc_1CD7B lea rdi, [rsp+2D8h+var_270] mov [rsp+2D8h+var_2B0], rdi lea rsi, [rsp+2D8h+var_2D0] lea rdx, [rsp+2D8h+var_2B0] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE9_M_insertIRKS5_NS7_10_AllocNodeISaINS7_10_Hash_nodeIS5_Lb1EEEEEEEESt4pairINS7_14_Node_iteratorIS5_Lb1ELb1EEEbEOT_RKT0_St17integral_constantIbLb1EE; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_insert<std::string const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::string,true>>>>(std::string const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::string,true>>> const&,std::integral_constant<bool,true>) loc_1CD7B: mov rdi, [rsp+2D8h+var_2D0]; void * cmp rdi, r13 jz short loc_1CD92 mov rsi, [rsp+2D8h+var_2C0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1CD92: mov rdi, rbx call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream() inc r14d cmp r14d, 0FFFFFFFFh mov esi, 0D1B71759h jnz loc_1CB7A jmp short loc_1CDBB loc_1CDAE: lea rdi, [rsp+2D8h+var_238]; this call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream() loc_1CDBB: mov rbx, [rsp+2D8h+var_258] test rbx, rbx jnz short loc_1CDE1 call __ZNSt6thread20hardware_concurrencyEv; std::thread::hardware_concurrency(void) cmp eax, 5 setnb cl mov edx, eax shr edx, cl test eax, eax mov ebx, 4 cmovnz ebx, edx loc_1CDE1: lea rdi, [rsp+2D8h+var_270] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable() mov eax, ebx add rsp, 2A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax jmp short loc_1CE23 mov rbx, rax jmp short loc_1CE84 mov rbx, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r13 jz short loc_1CE23 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1CE23: mov rdi, [rsp+arg_20]; void * cmp rdi, r15 jz short loc_1CE3F mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_1CE3F mov rbx, rax loc_1CE3F: mov rdi, [rsp+arg_40]; void * lea rax, [rsp+arg_50] cmp rdi, rax jz short loc_1CE84 mov rsi, [rsp+arg_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_1CE84 mov rbx, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r13 jz short loc_1CE77 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1CE77: lea rdi, [rsp+arg_98] call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream() loc_1CE84: lea rdi, [rsp+arg_60] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable() mov rdi, rbx call __Unwind_Resume
long long cpu_get_num_physical_cores(void) { unsigned int v0; // r14d unsigned int v1; // eax unsigned int v2; // ecx bool v3; // cc long long v4; // rax __int128 *v5; // rcx long long v6; // rax __int128 *v7; // rcx long long v8; // rsi char v9; // al _QWORD *v10; // rax int v11; // r8d int v12; // r9d long long v13; // rcx unsigned int v14; // ebx unsigned int v15; // eax char v17; // [rsp+0h] [rbp-2D8h] void *v18; // [rsp+8h] [rbp-2D0h] BYREF long long v19; // [rsp+10h] [rbp-2C8h] __int128 v20; // [rsp+18h] [rbp-2C0h] BYREF void *v21[2]; // [rsp+28h] [rbp-2B0h] BYREF __int128 v22; // [rsp+38h] [rbp-2A0h] BYREF void *v23; // [rsp+48h] [rbp-290h] BYREF unsigned int v24; // [rsp+50h] [rbp-288h] _QWORD v25[2]; // [rsp+58h] [rbp-280h] BYREF _QWORD v26[2]; // [rsp+68h] [rbp-270h] BYREF __int128 v27; // [rsp+78h] [rbp-260h] int v28; // [rsp+88h] [rbp-250h] __int128 v29; // [rsp+90h] [rbp-248h] BYREF _QWORD v30[15]; // [rsp+A0h] [rbp-238h] BYREF _BYTE v31[448]; // [rsp+118h] [rbp-1C0h] BYREF v26[0] = (char *)&v29 + 8; v26[1] = 1LL; v27 = 0LL; v28 = 1065353216; v29 = 0LL; v0 = 0; while ( 1 ) { v1 = 1; if ( v0 >= 0xA ) { v1 = 4; v2 = v0; while ( 1 ) { if ( v2 <= 0x63 ) { v1 -= 2; goto LABEL_11; } if ( v2 <= 0x3E7 ) break; if ( v2 < 0x2710 ) goto LABEL_11; v1 += 4; v3 = v2 <= 0x1869F; v2 /= 0x2710u; if ( v3 ) { v1 -= 3; goto LABEL_11; } } --v1; } LABEL_11: v23 = v25; std::string::_M_construct(&v23, v1, 0LL); std::__detail::__to_chars_10_impl<unsigned int>(v23, v24, v0); v4 = std::string::replace(&v23, 0LL, 0LL, "/sys/devices/system/cpu/cpu", 27LL); v21[0] = &v22; v5 = (__int128 *)(v4 + 16); if ( *(_QWORD *)v4 == v4 + 16 ) { v22 = *v5; } else { v21[0] = *(void **)v4; *(_QWORD *)&v22 = *(_QWORD *)v5; } v21[1] = *(void **)(v4 + 8); *(_QWORD *)v4 = v5; *(_QWORD *)(v4 + 8) = 0LL; *(_BYTE *)(v4 + 16) = 0; v6 = std::string::append(v21, "/topology/thread_siblings"); v18 = &v20; v7 = (__int128 *)(v6 + 16); if ( *(_QWORD *)v6 == v6 + 16 ) { v20 = *v7; } else { v18 = *(void **)v6; *(_QWORD *)&v20 = *(_QWORD *)v7; } v19 = *(_QWORD *)(v6 + 8); *(_QWORD *)v6 = v7; *(_QWORD *)(v6 + 8) = 0LL; *(_BYTE *)(v6 + 16) = 0; v8 = (long long)&v18; std::ifstream::basic_ifstream(v30, &v18, 8LL); if ( v18 != &v20 ) { v8 = v20 + 1; operator delete(v18, v20 + 1); } if ( v21[0] != &v22 ) { v8 = v22 + 1; operator delete(v21[0], v22 + 1); } if ( v23 != v25 ) { v8 = v25[0] + 1LL; operator delete(v23, v25[0] + 1LL); } if ( !(unsigned __int8)std::__basic_file<char>::is_open(v31) ) break; v18 = &v20; v19 = 0LL; LOBYTE(v20) = 0; v9 = std::ios::widen((char *)v30 + *(_QWORD *)(v30[0] - 24LL), 10LL); v10 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(v30, &v18, (unsigned int)v9); v13 = *(_QWORD *)(*v10 - 24LL); if ( (*((_BYTE *)v10 + v13 + 32) & 5) == 0 ) { v21[0] = v26; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_insert<std::string const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::string,true>>>>( (unsigned int)v26, (unsigned int)&v18, (unsigned int)v21, v13, v11, v12, v17); } if ( v18 != &v20 ) operator delete(v18, v20 + 1); std::ifstream::~ifstream(v30); ++v0; v8 = 3518437209LL; if ( v0 == -1 ) goto LABEL_31; } std::ifstream::~ifstream(v30); LABEL_31: v14 = DWORD2(v27); if ( !*((_QWORD *)&v27 + 1) ) { v15 = std::thread::hardware_concurrency((std::thread *)v30); v14 = 4; if ( v15 ) v14 = v15 >> (v15 >= 5); } std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable( v26, v8); return v14; }
cpu_get_num_physical_cores: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x2a8 LEA RAX,[RSP + 0x98] MOV qword ptr [RAX + -0x30],RAX MOV qword ptr [RAX + -0x28],0x1 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x20],XMM0 MOV dword ptr [RAX + -0x10],0x3f800000 MOVUPS xmmword ptr [RAX + -0x8],XMM0 LEA RBP,[RSP + 0x38] LEA R13,[RSP + 0x18] XOR R14D,R14D LEA R12,[RSP + 0x48] LEA RBX,[RSP + 0xa0] MOV ESI,0xd1b71759 LAB_0011cb7a: MOV EAX,0x1 CMP R14D,0xa JC 0x0011cbc5 MOV EAX,0x4 MOV ECX,R14D LAB_0011cb8d: CMP ECX,0x63 JBE 0x0011cbbe CMP ECX,0x3e7 JBE 0x0011cbc3 CMP ECX,0x2710 JC 0x0011cbc5 MOV EDX,ECX IMUL RDX,RSI SHR RDX,0x2d ADD EAX,0x4 CMP ECX,0x1869f MOV ECX,EDX JA 0x0011cb8d ADD EAX,-0x3 JMP 0x0011cbc5 LAB_0011cbbe: ADD EAX,-0x2 JMP 0x0011cbc5 LAB_0011cbc3: DEC EAX LAB_0011cbc5: MOV R15,RBP MOV ESI,EAX LEA RAX,[RSP + 0x58] MOV qword ptr [RSP + 0x48],RAX LAB_0011cbd4: MOV RBP,R12 MOV RDI,R12 XOR EDX,EDX CALL 0x001187a0 MOV RDI,qword ptr [RSP + 0x48] MOV ESI,dword ptr [RSP + 0x50] MOV EDX,R14D CALL 0x0012a67f LAB_0011cbf2: MOV R8D,0x1b MOV R12,RBP MOV RDI,RBP XOR ESI,ESI XOR EDX,EDX LEA RCX,[0x1a7cc4] CALL 0x00118750 MOV RBP,R15 MOV qword ptr [RSP + 0x28],R15 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x0011cc34 MOV qword ptr [RSP + 0x28],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x38],RDX JMP 0x0011cc3b LAB_0011cc34: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RBP],XMM0 LAB_0011cc3b: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x30],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LAB_0011cc53: LEA RDI,[RSP + 0x28] LEA RSI,[0x1a7ce0] CALL 0x00118cd0 MOV qword ptr [RSP + 0x8],R13 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x0011cc87 MOV qword ptr [RSP + 0x8],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x18],RDX JMP 0x0011cc8f LAB_0011cc87: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R13],XMM0 LAB_0011cc8f: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LAB_0011cca7: MOV RDI,RBX LEA RSI,[RSP + 0x8] MOV EDX,0x8 CALL 0x00118a70 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R13 JZ 0x0011ccd0 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001186a0 LAB_0011ccd0: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,RBP JZ 0x0011cce7 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001186a0 LAB_0011cce7: MOV RDI,qword ptr [RSP + 0x48] LEA RAX,[RSP + 0x58] CMP RDI,RAX JZ 0x0011cd03 MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x001186a0 LAB_0011cd03: LEA RDI,[RSP + 0x118] CALL 0x00118150 TEST AL,AL JZ 0x0011cdae MOV qword ptr [RSP + 0x8],R13 MOV qword ptr [RSP + 0x10],0x0 MOV byte ptr [RSP + 0x18],0x0 MOV RAX,qword ptr [RSP + 0xa0] MOV RDI,qword ptr [RAX + -0x18] ADD RDI,RBX LAB_0011cd3a: MOV ESI,0xa CALL 0x00118660 MOVSX EDX,AL MOV RDI,RBX LEA RSI,[RSP + 0x8] CALL 0x00118c60 MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5 JNZ 0x0011cd7b LEA RDI,[RSP + 0x68] MOV qword ptr [RSP + 0x28],RDI LEA RSI,[RSP + 0x8] LEA RDX,[RSP + 0x28] CALL 0x0017c498 LAB_0011cd7b: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R13 JZ 0x0011cd92 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001186a0 LAB_0011cd92: MOV RDI,RBX CALL 0x00118160 INC R14D CMP R14D,-0x1 MOV ESI,0xd1b71759 JNZ 0x0011cb7a JMP 0x0011cdbb LAB_0011cdae: LEA RDI,[RSP + 0xa0] CALL 0x00118160 LAB_0011cdbb: MOV RBX,qword ptr [RSP + 0x80] TEST RBX,RBX JNZ 0x0011cde1 CALL 0x001188d0 CMP EAX,0x5 SETNC CL MOV EDX,EAX SHR EDX,CL TEST EAX,EAX MOV EBX,0x4 CMOVNZ EBX,EDX LAB_0011cde1: LEA RDI,[RSP + 0x68] CALL 0x0012a6f2 MOV EAX,EBX ADD RSP,0x2a8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* cpu_get_num_physical_cores() */ ulong cpu_get_num_physical_cores(void) { char cVar1; char cVar2; long *plVar3; istream *piVar4; uint uVar5; int8 **ppuVar6; ulong *puVar7; ulong uVar8; uint uVar9; ulong *local_2d0; long local_2c8; ulong local_2c0; int4 uStack_2b8; int4 uStack_2b4; int8 **local_2b0; long local_2a8; int8 *local_2a0; long lStack_298; long *local_290; uint local_288; long local_280 [2]; int8 *local_270; int8 local_268; int8 local_260; ulong uStack_258; int4 local_250; int8 local_248; int8 uStack_240; long local_238 [65]; local_270 = &uStack_240; local_268 = 1; local_260 = 0; uStack_258 = 0; local_250 = 0x3f800000; local_248 = 0; uStack_240 = 0; uVar9 = 0; do { cVar2 = '\x01'; if (9 < uVar9) { uVar8 = (ulong)uVar9; cVar1 = '\x04'; do { cVar2 = cVar1; uVar5 = (uint)uVar8; if (uVar5 < 100) { cVar2 = cVar2 + -2; goto LAB_0011cbc5; } if (uVar5 < 1000) { cVar2 = cVar2 + -1; goto LAB_0011cbc5; } if (uVar5 < 10000) goto LAB_0011cbc5; uVar8 = uVar8 / 10000; cVar1 = cVar2 + '\x04'; } while (99999 < uVar5); cVar2 = cVar2 + '\x01'; } LAB_0011cbc5: local_290 = local_280; /* try { // try from 0011cbd4 to 0011cbe0 has its CatchHandler @ 0011ce04 */ std::__cxx11::string::_M_construct((ulong)&local_290,cVar2); std::__detail::__to_chars_10_impl<unsigned_int>((char *)local_290,local_288,uVar9); /* try { // try from 0011cbf2 to 0011cc0d has its CatchHandler @ 0011ce3c */ plVar3 = (long *)std::__cxx11::string::replace((ulong)&local_290,0,(char *)0x0,0x1a7cc4); ppuVar6 = (int8 **)(plVar3 + 2); if ((int8 **)*plVar3 == ppuVar6) { local_2a0 = *ppuVar6; lStack_298 = plVar3[3]; local_2b0 = &local_2a0; } else { local_2a0 = *ppuVar6; local_2b0 = (int8 **)*plVar3; } local_2a8 = plVar3[1]; *plVar3 = (long)ppuVar6; plVar3[1] = 0; *(int1 *)(plVar3 + 2) = 0; /* try { // try from 0011cc53 to 0011cc63 has its CatchHandler @ 0011cdff */ plVar3 = (long *)std::__cxx11::string::append((char *)&local_2b0); puVar7 = (ulong *)(plVar3 + 2); if ((ulong *)*plVar3 == puVar7) { local_2c0 = *puVar7; uStack_2b8 = (int4)plVar3[3]; uStack_2b4 = *(int4 *)((long)plVar3 + 0x1c); local_2d0 = &local_2c0; } else { local_2c0 = *puVar7; local_2d0 = (ulong *)*plVar3; } local_2c8 = plVar3[1]; *plVar3 = (long)puVar7; plVar3[1] = 0; *(int1 *)(plVar3 + 2) = 0; /* try { // try from 0011cca7 to 0011ccb8 has its CatchHandler @ 0011ce09 */ std::ifstream::ifstream((ifstream *)local_238,&local_2d0,8); if (local_2d0 != &local_2c0) { operator_delete(local_2d0,local_2c0 + 1); } if (local_2b0 != &local_2a0) { operator_delete(local_2b0,(long)local_2a0 + 1); } if (local_290 != local_280) { operator_delete(local_290,local_280[0] + 1); } cVar2 = std::__basic_file<char>::is_open(); if (cVar2 == '\0') { std::ifstream::~ifstream((ifstream *)local_238); goto LAB_0011cdbb; } local_2c8 = 0; local_2c0 = local_2c0 & 0xffffffffffffff00; local_2d0 = &local_2c0; /* try { // try from 0011cd3a to 0011cd7a has its CatchHandler @ 0011ce5d */ cVar2 = std::ios::widen((char)*(int8 *)(local_238[0] + -0x18) + (char)(istream *)local_238 ); piVar4 = std::getline<char,std::char_traits<char>,std::allocator<char>> ((istream *)local_238,(string *)&local_2d0,cVar2); if (((byte)piVar4[*(long *)(*(long *)piVar4 + -0x18) + 0x20] & 5) == 0) { local_2b0 = &local_270; std:: _Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> :: _M_insert<std::__cxx11::string_const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::__cxx11::string,true>>>> (local_2b0,&local_2d0,&local_2b0); } if (local_2d0 != &local_2c0) { operator_delete(local_2d0,local_2c0 + 1); } std::ifstream::~ifstream((ifstream *)local_238); uVar9 = uVar9 + 1; if (uVar9 == 0xffffffff) { LAB_0011cdbb: uVar8 = uStack_258; if (uStack_258 == 0) { uVar9 = std::thread::hardware_concurrency(); uVar8 = 4; if (uVar9 != 0) { uVar8 = (ulong)(uVar9 >> (4 < uVar9)); } } std:: _Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> ::~_Hashtable((_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> *)&local_270); return uVar8 & 0xffffffff; } } while( true ); }
45,316
ma_set_fatal_error_with_share
eloqsql/storage/maria/ma_info.c
void _ma_set_fatal_error_with_share(MARIA_SHARE *share, int error) { DBUG_PRINT("error", ("error: %d", error)); if (!(share->state.changed & STATE_CRASHED_PRINTED)) { _ma_report_error(error, (share->index_file_name.length ? &share->index_file_name : &share->unique_file_name), MYF(ME_WARNING | ME_ERROR_LOG)); } maria_mark_crashed_share(share); share->state.changed|= STATE_CRASHED_PRINTED; DBUG_ASSERT(!maria_assert_if_crashed_table); }
O0
c
ma_set_fatal_error_with_share: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) jmp 0x2e9e1 movq -0x8(%rbp), %rax movl 0x170(%rax), %eax andl $0x800, %eax # imm = 0x800 cmpl $0x0, %eax jne 0x2ea38 movl -0xc(%rbp), %eax movl %eax, -0x10(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x5d8(%rax) je 0x2ea19 movq -0x8(%rbp), %rax addq $0x5d0, %rax # imm = 0x5D0 movq %rax, -0x18(%rbp) jmp 0x2ea27 movq -0x8(%rbp), %rax addq $0x5b0, %rax # imm = 0x5B0 movq %rax, -0x18(%rbp) movl -0x10(%rbp), %edi movq -0x18(%rbp), %rsi movl $0x840, %edx # imm = 0x840 callq 0x2e7f0 jmp 0x2ea3a movq -0x8(%rbp), %rax movl 0x170(%rax), %ecx orl $0x2, %ecx movl %ecx, 0x170(%rax) jmp 0x2ea4f jmp 0x2ea51 movq -0x8(%rbp), %rax movl 0x170(%rax), %ecx orl $0x800, %ecx # imm = 0x800 movl %ecx, 0x170(%rax) jmp 0x2ea69 addq $0x20, %rsp popq %rbp retq nop
_ma_set_fatal_error_with_share: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_C], esi jmp short $+2 loc_2E9E1: mov rax, [rbp+var_8] mov eax, [rax+170h] and eax, 800h cmp eax, 0 jnz short loc_2EA38 mov eax, [rbp+var_C] mov [rbp+var_10], eax mov rax, [rbp+var_8] cmp qword ptr [rax+5D8h], 0 jz short loc_2EA19 mov rax, [rbp+var_8] add rax, 5D0h mov [rbp+var_18], rax jmp short loc_2EA27 loc_2EA19: mov rax, [rbp+var_8] add rax, 5B0h mov [rbp+var_18], rax loc_2EA27: mov edi, [rbp+var_10] mov rsi, [rbp+var_18] mov edx, 840h call _ma_report_error loc_2EA38: jmp short $+2 loc_2EA3A: mov rax, [rbp+var_8] mov ecx, [rax+170h] or ecx, 2 mov [rax+170h], ecx jmp short $+2 loc_2EA4F: jmp short $+2 loc_2EA51: mov rax, [rbp+var_8] mov ecx, [rax+170h] or ecx, 800h mov [rax+170h], ecx jmp short $+2 loc_2EA69: add rsp, 20h pop rbp retn
long long ma_set_fatal_error_with_share(long long a1, int a2, long long a3, long long a4, long long a5, int a6) { long long result; // rax if ( (*(_DWORD *)(a1 + 368) & 0x800) == 0 ) { if ( *(_QWORD *)(a1 + 1496) ) ma_report_error(a2, (long long *)(a1 + 1488), 2112, a4, a5, a6); else ma_report_error(a2, (long long *)(a1 + 1456), 2112, a4, a5, a6); } *(_DWORD *)(a1 + 368) |= 2u; result = a1; *(_DWORD *)(a1 + 368) |= 0x800u; return result; }
_ma_set_fatal_error_with_share: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI JMP 0x0012e9e1 LAB_0012e9e1: MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x170] AND EAX,0x800 CMP EAX,0x0 JNZ 0x0012ea38 MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x10],EAX MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x5d8],0x0 JZ 0x0012ea19 MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x5d0 MOV qword ptr [RBP + -0x18],RAX JMP 0x0012ea27 LAB_0012ea19: MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x5b0 MOV qword ptr [RBP + -0x18],RAX LAB_0012ea27: MOV EDI,dword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,0x840 CALL 0x0012e7f0 LAB_0012ea38: JMP 0x0012ea3a LAB_0012ea3a: MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x170] OR ECX,0x2 MOV dword ptr [RAX + 0x170],ECX JMP 0x0012ea4f LAB_0012ea4f: JMP 0x0012ea51 LAB_0012ea51: MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x170] OR ECX,0x800 MOV dword ptr [RAX + 0x170],ECX JMP 0x0012ea69 LAB_0012ea69: ADD RSP,0x20 POP RBP RET
void _ma_set_fatal_error_with_share(long param_1,int4 param_2) { int8 local_20; if ((*(uint *)(param_1 + 0x170) & 0x800) == 0) { if (*(long *)(param_1 + 0x5d8) == 0) { local_20 = param_1 + 0x5b0; } else { local_20 = param_1 + 0x5d0; } _ma_report_error(param_2,local_20,0x840); } *(uint *)(param_1 + 0x170) = *(uint *)(param_1 + 0x170) | 2; *(uint *)(param_1 + 0x170) = *(uint *)(param_1 + 0x170) | 0x800; return; }
45,317
GGUFMeta::GKV<unsigned int>::override_type_to_str(llama_model_kv_override_type)
monkey531[P]llama/src/llama-model-loader.cpp
static const char * override_type_to_str(const llama_model_kv_override_type ty) { switch (ty) { case LLAMA_KV_OVERRIDE_TYPE_BOOL: return "bool"; case LLAMA_KV_OVERRIDE_TYPE_INT: return "int"; case LLAMA_KV_OVERRIDE_TYPE_FLOAT: return "float"; case LLAMA_KV_OVERRIDE_TYPE_STR: return "str"; } return "unknown"; }
O0
cpp
GGUFMeta::GKV<unsigned int>::override_type_to_str(llama_model_kv_override_type): movl %edi, -0xc(%rsp) movl -0xc(%rsp), %eax movq %rax, -0x18(%rsp) subq $0x3, %rax ja 0x2d8c40 movq -0x18(%rsp), %rax leaq 0xfa979(%rip), %rcx # 0x3d3578 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0xfb656(%rip), %rax # 0x3d4265 movq %rax, -0x8(%rsp) jmp 0x2d8c4c leaq 0xff9e7(%rip), %rax # 0x3d8604 movq %rax, -0x8(%rsp) jmp 0x2d8c4c leaq 0xfb63f(%rip), %rax # 0x3d426a movq %rax, -0x8(%rsp) jmp 0x2d8c4c leaq 0xfb637(%rip), %rax # 0x3d4270 movq %rax, -0x8(%rsp) jmp 0x2d8c4c leaq 0xf6776(%rip), %rax # 0x3cf3bd movq %rax, -0x8(%rsp) movq -0x8(%rsp), %rax retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZN8GGUFMeta3GKVIjE20override_type_to_strE28llama_model_kv_override_type: mov [rsp+var_C], edi mov eax, [rsp+var_C] mov [rsp+var_18], rax sub rax, 3; switch 4 cases ja short def_2D8C06; jumptable 00000000002D8C06 default case mov rax, [rsp+var_18] lea rcx, jpt_2D8C06 movsxd rax, ds:(jpt_2D8C06 - 3D3578h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_2D8C08: lea rax, aBool; jumptable 00000000002D8C06 case 2 mov [rsp+var_8], rax jmp short loc_2D8C4C loc_2D8C16: lea rax, aInvalidCodepoi+0Eh; jumptable 00000000002D8C06 case 0 mov [rsp+var_8], rax jmp short loc_2D8C4C loc_2D8C24: lea rax, aFloat; jumptable 00000000002D8C06 case 1 mov [rsp+var_8], rax jmp short loc_2D8C4C loc_2D8C32: lea rax, aStr; jumptable 00000000002D8C06 case 3 mov [rsp+var_8], rax jmp short loc_2D8C4C def_2D8C06: lea rax, aUnknown; jumptable 00000000002D8C06 default case mov [rsp+var_8], rax loc_2D8C4C: mov rax, [rsp+var_8] retn
const char * GGUFMeta::GKV<unsigned int>::override_type_to_str(int a1) { const char *v2; // [rsp+10h] [rbp-8h] switch ( a1 ) { case 0: v2 = "int"; break; case 1: v2 = "float"; break; case 2: v2 = "bool"; break; case 3: v2 = "str"; break; default: v2 = "unknown"; break; } return v2; }
45,318
GGUFMeta::GKV<unsigned int>::override_type_to_str(llama_model_kv_override_type)
monkey531[P]llama/src/llama-model-loader.cpp
static const char * override_type_to_str(const llama_model_kv_override_type ty) { switch (ty) { case LLAMA_KV_OVERRIDE_TYPE_BOOL: return "bool"; case LLAMA_KV_OVERRIDE_TYPE_INT: return "int"; case LLAMA_KV_OVERRIDE_TYPE_FLOAT: return "float"; case LLAMA_KV_OVERRIDE_TYPE_STR: return "str"; } return "unknown"; }
O2
cpp
GGUFMeta::GKV<unsigned int>::override_type_to_str(llama_model_kv_override_type): cmpl $0x3, %edi ja 0xebedf movl %edi, %eax leaq 0xacfce(%rip), %rcx # 0x198ea8 movq (%rcx,%rax,8), %rax retq leaq 0x554a3(%rip), %rax # 0x141389 retq nop
_ZN8GGUFMeta3GKVIiE20override_type_to_strE28llama_model_kv_override_type: cmp edi, 3 ja short loc_EBEDF mov eax, edi lea rcx, off_198EA8; "int" mov rax, [rcx+rax*8] retn loc_EBEDF: lea rax, aUnknown; "unknown" retn
const char * GGUFMeta::GKV<int>::override_type_to_str(unsigned int a1) { if ( a1 > 3 ) return "unknown"; else return (const char *)*(&off_198EA8 + a1); }
override_type_to_str: CMP EDI,0x3 JA 0x001ebedf MOV EAX,EDI LEA RCX,[0x298ea8] MOV RAX,qword ptr [RCX + RAX*0x8] RET LAB_001ebedf: LEA RAX,[0x241389] RET
/* GGUFMeta::GKV<int>::override_type_to_str(llama_model_kv_override_type) */ char * GGUFMeta::GKV<int>::override_type_to_str(uint param_1) { if (param_1 < 4) { return *(char **)(&DAT_00298ea8 + (ulong)param_1 * 8); } return "unknown"; }
45,319
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; } }
O0
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: subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x10(%rsp) cmpq $0x0, (%rax) jne 0x16b1da leaq 0xa3904(%rip), %rdi # 0x20eac4 movl $0x1491, %esi # imm = 0x1491 leaq 0xa3942(%rip), %rdx # 0x20eb0e leaq 0xa901a(%rip), %rcx # 0x2141ed movb $0x0, %al callq 0x5aee0 movq 0x10(%rsp), %rax movq (%rax), %rdi callq 0x122570 movzbl %al, %ecx movq %rcx, 0x8(%rsp) subb $0x9, %al ja 0x16b25c movq 0x8(%rsp), %rax leaq 0xa673d(%rip), %rcx # 0x21193c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x10(%rsp), %rcx movq 0x20(%rcx), %rax cmpq 0x28(%rcx), %rax je 0x16b239 movq 0x10(%rsp), %rax movq %rax, %rdi addq $0x30, %rdi movq 0x20(%rax), %rsi callq 0x174750 movq 0x10(%rsp), %rax movq 0x20(%rax), %rcx movq %rcx, 0x28(%rax) movq 0x10(%rsp), %rax addq $0x30, %rax movq %rax, 0x20(%rsp) jmp 0x16b26a movq 0x10(%rsp), %rdi callq 0x120560 movq %rax, 0x20(%rsp) jmp 0x16b26a jmp 0x16b25c movq 0x10(%rsp), %rax addq $0x50, %rax movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax addq $0x28, %rsp retq nopw %cs:(%rax,%rax) nop
_ZNK8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3keyEv: sub rsp, 28h mov qword ptr [rsp+28h+var_10], rdi; __int64 mov rax, qword ptr [rsp+28h+var_10] mov qword ptr [rsp+28h+var_18], rax; __int16 cmp qword ptr [rax], 0 jnz short loc_16B1DA lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 1491h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN; "anchor.m_object != nullptr" mov al, 0 call _ggml_abort loc_16B1DA: mov rax, qword ptr [rsp+28h+var_18] mov rdi, [rax] call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4typeEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type(void) movzx ecx, al mov qword ptr [rsp+28h+var_20], rcx; int sub al, 9; switch 10 cases ja short def_16B206; jumptable 000000000016B206 default case mov rax, qword ptr [rsp+28h+var_20] lea rcx, jpt_16B206 movsxd rax, ds:(jpt_16B206 - 21193Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_16B208: mov rcx, qword ptr [rsp+28h+var_18]; jumptable 000000000016B206 case 2 mov rax, [rcx+20h] cmp rax, [rcx+28h] jz short loc_16B239 mov rax, qword ptr [rsp+28h+var_18] mov rdi, rax add rdi, 30h ; '0' mov rsi, [rax+20h] 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, qword ptr [rsp+28h+var_18] mov rcx, [rax+20h] mov [rax+28h], rcx loc_16B239: mov rax, qword ptr [rsp+28h+var_18] add rax, 30h ; '0' mov [rsp+28h+var_8], rax jmp short loc_16B26A loc_16B249: mov rdi, qword ptr [rsp+28h+var_18]; jumptable 000000000016B206 case 1 call _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) mov [rsp+28h+var_8], rax jmp short loc_16B26A loc_16B25A: jmp short $+2; jumptable 000000000016B206 cases 0,3-9 def_16B206: mov rax, qword ptr [rsp+28h+var_18]; jumptable 000000000016B206 default case add rax, 50h ; 'P' mov [rsp+28h+var_8], rax loc_16B26A: mov rax, [rsp+28h+var_8] add rsp, 28h retn
45,320
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; } }
O1
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 0xaee96 movq %rdi, %rbx movzbl (%rax), %eax cmpl $0x1, %eax je 0xaee84 cmpl $0x2, %eax jne 0xaee8d movq 0x20(%rbx), %rsi cmpq 0x28(%rbx), %rsi je 0xaee7e leaq 0x30(%rbx), %rdi callq 0xaef4b movq 0x20(%rbx), %rax movq %rax, 0x28(%rbx) addq $0x30, %rbx jmp 0xaee91 movq %rbx, %rdi popq %rbx jmp 0xaf00c addq $0x50, %rbx movq %rbx, %rax popq %rbx retq leaq 0x406ac(%rip), %rdi # 0xef549 leaq 0x406ef(%rip), %rdx # 0xef593 leaq 0x4597b(%rip), %rcx # 0xf4826 movl $0x1491, %esi # imm = 0x1491 xorl %eax, %eax callq 0x1beb0 nop
_ZNK8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3keyEv: push rbx mov rax, [rdi] test rax, rax jz short loc_AEE96 mov rbx, rdi movzx eax, byte ptr [rax] cmp eax, 1 jz short loc_AEE84 cmp eax, 2 jnz short loc_AEE8D mov rsi, [rbx+20h] cmp rsi, [rbx+28h] jz short loc_AEE7E 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_AEE7E: add rbx, 30h ; '0' jmp short loc_AEE91 loc_AEE84: mov rdi, rbx pop rbx jmp _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_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>>::key(void) loc_AEE8D: add rbx, 50h ; 'P' loc_AEE91: mov rax, rbx pop rbx retn loc_AEE96: lea rdi, aWorkspaceLlm4b_0; "/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>>>::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>>::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>>>::~iteration_proxy_value("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp"); } }
key: PUSH RBX MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x001aee96 MOV RBX,RDI MOVZX EAX,byte ptr [RAX] CMP EAX,0x1 JZ 0x001aee84 CMP EAX,0x2 JNZ 0x001aee8d MOV RSI,qword ptr [RBX + 0x20] CMP RSI,qword ptr [RBX + 0x28] JZ 0x001aee7e LEA RDI,[RBX + 0x30] CALL 0x001aef4b MOV RAX,qword ptr [RBX + 0x20] MOV qword ptr [RBX + 0x28],RAX LAB_001aee7e: ADD RBX,0x30 JMP 0x001aee91 LAB_001aee84: MOV RDI,RBX POP RBX JMP 0x001af00c LAB_001aee8d: ADD RBX,0x50 LAB_001aee91: MOV RAX,RBX POP RBX RET LAB_001aee96: LEA RDI,[0x1ef549] LEA RDX,[0x1ef593] LEA RCX,[0x1f4826] MOV ESI,0x1491 XOR EAX,EAX CALL 0x0011beb0
/* 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> > >::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>>> * __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>>> ::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>>> *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>>> *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>>> *)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>> ::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>> *)this); return piVar2; }
45,321
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 0x80036 movq %rdi, %rbx movzbl (%rax), %eax cmpl $0x1, %eax je 0x80024 cmpl $0x2, %eax jne 0x8002d movq 0x20(%rbx), %rsi cmpq 0x28(%rbx), %rsi je 0x8001e leaq 0x30(%rbx), %rdi callq 0x800d7 movq 0x20(%rbx), %rax movq %rax, 0x28(%rbx) addq $0x30, %rbx jmp 0x80031 movq %rbx, %rdi popq %rbx jmp 0x8010a addq $0x50, %rbx movq %rbx, %rax popq %rbx retq leaq 0x304ef(%rip), %rdi # 0xb052c leaq 0x30532(%rip), %rdx # 0xb0576 leaq 0x357bb(%rip), %rcx # 0xb5806 movl $0x1491, %esi # imm = 0x1491 xorl %eax, %eax callq 0x23ed0 nop
_ZNK8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3keyEv: push rbx mov rax, [rdi] test rax, rax jz short loc_80036 mov rbx, rdi movzx eax, byte ptr [rax] cmp eax, 1 jz short loc_80024 cmp eax, 2 jnz short loc_8002D mov rsi, [rbx+20h] cmp rsi, [rbx+28h] jz short loc_8001E 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_8001E: add rbx, 30h ; '0' jmp short loc_80031 loc_80024: mov rdi, rbx pop rbx jmp _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_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>>::key(void) loc_8002D: add rbx, 50h ; 'P' loc_80031: mov rax, rbx pop rbx retn loc_80036: lea rdi, aWorkspaceLlm4b_0; "/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>>>::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>>::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>>>::operator++("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp"); } }
key: PUSH RBX MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x00180036 MOV RBX,RDI MOVZX EAX,byte ptr [RAX] CMP EAX,0x1 JZ 0x00180024 CMP EAX,0x2 JNZ 0x0018002d MOV RSI,qword ptr [RBX + 0x20] CMP RSI,qword ptr [RBX + 0x28] JZ 0x0018001e LEA RDI,[RBX + 0x30] CALL 0x001800d7 MOV RAX,qword ptr [RBX + 0x20] MOV qword ptr [RBX + 0x28],RAX LAB_0018001e: ADD RBX,0x30 JMP 0x00180031 LAB_00180024: MOV RDI,RBX POP RBX JMP 0x0018010a LAB_0018002d: ADD RBX,0x50 LAB_00180031: MOV RAX,RBX POP RBX RET LAB_00180036: LEA RDI,[0x1b052c] LEA RDX,[0x1b0576] LEA RCX,[0x1b5806] MOV ESI,0x1491 XOR EAX,EAX CALL 0x00123ed0
/* 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> > >::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>>> * __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>>> ::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>>> *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>>> *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>>> *)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>> ::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>> *)this); return piVar2; }
45,322
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; } }
O3
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 0xad5da movq %rdi, %rbx movzbl (%rax), %eax cmpl $0x1, %eax je 0xad5c8 cmpl $0x2, %eax jne 0xad5d1 movq 0x20(%rbx), %rsi cmpq 0x28(%rbx), %rsi je 0xad5c2 leaq 0x30(%rbx), %rdi callq 0xad68f movq 0x20(%rbx), %rax movq %rax, 0x28(%rbx) addq $0x30, %rbx jmp 0xad5d5 movq %rbx, %rdi popq %rbx jmp 0xad750 addq $0x50, %rbx movq %rbx, %rax popq %rbx retq leaq 0x3ef68(%rip), %rdi # 0xec549 leaq 0x3efab(%rip), %rdx # 0xec593 leaq 0x44227(%rip), %rcx # 0xf1816 movl $0x1491, %esi # imm = 0x1491 xorl %eax, %eax callq 0x1aeb0 nop
_ZNK8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3keyEv: push rbx mov rax, [rdi] test rax, rax jz short loc_AD5DA mov rbx, rdi movzx eax, byte ptr [rax] cmp eax, 1 jz short loc_AD5C8 cmp eax, 2 jnz short loc_AD5D1 mov rsi, [rbx+20h] cmp rsi, [rbx+28h] jz short loc_AD5C2 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_AD5C2: add rbx, 30h ; '0' jmp short loc_AD5D5 loc_AD5C8: mov rdi, rbx pop rbx jmp _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_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>>::key(void) loc_AD5D1: add rbx, 50h ; 'P' loc_AD5D5: mov rax, rbx pop rbx retn loc_AD5DA: lea rdi, aWorkspaceLlm4b_0; "/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>>>::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>>::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>>>::~iteration_proxy_value("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp"); } }
key: PUSH RBX MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x001ad5da MOV RBX,RDI MOVZX EAX,byte ptr [RAX] CMP EAX,0x1 JZ 0x001ad5c8 CMP EAX,0x2 JNZ 0x001ad5d1 MOV RSI,qword ptr [RBX + 0x20] CMP RSI,qword ptr [RBX + 0x28] JZ 0x001ad5c2 LEA RDI,[RBX + 0x30] CALL 0x001ad68f MOV RAX,qword ptr [RBX + 0x20] MOV qword ptr [RBX + 0x28],RAX LAB_001ad5c2: ADD RBX,0x30 JMP 0x001ad5d5 LAB_001ad5c8: MOV RDI,RBX POP RBX JMP 0x001ad750 LAB_001ad5d1: ADD RBX,0x50 LAB_001ad5d5: MOV RAX,RBX POP RBX RET LAB_001ad5da: LEA RDI,[0x1ec549] LEA RDX,[0x1ec593] LEA RCX,[0x1f1816] MOV ESI,0x1491 XOR EAX,EAX CALL 0x0011aeb0
/* 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> > >::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>>> * __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>>> ::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>>> *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>>> *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>>> *)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>> ::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>> *)this); return piVar2; }
45,323
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator->() const
zkingston[P]unknot/build_O0/_deps/json-src/include/nlohmann/detail/iterators/iter_impl.hpp
pointer operator->() const { JSON_ASSERT(m_object != nullptr); switch (m_object->m_data.m_type) { case value_t::object: { JSON_ASSERT(m_it.object_iterator != m_object->m_data.m_value.object->end()); return &(m_it.object_iterator->second); } case value_t::array: { JSON_ASSERT(m_it.array_iterator != m_object->m_data.m_value.array->end()); return &*m_it.array_iterator; } case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: { if (JSON_HEDLEY_LIKELY(m_it.primitive_iterator.is_begin())) { return m_object; } JSON_THROW(invalid_iterator::create(214, "cannot get value", m_object)); } } }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator->() const: subq $0x68, %rsp movq %rdi, 0x58(%rsp) movq 0x58(%rsp), %rax movq %rax, 0x10(%rsp) movq (%rax), %rax movzbl (%rax), %eax movq %rax, 0x18(%rsp) subq $0x9, %rax ja 0x81973 movq 0x18(%rsp), %rax leaq 0x54b314(%rip), %rcx # 0x5ccc44 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x10(%rsp), %rdi addq $0x8, %rdi callq 0x82040 addq $0x20, %rax movq %rax, 0x60(%rsp) jmp 0x81a5c movq 0x10(%rsp), %rdi addq $0x8, %rdi addq $0x8, %rdi callq 0x64a50 movq %rax, 0x60(%rsp) jmp 0x81a5c jmp 0x81973 movq 0x10(%rsp), %rdi addq $0x8, %rdi addq $0x10, %rdi callq 0x82060 xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0x8198f jmp 0x819a1 movq 0x10(%rsp), %rax movq (%rax), %rax movq %rax, 0x60(%rsp) jmp 0x81a5c movb $0x1, 0x23(%rsp) movl $0x20, %edi callq 0x125d0 movq %rax, (%rsp) leaq 0x37(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x13550 movq 0x8(%rsp), %rdx leaq 0x54cd24(%rip), %rsi # 0x5ce6f3 leaq 0x38(%rsp), %rdi callq 0x169d0 jmp 0x819db movq (%rsp), %rdi movq 0x10(%rsp), %rax movq (%rax), %rcx movl $0xd6, %esi leaq 0x38(%rsp), %rdx callq 0x82080 jmp 0x819f8 movq (%rsp), %rdi movb $0x0, 0x23(%rsp) leaq 0x60a000(%rip), %rsi # 0x68ba08 leaq 0x821(%rip), %rdx # 0x82230 callq 0x134c0 jmp 0x81a70 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x28(%rsp) movl %eax, 0x24(%rsp) jmp 0x81a3e movq %rax, %rcx movl %edx, %eax movq %rcx, 0x28(%rsp) movl %eax, 0x24(%rsp) leaq 0x38(%rsp), %rdi callq 0x13768 leaq 0x37(%rsp), %rdi callq 0x12d00 testb $0x1, 0x23(%rsp) jne 0x81a51 jmp 0x81a5a movq (%rsp), %rdi callq 0x12880 jmp 0x81a66 movq 0x60(%rsp), %rax addq $0x68, %rsp retq movq 0x28(%rsp), %rdi callq 0x13540
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEptEv: sub rsp, 68h mov qword ptr [rsp+68h+var_10], rdi; int mov rax, qword ptr [rsp+68h+var_10] mov qword ptr [rsp+68h+var_58], rax; int mov rax, [rax] movzx eax, byte ptr [rax] mov qword ptr [rsp+68h+var_50], rax; char sub rax, 9; switch 10 cases ja short def_81937; jumptable 0000000000081937 default case mov rax, qword ptr [rsp+68h+var_50] lea rcx, jpt_81937 movsxd rax, ds:(jpt_81937 - 5CCC44h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_81939: mov rdi, qword ptr [rsp+68h+var_58]; jumptable 0000000000081937 case 1 add rdi, 8 call _ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorS6_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEEEptEv; std::_Rb_tree_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::operator->(void) add rax, 20h ; ' ' mov [rsp+68h+var_8], rax jmp loc_81A5C loc_81955: mov rdi, qword ptr [rsp+68h+var_58]; jumptable 0000000000081937 case 2 add rdi, 8 add rdi, 8 call _ZNK9__gnu_cxx17__normal_iteratorIPN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEES5_ISF_SaISF_EEEdeEv; __gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::operator*(void) mov [rsp+68h+var_8], rax jmp loc_81A5C loc_81971: jmp short $+2; jumptable 0000000000081937 cases 0,3-9 def_81937: mov rdi, qword ptr [rsp+68h+var_58]; jumptable 0000000000081937 default case add rdi, 8 add rdi, 10h; this call _ZNK8nlohmann16json_abi_v3_11_36detail20primitive_iterator_t8is_beginEv; nlohmann::json_abi_v3_11_3::detail::primitive_iterator_t::is_begin(void) xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_8198F jmp short loc_819A1 loc_8198F: mov rax, qword ptr [rsp+68h+var_58] mov rax, [rax] mov [rsp+68h+var_8], rax jmp loc_81A5C loc_819A1: mov [rsp+68h+var_45], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov [rsp+68h+var_68], rax; int lea rdi, [rsp+68h+var_31] mov qword ptr [rsp+68h+var_60], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, qword ptr [rsp+68h+var_60] lea rsi, aCannotGetValue; "cannot get value" lea rdi, [rsp+68h+var_31+1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_819DB: mov rdi, [rsp+68h+var_68]; int mov rax, qword ptr [rsp+68h+var_58] mov rcx, [rax] mov esi, 0D6h lea rdx, [rsp+68h+var_31+1] call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ jmp short $+2 loc_819F8: mov rdi, [rsp+68h+var_68]; int mov [rsp+68h+var_45], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorD2Ev; void (*)(void *) call ___cxa_throw jmp short _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_ mov rcx, rax mov eax, edx mov [rsp+arg_20], rcx mov [rsp+arg_1C], eax jmp short loc_81A3E mov rcx, rax mov eax, edx mov [rsp+arg_20], rcx mov [rsp+arg_1C], eax lea rdi, [rsp+arg_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_81A3E: lea rdi, [rsp+arg_2F] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() test [rsp+arg_1B], 1 jnz short loc_81A51 jmp short loc_81A5A loc_81A51: mov rdi, [rsp+0]; void * call ___cxa_free_exception loc_81A5A: jmp short loc_81A66 loc_81A5C: mov rax, [rsp+68h+var_8] add rsp, 68h retn loc_81A66: mov rdi, [rsp+arg_20] call __Unwind_Resume
operator->: SUB RSP,0x68 MOV qword ptr [RSP + 0x58],RDI MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RAX] MOVZX EAX,byte ptr [RAX] MOV qword ptr [RSP + 0x18],RAX SUB RAX,0x9 JA 0x00181973 MOV RAX,qword ptr [RSP + 0x18] LEA RCX,[0x6ccc44] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x8 CALL 0x00182040 ADD RAX,0x20 MOV qword ptr [RSP + 0x60],RAX JMP 0x00181a5c caseD_2: MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x8 ADD RDI,0x8 CALL 0x00164a50 MOV qword ptr [RSP + 0x60],RAX JMP 0x00181a5c caseD_0: JMP 0x00181973 default: MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x8 ADD RDI,0x10 CALL 0x00182060 XOR AL,0xff XOR AL,0xff TEST AL,0x1 JNZ 0x0018198f JMP 0x001819a1 LAB_0018198f: MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x60],RAX JMP 0x00181a5c LAB_001819a1: MOV byte ptr [RSP + 0x23],0x1 MOV EDI,0x20 CALL 0x001125d0 MOV qword ptr [RSP],RAX LEA RDI,[RSP + 0x37] MOV qword ptr [RSP + 0x8],RDI CALL 0x00113550 MOV RDX,qword ptr [RSP + 0x8] LAB_001819c8: LEA RSI,[0x6ce6f3] LEA RDI,[RSP + 0x38] CALL 0x001169d0 JMP 0x001819db LAB_001819db: MOV RDI,qword ptr [RSP] MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RAX] LAB_001819e7: MOV ESI,0xd6 LEA RDX,[RSP + 0x38] CALL 0x00182080 JMP 0x001819f8 LAB_001819f8: MOV RDI,qword ptr [RSP] MOV byte ptr [RSP + 0x23],0x0 LEA RSI,[0x78ba08] LEA RDX,[0x182230] CALL 0x001134c0 LAB_00181a5c: MOV RAX,qword ptr [RSP + 0x60] ADD RSP,0x68 RET
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::TEMPNAMEPLACEHOLDERVALUE() const */ long __thiscall nlohmann::json_abi_v3_11_3::detail:: iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::operator->(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this) { byte bVar1; int8 uVar2; allocator local_31; string local_30 [32]; iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *local_10; long local_8; local_10 = this; switch(**(int1 **)this) { case 0: case 3: case 4: case 5: case 6: case 7: case 8: case 9: default: bVar1 = primitive_iterator_t::is_begin((primitive_iterator_t *)(this + 0x18)); if ((bVar1 & 1) == 0) { uVar2 = __cxa_allocate_exception(0x20); std::allocator<char>::allocator(); /* try { // try from 001819c8 to 001819d8 has its CatchHandler @ 00181a16 */ std::__cxx11::string::string<std::allocator<char>>(local_30,"cannot get value",&local_31); /* try { // try from 001819e7 to 00181a13 has its CatchHandler @ 00181a26 */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0xd6,local_30,*(int8 *)this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&invalid_iterator::typeinfo,invalid_iterator::~invalid_iterator); } local_8 = *(long *)this; break; case 1: local_8 = std:: _Rb_tree_iterator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::operator->((_Rb_tree_iterator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *)(this + 8)); local_8 = local_8 + 0x20; break; case 2: local_8 = __gnu_cxx:: __normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::operator*((__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> *)(this + 0x10)); } return local_8; }
45,324
my_caseup_str_utf8mb3
eloqsql/strings/ctype-utf8.c
static size_t my_caseup_str_utf8mb3(CHARSET_INFO *cs, char *src) { my_wc_t wc; int srcres, dstres; char *dst= src, *dst0= src; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(cs->caseup_multiply == 1); while (*src && (srcres= my_utf8mb3_uni_no_range(cs, &wc, (uchar *) src)) > 0) { my_toupper_utf8mb3(uni_plane, &wc); if ((dstres= my_uni_utf8mb3_no_range(cs, wc, (uchar*) dst)) <= 0) break; src+= srcres; dst+= dstres; } *dst= '\0'; return (size_t) (dst - dst0); }
O0
c
my_caseup_str_utf8mb3: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x8(%rbp), %rax movq 0x78(%rax), %rax movq %rax, -0x38(%rbp) jmp 0x65b2e jmp 0x65b30 movq -0x10(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x39(%rbp) je 0x65b5e movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx leaq -0x18(%rbp), %rsi callq 0x66990 movl %eax, -0x1c(%rbp) cmpl $0x0, %eax setg %al movb %al, -0x39(%rbp) movb -0x39(%rbp), %al testb $0x1, %al jne 0x65b67 jmp 0x65bb6 movq -0x38(%rbp), %rdi leaq -0x18(%rbp), %rsi callq 0x66af0 movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0x66b50 movl %eax, -0x20(%rbp) cmpl $0x0, %eax jg 0x65b8f jmp 0x65bb6 movl -0x1c(%rbp), %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) movl -0x20(%rbp), %ecx movq -0x28(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) jmp 0x65b30 movq -0x28(%rbp), %rax movb $0x0, (%rax) movq -0x28(%rbp), %rax movq -0x30(%rbp), %rcx subq %rcx, %rax addq $0x40, %rsp popq %rbp retq nop
my_caseup_str_utf8mb3: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov [rbp+var_28], rax mov rax, [rbp+var_10] mov [rbp+var_30], rax mov rax, [rbp+var_8] mov rax, [rax+78h] mov [rbp+var_38], rax jmp short $+2 loc_65B2E: jmp short $+2 loc_65B30: mov rax, [rbp+var_10] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, 0 mov [rbp+var_39], al jz short loc_65B5E mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] lea rsi, [rbp+var_18] call my_utf8mb3_uni_no_range mov [rbp+var_1C], eax cmp eax, 0 setnle al mov [rbp+var_39], al loc_65B5E: mov al, [rbp+var_39] test al, 1 jnz short loc_65B67 jmp short loc_65BB6 loc_65B67: mov rdi, [rbp+var_38] lea rsi, [rbp+var_18] call my_toupper_utf8mb3 mov rdi, [rbp+var_8] mov rsi, [rbp+var_18] mov rdx, [rbp+var_28] call my_uni_utf8mb3_no_range mov [rbp+var_20], eax cmp eax, 0 jg short loc_65B8F jmp short loc_65BB6 loc_65B8F: mov ecx, [rbp+var_1C] mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax mov ecx, [rbp+var_20] mov rax, [rbp+var_28] movsxd rcx, ecx add rax, rcx mov [rbp+var_28], rax jmp loc_65B30 loc_65BB6: mov rax, [rbp+var_28] mov byte ptr [rax], 0 mov rax, [rbp+var_28] mov rcx, [rbp+var_30] sub rax, rcx add rsp, 40h pop rbp retn
_BYTE * my_caseup_str_utf8mb3(long long a1, _BYTE *a2) { bool v3; // [rsp+7h] [rbp-39h] long long v4; // [rsp+8h] [rbp-38h] _BYTE *v5; // [rsp+18h] [rbp-28h] int v6; // [rsp+20h] [rbp-20h] int v7; // [rsp+24h] [rbp-1Ch] long long v8; // [rsp+28h] [rbp-18h] BYREF _BYTE *v9; // [rsp+30h] [rbp-10h] long long v10; // [rsp+38h] [rbp-8h] v10 = a1; v9 = a2; v5 = a2; v4 = *(_QWORD *)(a1 + 120); while ( 1 ) { v3 = 0; if ( *v9 ) { v7 = my_utf8mb3_uni_no_range(v10, &v8, v9); v3 = v7 > 0; } if ( !v3 ) break; my_toupper_utf8mb3(v4, &v8); v6 = my_uni_utf8mb3_no_range(v10, v8, v5); if ( v6 <= 0 ) break; v9 += v7; v5 += v6; } *v5 = 0; return (_BYTE *)(v5 - a2); }
my_caseup_str_utf8mb3: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RBP + -0x38],RAX JMP 0x00165b2e LAB_00165b2e: JMP 0x00165b30 LAB_00165b30: MOV RAX,qword ptr [RBP + -0x10] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x39],AL JZ 0x00165b5e MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0x18] CALL 0x00166990 MOV dword ptr [RBP + -0x1c],EAX CMP EAX,0x0 SETG AL MOV byte ptr [RBP + -0x39],AL LAB_00165b5e: MOV AL,byte ptr [RBP + -0x39] TEST AL,0x1 JNZ 0x00165b67 JMP 0x00165bb6 LAB_00165b67: MOV RDI,qword ptr [RBP + -0x38] LEA RSI,[RBP + -0x18] CALL 0x00166af0 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x28] CALL 0x00166b50 MOV dword ptr [RBP + -0x20],EAX CMP EAX,0x0 JG 0x00165b8f JMP 0x00165bb6 LAB_00165b8f: MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX MOV ECX,dword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x28] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX JMP 0x00165b30 LAB_00165bb6: MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] SUB RAX,RCX ADD RSP,0x40 POP RBP RET
long my_caseup_str_utf8mb3(long param_1,char *param_2) { int8 uVar1; bool bVar2; int iVar3; char *local_30; int local_24; int8 local_20; char *local_18; long local_10; uVar1 = *(int8 *)(param_1 + 0x78); local_30 = param_2; local_18 = param_2; local_10 = param_1; while( true ) { bVar2 = false; if (*local_18 != '\0') { local_24 = my_utf8mb3_uni_no_range(local_10,&local_20,local_18); bVar2 = 0 < local_24; } if (!bVar2) break; my_toupper_utf8mb3(uVar1,&local_20); iVar3 = my_uni_utf8mb3_no_range(local_10,local_20,local_30); if (iVar3 < 1) break; local_18 = local_18 + local_24; local_30 = local_30 + iVar3; } *local_30 = '\0'; return (long)local_30 - (long)param_2; }
45,325
my_caseup_str_utf8mb3
eloqsql/strings/ctype-utf8.c
static size_t my_caseup_str_utf8mb3(CHARSET_INFO *cs, char *src) { my_wc_t wc; int srcres, dstres; char *dst= src, *dst0= src; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(cs->caseup_multiply == 1); while (*src && (srcres= my_utf8mb3_uni_no_range(cs, &wc, (uchar *) src)) > 0) { my_toupper_utf8mb3(uni_plane, &wc); if ((dstres= my_uni_utf8mb3_no_range(cs, wc, (uchar*) dst)) <= 0) break; src+= srcres; dst+= dstres; } *dst= '\0'; return (size_t) (dst - dst0); }
O3
c
my_caseup_str_utf8mb3: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx cmpb $0x0, (%rsi) movq %rsi, %r14 je 0x4f65f movq 0x78(%rdi), %r13 leaq -0x30(%rbp), %r15 movq %rbx, %r12 movq %rbx, %r14 movq %r15, %rdi movq %r12, %rsi callq 0x4ff38 testl %eax, %eax je 0x4f65f movq 0x8(%r13), %rdx movq -0x30(%rbp), %rcx movzbl %ch, %esi movq (%rdx,%rsi,8), %rdx testq %rdx, %rdx je 0x4f5ee movzbl %cl, %ecx leaq (%rcx,%rcx,2), %rcx movl (%rdx,%rcx,4), %ecx movq %rcx, -0x30(%rbp) movl $0x1, %edx cmpq $0x80, %rcx jb 0x4f648 movl $0x2, %edx cmpq $0x800, %rcx # imm = 0x800 jb 0x4f62f cmpq $0xffff, %rcx # imm = 0xFFFF ja 0x4f65f movl %ecx, %edx andb $0x3f, %dl orb $-0x80, %dl movb %dl, 0x2(%r14) shrq $0x6, %rcx orq $0x800, %rcx # imm = 0x800 movl $0x3, %edx movl %ecx, %esi andb $0x3f, %sil orb $-0x80, %sil movb %sil, 0x1(%r14) shrq $0x6, %rcx orq $0xc0, %rcx movb %cl, (%r14) movl %eax, %eax addq %rdx, %r14 cmpb $0x0, (%r12,%rax) leaq (%r12,%rax), %r12 jne 0x4f5b9 movb $0x0, (%r14) subq %rbx, %r14 movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_caseup_str_utf8mb3: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi cmp byte ptr [rsi], 0 mov r14, rsi jz loc_4F65F mov r13, [rdi+78h] lea r15, [rbp+var_30] mov r12, rbx mov r14, rbx loc_4F5B9: mov rdi, r15 mov rsi, r12 call my_utf8mb3_uni_no_range test eax, eax jz loc_4F65F mov rdx, [r13+8] mov rcx, [rbp+var_30] movzx esi, ch mov rdx, [rdx+rsi*8] test rdx, rdx jz short loc_4F5EE movzx ecx, cl lea rcx, [rcx+rcx*2] mov ecx, [rdx+rcx*4] mov [rbp+var_30], rcx loc_4F5EE: mov edx, 1 cmp rcx, 80h jb short loc_4F648 mov edx, 2 cmp rcx, 800h jb short loc_4F62F cmp rcx, 0FFFFh ja short loc_4F65F mov edx, ecx and dl, 3Fh or dl, 80h mov [r14+2], dl shr rcx, 6 or rcx, 800h mov edx, 3 loc_4F62F: mov esi, ecx and sil, 3Fh or sil, 80h mov [r14+1], sil shr rcx, 6 or rcx, 0C0h loc_4F648: mov [r14], cl mov eax, eax add r14, rdx cmp byte ptr [r12+rax], 0 lea r12, [r12+rax] jnz loc_4F5B9 loc_4F65F: mov byte ptr [r14], 0 sub r14, rbx mov rax, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_caseup_str_utf8mb3(long long a1, _BYTE *a2) { unsigned long long v2; // rax _BYTE *v3; // r14 long long v4; // r13 _BYTE *v5; // r12 unsigned int v6; // eax unsigned long long v7; // rcx long long v8; // rdx long long v9; // rdx bool v10; // zf unsigned long long v12; // [rsp+0h] [rbp-30h] BYREF v12 = v2; v3 = a2; if ( *a2 ) { v4 = *(_QWORD *)(a1 + 120); v5 = a2; v3 = a2; do { v6 = my_utf8mb3_uni_no_range(&v12, v5); if ( !v6 ) break; v7 = v12; v8 = *(_QWORD *)(*(_QWORD *)(v4 + 8) + 8LL * BYTE1(v12)); if ( v8 ) { v7 = *(unsigned int *)(v8 + 12LL * (unsigned __int8)v12); v12 = v7; } v9 = 1LL; if ( v7 >= 0x80 ) { v9 = 2LL; if ( v7 >= 0x800 ) { if ( v7 > 0xFFFF ) break; v3[2] = v7 & 0x3F | 0x80; v7 = (v7 >> 6) | 0x800; v9 = 3LL; } v3[1] = v7 & 0x3F | 0x80; v7 = (v7 >> 6) | 0xC0; } *v3 = v7; v3 += v9; v10 = v5[v6] == 0; v5 += v6; } while ( !v10 ); } *v3 = 0; return v3 - a2; }
my_caseup_str_utf8mb3: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI CMP byte ptr [RSI],0x0 MOV R14,RSI JZ 0x0014f65f MOV R13,qword ptr [RDI + 0x78] LEA R15,[RBP + -0x30] MOV R12,RBX MOV R14,RBX LAB_0014f5b9: MOV RDI,R15 MOV RSI,R12 CALL 0x0014ff38 TEST EAX,EAX JZ 0x0014f65f MOV RDX,qword ptr [R13 + 0x8] MOV RCX,qword ptr [RBP + -0x30] MOVZX ESI,CH MOV RDX,qword ptr [RDX + RSI*0x8] TEST RDX,RDX JZ 0x0014f5ee MOVZX ECX,CL LEA RCX,[RCX + RCX*0x2] MOV ECX,dword ptr [RDX + RCX*0x4] MOV qword ptr [RBP + -0x30],RCX LAB_0014f5ee: MOV EDX,0x1 CMP RCX,0x80 JC 0x0014f648 MOV EDX,0x2 CMP RCX,0x800 JC 0x0014f62f CMP RCX,0xffff JA 0x0014f65f MOV EDX,ECX AND DL,0x3f OR DL,0x80 MOV byte ptr [R14 + 0x2],DL SHR RCX,0x6 OR RCX,0x800 MOV EDX,0x3 LAB_0014f62f: MOV ESI,ECX AND SIL,0x3f OR SIL,0x80 MOV byte ptr [R14 + 0x1],SIL SHR RCX,0x6 OR RCX,0xc0 LAB_0014f648: MOV byte ptr [R14],CL MOV EAX,EAX ADD R14,RDX CMP byte ptr [R12 + RAX*0x1],0x0 LEA R12,[R12 + RAX*0x1] JNZ 0x0014f5b9 LAB_0014f65f: MOV byte ptr [R14],0x0 SUB R14,RBX MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_caseup_str_utf8mb3(long param_1,char *param_2) { char *pcVar1; long lVar2; uint uVar3; ulong in_RAX; ulong uVar4; long lVar5; char *pcVar6; char *pcVar7; ulong local_38; pcVar7 = param_2; if (*param_2 != '\0') { lVar2 = *(long *)(param_1 + 0x78); pcVar6 = param_2; local_38 = in_RAX; do { uVar3 = my_utf8mb3_uni_no_range(&local_38,pcVar6); if (uVar3 == 0) break; lVar5 = *(long *)(*(long *)(lVar2 + 8) + (local_38 >> 8 & 0xff) * 8); if (lVar5 != 0) { local_38 = (ulong)*(uint *)(lVar5 + (local_38 & 0xff) * 0xc); } lVar5 = 1; uVar4 = local_38; if (0x7f < local_38) { lVar5 = 2; if (0x7ff < local_38) { if (0xffff < local_38) break; pcVar7[2] = (byte)local_38 & 0x3f | 0x80; uVar4 = local_38 >> 6 | 0x800; lVar5 = 3; } pcVar7[1] = (byte)uVar4 & 0x3f | 0x80; uVar4 = uVar4 >> 6 | 0xc0; } *pcVar7 = (char)uVar4; pcVar7 = pcVar7 + lVar5; pcVar1 = pcVar6 + uVar3; pcVar6 = pcVar6 + uVar3; } while (*pcVar1 != '\0'); } *pcVar7 = '\0'; return (long)pcVar7 - (long)param_2; }
45,326
OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<unsigned char const*, 4u, true>::allocate(unsigned int)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/../tmr/../vtr/stackBuffer.h
inline void StackBuffer<TYPE,SIZE,POD_TYPE>::allocate(size_type capacity) { // Again, is alignment an issue here? C++ spec says new will return pointer // "suitably aligned" for conversion to pointers of other types, which implies // at least an alignment of 16. _dynamicData = static_cast<char*>(::operator new(capacity * sizeof(TYPE))); _data = reinterpret_cast<TYPE*>(_dynamicData); _capacity = capacity; }
O0
c
OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<unsigned char const*, 4u, true>::allocate(unsigned int): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) movl -0xc(%rbp), %eax movl %eax, %edi shlq $0x3, %rdi callq 0xcd100 movq %rax, %rcx movq -0x18(%rbp), %rax movq %rcx, 0x30(%rax) movq 0x30(%rax), %rcx movq %rcx, (%rax) movl -0xc(%rbp), %ecx movl %ecx, 0xc(%rax) addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIPKhLj4ELb1EE8allocateEj: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov rax, [rbp+var_8] mov [rbp+var_18], rax mov eax, [rbp+var_C] mov edi, eax shl rdi, 3; unsigned __int64 call __Znwm; operator new(ulong) mov rcx, rax mov rax, [rbp+var_18] mov [rax+30h], rcx mov rcx, [rax+30h] mov [rax], rcx mov ecx, [rbp+var_C] mov [rax+0Ch], ecx add rsp, 20h pop rbp retn
long long OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<unsigned char const*,4u,true>::allocate( long long a1, unsigned int a2) { long long v2; // rcx long long result; // rax v2 = operator new(8LL * a2); result = a1; *(_QWORD *)(a1 + 48) = v2; *(_QWORD *)a1 = *(_QWORD *)(a1 + 48); *(_DWORD *)(a1 + 12) = a2; return result; }
45,327
OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<unsigned char const*, 4u, true>::allocate(unsigned int)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/../tmr/../vtr/stackBuffer.h
inline void StackBuffer<TYPE,SIZE,POD_TYPE>::allocate(size_type capacity) { // Again, is alignment an issue here? C++ spec says new will return pointer // "suitably aligned" for conversion to pointers of other types, which implies // at least an alignment of 16. _dynamicData = static_cast<char*>(::operator new(capacity * sizeof(TYPE))); _data = reinterpret_cast<TYPE*>(_dynamicData); _capacity = capacity; }
O2
c
OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<unsigned char const*, 4u, true>::allocate(unsigned int): pushq %r14 pushq %rbx pushq %rax movl %esi, %ebx movq %rdi, %r14 movl %esi, %edi shlq $0x2, %rdi callq 0x52790 movq %rax, 0x50(%r14) movq %rax, (%r14) movl %ebx, 0xc(%r14) addq $0x8, %rsp popq %rbx popq %r14 retq nop
_ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIiLj16ELb1EE8allocateEj: push r14 push rbx push rax mov ebx, esi mov r14, rdi mov edi, esi shl rdi, 2; unsigned __int64 call __Znwm; operator new(ulong) mov [r14+50h], rax mov [r14], rax mov [r14+0Ch], ebx add rsp, 8 pop rbx pop r14 retn
long long OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,16u,true>::allocate(long long a1, unsigned int a2) { long long result; // rax result = operator new(4LL * a2); *(_QWORD *)(a1 + 80) = result; *(_QWORD *)a1 = result; *(_DWORD *)(a1 + 12) = a2; return result; }
allocate: PUSH R14 PUSH RBX PUSH RAX MOV EBX,ESI MOV R14,RDI MOV EDI,ESI SHL RDI,0x2 CALL 0x00152790 MOV qword ptr [R14 + 0x50],RAX MOV qword ptr [R14],RAX MOV dword ptr [R14 + 0xc],EBX ADD RSP,0x8 POP RBX POP R14 RET
/* OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int, 16u, true>::allocate(unsigned int) */ void __thiscall OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,16u,true>::allocate (StackBuffer<int,16u,true> *this,uint param_1) { void *pvVar1; pvVar1 = operator_new((ulong)param_1 << 2); *(void **)(this + 0x50) = pvVar1; *(void **)this = pvVar1; *(uint *)(this + 0xc) = param_1; return; }
45,328
void nlohmann::json_abi_v3_11_3::detail::from_json<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::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::string_t&)
monkey531[P]llama/common/./json.hpp
inline void from_json(const BasicJsonType& j, typename BasicJsonType::string_t& s) { if (JSON_HEDLEY_UNLIKELY(!j.is_string())) { JSON_THROW(type_error::create(302, concat("type must be string, but is ", j.type_name()), &j)); } s = *j.template get_ptr<const typename BasicJsonType::string_t*>(); }
O0
cpp
void nlohmann::json_abi_v3_11_3::detail::from_json<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::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::string_t&): subq $0x58, %rsp movq %rdi, 0x50(%rsp) movq %rsi, 0x48(%rsp) movq 0x50(%rsp), %rdi callq 0xa1b90 xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xa4f67 jmp 0xa5019 movb $0x1, 0x13(%rsp) movl $0x20, %edi callq 0x50540 movq %rax, 0x8(%rsp) movq 0x50(%rsp), %rdi callq 0xa04c0 movq %rax, 0x20(%rsp) leaq 0x127d3a(%rip), %rsi # 0x1ccccb leaq 0x28(%rsp), %rdi leaq 0x20(%rsp), %rdx callq 0xa0410 jmp 0xa4fa2 movq 0x8(%rsp), %rdi movq 0x50(%rsp), %rcx movl $0x12e, %esi # imm = 0x12E leaq 0x28(%rsp), %rdx callq 0xa0260 jmp 0xa4fbd movq 0x8(%rsp), %rdi movb $0x0, 0x13(%rsp) leaq 0x1ad12a(%rip), %rsi # 0x2520f8 leaq -0x4a65(%rip), %rdx # 0xa0570 callq 0x508f0 jmp 0xa503f movq %rax, %rcx movl %edx, %eax movq %rcx, 0x18(%rsp) movl %eax, 0x14(%rsp) jmp 0xa5004 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x18(%rsp) movl %eax, 0x14(%rsp) leaq 0x28(%rsp), %rdi callq 0x510c0 testb $0x1, 0x13(%rsp) jne 0xa500d jmp 0xa5017 movq 0x8(%rsp), %rdi callq 0x50c40 jmp 0xa5035 movq 0x50(%rsp), %rdi callq 0xa5040 movq %rax, %rsi movq 0x48(%rsp), %rdi callq 0x50fe0 addq $0x58, %rsp retq movq 0x18(%rsp), %rdi callq 0x50940 nop
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_8string_tE: sub rsp, 58h mov qword ptr [rsp+58h+var_8], rdi; char mov qword ptr [rsp+58h+var_10], rsi; int mov rdi, qword ptr [rsp+58h+var_8] call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9is_stringEv; 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>::is_string(void) xor al, 0FFh xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_A4F67 jmp loc_A5019 loc_A4F67: mov [rsp+58h+var_45], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov [rsp+58h+var_50], rax; int mov rdi, qword ptr [rsp+58h+var_8] call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) mov qword ptr [rsp+58h+var_38], rax; int lea rsi, aTypeMustBeStri; "type must be string, but is " lea rdi, [rsp+58h+var_30] lea rdx, [rsp+58h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) jmp short $+2 loc_A4FA2: mov rdi, [rsp+58h+var_50]; int mov rcx, qword ptr [rsp+58h+var_8] mov esi, 12Eh lea rdx, [rsp+58h+var_30] call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ jmp short $+2 loc_A4FBD: mov rdi, [rsp+58h+var_50]; void * mov [rsp+58h+var_45], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev; void (*)(void *) call ___cxa_throw jmp short loc_A503F mov rcx, rax mov eax, edx mov [rsp+arg_10], rcx mov [rsp+arg_C], eax jmp short loc_A5004 mov rcx, rax mov eax, edx mov [rsp+arg_10], rcx mov [rsp+arg_C], eax lea rdi, [rsp+arg_20]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_A5004: test [rsp+arg_B], 1 jnz short loc_A500D jmp short loc_A5017 loc_A500D: mov rdi, [rsp+arg_0]; void * call ___cxa_free_exception loc_A5017: jmp short loc_A5035 loc_A5019: mov rdi, qword ptr [rsp+58h+var_8] call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKS9_TnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv mov rsi, rax mov rdi, qword ptr [rsp+58h+var_10] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&) add rsp, 58h retn loc_A5035: mov rdi, [rsp+arg_10] call __Unwind_Resume loc_A503F: nop
long long nlohmann::json_abi_v3_11_3::detail::from_json<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>>( _BYTE *a1, long long a2) { long long v2; // rax void *exception; // [rsp+8h] [rbp-50h] int v5[2]; // [rsp+20h] [rbp-38h] BYREF _BYTE v6[32]; // [rsp+28h] [rbp-30h] BYREF int v7[2]; // [rsp+48h] [rbp-10h] char v8[8]; // [rsp+50h] [rbp-8h] *(_QWORD *)v8 = a1; *(_QWORD *)v7 = a2; if ( !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>::is_string(a1) ) { exception = __cxa_allocate_exception(0x20uLL); *(_QWORD *)v5 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(*(_BYTE **)v8); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v6, (long long)"type must be string, but is ", (long long)v5); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( (long long)exception, 302, (long long)v6, *(long long *)v8); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::type_error::~type_error); } v2 = ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKS9_TnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv(*(_QWORD *)v8); return std::string::operator=(*(_QWORD *)v7, v2); }
from_json<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>>: SUB RSP,0x58 MOV qword ptr [RSP + 0x50],RDI MOV qword ptr [RSP + 0x48],RSI MOV RDI,qword ptr [RSP + 0x50] CALL 0x001a1b90 XOR AL,0xff XOR AL,0xff XOR AL,0xff TEST AL,0x1 JNZ 0x001a4f67 JMP 0x001a5019 LAB_001a4f67: MOV byte ptr [RSP + 0x13],0x1 MOV EDI,0x20 CALL 0x00150540 MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x50] CALL 0x001a04c0 MOV qword ptr [RSP + 0x20],RAX LAB_001a4f8a: LEA RSI,[0x2ccccb] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x20] CALL 0x001a0410 JMP 0x001a4fa2 LAB_001a4fa2: MOV RDI,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x50] LAB_001a4fac: MOV ESI,0x12e LEA RDX,[RSP + 0x28] CALL 0x001a0260 JMP 0x001a4fbd LAB_001a4fbd: MOV RDI,qword ptr [RSP + 0x8] MOV byte ptr [RSP + 0x13],0x0 LEA RSI,[0x3520f8] LEA RDX,[0x1a0570] CALL 0x001508f0 LAB_001a5019: MOV RDI,qword ptr [RSP + 0x50] CALL 0x001a5040 MOV RSI,RAX MOV RDI,qword ptr [RSP + 0x48] CALL 0x00150fe0 ADD RSP,0x58 RET
/* void nlohmann::json_abi_v3_11_3::detail::from_json<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::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&, nlohmann::json_abi_v3_11_3::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>::string_t&) */ void nlohmann::json_abi_v3_11_3::detail:: from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (basic_json *param_1,string_t *param_2) { string *psVar1; int8 uVar2; byte bVar3; char *local_38; detail local_30 [32]; string_t *local_10; basic_json *local_8; local_10 = param_2; local_8 = param_1; bVar3 = 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> ::is_string((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)param_1); if (((bVar3 ^ 0xff) & 1) == 0) { psVar1 = (string *) _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKS9_TnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv (local_8); std::__cxx11::string::operator=((string *)local_10,psVar1); return; } uVar2 = __cxa_allocate_exception(0x20); local_38 = (char *)basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)local_8); /* try { // try from 001a4f8a to 001a4f9f has its CatchHandler @ 001a4fdc */ concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_30,"type must be string, but is ",&local_38); /* try { // try from 001a4fac to 001a4fd9 has its CatchHandler @ 001a4fec */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar2,0x12e,local_30,local_8); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&type_error::typeinfo,type_error::~type_error); }
45,329
ma_net_init
eloqsql/libmariadb/libmariadb/ma_net.c
int ma_net_init(NET *net, MARIADB_PVIO* pvio) { if (!(net->buff=(uchar*) malloc(net_buffer_length))) return 1; if (!net->extension) return 1; memset(net->buff, 0, net_buffer_length); net->max_packet_size= MAX(net_buffer_length, max_allowed_packet); net->buff_end=net->buff+(net->max_packet=net_buffer_length); net->pvio = pvio; net->error=0; net->return_status=0; net->read_timeout=(uint) net_read_timeout; /* Timeout for read */ net->compress_pkt_nr= net->pkt_nr= 0; net->write_pos=net->read_pos = net->buff; net->last_error[0]= net->sqlstate[0] =0; net->compress=0; net->reading_or_writing=0; net->where_b = net->remain_in_buf=0; net->last_errno=0; if (pvio != 0) /* If real connection */ { ma_pvio_get_handle(pvio, &net->fd); ma_pvio_blocking(pvio, 1, 0); ma_pvio_fast_send(pvio); } return 0; }
O0
c
ma_net_init: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) leaq 0x1a431(%rip), %rax # 0x5fea8 movq (%rax), %rdi callq 0x135b0 movq -0x10(%rbp), %rcx movq %rax, 0x8(%rcx) cmpq $0x0, %rax jne 0x45a99 movl $0x1, -0x4(%rbp) jmp 0x45c20 movq -0x10(%rbp), %rax cmpq $0x0, 0x2a0(%rax) jne 0x45ab3 movl $0x1, -0x4(%rbp) jmp 0x45c20 movq -0x10(%rbp), %rax movq 0x8(%rax), %rdi leaq 0x1a3e6(%rip), %rax # 0x5fea8 movq (%rax), %rdx xorl %esi, %esi callq 0x13250 leaq 0x1a3d5(%rip), %rax # 0x5fea8 movq (%rax), %rax leaq 0x1a3b3(%rip), %rcx # 0x5fe90 cmpq (%rcx), %rax jbe 0x45af2 leaq 0x1a3bf(%rip), %rax # 0x5fea8 movq (%rax), %rax movq %rax, -0x20(%rbp) jmp 0x45b00 leaq 0x1a397(%rip), %rax # 0x5fe90 movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x58(%rax) movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx leaq 0x1a38d(%rip), %rax # 0x5fea8 movq (%rax), %rax movq -0x10(%rbp), %rdx movq %rax, 0x50(%rdx) addq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x18(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rax movb $0x0, 0x94(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x78(%rax) leaq 0x1a33e(%rip), %rax # 0x5fe98 movq (%rax), %rax movl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x6c(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x60(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x64(%rax) movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x20(%rax) movq -0x10(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x10(%rbp), %rax movb $0x0, 0x297(%rax) movq -0x10(%rbp), %rax movb $0x0, 0x97(%rax) movq -0x10(%rbp), %rax movb $0x0, 0x84(%rax) movq -0x10(%rbp), %rax movb $0x0, 0x80(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x30(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x48(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x90(%rax) cmpq $0x0, -0x18(%rbp) je 0x45c19 movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rsi addq $0x28, %rsi callq 0x23d80 movq -0x18(%rbp), %rdi movl $0x1, %esi xorl %eax, %eax movl %eax, %edx callq 0x237f0 movq -0x18(%rbp), %rdi callq 0x23380 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopl (%rax)
ma_net_init: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi lea rax, net_buffer_length mov rdi, [rax] call _malloc mov rcx, [rbp+var_10] mov [rcx+8], rax cmp rax, 0 jnz short loc_45A99 mov [rbp+var_4], 1 jmp loc_45C20 loc_45A99: mov rax, [rbp+var_10] cmp qword ptr [rax+2A0h], 0 jnz short loc_45AB3 mov [rbp+var_4], 1 jmp loc_45C20 loc_45AB3: mov rax, [rbp+var_10] mov rdi, [rax+8] lea rax, net_buffer_length mov rdx, [rax] xor esi, esi call _memset lea rax, net_buffer_length mov rax, [rax] lea rcx, max_allowed_packet cmp rax, [rcx] jbe short loc_45AF2 lea rax, net_buffer_length mov rax, [rax] mov [rbp+var_20], rax jmp short loc_45B00 loc_45AF2: lea rax, max_allowed_packet mov rax, [rax] mov [rbp+var_20], rax loc_45B00: mov rcx, [rbp+var_20] mov rax, [rbp+var_10] mov [rax+58h], rcx mov rax, [rbp+var_10] mov rcx, [rax+8] lea rax, net_buffer_length mov rax, [rax] mov rdx, [rbp+var_10] mov [rdx+50h], rax add rcx, rax mov rax, [rbp+var_10] mov [rax+10h], rcx mov rcx, [rbp+var_18] mov rax, [rbp+var_10] mov [rax], rcx mov rax, [rbp+var_10] mov byte ptr [rax+94h], 0 mov rax, [rbp+var_10] mov qword ptr [rax+78h], 0 lea rax, net_read_timeout mov rax, [rax] mov ecx, eax mov rax, [rbp+var_10] mov [rax+6Ch], ecx mov rax, [rbp+var_10] mov dword ptr [rax+60h], 0 mov rax, [rbp+var_10] mov dword ptr [rax+64h], 0 mov rax, [rbp+var_10] mov rcx, [rax+8] mov rax, [rbp+var_10] mov [rax+20h], rcx mov rax, [rbp+var_10] mov [rax+18h], rcx mov rax, [rbp+var_10] mov byte ptr [rax+297h], 0 mov rax, [rbp+var_10] mov byte ptr [rax+97h], 0 mov rax, [rbp+var_10] mov byte ptr [rax+84h], 0 mov rax, [rbp+var_10] mov byte ptr [rax+80h], 0 mov rax, [rbp+var_10] mov qword ptr [rax+30h], 0 mov rax, [rbp+var_10] mov qword ptr [rax+48h], 0 mov rax, [rbp+var_10] mov dword ptr [rax+90h], 0 cmp [rbp+var_18], 0 jz short loc_45C19 mov rdi, [rbp+var_18] mov rsi, [rbp+var_10] add rsi, 28h ; '(' call ma_pvio_get_handle mov rdi, [rbp+var_18] mov esi, 1 xor eax, eax mov edx, eax call ma_pvio_blocking mov rdi, [rbp+var_18] call ma_pvio_fast_send loc_45C19: mov [rbp+var_4], 0 loc_45C20: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long ma_net_init(long long a1, long long a2) { long long v2; // rax long long v3; // rcx long long v4; // rax long long v5; // rcx long long v7; // [rsp+0h] [rbp-20h] v2 = malloc(net_buffer_length); *(_QWORD *)(a1 + 8) = v2; if ( v2 ) { if ( *(_QWORD *)(a1 + 672) ) { memset(*(_QWORD *)(a1 + 8), 0LL, net_buffer_length); if ( net_buffer_length <= max_allowed_packet ) v7 = max_allowed_packet; else v7 = net_buffer_length; *(_QWORD *)(a1 + 88) = v7; v3 = *(_QWORD *)(a1 + 8); v4 = net_buffer_length; *(_QWORD *)(a1 + 80) = net_buffer_length; *(_QWORD *)(a1 + 16) = v4 + v3; *(_QWORD *)a1 = a2; *(_BYTE *)(a1 + 148) = 0; *(_QWORD *)(a1 + 120) = 0LL; *(_DWORD *)(a1 + 108) = net_read_timeout; *(_DWORD *)(a1 + 96) = 0; *(_DWORD *)(a1 + 100) = 0; v5 = *(_QWORD *)(a1 + 8); *(_QWORD *)(a1 + 32) = v5; *(_QWORD *)(a1 + 24) = v5; *(_BYTE *)(a1 + 663) = 0; *(_BYTE *)(a1 + 151) = 0; *(_BYTE *)(a1 + 132) = 0; *(_BYTE *)(a1 + 128) = 0; *(_QWORD *)(a1 + 48) = 0LL; *(_QWORD *)(a1 + 72) = 0LL; *(_DWORD *)(a1 + 144) = 0; if ( a2 ) { ma_pvio_get_handle(a2, a1 + 40); ma_pvio_blocking(a2, 1, 0LL); ma_pvio_fast_send(a2); } return 0; } else { return 1; } } else { return 1; } }
ma_net_init: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI LEA RAX,[0x15fea8] MOV RDI,qword ptr [RAX] CALL 0x001135b0 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x8],RAX CMP RAX,0x0 JNZ 0x00145a99 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00145c20 LAB_00145a99: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x2a0],0x0 JNZ 0x00145ab3 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00145c20 LAB_00145ab3: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x8] LEA RAX,[0x15fea8] MOV RDX,qword ptr [RAX] XOR ESI,ESI CALL 0x00113250 LEA RAX,[0x15fea8] MOV RAX,qword ptr [RAX] LEA RCX,[0x15fe90] CMP RAX,qword ptr [RCX] JBE 0x00145af2 LEA RAX,[0x15fea8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX JMP 0x00145b00 LAB_00145af2: LEA RAX,[0x15fe90] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX LAB_00145b00: MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x58],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] LEA RAX,[0x15fea8] MOV RAX,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV qword ptr [RDX + 0x50],RAX ADD RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x94],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x78],0x0 LEA RAX,[0x15fe98] MOV RAX,qword ptr [RAX] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x6c],ECX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x60],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x64],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x20],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x297],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x97],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x84],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x80],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x30],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x48],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x90],0x0 CMP qword ptr [RBP + -0x18],0x0 JZ 0x00145c19 MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x28 CALL 0x00123d80 MOV RDI,qword ptr [RBP + -0x18] MOV ESI,0x1 XOR EAX,EAX MOV EDX,EAX CALL 0x001237f0 MOV RDI,qword ptr [RBP + -0x18] CALL 0x00123380 LAB_00145c19: MOV dword ptr [RBP + -0x4],0x0 LAB_00145c20: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 ma_net_init(long *param_1,long param_2) { size_t sVar1; void *pvVar2; ulong local_28; int4 local_c; pvVar2 = malloc(net_buffer_length); param_1[1] = (long)pvVar2; if (pvVar2 == (void *)0x0) { local_c = 1; } else if (param_1[0x54] == 0) { local_c = 1; } else { memset((void *)param_1[1],0,net_buffer_length); if (max_allowed_packet < net_buffer_length) { local_28 = net_buffer_length; } else { local_28 = max_allowed_packet; } param_1[0xb] = local_28; sVar1 = net_buffer_length; param_1[10] = net_buffer_length; param_1[2] = param_1[1] + sVar1; *param_1 = param_2; *(int1 *)((long)param_1 + 0x94) = 0; param_1[0xf] = 0; *(int *)((long)param_1 + 0x6c) = (int)net_read_timeout; *(int4 *)(param_1 + 0xc) = 0; *(int4 *)((long)param_1 + 100) = 0; param_1[4] = param_1[1]; param_1[3] = param_1[1]; *(int1 *)((long)param_1 + 0x297) = 0; *(int1 *)((long)param_1 + 0x97) = 0; *(int1 *)((long)param_1 + 0x84) = 0; *(int1 *)(param_1 + 0x10) = 0; param_1[6] = 0; param_1[9] = 0; *(int4 *)(param_1 + 0x12) = 0; if (param_2 != 0) { ma_pvio_get_handle(param_2,param_1 + 5); ma_pvio_blocking(param_2,1,0); ma_pvio_fast_send(param_2); } local_c = 0; } return local_c; }
45,330
binding_system_is_descendant_scope
eshkol/src/frontend/binding/core/binding_scope.c
bool binding_system_is_descendant_scope(BindingSystem* system, uint64_t scope_id, uint64_t ancestor_id) { assert(system != NULL); // Check if scope_id is the same as ancestor_id if (scope_id == ancestor_id) { return true; } // Check if scope_id is a descendant of ancestor_id uint64_t parent_id = binding_system_get_parent_scope(system, scope_id); while (parent_id != 0) { if (parent_id == ancestor_id) { return true; } parent_id = binding_system_get_parent_scope(system, parent_id); } // Not a descendant return false; }
O3
c
binding_system_is_descendant_scope: pushq %rbp movq %rsp, %rbp testq %rdi, %rdi je 0x80a8 movb $0x1, %al cmpq %rdx, %rsi je 0x8053 movq 0x78(%rdi), %rcx testq %rcx, %rcx je 0x8051 movq 0x58(%rdi), %r8 xorl %eax, %eax cmpq %rsi, (%r8,%rax,8) je 0x8055 incq %rax cmpq %rax, %rcx jne 0x8043 xorl %eax, %eax popq %rbp retq movq 0x60(%rdi), %rsi movq (%rsi,%rax,8), %rsi testq %rsi, %rsi setne %al sete %r8b cmpq %rdx, %rsi sete %r9b orb %r8b, %r9b jne 0x8053 testq %rcx, %rcx je 0x8051 movq 0x58(%rdi), %r8 xorl %eax, %eax cmpq %rsi, (%r8,%rax,8) je 0x808e incq %rax cmpq %rax, %rcx jne 0x807e jmp 0x8051 movq 0x60(%rdi), %rsi movq (%rsi,%rax,8), %rsi testq %rsi, %rsi setne %al cmpq %rdx, %rsi je 0x8053 testq %rsi, %rsi jne 0x8073 jmp 0x8053 leaq 0x4a80(%rip), %rdi # 0xcb2f leaq 0x4a88(%rip), %rsi # 0xcb3e leaq 0x4b75(%rip), %rcx # 0xcc32 movl $0x94, %edx callq 0x10b0
binding_system_is_descendant_scope: push rbp mov rbp, rsp test rdi, rdi jz short loc_80A8 mov al, 1 cmp rsi, rdx jz short loc_8053 mov rcx, [rdi+78h] test rcx, rcx jz short loc_8051 mov r8, [rdi+58h] xor eax, eax loc_8043: cmp [r8+rax*8], rsi jz short loc_8055 inc rax cmp rcx, rax jnz short loc_8043 loc_8051: xor eax, eax loc_8053: pop rbp retn loc_8055: mov rsi, [rdi+60h] mov rsi, [rsi+rax*8] test rsi, rsi setnz al setz r8b cmp rsi, rdx setz r9b or r9b, r8b jnz short loc_8053 loc_8073: test rcx, rcx jz short loc_8051 mov r8, [rdi+58h] xor eax, eax loc_807E: cmp [r8+rax*8], rsi jz short loc_808E inc rax cmp rcx, rax jnz short loc_807E jmp short loc_8051 loc_808E: mov rsi, [rdi+60h] mov rsi, [rsi+rax*8] test rsi, rsi setnz al cmp rsi, rdx jz short loc_8053 test rsi, rsi jnz short loc_8073 jmp short loc_8053 loc_80A8: lea rdi, aSystemNull; "system != NULL" lea rsi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github2025/eshkol"... lea rcx, aBoolBindingSys_0; "_Bool binding_system_is_descendant_scop"... mov edx, 94h call ___assert_fail
bool binding_system_is_descendant_scope(_QWORD *a1, long long a2, long long a3) { bool result; // al long long v4; // rcx long long v5; // rax long long v6; // rsi long long v7; // rax if ( !a1 ) __assert_fail( "system != NULL", "/workspace/llm4binary/github2025/eshkol/src/frontend/binding/core/binding_scope.c", 148LL, "_Bool binding_system_is_descendant_scope(BindingSystem *, uint64_t, uint64_t)"); result = 1; if ( a2 != a3 ) { v4 = a1[15]; if ( v4 ) { v5 = 0LL; while ( *(_QWORD *)(a1[11] + 8 * v5) != a2 ) { if ( v4 == ++v5 ) return 0; } v6 = *(_QWORD *)(a1[12] + 8 * v5); result = v6 != 0; if ( v6 != 0 && v6 != a3 ) { do { v7 = 0LL; while ( *(_QWORD *)(a1[11] + 8 * v7) != v6 ) { if ( v4 == ++v7 ) return 0; } v6 = *(_QWORD *)(a1[12] + 8 * v7); result = v6 != 0; } while ( v6 != a3 && v6 ); } } else { return 0; } } return result; }
binding_system_is_descendant_scope: PUSH RBP MOV RBP,RSP TEST RDI,RDI JZ 0x001080a8 MOV AL,0x1 CMP RSI,RDX JZ 0x00108053 MOV RCX,qword ptr [RDI + 0x78] TEST RCX,RCX JZ 0x00108051 MOV R8,qword ptr [RDI + 0x58] XOR EAX,EAX LAB_00108043: CMP qword ptr [R8 + RAX*0x8],RSI JZ 0x00108055 INC RAX CMP RCX,RAX JNZ 0x00108043 LAB_00108051: XOR EAX,EAX LAB_00108053: POP RBP RET LAB_00108055: MOV RSI,qword ptr [RDI + 0x60] MOV RSI,qword ptr [RSI + RAX*0x8] TEST RSI,RSI SETNZ AL SETZ R8B CMP RSI,RDX SETZ R9B OR R9B,R8B JNZ 0x00108053 LAB_00108073: TEST RCX,RCX JZ 0x00108051 MOV R8,qword ptr [RDI + 0x58] XOR EAX,EAX LAB_0010807e: CMP qword ptr [R8 + RAX*0x8],RSI JZ 0x0010808e INC RAX CMP RCX,RAX JNZ 0x0010807e JMP 0x00108051 LAB_0010808e: MOV RSI,qword ptr [RDI + 0x60] MOV RSI,qword ptr [RSI + RAX*0x8] TEST RSI,RSI SETNZ AL CMP RSI,RDX JZ 0x00108053 TEST RSI,RSI JNZ 0x00108073 JMP 0x00108053 LAB_001080a8: LEA RDI,[0x10cb2f] LEA RSI,[0x10cb3e] LEA RCX,[0x10cc32] MOV EDX,0x94 CALL 0x001010b0
bool binding_system_is_descendant_scope(long param_1,long param_2,long param_3) { long lVar1; bool bVar2; long lVar3; long lVar4; if (param_1 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("system != NULL", "/workspace/llm4binary/github2025/eshkol/src/frontend/binding/core/binding_scope.c" ,0x94, "_Bool binding_system_is_descendant_scope(BindingSystem *, uint64_t, uint64_t)"); } bVar2 = true; if (param_2 != param_3) { lVar1 = *(long *)(param_1 + 0x78); if (lVar1 != 0) { lVar3 = 0; LAB_00108043: if (*(long *)(*(long *)(param_1 + 0x58) + lVar3 * 8) != param_2) goto code_r0x00108049; lVar3 = *(long *)(*(long *)(param_1 + 0x60) + lVar3 * 8); if (lVar3 == param_3 || lVar3 == 0) { return lVar3 != 0; } while (lVar1 != 0) { lVar4 = 0; while (*(long *)(*(long *)(param_1 + 0x58) + lVar4 * 8) != lVar3) { lVar4 = lVar4 + 1; if (lVar1 == lVar4) goto LAB_00108051; } lVar3 = *(long *)(*(long *)(param_1 + 0x60) + lVar4 * 8); if (lVar3 == param_3) { return lVar3 != 0; } if (lVar3 == 0) { return lVar3 != 0; } } } LAB_00108051: bVar2 = false; } return bVar2; code_r0x00108049: lVar3 = lVar3 + 1; if (lVar1 == lVar3) goto LAB_00108051; goto LAB_00108043; }
45,331
translog_set_sent_to_disk
eloqsql/storage/maria/ma_loghandler.c
static void translog_set_sent_to_disk(struct st_translog_buffer *buffer) { LSN lsn= buffer->last_lsn; TRANSLOG_ADDRESS in_buffers= buffer->next_buffer_offset; DBUG_ENTER("translog_set_sent_to_disk"); mysql_mutex_lock(&log_descriptor.sent_to_disk_lock); DBUG_PRINT("enter", ("lsn: " LSN_FMT " in_buffers: " LSN_FMT " " "in_buffers_only: " LSN_FMT " start: " LSN_FMT " " "sent_to_disk: " LSN_FMT, LSN_IN_PARTS(lsn), LSN_IN_PARTS(in_buffers), LSN_IN_PARTS(log_descriptor.log_start), LSN_IN_PARTS(log_descriptor.in_buffers_only), LSN_IN_PARTS(log_descriptor.sent_to_disk))); /* We write sequentially (first part of following assert) but we rewrite the same page in case we started mysql and shut it down immediately (second part of the following assert) */ DBUG_ASSERT(cmp_translog_addr(lsn, log_descriptor.sent_to_disk) >= 0 || cmp_translog_addr(lsn, log_descriptor.log_start) < 0); log_descriptor.sent_to_disk= lsn; /* LSN_IMPOSSIBLE == 0 => it will work for very first time */ if (cmp_translog_addr(in_buffers, log_descriptor.in_buffers_only) > 0) { log_descriptor.in_buffers_only= in_buffers; DBUG_PRINT("info", ("set new in_buffers_only")); } mysql_mutex_unlock(&log_descriptor.sent_to_disk_lock); DBUG_VOID_RETURN; }
O0
c
translog_set_sent_to_disk: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq 0x100000(%rax), %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movq 0x100018(%rax), %rax movq %rax, -0x18(%rbp) leaq 0x41bc7f(%rip), %rdi # 0x4783b0 addq $0x800cc0, %rdi # imm = 0x800CC0 leaq 0xf4419(%rip), %rsi # 0x150b58 movl $0x8e9, %edx # imm = 0x8E9 callq 0x4f710 jmp 0x5c74b jmp 0x5c74d jmp 0x5c74f movq -0x10(%rbp), %rax movq %rax, 0xc1c8f6(%rip) # 0xc79050 movq -0x18(%rbp), %rax subq 0xc1c903(%rip), %rax # 0xc79068 cmpq $0x0, %rax jle 0x5c77a movq -0x18(%rbp), %rax movq %rax, 0xc1c8f2(%rip) # 0xc79068 jmp 0x5c778 jmp 0x5c77a leaq 0x41bc2f(%rip), %rdi # 0x4783b0 addq $0x800cc0, %rdi # imm = 0x800CC0 callq 0x4f780 jmp 0x5c78f addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
translog_set_sent_to_disk: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax+100000h] mov [rbp+var_10], rax mov rax, [rbp+var_8] mov rax, [rax+100018h] mov [rbp+var_18], rax lea rdi, log_descriptor add rdi, 800CC0h lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 8E9h call inline_mysql_mutex_lock_8 jmp short $+2 loc_5C74B: jmp short $+2 loc_5C74D: jmp short $+2 loc_5C74F: mov rax, [rbp+var_10] mov cs:qword_C79050, rax mov rax, [rbp+var_18] sub rax, cs:qword_C79068 cmp rax, 0 jle short loc_5C77A mov rax, [rbp+var_18] mov cs:qword_C79068, rax jmp short $+2 loc_5C778: jmp short $+2 loc_5C77A: lea rdi, log_descriptor add rdi, 800CC0h call inline_mysql_mutex_unlock_8 jmp short $+2 loc_5C78F: add rsp, 20h pop rbp retn
long long translog_set_sent_to_disk(long long a1) { long long v2; // [rsp+8h] [rbp-18h] long long v3; // [rsp+10h] [rbp-10h] v3 = *(_QWORD *)(a1 + 0x100000); v2 = *(_QWORD *)(a1 + 1048600); inline_mysql_mutex_lock_8( (long long)&log_descriptor[1048984], (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0x8E9u); qword_C79050 = v3; if ( v2 - qword_C79068 > 0 ) qword_C79068 = v2; return inline_mysql_mutex_unlock_8((long long)&log_descriptor[1048984]); }
translog_set_sent_to_disk: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x100000] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x100018] MOV qword ptr [RBP + -0x18],RAX LEA RDI,[0x5783b0] ADD RDI,0x800cc0 LEA RSI,[0x250b58] MOV EDX,0x8e9 CALL 0x0014f710 JMP 0x0015c74b LAB_0015c74b: JMP 0x0015c74d LAB_0015c74d: JMP 0x0015c74f LAB_0015c74f: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [0x00d79050],RAX MOV RAX,qword ptr [RBP + -0x18] SUB RAX,qword ptr [0x00d79068] CMP RAX,0x0 JLE 0x0015c77a MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [0x00d79068],RAX JMP 0x0015c778 LAB_0015c778: JMP 0x0015c77a LAB_0015c77a: LEA RDI,[0x5783b0] ADD RDI,0x800cc0 CALL 0x0014f780 JMP 0x0015c78f LAB_0015c78f: ADD RSP,0x20 POP RBP RET
void translog_set_sent_to_disk(long param_1) { int8 uVar1; long lVar2; uVar1 = *(int8 *)(param_1 + 0x100000); lVar2 = *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0xf); inline_mysql_mutex_lock (&DAT_00d79070,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0x8e9); if (0 < lVar2 - DAT_00d79068) { DAT_00d79068 = lVar2; } DAT_00d79050 = uVar1; inline_mysql_mutex_unlock(&DAT_00d79070); return; }
45,332
nglog::tools::GetStackTrace(void**, int, int)
ng-log[P]ng-log/src/stacktrace_generic-inl.h
int GetStackTrace(void** result, int max_depth, int skip_count) { static const int kStackLength = 64; void* stack[kStackLength]; int size; size = backtrace(stack, kStackLength); skip_count++; // we want to skip the current frame as well int result_count = size - skip_count; if (result_count < 0) { result_count = 0; } if (result_count > max_depth) { result_count = max_depth; } for (int i = 0; i < result_count; i++) { result[i] = stack[i + skip_count]; } return result_count; }
O0
c
nglog::tools::GetStackTrace(void**, int, int): pushq %rbp movq %rsp, %rbp subq $0x220, %rsp # imm = 0x220 movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) leaq -0x210(%rbp), %rdi movl $0x40, %esi callq 0x9b30 movl %eax, -0x214(%rbp) movl -0x10(%rbp), %eax addl $0x1, %eax movl %eax, -0x10(%rbp) movl -0x214(%rbp), %eax subl -0x10(%rbp), %eax movl %eax, -0x218(%rbp) cmpl $0x0, -0x218(%rbp) jge 0x48f27 movl $0x0, -0x218(%rbp) movl -0x218(%rbp), %eax cmpl -0xc(%rbp), %eax jle 0x48f3b movl -0xc(%rbp), %eax movl %eax, -0x218(%rbp) movl $0x0, -0x21c(%rbp) movl -0x21c(%rbp), %eax cmpl -0x218(%rbp), %eax jge 0x48f86 movl -0x21c(%rbp), %eax addl -0x10(%rbp), %eax cltq movq -0x210(%rbp,%rax,8), %rdx movq -0x8(%rbp), %rax movslq -0x21c(%rbp), %rcx movq %rdx, (%rax,%rcx,8) movl -0x21c(%rbp), %eax addl $0x1, %eax movl %eax, -0x21c(%rbp) jmp 0x48f45 movl -0x218(%rbp), %eax addq $0x220, %rsp # imm = 0x220 popq %rbp retq nopw %cs:(%rax,%rax) nop
_ZN5nglog5tools13GetStackTraceEPPvii: push rbp mov rbp, rsp sub rsp, 220h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx lea rdi, [rbp+var_210] mov esi, 40h ; '@' call _backtrace mov [rbp+var_214], eax mov eax, [rbp+var_10] add eax, 1 mov [rbp+var_10], eax mov eax, [rbp+var_214] sub eax, [rbp+var_10] mov [rbp+var_218], eax cmp [rbp+var_218], 0 jge short loc_48F27 mov [rbp+var_218], 0 loc_48F27: mov eax, [rbp+var_218] cmp eax, [rbp+var_C] jle short loc_48F3B mov eax, [rbp+var_C] mov [rbp+var_218], eax loc_48F3B: mov [rbp+var_21C], 0 loc_48F45: mov eax, [rbp+var_21C] cmp eax, [rbp+var_218] jge short loc_48F86 mov eax, [rbp+var_21C] add eax, [rbp+var_10] cdqe mov rdx, [rbp+rax*8+var_210] mov rax, [rbp+var_8] movsxd rcx, [rbp+var_21C] mov [rax+rcx*8], rdx mov eax, [rbp+var_21C] add eax, 1 mov [rbp+var_21C], eax jmp short loc_48F45 loc_48F86: mov eax, [rbp+var_218] add rsp, 220h pop rbp retn
long long nglog::tools::GetStackTrace(nglog::tools *this, void **a2, int a3) { int i; // [rsp+4h] [rbp-21Ch] signed int v5; // [rsp+8h] [rbp-218h] int v6; // [rsp+Ch] [rbp-214h] _QWORD v7[64]; // [rsp+10h] [rbp-210h] BYREF int v8; // [rsp+210h] [rbp-10h] int v9; // [rsp+214h] [rbp-Ch] nglog::tools *v10; // [rsp+218h] [rbp-8h] v10 = this; v9 = (int)a2; v8 = a3; v6 = backtrace(v7, 64LL); ++v8; v5 = v6 - v8; if ( v6 - v8 < 0 ) v5 = 0; if ( v5 > v9 ) v5 = v9; for ( i = 0; i < v5; ++i ) *((_QWORD *)v10 + i) = v7[v8 + i]; return (unsigned int)v5; }
GetStackTrace: PUSH RBP MOV RBP,RSP SUB RSP,0x220 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX LEA RDI,[RBP + -0x210] MOV ESI,0x40 CALL 0x00109b30 MOV dword ptr [RBP + -0x214],EAX MOV EAX,dword ptr [RBP + -0x10] ADD EAX,0x1 MOV dword ptr [RBP + -0x10],EAX MOV EAX,dword ptr [RBP + -0x214] SUB EAX,dword ptr [RBP + -0x10] MOV dword ptr [RBP + -0x218],EAX CMP dword ptr [RBP + -0x218],0x0 JGE 0x00148f27 MOV dword ptr [RBP + -0x218],0x0 LAB_00148f27: MOV EAX,dword ptr [RBP + -0x218] CMP EAX,dword ptr [RBP + -0xc] JLE 0x00148f3b MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x218],EAX LAB_00148f3b: MOV dword ptr [RBP + -0x21c],0x0 LAB_00148f45: MOV EAX,dword ptr [RBP + -0x21c] CMP EAX,dword ptr [RBP + -0x218] JGE 0x00148f86 MOV EAX,dword ptr [RBP + -0x21c] ADD EAX,dword ptr [RBP + -0x10] CDQE MOV RDX,qword ptr [RBP + RAX*0x8 + -0x210] MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x21c] MOV qword ptr [RAX + RCX*0x8],RDX MOV EAX,dword ptr [RBP + -0x21c] ADD EAX,0x1 MOV dword ptr [RBP + -0x21c],EAX JMP 0x00148f45 LAB_00148f86: MOV EAX,dword ptr [RBP + -0x218] ADD RSP,0x220 POP RBP RET
/* nglog::tools::GetStackTrace(void**, int, int) */ int nglog::tools::GetStackTrace(void **param_1,int param_2,int param_3) { int local_224; int local_220; int8 local_218 [64]; int local_18; int local_14; void **local_10; local_18 = param_3; local_14 = param_2; local_10 = param_1; local_220 = backtrace(local_218,0x40); local_18 = local_18 + 1; local_220 = local_220 - local_18; if (local_220 < 0) { local_220 = 0; } if (local_14 < local_220) { local_220 = local_14; } for (local_224 = 0; local_224 < local_220; local_224 = local_224 + 1) { local_10[local_224] = (void *)local_218[local_224 + local_18]; } return local_220; }
45,333
nglog::tools::GetStackTrace(void**, int, int)
ng-log[P]ng-log/src/stacktrace_generic-inl.h
int GetStackTrace(void** result, int max_depth, int skip_count) { static const int kStackLength = 64; void* stack[kStackLength]; int size; size = backtrace(stack, kStackLength); skip_count++; // we want to skip the current frame as well int result_count = size - skip_count; if (result_count < 0) { result_count = 0; } if (result_count > max_depth) { result_count = max_depth; } for (int i = 0; i < result_count; i++) { result[i] = stack[i + skip_count]; } return result_count; }
O3
c
nglog::tools::GetStackTrace(void**, int, int): pushq %rbp pushq %r14 pushq %rbx subq $0x200, %rsp # imm = 0x200 movl %edx, %ebp movl %esi, %r14d movq %rdi, %rbx movq %rsp, %rdi movl $0x40, %esi callq 0x7820 movl %eax, %ecx incl %ebp subl %ebp, %ecx xorl %eax, %eax testl %ecx, %ecx cmovgl %ecx, %eax cmpl %r14d, %eax cmovgel %r14d, %eax testl %eax, %eax jle 0x1ffdf movslq %ebp, %rdx movl %eax, %ecx leaq (%rsp,%rdx,8), %rdx xorl %esi, %esi movq (%rdx,%rsi,8), %rdi movq %rdi, (%rbx,%rsi,8) incq %rsi cmpq %rsi, %rcx jne 0x1ffcf addq $0x200, %rsp # imm = 0x200 popq %rbx popq %r14 popq %rbp retq nop
_ZN5nglog5tools13GetStackTraceEPPvii: push rbp push r14 push rbx sub rsp, 200h mov ebp, edx mov r14d, esi mov rbx, rdi mov rdi, rsp mov esi, 40h ; '@' call _backtrace mov ecx, eax inc ebp sub ecx, ebp xor eax, eax test ecx, ecx cmovg eax, ecx cmp eax, r14d cmovge eax, r14d test eax, eax jle short loc_1FFDF movsxd rdx, ebp mov ecx, eax lea rdx, [rsp+rdx*8+218h+var_218] xor esi, esi loc_1FFCF: mov rdi, [rdx+rsi*8] mov [rbx+rsi*8], rdi inc rsi cmp rcx, rsi jnz short loc_1FFCF loc_1FFDF: add rsp, 200h pop rbx pop r14 pop rbp retn
long long nglog::tools::GetStackTrace(nglog::tools *this, void **a2, int a3) { int v3; // ebp int v4; // ecx long long result; // rax long long v6; // rsi _QWORD v7[67]; // [rsp+0h] [rbp-218h] BYREF v3 = a3 + 1; v4 = backtrace(v7, 64LL) - (a3 + 1); result = 0LL; if ( v4 > 0 ) result = (unsigned int)v4; if ( (int)result >= (int)a2 ) result = (unsigned int)a2; if ( (int)result > 0 ) { v6 = 0LL; do { *((_QWORD *)this + v6) = v7[v3 + v6]; ++v6; } while ( (unsigned int)result != v6 ); } return result; }
GetStackTrace: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x200 MOV EBP,EDX MOV R14D,ESI MOV RBX,RDI MOV RDI,RSP MOV ESI,0x40 CALL 0x00107820 MOV ECX,EAX INC EBP SUB ECX,EBP XOR EAX,EAX TEST ECX,ECX CMOVG EAX,ECX CMP EAX,R14D CMOVGE EAX,R14D TEST EAX,EAX JLE 0x0011ffdf MOVSXD RDX,EBP MOV ECX,EAX LEA RDX,[RSP + RDX*0x8] XOR ESI,ESI LAB_0011ffcf: MOV RDI,qword ptr [RDX + RSI*0x8] MOV qword ptr [RBX + RSI*0x8],RDI INC RSI CMP RCX,RSI JNZ 0x0011ffcf LAB_0011ffdf: ADD RSP,0x200 POP RBX POP R14 POP RBP RET
/* nglog::tools::GetStackTrace(void**, int, int) */ void nglog::tools::GetStackTrace(void **param_1,int param_2,int param_3) { int iVar1; uint uVar2; uint uVar3; ulong uVar4; int8 auStack_218 [64]; iVar1 = backtrace(auStack_218); uVar3 = iVar1 - (param_3 + 1); uVar2 = 0; if (0 < (int)uVar3) { uVar2 = uVar3; } if (param_2 <= (int)uVar2) { uVar2 = param_2; } if (0 < (int)uVar2) { uVar4 = 0; do { param_1[uVar4] = (void *)auStack_218[(long)(param_3 + 1) + uVar4]; uVar4 = uVar4 + 1; } while (uVar2 != uVar4); } return; }
45,334
ma_delete_static_record
eloqsql/storage/maria/ma_statrec.c
my_bool _ma_delete_static_record(MARIA_HA *info, const uchar *record __attribute__ ((unused))) { uchar temp[9]; /* 1+sizeof(uint32) */ info->state->del++; info->state->empty+=info->s->base.pack_reclength; temp[0]= '\0'; /* Mark that record is deleted */ _ma_dpointer(info->s, temp+1, info->s->state.dellink); info->s->state.dellink= info->cur_row.lastpos; info->rec_cache.seek_not_done=1; return (info->s->file_write(info, temp, 1+info->s->rec_reflength, info->cur_row.lastpos, MYF(MY_NABP)) != 0); }
O0
c
ma_delete_static_record: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x20(%rbp) movq %rsi, -0x28(%rbp) movq -0x20(%rbp), %rax movq 0x20(%rax), %rax movq 0x8(%rax), %rcx incq %rcx movq %rcx, 0x8(%rax) movq -0x20(%rbp), %rax movq (%rax), %rcx movq 0x20(%rax), %rax movq 0x3a0(%rcx), %rdx movq 0x10(%rax), %rcx addq %rdx, %rcx movq %rcx, 0x10(%rax) movb $0x0, -0x11(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rdi leaq -0x10(%rbp), %rsi movq 0xc8(%rdi), %rdx callq 0x3a6e0 movq -0x20(%rbp), %rcx movq (%rcx), %rax movq 0x98(%rcx), %rcx movq %rcx, 0xc8(%rax) movq -0x20(%rbp), %rax movl $0x1, 0x598(%rax) movq -0x20(%rbp), %rdi movq (%rdi), %rdx movq 0x98(%rdi), %rcx movq 0x6e8(%rdx), %rax movl 0x740(%rdx), %edx incl %edx leaq -0x11(%rbp), %rsi movl $0x4, %r8d callq *%rax testq %rax, %rax setne %al movb %al, -0x29(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x45e68 movb -0x29(%rbp), %al addq $0x30, %rsp popq %rbp retq callq 0x2a260 nopl (%rax)
_ma_delete_static_record: push rbp mov rbp, rsp sub rsp, 30h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_20], rdi mov [rbp+var_28], rsi mov rax, [rbp+var_20] mov rax, [rax+20h] mov rcx, [rax+8] inc rcx mov [rax+8], rcx mov rax, [rbp+var_20] mov rcx, [rax] mov rax, [rax+20h] mov rdx, [rcx+3A0h] mov rcx, [rax+10h] add rcx, rdx mov [rax+10h], rcx mov [rbp+var_11], 0 mov rax, [rbp+var_20] mov rdi, [rax] lea rsi, [rbp+var_10] mov rdx, [rdi+0C8h] call _ma_dpointer mov rcx, [rbp+var_20] mov rax, [rcx] mov rcx, [rcx+98h] mov [rax+0C8h], rcx mov rax, [rbp+var_20] mov dword ptr [rax+598h], 1 mov rdi, [rbp+var_20] mov rdx, [rdi] mov rcx, [rdi+98h] mov rax, [rdx+6E8h] mov edx, [rdx+740h] inc edx lea rsi, [rbp+var_11] mov r8d, 4 call rax test rax, rax setnz al mov [rbp+var_29], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_45E68 mov al, [rbp+var_29] add rsp, 30h pop rbp retn loc_45E68: call ___stack_chk_fail
bool ma_delete_static_record(long long *a1) { char v2; // [rsp+1Fh] [rbp-11h] BYREF char v3[8]; // [rsp+20h] [rbp-10h] BYREF unsigned long long v4; // [rsp+28h] [rbp-8h] v4 = __readfsqword(0x28u); ++*(_QWORD *)(a1[4] + 8); *(_QWORD *)(a1[4] + 16) += *(_QWORD *)(*a1 + 928); v2 = 0; ma_dpointer(*a1, v3, *(_QWORD *)(*a1 + 200)); *(_QWORD *)(*a1 + 200) = a1[19]; *((_DWORD *)a1 + 358) = 1; return (*(long long ( **)(long long *, char *, _QWORD, long long, long long))(*a1 + 1768))( a1, &v2, (unsigned int)(*(_DWORD *)(*a1 + 1856) + 1), a1[19], 4LL) != 0; }
_ma_delete_static_record: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x20],RDI MOV qword ptr [RBP + -0x28],RSI MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RAX + 0x8] INC RCX MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x20] MOV RDX,qword ptr [RCX + 0x3a0] MOV RCX,qword ptr [RAX + 0x10] ADD RCX,RDX MOV qword ptr [RAX + 0x10],RCX MOV byte ptr [RBP + -0x11],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV RDI,qword ptr [RAX] LEA RSI,[RBP + -0x10] MOV RDX,qword ptr [RDI + 0xc8] CALL 0x0013a6e0 MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RCX] MOV RCX,qword ptr [RCX + 0x98] MOV qword ptr [RAX + 0xc8],RCX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x598],0x1 MOV RDI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x98] MOV RAX,qword ptr [RDX + 0x6e8] MOV EDX,dword ptr [RDX + 0x740] INC EDX LEA RSI,[RBP + -0x11] MOV R8D,0x4 CALL RAX TEST RAX,RAX SETNZ AL MOV byte ptr [RBP + -0x29],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00145e68 MOV AL,byte ptr [RBP + -0x29] ADD RSP,0x30 POP RBP RET LAB_00145e68: CALL 0x0012a260
int8 _ma_delete_static_record(long *param_1) { long lVar1; long in_FS_OFFSET; int1 local_19; int1 local_18 [8]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); *(long *)(param_1[4] + 8) = *(long *)(param_1[4] + 8) + 1; *(long *)(param_1[4] + 0x10) = *(long *)(param_1[4] + 0x10) + *(long *)(*param_1 + 0x3a0); local_19 = 0; _ma_dpointer(*param_1,local_18,*(int8 *)(*param_1 + 200)); *(long *)(*param_1 + 200) = param_1[0x13]; *(int4 *)(param_1 + 0xb3) = 1; lVar1 = (**(code **)(*param_1 + 0x6e8)) (param_1,&local_19,*(int *)(*param_1 + 0x740) + 1,param_1[0x13],4); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),lVar1 != 0); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
45,335
my_strntod_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static double my_strntod_mb2_or_mb4(CHARSET_INFO *cs, char *nptr, size_t length, char **endptr, int *err) { char buf[256]; double res; register char *b= buf; register const uchar *s= (const uchar*) nptr; const uchar *end; my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; int cnv; *err= 0; /* Cut too long strings */ if (length >= sizeof(buf)) length= sizeof(buf) - 1; end= s + length; while ((cnv= mb_wc(cs, &wc, s, end)) > 0) { s+= cnv; if (wc > (int) (uchar) 'e' || !wc) break; /* Can't be part of double */ *b++= (char) wc; } *endptr= b; res= my_strtod(buf, endptr, err); *endptr= nptr + cs->mbminlen * (size_t) (*endptr - buf); return res; }
O3
c
my_strntod_mb2_or_mb4: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x128, %rsp # imm = 0x128 movq %rcx, -0x150(%rbp) movq %rsi, %rcx movq %rdi, %r15 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq 0xb8(%rdi), %rax movq 0x28(%rax), %rbx movq %r8, -0x148(%rbp) movl $0x0, (%r8) movl $0xff, %r13d cmpq %r13, %rdx cmovbq %rdx, %r13 addq %rsi, %r13 leaq -0x140(%rbp), %rsi movq %rcx, -0x138(%rbp) movq %rcx, %rdx movq %r13, %rcx callq *%rbx leaq -0x130(%rbp), %r12 testl %eax, %eax jle 0x4ff4d movq -0x138(%rbp), %r14 movq -0x140(%rbp), %rcx leaq -0x1(%rcx), %rdx cmpq $0x64, %rdx ja 0x4ff4d movl %eax, %eax addq %rax, %r14 movb %cl, (%r12) incq %r12 movq %r15, %rdi leaq -0x140(%rbp), %rsi movq %r14, %rdx movq %r13, %rcx callq *%rbx testl %eax, %eax jg 0x4ff1a movq -0x150(%rbp), %rbx movq %r12, (%rbx) leaq -0x130(%rbp), %r14 movq %r14, %rdi movq %rbx, %rsi movq -0x148(%rbp), %rdx callq 0x5fac8 movl 0x98(%r15), %eax movq (%rbx), %rcx subq %r14, %rcx imulq %rax, %rcx movq -0x138(%rbp), %rax addq %rcx, %rax movq %rax, (%rbx) movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x4ffaf addq $0x128, %rsp # imm = 0x128 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x243e0
my_strntod_mb2_or_mb4: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 128h mov [rbp+var_150], rcx mov rcx, rsi mov r15, rdi mov rax, fs:28h mov [rbp+var_30], rax mov rax, [rdi+0B8h] mov rbx, [rax+28h] mov [rbp+var_148], r8 mov dword ptr [r8], 0 mov r13d, 0FFh cmp rdx, r13 cmovb r13, rdx add r13, rsi lea rsi, [rbp+var_140] mov [rbp+var_138], rcx mov rdx, rcx mov rcx, r13 call rbx lea r12, [rbp+var_130] test eax, eax jle short loc_4FF4D mov r14, [rbp+var_138] loc_4FF1A: mov rcx, [rbp+var_140] lea rdx, [rcx-1] cmp rdx, 64h ; 'd' ja short loc_4FF4D mov eax, eax add r14, rax mov [r12], cl inc r12 mov rdi, r15 lea rsi, [rbp+var_140] mov rdx, r14 mov rcx, r13 call rbx test eax, eax jg short loc_4FF1A loc_4FF4D: mov rbx, [rbp+var_150] mov [rbx], r12 lea r14, [rbp+var_130] mov rdi, r14 mov rsi, rbx mov rdx, [rbp+var_148] call my_strtod mov eax, [r15+98h] mov rcx, [rbx] sub rcx, r14 imul rcx, rax mov rax, [rbp+var_138] add rax, rcx mov [rbx], rax mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_4FFAF add rsp, 128h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4FFAF: call ___stack_chk_fail
unsigned long long my_strntod_mb2_or_mb4(long long a1, long long a2, unsigned long long a3, _QWORD *a4, _DWORD *a5) { long long ( *v5)(long long, long long *, long long, long long); // rbx long long v6; // r13 long long v7; // r13 int v8; // eax _BYTE *v9; // r12 long long v10; // r14 long long v14; // [rsp+10h] [rbp-140h] BYREF long long v15; // [rsp+18h] [rbp-138h] _BYTE v16[256]; // [rsp+20h] [rbp-130h] BYREF unsigned long long v17; // [rsp+120h] [rbp-30h] v17 = __readfsqword(0x28u); v5 = *(long long ( **)(long long, long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL); *a5 = 0; v6 = 255LL; if ( a3 < 0xFF ) v6 = a3; v7 = a2 + v6; v15 = a2; v8 = v5(a1, &v14, a2, v7); v9 = v16; if ( v8 > 0 ) { v10 = v15; do { if ( (unsigned long long)(v14 - 1) > 0x64 ) break; v10 += (unsigned int)v8; *v9++ = v14; v8 = v5(a1, &v14, v10, v7); } while ( v8 > 0 ); } *a4 = v9; my_strtod(v16, a4, a5); *a4 = *(unsigned int *)(a1 + 152) * (*a4 - (_QWORD)v16) + v15; return __readfsqword(0x28u); }
my_strntod_mb2_or_mb4: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x128 MOV qword ptr [RBP + -0x150],RCX MOV RCX,RSI MOV R15,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RDI + 0xb8] MOV RBX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x148],R8 MOV dword ptr [R8],0x0 MOV R13D,0xff CMP RDX,R13 CMOVC R13,RDX ADD R13,RSI LEA RSI,[RBP + -0x140] MOV qword ptr [RBP + -0x138],RCX MOV RDX,RCX MOV RCX,R13 CALL RBX LEA R12,[RBP + -0x130] TEST EAX,EAX JLE 0x0014ff4d MOV R14,qword ptr [RBP + -0x138] LAB_0014ff1a: MOV RCX,qword ptr [RBP + -0x140] LEA RDX,[RCX + -0x1] CMP RDX,0x64 JA 0x0014ff4d MOV EAX,EAX ADD R14,RAX MOV byte ptr [R12],CL INC R12 MOV RDI,R15 LEA RSI,[RBP + -0x140] MOV RDX,R14 MOV RCX,R13 CALL RBX TEST EAX,EAX JG 0x0014ff1a LAB_0014ff4d: MOV RBX,qword ptr [RBP + -0x150] MOV qword ptr [RBX],R12 LEA R14,[RBP + -0x130] MOV RDI,R14 MOV RSI,RBX MOV RDX,qword ptr [RBP + -0x148] CALL 0x0015fac8 MOV EAX,dword ptr [R15 + 0x98] MOV RCX,qword ptr [RBX] SUB RCX,R14 IMUL RCX,RAX MOV RAX,qword ptr [RBP + -0x138] ADD RAX,RCX MOV qword ptr [RBX],RAX MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0014ffaf ADD RSP,0x128 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014ffaf: CALL 0x001243e0
void my_strntod_mb2_or_mb4 (long param_1,long param_2,ulong param_3,long *param_4,int4 *param_5) { code *pcVar1; uint uVar2; int1 *puVar3; ulong uVar4; long lVar5; long in_FS_OFFSET; long local_148; long local_140; int1 local_138 [256]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); *param_5 = 0; uVar4 = 0xff; if (param_3 < 0xff) { uVar4 = param_3; } local_140 = param_2; uVar2 = (*pcVar1)(param_1,&local_148,param_2,uVar4 + param_2); puVar3 = local_138; lVar5 = local_140; while ((0 < (int)uVar2 && (local_148 - 1U < 0x65))) { lVar5 = lVar5 + (ulong)uVar2; *puVar3 = (char)local_148; puVar3 = puVar3 + 1; uVar2 = (*pcVar1)(param_1,&local_148,lVar5,uVar4 + param_2); } *param_4 = (long)puVar3; my_strtod(local_138,param_4,param_5); *param_4 = local_140 + (*param_4 - (long)local_138) * (ulong)*(uint *)(param_1 + 0x98); if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
45,336
my_strerror
eloqsql/strings/my_vsnprintf.c
const char* my_strerror(char *buf, size_t len, int nr) { char *msg= NULL; buf[0]= '\0'; /* failsafe */ if (nr <= 0) { strmake(buf, (nr == 0 ? "Internal error/check (Not system error)" : "Internal error < 0 (Not system error)"), len-1); return buf; } /* These (handler-) error messages are shared by perror, as required by the principle of least surprise. */ if ((nr >= HA_ERR_FIRST) && (nr <= HA_ERR_LAST)) { msg= (char *) handler_error_messages[nr - HA_ERR_FIRST]; strmake(buf, msg, len - 1); } else { /* On Windows, do things the Windows way. On a system that supports both the GNU and the XSI variant, use whichever was configured (GNU); if this choice is not advertised, use the default (POSIX/XSI). Testing for __GNUC__ is not sufficient to determine whether this choice exists. */ #if defined(_WIN32) strerror_s(buf, len, nr); #elif ((defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE >= 200112L)) || \ (defined _XOPEN_SOURCE && (_XOPEN_SOURCE >= 600))) && \ ! defined _GNU_SOURCE strerror_r(nr, buf, len); /* I can build with or without GNU */ #elif defined(__GLIBC__) && defined (_GNU_SOURCE) char *r= strerror_r(nr, buf, len); if (r != buf) /* Want to help, GNU? */ strmake(buf, r, len - 1); /* Then don't. */ #else strerror_r(nr, buf, len); #endif } /* strerror() return values are implementation-dependent, so let's be pragmatic. */ if (!buf[0]) strmake(buf, "unknown error", len - 1); return buf; }
O0
c
my_strerror: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq $0x0, -0x28(%rbp) movq -0x10(%rbp), %rax movb $0x0, (%rax) cmpl $0x0, -0x1c(%rbp) jg 0xab22e movq -0x10(%rbp), %rdi movl -0x1c(%rbp), %ecx leaq 0x7c1a(%rip), %rsi # 0xb2e20 leaq 0x7beb(%rip), %rax # 0xb2df8 cmpl $0x0, %ecx cmoveq %rax, %rsi movq -0x18(%rbp), %rdx subq $0x1, %rdx callq 0xabe50 movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0xab2ca cmpl $0x78, -0x1c(%rbp) jl 0xab26c cmpl $0xc6, -0x1c(%rbp) jg 0xab26c movl -0x1c(%rbp), %eax subl $0x78, %eax movslq %eax, %rcx leaq 0x31fc23(%rip), %rax # 0x3cae70 movq (%rax,%rcx,8), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x18(%rbp), %rdx subq $0x1, %rdx callq 0xabe50 jmp 0xab2a1 movl -0x1c(%rbp), %edi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x260e0 movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax cmpq -0x10(%rbp), %rax je 0xab29f movq -0x10(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x18(%rbp), %rdx subq $0x1, %rdx callq 0xabe50 jmp 0xab2a1 movq -0x10(%rbp), %rax cmpb $0x0, (%rax) jne 0xab2c2 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rdx subq $0x1, %rdx leaq 0x7b89(%rip), %rsi # 0xb2e46 callq 0xabe50 movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_strerror: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_28], 0 mov rax, [rbp+var_10] mov byte ptr [rax], 0 cmp [rbp+var_1C], 0 jg short loc_AB22E mov rdi, [rbp+var_10] mov ecx, [rbp+var_1C] lea rsi, aInternalError0; "Internal error < 0 (Not system error)" lea rax, aInternalErrorC; "Internal error/check (Not system error)" cmp ecx, 0 cmovz rsi, rax mov rdx, [rbp+var_18] sub rdx, 1 call strmake mov rax, [rbp+var_10] mov [rbp+var_8], rax jmp loc_AB2CA loc_AB22E: cmp [rbp+var_1C], 78h ; 'x' jl short loc_AB26C cmp [rbp+var_1C], 0C6h jg short loc_AB26C mov eax, [rbp+var_1C] sub eax, 78h ; 'x' movsxd rcx, eax lea rax, handler_error_messages mov rax, [rax+rcx*8] mov [rbp+var_28], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] mov rdx, [rbp+var_18] sub rdx, 1 call strmake jmp short loc_AB2A1 loc_AB26C: mov edi, [rbp+var_1C] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] call _strerror_r mov [rbp+var_30], rax mov rax, [rbp+var_30] cmp rax, [rbp+var_10] jz short loc_AB29F mov rdi, [rbp+var_10] mov rsi, [rbp+var_30] mov rdx, [rbp+var_18] sub rdx, 1 call strmake loc_AB29F: jmp short $+2 loc_AB2A1: mov rax, [rbp+var_10] cmp byte ptr [rax], 0 jnz short loc_AB2C2 mov rdi, [rbp+var_10] mov rdx, [rbp+var_18] sub rdx, 1 lea rsi, aUnknownError; "unknown error" call strmake loc_AB2C2: mov rax, [rbp+var_10] mov [rbp+var_8], rax loc_AB2CA: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
_BYTE * my_strerror(_BYTE *a1, long long a2, int a3) { const char *v3; // rsi long long v5; // [rsp+0h] [rbp-30h] *a1 = 0; if ( a3 > 0 ) { if ( a3 < 120 || a3 > 198 ) { v5 = strerror_r((unsigned int)a3, a1, a2); if ( (_BYTE *)v5 != a1 ) strmake(a1, v5, a2 - 1); } else { strmake(a1, handler_error_messages[a3 - 120], a2 - 1); } if ( !*a1 ) strmake(a1, "unknown error", a2 - 1); return a1; } else { v3 = "Internal error < 0 (Not system error)"; if ( !a3 ) v3 = "Internal error/check (Not system error)"; strmake(a1, v3, a2 - 1); return a1; } }
my_strerror: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV qword ptr [RBP + -0x28],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0x0 CMP dword ptr [RBP + -0x1c],0x0 JG 0x001ab22e MOV RDI,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x1c] LEA RSI,[0x1b2e20] LEA RAX,[0x1b2df8] CMP ECX,0x0 CMOVZ RSI,RAX MOV RDX,qword ptr [RBP + -0x18] SUB RDX,0x1 CALL 0x001abe50 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX JMP 0x001ab2ca LAB_001ab22e: CMP dword ptr [RBP + -0x1c],0x78 JL 0x001ab26c CMP dword ptr [RBP + -0x1c],0xc6 JG 0x001ab26c MOV EAX,dword ptr [RBP + -0x1c] SUB EAX,0x78 MOVSXD RCX,EAX LEA RAX,[0x4cae70] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x18] SUB RDX,0x1 CALL 0x001abe50 JMP 0x001ab2a1 LAB_001ab26c: MOV EDI,dword ptr [RBP + -0x1c] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] CALL 0x001260e0 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x10] JZ 0x001ab29f MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x18] SUB RDX,0x1 CALL 0x001abe50 LAB_001ab29f: JMP 0x001ab2a1 LAB_001ab2a1: MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX],0x0 JNZ 0x001ab2c2 MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] SUB RDX,0x1 LEA RSI,[0x1b2e46] CALL 0x001abe50 LAB_001ab2c2: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX LAB_001ab2ca: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
char * my_strerror(char *param_1,size_t param_2,int param_3) { char *pcVar1; *param_1 = '\0'; if (param_3 < 1) { pcVar1 = "Internal error < 0 (Not system error)"; if (param_3 == 0) { pcVar1 = "Internal error/check (Not system error)"; } strmake(param_1,pcVar1,param_2 - 1); } else { if ((param_3 < 0x78) || (0xc6 < param_3)) { pcVar1 = strerror_r(param_3,param_1,param_2); if (pcVar1 != param_1) { strmake(param_1,pcVar1,param_2 - 1); } } else { strmake(param_1,*(int8 *)(handler_error_messages + (long)(param_3 + -0x78) * 8), param_2 - 1); } if (*param_1 == '\0') { strmake(param_1,"unknown error",param_2 - 1); } } return param_1; }
45,337
multadd
eloqsql/libmariadb/libmariadb/ma_dtoa.c
static Bigint *multadd(Bigint *b, int m, int a, Stack_alloc *alloc) { int i, wds; ULong *x; ULLong carry, y; Bigint *b1; wds= b->wds; x= b->p.x; i= 0; carry= a; do { y= *x * (ULLong)m + carry; carry= y >> 32; *x++= (ULong)(y & FFFFFFFF); } while (++i < wds); if (carry) { if (wds >= b->maxwds) { b1= Balloc(b->k+1, alloc); Bcopy(b1, b); Bfree(b, alloc); b= b1; } b->p.x[wds++]= (ULong) carry; b->wds= wds; } return b; }
O0
c
multadd: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) movq %rcx, -0x18(%rbp) movq -0x8(%rbp), %rax movl 0x14(%rax), %eax movl %eax, -0x20(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movl $0x0, -0x1c(%rbp) movslq -0x10(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax movl (%rax), %eax movslq -0xc(%rbp), %rcx imulq %rcx, %rax addq -0x30(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax shrq $0x20, %rax movq %rax, -0x30(%rbp) movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq -0x38(%rbp), %rax movl %eax, %ecx movq -0x28(%rbp), %rax movq %rax, %rdx addq $0x4, %rdx movq %rdx, -0x28(%rbp) movl %ecx, (%rax) movl -0x1c(%rbp), %eax addl $0x1, %eax movl %eax, -0x1c(%rbp) cmpl -0x20(%rbp), %eax jl 0x8fbaa cmpq $0x0, -0x30(%rbp) je 0x8fc8b movl -0x20(%rbp), %eax movq -0x8(%rbp), %rcx cmpl 0xc(%rcx), %eax jl 0x8fc63 movq -0x8(%rbp), %rax movl 0x8(%rax), %edi addl $0x1, %edi movq -0x18(%rbp), %rsi callq 0x8fca0 movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rdi addq $0x10, %rdi movq -0x8(%rbp), %rsi addq $0x10, %rsi movq -0x8(%rbp), %rax movslq 0x14(%rax), %rdx shlq $0x2, %rdx addq $0x8, %rdx callq 0x3b0c0 movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x8f7a0 movq -0x40(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x30(%rbp), %rax movl %eax, %edx movq -0x8(%rbp), %rax movq (%rax), %rax movl -0x20(%rbp), %ecx movl %ecx, %esi addl $0x1, %esi movl %esi, -0x20(%rbp) movslq %ecx, %rcx movl %edx, (%rax,%rcx,4) movl -0x20(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x14(%rax) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
multadd: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx mov [rbp+var_18], rcx mov rax, [rbp+var_8] mov eax, [rax+14h] mov [rbp+var_20], eax mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_28], rax mov [rbp+var_1C], 0 movsxd rax, [rbp+var_10] mov [rbp+var_30], rax loc_8FBAA: mov rax, [rbp+var_28] mov eax, [rax] movsxd rcx, [rbp+var_C] imul rax, rcx add rax, [rbp+var_30] mov [rbp+var_38], rax mov rax, [rbp+var_38] shr rax, 20h mov [rbp+var_30], rax mov rax, 0FFFFFFFFh and rax, [rbp+var_38] mov ecx, eax mov rax, [rbp+var_28] mov rdx, rax add rdx, 4 mov [rbp+var_28], rdx mov [rax], ecx mov eax, [rbp+var_1C] add eax, 1 mov [rbp+var_1C], eax cmp eax, [rbp+var_20] jl short loc_8FBAA cmp [rbp+var_30], 0 jz loc_8FC8B mov eax, [rbp+var_20] mov rcx, [rbp+var_8] cmp eax, [rcx+0Ch] jl short loc_8FC63 mov rax, [rbp+var_8] mov edi, [rax+8] add edi, 1 mov rsi, [rbp+var_18] call Balloc mov [rbp+var_40], rax mov rdi, [rbp+var_40] add rdi, 10h mov rsi, [rbp+var_8] add rsi, 10h mov rax, [rbp+var_8] movsxd rdx, dword ptr [rax+14h] shl rdx, 2 add rdx, 8 call _memcpy mov rdi, [rbp+var_8] mov rsi, [rbp+var_18] call Bfree mov rax, [rbp+var_40] mov [rbp+var_8], rax loc_8FC63: mov rax, [rbp+var_30] mov edx, eax mov rax, [rbp+var_8] mov rax, [rax] mov ecx, [rbp+var_20] mov esi, ecx add esi, 1 mov [rbp+var_20], esi movsxd rcx, ecx mov [rax+rcx*4], edx mov ecx, [rbp+var_20] mov rax, [rbp+var_8] mov [rax+14h], ecx loc_8FC8B: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
unsigned long long multadd(unsigned long long a1, int a2, int a3, unsigned long long *a4) { unsigned int *v4; // rax long long v6; // [rsp+0h] [rbp-40h] unsigned long long v7; // [rsp+8h] [rbp-38h] unsigned long long v8; // [rsp+10h] [rbp-30h] unsigned int *v9; // [rsp+18h] [rbp-28h] int v10; // [rsp+20h] [rbp-20h] int v11; // [rsp+24h] [rbp-1Ch] unsigned long long v13; // [rsp+38h] [rbp-8h] v13 = a1; v10 = *(_DWORD *)(a1 + 20); v9 = *(unsigned int **)a1; v11 = 0; v8 = a3; do { v7 = v8 + a2 * (unsigned long long)*v9; v8 = HIDWORD(v7); v4 = v9++; *v4 = v7; ++v11; } while ( v11 < v10 ); if ( v8 ) { if ( v10 >= *(_DWORD *)(a1 + 12) ) { v6 = Balloc((unsigned int)(*(_DWORD *)(a1 + 8) + 1), a4); memcpy(v6 + 16, a1 + 16, 4LL * *(int *)(a1 + 20) + 8); Bfree(a1, a4); v13 = v6; } *(_DWORD *)(*(_QWORD *)v13 + 4LL * v10) = HIDWORD(v7); *(_DWORD *)(v13 + 20) = v10 + 1; } return v13; }
multadd: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX MOV qword ptr [RBP + -0x18],RCX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x14] MOV dword ptr [RBP + -0x20],EAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOV dword ptr [RBP + -0x1c],0x0 MOVSXD RAX,dword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x30],RAX LAB_0018fbaa: MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX] MOVSXD RCX,dword ptr [RBP + -0xc] IMUL RAX,RCX ADD RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] SHR RAX,0x20 MOV qword ptr [RBP + -0x30],RAX MOV RAX,0xffffffff AND RAX,qword ptr [RBP + -0x38] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x28] MOV RDX,RAX ADD RDX,0x4 MOV qword ptr [RBP + -0x28],RDX MOV dword ptr [RAX],ECX MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,0x1 MOV dword ptr [RBP + -0x1c],EAX CMP EAX,dword ptr [RBP + -0x20] JL 0x0018fbaa CMP qword ptr [RBP + -0x30],0x0 JZ 0x0018fc8b MOV EAX,dword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x8] CMP EAX,dword ptr [RCX + 0xc] JL 0x0018fc63 MOV RAX,qword ptr [RBP + -0x8] MOV EDI,dword ptr [RAX + 0x8] ADD EDI,0x1 MOV RSI,qword ptr [RBP + -0x18] CALL 0x0018fca0 MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x40] ADD RDI,0x10 MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0x10 MOV RAX,qword ptr [RBP + -0x8] MOVSXD RDX,dword ptr [RAX + 0x14] SHL RDX,0x2 ADD RDX,0x8 CALL 0x0013b0c0 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0018f7a0 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x8],RAX LAB_0018fc63: MOV RAX,qword ptr [RBP + -0x30] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x20] MOV ESI,ECX ADD ESI,0x1 MOV dword ptr [RBP + -0x20],ESI MOVSXD RCX,ECX MOV dword ptr [RAX + RCX*0x4],EDX MOV ECX,dword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x14],ECX LAB_0018fc8b: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
long * multadd(long *param_1,int param_2,int param_3,int8 param_4) { int iVar1; ulong uVar2; ulong local_38; uint *local_30; int local_24; long *local_10; iVar1 = *(int *)((long)param_1 + 0x14); local_24 = 0; local_38 = (ulong)param_3; local_30 = (uint *)*param_1; do { uVar2 = (ulong)*local_30 * (long)param_2 + local_38; local_38 = uVar2 >> 0x20; *local_30 = (uint)uVar2; local_24 = local_24 + 1; local_30 = local_30 + 1; } while (local_24 < iVar1); local_10 = param_1; if (local_38 != 0) { if (*(int *)((long)param_1 + 0xc) <= iVar1) { local_10 = (long *)Balloc((int)param_1[1] + 1,param_4); memcpy(local_10 + 2,param_1 + 2,(long)*(int *)((long)param_1 + 0x14) * 4 + 8); Bfree(param_1,param_4); } *(int *)(*local_10 + (long)iVar1 * 4) = (int)(uVar2 >> 0x20); *(int *)((long)local_10 + 0x14) = iVar1 + 1; } return local_10; }
45,338
multadd
eloqsql/libmariadb/libmariadb/ma_dtoa.c
static Bigint *multadd(Bigint *b, int m, int a, Stack_alloc *alloc) { int i, wds; ULong *x; ULLong carry, y; Bigint *b1; wds= b->wds; x= b->p.x; i= 0; carry= a; do { y= *x * (ULLong)m + carry; carry= y >> 32; *x++= (ULong)(y & FFFFFFFF); } while (++i < wds); if (carry) { if (wds >= b->maxwds) { b1= Balloc(b->k+1, alloc); Bcopy(b1, b); Bfree(b, alloc); b= b1; } b->p.x[wds++]= (ULong) carry; b->wds= wds; } return b; }
O3
c
multadd: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movq %rdi, %rbx movslq 0x14(%rdi), %r12 movq (%rdi), %rax movslq %esi, %rcx cmpl $0x2, %r12d movl $0x1, %edx cmovgel %r12d, %edx xorl %esi, %esi xorl %r13d, %r13d movl (%rax,%rsi,4), %edi imulq %rcx, %rdi addq %r13, %rdi movq %rdi, %r13 shrq $0x20, %r13 movl %edi, (%rax,%rsi,4) incq %rsi cmpl %esi, %edx jne 0x6b1d8 shrq $0x20, %rdi je 0x6b245 cmpl 0xc(%rbx), %r12d jl 0x6b236 movl 0x8(%rbx), %edi incl %edi movq %r14, %rsi callq 0x6b257 movq %rax, %r15 leaq 0x10(%rax), %rdi leaq 0x10(%rbx), %rsi movslq 0x14(%rbx), %rax leaq 0x8(,%rax,4), %rdx callq 0x3a0c0 movq %rbx, %rdi movq %r14, %rsi callq 0x6b01e movq %r15, %rbx movq (%rbx), %rax leal 0x1(%r12), %ecx movl %r13d, (%rax,%r12,4) movl %ecx, 0x14(%rbx) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
multadd: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rdx mov rbx, rdi movsxd r12, dword ptr [rdi+14h] mov rax, [rdi] movsxd rcx, esi cmp r12d, 2 mov edx, 1 cmovge edx, r12d xor esi, esi xor r13d, r13d loc_6B1D8: mov edi, [rax+rsi*4] imul rdi, rcx add rdi, r13 mov r13, rdi shr r13, 20h mov [rax+rsi*4], edi inc rsi cmp edx, esi jnz short loc_6B1D8 shr rdi, 20h jz short loc_6B245 cmp r12d, [rbx+0Ch] jl short loc_6B236 mov edi, [rbx+8] inc edi mov rsi, r14 call Balloc mov r15, rax lea rdi, [rax+10h] lea rsi, [rbx+10h] movsxd rax, dword ptr [rbx+14h] lea rdx, ds:8[rax*4] call _memcpy mov rdi, rbx mov rsi, r14 call Bfree mov rbx, r15 loc_6B236: mov rax, [rbx] lea ecx, [r12+1] mov [rax+r12*4], r13d mov [rbx+14h], ecx loc_6B245: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long multadd(unsigned long long a1, int a2, unsigned long long *a3) { unsigned long long v4; // rbx long long v5; // r12 long long v6; // rax long long v7; // rcx long long v8; // rdx long long v9; // rsi unsigned long long v10; // r13 unsigned long long v11; // rdi long long v12; // r15 long long v13; // rcx long long v14; // r8 long long v15; // r9 v4 = a1; v5 = *(int *)(a1 + 20); v6 = *(_QWORD *)a1; v7 = a2; v8 = 1LL; if ( (int)v5 >= 2 ) v8 = (unsigned int)v5; v9 = 0LL; v10 = 0LL; do { v11 = v10 + v7 * *(unsigned int *)(v6 + 4 * v9); v10 = HIDWORD(v11); *(_DWORD *)(v6 + 4 * v9++) = v11; } while ( (_DWORD)v8 != (_DWORD)v9 ); if ( HIDWORD(v11) ) { if ( (int)v5 >= *(_DWORD *)(v4 + 12) ) { v12 = Balloc((unsigned int)(*(_DWORD *)(v4 + 8) + 1), a3, v8, v7); memcpy(v12 + 16, v4 + 16, 4LL * *(int *)(v4 + 20) + 8, v13, v14, v15); Bfree(v4, a3); v4 = v12; } *(_DWORD *)(*(_QWORD *)v4 + 4 * v5) = HIDWORD(v11); *(_DWORD *)(v4 + 20) = v5 + 1; } return v4; }
multadd: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDX MOV RBX,RDI MOVSXD R12,dword ptr [RDI + 0x14] MOV RAX,qword ptr [RDI] MOVSXD RCX,ESI CMP R12D,0x2 MOV EDX,0x1 CMOVGE EDX,R12D XOR ESI,ESI XOR R13D,R13D LAB_0016b1d8: MOV EDI,dword ptr [RAX + RSI*0x4] IMUL RDI,RCX ADD RDI,R13 MOV R13,RDI SHR R13,0x20 MOV dword ptr [RAX + RSI*0x4],EDI INC RSI CMP EDX,ESI JNZ 0x0016b1d8 SHR RDI,0x20 JZ 0x0016b245 CMP R12D,dword ptr [RBX + 0xc] JL 0x0016b236 MOV EDI,dword ptr [RBX + 0x8] INC EDI MOV RSI,R14 CALL 0x0016b257 MOV R15,RAX LEA RDI,[RAX + 0x10] LEA RSI,[RBX + 0x10] MOVSXD RAX,dword ptr [RBX + 0x14] LEA RDX,[0x8 + RAX*0x4] CALL 0x0013a0c0 MOV RDI,RBX MOV RSI,R14 CALL 0x0016b01e MOV RBX,R15 LAB_0016b236: MOV RAX,qword ptr [RBX] LEA ECX,[R12 + 0x1] MOV dword ptr [RAX + R12*0x4],R13D MOV dword ptr [RBX + 0x14],ECX LAB_0016b245: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long * multadd(long *param_1,int param_2,int8 param_3) { int iVar1; long lVar2; long *plVar3; int iVar4; long lVar5; ulong uVar6; ulong uVar7; iVar1 = *(int *)((long)param_1 + 0x14); lVar2 = *param_1; iVar4 = 1; if (1 < iVar1) { iVar4 = iVar1; } lVar5 = 0; uVar7 = 0; do { uVar6 = (ulong)*(uint *)(lVar2 + lVar5 * 4) * (long)param_2 + uVar7; uVar7 = uVar6 >> 0x20; *(int *)(lVar2 + lVar5 * 4) = (int)uVar6; lVar5 = lVar5 + 1; } while (iVar4 != (int)lVar5); plVar3 = param_1; if (uVar6 >> 0x20 != 0) { if (*(int *)((long)param_1 + 0xc) <= iVar1) { plVar3 = (long *)Balloc((int)param_1[1] + 1,param_3); memcpy(plVar3 + 2,param_1 + 2,(long)*(int *)((long)param_1 + 0x14) * 4 + 8); Bfree(param_1,param_3); } *(int *)(*plVar3 + (long)iVar1 * 4) = (int)(uVar6 >> 0x20); *(int *)((long)plVar3 + 0x14) = iVar1 + 1; } return plVar3; }
45,339
get_collation_number_internal
eloqsql/mysys/charset.c
static uint get_collation_number_internal(const char *name) { CHARSET_INFO **cs; for (cs= all_charsets; cs < all_charsets + array_elements(all_charsets); cs++) { if (cs[0] && cs[0]->coll_name.str && !my_strcasecmp(&my_charset_latin1, cs[0]->coll_name.str, name)) return cs[0]->number; } return 0; }
O0
c
get_collation_number_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) leaq 0x376abd(%rip), %rax # 0x3b1e50 movq %rax, -0x18(%rbp) leaq 0x376ab2(%rip), %rax # 0x3b1e50 addq $0x4000, %rax # imm = 0x4000 cmpq %rax, -0x18(%rbp) jae 0x3b40f movq -0x18(%rbp), %rax cmpq $0x0, (%rax) je 0x3b3ff movq -0x18(%rbp), %rax movq (%rax), %rax cmpq $0x0, 0x20(%rax) je 0x3b3ff leaq 0x254c67(%rip), %rax # 0x290030 movq 0xc0(%rax), %rax movq 0x40(%rax), %rax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movq 0x20(%rcx), %rsi movq -0x10(%rbp), %rdx leaq 0x254c46(%rip), %rdi # 0x290030 callq *%rax cmpl $0x0, %eax jne 0x3b3ff movq -0x18(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0x3b416 jmp 0x3b401 movq -0x18(%rbp), %rax addq $0x8, %rax movq %rax, -0x18(%rbp) jmp 0x3b397 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nop
get_collation_number_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi lea rax, all_charsets mov [rbp+var_18], rax loc_3B397: lea rax, all_charsets add rax, 4000h cmp [rbp+var_18], rax jnb short loc_3B40F mov rax, [rbp+var_18] cmp qword ptr [rax], 0 jz short loc_3B3FF mov rax, [rbp+var_18] mov rax, [rax] cmp qword ptr [rax+20h], 0 jz short loc_3B3FF lea rax, my_charset_latin1 mov rax, [rax+0C0h] mov rax, [rax+40h] mov rcx, [rbp+var_18] mov rcx, [rcx] mov rsi, [rcx+20h] mov rdx, [rbp+var_10] lea rdi, my_charset_latin1 call rax cmp eax, 0 jnz short loc_3B3FF mov rax, [rbp+var_18] mov rax, [rax] mov eax, [rax] mov [rbp+var_4], eax jmp short loc_3B416 loc_3B3FF: jmp short $+2 loc_3B401: mov rax, [rbp+var_18] add rax, 8 mov [rbp+var_18], rax jmp short loc_3B397 loc_3B40F: mov [rbp+var_4], 0 loc_3B416: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long get_collation_number_internal(long long a1) { unsigned int **i; // [rsp+8h] [rbp-18h] for ( i = (unsigned int **)all_charsets; i < &all_charsets[2048]; ++i ) { if ( *i && *((_QWORD *)*i + 4) && !(*(unsigned int ( **)(void *, _QWORD, long long))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, *((_QWORD *)*i + 4), a1) ) { return **i; } } return 0; }
get_collation_number_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI LEA RAX,[0x4b1e50] MOV qword ptr [RBP + -0x18],RAX LAB_0013b397: LEA RAX,[0x4b1e50] ADD RAX,0x4000 CMP qword ptr [RBP + -0x18],RAX JNC 0x0013b40f MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX],0x0 JZ 0x0013b3ff MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0x20],0x0 JZ 0x0013b3ff LEA RAX,[0x390030] MOV RAX,qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOV RSI,qword ptr [RCX + 0x20] MOV RDX,qword ptr [RBP + -0x10] LEA RDI,[0x390030] CALL RAX CMP EAX,0x0 JNZ 0x0013b3ff MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX JMP 0x0013b416 LAB_0013b3ff: JMP 0x0013b401 LAB_0013b401: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x8 MOV qword ptr [RBP + -0x18],RAX JMP 0x0013b397 LAB_0013b40f: MOV dword ptr [RBP + -0x4],0x0 LAB_0013b416: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 get_collation_number_internal(int8 param_1) { int iVar1; long *local_20; local_20 = &all_charsets; while( true ) { if ((long *)0x4b5e4f < local_20) { return 0; } if (((*local_20 != 0) && (*(long *)(*local_20 + 0x20) != 0)) && (iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_003900f0 + 0x40)) (&my_charset_latin1,*(int8 *)(*local_20 + 0x20),param_1), iVar1 == 0 )) break; local_20 = local_20 + 1; } return *(int4 *)*local_20; }
45,340
mysql_reset_connection_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_reset_connection_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_reset_connection, (parms->mysql), parms->mysql, int, r_int) }
O0
c
mysql_reset_connection_start_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x46920 movl %eax, -0x14(%rbp) movl -0x14(%rbp), %ecx movq -0x20(%rbp), %rax movl %ecx, 0x8(%rax) movq -0x20(%rbp), %rax movl $0x0, (%rax) addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mysql_reset_connection_start_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax] call mysql_reset_connection mov [rbp+var_14], eax mov ecx, [rbp+var_14] mov rax, [rbp+var_20] mov [rax+8], ecx mov rax, [rbp+var_20] mov dword ptr [rax], 0 add rsp, 20h pop rbp retn
_DWORD * mysql_reset_connection_start_internal( long long *a1, long long a2, long long a3, long long a4, int a5, int a6) { _DWORD *result; // rax _DWORD *v7; // [rsp+0h] [rbp-20h] v7 = *(_DWORD **)(*(_QWORD *)(*a1 + 1152) + 40LL); v7[2] = mysql_reset_connection(*a1, a2, a3, a4, a5, a6); result = v7; *v7 = 0; return result; }
mysql_reset_connection_start_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x00146920 MOV dword ptr [RBP + -0x14],EAX MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x0 ADD RSP,0x20 POP RBP RET
void mysql_reset_connection_start_internal(long *param_1) { int4 *puVar1; int4 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_reset_connection(*param_1); puVar1[2] = uVar2; *puVar1 = 0; return; }
45,341
LefDefParser::defiBlockage::addPolygon(LefDefParser::defiGeometries*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiBlockage.cpp
void defiBlockage::addPolygon(defiGeometries* geom) { struct defiPoints* p; int x, y; int i; if (numPolys_ == polysAllocated_) { struct defiPoints** poly; polysAllocated_ = (polysAllocated_ == 0) ? 2 : polysAllocated_ * 2; poly = (struct defiPoints**)malloc(sizeof(struct defiPoints*) * polysAllocated_); for (i = 0; i < numPolys_; i++) poly[i] = polygons_[i]; if (polygons_) free((char*)(polygons_)); polygons_ = poly; } p = (struct defiPoints*)malloc(sizeof(struct defiPoints)); p->numPoints = geom->numPoints(); p->x = (int*)malloc(sizeof(int)*p->numPoints); p->y = (int*)malloc(sizeof(int)*p->numPoints); for (i = 0; i < p->numPoints; i++) { geom->points(i, &x, &y); p->x[i] = x; p->y[i] = y; } polygons_[numPolys_] = p; numPolys_ += 1; }
O0
cpp
LefDefParser::defiBlockage::addPolygon(LefDefParser::defiGeometries*): subq $0x48, %rsp movq %rdi, 0x40(%rsp) movq %rsi, 0x38(%rsp) movq 0x40(%rsp), %rcx movq %rcx, 0x10(%rsp) movl 0x80(%rcx), %eax cmpl 0x84(%rcx), %eax jne 0x4be52 movq 0x10(%rsp), %rax cmpl $0x0, 0x84(%rax) jne 0x4bda3 movl $0x2, %eax movl %eax, 0xc(%rsp) jmp 0x4bdb4 movq 0x10(%rsp), %rax movl 0x84(%rax), %eax shll %eax movl %eax, 0xc(%rsp) movq 0x10(%rsp), %rax movl 0xc(%rsp), %ecx movl %ecx, 0x84(%rax) movslq 0x84(%rax), %rdi shlq $0x3, %rdi callq 0x72d0 movq %rax, 0x18(%rsp) movl $0x0, 0x24(%rsp) movq 0x10(%rsp), %rcx movl 0x24(%rsp), %eax cmpl 0x80(%rcx), %eax jge 0x4be21 movq 0x10(%rsp), %rax movq 0x88(%rax), %rax movslq 0x24(%rsp), %rcx movq (%rax,%rcx,8), %rdx movq 0x18(%rsp), %rax movslq 0x24(%rsp), %rcx movq %rdx, (%rax,%rcx,8) movl 0x24(%rsp), %eax addl $0x1, %eax movl %eax, 0x24(%rsp) jmp 0x4bde0 movq 0x10(%rsp), %rax cmpq $0x0, 0x88(%rax) je 0x4be41 movq 0x10(%rsp), %rax movq 0x88(%rax), %rdi callq 0x72a0 movq 0x10(%rsp), %rax movq 0x18(%rsp), %rcx movq %rcx, 0x88(%rax) movl $0x18, %edi callq 0x72d0 movq %rax, 0x30(%rsp) movq 0x38(%rsp), %rdi callq 0x2a930 movl %eax, %ecx movq 0x30(%rsp), %rax movl %ecx, (%rax) movq 0x30(%rsp), %rax movslq (%rax), %rdi shlq $0x2, %rdi callq 0x72d0 movq %rax, %rcx movq 0x30(%rsp), %rax movq %rcx, 0x8(%rax) movq 0x30(%rsp), %rax movslq (%rax), %rdi shlq $0x2, %rdi callq 0x72d0 movq %rax, %rcx movq 0x30(%rsp), %rax movq %rcx, 0x10(%rax) movl $0x0, 0x24(%rsp) movl 0x24(%rsp), %eax movq 0x30(%rsp), %rcx cmpl (%rcx), %eax jge 0x4bf12 movq 0x38(%rsp), %rdi movl 0x24(%rsp), %esi leaq 0x2c(%rsp), %rdx leaq 0x28(%rsp), %rcx callq 0x2a940 movl 0x2c(%rsp), %edx movq 0x30(%rsp), %rax movq 0x8(%rax), %rax movslq 0x24(%rsp), %rcx movl %edx, (%rax,%rcx,4) movl 0x28(%rsp), %edx movq 0x30(%rsp), %rax movq 0x10(%rax), %rax movslq 0x24(%rsp), %rcx movl %edx, (%rax,%rcx,4) movl 0x24(%rsp), %eax addl $0x1, %eax movl %eax, 0x24(%rsp) jmp 0x4beb6 movq 0x10(%rsp), %rax movq 0x30(%rsp), %rsi movq 0x88(%rax), %rcx movslq 0x80(%rax), %rdx movq %rsi, (%rcx,%rdx,8) movl 0x80(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x80(%rax) addq $0x48, %rsp retq nopw %cs:(%rax,%rax)
_ZN12LefDefParser12defiBlockage10addPolygonEPNS_14defiGeometriesE: sub rsp, 48h mov [rsp+48h+var_8], rdi mov [rsp+48h+var_10], rsi mov rcx, [rsp+48h+var_8] mov [rsp+48h+var_38], rcx mov eax, [rcx+80h] cmp eax, [rcx+84h] jnz loc_4BE52 mov rax, [rsp+48h+var_38] cmp dword ptr [rax+84h], 0 jnz short loc_4BDA3 mov eax, 2 mov [rsp+48h+var_3C], eax jmp short loc_4BDB4 loc_4BDA3: mov rax, [rsp+48h+var_38] mov eax, [rax+84h] shl eax, 1 mov [rsp+48h+var_3C], eax loc_4BDB4: mov rax, [rsp+48h+var_38] mov ecx, [rsp+48h+var_3C] mov [rax+84h], ecx movsxd rdi, dword ptr [rax+84h] shl rdi, 3 call _malloc mov [rsp+48h+var_30], rax mov [rsp+48h+var_24], 0 loc_4BDE0: mov rcx, [rsp+48h+var_38] mov eax, [rsp+48h+var_24] cmp eax, [rcx+80h] jge short loc_4BE21 mov rax, [rsp+48h+var_38] mov rax, [rax+88h] movsxd rcx, [rsp+48h+var_24] mov rdx, [rax+rcx*8] mov rax, [rsp+48h+var_30] movsxd rcx, [rsp+48h+var_24] mov [rax+rcx*8], rdx mov eax, [rsp+48h+var_24] add eax, 1 mov [rsp+48h+var_24], eax jmp short loc_4BDE0 loc_4BE21: mov rax, [rsp+48h+var_38] cmp qword ptr [rax+88h], 0 jz short loc_4BE41 mov rax, [rsp+48h+var_38] mov rdi, [rax+88h] call _free loc_4BE41: mov rax, [rsp+48h+var_38] mov rcx, [rsp+48h+var_30] mov [rax+88h], rcx loc_4BE52: mov edi, 18h call _malloc mov [rsp+48h+var_18], rax mov rdi, [rsp+48h+var_10]; this call _ZNK12LefDefParser14defiGeometries9numPointsEv; LefDefParser::defiGeometries::numPoints(void) mov ecx, eax mov rax, [rsp+48h+var_18] mov [rax], ecx mov rax, [rsp+48h+var_18] movsxd rdi, dword ptr [rax] shl rdi, 2 call _malloc mov rcx, rax mov rax, [rsp+48h+var_18] mov [rax+8], rcx mov rax, [rsp+48h+var_18] movsxd rdi, dword ptr [rax] shl rdi, 2 call _malloc mov rcx, rax mov rax, [rsp+48h+var_18] mov [rax+10h], rcx mov [rsp+48h+var_24], 0 loc_4BEB6: mov eax, [rsp+48h+var_24] mov rcx, [rsp+48h+var_18] cmp eax, [rcx] jge short loc_4BF12 mov rdi, [rsp+48h+var_10]; this mov esi, [rsp+48h+var_24]; int lea rdx, [rsp+48h+var_1C]; int * lea rcx, [rsp+48h+var_20]; int * call _ZNK12LefDefParser14defiGeometries6pointsEiPiS1_; LefDefParser::defiGeometries::points(int,int *,int *) mov edx, [rsp+48h+var_1C] mov rax, [rsp+48h+var_18] mov rax, [rax+8] movsxd rcx, [rsp+48h+var_24] mov [rax+rcx*4], edx mov edx, [rsp+48h+var_20] mov rax, [rsp+48h+var_18] mov rax, [rax+10h] movsxd rcx, [rsp+48h+var_24] mov [rax+rcx*4], edx mov eax, [rsp+48h+var_24] add eax, 1 mov [rsp+48h+var_24], eax jmp short loc_4BEB6 loc_4BF12: mov rax, [rsp+48h+var_38] mov rsi, [rsp+48h+var_18] mov rcx, [rax+88h] movsxd rdx, dword ptr [rax+80h] mov [rcx+rdx*8], rsi mov ecx, [rax+80h] add ecx, 1 mov [rax+80h], ecx add rsp, 48h retn
LefDefParser::defiBlockage * LefDefParser::defiBlockage::addPolygon( LefDefParser::defiBlockage *this, LefDefParser::defiGeometries *a2) { LefDefParser::defiBlockage *result; // rax int v3; // [rsp+Ch] [rbp-3Ch] long long v4; // [rsp+18h] [rbp-30h] int i; // [rsp+24h] [rbp-24h] int j; // [rsp+24h] [rbp-24h] int v7; // [rsp+28h] [rbp-20h] BYREF int v8; // [rsp+2Ch] [rbp-1Ch] BYREF int *v9; // [rsp+30h] [rbp-18h] LefDefParser::defiGeometries *v10; // [rsp+38h] [rbp-10h] LefDefParser::defiBlockage *v11; // [rsp+40h] [rbp-8h] v11 = this; v10 = a2; if ( *((_DWORD *)this + 32) == *((_DWORD *)this + 33) ) { if ( *((_DWORD *)this + 33) ) v3 = 2 * *((_DWORD *)this + 33); else v3 = 2; *((_DWORD *)this + 33) = v3; v4 = malloc(8LL * *((int *)this + 33)); for ( i = 0; i < *((_DWORD *)this + 32); ++i ) *(_QWORD *)(v4 + 8LL * i) = *(_QWORD *)(*((_QWORD *)this + 17) + 8LL * i); if ( *((_QWORD *)this + 17) ) free(*((_QWORD *)this + 17)); *((_QWORD *)this + 17) = v4; } v9 = (int *)malloc(24LL); *v9 = LefDefParser::defiGeometries::numPoints(v10); *((_QWORD *)v9 + 1) = malloc(4LL * *v9); *((_QWORD *)v9 + 2) = malloc(4LL * *v9); for ( j = 0; j < *v9; ++j ) { LefDefParser::defiGeometries::points((LefDefParser::defrData **)v10, j, &v8, &v7); *(_DWORD *)(*((_QWORD *)v9 + 1) + 4LL * j) = v8; *(_DWORD *)(*((_QWORD *)v9 + 2) + 4LL * j) = v7; } result = this; *(_QWORD *)(*((_QWORD *)this + 17) + 8LL * (int)(*((_DWORD *)this + 32))++) = v9; return result; }
addPolygon: SUB RSP,0x48 MOV qword ptr [RSP + 0x40],RDI MOV qword ptr [RSP + 0x38],RSI MOV RCX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x10],RCX MOV EAX,dword ptr [RCX + 0x80] CMP EAX,dword ptr [RCX + 0x84] JNZ 0x0014be52 MOV RAX,qword ptr [RSP + 0x10] CMP dword ptr [RAX + 0x84],0x0 JNZ 0x0014bda3 MOV EAX,0x2 MOV dword ptr [RSP + 0xc],EAX JMP 0x0014bdb4 LAB_0014bda3: MOV RAX,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RAX + 0x84] SHL EAX,0x1 MOV dword ptr [RSP + 0xc],EAX LAB_0014bdb4: MOV RAX,qword ptr [RSP + 0x10] MOV ECX,dword ptr [RSP + 0xc] MOV dword ptr [RAX + 0x84],ECX MOVSXD RDI,dword ptr [RAX + 0x84] SHL RDI,0x3 CALL 0x001072d0 MOV qword ptr [RSP + 0x18],RAX MOV dword ptr [RSP + 0x24],0x0 LAB_0014bde0: MOV RCX,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RSP + 0x24] CMP EAX,dword ptr [RCX + 0x80] JGE 0x0014be21 MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0x88] MOVSXD RCX,dword ptr [RSP + 0x24] MOV RDX,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RSP + 0x18] MOVSXD RCX,dword ptr [RSP + 0x24] MOV qword ptr [RAX + RCX*0x8],RDX MOV EAX,dword ptr [RSP + 0x24] ADD EAX,0x1 MOV dword ptr [RSP + 0x24],EAX JMP 0x0014bde0 LAB_0014be21: MOV RAX,qword ptr [RSP + 0x10] CMP qword ptr [RAX + 0x88],0x0 JZ 0x0014be41 MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX + 0x88] CALL 0x001072a0 LAB_0014be41: MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x18] MOV qword ptr [RAX + 0x88],RCX LAB_0014be52: MOV EDI,0x18 CALL 0x001072d0 MOV qword ptr [RSP + 0x30],RAX MOV RDI,qword ptr [RSP + 0x38] CALL 0x0012a930 MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x30] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RSP + 0x30] MOVSXD RDI,dword ptr [RAX] SHL RDI,0x2 CALL 0x001072d0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RSP + 0x30] MOVSXD RDI,dword ptr [RAX] SHL RDI,0x2 CALL 0x001072d0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x10],RCX MOV dword ptr [RSP + 0x24],0x0 LAB_0014beb6: MOV EAX,dword ptr [RSP + 0x24] MOV RCX,qword ptr [RSP + 0x30] CMP EAX,dword ptr [RCX] JGE 0x0014bf12 MOV RDI,qword ptr [RSP + 0x38] MOV ESI,dword ptr [RSP + 0x24] LEA RDX,[RSP + 0x2c] LEA RCX,[RSP + 0x28] CALL 0x0012a940 MOV EDX,dword ptr [RSP + 0x2c] MOV RAX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX + 0x8] MOVSXD RCX,dword ptr [RSP + 0x24] MOV dword ptr [RAX + RCX*0x4],EDX MOV EDX,dword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX + 0x10] MOVSXD RCX,dword ptr [RSP + 0x24] MOV dword ptr [RAX + RCX*0x4],EDX MOV EAX,dword ptr [RSP + 0x24] ADD EAX,0x1 MOV dword ptr [RSP + 0x24],EAX JMP 0x0014beb6 LAB_0014bf12: MOV RAX,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RAX + 0x88] MOVSXD RDX,dword ptr [RAX + 0x80] MOV qword ptr [RCX + RDX*0x8],RSI MOV ECX,dword ptr [RAX + 0x80] ADD ECX,0x1 MOV dword ptr [RAX + 0x80],ECX ADD RSP,0x48 RET
/* LefDefParser::defiBlockage::addPolygon(LefDefParser::defiGeometries*) */ void __thiscall LefDefParser::defiBlockage::addPolygon(defiBlockage *this,defiGeometries *param_1) { int iVar1; void *pvVar2; int local_3c; int local_24; int local_20; int local_1c; int *local_18; defiGeometries *local_10; defiBlockage *local_8; local_10 = param_1; local_8 = this; if (*(int *)(this + 0x80) == *(int *)(this + 0x84)) { if (*(int *)(this + 0x84) == 0) { local_3c = 2; } else { local_3c = *(int *)(this + 0x84) << 1; } *(int *)(this + 0x84) = local_3c; pvVar2 = malloc((long)*(int *)(this + 0x84) << 3); for (local_24 = 0; local_24 < *(int *)(this + 0x80); local_24 = local_24 + 1) { *(int8 *)((long)pvVar2 + (long)local_24 * 8) = *(int8 *)(*(long *)(this + 0x88) + (long)local_24 * 8); } if (*(long *)(this + 0x88) != 0) { free(*(void **)(this + 0x88)); } *(void **)(this + 0x88) = pvVar2; } local_18 = (int *)malloc(0x18); iVar1 = defiGeometries::numPoints(local_10); *local_18 = iVar1; pvVar2 = malloc((long)*local_18 << 2); *(void **)(local_18 + 2) = pvVar2; pvVar2 = malloc((long)*local_18 << 2); *(void **)(local_18 + 4) = pvVar2; for (local_24 = 0; local_24 < *local_18; local_24 = local_24 + 1) { defiGeometries::points(local_10,local_24,&local_1c,&local_20); *(int *)(*(long *)(local_18 + 2) + (long)local_24 * 4) = local_1c; *(int *)(*(long *)(local_18 + 4) + (long)local_24 * 4) = local_20; } *(int **)(*(long *)(this + 0x88) + (long)*(int *)(this + 0x80) * 8) = local_18; *(int *)(this + 0x80) = *(int *)(this + 0x80) + 1; return; }
45,342
aimrt::runtime::core::executor::AsioThreadExecutor::~AsioThreadExecutor()
aimrt_mujoco_sim/_deps/aimrt-src/src/runtime/core/../core/executor/asio_thread_executor.h
~AsioThreadExecutor() override = default;
O3
c
aimrt::runtime::core::executor::AsioThreadExecutor::~AsioThreadExecutor(): pushq %rbx movq %rdi, %rbx leaq 0x1a19bd(%rip), %rax # 0x298e48 movq %rax, (%rdi) addq $0xc8, %rdi callq 0x82260 movq 0xb0(%rbx), %rdi testq %rdi, %rdi je 0xf74b5 movq 0xc0(%rbx), %rsi subq %rdi, %rsi callq 0x82190 leaq 0xa8(%rbx), %rdi callq 0x83c90 movq 0xa0(%rbx), %rsi testq %rsi, %rsi je 0xf74d9 leaq 0xa0(%rbx), %rdi callq 0x83770 movq $0x0, 0xa0(%rbx) movq 0x88(%rbx), %rdi testq %rdi, %rdi je 0xf74f5 callq 0x81a00 movq 0x50(%rbx), %rdi testq %rdi, %rdi je 0xf750a movq 0x60(%rbx), %rsi subq %rdi, %rsi callq 0x82190 movq 0x30(%rbx), %rdi leaq 0x40(%rbx), %rax cmpq %rax, %rdi je 0xf7522 movq (%rax), %rsi incq %rsi callq 0x82190 movq 0x8(%rbx), %rdi addq $0x18, %rbx cmpq %rbx, %rdi je 0xf753b movq (%rbx), %rsi incq %rsi popq %rbx jmp 0x82190 popq %rbx retq nop
_ZN5aimrt7runtime4core8executor18AsioThreadExecutorD2Ev: push rbx mov rbx, rdi lea rax, off_298E48 mov [rdi], rax add rdi, 0C8h call __ZNSt7__cxx1110_List_baseISt6threadSaIS1_EE8_M_clearEv; std::_List_base<std::thread>::_M_clear(void) mov rdi, [rbx+0B0h]; void * test rdi, rdi jz short loc_F74B5 mov rsi, [rbx+0C0h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_F74B5: lea rdi, [rbx+0A8h] call __ZNSt10unique_ptrIN4asio19executor_work_guardINS0_10io_context19basic_executor_typeISaIvELm0EEEvvEESt14default_deleteIS6_EED2Ev; std::unique_ptr<asio::executor_work_guard<asio::io_context::basic_executor_type<std::allocator<void>,0ul>,void,void>>::~unique_ptr() mov rsi, [rbx+0A0h] test rsi, rsi jz short loc_F74D9 lea rdi, [rbx+0A0h] call __ZNKSt14default_deleteIN4asio10io_contextEEclEPS1_; std::default_delete<asio::io_context>::operator()(asio::io_context*) loc_F74D9: mov qword ptr [rbx+0A0h], 0 mov rdi, [rbx+88h] test rdi, rdi jz short loc_F74F5 call __ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_F74F5: mov rdi, [rbx+50h]; void * test rdi, rdi jz short loc_F750A mov rsi, [rbx+60h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_F750A: mov rdi, [rbx+30h]; void * lea rax, [rbx+40h] cmp rdi, rax jz short loc_F7522 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_F7522: mov rdi, [rbx+8]; void * add rbx, 18h cmp rdi, rbx jz short loc_F753B mov rsi, [rbx] inc rsi; unsigned __int64 pop rbx jmp __ZdlPvm; operator delete(void *,ulong) loc_F753B: pop rbx retn
void aimrt::runtime::core::executor::AsioThreadExecutor::~AsioThreadExecutor( aimrt::runtime::core::executor::AsioThreadExecutor *this) { void *v2; // rdi long long v3; // rdi void *v4; // rdi char *v5; // rdi _QWORD *v6; // rdi _QWORD *v7; // rbx *(_QWORD *)this = off_298E48; std::_List_base<std::thread>::_M_clear((char *)this + 200); v2 = (void *)*((_QWORD *)this + 22); if ( v2 ) operator delete(v2, *((_QWORD *)this + 24) - (_QWORD)v2); std::unique_ptr<asio::executor_work_guard<asio::io_context::basic_executor_type<std::allocator<void>,0ul>,void,void>>::~unique_ptr((char *)this + 168); if ( *((_QWORD *)this + 20) ) std::default_delete<asio::io_context>::operator()((char *)this + 160); *((_QWORD *)this + 20) = 0LL; v3 = *((_QWORD *)this + 17); if ( v3 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3); v4 = (void *)*((_QWORD *)this + 10); if ( v4 ) operator delete(v4, *((_QWORD *)this + 12) - (_QWORD)v4); v5 = (char *)*((_QWORD *)this + 6); if ( v5 != (char *)this + 64 ) operator delete(v5, *((_QWORD *)this + 8) + 1LL); v6 = (_QWORD *)*((_QWORD *)this + 1); v7 = (_QWORD *)((char *)this + 24); if ( v6 != v7 ) operator delete(v6, *v7 + 1LL); }
~AsioThreadExecutor: PUSH RBX MOV RBX,RDI LEA RAX,[0x398e48] MOV qword ptr [RDI],RAX ADD RDI,0xc8 CALL 0x00182260 MOV RDI,qword ptr [RBX + 0xb0] TEST RDI,RDI JZ 0x001f74b5 MOV RSI,qword ptr [RBX + 0xc0] SUB RSI,RDI CALL 0x00182190 LAB_001f74b5: LEA RDI,[RBX + 0xa8] CALL 0x00183c90 MOV RSI,qword ptr [RBX + 0xa0] TEST RSI,RSI JZ 0x001f74d9 LEA RDI,[RBX + 0xa0] CALL 0x00183770 LAB_001f74d9: MOV qword ptr [RBX + 0xa0],0x0 MOV RDI,qword ptr [RBX + 0x88] TEST RDI,RDI JZ 0x001f74f5 CALL 0x00181a00 LAB_001f74f5: MOV RDI,qword ptr [RBX + 0x50] TEST RDI,RDI JZ 0x001f750a MOV RSI,qword ptr [RBX + 0x60] SUB RSI,RDI CALL 0x00182190 LAB_001f750a: MOV RDI,qword ptr [RBX + 0x30] LEA RAX,[RBX + 0x40] CMP RDI,RAX JZ 0x001f7522 MOV RSI,qword ptr [RAX] INC RSI CALL 0x00182190 LAB_001f7522: MOV RDI,qword ptr [RBX + 0x8] ADD RBX,0x18 CMP RDI,RBX JZ 0x001f753b MOV RSI,qword ptr [RBX] INC RSI POP RBX JMP 0x00182190 LAB_001f753b: POP RBX RET
/* aimrt::runtime::core::executor::AsioThreadExecutor::~AsioThreadExecutor() */ void __thiscall aimrt::runtime::core::executor::AsioThreadExecutor::~AsioThreadExecutor(AsioThreadExecutor *this) { void *pvVar1; *(int ***)this = &PTR__AsioThreadExecutor_00398e48; std::__cxx11::_List_base<std::thread,std::allocator<std::thread>>::_M_clear ((_List_base<std::thread,std::allocator<std::thread>> *)(this + 200)); pvVar1 = *(void **)(this + 0xb0); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + 0xc0) - (long)pvVar1); } std:: unique_ptr<asio::executor_work_guard<asio::io_context::basic_executor_type<std::allocator<void>,0ul>,void,void>,std::default_delete<asio::executor_work_guard<asio::io_context::basic_executor_type<std::allocator<void>,0ul>,void,void>>> ::~unique_ptr((unique_ptr<asio::executor_work_guard<asio::io_context::basic_executor_type<std::allocator<void>,0ul>,void,void>,std::default_delete<asio::executor_work_guard<asio::io_context::basic_executor_type<std::allocator<void>,0ul>,void,void>>> *)(this + 0xa8)); if (*(io_context **)(this + 0xa0) != (io_context *)0x0) { std::default_delete<asio::io_context>::operator() ((default_delete<asio::io_context> *)(this + 0xa0),*(io_context **)(this + 0xa0)); } *(int8 *)(this + 0xa0) = 0; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x88) != (_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 + 0x88)); } pvVar1 = *(void **)(this + 0x50); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + 0x60) - (long)pvVar1); } if (*(AsioThreadExecutor **)(this + 0x30) != this + 0x40) { operator_delete(*(AsioThreadExecutor **)(this + 0x30),*(long *)(this + 0x40) + 1); } if (*(AsioThreadExecutor **)(this + 8) != this + 0x18) { operator_delete(*(AsioThreadExecutor **)(this + 8),*(long *)(this + 0x18) + 1); return; } return; }
45,343
clip_model_loader::clip_model_loader(char const*, clip_ctx&)
llama.cpp/examples/llava/clip.cpp
clip_model_loader(const char * fname, clip_ctx & ctx_clip) : ctx_clip(ctx_clip), fname(fname) { struct ggml_context * meta = nullptr; struct gguf_init_params params = { /*.no_alloc = */ true, /*.ctx = */ &meta, }; ctx_gguf = gguf_context_ptr(gguf_init_from_file(fname, params)); if (!ctx_gguf.get()) { throw std::runtime_error(string_format("%s: failed to load CLIP model from %s. Does this file exist?\n", __func__, fname)); } ctx_meta.reset(meta); const int n_tensors = gguf_get_n_tensors(ctx_gguf.get()); // print gguf info { std::string name; get_string(KEY_NAME, name, false); std::string description; get_string(KEY_DESCRIPTION, description, false); LOG_INF("%s: model name: %s\n", __func__, name.c_str()); LOG_INF("%s: description: %s\n", __func__, description.c_str()); LOG_INF("%s: GGUF version: %d\n", __func__, gguf_get_version(ctx_gguf.get())); LOG_INF("%s: alignment: %zu\n", __func__, gguf_get_alignment(ctx_gguf.get())); LOG_INF("%s: n_tensors: %d\n", __func__, n_tensors); LOG_INF("%s: n_kv: %d\n", __func__, (int)gguf_get_n_kv(ctx_gguf.get())); LOG_INF("\n"); } // tensors { for (int i = 0; i < n_tensors; ++i) { const char * name = gguf_get_tensor_name(ctx_gguf.get(), i); const size_t offset = gguf_get_tensor_offset(ctx_gguf.get(), i); enum ggml_type type = gguf_get_tensor_type(ctx_gguf.get(), i); struct ggml_tensor * cur = ggml_get_tensor(meta, name); size_t tensor_size = ggml_nbytes(cur); model_size += tensor_size; LOG_DBG("%s: tensor[%d]: n_dims = %d, name = %s, tensor_size=%zu, offset=%zu, shape:[%" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 "], type = %s\n", __func__, i, ggml_n_dims(cur), cur->name, tensor_size, offset, cur->ne[0], cur->ne[1], cur->ne[2], cur->ne[3], ggml_type_name(type)); } } }
O3
cpp
clip_model_loader::clip_model_loader(char const*, clip_ctx&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movq %rsi, %r15 leaq 0x8(%rdi), %r13 xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq %rdx, 0x10(%rdi) movq %rdi, 0x8(%rsp) addq $0x18, %rdi leaq 0x38(%rsp), %rdx callq 0x1e400 leaq 0x60(%rsp), %rdx movq $0x0, (%rdx) movq %r15, %rdi movl $0x1, %esi movq %r13, 0x58(%rsp) callq 0x1db60 leaq 0x38(%rsp), %rbx movq $0x0, (%rbx) movq %r13, %rdi movq %rax, %rsi callq 0x1c190 movq %rbx, %rdi callq 0x1d060 cmpq $0x0, (%r13) je 0x3a2c9 movq 0x60(%rsp), %rsi movq 0x8(%rsp), %rbx movq %rbx, %rdi callq 0x1c1a0 movq 0x8(%rbx), %rdi callq 0x1e8a0 movq %rax, 0x10(%rsp) leaq 0x48(%rsp), %rbx movq %rbx, -0x10(%rbx) movq $0x0, -0x8(%rbx) movb $0x0, (%rbx) leaq 0x28(%rsp), %r14 movq %r14, -0x10(%r14) leaq 0x1591d(%rip), %rsi # 0x4f896 leaq 0x15922(%rip), %rdx # 0x4f8a2 leaq 0x18(%rsp), %rdi callq 0x1c6f0 leaq 0x18(%rsp), %rsi leaq 0x38(%rsp), %rdx movq 0x8(%rsp), %rdi xorl %ecx, %ecx callq 0x1d180 movq 0x18(%rsp), %rdi cmpq %r14, %rdi je 0x39fb7 movq 0x28(%rsp), %rsi incq %rsi callq 0x1d480 movq %r14, 0x18(%rsp) movq $0x0, 0x20(%rsp) movb $0x0, 0x28(%rsp) leaq 0x98(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x158c5(%rip), %rsi # 0x4f8a3 leaq 0x158d1(%rip), %rdx # 0x4f8b6 leaq 0x88(%rsp), %rdi callq 0x1c6f0 leaq 0x88(%rsp), %rsi leaq 0x18(%rsp), %rdx movq 0x8(%rsp), %rdi xorl %ecx, %ecx callq 0x1d180 movq 0x88(%rsp), %rdi cmpq %r12, %rdi je 0x3a028 movq 0x98(%rsp), %rsi incq %rsi callq 0x1d480 movq 0x23f61(%rip), %rax # 0x5df90 cmpl $0x2, (%rax) jg 0x3a16c movq 0x38(%rsp), %rcx leaq 0x15873(%rip), %rsi # 0x4f8b7 leaq 0x15839(%rip), %rdx # 0x4f884 movl $0x2, %edi xorl %eax, %eax callq 0x243c3 movq 0x23f32(%rip), %rax # 0x5df90 cmpl $0x2, (%rax) jg 0x3a16c movq 0x18(%rsp), %rcx leaq 0x1585a(%rip), %rsi # 0x4f8cd leaq 0x1580a(%rip), %rdx # 0x4f884 movl $0x2, %edi xorl %eax, %eax callq 0x243c3 movq 0x23f03(%rip), %rax # 0x5df90 cmpl $0x2, (%rax) jg 0x3a16c movq (%r13), %rdi callq 0x1e520 leaq 0x1583d(%rip), %rsi # 0x4f8e3 leaq 0x157d7(%rip), %rdx # 0x4f884 movl $0x2, %edi movl %eax, %ecx xorl %eax, %eax callq 0x243c3 movq 0x23ece(%rip), %rax # 0x5df90 cmpl $0x2, (%rax) jg 0x3a16c movq (%r13), %rdi callq 0x1da40 leaq 0x1581e(%rip), %rsi # 0x4f8f9 leaq 0x157a2(%rip), %rdx # 0x4f884 movl $0x2, %edi movq %rax, %rcx xorl %eax, %eax callq 0x243c3 movq 0x23e98(%rip), %rax # 0x5df90 cmpl $0x2, (%rax) jg 0x3a16c leaq 0x1580c(%rip), %rsi # 0x4f910 leaq 0x15779(%rip), %rdx # 0x4f884 movl $0x2, %edi movq 0x10(%rsp), %rcx xorl %eax, %eax callq 0x243c3 movq 0x23e6d(%rip), %rax # 0x5df90 cmpl $0x2, (%rax) jg 0x3a16c movq (%r13), %rdi callq 0x1e930 leaq 0x157ee(%rip), %rsi # 0x4f926 leaq 0x15745(%rip), %rdx # 0x4f884 movl $0x2, %edi movl %eax, %ecx xorl %eax, %eax callq 0x243c3 movq 0x23e3c(%rip), %rax # 0x5df90 cmpl $0x2, (%rax) jg 0x3a16c leaq 0x161fb(%rip), %rsi # 0x5035b movl $0x2, %edi xorl %eax, %eax callq 0x243c3 movq 0x18(%rsp), %rdi cmpq %r14, %rdi je 0x3a183 movq 0x28(%rsp), %rsi incq %rsi callq 0x1d480 movq 0x38(%rsp), %rdi cmpq %rbx, %rdi je 0x3a19a movq 0x48(%rsp), %rsi incq %rsi callq 0x1d480 cmpl $0x0, 0x10(%rsp) jle 0x3a2b7 movq 0x10(%rsp), %rax andl $0x7fffffff, %eax # imm = 0x7FFFFFFF movq %rax, 0x10(%rsp) xorl %ebp, %ebp movq 0x58(%rsp), %r14 movq (%r14), %rdi movq %rbp, %rsi callq 0x1ded0 movq %rax, %rbx movq (%r14), %rdi movq %rbp, %rsi callq 0x1cc30 movq %rax, %r12 movq (%r14), %rdi movq %rbp, %rsi callq 0x1de30 movl %eax, %r15d movq %r12, 0x80(%rsp) movq 0x60(%rsp), %rdi movq %rbx, %rsi callq 0x1dbc0 movq %rax, %rbx movq %rax, %rdi callq 0x1c150 movq %rax, %r13 movq 0x8(%rsp), %rax addq %r13, 0x38(%rax) movq 0x23d78(%rip), %rax # 0x5df90 cmpl $0x1, (%rax) jg 0x3a2a9 movq %rbx, %rdi callq 0x1c130 movl %eax, %r14d movq 0x10(%rbx), %rax movq %rax, 0x78(%rsp) movq 0x18(%rbx), %rax movq %rax, 0x70(%rsp) movq 0x20(%rbx), %rax movq %rax, 0x68(%rsp) movq 0x28(%rbx), %r12 movl %r15d, %edi callq 0x1d2f0 movq %rax, %r10 addq $0x100, %rbx # imm = 0x100 subq $0x8, %rsp movl $0x1, %edi leaq 0x156cf(%rip), %rsi # 0x4f93c leaq 0x15610(%rip), %rdx # 0x4f884 movl %ebp, %ecx movl %r14d, %r8d movq %rbx, %r9 xorl %eax, %eax pushq %r10 pushq %r12 pushq 0x80(%rsp) pushq 0x90(%rsp) pushq 0xa0(%rsp) pushq 0xb0(%rsp) pushq %r13 callq 0x243c3 addq $0x40, %rsp incq %rbp cmpq %rbp, 0x10(%rsp) jne 0x3a1b6 addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x1c8c0 movq %rax, %r12 leaq 0x15569(%rip), %rsi # 0x4f846 leaq 0x155a0(%rip), %rdx # 0x4f884 leaq 0x38(%rsp), %rdi movq %r15, %rcx xorl %eax, %eax callq 0x28ebe movb $0x1, %bl leaq 0x38(%rsp), %rsi movq %r12, %rdi callq 0x1e1d0 xorl %ebx, %ebx movq 0x23ced(%rip), %rsi # 0x5dff8 movq 0x23bc6(%rip), %rdx # 0x5ded8 movq %r12, %rdi callq 0x1e450 movq %rax, %r15 leaq 0x48(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3a338 movq 0x48(%rsp), %rsi incq %rsi callq 0x1d480 testb %bl, %bl jne 0x3a341 jmp 0x3a3bd movq %rax, %r15 movq %r12, %rdi callq 0x1cde0 jmp 0x3a3bd movq %rax, %r15 movq 0x88(%rsp), %rdi cmpq %r12, %rdi je 0x3a382 movq 0x98(%rsp), %rsi incq %rsi callq 0x1d480 jmp 0x3a382 jmp 0x3a37f jmp 0x3a37f movq %rax, %r15 jmp 0x3a399 jmp 0x3a3ba jmp 0x3a3ba movq %rax, %r15 jmp 0x3a3df movq %rax, %r15 movq 0x18(%rsp), %rdi cmpq %r14, %rdi je 0x3a399 movq 0x28(%rsp), %rsi incq %rsi callq 0x1d480 movq 0x38(%rsp), %rdi cmpq %rbx, %rdi je 0x3a3bd movq 0x48(%rsp), %rsi incq %rsi callq 0x1d480 jmp 0x3a3bd jmp 0x3a3ba jmp 0x3a3ba jmp 0x3a3ba jmp 0x3a3ba movq %rax, %r15 movq 0x8(%rsp), %rax movq 0x18(%rax), %rdi addq $0x28, %rax cmpq %rax, %rdi movq 0x58(%rsp), %r13 je 0x3a3df movq (%rax), %rsi incq %rsi callq 0x1d480 movq %r13, %rdi callq 0x1d060 movq 0x8(%rsp), %rdi callq 0x1d5a0 movq %r15, %rdi callq 0x1e530 nop
_ZN17clip_model_loaderC2EPKcR8clip_ctx: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A8h mov r15, rsi lea r13, [rdi+8] xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov [rdi+10h], rdx mov [rsp+0D8h+var_D0], rdi add rdi, 18h lea rdx, [rsp+0D8h+var_A0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdx, [rsp+0D8h+var_78] mov qword ptr [rdx], 0 mov rdi, r15 mov esi, 1 mov [rsp+0D8h+var_80], r13 call _gguf_init_from_file lea rbx, [rsp+0D8h+var_A0] mov qword ptr [rbx], 0 mov rdi, r13 mov rsi, rax call __ZNSt15__uniq_ptr_implI12gguf_context20gguf_context_deleterE5resetEPS0_; std::__uniq_ptr_impl<gguf_context,gguf_context_deleter>::reset(gguf_context*) mov rdi, rbx call __ZNSt10unique_ptrI12gguf_context20gguf_context_deleterED2Ev; std::unique_ptr<gguf_context,gguf_context_deleter>::~unique_ptr() cmp qword ptr [r13+0], 0 jz loc_3A2C9 mov rsi, [rsp+0D8h+var_78] mov rbx, [rsp+0D8h+var_D0] mov rdi, rbx call __ZNSt15__uniq_ptr_implI12ggml_context20ggml_context_deleterE5resetEPS0_; std::__uniq_ptr_impl<ggml_context,ggml_context_deleter>::reset(ggml_context*) mov rdi, [rbx+8] call _gguf_get_n_tensors mov [rsp+0D8h+var_C8], rax lea rbx, [rsp+0D8h+var_90] mov [rbx-10h], rbx mov qword ptr [rbx-8], 0 mov byte ptr [rbx], 0 lea r14, [rsp+0D8h+var_B0] mov [r14-10h], r14 lea rsi, aGeneralName; "general.name" lea rdx, aGeneralName+0Ch; "" lea rdi, [rsp+0D8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rsi, [rsp+0D8h+var_C0] lea rdx, [rsp+0D8h+var_A0] mov rdi, [rsp+0D8h+var_D0] xor ecx, ecx call __ZN17clip_model_loader10get_stringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS5_b; clip_model_loader::get_string(std::string const&,std::string&,bool) mov rdi, [rsp+0D8h+var_C0]; void * cmp rdi, r14 jz short loc_39FB7 mov rsi, [rsp+0D8h+var_B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_39FB7: mov [rsp+0D8h+var_C0], r14 mov [rsp+0D8h+var_B8], 0 mov byte ptr [rsp+0D8h+var_B0], 0 lea r12, [rsp+0D8h+var_40] mov [r12-10h], r12 lea rsi, aGeneralDescrip; "general.description" lea rdx, aGeneralDescrip+13h; "" lea rdi, [rsp+0D8h+var_50] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rsi, [rsp+0D8h+var_50] lea rdx, [rsp+0D8h+var_C0] mov rdi, [rsp+0D8h+var_D0] xor ecx, ecx call __ZN17clip_model_loader10get_stringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS5_b; clip_model_loader::get_string(std::string const&,std::string&,bool) mov rdi, [rsp+0D8h+var_50]; void * cmp rdi, r12 jz short loc_3A028 mov rsi, [rsp+0D8h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3A028: mov rax, cs:g_logger_state_ptr cmp dword ptr [rax], 2 jg loc_3A16C mov rcx, [rsp+0D8h+var_A0] lea rsi, aSModelNameS; "%s: model name: %s\n" lea rdx, aClipModelLoade; "clip_model_loader" mov edi, 2 xor eax, eax call _ZL17clip_log_internal14ggml_log_levelPKcz_0; clip_log_internal(ggml_log_level,char const*,...) mov rax, cs:g_logger_state_ptr cmp dword ptr [rax], 2 jg loc_3A16C mov rcx, [rsp+0D8h+var_C0] lea rsi, aSDescriptionS; "%s: description: %s\n" lea rdx, aClipModelLoade; "clip_model_loader" mov edi, 2 xor eax, eax call _ZL17clip_log_internal14ggml_log_levelPKcz_0; clip_log_internal(ggml_log_level,char const*,...) mov rax, cs:g_logger_state_ptr cmp dword ptr [rax], 2 jg loc_3A16C mov rdi, [r13+0] call _gguf_get_version lea rsi, aSGgufVersionD; "%s: GGUF version: %d\n" lea rdx, aClipModelLoade; "clip_model_loader" mov edi, 2 mov ecx, eax xor eax, eax call _ZL17clip_log_internal14ggml_log_levelPKcz_0; clip_log_internal(ggml_log_level,char const*,...) mov rax, cs:g_logger_state_ptr cmp dword ptr [rax], 2 jg loc_3A16C mov rdi, [r13+0] call _gguf_get_alignment lea rsi, aSAlignmentZu; "%s: alignment: %zu\n" lea rdx, aClipModelLoade; "clip_model_loader" mov edi, 2 mov rcx, rax xor eax, eax call _ZL17clip_log_internal14ggml_log_levelPKcz_0; clip_log_internal(ggml_log_level,char const*,...) mov rax, cs:g_logger_state_ptr cmp dword ptr [rax], 2 jg short loc_3A16C lea rsi, aSNTensorsD; "%s: n_tensors: %d\n" lea rdx, aClipModelLoade; "clip_model_loader" mov edi, 2 mov rcx, [rsp+0D8h+var_C8] xor eax, eax call _ZL17clip_log_internal14ggml_log_levelPKcz_0; clip_log_internal(ggml_log_level,char const*,...) mov rax, cs:g_logger_state_ptr cmp dword ptr [rax], 2 jg short loc_3A16C mov rdi, [r13+0] call _gguf_get_n_kv lea rsi, aSNKvD; "%s: n_kv: %d\n" lea rdx, aClipModelLoade; "clip_model_loader" mov edi, 2 mov ecx, eax xor eax, eax call _ZL17clip_log_internal14ggml_log_levelPKcz_0; clip_log_internal(ggml_log_level,char const*,...) mov rax, cs:g_logger_state_ptr cmp dword ptr [rax], 2 jg short loc_3A16C lea rsi, asc_50355+6; "\n" mov edi, 2 xor eax, eax call _ZL17clip_log_internal14ggml_log_levelPKcz_0; clip_log_internal(ggml_log_level,char const*,...) loc_3A16C: mov rdi, [rsp+0D8h+var_C0]; void * cmp rdi, r14 jz short loc_3A183 mov rsi, [rsp+0D8h+var_B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3A183: mov rdi, [rsp+0D8h+var_A0]; void * cmp rdi, rbx jz short loc_3A19A mov rsi, [rsp+0D8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3A19A: cmp dword ptr [rsp+0D8h+var_C8], 0 jle loc_3A2B7 mov rax, [rsp+0D8h+var_C8] and eax, 7FFFFFFFh mov [rsp+0D8h+var_C8], rax xor ebp, ebp loc_3A1B6: mov r14, [rsp+0D8h+var_80] mov rdi, [r14] mov rsi, rbp call _gguf_get_tensor_name mov rbx, rax mov rdi, [r14] mov rsi, rbp call _gguf_get_tensor_offset mov r12, rax mov rdi, [r14] mov rsi, rbp call _gguf_get_tensor_type mov r15d, eax mov [rsp+0D8h+var_58], r12 mov rdi, [rsp+0D8h+var_78] mov rsi, rbx call _ggml_get_tensor mov rbx, rax mov rdi, rax call _ggml_nbytes mov r13, rax mov rax, [rsp+0D8h+var_D0] add [rax+38h], r13 mov rax, cs:g_logger_state_ptr cmp dword ptr [rax], 1 jg loc_3A2A9 mov rdi, rbx call _ggml_n_dims mov r14d, eax mov rax, [rbx+10h] mov [rsp+0D8h+var_60], rax mov rax, [rbx+18h] mov [rsp+0D8h+var_68], rax mov rax, [rbx+20h] mov [rsp+0D8h+var_70], rax mov r12, [rbx+28h] mov edi, r15d call _ggml_type_name mov r10, rax add rbx, 100h sub rsp, 8 mov edi, 1 lea rsi, aSTensorDNDimsD; "%s: tensor[%d]: n_dims = %d, name = %s,"... lea rdx, aClipModelLoade; "clip_model_loader" mov ecx, ebp mov r8d, r14d mov r9, rbx xor eax, eax push r10 push r12 push [rsp+0F0h+var_70] push [rsp+0F8h+var_68] push [rsp+100h+var_60] push [rsp+108h+var_58] push r13 call _ZL17clip_log_internal14ggml_log_levelPKcz_0; clip_log_internal(ggml_log_level,char const*,...) add rsp, 40h loc_3A2A9: inc rbp cmp [rsp+0D8h+var_C8], rbp jnz loc_3A1B6 loc_3A2B7: add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3A2C9: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r12, rax lea rsi, aSFailedToLoadC; "%s: failed to load CLIP model from %s. "... lea rdx, aClipModelLoade; "clip_model_loader" lea rdi, [rsp+0D8h+var_A0] mov rcx, r15 xor eax, eax call _ZL13string_formatB5cxx11PKcz_0; string_format(char const*,...) mov bl, 1 lea rsi, [rsp+0D8h+var_A0] mov rdi, r12 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebx, ebx mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r12; void * call ___cxa_throw mov r15, rax lea rax, [rsp+0D8h+var_90] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_3A338 mov rsi, [rsp+0D8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3A338: test bl, bl jnz short loc_3A341 jmp short loc_3A3BD mov r15, rax loc_3A341: mov rdi, r12; void * call ___cxa_free_exception jmp short loc_3A3BD mov r15, rax mov rdi, [rsp+0D8h+var_50]; void * cmp rdi, r12 jz short loc_3A382 mov rsi, [rsp+0D8h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_3A382 jmp short loc_3A37F jmp short loc_3A37F mov r15, rax jmp short loc_3A399 jmp short loc_3A3BA jmp short loc_3A3BA mov r15, rax jmp short loc_3A3DF loc_3A37F: mov r15, rax loc_3A382: mov rdi, [rsp+0D8h+var_C0]; void * cmp rdi, r14 jz short loc_3A399 mov rsi, [rsp+0D8h+var_B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3A399: mov rdi, [rsp+0D8h+var_A0]; void * cmp rdi, rbx jz short loc_3A3BD mov rsi, [rsp+0D8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_3A3BD jmp short loc_3A3BA jmp short loc_3A3BA jmp short loc_3A3BA jmp short $+2 loc_3A3BA: mov r15, rax loc_3A3BD: mov rax, [rsp+0D8h+var_D0] mov rdi, [rax+18h]; void * add rax, 28h ; '(' cmp rdi, rax mov r13, [rsp+0D8h+var_80] jz short loc_3A3DF mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3A3DF: mov rdi, r13 call __ZNSt10unique_ptrI12gguf_context20gguf_context_deleterED2Ev; std::unique_ptr<gguf_context,gguf_context_deleter>::~unique_ptr() mov rdi, [rsp+0D8h+var_D0] call __ZNSt10unique_ptrI12ggml_context20ggml_context_deleterED2Ev; std::unique_ptr<ggml_context,ggml_context_deleter>::~unique_ptr() mov rdi, r15 call __Unwind_Resume
void clip_model_loader::clip_model_loader( clip_model_loader *this, const char *a2, clip_ctx *a3, double a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { _QWORD *v11; // r13 long long v12; // rax long long v13; // r8 long long v14; // r9 long long v15; // r8 long long v16; // r9 unsigned int version; // eax long long v18; // r8 long long v19; // r9 long long alignment; // rax long long v21; // r8 long long v22; // r9 long long v23; // r8 long long v24; // r9 unsigned int n_kv; // eax long long v26; // r8 long long v27; // r9 long long v28; // rdx long long v29; // rcx long long v30; // r8 long long v31; // r9 long long v32; // rbp _QWORD *v33; // r14 long long tensor_name; // rbx long long tensor_offset; // r12 unsigned int tensor_type; // r15d _QWORD *tensor; // rbx long long v38; // r13 unsigned int v39; // r14d long long v40; // r12 long long v41; // rax void *exception; // r12 long long v43; // r8 long long v44; // r9 __m128 v45; // xmm4 __m128 v46; // xmm5 char v47; // [rsp+0h] [rbp-D8h] long long n_tensors; // [rsp+10h] [rbp-C8h] long long v49; // [rsp+10h] [rbp-C8h] void *v50[2]; // [rsp+18h] [rbp-C0h] BYREF _QWORD v51[2]; // [rsp+28h] [rbp-B0h] BYREF void *v52[2]; // [rsp+38h] [rbp-A0h] BYREF _QWORD v53[2]; // [rsp+48h] [rbp-90h] BYREF _QWORD *v54; // [rsp+58h] [rbp-80h] long long v55; // [rsp+60h] [rbp-78h] BYREF long long v56; // [rsp+68h] [rbp-70h] long long v57; // [rsp+70h] [rbp-68h] long long v58; // [rsp+78h] [rbp-60h] long long v59; // [rsp+80h] [rbp-58h] void *v60[2]; // [rsp+88h] [rbp-50h] BYREF _QWORD v61[8]; // [rsp+98h] [rbp-40h] BYREF v11 = (_QWORD *)((char *)this + 8); *(_OWORD *)this = 0LL; *((_QWORD *)this + 2) = a3; std::string::basic_string<std::allocator<char>>((char *)this + 24, a2, v52); v55 = 0LL; v54 = (_QWORD *)((char *)this + 8); v12 = gguf_init_from_file(a2, 1LL, &v55); v52[0] = 0LL; std::__uniq_ptr_impl<gguf_context,gguf_context_deleter>::reset((char *)this + 8, v12); std::unique_ptr<gguf_context,gguf_context_deleter>::~unique_ptr(v52); if ( !*((_QWORD *)this + 1) ) { exception = __cxa_allocate_exception(0x10uLL); string_format[abi:cxx11]( (long long)v52, "%s: failed to load CLIP model from %s. Does this file exist?\n", (long long)"clip_model_loader", (long long)a2, v43, v44, (__m128)0LL, a5, a6, a7, v45, v46, a10, a11, v47); std::runtime_error::runtime_error(exception, v52); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } std::__uniq_ptr_impl<ggml_context,ggml_context_deleter>::reset(this, v55); n_tensors = gguf_get_n_tensors(*((_QWORD *)this + 1)); v52[0] = v53; v52[1] = 0LL; LOBYTE(v53[0]) = 0; v50[0] = v51; std::string::_M_construct<char const*>(v50, "general.name", ""); clip_model_loader::get_string(this, v50, v52, 0LL); if ( v50[0] != v51 ) operator delete(v50[0], v51[0] + 1LL); v50[0] = v51; v50[1] = 0LL; LOBYTE(v51[0]) = 0; v60[0] = v61; std::string::_M_construct<char const*>(v60, "general.description", ""); clip_model_loader::get_string(this, v60, v50, 0LL); if ( v60[0] != v61 ) operator delete(v60[0], v61[0] + 1LL); if ( g_logger_state <= 2 ) { clip_log_internal(2u, "%s: model name: %s\n", (long long)"clip_model_loader", (long long)v52[0], v13, v14); if ( g_logger_state <= 2 ) { clip_log_internal(2u, "%s: description: %s\n", (long long)"clip_model_loader", (long long)v50[0], v15, v16); if ( g_logger_state <= 2 ) { version = gguf_get_version(*v11); clip_log_internal(2u, "%s: GGUF version: %d\n", (long long)"clip_model_loader", version, v18, v19); if ( g_logger_state <= 2 ) { alignment = gguf_get_alignment(*v11); clip_log_internal(2u, "%s: alignment: %zu\n", (long long)"clip_model_loader", alignment, v21, v22); if ( g_logger_state <= 2 ) { clip_log_internal(2u, "%s: n_tensors: %d\n", (long long)"clip_model_loader", n_tensors, v23, v24); if ( g_logger_state <= 2 ) { n_kv = gguf_get_n_kv(*v11); clip_log_internal(2u, "%s: n_kv: %d\n", (long long)"clip_model_loader", n_kv, v26, v27); if ( g_logger_state <= 2 ) clip_log_internal(2u, "\n", v28, v29, v30, v31); } } } } } } if ( v50[0] != v51 ) operator delete(v50[0], v51[0] + 1LL); if ( v52[0] != v53 ) operator delete(v52[0], v53[0] + 1LL); if ( (int)n_tensors > 0 ) { v49 = n_tensors & 0x7FFFFFFF; v32 = 0LL; do { v33 = v54; tensor_name = gguf_get_tensor_name(*v54, v32); tensor_offset = gguf_get_tensor_offset(*v33, v32); tensor_type = gguf_get_tensor_type(*v33, v32); v59 = tensor_offset; tensor = (_QWORD *)ggml_get_tensor(v55, tensor_name); v38 = ggml_nbytes(tensor); *((_QWORD *)this + 7) += v38; if ( g_logger_state <= 1 ) { v39 = ggml_n_dims(tensor); v58 = tensor[2]; v57 = tensor[3]; v56 = tensor[4]; v40 = tensor[5]; v41 = ggml_type_name(tensor_type); clip_log_internal( 1u, "%s: tensor[%d]: n_dims = %d, name = %s, tensor_size=%zu, offset=%zu, shape:[%lu, %lu, %lu, %lu], type = %s\n", (long long)"clip_model_loader", (unsigned int)v32, v39, (long long)(tensor + 32), v38, v59, v58, v57, v56, v40, v41); } ++v32; } while ( v49 != v32 ); } }
clip_model_loader: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV R15,RSI LEA R13,[RDI + 0x8] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x10],RDX MOV qword ptr [RSP + 0x8],RDI ADD RDI,0x18 LAB_00139ee3: LEA RDX,[RSP + 0x38] CALL 0x0011e400 LEA RDX,[RSP + 0x60] MOV qword ptr [RDX],0x0 LAB_00139ef9: MOV RDI,R15 MOV ESI,0x1 MOV qword ptr [RSP + 0x58],R13 CALL 0x0011db60 LEA RBX,[RSP + 0x38] MOV qword ptr [RBX],0x0 MOV RDI,R13 MOV RSI,RAX CALL 0x0011c190 MOV RDI,RBX CALL 0x0011d060 CMP qword ptr [R13],0x0 JZ 0x0013a2c9 MOV RSI,qword ptr [RSP + 0x60] MOV RBX,qword ptr [RSP + 0x8] MOV RDI,RBX CALL 0x0011c1a0 MOV RDI,qword ptr [RBX + 0x8] LAB_00139f4b: CALL 0x0011e8a0 MOV qword ptr [RSP + 0x10],RAX LEA RBX,[RSP + 0x48] MOV qword ptr [RBX + -0x10],RBX MOV qword ptr [RBX + -0x8],0x0 MOV byte ptr [RBX],0x0 LEA R14,[RSP + 0x28] MOV qword ptr [R14 + -0x10],R14 LAB_00139f72: LEA RSI,[0x14f896] LEA RDX,[0x14f8a2] LEA RDI,[RSP + 0x18] CALL 0x0011c6f0 LAB_00139f8a: LEA RSI,[RSP + 0x18] LEA RDX,[RSP + 0x38] MOV RDI,qword ptr [RSP + 0x8] XOR ECX,ECX CALL 0x0011d180 MOV RDI,qword ptr [RSP + 0x18] CMP RDI,R14 JZ 0x00139fb7 MOV RSI,qword ptr [RSP + 0x28] INC RSI CALL 0x0011d480 LAB_00139fb7: MOV qword ptr [RSP + 0x18],R14 MOV qword ptr [RSP + 0x20],0x0 MOV byte ptr [RSP + 0x28],0x0 LEA R12,[RSP + 0x98] MOV qword ptr [R12 + -0x10],R12 LAB_00139fd7: LEA RSI,[0x14f8a3] LEA RDX,[0x14f8b6] LEA RDI,[RSP + 0x88] CALL 0x0011c6f0 LAB_00139ff2: LEA RSI,[RSP + 0x88] LEA RDX,[RSP + 0x18] MOV RDI,qword ptr [RSP + 0x8] XOR ECX,ECX CALL 0x0011d180 MOV RDI,qword ptr [RSP + 0x88] CMP RDI,R12 JZ 0x0013a028 MOV RSI,qword ptr [RSP + 0x98] INC RSI CALL 0x0011d480 LAB_0013a028: MOV RAX,qword ptr [0x0015df90] CMP dword ptr [RAX],0x2 JG 0x0013a16c MOV RCX,qword ptr [RSP + 0x38] LAB_0013a03d: LEA RSI,[0x14f8b7] LEA RDX,[0x14f884] MOV EDI,0x2 XOR EAX,EAX CALL 0x001243c3 MOV RAX,qword ptr [0x0015df90] CMP dword ptr [RAX],0x2 JG 0x0013a16c MOV RCX,qword ptr [RSP + 0x18] LEA RSI,[0x14f8cd] LEA RDX,[0x14f884] MOV EDI,0x2 XOR EAX,EAX CALL 0x001243c3 MOV RAX,qword ptr [0x0015df90] CMP dword ptr [RAX],0x2 JG 0x0013a16c MOV RDI,qword ptr [R13] CALL 0x0011e520 LEA RSI,[0x14f8e3] LEA RDX,[0x14f884] MOV EDI,0x2 MOV ECX,EAX XOR EAX,EAX CALL 0x001243c3 MOV RAX,qword ptr [0x0015df90] CMP dword ptr [RAX],0x2 JG 0x0013a16c MOV RDI,qword ptr [R13] CALL 0x0011da40 LEA RSI,[0x14f8f9] LEA RDX,[0x14f884] MOV EDI,0x2 MOV RCX,RAX XOR EAX,EAX CALL 0x001243c3 MOV RAX,qword ptr [0x0015df90] CMP dword ptr [RAX],0x2 JG 0x0013a16c LEA RSI,[0x14f910] LEA RDX,[0x14f884] MOV EDI,0x2 MOV RCX,qword ptr [RSP + 0x10] XOR EAX,EAX CALL 0x001243c3 MOV RAX,qword ptr [0x0015df90] CMP dword ptr [RAX],0x2 JG 0x0013a16c MOV RDI,qword ptr [R13] CALL 0x0011e930 LEA RSI,[0x14f926] LEA RDX,[0x14f884] MOV EDI,0x2 MOV ECX,EAX XOR EAX,EAX CALL 0x001243c3 MOV RAX,qword ptr [0x0015df90] CMP dword ptr [RAX],0x2 JG 0x0013a16c LEA RSI,[0x15035b] MOV EDI,0x2 XOR EAX,EAX CALL 0x001243c3 LAB_0013a16c: MOV RDI,qword ptr [RSP + 0x18] CMP RDI,R14 JZ 0x0013a183 MOV RSI,qword ptr [RSP + 0x28] INC RSI CALL 0x0011d480 LAB_0013a183: MOV RDI,qword ptr [RSP + 0x38] CMP RDI,RBX JZ 0x0013a19a MOV RSI,qword ptr [RSP + 0x48] INC RSI CALL 0x0011d480 LAB_0013a19a: CMP dword ptr [RSP + 0x10],0x0 JLE 0x0013a2b7 MOV RAX,qword ptr [RSP + 0x10] AND EAX,0x7fffffff MOV qword ptr [RSP + 0x10],RAX XOR EBP,EBP LAB_0013a1b6: MOV R14,qword ptr [RSP + 0x58] MOV RDI,qword ptr [R14] LAB_0013a1be: MOV RSI,RBP CALL 0x0011ded0 MOV RBX,RAX MOV RDI,qword ptr [R14] LAB_0013a1cc: MOV RSI,RBP CALL 0x0011cc30 MOV R12,RAX MOV RDI,qword ptr [R14] LAB_0013a1da: MOV RSI,RBP CALL 0x0011de30 MOV R15D,EAX MOV qword ptr [RSP + 0x80],R12 MOV RDI,qword ptr [RSP + 0x60] LAB_0013a1f2: MOV RSI,RBX CALL 0x0011dbc0 LAB_0013a1fa: MOV RBX,RAX MOV RDI,RAX CALL 0x0011c150 MOV R13,RAX MOV RAX,qword ptr [RSP + 0x8] ADD qword ptr [RAX + 0x38],R13 MOV RAX,qword ptr [0x0015df90] CMP dword ptr [RAX],0x1 JG 0x0013a2a9 MOV RDI,RBX CALL 0x0011c130 MOV R14D,EAX MOV RAX,qword ptr [RBX + 0x10] MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RBX + 0x18] MOV qword ptr [RSP + 0x70],RAX MOV RAX,qword ptr [RBX + 0x20] MOV qword ptr [RSP + 0x68],RAX MOV R12,qword ptr [RBX + 0x28] MOV EDI,R15D CALL 0x0011d2f0 MOV R10,RAX ADD RBX,0x100 SUB RSP,0x8 MOV EDI,0x1 LEA RSI,[0x14f93c] LEA RDX,[0x14f884] MOV ECX,EBP MOV R8D,R14D MOV R9,RBX XOR EAX,EAX PUSH R10 PUSH R12 PUSH qword ptr [RSP + 0x80] PUSH qword ptr [RSP + 0x90] PUSH qword ptr [RSP + 0xa0] PUSH qword ptr [RSP + 0xb0] PUSH R13 CALL 0x001243c3 ADD RSP,0x40 LAB_0013a2a9: INC RBP CMP qword ptr [RSP + 0x10],RBP JNZ 0x0013a1b6 LAB_0013a2b7: ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013a2c9: MOV EDI,0x10 CALL 0x0011c8c0 MOV R12,RAX LAB_0013a2d6: LEA RSI,[0x14f846] LEA RDX,[0x14f884] LEA RDI,[RSP + 0x38] MOV RCX,R15 XOR EAX,EAX CALL 0x00128ebe MOV BL,0x1 LAB_0013a2f5: LEA RSI,[RSP + 0x38] MOV RDI,R12 CALL 0x0011e1d0 XOR EBX,EBX MOV RSI,qword ptr [0x0015dff8] MOV RDX,qword ptr [0x0015ded8] MOV RDI,R12 CALL 0x0011e450
/* clip_model_loader::clip_model_loader(char const*, clip_ctx&) */ void __thiscall clip_model_loader::clip_model_loader(clip_model_loader *this,char *param_1,clip_ctx *param_2) { __uniq_ptr_impl<gguf_context,gguf_context_deleter> *p_Var1; int4 uVar2; int4 uVar3; gguf_context *pgVar4; int8 uVar5; int8 uVar6; long lVar7; long lVar8; runtime_error *this_00; ulong uVar9; uint local_c8; int1 *local_c0; int8 local_b8; int1 local_b0; int7 uStack_af; int1 *local_a0; int8 local_98; int1 local_90; int7 uStack_8f; __uniq_ptr_impl<gguf_context,gguf_context_deleter> *local_80; ggml_context *local_78; int8 local_70; int8 local_68; int8 local_60; int8 local_58; long *local_50 [2]; long local_40 [2]; p_Var1 = (__uniq_ptr_impl<gguf_context,gguf_context_deleter> *)(this + 8); *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(clip_ctx **)(this + 0x10) = param_2; /* try { // try from 00139ee3 to 00139eec has its CatchHandler @ 0013a37a */ std::__cxx11::string::string<std::allocator<char>> ((string *)(this + 0x18),param_1,(allocator *)&local_a0); local_78 = (ggml_context *)0x0; local_80 = p_Var1; /* try { // try from 00139ef9 to 00139f0a has its CatchHandler @ 0013a378 */ pgVar4 = (gguf_context *)gguf_init_from_file(param_1,1); local_a0 = (int1 *)0x0; std::__uniq_ptr_impl<gguf_context,gguf_context_deleter>::reset(p_Var1,pgVar4); std::unique_ptr<gguf_context,gguf_context_deleter>::~unique_ptr ((unique_ptr<gguf_context,gguf_context_deleter> *)&local_a0); if (*(long *)p_Var1 != 0) { std::__uniq_ptr_impl<ggml_context,ggml_context_deleter>::reset ((__uniq_ptr_impl<ggml_context,ggml_context_deleter> *)this,local_78); /* try { // try from 00139f4b to 00139f54 has its CatchHandler @ 0013a376 */ uVar5 = gguf_get_n_tensors(*(int8 *)(this + 8)); local_98 = 0; local_90 = 0; /* try { // try from 00139f72 to 00139f89 has its CatchHandler @ 0013a371 */ local_c0 = &local_b0; local_a0 = &local_90; std::__cxx11::string::_M_construct<char_const*>(&local_c0,"general.name",""); /* try { // try from 00139f8a to 00139f9f has its CatchHandler @ 0013a36f */ get_string(this,(string *)&local_c0,(string *)&local_a0,false); if (local_c0 != &local_b0) { operator_delete(local_c0,CONCAT71(uStack_af,local_b0) + 1); } local_b8 = 0; local_b0 = 0; /* try { // try from 00139fd7 to 00139ff1 has its CatchHandler @ 0013a36d */ local_c0 = &local_b0; local_50[0] = local_40; std::__cxx11::string::_M_construct<char_const*>(local_50,"general.description",""); /* try { // try from 00139ff2 to 0013a00a has its CatchHandler @ 0013a34b */ get_string(this,(string *)local_50,(string *)&local_c0,false); if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } if (*(int *)PTR_g_logger_state_0015df90 < 3) { /* try { // try from 0013a03d to 0013a16b has its CatchHandler @ 0013a37f */ clip_log_internal(2,"%s: model name: %s\n","clip_model_loader",local_a0); if (*(int *)PTR_g_logger_state_0015df90 < 3) { clip_log_internal(2,"%s: description: %s\n","clip_model_loader",local_c0); if (*(int *)PTR_g_logger_state_0015df90 < 3) { uVar2 = gguf_get_version(*(int8 *)p_Var1); clip_log_internal(2,"%s: GGUF version: %d\n","clip_model_loader",uVar2); if (*(int *)PTR_g_logger_state_0015df90 < 3) { uVar6 = gguf_get_alignment(*(int8 *)p_Var1); clip_log_internal(2,"%s: alignment: %zu\n","clip_model_loader",uVar6); if (*(int *)PTR_g_logger_state_0015df90 < 3) { clip_log_internal(2,"%s: n_tensors: %d\n","clip_model_loader",uVar5); if (*(int *)PTR_g_logger_state_0015df90 < 3) { uVar2 = gguf_get_n_kv(*(int8 *)p_Var1); clip_log_internal(2,"%s: n_kv: %d\n","clip_model_loader",uVar2); if (*(int *)PTR_g_logger_state_0015df90 < 3) { clip_log_internal(2,&DAT_0015035b); } } } } } } } if (local_c0 != &local_b0) { operator_delete(local_c0,CONCAT71(uStack_af,local_b0) + 1); } if (local_a0 != &local_90) { operator_delete(local_a0,CONCAT71(uStack_8f,local_90) + 1); } local_c8 = (uint)uVar5; if (0 < (int)local_c8) { uVar9 = 0; do { p_Var1 = local_80; /* try { // try from 0013a1be to 0013a1c5 has its CatchHandler @ 0013a3b2 */ uVar5 = gguf_get_tensor_name(*(int8 *)local_80,uVar9); /* try { // try from 0013a1cc to 0013a1d3 has its CatchHandler @ 0013a3b4 */ uVar6 = gguf_get_tensor_offset(*(int8 *)p_Var1,uVar9); /* try { // try from 0013a1da to 0013a1e1 has its CatchHandler @ 0013a3b6 */ uVar2 = gguf_get_tensor_type(*(int8 *)p_Var1,uVar9); local_58 = uVar6; /* try { // try from 0013a1f2 to 0013a1f9 has its CatchHandler @ 0013a3b8 */ lVar7 = ggml_get_tensor(local_78,uVar5); /* try { // try from 0013a1fa to 0013a2a8 has its CatchHandler @ 0013a3ba */ lVar8 = ggml_nbytes(lVar7); *(long *)(this + 0x38) = *(long *)(this + 0x38) + lVar8; if (*(int *)PTR_g_logger_state_0015df90 < 2) { uVar3 = ggml_n_dims(lVar7); local_60 = *(int8 *)(lVar7 + 0x10); local_68 = *(int8 *)(lVar7 + 0x18); local_70 = *(int8 *)(lVar7 + 0x20); uVar5 = *(int8 *)(lVar7 + 0x28); uVar6 = ggml_type_name(uVar2); clip_log_internal(1, "%s: tensor[%d]: n_dims = %d, name = %s, tensor_size=%zu, offset=%zu, shape:[%lu, %lu, %lu, %lu], type = %s\n" ,"clip_model_loader",uVar9 & 0xffffffff,uVar3,lVar7 + 0x100,lVar8, local_58,local_60,local_68,local_70,uVar5,uVar6); } uVar9 = uVar9 + 1; } while ((local_c8 & 0x7fffffff) != uVar9); } return; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0013a2d6 to 0013a2f2 has its CatchHandler @ 0013a33e */ string_format_abi_cxx11_ ((char *)&local_a0,"%s: failed to load CLIP model from %s. Does this file exist?\n", "clip_model_loader",param_1); /* try { // try from 0013a2f5 to 0013a319 has its CatchHandler @ 0013a31a */ std::runtime_error::runtime_error(this_00,(string *)&local_a0); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_0015dff8,PTR__runtime_error_0015ded8); }
45,344
coro::thread_pool::~thread_pool()
AlayaLite/build_O3/_deps/libcoro-src/src/thread_pool.cpp
thread_pool::~thread_pool() { shutdown(); }
O3
cpp
coro::thread_pool::~thread_pool(): pushq %rbx movq %rdi, %rbx leaq 0x59c1(%rip), %rax # 0x9c80 addq $0x10, %rax movq %rax, (%rdi) callq 0x432a leaq 0xd0(%rbx), %rdi callq 0x4c10 leaq 0x90(%rbx), %rdi callq 0x4868 leaq 0x50(%rbx), %rdi callq 0x4884 movq 0x40(%rbx), %rax testq %rax, %rax je 0x4303 leaq 0x30(%rbx), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x20(%rbx), %rax testq %rax, %rax je 0x431d addq $0x10, %rbx movq %rbx, %rdi movq %rbx, %rsi movl $0x3, %edx callq *%rax popq %rbx retq jmp 0x4321 movq %rax, %rdi callq 0x2ed6 nop
_ZN4coro11thread_poolD2Ev: push rbx; Alternative name is 'coro::thread_pool::~thread_pool()' mov rbx, rdi lea rax, _ZTVN4coro11thread_poolE; `vtable for'coro::thread_pool add rax, 10h mov [rdi], rax call _ZN4coro11thread_pool8shutdownEv; coro::thread_pool::shutdown(void) lea rdi, [rbx+0D0h] call _ZNSt11_Deque_baseINSt7__n486116coroutine_handleIvEESaIS2_EED2Ev; std::_Deque_base<std::__n4861::coroutine_handle<void>>::~_Deque_base() lea rdi, [rbx+90h]; this call _ZNSt3_V222condition_variable_anyD2Ev; std::_V2::condition_variable_any::~condition_variable_any() lea rdi, [rbx+50h] call _ZNSt6vectorISt6threadSaIS0_EED2Ev; std::vector<std::thread>::~vector() mov rax, [rbx+40h] test rax, rax jz short loc_4303 lea rdi, [rbx+30h] mov rsi, rdi mov edx, 3 call rax loc_4303: mov rax, [rbx+20h] test rax, rax jz short loc_431D add rbx, 10h mov rdi, rbx mov rsi, rbx mov edx, 3 call rax loc_431D: pop rbx retn jmp short $+2 loc_4321: mov rdi, rax call __clang_call_terminate
void coro::thread_pool::~thread_pool(coro::thread_pool *this) { void ( *v1)(char *, char *, long long); // rax void ( *v2)(char *, char *, long long); // rax *(_QWORD *)this = &`vtable for'coro::thread_pool + 2; coro::thread_pool::shutdown(this); std::_Deque_base<std::__n4861::coroutine_handle<void>>::~_Deque_base((char *)this + 208); std::_V2::condition_variable_any::~condition_variable_any((coro::thread_pool *)((char *)this + 144)); std::vector<std::thread>::~vector((char *)this + 80); v1 = (void ( *)(char *, char *, long long))*((_QWORD *)this + 8); if ( v1 ) v1((char *)this + 48, (char *)this + 48, 3LL); v2 = (void ( *)(char *, char *, long long))*((_QWORD *)this + 4); if ( v2 ) v2((char *)this + 16, (char *)this + 16, 3LL); }
~thread_pool: PUSH RBX MOV RBX,RDI LEA RAX,[0x109c80] ADD RAX,0x10 MOV qword ptr [RDI],RAX CALL 0x0010432a LEA RDI,[RBX + 0xd0] CALL 0x00104c10 LEA RDI,[RBX + 0x90] CALL 0x00104868 LEA RDI,[RBX + 0x50] CALL 0x00104884 MOV RAX,qword ptr [RBX + 0x40] TEST RAX,RAX JZ 0x00104303 LEA RDI,[RBX + 0x30] LAB_001042f9: MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_00104303: MOV RAX,qword ptr [RBX + 0x20] TEST RAX,RAX JZ 0x0010431d ADD RBX,0x10 LAB_00104310: MOV RDI,RBX MOV RSI,RBX MOV EDX,0x3 CALL RAX LAB_0010431d: POP RBX RET
/* coro::thread_pool::~thread_pool() */ void __thiscall coro::thread_pool::~thread_pool(thread_pool *this) { *(int ***)this = &PTR__thread_pool_00109c90; shutdown(this); std:: _Deque_base<std::__n4861::coroutine_handle<void>,std::allocator<std::__n4861::coroutine_handle<void>>> ::~_Deque_base((_Deque_base<std::__n4861::coroutine_handle<void>,std::allocator<std::__n4861::coroutine_handle<void>>> *)(this + 0xd0)); std::_V2::condition_variable_any::~condition_variable_any((condition_variable_any *)(this + 0x90)) ; std::vector<std::thread,std::allocator<std::thread>>::~vector ((vector<std::thread,std::allocator<std::thread>> *)(this + 0x50)); if (*(code **)(this + 0x40) != (code *)0x0) { /* try { // try from 001042f9 to 00104302 has its CatchHandler @ 00104321 */ (**(code **)(this + 0x40))(this + 0x30,this + 0x30,3); } if (*(code **)(this + 0x20) != (code *)0x0) { /* try { // try from 00104310 to 0010431c has its CatchHandler @ 0010431f */ (**(code **)(this + 0x20))(this + 0x10,this + 0x10,3); } return; }
45,345
ma_uniquedef_write
eloqsql/storage/maria/ma_open.c
my_bool _ma_uniquedef_write(File file, MARIA_UNIQUEDEF *def) { uchar buff[MARIA_UNIQUEDEF_SIZE]; uchar *ptr=buff; mi_int2store(ptr,def->keysegs); ptr+=2; *ptr++= (uchar) def->key; *ptr++ = (uchar) def->null_are_equal; return mysql_file_write(file, buff, (size_t) (ptr-buff), MYF(MY_NABP)) != 0; }
O0
c
ma_uniquedef_write: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movl %edi, -0x10(%rbp) movq %rsi, -0x18(%rbp) leaq -0xc(%rbp), %rcx movq %rcx, -0x20(%rbp) movq -0x18(%rbp), %rax movzwl (%rax), %eax movl %eax, -0x24(%rbp) movb -0x24(%rbp), %dl movq -0x20(%rbp), %rax movb %dl, 0x1(%rax) movb -0x23(%rbp), %dl movq -0x20(%rbp), %rax movb %dl, (%rax) movq -0x20(%rbp), %rax addq $0x2, %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movb 0x2(%rax), %dl movq -0x20(%rbp), %rax movq %rax, %rsi incq %rsi movq %rsi, -0x20(%rbp) movb %dl, (%rax) movq -0x18(%rbp), %rax movb 0x3(%rax), %dl movq -0x20(%rbp), %rax movq %rax, %rsi incq %rsi movq %rsi, -0x20(%rbp) movb %dl, (%rax) movl -0x10(%rbp), %edx movq -0x20(%rbp), %r8 subq %rcx, %r8 leaq 0x125f0b(%rip), %rdi # 0x15ca07 movl $0x759, %esi # imm = 0x759 movl $0x4, %r9d callq 0x35640 testq %rax, %rax setne %al movb %al, -0x25(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x36b30 movb -0x25(%rbp), %al addq $0x30, %rsp popq %rbp retq callq 0x2a250 nopw %cs:(%rax,%rax)
_ma_uniquedef_write: push rbp mov rbp, rsp sub rsp, 30h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_10], edi mov [rbp+var_18], rsi lea rcx, [rbp+var_C] mov [rbp+var_20], rcx mov rax, [rbp+var_18] movzx eax, word ptr [rax] mov [rbp+var_24], eax mov dl, byte ptr [rbp+var_24] mov rax, [rbp+var_20] mov [rax+1], dl mov dl, byte ptr [rbp+var_24+1] mov rax, [rbp+var_20] mov [rax], dl mov rax, [rbp+var_20] add rax, 2 mov [rbp+var_20], rax mov rax, [rbp+var_18] mov dl, [rax+2] mov rax, [rbp+var_20] mov rsi, rax inc rsi mov [rbp+var_20], rsi mov [rax], dl mov rax, [rbp+var_18] mov dl, [rax+3] mov rax, [rbp+var_20] mov rsi, rax inc rsi mov [rbp+var_20], rsi mov [rax], dl mov edx, [rbp+var_10] mov r8, [rbp+var_20] sub r8, rcx lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 759h mov r9d, 4 call inline_mysql_file_write test rax, rax setnz al mov [rbp+var_25], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_36B30 mov al, [rbp+var_25] add rsp, 30h pop rbp retn loc_36B30: call ___stack_chk_fail
bool ma_uniquedef_write(unsigned int a1, unsigned __int16 *a2) { unsigned __int16 v2; // kr00_2 _BYTE v4[4]; // [rsp+24h] [rbp-Ch] BYREF unsigned long long v5; // [rsp+28h] [rbp-8h] BYREF v5 = __readfsqword(0x28u); v2 = *a2; v4[0] = HIBYTE(*a2); v4[1] = v2; v4[2] = *((_BYTE *)a2 + 2); v4[3] = *((_BYTE *)a2 + 3); return inline_mysql_file_write( (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c", 0x759u, a1, (long long)v4, (char *)&v5 - v4, 4LL) != 0; }
_ma_uniquedef_write: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x10],EDI MOV qword ptr [RBP + -0x18],RSI LEA RCX,[RBP + -0xc] MOV qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX] MOV dword ptr [RBP + -0x24],EAX MOV DL,byte ptr [RBP + -0x24] MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x1],DL MOV DL,byte ptr [RBP + -0x23] MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],DL MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] MOV DL,byte ptr [RAX + 0x2] MOV RAX,qword ptr [RBP + -0x20] MOV RSI,RAX INC RSI MOV qword ptr [RBP + -0x20],RSI MOV byte ptr [RAX],DL MOV RAX,qword ptr [RBP + -0x18] MOV DL,byte ptr [RAX + 0x3] MOV RAX,qword ptr [RBP + -0x20] MOV RSI,RAX INC RSI MOV qword ptr [RBP + -0x20],RSI MOV byte ptr [RAX],DL MOV EDX,dword ptr [RBP + -0x10] MOV R8,qword ptr [RBP + -0x20] SUB R8,RCX LEA RDI,[0x25ca07] MOV ESI,0x759 MOV R9D,0x4 CALL 0x00135640 TEST RAX,RAX SETNZ AL MOV byte ptr [RBP + -0x25],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00136b30 MOV AL,byte ptr [RBP + -0x25] ADD RSP,0x30 POP RBP RET LAB_00136b30: CALL 0x0012a250
int8 _ma_uniquedef_write(int4 param_1,int2 *param_2) { long lVar1; long in_FS_OFFSET; int1 local_2c; int1 uStack_2b; int1 local_14; int1 local_13; int1 local_12; int1 local_11; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_2c = (int1)*param_2; local_13 = local_2c; uStack_2b = (int1)((ushort)*param_2 >> 8); local_14 = uStack_2b; local_12 = *(int1 *)(param_2 + 1); local_11 = *(int1 *)((long)param_2 + 3); lVar1 = inline_mysql_file_write ("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c",0x759, param_1,&local_14,(long)&local_10 - (long)&local_14,4); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),lVar1 != 0); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
45,346
set_dynamic
eloqsql/mysys/array.c
my_bool set_dynamic(DYNAMIC_ARRAY *array, const void *element, uint idx) { if (idx >= array->elements) { if (idx >= array->max_element && allocate_dynamic(array, idx)) return TRUE; bzero((uchar*) (array->buffer+array->elements*array->size_of_element), (idx - array->elements)*array->size_of_element); array->elements=idx+1; } memcpy(array->buffer+(idx * array->size_of_element),element, (size_t) array->size_of_element); return FALSE; }
O3
c
set_dynamic: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %edx, %r14d movq %rsi, %rbx movq %rdi, %r15 movl 0x8(%rdi), %eax cmpl %edx, %eax ja 0x2d48e cmpl %r14d, 0xc(%r15) ja 0x2d46b movq %r15, %rdi movl %r14d, %esi callq 0x2d4b1 movl %eax, %ecx movb $0x1, %al testb %cl, %cl jne 0x2d4a6 movl 0x8(%r15), %eax movl 0x14(%r15), %ecx movl %r14d, %edx subl %eax, %edx imull %ecx, %edx movl %ecx, %edi imull %eax, %edi addq (%r15), %rdi xorl %esi, %esi callq 0x24180 leal 0x1(%r14), %eax movl %eax, 0x8(%r15) movl 0x14(%r15), %edx imull %edx, %r14d addq (%r15), %r14 movq %r14, %rdi movq %rbx, %rsi callq 0x24220 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
set_dynamic: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14d, edx mov rbx, rsi mov r15, rdi mov eax, [rdi+8] cmp eax, edx ja short loc_2D48E cmp [r15+0Ch], r14d ja short loc_2D46B mov rdi, r15 mov esi, r14d call allocate_dynamic mov ecx, eax mov al, 1 test cl, cl jnz short loc_2D4A6 mov eax, [r15+8] loc_2D46B: mov ecx, [r15+14h] mov edx, r14d sub edx, eax imul edx, ecx mov edi, ecx imul edi, eax add rdi, [r15] xor esi, esi call _memset lea eax, [r14+1] mov [r15+8], eax loc_2D48E: mov edx, [r15+14h] imul r14d, edx add r14, [r15] mov rdi, r14 mov rsi, rbx call _memcpy xor eax, eax loc_2D4A6: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
char set_dynamic(long long a1, long long a2, unsigned int a3) { unsigned int v4; // eax char dynamic; // cl char result; // al v4 = *(_DWORD *)(a1 + 8); if ( v4 <= a3 ) { if ( *(_DWORD *)(a1 + 12) <= a3 ) { dynamic = allocate_dynamic(a1, a3); result = 1; if ( dynamic ) return result; v4 = *(_DWORD *)(a1 + 8); } memset(*(_QWORD *)a1 + v4 * *(_DWORD *)(a1 + 20), 0LL, *(_DWORD *)(a1 + 20) * (a3 - v4)); *(_DWORD *)(a1 + 8) = a3 + 1; } memcpy(*(_QWORD *)a1 + *(_DWORD *)(a1 + 20) * a3, a2, *(unsigned int *)(a1 + 20)); return 0; }
set_dynamic: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14D,EDX MOV RBX,RSI MOV R15,RDI MOV EAX,dword ptr [RDI + 0x8] CMP EAX,EDX JA 0x0012d48e CMP dword ptr [R15 + 0xc],R14D JA 0x0012d46b MOV RDI,R15 MOV ESI,R14D CALL 0x0012d4b1 MOV ECX,EAX MOV AL,0x1 TEST CL,CL JNZ 0x0012d4a6 MOV EAX,dword ptr [R15 + 0x8] LAB_0012d46b: MOV ECX,dword ptr [R15 + 0x14] MOV EDX,R14D SUB EDX,EAX IMUL EDX,ECX MOV EDI,ECX IMUL EDI,EAX ADD RDI,qword ptr [R15] XOR ESI,ESI CALL 0x00124180 LEA EAX,[R14 + 0x1] MOV dword ptr [R15 + 0x8],EAX LAB_0012d48e: MOV EDX,dword ptr [R15 + 0x14] IMUL R14D,EDX ADD R14,qword ptr [R15] MOV RDI,R14 MOV RSI,RBX CALL 0x00124220 XOR EAX,EAX LAB_0012d4a6: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int8 set_dynamic(long *param_1,void *param_2,uint param_3) { char cVar1; uint uVar2; uVar2 = *(uint *)(param_1 + 1); if (uVar2 <= param_3) { if (*(uint *)((long)param_1 + 0xc) <= param_3) { cVar1 = allocate_dynamic(param_1); if (cVar1 != '\0') { return 1; } uVar2 = *(uint *)(param_1 + 1); } memset((void *)((ulong)(*(int *)((long)param_1 + 0x14) * uVar2) + *param_1),0, (ulong)((param_3 - uVar2) * *(int *)((long)param_1 + 0x14))); *(uint *)(param_1 + 1) = param_3 + 1; } memcpy((void *)((ulong)(param_3 * *(uint *)((long)param_1 + 0x14)) + *param_1),param_2, (ulong)*(uint *)((long)param_1 + 0x14)); return 0; }
45,347
gguf_reader::read(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) const
Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp
bool read(std::string & dst) const { uint64_t size = -1; if (!read(size)) { return false; } dst.resize(size); return fread(dst.data(), 1, dst.length(), file) == dst.length(); }
O1
cpp
gguf_reader::read(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) const: pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movq %rsp, %rdi movq $-0x1, (%rdi) movq (%r14), %rcx movl $0x1, %esi movl $0x8, %edx callq 0x189b0 cmpq $0x8, %rax jne 0x410b1 movq (%rsp), %rsi movq %rbx, %rdi xorl %edx, %edx callq 0x17580 movq (%rbx), %rdi movq 0x8(%rbx), %rdx movq (%r14), %rcx movl $0x1, %esi callq 0x189b0 cmpq 0x8(%rbx), %rax sete %al jmp 0x410b3 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq
_ZNK11gguf_reader4readERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r14 push rbx push rax mov rbx, rsi mov r14, rdi mov rdi, rsp mov qword ptr [rdi], 0FFFFFFFFFFFFFFFFh mov rcx, [r14] mov esi, 1 mov edx, 8 call _fread cmp rax, 8 jnz short loc_410B1 mov rsi, [rsp+18h+var_18] mov rdi, rbx xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char) mov rdi, [rbx] mov rdx, [rbx+8] mov rcx, [r14] mov esi, 1 call _fread cmp rax, [rbx+8] setz al jmp short loc_410B3 loc_410B1: xor eax, eax loc_410B3: add rsp, 8 pop rbx pop r14 retn
bool gguf_reader::read(_QWORD *a1, _QWORD *a2) { long long v3[3]; // [rsp+0h] [rbp-18h] BYREF v3[0] = -1LL; if ( fread(v3, 1LL, 8LL, *a1) != 8 ) return 0; std::string::resize(a2, v3[0], 0LL); return fread(*a2, 1LL, a2[1], *a1) == a2[1]; }
read: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV RDI,RSP MOV qword ptr [RDI],-0x1 MOV RCX,qword ptr [R14] MOV ESI,0x1 MOV EDX,0x8 CALL 0x001189b0 CMP RAX,0x8 JNZ 0x001410b1 MOV RSI,qword ptr [RSP] MOV RDI,RBX XOR EDX,EDX CALL 0x00117580 MOV RDI,qword ptr [RBX] MOV RDX,qword ptr [RBX + 0x8] MOV RCX,qword ptr [R14] MOV ESI,0x1 CALL 0x001189b0 CMP RAX,qword ptr [RBX + 0x8] SETZ AL JMP 0x001410b3 LAB_001410b1: XOR EAX,EAX LAB_001410b3: ADD RSP,0x8 POP RBX POP R14 RET
/* gguf_reader::read(std::__cxx11::string&) const */ bool __thiscall gguf_reader::read(gguf_reader *this,string *param_1) { size_t sVar1; bool bVar2; ulong local_18; local_18 = 0xffffffffffffffff; sVar1 = fread(&local_18,1,8,*(FILE **)this); if (sVar1 == 8) { std::__cxx11::string::resize(param_1,local_18,'\0'); sVar1 = fread(*(void **)param_1,1,*(size_t *)(param_1 + 8),*(FILE **)this); bVar2 = sVar1 == *(size_t *)(param_1 + 8); } else { bVar2 = false; } return bVar2; }
45,348
get_segment_integrity
seiftnesse[P]memoryallocator/src/custom_alloc_util.c
segment_integrity_t *get_segment_integrity(segment_t *s) { if (!s) return 0; // In our layout, the integrity data comes after the segment_t structure // but before the user data begins. // Calculate the proper aligned offset for the integrity structure uintptr_t segment_addr = (uintptr_t) (s); uintptr_t user_data_addr = (uintptr_t) (SegmentToPtr(s)); // The integrity structure is placed between the segment header and the user data uintptr_t integrity_addr = segment_addr + sizeof(segment_t); // Make sure there's enough space for the integrity structure if (integrity_addr + sizeof(segment_integrity_t) > user_data_addr) { HEAP_LOG("Warning: Not enough space for integrity data in segment %p\n", s); return 0; } return (segment_integrity_t *) (integrity_addr); }
O1
c
get_segment_integrity: testq %rdi, %rdi je 0x3c87 leaq 0x3f(%rdi), %rcx andq $-0x10, %rcx leaq 0x3c(%rdi), %rdx addq $0x30, %rdi xorl %eax, %eax cmpq %rcx, %rdx cmovbeq %rdi, %rax retq xorl %eax, %eax retq
get_segment_integrity: test rdi, rdi jz short loc_3C87 lea rcx, [rdi+3Fh] and rcx, 0FFFFFFFFFFFFFFF0h lea rdx, [rdi+3Ch] add rdi, 30h ; '0' xor eax, eax cmp rdx, rcx cmovbe rax, rdi retn loc_3C87: xor eax, eax retn
long long get_segment_integrity(long long a1) { unsigned long long v1; // rcx unsigned long long v2; // rdx long long v3; // rdi long long result; // rax if ( !a1 ) return 0LL; v1 = (a1 + 63) & 0xFFFFFFFFFFFFFFF0LL; v2 = a1 + 60; v3 = a1 + 48; result = 0LL; if ( v2 <= v1 ) return v3; return result; }
get_segment_integrity: TEST RDI,RDI JZ 0x00103c87 LEA RCX,[RDI + 0x3f] AND RCX,-0x10 LEA RDX,[RDI + 0x3c] ADD RDI,0x30 XOR EAX,EAX CMP RDX,RCX CMOVBE RAX,RDI RET LAB_00103c87: XOR EAX,EAX RET
long get_segment_integrity(long param_1) { long lVar1; if (param_1 != 0) { lVar1 = 0; if (param_1 + 0x3cU <= (param_1 + 0x3fU & 0xfffffffffffffff0)) { lVar1 = param_1 + 0x30; } return lVar1; } return 0; }
45,349
get_segment_integrity
seiftnesse[P]memoryallocator/src/custom_alloc_util.c
segment_integrity_t *get_segment_integrity(segment_t *s) { if (!s) return 0; // In our layout, the integrity data comes after the segment_t structure // but before the user data begins. // Calculate the proper aligned offset for the integrity structure uintptr_t segment_addr = (uintptr_t) (s); uintptr_t user_data_addr = (uintptr_t) (SegmentToPtr(s)); // The integrity structure is placed between the segment header and the user data uintptr_t integrity_addr = segment_addr + sizeof(segment_t); // Make sure there's enough space for the integrity structure if (integrity_addr + sizeof(segment_integrity_t) > user_data_addr) { HEAP_LOG("Warning: Not enough space for integrity data in segment %p\n", s); return 0; } return (segment_integrity_t *) (integrity_addr); }
O3
c
get_segment_integrity: testq %rdi, %rdi je 0x3c64 leaq 0x3f(%rdi), %rcx andq $-0x10, %rcx leaq 0x3c(%rdi), %rdx addq $0x30, %rdi xorl %eax, %eax cmpq %rcx, %rdx cmovbeq %rdi, %rax retq xorl %eax, %eax retq
get_segment_integrity: test rdi, rdi jz short loc_3C64 lea rcx, [rdi+3Fh] and rcx, 0FFFFFFFFFFFFFFF0h lea rdx, [rdi+3Ch] add rdi, 30h ; '0' xor eax, eax cmp rdx, rcx cmovbe rax, rdi retn loc_3C64: xor eax, eax retn
long long get_segment_integrity(long long a1) { unsigned long long v1; // rcx unsigned long long v2; // rdx long long v3; // rdi long long result; // rax if ( !a1 ) return 0LL; v1 = (a1 + 63) & 0xFFFFFFFFFFFFFFF0LL; v2 = a1 + 60; v3 = a1 + 48; result = 0LL; if ( v2 <= v1 ) return v3; return result; }
get_segment_integrity: TEST RDI,RDI JZ 0x00103c64 LEA RCX,[RDI + 0x3f] AND RCX,-0x10 LEA RDX,[RDI + 0x3c] ADD RDI,0x30 XOR EAX,EAX CMP RDX,RCX CMOVBE RAX,RDI RET LAB_00103c64: XOR EAX,EAX RET
long get_segment_integrity(long param_1) { long lVar1; if (param_1 != 0) { lVar1 = 0; if (param_1 + 0x3cU <= (param_1 + 0x3fU & 0xfffffffffffffff0)) { lVar1 = param_1 + 0x30; } return lVar1; } return 0; }
45,350
minja::IfNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override { for (const auto& branch : cascade) { auto enter_branch = true; if (branch.first) { enter_branch = branch.first->evaluate(context).to_bool(); } if (enter_branch) { if (!branch.second) throw std::runtime_error("IfNode.cascade.second is null"); branch.second->render(out, context); return; } } }
O0
cpp
minja::IfNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const: subq $0xb8, %rsp movq %rdi, 0xb0(%rsp) movq %rsi, 0xa8(%rsp) movq %rdx, 0xa0(%rsp) movq 0xb0(%rsp), %rax addq $0x20, %rax movq %rax, 0x98(%rsp) movq 0x98(%rsp), %rdi callq 0x149fa0 movq %rax, 0x90(%rsp) movq 0x98(%rsp), %rdi callq 0x149fd0 movq %rax, 0x88(%rsp) leaq 0x90(%rsp), %rdi leaq 0x88(%rsp), %rsi callq 0x14a000 testb $0x1, %al jne 0x149c7b jmp 0x149dc6 leaq 0x90(%rsp), %rdi callq 0x14a040 movq %rax, 0x80(%rsp) movb $0x1, 0x7f(%rsp) movq 0x80(%rsp), %rdi callq 0x10bbe0 testb $0x1, %al jne 0x149ca8 jmp 0x149d12 movq 0x80(%rsp), %rdi callq 0x111d10 movq %rax, %rsi movq 0xa0(%rsp), %rdx leaq 0x28(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x111d20 movq 0x10(%rsp), %rdi callq 0x112070 movb %al, 0x1b(%rsp) jmp 0x149cdf movb 0x1b(%rsp), %al andb $0x1, %al movb %al, 0x7f(%rsp) leaq 0x28(%rsp), %rdi callq 0x1121c0 jmp 0x149d12 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x20(%rsp) movl %eax, 0x1c(%rsp) leaq 0x28(%rsp), %rdi callq 0x1121c0 jmp 0x149dce testb $0x1, 0x7f(%rsp) je 0x149db2 movq 0x80(%rsp), %rdi addq $0x10, %rdi callq 0x14a050 testb $0x1, %al jne 0x149d87 movl $0x10, %edi callq 0x5a680 movq %rax, %rdi movq %rdi, %rax movq %rax, 0x8(%rsp) leaq 0xc789d(%rip), %rsi # 0x2115eb callq 0x5a460 jmp 0x149d55 movq 0x8(%rsp), %rdi movq 0x15824f(%rip), %rsi # 0x2a1fb0 movq 0x158210(%rip), %rdx # 0x2a1f78 callq 0x5aae0 movq 0x8(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x20(%rsp) movl %eax, 0x1c(%rsp) callq 0x5af50 jmp 0x149dce movq 0x80(%rsp), %rdi addq $0x10, %rdi callq 0x146f90 movq %rax, %rdi movq 0xa8(%rsp), %rsi movq 0xa0(%rsp), %rdx callq 0x14a070 jmp 0x149dc6 jmp 0x149db4 leaq 0x90(%rsp), %rdi callq 0x14a4a0 jmp 0x149c5d addq $0xb8, %rsp retq movq 0x20(%rsp), %rdi callq 0x5aba0 nopl (%rax,%rax)
_ZNK5minja6IfNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE: sub rsp, 0B8h mov [rsp+0B8h+var_8], rdi mov [rsp+0B8h+var_10], rsi mov [rsp+0B8h+var_18], rdx mov rax, [rsp+0B8h+var_8] add rax, 20h ; ' ' mov [rsp+0B8h+var_20], rax mov rdi, [rsp+0B8h+var_20] call _ZNKSt6vectorISt4pairISt10shared_ptrIN5minja10ExpressionEES1_INS2_12TemplateNodeEEESaIS7_EE5beginEv; std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>>>::begin(void) mov [rsp+0B8h+var_28], rax mov rdi, [rsp+0B8h+var_20] call _ZNKSt6vectorISt4pairISt10shared_ptrIN5minja10ExpressionEES1_INS2_12TemplateNodeEEESaIS7_EE3endEv; std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>>>::end(void) mov [rsp+0B8h+var_30], rax loc_149C5D: lea rdi, [rsp+0B8h+var_28] lea rsi, [rsp+0B8h+var_30] call _ZN9__gnu_cxxneIPKSt4pairISt10shared_ptrIN5minja10ExpressionEES2_INS3_12TemplateNodeEEESt6vectorIS8_SaIS8_EEEEbRKNS_17__normal_iteratorIT_T0_EESJ_; __gnu_cxx::operator!=<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>> const*,std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>>>>(__gnu_cxx::__normal_iterator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>> const*,std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>>>> const&,__gnu_cxx::__normal_iterator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>> const*,std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>>>> const&) test al, 1 jnz short loc_149C7B jmp loc_149DC6 loc_149C7B: lea rdi, [rsp+0B8h+var_28] call _ZNK9__gnu_cxx17__normal_iteratorIPKSt4pairISt10shared_ptrIN5minja10ExpressionEES2_INS3_12TemplateNodeEEESt6vectorIS8_SaIS8_EEEdeEv; __gnu_cxx::__normal_iterator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>> const*,std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>>>>::operator*(void) mov [rsp+0B8h+var_38], rax mov [rsp+0B8h+var_39], 1 mov rdi, [rsp+0B8h+var_38] call _ZNKSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(void) test al, 1 jnz short loc_149CA8 jmp short loc_149D12 loc_149CA8: mov rdi, [rsp+0B8h+var_38] call _ZNKSt19__shared_ptr_accessIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rsi, rax mov rdx, [rsp+0B8h+var_18] lea rdi, [rsp+0B8h+var_90] mov [rsp+0B8h+var_A8], rdi call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov rdi, [rsp+0B8h+var_A8]; this call _ZNK5minja5Value7to_boolEv; minja::Value::to_bool(void) mov [rsp+0B8h+var_9D], al jmp short $+2 loc_149CDF: mov al, [rsp+0B8h+var_9D] and al, 1 mov [rsp+0B8h+var_39], al lea rdi, [rsp+0B8h+var_90]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_149D12 mov rcx, rax mov eax, edx mov [rsp+0B8h+var_98], rcx mov [rsp+0B8h+var_9C], eax lea rdi, [rsp+0B8h+var_90]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp loc_149DCE loc_149D12: test [rsp+0B8h+var_39], 1 jz loc_149DB2 mov rdi, [rsp+0B8h+var_38] add rdi, 10h call _ZNKSt12__shared_ptrIN5minja12TemplateNodeELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<minja::TemplateNode,(__gnu_cxx::_Lock_policy)2>::operator bool(void) test al, 1 jnz short loc_149D87 mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rdi, rax; this mov rax, rdi mov [rsp+0B8h+var_B0], rax lea rsi, aIfnodeCascadeS; "IfNode.cascade.second is null" call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short $+2 loc_149D55: mov rdi, [rsp+0B8h+var_B0]; void * mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) call ___cxa_throw mov rdi, [rsp+0B8h+var_B0]; void * mov rcx, rax mov eax, edx mov [rsp+0B8h+var_98], rcx mov [rsp+0B8h+var_9C], eax call ___cxa_free_exception jmp short loc_149DCE loc_149D87: mov rdi, [rsp+0B8h+var_38] add rdi, 10h call _ZNKSt19__shared_ptr_accessIN5minja12TemplateNodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<minja::TemplateNode,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, rax mov rsi, [rsp+0B8h+var_10] mov rdx, [rsp+0B8h+var_18] call _ZNK5minja12TemplateNode6renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE; minja::TemplateNode::render(std::ostringstream &,std::shared_ptr<minja::Context> const&) jmp short loc_149DC6 loc_149DB2: jmp short $+2 loc_149DB4: lea rdi, [rsp+0B8h+var_28] call _ZN9__gnu_cxx17__normal_iteratorIPKSt4pairISt10shared_ptrIN5minja10ExpressionEES2_INS3_12TemplateNodeEEESt6vectorIS8_SaIS8_EEEppEv; __gnu_cxx::__normal_iterator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>> const*,std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>>>>::operator++(void) jmp loc_149C5D loc_149DC6: add rsp, 0B8h retn loc_149DCE: mov rdi, [rsp+0B8h+var_98] call __Unwind_Resume
long long minja::IfNode::do_render(long long a1, long long a2, long long a3) { long long result; // rax void (***v4)(void); // rsi long long v5; // rax std::runtime_error *exception; // [rsp+8h] [rbp-B0h] _BYTE v7[87]; // [rsp+28h] [rbp-90h] BYREF char v8; // [rsp+7Fh] [rbp-39h] _QWORD *v9; // [rsp+80h] [rbp-38h] long long v10; // [rsp+88h] [rbp-30h] BYREF _QWORD v11[2]; // [rsp+90h] [rbp-28h] BYREF long long v12; // [rsp+A0h] [rbp-18h] long long v13; // [rsp+A8h] [rbp-10h] long long v14; // [rsp+B0h] [rbp-8h] v14 = a1; v13 = a2; v12 = a3; v11[1] = a1 + 32; v11[0] = std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>>>::begin(a1 + 32); v10 = std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>>>::end(a1 + 32); while ( 1 ) { result = __gnu_cxx::operator!=<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>> const*,std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>>>>( v11, &v10); if ( (result & 1) == 0 ) break; v9 = (_QWORD *)__gnu_cxx::__normal_iterator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>> const*,std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>>>>::operator*(v11); v8 = 1; if ( std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(v9) ) { v4 = (void (***)(void))std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->((long long)v9); minja::Expression::evaluate((long long)v7, v4); v8 = minja::Value::to_bool((minja::Value *)v7) & 1; minja::Value::~Value((minja::Value *)v7); } if ( (v8 & 1) != 0 ) { if ( (std::__shared_ptr<minja::TemplateNode,(__gnu_cxx::_Lock_policy)2>::operator bool(v9 + 2) & 1) == 0 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "IfNode.cascade.second is null"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v5 = std::__shared_ptr_access<minja::TemplateNode,(__gnu_cxx::_Lock_policy)2,false,false>::operator->((long long)(v9 + 2)); return minja::TemplateNode::render(v5, v13, v12); } __gnu_cxx::__normal_iterator<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>> const*,std::vector<std::pair<std::shared_ptr<minja::Expression>,std::shared_ptr<minja::TemplateNode>>>>::operator++(v11); } return result; }
45,351
minja::IfNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override { for (const auto& branch : cascade) { auto enter_branch = true; if (branch.first) { enter_branch = branch.first->evaluate(context).to_bool(); } if (enter_branch) { if (!branch.second) throw std::runtime_error("IfNode.cascade.second is null"); branch.second->render(out, context); return; } } }
O2
cpp
minja::IfNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdx, %rbx movq %rsi, %r14 movq 0x20(%rdi), %r12 movq 0x28(%rdi), %r13 leaq 0x8(%rsp), %r15 cmpq %r13, %r12 je 0x72d7c movq (%r12), %rsi testq %rsi, %rsi je 0x72d67 movq %r15, %rdi movq %rbx, %rdx callq 0x6298e movq %r15, %rdi callq 0x62b64 movl %eax, %ebp movq %r15, %rdi callq 0x62c1e testb %bpl, %bpl jne 0x72d67 addq $0x20, %r12 jmp 0x72d31 movq 0x10(%r12), %rdi testq %rdi, %rdi je 0x72d8b movq %r14, %rsi movq %rbx, %rdx callq 0x72e1a addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x23450 movq %rax, %rbx leaq 0x40d97(%rip), %rsi # 0xb3b34 movq %rax, %rdi callq 0x23310 movq 0x89244(%rip), %rsi # 0xfbff0 movq 0x891a5(%rip), %rdx # 0xfbf58 movq %rbx, %rdi callq 0x23ef0 movq %rax, %r14 movq %rbx, %rdi callq 0x23680 jmp 0x72dd5 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x62c1e movq %r14, %rdi callq 0x23f80 nop
_ZNK5minja6IfNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov rbx, rdx mov r14, rsi mov r12, [rdi+20h] mov r13, [rdi+28h] lea r15, [rsp+88h+var_80] loc_72D31: cmp r12, r13 jz short loc_72D7C mov rsi, [r12] test rsi, rsi jz short loc_72D67 mov rdi, r15 mov rdx, rbx call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov rdi, r15; this call _ZNK5minja5Value7to_boolEv; minja::Value::to_bool(void) mov ebp, eax mov rdi, r15; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() test bpl, bpl jnz short loc_72D67 add r12, 20h ; ' ' jmp short loc_72D31 loc_72D67: mov rdi, [r12+10h] test rdi, rdi jz short loc_72D8B mov rsi, r14 mov rdx, rbx call _ZNK5minja12TemplateNode6renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE; minja::TemplateNode::render(std::ostringstream &,std::shared_ptr<minja::Context> const&) loc_72D7C: add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_72D8B: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aIfnodeCascadeS; "IfNode.cascade.second is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_72DD5 mov r14, rax lea rdi, [rsp+88h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_72DD5: mov rdi, r14 call __Unwind_Resume
void minja::IfNode::do_render(long long a1, int a2, int a3, int a4, int a5, int a6) { long long v7; // r12 long long v8; // r13 char v9; // bp long long v10; // rdi std::runtime_error *exception; // rbx _BYTE v12[128]; // [rsp+8h] [rbp-80h] BYREF v7 = *(_QWORD *)(a1 + 32); v8 = *(_QWORD *)(a1 + 40); while ( v7 != v8 ) { if ( !*(_QWORD *)v7 || (minja::Expression::evaluate((long long)v12, *(void (****)(void))v7), v9 = minja::Value::to_bool((minja::Value *)v12), minja::Value::~Value((minja::Value *)v12), v9) ) { v10 = *(_QWORD *)(v7 + 16); if ( !v10 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "IfNode.cascade.second is null"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::TemplateNode::render(v10, a2, a3, a4, a5, a6); return; } v7 += 32LL; } }
do_render: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV RBX,RDX MOV R14,RSI MOV R12,qword ptr [RDI + 0x20] MOV R13,qword ptr [RDI + 0x28] LEA R15,[RSP + 0x8] LAB_00172d31: CMP R12,R13 JZ 0x00172d7c MOV RSI,qword ptr [R12] TEST RSI,RSI JZ 0x00172d67 MOV RDI,R15 MOV RDX,RBX CALL 0x0016298e LAB_00172d4a: MOV RDI,R15 CALL 0x00162b64 LAB_00172d52: MOV EBP,EAX MOV RDI,R15 CALL 0x00162c1e TEST BPL,BPL JNZ 0x00172d67 ADD R12,0x20 JMP 0x00172d31 LAB_00172d67: MOV RDI,qword ptr [R12 + 0x10] TEST RDI,RDI JZ 0x00172d8b MOV RSI,R14 MOV RDX,RBX CALL 0x00172e1a LAB_00172d7c: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00172d8b: PUSH 0x10 POP RDI CALL 0x00123450 MOV RBX,RAX LAB_00172d96: LEA RSI,[0x1b3b34] MOV RDI,RAX CALL 0x00123310 LAB_00172da5: MOV RSI,qword ptr [0x001fbff0] MOV RDX,qword ptr [0x001fbf58] MOV RDI,RBX CALL 0x00123ef0
/* minja::IfNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&) const */ void minja::IfNode::do_render(ostringstream *param_1,shared_ptr *param_2) { int8 *puVar1; char cVar2; runtime_error *this; int8 *puVar3; Expression local_80 [80]; puVar3 = *(int8 **)(param_1 + 0x20); puVar1 = *(int8 **)(param_1 + 0x28); while( true ) { if (puVar3 == puVar1) { return; } if ((shared_ptr *)*puVar3 == (shared_ptr *)0x0) break; Expression::evaluate(local_80,(shared_ptr *)*puVar3); /* try { // try from 00172d4a to 00172d51 has its CatchHandler @ 00172dc8 */ cVar2 = Value::to_bool((Value *)local_80); Value::~Value((Value *)local_80); if (cVar2 != '\0') break; puVar3 = puVar3 + 4; } if ((ostringstream *)puVar3[2] != (ostringstream *)0x0) { TemplateNode::render((ostringstream *)puVar3[2],param_2); return; } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00172d96 to 00172da4 has its CatchHandler @ 00172dbb */ std::runtime_error::runtime_error(this,"IfNode.cascade.second is null"); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001fbff0,PTR__runtime_error_001fbf58); }
45,352
my_error
eloqsql/mysys/my_error.c
void my_error(uint nr, myf MyFlags, ...) { const char *format; va_list args; char ebuff[ERRMSGSIZE]; DBUG_ENTER("my_error"); DBUG_PRINT("my", ("nr: %d MyFlags: %lu errno: %d", nr, MyFlags, errno)); if (!(format = my_get_err_msg(nr))) (void) my_snprintf(ebuff, sizeof(ebuff), "Unknown error %d", nr); else { va_start(args,MyFlags); (void) my_vsnprintf_ex(&my_charset_utf8mb3_general_ci, ebuff, sizeof(ebuff), format, args); va_end(args); } (*error_handler_hook)(nr, ebuff, MyFlags); DBUG_VOID_RETURN; }
O3
c
my_error: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x2e0, %rsp # imm = 0x2E0 movq %rsi, %rbx movl %edi, %r14d movq %rdx, -0x2e0(%rbp) movq %rcx, -0x2d8(%rbp) movq %r8, -0x2d0(%rbp) movq %r9, -0x2c8(%rbp) testb %al, %al je 0x3152f 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) callq 0x31478 testq %rax, %rax je 0x3158a leaq -0x2f0(%rbp), %rcx leaq -0x240(%rbp), %r8 movq %rcx, 0x10(%r8) leaq 0x10(%rbp), %rcx movq %rcx, 0x8(%r8) movabsq $0x3000000010, %rcx # imm = 0x3000000010 movq %rcx, (%r8) leaq 0x3386bc(%rip), %rdi # 0x369c30 leaq -0x220(%rbp), %rsi movl $0x200, %edx # imm = 0x200 movq %rax, %rcx callq 0x5d788 jmp 0x315a7 leaq 0x31cfc(%rip), %rdx # 0x6328d leaq -0x220(%rbp), %rdi movl $0x200, %esi # imm = 0x200 movl %r14d, %ecx xorl %eax, %eax callq 0x5e96a leaq 0x2c5122(%rip), %rax # 0x2f66d0 leaq -0x220(%rbp), %rsi movl %r14d, %edi movq %rbx, %rdx callq *(%rax) movq %fs:0x28, %rax cmpq -0x18(%rbp), %rax jne 0x315d8 addq $0x2e0, %rsp # imm = 0x2E0 popq %rbx popq %r14 popq %rbp retq callq 0x24360
my_error: push rbp mov rbp, rsp push r14 push rbx sub rsp, 2E0h mov rbx, rsi mov r14d, edi mov [rbp+var_2E0], rdx mov [rbp+var_2D8], rcx mov [rbp+var_2D0], r8 mov [rbp+var_2C8], r9 test al, al jz short loc_3152F 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_3152F: mov rax, fs:28h mov [rbp+var_18], rax call my_get_err_msg test rax, rax jz short loc_3158A lea rcx, [rbp+var_2F0] lea r8, [rbp+var_240] mov [r8+10h], rcx lea rcx, [rbp+arg_0] mov [r8+8], rcx mov rcx, 3000000010h mov [r8], rcx lea rdi, my_charset_utf8mb3_general_ci lea rsi, [rbp+var_220] mov edx, 200h mov rcx, rax call my_vsnprintf_ex jmp short loc_315A7 loc_3158A: lea rdx, aUnknownErrorD; "Unknown error %d" lea rdi, [rbp+var_220] mov esi, 200h mov ecx, r14d xor eax, eax call my_snprintf loc_315A7: lea rax, error_handler_hook lea rsi, [rbp+var_220] mov edi, r14d mov rdx, rbx call qword ptr [rax] mov rax, fs:28h cmp rax, [rbp+var_18] jnz short loc_315D8 add rsp, 2E0h pop rbx pop r14 pop rbp retn loc_315D8: call ___stack_chk_fail
unsigned long long my_error(unsigned int a1, __int16 a2, ...) { _BYTE *err_msg; // rax int v3; // r8d int v4; // r9d va_list va; // [rsp+B0h] [rbp-240h] BYREF _BYTE v7[520]; // [rsp+D0h] [rbp-220h] BYREF unsigned long long v8; // [rsp+2D8h] [rbp-18h] va_start(va, a2); va_arg(va, _QWORD); va_arg(va, _QWORD); va_arg(va, _QWORD); va_arg(va, _QWORD); va_end(va); v8 = __readfsqword(0x28u); err_msg = my_get_err_msg(a1); if ( err_msg ) { va_start(va, a2); my_vsnprintf_ex(&my_charset_utf8mb3_general_ci, v7, 512LL, err_msg, va); } else { my_snprintf((unsigned int)v7, 512, (unsigned int)"Unknown error %d", a1, v3, v4); } ((void ( *)(long long, long long, __int16))error_handler_hook[0])(a1, (long long)v7, a2); return __readfsqword(0x28u); }
my_error: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x2e0 MOV RBX,RSI MOV R14D,EDI MOV qword ptr [RBP + -0x2e0],RDX MOV qword ptr [RBP + -0x2d8],RCX MOV qword ptr [RBP + -0x2d0],R8 MOV qword ptr [RBP + -0x2c8],R9 TEST AL,AL JZ 0x0013152f MOVAPS xmmword ptr [RBP + -0x2c0],XMM0 MOVAPS xmmword ptr [RBP + -0x2b0],XMM1 MOVAPS xmmword ptr [RBP + -0x2a0],XMM2 MOVAPS xmmword ptr [RBP + -0x290],XMM3 MOVAPS xmmword ptr [RBP + -0x280],XMM4 MOVAPS xmmword ptr [RBP + -0x270],XMM5 MOVAPS xmmword ptr [RBP + -0x260],XMM6 MOVAPS xmmword ptr [RBP + -0x250],XMM7 LAB_0013152f: MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX CALL 0x00131478 TEST RAX,RAX JZ 0x0013158a LEA RCX,[RBP + -0x2f0] LEA R8,[RBP + -0x240] MOV qword ptr [R8 + 0x10],RCX LEA RCX,[RBP + 0x10] MOV qword ptr [R8 + 0x8],RCX MOV RCX,0x3000000010 MOV qword ptr [R8],RCX LEA RDI,[0x469c30] LEA RSI,[RBP + -0x220] MOV EDX,0x200 MOV RCX,RAX CALL 0x0015d788 JMP 0x001315a7 LAB_0013158a: LEA RDX,[0x16328d] LEA RDI,[RBP + -0x220] MOV ESI,0x200 MOV ECX,R14D XOR EAX,EAX CALL 0x0015e96a LAB_001315a7: LEA RAX,[0x3f66d0] LEA RSI,[RBP + -0x220] MOV EDI,R14D MOV RDX,RBX CALL qword ptr [RAX] MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x001315d8 ADD RSP,0x2e0 POP RBX POP R14 POP RBP RET LAB_001315d8: CALL 0x00124360
void my_error(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int4 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; long lVar1; long in_FS_OFFSET; int1 local_2f8 [16]; int8 local_2e8; int8 local_2e0; int8 local_2d8; int8 local_2d0; int8 local_2c8; int8 local_2b8; int8 local_2a8; int8 local_298; int8 local_288; int8 local_278; int8 local_268; int8 local_258; int8 local_248; int1 *local_240; int1 *local_238; int1 local_228 [520]; long local_20; if (in_AL != '\0') { local_2c8 = param_1; local_2b8 = param_2; local_2a8 = param_3; local_298 = param_4; local_288 = param_5; local_278 = param_6; local_268 = param_7; local_258 = param_8; } local_20 = *(long *)(in_FS_OFFSET + 0x28); local_2e8 = param_11; local_2e0 = param_12; local_2d8 = param_13; local_2d0 = param_14; lVar1 = my_get_err_msg(); if (lVar1 == 0) { my_snprintf(local_228,0x200,"Unknown error %d",param_9); } else { local_238 = local_2f8; local_240 = &stack0x00000008; local_248 = 0x3000000010; my_vsnprintf_ex(my_charset_utf8mb3_general_ci,local_228,0x200,lVar1); } (*(code *)error_handler_hook)(param_9,local_228,param_10); if (*(long *)(in_FS_OFFSET + 0x28) == local_20) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
45,353
ma_remove_table_from_trnman
eloqsql/storage/maria/ma_state.c
void _ma_remove_table_from_trnman(MARIA_HA *info) { MARIA_SHARE *share= info->s; TRN *trn= info->trn; MARIA_USED_TABLES *tables, **prev; DBUG_ENTER("_ma_remove_table_from_trnman"); DBUG_PRINT("enter", ("trn: %p used_tables: %p share: %p in_trans: %d", trn, trn->used_tables, share, share->in_trans)); mysql_mutex_assert_owner(&share->intern_lock); if (trn == &dummy_transaction_object) DBUG_VOID_RETURN; /* First remove share from used_tables */ for (prev= (MARIA_USED_TABLES**) (char*) &trn->used_tables; (tables= *prev); prev= &tables->next) { if (tables->share == share) { *prev= tables->next; /* We don't have to and can't call decrement_share_in_trans(share) here as we know there is an active MARIA_HA handler around. */ share->in_trans--; my_free(tables); break; } } if (!tables) { /* This can only happens in case of rename of intermediate table as part of alter table */ DBUG_PRINT("warning", ("share: %p where not in used_tables_list", share)); } /* Reset trn and remove table from used_instances */ _ma_reset_trn_for_table(info); DBUG_VOID_RETURN; }
O0
c
ma_remove_table_from_trnman: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x18(%rbp) jmp 0x368c5 jmp 0x368c7 jmp 0x368c9 leaq 0x440310(%rip), %rax # 0x476be0 cmpq %rax, -0x18(%rbp) jne 0x368da jmp 0x368d8 jmp 0x36955 movq -0x18(%rbp), %rax addq $0x58, %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) cmpq $0x0, %rax je 0x3693d movq -0x20(%rbp), %rax movq 0x8(%rax), %rax cmpq -0x10(%rbp), %rax jne 0x36931 movq -0x20(%rbp), %rax movq (%rax), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rax movl 0x7ac(%rax), %ecx addl $-0x1, %ecx movl %ecx, 0x7ac(%rax) movq -0x20(%rbp), %rdi callq 0xf3590 jmp 0x3693d jmp 0x36933 movq -0x20(%rbp), %rax movq %rax, -0x28(%rbp) jmp 0x368e6 cmpq $0x0, -0x20(%rbp) jne 0x3694a jmp 0x36946 jmp 0x36948 jmp 0x3694a movq -0x8(%rbp), %rdi callq 0x36960 jmp 0x36955 addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
_ma_remove_table_from_trnman: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_10], rax mov rax, [rbp+var_8] mov rax, [rax+8] mov [rbp+var_18], rax jmp short $+2 loc_368C5: jmp short $+2 loc_368C7: jmp short $+2 loc_368C9: lea rax, dummy_transaction_object cmp [rbp+var_18], rax jnz short loc_368DA jmp short $+2 loc_368D8: jmp short loc_36955 loc_368DA: mov rax, [rbp+var_18] add rax, 58h ; 'X' mov [rbp+var_28], rax loc_368E6: mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_20], rax cmp rax, 0 jz short loc_3693D mov rax, [rbp+var_20] mov rax, [rax+8] cmp rax, [rbp+var_10] jnz short loc_36931 mov rax, [rbp+var_20] mov rcx, [rax] mov rax, [rbp+var_28] mov [rax], rcx mov rax, [rbp+var_10] mov ecx, [rax+7ACh] add ecx, 0FFFFFFFFh mov [rax+7ACh], ecx mov rdi, [rbp+var_20] call my_free jmp short loc_3693D loc_36931: jmp short $+2 loc_36933: mov rax, [rbp+var_20] mov [rbp+var_28], rax jmp short loc_368E6 loc_3693D: cmp [rbp+var_20], 0 jnz short loc_3694A jmp short $+2 loc_36946: jmp short $+2 loc_36948: jmp short $+2 loc_3694A: mov rdi, [rbp+var_8] call _ma_reset_trn_for_table jmp short $+2 loc_36955: add rsp, 30h pop rbp retn
void * ma_remove_table_from_trnman(long long *a1) { void *result; // rax _QWORD *i; // [rsp+8h] [rbp-28h] _QWORD *v3; // [rsp+10h] [rbp-20h] char *v4; // [rsp+18h] [rbp-18h] long long v5; // [rsp+20h] [rbp-10h] v5 = *a1; v4 = (char *)a1[1]; result = &dummy_transaction_object; if ( v4 != (char *)&dummy_transaction_object ) { for ( i = v4 + 88; ; i = (_QWORD *)*i ) { v3 = (_QWORD *)*i; if ( !*i ) break; if ( v3[1] == v5 ) { *i = *v3; --*(_DWORD *)(v5 + 1964); my_free(v3); return (void *)ma_reset_trn_for_table(a1); } } return (void *)ma_reset_trn_for_table(a1); } return result; }
_ma_remove_table_from_trnman: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x18],RAX JMP 0x001368c5 LAB_001368c5: JMP 0x001368c7 LAB_001368c7: JMP 0x001368c9 LAB_001368c9: LEA RAX,[0x576be0] CMP qword ptr [RBP + -0x18],RAX JNZ 0x001368da JMP 0x001368d8 LAB_001368d8: JMP 0x00136955 LAB_001368da: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x58 MOV qword ptr [RBP + -0x28],RAX LAB_001368e6: MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JZ 0x0013693d MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] CMP RAX,qword ptr [RBP + -0x10] JNZ 0x00136931 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x7ac] ADD ECX,-0x1 MOV dword ptr [RAX + 0x7ac],ECX MOV RDI,qword ptr [RBP + -0x20] CALL 0x001f3590 JMP 0x0013693d LAB_00136931: JMP 0x00136933 LAB_00136933: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x28],RAX JMP 0x001368e6 LAB_0013693d: CMP qword ptr [RBP + -0x20],0x0 JNZ 0x0013694a JMP 0x00136946 LAB_00136946: JMP 0x00136948 LAB_00136948: JMP 0x0013694a LAB_0013694a: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00136960 JMP 0x00136955 LAB_00136955: ADD RSP,0x30 POP RBP RET
void _ma_remove_table_from_trnman(long *param_1) { long lVar1; long *plVar2; long *local_30; lVar1 = *param_1; if ((int1 *)param_1[1] != dummy_transaction_object) { plVar2 = (long *)((int1 *)param_1[1] + 0x58); do { local_30 = plVar2; plVar2 = (long *)*local_30; if (plVar2 == (long *)0x0) goto LAB_0013694a; } while (plVar2[1] != lVar1); *local_30 = *plVar2; *(int *)(lVar1 + 0x7ac) = *(int *)(lVar1 + 0x7ac) + -1; my_free(plVar2); LAB_0013694a: _ma_reset_trn_for_table(param_1); } return; }
45,354
parse_value
xtate/src/crypto/crypto-json.c
static bool parse_value(const char **sp, JsonNode **out) { const char *s = *sp; switch (*s) { case 'n': if (expect_literal(&s, "null")) { if (out) *out = json_mknull(); *sp = s; return true; } return false; case 'f': if (expect_literal(&s, "false")) { if (out) *out = json_mkbool(false); *sp = s; return true; } return false; case 't': if (expect_literal(&s, "true")) { if (out) *out = json_mkbool(true); *sp = s; return true; } return false; case '"': { char *str; if (parse_string(&s, out ? &str : NULL)) { if (out) *out = mkstring(str); *sp = s; return true; } return false; } case '[': if (parse_array(&s, out)) { *sp = s; return true; } return false; case '{': if (parse_object(&s, out)) { *sp = s; return true; } return false; default: { double num; if (parse_number(&s, out ? &num : NULL)) { if (out) *out = json_mknumber(num); *sp = s; return true; } return false; } } }
O3
c
parse_value: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rsi, %r14 movq %rdi, %rbx movq (%rdi), %r12 movq %r12, 0x10(%rsp) movzbl (%r12), %eax cmpl $0x6d, %eax jg 0x1b5a1 cmpl $0x22, %eax je 0x1b5e5 cmpl $0x5b, %eax je 0x1b6a0 cmpl $0x66, %eax jne 0x1b64d leaq 0x5(%r12), %r15 xorl %eax, %eax leaq 0x4422a(%rip), %rcx # 0x5f7ac cmpq $0x5, %rax je 0x1b708 movb (%r12,%rax), %dl leaq 0x1(%rax), %rsi cmpb (%rax,%rcx), %dl movq %rsi, %rax je 0x1b582 jmp 0x1b9b5 cmpl $0x6e, %eax je 0x1b620 cmpl $0x7b, %eax je 0x1b6cb cmpl $0x74, %eax jne 0x1b64d leaq 0x4(%r12), %r15 xorl %eax, %eax leaq 0x441ec(%rip), %rcx # 0x5f7b2 cmpq $0x4, %rax je 0x1b71d movb (%r12,%rax), %dl leaq 0x1(%rax), %rsi cmpb (%rax,%rcx), %dl movq %rsi, %rax je 0x1b5c6 jmp 0x1b9b5 testq %r14, %r14 movq %rsp, %rsi cmoveq %r14, %rsi leaq 0x10(%rsp), %rdi callq 0x1c729 movl %eax, %ebp testb %al, %al je 0x1b9b7 testq %r14, %r14 je 0x1b693 movq (%rsp), %r15 movl $0x2, %edi callq 0x1c20b movq %r15, 0x28(%rax) jmp 0x1b690 leaq 0x4(%r12), %r15 xorl %eax, %eax leaq 0x44179(%rip), %rcx # 0x5f7a7 cmpq $0x4, %rax je 0x1b6fa movb (%r12,%rax), %dl leaq 0x1(%rax), %rsi cmpb (%rax,%rcx), %dl movq %rsi, %rax je 0x1b62e jmp 0x1b9b5 testq %r14, %r14 movq %rsp, %rsi cmoveq %r14, %rsi leaq 0x10(%rsp), %rdi callq 0x1cabb movl %eax, %ebp testb %al, %al je 0x1b9b7 testq %r14, %r14 je 0x1b693 movsd (%rsp), %xmm0 movsd %xmm0, 0x18(%rsp) movl $0x3, %edi callq 0x1c20b movsd 0x18(%rsp), %xmm0 movsd %xmm0, 0x28(%rax) movq %rax, (%r14) movq 0x10(%rsp), %rax movq %rax, (%rbx) jmp 0x1b9b7 testq %r14, %r14 je 0x1b73b movl $0x4, %edi callq 0x1c20b movq %rax, %r15 leaq 0x1(%r12), %rax cmpb $0x5b, (%r12) movq %rax, (%rsp) je 0x1b744 jmp 0x1b9ad testq %r14, %r14 je 0x1b824 movl $0x5, %edi callq 0x1c20b movq %rax, %r15 leaq 0x1(%r12), %rax cmpb $0x7b, (%r12) movq %rax, (%rsp) je 0x1b82d jmp 0x1b9ad testq %r14, %r14 je 0x1b733 xorl %edi, %edi callq 0x1c20b jmp 0x1b730 testq %r14, %r14 je 0x1b733 movl $0x1, %edi callq 0x1c20b movb $0x0, 0x28(%rax) jmp 0x1b730 testq %r14, %r14 je 0x1b733 movl $0x1, %edi callq 0x1c20b movb $0x1, 0x28(%rax) movq %rax, (%r14) movq %r15, (%rbx) jmp 0x1b862 incq %r12 xorl %r15d, %r15d movq %r12, %rax movabsq $0x100002600, %rbp # imm = 0x100002600 movzbl (%rax), %ecx cmpq $0x20, %rcx ja 0x1b762 btq %rcx, %rbp jae 0x1b762 incq %rax jmp 0x1b74e movq %rax, (%rsp) cmpb $0x5d, %cl je 0x1b854 testq %r14, %r14 leaq 0x8(%rsp), %r12 cmoveq %r14, %r12 movq %rsp, %rdi movq %r12, %rsi callq 0x1b533 testb %al, %al je 0x1b9ad leaq 0x28(%r15), %r13 movq (%rsp), %rax movzbl (%rax), %ecx cmpq $0x20, %rcx ja 0x1b7aa btq %rcx, %rbp jae 0x1b7aa incq %rax jmp 0x1b796 testq %r14, %r14 je 0x1b7df movq 0x8(%rsp), %rcx movq %r15, (%rcx) movq 0x30(%r15), %rdx movq %rdx, 0x8(%rcx) movq $0x0, 0x10(%rcx) movq 0x30(%r15), %rdx leaq 0x10(%rdx), %rsi testq %rdx, %rdx cmoveq %r13, %rsi movq %rcx, (%rsi) movq %rcx, 0x30(%r15) movb (%rax), %cl cmpb $0x5d, %cl je 0x1b854 incq %rax movq %rax, (%rsp) cmpb $0x2c, %cl jne 0x1b9ad movzbl (%rax), %ecx cmpq $0x20, %rcx ja 0x1b808 btq %rcx, %rbp jae 0x1b808 incq %rax jmp 0x1b7f4 movq %rax, (%rsp) movq %rsp, %rdi movq %r12, %rsi callq 0x1b533 testb %al, %al jne 0x1b792 jmp 0x1b9ad incq %r12 xorl %r15d, %r15d movq %r12, %rax movabsq $0x100002600, %rbp # imm = 0x100002600 movzbl (%rax), %ecx cmpq $0x20, %rcx ja 0x1b84b btq %rcx, %rbp jae 0x1b84b incq %rax jmp 0x1b837 movq %rax, (%rsp) cmpb $0x7d, %cl jne 0x1b86a incq %rax testq %r14, %r14 je 0x1b85f movq %r15, (%r14) movq %rax, (%rbx) movb $0x1, %bpl jmp 0x1b9b7 testq %r14, %r14 leaq 0x8(%rsp), %r12 cmoveq %r14, %r12 movq %rsp, %rdi movq %r12, %rsi callq 0x1c729 testb %al, %al je 0x1b9ad testq %r14, %r14 leaq 0x20(%rsp), %r13 cmoveq %r14, %r13 leaq 0x28(%r15), %rax movq %rax, 0x18(%rsp) movq (%rsp), %rax incq %rax movzbl -0x1(%rax), %ecx cmpq $0x20, %rcx ja 0x1b8b5 btq %rcx, %rbp jb 0x1b8a2 movq %rax, (%rsp) cmpb $0x3a, %cl jne 0x1b987 movzbl (%rax), %ecx cmpq $0x20, %rcx ja 0x1b8d6 btq %rcx, %rbp jae 0x1b8d6 incq %rax jmp 0x1b8c2 movq %rax, (%rsp) movq %rsp, %rdi movq %r13, %rsi callq 0x1b533 testb %al, %al je 0x1b987 movq (%rsp), %rax movzbl (%rax), %ecx cmpq $0x20, %rcx ja 0x1b905 btq %rcx, %rbp jae 0x1b905 incq %rax jmp 0x1b8f1 testq %r14, %r14 je 0x1b945 movq 0x8(%rsp), %rcx movq 0x20(%rsp), %rdx movq %rcx, 0x18(%rdx) movq %r15, (%rdx) movq 0x30(%r15), %rcx movq %rcx, 0x8(%rdx) movq $0x0, 0x10(%rdx) movq 0x30(%r15), %rcx leaq 0x10(%rcx), %rsi testq %rcx, %rcx cmoveq 0x18(%rsp), %rsi movq %rdx, (%rsi) movq %rdx, 0x30(%r15) movb (%rax), %cl cmpb $0x7d, %cl je 0x1b854 incq %rax movq %rax, (%rsp) cmpb $0x2c, %cl jne 0x1b9ad movzbl (%rax), %ecx cmpq $0x20, %rcx ja 0x1b96e btq %rcx, %rbp jae 0x1b96e incq %rax jmp 0x1b95a movq %rax, (%rsp) movq %rsp, %rdi movq %r12, %rsi callq 0x1c729 testb %al, %al jne 0x1b89e jmp 0x1b9ad testq %r14, %r14 setne %al movq 0x8(%rsp), %rdi testq %rdi, %rdi setne %cl andb %al, %cl cmpb $0x1, %cl jne 0x1b9ad callq 0x151e0 movq $0x0, 0x8(%rsp) movq %r15, %rdi callq 0x1b9c8 xorl %ebp, %ebp movl %ebp, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
parse_value: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r14, rsi mov rbx, rdi mov r12, [rdi] mov [rsp+58h+var_48], r12 movzx eax, byte ptr [r12] cmp eax, 6Dh ; 'm' jg short loc_1B5A1 cmp eax, 22h ; '"' jz loc_1B5E5 cmp eax, 5Bh ; '[' jz loc_1B6A0 cmp eax, 66h ; 'f' jnz loc_1B64D lea r15, [r12+5] xor eax, eax lea rcx, aFalse; "false" loc_1B582: cmp rax, 5 jz loc_1B708 mov dl, [r12+rax] lea rsi, [rax+1] cmp dl, [rax+rcx] mov rax, rsi jz short loc_1B582 jmp loc_1B9B5 loc_1B5A1: cmp eax, 6Eh ; 'n' jz short loc_1B620 cmp eax, 7Bh ; '{' jz loc_1B6CB cmp eax, 74h ; 't' jnz loc_1B64D lea r15, [r12+4] xor eax, eax lea rcx, aTrue; "true" loc_1B5C6: cmp rax, 4 jz loc_1B71D mov dl, [r12+rax] lea rsi, [rax+1] cmp dl, [rax+rcx] mov rax, rsi jz short loc_1B5C6 jmp loc_1B9B5 loc_1B5E5: test r14, r14 mov rsi, rsp cmovz rsi, r14 lea rdi, [rsp+58h+var_48] call parse_string mov ebp, eax test al, al jz loc_1B9B7 test r14, r14 jz loc_1B693 mov r15, [rsp+58h+var_58] mov edi, 2 call mknode mov [rax+28h], r15 jmp short loc_1B690 loc_1B620: lea r15, [r12+4] xor eax, eax lea rcx, aNull; "null" loc_1B62E: cmp rax, 4 jz loc_1B6FA mov dl, [r12+rax] lea rsi, [rax+1] cmp dl, [rax+rcx] mov rax, rsi jz short loc_1B62E jmp loc_1B9B5 loc_1B64D: test r14, r14 mov rsi, rsp cmovz rsi, r14 lea rdi, [rsp+58h+var_48] call parse_number mov ebp, eax test al, al jz loc_1B9B7 test r14, r14 jz short loc_1B693 movsd xmm0, [rsp+58h+var_58] movsd [rsp+58h+var_40], xmm0 mov edi, 3 call mknode movsd xmm0, [rsp+58h+var_40] movsd qword ptr [rax+28h], xmm0 loc_1B690: mov [r14], rax loc_1B693: mov rax, [rsp+58h+var_48] mov [rbx], rax jmp loc_1B9B7 loc_1B6A0: test r14, r14 jz loc_1B73B mov edi, 4 call mknode mov r15, rax lea rax, [r12+1] cmp byte ptr [r12], 5Bh ; '[' mov [rsp+58h+var_58], rax jz short loc_1B744 jmp loc_1B9AD loc_1B6CB: test r14, r14 jz loc_1B824 mov edi, 5 call mknode mov r15, rax lea rax, [r12+1] cmp byte ptr [r12], 7Bh ; '{' mov [rsp+58h+var_58], rax jz loc_1B82D jmp loc_1B9AD loc_1B6FA: test r14, r14 jz short loc_1B733 xor edi, edi call mknode jmp short loc_1B730 loc_1B708: test r14, r14 jz short loc_1B733 mov edi, 1 call mknode mov byte ptr [rax+28h], 0 jmp short loc_1B730 loc_1B71D: test r14, r14 jz short loc_1B733 mov edi, 1 call mknode mov byte ptr [rax+28h], 1 loc_1B730: mov [r14], rax loc_1B733: mov [rbx], r15 jmp loc_1B862 loc_1B73B: inc r12 xor r15d, r15d mov rax, r12 loc_1B744: mov rbp, 100002600h loc_1B74E: movzx ecx, byte ptr [rax] cmp rcx, 20h ; ' ' ja short loc_1B762 bt rbp, rcx jnb short loc_1B762 inc rax jmp short loc_1B74E loc_1B762: mov [rsp+58h+var_58], rax cmp cl, 5Dh ; ']' jz loc_1B854 test r14, r14 lea r12, [rsp+58h+var_50] cmovz r12, r14 mov rdi, rsp mov rsi, r12 call parse_value test al, al jz loc_1B9AD lea r13, [r15+28h] loc_1B792: mov rax, [rsp+58h+var_58] loc_1B796: movzx ecx, byte ptr [rax] cmp rcx, 20h ; ' ' ja short loc_1B7AA bt rbp, rcx jnb short loc_1B7AA inc rax jmp short loc_1B796 loc_1B7AA: test r14, r14 jz short loc_1B7DF mov rcx, [rsp+58h+var_50] mov [rcx], r15 mov rdx, [r15+30h] mov [rcx+8], rdx mov qword ptr [rcx+10h], 0 mov rdx, [r15+30h] lea rsi, [rdx+10h] test rdx, rdx cmovz rsi, r13 mov [rsi], rcx mov [r15+30h], rcx mov cl, [rax] loc_1B7DF: cmp cl, 5Dh ; ']' jz short loc_1B854 inc rax mov [rsp+58h+var_58], rax cmp cl, 2Ch ; ',' jnz loc_1B9AD loc_1B7F4: movzx ecx, byte ptr [rax] cmp rcx, 20h ; ' ' ja short loc_1B808 bt rbp, rcx jnb short loc_1B808 inc rax jmp short loc_1B7F4 loc_1B808: mov [rsp+58h+var_58], rax mov rdi, rsp mov rsi, r12 call parse_value test al, al jnz loc_1B792 jmp loc_1B9AD loc_1B824: inc r12 xor r15d, r15d mov rax, r12 loc_1B82D: mov rbp, 100002600h loc_1B837: movzx ecx, byte ptr [rax] cmp rcx, 20h ; ' ' ja short loc_1B84B bt rbp, rcx jnb short loc_1B84B inc rax jmp short loc_1B837 loc_1B84B: mov [rsp+58h+var_58], rax cmp cl, 7Dh ; '}' jnz short loc_1B86A loc_1B854: inc rax test r14, r14 jz short loc_1B85F mov [r14], r15 loc_1B85F: mov [rbx], rax loc_1B862: mov bpl, 1 jmp loc_1B9B7 loc_1B86A: test r14, r14 lea r12, [rsp+58h+var_50] cmovz r12, r14 mov rdi, rsp mov rsi, r12 call parse_string test al, al jz loc_1B9AD test r14, r14 lea r13, [rsp+58h+var_38] cmovz r13, r14 lea rax, [r15+28h] mov [rsp+58h+var_40], rax loc_1B89E: mov rax, [rsp+58h+var_58] loc_1B8A2: inc rax movzx ecx, byte ptr [rax-1] cmp rcx, 20h ; ' ' ja short loc_1B8B5 bt rbp, rcx jb short loc_1B8A2 loc_1B8B5: mov [rsp+58h+var_58], rax cmp cl, 3Ah ; ':' jnz loc_1B987 loc_1B8C2: movzx ecx, byte ptr [rax] cmp rcx, 20h ; ' ' ja short loc_1B8D6 bt rbp, rcx jnb short loc_1B8D6 inc rax jmp short loc_1B8C2 loc_1B8D6: mov [rsp+58h+var_58], rax mov rdi, rsp mov rsi, r13 call parse_value test al, al jz loc_1B987 mov rax, [rsp+58h+var_58] loc_1B8F1: movzx ecx, byte ptr [rax] cmp rcx, 20h ; ' ' ja short loc_1B905 bt rbp, rcx jnb short loc_1B905 inc rax jmp short loc_1B8F1 loc_1B905: test r14, r14 jz short loc_1B945 mov rcx, [rsp+58h+var_50] mov rdx, [rsp+58h+var_38] mov [rdx+18h], rcx mov [rdx], r15 mov rcx, [r15+30h] mov [rdx+8], rcx mov qword ptr [rdx+10h], 0 mov rcx, [r15+30h] lea rsi, [rcx+10h] test rcx, rcx cmovz rsi, [rsp+58h+var_40] mov [rsi], rdx mov [r15+30h], rdx mov cl, [rax] loc_1B945: cmp cl, 7Dh ; '}' jz loc_1B854 inc rax mov [rsp+58h+var_58], rax cmp cl, 2Ch ; ',' jnz short loc_1B9AD loc_1B95A: movzx ecx, byte ptr [rax] cmp rcx, 20h ; ' ' ja short loc_1B96E bt rbp, rcx jnb short loc_1B96E inc rax jmp short loc_1B95A loc_1B96E: mov [rsp+58h+var_58], rax mov rdi, rsp mov rsi, r12 call parse_string test al, al jnz loc_1B89E jmp short loc_1B9AD loc_1B987: test r14, r14 setnz al mov rdi, [rsp+58h+var_50] test rdi, rdi setnz cl and cl, al cmp cl, 1 jnz short loc_1B9AD call _free mov [rsp+58h+var_50], 0 loc_1B9AD: mov rdi, r15 call json_delete loc_1B9B5: xor ebp, ebp loc_1B9B7: mov eax, ebp add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long parse_value(_BYTE **a1, long long *a2, long long a3, long long a4) { long long v4; // rbp long long *v5; // r14 _BYTE *v6; // r12 unsigned int v7; // eax _BYTE *v8; // r15 long long v9; // rax bool v10; // zf long long v11; // rax unsigned __int8 **v12; // rsi long long v13; // rdx long long v14; // rcx unsigned __int8 *v15; // r15 long long v16; // rax long long v17; // rax unsigned __int8 **v18; // rsi long long v19; // rdx long long v20; // rcx long long v21; // r15 unsigned __int8 *i; // rax long long v23; // rax unsigned long long v24; // rcx long long **v25; // r12 unsigned long long v26; // rcx long long v27; // rdx unsigned long long *v28; // rsi unsigned __int8 *v29; // rax unsigned long long v30; // rcx unsigned long long v31; // rcx _BYTE *v32; // rax long long **v33; // r12 long long **v34; // r13 unsigned __int8 *v35; // rax unsigned long long v36; // rcx unsigned long long v37; // rcx unsigned long long v38; // rcx long long *v39; // rdx long long v40; // rcx long long **v41; // rsi unsigned __int8 *v42; // rax unsigned long long v43; // rcx unsigned __int8 *v45; // [rsp+0h] [rbp-58h] BYREF long long *v46; // [rsp+8h] [rbp-50h] BYREF _BYTE *v47; // [rsp+10h] [rbp-48h] BYREF long long **v48; // [rsp+18h] [rbp-40h] long long *v49; // [rsp+20h] [rbp-38h] BYREF v5 = a2; v6 = *a1; v47 = v6; v7 = (unsigned __int8)*v6; if ( v7 > 0x6D ) { if ( v7 == 110 ) { v8 = v6 + 4; v17 = 0LL; while ( v17 != 4 ) { LOBYTE(a3) = v6[v17]; a2 = (long long *)(v17 + 1); v10 = (_BYTE)a3 == (unsigned __int8)aNull[v17++]; if ( !v10 ) goto LABEL_112; } if ( !v5 ) goto LABEL_45; v23 = mknode(0LL, a2, a3, "null"); goto LABEL_44; } if ( v7 != 123 ) { if ( v7 == 116 ) { v8 = v6 + 4; v11 = 0LL; while ( v11 != 4 ) { LOBYTE(a3) = v6[v11]; a2 = (long long *)(v11 + 1); v10 = (_BYTE)a3 == (unsigned __int8)aTrue[v11++]; if ( !v10 ) goto LABEL_112; } if ( !v5 ) goto LABEL_45; v23 = mknode(1LL, a2, a3, "true"); *(_BYTE *)(v23 + 40) = 1; goto LABEL_44; } goto LABEL_25; } if ( a2 ) { v21 = mknode(5LL, a2, a3, a4); i = v6 + 1; v10 = *v6 == 123; v45 = v6 + 1; if ( !v10 ) goto LABEL_111; } else { v21 = 0LL; i = v6 + 1; } v4 = 0x100002600LL; while ( 1 ) { v31 = *i; if ( v31 > 0x20 || !_bittest64(&v4, v31) ) break; ++i; } v45 = i; if ( (_BYTE)v31 != 125 ) { v33 = &v46; if ( !a2 ) v33 = 0LL; if ( (unsigned __int8)parse_string(&v45, v33) ) { v34 = &v49; if ( !a2 ) v34 = 0LL; v48 = (long long **)(v21 + 40); while ( 1 ) { v35 = v45; do v36 = *v35++; while ( v36 <= 0x20 && _bittest64(&v4, v36) ); v45 = v35; if ( (_BYTE)v36 != 58 ) break; while ( 1 ) { v37 = *v35; if ( v37 > 0x20 || !_bittest64(&v4, v37) ) break; ++v35; } v45 = v35; if ( !(unsigned __int8)parse_value(&v45, v34) ) break; for ( i = v45; ; ++i ) { v38 = *i; if ( v38 > 0x20 || !_bittest64(&v4, v38) ) break; } if ( v5 ) { v39 = v49; v49[3] = (long long)v46; *v39 = v21; v39[1] = *(_QWORD *)(v21 + 48); v39[2] = 0LL; v40 = *(_QWORD *)(v21 + 48); v41 = (long long **)(v40 + 16); if ( !v40 ) v41 = v48; *v41 = v39; *(_QWORD *)(v21 + 48) = v39; LOBYTE(v38) = *i; } if ( (_BYTE)v38 == 125 ) goto LABEL_76; v42 = i + 1; v45 = v42; if ( (_BYTE)v38 == 44 ) { while ( 1 ) { v43 = *v42; if ( v43 > 0x20 || !_bittest64(&v4, v43) ) break; ++v42; } v45 = v42; if ( (unsigned __int8)parse_string(&v45, v33) ) continue; } goto LABEL_111; } if ( v5 != 0LL && v46 != 0LL ) { free(v46); v46 = 0LL; } } goto LABEL_111; } LABEL_76: v32 = i + 1; if ( v5 ) *v5 = v21; *a1 = v32; goto LABEL_79; } if ( v7 != 34 ) { if ( v7 != 91 ) { if ( v7 == 102 ) { v8 = v6 + 5; v9 = 0LL; while ( v9 != 5 ) { LOBYTE(a3) = v6[v9]; a2 = (long long *)(v9 + 1); v10 = (_BYTE)a3 == (unsigned __int8)aFalse[v9++]; if ( !v10 ) goto LABEL_112; } if ( !v5 ) goto LABEL_45; v23 = mknode(1LL, a2, a3, "false"); *(_BYTE *)(v23 + 40) = 0; LABEL_44: *v5 = v23; LABEL_45: *a1 = v8; LABEL_79: LOBYTE(v4) = 1; return (unsigned int)v4; } LABEL_25: v18 = &v45; if ( !v5 ) v18 = 0LL; LODWORD(v4) = parse_number(&v47, v18); if ( (_BYTE)v4 ) { if ( v5 ) { v48 = (long long **)v45; v16 = mknode(3LL, v18, v19, v20); *(_QWORD *)(v16 + 40) = v48; goto LABEL_30; } goto LABEL_31; } return (unsigned int)v4; } if ( a2 ) { v21 = mknode(4LL, a2, a3, a4); i = v6 + 1; v10 = *v6 == 91; v45 = v6 + 1; if ( !v10 ) goto LABEL_111; } else { v21 = 0LL; i = v6 + 1; } v4 = 0x100002600LL; while ( 1 ) { v24 = *i; if ( v24 > 0x20 || !_bittest64(&v4, v24) ) break; ++i; } v45 = i; if ( (_BYTE)v24 != 93 ) { v25 = &v46; if ( !a2 ) v25 = 0LL; if ( (unsigned __int8)parse_value(&v45, v25) ) { while ( 1 ) { for ( i = v45; ; ++i ) { v26 = *i; if ( v26 > 0x20 || !_bittest64(&v4, v26) ) break; } if ( v5 ) { v26 = (unsigned long long)v46; *v46 = v21; *(_QWORD *)(v26 + 8) = *(_QWORD *)(v21 + 48); *(_QWORD *)(v26 + 16) = 0LL; v27 = *(_QWORD *)(v21 + 48); v28 = (unsigned long long *)(v27 + 16); if ( !v27 ) v28 = (unsigned long long *)(v21 + 40); *v28 = v26; *(_QWORD *)(v21 + 48) = v26; LOBYTE(v26) = *i; } if ( (_BYTE)v26 == 93 ) goto LABEL_76; v29 = i + 1; v45 = v29; if ( (_BYTE)v26 == 44 ) { while ( 1 ) { v30 = *v29; if ( v30 > 0x20 || !_bittest64(&v4, v30) ) break; ++v29; } v45 = v29; if ( (unsigned __int8)parse_value(&v45, v25) ) continue; } break; } } LABEL_111: json_delete(v21); LABEL_112: LODWORD(v4) = 0; return (unsigned int)v4; } goto LABEL_76; } v12 = &v45; if ( !v5 ) v12 = 0LL; LODWORD(v4) = parse_string(&v47, v12); if ( (_BYTE)v4 ) { if ( v5 ) { v15 = v45; v16 = mknode(2LL, v12, v13, v14); *(_QWORD *)(v16 + 40) = v15; LABEL_30: *v5 = v16; } LABEL_31: *a1 = v47; } return (unsigned int)v4; }
parse_value: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14,RSI MOV RBX,RDI MOV R12,qword ptr [RDI] MOV qword ptr [RSP + 0x10],R12 MOVZX EAX,byte ptr [R12] CMP EAX,0x6d JG 0x0011b5a1 CMP EAX,0x22 JZ 0x0011b5e5 CMP EAX,0x5b JZ 0x0011b6a0 CMP EAX,0x66 JNZ 0x0011b64d LEA R15,[R12 + 0x5] XOR EAX,EAX LEA RCX,[0x15f7ac] LAB_0011b582: CMP RAX,0x5 JZ 0x0011b708 MOV DL,byte ptr [R12 + RAX*0x1] LEA RSI,[RAX + 0x1] CMP DL,byte ptr [RAX + RCX*0x1] MOV RAX,RSI JZ 0x0011b582 JMP 0x0011b9b5 LAB_0011b5a1: CMP EAX,0x6e JZ 0x0011b620 CMP EAX,0x7b JZ 0x0011b6cb CMP EAX,0x74 JNZ 0x0011b64d LEA R15,[R12 + 0x4] XOR EAX,EAX LEA RCX,[0x15f7b2] LAB_0011b5c6: CMP RAX,0x4 JZ 0x0011b71d MOV DL,byte ptr [R12 + RAX*0x1] LEA RSI,[RAX + 0x1] CMP DL,byte ptr [RAX + RCX*0x1] MOV RAX,RSI JZ 0x0011b5c6 JMP 0x0011b9b5 LAB_0011b5e5: TEST R14,R14 MOV RSI,RSP CMOVZ RSI,R14 LEA RDI,[RSP + 0x10] CALL 0x0011c729 MOV EBP,EAX TEST AL,AL JZ 0x0011b9b7 TEST R14,R14 JZ 0x0011b693 MOV R15,qword ptr [RSP] MOV EDI,0x2 CALL 0x0011c20b MOV qword ptr [RAX + 0x28],R15 JMP 0x0011b690 LAB_0011b620: LEA R15,[R12 + 0x4] XOR EAX,EAX LEA RCX,[0x15f7a7] LAB_0011b62e: CMP RAX,0x4 JZ 0x0011b6fa MOV DL,byte ptr [R12 + RAX*0x1] LEA RSI,[RAX + 0x1] CMP DL,byte ptr [RAX + RCX*0x1] MOV RAX,RSI JZ 0x0011b62e JMP 0x0011b9b5 LAB_0011b64d: TEST R14,R14 MOV RSI,RSP CMOVZ RSI,R14 LEA RDI,[RSP + 0x10] CALL 0x0011cabb MOV EBP,EAX TEST AL,AL JZ 0x0011b9b7 TEST R14,R14 JZ 0x0011b693 MOVSD XMM0,qword ptr [RSP] MOVSD qword ptr [RSP + 0x18],XMM0 MOV EDI,0x3 CALL 0x0011c20b MOVSD XMM0,qword ptr [RSP + 0x18] MOVSD qword ptr [RAX + 0x28],XMM0 LAB_0011b690: MOV qword ptr [R14],RAX LAB_0011b693: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RBX],RAX JMP 0x0011b9b7 LAB_0011b6a0: TEST R14,R14 JZ 0x0011b73b MOV EDI,0x4 CALL 0x0011c20b MOV R15,RAX LEA RAX,[R12 + 0x1] CMP byte ptr [R12],0x5b MOV qword ptr [RSP],RAX JZ 0x0011b744 JMP 0x0011b9ad LAB_0011b6cb: TEST R14,R14 JZ 0x0011b824 MOV EDI,0x5 CALL 0x0011c20b MOV R15,RAX LEA RAX,[R12 + 0x1] CMP byte ptr [R12],0x7b MOV qword ptr [RSP],RAX JZ 0x0011b82d JMP 0x0011b9ad LAB_0011b6fa: TEST R14,R14 JZ 0x0011b733 XOR EDI,EDI CALL 0x0011c20b JMP 0x0011b730 LAB_0011b708: TEST R14,R14 JZ 0x0011b733 MOV EDI,0x1 CALL 0x0011c20b MOV byte ptr [RAX + 0x28],0x0 JMP 0x0011b730 LAB_0011b71d: TEST R14,R14 JZ 0x0011b733 MOV EDI,0x1 CALL 0x0011c20b MOV byte ptr [RAX + 0x28],0x1 LAB_0011b730: MOV qword ptr [R14],RAX LAB_0011b733: MOV qword ptr [RBX],R15 JMP 0x0011b862 LAB_0011b73b: INC R12 XOR R15D,R15D MOV RAX,R12 LAB_0011b744: MOV RBP,0x100002600 LAB_0011b74e: MOVZX ECX,byte ptr [RAX] CMP RCX,0x20 JA 0x0011b762 BT RBP,RCX JNC 0x0011b762 INC RAX JMP 0x0011b74e LAB_0011b762: MOV qword ptr [RSP],RAX CMP CL,0x5d JZ 0x0011b854 TEST R14,R14 LEA R12,[RSP + 0x8] CMOVZ R12,R14 MOV RDI,RSP MOV RSI,R12 CALL 0x0011b533 TEST AL,AL JZ 0x0011b9ad LEA R13,[R15 + 0x28] LAB_0011b792: MOV RAX,qword ptr [RSP] LAB_0011b796: MOVZX ECX,byte ptr [RAX] CMP RCX,0x20 JA 0x0011b7aa BT RBP,RCX JNC 0x0011b7aa INC RAX JMP 0x0011b796 LAB_0011b7aa: TEST R14,R14 JZ 0x0011b7df MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RCX],R15 MOV RDX,qword ptr [R15 + 0x30] MOV qword ptr [RCX + 0x8],RDX MOV qword ptr [RCX + 0x10],0x0 MOV RDX,qword ptr [R15 + 0x30] LEA RSI,[RDX + 0x10] TEST RDX,RDX CMOVZ RSI,R13 MOV qword ptr [RSI],RCX MOV qword ptr [R15 + 0x30],RCX MOV CL,byte ptr [RAX] LAB_0011b7df: CMP CL,0x5d JZ 0x0011b854 INC RAX MOV qword ptr [RSP],RAX CMP CL,0x2c JNZ 0x0011b9ad LAB_0011b7f4: MOVZX ECX,byte ptr [RAX] CMP RCX,0x20 JA 0x0011b808 BT RBP,RCX JNC 0x0011b808 INC RAX JMP 0x0011b7f4 LAB_0011b808: MOV qword ptr [RSP],RAX MOV RDI,RSP MOV RSI,R12 CALL 0x0011b533 TEST AL,AL JNZ 0x0011b792 JMP 0x0011b9ad LAB_0011b824: INC R12 XOR R15D,R15D MOV RAX,R12 LAB_0011b82d: MOV RBP,0x100002600 LAB_0011b837: MOVZX ECX,byte ptr [RAX] CMP RCX,0x20 JA 0x0011b84b BT RBP,RCX JNC 0x0011b84b INC RAX JMP 0x0011b837 LAB_0011b84b: MOV qword ptr [RSP],RAX CMP CL,0x7d JNZ 0x0011b86a LAB_0011b854: INC RAX TEST R14,R14 JZ 0x0011b85f MOV qword ptr [R14],R15 LAB_0011b85f: MOV qword ptr [RBX],RAX LAB_0011b862: MOV BPL,0x1 JMP 0x0011b9b7 LAB_0011b86a: TEST R14,R14 LEA R12,[RSP + 0x8] CMOVZ R12,R14 MOV RDI,RSP MOV RSI,R12 CALL 0x0011c729 TEST AL,AL JZ 0x0011b9ad TEST R14,R14 LEA R13,[RSP + 0x20] CMOVZ R13,R14 LEA RAX,[R15 + 0x28] MOV qword ptr [RSP + 0x18],RAX LAB_0011b89e: MOV RAX,qword ptr [RSP] LAB_0011b8a2: INC RAX MOVZX ECX,byte ptr [RAX + -0x1] CMP RCX,0x20 JA 0x0011b8b5 BT RBP,RCX JC 0x0011b8a2 LAB_0011b8b5: MOV qword ptr [RSP],RAX CMP CL,0x3a JNZ 0x0011b987 LAB_0011b8c2: MOVZX ECX,byte ptr [RAX] CMP RCX,0x20 JA 0x0011b8d6 BT RBP,RCX JNC 0x0011b8d6 INC RAX JMP 0x0011b8c2 LAB_0011b8d6: MOV qword ptr [RSP],RAX MOV RDI,RSP MOV RSI,R13 CALL 0x0011b533 TEST AL,AL JZ 0x0011b987 MOV RAX,qword ptr [RSP] LAB_0011b8f1: MOVZX ECX,byte ptr [RAX] CMP RCX,0x20 JA 0x0011b905 BT RBP,RCX JNC 0x0011b905 INC RAX JMP 0x0011b8f1 LAB_0011b905: TEST R14,R14 JZ 0x0011b945 MOV RCX,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x20] MOV qword ptr [RDX + 0x18],RCX MOV qword ptr [RDX],R15 MOV RCX,qword ptr [R15 + 0x30] MOV qword ptr [RDX + 0x8],RCX MOV qword ptr [RDX + 0x10],0x0 MOV RCX,qword ptr [R15 + 0x30] LEA RSI,[RCX + 0x10] TEST RCX,RCX CMOVZ RSI,qword ptr [RSP + 0x18] MOV qword ptr [RSI],RDX MOV qword ptr [R15 + 0x30],RDX MOV CL,byte ptr [RAX] LAB_0011b945: CMP CL,0x7d JZ 0x0011b854 INC RAX MOV qword ptr [RSP],RAX CMP CL,0x2c JNZ 0x0011b9ad LAB_0011b95a: MOVZX ECX,byte ptr [RAX] CMP RCX,0x20 JA 0x0011b96e BT RBP,RCX JNC 0x0011b96e INC RAX JMP 0x0011b95a LAB_0011b96e: MOV qword ptr [RSP],RAX MOV RDI,RSP MOV RSI,R12 CALL 0x0011c729 TEST AL,AL JNZ 0x0011b89e JMP 0x0011b9ad LAB_0011b987: TEST R14,R14 SETNZ AL MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI SETNZ CL AND CL,AL CMP CL,0x1 JNZ 0x0011b9ad CALL 0x001151e0 MOV qword ptr [RSP + 0x8],0x0 LAB_0011b9ad: MOV RDI,R15 CALL 0x0011b9c8 LAB_0011b9b5: XOR EBP,EBP LAB_0011b9b7: MOV EAX,EBP ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong parse_value(long *param_1,long *param_2) { byte *pbVar1; byte *pbVar2; char cVar3; uint uVar4; long lVar5; byte *pbVar6; byte bVar7; int8 unaff_RBP; ulong uVar8; byte **ppbVar9; byte **ppbVar10; int8 *puVar11; long **pplVar12; long **pplVar13; byte *pbVar14; byte *local_58; long *local_50; byte *local_48; byte *local_40; long *local_38; ppbVar9 = &local_58; ppbVar10 = &local_58; pbVar6 = (byte *)*param_1; bVar7 = *pbVar6; local_48 = pbVar6; if (bVar7 < 0x6e) { if (bVar7 == 0x22) { if (param_2 == (long *)0x0) { ppbVar9 = (byte **)0x0; } uVar4 = parse_string(&local_48,ppbVar9); uVar8 = (ulong)uVar4; if ((char)uVar4 == '\0') goto LAB_0011b9b7; if (param_2 != (long *)0x0) { lVar5 = mknode(2); *(byte **)(lVar5 + 0x28) = local_58; LAB_0011b690: *param_2 = lVar5; } } else { if (bVar7 == 0x5b) { if (param_2 == (long *)0x0) { lVar5 = 0; local_58 = pbVar6; } else { lVar5 = mknode(4); local_58 = pbVar6; pbVar14 = pbVar6 + 1; if (*pbVar6 != 0x5b) goto LAB_0011b9ad; } do { local_58 = local_58 + 1; bVar7 = *local_58; if (0x20 < (ulong)bVar7) break; } while ((0x100002600U >> ((ulong)bVar7 & 0x3f) & 1) != 0); if (bVar7 == 0x5d) { LAB_0011b854: unaff_RBP = 0x100002600; if (param_2 != (long *)0x0) { *param_2 = lVar5; } *param_1 = (long)(local_58 + 1); LAB_0011b862: uVar8 = CONCAT71((int7)((ulong)unaff_RBP >> 8),1); goto LAB_0011b9b7; } pplVar12 = &local_50; if (param_2 == (long *)0x0) { pplVar12 = (long **)0x0; } cVar3 = parse_value(&local_58,pplVar12); pbVar14 = local_58; if (cVar3 != '\0') { do { while( true ) { bVar7 = *local_58; if ((0x20 < (ulong)bVar7) || ((0x100002600U >> ((ulong)bVar7 & 0x3f) & 1) == 0)) break; local_58 = local_58 + 1; } if (param_2 != (long *)0x0) { *local_50 = lVar5; local_50[1] = *(long *)(lVar5 + 0x30); local_50[2] = 0; puVar11 = (int8 *)(*(long *)(lVar5 + 0x30) + 0x10); if (*(long *)(lVar5 + 0x30) == 0) { puVar11 = (int8 *)(lVar5 + 0x28); } *puVar11 = local_50; *(long **)(lVar5 + 0x30) = local_50; bVar7 = *local_58; } if (bVar7 == 0x5d) goto LAB_0011b854; local_58 = local_58 + 1; pbVar14 = local_58; if (bVar7 != 0x2c) break; while (((ulong)*local_58 < 0x21 && ((0x100002600U >> ((ulong)*local_58 & 0x3f) & 1) != 0))) { local_58 = local_58 + 1; } cVar3 = parse_value(&local_58,pplVar12); pbVar14 = local_58; } while (cVar3 != '\0'); } LAB_0011b9ad: local_58 = pbVar14; json_delete(lVar5); goto LAB_0011b9b5; } if (bVar7 == 0x66) { pbVar14 = pbVar6 + 5; lVar5 = 0; do { if (lVar5 == 5) { if (param_2 != (long *)0x0) { lVar5 = mknode(1); *(int1 *)(lVar5 + 0x28) = 0; LAB_0011b730: *param_2 = lVar5; } LAB_0011b733: *param_1 = (long)pbVar14; goto LAB_0011b862; } pbVar1 = pbVar6 + lVar5; pbVar2 = (byte *)("false" + lVar5); lVar5 = lVar5 + 1; } while (*pbVar1 == *pbVar2); goto LAB_0011b9b5; } LAB_0011b64d: if (param_2 == (long *)0x0) { ppbVar10 = (byte **)0x0; } uVar4 = parse_number(&local_48,ppbVar10); uVar8 = (ulong)uVar4; if ((char)uVar4 == '\0') goto LAB_0011b9b7; if (param_2 != (long *)0x0) { local_40 = local_58; lVar5 = mknode(3); *(byte **)(lVar5 + 0x28) = local_40; goto LAB_0011b690; } } *param_1 = (long)local_48; } else { if (bVar7 == 0x6e) { pbVar14 = pbVar6 + 4; lVar5 = 0; do { if (lVar5 == 4) { if (param_2 == (long *)0x0) goto LAB_0011b733; lVar5 = mknode(0); goto LAB_0011b730; } pbVar1 = pbVar6 + lVar5; pbVar2 = &DAT_0015f7a7 + lVar5; lVar5 = lVar5 + 1; } while (*pbVar1 == *pbVar2); } else { if (bVar7 == 0x7b) { if (param_2 == (long *)0x0) { lVar5 = 0; local_58 = pbVar6; } else { lVar5 = mknode(5); local_58 = pbVar6; pbVar14 = pbVar6 + 1; if (*pbVar6 != 0x7b) goto LAB_0011b9ad; } do { local_58 = local_58 + 1; bVar7 = *local_58; if (0x20 < (ulong)bVar7) break; } while ((0x100002600U >> ((ulong)bVar7 & 0x3f) & 1) != 0); if (bVar7 == 0x7d) goto LAB_0011b854; pplVar12 = &local_50; if (param_2 == (long *)0x0) { pplVar12 = (long **)0x0; } cVar3 = parse_string(&local_58,pplVar12); pbVar14 = local_58; if (cVar3 != '\0') { pplVar13 = &local_38; if (param_2 == (long *)0x0) { pplVar13 = (long **)0x0; } local_40 = (byte *)(lVar5 + 0x28); LAB_0011b8a2: do { pbVar6 = local_58 + 1; bVar7 = *local_58; local_58 = pbVar6; if ((ulong)bVar7 < 0x21) { if ((0x100002600U >> ((ulong)bVar7 & 0x3f) & 1) != 0) goto LAB_0011b8a2; } if (bVar7 != 0x3a) { LAB_0011b987: pbVar14 = local_58; if (local_50 != (long *)0x0 && param_2 != (long *)0x0) { free(local_50); local_50 = (long *)0x0; pbVar14 = local_58; } break; } while (((ulong)*pbVar6 < 0x21 && ((0x100002600U >> ((ulong)*pbVar6 & 0x3f) & 1) != 0))) { pbVar6 = pbVar6 + 1; } local_58 = pbVar6; cVar3 = parse_value(&local_58,pplVar13); if (cVar3 == '\0') goto LAB_0011b987; while( true ) { bVar7 = *local_58; if ((0x20 < (ulong)bVar7) || ((0x100002600U >> ((ulong)bVar7 & 0x3f) & 1) == 0)) break; local_58 = local_58 + 1; } if (param_2 != (long *)0x0) { local_38[3] = (long)local_50; *local_38 = lVar5; local_38[1] = *(long *)(lVar5 + 0x30); local_38[2] = 0; pbVar6 = (byte *)(*(long *)(lVar5 + 0x30) + 0x10); if (*(long *)(lVar5 + 0x30) == 0) { pbVar6 = local_40; } *(long **)pbVar6 = local_38; *(long **)(lVar5 + 0x30) = local_38; bVar7 = *local_58; } if (bVar7 == 0x7d) goto LAB_0011b854; local_58 = local_58 + 1; pbVar14 = local_58; if (bVar7 != 0x2c) break; while (((ulong)*local_58 < 0x21 && ((0x100002600U >> ((ulong)*local_58 & 0x3f) & 1) != 0))) { local_58 = local_58 + 1; } cVar3 = parse_string(&local_58,pplVar12); pbVar14 = local_58; if (cVar3 == '\0') break; } while( true ); } goto LAB_0011b9ad; } if (bVar7 != 0x74) goto LAB_0011b64d; pbVar14 = pbVar6 + 4; lVar5 = 0; do { if (lVar5 == 4) { if (param_2 == (long *)0x0) goto LAB_0011b733; lVar5 = mknode(1); *(int1 *)(lVar5 + 0x28) = 1; goto LAB_0011b730; } pbVar1 = pbVar6 + lVar5; pbVar2 = &DAT_0015f7b2 + lVar5; lVar5 = lVar5 + 1; } while (*pbVar1 == *pbVar2); } LAB_0011b9b5: uVar8 = 0; } LAB_0011b9b7: return uVar8 & 0xffffffff; }
45,355
maria_rtree_set_key_mbr
eloqsql/storage/maria/ma_rt_key.c
int maria_rtree_set_key_mbr(MARIA_HA *info, MARIA_KEY *key, my_off_t child_page) { MARIA_PAGE page; DBUG_ENTER("maria_rtree_set_key_mbr"); if (_ma_fetch_keypage(&page, info, key->keyinfo, child_page, PAGECACHE_LOCK_LEFT_UNLOCKED, DFLT_INIT_HITS, info->buff, 0)) DBUG_RETURN(-1); DBUG_RETURN(maria_rtree_page_mbr(key->keyinfo->seg, &page, key->data, key->data_length)); }
O3
c
maria_rtree_set_key_mbr: pushq %rbp movq %rsp, %rbp pushq %rbx subq $0x38, %rsp movq %rdx, %rcx movq %rsi, %rbx movq %rdi, %rsi movq 0x8(%rbx), %rdx leaq -0x40(%rbp), %rdi xorl %r8d, %r8d movl $0x3, %r9d pushq $0x0 pushq 0x378(%rsi) callq 0x58ed6 addq $0x10, %rsp movl %eax, %ecx movl $0xffffffff, %eax # imm = 0xFFFFFFFF testb %cl, %cl jne 0x6cffc movq (%rbx), %rdx movq 0x8(%rbx), %rax movq 0xc0(%rax), %rdi movl 0x10(%rbx), %ecx leaq -0x40(%rbp), %rsi callq 0x6f3a6 addq $0x38, %rsp popq %rbx popq %rbp retq nop
maria_rtree_set_key_mbr: push rbp mov rbp, rsp push rbx sub rsp, 38h mov rcx, rdx mov rbx, rsi mov rsi, rdi mov rdx, [rbx+8] lea rdi, [rbp+var_40] xor r8d, r8d mov r9d, 3 push 0 push qword ptr [rsi+378h] call _ma_fetch_keypage add rsp, 10h mov ecx, eax mov eax, 0FFFFFFFFh test cl, cl jnz short loc_6CFFC mov rdx, [rbx] mov rax, [rbx+8] mov rdi, [rax+0C0h] mov ecx, [rbx+10h] lea rsi, [rbp+var_40] call maria_rtree_page_mbr loc_6CFFC: add rsp, 38h pop rbx pop rbp retn
long long maria_rtree_set_key_mbr(long long a1, long long a2, unsigned long long a3) { char keypage; // cl long long result; // rax _BYTE v5[64]; // [rsp+0h] [rbp-40h] BYREF keypage = ma_fetch_keypage((long long)v5, a1, *(_QWORD *)(a2 + 8), a3, 0, 3, *(_QWORD *)(a1 + 888)); result = 0xFFFFFFFFLL; if ( !keypage ) return maria_rtree_page_mbr(*(_QWORD *)(*(_QWORD *)(a2 + 8) + 192LL), v5, *(_QWORD *)a2, *(unsigned int *)(a2 + 16)); return result; }
maria_rtree_set_key_mbr: PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x38 MOV RCX,RDX MOV RBX,RSI MOV RSI,RDI MOV RDX,qword ptr [RBX + 0x8] LEA RDI,[RBP + -0x40] XOR R8D,R8D MOV R9D,0x3 PUSH 0x0 PUSH qword ptr [RSI + 0x378] CALL 0x00158ed6 ADD RSP,0x10 MOV ECX,EAX MOV EAX,0xffffffff TEST CL,CL JNZ 0x0016cffc MOV RDX,qword ptr [RBX] MOV RAX,qword ptr [RBX + 0x8] MOV RDI,qword ptr [RAX + 0xc0] MOV ECX,dword ptr [RBX + 0x10] LEA RSI,[RBP + -0x40] CALL 0x0016f3a6 LAB_0016cffc: ADD RSP,0x38 POP RBX POP RBP RET
int8 maria_rtree_set_key_mbr(long param_1,int8 *param_2,int8 param_3) { char cVar1; int8 uVar2; int1 local_48 [56]; cVar1 = _ma_fetch_keypage(local_48,param_1,param_2[1],param_3,0,3,*(int8 *)(param_1 + 0x378) ,0); uVar2 = 0xffffffff; if (cVar1 == '\0') { uVar2 = maria_rtree_page_mbr (*(int8 *)(param_2[1] + 0xc0),local_48,*param_2, *(int4 *)(param_2 + 2)); } return uVar2; }
45,356
print_defaults
eloqsql/mysys/my_default.c
void print_defaults(const char *conf_file, const char **groups) { const char **groups_save= groups; my_print_default_files(conf_file); fputs("The following groups are read:",stdout); for ( ; *groups ; groups++) { fputc(' ',stdout); fputs(*groups,stdout); } if (my_defaults_group_suffix) { groups= groups_save; for ( ; *groups ; groups++) { fputc(' ',stdout); fputs(*groups,stdout); fputs(my_defaults_group_suffix,stdout); } } puts("\nThe following options may be given as the first argument:\n\ --print-defaults Print the program argument list and exit.\n\ --no-defaults Don't read default options from any option file.\n\ The following specify which files/extra groups are read (specified before remaining options):\n\ --defaults-file=# Only read default options from the given file #.\n\ --defaults-extra-file=# Read this file after the global files are read.\n\ --defaults-group-suffix=# Additionally read default groups with # appended as a suffix."); }
O0
c
print_defaults: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rdi callq 0x2f9f0 movq 0x1a52c8(%rip), %rax # 0x1d4fc0 movq (%rax), %rsi leaq 0x50550(%rip), %rdi # 0x80252 callq 0x24350 movq -0x10(%rbp), %rax cmpq $0x0, (%rax) je 0x2fd49 movq 0x1a52a8(%rip), %rax # 0x1d4fc0 movq (%rax), %rsi movl $0x20, %edi callq 0x243f0 movq -0x10(%rbp), %rax movq (%rax), %rdi movq 0x1a528d(%rip), %rax # 0x1d4fc0 movq (%rax), %rsi callq 0x24350 movq -0x10(%rbp), %rax addq $0x8, %rax movq %rax, -0x10(%rbp) jmp 0x2fd07 leaq 0x365a70(%rip), %rax # 0x3957c0 cmpq $0x0, (%rax) je 0x2fdbb movq -0x18(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, (%rax) je 0x2fdb9 movq 0x1a5251(%rip), %rax # 0x1d4fc0 movq (%rax), %rsi movl $0x20, %edi callq 0x243f0 movq -0x10(%rbp), %rax movq (%rax), %rdi movq 0x1a5236(%rip), %rax # 0x1d4fc0 movq (%rax), %rsi callq 0x24350 leaq 0x365a27(%rip), %rax # 0x3957c0 movq (%rax), %rdi movq 0x1a521d(%rip), %rax # 0x1d4fc0 movq (%rax), %rsi callq 0x24350 movq -0x10(%rbp), %rax addq $0x8, %rax movq %rax, -0x10(%rbp) jmp 0x2fd5e jmp 0x2fdbb leaq 0x504af(%rip), %rdi # 0x80271 callq 0x24550 addq $0x20, %rsp popq %rbp retq nopl (%rax)
print_defaults: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov [rbp+var_18], rax mov rdi, [rbp+var_8] call my_print_default_files mov rax, cs:stdout_ptr mov rsi, [rax] lea rdi, aTheFollowingGr; "The following groups are read:" call _fputs loc_2FD07: mov rax, [rbp+var_10] cmp qword ptr [rax], 0 jz short loc_2FD49 mov rax, cs:stdout_ptr mov rsi, [rax] mov edi, 20h ; ' ' call _fputc mov rax, [rbp+var_10] mov rdi, [rax] mov rax, cs:stdout_ptr mov rsi, [rax] call _fputs mov rax, [rbp+var_10] add rax, 8 mov [rbp+var_10], rax jmp short loc_2FD07 loc_2FD49: lea rax, my_defaults_group_suffix cmp qword ptr [rax], 0 jz short loc_2FDBB mov rax, [rbp+var_18] mov [rbp+var_10], rax loc_2FD5E: mov rax, [rbp+var_10] cmp qword ptr [rax], 0 jz short loc_2FDB9 mov rax, cs:stdout_ptr mov rsi, [rax] mov edi, 20h ; ' ' call _fputc mov rax, [rbp+var_10] mov rdi, [rax] mov rax, cs:stdout_ptr mov rsi, [rax] call _fputs lea rax, my_defaults_group_suffix mov rdi, [rax] mov rax, cs:stdout_ptr mov rsi, [rax] call _fputs mov rax, [rbp+var_10] add rax, 8 mov [rbp+var_10], rax jmp short loc_2FD5E loc_2FDB9: jmp short $+2 loc_2FDBB: lea rdi, aTheFollowingOp; "\nThe following options may be given as"... call _puts add rsp, 20h pop rbp retn
long long print_defaults(long long a1, _QWORD *a2) { _QWORD *v3; // [rsp+10h] [rbp-10h] _QWORD *i; // [rsp+10h] [rbp-10h] v3 = a2; my_print_default_files(a1); fputs("The following groups are read:", stdout); while ( *v3 ) { fputc(32LL, stdout); fputs(*v3++, stdout); } if ( my_defaults_group_suffix ) { for ( i = a2; *i; ++i ) { fputc(32LL, stdout); fputs(*i, stdout); fputs(my_defaults_group_suffix, stdout); } } return puts( "\n" "The following options may be given as the first argument:\n" "--print-defaults Print the program argument list and exit.\n" "--no-defaults Don't read default options from any option file.\n" "The following specify which files/extra groups are read (specified before remaining options):\n" "--defaults-file=# Only read default options from the given file #.\n" "--defaults-extra-file=# Read this file after the global files are read.\n" "--defaults-group-suffix=# Additionally read default groups with # appended as a suffix."); }
print_defaults: 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 + -0x10] MOV qword ptr [RBP + -0x18],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012f9f0 MOV RAX,qword ptr [0x002d4fc0] MOV RSI,qword ptr [RAX] LEA RDI,[0x180252] CALL 0x00124350 LAB_0012fd07: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX],0x0 JZ 0x0012fd49 MOV RAX,qword ptr [0x002d4fc0] MOV RSI,qword ptr [RAX] MOV EDI,0x20 CALL 0x001243f0 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [0x002d4fc0] MOV RSI,qword ptr [RAX] CALL 0x00124350 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x8 MOV qword ptr [RBP + -0x10],RAX JMP 0x0012fd07 LAB_0012fd49: LEA RAX,[0x4957c0] CMP qword ptr [RAX],0x0 JZ 0x0012fdbb MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x10],RAX LAB_0012fd5e: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX],0x0 JZ 0x0012fdb9 MOV RAX,qword ptr [0x002d4fc0] MOV RSI,qword ptr [RAX] MOV EDI,0x20 CALL 0x001243f0 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [0x002d4fc0] MOV RSI,qword ptr [RAX] CALL 0x00124350 LEA RAX,[0x4957c0] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [0x002d4fc0] MOV RSI,qword ptr [RAX] CALL 0x00124350 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x8 MOV qword ptr [RBP + -0x10],RAX JMP 0x0012fd5e LAB_0012fdb9: JMP 0x0012fdbb LAB_0012fdbb: LEA RDI,[0x180271] CALL 0x00124550 ADD RSP,0x20 POP RBP RET
void print_defaults(int8 param_1,long *param_2) { long *local_18; my_print_default_files(param_1); fputs("The following groups are read:",*(FILE **)PTR_stdout_002d4fc0); for (local_18 = param_2; *local_18 != 0; local_18 = local_18 + 1) { fputc(0x20,*(FILE **)PTR_stdout_002d4fc0); fputs((char *)*local_18,*(FILE **)PTR_stdout_002d4fc0); } local_18 = param_2; if (my_defaults_group_suffix != (char *)0x0) { for (; *local_18 != 0; local_18 = local_18 + 1) { fputc(0x20,*(FILE **)PTR_stdout_002d4fc0); fputs((char *)*local_18,*(FILE **)PTR_stdout_002d4fc0); fputs(my_defaults_group_suffix,*(FILE **)PTR_stdout_002d4fc0); } } puts( "\nThe following options may be given as the first argument:\n--print-defaults Print the program argument list and exit.\n--no-defaults Don\'t read default options from any option file.\nThe following specify which files/extra groups are read (specified before remaining options):\n--defaults-file=# Only read default options from the given file #.\n--defaults-extra-file=# Read this file after the global files are read.\n--defaults-group-suffix=# Additionally read default groups with # appended as a suffix." ); return; }
45,357
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::json_sax_dom_callback_parser(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool)
monkey531[P]llama/common/json.hpp
json_sax_dom_callback_parser(BasicJsonType& r, const parser_callback_t cb, const bool allow_exceptions_ = true) : root(r), callback(cb), allow_exceptions(allow_exceptions_) { keep_stack.push_back(true); }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::json_sax_dom_callback_parser(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %ecx, %ebp movq %rdi, %rbx movq %rsi, (%rdi) leaq 0x20(%rdi), %r14 leaq 0x80(%rdi), %r12 xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rdi) movups %xmm0, 0x18(%rdi) movups %xmm0, 0x28(%rdi) movups %xmm0, 0x38(%rdi) movups %xmm0, 0x48(%rdi) movups %xmm0, 0x58(%rdi) movups %xmm0, 0x68(%rdi) movb $0x0, 0x78(%rdi) movq %r12, %rdi movq %rdx, %rsi callq 0x57886 movb %bpl, 0xa0(%rbx) leaq 0xa8(%rbx), %r13 movb $0x9, 0xa8(%rbx) movq $0x0, 0xb0(%rbx) movq %r13, %rdi movl $0x1, %esi callq 0x57ee4 movq %r14, %rdi movl $0x1, %esi callq 0x5b570 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r15 movq %r13, %rdi xorl %esi, %esi callq 0x57ee4 movq %r13, %rdi callq 0x5d352 movq 0x90(%rbx), %rax testq %rax, %rax je 0x5927e movq %r12, %rdi movq %r12, %rsi movl $0x3, %edx callq *%rax jmp 0x5927e jmp 0x592a5 movq %rax, %r15 leaq 0x48(%rbx), %rdi callq 0x5b778 movq %r14, %rdi callq 0x5b778 leaq 0x8(%rbx), %rdi movq %rbx, %rsi callq 0x1b4ab movq %r15, %rdi callq 0x1afa0 jmp 0x592a5 movq %rax, %rdi callq 0x212e3 nop
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ERSF_St8functionIFbiNS1_13parse_event_tESH_EEb: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov ebp, ecx mov rbx, rdi mov [rdi], rsi lea r14, [rdi+20h] lea r12, [rdi+80h] xorps xmm0, xmm0 movups xmmword ptr [rdi+8], xmm0 movups xmmword ptr [rdi+18h], xmm0 movups xmmword ptr [rdi+28h], xmm0 movups xmmword ptr [rdi+38h], xmm0 movups xmmword ptr [rdi+48h], xmm0 movups xmmword ptr [rdi+58h], xmm0 movups xmmword ptr [rdi+68h], xmm0 mov byte ptr [rdi+78h], 0 mov rdi, r12 mov rsi, rdx call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)> const&) mov [rbx+0A0h], bpl lea r13, [rbx+0A8h] mov byte ptr [rbx+0A8h], 9 mov qword ptr [rbx+0B0h], 0 mov rdi, r13 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 call _ZNSt6vectorIbSaIbEE9push_backEb; std::vector<bool>::push_back(bool) add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r15, rax mov rdi, r13 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r13 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rax, [rbx+90h] test rax, rax jz short loc_5927E mov rdi, r12 mov rsi, r12 mov edx, 3 call rax jmp short loc_5927E jmp short loc_592A5 mov r15, rax loc_5927E: lea rdi, [rbx+48h] call _ZNSt13_Bvector_baseISaIbEE13_M_deallocateEv; std::_Bvector_base<std::allocator<bool>>::_M_deallocate(void) mov rdi, r14 call _ZNSt13_Bvector_baseISaIbEE13_M_deallocateEv; std::_Bvector_base<std::allocator<bool>>::_M_deallocate(void) lea rdi, [rbx+8] mov rsi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ERSF_St8functionIFbiNS1_13parse_event_tESH_EEb_cold_1; nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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>>::json_sax_dom_callback_parser(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::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)>,bool) [clone] mov rdi, r15 call __Unwind_Resume jmp short $+2 loc_592A5: mov rdi, rax call __clang_call_terminate
long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::json_sax_dom_callback_parser( long long a1, long long a2, long long a3, char a4) { *(_QWORD *)a1 = a2; *(_OWORD *)(a1 + 8) = 0LL; *(_OWORD *)(a1 + 24) = 0LL; *(_OWORD *)(a1 + 40) = 0LL; *(_OWORD *)(a1 + 56) = 0LL; *(_OWORD *)(a1 + 72) = 0LL; *(_OWORD *)(a1 + 88) = 0LL; *(_OWORD *)(a1 + 104) = 0LL; *(_BYTE *)(a1 + 120) = 0; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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> &)>::function( (_OWORD *)(a1 + 128), a3); *(_BYTE *)(a1 + 160) = a4; *(_BYTE *)(a1 + 168) = 9; *(_QWORD *)(a1 + 176) = 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 + 168)); return std::vector<bool>::push_back(a1 + 32, 1LL); }
json_sax_dom_callback_parser: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV EBP,ECX MOV RBX,RDI MOV qword ptr [RDI],RSI LEA R14,[RDI + 0x20] LEA R12,[RDI + 0x80] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x8],XMM0 MOVUPS xmmword ptr [RDI + 0x18],XMM0 MOVUPS xmmword ptr [RDI + 0x28],XMM0 MOVUPS xmmword ptr [RDI + 0x38],XMM0 MOVUPS xmmword ptr [RDI + 0x48],XMM0 MOVUPS xmmword ptr [RDI + 0x58],XMM0 MOVUPS xmmword ptr [RDI + 0x68],XMM0 MOV byte ptr [RDI + 0x78],0x0 LAB_001591f5: MOV RDI,R12 MOV RSI,RDX CALL 0x00157886 MOV byte ptr [RBX + 0xa0],BPL LEA R13,[RBX + 0xa8] MOV byte ptr [RBX + 0xa8],0x9 MOV qword ptr [RBX + 0xb0],0x0 MOV RDI,R13 MOV ESI,0x1 CALL 0x00157ee4 LAB_0015922d: MOV RDI,R14 MOV ESI,0x1 CALL 0x0015b570 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::json_sax_dom_callback_parser(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&)>, bool) */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::json_sax_dom_callback_parser (json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,int8 param_1,function *param_3, json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> param_4) { *(int8 *)this = param_1; *(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; *(int8 *)(this + 0x50) = 0; *(int8 *)(this + 0x58) = 0; *(int8 *)(this + 0x60) = 0; *(int8 *)(this + 0x68) = 0; *(int8 *)(this + 0x70) = 0; this[0x78] = (json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> )0x0; /* try { // try from 001591f5 to 001591ff has its CatchHandler @ 0015927b */ std:: function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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>&)> ::function((function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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 + 0x80),param_3); this[0xa0] = param_4; this[0xa8] = (json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> )0x9; *(int8 *)(this + 0xb0) = 0; 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 + -0x58)); /* try { // try from 0015922d to 00159239 has its CatchHandler @ 00159249 */ std::vector<bool,std::allocator<bool>>::push_back ((vector<bool,std::allocator<bool>> *)(this + 0x20),true); return; }
45,358
google::protobuf::compiler::php::(anonymous namespace)::GenerateField(google::protobuf::FieldDescriptor const*, google::protobuf::io::Printer*, google::protobuf::compiler::php::Options const&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/php/php_generator.cc
void GenerateField(const FieldDescriptor* field, io::Printer* printer, const Options& options) { if (field->is_repeated()) { GenerateFieldDocComment(printer, field, options, kFieldProperty); printer->Print( "private $^name^;\n", "name", field->name()); } else if (field->real_containing_oneof()) { // Oneof fields are handled by GenerateOneofField. return; } else { std::string initial_value = field->has_presence() ? "null" : DefaultForField(field); GenerateFieldDocComment(printer, field, options, kFieldProperty); printer->Print( "protected $^name^ = ^initial_value^;\n", "name", field->name(), "initial_value", initial_value); } }
O0
cpp
google::protobuf::compiler::php::(anonymous namespace)::GenerateField(google::protobuf::FieldDescriptor const*, google::protobuf::io::Printer*, google::protobuf::compiler::php::Options const&): subq $0x68, %rsp movq %rdi, 0x60(%rsp) movq %rsi, 0x58(%rsp) movq %rdx, 0x50(%rsp) movq 0x60(%rsp), %rdi callq 0x58050 testb $0x1, %al jne 0x978a3 jmp 0x978f0 movq 0x58(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x50(%rsp), %rdx movl $0x3, %ecx callq 0x9acd0 movq 0x58(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x60(%rsp), %rdi callq 0x58250 movq 0x10(%rsp), %rdi movq %rax, %rcx leaq 0x31b996(%rip), %rsi # 0x3b3275 leaq 0x31e2d7(%rip), %rdx # 0x3b5bbd callq 0xa0140 jmp 0x97a0f movq 0x60(%rsp), %rdi callq 0x586c0 cmpq $0x0, %rax je 0x97905 jmp 0x97a0f movq 0x60(%rsp), %rdi callq 0xa5350 movb $0x0, 0x2e(%rsp) testb $0x1, %al jne 0x9791a jmp 0x97948 leaq 0x2f(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x21a00 movq 0x8(%rsp), %rdx movb $0x1, 0x2e(%rsp) leaq 0x314fec(%rip), %rsi # 0x3ac926 leaq 0x30(%rsp), %rdi callq 0x21890 jmp 0x97946 jmp 0x9795b movq 0x60(%rsp), %rsi leaq 0x30(%rsp), %rdi callq 0x9b010 jmp 0x97959 jmp 0x9795b testb $0x1, 0x2e(%rsp) jne 0x97964 jmp 0x9796e leaq 0x2f(%rsp), %rdi callq 0x21cb0 movq 0x58(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x50(%rsp), %rdx movl $0x3, %ecx callq 0x9acd0 jmp 0x97989 movq 0x58(%rsp), %rax movq %rax, (%rsp) movq 0x60(%rsp), %rdi callq 0x58250 movq (%rsp), %rdi movq %rax, %rcx leaq 0x31b8dd(%rip), %rsi # 0x3b3287 leaq 0x31e20c(%rip), %rdx # 0x3b5bbd leaq 0x31b8f5(%rip), %r8 # 0x3b32ad leaq 0x30(%rsp), %r9 callq 0xa53e0 jmp 0x979c4 leaq 0x30(%rsp), %rdi callq 0x21cc8 jmp 0x97a0d movq %rax, %rcx movl %edx, %eax movq %rcx, 0x20(%rsp) movl %eax, 0x1c(%rsp) testb $0x1, 0x2e(%rsp) jne 0x979e7 jmp 0x979f1 leaq 0x2f(%rsp), %rdi callq 0x21cb0 jmp 0x97a14 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x20(%rsp) movl %eax, 0x1c(%rsp) leaq 0x30(%rsp), %rdi callq 0x21cc8 jmp 0x97a14 jmp 0x97a0f addq $0x68, %rsp retq movq 0x20(%rsp), %rdi callq 0x21700 nop
_ZN6google8protobuf8compiler3php12_GLOBAL__N_113GenerateFieldEPKNS0_15FieldDescriptorEPNS0_2io7PrinterERKNS2_7OptionsE: sub rsp, 68h mov [rsp+68h+var_8], rdi mov [rsp+68h+var_10], rsi mov [rsp+68h+var_18], rdx mov rdi, [rsp+68h+var_8]; this call _ZNK6google8protobuf15FieldDescriptor11is_repeatedEv; google::protobuf::FieldDescriptor::is_repeated(void) test al, 1 jnz short loc_978A3 jmp short loc_978F0 loc_978A3: mov rdi, [rsp+68h+var_10]; this mov rsi, [rsp+68h+var_8]; google::protobuf::io::Printer * mov rdx, [rsp+68h+var_18]; google::protobuf::FieldDescriptor * mov ecx, (offset dword_0+3); google::protobuf::compiler::php::Options * call _ZN6google8protobuf8compiler3php12_GLOBAL__N_123GenerateFieldDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorERKNS2_7OptionsEi; google::protobuf::compiler::php::`anonymous namespace'::GenerateFieldDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::php::Options const&,int) mov rax, [rsp+68h+var_10] mov [rsp+68h+var_58], rax mov rdi, [rsp+68h+var_8] call _ZNK6google8protobuf15FieldDescriptor4nameB5cxx11Ev; google::protobuf::FieldDescriptor::name(void) mov rdi, [rsp+68h+var_58] mov rcx, rax lea rsi, aPrivateName; "private $^name^;\n" lea rdx, aGoogleProtobuf_24+34h; "name" call _ZN6google8protobuf2io7Printer5PrintIJA5_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvPKcDpRKT_; google::protobuf::io::Printer::Print<char [5],std::string>(char const*,char [5],std::string const&) jmp loc_97A0F loc_978F0: mov rdi, [rsp+68h+var_8]; this call _ZNK6google8protobuf15FieldDescriptor21real_containing_oneofEv; google::protobuf::FieldDescriptor::real_containing_oneof(void) cmp rax, 0 jz short loc_97905 jmp loc_97A0F loc_97905: mov rdi, [rsp+68h+var_8]; this call _ZNK6google8protobuf15FieldDescriptor12has_presenceEv; google::protobuf::FieldDescriptor::has_presence(void) mov [rsp+68h+var_3A], 0 test al, 1 jnz short loc_9791A jmp short loc_97948 loc_9791A: lea rdi, [rsp+68h+var_39] mov [rsp+68h+var_60], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rsp+68h+var_60] mov [rsp+68h+var_3A], 1 lea rsi, aNull+5; "null" lea rdi, [rsp+68h+var_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&) jmp short $+2 loc_97946: jmp short loc_9795B loc_97948: mov rsi, [rsp+68h+var_8] lea rdi, [rsp+68h+var_38] call _ZN6google8protobuf8compiler3php12_GLOBAL__N_115DefaultForFieldB5cxx11EPKNS0_15FieldDescriptorE; google::protobuf::compiler::php::`anonymous namespace'::DefaultForField(google::protobuf::FieldDescriptor const*) jmp short $+2 loc_97959: jmp short $+2 loc_9795B: test [rsp+68h+var_3A], 1 jnz short loc_97964 jmp short loc_9796E loc_97964: lea rdi, [rsp+68h+var_39] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() loc_9796E: mov rdi, [rsp+68h+var_10]; this mov rsi, [rsp+68h+var_8]; google::protobuf::io::Printer * mov rdx, [rsp+68h+var_18]; google::protobuf::FieldDescriptor * mov ecx, (offset dword_0+3); google::protobuf::compiler::php::Options * call _ZN6google8protobuf8compiler3php12_GLOBAL__N_123GenerateFieldDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorERKNS2_7OptionsEi; google::protobuf::compiler::php::`anonymous namespace'::GenerateFieldDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::php::Options const&,int) jmp short $+2 loc_97989: mov rax, [rsp+68h+var_10] mov [rsp+68h+var_68], rax mov rdi, [rsp+68h+var_8] call _ZNK6google8protobuf15FieldDescriptor4nameB5cxx11Ev; google::protobuf::FieldDescriptor::name(void) mov rdi, [rsp+68h+var_68] mov rcx, rax lea rsi, aProtectedNameI; "protected $^name^ = ^initial_value^;\n" lea rdx, aGoogleProtobuf_24+34h; "name" lea r8, aInitialValue; "initial_value" lea r9, [rsp+68h+var_38] call _ZN6google8protobuf2io7Printer5PrintIJA5_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA14_cSA_EEEvPKcDpRKT_; google::protobuf::io::Printer::Print<char [5],std::string,char [14],std::string>(char const*,char [5],std::string,char [14],std::string const&) jmp short $+2 loc_979C4: lea rdi, [rsp+68h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_97A0D mov rcx, rax mov eax, edx mov [rsp+arg_18], rcx mov [rsp+arg_14], eax test [rsp+arg_26], 1 jnz short loc_979E7 jmp short loc_979F1 loc_979E7: lea rdi, [rsp+arg_27] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() loc_979F1: jmp short loc_97A14 mov rcx, rax mov eax, edx mov [rsp+arg_18], rcx mov [rsp+arg_14], eax lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_97A14 loc_97A0D: jmp short $+2 loc_97A0F: add rsp, 68h retn loc_97A14: mov rdi, [rsp+arg_18] call __Unwind_Resume
void google::protobuf::compiler::php::`anonymous namespace'::GenerateField( google::protobuf::compiler::php::_anonymous_namespace_ *this, const google::protobuf::FieldDescriptor *a2, google::protobuf::io::Printer *a3, const google::protobuf::compiler::php::Options *a4) { int v4; // r8d int v5; // eax int v6; // r8d int v7; // r9d int v8; // edx int v9; // ecx int v10; // r8d int v11; // r9d int v12; // r8d int v13; // eax int v14; // [rsp+0h] [rbp-68h] char *v15; // [rsp+8h] [rbp-60h] char v16; // [rsp+2Eh] [rbp-3Ah] char v17; // [rsp+2Fh] [rbp-39h] BYREF _BYTE v18[32]; // [rsp+30h] [rbp-38h] BYREF google::protobuf::FieldDescriptor *v19; // [rsp+50h] [rbp-18h] google::protobuf::compiler::php::_anonymous_namespace_ *v20; // [rsp+58h] [rbp-10h] google::protobuf::FieldDescriptor *v21; // [rsp+60h] [rbp-8h] v21 = this; v20 = a2; v19 = a3; if ( google::protobuf::FieldDescriptor::is_repeated(this) ) { google::protobuf::compiler::php::`anonymous namespace'::GenerateFieldDocComment( v20, v21, v19, (const google::protobuf::compiler::php::Options *)((char *)&dword_0 + 3), v4); v5 = google::protobuf::FieldDescriptor::name[abi:cxx11]((long long)v21); google::protobuf::io::Printer::Print<char [5],std::string>( (_DWORD)v20, (unsigned int)"private $^name^;\n", (unsigned int)"name", v5, v6, v7); } else if ( !google::protobuf::FieldDescriptor::real_containing_oneof(v21) ) { v16 = 0; if ( (google::protobuf::FieldDescriptor::has_presence(v21) & 1) != 0 ) { v15 = &v17; std::allocator<char>::allocator(&v17, a2); v16 = 1; std::string::basic_string(v18, "null", &v17); } else { google::protobuf::compiler::php::`anonymous namespace'::DefaultForField[abi:cxx11]( (unsigned int)v18, (_DWORD)v21, v8, v9, v10, v11); } if ( (v16 & 1) != 0 ) std::allocator<char>::~allocator(&v17); google::protobuf::compiler::php::`anonymous namespace'::GenerateFieldDocComment( v20, v21, v19, (const google::protobuf::compiler::php::Options *)((char *)&dword_0 + 3), v12); v14 = (int)v20; v13 = google::protobuf::FieldDescriptor::name[abi:cxx11]((long long)v21); google::protobuf::io::Printer::Print<char [5],std::string,char [14],std::string>( v14, (unsigned int)"protected $^name^ = ^initial_value^;\n", (unsigned int)"name", v13, (unsigned int)"initial_value", (unsigned int)v18, v14, (_DWORD)v15); std::string::~string(v18); } }
GenerateField: SUB RSP,0x68 MOV qword ptr [RSP + 0x60],RDI MOV qword ptr [RSP + 0x58],RSI MOV qword ptr [RSP + 0x50],RDX MOV RDI,qword ptr [RSP + 0x60] CALL 0x00158050 TEST AL,0x1 JNZ 0x001978a3 JMP 0x001978f0 LAB_001978a3: MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x50] MOV ECX,0x3 CALL 0x0019acd0 MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0x60] CALL 0x00158250 MOV RDI,qword ptr [RSP + 0x10] MOV RCX,RAX LEA RSI,[0x4b3275] LEA RDX,[0x4b5bbd] CALL 0x001a0140 JMP 0x00197a0f LAB_001978f0: MOV RDI,qword ptr [RSP + 0x60] CALL 0x001586c0 CMP RAX,0x0 JZ 0x00197905 JMP 0x00197a0f LAB_00197905: MOV RDI,qword ptr [RSP + 0x60] CALL 0x001a5350 MOV byte ptr [RSP + 0x2e],0x0 TEST AL,0x1 JNZ 0x0019791a JMP 0x00197948 LAB_0019791a: LEA RDI,[RSP + 0x2f] MOV qword ptr [RSP + 0x8],RDI CALL 0x00121a00 MOV RDX,qword ptr [RSP + 0x8] MOV byte ptr [RSP + 0x2e],0x1 LAB_00197933: LEA RSI,[0x4ac926] LEA RDI,[RSP + 0x30] CALL 0x00121890 JMP 0x00197946 LAB_00197946: JMP 0x0019795b LAB_00197948: MOV RSI,qword ptr [RSP + 0x60] LEA RDI,[RSP + 0x30] CALL 0x0019b010 JMP 0x00197959 LAB_00197959: JMP 0x0019795b LAB_0019795b: TEST byte ptr [RSP + 0x2e],0x1 JNZ 0x00197964 JMP 0x0019796e LAB_00197964: LEA RDI,[RSP + 0x2f] CALL 0x00121cb0 LAB_0019796e: MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x50] LAB_0019797d: MOV ECX,0x3 CALL 0x0019acd0 JMP 0x00197989 LAB_00197989: MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0x60] CALL 0x00158250 MOV RDI,qword ptr [RSP] MOV RCX,RAX LEA RSI,[0x4b3287] LEA RDX,[0x4b5bbd] LEA R8,[0x4b32ad] LEA R9,[RSP + 0x30] CALL 0x001a53e0 LAB_001979c2: JMP 0x001979c4 LAB_001979c4: LEA RDI,[RSP + 0x30] CALL 0x00121cc8 JMP 0x00197a0d LAB_00197a0d: JMP 0x00197a0f LAB_00197a0f: ADD RSP,0x68 RET
/* google::protobuf::compiler::php::(anonymous namespace)::GenerateField(google::protobuf::FieldDescriptor const*, google::protobuf::io::Printer*, google::protobuf::compiler::php::Options const&) */ void google::protobuf::compiler::php::(anonymous_namespace)::GenerateField (FieldDescriptor *param_1,Printer *param_2,Options *param_3) { Printer *pPVar1; ulong uVar2; long lVar3; string *psVar4; allocator local_39; string local_38 [32]; Options *local_18; Printer *local_10; FieldDescriptor *local_8; local_18 = param_3; local_10 = param_2; local_8 = param_1; uVar2 = FieldDescriptor::is_repeated(param_1); if ((uVar2 & 1) == 0) { lVar3 = FieldDescriptor::real_containing_oneof(local_8); if (lVar3 == 0) { uVar2 = FieldDescriptor::has_presence(local_8); if ((uVar2 & 1) == 0) { DefaultForField_abi_cxx11_((_anonymous_namespace_ *)local_38,local_8); } else { std::allocator<char>::allocator(); /* try { // try from 00197933 to 00197956 has its CatchHandler @ 001979d0 */ std::__cxx11::string::string(local_38,"null",&local_39); std::allocator<char>::~allocator((allocator<char> *)&local_39); } /* try { // try from 0019797d to 001979c1 has its CatchHandler @ 001979f3 */ GenerateFieldDocComment(local_10,local_8,local_18,3); pPVar1 = local_10; psVar4 = (string *)FieldDescriptor::name_abi_cxx11_(local_8); io::Printer::Print<char[5],std::__cxx11::string,char[14],std::__cxx11::string> (pPVar1,"protected $^name^ = ^initial_value^;\n","name",psVar4,"initial_value", local_38); std::__cxx11::string::~string(local_38); } } else { GenerateFieldDocComment(local_10,local_8,local_18,3); pPVar1 = local_10; psVar4 = (string *)FieldDescriptor::name_abi_cxx11_(local_8); io::Printer::Print<char[5],std::__cxx11::string>(pPVar1,"private $^name^;\n","name",psVar4); } return; }
45,359
http_get_header_line
bluesky950520[P]quickjs/quickjs-libc.c
static int http_get_header_line(FILE *f, char *buf, size_t buf_size, DynBuf *dbuf) { int c; char *p; p = buf; for(;;) { c = fgetc(f); if (c < 0) return -1; if ((p - buf) < buf_size - 1) *p++ = c; if (dbuf) dbuf_putc(dbuf, c); if (c == '\n') break; } *p = '\0'; return 0; }
O0
c
http_get_header_line: subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movq %rdx, 0x18(%rsp) movq %rcx, 0x10(%rsp) movq 0x20(%rsp), %rax movq %rax, (%rsp) movq 0x28(%rsp), %rdi callq 0xe390 movl %eax, 0xc(%rsp) cmpl $0x0, 0xc(%rsp) jge 0x16710 movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF jmp 0x16774 movq (%rsp), %rax movq 0x20(%rsp), %rcx subq %rcx, %rax movq 0x18(%rsp), %rcx subq $0x1, %rcx cmpq %rcx, %rax jae 0x16741 movl 0xc(%rsp), %eax movb %al, %cl movq (%rsp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, (%rsp) movb %cl, (%rax) cmpq $0x0, 0x10(%rsp) je 0x1675a movq 0x10(%rsp), %rdi movl 0xc(%rsp), %eax movzbl %al, %esi callq 0x1e6d0 cmpl $0xa, 0xc(%rsp) jne 0x16763 jmp 0x16765 jmp 0x166f1 movq (%rsp), %rax movb $0x0, (%rax) movl $0x0, 0x34(%rsp) movl 0x34(%rsp), %eax addq $0x38, %rsp retq nopl (%rax)
http_get_header_line: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_18], rsi mov [rsp+38h+var_20], rdx mov [rsp+38h+var_28], rcx mov rax, [rsp+38h+var_18] mov [rsp+38h+var_38], rax loc_166F1: mov rdi, [rsp+38h+var_10] call _fgetc mov [rsp+38h+var_2C], eax cmp [rsp+38h+var_2C], 0 jge short loc_16710 mov [rsp+38h+var_4], 0FFFFFFFFh jmp short loc_16774 loc_16710: mov rax, [rsp+38h+var_38] mov rcx, [rsp+38h+var_18] sub rax, rcx mov rcx, [rsp+38h+var_20] sub rcx, 1 cmp rax, rcx jnb short loc_16741 mov eax, [rsp+38h+var_2C] mov cl, al mov rax, [rsp+38h+var_38] mov rdx, rax add rdx, 1 mov [rsp+38h+var_38], rdx mov [rax], cl loc_16741: cmp [rsp+38h+var_28], 0 jz short loc_1675A mov rdi, [rsp+38h+var_28] mov eax, [rsp+38h+var_2C] movzx esi, al call dbuf_putc loc_1675A: cmp [rsp+38h+var_2C], 0Ah jnz short loc_16763 jmp short loc_16765 loc_16763: jmp short loc_166F1 loc_16765: mov rax, [rsp+38h+var_38] mov byte ptr [rax], 0 mov [rsp+38h+var_4], 0 loc_16774: mov eax, [rsp+38h+var_4] add rsp, 38h retn
long long http_get_header_line(long long a1, _BYTE *a2, long long a3, long long a4) { _BYTE *v4; // rax _BYTE *v6; // [rsp+0h] [rbp-38h] int v7; // [rsp+Ch] [rbp-2Ch] v6 = a2; do { v7 = fgetc(a1); if ( v7 < 0 ) return (unsigned int)-1; if ( v6 - a2 < (unsigned long long)(a3 - 1) ) { v4 = v6++; *v4 = v7; } if ( a4 ) dbuf_putc(a4, (unsigned __int8)v7); } while ( v7 != 10 ); *v6 = 0; return 0; }
http_get_header_line: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RDI MOV qword ptr [RSP + 0x20],RSI MOV qword ptr [RSP + 0x18],RDX MOV qword ptr [RSP + 0x10],RCX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP],RAX LAB_001166f1: MOV RDI,qword ptr [RSP + 0x28] CALL 0x0010e390 MOV dword ptr [RSP + 0xc],EAX CMP dword ptr [RSP + 0xc],0x0 JGE 0x00116710 MOV dword ptr [RSP + 0x34],0xffffffff JMP 0x00116774 LAB_00116710: MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x20] SUB RAX,RCX MOV RCX,qword ptr [RSP + 0x18] SUB RCX,0x1 CMP RAX,RCX JNC 0x00116741 MOV EAX,dword ptr [RSP + 0xc] MOV CL,AL MOV RAX,qword ptr [RSP] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RSP],RDX MOV byte ptr [RAX],CL LAB_00116741: CMP qword ptr [RSP + 0x10],0x0 JZ 0x0011675a MOV RDI,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RSP + 0xc] MOVZX ESI,AL CALL 0x0011e6d0 LAB_0011675a: CMP dword ptr [RSP + 0xc],0xa JNZ 0x00116763 JMP 0x00116765 LAB_00116763: JMP 0x001166f1 LAB_00116765: MOV RAX,qword ptr [RSP] MOV byte ptr [RAX],0x0 MOV dword ptr [RSP + 0x34],0x0 LAB_00116774: MOV EAX,dword ptr [RSP + 0x34] ADD RSP,0x38 RET
int4 http_get_header_line(FILE *param_1,int1 *param_2,long param_3,long param_4) { uint uVar1; int1 *local_38; local_38 = param_2; do { uVar1 = fgetc(param_1); if ((int)uVar1 < 0) { return 0xffffffff; } if ((ulong)((long)local_38 - (long)param_2) < param_3 - 1U) { *local_38 = (char)uVar1; local_38 = local_38 + 1; } if (param_4 != 0) { dbuf_putc(param_4,uVar1 & 0xff); } } while (uVar1 != 10); *local_38 = 0; return 0; }
45,360
http_get_header_line
bluesky950520[P]quickjs/quickjs-libc.c
static int http_get_header_line(FILE *f, char *buf, size_t buf_size, DynBuf *dbuf) { int c; char *p; p = buf; for(;;) { c = fgetc(f); if (c < 0) return -1; if ((p - buf) < buf_size - 1) *p++ = c; if (dbuf) dbuf_putc(dbuf, c); if (c == '\n') break; } *p = '\0'; return 0; }
O2
c
http_get_header_line: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %r12 pushq $-0x1 popq %rbx movq %rsi, %r13 movq %r12, %rdi callq 0xe3a0 testl %eax, %eax js 0x12b04 movl %eax, %ebp movq %r13, %rax subq %r15, %rax cmpq $0xffe, %rax # imm = 0xFFE ja 0x12ae7 movb %bpl, (%r13) incq %r13 testq %r14, %r14 je 0x12af8 movzbl %bpl, %esi movq %r14, %rdi callq 0x15d33 cmpl $0xa, %ebp jne 0x12ac4 movb $0x0, (%r13) xorl %ebx, %ebx movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
http_get_header_line: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rdx mov r15, rsi mov r12, rdi push 0FFFFFFFFFFFFFFFFh pop rbx mov r13, rsi loc_12AC4: mov rdi, r12 call _fgetc test eax, eax js short loc_12B04 mov ebp, eax mov rax, r13 sub rax, r15 cmp rax, 0FFEh ja short loc_12AE7 mov [r13+0], bpl inc r13 loc_12AE7: test r14, r14 jz short loc_12AF8 movzx esi, bpl mov rdi, r14 call dbuf_putc loc_12AF8: cmp ebp, 0Ah jnz short loc_12AC4 mov byte ptr [r13+0], 0 xor ebx, ebx loc_12B04: mov eax, ebx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long http_get_header_line(long long a1, _BYTE *a2, long long a3) { unsigned int v4; // ebx _BYTE *v5; // r13 int v6; // eax int v7; // ebp v4 = -1; v5 = a2; while ( 1 ) { v6 = fgetc(a1); if ( v6 < 0 ) break; v7 = v6; if ( (unsigned long long)(v5 - a2) <= 0xFFE ) *v5++ = v6; if ( a3 ) dbuf_putc(a3, (unsigned __int8)v6); if ( v7 == 10 ) { *v5 = 0; return 0; } } return v4; }
http_get_header_line: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDX MOV R15,RSI MOV R12,RDI PUSH -0x1 POP RBX MOV R13,RSI LAB_00112ac4: MOV RDI,R12 CALL 0x0010e3a0 TEST EAX,EAX JS 0x00112b04 MOV EBP,EAX MOV RAX,R13 SUB RAX,R15 CMP RAX,0xffe JA 0x00112ae7 MOV byte ptr [R13],BPL INC R13 LAB_00112ae7: TEST R14,R14 JZ 0x00112af8 MOVZX ESI,BPL MOV RDI,R14 CALL 0x00115d33 LAB_00112af8: CMP EBP,0xa JNZ 0x00112ac4 MOV byte ptr [R13],0x0 XOR EBX,EBX LAB_00112b04: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int4 http_get_header_line(FILE *param_1,int1 *param_2,long param_3) { uint uVar1; int1 *puVar2; puVar2 = param_2; do { uVar1 = fgetc(param_1); if ((int)uVar1 < 0) { return 0xffffffff; } if ((ulong)((long)puVar2 - (long)param_2) < 0xfff) { *puVar2 = (char)uVar1; puVar2 = puVar2 + 1; } if (param_3 != 0) { dbuf_putc(param_3,uVar1 & 0xff); } } while (uVar1 != 10); *puVar2 = 0; return 0; }
45,361
ftb_parse_query
eloqsql/storage/myisam/ft_boolean_search.c
static int _ftb_parse_query(FTB *ftb, uchar *query, uint len, struct st_mysql_ftparser *parser) { MYSQL_FTPARSER_PARAM *param; MY_FTB_PARAM ftb_param; DBUG_ENTER("_ftb_parse_query"); DBUG_ASSERT(parser); if (ftb->state != UNINITIALIZED) DBUG_RETURN(0); if (! (param= ftparser_call_initializer(ftb->info, ftb->keynr, 0))) DBUG_RETURN(1); ftb_param.ftb= ftb; ftb_param.depth= 0; ftb_param.ftbe= ftb->root; ftb_param.up_quot= 0; param->mysql_parse= ftb_parse_query_internal; param->mysql_add_word= ftb_query_add_word; param->mysql_ftparam= (void *)&ftb_param; param->cs= ftb->charset; param->doc= (char*) query; param->length= len; param->flags= 0; param->mode= MYSQL_FTPARSER_FULL_BOOLEAN_INFO; DBUG_RETURN(parser->parse(param)); }
O0
c
ftb_parse_query: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq %rcx, -0x28(%rbp) jmp 0x9e6b9 movq -0x10(%rbp), %rax cmpl $0x0, 0x348(%rax) je 0x9e6d4 jmp 0x9e6c8 movl $0x0, -0x4(%rbp) jmp 0x9e79e movq -0x10(%rbp), %rax movq 0x8(%rax), %rdi movq -0x10(%rbp), %rax movl 0x340(%rax), %esi xorl %edx, %edx callq 0xa2890 movq %rax, -0x30(%rbp) cmpq $0x0, %rax jne 0x9e705 jmp 0x9e6f9 movl $0x1, -0x4(%rbp) jmp 0x9e79e movq -0x10(%rbp), %rax movq %rax, -0x50(%rbp) movl $0x0, -0x38(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x48(%rbp) movq $0x0, -0x40(%rbp) movq -0x30(%rbp), %rax leaq 0x118d(%rip), %rcx # 0x9f8c0 movq %rcx, (%rax) movq -0x30(%rbp), %rax leaq 0x121f(%rip), %rcx # 0x9f960 movq %rcx, 0x8(%rax) movq -0x30(%rbp), %rax leaq -0x50(%rbp), %rcx movq %rcx, 0x18(%rax) movq -0x10(%rbp), %rax movq 0x10(%rax), %rcx movq -0x30(%rbp), %rax movq %rcx, 0x20(%rax) movq -0x18(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, 0x28(%rax) movl -0x1c(%rbp), %ecx movq -0x30(%rbp), %rax movl %ecx, 0x30(%rax) movq -0x30(%rbp), %rax movl $0x0, 0x34(%rax) movq -0x30(%rbp), %rax movl $0x2, 0x38(%rax) movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq -0x30(%rbp), %rdi callq *%rax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw (%rax,%rax)
_ftb_parse_query: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_28], rcx jmp short $+2 loc_9E6B9: mov rax, [rbp+var_10] cmp dword ptr [rax+348h], 0 jz short loc_9E6D4 jmp short $+2 loc_9E6C8: mov [rbp+var_4], 0 jmp loc_9E79E loc_9E6D4: mov rax, [rbp+var_10] mov rdi, [rax+8] mov rax, [rbp+var_10] mov esi, [rax+340h] xor edx, edx call ftparser_call_initializer mov [rbp+var_30], rax cmp rax, 0 jnz short loc_9E705 jmp short $+2 loc_9E6F9: mov [rbp+var_4], 1 jmp loc_9E79E loc_9E705: mov rax, [rbp+var_10] mov [rbp+var_50], rax mov [rbp+var_38], 0 mov rax, [rbp+var_10] mov rax, [rax+18h] mov [rbp+var_48], rax mov [rbp+var_40], 0 mov rax, [rbp+var_30] lea rcx, ftb_parse_query_internal mov [rax], rcx mov rax, [rbp+var_30] lea rcx, ftb_query_add_word mov [rax+8], rcx mov rax, [rbp+var_30] lea rcx, [rbp+var_50] mov [rax+18h], rcx mov rax, [rbp+var_10] mov rcx, [rax+10h] mov rax, [rbp+var_30] mov [rax+20h], rcx mov rcx, [rbp+var_18] mov rax, [rbp+var_30] mov [rax+28h], rcx mov ecx, [rbp+var_1C] mov rax, [rbp+var_30] mov [rax+30h], ecx mov rax, [rbp+var_30] mov dword ptr [rax+34h], 0 mov rax, [rbp+var_30] mov dword ptr [rax+38h], 2 mov rax, [rbp+var_28] mov rax, [rax+8] mov rdi, [rbp+var_30] call rax mov [rbp+var_4], eax loc_9E79E: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long ftb_parse_query(long long a1, long long a2, unsigned int a3, long long a4) { long long v4; // rsi long long v5; // rdx long long v6; // r8 long long v7; // r9 long long v8; // rcx long long v10; // [rsp+0h] [rbp-50h] BYREF long long v11; // [rsp+8h] [rbp-48h] long long v12; // [rsp+10h] [rbp-40h] int v13; // [rsp+18h] [rbp-38h] long long v14; // [rsp+20h] [rbp-30h] long long v15; // [rsp+28h] [rbp-28h] unsigned int v16; // [rsp+34h] [rbp-1Ch] long long v17; // [rsp+38h] [rbp-18h] long long v18; // [rsp+40h] [rbp-10h] v18 = a1; v17 = a2; v16 = a3; v15 = a4; if ( *(_DWORD *)(a1 + 840) ) { return 0; } else { v4 = *(unsigned int *)(v18 + 832); v14 = ftparser_call_initializer(*(_QWORD *)(v18 + 8), v4, 0LL); if ( v14 ) { v10 = v18; v13 = 0; v11 = *(_QWORD *)(v18 + 24); v12 = 0LL; *(_QWORD *)v14 = ftb_parse_query_internal; *(_QWORD *)(v14 + 8) = ftb_query_add_word; *(_QWORD *)(v14 + 24) = &v10; *(_QWORD *)(v14 + 32) = *(_QWORD *)(v18 + 16); *(_QWORD *)(v14 + 40) = v17; v8 = v16; *(_DWORD *)(v14 + 48) = v16; *(_DWORD *)(v14 + 52) = 0; *(_DWORD *)(v14 + 56) = 2; return (unsigned int)(*(long long ( **)(long long, long long, long long, long long, long long, long long, long long, long long, long long, int))(v15 + 8))( v14, v4, v5, v8, v6, v7, v10, v11, v12, v13); } else { return 1; } } }
_ftb_parse_query: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV qword ptr [RBP + -0x28],RCX JMP 0x0019e6b9 LAB_0019e6b9: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x348],0x0 JZ 0x0019e6d4 JMP 0x0019e6c8 LAB_0019e6c8: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0019e79e LAB_0019e6d4: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RAX + 0x340] XOR EDX,EDX CALL 0x001a2890 MOV qword ptr [RBP + -0x30],RAX CMP RAX,0x0 JNZ 0x0019e705 JMP 0x0019e6f9 LAB_0019e6f9: MOV dword ptr [RBP + -0x4],0x1 JMP 0x0019e79e LAB_0019e705: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x50],RAX MOV dword ptr [RBP + -0x38],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x48],RAX MOV qword ptr [RBP + -0x40],0x0 MOV RAX,qword ptr [RBP + -0x30] LEA RCX,[0x19f8c0] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x30] LEA RCX,[0x19f960] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x30] LEA RCX,[RBP + -0x50] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x20],RCX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x28],RCX MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x30],ECX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x34],0x0 MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x38],0x2 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RDI,qword ptr [RBP + -0x30] CALL RAX MOV dword ptr [RBP + -0x4],EAX LAB_0019e79e: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int4 _ftb_parse_query(long param_1,int8 param_2,int4 param_3,long param_4) { long local_58; int8 local_50; int8 local_48; int4 local_40; int8 *local_38; long local_30; int4 local_24; int8 local_20; long local_18; int4 local_c; if (*(int *)(param_1 + 0x348) == 0) { local_30 = param_4; local_24 = param_3; local_20 = param_2; local_18 = param_1; local_38 = (int8 *) ftparser_call_initializer (*(int8 *)(param_1 + 8),*(int4 *)(param_1 + 0x340),0); if (local_38 == (int8 *)0x0) { local_c = 1; } else { local_58 = local_18; local_40 = 0; local_50 = *(int8 *)(local_18 + 0x18); local_48 = 0; *local_38 = ftb_parse_query_internal; local_38[1] = ftb_query_add_word; local_38[3] = &local_58; local_38[4] = *(int8 *)(local_18 + 0x10); local_38[5] = local_20; *(int4 *)(local_38 + 6) = local_24; *(int4 *)((long)local_38 + 0x34) = 0; *(int4 *)(local_38 + 7) = 2; local_c = (**(code **)(local_30 + 8))(local_38); } } else { local_c = 0; } return local_c; }
45,362
LefDefParser::lefwLayerACTableEntries(int, double*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwLayerACTableEntries(int numEntries, double *entries) { int i; int j = 0; if (!lefwFile) return LEFW_UNINITIALIZED; if (lefwState != LEFW_LAYERACCURRENT) return LEFW_BAD_ORDER; if (numEntries <= 0) return LEFW_BAD_DATA; // tableEntries are required if (lefwWriteEncrypt) { encPrint(lefwFile, (char*) " TABLEENTRIES\n "); for (i = 0; i < numEntries; i++) { if (++j > lefwTableLen) { encPrint(lefwFile, (char*) "\n "); j = 1; } encPrint(lefwFile, (char*) "%.11g ", *entries++); } encPrint(lefwFile, (char*) ";\n"); } else { fprintf(lefwFile, " TABLEENTRIES\n "); for (i = 0; i < numEntries; i++) { if (++j > lefwTableLen) { fprintf(lefwFile, "\n "); j = 1; } fprintf(lefwFile, "%.11g ", *entries++); } fprintf(lefwFile, ";\n"); } lefwState = lefwOldState; // restore the previous state lefwLines++; return LEFW_OK; }
O3
cpp
LefDefParser::lefwLayerACTableEntries(int, double*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax leaq 0x77aa3(%rip), %r13 # 0x8d0f0 movq (%r13), %rcx testq %rcx, %rcx je 0x15702 leaq 0x77cdf(%rip), %rdx # 0x8d340 movl $0x2, %eax cmpl $0x1d, (%rdx) jne 0x157bf movl %edi, %ebp testl %edi, %edi jle 0x1570c movq %rsi, %rbx cmpb $0x1, 0x77d59(%rip) # 0x8d3dc jne 0x15716 leaq 0x45c3e(%rip), %rsi # 0x5b2ce movq %rcx, %rdi xorl %eax, %eax callq 0x55afd movl %ebp, %r12d leaq 0x45aa4(%rip), %r14 # 0x5b148 xorl %r15d, %r15d xorl %ebp, %ebp leaq 0x77d20(%rip), %rax # 0x8d3d0 cmpl (%rax), %ebp jge 0x156b8 incl %ebp jmp 0x156cf movq (%r13), %rdi leaq 0x45c1d(%rip), %rsi # 0x5b2e0 xorl %eax, %eax callq 0x55afd movl $0x1, %ebp movq (%r13), %rdi movsd (%rbx,%r15,8), %xmm0 movq %r14, %rsi movb $0x1, %al callq 0x55afd incq %r15 cmpl %r15d, %r12d jne 0x156a9 movq (%r13), %rdi leaq 0x4510b(%rip), %rsi # 0x5a801 xorl %eax, %eax callq 0x55afd jmp 0x157a2 movl $0x1, %eax jmp 0x157bf movl $0x3, %eax jmp 0x157bf leaq 0x45bb1(%rip), %rdi # 0x5b2ce movl $0x1b, %esi movl $0x1, %edx callq 0x23d0 movl %ebp, %ebp xorl %r12d, %r12d leaq 0x45a10(%rip), %r14 # 0x5b148 xorl %r15d, %r15d leaq 0x77c8e(%rip), %rax # 0x8d3d0 cmpl (%rax), %r15d jge 0x1574c incl %r15d jmp 0x1576c movq (%r13), %rcx movl $0x9, %esi movl $0x1, %edx leaq 0x45b7f(%rip), %rdi # 0x5b2e0 callq 0x23d0 movl $0x1, %r15d movq (%r13), %rdi movsd (%rbx,%r12,8), %xmm0 movq %r14, %rsi movb $0x1, %al callq 0x22e0 incq %r12 cmpl %r12d, %ebp jne 0x1573b movq (%r13), %rcx leaq 0x4506e(%rip), %rdi # 0x5a801 movl $0x2, %esi movl $0x1, %edx callq 0x23d0 leaq 0x77c23(%rip), %rax # 0x8d3cc movl (%rax), %eax leaq 0x77b8e(%rip), %rcx # 0x8d340 movl %eax, (%rcx) leaq 0x77b81(%rip), %rax # 0x8d33c incl (%rax) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN12LefDefParser23lefwLayerACTableEntriesEiPd: push rbp push r15 push r14 push r13 push r12 push rbx push rax lea r13, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rcx, [r13+0] test rcx, rcx jz loc_15702 lea rdx, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov eax, 2 cmp dword ptr [rdx], 1Dh jnz loc_157BF mov ebp, edi test edi, edi jle loc_1570C mov rbx, rsi cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt jnz loc_15716 lea rsi, aTableentries_0; " TABLEENTRIES\n " mov rdi, rcx xor eax, eax call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) mov r12d, ebp lea r14, aMinenclosedare_1+13h; "%.11g " xor r15d, r15d xor ebp, ebp loc_156A9: lea rax, _ZN12LefDefParser12lefwTableLenE; LefDefParser::lefwTableLen cmp ebp, [rax] jge short loc_156B8 inc ebp jmp short loc_156CF loc_156B8: mov rdi, [r13+0] lea rsi, aTableentries_0+12h; "\n " xor eax, eax call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) mov ebp, 1 loc_156CF: mov rdi, [r13+0] movsd xmm0, qword ptr [rbx+r15*8] mov rsi, r14 mov al, 1 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) inc r15 cmp r12d, r15d jnz short loc_156A9 mov rdi, [r13+0] lea rsi, aDividercharS+11h; ";\n" xor eax, eax call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp loc_157A2 loc_15702: mov eax, 1 jmp loc_157BF loc_1570C: mov eax, 3 jmp loc_157BF loc_15716: lea rdi, aTableentries_0; " TABLEENTRIES\n " mov esi, 1Bh mov edx, 1 call _fwrite mov ebp, ebp xor r12d, r12d lea r14, aMinenclosedare_1+13h; "%.11g " xor r15d, r15d loc_1573B: lea rax, _ZN12LefDefParser12lefwTableLenE; LefDefParser::lefwTableLen cmp r15d, [rax] jge short loc_1574C inc r15d jmp short loc_1576C loc_1574C: mov rcx, [r13+0] mov esi, 9 mov edx, 1 lea rdi, aTableentries_0+12h; "\n " call _fwrite mov r15d, 1 loc_1576C: mov rdi, [r13+0] movsd xmm0, qword ptr [rbx+r12*8] mov rsi, r14 mov al, 1 call _fprintf inc r12 cmp ebp, r12d jnz short loc_1573B mov rcx, [r13+0] lea rdi, aDividercharS+11h; ";\n" mov esi, 2 mov edx, 1 call _fwrite loc_157A2: lea rax, _ZN12LefDefParser12lefwOldStateE; LefDefParser::lefwOldState mov eax, [rax] lea rcx, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov [rcx], eax lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines inc dword ptr [rax] xor eax, eax loc_157BF: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long LefDefParser::lefwLayerACTableEntries( LefDefParser *this, long long a2, double *a3, long long a4, int a5, int a6) { long long result; // rax int v7; // edx int v8; // ecx int v9; // r8d int v10; // r9d long long v11; // r15 int v12; // ebp long long v13; // r12 int v14; // r15d if ( !*(_QWORD *)&LefDefParser::lefwFile ) return 1LL; result = 2LL; if ( LefDefParser::lefwState == 29 ) { if ( (int)this <= 0 ) { return 3LL; } else { if ( LefDefParser::lefwWriteEncrypt == 1 ) { LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)" TABLEENTRIES\n ", (unsigned int)&LefDefParser::lefwState, LefDefParser::lefwFile, a5, a6); v11 = 0LL; v12 = 0; do { if ( v12 >= LefDefParser::lefwTableLen ) { LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)"\n ", v7, v8, v9, v10); v12 = 1; } else { ++v12; } LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)"%.11g ", v7, v8, v9, v10); ++v11; } while ( (_DWORD)this != (_DWORD)v11 ); LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)";\n", v7, v8, v9, v10); } else { fwrite(" TABLEENTRIES\n ", 27LL, 1LL, *(_QWORD *)&LefDefParser::lefwFile); v13 = 0LL; v14 = 0; do { if ( v14 >= LefDefParser::lefwTableLen ) { fwrite("\n ", 9LL, 1LL, *(_QWORD *)&LefDefParser::lefwFile); v14 = 1; } else { ++v14; } fprintf(*(_QWORD *)&LefDefParser::lefwFile, "%.11g ", *(double *)(a2 + 8 * v13++)); } while ( (_DWORD)this != (_DWORD)v13 ); fwrite(";\n", 2LL, 1LL, *(_QWORD *)&LefDefParser::lefwFile); } LefDefParser::lefwState = LefDefParser::lefwOldState; ++LefDefParser::lefwLines; return 0LL; } } return result; }
lefwLayerACTableEntries: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX LEA R13,[0x18d0f0] MOV RCX,qword ptr [R13] TEST RCX,RCX JZ 0x00115702 LEA RDX,[0x18d340] MOV EAX,0x2 CMP dword ptr [RDX],0x1d JNZ 0x001157bf MOV EBP,EDI TEST EDI,EDI JLE 0x0011570c MOV RBX,RSI CMP byte ptr [0x0018d3dc],0x1 JNZ 0x00115716 LEA RSI,[0x15b2ce] MOV RDI,RCX XOR EAX,EAX CALL 0x00155afd MOV R12D,EBP LEA R14,[0x15b148] XOR R15D,R15D XOR EBP,EBP LAB_001156a9: LEA RAX,[0x18d3d0] CMP EBP,dword ptr [RAX] JGE 0x001156b8 INC EBP JMP 0x001156cf LAB_001156b8: MOV RDI,qword ptr [R13] LEA RSI,[0x15b2e0] XOR EAX,EAX CALL 0x00155afd MOV EBP,0x1 LAB_001156cf: MOV RDI,qword ptr [R13] MOVSD XMM0,qword ptr [RBX + R15*0x8] MOV RSI,R14 MOV AL,0x1 CALL 0x00155afd INC R15 CMP R12D,R15D JNZ 0x001156a9 MOV RDI,qword ptr [R13] LEA RSI,[0x15a801] XOR EAX,EAX CALL 0x00155afd JMP 0x001157a2 LAB_00115702: MOV EAX,0x1 JMP 0x001157bf LAB_0011570c: MOV EAX,0x3 JMP 0x001157bf LAB_00115716: LEA RDI,[0x15b2ce] MOV ESI,0x1b MOV EDX,0x1 CALL 0x001023d0 MOV EBP,EBP XOR R12D,R12D LEA R14,[0x15b148] XOR R15D,R15D LAB_0011573b: LEA RAX,[0x18d3d0] CMP R15D,dword ptr [RAX] JGE 0x0011574c INC R15D JMP 0x0011576c LAB_0011574c: MOV RCX,qword ptr [R13] MOV ESI,0x9 MOV EDX,0x1 LEA RDI,[0x15b2e0] CALL 0x001023d0 MOV R15D,0x1 LAB_0011576c: MOV RDI,qword ptr [R13] MOVSD XMM0,qword ptr [RBX + R12*0x8] MOV RSI,R14 MOV AL,0x1 CALL 0x001022e0 INC R12 CMP EBP,R12D JNZ 0x0011573b MOV RCX,qword ptr [R13] LEA RDI,[0x15a801] MOV ESI,0x2 MOV EDX,0x1 CALL 0x001023d0 LAB_001157a2: LEA RAX,[0x18d3cc] MOV EAX,dword ptr [RAX] LEA RCX,[0x18d340] MOV dword ptr [RCX],EAX LEA RAX,[0x18d33c] INC dword ptr [RAX] XOR EAX,EAX LAB_001157bf: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* LefDefParser::lefwLayerACTableEntries(int, double*) */ int8 LefDefParser::lefwLayerACTableEntries(int param_1,double *param_2) { int8 uVar1; int iVar2; long lVar3; if (lefwFile == (_IO_FILE *)0x0) { uVar1 = 1; } else { uVar1 = 2; if (lefwState == 0x1d) { if (param_1 < 1) { uVar1 = 3; } else { if (lefwWriteEncrypt == '\x01') { encPrint(lefwFile," TABLEENTRIES\n "); lVar3 = 0; iVar2 = 0; do { if (iVar2 < lefwTableLen) { iVar2 = iVar2 + 1; } else { encPrint(lefwFile,"\n "); iVar2 = 1; } encPrint(lefwFile,"%.11g ",param_2[lVar3]); lVar3 = lVar3 + 1; } while (param_1 != (int)lVar3); encPrint(lefwFile,";\n"); } else { fwrite(" TABLEENTRIES\n ",0x1b,1,lefwFile); lVar3 = 0; iVar2 = 0; do { if (iVar2 < lefwTableLen) { iVar2 = iVar2 + 1; } else { fwrite("\n ",9,1,lefwFile); iVar2 = 1; } fprintf(lefwFile,"%.11g ",param_2[lVar3]); lVar3 = lVar3 + 1; } while (param_1 != (int)lVar3); fwrite(";\n",2,1,lefwFile); } lefwState = lefwOldState; lefwLines = lefwLines + 1; uVar1 = 0; } } } return uVar1; }
45,363
minja::Value& 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::__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>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<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, minja::Value>>>::operator[]<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
llama.cpp/common/json.hpp
T & operator[](KeyType && key) { return emplace(std::forward<KeyType>(key), T{}).first->second; }
O3
cpp
minja::Value& 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::__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>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<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, minja::Value>>>::operator[]<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %rbx subq $0x50, %rsp movq %rsi, %rbx movq %rdi, %r15 leaq 0x40(%rsp), %r14 movq $0x0, 0x8(%r14) xorps %xmm0, %xmm0 movaps %xmm0, -0x40(%r14) movaps %xmm0, -0x30(%r14) movaps %xmm0, -0x20(%r14) movaps %xmm0, -0x10(%r14) movb $0x0, (%r14) movq %r14, %rdi movl $0x1, %esi callq 0x84776 movq %r14, %rdi movl $0x1, %esi callq 0x84776 movq %rsp, %rdx movq %r15, %rdi movq %rbx, %rsi callq 0xbce58 movq %rax, %rbx movq %r14, %rdi xorl %esi, %esi callq 0x84776 movq %r14, %rdi callq 0x88e90 leaq 0x38(%rsp), %rdi callq 0x6fdfa leaq 0x28(%rsp), %rdi callq 0x6fdfa leaq 0x18(%rsp), %r14 movq %r14, %rdi callq 0x6fdfa movq -0x10(%r14), %rdi testq %rdi, %rdi je 0xbcbe2 movq 0xa83db(%rip), %rax # 0x164f98 cmpb $0x0, (%rax) je 0xbcbcd movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0xbcbd7 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0xbcbe2 movq (%rdi), %rax callq *0x18(%rax) addq $0x10, %rbx movq %rbx, %rax addq $0x50, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq %rsp, %rdi callq 0xb57b8 movq %rbx, %rdi callq 0x21af0
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_: push r15 push r14 push rbx sub rsp, 50h mov rbx, rsi mov r15, rdi lea r14, [rsp+68h+var_28] mov qword ptr [r14+8], 0 xorps xmm0, xmm0 movaps xmmword ptr [r14-40h], xmm0 movaps xmmword ptr [r14-30h], xmm0 movaps xmmword ptr [r14-20h], xmm0 movaps xmmword ptr [r14-10h], xmm0 mov byte ptr [r14], 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 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 rdx, rsp mov rdi, r15 mov rsi, rbx call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_ mov rbx, rax mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea rdi, [rsp+68h+var_30] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+68h+var_40] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea r14, [rsp+68h+var_50] mov rdi, r14 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, [r14-10h] test rdi, rdi jz short loc_BCBE2 mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag cmp byte ptr [rax], 0 jz short loc_BCBCD mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_BCBD7 loc_BCBCD: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_BCBD7: cmp eax, 1 jnz short loc_BCBE2 mov rax, [rdi] call qword ptr [rax+18h] loc_BCBE2: add rbx, 10h mov rax, rbx add rsp, 50h pop rbx pop r14 pop r15 retn mov rbx, rax mov rdi, rsp; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() mov rdi, rbx call __Unwind_Resume
long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_( long long a1, long long a2) { long long v2; // rbx long long v3; // rdi signed __int32 v4; // eax __int128 v6; // [rsp+0h] [rbp-68h] BYREF __int128 v7; // [rsp+10h] [rbp-58h] BYREF __int128 v8; // [rsp+20h] [rbp-48h] BYREF __int128 v9; // [rsp+30h] [rbp-38h] BYREF char v10[8]; // [rsp+40h] [rbp-28h] BYREF long long v11; // [rsp+48h] [rbp-20h] v11 = 0LL; v6 = 0LL; v7 = 0LL; v8 = 0LL; v9 = 0LL; v10[0] = 0; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v10); 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(v10); v2 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_( a1, a2, &v6); 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(v10); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v10); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v9 + 1); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v8 + 1); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v7 + 1); v3 = *((_QWORD *)&v6 + 1); if ( *((_QWORD *)&v6 + 1) ) { if ( _libc_single_threaded ) { v4 = *(_DWORD *)(*((_QWORD *)&v6 + 1) + 12LL); *(_DWORD *)(*((_QWORD *)&v6 + 1) + 12LL) = v4 - 1; } else { v4 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v6 + 1) + 12LL), 0xFFFFFFFF); } if ( v4 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v3 + 24LL))(v3, 0LL); } return v2 + 16; }
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x50 MOV RBX,RSI MOV R15,RDI LEA R14,[RSP + 0x40] MOV qword ptr [R14 + 0x8],0x0 XORPS XMM0,XMM0 MOVAPS xmmword ptr [R14 + -0x40],XMM0 MOVAPS xmmword ptr [R14 + -0x30],XMM0 MOVAPS xmmword ptr [R14 + -0x20],XMM0 MOVAPS xmmword ptr [R14 + -0x10],XMM0 MOV byte ptr [R14],0x0 MOV RDI,R14 MOV ESI,0x1 CALL 0x00184776 MOV RDI,R14 MOV ESI,0x1 CALL 0x00184776 LAB_001bcb69: MOV RDX,RSP MOV RDI,R15 MOV RSI,RBX CALL 0x001bce58 LAB_001bcb77: MOV RBX,RAX MOV RDI,R14 XOR ESI,ESI CALL 0x00184776 MOV RDI,R14 CALL 0x00188e90 LEA RDI,[RSP + 0x38] CALL 0x0016fdfa LEA RDI,[RSP + 0x28] CALL 0x0016fdfa LEA R14,[RSP + 0x18] MOV RDI,R14 CALL 0x0016fdfa MOV RDI,qword ptr [R14 + -0x10] TEST RDI,RDI JZ 0x001bcbe2 MOV RAX,qword ptr [0x00264f98] CMP byte ptr [RAX],0x0 JZ 0x001bcbcd MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001bcbd7 LAB_001bcbcd: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001bcbd7: CMP EAX,0x1 JNZ 0x001bcbe2 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001bcbe2: ADD RBX,0x10 MOV RAX,RBX ADD RSP,0x50 POP RBX POP R14 POP R15 RET
long _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_ (int8 param_1,int8 param_2) { int *piVar1; int iVar2; long lVar3; bool bVar4; int8 local_68; long *plStack_60; int8 local_58; int8 uStack_50; int8 local_48; int8 uStack_40; int8 local_38; int8 uStack_30; data local_28 [8]; int8 local_20; local_20 = 0; local_68 = 0; plStack_60 = (long *)0x0; local_58 = 0; uStack_50 = 0; local_48 = 0; uStack_40 = 0; local_38 = 0; uStack_30 = 0; local_28[0] = (data)0x0; bVar4 = SUB81(local_28,0); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar4); 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(bVar4); /* try { // try from 001bcb69 to 001bcb76 has its CatchHandler @ 001bcbf3 */ lVar3 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_ (param_1,param_2,&local_68); 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(bVar4); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_28); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_30); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_40); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_50); if (plStack_60 != (long *)0x0) { if (*PTR___libc_single_threaded_00264f98 == '\0') { LOCK(); piVar1 = (int *)((long)plStack_60 + 0xc); iVar2 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar2 = *(int *)((long)plStack_60 + 0xc); *(int *)((long)plStack_60 + 0xc) = iVar2 + -1; } if (iVar2 == 1) { (**(code **)(*plStack_60 + 0x18))(); } } return lVar3 + 0x10; }
45,364
js_os_realpath
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_realpath(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { const char *path; char buf[PATH_MAX], *res; int err; path = JS_ToCString(ctx, argv[0]); if (!path) return JS_EXCEPTION; res = realpath(path, buf); JS_FreeCString(ctx, path); if (!res) { buf[0] = '\0'; err = errno; } else { err = 0; } return make_string_error(ctx, buf, err); }
O0
c
js_os_realpath: subq $0x1058, %rsp # imm = 0x1058 movq %rsi, 0x1038(%rsp) movq %rdx, 0x1040(%rsp) movq %rdi, 0x1030(%rsp) movl %ecx, 0x102c(%rsp) movq %r8, 0x1020(%rsp) movq 0x1030(%rsp), %rdi movq 0x1020(%rsp), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x147e0 movq %rax, 0x1018(%rsp) cmpq $0x0, 0x1018(%rsp) jne 0x1b486 movl $0x0, 0x1048(%rsp) movq $0x6, 0x1050(%rsp) jmp 0x1b4fa movq 0x1018(%rsp), %rdi leaq 0x10(%rsp), %rsi callq 0xe5a0 movq %rax, 0x8(%rsp) movq 0x1030(%rsp), %rdi movq 0x1018(%rsp), %rsi callq 0x29e50 cmpq $0x0, 0x8(%rsp) jne 0x1b4cc movb $0x0, 0x10(%rsp) callq 0xe0b0 movl (%rax), %eax movl %eax, 0x4(%rsp) jmp 0x1b4d4 movl $0x0, 0x4(%rsp) movq 0x1030(%rsp), %rdi leaq 0x10(%rsp), %rsi movl 0x4(%rsp), %edx callq 0x1cef0 movq %rax, 0x1048(%rsp) movq %rdx, 0x1050(%rsp) movq 0x1048(%rsp), %rax movq 0x1050(%rsp), %rdx addq $0x1058, %rsp # imm = 0x1058 retq nopw %cs:(%rax,%rax)
js_os_realpath: sub rsp, 1058h mov [rsp+1058h+var_20], rsi mov [rsp+1058h+var_18], rdx mov [rsp+1058h+var_28], rdi mov [rsp+1058h+var_2C], ecx mov [rsp+1058h+var_38], r8 mov rdi, [rsp+1058h+var_28] mov rax, [rsp+1058h+var_38] mov rsi, [rax] mov rdx, [rax+8] call JS_ToCString mov [rsp+1058h+var_40], rax cmp [rsp+1058h+var_40], 0 jnz short loc_1B486 mov dword ptr [rsp+1058h+var_10], 0 mov [rsp+1058h+var_8], 6 jmp short loc_1B4FA loc_1B486: mov rdi, [rsp+1058h+var_40] lea rsi, [rsp+1058h+var_1048] call _realpath mov [rsp+1058h+var_1050], rax mov rdi, [rsp+1058h+var_28] mov rsi, [rsp+1058h+var_40] call JS_FreeCString cmp [rsp+1058h+var_1050], 0 jnz short loc_1B4CC mov [rsp+1058h+var_1048], 0 call ___errno_location mov eax, [rax] mov [rsp+1058h+var_1054], eax jmp short loc_1B4D4 loc_1B4CC: mov [rsp+1058h+var_1054], 0 loc_1B4D4: mov rdi, [rsp+1058h+var_28] lea rsi, [rsp+1058h+var_1048] mov edx, [rsp+1058h+var_1054] call make_string_error mov [rsp+1058h+var_10], rax mov [rsp+1058h+var_8], rdx loc_1B4FA: mov rax, [rsp+1058h+var_10] mov rdx, [rsp+1058h+var_8] add rsp, 1058h retn
long long js_os_realpath(long long a1, long long a2, long long a3, int a4, long long *a5) { long long v5; // rdx long long v7; // [rsp+4h] [rbp-1054h] long long v8; // [rsp+8h] [rbp-1050h] _BYTE v9[4104]; // [rsp+10h] [rbp-1048h] BYREF long long v10; // [rsp+1018h] [rbp-40h] long long *v11; // [rsp+1020h] [rbp-38h] int v12; // [rsp+102Ch] [rbp-2Ch] long long v13; // [rsp+1030h] [rbp-28h] long long v14; // [rsp+1038h] [rbp-20h] long long v15; // [rsp+1040h] [rbp-18h] long long string_error; // [rsp+1048h] [rbp-10h] long long v17; // [rsp+1050h] [rbp-8h] v14 = a2; v15 = a3; v13 = a1; v12 = a4; v11 = a5; v10 = JS_ToCString(a1, *a5, a5[1]); if ( v10 ) { v8 = realpath(v10, v9); JS_FreeCString(v13, v10); if ( v8 ) { LODWORD(v7) = 0; } else { v9[0] = 0; v7 = *(unsigned int *)__errno_location(); } string_error = make_string_error(v13, v9, (unsigned int)v7); v17 = v5; } else { LODWORD(string_error) = 0; v17 = 6LL; } return string_error; }
js_os_realpath: SUB RSP,0x1058 MOV qword ptr [RSP + 0x1038],RSI MOV qword ptr [RSP + 0x1040],RDX MOV qword ptr [RSP + 0x1030],RDI MOV dword ptr [RSP + 0x102c],ECX MOV qword ptr [RSP + 0x1020],R8 MOV RDI,qword ptr [RSP + 0x1030] MOV RAX,qword ptr [RSP + 0x1020] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x001147e0 MOV qword ptr [RSP + 0x1018],RAX CMP qword ptr [RSP + 0x1018],0x0 JNZ 0x0011b486 MOV dword ptr [RSP + 0x1048],0x0 MOV qword ptr [RSP + 0x1050],0x6 JMP 0x0011b4fa LAB_0011b486: MOV RDI,qword ptr [RSP + 0x1018] LEA RSI,[RSP + 0x10] CALL 0x0010e5a0 MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x1030] MOV RSI,qword ptr [RSP + 0x1018] CALL 0x00129e50 CMP qword ptr [RSP + 0x8],0x0 JNZ 0x0011b4cc MOV byte ptr [RSP + 0x10],0x0 CALL 0x0010e0b0 MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x4],EAX JMP 0x0011b4d4 LAB_0011b4cc: MOV dword ptr [RSP + 0x4],0x0 LAB_0011b4d4: MOV RDI,qword ptr [RSP + 0x1030] LEA RSI,[RSP + 0x10] MOV EDX,dword ptr [RSP + 0x4] CALL 0x0011cef0 MOV qword ptr [RSP + 0x1048],RAX MOV qword ptr [RSP + 0x1050],RDX LAB_0011b4fa: MOV RAX,qword ptr [RSP + 0x1048] MOV RDX,qword ptr [RSP + 0x1050] ADD RSP,0x1058 RET
int1 [16] js_os_realpath(int8 param_1,int8 param_2,int8 param_3,int4 param_4, int8 *param_5) { char *pcVar1; int *piVar2; int1 auVar3 [16]; int local_1054; char local_1048 [4104]; char *local_40; int8 *local_38; int4 local_2c; int8 local_28; int8 local_20; int8 local_18; int4 local_10; int4 uStack_c; int8 local_8; local_38 = param_5; local_2c = param_4; local_28 = param_1; local_20 = param_2; local_18 = param_3; local_40 = (char *)JS_ToCString(param_1,*param_5,param_5[1]); if (local_40 == (char *)0x0) { local_10 = 0; local_8 = 6; } else { pcVar1 = realpath(local_40,local_1048); JS_FreeCString(local_28,local_40); if (pcVar1 == (char *)0x0) { local_1048[0] = '\0'; piVar2 = __errno_location(); local_1054 = *piVar2; } else { local_1054 = 0; } auVar3 = make_string_error(local_28,local_1048,local_1054); local_8 = auVar3._8_8_; local_10 = auVar3._0_4_; uStack_c = auVar3._4_4_; } auVar3._4_4_ = uStack_c; auVar3._0_4_ = local_10; auVar3._8_8_ = local_8; return auVar3; }
45,365
js_os_realpath
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_realpath(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { const char *path; char buf[PATH_MAX], *res; int err; path = JS_ToCString(ctx, argv[0]); if (!path) return JS_EXCEPTION; res = realpath(path, buf); JS_FreeCString(ctx, path); if (!res) { buf[0] = '\0'; err = errno; } else { err = 0; } return make_string_error(ctx, buf, err); }
O1
c
js_os_realpath: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x1008, %rsp # imm = 0x1008 movq %rdi, %r14 movq (%r8), %rdx movq 0x8(%r8), %rcx xorl %ebx, %ebx xorl %esi, %esi xorl %r8d, %r8d callq 0x20bf7 testq %rax, %rax je 0x19e72 movq %rax, %r15 movq %rsp, %rsi movq %rax, %rdi callq 0xe5a0 movq %rax, %r12 movq %r14, %rdi movq %r15, %rsi callq 0x20edd testq %r12, %r12 jne 0x19e60 movb $0x0, (%rsp) callq 0xe0b0 movl (%rax), %ebx movq %rsp, %rsi movq %r14, %rdi movl %ebx, %edx callq 0x1ab1b movq %rax, %rbx jmp 0x19e77 movl $0x6, %edx movq %rbx, %rax addq $0x1008, %rsp # imm = 0x1008 popq %rbx popq %r12 popq %r14 popq %r15 retq
js_os_realpath: push r15 push r14 push r12 push rbx sub rsp, 1008h mov r14, rdi mov rdx, [r8] mov rcx, [r8+8] xor ebx, ebx xor esi, esi xor r8d, r8d call JS_ToCStringLen2 test rax, rax jz short loc_19E72 mov r15, rax mov rsi, rsp mov rdi, rax call _realpath mov r12, rax mov rdi, r14 mov rsi, r15 call JS_FreeCString test r12, r12 jnz short loc_19E60 mov [rsp+1028h+var_1028], 0 call ___errno_location mov ebx, [rax] loc_19E60: mov rsi, rsp mov rdi, r14 mov edx, ebx call make_string_error mov rbx, rax jmp short loc_19E77 loc_19E72: mov edx, 6 loc_19E77: mov rax, rbx add rsp, 1008h pop rbx pop r12 pop r14 pop r15 retn
long long js_os_realpath(long long a1, long long a2, long long a3, long long a4, _QWORD *a5) { long long v5; // rbx long long v6; // rax long long v7; // r15 long long v8; // r12 _BYTE v10[4136]; // [rsp+0h] [rbp-1028h] BYREF v5 = 0LL; v6 = JS_ToCStringLen2(a1, 0LL, *a5, a5[1], 0LL); if ( v6 ) { v7 = v6; v8 = realpath(v6, v10); JS_FreeCString(a1, v7); if ( !v8 ) { v10[0] = 0; LODWORD(v5) = *(_DWORD *)__errno_location(a1); } return make_string_error(a1, v10, (unsigned int)v5); } return v5; }
js_os_realpath: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x1008 MOV R14,RDI MOV RDX,qword ptr [R8] MOV RCX,qword ptr [R8 + 0x8] XOR EBX,EBX XOR ESI,ESI XOR R8D,R8D CALL 0x00120bf7 TEST RAX,RAX JZ 0x00119e72 MOV R15,RAX MOV RSI,RSP MOV RDI,RAX CALL 0x0010e5a0 MOV R12,RAX MOV RDI,R14 MOV RSI,R15 CALL 0x00120edd TEST R12,R12 JNZ 0x00119e60 MOV byte ptr [RSP],0x0 CALL 0x0010e0b0 MOV EBX,dword ptr [RAX] LAB_00119e60: MOV RSI,RSP MOV RDI,R14 MOV EDX,EBX CALL 0x0011ab1b MOV RBX,RAX JMP 0x00119e77 LAB_00119e72: MOV EDX,0x6 LAB_00119e77: MOV RAX,RBX ADD RSP,0x1008 POP RBX POP R12 POP R14 POP R15 RET
ulong js_os_realpath(int8 param_1) { char *__name; char *pcVar1; uint *puVar2; ulong uVar3; int8 *in_R8; char local_1028 [4104]; uVar3 = 0; __name = (char *)JS_ToCStringLen2(param_1,0,*in_R8,in_R8[1],0); if (__name != (char *)0x0) { pcVar1 = realpath(__name,local_1028); JS_FreeCString(param_1,__name); if (pcVar1 == (char *)0x0) { local_1028[0] = '\0'; puVar2 = (uint *)__errno_location(); uVar3 = (ulong)*puVar2; } uVar3 = make_string_error(param_1,local_1028,uVar3); } return uVar3; }
45,366
spdlog::details::E_formatter<spdlog::details::scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&)
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/pattern_formatter-inl.h
void format(const details::log_msg &msg, const std::tm &, memory_buf_t &dest) override { const size_t field_size = 10; ScopedPadder p(field_size, padinfo_, dest); auto duration = msg.time.time_since_epoch(); auto seconds = std::chrono::duration_cast<std::chrono::seconds>(duration).count(); fmt_helper::append_int(seconds, dest); }
O0
c
spdlog::details::E_formatter<spdlog::details::scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&): subq $0x88, %rsp movq %rdi, 0x80(%rsp) movq %rsi, 0x78(%rsp) movq %rdx, 0x70(%rsp) movq %rcx, 0x68(%rsp) movq 0x80(%rsp), %rdx movq $0xa, 0x60(%rsp) addq $0x8, %rdx movq 0x68(%rsp), %rcx leaq 0x38(%rsp), %rdi movl $0xa, %esi callq 0x95af0 movq 0x78(%rsp), %rdi addq $0x18, %rdi callq 0x22090 movq %rax, 0x30(%rsp) leaq 0x30(%rsp), %rdi callq 0x7e060 movq %rax, 0x8(%rsp) jmp 0x9d7fb movq 0x8(%rsp), %rax movq %rax, 0x20(%rsp) leaq 0x20(%rsp), %rdi callq 0x86bc0 movq %rax, 0x28(%rsp) movq 0x28(%rsp), %rdi movq 0x68(%rsp), %rsi callq 0x9d860 jmp 0x9d825 leaq 0x38(%rsp), %rdi callq 0x95be0 addq $0x88, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x18(%rsp) movl %eax, 0x14(%rsp) leaq 0x38(%rsp), %rdi callq 0x95be0 movq 0x18(%rsp), %rdi callq 0x15dd0 nopl (%rax)
_ZN6spdlog7details11E_formatterINS0_13scoped_padderEE6formatERKNS0_7log_msgERK2tmRN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE: sub rsp, 88h mov [rsp+88h+var_8], rdi mov [rsp+88h+var_10], rsi mov [rsp+88h+var_18], rdx mov [rsp+88h+var_20], rcx mov rdx, [rsp+88h+var_8] mov [rsp+88h+var_28], 0Ah add rdx, 8 mov rcx, [rsp+88h+var_20] lea rdi, [rsp+88h+var_50] mov esi, 0Ah call _ZN6spdlog7details13scoped_padderC2EmRKNS0_12padding_infoERN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::scoped_padder::scoped_padder(ulong,spdlog::details::padding_info const&,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &) mov rdi, [rsp+88h+var_10] add rdi, 18h call _ZNKSt6chrono10time_pointINS_3_V212system_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEEE16time_since_epochEv; std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>::time_since_epoch(void) mov [rsp+88h+var_58], rax lea rdi, [rsp+88h+var_58] call _ZNSt6chrono13duration_castINS_8durationIlSt5ratioILl1ELl1EEEElS2_ILl1ELl1000000000EEEENSt9enable_ifIXsr13__is_durationIT_EE5valueES7_E4typeERKNS1_IT0_T1_EE mov [rsp+88h+var_80], rax jmp short $+2 loc_9D7FB: mov rax, [rsp+88h+var_80] mov [rsp+88h+var_68], rax lea rdi, [rsp+88h+var_68] call _ZNKSt6chrono8durationIlSt5ratioILl1ELl1EEE5countEv; std::chrono::duration<long,std::ratio<1l,1l>>::count(void) mov [rsp+88h+var_60], rax mov rdi, [rsp+88h+var_60] mov rsi, [rsp+88h+var_20] call _ZN6spdlog7details10fmt_helper10append_intIlEEvT_RN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::fmt_helper::append_int<long>(long,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &) jmp short $+2 loc_9D825: lea rdi, [rsp+88h+var_50]; this call _ZN6spdlog7details13scoped_padderD2Ev; spdlog::details::scoped_padder::~scoped_padder() add rsp, 88h retn mov rcx, rax mov eax, edx mov [rsp+arg_10], rcx mov [rsp+arg_C], eax lea rdi, [rsp+arg_30]; this call _ZN6spdlog7details13scoped_padderD2Ev; spdlog::details::scoped_padder::~scoped_padder() mov rdi, [rsp+arg_10] call __Unwind_Resume
void spdlog::details::E_formatter<spdlog::details::scoped_padder>::format( long long a1, long long a2, long long a3, long long a4) { long long v4; // [rsp+20h] [rbp-68h] BYREF long long v5; // [rsp+28h] [rbp-60h] long long v6; // [rsp+30h] [rbp-58h] BYREF _BYTE v7[40]; // [rsp+38h] [rbp-50h] BYREF long long v8; // [rsp+60h] [rbp-28h] long long v9; // [rsp+68h] [rbp-20h] long long v10; // [rsp+70h] [rbp-18h] long long v11; // [rsp+78h] [rbp-10h] long long v12; // [rsp+80h] [rbp-8h] v12 = a1; v11 = a2; v10 = a3; v9 = a4; v8 = 10LL; spdlog::details::scoped_padder::scoped_padder((spdlog::details::scoped_padder *)v7, 10LL, (_QWORD *)(a1 + 8), a4); v6 = std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>::time_since_epoch(v11 + 24); v4 = std::chrono::duration_cast<std::chrono::duration<long,std::ratio<1l,1l>>,long,std::ratio<1l,1000000000l>>((long long)&v6); v5 = std::chrono::duration<long,std::ratio<1l,1l>>::count((long long)&v4); spdlog::details::fmt_helper::append_int<long>(v5, v9); spdlog::details::scoped_padder::~scoped_padder((spdlog::details::scoped_padder *)v7); }
format: SUB RSP,0x88 MOV qword ptr [RSP + 0x80],RDI MOV qword ptr [RSP + 0x78],RSI MOV qword ptr [RSP + 0x70],RDX MOV qword ptr [RSP + 0x68],RCX MOV RDX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x60],0xa ADD RDX,0x8 MOV RCX,qword ptr [RSP + 0x68] LEA RDI,[RSP + 0x38] MOV ESI,0xa CALL 0x00195af0 MOV RDI,qword ptr [RSP + 0x78] ADD RDI,0x18 CALL 0x00122090 MOV qword ptr [RSP + 0x30],RAX LAB_0019d7ea: LEA RDI,[RSP + 0x30] CALL 0x0017e060 MOV qword ptr [RSP + 0x8],RAX JMP 0x0019d7fb LAB_0019d7fb: MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x20],RAX LEA RDI,[RSP + 0x20] CALL 0x00186bc0 MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x68] CALL 0x0019d860 LAB_0019d823: JMP 0x0019d825 LAB_0019d825: LEA RDI,[RSP + 0x38] CALL 0x00195be0 ADD RSP,0x88 RET
/* spdlog::details::E_formatter<spdlog::details::scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char> >&) */ void __thiscall spdlog::details::E_formatter<spdlog::details::scoped_padder>::format (E_formatter<spdlog::details::scoped_padder> *this,log_msg *param_1,tm *param_2, basic_memory_buffer *param_3) { int8 local_68; long local_60; int8 local_58; scoped_padder local_50 [40]; int8 local_28; basic_memory_buffer *local_20; tm *local_18; log_msg *local_10; E_formatter<spdlog::details::scoped_padder> *local_8; local_28 = 10; local_20 = param_3; local_18 = param_2; local_10 = param_1; local_8 = this; scoped_padder::scoped_padder(local_50,10,(padding_info *)(this + 8),param_3); local_58 = std::chrono:: time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> ::time_since_epoch((time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> *)(local_10 + 0x18)); /* try { // try from 0019d7ea to 0019d822 has its CatchHandler @ 0019d837 */ local_68 = std::chrono:: duration_cast<std::chrono::duration<long,std::ratio<1l,1l>>,long,std::ratio<1l,1000000000l>> ((duration *)&local_58); local_60 = std::chrono::duration<long,std::ratio<1l,1l>>::count ((duration<long,std::ratio<1l,1l>> *)&local_68); fmt_helper::append_int<long>(local_60,local_20); scoped_padder::~scoped_padder(local_50); return; }
45,367
ma_delete_static_record
eloqsql/storage/maria/ma_statrec.c
my_bool _ma_delete_static_record(MARIA_HA *info, const uchar *record __attribute__ ((unused))) { uchar temp[9]; /* 1+sizeof(uint32) */ info->state->del++; info->state->empty+=info->s->base.pack_reclength; temp[0]= '\0'; /* Mark that record is deleted */ _ma_dpointer(info->s, temp+1, info->s->state.dellink); info->s->state.dellink= info->cur_row.lastpos; info->rec_cache.seek_not_done=1; return (info->s->file_write(info, temp, 1+info->s->rec_reflength, info->cur_row.lastpos, MYF(MY_NABP)) != 0); }
O3
c
ma_delete_static_record: pushq %rbp movq %rsp, %rbp pushq %rbx subq $0x18, %rsp movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x10(%rbp) movq 0x20(%rdi), %rax incq 0x8(%rax) movq (%rdi), %rax movq 0x20(%rdi), %rcx movq 0x3a0(%rax), %rax addq %rax, 0x10(%rcx) leaq -0x18(%rbp), %rsi movb $0x0, -0x1(%rsi) movq (%rdi), %rdi movq 0xc8(%rdi), %rdx callq 0x57258 movq (%rbx), %rax movq 0x98(%rbx), %rcx movq %rcx, 0xc8(%rax) movl $0x1, 0x598(%rbx) movq (%rbx), %rax movl 0x740(%rax), %edx incl %edx leaq -0x19(%rbp), %rsi movl $0x4, %r8d movq %rbx, %rdi callq *0x6e8(%rax) testq %rax, %rax setne %al movq %fs:0x28, %rcx cmpq -0x10(%rbp), %rcx jne 0x5b6ec addq $0x18, %rsp popq %rbx popq %rbp retq callq 0x29270
_ma_delete_static_record: push rbp mov rbp, rsp push rbx sub rsp, 18h mov rbx, rdi mov rax, fs:28h mov [rbp+var_10], rax mov rax, [rdi+20h] inc qword ptr [rax+8] mov rax, [rdi] mov rcx, [rdi+20h] mov rax, [rax+3A0h] add [rcx+10h], rax lea rsi, [rbp+var_18] mov byte ptr [rsi-1], 0 mov rdi, [rdi] mov rdx, [rdi+0C8h] call _ma_dpointer mov rax, [rbx] mov rcx, [rbx+98h] mov [rax+0C8h], rcx mov dword ptr [rbx+598h], 1 mov rax, [rbx] mov edx, [rax+740h] inc edx lea rsi, [rbp+var_19] mov r8d, 4 mov rdi, rbx call qword ptr [rax+6E8h] test rax, rax setnz al mov rcx, fs:28h cmp rcx, [rbp+var_10] jnz short loc_5B6EC add rsp, 18h pop rbx pop rbp retn loc_5B6EC: call ___stack_chk_fail
bool ma_delete_static_record(long long *a1) { long long v1; // rcx char v3; // [rsp+7h] [rbp-19h] BYREF char v4[8]; // [rsp+8h] [rbp-18h] BYREF unsigned long long v5; // [rsp+10h] [rbp-10h] v5 = __readfsqword(0x28u); ++*(_QWORD *)(a1[4] + 8); *(_QWORD *)(a1[4] + 16) += *(_QWORD *)(*a1 + 928); v3 = 0; ma_dpointer(*a1, (long long)v4, *(_QWORD *)(*a1 + 200)); v1 = a1[19]; *(_QWORD *)(*a1 + 200) = v1; *((_DWORD *)a1 + 358) = 1; return (*(long long ( **)(long long *, char *, _QWORD, long long, long long))(*a1 + 1768))( a1, &v3, (unsigned int)(*(_DWORD *)(*a1 + 1856) + 1), v1, 4LL) != 0; }
_ma_delete_static_record: PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x18 MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RDI + 0x20] INC qword ptr [RAX + 0x8] MOV RAX,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x20] MOV RAX,qword ptr [RAX + 0x3a0] ADD qword ptr [RCX + 0x10],RAX LEA RSI,[RBP + -0x18] MOV byte ptr [RSI + -0x1],0x0 MOV RDI,qword ptr [RDI] MOV RDX,qword ptr [RDI + 0xc8] CALL 0x00157258 MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RBX + 0x98] MOV qword ptr [RAX + 0xc8],RCX MOV dword ptr [RBX + 0x598],0x1 MOV RAX,qword ptr [RBX] MOV EDX,dword ptr [RAX + 0x740] INC EDX LEA RSI,[RBP + -0x19] MOV R8D,0x4 MOV RDI,RBX CALL qword ptr [RAX + 0x6e8] TEST RAX,RAX SETNZ AL MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x10] JNZ 0x0015b6ec ADD RSP,0x18 POP RBX POP RBP RET LAB_0015b6ec: CALL 0x00129270
bool _ma_delete_static_record(long *param_1) { long lVar1; long in_FS_OFFSET; int1 local_21; int1 local_20 [8]; long local_18; local_18 = *(long *)(in_FS_OFFSET + 0x28); *(long *)(param_1[4] + 8) = *(long *)(param_1[4] + 8) + 1; *(long *)(param_1[4] + 0x10) = *(long *)(param_1[4] + 0x10) + *(long *)(*param_1 + 0x3a0); local_21 = 0; _ma_dpointer(*param_1,local_20,*(int8 *)(*param_1 + 200)); lVar1 = param_1[0x13]; *(long *)(*param_1 + 200) = lVar1; *(int4 *)(param_1 + 0xb3) = 1; lVar1 = (**(code **)(*param_1 + 0x6e8))(param_1,&local_21,*(int *)(*param_1 + 0x740) + 1,lVar1,4); if (*(long *)(in_FS_OFFSET + 0x28) == local_18) { return lVar1 != 0; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
45,368
minja::Context::get(minja::Value const&)
monkey531[P]llama/common/./minja.hpp
virtual Value get(const Value & key) { if (values_.contains(key)) return values_.at(key); if (parent_) return parent_->get(key); return Value(); }
O3
cpp
minja::Context::get(minja::Value const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x18(%rsi), %r12 movq %r12, %rdi movq %rdx, %rsi callq 0x549f4 testb %al, %al je 0x602b4 movq %r12, %rdi movq %r14, %rsi callq 0x547e2 movq %rbx, %rdi movq %rax, %rsi callq 0x4ed98 jmp 0x60307 movq 0x68(%r15), %rsi testq %rsi, %rsi je 0x602cb movq (%rsi), %rax movq %rbx, %rdi movq %r14, %rdx callq *0x10(%rax) jmp 0x60307 leaq 0x40(%rbx), %r14 movq $0x0, 0x48(%rbx) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movups %xmm0, 0x10(%rbx) movups %xmm0, 0x20(%rbx) movups %xmm0, 0x30(%rbx) movb $0x0, 0x40(%rbx) movq %r14, %rdi movl $0x1, %esi callq 0x3d970 movq %r14, %rdi movl $0x1, %esi callq 0x3d970 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
_ZN5minja7Context3getERKNS_5ValueE: push r15 push r14 push r12 push rbx push rax mov r14, rdx mov r15, rsi mov rbx, rdi lea r12, [rsi+18h] mov rdi, r12; this mov rsi, rdx; minja::Value * call _ZNK5minja5Value8containsERKS0_; minja::Value::contains(minja::Value const&) test al, al jz short loc_602B4 mov rdi, r12; this mov rsi, r14; minja::Value * call _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&) mov rdi, rbx; this mov rsi, rax; minja::Value * call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&) jmp short loc_60307 loc_602B4: mov rsi, [r15+68h] test rsi, rsi jz short loc_602CB mov rax, [rsi] mov rdi, rbx mov rdx, r14 call qword ptr [rax+10h] jmp short loc_60307 loc_602CB: lea r14, [rbx+40h] mov qword ptr [rbx+48h], 0 xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 movups xmmword ptr [rbx+10h], xmm0 movups xmmword ptr [rbx+20h], xmm0 movups xmmword ptr [rbx+30h], xmm0 mov byte ptr [rbx+40h], 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 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_60307: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
minja::Context * minja::Context::get( minja::Context *this, const minja::Value *a2, const minja::Value *a3, __m128d a4) { const minja::Value *v5; // rax long long v6; // rsi if ( minja::Value::contains((const minja::Value *)((char *)a2 + 24), a3, a4) ) { v5 = (const minja::Value *)minja::Value::at((const minja::Value *)((char *)a2 + 24), a3); minja::Value::Value(this, v5); } else { v6 = *((_QWORD *)a2 + 13); if ( v6 ) { (*(void ( **)(minja::Context *, long long, const minja::Value *))(*(_QWORD *)v6 + 16LL))(this, v6, a3); } else { *((_QWORD *)this + 9) = 0LL; *(_OWORD *)this = 0LL; *((_OWORD *)this + 1) = 0LL; *((_OWORD *)this + 2) = 0LL; *((_OWORD *)this + 3) = 0LL; *((_BYTE *)this + 64) = 0; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)this + 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 *)this + 64); } } return this; }
get: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA R12,[RSI + 0x18] MOV RDI,R12 MOV RSI,RDX CALL 0x001549f4 TEST AL,AL JZ 0x001602b4 MOV RDI,R12 MOV RSI,R14 CALL 0x001547e2 MOV RDI,RBX MOV RSI,RAX CALL 0x0014ed98 JMP 0x00160307 LAB_001602b4: MOV RSI,qword ptr [R15 + 0x68] TEST RSI,RSI JZ 0x001602cb MOV RAX,qword ptr [RSI] MOV RDI,RBX MOV RDX,R14 CALL qword ptr [RAX + 0x10] JMP 0x00160307 LAB_001602cb: LEA R14,[RBX + 0x40] MOV qword ptr [RBX + 0x48],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOVUPS xmmword ptr [RBX + 0x10],XMM0 MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOV byte ptr [RBX + 0x40],0x0 MOV RDI,R14 MOV ESI,0x1 CALL 0x0013d970 MOV RDI,R14 MOV ESI,0x1 CALL 0x0013d970 LAB_00160307: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* minja::Context::get(minja::Value const&) */ Value * minja::Context::get(Value *param_1) { char cVar1; Value *pVVar2; Value *in_RDX; long in_RSI; bool bVar3; cVar1 = minja::Value::contains((Value *)(in_RSI + 0x18),in_RDX); if (cVar1 == '\0') { if (*(long **)(in_RSI + 0x68) == (long *)0x0) { bVar3 = (bool)((char)param_1 + '@'); *(int8 *)(param_1 + 0x48) = 0; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; *(int8 *)(param_1 + 0x18) = 0; *(int8 *)(param_1 + 0x20) = 0; *(int8 *)(param_1 + 0x28) = 0; *(int8 *)(param_1 + 0x30) = 0; *(int8 *)(param_1 + 0x38) = 0; param_1[0x40] = (Value)0x0; 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); } else { (**(code **)(**(long **)(in_RSI + 0x68) + 0x10))(param_1); } } else { pVVar2 = (Value *)minja::Value::at((Value *)(in_RSI + 0x18),in_RDX); minja::Value::Value(param_1,pVVar2); } return param_1; }
45,369
my_mb_wc_utf8mb4_quick
eloqsql/strings/ctype-utf8.h
static inline int my_mb_wc_utf8mb4_quick(my_wc_t *pwc, const uchar *s, const uchar *e) { uchar c; if (s >= e) return MY_CS_TOOSMALL; c= s[0]; if (c < 0x80) { *pwc= c; return 1; } else if (c < 0xc2) return MY_CS_ILSEQ; else if (c < 0xe0) { if (s + 2 > e) /* We need 2 characters */ return MY_CS_TOOSMALL2; if (!(IS_CONTINUATION_BYTE(s[1]))) return MY_CS_ILSEQ; *pwc= UTF8MB2_CODE(c, s[1]); return 2; } else if (c < 0xf0) { if (s + 3 > e) /* We need 3 characters */ return MY_CS_TOOSMALL3; if (!IS_UTF8MB3_STEP2(c, s[1], s[2])) return MY_CS_ILSEQ; *pwc= UTF8MB3_CODE(c, s[1], s[2]); return 3; } else if (c < 0xf5) { if (s + 4 > e) /* We need 4 characters */ return MY_CS_TOOSMALL4; if (!IS_UTF8MB4_STEP2(c, s[1], s[2], s[3])) return MY_CS_ILSEQ; *pwc= UTF8MB4_CODE(c, s[1], s[2], s[3]); return 4; } return MY_CS_ILSEQ; }
O0
c
my_mb_wc_utf8mb4_quick: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jb 0x78e96 movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x79113 movq -0x18(%rbp), %rax movb (%rax), %al movb %al, -0x21(%rbp) movzbl -0x21(%rbp), %eax cmpl $0x80, %eax jge 0x78ec3 movzbl -0x21(%rbp), %eax movl %eax, %ecx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl $0x1, -0x4(%rbp) jmp 0x79113 movzbl -0x21(%rbp), %eax cmpl $0xc2, %eax jge 0x78eda movl $0x0, -0x4(%rbp) jmp 0x79113 movzbl -0x21(%rbp), %eax cmpl $0xe0, %eax jge 0x78f50 movq -0x18(%rbp), %rax addq $0x2, %rax cmpq -0x20(%rbp), %rax jbe 0x78eff movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x79113 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jl 0x78f1d movl $0x0, -0x4(%rbp) jmp 0x79113 movzbl -0x21(%rbp), %eax andl $0x1f, %eax movslq %eax, %rcx shlq $0x6, %rcx movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cltq orq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl $0x2, -0x4(%rbp) jmp 0x79113 movzbl -0x21(%rbp), %eax cmpl $0xf0, %eax jge 0x7900c movq -0x18(%rbp), %rax addq $0x3, %rax cmpq -0x20(%rbp), %rax jbe 0x78f79 movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99 jmp 0x79113 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x78fb7 movq -0x18(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x78fb7 movzbl -0x21(%rbp), %eax cmpl $0xe1, %eax jge 0x78fc3 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xa0, %eax jge 0x78fc3 movl $0x0, -0x4(%rbp) jmp 0x79113 movzbl -0x21(%rbp), %eax andl $0xf, %eax movslq %eax, %rcx shlq $0xc, %rcx movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cltq shlq $0x6, %rax orq %rax, %rcx movq -0x18(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cltq orq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl $0x3, -0x4(%rbp) jmp 0x79113 movzbl -0x21(%rbp), %eax cmpl $0xf5, %eax jge 0x79104 movq -0x18(%rbp), %rax addq $0x4, %rax cmpq -0x20(%rbp), %rax jbe 0x79035 movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98 jmp 0x79113 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x7909f movq -0x18(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x7909f movq -0x18(%rbp), %rax movzbl 0x3(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x7909f movzbl -0x21(%rbp), %eax cmpl $0xf1, %eax jge 0x79085 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x90, %eax jl 0x7909f movzbl -0x21(%rbp), %eax cmpl $0xf3, %eax jle 0x790a8 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x8f, %eax jle 0x790a8 movl $0x0, -0x4(%rbp) jmp 0x79113 movzbl -0x21(%rbp), %eax andl $0x7, %eax movslq %eax, %rcx shlq $0x12, %rcx movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cltq shlq $0xc, %rax orq %rax, %rcx movq -0x18(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cltq shlq $0x6, %rax orq %rax, %rcx movq -0x18(%rbp), %rax movzbl 0x3(%rax), %eax xorl $0x80, %eax cltq orq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl $0x4, -0x4(%rbp) jmp 0x79113 jmp 0x79106 jmp 0x79108 jmp 0x7910a jmp 0x7910c movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
my_mb_wc_utf8mb4_quick_0: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jb short loc_78E96 mov [rbp+var_4], 0FFFFFF9Bh jmp loc_79113 loc_78E96: mov rax, [rbp+var_18] mov al, [rax] mov [rbp+var_21], al movzx eax, [rbp+var_21] cmp eax, 80h jge short loc_78EC3 movzx eax, [rbp+var_21] mov ecx, eax mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_4], 1 jmp loc_79113 loc_78EC3: movzx eax, [rbp+var_21] cmp eax, 0C2h jge short loc_78EDA mov [rbp+var_4], 0 jmp loc_79113 loc_78EDA: movzx eax, [rbp+var_21] cmp eax, 0E0h jge short loc_78F50 mov rax, [rbp+var_18] add rax, 2 cmp rax, [rbp+var_20] jbe short loc_78EFF mov [rbp+var_4], 0FFFFFF9Ah jmp loc_79113 loc_78EFF: mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jl short loc_78F1D mov [rbp+var_4], 0 jmp loc_79113 loc_78F1D: movzx eax, [rbp+var_21] and eax, 1Fh movsxd rcx, eax shl rcx, 6 mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cdqe or rcx, rax mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_4], 2 jmp loc_79113 loc_78F50: movzx eax, [rbp+var_21] cmp eax, 0F0h jge loc_7900C mov rax, [rbp+var_18] add rax, 3 cmp rax, [rbp+var_20] jbe short loc_78F79 mov [rbp+var_4], 0FFFFFF99h jmp loc_79113 loc_78F79: mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jge short loc_78FB7 mov rax, [rbp+var_18] movzx eax, byte ptr [rax+2] xor eax, 80h cmp eax, 40h ; '@' jge short loc_78FB7 movzx eax, [rbp+var_21] cmp eax, 0E1h jge short loc_78FC3 mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] cmp eax, 0A0h jge short loc_78FC3 loc_78FB7: mov [rbp+var_4], 0 jmp loc_79113 loc_78FC3: movzx eax, [rbp+var_21] and eax, 0Fh movsxd rcx, eax shl rcx, 0Ch mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cdqe shl rax, 6 or rcx, rax mov rax, [rbp+var_18] movzx eax, byte ptr [rax+2] xor eax, 80h cdqe or rcx, rax mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_4], 3 jmp loc_79113 loc_7900C: movzx eax, [rbp+var_21] cmp eax, 0F5h jge loc_79104 mov rax, [rbp+var_18] add rax, 4 cmp rax, [rbp+var_20] jbe short loc_79035 mov [rbp+var_4], 0FFFFFF98h jmp loc_79113 loc_79035: mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jge short loc_7909F mov rax, [rbp+var_18] movzx eax, byte ptr [rax+2] xor eax, 80h cmp eax, 40h ; '@' jge short loc_7909F mov rax, [rbp+var_18] movzx eax, byte ptr [rax+3] xor eax, 80h cmp eax, 40h ; '@' jge short loc_7909F movzx eax, [rbp+var_21] cmp eax, 0F1h jge short loc_79085 mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] cmp eax, 90h jl short loc_7909F loc_79085: movzx eax, [rbp+var_21] cmp eax, 0F3h jle short loc_790A8 mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] cmp eax, 8Fh jle short loc_790A8 loc_7909F: mov [rbp+var_4], 0 jmp short loc_79113 loc_790A8: movzx eax, [rbp+var_21] and eax, 7 movsxd rcx, eax shl rcx, 12h mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cdqe shl rax, 0Ch or rcx, rax mov rax, [rbp+var_18] movzx eax, byte ptr [rax+2] xor eax, 80h cdqe shl rax, 6 or rcx, rax mov rax, [rbp+var_18] movzx eax, byte ptr [rax+3] xor eax, 80h cdqe or rcx, rax mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_4], 4 jmp short loc_79113 loc_79104: jmp short $+2 loc_79106: jmp short $+2 loc_79108: jmp short $+2 loc_7910A: jmp short $+2 loc_7910C: mov [rbp+var_4], 0 loc_79113: mov eax, [rbp+var_4] pop rbp retn
long long my_mb_wc_utf8mb4_quick_0(unsigned long long *a1, unsigned __int8 *a2, unsigned long long a3) { unsigned __int8 v4; // [rsp+1h] [rbp-21h] if ( (unsigned long long)a2 < a3 ) { v4 = *a2; if ( *a2 >= 0x80u ) { if ( v4 >= 0xC2u ) { if ( v4 >= 0xE0u ) { if ( v4 >= 0xF0u ) { if ( v4 >= 0xF5u ) { return 0; } else if ( (unsigned long long)(a2 + 4) <= a3 ) { if ( (a2[1] ^ 0x80) < 64 && (a2[2] ^ 0x80) < 64 && (a2[3] ^ 0x80) < 64 && (v4 >= 0xF1u || a2[1] >= 0x90u) && (v4 <= 0xF3u || a2[1] <= 0x8Fu) ) { *a1 = a2[3] ^ 0x80u | ((long long)(a2[2] ^ 0x80u) << 6) | ((long long)(a2[1] ^ 0x80u) << 12) | ((unsigned long long)(v4 & 7) << 18); return 4; } else { return 0; } } else { return (unsigned int)-104; } } else if ( (unsigned long long)(a2 + 3) <= a3 ) { if ( (a2[1] ^ 0x80) < 64 && (a2[2] ^ 0x80) < 64 && (v4 >= 0xE1u || a2[1] >= 0xA0u) ) { *a1 = a2[2] ^ 0x80u | ((long long)(a2[1] ^ 0x80u) << 6) | ((unsigned long long)(v4 & 0xF) << 12); return 3; } else { return 0; } } else { return (unsigned int)-103; } } else if ( (unsigned long long)(a2 + 2) <= a3 ) { if ( (a2[1] ^ 0x80) < 64 ) { *a1 = a2[1] ^ 0x80u | ((unsigned long long)(v4 & 0x1F) << 6); return 2; } else { return 0; } } else { return (unsigned int)-102; } } else { return 0; } } else { *a1 = v4; return 1; } } else { return (unsigned int)-101; } }
my_mb_wc_utf8mb4_quick: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JC 0x00178e96 MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x00179113 LAB_00178e96: MOV RAX,qword ptr [RBP + -0x18] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x21],AL MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0x80 JGE 0x00178ec3 MOVZX EAX,byte ptr [RBP + -0x21] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x1 JMP 0x00179113 LAB_00178ec3: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xc2 JGE 0x00178eda MOV dword ptr [RBP + -0x4],0x0 JMP 0x00179113 LAB_00178eda: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xe0 JGE 0x00178f50 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x20] JBE 0x00178eff MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x00179113 LAB_00178eff: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JL 0x00178f1d MOV dword ptr [RBP + -0x4],0x0 JMP 0x00179113 LAB_00178f1d: MOVZX EAX,byte ptr [RBP + -0x21] AND EAX,0x1f MOVSXD RCX,EAX SHL RCX,0x6 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CDQE OR RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x2 JMP 0x00179113 LAB_00178f50: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xf0 JGE 0x0017900c MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x3 CMP RAX,qword ptr [RBP + -0x20] JBE 0x00178f79 MOV dword ptr [RBP + -0x4],0xffffff99 JMP 0x00179113 LAB_00178f79: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JGE 0x00178fb7 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CMP EAX,0x40 JGE 0x00178fb7 MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xe1 JGE 0x00178fc3 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xa0 JGE 0x00178fc3 LAB_00178fb7: MOV dword ptr [RBP + -0x4],0x0 JMP 0x00179113 LAB_00178fc3: MOVZX EAX,byte ptr [RBP + -0x21] AND EAX,0xf MOVSXD RCX,EAX SHL RCX,0xc MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CDQE SHL RAX,0x6 OR RCX,RAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CDQE OR RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x3 JMP 0x00179113 LAB_0017900c: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xf5 JGE 0x00179104 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x4 CMP RAX,qword ptr [RBP + -0x20] JBE 0x00179035 MOV dword ptr [RBP + -0x4],0xffffff98 JMP 0x00179113 LAB_00179035: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JGE 0x0017909f MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CMP EAX,0x40 JGE 0x0017909f MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x3] XOR EAX,0x80 CMP EAX,0x40 JGE 0x0017909f MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xf1 JGE 0x00179085 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x90 JL 0x0017909f LAB_00179085: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xf3 JLE 0x001790a8 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x8f JLE 0x001790a8 LAB_0017909f: MOV dword ptr [RBP + -0x4],0x0 JMP 0x00179113 LAB_001790a8: MOVZX EAX,byte ptr [RBP + -0x21] AND EAX,0x7 MOVSXD RCX,EAX SHL RCX,0x12 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CDQE SHL RAX,0xc OR RCX,RAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CDQE SHL RAX,0x6 OR RCX,RAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x3] XOR EAX,0x80 CDQE OR RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x4 JMP 0x00179113 LAB_00179104: JMP 0x00179106 LAB_00179106: JMP 0x00179108 LAB_00179108: JMP 0x0017910a LAB_0017910a: JMP 0x0017910c LAB_0017910c: MOV dword ptr [RBP + -0x4],0x0 LAB_00179113: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_mb_wc_utf8mb4_quick(ulong *param_1,byte *param_2,byte *param_3) { byte bVar1; int4 local_c; if (param_2 < param_3) { bVar1 = *param_2; if (bVar1 < 0x80) { *param_1 = (ulong)bVar1; local_c = 1; } else if (bVar1 < 0xc2) { local_c = 0; } else if (bVar1 < 0xe0) { if (param_3 < param_2 + 2) { local_c = 0xffffff9a; } else if ((param_2[1] ^ 0x80) < 0x40) { *param_1 = (long)(int)(bVar1 & 0x1f) << 6 | (long)(int)(param_2[1] ^ 0x80); local_c = 2; } else { local_c = 0; } } else if (bVar1 < 0xf0) { if (param_3 < param_2 + 3) { local_c = 0xffffff99; } else if ((((param_2[1] ^ 0x80) < 0x40) && ((param_2[2] ^ 0x80) < 0x40)) && ((0xe0 < bVar1 || (0x9f < param_2[1])))) { *param_1 = (long)(int)(bVar1 & 0xf) << 0xc | (long)(int)(param_2[1] ^ 0x80) << 6 | (long)(int)(param_2[2] ^ 0x80); local_c = 3; } else { local_c = 0; } } else if (bVar1 < 0xf5) { if (param_3 < param_2 + 4) { local_c = 0xffffff98; } else if ((((((param_2[1] ^ 0x80) < 0x40) && ((param_2[2] ^ 0x80) < 0x40)) && ((param_2[3] ^ 0x80) < 0x40)) && ((0xf0 < bVar1 || (0x8f < param_2[1])))) && ((bVar1 < 0xf4 || (param_2[1] < 0x90)))) { *param_1 = (long)(int)(bVar1 & 7) << 0x12 | (long)(int)(param_2[1] ^ 0x80) << 0xc | (long)(int)(param_2[2] ^ 0x80) << 6 | (long)(int)(param_2[3] ^ 0x80); local_c = 4; } else { local_c = 0; } } else { local_c = 0; } } else { local_c = 0xffffff9b; } return local_c; }
45,370
my_mb_wc_utf8mb4_quick
eloqsql/strings/ctype-utf8.h
static inline int my_mb_wc_utf8mb4_quick(my_wc_t *pwc, const uchar *s, const uchar *e) { uchar c; if (s >= e) return MY_CS_TOOSMALL; c= s[0]; if (c < 0x80) { *pwc= c; return 1; } else if (c < 0xc2) return MY_CS_ILSEQ; else if (c < 0xe0) { if (s + 2 > e) /* We need 2 characters */ return MY_CS_TOOSMALL2; if (!(IS_CONTINUATION_BYTE(s[1]))) return MY_CS_ILSEQ; *pwc= UTF8MB2_CODE(c, s[1]); return 2; } else if (c < 0xf0) { if (s + 3 > e) /* We need 3 characters */ return MY_CS_TOOSMALL3; if (!IS_UTF8MB3_STEP2(c, s[1], s[2])) return MY_CS_ILSEQ; *pwc= UTF8MB3_CODE(c, s[1], s[2]); return 3; } else if (c < 0xf5) { if (s + 4 > e) /* We need 4 characters */ return MY_CS_TOOSMALL4; if (!IS_UTF8MB4_STEP2(c, s[1], s[2], s[3])) return MY_CS_ILSEQ; *pwc= UTF8MB4_CODE(c, s[1], s[2], s[3]); return 4; } return MY_CS_ILSEQ; }
O3
c
my_mb_wc_utf8mb4_quick: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rdx, %rsi jae 0x4c69b movzbl (%rsi), %ecx testb %cl, %cl js 0x4c694 movl $0x1, %eax movq %rcx, (%rdi) jmp 0x4c69b cmpb $-0x3e, %cl jae 0x4c69d xorl %eax, %eax popq %rbp retq cmpb $-0x21, %cl ja 0x4c6d3 leaq 0x2(%rsi), %r8 movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rdx, %r8 ja 0x4c69b movzbl 0x1(%rsi), %edx xorl $0x80, %edx movl $0x0, %eax cmpb $0x3f, %dl ja 0x4c69b andl $0x1f, %ecx shll $0x6, %ecx orl %edx, %ecx movl $0x2, %eax jmp 0x4c68f cmpb $-0x11, %cl ja 0x4c735 leaq 0x3(%rsi), %r8 movl $0xffffff99, %eax # imm = 0xFFFFFF99 cmpq %rdx, %r8 ja 0x4c69b movzbl 0x1(%rsi), %edx cmpb $-0x41, %dl jg 0x4c699 movzbl 0x2(%rsi), %esi cmpb $-0x41, %sil jg 0x4c699 cmpl $0xe0, %ecx sete %r8b cmpb $-0x60, %dl setb %r9b movl $0x0, %eax testb %r9b, %r8b jne 0x4c69b shll $0xc, %ecx movzwl %cx, %eax andl $0x3f, %edx shll $0x6, %edx orl %eax, %edx andl $0x3f, %esi orq %rdx, %rsi movl $0x3, %eax movq %rsi, %rcx jmp 0x4c68f cmpb $-0xc, %cl ja 0x4c699 leaq 0x4(%rsi), %r8 movl $0xffffff98, %eax # imm = 0xFFFFFF98 cmpq %rdx, %r8 ja 0x4c69b movzbl 0x1(%rsi), %r8d cmpb $-0x41, %r8b jg 0x4c699 movzbl 0x2(%rsi), %edx cmpb $-0x41, %dl jg 0x4c699 movzbl 0x3(%rsi), %esi cmpb $-0x41, %sil jg 0x4c699 cmpl $0xf0, %ecx sete %al cmpb $-0x70, %r8b setb %r9b testb %r9b, %al jne 0x4c699 cmpl $0xf4, %ecx sete %r9b cmpb $-0x70, %r8b setae %r10b movl $0x0, %eax testb %r10b, %r9b jne 0x4c69b andl $0x7, %ecx shll $0x12, %ecx andl $0x3f, %r8d shll $0xc, %r8d orl %ecx, %r8d andl $0x3f, %edx shll $0x6, %edx orl %r8d, %edx andl $0x3f, %esi orq %rdx, %rsi movl $0x4, %eax jmp 0x4c72d
my_mb_wc_utf8mb4_quick: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rsi, rdx jnb short loc_4C69B movzx ecx, byte ptr [rsi] test cl, cl js short loc_4C694 mov eax, 1 loc_4C68F: mov [rdi], rcx jmp short loc_4C69B loc_4C694: cmp cl, 0C2h jnb short loc_4C69D loc_4C699: xor eax, eax loc_4C69B: pop rbp retn loc_4C69D: cmp cl, 0DFh ja short loc_4C6D3 lea r8, [rsi+2] mov eax, 0FFFFFF9Ah cmp r8, rdx ja short loc_4C69B movzx edx, byte ptr [rsi+1] xor edx, 80h mov eax, 0 cmp dl, 3Fh ; '?' ja short loc_4C69B and ecx, 1Fh shl ecx, 6 or ecx, edx mov eax, 2 jmp short loc_4C68F loc_4C6D3: cmp cl, 0EFh ja short loc_4C735 lea r8, [rsi+3] mov eax, 0FFFFFF99h cmp r8, rdx ja short loc_4C69B movzx edx, byte ptr [rsi+1] cmp dl, 0BFh jg short loc_4C699 movzx esi, byte ptr [rsi+2] cmp sil, 0BFh jg short loc_4C699 cmp ecx, 0E0h setz r8b cmp dl, 0A0h setb r9b mov eax, 0 test r8b, r9b jnz short loc_4C69B shl ecx, 0Ch movzx eax, cx and edx, 3Fh shl edx, 6 or edx, eax and esi, 3Fh or rsi, rdx mov eax, 3 loc_4C72D: mov rcx, rsi jmp loc_4C68F loc_4C735: cmp cl, 0F4h ja loc_4C699 lea r8, [rsi+4] mov eax, 0FFFFFF98h cmp r8, rdx ja loc_4C69B movzx r8d, byte ptr [rsi+1] cmp r8b, 0BFh jg loc_4C699 movzx edx, byte ptr [rsi+2] cmp dl, 0BFh jg loc_4C699 movzx esi, byte ptr [rsi+3] cmp sil, 0BFh jg loc_4C699 cmp ecx, 0F0h setz al cmp r8b, 90h setb r9b test al, r9b jnz loc_4C699 cmp ecx, 0F4h setz r9b cmp r8b, 90h setnb r10b mov eax, 0 test r9b, r10b jnz loc_4C69B and ecx, 7 shl ecx, 12h and r8d, 3Fh shl r8d, 0Ch or r8d, ecx and edx, 3Fh shl edx, 6 or edx, r8d and esi, 3Fh or rsi, rdx mov eax, 4 jmp loc_4C72D
long long my_mb_wc_utf8mb4_quick(unsigned long long *a1, unsigned __int8 *a2, unsigned long long a3) { long long result; // rax unsigned long long v4; // rcx char v5; // dl char v6; // si unsigned long long v7; // rsi char v8; // r8 char v9; // dl char v10; // si result = 4294967195LL; if ( (unsigned long long)a2 >= a3 ) return result; v4 = *a2; if ( (v4 & 0x80u) == 0LL ) { result = 1LL; LABEL_4: *a1 = v4; return result; } if ( (unsigned __int8)v4 < 0xC2u ) return 0LL; if ( (unsigned __int8)v4 > 0xDFu ) { if ( (unsigned __int8)v4 > 0xEFu ) { if ( (unsigned __int8)v4 <= 0xF4u ) { result = 4294967192LL; if ( (unsigned long long)(a2 + 4) > a3 ) return result; v8 = a2[1]; if ( v8 <= -65 ) { v9 = a2[2]; if ( v9 <= -65 ) { v10 = a2[3]; if ( v10 <= -65 && ((unsigned __int8)v8 >= 0x90u || (_DWORD)v4 != 240) ) { result = 0LL; if ( (unsigned __int8)v8 >= 0x90u && (_DWORD)v4 == 244 ) return result; v7 = ((v4 & 7) << 18) | ((unsigned __int8)(v8 & 0x3F) << 12) | ((unsigned __int8)(v9 & 0x3F) << 6) | v10 & 0x3F; result = 4LL; LABEL_18: v4 = v7; goto LABEL_4; } } } } } else { result = 4294967193LL; if ( (unsigned long long)(a2 + 3) > a3 ) return result; v5 = a2[1]; if ( v5 <= -65 ) { v6 = a2[2]; if ( v6 <= -65 ) { result = 0LL; if ( (unsigned __int8)v5 < 0xA0u && (_DWORD)v4 == 224 ) return result; v7 = (unsigned __int16)((_WORD)v4 << 12) | ((unsigned __int8)(v5 & 0x3F) << 6) | (unsigned long long)(v6 & 0x3F); result = 3LL; goto LABEL_18; } } } return 0LL; } result = 4294967194LL; if ( (unsigned long long)(a2 + 2) <= a3 ) { result = 0LL; if ( (a2[1] ^ 0x80u) <= 0x3F ) { v4 = a2[1] ^ 0x80 | ((unsigned __int8)(v4 & 0x1F) << 6); result = 2LL; goto LABEL_4; } } return result; }
my_mb_wc_utf8mb4_quick: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RSI,RDX JNC 0x0014c69b MOVZX ECX,byte ptr [RSI] TEST CL,CL JS 0x0014c694 MOV EAX,0x1 LAB_0014c68f: MOV qword ptr [RDI],RCX JMP 0x0014c69b LAB_0014c694: CMP CL,0xc2 JNC 0x0014c69d LAB_0014c699: XOR EAX,EAX LAB_0014c69b: POP RBP RET LAB_0014c69d: CMP CL,0xdf JA 0x0014c6d3 LEA R8,[RSI + 0x2] MOV EAX,0xffffff9a CMP R8,RDX JA 0x0014c69b MOVZX EDX,byte ptr [RSI + 0x1] XOR EDX,0x80 MOV EAX,0x0 CMP DL,0x3f JA 0x0014c69b AND ECX,0x1f SHL ECX,0x6 OR ECX,EDX MOV EAX,0x2 JMP 0x0014c68f LAB_0014c6d3: CMP CL,0xef JA 0x0014c735 LEA R8,[RSI + 0x3] MOV EAX,0xffffff99 CMP R8,RDX JA 0x0014c69b MOVZX EDX,byte ptr [RSI + 0x1] CMP DL,0xbf JG 0x0014c699 MOVZX ESI,byte ptr [RSI + 0x2] CMP SIL,0xbf JG 0x0014c699 CMP ECX,0xe0 SETZ R8B CMP DL,0xa0 SETC R9B MOV EAX,0x0 TEST R8B,R9B JNZ 0x0014c69b SHL ECX,0xc MOVZX EAX,CX AND EDX,0x3f SHL EDX,0x6 OR EDX,EAX AND ESI,0x3f OR RSI,RDX MOV EAX,0x3 LAB_0014c72d: MOV RCX,RSI JMP 0x0014c68f LAB_0014c735: CMP CL,0xf4 JA 0x0014c699 LEA R8,[RSI + 0x4] MOV EAX,0xffffff98 CMP R8,RDX JA 0x0014c69b MOVZX R8D,byte ptr [RSI + 0x1] CMP R8B,0xbf JG 0x0014c699 MOVZX EDX,byte ptr [RSI + 0x2] CMP DL,0xbf JG 0x0014c699 MOVZX ESI,byte ptr [RSI + 0x3] CMP SIL,0xbf JG 0x0014c699 CMP ECX,0xf0 SETZ AL CMP R8B,0x90 SETC R9B TEST AL,R9B JNZ 0x0014c699 CMP ECX,0xf4 SETZ R9B CMP R8B,0x90 SETNC R10B MOV EAX,0x0 TEST R9B,R10B JNZ 0x0014c69b AND ECX,0x7 SHL ECX,0x12 AND R8D,0x3f SHL R8D,0xc OR R8D,ECX AND EDX,0x3f SHL EDX,0x6 OR EDX,R8D AND ESI,0x3f OR RSI,RDX MOV EAX,0x4 JMP 0x0014c72d
int8 my_mb_wc_utf8mb4_quick(ulong *param_1,byte *param_2,byte *param_3) { byte bVar1; byte bVar2; int8 uVar3; uint uVar4; ulong uVar5; if (param_3 <= param_2) { return 0xffffff9b; } bVar1 = *param_2; uVar5 = (ulong)bVar1; if ((char)bVar1 < '\0') { if (0xc1 < bVar1) { uVar4 = (uint)bVar1; if (bVar1 < 0xe0) { if (param_3 < param_2 + 2) { return 0xffffff9a; } if (0x3f < (byte)(param_2[1] ^ 0x80)) { return 0; } uVar5 = (ulong)((uVar4 & 0x1f) << 6 | param_2[1] ^ 0x80); uVar3 = 2; goto LAB_0014c68f; } if (bVar1 < 0xf0) { if (param_3 < param_2 + 3) { return 0xffffff99; } bVar2 = param_2[1]; if (((char)bVar2 < -0x40) && ((char)param_2[2] < -0x40)) { if (uVar4 == 0xe0 && bVar2 < 0xa0) { return 0; } uVar4 = param_2[2] & 0x3f | (bVar2 & 0x3f) << 6 | (bVar1 & 0xf) << 0xc; uVar3 = 3; LAB_0014c72d: uVar5 = (ulong)uVar4; goto LAB_0014c68f; } } else if (bVar1 < 0xf5) { if (param_3 < param_2 + 4) { return 0xffffff98; } bVar1 = param_2[1]; if (((((char)bVar1 < -0x40) && ((char)param_2[2] < -0x40)) && ((char)param_2[3] < -0x40)) && (uVar4 != 0xf0 || 0x8f < bVar1)) { if (uVar4 == 0xf4 && 0x8f < bVar1) { return 0; } uVar4 = param_2[3] & 0x3f | (param_2[2] & 0x3f) << 6 | (bVar1 & 0x3f) << 0xc | (uVar4 & 7) << 0x12; uVar3 = 4; goto LAB_0014c72d; } } } uVar3 = 0; } else { uVar3 = 1; LAB_0014c68f: *param_1 = uVar5; } return uVar3; }
45,371
String::set_int(long long, bool, charset_info_st const*)
eloqsql/sql/sql_string.cc
bool String::set_int(longlong num, bool unsigned_flag, CHARSET_INFO *cs) { /* This allocates a few bytes extra in the unlikely case that cs->mb_maxlen > 1, but we can live with that */ uint l= LONGLONG_BUFFER_SIZE * cs->mbmaxlen; int base= unsigned_flag ? 10 : -10; if (alloc(l)) return TRUE; str_length=(uint32) (cs->longlong10_to_str)(Ptr,l,base,num); set_charset(cs); return FALSE; }
O3
cpp
String::set_int(long long, bool, charset_info_st const*): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %rbx movl %edx, %r13d movq %rsi, %r15 movq %rdi, %r14 movl 0x9c(%rcx), %eax leal (%rax,%rax,4), %ecx leal (%rax,%rcx,4), %r12d movl 0x14(%rdi), %eax cmpl %r12d, %eax setae %cl testl %eax, %eax setne %al testb %cl, %al jne 0x26765 leaq 0x8(%r14), %rdi movq %r12, %rsi callq 0x265ec movl %eax, %ecx movb $0x1, %al testb %cl, %cl jne 0x26795 testb %r13b, %r13b movl $0xa, %eax movl $0xfffffff6, %ecx # imm = 0xFFFFFFF6 cmovnel %eax, %ecx movq 0x8(%r14), %rsi movq 0xb8(%rbx), %rax movq %rbx, %rdi movq %r12, %rdx movq %r15, %r8 callq *0x70(%rax) movl %eax, 0x10(%r14) movq %rbx, (%r14) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN6String7set_intExbPK15charset_info_st: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rcx mov r13d, edx mov r15, rsi mov r14, rdi mov eax, [rcx+9Ch] lea ecx, [rax+rax*4] lea r12d, [rax+rcx*4] mov eax, [rdi+14h] cmp eax, r12d setnb cl test eax, eax setnz al test al, cl jnz short loc_26765 lea rdi, [r14+8]; this mov rsi, r12; unsigned __int64 call _ZN13Binary_string10real_allocEm; Binary_string::real_alloc(ulong) mov ecx, eax mov al, 1 test cl, cl jnz short loc_26795 loc_26765: test r13b, r13b mov eax, 0Ah mov ecx, 0FFFFFFF6h cmovnz ecx, eax mov rsi, [r14+8] mov rax, [rbx+0B8h] mov rdi, rbx mov rdx, r12 mov r8, r15 call qword ptr [rax+70h] mov [r14+10h], eax mov [r14], rbx xor eax, eax loc_26795: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char String::set_int(long long a1, long long a2, char a3, long long a4) { unsigned long long v6; // r12 char v7; // cl char result; // al long long v9; // rcx v6 = (unsigned int)(21 * *(_DWORD *)(a4 + 156)); if ( *(_DWORD *)(a1 + 20) >= (unsigned int)v6 && *(_DWORD *)(a1 + 20) != 0 || (v7 = Binary_string::real_alloc((Binary_string *)(a1 + 8), v6), result = 1, !v7) ) { v9 = 4294967286LL; if ( a3 ) v9 = 10LL; *(_DWORD *)(a1 + 16) = (*(long long ( **)(long long, _QWORD, unsigned long long, long long, long long))(*(_QWORD *)(a4 + 184) + 112LL))( a4, *(_QWORD *)(a1 + 8), v6, v9, a2); *(_QWORD *)a1 = a4; return 0; } return result; }
set_int: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RCX MOV R13D,EDX MOV R15,RSI MOV R14,RDI MOV EAX,dword ptr [RCX + 0x9c] LEA ECX,[RAX + RAX*0x4] LEA R12D,[RAX + RCX*0x4] MOV EAX,dword ptr [RDI + 0x14] CMP EAX,R12D SETNC CL TEST EAX,EAX SETNZ AL TEST AL,CL JNZ 0x00126765 LEA RDI,[R14 + 0x8] MOV RSI,R12 CALL 0x001265ec MOV ECX,EAX MOV AL,0x1 TEST CL,CL JNZ 0x00126795 LAB_00126765: TEST R13B,R13B MOV EAX,0xa MOV ECX,0xfffffff6 CMOVNZ ECX,EAX MOV RSI,qword ptr [R14 + 0x8] MOV RAX,qword ptr [RBX + 0xb8] MOV RDI,RBX MOV RDX,R12 MOV R8,R15 CALL qword ptr [RAX + 0x70] MOV dword ptr [R14 + 0x10],EAX MOV qword ptr [R14],RBX XOR EAX,EAX LAB_00126795: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* String::set_int(long long, bool, charset_info_st const*) */ int8 __thiscall String::set_int(String *this,longlong param_1,bool param_2,charset_info_st *param_3) { uint uVar1; char cVar2; int4 uVar3; int8 uVar4; uVar1 = *(int *)(param_3 + 0x9c) * 0x15; if (*(uint *)(this + 0x14) == 0 || *(uint *)(this + 0x14) < uVar1) { cVar2 = Binary_string::real_alloc((Binary_string *)(this + 8),(ulong)uVar1); if (cVar2 != '\0') { return 1; } } uVar4 = 0xfffffff6; if (param_2) { uVar4 = 10; } uVar3 = (**(code **)(*(long *)(param_3 + 0xb8) + 0x70)) (param_3,*(int8 *)(this + 8),(ulong)uVar1,uVar4,param_1); *(int4 *)(this + 0x10) = uVar3; *(charset_info_st **)this = param_3; return 0; }
45,372
ZNK5Catch9StringRefcvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv
11AgReS1SoR11[P]Graph/build_O2/_deps/catch2-src/src/catch2/../catch2/internal/catch_stringref.hpp
explicit operator std::string() const { return std::string(m_start, m_size); }
O2
cpp
ZNK5Catch9StringRefcvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv: pushq %rbx movq %rdi, %rbx movq (%rsi), %rax leaq 0x10(%rdi), %rcx movq 0x8(%rsi), %rdx addq %rax, %rdx movq %rcx, (%rdi) movq %rax, %rsi callq 0x18262 movq %rbx, %rax popq %rbx retq
_ZNK5Catch9StringRefcvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv: push rbx mov rbx, rdi mov rax, [rsi] lea rcx, [rdi+10h] mov rdx, [rsi+8] add rdx, rax mov [rdi], rcx mov rsi, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rax, rbx pop rbx retn
_QWORD * Catch::StringRef::operator std::string(_QWORD *a1, long long a2) { _BYTE *v2; // rax long long v3; // rdx v2 = *(_BYTE **)a2; v3 = *(_QWORD *)a2 + *(_QWORD *)(a2 + 8); *a1 = a1 + 2; std::string::_M_construct<char const*>((long long)a1, v2, v3); return a1; }
operator.cast.to.string: PUSH RBX MOV RBX,RDI MOV RAX,qword ptr [RSI] LEA RCX,[RDI + 0x10] MOV RDX,qword ptr [RSI + 0x8] ADD RDX,RAX MOV qword ptr [RDI],RCX MOV RSI,RAX CALL 0x00118262 MOV RAX,RBX POP RBX RET
/* Catch::StringRef::operator std::__cxx11::string() const */ StringRef * __thiscall Catch::StringRef::operator_cast_to_string(StringRef *this) { long lVar1; long lVar2; long *in_RSI; lVar1 = *in_RSI; lVar2 = in_RSI[1]; *(StringRef **)this = this + 0x10; std::__cxx11::string::_M_construct<char_const*>(this,lVar1,lVar2 + lVar1); return this; }
45,373
ma_bitmap_reset_cache
eloqsql/storage/maria/ma_bitmap.c
void _ma_bitmap_reset_cache(MARIA_SHARE *share) { MARIA_FILE_BITMAP *bitmap= &share->bitmap; if (bitmap->map) /* If using bitmap */ { /* Forget changes in current bitmap page */ bitmap->changed= 0; /* We can't read a page yet, as in some case we don't have an active page cache yet. Pretend we have a dummy, full and not changed bitmap page in memory. We set bitmap->page to a value so that if we use it in move_to_next_bitmap() it will point to page 0. (This can only happen if writing to a bitmap page fails) */ bitmap->page= ((pgcache_page_no_t) 0) - bitmap->pages_covered; bitmap->used_size= bitmap->total_size= bitmap->max_total_size; bitmap->full_head_size= bitmap->full_tail_size= bitmap->max_total_size; bfill(bitmap->map, share->block_size, 255); #ifndef DBUG_OFF memcpy(bitmap->map + bitmap->block_size, bitmap->map, bitmap->block_size); #endif /* Start scanning for free space from start of file */ share->state.first_bitmap_with_space = 0; } }
O0
c
ma_bitmap_reset_cache: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xa10, %rax # imm = 0xA10 movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x8(%rax) je 0xefab72 movq -0x10(%rbp), %rax movb $0x0, 0x20(%rax) movq -0x10(%rbp), %rax xorl %ecx, %ecx subq 0x138(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x10(%rbp), %rax movl 0x12c(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x128(%rax) movq -0x10(%rbp), %rax movl %ecx, 0x24(%rax) movq -0x10(%rbp), %rax movl 0x12c(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x2c(%rax) movq -0x10(%rbp), %rax movl %ecx, 0x28(%rax) movq -0x10(%rbp), %rax movq 0x8(%rax), %rdi movq -0x8(%rbp), %rax movl 0x7bc(%rax), %eax movl %eax, %edx movl $0xff, %esi callq 0x7754f0 movq -0x8(%rbp), %rax movq $0x0, 0xd0(%rax) addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
_ma_bitmap_reset_cache: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] add rax, 0A10h mov [rbp+var_10], rax mov rax, [rbp+var_10] cmp qword ptr [rax+8], 0 jz short loc_EFAB72 mov rax, [rbp+var_10] mov byte ptr [rax+20h], 0 mov rax, [rbp+var_10] xor ecx, ecx sub rcx, [rax+138h] mov rax, [rbp+var_10] mov [rax+10h], rcx mov rax, [rbp+var_10] mov ecx, [rax+12Ch] mov rax, [rbp+var_10] mov [rax+128h], ecx mov rax, [rbp+var_10] mov [rax+24h], ecx mov rax, [rbp+var_10] mov ecx, [rax+12Ch] mov rax, [rbp+var_10] mov [rax+2Ch], ecx mov rax, [rbp+var_10] mov [rax+28h], ecx mov rax, [rbp+var_10] mov rdi, [rax+8] mov rax, [rbp+var_8] mov eax, [rax+7BCh] mov edx, eax mov esi, 0FFh call _memset mov rax, [rbp+var_8] mov qword ptr [rax+0D0h], 0 loc_EFAB72: add rsp, 10h pop rbp retn
long long ma_bitmap_reset_cache(long long a1) { long long result; // rax int v2; // ecx int v3; // ecx result = a1 + 2576; if ( *(_QWORD *)(a1 + 2584) ) { *(_BYTE *)(a1 + 2608) = 0; *(_QWORD *)(a1 + 2592) = -*(_QWORD *)(a1 + 2888); v2 = *(_DWORD *)(a1 + 2876); *(_DWORD *)(a1 + 2872) = v2; *(_DWORD *)(a1 + 2612) = v2; v3 = *(_DWORD *)(a1 + 2876); *(_DWORD *)(a1 + 2620) = v3; *(_DWORD *)(a1 + 2616) = v3; memset(*(_QWORD *)(a1 + 2584), 255LL); result = a1; *(_QWORD *)(a1 + 208) = 0LL; } return result; }
Field_string: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV AL,DL MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI AND AL,0x1 MOV byte ptr [RBP + -0xd],AL MOV qword ptr [RBP + -0x18],RCX MOV qword ptr [RBP + -0x20],R8 MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x28],RDI MOV EDX,dword ptr [RBP + -0xc] MOV SIL,byte ptr [RBP + -0xd] XOR EAX,EAX MOV ECX,EAX LEA RAX,[0x1544e53] TEST SIL,0x1 CMOVNZ RCX,RAX MOV R10,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] XOR ESI,ESI XOR R9D,R9D MOV R8D,R9D MOV qword ptr [RSP],R10 MOV qword ptr [RSP + 0x8],RAX CALL 0x00b80030 MOV RAX,qword ptr [RBP + -0x28] LEA RCX,[0x1b61fa8] ADD RCX,0x10 MOV qword ptr [RAX],RCX MOV byte ptr [RAX + 0xd8],0x1 ADD RSP,0x40 POP RBP RET
/* Field_string::Field_string(unsigned int, bool, st_mysql_const_lex_string const*, DTCollation const&) */ void __thiscall Field_string::Field_string (Field_string *this,uint param_1,bool param_2,st_mysql_const_lex_string *param_3, DTCollation *param_4) { int1 *puVar1; puVar1 = (int1 *)0x0; if (param_2) { puVar1 = &DAT_01544e53; } Field_longstr::Field_longstr((Field_longstr *)this,0,param_1,puVar1,0,0,param_3,param_4); *(int ***)this = &PTR_set_max_01b61fb8; this[0xd8] = (Field_string)0x1; return; }
45,374
test_thread_reader
eloqsql/storage/maria/unittest/ma_pagecache_consist.c
static void *test_thread_reader(void *arg) { int param=*((int*) arg); my_thread_init(); { DBUG_ENTER("test_reader"); DBUG_PRINT("enter", ("param: %d", param)); reader(param); DBUG_PRINT("info", ("Thread %s ended", my_thread_name())); pthread_mutex_lock(&LOCK_thread_count); ok(1, "reader%d: done", param); thread_count--; pthread_cond_signal(&COND_thread_count); /* Tell main we are ready */ pthread_mutex_unlock(&LOCK_thread_count); free((uchar*) arg); my_thread_end(); } return 0; }
O3
c
test_thread_reader: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl (%rdi), %r14d callq 0xa1c95 movl %r14d, %edi callq 0x303f1 leaq 0x3cbca4(%rip), %r15 # 0x3fc850 movq %r15, %rdi callq 0x29220 leaq 0xa88f7(%rip), %rsi # 0xd94b2 movl $0x1, %edi movl %r14d, %edx xorl %eax, %eax callq 0x91347 decl 0x3cbca8(%rip) # 0x3fc878 leaq 0x3cbc49(%rip), %rdi # 0x3fc820 callq 0x295c0 movq %r15, %rdi callq 0x291e0 movq %rbx, %rdi callq 0x29160 callq 0xa1f10 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
test_thread_reader: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi mov r14d, [rdi] call my_thread_init mov edi, r14d call reader lea r15, LOCK_thread_count mov rdi, r15 call _pthread_mutex_lock lea rsi, aReaderDDone; "reader%d: done" mov edi, 1 mov edx, r14d xor eax, eax call ok dec cs:thread_count lea rdi, COND_thread_count call _pthread_cond_signal mov rdi, r15 call _pthread_mutex_unlock mov rdi, rbx call _free call my_thread_end xor eax, eax add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long test_thread_reader(int *a1) { char v1; // al int v2; // r14d int v3; // ecx int v4; // r8d int v5; // r9d char v7; // [rsp-8h] [rbp-20h] v7 = v1; v2 = *a1; my_thread_init(); reader(v2); pthread_mutex_lock(&LOCK_thread_count); ok(1, (unsigned int)"reader%d: done", v2, v3, v4, v5, v7); --thread_count; pthread_cond_signal(&COND_thread_count); pthread_mutex_unlock(&LOCK_thread_count); free(a1); my_thread_end(); return 0LL; }
test_thread_reader: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV R14D,dword ptr [RDI] CALL 0x001a1c95 MOV EDI,R14D CALL 0x001303f1 LEA R15,[0x4fc850] MOV RDI,R15 CALL 0x00129220 LEA RSI,[0x1d94b2] MOV EDI,0x1 MOV EDX,R14D XOR EAX,EAX CALL 0x00191347 DEC dword ptr [0x004fc878] LEA RDI,[0x4fc820] CALL 0x001295c0 MOV RDI,R15 CALL 0x001291e0 MOV RDI,RBX CALL 0x00129160 CALL 0x001a1f10 XOR EAX,EAX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int8 test_thread_reader(uint *param_1,UI_STRING *param_2) { uint uVar1; uVar1 = *param_1; my_thread_init(); reader((UI *)(ulong)uVar1,param_2); pthread_mutex_lock((pthread_mutex_t *)LOCK_thread_count); ok(1,"reader%d: done",uVar1); thread_count = thread_count + -1; pthread_cond_signal((pthread_cond_t *)COND_thread_count); pthread_mutex_unlock((pthread_mutex_t *)LOCK_thread_count); free(param_1); my_thread_end(); return 0; }
45,375
LefDefParser::defiSlot::xl(int) const
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiSlot.cpp
int defiSlot::xl(int index) const { char msg[160]; if (index < 0 || index >= numRectangles_) { sprintf (msg, "ERROR (DEFPARS-6160): The index number %d specified for the SLOT RECTANGLE is invalid.\nValid index number is from 0 to %d. Specify a valid index number and then try again.", index, numRectangles_); defiError(0, 6160, msg, defData); return 0; } return xl_[index]; }
O3
cpp
LefDefParser::defiSlot::xl(int) const: pushq %rbp pushq %r14 pushq %rbx subq $0xa0, %rsp movl %esi, %edx movq %rdi, %rbx testl %esi, %esi setns %al movl 0x14(%rdi), %ecx cmpl %esi, %ecx setg %sil testb %sil, %al je 0x2ce26 movq 0x20(%rbx), %rax movl %edx, %ecx movl (%rax,%rcx,4), %ebp jmp 0x2ce4f leaq 0x16e3f(%rip), %rsi # 0x43c6c xorl %ebp, %ebp movq %rsp, %r14 movq %r14, %rdi xorl %eax, %eax callq 0x6060 movq 0x50(%rbx), %rcx xorl %edi, %edi movl $0x1810, %esi # imm = 0x1810 movq %r14, %rdx callq 0x18f80 movl %ebp, %eax addq $0xa0, %rsp popq %rbx popq %r14 popq %rbp retq nop
_ZNK12LefDefParser8defiSlot2xlEi: push rbp push r14 push rbx sub rsp, 0A0h mov edx, esi mov rbx, rdi test esi, esi setns al mov ecx, [rdi+14h] cmp ecx, esi setnle sil test al, sil jz short loc_2CE26 mov rax, [rbx+20h] mov ecx, edx mov ebp, [rax+rcx*4] jmp short loc_2CE4F loc_2CE26: lea rsi, aErrorDefpars61_9; "ERROR (DEFPARS-6160): The index number "... xor ebp, ebp mov r14, rsp mov rdi, r14 xor eax, eax call _sprintf mov rcx, [rbx+50h]; LefDefParser::defrData * xor edi, edi; this mov esi, 1810h; int mov rdx, r14; char * call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *) loc_2CE4F: mov eax, ebp add rsp, 0A0h pop rbx pop r14 pop rbp retn
long long LefDefParser::defiSlot::xl(LefDefParser::defiSlot *this, signed int a2) { int v2; // ecx unsigned int v3; // ebp LefDefParser::defrData *v4; // r8 char v6[184]; // [rsp+0h] [rbp-B8h] BYREF v2 = *((_DWORD *)this + 5); if ( v2 > a2 && a2 >= 0 ) { return *(unsigned int *)(*((_QWORD *)this + 4) + 4LL * (unsigned int)a2); } else { v3 = 0; sprintf( v6, "ERROR (DEFPARS-6160): The index number %d specified for the SLOT RECTANGLE is invalid.\n" "Valid index number is from 0 to %d. Specify a valid index number and then try again.", a2, v2); LefDefParser::defiError(0LL, 6160, v6, *((LefDefParser::defrData **)this + 10), v4); } return v3; }
xl: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0xa0 MOV EDX,ESI MOV RBX,RDI TEST ESI,ESI SETNS AL MOV ECX,dword ptr [RDI + 0x14] CMP ECX,ESI SETG SIL TEST AL,SIL JZ 0x0012ce26 MOV RAX,qword ptr [RBX + 0x20] MOV ECX,EDX MOV EBP,dword ptr [RAX + RCX*0x4] JMP 0x0012ce4f LAB_0012ce26: LEA RSI,[0x143c6c] XOR EBP,EBP MOV R14,RSP MOV RDI,R14 XOR EAX,EAX CALL 0x00106060 MOV RCX,qword ptr [RBX + 0x50] XOR EDI,EDI MOV ESI,0x1810 MOV RDX,R14 CALL 0x00118f80 LAB_0012ce4f: MOV EAX,EBP ADD RSP,0xa0 POP RBX POP R14 POP RBP RET
/* LefDefParser::defiSlot::xl(int) const */ int4 __thiscall LefDefParser::defiSlot::xl(defiSlot *this,int param_1) { int4 uVar1; char acStack_b8 [160]; if (param_1 < 0 || *(int *)(this + 0x14) <= param_1) { uVar1 = 0; sprintf(acStack_b8, "ERROR (DEFPARS-6160): The index number %d specified for the SLOT RECTANGLE is invalid.\nValid index number is from 0 to %d. Specify a valid index number and then try again." ); defiError(0,0x1810,acStack_b8,*(defrData **)(this + 0x50)); } else { uVar1 = *(int4 *)(*(long *)(this + 0x20) + (ulong)(uint)param_1 * 4); } return uVar1; }
45,376
dirname_part
eloqsql/mysys/mf_dirname.c
size_t dirname_part(char *to, const char *name, size_t *to_res_length) { size_t length; DBUG_ENTER("dirname_part"); DBUG_PRINT("enter",("'%s'",name)); length=dirname_length(name); *to_res_length= (size_t) (convert_dirname(to, name, name+length) - to); DBUG_RETURN(length); }
O0
c
dirname_part: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) jmp 0x2e526 movq -0x10(%rbp), %rdi callq 0x2e490 movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x10(%rbp), %rdx addq -0x20(%rbp), %rdx callq 0x2e570 movq %rax, %rcx movq -0x8(%rbp), %rax subq %rax, %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movq -0x20(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
dirname_part: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx jmp short $+2 loc_2E526: mov rdi, [rbp+var_10] call dirname_length mov [rbp+var_20], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_10] add rdx, [rbp+var_20] call convert_dirname mov rcx, rax mov rax, [rbp+var_8] sub rcx, rax mov rax, [rbp+var_18] mov [rax], rcx mov rax, [rbp+var_20] mov [rbp+var_28], rax mov rax, [rbp+var_28] add rsp, 30h pop rbp retn
long long dirname_part(long long a1, _BYTE *a2, _QWORD *a3) { long long v4; // [rsp+10h] [rbp-20h] v4 = dirname_length(a2); *a3 = convert_dirname(a1, a2, &a2[v4]) - a1; return v4; }
dirname_part: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX JMP 0x0012e526 LAB_0012e526: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0012e490 MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x10] ADD RDX,qword ptr [RBP + -0x20] CALL 0x0012e570 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x8] SUB RCX,RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RSP,0x30 POP RBP RET
long dirname_part(long param_1,long param_2,long *param_3) { long lVar1; long lVar2; lVar1 = dirname_length(param_2); lVar2 = convert_dirname(param_1,param_2,param_2 + lVar1); *param_3 = lVar2 - param_1; return lVar1; }
45,377
my_charpos_mb
eloqsql/strings/ctype-mb.c
size_t my_charpos_mb(CHARSET_INFO *cs __attribute__((unused)), const char *pos, const char *end, size_t length) { const char *start= pos; while (length && pos < end) { uint mb_len; pos+= (mb_len= my_ismbchar(cs, pos, end)) ? mb_len : 1; length--; } return (size_t) (length ? end+2-start : pos-start); }
O3
c
my_charpos_mb: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %r15 movq %rdx, %rbx testq %rcx, %rcx setne %cl sete %al cmpq %rdx, %rsi setae %dl orb %al, %dl movq %rsi, -0x30(%rbp) movq %rsi, %rax jne 0x3a4ca movq %rdi, %r12 decq %r15 movl $0x1, %r14d movq -0x30(%rbp), %rax movq %rax, %r13 movq 0xb8(%r12), %rax movq %r12, %rdi movq %r13, %rsi movq %rbx, %rdx callq *0xc0(%rax) cmpl $0x2, %eax cmovbl %r14d, %eax cmovll %r14d, %eax addq %r13, %rax addq $-0x1, %r15 setb %cl jae 0x3a4ca cmpq %rbx, %rax jb 0x3a494 addq $0x2, %rbx testb %cl, %cl cmoveq %rax, %rbx subq -0x30(%rbp), %rbx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_charpos_mb: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r15, rcx mov rbx, rdx test rcx, rcx setnz cl setz al cmp rsi, rdx setnb dl or dl, al mov [rbp+var_30], rsi mov rax, rsi jnz short loc_3A4CA mov r12, rdi dec r15 mov r14d, 1 mov rax, [rbp+var_30] loc_3A494: mov r13, rax mov rax, [r12+0B8h] mov rdi, r12 mov rsi, r13 mov rdx, rbx call qword ptr [rax+0C0h] cmp eax, 2 cmovb eax, r14d cmovl eax, r14d add rax, r13 add r15, 0FFFFFFFFFFFFFFFFh setb cl jnb short loc_3A4CA cmp rax, rbx jb short loc_3A494 loc_3A4CA: add rbx, 2 test cl, cl cmovz rbx, rax sub rbx, [rbp+var_30] mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long my_charpos_mb(long long a1, unsigned long long a2, unsigned long long a3, long long a4) { long long v4; // r15 bool v6; // zf unsigned long long v7; // rax long long v8; // r15 unsigned long long v9; // r13 long long v10; // rax bool v11; // cc bool v12; // cf unsigned long long v13; // rbx v4 = a4; v6 = a4 == 0; LOBYTE(a4) = a4 != 0; v7 = a2; if ( !v6 && a2 < a3 ) { v8 = v4 - 1; v7 = a2; do { v9 = v7; v10 = (*(long long ( **)(long long, unsigned long long, unsigned long long, long long))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v7, a3, a4); v11 = (int)v10 < 2; if ( (unsigned int)v10 < 2 ) v10 = 1LL; if ( v11 ) v10 = 1LL; v7 = v9 + v10; v12 = v8-- != 0; LOBYTE(a4) = v12; } while ( v12 && v7 < a3 ); } v13 = a3 + 2; if ( !(_BYTE)a4 ) v13 = v7; return v13 - a2; }
my_charpos_mb: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15,RCX MOV RBX,RDX TEST RCX,RCX SETNZ CL SETZ AL CMP RSI,RDX SETNC DL OR DL,AL MOV qword ptr [RBP + -0x30],RSI MOV RAX,RSI JNZ 0x0013a4ca MOV R12,RDI DEC R15 MOV R14D,0x1 MOV RAX,qword ptr [RBP + -0x30] LAB_0013a494: MOV R13,RAX MOV RAX,qword ptr [R12 + 0xb8] MOV RDI,R12 MOV RSI,R13 MOV RDX,RBX CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 CMOVC EAX,R14D CMOVL EAX,R14D ADD RAX,R13 ADD R15,-0x1 SETC CL JNC 0x0013a4ca CMP RAX,RBX JC 0x0013a494 LAB_0013a4ca: ADD RBX,0x2 TEST CL,CL CMOVZ RBX,RAX SUB RBX,qword ptr [RBP + -0x30] MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_charpos_mb(long param_1,ulong param_2,ulong param_3,long param_4) { uint uVar1; ulong uVar2; ulong uVar3; bool bVar4; bVar4 = param_4 != 0; uVar3 = param_2; if (param_2 < param_3 && bVar4) { do { param_4 = param_4 + -1; uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,uVar3,param_3); uVar2 = (ulong)uVar1; if (uVar1 < 2) { uVar2 = 1; } if ((int)uVar1 < 2) { uVar2 = 1; } uVar3 = uVar2 + uVar3; bVar4 = param_4 != 0; } while ((bVar4) && (uVar3 < param_3)); } uVar2 = param_3 + 2; if (!bVar4) { uVar2 = uVar3; } return uVar2 - param_2; }
45,378
hashcmp
eloqsql/mysys/hash.c
static int hashcmp(const HASH *hash, HASH_LINK *pos, const uchar *key, size_t length) { size_t rec_keylength; uchar *rec_key= (uchar*) my_hash_key(hash, pos->data, &rec_keylength, 1); return ((length && length != rec_keylength) || my_strnncoll(hash->charset, (uchar*) rec_key, rec_keylength, (uchar*) key, rec_keylength)); }
O3
c
hashcmp: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rcx, %r15 movq %rdx, %rbx movq %rdi, %r14 movq 0x50(%rdi), %rax testq %rax, %rax je 0x2946c leaq -0x28(%rbp), %r12 movq %rsi, %rdi movq %r12, %rsi movl $0x1, %edx callq *%rax movq %rax, %rsi movq (%r12), %rdx jmp 0x29477 movq 0x8(%r14), %rdx movq %rdx, -0x28(%rbp) addq (%r14), %rsi testq %r15, %r15 sete %al cmpq %r15, %rdx sete %cl orb %al, %cl movl $0x1, %eax cmpb $0x1, %cl jne 0x294af movq 0x68(%r14), %rdi movq 0xc0(%rdi), %rax movq %rbx, %rcx movq %rdx, %r8 xorl %r9d, %r9d callq *0x8(%rax) movl %eax, %ecx xorl %eax, %eax testl %ecx, %ecx setne %al addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
hashcmp: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 10h mov r15, rcx mov rbx, rdx mov r14, rdi mov rax, [rdi+50h] test rax, rax jz short loc_2946C lea r12, [rbp+var_28] mov rdi, rsi mov rsi, r12 mov edx, 1 call rax mov rsi, rax mov rdx, [r12] jmp short loc_29477 loc_2946C: mov rdx, [r14+8] mov [rbp+var_28], rdx add rsi, [r14] loc_29477: test r15, r15 setz al cmp rdx, r15 setz cl or cl, al mov eax, 1 cmp cl, 1 jnz short loc_294AF mov rdi, [r14+68h] mov rax, [rdi+0C0h] mov rcx, rbx mov r8, rdx xor r9d, r9d call qword ptr [rax+8] mov ecx, eax xor eax, eax test ecx, ecx setnz al loc_294AF: add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn
_BOOL8 hashcmp(_QWORD *a1, long long a2, long long a3, long long a4) { long long ( *v6)(long long, _QWORD *, long long); // rax long long v7; // rsi long long v8; // rdx _BOOL8 result; // rax _QWORD v10[5]; // [rsp+8h] [rbp-28h] BYREF v6 = (long long ( *)(long long, _QWORD *, long long))a1[10]; if ( v6 ) { v7 = v6(a2, v10, 1LL); v8 = v10[0]; } else { v8 = a1[1]; v10[0] = v8; v7 = *a1 + a2; } result = 1LL; if ( a4 == 0 || v8 == a4 ) return (*(unsigned int ( **)(_QWORD, long long, long long, long long, long long, _QWORD))(*(_QWORD *)(a1[13] + 192LL) + 8LL))( a1[13], v7, v8, a3, v8, 0LL) != 0; return result; }
hashcmp: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R15,RCX MOV RBX,RDX MOV R14,RDI MOV RAX,qword ptr [RDI + 0x50] TEST RAX,RAX JZ 0x0012946c LEA R12,[RBP + -0x28] MOV RDI,RSI MOV RSI,R12 MOV EDX,0x1 CALL RAX MOV RSI,RAX MOV RDX,qword ptr [R12] JMP 0x00129477 LAB_0012946c: MOV RDX,qword ptr [R14 + 0x8] MOV qword ptr [RBP + -0x28],RDX ADD RSI,qword ptr [R14] LAB_00129477: TEST R15,R15 SETZ AL CMP RDX,R15 SETZ CL OR CL,AL MOV EAX,0x1 CMP CL,0x1 JNZ 0x001294af MOV RDI,qword ptr [R14 + 0x68] MOV RAX,qword ptr [RDI + 0xc0] MOV RCX,RBX MOV R8,RDX XOR R9D,R9D CALL qword ptr [RAX + 0x8] MOV ECX,EAX XOR EAX,EAX TEST ECX,ECX SETNZ AL LAB_001294af: ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET
bool hashcmp(long *param_1,long param_2,int8 param_3,long param_4) { int iVar1; bool bVar2; long local_30; if ((code *)param_1[10] == (code *)0x0) { local_30 = param_1[1]; param_2 = param_2 + *param_1; } else { param_2 = (*(code *)param_1[10])(param_2,&local_30,1); } bVar2 = true; if (local_30 == param_4 || param_4 == 0) { iVar1 = (**(code **)(*(long *)(param_1[0xd] + 0xc0) + 8)) (param_1[0xd],param_2,local_30,param_3,local_30,0); bVar2 = iVar1 != 0; } return bVar2; }
45,379
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 0x3b2acb(%rip), %rdi # 0x3fe7c0 leaq 0x8(%rbx), %rsi movl $0x1, %edx xorl %ecx, %ecx xorl %r8d, %r8d callq 0x3416c cmpb $0x0, 0x51(%rbx) jne 0x4bd47 movl 0x18(%rbx), %r14d leaq 0x33a2f7(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0x58(%rbp), %rdi movl %r14d, %esi movl $0x10, %edx callq *0x158(%rax) testq %rax, %rax jne 0x4bd97 movl $0x10, %esi movl %r14d, %edi callq 0xa147c incq 0x3b1871(%rip) # 0x3fd5b8 movl 0x18(%rbx), %r14d leaq 0x33a2be(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0x58(%rbp), %rdi movl %r14d, %esi movl $0x4, %edx callq *0x158(%rax) testq %rax, %rax jne 0x4bd8a movl $0x10, %esi movl %r14d, %edi callq 0xa055d movq %rbx, %rdi callq 0x9ffb6 addq $0x50, %rsp popq %rbx popq %r14 popq %rbp retq movq %rax, %rdi movl %r14d, %esi callq 0x2c9c0 jmp 0x4bd79 movq %rax, %rdi movl %r14d, %esi callq 0x2c96e jmp 0x4bd40
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_4BD47 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_4BD97 mov esi, 10h mov edi, r14d call my_sync loc_4BD40: inc cs:translog_syncs loc_4BD47: 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_4BD8A mov esi, 10h mov edi, r14d call my_close loc_4BD79: mov rdi, rbx call my_free add rsp, 50h pop rbx pop r14 pop rbp retn loc_4BD8A: mov rdi, rax mov esi, r14d call translog_close_log_file_cold_2 jmp short loc_4BD79 loc_4BD97: mov rdi, rax mov esi, r14d call translog_close_log_file_cold_1 jmp short loc_4BD40
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, 1u, 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 [0x004fe7c0] LEA RSI,[RBX + 0x8] MOV EDX,0x1 XOR ECX,ECX XOR R8D,R8D CALL 0x0013416c CMP byte ptr [RBX + 0x51],0x0 JNZ 0x0014bd47 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 0x0014bd97 MOV ESI,0x10 MOV EDI,R14D CALL 0x001a147c LAB_0014bd40: INC qword ptr [0x004fd5b8] LAB_0014bd47: 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 0x0014bd8a MOV ESI,0x10 MOV EDI,R14D CALL 0x001a055d LAB_0014bd79: MOV RDI,RBX CALL 0x0019ffb6 ADD RSP,0x50 POP RBX POP R14 POP RBP RET LAB_0014bd8a: MOV RDI,RAX MOV ESI,R14D CALL 0x0012c9c0 JMP 0x0014bd79 LAB_0014bd97: MOV RDI,RAX MOV ESI,R14D CALL 0x0012c96e JMP 0x0014bd40
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; }
45,380
my_strtoll10_mb2
eloqsql/strings/ctype-ucs2.c
static longlong my_strtoll10_mb2(CHARSET_INFO *cs __attribute__((unused)), const char *nptr, char **endptr, int *error) { const uchar *s, *end, *start, *n_end, *true_end; uchar UNINIT_VAR(c); unsigned long i, j, k; ulonglong li; int negative; ulong cutoff, cutoff2, cutoff3; my_wc_t wc; int res; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; s= (const uchar *) nptr; /* If fixed length string */ if (endptr) { /* Make sure string length is even. Odd length indicates a bug in the caller. Assert in debug, round in production. */ DBUG_ASSERT((*endptr - (const char *) s) % 2 == 0); end= s + ((*endptr - (const char*) s) / 2) * 2; for ( ; ; ) /* Skip leading spaces and tabs */ { if ((res= mb_wc(cs, &wc, s, end)) <= 0) goto no_conv; s+= res; if (wc != ' ' && wc != '\t') break; } } else { /* We don't support null terminated strings in UCS2 */ goto no_conv; } /* Check for a sign. */ negative= 0; if (wc == '-') { *error= -1; /* Mark as negative number */ negative= 1; if ((res= mb_wc(cs, &wc, s, end)) <= 0) goto no_conv; s+= res; /* wc is now expected to hold the first digit. */ cutoff= MAX_NEGATIVE_NUMBER / LFACTOR2; cutoff2= (MAX_NEGATIVE_NUMBER % LFACTOR2) / 100; cutoff3= MAX_NEGATIVE_NUMBER % 100; } else { *error= 0; if (wc == '+') { if ((res= mb_wc(cs, &wc, s, end)) <= 0) goto no_conv; s+= res; /* wc is now expected to hold the first digit. */ } cutoff= ULONGLONG_MAX / LFACTOR2; cutoff2= ULONGLONG_MAX % LFACTOR2 / 100; cutoff3= ULONGLONG_MAX % 100; } /* The code below assumes that 'wc' holds the first digit and 's' points to the next character after it. Scan pre-zeros if any. */ if (wc == '0') { i= 0; for ( ; ; s+= res) { if (s == end) goto end_i; /* Return 0 */ if ((res= mb_wc(cs, &wc, s, end)) <= 0) goto no_conv; if (wc != '0') break; } n_end= s + 2 * INIT_CNT; } else { /* Read first digit to check that it's a valid number */ if ((i= (wc - '0')) > 9) goto no_conv; n_end= s + 2 * (INIT_CNT-1); } /* Handle first 9 digits and store them in i */ if (n_end > end) n_end= end; for ( ; ; s+= res) { if ((res= mb_wc(cs, &wc, s, n_end)) <= 0) break; if (wc2digit_uchar(&c, wc)) goto end_i; i= i*10+c; } if (s == end) goto end_i; /* Handle next 9 digits and store them in j */ j= 0; start= s; /* Used to know how much to shift i */ n_end= true_end= s + 2 * INIT_CNT; if (n_end > end) n_end= end; do { if ((res= mb_wc(cs, &wc, s, end)) <= 0) goto no_conv; if (wc2digit_uchar(&c, wc)) goto end_i_and_j; s+= res; j= j * 10 + c; } while (s != n_end); if (s == end) { if (s != true_end) goto end_i_and_j; goto end3; } /* Handle the next 1 or 2 digits and store them in k */ if ((res= mb_wc(cs, &wc, s, end)) <= 0) goto no_conv; if ((k= (wc - '0')) > 9) goto end3; s+= res; if (s == end) goto end4; if ((res= mb_wc(cs, &wc, s, end)) <= 0) goto no_conv; if (wc2digit_uchar(&c, wc)) goto end4; s+= res; k= k*10+c; *endptr= (char*) s; /* number string should have ended here */ if (s != end && mb_wc(cs, &wc, s, end) > 0 && ((uchar) (wc - '0')) <= 9) goto overflow; /* Check that we didn't get an overflow with the last digit */ if (i > cutoff || (i == cutoff && ((j > cutoff2 || j == cutoff2) && k > cutoff3))) goto overflow; li=i*LFACTOR2+ (ulonglong) j*100 + k; return (longlong) li; overflow: /* *endptr is set here */ *error= MY_ERRNO_ERANGE; return negative ? LONGLONG_MIN : (longlong) ULONGLONG_MAX; end_i: *endptr= (char*) s; return (negative ? ((longlong) -(long) i) : (longlong) i); end_i_and_j: li= (ulonglong) i * lfactor[(size_t) (s-start) / 2] + j; *endptr= (char*) s; return (negative ? -((longlong) li) : (longlong) li); end3: li=(ulonglong) i*LFACTOR+ (ulonglong) j; *endptr= (char*) s; return (negative ? -((longlong) li) : (longlong) li); end4: li=(ulonglong) i*LFACTOR1+ (ulonglong) j * 10 + k; *endptr= (char*) s; if (negative) { if (li > MAX_NEGATIVE_NUMBER) goto overflow; return -((longlong) li); } return (longlong) li; no_conv: /* There was no number to convert. */ *error= MY_ERRNO_EDOM; *endptr= (char *) nptr; return 0; }
O3
c
my_strtoll10_mb2: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rcx, -0x60(%rbp) movq %rsi, -0x68(%rbp) movq %rdx, -0x48(%rbp) testq %rdx, %rdx je 0xe3cc5 movq %rdi, %r12 movq 0xb8(%rdi), %rax movq 0x28(%rax), %r8 movq -0x48(%rbp), %rax movq (%rax), %rax movq -0x68(%rbp), %rdx subq %rdx, %rax movq %rax, %r15 shrq $0x3f, %r15 addq %rax, %r15 andq $-0x2, %r15 addq %rdx, %r15 leaq -0x30(%rbp), %rsi movq %r15, %rcx movq %r8, -0x38(%rbp) callq *%r8 testl %eax, %eax jle 0xe3cc5 leaq -0x30(%rbp), %rbx movq -0x68(%rbp), %r13 movq %r13, %rcx movl %eax, %r13d addq %rcx, %r13 movq -0x30(%rbp), %r14 cmpq $0x20, %r14 je 0xe3cb2 cmpq $0x9, %r14 jne 0xe3ceb movq %r12, %rdi movq %rbx, %rsi movq %r13, %rdx movq %r15, %rcx callq *-0x38(%rbp) testl %eax, %eax jg 0xe3c99 movq -0x60(%rbp), %rax movl $0x21, (%rax) movq -0x48(%rbp), %rax movq -0x68(%rbp), %rcx movq %rcx, (%rax) xorl %eax, %eax addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpq $0x2d, %r14 jne 0xe3d31 movq -0x60(%rbp), %rax movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF leaq -0x30(%rbp), %rsi movq %r12, %rdi movq %r13, %rdx movq %r15, %rcx callq *-0x38(%rbp) testl %eax, %eax jle 0xe3cc5 movl %eax, %eax addq %rax, %r13 movl $0x8, %eax movq %rax, -0x70(%rbp) movl $0x15f797ae, %eax # imm = 0x15F797AE movq %rax, -0x78(%rbp) movl $0x57f5ff8, %eax # imm = 0x57F5FF8 movq %rax, -0x58(%rbp) jmp 0xe3d79 movq -0x60(%rbp), %rax movl $0x0, (%rax) movl $0xf, %eax movq %rax, -0x70(%rbp) movl $0x2bef2f5c, %eax # imm = 0x2BEF2F5C movq %rax, -0x78(%rbp) movl $0xafebff0, %eax # imm = 0xAFEBFF0 movq %rax, -0x58(%rbp) cmpq $0x2b, %r14 jne 0xe3d79 leaq -0x30(%rbp), %rsi movq %r12, %rdi movq %r13, %rdx movq %r15, %rcx callq *-0x38(%rbp) testl %eax, %eax jle 0xe3cc5 movl %eax, %eax addq %rax, %r13 movq -0x30(%rbp), %rax cmpq $0x30, %rax jne 0xe3dbb cmpq %r15, %r13 je 0xe3db4 leaq -0x30(%rbp), %rbx movq %r12, %rdi movq %rbx, %rsi movq %r13, %rdx movq %r15, %rcx callq *-0x38(%rbp) testl %eax, %eax jle 0xe3cc5 cmpq $0x30, -0x30(%rbp) jne 0xe3dd2 movl %eax, %eax addq %rax, %r13 cmpq %r15, %r13 jne 0xe3d8c xorl %ebx, %ebx jmp 0xe3f88 addq $-0x30, %rax cmpq $0x9, %rax ja 0xe3cc5 movq %rax, %rbx leaq 0x10(%r13), %rcx jmp 0xe3dd8 leaq 0x12(%r13), %rcx xorl %ebx, %ebx cmpq %r15, %rcx cmovaq %r15, %rcx leaq -0x30(%rbp), %rsi movq %r12, %rdi movq %r13, %rdx movq %rcx, -0x40(%rbp) callq *-0x38(%rbp) testl %eax, %eax jle 0xe3e2e movq -0x30(%rbp), %rcx cmpq $0x39, %rcx ja 0xe3f85 addb $-0x30, %cl cmpb $0x9, %cl ja 0xe3f85 leaq (%rbx,%rbx,4), %rdx movzbl %cl, %ecx leaq (%rcx,%rdx,2), %rbx movl %eax, %eax addq %rax, %r13 movq %r12, %rdi leaq -0x30(%rbp), %rsi movq %r13, %rdx movq -0x40(%rbp), %rcx jmp 0xe3ded cmpq %r15, %r13 je 0xe3f88 movq %rbx, -0x50(%rbp) leaq 0x12(%r13), %rax cmpq %r15, %rax cmovaq %r15, %rax movq %rax, -0x80(%rbp) xorl %ebx, %ebx xorl %esi, %esi movq %rsi, -0x40(%rbp) leaq (%rbx,%r13), %rdx movq %r12, %rdi leaq -0x30(%rbp), %rsi movq %rdx, -0x88(%rbp) movq %r15, %rcx callq *-0x38(%rbp) testl %eax, %eax jle 0xe3cc5 movq -0x30(%rbp), %rcx cmpq $0x39, %rcx ja 0xe3fa2 addb $-0x30, %cl cmpb $0x9, %cl movq -0x40(%rbp), %rsi ja 0xe3fa6 movl %eax, %eax addq %rax, %rbx leaq (%rbx,%r13), %r8 leaq (%rsi,%rsi,4), %rax movzbl %cl, %ecx leaq (%rcx,%rax,2), %rsi cmpq -0x80(%rbp), %r8 jne 0xe3e4e cmpq %r15, -0x80(%rbp) je 0xe3fe4 movq %rsi, -0x40(%rbp) leaq -0x30(%rbp), %rsi movq %r12, %rdi movq %r8, %rbx movq %r8, %rdx movq %r15, %rcx callq *-0x38(%rbp) testl %eax, %eax jle 0xe3cc5 movq -0x30(%rbp), %r13 addq $-0x30, %r13 cmpq $0x9, %r13 movq -0x40(%rbp), %rsi movq %rbx, %r8 ja 0xe3fea movl %eax, %eax addq %rax, %r8 cmpq %r15, %r8 je 0xe400f leaq -0x30(%rbp), %rsi movq %r12, %rdi movq %r8, %rbx movq %r8, %rdx movq %r15, %rcx callq *-0x38(%rbp) testl %eax, %eax jle 0xe3cc5 movq -0x30(%rbp), %rcx cmpq $0x39, %rcx movq -0x40(%rbp), %rsi movq %rbx, %r8 ja 0xe400f addb $-0x30, %cl cmpb $0x9, %cl ja 0xe400f movq %rcx, %rbx movl %eax, %eax addq %rax, %r8 movq -0x48(%rbp), %rax movq %r8, (%rax) cmpq %r15, %r8 je 0xe4074 movq %r8, %rdx leaq -0x30(%rbp), %rsi movq %r12, %rdi movq %r15, %rcx callq *-0x38(%rbp) testl %eax, %eax jle 0xe4074 movl $0xd0, %eax addl -0x30(%rbp), %eax andl $0xfe, %eax cmpl $0xa, %eax movq -0x50(%rbp), %rdx jae 0xe4078 jmp 0xe404c movq %r13, %r15 movq %rbx, %rax negq %rax cmpq $0x2d, %r14 movq -0x48(%rbp), %rcx movq %r15, (%rcx) cmovneq %rbx, %rax jmp 0xe3cdc movq -0x40(%rbp), %rsi movq -0x88(%rbp), %r15 movq %r15, %rax subq %r13, %rax andq $-0x2, %rax leaq 0x216b52(%rip), %rcx # 0x2fab10 movq -0x50(%rbp), %rdx imulq (%rcx,%rax,4), %rdx addq %rsi, %rdx movq %rdx, %rax negq %rax cmpq $0x2d, %r14 movq -0x48(%rbp), %rcx movq %r15, (%rcx) cmovneq %rdx, %rax jmp 0xe3cdc cmpq $0x12, %rbx jne 0xe3fad imulq $0x3b9aca00, -0x50(%rbp), %rax # imm = 0x3B9ACA00 addq %rax, %rsi movq %rsi, %rax negq %rax cmpq $0x2d, %r14 movq -0x48(%rbp), %rcx movq %r8, (%rcx) cmovneq %rsi, %rax jmp 0xe3cdc movabsq $0x2540be400, %rax # imm = 0x2540BE400 movq -0x50(%rbp), %rcx imulq %rax, %rcx leaq (%rsi,%rsi,4), %rax leaq (%rcx,%rax,2), %rax addq %r13, %rax movq -0x48(%rbp), %rcx movq %r8, (%rcx) cmpq $0x2d, %r14 jne 0xe3cdc movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 cmpq %rcx, %rax jbe 0xe406c xorl %eax, %eax cmpq $0x2d, %r14 setne %al movq -0x60(%rbp), %rcx movl $0x22, (%rcx) negq %rax btsq $0x3f, %rax jmp 0xe3cdc negq %rax jmp 0xe3cdc movq -0x50(%rbp), %rdx cmpq -0x58(%rbp), %rdx ja 0xe404c leaq (,%r13,4), %rax addq %r13, %rax movzbl %bl, %ecx leaq (%rcx,%rax,2), %rax cmpq -0x58(%rbp), %rdx jne 0xe40a6 movq -0x40(%rbp), %rcx cmpq -0x78(%rbp), %rcx jb 0xe40a6 cmpq -0x70(%rbp), %rax ja 0xe404c movabsq $0x174876e800, %rcx # imm = 0x174876E800 imulq %rcx, %rdx imulq $0x64, -0x40(%rbp), %rcx addq %rax, %rdx addq %rcx, %rdx movq %rdx, %rax jmp 0xe3cdc
my_strtoll10_mb2: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov [rbp+var_60], rcx mov [rbp+var_68], rsi mov [rbp+var_48], rdx test rdx, rdx jz short loc_E3CC5 mov r12, rdi mov rax, [rdi+0B8h] mov r8, [rax+28h] mov rax, [rbp+var_48] mov rax, [rax] mov rdx, [rbp+var_68] sub rax, rdx mov r15, rax shr r15, 3Fh add r15, rax and r15, 0FFFFFFFFFFFFFFFEh add r15, rdx lea rsi, [rbp+var_30] mov rcx, r15 mov [rbp+var_38], r8 call r8 test eax, eax jle short loc_E3CC5 lea rbx, [rbp+var_30] mov r13, [rbp+var_68] loc_E3C99: mov rcx, r13 mov r13d, eax add r13, rcx mov r14, [rbp+var_30] cmp r14, 20h ; ' ' jz short loc_E3CB2 cmp r14, 9 jnz short loc_E3CEB loc_E3CB2: mov rdi, r12 mov rsi, rbx mov rdx, r13 mov rcx, r15 call [rbp+var_38] test eax, eax jg short loc_E3C99 loc_E3CC5: mov rax, [rbp+var_60] mov dword ptr [rax], 21h ; '!' mov rax, [rbp+var_48] mov rcx, [rbp+var_68] mov [rax], rcx xor eax, eax loc_E3CDC: add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_E3CEB: cmp r14, 2Dh ; '-' jnz short loc_E3D31 mov rax, [rbp+var_60] mov dword ptr [rax], 0FFFFFFFFh lea rsi, [rbp+var_30] mov rdi, r12 mov rdx, r13 mov rcx, r15 call [rbp+var_38] test eax, eax jle short loc_E3CC5 mov eax, eax add r13, rax mov eax, 8 mov [rbp+var_70], rax mov eax, 15F797AEh mov [rbp+var_78], rax mov eax, 57F5FF8h mov [rbp+var_58], rax jmp short loc_E3D79 loc_E3D31: mov rax, [rbp+var_60] mov dword ptr [rax], 0 mov eax, 0Fh mov [rbp+var_70], rax mov eax, 2BEF2F5Ch mov [rbp+var_78], rax mov eax, 0AFEBFF0h mov [rbp+var_58], rax cmp r14, 2Bh ; '+' jnz short loc_E3D79 lea rsi, [rbp+var_30] mov rdi, r12 mov rdx, r13 mov rcx, r15 call [rbp+var_38] test eax, eax jle loc_E3CC5 mov eax, eax add r13, rax loc_E3D79: mov rax, [rbp+var_30] cmp rax, 30h ; '0' jnz short loc_E3DBB cmp r13, r15 jz short loc_E3DB4 lea rbx, [rbp+var_30] loc_E3D8C: mov rdi, r12 mov rsi, rbx mov rdx, r13 mov rcx, r15 call [rbp+var_38] test eax, eax jle loc_E3CC5 cmp [rbp+var_30], 30h ; '0' jnz short loc_E3DD2 mov eax, eax add r13, rax cmp r13, r15 jnz short loc_E3D8C loc_E3DB4: xor ebx, ebx jmp loc_E3F88 loc_E3DBB: add rax, 0FFFFFFFFFFFFFFD0h cmp rax, 9 ja loc_E3CC5 mov rbx, rax lea rcx, [r13+10h] jmp short loc_E3DD8 loc_E3DD2: lea rcx, [r13+12h] xor ebx, ebx loc_E3DD8: cmp rcx, r15 cmova rcx, r15 lea rsi, [rbp+var_30] mov rdi, r12 mov rdx, r13 mov [rbp+var_40], rcx loc_E3DED: call [rbp+var_38] test eax, eax jle short loc_E3E2E mov rcx, [rbp+var_30] cmp rcx, 39h ; '9' ja loc_E3F85 add cl, 0D0h cmp cl, 9 ja loc_E3F85 lea rdx, [rbx+rbx*4] movzx ecx, cl lea rbx, [rcx+rdx*2] mov eax, eax add r13, rax mov rdi, r12 lea rsi, [rbp+var_30] mov rdx, r13 mov rcx, [rbp+var_40] jmp short loc_E3DED loc_E3E2E: cmp r13, r15 jz loc_E3F88 mov [rbp+var_50], rbx lea rax, [r13+12h] cmp rax, r15 cmova rax, r15 mov [rbp+var_80], rax xor ebx, ebx xor esi, esi loc_E3E4E: mov [rbp+var_40], rsi lea rdx, [rbx+r13] mov rdi, r12 lea rsi, [rbp+var_30] mov [rbp+var_88], rdx mov rcx, r15 call [rbp+var_38] test eax, eax jle loc_E3CC5 mov rcx, [rbp+var_30] cmp rcx, 39h ; '9' ja loc_E3FA2 add cl, 0D0h cmp cl, 9 mov rsi, [rbp+var_40] ja loc_E3FA6 mov eax, eax add rbx, rax lea r8, [rbx+r13] lea rax, [rsi+rsi*4] movzx ecx, cl lea rsi, [rcx+rax*2] cmp r8, [rbp+var_80] jnz short loc_E3E4E cmp [rbp+var_80], r15 jz loc_E3FE4 mov [rbp+var_40], rsi lea rsi, [rbp+var_30] mov rdi, r12 mov rbx, r8 mov rdx, r8 mov rcx, r15 call [rbp+var_38] test eax, eax jle loc_E3CC5 mov r13, [rbp+var_30] add r13, 0FFFFFFFFFFFFFFD0h cmp r13, 9 mov rsi, [rbp+var_40] mov r8, rbx ja loc_E3FEA mov eax, eax add r8, rax cmp r8, r15 jz loc_E400F lea rsi, [rbp+var_30] mov rdi, r12 mov rbx, r8 mov rdx, r8 mov rcx, r15 call [rbp+var_38] test eax, eax jle loc_E3CC5 mov rcx, [rbp+var_30] cmp rcx, 39h ; '9' mov rsi, [rbp+var_40] mov r8, rbx ja loc_E400F add cl, 0D0h cmp cl, 9 ja loc_E400F mov rbx, rcx mov eax, eax add r8, rax mov rax, [rbp+var_48] mov [rax], r8 cmp r8, r15 jz loc_E4074 mov rdx, r8 lea rsi, [rbp+var_30] mov rdi, r12 mov rcx, r15 call [rbp+var_38] test eax, eax jle loc_E4074 mov eax, 0D0h add eax, dword ptr [rbp+var_30] and eax, 0FEh cmp eax, 0Ah mov rdx, [rbp+var_50] jnb loc_E4078 jmp loc_E404C loc_E3F85: mov r15, r13 loc_E3F88: mov rax, rbx neg rax cmp r14, 2Dh ; '-' mov rcx, [rbp+var_48] mov [rcx], r15 cmovnz rax, rbx jmp loc_E3CDC loc_E3FA2: mov rsi, [rbp+var_40] loc_E3FA6: mov r15, [rbp+var_88] loc_E3FAD: mov rax, r15 sub rax, r13 and rax, 0FFFFFFFFFFFFFFFEh lea rcx, lfactor mov rdx, [rbp+var_50] imul rdx, [rcx+rax*4] add rdx, rsi mov rax, rdx neg rax cmp r14, 2Dh ; '-' mov rcx, [rbp+var_48] mov [rcx], r15 cmovnz rax, rdx jmp loc_E3CDC loc_E3FE4: cmp rbx, 12h jnz short loc_E3FAD loc_E3FEA: imul rax, [rbp+var_50], 3B9ACA00h add rsi, rax mov rax, rsi neg rax cmp r14, 2Dh ; '-' mov rcx, [rbp+var_48] mov [rcx], r8 cmovnz rax, rsi jmp loc_E3CDC loc_E400F: mov rax, 2540BE400h mov rcx, [rbp+var_50] imul rcx, rax lea rax, [rsi+rsi*4] lea rax, [rcx+rax*2] add rax, r13 mov rcx, [rbp+var_48] mov [rcx], r8 cmp r14, 2Dh ; '-' jnz loc_E3CDC mov rcx, 8000000000000000h cmp rax, rcx jbe short loc_E406C loc_E404C: xor eax, eax cmp r14, 2Dh ; '-' setnz al mov rcx, [rbp+var_60] mov dword ptr [rcx], 22h ; '"' neg rax bts rax, 3Fh ; '?' jmp loc_E3CDC loc_E406C: neg rax jmp loc_E3CDC loc_E4074: mov rdx, [rbp+var_50] loc_E4078: cmp rdx, [rbp+var_58] ja short loc_E404C lea rax, ds:0[r13*4] add rax, r13 movzx ecx, bl lea rax, [rcx+rax*2] cmp rdx, [rbp+var_58] jnz short loc_E40A6 mov rcx, [rbp+var_40] cmp rcx, [rbp+var_78] jb short loc_E40A6 cmp rax, [rbp+var_70] ja short loc_E404C loc_E40A6: mov rcx, 174876E800h imul rdx, rcx imul rcx, [rbp+var_40], 64h ; 'd' add rdx, rax add rdx, rcx mov rax, rdx jmp loc_E3CDC
unsigned long long my_strtoll10_mb2(long long a1, long long a2, unsigned long long *a3, _DWORD *a4) { long long v4; // r12 unsigned long long v5; // r15 int v6; // eax unsigned long long v7; // r13 long long v8; // r14 unsigned long long result; // rax int v10; // eax int v11; // eax int v12; // eax long long v13; // rbx unsigned long long i; // rdx int v15; // eax unsigned long long v16; // rax long long v17; // rbx long long v18; // rsi int v19; // eax unsigned long long v20; // r8 unsigned long long v21; // rbx int v22; // eax long long v23; // r13 unsigned long long v24; // r8 unsigned long long v25; // rbx int v26; // eax unsigned __int8 v27; // bl unsigned long long v28; // r8 unsigned long long v29; // rdx long long v30; // rdx long long v31; // rsi unsigned long long v32; // rax unsigned long long v33; // [rsp+10h] [rbp-80h] unsigned long long v34; // [rsp+18h] [rbp-78h] unsigned long long v35; // [rsp+20h] [rbp-70h] unsigned long long v38; // [rsp+38h] [rbp-58h] long long v39; // [rsp+40h] [rbp-50h] long long v41; // [rsp+50h] [rbp-40h] unsigned long long v42; // [rsp+50h] [rbp-40h] long long ( *v43)(long long, _QWORD *, long long, unsigned long long); // [rsp+58h] [rbp-38h] _QWORD v44[6]; // [rsp+60h] [rbp-30h] BYREF if ( !a3 ) goto LABEL_7; v4 = a1; v5 = a2 + ((*a3 - a2 + ((*a3 - a2) >> 63)) & 0xFFFFFFFFFFFFFFFELL); v43 = *(long long ( **)(long long, _QWORD *, long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 40LL); v6 = v43(a1, v44, a2, v5); if ( v6 <= 0 ) goto LABEL_7; v7 = a2; while ( 1 ) { v7 += (unsigned int)v6; v8 = v44[0]; if ( v44[0] != 32LL && v44[0] != 9LL ) break; v6 = v43(a1, v44, v7, v5); if ( v6 <= 0 ) goto LABEL_7; } if ( v44[0] == 45LL ) { *a4 = -1; v10 = v43(a1, v44, v7, v5); if ( v10 <= 0 ) goto LABEL_7; v7 += (unsigned int)v10; v35 = 8LL; v34 = 368547758LL; v38 = 92233720LL; } else { *a4 = 0; v35 = 15LL; v34 = 737095516LL; v38 = 184467440LL; if ( v8 == 43 ) { v11 = v43(a1, v44, v7, v5); if ( v11 <= 0 ) goto LABEL_7; v7 += (unsigned int)v11; } } if ( v44[0] == 48LL ) { if ( v7 == v5 ) { LABEL_20: v13 = 0LL; goto LABEL_49; } while ( 1 ) { v12 = v43(a1, v44, v7, v5); if ( v12 <= 0 ) goto LABEL_7; if ( v44[0] != 48LL ) break; v7 += (unsigned int)v12; if ( v7 == v5 ) goto LABEL_20; } v13 = 0LL; goto LABEL_24; } if ( (unsigned long long)(v44[0] - 48LL) > 9 ) { LABEL_7: *a4 = 33; *a3 = a2; return 0LL; } v13 = v44[0] - 48LL; LABEL_24: for ( i = v7; ; i = v7 ) { v15 = ((long long ( *)(long long, _QWORD *, unsigned long long))v43)(a1, v44, i); if ( v15 <= 0 ) break; if ( v44[0] > 0x39uLL || (unsigned __int8)(LOBYTE(v44[0]) - 48) > 9u ) { v5 = v7; LABEL_49: result = -v13; *a3 = v5; if ( v8 != 45 ) return v13; return result; } v13 = (unsigned __int8)(LOBYTE(v44[0]) - 48) + 10 * v13; v7 += (unsigned int)v15; a1 = v4; } if ( v7 == v5 ) goto LABEL_49; v39 = v13; v16 = v7 + 18; if ( v7 + 18 > v5 ) v16 = v5; v33 = v16; v17 = 0LL; v18 = 0LL; do { v41 = v18; v19 = v43(v4, v44, v17 + v7, v5); if ( v19 <= 0 ) goto LABEL_7; if ( v44[0] > 0x39uLL || (unsigned __int8)(LOBYTE(v44[0]) - 48) > 9u ) { v5 = v17 + v7; goto LABEL_53; } v17 += (unsigned int)v19; v20 = v17 + v7; v18 = (unsigned __int8)(LOBYTE(v44[0]) - 48) + 10 * v18; } while ( v17 + v7 != v33 ); if ( v33 == v5 ) { if ( v17 == 18 ) { LABEL_57: v31 = 1000000000 * v39 + v18; result = -v31; *a3 = v20; if ( v8 != 45 ) return v31; return result; } LABEL_53: v30 = v18 + *(_QWORD *)((char *)&lfactor + 4 * ((v5 - v7) & 0xFFFFFFFFFFFFFFFELL)) * v39; result = -v30; *a3 = v5; if ( v8 != 45 ) return v30; return result; } v42 = (unsigned __int8)(LOBYTE(v44[0]) - 48) + 10 * v41; v21 = v17 + v7; v22 = v43(v4, v44, v20, v5); if ( v22 <= 0 ) goto LABEL_7; v23 = v44[0] - 48LL; v20 = v21; if ( (unsigned long long)(v44[0] - 48LL) > 9 ) goto LABEL_57; v24 = (unsigned int)v22 + v21; if ( v24 == v5 ) goto LABEL_60; v25 = (unsigned int)v22 + v21; v26 = v43(v4, v44, v24, v5); if ( v26 <= 0 ) goto LABEL_7; v24 = v25; if ( v44[0] > 0x39uLL || (unsigned __int8)(LOBYTE(v44[0]) - 48) > 9u ) { LABEL_60: result = v23 + 10000000000LL * v39 + 10 * v18; *a3 = v24; if ( v8 != 45 ) return result; if ( result > 0x8000000000000000LL ) goto LABEL_62; return -(long long)result; } else { v27 = LOBYTE(v44[0]) - 48; v28 = (unsigned int)v26 + v24; *a3 = v28; if ( v28 == v5 || (int)v43(v4, v44, v28, v5) <= 0 ) { v29 = v39; } else { v29 = v39; if ( ((LOBYTE(v44[0]) - 48) & 0xFEu) < 0xA ) { LABEL_62: *a4 = 34; return -(long long)(v8 != 45) | 0x8000000000000000LL; } } if ( v29 > v38 ) goto LABEL_62; v32 = v27 + 10 * v23; if ( v29 == v38 && v42 >= v34 && v32 > v35 ) goto LABEL_62; return 100 * v42 + v32 + 100000000000LL * v29; } }
my_strtoll10_mb2: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV qword ptr [RBP + -0x60],RCX MOV qword ptr [RBP + -0x68],RSI MOV qword ptr [RBP + -0x48],RDX TEST RDX,RDX JZ 0x001e3cc5 MOV R12,RDI MOV RAX,qword ptr [RDI + 0xb8] MOV R8,qword ptr [RAX + 0x28] MOV RAX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x68] SUB RAX,RDX MOV R15,RAX SHR R15,0x3f ADD R15,RAX AND R15,-0x2 ADD R15,RDX LEA RSI,[RBP + -0x30] MOV RCX,R15 MOV qword ptr [RBP + -0x38],R8 CALL R8 TEST EAX,EAX JLE 0x001e3cc5 LEA RBX,[RBP + -0x30] MOV R13,qword ptr [RBP + -0x68] LAB_001e3c99: MOV RCX,R13 MOV R13D,EAX ADD R13,RCX MOV R14,qword ptr [RBP + -0x30] CMP R14,0x20 JZ 0x001e3cb2 CMP R14,0x9 JNZ 0x001e3ceb LAB_001e3cb2: MOV RDI,R12 MOV RSI,RBX MOV RDX,R13 MOV RCX,R15 CALL qword ptr [RBP + -0x38] TEST EAX,EAX JG 0x001e3c99 LAB_001e3cc5: MOV RAX,qword ptr [RBP + -0x60] MOV dword ptr [RAX],0x21 MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x68] MOV qword ptr [RAX],RCX XOR EAX,EAX LAB_001e3cdc: ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001e3ceb: CMP R14,0x2d JNZ 0x001e3d31 MOV RAX,qword ptr [RBP + -0x60] MOV dword ptr [RAX],0xffffffff LEA RSI,[RBP + -0x30] MOV RDI,R12 MOV RDX,R13 MOV RCX,R15 CALL qword ptr [RBP + -0x38] TEST EAX,EAX JLE 0x001e3cc5 MOV EAX,EAX ADD R13,RAX MOV EAX,0x8 MOV qword ptr [RBP + -0x70],RAX MOV EAX,0x15f797ae MOV qword ptr [RBP + -0x78],RAX MOV EAX,0x57f5ff8 MOV qword ptr [RBP + -0x58],RAX JMP 0x001e3d79 LAB_001e3d31: MOV RAX,qword ptr [RBP + -0x60] MOV dword ptr [RAX],0x0 MOV EAX,0xf MOV qword ptr [RBP + -0x70],RAX MOV EAX,0x2bef2f5c MOV qword ptr [RBP + -0x78],RAX MOV EAX,0xafebff0 MOV qword ptr [RBP + -0x58],RAX CMP R14,0x2b JNZ 0x001e3d79 LEA RSI,[RBP + -0x30] MOV RDI,R12 MOV RDX,R13 MOV RCX,R15 CALL qword ptr [RBP + -0x38] TEST EAX,EAX JLE 0x001e3cc5 MOV EAX,EAX ADD R13,RAX LAB_001e3d79: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,0x30 JNZ 0x001e3dbb CMP R13,R15 JZ 0x001e3db4 LEA RBX,[RBP + -0x30] LAB_001e3d8c: MOV RDI,R12 MOV RSI,RBX MOV RDX,R13 MOV RCX,R15 CALL qword ptr [RBP + -0x38] TEST EAX,EAX JLE 0x001e3cc5 CMP qword ptr [RBP + -0x30],0x30 JNZ 0x001e3dd2 MOV EAX,EAX ADD R13,RAX CMP R13,R15 JNZ 0x001e3d8c LAB_001e3db4: XOR EBX,EBX JMP 0x001e3f88 LAB_001e3dbb: ADD RAX,-0x30 CMP RAX,0x9 JA 0x001e3cc5 MOV RBX,RAX LEA RCX,[R13 + 0x10] JMP 0x001e3dd8 LAB_001e3dd2: LEA RCX,[R13 + 0x12] XOR EBX,EBX LAB_001e3dd8: CMP RCX,R15 CMOVA RCX,R15 LEA RSI,[RBP + -0x30] MOV RDI,R12 MOV RDX,R13 MOV qword ptr [RBP + -0x40],RCX LAB_001e3ded: CALL qword ptr [RBP + -0x38] TEST EAX,EAX JLE 0x001e3e2e MOV RCX,qword ptr [RBP + -0x30] CMP RCX,0x39 JA 0x001e3f85 ADD CL,0xd0 CMP CL,0x9 JA 0x001e3f85 LEA RDX,[RBX + RBX*0x4] MOVZX ECX,CL LEA RBX,[RCX + RDX*0x2] MOV EAX,EAX ADD R13,RAX MOV RDI,R12 LEA RSI,[RBP + -0x30] MOV RDX,R13 MOV RCX,qword ptr [RBP + -0x40] JMP 0x001e3ded LAB_001e3e2e: CMP R13,R15 JZ 0x001e3f88 MOV qword ptr [RBP + -0x50],RBX LEA RAX,[R13 + 0x12] CMP RAX,R15 CMOVA RAX,R15 MOV qword ptr [RBP + -0x80],RAX XOR EBX,EBX XOR ESI,ESI LAB_001e3e4e: MOV qword ptr [RBP + -0x40],RSI LEA RDX,[RBX + R13*0x1] MOV RDI,R12 LEA RSI,[RBP + -0x30] MOV qword ptr [RBP + -0x88],RDX MOV RCX,R15 CALL qword ptr [RBP + -0x38] TEST EAX,EAX JLE 0x001e3cc5 MOV RCX,qword ptr [RBP + -0x30] CMP RCX,0x39 JA 0x001e3fa2 ADD CL,0xd0 CMP CL,0x9 MOV RSI,qword ptr [RBP + -0x40] JA 0x001e3fa6 MOV EAX,EAX ADD RBX,RAX LEA R8,[RBX + R13*0x1] LEA RAX,[RSI + RSI*0x4] MOVZX ECX,CL LEA RSI,[RCX + RAX*0x2] CMP R8,qword ptr [RBP + -0x80] JNZ 0x001e3e4e CMP qword ptr [RBP + -0x80],R15 JZ 0x001e3fe4 MOV qword ptr [RBP + -0x40],RSI LEA RSI,[RBP + -0x30] MOV RDI,R12 MOV RBX,R8 MOV RDX,R8 MOV RCX,R15 CALL qword ptr [RBP + -0x38] TEST EAX,EAX JLE 0x001e3cc5 MOV R13,qword ptr [RBP + -0x30] ADD R13,-0x30 CMP R13,0x9 MOV RSI,qword ptr [RBP + -0x40] MOV R8,RBX JA 0x001e3fea MOV EAX,EAX ADD R8,RAX CMP R8,R15 JZ 0x001e400f LEA RSI,[RBP + -0x30] MOV RDI,R12 MOV RBX,R8 MOV RDX,R8 MOV RCX,R15 CALL qword ptr [RBP + -0x38] TEST EAX,EAX JLE 0x001e3cc5 MOV RCX,qword ptr [RBP + -0x30] CMP RCX,0x39 MOV RSI,qword ptr [RBP + -0x40] MOV R8,RBX JA 0x001e400f ADD CL,0xd0 CMP CL,0x9 JA 0x001e400f MOV RBX,RCX MOV EAX,EAX ADD R8,RAX MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RAX],R8 CMP R8,R15 JZ 0x001e4074 MOV RDX,R8 LEA RSI,[RBP + -0x30] MOV RDI,R12 MOV RCX,R15 CALL qword ptr [RBP + -0x38] TEST EAX,EAX JLE 0x001e4074 MOV EAX,0xd0 ADD EAX,dword ptr [RBP + -0x30] AND EAX,0xfe CMP EAX,0xa MOV RDX,qword ptr [RBP + -0x50] JNC 0x001e4078 JMP 0x001e404c LAB_001e3f85: MOV R15,R13 LAB_001e3f88: MOV RAX,RBX NEG RAX CMP R14,0x2d MOV RCX,qword ptr [RBP + -0x48] MOV qword ptr [RCX],R15 CMOVNZ RAX,RBX JMP 0x001e3cdc LAB_001e3fa2: MOV RSI,qword ptr [RBP + -0x40] LAB_001e3fa6: MOV R15,qword ptr [RBP + -0x88] LAB_001e3fad: MOV RAX,R15 SUB RAX,R13 AND RAX,-0x2 LEA RCX,[0x3fab10] MOV RDX,qword ptr [RBP + -0x50] IMUL RDX,qword ptr [RCX + RAX*0x4] ADD RDX,RSI MOV RAX,RDX NEG RAX CMP R14,0x2d MOV RCX,qword ptr [RBP + -0x48] MOV qword ptr [RCX],R15 CMOVNZ RAX,RDX JMP 0x001e3cdc LAB_001e3fe4: CMP RBX,0x12 JNZ 0x001e3fad LAB_001e3fea: IMUL RAX,qword ptr [RBP + -0x50],0x3b9aca00 ADD RSI,RAX MOV RAX,RSI NEG RAX CMP R14,0x2d MOV RCX,qword ptr [RBP + -0x48] MOV qword ptr [RCX],R8 CMOVNZ RAX,RSI JMP 0x001e3cdc LAB_001e400f: MOV RAX,0x2540be400 MOV RCX,qword ptr [RBP + -0x50] IMUL RCX,RAX LEA RAX,[RSI + RSI*0x4] LEA RAX,[RCX + RAX*0x2] ADD RAX,R13 MOV RCX,qword ptr [RBP + -0x48] MOV qword ptr [RCX],R8 CMP R14,0x2d JNZ 0x001e3cdc MOV RCX,-0x8000000000000000 CMP RAX,RCX JBE 0x001e406c LAB_001e404c: XOR EAX,EAX CMP R14,0x2d SETNZ AL MOV RCX,qword ptr [RBP + -0x60] MOV dword ptr [RCX],0x22 NEG RAX BTS RAX,0x3f JMP 0x001e3cdc LAB_001e406c: NEG RAX JMP 0x001e3cdc LAB_001e4074: MOV RDX,qword ptr [RBP + -0x50] LAB_001e4078: CMP RDX,qword ptr [RBP + -0x58] JA 0x001e404c LEA RAX,[R13*0x4] ADD RAX,R13 MOVZX ECX,BL LEA RAX,[RCX + RAX*0x2] CMP RDX,qword ptr [RBP + -0x58] JNZ 0x001e40a6 MOV RCX,qword ptr [RBP + -0x40] CMP RCX,qword ptr [RBP + -0x78] JC 0x001e40a6 CMP RAX,qword ptr [RBP + -0x70] JA 0x001e404c LAB_001e40a6: MOV RCX,0x174876e800 IMUL RDX,RCX IMUL RCX,qword ptr [RBP + -0x40],0x64 ADD RDX,RAX ADD RDX,RCX MOV RAX,RDX JMP 0x001e3cdc
ulong my_strtoll10_mb2(long param_1,ulong param_2,ulong *param_3,int4 *param_4) { code *pcVar1; long lVar2; uint uVar3; int iVar4; ulong uVar5; ulong uVar6; byte bVar7; long lVar8; ulong uVar9; ulong uVar10; ulong uVar11; ulong uVar12; ulong uVar13; ulong local_80; ulong local_78; ulong local_60; int local_38; int4 uStack_34; if (param_3 != (ulong *)0x0) { pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); uVar12 = ((*param_3 - param_2) - ((long)(*param_3 - param_2) >> 0x3f) & 0xfffffffffffffffe) + param_2; uVar3 = (*pcVar1)(param_1,&local_38,param_2,uVar12); if (0 < (int)uVar3) { uVar11 = param_2; do { uVar11 = uVar3 + uVar11; lVar2 = CONCAT44(uStack_34,local_38); if ((lVar2 != 0x20) && (lVar2 != 9)) { if (lVar2 == 0x2d) { *param_4 = 0xffffffff; uVar3 = (*pcVar1)(param_1,&local_38,uVar11,uVar12); if ((int)uVar3 < 1) break; uVar11 = uVar11 + uVar3; local_78 = 8; local_80 = 0x15f797ae; local_60 = 0x57f5ff8; } else { *param_4 = 0; local_78 = 0xf; local_80 = 0x2bef2f5c; local_60 = 0xafebff0; if (lVar2 == 0x2b) { uVar3 = (*pcVar1)(param_1,&local_38,uVar11,uVar12); if ((int)uVar3 < 1) break; uVar11 = uVar11 + uVar3; } } if (CONCAT44(uStack_34,local_38) == 0x30) { if (uVar11 == uVar12) goto LAB_001e3db4; goto LAB_001e3d8c; } uVar5 = CONCAT44(uStack_34,local_38) - 0x30; if (uVar5 < 10) { uVar9 = uVar11 + 0x10; goto LAB_001e3dd8; } break; } uVar3 = (*pcVar1)(param_1,&local_38,uVar11,uVar12); } while (0 < (int)uVar3); } } LAB_001e3cc5: *param_4 = 0x21; *param_3 = param_2; return 0; LAB_001e3d8c: uVar3 = (*pcVar1)(param_1,&local_38,uVar11,uVar12); if ((int)uVar3 < 1) goto LAB_001e3cc5; if (CONCAT44(uStack_34,local_38) != 0x30) { uVar9 = uVar11 + 0x12; uVar5 = 0; LAB_001e3dd8: if (uVar12 < uVar9) { uVar9 = uVar12; } while (uVar3 = (*pcVar1)(param_1,&local_38,uVar11,uVar9), 0 < (int)uVar3) { uVar6 = uVar11; if ((0x39 < CONCAT44(uStack_34,local_38)) || (bVar7 = (char)local_38 - 0x30, 9 < bVar7)) goto LAB_001e3f88; uVar5 = (ulong)bVar7 + uVar5 * 10; uVar11 = uVar11 + uVar3; } uVar6 = uVar12; if (uVar11 == uVar12) goto LAB_001e3f88; uVar6 = uVar11 + 0x12; if (uVar12 < uVar11 + 0x12) { uVar6 = uVar12; } lVar8 = 0; uVar9 = 0; while( true ) { uVar13 = lVar8 + uVar11; uVar3 = (*pcVar1)(param_1,&local_38,uVar13,uVar12); if ((int)uVar3 < 1) break; if ((0x39 < CONCAT44(uStack_34,local_38)) || (bVar7 = (char)local_38 - 0x30, 9 < bVar7)) { LAB_001e3fad: uVar9 = uVar5 * *(long *)((long)&lfactor + (uVar13 - uVar11 & 0xfffffffffffffffe) * 4) + uVar9; *param_3 = uVar13; if (lVar2 == 0x2d) { return -uVar9; } return uVar9; } lVar8 = lVar8 + (ulong)uVar3; uVar10 = lVar8 + uVar11; uVar9 = (ulong)bVar7 + uVar9 * 10; if (uVar10 == uVar6) { if (uVar6 == uVar12) { uVar13 = uVar12; if (lVar8 == 0x12) { LAB_001e3fea: uVar9 = uVar9 + uVar5 * 1000000000; *param_3 = uVar10; if (lVar2 == 0x2d) { return -uVar9; } return uVar9; } goto LAB_001e3fad; } uVar3 = (*pcVar1)(param_1,&local_38,uVar10,uVar12); if ((int)uVar3 < 1) break; uVar11 = CONCAT44(uStack_34,local_38) - 0x30; if (9 < uVar11) goto LAB_001e3fea; uVar10 = uVar10 + uVar3; if (uVar10 != uVar12) { uVar3 = (*pcVar1)(param_1,&local_38,uVar10,uVar12); if ((int)uVar3 < 1) break; if ((CONCAT44(uStack_34,local_38) < 0x3a) && (bVar7 = (char)local_38 - 0x30, bVar7 < 10)) { uVar10 = uVar10 + uVar3; *param_3 = uVar10; if ((((uVar10 == uVar12) || (iVar4 = (*pcVar1)(param_1,&local_38,uVar10,uVar12), iVar4 < 1)) || (9 < (local_38 + 0xd0U & 0xfe))) && ((uVar5 <= local_60 && (((uVar12 = (ulong)bVar7 + uVar11 * 10, uVar5 != local_60 || (uVar9 < local_80)) || (uVar12 <= local_78)))))) { return uVar5 * 100000000000 + uVar12 + uVar9 * 100; } goto LAB_001e404c; } } uVar11 = uVar5 * 10000000000 + uVar9 * 10 + uVar11; *param_3 = uVar10; if (lVar2 != 0x2d) { return uVar11; } if (uVar11 < 0x8000000000000001) { return -uVar11; } LAB_001e404c: *param_4 = 0x22; return -(ulong)(lVar2 != 0x2d) | 0x8000000000000000; } } goto LAB_001e3cc5; } uVar11 = uVar11 + uVar3; if (uVar11 == uVar12) { LAB_001e3db4: uVar5 = 0; uVar6 = uVar12; LAB_001e3f88: *param_3 = uVar6; if (lVar2 == 0x2d) { return -uVar5; } return uVar5; } goto LAB_001e3d8c; }
45,381
ggml_backend_tensor_set_async
ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp
void ggml_backend_tensor_set_async(ggml_backend_t backend, struct ggml_tensor * tensor, const void * data, size_t offset, size_t size) { GGML_ASSERT(tensor->data != NULL && "tensor not allocated"); GGML_ASSERT(offset + size <= ggml_nbytes(tensor) && "tensor write out of bounds"); if (backend->iface.set_tensor_async == NULL) { ggml_backend_tensor_set(tensor, data, offset, size); } else { backend->iface.set_tensor_async(backend, tensor, data, offset, size); } }
O0
cpp
ggml_backend_tensor_set_async: subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movq %rdx, 0x20(%rsp) movq %rcx, 0x18(%rsp) movq %r8, 0x10(%rsp) movq 0x28(%rsp), %rax cmpq $0x0, 0xf8(%rax) jne 0x5e1ed leaq 0x59456(%rip), %rdi # 0xb7629 movl $0xeb, %esi leaq 0x56423(%rip), %rdx # 0xb4602 leaq 0x594cd(%rip), %rcx # 0xb76b3 movb $0x0, %al callq 0x46780 movq 0x18(%rsp), %rax addq 0x10(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x28(%rsp), %rdi callq 0x40640 movq %rax, %rcx movq 0x8(%rsp), %rax cmpq %rcx, %rax jbe 0x5e234 leaq 0x5940f(%rip), %rdi # 0xb7629 movl $0xec, %esi leaq 0x563dc(%rip), %rdx # 0xb4602 leaq 0x594b5(%rip), %rcx # 0xb76e2 movb $0x0, %al callq 0x46780 movq 0x30(%rsp), %rax cmpq $0x0, 0x18(%rax) jne 0x5e25b movq 0x28(%rsp), %rdi movq 0x20(%rsp), %rsi movq 0x18(%rsp), %rdx movq 0x10(%rsp), %rcx callq 0x41fa0 jmp 0x5e27f movq 0x30(%rsp), %rax movq 0x18(%rax), %rax movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rsi movq 0x20(%rsp), %rdx movq 0x18(%rsp), %rcx movq 0x10(%rsp), %r8 callq *%rax addq $0x38, %rsp retq nopw %cs:(%rax,%rax)
ggml_backend_tensor_set_async: sub rsp, 38h mov [rsp+38h+var_8], rdi mov [rsp+38h+var_10], rsi mov [rsp+38h+var_18], rdx mov [rsp+38h+var_20], rcx mov [rsp+38h+var_28], r8 mov rax, [rsp+38h+var_10] cmp qword ptr [rax+0F8h], 0 jnz short loc_5E1ED lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... mov esi, 0EBh lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTensorDataNull; "tensor->data != NULL && \"tensor not al"... mov al, 0 call _ggml_abort loc_5E1ED: mov rax, [rsp+38h+var_20] add rax, [rsp+38h+var_28] mov [rsp+38h+var_30], rax mov rdi, [rsp+38h+var_10] call _ggml_nbytes mov rcx, rax mov rax, [rsp+38h+var_30] cmp rax, rcx jbe short loc_5E234 lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... mov esi, 0ECh lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aOffsetSizeGgml; "offset + size <= ggml_nbytes(tensor) &&"... mov al, 0 call _ggml_abort loc_5E234: mov rax, [rsp+38h+var_8] cmp qword ptr [rax+18h], 0 jnz short loc_5E25B mov rdi, [rsp+38h+var_10] mov rsi, [rsp+38h+var_18] mov rdx, [rsp+38h+var_20] mov rcx, [rsp+38h+var_28] call _ggml_backend_tensor_set jmp short loc_5E27F loc_5E25B: mov rax, [rsp+38h+var_8] mov rax, [rax+18h] mov rdi, [rsp+38h+var_8] mov rsi, [rsp+38h+var_10] mov rdx, [rsp+38h+var_18] mov rcx, [rsp+38h+var_20] mov r8, [rsp+38h+var_28] call rax loc_5E27F: add rsp, 38h retn
long long ggml_backend_tensor_set_async(long long a1, long long a2, long long a3, long long a4, long long a5) { if ( !*(_QWORD *)(a2 + 248) ) ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp", 235, (long long)"GGML_ASSERT(%s) failed", "tensor->data != NULL && \"tensor not allocated\""); if ( a5 + a4 > (unsigned long long)ggml_nbytes((unsigned int *)a2) ) ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp", 236, (long long)"GGML_ASSERT(%s) failed", "offset + size <= ggml_nbytes(tensor) && \"tensor write out of bounds\""); if ( *(_QWORD *)(a1 + 24) ) return (*(long long ( **)(long long, long long, long long, long long, long long))(a1 + 24))(a1, a2, a3, a4, a5); else return ggml_backend_tensor_set(a2, a3, a4, a5); }
ggml_backend_tensor_set_async: SUB RSP,0x38 MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x20],RDX MOV qword ptr [RSP + 0x18],RCX MOV qword ptr [RSP + 0x10],R8 MOV RAX,qword ptr [RSP + 0x28] CMP qword ptr [RAX + 0xf8],0x0 JNZ 0x0015e1ed LEA RDI,[0x1b7629] MOV ESI,0xeb LEA RDX,[0x1b4602] LEA RCX,[0x1b76b3] MOV AL,0x0 CALL 0x00146780 LAB_0015e1ed: MOV RAX,qword ptr [RSP + 0x18] ADD RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x28] CALL 0x00140640 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] CMP RAX,RCX JBE 0x0015e234 LEA RDI,[0x1b7629] MOV ESI,0xec LEA RDX,[0x1b4602] LEA RCX,[0x1b76e2] MOV AL,0x0 CALL 0x00146780 LAB_0015e234: MOV RAX,qword ptr [RSP + 0x30] CMP qword ptr [RAX + 0x18],0x0 JNZ 0x0015e25b MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x10] CALL 0x00141fa0 JMP 0x0015e27f LAB_0015e25b: MOV RAX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX + 0x18] MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x18] MOV R8,qword ptr [RSP + 0x10] CALL RAX LAB_0015e27f: ADD RSP,0x38 RET
void ggml_backend_tensor_set_async (long param_1,long param_2,int8 param_3,long param_4,long param_5) { ulong uVar1; if (*(long *)(param_2 + 0xf8) == 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp" ,0xeb,"GGML_ASSERT(%s) failed","tensor->data != NULL && \"tensor not allocated\""); } uVar1 = ggml_nbytes(param_2); if (uVar1 < (ulong)(param_4 + param_5)) { ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp" ,0xec,"GGML_ASSERT(%s) failed", "offset + size <= ggml_nbytes(tensor) && \"tensor write out of bounds\""); } if (*(long *)(param_1 + 0x18) == 0) { ggml_backend_tensor_set(param_2,param_3,param_4,param_5); } else { (**(code **)(param_1 + 0x18))(param_1,param_2,param_3,param_4,param_5); } return; }
45,382
minja::Context::get(minja::Value const&)
monkey531[P]llama/common/minja.hpp
virtual Value get(const Value & key) { if (values_.contains(key)) return values_.at(key); if (parent_) return parent_->get(key); return Value(); }
O1
cpp
minja::Context::get(minja::Value const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x18(%rsi), %r12 movq %r12, %rdi movq %rdx, %rsi callq 0x54ee6 testb %al, %al je 0x6098c movq %r12, %rdi movq %r14, %rsi callq 0x54ce8 movq %rbx, %rdi movq %rax, %rsi callq 0x4f20a jmp 0x609df movq 0x68(%r15), %rsi testq %rsi, %rsi je 0x609a3 movq (%rsi), %rax movq %rbx, %rdi movq %r14, %rdx callq *0x10(%rax) jmp 0x609df leaq 0x40(%rbx), %r14 movq $0x0, 0x48(%rbx) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movups %xmm0, 0x10(%rbx) movups %xmm0, 0x20(%rbx) movups %xmm0, 0x30(%rbx) movb $0x0, 0x40(%rbx) movq %r14, %rdi movl $0x1, %esi callq 0x3da52 movq %r14, %rdi movl $0x1, %esi callq 0x3da52 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
_ZN5minja7Context3getERKNS_5ValueE: push r15 push r14 push r12 push rbx push rax mov r14, rdx mov r15, rsi mov rbx, rdi lea r12, [rsi+18h] mov rdi, r12; this mov rsi, rdx; minja::Value * call _ZNK5minja5Value8containsERKS0_; minja::Value::contains(minja::Value const&) test al, al jz short loc_6098C mov rdi, r12; this mov rsi, r14; minja::Value * call _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&) mov rdi, rbx; this mov rsi, rax; minja::Value * call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&) jmp short loc_609DF loc_6098C: mov rsi, [r15+68h] test rsi, rsi jz short loc_609A3 mov rax, [rsi] mov rdi, rbx mov rdx, r14 call qword ptr [rax+10h] jmp short loc_609DF loc_609A3: lea r14, [rbx+40h] mov qword ptr [rbx+48h], 0 xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 movups xmmword ptr [rbx+10h], xmm0 movups xmmword ptr [rbx+20h], xmm0 movups xmmword ptr [rbx+30h], xmm0 mov byte ptr [rbx+40h], 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 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_609DF: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
minja::Context * minja::Context::get( minja::Context *this, const minja::Value *a2, const minja::Value *a3, __m128d a4) { const minja::Value *v5; // rax long long v6; // rsi if ( (unsigned __int8)minja::Value::contains((const minja::Value *)((char *)a2 + 24), a3, a4) ) { v5 = (const minja::Value *)minja::Value::at((const minja::Value *)((char *)a2 + 24), a3); minja::Value::Value(this, v5); } else { v6 = *((_QWORD *)a2 + 13); if ( v6 ) { (*(void ( **)(minja::Context *, long long, const minja::Value *))(*(_QWORD *)v6 + 16LL))(this, v6, a3); } else { *((_QWORD *)this + 9) = 0LL; *(_OWORD *)this = 0LL; *((_OWORD *)this + 1) = 0LL; *((_OWORD *)this + 2) = 0LL; *((_OWORD *)this + 3) = 0LL; *((_BYTE *)this + 64) = 0; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)this + 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 *)this + 64); } } return this; }
get: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA R12,[RSI + 0x18] MOV RDI,R12 MOV RSI,RDX CALL 0x00154ee6 TEST AL,AL JZ 0x0016098c MOV RDI,R12 MOV RSI,R14 CALL 0x00154ce8 MOV RDI,RBX MOV RSI,RAX CALL 0x0014f20a JMP 0x001609df LAB_0016098c: MOV RSI,qword ptr [R15 + 0x68] TEST RSI,RSI JZ 0x001609a3 MOV RAX,qword ptr [RSI] MOV RDI,RBX MOV RDX,R14 CALL qword ptr [RAX + 0x10] JMP 0x001609df LAB_001609a3: LEA R14,[RBX + 0x40] MOV qword ptr [RBX + 0x48],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOVUPS xmmword ptr [RBX + 0x10],XMM0 MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOV byte ptr [RBX + 0x40],0x0 MOV RDI,R14 MOV ESI,0x1 CALL 0x0013da52 MOV RDI,R14 MOV ESI,0x1 CALL 0x0013da52 LAB_001609df: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* minja::Context::get(minja::Value const&) */ Value * minja::Context::get(Value *param_1) { char cVar1; Value *pVVar2; Value *in_RDX; long in_RSI; bool bVar3; cVar1 = Value::contains((Value *)(in_RSI + 0x18),in_RDX); if (cVar1 == '\0') { if (*(long **)(in_RSI + 0x68) == (long *)0x0) { bVar3 = (bool)((char)param_1 + '@'); *(int8 *)(param_1 + 0x48) = 0; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; *(int8 *)(param_1 + 0x18) = 0; *(int8 *)(param_1 + 0x20) = 0; *(int8 *)(param_1 + 0x28) = 0; *(int8 *)(param_1 + 0x30) = 0; *(int8 *)(param_1 + 0x38) = 0; param_1[0x40] = (Value)0x0; 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); } else { (**(code **)(**(long **)(in_RSI + 0x68) + 0x10))(param_1); } } else { pVVar2 = (Value *)Value::at((Value *)(in_RSI + 0x18),in_RDX); Value::Value(param_1,pVVar2); } return param_1; }
45,383
minja::Context::get(minja::Value const&)
monkey531[P]llama/common/minja.hpp
virtual Value get(const Value & key) { if (values_.contains(key)) return values_.at(key); if (parent_) return parent_->get(key); return Value(); }
O3
cpp
minja::Context::get(minja::Value const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x18(%rsi), %r12 movq %r12, %rdi movq %rdx, %rsi callq 0x53eca testb %al, %al je 0x5f8ae movq %r12, %rdi movq %r14, %rsi callq 0x53cb8 movq %rbx, %rdi movq %rax, %rsi callq 0x4e20c jmp 0x5f901 movq 0x68(%r15), %rsi testq %rsi, %rsi je 0x5f8c5 movq (%rsi), %rax movq %rbx, %rdi movq %r14, %rdx callq *0x10(%rax) jmp 0x5f901 leaq 0x40(%rbx), %r14 movq $0x0, 0x48(%rbx) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movups %xmm0, 0x10(%rbx) movups %xmm0, 0x20(%rbx) movups %xmm0, 0x30(%rbx) movb $0x0, 0x40(%rbx) movq %r14, %rdi movl $0x1, %esi callq 0x3ce3c movq %r14, %rdi movl $0x1, %esi callq 0x3ce3c movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
_ZN5minja7Context3getERKNS_5ValueE: push r15 push r14 push r12 push rbx push rax mov r14, rdx mov r15, rsi mov rbx, rdi lea r12, [rsi+18h] mov rdi, r12; this mov rsi, rdx; minja::Value * call _ZNK5minja5Value8containsERKS0_; minja::Value::contains(minja::Value const&) test al, al jz short loc_5F8AE mov rdi, r12; this mov rsi, r14; minja::Value * call _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&) mov rdi, rbx; this mov rsi, rax; minja::Value * call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&) jmp short loc_5F901 loc_5F8AE: mov rsi, [r15+68h] test rsi, rsi jz short loc_5F8C5 mov rax, [rsi] mov rdi, rbx mov rdx, r14 call qword ptr [rax+10h] jmp short loc_5F901 loc_5F8C5: lea r14, [rbx+40h] mov qword ptr [rbx+48h], 0 xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 movups xmmword ptr [rbx+10h], xmm0 movups xmmword ptr [rbx+20h], xmm0 movups xmmword ptr [rbx+30h], xmm0 mov byte ptr [rbx+40h], 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 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_5F901: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
minja::Context * minja::Context::get( minja::Context *this, const minja::Value *a2, const minja::Value *a3, __m128d a4) { const minja::Value *v5; // rax long long v6; // rsi if ( minja::Value::contains((const minja::Value *)((char *)a2 + 24), a3, a4) ) { v5 = (const minja::Value *)minja::Value::at((const minja::Value *)((char *)a2 + 24), a3); minja::Value::Value(this, v5); } else { v6 = *((_QWORD *)a2 + 13); if ( v6 ) { (*(void ( **)(minja::Context *, long long, const minja::Value *))(*(_QWORD *)v6 + 16LL))(this, v6, a3); } else { *((_QWORD *)this + 9) = 0LL; *(_OWORD *)this = 0LL; *((_OWORD *)this + 1) = 0LL; *((_OWORD *)this + 2) = 0LL; *((_OWORD *)this + 3) = 0LL; *((_BYTE *)this + 64) = 0; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)this + 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 *)this + 64); } } return this; }
get: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA R12,[RSI + 0x18] MOV RDI,R12 MOV RSI,RDX CALL 0x00153eca TEST AL,AL JZ 0x0015f8ae MOV RDI,R12 MOV RSI,R14 CALL 0x00153cb8 MOV RDI,RBX MOV RSI,RAX CALL 0x0014e20c JMP 0x0015f901 LAB_0015f8ae: MOV RSI,qword ptr [R15 + 0x68] TEST RSI,RSI JZ 0x0015f8c5 MOV RAX,qword ptr [RSI] MOV RDI,RBX MOV RDX,R14 CALL qword ptr [RAX + 0x10] JMP 0x0015f901 LAB_0015f8c5: LEA R14,[RBX + 0x40] MOV qword ptr [RBX + 0x48],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOVUPS xmmword ptr [RBX + 0x10],XMM0 MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOV byte ptr [RBX + 0x40],0x0 MOV RDI,R14 MOV ESI,0x1 CALL 0x0013ce3c MOV RDI,R14 MOV ESI,0x1 CALL 0x0013ce3c LAB_0015f901: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* minja::Context::get(minja::Value const&) */ Value * minja::Context::get(Value *param_1) { char cVar1; Value *pVVar2; Value *in_RDX; long in_RSI; bool bVar3; cVar1 = Value::contains((Value *)(in_RSI + 0x18),in_RDX); if (cVar1 == '\0') { if (*(long **)(in_RSI + 0x68) == (long *)0x0) { bVar3 = (bool)((char)param_1 + '@'); *(int8 *)(param_1 + 0x48) = 0; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; *(int8 *)(param_1 + 0x18) = 0; *(int8 *)(param_1 + 0x20) = 0; *(int8 *)(param_1 + 0x28) = 0; *(int8 *)(param_1 + 0x30) = 0; *(int8 *)(param_1 + 0x38) = 0; param_1[0x40] = (Value)0x0; 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); } else { (**(code **)(**(long **)(in_RSI + 0x68) + 0x10))(param_1); } } else { pVVar2 = (Value *)Value::at((Value *)(in_RSI + 0x18),in_RDX); Value::Value(param_1,pVVar2); } return param_1; }
45,384
ma_decrement_open_count
eloqsql/storage/maria/ma_locking.c
int _ma_decrement_open_count(MARIA_HA *info, my_bool lock_tables) { uchar buff[2]; register MARIA_SHARE *share= info->s; int lock_error=0,write_error=0; DBUG_ENTER("_ma_decrement_open_count"); if (share->global_changed) { uint old_lock=info->lock_type; share->global_changed=0; lock_error= (my_disable_locking || ! lock_tables ? 0 : maria_lock_database(info, F_WRLCK)); /* Its not fatal even if we couldn't get the lock ! */ if (share->state.open_count > 0) { CRASH_IF_S3_TABLE(share); share->state.open_count--; share->changed= 1; /* We have to update state */ /* For temporary tables that will just be deleted, we don't have to decrement state. For transactional tables the state will be updated in maria_close(). */ if (!share->temporary && !share->now_transactional) { mi_int2store(buff,share->state.open_count); write_error= (int) my_pwrite(share->kfile.file, buff, sizeof(buff), sizeof(share->state.header) + MARIA_FILE_OPEN_COUNT_OFFSET, MYF(MY_NABP)); } } if (!lock_error && !my_disable_locking && lock_tables) lock_error=maria_lock_database(info,old_lock); } DBUG_RETURN(MY_TEST(lock_error || write_error)); }
O0
c
ma_decrement_open_count: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movb %sil, %al movq %rdi, -0x8(%rbp) movb %al, -0x9(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movl $0x0, -0x1c(%rbp) movl $0x0, -0x20(%rbp) movq -0x18(%rbp), %rax cmpb $0x0, 0x7df(%rax) je 0x361e4 movq -0x8(%rbp), %rax movl 0x664(%rax), %eax movl %eax, -0x24(%rbp) movq -0x18(%rbp), %rax movb $0x0, 0x7df(%rax) leaq 0xc4d1ad(%rip), %rax # 0xc832a8 movsbl (%rax), %eax cmpl $0x0, %eax jne 0x36109 cmpb $0x0, -0x9(%rbp) jne 0x36110 xorl %eax, %eax movl %eax, -0x2c(%rbp) jmp 0x36121 movq -0x8(%rbp), %rdi movl $0x1, %esi callq 0x35510 movl %eax, -0x2c(%rbp) movl -0x2c(%rbp), %eax movl %eax, -0x1c(%rbp) movq -0x18(%rbp), %rax cmpl $0x0, 0x16c(%rax) jbe 0x361b8 jmp 0x3613a jmp 0x3613c movq -0x18(%rbp), %rax movl 0x16c(%rax), %ecx addl $-0x1, %ecx movl %ecx, 0x16c(%rax) movq -0x18(%rbp), %rax movb $0x1, 0x7de(%rax) movq -0x18(%rbp), %rax cmpb $0x0, 0x7d9(%rax) jne 0x361b6 movq -0x18(%rbp), %rax cmpb $0x0, 0x7e7(%rax) jne 0x361b6 movq -0x18(%rbp), %rax movl 0x16c(%rax), %eax movl %eax, -0x28(%rbp) movl -0x28(%rbp), %eax movb %al, -0xa(%rbp) movl -0x28(%rbp), %eax shrl $0x8, %eax movb %al, -0xb(%rbp) movq -0x18(%rbp), %rax movl 0x760(%rax), %edi leaq -0xb(%rbp), %rsi movl $0x2, %edx movl $0x18, %ecx movl $0x4, %r8d callq 0xf4860 movl %eax, -0x20(%rbp) jmp 0x361b8 cmpl $0x0, -0x1c(%rbp) jne 0x361e2 leaq 0xc4d0e3(%rip), %rax # 0xc832a8 cmpb $0x0, (%rax) jne 0x361e2 movsbl -0x9(%rbp), %eax cmpl $0x0, %eax je 0x361e2 movq -0x8(%rbp), %rdi movl -0x24(%rbp), %esi callq 0x35510 movl %eax, -0x1c(%rbp) jmp 0x361e4 jmp 0x361e6 movb $0x1, %al cmpl $0x0, -0x1c(%rbp) movb %al, -0x2d(%rbp) jne 0x361fb cmpl $0x0, -0x20(%rbp) setne %al movb %al, -0x2d(%rbp) movb -0x2d(%rbp), %dl xorl %eax, %eax movl $0x1, %ecx testb $0x1, %dl cmovnel %ecx, %eax movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopw (%rax,%rax)
_ma_decrement_open_count: push rbp mov rbp, rsp sub rsp, 40h mov al, sil mov [rbp+var_8], rdi mov [rbp+var_9], al mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_18], rax mov [rbp+var_1C], 0 mov [rbp+var_20], 0 mov rax, [rbp+var_18] cmp byte ptr [rax+7DFh], 0 jz loc_361E4 mov rax, [rbp+var_8] mov eax, [rax+664h] mov [rbp+var_24], eax mov rax, [rbp+var_18] mov byte ptr [rax+7DFh], 0 lea rax, my_disable_locking movsx eax, byte ptr [rax] cmp eax, 0 jnz short loc_36109 cmp [rbp+var_9], 0 jnz short loc_36110 loc_36109: xor eax, eax mov [rbp+var_2C], eax jmp short loc_36121 loc_36110: mov rdi, [rbp+var_8] mov esi, 1 call maria_lock_database mov [rbp+var_2C], eax loc_36121: mov eax, [rbp+var_2C] mov [rbp+var_1C], eax mov rax, [rbp+var_18] cmp dword ptr [rax+16Ch], 0 jbe loc_361B8 jmp short $+2 loc_3613A: jmp short $+2 loc_3613C: mov rax, [rbp+var_18] mov ecx, [rax+16Ch] add ecx, 0FFFFFFFFh mov [rax+16Ch], ecx mov rax, [rbp+var_18] mov byte ptr [rax+7DEh], 1 mov rax, [rbp+var_18] cmp byte ptr [rax+7D9h], 0 jnz short loc_361B6 mov rax, [rbp+var_18] cmp byte ptr [rax+7E7h], 0 jnz short loc_361B6 mov rax, [rbp+var_18] mov eax, [rax+16Ch] mov [rbp+var_28], eax mov eax, [rbp+var_28] mov [rbp+var_A], al mov eax, [rbp+var_28] shr eax, 8 mov [rbp+var_B], al mov rax, [rbp+var_18] mov edi, [rax+760h] lea rsi, [rbp+var_B] mov edx, 2 mov ecx, 18h mov r8d, 4 call my_pwrite mov [rbp+var_20], eax loc_361B6: jmp short $+2 loc_361B8: cmp [rbp+var_1C], 0 jnz short loc_361E2 lea rax, my_disable_locking cmp byte ptr [rax], 0 jnz short loc_361E2 movsx eax, [rbp+var_9] cmp eax, 0 jz short loc_361E2 mov rdi, [rbp+var_8] mov esi, [rbp+var_24] call maria_lock_database mov [rbp+var_1C], eax loc_361E2: jmp short $+2 loc_361E4: jmp short $+2 loc_361E6: mov al, 1 cmp [rbp+var_1C], 0 mov [rbp+var_2D], al jnz short loc_361FB cmp [rbp+var_20], 0 setnz al mov [rbp+var_2D], al loc_361FB: mov dl, [rbp+var_2D] xor eax, eax mov ecx, 1 test dl, 1 cmovnz eax, ecx mov [rbp+var_34], eax mov eax, [rbp+var_34] add rsp, 40h pop rbp retn
_BOOL8 ma_decrement_open_count(long long a1, char a2) { __int16 v2; // kr00_2 bool v4; // [rsp+13h] [rbp-2Dh] int v5; // [rsp+14h] [rbp-2Ch] int v6; // [rsp+1Ch] [rbp-24h] int v7; // [rsp+20h] [rbp-20h] int v8; // [rsp+24h] [rbp-1Ch] long long v9; // [rsp+28h] [rbp-18h] _BYTE v10[2]; // [rsp+35h] [rbp-Bh] BYREF char v11; // [rsp+37h] [rbp-9h] long long v12; // [rsp+38h] [rbp-8h] v12 = a1; v11 = a2; v9 = *(_QWORD *)a1; v8 = 0; v7 = 0; if ( *(_BYTE *)(*(_QWORD *)a1 + 2015LL) ) { v6 = *(_DWORD *)(v12 + 1636); *(_BYTE *)(v9 + 2015) = 0; if ( !my_disable_locking && v11 ) v5 = maria_lock_database(v12, 1); else v5 = 0; v8 = v5; if ( *(_DWORD *)(v9 + 364) ) { --*(_DWORD *)(v9 + 364); *(_BYTE *)(v9 + 2014) = 1; if ( !*(_BYTE *)(v9 + 2009) && !*(_BYTE *)(v9 + 2023) ) { v2 = *(_DWORD *)(v9 + 364); v10[0] = HIBYTE(v2); v10[1] = v2; v7 = my_pwrite(*(unsigned int *)(v9 + 1888), v10, 2LL, 24LL); } } if ( !v5 && !my_disable_locking && v11 ) v8 = maria_lock_database(v12, v6); } v4 = 1; if ( !v8 ) return v7 != 0; return v4; }
_ma_decrement_open_count: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV AL,SIL MOV qword ptr [RBP + -0x8],RDI MOV byte ptr [RBP + -0x9],AL MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV dword ptr [RBP + -0x1c],0x0 MOV dword ptr [RBP + -0x20],0x0 MOV RAX,qword ptr [RBP + -0x18] CMP byte ptr [RAX + 0x7df],0x0 JZ 0x001361e4 MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x664] MOV dword ptr [RBP + -0x24],EAX MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x7df],0x0 LEA RAX,[0xd832a8] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JNZ 0x00136109 CMP byte ptr [RBP + -0x9],0x0 JNZ 0x00136110 LAB_00136109: XOR EAX,EAX MOV dword ptr [RBP + -0x2c],EAX JMP 0x00136121 LAB_00136110: MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x1 CALL 0x00135510 MOV dword ptr [RBP + -0x2c],EAX LAB_00136121: MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x16c],0x0 JBE 0x001361b8 JMP 0x0013613a LAB_0013613a: JMP 0x0013613c LAB_0013613c: MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RAX + 0x16c] ADD ECX,-0x1 MOV dword ptr [RAX + 0x16c],ECX MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x7de],0x1 MOV RAX,qword ptr [RBP + -0x18] CMP byte ptr [RAX + 0x7d9],0x0 JNZ 0x001361b6 MOV RAX,qword ptr [RBP + -0x18] CMP byte ptr [RAX + 0x7e7],0x0 JNZ 0x001361b6 MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x16c] MOV dword ptr [RBP + -0x28],EAX MOV EAX,dword ptr [RBP + -0x28] MOV byte ptr [RBP + -0xa],AL MOV EAX,dword ptr [RBP + -0x28] SHR EAX,0x8 MOV byte ptr [RBP + -0xb],AL MOV RAX,qword ptr [RBP + -0x18] MOV EDI,dword ptr [RAX + 0x760] LEA RSI,[RBP + -0xb] MOV EDX,0x2 MOV ECX,0x18 MOV R8D,0x4 CALL 0x001f4860 MOV dword ptr [RBP + -0x20],EAX LAB_001361b6: JMP 0x001361b8 LAB_001361b8: CMP dword ptr [RBP + -0x1c],0x0 JNZ 0x001361e2 LEA RAX,[0xd832a8] CMP byte ptr [RAX],0x0 JNZ 0x001361e2 MOVSX EAX,byte ptr [RBP + -0x9] CMP EAX,0x0 JZ 0x001361e2 MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0x24] CALL 0x00135510 MOV dword ptr [RBP + -0x1c],EAX LAB_001361e2: JMP 0x001361e4 LAB_001361e4: JMP 0x001361e6 LAB_001361e6: MOV AL,0x1 CMP dword ptr [RBP + -0x1c],0x0 MOV byte ptr [RBP + -0x2d],AL JNZ 0x001361fb CMP dword ptr [RBP + -0x20],0x0 SETNZ AL MOV byte ptr [RBP + -0x2d],AL LAB_001361fb: MOV DL,byte ptr [RBP + -0x2d] XOR EAX,EAX MOV ECX,0x1 TEST DL,0x1 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x34],EAX MOV EAX,dword ptr [RBP + -0x34] ADD RSP,0x40 POP RBP RET
bool _ma_decrement_open_count(long *param_1,char param_2) { int4 uVar1; long lVar2; int local_34; int local_28; int local_24; int1 local_13; int1 local_12; char local_11; long *local_10; lVar2 = *param_1; local_24 = 0; local_28 = 0; if (*(char *)(lVar2 + 0x7df) != '\0') { uVar1 = *(int4 *)((long)param_1 + 0x664); *(int1 *)(lVar2 + 0x7df) = 0; local_11 = param_2; local_10 = param_1; if ((my_disable_locking == '\0') && (param_2 != '\0')) { local_34 = maria_lock_database(param_1,1); } else { local_34 = 0; } local_24 = local_34; if (*(int *)(lVar2 + 0x16c) != 0) { *(int *)(lVar2 + 0x16c) = *(int *)(lVar2 + 0x16c) + -1; *(int1 *)(lVar2 + 0x7de) = 1; if ((*(char *)(lVar2 + 0x7d9) == '\0') && (*(char *)(lVar2 + 0x7e7) == '\0')) { local_12 = (int1)*(int4 *)(lVar2 + 0x16c); local_13 = (int1)((uint)*(int4 *)(lVar2 + 0x16c) >> 8); local_28 = my_pwrite(*(int4 *)(lVar2 + 0x760),&local_13,2,0x18,4); } } if (((local_34 == 0) && (my_disable_locking == '\0')) && (local_11 != '\0')) { local_24 = maria_lock_database(local_10,uVar1); } } return local_24 != 0 || local_28 != 0; }
45,385
ftxui::(anonymous namespace)::InputBase::HandleEnd()
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/component/input.cpp
bool HandleEnd() { cursor_position() = content->size(); return true; }
O3
cpp
ftxui::(anonymous namespace)::InputBase::HandleEnd(): pushq %rbp pushq %rbx pushq %rax movq %rdi, %rbx addq $0x28, %rdi callq 0x2c188 movl 0x8(%rax), %ebp addq $0xf8, %rbx movq %rbx, %rdi callq 0x2c5ba movl %ebp, (%rax) addq $0x8, %rsp popq %rbx popq %rbp retq
_ZN5ftxui12_GLOBAL__N_19InputBase9HandleEndEv: push rbp push rbx push rax mov rbx, rdi add rdi, 28h ; '(' call _ZN5ftxui3RefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE7AddressEv; ftxui::Ref<std::string>::Address(void) mov ebp, [rax+8] add rbx, 0F8h mov rdi, rbx call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void) mov [rax], ebp add rsp, 8 pop rbx pop rbp retn
_DWORD * ftxui::`anonymous namespace'::InputBase::HandleEnd(ftxui::_anonymous_namespace_::InputBase *this) { int v1; // ebp _DWORD *result; // rax v1 = *(_DWORD *)(ftxui::Ref<std::string>::Address((char *)this + 40) + 8); result = (_DWORD *)ftxui::Ref<int>::Address((char *)this + 248); *result = v1; return result; }
HandleEnd: PUSH RBP PUSH RBX PUSH RAX MOV RBX,RDI ADD RDI,0x28 CALL 0x0012c188 MOV EBP,dword ptr [RAX + 0x8] ADD RBX,0xf8 MOV RDI,RBX CALL 0x0012c5ba MOV dword ptr [RAX],EBP ADD RSP,0x8 POP RBX POP RBP RET
/* ftxui::(anonymous namespace)::InputBase::HandleEnd() */ void __thiscall ftxui::(anonymous_namespace)::InputBase::HandleEnd(InputBase *this) { int4 uVar1; long lVar2; int4 *puVar3; lVar2 = Ref<std::__cxx11::string>::Address((Ref<std::__cxx11::string> *)(this + 0x28)); uVar1 = *(int4 *)(lVar2 + 8); puVar3 = (int4 *)Ref<int>::Address((Ref<int> *)(this + 0xf8)); *puVar3 = uVar1; return; }
45,386
google::protobuf::Map<google::protobuf::MapKey, google::protobuf::MapValueRef>::InnerMap::iterator_base<google::protobuf::MapPair<google::protobuf::MapKey, google::protobuf::MapValueRef> const>::revalidate_if_necessary(std::_Rb_tree_iterator<std::pair<std::reference_wrapper<google::protobuf::MapKey const> const, void*>>*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/map.h
bool revalidate_if_necessary(TreeIterator* it) { GOOGLE_DCHECK(node_ != nullptr && m_ != nullptr); // Force bucket_index_ to be in range. bucket_index_ &= (m_->num_buckets_ - 1); // Common case: the bucket we think is relevant points to node_. if (m_->table_[bucket_index_] == static_cast<void*>(node_)) return true; // Less common: the bucket is a linked list with node_ somewhere in it, // but not at the head. if (m_->TableEntryIsNonEmptyList(bucket_index_)) { Node* l = static_cast<Node*>(m_->table_[bucket_index_]); while ((l = l->next) != nullptr) { if (l == node_) { return true; } } } // Well, bucket_index_ still might be correct, but probably // not. Revalidate just to be sure. This case is rare enough that we // don't worry about potential optimizations, such as having a custom // find-like method that compares Node* instead of the key. iterator_base i(m_->find(node_->kv.first, it)); bucket_index_ = i.bucket_index_; return m_->TableEntryIsList(bucket_index_); }
O0
c
google::protobuf::Map<google::protobuf::MapKey, google::protobuf::MapValueRef>::InnerMap::iterator_base<google::protobuf::MapPair<google::protobuf::MapKey, google::protobuf::MapValueRef> const>::revalidate_if_necessary(std::_Rb_tree_iterator<std::pair<std::reference_wrapper<google::protobuf::MapKey const> const, void*>>*): subq $0xa8, %rsp movq %rdi, 0x98(%rsp) movq %rsi, 0x90(%rsp) movq 0x98(%rsp), %rax movq %rax, 0x18(%rsp) xorl %eax, %eax testb $0x1, %al jne 0x1da68f jmp 0x1da73e movq 0x18(%rsp), %rax movq (%rax), %rax movb $0x0, 0x57(%rsp) cmpq $0x0, %rax je 0x1da6b0 movq 0x18(%rsp), %rax cmpq $0x0, 0x8(%rax) je 0x1da6b0 jmp 0x1da700 leaq 0x20dbe5(%rip), %rdx # 0x3e829c leaq 0x58(%rsp), %rdi movq %rdi, 0x8(%rsp) movl $0x3, %esi movl $0x255, %ecx # imm = 0x255 callq 0x19a670 movq 0x8(%rsp), %rdi movb $0x1, 0x57(%rsp) leaq 0x20dd43(%rip), %rsi # 0x3e8424 callq 0x199f30 movq %rax, 0x10(%rsp) jmp 0x1da6ed movq 0x10(%rsp), %rsi leaq 0x43(%rsp), %rdi callq 0x19a0e0 jmp 0x1da6fe jmp 0x1da700 testb $0x1, 0x57(%rsp) jne 0x1da709 jmp 0x1da713 leaq 0x58(%rsp), %rdi callq 0x19a6b0 jmp 0x1da684 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) testb $0x1, 0x57(%rsp) jne 0x1da72f jmp 0x1da739 leaq 0x58(%rsp), %rdi callq 0x19a6b0 jmp 0x1da82f movq 0x18(%rsp), %rcx movq 0x8(%rcx), %rax movq 0x8(%rax), %rax subq $0x1, %rax andq 0x10(%rcx), %rax movq %rax, 0x10(%rcx) movq 0x8(%rcx), %rax movq 0x20(%rax), %rax movq 0x10(%rcx), %rdx movq (%rax,%rdx,8), %rax cmpq (%rcx), %rax jne 0x1da779 movb $0x1, 0xa7(%rsp) jmp 0x1da81e movq 0x18(%rsp), %rax movq 0x8(%rax), %rdi movq 0x10(%rax), %rsi callq 0x1d4800 testb $0x1, %al jne 0x1da791 jmp 0x1da7dc movq 0x18(%rsp), %rcx movq 0x8(%rcx), %rax movq 0x20(%rax), %rax movq 0x10(%rcx), %rcx movq (%rax,%rcx,8), %rax movq %rax, 0x38(%rsp) movq 0x38(%rsp), %rax movq 0x38(%rax), %rax movq %rax, 0x38(%rsp) cmpq $0x0, %rax je 0x1da7da movq 0x18(%rsp), %rcx movq 0x38(%rsp), %rax cmpq (%rcx), %rax jne 0x1da7d8 movb $0x1, 0xa7(%rsp) jmp 0x1da81e jmp 0x1da7ab jmp 0x1da7dc movq 0x18(%rsp), %rax movq 0x8(%rax), %rsi movq (%rax), %rdx movq 0x90(%rsp), %rcx leaq 0x20(%rsp), %rdi callq 0x1d58a0 movq 0x18(%rsp), %rax movq 0x30(%rsp), %rcx movq %rcx, 0x10(%rax) movq 0x8(%rax), %rdi movq 0x10(%rax), %rsi callq 0x1d5940 andb $0x1, %al movb %al, 0xa7(%rsp) movb 0xa7(%rsp), %al andb $0x1, %al addq $0xa8, %rsp retq movq 0x48(%rsp), %rdi callq 0x90db0 nopl (%rax)
_ZN6google8protobuf3MapINS0_6MapKeyENS0_11MapValueRefEE8InnerMap13iterator_baseIKNS0_7MapPairIS2_S3_EEE23revalidate_if_necessaryEPSt17_Rb_tree_iteratorISt4pairIKSt17reference_wrapperIKS2_EPvEE: sub rsp, 0A8h mov [rsp+0A8h+var_10], rdi mov [rsp+0A8h+var_18], rsi mov rax, [rsp+0A8h+var_10] mov [rsp+0A8h+var_90], rax loc_1DA684: xor eax, eax test al, 1 jnz short loc_1DA68F jmp loc_1DA73E loc_1DA68F: mov rax, [rsp+0A8h+var_90] mov rax, [rax] mov [rsp+0A8h+var_51], 0 cmp rax, 0 jz short loc_1DA6B0 mov rax, [rsp+0A8h+var_90] cmp qword ptr [rax+8], 0 jz short loc_1DA6B0 jmp short loc_1DA700 loc_1DA6B0: lea rdx, aWorkspaceLlm4b_36; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+0A8h+var_50] mov [rsp+0A8h+var_A0], rdi mov esi, 3 mov ecx, 255h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+0A8h+var_A0] mov [rsp+0A8h+var_51], 1 lea rsi, aCheckFailedNod; "CHECK failed: node_ != nullptr && m_ !="... call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+0A8h+var_98], rax jmp short $+2 loc_1DA6ED: mov rsi, [rsp+0A8h+var_98] lea rdi, [rsp+0A8h+var_65] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_1DA6FE: jmp short $+2 loc_1DA700: test [rsp+0A8h+var_51], 1 jnz short loc_1DA709 jmp short loc_1DA713 loc_1DA709: lea rdi, [rsp+0A8h+var_50]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_1DA713: jmp loc_1DA684 mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax test [rsp+arg_4F], 1 jnz short loc_1DA72F jmp short loc_1DA739 loc_1DA72F: lea rdi, [rsp+arg_50]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_1DA739: jmp loc_1DA82F loc_1DA73E: mov rcx, [rsp+0A8h+var_90] mov rax, [rcx+8] mov rax, [rax+8] sub rax, 1 and rax, [rcx+10h] mov [rcx+10h], rax mov rax, [rcx+8] mov rax, [rax+20h] mov rdx, [rcx+10h] mov rax, [rax+rdx*8] cmp rax, [rcx] jnz short loc_1DA779 mov [rsp+0A8h+var_1], 1 jmp loc_1DA81E loc_1DA779: mov rax, [rsp+0A8h+var_90] mov rdi, [rax+8] mov rsi, [rax+10h] call _ZNK6google8protobuf3MapINS0_6MapKeyENS0_11MapValueRefEE8InnerMap24TableEntryIsNonEmptyListEm; google::protobuf::Map<google::protobuf::MapKey,google::protobuf::MapValueRef>::InnerMap::TableEntryIsNonEmptyList(ulong) test al, 1 jnz short loc_1DA791 jmp short loc_1DA7DC loc_1DA791: mov rcx, [rsp+0A8h+var_90] mov rax, [rcx+8] mov rax, [rax+20h] mov rcx, [rcx+10h] mov rax, [rax+rcx*8] mov [rsp+0A8h+var_70], rax loc_1DA7AB: mov rax, [rsp+0A8h+var_70] mov rax, [rax+38h] mov [rsp+0A8h+var_70], rax cmp rax, 0 jz short loc_1DA7DA mov rcx, [rsp+0A8h+var_90] mov rax, [rsp+0A8h+var_70] cmp rax, [rcx] jnz short loc_1DA7D8 mov [rsp+0A8h+var_1], 1 jmp short loc_1DA81E loc_1DA7D8: jmp short loc_1DA7AB loc_1DA7DA: jmp short $+2 loc_1DA7DC: mov rax, [rsp+0A8h+var_90] mov rsi, [rax+8] mov rdx, [rax] mov rcx, [rsp+0A8h+var_18] lea rdi, [rsp+0A8h+var_88] call _ZNK6google8protobuf3MapINS0_6MapKeyENS0_11MapValueRefEE8InnerMap4findERKS2_PSt17_Rb_tree_iteratorISt4pairIKSt17reference_wrapperIS6_EPvEE; google::protobuf::Map<google::protobuf::MapKey,google::protobuf::MapValueRef>::InnerMap::find(google::protobuf::MapKey const&,std::_Rb_tree_iterator<std::pair<std::reference_wrapper<google::protobuf::MapKey const> const,void *>> *) mov rax, [rsp+0A8h+var_90] mov rcx, [rsp+0A8h+var_78] mov [rax+10h], rcx mov rdi, [rax+8] mov rsi, [rax+10h] call _ZNK6google8protobuf3MapINS0_6MapKeyENS0_11MapValueRefEE8InnerMap16TableEntryIsListEm; google::protobuf::Map<google::protobuf::MapKey,google::protobuf::MapValueRef>::InnerMap::TableEntryIsList(ulong) and al, 1 mov [rsp+0A8h+var_1], al loc_1DA81E: mov al, [rsp+0A8h+var_1] and al, 1 add rsp, 0A8h retn loc_1DA82F: mov rdi, [rsp+arg_40] call __Unwind_Resume
char google::protobuf::Map<google::protobuf::MapKey,google::protobuf::MapValueRef>::InnerMap::iterator_base<google::protobuf::MapPair<google::protobuf::MapKey,google::protobuf::MapValueRef> const>::revalidate_if_necessary( _QWORD *a1, long long a2) { unsigned long long v2; // rdx unsigned long long v3; // rdx char v5[16]; // [rsp+20h] [rbp-88h] BYREF long long v6; // [rsp+30h] [rbp-78h] long long v7; // [rsp+38h] [rbp-70h] long long v8; // [rsp+90h] [rbp-18h] _QWORD *v9; // [rsp+98h] [rbp-10h] v9 = a1; v8 = a2; a1[2] &= *(_QWORD *)(a1[1] + 8LL) - 1LL; v2 = a1[2]; if ( *(_QWORD *)(*(_QWORD *)(a1[1] + 32LL) + 8 * v2) == *a1 ) return 1; if ( (google::protobuf::Map<google::protobuf::MapKey,google::protobuf::MapValueRef>::InnerMap::TableEntryIsNonEmptyList( a1[1], (void *const *)a1[2], v2) & 1) != 0 ) { v7 = *(_QWORD *)(*(_QWORD *)(a1[1] + 32LL) + 8LL * a1[2]); while ( 1 ) { v7 = *(_QWORD *)(v7 + 56); if ( !v7 ) break; if ( v7 == *a1 ) return 1; } } google::protobuf::Map<google::protobuf::MapKey,google::protobuf::MapValueRef>::InnerMap::find(v5, a1[1], *a1, v8); a1[2] = v6; return google::protobuf::Map<google::protobuf::MapKey,google::protobuf::MapValueRef>::InnerMap::TableEntryIsList( a1[1], (void *const *)a1[2], v3) & 1; }
_M_add_ref_copy: MOV qword ptr [RSP + -0x40],RDI MOV RAX,qword ptr [RSP + -0x40] ADD RAX,0x8 MOV qword ptr [RSP + -0x30],RAX MOV dword ptr [RSP + -0x34],0x1 MOV RAX,qword ptr [0x00601f70] CMP byte ptr [RAX],0x0 JZ 0x001da6a8 MOV RCX,qword ptr [RSP + -0x30] MOV EAX,dword ptr [RSP + -0x34] MOV qword ptr [RSP + -0x20],RCX MOV dword ptr [RSP + -0x24],EAX MOV ECX,dword ptr [RSP + -0x24] MOV RAX,qword ptr [RSP + -0x20] ADD ECX,dword ptr [RAX] MOV dword ptr [RAX],ECX JMP 0x001da6d3 LAB_001da6a8: MOV RCX,qword ptr [RSP + -0x30] MOV EAX,dword ptr [RSP + -0x34] MOV qword ptr [RSP + -0x8],RCX MOV dword ptr [RSP + -0xc],EAX MOV RCX,qword ptr [RSP + -0x8] MOV EAX,dword ptr [RSP + -0xc] MOV dword ptr [RSP + -0x10],EAX MOV EAX,dword ptr [RSP + -0x10] XADD.LOCK dword ptr [RCX],EAX MOV dword ptr [RSP + -0x14],EAX LAB_001da6d3: RET
/* std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy() */ void __thiscall std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *this) { _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1; p_Var1 = this + 8; if (*PTR___libc_single_threaded_00601f70 == '\0') { LOCK(); *(int *)p_Var1 = *(int *)p_Var1 + 1; UNLOCK(); } else { *(int *)p_Var1 = *(int *)p_Var1 + 1; } return; }
45,387
google::protobuf::Map<google::protobuf::MapKey, google::protobuf::MapValueRef>::InnerMap::iterator_base<google::protobuf::MapPair<google::protobuf::MapKey, google::protobuf::MapValueRef> const>::revalidate_if_necessary(std::_Rb_tree_iterator<std::pair<std::reference_wrapper<google::protobuf::MapKey const> const, void*>>*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/map.h
bool revalidate_if_necessary(TreeIterator* it) { GOOGLE_DCHECK(node_ != nullptr && m_ != nullptr); // Force bucket_index_ to be in range. bucket_index_ &= (m_->num_buckets_ - 1); // Common case: the bucket we think is relevant points to node_. if (m_->table_[bucket_index_] == static_cast<void*>(node_)) return true; // Less common: the bucket is a linked list with node_ somewhere in it, // but not at the head. if (m_->TableEntryIsNonEmptyList(bucket_index_)) { Node* l = static_cast<Node*>(m_->table_[bucket_index_]); while ((l = l->next) != nullptr) { if (l == node_) { return true; } } } // Well, bucket_index_ still might be correct, but probably // not. Revalidate just to be sure. This case is rare enough that we // don't worry about potential optimizations, such as having a custom // find-like method that compares Node* instead of the key. iterator_base i(m_->find(node_->kv.first, it)); bucket_index_ = i.bucket_index_; return m_->TableEntryIsList(bucket_index_); }
O3
c
google::protobuf::Map<google::protobuf::MapKey, google::protobuf::MapValueRef>::InnerMap::iterator_base<google::protobuf::MapPair<google::protobuf::MapKey, google::protobuf::MapValueRef> const>::revalidate_if_necessary(std::_Rb_tree_iterator<std::pair<std::reference_wrapper<google::protobuf::MapKey const> const, void*>>*): pushq %r15 pushq %r14 pushq %rbx subq $0x20, %rsp movq %rsi, %rcx movq %rdi, %r14 movq (%rdi), %rdx movq 0x8(%rdi), %rsi movq 0x8(%rsi), %rdi decq %rdi andq 0x10(%r14), %rdi movq %rdi, 0x10(%r14) movq 0x20(%rsi), %r8 movq (%r8,%rdi,8), %rax movb $0x1, %bl cmpq %rdx, %rax je 0x9da45 testq %rax, %rax je 0x9da16 xorq $0x1, %rdi cmpq (%r8,%rdi,8), %rax je 0x9da16 movq 0x38(%rax), %rax cmpq %rdx, %rax je 0x9da11 testq %rax, %rax jne 0x9da03 testq %rax, %rax jne 0x9da45 movq %rsp, %r15 movq %r15, %rdi callq 0x9da52 movq 0x10(%r15), %rax movq %rax, 0x10(%r14) movq 0x8(%r14), %rcx movq 0x20(%rcx), %rcx movq (%rcx,%rax,8), %rdx testq %rdx, %rdx je 0x9da45 xorq $0x1, %rax cmpq (%rcx,%rax,8), %rdx setne %bl movl %ebx, %eax addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq nop
_ZN6google8protobuf3MapINS0_6MapKeyENS0_11MapValueRefEE8InnerMap13iterator_baseINS0_7MapPairIS2_S3_EEE23revalidate_if_necessaryEPSt17_Rb_tree_iteratorISt4pairIKSt17reference_wrapperIKS2_EPvEE: push r15 push r14 push rbx sub rsp, 20h mov rcx, rsi mov r14, rdi mov rdx, [rdi] mov rsi, [rdi+8] mov rdi, [rsi+8] dec rdi and rdi, [r14+10h] mov [r14+10h], rdi mov r8, [rsi+20h] mov rax, [r8+rdi*8] mov bl, 1 cmp rax, rdx jz short loc_9DA45 test rax, rax jz short loc_9DA16 xor rdi, 1 cmp rax, [r8+rdi*8] jz short loc_9DA16 loc_9DA03: mov rax, [rax+38h] cmp rax, rdx jz short loc_9DA11 test rax, rax jnz short loc_9DA03 loc_9DA11: test rax, rax jnz short loc_9DA45 loc_9DA16: mov r15, rsp mov rdi, r15 call _ZNK6google8protobuf3MapINS0_6MapKeyENS0_11MapValueRefEE8InnerMap10FindHelperIS2_EESt4pairINS5_13iterator_baseIKNS0_7MapPairIS2_S3_EEEEmERKT_PSt17_Rb_tree_iteratorIS7_IKSt17reference_wrapperIKS2_EPvEE; google::protobuf::Map<google::protobuf::MapKey,google::protobuf::MapValueRef>::InnerMap::FindHelper<google::protobuf::MapKey>(google::protobuf::MapKey const&,std::_Rb_tree_iterator<std::pair<std::reference_wrapper<google::protobuf::MapKey const> const,void *>> *) mov rax, [r15+10h] mov [r14+10h], rax mov rcx, [r14+8] mov rcx, [rcx+20h] mov rdx, [rcx+rax*8] test rdx, rdx jz short loc_9DA45 xor rax, 1 cmp rdx, [rcx+rax*8] setnz bl loc_9DA45: mov eax, ebx add rsp, 20h pop rbx pop r14 pop r15 retn
long long google::protobuf::Map<google::protobuf::MapKey,google::protobuf::MapValueRef>::InnerMap::iterator_base<google::protobuf::MapPair<google::protobuf::MapKey,google::protobuf::MapValueRef>>::revalidate_if_necessary( long long *a1, long long a2) { unsigned int v2; // ebx long long v5; // rdx long long v6; // rsi long long v7; // rdi long long v8; // r8 long long v9; // rax long long v10; // rax long long v11; // rcx long long v12; // rdx long long v14; // [rsp+0h] [rbp-38h] BYREF long long v15; // [rsp+10h] [rbp-28h] v5 = *a1; v6 = a1[1]; v7 = a1[2] & (*(_QWORD *)(v6 + 8) - 1LL); a1[2] = v7; v8 = *(_QWORD *)(v6 + 32); v9 = *(_QWORD *)(v8 + 8 * v7); LOBYTE(v2) = 1; if ( v9 != v5 ) { if ( !v9 || v9 == *(_QWORD *)(v8 + 8 * (v7 ^ 1)) ) goto LABEL_7; do v9 = *(_QWORD *)(v9 + 56); while ( v9 != v5 && v9 ); if ( !v9 ) { LABEL_7: google::protobuf::Map<google::protobuf::MapKey,google::protobuf::MapValueRef>::InnerMap::FindHelper<google::protobuf::MapKey>( &v14, v6, v5, a2); v10 = v15; a1[2] = v15; v11 = *(_QWORD *)(a1[1] + 32); v12 = *(_QWORD *)(v11 + 8 * v10); if ( v12 ) LOBYTE(v2) = v12 != *(_QWORD *)(v11 + 8 * (v10 ^ 1)); } } return v2; }
revalidate_if_necessary: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x20 MOV RCX,RSI MOV R14,RDI MOV RDX,qword ptr [RDI] MOV RSI,qword ptr [RDI + 0x8] MOV RDI,qword ptr [RSI + 0x8] DEC RDI AND RDI,qword ptr [R14 + 0x10] MOV qword ptr [R14 + 0x10],RDI MOV R8,qword ptr [RSI + 0x20] MOV RAX,qword ptr [R8 + RDI*0x8] MOV BL,0x1 CMP RAX,RDX JZ 0x0019da45 TEST RAX,RAX JZ 0x0019da16 XOR RDI,0x1 CMP RAX,qword ptr [R8 + RDI*0x8] JZ 0x0019da16 LAB_0019da03: MOV RAX,qword ptr [RAX + 0x38] CMP RAX,RDX JZ 0x0019da11 TEST RAX,RAX JNZ 0x0019da03 LAB_0019da11: TEST RAX,RAX JNZ 0x0019da45 LAB_0019da16: MOV R15,RSP MOV RDI,R15 CALL 0x0019da52 MOV RAX,qword ptr [R15 + 0x10] MOV qword ptr [R14 + 0x10],RAX MOV RCX,qword ptr [R14 + 0x8] MOV RCX,qword ptr [RCX + 0x20] MOV RDX,qword ptr [RCX + RAX*0x8] TEST RDX,RDX JZ 0x0019da45 XOR RAX,0x1 CMP RDX,qword ptr [RCX + RAX*0x8] SETNZ BL LAB_0019da45: MOV EAX,EBX ADD RSP,0x20 POP RBX POP R14 POP R15 RET
/* google::protobuf::Map<google::protobuf::MapKey, google::protobuf::MapValueRef>::InnerMap::iterator_base<google::protobuf::MapPair<google::protobuf::MapKey, google::protobuf::MapValueRef> >::revalidate_if_necessary(std::_Rb_tree_iterator<std::pair<std::reference_wrapper<google::protobuf::MapKey const> const, void*> >*) */ ulong google::protobuf::Map<google::protobuf::MapKey,google::protobuf::MapValueRef>::InnerMap:: iterator_base<google::protobuf::MapPair<google::protobuf::MapKey,google::protobuf::MapValueRef>> ::revalidate_if_necessary(_Rb_tree_iterator *param_1) { _Rb_tree_iterator *p_Var1; long lVar2; int8 unaff_RBX; ulong uVar3; ulong uVar5; MapKey aMStack_38 [16]; ulong local_28; int7 uVar4; p_Var1 = *(_Rb_tree_iterator **)(param_1 + 8); uVar5 = *(long *)(p_Var1 + 8) - 1U & *(ulong *)(param_1 + 0x10); *(ulong *)(param_1 + 0x10) = uVar5; lVar2 = *(long *)(*(long *)(p_Var1 + 0x20) + uVar5 * 8); uVar4 = (int7)((ulong)unaff_RBX >> 8); uVar3 = CONCAT71(uVar4,1); if (lVar2 != *(long *)param_1) { if ((lVar2 != 0) && (lVar2 != *(long *)(*(long *)(p_Var1 + 0x20) + (uVar5 ^ 1) * 8))) { do { lVar2 = *(long *)(lVar2 + 0x38); if (lVar2 == *(long *)param_1) break; } while (lVar2 != 0); if (lVar2 != 0) goto LAB_0019da45; } FindHelper<google::protobuf::MapKey>(aMStack_38,p_Var1); *(ulong *)(param_1 + 0x10) = local_28; lVar2 = *(long *)(*(long *)(*(long *)(param_1 + 8) + 0x20) + local_28 * 8); if (lVar2 != 0) { uVar3 = CONCAT71(uVar4,lVar2 != *(long *)(*(long *)(*(long *)(param_1 + 8) + 0x20) + (local_28 ^ 1) * 8)); } } LAB_0019da45: return uVar3 & 0xffffffff; }
45,388
translog_log_debug_info
eloqsql/storage/maria/ma_loghandler.c
my_bool translog_log_debug_info(TRN *trn __attribute__((unused)), enum translog_debug_info_type type __attribute__((unused)), uchar *info __attribute__((unused)), size_t length __attribute__((unused))) { #ifdef EXTRA_DEBUG LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 2]; uchar debug_type; LSN lsn; if (!trn) { /* We can't log the current transaction because we don't have an active transaction. Use a temporary transaction object instead */ trn= &dummy_transaction_object; } debug_type= (uchar) type; log_array[TRANSLOG_INTERNAL_PARTS + 0].str= &debug_type; log_array[TRANSLOG_INTERNAL_PARTS + 0].length= 1; log_array[TRANSLOG_INTERNAL_PARTS + 1].str= info; log_array[TRANSLOG_INTERNAL_PARTS + 1].length= length; return translog_write_record(&lsn, LOGREC_DEBUG_INFO, trn, NULL, (translog_size_t) (1+ length), sizeof(log_array)/sizeof(log_array[0]), log_array, NULL, NULL); #else return 0; #endif }
O3
c
translog_log_debug_info: pushq %rbp movq %rsp, %rbp xorl %eax, %eax popq %rbp retq
translog_log_debug_info: push rbp mov rbp, rsp xor eax, eax pop rbp retn
long long translog_log_debug_info() { return 0LL; }
translog_log_debug_info: PUSH RBP MOV RBP,RSP XOR EAX,EAX POP RBP RET
int8 translog_log_debug_info(void) { return 0; }
45,389
get_utf8
memononen[P]budouxc/src/budoux.c
static uint32_t get_utf8(utf_iter_t* iter) { uint32_t state = 0; uint32_t cp = 0; const char* buf = iter->buf; // Parse utf-8 code point decutf8(&state, &cp, buf[iter->pos++]); if (state && iter->pos < iter->buf_len && buf[iter->pos]) decutf8(&state, &cp, buf[iter->pos++]); if (state && iter->pos < iter->buf_len && buf[iter->pos]) decutf8(&state, &cp, buf[iter->pos++]); if (state && iter->pos < iter->buf_len && buf[iter->pos]) decutf8(&state, &cp, buf[iter->pos++]); if (state != UTF8_ACCEPT) cp = 0; // If reached end of string, start emitting empty code points. if (iter->pos >= iter->buf_len || buf[iter->pos] == '\0') iter->get = &get_empty; return cp; }
O3
c
get_utf8: movq 0x8(%rdi), %rdx movslq 0x14(%rdi), %r10 leaq 0x1(%r10), %r8 movl %r8d, 0x14(%rdi) movzbl (%rdx,%r10), %r9d leaq 0xcd8(%rip), %rsi # 0x3120 movzbl (%r9,%rsi), %ecx movl $0xff, %eax shrl %cl, %eax andl %r9d, %eax movzbl 0x100(%rcx,%rsi), %r9d movl 0x10(%rdi), %ecx testl %r9d, %r9d je 0x252d cmpl %ecx, %r8d jge 0x24ac cmpb $0x0, (%rdx,%r8) je 0x24ac addl $0x2, %r10d movl %r10d, 0x14(%rdi) movzbl (%rdx,%r8), %r8d movzbl (%r8,%rsi), %r11d addq %r9, %r11 andl $0x3f, %r8d shll $0x6, %eax orl %r8d, %eax movzbl 0x100(%r11,%rsi), %r9d movl %r10d, %r8d testl %r9d, %r9d je 0x2537 cmpl %ecx, %r8d jge 0x24ed movslq %r8d, %r10 cmpb $0x0, (%rdx,%r10) je 0x24ed incl %r8d movl %r8d, 0x14(%rdi) movzbl (%rdx,%r10), %r10d movzbl (%r10,%rsi), %r11d andl $0x3f, %r10d shll $0x6, %eax orl %r10d, %eax movl %r9d, %r9d addq %r11, %r9 movzbl 0x100(%r9,%rsi), %r9d movl %r8d, %r10d testl %r9d, %r9d je 0x2537 cmpl %ecx, %r8d jge 0x2532 movslq %r8d, %r10 cmpb $0x0, (%rdx,%r10) je 0x2532 incl %r8d movl %r8d, 0x14(%rdi) movzbl (%rdx,%r10), %r10d movzbl (%r10,%rsi), %r11d andl $0x3f, %r10d shll $0x6, %eax orl %r10d, %eax movl %r9d, %r9d addq %r11, %r9 xorl %r10d, %r10d cmpb $0x0, 0x100(%r9,%rsi) cmovnel %r10d, %eax movl %r8d, %r10d jmp 0x2537 movl %r8d, %r10d xorl %eax, %eax cmpl %ecx, %r10d jge 0x2546 movslq %r10d, %rcx cmpb $0x0, (%rdx,%rcx) je 0x2546 retq leaq -0x139(%rip), %rcx # 0x2414 movq %rcx, (%rdi) retq
get_utf8: mov rdx, [rdi+8] movsxd r10, dword ptr [rdi+14h] lea r8, [r10+1] mov [rdi+14h], r8d movzx r9d, byte ptr [rdx+r10] lea rsi, decutf8_utf8d movzx ecx, byte ptr [r9+rsi] mov eax, 0FFh shr eax, cl and eax, r9d movzx r9d, byte ptr [rcx+rsi+100h] mov ecx, [rdi+10h] test r9d, r9d jz loc_252D cmp r8d, ecx jge short loc_24AC cmp byte ptr [rdx+r8], 0 jz short loc_24AC add r10d, 2 mov [rdi+14h], r10d movzx r8d, byte ptr [rdx+r8] movzx r11d, byte ptr [r8+rsi] add r11, r9 and r8d, 3Fh shl eax, 6 or eax, r8d movzx r9d, byte ptr [r11+rsi+100h] mov r8d, r10d test r9d, r9d jz loc_2537 loc_24AC: cmp r8d, ecx jge short loc_24ED movsxd r10, r8d cmp byte ptr [rdx+r10], 0 jz short loc_24ED inc r8d mov [rdi+14h], r8d movzx r10d, byte ptr [rdx+r10] movzx r11d, byte ptr [r10+rsi] and r10d, 3Fh shl eax, 6 or eax, r10d mov r9d, r9d add r9, r11 movzx r9d, byte ptr [r9+rsi+100h] mov r10d, r8d test r9d, r9d jz short loc_2537 loc_24ED: cmp r8d, ecx jge short loc_2532 movsxd r10, r8d cmp byte ptr [rdx+r10], 0 jz short loc_2532 inc r8d mov [rdi+14h], r8d movzx r10d, byte ptr [rdx+r10] movzx r11d, byte ptr [r10+rsi] and r10d, 3Fh shl eax, 6 or eax, r10d mov r9d, r9d add r9, r11 xor r10d, r10d cmp byte ptr [r9+rsi+100h], 0 cmovnz eax, r10d loc_252D: mov r10d, r8d jmp short loc_2537 loc_2532: mov r10d, r8d xor eax, eax loc_2537: cmp r10d, ecx jge short loc_2546 movsxd rcx, r10d cmp byte ptr [rdx+rcx], 0 jz short loc_2546 retn loc_2546: lea rcx, get_empty mov [rdi], rcx retn
long long get_utf8(long long a1) { long long v1; // rdx long long v2; // r10 long long v3; // r8 long long v4; // r9 long long v5; // rcx long long result; // rax long long v7; // r9 int v8; // ecx int v9; // r10d long long v10; // r11 long long v11; // r10 long long v12; // r10 long long v13; // r10 long long v14; // r10 v1 = *(_QWORD *)(a1 + 8); v2 = *(int *)(a1 + 20); v3 = v2 + 1; *(_DWORD *)(a1 + 20) = v2 + 1; v4 = *(unsigned __int8 *)(v1 + v2); v5 = decutf8_utf8d[v4]; result = (unsigned int)v4 & (0xFFu >> v5); v7 = decutf8_utf8d[v5 + 256]; v8 = *(_DWORD *)(a1 + 16); if ( (_DWORD)v7 ) { if ( (int)v3 < v8 ) { if ( *(_BYTE *)(v1 + v3) ) { v9 = v2 + 2; *(_DWORD *)(a1 + 20) = v9; v3 = *(unsigned __int8 *)(v1 + v3); v10 = v7 + decutf8_utf8d[v3]; result = (unsigned int)(v3 & 0x3F) | ((_DWORD)result << 6); LODWORD(v7) = decutf8_utf8d[v10 + 256]; LODWORD(v3) = v9; if ( !decutf8_utf8d[v10 + 256] ) goto LABEL_14; } } if ( (int)v3 < v8 ) { v11 = (int)v3; if ( *(_BYTE *)(v1 + (int)v3) ) { LODWORD(v3) = v3 + 1; *(_DWORD *)(a1 + 20) = v3; v12 = *(unsigned __int8 *)(v1 + v11); result = (unsigned int)(v12 & 0x3F) | ((_DWORD)result << 6); LODWORD(v7) = decutf8_utf8d[decutf8_utf8d[v12] + 256 + (unsigned long long)(unsigned int)v7]; v9 = v3; if ( !(_DWORD)v7 ) goto LABEL_14; } } if ( (int)v3 >= v8 || (v13 = (int)v3, !*(_BYTE *)(v1 + (int)v3)) ) { v9 = v3; result = 0LL; goto LABEL_14; } LODWORD(v3) = v3 + 1; *(_DWORD *)(a1 + 20) = v3; v14 = *(unsigned __int8 *)(v1 + v13); result = (unsigned int)(v14 & 0x3F) | ((_DWORD)result << 6); if ( decutf8_utf8d[decutf8_utf8d[v14] + 256 + (unsigned long long)(unsigned int)v7] ) result = 0LL; } v9 = v3; LABEL_14: if ( v9 >= v8 || !*(_BYTE *)(v1 + v9) ) *(_QWORD *)a1 = get_empty; return result; }
get_utf8: MOV RDX,qword ptr [RDI + 0x8] MOVSXD R10,dword ptr [RDI + 0x14] LEA R8,[R10 + 0x1] MOV dword ptr [RDI + 0x14],R8D MOVZX R9D,byte ptr [RDX + R10*0x1] LEA RSI,[0x103120] MOVZX ECX,byte ptr [R9 + RSI*0x1] MOV EAX,0xff SHR EAX,CL AND EAX,R9D MOVZX R9D,byte ptr [RCX + RSI*0x1 + 0x100] MOV ECX,dword ptr [RDI + 0x10] TEST R9D,R9D JZ 0x0010252d CMP R8D,ECX JGE 0x001024ac CMP byte ptr [RDX + R8*0x1],0x0 JZ 0x001024ac ADD R10D,0x2 MOV dword ptr [RDI + 0x14],R10D MOVZX R8D,byte ptr [RDX + R8*0x1] MOVZX R11D,byte ptr [R8 + RSI*0x1] ADD R11,R9 AND R8D,0x3f SHL EAX,0x6 OR EAX,R8D MOVZX R9D,byte ptr [R11 + RSI*0x1 + 0x100] MOV R8D,R10D TEST R9D,R9D JZ 0x00102537 LAB_001024ac: CMP R8D,ECX JGE 0x001024ed MOVSXD R10,R8D CMP byte ptr [RDX + R10*0x1],0x0 JZ 0x001024ed INC R8D MOV dword ptr [RDI + 0x14],R8D MOVZX R10D,byte ptr [RDX + R10*0x1] MOVZX R11D,byte ptr [R10 + RSI*0x1] AND R10D,0x3f SHL EAX,0x6 OR EAX,R10D MOV R9D,R9D ADD R9,R11 MOVZX R9D,byte ptr [R9 + RSI*0x1 + 0x100] MOV R10D,R8D TEST R9D,R9D JZ 0x00102537 LAB_001024ed: CMP R8D,ECX JGE 0x00102532 MOVSXD R10,R8D CMP byte ptr [RDX + R10*0x1],0x0 JZ 0x00102532 INC R8D MOV dword ptr [RDI + 0x14],R8D MOVZX R10D,byte ptr [RDX + R10*0x1] MOVZX R11D,byte ptr [R10 + RSI*0x1] AND R10D,0x3f SHL EAX,0x6 OR EAX,R10D MOV R9D,R9D ADD R9,R11 XOR R10D,R10D CMP byte ptr [R9 + RSI*0x1 + 0x100],0x0 CMOVNZ EAX,R10D LAB_0010252d: MOV R10D,R8D JMP 0x00102537 LAB_00102532: MOV R10D,R8D XOR EAX,EAX LAB_00102537: CMP R10D,ECX JGE 0x00102546 MOVSXD RCX,R10D CMP byte ptr [RDX + RCX*0x1],0x0 JZ 0x00102546 RET LAB_00102546: LEA RCX,[0x102414] MOV qword ptr [RDI],RCX RET
uint get_utf8(int8 *param_1) { byte bVar1; int iVar2; int iVar3; long lVar4; uint uVar5; ulong uVar6; uint uVar7; ulong uVar8; uint uVar9; long lVar10; lVar4 = param_1[1]; iVar2 = *(int *)((long)param_1 + 0x14); uVar6 = (long)iVar2 + 1; *(int *)((long)param_1 + 0x14) = (int)uVar6; bVar1 = *(byte *)(lVar4 + iVar2); uVar5 = 0xffU >> (decutf8_utf8d[bVar1] & 0x1f) & (uint)bVar1; uVar8 = (ulong)(byte)decutf8_utf8d[(ulong)(byte)decutf8_utf8d[bVar1] + 0x100]; iVar3 = *(int *)(param_1 + 2); if (decutf8_utf8d[(ulong)(byte)decutf8_utf8d[bVar1] + 0x100] != 0) { if (((int)uVar6 < iVar3) && (*(char *)(lVar4 + uVar6) != '\0')) { uVar9 = iVar2 + 2; *(uint *)((long)param_1 + 0x14) = uVar9; lVar10 = (byte)decutf8_utf8d[*(byte *)(lVar4 + uVar6)] + uVar8; uVar5 = uVar5 << 6 | *(byte *)(lVar4 + uVar6) & 0x3f; uVar8 = (ulong)(byte)decutf8_utf8d[lVar10 + 0x100]; uVar6 = (ulong)uVar9; if (decutf8_utf8d[lVar10 + 0x100] == 0) goto LAB_00102537; } uVar7 = (uint)uVar8; uVar9 = (uint)uVar6; if (((int)uVar9 < iVar3) && (lVar10 = (long)(int)uVar9, *(char *)(lVar4 + lVar10) != '\0')) { uVar9 = uVar9 + 1; *(uint *)((long)param_1 + 0x14) = uVar9; bVar1 = *(byte *)(lVar4 + lVar10); uVar5 = uVar5 << 6 | bVar1 & 0x3f; uVar7 = (uint)(byte)decutf8_utf8d[uVar8 + (byte)decutf8_utf8d[bVar1] + 0x100]; if (decutf8_utf8d[uVar8 + (byte)decutf8_utf8d[bVar1] + 0x100] == 0) goto LAB_00102537; } if ((iVar3 <= (int)uVar9) || (*(char *)(lVar4 + (int)uVar9) == '\0')) { uVar5 = 0; goto LAB_00102537; } uVar6 = (ulong)(uVar9 + 1); *(uint *)((long)param_1 + 0x14) = uVar9 + 1; bVar1 = *(byte *)(lVar4 + (int)uVar9); uVar5 = uVar5 << 6 | bVar1 & 0x3f; if (decutf8_utf8d[(ulong)uVar7 + (ulong)(byte)decutf8_utf8d[bVar1] + 0x100] != '\0') { uVar5 = 0; } } uVar9 = (uint)uVar6; LAB_00102537: if (((int)uVar9 < iVar3) && (*(char *)(lVar4 + (int)uVar9) != '\0')) { return uVar5; } *param_1 = get_empty; return uVar5; }
45,390
JS_GetOwnPropertyNames2
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_GetOwnPropertyNames2(JSContext *ctx, JSValue obj1, int flags, int kind) { JSValue obj, r, val, key, value; JSObject *p; JSPropertyEnum *atoms; uint32_t len, i, j; r = JS_UNDEFINED; val = JS_UNDEFINED; obj = JS_ToObject(ctx, obj1); if (JS_IsException(obj)) return JS_EXCEPTION; p = JS_VALUE_GET_OBJ(obj); if (JS_GetOwnPropertyNamesInternal(ctx, &atoms, &len, p, flags & ~JS_GPN_ENUM_ONLY)) goto exception; r = JS_NewArray(ctx); if (JS_IsException(r)) goto exception; for(j = i = 0; i < len; i++) { JSAtom atom = atoms[i].atom; if (flags & JS_GPN_ENUM_ONLY) { JSPropertyDescriptor desc; int res; /* Check if property is still enumerable */ res = JS_GetOwnPropertyInternal(ctx, &desc, p, atom); if (res < 0) goto exception; if (!res) continue; js_free_desc(ctx, &desc); if (!(desc.flags & JS_PROP_ENUMERABLE)) continue; } switch(kind) { default: case JS_ITERATOR_KIND_KEY: val = JS_AtomToValue(ctx, atom); if (JS_IsException(val)) goto exception; break; case JS_ITERATOR_KIND_VALUE: val = JS_GetProperty(ctx, obj, atom); if (JS_IsException(val)) goto exception; break; case JS_ITERATOR_KIND_KEY_AND_VALUE: val = JS_NewArray(ctx); if (JS_IsException(val)) goto exception; key = JS_AtomToValue(ctx, atom); if (JS_IsException(key)) goto exception1; if (JS_CreateDataPropertyUint32(ctx, val, 0, key, JS_PROP_THROW) < 0) goto exception1; value = JS_GetProperty(ctx, obj, atom); if (JS_IsException(value)) goto exception1; if (JS_CreateDataPropertyUint32(ctx, val, 1, value, JS_PROP_THROW) < 0) goto exception1; break; } if (JS_CreateDataPropertyUint32(ctx, r, j++, val, 0) < 0) goto exception; } goto done; exception1: JS_FreeValue(ctx, val); exception: JS_FreeValue(ctx, r); r = JS_EXCEPTION; done: js_free_prop_enum(ctx, atoms, len); JS_FreeValue(ctx, obj); return r; }
O2
c
JS_GetOwnPropertyNames2: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movl %r8d, %r14d movl %ecx, %r15d movq %rdi, %rbx callq 0x24742 movq %rdx, %rbp cmpl $0x6, %ebp jne 0x4635c pushq $0x6 popq %r12 xorl %r14d, %r14d xorl %r15d, %r15d jmp 0x4660f movq %rax, %r13 movl %r15d, %r8d andl $-0x11, %r8d leaq 0x48(%rsp), %rsi leaq 0x2c(%rsp), %rdx movq %rbx, %rdi movq %rax, %rcx callq 0x2119f testl %eax, %eax je 0x463a0 movq 0x48(%rsp), %rax movq %rax, 0x30(%rsp) pushq $0x3 popq %r12 movl 0x2c(%rsp), %eax movq %rax, 0x38(%rsp) xorl %eax, %eax xorl %r14d, %r14d jmp 0x465d1 movl %r15d, 0x44(%rsp) movl %r14d, 0x40(%rsp) movq %rbx, %rdi callq 0x1ee6b movq %rdx, %r12 movq %rax, 0x8(%rsp) movq %rax, %r14 shrq $0x20, %r14 movq 0x48(%rsp), %rax movq %rax, 0x30(%rsp) movl 0x2c(%rsp), %eax movq %rax, 0x38(%rsp) cmpl $0x6, %r12d jne 0x463e4 movq 0x8(%rsp), %rax jmp 0x465d1 movq %rbp, 0x10(%rsp) xorl %ebp, %ebp xorl %r15d, %r15d movq %r13, 0x18(%rsp) movq %r14, 0x20(%rsp) cmpq %rbp, 0x38(%rsp) je 0x46579 movl %r15d, 0x28(%rsp) movq 0x30(%rsp), %rax movl 0x4(%rax,%rbp,8), %r15d testb $0x10, 0x44(%rsp) jne 0x464cb movl 0x40(%rsp), %eax movq %rbx, %rdi cmpl $0x1, %eax je 0x46514 cmpl $0x2, %eax jne 0x46526 callq 0x1ee6b movq %rdx, %r14 cmpl $0x6, %r14d je 0x465bd movq %rax, %r13 movq %rbx, %rdi movl %r15d, %esi callq 0x1e4ce movq %rdx, %r9 cmpl $0x6, %r9d je 0x465af movl $0x4000, (%rsp) # imm = 0x4000 movq %rbx, %rdi movq %r13, %rsi movq %r14, %rdx xorl %ecx, %ecx movq %rax, %r8 callq 0x3df17 testl %eax, %eax js 0x465af movq %rbx, %rdi movq 0x18(%rsp), %rsi movq 0x10(%rsp), %rdx movl %r15d, %ecx callq 0x1ebf3 movq %rdx, %r9 cmpl $0x6, %r9d je 0x465af movl $0x4000, (%rsp) # imm = 0x4000 movq %rbx, %rdi movq %r13, %rsi movq %r14, %rdx pushq $0x1 popq %rcx movq %rax, %r8 callq 0x3df17 testl %eax, %eax jns 0x4653e jmp 0x465af movq %rbx, %rdi leaq 0x50(%rsp), %rsi movq %r13, %rdx movl %r15d, %ecx callq 0x21730 pushq $0x2 popq %rcx testl %eax, %eax js 0x46505 pushq $0x5 popq %rcx je 0x46505 movq %rbx, %rdi leaq 0x50(%rsp), %rsi callq 0x39c9d testb $0x4, 0x50(%rsp) pushq $0x5 popq %rcx jne 0x4641d cmpl $0x5, %ecx movl 0x28(%rsp), %r15d je 0x46571 jmp 0x46598 movq %r13, %rsi movq 0x10(%rsp), %rdx movl %r15d, %ecx callq 0x1ebf3 jmp 0x4652e movl %r15d, %esi callq 0x1e4ce movq %rdx, %r14 cmpl $0x6, %r14d je 0x465bd movq %rax, %r13 movq 0x8(%rsp), %rsi movl 0x28(%rsp), %r15d movl %r15d, %ecx andl $0x0, (%rsp) movq %rbx, %rdi movq %r12, %rdx movq %r13, %r8 movq %r14, %r9 callq 0x3df17 testl %eax, %eax js 0x465bd incl %r15d movq 0x18(%rsp), %r13 movq 0x20(%rsp), %r14 incq %rbp jmp 0x463f8 movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 movq 0x8(%rsp), %rcx movq %rcx, %r15 andq %rax, %r15 movl %ecx, %r14d movq 0x10(%rsp), %rbp jmp 0x465ef cmpl $0x2, %ecx movq 0x10(%rsp), %rbp movq 0x8(%rsp), %rax je 0x465d1 xorl %r14d, %r14d xorl %r15d, %r15d jmp 0x4660f movq %rbx, %rdi movq %r13, %rsi movq %r14, %rdx callq 0x1bbce movq 0x18(%rsp), %r13 movq 0x10(%rsp), %rbp movq 0x8(%rsp), %rax movq 0x20(%rsp), %r14 shlq $0x20, %r14 movl %eax, %esi orq %r14, %rsi movq %rbx, %rdi movq %r12, %rdx callq 0x1bbce pushq $0x6 popq %r12 xorl %r14d, %r14d xorl %r15d, %r15d movq %rbx, %rdi movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rdx callq 0x21973 movq %rbx, %rdi movq %r13, %rsi movq %rbp, %rdx callq 0x1bbce orq %r15, %r14 movq %r14, %rax movq %r12, %rdx addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
JS_GetOwnPropertyNames2: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov r14d, r8d mov r15d, ecx mov rbx, rdi call JS_ToObject mov rbp, rdx cmp ebp, 6 jnz short loc_4635C push 6 pop r12 xor r14d, r14d xor r15d, r15d jmp loc_4660F loc_4635C: mov r13, rax mov r8d, r15d and r8d, 0FFFFFFEFh lea rsi, [rsp+0B8h+var_70] lea rdx, [rsp+0B8h+var_8C] mov rdi, rbx mov rcx, rax call JS_GetOwnPropertyNamesInternal test eax, eax jz short loc_463A0 mov rax, [rsp+0B8h+var_70] mov [rsp+0B8h+var_88], rax push 3 pop r12 mov eax, [rsp+0B8h+var_8C] mov [rsp+0B8h+var_80], rax xor eax, eax xor r14d, r14d jmp loc_465D1 loc_463A0: mov [rsp+0B8h+var_74], r15d mov [rsp+0B8h+var_78], r14d mov rdi, rbx call JS_NewArray mov r12, rdx mov [rsp+0B8h+var_B0], rax mov r14, rax shr r14, 20h mov rax, [rsp+0B8h+var_70] mov [rsp+0B8h+var_88], rax mov eax, [rsp+0B8h+var_8C] mov [rsp+0B8h+var_80], rax cmp r12d, 6 jnz short loc_463E4 mov rax, [rsp+0B8h+var_B0] jmp loc_465D1 loc_463E4: mov [rsp+0B8h+var_A8], rbp xor ebp, ebp xor r15d, r15d mov [rsp+0B8h+var_A0], r13 mov [rsp+0B8h+var_98], r14 loc_463F8: cmp [rsp+0B8h+var_80], rbp jz loc_46579 mov [rsp+0B8h+var_90], r15d mov rax, [rsp+0B8h+var_88] mov r15d, [rax+rbp*8+4] test byte ptr [rsp+0B8h+var_74], 10h jnz loc_464CB loc_4641D: mov eax, [rsp+0B8h+var_78] mov rdi, rbx cmp eax, 1 jz loc_46514 cmp eax, 2 jnz loc_46526 call JS_NewArray mov r14, rdx cmp r14d, 6 jz loc_465BD mov r13, rax mov rdi, rbx mov esi, r15d call JS_AtomToValue mov r9, rdx cmp r9d, 6 jz loc_465AF mov [rsp+0B8h+var_B8], 4000h mov rdi, rbx mov rsi, r13 mov rdx, r14 xor ecx, ecx mov r8, rax call JS_CreateDataPropertyUint32 test eax, eax js loc_465AF mov rdi, rbx mov rsi, [rsp+0B8h+var_A0] mov rdx, [rsp+0B8h+var_A8] mov ecx, r15d call JS_GetProperty mov r9, rdx cmp r9d, 6 jz loc_465AF mov [rsp+0B8h+var_B8], 4000h mov rdi, rbx mov rsi, r13 mov rdx, r14 push 1 pop rcx mov r8, rax call JS_CreateDataPropertyUint32 test eax, eax jns short loc_4653E jmp loc_465AF loc_464CB: mov rdi, rbx lea rsi, [rsp+0B8h+var_68] mov rdx, r13 mov ecx, r15d call JS_GetOwnPropertyInternal push 2 pop rcx test eax, eax js short loc_46505 push 5 pop rcx jz short loc_46505 mov rdi, rbx lea rsi, [rsp+0B8h+var_68] call js_free_desc test [rsp+0B8h+var_68], 4 push 5 pop rcx jnz loc_4641D loc_46505: cmp ecx, 5 mov r15d, [rsp+0B8h+var_90] jz short loc_46571 jmp loc_46598 loc_46514: mov rsi, r13 mov rdx, [rsp+0B8h+var_A8] mov ecx, r15d call JS_GetProperty jmp short loc_4652E loc_46526: mov esi, r15d call JS_AtomToValue loc_4652E: mov r14, rdx cmp r14d, 6 jz loc_465BD mov r13, rax loc_4653E: mov rsi, [rsp+0B8h+var_B0] mov r15d, [rsp+0B8h+var_90] mov ecx, r15d and [rsp+0B8h+var_B8], 0 mov rdi, rbx mov rdx, r12 mov r8, r13 mov r9, r14 call JS_CreateDataPropertyUint32 test eax, eax js short loc_465BD inc r15d mov r13, [rsp+0B8h+var_A0] mov r14, [rsp+0B8h+var_98] loc_46571: inc rbp jmp loc_463F8 loc_46579: mov rax, 0FFFFFFFF00000000h mov rcx, [rsp+0B8h+var_B0] mov r15, rcx and r15, rax mov r14d, ecx mov rbp, [rsp+0B8h+var_A8] jmp short loc_465EF loc_46598: cmp ecx, 2 mov rbp, [rsp+0B8h+var_A8] mov rax, [rsp+0B8h+var_B0] jz short loc_465D1 xor r14d, r14d xor r15d, r15d jmp short loc_4660F loc_465AF: mov rdi, rbx mov rsi, r13 mov rdx, r14 call JS_FreeValue loc_465BD: mov r13, [rsp+0B8h+var_A0] mov rbp, [rsp+0B8h+var_A8] mov rax, [rsp+0B8h+var_B0] mov r14, [rsp+0B8h+var_98] loc_465D1: shl r14, 20h mov esi, eax or rsi, r14 mov rdi, rbx mov rdx, r12 call JS_FreeValue push 6 pop r12 xor r14d, r14d xor r15d, r15d loc_465EF: mov rdi, rbx mov rsi, [rsp+0B8h+var_88] mov rdx, [rsp+0B8h+var_80] call js_free_prop_enum mov rdi, rbx mov rsi, r13 mov rdx, rbp call JS_FreeValue loc_4660F: or r14, r15 mov rax, r14 mov rdx, r12 add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long JS_GetOwnPropertyNames2( 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) { int v14; // r14d int v15; // r15d long long v16; // rax long long v17; // rdx long long v18; // rbp long long v19; // r14 unsigned long long v20; // r15 long long v21; // r13 long long v22; // r12 unsigned long long v23; // rax unsigned long long v24; // r14 unsigned int *v25; // r8 long long v26; // rdx long long v27; // rbp unsigned int v28; // r15d unsigned int v29; // r15d long long v30; // rax long long v31; // rdx long long v32; // r14 _DWORD *v33; // r13 _DWORD *v34; // rax long long v35; // rdx double v36; // xmm4_8 double v37; // xmm5_8 _DWORD *v38; // rax long long v39; // rdx double v40; // xmm4_8 double v41; // xmm5_8 double v42; // xmm4_8 double v43; // xmm5_8 int v44; // eax int v45; // ecx long long Property; // rax long long v47; // rdx long long v49; // [rsp+8h] [rbp-B0h] long long v50; // [rsp+10h] [rbp-A8h] long long v51; // [rsp+18h] [rbp-A0h] unsigned long long v52; // [rsp+20h] [rbp-98h] unsigned int v53; // [rsp+28h] [rbp-90h] unsigned int v54; // [rsp+2Ch] [rbp-8Ch] BYREF long long v55; // [rsp+30h] [rbp-88h] long long v56; // [rsp+38h] [rbp-80h] int v57; // [rsp+40h] [rbp-78h] int v58; // [rsp+44h] [rbp-74h] long long v59; // [rsp+48h] [rbp-70h] BYREF long long v60[13]; // [rsp+50h] [rbp-68h] BYREF v14 = a5; v15 = a4; v16 = JS_ToObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v18 = v17; if ( (_DWORD)v17 == 6 ) { v19 = 0LL; v20 = 0LL; return v20 | v19; } v21 = v16; if ( (unsigned int)JS_GetOwnPropertyNamesInternal(a1, &v59, (int *)&v54, v16, v15 & 0xFFFFFFEF) ) { v55 = v59; v22 = 3LL; v56 = v54; LODWORD(v23) = 0; v24 = 0LL; goto LABEL_32; } v58 = v15; v57 = v14; v23 = JS_NewArray(a1); v22 = v26; v49 = v23; v24 = HIDWORD(v23); v55 = v59; v56 = v54; if ( (_DWORD)v26 == 6 ) goto LABEL_32; v50 = v18; v27 = 0LL; v28 = 0; v51 = v21; v52 = HIDWORD(v23); while ( 1 ) { if ( v56 == v27 ) { v20 = v49 & 0xFFFFFFFF00000000LL; v19 = (unsigned int)v49; v18 = v50; goto LABEL_33; } v53 = v28; v29 = *(_DWORD *)(v55 + 8 * v27 + 4); if ( (v58 & 0x10) != 0 ) { LOBYTE(v44) = JS_GetOwnPropertyInternal(a1, (long long)v60, v21, v29, v25); v45 = 2; if ( v44 < 0 || (v45 = 5, !v44) || (js_free_desc(a1, v60), v45 = 5, (v60[0] & 4) == 0) ) { v28 = v53; if ( v45 != 5 ) { v18 = v50; LODWORD(v23) = v49; goto LABEL_32; } goto LABEL_28; } } if ( v57 == 1 ) { Property = JS_GetProperty(a1, v21, v50, v29); LABEL_24: v32 = v47; if ( (_DWORD)v47 == 6 ) goto LABEL_31; v33 = (_DWORD *)Property; goto LABEL_26; } if ( v57 != 2 ) { Property = JS_AtomToValue(a1, v29); goto LABEL_24; } v30 = JS_NewArray(a1); v32 = v31; if ( (_DWORD)v31 == 6 ) goto LABEL_31; v33 = (_DWORD *)v30; v34 = (_DWORD *)JS_AtomToValue(a1, v29); if ( (_DWORD)v35 == 6 ) break; if ( (int)JS_CreateDataPropertyUint32( a1, (long long)v33, v32, 0LL, v34, v35, *(double *)a7.m128_u64, a8, a9, a10, v36, v37, a13, a14, 0x4000) < 0 ) break; v38 = (_DWORD *)JS_GetProperty(a1, v51, v50, v29); if ( (_DWORD)v39 == 6 || (int)JS_CreateDataPropertyUint32( a1, (long long)v33, v32, 1LL, v38, v39, *(double *)a7.m128_u64, a8, a9, a10, v40, v41, a13, a14, 0x4000) < 0 ) { break; } LABEL_26: if ( (int)JS_CreateDataPropertyUint32( a1, v49, v22, v53, v33, v32, *(double *)a7.m128_u64, a8, a9, a10, v42, v43, a13, a14, 0) < 0 ) goto LABEL_31; v28 = v53 + 1; v21 = v51; v24 = v52; LABEL_28: ++v27; } JS_FreeValue(a1, (long long)v33, v32); LABEL_31: v21 = v51; v18 = v50; LODWORD(v23) = v49; v24 = v52; LABEL_32: JS_FreeValue(a1, (v24 << 32) | (unsigned int)v23, v22); v19 = 0LL; v20 = 0LL; LABEL_33: js_free_prop_enum(a1, v55, v56); JS_FreeValue(a1, v21, v18); return v20 | v19; }
JS_GetOwnPropertyNames2: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOV R14D,R8D MOV R15D,ECX MOV RBX,RDI CALL 0x00124742 MOV RBP,RDX CMP EBP,0x6 JNZ 0x0014635c PUSH 0x6 POP R12 XOR R14D,R14D XOR R15D,R15D JMP 0x0014660f LAB_0014635c: MOV R13,RAX MOV R8D,R15D AND R8D,0xffffffef LEA RSI,[RSP + 0x48] LEA RDX,[RSP + 0x2c] MOV RDI,RBX MOV RCX,RAX CALL 0x0012119f TEST EAX,EAX JZ 0x001463a0 MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x30],RAX PUSH 0x3 POP R12 MOV EAX,dword ptr [RSP + 0x2c] MOV qword ptr [RSP + 0x38],RAX XOR EAX,EAX XOR R14D,R14D JMP 0x001465d1 LAB_001463a0: MOV dword ptr [RSP + 0x44],R15D MOV dword ptr [RSP + 0x40],R14D MOV RDI,RBX CALL 0x0011ee6b MOV R12,RDX MOV qword ptr [RSP + 0x8],RAX MOV R14,RAX SHR R14,0x20 MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x30],RAX MOV EAX,dword ptr [RSP + 0x2c] MOV qword ptr [RSP + 0x38],RAX CMP R12D,0x6 JNZ 0x001463e4 MOV RAX,qword ptr [RSP + 0x8] JMP 0x001465d1 LAB_001463e4: MOV qword ptr [RSP + 0x10],RBP XOR EBP,EBP XOR R15D,R15D MOV qword ptr [RSP + 0x18],R13 MOV qword ptr [RSP + 0x20],R14 LAB_001463f8: CMP qword ptr [RSP + 0x38],RBP JZ 0x00146579 MOV dword ptr [RSP + 0x28],R15D MOV RAX,qword ptr [RSP + 0x30] MOV R15D,dword ptr [RAX + RBP*0x8 + 0x4] TEST byte ptr [RSP + 0x44],0x10 JNZ 0x001464cb LAB_0014641d: MOV EAX,dword ptr [RSP + 0x40] MOV RDI,RBX CMP EAX,0x1 JZ 0x00146514 CMP EAX,0x2 JNZ 0x00146526 CALL 0x0011ee6b MOV R14,RDX CMP R14D,0x6 JZ 0x001465bd MOV R13,RAX MOV RDI,RBX MOV ESI,R15D CALL 0x0011e4ce MOV R9,RDX CMP R9D,0x6 JZ 0x001465af MOV dword ptr [RSP],0x4000 MOV RDI,RBX MOV RSI,R13 MOV RDX,R14 XOR ECX,ECX MOV R8,RAX CALL 0x0013df17 TEST EAX,EAX JS 0x001465af MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x10] MOV ECX,R15D CALL 0x0011ebf3 MOV R9,RDX CMP R9D,0x6 JZ 0x001465af MOV dword ptr [RSP],0x4000 MOV RDI,RBX MOV RSI,R13 MOV RDX,R14 PUSH 0x1 POP RCX MOV R8,RAX CALL 0x0013df17 TEST EAX,EAX JNS 0x0014653e JMP 0x001465af LAB_001464cb: MOV RDI,RBX LEA RSI,[RSP + 0x50] MOV RDX,R13 MOV ECX,R15D CALL 0x00121730 PUSH 0x2 POP RCX TEST EAX,EAX JS 0x00146505 PUSH 0x5 POP RCX JZ 0x00146505 MOV RDI,RBX LEA RSI,[RSP + 0x50] CALL 0x00139c9d TEST byte ptr [RSP + 0x50],0x4 PUSH 0x5 POP RCX JNZ 0x0014641d LAB_00146505: CMP ECX,0x5 MOV R15D,dword ptr [RSP + 0x28] JZ 0x00146571 JMP 0x00146598 LAB_00146514: MOV RSI,R13 MOV RDX,qword ptr [RSP + 0x10] MOV ECX,R15D CALL 0x0011ebf3 JMP 0x0014652e LAB_00146526: MOV ESI,R15D CALL 0x0011e4ce LAB_0014652e: MOV R14,RDX CMP R14D,0x6 JZ 0x001465bd MOV R13,RAX LAB_0014653e: MOV RSI,qword ptr [RSP + 0x8] MOV R15D,dword ptr [RSP + 0x28] MOV ECX,R15D AND dword ptr [RSP],0x0 MOV RDI,RBX MOV RDX,R12 MOV R8,R13 MOV R9,R14 CALL 0x0013df17 TEST EAX,EAX JS 0x001465bd INC R15D MOV R13,qword ptr [RSP + 0x18] MOV R14,qword ptr [RSP + 0x20] LAB_00146571: INC RBP JMP 0x001463f8 LAB_00146579: MOV RAX,-0x100000000 MOV RCX,qword ptr [RSP + 0x8] MOV R15,RCX AND R15,RAX MOV R14D,ECX MOV RBP,qword ptr [RSP + 0x10] JMP 0x001465ef LAB_00146598: CMP ECX,0x2 MOV RBP,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP + 0x8] JZ 0x001465d1 XOR R14D,R14D XOR R15D,R15D JMP 0x0014660f LAB_001465af: MOV RDI,RBX MOV RSI,R13 MOV RDX,R14 CALL 0x0011bbce LAB_001465bd: MOV R13,qword ptr [RSP + 0x18] MOV RBP,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP + 0x8] MOV R14,qword ptr [RSP + 0x20] LAB_001465d1: SHL R14,0x20 MOV ESI,EAX OR RSI,R14 MOV RDI,RBX MOV RDX,R12 CALL 0x0011bbce PUSH 0x6 POP R12 XOR R14D,R14D XOR R15D,R15D LAB_001465ef: MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x38] CALL 0x00121973 MOV RDI,RBX MOV RSI,R13 MOV RDX,RBP CALL 0x0011bbce LAB_0014660f: OR R14,R15 MOV RAX,R14 MOV RDX,R12 ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] JS_GetOwnPropertyNames2 (int8 param_1,int8 param_2,int8 param_3,uint param_4,int param_5) { int4 uVar1; int iVar2; uint uVar3; int iVar4; int iVar5; int8 uVar6; int8 uVar7; int8 uVar9; ulong uVar10; int8 uVar11; ulong uVar12; ulong uVar13; int1 auVar14 [16]; int1 auVar15 [16]; uint local_8c; long local_88; ulong local_80; int local_78; uint local_74; long local_70; byte local_68 [56]; int8 uVar8; auVar14 = JS_ToObject(); uVar8 = auVar14._8_8_; uVar6 = auVar14._0_8_; if (auVar14._8_4_ == 6) { uVar11 = 6; uVar12 = 0; uVar13 = 0; goto LAB_0014660f; } iVar2 = JS_GetOwnPropertyNamesInternal(param_1,&local_70,&local_8c,uVar6,param_4 & 0xffffffef); if (iVar2 == 0) { local_78 = param_5; local_74 = param_4; auVar14 = JS_NewArray(param_1); uVar11 = auVar14._8_8_; uVar12 = auVar14._0_8_; uVar13 = uVar12 >> 0x20; local_88 = local_70; local_80 = (ulong)local_8c; uVar3 = auVar14._0_4_; if (auVar14._8_4_ == 6) goto LAB_001465d1; iVar2 = 0; for (uVar10 = 0; local_80 != uVar10; uVar10 = uVar10 + 1) { uVar1 = *(int4 *)(local_88 + 4 + uVar10 * 8); if ((local_74 & 0x10) == 0) { LAB_0014641d: if (local_78 == 1) { auVar14 = JS_GetProperty(param_1,uVar6,uVar8,uVar1); LAB_0014652e: if (auVar14._8_4_ == 6) goto LAB_001465d1; } else { if (local_78 != 2) { auVar14 = JS_AtomToValue(param_1,uVar1); goto LAB_0014652e; } auVar14 = JS_NewArray(); uVar9 = auVar14._8_8_; uVar7 = auVar14._0_8_; if (auVar14._8_4_ == 6) goto LAB_001465d1; auVar15 = JS_AtomToValue(param_1,uVar1); if ((auVar15._8_4_ == 6) || (iVar4 = JS_CreateDataPropertyUint32 (param_1,uVar7,uVar9,0,auVar15._0_8_,auVar15._8_8_,0x4000), iVar4 < 0)) { LAB_001465af: JS_FreeValue(param_1,uVar7,uVar9); goto LAB_001465d1; } auVar15 = JS_GetProperty(param_1,uVar6,uVar8,uVar1); if ((auVar15._8_4_ == 6) || (iVar4 = JS_CreateDataPropertyUint32 (param_1,uVar7,uVar9,1,auVar15._0_8_,auVar15._8_8_,0x4000), iVar4 < 0)) goto LAB_001465af; } iVar4 = JS_CreateDataPropertyUint32 (param_1,uVar12,uVar11,iVar2,auVar14._0_8_,auVar14._8_8_,0); if (iVar4 < 0) goto LAB_001465d1; iVar2 = iVar2 + 1; } else { iVar5 = JS_GetOwnPropertyInternal(param_1,local_68,uVar6,uVar1); iVar4 = 2; if ((-1 < iVar5) && (iVar4 = 5, iVar5 != 0)) { js_free_desc(param_1,local_68); iVar4 = 5; if ((local_68[0] & 4) != 0) goto LAB_0014641d; } if (iVar4 != 5) { if (iVar4 == 2) goto LAB_001465d1; uVar12 = 0; uVar13 = 0; goto LAB_0014660f; } } } uVar13 = uVar12 & 0xffffffff00000000; uVar12 = uVar12 & 0xffffffff; } else { local_88 = local_70; uVar11 = 3; local_80 = (ulong)local_8c; uVar3 = 0; uVar13 = 0; LAB_001465d1: JS_FreeValue(param_1,(ulong)uVar3 | uVar13 << 0x20,uVar11); uVar11 = 6; uVar12 = 0; uVar13 = 0; } js_free_prop_enum(param_1,local_88,local_80); JS_FreeValue(param_1,uVar6,uVar8); LAB_0014660f: auVar14._8_8_ = uVar11; auVar14._0_8_ = uVar12 | uVar13; return auVar14; }
45,391
testing::internal::FilePath::DirectoryExists() const
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-filepath.cc
bool FilePath::DirectoryExists() const { bool result = false; #ifdef GTEST_OS_WINDOWS // Don't strip off trailing separator if path is a root directory on // Windows (like "C:\\"). const FilePath& path(IsRootDirectory() ? *this : RemoveTrailingPathSeparator()); #else const FilePath& path(*this); #endif #ifdef GTEST_OS_WINDOWS_MOBILE LPCWSTR unicode = String::AnsiToUtf16(path.c_str()); const DWORD attributes = GetFileAttributes(unicode); delete[] unicode; if ((attributes != kInvalidFileAttributes) && (attributes & FILE_ATTRIBUTE_DIRECTORY)) { result = true; } #else posix::StatStruct file_stat{}; result = posix::Stat(path.c_str(), &file_stat) == 0 && posix::IsDir(file_stat); #endif // GTEST_OS_WINDOWS_MOBILE return result; }
O0
cpp
testing::internal::FilePath::DirectoryExists() const: subq $0xb8, %rsp movq %rdi, 0xb0(%rsp) movq 0xb0(%rsp), %rax movb $0x0, 0xaf(%rsp) movq %rax, 0xa0(%rsp) leaq 0x10(%rsp), %rdi xorl %esi, %esi movl $0x90, %edx callq 0x14390 movq 0xa0(%rsp), %rdi callq 0xe3400 movq %rax, %rdi leaq 0x10(%rsp), %rsi callq 0xe35a0 movl %eax, %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, 0xf(%rsp) jne 0xb729d leaq 0x10(%rsp), %rdi callq 0xe35d0 movb %al, 0xf(%rsp) movb 0xf(%rsp), %al andb $0x1, %al movb %al, 0xaf(%rsp) movb 0xaf(%rsp), %al andb $0x1, %al addq $0xb8, %rsp retq nopl (%rax,%rax)
_ZNK7testing8internal8FilePath15DirectoryExistsEv: sub rsp, 0B8h mov [rsp+0B8h+var_8], rdi mov rax, [rsp+0B8h+var_8] mov [rsp+0B8h+var_9], 0 mov [rsp+0B8h+var_18], rax lea rdi, [rsp+0B8h+var_A8] xor esi, esi mov edx, 90h call _memset mov rdi, [rsp+0B8h+var_18]; this call _ZNK7testing8internal8FilePath5c_strEv; testing::internal::FilePath::c_str(void) mov rdi, rax lea rsi, [rsp+0B8h+var_A8] call _ZN7testing8internal5posix4StatEPKcP4stat; testing::internal::posix::Stat(char const*,stat *) mov ecx, eax xor eax, eax cmp ecx, 0 mov [rsp+0B8h+var_A9], al jnz short loc_B729D lea rdi, [rsp+0B8h+var_A8] call _ZN7testing8internal5posix5IsDirERK4stat; testing::internal::posix::IsDir(stat const&) mov [rsp+0B8h+var_A9], al loc_B729D: mov al, [rsp+0B8h+var_A9] and al, 1 mov [rsp+0B8h+var_9], al mov al, [rsp+0B8h+var_9] and al, 1 add rsp, 0B8h retn
char testing::internal::FilePath::DirectoryExists(testing::internal::FilePath *this) { long long v1; // rax char IsDir; // [rsp+Fh] [rbp-A9h] _BYTE v4[144]; // [rsp+10h] [rbp-A8h] BYREF testing::internal::FilePath *v5; // [rsp+A0h] [rbp-18h] char v6; // [rsp+AFh] [rbp-9h] testing::internal::FilePath *v7; // [rsp+B0h] [rbp-8h] v7 = this; v6 = 0; v5 = this; memset(v4, 0LL, sizeof(v4)); v1 = testing::internal::FilePath::c_str(v5); IsDir = 0; if ( !(unsigned int)testing::internal::posix::Stat(v1, v4) ) IsDir = testing::internal::posix::IsDir(v4); return IsDir & 1; }
DirectoryExists: SUB RSP,0xb8 MOV qword ptr [RSP + 0xb0],RDI MOV RAX,qword ptr [RSP + 0xb0] MOV byte ptr [RSP + 0xaf],0x0 MOV qword ptr [RSP + 0xa0],RAX LEA RDI,[RSP + 0x10] XOR ESI,ESI MOV EDX,0x90 CALL 0x00114390 MOV RDI,qword ptr [RSP + 0xa0] CALL 0x001e3400 MOV RDI,RAX LEA RSI,[RSP + 0x10] CALL 0x001e35a0 MOV ECX,EAX XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RSP + 0xf],AL JNZ 0x001b729d LEA RDI,[RSP + 0x10] CALL 0x001e35d0 MOV byte ptr [RSP + 0xf],AL LAB_001b729d: MOV AL,byte ptr [RSP + 0xf] AND AL,0x1 MOV byte ptr [RSP + 0xaf],AL MOV AL,byte ptr [RSP + 0xaf] AND AL,0x1 ADD RSP,0xb8 RET
/* testing::internal::FilePath::DirectoryExists() const */ ulong __thiscall testing::internal::FilePath::DirectoryExists(FilePath *this) { int iVar1; char *pcVar2; int8 uVar3; int1 local_a9; stat local_a8; FilePath *local_18; int1 local_9; FilePath *local_8; local_9 = 0; local_18 = this; local_8 = this; memset(&local_a8,0,0x90); pcVar2 = (char *)c_str(local_18); iVar1 = posix::Stat(pcVar2,&local_a8); uVar3 = 0; local_a9 = 0; if (iVar1 == 0) { uVar3 = posix::IsDir(&local_a8); local_a9 = (int1)uVar3; } return CONCAT71((int7)((ulong)uVar3 >> 8),local_a9) & 0xffffffffffffff01; }
45,392
my_uca_init_one_contraction
eloqsql/strings/ctype-uca.c
static uint16 * my_uca_init_one_contraction(MY_CONTRACTIONS *contractions, my_wc_t *str, uint length, my_bool with_context) { int flag; uint i; my_uca_add_contraction_flag(contractions, str[0], with_context ? MY_UCA_PREVIOUS_CONTEXT_HEAD : MY_UCA_CNT_HEAD); for (i= 1, flag= MY_UCA_CNT_MID1; i < length - 1; i++, flag<<= 1) my_uca_add_contraction_flag(contractions, str[i], flag); my_uca_add_contraction_flag(contractions, str[i], with_context ? MY_UCA_PREVIOUS_CONTEXT_TAIL : MY_UCA_CNT_TAIL); /* Add new contraction to the contraction list */ return my_uca_add_contraction(contractions, str, length, with_context)->weight; }
O0
c
my_uca_init_one_contraction: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movb %cl, %al movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movb %al, -0x15(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rax movq (%rax), %rsi movsbl -0x15(%rbp), %ecx movl $0x1, %edx movl $0x40, %eax cmpl $0x0, %ecx cmovnel %eax, %edx callq 0x87cc0 movl $0x1, -0x20(%rbp) movl $0x4, -0x1c(%rbp) movl -0x20(%rbp), %eax movl -0x14(%rbp), %ecx subl $0x1, %ecx cmpl %ecx, %eax jae 0x87221 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rax movl -0x20(%rbp), %ecx movq (%rax,%rcx,8), %rsi movl -0x1c(%rbp), %edx callq 0x87cc0 movl -0x20(%rbp), %eax addl $0x1, %eax movl %eax, -0x20(%rbp) movl -0x1c(%rbp), %eax shll %eax movl %eax, -0x1c(%rbp) jmp 0x871ea movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rax movl -0x20(%rbp), %ecx movq (%rax,%rcx,8), %rsi movsbl -0x15(%rbp), %ecx movl $0x2, %edx movl $0x80, %eax cmpl $0x0, %ecx cmovnel %eax, %edx callq 0x87cc0 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movl -0x14(%rbp), %eax movl %eax, %edx movsbl -0x15(%rbp), %ecx callq 0x87cf0 addq $0x30, %rax addq $0x20, %rsp popq %rbp retq nopl (%rax)
my_uca_init_one_contraction: push rbp mov rbp, rsp sub rsp, 20h mov al, cl mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_15], al mov rdi, [rbp+var_8] mov rax, [rbp+var_10] mov rsi, [rax] movsx ecx, [rbp+var_15] mov edx, 1 mov eax, 40h ; '@' cmp ecx, 0 cmovnz edx, eax call my_uca_add_contraction_flag mov [rbp+var_20], 1 mov [rbp+var_1C], 4 loc_871EA: mov eax, [rbp+var_20] mov ecx, [rbp+var_14] sub ecx, 1 cmp eax, ecx jnb short loc_87221 mov rdi, [rbp+var_8] mov rax, [rbp+var_10] mov ecx, [rbp+var_20] mov rsi, [rax+rcx*8] mov edx, [rbp+var_1C] call my_uca_add_contraction_flag mov eax, [rbp+var_20] add eax, 1 mov [rbp+var_20], eax mov eax, [rbp+var_1C] shl eax, 1 mov [rbp+var_1C], eax jmp short loc_871EA loc_87221: mov rdi, [rbp+var_8] mov rax, [rbp+var_10] mov ecx, [rbp+var_20] mov rsi, [rax+rcx*8] movsx ecx, [rbp+var_15] mov edx, 2 mov eax, 80h cmp ecx, 0 cmovnz edx, eax call my_uca_add_contraction_flag mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov eax, [rbp+var_14] mov edx, eax movsx ecx, [rbp+var_15] call my_uca_add_contraction add rax, 30h ; '0' add rsp, 20h pop rbp retn
long long my_uca_init_one_contraction(long long a1, long long *a2, unsigned int a3, char a4) { long long v4; // rsi long long v5; // rdx long long v6; // rdx unsigned int v8; // [rsp+0h] [rbp-20h] unsigned int v9; // [rsp+4h] [rbp-1Ch] v4 = *a2; v5 = 1LL; if ( a4 ) v5 = 64LL; my_uca_add_contraction_flag(a1, v4, v5); v8 = 1; v9 = 4; while ( v8 < a3 - 1 ) { my_uca_add_contraction_flag(a1, a2[v8++], v9); v9 *= 2; } v6 = 2LL; if ( a4 ) v6 = 128LL; my_uca_add_contraction_flag(a1, a2[v8], v6); return my_uca_add_contraction(a1, a2, a3, (unsigned int)a4) + 48; }
my_uca_init_one_contraction: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV AL,CL MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV byte ptr [RBP + -0x15],AL MOV RDI,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX] MOVSX ECX,byte ptr [RBP + -0x15] MOV EDX,0x1 MOV EAX,0x40 CMP ECX,0x0 CMOVNZ EDX,EAX CALL 0x00187cc0 MOV dword ptr [RBP + -0x20],0x1 MOV dword ptr [RBP + -0x1c],0x4 LAB_001871ea: MOV EAX,dword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x14] SUB ECX,0x1 CMP EAX,ECX JNC 0x00187221 MOV RDI,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x20] MOV RSI,qword ptr [RAX + RCX*0x8] MOV EDX,dword ptr [RBP + -0x1c] CALL 0x00187cc0 MOV EAX,dword ptr [RBP + -0x20] ADD EAX,0x1 MOV dword ptr [RBP + -0x20],EAX MOV EAX,dword ptr [RBP + -0x1c] SHL EAX,0x1 MOV dword ptr [RBP + -0x1c],EAX JMP 0x001871ea LAB_00187221: MOV RDI,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x20] MOV RSI,qword ptr [RAX + RCX*0x8] MOVSX ECX,byte ptr [RBP + -0x15] MOV EDX,0x2 MOV EAX,0x80 CMP ECX,0x0 CMOVNZ EDX,EAX CALL 0x00187cc0 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RBP + -0x14] MOV EDX,EAX MOVSX ECX,byte ptr [RBP + -0x15] CALL 0x00187cf0 ADD RAX,0x30 ADD RSP,0x20 POP RBP RET
long my_uca_init_one_contraction(int8 param_1,int8 *param_2,int param_3,char param_4) { long lVar1; int8 uVar2; uint local_28; int local_24; uVar2 = 1; if (param_4 != '\0') { uVar2 = 0x40; } my_uca_add_contraction_flag(param_1,*param_2,uVar2); local_24 = 4; for (local_28 = 1; local_28 < param_3 - 1U; local_28 = local_28 + 1) { my_uca_add_contraction_flag(param_1,param_2[local_28],local_24); local_24 = local_24 << 1; } uVar2 = 2; if (param_4 != '\0') { uVar2 = 0x80; } my_uca_add_contraction_flag(param_1,param_2[local_28],uVar2); lVar1 = my_uca_add_contraction(param_1,param_2,param_3,(int)param_4); return lVar1 + 0x30; }
45,393
my_charpos_utf16
eloqsql/strings/ctype-ucs2.c
static size_t my_charpos_utf16(CHARSET_INFO *cs, const char *b, const char *e, size_t pos) { const char *b0= b; uint charlen; for ( ; pos; b+= charlen, pos--) { if (!(charlen= my_ismbchar(cs, b, e))) return (e + 2 - b0); /* Error, return pos outside the string */ } return (size_t) (pos ? (e + 2 - b0) : (b - b0)); }
O0
c
my_charpos_utf16: 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 -0x18(%rbp), %rax movq %rax, -0x30(%rbp) cmpq $0x0, -0x28(%rbp) je 0xb7295 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0xba930 movl %eax, -0x34(%rbp) cmpl $0x0, %eax jne 0xb7275 movq -0x20(%rbp), %rax addq $0x2, %rax movq -0x30(%rbp), %rcx subq %rcx, %rax movq %rax, -0x8(%rbp) jmp 0xb72c8 jmp 0xb7277 movl -0x34(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x18(%rbp) movq -0x28(%rbp), %rax addq $-0x1, %rax movq %rax, -0x28(%rbp) jmp 0xb7240 cmpq $0x0, -0x28(%rbp) je 0xb72b1 movq -0x20(%rbp), %rax addq $0x2, %rax movq -0x30(%rbp), %rcx subq %rcx, %rax movq %rax, -0x40(%rbp) jmp 0xb72c0 movq -0x18(%rbp), %rax movq -0x30(%rbp), %rcx subq %rcx, %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_charpos_utf16: 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_18] mov [rbp+var_30], rax loc_B7240: cmp [rbp+var_28], 0 jz short loc_B7295 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call my_ismbchar_1 mov [rbp+var_34], eax cmp eax, 0 jnz short loc_B7275 mov rax, [rbp+var_20] add rax, 2 mov rcx, [rbp+var_30] sub rax, rcx mov [rbp+var_8], rax jmp short loc_B72C8 loc_B7275: jmp short $+2 loc_B7277: mov ecx, [rbp+var_34] mov rax, [rbp+var_18] mov ecx, ecx add rax, rcx mov [rbp+var_18], rax mov rax, [rbp+var_28] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_28], rax jmp short loc_B7240 loc_B7295: cmp [rbp+var_28], 0 jz short loc_B72B1 mov rax, [rbp+var_20] add rax, 2 mov rcx, [rbp+var_30] sub rax, rcx mov [rbp+var_40], rax jmp short loc_B72C0 loc_B72B1: mov rax, [rbp+var_18] mov rcx, [rbp+var_30] sub rax, rcx mov [rbp+var_40], rax loc_B72C0: mov rax, [rbp+var_40] mov [rbp+var_8], rax loc_B72C8: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long my_charpos_utf16(long long a1, long long a2, long long a3, long long a4) { unsigned int v5; // [rsp+Ch] [rbp-34h] long long v8; // [rsp+28h] [rbp-18h] v8 = a2; while ( a4 ) { v5 = my_ismbchar_1(a1, v8, a3); if ( !v5 ) return a3 + 2 - a2; v8 += v5; --a4; } return v8 - a2; }
my_charpos_utf16: 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 + -0x18] MOV qword ptr [RBP + -0x30],RAX LAB_001b7240: CMP qword ptr [RBP + -0x28],0x0 JZ 0x001b7295 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x001ba930 MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JNZ 0x001b7275 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 MOV RCX,qword ptr [RBP + -0x30] SUB RAX,RCX MOV qword ptr [RBP + -0x8],RAX JMP 0x001b72c8 LAB_001b7275: JMP 0x001b7277 LAB_001b7277: MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x18] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,-0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x001b7240 LAB_001b7295: CMP qword ptr [RBP + -0x28],0x0 JZ 0x001b72b1 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 MOV RCX,qword ptr [RBP + -0x30] SUB RAX,RCX MOV qword ptr [RBP + -0x40],RAX JMP 0x001b72c0 LAB_001b72b1: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x30] SUB RAX,RCX MOV qword ptr [RBP + -0x40],RAX LAB_001b72c0: MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x8],RAX LAB_001b72c8: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
/* WARNING: Removing unreachable block (ram,0x001b729c) */ long my_charpos_utf16(int8 param_1,long param_2,long param_3,long param_4) { uint uVar1; long local_30; long local_20; local_30 = param_4; local_20 = param_2; while( true ) { if (local_30 == 0) { return local_20 - param_2; } uVar1 = my_ismbchar(param_1,local_20,param_3); if (uVar1 == 0) break; local_20 = local_20 + (ulong)uVar1; local_30 = local_30 + -1; } return (param_3 + 2) - param_2; }
45,394
my_charpos_utf16
eloqsql/strings/ctype-ucs2.c
static size_t my_charpos_utf16(CHARSET_INFO *cs, const char *b, const char *e, size_t pos) { const char *b0= b; uint charlen; for ( ; pos; b+= charlen, pos--) { if (!(charlen= my_ismbchar(cs, b, e))) return (e + 2 - b0); /* Error, return pos outside the string */ } return (size_t) (pos ? (e + 2 - b0) : (b - b0)); }
O3
c
my_charpos_utf16: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rsi, %r12 testq %rcx, %rcx je 0x7b3a1 movq %rcx, %r15 movq %rdx, %r14 movq %rdi, %r13 movq %rbx, %r12 movq 0xb8(%r13), %rax movq %r13, %rdi movq %r12, %rsi movq %r14, %rdx callq *0xc0(%rax) cmpl $0x1, %eax jle 0x7b39a movl %eax, %eax addq %rax, %r12 decq %r15 jne 0x7b373 jmp 0x7b3a1 addq $0x2, %r14 movq %r14, %r12 subq %rbx, %r12 movq %r12, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_charpos_utf16: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi mov r12, rsi test rcx, rcx jz short loc_7B3A1 mov r15, rcx mov r14, rdx mov r13, rdi mov r12, rbx loc_7B373: mov rax, [r13+0B8h] mov rdi, r13 mov rsi, r12 mov rdx, r14 call qword ptr [rax+0C0h] cmp eax, 1 jle short loc_7B39A mov eax, eax add r12, rax dec r15 jnz short loc_7B373 jmp short loc_7B3A1 loc_7B39A: add r14, 2 mov r12, r14 loc_7B3A1: sub r12, rbx mov rax, r12 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_charpos_utf16(long long a1, long long a2, long long a3, long long a4) { long long v4; // r12 long long v5; // r15 int v7; // eax v4 = a2; if ( a4 ) { v5 = a4; v4 = a2; while ( 1 ) { v7 = (*(long long ( **)(long long, long long, long long))(*(_QWORD *)(a1 + 184) + 192LL))(a1, v4, a3); if ( v7 <= 1 ) break; v4 += (unsigned int)v7; if ( !--v5 ) return v4 - a2; } v4 = a3 + 2; } return v4 - a2; }
my_charpos_utf16: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV R12,RSI TEST RCX,RCX JZ 0x0017b3a1 MOV R15,RCX MOV R14,RDX MOV R13,RDI MOV R12,RBX LAB_0017b373: MOV RAX,qword ptr [R13 + 0xb8] MOV RDI,R13 MOV RSI,R12 MOV RDX,R14 CALL qword ptr [RAX + 0xc0] CMP EAX,0x1 JLE 0x0017b39a MOV EAX,EAX ADD R12,RAX DEC R15 JNZ 0x0017b373 JMP 0x0017b3a1 LAB_0017b39a: ADD R14,0x2 MOV R12,R14 LAB_0017b3a1: SUB R12,RBX MOV RAX,R12 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_charpos_utf16(long param_1,long param_2,long param_3,long param_4) { uint uVar1; long lVar2; lVar2 = param_2; if (param_4 != 0) { do { uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,lVar2,param_3); if ((int)uVar1 < 2) { lVar2 = param_3 + 2; break; } lVar2 = lVar2 + (ulong)uVar1; param_4 = param_4 + -1; } while (param_4 != 0); } return lVar2 - param_2; }
45,395
js_c_function_data_mark
bluesky950520[P]quickjs/quickjs.c
static void js_c_function_data_mark(JSRuntime *rt, JSValue val, JS_MarkFunc *mark_func) { JSCFunctionDataRecord *s = JS_GetOpaque(val, JS_CLASS_C_FUNCTION_DATA); int i; if (s) { for(i = 0; i < s->data_len; i++) { JS_MarkValue(rt, s->data[i], mark_func); } } }
O2
c
js_c_function_data_mark: cmpl $-0x1, %edx jne 0x33be4 pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx cmpw $0xf, 0x6(%rsi) jne 0x33bdb movq 0x30(%rsi), %r15 testq %r15, %r15 je 0x33bdb movq %rcx, %rbx movq %rdi, %r14 leaq 0x18(%r15), %r12 xorl %r13d, %r13d movzbl 0x9(%r15), %eax cmpq %rax, %r13 jae 0x33bdb movl (%r12), %eax notl %eax testl $0xfffffffe, %eax # imm = 0xFFFFFFFE jne 0x33bd2 movq -0x8(%r12), %rsi movq %r14, %rdi callq *%rbx incq %r13 addq $0x10, %r12 jmp 0x33bb1 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
js_c_function_data_mark: cmp edx, 0FFFFFFFFh jnz short locret_33BE4 push r15 push r14 push r13 push r12 push rbx cmp word ptr [rsi+6], 0Fh jnz short loc_33BDB mov r15, [rsi+30h] test r15, r15 jz short loc_33BDB mov rbx, rcx mov r14, rdi lea r12, [r15+18h] xor r13d, r13d loc_33BB1: movzx eax, byte ptr [r15+9] cmp r13, rax jnb short loc_33BDB mov eax, [r12] not eax test eax, 0FFFFFFFEh jnz short loc_33BD2 mov rsi, [r12-8] mov rdi, r14 call rbx loc_33BD2: inc r13 add r12, 10h jmp short loc_33BB1 loc_33BDB: pop rbx pop r12 pop r13 pop r14 pop r15 locret_33BE4: retn
unsigned long long js_c_function_data_mark( long long a1, long long a2, int a3, void ( *a4)(long long, _QWORD)) { long long v4; // r15 _DWORD *v6; // r12 unsigned long long i; // r13 unsigned long long result; // rax if ( a3 == -1 && *(_WORD *)(a2 + 6) == 15 ) { v4 = *(_QWORD *)(a2 + 48); if ( v4 ) { v6 = (_DWORD *)(v4 + 24); for ( i = 0LL; ; ++i ) { result = *(unsigned __int8 *)(v4 + 9); if ( i >= result ) break; if ( (~*v6 & 0xFFFFFFFE) == 0 ) a4(a1, *((_QWORD *)v6 - 1)); v6 += 4; } } } return result; }
js_c_function_data_mark: CMP EDX,-0x1 JNZ 0x00133be4 PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX CMP word ptr [RSI + 0x6],0xf JNZ 0x00133bdb MOV R15,qword ptr [RSI + 0x30] TEST R15,R15 JZ 0x00133bdb MOV RBX,RCX MOV R14,RDI LEA R12,[R15 + 0x18] XOR R13D,R13D LAB_00133bb1: MOVZX EAX,byte ptr [R15 + 0x9] CMP R13,RAX JNC 0x00133bdb MOV EAX,dword ptr [R12] NOT EAX TEST EAX,0xfffffffe JNZ 0x00133bd2 MOV RSI,qword ptr [R12 + -0x8] MOV RDI,R14 CALL RBX LAB_00133bd2: INC R13 ADD R12,0x10 JMP 0x00133bb1 LAB_00133bdb: POP RBX POP R12 POP R13 POP R14 POP R15 LAB_00133be4: RET
void js_c_function_data_mark(int8 param_1,long param_2,int param_3,code *param_4) { long lVar1; uint *puVar2; ulong uVar3; if (((param_3 == -1) && (*(short *)(param_2 + 6) == 0xf)) && (lVar1 = *(long *)(param_2 + 0x30), lVar1 != 0)) { puVar2 = (uint *)(lVar1 + 0x18); for (uVar3 = 0; uVar3 < *(byte *)(lVar1 + 9); uVar3 = uVar3 + 1) { if ((~*puVar2 & 0xfffffffe) == 0) { (*param_4)(param_1,*(int8 *)(puVar2 + -2)); } puVar2 = puVar2 + 4; } } return; }
45,396
free_tree
eloqsql/mysys/tree.c
static int free_tree(TREE *tree, my_bool abort, myf free_flags) { int error, first_error= 0; DBUG_ENTER("free_tree"); DBUG_PRINT("enter",("tree: %p", tree)); if (tree->root) /* If initialized */ { if (tree->with_delete) { if ((error= delete_tree_element(tree, tree->root, abort))) { first_error= first_error ? first_error : error; abort= 1; } } else { if (tree->free) { if (tree->memory_limit) (*tree->free)(NULL, free_init, tree->custom_arg); if ((error= delete_tree_element(tree, tree->root, abort))) first_error= first_error ? first_error : error; if (tree->memory_limit) (*tree->free)(NULL, free_end, tree->custom_arg); } free_root(&tree->mem_root, free_flags); } } tree->root= &null_element; tree->elements_in_tree=0; tree->allocated=0; DBUG_RETURN(first_error); }
O0
c
free_tree: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movb %sil, %al movq %rdi, -0x8(%rbp) movb %al, -0x9(%rbp) movq %rdx, -0x18(%rbp) movl $0x0, -0x20(%rbp) jmp 0xfa5df movq -0x8(%rbp), %rax cmpq $0x0, (%rax) je 0xfa6f4 movq -0x8(%rbp), %rax cmpb $0x0, 0x278(%rax) je 0xfa639 movq -0x8(%rbp), %rdi movq -0x8(%rbp), %rax movq (%rax), %rsi movsbl -0x9(%rbp), %edx callq 0xfbf40 movl %eax, -0x1c(%rbp) cmpl $0x0, %eax je 0xfa634 cmpl $0x0, -0x20(%rbp) je 0xfa624 movl -0x20(%rbp), %eax movl %eax, -0x24(%rbp) jmp 0xfa62a movl -0x1c(%rbp), %eax movl %eax, -0x24(%rbp) movl -0x24(%rbp), %eax movl %eax, -0x20(%rbp) movb $0x1, -0x9(%rbp) jmp 0xfa6f2 movq -0x8(%rbp), %rax cmpq $0x0, 0x280(%rax) je 0xfa6de movq -0x8(%rbp), %rax cmpq $0x0, 0x218(%rax) je 0xfa677 movq -0x8(%rbp), %rax movq 0x280(%rax), %rax movq -0x8(%rbp), %rcx movq 0x230(%rcx), %rdx xorl %ecx, %ecx movl %ecx, %edi xorl %esi, %esi callq *%rax movq -0x8(%rbp), %rdi movq -0x8(%rbp), %rax movq (%rax), %rsi movsbl -0x9(%rbp), %edx callq 0xfbf40 movl %eax, -0x1c(%rbp) cmpl $0x0, %eax je 0xfa6ad cmpl $0x0, -0x20(%rbp) je 0xfa6a1 movl -0x20(%rbp), %eax movl %eax, -0x28(%rbp) jmp 0xfa6a7 movl -0x1c(%rbp), %eax movl %eax, -0x28(%rbp) movl -0x28(%rbp), %eax movl %eax, -0x20(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x218(%rax) je 0xfa6dc movq -0x8(%rbp), %rax movq 0x280(%rax), %rax movq -0x8(%rbp), %rcx movq 0x230(%rcx), %rdx xorl %ecx, %ecx movl %ecx, %edi movl $0x2, %esi callq *%rax jmp 0xfa6de movq -0x8(%rbp), %rdi addq $0x238, %rdi # imm = 0x238 movq -0x18(%rbp), %rsi callq 0xed9e0 jmp 0xfa6f4 movq -0x8(%rbp), %rax leaq 0x1c5561(%rip), %rcx # 0x2bfc60 movq %rcx, (%rax) movq -0x8(%rbp), %rax movl $0x0, 0x20c(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x220(%rax) movl -0x20(%rbp), %eax movl %eax, -0x2c(%rbp) movl -0x2c(%rbp), %eax addq $0x30, %rsp popq %rbp retq nop
free_tree: push rbp mov rbp, rsp sub rsp, 30h mov al, sil mov [rbp+var_8], rdi mov [rbp+var_9], al mov [rbp+var_18], rdx mov [rbp+var_20], 0 jmp short $+2 loc_FA5DF: mov rax, [rbp+var_8] cmp qword ptr [rax], 0 jz loc_FA6F4 mov rax, [rbp+var_8] cmp byte ptr [rax+278h], 0 jz short loc_FA639 mov rdi, [rbp+var_8] mov rax, [rbp+var_8] mov rsi, [rax] movsx edx, [rbp+var_9] call delete_tree_element mov [rbp+var_1C], eax cmp eax, 0 jz short loc_FA634 cmp [rbp+var_20], 0 jz short loc_FA624 mov eax, [rbp+var_20] mov [rbp+var_24], eax jmp short loc_FA62A loc_FA624: mov eax, [rbp+var_1C] mov [rbp+var_24], eax loc_FA62A: mov eax, [rbp+var_24] mov [rbp+var_20], eax mov [rbp+var_9], 1 loc_FA634: jmp loc_FA6F2 loc_FA639: mov rax, [rbp+var_8] cmp qword ptr [rax+280h], 0 jz loc_FA6DE mov rax, [rbp+var_8] cmp qword ptr [rax+218h], 0 jz short loc_FA677 mov rax, [rbp+var_8] mov rax, [rax+280h] mov rcx, [rbp+var_8] mov rdx, [rcx+230h] xor ecx, ecx mov edi, ecx xor esi, esi call rax loc_FA677: mov rdi, [rbp+var_8] mov rax, [rbp+var_8] mov rsi, [rax] movsx edx, [rbp+var_9] call delete_tree_element mov [rbp+var_1C], eax cmp eax, 0 jz short loc_FA6AD cmp [rbp+var_20], 0 jz short loc_FA6A1 mov eax, [rbp+var_20] mov [rbp+var_28], eax jmp short loc_FA6A7 loc_FA6A1: mov eax, [rbp+var_1C] mov [rbp+var_28], eax loc_FA6A7: mov eax, [rbp+var_28] mov [rbp+var_20], eax loc_FA6AD: mov rax, [rbp+var_8] cmp qword ptr [rax+218h], 0 jz short loc_FA6DC mov rax, [rbp+var_8] mov rax, [rax+280h] mov rcx, [rbp+var_8] mov rdx, [rcx+230h] xor ecx, ecx mov edi, ecx mov esi, 2 call rax loc_FA6DC: jmp short $+2 loc_FA6DE: mov rdi, [rbp+var_8] add rdi, 238h mov rsi, [rbp+var_18] call free_root loc_FA6F2: jmp short $+2 loc_FA6F4: mov rax, [rbp+var_8] lea rcx, null_element mov [rax], rcx mov rax, [rbp+var_8] mov dword ptr [rax+20Ch], 0 mov rax, [rbp+var_8] mov qword ptr [rax+220h], 0 mov eax, [rbp+var_20] mov [rbp+var_2C], eax mov eax, [rbp+var_2C] add rsp, 30h pop rbp retn
long long free_tree(_QWORD *a1, char a2, char a3) { unsigned int v4; // [rsp+10h] [rbp-20h] unsigned int v5; // [rsp+14h] [rbp-1Ch] unsigned int v6; // [rsp+14h] [rbp-1Ch] v4 = 0; if ( *a1 ) { if ( *((_BYTE *)a1 + 632) ) { v5 = delete_tree_element(a1, *a1, (unsigned int)a2); if ( v5 ) v4 = v5; } else { if ( a1[80] ) { if ( a1[67] ) ((void ( *)(_QWORD, _QWORD, _QWORD))a1[80])(0LL, 0LL, a1[70]); v6 = delete_tree_element(a1, *a1, (unsigned int)a2); if ( v6 ) v4 = v6; if ( a1[67] ) ((void ( *)(_QWORD, long long, _QWORD))a1[80])(0LL, 2LL, a1[70]); } free_root((long long)(a1 + 71), a3); } } *a1 = &null_element; *((_DWORD *)a1 + 131) = 0; a1[68] = 0LL; return v4; }
free_tree: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV AL,SIL MOV qword ptr [RBP + -0x8],RDI MOV byte ptr [RBP + -0x9],AL MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x20],0x0 JMP 0x001fa5df LAB_001fa5df: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX],0x0 JZ 0x001fa6f4 MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x278],0x0 JZ 0x001fa639 MOV RDI,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RAX] MOVSX EDX,byte ptr [RBP + -0x9] CALL 0x001fbf40 MOV dword ptr [RBP + -0x1c],EAX CMP EAX,0x0 JZ 0x001fa634 CMP dword ptr [RBP + -0x20],0x0 JZ 0x001fa624 MOV EAX,dword ptr [RBP + -0x20] MOV dword ptr [RBP + -0x24],EAX JMP 0x001fa62a LAB_001fa624: MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x24],EAX LAB_001fa62a: MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x20],EAX MOV byte ptr [RBP + -0x9],0x1 LAB_001fa634: JMP 0x001fa6f2 LAB_001fa639: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x280],0x0 JZ 0x001fa6de MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x218],0x0 JZ 0x001fa677 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x280] MOV RCX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RCX + 0x230] XOR ECX,ECX MOV EDI,ECX XOR ESI,ESI CALL RAX LAB_001fa677: MOV RDI,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RAX] MOVSX EDX,byte ptr [RBP + -0x9] CALL 0x001fbf40 MOV dword ptr [RBP + -0x1c],EAX CMP EAX,0x0 JZ 0x001fa6ad CMP dword ptr [RBP + -0x20],0x0 JZ 0x001fa6a1 MOV EAX,dword ptr [RBP + -0x20] MOV dword ptr [RBP + -0x28],EAX JMP 0x001fa6a7 LAB_001fa6a1: MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x28],EAX LAB_001fa6a7: MOV EAX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x20],EAX LAB_001fa6ad: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x218],0x0 JZ 0x001fa6dc MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x280] MOV RCX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RCX + 0x230] XOR ECX,ECX MOV EDI,ECX MOV ESI,0x2 CALL RAX LAB_001fa6dc: JMP 0x001fa6de LAB_001fa6de: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x238 MOV RSI,qword ptr [RBP + -0x18] CALL 0x001ed9e0 LAB_001fa6f2: JMP 0x001fa6f4 LAB_001fa6f4: MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x3bfc60] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x20c],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x220],0x0 MOV EAX,dword ptr [RBP + -0x20] MOV dword ptr [RBP + -0x2c],EAX MOV EAX,dword ptr [RBP + -0x2c] ADD RSP,0x30 POP RBP RET
/* WARNING: Removing unreachable block (ram,0x001fa61c) */ /* WARNING: Removing unreachable block (ram,0x001fa699) */ int free_tree(long *param_1,char param_2,int8 param_3) { int iVar1; int local_28; local_28 = 0; if (*param_1 != 0) { if ((char)param_1[0x4f] == '\0') { if (param_1[0x50] != 0) { if (param_1[0x43] != 0) { (*(code *)param_1[0x50])(0,0,param_1[0x46]); } iVar1 = delete_tree_element(param_1,*param_1,(int)param_2); if (iVar1 != 0) { local_28 = iVar1; } if (param_1[0x43] != 0) { (*(code *)param_1[0x50])(0,2,param_1[0x46]); } } free_root(param_1 + 0x47,param_3); } else { iVar1 = delete_tree_element(param_1,*param_1,(int)param_2); if (iVar1 != 0) { local_28 = iVar1; } } } *param_1 = (long)null_element; *(int4 *)((long)param_1 + 0x20c) = 0; param_1[0x44] = 0; return local_28; }
45,397
my_8bit_charset_flags_from_data
eloqsql/strings/ctype-simple.c
uint my_8bit_charset_flags_from_data(CHARSET_INFO *cs) { uint flags= 0; if (my_charset_is_8bit_pure_ascii(cs)) flags|= MY_CS_PUREASCII; if (!my_charset_is_ascii_compatible(cs)) flags|= MY_CS_NONASCII; return flags; }
O0
c
my_8bit_charset_flags_from_data: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movl $0x0, -0xc(%rbp) movq -0x8(%rbp), %rdi callq 0x59d00 cmpb $0x0, %al je 0x59cdb movl -0xc(%rbp), %eax orl $0x1000, %eax # imm = 0x1000 movl %eax, -0xc(%rbp) movq -0x8(%rbp), %rdi callq 0x59d60 cmpb $0x0, %al jne 0x59cf3 movl -0xc(%rbp), %eax orl $0x2000, %eax # imm = 0x2000 movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax addq $0x10, %rsp popq %rbp retq nopl (%rax)
my_8bit_charset_flags_from_data: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov [rbp+var_C], 0 mov rdi, [rbp+var_8] call my_charset_is_8bit_pure_ascii cmp al, 0 jz short loc_59CDB mov eax, [rbp+var_C] or eax, 1000h mov [rbp+var_C], eax loc_59CDB: mov rdi, [rbp+var_8] call my_charset_is_ascii_compatible cmp al, 0 jnz short loc_59CF3 mov eax, [rbp+var_C] or eax, 2000h mov [rbp+var_C], eax loc_59CF3: mov eax, [rbp+var_C] add rsp, 10h pop rbp retn
long long my_8bit_charset_flags_from_data(long long a1) { unsigned int v2; // [rsp+4h] [rbp-Ch] v2 = 0; if ( (unsigned __int8)my_charset_is_8bit_pure_ascii(a1) ) v2 = 4096; if ( !(unsigned __int8)my_charset_is_ascii_compatible(a1) ) v2 |= 0x2000u; return v2; }
my_8bit_charset_flags_from_data: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],0x0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00159d00 CMP AL,0x0 JZ 0x00159cdb MOV EAX,dword ptr [RBP + -0xc] OR EAX,0x1000 MOV dword ptr [RBP + -0xc],EAX LAB_00159cdb: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00159d60 CMP AL,0x0 JNZ 0x00159cf3 MOV EAX,dword ptr [RBP + -0xc] OR EAX,0x2000 MOV dword ptr [RBP + -0xc],EAX LAB_00159cf3: MOV EAX,dword ptr [RBP + -0xc] ADD RSP,0x10 POP RBP RET
uint my_8bit_charset_flags_from_data(int8 param_1) { char cVar1; int4 local_14; local_14 = 0; cVar1 = my_charset_is_8bit_pure_ascii(param_1); if (cVar1 != '\0') { local_14 = 0x1000; } cVar1 = my_charset_is_ascii_compatible(param_1); if (cVar1 == '\0') { local_14 = local_14 | 0x2000; } return local_14; }
45,398
mysql_list_processes_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_list_processes_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_list_processes, (parms->mysql), parms->mysql, MYSQL_RES *, r_ptr) }
O3
c
mysql_list_processes_start_internal: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq (%rdi), %rdi movq 0x480(%rdi), %rax movq 0x28(%rax), %rbx callq 0x4a84d movq %rax, 0x8(%rbx) movl $0x0, (%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
mysql_list_processes_start_internal: push rbp mov rbp, rsp push rbx push rax mov rdi, [rdi] mov rax, [rdi+480h] mov rbx, [rax+28h] call mysql_list_processes mov [rbx+8], rax mov dword ptr [rbx], 0 add rsp, 8 pop rbx pop rbp retn
long long mysql_list_processes_start_internal(long long *a1) { long long v1; // rdi long long v2; // rbx long long result; // rax v1 = *a1; v2 = *(_QWORD *)(*(_QWORD *)(v1 + 1152) + 40LL); result = mysql_list_processes(v1); *(_QWORD *)(v2 + 8) = result; *(_DWORD *)v2 = 0; return result; }
mysql_list_processes_start_internal: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RDI,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x480] MOV RBX,qword ptr [RAX + 0x28] CALL 0x0014a84d MOV qword ptr [RBX + 0x8],RAX MOV dword ptr [RBX],0x0 ADD RSP,0x8 POP RBX POP RBP RET
void mysql_list_processes_start_internal(long *param_1) { int4 *puVar1; int8 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_list_processes(); *(int8 *)(puVar1 + 2) = uVar2; *puVar1 = 0; return; }
45,399
GetMonitorName
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/platforms/rcore_desktop_glfw.c
const char *GetMonitorName(int monitor) { int monitorCount = 0; GLFWmonitor **monitors = glfwGetMonitors(&monitorCount); if ((monitor >= 0) && (monitor < monitorCount)) { return glfwGetMonitorName(monitors[monitor]); } else TRACELOG(LOG_WARNING, "GLFW: Failed to find selected monitor"); return ""; }
O1
c
GetMonitorName: pushq %rbx subq $0x10, %rsp movl %edi, %ebx leaq 0xc(%rsp), %rdi movl $0x0, (%rdi) callq 0xc4b46 testl %ebx, %ebx js 0x73c6f cmpl %ebx, 0xc(%rsp) jle 0x73c6f movl %ebx, %ecx movq (%rax,%rcx,8), %rdi callq 0xc4d7f jmp 0x73c89 leaq 0x71c14(%rip), %rsi # 0xe588a movl $0x4, %edi xorl %eax, %eax callq 0xbfa73 leaq 0x7a7e2(%rip), %rax # 0xee46b addq $0x10, %rsp popq %rbx retq
GetMonitorName: push rbx sub rsp, 10h mov ebx, edi lea rdi, [rsp+18h+var_C] mov dword ptr [rdi], 0 call glfwGetMonitors test ebx, ebx js short loc_73C6F cmp [rsp+18h+var_C], ebx jle short loc_73C6F mov ecx, ebx mov rdi, [rax+rcx*8] call glfwGetMonitorName jmp short loc_73C89 loc_73C6F: lea rsi, aGlfwFailedToFi_0; "GLFW: Failed to find selected monitor" mov edi, 4 xor eax, eax call TraceLog lea rax, asc_EE411+5Ah; "" loc_73C89: add rsp, 10h pop rbx retn
char * GetMonitorName(int a1) { long long Monitors; // rax int v2; // edx int v3; // ecx int v4; // r8d int v5; // r9d int v7[3]; // [rsp+Ch] [rbp-Ch] BYREF v7[0] = 0; Monitors = glfwGetMonitors(v7); if ( a1 >= 0 && v7[0] > a1 ) return (char *)glfwGetMonitorName(*(_QWORD *)(Monitors + 8LL * (unsigned int)a1)); TraceLog(4, (unsigned int)"GLFW: Failed to find selected monitor", v2, v3, v4, v5); return ""; }
GetMonitorName: PUSH RBX SUB RSP,0x10 MOV EBX,EDI LEA RDI,[RSP + 0xc] MOV dword ptr [RDI],0x0 CALL 0x001c4b46 TEST EBX,EBX JS 0x00173c6f CMP dword ptr [RSP + 0xc],EBX JLE 0x00173c6f MOV ECX,EBX MOV RDI,qword ptr [RAX + RCX*0x8] CALL 0x001c4d7f JMP 0x00173c89 LAB_00173c6f: LEA RSI,[0x1e588a] MOV EDI,0x4 XOR EAX,EAX CALL 0x001bfa73 LEA RAX,[0x1ee46b] LAB_00173c89: ADD RSP,0x10 POP RBX RET
char * GetMonitorName(uint param_1) { long lVar1; char *pcVar2; lVar1 = glfwGetMonitors(); if (((int)param_1 < 0) || (-1 < (int)param_1)) { TraceLog(4,"GLFW: Failed to find selected monitor"); pcVar2 = ""; } else { pcVar2 = (char *)glfwGetMonitorName(*(int8 *)(lVar1 + (ulong)param_1 * 8)); } return pcVar2; }