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
23,500
my_tell
eloqsql/mysys/my_seek.c
my_off_t my_tell(File fd, myf MyFlags) { os_off_t pos; DBUG_ENTER("my_tell"); DBUG_PRINT("my",("fd: %d MyFlags: %lu",fd, MyFlags)); DBUG_ASSERT(fd >= 0); #if defined (HAVE_TELL) && !defined (_WIN32) && !defined(_AIX) pos= tell(fd); #else pos= my_seek(fd, 0L, MY_SEEK_CUR,0); #endif if (pos == (os_off_t) -1) { my_errno= errno; if (MyFlags & MY_WME) my_error(EE_CANT_SEEK, MYF(0), my_filename(fd), my_errno); DBUG_PRINT("error", ("tell: %llu errno: %d", (ulonglong) pos, my_errno)); } DBUG_PRINT("exit",("pos: %llu", (ulonglong) pos)); DBUG_RETURN((my_off_t) pos); }
O0
c
my_tell: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) jmp 0x81061 jmp 0x81063 jmp 0x81065 movl -0x4(%rbp), %edi xorl %eax, %eax movl %eax, %ecx movl $0x1, %edx movq %rcx, %rsi callq 0x80f90 movq %rax, -0x18(%rbp) cmpq $-0x1, -0x18(%rbp) jne 0x810d3 callq 0x28040 movl (%rax), %eax movl %eax, -0x1c(%rbp) callq 0x82360 movl -0x1c(%rbp), %ecx movl %ecx, (%rax) movq -0x10(%rbp), %rax andq $0x10, %rax cmpq $0x0, %rax je 0x810cd movl -0x4(%rbp), %edi callq 0x8b160 movq %rax, -0x28(%rbp) callq 0x82360 movq -0x28(%rbp), %rdx movl (%rax), %ecx movl $0x21, %edi xorl %eax, %eax movl %eax, %esi movb $0x0, %al callq 0x7bff0 jmp 0x810cf jmp 0x810d1 jmp 0x810d3 jmp 0x810d5 jmp 0x810d7 jmp 0x810d9 movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
my_tell: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_4], edi mov [rbp+var_10], rsi jmp short $+2 loc_81061: jmp short $+2 loc_81063: jmp short $+2 loc_81065: mov edi, [rbp+var_4] xor eax, eax mov ecx, eax mov edx, 1 mov rsi, rcx call my_seek mov [rbp+var_18], rax cmp [rbp+var_18], 0FFFFFFFFFFFFFFFFh jnz short loc_810D3 call ___errno_location mov eax, [rax] mov [rbp+var_1C], eax call _my_thread_var mov ecx, [rbp+var_1C] mov [rax], ecx mov rax, [rbp+var_10] and rax, 10h cmp rax, 0 jz short loc_810CD mov edi, [rbp+var_4] call my_filename mov [rbp+var_28], rax call _my_thread_var mov rdx, [rbp+var_28] mov ecx, [rax] mov edi, 21h ; '!' xor eax, eax mov esi, eax mov al, 0 call my_error loc_810CD: jmp short $+2 loc_810CF: jmp short $+2 loc_810D1: jmp short $+2 loc_810D3: jmp short $+2 loc_810D5: jmp short $+2 loc_810D7: jmp short $+2 loc_810D9: mov rax, [rbp+var_18] mov [rbp+var_30], rax mov rax, [rbp+var_30] add rsp, 30h pop rbp retn
long long my_tell(unsigned int a1, char a2) { unsigned int *v2; // rax long long v4; // [rsp+8h] [rbp-28h] int v5; // [rsp+14h] [rbp-1Ch] long long v6; // [rsp+18h] [rbp-18h] v6 = my_seek(a1, 0LL, 1u, 0); if ( v6 == -1 ) { v5 = *(_DWORD *)__errno_location(); *(_DWORD *)my_thread_var(a1, 0LL) = v5; if ( (a2 & 0x10) != 0 ) { v4 = my_filename(a1); v2 = (unsigned int *)my_thread_var(a1, 0LL); my_error(0x21u, 0LL, v4, *v2); } } return v6; }
my_tell: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI JMP 0x00181061 LAB_00181061: JMP 0x00181063 LAB_00181063: JMP 0x00181065 LAB_00181065: MOV EDI,dword ptr [RBP + -0x4] XOR EAX,EAX MOV ECX,EAX MOV EDX,0x1 MOV RSI,RCX CALL 0x00180f90 MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],-0x1 JNZ 0x001810d3 CALL 0x00128040 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x1c],EAX CALL 0x00182360 MOV ECX,dword ptr [RBP + -0x1c] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x10] AND RAX,0x10 CMP RAX,0x0 JZ 0x001810cd MOV EDI,dword ptr [RBP + -0x4] CALL 0x0018b160 MOV qword ptr [RBP + -0x28],RAX CALL 0x00182360 MOV RDX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX] MOV EDI,0x21 XOR EAX,EAX MOV ESI,EAX MOV AL,0x0 CALL 0x0017bff0 LAB_001810cd: JMP 0x001810cf LAB_001810cf: JMP 0x001810d1 LAB_001810d1: JMP 0x001810d3 LAB_001810d3: JMP 0x001810d5 LAB_001810d5: JMP 0x001810d7 LAB_001810d7: JMP 0x001810d9 LAB_001810d9: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RSP,0x30 POP RBP RET
long my_tell(int4 param_1,ulong param_2) { int iVar1; long lVar2; int *piVar3; int8 uVar4; int4 *puVar5; lVar2 = my_seek(param_1,0,1); if (lVar2 == -1) { piVar3 = __errno_location(); iVar1 = *piVar3; piVar3 = (int *)_my_thread_var(); *piVar3 = iVar1; if ((param_2 & 0x10) != 0) { uVar4 = my_filename(param_1); puVar5 = (int4 *)_my_thread_var(); my_error(0x21,0,uVar4,*puVar5); } } return lVar2; }
23,501
list_walk
eloqsql/libmariadb/libmariadb/ma_list.c
int list_walk(LIST *list, list_walk_action action, gptr argument) { int error=0; while (list) { if ((error = (*action)(list->data,argument))) return error; list= list_rest(list); } return 0; }
O3
c
list_walk: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx xorl %ebx, %ebx testq %rdi, %rdi je 0x21922 movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %r12 movq 0x10(%r12), %rdi movq %r14, %rsi callq *%r15 testl %eax, %eax jne 0x21920 movq 0x8(%r12), %r12 testq %r12, %r12 jne 0x21905 jmp 0x21922 movl %eax, %ebx movl %ebx, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq nopl (%rax)
list_walk: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx xor ebx, ebx test rdi, rdi jz short loc_21922 mov r14, rdx mov r15, rsi mov r12, rdi loc_21905: mov rdi, [r12+10h] mov rsi, r14 call r15 test eax, eax jnz short loc_21920 mov r12, [r12+8] test r12, r12 jnz short loc_21905 jmp short loc_21922 loc_21920: mov ebx, eax loc_21922: mov eax, ebx pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long list_walk(long long a1, long long ( *a2)(_QWORD, long long), long long a3) { unsigned int v3; // ebx long long v5; // r12 unsigned int v6; // eax v3 = 0; if ( a1 ) { v5 = a1; while ( 1 ) { v6 = a2(*(_QWORD *)(v5 + 16), a3); if ( v6 ) break; v5 = *(_QWORD *)(v5 + 8); if ( !v5 ) return v3; } return v6; } return v3; }
list_walk: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX XOR EBX,EBX TEST RDI,RDI JZ 0x00121922 MOV R14,RDX MOV R15,RSI MOV R12,RDI LAB_00121905: MOV RDI,qword ptr [R12 + 0x10] MOV RSI,R14 CALL R15 TEST EAX,EAX JNZ 0x00121920 MOV R12,qword ptr [R12 + 0x8] TEST R12,R12 JNZ 0x00121905 JMP 0x00121922 LAB_00121920: MOV EBX,EAX LAB_00121922: MOV EAX,EBX POP RBX POP R12 POP R14 POP R15 POP RBP RET
int list_walk(long param_1,code *param_2,int8 param_3) { int iVar1; if (param_1 != 0) { do { iVar1 = (*param_2)(*(int8 *)(param_1 + 0x10),param_3); if (iVar1 != 0) { return iVar1; } param_1 = *(long *)(param_1 + 8); } while (param_1 != 0); } return 0; }
23,502
my_mb_wc_euc_jp
eloqsql/strings/ctype-ujis.c
static int my_mb_wc_euc_jp(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc, const uchar *s, const uchar *e) { int hi; if (s >= e) return MY_CS_TOOSMALL; if ((hi= s[0]) < 0x80) /* ASCII code set: [00..7F] -> [U+0000..U+007F] */ { *pwc= hi; return 1; } if (hi >= 0xA1 && hi <= 0xFE) /* JIS-X-0208 code set: [A1..FE][A1..FE] */ { if (s + 2 > e) return MY_CS_TOOSMALL2; return (*pwc= jisx0208_eucjp_to_unicode[(hi << 8) + s[1]]) ? 2 : (s[1] < 0xA1 || s[1] > 0xFE) ? MY_CS_ILSEQ : -2; } /* JIS-X-0201 HALF WIDTH KATAKANA: [8E][A1..DF] -> [U+FF61..U+FF9F] */ if (hi == 0x8E) { if (s + 2 > e) return MY_CS_TOOSMALL2; if (s[1] < 0xA1 || s[1] > 0xDF) return MY_CS_ILSEQ; *pwc= 0xFEC0 + s[1]; /* 0xFFC0 = 0xFF61 - 0xA1 */ return 2; } if (hi == 0x8F) /* JIS X 0212 code set: [8F][A1..FE][A1..FE] */ { if (s + 3 > e) return MY_CS_TOOSMALL3; return (*pwc= jisx0212_eucjp_to_unicode[(((int) s[1]) << 8) + s[2]]) ? 3 : (s[1] < 0xA1 || s[1] > 0xFE || s[2] < 0xA1 || s[2] > 0xFE) ? MY_CS_ILSEQ : -3; } return MY_CS_ILSEQ; }
O3
c
my_mb_wc_euc_jp: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0xc960b movzbl (%rdx), %edi testb %dil, %dil js 0xc960d movq %rdi, (%rsi) movl $0x1, %eax popq %rbp retq leal 0x5f(%rdi), %eax cmpb $0x5d, %al ja 0xc9659 leaq 0x2(%rdx), %r8 movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %r8 ja 0xc960b movzbl 0x1(%rdx), %eax shll $0x9, %edi leal (%rdi,%rax,2), %eax leaq 0x20d3fd(%rip), %rcx # 0x2d6a30 movzwl (%rax,%rcx), %ecx movq %rcx, (%rsi) movl $0x2, %eax testq %rcx, %rcx jne 0xc960b movb 0x1(%rdx), %al incb %al xorl %ecx, %ecx cmpb $-0x5e, %al setb %cl leal -0x2(,%rcx,2), %eax jmp 0xc960b cmpq $0x8f, %rdi je 0xc969d cmpl $0x8e, %edi jne 0xc96df leaq 0x2(%rdx), %rdi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rdi ja 0xc960b movzbl 0x1(%rdx), %ecx leal 0x20(%rcx), %edx movl $0x0, %eax cmpb $-0x3f, %dl jb 0xc960b addq $0xfec0, %rcx # imm = 0xFEC0 movq %rcx, (%rsi) movl $0x2, %eax jmp 0xc960b leaq 0x3(%rdx), %rdi movl $0xffffff99, %eax # imm = 0xFFFFFF99 cmpq %rcx, %rdi ja 0xc960b movzwl 0x1(%rdx), %eax rolw $0x8, %ax movzwl %ax, %eax leaq 0x22d36f(%rip), %rcx # 0x2f6a30 movzwl (%rcx,%rax,2), %ecx movq %rcx, (%rsi) movl $0x3, %eax testq %rcx, %rcx jne 0xc960b movb 0x1(%rdx), %al incb %al cmpb $-0x5e, %al jae 0xc96e6 xorl %eax, %eax jmp 0xc960b movb 0x2(%rdx), %cl movl $0x0, %eax cmpb $-0x5f, %cl jb 0xc960b xorl %eax, %eax cmpb $-0x1, %cl sete %al leal (%rax,%rax,2), %eax addl $-0x3, %eax jmp 0xc960b
my_mb_wc_euc_jp: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short loc_C960B movzx edi, byte ptr [rdx] test dil, dil js short loc_C960D mov [rsi], rdi mov eax, 1 loc_C960B: pop rbp retn loc_C960D: lea eax, [rdi+5Fh] cmp al, 5Dh ; ']' ja short loc_C9659 lea r8, [rdx+2] mov eax, 0FFFFFF9Ah cmp r8, rcx ja short loc_C960B movzx eax, byte ptr [rdx+1] shl edi, 9 lea eax, [rdi+rax*2] lea rcx, jisx0208_eucjp_to_unicode movzx ecx, word ptr [rax+rcx] mov [rsi], rcx mov eax, 2 test rcx, rcx jnz short loc_C960B mov al, [rdx+1] inc al xor ecx, ecx cmp al, 0A2h setb cl lea eax, ds:0FFFFFFFFFFFFFFFEh[rcx*2] jmp short loc_C960B loc_C9659: cmp rdi, 8Fh jz short loc_C969D cmp edi, 8Eh jnz short loc_C96DF lea rdi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rdi, rcx ja short loc_C960B movzx ecx, byte ptr [rdx+1] lea edx, [rcx+20h] mov eax, 0 cmp dl, 0C1h jb short loc_C960B add rcx, 0FEC0h mov [rsi], rcx mov eax, 2 jmp loc_C960B loc_C969D: lea rdi, [rdx+3] mov eax, 0FFFFFF99h cmp rdi, rcx ja loc_C960B movzx eax, word ptr [rdx+1] rol ax, 8 movzx eax, ax lea rcx, jisx0212_eucjp_to_unicode movzx ecx, word ptr [rcx+rax*2] mov [rsi], rcx mov eax, 3 test rcx, rcx jnz loc_C960B mov al, [rdx+1] inc al cmp al, 0A2h jnb short loc_C96E6 loc_C96DF: xor eax, eax jmp loc_C960B loc_C96E6: mov cl, [rdx+2] mov eax, 0 cmp cl, 0A1h jb loc_C960B xor eax, eax cmp cl, 0FFh setz al lea eax, [rax+rax*2] add eax, 0FFFFFFFDh jmp loc_C960B
long long my_mb_wc_euc_jp(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4) { long long result; // rax long long v5; // rdi long long v6; // rcx long long v7; // rcx long long v8; // rcx unsigned __int8 v9; // cl result = 4294967195LL; if ( (unsigned long long)a3 >= a4 ) return result; v5 = *a3; if ( (v5 & 0x80u) == 0LL ) { *a2 = v5; return 1LL; } if ( (unsigned __int8)(v5 + 95) <= 0x5Du ) { result = 4294967194LL; if ( (unsigned long long)(a3 + 2) <= a4 ) { v6 = jisx0208_eucjp_to_unicode[256 * (_DWORD)v5 + a3[1]]; *a2 = v6; result = 2LL; if ( !v6 ) return 2 * (unsigned int)((unsigned __int8)(a3[1] + 1) < 0xA2u) - 2; } return result; } if ( v5 != 143 ) { if ( (_DWORD)v5 == 142 ) { result = 4294967194LL; if ( (unsigned long long)(a3 + 2) <= a4 ) { v7 = a3[1]; result = 0LL; if ( (unsigned __int8)(v7 + 32) >= 0xC1u ) { *a2 = v7 + 65216; return 2LL; } } return result; } return 0LL; } result = 4294967193LL; if ( (unsigned long long)(a3 + 3) > a4 ) return result; v8 = jisx0212_eucjp_to_unicode[(unsigned __int16)__ROL2__(*(_WORD *)(a3 + 1), 8)]; *a2 = v8; result = 3LL; if ( v8 ) return result; if ( (unsigned __int8)(a3[1] + 1) < 0xA2u ) return 0LL; v9 = a3[2]; result = 0LL; if ( v9 >= 0xA1u ) return 3 * (unsigned int)(v9 == 0xFF) - 3; return result; }
my_mb_wc_euc_jp: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x001c960b MOVZX EDI,byte ptr [RDX] TEST DIL,DIL JS 0x001c960d MOV qword ptr [RSI],RDI MOV EAX,0x1 LAB_001c960b: POP RBP RET LAB_001c960d: LEA EAX,[RDI + 0x5f] CMP AL,0x5d JA 0x001c9659 LEA R8,[RDX + 0x2] MOV EAX,0xffffff9a CMP R8,RCX JA 0x001c960b MOVZX EAX,byte ptr [RDX + 0x1] SHL EDI,0x9 LEA EAX,[RDI + RAX*0x2] LEA RCX,[0x3d6a30] MOVZX ECX,word ptr [RAX + RCX*0x1] MOV qword ptr [RSI],RCX MOV EAX,0x2 TEST RCX,RCX JNZ 0x001c960b MOV AL,byte ptr [RDX + 0x1] INC AL XOR ECX,ECX CMP AL,0xa2 SETC CL LEA EAX,[-0x2 + RCX*0x2] JMP 0x001c960b LAB_001c9659: CMP RDI,0x8f JZ 0x001c969d CMP EDI,0x8e JNZ 0x001c96df LEA RDI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RDI,RCX JA 0x001c960b MOVZX ECX,byte ptr [RDX + 0x1] LEA EDX,[RCX + 0x20] MOV EAX,0x0 CMP DL,0xc1 JC 0x001c960b ADD RCX,0xfec0 MOV qword ptr [RSI],RCX MOV EAX,0x2 JMP 0x001c960b LAB_001c969d: LEA RDI,[RDX + 0x3] MOV EAX,0xffffff99 CMP RDI,RCX JA 0x001c960b MOVZX EAX,word ptr [RDX + 0x1] ROL AX,0x8 MOVZX EAX,AX LEA RCX,[0x3f6a30] MOVZX ECX,word ptr [RCX + RAX*0x2] MOV qword ptr [RSI],RCX MOV EAX,0x3 TEST RCX,RCX JNZ 0x001c960b MOV AL,byte ptr [RDX + 0x1] INC AL CMP AL,0xa2 JNC 0x001c96e6 LAB_001c96df: XOR EAX,EAX JMP 0x001c960b LAB_001c96e6: MOV CL,byte ptr [RDX + 0x2] MOV EAX,0x0 CMP CL,0xa1 JC 0x001c960b XOR EAX,EAX CMP CL,0xff SETZ AL LEA EAX,[RAX + RAX*0x2] ADD EAX,-0x3 JMP 0x001c960b
int my_mb_wc_euc_jp(int8 param_1,ulong *param_2,byte *param_3,byte *param_4) { byte bVar1; ushort uVar2; int iVar3; iVar3 = -0x65; if (param_3 < param_4) { bVar1 = *param_3; if ((char)bVar1 < '\0') { if ((byte)(bVar1 + 0x5f) < 0x5e) { iVar3 = -0x66; if (param_3 + 2 <= param_4) { uVar2 = *(ushort *) (jisx0208_eucjp_to_unicode + ((uint)bVar1 * 0x200 + (uint)param_3[1] * 2)); *param_2 = (ulong)uVar2; iVar3 = 2; if ((ulong)uVar2 == 0) { iVar3 = (uint)((byte)(param_3[1] + 1) < 0xa2) * 2 + -2; } } } else { if ((ulong)bVar1 == 0x8f) { if (param_4 < param_3 + 3) { return -0x67; } uVar2 = *(ushort *) (&jisx0212_eucjp_to_unicode + (ulong)(ushort)(*(ushort *)(param_3 + 1) << 8 | *(ushort *)(param_3 + 1) >> 8) * 2); *param_2 = (ulong)uVar2; if ((ulong)uVar2 != 0) { return 3; } if (0xa1 < (byte)(param_3[1] + 1)) { if (param_3[2] < 0xa1) { return 0; } return (uint)(param_3[2] == 0xff) * 3 + -3; } } else if (bVar1 == 0x8e) { if (param_4 < param_3 + 2) { return -0x66; } if ((byte)(param_3[1] + 0x20) < 0xc1) { return 0; } *param_2 = (ulong)param_3[1] + 0xfec0; return 2; } iVar3 = 0; } } else { *param_2 = (ulong)bVar1; iVar3 = 1; } } return iVar3; }
23,503
common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, bool)
monkey531[P]llama/common/sampling.cpp
std::vector<llama_token> common_sampler_sample_and_accept_n(struct common_sampler * gsmpl, struct llama_context * ctx, const std::vector<int> & idxs, const llama_tokens & draft, bool grammar_first) { GGML_ASSERT(idxs.size() == draft.size() + 1 && "idxs.size() must be draft.size() + 1"); std::vector<llama_token> result; result.reserve(idxs.size()); size_t i = 0; for (; i < draft.size(); i++) { const llama_token id = common_sampler_sample(gsmpl, ctx, idxs[i], grammar_first); common_sampler_accept(gsmpl, id, true); result.push_back(id); if (draft[i] != id) { break; } } if (i == draft.size()) { const llama_token id = common_sampler_sample(gsmpl, ctx, idxs[i], grammar_first); common_sampler_accept(gsmpl, id, true); result.push_back(id); } return result; }
O2
cpp
common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %r14 movq 0x8(%rcx), %rsi subq (%rcx), %rsi movq 0x8(%r8), %rax subq (%r8), %rax sarq $0x2, %rsi sarq $0x2, %rax incq %rax cmpq %rax, %rsi jne 0x9c0f6 movl %r9d, %ebp movq %r8, %r13 movq %rcx, %r12 movq %rdx, %r15 xorps %xmm0, %xmm0 movups %xmm0, (%rdi) andq $0x0, 0x10(%rdi) movq %rdi, 0x8(%rsp) callq 0x9ccf6 movq (%r13), %rax xorl %ebx, %ebx movzbl %bpl, %ebp movq 0x8(%r13), %rcx subq %rax, %rcx sarq $0x2, %rcx cmpq %rcx, %rbx jae 0x9c0a9 movq (%r12), %rax movl (%rax,%rbx,4), %edx movq %r14, %rdi movq %r15, %rsi movl %ebp, %ecx callq 0x9be98 movl %eax, 0x4(%rsp) movq %r14, %rdi movl %eax, %esi pushq $0x1 popq %rdx callq 0x9bd46 movq 0x8(%rsp), %rdi leaq 0x4(%rsp), %rsi callq 0x57034 movq (%r13), %rax movl (%rax,%rbx,4), %ecx cmpl 0x4(%rsp), %ecx jne 0x9c09e incq %rbx jmp 0x9c048 movq 0x8(%r13), %rcx subq %rax, %rcx sarq $0x2, %rcx cmpq %rbx, %rcx jne 0x9c0e2 movq (%r12), %rax movl (%rax,%rbx,4), %edx movq %r14, %rdi movq %r15, %rsi movl %ebp, %ecx callq 0x9be98 movl %eax, 0x14(%rsp) pushq $0x1 popq %rdx movq %r14, %rdi movl %eax, %esi callq 0x9bd46 leaq 0x14(%rsp), %rsi movq 0x8(%rsp), %rdi callq 0x57034 movq 0x8(%rsp), %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x21650(%rip), %rdi # 0xbd74d leaq 0x12086(%rip), %rdx # 0xae18a leaq 0x217cf(%rip), %rcx # 0xbd8da movl $0x155, %esi # imm = 0x155 xorl %eax, %eax callq 0x24f50 jmp 0x9c11b jmp 0x9c11b movq %rax, %r14 movq 0x8(%rsp), %rdi callq 0x2a66a movq %r14, %rdi callq 0x25020
_Z34common_sampler_sample_and_accept_nP14common_samplerP13llama_contextRKSt6vectorIiSaIiEES7_b: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14, rsi mov rsi, [rcx+8] sub rsi, [rcx] mov rax, [r8+8] sub rax, [r8] sar rsi, 2 sar rax, 2 inc rax cmp rsi, rax jnz loc_9C0F6 mov ebp, r9d mov r13, r8 mov r12, rcx mov r15, rdx xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 and qword ptr [rdi+10h], 0 mov [rsp+48h+var_40], rdi call _ZNSt6vectorIiSaIiEE7reserveEm; std::vector<int>::reserve(ulong) mov rax, [r13+0] xor ebx, ebx movzx ebp, bpl loc_9C048: mov rcx, [r13+8] sub rcx, rax sar rcx, 2 cmp rbx, rcx jnb short loc_9C0A9 mov rax, [r12] mov edx, [rax+rbx*4] mov rdi, r14 mov rsi, r15 mov ecx, ebp call _Z21common_sampler_sampleP14common_samplerP13llama_contextib; common_sampler_sample(common_sampler *,llama_context *,int,bool) mov [rsp+48h+var_44], eax mov rdi, r14 mov esi, eax push 1 pop rdx call _Z21common_sampler_acceptP14common_samplerib; common_sampler_accept(common_sampler *,int,bool) mov rdi, [rsp+48h+var_40] lea rsi, [rsp+48h+var_44] call _ZNSt6vectorIiSaIiEE9push_backERKi; std::vector<int>::push_back(int const&) mov rax, [r13+0] mov ecx, [rax+rbx*4] cmp ecx, [rsp+48h+var_44] jnz short loc_9C09E inc rbx jmp short loc_9C048 loc_9C09E: mov rcx, [r13+8] sub rcx, rax sar rcx, 2 loc_9C0A9: cmp rcx, rbx jnz short loc_9C0E2 mov rax, [r12] mov edx, [rax+rbx*4] mov rdi, r14 mov rsi, r15 mov ecx, ebp call _Z21common_sampler_sampleP14common_samplerP13llama_contextib; common_sampler_sample(common_sampler *,llama_context *,int,bool) mov [rsp+48h+var_34], eax push 1 pop rdx mov rdi, r14 mov esi, eax call _Z21common_sampler_acceptP14common_samplerib; common_sampler_accept(common_sampler *,int,bool) lea rsi, [rsp+48h+var_34] mov rdi, [rsp+48h+var_40] call _ZNSt6vectorIiSaIiEE9push_backERKi; std::vector<int>::push_back(int const&) loc_9C0E2: mov rax, [rsp+48h+var_40] add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_9C0F6: lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aIdxsSizeDraftS; "idxs.size() == draft.size() + 1 && \"id"... mov esi, 155h xor eax, eax call _ggml_abort jmp short loc_9C11B jmp short $+2 loc_9C11B: mov r14, rax mov rdi, [rsp+48h+var_40] call _ZNSt12_Vector_baseIiSaIiEED2Ev; std::_Vector_base<int>::~_Vector_base() mov rdi, r14 call __Unwind_Resume
_QWORD * common_sampler_sample_and_accept_n( _QWORD *a1, common_sampler *a2, long long a3, _QWORD *a4, long long *a5, unsigned __int8 a6) { long long v10; // rax unsigned long long i; // rbx unsigned long long v12; // rcx long long v14; // rax unsigned int v15; // [rsp+4h] [rbp-44h] BYREF _QWORD *v16; // [rsp+8h] [rbp-40h] unsigned int v17[13]; // [rsp+14h] [rbp-34h] BYREF if ( (long long)(a4[1] - *a4) >> 2 != ((a5[1] - *a5) >> 2) + 1 ) { v14 = ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp", 341LL, "GGML_ASSERT(%s) failed", "idxs.size() == draft.size() + 1 && \"idxs.size() must be draft.size() + 1\""); std::_Vector_base<int>::~_Vector_base(v16); _Unwind_Resume(v14); } *(_OWORD *)a1 = 0LL; a1[2] = 0LL; v16 = a1; std::vector<int>::reserve(); v10 = *a5; for ( i = 0LL; ; ++i ) { v12 = (a5[1] - v10) >> 2; if ( i >= v12 ) break; v15 = common_sampler_sample(a2, a3, *(_DWORD *)(*a4 + 4 * i), a6); common_sampler_accept(a2, v15, 1); std::vector<int>::push_back((long long)v16, &v15); v10 = *a5; if ( *(_DWORD *)(*a5 + 4 * i) != v15 ) { v12 = (a5[1] - v10) >> 2; break; } } if ( v12 == i ) { v17[0] = common_sampler_sample(a2, a3, *(_DWORD *)(*a4 + 4 * i), a6); common_sampler_accept(a2, v17[0], 1); std::vector<int>::push_back((long long)v16, v17); } return v16; }
common_sampler_sample_and_accept_n: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14,RSI MOV RSI,qword ptr [RCX + 0x8] SUB RSI,qword ptr [RCX] MOV RAX,qword ptr [R8 + 0x8] SUB RAX,qword ptr [R8] SAR RSI,0x2 SAR RAX,0x2 INC RAX CMP RSI,RAX JNZ 0x0019c0f6 MOV EBP,R9D MOV R13,R8 MOV R12,RCX MOV R15,RDX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 AND qword ptr [RDI + 0x10],0x0 LAB_0019c034: MOV qword ptr [RSP + 0x8],RDI CALL 0x0019ccf6 MOV RAX,qword ptr [R13] XOR EBX,EBX MOVZX EBP,BPL LAB_0019c048: MOV RCX,qword ptr [R13 + 0x8] SUB RCX,RAX SAR RCX,0x2 CMP RBX,RCX JNC 0x0019c0a9 MOV RAX,qword ptr [R12] MOV EDX,dword ptr [RAX + RBX*0x4] LAB_0019c05f: MOV RDI,R14 MOV RSI,R15 MOV ECX,EBP CALL 0x0019be98 MOV dword ptr [RSP + 0x4],EAX MOV RDI,R14 MOV ESI,EAX PUSH 0x1 POP RDX CALL 0x0019bd46 MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0x4] CALL 0x00157034 MOV RAX,qword ptr [R13] MOV ECX,dword ptr [RAX + RBX*0x4] CMP ECX,dword ptr [RSP + 0x4] JNZ 0x0019c09e INC RBX JMP 0x0019c048 LAB_0019c09e: MOV RCX,qword ptr [R13 + 0x8] SUB RCX,RAX SAR RCX,0x2 LAB_0019c0a9: CMP RCX,RBX JNZ 0x0019c0e2 MOV RAX,qword ptr [R12] MOV EDX,dword ptr [RAX + RBX*0x4] LAB_0019c0b5: MOV RDI,R14 MOV RSI,R15 MOV ECX,EBP CALL 0x0019be98 MOV dword ptr [RSP + 0x14],EAX PUSH 0x1 POP RDX MOV RDI,R14 MOV ESI,EAX CALL 0x0019bd46 LEA RSI,[RSP + 0x14] MOV RDI,qword ptr [RSP + 0x8] CALL 0x00157034 LAB_0019c0e2: MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0019c0f6: LEA RDI,[0x1bd74d] LEA RDX,[0x1ae18a] LEA RCX,[0x1bd8da] MOV ESI,0x155 XOR EAX,EAX CALL 0x00124f50
/* common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, bool) */ common_sampler * common_sampler_sample_and_accept_n (common_sampler *param_1,llama_context *param_2,vector *param_3,vector *param_4, bool param_5) { long *plVar1; long lVar2; ulong uVar3; ulong uVar4; int7 in_register_00000081; bool in_R9B; int local_44; common_sampler *local_40; int local_34; uVar4 = *(long *)(param_4 + 8) - *(long *)param_4 >> 2; if (uVar4 != (*(long *)(CONCAT71(in_register_00000081,param_5) + 8) - *(long *)CONCAT71(in_register_00000081,param_5) >> 2) + 1U) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",0x155 ,"GGML_ASSERT(%s) failed", "idxs.size() == draft.size() + 1 && \"idxs.size() must be draft.size() + 1\""); } plVar1 = (long *)CONCAT71(in_register_00000081,param_5); *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; local_40 = param_1; /* try { // try from 0019c034 to 0019c03d has its CatchHandler @ 0019c117 */ std::vector<int,std::allocator<int>>::reserve((vector<int,std::allocator<int>> *)param_1,uVar4); lVar2 = *plVar1; uVar4 = 0; do { uVar3 = plVar1[1] - lVar2 >> 2; if (uVar3 <= uVar4) { LAB_0019c0a9: if (uVar3 == uVar4) { /* try { // try from 0019c0b5 to 0019c0e1 has its CatchHandler @ 0019c119 */ local_34 = common_sampler_sample ((common_sampler *)param_2,(llama_context *)param_3, *(int *)(*(long *)param_4 + uVar4 * 4),in_R9B); common_sampler_accept((common_sampler *)param_2,local_34,true); std::vector<int,std::allocator<int>>::push_back ((vector<int,std::allocator<int>> *)local_40,&local_34); } return local_40; } /* try { // try from 0019c05f to 0019c08b has its CatchHandler @ 0019c11b */ local_44 = common_sampler_sample ((common_sampler *)param_2,(llama_context *)param_3, *(int *)(*(long *)param_4 + uVar4 * 4),in_R9B); common_sampler_accept((common_sampler *)param_2,local_44,true); std::vector<int,std::allocator<int>>::push_back ((vector<int,std::allocator<int>> *)local_40,&local_44); lVar2 = *plVar1; if (*(int *)(lVar2 + uVar4 * 4) != local_44) { uVar3 = plVar1[1] - lVar2 >> 2; goto LAB_0019c0a9; } uVar4 = uVar4 + 1; } while( true ); }
23,504
c4_proofer_free
corpus-core[P]colibri-stateless/src/proofer/proofer.c
void c4_proofer_free(proofer_ctx_t* ctx) { c4_state_free(&ctx->state); if (ctx->method) safe_free(ctx->method); if (ctx->params.start) safe_free((void*) ctx->params.start); if (ctx->proof.data) safe_free(ctx->proof.data); #ifdef PROOFER_CACHE while (ctx->cache) { cache_entry_t* next = ctx->cache->next; cache_entry_t* current_local_entry = ctx->cache; // Keep pointer to current local entry // Check if the entry should be moved to the global cache if (current_local_entry->timestamp && // Has a TTL (intended for global) !current_local_entry->from_global_cache && // Not sourced/copied from global !find_global_cache_entry(current_local_entry->key)) // Doesn't already exist in global { // Attempt to add to global cache array by copying data if (add_entry_to_global_cache(current_local_entry)) { // Success: Ownership of value transferred to global cache. // We only need to free the local cache entry *structure*. log_debug("Moved cache entry %b to global cache", bytes(current_local_entry->key, 32)); } else { // Failed to add (e.g., allocation failure). Must free the value now. log_warn("Failed to add cache entry %b to global cache, freeing value.", bytes(current_local_entry->key, 32)); if (current_local_entry->free && current_local_entry->value) current_local_entry->free(current_local_entry->value); } } else { // Entry is NOT being moved to global cache. // Either it was sourced from global (src != NULL) or it's local-only (timestamp == 0). if (current_local_entry->from_global_cache) { // This was copied from global, decrement the counter on the source. // Re-find the global entry by key before decrementing for safety against realloc. cache_entry_t* global_src = find_global_cache_entry(current_local_entry->key); if (global_src && global_src->use_counter > 0) // Prevent underflow global_src->use_counter--; else log_warn("Source entry for key %b not found in global cache or use_counter is 0 during free, use_counter not decremented.", bytes(current_local_entry->key, 32)); } else if (current_local_entry->free && current_local_entry->value) current_local_entry->free(current_local_entry->value); } // Free the local linked-list node structure itself safe_free(current_local_entry); ctx->cache = next; // Move to the next node in the local list } #endif // PROOFER_CACHE // Finally, free the context itself safe_free(ctx); }
O0
c
c4_proofer_free: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi addq $0x38, %rdi callq 0x22220 movq -0x8(%rbp), %rax cmpq $0x0, (%rax) je 0x692f movq -0x8(%rbp), %rax movq (%rax), %rdi callq 0x18740 movq -0x8(%rbp), %rax cmpq $0x0, 0x8(%rax) je 0x6947 movq -0x8(%rbp), %rax movq 0x8(%rax), %rdi callq 0x18740 movq -0x8(%rbp), %rax cmpq $0x0, 0x28(%rax) je 0x695f movq -0x8(%rbp), %rax movq 0x28(%rax), %rdi callq 0x18740 movq -0x8(%rbp), %rdi callq 0x18740 addq $0x10, %rsp popq %rbp retq nop
c4_proofer_free: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] add rdi, 38h ; '8' call c4_state_free mov rax, [rbp+var_8] cmp qword ptr [rax], 0 jz short loc_692F mov rax, [rbp+var_8] mov rdi, [rax] call safe_free loc_692F: mov rax, [rbp+var_8] cmp qword ptr [rax+8], 0 jz short loc_6947 mov rax, [rbp+var_8] mov rdi, [rax+8] call safe_free loc_6947: mov rax, [rbp+var_8] cmp qword ptr [rax+28h], 0 jz short loc_695F mov rax, [rbp+var_8] mov rdi, [rax+28h] call safe_free loc_695F: mov rdi, [rbp+var_8] call safe_free add rsp, 10h pop rbp retn
long long c4_proofer_free(_QWORD *a1) { c4_state_free(a1 + 7); if ( *a1 ) safe_free(*a1); if ( a1[1] ) safe_free(a1[1]); if ( a1[5] ) safe_free(a1[5]); return safe_free(a1); }
c4_proofer_free: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x38 CALL 0x00122220 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX],0x0 JZ 0x0010692f MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX] CALL 0x00118740 LAB_0010692f: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x8],0x0 JZ 0x00106947 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x8] CALL 0x00118740 LAB_00106947: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x28],0x0 JZ 0x0010695f MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x28] CALL 0x00118740 LAB_0010695f: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00118740 ADD RSP,0x10 POP RBP RET
void c4_proofer_free(long *param_1) { c4_state_free(param_1 + 7); if (*param_1 != 0) { safe_free(*param_1); } if (param_1[1] != 0) { safe_free(param_1[1]); } if (param_1[5] != 0) { safe_free(param_1[5]); } safe_free(param_1); return; }
23,505
c4_proofer_free
corpus-core[P]colibri-stateless/src/proofer/proofer.c
void c4_proofer_free(proofer_ctx_t* ctx) { c4_state_free(&ctx->state); if (ctx->method) safe_free(ctx->method); if (ctx->params.start) safe_free((void*) ctx->params.start); if (ctx->proof.data) safe_free(ctx->proof.data); #ifdef PROOFER_CACHE while (ctx->cache) { cache_entry_t* next = ctx->cache->next; cache_entry_t* current_local_entry = ctx->cache; // Keep pointer to current local entry // Check if the entry should be moved to the global cache if (current_local_entry->timestamp && // Has a TTL (intended for global) !current_local_entry->from_global_cache && // Not sourced/copied from global !find_global_cache_entry(current_local_entry->key)) // Doesn't already exist in global { // Attempt to add to global cache array by copying data if (add_entry_to_global_cache(current_local_entry)) { // Success: Ownership of value transferred to global cache. // We only need to free the local cache entry *structure*. log_debug("Moved cache entry %b to global cache", bytes(current_local_entry->key, 32)); } else { // Failed to add (e.g., allocation failure). Must free the value now. log_warn("Failed to add cache entry %b to global cache, freeing value.", bytes(current_local_entry->key, 32)); if (current_local_entry->free && current_local_entry->value) current_local_entry->free(current_local_entry->value); } } else { // Entry is NOT being moved to global cache. // Either it was sourced from global (src != NULL) or it's local-only (timestamp == 0). if (current_local_entry->from_global_cache) { // This was copied from global, decrement the counter on the source. // Re-find the global entry by key before decrementing for safety against realloc. cache_entry_t* global_src = find_global_cache_entry(current_local_entry->key); if (global_src && global_src->use_counter > 0) // Prevent underflow global_src->use_counter--; else log_warn("Source entry for key %b not found in global cache or use_counter is 0 during free, use_counter not decremented.", bytes(current_local_entry->key, 32)); } else if (current_local_entry->free && current_local_entry->value) current_local_entry->free(current_local_entry->value); } // Free the local linked-list node structure itself safe_free(current_local_entry); ctx->cache = next; // Move to the next node in the local list } #endif // PROOFER_CACHE // Finally, free the context itself safe_free(ctx); }
O1
c
c4_proofer_free: pushq %rbx movq %rdi, %rbx addq $0x38, %rdi callq 0x186f8 movq (%rbx), %rdi testq %rdi, %rdi je 0x6566 callq 0x128b8 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x6574 callq 0x128b8 movq 0x28(%rbx), %rdi testq %rdi, %rdi je 0x6582 callq 0x128b8 movq %rbx, %rdi popq %rbx jmp 0x128b8
c4_proofer_free: push rbx mov rbx, rdi add rdi, 38h ; '8' call c4_state_free mov rdi, [rbx] test rdi, rdi jz short loc_6566 call safe_free loc_6566: mov rdi, [rbx+8] test rdi, rdi jz short loc_6574 call safe_free loc_6574: mov rdi, [rbx+28h] test rdi, rdi jz short loc_6582 call safe_free loc_6582: mov rdi, rbx pop rbx jmp safe_free
long long c4_proofer_free(long long *a1) { long long v2; // rdi long long v3; // rdi long long v4; // rdi c4_state_free(a1 + 7); v2 = *a1; if ( v2 ) safe_free(v2); v3 = a1[1]; if ( v3 ) safe_free(v3); v4 = a1[5]; if ( v4 ) safe_free(v4); return safe_free(a1); }
c4_proofer_free: PUSH RBX MOV RBX,RDI ADD RDI,0x38 CALL 0x001186f8 MOV RDI,qword ptr [RBX] TEST RDI,RDI JZ 0x00106566 CALL 0x001128b8 LAB_00106566: MOV RDI,qword ptr [RBX + 0x8] TEST RDI,RDI JZ 0x00106574 CALL 0x001128b8 LAB_00106574: MOV RDI,qword ptr [RBX + 0x28] TEST RDI,RDI JZ 0x00106582 CALL 0x001128b8 LAB_00106582: MOV RDI,RBX POP RBX JMP 0x001128b8
void c4_proofer_free(int8 *param_1) { c4_state_free(param_1 + 7); if ((void *)*param_1 != (void *)0x0) { safe_free((void *)*param_1); } if ((void *)param_1[1] != (void *)0x0) { safe_free((void *)param_1[1]); } if ((void *)param_1[5] != (void *)0x0) { safe_free((void *)param_1[5]); } safe_free(param_1); return; }
23,506
c4_proofer_free
corpus-core[P]colibri-stateless/src/proofer/proofer.c
void c4_proofer_free(proofer_ctx_t* ctx) { c4_state_free(&ctx->state); if (ctx->method) safe_free(ctx->method); if (ctx->params.start) safe_free((void*) ctx->params.start); if (ctx->proof.data) safe_free(ctx->proof.data); #ifdef PROOFER_CACHE while (ctx->cache) { cache_entry_t* next = ctx->cache->next; cache_entry_t* current_local_entry = ctx->cache; // Keep pointer to current local entry // Check if the entry should be moved to the global cache if (current_local_entry->timestamp && // Has a TTL (intended for global) !current_local_entry->from_global_cache && // Not sourced/copied from global !find_global_cache_entry(current_local_entry->key)) // Doesn't already exist in global { // Attempt to add to global cache array by copying data if (add_entry_to_global_cache(current_local_entry)) { // Success: Ownership of value transferred to global cache. // We only need to free the local cache entry *structure*. log_debug("Moved cache entry %b to global cache", bytes(current_local_entry->key, 32)); } else { // Failed to add (e.g., allocation failure). Must free the value now. log_warn("Failed to add cache entry %b to global cache, freeing value.", bytes(current_local_entry->key, 32)); if (current_local_entry->free && current_local_entry->value) current_local_entry->free(current_local_entry->value); } } else { // Entry is NOT being moved to global cache. // Either it was sourced from global (src != NULL) or it's local-only (timestamp == 0). if (current_local_entry->from_global_cache) { // This was copied from global, decrement the counter on the source. // Re-find the global entry by key before decrementing for safety against realloc. cache_entry_t* global_src = find_global_cache_entry(current_local_entry->key); if (global_src && global_src->use_counter > 0) // Prevent underflow global_src->use_counter--; else log_warn("Source entry for key %b not found in global cache or use_counter is 0 during free, use_counter not decremented.", bytes(current_local_entry->key, 32)); } else if (current_local_entry->free && current_local_entry->value) current_local_entry->free(current_local_entry->value); } // Free the local linked-list node structure itself safe_free(current_local_entry); ctx->cache = next; // Move to the next node in the local list } #endif // PROOFER_CACHE // Finally, free the context itself safe_free(ctx); }
O2
c
c4_proofer_free: pushq %rbx movq %rdi, %rbx addq $0x38, %rdi callq 0x16e64 movq (%rbx), %rdi testq %rdi, %rdi je 0x61f6 callq 0x1195c movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x6204 callq 0x1195c movq 0x28(%rbx), %rdi testq %rdi, %rdi je 0x6212 callq 0x1195c movq %rbx, %rdi popq %rbx jmp 0x1195c
c4_proofer_free: push rbx mov rbx, rdi add rdi, 38h ; '8' call c4_state_free mov rdi, [rbx] test rdi, rdi jz short loc_61F6 call safe_free loc_61F6: mov rdi, [rbx+8] test rdi, rdi jz short loc_6204 call safe_free loc_6204: mov rdi, [rbx+28h] test rdi, rdi jz short loc_6212 call safe_free loc_6212: mov rdi, rbx pop rbx jmp safe_free
long long c4_proofer_free(long long *a1) { long long v2; // rdi long long v3; // rdi long long v4; // rdi c4_state_free(a1 + 7); v2 = *a1; if ( v2 ) safe_free(v2); v3 = a1[1]; if ( v3 ) safe_free(v3); v4 = a1[5]; if ( v4 ) safe_free(v4); return safe_free(a1); }
c4_proofer_free: PUSH RBX MOV RBX,RDI ADD RDI,0x38 CALL 0x00116e64 MOV RDI,qword ptr [RBX] TEST RDI,RDI JZ 0x001061f6 CALL 0x0011195c LAB_001061f6: MOV RDI,qword ptr [RBX + 0x8] TEST RDI,RDI JZ 0x00106204 CALL 0x0011195c LAB_00106204: MOV RDI,qword ptr [RBX + 0x28] TEST RDI,RDI JZ 0x00106212 CALL 0x0011195c LAB_00106212: MOV RDI,RBX POP RBX JMP 0x0011195c
void c4_proofer_free(int8 *param_1) { c4_state_free(param_1 + 7); if ((void *)*param_1 != (void *)0x0) { safe_free((void *)*param_1); } if ((void *)param_1[1] != (void *)0x0) { safe_free((void *)param_1[1]); } if ((void *)param_1[5] != (void *)0x0) { safe_free((void *)param_1[5]); } safe_free(param_1); return; }
23,507
ma_ft_segiterator_dummy_init
eloqsql/storage/maria/ma_ft_update.c
void _ma_ft_segiterator_dummy_init(const uchar *record, uint len, FT_SEG_ITERATOR *ftsi) { DBUG_ENTER("_ma_ft_segiterator_dummy_init"); ftsi->num=1; ftsi->seg=0; ftsi->pos=record; ftsi->len=len; DBUG_VOID_RETURN; }
O0
c
ma_ft_segiterator_dummy_init: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq -0x18(%rbp), %rax movl $0x1, (%rax) movq -0x18(%rbp), %rax movq $0x0, 0x8(%rax) movq -0x8(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x18(%rax) movl -0xc(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, 0x4(%rax) jmp 0x78acd popq %rbp retq nop
_ma_ft_segiterator_dummy_init: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov rax, [rbp+var_18] mov dword ptr [rax], 1 mov rax, [rbp+var_18] mov qword ptr [rax+8], 0 mov rcx, [rbp+var_8] mov rax, [rbp+var_18] mov [rax+18h], rcx mov ecx, [rbp+var_C] mov rax, [rbp+var_18] mov [rax+4], ecx jmp short $+2 loc_78ACD: pop rbp retn
long long ma_ft_segiterator_dummy_init(long long a1, int a2, long long a3) { long long result; // rax *(_DWORD *)a3 = 1; *(_QWORD *)(a3 + 8) = 0LL; *(_QWORD *)(a3 + 24) = a1; result = a3; *(_DWORD *)(a3 + 4) = a2; return result; }
_ma_ft_segiterator_dummy_init: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX],0x1 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x8],0x0 MOV RCX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x18],RCX MOV ECX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x4],ECX JMP 0x00178acd LAB_00178acd: POP RBP RET
void _ma_ft_segiterator_dummy_init(int8 param_1,int4 param_2,int4 *param_3) { *param_3 = 1; *(int8 *)(param_3 + 2) = 0; *(int8 *)(param_3 + 6) = param_1; param_3[1] = param_2; return; }
23,508
pfs_set_socket_info_v1
eloqsql/storage/perfschema/pfs.cc
void pfs_set_socket_info_v1(PSI_socket *socket, const my_socket *fd, const struct sockaddr *addr, socklen_t addr_len) { PFS_socket *pfs= reinterpret_cast<PFS_socket*>(socket); assert(pfs != NULL); /** Set socket descriptor */ if (fd != NULL) pfs->m_fd= (uint)*fd; /** Set raw socket address and length */ if (likely(addr != NULL && addr_len > 0)) { pfs->m_addr_len= addr_len; /** Restrict address length to size of struct */ if (unlikely(pfs->m_addr_len > sizeof(sockaddr_storage))) pfs->m_addr_len= sizeof(struct sockaddr_storage); memcpy(&pfs->m_sock_addr, addr, pfs->m_addr_len); } }
O0
cpp
pfs_set_socket_info_v1: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x28(%rbp) cmpq $0x0, -0x10(%rbp) je 0x55133 movq -0x10(%rbp), %rax movl (%rax), %ecx movq -0x28(%rbp), %rax movl %ecx, 0x20(%rax) xorl %eax, %eax cmpq $0x0, -0x18(%rbp) movb %al, -0x29(%rbp) je 0x55149 cmpl $0x0, -0x1c(%rbp) seta %al movb %al, -0x29(%rbp) movb -0x29(%rbp), %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x551ab movl -0x1c(%rbp), %ecx movq -0x28(%rbp), %rax movl %ecx, 0xa8(%rax) movq -0x28(%rbp), %rax movl 0xa8(%rax), %eax cmpq $0x80, %rax seta %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x5518e movq -0x28(%rbp), %rax movl $0x80, 0xa8(%rax) movq -0x28(%rbp), %rdi addq $0x28, %rdi movq -0x18(%rbp), %rsi movq -0x28(%rbp), %rax movl 0xa8(%rax), %eax movl %eax, %edx callq 0x26280 addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
pfs_set_socket_info_v1: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov rax, [rbp+var_8] mov [rbp+var_28], rax cmp [rbp+var_10], 0 jz short loc_55133 mov rax, [rbp+var_10] mov ecx, [rax] mov rax, [rbp+var_28] mov [rax+20h], ecx loc_55133: xor eax, eax cmp [rbp+var_18], 0 mov [rbp+var_29], al jz short loc_55149 cmp [rbp+var_1C], 0 setnbe al mov [rbp+var_29], al loc_55149: mov al, [rbp+var_29] and al, 1 movzx eax, al cmp eax, 0 jz short loc_551AB mov ecx, [rbp+var_1C] mov rax, [rbp+var_28] mov [rax+0A8h], ecx mov rax, [rbp+var_28] mov eax, [rax+0A8h] cmp rax, 80h setnbe al and al, 1 movzx eax, al cmp eax, 0 jz short loc_5518E mov rax, [rbp+var_28] mov dword ptr [rax+0A8h], 80h loc_5518E: mov rdi, [rbp+var_28] add rdi, 28h ; '(' mov rsi, [rbp+var_18] mov rax, [rbp+var_28] mov eax, [rax+0A8h] mov edx, eax call _memcpy loc_551AB: add rsp, 30h pop rbp retn
long long pfs_set_socket_info_v1(long long a1, _DWORD *a2, long long a3, int a4) { long long result; // rax bool v5; // [rsp+7h] [rbp-29h] if ( a2 ) *(_DWORD *)(a1 + 32) = *a2; v5 = 0; if ( a3 ) v5 = a4 != 0; result = v5; if ( v5 ) { *(_DWORD *)(a1 + 168) = a4; if ( *(unsigned int *)(a1 + 168) > 0x80uLL ) *(_DWORD *)(a1 + 168) = 128; return memcpy(a1 + 40, a3, *(unsigned int *)(a1 + 168)); } return result; }
pfs_set_socket_info_v1: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x28],RAX CMP qword ptr [RBP + -0x10],0x0 JZ 0x00155133 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x20],ECX LAB_00155133: XOR EAX,EAX CMP qword ptr [RBP + -0x18],0x0 MOV byte ptr [RBP + -0x29],AL JZ 0x00155149 CMP dword ptr [RBP + -0x1c],0x0 SETA AL MOV byte ptr [RBP + -0x29],AL LAB_00155149: MOV AL,byte ptr [RBP + -0x29] AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x001551ab MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0xa8],ECX MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0xa8] CMP RAX,0x80 SETA AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x0015518e MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0xa8],0x80 LAB_0015518e: MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x28 MOV RSI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0xa8] MOV EDX,EAX CALL 0x00126280 LAB_001551ab: ADD RSP,0x30 POP RBP RET
void pfs_set_socket_info_v1(long param_1,int4 *param_2,void *param_3,int param_4) { if (param_2 != (int4 *)0x0) { *(int4 *)(param_1 + 0x20) = *param_2; } if (param_3 != (void *)0x0 && param_4 != 0) { *(int *)(param_1 + 0xa8) = param_4; if (0x80 < *(uint *)(param_1 + 0xa8)) { *(int4 *)(param_1 + 0xa8) = 0x80; } memcpy((void *)(param_1 + 0x28),param_3,(ulong)*(uint *)(param_1 + 0xa8)); } return; }
23,509
mi_search
eloqsql/storage/myisam/mi_search.c
int _mi_search(register MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *key, uint key_len, uint nextflag, register my_off_t pos) { my_bool last_key; int error,flag; uint nod_flag; uchar *keypos,*maxpos; uchar lastkey[HA_MAX_KEY_BUFF],*buff; DBUG_ENTER("_mi_search"); DBUG_PRINT("enter",("pos: %lu nextflag: %u lastpos: %lu", (ulong) pos, nextflag, (ulong) info->lastpos)); DBUG_EXECUTE("key",_mi_print_key(DBUG_FILE,keyinfo->seg,key,key_len);); if (pos == HA_OFFSET_ERROR) { my_errno=HA_ERR_KEY_NOT_FOUND; /* Didn't find key */ info->lastpos= HA_OFFSET_ERROR; if (!(nextflag & (SEARCH_SMALLER | SEARCH_BIGGER | SEARCH_LAST))) DBUG_RETURN(-1); /* Not found ; return error */ DBUG_RETURN(1); /* Search at upper levels */ } if (!(buff=_mi_fetch_keypage(info,keyinfo,pos,DFLT_INIT_HITS,info->buff, MY_TEST(!(nextflag & SEARCH_SAVE_BUFF))))) goto err; DBUG_DUMP("page", buff, mi_getint(buff)); flag=(*keyinfo->bin_search)(info,keyinfo,buff,key,key_len,nextflag, &keypos,lastkey, &last_key); if (flag == MI_FOUND_WRONG_KEY) { my_errno= HA_ERR_CRASHED; goto err; } nod_flag=mi_test_if_nod(buff); maxpos=buff+mi_getint(buff)-1; if (flag) { if ((error=_mi_search(info,keyinfo,key,key_len,nextflag, _mi_kpos(nod_flag,keypos))) <= 0) DBUG_RETURN(error); if (flag >0) { if (nextflag & (SEARCH_SMALLER | SEARCH_LAST) && keypos == buff+2+nod_flag) DBUG_RETURN(1); /* Bigger than key */ } else if (nextflag & SEARCH_BIGGER && keypos >= maxpos) DBUG_RETURN(1); /* Smaller than key */ } else { if ((nextflag & SEARCH_FIND) && nod_flag && ((keyinfo->flag & (HA_NOSAME | HA_NULL_PART)) != HA_NOSAME || key_len != USE_WHOLE_KEY)) { if ((error=_mi_search(info,keyinfo,key,key_len,SEARCH_FIND, _mi_kpos(nod_flag,keypos))) >= 0 || my_errno != HA_ERR_KEY_NOT_FOUND) DBUG_RETURN(error); info->last_keypage= HA_OFFSET_ERROR; /* Buffer not in mem */ } } if (pos != info->last_keypage) { uchar *old_buff=buff; if (!(buff=_mi_fetch_keypage(info,keyinfo,pos,DFLT_INIT_HITS,info->buff, MY_TEST(!(nextflag & SEARCH_SAVE_BUFF))))) goto err; keypos=buff+(keypos-old_buff); maxpos=buff+(maxpos-old_buff); } if ((nextflag & (SEARCH_SMALLER | SEARCH_LAST)) && flag != 0) { uint not_used[2]; if (_mi_get_prev_key(info,keyinfo, buff, info->lastkey, keypos, &info->lastkey_length)) goto err; if (!(nextflag & SEARCH_SMALLER) && ha_key_cmp(keyinfo->seg, info->lastkey, key, key_len, SEARCH_FIND, not_used)) { my_errno=HA_ERR_KEY_NOT_FOUND; /* Didn't find key */ goto err; } } else { info->lastkey_length=(*keyinfo->get_key)(keyinfo,nod_flag,&keypos,lastkey); if (!info->lastkey_length) goto err; memcpy(info->lastkey,lastkey,info->lastkey_length); } info->lastpos=_mi_dpos(info,0,info->lastkey+info->lastkey_length); /* Save position for a possible read next / previous */ info->int_keypos=info->buff+ (keypos-buff); info->int_maxpos=info->buff+ (maxpos-buff); info->int_nod_flag=nod_flag; info->int_keytree_version=keyinfo->version; info->last_search_keypage=info->last_keypage; info->page_changed=0; info->buff_used= (info->buff != buff); /* If we have to reread buff */ DBUG_PRINT("exit",("found key at %lu",(ulong) info->lastpos)); DBUG_RETURN(0); err: DBUG_PRINT("exit",("Error: %d",my_errno)); info->lastpos= HA_OFFSET_ERROR; info->page_changed=1; DBUG_RETURN (-1); }
O3
c
mi_search: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x518, %rsp # imm = 0x518 movl %r8d, %r13d movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) cmpq $-0x1, %r9 je 0x83ae7 movq %r9, %r12 movq %rsi, %r14 movq %rdx, -0x530(%rbp) movl %ecx, -0x4f8(%rbp) movq 0x100(%rbx), %r8 xorl %r15d, %r15d testb $0x20, %r13b sete %r15b movq %rbx, %rdi movq %r9, %rdx movl $0x3, %ecx movl %r15d, %r9d callq 0x83608 testq %rax, %rax je 0x83acd movl %r13d, %r9d movq %rax, %r13 subq $0x8, %rsp leaq -0x515(%rbp), %rax leaq -0x4f0(%rbp), %r10 leaq -0x510(%rbp), %r11 movq %rbx, %rdi movq %r14, %rsi movq %r13, %rdx movq -0x530(%rbp), %rcx movl -0x4f8(%rbp), %r8d movl %r9d, -0x4f4(%rbp) pushq %rax pushq %r10 pushq %r11 callq *0x40(%r14) addq $0x20, %rsp cmpl $0x7fffffff, %eax # imm = 0x7FFFFFFF jne 0x83b3a callq 0xa13e6 movl $0x7e, (%rax) movq $-0x1, 0x170(%rbx) movb $0x1, 0x33c(%rbx) movl $0xffffffff, %r14d # imm = 0xFFFFFFFF jmp 0x83b12 callq 0xa13e6 movl $0x78, (%rax) movq $-0x1, 0x170(%rbx) andl $0x118, %r13d # imm = 0x118 xorl %r14d, %r14d cmpl $0x1, %r13d sbbl %r14d, %r14d orl $0x1, %r14d movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x83f7d movl %r14d, %eax addq $0x518, %rsp # imm = 0x518 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %eax, %esi movzbl (%r13), %eax xorl %r8d, %r8d testb %al, %al movq %r13, %rdx jns 0x83b55 movq (%rbx), %rcx movl 0x17c(%rcx), %r8d movzbl 0x1(%rdx), %ecx andl $0x7f, %eax shll $0x8, %eax orq %rcx, %rax addq %rdx, %rax decq %rax movq %rax, -0x528(%rbp) testl %esi, %esi movq %r14, -0x508(%rbp) movl %r8d, -0x4fc(%rbp) je 0x83c1b movl %esi, %r13d movq %rdx, -0x520(%rbp) movq -0x510(%rbp), %rsi movl %r8d, %edi callq 0x83f82 movq %rbx, %rdi movq %r14, %rsi movq -0x530(%rbp), %rdx movl -0x4f8(%rbp), %ecx movl -0x4f4(%rbp), %r8d movq %rax, %r9 callq 0x83a03 testl %eax, %eax jle 0x83cd8 movq -0x510(%rbp), %rax movl %r13d, %esi testl %r13d, %r13d jle 0x83ce0 movl -0x4f4(%rbp), %r9d testl $0x110, %r9d # imm = 0x110 movq -0x520(%rbp), %rdx movl -0x4fc(%rbp), %r8d je 0x83d0e movl %r8d, %ecx addq %rdx, %rcx addq $0x2, %rcx movl $0x1, %r14d cmpq %rcx, %rax je 0x83b12 jmp 0x83d0e testl %r8d, %r8d setne %al movl -0x4f4(%rbp), %r9d andb %r9b, %al cmpb $0x1, %al jne 0x83d0e cmpl $0x970, -0x4f8(%rbp) # imm = 0x970 jne 0x83c57 movq -0x508(%rbp), %rax movzwl 0xa(%rax), %eax andl $0x11, %eax cmpw $0x1, %ax je 0x83d0e movl %esi, -0x514(%rbp) movq %rdx, -0x520(%rbp) movq -0x510(%rbp), %rsi movl %r8d, %edi movl %r8d, %r13d callq 0x83f82 movq %rbx, %rdi movq -0x508(%rbp), %rsi movq -0x530(%rbp), %rdx movl -0x4f8(%rbp), %ecx movl $0x1, %r8d movq %rax, %r9 callq 0x83a03 movl %eax, %r14d testl %eax, %eax jns 0x83b12 callq 0xa13e6 cmpl $0x78, (%rax) movq -0x520(%rbp), %rdx movl -0x4f4(%rbp), %r9d movl -0x514(%rbp), %esi jne 0x83b12 movl %r13d, %r8d movq $-0x1, 0x190(%rbx) jmp 0x83d0e movl %eax, %r14d jmp 0x83b12 movl -0x4f4(%rbp), %r9d testb $0x8, %r9b movq -0x520(%rbp), %rdx movl -0x4fc(%rbp), %r8d je 0x83d0e movl $0x1, %r14d cmpq -0x528(%rbp), %rax jae 0x83b12 cmpq %r12, 0x190(%rbx) jne 0x83d20 movq -0x508(%rbp), %r14 jmp 0x83d95 movl %esi, -0x514(%rbp) movq 0x100(%rbx), %r8 movq %rbx, %rdi movq -0x508(%rbp), %r14 movq %r14, %rsi movq %rdx, %r13 movq %r12, %rdx movl $0x3, %ecx movl %r15d, %r9d callq 0x83608 testq %rax, %rax je 0x83acd movq -0x510(%rbp), %rcx subq %r13, %rcx addq %rax, %rcx movq %rcx, -0x510(%rbp) movq -0x528(%rbp), %rcx subq %r13, %rcx addq %rax, %rcx movq %rcx, -0x528(%rbp) movq %rax, %rdx movl -0x4fc(%rbp), %r8d movl -0x4f4(%rbp), %r9d movl -0x514(%rbp), %esi testl $0x110, %r9d # imm = 0x110 movq %rdx, -0x520(%rbp) je 0x83e3d testl %esi, %esi je 0x83e3d xorl %r14d, %r14d cmpb $0x0, (%rdx) jns 0x83dc3 movq (%rbx), %rax movl 0x17c(%rax), %r14d movq 0x108(%rbx), %r15 movq -0x510(%rbp), %r12 movq -0x508(%rbp), %rax testb $0x28, 0xa(%rax) je 0x83e7a leal 0x2(%r14), %eax addq %rdx, %rax leaq -0x538(%rbp), %rcx movq %rcx, %r13 movq %rax, (%rcx) movb $0x0, (%r15) cmpq %r12, -0x538(%rbp) jae 0x83e98 movq -0x508(%rbp), %rdi movl %r14d, %esi movq %r13, %rdx movq %r15, %rcx callq *0x48(%rdi) movl %eax, 0x1d8(%rbx) testl %eax, %eax jne 0x83dfa movq (%rbx), %rax movq 0x268(%rax), %rsi movl $0x7e, %edi callq 0x7a87e jmp 0x83ac2 leaq -0x510(%rbp), %rdx leaq -0x4f0(%rbp), %rcx movq %r14, %rdi movl %r8d, %esi callq *0x48(%r14) movl %eax, 0x1d8(%rbx) testl %eax, %eax je 0x83acd movq 0x108(%rbx), %rdi movl %eax, %edx leaq -0x4f0(%rbp), %rsi callq 0x29090 jmp 0x83ee6 movzwl 0x12(%rax), %edx movl %edx, 0x1d8(%rbx) subq %rdx, %r12 movl %r14d, %eax subq %rax, %r12 movq %r15, %rdi movq %r12, %rsi callq 0x29120 testb $0x10, -0x4f4(%rbp) jne 0x83ee6 movq -0x508(%rbp), %rax movq 0x28(%rax), %rdi movq 0x108(%rbx), %rsi leaq -0x540(%rbp), %r9 movq -0x530(%rbp), %rdx movl -0x4f8(%rbp), %ecx movl $0x1, %r8d callq 0x9e152 testl %eax, %eax je 0x83ee6 callq 0xa13e6 movl $0x78, (%rax) jmp 0x83acd movl 0x1d8(%rbx), %edx addq 0x108(%rbx), %rdx xorl %r14d, %r14d movq %rbx, %rdi xorl %esi, %esi callq 0x84061 movq %rax, 0x170(%rbx) movq -0x510(%rbp), %rax movq -0x520(%rbp), %r13 subq %r13, %rax movq 0x100(%rbx), %rcx movq 0x190(%rbx), %rdx addq %rcx, %rax movq %rax, 0x128(%rbx) movq -0x528(%rbp), %rax subq %r13, %rax addq %rcx, %rax movq %rax, 0x130(%rbx) movl -0x4fc(%rbp), %eax movl %eax, 0x138(%rbx) movq -0x508(%rbp), %rax movl 0x1c(%rax), %eax movl %eax, 0x13c(%rbx) movq %rdx, 0x198(%rbx) movb $0x0, 0x33c(%rbx) cmpq %r13, %rcx setne 0x33d(%rbx) jmp 0x83b12 callq 0x29260
_mi_search: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 518h mov r13d, r8d mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax cmp r9, 0FFFFFFFFFFFFFFFFh jz loc_83AE7 mov r12, r9 mov r14, rsi mov [rbp+var_530], rdx mov [rbp+var_4F8], ecx mov r8, [rbx+100h] xor r15d, r15d test r13b, 20h setz r15b mov rdi, rbx mov rdx, r9 mov ecx, 3 mov r9d, r15d call _mi_fetch_keypage test rax, rax jz short loc_83ACD mov r9d, r13d mov r13, rax sub rsp, 8 lea rax, [rbp+var_515] lea r10, [rbp+var_4F0] lea r11, [rbp+var_510] mov rdi, rbx mov rsi, r14 mov rdx, r13 mov rcx, [rbp+var_530] mov r8d, [rbp+var_4F8] mov [rbp+var_4F4], r9d push rax push r10 push r11 call qword ptr [r14+40h] add rsp, 20h cmp eax, 7FFFFFFFh jnz short loc_83B3A loc_83AC2: call _my_thread_var mov dword ptr [rax], 7Eh ; '~' loc_83ACD: mov qword ptr [rbx+170h], 0FFFFFFFFFFFFFFFFh mov byte ptr [rbx+33Ch], 1 mov r14d, 0FFFFFFFFh jmp short loc_83B12 loc_83AE7: call _my_thread_var mov dword ptr [rax], 78h ; 'x' mov qword ptr [rbx+170h], 0FFFFFFFFFFFFFFFFh and r13d, 118h xor r14d, r14d cmp r13d, 1 sbb r14d, r14d or r14d, 1 loc_83B12: mov rax, fs:28h cmp rax, [rbp+var_30] jnz loc_83F7D mov eax, r14d add rsp, 518h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_83B3A: mov esi, eax movzx eax, byte ptr [r13+0] xor r8d, r8d test al, al mov rdx, r13 jns short loc_83B55 mov rcx, [rbx] mov r8d, [rcx+17Ch] loc_83B55: movzx ecx, byte ptr [rdx+1] and eax, 7Fh shl eax, 8 or rax, rcx add rax, rdx dec rax mov [rbp+var_528], rax test esi, esi mov [rbp+var_508], r14 mov [rbp+var_4FC], r8d jz loc_83C1B mov r13d, esi mov [rbp+var_520], rdx mov rsi, [rbp+var_510] mov edi, r8d call _mi_kpos mov rdi, rbx mov rsi, r14 mov rdx, [rbp+var_530] mov ecx, [rbp+var_4F8] mov r8d, [rbp+var_4F4] mov r9, rax call _mi_search test eax, eax jle loc_83CD8 mov rax, [rbp+var_510] mov esi, r13d test r13d, r13d jle loc_83CE0 mov r9d, [rbp+var_4F4] test r9d, 110h mov rdx, [rbp+var_520] mov r8d, [rbp+var_4FC] jz loc_83D0E mov ecx, r8d add rcx, rdx add rcx, 2 mov r14d, 1 cmp rax, rcx jz loc_83B12 jmp loc_83D0E loc_83C1B: test r8d, r8d setnz al mov r9d, [rbp+var_4F4] and al, r9b cmp al, 1 jnz loc_83D0E cmp [rbp+var_4F8], 970h jnz short loc_83C57 mov rax, [rbp+var_508] movzx eax, word ptr [rax+0Ah] and eax, 11h cmp ax, 1 jz loc_83D0E loc_83C57: mov [rbp+var_514], esi mov [rbp+var_520], rdx mov rsi, [rbp+var_510] mov edi, r8d mov r13d, r8d call _mi_kpos mov rdi, rbx mov rsi, [rbp+var_508] mov rdx, [rbp+var_530] mov ecx, [rbp+var_4F8] mov r8d, 1 mov r9, rax call _mi_search mov r14d, eax test eax, eax jns loc_83B12 call _my_thread_var cmp dword ptr [rax], 78h ; 'x' mov rdx, [rbp+var_520] mov r9d, [rbp+var_4F4] mov esi, [rbp+var_514] jnz loc_83B12 mov r8d, r13d mov qword ptr [rbx+190h], 0FFFFFFFFFFFFFFFFh jmp short loc_83D0E loc_83CD8: mov r14d, eax jmp loc_83B12 loc_83CE0: mov r9d, [rbp+var_4F4] test r9b, 8 mov rdx, [rbp+var_520] mov r8d, [rbp+var_4FC] jz short loc_83D0E mov r14d, 1 cmp rax, [rbp+var_528] jnb loc_83B12 loc_83D0E: cmp [rbx+190h], r12 jnz short loc_83D20 mov r14, [rbp+var_508] jmp short loc_83D95 loc_83D20: mov [rbp+var_514], esi mov r8, [rbx+100h] mov rdi, rbx mov r14, [rbp+var_508] mov rsi, r14 mov r13, rdx mov rdx, r12 mov ecx, 3 mov r9d, r15d call _mi_fetch_keypage test rax, rax jz loc_83ACD mov rcx, [rbp+var_510] sub rcx, r13 add rcx, rax mov [rbp+var_510], rcx mov rcx, [rbp+var_528] sub rcx, r13 add rcx, rax mov [rbp+var_528], rcx mov rdx, rax mov r8d, [rbp+var_4FC] mov r9d, [rbp+var_4F4] mov esi, [rbp+var_514] loc_83D95: test r9d, 110h mov [rbp+var_520], rdx jz loc_83E3D test esi, esi jz loc_83E3D xor r14d, r14d cmp byte ptr [rdx], 0 jns short loc_83DC3 mov rax, [rbx] mov r14d, [rax+17Ch] loc_83DC3: mov r15, [rbx+108h] mov r12, [rbp+var_510] mov rax, [rbp+var_508] test byte ptr [rax+0Ah], 28h jz loc_83E7A lea eax, [r14+2] add rax, rdx lea rcx, [rbp+var_538] mov r13, rcx mov [rcx], rax mov byte ptr [r15], 0 loc_83DFA: cmp [rbp+var_538], r12 jnb loc_83E98 mov rdi, [rbp+var_508] mov esi, r14d mov rdx, r13 mov rcx, r15 call qword ptr [rdi+48h] mov [rbx+1D8h], eax test eax, eax jnz short loc_83DFA mov rax, [rbx] mov rsi, [rax+268h] mov edi, 7Eh ; '~' call mi_report_error jmp loc_83AC2 loc_83E3D: lea rdx, [rbp+var_510] lea rcx, [rbp+var_4F0] mov rdi, r14 mov esi, r8d call qword ptr [r14+48h] mov [rbx+1D8h], eax test eax, eax jz loc_83ACD mov rdi, [rbx+108h] mov edx, eax lea rsi, [rbp+var_4F0] call _memcpy jmp short loc_83EE6 loc_83E7A: movzx edx, word ptr [rax+12h] mov [rbx+1D8h], edx sub r12, rdx mov eax, r14d sub r12, rax mov rdi, r15 mov rsi, r12 call _memmove loc_83E98: test byte ptr [rbp+var_4F4], 10h jnz short loc_83EE6 mov rax, [rbp+var_508] mov rdi, [rax+28h] mov rsi, [rbx+108h] lea r9, [rbp+var_540] mov rdx, [rbp+var_530] mov ecx, [rbp+var_4F8] mov r8d, 1 call ha_key_cmp test eax, eax jz short loc_83EE6 call _my_thread_var mov dword ptr [rax], 78h ; 'x' jmp loc_83ACD loc_83EE6: mov edx, [rbx+1D8h] add rdx, [rbx+108h] xor r14d, r14d mov rdi, rbx xor esi, esi call _mi_dpos mov [rbx+170h], rax mov rax, [rbp+var_510] mov r13, [rbp+var_520] sub rax, r13 mov rcx, [rbx+100h] mov rdx, [rbx+190h] add rax, rcx mov [rbx+128h], rax mov rax, [rbp+var_528] sub rax, r13 add rax, rcx mov [rbx+130h], rax mov eax, [rbp+var_4FC] mov [rbx+138h], eax mov rax, [rbp+var_508] mov eax, [rax+1Ch] mov [rbx+13Ch], eax mov [rbx+198h], rdx mov byte ptr [rbx+33Ch], 0 cmp rcx, r13 setnz byte ptr [rbx+33Dh] jmp loc_83B12 loc_83F7D: call ___stack_chk_fail
long long mi_search(long long a1, long long a2, long long a3, unsigned int a4, unsigned int a5, long long a6) { long long v7; // rbx char *keypage; // rax long long v11; // r9 char *v12; // r13 int v13; // eax unsigned int v14; // r14d int v16; // esi long long v17; // r8 char *v18; // rdx int v19; // eax __int16 v20; // r9 unsigned int v21; // r13d _DWORD *v22; // rax long long v23; // r14 char *v24; // r13 char *v25; // rax unsigned int v26; // r14d _BYTE *v27; // r15 char *v28; // r12 int v29; // eax unsigned int v30; // eax long long v31; // rdx long long v32; // rdi char *v33; // r13 char *v34; // rcx long long v35; // rdx char v36[8]; // [rsp+0h] [rbp-540h] BYREF char *v37; // [rsp+8h] [rbp-538h] BYREF long long v38; // [rsp+10h] [rbp-530h] unsigned long long v39; // [rsp+18h] [rbp-528h] char *v40; // [rsp+20h] [rbp-520h] char v41; // [rsp+2Bh] [rbp-515h] BYREF int v42; // [rsp+2Ch] [rbp-514h] char *v43; // [rsp+30h] [rbp-510h] BYREF long long v44; // [rsp+38h] [rbp-508h] unsigned int v45; // [rsp+44h] [rbp-4FCh] unsigned int v46; // [rsp+48h] [rbp-4F8h] unsigned int v47; // [rsp+4Ch] [rbp-4F4h] _BYTE v48[1216]; // [rsp+50h] [rbp-4F0h] BYREF unsigned long long v49; // [rsp+510h] [rbp-30h] v7 = a1; v49 = __readfsqword(0x28u); if ( a6 == -1 ) { *(_DWORD *)my_thread_var(a1) = 120; *(_QWORD *)(a1 + 368) = -1LL; return (a5 & 0x118) == 0 ? -1 : 1; } v38 = a3; v46 = a4; keypage = mi_fetch_keypage((_QWORD *)a1, a2, a6); if ( !keypage ) goto LABEL_5; v11 = a5; v12 = keypage; v47 = v11; v13 = (*(long long ( **)(long long, long long, char *, long long, _QWORD, long long, char **, _BYTE *, char *))(a2 + 64))( a1, a2, keypage, v38, v46, v11, &v43, v48, &v41); if ( v13 == 0x7FFFFFFF ) { LABEL_4: *(_DWORD *)my_thread_var(a1) = 126; LABEL_5: *(_QWORD *)(v7 + 368) = -1LL; *(_BYTE *)(v7 + 828) = 1; return (unsigned int)-1; } v16 = v13; v17 = 0LL; v18 = v12; if ( *v12 < 0 ) v17 = *(unsigned int *)(*(_QWORD *)a1 + 380LL); v39 = (unsigned long long)&v12[((unsigned __int8)v12[1] | (unsigned long long)((unsigned __int8)(*v12 & 0x7F) << 8)) - 1]; v44 = a2; v45 = v17; if ( !v13 ) { v20 = v47; if ( ((unsigned __int8)v47 & ((_DWORD)v17 != 0)) == 1 && (v46 != 2416 || (*(_WORD *)(v44 + 10) & 0x11) != 1) ) { v42 = 0; v40 = v12; v21 = v17; mi_kpos((unsigned int)v17, v43); v14 = mi_search(a1, v44, v38, v46, 1LL); if ( (v14 & 0x80000000) != 0 ) { v22 = (_DWORD *)my_thread_var(a1); v18 = v40; v20 = v47; v16 = v42; if ( *v22 == 120 ) { v17 = v21; *(_QWORD *)(a1 + 400) = -1LL; goto LABEL_25; } } return v14; } LABEL_25: if ( *(_QWORD *)(a1 + 400) == a6 ) { v23 = v44; } else { v42 = v16; v23 = v44; v24 = v18; v25 = mi_fetch_keypage((_QWORD *)a1, v44, a6); if ( !v25 ) goto LABEL_5; v43 = &v25[v43 - v24]; v39 = (unsigned long long)&v25[v39 - (_QWORD)v24]; v18 = v25; v17 = v45; v20 = v47; v16 = v42; } v40 = v18; if ( (v20 & 0x110) != 0 && v16 ) { v26 = 0; if ( *v18 < 0 ) v26 = *(_DWORD *)(*(_QWORD *)a1 + 380LL); v27 = *(_BYTE **)(a1 + 264); v28 = v43; if ( (*(_BYTE *)(v44 + 10) & 0x28) != 0 ) { v37 = &v18[v26 + 2]; *v27 = 0; while ( v37 < v28 ) { v29 = (*(long long ( **)(long long, _QWORD, char **, _BYTE *, long long))(v44 + 72))( v44, v26, &v37, v27, v17); *(_DWORD *)(a1 + 472) = v29; if ( !v29 ) { a1 = 126LL; mi_report_error(126, *(_QWORD *)(*(_QWORD *)v7 + 616LL)); goto LABEL_4; } } } else { v31 = *(unsigned __int16 *)(v44 + 18); *(_DWORD *)(a1 + 472) = v31; memmove(v27, &v28[-v31 - v26], v31); } if ( (v47 & 0x10) == 0 ) { v32 = *(_QWORD *)(v44 + 40); if ( (unsigned int)ha_key_cmp(v32, *(_QWORD *)(v7 + 264), v38, v46, 1LL, v36) ) { *(_DWORD *)my_thread_var(v32) = 120; goto LABEL_5; } } } else { v30 = (*(long long ( **)(long long, _QWORD, char **, _BYTE *))(v23 + 72))(v23, (unsigned int)v17, &v43, v48); *(_DWORD *)(a1 + 472) = v30; if ( !v30 ) goto LABEL_5; memcpy(*(_QWORD *)(a1 + 264), v48, v30); } v14 = 0; *(_QWORD *)(v7 + 368) = mi_dpos(v7, 0LL, *(_QWORD *)(v7 + 264) + *(unsigned int *)(v7 + 472)); v33 = v40; v34 = *(char **)(v7 + 256); v35 = *(_QWORD *)(v7 + 400); *(_QWORD *)(v7 + 296) = &v34[v43 - v40]; *(_QWORD *)(v7 + 304) = &v34[v39 - (_QWORD)v33]; *(_DWORD *)(v7 + 312) = v45; *(_DWORD *)(v7 + 316) = *(_DWORD *)(v44 + 28); *(_QWORD *)(v7 + 408) = v35; *(_BYTE *)(v7 + 828) = 0; *(_BYTE *)(v7 + 829) = v34 != v33; return v14; } v40 = v12; mi_kpos((unsigned int)v17, v43); v19 = mi_search(a1, a2, v38, v46, v47); if ( v19 <= 0 ) return (unsigned int)v19; if ( v16 <= 0 ) { v20 = v47; v18 = v40; v17 = v45; if ( (v47 & 8) != 0 ) { v14 = 1; if ( (unsigned long long)v43 >= v39 ) return v14; } goto LABEL_25; } v20 = v47; v18 = v40; v17 = v45; if ( (v47 & 0x110) == 0 ) goto LABEL_25; v14 = 1; if ( v43 != &v40[v45 + 2] ) goto LABEL_25; return v14; }
_mi_search: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x518 MOV R13D,R8D MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX CMP R9,-0x1 JZ 0x00183ae7 MOV R12,R9 MOV R14,RSI MOV qword ptr [RBP + -0x530],RDX MOV dword ptr [RBP + -0x4f8],ECX MOV R8,qword ptr [RBX + 0x100] XOR R15D,R15D TEST R13B,0x20 SETZ R15B MOV RDI,RBX MOV RDX,R9 MOV ECX,0x3 MOV R9D,R15D CALL 0x00183608 TEST RAX,RAX JZ 0x00183acd MOV R9D,R13D MOV R13,RAX SUB RSP,0x8 LEA RAX,[RBP + -0x515] LEA R10,[RBP + -0x4f0] LEA R11,[RBP + -0x510] MOV RDI,RBX MOV RSI,R14 MOV RDX,R13 MOV RCX,qword ptr [RBP + -0x530] MOV R8D,dword ptr [RBP + -0x4f8] MOV dword ptr [RBP + -0x4f4],R9D PUSH RAX PUSH R10 PUSH R11 CALL qword ptr [R14 + 0x40] ADD RSP,0x20 CMP EAX,0x7fffffff JNZ 0x00183b3a LAB_00183ac2: CALL 0x001a13e6 MOV dword ptr [RAX],0x7e LAB_00183acd: MOV qword ptr [RBX + 0x170],-0x1 MOV byte ptr [RBX + 0x33c],0x1 MOV R14D,0xffffffff JMP 0x00183b12 LAB_00183ae7: CALL 0x001a13e6 MOV dword ptr [RAX],0x78 MOV qword ptr [RBX + 0x170],-0x1 AND R13D,0x118 XOR R14D,R14D CMP R13D,0x1 SBB R14D,R14D OR R14D,0x1 LAB_00183b12: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00183f7d MOV EAX,R14D ADD RSP,0x518 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00183b3a: MOV ESI,EAX MOVZX EAX,byte ptr [R13] XOR R8D,R8D TEST AL,AL MOV RDX,R13 JNS 0x00183b55 MOV RCX,qword ptr [RBX] MOV R8D,dword ptr [RCX + 0x17c] LAB_00183b55: MOVZX ECX,byte ptr [RDX + 0x1] AND EAX,0x7f SHL EAX,0x8 OR RAX,RCX ADD RAX,RDX DEC RAX MOV qword ptr [RBP + -0x528],RAX TEST ESI,ESI MOV qword ptr [RBP + -0x508],R14 MOV dword ptr [RBP + -0x4fc],R8D JZ 0x00183c1b MOV R13D,ESI MOV qword ptr [RBP + -0x520],RDX MOV RSI,qword ptr [RBP + -0x510] MOV EDI,R8D CALL 0x00183f82 MOV RDI,RBX MOV RSI,R14 MOV RDX,qword ptr [RBP + -0x530] MOV ECX,dword ptr [RBP + -0x4f8] MOV R8D,dword ptr [RBP + -0x4f4] MOV R9,RAX CALL 0x00183a03 TEST EAX,EAX JLE 0x00183cd8 MOV RAX,qword ptr [RBP + -0x510] MOV ESI,R13D TEST R13D,R13D JLE 0x00183ce0 MOV R9D,dword ptr [RBP + -0x4f4] TEST R9D,0x110 MOV RDX,qword ptr [RBP + -0x520] MOV R8D,dword ptr [RBP + -0x4fc] JZ 0x00183d0e MOV ECX,R8D ADD RCX,RDX ADD RCX,0x2 MOV R14D,0x1 CMP RAX,RCX JZ 0x00183b12 JMP 0x00183d0e LAB_00183c1b: TEST R8D,R8D SETNZ AL MOV R9D,dword ptr [RBP + -0x4f4] AND AL,R9B CMP AL,0x1 JNZ 0x00183d0e CMP dword ptr [RBP + -0x4f8],0x970 JNZ 0x00183c57 MOV RAX,qword ptr [RBP + -0x508] MOVZX EAX,word ptr [RAX + 0xa] AND EAX,0x11 CMP AX,0x1 JZ 0x00183d0e LAB_00183c57: MOV dword ptr [RBP + -0x514],ESI MOV qword ptr [RBP + -0x520],RDX MOV RSI,qword ptr [RBP + -0x510] MOV EDI,R8D MOV R13D,R8D CALL 0x00183f82 MOV RDI,RBX MOV RSI,qword ptr [RBP + -0x508] MOV RDX,qword ptr [RBP + -0x530] MOV ECX,dword ptr [RBP + -0x4f8] MOV R8D,0x1 MOV R9,RAX CALL 0x00183a03 MOV R14D,EAX TEST EAX,EAX JNS 0x00183b12 CALL 0x001a13e6 CMP dword ptr [RAX],0x78 MOV RDX,qword ptr [RBP + -0x520] MOV R9D,dword ptr [RBP + -0x4f4] MOV ESI,dword ptr [RBP + -0x514] JNZ 0x00183b12 MOV R8D,R13D MOV qword ptr [RBX + 0x190],-0x1 JMP 0x00183d0e LAB_00183cd8: MOV R14D,EAX JMP 0x00183b12 LAB_00183ce0: MOV R9D,dword ptr [RBP + -0x4f4] TEST R9B,0x8 MOV RDX,qword ptr [RBP + -0x520] MOV R8D,dword ptr [RBP + -0x4fc] JZ 0x00183d0e MOV R14D,0x1 CMP RAX,qword ptr [RBP + -0x528] JNC 0x00183b12 LAB_00183d0e: CMP qword ptr [RBX + 0x190],R12 JNZ 0x00183d20 MOV R14,qword ptr [RBP + -0x508] JMP 0x00183d95 LAB_00183d20: MOV dword ptr [RBP + -0x514],ESI MOV R8,qword ptr [RBX + 0x100] MOV RDI,RBX MOV R14,qword ptr [RBP + -0x508] MOV RSI,R14 MOV R13,RDX MOV RDX,R12 MOV ECX,0x3 MOV R9D,R15D CALL 0x00183608 TEST RAX,RAX JZ 0x00183acd MOV RCX,qword ptr [RBP + -0x510] SUB RCX,R13 ADD RCX,RAX MOV qword ptr [RBP + -0x510],RCX MOV RCX,qword ptr [RBP + -0x528] SUB RCX,R13 ADD RCX,RAX MOV qword ptr [RBP + -0x528],RCX MOV RDX,RAX MOV R8D,dword ptr [RBP + -0x4fc] MOV R9D,dword ptr [RBP + -0x4f4] MOV ESI,dword ptr [RBP + -0x514] LAB_00183d95: TEST R9D,0x110 MOV qword ptr [RBP + -0x520],RDX JZ 0x00183e3d TEST ESI,ESI JZ 0x00183e3d XOR R14D,R14D CMP byte ptr [RDX],0x0 JNS 0x00183dc3 MOV RAX,qword ptr [RBX] MOV R14D,dword ptr [RAX + 0x17c] LAB_00183dc3: MOV R15,qword ptr [RBX + 0x108] MOV R12,qword ptr [RBP + -0x510] MOV RAX,qword ptr [RBP + -0x508] TEST byte ptr [RAX + 0xa],0x28 JZ 0x00183e7a LEA EAX,[R14 + 0x2] ADD RAX,RDX LEA RCX,[RBP + -0x538] MOV R13,RCX MOV qword ptr [RCX],RAX MOV byte ptr [R15],0x0 LAB_00183dfa: CMP qword ptr [RBP + -0x538],R12 JNC 0x00183e98 MOV RDI,qword ptr [RBP + -0x508] MOV ESI,R14D MOV RDX,R13 MOV RCX,R15 CALL qword ptr [RDI + 0x48] MOV dword ptr [RBX + 0x1d8],EAX TEST EAX,EAX JNZ 0x00183dfa MOV RAX,qword ptr [RBX] MOV RSI,qword ptr [RAX + 0x268] MOV EDI,0x7e CALL 0x0017a87e JMP 0x00183ac2 LAB_00183e3d: LEA RDX,[RBP + -0x510] LEA RCX,[RBP + -0x4f0] MOV RDI,R14 MOV ESI,R8D CALL qword ptr [R14 + 0x48] MOV dword ptr [RBX + 0x1d8],EAX TEST EAX,EAX JZ 0x00183acd MOV RDI,qword ptr [RBX + 0x108] MOV EDX,EAX LEA RSI,[RBP + -0x4f0] CALL 0x00129090 JMP 0x00183ee6 LAB_00183e7a: MOVZX EDX,word ptr [RAX + 0x12] MOV dword ptr [RBX + 0x1d8],EDX SUB R12,RDX MOV EAX,R14D SUB R12,RAX MOV RDI,R15 MOV RSI,R12 CALL 0x00129120 LAB_00183e98: TEST byte ptr [RBP + -0x4f4],0x10 JNZ 0x00183ee6 MOV RAX,qword ptr [RBP + -0x508] MOV RDI,qword ptr [RAX + 0x28] MOV RSI,qword ptr [RBX + 0x108] LEA R9,[RBP + -0x540] MOV RDX,qword ptr [RBP + -0x530] MOV ECX,dword ptr [RBP + -0x4f8] MOV R8D,0x1 CALL 0x0019e152 TEST EAX,EAX JZ 0x00183ee6 CALL 0x001a13e6 MOV dword ptr [RAX],0x78 JMP 0x00183acd LAB_00183ee6: MOV EDX,dword ptr [RBX + 0x1d8] ADD RDX,qword ptr [RBX + 0x108] XOR R14D,R14D MOV RDI,RBX XOR ESI,ESI CALL 0x00184061 MOV qword ptr [RBX + 0x170],RAX MOV RAX,qword ptr [RBP + -0x510] MOV R13,qword ptr [RBP + -0x520] SUB RAX,R13 MOV RCX,qword ptr [RBX + 0x100] MOV RDX,qword ptr [RBX + 0x190] ADD RAX,RCX MOV qword ptr [RBX + 0x128],RAX MOV RAX,qword ptr [RBP + -0x528] SUB RAX,R13 ADD RAX,RCX MOV qword ptr [RBX + 0x130],RAX MOV EAX,dword ptr [RBP + -0x4fc] MOV dword ptr [RBX + 0x138],EAX MOV RAX,qword ptr [RBP + -0x508] MOV EAX,dword ptr [RAX + 0x1c] MOV dword ptr [RBX + 0x13c],EAX MOV qword ptr [RBX + 0x198],RDX MOV byte ptr [RBX + 0x33c],0x0 CMP RCX,R13 SETNZ byte ptr [RBX + 0x33d] JMP 0x00183b12 LAB_00183f7d: CALL 0x00129260
uint _mi_search(long *param_1,long param_2,int8 param_3,int param_4,uint param_5,long param_6) { ushort uVar1; int1 *__dest; int iVar2; uint uVar3; byte *pbVar4; int4 *puVar5; int8 uVar6; int *piVar7; byte *pbVar8; long lVar9; ulong uVar10; long in_FS_OFFSET; bool bVar11; int1 local_548 [8]; byte *local_540; int8 local_538; byte *local_530; byte *local_528; int1 local_51d; int local_51c; byte *local_518; long local_510; uint local_504; int local_500; uint local_4fc; int1 local_4f8 [1216]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); if (param_6 == -1) { puVar5 = (int4 *)_my_thread_var(); *puVar5 = 0x78; param_1[0x2e] = -1; uVar3 = -(uint)((param_5 & 0x118) == 0) | 1; goto LAB_00183b12; } bVar11 = (param_5 & 0x20) == 0; local_538 = param_3; local_500 = param_4; pbVar4 = (byte *)_mi_fetch_keypage(param_1,param_2,param_6,3,param_1[0x20],bVar11); if (pbVar4 != (byte *)0x0) { local_4fc = param_5; iVar2 = (**(code **)(param_2 + 0x40)) (param_1,param_2,pbVar4,local_538,local_500,param_5,&local_518,local_4f8, &local_51d); if (iVar2 == 0x7fffffff) { LAB_00183ac2: puVar5 = (int4 *)_my_thread_var(); *puVar5 = 0x7e; } else { uVar10 = 0; if ((char)*pbVar4 < '\0') { uVar10 = (ulong)*(uint *)(*param_1 + 0x17c); } local_530 = pbVar4 + (((ulong)((*pbVar4 & 0x7f) << 8) | (ulong)pbVar4[1]) - 1); local_504 = (uint)uVar10; local_510 = param_2; if (iVar2 == 0) { if (((local_504 != 0 & (byte)local_4fc) == 1) && ((local_500 != 0x970 || ((*(ushort *)(param_2 + 10) & 0x11) != 1)))) { local_528 = pbVar4; local_51c = iVar2; uVar6 = _mi_kpos(uVar10,local_518); uVar3 = _mi_search(param_1,local_510,local_538,local_500,1,uVar6); if ((-1 < (int)uVar3) || (piVar7 = (int *)_my_thread_var(), *piVar7 != 0x78)) goto LAB_00183b12; param_1[0x32] = -1; pbVar4 = local_528; iVar2 = local_51c; } } else { local_528 = pbVar4; uVar6 = _mi_kpos(uVar10,local_518); uVar3 = _mi_search(param_1,param_2,local_538,local_500,local_4fc,uVar6); if ((int)uVar3 < 1) goto LAB_00183b12; pbVar4 = local_528; if (iVar2 < 1) { uVar10 = (ulong)local_504; if (((local_4fc & 8) != 0) && (uVar3 = 1, local_530 <= local_518)) goto LAB_00183b12; } else { uVar10 = (ulong)local_504; if (((local_4fc & 0x110) != 0) && (uVar3 = 1, local_518 == local_528 + uVar10 + 2)) goto LAB_00183b12; } } lVar9 = local_510; if (param_1[0x32] != param_6) { local_51c = iVar2; pbVar8 = (byte *)_mi_fetch_keypage(param_1,local_510,param_6,3,param_1[0x20],bVar11); if (pbVar8 == (byte *)0x0) goto LAB_00183acd; local_518 = pbVar8 + ((long)local_518 - (long)pbVar4); local_530 = pbVar8 + ((long)local_530 - (long)pbVar4); uVar10 = (ulong)local_504; pbVar4 = pbVar8; iVar2 = local_51c; } pbVar8 = local_518; local_528 = pbVar4; if (((local_4fc & 0x110) == 0) || (iVar2 == 0)) { uVar3 = (**(code **)(lVar9 + 0x48))(lVar9,uVar10,&local_518,local_4f8); *(uint *)(param_1 + 0x3b) = uVar3; if (uVar3 != 0) { memcpy((void *)param_1[0x21],local_4f8,(ulong)uVar3); LAB_00183ee6: uVar3 = 0; lVar9 = _mi_dpos(param_1,0,(ulong)*(uint *)(param_1 + 0x3b) + param_1[0x21]); param_1[0x2e] = lVar9; pbVar4 = (byte *)param_1[0x20]; param_1[0x25] = (long)(pbVar4 + ((long)local_518 - (long)local_528)); param_1[0x26] = (long)(pbVar4 + ((long)local_530 - (long)local_528)); *(uint *)(param_1 + 0x27) = local_504; *(int4 *)((long)param_1 + 0x13c) = *(int4 *)(local_510 + 0x1c); param_1[0x33] = param_1[0x32]; *(int1 *)((long)param_1 + 0x33c) = 0; *(bool *)((long)param_1 + 0x33d) = pbVar4 != local_528; goto LAB_00183b12; } } else { uVar10 = 0; if ((char)*pbVar4 < '\0') { uVar10 = (ulong)*(uint *)(*param_1 + 0x17c); } __dest = (int1 *)param_1[0x21]; if ((*(byte *)(local_510 + 10) & 0x28) != 0) { local_540 = pbVar4 + ((int)uVar10 + 2); *__dest = 0; do { if (pbVar8 <= local_540) goto LAB_00183e98; iVar2 = (**(code **)(local_510 + 0x48))(local_510,uVar10,&local_540,__dest); *(int *)(param_1 + 0x3b) = iVar2; } while (iVar2 != 0); mi_report_error(0x7e,*(int8 *)(*param_1 + 0x268)); goto LAB_00183ac2; } uVar1 = *(ushort *)(local_510 + 0x12); *(uint *)(param_1 + 0x3b) = (uint)uVar1; memmove(__dest,local_518 + (-uVar10 - (ulong)uVar1),(ulong)uVar1); LAB_00183e98: if (((local_4fc & 0x10) != 0) || (iVar2 = ha_key_cmp(*(int8 *)(local_510 + 0x28),param_1[0x21],local_538,local_500,1 ,local_548), iVar2 == 0)) goto LAB_00183ee6; puVar5 = (int4 *)_my_thread_var(); *puVar5 = 0x78; } } } LAB_00183acd: param_1[0x2e] = -1; *(int1 *)((long)param_1 + 0x33c) = 1; uVar3 = 0xffffffff; LAB_00183b12: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar3; }
23,510
rlp_add_child
corpus-core[P]colibri-stateless/src/chains/eth/verifier/patricia_trie.c
static void rlp_add_child(buffer_t* buf, node_t* node) { if (!node) rlp_add_item(buf, NULL_BYTES); else if (node->hash_len == 32) rlp_add_item(buf, bytes(node->hash, 32)); else { bytes_t decoded = {0}; bytes_t data = bytes(node->hash, node->hash_len); rlp_decode(&data, 0, &decoded); rlp_add_list(buf, decoded); } }
O0
c
rlp_add_child: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) jne 0x152f8 movq -0x8(%rbp), %rdi movl $0x0, -0x20(%rbp) movq $0x0, -0x18(%rbp) movl -0x20(%rbp), %esi movq -0x18(%rbp), %rdx callq 0x16350 jmp 0x15366 movq -0x10(%rbp), %rax cmpl $0x20, 0x20(%rax) jne 0x15323 movq -0x8(%rbp), %rdi movl $0x20, -0x30(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) movl -0x30(%rbp), %esi movq -0x28(%rbp), %rdx callq 0x16350 jmp 0x15364 leaq -0x40(%rbp), %rdi xorl %esi, %esi movl $0x10, %edx callq 0x5110 movq -0x10(%rbp), %rax movl 0x20(%rax), %eax movl %eax, -0x50(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x48(%rbp) leaq -0x50(%rbp), %rdi xorl %esi, %esi leaq -0x40(%rbp), %rdx callq 0x15f10 movq -0x8(%rbp), %rdi movl -0x40(%rbp), %esi movq -0x38(%rbp), %rdx callq 0x164e0 jmp 0x15366 addq $0x50, %rsp popq %rbp retq nopl (%rax)
rlp_add_child: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi cmp [rbp+var_10], 0 jnz short loc_152F8 mov rdi, [rbp+var_8] mov [rbp+var_20], 0 mov [rbp+var_18], 0 mov esi, [rbp+var_20] mov rdx, [rbp+var_18] call rlp_add_item jmp short loc_15366 loc_152F8: mov rax, [rbp+var_10] cmp dword ptr [rax+20h], 20h ; ' ' jnz short loc_15323 mov rdi, [rbp+var_8] mov [rbp+var_30], 20h ; ' ' mov rax, [rbp+var_10] mov [rbp+var_28], rax mov esi, [rbp+var_30] mov rdx, [rbp+var_28] call rlp_add_item jmp short loc_15364 loc_15323: lea rdi, [rbp+var_40] xor esi, esi mov edx, 10h call _memset mov rax, [rbp+var_10] mov eax, [rax+20h] mov [rbp+var_50], eax mov rax, [rbp+var_10] mov [rbp+var_48], rax lea rdi, [rbp+var_50] xor esi, esi lea rdx, [rbp+var_40] call rlp_decode mov rdi, [rbp+var_8] mov esi, [rbp+var_40] mov rdx, [rbp+var_38] call rlp_add_list loc_15364: jmp short $+2 loc_15366: add rsp, 50h pop rbp retn
long long rlp_add_child(long long a1, long long a2) { int v3; // [rsp+0h] [rbp-50h] BYREF long long v4; // [rsp+8h] [rbp-48h] unsigned int v5; // [rsp+10h] [rbp-40h] BYREF long long v6; // [rsp+18h] [rbp-38h] int v7; // [rsp+20h] [rbp-30h] long long v8; // [rsp+28h] [rbp-28h] int v9; // [rsp+30h] [rbp-20h] long long v10; // [rsp+38h] [rbp-18h] long long v11; // [rsp+40h] [rbp-10h] long long v12; // [rsp+48h] [rbp-8h] v12 = a1; v11 = a2; if ( a2 ) { if ( *(_DWORD *)(v11 + 32) == 32 ) { v7 = 32; v8 = v11; return rlp_add_item(v12, 32LL, v11); } else { memset(&v5, 0LL, 16LL); v3 = *(_DWORD *)(v11 + 32); v4 = v11; rlp_decode(&v3, 0LL); return rlp_add_list(v12, v5, v6); } } else { v9 = 0; v10 = 0LL; return rlp_add_item(v12, 0LL, 0LL); } }
rlp_add_child: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI CMP qword ptr [RBP + -0x10],0x0 JNZ 0x001152f8 MOV RDI,qword ptr [RBP + -0x8] MOV dword ptr [RBP + -0x20],0x0 MOV qword ptr [RBP + -0x18],0x0 MOV ESI,dword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x18] CALL 0x00116350 JMP 0x00115366 LAB_001152f8: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x20],0x20 JNZ 0x00115323 MOV RDI,qword ptr [RBP + -0x8] MOV dword ptr [RBP + -0x30],0x20 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x28],RAX MOV ESI,dword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x28] CALL 0x00116350 JMP 0x00115364 LAB_00115323: LEA RDI,[RBP + -0x40] XOR ESI,ESI MOV EDX,0x10 CALL 0x00105110 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x20] MOV dword ptr [RBP + -0x50],EAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x48],RAX LEA RDI,[RBP + -0x50] XOR ESI,ESI LEA RDX,[RBP + -0x40] CALL 0x00115f10 MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x38] CALL 0x001164e0 LAB_00115364: JMP 0x00115366 LAB_00115366: ADD RSP,0x50 POP RBP RET
void rlp_add_child(int8 param_1,long param_2) { int4 local_58 [2]; long local_50; int4 local_48 [2]; int8 local_40; int4 local_38; long local_30; int4 local_28; int8 local_20; long local_18; int8 local_10; local_18 = param_2; local_10 = param_1; if (param_2 == 0) { local_28 = 0; local_20 = 0; rlp_add_item(param_1,0,0); } else if (*(int *)(param_2 + 0x20) == 0x20) { local_38 = 0x20; local_30 = param_2; rlp_add_item(param_1,0x20,param_2); } else { memset(local_48,0,0x10); local_58[0] = *(int4 *)(local_18 + 0x20); local_50 = local_18; rlp_decode(local_58,0,local_48); rlp_add_list(local_10,local_48[0],local_40); } return; }
23,511
rlp_add_child
corpus-core[P]colibri-stateless/src/chains/eth/verifier/patricia_trie.c
static void rlp_add_child(buffer_t* buf, node_t* node) { if (!node) rlp_add_item(buf, NULL_BYTES); else if (node->hash_len == 32) rlp_add_item(buf, bytes(node->hash, 32)); else { bytes_t decoded = {0}; bytes_t data = bytes(node->hash, node->hash_len); rlp_decode(&data, 0, &decoded); rlp_add_list(buf, decoded); } }
O1
c
rlp_add_child: pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx testq %rsi, %rsi je 0x10958 movq %rsi, %rdx movl 0x20(%rsi), %eax cmpl $0x20, %eax jne 0x1096b movq %rbx, %rdi movl $0x20, %esi jmp 0x1095f movq %rbx, %rdi xorl %esi, %esi xorl %edx, %edx addq $0x28, %rsp popq %rbx popq %r14 jmp 0x11188 xorps %xmm0, %xmm0 movq %rsp, %r14 movaps %xmm0, (%r14) leaq 0x18(%rsp), %rdi movl %eax, (%rdi) movq %rdx, 0x8(%rdi) xorl %esi, %esi movq %r14, %rdx callq 0x10ef0 movl (%r14), %esi movq 0x8(%r14), %rdx movq %rbx, %rdi callq 0x11298 addq $0x28, %rsp popq %rbx popq %r14 retq nopl (%rax)
rlp_add_child: push r14 push rbx sub rsp, 28h mov rbx, rdi test rsi, rsi jz short loc_10958 mov rdx, rsi mov eax, [rsi+20h] cmp eax, 20h ; ' ' jnz short loc_1096B mov rdi, rbx mov esi, 20h ; ' ' jmp short loc_1095F loc_10958: mov rdi, rbx xor esi, esi xor edx, edx loc_1095F: add rsp, 28h pop rbx pop r14 jmp rlp_add_item loc_1096B: xorps xmm0, xmm0 mov r14, rsp movaps xmmword ptr [r14], xmm0 lea rdi, [rsp+38h+var_20] mov [rdi], eax mov [rdi+8], rdx xor esi, esi mov rdx, r14 call rlp_decode mov esi, [r14] mov rdx, [r14+8] mov rdi, rbx call rlp_add_list add rsp, 28h pop rbx pop r14 retn
long long rlp_add_child(long long a1, long long a2) { int v2; // eax long long v3; // rsi __int128 v5; // [rsp+0h] [rbp-38h] BYREF int v6; // [rsp+18h] [rbp-20h] BYREF long long v7; // [rsp+20h] [rbp-18h] if ( !a2 ) { v3 = 0LL; return rlp_add_item(a1, v3); } v2 = *(_DWORD *)(a2 + 32); if ( v2 == 32 ) { v3 = 32LL; return rlp_add_item(a1, v3); } v5 = 0LL; v6 = v2; v7 = a2; rlp_decode(&v6, 0LL, &v5); return rlp_add_list(a1, (unsigned int)v5, *((_QWORD *)&v5 + 1)); }
rlp_add_child: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RDI TEST RSI,RSI JZ 0x00110958 MOV RDX,RSI MOV EAX,dword ptr [RSI + 0x20] CMP EAX,0x20 JNZ 0x0011096b MOV RDI,RBX MOV ESI,0x20 JMP 0x0011095f LAB_00110958: MOV RDI,RBX XOR ESI,ESI XOR EDX,EDX LAB_0011095f: ADD RSP,0x28 POP RBX POP R14 JMP 0x00111188 LAB_0011096b: XORPS XMM0,XMM0 MOV R14,RSP MOVAPS xmmword ptr [R14],XMM0 LEA RDI,[RSP + 0x18] MOV dword ptr [RDI],EAX MOV qword ptr [RDI + 0x8],RDX XOR ESI,ESI MOV RDX,R14 CALL 0x00110ef0 MOV ESI,dword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] MOV RDI,RBX CALL 0x00111298 ADD RSP,0x28 POP RBX POP R14 RET
void rlp_add_child(int8 param_1,long param_2) { int8 uVar1; ulong local_38; int8 uStack_30; int local_20 [2]; long local_18; if (param_2 == 0) { uVar1 = 0; param_2 = 0; } else { local_20[0] = *(int *)(param_2 + 0x20); if (local_20[0] != 0x20) { local_38 = 0; uStack_30 = 0; local_18 = param_2; rlp_decode(local_20,0,&local_38); rlp_add_list(param_1,local_38 & 0xffffffff,uStack_30); return; } uVar1 = 0x20; } rlp_add_item(param_1,uVar1,param_2); return; }
23,512
rlp_add_child
corpus-core[P]colibri-stateless/src/chains/eth/verifier/patricia_trie.c
static void rlp_add_child(buffer_t* buf, node_t* node) { if (!node) rlp_add_item(buf, NULL_BYTES); else if (node->hash_len == 32) rlp_add_item(buf, bytes(node->hash, 32)); else { bytes_t decoded = {0}; bytes_t data = bytes(node->hash, node->hash_len); rlp_decode(&data, 0, &decoded); rlp_add_list(buf, decoded); } }
O3
c
rlp_add_child: pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx testq %rsi, %rsi je 0x10687 movq %rsi, %rdx movl 0x20(%rsi), %eax cmpl $0x20, %eax jne 0x1069a movq %rbx, %rdi movl $0x20, %esi jmp 0x1068e movq %rbx, %rdi xorl %esi, %esi xorl %edx, %edx addq $0x28, %rsp popq %rbx popq %r14 jmp 0x10ebd xorps %xmm0, %xmm0 movq %rsp, %r14 movaps %xmm0, (%r14) leaq 0x18(%rsp), %rdi movl %eax, (%rdi) movq %rdx, 0x8(%rdi) xorl %esi, %esi movq %r14, %rdx callq 0x10c40 movl (%r14), %esi movq 0x8(%r14), %rdx movq %rbx, %rdi callq 0x10fcf addq $0x28, %rsp popq %rbx popq %r14 retq
rlp_add_child: push r14 push rbx sub rsp, 28h mov rbx, rdi test rsi, rsi jz short loc_10687 mov rdx, rsi mov eax, [rsi+20h] cmp eax, 20h ; ' ' jnz short loc_1069A mov rdi, rbx mov esi, 20h ; ' ' jmp short loc_1068E loc_10687: mov rdi, rbx xor esi, esi xor edx, edx loc_1068E: add rsp, 28h pop rbx pop r14 jmp rlp_add_item loc_1069A: xorps xmm0, xmm0 mov r14, rsp movaps xmmword ptr [r14], xmm0 lea rdi, [rsp+38h+var_20] mov [rdi], eax mov [rdi+8], rdx xor esi, esi mov rdx, r14 call rlp_decode mov esi, [r14] mov rdx, [r14+8] mov rdi, rbx call rlp_add_list add rsp, 28h pop rbx pop r14 retn
long long rlp_add_child(long long a1, long long a2) { int v2; // eax long long v3; // rsi __int128 v5; // [rsp+0h] [rbp-38h] BYREF int v6; // [rsp+18h] [rbp-20h] BYREF long long v7; // [rsp+20h] [rbp-18h] if ( !a2 ) { v3 = 0LL; return rlp_add_item(a1, v3); } v2 = *(_DWORD *)(a2 + 32); if ( v2 == 32 ) { v3 = 32LL; return rlp_add_item(a1, v3); } v5 = 0LL; v6 = v2; v7 = a2; rlp_decode(&v6, 0LL, &v5); return rlp_add_list(a1, (unsigned int)v5, *((_QWORD *)&v5 + 1)); }
rlp_add_child: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RDI TEST RSI,RSI JZ 0x00110687 MOV RDX,RSI MOV EAX,dword ptr [RSI + 0x20] CMP EAX,0x20 JNZ 0x0011069a MOV RDI,RBX MOV ESI,0x20 JMP 0x0011068e LAB_00110687: MOV RDI,RBX XOR ESI,ESI XOR EDX,EDX LAB_0011068e: ADD RSP,0x28 POP RBX POP R14 JMP 0x00110ebd LAB_0011069a: XORPS XMM0,XMM0 MOV R14,RSP MOVAPS xmmword ptr [R14],XMM0 LEA RDI,[RSP + 0x18] MOV dword ptr [RDI],EAX MOV qword ptr [RDI + 0x8],RDX XOR ESI,ESI MOV RDX,R14 CALL 0x00110c40 MOV ESI,dword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] MOV RDI,RBX CALL 0x00110fcf ADD RSP,0x28 POP RBX POP R14 RET
void rlp_add_child(int8 param_1,long param_2) { int8 uVar1; ulong local_38; int8 uStack_30; int local_20 [2]; long local_18; if (param_2 == 0) { uVar1 = 0; param_2 = 0; } else { local_20[0] = *(int *)(param_2 + 0x20); if (local_20[0] != 0x20) { local_38 = 0; uStack_30 = 0; local_18 = param_2; rlp_decode(local_20,0,&local_38); rlp_add_list(param_1,local_38 & 0xffffffff,uStack_30); return; } uVar1 = 0x20; } rlp_add_item(param_1,uVar1,param_2); return; }
23,513
LefDefParser::defwBlockageMask(int)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp
int defwBlockageMask(int colorMask) { if (defVersionNum < 5.8) { return DEFW_WRONG_VERSION; } defwFunc = DEFW_BLOCKAGE_MASK; // Current function of writer if (!defwFile) return DEFW_UNINITIALIZED; // May be user already define layer if (defwState != DEFW_BLOCKAGE_PLACE && defwState != DEFW_BLOCKAGE_LAYER && defwState != DEFW_BLOCKAGE_RECT) return DEFW_BAD_DATA; if (defwState == DEFW_BLOCKAGE_RECT) fprintf(defwFile, "\n"); // set a newline for the previous rectangle fprintf(defwFile, " + MASK %d", colorMask); defwLines++; defwState = DEFW_BLOCKAGE_LAYER; return DEFW_OK; }
O3
cpp
LefDefParser::defwBlockageMask(int): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl $0x5, %ebp movsd 0x2285(%rip), %xmm0 # 0x14108 ucomisd 0xc235(%rip), %xmm0 # 0x1e0c0 ja 0x11f03 leaq 0xc2e4(%rip), %rax # 0x1e178 movl $0x65, (%rax) leaq 0xc2c7(%rip), %r15 # 0x1e168 movq (%r15), %rax testq %rax, %rax je 0x11efe leaq 0xc2c4(%rip), %r14 # 0x1e174 movl (%r14), %ecx leal -0x2f(%rcx), %edx movl $0x3, %ebp cmpl $-0x3, %edx jb 0x11f03 movl %edi, %ebx cmpl $0x2e, %ecx jne 0x11ed7 movl $0xa, %edi movq %rax, %rsi callq 0x10b0 movq (%r15), %rax leaq 0x4302(%rip), %rsi # 0x161e0 xorl %ebp, %ebp movq %rax, %rdi movl %ebx, %edx xorl %eax, %eax callq 0x10e0 leaq 0xc27d(%rip), %rax # 0x1e170 incl (%rax) movl $0x2c, (%r14) jmp 0x11f03 movl $0x1, %ebp movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
_ZN12LefDefParser16defwBlockageMaskEi: push rbp push r15 push r14 push rbx push rax mov ebp, 5 movsd xmm0, cs:qword_14108 ucomisd xmm0, cs:_ZN12LefDefParserL13defVersionNumE; LefDefParser::defVersionNum ja short loc_11F03 lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc mov dword ptr [rax], 65h ; 'e' lea r15, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile mov rax, [r15] test rax, rax jz short loc_11EFE lea r14, _ZN12LefDefParser9defwStateE; LefDefParser::defwState mov ecx, [r14] lea edx, [rcx-2Fh] mov ebp, 3 cmp edx, 0FFFFFFFDh jb short loc_11F03 mov ebx, edi cmp ecx, 2Eh ; '.' jnz short loc_11ED7 mov edi, 0Ah mov rsi, rax call _fputc mov rax, [r15] loc_11ED7: lea rsi, aMaskD_1; " + MASK %d" xor ebp, ebp mov rdi, rax mov edx, ebx xor eax, eax call _fprintf lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines inc dword ptr [rax] mov dword ptr [r14], 2Ch ; ',' jmp short loc_11F03 loc_11EFE: mov ebp, 1 loc_11F03: mov eax, ebp add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long LefDefParser::defwBlockageMask(LefDefParser *this) { unsigned int v1; // ebp long long v2; // rax v1 = 5; if ( *(double *)&LefDefParser::defVersionNum >= 5.8 ) { LefDefParser::defwFunc = 101; v2 = LefDefParser::defwFile; if ( LefDefParser::defwFile ) { v1 = 3; if ( (unsigned int)(LefDefParser::defwState - 47) >= 0xFFFFFFFD ) { if ( LefDefParser::defwState == 46 ) { fputc(10LL); v2 = LefDefParser::defwFile; } v1 = 0; fprintf(v2, " + MASK %d", (_DWORD)this); ++LefDefParser::defwLines; LefDefParser::defwState = 44; } } else { return 1; } } return v1; }
defwBlockageMask: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBP,0x5 MOVSD XMM0,qword ptr [0x00114108] UCOMISD XMM0,qword ptr [0x0011e0c0] JA 0x00111f03 LEA RAX,[0x11e178] MOV dword ptr [RAX],0x65 LEA R15,[0x11e168] MOV RAX,qword ptr [R15] TEST RAX,RAX JZ 0x00111efe LEA R14,[0x11e174] MOV ECX,dword ptr [R14] LEA EDX,[RCX + -0x2f] MOV EBP,0x3 CMP EDX,-0x3 JC 0x00111f03 MOV EBX,EDI CMP ECX,0x2e JNZ 0x00111ed7 MOV EDI,0xa MOV RSI,RAX CALL 0x001010b0 MOV RAX,qword ptr [R15] LAB_00111ed7: LEA RSI,[0x1161e0] XOR EBP,EBP MOV RDI,RAX MOV EDX,EBX XOR EAX,EAX CALL 0x001010e0 LEA RAX,[0x11e170] INC dword ptr [RAX] MOV dword ptr [R14],0x2c JMP 0x00111f03 LAB_00111efe: MOV EBP,0x1 LAB_00111f03: MOV EAX,EBP ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
/* LefDefParser::defwBlockageMask(int) */ int8 LefDefParser::defwBlockageMask(int param_1) { int8 uVar1; uVar1 = 5; if (DAT_00114108 <= defVersionNum) { defwFunc = 0x65; if (defwFile == (FILE *)0x0) { uVar1 = 1; } else { uVar1 = 3; if (0xfffffffc < defwState - 0x2fU) { if (defwState == 0x2e) { fputc(10,defwFile); } uVar1 = 0; fprintf(defwFile," + MASK %d",param_1); defwLines = defwLines + 1; defwState = 0x2c; } } } return uVar1; }
23,514
Binary_string::strstr(Binary_string const&, unsigned int)
eloqsql/sql/sql_string.h
inline uint32 length() const { return str_length;}
O3
c
Binary_string::strstr(Binary_string const&, unsigned int): movl 0x8(%rsi), %ecx movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpl %edx, %ecx ja 0x27519 cmpl %edx, 0x8(%rdi) jb 0x27519 testq %rcx, %rcx je 0x27517 pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx movq (%rdi), %r10 movl %edx, %r11d leaq -0x1(%r10,%r11), %rdi movq (%rsi), %r8 leaq (%r10,%rcx), %r9 addq $-0x2, %r9 movl $0x1, %esi subl %edx, %esi leaq (%r10,%r11), %rdx addq $-0x2, %rdx movl $0x1, %r10d subq %rcx, %r10 leaq (%rcx,%r8), %r11 addq $-0x2, %r11 cmpq %r9, %rdi je 0x27510 movb (%rdi), %bl cmpb -0x1(%r8,%rcx), %bl jne 0x27501 xorl %ebx, %ebx cmpq %rbx, %r10 je 0x2750c movb (%rdx,%rbx), %r14b leaq -0x1(%rbx), %r15 cmpb (%r11,%rbx), %r14b movq %r15, %rbx je 0x274eb decq %rdi incq %rsi decq %rdx jmp 0x274db subl %esi, %ebx movl %ebx, %eax popq %rbx popq %r14 popq %r15 popq %rbp retq movl %edx, %eax retq
_ZN13Binary_string7strrstrERKS_j: mov ecx, [rsi+8] mov eax, 0FFFFFFFFh cmp ecx, edx ja locret_27519 cmp [rdi+8], edx jb locret_27519 test rcx, rcx jz short loc_27517 push rbp mov rbp, rsp push r15 push r14 push rbx mov r10, [rdi] mov r11d, edx lea rdi, [r10+r11-1] mov r8, [rsi] lea r9, [r10+rcx] add r9, 0FFFFFFFFFFFFFFFEh mov esi, 1 sub esi, edx lea rdx, [r10+r11] add rdx, 0FFFFFFFFFFFFFFFEh mov r10d, 1 sub r10, rcx lea r11, [rcx+r8] add r11, 0FFFFFFFFFFFFFFFEh loc_274DB: cmp rdi, r9 jz short loc_27510 mov bl, [rdi] cmp bl, [r8+rcx-1] jnz short loc_27501 xor ebx, ebx loc_274EB: cmp r10, rbx jz short loc_2750C mov r14b, [rdx+rbx] lea r15, [rbx-1] cmp r14b, [r11+rbx] mov rbx, r15 jz short loc_274EB loc_27501: dec rdi inc rsi dec rdx jmp short loc_274DB loc_2750C: sub ebx, esi mov eax, ebx loc_27510: pop rbx pop r14 pop r15 pop rbp retn loc_27517: mov eax, edx locret_27519: retn
long long Binary_string::strrstr(Binary_string *this, const Binary_string *a2, unsigned int a3) { long long v3; // rcx long long result; // rax long long v5; // r10 _BYTE *v6; // rdi long long v7; // r8 unsigned int v8; // esi long long v9; // rdx long long v10; // rbx bool v11; // zf v3 = *((unsigned int *)a2 + 2); result = 0xFFFFFFFFLL; if ( (unsigned int)v3 <= a3 && *((_DWORD *)this + 2) >= a3 ) { if ( *((_DWORD *)a2 + 2) ) { v5 = *(_QWORD *)this; v6 = (_BYTE *)(*(_QWORD *)this + a3 - 1LL); v7 = *(_QWORD *)a2; v8 = 1 - a3; v9 = v5 + a3 - 2; while ( v6 != (_BYTE *)(v5 + v3 - 2) ) { if ( *v6 == *(_BYTE *)(v7 + v3 - 1) ) { v10 = 0LL; while ( 1 - v3 != v10 ) { v11 = *(_BYTE *)(v9 + v10) == *(_BYTE *)(v3 + v7 - 2 + v10); --v10; if ( !v11 ) goto LABEL_10; } return (unsigned int)v10 - v8; } LABEL_10: --v6; ++v8; --v9; } } else { return a3; } } return result; }
strrstr: MOV ECX,dword ptr [RSI + 0x8] MOV EAX,0xffffffff CMP ECX,EDX JA 0x00127519 CMP dword ptr [RDI + 0x8],EDX JC 0x00127519 TEST RCX,RCX JZ 0x00127517 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX MOV R10,qword ptr [RDI] MOV R11D,EDX LEA RDI,[R10 + R11*0x1 + -0x1] MOV R8,qword ptr [RSI] LEA R9,[R10 + RCX*0x1] ADD R9,-0x2 MOV ESI,0x1 SUB ESI,EDX LEA RDX,[R10 + R11*0x1] ADD RDX,-0x2 MOV R10D,0x1 SUB R10,RCX LEA R11,[RCX + R8*0x1] ADD R11,-0x2 LAB_001274db: CMP RDI,R9 JZ 0x00127510 MOV BL,byte ptr [RDI] CMP BL,byte ptr [R8 + RCX*0x1 + -0x1] JNZ 0x00127501 XOR EBX,EBX LAB_001274eb: CMP R10,RBX JZ 0x0012750c MOV R14B,byte ptr [RDX + RBX*0x1] LEA R15,[RBX + -0x1] CMP R14B,byte ptr [R11 + RBX*0x1] MOV RBX,R15 JZ 0x001274eb LAB_00127501: DEC RDI INC RSI DEC RDX JMP 0x001274db LAB_0012750c: SUB EBX,ESI MOV EAX,EBX LAB_00127510: POP RBX POP R14 POP R15 POP RBP RET LAB_00127517: MOV EAX,EDX LAB_00127519: RET
/* Binary_string::strrstr(Binary_string const&, unsigned int) */ uint __thiscall Binary_string::strrstr(Binary_string *this,Binary_string *param_1,uint param_2) { char *pcVar1; char *pcVar2; long lVar3; uint uVar4; ulong uVar5; long lVar6; long lVar7; int iVar8; char *pcVar9; uVar5 = (ulong)*(uint *)(param_1 + 8); uVar4 = 0xffffffff; if (((*(uint *)(param_1 + 8) <= param_2) && (param_2 <= *(uint *)(this + 8))) && (uVar4 = param_2, uVar5 != 0)) { lVar3 = *(long *)this; pcVar9 = (char *)(lVar3 + -1 + (ulong)param_2); iVar8 = -param_2; lVar6 = lVar3 + (ulong)param_2 + -2; do { iVar8 = iVar8 + 1; if (pcVar9 == (char *)(lVar3 + uVar5 + -2)) { return 0xffffffff; } if (*pcVar9 == *(char *)(*(long *)param_1 + -1 + uVar5)) { lVar7 = 0; do { if (1 - uVar5 == lVar7) { return (int)lVar7 - iVar8; } pcVar1 = (char *)(lVar6 + lVar7); pcVar2 = (char *)(uVar5 + *(long *)param_1 + -2 + lVar7); lVar7 = lVar7 + -1; } while (*pcVar1 == *pcVar2); } pcVar9 = pcVar9 + -1; lVar6 = lVar6 + -1; } while( true ); } return uVar4; }
23,515
CheckCollisionPointTriangle
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rshapes.c
bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3) { bool collision = false; float alpha = ((p2.y - p3.y)*(point.x - p3.x) + (p3.x - p2.x)*(point.y - p3.y)) / ((p2.y - p3.y)*(p1.x - p3.x) + (p3.x - p2.x)*(p1.y - p3.y)); float beta = ((p3.y - p1.y)*(point.x - p3.x) + (p1.x - p3.x)*(point.y - p3.y)) / ((p2.y - p3.y)*(p1.x - p3.x) + (p3.x - p2.x)*(p1.y - p3.y)); float gamma = 1.0f - alpha - beta; if ((alpha > 0) && (beta > 0) && (gamma > 0)) collision = true; return collision; }
O0
c
CheckCollisionPointTriangle: pushq %rbp movq %rsp, %rbp movlpd %xmm0, -0x8(%rbp) movlpd %xmm1, -0x10(%rbp) movlpd %xmm2, -0x18(%rbp) movlpd %xmm3, -0x20(%rbp) movb $0x0, -0x21(%rbp) movss -0x14(%rbp), %xmm0 subss -0x1c(%rbp), %xmm0 movss -0x8(%rbp), %xmm2 subss -0x20(%rbp), %xmm2 movss -0x20(%rbp), %xmm1 subss -0x18(%rbp), %xmm1 movss -0x4(%rbp), %xmm3 subss -0x1c(%rbp), %xmm3 mulss %xmm3, %xmm1 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 movss -0x14(%rbp), %xmm1 subss -0x1c(%rbp), %xmm1 movss -0x10(%rbp), %xmm3 subss -0x20(%rbp), %xmm3 movss -0x20(%rbp), %xmm2 subss -0x18(%rbp), %xmm2 movss -0xc(%rbp), %xmm4 subss -0x1c(%rbp), %xmm4 mulss %xmm4, %xmm2 mulss %xmm3, %xmm1 addss %xmm2, %xmm1 divss %xmm1, %xmm0 movss %xmm0, -0x28(%rbp) movss -0x1c(%rbp), %xmm0 subss -0xc(%rbp), %xmm0 movss -0x8(%rbp), %xmm2 subss -0x20(%rbp), %xmm2 movss -0x10(%rbp), %xmm1 subss -0x20(%rbp), %xmm1 movss -0x4(%rbp), %xmm3 subss -0x1c(%rbp), %xmm3 mulss %xmm3, %xmm1 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 movss -0x14(%rbp), %xmm1 subss -0x1c(%rbp), %xmm1 movss -0x10(%rbp), %xmm3 subss -0x20(%rbp), %xmm3 movss -0x20(%rbp), %xmm2 subss -0x18(%rbp), %xmm2 movss -0xc(%rbp), %xmm4 subss -0x1c(%rbp), %xmm4 mulss %xmm4, %xmm2 mulss %xmm3, %xmm1 addss %xmm2, %xmm1 divss %xmm1, %xmm0 movss %xmm0, -0x2c(%rbp) movss 0xc462e(%rip), %xmm0 # 0x1a40f4 subss -0x28(%rbp), %xmm0 subss -0x2c(%rbp), %xmm0 movss %xmm0, -0x30(%rbp) movss -0x28(%rbp), %xmm0 xorps %xmm1, %xmm1 ucomiss %xmm1, %xmm0 jbe 0xdfb00 movss -0x2c(%rbp), %xmm0 xorps %xmm1, %xmm1 ucomiss %xmm1, %xmm0 jbe 0xdfb00 movss -0x30(%rbp), %xmm0 xorps %xmm1, %xmm1 ucomiss %xmm1, %xmm0 jbe 0xdfb00 movb $0x1, -0x21(%rbp) movb -0x21(%rbp), %al andb $0x1, %al popq %rbp retq nopw (%rax,%rax)
CheckCollisionPointTriangle: push rbp mov rbp, rsp movlpd [rbp+var_8], xmm0 movlpd [rbp+var_10], xmm1 movlpd [rbp+var_18], xmm2 movlpd [rbp+var_20], xmm3 mov [rbp+var_21], 0 movss xmm0, dword ptr [rbp+var_18+4] subss xmm0, dword ptr [rbp+var_20+4] movss xmm2, dword ptr [rbp+var_8] subss xmm2, dword ptr [rbp+var_20] movss xmm1, dword ptr [rbp+var_20] subss xmm1, dword ptr [rbp+var_18] movss xmm3, dword ptr [rbp+var_8+4] subss xmm3, dword ptr [rbp+var_20+4] mulss xmm1, xmm3 mulss xmm0, xmm2 addss xmm0, xmm1 movss xmm1, dword ptr [rbp+var_18+4] subss xmm1, dword ptr [rbp+var_20+4] movss xmm3, dword ptr [rbp+var_10] subss xmm3, dword ptr [rbp+var_20] movss xmm2, dword ptr [rbp+var_20] subss xmm2, dword ptr [rbp+var_18] movss xmm4, dword ptr [rbp+var_10+4] subss xmm4, dword ptr [rbp+var_20+4] mulss xmm2, xmm4 mulss xmm1, xmm3 addss xmm1, xmm2 divss xmm0, xmm1 movss [rbp+var_28], xmm0 movss xmm0, dword ptr [rbp+var_20+4] subss xmm0, dword ptr [rbp+var_10+4] movss xmm2, dword ptr [rbp+var_8] subss xmm2, dword ptr [rbp+var_20] movss xmm1, dword ptr [rbp+var_10] subss xmm1, dword ptr [rbp+var_20] movss xmm3, dword ptr [rbp+var_8+4] subss xmm3, dword ptr [rbp+var_20+4] mulss xmm1, xmm3 mulss xmm0, xmm2 addss xmm0, xmm1 movss xmm1, dword ptr [rbp+var_18+4] subss xmm1, dword ptr [rbp+var_20+4] movss xmm3, dword ptr [rbp+var_10] subss xmm3, dword ptr [rbp+var_20] movss xmm2, dword ptr [rbp+var_20] subss xmm2, dword ptr [rbp+var_18] movss xmm4, dword ptr [rbp+var_10+4] subss xmm4, dword ptr [rbp+var_20+4] mulss xmm2, xmm4 mulss xmm1, xmm3 addss xmm1, xmm2 divss xmm0, xmm1 movss [rbp+var_2C], xmm0 movss xmm0, cs:dword_1A40F4 subss xmm0, [rbp+var_28] subss xmm0, [rbp+var_2C] movss [rbp+var_30], xmm0 movss xmm0, [rbp+var_28] xorps xmm1, xmm1 ucomiss xmm0, xmm1 jbe short loc_DFB00 movss xmm0, [rbp+var_2C] xorps xmm1, xmm1 ucomiss xmm0, xmm1 jbe short loc_DFB00 movss xmm0, [rbp+var_30] xorps xmm1, xmm1 ucomiss xmm0, xmm1 jbe short loc_DFB00 mov [rbp+var_21], 1 loc_DFB00: mov al, [rbp+var_21] and al, 1 pop rbp retn
bool CheckCollisionPointTriangle(double a1, double a2, double a3, double a4) { float v5; // [rsp+4h] [rbp-2Ch] float v6; // [rsp+8h] [rbp-28h] bool v7; // [rsp+Fh] [rbp-21h] v7 = 0; v6 = (float)((float)((float)(*((float *)&a3 + 1) - *((float *)&a4 + 1)) * (float)(*(float *)&a1 - *(float *)&a4)) + (float)((float)(*(float *)&a4 - *(float *)&a3) * (float)(*((float *)&a1 + 1) - *((float *)&a4 + 1)))) / (float)((float)((float)(*((float *)&a3 + 1) - *((float *)&a4 + 1)) * (float)(*(float *)&a2 - *(float *)&a4)) + (float)((float)(*(float *)&a4 - *(float *)&a3) * (float)(*((float *)&a2 + 1) - *((float *)&a4 + 1)))); v5 = (float)((float)((float)(*((float *)&a4 + 1) - *((float *)&a2 + 1)) * (float)(*(float *)&a1 - *(float *)&a4)) + (float)((float)(*(float *)&a2 - *(float *)&a4) * (float)(*((float *)&a1 + 1) - *((float *)&a4 + 1)))) / (float)((float)((float)(*((float *)&a3 + 1) - *((float *)&a4 + 1)) * (float)(*(float *)&a2 - *(float *)&a4)) + (float)((float)(*(float *)&a4 - *(float *)&a3) * (float)(*((float *)&a2 + 1) - *((float *)&a4 + 1)))); if ( v6 > 0.0 && v5 > 0.0 ) return (float)((float)(1.0 - v6) - v5) > 0.0; return v7; }
CheckCollisionPointTriangle: PUSH RBP MOV RBP,RSP MOVLPD qword ptr [RBP + -0x8],XMM0 MOVLPD qword ptr [RBP + -0x10],XMM1 MOVLPD qword ptr [RBP + -0x18],XMM2 MOVLPD qword ptr [RBP + -0x20],XMM3 MOV byte ptr [RBP + -0x21],0x0 MOVSS XMM0,dword ptr [RBP + -0x14] SUBSS XMM0,dword ptr [RBP + -0x1c] MOVSS XMM2,dword ptr [RBP + -0x8] SUBSS XMM2,dword ptr [RBP + -0x20] MOVSS XMM1,dword ptr [RBP + -0x20] SUBSS XMM1,dword ptr [RBP + -0x18] MOVSS XMM3,dword ptr [RBP + -0x4] SUBSS XMM3,dword ptr [RBP + -0x1c] MULSS XMM1,XMM3 MULSS XMM0,XMM2 ADDSS XMM0,XMM1 MOVSS XMM1,dword ptr [RBP + -0x14] SUBSS XMM1,dword ptr [RBP + -0x1c] MOVSS XMM3,dword ptr [RBP + -0x10] SUBSS XMM3,dword ptr [RBP + -0x20] MOVSS XMM2,dword ptr [RBP + -0x20] SUBSS XMM2,dword ptr [RBP + -0x18] MOVSS XMM4,dword ptr [RBP + -0xc] SUBSS XMM4,dword ptr [RBP + -0x1c] MULSS XMM2,XMM4 MULSS XMM1,XMM3 ADDSS XMM1,XMM2 DIVSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x28],XMM0 MOVSS XMM0,dword ptr [RBP + -0x1c] SUBSS XMM0,dword ptr [RBP + -0xc] MOVSS XMM2,dword ptr [RBP + -0x8] SUBSS XMM2,dword ptr [RBP + -0x20] MOVSS XMM1,dword ptr [RBP + -0x10] SUBSS XMM1,dword ptr [RBP + -0x20] MOVSS XMM3,dword ptr [RBP + -0x4] SUBSS XMM3,dword ptr [RBP + -0x1c] MULSS XMM1,XMM3 MULSS XMM0,XMM2 ADDSS XMM0,XMM1 MOVSS XMM1,dword ptr [RBP + -0x14] SUBSS XMM1,dword ptr [RBP + -0x1c] MOVSS XMM3,dword ptr [RBP + -0x10] SUBSS XMM3,dword ptr [RBP + -0x20] MOVSS XMM2,dword ptr [RBP + -0x20] SUBSS XMM2,dword ptr [RBP + -0x18] MOVSS XMM4,dword ptr [RBP + -0xc] SUBSS XMM4,dword ptr [RBP + -0x1c] MULSS XMM2,XMM4 MULSS XMM1,XMM3 ADDSS XMM1,XMM2 DIVSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x2c],XMM0 MOVSS XMM0,dword ptr [0x002a40f4] SUBSS XMM0,dword ptr [RBP + -0x28] SUBSS XMM0,dword ptr [RBP + -0x2c] MOVSS dword ptr [RBP + -0x30],XMM0 MOVSS XMM0,dword ptr [RBP + -0x28] XORPS XMM1,XMM1 UCOMISS XMM0,XMM1 JBE 0x001dfb00 MOVSS XMM0,dword ptr [RBP + -0x2c] XORPS XMM1,XMM1 UCOMISS XMM0,XMM1 JBE 0x001dfb00 MOVSS XMM0,dword ptr [RBP + -0x30] XORPS XMM1,XMM1 UCOMISS XMM0,XMM1 JBE 0x001dfb00 MOV byte ptr [RBP + -0x21],0x1 LAB_001dfb00: MOV AL,byte ptr [RBP + -0x21] AND AL,0x1 POP RBP RET
int1 CheckCollisionPointTriangle (int8 param_1,int8 param_2,int8 param_3,int8 param_4) { float fVar1; float fVar2; float fVar3; float fVar4; float fVar5; float fVar6; float fVar7; float fVar8; int1 local_29; fVar8 = (float)((ulong)param_4 >> 0x20); fVar7 = (float)param_4; fVar6 = (float)((ulong)param_3 >> 0x20); fVar5 = (float)param_3; fVar4 = (float)((ulong)param_2 >> 0x20); fVar3 = (float)param_2; fVar2 = (float)((ulong)param_1 >> 0x20); local_29 = 0; fVar1 = ((fVar6 - fVar8) * ((float)param_1 - fVar7) + (fVar7 - fVar5) * (fVar2 - fVar8)) / ((fVar6 - fVar8) * (fVar3 - fVar7) + (fVar7 - fVar5) * (fVar4 - fVar8)); fVar2 = ((fVar8 - fVar4) * ((float)param_1 - fVar7) + (fVar3 - fVar7) * (fVar2 - fVar8)) / ((fVar6 - fVar8) * (fVar3 - fVar7) + (fVar7 - fVar5) * (fVar4 - fVar8)); if (((0.0 < fVar1) && (0.0 < fVar2)) && (0.0 < (DAT_002a40f4 - fVar1) - fVar2)) { local_29 = 1; } return local_29; }
23,516
CheckCollisionPointTriangle
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rshapes.c
bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3) { bool collision = false; float alpha = ((p2.y - p3.y)*(point.x - p3.x) + (p3.x - p2.x)*(point.y - p3.y)) / ((p2.y - p3.y)*(p1.x - p3.x) + (p3.x - p2.x)*(p1.y - p3.y)); float beta = ((p3.y - p1.y)*(point.x - p3.x) + (p1.x - p3.x)*(point.y - p3.y)) / ((p2.y - p3.y)*(p1.x - p3.x) + (p3.x - p2.x)*(p1.y - p3.y)); float gamma = 1.0f - alpha - beta; if ((alpha > 0) && (beta > 0) && (gamma > 0)) collision = true; return collision; }
O1
c
CheckCollisionPointTriangle: movaps %xmm3, %xmm4 subss %xmm2, %xmm4 subps %xmm3, %xmm2 subps %xmm3, %xmm0 movaps %xmm1, %xmm6 subss %xmm3, %xmm6 shufps $0x55, %xmm3, %xmm3 # xmm3 = xmm3[1,1,1,1] shufps $0x55, %xmm2, %xmm2 # xmm2 = xmm2[1,1,1,1] movaps %xmm2, %xmm5 mulss %xmm0, %xmm5 shufps $0x55, %xmm1, %xmm1 # xmm1 = xmm1[1,1,1,1] movaps %xmm1, %xmm7 subss %xmm3, %xmm7 subss %xmm1, %xmm3 mulss %xmm0, %xmm3 shufps $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1] mulss %xmm4, %xmm7 mulss %xmm0, %xmm4 addss %xmm4, %xmm5 mulss %xmm6, %xmm2 addss %xmm7, %xmm2 divss %xmm2, %xmm5 mulss %xmm0, %xmm6 addss %xmm6, %xmm3 divss %xmm2, %xmm3 movss 0x56242(%rip), %xmm0 # 0xd9944 subss %xmm5, %xmm0 xorps %xmm1, %xmm1 ucomiss %xmm1, %xmm5 seta %cl cmpltps %xmm3, %xmm1 cmpltps %xmm0, %xmm3 andps %xmm1, %xmm3 movd %xmm3, %eax andb %cl, %al retq
CheckCollisionPointTriangle: movaps xmm4, xmm3 subss xmm4, xmm2 subps xmm2, xmm3 subps xmm0, xmm3 movaps xmm6, xmm1 subss xmm6, xmm3 shufps xmm3, xmm3, 55h ; 'U' shufps xmm2, xmm2, 55h ; 'U' movaps xmm5, xmm2 mulss xmm5, xmm0 shufps xmm1, xmm1, 55h ; 'U' movaps xmm7, xmm1 subss xmm7, xmm3 subss xmm3, xmm1 mulss xmm3, xmm0 shufps xmm0, xmm0, 55h ; 'U' mulss xmm7, xmm4 mulss xmm4, xmm0 addss xmm5, xmm4 mulss xmm2, xmm6 addss xmm2, xmm7 divss xmm5, xmm2 mulss xmm6, xmm0 addss xmm3, xmm6 divss xmm3, xmm2 movss xmm0, cs:dword_D9944 subss xmm0, xmm5 xorps xmm1, xmm1 ucomiss xmm5, xmm1 setnbe cl cmpltps xmm1, xmm3 cmpltps xmm3, xmm0 andps xmm3, xmm1 movd eax, xmm3 and al, cl retn
char CheckCollisionPointTriangle(__m128 a1, __m128 a2, __m128 a3, __m128 a4) { float v4; // xmm4_4 __m128 v5; // xmm2 __m128 v6; // xmm0 float v7; // xmm6_4 __m128 v8; // xmm3 float v9; // xmm5_4 float v10; // xmm1_4 float v11; // xmm7_4 float v12; // xmm5_4 __m128 v13; // xmm0 v4 = a4.m128_f32[0] - a3.m128_f32[0]; v5 = _mm_sub_ps(a3, a4); v6 = _mm_sub_ps(a1, a4); v7 = a2.m128_f32[0] - a4.m128_f32[0]; v8 = _mm_shuffle_ps(a4, a4, 85); v5.m128_f32[0] = _mm_shuffle_ps(v5, v5, 85).m128_f32[0]; v9 = v5.m128_f32[0] * v6.m128_f32[0]; v10 = _mm_shuffle_ps(a2, a2, 85).m128_f32[0]; v11 = v10 - v8.m128_f32[0]; v8.m128_f32[0] = (float)(v8.m128_f32[0] - v10) * v6.m128_f32[0]; v6.m128_f32[0] = _mm_shuffle_ps(v6, v6, 85).m128_f32[0]; v5.m128_f32[0] = (float)(v5.m128_f32[0] * v7) + (float)(v11 * v4); v12 = (float)(v9 + (float)(v4 * v6.m128_f32[0])) / v5.m128_f32[0]; v8.m128_f32[0] = (float)(v8.m128_f32[0] + (float)(v7 * v6.m128_f32[0])) / v5.m128_f32[0]; v13 = (__m128)0x3F800000u; v13.m128_f32[0] = 1.0 - v12; return (v12 > 0.0) & _mm_cvtsi128_si32((__m128i)_mm_and_ps(_mm_cmplt_ps(v8, v13), _mm_cmplt_ps((__m128)0LL, v8))); }
CheckCollisionPointTriangle: MOVAPS XMM4,XMM3 SUBSS XMM4,XMM2 SUBPS XMM2,XMM3 SUBPS XMM0,XMM3 MOVAPS XMM6,XMM1 SUBSS XMM6,XMM3 SHUFPS XMM3,XMM3,0x55 SHUFPS XMM2,XMM2,0x55 MOVAPS XMM5,XMM2 MULSS XMM5,XMM0 SHUFPS XMM1,XMM1,0x55 MOVAPS XMM7,XMM1 SUBSS XMM7,XMM3 SUBSS XMM3,XMM1 MULSS XMM3,XMM0 SHUFPS XMM0,XMM0,0x55 MULSS XMM7,XMM4 MULSS XMM4,XMM0 ADDSS XMM5,XMM4 MULSS XMM2,XMM6 ADDSS XMM2,XMM7 DIVSS XMM5,XMM2 MULSS XMM6,XMM0 ADDSS XMM3,XMM6 DIVSS XMM3,XMM2 MOVSS XMM0,dword ptr [0x001d9944] SUBSS XMM0,XMM5 XORPS XMM1,XMM1 UCOMISS XMM5,XMM1 SETA CL CMPLTPS XMM1,XMM3 CMPLTPS XMM3,XMM0 ANDPS XMM3,XMM1 MOVD EAX,XMM3 AND AL,CL RET
int4 CheckCollisionPointTriangle (int8 param_1,int8 param_2,int8 param_3,int8 param_4) { float fVar1; float fVar2; float fVar3; float fVar4; float fVar5; int iVar6; float fVar7; float fVar8; float fVar9; fVar7 = (float)((ulong)param_4 >> 0x20); fVar9 = (float)param_4; fVar3 = (float)((ulong)param_2 >> 0x20); fVar8 = fVar9 - (float)param_3; fVar5 = (float)((ulong)param_3 >> 0x20) - fVar7; fVar1 = (float)param_1 - fVar9; fVar2 = (float)((ulong)param_1 >> 0x20) - fVar7; fVar9 = (float)param_2 - fVar9; fVar4 = fVar5 * fVar9 + (fVar3 - fVar7) * fVar8; fVar5 = (fVar5 * fVar1 + fVar8 * fVar2) / fVar4; fVar4 = ((fVar7 - fVar3) * fVar1 + fVar9 * fVar2) / fVar4; iVar6 = -(uint)(fVar4 < DAT_001d9944 - fVar5 && 0.0 < fVar4); return CONCAT31((int3)((uint)iVar6 >> 8),(byte)iVar6 & 0.0 < fVar5); }
23,517
CheckCollisionPointTriangle
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rshapes.c
bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3) { bool collision = false; float alpha = ((p2.y - p3.y)*(point.x - p3.x) + (p3.x - p2.x)*(point.y - p3.y)) / ((p2.y - p3.y)*(p1.x - p3.x) + (p3.x - p2.x)*(p1.y - p3.y)); float beta = ((p3.y - p1.y)*(point.x - p3.x) + (p1.x - p3.x)*(point.y - p3.y)) / ((p2.y - p3.y)*(p1.x - p3.x) + (p3.x - p2.x)*(p1.y - p3.y)); float gamma = 1.0f - alpha - beta; if ((alpha > 0) && (beta > 0) && (gamma > 0)) collision = true; return collision; }
O2
c
CheckCollisionPointTriangle: movaps %xmm1, %xmm4 shufps $0x11, %xmm0, %xmm4 # xmm4 = xmm4[1,0],xmm0[1,0] shufps $0xe2, %xmm0, %xmm4 # xmm4 = xmm4[2,0],xmm0[2,3] unpcklps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1] movaps %xmm3, %xmm5 shufps $0x0, %xmm3, %xmm5 # xmm5 = xmm5[0,0],xmm3[0,0] subps %xmm5, %xmm0 movaps %xmm3, %xmm5 shufps $0x55, %xmm3, %xmm5 # xmm5 = xmm5[1,1],xmm3[1,1] subps %xmm5, %xmm4 movaps %xmm3, %xmm5 subss %xmm2, %xmm5 subps %xmm3, %xmm2 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] mulps %xmm4, %xmm5 shufps $0x55, %xmm2, %xmm2 # xmm2 = xmm2[1,1,1,1] mulps %xmm0, %xmm2 addps %xmm5, %xmm2 subps %xmm1, %xmm3 shufps $0x55, %xmm3, %xmm3 # xmm3 = xmm3[1,1,1,1] mulss %xmm0, %xmm3 shufps $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1] mulss %xmm4, %xmm0 addss %xmm3, %xmm0 movlhps %xmm2, %xmm0 # xmm0 = xmm0[0],xmm2[0] shufps $0xe2, %xmm2, %xmm0 # xmm0 = xmm0[2,0],xmm2[2,3] shufps $0x55, %xmm2, %xmm2 # xmm2 = xmm2[1,1,1,1] divps %xmm2, %xmm0 movss 0x4ddf7(%rip), %xmm1 # 0xb969c xorps %xmm2, %xmm2 ucomiss %xmm2, %xmm0 seta %cl subss %xmm0, %xmm1 shufps $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1] cmpltps %xmm0, %xmm2 cmpltps %xmm1, %xmm0 andps %xmm2, %xmm0 movd %xmm0, %eax andb %cl, %al retq
CheckCollisionPointTriangle: movaps xmm4, xmm1 shufps xmm4, xmm0, 11h shufps xmm4, xmm0, 0E2h unpcklps xmm0, xmm1 movaps xmm5, xmm3 shufps xmm5, xmm3, 0 subps xmm0, xmm5 movaps xmm5, xmm3 shufps xmm5, xmm3, 55h ; 'U' subps xmm4, xmm5 movaps xmm5, xmm3 subss xmm5, xmm2 subps xmm2, xmm3 shufps xmm5, xmm5, 0 mulps xmm5, xmm4 shufps xmm2, xmm2, 55h ; 'U' mulps xmm2, xmm0 addps xmm2, xmm5 subps xmm3, xmm1 shufps xmm3, xmm3, 55h ; 'U' mulss xmm3, xmm0 shufps xmm0, xmm0, 55h ; 'U' mulss xmm0, xmm4 addss xmm0, xmm3 movlhps xmm0, xmm2 shufps xmm0, xmm2, 0E2h shufps xmm2, xmm2, 55h ; 'U' divps xmm0, xmm2 movss xmm1, cs:dword_B969C xorps xmm2, xmm2 ucomiss xmm0, xmm2 setnbe cl subss xmm1, xmm0 shufps xmm0, xmm0, 55h ; 'U' cmpltps xmm2, xmm0 cmpltps xmm0, xmm1 andps xmm0, xmm2 movd eax, xmm0 and al, cl retn
char CheckCollisionPointTriangle(__m128 a1, __m128 a2, __m128 a3, __m128 a4) { __m128 v4; // xmm4 __m128 v5; // xmm0 __m128 v6; // xmm4 __m128 v7; // xmm5 __m128 v8; // xmm2 __m128 v9; // xmm2 __m128 v10; // xmm3 __m128 v11; // xmm0 __m128 v12; // xmm0 __m128 v13; // xmm1 bool v14; // cl __m128 v15; // xmm0 v4 = _mm_shuffle_ps(_mm_shuffle_ps(a2, a1, 17), a1, 226); v5 = _mm_sub_ps(_mm_unpacklo_ps(a1, a2), _mm_shuffle_ps(a4, a4, 0)); v6 = _mm_sub_ps(v4, _mm_shuffle_ps(a4, a4, 85)); v7 = a4; v7.m128_f32[0] = a4.m128_f32[0] - a3.m128_f32[0]; v8 = _mm_sub_ps(a3, a4); v9 = _mm_add_ps(_mm_mul_ps(_mm_shuffle_ps(v8, v8, 85), v5), _mm_mul_ps(_mm_shuffle_ps(v7, v7, 0), v6)); v10 = _mm_sub_ps(a4, a2); v10.m128_f32[0] = _mm_shuffle_ps(v10, v10, 85).m128_f32[0] * v5.m128_f32[0]; v11 = _mm_shuffle_ps(v5, v5, 85); v11.m128_f32[0] = (float)(v11.m128_f32[0] * v6.m128_f32[0]) + v10.m128_f32[0]; v12 = _mm_div_ps(_mm_shuffle_ps(_mm_movelh_ps(v11, v9), v9, 226), _mm_shuffle_ps(v9, v9, 85)); v13 = (__m128)0x3F800000u; v14 = v12.m128_f32[0] > 0.0; v13.m128_f32[0] = 1.0 - v12.m128_f32[0]; v15 = _mm_shuffle_ps(v12, v12, 85); return v14 & _mm_cvtsi128_si32((__m128i)_mm_and_ps(_mm_cmplt_ps(v15, v13), _mm_cmplt_ps((__m128)0LL, v15))); }
CheckCollisionPointTriangle: MOVAPS XMM4,XMM1 SHUFPS XMM4,XMM0,0x11 SHUFPS XMM4,XMM0,0xe2 UNPCKLPS XMM0,XMM1 MOVAPS XMM5,XMM3 SHUFPS XMM5,XMM3,0x0 SUBPS XMM0,XMM5 MOVAPS XMM5,XMM3 SHUFPS XMM5,XMM3,0x55 SUBPS XMM4,XMM5 MOVAPS XMM5,XMM3 SUBSS XMM5,XMM2 SUBPS XMM2,XMM3 SHUFPS XMM5,XMM5,0x0 MULPS XMM5,XMM4 SHUFPS XMM2,XMM2,0x55 MULPS XMM2,XMM0 ADDPS XMM2,XMM5 SUBPS XMM3,XMM1 SHUFPS XMM3,XMM3,0x55 MULSS XMM3,XMM0 SHUFPS XMM0,XMM0,0x55 MULSS XMM0,XMM4 ADDSS XMM0,XMM3 MOVLHPS XMM0,XMM2 SHUFPS XMM0,XMM2,0xe2 SHUFPS XMM2,XMM2,0x55 DIVPS XMM0,XMM2 MOVSS XMM1,dword ptr [0x001b969c] XORPS XMM2,XMM2 UCOMISS XMM0,XMM2 SETA CL SUBSS XMM1,XMM0 SHUFPS XMM0,XMM0,0x55 CMPLTPS XMM2,XMM0 CMPLTPS XMM0,XMM1 ANDPS XMM0,XMM2 MOVD EAX,XMM0 AND AL,CL RET
int4 CheckCollisionPointTriangle (int8 param_1,int8 param_2,int8 param_3,int8 param_4) { float fVar1; int iVar2; float fVar5; float fVar6; float in_XMM0_Dc; float in_XMM0_Dd; int1 auVar3 [16]; int1 auVar4 [16]; float fVar7; float fVar8; float fVar9; float fVar10; float fVar11; float fVar12; float fVar13; fVar11 = (float)((ulong)param_4 >> 0x20); fVar10 = (float)param_4; fVar7 = (float)((ulong)param_2 >> 0x20); fVar5 = (float)((ulong)param_1 >> 0x20); fVar1 = (float)param_1 - fVar10; fVar6 = (float)param_2 - fVar10; fVar12 = fVar5 - fVar11; fVar13 = fVar10 - (float)param_3; fVar8 = (float)((ulong)param_3 >> 0x20) - fVar11; fVar9 = fVar8 * fVar6 + fVar13 * (fVar7 - fVar11); auVar3._4_4_ = fVar6 * fVar12 + (fVar11 - fVar7) * fVar1; auVar3._0_4_ = fVar8 * fVar1 + fVar13 * fVar12; auVar3._8_4_ = fVar8 * (fVar5 - fVar10) + fVar13 * (in_XMM0_Dc - fVar11); auVar3._12_4_ = fVar8 * (fVar7 - fVar10) + fVar13 * (in_XMM0_Dd - fVar11); auVar4._4_4_ = fVar9; auVar4._0_4_ = fVar9; auVar4._8_4_ = fVar9; auVar4._12_4_ = fVar9; auVar4 = divps(auVar3,auVar4); iVar2 = -(uint)(0.0 < auVar4._4_4_ && auVar4._4_4_ < DAT_001b969c - auVar4._0_4_); return CONCAT31((int3)((uint)iVar2 >> 8),(byte)iVar2 & 0.0 < auVar4._0_4_); }
23,518
ma_apply_undo_key_insert
eloqsql/storage/maria/ma_key_recover.c
my_bool _ma_apply_undo_key_insert(MARIA_HA *info, LSN undo_lsn, const uchar *header, uint length) { LSN lsn; my_bool res; uint keynr; uchar key_buff[MARIA_MAX_KEY_BUFF]; MARIA_SHARE *share= info->s; MARIA_KEY key; my_off_t new_root; struct st_msg_to_write_hook_for_undo_key msg; DBUG_ENTER("_ma_apply_undo_key_insert"); share->state.changed|= (STATE_CHANGED | STATE_NOT_OPTIMIZED_KEYS | STATE_NOT_SORTED_PAGES | STATE_NOT_ZEROFILLED | STATE_NOT_MOVABLE); keynr= key_nr_korr(header); length-= KEY_NR_STORE_SIZE; /* We have to copy key as _ma_ck_real_delete() may change it */ memcpy(key_buff, header + KEY_NR_STORE_SIZE, length); DBUG_DUMP("key_buff", key_buff, length); new_root= share->state.key_root[keynr]; /* Change the key to an internal structure. It's safe to have SEARCH_USER_KEY_HAS_TRANSID even if there isn't a transaction id, as ha_key_cmp() will stop comparison when key length is reached. For index with transid flag, the ref_length of the key is not correct. This should however be safe as long as this key is only used for comparsion against other keys (not for packing or for read-next etc as in this case we use data_length + ref_length, which is correct. */ key.keyinfo= share->keyinfo + keynr; key.data= key_buff; key.data_length= length - share->rec_reflength; key.ref_length= share->rec_reflength; key.flag= SEARCH_USER_KEY_HAS_TRANSID; res= ((share->keyinfo[keynr].key_alg == HA_KEY_ALG_RTREE) ? maria_rtree_real_delete(info, &key, &new_root) : _ma_ck_real_delete(info, &key, &new_root)); if (res) _ma_mark_file_crashed(share); msg.root= &share->state.key_root[keynr]; msg.value= new_root; msg.keynr= keynr; if (_ma_write_clr(info, undo_lsn, *msg.root == msg.value ? LOGREC_UNDO_KEY_INSERT : LOGREC_UNDO_KEY_INSERT_WITH_ROOT, 0, 0, &lsn, (void*) &msg)) res= 1; _ma_fast_unlock_key_del(info); _ma_unpin_all_pages_and_finalize_row(info, lsn); DBUG_RETURN(res); }
O3
c
ma_apply_undo_key_insert: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa48, %rsp # imm = 0xA48 movl %ecx, %r12d movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq (%rdi), %r15 orl $0x1b1, 0x170(%r15) # imm = 0x1B1 movq %rsi, -0xa20(%rbp) movzbl (%rdx), %r14d decl %r12d leaq 0x1(%rdx), %rsi leaq -0xa10(%rbp), %r13 movl $0x9d3, %ecx # imm = 0x9D3 movq %r13, %rdi movq %r12, %rdx callq 0x2a420 movq 0x118(%r15), %rax movq (%rax,%r14,8), %rax movq %rax, -0xa18(%rbp) movq 0x570(%r15), %rax imulq $0x118, %r14, %rcx # imm = 0x118 leaq (%rax,%rcx), %rdx movq %rdx, -0xa40(%rbp) movq %r13, -0xa48(%rbp) movl 0x740(%r15), %edx subl %edx, %r12d movl %r12d, -0xa38(%rbp) movl %edx, -0xa34(%rbp) movl $0x80000, -0xa30(%rbp) # imm = 0x80000 cmpb $0x2, 0xa4(%rax,%rcx) jne 0x41569 leaq -0xa48(%rbp), %rsi leaq -0xa18(%rbp), %rdx movq %rbx, %rdi callq 0x635fb jmp 0x4157f leaq -0xa48(%rbp), %rsi leaq -0xa18(%rbp), %rdx movq %rbx, %rdi callq 0x59e94 movl %eax, %r12d testb %al, %al je 0x4158e movq %r15, %rdi callq 0x431a6 movq 0x118(%r15), %rax leaq (%rax,%r14,8), %rax leaq -0xa68(%rbp), %rcx movq %rax, (%rcx) movq -0xa18(%rbp), %rsi movq %rsi, 0x8(%rcx) movl %r14d, 0x10(%rcx) xorl %edx, %edx cmpq %rsi, (%rax) setne %dl addl $0x15, %edx movq %rcx, (%rsp) leaq -0xa28(%rbp), %r9 movq %rbx, %rdi movq -0xa20(%rbp), %rsi xorl %ecx, %ecx xorl %r8d, %r8d callq 0x40331 movl %eax, %r14d cmpb $0x0, 0x67e(%rbx) je 0x415f0 movq %rbx, %rdi callq 0x4196e testb %r14b, %r14b movzbl %r12b, %eax movl $0x1, %r14d cmovel %eax, %r14d movq -0xa28(%rbp), %rsi movq %rbx, %rdi callq 0x402b4 movq 0x8(%rbx), %rax movq $0x0, 0x90(%rax) movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x41643 movl %r14d, %eax addq $0xa48, %rsp # imm = 0xA48 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x2a250
_ma_apply_undo_key_insert: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A48h mov r12d, ecx mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax mov r15, [rdi] or dword ptr [r15+170h], 1B1h mov [rbp+var_A20], rsi movzx r14d, byte ptr [rdx] dec r12d lea rsi, [rdx+1] lea r13, [rbp+var_A10] mov ecx, 9D3h mov rdi, r13 mov rdx, r12 call ___memcpy_chk mov rax, [r15+118h] mov rax, [rax+r14*8] mov [rbp+var_A18], rax mov rax, [r15+570h] imul rcx, r14, 118h lea rdx, [rax+rcx] mov [rbp+var_A40], rdx mov [rbp+var_A48], r13 mov edx, [r15+740h] sub r12d, edx mov [rbp+var_A38], r12d mov [rbp+var_A34], edx mov [rbp+var_A30], 80000h cmp byte ptr [rax+rcx+0A4h], 2 jnz short loc_41569 lea rsi, [rbp+var_A48] lea rdx, [rbp+var_A18] mov rdi, rbx call maria_rtree_real_delete jmp short loc_4157F loc_41569: lea rsi, [rbp+var_A48] lea rdx, [rbp+var_A18] mov rdi, rbx call _ma_ck_real_delete loc_4157F: mov r12d, eax test al, al jz short loc_4158E mov rdi, r15 call _ma_mark_file_crashed loc_4158E: mov rax, [r15+118h] lea rax, [rax+r14*8] lea rcx, [rbp+var_A68] mov [rcx], rax mov rsi, [rbp+var_A18] mov [rcx+8], rsi mov [rcx+10h], r14d xor edx, edx cmp [rax], rsi setnz dl add edx, 15h mov [rsp+0A70h+var_A70], rcx lea r9, [rbp+var_A28] mov rdi, rbx mov rsi, [rbp+var_A20] xor ecx, ecx xor r8d, r8d call _ma_write_clr mov r14d, eax cmp byte ptr [rbx+67Eh], 0 jz short loc_415F0 mov rdi, rbx call _ma_unlock_key_del loc_415F0: test r14b, r14b movzx eax, r12b mov r14d, 1 cmovz r14d, eax mov rsi, [rbp+var_A28] mov rdi, rbx call _ma_unpin_all_pages mov rax, [rbx+8] mov qword ptr [rax+90h], 0 mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_41643 mov eax, r14d add rsp, 0A48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_41643: call ___stack_chk_fail
long long ma_apply_undo_key_insert(long long a1, long long a2, unsigned __int8 *a3, int a4) { long long v4; // r15 long long v5; // r14 long long v6; // r12 int v7; // edx unsigned __int8 v8; // al unsigned __int8 v9; // r12 char v10; // r14 bool v11; // zf unsigned int v12; // r14d _QWORD v14[2]; // [rsp+8h] [rbp-A68h] BYREF int v15; // [rsp+18h] [rbp-A58h] _BYTE *v16; // [rsp+28h] [rbp-A48h] BYREF long long v17; // [rsp+30h] [rbp-A40h] int v18; // [rsp+38h] [rbp-A38h] int v19; // [rsp+3Ch] [rbp-A34h] int v20; // [rsp+40h] [rbp-A30h] long long v21; // [rsp+48h] [rbp-A28h] BYREF long long v22; // [rsp+50h] [rbp-A20h] long long v23; // [rsp+58h] [rbp-A18h] BYREF _BYTE v24[2528]; // [rsp+60h] [rbp-A10h] BYREF unsigned long long v25; // [rsp+A40h] [rbp-30h] v25 = __readfsqword(0x28u); v4 = *(_QWORD *)a1; *(_DWORD *)(*(_QWORD *)a1 + 368LL) |= 0x1B1u; v22 = a2; v5 = *a3; v6 = (unsigned int)(a4 - 1); __memcpy_chk(v24, a3 + 1, v6, 2515LL); v23 = *(_QWORD *)(*(_QWORD *)(v4 + 280) + 8 * v5); v17 = *(_QWORD *)(v4 + 1392) + 280 * v5; v16 = v24; v7 = *(_DWORD *)(v4 + 1856); v18 = v6 - v7; v19 = v7; v20 = 0x80000; if ( *(_BYTE *)(v17 + 164) == 2 ) v8 = maria_rtree_real_delete(a1, &v16, &v23); else v8 = ma_ck_real_delete(a1, &v16, &v23); v9 = v8; if ( v8 ) ma_mark_file_crashed(v4); v14[0] = *(_QWORD *)(v4 + 280) + 8 * v5; v14[1] = v23; v15 = v5; v10 = ma_write_clr( (long long *)a1, v22, (unsigned int)(*(_QWORD *)v14[0] != v23) + 21, 0, 0, (unsigned long long)&v21, (long long)v14); if ( *(_BYTE *)(a1 + 1662) ) ma_unlock_key_del(a1); v11 = v10 == 0; v12 = 1; if ( v11 ) v12 = v9; ma_unpin_all_pages(a1, v21); *(_QWORD *)(*(_QWORD *)(a1 + 8) + 144LL) = 0LL; return v12; }
_ma_apply_undo_key_insert: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa48 MOV R12D,ECX MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV R15,qword ptr [RDI] OR dword ptr [R15 + 0x170],0x1b1 MOV qword ptr [RBP + -0xa20],RSI MOVZX R14D,byte ptr [RDX] DEC R12D LEA RSI,[RDX + 0x1] LEA R13,[RBP + -0xa10] MOV ECX,0x9d3 MOV RDI,R13 MOV RDX,R12 CALL 0x0012a420 MOV RAX,qword ptr [R15 + 0x118] MOV RAX,qword ptr [RAX + R14*0x8] MOV qword ptr [RBP + -0xa18],RAX MOV RAX,qword ptr [R15 + 0x570] IMUL RCX,R14,0x118 LEA RDX,[RAX + RCX*0x1] MOV qword ptr [RBP + -0xa40],RDX MOV qword ptr [RBP + -0xa48],R13 MOV EDX,dword ptr [R15 + 0x740] SUB R12D,EDX MOV dword ptr [RBP + -0xa38],R12D MOV dword ptr [RBP + -0xa34],EDX MOV dword ptr [RBP + -0xa30],0x80000 CMP byte ptr [RAX + RCX*0x1 + 0xa4],0x2 JNZ 0x00141569 LEA RSI,[RBP + -0xa48] LEA RDX,[RBP + -0xa18] MOV RDI,RBX CALL 0x001635fb JMP 0x0014157f LAB_00141569: LEA RSI,[RBP + -0xa48] LEA RDX,[RBP + -0xa18] MOV RDI,RBX CALL 0x00159e94 LAB_0014157f: MOV R12D,EAX TEST AL,AL JZ 0x0014158e MOV RDI,R15 CALL 0x001431a6 LAB_0014158e: MOV RAX,qword ptr [R15 + 0x118] LEA RAX,[RAX + R14*0x8] LEA RCX,[RBP + -0xa68] MOV qword ptr [RCX],RAX MOV RSI,qword ptr [RBP + -0xa18] MOV qword ptr [RCX + 0x8],RSI MOV dword ptr [RCX + 0x10],R14D XOR EDX,EDX CMP qword ptr [RAX],RSI SETNZ DL ADD EDX,0x15 MOV qword ptr [RSP],RCX LEA R9,[RBP + -0xa28] MOV RDI,RBX MOV RSI,qword ptr [RBP + -0xa20] XOR ECX,ECX XOR R8D,R8D CALL 0x00140331 MOV R14D,EAX CMP byte ptr [RBX + 0x67e],0x0 JZ 0x001415f0 MOV RDI,RBX CALL 0x0014196e LAB_001415f0: TEST R14B,R14B MOVZX EAX,R12B MOV R14D,0x1 CMOVZ R14D,EAX MOV RSI,qword ptr [RBP + -0xa28] MOV RDI,RBX CALL 0x001402b4 MOV RAX,qword ptr [RBX + 0x8] MOV qword ptr [RAX + 0x90],0x0 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00141643 MOV EAX,R14D ADD RSP,0xa48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00141643: CALL 0x0012a250
char _ma_apply_undo_key_insert(long *param_1,int8 param_2,byte *param_3,int param_4) { byte bVar1; long lVar2; char cVar3; char cVar4; char cVar5; ulong uVar6; long in_FS_OFFSET; long *local_a70; long local_a68; uint local_a60; int1 *local_a50; long local_a48; int local_a40; int local_a3c; int4 local_a38; int8 local_a30; int8 local_a28; long local_a20; int1 local_a18 [2528]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); lVar2 = *param_1; *(uint *)(lVar2 + 0x170) = *(uint *)(lVar2 + 0x170) | 0x1b1; bVar1 = *param_3; uVar6 = (ulong)bVar1; local_a28 = param_2; __memcpy_chk(local_a18,param_3 + 1,param_4 + -1,0x9d3); local_a20 = *(long *)(*(long *)(lVar2 + 0x118) + uVar6 * 8); local_a48 = *(long *)(lVar2 + 0x570) + uVar6 * 0x118; local_a3c = *(int *)(lVar2 + 0x740); local_a40 = (param_4 + -1) - local_a3c; local_a38 = 0x80000; local_a50 = local_a18; if (*(char *)(*(long *)(lVar2 + 0x570) + 0xa4 + uVar6 * 0x118) == '\x02') { cVar3 = maria_rtree_real_delete(param_1,&local_a50,&local_a20); } else { cVar3 = _ma_ck_real_delete(param_1,&local_a50,&local_a20); } if (cVar3 != '\0') { _ma_mark_file_crashed(lVar2); } local_a70 = (long *)(*(long *)(lVar2 + 0x118) + uVar6 * 8); local_a68 = local_a20; local_a60 = (uint)bVar1; cVar4 = _ma_write_clr(param_1,local_a28,(*local_a70 != local_a20) + '\x15',0,0,&local_a30, &local_a70); if (*(char *)((long)param_1 + 0x67e) != '\0') { _ma_unlock_key_del(param_1); } cVar5 = '\x01'; if (cVar4 == '\0') { cVar5 = cVar3; } _ma_unpin_all_pages(param_1,local_a30); *(int8 *)(param_1[1] + 0x90) = 0; if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return cVar5; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
23,519
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>::type_name() const
monkey531[P]llama/common/json.hpp
JSON_HEDLEY_RETURNS_NON_NULL const char* type_name() const noexcept { switch (m_data.m_type) { case value_t::null: return "null"; case value_t::object: return "object"; case value_t::array: return "array"; case value_t::string: return "string"; case value_t::boolean: return "boolean"; case value_t::binary: return "binary"; case value_t::discarded: return "discarded"; case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: default: return "number"; } }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::type_name() const: movzbl (%rdi), %eax cmpq $0x9, %rax ja 0x5e8ac leaq 0x8e61c(%rip), %rcx # 0xecec0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax retq leaq 0x8d70e(%rip), %rax # 0xebfc1 retq
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv: movzx eax, byte ptr [rdi] cmp rax, 9 ja short loc_5E8AC lea rcx, unk_ECEC0 movsxd rax, dword ptr [rcx+rax*4] add rax, rcx retn loc_5E8AC: lea rax, aNumber; "number" retn
const char * nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name( unsigned __int8 *a1) { unsigned long long v1; // rax v1 = *a1; if ( v1 > 9 ) return "number"; else return (char *)dword_ECEC0 + dword_ECEC0[v1]; }
type_name: MOVZX EAX,byte ptr [RDI] CMP RAX,0x9 JA 0x0015e8ac LEA RCX,[0x1ecec0] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX RET LAB_0015e8ac: LEA RAX,[0x1ebfc1] RET
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::type_name() const */ char * __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::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> *this) { if ((ulong)(byte)*this < 10) { return &DAT_001ecec0 + *(int *)(&DAT_001ecec0 + (ulong)(byte)*this * 4); } return "number"; }
23,520
nlohmann::json_abi_v3_11_3::detail::type_error nlohmann::json_abi_v3_11_3::detail::type_error::create<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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>*)
monkey531[P]llama/common/json.hpp
static type_error create(int id_, const std::string& what_arg, BasicJsonContext context) { const std::string w = concat(exception::name("type_error", id_), exception::diagnostics(context), what_arg); return {id_, w.c_str()}; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::type_error nlohmann::json_abi_v3_11_3::detail::type_error::create<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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>*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x98, %rsp movq %rdx, %r15 movl %esi, %ebp movq %rdi, %rbx leaq 0x38(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0x6046e(%rip), %rsi # 0xa9899 leaq 0x60471(%rip), %rdx # 0xa98a3 leaq 0x28(%rsp), %rdi callq 0x1ca72 leaq 0x48(%rsp), %rdi leaq 0x28(%rsp), %rsi movl %ebp, %edx callq 0x3d7f8 leaq 0x78(%rsp), %r14 movq %r14, -0x10(%r14) xorl %eax, %eax movq %rax, -0x8(%r14) movb %al, (%r14) leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) movq %rax, -0x8(%r12) movb %al, (%r12) movq 0x8(%r15), %rsi addq 0x50(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x18a20 movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx leaq 0x8(%rsp), %rdi callq 0x181d0 movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx leaq 0x8(%rsp), %rdi callq 0x181d0 movq (%r15), %rsi movq 0x8(%r15), %rdx leaq 0x8(%rsp), %rdi callq 0x181d0 movq 0x68(%rsp), %rdi cmpq %r14, %rdi je 0x494d5 movq 0x78(%rsp), %rsi incq %rsi callq 0x186a0 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x494f0 movq 0x58(%rsp), %rsi incq %rsi callq 0x186a0 movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x49507 movq 0x38(%rsp), %rsi incq %rsi callq 0x186a0 movq 0x8(%rsp), %rdx movq %rbx, %rdi movl %ebp, %esi callq 0x3d9f4 leaq 0x90dc3(%rip), %rax # 0xda2e0 addq $0x10, %rax movq %rax, (%rbx) movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x4953b movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 movq %rbx, %rax addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x495c9 movq 0x18(%rsp), %rsi jmp 0x495c1 movq %rax, %rbx jmp 0x495b2 movq %rax, %rbx jmp 0x495c9 movq %rdx, %rbx movq %rax, %r15 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x4958b movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 leaq 0x68(%rsp), %rdi leaq 0x48(%rsp), %rdx leaq 0x88(%rsp), %r12 movq %r14, %rsi movq %r15, %rcx movl %ebx, %r8d movq %r12, %r9 callq 0x1936c movq (%r12), %rbx movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x495c9 movq 0x38(%rsp), %rsi incq %rsi callq 0x186a0 movq %rbx, %rdi callq 0x18bb0
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 98h mov r15, rdx mov ebp, esi mov rbx, rdi lea r13, [rsp+0C8h+var_90] mov [r13-10h], r13 lea rsi, aTypeError; "type_error" lea rdx, aTypeError+0Ah; "" lea rdi, [rsp+0C8h+var_A0] 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 rdi, [rsp+0C8h+var_80]; int lea rsi, [rsp+0C8h+var_A0]; int mov edx, ebp; int call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int) lea r14, [rsp+0C8h+var_50] mov [r14-10h], r14 xor eax, eax mov [r14-8], rax mov [r14], al lea r12, [rsp+0C8h+var_B0] mov [r12-10h], r12 mov [r12-8], rax mov [r12], al mov rsi, [r15+8] add rsi, [rsp+0C8h+var_78] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rsi, qword ptr [rsp+0C8h+var_80] mov rdx, [rsp+0C8h+var_78] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rsi, [rsp+0C8h+var_60] mov rdx, [rsp+0C8h+var_58] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rsi, [r15] mov rdx, [r15+8] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, [rsp+0C8h+var_60]; void * cmp rdi, r14 jz short loc_494D5 mov rsi, [rsp+0C8h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_494D5: lea rax, [rsp+0C8h+var_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_494F0 mov rsi, [rsp+0C8h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_494F0: mov rdi, [rsp+0C8h+var_A0]; void * cmp rdi, r13 jz short loc_49507 mov rsi, [rsp+0C8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_49507: mov rdx, [rsp+0C8h+var_C0]; char * mov rdi, rbx; this mov esi, ebp; int call _ZN8nlohmann16json_abi_v3_11_36detail9exceptionC2EiPKc; nlohmann::json_abi_v3_11_3::detail::exception::exception(int,char const*) lea rax, _ZTVN8nlohmann16json_abi_v3_11_36detail10type_errorE; `vtable for'nlohmann::json_abi_v3_11_3::detail::type_error add rax, 10h mov [rbx], rax mov rdi, [rsp+0C8h+var_C0]; void * cmp rdi, r12 jz short loc_4953B mov rsi, [rsp+0C8h+var_B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4953B: mov rax, rbx add rsp, 98h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_0] cmp rdi, r12 jz short loc_495C9 mov rsi, [rsp+arg_10] jmp short loc_495C1 mov rbx, rax jmp short loc_495B2 mov rbx, rax jmp short loc_495C9 mov rbx, rdx mov r15, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r12 jz short loc_4958B mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4958B: lea rdi, [rsp+arg_60] lea rdx, [rsp+arg_40] lea r12, [rsp+arg_80] mov rsi, r14 mov rcx, r15 mov r8d, ebx mov r9, r12 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ__cold_1 mov rbx, [r12] loc_495B2: mov rdi, [rsp+arg_20]; void * cmp rdi, r13 jz short loc_495C9 mov rsi, [rsp+arg_30] loc_495C1: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_495C9: mov rdi, rbx call __Unwind_Resume
nlohmann::json_abi_v3_11_3::detail::exception * ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( nlohmann::json_abi_v3_11_3::detail::exception *this, int a2, _QWORD *a3) { char *v5[2]; // [rsp+8h] [rbp-C0h] BYREF _QWORD v6[2]; // [rsp+18h] [rbp-B0h] BYREF void *v7[2]; // [rsp+28h] [rbp-A0h] BYREF _QWORD v8[2]; // [rsp+38h] [rbp-90h] BYREF int v9[2]; // [rsp+48h] [rbp-80h] BYREF long long v10; // [rsp+50h] [rbp-78h] long long v11; // [rsp+58h] [rbp-70h] BYREF void *v12; // [rsp+68h] [rbp-60h] long long v13; // [rsp+70h] [rbp-58h] _QWORD v14[10]; // [rsp+78h] [rbp-50h] BYREF v7[0] = v8; std::string::_M_construct<char const*>((long long)v7, "type_error", (long long)""); nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v9, (long long)v7, a2); v12 = v14; v13 = 0LL; LOBYTE(v14[0]) = 0; v5[0] = (char *)v6; v5[1] = 0LL; LOBYTE(v6[0]) = 0; std::string::reserve(v5, v10 + a3[1]); std::string::_M_append(v5, *(_QWORD *)v9); std::string::_M_append(v5, v12); std::string::_M_append(v5, *a3); if ( v12 != v14 ) operator delete(v12, v14[0] + 1LL); if ( *(long long **)v9 != &v11 ) operator delete(*(void **)v9, v11 + 1); if ( v7[0] != v8 ) operator delete(v7[0], v8[0] + 1LL); nlohmann::json_abi_v3_11_3::detail::exception::exception(this, a2, v5[0]); *(_QWORD *)this = &`vtable for'nlohmann::json_abi_v3_11_3::detail::type_error + 2; if ( (_QWORD *)v5[0] != v6 ) operator delete(v5[0], v6[0] + 1LL); return this; }
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x98 MOV R15,RDX MOV EBP,ESI MOV RBX,RDI LEA R13,[RSP + 0x38] MOV qword ptr [R13 + -0x10],R13 LAB_00149424: LEA RSI,[0x1a9899] LEA RDX,[0x1a98a3] LEA RDI,[RSP + 0x28] CALL 0x0011ca72 LAB_0014943c: LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x28] MOV EDX,EBP CALL 0x0013d7f8 LEA R14,[RSP + 0x78] MOV qword ptr [R14 + -0x10],R14 XOR EAX,EAX MOV qword ptr [R14 + -0x8],RAX MOV byte ptr [R14],AL LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 MOV qword ptr [R12 + -0x8],RAX MOV byte ptr [R12],AL MOV RSI,qword ptr [R15 + 0x8] ADD RSI,qword ptr [RSP + 0x50] LAB_0014947b: LEA RDI,[RSP + 0x8] CALL 0x00118a20 MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] LEA RDI,[RSP + 0x8] CALL 0x001181d0 MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] LEA RDI,[RSP + 0x8] CALL 0x001181d0 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] LEA RDI,[RSP + 0x8] CALL 0x001181d0 MOV RDI,qword ptr [RSP + 0x68] CMP RDI,R14 JZ 0x001494d5 MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x001186a0 LAB_001494d5: LEA RAX,[RSP + 0x58] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001494f0 MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x001186a0 LAB_001494f0: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R13 JZ 0x00149507 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001186a0 LAB_00149507: MOV RDX,qword ptr [RSP + 0x8] LAB_0014950c: MOV RDI,RBX MOV ESI,EBP CALL 0x0013d9f4 LAB_00149516: LEA RAX,[0x1da2e0] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x0014953b MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001186a0 LAB_0014953b: MOV RAX,RBX ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
exception * _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (exception *param_1,int param_2,ulong *param_3) { char *local_c0; int8 local_b8; char local_b0; int7 uStack_af; long *local_a0 [2]; long local_90 [2]; long *local_80 [2]; long local_70 [2]; int1 *local_60; int8 local_58; int1 local_50; int7 uStack_4f; /* try { // try from 00149424 to 0014943b has its CatchHandler @ 00149569 */ local_a0[0] = local_90; std::__cxx11::string::_M_construct<char_const*>(local_a0,"type_error",""); /* try { // try from 0014943c to 0014944c has its CatchHandler @ 00149564 */ nlohmann::json_abi_v3_11_3::detail::exception::name ((exception *)local_80,(string *)local_a0,param_2); local_58 = 0; local_50 = 0; local_b8 = 0; local_b0 = '\0'; /* try { // try from 0014947b to 001494bd has its CatchHandler @ 0014956e */ local_c0 = &local_b0; local_60 = &local_50; std::__cxx11::string::reserve((ulong)&local_c0); std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_80[0]); std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_60); std::__cxx11::string::_M_append((char *)&local_c0,*param_3); if (local_60 != &local_50) { operator_delete(local_60,CONCAT71(uStack_4f,local_50) + 1); } if (local_80[0] != local_70) { operator_delete(local_80[0],local_70[0] + 1); } if (local_a0[0] != local_90) { operator_delete(local_a0[0],local_90[0] + 1); } /* try { // try from 0014950c to 00149515 has its CatchHandler @ 00149550 */ nlohmann::json_abi_v3_11_3::detail::exception::exception(param_1,param_2,local_c0); *(int ***)param_1 = &PTR__exception_001da2f0; if (local_c0 != &local_b0) { operator_delete(local_c0,CONCAT71(uStack_af,local_b0) + 1); } return param_1; }
23,521
free_maria_share
eloqsql/storage/maria/ma_close.c
void free_maria_share(MARIA_SHARE *share) { if (!share->internal_table) mysql_mutex_assert_owner(&share->intern_lock); if (!share->reopen && !share->in_trans && !(share->in_checkpoint & MARIA_CHECKPOINT_SHOULD_FREE_ME)) { /* No one can access this share anymore, time to delete it ! */ if (!share->internal_table) mysql_mutex_unlock(&share->intern_lock); ma_crypt_free(share); my_free(share->s3_path); (void) mysql_mutex_destroy(&share->intern_lock); (void) mysql_mutex_destroy(&share->close_lock); (void) mysql_cond_destroy(&share->key_del_cond); my_free(share); return; } if (!share->internal_table) mysql_mutex_unlock(&share->intern_lock); return; }
O0
c
free_maria_share: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpb $0x0, 0x7e2(%rax) jne 0x6eebf jmp 0x6eebb jmp 0x6eebd jmp 0x6eebf movq -0x8(%rbp), %rax cmpl $0x0, 0x7a8(%rax) jne 0x6ef65 movq -0x8(%rbp), %rax cmpl $0x0, 0x7ac(%rax) jne 0x6ef65 movq -0x8(%rbp), %rax movzbl 0x7d8(%rax), %eax andl $0x2, %eax cmpl $0x0, %eax jne 0x6ef65 movq -0x8(%rbp), %rax cmpb $0x0, 0x7e2(%rax) jne 0x6ef11 movq -0x8(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 callq 0x6ee40 movq -0x8(%rbp), %rdi callq 0x9eab0 movq -0x8(%rbp), %rax movq 0x798(%rax), %rdi callq 0xf7370 movq -0x8(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 callq 0x6ed80 movq -0x8(%rbp), %rdi addq $0x9b8, %rdi # imm = 0x9B8 callq 0x6ed80 movq -0x8(%rbp), %rdi addq $0x980, %rdi # imm = 0x980 callq 0x6ef90 movq -0x8(%rbp), %rdi callq 0xf7370 jmp 0x6ef84 movq -0x8(%rbp), %rax cmpb $0x0, 0x7e2(%rax) jne 0x6ef82 movq -0x8(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 callq 0x6ee40 jmp 0x6ef84 addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
free_maria_share: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp byte ptr [rax+7E2h], 0 jnz short loc_6EEBF jmp short $+2 loc_6EEBB: jmp short $+2 loc_6EEBD: jmp short $+2 loc_6EEBF: mov rax, [rbp+var_8] cmp dword ptr [rax+7A8h], 0 jnz loc_6EF65 mov rax, [rbp+var_8] cmp dword ptr [rax+7ACh], 0 jnz loc_6EF65 mov rax, [rbp+var_8] movzx eax, byte ptr [rax+7D8h] and eax, 2 cmp eax, 0 jnz short loc_6EF65 mov rax, [rbp+var_8] cmp byte ptr [rax+7E2h], 0 jnz short loc_6EF11 mov rdi, [rbp+var_8] add rdi, 8F0h call inline_mysql_mutex_unlock_9 loc_6EF11: mov rdi, [rbp+var_8] call ma_crypt_free mov rax, [rbp+var_8] mov rdi, [rax+798h] call my_free mov rdi, [rbp+var_8] add rdi, 8F0h call inline_mysql_mutex_destroy_1 mov rdi, [rbp+var_8] add rdi, 9B8h call inline_mysql_mutex_destroy_1 mov rdi, [rbp+var_8] add rdi, 980h call inline_mysql_cond_destroy_0 mov rdi, [rbp+var_8] call my_free jmp short loc_6EF84 loc_6EF65: mov rax, [rbp+var_8] cmp byte ptr [rax+7E2h], 0 jnz short loc_6EF82 mov rdi, [rbp+var_8] add rdi, 8F0h call inline_mysql_mutex_unlock_9 loc_6EF82: jmp short $+2 loc_6EF84: add rsp, 10h pop rbp retn
long long free_maria_share(long long a1) { long long result; // rax if ( *(_DWORD *)(a1 + 1960) || *(_DWORD *)(a1 + 1964) || (*(_BYTE *)(a1 + 2008) & 2) != 0 ) { result = a1; if ( !*(_BYTE *)(a1 + 2018) ) return inline_mysql_mutex_unlock_9(a1 + 2288); } else { if ( !*(_BYTE *)(a1 + 2018) ) inline_mysql_mutex_unlock_9(a1 + 2288); ma_crypt_free(a1); my_free(*(_QWORD *)(a1 + 1944)); inline_mysql_mutex_destroy_1(a1 + 2288); inline_mysql_mutex_destroy_1(a1 + 2488); inline_mysql_cond_destroy_0(a1 + 2432); return my_free(a1); } return result; }
free_maria_share: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x7e2],0x0 JNZ 0x0016eebf JMP 0x0016eebb LAB_0016eebb: JMP 0x0016eebd LAB_0016eebd: JMP 0x0016eebf LAB_0016eebf: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x7a8],0x0 JNZ 0x0016ef65 MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x7ac],0x0 JNZ 0x0016ef65 MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x7d8] AND EAX,0x2 CMP EAX,0x0 JNZ 0x0016ef65 MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x7e2],0x0 JNZ 0x0016ef11 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x8f0 CALL 0x0016ee40 LAB_0016ef11: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0019eab0 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x798] CALL 0x001f7370 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x8f0 CALL 0x0016ed80 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x9b8 CALL 0x0016ed80 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x980 CALL 0x0016ef90 MOV RDI,qword ptr [RBP + -0x8] CALL 0x001f7370 JMP 0x0016ef84 LAB_0016ef65: MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x7e2],0x0 JNZ 0x0016ef82 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x8f0 CALL 0x0016ee40 LAB_0016ef82: JMP 0x0016ef84 LAB_0016ef84: ADD RSP,0x10 POP RBP RET
void free_maria_share(long param_1) { if (((*(int *)(param_1 + 0x7a8) == 0) && (*(int *)(param_1 + 0x7ac) == 0)) && ((*(byte *)(param_1 + 0x7d8) & 2) == 0)) { if (*(char *)(param_1 + 0x7e2) == '\0') { inline_mysql_mutex_unlock(param_1 + 0x8f0); } ma_crypt_free(param_1); my_free(*(int8 *)(param_1 + 0x798)); inline_mysql_mutex_destroy(param_1 + 0x8f0); inline_mysql_mutex_destroy(param_1 + 0x9b8); inline_mysql_cond_destroy(param_1 + 0x980); my_free(param_1); } else if (*(char *)(param_1 + 0x7e2) == '\0') { inline_mysql_mutex_unlock(param_1 + 0x8f0); } return; }
23,522
my_uca_coll_init_utf8mb3
eloqsql/strings/ctype-uca.c
static my_bool my_uca_coll_init_utf8mb3(struct charset_info_st *cs, MY_CHARSET_LOADER *loader) { if (my_coll_init_uca(cs, loader)) return TRUE; if (my_uca_collation_can_optimize_no_contractions(cs)) my_uca_handler_map(cs, &my_uca_package_utf8mb3, &my_uca_package_no_contractions_utf8mb3); return FALSE; }
O0
c
my_uca_coll_init_utf8mb3: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x594f0 cmpb $0x0, %al je 0x5a987 movb $0x1, -0x1(%rbp) jmp 0x5a9af movq -0x10(%rbp), %rdi callq 0x654e0 cmpb $0x0, %al je 0x5a9ab movq -0x10(%rbp), %rdi leaq 0x27a341(%rip), %rsi # 0x2d4ce0 leaq 0x27a35a(%rip), %rdx # 0x2d4d00 callq 0x65540 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
my_uca_coll_init_utf8mb3: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call my_coll_init_uca cmp al, 0 jz short loc_5A987 mov [rbp+var_1], 1 jmp short loc_5A9AF loc_5A987: mov rdi, [rbp+var_10] call my_uca_collation_can_optimize_no_contractions cmp al, 0 jz short loc_5A9AB mov rdi, [rbp+var_10] lea rsi, my_uca_package_utf8mb3 lea rdx, my_uca_package_no_contractions_utf8mb3 call my_uca_handler_map loc_5A9AB: mov [rbp+var_1], 0 loc_5A9AF: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char my_uca_coll_init_utf8mb3(long long a1, long long a2) { if ( (unsigned __int8)my_coll_init_uca(a1, a2) ) return 1; if ( (unsigned __int8)my_uca_collation_can_optimize_no_contractions(a1) ) my_uca_handler_map(a1, my_uca_package_utf8mb3, my_uca_package_no_contractions_utf8mb3); return 0; }
my_uca_coll_init_utf8mb3: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001594f0 CMP AL,0x0 JZ 0x0015a987 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0015a9af LAB_0015a987: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001654e0 CMP AL,0x0 JZ 0x0015a9ab MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x3d4ce0] LEA RDX,[0x3d4d00] CALL 0x00165540 LAB_0015a9ab: MOV byte ptr [RBP + -0x1],0x0 LAB_0015a9af: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 my_uca_coll_init_utf8mb3(int8 param_1,int8 param_2) { char cVar1; int1 local_9; cVar1 = my_coll_init_uca(param_1,param_2); if (cVar1 == '\0') { cVar1 = my_uca_collation_can_optimize_no_contractions(param_1); if (cVar1 != '\0') { my_uca_handler_map(param_1,my_uca_package_utf8mb3,my_uca_package_no_contractions_utf8mb3); } local_9 = 0; } else { local_9 = 1; } return local_9; }
23,523
namelist_add
bluesky950520[P]quickjs/qjsc.c
void namelist_add(namelist_t *lp, const char *name, const char *short_name, int flags) { namelist_entry_t *e; if (lp->count == lp->size) { size_t newsize = lp->size + (lp->size >> 1) + 4; namelist_entry_t *a = realloc(lp->array, sizeof(lp->array[0]) * newsize); /* XXX: check for realloc failure */ lp->array = a; lp->size = newsize; } e = &lp->array[lp->count++]; e->name = strdup(name); if (short_name) e->short_name = strdup(short_name); else e->short_name = NULL; e->flags = flags; }
O0
c
namelist_add: subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movq %rdx, 0x20(%rsp) movl %ecx, 0x1c(%rsp) movq 0x30(%rsp), %rax movl 0x8(%rax), %eax movq 0x30(%rsp), %rcx cmpl 0xc(%rcx), %eax jne 0xeb39 movq 0x30(%rsp), %rax movl 0xc(%rax), %eax movq 0x30(%rsp), %rcx movl 0xc(%rcx), %ecx sarl %ecx addl %ecx, %eax addl $0x4, %eax cltq movq %rax, 0x8(%rsp) movq 0x30(%rsp), %rax movq (%rax), %rdi imulq $0x18, 0x8(%rsp), %rsi callq 0xe6d0 movq %rax, (%rsp) movq (%rsp), %rcx movq 0x30(%rsp), %rax movq %rcx, (%rax) movq 0x8(%rsp), %rax movl %eax, %ecx movq 0x30(%rsp), %rax movl %ecx, 0xc(%rax) movq 0x30(%rsp), %rax movq (%rax), %rax movq 0x30(%rsp), %rdx movl 0x8(%rdx), %ecx movl %ecx, %esi addl $0x1, %esi movl %esi, 0x8(%rdx) movslq %ecx, %rcx imulq $0x18, %rcx, %rcx addq %rcx, %rax movq %rax, 0x10(%rsp) movq 0x28(%rsp), %rdi callq 0xe900 movq %rax, %rcx movq 0x10(%rsp), %rax movq %rcx, (%rax) cmpq $0x0, 0x20(%rsp) je 0xeb95 movq 0x20(%rsp), %rdi callq 0xe900 movq %rax, %rcx movq 0x10(%rsp), %rax movq %rcx, 0x8(%rax) jmp 0xeba2 movq 0x10(%rsp), %rax movq $0x0, 0x8(%rax) movl 0x1c(%rsp), %ecx movq 0x10(%rsp), %rax movl %ecx, 0x10(%rax) addq $0x38, %rsp retq nopw %cs:(%rax,%rax)
namelist_add: 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_1C], ecx mov rax, [rsp+38h+var_8] mov eax, [rax+8] mov rcx, [rsp+38h+var_8] cmp eax, [rcx+0Ch] jnz short loc_EB39 mov rax, [rsp+38h+var_8] mov eax, [rax+0Ch] mov rcx, [rsp+38h+var_8] mov ecx, [rcx+0Ch] sar ecx, 1 add eax, ecx add eax, 4 cdqe mov [rsp+38h+var_30], rax mov rax, [rsp+38h+var_8] mov rdi, [rax] imul rsi, [rsp+38h+var_30], 18h call _realloc mov [rsp+38h+var_38], rax mov rcx, [rsp+38h+var_38] mov rax, [rsp+38h+var_8] mov [rax], rcx mov rax, [rsp+38h+var_30] mov ecx, eax mov rax, [rsp+38h+var_8] mov [rax+0Ch], ecx loc_EB39: mov rax, [rsp+38h+var_8] mov rax, [rax] mov rdx, [rsp+38h+var_8] mov ecx, [rdx+8] mov esi, ecx add esi, 1 mov [rdx+8], esi movsxd rcx, ecx imul rcx, 18h add rax, rcx mov [rsp+38h+var_28], rax mov rdi, [rsp+38h+var_10] call _strdup mov rcx, rax mov rax, [rsp+38h+var_28] mov [rax], rcx cmp [rsp+38h+var_18], 0 jz short loc_EB95 mov rdi, [rsp+38h+var_18] call _strdup mov rcx, rax mov rax, [rsp+38h+var_28] mov [rax+8], rcx jmp short loc_EBA2 loc_EB95: mov rax, [rsp+38h+var_28] mov qword ptr [rax+8], 0 loc_EBA2: mov ecx, [rsp+38h+var_1C] mov rax, [rsp+38h+var_28] mov [rax+10h], ecx add rsp, 38h retn
long long namelist_add(int *a1, long long a2, long long a3, int a4) { long long v4; // rax int v5; // ecx long long result; // rax long long v7; // [rsp+8h] [rbp-30h] long long v8; // [rsp+10h] [rbp-28h] if ( a1[2] == a1[3] ) { v7 = (a1[3] >> 1) + a1[3] + 4; *(_QWORD *)a1 = realloc(*(_QWORD *)a1, 24 * v7); a1[3] = v7; } v4 = *(_QWORD *)a1; v5 = a1[2]; a1[2] = v5 + 1; v8 = 24LL * v5 + v4; *(_QWORD *)v8 = strdup(a2); if ( a3 ) *(_QWORD *)(v8 + 8) = strdup(a3); else *(_QWORD *)(v8 + 8) = 0LL; result = v8; *(_DWORD *)(v8 + 16) = a4; return result; }
namelist_add: SUB RSP,0x38 MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x20],RDX MOV dword ptr [RSP + 0x1c],ECX MOV RAX,qword ptr [RSP + 0x30] MOV EAX,dword ptr [RAX + 0x8] MOV RCX,qword ptr [RSP + 0x30] CMP EAX,dword ptr [RCX + 0xc] JNZ 0x0010eb39 MOV RAX,qword ptr [RSP + 0x30] MOV EAX,dword ptr [RAX + 0xc] MOV RCX,qword ptr [RSP + 0x30] MOV ECX,dword ptr [RCX + 0xc] SAR ECX,0x1 ADD EAX,ECX ADD EAX,0x4 CDQE MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x30] MOV RDI,qword ptr [RAX] IMUL RSI,qword ptr [RSP + 0x8],0x18 CALL 0x0010e6d0 MOV qword ptr [RSP],RAX MOV RCX,qword ptr [RSP] MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RSP + 0x8] MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x30] MOV dword ptr [RAX + 0xc],ECX LAB_0010eb39: MOV RAX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX] MOV RDX,qword ptr [RSP + 0x30] MOV ECX,dword ptr [RDX + 0x8] MOV ESI,ECX ADD ESI,0x1 MOV dword ptr [RDX + 0x8],ESI MOVSXD RCX,ECX IMUL RCX,RCX,0x18 ADD RAX,RCX MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0x28] CALL 0x0010e900 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX],RCX CMP qword ptr [RSP + 0x20],0x0 JZ 0x0010eb95 MOV RDI,qword ptr [RSP + 0x20] CALL 0x0010e900 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x8],RCX JMP 0x0010eba2 LAB_0010eb95: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x8],0x0 LAB_0010eba2: MOV ECX,dword ptr [RSP + 0x1c] MOV RAX,qword ptr [RSP + 0x10] MOV dword ptr [RAX + 0x10],ECX ADD RSP,0x38 RET
void namelist_add(long *param_1,char *param_2,char *param_3,int4 param_4) { long lVar1; int iVar2; void *pvVar3; int8 *puVar4; char *pcVar5; if ((int)param_1[1] == *(int *)((long)param_1 + 0xc)) { iVar2 = *(int *)((long)param_1 + 0xc) + (*(int *)((long)param_1 + 0xc) >> 1) + 4; pvVar3 = realloc((void *)*param_1,(long)iVar2 * 0x18); *param_1 = (long)pvVar3; *(int *)((long)param_1 + 0xc) = iVar2; } lVar1 = param_1[1]; *(int *)(param_1 + 1) = (int)lVar1 + 1; puVar4 = (int8 *)(*param_1 + (long)(int)lVar1 * 0x18); pcVar5 = strdup(param_2); *puVar4 = pcVar5; if (param_3 == (char *)0x0) { puVar4[1] = 0; } else { pcVar5 = strdup(param_3); puVar4[1] = pcVar5; } *(int4 *)(puVar4 + 2) = param_4; return; }
23,524
namelist_add
bluesky950520[P]quickjs/qjsc.c
void namelist_add(namelist_t *lp, const char *name, const char *short_name, int flags) { namelist_entry_t *e; if (lp->count == lp->size) { size_t newsize = lp->size + (lp->size >> 1) + 4; namelist_entry_t *a = realloc(lp->array, sizeof(lp->array[0]) * newsize); /* XXX: check for realloc failure */ lp->array = a; lp->size = newsize; } e = &lp->array[lp->count++]; e->name = strdup(name); if (short_name) e->short_name = strdup(short_name); else e->short_name = NULL; e->flags = flags; }
O1
c
namelist_add: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movl %ecx, %ebx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %r12 movl 0xc(%rdi), %eax cmpl %eax, 0x8(%rdi) jne 0x13b22 movl %eax, %ecx sarl %ecx addl %ecx, %eax addl $0x4, %eax movslq %eax, %r13 movq (%r12), %rdi leaq (,%r13,8), %rax leaq (%rax,%rax,2), %rsi callq 0xe6e0 movq %rax, (%r12) movl %r13d, 0xc(%r12) movq (%r12), %rax movslq 0x8(%r12), %rcx leal 0x1(%rcx), %edx movl %edx, 0x8(%r12) leaq (%rcx,%rcx,2), %rcx leaq (%rax,%rcx,8), %r12 movq %r15, %rdi callq 0xe910 movq %rax, (%r12) testq %r14, %r14 je 0x13b56 movq %r14, %rdi callq 0xe910 jmp 0x13b58 xorl %eax, %eax movq %rax, 0x8(%r12) movl %ebx, 0x10(%r12) popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
namelist_add: push r15 push r14 push r13 push r12 push rbx mov ebx, ecx mov r14, rdx mov r15, rsi mov r12, rdi mov eax, [rdi+0Ch] cmp [rdi+8], eax jnz short loc_13B22 mov ecx, eax sar ecx, 1 add eax, ecx add eax, 4 movsxd r13, eax mov rdi, [r12] lea rax, ds:0[r13*8] lea rsi, [rax+rax*2] call _realloc mov [r12], rax mov [r12+0Ch], r13d loc_13B22: mov rax, [r12] movsxd rcx, dword ptr [r12+8] lea edx, [rcx+1] mov [r12+8], edx lea rcx, [rcx+rcx*2] lea r12, [rax+rcx*8] mov rdi, r15 call _strdup mov [r12], rax test r14, r14 jz short loc_13B56 mov rdi, r14 call _strdup jmp short loc_13B58 loc_13B56: xor eax, eax loc_13B58: mov [r12+8], rax mov [r12+10h], ebx pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long namelist_add(long long *a1, long long a2, long long a3, int a4) { int v6; // eax long long v7; // r13 long long v8; // rax long long v9; // rcx long long v10; // r12 long long result; // rax v6 = *((_DWORD *)a1 + 3); if ( *((_DWORD *)a1 + 2) == v6 ) { v7 = (v6 >> 1) + v6 + 4; *a1 = realloc(*a1, 24 * v7); *((_DWORD *)a1 + 3) = v7; } v8 = *a1; v9 = *((int *)a1 + 2); *((_DWORD *)a1 + 2) = v9 + 1; v10 = v8 + 24 * v9; *(_QWORD *)v10 = strdup(a2); if ( a3 ) result = strdup(a3); else result = 0LL; *(_QWORD *)(v10 + 8) = result; *(_DWORD *)(v10 + 16) = a4; return result; }
23,525
namelist_add
bluesky950520[P]quickjs/qjsc.c
void namelist_add(namelist_t *lp, const char *name, const char *short_name, int flags) { namelist_entry_t *e; if (lp->count == lp->size) { size_t newsize = lp->size + (lp->size >> 1) + 4; namelist_entry_t *a = realloc(lp->array, sizeof(lp->array[0]) * newsize); /* XXX: check for realloc failure */ lp->array = a; lp->size = newsize; } e = &lp->array[lp->count++]; e->name = strdup(name); if (short_name) e->short_name = strdup(short_name); else e->short_name = NULL; e->flags = flags; }
O2
c
namelist_add: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %ecx, %ebx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %r13 movl 0x8(%rdi), %eax movq (%rdi), %r12 cmpl 0xc(%rdi), %eax jne 0xeb34 movl %eax, %ecx sarl %ecx addl %ecx, %eax addl $0x4, %eax movslq %eax, %rbp imulq $0x18, %rbp, %rsi movq %r12, %rdi callq 0xe700 movq %rax, %r12 movq %rax, (%r13) movl %ebp, 0xc(%r13) movl 0x8(%r13), %eax leal 0x1(%rax), %ecx movl %ecx, 0x8(%r13) cltq imulq $0x18, %rax, %rbp leaq (%r12,%rbp), %r13 movq %r15, %rdi callq 0xe930 movq %rax, (%r12,%rbp) testq %r14, %r14 je 0xeb60 movq %r14, %rdi callq 0xe930 jmp 0xeb62 xorl %eax, %eax movq %rax, 0x8(%r13) movl %ebx, 0x10(%r13) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
namelist_add: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov ebx, ecx mov r14, rdx mov r15, rsi mov r13, rdi mov eax, [rdi+8] mov r12, [rdi] cmp eax, [rdi+0Ch] jnz short loc_EB34 mov ecx, eax sar ecx, 1 add eax, ecx add eax, 4 movsxd rbp, eax imul rsi, rbp, 18h mov rdi, r12 call _realloc mov r12, rax mov [r13+0], rax mov [r13+0Ch], ebp mov eax, [r13+8] loc_EB34: lea ecx, [rax+1] mov [r13+8], ecx cdqe imul rbp, rax, 18h lea r13, [r12+rbp] mov rdi, r15 call _strdup mov [r12+rbp], rax test r14, r14 jz short loc_EB60 mov rdi, r14 call _strdup jmp short loc_EB62 loc_EB60: xor eax, eax loc_EB62: mov [r13+8], rax mov [r13+10h], ebx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long namelist_add(long long *a1, long long a2, long long a3, int a4) { int v6; // eax long long v7; // r12 long long v8; // rbp long long v9; // r13 long long result; // rax v6 = *((_DWORD *)a1 + 2); v7 = *a1; if ( v6 == *((_DWORD *)a1 + 3) ) { v8 = (v6 >> 1) + v6 + 4; v7 = realloc(*a1, 24 * v8); *a1 = v7; *((_DWORD *)a1 + 3) = v8; v6 = *((_DWORD *)a1 + 2); } *((_DWORD *)a1 + 2) = v6 + 1; v9 = v7 + 24LL * v6; *(_QWORD *)v9 = strdup(a2); if ( a3 ) result = strdup(a3); else result = 0LL; *(_QWORD *)(v9 + 8) = result; *(_DWORD *)(v9 + 16) = a4; return result; }
JS_NewObjectFromShape: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R12D,EDX MOV R15,RSI MOV RBX,RDI MOV R14,qword ptr [RDI + 0x18] MOV RAX,qword ptr [R14 + 0x30] ADD RAX,0x48 CMP RAX,qword ptr [R14 + 0xd0] JBE 0x0011eb2e MOV RDI,R14 CALL 0x0011bb2d MOV RAX,qword ptr [R14 + 0x30] MOV RCX,RAX SHR RCX,0x1 ADD RCX,RAX MOV qword ptr [R14 + 0xd0],RCX LAB_0011eb2e: PUSH 0x48 POP RSI MOV RDI,RBX CALL 0x0011ac04 TEST RAX,RAX JZ 0x0011ec60 MOV R14,RAX MOV word ptr [RAX + 0x6],R12W MOV byte ptr [RAX + 0x5],0x1 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x28],XMM0 MOV qword ptr [RAX + 0x18],R15 MOVSXD RSI,dword ptr [R15 + 0x24] SHL RSI,0x4 MOV RDI,RBX CALL 0x0011ac04 MOV qword ptr [R14 + 0x20],RAX TEST RAX,RAX JZ 0x0011ec55 LEA ECX,[R12 + -0x1] CMP ECX,0x21 JA 0x0011ebae LEA RDX,[0x18c858] MOVSXD RCX,dword ptr [RDX + RCX*0x4] ADD RCX,RDX switchD: JMP RCX caseD_8: OR byte ptr [R14 + 0x5],0xc caseD_21: AND qword ptr [R14 + 0x38],0x0 AND dword ptr [R14 + 0x40],0x0 JMP 0x0011ebcd caseD_4: AND dword ptr [R14 + 0x30],0x0 MOV qword ptr [R14 + 0x38],0x3 caseD_3: MOV RAX,qword ptr [RBX + 0x18] MOV RAX,qword ptr [RAX + 0x80] MOV ECX,R12D IMUL RCX,RCX,0x28 CMP qword ptr [RAX + RCX*0x1 + 0x20],0x0 JZ 0x0011ebcd OR byte ptr [R14 + 0x5],0x4 caseD_1: MOV dword ptr [R14],0x1 MOV RAX,qword ptr [RBX + 0x18] MOV byte ptr [R14 + 0x4],0x0 MOV RCX,R14 ADD RCX,0x8 LEA RDX,[RAX + 0x98] MOV RSI,qword ptr [RAX + 0x98] MOV qword ptr [RSI + 0x8],RCX MOV qword ptr [R14 + 0x8],RSI MOV qword ptr [R14 + 0x10],RDX MOV qword ptr [RAX + 0x98],RCX PUSH -0x1 POP RDX LAB_0011ec08: MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET caseD_12: LEA RAX,[R14 + 0x30] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 JMP 0x0011ebae caseD_c: AND dword ptr [RAX],0x0 MOV qword ptr [RAX + 0x8],0x3 JMP 0x0011ebcd caseD_2: OR byte ptr [R14 + 0x5],0xc AND qword ptr [R14 + 0x38],0x0 AND dword ptr [R14 + 0x40],0x0 AND dword ptr [R14 + 0x30],0x0 CMP qword ptr [RBX + 0x38],R15 JNZ 0x0011ec74 LAB_0011ec4a: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 JMP 0x0011ebcd LAB_0011ec55: MOV RDI,RBX MOV RSI,R14 CALL 0x0011ac5e LAB_0011ec60: MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R15 CALL 0x00138498 PUSH 0x6 POP RDX XOR R14D,R14D JMP 0x0011ec08 LAB_0011ec74: PUSH 0x32 POP RDX PUSH 0xa POP RCX MOV RDI,RBX MOV RSI,R14 CALL 0x0013870a JMP 0x0011ec4a
int1 [16] JS_NewObjectFromShape(long param_1,long param_2,uint param_3) { long lVar1; long lVar2; int4 *puVar3; int8 *puVar4; int1 auVar5 [16]; int8 uStack_30; lVar1 = *(long *)(param_1 + 0x18); if (*(ulong *)(lVar1 + 0xd0) < *(long *)(lVar1 + 0x30) + 0x48U) { JS_RunGC(lVar1); *(ulong *)(lVar1 + 0xd0) = (*(ulong *)(lVar1 + 0x30) >> 1) + *(ulong *)(lVar1 + 0x30); } puVar3 = (int4 *)js_malloc(param_1,0x48); if (puVar3 == (int4 *)0x0) { LAB_0011ec60: js_free_shape(*(int8 *)(param_1 + 0x18),param_2); uStack_30 = 6; puVar3 = (int4 *)0x0; goto LAB_0011ec08; } *(short *)((long)puVar3 + 6) = (short)param_3; *(int1 *)((long)puVar3 + 5) = 1; *(int8 *)(puVar3 + 10) = 0; *(int8 *)(puVar3 + 0xc) = 0; *(long *)(puVar3 + 6) = param_2; puVar4 = (int8 *)js_malloc(param_1,(long)*(int *)(param_2 + 0x24) << 4); *(int8 **)(puVar3 + 8) = puVar4; if (puVar4 == (int8 *)0x0) { js_free(param_1,puVar3); goto LAB_0011ec60; } switch(param_3) { case 1: break; case 2: *(byte *)((long)puVar3 + 5) = *(byte *)((long)puVar3 + 5) | 0xc; *(int8 *)(puVar3 + 0xe) = 0; puVar3[0x10] = 0; puVar3[0xc] = 0; if (*(long *)(param_1 + 0x38) != param_2) { puVar4 = (int8 *)add_property(param_1,puVar3,0x32,10); } *puVar4 = 0; puVar4[1] = 0; break; default: goto switchD_0011eb8e_caseD_3; case 4: case 5: case 6: case 7: case 10: case 0x22: puVar3[0xc] = 0; *(int8 *)(puVar3 + 0xe) = 3; goto switchD_0011eb8e_caseD_3; case 8: case 0x15: case 0x16: case 0x17: case 0x18: case 0x19: case 0x1a: case 0x1b: case 0x1c: case 0x1d: case 0x1e: case 0x1f: case 0x20: *(byte *)((long)puVar3 + 5) = *(byte *)((long)puVar3 + 5) | 0xc; case 0x21: *(int8 *)(puVar3 + 0xe) = 0; puVar3[0x10] = 0; break; case 0xc: *(int4 *)puVar4 = 0; puVar4[1] = 3; break; case 0x12: *(int8 *)(puVar3 + 0xc) = 0; *(int8 *)(puVar3 + 0xe) = 0; switchD_0011eb8e_caseD_3: if (*(long *)(*(long *)(*(long *)(param_1 + 0x18) + 0x80) + 0x20 + (ulong)param_3 * 0x28) != 0) { *(byte *)((long)puVar3 + 5) = *(byte *)((long)puVar3 + 5) | 4; } } *puVar3 = 1; lVar1 = *(long *)(param_1 + 0x18); *(int1 *)(puVar3 + 1) = 0; lVar2 = *(long *)(lVar1 + 0x98); *(int4 **)(lVar2 + 8) = puVar3 + 2; *(long *)(puVar3 + 2) = lVar2; *(long *)(puVar3 + 4) = lVar1 + 0x98; *(int4 **)(lVar1 + 0x98) = puVar3 + 2; uStack_30 = 0xffffffffffffffff; LAB_0011ec08: auVar5._8_8_ = uStack_30; auVar5._0_8_ = puVar3; return auVar5; }
23,526
Item_func_eq::build_equal_items(THD*, COND_EQUAL*, bool, COND_EQUAL**)
eloqsql/sql/sql_select.cc
COND *Item_func_eq::build_equal_items(THD *thd, COND_EQUAL *inherited, bool link_item_fields, COND_EQUAL **cond_equal_ref) { COND_EQUAL cond_equal; cond_equal.upper_levels= inherited; List<Item> eq_list; DBUG_ASSERT(!cond_equal_ref || !cond_equal_ref[0]); /* If an equality predicate forms the whole and level, we call it standalone equality and it's processed here. E.g. in the following where condition WHERE a=5 AND (b=5 or a=c) (b=5) and (a=c) are standalone equalities. In general we can't leave alone standalone eqalities: for WHERE a=b AND c=d AND (b=c OR d=5) b=c is replaced by =(a,b,c,d). */ if (Item_func_eq::check_equality(thd, &cond_equal, &eq_list)) { Item_equal *item_equal; int n= cond_equal.current_level.elements + eq_list.elements; if (n == 0) return (Item*) &Item_true; else if (n == 1) { if ((item_equal= cond_equal.current_level.pop())) { item_equal->fix_fields(thd, NULL); item_equal->update_used_tables(); set_if_bigger(thd->lex->current_select->max_equal_elems, item_equal->n_field_items()); item_equal->upper_levels= inherited; if (cond_equal_ref) *cond_equal_ref= new (thd->mem_root) COND_EQUAL(item_equal, thd->mem_root); return item_equal; } Item *res= eq_list.pop(); res->update_used_tables(); DBUG_ASSERT(res->type() == FUNC_ITEM); return res; } else { /* Here a new AND level must be created. It can happen only when a row equality is processed as a standalone predicate. */ Item_cond_and *and_cond= new (thd->mem_root) Item_cond_and(thd, eq_list); and_cond->quick_fix_field(); List<Item> *cond_args= and_cond->argument_list(); List_iterator_fast<Item_equal> it(cond_equal.current_level); while ((item_equal= it++)) { if (item_equal->fix_length_and_dec()) return NULL; item_equal->update_used_tables(); set_if_bigger(thd->lex->current_select->max_equal_elems, item_equal->n_field_items()); } and_cond->m_cond_equal.copy(cond_equal); cond_equal.current_level= and_cond->m_cond_equal.current_level; cond_args->append((List<Item> *)&cond_equal.current_level); and_cond->update_used_tables(); if (cond_equal_ref) *cond_equal_ref= &and_cond->m_cond_equal; return and_cond; } } return Item_func::build_equal_items(thd, inherited, link_item_fields, cond_equal_ref); }
O0
cpp
Item_func_eq::build_equal_items(THD*, COND_EQUAL*, bool, COND_EQUAL**): pushq %rbp movq %rsp, %rbp subq $0x160, %rsp # imm = 0x160 movb %cl, %al movq %fs:0x28, %rcx movq %rcx, -0x8(%rbp) movq %rdi, -0x58(%rbp) movq %rsi, -0x60(%rbp) movq %rdx, -0x68(%rbp) andb $0x1, %al movb %al, -0x69(%rbp) movq %r8, -0x78(%rbp) movq -0x58(%rbp), %rax movq %rax, -0x108(%rbp) leaq -0x30(%rbp), %rdi callq 0x570ba0 movq -0x68(%rbp), %rax movq %rax, -0x28(%rbp) leaq -0x48(%rbp), %rdi callq 0x4b3f80 jmp 0x627416 movq -0x108(%rbp), %rdi movq -0x60(%rbp), %rsi leaq -0x30(%rbp), %rdx leaq -0x48(%rbp), %rcx callq 0x626c20 testb $0x1, %al jne 0x627437 jmp 0x627822 movl -0x10(%rbp), %eax addl -0x38(%rbp), %eax movl %eax, -0x84(%rbp) cmpl $0x0, -0x84(%rbp) jne 0x62745c leaq 0xfc9c6d(%rip), %rax # 0x15f10c0 movq %rax, -0x50(%rbp) jmp 0x627846 cmpl $0x1, -0x84(%rbp) jne 0x627612 leaq -0x30(%rbp), %rdi addq $0x10, %rdi callq 0x647320 movq %rax, -0x80(%rbp) cmpq $0x0, %rax je 0x6275e0 movq -0x80(%rbp), %rdi movq -0x60(%rbp), %rsi movq (%rdi), %rax xorl %ecx, %ecx movl %ecx, %edx callq *0x48(%rax) movq -0x80(%rbp), %rdi movq (%rdi), %rax callq *0x228(%rax) movq -0x60(%rbp), %rax movq 0x58(%rax), %rax movq 0xd28(%rax), %rax movl 0x3b4(%rax), %eax movl %eax, -0x10c(%rbp) movq -0x80(%rbp), %rdi callq 0x6471e0 movl %eax, %ecx movl -0x10c(%rbp), %eax cmpl %ecx, %eax jae 0x6274f3 movq -0x80(%rbp), %rdi callq 0x6471e0 movl %eax, %ecx movq -0x60(%rbp), %rax movq 0x58(%rax), %rax movq 0xd28(%rax), %rax movl %ecx, 0x3b4(%rax) jmp 0x6274f5 movq -0x68(%rbp), %rcx movq -0x80(%rbp), %rax movq %rcx, 0x100(%rax) cmpq $0x0, -0x78(%rbp) je 0x6275d3 movq -0x60(%rbp), %rax movq 0x28(%rax), %rsi movq %rsi, -0x128(%rbp) movl $0x28, %edi callq 0x4a34d0 movq %rax, %rcx movq %rcx, -0x120(%rbp) movb $0x0, -0x99(%rbp) xorl %eax, %eax cmpq $0x0, %rcx movq %rax, -0x118(%rbp) je 0x62758e movq -0x120(%rbp), %rdi movq -0x128(%rbp), %rax movq %rdi, -0x90(%rbp) movq %rax, -0x98(%rbp) movb $0x1, -0x99(%rbp) movq -0x80(%rbp), %rsi movq -0x60(%rbp), %rax movq 0x28(%rax), %rdx callq 0x5aa580 jmp 0x62757e movq -0x120(%rbp), %rax movq %rax, -0x118(%rbp) jmp 0x62758e movq -0x118(%rbp), %rcx movq -0x78(%rbp), %rax movq %rcx, (%rax) jmp 0x6275d3 movq %rax, %rcx movl %edx, %eax movq %rcx, -0xa8(%rbp) movl %eax, -0xac(%rbp) testb $0x1, -0x99(%rbp) jne 0x6275bb jmp 0x6275ce movq -0x90(%rbp), %rdi movq -0x98(%rbp), %rsi callq 0x4a3510 jmp 0x627873 movq -0x80(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0x627846 leaq -0x48(%rbp), %rdi callq 0x644a00 movq %rax, -0xb8(%rbp) movq -0xb8(%rbp), %rdi movq (%rdi), %rax callq *0x228(%rax) jmp 0x627602 movq -0xb8(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0x627846 movq -0x60(%rbp), %rax movq 0x28(%rax), %rsi movq %rsi, -0x140(%rbp) movl $0x100, %edi # imm = 0x100 callq 0x4b54b0 movq %rax, %rcx movq %rcx, -0x138(%rbp) movb $0x0, -0xd1(%rbp) xorl %eax, %eax cmpq $0x0, %rcx movq %rax, -0x130(%rbp) je 0x62768d movq -0x138(%rbp), %rdi movq -0x140(%rbp), %rax movq %rdi, -0xc8(%rbp) movq %rax, -0xd0(%rbp) movb $0x1, -0xd1(%rbp) movq -0x60(%rbp), %rsi leaq -0x48(%rbp), %rdx callq 0x644a20 jmp 0x62767d movq -0x138(%rbp), %rax movq %rax, -0x130(%rbp) jmp 0x62768d movq -0x130(%rbp), %rax movq %rax, -0xc0(%rbp) movq -0xc0(%rbp), %rdi callq 0x9553a0 movq -0xc0(%rbp), %rdi callq 0x5706f0 movq %rax, -0xe0(%rbp) leaq -0x30(%rbp), %rsi addq $0x10, %rsi leaq -0x100(%rbp), %rdi callq 0x5aa440 leaq -0x100(%rbp), %rdi xorl %esi, %esi callq 0x5aa470 movq %rax, -0x80(%rbp) cmpq $0x0, %rax je 0x6277a3 movq -0x80(%rbp), %rdi movq (%rdi), %rax callq *0x620(%rax) testb $0x1, %al jne 0x6276fd jmp 0x62773f movq $0x0, -0x50(%rbp) jmp 0x627846 movq %rax, %rcx movl %edx, %eax movq %rcx, -0xa8(%rbp) movl %eax, -0xac(%rbp) testb $0x1, -0xd1(%rbp) jne 0x627727 jmp 0x62773a movq -0xc8(%rbp), %rdi movq -0xd0(%rbp), %rsi callq 0x4b5570 jmp 0x627873 movq -0x80(%rbp), %rdi movq (%rdi), %rax callq *0x228(%rax) movq -0x60(%rbp), %rax movq 0x58(%rax), %rax movq 0xd28(%rax), %rax movl 0x3b4(%rax), %eax movl %eax, -0x144(%rbp) movq -0x80(%rbp), %rdi callq 0x6471e0 movl %eax, %ecx movl -0x144(%rbp), %eax cmpl %ecx, %eax jae 0x62779c movq -0x80(%rbp), %rdi callq 0x6471e0 movl %eax, %ecx movq -0x60(%rbp), %rax movq 0x58(%rax), %rax movq 0xd28(%rax), %rax movl %ecx, 0x3b4(%rax) jmp 0x62779e jmp 0x6276ce movq -0xc0(%rbp), %rdi addq $0xd8, %rdi leaq -0x30(%rbp), %rsi callq 0x647210 movq -0xc0(%rbp), %rsi addq $0xd8, %rsi addq $0x10, %rsi leaq -0x30(%rbp), %rdi addq $0x10, %rdi callq 0x647280 movq -0xe0(%rbp), %rdi leaq -0x30(%rbp), %rsi addq $0x10, %rsi callq 0x6472b0 movq -0xc0(%rbp), %rdi callq 0x6472e0 cmpq $0x0, -0x78(%rbp) je 0x627815 movq -0xc0(%rbp), %rcx addq $0xd8, %rcx movq -0x78(%rbp), %rax movq %rcx, (%rax) movq -0xc0(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0x627846 movq -0x108(%rbp), %rdi movq -0x60(%rbp), %rsi movq -0x68(%rbp), %rdx movb -0x69(%rbp), %al movq -0x78(%rbp), %r8 andb $0x1, %al movzbl %al, %ecx callq 0x6278b0 movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movq %rax, -0x150(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x62789f movq -0x150(%rbp), %rax addq $0x160, %rsp # imm = 0x160 popq %rbp retq movq -0xa8(%rbp), %rax movq %rax, -0x158(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x62789f movq -0x158(%rbp), %rdi callq 0x433ff0 callq 0x433650 nopw %cs:(%rax,%rax)
_ZN12Item_func_eq17build_equal_itemsEP3THDP10COND_EQUALbPS3_: push rbp mov rbp, rsp sub rsp, 160h mov al, cl mov rcx, fs:28h mov [rbp+var_8], rcx mov [rbp+var_58], rdi mov [rbp+var_60], rsi mov [rbp+var_68], rdx and al, 1 mov [rbp+var_69], al mov [rbp+var_78], r8 mov rax, [rbp+var_58] mov [rbp+var_108], rax lea rdi, [rbp+var_30]; this call _ZN10COND_EQUALC2Ev; COND_EQUAL::COND_EQUAL(void) mov rax, [rbp+var_68] mov [rbp+var_28], rax lea rdi, [rbp+var_48] call _ZN4ListI4ItemEC2Ev; List<Item>::List(void) jmp short $+2 loc_627416: mov rdi, [rbp+var_108] mov rsi, [rbp+var_60] lea rdx, [rbp+var_30] lea rcx, [rbp+var_48] call _ZN12Item_func_eq14check_equalityEP3THDP10COND_EQUALP4ListI4ItemE; Item_func_eq::check_equality(THD *,COND_EQUAL *,List<Item> *) test al, 1 jnz short loc_627437 jmp loc_627822 loc_627437: mov eax, [rbp+var_10] add eax, [rbp+var_38] mov [rbp+var_84], eax cmp [rbp+var_84], 0 jnz short loc_62745C lea rax, Item_true mov [rbp+var_50], rax jmp loc_627846 loc_62745C: cmp [rbp+var_84], 1 jnz loc_627612 lea rdi, [rbp+var_30] add rdi, 10h call _ZN4ListI10Item_equalE3popEv; List<Item_equal>::pop(void) mov [rbp+var_80], rax cmp rax, 0 jz loc_6275E0 mov rdi, [rbp+var_80] mov rsi, [rbp+var_60] mov rax, [rdi] xor ecx, ecx mov edx, ecx call qword ptr [rax+48h] mov rdi, [rbp+var_80] mov rax, [rdi] call qword ptr [rax+228h] mov rax, [rbp+var_60] mov rax, [rax+58h] mov rax, [rax+0D28h] mov eax, [rax+3B4h] mov [rbp+var_10C], eax mov rdi, [rbp+var_80]; this call _ZN10Item_equal13n_field_itemsEv; Item_equal::n_field_items(void) mov ecx, eax mov eax, [rbp+var_10C] cmp eax, ecx jnb short loc_6274F3 mov rdi, [rbp+var_80]; this call _ZN10Item_equal13n_field_itemsEv; Item_equal::n_field_items(void) mov ecx, eax mov rax, [rbp+var_60] mov rax, [rax+58h] mov rax, [rax+0D28h] mov [rax+3B4h], ecx loc_6274F3: jmp short $+2 loc_6274F5: mov rcx, [rbp+var_68] mov rax, [rbp+var_80] mov [rax+100h], rcx cmp [rbp+var_78], 0 jz loc_6275D3 mov rax, [rbp+var_60] mov rsi, [rax+28h] mov [rbp+var_128], rsi mov edi, 28h ; '(' call _ZN9Sql_allocnwEmP11st_mem_root; Sql_alloc::operator new(ulong,st_mem_root *) mov rcx, rax mov [rbp+var_120], rcx mov [rbp+var_99], 0 xor eax, eax cmp rcx, 0 mov [rbp+var_118], rax jz short loc_62758E mov rdi, [rbp+var_120] mov rax, [rbp+var_128] mov [rbp+var_90], rdi mov [rbp+var_98], rax mov [rbp+var_99], 1 mov rsi, [rbp+var_80] mov rax, [rbp+var_60] mov rdx, [rax+28h] call _ZN10COND_EQUALC2EP10Item_equalP11st_mem_root; COND_EQUAL::COND_EQUAL(Item_equal *,st_mem_root *) jmp short $+2 loc_62757E: mov rax, [rbp+var_120] mov [rbp+var_118], rax jmp short $+2 loc_62758E: mov rcx, [rbp+var_118] mov rax, [rbp+var_78] mov [rax], rcx jmp short loc_6275D3 mov rcx, rax mov eax, edx mov [rbp+var_A8], rcx mov [rbp+var_AC], eax test [rbp+var_99], 1 jnz short loc_6275BB jmp short loc_6275CE loc_6275BB: mov rdi, [rbp+var_90] mov rsi, [rbp+var_98] call _ZN9Sql_allocdlEPvP11st_mem_root; Sql_alloc::operator delete(void *,st_mem_root *) loc_6275CE: jmp loc_627873 loc_6275D3: mov rax, [rbp+var_80] mov [rbp+var_50], rax jmp loc_627846 loc_6275E0: lea rdi, [rbp+var_48] call _ZN4ListI4ItemE3popEv; List<Item>::pop(void) mov [rbp+var_B8], rax mov rdi, [rbp+var_B8] mov rax, [rdi] call qword ptr [rax+228h] jmp short $+2 loc_627602: mov rax, [rbp+var_B8] mov [rbp+var_50], rax jmp loc_627846 loc_627612: mov rax, [rbp+var_60] mov rsi, [rax+28h] mov [rbp+var_140], rsi mov edi, 100h call _ZN4ItemnwEmP11st_mem_root; Item::operator new(ulong,st_mem_root *) mov rcx, rax mov [rbp+var_138], rcx mov [rbp+var_D1], 0 xor eax, eax cmp rcx, 0 mov [rbp+var_130], rax jz short loc_62768D mov rdi, [rbp+var_138] mov rax, [rbp+var_140] mov [rbp+var_C8], rdi mov [rbp+var_D0], rax mov [rbp+var_D1], 1 mov rsi, [rbp+var_60] lea rdx, [rbp+var_48] call _ZN13Item_cond_andC2EP3THDR4ListI4ItemE; Item_cond_and::Item_cond_and(THD *,List<Item> &) jmp short $+2 loc_62767D: mov rax, [rbp+var_138] mov [rbp+var_130], rax jmp short $+2 loc_62768D: mov rax, [rbp+var_130] mov [rbp+var_C0], rax mov rdi, [rbp+var_C0]; this call _ZN9Item_func15quick_fix_fieldEv; Item_func::quick_fix_field(void) mov rdi, [rbp+var_C0]; this call _ZN9Item_cond13argument_listEv; Item_cond::argument_list(void) mov [rbp+var_E0], rax lea rsi, [rbp+var_30] add rsi, 10h lea rdi, [rbp+var_100] call _ZN18List_iterator_fastI10Item_equalEC2ER4ListIS0_E; List_iterator_fast<Item_equal>::List_iterator_fast(List<Item_equal> &) loc_6276CE: lea rdi, [rbp+var_100] xor esi, esi call _ZN18List_iterator_fastI10Item_equalEppEi; List_iterator_fast<Item_equal>::operator++(int) mov [rbp+var_80], rax cmp rax, 0 jz loc_6277A3 mov rdi, [rbp+var_80] mov rax, [rdi] call qword ptr [rax+620h] test al, 1 jnz short loc_6276FD jmp short loc_62773F loc_6276FD: mov [rbp+var_50], 0 jmp loc_627846 mov rcx, rax mov eax, edx mov [rbp+var_A8], rcx mov [rbp+var_AC], eax test [rbp+var_D1], 1 jnz short loc_627727 jmp short loc_62773A loc_627727: mov rdi, [rbp+var_C8] mov rsi, [rbp+var_D0] call _ZN4ItemdlEPvP11st_mem_root; Item::operator delete(void *,st_mem_root *) loc_62773A: jmp loc_627873 loc_62773F: mov rdi, [rbp+var_80] mov rax, [rdi] call qword ptr [rax+228h] mov rax, [rbp+var_60] mov rax, [rax+58h] mov rax, [rax+0D28h] mov eax, [rax+3B4h] mov [rbp+var_144], eax mov rdi, [rbp+var_80]; this call _ZN10Item_equal13n_field_itemsEv; Item_equal::n_field_items(void) mov ecx, eax mov eax, [rbp+var_144] cmp eax, ecx jnb short loc_62779C mov rdi, [rbp+var_80]; this call _ZN10Item_equal13n_field_itemsEv; Item_equal::n_field_items(void) mov ecx, eax mov rax, [rbp+var_60] mov rax, [rax+58h] mov rax, [rax+0D28h] mov [rax+3B4h], ecx loc_62779C: jmp short $+2 loc_62779E: jmp loc_6276CE loc_6277A3: mov rdi, [rbp+var_C0] add rdi, 0D8h; this lea rsi, [rbp+var_30]; COND_EQUAL * call _ZN10COND_EQUAL4copyERS_; COND_EQUAL::copy(COND_EQUAL&) mov rsi, [rbp+var_C0] add rsi, 0D8h add rsi, 10h lea rdi, [rbp+var_30] add rdi, 10h call _ZN4ListI10Item_equalEaSERKS1_; List<Item_equal>::operator=(List<Item_equal> const&) mov rdi, [rbp+var_E0] lea rsi, [rbp+var_30] add rsi, 10h call _ZN4ListI4ItemE6appendEPS1_; List<Item>::append(List<Item>*) mov rdi, [rbp+var_C0]; this call _ZN9Item_cond18update_used_tablesEv; Item_cond::update_used_tables(void) cmp [rbp+var_78], 0 jz short loc_627815 mov rcx, [rbp+var_C0] add rcx, 0D8h mov rax, [rbp+var_78] mov [rax], rcx loc_627815: mov rax, [rbp+var_C0] mov [rbp+var_50], rax jmp short loc_627846 loc_627822: mov rdi, [rbp+var_108]; this mov rsi, [rbp+var_60]; THD * mov rdx, [rbp+var_68]; COND_EQUAL * mov al, [rbp+var_69] mov r8, [rbp+var_78]; COND_EQUAL ** and al, 1 movzx ecx, al; bool call _ZN9Item_func17build_equal_itemsEP3THDP10COND_EQUALbPS3_; Item_func::build_equal_items(THD *,COND_EQUAL *,bool,COND_EQUAL **) mov [rbp+var_50], rax loc_627846: mov rax, [rbp+var_50] mov [rbp+var_150], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_62789F mov rax, [rbp+var_150] add rsp, 160h pop rbp retn loc_627873: mov rax, [rbp+var_A8] mov [rbp+var_158], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_62789F mov rdi, [rbp+var_158] call __Unwind_Resume loc_62789F: call ___stack_chk_fail
Item_cond * Item_func_eq::build_equal_items( Item_func_eq *this, THD *a2, COND_EQUAL *a3, char a4, COND_EQUAL **a5) { int v5; // eax unsigned int v7; // [rsp+1Ch] [rbp-144h] long long v8; // [rsp+20h] [rbp-140h] long long v9; // [rsp+28h] [rbp-138h] Item_cond *v10; // [rsp+30h] [rbp-130h] long long v11; // [rsp+38h] [rbp-128h] long long v12; // [rsp+40h] [rbp-120h] COND_EQUAL *v13; // [rsp+48h] [rbp-118h] unsigned int v14; // [rsp+54h] [rbp-10Ch] _BYTE v15[32]; // [rsp+60h] [rbp-100h] BYREF long long v16; // [rsp+80h] [rbp-E0h] char v17; // [rsp+8Fh] [rbp-D1h] long long v18; // [rsp+90h] [rbp-D0h] long long v19; // [rsp+98h] [rbp-C8h] Item_cond *v20; // [rsp+A0h] [rbp-C0h] long long v21; // [rsp+A8h] [rbp-B8h] char v22; // [rsp+C7h] [rbp-99h] long long v23; // [rsp+C8h] [rbp-98h] long long v24; // [rsp+D0h] [rbp-90h] int v25; // [rsp+DCh] [rbp-84h] Item_equal *v26; // [rsp+E0h] [rbp-80h] COND_EQUAL **v27; // [rsp+E8h] [rbp-78h] char v28; // [rsp+F7h] [rbp-69h] COND_EQUAL *v29; // [rsp+F8h] [rbp-68h] THD *v30; // [rsp+100h] [rbp-60h] Item_func_eq *v31; // [rsp+108h] [rbp-58h] _BYTE v33[16]; // [rsp+118h] [rbp-48h] BYREF int v34; // [rsp+128h] [rbp-38h] _BYTE v35[8]; // [rsp+130h] [rbp-30h] BYREF COND_EQUAL *v36; // [rsp+138h] [rbp-28h] _BYTE v37[16]; // [rsp+140h] [rbp-20h] BYREF int v38; // [rsp+150h] [rbp-10h] unsigned long long v39; // [rsp+158h] [rbp-8h] v39 = __readfsqword(0x28u); v31 = this; v30 = a2; v29 = a3; v28 = a4 & 1; v27 = a5; COND_EQUAL::COND_EQUAL((COND_EQUAL *)v35); v36 = v29; List<Item>::List((base_list *)v33); if ( !Item_func_eq::check_equality((long long)this, a2, (COND_EQUAL *)v35, (long long)v33) ) return (Item_cond *)Item_func::build_equal_items(this, v30, v29, v28 & 1, v27); v25 = v34 + v38; if ( !(v34 + v38) ) return (Item_cond *)&Item_true; if ( v25 == 1 ) { v26 = (Item_equal *)List<Item_equal>::pop(v37); if ( v26 ) { (*(void ( **)(Item_equal *, THD *, _QWORD))(*(_QWORD *)v26 + 72LL))(v26, v30, 0LL); (*(void ( **)(Item_equal *))(*(_QWORD *)v26 + 552LL))(v26); v14 = *(_DWORD *)(*(_QWORD *)(*((_QWORD *)v30 + 11) + 3368LL) + 948LL); if ( v14 < (unsigned int)Item_equal::n_field_items(v26) ) *(_DWORD *)(*(_QWORD *)(*((_QWORD *)v30 + 11) + 3368LL) + 948LL) = Item_equal::n_field_items(v26); *((_QWORD *)v26 + 32) = v29; if ( v27 ) { v11 = *((_QWORD *)v30 + 5); v12 = Sql_alloc::operator new(40LL, v11); v22 = 0; v13 = 0LL; if ( v12 ) { v24 = v12; v23 = v11; v22 = 1; COND_EQUAL::COND_EQUAL(v12, (long long)v26, *((_QWORD *)v30 + 5)); v13 = (COND_EQUAL *)v12; } *v27 = v13; } return v26; } else { v21 = List<Item>::pop(v33); (*(void ( **)(long long))(*(_QWORD *)v21 + 552LL))(v21); return (Item_cond *)v21; } } else { v8 = *((_QWORD *)v30 + 5); v9 = Item::operator new(256LL, v8); v17 = 0; v10 = 0LL; if ( v9 ) { v19 = v9; v18 = v8; v17 = 1; Item_cond_and::Item_cond_and(v9, v30, v33); v10 = (Item_cond *)v9; } v20 = v10; Item_func::quick_fix_field(v10); v16 = Item_cond::argument_list(v10); List_iterator_fast<Item_equal>::List_iterator_fast((base_list_iterator *)v15, (base_list *)v37); while ( 1 ) { v26 = (Item_equal *)List_iterator_fast<Item_equal>::operator++((base_list_iterator *)v15); if ( !v26 ) break; if ( ((*(long long ( **)(Item_equal *, _QWORD))(*(_QWORD *)v26 + 1568LL))(v26, 0LL) & 1) != 0 ) return 0LL; (*(void ( **)(Item_equal *))(*(_QWORD *)v26 + 552LL))(v26); v7 = *(_DWORD *)(*(_QWORD *)(*((_QWORD *)v30 + 11) + 3368LL) + 948LL); if ( v7 < (unsigned int)Item_equal::n_field_items(v26) ) { v5 = Item_equal::n_field_items(v26); *(_DWORD *)(*(_QWORD *)(*((_QWORD *)v30 + 11) + 3368LL) + 948LL) = v5; } } COND_EQUAL::copy((Item_cond *)((char *)v20 + 216), (COND_EQUAL *)v35); List<Item_equal>::operator=(v37, (char *)v20 + 232); List<Item>::append(v16, v37); Item_cond::update_used_tables(v20); if ( v27 ) *v27 = (Item_cond *)((char *)v20 + 216); return v20; } }
drop_open_table: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] CMP dword ptr [RAX + 0x348],0x0 JZ 0x00627400 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] XOR EAX,EAX MOV EDX,EAX MOV ECX,0x1 CALL 0x008fa900 JMP 0x0062747b LAB_00627400: JMP 0x00627402 LAB_00627402: JMP 0x00627404 LAB_00627404: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x00636380 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RDI] MOV ESI,0x1b CALL qword ptr [RAX + 0x298] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + 0x190] MOV RSI,qword ptr [RBP + -0x8] MOV EDX,0x1 CALL 0x008f8530 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0xe8 ADD RSI,0x8 CALL 0x00626820 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] XOR R8D,R8D XOR EAX,EAX MOV R9D,EAX CALL 0x00780fa0 LAB_0062747b: JMP 0x0062747d LAB_0062747d: JMP 0x0062747f LAB_0062747f: ADD RSP,0x30 POP RBP RET
/* drop_open_table(THD*, TABLE*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*) */ void drop_open_table(THD *param_1,TABLE *param_2,st_mysql_const_lex_string *param_3, st_mysql_const_lex_string *param_4) { handlerton *phVar1; if (*(int *)(*(long *)param_2 + 0x348) == 0) { phVar1 = (handlerton *)TABLE_SHARE::db_type(*(TABLE_SHARE **)param_2); (**(code **)(**(long **)(param_2 + 8) + 0x298))(*(long **)(param_2 + 8),0x1b); TDC_element::flush(*(TDC_element **)(*(long *)param_2 + 400),param_1,true); close_thread_table(param_1,(TABLE **)(param_1 + 0xf0)); quick_rm_table(param_1,phVar1,param_3,param_4,0,(char *)0x0); } else { THD::drop_temporary_table(param_1,param_2,(bool *)0x0,true); } return; }
23,527
CLI::Success::Success(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, CLI::ExitCodes)
MikePodsytnik[P]TCRtrie/build_O1/_deps/cli11-src/include/CLI/Error.hpp
Success() : Success("Successfully completed, should be caught and quit", ExitCodes::Success) {}
O1
cpp
CLI::Success::Success(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, CLI::ExitCodes): pushq %rbx movq %rdi, %rbx leaq 0x241d1(%rip), %rax # 0x491f0 movq %rax, (%rdi) movq 0x18(%rdi), %rdi leaq 0x28(%rbx), %rax cmpq %rax, %rdi je 0x2503a movq (%rax), %rsi incq %rsi callq 0x7430 movq %rbx, %rdi callq 0x7490 movl $0x38, %esi movq %rbx, %rdi popq %rbx jmp 0x7430
_ZN3CLI7SuccessD0Ev: push rbx mov rbx, rdi lea rax, off_491F0 mov [rdi], rax mov rdi, [rdi+18h]; void * lea rax, [rbx+28h] cmp rdi, rax jz short loc_2503A mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2503A: mov rdi, rbx; this call __ZNSt13runtime_errorD2Ev; std::runtime_error::~runtime_error() mov esi, 38h ; '8'; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong)
void CLI::Success::~Success(CLI::Success *this) { char *v2; // rdi *(_QWORD *)this = off_491F0; v2 = (char *)*((_QWORD *)this + 3); if ( v2 != (char *)this + 40 ) operator delete(v2, *((_QWORD *)this + 5) + 1LL); std::runtime_error::~runtime_error(this); operator delete(this, 0x38uLL); }
~Success: PUSH RBX MOV RBX,RDI LEA RAX,[0x1491f0] MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x18] LEA RAX,[RBX + 0x28] CMP RDI,RAX JZ 0x0012503a MOV RSI,qword ptr [RAX] INC RSI CALL 0x00107430 LAB_0012503a: MOV RDI,RBX CALL 0x00107490 MOV ESI,0x38 MOV RDI,RBX POP RBX JMP 0x00107430
/* CLI::Success::~Success() */ void __thiscall CLI::Success::~Success(Success *this) { *(int ***)this = &PTR__Error_001491f0; if (*(Success **)(this + 0x18) != this + 0x28) { operator_delete(*(Success **)(this + 0x18),*(long *)(this + 0x28) + 1); } std::runtime_error::~runtime_error((runtime_error *)this); operator_delete(this,0x38); return; }
23,528
my_interval_timer
eloqsql/mysys/my_getsystime.c
ulonglong my_interval_timer() { #ifdef HAVE_CLOCK_GETTIME struct timespec tp; clock_gettime(CLOCK_MONOTONIC, &tp); return tp.tv_sec*1000000000ULL+tp.tv_nsec; #elif defined(HAVE_GETHRTIME) return gethrtime(); #elif defined(_WIN32) DBUG_ASSERT(query_performance_frequency); LARGE_INTEGER t_cnt; QueryPerformanceCounter(&t_cnt); return (t_cnt.QuadPart / query_performance_frequency * 1000000000ULL) + ((t_cnt.QuadPart % query_performance_frequency) * 1000000000ULL / query_performance_frequency); #else /* TODO: check for other possibilities for hi-res timestamping */ struct timeval tv; gettimeofday(&tv,NULL); return tv.tv_sec*1000000000ULL+tv.tv_usec*1000ULL; #endif }
O0
c
my_interval_timer: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movl $0x1, %edi leaq -0x10(%rbp), %rsi callq 0x2a2d0 imulq $0x3b9aca00, -0x10(%rbp), %rax # imm = 0x3B9ACA00 addq -0x8(%rbp), %rax addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
my_interval_timer: push rbp mov rbp, rsp sub rsp, 10h mov edi, 1 lea rsi, [rbp+var_10] call _clock_gettime imul rax, [rbp+var_10], 3B9ACA00h add rax, [rbp+var_8] add rsp, 10h pop rbp retn
long long my_interval_timer() { _QWORD v1[2]; // [rsp+0h] [rbp-10h] BYREF clock_gettime(1LL, v1); return v1[1] + 1000000000LL * v1[0]; }
my_interval_timer: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV EDI,0x1 LEA RSI,[RBP + -0x10] CALL 0x0012a2d0 IMUL RAX,qword ptr [RBP + -0x10],0x3b9aca00 ADD RAX,qword ptr [RBP + -0x8] ADD RSP,0x10 POP RBP RET
long my_interval_timer(void) { timespec local_18; clock_gettime(1,&local_18); return local_18.tv_sec * 1000000000 + local_18.tv_nsec; }
23,529
Cache::printStatistics()
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Cache.cpp
void Cache::printStatistics() { printf("-------- STATISTICS ----------\n"); printf("Num Read: %d\n", this->statistics.numRead); printf("Num Write: %d\n", this->statistics.numWrite); printf("Num Hit: %d\n", this->statistics.numHit); printf("Num Miss: %d\n", this->statistics.numMiss); printf("Total Cycles: %llu\n", this->statistics.totalCycles); if (this->lowerCache != nullptr) { printf("---------- LOWER CACHE ----------\n"); this->lowerCache->printStatistics(); } }
O0
cpp
Cache::printStatistics(): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x8(%rsp) leaq 0x30a1(%rip), %rdi # 0xc3fb movb $0x0, %al callq 0x6040 movq 0x8(%rsp), %rax movl (%rax), %esi leaq 0x30ac(%rip), %rdi # 0xc41b movb $0x0, %al callq 0x6040 movq 0x8(%rsp), %rax movl 0x4(%rax), %esi leaq 0x30a4(%rip), %rdi # 0xc429 movb $0x0, %al callq 0x6040 movq 0x8(%rsp), %rax movl 0x8(%rax), %esi leaq 0x309d(%rip), %rdi # 0xc438 movb $0x0, %al callq 0x6040 movq 0x8(%rsp), %rax movl 0xc(%rax), %esi leaq 0x3094(%rip), %rdi # 0xc445 movb $0x0, %al callq 0x6040 movq 0x8(%rsp), %rax movq 0x10(%rax), %rsi leaq 0x308b(%rip), %rdi # 0xc453 movb $0x0, %al callq 0x6040 movq 0x8(%rsp), %rax cmpq $0x0, 0x28(%rax) je 0x93f7 leaq 0x3085(%rip), %rdi # 0xc467 movb $0x0, %al callq 0x6040 movq 0x8(%rsp), %rax movq 0x28(%rax), %rdi callq 0x9340 addq $0x18, %rsp retq nopl (%rax)
_ZN5Cache15printStatisticsEv: sub rsp, 18h mov [rsp+18h+var_8], rdi mov rax, [rsp+18h+var_8] mov [rsp+18h+var_10], rax lea rdi, aStatistics; "-------- STATISTICS ----------\n" mov al, 0 call _printf mov rax, [rsp+18h+var_10] mov esi, [rax] lea rdi, aNumReadD; "Num Read: %d\n" mov al, 0 call _printf mov rax, [rsp+18h+var_10] mov esi, [rax+4] lea rdi, aNumWriteD; "Num Write: %d\n" mov al, 0 call _printf mov rax, [rsp+18h+var_10] mov esi, [rax+8] lea rdi, aNumHitD; "Num Hit: %d\n" mov al, 0 call _printf mov rax, [rsp+18h+var_10] mov esi, [rax+0Ch] lea rdi, aNumMissD; "Num Miss: %d\n" mov al, 0 call _printf mov rax, [rsp+18h+var_10] mov rsi, [rax+10h] lea rdi, aTotalCyclesLlu; "Total Cycles: %llu\n" mov al, 0 call _printf mov rax, [rsp+18h+var_10] cmp qword ptr [rax+28h], 0 jz short loc_93F7 lea rdi, aLowerCache; "---------- LOWER CACHE ----------\n" mov al, 0 call _printf mov rax, [rsp+18h+var_10] mov rdi, [rax+28h]; this call _ZN5Cache15printStatisticsEv; Cache::printStatistics(void) loc_93F7: add rsp, 18h retn
Cache * Cache::printStatistics(Cache *this) { Cache *result; // rax printf("-------- STATISTICS ----------\n"); printf("Num Read: %d\n", *(_DWORD *)this); printf("Num Write: %d\n", *((_DWORD *)this + 1)); printf("Num Hit: %d\n", *((_DWORD *)this + 2)); printf("Num Miss: %d\n", *((_DWORD *)this + 3)); printf("Total Cycles: %llu\n", *((_QWORD *)this + 2)); result = this; if ( *((_QWORD *)this + 5) ) { printf("---------- LOWER CACHE ----------\n"); return (Cache *)Cache::printStatistics(*((Cache **)this + 5)); } return result; }
printStatistics: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x8],RAX LEA RDI,[0x10c3fb] MOV AL,0x0 CALL 0x00106040 MOV RAX,qword ptr [RSP + 0x8] MOV ESI,dword ptr [RAX] LEA RDI,[0x10c41b] MOV AL,0x0 CALL 0x00106040 MOV RAX,qword ptr [RSP + 0x8] MOV ESI,dword ptr [RAX + 0x4] LEA RDI,[0x10c429] MOV AL,0x0 CALL 0x00106040 MOV RAX,qword ptr [RSP + 0x8] MOV ESI,dword ptr [RAX + 0x8] LEA RDI,[0x10c438] MOV AL,0x0 CALL 0x00106040 MOV RAX,qword ptr [RSP + 0x8] MOV ESI,dword ptr [RAX + 0xc] LEA RDI,[0x10c445] MOV AL,0x0 CALL 0x00106040 MOV RAX,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RAX + 0x10] LEA RDI,[0x10c453] MOV AL,0x0 CALL 0x00106040 MOV RAX,qword ptr [RSP + 0x8] CMP qword ptr [RAX + 0x28],0x0 JZ 0x001093f7 LEA RDI,[0x10c467] MOV AL,0x0 CALL 0x00106040 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x28] CALL 0x00109340 LAB_001093f7: ADD RSP,0x18 RET
/* Cache::printStatistics() */ void __thiscall Cache::printStatistics(Cache *this) { printf("-------- STATISTICS ----------\n"); printf("Num Read: %d\n",(ulong)*(uint *)this); printf("Num Write: %d\n",(ulong)*(uint *)(this + 4)); printf("Num Hit: %d\n",(ulong)*(uint *)(this + 8)); printf("Num Miss: %d\n",(ulong)*(uint *)(this + 0xc)); printf("Total Cycles: %llu\n",*(int8 *)(this + 0x10)); if (*(long *)(this + 0x28) != 0) { printf("---------- LOWER CACHE ----------\n"); printStatistics(*(Cache **)(this + 0x28)); } return; }
23,530
Cache::printStatistics()
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Cache.cpp
void Cache::printStatistics() { printf("-------- STATISTICS ----------\n"); printf("Num Read: %d\n", this->statistics.numRead); printf("Num Write: %d\n", this->statistics.numWrite); printf("Num Hit: %d\n", this->statistics.numHit); printf("Num Miss: %d\n", this->statistics.numMiss); printf("Total Cycles: %llu\n", this->statistics.totalCycles); if (this->lowerCache != nullptr) { printf("---------- LOWER CACHE ----------\n"); this->lowerCache->printStatistics(); } }
O1
cpp
Cache::printStatistics(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x160b(%rip), %r12 # 0x63f2 leaq 0x1613(%rip), %r13 # 0x6401 leaq 0x1619(%rip), %rbp # 0x640e leaq 0x1620(%rip), %r14 # 0x641c leaq 0x172d(%rip), %r15 # 0x6530 leaq 0x1707(%rip), %rdi # 0x6511 callq 0x3210 movl (%rbx), %esi leaq 0x15cc(%rip), %rdi # 0x63e4 xorl %eax, %eax callq 0x3050 movl 0x4(%rbx), %esi movq %r12, %rdi xorl %eax, %eax callq 0x3050 movl 0x8(%rbx), %esi movq %r13, %rdi xorl %eax, %eax callq 0x3050 movl 0xc(%rbx), %esi movq %rbp, %rdi xorl %eax, %eax callq 0x3050 movq 0x10(%rbx), %rsi movq %r14, %rdi xorl %eax, %eax callq 0x3050 cmpq $0x0, 0x28(%rbx) je 0x4e69 movq %r15, %rdi callq 0x3210 movq 0x28(%rbx), %rbx jmp 0x4e03 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN5Cache15printStatisticsEv: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi lea r12, aNumWriteD; "Num Write: %d\n" lea r13, aNumHitD; "Num Hit: %d\n" lea rbp, aNumMissD; "Num Miss: %d\n" lea r14, aTotalCyclesLlu; "Total Cycles: %llu\n" lea r15, aLowerCache; "---------- LOWER CACHE ----------" loc_4E03: lea rdi, aStatistics; "-------- STATISTICS ----------" call _puts mov esi, [rbx] lea rdi, aNumReadD; "Num Read: %d\n" xor eax, eax call _printf mov esi, [rbx+4] mov rdi, r12 xor eax, eax call _printf mov esi, [rbx+8] mov rdi, r13 xor eax, eax call _printf mov esi, [rbx+0Ch] mov rdi, rbp xor eax, eax call _printf mov rsi, [rbx+10h] mov rdi, r14 xor eax, eax call _printf cmp qword ptr [rbx+28h], 0 jz short loc_4E69 mov rdi, r15 call _puts mov rbx, [rbx+28h] jmp short loc_4E03 loc_4E69: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long Cache::printStatistics(Cache *this) { long long result; // rax while ( 1 ) { puts("-------- STATISTICS ----------"); printf("Num Read: %d\n", *(_DWORD *)this); printf("Num Write: %d\n", *((_DWORD *)this + 1)); printf("Num Hit: %d\n", *((_DWORD *)this + 2)); printf("Num Miss: %d\n", *((_DWORD *)this + 3)); result = printf("Total Cycles: %llu\n", *((_QWORD *)this + 2)); if ( !*((_QWORD *)this + 5) ) break; puts("---------- LOWER CACHE ----------"); this = (Cache *)*((_QWORD *)this + 5); } return result; }
printStatistics: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI LEA R12,[0x1063f2] LEA R13,[0x106401] LEA RBP,[0x10640e] LEA R14,[0x10641c] LEA R15,[0x106530] LAB_00104e03: LEA RDI,[0x106511] CALL 0x00103210 MOV ESI,dword ptr [RBX] LEA RDI,[0x1063e4] XOR EAX,EAX CALL 0x00103050 MOV ESI,dword ptr [RBX + 0x4] MOV RDI,R12 XOR EAX,EAX CALL 0x00103050 MOV ESI,dword ptr [RBX + 0x8] MOV RDI,R13 XOR EAX,EAX CALL 0x00103050 MOV ESI,dword ptr [RBX + 0xc] MOV RDI,RBP XOR EAX,EAX CALL 0x00103050 MOV RSI,qword ptr [RBX + 0x10] MOV RDI,R14 XOR EAX,EAX CALL 0x00103050 CMP qword ptr [RBX + 0x28],0x0 JZ 0x00104e69 MOV RDI,R15 CALL 0x00103210 MOV RBX,qword ptr [RBX + 0x28] JMP 0x00104e03 LAB_00104e69: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* Cache::printStatistics() */ void __thiscall Cache::printStatistics(Cache *this) { while( true ) { puts("-------- STATISTICS ----------"); printf("Num Read: %d\n",(ulong)*(uint *)this); printf("Num Write: %d\n",(ulong)*(uint *)(this + 4)); printf("Num Hit: %d\n",(ulong)*(uint *)(this + 8)); printf("Num Miss: %d\n",(ulong)*(uint *)(this + 0xc)); printf("Total Cycles: %llu\n",*(int8 *)(this + 0x10)); if (*(long *)(this + 0x28) == 0) break; puts("---------- LOWER CACHE ----------"); this = *(Cache **)(this + 0x28); } return; }
23,531
Cache::printStatistics()
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Cache.cpp
void Cache::printStatistics() { printf("-------- STATISTICS ----------\n"); printf("Num Read: %d\n", this->statistics.numRead); printf("Num Write: %d\n", this->statistics.numWrite); printf("Num Hit: %d\n", this->statistics.numHit); printf("Num Miss: %d\n", this->statistics.numMiss); printf("Total Cycles: %llu\n", this->statistics.totalCycles); if (this->lowerCache != nullptr) { printf("---------- LOWER CACHE ----------\n"); this->lowerCache->printStatistics(); } }
O2
cpp
Cache::printStatistics(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0xa4b(%rip), %r12 # 0x53de leaq 0xa53(%rip), %r13 # 0x53ed leaq 0xa59(%rip), %rbp # 0x53fa leaq 0xa60(%rip), %r14 # 0x5408 leaq 0xb6d(%rip), %r15 # 0x551c leaq 0xb47(%rip), %rdi # 0x54fd callq 0x3220 movl (%rbx), %esi leaq 0xa0c(%rip), %rdi # 0x53d0 xorl %eax, %eax callq 0x3040 movl 0x4(%rbx), %esi movq %r12, %rdi xorl %eax, %eax callq 0x3040 movl 0x8(%rbx), %esi movq %r13, %rdi xorl %eax, %eax callq 0x3040 movl 0xc(%rbx), %esi movq %rbp, %rdi xorl %eax, %eax callq 0x3040 movq 0x10(%rbx), %rsi movq %r14, %rdi xorl %eax, %eax callq 0x3040 cmpq $0x0, 0x28(%rbx) je 0x4a15 movq %r15, %rdi callq 0x3220 movq 0x28(%rbx), %rbx jmp 0x49af addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN5Cache15printStatisticsEv: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi lea r12, aNumWriteD; "Num Write: %d\n" lea r13, aNumHitD; "Num Hit: %d\n" lea rbp, aNumMissD; "Num Miss: %d\n" lea r14, aTotalCyclesLlu; "Total Cycles: %llu\n" lea r15, aLowerCache; "---------- LOWER CACHE ----------" loc_49AF: lea rdi, aStatistics; "-------- STATISTICS ----------" call _puts mov esi, [rbx] lea rdi, aNumReadD; "Num Read: %d\n" xor eax, eax call _printf mov esi, [rbx+4] mov rdi, r12 xor eax, eax call _printf mov esi, [rbx+8] mov rdi, r13 xor eax, eax call _printf mov esi, [rbx+0Ch] mov rdi, rbp xor eax, eax call _printf mov rsi, [rbx+10h] mov rdi, r14 xor eax, eax call _printf cmp qword ptr [rbx+28h], 0 jz short loc_4A15 mov rdi, r15 call _puts mov rbx, [rbx+28h] jmp short loc_49AF loc_4A15: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long Cache::printStatistics(Cache *this) { long long result; // rax while ( 1 ) { puts("-------- STATISTICS ----------"); printf("Num Read: %d\n", *(_DWORD *)this); printf("Num Write: %d\n", *((_DWORD *)this + 1)); printf("Num Hit: %d\n", *((_DWORD *)this + 2)); printf("Num Miss: %d\n", *((_DWORD *)this + 3)); result = printf("Total Cycles: %llu\n", *((_QWORD *)this + 2)); if ( !*((_QWORD *)this + 5) ) break; puts("---------- LOWER CACHE ----------"); this = (Cache *)*((_QWORD *)this + 5); } return result; }
printStatistics: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI LEA R12,[0x1053de] LEA R13,[0x1053ed] LEA RBP,[0x1053fa] LEA R14,[0x105408] LEA R15,[0x10551c] LAB_001049af: LEA RDI,[0x1054fd] CALL 0x00103220 MOV ESI,dword ptr [RBX] LEA RDI,[0x1053d0] XOR EAX,EAX CALL 0x00103040 MOV ESI,dword ptr [RBX + 0x4] MOV RDI,R12 XOR EAX,EAX CALL 0x00103040 MOV ESI,dword ptr [RBX + 0x8] MOV RDI,R13 XOR EAX,EAX CALL 0x00103040 MOV ESI,dword ptr [RBX + 0xc] MOV RDI,RBP XOR EAX,EAX CALL 0x00103040 MOV RSI,qword ptr [RBX + 0x10] MOV RDI,R14 XOR EAX,EAX CALL 0x00103040 CMP qword ptr [RBX + 0x28],0x0 JZ 0x00104a15 MOV RDI,R15 CALL 0x00103220 MOV RBX,qword ptr [RBX + 0x28] JMP 0x001049af LAB_00104a15: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* Cache::printStatistics() */ void __thiscall Cache::printStatistics(Cache *this) { while( true ) { puts("-------- STATISTICS ----------"); printf("Num Read: %d\n",(ulong)*(uint *)this); printf("Num Write: %d\n",(ulong)*(uint *)(this + 4)); printf("Num Hit: %d\n",(ulong)*(uint *)(this + 8)); printf("Num Miss: %d\n",(ulong)*(uint *)(this + 0xc)); printf("Total Cycles: %llu\n",*(int8 *)(this + 0x10)); if (*(long *)(this + 0x28) == 0) break; puts("---------- LOWER CACHE ----------"); this = *(Cache **)(this + 0x28); } return; }
23,532
pfs_start_rwlock_wrwait_v1
eloqsql/storage/perfschema/pfs.cc
PSI_rwlock_locker* pfs_start_rwlock_wrwait_v1(PSI_rwlock_locker_state *state, PSI_rwlock *rwlock, PSI_rwlock_operation op, const char *src_file, uint src_line) { assert((op == PSI_RWLOCK_WRITELOCK) || (op == PSI_RWLOCK_TRYWRITELOCK) || (op == PSI_RWLOCK_SHAREDEXCLUSIVELOCK) || (op == PSI_RWLOCK_TRYSHAREDEXCLUSIVELOCK) || (op == PSI_RWLOCK_EXCLUSIVELOCK) || (op == PSI_RWLOCK_TRYEXCLUSIVELOCK)); return pfs_start_rwlock_wait_v1(state, rwlock, op, src_file, src_line); }
O0
cpp
pfs_start_rwlock_wrwait_v1: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq %rcx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movl -0x14(%rbp), %edx movq -0x20(%rbp), %rcx movl -0x24(%rbp), %r8d callq 0x46a80 addq $0x30, %rsp popq %rbp retq nopl (%rax)
pfs_start_rwlock_wrwait_v1: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_20], rcx mov [rbp+var_24], r8d mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov edx, [rbp+var_14] mov rcx, [rbp+var_20] mov r8d, [rbp+var_24] call pfs_start_rwlock_wait_v1 add rsp, 30h pop rbp retn
long long pfs_start_rwlock_wrwait_v1(long long a1, long long a2, int a3, long long a4, int a5) { return pfs_start_rwlock_wait_v1(a1, a2, a3, a4, a5); }
pfs_start_rwlock_wrwait_v1: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],R8D MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x20] MOV R8D,dword ptr [RBP + -0x24] CALL 0x00146a80 ADD RSP,0x30 POP RBP RET
void pfs_start_rwlock_wrwait_v1 (int8 param_1,int8 param_2,int4 param_3,int8 param_4, int4 param_5) { pfs_start_rwlock_wait_v1(param_1,param_2,param_3,param_4,param_5); return; }
23,533
pfs_start_rwlock_wrwait_v1
eloqsql/storage/perfschema/pfs.cc
PSI_rwlock_locker* pfs_start_rwlock_wrwait_v1(PSI_rwlock_locker_state *state, PSI_rwlock *rwlock, PSI_rwlock_operation op, const char *src_file, uint src_line) { assert((op == PSI_RWLOCK_WRITELOCK) || (op == PSI_RWLOCK_TRYWRITELOCK) || (op == PSI_RWLOCK_SHAREDEXCLUSIVELOCK) || (op == PSI_RWLOCK_TRYSHAREDEXCLUSIVELOCK) || (op == PSI_RWLOCK_EXCLUSIVELOCK) || (op == PSI_RWLOCK_TRYEXCLUSIVELOCK)); return pfs_start_rwlock_wait_v1(state, rwlock, op, src_file, src_line); }
O3
cpp
pfs_start_rwlock_wrwait_v1: pushq %rbp movq %rsp, %rbp popq %rbp jmp 0x28cce
pfs_start_rwlock_wrwait_v1: push rbp mov rbp, rsp pop rbp jmp pfs_start_rwlock_wait_v1
long long pfs_start_rwlock_wrwait_v1(long long a1, long long a2, int a3, long long a4, int a5) { return pfs_start_rwlock_wait_v1(a1, a2, a3, a4, a5); }
pfs_start_rwlock_wrwait_v1: PUSH RBP MOV RBP,RSP POP RBP JMP 0x00128cce
void pfs_start_rwlock_wrwait_v1(void) { pfs_start_rwlock_wait_v1(); return; }
23,534
ftxui::wstring_width(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>> const&)
Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/screen/string.cpp
int wstring_width(const std::wstring& text) { int width = 0; for (const wchar_t& it : text) { const int w = wchar_width(it); if (w < 0) { return -1; } width += w; } return width; }
O0
cpp
ftxui::wstring_width(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>> const&): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movl $0x0, -0x14(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rdi callq 0xd6e0 movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rdi callq 0xd180 movq %rax, -0x30(%rbp) leaq -0x28(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0x8e4f0 testb $0x1, %al jne 0x8d748 jmp 0x8d786 leaq -0x28(%rbp), %rdi callq 0x8e530 movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movl (%rax), %edi callq 0x8d680 movl %eax, -0x3c(%rbp) cmpl $0x0, -0x3c(%rbp) jge 0x8d772 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x8d78c movl -0x3c(%rbp), %eax addl -0x14(%rbp), %eax movl %eax, -0x14(%rbp) leaq -0x28(%rbp), %rdi callq 0x8e550 jmp 0x8d735 movl -0x14(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN5ftxui13wstring_widthERKNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_14], 0 mov rax, [rbp+var_10] mov [rbp+var_20], rax mov rdi, [rbp+var_20] call __ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE5beginEv; std::wstring::begin(void) mov [rbp+var_28], rax mov rdi, [rbp+var_20] call __ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE3endEv; std::wstring::end(void) mov [rbp+var_30], rax loc_8D735: lea rdi, [rbp+var_28] lea rsi, [rbp+var_30] call _ZN9__gnu_cxxneIPKwNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_; __gnu_cxx::operator!=<wchar_t const*,std::wstring>(__gnu_cxx::__normal_iterator<wchar_t const*,std::wstring> const&,__gnu_cxx::__normal_iterator<wchar_t const*,std::wstring> const&) test al, 1 jnz short loc_8D748 jmp short loc_8D786 loc_8D748: lea rdi, [rbp+var_28] call _ZNK9__gnu_cxx17__normal_iteratorIPKwNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEdeEv; __gnu_cxx::__normal_iterator<wchar_t const*,std::wstring>::operator*(void) mov [rbp+var_38], rax mov rax, [rbp+var_38] mov edi, [rax] call _ZN5ftxui11wchar_widthEw; ftxui::wchar_width(wchar_t) mov [rbp+var_3C], eax cmp [rbp+var_3C], 0 jge short loc_8D772 mov [rbp+var_4], 0FFFFFFFFh jmp short loc_8D78C loc_8D772: mov eax, [rbp+var_3C] add eax, [rbp+var_14] mov [rbp+var_14], eax lea rdi, [rbp+var_28] call _ZN9__gnu_cxx17__normal_iteratorIPKwNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEEppEv; __gnu_cxx::__normal_iterator<wchar_t const*,std::wstring>::operator++(void) jmp short loc_8D735 loc_8D786: mov eax, [rbp+var_14] mov [rbp+var_4], eax loc_8D78C: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long ftxui::wstring_width(long long a1) { int v2; // [rsp+4h] [rbp-3Ch] unsigned int *v3; // [rsp+8h] [rbp-38h] long long v4; // [rsp+10h] [rbp-30h] BYREF _QWORD v5[2]; // [rsp+18h] [rbp-28h] BYREF unsigned int v6; // [rsp+2Ch] [rbp-14h] long long v7; // [rsp+30h] [rbp-10h] v7 = a1; v6 = 0; v5[1] = a1; v5[0] = std::wstring::begin(a1); v4 = std::wstring::end(a1); while ( (__gnu_cxx::operator!=<wchar_t const*,std::wstring>(v5, &v4) & 1) != 0 ) { v3 = (unsigned int *)__gnu_cxx::__normal_iterator<wchar_t const*,std::wstring>::operator*(v5); v2 = ftxui::wchar_width(*v3, (unsigned int)&v4); if ( v2 < 0 ) return (unsigned int)-1; v6 += v2; __gnu_cxx::__normal_iterator<wchar_t const*,std::wstring>::operator++(v5); } return v6; }
wstring_width: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x20] CALL 0x0010d6e0 MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x20] CALL 0x0010d180 MOV qword ptr [RBP + -0x30],RAX LAB_0018d735: LEA RDI,[RBP + -0x28] LEA RSI,[RBP + -0x30] CALL 0x0018e4f0 TEST AL,0x1 JNZ 0x0018d748 JMP 0x0018d786 LAB_0018d748: LEA RDI,[RBP + -0x28] CALL 0x0018e530 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV EDI,dword ptr [RAX] CALL 0x0018d680 MOV dword ptr [RBP + -0x3c],EAX CMP dword ptr [RBP + -0x3c],0x0 JGE 0x0018d772 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0018d78c LAB_0018d772: MOV EAX,dword ptr [RBP + -0x3c] ADD EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x14],EAX LEA RDI,[RBP + -0x28] CALL 0x0018e550 JMP 0x0018d735 LAB_0018d786: MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x4],EAX LAB_0018d78c: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
/* ftxui::wstring_width(std::__cxx11::wstring const&) */ int ftxui::wstring_width(wstring *param_1) { bool bVar1; int iVar2; wchar_t *pwVar3; int8 local_38; int8 local_30; wstring *local_28; int local_1c; wstring *local_18; local_1c = 0; local_28 = param_1; local_18 = param_1; local_30 = std::__cxx11::wstring::begin(); local_38 = std::__cxx11::wstring::end(); while( true ) { bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_30,(__normal_iterator *)&local_38); if (!bVar1) { return local_1c; } pwVar3 = (wchar_t *) __gnu_cxx::__normal_iterator<wchar_t_const*,std::__cxx11::wstring>::operator* ((__normal_iterator<wchar_t_const*,std::__cxx11::wstring> *)&local_30); iVar2 = wchar_width(*pwVar3); if (iVar2 < 0) break; local_1c = iVar2 + local_1c; __gnu_cxx::__normal_iterator<wchar_t_const*,std::__cxx11::wstring>::operator++ ((__normal_iterator<wchar_t_const*,std::__cxx11::wstring> *)&local_30); } return -1; }
23,535
Device::overrideShader(VkShaderModuleCreateInfo&, char const*, VkShaderStageFlagBits, ScratchAllocator&) const
HansKristian-Work[P]pyroveil/layer/pyroveil.cpp
bool Device::overrideShader(VkShaderModuleCreateInfo &createInfo, const char *entry, VkShaderStageFlagBits stage, ScratchAllocator &alloc) const { auto model = spv::ExecutionModelMax; uint32_t spirvVersion = 0; auto action = checkOverrideShader(createInfo, !entry, &model, &spirvVersion); if (!action.glslRoundtrip) return false; if (!instance->roundtripCachePath.empty()) if (overrideShaderFromCache(action.hash, createInfo, entry, stage, alloc)) return true; std::string glsl; if (!instance->roundtripCachePath.empty()) placeOverrideShaderInCache(action.hash, createInfo, "orig", VkShaderStageFlagBits(0)); try { spirv_cross::CompilerGLSL compiler(createInfo.pCode, createInfo.codeSize / sizeof(uint32_t)); spirv_cross::CompilerGLSL::Options opts; opts.version = 460; opts.es = false; opts.vulkan_semantics = true; const auto stageToModel = [](VkShaderStageFlagBits moduleStage) { switch (moduleStage) { case VK_SHADER_STAGE_VERTEX_BIT: return spv::ExecutionModelVertex; case VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT: return spv::ExecutionModelTessellationControl; case VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT: return spv::ExecutionModelTessellationEvaluation; case VK_SHADER_STAGE_GEOMETRY_BIT: return spv::ExecutionModelGeometry; case VK_SHADER_STAGE_FRAGMENT_BIT: return spv::ExecutionModelFragment; case VK_SHADER_STAGE_COMPUTE_BIT: return spv::ExecutionModelGLCompute; case VK_SHADER_STAGE_MESH_BIT_EXT: return spv::ExecutionModelMeshEXT; case VK_SHADER_STAGE_TASK_BIT_EXT: return spv::ExecutionModelTaskEXT; case VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR: return spv::ExecutionModelClosestHitKHR; case VK_SHADER_STAGE_ANY_HIT_BIT_KHR: return spv::ExecutionModelAnyHitKHR; case VK_SHADER_STAGE_MISS_BIT_KHR: return spv::ExecutionModelMissKHR; case VK_SHADER_STAGE_INTERSECTION_BIT_KHR: return spv::ExecutionModelIntersectionKHR; case VK_SHADER_STAGE_RAYGEN_BIT_KHR: return spv::ExecutionModelRayGenerationKHR; case VK_SHADER_STAGE_CALLABLE_BIT_KHR: return spv::ExecutionModelCallableKHR; default: return spv::ExecutionModelMax; } }; if (entry) { model = stageToModel(stage); compiler.set_entry_point(entry, model); } compiler.set_common_options(opts); glsl = compiler.compile(); } catch (const std::exception &e) { fprintf(stderr, "pyroveil: SPIRV-Cross threw error: %s.\n", e.what()); return false; } auto spirv = compileToSpirv(generateCachePath(instance->roundtripCachePath, action.hash, entry, stage), glsl, model, spirvVersion); if (!spirv.empty()) { createInfo.pCode = alloc.copy(spirv.data(), spirv.size()); createInfo.codeSize = spirv.size() * sizeof(uint32_t); if (!instance->roundtripCachePath.empty()) placeOverrideShaderInCache(action.hash, createInfo, entry, stage); return true; } else { fprintf(stderr, "pyroveil: Failed to roundtrip shader.\n"); return false; } }
O1
cpp
Device::overrideShader(VkShaderModuleCreateInfo&, char const*, VkShaderStageFlagBits, ScratchAllocator&) const: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x26f8, %rsp # imm = 0x26F8 movq %r8, %r13 movl %ecx, %r14d movq %rdx, %rbx movq %rsi, %r15 movq %rdi, %r12 leaq -0x2c(%rbp), %rcx movl $0x7fffffff, (%rcx) # imm = 0x7FFFFFFF leaq -0x5c(%rbp), %r8 movl $0x0, (%r8) xorl %edx, %edx testq %rbx, %rbx sete %dl callq 0x893ec movq %rax, -0x38(%rbp) testb $0x1, %dl je 0x89d93 movq %r13, -0x78(%rbp) movq 0x10(%r12), %rax cmpq $0x0, 0xb8(%rax) je 0x89cff movq %r12, %rdi movq -0x38(%rbp), %rsi movq %r15, %rdx movq %rbx, %rcx movl %r14d, %r8d movq -0x78(%rbp), %r9 callq 0x8980c movb $0x1, %r13b testb %al, %al jne 0x8a089 leaq -0x88(%rbp), %rax movq %rax, -0x10(%rax) movq $0x0, -0x8(%rax) movb $0x0, (%rax) movq 0x10(%r12), %rax cmpq $0x0, 0xb8(%rax) je 0x89d3d leaq 0x35a8f0(%rip), %rcx # 0x3e461b movq %r12, %rdi movq -0x38(%rbp), %rsi movq %r15, %rdx xorl %r8d, %r8d callq 0x89b50 movq 0x18(%r15), %rdx movq 0x20(%r15), %rsi shrq $0x2, %rdx leaq -0x2718(%rbp), %rdi callq 0x8bece testq %rbx, %rbx movq %r15, -0x68(%rbp) je 0x89ed2 cmpl $0x7f, %r14d jg 0x89d9b cmpl $0xf, %r14d jg 0x89dd2 leal -0x1(%r14), %eax cmpl $0x7, %eax ja 0x89e80 leaq 0x35a2f2(%rip), %rcx # 0x3e4074 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax xorl %r13d, %r13d jmp 0x89e86 xorl %r13d, %r13d jmp 0x8a089 cmpl $0x3ff, %r14d # imm = 0x3FF jle 0x89dfb cmpl $0xfff, %r14d # imm = 0xFFF jg 0x89e1e cmpl $0x400, %r14d # imm = 0x400 je 0x89e50 cmpl $0x800, %r14d # imm = 0x800 jne 0x89e80 movl $0x14c5, %r13d # imm = 0x14C5 jmp 0x89e86 cmpl $0x10, %r14d je 0x89e60 cmpl $0x20, %r14d je 0x89e70 cmpl $0x40, %r14d jne 0x89e80 movl $0x14f4, %r13d # imm = 0x14F4 jmp 0x89e86 cmpl $0x80, %r14d je 0x89e68 cmpl $0x100, %r14d # imm = 0x100 je 0x89e78 cmpl $0x200, %r14d # imm = 0x200 jne 0x89e80 movl $0x14c3, %r13d # imm = 0x14C3 jmp 0x89e86 cmpl $0x1000, %r14d # imm = 0x1000 je 0x89e58 cmpl $0x2000, %r14d # imm = 0x2000 jne 0x89e80 movl $0x14c6, %r13d # imm = 0x14C6 jmp 0x89e86 movl $0x1, %r13d jmp 0x89e86 movl $0x2, %r13d jmp 0x89e86 movl $0x3, %r13d jmp 0x89e86 movl $0x14c4, %r13d # imm = 0x14C4 jmp 0x89e86 movl $0x14c2, %r13d # imm = 0x14C2 jmp 0x89e86 movl $0x4, %r13d jmp 0x89e86 movl $0x14f5, %r13d # imm = 0x14F5 jmp 0x89e86 movl $0x5, %r13d jmp 0x89e86 movl $0x14c1, %r13d # imm = 0x14C1 jmp 0x89e86 movl $0x7fffffff, %r13d # imm = 0x7FFFFFFF movl %r13d, -0x2c(%rbp) leaq -0x48(%rbp), %r15 movq %r15, -0x10(%r15) movq %rbx, %rdi callq 0x7e800 leaq (%rax,%rbx), %rdx leaq -0x58(%rbp), %rdi movq %rbx, %rsi callq 0x7e700 leaq -0x2718(%rbp), %rdi leaq -0x58(%rbp), %rsi movl %r13d, %edx callq 0x3c92aa movq -0x58(%rbp), %rdi cmpq %r15, %rdi je 0x89ed2 movq -0x48(%rbp), %rsi incq %rsi callq 0x7f6e0 movq %rbx, -0x70(%rbp) leaq -0x2718(%rbp), %rsi movl $0x1cc, 0x1dd4(%rsi) # imm = 0x1CC xorl %eax, %eax movw %ax, 0x1dd8(%rsi) movl $0x3, 0x1ddc(%rsi) movabsq $0x100000001000001, %rcx # imm = 0x100000001000001 movq %rcx, 0x1de0(%rsi) movq $0x1000000, 0x1de8(%rsi) # imm = 0x1000000 movw %ax, 0x1df0(%rsi) movb $0x1, 0x1df2(%rsi) movabsq $0x300000002, %rax # imm = 0x300000002 movq %rax, 0x1df4(%rsi) leaq -0x58(%rbp), %rdi callq 0x93efc leaq -0x98(%rbp), %rdi leaq -0x58(%rbp), %rbx movq %rbx, %rsi callq 0x7fbf0 movq (%rbx), %rdi leaq -0x48(%rbp), %rax cmpq %rax, %rdi je 0x89f69 movq -0x48(%rbp), %rsi incq %rsi callq 0x7f6e0 leaq -0x2718(%rbp), %rdi callq 0x8c6e8 movl $0xb0, %esi addq 0x10(%r12), %rsi leaq -0x2718(%rbp), %rdi movq -0x38(%rbp), %rdx movq -0x70(%rbp), %rcx movl %r14d, %r8d callq 0x89920 movl -0x2c(%rbp), %ecx movl -0x5c(%rbp), %r8d leaq -0x58(%rbp), %rdi leaq -0x2718(%rbp), %rsi leaq -0x98(%rbp), %rdx callq 0x920ec movq %r14, -0xa0(%rbp) leaq -0x2708(%rbp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x89fda movq -0x2708(%rbp), %rsi incq %rsi callq 0x7f6e0 movq -0x58(%rbp), %rbx movq -0x50(%rbp), %r14 cmpq %r14, %rbx setne %r13b je 0x8a09e subq %rbx, %r14 movq -0x78(%rbp), %rdi movq %r14, %rsi callq 0x888ec movq %rax, %r15 testq %rax, %rax je 0x8a014 movq %r15, %rdi movq %rbx, %rsi movq %r14, %rdx callq 0x7f1b0 movq -0x68(%rbp), %rcx movq %r15, 0x20(%rcx) movq -0x50(%rbp), %rax subq -0x58(%rbp), %rax movq %rax, 0x18(%rcx) movq 0x10(%r12), %rax cmpq $0x0, 0xb8(%rax) je 0x8a052 movq %r12, %rdi movq -0x38(%rbp), %rsi movq -0x68(%rbp), %rdx movq -0x70(%rbp), %rcx movq -0xa0(%rbp), %r8 callq 0x89b50 movq -0x58(%rbp), %rdi testq %rdi, %rdi je 0x8a067 movq -0x48(%rbp), %rsi subq %rdi, %rsi callq 0x7f6e0 movq -0x98(%rbp), %rdi leaq -0x88(%rbp), %rax cmpq %rax, %rdi je 0x8a089 movq -0x88(%rbp), %rsi incq %rsi callq 0x7f6e0 movl %r13d, %eax addq $0x26f8, %rsp # imm = 0x26F8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x8115b jmp 0x8a052 movq %rdx, %r14 movq %rax, %rbx movq -0x58(%rbp), %rdi cmpq %r15, %rdi je 0x8a0f4 movq -0x48(%rbp), %rsi incq %rsi callq 0x7f6e0 jmp 0x8a0f4 jmp 0x8a0ee jmp 0x8a0e9 movq %rax, %rbx leaq -0x2708(%rbp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x8a164 movq -0x2708(%rbp), %rsi incq %rsi jmp 0x8a15f movq %rax, %rbx jmp 0x8a164 movq %rdx, %r14 movq %rax, %rbx leaq -0x2718(%rbp), %rdi callq 0x8c6e8 jmp 0x8a108 movq %rdx, %r14 movq %rax, %rbx cmpl $0x1, %r14d jne 0x8a164 movq %rbx, %rdi callq 0x7e7a0 movq 0x557e73(%rip), %rcx # 0x5e1f90 movq (%rcx), %rbx movq (%rax), %rcx movq %rax, %rdi callq *0x10(%rcx) leaq 0x35a4f0(%rip), %rsi # 0x3e4620 xorl %r13d, %r13d movq %rbx, %rdi movq %rax, %rdx xorl %eax, %eax callq 0x80150 callq 0x806b0 jmp 0x8a067 jmp 0x8a0e9 movq %rax, %rbx movq -0x58(%rbp), %rdi testq %rdi, %rdi je 0x8a164 movq -0x48(%rbp), %rsi subq %rdi, %rsi callq 0x7f6e0 movq -0x98(%rbp), %rdi leaq -0x88(%rbp), %rax cmpq %rax, %rdi je 0x8a186 movq -0x88(%rbp), %rsi incq %rsi callq 0x7f6e0 movq %rbx, %rdi callq 0x809f0
_ZNK6Device14overrideShaderER24VkShaderModuleCreateInfoPKc21VkShaderStageFlagBitsR16ScratchAllocator: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 26F8h mov r13, r8 mov r14d, ecx mov rbx, rdx mov r15, rsi mov r12, rdi lea rcx, [rbp+var_2C] mov dword ptr [rcx], 7FFFFFFFh lea r8, [rbp+var_5C] mov dword ptr [r8], 0 xor edx, edx test rbx, rbx setz dl call _ZNK6Device19checkOverrideShaderERK24VkShaderModuleCreateInfobPN3spv14ExecutionModelEPj; Device::checkOverrideShader(VkShaderModuleCreateInfo const&,bool,spv::ExecutionModel *,uint *) mov [rbp+var_38], rax test dl, 1 jz loc_89D93 mov [rbp+var_78], r13 mov rax, [r12+10h] cmp qword ptr [rax+0B8h], 0 jz short loc_89CFF mov rdi, r12 mov rsi, [rbp+var_38] mov rdx, r15 mov rcx, rbx mov r8d, r14d mov r9, [rbp+var_78] call _ZNK6Device23overrideShaderFromCacheEmR24VkShaderModuleCreateInfoPKc21VkShaderStageFlagBitsR16ScratchAllocator; Device::overrideShaderFromCache(ulong,VkShaderModuleCreateInfo &,char const*,VkShaderStageFlagBits,ScratchAllocator &) mov r13b, 1 test al, al jnz loc_8A089 loc_89CFF: lea rax, [rbp+var_88] mov [rax-10h], rax mov qword ptr [rax-8], 0 mov byte ptr [rax], 0 mov rax, [r12+10h] cmp qword ptr [rax+0B8h], 0 jz short loc_89D3D lea rcx, aOrig; "orig" mov rdi, r12 mov rsi, [rbp+var_38] mov rdx, r15 xor r8d, r8d call _ZNK6Device26placeOverrideShaderInCacheEmRK24VkShaderModuleCreateInfoPKc21VkShaderStageFlagBits; Device::placeOverrideShaderInCache(ulong,VkShaderModuleCreateInfo const&,char const*,VkShaderStageFlagBits) loc_89D3D: mov rdx, [r15+18h] mov rsi, [r15+20h]; unsigned int * shr rdx, 2; unsigned __int64 lea rdi, [rbp+var_2718]; this call _ZN11spirv_cross12CompilerGLSLC2EPKjm; spirv_cross::CompilerGLSL::CompilerGLSL(uint const*,ulong) test rbx, rbx mov [rbp+var_68], r15 jz loc_89ED2 cmp r14d, 7Fh jg short loc_89D9B cmp r14d, 0Fh jg short loc_89DD2 lea eax, [r14-1]; switch 8 cases cmp eax, 7 ja def_89D89; jumptable 0000000000089D89 default case, cases 3,5-7 lea rcx, jpt_89D89 movsxd rax, ds:(jpt_89D89 - 3E4074h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_89D8B: xor r13d, r13d; jumptable 0000000000089D89 case 1 jmp loc_89E86 loc_89D93: xor r13d, r13d jmp loc_8A089 loc_89D9B: cmp r14d, 3FFh jle short loc_89DFB cmp r14d, 0FFFh jg short loc_89E1E cmp r14d, 400h jz loc_89E50 cmp r14d, 800h jnz def_89D89; jumptable 0000000000089D89 default case, cases 3,5-7 mov r13d, 14C5h jmp loc_89E86 loc_89DD2: cmp r14d, 10h jz loc_89E60 cmp r14d, 20h ; ' ' jz loc_89E70 cmp r14d, 40h ; '@' jnz def_89D89; jumptable 0000000000089D89 default case, cases 3,5-7 mov r13d, 14F4h jmp loc_89E86 loc_89DFB: cmp r14d, 80h jz short loc_89E68 cmp r14d, 100h jz short loc_89E78 cmp r14d, 200h jnz short def_89D89; jumptable 0000000000089D89 default case, cases 3,5-7 mov r13d, 14C3h jmp short loc_89E86 loc_89E1E: cmp r14d, 1000h jz short loc_89E58 cmp r14d, 2000h jnz short def_89D89; jumptable 0000000000089D89 default case, cases 3,5-7 mov r13d, 14C6h jmp short loc_89E86 loc_89E38: mov r13d, 1; jumptable 0000000000089D89 case 2 jmp short loc_89E86 loc_89E40: mov r13d, 2; jumptable 0000000000089D89 case 4 jmp short loc_89E86 loc_89E48: mov r13d, 3; jumptable 0000000000089D89 case 8 jmp short loc_89E86 loc_89E50: mov r13d, 14C4h jmp short loc_89E86 loc_89E58: mov r13d, 14C2h jmp short loc_89E86 loc_89E60: mov r13d, 4 jmp short loc_89E86 loc_89E68: mov r13d, 14F5h jmp short loc_89E86 loc_89E70: mov r13d, 5 jmp short loc_89E86 loc_89E78: mov r13d, 14C1h jmp short loc_89E86 def_89D89: mov r13d, 7FFFFFFFh; jumptable 0000000000089D89 default case, cases 3,5-7 loc_89E86: mov [rbp+var_2C], r13d lea r15, [rbp+var_48] mov [r15-10h], r15 mov rdi, rbx call _strlen lea rdx, [rax+rbx] lea rdi, [rbp+var_58] mov rsi, rbx 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 rdi, [rbp+var_2718] lea rsi, [rbp+var_58] mov edx, r13d call _ZN11spirv_cross8Compiler15set_entry_pointERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3spv14ExecutionModelE; spirv_cross::Compiler::set_entry_point(std::string const&,spv::ExecutionModel) mov rdi, [rbp+var_58]; void * cmp rdi, r15 jz short loc_89ED2 mov rsi, [rbp+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_89ED2: mov [rbp+var_70], rbx lea rsi, [rbp+var_2718]; this mov dword ptr [rsi+1DD4h], 1CCh xor eax, eax mov [rsi+1DD8h], ax mov dword ptr [rsi+1DDCh], 3 mov rcx, 100000001000001h mov [rsi+1DE0h], rcx mov qword ptr [rsi+1DE8h], 1000000h mov [rsi+1DF0h], ax mov byte ptr [rsi+1DF2h], 1 mov rax, 300000002h mov [rsi+1DF4h], rax lea rdi, [rbp+var_58]; int call _ZN11spirv_cross12CompilerGLSL7compileB5cxx11Ev; spirv_cross::CompilerGLSL::compile(void) lea rdi, [rbp+var_98] lea rbx, [rbp+var_58] mov rsi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [rbx]; void * lea rax, [rbp+var_48] cmp rdi, rax jz short loc_89F69 mov rsi, [rbp+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_89F69: lea rdi, [rbp+var_2718]; this call _ZN11spirv_cross12CompilerGLSLD2Ev; spirv_cross::CompilerGLSL::~CompilerGLSL() mov esi, 0B0h add rsi, [r12+10h] lea rdi, [rbp+var_2718] mov rdx, [rbp+var_38] mov rcx, [rbp+var_70] mov r8d, r14d call _ZL17generateCachePathRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmPKc21VkShaderStageFlagBits; generateCachePath(std::string const&,ulong,char const*,VkShaderStageFlagBits) mov ecx, [rbp+var_2C] mov r8d, [rbp+var_5C] lea rdi, [rbp+var_58] lea rsi, [rbp+var_2718] lea rdx, [rbp+var_98] call _Z14compileToSpirvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_N3spv14ExecutionModelEj; compileToSpirv(std::string const&,std::string const&,spv::ExecutionModel,uint) mov [rbp+var_A0], r14 lea rax, [rbp+var_2708] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_89FDA mov rsi, [rbp+var_2708] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_89FDA: mov rbx, [rbp+var_58] mov r14, [rbp+var_50] cmp rbx, r14 setnz r13b jz loc_8A09E sub r14, rbx mov rdi, [rbp+var_78]; this mov rsi, r14; unsigned __int64 call _ZN16ScratchAllocator10allocBytesEm; ScratchAllocator::allocBytes(ulong) mov r15, rax test rax, rax jz short loc_8A014 mov rdi, r15 mov rsi, rbx mov rdx, r14 call _memcpy loc_8A014: mov rcx, [rbp+var_68] mov [rcx+20h], r15 mov rax, [rbp+var_50] sub rax, [rbp+var_58] mov [rcx+18h], rax mov rax, [r12+10h] cmp qword ptr [rax+0B8h], 0 jz short loc_8A052 mov rdi, r12 mov rsi, [rbp+var_38] mov rdx, [rbp+var_68] mov rcx, [rbp+var_70] mov r8, [rbp+var_A0] call _ZNK6Device26placeOverrideShaderInCacheEmRK24VkShaderModuleCreateInfoPKc21VkShaderStageFlagBits; Device::placeOverrideShaderInCache(ulong,VkShaderModuleCreateInfo const&,char const*,VkShaderStageFlagBits) loc_8A052: mov rdi, [rbp+var_58]; void * test rdi, rdi jz short loc_8A067 mov rsi, [rbp+var_48] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8A067: mov rdi, [rbp+var_98]; void * lea rax, [rbp+var_88] cmp rdi, rax jz short loc_8A089 mov rsi, [rbp+var_88] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8A089: mov eax, r13d add rsp, 26F8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8A09E: call _ZNK6Device14overrideShaderER24VkShaderModuleCreateInfoPKc21VkShaderStageFlagBitsR16ScratchAllocator_cold_1; Device::overrideShader(VkShaderModuleCreateInfo &,char const*,VkShaderStageFlagBits,ScratchAllocator &) [clone] jmp short loc_8A052 mov r14, rdx mov rbx, rax mov rdi, [rbp+var_58]; void * cmp rdi, r15 jz short loc_8A0F4 mov rsi, [rbp+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_8A0F4 jmp short loc_8A0EE jmp short loc_8A0E9 mov rbx, rax lea rax, [rbp+var_2708] mov rdi, [rax-10h] cmp rdi, rax jz loc_8A164 mov rsi, [rbp+var_2708] inc rsi jmp short loc_8A15F loc_8A0E9: mov rbx, rax jmp short loc_8A164 loc_8A0EE: mov r14, rdx mov rbx, rax loc_8A0F4: lea rdi, [rbp+var_2718]; this call _ZN11spirv_cross12CompilerGLSLD2Ev; spirv_cross::CompilerGLSL::~CompilerGLSL() jmp short loc_8A108 mov r14, rdx mov rbx, rax loc_8A108: cmp r14d, 1 jnz short loc_8A164 mov rdi, rbx; void * call ___cxa_begin_catch mov rcx, cs:stderr_ptr mov rbx, [rcx] mov rcx, [rax] mov rdi, rax call qword ptr [rcx+10h] lea rsi, aPyroveilSpirvC; "pyroveil: SPIRV-Cross threw error: %s."... xor r13d, r13d mov rdi, rbx mov rdx, rax xor eax, eax call _fprintf call ___cxa_end_catch jmp loc_8A067 jmp short loc_8A0E9 mov rbx, rax mov rdi, [rbp+var_58]; void * test rdi, rdi jz short loc_8A164 mov rsi, [rbp+var_48] sub rsi, rdi; unsigned __int64 loc_8A15F: call __ZdlPvm; operator delete(void *,ulong) loc_8A164: mov rdi, [rbp+var_98]; void * lea rax, [rbp+var_88] cmp rdi, rax jz short loc_8A186 mov rsi, [rbp+var_88] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8A186: mov rdi, rbx call __Unwind_Resume
long long Device::overrideShader(long long a1, long long a2, long long a3, unsigned int a4, ScratchAllocator *a5) { long long v6; // r14 char v8; // dl long long v9; // rdx unsigned long long v10; // rax unsigned long long v11; // r15 long long v12; // rcx void *v14[2]; // [rsp+8h] [rbp-2718h] BYREF long long v15; // [rsp+18h] [rbp-2708h] BYREF int v16; // [rsp+1DDCh] [rbp-944h] __int16 v17; // [rsp+1DE0h] [rbp-940h] int v18; // [rsp+1DE4h] [rbp-93Ch] long long v19; // [rsp+1DE8h] [rbp-938h] long long v20; // [rsp+1DF0h] [rbp-930h] __int16 v21; // [rsp+1DF8h] [rbp-928h] char v22; // [rsp+1DFAh] [rbp-926h] long long v23; // [rsp+1DFCh] [rbp-924h] long long v24; // [rsp+2680h] [rbp-A0h] void *v25[2]; // [rsp+2688h] [rbp-98h] BYREF _QWORD v26[2]; // [rsp+2698h] [rbp-88h] BYREF ScratchAllocator *v27; // [rsp+26A8h] [rbp-78h] long long v28; // [rsp+26B0h] [rbp-70h] long long v29; // [rsp+26B8h] [rbp-68h] unsigned int v30; // [rsp+26C4h] [rbp-5Ch] BYREF void *v31; // [rsp+26C8h] [rbp-58h] BYREF _BYTE *v32; // [rsp+26D0h] [rbp-50h] _QWORD v33[2]; // [rsp+26D8h] [rbp-48h] BYREF unsigned long long v34; // [rsp+26E8h] [rbp-38h] unsigned int v35[11]; // [rsp+26F4h] [rbp-2Ch] BYREF v6 = a4; v35[0] = 0x7FFFFFFF; v30 = 0; v34 = Device::checkOverrideShader(a1, a2, a3 == 0, v35, &v30); if ( (v8 & 1) == 0 ) { LODWORD(a5) = 0; return (unsigned int)a5; } v27 = a5; if ( !*(_QWORD *)(*(_QWORD *)(a1 + 16) + 184LL) || (LOBYTE(a5) = 1, !(unsigned __int8)Device::overrideShaderFromCache(a1, v34, a2, a3, (unsigned int)v6, v27)) ) { v25[0] = v26; v25[1] = 0LL; LOBYTE(v26[0]) = 0; if ( *(_QWORD *)(*(_QWORD *)(a1 + 16) + 184LL) ) Device::placeOverrideShaderInCache(a1, v34, a2, (long long)"orig", 0); spirv_cross::CompilerGLSL::CompilerGLSL( (spirv_cross::CompilerGLSL *)v14, *(const unsigned int **)(a2 + 32), *(_QWORD *)(a2 + 24) >> 2); v29 = a2; if ( !a3 ) goto LABEL_40; if ( (int)v6 > 127 ) { if ( (int)v6 <= 1023 ) { switch ( (_DWORD)v6 ) { case 0x80: LODWORD(a5) = 5365; goto LABEL_38; case 0x100: LODWORD(a5) = 5313; goto LABEL_38; case 0x200: LODWORD(a5) = 5315; goto LABEL_38; } } else if ( (int)v6 > 4095 ) { if ( (_DWORD)v6 == 4096 ) { LODWORD(a5) = 5314; goto LABEL_38; } if ( (_DWORD)v6 == 0x2000 ) { LODWORD(a5) = 5318; goto LABEL_38; } } else { if ( (_DWORD)v6 == 1024 ) { LODWORD(a5) = 5316; goto LABEL_38; } if ( (_DWORD)v6 == 2048 ) { LODWORD(a5) = 5317; goto LABEL_38; } } } else { if ( (int)v6 <= 15 ) { switch ( (int)v6 ) { case 1: LODWORD(a5) = 0; break; case 2: LODWORD(a5) = 1; break; case 4: LODWORD(a5) = 2; break; case 8: LODWORD(a5) = 3; break; default: goto LABEL_37; } goto LABEL_38; } switch ( (_DWORD)v6 ) { case 0x10: LODWORD(a5) = 4; goto LABEL_38; case 0x20: LODWORD(a5) = 5; goto LABEL_38; case 0x40: LODWORD(a5) = 5364; goto LABEL_38; } } LABEL_37: LODWORD(a5) = 0x7FFFFFFF; LABEL_38: v35[0] = (unsigned int)a5; v31 = v33; v9 = strlen(a3) + a3; std::string::_M_construct<char const*>(&v31, a3, v9); spirv_cross::Compiler::set_entry_point(v14, &v31, (unsigned int)a5); if ( v31 != v33 ) operator delete(v31, v33[0] + 1LL); LABEL_40: v28 = a3; v16 = 460; v17 = 0; v18 = 3; v19 = 0x100000001000001LL; v20 = 0x1000000LL; v21 = 0; v22 = 1; v23 = 0x300000002LL; spirv_cross::CompilerGLSL::compile[abi:cxx11]((int)&v31, (spirv_cross::CompilerGLSL *)v14); std::string::operator=(v25); if ( v31 != v33 ) operator delete(v31, v33[0] + 1LL); spirv_cross::CompilerGLSL::~CompilerGLSL((spirv_cross::CompilerGLSL *)v14); generateCachePath((long long)v14, (_QWORD *)(*(_QWORD *)(a1 + 16) + 176LL), v34, v28, v6); compileToSpirv(&v31, v14, v25, v35[0], v30); v24 = v6; if ( v14[0] != &v15 ) operator delete(v14[0], v15 + 1); LOBYTE(a5) = v31 != v32; if ( v31 == v32 ) { Device::overrideShader(); } else { v10 = ScratchAllocator::allocBytes(v27, v32 - (_BYTE *)v31); v11 = v10; if ( v10 ) memcpy(v10); v12 = v29; *(_QWORD *)(v29 + 32) = v11; *(_QWORD *)(v12 + 24) = v32 - (_BYTE *)v31; if ( *(_QWORD *)(*(_QWORD *)(a1 + 16) + 184LL) ) Device::placeOverrideShaderInCache(a1, v34, v29, v28, v24); } if ( v31 ) operator delete(v31, v33[0] - (_QWORD)v31); if ( v25[0] != v26 ) operator delete(v25[0], v26[0] + 1LL); } return (unsigned int)a5; }
overrideShader: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x26f8 MOV R13,R8 MOV R14D,ECX MOV RBX,RDX MOV R15,RSI MOV R12,RDI LEA RCX,[RBP + -0x2c] MOV dword ptr [RCX],0x7fffffff LEA R8,[RBP + -0x5c] MOV dword ptr [R8],0x0 XOR EDX,EDX TEST RBX,RBX SETZ DL CALL 0x001893ec MOV qword ptr [RBP + -0x38],RAX TEST DL,0x1 JZ 0x00189d93 MOV qword ptr [RBP + -0x78],R13 MOV RAX,qword ptr [R12 + 0x10] CMP qword ptr [RAX + 0xb8],0x0 JZ 0x00189cff MOV RDI,R12 MOV RSI,qword ptr [RBP + -0x38] MOV RDX,R15 MOV RCX,RBX MOV R8D,R14D MOV R9,qword ptr [RBP + -0x78] CALL 0x0018980c MOV R13B,0x1 TEST AL,AL JNZ 0x0018a089 LAB_00189cff: LEA RAX,[RBP + -0x88] MOV qword ptr [RAX + -0x10],RAX MOV qword ptr [RAX + -0x8],0x0 MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [R12 + 0x10] CMP qword ptr [RAX + 0xb8],0x0 JZ 0x00189d3d LAB_00189d24: LEA RCX,[0x4e461b] MOV RDI,R12 MOV RSI,qword ptr [RBP + -0x38] MOV RDX,R15 XOR R8D,R8D CALL 0x00189b50 LAB_00189d3d: MOV RDX,qword ptr [R15 + 0x18] MOV RSI,qword ptr [R15 + 0x20] SHR RDX,0x2 LAB_00189d49: LEA RDI,[RBP + -0x2718] CALL 0x0018bece TEST RBX,RBX MOV qword ptr [RBP + -0x68],R15 JZ 0x00189ed2 CMP R14D,0x7f JG 0x00189d9b CMP R14D,0xf JG 0x00189dd2 LEA EAX,[R14 + -0x1] CMP EAX,0x7 JA 0x00189e80 LEA RCX,[0x4e4074] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: XOR R13D,R13D JMP 0x00189e86 LAB_00189d93: XOR R13D,R13D JMP 0x0018a089 LAB_00189d9b: CMP R14D,0x3ff JLE 0x00189dfb CMP R14D,0xfff JG 0x00189e1e CMP R14D,0x400 JZ 0x00189e50 CMP R14D,0x800 JNZ 0x00189e80 MOV R13D,0x14c5 JMP 0x00189e86 LAB_00189dd2: CMP R14D,0x10 JZ 0x00189e60 CMP R14D,0x20 JZ 0x00189e70 CMP R14D,0x40 JNZ 0x00189e80 MOV R13D,0x14f4 JMP 0x00189e86 LAB_00189dfb: CMP R14D,0x80 JZ 0x00189e68 CMP R14D,0x100 JZ 0x00189e78 CMP R14D,0x200 JNZ 0x00189e80 MOV R13D,0x14c3 JMP 0x00189e86 LAB_00189e1e: CMP R14D,0x1000 JZ 0x00189e58 CMP R14D,0x2000 JNZ 0x00189e80 MOV R13D,0x14c6 JMP 0x00189e86 caseD_2: MOV R13D,0x1 JMP 0x00189e86 caseD_4: MOV R13D,0x2 JMP 0x00189e86 caseD_8: MOV R13D,0x3 JMP 0x00189e86 LAB_00189e50: MOV R13D,0x14c4 JMP 0x00189e86 LAB_00189e58: MOV R13D,0x14c2 JMP 0x00189e86 LAB_00189e60: MOV R13D,0x4 JMP 0x00189e86 LAB_00189e68: MOV R13D,0x14f5 JMP 0x00189e86 LAB_00189e70: MOV R13D,0x5 JMP 0x00189e86 LAB_00189e78: MOV R13D,0x14c1 JMP 0x00189e86 caseD_3: MOV R13D,0x7fffffff LAB_00189e86: MOV dword ptr [RBP + -0x2c],R13D LEA R15,[RBP + -0x48] MOV qword ptr [R15 + -0x10],R15 MOV RDI,RBX CALL 0x0017e800 LEA RDX,[RAX + RBX*0x1] LAB_00189e9e: LEA RDI,[RBP + -0x58] MOV RSI,RBX CALL 0x0017e700 LAB_00189eaa: LEA RDI,[RBP + -0x2718] LEA RSI,[RBP + -0x58] MOV EDX,R13D CALL 0x004c92aa MOV RDI,qword ptr [RBP + -0x58] CMP RDI,R15 JZ 0x00189ed2 MOV RSI,qword ptr [RBP + -0x48] INC RSI CALL 0x0017f6e0 LAB_00189ed2: MOV qword ptr [RBP + -0x70],RBX LEA RSI,[RBP + -0x2718] MOV dword ptr [RSI + 0x1dd4],0x1cc XOR EAX,EAX MOV word ptr [RSI + 0x1dd8],AX MOV dword ptr [RSI + 0x1ddc],0x3 MOV RCX,0x100000001000001 MOV qword ptr [RSI + 0x1de0],RCX MOV qword ptr [RSI + 0x1de8],0x1000000 MOV word ptr [RSI + 0x1df0],AX MOV byte ptr [RSI + 0x1df2],0x1 MOV RAX,0x300000002 MOV qword ptr [RSI + 0x1df4],RAX LAB_00189f35: LEA RDI,[RBP + -0x58] CALL 0x00193efc LEA RDI,[RBP + -0x98] LEA RBX,[RBP + -0x58] MOV RSI,RBX CALL 0x0017fbf0 MOV RDI,qword ptr [RBX] LEA RAX,[RBP + -0x48] CMP RDI,RAX JZ 0x00189f69 MOV RSI,qword ptr [RBP + -0x48] INC RSI CALL 0x0017f6e0 LAB_00189f69: LEA RDI,[RBP + -0x2718] CALL 0x0018c6e8 MOV ESI,0xb0 ADD RSI,qword ptr [R12 + 0x10] LAB_00189f7f: LEA RDI,[RBP + -0x2718] MOV RDX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x70] MOV R8D,R14D CALL 0x00189920 MOV ECX,dword ptr [RBP + -0x2c] MOV R8D,dword ptr [RBP + -0x5c] LAB_00189f9d: LEA RDI,[RBP + -0x58] LEA RSI,[RBP + -0x2718] LEA RDX,[RBP + -0x98] CALL 0x001920ec MOV qword ptr [RBP + -0xa0],R14 LEA RAX,[RBP + -0x2708] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00189fda MOV RSI,qword ptr [RBP + -0x2708] INC RSI CALL 0x0017f6e0 LAB_00189fda: MOV RBX,qword ptr [RBP + -0x58] MOV R14,qword ptr [RBP + -0x50] CMP RBX,R14 SETNZ R13B JZ 0x0018a09e SUB R14,RBX LAB_00189ff2: MOV RDI,qword ptr [RBP + -0x78] MOV RSI,R14 CALL 0x001888ec LAB_00189ffe: MOV R15,RAX TEST RAX,RAX JZ 0x0018a014 MOV RDI,R15 MOV RSI,RBX MOV RDX,R14 CALL 0x0017f1b0 LAB_0018a014: MOV RCX,qword ptr [RBP + -0x68] MOV qword ptr [RCX + 0x20],R15 MOV RAX,qword ptr [RBP + -0x50] SUB RAX,qword ptr [RBP + -0x58] MOV qword ptr [RCX + 0x18],RAX MOV RAX,qword ptr [R12 + 0x10] CMP qword ptr [RAX + 0xb8],0x0 JZ 0x0018a052 LAB_0018a037: MOV RDI,R12 MOV RSI,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x70] MOV R8,qword ptr [RBP + -0xa0] CALL 0x00189b50 LAB_0018a052: MOV RDI,qword ptr [RBP + -0x58] TEST RDI,RDI JZ 0x0018a067 MOV RSI,qword ptr [RBP + -0x48] SUB RSI,RDI CALL 0x0017f6e0 LAB_0018a067: MOV RDI,qword ptr [RBP + -0x98] LEA RAX,[RBP + -0x88] CMP RDI,RAX JZ 0x0018a089 MOV RSI,qword ptr [RBP + -0x88] INC RSI CALL 0x0017f6e0 LAB_0018a089: MOV EAX,R13D ADD RSP,0x26f8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0018a09e: CALL 0x0018115b JMP 0x0018a052
/* Device::overrideShader(VkShaderModuleCreateInfo&, char const*, VkShaderStageFlagBits, ScratchAllocator&) const */ ulong __thiscall Device::overrideShader (Device *this,VkShaderModuleCreateInfo *param_1,char *param_2,uint param_4, ScratchAllocator *param_5) { long *__src; char cVar1; size_t sVar2; void *__dest; ulong uVar3; int1 auVar4 [16]; long *local_2720 [2]; long local_2710 [952]; int4 local_94c; int2 local_948; int4 local_944; int8 local_940; int8 local_938; int2 local_930; int1 local_92e; int8 local_92c; ulong local_a8; int1 *local_a0; int8 local_98; int1 local_90; int7 uStack_8f; ScratchAllocator *local_80; char *local_78; VkShaderModuleCreateInfo *local_70; uint local_64; long *local_60; long *local_58; long local_50 [2]; int8 local_40; int4 local_34; uVar3 = (ulong)param_4; local_34 = 0x7fffffff; local_64 = 0; auVar4 = checkOverrideShader(this,param_1,param_2 == (char *)0x0,(ExecutionModel *)&local_34, &local_64); local_40 = auVar4._0_8_; if ((auVar4 & (int1 [16])0x1) == (int1 [16])0x0) { param_5 = (ScratchAllocator *)0x0; goto LAB_0018a089; } local_80 = param_5; if (*(long *)(*(long *)(this + 0x10) + 0xb8) != 0) { cVar1 = overrideShaderFromCache(this,local_40,param_1,param_2,uVar3,param_5); param_5 = (ScratchAllocator *)CONCAT71((int7)((ulong)param_5 >> 8),1); if (cVar1 != '\0') goto LAB_0018a089; } local_a0 = &local_90; local_98 = 0; local_90 = 0; if (*(long *)(*(long *)(this + 0x10) + 0xb8) != 0) { /* try { // try from 00189d24 to 00189d3c has its CatchHandler @ 0018a0c4 */ placeOverrideShaderInCache(this,local_40,param_1,&DAT_004e461b,0); } /* try { // try from 00189d49 to 00189d54 has its CatchHandler @ 0018a102 */ spirv_cross::CompilerGLSL::CompilerGLSL ((CompilerGLSL *)local_2720,*(uint **)(param_1 + 0x20),*(ulong *)(param_1 + 0x18) >> 2); local_70 = param_1; if (param_2 != (char *)0x0) { if ((int)param_4 < 0x80) { if ((int)param_4 < 0x10) { switch(param_4) { case 1: param_5 = (ScratchAllocator *)0x0; break; case 2: param_5 = (ScratchAllocator *)0x1; break; default: switchD_00189d89_caseD_3: param_5 = (ScratchAllocator *)0x7fffffff; break; case 4: param_5 = (ScratchAllocator *)0x2; break; case 8: param_5 = (ScratchAllocator *)0x3; } } else if (param_4 == 0x10) { param_5 = (ScratchAllocator *)0x4; } else if (param_4 == 0x20) { param_5 = (ScratchAllocator *)0x5; } else { if (param_4 != 0x40) goto switchD_00189d89_caseD_3; param_5 = (ScratchAllocator *)0x14f4; } } else if ((int)param_4 < 0x400) { if (param_4 == 0x80) { param_5 = (ScratchAllocator *)0x14f5; } else if (param_4 == 0x100) { param_5 = (ScratchAllocator *)0x14c1; } else { if (param_4 != 0x200) goto switchD_00189d89_caseD_3; param_5 = (ScratchAllocator *)0x14c3; } } else if ((int)param_4 < 0x1000) { if (param_4 == 0x400) { param_5 = (ScratchAllocator *)0x14c4; } else { if (param_4 != 0x800) goto switchD_00189d89_caseD_3; param_5 = (ScratchAllocator *)0x14c5; } } else if (param_4 == 0x1000) { param_5 = (ScratchAllocator *)0x14c2; } else { if (param_4 != 0x2000) goto switchD_00189d89_caseD_3; param_5 = (ScratchAllocator *)0x14c6; } local_34 = SUB84(param_5,0); local_60 = local_50; sVar2 = strlen(param_2); /* try { // try from 00189e9e to 00189ea9 has its CatchHandler @ 0018a0c2 */ std::__cxx11::string::_M_construct<char_const*>(&local_60,param_2,param_2 + sVar2); /* try { // try from 00189eaa to 00189ebc has its CatchHandler @ 0018a0a5 */ spirv_cross::Compiler::set_entry_point(local_2720,&local_60,param_5); if (local_60 != local_50) { operator_delete(local_60,local_50[0] + 1); } } local_94c = 0x1cc; local_948 = 0; local_944 = 3; local_940 = 0x100000001000001; local_938 = 0x1000000; local_930 = 0; local_92e = 1; local_92c = 0x300000002; local_78 = param_2; /* try { // try from 00189f35 to 00189f3d has its CatchHandler @ 0018a0ee */ spirv_cross::CompilerGLSL::compile_abi_cxx11_(); std::__cxx11::string::operator=((string *)&local_a0,(string *)&local_60); if (local_60 != local_50) { operator_delete(local_60,local_50[0] + 1); } spirv_cross::CompilerGLSL::~CompilerGLSL((CompilerGLSL *)local_2720); /* try { // try from 00189f7f to 00189f95 has its CatchHandler @ 0018a0e9 */ generateCachePath(local_2720,*(long *)(this + 0x10) + 0xb0,local_40,local_78,param_4); /* try { // try from 00189f9d to 00189fb3 has its CatchHandler @ 0018a0c6 */ compileToSpirv(&local_60,local_2720,&local_a0,local_34,local_64); local_a8 = uVar3; if (local_2720[0] != local_2710) { operator_delete(local_2720[0],local_2710[0] + 1); } __src = local_60; param_5 = (ScratchAllocator *)CONCAT71((int7)((ulong)param_5 >> 8),local_60 != local_58); if (local_60 == local_58) { overrideShader(); } else { uVar3 = (long)local_58 - (long)local_60; /* try { // try from 00189ff2 to 00189ffd has its CatchHandler @ 0018a14c */ __dest = (void *)ScratchAllocator::allocBytes(local_80,uVar3); if (__dest != (void *)0x0) { memcpy(__dest,__src,uVar3); } *(void **)(local_70 + 0x20) = __dest; *(long *)(local_70 + 0x18) = (long)local_58 - (long)local_60; if (*(long *)(*(long *)(this + 0x10) + 0xb8) != 0) { /* try { // try from 0018a037 to 0018a051 has its CatchHandler @ 0018a14c */ placeOverrideShaderInCache(this,local_40,local_70,local_78,local_a8); } } if (local_60 != (long *)0x0) { operator_delete(local_60,local_50[0] - (long)local_60); } if (local_a0 != &local_90) { operator_delete(local_a0,CONCAT71(uStack_8f,local_90) + 1); } LAB_0018a089: return (ulong)param_5 & 0xffffffff; }
23,536
rlLoadTextureDepth
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rlgl.h
unsigned int rlLoadTextureDepth(int width, int height, bool useRenderBuffer) { unsigned int id = 0; #if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2) // In case depth textures not supported, we force renderbuffer usage if (!RLGL.ExtSupported.texDepth) useRenderBuffer = true; // NOTE: We let the implementation to choose the best bit-depth // Possible formats: GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT24, GL_DEPTH_COMPONENT32 and GL_DEPTH_COMPONENT32F unsigned int glInternalFormat = GL_DEPTH_COMPONENT; #if (defined(GRAPHICS_API_OPENGL_ES2) || defined(GRAPHICS_API_OPENGL_ES3)) // WARNING: WebGL platform requires unsized internal format definition (GL_DEPTH_COMPONENT) // while other platforms using OpenGL ES 2.0 require/support sized internal formats depending on the GPU capabilities if (!RLGL.ExtSupported.texDepthWebGL || useRenderBuffer) { if (RLGL.ExtSupported.maxDepthBits == 32) glInternalFormat = GL_DEPTH_COMPONENT32_OES; else if (RLGL.ExtSupported.maxDepthBits == 24) glInternalFormat = GL_DEPTH_COMPONENT24_OES; else glInternalFormat = GL_DEPTH_COMPONENT16; } #endif if (!useRenderBuffer && RLGL.ExtSupported.texDepth) { glGenTextures(1, &id); glBindTexture(GL_TEXTURE_2D, id); glTexImage2D(GL_TEXTURE_2D, 0, glInternalFormat, width, height, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glBindTexture(GL_TEXTURE_2D, 0); TRACELOG(RL_LOG_INFO, "TEXTURE: Depth texture loaded successfully"); } else { // Create the renderbuffer that will serve as the depth attachment for the framebuffer // NOTE: A renderbuffer is simpler than a texture and could offer better performance on embedded devices glGenRenderbuffers(1, &id); glBindRenderbuffer(GL_RENDERBUFFER, id); glRenderbufferStorage(GL_RENDERBUFFER, glInternalFormat, width, height); glBindRenderbuffer(GL_RENDERBUFFER, 0); TRACELOG(RL_LOG_INFO, "TEXTURE: [ID %i] Depth renderbuffer loaded successfully (%i bits)", id, (RLGL.ExtSupported.maxDepthBits >= 24)? RLGL.ExtSupported.maxDepthBits : 16); } #endif return id; }
O0
c
rlLoadTextureDepth: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movb %dl, %al movl %edi, -0x4(%rbp) movl %esi, -0x8(%rbp) andb $0x1, %al movb %al, -0x9(%rbp) movl $0x0, -0x10(%rbp) testb $0x1, 0x164e70(%rip) # 0x21ac63 jne 0xb5df9 movb $0x1, -0x9(%rbp) movl $0x1902, -0x14(%rbp) # imm = 0x1902 testb $0x1, -0x9(%rbp) jne 0xb5ee8 testb $0x1, 0x164e52(%rip) # 0x21ac63 je 0xb5ee8 movl $0x1, %edi leaq -0x10(%rbp), %rsi callq *0x162c8a(%rip) # 0x218ab0 movq 0x162533(%rip), %rax # 0x218360 movl -0x10(%rbp), %esi movl $0xde1, %edi # imm = 0xDE1 callq *%rax movq 0x163b02(%rip), %rax # 0x219940 movl -0x14(%rbp), %edx movl -0x4(%rbp), %ecx movl -0x8(%rbp), %r8d movl $0xde1, %edi # imm = 0xDE1 xorl %r9d, %r9d xorl %esi, %esi movl %r9d, %esi movl $0x1902, (%rsp) # imm = 0x1902 movl $0x1405, 0x8(%rsp) # imm = 0x1405 movq $0x0, 0x10(%rsp) callq *%rax movl $0xde1, %edi # imm = 0xDE1 movl $0x2801, %esi # imm = 0x2801 movl $0x2600, %edx # imm = 0x2600 callq *0x163afc(%rip) # 0x219980 movl $0xde1, %edi # imm = 0xDE1 movl $0x2800, %esi # imm = 0x2800 movl $0x2600, %edx # imm = 0x2600 callq *0x163ae7(%rip) # 0x219980 movl $0xde1, %edi # imm = 0xDE1 movl $0x2802, %esi # imm = 0x2802 movl $0x812f, %edx # imm = 0x812F callq *0x163ad2(%rip) # 0x219980 movl $0xde1, %edi # imm = 0xDE1 movl $0x2803, %esi # imm = 0x2803 movl $0x812f, %edx # imm = 0x812F callq *0x163abd(%rip) # 0x219980 movl $0xde1, %edi # imm = 0xDE1 xorl %esi, %esi callq *0x162490(%rip) # 0x218360 movl $0x3, %edi leaq 0xfec4e(%rip), %rsi # 0x1b4b2a movb $0x0, %al callq 0x182c40 jmp 0xb5f69 movl $0x1, %edi leaq -0x10(%rbp), %rsi callq *0x162ba1(%rip) # 0x218a98 movq 0x162442(%rip), %rax # 0x218340 movl -0x10(%rbp), %esi movl $0x8d41, %edi # imm = 0x8D41 callq *%rax movq 0x1638c1(%rip), %rax # 0x2197d0 movl -0x14(%rbp), %esi movl -0x4(%rbp), %edx movl -0x8(%rbp), %ecx movl $0x8d41, %edi # imm = 0x8D41 callq *%rax movl $0x8d41, %edi # imm = 0x8D41 xorl %esi, %esi callq *0x162414(%rip) # 0x218340 movl -0x10(%rbp), %eax movl %eax, -0x18(%rbp) cmpl $0x18, 0x164d3b(%rip) # 0x21ac74 jl 0xb5f46 movl 0x164d33(%rip), %eax # 0x21ac74 movl %eax, -0x1c(%rbp) jmp 0xb5f50 movl $0x10, %eax movl %eax, -0x1c(%rbp) jmp 0xb5f50 movl -0x18(%rbp), %edx movl -0x1c(%rbp), %ecx movl $0x3, %edi leaq 0xfebf3(%rip), %rsi # 0x1b4b55 movb $0x0, %al callq 0x182c40 movl -0x10(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
rlLoadTextureDepth: push rbp mov rbp, rsp sub rsp, 40h mov al, dl mov [rbp+var_4], edi mov [rbp+var_8], esi and al, 1 mov [rbp+var_9], al mov [rbp+var_10], 0 test cs:byte_21AC63, 1 jnz short loc_B5DF9 mov [rbp+var_9], 1 loc_B5DF9: mov [rbp+var_14], 1902h test [rbp+var_9], 1 jnz loc_B5EE8 test cs:byte_21AC63, 1 jz loc_B5EE8 mov edi, 1 lea rsi, [rbp+var_10] call cs:glad_glGenTextures mov rax, cs:glad_glBindTexture mov esi, [rbp+var_10] mov edi, 0DE1h call rax ; glad_glBindTexture mov rax, cs:glad_glTexImage2D mov edx, [rbp+var_14] mov ecx, [rbp+var_4] mov r8d, [rbp+var_8] mov edi, 0DE1h xor r9d, r9d xor esi, esi mov esi, r9d mov [rsp+40h+var_40], 1902h mov [rsp+40h+var_38], 1405h mov [rsp+40h+var_30], 0 call rax ; glad_glTexImage2D mov edi, 0DE1h mov esi, 2801h mov edx, 2600h call cs:glad_glTexParameteri mov edi, 0DE1h mov esi, 2800h mov edx, 2600h call cs:glad_glTexParameteri mov edi, 0DE1h mov esi, 2802h mov edx, 812Fh call cs:glad_glTexParameteri mov edi, 0DE1h mov esi, 2803h mov edx, 812Fh call cs:glad_glTexParameteri mov edi, 0DE1h xor esi, esi call cs:glad_glBindTexture mov edi, 3 lea rsi, aTextureDepthTe; "TEXTURE: Depth texture loaded successfu"... mov al, 0 call TraceLog jmp loc_B5F69 loc_B5EE8: mov edi, 1 lea rsi, [rbp+var_10] call cs:glad_glGenRenderbuffers mov rax, cs:glad_glBindRenderbuffer mov esi, [rbp+var_10] mov edi, 8D41h call rax ; glad_glBindRenderbuffer mov rax, cs:glad_glRenderbufferStorage mov esi, [rbp+var_14] mov edx, [rbp+var_4] mov ecx, [rbp+var_8] mov edi, 8D41h call rax ; glad_glRenderbufferStorage mov edi, 8D41h xor esi, esi call cs:glad_glBindRenderbuffer mov eax, [rbp+var_10] mov [rbp+var_18], eax cmp cs:dword_21AC74, 18h jl short loc_B5F46 mov eax, cs:dword_21AC74 mov [rbp+var_1C], eax jmp short loc_B5F50 loc_B5F46: mov eax, 10h mov [rbp+var_1C], eax jmp short $+2 loc_B5F50: mov edx, [rbp+var_18] mov ecx, [rbp+var_1C] mov edi, 3 lea rsi, aTextureIdIDept; "TEXTURE: [ID %i] Depth renderbuffer loa"... mov al, 0 call TraceLog loc_B5F69: mov eax, [rbp+var_10] add rsp, 40h pop rbp retn
long long rlLoadTextureDepth(unsigned int a1, unsigned int a2, char a3) { int v3; // edx int v4; // ecx int v5; // r8d int v6; // r9d int v7; // r8d int v8; // r9d int v10; // [rsp+8h] [rbp-38h] unsigned int v11; // [rsp+30h] [rbp-10h] BYREF char v12; // [rsp+37h] [rbp-9h] unsigned int v13; // [rsp+38h] [rbp-8h] unsigned int v14; // [rsp+3Ch] [rbp-4h] v14 = a1; v13 = a2; v12 = a3 & 1; v11 = 0; if ( (byte_21AC63 & 1) == 0 ) v12 = 1; if ( (v12 & 1) != 0 || (byte_21AC63 & 1) == 0 ) { glad_glGenRenderbuffers(1LL, &v11); glad_glBindRenderbuffer(36161LL, v11); glad_glRenderbufferStorage(36161LL, 6402LL, v14, v13); glad_glBindRenderbuffer(36161LL, 0LL); if ( dword_21AC74 < 24 ) TraceLog(3, (unsigned int)"TEXTURE: [ID %i] Depth renderbuffer loaded successfully (%i bits)", v11, 16, v7, v8); else TraceLog( 3, (unsigned int)"TEXTURE: [ID %i] Depth renderbuffer loaded successfully (%i bits)", v11, dword_21AC74, v7, v8); } else { glad_glGenTextures(1LL, &v11); glad_glBindTexture(3553LL, v11); v10 = 5125; glad_glTexImage2D(3553LL, 0LL, 6402LL, v14, v13, 0LL, 6402, v10, 0LL); glad_glTexParameteri(3553LL, 10241LL, 9728LL); glad_glTexParameteri(3553LL, 10240LL, 9728LL); glad_glTexParameteri(3553LL, 10242LL, 33071LL); glad_glTexParameteri(3553LL, "_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE13_M_local_dataEv", 33071LL); glad_glBindTexture(3553LL, 0LL); TraceLog(3, (unsigned int)"TEXTURE: Depth texture loaded successfully", v3, v4, v5, v6); } return v11; }
rlLoadTextureDepth: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV AL,DL MOV dword ptr [RBP + -0x4],EDI MOV dword ptr [RBP + -0x8],ESI AND AL,0x1 MOV byte ptr [RBP + -0x9],AL MOV dword ptr [RBP + -0x10],0x0 TEST byte ptr [0x0031ac63],0x1 JNZ 0x001b5df9 MOV byte ptr [RBP + -0x9],0x1 LAB_001b5df9: MOV dword ptr [RBP + -0x14],0x1902 TEST byte ptr [RBP + -0x9],0x1 JNZ 0x001b5ee8 TEST byte ptr [0x0031ac63],0x1 JZ 0x001b5ee8 MOV EDI,0x1 LEA RSI,[RBP + -0x10] CALL qword ptr [0x00318ab0] MOV RAX,qword ptr [0x00318360] MOV ESI,dword ptr [RBP + -0x10] MOV EDI,0xde1 CALL RAX MOV RAX,qword ptr [0x00319940] MOV EDX,dword ptr [RBP + -0x14] MOV ECX,dword ptr [RBP + -0x4] MOV R8D,dword ptr [RBP + -0x8] MOV EDI,0xde1 XOR R9D,R9D XOR ESI,ESI MOV ESI,R9D MOV dword ptr [RSP],0x1902 MOV dword ptr [RSP + 0x8],0x1405 MOV qword ptr [RSP + 0x10],0x0 CALL RAX MOV EDI,0xde1 MOV ESI,0x2801 MOV EDX,0x2600 CALL qword ptr [0x00319980] MOV EDI,0xde1 MOV ESI,0x2800 MOV EDX,0x2600 CALL qword ptr [0x00319980] MOV EDI,0xde1 MOV ESI,0x2802 MOV EDX,0x812f CALL qword ptr [0x00319980] MOV EDI,0xde1 MOV ESI,0x2803 MOV EDX,0x812f CALL qword ptr [0x00319980] MOV EDI,0xde1 XOR ESI,ESI CALL qword ptr [0x00318360] MOV EDI,0x3 LEA RSI,[0x2b4b2a] MOV AL,0x0 CALL 0x00282c40 JMP 0x001b5f69 LAB_001b5ee8: MOV EDI,0x1 LEA RSI,[RBP + -0x10] CALL qword ptr [0x00318a98] MOV RAX,qword ptr [0x00318340] MOV ESI,dword ptr [RBP + -0x10] MOV EDI,0x8d41 CALL RAX MOV RAX,qword ptr [0x003197d0] MOV ESI,dword ptr [RBP + -0x14] MOV EDX,dword ptr [RBP + -0x4] MOV ECX,dword ptr [RBP + -0x8] MOV EDI,0x8d41 CALL RAX MOV EDI,0x8d41 XOR ESI,ESI CALL qword ptr [0x00318340] MOV EAX,dword ptr [RBP + -0x10] MOV dword ptr [RBP + -0x18],EAX CMP dword ptr [0x0031ac74],0x18 JL 0x001b5f46 MOV EAX,dword ptr [0x0031ac74] MOV dword ptr [RBP + -0x1c],EAX JMP 0x001b5f50 LAB_001b5f46: MOV EAX,0x10 MOV dword ptr [RBP + -0x1c],EAX JMP 0x001b5f50 LAB_001b5f50: MOV EDX,dword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x1c] MOV EDI,0x3 LEA RSI,[0x2b4b55] MOV AL,0x0 CALL 0x00282c40 LAB_001b5f69: MOV EAX,dword ptr [RBP + -0x10] ADD RSP,0x40 POP RBP RET
int4 rlLoadTextureDepth(int4 param_1,int4 param_2,byte param_3) { int local_24; int4 local_18; byte local_11; int4 local_10; int4 local_c; local_11 = param_3 & 1; local_18 = 0; if ((DAT_0031ac63 & 1) == 0) { local_11 = 1; } local_10 = param_2; local_c = param_1; if ((local_11 == 0) && ((DAT_0031ac63 & 1) != 0)) { (*glad_glGenTextures)(1,&local_18); (*glad_glBindTexture)(0xde1,local_18); (*glad_glTexImage2D)(0xde1,0,0x1902,local_c,local_10,0,0x1902,0x1405,0); (*glad_glTexParameteri)(0xde1,0x2801,0x2600); (*glad_glTexParameteri)(0xde1,0x2800,0x2600); (*glad_glTexParameteri)(0xde1,0x2802,0x812f); (*glad_glTexParameteri)(0xde1,0x2803,0x812f); (*glad_glBindTexture)(0xde1,0); TraceLog(3,"TEXTURE: Depth texture loaded successfully"); } else { (*glad_glGenRenderbuffers)(1,&local_18); (*glad_glBindRenderbuffer)(0x8d41,local_18); (*glad_glRenderbufferStorage)(0x8d41,0x1902,local_c,local_10); (*glad_glBindRenderbuffer)(0x8d41,0); if (DAT_0031ac74 < 0x18) { local_24 = 0x10; } else { local_24 = DAT_0031ac74; } TraceLog(3,"TEXTURE: [ID %i] Depth renderbuffer loaded successfully (%i bits)",local_18,local_24 ); } return local_18; }
23,537
rlLoadTextureDepth
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rlgl.h
unsigned int rlLoadTextureDepth(int width, int height, bool useRenderBuffer) { unsigned int id = 0; #if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2) // In case depth textures not supported, we force renderbuffer usage if (!RLGL.ExtSupported.texDepth) useRenderBuffer = true; // NOTE: We let the implementation to choose the best bit-depth // Possible formats: GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT24, GL_DEPTH_COMPONENT32 and GL_DEPTH_COMPONENT32F unsigned int glInternalFormat = GL_DEPTH_COMPONENT; #if (defined(GRAPHICS_API_OPENGL_ES2) || defined(GRAPHICS_API_OPENGL_ES3)) // WARNING: WebGL platform requires unsized internal format definition (GL_DEPTH_COMPONENT) // while other platforms using OpenGL ES 2.0 require/support sized internal formats depending on the GPU capabilities if (!RLGL.ExtSupported.texDepthWebGL || useRenderBuffer) { if (RLGL.ExtSupported.maxDepthBits == 32) glInternalFormat = GL_DEPTH_COMPONENT32_OES; else if (RLGL.ExtSupported.maxDepthBits == 24) glInternalFormat = GL_DEPTH_COMPONENT24_OES; else glInternalFormat = GL_DEPTH_COMPONENT16; } #endif if (!useRenderBuffer && RLGL.ExtSupported.texDepth) { glGenTextures(1, &id); glBindTexture(GL_TEXTURE_2D, id); glTexImage2D(GL_TEXTURE_2D, 0, glInternalFormat, width, height, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glBindTexture(GL_TEXTURE_2D, 0); TRACELOG(RL_LOG_INFO, "TEXTURE: Depth texture loaded successfully"); } else { // Create the renderbuffer that will serve as the depth attachment for the framebuffer // NOTE: A renderbuffer is simpler than a texture and could offer better performance on embedded devices glGenRenderbuffers(1, &id); glBindRenderbuffer(GL_RENDERBUFFER, id); glRenderbufferStorage(GL_RENDERBUFFER, glInternalFormat, width, height); glBindRenderbuffer(GL_RENDERBUFFER, 0); TRACELOG(RL_LOG_INFO, "TEXTURE: [ID %i] Depth renderbuffer loaded successfully (%i bits)", id, (RLGL.ExtSupported.maxDepthBits >= 24)? RLGL.ExtSupported.maxDepthBits : 16); } #endif return id; }
O2
c
rlLoadTextureDepth: pushq %rbp pushq %r14 pushq %rbx subq $0x20, %rsp movl %esi, %ebx andl $0x0, 0x1c(%rsp) movl %edi, %ebp movb 0xd3460(%rip), %al # 0x127bc3 xorb $0x1, %al pushq $0x1 popq %rdi leaq 0x1c(%rsp), %r14 movq %r14, %rsi orb %dl, %al je 0x547d1 callq *0xd127e(%rip) # 0x1259f8 movl (%r14), %esi movl $0x8d41, %edi # imm = 0x8D41 callq *0xd0b18(%rip) # 0x1252a0 movl $0x8d41, %edi # imm = 0x8D41 movl $0x1902, %esi # imm = 0x1902 movl %ebp, %edx movl %ebx, %ecx callq *0xd1f94(%rip) # 0x126730 movl $0x8d41, %edi # imm = 0x8D41 xorl %esi, %esi callq *0xd0af7(%rip) # 0x1252a0 movl (%r14), %edx movl 0xd3422(%rip), %eax # 0x127bd4 cmpl $0x18, %eax pushq $0x10 popq %rcx cmovgel %eax, %ecx leaq 0x70abb(%rip), %rsi # 0xc527d pushq $0x3 popq %rdi xorl %eax, %eax callq 0xa128b jmp 0x54886 callq *0xd1239(%rip) # 0x125a10 movl (%r14), %esi movl $0xde1, %edi # imm = 0xDE1 callq *0xd0adb(%rip) # 0x1252c0 andq $0x0, 0x10(%rsp) movl $0x1405, 0x8(%rsp) # imm = 0x1405 movl $0x1902, (%rsp) # imm = 0x1902 movl $0xde1, %edi # imm = 0xDE1 xorl %esi, %esi movl $0x1902, %edx # imm = 0x1902 movl %ebp, %ecx movl %ebx, %r8d xorl %r9d, %r9d callq *0xd208c(%rip) # 0x1268a0 movl $0xde1, %edi # imm = 0xDE1 movl $0x2801, %esi # imm = 0x2801 movl $0x2600, %edx # imm = 0x2600 callq *0xd20b7(%rip) # 0x1268e0 movl $0xde1, %edi # imm = 0xDE1 movl $0x2800, %esi # imm = 0x2800 movl $0x2600, %edx # imm = 0x2600 callq *0xd20a2(%rip) # 0x1268e0 movl $0xde1, %edi # imm = 0xDE1 movl $0x2802, %esi # imm = 0x2802 movl $0x812f, %edx # imm = 0x812F callq *0xd208d(%rip) # 0x1268e0 movl $0xde1, %edi # imm = 0xDE1 movl $0x2803, %esi # imm = 0x2803 movl $0x812f, %edx # imm = 0x812F callq *0xd2078(%rip) # 0x1268e0 movl $0xde1, %edi # imm = 0xDE1 xorl %esi, %esi callq *0xd0a4b(%rip) # 0x1252c0 leaq 0x709d6(%rip), %rsi # 0xc5252 pushq $0x3 popq %rdi xorl %eax, %eax callq 0xa128b movl 0x1c(%rsp), %eax addq $0x20, %rsp popq %rbx popq %r14 popq %rbp retq
rlLoadTextureDepth: push rbp push r14 push rbx sub rsp, 20h mov ebx, esi and [rsp+38h+var_1C], 0 mov ebp, edi mov al, byte ptr cs:dword_127BC0+3 xor al, 1 push 1 pop rdi lea r14, [rsp+38h+var_1C] mov rsi, r14 or al, dl jz short loc_547D1 call cs:glad_glGenRenderbuffers mov esi, [r14] mov edi, 8D41h call cs:glad_glBindRenderbuffer mov edi, 8D41h mov esi, 1902h mov edx, ebp mov ecx, ebx call cs:glad_glRenderbufferStorage mov edi, 8D41h xor esi, esi call cs:glad_glBindRenderbuffer mov edx, [r14] mov eax, cs:dword_127BD4 cmp eax, 18h push 10h pop rcx cmovge ecx, eax lea rsi, aTextureIdIDept; "TEXTURE: [ID %i] Depth renderbuffer loa"... push 3 pop rdi xor eax, eax call TraceLog jmp loc_54886 loc_547D1: call cs:glad_glGenTextures mov esi, [r14] mov edi, 0DE1h call cs:glad_glBindTexture and [rsp+38h+var_28], 0 mov [rsp+38h+var_30], 1405h mov [rsp+38h+var_38], 1902h mov edi, 0DE1h xor esi, esi mov edx, 1902h mov ecx, ebp mov r8d, ebx xor r9d, r9d call cs:glad_glTexImage2D mov edi, 0DE1h mov esi, 2801h mov edx, 2600h call cs:glad_glTexParameteri mov edi, 0DE1h mov esi, 2800h mov edx, 2600h call cs:glad_glTexParameteri mov edi, 0DE1h mov esi, 2802h mov edx, 812Fh call cs:glad_glTexParameteri mov edi, 0DE1h mov esi, 2803h mov edx, 812Fh call cs:glad_glTexParameteri mov edi, 0DE1h xor esi, esi call cs:glad_glBindTexture lea rsi, aTextureDepthTe; "TEXTURE: Depth texture loaded successfu"... push 3 pop rdi xor eax, eax call TraceLog loc_54886: mov eax, [rsp+38h+var_1C] add rsp, 20h pop rbx pop r14 pop rbp retn
long long rlLoadTextureDepth(unsigned int a1, unsigned int a2, unsigned __int8 a3) { int v3; // r8d int v4; // r9d int v5; // ecx int v6; // edx int v7; // ecx int v8; // r8d int v9; // r9d int v11; // [rsp+0h] [rbp-38h] int v12; // [rsp+8h] [rbp-30h] _DWORD v13[7]; // [rsp+1Ch] [rbp-1Ch] BYREF v13[0] = 0; if ( a3 | HIBYTE(dword_127BC0) ^ 1 ) { glad_glGenRenderbuffers(1LL, v13); glad_glBindRenderbuffer(36161LL, v13[0]); glad_glRenderbufferStorage(36161LL, 6402LL, a1, a2); glad_glBindRenderbuffer(36161LL, 0LL); v5 = 16; if ( dword_127BD4 >= 24 ) v5 = dword_127BD4; TraceLog(3, (unsigned int)"TEXTURE: [ID %i] Depth renderbuffer loaded successfully (%i bits)", v13[0], v5, v3, v4); } else { glad_glGenTextures(1LL, v13); glad_glBindTexture(3553LL, v13[0]); v12 = 5125; v11 = 6402; glad_glTexImage2D(3553LL, 0LL, 6402LL, a1, a2, 0LL, v11, v12, 0LL); glad_glTexParameteri(3553LL, 10241LL, 9728LL); glad_glTexParameteri(3553LL, 10240LL, 9728LL); glad_glTexParameteri(3553LL, 10242LL, 33071LL); glad_glTexParameteri(3553LL, 10243LL, 33071LL); glad_glBindTexture(3553LL, 0LL); TraceLog(3, (unsigned int)"TEXTURE: Depth texture loaded successfully", v6, v7, v8, v9); } return v13[0]; }
rlLoadTextureDepth: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x20 MOV EBX,ESI AND dword ptr [RSP + 0x1c],0x0 MOV EBP,EDI MOV AL,byte ptr [0x00227bc3] XOR AL,0x1 PUSH 0x1 POP RDI LEA R14,[RSP + 0x1c] MOV RSI,R14 OR AL,DL JZ 0x001547d1 CALL qword ptr [0x002259f8] MOV ESI,dword ptr [R14] MOV EDI,0x8d41 CALL qword ptr [0x002252a0] MOV EDI,0x8d41 MOV ESI,0x1902 MOV EDX,EBP MOV ECX,EBX CALL qword ptr [0x00226730] MOV EDI,0x8d41 XOR ESI,ESI CALL qword ptr [0x002252a0] MOV EDX,dword ptr [R14] MOV EAX,dword ptr [0x00227bd4] CMP EAX,0x18 PUSH 0x10 POP RCX CMOVGE ECX,EAX LEA RSI,[0x1c527d] PUSH 0x3 POP RDI XOR EAX,EAX CALL 0x001a128b JMP 0x00154886 LAB_001547d1: CALL qword ptr [0x00225a10] MOV ESI,dword ptr [R14] MOV EDI,0xde1 CALL qword ptr [0x002252c0] AND qword ptr [RSP + 0x10],0x0 MOV dword ptr [RSP + 0x8],0x1405 MOV dword ptr [RSP],0x1902 MOV EDI,0xde1 XOR ESI,ESI MOV EDX,0x1902 MOV ECX,EBP MOV R8D,EBX XOR R9D,R9D CALL qword ptr [0x002268a0] MOV EDI,0xde1 MOV ESI,0x2801 MOV EDX,0x2600 CALL qword ptr [0x002268e0] MOV EDI,0xde1 MOV ESI,0x2800 MOV EDX,0x2600 CALL qword ptr [0x002268e0] MOV EDI,0xde1 MOV ESI,0x2802 MOV EDX,0x812f CALL qword ptr [0x002268e0] MOV EDI,0xde1 MOV ESI,0x2803 MOV EDX,0x812f CALL qword ptr [0x002268e0] MOV EDI,0xde1 XOR ESI,ESI CALL qword ptr [0x002252c0] LEA RSI,[0x1c5252] PUSH 0x3 POP RDI XOR EAX,EAX CALL 0x001a128b LAB_00154886: MOV EAX,dword ptr [RSP + 0x1c] ADD RSP,0x20 POP RBX POP R14 POP RBP RET
int4 rlLoadTextureDepth(int4 param_1,int4 param_2,char param_3) { int iVar1; int4 local_1c; local_1c = 0; if (DAT_00227bc3 == '\x01' && param_3 == '\0') { (*glad_glGenTextures)(1,&local_1c); (*glad_glBindTexture)(0xde1,local_1c); (*glad_glTexImage2D)(0xde1,0,0x1902,param_1,param_2,0,0x1902,0x1405,0); (*glad_glTexParameteri)(0xde1,0x2801,0x2600); (*glad_glTexParameteri)(0xde1,0x2800,0x2600); (*glad_glTexParameteri)(0xde1,0x2802,0x812f); (*glad_glTexParameteri)(0xde1,0x2803,0x812f); (*glad_glBindTexture)(0xde1,0); TraceLog(3,"TEXTURE: Depth texture loaded successfully"); } else { (*glad_glGenRenderbuffers)(); (*glad_glBindRenderbuffer)(0x8d41,local_1c); (*glad_glRenderbufferStorage)(0x8d41,0x1902,param_1,param_2); (*glad_glBindRenderbuffer)(0x8d41,0); iVar1 = 0x10; if (0x17 < DAT_00227bd4) { iVar1 = DAT_00227bd4; } TraceLog(3,"TEXTURE: [ID %i] Depth renderbuffer loaded successfully (%i bits)",local_1c,iVar1); } return local_1c; }
23,538
rlLoadTextureDepth
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rlgl.h
unsigned int rlLoadTextureDepth(int width, int height, bool useRenderBuffer) { unsigned int id = 0; #if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2) // In case depth textures not supported, we force renderbuffer usage if (!RLGL.ExtSupported.texDepth) useRenderBuffer = true; // NOTE: We let the implementation to choose the best bit-depth // Possible formats: GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT24, GL_DEPTH_COMPONENT32 and GL_DEPTH_COMPONENT32F unsigned int glInternalFormat = GL_DEPTH_COMPONENT; #if (defined(GRAPHICS_API_OPENGL_ES2) || defined(GRAPHICS_API_OPENGL_ES3)) // WARNING: WebGL platform requires unsized internal format definition (GL_DEPTH_COMPONENT) // while other platforms using OpenGL ES 2.0 require/support sized internal formats depending on the GPU capabilities if (!RLGL.ExtSupported.texDepthWebGL || useRenderBuffer) { if (RLGL.ExtSupported.maxDepthBits == 32) glInternalFormat = GL_DEPTH_COMPONENT32_OES; else if (RLGL.ExtSupported.maxDepthBits == 24) glInternalFormat = GL_DEPTH_COMPONENT24_OES; else glInternalFormat = GL_DEPTH_COMPONENT16; } #endif if (!useRenderBuffer && RLGL.ExtSupported.texDepth) { glGenTextures(1, &id); glBindTexture(GL_TEXTURE_2D, id); glTexImage2D(GL_TEXTURE_2D, 0, glInternalFormat, width, height, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glBindTexture(GL_TEXTURE_2D, 0); TRACELOG(RL_LOG_INFO, "TEXTURE: Depth texture loaded successfully"); } else { // Create the renderbuffer that will serve as the depth attachment for the framebuffer // NOTE: A renderbuffer is simpler than a texture and could offer better performance on embedded devices glGenRenderbuffers(1, &id); glBindRenderbuffer(GL_RENDERBUFFER, id); glRenderbufferStorage(GL_RENDERBUFFER, glInternalFormat, width, height); glBindRenderbuffer(GL_RENDERBUFFER, 0); TRACELOG(RL_LOG_INFO, "TEXTURE: [ID %i] Depth renderbuffer loaded successfully (%i bits)", id, (RLGL.ExtSupported.maxDepthBits >= 24)? RLGL.ExtSupported.maxDepthBits : 16); } #endif return id; }
O3
c
rlLoadTextureDepth: pushq %rbp pushq %r14 pushq %rbx subq $0x10, %rsp movl %esi, %ebx movl %edi, %ebp movl $0x0, 0xc(%rsp) movb 0xd7538(%rip), %al # 0x13bba3 xorb $0x1, %al leaq 0xc(%rsp), %r14 movl $0x1, %edi movq %r14, %rsi orb %dl, %al je 0x646df callq *0xd5354(%rip) # 0x1399d8 movl (%r14), %esi movl $0x8d41, %edi # imm = 0x8D41 callq *0xd4bee(%rip) # 0x139280 movl $0x8d41, %edi # imm = 0x8D41 movl $0x1902, %esi # imm = 0x1902 movl %ebp, %edx movl %ebx, %ecx callq *0xd606a(%rip) # 0x13a710 movl $0x8d41, %edi # imm = 0x8D41 xorl %esi, %esi callq *0xd4bcd(%rip) # 0x139280 movl (%r14), %edx movl 0xd74f8(%rip), %eax # 0x13bbb4 cmpl $0x18, %eax movl $0x10, %ecx cmovgel %eax, %ecx leaq 0x7aa27(%rip), %rsi # 0xdf0f5 movl $0x3, %edi xorl %eax, %eax callq 0xb9db7 jmp 0x64795 callq *0xd530b(%rip) # 0x1399f0 movl (%r14), %esi movl $0xde1, %edi # imm = 0xDE1 callq *0xd4bad(%rip) # 0x1392a0 subq $0x8, %rsp movl $0xde1, %edi # imm = 0xDE1 xorl %esi, %esi movl $0x1902, %edx # imm = 0x1902 movl %ebp, %ecx movl %ebx, %r8d xorl %r9d, %r9d pushq $0x0 pushq $0x1405 # imm = 0x1405 pushq $0x1902 # imm = 0x1902 callq *0xd6163(%rip) # 0x13a880 addq $0x20, %rsp movl $0xde1, %edi # imm = 0xDE1 movl $0x2801, %esi # imm = 0x2801 movl $0x2600, %edx # imm = 0x2600 callq *0xd618a(%rip) # 0x13a8c0 movl $0xde1, %edi # imm = 0xDE1 movl $0x2800, %esi # imm = 0x2800 movl $0x2600, %edx # imm = 0x2600 callq *0xd6175(%rip) # 0x13a8c0 movl $0xde1, %edi # imm = 0xDE1 movl $0x2802, %esi # imm = 0x2802 movl $0x812f, %edx # imm = 0x812F callq *0xd6160(%rip) # 0x13a8c0 movl $0xde1, %edi # imm = 0xDE1 movl $0x2803, %esi # imm = 0x2803 movl $0x812f, %edx # imm = 0x812F callq *0xd614b(%rip) # 0x13a8c0 movl $0xde1, %edi # imm = 0xDE1 xorl %esi, %esi callq *0xd4b1e(%rip) # 0x1392a0 leaq 0x7a941(%rip), %rsi # 0xdf0ca movl $0x3, %edi xorl %eax, %eax callq 0xb9db7 movl 0xc(%rsp), %eax addq $0x10, %rsp popq %rbx popq %r14 popq %rbp retq
rlLoadTextureDepth: push rbp push r14 push rbx sub rsp, 10h mov ebx, esi mov ebp, edi mov [rsp+28h+var_1C], 0 mov al, byte ptr cs:dword_13BBA0+3 xor al, 1 lea r14, [rsp+28h+var_1C] mov edi, 1 mov rsi, r14 or al, dl jz short loc_646DF call cs:glad_glGenRenderbuffers mov esi, [r14] mov edi, 8D41h call cs:glad_glBindRenderbuffer mov edi, 8D41h mov esi, 1902h mov edx, ebp mov ecx, ebx call cs:glad_glRenderbufferStorage mov edi, 8D41h xor esi, esi call cs:glad_glBindRenderbuffer mov edx, [r14] mov eax, cs:dword_13BBB4 cmp eax, 18h mov ecx, 10h cmovge ecx, eax lea rsi, aTextureIdIDept; "TEXTURE: [ID %i] Depth renderbuffer loa"... mov edi, 3 xor eax, eax call TraceLog jmp loc_64795 loc_646DF: call cs:glad_glGenTextures mov esi, [r14] mov edi, 0DE1h call cs:glad_glBindTexture sub rsp, 8 mov edi, 0DE1h xor esi, esi mov edx, 1902h mov ecx, ebp mov r8d, ebx xor r9d, r9d push 0 push 1405h push 1902h call cs:glad_glTexImage2D add rsp, 20h mov edi, 0DE1h mov esi, 2801h mov edx, 2600h call cs:glad_glTexParameteri mov edi, 0DE1h mov esi, 2800h mov edx, 2600h call cs:glad_glTexParameteri mov edi, 0DE1h mov esi, 2802h mov edx, 812Fh call cs:glad_glTexParameteri mov edi, 0DE1h mov esi, 2803h mov edx, 812Fh call cs:glad_glTexParameteri mov edi, 0DE1h xor esi, esi call cs:glad_glBindTexture lea rsi, aTextureDepthTe; "TEXTURE: Depth texture loaded successfu"... mov edi, 3 xor eax, eax call TraceLog loc_64795: mov eax, [rsp+28h+var_1C] add rsp, 10h pop rbx pop r14 pop rbp retn
long long rlLoadTextureDepth(unsigned int a1, unsigned int a2, unsigned __int8 a3) { int v3; // r8d int v4; // r9d int v5; // ecx int v6; // edx int v7; // ecx int v8; // r8d int v9; // r9d _DWORD v11[7]; // [rsp+Ch] [rbp-1Ch] BYREF v11[0] = 0; if ( a3 | HIBYTE(dword_13BBA0) ^ 1 ) { glad_glGenRenderbuffers(1LL, v11); glad_glBindRenderbuffer(36161LL, v11[0]); glad_glRenderbufferStorage(36161LL, 6402LL, a1, a2); glad_glBindRenderbuffer(36161LL, 0LL); v5 = 16; if ( dword_13BBB4 >= 24 ) v5 = dword_13BBB4; TraceLog(3, (unsigned int)"TEXTURE: [ID %i] Depth renderbuffer loaded successfully (%i bits)", v11[0], v5, v3, v4); } else { glad_glGenTextures(1LL, v11); glad_glBindTexture(3553LL, v11[0]); glad_glTexImage2D(3553LL, 0LL, 6402LL, a1, a2, 0LL, 6402LL, 5125LL, 0LL); glad_glTexParameteri(3553LL, 10241LL, 9728LL); glad_glTexParameteri(3553LL, 10240LL, 9728LL); glad_glTexParameteri(3553LL, 10242LL, 33071LL); glad_glTexParameteri(3553LL, 10243LL, 33071LL); glad_glBindTexture(3553LL, 0LL); TraceLog(3, (unsigned int)"TEXTURE: Depth texture loaded successfully", v6, v7, v8, v9); } return v11[0]; }
rlLoadTextureDepth: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x10 MOV EBX,ESI MOV EBP,EDI MOV dword ptr [RSP + 0xc],0x0 MOV AL,byte ptr [0x0023bba3] XOR AL,0x1 LEA R14,[RSP + 0xc] MOV EDI,0x1 MOV RSI,R14 OR AL,DL JZ 0x001646df CALL qword ptr [0x002399d8] MOV ESI,dword ptr [R14] MOV EDI,0x8d41 CALL qword ptr [0x00239280] MOV EDI,0x8d41 MOV ESI,0x1902 MOV EDX,EBP MOV ECX,EBX CALL qword ptr [0x0023a710] MOV EDI,0x8d41 XOR ESI,ESI CALL qword ptr [0x00239280] MOV EDX,dword ptr [R14] MOV EAX,dword ptr [0x0023bbb4] CMP EAX,0x18 MOV ECX,0x10 CMOVGE ECX,EAX LEA RSI,[0x1df0f5] MOV EDI,0x3 XOR EAX,EAX CALL 0x001b9db7 JMP 0x00164795 LAB_001646df: CALL qword ptr [0x002399f0] MOV ESI,dword ptr [R14] MOV EDI,0xde1 CALL qword ptr [0x002392a0] SUB RSP,0x8 MOV EDI,0xde1 XOR ESI,ESI MOV EDX,0x1902 MOV ECX,EBP MOV R8D,EBX XOR R9D,R9D PUSH 0x0 PUSH 0x1405 PUSH 0x1902 CALL qword ptr [0x0023a880] ADD RSP,0x20 MOV EDI,0xde1 MOV ESI,0x2801 MOV EDX,0x2600 CALL qword ptr [0x0023a8c0] MOV EDI,0xde1 MOV ESI,0x2800 MOV EDX,0x2600 CALL qword ptr [0x0023a8c0] MOV EDI,0xde1 MOV ESI,0x2802 MOV EDX,0x812f CALL qword ptr [0x0023a8c0] MOV EDI,0xde1 MOV ESI,0x2803 MOV EDX,0x812f CALL qword ptr [0x0023a8c0] MOV EDI,0xde1 XOR ESI,ESI CALL qword ptr [0x002392a0] LEA RSI,[0x1df0ca] MOV EDI,0x3 XOR EAX,EAX CALL 0x001b9db7 LAB_00164795: MOV EAX,dword ptr [RSP + 0xc] ADD RSP,0x10 POP RBX POP R14 POP RBP RET
int4 rlLoadTextureDepth(int4 param_1,int4 param_2,char param_3) { int iVar1; int4 local_1c; local_1c = 0; if (DAT_0023bba3 == '\x01' && param_3 == '\0') { (*glad_glGenTextures)(1,&local_1c); (*glad_glBindTexture)(0xde1,local_1c); (*glad_glTexImage2D)(0xde1,0,0x1902,param_1,param_2,0,0x1902,0x1405,0); (*glad_glTexParameteri)(0xde1,0x2801,0x2600); (*glad_glTexParameteri)(0xde1,0x2800,0x2600); (*glad_glTexParameteri)(0xde1,0x2802,0x812f); (*glad_glTexParameteri)(0xde1,0x2803,0x812f); (*glad_glBindTexture)(0xde1,0); TraceLog(3,"TEXTURE: Depth texture loaded successfully"); } else { (*glad_glGenRenderbuffers)(); (*glad_glBindRenderbuffer)(0x8d41,local_1c); (*glad_glRenderbufferStorage)(0x8d41,0x1902,param_1,param_2); (*glad_glBindRenderbuffer)(0x8d41,0); iVar1 = 0x10; if (0x17 < DAT_0023bbb4) { iVar1 = DAT_0023bbb4; } TraceLog(3,"TEXTURE: [ID %i] Depth renderbuffer loaded successfully (%i bits)",local_1c,iVar1); } return local_1c; }
23,539
std::hash<minja::Value>::operator()(minja::Value const&) const
monkey531[P]llama/common/minja.hpp
size_t operator()(const minja::Value & v) const { if (!v.is_hashable()) throw std::runtime_error("Unsupported type for hashing: " + v.dump()); return std::hash<json>()(v.get<json>()); }
O2
cpp
std::hash<minja::Value>::operator()(minja::Value const&) const: pushq %rbp pushq %r14 pushq %rbx subq $0x40, %rsp movq %rsi, %r14 movq %rsi, %rdi callq 0x62ef0 testb %al, %al je 0x82574 movq %rsp, %rbx movq %rbx, %rdi movq %r14, %rsi callq 0x82610 movq %rbx, %rdi callq 0x829c4 movq %rax, %rbx movq %rsp, %rdi callq 0x3d252 movq %rbx, %rax addq $0x40, %rsp popq %rbx popq %r14 popq %rbp retq pushq $0x10 popq %rdi callq 0x23480 movq %rax, %rbx leaq 0x20(%rsp), %rdi pushq $-0x1 popq %rdx movq %r14, %rsi xorl %ecx, %ecx callq 0x62f00 leaq 0x32bbd(%rip), %rsi # 0xb5155 movq %rsp, %rdi leaq 0x20(%rsp), %rdx callq 0x58626 movb $0x1, %bpl movq %rsp, %rsi movq %rbx, %rdi callq 0x23e60 xorl %ebp, %ebp movq 0x7ba34(%rip), %rsi # 0xfdff0 movq 0x7b995(%rip), %rdx # 0xfdf58 movq %rbx, %rdi callq 0x23f30 movq %rax, %r14 movq %rsp, %rdi callq 0x24208 jmp 0x825de movq %rax, %r14 movb $0x1, %bpl leaq 0x20(%rsp), %rdi callq 0x24208 testb %bpl, %bpl jne 0x825f2 jmp 0x82607 movq %rax, %r14 movq %rbx, %rdi callq 0x236b0 jmp 0x82607 movq %rax, %r14 movq %rsp, %rdi callq 0x3d252 movq %r14, %rdi callq 0x23fd0 nop
_ZNKSt4hashIN5minja5ValueEEclERKS1_: push rbp push r14 push rbx sub rsp, 40h mov r14, rsi mov rdi, rsi; this call _ZNK5minja5Value12is_primitiveEv; minja::Value::is_primitive(void) test al, al jz short loc_82574 mov rbx, rsp mov rdi, rbx mov rsi, r14 call _ZNK5minja5Value3getIN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEEET_v; minja::Value::get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(void) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail4hashINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEmRKT_; nlohmann::json_abi_v3_11_3::detail::hash<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov rbx, rax mov rdi, rsp call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() mov rax, rbx add rsp, 40h pop rbx pop r14 pop rbp retn loc_82574: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+58h+var_38] push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, r14 xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aUnsupportedTyp; "Unsupported type for hashing: " mov rdi, rsp lea rdx, [rsp+58h+var_38] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 mov rsi, rsp mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rdi, rsp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_825DE mov r14, rax mov bpl, 1 loc_825DE: lea rdi, [rsp+58h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_825F2 jmp short loc_82607 mov r14, rax loc_825F2: mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_82607 mov r14, rax mov rdi, rsp call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() loc_82607: mov rdi, r14 call __Unwind_Resume
long long std::hash<minja::Value>::operator()(long long a1, minja::Value *a2) { long long v2; // rbx void *exception; // rbx _BYTE v5[32]; // [rsp+0h] [rbp-58h] BYREF _BYTE v6[56]; // [rsp+20h] [rbp-38h] BYREF if ( !minja::Value::is_primitive(a2) ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v6, (long long)a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)v5, (long long)"Unsupported type for hashing: ", (long long)v6); std::runtime_error::runtime_error(exception, v5); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Value::get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( v5, a2); v2 = nlohmann::json_abi_v3_11_3::detail::hash<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(v5); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v5); return v2; }
operator(): PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RSI MOV RDI,RSI CALL 0x00162ef0 TEST AL,AL JZ 0x00182574 MOV RBX,RSP MOV RDI,RBX MOV RSI,R14 CALL 0x00182610 LAB_00182555: MOV RDI,RBX CALL 0x001829c4 LAB_0018255d: MOV RBX,RAX MOV RDI,RSP CALL 0x0013d252 MOV RAX,RBX ADD RSP,0x40 POP RBX POP R14 POP RBP RET LAB_00182574: PUSH 0x10 POP RDI CALL 0x00123480 MOV RBX,RAX LAB_0018257f: LEA RDI,[RSP + 0x20] PUSH -0x1 POP RDX MOV RSI,R14 XOR ECX,ECX CALL 0x00162f00 LAB_00182591: LEA RSI,[0x1b5155] MOV RDI,RSP LEA RDX,[RSP + 0x20] CALL 0x00158626 MOV BPL,0x1 LAB_001825a8: MOV RSI,RSP MOV RDI,RBX CALL 0x00123e60 XOR EBP,EBP MOV RSI,qword ptr [0x001fdff0] MOV RDX,qword ptr [0x001fdf58] MOV RDI,RBX CALL 0x00123f30
/* std::hash<minja::Value>::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */ ulong __thiscall std::hash<minja::Value>::operator()(hash<minja::Value> *this,Value *param_1) { char cVar1; ulong uVar2; runtime_error *this_00; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> abStack_58 [32]; int1 local_38 [32]; cVar1 = minja::Value::is_primitive(param_1); if (cVar1 != '\0') { minja::Value:: get<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (); /* try { // try from 00182555 to 0018255c has its CatchHandler @ 001825fc */ uVar2 = nlohmann::json_abi_v3_11_3::detail:: hash<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (abStack_58); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::~basic_json(abStack_58); return uVar2; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0018257f to 00182590 has its CatchHandler @ 001825ef */ minja::Value::dump_abi_cxx11_((int)local_38,SUB81(param_1,0)); /* try { // try from 00182591 to 001825a4 has its CatchHandler @ 001825d8 */ operator+((char *)abStack_58,(string *)"Unsupported type for hashing: "); /* try { // try from 001825a8 to 001825ca has its CatchHandler @ 001825cb */ std::runtime_error::runtime_error(this_00,(string *)abStack_58); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58); }
23,540
common_chat_templates_from_model(llama_model const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/common.cpp
common_chat_templates common_chat_templates_from_model(const struct llama_model * model, const std::string & chat_template_override) { auto vocab = llama_model_get_vocab(model); std::string default_template_src = chat_template_override; std::string template_tool_use_src = chat_template_override; bool has_explicit_template = !chat_template_override.empty(); if (chat_template_override.empty()) { auto str = llama_model_chat_template(model, /* name */ nullptr); if (str) { default_template_src = str; has_explicit_template = true; } str = llama_model_chat_template(model, /* name */ "tool_use"); if (str) { template_tool_use_src = str; has_explicit_template = true; } } if (default_template_src.empty() || default_template_src == "chatml") { if (!template_tool_use_src.empty()) { default_template_src = template_tool_use_src; } else { default_template_src = R"( {%- for message in messages -%} {{- "<|im_start|>" + message.role + "\n" + message.content + "<|im_end|>\n" -}} {%- endfor -%} {%- if add_generation_prompt -%} {{- "<|im_start|>assistant\n" -}} {%- endif -%} )"; } } const auto get_token = [&](llama_token token, const char * name, const char * jinja_variable_name) { if (token == LLAMA_TOKEN_NULL) { if (default_template_src.find(jinja_variable_name) != std::string::npos || template_tool_use_src.find(jinja_variable_name) != std::string::npos) { LOG_WRN("%s: warning: vocab does not have a %s token, jinja template won't work as intended.\n", __func__, name); } return std::string(); } else { return common_token_to_piece(vocab, token, true); } }; auto token_bos = get_token(llama_vocab_bos(vocab), "BOS", "bos_token"); auto token_eos = get_token(llama_vocab_eos(vocab), "EOS", "eos_token"); return { has_explicit_template, std::make_unique<minja::chat_template>(default_template_src, token_bos, token_eos), template_tool_use_src.empty() ? nullptr : std::make_unique<minja::chat_template>(template_tool_use_src, token_bos, token_eos) }; }
O1
cpp
common_chat_templates_from_model(llama_model const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movq %rdx, %r13 movq %rsi, %r12 movq %rdi, %rbx movq %rsi, %rdi callq 0x1c140 movq %rax, 0x48(%rsp) leaq 0x38(%rsp), %rbp movq %rbp, -0x10(%rbp) movq (%r13), %rsi movq 0x8(%r13), %rdx addq %rsi, %rdx leaq 0x28(%rsp), %r14 movq %r14, %rdi callq 0x21c02 leaq 0x18(%rsp), %rax movq %rax, -0x10(%rax) movq (%r13), %rsi movq 0x8(%r13), %rdx addq %rsi, %rdx leaq 0x8(%rsp), %rdi callq 0x21c02 cmpq $0x0, 0x8(%r13) setne %r15b jne 0x769cc movq %r12, %rdi xorl %esi, %esi callq 0x1b3d0 movq %rax, %r13 testq %rax, %rax je 0x7698c leaq 0x28(%rsp), %rbp movq 0x8(%rbp), %r14 movq %r13, %rdi callq 0x1b3e0 movb $0x1, %r15b movq %rbp, %rdi leaq 0x38(%rsp), %rbp xorl %esi, %esi movq %r14, %rdx leaq 0x28(%rsp), %r14 movq %r13, %rcx movq %rax, %r8 callq 0x1bd50 leaq 0x7c846(%rip), %rsi # 0xf31d9 movq %r12, %rdi callq 0x1b3d0 movq %rax, %r12 testq %rax, %rax je 0x769cc leaq 0x8(%rsp), %rax movq 0x8(%rax), %r13 movq %r12, %rdi callq 0x1b3e0 movb $0x1, %r15b leaq 0x8(%rsp), %rdi xorl %esi, %esi movq %r13, %rdx movq %r12, %rcx movq %rax, %r8 callq 0x1bd50 cmpq $0x0, 0x30(%rsp) je 0x769e9 leaq 0x7c807(%rip), %rsi # 0xf31e2 leaq 0x28(%rsp), %rdi callq 0x1b220 testl %eax, %eax jne 0x76a1f cmpq $0x0, 0x10(%rsp) je 0x76a02 leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rsi callq 0x1b4a0 jmp 0x76a1f leaq 0x28(%rsp), %rdi movq 0x8(%rdi), %rdx leaq 0x7c7d7(%rip), %rcx # 0xf31e9 movl $0x145, %r8d # imm = 0x145 xorl %esi, %esi callq 0x1bd50 movq %r14, 0x90(%rsp) leaq 0x8(%rsp), %rax movq %rax, 0x98(%rsp) leaq 0x48(%rsp), %rax movq %rax, 0xa0(%rsp) movq (%rax), %rdi callq 0x1b770 leaq 0x7c8df(%rip), %rcx # 0xf332f leaq 0x7c8dc(%rip), %r8 # 0xf3333 leaq 0x70(%rsp), %rdi leaq 0x90(%rsp), %rsi movl %eax, %edx callq 0x76c58 movq 0x48(%rsp), %rdi callq 0x1b0a0 leaq 0x7c8c1(%rip), %rcx # 0xf333d leaq 0x7c8be(%rip), %r8 # 0xf3341 leaq 0x50(%rsp), %rdi leaq 0x90(%rsp), %rsi movl %eax, %edx callq 0x76c58 movb %r15b, (%rbx) movl $0x80, %edi callq 0x1b890 movq %rax, %r15 leaq 0x28(%rsp), %rsi leaq 0x70(%rsp), %rdx leaq 0x50(%rsp), %rcx movq %rax, %rdi callq 0x78af4 movq %r15, 0x8(%rbx) cmpq $0x0, 0x10(%rsp) je 0x76af0 movl $0x80, %edi callq 0x1b890 movq %rax, %r15 leaq 0x8(%rsp), %rsi leaq 0x70(%rsp), %rdx leaq 0x50(%rsp), %rcx movq %rax, %rdi callq 0x78af4 jmp 0x76afb movq $0x0, 0x10(%rbx) xorl %r15d, %r15d movq %r15, 0x10(%rbx) leaq 0x60(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x76b1a movq 0x60(%rsp), %rsi incq %rsi callq 0x1b8b0 leaq 0x80(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x76b3b movq 0x80(%rsp), %rsi incq %rsi callq 0x1b8b0 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x76b57 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8b0 movq 0x28(%rsp), %rdi cmpq %rbp, %rdi je 0x76b6e movq 0x38(%rsp), %rsi incq %rsi callq 0x1b8b0 movq %rbx, %rax addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x76c19 movq %rax, %r14 movl $0x80, %esi movq %r15, %rdi callq 0x1b8b0 jmp 0x76b9d movq %rax, %r14 addq $0x8, %rbx movq (%rbx), %rsi testq %rsi, %rsi je 0x76bb1 movq %rbx, %rdi callq 0xbaf20 movq $0x0, (%rbx) jmp 0x76bcf movq %rax, %r14 movl $0x80, %esi movq %r15, %rdi callq 0x1b8b0 jmp 0x76bcf movq %rax, %r14 leaq 0x60(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x76bf6 movq 0x60(%rsp), %rsi incq %rsi callq 0x1b8b0 jmp 0x76bf6 movq %rax, %r14 jmp 0x76c38 jmp 0x76c19 movq %rax, %r14 leaq 0x80(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x76c1c movq 0x80(%rsp), %rsi incq %rsi callq 0x1b8b0 jmp 0x76c1c movq %rax, %r14 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x76c38 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8b0 movq 0x28(%rsp), %rdi cmpq %rbp, %rdi je 0x76c4f movq 0x38(%rsp), %rsi incq %rsi callq 0x1b8b0 movq %r14, %rdi callq 0x1bf70 nop
_Z32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp; int push r15; __int64 push r14; int push r13; void * push r12; int push rbx; int sub rsp, 0A8h mov r13, rdx mov r12, rsi mov rbx, rdi mov rdi, rsi call _llama_model_get_vocab mov qword ptr [rsp+0D8h+var_90], rax; int lea rbp, [rsp+0D8h+var_A0] mov [rbp-10h], rbp mov rsi, [r13+0] mov rdx, [r13+8] add rdx, rsi lea r14, [rsp+0D8h+var_B0] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rax, [rsp+0D8h+var_C0] mov [rax-10h], rax mov rsi, [r13+0] mov rdx, [r13+8] add rdx, rsi lea rdi, [rsp+0D8h+var_D0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) cmp qword ptr [r13+8], 0 setnz r15b jnz loc_769CC mov rdi, r12 xor esi, esi call _llama_model_chat_template mov r13, rax test rax, rax jz short loc_7698C lea rbp, [rsp+0D8h+var_B0] mov r14, [rbp+8] mov rdi, r13 call _strlen mov r15b, 1 mov rdi, rbp lea rbp, [rsp+0D8h+var_A0] xor esi, esi mov rdx, r14 lea r14, [rsp+0D8h+var_B0] mov rcx, r13 mov r8, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) loc_7698C: lea rsi, aToolUse; "tool_use" mov rdi, r12 call _llama_model_chat_template mov r12, rax test rax, rax jz short loc_769CC lea rax, [rsp+0D8h+var_D0] mov r13, [rax+8] mov rdi, r12 call _strlen mov r15b, 1 lea rdi, [rsp+0D8h+var_D0] xor esi, esi mov rdx, r13 mov rcx, r12 mov r8, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) loc_769CC: cmp [rsp+0D8h+var_A8], 0 jz short loc_769E9 lea rsi, aChatml; "chatml" lea rdi, [rsp+0D8h+var_B0] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jnz short loc_76A1F loc_769E9: cmp [rsp+0D8h+var_C8], 0 jz short loc_76A02 lea rdi, [rsp+0D8h+var_B0] lea rsi, [rsp+0D8h+var_D0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) jmp short loc_76A1F loc_76A02: lea rdi, [rsp+0D8h+var_B0] mov rdx, [rdi+8] lea rcx, aForMessageInMe; "\n {%- for message in me"... mov r8d, 145h xor esi, esi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) loc_76A1F: mov qword ptr [rsp+0D8h+var_48], r14; int lea rax, [rsp+0D8h+var_D0] mov qword ptr [rsp+0D8h+var_40], rax; int lea rax, [rsp+0D8h+var_90] mov qword ptr [rsp+0D8h+var_38], rax; int mov rdi, [rax] call _llama_vocab_bos lea rcx, aBos; "BOS" lea r8, aBosToken; "bos_token" lea rdi, [rsp+0D8h+var_68] lea rsi, [rsp+0D8h+var_48] mov edx, eax call _ZZ32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clB5cxx11EiPKcSC_; common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()(int,char const*,char const*) mov rdi, qword ptr [rsp+0D8h+var_90] call _llama_vocab_eos lea rcx, aEos; "EOS" lea r8, aEosToken; "eos_token" lea rdi, [rsp+0D8h+var_88] lea rsi, [rsp+0D8h+var_48] mov edx, eax call _ZZ32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clB5cxx11EiPKcSC_; common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()(int,char const*,char const*) mov [rbx], r15b mov edi, 80h; unsigned __int64 call __Znwm; operator new(ulong) mov r15, rax lea rsi, [rsp+0D8h+var_B0]; int lea rdx, [rsp+0D8h+var_68]; int lea rcx, [rsp+0D8h+var_88]; int mov rdi, rax; int call _ZN5minja13chat_templateC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_; minja::chat_template::chat_template(std::string const&,std::string const&,std::string const&) mov [rbx+8], r15 cmp [rsp+0D8h+var_C8], 0 jz short loc_76AF0 mov edi, 80h; unsigned __int64 call __Znwm; operator new(ulong) mov r15, rax lea rsi, [rsp+0D8h+var_D0]; int lea rdx, [rsp+0D8h+var_68]; int lea rcx, [rsp+0D8h+var_88]; int mov rdi, rax; int call _ZN5minja13chat_templateC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_; minja::chat_template::chat_template(std::string const&,std::string const&,std::string const&) jmp short loc_76AFB loc_76AF0: mov qword ptr [rbx+10h], 0 xor r15d, r15d loc_76AFB: mov [rbx+10h], r15 lea rax, [rsp+0D8h+var_78] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_76B1A mov rsi, [rsp+0D8h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_76B1A: lea rax, [rsp+0D8h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_76B3B mov rsi, [rsp+0D8h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_76B3B: mov rdi, [rsp+0D8h+var_D0]; void * lea rax, [rsp+0D8h+var_C0] cmp rdi, rax jz short loc_76B57 mov rsi, [rsp+0D8h+var_C0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_76B57: mov rdi, [rsp+0D8h+var_B0]; void * cmp rdi, rbp jz short loc_76B6E mov rsi, [rsp+0D8h+var_A0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_76B6E: mov rax, rbx add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp loc_76C19 mov r14, rax mov esi, 80h; unsigned __int64 mov rdi, r15; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_76B9D mov r14, rax loc_76B9D: add rbx, 8 mov rsi, [rbx] test rsi, rsi jz short loc_76BB1 mov rdi, rbx call _ZNKSt14default_deleteIN5minja13chat_templateEEclEPS1_; std::default_delete<minja::chat_template>::operator()(minja::chat_template*) loc_76BB1: mov qword ptr [rbx], 0 jmp short loc_76BCF mov r14, rax mov esi, 80h; unsigned __int64 mov rdi, r15; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_76BCF mov r14, rax loc_76BCF: lea rax, [rsp+arg_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_76BF6 mov rsi, [rsp+arg_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_76BF6 mov r14, rax jmp short loc_76C38 jmp short loc_76C19 mov r14, rax loc_76BF6: lea rax, [rsp+arg_78] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_76C1C mov rsi, [rsp+arg_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_76C1C loc_76C19: mov r14, rax loc_76C1C: mov rdi, [rsp+arg_0]; void * lea rax, [rsp+arg_10] cmp rdi, rax jz short loc_76C38 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_76C38: mov rdi, [rsp+arg_20]; void * cmp rdi, rbp jz short loc_76C4F mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_76C4F: mov rdi, r14 call __Unwind_Resume
long long common_chat_templates_from_model(long long a1, long long a2, _BYTE **a3) { bool v4; // r15 long long v5; // rax long long v6; // r13 long long v7; // r14 long long v8; // rax long long v9; // r12 long long v10; // r13 long long v11; // rax unsigned int v12; // eax unsigned int v13; // eax long long v14; // r15 long long v15; // r15 void *v17; // [rsp+8h] [rbp-D0h] BYREF long long v18; // [rsp+10h] [rbp-C8h] _QWORD v19[2]; // [rsp+18h] [rbp-C0h] BYREF void *v20; // [rsp+28h] [rbp-B0h] BYREF long long v21; // [rsp+30h] [rbp-A8h] _QWORD v22[2]; // [rsp+38h] [rbp-A0h] BYREF int v23[2]; // [rsp+48h] [rbp-90h] BYREF int v24[4]; // [rsp+50h] [rbp-88h] BYREF long long v25; // [rsp+60h] [rbp-78h] BYREF int v26[4]; // [rsp+70h] [rbp-68h] BYREF long long v27; // [rsp+80h] [rbp-58h] BYREF int v28[2]; // [rsp+90h] [rbp-48h] BYREF int v29[2]; // [rsp+98h] [rbp-40h] int v30[2]; // [rsp+A0h] [rbp-38h] *(_QWORD *)v23 = llama_model_get_vocab(a2); v20 = v22; std::string::_M_construct<char *>(&v20, *a3, (long long)&a3[1][(_QWORD)*a3]); v17 = v19; std::string::_M_construct<char *>(&v17, *a3, (long long)&a3[1][(_QWORD)*a3]); v4 = a3[1] != 0LL; if ( !a3[1] ) { v5 = llama_model_chat_template(a2, 0LL); v6 = v5; if ( v5 ) { v7 = v21; v8 = strlen(v5); v4 = 1; std::string::_M_replace(&v20, 0LL, v7, v6, v8); } v9 = llama_model_chat_template(a2, "tool_use"); if ( v9 ) { v10 = v18; v11 = strlen(v9); v4 = 1; std::string::_M_replace(&v17, 0LL, v10, v9, v11); } } if ( !v21 || !(unsigned int)std::string::compare(&v20, "chatml") ) { if ( v18 ) std::string::_M_assign(&v20, &v17); else std::string::_M_replace( &v20, 0LL, v21, "\n" " {%- for message in messages -%}\n" " {{- \"<|im_start|>\" + message.role + \"\\n\" + message.content + \"<|im_end|>\\n\" -}}\n" " {%- endfor -%}\n" " {%- if add_generation_prompt -%}\n" " {{- \"<|im_start|>assistant\\n\" -}}\n" " {%- endif -%}\n" " ", 325LL); } *(_QWORD *)v28 = &v20; *(_QWORD *)v29 = &v17; *(_QWORD *)v30 = v23; v12 = llama_vocab_bos(*(_QWORD *)v23); common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()[abi:cxx11]( v26, v28, v12, "BOS", "bos_token"); v13 = llama_vocab_eos(*(_QWORD *)v23); common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()[abi:cxx11]( v24, v28, v13, "EOS", "eos_token"); *(_BYTE *)a1 = v4; v14 = operator new(0x80uLL); minja::chat_template::chat_template(v14, &v20, v26, v24); *(_QWORD *)(a1 + 8) = v14; if ( v18 ) { v15 = operator new(0x80uLL); minja::chat_template::chat_template(v15, &v17, v26, v24); } else { *(_QWORD *)(a1 + 16) = 0LL; v15 = 0LL; } *(_QWORD *)(a1 + 16) = v15; if ( *(long long **)v24 != &v25 ) operator delete(*(void **)v24, v25 + 1); if ( *(long long **)v26 != &v27 ) operator delete(*(void **)v26, v27 + 1); if ( v17 != v19 ) operator delete(v17, v19[0] + 1LL); if ( v20 != v22 ) operator delete(v20, v22[0] + 1LL); return a1; }
common_chat_templates_from_model: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV R13,RDX MOV R12,RSI MOV RBX,RDI MOV RDI,RSI CALL 0x0011c140 MOV qword ptr [RSP + 0x48],RAX LEA RBP,[RSP + 0x38] MOV qword ptr [RBP + -0x10],RBP MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] ADD RDX,RSI LEA R14,[RSP + 0x28] MOV RDI,R14 CALL 0x00121c02 LEA RAX,[RSP + 0x18] MOV qword ptr [RAX + -0x10],RAX MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] ADD RDX,RSI LAB_00176930: LEA RDI,[RSP + 0x8] CALL 0x00121c02 CMP qword ptr [R13 + 0x8],0x0 SETNZ R15B JNZ 0x001769cc LAB_00176949: MOV RDI,R12 XOR ESI,ESI CALL 0x0011b3d0 MOV R13,RAX TEST RAX,RAX JZ 0x0017698c LEA RBP,[RSP + 0x28] MOV R14,qword ptr [RBP + 0x8] MOV RDI,R13 CALL 0x0011b3e0 MOV R15B,0x1 MOV RDI,RBP LEA RBP,[RSP + 0x38] XOR ESI,ESI MOV RDX,R14 LEA R14,[RSP + 0x28] MOV RCX,R13 MOV R8,RAX CALL 0x0011bd50 LAB_0017698c: LEA RSI,[0x1f31d9] MOV RDI,R12 CALL 0x0011b3d0 MOV R12,RAX TEST RAX,RAX JZ 0x001769cc LEA RAX,[RSP + 0x8] MOV R13,qword ptr [RAX + 0x8] MOV RDI,R12 CALL 0x0011b3e0 MOV R15B,0x1 LEA RDI,[RSP + 0x8] XOR ESI,ESI MOV RDX,R13 MOV RCX,R12 MOV R8,RAX CALL 0x0011bd50 LAB_001769cc: CMP qword ptr [RSP + 0x30],0x0 JZ 0x001769e9 LEA RSI,[0x1f31e2] LEA RDI,[RSP + 0x28] CALL 0x0011b220 TEST EAX,EAX JNZ 0x00176a1f LAB_001769e9: CMP qword ptr [RSP + 0x10],0x0 JZ 0x00176a02 LAB_001769f1: LEA RDI,[RSP + 0x28] LEA RSI,[RSP + 0x8] CALL 0x0011b4a0 JMP 0x00176a1f LAB_00176a02: LEA RDI,[RSP + 0x28] MOV RDX,qword ptr [RDI + 0x8] LEA RCX,[0x1f31e9] MOV R8D,0x145 XOR ESI,ESI CALL 0x0011bd50 LAB_00176a1f: MOV qword ptr [RSP + 0x90],R14 LEA RAX,[RSP + 0x8] MOV qword ptr [RSP + 0x98],RAX LEA RAX,[RSP + 0x48] MOV qword ptr [RSP + 0xa0],RAX MOV RDI,qword ptr [RAX] LAB_00176a44: CALL 0x0011b770 LEA RCX,[0x1f332f] LEA R8,[0x1f3333] LEA RDI,[RSP + 0x70] LEA RSI,[RSP + 0x90] MOV EDX,EAX CALL 0x00176c58 MOV RDI,qword ptr [RSP + 0x48] LAB_00176a70: CALL 0x0011b0a0 LEA RCX,[0x1f333d] LEA R8,[0x1f3341] LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0x90] MOV EDX,EAX CALL 0x00176c58 MOV byte ptr [RBX],R15B LAB_00176a9a: MOV EDI,0x80 CALL 0x0011b890 LAB_00176aa4: MOV R15,RAX LEA RSI,[RSP + 0x28] LEA RDX,[RSP + 0x70] LEA RCX,[RSP + 0x50] MOV RDI,RAX CALL 0x00178af4 MOV qword ptr [RBX + 0x8],R15 CMP qword ptr [RSP + 0x10],0x0 JZ 0x00176af0 LAB_00176aca: MOV EDI,0x80 CALL 0x0011b890 LAB_00176ad4: MOV R15,RAX LEA RSI,[RSP + 0x8] LEA RDX,[RSP + 0x70] LEA RCX,[RSP + 0x50] MOV RDI,RAX CALL 0x00178af4 LAB_00176aee: JMP 0x00176afb LAB_00176af0: MOV qword ptr [RBX + 0x10],0x0 XOR R15D,R15D LAB_00176afb: MOV qword ptr [RBX + 0x10],R15 LEA RAX,[RSP + 0x60] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00176b1a MOV RSI,qword ptr [RSP + 0x60] INC RSI CALL 0x0011b8b0 LAB_00176b1a: LEA RAX,[RSP + 0x80] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00176b3b MOV RSI,qword ptr [RSP + 0x80] INC RSI CALL 0x0011b8b0 LAB_00176b3b: MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x00176b57 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011b8b0 LAB_00176b57: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,RBP JZ 0x00176b6e MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x0011b8b0 LAB_00176b6e: MOV RAX,RBX ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_chat_templates_from_model(llama_model const*, std::__cxx11::string const&) */ llama_model * common_chat_templates_from_model(llama_model *param_1,string *param_2) { char *pcVar1; int iVar2; uint uVar3; char *pcVar4; chat_template *pcVar5; long *in_RDX; llama_model lVar6; long *local_d0; char *local_c8; long local_c0 [2]; long *local_b0; char *local_a8; long local_a0 [2]; int8 local_90; long *local_88 [2]; long local_78 [2]; long *local_68 [2]; long local_58 [2]; int8 **local_48; int8 **local_40; int8 *local_38; local_90 = llama_model_get_vocab(param_2); local_b0 = local_a0; std::__cxx11::string::_M_construct<char*>(&local_b0,*in_RDX,in_RDX[1] + *in_RDX); local_d0 = local_c0; /* try { // try from 00176930 to 00176939 has its CatchHandler @ 00176bec */ std::__cxx11::string::_M_construct<char*>(&local_d0,*in_RDX,in_RDX[1] + *in_RDX); lVar6 = (llama_model)(in_RDX[1] != 0); if (!(bool)lVar6) { /* try { // try from 00176949 to 001769cb has its CatchHandler @ 00176bf1 */ pcVar4 = (char *)llama_model_chat_template(param_2); pcVar1 = local_a8; if (pcVar4 != (char *)0x0) { strlen(pcVar4); std::__cxx11::string::_M_replace((ulong)&local_b0,0,pcVar1,(ulong)pcVar4); } lVar6 = (llama_model)(pcVar4 != (char *)0x0 || (bool)lVar6); pcVar4 = (char *)llama_model_chat_template(param_2); pcVar1 = local_c8; if (pcVar4 != (char *)0x0) { strlen(pcVar4); lVar6 = (llama_model)0x1; std::__cxx11::string::_M_replace((ulong)&local_d0,0,pcVar1,(ulong)pcVar4); } } if (local_a8 != (char *)0x0) { iVar2 = std::__cxx11::string::compare((char *)&local_b0); if (iVar2 != 0) goto LAB_00176a1f; } if (local_c8 == (char *)0x0) { std::__cxx11::string::_M_replace((ulong)&local_b0,0,local_a8,0x1f31e9); } else { /* try { // try from 001769f1 to 00176a1e has its CatchHandler @ 00176b83 */ std::__cxx11::string::_M_assign((string *)&local_b0); } LAB_00176a1f: local_40 = &local_d0; local_38 = &local_90; local_48 = &local_b0; /* try { // try from 00176a44 to 00176a6a has its CatchHandler @ 00176c19 */ uVar3 = llama_vocab_bos(local_90); common_chat_templates_from_model(llama_model_const*,std::__cxx11::string_const&)::$_0:: operator()[abi_cxx11_((int)local_68,(char *)&local_48,(char *)(ulong)uVar3); /* try { // try from 00176a70 to 00176a96 has its CatchHandler @ 00176bf3 */ uVar3 = llama_vocab_eos(local_90); common_chat_templates_from_model(llama_model_const*,std::__cxx11::string_const&)::$_0:: operator()[abi_cxx11_((int)local_88,(char *)&local_48,(char *)(ulong)uVar3); *param_1 = lVar6; /* try { // try from 00176a9a to 00176aa3 has its CatchHandler @ 00176bcc */ pcVar5 = (chat_template *)operator_new(0x80); /* try { // try from 00176aa4 to 00176abd has its CatchHandler @ 00176bba */ minja::chat_template::chat_template (pcVar5,(string *)&local_b0,(string *)local_68,(string *)local_88); *(chat_template **)(param_1 + 8) = pcVar5; if (local_c8 == (char *)0x0) { *(int8 *)(param_1 + 0x10) = 0; pcVar5 = (chat_template *)0x0; } else { /* try { // try from 00176aca to 00176ad3 has its CatchHandler @ 00176b9a */ pcVar5 = (chat_template *)operator_new(0x80); /* try { // try from 00176ad4 to 00176aed has its CatchHandler @ 00176b88 */ minja::chat_template::chat_template (pcVar5,(string *)&local_d0,(string *)local_68,(string *)local_88); } *(chat_template **)(param_1 + 0x10) = pcVar5; if (local_88[0] != local_78) { operator_delete(local_88[0],local_78[0] + 1); } if (local_68[0] != local_58) { operator_delete(local_68[0],local_58[0] + 1); } if (local_d0 != local_c0) { operator_delete(local_d0,local_c0[0] + 1); } if (local_b0 != local_a0) { operator_delete(local_b0,local_a0[0] + 1); } return param_1; }
23,541
translog_wait_for_buffer_free
eloqsql/storage/maria/ma_loghandler.c
static void translog_wait_for_buffer_free(struct st_translog_buffer *buffer) { TRANSLOG_ADDRESS offset= buffer->offset; TRANSLOG_FILE *file= buffer->file; uint8 ver= buffer->ver; DBUG_ENTER("translog_wait_for_buffer_free"); DBUG_PRINT("enter", ("Buffer #%u %p copies in progress: %u " "is closing %u File: %d size: %lu", (uint) buffer->buffer_no, buffer, (uint) buffer->copy_to_buffer_in_progress, (uint) buffer->is_closing_buffer, (buffer->file ? buffer->file->handler.file : -1), (ulong) buffer->size)); translog_wait_for_writers(buffer); if (offset != buffer->offset || file != buffer->file || ver != buffer->ver) DBUG_VOID_RETURN; /* the buffer if already freed */ while (buffer->file != NULL) { DBUG_PRINT("info", ("wait for writers... buffer: #%u %p", (uint) buffer->buffer_no, buffer)); mysql_cond_wait(&buffer->waiting_filling_buffer, &buffer->mutex); DBUG_PRINT("info", ("wait for writers done. buffer: #%u %p", (uint) buffer->buffer_no, buffer)); } DBUG_ASSERT(buffer->copy_to_buffer_in_progress == 0); DBUG_VOID_RETURN; }
O0
c
translog_wait_for_buffer_free: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq 0x100010(%rax), %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movq 0x100038(%rax), %rax movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax movb 0x1000d9(%rax), %al movb %al, -0x19(%rbp) jmp 0x39d39 movq -0x8(%rbp), %rdi callq 0x36d40 movq -0x10(%rbp), %rax movq -0x8(%rbp), %rcx cmpq 0x100010(%rcx), %rax jne 0x39d77 movq -0x18(%rbp), %rax movq -0x8(%rbp), %rcx cmpq 0x100038(%rcx), %rax jne 0x39d77 movzbl -0x19(%rbp), %eax movq -0x8(%rbp), %rcx movzbl 0x1000d9(%rcx), %ecx cmpl %ecx, %eax je 0x39d7b jmp 0x39d79 jmp 0x39dc2 jmp 0x39d7d movq -0x8(%rbp), %rax cmpq $0x0, 0x100038(%rax) je 0x39dba jmp 0x39d8d jmp 0x39d8f movq -0x8(%rbp), %rdi addq $0x100040, %rdi # imm = 0x100040 movq -0x8(%rbp), %rsi addq $0x100090, %rsi # imm = 0x100090 leaq 0x117901(%rip), %rdx # 0x1516ad movl $0x832, %ecx # imm = 0x832 callq 0x2dec0 jmp 0x39db8 jmp 0x39d7d jmp 0x39dbc jmp 0x39dbe jmp 0x39dc0 jmp 0x39dc2 addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
translog_wait_for_buffer_free: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax+100010h] mov [rbp+var_10], rax mov rax, [rbp+var_8] mov rax, [rax+100038h] mov [rbp+var_18], rax mov rax, [rbp+var_8] mov al, [rax+1000D9h] mov [rbp+var_19], al jmp short $+2 loc_39D39: mov rdi, [rbp+var_8] call translog_wait_for_writers mov rax, [rbp+var_10] mov rcx, [rbp+var_8] cmp rax, [rcx+100010h] jnz short loc_39D77 mov rax, [rbp+var_18] mov rcx, [rbp+var_8] cmp rax, [rcx+100038h] jnz short loc_39D77 movzx eax, [rbp+var_19] mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx+1000D9h] cmp eax, ecx jz short loc_39D7B loc_39D77: jmp short $+2 loc_39D79: jmp short loc_39DC2 loc_39D7B: jmp short $+2 loc_39D7D: mov rax, [rbp+var_8] cmp qword ptr [rax+100038h], 0 jz short loc_39DBA jmp short $+2 loc_39D8D: jmp short $+2 loc_39D8F: mov rdi, [rbp+var_8] add rdi, 100040h mov rsi, [rbp+var_8] add rsi, 100090h lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 832h call inline_mysql_cond_wait jmp short $+2 loc_39DB8: jmp short loc_39D7D loc_39DBA: jmp short $+2 loc_39DBC: jmp short $+2 loc_39DBE: jmp short $+2 loc_39DC0: jmp short $+2 loc_39DC2: add rsp, 20h pop rbp retn
long long translog_wait_for_buffer_free(long long a1) { long long result; // rax unsigned __int8 v2; // [rsp+7h] [rbp-19h] long long v3; // [rsp+8h] [rbp-18h] long long v4; // [rsp+10h] [rbp-10h] v4 = *(_QWORD *)(a1 + 1048592); v3 = *(_QWORD *)(a1 + 1048632); v2 = *(_BYTE *)(a1 + 1048793); translog_wait_for_writers(a1); result = v4; if ( v4 == *(_QWORD *)(a1 + 1048592) ) { result = v3; if ( v3 == *(_QWORD *)(a1 + 1048632) ) { result = v2; if ( v2 == *(unsigned __int8 *)(a1 + 1048793) ) { while ( 1 ) { result = a1; if ( !*(_QWORD *)(a1 + 1048632) ) break; inline_mysql_cond_wait( a1 + 1048640, a1 + 1048720, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0x832u); } } } } return result; }
translog_wait_for_buffer_free: 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 + 0x100010] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x100038] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x8] MOV AL,byte ptr [RAX + 0x1000d9] MOV byte ptr [RBP + -0x19],AL JMP 0x00139d39 LAB_00139d39: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00136d40 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x100010] JNZ 0x00139d77 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x100038] JNZ 0x00139d77 MOVZX EAX,byte ptr [RBP + -0x19] MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX + 0x1000d9] CMP EAX,ECX JZ 0x00139d7b LAB_00139d77: JMP 0x00139d79 LAB_00139d79: JMP 0x00139dc2 LAB_00139d7b: JMP 0x00139d7d LAB_00139d7d: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x100038],0x0 JZ 0x00139dba JMP 0x00139d8d LAB_00139d8d: JMP 0x00139d8f LAB_00139d8f: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x100040 MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0x100090 LEA RDX,[0x2516ad] MOV ECX,0x832 CALL 0x0012dec0 JMP 0x00139db8 LAB_00139db8: JMP 0x00139d7d LAB_00139dba: JMP 0x00139dbc LAB_00139dbc: JMP 0x00139dbe LAB_00139dbe: JMP 0x00139dc0 LAB_00139dc0: JMP 0x00139dc2 LAB_00139dc2: ADD RSP,0x20 POP RBP RET
void translog_wait_for_buffer_free(long param_1) { char cVar1; long lVar2; long lVar3; lVar2 = *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7); lVar3 = *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f); cVar1 = *(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1 + 1); translog_wait_for_writers(param_1); if (((lVar2 == *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7)) && (lVar3 == *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f))) && (cVar1 == *(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1 + 1))) { while (*(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f) != 0) { inline_mysql_cond_wait ((long)&Elf64_Phdr_ARRAY_00100040[0].p_type + param_1,param_1 + 0x100090, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0x832); } } return; }
23,542
long httplib::detail::handle_EINTR<httplib::detail::send_socket(int, void const*, unsigned long, int)::'lambda'()>(httplib::detail::send_socket(int, void const*, unsigned long, int)::'lambda'())
nickolajgrishuk[P]metricz-cpp/build_O2/_deps/httplib-src/httplib.h
inline ssize_t handle_EINTR(T fn) { ssize_t res = false; while (true) { res = fn(); if (res < 0 && errno == EINTR) { continue; } break; } return res; }
O2
c
long httplib::detail::handle_EINTR<httplib::detail::send_socket(int, void const*, unsigned long, int)::'lambda'()>(httplib::detail::send_socket(int, void const*, unsigned long, int)::'lambda'()): pushq %r14 pushq %rbx pushq %rax leaq 0x20(%rsp), %rbx movq %rbx, %rdi callq 0x1576e movq %rax, %r14 testq %rax, %rax jns 0x15762 callq 0x8050 cmpl $0x4, (%rax) je 0x15748 movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r14 retq nop
_ZN7httplib6detail12handle_EINTRIZNS0_11send_socketEiPKvmiEUlvE_EElT_: push r14 push rbx push rax lea rbx, [rsp+18h+arg_0] loc_15748: mov rdi, rbx call _ZZN7httplib6detail11send_socketEiPKvmiENKUlvE_clEv; httplib::detail::send_socket(int,void const*,ulong,int)::{lambda(void)#1}::operator()(void) mov r14, rax test rax, rax jns short loc_15762 call ___errno_location cmp dword ptr [rax], 4 jz short loc_15748 loc_15762: mov rax, r14 add rsp, 8 pop rbx pop r14 retn
long long httplib::detail::handle_EINTR<httplib::detail::send_socket(int,void const*,unsigned long,int)::{lambda(void)#1}>( _DWORD a1, long long a2, _DWORD a3, _DWORD a4, _DWORD a5, _DWORD a6, char a7) { long long v7; // r14 do v7 = httplib::detail::send_socket(int,void const*,unsigned long,int)::{lambda(void)#1}::operator()(&a7); while ( v7 < 0 && *(_DWORD *)__errno_location(&a7, a2) == 4 ); return v7; }
handle_EINTR<httplib::detail::send_socket(int,void_const*,unsigned_long,int)::{lambda()#1}>: PUSH R14 PUSH RBX PUSH RAX LEA RBX,[RSP + 0x20] LAB_00115748: MOV RDI,RBX CALL 0x0011576e MOV R14,RAX TEST RAX,RAX JNS 0x00115762 CALL 0x00108050 CMP dword ptr [RAX],0x4 JZ 0x00115748 LAB_00115762: MOV RAX,R14 ADD RSP,0x8 POP RBX POP R14 RET
/* long httplib::detail::handle_EINTR<httplib::detail::send_socket(int, void const*, unsigned long, int)::{lambda()#1}>(httplib::detail::send_socket(int, void const*, unsigned long, int)::{lambda()#1}) */ long httplib::detail:: handle_EINTR<httplib::detail::send_socket(int,void_const*,unsigned_long,int)::_lambda()_1_> (void) { long lVar1; int *piVar2; do { lVar1 = send_socket(int,void_const*,unsigned_long,int)::{lambda()#1}::operator() ((_lambda___1_ *)&stack0x00000008); if (-1 < lVar1) { return lVar1; } piVar2 = __errno_location(); } while (*piVar2 == 4); return lVar1; }
23,543
my_thread_global_init
eloqsql/mysys/my_thr_init.c
my_bool my_thread_global_init(void) { int pth_ret; /* Normally this should never be called twice */ DBUG_ASSERT(my_thread_global_init_done == 0); if (my_thread_global_init_done) return 0; my_thread_global_init_done= 1; /* THR_KEY_mysys is deleted in my_end() as DBUG libraries are using it even after my_thread_global_end() is called. my_thr_key_mysys_exist is used to protect against application like QT that calls my_thread_global_init() + my_thread_global_end() multiple times without calling my_init() + my_end(). */ if (!my_thr_key_mysys_exists && (pth_ret= pthread_key_create(&THR_KEY_mysys, NULL)) != 0) { fprintf(stderr, "Can't initialize threads: error %d\n", pth_ret); return 1; } my_thr_key_mysys_exists= 1; /* Mutex used by my_thread_init() and after my_thread_destroy_mutex() */ my_thread_init_internal_mutex(); if (my_thread_init()) return 1; my_thread_init_common_mutex(); return 0; }
O0
c
my_thread_global_init: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp jmp 0x7883a cmpb $0x0, 0x322f9f(%rip) # 0x39b7e0 je 0x78849 movb $0x0, -0x1(%rbp) jmp 0x788bc movb $0x1, 0x322f90(%rip) # 0x39b7e0 leaq 0x322cc5(%rip), %rax # 0x39b51c cmpb $0x0, (%rax) jne 0x78895 leaq 0x322f81(%rip), %rdi # 0x39b7e4 xorl %eax, %eax movl %eax, %esi callq 0x2a4c0 movl %eax, -0x8(%rbp) cmpl $0x0, %eax je 0x78895 movq 0x15c75d(%rip), %rax # 0x1d4fd8 movq (%rax), %rdi movl -0x8(%rbp), %edx leaq 0xb2a2(%rip), %rsi # 0x83b2a movb $0x0, %al callq 0x2a400 movb $0x1, -0x1(%rbp) jmp 0x788bc leaq 0x322c80(%rip), %rax # 0x39b51c movb $0x1, (%rax) callq 0x78730 callq 0x788d0 cmpb $0x0, %al je 0x788b3 movb $0x1, -0x1(%rbp) jmp 0x788bc callq 0x78660 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_thread_global_init: push rbp mov rbp, rsp sub rsp, 10h jmp short $+2 loc_7883A: cmp cs:my_thread_global_init_done, 0 jz short loc_78849 mov [rbp+var_1], 0 jmp short loc_788BC loc_78849: mov cs:my_thread_global_init_done, 1 lea rax, my_thr_key_mysys_exists cmp byte ptr [rax], 0 jnz short loc_78895 lea rdi, THR_KEY_mysys xor eax, eax mov esi, eax call _pthread_key_create mov [rbp+var_8], eax cmp eax, 0 jz short loc_78895 mov rax, cs:stderr_ptr mov rdi, [rax] mov edx, [rbp+var_8] lea rsi, aCanTInitialize; "Can't initialize threads: error %d\n" mov al, 0 call _fprintf mov [rbp+var_1], 1 jmp short loc_788BC loc_78895: lea rax, my_thr_key_mysys_exists mov byte ptr [rax], 1 call my_thread_init_internal_mutex call my_thread_init cmp al, 0 jz short loc_788B3 mov [rbp+var_1], 1 jmp short loc_788BC loc_788B3: call my_thread_init_common_mutex mov [rbp+var_1], 0 loc_788BC: mov al, [rbp+var_1] add rsp, 10h pop rbp retn
char my_thread_global_init() { int v1; // [rsp+8h] [rbp-8h] if ( my_thread_global_init_done ) return 0; my_thread_global_init_done = 1; if ( my_thr_key_mysys_exists || (v1 = pthread_key_create(&THR_KEY_mysys, 0LL)) == 0 ) { my_thr_key_mysys_exists = 1; my_thread_init_internal_mutex(); if ( (unsigned __int8)my_thread_init() ) { return 1; } else { my_thread_init_common_mutex(); return 0; } } else { fprintf(stderr, "Can't initialize threads: error %d\n", v1); return 1; } }
my_thread_global_init: PUSH RBP MOV RBP,RSP SUB RSP,0x10 JMP 0x0017883a LAB_0017883a: CMP byte ptr [0x0049b7e0],0x0 JZ 0x00178849 MOV byte ptr [RBP + -0x1],0x0 JMP 0x001788bc LAB_00178849: MOV byte ptr [0x0049b7e0],0x1 LEA RAX,[0x49b51c] CMP byte ptr [RAX],0x0 JNZ 0x00178895 LEA RDI,[0x49b7e4] XOR EAX,EAX MOV ESI,EAX CALL 0x0012a4c0 MOV dword ptr [RBP + -0x8],EAX CMP EAX,0x0 JZ 0x00178895 MOV RAX,qword ptr [0x002d4fd8] MOV RDI,qword ptr [RAX] MOV EDX,dword ptr [RBP + -0x8] LEA RSI,[0x183b2a] MOV AL,0x0 CALL 0x0012a400 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001788bc LAB_00178895: LEA RAX,[0x49b51c] MOV byte ptr [RAX],0x1 CALL 0x00178730 CALL 0x001788d0 CMP AL,0x0 JZ 0x001788b3 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001788bc LAB_001788b3: CALL 0x00178660 MOV byte ptr [RBP + -0x1],0x0 LAB_001788bc: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x10 POP RBP RET
int1 my_thread_global_init(void) { char cVar1; uint uVar2; int1 local_9; if (my_thread_global_init_done == '\0') { my_thread_global_init_done = '\x01'; if ((my_thr_key_mysys_exists == '\0') && (uVar2 = pthread_key_create(&THR_KEY_mysys,(__destr_function *)0x0), uVar2 != 0)) { fprintf(*(FILE **)PTR_stderr_002d4fd8,"Can\'t initialize threads: error %d\n",(ulong)uVar2); return 1; } my_thr_key_mysys_exists = '\x01'; my_thread_init_internal_mutex(); cVar1 = my_thread_init(); if (cVar1 == '\0') { my_thread_init_common_mutex(); local_9 = 0; } else { local_9 = 1; } } else { local_9 = 0; } return local_9; }
23,544
init_functions
eloqsql/mysys/mf_iocache.c
static void init_functions(IO_CACHE* info) { enum cache_type type= info->type; info->read_function = 0; /* Force a core if used */ info->write_function = 0; /* Force a core if used */ switch (type) { case READ_NET: /* Must be initialized by the caller. The problem is that _my_b_net_read has to be defined in sql directory because of the dependency on THD, and therefore cannot be visible to programs that link against mysys but know nothing about THD, such as myisamchk */ DBUG_ASSERT(!(info->myflags & MY_ENCRYPT)); break; case SEQ_READ_APPEND: info->read_function = _my_b_seq_read; DBUG_ASSERT(!(info->myflags & MY_ENCRYPT)); break; case READ_CACHE: if (info->myflags & MY_ENCRYPT) { DBUG_ASSERT(info->share == 0); info->read_function = _my_b_encr_read; break; } /* fall through */ case WRITE_CACHE: if (info->myflags & MY_ENCRYPT) { info->write_function = _my_b_encr_write; break; } /* fall through */ case READ_FIFO: DBUG_ASSERT(!(info->myflags & MY_ENCRYPT)); info->read_function = info->share ? _my_b_cache_read_r : _my_b_cache_read; info->write_function = info->share ? _my_b_cache_write_r : _my_b_cache_write; break; case TYPE_NOT_SET: DBUG_ASSERT(0); break; } if (type == READ_CACHE || type == WRITE_CACHE || type == SEQ_READ_APPEND) info->myflags|= MY_FULL_IO; else info->myflags&= ~MY_FULL_IO; }
O0
c
init_functions: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movl 0xb0(%rax), %eax movl %eax, -0xc(%rbp) movq -0x8(%rbp), %rax movq $0x0, 0xa0(%rax) movq -0x8(%rbp), %rax movq $0x0, 0xa8(%rax) movl -0xc(%rbp), %eax movq %rax, -0x18(%rbp) subq $0x5, %rax ja 0xe0241 movq -0x18(%rbp), %rax leaq 0x79449(%rip), %rcx # 0x159598 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax jmp 0xe015a jmp 0xe015c jmp 0xe0241 movq -0x8(%rbp), %rax leaq 0x1e94(%rip), %rcx # 0xe2000 movq %rcx, 0xa0(%rax) jmp 0xe0175 jmp 0xe0241 movq -0x8(%rbp), %rax movq 0xf8(%rax), %rax andq $0x40, %rax cmpq $0x0, %rax je 0xe01ad jmp 0xe0191 jmp 0xe0193 leaq 0xba225e(%rip), %rax # 0xc823f8 movq (%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0xa0(%rax) jmp 0xe0241 jmp 0xe01af movq -0x8(%rbp), %rax movq 0xf8(%rax), %rax andq $0x40, %rax cmpq $0x0, %rax je 0xe01db leaq 0xba2235(%rip), %rax # 0xc82400 movq (%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0xa8(%rax) jmp 0xe0241 jmp 0xe01dd jmp 0xe01df jmp 0xe01e1 movq -0x8(%rbp), %rax movq 0x98(%rax), %rdx leaq 0x224d(%rip), %rcx # 0xe2440 leaq 0xd46(%rip), %rax # 0xe0f40 cmpq $0x0, %rdx cmovneq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, 0xa0(%rax) movq -0x8(%rbp), %rax movq 0x98(%rax), %rdx leaq 0x2661(%rip), %rcx # 0xe2880 leaq 0x114a(%rip), %rax # 0xe1370 cmpq $0x0, %rdx cmovneq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, 0xa8(%rax) jmp 0xe0241 jmp 0xe023d jmp 0xe023f jmp 0xe0241 cmpl $0x1, -0xc(%rbp) je 0xe0253 cmpl $0x2, -0xc(%rbp) je 0xe0253 cmpl $0x3, -0xc(%rbp) jne 0xe026e movq -0x8(%rbp), %rax movq 0xf8(%rax), %rcx orq $0x200, %rcx # imm = 0x200 movq %rcx, 0xf8(%rax) jmp 0xe028a movq -0x8(%rbp), %rax movabsq $0xfffffdff, %rcx # imm = 0xFFFFFDFF andq 0xf8(%rax), %rcx movq %rcx, 0xf8(%rax) popq %rbp retq nopl (%rax)
init_functions: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov eax, [rax+0B0h] mov [rbp+var_C], eax mov rax, [rbp+var_8] mov qword ptr [rax+0A0h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+0A8h], 0 mov eax, [rbp+var_C] mov [rbp+var_18], rax sub rax, 5; switch 6 cases ja def_E0156; jumptable 00000000000E0156 default case mov rax, [rbp+var_18] lea rcx, jpt_E0156 movsxd rax, ds:(jpt_E0156 - 159598h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_E0158: jmp short $+2; jumptable 00000000000E0156 case 5 loc_E015A: jmp short $+2 loc_E015C: jmp def_E0156; jumptable 00000000000E0156 default case loc_E0161: mov rax, [rbp+var_8]; jumptable 00000000000E0156 case 3 lea rcx, _my_b_seq_read mov [rax+0A0h], rcx jmp short $+2 loc_E0175: jmp def_E0156; jumptable 00000000000E0156 default case loc_E017A: mov rax, [rbp+var_8]; jumptable 00000000000E0156 case 1 mov rax, [rax+0F8h] and rax, 40h cmp rax, 0 jz short loc_E01AD jmp short $+2 loc_E0191: jmp short $+2 loc_E0193: lea rax, _my_b_encr_read mov rcx, [rax] mov rax, [rbp+var_8] mov [rax+0A0h], rcx jmp def_E0156; jumptable 00000000000E0156 default case loc_E01AD: jmp short $+2; jumptable 00000000000E0156 case 2 loc_E01AF: mov rax, [rbp+var_8]; jumptable 00000000000E0156 case 2 mov rax, [rax+0F8h] and rax, 40h cmp rax, 0 jz short loc_E01DB lea rax, _my_b_encr_write mov rcx, [rax] mov rax, [rbp+var_8] mov [rax+0A8h], rcx jmp short def_E0156; jumptable 00000000000E0156 default case loc_E01DB: jmp short $+2; jumptable 00000000000E0156 case 4 loc_E01DD: jmp short $+2; jumptable 00000000000E0156 case 4 loc_E01DF: jmp short $+2 loc_E01E1: mov rax, [rbp+var_8] mov rdx, [rax+98h] lea rcx, _my_b_cache_read lea rax, _my_b_cache_read_r cmp rdx, 0 cmovnz rcx, rax mov rax, [rbp+var_8] mov [rax+0A0h], rcx mov rax, [rbp+var_8] mov rdx, [rax+98h] lea rcx, _my_b_cache_write lea rax, _my_b_cache_write_r cmp rdx, 0 cmovnz rcx, rax mov rax, [rbp+var_8] mov [rax+0A8h], rcx jmp short def_E0156; jumptable 00000000000E0156 default case loc_E023B: jmp short $+2; jumptable 00000000000E0156 case 0 loc_E023D: jmp short $+2 loc_E023F: jmp short $+2; jumptable 00000000000E0156 default case def_E0156: cmp [rbp+var_C], 1; jumptable 00000000000E0156 default case jz short loc_E0253 cmp [rbp+var_C], 2 jz short loc_E0253 cmp [rbp+var_C], 3 jnz short loc_E026E loc_E0253: mov rax, [rbp+var_8] mov rcx, [rax+0F8h] or rcx, 200h mov [rax+0F8h], rcx jmp short loc_E028A loc_E026E: mov rax, [rbp+var_8] mov rcx, 0FFFFFDFFh and rcx, [rax+0F8h] mov [rax+0F8h], rcx loc_E028A: pop rbp retn
long long init_functions(long long a1) { long long ( *v1)(); // rcx long long ( *v2)(); // rcx long long result; // rax int v4; // [rsp+Ch] [rbp-Ch] v4 = *(_DWORD *)(a1 + 176); *(_QWORD *)(a1 + 160) = 0LL; *(_QWORD *)(a1 + 168) = 0LL; switch ( v4 ) { case 1: if ( (*(_QWORD *)(a1 + 248) & 0x40LL) == 0 ) goto LABEL_5; *(_QWORD *)(a1 + 160) = my_b_encr_read; break; case 2: LABEL_5: if ( (*(_QWORD *)(a1 + 248) & 0x40LL) == 0 ) goto LABEL_7; *(_QWORD *)(a1 + 168) = my_b_encr_write; break; case 3: *(_QWORD *)(a1 + 160) = my_b_seq_read; break; case 4: LABEL_7: v1 = my_b_cache_read; if ( *(_QWORD *)(a1 + 152) ) v1 = my_b_cache_read_r; *(_QWORD *)(a1 + 160) = v1; v2 = my_b_cache_write; if ( *(_QWORD *)(a1 + 152) ) v2 = my_b_cache_write_r; *(_QWORD *)(a1 + 168) = v2; break; default: break; } if ( v4 == 1 || v4 == 2 || v4 == 3 ) { result = a1; *(_QWORD *)(a1 + 248) |= 0x200uLL; } else { result = a1; *(_QWORD *)(a1 + 248) &= 0xFFFFFDFFuLL; } return result; }
init_functions: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0xb0] MOV dword ptr [RBP + -0xc],EAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xa0],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xa8],0x0 MOV EAX,dword ptr [RBP + -0xc] MOV qword ptr [RBP + -0x18],RAX SUB RAX,0x5 JA 0x001e0241 MOV RAX,qword ptr [RBP + -0x18] LEA RCX,[0x259598] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_5: JMP 0x001e015a LAB_001e015a: JMP 0x001e015c LAB_001e015c: JMP 0x001e0241 caseD_3: MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x1e2000] MOV qword ptr [RAX + 0xa0],RCX JMP 0x001e0175 LAB_001e0175: JMP 0x001e0241 caseD_1: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0xf8] AND RAX,0x40 CMP RAX,0x0 JZ 0x001e01ad JMP 0x001e0191 LAB_001e0191: JMP 0x001e0193 LAB_001e0193: LEA RAX,[0xd823f8] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xa0],RCX JMP 0x001e0241 LAB_001e01ad: JMP 0x001e01af caseD_2: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0xf8] AND RAX,0x40 CMP RAX,0x0 JZ 0x001e01db LEA RAX,[0xd82400] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xa8],RCX JMP 0x001e0241 LAB_001e01db: JMP 0x001e01dd caseD_4: JMP 0x001e01df LAB_001e01df: JMP 0x001e01e1 LAB_001e01e1: MOV RAX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RAX + 0x98] LEA RCX,[0x1e2440] LEA RAX,[0x1e0f40] CMP RDX,0x0 CMOVNZ RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xa0],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RAX + 0x98] LEA RCX,[0x1e2880] LEA RAX,[0x1e1370] CMP RDX,0x0 CMOVNZ RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xa8],RCX JMP 0x001e0241 caseD_0: JMP 0x001e023d LAB_001e023d: JMP 0x001e023f LAB_001e023f: JMP 0x001e0241 default: CMP dword ptr [RBP + -0xc],0x1 JZ 0x001e0253 CMP dword ptr [RBP + -0xc],0x2 JZ 0x001e0253 CMP dword ptr [RBP + -0xc],0x3 JNZ 0x001e026e LAB_001e0253: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0xf8] OR RCX,0x200 MOV qword ptr [RAX + 0xf8],RCX JMP 0x001e028a LAB_001e026e: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,0xfffffdff AND RCX,qword ptr [RAX + 0xf8] MOV qword ptr [RAX + 0xf8],RCX LAB_001e028a: POP RBP RET
void init_functions(long param_1) { int iVar1; code *pcVar2; iVar1 = *(int *)(param_1 + 0xb0); *(int8 *)(param_1 + 0xa0) = 0; *(int8 *)(param_1 + 0xa8) = 0; switch(iVar1) { case 0: break; case 1: if ((*(ulong *)(param_1 + 0xf8) & 0x40) != 0) { *(int8 *)(param_1 + 0xa0) = _my_b_encr_read; break; } case 2: if ((*(ulong *)(param_1 + 0xf8) & 0x40) == 0) { LAB_001e01e1: pcVar2 = _my_b_cache_read; if (*(long *)(param_1 + 0x98) != 0) { pcVar2 = _my_b_cache_read_r; } *(code **)(param_1 + 0xa0) = pcVar2; pcVar2 = _my_b_cache_write; if (*(long *)(param_1 + 0x98) != 0) { pcVar2 = _my_b_cache_write_r; } *(code **)(param_1 + 0xa8) = pcVar2; } else { *(int8 *)(param_1 + 0xa8) = _my_b_encr_write; } break; case 3: *(code **)(param_1 + 0xa0) = _my_b_seq_read; break; case 4: goto LAB_001e01e1; case 5: } if (((iVar1 == 1) || (iVar1 == 2)) || (iVar1 == 3)) { *(ulong *)(param_1 + 0xf8) = *(ulong *)(param_1 + 0xf8) | 0x200; } else { *(ulong *)(param_1 + 0xf8) = *(ulong *)(param_1 + 0xf8) & 0xfffffdff; } return; }
23,545
utf8_decode_len
bluesky950520[P]quickjs/cutils.c
uint32_t utf8_decode_len(const uint8_t *p, size_t max_len, const uint8_t **pp) { switch (max_len) { case 0: *pp = p; return 0xFFFD; case 1: if (*p < 0x80) goto good; break; case 2: if (*p < 0xE0) goto good; break; case 3: if (*p < 0xF0) goto good; break; default: good: return utf8_decode(p, pp); } *pp = p + 1; return 0xFFFD; }
O0
c
utf8_decode_len: subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq %rsi, 0x10(%rsp) movq %rdx, 0x8(%rsp) movq 0x10(%rsp), %rax movq %rax, (%rsp) subq $0x3, %rax ja 0x25146 movq (%rsp), %rax leaq 0xeb4ef(%rip), %rcx # 0x1105dc movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x18(%rsp), %rcx movq 0x8(%rsp), %rax movq %rcx, (%rax) movl $0xfffd, 0x24(%rsp) # imm = 0xFFFD jmp 0x25176 movq 0x18(%rsp), %rax movzbl (%rax), %eax cmpl $0x80, %eax jge 0x2511e jmp 0x25148 jmp 0x2515d movq 0x18(%rsp), %rax movzbl (%rax), %eax cmpl $0xe0, %eax jge 0x25131 jmp 0x25148 jmp 0x2515d movq 0x18(%rsp), %rax movzbl (%rax), %eax cmpl $0xf0, %eax jge 0x25144 jmp 0x25148 jmp 0x2515d jmp 0x25148 movq 0x18(%rsp), %rdi movq 0x8(%rsp), %rsi callq 0x24e40 movl %eax, 0x24(%rsp) jmp 0x25176 movq 0x18(%rsp), %rcx addq $0x1, %rcx movq 0x8(%rsp), %rax movq %rcx, (%rax) movl $0xfffd, 0x24(%rsp) # imm = 0xFFFD movl 0x24(%rsp), %eax addq $0x28, %rsp retq nop
utf8_decode_len: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_18], rsi mov [rsp+28h+var_20], rdx mov rax, [rsp+28h+var_18] mov [rsp+28h+var_28], rax sub rax, 3; switch 4 cases ja short def_250F4; jumptable 00000000000250F4 default case mov rax, [rsp+28h+var_28] lea rcx, jpt_250F4 movsxd rax, ds:(jpt_250F4 - 1105DCh)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_250F6: mov rcx, [rsp+28h+var_10]; jumptable 00000000000250F4 case 0 mov rax, [rsp+28h+var_20] mov [rax], rcx mov [rsp+28h+var_4], 0FFFDh jmp short loc_25176 loc_2510D: mov rax, [rsp+28h+var_10]; jumptable 00000000000250F4 case 1 movzx eax, byte ptr [rax] cmp eax, 80h jge short loc_2511E jmp short loc_25148 loc_2511E: jmp short loc_2515D loc_25120: mov rax, [rsp+28h+var_10]; jumptable 00000000000250F4 case 2 movzx eax, byte ptr [rax] cmp eax, 0E0h jge short loc_25131 jmp short loc_25148 loc_25131: jmp short loc_2515D loc_25133: mov rax, [rsp+28h+var_10]; jumptable 00000000000250F4 case 3 movzx eax, byte ptr [rax] cmp eax, 0F0h jge short loc_25144 jmp short loc_25148 loc_25144: jmp short loc_2515D def_250F4: jmp short $+2; jumptable 00000000000250F4 default case loc_25148: mov rdi, [rsp+28h+var_10] mov rsi, [rsp+28h+var_20] call utf8_decode mov [rsp+28h+var_4], eax jmp short loc_25176 loc_2515D: mov rcx, [rsp+28h+var_10] add rcx, 1 mov rax, [rsp+28h+var_20] mov [rax], rcx mov [rsp+28h+var_4], 0FFFDh loc_25176: mov eax, [rsp+28h+var_4] add rsp, 28h retn
long long utf8_decode_len(unsigned __int8 *a1, long long a2, unsigned __int8 **a3) { unsigned int v4; // [rsp+24h] [rbp-4h] switch ( a2 ) { case 0LL: *a3 = a1; return 65533; case 1LL: if ( *a1 < 0x80u ) goto LABEL_8; goto LABEL_9; case 2LL: if ( *a1 >= 0xE0u ) goto LABEL_9; goto LABEL_8; case 3LL: if ( *a1 < 0xF0u ) goto LABEL_8; LABEL_9: *a3 = a1 + 1; v4 = 65533; break; default: LABEL_8: v4 = utf8_decode(a1, a3); break; } return v4; }
utf8_decode_len: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV qword ptr [RSP + 0x10],RSI MOV qword ptr [RSP + 0x8],RDX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP],RAX SUB RAX,0x3 JA 0x00125146 MOV RAX,qword ptr [RSP] LEA RCX,[0x2105dc] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOV RCX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX],RCX MOV dword ptr [RSP + 0x24],0xfffd JMP 0x00125176 caseD_1: MOV RAX,qword ptr [RSP + 0x18] MOVZX EAX,byte ptr [RAX] CMP EAX,0x80 JGE 0x0012511e JMP 0x00125148 LAB_0012511e: JMP 0x0012515d caseD_2: MOV RAX,qword ptr [RSP + 0x18] MOVZX EAX,byte ptr [RAX] CMP EAX,0xe0 JGE 0x00125131 JMP 0x00125148 LAB_00125131: JMP 0x0012515d caseD_3: MOV RAX,qword ptr [RSP + 0x18] MOVZX EAX,byte ptr [RAX] CMP EAX,0xf0 JGE 0x00125144 JMP 0x00125148 LAB_00125144: JMP 0x0012515d LAB_00125146: JMP 0x00125148 default: MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x8] CALL 0x00124e40 MOV dword ptr [RSP + 0x24],EAX JMP 0x00125176 LAB_0012515d: MOV RCX,qword ptr [RSP + 0x18] ADD RCX,0x1 MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX],RCX MOV dword ptr [RSP + 0x24],0xfffd LAB_00125176: MOV EAX,dword ptr [RSP + 0x24] ADD RSP,0x28 RET
int4 utf8_decode_len(byte *param_1,int8 param_2,int8 *param_3) { int4 uVar1; switch(param_2) { case 0: *param_3 = param_1; return 0xfffd; case 1: if (0x7f < *param_1) { LAB_0012515d: *param_3 = param_1 + 1; return 0xfffd; } break; case 2: if (0xdf < *param_1) goto LAB_0012515d; break; case 3: if (0xef < *param_1) goto LAB_0012515d; } uVar1 = utf8_decode(param_1,param_3); return uVar1; }
23,546
build_clip_img_from_data(unsigned char const*, int, int, clip_image_u8*)
monkey531[P]llama/examples/llava/clip.cpp
static void build_clip_img_from_data(const stbi_uc * data, int nx, int ny, clip_image_u8 * img) { img->nx = nx; img->ny = ny; img->buf.resize(3 * nx * ny); memcpy(img->buf.data(), data, img->buf.size()); }
O2
cpp
build_clip_img_from_data(unsigned char const*, int, int, clip_image_u8*): pushq %r14 pushq %rbx pushq %rax movq %rcx, %rbx movq %rdi, %r14 movl %esi, (%rcx) movl %edx, 0x4(%rcx) leaq 0x8(%rcx), %rdi imull %edx, %esi leal (%rsi,%rsi,2), %eax movslq %eax, %rsi callq 0x29ff0 movq 0x8(%rbx), %rdi movq 0x10(%rbx), %rdx subq %rdi, %rdx movq %r14, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x29870
_ZL24build_clip_img_from_dataPKhiiP13clip_image_u8: push r14 push rbx push rax mov rbx, rcx mov r14, rdi mov [rcx], esi mov [rcx+4], edx lea rdi, [rcx+8] imul esi, edx lea eax, [rsi+rsi*2] movsxd rsi, eax call __ZNSt6vectorIhSaIhEE6resizeEm; std::vector<uchar>::resize(ulong) mov rdi, [rbx+8] mov rdx, [rbx+10h] sub rdx, rdi mov rsi, r14 add rsp, 8 pop rbx pop r14 jmp _memcpy
long long build_clip_img_from_data(long long a1, int a2, int a3, long long a4) { *(_DWORD *)a4 = a2; *(_DWORD *)(a4 + 4) = a3; std::vector<unsigned char>::resize(a4 + 8, 3 * a3 * a2); return memcpy(*(_QWORD *)(a4 + 8), a1, *(_QWORD *)(a4 + 16) - *(_QWORD *)(a4 + 8)); }
build_clip_img_from_data: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RCX MOV R14,RDI MOV dword ptr [RCX],ESI MOV dword ptr [RCX + 0x4],EDX LEA RDI,[RCX + 0x8] IMUL ESI,EDX LEA EAX,[RSI + RSI*0x2] MOVSXD RSI,EAX CALL 0x00129ff0 MOV RDI,qword ptr [RBX + 0x8] MOV RDX,qword ptr [RBX + 0x10] SUB RDX,RDI MOV RSI,R14 ADD RSP,0x8 POP RBX POP R14 JMP 0x00129870
/* build_clip_img_from_data(unsigned char const*, int, int, clip_image_u8*) */ void build_clip_img_from_data(uchar *param_1,int param_2,int param_3,clip_image_u8 *param_4) { *(int *)param_4 = param_2; *(int *)(param_4 + 4) = param_3; std::vector<unsigned_char,std::allocator<unsigned_char>>::resize ((vector<unsigned_char,std::allocator<unsigned_char>> *)(param_4 + 8), (long)(param_2 * param_3 * 3)); memcpy(*(void **)(param_4 + 8),param_1,*(long *)(param_4 + 0x10) - (long)*(void **)(param_4 + 8)); return; }
23,547
ftxui::animation::easing::ExponentialInOut(float)
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/component/animation.cpp
float ExponentialInOut(float p) { if (p == 0.f || p == 1.f) { return p; } if (p < 0.5f) { return 0.5f * std::pow(2.f, (20.f * p) - 10.f); } return -0.5f * std::pow(2.f, (-20.f * p) + 10.f) + 1.f; }
O1
cpp
ftxui::animation::easing::ExponentialInOut(float): pushq %rax xorps %xmm1, %xmm1 ucomiss %xmm1, %xmm0 jne 0x3788c jnp 0x378e8 ucomiss 0x6565(%rip), %xmm0 # 0x3ddf8 jne 0x37897 jnp 0x378e8 movss 0x6561(%rip), %xmm1 # 0x3de00 ucomiss %xmm0, %xmm1 jbe 0x378c3 mulss 0x8ad0(%rip), %xmm0 # 0x4037c addss 0x8abc(%rip), %xmm0 # 0x40370 callq 0xb800 mulss 0x653f(%rip), %xmm0 # 0x3de00 jmp 0x378e8 mulss 0x8aa9(%rip), %xmm0 # 0x40374 addss 0x8a99(%rip), %xmm0 # 0x4036c callq 0xb800 mulss 0x8a98(%rip), %xmm0 # 0x40378 addss 0x6510(%rip), %xmm0 # 0x3ddf8 popq %rax retq
_ZN5ftxui9animation6easing16ExponentialInOutEf: push rax xorps xmm1, xmm1 ucomiss xmm0, xmm1 jnz short loc_3788C jnp short loc_378E8 loc_3788C: ucomiss xmm0, cs:dword_3DDF8 jnz short loc_37897 jnp short loc_378E8 loc_37897: movss xmm1, cs:dword_3DE00 ucomiss xmm1, xmm0 jbe short loc_378C3 mulss xmm0, cs:dword_4037C addss xmm0, cs:dword_40370 call _exp2f mulss xmm0, cs:dword_3DE00 jmp short loc_378E8 loc_378C3: mulss xmm0, cs:dword_40374 addss xmm0, cs:dword_4036C call _exp2f mulss xmm0, cs:dword_40378 addss xmm0, cs:dword_3DDF8 loc_378E8: pop rax retn
float __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> ftxui::animation::easing::ExponentialInOut( ftxui::animation::easing *this, float result) { double v2; // xmm0_8 double v3; // xmm0_8 if ( result != 0.0 && result != 1.0 ) { if ( result >= 0.5 ) { v3 = exp2f(this, (float)(result * -20.0) + 10.0); return (float)(*(float *)&v3 * -0.5) + 1.0; } else { v2 = exp2f(this, (float)(result * 20.0) + -10.0); return *(float *)&v2 * 0.5; } } return result; }
ExponentialInOut: PUSH RAX XORPS XMM1,XMM1 UCOMISS XMM0,XMM1 JNZ 0x0013788c JNP 0x001378e8 LAB_0013788c: UCOMISS XMM0,dword ptr [0x0013ddf8] JNZ 0x00137897 JNP 0x001378e8 LAB_00137897: MOVSS XMM1,dword ptr [0x0013de00] UCOMISS XMM1,XMM0 JBE 0x001378c3 MULSS XMM0,dword ptr [0x0014037c] ADDSS XMM0,dword ptr [0x00140370] CALL 0x0010b800 MULSS XMM0,dword ptr [0x0013de00] JMP 0x001378e8 LAB_001378c3: MULSS XMM0,dword ptr [0x00140374] ADDSS XMM0,dword ptr [0x0014036c] CALL 0x0010b800 MULSS XMM0,dword ptr [0x00140378] ADDSS XMM0,dword ptr [0x0013ddf8] LAB_001378e8: POP RAX RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* ftxui::animation::easing::ExponentialInOut(float) */ int8 ftxui::animation::easing::ExponentialInOut(float param_1) { int8 in_RAX; if ((param_1 != 0.0) || (NAN(param_1))) { if ((param_1 != DAT_0013ddf8) || (NAN(param_1) || NAN(DAT_0013ddf8))) { if (DAT_0013de00 <= param_1) { exp2f(param_1 * _DAT_00140374 + _DAT_0014036c); } else { exp2f(param_1 * _DAT_0014037c + _DAT_00140370); } } } return in_RAX; }
23,548
my_hash_first
eloqsql/mysys/hash.c
uchar* my_hash_first(const HASH *hash, const uchar *key, size_t length, HASH_SEARCH_STATE *current_record) { uchar *res; DBUG_ASSERT(my_hash_inited(hash)); res= my_hash_first_from_hash_value(hash, hash->hash_function(hash->charset, key, length ? length : hash->key_length), key, length, current_record); return res; }
O0
c
my_hash_first: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) jmp 0xe84ea movq -0x8(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x8(%rbp), %rax movq 0x58(%rax), %rax movq %rax, -0x40(%rbp) movq -0x8(%rbp), %rax movq 0x68(%rax), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x30(%rbp) cmpq $0x0, -0x18(%rbp) je 0xe8523 movq -0x18(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0xe852f movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x50(%rbp) movq -0x40(%rbp), %rax movq -0x30(%rbp), %rsi movq -0x38(%rbp), %rdi movq -0x50(%rbp), %rdx callq *%rax movq -0x48(%rbp), %rdi movl %eax, %esi movq -0x10(%rbp), %rdx movq -0x18(%rbp), %rcx movq -0x20(%rbp), %r8 callq 0xe85b0 movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_hash_first: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx jmp short $+2 loc_E84EA: mov rax, [rbp+var_8] mov [rbp+var_48], rax mov rax, [rbp+var_8] mov rax, [rax+58h] mov [rbp+var_40], rax mov rax, [rbp+var_8] mov rax, [rax+68h] mov [rbp+var_38], rax mov rax, [rbp+var_10] mov [rbp+var_30], rax cmp [rbp+var_18], 0 jz short loc_E8523 mov rax, [rbp+var_18] mov [rbp+var_50], rax jmp short loc_E852F loc_E8523: mov rax, [rbp+var_8] mov rax, [rax+8] mov [rbp+var_50], rax loc_E852F: mov rax, [rbp+var_40] mov rsi, [rbp+var_30] mov rdi, [rbp+var_38] mov rdx, [rbp+var_50] call rax mov rdi, [rbp+var_48] mov esi, eax mov rdx, [rbp+var_10] mov rcx, [rbp+var_18] mov r8, [rbp+var_20] call my_hash_first_from_hash_value mov [rbp+var_28], rax mov rax, [rbp+var_28] add rsp, 50h pop rbp retn
long long my_hash_first(_QWORD *a1, long long a2, long long a3, long long a4) { unsigned int v4; // eax long long ( *v6)(long long, long long, long long); // [rsp+10h] [rbp-40h] long long v7; // [rsp+18h] [rbp-38h] v6 = (long long ( *)(long long, long long, long long))a1[11]; v7 = a1[13]; if ( a3 ) v4 = v6(v7, a2, a3); else v4 = v6(v7, a2, a1[1]); return my_hash_first_from_hash_value(a1, v4, a2, a3, a4); }
my_hash_first: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX JMP 0x001e84ea LAB_001e84ea: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x58] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x68] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x18],0x0 JZ 0x001e8523 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x50],RAX JMP 0x001e852f LAB_001e8523: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x50],RAX LAB_001e852f: MOV RAX,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x30] MOV RDI,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x50] CALL RAX MOV RDI,qword ptr [RBP + -0x48] MOV ESI,EAX MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x18] MOV R8,qword ptr [RBP + -0x20] CALL 0x001e85b0 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RSP,0x50 POP RBP RET
int8 my_hash_first(long param_1,int8 param_2,long param_3,int8 param_4) { int4 uVar1; int8 uVar2; int8 local_58; local_58 = param_3; if (param_3 == 0) { local_58 = *(long *)(param_1 + 8); } uVar1 = (**(code **)(param_1 + 0x58))(*(int8 *)(param_1 + 0x68),param_2,local_58); uVar2 = my_hash_first_from_hash_value(param_1,uVar1,param_2,param_3,param_4); return uVar2; }
23,549
cs_enter
eloqsql/strings/ctype.c
static int cs_enter(MY_XML_PARSER *st,const char *attr, size_t len) { struct my_cs_file_info *i= (struct my_cs_file_info *)st->user_data; const struct my_cs_file_section_st *s= cs_file_sec(attr,len); int state= s ? s->state : 0; switch (state) { case 0: i->loader->reporter(WARNING_LEVEL, "Unknown LDML tag: '%.*s'", len, attr); break; case _CS_CHARSET: my_charset_file_reset_charset(i); break; case _CS_COLLATION: my_charset_file_reset_collation(i); break; case _CS_RESET: return tailoring_append(st, " &", 0, NULL); default: break; } return MY_XML_OK; }
O0
c
cs_enter: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x140(%rax), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0xa49e0 movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%rbp) je 0xa2f76 movq -0x30(%rbp), %rax movl (%rax), %eax movl %eax, -0x38(%rbp) jmp 0xa2f7d xorl %eax, %eax movl %eax, -0x38(%rbp) jmp 0xa2f7d movl -0x38(%rbp), %eax movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax movl %eax, -0x3c(%rbp) testl %eax, %eax je 0xa2faf jmp 0xa2f8f movl -0x3c(%rbp), %eax subl $0x8, %eax je 0xa2fdc jmp 0xa2f99 movl -0x3c(%rbp), %eax subl $0x9, %eax je 0xa2fe7 jmp 0xa2fa3 movl -0x3c(%rbp), %eax subl $0x12d, %eax # imm = 0x12D je 0xa2ff2 jmp 0xa300e movq -0x28(%rbp), %rax movq 0x7a8(%rax), %rax movq 0xa0(%rax), %r8 movq -0x20(%rbp), %rdx movq -0x18(%rbp), %rcx movl $0x1, %edi leaq 0x11a07(%rip), %rsi # 0xb49dc movb $0x0, %al callq *%r8 jmp 0xa3010 movq -0x28(%rbp), %rdi callq 0xa4980 jmp 0xa3010 movq -0x28(%rbp), %rdi callq 0xa49b0 jmp 0xa3010 movq -0x10(%rbp), %rdi leaq 0x119f8(%rip), %rsi # 0xb49f5 xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0xa4a70 movl %eax, -0x4(%rbp) jmp 0xa3017 jmp 0xa3010 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq
cs_enter: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov rax, [rax+140h] mov [rbp+var_28], rax mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] call cs_file_sec mov [rbp+var_30], rax cmp [rbp+var_30], 0 jz short loc_A2F76 mov rax, [rbp+var_30] mov eax, [rax] mov [rbp+var_38], eax jmp short loc_A2F7D loc_A2F76: xor eax, eax mov [rbp+var_38], eax jmp short $+2 loc_A2F7D: mov eax, [rbp+var_38] mov [rbp+var_34], eax mov eax, [rbp+var_34] mov [rbp+var_3C], eax test eax, eax jz short loc_A2FAF jmp short $+2 loc_A2F8F: mov eax, [rbp+var_3C] sub eax, 8 jz short loc_A2FDC jmp short $+2 loc_A2F99: mov eax, [rbp+var_3C] sub eax, 9 jz short loc_A2FE7 jmp short $+2 loc_A2FA3: mov eax, [rbp+var_3C] sub eax, 12Dh jz short loc_A2FF2 jmp short loc_A300E loc_A2FAF: mov rax, [rbp+var_28] mov rax, [rax+7A8h] mov r8, [rax+0A0h] mov rdx, [rbp+var_20] mov rcx, [rbp+var_18] mov edi, 1 lea rsi, aUnknownLdmlTag; "Unknown LDML tag: '%.*s'" mov al, 0 call r8 jmp short loc_A3010 loc_A2FDC: mov rdi, [rbp+var_28] call my_charset_file_reset_charset jmp short loc_A3010 loc_A2FE7: mov rdi, [rbp+var_28] call my_charset_file_reset_collation jmp short loc_A3010 loc_A2FF2: mov rdi, [rbp+var_10] lea rsi, asc_B49F5; " &" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_4], eax jmp short loc_A3017 loc_A300E: jmp short $+2 loc_A3010: mov [rbp+var_4], 0 loc_A3017: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long cs_enter(long long a1, const char *a2, long long a3) { int v4; // [rsp+8h] [rbp-38h] int *v5; // [rsp+10h] [rbp-30h] long long v6; // [rsp+18h] [rbp-28h] int v7; // [rsp+20h] [rbp-20h] v7 = a3; v6 = *(_QWORD *)(a1 + 320); v5 = (int *)cs_file_sec(a2, a3); if ( v5 ) v4 = *v5; else v4 = 0; switch ( v4 ) { case 0: (*(void (**)(long long, const char *, ...))(*(_QWORD *)(v6 + 1960) + 160LL))( 1LL, "Unknown LDML tag: '%.*s'", v7, a2); return 0; case 8: my_charset_file_reset_charset(v6); return 0; case 9: my_charset_file_reset_collation(v6); return 0; } if ( v4 != 301 ) return 0; return (unsigned int)tailoring_append(a1, " &", 0LL); }
cs_enter: 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 RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x140] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] CALL 0x001a49e0 MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x30],0x0 JZ 0x001a2f76 MOV RAX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x38],EAX JMP 0x001a2f7d LAB_001a2f76: XOR EAX,EAX MOV dword ptr [RBP + -0x38],EAX JMP 0x001a2f7d LAB_001a2f7d: MOV EAX,dword ptr [RBP + -0x38] MOV dword ptr [RBP + -0x34],EAX MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x3c],EAX TEST EAX,EAX JZ 0x001a2faf JMP 0x001a2f8f LAB_001a2f8f: MOV EAX,dword ptr [RBP + -0x3c] SUB EAX,0x8 JZ 0x001a2fdc JMP 0x001a2f99 LAB_001a2f99: MOV EAX,dword ptr [RBP + -0x3c] SUB EAX,0x9 JZ 0x001a2fe7 JMP 0x001a2fa3 LAB_001a2fa3: MOV EAX,dword ptr [RBP + -0x3c] SUB EAX,0x12d JZ 0x001a2ff2 JMP 0x001a300e LAB_001a2faf: MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x7a8] MOV R8,qword ptr [RAX + 0xa0] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x18] MOV EDI,0x1 LEA RSI,[0x1b49dc] MOV AL,0x0 CALL R8 JMP 0x001a3010 LAB_001a2fdc: MOV RDI,qword ptr [RBP + -0x28] CALL 0x001a4980 JMP 0x001a3010 LAB_001a2fe7: MOV RDI,qword ptr [RBP + -0x28] CALL 0x001a49b0 JMP 0x001a3010 LAB_001a2ff2: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x1b49f5] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x001a4a70 MOV dword ptr [RBP + -0x4],EAX JMP 0x001a3017 LAB_001a300e: JMP 0x001a3010 LAB_001a3010: MOV dword ptr [RBP + -0x4],0x0 LAB_001a3017: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
int4 cs_enter(long param_1,int8 param_2,int8 param_3) { long lVar1; int4 uVar2; int *piVar3; int local_40; lVar1 = *(long *)(param_1 + 0x140); piVar3 = (int *)cs_file_sec(param_2,param_3); if (piVar3 == (int *)0x0) { local_40 = 0; } else { local_40 = *piVar3; } if (local_40 == 0) { (**(code **)(*(long *)(lVar1 + 0x7a8) + 0xa0))(1,"Unknown LDML tag: \'%.*s\'",param_3,param_2); } else if (local_40 == 8) { my_charset_file_reset_charset(lVar1); } else if (local_40 == 9) { my_charset_file_reset_collation(lVar1); } else if (local_40 == 0x12d) { uVar2 = tailoring_append(param_1,&DAT_001b49f5,0); return uVar2; } return 0; }
23,550
minja::Value::to_str[abi:cxx11]() const
monkey531[P]llama/common/minja.hpp
std::string to_str() const { if (is_string()) return get<std::string>(); if (is_number_integer()) return std::to_string(get<int64_t>()); if (is_number_float()) return std::to_string(get<double>()); if (is_boolean()) return get<bool>() ? "True" : "False"; if (is_null()) return "None"; return dump(); }
O2
cpp
minja::Value::to_str[abi:cxx11]() const: pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movzbl 0x40(%rsi), %eax cmpl $0x3, %eax jne 0x70d3d movq %rbx, %rdi movq %r14, %rsi callq 0x64452 jmp 0x70dcb leal -0x5(%rax), %ecx cmpb $0x1, %cl ja 0x70d5a movq %r14, %rdi callq 0x63866 movq %rbx, %rdi movq %rax, %rsi callq 0x71646 jmp 0x70dcb cmpl $0x4, %eax je 0x70d76 cmpl $0x7, %eax jne 0x70d99 movq %r14, %rdi callq 0x6393a movq %rbx, %rdi callq 0x716a6 jmp 0x70dcb movq %r14, %rdi callq 0x6439c leaq 0x43247(%rip), %rcx # 0xb3fcc leaq 0x43245(%rip), %rsi # 0xb3fd1 testb %al, %al cmovneq %rcx, %rsi leaq 0x7(%rsp), %rdx jmp 0x70db1 movq %r14, %rdi callq 0x64008 testb %al, %al je 0x70dbb leaq 0x43640(%rip), %rsi # 0xb43ec leaq 0x6(%rsp), %rdx movq %rbx, %rdi callq 0x273be jmp 0x70dcb pushq $-0x1 popq %rdx movq %rbx, %rdi movq %r14, %rsi xorl %ecx, %ecx callq 0x63a1e movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_ZNK5minja5Value6to_strB5cxx11Ev: push r14 push rbx push rax mov r14, rsi mov rbx, rdi movzx eax, byte ptr [rsi+40h] cmp eax, 3 jnz short loc_70D3D mov rdi, rbx mov rsi, r14 call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void) jmp loc_70DCB loc_70D3D: lea ecx, [rax-5] cmp cl, 1 ja short loc_70D5A mov rdi, r14 call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void) mov rdi, rbx; this mov rsi, rax; __int64 call _ZNSt7__cxx119to_stringEl; std::to_string(long) jmp short loc_70DCB loc_70D5A: cmp eax, 4 jz short loc_70D76 cmp eax, 7 jnz short loc_70D99 mov rdi, r14 call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) mov rdi, rbx; this call _ZNSt7__cxx119to_stringEd; std::to_string(double) jmp short loc_70DCB loc_70D76: mov rdi, r14 call _ZNK5minja5Value3getIbEET_v; minja::Value::get<bool>(void) lea rcx, aTrue_0; "True" lea rsi, aFalse; "False" test al, al cmovnz rsi, rcx lea rdx, [rsp+18h+var_11] jmp short loc_70DB1 loc_70D99: mov rdi, r14; this call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void) test al, al jz short loc_70DBB lea rsi, aNone_0; "None" lea rdx, [rsp+18h+var_12] loc_70DB1: mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short loc_70DCB loc_70DBB: push 0FFFFFFFFFFFFFFFFh pop rdx mov rdi, rbx mov rsi, r14 xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) loc_70DCB: mov rax, rbx add rsp, 8 pop rbx pop r14 retn
std::__cxx11 * minja::Value::to_str[abi:cxx11](std::__cxx11 *this, minja::Value *a2, double a3) { int v3; // eax long long v4; // rax char v5; // al const char *v6; // rsi v3 = *((unsigned __int8 *)a2 + 64); if ( v3 == 3 ) { minja::Value::get<std::string>((long long)this, a2); } else { if ( (unsigned __int8)(v3 - 5) > 1u ) { if ( v3 == 4 ) { v5 = minja::Value::get<bool>(a2); v6 = "False"; if ( v5 ) v6 = "True"; } else { if ( v3 == 7 ) { minja::Value::get<double>(a2); std::to_string(this, a3); return this; } if ( !minja::Value::is_null(a2) ) { minja::Value::dump[abi:cxx11]((long long)this, (long long)a2, 0xFFFFFFFF, 0); return this; } v6 = "None"; } std::string::basic_string<std::allocator<char>>(this, (long long)v6); return this; } v4 = minja::Value::get<long>(a2); std::to_string(this, v4); } return this; }
to_str[abi:cxx11]: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOVZX EAX,byte ptr [RSI + 0x40] CMP EAX,0x3 JNZ 0x00170d3d MOV RDI,RBX MOV RSI,R14 CALL 0x00164452 JMP 0x00170dcb LAB_00170d3d: LEA ECX,[RAX + -0x5] CMP CL,0x1 JA 0x00170d5a MOV RDI,R14 CALL 0x00163866 MOV RDI,RBX MOV RSI,RAX CALL 0x00171646 JMP 0x00170dcb LAB_00170d5a: CMP EAX,0x4 JZ 0x00170d76 CMP EAX,0x7 JNZ 0x00170d99 MOV RDI,R14 CALL 0x0016393a MOV RDI,RBX CALL 0x001716a6 JMP 0x00170dcb LAB_00170d76: MOV RDI,R14 CALL 0x0016439c LEA RCX,[0x1b3fcc] LEA RSI,[0x1b3fd1] TEST AL,AL CMOVNZ RSI,RCX LEA RDX,[RSP + 0x7] JMP 0x00170db1 LAB_00170d99: MOV RDI,R14 CALL 0x00164008 TEST AL,AL JZ 0x00170dbb LEA RSI,[0x1b43ec] LEA RDX,[RSP + 0x6] LAB_00170db1: MOV RDI,RBX CALL 0x001273be JMP 0x00170dcb LAB_00170dbb: PUSH -0x1 POP RDX MOV RDI,RBX MOV RSI,R14 XOR ECX,ECX CALL 0x00163a1e LAB_00170dcb: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* minja::Value::to_str[abi:cxx11]() const */ void minja::Value::to_str_abi_cxx11_(void) { Value VVar1; bool bVar2; char cVar3; long lVar4; allocator *paVar5; Value *in_RSI; char *pcVar6; __cxx11 *in_RDI; double dVar7; allocator local_12; allocator local_11; VVar1 = in_RSI[0x40]; if (VVar1 == (Value)0x3) { get<std::__cxx11::string>(); } else if ((byte)((char)VVar1 - 5U) < 2) { lVar4 = get<long>(in_RSI); std::__cxx11::to_string(in_RDI,lVar4); } else { if (VVar1 == (Value)0x4) { bVar2 = get<bool>(in_RSI); pcVar6 = "False"; if (bVar2) { pcVar6 = "True"; } paVar5 = &local_11; } else { if (VVar1 == (Value)0x7) { dVar7 = get<double>(in_RSI); std::__cxx11::to_string(dVar7); return; } cVar3 = is_null(in_RSI); if (cVar3 == '\0') { dump_abi_cxx11_((int)in_RDI,SUB81(in_RSI,0)); return; } pcVar6 = "None"; paVar5 = &local_12; } std::__cxx11::string::string<std::allocator<char>>((string *)in_RDI,pcVar6,paVar5); } return; }
23,551
httplib::Server::process_and_close_socket(int)
hkr04[P]cpp-mcp/common/httplib.h
inline bool Server::process_and_close_socket(socket_t sock) { std::string remote_addr; int remote_port = 0; detail::get_remote_ip_and_port(sock, remote_addr, remote_port); std::string local_addr; int local_port = 0; detail::get_local_ip_and_port(sock, local_addr, local_port); auto ret = detail::process_server_socket( svr_sock_, sock, keep_alive_max_count_, keep_alive_timeout_sec_, read_timeout_sec_, read_timeout_usec_, write_timeout_sec_, write_timeout_usec_, [&](Stream &strm, bool close_connection, bool &connection_closed) { return process_request(strm, remote_addr, remote_port, local_addr, local_port, close_connection, connection_closed, nullptr); }); detail::shutdown_socket(sock); detail::close_socket(sock); return ret; }
O1
c
httplib::Server::process_and_close_socket(int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x508, %rsp # imm = 0x508 movl %esi, %ebx movq %rdi, %r14 leaq 0x50(%rsp), %rax movq %rax, -0x10(%rax) movq $0x0, -0x8(%rax) movb $0x0, (%rax) leaq 0x60(%rsp), %rbp movl $0x0, (%rbp) leaq 0x40(%rsp), %rsi movl %ebx, %edi movq %rbp, %rdx callq 0x2e2d1 leaq 0x30(%rsp), %rax movq %rax, -0x10(%rax) movq $0x0, -0x8(%rax) movb $0x0, (%rax) movl $0x0, 0x14(%rsp) leaq 0x18(%rsp), %r13 movl $0x80, (%r13) leaq 0x80(%rsp), %rsi movl %ebx, %edi movq %r13, %rdx callq 0xa5d0 testl %eax, %eax je 0x1f201 movq 0x30(%r14), %r15 movq 0x38(%r14), %r12 movq 0x40(%r14), %rax movq 0x48(%r14), %rcx movq 0x50(%r14), %rdx movq 0x58(%r14), %rsi movq %r14, 0x80(%rsp) leaq 0x40(%rsp), %rdi movq %rdi, 0x88(%rsp) movq %rbp, 0x90(%rsp) leaq 0x20(%rsp), %rdi movq %rdi, 0x98(%rsp) leaq 0x14(%rsp), %rdi movq %rdi, 0xa0(%rsp) leaq 0x64(%rsp), %rdi movl %ebx, (%rdi) movq %rax, 0x18(%rsp) leaq 0x78(%rsp), %rax movq %rcx, (%rax) leaq 0x70(%rsp), %rcx movq %rdx, (%rcx) leaq 0x68(%rsp), %rdx movq %rsi, (%rdx) movq %rdi, 0x100(%rsp) movq %r13, 0x108(%rsp) movq %rax, 0x110(%rsp) movq %rcx, 0x118(%rsp) movq %rdx, 0x120(%rsp) leaq 0x80(%rsp), %rax movq %rax, 0x128(%rsp) testq %r15, %r15 je 0x1f1a0 addq $0x28, %r14 movq %r14, %rdi movl %ebx, %esi movq %r12, %rdx callq 0x2e3d8 testb %al, %al je 0x1f1a0 leaq 0x13(%rsp), %r13 xorl %esi, %esi cmpq $0x1, %r15 sete %sil movb $0x0, 0x13(%rsp) leaq 0x100(%rsp), %rdi movq %r13, %rdx callq 0x2e680 movl %eax, %ebp testb %al, %al je 0x1f1a2 testb $0x1, 0x13(%rsp) jne 0x1f1a2 movzbl %bpl, %eax subq %rax, %r15 je 0x1f1a2 movq %r14, %rdi movl %ebx, %esi movq %r12, %rdx callq 0x2e3d8 testb %al, %al jne 0x1f158 jmp 0x1f1a2 xorl %ebp, %ebp movl %ebx, %edi movl $0x2, %esi callq 0xa820 movl %ebx, %edi callq 0xab50 movq 0x20(%rsp), %rdi leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0x1f1d1 movq 0x30(%rsp), %rsi incq %rsi callq 0xa630 movq 0x40(%rsp), %rdi leaq 0x50(%rsp), %rax cmpq %rax, %rdi je 0x1f1ed movq 0x50(%rsp), %rsi incq %rsi callq 0xa630 movl %ebp, %eax addq $0x508, %rsp # imm = 0x508 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movzwl 0x80(%rsp), %eax orl $0x8, %eax cmpl $0xa, %eax jne 0x1f08e movl 0x18(%rsp), %r12d leaq 0x80(%rsp), %r15 movzwl 0x2(%r15), %eax rolw $0x8, %ax movzwl %ax, %eax movl %eax, 0x14(%rsp) leaq 0x100(%rsp), %rdi movl $0x401, %edx # imm = 0x401 xorl %esi, %esi callq 0xa360 movl $0x1, (%rsp) movq %r15, %rdi movl %r12d, %esi leaq 0x100(%rsp), %rdx movl $0x401, %ecx # imm = 0x401 xorl %r8d, %r8d xorl %r9d, %r9d callq 0xa3c0 testl %eax, %eax jne 0x1f08e leaq 0x20(%rsp), %rax movq 0x8(%rax), %r12 leaq 0x100(%rsp), %r15 movq %r15, %rdi callq 0xa2b0 leaq 0x20(%rsp), %rdi xorl %esi, %esi movq %r12, %rdx movq %r15, %rcx movq %rax, %r8 callq 0xa900 jmp 0x1f08e jmp 0x1f2af movq %rax, %rbx jmp 0x1f2ce jmp 0x1f2af movq %rax, %rbx movq 0x20(%rsp), %rdi leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0x1f2ce movq 0x30(%rsp), %rsi incq %rsi callq 0xa630 movq 0x40(%rsp), %rdi leaq 0x50(%rsp), %rax cmpq %rax, %rdi je 0x1f2ea movq 0x50(%rsp), %rsi incq %rsi callq 0xa630 movq %rbx, %rdi callq 0xaa60
_ZN7httplib6Server24process_and_close_socketEi: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 508h mov ebx, esi mov r14, rdi lea rax, [rsp+538h+var_4E8] mov [rax-10h], rax mov qword ptr [rax-8], 0 mov byte ptr [rax], 0 lea rbp, [rsp+538h+var_4D8] mov dword ptr [rbp+0], 0 lea rsi, [rsp+538h+var_4F8] mov edi, ebx mov rdx, rbp call _ZN7httplib6detail22get_remote_ip_and_portEiRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERi; httplib::detail::get_remote_ip_and_port(int,std::string &,int &) lea rax, [rsp+538h+var_508] mov [rax-10h], rax mov qword ptr [rax-8], 0 mov byte ptr [rax], 0 mov [rsp+538h+var_524], 0 lea r13, [rsp+538h+var_520] mov dword ptr [r13+0], 80h lea rsi, [rsp+538h+var_4B8] mov edi, ebx mov rdx, r13 call _getsockname test eax, eax jz loc_1F201 loc_1F08E: mov r15, [r14+30h] mov r12, [r14+38h] mov rax, [r14+40h] mov rcx, [r14+48h] mov rdx, [r14+50h] mov rsi, [r14+58h] mov [rsp+538h+var_4B8], r14 lea rdi, [rsp+538h+var_4F8] mov [rsp+538h+var_4B0], rdi mov [rsp+538h+var_4A8], rbp lea rdi, [rsp+538h+var_518] mov [rsp+538h+var_4A0], rdi lea rdi, [rsp+538h+var_524] mov [rsp+538h+var_498], rdi lea rdi, [rsp+538h+var_4D4] mov [rdi], ebx mov [rsp+538h+var_520], rax lea rax, [rsp+538h+var_4C0] mov [rax], rcx lea rcx, [rsp+538h+var_4C8] mov [rcx], rdx lea rdx, [rsp+538h+var_4D0] mov [rdx], rsi mov [rsp+538h+var_438], rdi mov [rsp+538h+var_430], r13 mov [rsp+538h+var_428], rax mov [rsp+538h+var_420], rcx mov [rsp+538h+var_418], rdx lea rax, [rsp+538h+var_4B8] mov [rsp+538h+var_410], rax test r15, r15 jz short loc_1F1A0 add r14, 28h ; '(' mov rdi, r14 mov esi, ebx mov rdx, r12 call _ZN7httplib6detail10keep_aliveERKSt6atomicIiEil; httplib::detail::keep_alive(std::atomic<int> const&,int,long) test al, al jz short loc_1F1A0 lea r13, [rsp+538h+var_525] loc_1F158: xor esi, esi cmp r15, 1 setz sil mov [rsp+538h+var_525], 0 lea rdi, [rsp+538h+var_438] mov rdx, r13 call _ZZN7httplib6detail21process_server_socketIZNS_6Server24process_and_close_socketEiEUlRNS_6StreamEbRbE_EEbRKSt6atomicIiEimlllllT_ENKUlbS5_E_clEbS5_; httplib::detail::process_server_socket<httplib::Server::process_and_close_socket(int)::{lambda(httplib::Stream &,bool,bool &)#1}>(std::atomic<int> const&,int,ulong,long,long,long,long,long,httplib::Server::process_and_close_socket(int)::{lambda(httplib::Stream &,bool,bool &)#1})::{lambda(bool,bool &)#1}::operator()(bool,bool &) mov ebp, eax test al, al jz short loc_1F1A2 test [rsp+538h+var_525], 1 jnz short loc_1F1A2 movzx eax, bpl sub r15, rax jz short loc_1F1A2 mov rdi, r14 mov esi, ebx mov rdx, r12 call _ZN7httplib6detail10keep_aliveERKSt6atomicIiEil; httplib::detail::keep_alive(std::atomic<int> const&,int,long) test al, al jnz short loc_1F158 jmp short loc_1F1A2 loc_1F1A0: xor ebp, ebp loc_1F1A2: mov edi, ebx mov esi, 2 call _shutdown mov edi, ebx call _close mov rdi, [rsp+538h+var_518]; void * lea rax, [rsp+538h+var_508] cmp rdi, rax jz short loc_1F1D1 mov rsi, [rsp+538h+var_508] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1F1D1: mov rdi, [rsp+538h+var_4F8]; void * lea rax, [rsp+538h+var_4E8] cmp rdi, rax jz short loc_1F1ED mov rsi, [rsp+538h+var_4E8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1F1ED: mov eax, ebp add rsp, 508h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1F201: movzx eax, word ptr [rsp+538h+var_4B8] or eax, 8 cmp eax, 0Ah jnz loc_1F08E mov r12d, dword ptr [rsp+538h+var_520] lea r15, [rsp+538h+var_4B8] movzx eax, word ptr [r15+2] rol ax, 8 movzx eax, ax mov [rsp+538h+var_524], eax lea rdi, [rsp+538h+var_438] mov edx, 401h xor esi, esi call _memset mov [rsp+538h+var_538], 1 mov rdi, r15 mov esi, r12d lea rdx, [rsp+538h+var_438] mov ecx, 401h xor r8d, r8d xor r9d, r9d call _getnameinfo test eax, eax jnz loc_1F08E lea rax, [rsp+538h+var_518] mov r12, [rax+8] lea r15, [rsp+538h+var_438] mov rdi, r15 call _strlen lea rdi, [rsp+538h+var_518] xor esi, esi mov rdx, r12 mov rcx, r15 mov r8, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) jmp loc_1F08E jmp short loc_1F2AF mov rbx, rax jmp short loc_1F2CE jmp short $+2 loc_1F2AF: mov rbx, rax mov rdi, [rsp+arg_18]; void * lea rax, [rsp+arg_28] cmp rdi, rax jz short loc_1F2CE mov rsi, [rsp+arg_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1F2CE: mov rdi, [rsp+arg_38]; void * lea rax, [rsp+arg_48] cmp rdi, rax jz short loc_1F2EA mov rsi, [rsp+arg_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1F2EA: mov rdi, rbx call __Unwind_Resume
long long httplib::Server::process_and_close_socket(httplib::Server *this, unsigned int a2) { long long v3; // r15 long long v4; // r12 long long v5; // rax long long v6; // rcx long long v7; // rdx long long v8; // rsi unsigned int v9; // ebp unsigned int v11; // r12d long long v12; // r12 long long v13; // rax char v14; // [rsp+13h] [rbp-525h] BYREF int v15; // [rsp+14h] [rbp-524h] BYREF long long v16; // [rsp+18h] [rbp-520h] BYREF void *v17; // [rsp+20h] [rbp-518h] BYREF long long v18; // [rsp+28h] [rbp-510h] _QWORD v19[2]; // [rsp+30h] [rbp-508h] BYREF void *v20[2]; // [rsp+40h] [rbp-4F8h] BYREF _QWORD v21[2]; // [rsp+50h] [rbp-4E8h] BYREF int v22; // [rsp+60h] [rbp-4D8h] BYREF unsigned int v23; // [rsp+64h] [rbp-4D4h] BYREF long long v24; // [rsp+68h] [rbp-4D0h] BYREF long long v25; // [rsp+70h] [rbp-4C8h] BYREF long long v26; // [rsp+78h] [rbp-4C0h] BYREF _QWORD v27[16]; // [rsp+80h] [rbp-4B8h] BYREF _QWORD v28[135]; // [rsp+100h] [rbp-438h] BYREF v20[0] = v21; v20[1] = 0LL; LOBYTE(v21[0]) = 0; v22 = 0; httplib::detail::get_remote_ip_and_port(a2); v17 = v19; v18 = 0LL; LOBYTE(v19[0]) = 0; v15 = 0; LODWORD(v16) = 128; if ( !(unsigned int)getsockname(a2, v27, &v16) && (LOWORD(v27[0]) | 8) == 0xA ) { v11 = v16; v15 = (unsigned __int16)__ROL2__(WORD1(v27[0]), 8); memset(v28, 0LL, 1025LL); if ( !(unsigned int)getnameinfo(v27, v11, v28, 1025LL, 0LL, 0LL, 1) ) { v12 = v18; v13 = strlen(v28); std::string::_M_replace(&v17, 0LL, v12, v28, v13); } } v3 = *((_QWORD *)this + 6); v4 = *((_QWORD *)this + 7); v5 = *((_QWORD *)this + 8); v6 = *((_QWORD *)this + 9); v7 = *((_QWORD *)this + 10); v8 = *((_QWORD *)this + 11); v27[0] = this; v27[1] = v20; v27[2] = &v22; v27[3] = &v17; v27[4] = &v15; v23 = a2; v16 = v5; v26 = v6; v25 = v7; v24 = v8; v28[0] = &v23; v28[1] = &v16; v28[2] = &v26; v28[3] = &v25; v28[4] = &v24; v28[5] = v27; if ( v3 && (unsigned __int8)httplib::detail::keep_alive((char *)this + 40, a2, v4) ) { do { v14 = 0; v9 = httplib::detail::process_server_socket<httplib::Server::process_and_close_socket(int)::{lambda(httplib::Stream &,bool,bool &)#1}>(std::atomic<int> const&,int,unsigned long,long,long,long,long,long,httplib::Server::process_and_close_socket(int)::{lambda(httplib::Stream &,bool,bool &)#1})::{lambda(bool,bool &)#1}::operator()( v28, v3 == 1, &v14); if ( !(_BYTE)v9 ) break; if ( (v14 & 1) != 0 ) break; v3 -= (unsigned __int8)v9; if ( !v3 ) break; } while ( (unsigned __int8)httplib::detail::keep_alive((char *)this + 40, a2, v4) ); } else { v9 = 0; } shutdown(a2, 2LL); close(a2); if ( v17 != v19 ) operator delete(v17, v19[0] + 1LL); if ( v20[0] != v21 ) operator delete(v20[0], v21[0] + 1LL); return v9; }
process_and_close_socket: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x508 MOV EBX,ESI MOV R14,RDI LEA RAX,[RSP + 0x50] MOV qword ptr [RAX + -0x10],RAX MOV qword ptr [RAX + -0x8],0x0 MOV byte ptr [RAX],0x0 LEA RBP,[RSP + 0x60] MOV dword ptr [RBP],0x0 LAB_0011f03c: LEA RSI,[RSP + 0x40] MOV EDI,EBX MOV RDX,RBP CALL 0x0012e2d1 LEA RAX,[RSP + 0x30] MOV qword ptr [RAX + -0x10],RAX MOV qword ptr [RAX + -0x8],0x0 MOV byte ptr [RAX],0x0 MOV dword ptr [RSP + 0x14],0x0 LEA R13,[RSP + 0x18] MOV dword ptr [R13],0x80 LEA RSI,[RSP + 0x80] MOV EDI,EBX MOV RDX,R13 CALL 0x0010a5d0 TEST EAX,EAX JZ 0x0011f201 LAB_0011f08e: MOV R15,qword ptr [R14 + 0x30] MOV R12,qword ptr [R14 + 0x38] MOV RAX,qword ptr [R14 + 0x40] MOV RCX,qword ptr [R14 + 0x48] MOV RDX,qword ptr [R14 + 0x50] MOV RSI,qword ptr [R14 + 0x58] MOV qword ptr [RSP + 0x80],R14 LEA RDI,[RSP + 0x40] MOV qword ptr [RSP + 0x88],RDI MOV qword ptr [RSP + 0x90],RBP LEA RDI,[RSP + 0x20] MOV qword ptr [RSP + 0x98],RDI LEA RDI,[RSP + 0x14] MOV qword ptr [RSP + 0xa0],RDI LEA RDI,[RSP + 0x64] MOV dword ptr [RDI],EBX MOV qword ptr [RSP + 0x18],RAX LEA RAX,[RSP + 0x78] MOV qword ptr [RAX],RCX LEA RCX,[RSP + 0x70] MOV qword ptr [RCX],RDX LEA RDX,[RSP + 0x68] MOV qword ptr [RDX],RSI MOV qword ptr [RSP + 0x100],RDI MOV qword ptr [RSP + 0x108],R13 MOV qword ptr [RSP + 0x110],RAX MOV qword ptr [RSP + 0x118],RCX MOV qword ptr [RSP + 0x120],RDX LEA RAX,[RSP + 0x80] MOV qword ptr [RSP + 0x128],RAX TEST R15,R15 JZ 0x0011f1a0 ADD R14,0x28 LAB_0011f142: MOV RDI,R14 MOV ESI,EBX MOV RDX,R12 CALL 0x0012e3d8 TEST AL,AL JZ 0x0011f1a0 LEA R13,[RSP + 0x13] LAB_0011f158: XOR ESI,ESI CMP R15,0x1 SETZ SIL MOV byte ptr [RSP + 0x13],0x0 LAB_0011f167: LEA RDI,[RSP + 0x100] MOV RDX,R13 CALL 0x0012e680 MOV EBP,EAX TEST AL,AL JZ 0x0011f1a2 TEST byte ptr [RSP + 0x13],0x1 JNZ 0x0011f1a2 MOVZX EAX,BPL SUB R15,RAX JZ 0x0011f1a2 MOV RDI,R14 MOV ESI,EBX MOV RDX,R12 CALL 0x0012e3d8 TEST AL,AL JNZ 0x0011f158 JMP 0x0011f1a2 LAB_0011f1a0: XOR EBP,EBP LAB_0011f1a2: MOV EDI,EBX MOV ESI,0x2 CALL 0x0010a820 LAB_0011f1ae: MOV EDI,EBX CALL 0x0010ab50 LAB_0011f1b5: MOV RDI,qword ptr [RSP + 0x20] LEA RAX,[RSP + 0x30] CMP RDI,RAX JZ 0x0011f1d1 MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x0010a630 LAB_0011f1d1: MOV RDI,qword ptr [RSP + 0x40] LEA RAX,[RSP + 0x50] CMP RDI,RAX JZ 0x0011f1ed MOV RSI,qword ptr [RSP + 0x50] INC RSI CALL 0x0010a630 LAB_0011f1ed: MOV EAX,EBP ADD RSP,0x508 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011f201: MOVZX EAX,word ptr [RSP + 0x80] OR EAX,0x8 CMP EAX,0xa JNZ 0x0011f08e MOV R12D,dword ptr [RSP + 0x18] LEA R15,[RSP + 0x80] MOVZX EAX,word ptr [R15 + 0x2] ROL AX,0x8 MOVZX EAX,AX MOV dword ptr [RSP + 0x14],EAX LEA RDI,[RSP + 0x100] MOV EDX,0x401 XOR ESI,ESI CALL 0x0010a360 LAB_0011f246: MOV dword ptr [RSP],0x1 MOV RDI,R15 MOV ESI,R12D LEA RDX,[RSP + 0x100] MOV ECX,0x401 XOR R8D,R8D XOR R9D,R9D CALL 0x0010a3c0 TEST EAX,EAX JNZ 0x0011f08e LEA RAX,[RSP + 0x20] MOV R12,qword ptr [RAX + 0x8] LEA R15,[RSP + 0x100] MOV RDI,R15 CALL 0x0010a2b0 LEA RDI,[RSP + 0x20] XOR ESI,ESI MOV RDX,R12 MOV RCX,R15 MOV R8,RAX CALL 0x0010a900 LAB_0011f2a1: JMP 0x0011f08e
/* httplib::Server::process_and_close_socket(int) */ ulong __thiscall httplib::Server::process_and_close_socket(Server *this,int param_1) { long lVar1; socklen_t __salen; char *pcVar2; char cVar3; int iVar4; uint uVar5; ulong uVar6; long lVar7; bool local_525; uint local_524; int8 local_520; int1 *local_518; char *local_510; int1 local_508; int7 uStack_507; int1 *local_4f8; int8 local_4f0; int1 local_4e8; int7 uStack_4e7; int local_4d8; int local_4d4; int8 local_4d0; int8 local_4c8; int8 local_4c0; int1 local_4b8 [16]; int *local_4a8; int1 **local_4a0; uint *local_498; int *local_438; socklen_t *local_430; int8 *local_428; int8 *local_420; int8 *local_418; int1 *local_410; local_4f8 = &local_4e8; local_4f0 = 0; local_4e8 = 0; local_4d8 = 0; /* try { // try from 0011f03c to 0011f04a has its CatchHandler @ 0011f2a8 */ detail::get_remote_ip_and_port(param_1,(string *)&local_4f8,&local_4d8); local_518 = &local_508; local_510 = (char *)0x0; local_508 = 0; local_524 = 0; local_520 = CONCAT44(local_520._4_4_,0x80); iVar4 = getsockname(param_1,(sockaddr *)local_4b8,(socklen_t *)&local_520); if ((iVar4 == 0) && ((local_4b8._0_4_ & 0xffff | 8) == 10)) { __salen = (socklen_t)local_520; local_524 = (uint)(ushort)(local_4b8._2_2_ << 8 | (ushort)local_4b8._2_2_ >> 8); memset(&local_438,0,0x401); /* try { // try from 0011f246 to 0011f2a0 has its CatchHandler @ 0011f2a6 */ iVar4 = getnameinfo((sockaddr *)local_4b8,__salen,(char *)&local_438,0x401,(char *)0x0,0,1); pcVar2 = local_510; if (iVar4 == 0) { strlen((char *)&local_438); std::__cxx11::string::_M_replace((ulong)&local_518,0,pcVar2,(ulong)&local_438); } } lVar7 = *(long *)(this + 0x30); lVar1 = *(long *)(this + 0x38); local_520 = *(int8 *)(this + 0x40); local_4c0 = *(int8 *)(this + 0x48); local_4c8 = *(int8 *)(this + 0x50); local_4d0 = *(int8 *)(this + 0x58); local_4b8._8_8_ = &local_4f8; local_4a0 = &local_518; local_498 = &local_524; local_438 = &local_4d4; local_428 = &local_4c0; local_420 = &local_4c8; local_418 = &local_4d0; local_410 = local_4b8; local_4d4 = param_1; local_4b8._0_8_ = this; local_4a8 = &local_4d8; local_430 = (socklen_t *)&local_520; if (lVar7 != 0) { /* try { // try from 0011f142 to 0011f14e has its CatchHandler @ 0011f2ad */ cVar3 = detail::keep_alive((atomic *)(this + 0x28),param_1,lVar1); if (cVar3 != '\0') { do { local_525 = false; /* try { // try from 0011f167 to 0011f199 has its CatchHandler @ 0011f2af */ uVar5 = detail:: process_server_socket<httplib::Server::process_and_close_socket(int)::{lambda(httplib::Stream&,bool,bool&)#1}>(std::atomic<int>const&,int,unsigned_long,long,long,long,long,long,httplib::Server::process_and_close_socket(int)::{lambda(httplib::Stream&,bool,bool&)#1}) ::{lambda(bool,bool&)#1}::operator() ((_lambda_bool_bool___1_ *)&local_438,lVar7 == 1,&local_525); uVar6 = (ulong)uVar5; if ((((char)uVar5 == '\0') || ((local_525 & 1U) != 0)) || (lVar7 = lVar7 - (uVar6 & 0xff), lVar7 == 0)) break; cVar3 = detail::keep_alive((atomic *)(this + 0x28),param_1,lVar1); } while (cVar3 != '\0'); goto LAB_0011f1a2; } } uVar6 = 0; LAB_0011f1a2: shutdown(param_1,2); /* try { // try from 0011f1ae to 0011f1b4 has its CatchHandler @ 0011f2ad */ close(param_1); if (local_518 != &local_508) { operator_delete(local_518,CONCAT71(uStack_507,local_508) + 1); } if (local_4f8 != &local_4e8) { operator_delete(local_4f8,CONCAT71(uStack_4e7,local_4e8) + 1); } return uVar6; }
23,552
nlohmann::json_abi_v3_11_2::detail::lexer_base<nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>>::token_type_name(nlohmann::json_abi_v3_11_2::detail::lexer_base<nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>>::token_type)
7CodeWizard[P]stablediffusion/thirdparty/json.hpp
static const char* token_type_name(const token_type t) noexcept { switch (t) { case token_type::uninitialized: return "<uninitialized>"; case token_type::literal_true: return "true literal"; case token_type::literal_false: return "false literal"; case token_type::literal_null: return "null literal"; case token_type::value_string: return "string literal"; case token_type::value_unsigned: case token_type::value_integer: case token_type::value_float: return "number literal"; case token_type::begin_array: return "'['"; case token_type::begin_object: return "'{'"; case token_type::end_array: return "']'"; case token_type::end_object: return "'}'"; case token_type::name_separator: return "':'"; case token_type::value_separator: return "','"; case token_type::parse_error: return "<parse error>"; case token_type::end_of_input: return "end of input"; case token_type::literal_or_value: return "'[', '{', or a literal"; // LCOV_EXCL_START default: // catch non-enum values return "unknown token"; // LCOV_EXCL_STOP } }
O1
cpp
nlohmann::json_abi_v3_11_2::detail::lexer_base<nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>>::token_type_name(nlohmann::json_abi_v3_11_2::detail::lexer_base<nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>>::token_type): cmpl $0x10, %edi ja 0x773b0 movl %edi, %eax leaq 0x49580(%rip), %rcx # 0xc0928 movslq (%rcx,%rax,4), %rax addq %rcx, %rax retq leaq 0x4be88(%rip), %rax # 0xc323f retq
_ZN8nlohmann16json_abi_v3_11_26detail10lexer_baseINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEEE15token_type_nameENSG_10token_typeE: cmp edi, 10h ja short loc_773B0 mov eax, edi lea rcx, unk_C0928 movsxd rax, dword ptr [rcx+rax*4] add rax, rcx retn loc_773B0: lea rax, aUnknownToken; "unknown token" retn
const char * nlohmann::json_abi_v3_11_2::detail::lexer_base<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>>::token_type_name( unsigned int a1) { if ( a1 > 0x10 ) return "unknown token"; else return (char *)dword_C0928 + dword_C0928[a1]; }
23,553
nlohmann::json_abi_v3_11_2::detail::lexer_base<nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>>::token_type_name(nlohmann::json_abi_v3_11_2::detail::lexer_base<nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>>::token_type)
7CodeWizard[P]stablediffusion/thirdparty/json.hpp
static const char* token_type_name(const token_type t) noexcept { switch (t) { case token_type::uninitialized: return "<uninitialized>"; case token_type::literal_true: return "true literal"; case token_type::literal_false: return "false literal"; case token_type::literal_null: return "null literal"; case token_type::value_string: return "string literal"; case token_type::value_unsigned: case token_type::value_integer: case token_type::value_float: return "number literal"; case token_type::begin_array: return "'['"; case token_type::begin_object: return "'{'"; case token_type::end_array: return "']'"; case token_type::end_object: return "'}'"; case token_type::name_separator: return "':'"; case token_type::value_separator: return "','"; case token_type::parse_error: return "<parse error>"; case token_type::end_of_input: return "end of input"; case token_type::literal_or_value: return "'[', '{', or a literal"; // LCOV_EXCL_START default: // catch non-enum values return "unknown token"; // LCOV_EXCL_STOP } }
O2
cpp
nlohmann::json_abi_v3_11_2::detail::lexer_base<nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>>::token_type_name(nlohmann::json_abi_v3_11_2::detail::lexer_base<nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>>::token_type): cmpl $0x10, %edi ja 0x534e6 movl %edi, %eax leaq 0x4935e(%rip), %rcx # 0x9c83c movslq (%rcx,%rax,4), %rax addq %rcx, %rax retq leaq 0x4bc62(%rip), %rax # 0x9f14f retq
_ZN8nlohmann16json_abi_v3_11_26detail10lexer_baseINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEEE15token_type_nameENSG_10token_typeE: cmp edi, 10h ja short loc_534E6 mov eax, edi lea rcx, unk_9C83C movsxd rax, dword ptr [rcx+rax*4] add rax, rcx retn loc_534E6: lea rax, aUnknownToken; "unknown token" retn
const char * nlohmann::json_abi_v3_11_2::detail::lexer_base<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>>::token_type_name( unsigned int a1) { if ( a1 > 0x10 ) return "unknown token"; else return (char *)dword_9C83C + dword_9C83C[a1]; }
token_type_name: CMP EDI,0x10 JA 0x001534e6 MOV EAX,EDI LEA RCX,[0x19c83c] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX RET LAB_001534e6: LEA RAX,[0x19f14f] RET
/* nlohmann::json_abi_v3_11_2::detail::lexer_base<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> > > >::token_type_name(nlohmann::json_abi_v3_11_2::detail::lexer_base<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> > > >::token_type) */ char * nlohmann::json_abi_v3_11_2::detail:: lexer_base<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>>> ::token_type_name(uint param_1) { if (param_1 < 0x11) { return &DAT_0019c83c + *(int *)(&DAT_0019c83c + (ulong)param_1 * 4); } return "unknown token"; }
23,554
translog_flush_wait_for_end
eloqsql/storage/maria/ma_loghandler.c
void translog_flush_wait_for_end(LSN lsn) { DBUG_ENTER("translog_flush_wait_for_end"); DBUG_PRINT("enter", ("LSN: " LSN_FMT, LSN_IN_PARTS(lsn))); mysql_mutex_assert_owner(&log_descriptor.log_flush_lock); while (cmp_translog_addr(log_descriptor.flushed, lsn) < 0) mysql_cond_wait(&log_descriptor.log_flush_cond, &log_descriptor.log_flush_lock); DBUG_VOID_RETURN; }
O3
c
translog_flush_wait_for_end: cmpq %rdi, 0xbb645a(%rip) # 0xbfddf8 jge 0x479ec pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0xbb64fc(%rip), %r14 # 0xbfdeb0 leaq 0xbb64ad(%rip), %r15 # 0xbfde68 cmpq $0x0, 0xbb651d(%rip) # 0xbfdee0 jne 0x479db movq %r14, %rdi movq %r15, %rsi callq 0x29420 cmpq %rbx, 0xbb6421(%rip) # 0xbfddf8 jl 0x479bb jmp 0x479e2 callq 0x2c9f0 jmp 0x479d0 addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
translog_flush_wait_for_end: cmp cs:qword_BFDDF8, rdi jge short locret_479EC push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi lea r14, unk_BFDEB0 lea r15, unk_BFDE68 loc_479BB: cmp cs:qword_BFDEE0, 0 jnz short loc_479DB mov rdi, r14 mov rsi, r15 call _pthread_cond_wait loc_479D0: cmp cs:qword_BFDDF8, rbx jl short loc_479BB jmp short loc_479E2 loc_479DB: call translog_flush_wait_for_end_cold_1 jmp short loc_479D0 loc_479E2: add rsp, 8 pop rbx pop r14 pop r15 pop rbp locret_479EC: retn
long long translog_flush_wait_for_end(void *a1) { long long v1; // rbx long long result; // rax if ( qword_BFDDF8 < (long long)a1 ) { v1 = (long long)a1; do { if ( qword_BFDEE0 ) { result = translog_flush_wait_for_end_cold_1(a1); } else { a1 = &unk_BFDEB0; result = pthread_cond_wait(&unk_BFDEB0, &unk_BFDE68); } } while ( qword_BFDDF8 < v1 ); } return result; }
translog_flush_wait_for_end: CMP qword ptr [0x00cfddf8],RDI JGE 0x001479ec PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI LEA R14,[0xcfdeb0] LEA R15,[0xcfde68] LAB_001479bb: CMP qword ptr [0x00cfdee0],0x0 JNZ 0x001479db MOV RDI,R14 MOV RSI,R15 CALL 0x00129420 LAB_001479d0: CMP qword ptr [0x00cfddf8],RBX JL 0x001479bb JMP 0x001479e2 LAB_001479db: CALL 0x0012c9f0 JMP 0x001479d0 LAB_001479e2: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP LAB_001479ec: RET
void translog_flush_wait_for_end(long param_1) { if (DAT_00cfddf8 < param_1) { do { if (DAT_00cfdee0 == 0) { pthread_cond_wait((pthread_cond_t *)&DAT_00cfdeb0,(pthread_mutex_t *)&DAT_00cfde68); } else { translog_flush_wait_for_end_cold_1(); } } while (DAT_00cfddf8 < param_1); } return; }
23,555
CLI::App::_parse_subcommand(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
MikePodsytnik[P]TCRtrie/build_O3/_deps/cli11-src/include/CLI/impl/App_inl.hpp
CLI11_INLINE bool App::_parse_subcommand(std::vector<std::string> &args) { if(_count_remaining_positionals(/* required */ true) > 0) { _parse_positional(args, false); return true; } auto *com = _find_subcommand(args.back(), true, true); if(com != nullptr) { args.pop_back(); if(!com->silent_) { parsed_subcommands_.push_back(com); } com->_parse(args); auto *parent_app = com->parent_; while(parent_app != this) { parent_app->_trigger_pre_parse(args.size()); if(!com->silent_) { parent_app->parsed_subcommands_.push_back(com); } parent_app = parent_app->parent_; } return true; } if(parent_ == nullptr) throw HorribleError("Subcommand " + args.back() + " missing"); return false; }
O3
cpp
CLI::App::_parse_subcommand(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rsi, %rbx movq %rdi, %r13 movq 0xd8(%rdi), %rax movq 0xe0(%rdi), %rcx cmpq %rcx, %rax je 0x1ee48 xorl %edx, %edx movq (%rax), %rsi cmpq $0x0, 0x90(%rsi) je 0x1ee26 cmpb $0x1, 0x20(%rsi) jne 0x1ee26 movl 0x170(%rsi), %edi imull 0x16c(%rsi), %edi testl %edi, %edi jle 0x1ee26 movq 0x220(%rsi), %r8 subq 0x218(%rsi), %r8 sarq $0x5, %r8 cmpl %r8d, %edi jle 0x1ee26 movl %edi, %esi addq %rsi, %rdx subq %r8, %rdx addq $0x8, %rax cmpq %rcx, %rax jne 0x1ede3 testq %rdx, %rdx je 0x1ee48 movq %r13, %rdi movq %rbx, %rsi xorl %edx, %edx callq 0x2059c movb $0x1, %al jmp 0x1f0c2 movq 0x8(%rbx), %rsi addq $-0x20, %rsi movq %r13, %rdi movl $0x1, %edx movl $0x1, %ecx callq 0x214a6 movq %rax, 0x8(%rsp) testq %rax, %rax setne 0x7(%rsp) je 0x1eec3 movq %rax, %r15 movq 0x8(%rbx), %rax leaq -0x20(%rax), %rcx movq %rcx, 0x8(%rbx) movq -0x20(%rax), %rdi addq $-0x10, %rax cmpq %rax, %rdi je 0x1ee98 movq (%rax), %rsi incq %rsi callq 0x7430 cmpb $0x0, 0x2a1(%r15) jne 0x1ef41 movq 0x1b0(%r13), %rsi cmpq 0x1b8(%r13), %rsi je 0x1ef30 movq %r15, (%rsi) addq $0x8, 0x1b0(%r13) jmp 0x1ef41 cmpq $0x0, 0x2c8(%r13) jne 0x1f0be movl $0x38, %edi callq 0x71d0 movq %rax, %r14 movq 0x8(%rbx), %rdx addq $-0x20, %rdx leaq 0x18a07(%rip), %rsi # 0x378f4 leaq 0x10(%rsp), %rdi callq 0x11e48 leaq 0x18a02(%rip), %rsi # 0x37900 leaq 0x10(%rsp), %rdi callq 0x77e0 leaq 0x68(%rsp), %r15 movq %r15, -0x10(%r15) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx jne 0x1f0d1 movups (%rcx), %xmm0 movups %xmm0, (%r15) jmp 0x1f0de leaq 0x1a8(%r13), %rdi leaq 0x8(%rsp), %rdx callq 0x22a38 movq 0x8(%rsp), %rdi movq %rbx, %rsi callq 0x227a6 movq 0x8(%rsp), %rax movq 0x2c8(%rax), %r15 cmpq %r13, %r15 je 0x1f0be xorps %xmm0, %xmm0 leaq 0x10(%rsp), %r14 movq %r13, 0x50(%rsp) movq %rbx, 0x48(%rsp) cmpb $0x0, 0x4e(%r15) je 0x1f045 cmpb $0x1, 0x4f(%r15) jne 0x1f06f cmpq $0x0, 0x10(%r15) je 0x1f06f movl 0x2a4(%r15), %r12d movq 0x178(%r15), %r13 movq %r13, 0x30(%rsp) movq 0x180(%r15), %rbp movq %rbp, 0x38(%rsp) movq 0x188(%r15), %rbx movq %rbx, 0x40(%rsp) movups %xmm0, 0x178(%r15) movq $0x0, 0x188(%r15) movq %r15, %rdi callq 0x1de46 movl %r12d, 0x2a4(%r15) movb $0x1, 0x4e(%r15) movq 0x188(%r15), %rax movq %rbx, 0x188(%r15) movups 0x178(%r15), %xmm0 movq %r13, 0x178(%r15) movq %rbp, 0x180(%r15) movaps %xmm0, 0x10(%rsp) movq %rax, 0x20(%rsp) xorps %xmm0, %xmm0 movaps %xmm0, 0x30(%rsp) movq $0x0, 0x40(%rsp) movq %r14, %rdi callq 0x19156 leaq 0x30(%rsp), %rdi callq 0x19156 movq 0x48(%rsp), %rbx movq 0x50(%rsp), %r13 jmp 0x1f06c movq 0x8(%rbx), %rax subq (%rbx), %rax movb $0x1, 0x4e(%r15) cmpq $0x0, 0x60(%r15) je 0x1f06f sarq $0x5, %rax leaq 0x50(%r15), %rdi movq %rax, 0x10(%rsp) movq %r14, %rsi callq *0x68(%r15) xorps %xmm0, %xmm0 movq 0x8(%rsp), %rax cmpb $0x0, 0x2a1(%rax) jne 0x1f0ae movq 0x1b0(%r15), %rsi cmpq 0x1b8(%r15), %rsi je 0x1f09a movq %rax, (%rsi) addq $0x8, 0x1b0(%r15) jmp 0x1f0ae leaq 0x1a8(%r15), %rdi leaq 0x8(%rsp), %rdx callq 0x22a38 xorps %xmm0, %xmm0 movq 0x2c8(%r15), %r15 cmpq %r13, %r15 jne 0x1ef75 movb 0x7(%rsp), %al addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rdx, 0x58(%rsp) movq (%rcx), %rdx movq %rdx, 0x68(%rsp) movq 0x8(%rax), %rdx leaq 0x58(%rsp), %rsi movq %rdx, 0x8(%rsi) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movb $0x1, %bpl movq %r14, %rdi callq 0x20f4a xorl %ebp, %ebp leaq 0x2a5c2(%rip), %rsi # 0x496d0 leaq 0xa791(%rip), %rdx # 0x298a6 movq %r14, %rdi callq 0x7750 movq %rax, %rbx movq 0x58(%rsp), %rdi cmpq %r15, %rdi je 0x1f137 movq 0x68(%rsp), %rsi incq %rsi callq 0x7430 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x1f152 movq 0x20(%rsp), %rsi incq %rsi callq 0x7430 testb %bpl, %bpl jne 0x1f17c jmp 0x1f193 movq %rax, %rbx leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x1f17c movq 0x20(%rsp), %rsi incq %rsi callq 0x7430 jmp 0x1f17c movq %rax, %rbx movq %r14, %rdi callq 0x7310 jmp 0x1f193 movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x19156 movq %rbx, %rdi callq 0x7780 nop
_ZN3CLI3App17_parse_subcommandERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov rbx, rsi mov r13, rdi mov rax, [rdi+0D8h] mov rcx, [rdi+0E0h] cmp rax, rcx jz short loc_1EE48 xor edx, edx loc_1EDE3: mov rsi, [rax] cmp qword ptr [rsi+90h], 0 jz short loc_1EE26 cmp byte ptr [rsi+20h], 1 jnz short loc_1EE26 mov edi, [rsi+170h] imul edi, [rsi+16Ch] test edi, edi jle short loc_1EE26 mov r8, [rsi+220h] sub r8, [rsi+218h] sar r8, 5 cmp edi, r8d jle short loc_1EE26 mov esi, edi add rdx, rsi sub rdx, r8 loc_1EE26: add rax, 8 cmp rax, rcx jnz short loc_1EDE3 test rdx, rdx jz short loc_1EE48 mov rdi, r13 mov rsi, rbx xor edx, edx call _ZN3CLI3App17_parse_positionalERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EEb; CLI::App::_parse_positional(std::vector<std::string> &,bool) mov al, 1 jmp loc_1F0C2 loc_1EE48: mov rsi, [rbx+8] add rsi, 0FFFFFFFFFFFFFFE0h mov rdi, r13 mov edx, 1 mov ecx, 1 call _ZNK3CLI3App16_find_subcommandERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbb; CLI::App::_find_subcommand(std::string const&,bool,bool) mov qword ptr [rsp+0A8h+var_A0], rax; int test rax, rax setnz [rsp+0A8h+var_A1] jz short loc_1EEC3 mov r15, rax mov rax, [rbx+8] lea rcx, [rax-20h] mov [rbx+8], rcx mov rdi, [rax-20h]; void * add rax, 0FFFFFFFFFFFFFFF0h cmp rdi, rax jz short loc_1EE98 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1EE98: cmp byte ptr [r15+2A1h], 0 jnz loc_1EF41 mov rsi, [r13+1B0h] cmp rsi, [r13+1B8h] jz short loc_1EF30 mov [rsi], r15 add qword ptr [r13+1B0h], 8 jmp short loc_1EF41 loc_1EEC3: cmp qword ptr [r13+2C8h], 0 jnz loc_1F0BE mov edi, 38h ; '8'; thrown_size call ___cxa_allocate_exception mov r14, rax mov rdx, [rbx+8] add rdx, 0FFFFFFFFFFFFFFE0h lea rsi, aSubcommand_0; "Subcommand " lea rdi, [rsp+0A8h+var_98] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) lea rsi, aMissing; " missing" lea rdi, [rsp+0A8h+var_98] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea r15, [rsp+0A8h+var_40] mov [r15-10h], r15 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jnz loc_1F0D1 movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r15], xmm0 jmp loc_1F0DE loc_1EF30: lea rdi, [r13+1A8h] lea rdx, [rsp+0A8h+var_A0] call _ZNSt6vectorIPN3CLI3AppESaIS2_EE17_M_realloc_insertIJRKS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_; std::vector<CLI::App *>::_M_realloc_insert<CLI::App * const&>(__gnu_cxx::__normal_iterator<CLI::App **,std::vector<CLI::App *>>,CLI::App * const&) loc_1EF41: mov rdi, qword ptr [rsp+0A8h+var_A0]; int mov rsi, rbx call _ZN3CLI3App6_parseERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE; CLI::App::_parse(std::vector<std::string> &) mov rax, qword ptr [rsp+0A8h+var_A0] mov r15, [rax+2C8h] cmp r15, r13 jz loc_1F0BE xorps xmm0, xmm0 lea r14, [rsp+0A8h+var_98] mov [rsp+0A8h+var_58], r13 mov [rsp+0A8h+var_60], rbx loc_1EF75: cmp byte ptr [r15+4Eh], 0 jz loc_1F045 cmp byte ptr [r15+4Fh], 1 jnz loc_1F06F cmp qword ptr [r15+10h], 0 jz loc_1F06F mov r12d, [r15+2A4h] mov r13, [r15+178h] mov qword ptr [rsp+0A8h+var_78], r13 mov rbp, [r15+180h] mov qword ptr [rsp+0A8h+var_78+8], rbp mov rbx, [r15+188h] mov [rsp+0A8h+var_68], rbx movups xmmword ptr [r15+178h], xmm0 mov qword ptr [r15+188h], 0 mov rdi, r15; this call _ZN3CLI3App5clearEv; CLI::App::clear(void) mov [r15+2A4h], r12d mov byte ptr [r15+4Eh], 1 mov rax, [r15+188h] mov [r15+188h], rbx movups xmm0, xmmword ptr [r15+178h] mov [r15+178h], r13 mov [r15+180h], rbp movaps [rsp+0A8h+var_98], xmm0 mov [rsp+0A8h+var_88], rax xorps xmm0, xmm0 movaps [rsp+0A8h+var_78], xmm0 mov [rsp+0A8h+var_68], 0 mov rdi, r14 call _ZNSt6vectorISt4pairIN3CLI6detail10ClassifierENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaISA_EED2Ev; std::vector<std::pair<CLI::detail::Classifier,std::string>>::~vector() lea rdi, [rsp+0A8h+var_78] call _ZNSt6vectorISt4pairIN3CLI6detail10ClassifierENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaISA_EED2Ev; std::vector<std::pair<CLI::detail::Classifier,std::string>>::~vector() mov rbx, [rsp+0A8h+var_60] mov r13, [rsp+0A8h+var_58] jmp short loc_1F06C loc_1F045: mov rax, [rbx+8] sub rax, [rbx] mov byte ptr [r15+4Eh], 1 cmp qword ptr [r15+60h], 0 jz short loc_1F06F sar rax, 5 lea rdi, [r15+50h] mov qword ptr [rsp+0A8h+var_98], rax mov rsi, r14 call qword ptr [r15+68h] loc_1F06C: xorps xmm0, xmm0 loc_1F06F: mov rax, qword ptr [rsp+0A8h+var_A0] cmp byte ptr [rax+2A1h], 0 jnz short loc_1F0AE mov rsi, [r15+1B0h] cmp rsi, [r15+1B8h] jz short loc_1F09A mov [rsi], rax add qword ptr [r15+1B0h], 8 jmp short loc_1F0AE loc_1F09A: lea rdi, [r15+1A8h] lea rdx, [rsp+0A8h+var_A0] call _ZNSt6vectorIPN3CLI3AppESaIS2_EE17_M_realloc_insertIJRKS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_; std::vector<CLI::App *>::_M_realloc_insert<CLI::App * const&>(__gnu_cxx::__normal_iterator<CLI::App **,std::vector<CLI::App *>>,CLI::App * const&) xorps xmm0, xmm0 loc_1F0AE: mov r15, [r15+2C8h] cmp r15, r13 jnz loc_1EF75 loc_1F0BE: mov al, [rsp+0A8h+var_A1] loc_1F0C2: add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1F0D1: mov [rsp+0A8h+var_50], rdx mov rdx, [rcx] mov [rsp+0A8h+var_40], rdx loc_1F0DE: mov rdx, [rax+8] lea rsi, [rsp+0A8h+var_50] mov [rsi+8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov bpl, 1 mov rdi, r14; int call _ZN3CLI13HorribleErrorC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::HorribleError::HorribleError(std::string) xor ebp, ebp lea rsi, _ZTIN3CLI13HorribleErrorE; lptinfo lea rdx, _ZN3CLI5ErrorD2Ev; void (*)(void *) mov rdi, r14; void * call ___cxa_throw mov rbx, rax mov rdi, [rsp+0A8h+var_50]; void * cmp rdi, r15 jz short loc_1F137 mov rsi, [rsp+0A8h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1F137: lea rax, [rsp+0A8h+var_88] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_1F152 mov rsi, [rsp+0A8h+var_88] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1F152: test bpl, bpl jnz short loc_1F17C jmp short loc_1F193 mov rbx, rax lea rax, [rsp+0A8h+var_88] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_1F17C mov rsi, [rsp+0A8h+var_88] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_1F17C mov rbx, rax loc_1F17C: mov rdi, r14; void * call ___cxa_free_exception jmp short loc_1F193 mov rbx, rax lea rdi, [rsp+0A8h+var_78] call _ZNSt6vectorISt4pairIN3CLI6detail10ClassifierENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaISA_EED2Ev; std::vector<std::pair<CLI::detail::Classifier,std::string>>::~vector() loc_1F193: mov rdi, rbx call __Unwind_Resume
char CLI::App::_parse_subcommand(_QWORD *a1, _QWORD *a2) { _QWORD *v3; // r13 long long *v4; // rax long long *v5; // rcx long long v6; // rdx long long v7; // rsi int v8; // edi long long v9; // r8 long long subcommand; // rax long long v12; // r15 long long v13; // rax _QWORD *v14; // rdi _QWORD *v15; // rax long long *v16; // rsi void *exception; // r14 long long v18; // rax __int128 *v19; // rcx long long v20; // r15 __int128 v21; // xmm0 int v22; // r12d unsigned long long v23; // rbp unsigned long long v24; // r13 long long v25; // rbx void *v26; // rax __int128 v27; // xmm0 long long v28; // rax _QWORD *v29; // rsi void *v30; // [rsp+0h] [rbp-A8h] char v31[8]; // [rsp+8h] [rbp-A0h] BYREF __int128 v32; // [rsp+10h] [rbp-98h] BYREF void *v33; // [rsp+20h] [rbp-88h] int v34; // [rsp+28h] [rbp-80h] __int128 v35; // [rsp+30h] [rbp-78h] BYREF long long v36; // [rsp+40h] [rbp-68h] _QWORD *v37; // [rsp+48h] [rbp-60h] _QWORD *v38; // [rsp+50h] [rbp-58h] void *v39; // [rsp+58h] [rbp-50h] long long v40; // [rsp+60h] [rbp-48h] __int128 v41; // [rsp+68h] [rbp-40h] BYREF v3 = a1; v4 = (long long *)a1[27]; v5 = (long long *)a1[28]; if ( v4 != v5 ) { v6 = 0LL; do { v7 = *v4; if ( *(_QWORD *)(*v4 + 144) ) { if ( *(_BYTE *)(v7 + 32) == 1 ) { v8 = *(_DWORD *)(v7 + 364) * *(_DWORD *)(v7 + 368); if ( v8 > 0 ) { v9 = (long long)(*(_QWORD *)(v7 + 544) - *(_QWORD *)(v7 + 536)) >> 5; if ( v8 > (int)v9 ) v6 = (unsigned int)v8 + v6 - v9; } } } ++v4; } while ( v4 != v5 ); if ( v6 ) { CLI::App::_parse_positional(v3, a2, 0LL); return 1; } } subcommand = CLI::App::_find_subcommand(v3, a2[1] - 32LL, 1LL, 1LL); *(_QWORD *)v31 = subcommand; HIBYTE(v30) = subcommand != 0; if ( subcommand ) { v12 = subcommand; v13 = a2[1]; a2[1] = v13 - 32; v14 = *(_QWORD **)(v13 - 32); v15 = (_QWORD *)(v13 - 16); if ( v14 != v15 ) operator delete(v14, *v15 + 1LL); if ( !*(_BYTE *)(v12 + 673) ) { v16 = (long long *)v3[54]; if ( v16 == (long long *)v3[55] ) { std::vector<CLI::App *>::_M_realloc_insert<CLI::App * const&>(v3 + 53, v16, v31); } else { *v16 = v12; v3[54] += 8LL; } } CLI::App::_parse(*(int *)v31, (int)v30, v31[0]); v20 = *(_QWORD *)(*(_QWORD *)v31 + 712LL); if ( (_QWORD *)v20 != v3 ) { v21 = 0LL; v38 = v3; v37 = a2; while ( !*(_BYTE *)(v20 + 78) ) { v28 = a2[1] - *a2; *(_BYTE *)(v20 + 78) = 1; if ( *(_QWORD *)(v20 + 96) ) { *(_QWORD *)&v32 = v28 >> 5; (*(void ( **)(long long, __int128 *, double))(v20 + 104))(v20 + 80, &v32, *(double *)&v21); LABEL_29: v21 = 0LL; } LABEL_30: if ( !*(_BYTE *)(*(_QWORD *)v31 + 673LL) ) { v29 = *(_QWORD **)(v20 + 432); if ( v29 == *(_QWORD **)(v20 + 440) ) { std::vector<CLI::App *>::_M_realloc_insert<CLI::App * const&>(v20 + 424, v29, v31); v21 = 0LL; } else { *v29 = *(_QWORD *)v31; *(_QWORD *)(v20 + 432) += 8LL; } } v20 = *(_QWORD *)(v20 + 712); if ( (_QWORD *)v20 == v3 ) return HIBYTE(v30); } if ( *(_BYTE *)(v20 + 79) != 1 || !*(_QWORD *)(v20 + 16) ) goto LABEL_30; v22 = *(_DWORD *)(v20 + 676); v35 = *(_OWORD *)(v20 + 376); v23 = *((_QWORD *)&v35 + 1); v24 = v35; v36 = *(_QWORD *)(v20 + 392); v25 = v36; *(_OWORD *)(v20 + 376) = v21; *(_QWORD *)(v20 + 392) = 0LL; CLI::App::clear((CLI::App *)v20); *(_DWORD *)(v20 + 676) = v22; *(_BYTE *)(v20 + 78) = 1; v26 = *(void **)(v20 + 392); *(_QWORD *)(v20 + 392) = v25; v27 = *(_OWORD *)(v20 + 376); *(_OWORD *)(v20 + 376) = __PAIR128__(v23, v24); v32 = v27; v33 = v26; v35 = 0LL; v36 = 0LL; std::vector<std::pair<CLI::detail::Classifier,std::string>>::~vector((long long)&v32); std::vector<std::pair<CLI::detail::Classifier,std::string>>::~vector((long long)&v35); a2 = v37; v3 = v38; goto LABEL_29; } } else if ( !v3[89] ) { exception = __cxa_allocate_exception(0x38uLL); std::operator+<char>((long long)&v32, (long long)"Subcommand ", (_QWORD *)(a2[1] - 32LL)); v18 = std::string::append(&v32, " missing"); v39 = &v41; v19 = (__int128 *)(v18 + 16); if ( *(_QWORD *)v18 == v18 + 16 ) { v41 = *v19; } else { v39 = *(void **)v18; *(_QWORD *)&v41 = *(_QWORD *)v19; } v40 = *(_QWORD *)(v18 + 8); *(_QWORD *)v18 = v19; *(_QWORD *)(v18 + 8) = 0LL; *(_BYTE *)(v18 + 16) = 0; CLI::HorribleError::HorribleError((int)exception, v30, *(int *)v31, v32, SDWORD2(v32), v33, v34, v35); __cxa_throw(exception, (struct type_info *)&`typeinfo for'CLI::HorribleError, CLI::Error::~Error); } return HIBYTE(v30); }
_parse_subcommand: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV RBX,RSI MOV R13,RDI MOV RAX,qword ptr [RDI + 0xd8] MOV RCX,qword ptr [RDI + 0xe0] CMP RAX,RCX JZ 0x0011ee48 XOR EDX,EDX LAB_0011ede3: MOV RSI,qword ptr [RAX] CMP qword ptr [RSI + 0x90],0x0 JZ 0x0011ee26 CMP byte ptr [RSI + 0x20],0x1 JNZ 0x0011ee26 MOV EDI,dword ptr [RSI + 0x170] IMUL EDI,dword ptr [RSI + 0x16c] TEST EDI,EDI JLE 0x0011ee26 MOV R8,qword ptr [RSI + 0x220] SUB R8,qword ptr [RSI + 0x218] SAR R8,0x5 CMP EDI,R8D JLE 0x0011ee26 MOV ESI,EDI ADD RDX,RSI SUB RDX,R8 LAB_0011ee26: ADD RAX,0x8 CMP RAX,RCX JNZ 0x0011ede3 TEST RDX,RDX JZ 0x0011ee48 MOV RDI,R13 MOV RSI,RBX XOR EDX,EDX CALL 0x0012059c MOV AL,0x1 JMP 0x0011f0c2 LAB_0011ee48: MOV RSI,qword ptr [RBX + 0x8] ADD RSI,-0x20 MOV RDI,R13 MOV EDX,0x1 MOV ECX,0x1 CALL 0x001214a6 MOV qword ptr [RSP + 0x8],RAX TEST RAX,RAX SETNZ byte ptr [RSP + 0x7] JZ 0x0011eec3 MOV R15,RAX MOV RAX,qword ptr [RBX + 0x8] LEA RCX,[RAX + -0x20] MOV qword ptr [RBX + 0x8],RCX MOV RDI,qword ptr [RAX + -0x20] ADD RAX,-0x10 CMP RDI,RAX JZ 0x0011ee98 MOV RSI,qword ptr [RAX] INC RSI CALL 0x00107430 LAB_0011ee98: CMP byte ptr [R15 + 0x2a1],0x0 JNZ 0x0011ef41 MOV RSI,qword ptr [R13 + 0x1b0] CMP RSI,qword ptr [R13 + 0x1b8] JZ 0x0011ef30 MOV qword ptr [RSI],R15 ADD qword ptr [R13 + 0x1b0],0x8 JMP 0x0011ef41 LAB_0011eec3: CMP qword ptr [R13 + 0x2c8],0x0 JNZ 0x0011f0be MOV EDI,0x38 CALL 0x001071d0 MOV R14,RAX MOV RDX,qword ptr [RBX + 0x8] ADD RDX,-0x20 LAB_0011eee6: LEA RSI,[0x1378f4] LEA RDI,[RSP + 0x10] CALL 0x00111e48 LAB_0011eef7: LEA RSI,[0x137900] LEA RDI,[RSP + 0x10] CALL 0x001077e0 LAB_0011ef08: LEA R15,[RSP + 0x68] MOV qword ptr [R15 + -0x10],R15 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JNZ 0x0011f0d1 MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R15],XMM0 JMP 0x0011f0de LAB_0011ef30: LEA RDI,[R13 + 0x1a8] LEA RDX,[RSP + 0x8] CALL 0x00122a38 LAB_0011ef41: MOV RDI,qword ptr [RSP + 0x8] MOV RSI,RBX CALL 0x001227a6 MOV RAX,qword ptr [RSP + 0x8] MOV R15,qword ptr [RAX + 0x2c8] CMP R15,R13 JZ 0x0011f0be XORPS XMM0,XMM0 LEA R14,[RSP + 0x10] MOV qword ptr [RSP + 0x50],R13 MOV qword ptr [RSP + 0x48],RBX LAB_0011ef75: CMP byte ptr [R15 + 0x4e],0x0 JZ 0x0011f045 CMP byte ptr [R15 + 0x4f],0x1 JNZ 0x0011f06f CMP qword ptr [R15 + 0x10],0x0 JZ 0x0011f06f MOV R12D,dword ptr [R15 + 0x2a4] MOV R13,qword ptr [R15 + 0x178] MOV qword ptr [RSP + 0x30],R13 MOV RBP,qword ptr [R15 + 0x180] MOV qword ptr [RSP + 0x38],RBP MOV RBX,qword ptr [R15 + 0x188] MOV qword ptr [RSP + 0x40],RBX MOVUPS xmmword ptr [R15 + 0x178],XMM0 MOV qword ptr [R15 + 0x188],0x0 LAB_0011efd4: MOV RDI,R15 CALL 0x0011de46 LAB_0011efdc: MOV dword ptr [R15 + 0x2a4],R12D MOV byte ptr [R15 + 0x4e],0x1 MOV RAX,qword ptr [R15 + 0x188] MOV qword ptr [R15 + 0x188],RBX MOVUPS XMM0,xmmword ptr [R15 + 0x178] MOV qword ptr [R15 + 0x178],R13 MOV qword ptr [R15 + 0x180],RBP MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOV qword ptr [RSP + 0x20],RAX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOV qword ptr [RSP + 0x40],0x0 MOV RDI,R14 CALL 0x00119156 LEA RDI,[RSP + 0x30] CALL 0x00119156 MOV RBX,qword ptr [RSP + 0x48] MOV R13,qword ptr [RSP + 0x50] JMP 0x0011f06c LAB_0011f045: MOV RAX,qword ptr [RBX + 0x8] SUB RAX,qword ptr [RBX] MOV byte ptr [R15 + 0x4e],0x1 CMP qword ptr [R15 + 0x60],0x0 JZ 0x0011f06f SAR RAX,0x5 LEA RDI,[R15 + 0x50] MOV qword ptr [RSP + 0x10],RAX MOV RSI,R14 CALL qword ptr [R15 + 0x68] LAB_0011f06c: XORPS XMM0,XMM0 LAB_0011f06f: MOV RAX,qword ptr [RSP + 0x8] CMP byte ptr [RAX + 0x2a1],0x0 JNZ 0x0011f0ae MOV RSI,qword ptr [R15 + 0x1b0] CMP RSI,qword ptr [R15 + 0x1b8] JZ 0x0011f09a MOV qword ptr [RSI],RAX ADD qword ptr [R15 + 0x1b0],0x8 JMP 0x0011f0ae LAB_0011f09a: LEA RDI,[R15 + 0x1a8] LEA RDX,[RSP + 0x8] CALL 0x00122a38 XORPS XMM0,XMM0 LAB_0011f0ae: MOV R15,qword ptr [R15 + 0x2c8] CMP R15,R13 JNZ 0x0011ef75 LAB_0011f0be: MOV AL,byte ptr [RSP + 0x7] LAB_0011f0c2: ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011f0d1: MOV qword ptr [RSP + 0x58],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x68],RDX LAB_0011f0de: MOV RDX,qword ptr [RAX + 0x8] LEA RSI,[RSP + 0x58] MOV qword ptr [RSI + 0x8],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 MOV BPL,0x1 LAB_0011f0fd: MOV RDI,R14 CALL 0x00120f4a XOR EBP,EBP LEA RSI,[0x1496d0] LEA RDX,[0x1298a6] MOV RDI,R14 CALL 0x00107750
/* CLI::App::_parse_subcommand(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >&) */ bool __thiscall CLI::App::_parse_subcommand(App *this,vector *param_1) { int4 uVar1; int8 uVar2; int8 uVar3; int8 uVar4; int8 *puVar5; App *pAVar6; HorribleError *pHVar7; long *plVar8; long *plVar9; long lVar10; uint uVar11; long lVar12; App *this_00; App *local_a0; long local_98; int8 uStack_90; int8 local_88; int8 local_78; int8 uStack_70; int8 local_68; vector *local_60; App *local_58; long *local_50; long local_48; long local_40; int4 uStack_38; int4 uStack_34; plVar8 = *(long **)(this + 0xd8); if (plVar8 != *(long **)(this + 0xe0)) { lVar10 = 0; do { lVar12 = *plVar8; if ((((*(long *)(lVar12 + 0x90) != 0) && (*(char *)(lVar12 + 0x20) == '\x01')) && (uVar11 = *(int *)(lVar12 + 0x170) * *(int *)(lVar12 + 0x16c), 0 < (int)uVar11)) && (lVar12 = *(long *)(lVar12 + 0x220) - *(long *)(lVar12 + 0x218) >> 5, (int)lVar12 < (int)uVar11)) { lVar10 = (lVar10 + (ulong)uVar11) - lVar12; } plVar8 = plVar8 + 1; } while (plVar8 != *(long **)(this + 0xe0)); if (lVar10 != 0) { _parse_positional(this,param_1,false); return true; } } pAVar6 = (App *)_find_subcommand(this,(string *)(*(long *)(param_1 + 8) + -0x20),true,true); local_a0 = pAVar6; if (pAVar6 == (App *)0x0) { if (*(long *)(this + 0x2c8) == 0) { pHVar7 = (HorribleError *)__cxa_allocate_exception(0x38); /* try { // try from 0011eee6 to 0011eef6 has its CatchHandler @ 0011f179 */ std::operator+((char *)&local_98,(string *)"Subcommand "); /* try { // try from 0011eef7 to 0011ef07 has its CatchHandler @ 0011f159 */ plVar8 = (long *)std::__cxx11::string::append((char *)&local_98); local_50 = (long *)*plVar8; plVar9 = plVar8 + 2; if (local_50 == plVar9) { local_40 = *plVar9; uStack_38 = (int4)plVar8[3]; uStack_34 = *(int4 *)((long)plVar8 + 0x1c); local_50 = &local_40; } else { local_40 = *plVar9; } local_48 = plVar8[1]; *plVar8 = (long)plVar9; plVar8[1] = 0; *(int1 *)(plVar8 + 2) = 0; /* try { // try from 0011f0fd to 0011f11c has its CatchHandler @ 0011f11d */ HorribleError::HorribleError(pHVar7); /* WARNING: Subroutine does not return */ __cxa_throw(pHVar7,&HorribleError::typeinfo,Error::~Error); } } else { lVar10 = *(long *)(param_1 + 8); *(long *)(param_1 + 8) = lVar10 + -0x20; if (*(long **)(lVar10 + -0x20) != (long *)(lVar10 + -0x10)) { operator_delete(*(long **)(lVar10 + -0x20),*(long *)(lVar10 + -0x10) + 1); } if (pAVar6[0x2a1] == (App)0x0) { plVar8 = *(long **)(this + 0x1b0); if (plVar8 == *(long **)(this + 0x1b8)) { std::vector<CLI::App*,std::allocator<CLI::App*>>::_M_realloc_insert<CLI::App*const&> ((vector<CLI::App*,std::allocator<CLI::App*>> *)(this + 0x1a8),plVar8,&local_a0); } else { *plVar8 = (long)pAVar6; *(long *)(this + 0x1b0) = *(long *)(this + 0x1b0) + 8; } } _parse(local_a0,param_1); this_00 = *(App **)(local_a0 + 0x2c8); if (this_00 != this) { local_60 = param_1; local_58 = this; do { if (this_00[0x4e] == (App)0x0) { lVar10 = *(long *)(param_1 + 8); lVar12 = *(long *)param_1; this_00[0x4e] = (App)0x1; if (*(long *)(this_00 + 0x60) != 0) { local_98 = lVar10 - lVar12 >> 5; (**(code **)(this_00 + 0x68)) (this_00 + 0x50, (vector<std::pair<CLI::detail::Classifier,std::__cxx11::string>,std::allocator<std::pair<CLI::detail::Classifier,std::__cxx11::string>>> *)&local_98); } } else if ((this_00[0x4f] == (App)0x1) && (*(long *)(this_00 + 0x10) != 0)) { uVar1 = *(int4 *)(this_00 + 0x2a4); uVar2 = *(int8 *)(this_00 + 0x178); uVar3 = *(int8 *)(this_00 + 0x180); uVar4 = *(int8 *)(this_00 + 0x188); *(int8 *)(this_00 + 0x178) = 0; *(int8 *)(this_00 + 0x180) = 0; *(int8 *)(this_00 + 0x188) = 0; local_78 = uVar2; uStack_70 = uVar3; local_68 = uVar4; /* try { // try from 0011efd4 to 0011efdb has its CatchHandler @ 0011f186 */ clear(this_00); *(int4 *)(this_00 + 0x2a4) = uVar1; this_00[0x4e] = (App)0x1; local_88 = *(int8 *)(this_00 + 0x188); *(int8 *)(this_00 + 0x188) = uVar4; local_98 = *(long *)(this_00 + 0x178); uStack_90 = *(int8 *)(this_00 + 0x180); *(int8 *)(this_00 + 0x178) = uVar2; *(int8 *)(this_00 + 0x180) = uVar3; local_78 = 0; uStack_70 = 0; local_68 = 0; std:: vector<std::pair<CLI::detail::Classifier,std::__cxx11::string>,std::allocator<std::pair<CLI::detail::Classifier,std::__cxx11::string>>> ::~vector((vector<std::pair<CLI::detail::Classifier,std::__cxx11::string>,std::allocator<std::pair<CLI::detail::Classifier,std::__cxx11::string>>> *)&local_98); std:: vector<std::pair<CLI::detail::Classifier,std::__cxx11::string>,std::allocator<std::pair<CLI::detail::Classifier,std::__cxx11::string>>> ::~vector((vector<std::pair<CLI::detail::Classifier,std::__cxx11::string>,std::allocator<std::pair<CLI::detail::Classifier,std::__cxx11::string>>> *)&local_78); param_1 = local_60; this = local_58; } if (local_a0[0x2a1] == (App)0x0) { puVar5 = *(int8 **)(this_00 + 0x1b0); if (puVar5 == *(int8 **)(this_00 + 0x1b8)) { std::vector<CLI::App*,std::allocator<CLI::App*>>::_M_realloc_insert<CLI::App*const&> ((vector<CLI::App*,std::allocator<CLI::App*>> *)(this_00 + 0x1a8),puVar5, &local_a0); } else { *puVar5 = local_a0; *(long *)(this_00 + 0x1b0) = *(long *)(this_00 + 0x1b0) + 8; } } this_00 = *(App **)(this_00 + 0x2c8); } while (this_00 != this); } } return pAVar6 != (App *)0x0; }
23,556
std::unique_ptr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::default_delete<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> nglog::internal::MakeCheckOpString<nglog::LogSeverity, int>(nglog::LogSeverity const&, int const&, char const*)
ng-log[P]ng-log/src/ng-log/logging.h
std::unique_ptr<std::string> MakeCheckOpString(const T1& v1, const T2& v2, const char* exprtext) { CheckOpMessageBuilder comb(exprtext); MakeCheckOpValueString(comb.ForVar1(), v1); MakeCheckOpValueString(comb.ForVar2(), v2); return comb.NewString(); }
O1
c
std::unique_ptr<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::default_delete<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> nglog::internal::MakeCheckOpString<nglog::LogSeverity, int>(nglog::LogSeverity const&, int const&, char const*): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movq %rsp, %r12 movq %r12, %rdi movq %rcx, %rsi callq 0xdda6 movq (%r12), %rdi movl (%r15), %esi callq 0x7960 movq (%rsp), %rdi leaq 0x10cec(%rip), %rsi # 0x227ff movl $0x5, %edx callq 0x7610 movq (%rsp), %rdi movl (%r14), %esi callq 0x7960 movq %rsp, %rsi movq %rbx, %rdi callq 0xde5e movq %rsp, %rdi callq 0xde30 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx movq %rsp, %rdi callq 0xde30 movq %rbx, %rdi callq 0x7980
_ZN5nglog8internal17MakeCheckOpStringINS_11LogSeverityEiEESt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS9_EERKT_RKT0_PKc: push r15 push r14 push r12 push rbx push rax mov r14, rdx mov r15, rsi mov rbx, rdi mov r12, rsp mov rdi, r12; this mov rsi, rcx; char * call _ZN5nglog8internal21CheckOpMessageBuilderC2EPKc; nglog::internal::CheckOpMessageBuilder::CheckOpMessageBuilder(char const*) mov rdi, [r12] mov esi, [r15] call __ZNSolsEi; std::ostream::operator<<(int) mov rdi, [rsp+28h+var_28] lea rsi, aVs; " vs. " mov edx, 5 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+28h+var_28] mov esi, [r14] call __ZNSolsEi; std::ostream::operator<<(int) mov rsi, rsp mov rdi, rbx call _ZN5nglog8internal21CheckOpMessageBuilder9NewStringB5cxx11Ev; nglog::internal::CheckOpMessageBuilder::NewString(void) mov rdi, rsp; this call _ZN5nglog8internal21CheckOpMessageBuilderD2Ev; nglog::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder() mov rax, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax mov rdi, rsp; this call _ZN5nglog8internal21CheckOpMessageBuilderD2Ev; nglog::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder() mov rdi, rbx call __Unwind_Resume
_QWORD * nglog::internal::MakeCheckOpString<nglog::LogSeverity,int>( _QWORD *a1, unsigned int *a2, unsigned int *a3, const char *a4) { long long v4; // rax _QWORD v7[5]; // [rsp+0h] [rbp-28h] BYREF v7[0] = v4; nglog::internal::CheckOpMessageBuilder::CheckOpMessageBuilder((nglog::internal::CheckOpMessageBuilder *)v7, a4); std::ostream::operator<<(v7[0], *a2); std::__ostream_insert<char,std::char_traits<char>>(v7[0], " vs. ", 5LL); std::ostream::operator<<(v7[0], *a3); nglog::internal::CheckOpMessageBuilder::NewString[abi:cxx11](a1, v7); nglog::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder((nglog::internal::CheckOpMessageBuilder *)v7); return a1; }
MakeCheckOpString<nglog::LogSeverity,int>: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV R12,RSP MOV RDI,R12 MOV RSI,RCX CALL 0x0010dda6 MOV RDI,qword ptr [R12] MOV ESI,dword ptr [R15] LAB_00111b03: CALL 0x00107960 MOV RDI,qword ptr [RSP] LEA RSI,[0x1227ff] MOV EDX,0x5 CALL 0x00107610 MOV RDI,qword ptr [RSP] MOV ESI,dword ptr [R14] CALL 0x00107960 MOV RSI,RSP MOV RDI,RBX CALL 0x0010de5e LAB_00111b34: MOV RDI,RSP CALL 0x0010de30 MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* std::unique_ptr<std::__cxx11::string, std::default_delete<std::__cxx11::string > > nglog::internal::MakeCheckOpString<nglog::LogSeverity, int>(nglog::LogSeverity const&, int const&, char const*) */ internal * __thiscall nglog::internal::MakeCheckOpString<nglog::LogSeverity,int> (internal *this,LogSeverity *param_1,int *param_2,char *param_3) { ostream *in_RAX; ostream *local_28; local_28 = in_RAX; CheckOpMessageBuilder::CheckOpMessageBuilder((CheckOpMessageBuilder *)&local_28,param_3); /* try { // try from 00111b03 to 00111b33 has its CatchHandler @ 00111b4b */ std::ostream::operator<<(local_28,*(int *)param_1); std::__ostream_insert<char,std::char_traits<char>>(local_28," vs. ",5); std::ostream::operator<<(local_28,*param_2); CheckOpMessageBuilder::NewString_abi_cxx11_(); CheckOpMessageBuilder::~CheckOpMessageBuilder((CheckOpMessageBuilder *)&local_28); return this; }
23,557
ma_write_blob_record
eloqsql/storage/maria/ma_dynrec.c
my_bool _ma_write_blob_record(MARIA_HA *info, const uchar *record) { uchar *rec_buff; int error; ulong reclength,reclength2,extra; my_bool buff_alloced; extra= (ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER)+MARIA_SPLIT_LENGTH+ MARIA_DYN_DELETE_BLOCK_HEADER+1); reclength= (info->s->base.pack_reclength + _ma_calc_total_blob_length(info,record)+ extra); alloc_on_stack(*info->stack_end_ptr, rec_buff, buff_alloced, reclength); if (!rec_buff) { my_errno= HA_ERR_OUT_OF_MEM; /* purecov: inspected */ return(1); } reclength2= _ma_rec_pack(info, rec_buff+ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER), record); if (!reclength2) { error= 1; goto err; } DBUG_PRINT("info",("reclength: %lu reclength2: %lu", reclength, reclength2)); DBUG_ASSERT(reclength2 <= reclength); error= write_dynamic_record(info, rec_buff+ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER), reclength2); err: stack_alloc_free(rec_buff, buff_alloced); return(error != 0); }
O3
c
ma_write_blob_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %r14 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq (%rdi), %rax movq 0x3a0(%rax), %r15 callq 0x4325e leaq (%r15,%rax), %rsi addq $0x5d, %rsi leaq -0x38(%rbp), %rcx movq %rsi, (%rcx) movq 0x78(%rbx), %rax movq (%rax), %rax subq %rcx, %rax subq %rsi, %rax jbe 0x431dd cmpq $0x10000, %rax # imm = 0x10000 ja 0x431c7 cmpq $0x1000, %rsi # imm = 0x1000 jb 0x431dd cmpq $0x8001, %rax # imm = 0x8001 jb 0x431dd movq %rsp, %r15 addq $0xf, %rsi andq $-0x10, %rsi subq %rsi, %r15 movq %r15, %rsp movb $0x1, %r13b jmp 0x431f4 xorl %r13d, %r13d movl $0x10010, %edx # imm = 0x10010 xorl %edi, %edi callq 0xa1359 testq %rax, %rax je 0x4322c movq %rax, %r15 leaq 0x18(%r15), %r12 movq %rbx, %rdi movq %r12, %rsi movq %r14, %rdx callq 0x428d1 testl %eax, %eax je 0x4321b movl %eax, %edx movq %rbx, %rdi movq %r12, %rsi callq 0x42c39 movl %eax, %ebx jmp 0x4321d movb $0x1, %bl testb %r13b, %r13b jne 0x43239 movq %r15, %rdi callq 0xa1586 jmp 0x43239 callq 0xa319a movl $0x80, (%rax) movb $0x1, %bl movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x43259 movl %ebx, %eax leaq -0x28(%rbp), %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29220
_ma_write_blob_record: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax mov rax, [rdi] mov r15, [rax+3A0h] call _ma_calc_total_blob_length lea rsi, [r15+rax] add rsi, 5Dh ; ']' lea rcx, [rbp+var_38] mov [rcx], rsi mov rax, [rbx+78h] mov rax, [rax] sub rax, rcx sub rax, rsi jbe short loc_431DD cmp rax, 10000h ja short loc_431C7 cmp rsi, 1000h jb short loc_431DD cmp rax, 8001h jb short loc_431DD loc_431C7: mov r15, rsp add rsi, 0Fh and rsi, 0FFFFFFFFFFFFFFF0h sub r15, rsi mov rsp, r15 mov r13b, 1 jmp short loc_431F4 loc_431DD: xor r13d, r13d mov edx, 10010h xor edi, edi call my_malloc test rax, rax jz short loc_4322C mov r15, rax loc_431F4: lea r12, [r15+18h] mov rdi, rbx mov rsi, r12 mov rdx, r14 call _ma_rec_pack test eax, eax jz short loc_4321B mov edx, eax mov rdi, rbx mov rsi, r12 call write_dynamic_record mov ebx, eax jmp short loc_4321D loc_4321B: mov bl, 1 loc_4321D: test r13b, r13b jnz short loc_43239 mov rdi, r15 call my_free jmp short loc_43239 loc_4322C: call _my_thread_var mov dword ptr [rax], 80h mov bl, 1 loc_43239: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_43259 mov eax, ebx lea rsp, [rbp-28h] pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_43259: call ___stack_chk_fail
long long ma_write_blob_record(unsigned __int8 *a1, unsigned __int8 *a2) { unsigned int v3; // ebx long long v4; // r15 unsigned long long v5; // rsi unsigned long long v6; // rax bool v7; // cc unsigned long long v8; // rax char *v9; // r15 char v10; // r13 long long v11; // rax unsigned int v12; // eax _QWORD v15[7]; // [rsp+8h] [rbp-38h] BYREF v3 = (unsigned int)a1; v15[1] = __readfsqword(0x28u); v4 = *(_QWORD *)(*(_QWORD *)a1 + 928LL); v5 = v4 + ma_calc_total_blob_length() + 93; v15[0] = v5; v6 = **((_QWORD **)a1 + 15) - (_QWORD)v15; v7 = v6 <= v5; v8 = v6 - v5; if ( v7 || v8 <= 0x10000 && (v5 < 0x1000 || v8 < 0x8001) ) { v10 = 0; v11 = my_malloc(0LL, v5, 65552LL); if ( !v11 ) { *(_DWORD *)my_thread_var(0LL) = 128; LOBYTE(v3) = 1; return v3; } v9 = (char *)v11; } else { v9 = (char *)&v15[-1] - ((v5 + 15) & 0xFFFFFFFFFFFFFFF0LL); v10 = 1; } v12 = ma_rec_pack(a1, v9 + 24, a2); if ( v12 ) v3 = write_dynamic_record(a1, (long long)(v9 + 24), v12); else LOBYTE(v3) = 1; if ( !v10 ) my_free(v9); return v3; }
_ma_write_blob_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RDI] MOV R15,qword ptr [RAX + 0x3a0] CALL 0x0014325e LEA RSI,[R15 + RAX*0x1] ADD RSI,0x5d LEA RCX,[RBP + -0x38] MOV qword ptr [RCX],RSI MOV RAX,qword ptr [RBX + 0x78] MOV RAX,qword ptr [RAX] SUB RAX,RCX SUB RAX,RSI JBE 0x001431dd CMP RAX,0x10000 JA 0x001431c7 CMP RSI,0x1000 JC 0x001431dd CMP RAX,0x8001 JC 0x001431dd LAB_001431c7: MOV R15,RSP ADD RSI,0xf AND RSI,-0x10 SUB R15,RSI MOV RSP,R15 MOV R13B,0x1 JMP 0x001431f4 LAB_001431dd: XOR R13D,R13D MOV EDX,0x10010 XOR EDI,EDI CALL 0x001a1359 TEST RAX,RAX JZ 0x0014322c MOV R15,RAX LAB_001431f4: LEA R12,[R15 + 0x18] MOV RDI,RBX MOV RSI,R12 MOV RDX,R14 CALL 0x001428d1 TEST EAX,EAX JZ 0x0014321b MOV EDX,EAX MOV RDI,RBX MOV RSI,R12 CALL 0x00142c39 MOV EBX,EAX JMP 0x0014321d LAB_0014321b: MOV BL,0x1 LAB_0014321d: TEST R13B,R13B JNZ 0x00143239 MOV RDI,R15 CALL 0x001a1586 JMP 0x00143239 LAB_0014322c: CALL 0x001a319a MOV dword ptr [RAX],0x80 MOV BL,0x1 LAB_00143239: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00143259 MOV EAX,EBX LEA RSP,[RBP + -0x28] POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00143259: CALL 0x00129220
ulong _ma_write_blob_record(long *param_1,int8 param_2) { long lVar1; bool bVar2; int1 *puVar3; int iVar4; uint uVar5; long lVar6; ulong uVar7; int1 *puVar8; int4 *puVar9; int7 uVar10; int1 *puVar11; long in_FS_OFFSET; int1 auStack_48 [8]; ulong local_40; long local_38; puVar11 = auStack_48; local_38 = *(long *)(in_FS_OFFSET + 0x28); lVar1 = *(long *)(*param_1 + 0x3a0); lVar6 = _ma_calc_total_blob_length(); lVar1 = lVar1 + lVar6; local_40 = lVar1 + 0x5d; uVar7 = (*(long *)param_1[0xf] - (long)&local_40) - local_40; uVar10 = (int7)((ulong)param_1 >> 8); if ((local_40 < (ulong)(*(long *)param_1[0xf] - (long)&local_40)) && ((0x10000 < uVar7 || ((0xfff < local_40 && (0x8000 < uVar7)))))) { puVar8 = auStack_48 + -(lVar1 + 0x6cU & 0xfffffffffffffff0); bVar2 = true; puVar3 = puVar8; } else { bVar2 = false; puVar8 = (int1 *)my_malloc(0,local_40,0x10010); puVar3 = auStack_48; if (puVar8 == (int1 *)0x0) { puVar9 = (int4 *)_my_thread_var(); *puVar9 = 0x80; uVar7 = CONCAT71(uVar10,1); goto LAB_00143239; } } puVar11 = puVar3; *(int8 *)(puVar11 + -8) = 0x143206; iVar4 = _ma_rec_pack(param_1,puVar8 + 0x18,param_2); if (iVar4 == 0) { uVar7 = CONCAT71(uVar10,1); } else { *(int8 *)(puVar11 + -8) = 0x143217; uVar5 = write_dynamic_record(param_1,puVar8 + 0x18,iVar4); uVar7 = (ulong)uVar5; } if (!bVar2) { *(int8 *)(puVar11 + -8) = 0x14322a; my_free(puVar8); } LAB_00143239: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ *(code **)(puVar11 + -8) = _ma_calc_total_blob_length; __stack_chk_fail(); } return uVar7 & 0xffffffff; }
23,558
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>, bool, nlohmann::json_abi_v3_11_3::detail::value_t)
monkey531[P]llama/common/json.hpp
basic_json(initializer_list_t init, bool type_deduction = true, value_t manual_type = value_t::array) { // check if each element is an array with two elements whose first // element is a string bool is_an_object = std::all_of(init.begin(), init.end(), [](const detail::json_ref<basic_json>& element_ref) { // The cast is to ensure op[size_type] is called, bearing in mind size_type may not be int; // (many string types can be constructed from 0 via its null-pointer guise, so we get a // broken call to op[key_type], the wrong semantics and a 4804 warning on Windows) return element_ref->is_array() && element_ref->size() == 2 && (*element_ref)[static_cast<size_type>(0)].is_string(); }); // adjust type if type deduction is not wanted if (!type_deduction) { // if array is wanted, do not create an object though possible if (manual_type == value_t::array) { is_an_object = false; } // if object is wanted but impossible, throw an exception if (JSON_HEDLEY_UNLIKELY(manual_type == value_t::object && !is_an_object)) { JSON_THROW(type_error::create(301, "cannot create object from initializer list", nullptr)); } } if (is_an_object) { // the initializer list is a list of pairs -> create object m_data.m_type = value_t::object; m_data.m_value = value_t::object; for (auto& element_ref : init) { auto element = element_ref.moved_or_copied(); m_data.m_value.object->emplace( std::move(*((*element.m_data.m_value.array)[0].m_data.m_value.string)), std::move((*element.m_data.m_value.array)[1])); } } else { // the initializer list describes an array -> create array m_data.m_type = value_t::array; m_data.m_value.array = create<array_t>(init.begin(), init.end()); } set_parents(); assert_invariant(); }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>, bool, nlohmann::json_abi_v3_11_3::detail::value_t): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %r8d, %ebp movl %ecx, %r13d movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx leaq (%rdx,%rdx,2), %rax leaq (%rsi,%rax,8), %r12 xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq %rsi, %rdi movq %r12, %rsi callq 0xa11e6 cmpq %r12, %rax sete %cl testb %r13b, %r13b jne 0x7ec11 cmpq %r12, %rax sete %al cmpb $0x2, %bpl setne %cl cmpb $0x1, %bpl setne %dl orb %al, %dl je 0x7ecbc andb %al, %cl testb %cl, %cl je 0x7ec86 movb $0x1, (%rbx) movl $0x20, %edi callq 0x1a8b0 xorps %xmm0, %xmm0 movups %xmm0, (%rax) movq $0x0, 0x10(%rax) movq %rax, 0x8(%rbx) testq %r15, %r15 je 0x7eca0 shlq $0x3, %r15 leaq (%r15,%r15,2), %r12 movq %rsp, %r15 movq %r15, %rdi movq %r14, %rsi callq 0xa1140 movq 0x8(%rbx), %rdi movq 0x8(%rsp), %rax movq (%rax), %rdx movq 0x8(%rdx), %rsi addq $0x10, %rdx callq 0x5f25a movq %r15, %rdi xorl %esi, %esi callq 0x586c0 movq %r15, %rdi callq 0x5dbae addq $0x18, %r14 addq $-0x18, %r12 jne 0x7ec44 jmp 0x7eca0 movb $0x2, (%rbx) movq %rsp, %rdi movq %r14, (%rdi) leaq 0x20(%rsp), %rsi movq %r12, (%rsi) callq 0xa1192 movq %rax, 0x8(%rbx) movq %rbx, %rdi movl $0x1, %esi callq 0x586c0 addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x1a450 movq %rax, %r14 leaq 0x10(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x7213b(%rip), %rsi # 0xf0e15 leaq 0x7215e(%rip), %rdx # 0xf0e3f movq %rsp, %rdi callq 0x21cae movb $0x1, %bpl movq %rsp, %rdx movq %r14, %rdi movl $0x12d, %esi # imm = 0x12D xorl %ecx, %ecx callq 0xa0f70 xorl %ebp, %ebp leaq 0xab251(%rip), %rsi # 0x129f58 leaq -0x23ed0(%rip), %rdx # 0x5ae3e movq %r14, %rdi callq 0x1af40 jmp 0x7ed1c jmp 0x7ed1c jmp 0x7ed1c movq %rax, %r15 jmp 0x7ed66 movq %rax, %r15 movq %rsp, %r14 movq %r14, %rdi xorl %esi, %esi callq 0x586c0 movq %r14, %rdi callq 0x5dbae jmp 0x7ed66 movq %rax, %r15 movq (%rsp), %rdi cmpq %r12, %rdi je 0x7ed54 movq 0x10(%rsp), %rsi incq %rsi callq 0x1a8d0 testb %bpl, %bpl jne 0x7ed5e jmp 0x7ed66 movq %rax, %r15 movq %r14, %rdi callq 0x1a680 movq %rbx, %rdi callq 0x5dbae movq %r15, %rdi callq 0x1afc0
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ESt16initializer_listINS0_6detail8json_refISD_EEEbNSF_7value_tE: push rbp; int push r15; int push r14; char push r13; int push r12; __int64 push rbx; int sub rsp, 28h mov ebp, r8d mov r13d, ecx mov r15, rdx mov r14, rsi mov rbx, rdi lea rax, [rdx+rdx*2] lea r12, [rsi+rax*8] xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov rdi, rsi mov rsi, r12 call _ZSt9__find_ifIPKN8nlohmann16json_abi_v3_11_36detail8json_refINS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEN9__gnu_cxx5__ops12_Iter_negateIZNSG_C1ESt16initializer_listISH_EbNS2_7value_tEEUlRSI_E_EEET_ST_ST_T0_St26random_access_iterator_tag; std::__find_if<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,__gnu_cxx::__ops::_Iter_negate<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&)#1}>>(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,__gnu_cxx::__ops::_Iter_negate<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&)#1}>,std::random_access_iterator_tag) cmp rax, r12 setz cl test r13b, r13b jnz short loc_7EC11 cmp rax, r12 setz al cmp bpl, 2 setnz cl cmp bpl, 1 setnz dl or dl, al jz loc_7ECBC and cl, al loc_7EC11: test cl, cl jz short loc_7EC86 mov byte ptr [rbx], 1 mov edi, 20h ; ' '; unsigned __int64 call __Znwm; operator new(ulong) xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 mov qword ptr [rax+10h], 0 mov [rbx+8], rax test r15, r15 jz short loc_7ECA0 shl r15, 3 lea r12, [r15+r15*2] mov r15, rsp loc_7EC44: mov rdi, r15 mov rsi, r14 call _ZNK8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15moved_or_copiedEv; nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::moved_or_copied(void) mov rdi, [rbx+8] mov rax, [rsp+58h+var_50] mov rdx, [rax] mov rsi, [rdx+8] add rdx, 10h call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE7emplaceERSH_OSD_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::emplace(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&&) mov rdi, r15 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() add r14, 18h add r12, 0FFFFFFFFFFFFFFE8h jnz short loc_7EC44 jmp short loc_7ECA0 loc_7EC86: mov byte ptr [rbx], 2 mov rdi, rsp mov [rdi], r14 lea rsi, [rsp+58h+var_38] mov [rsi], r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJPKNS0_6detail8json_refISD_EESL_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*>(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const* &&) mov [rbx+8], rax loc_7ECA0: mov rdi, rbx mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7ECBC: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov r14, rax lea r12, [rsp+58h+var_48] mov [r12-10h], r12 lea rsi, aCannotCreateOb; "cannot create object from initializer l"... lea rdx, aCannotCreateOb+2Ah; "" mov rdi, rsp call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov bpl, 1 mov rdx, rsp mov rdi, r14; this mov esi, 12Dh; int xor ecx, ecx call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short loc_7ED1C jmp short loc_7ED1C jmp short $+2 loc_7ED1C: mov r15, rax jmp short loc_7ED66 mov r15, rax mov r14, rsp mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() jmp short loc_7ED66 mov r15, rax mov rdi, [rsp+58h+var_58]; void * cmp rdi, r12 jz short loc_7ED54 mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7ED54: test bpl, bpl jnz short loc_7ED5E jmp short loc_7ED66 mov r15, rax loc_7ED5E: mov rdi, r14; void * call ___cxa_free_exception loc_7ED66: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, r15 call __Unwind_Resume
basic_json: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV EBP,R8D MOV R13D,ECX MOV R15,RDX MOV R14,RSI MOV RBX,RDI LEA RAX,[RDX + RDX*0x2] LEA R12,[RSI + RAX*0x8] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 LAB_0017ebdd: MOV RDI,RSI MOV RSI,R12 CALL 0x001a11e6 CMP RAX,R12 SETZ CL TEST R13B,R13B JNZ 0x0017ec11 CMP RAX,R12 SETZ AL CMP BPL,0x2 SETNZ CL CMP BPL,0x1 SETNZ DL OR DL,AL JZ 0x0017ecbc AND CL,AL LAB_0017ec11: TEST CL,CL JZ 0x0017ec86 MOV byte ptr [RBX],0x1 LAB_0017ec18: MOV EDI,0x20 CALL 0x0011a8b0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],0x0 MOV qword ptr [RBX + 0x8],RAX TEST R15,R15 JZ 0x0017eca0 SHL R15,0x3 LEA R12,[R15 + R15*0x2] MOV R15,RSP LAB_0017ec44: MOV RDI,R15 MOV RSI,R14 CALL 0x001a1140 MOV RDI,qword ptr [RBX + 0x8] MOV RAX,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RAX] MOV RSI,qword ptr [RDX + 0x8] ADD RDX,0x10 LAB_0017ec63: CALL 0x0015f25a MOV RDI,R15 XOR ESI,ESI CALL 0x001586c0 MOV RDI,R15 CALL 0x0015dbae ADD R14,0x18 ADD R12,-0x18 JNZ 0x0017ec44 JMP 0x0017eca0 LAB_0017ec86: MOV byte ptr [RBX],0x2 MOV RDI,RSP MOV qword ptr [RDI],R14 LEA RSI,[RSP + 0x20] MOV qword ptr [RSI],R12 LAB_0017ec97: CALL 0x001a1192 LAB_0017ec9c: MOV qword ptr [RBX + 0x8],RAX LAB_0017eca0: MOV RDI,RBX MOV ESI,0x1 CALL 0x001586c0 ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017ecbc: MOV EDI,0x20 CALL 0x0011a450 MOV R14,RAX LEA R12,[RSP + 0x10] MOV qword ptr [R12 + -0x10],R12 LAB_0017ecd3: LEA RSI,[0x1f0e15] LEA RDX,[0x1f0e3f] MOV RDI,RSP CALL 0x00121cae MOV BPL,0x1 LAB_0017ecec: MOV RDX,RSP MOV RDI,R14 MOV ESI,0x12d XOR ECX,ECX CALL 0x001a0f70 XOR EBP,EBP LEA RSI,[0x229f58] LEA RDX,[0x15ae3e] MOV RDI,R14 CALL 0x0011af40
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > >, bool, nlohmann::json_abi_v3_11_3::detail::value_t) */ void nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(int8 *param_1,json_ref *param_2,long param_3,char param_4,char param_5) { json_ref *pjVar1; json_ref *pjVar2; int8 *puVar3; vector *pvVar4; int8 uVar5; bool bVar6; json_ref *local_58; long *local_50; json_ref local_48 [16]; json_ref *local_38; pjVar1 = param_2 + param_3 * 0x18; *param_1 = 0; param_1[1] = 0; /* try { // try from 0017ebdd to 0017ebe7 has its CatchHandler @ 0017ed1a */ pjVar2 = std:: __find_if<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const*,__gnu_cxx::__ops::_Iter_negate<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>::_Iter_negate(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::_lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const&)_1_>> (param_2,pjVar1); bVar6 = pjVar2 == pjVar1; if (param_4 == '\0') { if (param_5 == '\x01' && pjVar2 != pjVar1) { uVar5 = __cxa_allocate_exception(0x20); local_58 = local_48; /* try { // try from 0017ecd3 to 0017ece8 has its CatchHandler @ 0017ed5b */ std::__cxx11::string::_M_construct<char_const*> (&local_58,"cannot create object from initializer list",""); /* try { // try from 0017ecec to 0017ed15 has its CatchHandler @ 0017ed3b */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ (uVar5,0x12d,&local_58,0); /* WARNING: Subroutine does not return */ __cxa_throw(uVar5,&detail::type_error::typeinfo,detail::exception::~exception); } bVar6 = param_5 != '\x02' && pjVar2 == pjVar1; } if (bVar6) { *(int1 *)param_1 = 1; /* try { // try from 0017ec18 to 0017ec21 has its CatchHandler @ 0017ed18 */ puVar3 = (int8 *)operator_new(0x20); *puVar3 = 0; puVar3[1] = 0; puVar3[2] = 0; param_1[1] = puVar3; if (param_3 != 0) { param_3 = param_3 * 0x18; do { /* try { // try from 0017ec44 to 0017ec4e has its CatchHandler @ 0017ed1c */ detail:: json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::moved_or_copied(); /* try { // try from 0017ec63 to 0017ec67 has its CatchHandler @ 0017ed21 */ ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::emplace((ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> *)param_1[1],*(string **)(*local_50 + 8),(basic_json *)(*local_50 + 0x10)); assert_invariant(SUB81(&local_58,0)); data::~data((data *)&local_58); param_3 = param_3 + -0x18; } while (param_3 != 0); } } else { *(int1 *)param_1 = 2; local_58 = param_2; local_38 = pjVar1; /* try { // try from 0017ec97 to 0017ec9b has its CatchHandler @ 0017ed16 */ pvVar4 = create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const*> (&local_58,&local_38); param_1[1] = pvVar4; } assert_invariant(SUB81(param_1,0)); return; }
23,559
convert_less_than_thousand[abi:cxx11](int)
llama.cpp/examples/tts/tts.cpp
static std::string convert_less_than_thousand(int num) { std::string result; if (num >= 100) { result += ones.at(num / 100) + " hundred "; num %= 100; } if (num >= 20) { result += tens.at(num / 10); if (num % 10 > 0) { result += "-" + ones.at(num % 10); } } else if (num > 0) { result += ones.at(num); } return result; }
O3
cpp
convert_less_than_thousand[abi:cxx11](int): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x30, %rsp movl %esi, %ebp movq %rdi, %rbx movl %esi, 0x4(%rsp) leaq 0x10(%rdi), %r15 movq %r15, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) cmpl $0x64, %esi jl 0x2beb8 movl %ebp, %eax imulq $0x51eb851f, %rax, %r14 # imm = 0x51EB851F shrq $0x25, %r14 leaq 0x2c(%rsp), %rsi movl %r14d, (%rsi) leaq 0x1430ff(%rip), %rdi # 0x16ef50 callq 0x3a544 leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) movq (%rax), %rsi movq 0x8(%rax), %rdx addq %rsi, %rdx leaq 0x8(%rsp), %rdi callq 0x3bb50 leaq 0xf1970(%rip), %rsi # 0x11d7eb leaq 0x8(%rsp), %rdi callq 0x21b70 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x21560 imull $0x64, %r14d, %eax subl %eax, %ebp movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x2beb4 movq 0x18(%rsp), %rsi incq %rsi callq 0x21180 movl %ebp, 0x4(%rsp) cmpl $0x14, %ebp jl 0x2bf60 movzbl %bpl, %eax imull $0xcd, %eax, %eax shrl $0xb, %eax leaq 0x8(%rsp), %rsi movl %eax, (%rsi) leaq 0x1430a4(%rip), %rdi # 0x16ef80 callq 0x3a544 movq (%rax), %rsi movq 0x8(%rax), %rdx movq %rbx, %rdi callq 0x21560 movzbl %bpl, %eax imull $0xcd, %eax, %ecx shrl $0xa, %ecx andl $-0x2, %ecx leal (%rcx,%rcx,4), %ecx subb %cl, %al je 0x2bf84 movzbl %al, %eax leaq 0x2c(%rsp), %rsi movl %eax, (%rsi) leaq 0x143038(%rip), %rdi # 0x16ef50 callq 0x3a544 leaq 0x103a7a(%rip), %rsi # 0x12f99e leaq 0x8(%rsp), %rdi movq %rax, %rdx callq 0x373d5 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x21560 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x2bf84 movq 0x18(%rsp), %rsi incq %rsi callq 0x21180 jmp 0x2bf84 testl %ebp, %ebp jle 0x2bf84 leaq 0x142fe5(%rip), %rdi # 0x16ef50 leaq 0x4(%rsp), %rsi callq 0x3a544 movq (%rax), %rsi movq 0x8(%rax), %rdx movq %rbx, %rdi callq 0x21560 addq $0x30, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi jne 0x2bfb3 jmp 0x2bfcb jmp 0x2bfa6 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x2bfcb movq 0x18(%rsp), %rsi incq %rsi callq 0x21180 jmp 0x2bfcb jmp 0x2bfc8 jmp 0x2bfc8 jmp 0x2bfc8 movq %rax, %r14 movq (%rbx), %rdi cmpq %r15, %rdi je 0x2bfde movq (%r15), %rsi incq %rsi callq 0x21180 movq %r14, %rdi callq 0x21b20
_ZL26convert_less_than_thousandB5cxx11i: push rbp push r15 push r14 push r12 push rbx sub rsp, 30h mov ebp, esi mov rbx, rdi mov [rsp+58h+var_54], esi lea r15, [rdi+10h] mov [rdi], r15 mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 cmp esi, 64h ; 'd' jl loc_2BEB8 mov eax, ebp imul r14, rax, 51EB851Fh shr r14, 25h lea rsi, [rsp+58h+var_2C] mov [rsi], r14d lea rdi, _ZL4onesB5cxx11; ones call _ZNKSt3mapIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIiESaISt4pairIKiS5_EEE2atERS9_; std::map<int,std::string>::at(int const&) lea r12, [rsp+58h+var_40] mov [r12-10h], r12 mov rsi, [rax] mov rdx, [rax+8] add rdx, rsi lea rdi, [rsp+58h+var_50] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, aHundred; " hundred " lea rdi, [rsp+58h+var_50] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [rsp+58h+var_50] mov rdx, [rsp+58h+var_48] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong) imul eax, r14d, 64h ; 'd' sub ebp, eax mov rdi, [rsp+58h+var_50]; void * cmp rdi, r12 jz short loc_2BEB4 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2BEB4: mov [rsp+58h+var_54], ebp loc_2BEB8: cmp ebp, 14h jl loc_2BF60 movzx eax, bpl imul eax, 0CDh shr eax, 0Bh lea rsi, [rsp+58h+var_50] mov [rsi], eax lea rdi, _ZL4tensB5cxx11; tens call _ZNKSt3mapIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIiESaISt4pairIKiS5_EEE2atERS9_; std::map<int,std::string>::at(int const&) mov rsi, [rax] mov rdx, [rax+8] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong) movzx eax, bpl imul ecx, eax, 0CDh shr ecx, 0Ah and ecx, 0FFFFFFFEh lea ecx, [rcx+rcx*4] sub al, cl jz short loc_2BF84 movzx eax, al lea rsi, [rsp+58h+var_2C] mov [rsi], eax lea rdi, _ZL4onesB5cxx11; ones call _ZNKSt3mapIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIiESaISt4pairIKiS5_EEE2atERS9_; std::map<int,std::string>::at(int const&) lea rsi, aTuple+5; "-" lea rdi, [rsp+58h+var_50] mov rdx, rax call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) mov rsi, [rsp+58h+var_50] mov rdx, [rsp+58h+var_48] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong) lea rax, [rsp+58h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_2BF84 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_2BF84 loc_2BF60: test ebp, ebp jle short loc_2BF84 lea rdi, _ZL4onesB5cxx11; ones lea rsi, [rsp+58h+var_54] call _ZNKSt3mapIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIiESaISt4pairIKiS5_EEE2atERS9_; std::map<int,std::string>::at(int const&) mov rsi, [rax] mov rdx, [rax+8] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong) loc_2BF84: add rsp, 30h pop rbx pop r12 pop r14 pop r15 pop rbp retn mov r14, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h] cmp rdi, rax jnz short loc_2BFB3 jmp short loc_2BFCB jmp short $+2 loc_2BFA6: mov r14, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r12 jz short loc_2BFCB loc_2BFB3: mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_2BFCB jmp short loc_2BFC8 jmp short loc_2BFC8 jmp short $+2 loc_2BFC8: mov r14, rax loc_2BFCB: mov rdi, [rbx]; void * cmp rdi, r15 jz short loc_2BFDE mov rsi, [r15] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2BFDE: mov rdi, r14 call __Unwind_Resume
void convert_less_than_thousand[abi:cxx11](long long a1, unsigned int a2) { signed int v2; // ebp _QWORD *v3; // rax _QWORD *v4; // rax long long v5; // rax _QWORD *v6; // rax unsigned int v7; // [rsp+4h] [rbp-54h] BYREF void *v8; // [rsp+8h] [rbp-50h] BYREF long long v9; // [rsp+10h] [rbp-48h] _QWORD v10[2]; // [rsp+18h] [rbp-40h] BYREF _DWORD v11[11]; // [rsp+2Ch] [rbp-2Ch] BYREF v2 = a2; v7 = a2; *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; if ( (int)a2 >= 100 ) { v11[0] = a2 / 0x64; v3 = (_QWORD *)std::map<int,std::string>::at(&ones[abi:cxx11], v11); v8 = v10; std::string::_M_construct<char *>(&v8, *v3, *v3 + v3[1]); std::string::append(&v8, " hundred "); std::string::append(a1, v8, v9); v2 = a2 % 0x64; if ( v8 != v10 ) operator delete(v8, v10[0] + 1LL); v7 = a2 % 0x64; } if ( v2 < 20 ) { if ( v2 > 0 ) { v6 = (_QWORD *)std::map<int,std::string>::at(&ones[abi:cxx11], &v7); std::string::append(a1, *v6, v6[1]); } } else { LODWORD(v8) = (unsigned __int8)v2 / 0xAu; v4 = (_QWORD *)std::map<int,std::string>::at(&tens[abi:cxx11], &v8); std::string::append(a1, *v4, v4[1]); if ( (_BYTE)v2 != 5 * (((unsigned __int8)v2 / 5u) & 0xFE) ) { v11[0] = (unsigned __int8)(v2 - 5 * (((unsigned __int8)v2 / 5u) & 0xFE)); v5 = std::map<int,std::string>::at(&ones[abi:cxx11], v11); std::operator+<char>(&v8, "-", v5); std::string::append(a1, v8, v9); if ( v8 != v10 ) operator delete(v8, v10[0] + 1LL); } } }
convert_less_than_thousand[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x30 MOV EBP,ESI MOV RBX,RDI MOV dword ptr [RSP + 0x4],ESI LEA R15,[RDI + 0x10] MOV qword ptr [RDI],R15 MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 CMP ESI,0x64 JL 0x0012beb8 MOV EAX,EBP IMUL R14,RAX,0x51eb851f SHR R14,0x25 LEA RSI,[RSP + 0x2c] MOV dword ptr [RSI],R14D LAB_0012be4a: LEA RDI,[0x26ef50] CALL 0x0013a544 LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] ADD RDX,RSI LEA RDI,[RSP + 0x8] CALL 0x0013bb50 LAB_0012be74: LEA RSI,[0x21d7eb] LEA RDI,[RSP + 0x8] CALL 0x00121b70 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_0012be8f: MOV RDI,RBX CALL 0x00121560 IMUL EAX,R14D,0x64 SUB EBP,EAX MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x0012beb4 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00121180 LAB_0012beb4: MOV dword ptr [RSP + 0x4],EBP LAB_0012beb8: CMP EBP,0x14 JL 0x0012bf60 MOVZX EAX,BPL IMUL EAX,EAX,0xcd SHR EAX,0xb LEA RSI,[RSP + 0x8] MOV dword ptr [RSI],EAX LAB_0012bed5: LEA RDI,[0x26ef80] CALL 0x0013a544 MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] MOV RDI,RBX CALL 0x00121560 MOVZX EAX,BPL IMUL ECX,EAX,0xcd SHR ECX,0xa AND ECX,0xfffffffe LEA ECX,[RCX + RCX*0x4] SUB AL,CL JZ 0x0012bf84 MOVZX EAX,AL LEA RSI,[RSP + 0x2c] MOV dword ptr [RSI],EAX LAB_0012bf11: LEA RDI,[0x26ef50] CALL 0x0013a544 LEA RSI,[0x22f99e] LEA RDI,[RSP + 0x8] MOV RDX,RAX CALL 0x001373d5 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_0012bf3b: MOV RDI,RBX CALL 0x00121560 LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0012bf84 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00121180 JMP 0x0012bf84 LAB_0012bf60: TEST EBP,EBP JLE 0x0012bf84 LAB_0012bf64: LEA RDI,[0x26ef50] LEA RSI,[RSP + 0x4] CALL 0x0013a544 MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] MOV RDI,RBX CALL 0x00121560 LAB_0012bf84: ADD RSP,0x30 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* convert_less_than_thousand[abi:cxx11](int) */ void convert_less_than_thousand_abi_cxx11_(int param_1) { uint uVar1; byte bVar2; long *plVar3; ulong *puVar4; uint in_ESI; int4 in_register_0000003c; long *plVar5; uint local_54; long *local_50 [2]; long local_40 [2]; uint local_2c; plVar5 = (long *)CONCAT44(in_register_0000003c,param_1); *plVar5 = (long)(plVar5 + 2); plVar5[1] = 0; *(int1 *)(plVar5 + 2) = 0; local_54 = in_ESI; if (99 < (int)in_ESI) { local_2c = in_ESI / 100; /* try { // try from 0012be4a to 0012be73 has its CatchHandler @ 0012bfc8 */ plVar3 = (long *)std:: map<int,std::__cxx11::string,std::less<int>,std::allocator<std::pair<int_const,std::__cxx11::string>>> ::at((map<int,std::__cxx11::string,std::less<int>,std::allocator<std::pair<int_const,std::__cxx11::string>>> *)ones_abi_cxx11_,(int *)&local_2c); local_50[0] = local_40; std::__cxx11::string::_M_construct<char*>(local_50,*plVar3,plVar3[1] + *plVar3); /* try { // try from 0012be74 to 0012be84 has its CatchHandler @ 0012bfa6 */ std::__cxx11::string::append((char *)local_50); /* try { // try from 0012be8f to 0012be96 has its CatchHandler @ 0012bfa4 */ std::__cxx11::string::append((char *)plVar5,(ulong)local_50[0]); local_54 = in_ESI % 100; if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } } uVar1 = local_54; if ((int)local_54 < 0x14) { if (0 < (int)local_54) { /* try { // try from 0012bf64 to 0012bf83 has its CatchHandler @ 0012bfc4 */ puVar4 = (ulong *)std:: map<int,std::__cxx11::string,std::less<int>,std::allocator<std::pair<int_const,std::__cxx11::string>>> ::at((map<int,std::__cxx11::string,std::less<int>,std::allocator<std::pair<int_const,std::__cxx11::string>>> *)ones_abi_cxx11_,(int *)&local_54); std::__cxx11::string::append((char *)plVar5,*puVar4); } } else { local_50[0] = (long *)CONCAT44(local_50[0]._4_4_,(local_54 & 0xff) / 10); /* try { // try from 0012bed5 to 0012beef has its CatchHandler @ 0012bfc6 */ puVar4 = (ulong *)std:: map<int,std::__cxx11::string,std::less<int>,std::allocator<std::pair<int_const,std::__cxx11::string>>> ::at((map<int,std::__cxx11::string,std::less<int>,std::allocator<std::pair<int_const,std::__cxx11::string>>> *)tens_abi_cxx11_,(int *)local_50); std::__cxx11::string::append((char *)plVar5,*puVar4); bVar2 = (char)uVar1 + ((byte)((uVar1 & 0xff) / 5) & 0xfe) * -5; if (bVar2 != 0) { local_2c = (uint)bVar2; /* try { // try from 0012bf11 to 0012bf30 has its CatchHandler @ 0012bfc2 */ std:: map<int,std::__cxx11::string,std::less<int>,std::allocator<std::pair<int_const,std::__cxx11::string>>> ::at((map<int,std::__cxx11::string,std::less<int>,std::allocator<std::pair<int_const,std::__cxx11::string>>> *)ones_abi_cxx11_,(int *)&local_2c); std::operator+((char *)local_50,(string *)0x22f99e); /* try { // try from 0012bf3b to 0012bf42 has its CatchHandler @ 0012bf91 */ std::__cxx11::string::append((char *)plVar5,(ulong)local_50[0]); if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } } } return; }
23,560
mysql_stat_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_stat_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_stat, (parms->mysql), parms->mysql, const char *, r_const_ptr) }
O3
c
mysql_stat_start_internal: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq (%rdi), %rdi movq 0x480(%rdi), %rax movq 0x28(%rax), %rbx callq 0x3cab7 movq %rax, 0x8(%rbx) movl $0x0, (%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
mysql_stat_start_internal: push rbp mov rbp, rsp push rbx push rax mov rdi, [rdi] mov rax, [rdi+480h] mov rbx, [rax+28h] call mysql_stat mov [rbx+8], rax mov dword ptr [rbx], 0 add rsp, 8 pop rbx pop rbp retn
_BYTE * mysql_stat_start_internal(long long *a1) { long long v1; // rdi long long v2; // rbx _BYTE *result; // rax v1 = *a1; v2 = *(_QWORD *)(*(_QWORD *)(v1 + 1152) + 40LL); result = mysql_stat(v1); *(_QWORD *)(v2 + 8) = result; *(_DWORD *)v2 = 0; return result; }
mysql_stat_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 0x0013cab7 MOV qword ptr [RBX + 0x8],RAX MOV dword ptr [RBX],0x0 ADD RSP,0x8 POP RBX POP RBP RET
void mysql_stat_start_internal(long *param_1) { int4 *puVar1; int8 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_stat(); *(int8 *)(puVar1 + 2) = uVar2; *puVar1 = 0; return; }
23,561
my_strcasecmp_utf8mb4
eloqsql/strings/ctype-utf8.c
static int my_strcasecmp_utf8mb4(CHARSET_INFO *cs, const char *s, const char *t) { MY_UNICASE_INFO *uni_plane= cs->caseinfo; while (s[0] && t[0]) { my_wc_t s_wc,t_wc; if ((uchar) s[0] < 128) { /* s[0] is between 0 and 127. It represents a single byte character. Convert it into weight according to collation. */ s_wc= my_unicase_default_page00[(uchar) s[0]].tolower; s++; } else { int res= my_mb_wc_utf8mb4_no_range(cs, &s_wc, (const uchar*) s); /* In the case of wrong multibyte sequence we will call strcmp() for byte-to-byte comparison. */ if (res <= 0) return strcmp(s, t); s+= res; my_tolower_utf8mb4(uni_plane, &s_wc); } /* Do the same for the second string */ if ((uchar) t[0] < 128) { /* Convert single byte character into weight */ t_wc= my_unicase_default_page00[(uchar) t[0]].tolower; t++; } else { int res= my_mb_wc_utf8mb4_no_range(cs, &t_wc, (const uchar*) t); if (res <= 0) return strcmp(s, t); t+= res; my_tolower_utf8mb4(uni_plane, &t_wc); } /* Now we have two weights, let's compare them */ if ( s_wc != t_wc ) return ((int) s_wc) - ((int) t_wc); } return ((int) (uchar) s[0]) - ((int) (uchar) t[0]); }
O0
c
my_strcasecmp_utf8mb4: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x78(%rax), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x41(%rbp) je 0x6a011 movq -0x20(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax setne %al movb %al, -0x41(%rbp) movb -0x41(%rbp), %al testb $0x1, %al jne 0x6a01d jmp 0x6a146 movq -0x18(%rbp), %rax movzbl (%rax), %eax cmpl $0x80, %eax jge 0x6a057 movq -0x18(%rbp), %rax movzbl (%rax), %eax movl %eax, %ecx leaq 0x2f7195(%rip), %rax # 0x3611d0 imulq $0xc, %rcx, %rcx addq %rcx, %rax movl 0x4(%rax), %eax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) jmp 0x6a0a4 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rdx leaq -0x30(%rbp), %rsi callq 0x69750 movl %eax, -0x3c(%rbp) cmpl $0x0, -0x3c(%rbp) jg 0x6a086 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x243e0 movl %eax, -0x4(%rbp) jmp 0x6a159 movl -0x3c(%rbp), %ecx movq -0x18(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x18(%rbp) movq -0x28(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0x69b40 movq -0x20(%rbp), %rax movzbl (%rax), %eax cmpl $0x80, %eax jge 0x6a0de movq -0x20(%rbp), %rax movzbl (%rax), %eax movl %eax, %ecx leaq 0x2f710e(%rip), %rax # 0x3611d0 imulq $0xc, %rcx, %rcx addq %rcx, %rax movl 0x4(%rax), %eax movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) jmp 0x6a128 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rdx leaq -0x38(%rbp), %rsi callq 0x69750 movl %eax, -0x40(%rbp) cmpl $0x0, -0x40(%rbp) jg 0x6a10a movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x243e0 movl %eax, -0x4(%rbp) jmp 0x6a159 movl -0x40(%rbp), %ecx movq -0x20(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rdi leaq -0x38(%rbp), %rsi callq 0x69b40 movq -0x30(%rbp), %rax cmpq -0x38(%rbp), %rax je 0x6a141 movq -0x30(%rbp), %rax movq -0x38(%rbp), %rcx subl %ecx, %eax movl %eax, -0x4(%rbp) jmp 0x6a159 jmp 0x69ff0 movq -0x18(%rbp), %rax movzbl (%rax), %eax movq -0x20(%rbp), %rcx movzbl (%rcx), %ecx subl %ecx, %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_strcasecmp_utf8mb4: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov rax, [rax+78h] mov [rbp+var_28], rax loc_69FF0: mov rax, [rbp+var_18] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, 0 mov [rbp+var_41], al jz short loc_6A011 mov rax, [rbp+var_20] movsx eax, byte ptr [rax] cmp eax, 0 setnz al mov [rbp+var_41], al loc_6A011: mov al, [rbp+var_41] test al, 1 jnz short loc_6A01D jmp loc_6A146 loc_6A01D: mov rax, [rbp+var_18] movzx eax, byte ptr [rax] cmp eax, 80h jge short loc_6A057 mov rax, [rbp+var_18] movzx eax, byte ptr [rax] mov ecx, eax lea rax, my_unicase_default_page00 imul rcx, 0Ch add rax, rcx mov eax, [rax+4] mov [rbp+var_30], rax mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax jmp short loc_6A0A4 loc_6A057: mov rdi, [rbp+var_10] mov rdx, [rbp+var_18] lea rsi, [rbp+var_30] call my_mb_wc_utf8mb4_no_range mov [rbp+var_3C], eax cmp [rbp+var_3C], 0 jg short loc_6A086 mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] call _strcmp mov [rbp+var_4], eax jmp loc_6A159 loc_6A086: mov ecx, [rbp+var_3C] mov rax, [rbp+var_18] movsxd rcx, ecx add rax, rcx mov [rbp+var_18], rax mov rdi, [rbp+var_28] lea rsi, [rbp+var_30] call my_tolower_utf8mb4 loc_6A0A4: mov rax, [rbp+var_20] movzx eax, byte ptr [rax] cmp eax, 80h jge short loc_6A0DE mov rax, [rbp+var_20] movzx eax, byte ptr [rax] mov ecx, eax lea rax, my_unicase_default_page00 imul rcx, 0Ch add rax, rcx mov eax, [rax+4] mov [rbp+var_38], rax mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax jmp short loc_6A128 loc_6A0DE: mov rdi, [rbp+var_10] mov rdx, [rbp+var_20] lea rsi, [rbp+var_38] call my_mb_wc_utf8mb4_no_range mov [rbp+var_40], eax cmp [rbp+var_40], 0 jg short loc_6A10A mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] call _strcmp mov [rbp+var_4], eax jmp short loc_6A159 loc_6A10A: mov ecx, [rbp+var_40] mov rax, [rbp+var_20] movsxd rcx, ecx add rax, rcx mov [rbp+var_20], rax mov rdi, [rbp+var_28] lea rsi, [rbp+var_38] call my_tolower_utf8mb4 loc_6A128: mov rax, [rbp+var_30] cmp rax, [rbp+var_38] jz short loc_6A141 mov rax, [rbp+var_30] mov rcx, [rbp+var_38] sub eax, ecx mov [rbp+var_4], eax jmp short loc_6A159 loc_6A141: jmp loc_69FF0 loc_6A146: mov rax, [rbp+var_18] movzx eax, byte ptr [rax] mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx] sub eax, ecx mov [rbp+var_4], eax loc_6A159: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long my_strcasecmp_utf8mb4(long long a1, unsigned __int8 *a2, unsigned __int8 *a3) { bool v4; // [rsp+Fh] [rbp-41h] int v5; // [rsp+10h] [rbp-40h] int v6; // [rsp+14h] [rbp-3Ch] unsigned long long v7; // [rsp+18h] [rbp-38h] BYREF unsigned long long v8; // [rsp+20h] [rbp-30h] BYREF _QWORD *v9; // [rsp+28h] [rbp-28h] unsigned __int8 *v10; // [rsp+30h] [rbp-20h] unsigned __int8 *v11; // [rsp+38h] [rbp-18h] long long v12; // [rsp+40h] [rbp-10h] v12 = a1; v11 = a2; v10 = a3; v9 = *(_QWORD **)(a1 + 120); while ( 1 ) { v4 = 0; if ( *v11 ) v4 = *v10 != 0; if ( !v4 ) break; if ( *v11 >= 0x80u ) { v6 = my_mb_wc_utf8mb4_no_range(v12, &v8, v11); if ( v6 <= 0 ) return (unsigned int)strcmp(v11, v10); v11 += v6; my_tolower_utf8mb4(v9, &v8); } else { v8 = my_unicase_default_page00[3 * *v11++ + 1]; } if ( *v10 >= 0x80u ) { v5 = my_mb_wc_utf8mb4_no_range(v12, &v7, v10); if ( v5 <= 0 ) return (unsigned int)strcmp(v11, v10); v10 += v5; my_tolower_utf8mb4(v9, &v7); } else { v7 = my_unicase_default_page00[3 * *v10++ + 1]; } if ( v8 != v7 ) return (unsigned int)(v8 - v7); } return (unsigned int)(*v11 - *v10); }
my_strcasecmp_utf8mb4: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RBP + -0x28],RAX LAB_00169ff0: MOV RAX,qword ptr [RBP + -0x18] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x41],AL JZ 0x0016a011 MOV RAX,qword ptr [RBP + -0x20] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x41],AL LAB_0016a011: MOV AL,byte ptr [RBP + -0x41] TEST AL,0x1 JNZ 0x0016a01d JMP 0x0016a146 LAB_0016a01d: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] CMP EAX,0x80 JGE 0x0016a057 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] MOV ECX,EAX LEA RAX,[0x4611d0] IMUL RCX,RCX,0xc ADD RAX,RCX MOV EAX,dword ptr [RAX + 0x4] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x0016a0a4 LAB_0016a057: MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] LEA RSI,[RBP + -0x30] CALL 0x00169750 MOV dword ptr [RBP + -0x3c],EAX CMP dword ptr [RBP + -0x3c],0x0 JG 0x0016a086 MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] CALL 0x001243e0 MOV dword ptr [RBP + -0x4],EAX JMP 0x0016a159 LAB_0016a086: MOV ECX,dword ptr [RBP + -0x3c] MOV RAX,qword ptr [RBP + -0x18] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX MOV RDI,qword ptr [RBP + -0x28] LEA RSI,[RBP + -0x30] CALL 0x00169b40 LAB_0016a0a4: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] CMP EAX,0x80 JGE 0x0016a0de MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] MOV ECX,EAX LEA RAX,[0x4611d0] IMUL RCX,RCX,0xc ADD RAX,RCX MOV EAX,dword ptr [RAX + 0x4] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x0016a128 LAB_0016a0de: MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0x38] CALL 0x00169750 MOV dword ptr [RBP + -0x40],EAX CMP dword ptr [RBP + -0x40],0x0 JG 0x0016a10a MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] CALL 0x001243e0 MOV dword ptr [RBP + -0x4],EAX JMP 0x0016a159 LAB_0016a10a: MOV ECX,dword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x20] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x28] LEA RSI,[RBP + -0x38] CALL 0x00169b40 LAB_0016a128: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x38] JZ 0x0016a141 MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x38] SUB EAX,ECX MOV dword ptr [RBP + -0x4],EAX JMP 0x0016a159 LAB_0016a141: JMP 0x00169ff0 LAB_0016a146: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX] SUB EAX,ECX MOV dword ptr [RBP + -0x4],EAX LAB_0016a159: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int my_strcasecmp_utf8mb4(long param_1,byte *param_2,byte *param_3) { int iVar1; bool bVar2; ulong local_40; ulong local_38; int8 local_30; byte *local_28; byte *local_20; long local_18; local_30 = *(int8 *)(param_1 + 0x78); local_28 = param_3; local_20 = param_2; local_18 = param_1; do { bVar2 = false; if (*local_20 != 0) { bVar2 = *local_28 != 0; } if (!bVar2) { return (uint)*local_20 - (uint)*local_28; } if (*local_20 < 0x80) { local_38 = (ulong)*(uint *)(my_unicase_default_page00 + (ulong)*local_20 * 0xc + 4); local_20 = local_20 + 1; } else { iVar1 = my_mb_wc_utf8mb4_no_range(local_18,&local_38,local_20); if (iVar1 < 1) { iVar1 = strcmp((char *)local_20,(char *)local_28); return iVar1; } local_20 = local_20 + iVar1; my_tolower_utf8mb4(local_30,&local_38); } if (*local_28 < 0x80) { local_40 = (ulong)*(uint *)(my_unicase_default_page00 + (ulong)*local_28 * 0xc + 4); local_28 = local_28 + 1; } else { iVar1 = my_mb_wc_utf8mb4_no_range(local_18,&local_40,local_28); if (iVar1 < 1) { iVar1 = strcmp((char *)local_20,(char *)local_28); return iVar1; } local_28 = local_28 + iVar1; my_tolower_utf8mb4(local_30,&local_40); } } while (local_38 == local_40); return (int)local_38 - (int)local_40; }
23,562
PycModule::loadFromFile(char const*)
Pyarmor-Static-Unpack-1shot/pyc_module.cpp
void PycModule::loadFromFile(const char* filename) { PycFile in(filename); if (!in.isOpen()) { fprintf(stderr, "Error opening file %s\n", filename); return; } setVersion(in.get32()); if (!isValid()) { fputs("Bad MAGIC!\n", stderr); return; } int flags = 0; if (verCompare(3, 7) >= 0) flags = in.get32(); if (flags & 0x1) { // Optional checksum added in Python 3.7 in.get32(); in.get32(); } else { in.get32(); // Timestamp -- who cares? if (verCompare(3, 3) >= 0) in.get32(); // Size parameter added in Python 3.3 } m_code = LoadObject(&in, this).cast<PycCode>(); }
O0
cpp
PycModule::loadFromFile(char const*): pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x10(%rbp), %rsi leaq -0x20(%rbp), %rdi movq %rdi, -0x58(%rbp) callq 0x53cf0 movq -0x58(%rbp), %rdi callq 0x542a0 movb %al, -0x49(%rbp) jmp 0x569da movb -0x49(%rbp), %al testb $0x1, %al jne 0x56a1c jmp 0x569e3 movq 0x335ae(%rip), %rax # 0x89f98 movq (%rax), %rdi movq -0x10(%rbp), %rdx leaq 0x138b8(%rip), %rsi # 0x6a2b0 movb $0x0, %al callq 0x8410 movl $0x1, -0x30(%rbp) jmp 0x56b52 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x28(%rbp) movl %eax, -0x2c(%rbp) jmp 0x56b79 leaq -0x20(%rbp), %rdi callq 0x53b70 movl %eax, -0x64(%rbp) jmp 0x56a2a movq -0x60(%rbp), %rdi movl -0x64(%rbp), %esi callq 0x56380 movq -0x60(%rbp), %rdi callq 0xd970 movb %al, -0x65(%rbp) jmp 0x56a44 movb -0x65(%rbp), %al testb $0x1, %al jne 0x56a71 jmp 0x56a4d movq 0x33544(%rip), %rax # 0x89f98 movq (%rax), %rsi leaq 0x13869(%rip), %rdi # 0x6a2c7 callq 0x8310 jmp 0x56a65 movl $0x1, -0x30(%rbp) jmp 0x56b52 movq -0x60(%rbp), %rdi movl $0x0, -0x34(%rbp) movl $0x3, %esi movl $0x7, %edx callq 0xc510 movl %eax, -0x6c(%rbp) jmp 0x56a90 movl -0x6c(%rbp), %eax cmpl $0x0, %eax jl 0x56aac leaq -0x20(%rbp), %rdi callq 0x53b70 movl %eax, -0x70(%rbp) jmp 0x56aa6 movl -0x70(%rbp), %eax movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x56acf leaq -0x20(%rbp), %rdi callq 0x53b70 jmp 0x56ac2 leaq -0x20(%rbp), %rdi callq 0x53b70 jmp 0x56acd jmp 0x56b06 leaq -0x20(%rbp), %rdi callq 0x53b70 jmp 0x56ada movq -0x60(%rbp), %rdi movl $0x3, %edx movl %edx, %esi callq 0xc510 movl %eax, -0x74(%rbp) jmp 0x56aef movl -0x74(%rbp), %eax cmpl $0x0, %eax jl 0x56b04 leaq -0x20(%rbp), %rdi callq 0x53b70 jmp 0x56b02 jmp 0x56b04 jmp 0x56b06 movq -0x60(%rbp), %rdx leaq -0x48(%rbp), %rdi leaq -0x20(%rbp), %rsi callq 0x5a560 jmp 0x56b19 leaq -0x40(%rbp), %rdi leaq -0x48(%rbp), %rsi callq 0xc360 jmp 0x56b28 movq -0x60(%rbp), %rdi addq $0x38, %rdi leaq -0x40(%rbp), %rsi callq 0x57980 leaq -0x40(%rbp), %rdi callq 0xc8e0 leaq -0x48(%rbp), %rdi callq 0xc700 movl $0x0, -0x30(%rbp) leaq -0x20(%rbp), %rdi callq 0x54210 addq $0x80, %rsp popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0x28(%rbp) movl %eax, -0x2c(%rbp) leaq -0x48(%rbp), %rdi callq 0xc700 leaq -0x20(%rbp), %rdi callq 0x54210 movq -0x28(%rbp), %rdi callq 0x8550 nopl (%rax,%rax)
_ZN9PycModule12loadFromFileEPKc: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_60], rax mov rsi, [rbp+var_10]; char * lea rdi, [rbp+var_20]; this mov [rbp+var_58], rdi call _ZN7PycFileC2EPKc; PycFile::PycFile(char const*) mov rdi, [rbp+var_58]; this call _ZNK7PycFile6isOpenEv; PycFile::isOpen(void) mov [rbp+var_49], al jmp short $+2 loc_569DA: mov al, [rbp+var_49] test al, 1 jnz short loc_56A1C jmp short $+2 loc_569E3: mov rax, cs:stderr_ptr mov rdi, [rax] mov rdx, [rbp+var_10] lea rsi, aErrorOpeningFi_0; "Error opening file %s\n" mov al, 0 call _fprintf mov [rbp+var_30], 1 jmp loc_56B52 mov rcx, rax mov eax, edx mov [rbp+var_28], rcx mov [rbp+var_2C], eax jmp loc_56B79 loc_56A1C: lea rdi, [rbp+var_20]; this call _ZN7PycData5get32Ev; PycData::get32(void) mov [rbp+var_64], eax jmp short $+2 loc_56A2A: mov rdi, [rbp+var_60]; this mov esi, [rbp+var_64]; unsigned int call _ZN9PycModule10setVersionEj; PycModule::setVersion(uint) mov rdi, [rbp+var_60]; this call _ZNK9PycModule7isValidEv; PycModule::isValid(void) mov [rbp+var_65], al jmp short $+2 loc_56A44: mov al, [rbp+var_65] test al, 1 jnz short loc_56A71 jmp short $+2 loc_56A4D: mov rax, cs:stderr_ptr mov rsi, [rax] lea rdi, aBadMagic; "Bad MAGIC!\n" call _fputs jmp short $+2 loc_56A65: mov [rbp+var_30], 1 jmp loc_56B52 loc_56A71: mov rdi, [rbp+var_60]; this mov [rbp+var_34], 0 mov esi, 3; int mov edx, 7; int call _ZNK9PycModule10verCompareEii; PycModule::verCompare(int,int) mov [rbp+var_6C], eax jmp short $+2 loc_56A90: mov eax, [rbp+var_6C] cmp eax, 0 jl short loc_56AAC lea rdi, [rbp+var_20]; this call _ZN7PycData5get32Ev; PycData::get32(void) mov [rbp+var_70], eax jmp short $+2 loc_56AA6: mov eax, [rbp+var_70] mov [rbp+var_34], eax loc_56AAC: mov eax, [rbp+var_34] and eax, 1 cmp eax, 0 jz short loc_56ACF lea rdi, [rbp+var_20]; this call _ZN7PycData5get32Ev; PycData::get32(void) jmp short $+2 loc_56AC2: lea rdi, [rbp+var_20]; this call _ZN7PycData5get32Ev; PycData::get32(void) jmp short $+2 loc_56ACD: jmp short loc_56B06 loc_56ACF: lea rdi, [rbp+var_20]; this call _ZN7PycData5get32Ev; PycData::get32(void) jmp short $+2 loc_56ADA: mov rdi, [rbp+var_60]; this mov edx, 3; int mov esi, edx; int call _ZNK9PycModule10verCompareEii; PycModule::verCompare(int,int) mov [rbp+var_74], eax jmp short $+2 loc_56AEF: mov eax, [rbp+var_74] cmp eax, 0 jl short loc_56B04 lea rdi, [rbp+var_20]; this call _ZN7PycData5get32Ev; PycData::get32(void) jmp short $+2 loc_56B02: jmp short $+2 loc_56B04: jmp short $+2 loc_56B06: mov rdx, [rbp+var_60] lea rdi, [rbp+var_48]; PycData * lea rsi, [rbp+var_20]; PycModule * call _Z10LoadObjectP7PycDataP9PycModule; LoadObject(PycData *,PycModule *) jmp short $+2 loc_56B19: lea rdi, [rbp+var_40] lea rsi, [rbp+var_48] call _ZNK6PycRefI9PycObjectE4castI7PycCodeEES_IT_Ev; PycRef<PycObject>::cast<PycCode>(void) jmp short $+2 loc_56B28: mov rdi, [rbp+var_60] add rdi, 38h ; '8' lea rsi, [rbp+var_40] call _ZN6PycRefI7PycCodeEaSEOS1_; PycRef<PycCode>::operator=(PycRef<PycCode>&&) lea rdi, [rbp+var_40] call _ZN6PycRefI7PycCodeED2Ev; PycRef<PycCode>::~PycRef() lea rdi, [rbp+var_48]; void * call _ZN6PycRefI9PycObjectED2Ev; PycRef<PycObject>::~PycRef() mov [rbp+var_30], 0 loc_56B52: lea rdi, [rbp+var_20]; this call _ZN7PycFileD2Ev; PycFile::~PycFile() add rsp, 80h pop rbp retn mov rcx, rax mov eax, edx mov [rbp+var_28], rcx mov [rbp+var_2C], eax lea rdi, [rbp+var_48]; void * call _ZN6PycRefI9PycObjectED2Ev; PycRef<PycObject>::~PycRef() loc_56B79: lea rdi, [rbp+var_20]; this call _ZN7PycFileD2Ev; PycFile::~PycFile() mov rdi, [rbp+var_28] call __Unwind_Resume
void PycModule::loadFromFile(PycModule *this, char *a2) { unsigned int v2; // [rsp+1Ch] [rbp-64h] PycObject *v3; // [rsp+38h] [rbp-48h] BYREF PycObject *v4; // [rsp+40h] [rbp-40h] BYREF int v5; // [rsp+4Ch] [rbp-34h] int v6; // [rsp+50h] [rbp-30h] _BYTE v7[16]; // [rsp+60h] [rbp-20h] BYREF char *v8; // [rsp+70h] [rbp-10h] PycModule *v9; // [rsp+78h] [rbp-8h] v9 = this; v8 = a2; PycFile::PycFile((PycFile *)v7, a2); if ( PycFile::isOpen((PycFile *)v7) ) { v2 = PycData::get32((PycData *)v7); PycModule::setVersion(this, v2); if ( PycModule::isValid(this) ) { v5 = 0; if ( (int)PycModule::verCompare(this, 3, 7) >= 0 ) v5 = PycData::get32((PycData *)v7); if ( (v5 & 1) != 0 ) { PycData::get32((PycData *)v7); PycData::get32((PycData *)v7); } else { PycData::get32((PycData *)v7); if ( (int)PycModule::verCompare(this, 3, 3) >= 0 ) PycData::get32((PycData *)v7); } LoadObject((PycData *)&v3, (PycModule *)v7); PycRef<PycObject>::cast<PycCode>((long long)&v4, (const void **)&v3); PycRef<PycCode>::operator=((char *)this + 56, &v4); PycRef<PycCode>::~PycRef(&v4); PycRef<PycObject>::~PycRef(&v3); v6 = 0; } else { fputs("Bad MAGIC!\n", stderr); v6 = 1; } } else { fprintf(stderr, "Error opening file %s\n", v8); v6 = 1; } PycFile::~PycFile((PycFile *)v7); }
loadFromFile: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x60],RAX MOV RSI,qword ptr [RBP + -0x10] LEA RDI,[RBP + -0x20] MOV qword ptr [RBP + -0x58],RDI CALL 0x00153cf0 MOV RDI,qword ptr [RBP + -0x58] LAB_001569d0: CALL 0x001542a0 MOV byte ptr [RBP + -0x49],AL JMP 0x001569da LAB_001569da: MOV AL,byte ptr [RBP + -0x49] TEST AL,0x1 JNZ 0x00156a1c JMP 0x001569e3 LAB_001569e3: MOV RAX,qword ptr [0x00189f98] MOV RDI,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] LEA RSI,[0x16a2b0] MOV AL,0x0 CALL 0x00108410 MOV dword ptr [RBP + -0x30],0x1 JMP 0x00156b52 LAB_00156a1c: LEA RDI,[RBP + -0x20] CALL 0x00153b70 MOV dword ptr [RBP + -0x64],EAX JMP 0x00156a2a LAB_00156a2a: MOV RDI,qword ptr [RBP + -0x60] MOV ESI,dword ptr [RBP + -0x64] CALL 0x00156380 MOV RDI,qword ptr [RBP + -0x60] CALL 0x0010d970 MOV byte ptr [RBP + -0x65],AL JMP 0x00156a44 LAB_00156a44: MOV AL,byte ptr [RBP + -0x65] TEST AL,0x1 JNZ 0x00156a71 JMP 0x00156a4d LAB_00156a4d: MOV RAX,qword ptr [0x00189f98] MOV RSI,qword ptr [RAX] LEA RDI,[0x16a2c7] CALL 0x00108310 JMP 0x00156a65 LAB_00156a65: MOV dword ptr [RBP + -0x30],0x1 JMP 0x00156b52 LAB_00156a71: MOV RDI,qword ptr [RBP + -0x60] MOV dword ptr [RBP + -0x34],0x0 MOV ESI,0x3 MOV EDX,0x7 CALL 0x0010c510 MOV dword ptr [RBP + -0x6c],EAX JMP 0x00156a90 LAB_00156a90: MOV EAX,dword ptr [RBP + -0x6c] CMP EAX,0x0 JL 0x00156aac LEA RDI,[RBP + -0x20] CALL 0x00153b70 MOV dword ptr [RBP + -0x70],EAX JMP 0x00156aa6 LAB_00156aa6: MOV EAX,dword ptr [RBP + -0x70] MOV dword ptr [RBP + -0x34],EAX LAB_00156aac: MOV EAX,dword ptr [RBP + -0x34] AND EAX,0x1 CMP EAX,0x0 JZ 0x00156acf LEA RDI,[RBP + -0x20] CALL 0x00153b70 JMP 0x00156ac2 LAB_00156ac2: LEA RDI,[RBP + -0x20] CALL 0x00153b70 JMP 0x00156acd LAB_00156acd: JMP 0x00156b06 LAB_00156acf: LEA RDI,[RBP + -0x20] CALL 0x00153b70 JMP 0x00156ada LAB_00156ada: MOV RDI,qword ptr [RBP + -0x60] MOV EDX,0x3 MOV ESI,EDX CALL 0x0010c510 MOV dword ptr [RBP + -0x74],EAX JMP 0x00156aef LAB_00156aef: MOV EAX,dword ptr [RBP + -0x74] CMP EAX,0x0 JL 0x00156b04 LEA RDI,[RBP + -0x20] CALL 0x00153b70 JMP 0x00156b02 LAB_00156b02: JMP 0x00156b04 LAB_00156b04: JMP 0x00156b06 LAB_00156b06: MOV RDX,qword ptr [RBP + -0x60] LEA RDI,[RBP + -0x48] LEA RSI,[RBP + -0x20] CALL 0x0015a560 JMP 0x00156b19 LAB_00156b19: LEA RDI,[RBP + -0x40] LEA RSI,[RBP + -0x48] CALL 0x0010c360 LAB_00156b26: JMP 0x00156b28 LAB_00156b28: MOV RDI,qword ptr [RBP + -0x60] ADD RDI,0x38 LEA RSI,[RBP + -0x40] CALL 0x00157980 LEA RDI,[RBP + -0x40] CALL 0x0010c8e0 LEA RDI,[RBP + -0x48] CALL 0x0010c700 MOV dword ptr [RBP + -0x30],0x0 LAB_00156b52: LEA RDI,[RBP + -0x20] CALL 0x00154210 ADD RSP,0x80 POP RBP RET
/* PycModule::loadFromFile(char const*) */ void __thiscall PycModule::loadFromFile(PycModule *this,char *param_1) { byte bVar1; uint uVar2; int iVar3; PycData local_50 [8]; PycRef local_48 [12]; uint local_3c; int4 local_38; PycFile local_28 [16]; char *local_18; PycModule *local_10; local_18 = param_1; local_10 = this; PycFile::PycFile(local_28,param_1); /* try { // try from 001569d0 to 00156b16 has its CatchHandler @ 00156a0b */ bVar1 = PycFile::isOpen(local_28); if ((bVar1 & 1) == 0) { fprintf(*(FILE **)PTR_stderr_00189f98,"Error opening file %s\n",local_18); local_38 = 1; } else { uVar2 = PycData::get32((PycData *)local_28); setVersion(this,uVar2); bVar1 = isValid(this); if ((bVar1 & 1) == 0) { fputs("Bad MAGIC!\n",*(FILE **)PTR_stderr_00189f98); local_38 = 1; } else { local_3c = 0; iVar3 = verCompare(this,3,7); if (-1 < iVar3) { local_3c = PycData::get32((PycData *)local_28); } if ((local_3c & 1) == 0) { PycData::get32((PycData *)local_28); iVar3 = verCompare(this,3,3); if (-1 < iVar3) { PycData::get32((PycData *)local_28); } } else { PycData::get32((PycData *)local_28); PycData::get32((PycData *)local_28); } LoadObject(local_50,(PycModule *)local_28); /* try { // try from 00156b19 to 00156b25 has its CatchHandler @ 00156b64 */ PycRef<PycObject>::cast<PycCode>(); PycRef<PycCode>::operator=((PycRef<PycCode> *)(this + 0x38),local_48); PycRef<PycCode>::~PycRef((PycRef<PycCode> *)local_48); PycRef<PycObject>::~PycRef((PycRef<PycObject> *)local_50); local_38 = 0; } } PycFile::~PycFile(local_28); return; }
23,563
PycModule::loadFromFile(char const*)
Pyarmor-Static-Unpack-1shot/pyc_module.cpp
void PycModule::loadFromFile(const char* filename) { PycFile in(filename); if (!in.isOpen()) { fprintf(stderr, "Error opening file %s\n", filename); return; } setVersion(in.get32()); if (!isValid()) { fputs("Bad MAGIC!\n", stderr); return; } int flags = 0; if (verCompare(3, 7) >= 0) flags = in.get32(); if (flags & 0x1) { // Optional checksum added in Python 3.7 in.get32(); in.get32(); } else { in.get32(); // Timestamp -- who cares? if (verCompare(3, 3) >= 0) in.get32(); // Size parameter added in Python 3.3 } m_code = LoadObject(&in, this).cast<PycCode>(); }
O3
cpp
PycModule::loadFromFile(char const*): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq -0x28(%rbp), %r15 movq %r15, %rdi callq 0x2fbd2 cmpq $0x0, 0x8(%r15) je 0x315be leaq -0x28(%rbp), %rdi callq 0x2fab8 movq %rbx, %rdi movl %eax, %esi callq 0x31080 movl 0x2c(%rbx), %eax testl %eax, %eax js 0x315db movl 0x30(%rbx), %ecx testl %ecx, %ecx js 0x315db addl $-0x7, %ecx leal -0x3(%rax), %edx cmpl $0x3, %eax cmovel %ecx, %edx testl %edx, %edx js 0x3154e leaq -0x28(%rbp), %rdi callq 0x2fab8 testb $0x1, %al jne 0x31569 leaq -0x28(%rbp), %rdi callq 0x2fab8 movl 0x2c(%rbx), %eax cmpl $0x3, %eax jne 0x31562 movl 0x30(%rbx), %eax cmpl $0x3, %eax jge 0x31572 jmp 0x3157b leaq -0x28(%rbp), %rdi callq 0x2fab8 leaq -0x28(%rbp), %rdi callq 0x2fab8 leaq -0x30(%rbp), %rdi leaq -0x28(%rbp), %rsi movq %rbx, %rdx callq 0x32f4c leaq -0x38(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0xb9d0 movq -0x38(%rbp), %rax movq %rax, 0x38(%rbx) movq $0x0, -0x38(%rbp) movq -0x30(%rbp), %rdi testq %rdi, %rdi je 0x315e0 decl 0x8(%rdi) jne 0x315e0 movq (%rdi), %rax callq *0x8(%rax) jmp 0x315e0 movq 0x199d3(%rip), %rax # 0x4af98 movq (%rax), %rdi leaq 0x6d4d(%rip), %rsi # 0x3831c movq %r14, %rdx xorl %eax, %eax callq 0x7320 jmp 0x315e0 callq 0x94f1 leaq 0x192e9(%rip), %rax # 0x4a8d0 addq $0x10, %rax movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rdi testq %rdi, %rdi je 0x315fd callq 0x7210 addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq -0x30(%rbp), %rdi testq %rdi, %rdi je 0x31628 decl 0x8(%rdi) jne 0x31628 movq (%rdi), %rax callq *0x8(%rax) jmp 0x31628 jmp 0x31625 jmp 0x31625 movq %rax, %rbx leaq 0x192a1(%rip), %rax # 0x4a8d0 addq $0x10, %rax movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rdi testq %rdi, %rdi je 0x31645 callq 0x7210 movq %rbx, %rdi callq 0x7450 nop
_ZN9PycModule12loadFromFileEPKc: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 28h mov r14, rsi mov rbx, rdi lea r15, [rbp+var_28] mov rdi, r15; this call _ZN7PycFileC2EPKc; PycFile::PycFile(char const*) cmp qword ptr [r15+8], 0 jz loc_315BE lea rdi, [rbp+var_28]; this call _ZN7PycData5get32Ev; PycData::get32(void) mov rdi, rbx; this mov esi, eax; unsigned int call _ZN9PycModule10setVersionEj; PycModule::setVersion(uint) mov eax, [rbx+2Ch] test eax, eax js loc_315DB mov ecx, [rbx+30h] test ecx, ecx js loc_315DB add ecx, 0FFFFFFF9h lea edx, [rax-3] cmp eax, 3 cmovz edx, ecx test edx, edx js short loc_3154E lea rdi, [rbp+var_28]; this call _ZN7PycData5get32Ev; PycData::get32(void) test al, 1 jnz short loc_31569 loc_3154E: lea rdi, [rbp+var_28]; this call _ZN7PycData5get32Ev; PycData::get32(void) mov eax, [rbx+2Ch] cmp eax, 3 jnz short loc_31562 mov eax, [rbx+30h] loc_31562: cmp eax, 3 jge short loc_31572 jmp short loc_3157B loc_31569: lea rdi, [rbp+var_28]; this call _ZN7PycData5get32Ev; PycData::get32(void) loc_31572: lea rdi, [rbp+var_28]; this call _ZN7PycData5get32Ev; PycData::get32(void) loc_3157B: lea rdi, [rbp+var_30]; PycData * lea rsi, [rbp+var_28]; PycModule * mov rdx, rbx call _Z10LoadObjectP7PycDataP9PycModule; LoadObject(PycData *,PycModule *) lea rdi, [rbp+var_38] lea rsi, [rbp+var_30] call _ZNK6PycRefI9PycObjectE4castI7PycCodeEES_IT_Ev; PycRef<PycObject>::cast<PycCode>(void) mov rax, [rbp+var_38] mov [rbx+38h], rax mov [rbp+var_38], 0 mov rdi, [rbp+var_30] test rdi, rdi jz short loc_315E0 dec dword ptr [rdi+8] jnz short loc_315E0 mov rax, [rdi] call qword ptr [rax+8] jmp short loc_315E0 loc_315BE: mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aErrorOpeningFi_0; "Error opening file %s\n" mov rdx, r14 xor eax, eax call _fprintf jmp short loc_315E0 loc_315DB: call _ZN9PycModule12loadFromFileEPKc_cold_1; PycModule::loadFromFile(char const*) [clone] loc_315E0: lea rax, _ZTV7PycFile; `vtable for'PycFile add rax, 10h mov [rbp+var_28], rax mov rdi, [rbp+var_20] test rdi, rdi jz short loc_315FD call _fclose loc_315FD: add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rbp+var_30] test rdi, rdi jz short loc_31628 dec dword ptr [rdi+8] jnz short loc_31628 mov rax, [rdi] call qword ptr [rax+8] jmp short loc_31628 jmp short loc_31625 jmp short $+2 loc_31625: mov rbx, rax loc_31628: lea rax, _ZTV7PycFile; `vtable for'PycFile add rax, 10h mov [rbp+var_28], rax mov rdi, [rbp+var_20] test rdi, rdi jz short loc_31645 call _fclose loc_31645: mov rdi, rbx call __Unwind_Resume
long long * PycModule::loadFromFile(PycModule *this, const char *a2) { int v2; // eax int v3; // eax int v4; // ecx int v5; // ecx int v6; // edx int v7; // eax _DWORD *v8; // rdi long long *result; // rax long long v11; // [rsp+8h] [rbp-38h] BYREF _DWORD *v12; // [rsp+10h] [rbp-30h] BYREF long long *v13; // [rsp+18h] [rbp-28h] BYREF long long v14; // [rsp+20h] [rbp-20h] PycFile::PycFile((PycFile *)&v13, a2); if ( !v14 ) { fprintf(stderr, "Error opening file %s\n", a2); goto LABEL_19; } v2 = PycData::get32((PycData *)&v13); PycModule::setVersion(this, v2); v3 = *((_DWORD *)this + 11); if ( v3 < 0 || (v4 = *((_DWORD *)this + 12), v4 < 0) ) { PycModule::loadFromFile(); goto LABEL_19; } v5 = v4 - 7; v6 = v3 - 3; if ( v3 == 3 ) v6 = v5; if ( v6 >= 0 && (PycData::get32((PycData *)&v13) & 1) != 0 ) { PycData::get32((PycData *)&v13); } else { PycData::get32((PycData *)&v13); v7 = *((_DWORD *)this + 11); if ( v7 == 3 ) v7 = *((_DWORD *)this + 12); if ( v7 < 3 ) goto LABEL_14; } PycData::get32((PycData *)&v13); LABEL_14: LoadObject((PycData *)&v12, (PycModule *)&v13); PycRef<PycObject>::cast<PycCode>(&v11, (const void **)&v12); *((_QWORD *)this + 7) = v11; v11 = 0LL; v8 = v12; if ( v12 ) { if ( v12[2]-- == 1 ) (*(void ( **)(_DWORD *))(*(_QWORD *)v8 + 8LL))(v8); } LABEL_19: result = &`vtable for'PycFile + 2; v13 = &`vtable for'PycFile + 2; if ( v14 ) return (long long *)fclose(v14); return result; }
loadFromFile: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 MOV R14,RSI MOV RBX,RDI LEA R15,[RBP + -0x28] MOV RDI,R15 CALL 0x0012fbd2 CMP qword ptr [R15 + 0x8],0x0 JZ 0x001315be LAB_00131508: LEA RDI,[RBP + -0x28] CALL 0x0012fab8 MOV RDI,RBX MOV ESI,EAX CALL 0x00131080 MOV EAX,dword ptr [RBX + 0x2c] TEST EAX,EAX JS 0x001315db MOV ECX,dword ptr [RBX + 0x30] TEST ECX,ECX JS 0x001315db ADD ECX,-0x7 LEA EDX,[RAX + -0x3] CMP EAX,0x3 CMOVZ EDX,ECX TEST EDX,EDX JS 0x0013154e LAB_00131541: LEA RDI,[RBP + -0x28] CALL 0x0012fab8 TEST AL,0x1 JNZ 0x00131569 LAB_0013154e: LEA RDI,[RBP + -0x28] CALL 0x0012fab8 MOV EAX,dword ptr [RBX + 0x2c] CMP EAX,0x3 JNZ 0x00131562 MOV EAX,dword ptr [RBX + 0x30] LAB_00131562: CMP EAX,0x3 JGE 0x00131572 JMP 0x0013157b LAB_00131569: LEA RDI,[RBP + -0x28] CALL 0x0012fab8 LAB_00131572: LEA RDI,[RBP + -0x28] CALL 0x0012fab8 LAB_0013157b: LEA RDI,[RBP + -0x30] LEA RSI,[RBP + -0x28] MOV RDX,RBX CALL 0x00132f4c LAB_0013158b: LEA RDI,[RBP + -0x38] LEA RSI,[RBP + -0x30] CALL 0x0010b9d0 LAB_00131598: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBX + 0x38],RAX MOV qword ptr [RBP + -0x38],0x0 MOV RDI,qword ptr [RBP + -0x30] TEST RDI,RDI JZ 0x001315e0 DEC dword ptr [RDI + 0x8] JNZ 0x001315e0 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] JMP 0x001315e0 LAB_001315be: MOV RAX,qword ptr [0x0014af98] MOV RDI,qword ptr [RAX] LEA RSI,[0x13831c] MOV RDX,R14 XOR EAX,EAX CALL 0x00107320 JMP 0x001315e0 LAB_001315db: CALL 0x001094f1 LAB_001315e0: LEA RAX,[0x14a8d0] ADD RAX,0x10 MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x20] TEST RDI,RDI JZ 0x001315fd CALL 0x00107210 LAB_001315fd: ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET
/* PycModule::loadFromFile(char const*) */ void __thiscall PycModule::loadFromFile(PycModule *this,char *param_1) { long *plVar1; uint uVar2; int iVar3; ulong uVar4; int iVar5; PycModule *pPVar6; int8 local_40; long *local_38; int **local_30; FILE *local_28; PycFile::PycFile((PycFile *)&local_30,param_1); if (local_28 == (FILE *)0x0) { fprintf(*(FILE **)PTR_stderr_0014af98,"Error opening file %s\n",param_1); goto LAB_001315e0; } /* try { // try from 00131508 to 00131510 has its CatchHandler @ 00131623 */ uVar2 = PycData::get32((PycData *)&local_30); pPVar6 = this; setVersion(this,uVar2); iVar3 = *(int *)(this + 0x2c); if ((iVar3 < 0) || (*(int *)(this + 0x30) < 0)) { loadFromFile((char *)pPVar6); goto LAB_001315e0; } iVar5 = iVar3 + -3; if (iVar3 == 3) { iVar5 = *(int *)(this + 0x30) + -7; } /* try { // try from 00131541 to 0013157a has its CatchHandler @ 00131625 */ if ((iVar5 < 0) || (uVar4 = PycData::get32((PycData *)&local_30), (uVar4 & 1) == 0)) { PycData::get32((PycData *)&local_30); iVar3 = *(int *)(this + 0x2c); if (iVar3 == 3) { iVar3 = *(int *)(this + 0x30); } if (2 < iVar3) goto LAB_00131572; } else { PycData::get32((PycData *)&local_30); LAB_00131572: PycData::get32((PycData *)&local_30); } /* try { // try from 0013157b to 0013158a has its CatchHandler @ 00131621 */ LoadObject((PycData *)&local_38,(PycModule *)&local_30); /* try { // try from 0013158b to 00131597 has its CatchHandler @ 00131608 */ PycRef<PycObject>::cast<PycCode>(); *(int8 *)(this + 0x38) = local_40; if (local_38 != (long *)0x0) { plVar1 = local_38 + 1; *(int *)plVar1 = (int)*plVar1 + -1; if ((int)*plVar1 == 0) { (**(code **)(*local_38 + 8))(); } } LAB_001315e0: local_30 = &PTR__PycFile_0014a8e0; if (local_28 != (FILE *)0x0) { fclose(local_28); } return; }
23,564
my_numchars_mb
eloqsql/strings/ctype-mb.c
size_t my_numchars_mb(CHARSET_INFO *cs __attribute__((unused)), const char *pos, const char *end) { register size_t count= 0; while (pos < end) { uint mb_len; pos+= (mb_len= my_ismbchar(cs,pos,end)) ? mb_len : 1; count++; } return count; }
O3
c
my_numchars_mb: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax cmpq %rdx, %rsi jae 0x36649 movq %rdx, %rbx movq %rsi, %r15 movq %rdi, %r12 xorl %r14d, %r14d movl $0x1, %r13d movq 0xb8(%r12), %rax movq %r12, %rdi movq %r15, %rsi movq %rbx, %rdx callq *0xc0(%rax) cmpl $0x2, %eax cmovbl %r13d, %eax cmovll %r13d, %eax addq %rax, %r15 incq %r14 cmpq %rbx, %r15 jb 0x3661a jmp 0x3664c xorl %r14d, %r14d movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_numchars_mb: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax cmp rsi, rdx jnb short loc_36649 mov rbx, rdx mov r15, rsi mov r12, rdi xor r14d, r14d mov r13d, 1 loc_3661A: mov rax, [r12+0B8h] mov rdi, r12 mov rsi, r15 mov rdx, rbx call qword ptr [rax+0C0h] cmp eax, 2 cmovb eax, r13d cmovl eax, r13d add r15, rax inc r14 cmp r15, rbx jb short loc_3661A jmp short loc_3664C loc_36649: xor r14d, r14d loc_3664C: mov rax, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_numchars_mb(long long a1, unsigned long long a2, unsigned long long a3) { unsigned long long v4; // r15 long long v5; // r14 long long v6; // rax bool v7; // cc if ( a2 >= a3 ) return 0LL; v4 = a2; v5 = 0LL; do { v6 = (*(long long ( **)(long long, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v4, a3); v7 = (int)v6 < 2; if ( (unsigned int)v6 < 2 ) v6 = 1LL; if ( v7 ) v6 = 1LL; v4 += v6; ++v5; } while ( v4 < a3 ); return v5; }
my_numchars_mb: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX CMP RSI,RDX JNC 0x00136649 MOV RBX,RDX MOV R15,RSI MOV R12,RDI XOR R14D,R14D MOV R13D,0x1 LAB_0013661a: MOV RAX,qword ptr [R12 + 0xb8] MOV RDI,R12 MOV RSI,R15 MOV RDX,RBX CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 CMOVC EAX,R13D CMOVL EAX,R13D ADD R15,RAX INC R14 CMP R15,RBX JC 0x0013661a JMP 0x0013664c LAB_00136649: XOR R14D,R14D LAB_0013664c: MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_numchars_mb(long param_1,ulong param_2,ulong param_3) { uint uVar1; ulong uVar2; long lVar3; if (param_2 < param_3) { lVar3 = 0; do { uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3); uVar2 = (ulong)uVar1; if (uVar1 < 2) { uVar2 = 1; } if ((int)uVar1 < 2) { uVar2 = 1; } param_2 = param_2 + uVar2; lVar3 = lVar3 + 1; } while (param_2 < param_3); } else { lVar3 = 0; } return lVar3; }
23,565
utf8_encode_len
bluesky950520[P]quickjs/cutils.c
size_t utf8_encode_len(uint32_t c) { if (c < 0x80) return 1; if (c < 0x800) return 2; if (c < 0x10000) return 3; if (c < 0x110000) return 4; return 3; }
O2
c
utf8_encode_len: cmpl $0x80, %edi jae 0x19a6a pushq $0x1 jmp 0x19a80 cmpl $0x800, %edi # imm = 0x800 jae 0x19a76 pushq $0x2 jmp 0x19a80 cmpl $0x10000, %edi # imm = 0x10000 jae 0x19a82 pushq $0x3 popq %rax retq xorl %eax, %eax cmpl $0x110000, %edi # imm = 0x110000 adcq $0x3, %rax retq
utf8_encode_len: cmp edi, 80h jnb short loc_19A6A push 1 jmp short loc_19A80 loc_19A6A: cmp edi, 800h jnb short loc_19A76 push 2 jmp short loc_19A80 loc_19A76: cmp edi, 10000h jnb short loc_19A82 push 3 loc_19A80: pop rax retn loc_19A82: xor eax, eax cmp edi, 110000h adc rax, 3 retn
long long utf8_encode_len(unsigned int a1) { if ( a1 < 0x80 ) return 1LL; if ( a1 < 0x800 ) return 2LL; if ( a1 < 0x10000 ) return 3LL; return (a1 < 0x110000) + 3LL; }
utf8_encode_len: CMP EDI,0x80 JNC 0x00119a6a PUSH 0x1 JMP 0x00119a80 LAB_00119a6a: CMP EDI,0x800 JNC 0x00119a76 PUSH 0x2 JMP 0x00119a80 LAB_00119a76: CMP EDI,0x10000 JNC 0x00119a82 PUSH 0x3 LAB_00119a80: POP RAX RET LAB_00119a82: XOR EAX,EAX CMP EDI,0x110000 ADC RAX,0x3 RET
char utf8_encode_len(uint param_1) { char cVar1; if (param_1 < 0x80) { cVar1 = '\x01'; } else if (param_1 < 0x800) { cVar1 = '\x02'; } else { if (0xffff < param_1) { return (param_1 < 0x110000) + '\x03'; } cVar1 = '\x03'; } return cVar1; }
23,566
utf8_encode_len
bluesky950520[P]quickjs/cutils.c
size_t utf8_encode_len(uint32_t c) { if (c < 0x80) return 1; if (c < 0x800) return 2; if (c < 0x10000) return 3; if (c < 0x110000) return 4; return 3; }
O3
c
utf8_encode_len: movl $0x1, %eax cmpl $0x80, %edi jb 0x1ffbf movl $0x2, %eax cmpl $0x800, %edi # imm = 0x800 jb 0x1ffbf movl $0x3, %eax cmpl $0x10000, %edi # imm = 0x10000 jb 0x1ffbf xorl %eax, %eax cmpl $0x110000, %edi # imm = 0x110000 adcq $0x3, %rax retq
utf8_encode_len: mov eax, 1 cmp edi, 80h jb short locret_1FFBF mov eax, 2 cmp edi, 800h jb short locret_1FFBF mov eax, 3 cmp edi, 10000h jb short locret_1FFBF xor eax, eax cmp edi, 110000h adc rax, 3 locret_1FFBF: retn
long long utf8_encode_len(unsigned int a1) { long long result; // rax result = 1LL; if ( a1 >= 0x80 ) { result = 2LL; if ( a1 >= 0x800 ) { result = 3LL; if ( a1 >= 0x10000 ) return (a1 < 0x110000) + 3LL; } } return result; }
utf8_encode_len: MOV EAX,0x1 CMP EDI,0x80 JC 0x0011ffbf MOV EAX,0x2 CMP EDI,0x800 JC 0x0011ffbf MOV EAX,0x3 CMP EDI,0x10000 JC 0x0011ffbf XOR EAX,EAX CMP EDI,0x110000 ADC RAX,0x3 LAB_0011ffbf: RET
char utf8_encode_len(uint param_1) { char cVar1; cVar1 = '\x01'; if (((0x7f < param_1) && (cVar1 = '\x02', 0x7ff < param_1)) && (cVar1 = '\x03', 0xffff < param_1)) { cVar1 = (param_1 < 0x110000) + '\x03'; } return cVar1; }
23,567
ftxui::color(ftxui::Color, std::shared_ptr<ftxui::Node>)
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/dom/color.cpp
Element color(Color color, Element child) { return std::make_shared<FgColor>(std::move(child), color); }
O1
cpp
ftxui::color(ftxui::Color, std::shared_ptr<ftxui::Node>): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdx, %r12 movl %esi, %ebp movq %rdi, %r14 movl $0x70, %edi callq 0xb3e0 movq %rax, %rbx movabsq $0x100000001, %rax # imm = 0x100000001 movq %rax, 0x8(%rbx) leaq 0x355a6(%rip), %rax # 0x58290 movq %rax, (%rbx) movq %rbx, %r15 addq $0x10, %r15 movups (%r12), %xmm0 xorps %xmm1, %xmm1 movups %xmm1, (%r12) movq %rsp, %rsi movups %xmm0, (%rsi) movq %r15, %rdi callq 0x23124 movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x22d1e callq 0x14c7c leaq 0x355bb(%rip), %rax # 0x582e0 movq %rax, 0x10(%rbx) movl %ebp, 0x6c(%rbx) movq %r15, (%r14) movq %rbx, 0x8(%r14) movq %r14, %rax addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x22d55 callq 0x14c7c movl $0x70, %esi movq %rbx, %rdi callq 0xb400 movq %r14, %rdi callq 0xb780
_ZN5ftxui5colorENS_5ColorESt10shared_ptrINS_4NodeEE: push rbp push r15 push r14 push r12 push rbx sub rsp, 10h mov r12, rdx mov ebp, esi mov r14, rdi mov edi, 70h ; 'p'; unsigned __int64 call __Znwm; operator new(ulong) mov rbx, rax mov rax, 100000001h mov [rbx+8], rax lea rax, off_58290 mov [rbx], rax mov r15, rbx add r15, 10h movups xmm0, xmmword ptr [r12] xorps xmm1, xmm1 movups xmmword ptr [r12], xmm1 mov rsi, rsp movups xmmword ptr [rsi], xmm0 mov rdi, r15 call _ZN5ftxui13NodeDecoratorC2ESt10shared_ptrINS_4NodeEE; ftxui::NodeDecorator::NodeDecorator(std::shared_ptr<ftxui::Node>) mov rdi, [rsp+38h+var_30] test rdi, rdi jz short loc_22D1E call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_22D1E: lea rax, off_582E0 mov [rbx+10h], rax mov [rbx+6Ch], ebp mov [r14], r15 mov [r14+8], rbx mov rax, r14 add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, [rsp+arg_0] test rdi, rdi jz short loc_22D55 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_22D55: mov esi, 70h ; 'p'; unsigned __int64 mov rdi, rbx; void * call __ZdlPvm; operator delete(void *,ulong) mov rdi, r14 call __Unwind_Resume
_QWORD * ftxui::color(_QWORD *a1, int a2, __int128 *a3) { long long v4; // rbx __int128 v5; // xmm0 int v6; // edx int v7; // ecx int v8; // r8d int v9; // r9d long long v11; // [rsp+0h] [rbp-38h] BYREF volatile signed __int32 *v12; // [rsp+8h] [rbp-30h] char v13; // [rsp+10h] [rbp-28h] v4 = operator new(0x70uLL); *(_QWORD *)(v4 + 8) = 0x100000001LL; *(_QWORD *)v4 = off_58290; v5 = *a3; *a3 = 0LL; ftxui::NodeDecorator::NodeDecorator(v4 + 16, (unsigned int)&v11, v6, v7, v8, v9, v5, *((long long *)&v5 + 1), v13); if ( v12 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v12); *(_QWORD *)(v4 + 16) = off_582E0; *(_DWORD *)(v4 + 108) = a2; *a1 = v4 + 16; a1[1] = v4; return a1; }
color: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R12,RDX MOV EBP,ESI MOV R14,RDI MOV EDI,0x70 CALL 0x0010b3e0 MOV RBX,RAX MOV RAX,0x100000001 MOV qword ptr [RBX + 0x8],RAX LEA RAX,[0x158290] MOV qword ptr [RBX],RAX MOV R15,RBX ADD R15,0x10 MOVUPS XMM0,xmmword ptr [R12] XORPS XMM1,XMM1 MOVUPS xmmword ptr [R12],XMM1 MOV RSI,RSP MOVUPS xmmword ptr [RSI],XMM0 LAB_00122d07: MOV RDI,R15 CALL 0x00123124 LAB_00122d0f: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x00122d1e CALL 0x00114c7c LAB_00122d1e: LEA RAX,[0x1582e0] MOV qword ptr [RBX + 0x10],RAX MOV dword ptr [RBX + 0x6c],EBP MOV qword ptr [R14],R15 MOV qword ptr [R14 + 0x8],RBX MOV RAX,R14 ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* ftxui::color(ftxui::Color, std::shared_ptr<ftxui::Node>) */ ftxui * __thiscall ftxui::color(ftxui *this,int4 param_2,int8 *param_3) { _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *this_00; int8 *puVar1; puVar1 = (int8 *)operator_new(0x70); puVar1[1] = 0x100000001; *puVar1 = &PTR___Sp_counted_ptr_inplace_00158290; this_00 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_3[1]; *param_3 = 0; param_3[1] = 0; /* try { // try from 00122d07 to 00122d0e has its CatchHandler @ 00122d43 */ NodeDecorator::NodeDecorator((NodeDecorator *)(puVar1 + 2)); if (this_00 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(this_00); } puVar1[2] = &PTR__Node_001582e0; *(int4 *)((long)puVar1 + 0x6c) = param_2; *(NodeDecorator **)this = (NodeDecorator *)(puVar1 + 2); *(int8 **)(this + 8) = puVar1; return this; }
23,568
google::protobuf::FileDescriptorProto::InternalSwap(google::protobuf::FileDescriptorProto*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/metadata_lite.h
PROTOBUF_ALWAYS_INLINE bool HasUnknownFieldsTag() const { return ptr_ & kUnknownFieldsTagMask; }
O3
c
google::protobuf::FileDescriptorProto::InternalSwap(google::protobuf::FileDescriptorProto*): movq 0x8(%rdi), %rax movq 0x8(%rsi), %rcx movq %rcx, 0x8(%rdi) movq %rax, 0x8(%rsi) movl 0x10(%rdi), %eax movl 0x10(%rsi), %ecx movl %ecx, 0x10(%rdi) movl %eax, 0x10(%rsi) movq 0x18(%rsi), %rax movq 0x28(%rsi), %rcx movq 0x18(%rdi), %rdx movq 0x28(%rdi), %r8 movq %rdx, 0x18(%rsi) movq %r8, 0x28(%rsi) movq %rax, 0x18(%rdi) movq 0x20(%rsi), %rax movq 0x20(%rdi), %rdx movq %rdx, 0x20(%rsi) movq %rax, 0x20(%rdi) movq %rcx, 0x28(%rdi) movq 0x30(%rsi), %rax movq 0x40(%rsi), %rcx movq 0x30(%rdi), %rdx movq 0x40(%rdi), %r8 movq %rdx, 0x30(%rsi) movq %r8, 0x40(%rsi) movq %rax, 0x30(%rdi) movq 0x38(%rsi), %rax movq 0x38(%rdi), %rdx movq %rdx, 0x38(%rsi) movq %rax, 0x38(%rdi) movq %rcx, 0x40(%rdi) movq 0x48(%rsi), %rax movq 0x58(%rsi), %rcx movq 0x48(%rdi), %rdx movq 0x58(%rdi), %r8 movq %rdx, 0x48(%rsi) movq %r8, 0x58(%rsi) movq %rax, 0x48(%rdi) movq 0x50(%rsi), %rax movq 0x50(%rdi), %rdx movq %rdx, 0x50(%rsi) movq %rax, 0x50(%rdi) movq %rcx, 0x58(%rdi) movq 0x60(%rsi), %rax movq 0x70(%rsi), %rcx movq 0x60(%rdi), %rdx movq 0x70(%rdi), %r8 movq %rdx, 0x60(%rsi) movq %r8, 0x70(%rsi) movq %rax, 0x60(%rdi) movq 0x68(%rsi), %rax movq 0x68(%rdi), %rdx movq %rdx, 0x68(%rsi) movq %rax, 0x68(%rdi) movq %rcx, 0x70(%rdi) movq 0x78(%rsi), %rax movq 0x88(%rsi), %rcx movq 0x78(%rdi), %rdx movq 0x88(%rdi), %r8 movq %rdx, 0x78(%rsi) movq %r8, 0x88(%rsi) movq %rax, 0x78(%rdi) movq 0x80(%rsi), %rax movq 0x80(%rdi), %rdx movq %rdx, 0x80(%rsi) movq %rax, 0x80(%rdi) movq %rcx, 0x88(%rdi) movq 0x90(%rsi), %rax movq 0xa0(%rsi), %rcx movq 0x90(%rdi), %rdx movq 0xa0(%rdi), %r8 movq %rdx, 0x90(%rsi) movq %r8, 0xa0(%rsi) movq %rax, 0x90(%rdi) movq 0x98(%rsi), %rax movq 0x98(%rdi), %rdx movq %rdx, 0x98(%rsi) movq %rax, 0x98(%rdi) movq %rcx, 0xa0(%rdi) movq 0xa8(%rsi), %rax movq 0xb8(%rsi), %rcx movq 0xa8(%rdi), %rdx movq 0xb8(%rdi), %r8 movq %rdx, 0xa8(%rsi) movq %r8, 0xb8(%rsi) movq %rax, 0xa8(%rdi) movq 0xb0(%rsi), %rax movq 0xb0(%rdi), %rdx movq %rdx, 0xb0(%rsi) movq %rax, 0xb0(%rdi) movq %rcx, 0xb8(%rdi) movq 0xc0(%rsi), %rax movq 0xd0(%rsi), %rcx movq 0xc0(%rdi), %rdx movq 0xd0(%rdi), %r8 movq %rdx, 0xc0(%rsi) movq %r8, 0xd0(%rsi) movq %rax, 0xc0(%rdi) movq 0xc8(%rsi), %rax movq 0xc8(%rdi), %rdx movq %rdx, 0xc8(%rsi) movq %rax, 0xc8(%rdi) movq %rcx, 0xd0(%rdi) movq 0xd8(%rsi), %rax movq 0xd8(%rdi), %rcx movq %rcx, 0xd8(%rsi) movq %rax, 0xd8(%rdi) movq 0xe0(%rdi), %rax movq 0xe0(%rsi), %rcx movq %rcx, 0xe0(%rdi) movq %rax, 0xe0(%rsi) retq nop
_ZN6google8protobuf15DescriptorProto12InternalSwapEPS1_: mov rax, [rdi+8] mov rcx, [rsi+8] mov [rdi+8], rcx mov [rsi+8], rax mov eax, [rdi+10h] mov ecx, [rsi+10h] mov [rdi+10h], ecx mov [rsi+10h], eax mov rax, [rsi+18h] mov rcx, [rsi+28h] mov rdx, [rdi+18h] mov r8, [rdi+28h] mov [rsi+18h], rdx mov [rsi+28h], r8 mov [rdi+18h], rax mov rax, [rsi+20h] mov rdx, [rdi+20h] mov [rsi+20h], rdx mov [rdi+20h], rax mov [rdi+28h], rcx mov rax, [rsi+30h] mov rcx, [rsi+40h] mov rdx, [rdi+30h] mov r8, [rdi+40h] mov [rsi+30h], rdx mov [rsi+40h], r8 mov [rdi+30h], rax mov rax, [rsi+38h] mov rdx, [rdi+38h] mov [rsi+38h], rdx mov [rdi+38h], rax mov [rdi+40h], rcx mov rax, [rsi+48h] mov rcx, [rsi+58h] mov rdx, [rdi+48h] mov r8, [rdi+58h] mov [rsi+48h], rdx mov [rsi+58h], r8 mov [rdi+48h], rax mov rax, [rsi+50h] mov rdx, [rdi+50h] mov [rsi+50h], rdx mov [rdi+50h], rax mov [rdi+58h], rcx mov rax, [rsi+60h] mov rcx, [rsi+70h] mov rdx, [rdi+60h] mov r8, [rdi+70h] mov [rsi+60h], rdx mov [rsi+70h], r8 mov [rdi+60h], rax mov rax, [rsi+68h] mov rdx, [rdi+68h] mov [rsi+68h], rdx mov [rdi+68h], rax mov [rdi+70h], rcx mov rax, [rsi+78h] mov rcx, [rsi+88h] mov rdx, [rdi+78h] mov r8, [rdi+88h] mov [rsi+78h], rdx mov [rsi+88h], r8 mov [rdi+78h], rax mov rax, [rsi+80h] mov rdx, [rdi+80h] mov [rsi+80h], rdx mov [rdi+80h], rax mov [rdi+88h], rcx mov rax, [rsi+90h] mov rcx, [rsi+0A0h] mov rdx, [rdi+90h] mov r8, [rdi+0A0h] mov [rsi+90h], rdx mov [rsi+0A0h], r8 mov [rdi+90h], rax mov rax, [rsi+98h] mov rdx, [rdi+98h] mov [rsi+98h], rdx mov [rdi+98h], rax mov [rdi+0A0h], rcx mov rax, [rsi+0A8h] mov rcx, [rsi+0B8h] mov rdx, [rdi+0A8h] mov r8, [rdi+0B8h] mov [rsi+0A8h], rdx mov [rsi+0B8h], r8 mov [rdi+0A8h], rax mov rax, [rsi+0B0h] mov rdx, [rdi+0B0h] mov [rsi+0B0h], rdx mov [rdi+0B0h], rax mov [rdi+0B8h], rcx mov rax, [rsi+0C0h] mov rcx, [rsi+0D0h] mov rdx, [rdi+0C0h] mov r8, [rdi+0D0h] mov [rsi+0C0h], rdx mov [rsi+0D0h], r8 mov [rdi+0C0h], rax mov rax, [rsi+0C8h] mov rdx, [rdi+0C8h] mov [rsi+0C8h], rdx mov [rdi+0C8h], rax mov [rdi+0D0h], rcx mov rax, [rsi+0D8h] mov rcx, [rdi+0D8h] mov [rsi+0D8h], rcx mov [rdi+0D8h], rax mov rax, [rdi+0E0h] mov rcx, [rsi+0E0h] mov [rdi+0E0h], rcx mov [rsi+0E0h], rax retn
long long google::protobuf::DescriptorProto::InternalSwap( google::protobuf::DescriptorProto *this, google::protobuf::DescriptorProto *a2) { long long v2; // rax long long v3; // rax long long v4; // rcx long long v5; // r8 long long v6; // rax long long v7; // rax long long v8; // rcx long long v9; // r8 long long v10; // rax long long v11; // rax long long v12; // rcx long long v13; // r8 long long v14; // rax long long v15; // rax long long v16; // rcx long long v17; // r8 long long v18; // rax long long v19; // rax long long v20; // rcx long long v21; // r8 long long v22; // rax long long v23; // rax long long v24; // rcx long long v25; // r8 long long v26; // rax long long v27; // rax long long v28; // rcx long long v29; // r8 long long v30; // rax long long v31; // rax long long v32; // rcx long long v33; // r8 long long v34; // rax long long v35; // rax long long result; // rax v2 = *((_QWORD *)this + 1); *((_QWORD *)this + 1) = *((_QWORD *)a2 + 1); *((_QWORD *)a2 + 1) = v2; LODWORD(v2) = *((_DWORD *)this + 4); *((_DWORD *)this + 4) = *((_DWORD *)a2 + 4); *((_DWORD *)a2 + 4) = v2; v3 = *((_QWORD *)a2 + 3); v4 = *((_QWORD *)a2 + 5); v5 = *((_QWORD *)this + 5); *((_QWORD *)a2 + 3) = *((_QWORD *)this + 3); *((_QWORD *)a2 + 5) = v5; *((_QWORD *)this + 3) = v3; v6 = *((_QWORD *)a2 + 4); *((_QWORD *)a2 + 4) = *((_QWORD *)this + 4); *((_QWORD *)this + 4) = v6; *((_QWORD *)this + 5) = v4; v7 = *((_QWORD *)a2 + 6); v8 = *((_QWORD *)a2 + 8); v9 = *((_QWORD *)this + 8); *((_QWORD *)a2 + 6) = *((_QWORD *)this + 6); *((_QWORD *)a2 + 8) = v9; *((_QWORD *)this + 6) = v7; v10 = *((_QWORD *)a2 + 7); *((_QWORD *)a2 + 7) = *((_QWORD *)this + 7); *((_QWORD *)this + 7) = v10; *((_QWORD *)this + 8) = v8; v11 = *((_QWORD *)a2 + 9); v12 = *((_QWORD *)a2 + 11); v13 = *((_QWORD *)this + 11); *((_QWORD *)a2 + 9) = *((_QWORD *)this + 9); *((_QWORD *)a2 + 11) = v13; *((_QWORD *)this + 9) = v11; v14 = *((_QWORD *)a2 + 10); *((_QWORD *)a2 + 10) = *((_QWORD *)this + 10); *((_QWORD *)this + 10) = v14; *((_QWORD *)this + 11) = v12; v15 = *((_QWORD *)a2 + 12); v16 = *((_QWORD *)a2 + 14); v17 = *((_QWORD *)this + 14); *((_QWORD *)a2 + 12) = *((_QWORD *)this + 12); *((_QWORD *)a2 + 14) = v17; *((_QWORD *)this + 12) = v15; v18 = *((_QWORD *)a2 + 13); *((_QWORD *)a2 + 13) = *((_QWORD *)this + 13); *((_QWORD *)this + 13) = v18; *((_QWORD *)this + 14) = v16; v19 = *((_QWORD *)a2 + 15); v20 = *((_QWORD *)a2 + 17); v21 = *((_QWORD *)this + 17); *((_QWORD *)a2 + 15) = *((_QWORD *)this + 15); *((_QWORD *)a2 + 17) = v21; *((_QWORD *)this + 15) = v19; v22 = *((_QWORD *)a2 + 16); *((_QWORD *)a2 + 16) = *((_QWORD *)this + 16); *((_QWORD *)this + 16) = v22; *((_QWORD *)this + 17) = v20; v23 = *((_QWORD *)a2 + 18); v24 = *((_QWORD *)a2 + 20); v25 = *((_QWORD *)this + 20); *((_QWORD *)a2 + 18) = *((_QWORD *)this + 18); *((_QWORD *)a2 + 20) = v25; *((_QWORD *)this + 18) = v23; v26 = *((_QWORD *)a2 + 19); *((_QWORD *)a2 + 19) = *((_QWORD *)this + 19); *((_QWORD *)this + 19) = v26; *((_QWORD *)this + 20) = v24; v27 = *((_QWORD *)a2 + 21); v28 = *((_QWORD *)a2 + 23); v29 = *((_QWORD *)this + 23); *((_QWORD *)a2 + 21) = *((_QWORD *)this + 21); *((_QWORD *)a2 + 23) = v29; *((_QWORD *)this + 21) = v27; v30 = *((_QWORD *)a2 + 22); *((_QWORD *)a2 + 22) = *((_QWORD *)this + 22); *((_QWORD *)this + 22) = v30; *((_QWORD *)this + 23) = v28; v31 = *((_QWORD *)a2 + 24); v32 = *((_QWORD *)a2 + 26); v33 = *((_QWORD *)this + 26); *((_QWORD *)a2 + 24) = *((_QWORD *)this + 24); *((_QWORD *)a2 + 26) = v33; *((_QWORD *)this + 24) = v31; v34 = *((_QWORD *)a2 + 25); *((_QWORD *)a2 + 25) = *((_QWORD *)this + 25); *((_QWORD *)this + 25) = v34; *((_QWORD *)this + 26) = v32; v35 = *((_QWORD *)a2 + 27); *((_QWORD *)a2 + 27) = *((_QWORD *)this + 27); *((_QWORD *)this + 27) = v35; result = *((_QWORD *)this + 28); *((_QWORD *)this + 28) = *((_QWORD *)a2 + 28); *((_QWORD *)a2 + 28) = result; return result; }
InternalSwap: MOV RAX,qword ptr [RDI + 0x8] MOV RCX,qword ptr [RSI + 0x8] MOV qword ptr [RDI + 0x8],RCX MOV qword ptr [RSI + 0x8],RAX MOV EAX,dword ptr [RDI + 0x10] MOV ECX,dword ptr [RSI + 0x10] MOV dword ptr [RDI + 0x10],ECX MOV dword ptr [RSI + 0x10],EAX MOV RAX,qword ptr [RSI + 0x18] MOV RCX,qword ptr [RSI + 0x28] MOV RDX,qword ptr [RDI + 0x18] MOV R8,qword ptr [RDI + 0x28] MOV qword ptr [RSI + 0x18],RDX MOV qword ptr [RSI + 0x28],R8 MOV qword ptr [RDI + 0x18],RAX MOV RAX,qword ptr [RSI + 0x20] MOV RDX,qword ptr [RDI + 0x20] MOV qword ptr [RSI + 0x20],RDX MOV qword ptr [RDI + 0x20],RAX MOV qword ptr [RDI + 0x28],RCX MOV RAX,qword ptr [RSI + 0x30] MOV RCX,qword ptr [RSI + 0x40] MOV RDX,qword ptr [RDI + 0x30] MOV R8,qword ptr [RDI + 0x40] MOV qword ptr [RSI + 0x30],RDX MOV qword ptr [RSI + 0x40],R8 MOV qword ptr [RDI + 0x30],RAX MOV RAX,qword ptr [RSI + 0x38] MOV RDX,qword ptr [RDI + 0x38] MOV qword ptr [RSI + 0x38],RDX MOV qword ptr [RDI + 0x38],RAX MOV qword ptr [RDI + 0x40],RCX MOV RAX,qword ptr [RSI + 0x48] MOV RCX,qword ptr [RSI + 0x58] MOV RDX,qword ptr [RDI + 0x48] MOV R8,qword ptr [RDI + 0x58] MOV qword ptr [RSI + 0x48],RDX MOV qword ptr [RSI + 0x58],R8 MOV qword ptr [RDI + 0x48],RAX MOV RAX,qword ptr [RSI + 0x50] MOV RDX,qword ptr [RDI + 0x50] MOV qword ptr [RSI + 0x50],RDX MOV qword ptr [RDI + 0x50],RAX MOV qword ptr [RDI + 0x58],RCX MOV RAX,qword ptr [RSI + 0x60] MOV RCX,qword ptr [RSI + 0x70] MOV RDX,qword ptr [RDI + 0x60] MOV R8,qword ptr [RDI + 0x70] MOV qword ptr [RSI + 0x60],RDX MOV qword ptr [RSI + 0x70],R8 MOV qword ptr [RDI + 0x60],RAX MOV RAX,qword ptr [RSI + 0x68] MOV RDX,qword ptr [RDI + 0x68] MOV qword ptr [RSI + 0x68],RDX MOV qword ptr [RDI + 0x68],RAX MOV qword ptr [RDI + 0x70],RCX MOV RAX,qword ptr [RSI + 0x78] MOV RCX,qword ptr [RSI + 0x88] MOV RDX,qword ptr [RDI + 0x78] MOV R8,qword ptr [RDI + 0x88] MOV qword ptr [RSI + 0x78],RDX MOV qword ptr [RSI + 0x88],R8 MOV qword ptr [RDI + 0x78],RAX MOV RAX,qword ptr [RSI + 0x80] MOV RDX,qword ptr [RDI + 0x80] MOV qword ptr [RSI + 0x80],RDX MOV qword ptr [RDI + 0x80],RAX MOV qword ptr [RDI + 0x88],RCX MOV RAX,qword ptr [RSI + 0x90] MOV RCX,qword ptr [RSI + 0xa0] MOV RDX,qword ptr [RDI + 0x90] MOV R8,qword ptr [RDI + 0xa0] MOV qword ptr [RSI + 0x90],RDX MOV qword ptr [RSI + 0xa0],R8 MOV qword ptr [RDI + 0x90],RAX MOV RAX,qword ptr [RSI + 0x98] MOV RDX,qword ptr [RDI + 0x98] MOV qword ptr [RSI + 0x98],RDX MOV qword ptr [RDI + 0x98],RAX MOV qword ptr [RDI + 0xa0],RCX MOV RAX,qword ptr [RSI + 0xa8] MOV RCX,qword ptr [RSI + 0xb8] MOV RDX,qword ptr [RDI + 0xa8] MOV R8,qword ptr [RDI + 0xb8] MOV qword ptr [RSI + 0xa8],RDX MOV qword ptr [RSI + 0xb8],R8 MOV qword ptr [RDI + 0xa8],RAX MOV RAX,qword ptr [RSI + 0xb0] MOV RDX,qword ptr [RDI + 0xb0] MOV qword ptr [RSI + 0xb0],RDX MOV qword ptr [RDI + 0xb0],RAX MOV qword ptr [RDI + 0xb8],RCX MOV RAX,qword ptr [RSI + 0xc0] MOV RCX,qword ptr [RSI + 0xd0] MOV RDX,qword ptr [RDI + 0xc0] MOV R8,qword ptr [RDI + 0xd0] MOV qword ptr [RSI + 0xc0],RDX MOV qword ptr [RSI + 0xd0],R8 MOV qword ptr [RDI + 0xc0],RAX MOV RAX,qword ptr [RSI + 0xc8] MOV RDX,qword ptr [RDI + 0xc8] MOV qword ptr [RSI + 0xc8],RDX MOV qword ptr [RDI + 0xc8],RAX MOV qword ptr [RDI + 0xd0],RCX MOV RAX,qword ptr [RSI + 0xd8] MOV RCX,qword ptr [RDI + 0xd8] MOV qword ptr [RSI + 0xd8],RCX MOV qword ptr [RDI + 0xd8],RAX MOV RAX,qword ptr [RDI + 0xe0] MOV RCX,qword ptr [RSI + 0xe0] MOV qword ptr [RDI + 0xe0],RCX MOV qword ptr [RSI + 0xe0],RAX RET
/* google::protobuf::DescriptorProto::InternalSwap(google::protobuf::DescriptorProto*) */ void __thiscall google::protobuf::DescriptorProto::InternalSwap(DescriptorProto *this,DescriptorProto *param_1) { int4 uVar1; int8 uVar2; int8 uVar3; int8 uVar4; uVar2 = *(int8 *)(this + 8); *(int8 *)(this + 8) = *(int8 *)(param_1 + 8); *(int8 *)(param_1 + 8) = uVar2; uVar1 = *(int4 *)(this + 0x10); *(int4 *)(this + 0x10) = *(int4 *)(param_1 + 0x10); *(int4 *)(param_1 + 0x10) = uVar1; uVar2 = *(int8 *)(param_1 + 0x18); uVar3 = *(int8 *)(param_1 + 0x28); uVar4 = *(int8 *)(this + 0x28); *(int8 *)(param_1 + 0x18) = *(int8 *)(this + 0x18); *(int8 *)(param_1 + 0x28) = uVar4; *(int8 *)(this + 0x18) = uVar2; uVar2 = *(int8 *)(param_1 + 0x20); *(int8 *)(param_1 + 0x20) = *(int8 *)(this + 0x20); *(int8 *)(this + 0x20) = uVar2; *(int8 *)(this + 0x28) = uVar3; uVar2 = *(int8 *)(param_1 + 0x30); uVar3 = *(int8 *)(param_1 + 0x40); uVar4 = *(int8 *)(this + 0x40); *(int8 *)(param_1 + 0x30) = *(int8 *)(this + 0x30); *(int8 *)(param_1 + 0x40) = uVar4; *(int8 *)(this + 0x30) = uVar2; uVar2 = *(int8 *)(param_1 + 0x38); *(int8 *)(param_1 + 0x38) = *(int8 *)(this + 0x38); *(int8 *)(this + 0x38) = uVar2; *(int8 *)(this + 0x40) = uVar3; uVar2 = *(int8 *)(param_1 + 0x48); uVar3 = *(int8 *)(param_1 + 0x58); uVar4 = *(int8 *)(this + 0x58); *(int8 *)(param_1 + 0x48) = *(int8 *)(this + 0x48); *(int8 *)(param_1 + 0x58) = uVar4; *(int8 *)(this + 0x48) = uVar2; uVar2 = *(int8 *)(param_1 + 0x50); *(int8 *)(param_1 + 0x50) = *(int8 *)(this + 0x50); *(int8 *)(this + 0x50) = uVar2; *(int8 *)(this + 0x58) = uVar3; uVar2 = *(int8 *)(param_1 + 0x60); uVar3 = *(int8 *)(param_1 + 0x70); uVar4 = *(int8 *)(this + 0x70); *(int8 *)(param_1 + 0x60) = *(int8 *)(this + 0x60); *(int8 *)(param_1 + 0x70) = uVar4; *(int8 *)(this + 0x60) = uVar2; uVar2 = *(int8 *)(param_1 + 0x68); *(int8 *)(param_1 + 0x68) = *(int8 *)(this + 0x68); *(int8 *)(this + 0x68) = uVar2; *(int8 *)(this + 0x70) = uVar3; uVar2 = *(int8 *)(param_1 + 0x78); uVar3 = *(int8 *)(param_1 + 0x88); uVar4 = *(int8 *)(this + 0x88); *(int8 *)(param_1 + 0x78) = *(int8 *)(this + 0x78); *(int8 *)(param_1 + 0x88) = uVar4; *(int8 *)(this + 0x78) = uVar2; uVar2 = *(int8 *)(param_1 + 0x80); *(int8 *)(param_1 + 0x80) = *(int8 *)(this + 0x80); *(int8 *)(this + 0x80) = uVar2; *(int8 *)(this + 0x88) = uVar3; uVar2 = *(int8 *)(param_1 + 0x90); uVar3 = *(int8 *)(param_1 + 0xa0); uVar4 = *(int8 *)(this + 0xa0); *(int8 *)(param_1 + 0x90) = *(int8 *)(this + 0x90); *(int8 *)(param_1 + 0xa0) = uVar4; *(int8 *)(this + 0x90) = uVar2; uVar2 = *(int8 *)(param_1 + 0x98); *(int8 *)(param_1 + 0x98) = *(int8 *)(this + 0x98); *(int8 *)(this + 0x98) = uVar2; *(int8 *)(this + 0xa0) = uVar3; uVar2 = *(int8 *)(param_1 + 0xa8); uVar3 = *(int8 *)(param_1 + 0xb8); uVar4 = *(int8 *)(this + 0xb8); *(int8 *)(param_1 + 0xa8) = *(int8 *)(this + 0xa8); *(int8 *)(param_1 + 0xb8) = uVar4; *(int8 *)(this + 0xa8) = uVar2; uVar2 = *(int8 *)(param_1 + 0xb0); *(int8 *)(param_1 + 0xb0) = *(int8 *)(this + 0xb0); *(int8 *)(this + 0xb0) = uVar2; *(int8 *)(this + 0xb8) = uVar3; uVar2 = *(int8 *)(param_1 + 0xc0); uVar3 = *(int8 *)(param_1 + 0xd0); uVar4 = *(int8 *)(this + 0xd0); *(int8 *)(param_1 + 0xc0) = *(int8 *)(this + 0xc0); *(int8 *)(param_1 + 0xd0) = uVar4; *(int8 *)(this + 0xc0) = uVar2; uVar2 = *(int8 *)(param_1 + 200); *(int8 *)(param_1 + 200) = *(int8 *)(this + 200); *(int8 *)(this + 200) = uVar2; *(int8 *)(this + 0xd0) = uVar3; uVar2 = *(int8 *)(param_1 + 0xd8); *(int8 *)(param_1 + 0xd8) = *(int8 *)(this + 0xd8); *(int8 *)(this + 0xd8) = uVar2; uVar2 = *(int8 *)(this + 0xe0); *(int8 *)(this + 0xe0) = *(int8 *)(param_1 + 0xe0); *(int8 *)(param_1 + 0xe0) = uVar2; return; }
23,569
isSelectionEvent
untodesu[P]riteg/build_O0/_deps/glfw-src/src/x11_window.c
static Bool isSelectionEvent(Display* display, XEvent* event, XPointer pointer) { if (event->xany.window != _glfw.x11.helperWindowHandle) return False; return event->type == SelectionRequest || event->type == SelectionNotify || event->type == SelectionClear; }
O0
c
isSelectionEvent: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x18(%rbp), %rax movq 0x20(%rax), %rax leaq 0xb0ae9(%rip), %rcx # 0xe0c68 cmpq 0x1fee0(%rcx), %rax je 0x30191 movl $0x0, -0x4(%rbp) jmp 0x301c5 movq -0x18(%rbp), %rcx movb $0x1, %al cmpl $0x1e, (%rcx) movb %al, -0x21(%rbp) je 0x301ba movq -0x18(%rbp), %rcx movb $0x1, %al cmpl $0x1f, (%rcx) movb %al, -0x21(%rbp) je 0x301ba movq -0x18(%rbp), %rax cmpl $0x1d, (%rax) sete %al movb %al, -0x21(%rbp) movb -0x21(%rbp), %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
isSelectionEvent: 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] mov rax, [rax+20h] lea rcx, _glfw cmp rax, [rcx+1FEE0h] jz short loc_30191 mov [rbp+var_4], 0 jmp short loc_301C5 loc_30191: mov rcx, [rbp+var_18] mov al, 1 cmp dword ptr [rcx], 1Eh mov [rbp+var_21], al jz short loc_301BA mov rcx, [rbp+var_18] mov al, 1 cmp dword ptr [rcx], 1Fh mov [rbp+var_21], al jz short loc_301BA mov rax, [rbp+var_18] cmp dword ptr [rax], 1Dh setz al mov [rbp+var_21], al loc_301BA: mov al, [rbp+var_21] and al, 1 movzx eax, al mov [rbp+var_4], eax loc_301C5: mov eax, [rbp+var_4] pop rbp retn
_BOOL8 isSelectionEvent(long long a1, long long a2) { bool v3; // [rsp+1h] [rbp-21h] if ( *(_QWORD *)(a2 + 32) == *(_QWORD *)&glfw[32696] ) { v3 = 1; if ( *(_DWORD *)a2 != 30 ) { v3 = 1; if ( *(_DWORD *)a2 != 31 ) return *(_DWORD *)a2 == 29; } return v3; } else { return 0; } }
isSelectionEvent: 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] MOV RAX,qword ptr [RAX + 0x20] LEA RCX,[0x1e0c68] CMP RAX,qword ptr [RCX + 0x1fee0] JZ 0x00130191 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001301c5 LAB_00130191: MOV RCX,qword ptr [RBP + -0x18] MOV AL,0x1 CMP dword ptr [RCX],0x1e MOV byte ptr [RBP + -0x21],AL JZ 0x001301ba MOV RCX,qword ptr [RBP + -0x18] MOV AL,0x1 CMP dword ptr [RCX],0x1f MOV byte ptr [RBP + -0x21],AL JZ 0x001301ba MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX],0x1d SETZ AL MOV byte ptr [RBP + -0x21],AL LAB_001301ba: MOV AL,byte ptr [RBP + -0x21] AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x4],EAX LAB_001301c5: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
bool isSelectionEvent(int8 param_1,int *param_2) { bool local_29; if (*(long *)(param_2 + 8) == DAT_00200b48) { local_29 = true; if ((*param_2 != 0x1e) && (local_29 = true, *param_2 != 0x1f)) { local_29 = *param_2 == 0x1d; } } else { local_29 = false; } return local_29; }
23,570
dynamic_array_find
tsotchke[P]eshkol/src/core/utils/dynamic_array.c
size_t dynamic_array_find(const DynamicArray* array, const void* element, int (*compare)(const void*, const void*)) { assert(array != NULL); assert(element != NULL); assert(compare != NULL); // Linear search for (size_t i = 0; i < array->size; i++) { void* current = (char*)array->data + i * array->element_size; if (compare(current, element) == 0) { return i; } } // Not found return (size_t)-1; }
O3
c
dynamic_array_find: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx testq %rdi, %rdi je 0x342b movq %rsi, %r14 testq %rsi, %rsi je 0x344a movq %rdx, %rbx testq %rdx, %rdx je 0x3469 movq %rdi, %r15 movq $-0x1, %r12 cmpq $0x0, 0x10(%rdi) je 0x341e xorl %r13d, %r13d movq 0x20(%r15), %rdi imulq %r13, %rdi addq 0x8(%r15), %rdi movq %r14, %rsi callq *%rbx testl %eax, %eax je 0x341b incq %r13 cmpq 0x10(%r15), %r13 jb 0x33fb jmp 0x341e movq %r13, %r12 movq %r12, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq leaq 0xc5f(%rip), %rdi # 0x4091 leaq 0x1781(%rip), %rsi # 0x4bba leaq 0x1b47(%rip), %rcx # 0x4f87 movl $0x135, %edx # imm = 0x135 callq 0x1080 leaq 0x191f(%rip), %rdi # 0x4d70 leaq 0x1762(%rip), %rsi # 0x4bba leaq 0x1b28(%rip), %rcx # 0x4f87 movl $0x136, %edx # imm = 0x136 callq 0x1080 leaq 0x1b7a(%rip), %rdi # 0x4fea leaq 0x1743(%rip), %rsi # 0x4bba leaq 0x1b09(%rip), %rcx # 0x4f87 movl $0x137, %edx # imm = 0x137 callq 0x1080
dynamic_array_find: push r15 push r14 push r13 push r12 push rbx test rdi, rdi jz short loc_342B mov r14, rsi test rsi, rsi jz short loc_344A mov rbx, rdx test rdx, rdx jz loc_3469 mov r15, rdi mov r12, 0FFFFFFFFFFFFFFFFh cmp qword ptr [rdi+10h], 0 jz short loc_341E xor r13d, r13d loc_33FB: mov rdi, [r15+20h] imul rdi, r13 add rdi, [r15+8] mov rsi, r14 call rbx test eax, eax jz short loc_341B inc r13 cmp r13, [r15+10h] jb short loc_33FB jmp short loc_341E loc_341B: mov r12, r13 loc_341E: mov rax, r12 pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_342B: lea rdi, aArrayNull; "array != NULL" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rcx, aSizeTDynamicAr_2; "size_t dynamic_array_find(const Dynamic"... mov edx, 135h call ___assert_fail loc_344A: lea rdi, aElementNull; "element != NULL" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rcx, aSizeTDynamicAr_2; "size_t dynamic_array_find(const Dynamic"... mov edx, 136h call ___assert_fail loc_3469: lea rdi, aCompareNull; "compare != NULL" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rcx, aSizeTDynamicAr_2; "size_t dynamic_array_find(const Dynamic"... mov edx, 137h call ___assert_fail
long long dynamic_array_find(_QWORD *a1, long long a2, unsigned int ( *a3)(long long, long long)) { long long v4; // r12 long long v5; // r13 if ( !a1 ) __assert_fail( "array != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/dynamic_array.c", 309LL, "size_t dynamic_array_find(const DynamicArray *, const void *, int (*)(const void *, const void *))"); if ( !a2 ) __assert_fail( "element != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/dynamic_array.c", 310LL, "size_t dynamic_array_find(const DynamicArray *, const void *, int (*)(const void *, const void *))"); if ( !a3 ) __assert_fail( "compare != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/dynamic_array.c", 311LL, "size_t dynamic_array_find(const DynamicArray *, const void *, int (*)(const void *, const void *))"); v4 = -1LL; if ( a1[2] ) { v5 = 0LL; while ( a3(a1[1] + v5 * a1[4], a2) ) { if ( (unsigned long long)++v5 >= a1[2] ) return v4; } return v5; } return v4; }
dynamic_array_find: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX TEST RDI,RDI JZ 0x0010342b MOV R14,RSI TEST RSI,RSI JZ 0x0010344a MOV RBX,RDX TEST RDX,RDX JZ 0x00103469 MOV R15,RDI MOV R12,-0x1 CMP qword ptr [RDI + 0x10],0x0 JZ 0x0010341e XOR R13D,R13D LAB_001033fb: MOV RDI,qword ptr [R15 + 0x20] IMUL RDI,R13 ADD RDI,qword ptr [R15 + 0x8] MOV RSI,R14 CALL RBX TEST EAX,EAX JZ 0x0010341b INC R13 CMP R13,qword ptr [R15 + 0x10] JC 0x001033fb JMP 0x0010341e LAB_0010341b: MOV R12,R13 LAB_0010341e: MOV RAX,R12 POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_0010342b: LEA RDI,[0x104091] LEA RSI,[0x104bba] LEA RCX,[0x104f87] MOV EDX,0x135 CALL 0x00101080 LAB_0010344a: LEA RDI,[0x104d70] LEA RSI,[0x104bba] LEA RCX,[0x104f87] MOV EDX,0x136 CALL 0x00101080 LAB_00103469: LEA RDI,[0x104fea] LEA RSI,[0x104bba] LEA RCX,[0x104f87] MOV EDX,0x137 CALL 0x00101080
ulong dynamic_array_find(long param_1,long param_2,code *param_3) { int iVar1; ulong uVar2; if (param_1 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("array != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/dynamic_array.c" ,0x135, "size_t dynamic_array_find(const DynamicArray *, const void *, int (*)(const void *, const void *))" ); } if (param_2 != 0) { if (param_3 == (code *)0x0) { /* WARNING: Subroutine does not return */ __assert_fail("compare != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/dynamic_array.c" ,0x137, "size_t dynamic_array_find(const DynamicArray *, const void *, int (*)(const void *, const void *))" ); } if (*(long *)(param_1 + 0x10) != 0) { uVar2 = 0; do { iVar1 = (*param_3)(*(long *)(param_1 + 0x20) * uVar2 + *(long *)(param_1 + 8),param_2); if (iVar1 == 0) { return uVar2; } uVar2 = uVar2 + 1; } while (uVar2 < *(ulong *)(param_1 + 0x10)); } return 0xffffffffffffffff; } /* WARNING: Subroutine does not return */ __assert_fail("element != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/dynamic_array.c" ,0x136, "size_t dynamic_array_find(const DynamicArray *, const void *, int (*)(const void *, const void *))" ); }
23,571
my_cset_init_8bit
eloqsql/strings/ctype-simple.c
static my_bool my_cset_init_8bit(struct charset_info_st *cs, MY_CHARSET_LOADER *loader) { cs->state|= my_8bit_charset_flags_from_data(cs); cs->caseup_multiply= 1; cs->casedn_multiply= 1; cs->pad_char= ' '; if (!cs->to_lower || !cs->to_upper || !cs->m_ctype || !cs->tab_to_uni) return TRUE; return create_fromuni(cs, loader); }
O0
c
my_cset_init_8bit: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rdi callq 0x53620 movl %eax, %ecx movq -0x10(%rbp), %rax orl 0xc(%rax), %ecx movl %ecx, 0xc(%rax) movq -0x10(%rbp), %rax movb $0x1, 0x94(%rax) movq -0x10(%rbp), %rax movb $0x1, 0x95(%rax) movq -0x10(%rbp), %rax movb $0x20, 0xb0(%rax) movq -0x10(%rbp), %rax cmpq $0x0, 0x48(%rax) je 0x543e2 movq -0x10(%rbp), %rax cmpq $0x0, 0x50(%rax) je 0x543e2 movq -0x10(%rbp), %rax cmpq $0x0, 0x40(%rax) je 0x543e2 movq -0x10(%rbp), %rax cmpq $0x0, 0x68(%rax) jne 0x543e8 movb $0x1, -0x1(%rbp) jmp 0x543f8 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x544d0 movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_cset_init_8bit: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rdi, [rbp+var_10] call my_8bit_charset_flags_from_data mov ecx, eax mov rax, [rbp+var_10] or ecx, [rax+0Ch] mov [rax+0Ch], ecx mov rax, [rbp+var_10] mov byte ptr [rax+94h], 1 mov rax, [rbp+var_10] mov byte ptr [rax+95h], 1 mov rax, [rbp+var_10] mov byte ptr [rax+0B0h], 20h ; ' ' mov rax, [rbp+var_10] cmp qword ptr [rax+48h], 0 jz short loc_543E2 mov rax, [rbp+var_10] cmp qword ptr [rax+50h], 0 jz short loc_543E2 mov rax, [rbp+var_10] cmp qword ptr [rax+40h], 0 jz short loc_543E2 mov rax, [rbp+var_10] cmp qword ptr [rax+68h], 0 jnz short loc_543E8 loc_543E2: mov [rbp+var_1], 1 jmp short loc_543F8 loc_543E8: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call create_fromuni mov [rbp+var_1], al loc_543F8: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char my_cset_init_8bit(long long a1, long long a2) { *(_DWORD *)(a1 + 12) |= my_8bit_charset_flags_from_data(a1); *(_BYTE *)(a1 + 148) = 1; *(_BYTE *)(a1 + 149) = 1; *(_BYTE *)(a1 + 176) = 32; if ( *(_QWORD *)(a1 + 72) && *(_QWORD *)(a1 + 80) && *(_QWORD *)(a1 + 64) && *(_QWORD *)(a1 + 104) ) return create_fromuni(a1, a2); else return 1; }
my_cset_init_8bit: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RDI,qword ptr [RBP + -0x10] CALL 0x00153620 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] OR ECX,dword ptr [RAX + 0xc] MOV dword ptr [RAX + 0xc],ECX MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x94],0x1 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x95],0x1 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0xb0],0x20 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x48],0x0 JZ 0x001543e2 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x50],0x0 JZ 0x001543e2 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x40],0x0 JZ 0x001543e2 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x68],0x0 JNZ 0x001543e8 LAB_001543e2: MOV byte ptr [RBP + -0x1],0x1 JMP 0x001543f8 LAB_001543e8: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001544d0 MOV byte ptr [RBP + -0x1],AL LAB_001543f8: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 my_cset_init_8bit(long param_1,int8 param_2) { uint uVar1; int1 local_9; uVar1 = my_8bit_charset_flags_from_data(param_1); *(uint *)(param_1 + 0xc) = uVar1 | *(uint *)(param_1 + 0xc); *(int1 *)(param_1 + 0x94) = 1; *(int1 *)(param_1 + 0x95) = 1; *(int1 *)(param_1 + 0xb0) = 0x20; if ((((*(long *)(param_1 + 0x48) == 0) || (*(long *)(param_1 + 0x50) == 0)) || (*(long *)(param_1 + 0x40) == 0)) || (*(long *)(param_1 + 0x68) == 0)) { local_9 = 1; } else { local_9 = create_fromuni(param_1,param_2); } return local_9; }
23,572
display_optimizer_trace(st_connection*, st_dynamic_string*)
eloqsql/client/mysqltest.cc
void display_optimizer_trace(struct st_connection *con, DYNAMIC_STRING *ds) { my_bool save_ps_protocol_enabled= ps_protocol_enabled; my_bool save_view_protocol_enabled= view_protocol_enabled; DYNAMIC_STRING ds_result; DYNAMIC_STRING ds_warnings; struct st_command command; DBUG_ENTER("display_optimizer_trace"); if (!optimizer_trace_active) DBUG_VOID_RETURN; optimizer_trace_active= 0; ps_protocol_enabled= view_protocol_enabled= 0; init_dynamic_string(&ds_result, NULL, 0, 256); init_dynamic_string(&ds_warnings, NULL, 0, 256); bzero(&command, sizeof(command)); run_query_normal(con, &command, QUERY_SEND_FLAG | QUERY_REAP_FLAG, display_optimizer_trace_query.str, display_optimizer_trace_query.length, ds, &ds_warnings); run_query_normal(con, &command, QUERY_SEND_FLAG | QUERY_REAP_FLAG, restore_optimizer_trace_query.str, restore_optimizer_trace_query.length, ds, &ds_warnings); dynstr_free(&ds_result); dynstr_free(&ds_warnings); ps_protocol_enabled= save_ps_protocol_enabled; view_protocol_enabled= save_view_protocol_enabled; DBUG_VOID_RETURN; }
O0
cpp
display_optimizer_trace(st_connection*, st_dynamic_string*): pushq %rbp movq %rsp, %rbp subq $0x180, %rsp # imm = 0x180 movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movb 0x44b737(%rip), %al # 0x4bb680 movb %al, -0x11(%rbp) movb 0x44b6c4(%rip), %al # 0x4bb616 movb %al, -0x12(%rbp) cmpb $0x0, 0x44b7ec(%rip) # 0x4bb748 jne 0x6ff65 jmp 0x6ff60 jmp 0x7003b movb $0x0, 0x44b7dc(%rip) # 0x4bb748 movb $0x0, 0x44b6a3(%rip) # 0x4bb616 movb $0x0, 0x44b706(%rip) # 0x4bb680 leaq -0x38(%rbp), %rdi xorl %eax, %eax movl %eax, %edx movl $0x100, %ecx # imm = 0x100 movq %rdx, %rsi callq 0xc5c30 leaq -0x58(%rbp), %rdi xorl %eax, %eax movl %eax, %edx movl $0x100, %ecx # imm = 0x100 movq %rdx, %rsi callq 0xc5c30 leaq -0x170(%rbp), %rdi xorl %esi, %esi movl $0x118, %edx # imm = 0x118 callq 0x60350 movq -0x8(%rbp), %rdi movq 0x28f5a6(%rip), %rcx # 0x2ff568 movq 0x28f5a7(%rip), %r8 # 0x2ff570 movq -0x10(%rbp), %r9 leaq -0x170(%rbp), %rsi movl $0x3, %edx leaq -0x58(%rbp), %rax movq %rax, (%rsp) callq 0x6ef90 movq -0x8(%rbp), %rdi movq 0x28f567(%rip), %rcx # 0x2ff558 movq 0x28f568(%rip), %r8 # 0x2ff560 movq -0x10(%rbp), %r9 leaq -0x170(%rbp), %rsi movl $0x3, %edx leaq -0x58(%rbp), %rax movq %rax, (%rsp) callq 0x6ef90 leaq -0x38(%rbp), %rdi callq 0xc6410 leaq -0x58(%rbp), %rdi callq 0xc6410 movb -0x11(%rbp), %al movb %al, 0x44b650(%rip) # 0x4bb680 movb -0x12(%rbp), %al movb %al, 0x44b5dd(%rip) # 0x4bb616 jmp 0x7003b addq $0x180, %rsp # imm = 0x180 popq %rbp retq nopw %cs:(%rax,%rax)
_Z23display_optimizer_traceP13st_connectionP17st_dynamic_string: push rbp mov rbp, rsp sub rsp, 180h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov al, cs:_ZL19ps_protocol_enabled; ps_protocol_enabled mov [rbp+var_11], al mov al, cs:_ZL21view_protocol_enabled; view_protocol_enabled mov [rbp+var_12], al cmp cs:_ZL22optimizer_trace_active, 0; optimizer_trace_active jnz short loc_6FF65 jmp short $+2 loc_6FF60: jmp loc_7003B loc_6FF65: mov cs:_ZL22optimizer_trace_active, 0; optimizer_trace_active mov cs:_ZL21view_protocol_enabled, 0; view_protocol_enabled mov cs:_ZL19ps_protocol_enabled, 0; ps_protocol_enabled lea rdi, [rbp+var_38] xor eax, eax mov edx, eax mov ecx, 100h mov rsi, rdx call init_dynamic_string lea rdi, [rbp+var_58] xor eax, eax mov edx, eax mov ecx, 100h mov rsi, rdx call init_dynamic_string lea rdi, [rbp+var_170] xor esi, esi mov edx, 118h call _memset mov rdi, [rbp+var_8] mov rcx, cs:display_optimizer_trace_query mov r8, cs:off_2FF570 mov r9, [rbp+var_10] lea rsi, [rbp+var_170] mov edx, 3 lea rax, [rbp+var_58] mov [rsp+180h+var_180], rax call _Z16run_query_normalP13st_connectionP10st_commandiPKcmP17st_dynamic_stringS6_; run_query_normal(st_connection *,st_command *,int,char const*,ulong,st_dynamic_string *,st_dynamic_string *) mov rdi, [rbp+var_8] mov rcx, cs:restore_optimizer_trace_query mov r8, cs:off_2FF560 mov r9, [rbp+var_10] lea rsi, [rbp+var_170] mov edx, 3 lea rax, [rbp+var_58] mov [rsp+180h+var_180], rax call _Z16run_query_normalP13st_connectionP10st_commandiPKcmP17st_dynamic_stringS6_; run_query_normal(st_connection *,st_command *,int,char const*,ulong,st_dynamic_string *,st_dynamic_string *) lea rdi, [rbp+var_38] call dynstr_free lea rdi, [rbp+var_58] call dynstr_free mov al, [rbp+var_11] mov cs:_ZL19ps_protocol_enabled, al; ps_protocol_enabled mov al, [rbp+var_12] mov cs:_ZL21view_protocol_enabled, al; view_protocol_enabled jmp short $+2 loc_7003B: add rsp, 180h pop rbp retn
char display_optimizer_trace(long long a1, long long a2) { char result; // al _BYTE v3[280]; // [rsp+10h] [rbp-170h] BYREF _QWORD v4[4]; // [rsp+128h] [rbp-58h] BYREF _BYTE v5[38]; // [rsp+148h] [rbp-38h] BYREF char v6; // [rsp+16Eh] [rbp-12h] char v7; // [rsp+16Fh] [rbp-11h] long long v8; // [rsp+170h] [rbp-10h] long long v9; // [rsp+178h] [rbp-8h] v9 = a1; v8 = a2; v7 = ps_protocol_enabled; result = view_protocol_enabled; v6 = view_protocol_enabled; if ( optimizer_trace_active ) { optimizer_trace_active = 0; view_protocol_enabled = 0; ps_protocol_enabled = 0; init_dynamic_string(v5, 0LL, 0LL); init_dynamic_string(v4, 0LL, 0LL); memset(v3, 0LL, sizeof(v3)); run_query_normal(v9, (long long)v3, 3, (long long)display_optimizer_trace_query, off_2FF570, v8, v4); run_query_normal(v9, (long long)v3, 3, (long long)restore_optimizer_trace_query, off_2FF560, v8, v4); dynstr_free(v5); dynstr_free(v4); ps_protocol_enabled = v7; result = v6; view_protocol_enabled = v6; } return result; }
display_optimizer_trace: PUSH RBP MOV RBP,RSP SUB RSP,0x180 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV AL,byte ptr [0x005bb680] MOV byte ptr [RBP + -0x11],AL MOV AL,byte ptr [0x005bb616] MOV byte ptr [RBP + -0x12],AL CMP byte ptr [0x005bb748],0x0 JNZ 0x0016ff65 JMP 0x0016ff60 LAB_0016ff60: JMP 0x0017003b LAB_0016ff65: MOV byte ptr [0x005bb748],0x0 MOV byte ptr [0x005bb616],0x0 MOV byte ptr [0x005bb680],0x0 LEA RDI,[RBP + -0x38] XOR EAX,EAX MOV EDX,EAX MOV ECX,0x100 MOV RSI,RDX CALL 0x001c5c30 LEA RDI,[RBP + -0x58] XOR EAX,EAX MOV EDX,EAX MOV ECX,0x100 MOV RSI,RDX CALL 0x001c5c30 LEA RDI,[RBP + -0x170] XOR ESI,ESI MOV EDX,0x118 CALL 0x00160350 MOV RDI,qword ptr [RBP + -0x8] MOV RCX,qword ptr [0x003ff568] MOV R8,qword ptr [0x003ff570] MOV R9,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0x170] MOV EDX,0x3 LEA RAX,[RBP + -0x58] MOV qword ptr [RSP],RAX CALL 0x0016ef90 MOV RDI,qword ptr [RBP + -0x8] MOV RCX,qword ptr [0x003ff558] MOV R8,qword ptr [0x003ff560] MOV R9,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0x170] MOV EDX,0x3 LEA RAX,[RBP + -0x58] MOV qword ptr [RSP],RAX CALL 0x0016ef90 LEA RDI,[RBP + -0x38] CALL 0x001c6410 LEA RDI,[RBP + -0x58] CALL 0x001c6410 MOV AL,byte ptr [RBP + -0x11] MOV byte ptr [0x005bb680],AL MOV AL,byte ptr [RBP + -0x12] MOV byte ptr [0x005bb616],AL JMP 0x0017003b LAB_0017003b: ADD RSP,0x180 POP RBP RET
/* display_optimizer_trace(st_connection*, st_dynamic_string*) */ void display_optimizer_trace(st_connection *param_1,st_dynamic_string *param_2) { st_command local_178 [280]; st_dynamic_string local_60 [32]; int1 local_40 [38]; int1 local_1a; int1 local_19; st_dynamic_string *local_18; st_connection *local_10; local_19 = ps_protocol_enabled; local_1a = view_protocol_enabled; if (optimizer_trace_active != '\0') { optimizer_trace_active = '\0'; view_protocol_enabled = 0; ps_protocol_enabled = 0; local_18 = param_2; local_10 = param_1; init_dynamic_string(local_40,0,0,0x100); init_dynamic_string(local_60,0,0,0x100); memset(local_178,0,0x118); run_query_normal(local_10,local_178,3,display_optimizer_trace_query,DAT_003ff570,local_18, local_60); run_query_normal(local_10,local_178,3,restore_optimizer_trace_query,DAT_003ff560,local_18, local_60); dynstr_free(local_40); dynstr_free(local_60); ps_protocol_enabled = local_19; view_protocol_enabled = local_1a; } return; }
23,573
ftxui::automerge(std::shared_ptr<ftxui::Node>)
Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/dom/automerge.cpp
Element automerge(Element child) { class Impl : public NodeDecorator { public: using NodeDecorator::NodeDecorator; void Render(Screen& screen) override { for (int y = box_.y_min; y <= box_.y_max; ++y) { for (int x = box_.x_min; x <= box_.x_max; ++x) { screen.PixelAt(x, y).automerge = true; } } Node::Render(screen); } }; return std::make_shared<Impl>(std::move(child)); }
O0
cpp
ftxui::automerge(std::shared_ptr<ftxui::Node>): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x10(%rbp) callq 0x7ea10 movq -0x10(%rbp), %rdi movl $0x60, %esi callq 0xd5b0 addq $0x10, %rsp popq %rbp retq nopl (%rax)
_ZZN5ftxui9automergeESt10shared_ptrINS_4NodeEEEN4ImplD0Ev: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] mov [rbp+var_10], rdi call _ZZN5ftxui9automergeESt10shared_ptrINS_4NodeEEEN4ImplD2Ev; ftxui::automerge(std::shared_ptr<ftxui::Node>)::Impl::~Impl() mov rdi, [rbp+var_10]; void * mov esi, 60h ; '`'; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) add rsp, 10h pop rbp retn
void ftxui::automerge(std::shared_ptr<ftxui::Node>)::Impl::~Impl(ftxui::NodeDecorator *a1) { ftxui::automerge(std::shared_ptr<ftxui::Node>)::Impl::~Impl(a1); operator delete(a1, 0x60uLL); }
~Impl: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RDI CALL 0x0017ea10 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x60 CALL 0x0010d5b0 ADD RSP,0x10 POP RBP RET
/* ~Impl() */ void __thiscall ftxui::automerge(std::shared_ptr<ftxui::Node>)::Impl::~Impl(Impl *this) { ~Impl(this); operator_delete(this,0x60); return; }
23,574
google::protobuf::compiler::Parser::LocationRecorder::Init(google::protobuf::compiler::Parser::LocationRecorder const&, google::protobuf::SourceCodeInfo*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/parser.cc
void Parser::LocationRecorder::Init(const LocationRecorder& parent, SourceCodeInfo* source_code_info) { parser_ = parent.parser_; source_code_info_ = source_code_info; location_ = source_code_info_->add_location(); location_->mutable_path()->CopyFrom(parent.location_->path()); location_->add_span(parser_->input_->current().line); location_->add_span(parser_->input_->current().column); }
O0
cpp
google::protobuf::compiler::Parser::LocationRecorder::Init(google::protobuf::compiler::Parser::LocationRecorder const&, google::protobuf::SourceCodeInfo*): subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movq %rdx, 0x20(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x28(%rsp), %rcx movq (%rcx), %rcx movq %rcx, (%rax) movq 0x20(%rsp), %rcx movq %rcx, 0x8(%rax) movq 0x8(%rax), %rdi callq 0x23e400 movq %rax, %rcx movq 0x10(%rsp), %rax movq %rcx, 0x10(%rax) movq 0x10(%rax), %rdi callq 0x23e450 movq %rax, (%rsp) movq 0x28(%rsp), %rax movq 0x10(%rax), %rdi callq 0x23e460 movq (%rsp), %rdi movq %rax, %rsi callq 0x202020 movq 0x10(%rsp), %rax movq 0x10(%rax), %rcx movq %rcx, 0x8(%rsp) movq (%rax), %rax movq (%rax), %rdi callq 0x23e2b0 movq 0x8(%rsp), %rdi movl 0x28(%rax), %esi callq 0x23e430 movq 0x10(%rsp), %rax movq 0x10(%rax), %rcx movq %rcx, 0x18(%rsp) movq (%rax), %rax movq (%rax), %rdi callq 0x23e2b0 movq 0x18(%rsp), %rdi movl 0x2c(%rax), %esi callq 0x23e430 addq $0x38, %rsp retq nop
_ZN6google8protobuf8compiler6Parser16LocationRecorder4InitERKS3_PNS0_14SourceCodeInfoE: sub rsp, 38h mov [rsp+38h+var_8], rdi mov [rsp+38h+var_10], rsi mov [rsp+38h+var_18], rdx mov rax, [rsp+38h+var_8] mov [rsp+38h+var_28], rax mov rcx, [rsp+38h+var_10] mov rcx, [rcx] mov [rax], rcx mov rcx, [rsp+38h+var_18] mov [rax+8], rcx mov rdi, [rax+8]; this call _ZN6google8protobuf14SourceCodeInfo12add_locationEv; google::protobuf::SourceCodeInfo::add_location(void) mov rcx, rax mov rax, [rsp+38h+var_28] mov [rax+10h], rcx mov rdi, [rax+10h]; this call _ZN6google8protobuf23SourceCodeInfo_Location12mutable_pathEv; google::protobuf::SourceCodeInfo_Location::mutable_path(void) mov [rsp+38h+var_38], rax mov rax, [rsp+38h+var_10] mov rdi, [rax+10h]; this call _ZNK6google8protobuf23SourceCodeInfo_Location4pathEv; google::protobuf::SourceCodeInfo_Location::path(void) mov rdi, [rsp+38h+var_38] mov rsi, rax call _ZN6google8protobuf13RepeatedFieldIiE8CopyFromERKS2_; google::protobuf::RepeatedField<int>::CopyFrom(google::protobuf::RepeatedField<int> const&) mov rax, [rsp+38h+var_28] mov rcx, [rax+10h] mov [rsp+38h+var_30], rcx mov rax, [rax] mov rdi, [rax]; this call _ZN6google8protobuf2io9Tokenizer7currentEv; google::protobuf::io::Tokenizer::current(void) mov rdi, [rsp+38h+var_30]; this mov esi, [rax+28h]; int call _ZN6google8protobuf23SourceCodeInfo_Location8add_spanEi; google::protobuf::SourceCodeInfo_Location::add_span(int) mov rax, [rsp+38h+var_28] mov rcx, [rax+10h] mov [rsp+38h+var_20], rcx mov rax, [rax] mov rdi, [rax]; this call _ZN6google8protobuf2io9Tokenizer7currentEv; google::protobuf::io::Tokenizer::current(void) mov rdi, [rsp+38h+var_20]; this mov esi, [rax+2Ch]; int call _ZN6google8protobuf23SourceCodeInfo_Location8add_spanEi; google::protobuf::SourceCodeInfo_Location::add_span(int) add rsp, 38h retn
long long google::protobuf::compiler::Parser::LocationRecorder::Init( google::protobuf::compiler::Parser::LocationRecorder *this, google::protobuf::SourceCodeInfo_Location **a2, google::protobuf::SourceCodeInfo *a3) { long long v3; // rax long long v4; // rax long long v5; // rax long long v7; // [rsp+0h] [rbp-38h] google::protobuf::SourceCodeInfo_Location *v8; // [rsp+8h] [rbp-30h] google::protobuf::SourceCodeInfo_Location *v9; // [rsp+18h] [rbp-20h] *(_QWORD *)this = *a2; *((_QWORD *)this + 1) = a3; *((_QWORD *)this + 2) = google::protobuf::SourceCodeInfo::add_location(*((google::protobuf::SourceCodeInfo **)this + 1)); v7 = google::protobuf::SourceCodeInfo_Location::mutable_path(*((google::protobuf::SourceCodeInfo_Location **)this + 2)); v3 = google::protobuf::SourceCodeInfo_Location::path(a2[2]); google::protobuf::RepeatedField<int>::CopyFrom(v7, v3); v8 = (google::protobuf::SourceCodeInfo_Location *)*((_QWORD *)this + 2); v4 = google::protobuf::io::Tokenizer::current(**(google::protobuf::io::Tokenizer ***)this); google::protobuf::SourceCodeInfo_Location::add_span(v8, *(_DWORD *)(v4 + 40)); v9 = (google::protobuf::SourceCodeInfo_Location *)*((_QWORD *)this + 2); v5 = google::protobuf::io::Tokenizer::current(**(google::protobuf::io::Tokenizer ***)this); return google::protobuf::SourceCodeInfo_Location::add_span(v9, *(_DWORD *)(v5 + 44)); }
_M_allocate: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x10],RAX CMP qword ptr [RSP + 0x18],0x0 JZ 0x00231506 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x18] CALL 0x00231630 MOV qword ptr [RSP + 0x8],RAX JMP 0x0023150f LAB_00231506: XOR EAX,EAX MOV qword ptr [RSP + 0x8],RAX JMP 0x0023150f LAB_0023150f: MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0x28 RET
/* std::_Vector_base<google::protobuf::compiler::cpp::TailCallTableInfo::FieldEntryInfo, std::allocator<google::protobuf::compiler::cpp::TailCallTableInfo::FieldEntryInfo> >::_M_allocate(unsigned long) */ int8 __thiscall std:: _Vector_base<google::protobuf::compiler::cpp::TailCallTableInfo::FieldEntryInfo,std::allocator<google::protobuf::compiler::cpp::TailCallTableInfo::FieldEntryInfo>> ::_M_allocate(_Vector_base<google::protobuf::compiler::cpp::TailCallTableInfo::FieldEntryInfo,std::allocator<google::protobuf::compiler::cpp::TailCallTableInfo::FieldEntryInfo>> *this,ulong param_1) { int8 local_20; if (param_1 == 0) { local_20 = 0; } else { local_20 = allocator_traits<std::allocator<google::protobuf::compiler::cpp::TailCallTableInfo::FieldEntryInfo>> ::allocate((allocator *)this,param_1); } return local_20; }
23,575
ImPlot3D::SetNextMarkerStyle(int, float, ImVec4 const&, float, ImVec4 const&)
zkingston[P]unknot/build_O1/_deps/implot3d-src/implot3d_items.cpp
void SetNextMarkerStyle(ImPlot3DMarker marker, float size, const ImVec4& fill, float weight, const ImVec4& outline) { ImPlot3DContext& gp = *GImPlot3D; ImPlot3DNextItemData& n = gp.NextItemData; n.Marker = marker; n.Colors[ImPlot3DCol_MarkerFill] = fill; n.MarkerSize = size; n.Colors[ImPlot3DCol_MarkerOutline] = outline; n.MarkerWeight = weight; }
O1
cpp
ImPlot3D::SetNextMarkerStyle(int, float, ImVec4 const&, float, ImVec4 const&): leaq 0x2dff0e(%rip), %rax # 0x336c98 movq (%rax), %rax movl %edi, 0x7c(%rax) movups (%rsi), %xmm2 movups %xmm2, 0x68(%rax) movss %xmm0, 0x80(%rax) movups (%rdx), %xmm0 movups %xmm0, 0x58(%rax) movss %xmm1, 0x84(%rax) retq
_ZN8ImPlot3D18SetNextMarkerStyleEifRK6ImVec4fS2_: lea rax, _ZN8ImPlot3D9GImPlot3DE; ImPlot3D::GImPlot3D mov rax, [rax] mov [rax+7Ch], edi movups xmm2, xmmword ptr [rsi] movups xmmword ptr [rax+68h], xmm2 movss dword ptr [rax+80h], xmm0 movups xmm0, xmmword ptr [rdx] movups xmmword ptr [rax+58h], xmm0 movss dword ptr [rax+84h], xmm1 retn
ImGui * ImPlot3D::SetNextMarkerStyle(int a1, _OWORD *a2, _OWORD *a3, float a4, float a5) { ImGui *result; // rax result = ImPlot3D::GImPlot3D; *((_DWORD *)ImPlot3D::GImPlot3D + 31) = a1; *(_OWORD *)((char *)result + 104) = *a2; *((float *)result + 32) = a4; *(_OWORD *)((char *)result + 88) = *a3; *((float *)result + 33) = a5; return result; }
SetNextMarkerStyle: LEA RAX,[0x436c98] MOV RAX,qword ptr [RAX] MOV dword ptr [RAX + 0x7c],EDI MOVUPS XMM2,xmmword ptr [RSI] MOVUPS xmmword ptr [RAX + 0x68],XMM2 MOVSS dword ptr [RAX + 0x80],XMM0 MOVUPS XMM0,xmmword ptr [RDX] MOVUPS xmmword ptr [RAX + 0x58],XMM0 MOVSS dword ptr [RAX + 0x84],XMM1 RET
/* ImPlot3D::SetNextMarkerStyle(int, float, ImVec4 const&, float, ImVec4 const&) */ void ImPlot3D::SetNextMarkerStyle (int param_1,float param_2,ImVec4 *param_3,float param_4,ImVec4 *param_5) { int8 uVar1; long lVar2; lVar2 = GImPlot3D; *(int *)(GImPlot3D + 0x7c) = param_1; uVar1 = *(int8 *)(param_3 + 8); *(int8 *)(lVar2 + 0x68) = *(int8 *)param_3; *(int8 *)(lVar2 + 0x70) = uVar1; *(float *)(lVar2 + 0x80) = param_2; uVar1 = *(int8 *)(param_5 + 8); *(int8 *)(lVar2 + 0x58) = *(int8 *)param_5; *(int8 *)(lVar2 + 0x60) = uVar1; *(float *)(lVar2 + 0x84) = param_4; return; }
23,576
ELFIO::string_section_accessor_template<ELFIO::section>::add_string(char const*)
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/include/elfio/elfio_strings.hpp
Elf_Word add_string( const char* str ) { Elf_Word current_position = 0; if (string_section) { // Strings are addeded to the end of the current section data current_position = (Elf_Word)string_section->get_size(); if ( current_position == 0 ) { char empty_string = '\0'; string_section->append_data( &empty_string, 1 ); current_position++; } string_section->append_data( str, (Elf_Word)std::strlen( str ) + 1 ); } return current_position; }
O0
cpp
ELFIO::string_section_accessor_template<ELFIO::section>::add_string(char const*): subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x18(%rsp) movl $0x0, 0x24(%rsp) cmpq $0x0, (%rax) je 0x1b53a movq 0x18(%rsp), %rax movq (%rax), %rdi movq (%rdi), %rax callq *0x98(%rax) movl %eax, 0x24(%rsp) cmpl $0x0, 0x24(%rsp) jne 0x1b501 movq 0x18(%rsp), %rax movb $0x0, 0x23(%rsp) movq (%rax), %rdi movq (%rdi), %rax leaq 0x23(%rsp), %rsi movl $0x1, %edx callq *0xd8(%rax) movl 0x24(%rsp), %eax addl $0x1, %eax movl %eax, 0x24(%rsp) movq 0x18(%rsp), %rax movq (%rax), %rax movq %rax, 0x8(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x28(%rsp), %rdi callq 0x150e0 movq 0x8(%rsp), %rdi movq 0x10(%rsp), %rsi movl %eax, %edx addl $0x1, %edx movq (%rdi), %rax callq *0xd8(%rax) movl 0x24(%rsp), %eax addq $0x38, %rsp retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZN5ELFIO32string_section_accessor_templateINS_7sectionEE10add_stringEPKc: sub rsp, 38h mov [rsp+38h+var_8], rdi mov [rsp+38h+var_10], rsi mov rax, [rsp+38h+var_8] mov [rsp+38h+var_20], rax mov [rsp+38h+var_14], 0 cmp qword ptr [rax], 0 jz loc_1B53A mov rax, [rsp+38h+var_20] mov rdi, [rax] mov rax, [rdi] call qword ptr [rax+98h] mov [rsp+38h+var_14], eax cmp [rsp+38h+var_14], 0 jnz short loc_1B501 mov rax, [rsp+38h+var_20] mov [rsp+38h+var_15], 0 mov rdi, [rax] mov rax, [rdi] lea rsi, [rsp+38h+var_15] mov edx, 1 call qword ptr [rax+0D8h] mov eax, [rsp+38h+var_14] add eax, 1 mov [rsp+38h+var_14], eax loc_1B501: mov rax, [rsp+38h+var_20] mov rax, [rax] mov [rsp+38h+var_30], rax mov rax, [rsp+38h+var_10] mov [rsp+38h+var_28], rax mov rdi, [rsp+38h+var_10] call _strlen mov rdi, [rsp+38h+var_30] mov rsi, [rsp+38h+var_28] mov edx, eax add edx, 1 mov rax, [rdi] call qword ptr [rax+0D8h] loc_1B53A: mov eax, [rsp+38h+var_14] add rsp, 38h retn
long long ELFIO::string_section_accessor_template<ELFIO::section>::add_string(_QWORD *a1, long long a2) { int v2; // eax long long v4; // [rsp+8h] [rbp-30h] long long v5; // [rsp+10h] [rbp-28h] char v6; // [rsp+23h] [rbp-15h] BYREF unsigned int v7; // [rsp+24h] [rbp-14h] long long v8; // [rsp+28h] [rbp-10h] _QWORD *v9; // [rsp+30h] [rbp-8h] v9 = a1; v8 = a2; v7 = 0; if ( *a1 ) { v7 = (*(long long ( **)(_QWORD))(*(_QWORD *)*a1 + 152LL))(*a1); if ( !v7 ) { v6 = 0; (*(void ( **)(_QWORD, char *, long long))(*(_QWORD *)*a1 + 216LL))(*a1, &v6, 1LL); ++v7; } v4 = *a1; v5 = v8; v2 = strlen(v8); (*(void ( **)(long long, long long, _QWORD))(*(_QWORD *)v4 + 216LL))(v4, v5, (unsigned int)(v2 + 1)); } return v7; }
add_string: SUB RSP,0x38 MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x18],RAX MOV dword ptr [RSP + 0x24],0x0 CMP qword ptr [RAX],0x0 JZ 0x0011b53a MOV RAX,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x98] MOV dword ptr [RSP + 0x24],EAX CMP dword ptr [RSP + 0x24],0x0 JNZ 0x0011b501 MOV RAX,qword ptr [RSP + 0x18] MOV byte ptr [RSP + 0x23],0x0 MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RDI] LEA RSI,[RSP + 0x23] MOV EDX,0x1 CALL qword ptr [RAX + 0xd8] MOV EAX,dword ptr [RSP + 0x24] ADD EAX,0x1 MOV dword ptr [RSP + 0x24],EAX LAB_0011b501: MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0x28] CALL 0x001150e0 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x10] MOV EDX,EAX ADD EDX,0x1 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0xd8] LAB_0011b53a: MOV EAX,dword ptr [RSP + 0x24] ADD RSP,0x38 RET
/* ELFIO::string_section_accessor_template<ELFIO::section>::add_string(char const*) */ int __thiscall ELFIO::string_section_accessor_template<ELFIO::section>::add_string (string_section_accessor_template<ELFIO::section> *this,char *param_1) { long *plVar1; char *pcVar2; size_t sVar3; int1 local_15; int local_14; char *local_10; string_section_accessor_template<ELFIO::section> *local_8; local_14 = 0; if (*(long *)this != 0) { local_10 = param_1; local_8 = this; local_14 = (**(code **)(**(long **)this + 0x98))(); if (local_14 == 0) { local_15 = 0; (**(code **)(**(long **)this + 0xd8))(*(long **)this,&local_15,1); local_14 = local_14 + 1; } pcVar2 = local_10; plVar1 = *(long **)this; sVar3 = strlen(local_10); (**(code **)(*plVar1 + 0xd8))(plVar1,pcVar2,(int)sVar3 + 1); } return local_14; }
23,577
ELFIO::string_section_accessor_template<ELFIO::section>::add_string(char const*)
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/include/elfio/elfio_strings.hpp
Elf_Word add_string( const char* str ) { Elf_Word current_position = 0; if (string_section) { // Strings are addeded to the end of the current section data current_position = (Elf_Word)string_section->get_size(); if ( current_position == 0 ) { char empty_string = '\0'; string_section->append_data( &empty_string, 1 ); current_position++; } string_section->append_data( str, (Elf_Word)std::strlen( str ) + 1 ); } return current_position; }
O2
cpp
ELFIO::string_section_accessor_template<ELFIO::section>::add_string(char const*): pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdi, %r15 movq (%rdi), %rdi testq %rdi, %rdi je 0xe7c4 movq %rsi, %rbx movq (%rdi), %rax callq *0x98(%rax) movq %rax, %r14 testl %r14d, %r14d jne 0xe7a5 leaq 0xf(%rsp), %rsi movb $0x0, (%rsi) movq (%r15), %rdi movq (%rdi), %rax pushq $0x1 popq %r14 movl %r14d, %edx callq *0xd8(%rax) movq (%r15), %r15 movq %rbx, %rdi callq 0xc0c0 leal 0x1(%rax), %edx movq (%r15), %rax movq %r15, %rdi movq %rbx, %rsi callq *0xd8(%rax) jmp 0xe7c7 xorl %r14d, %r14d movl %r14d, %eax addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq
_ZN5ELFIO32string_section_accessor_templateINS_7sectionEE10add_stringEPKc: push r15 push r14 push rbx sub rsp, 10h mov r15, rdi mov rdi, [rdi] test rdi, rdi jz short loc_E7C4 mov rbx, rsi mov rax, [rdi] call qword ptr [rax+98h] mov r14, rax test r14d, r14d jnz short loc_E7A5 lea rsi, [rsp+28h+var_19] mov byte ptr [rsi], 0 mov rdi, [r15] mov rax, [rdi] push 1 pop r14 mov edx, r14d call qword ptr [rax+0D8h] loc_E7A5: mov r15, [r15] mov rdi, rbx call _strlen lea edx, [rax+1] mov rax, [r15] mov rdi, r15 mov rsi, rbx call qword ptr [rax+0D8h] jmp short loc_E7C7 loc_E7C4: xor r14d, r14d loc_E7C7: mov eax, r14d add rsp, 10h pop rbx pop r14 pop r15 retn
long long ELFIO::string_section_accessor_template<ELFIO::section>::add_string(_QWORD *a1, long long a2) { long long v3; // rdi unsigned int v4; // r14d long long v5; // r15 int v6; // eax _BYTE v8[25]; // [rsp+Fh] [rbp-19h] BYREF v3 = *a1; if ( v3 ) { v4 = (*(long long ( **)(long long))(*(_QWORD *)v3 + 152LL))(v3); if ( !v4 ) { v8[0] = 0; v4 = 1; (*(void ( **)(_QWORD, _BYTE *, long long))(*(_QWORD *)*a1 + 216LL))(*a1, v8, 1LL); } v5 = *a1; v6 = strlen(a2); (*(void ( **)(long long, long long, _QWORD))(*(_QWORD *)v5 + 216LL))(v5, a2, (unsigned int)(v6 + 1)); } else { return 0; } return v4; }
add_string: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV R15,RDI MOV RDI,qword ptr [RDI] TEST RDI,RDI JZ 0x0010e7c4 MOV RBX,RSI MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x98] MOV R14,RAX TEST R14D,R14D JNZ 0x0010e7a5 LEA RSI,[RSP + 0xf] MOV byte ptr [RSI],0x0 MOV RDI,qword ptr [R15] MOV RAX,qword ptr [RDI] PUSH 0x1 POP R14 MOV EDX,R14D CALL qword ptr [RAX + 0xd8] LAB_0010e7a5: MOV R15,qword ptr [R15] MOV RDI,RBX CALL 0x0010c0c0 LEA EDX,[RAX + 0x1] MOV RAX,qword ptr [R15] MOV RDI,R15 MOV RSI,RBX CALL qword ptr [RAX + 0xd8] JMP 0x0010e7c7 LAB_0010e7c4: XOR R14D,R14D LAB_0010e7c7: MOV EAX,R14D ADD RSP,0x10 POP RBX POP R14 POP R15 RET
/* ELFIO::string_section_accessor_template<ELFIO::section>::add_string(char const*) */ int __thiscall ELFIO::string_section_accessor_template<ELFIO::section>::add_string (string_section_accessor_template<ELFIO::section> *this,char *param_1) { long *plVar1; int iVar2; size_t sVar3; int1 local_19; if (*(long **)this == (long *)0x0) { iVar2 = 0; } else { iVar2 = (**(code **)(**(long **)this + 0x98))(); if (iVar2 == 0) { local_19 = 0; iVar2 = 1; (**(code **)(**(long **)this + 0xd8))(*(long **)this,&local_19,1); } plVar1 = *(long **)this; sVar3 = strlen(param_1); (**(code **)(*plVar1 + 0xd8))(plVar1,param_1,(int)sVar3 + 1); } return iVar2; }
23,578
ELFIO::string_section_accessor_template<ELFIO::section>::add_string(char const*)
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/include/elfio/elfio_strings.hpp
Elf_Word add_string( const char* str ) { Elf_Word current_position = 0; if (string_section) { // Strings are addeded to the end of the current section data current_position = (Elf_Word)string_section->get_size(); if ( current_position == 0 ) { char empty_string = '\0'; string_section->append_data( &empty_string, 1 ); current_position++; } string_section->append_data( str, (Elf_Word)std::strlen( str ) + 1 ); } return current_position; }
O3
cpp
ELFIO::string_section_accessor_template<ELFIO::section>::add_string(char const*): pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdi, %r15 movq (%rdi), %rdi testq %rdi, %rdi je 0xdae2 movq %rsi, %rbx movq (%rdi), %rax callq *0x98(%rax) movq %rax, %r14 testl %r14d, %r14d jne 0xdac3 leaq 0xf(%rsp), %rsi movb $0x0, (%rsi) movq (%r15), %rdi movq (%rdi), %rax movl $0x1, %r14d movl $0x1, %edx callq *0xd8(%rax) movq (%r15), %r15 movq %rbx, %rdi callq 0xb0e0 leal 0x1(%rax), %edx movq (%r15), %rax movq %r15, %rdi movq %rbx, %rsi callq *0xd8(%rax) jmp 0xdae5 xorl %r14d, %r14d movl %r14d, %eax addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq
_ZN5ELFIO32string_section_accessor_templateINS_7sectionEE10add_stringEPKc: push r15 push r14 push rbx sub rsp, 10h mov r15, rdi mov rdi, [rdi] test rdi, rdi jz short loc_DAE2 mov rbx, rsi mov rax, [rdi] call qword ptr [rax+98h] mov r14, rax test r14d, r14d jnz short loc_DAC3 lea rsi, [rsp+28h+var_19] mov byte ptr [rsi], 0 mov rdi, [r15] mov rax, [rdi] mov r14d, 1 mov edx, 1 call qword ptr [rax+0D8h] loc_DAC3: mov r15, [r15] mov rdi, rbx call _strlen lea edx, [rax+1] mov rax, [r15] mov rdi, r15 mov rsi, rbx call qword ptr [rax+0D8h] jmp short loc_DAE5 loc_DAE2: xor r14d, r14d loc_DAE5: mov eax, r14d add rsp, 10h pop rbx pop r14 pop r15 retn
long long ELFIO::string_section_accessor_template<ELFIO::section>::add_string(_QWORD *a1, long long a2) { long long v3; // rdi unsigned int v4; // r14d long long v5; // r15 int v6; // eax _BYTE v8[25]; // [rsp+Fh] [rbp-19h] BYREF v3 = *a1; if ( v3 ) { v4 = (*(long long ( **)(long long))(*(_QWORD *)v3 + 152LL))(v3); if ( !v4 ) { v8[0] = 0; v4 = 1; (*(void ( **)(_QWORD, _BYTE *, long long))(*(_QWORD *)*a1 + 216LL))(*a1, v8, 1LL); } v5 = *a1; v6 = strlen(a2); (*(void ( **)(long long, long long, _QWORD))(*(_QWORD *)v5 + 216LL))(v5, a2, (unsigned int)(v6 + 1)); } else { return 0; } return v4; }
add_string: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV R15,RDI MOV RDI,qword ptr [RDI] TEST RDI,RDI JZ 0x0010dae2 MOV RBX,RSI MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x98] MOV R14,RAX TEST R14D,R14D JNZ 0x0010dac3 LEA RSI,[RSP + 0xf] MOV byte ptr [RSI],0x0 MOV RDI,qword ptr [R15] MOV RAX,qword ptr [RDI] MOV R14D,0x1 MOV EDX,0x1 CALL qword ptr [RAX + 0xd8] LAB_0010dac3: MOV R15,qword ptr [R15] MOV RDI,RBX CALL 0x0010b0e0 LEA EDX,[RAX + 0x1] MOV RAX,qword ptr [R15] MOV RDI,R15 MOV RSI,RBX CALL qword ptr [RAX + 0xd8] JMP 0x0010dae5 LAB_0010dae2: XOR R14D,R14D LAB_0010dae5: MOV EAX,R14D ADD RSP,0x10 POP RBX POP R14 POP R15 RET
/* ELFIO::string_section_accessor_template<ELFIO::section>::add_string(char const*) */ int __thiscall ELFIO::string_section_accessor_template<ELFIO::section>::add_string (string_section_accessor_template<ELFIO::section> *this,char *param_1) { long *plVar1; int iVar2; size_t sVar3; int1 local_19; if (*(long **)this == (long *)0x0) { iVar2 = 0; } else { iVar2 = (**(code **)(**(long **)this + 0x98))(); if (iVar2 == 0) { local_19 = 0; iVar2 = 1; (**(code **)(**(long **)this + 0xd8))(*(long **)this,&local_19,1); } plVar1 = *(long **)this; sVar3 = strlen(param_1); (**(code **)(*plVar1 + 0xd8))(plVar1,param_1,(int)sVar3 + 1); } return iVar2; }
23,579
stbi__jpeg_info(stbi__context*, int*, int*, int*)
monkey531[P]llama/examples/llava/../../common/stb_image.h
static int stbi__jpeg_info(stbi__context *s, int *x, int *y, int *comp) { int result; stbi__jpeg* j = (stbi__jpeg*) (stbi__malloc(sizeof(stbi__jpeg))); if (!j) return stbi__err("outofmem", "Out of memory"); memset(j, 0, sizeof(stbi__jpeg)); j->s = s; result = stbi__jpeg_info_raw(j, x, y, comp); STBI_FREE(j); return result; }
O0
c
stbi__jpeg_info(stbi__context*, int*, int*, int*): subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movq %rdx, 0x18(%rsp) movq %rcx, 0x10(%rsp) movl $0x4888, %edi # imm = 0x4888 callq 0x78ac0 movq %rax, (%rsp) cmpq $0x0, (%rsp) jne 0xa4a6f leaq 0x1ac827(%rip), %rdi # 0x25128b callq 0x77500 movl %eax, 0x34(%rsp) jmp 0xa4ab8 movq (%rsp), %rdi xorl %esi, %esi movl $0x4888, %edx # imm = 0x4888 callq 0x616d0 movq 0x28(%rsp), %rcx movq (%rsp), %rax movq %rcx, (%rax) movq (%rsp), %rdi movq 0x20(%rsp), %rsi movq 0x18(%rsp), %rdx movq 0x10(%rsp), %rcx callq 0xa54e0 movl %eax, 0xc(%rsp) movq (%rsp), %rdi callq 0x613a0 movl 0xc(%rsp), %eax movl %eax, 0x34(%rsp) movl 0x34(%rsp), %eax addq $0x38, %rsp retq nopw %cs:(%rax,%rax)
_ZL15stbi__jpeg_infoP13stbi__contextPiS1_S1_: 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 edi, 4888h; unsigned __int64 call _ZL12stbi__mallocm; stbi__malloc(ulong) mov [rsp+38h+var_38], rax cmp [rsp+38h+var_38], 0 jnz short loc_A4A6F lea rdi, aOutofmem; "outofmem" call _ZL9stbi__errPKc; stbi__err(char const*) mov [rsp+38h+var_4], eax jmp short loc_A4AB8 loc_A4A6F: mov rdi, [rsp+38h+var_38] xor esi, esi mov edx, 4888h call _memset mov rcx, [rsp+38h+var_10] mov rax, [rsp+38h+var_38] mov [rax], rcx mov rdi, [rsp+38h+var_38] mov rsi, [rsp+38h+var_18] mov rdx, [rsp+38h+var_20] mov rcx, [rsp+38h+var_28] call _ZL19stbi__jpeg_info_rawP10stbi__jpegPiS1_S1_; stbi__jpeg_info_raw(stbi__jpeg *,int *,int *,int *) mov [rsp+38h+var_2C], eax mov rdi, [rsp+38h+var_38] call _free mov eax, [rsp+38h+var_2C] mov [rsp+38h+var_4], eax loc_A4AB8: mov eax, [rsp+38h+var_4] add rsp, 38h retn
long long stbi__jpeg_info(long long a1, long long a2, long long a3, long long a4) { _QWORD *v5; // [rsp+0h] [rbp-38h] unsigned int v6; // [rsp+Ch] [rbp-2Ch] v5 = (_QWORD *)stbi__malloc(18568LL); if ( v5 ) { memset(v5, 0LL, 18568LL); *v5 = a1; v6 = stbi__jpeg_info_raw(v5, a2, a3, a4); free(v5); return v6; } else { return (unsigned int)stbi__err("outofmem"); } }
stbi__jpeg_info: 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 EDI,0x4888 CALL 0x00178ac0 MOV qword ptr [RSP],RAX CMP qword ptr [RSP],0x0 JNZ 0x001a4a6f LEA RDI,[0x35128b] CALL 0x00177500 MOV dword ptr [RSP + 0x34],EAX JMP 0x001a4ab8 LAB_001a4a6f: MOV RDI,qword ptr [RSP] XOR ESI,ESI MOV EDX,0x4888 CALL 0x001616d0 MOV RCX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP] MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RSP] MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x10] CALL 0x001a54e0 MOV dword ptr [RSP + 0xc],EAX MOV RDI,qword ptr [RSP] CALL 0x001613a0 MOV EAX,dword ptr [RSP + 0xc] MOV dword ptr [RSP + 0x34],EAX LAB_001a4ab8: MOV EAX,dword ptr [RSP + 0x34] ADD RSP,0x38 RET
/* stbi__jpeg_info(stbi__context*, int*, int*, int*) */ int4 stbi__jpeg_info(stbi__context *param_1,int *param_2,int *param_3,int *param_4) { stbi__jpeg *__s; int4 local_4; __s = (stbi__jpeg *)stbi__malloc(0x4888); if (__s == (stbi__jpeg *)0x0) { local_4 = stbi__err("outofmem"); } else { memset(__s,0,0x4888); *(stbi__context **)__s = param_1; local_4 = stbi__jpeg_info_raw(__s,param_2,param_3,param_4); free(__s); } return local_4; }
23,580
flux::parser::Parser::equality()
kvthweatt[P]FluxLang/src/parser/parser.cpp
std::unique_ptr<Expr> Parser::equality() { auto expr = comparison(); while (match({ lexer::TokenType::EQUAL_EQUAL, lexer::TokenType::NOT_EQUAL, lexer::TokenType::KEYWORD_IS })) { auto op = previous_; auto right = comparison(); expr = std::make_unique<BinaryExpr>( std::move(expr), op, std::move(right), makeRange(op, previous_) ); } return expr; }
O0
cpp
flux::parser::Parser::equality(): pushq %rbp movq %rsp, %rbp subq $0x100, %rsp # imm = 0x100 movq %rdi, -0xf0(%rbp) movq %rdi, %rax movq %rax, -0xe8(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rsi movq %rsi, -0xe0(%rbp) movb $0x0, -0x11(%rbp) callq 0x54ab0 movq -0xe0(%rbp), %rdi movl $0x39, -0x34(%rbp) movl $0x3a, -0x30(%rbp) movl $0x18, -0x2c(%rbp) leaq -0x34(%rbp), %rax movq %rax, -0x28(%rbp) movq $0x3, -0x20(%rbp) movq -0x28(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x430c0 movb %al, -0xf1(%rbp) jmp 0x54969 movb -0xf1(%rbp), %al testb $0x1, %al jne 0x54978 jmp 0x54a71 movq -0xe0(%rbp), %rsi addq $0x68, %rsi leaq -0xa8(%rbp), %rdi callq 0x15420 jmp 0x54991 movq -0xe0(%rbp), %rsi leaq -0xb0(%rbp), %rdi callq 0x54ab0 jmp 0x549a6 movq -0xe0(%rbp), %rsi movq %rsi, %rcx addq $0x68, %rcx leaq -0xd8(%rbp), %rdi leaq -0xa8(%rbp), %rdx callq 0x43570 jmp 0x549c9 movq -0xf0(%rbp), %rsi leaq -0xb8(%rbp), %rdi leaq -0xa8(%rbp), %rdx leaq -0xb0(%rbp), %rcx leaq -0xd8(%rbp), %r8 callq 0x5c690 jmp 0x549f3 movq -0xf0(%rbp), %rdi leaq -0xb8(%rbp), %rsi callq 0x5c790 leaq -0xb8(%rbp), %rdi callq 0x1d890 leaq -0xb0(%rbp), %rdi callq 0x1d6d0 leaq -0xa8(%rbp), %rdi callq 0xa300 jmp 0x54928 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) jmp 0x54a97 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) jmp 0x54a63 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) leaq -0xb0(%rbp), %rdi callq 0x1d6d0 leaq -0xa8(%rbp), %rdi callq 0xa300 jmp 0x54a97 movb $0x1, -0x11(%rbp) testb $0x1, -0x11(%rbp) jne 0x54a87 movq -0xf0(%rbp), %rdi callq 0x1d6d0 movq -0xe8(%rbp), %rax addq $0x100, %rsp # imm = 0x100 popq %rbp retq movq -0xf0(%rbp), %rdi callq 0x1d6d0 movq -0x40(%rbp), %rdi callq 0x75a0 nopl (%rax)
_ZN4flux6parser6Parser8equalityEv: push rbp mov rbp, rsp sub rsp, 100h mov [rbp+var_F0], rdi mov rax, rdi mov [rbp+var_E8], rax mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rsi, [rbp+var_10] mov [rbp+var_E0], rsi mov [rbp+var_11], 0 call _ZN4flux6parser6Parser10comparisonEv; flux::parser::Parser::comparison(void) loc_54928: mov rdi, [rbp+var_E0] mov [rbp+var_34], 39h ; '9' mov [rbp+var_30], 3Ah ; ':' mov [rbp+var_2C], 18h lea rax, [rbp+var_34] mov [rbp+var_28], rax mov [rbp+var_20], 3 mov rsi, [rbp+var_28] mov rdx, [rbp+var_20] call _ZN4flux6parser6Parser5matchESt16initializer_listINS_5lexer9TokenTypeEE; flux::parser::Parser::match(std::initializer_list<flux::lexer::TokenType>) mov [rbp+var_F1], al jmp short $+2 loc_54969: mov al, [rbp+var_F1] test al, 1 jnz short loc_54978 jmp loc_54A71 loc_54978: mov rsi, [rbp+var_E0] add rsi, 68h ; 'h'; flux::lexer::Token * lea rdi, [rbp+var_A8]; this call _ZN4flux5lexer5TokenC2ERKS1_; flux::lexer::Token::Token(flux::lexer::Token const&) jmp short $+2 loc_54991: mov rsi, [rbp+var_E0] lea rdi, [rbp+var_B0]; this call _ZN4flux6parser6Parser10comparisonEv; flux::parser::Parser::comparison(void) jmp short $+2 loc_549A6: mov rsi, [rbp+var_E0]; flux::lexer::Token * mov rcx, rsi add rcx, 68h ; 'h' lea rdi, [rbp+var_D8]; this lea rdx, [rbp+var_A8]; flux::lexer::Token * call _ZNK4flux6parser6Parser9makeRangeERKNS_5lexer5TokenES5_; flux::parser::Parser::makeRange(flux::lexer::Token const&,flux::lexer::Token const&) jmp short $+2 loc_549C9: mov rsi, [rbp+var_F0] lea rdi, [rbp+var_B8] lea rdx, [rbp+var_A8] lea rcx, [rbp+var_B0] lea r8, [rbp+var_D8] call _ZSt11make_uniqueIN4flux6parser10BinaryExprEJSt10unique_ptrINS1_4ExprESt14default_deleteIS4_EERNS0_5lexer5TokenES7_NS0_6common11SourceRangeEEENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<flux::parser::BinaryExpr,std::unique_ptr<flux::parser::Expr>,flux::lexer::Token &,std::unique_ptr<flux::parser::Expr>,flux::common::SourceRange>(std::unique_ptr<flux::parser::Expr>,flux::lexer::Token &,std::unique_ptr<flux::parser::Expr>,flux::common::SourceRange &&) jmp short $+2 loc_549F3: mov rdi, [rbp+var_F0] lea rsi, [rbp+var_B8] call _ZNSt10unique_ptrIN4flux6parser4ExprESt14default_deleteIS2_EEaSINS1_10BinaryExprES3_IS7_EEENSt9enable_ifIXsr6__and_ISt6__and_IJSt14is_convertibleINS_IT_T0_E7pointerEPS2_ESt6__not_ISt8is_arrayISC_EEEESt13is_assignableIRS4_OSD_EEE5valueERS5_E4typeEOSE_ lea rdi, [rbp+var_B8] call _ZNSt10unique_ptrIN4flux6parser10BinaryExprESt14default_deleteIS2_EED2Ev; std::unique_ptr<flux::parser::BinaryExpr>::~unique_ptr() lea rdi, [rbp+var_B0] call _ZNSt10unique_ptrIN4flux6parser4ExprESt14default_deleteIS2_EED2Ev; std::unique_ptr<flux::parser::Expr>::~unique_ptr() lea rdi, [rbp+var_A8]; this call _ZN4flux5lexer5TokenD2Ev; flux::lexer::Token::~Token() jmp loc_54928 mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax jmp short loc_54A97 mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax jmp short loc_54A63 mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax lea rdi, [rbp+var_B0] call _ZNSt10unique_ptrIN4flux6parser4ExprESt14default_deleteIS2_EED2Ev; std::unique_ptr<flux::parser::Expr>::~unique_ptr() loc_54A63: lea rdi, [rbp+var_A8]; this call _ZN4flux5lexer5TokenD2Ev; flux::lexer::Token::~Token() jmp short loc_54A97 loc_54A71: mov [rbp+var_11], 1 test [rbp+var_11], 1 jnz short loc_54A87 mov rdi, [rbp+var_F0] call _ZNSt10unique_ptrIN4flux6parser4ExprESt14default_deleteIS2_EED2Ev; std::unique_ptr<flux::parser::Expr>::~unique_ptr() loc_54A87: mov rax, [rbp+var_E8] add rsp, 100h pop rbp retn loc_54A97: mov rdi, [rbp+var_F0] call _ZNSt10unique_ptrIN4flux6parser4ExprESt14default_deleteIS2_EED2Ev; std::unique_ptr<flux::parser::Expr>::~unique_ptr() mov rdi, [rbp+var_40] call __Unwind_Resume
flux::parser::Parser * flux::parser::Parser::equality(flux::parser::Parser *this, long long a2) { _BYTE v3[32]; // [rsp+28h] [rbp-D8h] BYREF _BYTE v4[8]; // [rsp+48h] [rbp-B8h] BYREF _BYTE v5[8]; // [rsp+50h] [rbp-B0h] BYREF _BYTE v6[100]; // [rsp+58h] [rbp-A8h] BYREF _DWORD v7[3]; // [rsp+CCh] [rbp-34h] BYREF _DWORD *v8; // [rsp+D8h] [rbp-28h] long long v9; // [rsp+E0h] [rbp-20h] char v10; // [rsp+EFh] [rbp-11h] long long v11; // [rsp+F0h] [rbp-10h] flux::parser::Parser *v12; // [rsp+F8h] [rbp-8h] v12 = this; v11 = a2; v10 = 0; flux::parser::Parser::comparison(this); while ( 1 ) { v7[0] = 57; v7[1] = 58; v7[2] = 24; v8 = v7; v9 = 3LL; if ( (flux::parser::Parser::match(a2, (long long)v7, 3LL) & 1) == 0 ) break; flux::lexer::Token::Token((flux::lexer::Token *)v6, (const flux::lexer::Token *)(a2 + 104)); flux::parser::Parser::comparison((flux::parser::Parser *)v5); flux::parser::Parser::makeRange( (flux::parser::Parser *)v3, (const flux::lexer::Token *)a2, (const flux::lexer::Token *)v6, (flux::lexer::Token *)(a2 + 104)); std::make_unique<flux::parser::BinaryExpr,std::unique_ptr<flux::parser::Expr>,flux::lexer::Token &,std::unique_ptr<flux::parser::Expr>,flux::common::SourceRange>( v4, this, v6, v5, v3); std::unique_ptr<flux::parser::Expr>::operator=<flux::parser::BinaryExpr,std::default_delete<flux::parser::BinaryExpr>>( this, v4); std::unique_ptr<flux::parser::BinaryExpr>::~unique_ptr((long long)v4); std::unique_ptr<flux::parser::Expr>::~unique_ptr((long long)v5); flux::lexer::Token::~Token((flux::lexer::Token *)v6); } return this; }
equality: PUSH RBP MOV RBP,RSP SUB RSP,0x100 MOV qword ptr [RBP + -0xf0],RDI MOV RAX,RDI MOV qword ptr [RBP + -0xe8],RAX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RSI,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0xe0],RSI MOV byte ptr [RBP + -0x11],0x0 CALL 0x00154ab0 LAB_00154928: MOV RDI,qword ptr [RBP + -0xe0] MOV dword ptr [RBP + -0x34],0x39 MOV dword ptr [RBP + -0x30],0x3a MOV dword ptr [RBP + -0x2c],0x18 LEA RAX,[RBP + -0x34] MOV qword ptr [RBP + -0x28],RAX MOV qword ptr [RBP + -0x20],0x3 MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x20] LAB_0015495c: CALL 0x001430c0 MOV byte ptr [RBP + -0xf1],AL JMP 0x00154969 LAB_00154969: MOV AL,byte ptr [RBP + -0xf1] TEST AL,0x1 JNZ 0x00154978 JMP 0x00154a71 LAB_00154978: MOV RSI,qword ptr [RBP + -0xe0] ADD RSI,0x68 LEA RDI,[RBP + -0xa8] CALL 0x00115420 JMP 0x00154991 LAB_00154991: MOV RSI,qword ptr [RBP + -0xe0] LEA RDI,[RBP + -0xb0] CALL 0x00154ab0 JMP 0x001549a6 LAB_001549a6: MOV RSI,qword ptr [RBP + -0xe0] MOV RCX,RSI ADD RCX,0x68 LAB_001549b4: LEA RDI,[RBP + -0xd8] LEA RDX,[RBP + -0xa8] CALL 0x00143570 JMP 0x001549c9 LAB_001549c9: MOV RSI,qword ptr [RBP + -0xf0] LEA RDI,[RBP + -0xb8] LEA RDX,[RBP + -0xa8] LEA RCX,[RBP + -0xb0] LEA R8,[RBP + -0xd8] CALL 0x0015c690 LAB_001549f1: JMP 0x001549f3 LAB_001549f3: MOV RDI,qword ptr [RBP + -0xf0] LEA RSI,[RBP + -0xb8] CALL 0x0015c790 LEA RDI,[RBP + -0xb8] CALL 0x0011d890 LEA RDI,[RBP + -0xb0] CALL 0x0011d6d0 LEA RDI,[RBP + -0xa8] CALL 0x0010a300 JMP 0x00154928 LAB_00154a71: MOV byte ptr [RBP + -0x11],0x1 TEST byte ptr [RBP + -0x11],0x1 JNZ 0x00154a87 MOV RDI,qword ptr [RBP + -0xf0] CALL 0x0011d6d0 LAB_00154a87: MOV RAX,qword ptr [RBP + -0xe8] ADD RSP,0x100 POP RBP RET
/* WARNING: Removing unreachable block (ram,0x00154a7b) */ /* flux::parser::Parser::equality() */ Token * flux::parser::Parser::equality(void) { byte bVar1; Token *in_RSI; Token *in_RDI; Token local_e0 [32]; unique_ptr local_c0 [8]; SourceRange local_b8 [8]; Token local_b0 [116]; int4 local_3c; int4 local_38; int4 local_34; int4 *local_30; int8 local_28; int1 local_19; local_19 = 0; comparison(); while( true ) { local_3c = 0x39; local_38 = 0x3a; local_34 = 0x18; local_30 = &local_3c; local_28 = 3; /* try { // try from 0015495c to 0015498e has its CatchHandler @ 00154a2f */ bVar1 = match(in_RSI,local_30,3); if ((bVar1 & 1) == 0) break; lexer::Token::Token(local_b0,in_RSI + 0x68); /* try { // try from 00154991 to 001549a3 has its CatchHandler @ 00154a3d */ comparison(); /* try { // try from 001549b4 to 001549f0 has its CatchHandler @ 00154a4b */ makeRange(local_e0,in_RSI); std:: make_unique<flux::parser::BinaryExpr,std::unique_ptr<flux::parser::Expr,std::default_delete<flux::parser::Expr>>,flux::lexer::Token&,std::unique_ptr<flux::parser::Expr,std::default_delete<flux::parser::Expr>>,flux::common::SourceRange> (local_c0,in_RDI,(unique_ptr *)local_b0,local_b8); std::unique_ptr<flux::parser::Expr,std::default_delete<flux::parser::Expr>>::operator= ((unique_ptr<flux::parser::Expr,std::default_delete<flux::parser::Expr>> *)in_RDI, local_c0); std::unique_ptr<flux::parser::BinaryExpr,std::default_delete<flux::parser::BinaryExpr>>:: ~unique_ptr((unique_ptr<flux::parser::BinaryExpr,std::default_delete<flux::parser::BinaryExpr>> *)local_c0); std::unique_ptr<flux::parser::Expr,std::default_delete<flux::parser::Expr>>::~unique_ptr ((unique_ptr<flux::parser::Expr,std::default_delete<flux::parser::Expr>> *)local_b8); lexer::Token::~Token(local_b0); } return in_RDI; }
23,581
FindPeaksCppTest_NoisySignal_Test::~FindPeaksCppTest_NoisySignal_Test()
giladroyz[P]FindPeaks/tests/test_find_peaks_cpp.cpp
TEST_F(FindPeaksCppTest, NoisySignal) { auto peaks = find_peaks(noisy_signal); // Verify that peaks are correctly identified in noisy signal ASSERT_GT(peaks.size(), 0); // Check if the highest peak is detected (index 8, value 3.2) bool found_max_peak = false; for (const auto& peak : peaks) { if (peak.peak == 8) { found_max_peak = true; EXPECT_DOUBLE_EQ(3.2, peak.peak_height); break; } } EXPECT_TRUE(found_max_peak); }
O3
cpp
FindPeaksCppTest_NoisySignal_Test::~FindPeaksCppTest_NoisySignal_Test(): pushq %rbx movq %rdi, %rbx callq 0xd92e movl $0x88, %esi movq %rbx, %rdi popq %rbx jmp 0x84e0 nop
_ZN33FindPeaksCppTest_NoisySignal_TestD0Ev: push rbx mov rbx, rdi call _ZN16FindPeaksCppTestD2Ev; FindPeaksCppTest::~FindPeaksCppTest() mov esi, 88h; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong)
void FindPeaksCppTest_NoisySignal_Test::~FindPeaksCppTest_NoisySignal_Test( FindPeaksCppTest_NoisySignal_Test *this) { FindPeaksCppTest::~FindPeaksCppTest(this); operator delete(this, 0x88uLL); }
~FindPeaksCppTest_NoisySignal_Test: PUSH RBX MOV RBX,RDI CALL 0x0010d92e MOV ESI,0x88 MOV RDI,RBX POP RBX JMP 0x001084e0
/* FindPeaksCppTest_NoisySignal_Test::~FindPeaksCppTest_NoisySignal_Test() */ void __thiscall FindPeaksCppTest_NoisySignal_Test::~FindPeaksCppTest_NoisySignal_Test (FindPeaksCppTest_NoisySignal_Test *this) { FindPeaksCppTest::~FindPeaksCppTest((FindPeaksCppTest *)this); operator_delete(this,0x88); return; }
23,582
nglog::tools::GetSectionHeaderByType(int, unsigned short, unsigned long, unsigned int, Elf64_Shdr*)
ng-log[P]ng-log/src/symbolize.cc
static ATTRIBUTE_NOINLINE bool GetSectionHeaderByType(const int fd, ElfW(Half) sh_num, const size_t sh_offset, ElfW(Word) type, ElfW(Shdr) * out) { // Read at most 16 section headers at a time to save read calls. ElfW(Shdr) buf[16]; for (size_t i = 0; i < sh_num;) { const size_t num_bytes_left = (sh_num - i) * sizeof(buf[0]); const size_t num_bytes_to_read = (sizeof(buf) > num_bytes_left) ? num_bytes_left : sizeof(buf); const ssize_t len = ReadFromOffset(fd, buf, num_bytes_to_read, sh_offset + i * sizeof(buf[0])); if (len == -1) { return false; } NGLOG_SAFE_ASSERT(static_cast<size_t>(len) % sizeof(buf[0]) == 0); const size_t num_headers_in_buf = static_cast<size_t>(len) / sizeof(buf[0]); NGLOG_SAFE_ASSERT(num_headers_in_buf <= sizeof(buf) / sizeof(buf[0])); for (size_t j = 0; j < num_headers_in_buf; ++j) { if (buf[j].sh_type == type) { *out = buf[j]; return true; } } i += num_headers_in_buf; } return false; }
O2
cpp
nglog::tools::GetSectionHeaderByType(int, unsigned short, unsigned long, unsigned int, Elf64_Shdr*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x418, %rsp # imm = 0x418 movq %r8, 0x8(%rsp) movl %ecx, %ebp movq %rdx, %r8 movl %esi, %ebx xorl %r12d, %r12d movl $0x400, %eax # imm = 0x400 leaq 0x10(%rsp), %rsi movq %rbx, %rdx subq %r12, %rdx jbe 0x1e86d shlq $0x6, %rdx cmpq %rax, %rdx cmovaeq %rax, %rdx movq %r12, %rcx shlq $0x6, %rcx movq %r8, %r15 addq %r8, %rcx movl %edi, %r13d movq %rsi, %r14 callq 0x1de17 cmpq $-0x1, %rax je 0x1e86d testb $0x3f, %al jne 0x1e871 cmpq $0x43f, %rax # imm = 0x43F ja 0x1e871 shrq $0x6, %rax leaq 0x1(%rax), %rcx leaq 0x14(%rsp), %rdx decq %rcx je 0x1e822 leaq 0x40(%rdx), %rsi cmpl %ebp, (%rdx) movq %rsi, %rdx jne 0x1e810 jmp 0x1e835 addq %rax, %r12 movl $0x400, %eax # imm = 0x400 movq %r14, %rsi movq %r15, %r8 movl %r13d, %edi jmp 0x1e7c2 movups -0x44(%rsi), %xmm0 movups -0x34(%rsi), %xmm1 movups -0x24(%rsi), %xmm2 movups -0x14(%rsi), %xmm3 movq 0x8(%rsp), %rax movups %xmm3, 0x30(%rax) movups %xmm2, 0x20(%rax) movups %xmm1, 0x10(%rax) movups %xmm0, (%rax) movb $0x1, %al addq $0x418, %rsp # imm = 0x418 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq xorl %eax, %eax jmp 0x1e85b callq 0x8310
_ZN5nglog5toolsL22GetSectionHeaderByTypeEitmjP10Elf64_Shdr: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 418h mov [rsp+448h+var_440], r8 mov ebp, ecx mov r8, rdx; unsigned __int64 mov ebx, esi xor r12d, r12d mov eax, offset stru_3F8.st_value lea rsi, [rsp+448h+var_438]; int loc_1E7C2: mov rdx, rbx sub rdx, r12 jbe loc_1E86D shl rdx, 6 cmp rdx, rax cmovnb rdx, rax; void * mov rcx, r12 shl rcx, 6 mov r15, r8 add rcx, r8; unsigned __int64 mov r13d, edi mov r14, rsi call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_1E86D test al, 3Fh jnz short loc_1E871 cmp rax, 43Fh ja short loc_1E871 shr rax, 6 lea rcx, [rax+1] lea rdx, [rsp+448h+var_434] loc_1E810: dec rcx jz short loc_1E822 lea rsi, [rdx+40h] cmp [rdx], ebp mov rdx, rsi jnz short loc_1E810 jmp short loc_1E835 loc_1E822: add r12, rax mov eax, 400h mov rsi, r14 mov r8, r15 mov edi, r13d jmp short loc_1E7C2 loc_1E835: movups xmm0, xmmword ptr [rsi-44h] movups xmm1, xmmword ptr [rsi-34h] movups xmm2, xmmword ptr [rsi-24h] movups xmm3, xmmword ptr [rsi-14h] mov rax, [rsp+448h+var_440] movups xmmword ptr [rax+30h], xmm3 movups xmmword ptr [rax+20h], xmm2 movups xmmword ptr [rax+10h], xmm1 movups xmmword ptr [rax], xmm0 mov al, 1 loc_1E85B: add rsp, 418h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1E86D: xor eax, eax jmp short loc_1E85B loc_1E871: call _abort
char nglog::tools::GetSectionHeaderByType( unsigned long long a1, unsigned int a2, long long a3, int a4, _OWORD *a5) { unsigned long long v7; // rbx unsigned long long v8; // r12 unsigned long long *p_st_value; // rax int *v10; // rsi char *v11; // rdx long long v12; // r15 int *v13; // r14 unsigned long long v14; // rax unsigned long long v15; // rax unsigned long long v16; // rcx char *v17; // rdx _DWORD *v18; // rsi bool v19; // zf __int128 v20; // xmm0 __int128 v21; // xmm1 __int128 v22; // xmm2 int v25; // [rsp+10h] [rbp-438h] BYREF char v26; // [rsp+14h] [rbp-434h] BYREF v7 = a2; v8 = 0LL; p_st_value = &stru_3F8.st_value; v10 = &v25; while ( v7 > v8 ) { v11 = (char *)((v7 - v8) << 6); if ( v11 >= (char *)p_st_value ) v11 = (char *)p_st_value; v12 = a3; v13 = v10; v14 = nglog::tools::ReadFromOffset(a1, (long long)v10, v11, a3 + (v8 << 6)); if ( v14 == -1LL ) break; if ( (v14 & 0x3F) != 0 || v14 > 0x43F ) abort(a1); v15 = v14 >> 6; v16 = v15 + 1; v17 = &v26; while ( --v16 ) { v18 = v17 + 64; v19 = *(_DWORD *)v17 == a4; v17 += 64; if ( v19 ) { v20 = *(_OWORD *)(v18 - 17); v21 = *(_OWORD *)(v18 - 13); v22 = *(_OWORD *)(v18 - 9); a5[3] = *(_OWORD *)(v18 - 5); a5[2] = v22; a5[1] = v21; *a5 = v20; return 1; } } v8 += v15; p_st_value = (_QWORD *)(&stru_3F8 + 8); v10 = v13; a3 = v12; a1 = (unsigned int)a1; } return 0; }
GetSectionHeaderByType: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x418 MOV qword ptr [RSP + 0x8],R8 MOV EBP,ECX MOV R8,RDX MOV EBX,ESI XOR R12D,R12D MOV EAX,0x400 LEA RSI,[RSP + 0x10] LAB_0011e7c2: MOV RDX,RBX SUB RDX,R12 JBE 0x0011e86d SHL RDX,0x6 CMP RDX,RAX CMOVNC RDX,RAX MOV RCX,R12 SHL RCX,0x6 MOV R15,R8 ADD RCX,R8 MOV R13D,EDI MOV R14,RSI CALL 0x0011de17 CMP RAX,-0x1 JZ 0x0011e86d TEST AL,0x3f JNZ 0x0011e871 CMP RAX,0x43f JA 0x0011e871 SHR RAX,0x6 LEA RCX,[RAX + 0x1] LEA RDX,[RSP + 0x14] LAB_0011e810: DEC RCX JZ 0x0011e822 LEA RSI,[RDX + 0x40] CMP dword ptr [RDX],EBP MOV RDX,RSI JNZ 0x0011e810 JMP 0x0011e835 LAB_0011e822: ADD R12,RAX MOV EAX,0x400 MOV RSI,R14 MOV R8,R15 MOV EDI,R13D JMP 0x0011e7c2 LAB_0011e835: MOVUPS XMM0,xmmword ptr [RSI + -0x44] MOVUPS XMM1,xmmword ptr [RSI + -0x34] MOVUPS XMM2,xmmword ptr [RSI + -0x24] MOVUPS XMM3,xmmword ptr [RSI + -0x14] MOV RAX,qword ptr [RSP + 0x8] MOVUPS xmmword ptr [RAX + 0x30],XMM3 MOVUPS xmmword ptr [RAX + 0x20],XMM2 MOVUPS xmmword ptr [RAX + 0x10],XMM1 MOVUPS xmmword ptr [RAX],XMM0 MOV AL,0x1 LAB_0011e85b: ADD RSP,0x418 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011e86d: XOR EAX,EAX JMP 0x0011e85b LAB_0011e871: CALL 0x00108310
/* nglog::tools::GetSectionHeaderByType(int, unsigned short, unsigned long, unsigned int, Elf64_Shdr*) */ int8 nglog::tools::GetSectionHeaderByType (int param_1,ushort param_2,ulong param_3,uint param_4,Elf64_Shdr *param_5) { qword qVar1; qword qVar2; qword qVar3; qword qVar4; qword qVar5; uint uVar6; uint uVar7; uint uVar8; uint uVar9; uint *puVar10; long lVar11; ulong uVar12; uint *puVar13; ulong uVar14; int6 in_register_00000032; ulong uVar15; int1 local_438 [4]; uint auStack_434 [257]; uVar14 = CONCAT62(in_register_00000032,param_2) & 0xffffffff; uVar15 = 0; while( true ) { lVar11 = uVar14 - uVar15; if (uVar14 < uVar15 || lVar11 == 0) { return 0; } uVar12 = lVar11 * 0x40; if (0x3ff < uVar12) { uVar12 = 0x400; } uVar12 = ReadFromOffset(param_1,local_438,uVar12,uVar15 * 0x40 + param_3); if (uVar12 == 0xffffffffffffffff) break; if (((uVar12 & 0x3f) != 0) || (0x43f < uVar12)) { /* WARNING: Subroutine does not return */ abort(); } lVar11 = (uVar12 >> 6) + 1; puVar10 = auStack_434; while (puVar13 = puVar10, lVar11 = lVar11 + -1, lVar11 != 0) { puVar10 = puVar13 + 0x10; if (*puVar13 == param_4) { uVar8 = puVar13[-1]; uVar9 = puVar13[0]; qVar1 = *(qword *)(puVar13 + 1); qVar2 = *(qword *)(puVar13 + 3); qVar3 = *(qword *)(puVar13 + 5); qVar4 = *(qword *)(puVar13 + 7); uVar6 = puVar13[9]; uVar7 = puVar13[10]; qVar5 = *(qword *)(puVar13 + 0xd); param_5->sh_addralign = *(qword *)(puVar13 + 0xb); param_5->sh_entsize = qVar5; param_5->sh_size = qVar4; param_5->sh_link = uVar6; param_5->sh_info = uVar7; param_5->sh_addr = qVar2; param_5->sh_offset = qVar3; param_5->sh_name = uVar8; param_5->sh_type = uVar9; param_5->sh_flags = qVar1; return 1; } } uVar15 = uVar15 + (uVar12 >> 6); } return 0; }
23,583
rtree_insert_req
eloqsql/storage/myisam/rt_index.c
static int rtree_insert_req(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key, uint key_length, my_off_t page, my_off_t *new_page, int ins_level, int level) { uchar *k; uint nod_flag; uchar *page_buf; int res; DBUG_ENTER("rtree_insert_req"); if (!(page_buf = (uchar*)my_alloca((uint)keyinfo->block_length + HA_MAX_KEY_BUFF))) { my_errno = HA_ERR_OUT_OF_MEM; DBUG_RETURN(-1); /* purecov: inspected */ } if (!_mi_fetch_keypage(info, keyinfo, page, DFLT_INIT_HITS, page_buf, 0)) goto err1; nod_flag = mi_test_if_nod(page_buf); DBUG_PRINT("rtree", ("page: %lu level: %d ins_level: %d nod_flag: %u", (ulong) page, level, ins_level, nod_flag)); if ((ins_level == -1 && nod_flag) || /* key: go down to leaf */ (ins_level > -1 && ins_level > level)) /* branch: go down to ins_level */ { if ((k = rtree_pick_key(info, keyinfo, key, key_length, page_buf, nod_flag)) == NULL) goto err1; switch ((res = rtree_insert_req(info, keyinfo, key, key_length, _mi_kpos(nod_flag, k), new_page, ins_level, level + 1))) { case 0: /* child was not split */ { rtree_combine_rect(keyinfo->seg, k, key, k, key_length); if (_mi_write_keypage(info, keyinfo, page, DFLT_INIT_HITS, page_buf)) goto err1; goto ok; } case 1: /* child was split */ { uchar *new_key = page_buf + keyinfo->block_length + nod_flag; /* set proper MBR for key */ if (rtree_set_key_mbr(info, keyinfo, k, key_length, _mi_kpos(nod_flag, k))) goto err1; /* add new key for new page */ _mi_kpointer(info, new_key - nod_flag, *new_page); if (rtree_set_key_mbr(info, keyinfo, new_key, key_length, *new_page)) goto err1; res = rtree_add_key(info, keyinfo, new_key, key_length, page_buf, new_page); if (_mi_write_keypage(info, keyinfo, page, DFLT_INIT_HITS, page_buf)) goto err1; goto ok; } default: case -1: /* error */ { goto err1; } } } else { res = rtree_add_key(info, keyinfo, key, key_length, page_buf, new_page); if (_mi_write_keypage(info, keyinfo, page, DFLT_INIT_HITS, page_buf)) goto err1; goto ok; } ok: my_afree((uchar*)page_buf); DBUG_RETURN(res); err1: my_afree((uchar*)page_buf); DBUG_RETURN(-1); /* purecov: inspected */ }
O3
c
rtree_insert_req: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %r9, -0x50(%rbp) movq %r8, %r15 movl %ecx, -0x34(%rbp) movq %rdx, -0x58(%rbp) movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movzwl 0xe(%rsi), %eax movq %rsp, %r13 addl $0x4c7, %eax # imm = 0x4C7 andl $-0x10, %eax subq %rax, %r13 movq %r13, %rsp xorl %ebx, %ebx movq %rdi, -0x40(%rbp) movq %rsi, -0x48(%rbp) movq %r8, %rdx movl $0x3, %ecx movq %r13, %r8 xorl %r9d, %r9d callq 0x88f9c testq %rax, %rax je 0x904a5 movl 0x18(%rbp), %esi movl 0x10(%rbp), %edx movzbl (%r13), %r14d testb %r14b, %r14b jns 0x90307 movq -0x40(%rbp), %rax movq (%rax), %rax movl 0x17c(%rax), %ebx cmpl $-0x1, %edx sete %al testl %ebx, %ebx setne %cl testb %cl, %al jne 0x90319 testl %edx, %edx sets %al cmpl %esi, %edx setle %cl orb %al, %cl jne 0x90468 movq %r15, -0x68(%rbp) movl %ebx, %r12d movq %r13, %rcx addq %r12, %r13 addq $0x2, %r13 movzbl 0x1(%rcx), %eax andl $0x7f, %r14d shll $0x8, %r14d orq %rax, %r14 movq %rcx, -0x60(%rbp) addq %rcx, %r14 cmpq %r14, %r13 jae 0x904a5 movl -0x34(%rbp), %r15d xorl %ebx, %ebx movq -0x48(%rbp), %rax movq 0x28(%rax), %rdi movq %r13, %rsi movq -0x58(%rbp), %rdx movl -0x34(%rbp), %ecx leaq -0x80(%rbp), %r8 callq 0x920a5 ucomisd 0x59b8e(%rip), %xmm0 # 0xe9f00 jne 0x9037a jnp 0x904a5 movsd -0x80(%rbp), %xmm1 testq %rbx, %rbx movsd -0x78(%rbp), %xmm3 je 0x903a2 ucomisd %xmm0, %xmm3 ja 0x903a2 ucomisd %xmm3, %xmm0 jne 0x903ae jp 0x903ae movsd -0x70(%rbp), %xmm2 ucomisd %xmm1, %xmm2 jbe 0x903ae movapd %xmm0, %xmm3 movsd %xmm1, -0x70(%rbp) movq %r13, %rbx movq %r12, %rax testl %r12d, %r12d jne 0x903c3 movq -0x40(%rbp), %rax movq (%rax), %rax movl 0x178(%rax), %eax movsd %xmm3, -0x78(%rbp) addq %r15, %r13 addq %rax, %r13 cmpq %r14, %r13 jb 0x9034f testq %rbx, %rbx movq -0x68(%rbp), %r14 je 0x904a5 movl %r12d, %edi movq %rbx, %rsi callq 0x89916 movl 0x18(%rbp), %ecx movq %rcx, %r10 incl %r10d movq -0x40(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x58(%rbp), %rdx movl -0x34(%rbp), %ecx movq %rax, %r8 movq -0x50(%rbp), %r9 pushq %r10 movl 0x10(%rbp), %eax pushq %rax callq 0x90274 addq $0x10, %rsp cmpl $0x1, %eax je 0x904ce testl %eax, %eax movq -0x60(%rbp), %r12 jne 0x904a5 movq -0x48(%rbp), %r15 movq 0x28(%r15), %rdi movq %rbx, %rsi movq -0x58(%rbp), %rdx movq %rbx, %rcx movl -0x34(%rbp), %r8d callq 0x916a5 movq -0x40(%rbp), %rdi movq %r15, %rsi movq %r14, %rdx movl $0x3, %ecx movq %r12, %r8 callq 0x89048 testl %eax, %eax jne 0x904a5 xorl %ebx, %ebx jmp 0x904aa movq -0x40(%rbp), %r12 movq %r12, %rdi movq -0x48(%rbp), %r14 movq %r14, %rsi movq -0x58(%rbp), %rdx movl -0x34(%rbp), %ecx movq %r13, %r8 movq -0x50(%rbp), %r9 callq 0x90578 movl %eax, %ebx movq %r12, %rdi movq %r14, %rsi movq %r15, %rdx movl $0x3, %ecx movq %r13, %r8 callq 0x89048 testl %eax, %eax je 0x904aa movl $0xffffffff, %ebx # imm = 0xFFFFFFFF movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x90572 movl %ebx, %eax leaq -0x28(%rbp), %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq -0x48(%rbp), %r15 movzwl 0xe(%r15), %r13d movl %r12d, %edi movq %rbx, %rsi callq 0x89916 movq -0x40(%rbp), %rdi movq %r15, %rsi movq %rbx, %rdx movl -0x34(%rbp), %ecx movq %rax, %r8 callq 0x906f0 testl %eax, %eax movq -0x60(%rbp), %rax jne 0x904a5 addq %rax, %r13 addq %r13, %r12 movq -0x50(%rbp), %r15 movq (%r15), %rdx movq -0x40(%rbp), %rbx movq %rbx, %rdi movq %r13, %rsi callq 0x8a481 movq (%r15), %r8 movq -0x60(%rbp), %r15 movq %rbx, %rdi movq -0x48(%rbp), %rsi movq %r12, %rdx movl -0x34(%rbp), %ecx callq 0x906f0 testl %eax, %eax jne 0x904a5 movq -0x40(%rbp), %rdi movq -0x48(%rbp), %r13 movq %r13, %rsi movq %r12, %rdx movl -0x34(%rbp), %ecx movq %r15, %r8 movq -0x50(%rbp), %r9 callq 0x90578 movl %eax, %ebx movq -0x40(%rbp), %rdi movq %r13, %rsi movq %r14, %rdx movl $0x3, %ecx movq %r15, %r8 jmp 0x9049c callq 0x2a240 nop
rtree_insert_req: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov [rbp+var_50], r9 mov r15, r8 mov [rbp+var_34], ecx mov [rbp+var_58], rdx mov rax, fs:28h mov [rbp+var_30], rax movzx eax, word ptr [rsi+0Eh] mov r13, rsp add eax, 4C7h and eax, 0FFFFFFF0h sub r13, rax mov rsp, r13 xor ebx, ebx mov [rbp+var_40], rdi mov [rbp+var_48], rsi mov rdx, r8 mov ecx, 3 mov r8, r13 xor r9d, r9d call _mi_fetch_keypage test rax, rax jz loc_904A5 mov esi, [rbp+arg_8] mov edx, [rbp+arg_0] movzx r14d, byte ptr [r13+0] test r14b, r14b jns short loc_90307 mov rax, [rbp+var_40] mov rax, [rax] mov ebx, [rax+17Ch] cmp edx, 0FFFFFFFFh setz al test ebx, ebx setnz cl test al, cl jnz short loc_90319 loc_90307: test edx, edx sets al cmp edx, esi setle cl or cl, al jnz loc_90468 loc_90319: mov [rbp+var_68], r15 mov r12d, ebx mov rcx, r13 add r13, r12 add r13, 2 movzx eax, byte ptr [rcx+1] and r14d, 7Fh shl r14d, 8 or r14, rax mov [rbp+var_60], rcx add r14, rcx cmp r13, r14 jnb loc_904A5 mov r15d, [rbp+var_34] xor ebx, ebx loc_9034F: mov rax, [rbp+var_48] mov rdi, [rax+28h] mov rsi, r13 mov rdx, [rbp+var_58] mov ecx, [rbp+var_34] lea r8, [rbp+var_80] call rtree_area_increase ucomisd xmm0, cs:qword_E9F00 jnz short loc_9037A jnp loc_904A5 loc_9037A: movsd xmm1, [rbp+var_80] test rbx, rbx movsd xmm3, [rbp+var_78] jz short loc_903A2 ucomisd xmm3, xmm0 ja short loc_903A2 ucomisd xmm0, xmm3 jnz short loc_903AE jp short loc_903AE movsd xmm2, [rbp+var_70] ucomisd xmm2, xmm1 jbe short loc_903AE loc_903A2: movapd xmm3, xmm0 movsd [rbp+var_70], xmm1 mov rbx, r13 loc_903AE: mov rax, r12 test r12d, r12d jnz short loc_903C3 mov rax, [rbp+var_40] mov rax, [rax] mov eax, [rax+178h] loc_903C3: movsd [rbp+var_78], xmm3 add r13, r15 add r13, rax cmp r13, r14 jb loc_9034F test rbx, rbx mov r14, [rbp+var_68] jz loc_904A5 mov edi, r12d mov rsi, rbx call _mi_kpos mov ecx, [rbp+arg_8] mov r10, rcx inc r10d mov rdi, [rbp+var_40] mov rsi, [rbp+var_48] mov rdx, [rbp+var_58] mov ecx, [rbp+var_34] mov r8, rax mov r9, [rbp+var_50] push r10 mov eax, [rbp+arg_0] push rax call rtree_insert_req add rsp, 10h cmp eax, 1 jz loc_904CE test eax, eax mov r12, [rbp+var_60] jnz short loc_904A5 mov r15, [rbp+var_48] mov rdi, [r15+28h] mov rsi, rbx mov rdx, [rbp+var_58] mov rcx, rbx mov r8d, [rbp+var_34] call rtree_combine_rect mov rdi, [rbp+var_40] mov rsi, r15 mov rdx, r14 mov ecx, 3 mov r8, r12 call _mi_write_keypage test eax, eax jnz short loc_904A5 xor ebx, ebx jmp short loc_904AA loc_90468: mov r12, [rbp+var_40] mov rdi, r12 mov r14, [rbp+var_48] mov rsi, r14 mov rdx, [rbp+var_58] mov ecx, [rbp+var_34] mov r8, r13 mov r9, [rbp+var_50] call rtree_add_key mov ebx, eax mov rdi, r12 mov rsi, r14 mov rdx, r15 mov ecx, 3 mov r8, r13 loc_9049C: call _mi_write_keypage test eax, eax jz short loc_904AA loc_904A5: mov ebx, 0FFFFFFFFh loc_904AA: mov rax, fs:28h cmp rax, [rbp+var_30] jnz loc_90572 mov eax, ebx lea rsp, [rbp-28h] pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_904CE: mov r15, [rbp+var_48] movzx r13d, word ptr [r15+0Eh] mov edi, r12d mov rsi, rbx call _mi_kpos mov rdi, [rbp+var_40] mov rsi, r15 mov rdx, rbx mov ecx, [rbp+var_34] mov r8, rax call rtree_set_key_mbr test eax, eax mov rax, [rbp+var_60] jnz short loc_904A5 add r13, rax add r12, r13 mov r15, [rbp+var_50] mov rdx, [r15] mov rbx, [rbp+var_40] mov rdi, rbx mov rsi, r13 call _mi_kpointer mov r8, [r15] mov r15, [rbp+var_60] mov rdi, rbx mov rsi, [rbp+var_48] mov rdx, r12 mov ecx, [rbp+var_34] call rtree_set_key_mbr test eax, eax jnz loc_904A5 mov rdi, [rbp+var_40] mov r13, [rbp+var_48] mov rsi, r13 mov rdx, r12 mov ecx, [rbp+var_34] mov r8, r15 mov r9, [rbp+var_50] call rtree_add_key mov ebx, eax mov rdi, [rbp+var_40] mov rsi, r13 mov rdx, r14 mov ecx, 3 mov r8, r15 jmp loc_9049C loc_90572: call ___stack_chk_fail
// bad sp value at call has been detected, the output may be wrong! long long rtree_insert_req( long long *a1, long long a2, long long a3, unsigned int a4, long long a5, unsigned long long *a6, int a7, int a8) { char *v9; // r13 unsigned int v10; // ebx char v11; // r14 long long v12; // r12 char *v13; // rcx unsigned long long v14; // r13 long long v15; // rax unsigned long long v16; // r14 long long v17; // r15 long long v18; // rbx double v19; // xmm0_8 double v20; // xmm1_8 double v21; // xmm3_8 long long v22; // rax unsigned long long v23; // r14 int v24; // eax int inserted; // eax char *v26; // r12 long long v27; // r15 unsigned int v28; // ebx long long *v29; // r12 long long v30; // r14 long long *v31; // rdi long long v32; // rsi unsigned long long v33; // rdx char *v34; // r8 long long v36; // r15 long long v37; // r13 unsigned long long v38; // rax char *v39; // r13 char *v40; // r12 unsigned long long *v41; // r15 long long *v42; // rbx unsigned long long v43; // r8 char *v44; // r15 long long v45; // r13 double v46; // [rsp+0h] [rbp-80h] BYREF double v47; // [rsp+8h] [rbp-78h] double v48; // [rsp+10h] [rbp-70h] unsigned long long v49; // [rsp+18h] [rbp-68h] char *v50; // [rsp+20h] [rbp-60h] long long v51; // [rsp+28h] [rbp-58h] unsigned long long *v52; // [rsp+30h] [rbp-50h] long long v53; // [rsp+38h] [rbp-48h] long long *v54; // [rsp+40h] [rbp-40h] unsigned int v55; // [rsp+4Ch] [rbp-34h] unsigned long long v56; // [rsp+50h] [rbp-30h] v52 = a6; v55 = a4; v51 = a3; v56 = __readfsqword(0x28u); v9 = (char *)&v46 - ((*(unsigned __int16 *)(a2 + 14) + 1223) & 0xFFFFFFF0); v10 = 0; v54 = a1; v53 = a2; if ( !mi_fetch_keypage(a1, a2, a5) ) return (unsigned int)-1; v11 = *v9; if ( *v9 < 0 && (v10 = *(_DWORD *)(*v54 + 380), v10 != 0 && a7 == -1) || a7 >= 0 && a7 > a8 ) { v49 = a5; v12 = v10; v13 = v9; v14 = (unsigned long long)&v9[v10 + 2]; v15 = (unsigned __int8)v13[1]; v50 = v13; v16 = (unsigned long long)&v13[v15 | ((unsigned __int8)(v11 & 0x7F) << 8)]; if ( v14 < v16 ) { v17 = v55; v18 = 0LL; while ( 1 ) { v19 = rtree_area_increase(*(_QWORD *)(v53 + 40), v14, v51, v55, &v46); if ( v19 == -1.0 ) break; v20 = v46; v21 = v47; if ( !v18 || v47 > v19 || v19 == v47 && v48 > v46 ) { v21 = v19; v48 = v46; v18 = v14; } v22 = v12; if ( !(_DWORD)v12 ) v22 = *(unsigned int *)(*v54 + 376); v47 = v21; v14 += v22 + v17; if ( v14 >= v16 ) { v23 = v49; if ( !v18 ) return (unsigned int)-1; v24 = mi_kpos(v12, v18); inserted = rtree_insert_req((_DWORD)v54, v53, v51, v55, v24, (_DWORD)v52, a7, a8 + 1); if ( inserted == 1 ) { v36 = v53; v37 = *(unsigned __int16 *)(v53 + 14); v38 = mi_kpos(v12, v18); if ( !(unsigned int)rtree_set_key_mbr(v54, v36, v18, v55, v38) ) { v39 = &v50[v37]; v40 = &v39[v12]; v41 = v52; v42 = v54; mi_kpointer((long long)v54, v39, *v52); v43 = *v41; v44 = v50; if ( !(unsigned int)rtree_set_key_mbr(v42, v53, v40, v55, v43) ) { v45 = v53; v28 = rtree_add_key(v54, v53, v40, v55, v44, v52); v31 = v54; v32 = v45; v33 = v23; v34 = v44; goto LABEL_22; } } } else { v26 = v50; if ( !inserted ) { v27 = v53; rtree_combine_rect(*(_QWORD *)(v53 + 40), v18, v51, v18, v55, v19, v20); if ( !(unsigned int)mi_write_keypage(v54, v27, v23, 3u, v26) ) return 0; } } return (unsigned int)-1; } } } return (unsigned int)-1; } v29 = v54; v30 = v53; v28 = rtree_add_key(v54, v53, v51, v55, v9, v52); v31 = v29; v32 = v30; v33 = a5; v34 = v9; LABEL_22: if ( (unsigned int)mi_write_keypage(v31, v32, v33, 3u, v34) ) return (unsigned int)-1; return v28; }
rtree_insert_req: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV qword ptr [RBP + -0x50],R9 MOV R15,R8 MOV dword ptr [RBP + -0x34],ECX MOV qword ptr [RBP + -0x58],RDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOVZX EAX,word ptr [RSI + 0xe] MOV R13,RSP ADD EAX,0x4c7 AND EAX,0xfffffff0 SUB R13,RAX MOV RSP,R13 XOR EBX,EBX MOV qword ptr [RBP + -0x40],RDI MOV qword ptr [RBP + -0x48],RSI MOV RDX,R8 MOV ECX,0x3 MOV R8,R13 XOR R9D,R9D CALL 0x00188f9c TEST RAX,RAX JZ 0x001904a5 MOV ESI,dword ptr [RBP + 0x18] MOV EDX,dword ptr [RBP + 0x10] MOVZX R14D,byte ptr [R13] TEST R14B,R14B JNS 0x00190307 MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX] MOV EBX,dword ptr [RAX + 0x17c] CMP EDX,-0x1 SETZ AL TEST EBX,EBX SETNZ CL TEST AL,CL JNZ 0x00190319 LAB_00190307: TEST EDX,EDX SETS AL CMP EDX,ESI SETLE CL OR CL,AL JNZ 0x00190468 LAB_00190319: MOV qword ptr [RBP + -0x68],R15 MOV R12D,EBX MOV RCX,R13 ADD R13,R12 ADD R13,0x2 MOVZX EAX,byte ptr [RCX + 0x1] AND R14D,0x7f SHL R14D,0x8 OR R14,RAX MOV qword ptr [RBP + -0x60],RCX ADD R14,RCX CMP R13,R14 JNC 0x001904a5 MOV R15D,dword ptr [RBP + -0x34] XOR EBX,EBX LAB_0019034f: MOV RAX,qword ptr [RBP + -0x48] MOV RDI,qword ptr [RAX + 0x28] MOV RSI,R13 MOV RDX,qword ptr [RBP + -0x58] MOV ECX,dword ptr [RBP + -0x34] LEA R8,[RBP + -0x80] CALL 0x001920a5 UCOMISD XMM0,qword ptr [0x001e9f00] JNZ 0x0019037a JNP 0x001904a5 LAB_0019037a: MOVSD XMM1,qword ptr [RBP + -0x80] TEST RBX,RBX MOVSD XMM3,qword ptr [RBP + -0x78] JZ 0x001903a2 UCOMISD XMM3,XMM0 JA 0x001903a2 UCOMISD XMM0,XMM3 JNZ 0x001903ae JP 0x001903ae MOVSD XMM2,qword ptr [RBP + -0x70] UCOMISD XMM2,XMM1 JBE 0x001903ae LAB_001903a2: MOVAPD XMM3,XMM0 MOVSD qword ptr [RBP + -0x70],XMM1 MOV RBX,R13 LAB_001903ae: MOV RAX,R12 TEST R12D,R12D JNZ 0x001903c3 MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x178] LAB_001903c3: MOVSD qword ptr [RBP + -0x78],XMM3 ADD R13,R15 ADD R13,RAX CMP R13,R14 JC 0x0019034f TEST RBX,RBX MOV R14,qword ptr [RBP + -0x68] JZ 0x001904a5 MOV EDI,R12D MOV RSI,RBX CALL 0x00189916 MOV ECX,dword ptr [RBP + 0x18] MOV R10,RCX INC R10D MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x58] MOV ECX,dword ptr [RBP + -0x34] MOV R8,RAX MOV R9,qword ptr [RBP + -0x50] PUSH R10 MOV EAX,dword ptr [RBP + 0x10] PUSH RAX CALL 0x00190274 ADD RSP,0x10 CMP EAX,0x1 JZ 0x001904ce TEST EAX,EAX MOV R12,qword ptr [RBP + -0x60] JNZ 0x001904a5 MOV R15,qword ptr [RBP + -0x48] MOV RDI,qword ptr [R15 + 0x28] MOV RSI,RBX MOV RDX,qword ptr [RBP + -0x58] MOV RCX,RBX MOV R8D,dword ptr [RBP + -0x34] CALL 0x001916a5 MOV RDI,qword ptr [RBP + -0x40] MOV RSI,R15 MOV RDX,R14 MOV ECX,0x3 MOV R8,R12 CALL 0x00189048 TEST EAX,EAX JNZ 0x001904a5 XOR EBX,EBX JMP 0x001904aa LAB_00190468: MOV R12,qword ptr [RBP + -0x40] MOV RDI,R12 MOV R14,qword ptr [RBP + -0x48] MOV RSI,R14 MOV RDX,qword ptr [RBP + -0x58] MOV ECX,dword ptr [RBP + -0x34] MOV R8,R13 MOV R9,qword ptr [RBP + -0x50] CALL 0x00190578 MOV EBX,EAX MOV RDI,R12 MOV RSI,R14 MOV RDX,R15 MOV ECX,0x3 MOV R8,R13 LAB_0019049c: CALL 0x00189048 TEST EAX,EAX JZ 0x001904aa LAB_001904a5: MOV EBX,0xffffffff LAB_001904aa: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00190572 MOV EAX,EBX LEA RSP,[RBP + -0x28] POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001904ce: MOV R15,qword ptr [RBP + -0x48] MOVZX R13D,word ptr [R15 + 0xe] MOV EDI,R12D MOV RSI,RBX CALL 0x00189916 MOV RDI,qword ptr [RBP + -0x40] MOV RSI,R15 MOV RDX,RBX MOV ECX,dword ptr [RBP + -0x34] MOV R8,RAX CALL 0x001906f0 TEST EAX,EAX MOV RAX,qword ptr [RBP + -0x60] JNZ 0x001904a5 ADD R13,RAX ADD R12,R13 MOV R15,qword ptr [RBP + -0x50] MOV RDX,qword ptr [R15] MOV RBX,qword ptr [RBP + -0x40] MOV RDI,RBX MOV RSI,R13 CALL 0x0018a481 MOV R8,qword ptr [R15] MOV R15,qword ptr [RBP + -0x60] MOV RDI,RBX MOV RSI,qword ptr [RBP + -0x48] MOV RDX,R12 MOV ECX,dword ptr [RBP + -0x34] CALL 0x001906f0 TEST EAX,EAX JNZ 0x001904a5 MOV RDI,qword ptr [RBP + -0x40] MOV R13,qword ptr [RBP + -0x48] MOV RSI,R13 MOV RDX,R12 MOV ECX,dword ptr [RBP + -0x34] MOV R8,R15 MOV R9,qword ptr [RBP + -0x50] CALL 0x00190578 MOV EBX,EAX MOV RDI,qword ptr [RBP + -0x40] MOV RSI,R13 MOV RDX,R14 MOV ECX,0x3 MOV R8,R15 JMP 0x0019049c LAB_00190572: CALL 0x0012a240
int4 rtree_insert_req(long *param_1,long param_2,int8 param_3,uint param_4,int8 param_5, int8 *param_6,uint param_7,int param_8) { byte bVar1; byte bVar2; ushort uVar3; long lVar4; int8 *puVar5; uint uVar6; int iVar7; int4 uVar8; long lVar9; ulong uVar10; int8 uVar11; int8 uVar12; uint uVar13; byte *pbVar14; long lVar15; long *plVar16; byte *pbVar17; ulong uVar18; byte *pbVar19; ulong uVar20; long in_FS_OFFSET; double dVar21; ulong auStack_a0 [3]; int8 local_88; double local_80; double local_78; int8 local_70; byte *local_68; int8 local_60; int8 *local_58; long local_50; long *local_48; uint local_3c; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); lVar4 = -(ulong)(*(ushort *)(param_2 + 0xe) + 0x4c7 & 0xfffffff0); pbVar17 = (byte *)((long)&local_88 + lVar4); uVar13 = 0; local_60 = param_3; local_58 = param_6; local_50 = param_2; local_48 = param_1; local_3c = param_4; *(int8 *)((long)auStack_a0 + lVar4 + 0x10) = 0x1902d2; lVar9 = _mi_fetch_keypage(param_1,param_2,param_5,3,pbVar17,0); uVar6 = local_3c; plVar16 = local_48; lVar15 = local_50; puVar5 = local_58; uVar12 = local_60; if (lVar9 != 0) { bVar1 = *pbVar17; if ((((char)bVar1 < '\0') && (uVar13 = *(uint *)(*local_48 + 0x17c), param_7 == 0xffffffff && uVar13 != 0)) || (param_8 < (int)param_7 && -1 < (int)param_7)) { local_70 = param_5; uVar18 = (ulong)uVar13; pbVar19 = pbVar17 + uVar18 + 2; bVar2 = *(byte *)((long)&local_88 + lVar4 + 1); local_68 = pbVar17; if (pbVar19 < pbVar17 + ((ulong)((bVar1 & 0x7f) << 8) | (ulong)bVar2)) { uVar20 = (ulong)local_3c; pbVar14 = (byte *)0x0; do { uVar6 = local_3c; uVar11 = local_60; uVar12 = *(int8 *)(local_50 + 0x28); *(int8 *)((long)auStack_a0 + lVar4 + 0x10) = 0x19036a; dVar21 = (double)rtree_area_increase(uVar12,pbVar19,uVar11,uVar6,&local_88); param_5 = local_70; if ((dVar21 == DAT_001e9f00) && (!NAN(dVar21) && !NAN(DAT_001e9f00))) goto LAB_001904a5; if (((pbVar14 == (byte *)0x0) || (dVar21 < local_80)) || (((dVar21 == local_80 && (!NAN(dVar21) && !NAN(local_80))) && (local_88 < local_78)))) { local_78 = local_88; pbVar14 = pbVar19; local_80 = dVar21; } uVar10 = uVar18; if (uVar13 == 0) { uVar10 = (ulong)*(uint *)(*local_48 + 0x178); } pbVar19 = pbVar19 + uVar10 + uVar20; } while (pbVar19 < pbVar17 + ((ulong)((bVar1 & 0x7f) << 8) | (ulong)bVar2)); if (pbVar14 != (byte *)0x0) { *(int8 *)((long)auStack_a0 + lVar4 + 0x10) = 0x1903ef; uVar11 = _mi_kpos(uVar18,pbVar14); uVar6 = local_3c; plVar16 = local_48; lVar15 = local_50; puVar5 = local_58; uVar12 = local_60; *(ulong *)((long)auStack_a0 + lVar4 + 0x10) = (ulong)(param_8 + 1); *(ulong *)((long)auStack_a0 + lVar4 + 8) = (ulong)param_7; *(int8 *)((long)auStack_a0 + lVar4) = 0x190419; iVar7 = rtree_insert_req(plVar16,lVar15,uVar12,uVar6,uVar11,puVar5); uVar6 = local_3c; lVar15 = local_50; uVar12 = local_60; pbVar17 = local_68; if (iVar7 == 1) { uVar3 = *(ushort *)(local_50 + 0xe); *(int8 *)((long)auStack_a0 + lVar4 + 0x10) = 0x1904e2; uVar12 = _mi_kpos(uVar13,pbVar14); uVar13 = local_3c; plVar16 = local_48; *(int8 *)((long)auStack_a0 + lVar4 + 0x10) = 0x1904f7; iVar7 = rtree_set_key_mbr(plVar16,lVar15,pbVar14,uVar13,uVar12); plVar16 = local_48; puVar5 = local_58; if (iVar7 == 0) { pbVar19 = local_68 + uVar3; uVar12 = *local_58; *(int8 *)((long)auStack_a0 + lVar4 + 0x10) = 0x19051b; _mi_kpointer(plVar16,pbVar19,uVar12); uVar13 = local_3c; lVar15 = local_50; pbVar17 = local_68; uVar12 = *puVar5; *(int8 *)((long)auStack_a0 + lVar4 + 0x10) = 0x190534; iVar7 = rtree_set_key_mbr(plVar16,lVar15,pbVar19 + uVar18,uVar13,uVar12); uVar13 = local_3c; plVar16 = local_48; lVar15 = local_50; puVar5 = local_58; if (iVar7 == 0) { *(int8 *)((long)auStack_a0 + lVar4 + 0x10) = 0x190559; uVar8 = rtree_add_key(plVar16,lVar15,pbVar19 + uVar18,uVar13,pbVar17,puVar5); plVar16 = local_48; goto LAB_0019049c; } } } else if (iVar7 == 0) { uVar11 = *(int8 *)(local_50 + 0x28); *(int8 *)((long)auStack_a0 + lVar4 + 0x10) = 0x190449; rtree_combine_rect(uVar11,pbVar14,uVar12,pbVar14,uVar6); plVar16 = local_48; *(int8 *)((long)auStack_a0 + lVar4 + 0x10) = 0x190460; iVar7 = _mi_write_keypage(plVar16,lVar15,param_5,3,pbVar17); if (iVar7 == 0) { uVar8 = 0; goto LAB_001904aa; } } } } } else { *(int8 *)((long)auStack_a0 + lVar4 + 0x10) = 0x190489; uVar8 = rtree_add_key(plVar16,lVar15,uVar12,uVar6,pbVar17,puVar5); LAB_0019049c: *(int8 *)((long)auStack_a0 + lVar4 + 0x10) = 0x1904a1; iVar7 = _mi_write_keypage(plVar16,lVar15,param_5,3,pbVar17); if (iVar7 == 0) goto LAB_001904aa; } } LAB_001904a5: uVar8 = 0xffffffff; LAB_001904aa: if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return uVar8; } /* WARNING: Subroutine does not return */ *(int8 *)((long)auStack_a0 + lVar4 + 0x10) = 0x190577; __stack_chk_fail(); }
23,584
ImPlot3D::ComputeActiveFaces(bool*, ImPlot3DQuat const&, ImPlot3DAxis const*, int*)
zkingston[P]unknot/build_O1/_deps/implot3d-src/implot3d.cpp
void ComputeActiveFaces(bool* active_faces, const ImPlot3DQuat& rotation, const ImPlot3DAxis* axes, int* plane_2d = nullptr) { if (plane_2d) *plane_2d = -1; ImPlot3DPoint rot_face_n[3] = { rotation * ImPlot3DPoint(1.0f, 0.0f, 0.0f), rotation * ImPlot3DPoint(0.0f, 1.0f, 0.0f), rotation * ImPlot3DPoint(0.0f, 0.0f, 1.0f), }; int num_deg = 0; // Check number of planes that are degenerate (seen as a line) for (int i = 0; i < 3; i++) { // Determine the active face based on the Z component if (fabs(rot_face_n[i].z) < 0.025) { // If aligned with the plane, choose the min face for bottom/left active_faces[i] = rot_face_n[i].x + rot_face_n[i].y < 0.0f; num_deg++; } else { // Otherwise, determine based on the Z component bool is_inverted = ImHasFlag(axes[i].Flags, ImPlot3DAxisFlags_Invert); active_faces[i] = is_inverted ? (rot_face_n[i].z > 0.0f) : (rot_face_n[i].z < 0.0f); // Set this plane as possible 2d plane if (plane_2d) *plane_2d = i; } } // Only return 2d plane if there are exactly 2 degenerate planes if (num_deg != 2 && plane_2d) *plane_2d = -1; }
O1
cpp
ImPlot3D::ComputeActiveFaces(bool*, ImPlot3DQuat const&, ImPlot3DAxis const*, int*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rcx, %rbx movq %rdx, %r14 movq %rsi, %r12 movq %rdi, %r15 testq %rcx, %rcx je 0x4dbe8 movl $0xffffffff, (%rbx) # imm = 0xFFFFFFFF movss 0x241418(%rip), %xmm0 # 0x28f008 leaq 0x20(%rsp), %rsi movlps %xmm0, (%rsi) xorl %r13d, %r13d movl %r13d, 0x8(%rsi) movq %r12, %rdi callq 0x4dcf6 leaq 0x38(%rsp), %rbp movlps %xmm0, -0x8(%rbp) movss %xmm1, (%rbp) movsd 0x241533(%rip), %xmm0 # 0x28f150 leaq 0x10(%rsp), %rsi movsd %xmm0, (%rsi) movl %r13d, 0x8(%rsi) movq %r12, %rdi callq 0x4dcf6 movlps %xmm0, 0x4(%rbp) movss %xmm1, 0xc(%rbp) movq %rsp, %rsi movq $0x0, (%rsi) movl $0x3f800000, 0x8(%rsi) # imm = 0x3F800000 movq %r12, %rdi callq 0x4dcf6 movlps %xmm0, 0x10(%rbp) movss %xmm1, 0x18(%rbp) movaps 0x2467cc(%rip), %xmm0 # 0x294430 movsd 0x246aac(%rip), %xmm1 # 0x294718 xorps %xmm2, %xmm2 xorl %eax, %eax movss (%rbp), %xmm3 movaps %xmm3, %xmm4 andps %xmm0, %xmm4 cvtss2sd %xmm4, %xmm4 ucomisd %xmm4, %xmm1 jbe 0x4dc9c movss -0x8(%rbp), %xmm3 addss -0x4(%rbp), %xmm3 ucomiss %xmm3, %xmm2 seta (%r15,%r13) incl %eax jmp 0x4dcbf xorl %ecx, %ecx ucomiss %xmm2, %xmm3 seta %cl xorl %edx, %edx ucomiss %xmm3, %xmm2 seta %dl cmpb $0x0, (%r14) cmovnsl %edx, %ecx movb %cl, (%r15,%r13) testq %rbx, %rbx je 0x4dcbf movl %r13d, (%rbx) incq %r13 addq $0x70, %r14 addq $0xc, %rbp cmpq $0x3, %r13 jne 0x4dc71 testq %rbx, %rbx setne %cl cmpl $0x2, %eax setne %al testb %al, %cl je 0x4dce6 movl $0xffffffff, (%rbx) # imm = 0xFFFFFFFF addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN8ImPlot3D18ComputeActiveFacesEPbRK12ImPlot3DQuatPK12ImPlot3DAxisPi: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov rbx, rcx mov r14, rdx mov r12, rsi mov r15, rdi test rcx, rcx jz short loc_4DBE8 mov dword ptr [rbx], 0FFFFFFFFh loc_4DBE8: movss xmm0, cs:flt_28F008 lea rsi, [rsp+88h+var_68] movlps qword ptr [rsi], xmm0 xor r13d, r13d mov [rsi+8], r13d mov rdi, r12 call _ZNK12ImPlot3DQuatmlERK13ImPlot3DPoint; ImPlot3DQuat::operator*(ImPlot3DPoint const&) lea rbp, [rsp+88h+var_50] movlps qword ptr [rbp-8], xmm0 movss dword ptr [rbp+0], xmm1 movsd xmm0, qword ptr cs:xmmword_28F150 lea rsi, [rsp+88h+var_78] movsd qword ptr [rsi], xmm0 mov [rsi+8], r13d mov rdi, r12 call _ZNK12ImPlot3DQuatmlERK13ImPlot3DPoint; ImPlot3DQuat::operator*(ImPlot3DPoint const&) movlps qword ptr [rbp+4], xmm0 movss dword ptr [rbp+0Ch], xmm1 mov rsi, rsp mov qword ptr [rsi], 0 mov dword ptr [rsi+8], 3F800000h mov rdi, r12 call _ZNK12ImPlot3DQuatmlERK13ImPlot3DPoint; ImPlot3DQuat::operator*(ImPlot3DPoint const&) movlps qword ptr [rbp+10h], xmm0 movss dword ptr [rbp+18h], xmm1 movaps xmm0, cs:xmmword_294430 movsd xmm1, cs:qword_294718 xorps xmm2, xmm2 xor eax, eax loc_4DC71: movss xmm3, dword ptr [rbp+0] movaps xmm4, xmm3 andps xmm4, xmm0 cvtss2sd xmm4, xmm4 ucomisd xmm1, xmm4 jbe short loc_4DC9C movss xmm3, dword ptr [rbp-8] addss xmm3, dword ptr [rbp-4] ucomiss xmm2, xmm3 setnbe byte ptr [r15+r13] inc eax jmp short loc_4DCBF loc_4DC9C: xor ecx, ecx ucomiss xmm3, xmm2 setnbe cl xor edx, edx ucomiss xmm2, xmm3 setnbe dl cmp byte ptr [r14], 0 cmovns ecx, edx mov [r15+r13], cl test rbx, rbx jz short loc_4DCBF mov [rbx], r13d loc_4DCBF: inc r13 add r14, 70h ; 'p' add rbp, 0Ch cmp r13, 3 jnz short loc_4DC71 test rbx, rbx setnz cl cmp eax, 2 setnz al test cl, al jz short loc_4DCE6 mov dword ptr [rbx], 0FFFFFFFFh loc_4DCE6: add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
bool ImPlot3D::ComputeActiveFaces( ImPlot3D *this, bool *a2, const ImPlot3DQuat *a3, const ImPlot3DAxis *a4, int *a5, double a6, float a7) { __m128 v9; // xmm0 long long v10; // r13 float *v11; // rbp __m128 v12; // xmm0 int v13; // eax float v14; // xmm3_4 bool v15; // cl bool result; // al long long v17; // [rsp+0h] [rbp-88h] BYREF int v18; // [rsp+8h] [rbp-80h] long long v19; // [rsp+10h] [rbp-78h] BYREF int v20; // [rsp+18h] [rbp-70h] double v21; // [rsp+20h] [rbp-68h] BYREF int v22; // [rsp+28h] [rbp-60h] float v23; // [rsp+38h] [rbp-50h] BYREF double v24; // [rsp+3Ch] [rbp-4Ch] BYREF float v25; // [rsp+44h] [rbp-44h] double v26; // [rsp+48h] [rbp-40h] BYREF float v27; // [rsp+50h] [rbp-38h] if ( a4 ) *(_DWORD *)a4 = -1; v9 = (__m128)0x3F800000u; _mm_storel_ps(&v21, (__m128)0x3F800000u); v10 = 0LL; v22 = 0; *(double *)v9.m128_u64 = ImPlot3DQuat::operator*(a2, &v21); v11 = &v23; _mm_storel_ps((double *)&v17 + 6, v9); v23 = a7; v12 = (__m128)0x3F80000000000000uLL; v19 = 0x3F80000000000000LL; v20 = 0; *(double *)v12.m128_u64 = ImPlot3DQuat::operator*(a2, &v19); _mm_storel_ps(&v24, v12); v25 = a7; v17 = 0LL; v18 = 1065353216; *(double *)v12.m128_u64 = ImPlot3DQuat::operator*(a2, &v17); _mm_storel_ps(&v26, v12); v27 = a7; v13 = 0; do { v14 = *v11; if ( fabs(*v11) >= 0.025 ) { v15 = v14 > 0.0; if ( *(char *)a3 >= 0 ) v15 = v14 < 0.0; *((_BYTE *)this + v10) = v15; if ( a4 ) *(_DWORD *)a4 = v10; } else { *((_BYTE *)this + v10) = (float)(*(v11 - 2) + *(v11 - 1)) < 0.0; ++v13; } ++v10; a3 = (const ImPlot3DQuat *)((char *)a3 + 112); v11 += 3; } while ( v10 != 3 ); result = v13 != 2; if ( result && a4 != 0LL ) *(_DWORD *)a4 = -1; return result; }
ComputeActiveFaces: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV RBX,RCX MOV R14,RDX MOV R12,RSI MOV R15,RDI TEST RCX,RCX JZ 0x0014dbe8 MOV dword ptr [RBX],0xffffffff LAB_0014dbe8: MOVSS XMM0,dword ptr [0x0038f008] LEA RSI,[RSP + 0x20] MOVLPS qword ptr [RSI],XMM0 XOR R13D,R13D MOV dword ptr [RSI + 0x8],R13D MOV RDI,R12 CALL 0x0014dcf6 LEA RBP,[RSP + 0x38] MOVLPS qword ptr [RBP + -0x8],XMM0 MOVSS dword ptr [RBP],XMM1 MOVSD XMM0,qword ptr [0x0038f150] LEA RSI,[RSP + 0x10] MOVSD qword ptr [RSI],XMM0 MOV dword ptr [RSI + 0x8],R13D MOV RDI,R12 CALL 0x0014dcf6 MOVLPS qword ptr [RBP + 0x4],XMM0 MOVSS dword ptr [RBP + 0xc],XMM1 MOV RSI,RSP MOV qword ptr [RSI],0x0 MOV dword ptr [RSI + 0x8],0x3f800000 MOV RDI,R12 CALL 0x0014dcf6 MOVLPS qword ptr [RBP + 0x10],XMM0 MOVSS dword ptr [RBP + 0x18],XMM1 MOVAPS XMM0,xmmword ptr [0x00394430] MOVSD XMM1,qword ptr [0x00394718] XORPS XMM2,XMM2 XOR EAX,EAX LAB_0014dc71: MOVSS XMM3,dword ptr [RBP] MOVAPS XMM4,XMM3 ANDPS XMM4,XMM0 CVTSS2SD XMM4,XMM4 UCOMISD XMM1,XMM4 JBE 0x0014dc9c MOVSS XMM3,dword ptr [RBP + -0x8] ADDSS XMM3,dword ptr [RBP + -0x4] UCOMISS XMM2,XMM3 SETA byte ptr [R15 + R13*0x1] INC EAX JMP 0x0014dcbf LAB_0014dc9c: XOR ECX,ECX UCOMISS XMM3,XMM2 SETA CL XOR EDX,EDX UCOMISS XMM2,XMM3 SETA DL CMP byte ptr [R14],0x0 CMOVNS ECX,EDX MOV byte ptr [R15 + R13*0x1],CL TEST RBX,RBX JZ 0x0014dcbf MOV dword ptr [RBX],R13D LAB_0014dcbf: INC R13 ADD R14,0x70 ADD RBP,0xc CMP R13,0x3 JNZ 0x0014dc71 TEST RBX,RBX SETNZ CL CMP EAX,0x2 SETNZ AL TEST CL,AL JZ 0x0014dce6 MOV dword ptr [RBX],0xffffffff LAB_0014dce6: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* ImPlot3D::ComputeActiveFaces(bool*, ImPlot3DQuat const&, ImPlot3DAxis const*, int*) */ void ImPlot3D::ComputeActiveFaces (bool *param_1,ImPlot3DQuat *param_2,ImPlot3DAxis *param_3,int *param_4) { float fVar1; uint uVar2; double dVar3; int iVar4; bool bVar5; float *pfVar6; long lVar7; int4 in_XMM1_Da; int8 local_88; int4 local_80; int8 local_78; int4 local_70; ulong local_68; int4 local_60; int8 local_58; float local_50; int8 local_4c; int8 local_40; int4 local_38; if (param_4 != (int *)0x0) { *param_4 = -1; } local_68 = (ulong)DAT_0038f008; lVar7 = 0; local_60 = 0; local_58 = ImPlot3DQuat::operator*(param_2,(ImPlot3DPoint *)&local_68); pfVar6 = &local_50; local_78 = DAT_0038f150; local_70 = 0; local_4c = ImPlot3DQuat::operator*(param_2,(ImPlot3DPoint *)&local_78); local_88 = 0; local_80 = 0x3f800000; local_40 = ImPlot3DQuat::operator*(param_2,(ImPlot3DPoint *)&local_88); dVar3 = DAT_00394718; uVar2 = _DAT_00394430; local_38 = in_XMM1_Da; iVar4 = 0; do { fVar1 = *pfVar6; if (dVar3 <= (double)(float)((uint)fVar1 & uVar2)) { bVar5 = 0.0 < fVar1; if (-1 < (char)*param_3) { bVar5 = fVar1 < 0.0; } param_1[lVar7] = bVar5; if (param_4 != (int *)0x0) { *param_4 = (int)lVar7; } } else { param_1[lVar7] = pfVar6[-2] + pfVar6[-1] < 0.0; iVar4 = iVar4 + 1; } lVar7 = lVar7 + 1; param_3 = param_3 + 0x70; pfVar6 = pfVar6 + 3; } while (lVar7 != 3); if (param_4 != (int *)0x0 && iVar4 != 2) { *param_4 = -1; } return; }
23,585
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; }
O0
c
set_dynamic: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movl -0x1c(%rbp), %eax movq -0x10(%rbp), %rcx cmpl 0x8(%rcx), %eax jb 0x8266a movl -0x1c(%rbp), %eax movq -0x10(%rbp), %rcx cmpl 0xc(%rcx), %eax jb 0x82625 movq -0x10(%rbp), %rdi movl -0x1c(%rbp), %esi callq 0x826a0 movsbl %al, %eax cmpl $0x0, %eax je 0x82625 movb $0x1, -0x1(%rbp) jmp 0x82697 movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rax movl 0x8(%rax), %eax movq -0x10(%rbp), %rcx imull 0x14(%rcx), %eax movl %eax, %eax addq %rax, %rdi movl -0x1c(%rbp), %eax movq -0x10(%rbp), %rcx subl 0x8(%rcx), %eax movq -0x10(%rbp), %rcx imull 0x14(%rcx), %eax movl %eax, %eax movl %eax, %edx xorl %esi, %esi callq 0x362e0 movl -0x1c(%rbp), %ecx addl $0x1, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x8(%rax) movq -0x10(%rbp), %rax movq (%rax), %rdi movl -0x1c(%rbp), %eax movq -0x10(%rbp), %rcx imull 0x14(%rcx), %eax movl %eax, %eax addq %rax, %rdi movq -0x18(%rbp), %rsi movq -0x10(%rbp), %rax movl 0x14(%rax), %eax movl %eax, %edx callq 0x360b0 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq
set_dynamic: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov eax, [rbp+var_1C] mov rcx, [rbp+var_10] cmp eax, [rcx+8] jb short loc_8266A mov eax, [rbp+var_1C] mov rcx, [rbp+var_10] cmp eax, [rcx+0Ch] jb short loc_82625 mov rdi, [rbp+var_10] mov esi, [rbp+var_1C] call allocate_dynamic movsx eax, al cmp eax, 0 jz short loc_82625 mov [rbp+var_1], 1 jmp short loc_82697 loc_82625: mov rax, [rbp+var_10] mov rdi, [rax] mov rax, [rbp+var_10] mov eax, [rax+8] mov rcx, [rbp+var_10] imul eax, [rcx+14h] mov eax, eax add rdi, rax mov eax, [rbp+var_1C] mov rcx, [rbp+var_10] sub eax, [rcx+8] mov rcx, [rbp+var_10] imul eax, [rcx+14h] mov eax, eax mov edx, eax xor esi, esi call _memset mov ecx, [rbp+var_1C] add ecx, 1 mov rax, [rbp+var_10] mov [rax+8], ecx loc_8266A: mov rax, [rbp+var_10] mov rdi, [rax] mov eax, [rbp+var_1C] mov rcx, [rbp+var_10] imul eax, [rcx+14h] mov eax, eax add rdi, rax mov rsi, [rbp+var_18] mov rax, [rbp+var_10] mov eax, [rax+14h] mov edx, eax call _memcpy mov [rbp+var_1], 0 loc_82697: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char set_dynamic(long long a1, long long a2, unsigned int a3) { if ( a3 < *(_DWORD *)(a1 + 8) ) goto LABEL_6; if ( a3 < *(_DWORD *)(a1 + 12) || !(unsigned __int8)allocate_dynamic(a1, a3) ) { memset( (unsigned int)(*(_DWORD *)(a1 + 20) * *(_DWORD *)(a1 + 8)) + *(_QWORD *)a1, 0LL, *(_DWORD *)(a1 + 20) * (a3 - *(_DWORD *)(a1 + 8))); *(_DWORD *)(a1 + 8) = a3 + 1; LABEL_6: memcpy(*(_DWORD *)(a1 + 20) * a3 + *(_QWORD *)a1, a2, *(unsigned int *)(a1 + 20)); return 0; } return 1; }
set_dynamic: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV EAX,dword ptr [RBP + -0x1c] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x8] JC 0x0018266a MOV EAX,dword ptr [RBP + -0x1c] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0xc] JC 0x00182625 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x1c] CALL 0x001826a0 MOVSX EAX,AL CMP EAX,0x0 JZ 0x00182625 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00182697 LAB_00182625: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] IMUL EAX,dword ptr [RCX + 0x14] MOV EAX,EAX ADD RDI,RAX MOV EAX,dword ptr [RBP + -0x1c] MOV RCX,qword ptr [RBP + -0x10] SUB EAX,dword ptr [RCX + 0x8] MOV RCX,qword ptr [RBP + -0x10] IMUL EAX,dword ptr [RCX + 0x14] MOV EAX,EAX MOV EDX,EAX XOR ESI,ESI CALL 0x001362e0 MOV ECX,dword ptr [RBP + -0x1c] ADD ECX,0x1 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x8],ECX LAB_0018266a: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV EAX,dword ptr [RBP + -0x1c] MOV RCX,qword ptr [RBP + -0x10] IMUL EAX,dword ptr [RCX + 0x14] MOV EAX,EAX ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x14] MOV EDX,EAX CALL 0x001360b0 MOV byte ptr [RBP + -0x1],0x0 LAB_00182697: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 set_dynamic(long *param_1,void *param_2,uint param_3) { char cVar1; if (*(uint *)(param_1 + 1) <= param_3) { if ((*(uint *)((long)param_1 + 0xc) <= param_3) && (cVar1 = allocate_dynamic(param_1), cVar1 != '\0')) { return 1; } memset((void *)(*param_1 + (ulong)(uint)((int)param_1[1] * *(int *)((long)param_1 + 0x14))),0, (ulong)((param_3 - (int)param_1[1]) * *(int *)((long)param_1 + 0x14))); *(uint *)(param_1 + 1) = param_3 + 1; } memcpy((void *)(*param_1 + (ulong)(param_3 * *(int *)((long)param_1 + 0x14))),param_2, (ulong)*(uint *)((long)param_1 + 0x14)); return 0; }
23,586
my_strnncollsp_tis620
eloqsql/strings/ctype-tis620.c
static int my_strnncollsp_tis620(CHARSET_INFO * cs __attribute__((unused)), const uchar *a0, size_t a_length, const uchar *b0, size_t b_length) { uchar buf[80], *end, *a, *b, *alloced= NULL; size_t length; int res= 0; a= buf; if ((a_length + b_length +2) > (int) sizeof(buf)) alloced= a= (uchar*) my_malloc(PSI_INSTRUMENT_ME, a_length+b_length+2, MYF(MY_FAE)); b= a + a_length+1; if (a_length) memcpy((char*) a, (char*) a0, a_length); a[a_length]= 0; /* if length(a0)> len1, need to put 'end of string' */ if (b_length) memcpy((char *)b, (char *)b0, b_length); b[b_length]= 0; /* put end of string */ a_length= thai2sortable(a, a_length); b_length= thai2sortable(b, b_length); end= a + (length= MY_MIN(a_length, b_length)); while (a < end) { if (*a++ != *b++) { res= ((int) a[-1] - (int) b[-1]); goto ret; } } res= a_length == b_length ? 0 : a_length < b_length ? -my_strnncollsp_padspace_bin(b, b_length - length) : my_strnncollsp_padspace_bin(a, a_length - length); ret: if (alloced) my_free(alloced); return res; }
O0
c
my_strnncollsp_tis620: pushq %rbp movq %rsp, %rbp subq $0xe0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x68(%rbp) movq %rsi, -0x70(%rbp) movq %rdx, -0x78(%rbp) movq %rcx, -0x80(%rbp) movq %r8, -0x88(%rbp) movq $0x0, -0xa8(%rbp) movl $0x0, -0xb4(%rbp) leaq -0x60(%rbp), %rax movq %rax, -0x98(%rbp) movq -0x78(%rbp), %rax addq -0x88(%rbp), %rax addq $0x2, %rax cmpq $0x50, %rax jbe 0x4763d movq -0x78(%rbp), %rsi addq -0x88(%rbp), %rsi addq $0x2, %rsi xorl %edi, %edi movl $0x8, %edx callq 0x25b50 movq %rax, -0x98(%rbp) movq %rax, -0xa8(%rbp) movq -0x98(%rbp), %rax addq -0x78(%rbp), %rax addq $0x1, %rax movq %rax, -0xa0(%rbp) cmpq $0x0, -0x78(%rbp) je 0x4766e movq -0x98(%rbp), %rdi movq -0x70(%rbp), %rsi movq -0x78(%rbp), %rdx callq 0x24210 movq -0x98(%rbp), %rax movq -0x78(%rbp), %rcx movb $0x0, (%rax,%rcx) cmpq $0x0, -0x88(%rbp) je 0x4769e movq -0xa0(%rbp), %rdi movq -0x80(%rbp), %rsi movq -0x88(%rbp), %rdx callq 0x24210 movq -0xa0(%rbp), %rax movq -0x88(%rbp), %rcx movb $0x0, (%rax,%rcx) movq -0x98(%rbp), %rdi movq -0x78(%rbp), %rsi callq 0x479a0 movq %rax, -0x78(%rbp) movq -0xa0(%rbp), %rdi movq -0x88(%rbp), %rsi callq 0x479a0 movq %rax, -0x88(%rbp) movq -0x98(%rbp), %rax movq %rax, -0xc0(%rbp) movq -0x78(%rbp), %rax cmpq -0x88(%rbp), %rax jae 0x47706 movq -0x78(%rbp), %rax movq %rax, -0xc8(%rbp) jmp 0x47714 movq -0x88(%rbp), %rax movq %rax, -0xc8(%rbp) movq -0xc0(%rbp), %rax movq -0xc8(%rbp), %rcx movq %rcx, -0xb0(%rbp) addq %rcx, %rax movq %rax, -0x90(%rbp) movq -0x98(%rbp), %rax cmpq -0x90(%rbp), %rax jae 0x4779c movq -0x98(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x98(%rbp) movzbl (%rax), %eax movq -0xa0(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0xa0(%rbp) movzbl (%rcx), %ecx cmpl %ecx, %eax je 0x4779a movq -0x98(%rbp), %rax movzbl -0x1(%rax), %eax movq -0xa0(%rbp), %rcx movzbl -0x1(%rcx), %ecx subl %ecx, %eax movl %eax, -0xb4(%rbp) jmp 0x4781d jmp 0x47733 movq -0x78(%rbp), %rax cmpq -0x88(%rbp), %rax jne 0x477b3 xorl %eax, %eax movl %eax, -0xcc(%rbp) jmp 0x47811 movq -0x78(%rbp), %rax cmpq -0x88(%rbp), %rax jae 0x477e8 movq -0xa0(%rbp), %rdi movq -0x88(%rbp), %rsi subq -0xb0(%rbp), %rsi callq 0x358a0 movl %eax, %ecx xorl %eax, %eax subl %ecx, %eax movl %eax, -0xd0(%rbp) jmp 0x47805 movq -0x98(%rbp), %rdi movq -0x78(%rbp), %rsi subq -0xb0(%rbp), %rsi callq 0x358a0 movl %eax, -0xd0(%rbp) movl -0xd0(%rbp), %eax movl %eax, -0xcc(%rbp) movl -0xcc(%rbp), %eax movl %eax, -0xb4(%rbp) cmpq $0x0, -0xa8(%rbp) je 0x47833 movq -0xa8(%rbp), %rdi callq 0x25ed0 movl -0xb4(%rbp), %eax movl %eax, -0xd4(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x47860 movl -0xd4(%rbp), %eax addq $0xe0, %rsp popq %rbp retq callq 0x24300 nopw %cs:(%rax,%rax)
my_strnncollsp_tis620: push rbp mov rbp, rsp sub rsp, 0E0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_68], rdi mov [rbp+var_70], rsi mov [rbp+var_78], rdx mov [rbp+var_80], rcx mov [rbp+var_88], r8 mov [rbp+var_A8], 0 mov [rbp+var_B4], 0 lea rax, [rbp+var_60] mov [rbp+var_98], rax mov rax, [rbp+var_78] add rax, [rbp+var_88] add rax, 2 cmp rax, 50h ; 'P' jbe short loc_4763D mov rsi, [rbp+var_78] add rsi, [rbp+var_88] add rsi, 2 xor edi, edi mov edx, 8 call my_malloc mov [rbp+var_98], rax mov [rbp+var_A8], rax loc_4763D: mov rax, [rbp+var_98] add rax, [rbp+var_78] add rax, 1 mov [rbp+var_A0], rax cmp [rbp+var_78], 0 jz short loc_4766E mov rdi, [rbp+var_98] mov rsi, [rbp+var_70] mov rdx, [rbp+var_78] call _memcpy loc_4766E: mov rax, [rbp+var_98] mov rcx, [rbp+var_78] mov byte ptr [rax+rcx], 0 cmp [rbp+var_88], 0 jz short loc_4769E mov rdi, [rbp+var_A0] mov rsi, [rbp+var_80] mov rdx, [rbp+var_88] call _memcpy loc_4769E: mov rax, [rbp+var_A0] mov rcx, [rbp+var_88] mov byte ptr [rax+rcx], 0 mov rdi, [rbp+var_98] mov rsi, [rbp+var_78] call thai2sortable mov [rbp+var_78], rax mov rdi, [rbp+var_A0] mov rsi, [rbp+var_88] call thai2sortable mov [rbp+var_88], rax mov rax, [rbp+var_98] mov [rbp+var_C0], rax mov rax, [rbp+var_78] cmp rax, [rbp+var_88] jnb short loc_47706 mov rax, [rbp+var_78] mov [rbp+var_C8], rax jmp short loc_47714 loc_47706: mov rax, [rbp+var_88] mov [rbp+var_C8], rax loc_47714: mov rax, [rbp+var_C0] mov rcx, [rbp+var_C8] mov [rbp+var_B0], rcx add rax, rcx mov [rbp+var_90], rax loc_47733: mov rax, [rbp+var_98] cmp rax, [rbp+var_90] jnb short loc_4779C mov rax, [rbp+var_98] mov rcx, rax add rcx, 1 mov [rbp+var_98], rcx movzx eax, byte ptr [rax] mov rcx, [rbp+var_A0] mov rdx, rcx add rdx, 1 mov [rbp+var_A0], rdx movzx ecx, byte ptr [rcx] cmp eax, ecx jz short loc_4779A mov rax, [rbp+var_98] movzx eax, byte ptr [rax-1] mov rcx, [rbp+var_A0] movzx ecx, byte ptr [rcx-1] sub eax, ecx mov [rbp+var_B4], eax jmp loc_4781D loc_4779A: jmp short loc_47733 loc_4779C: mov rax, [rbp+var_78] cmp rax, [rbp+var_88] jnz short loc_477B3 xor eax, eax mov [rbp+var_CC], eax jmp short loc_47811 loc_477B3: mov rax, [rbp+var_78] cmp rax, [rbp+var_88] jnb short loc_477E8 mov rdi, [rbp+var_A0] mov rsi, [rbp+var_88] sub rsi, [rbp+var_B0] call my_strnncollsp_padspace_bin mov ecx, eax xor eax, eax sub eax, ecx mov [rbp+var_D0], eax jmp short loc_47805 loc_477E8: mov rdi, [rbp+var_98] mov rsi, [rbp+var_78] sub rsi, [rbp+var_B0] call my_strnncollsp_padspace_bin mov [rbp+var_D0], eax loc_47805: mov eax, [rbp+var_D0] mov [rbp+var_CC], eax loc_47811: mov eax, [rbp+var_CC] mov [rbp+var_B4], eax loc_4781D: cmp [rbp+var_A8], 0 jz short loc_47833 mov rdi, [rbp+var_A8] call my_free loc_47833: mov eax, [rbp+var_B4] mov [rbp+var_D4], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_47860 mov eax, [rbp+var_D4] add rsp, 0E0h pop rbp retn loc_47860: call ___stack_chk_fail
long long my_strnncollsp_tis620(long long a1, long long a2, long long a3, long long a4, long long a5) { unsigned __int8 *v5; // rax unsigned __int8 *v6; // rcx int v8; // [rsp+10h] [rbp-D0h] unsigned int v9; // [rsp+14h] [rbp-CCh] unsigned long long v10; // [rsp+18h] [rbp-C8h] unsigned __int8 *v11; // [rsp+20h] [rbp-C0h] unsigned int v12; // [rsp+2Ch] [rbp-B4h] long long v13; // [rsp+38h] [rbp-A8h] unsigned __int8 *v14; // [rsp+40h] [rbp-A0h] unsigned __int8 *v15; // [rsp+48h] [rbp-98h] unsigned long long v17; // [rsp+58h] [rbp-88h] unsigned long long v20; // [rsp+68h] [rbp-78h] char v21; // [rsp+80h] [rbp-60h] BYREF unsigned long long v22; // [rsp+D8h] [rbp-8h] v22 = __readfsqword(0x28u); v13 = 0LL; v15 = (unsigned __int8 *)&v21; if ( (unsigned long long)(a5 + a3 + 2) > 0x50 ) { v15 = (unsigned __int8 *)my_malloc(0, a5 + a3 + 2, 8); v13 = (long long)v15; } v14 = &v15[a3 + 1]; if ( a3 ) memcpy(v15, a2, a3); v15[a3] = 0; if ( a5 ) memcpy(v14, a4, a5); v14[a5] = 0; v20 = thai2sortable(v15, a3); v17 = thai2sortable(v14, a5); v11 = v15; if ( v20 >= v17 ) v10 = v17; else v10 = v20; while ( v15 < &v11[v10] ) { v5 = v15++; v6 = v14++; if ( *v5 != *v6 ) { v12 = *(v15 - 1) - *(v14 - 1); goto LABEL_21; } } if ( v20 == v17 ) { v9 = 0; } else { if ( v20 >= v17 ) v8 = my_strnncollsp_padspace_bin(v15, v20 - v10); else v8 = -(int)my_strnncollsp_padspace_bin(v14, v17 - v10); v9 = v8; } v12 = v9; LABEL_21: if ( v13 ) my_free(v13); return v12; }
my_strnncollsp_tis620: PUSH RBP MOV RBP,RSP SUB RSP,0xe0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x68],RDI MOV qword ptr [RBP + -0x70],RSI MOV qword ptr [RBP + -0x78],RDX MOV qword ptr [RBP + -0x80],RCX MOV qword ptr [RBP + -0x88],R8 MOV qword ptr [RBP + -0xa8],0x0 MOV dword ptr [RBP + -0xb4],0x0 LEA RAX,[RBP + -0x60] MOV qword ptr [RBP + -0x98],RAX MOV RAX,qword ptr [RBP + -0x78] ADD RAX,qword ptr [RBP + -0x88] ADD RAX,0x2 CMP RAX,0x50 JBE 0x0014763d MOV RSI,qword ptr [RBP + -0x78] ADD RSI,qword ptr [RBP + -0x88] ADD RSI,0x2 XOR EDI,EDI MOV EDX,0x8 CALL 0x00125b50 MOV qword ptr [RBP + -0x98],RAX MOV qword ptr [RBP + -0xa8],RAX LAB_0014763d: MOV RAX,qword ptr [RBP + -0x98] ADD RAX,qword ptr [RBP + -0x78] ADD RAX,0x1 MOV qword ptr [RBP + -0xa0],RAX CMP qword ptr [RBP + -0x78],0x0 JZ 0x0014766e MOV RDI,qword ptr [RBP + -0x98] MOV RSI,qword ptr [RBP + -0x70] MOV RDX,qword ptr [RBP + -0x78] CALL 0x00124210 LAB_0014766e: MOV RAX,qword ptr [RBP + -0x98] MOV RCX,qword ptr [RBP + -0x78] MOV byte ptr [RAX + RCX*0x1],0x0 CMP qword ptr [RBP + -0x88],0x0 JZ 0x0014769e MOV RDI,qword ptr [RBP + -0xa0] MOV RSI,qword ptr [RBP + -0x80] MOV RDX,qword ptr [RBP + -0x88] CALL 0x00124210 LAB_0014769e: MOV RAX,qword ptr [RBP + -0xa0] MOV RCX,qword ptr [RBP + -0x88] MOV byte ptr [RAX + RCX*0x1],0x0 MOV RDI,qword ptr [RBP + -0x98] MOV RSI,qword ptr [RBP + -0x78] CALL 0x001479a0 MOV qword ptr [RBP + -0x78],RAX MOV RDI,qword ptr [RBP + -0xa0] MOV RSI,qword ptr [RBP + -0x88] CALL 0x001479a0 MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0xc0],RAX MOV RAX,qword ptr [RBP + -0x78] CMP RAX,qword ptr [RBP + -0x88] JNC 0x00147706 MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0xc8],RAX JMP 0x00147714 LAB_00147706: MOV RAX,qword ptr [RBP + -0x88] MOV qword ptr [RBP + -0xc8],RAX LAB_00147714: MOV RAX,qword ptr [RBP + -0xc0] MOV RCX,qword ptr [RBP + -0xc8] MOV qword ptr [RBP + -0xb0],RCX ADD RAX,RCX MOV qword ptr [RBP + -0x90],RAX LAB_00147733: MOV RAX,qword ptr [RBP + -0x98] CMP RAX,qword ptr [RBP + -0x90] JNC 0x0014779c MOV RAX,qword ptr [RBP + -0x98] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x98],RCX MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0xa0] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0xa0],RDX MOVZX ECX,byte ptr [RCX] CMP EAX,ECX JZ 0x0014779a MOV RAX,qword ptr [RBP + -0x98] MOVZX EAX,byte ptr [RAX + -0x1] MOV RCX,qword ptr [RBP + -0xa0] MOVZX ECX,byte ptr [RCX + -0x1] SUB EAX,ECX MOV dword ptr [RBP + -0xb4],EAX JMP 0x0014781d LAB_0014779a: JMP 0x00147733 LAB_0014779c: MOV RAX,qword ptr [RBP + -0x78] CMP RAX,qword ptr [RBP + -0x88] JNZ 0x001477b3 XOR EAX,EAX MOV dword ptr [RBP + -0xcc],EAX JMP 0x00147811 LAB_001477b3: MOV RAX,qword ptr [RBP + -0x78] CMP RAX,qword ptr [RBP + -0x88] JNC 0x001477e8 MOV RDI,qword ptr [RBP + -0xa0] MOV RSI,qword ptr [RBP + -0x88] SUB RSI,qword ptr [RBP + -0xb0] CALL 0x001358a0 MOV ECX,EAX XOR EAX,EAX SUB EAX,ECX MOV dword ptr [RBP + -0xd0],EAX JMP 0x00147805 LAB_001477e8: MOV RDI,qword ptr [RBP + -0x98] MOV RSI,qword ptr [RBP + -0x78] SUB RSI,qword ptr [RBP + -0xb0] CALL 0x001358a0 MOV dword ptr [RBP + -0xd0],EAX LAB_00147805: MOV EAX,dword ptr [RBP + -0xd0] MOV dword ptr [RBP + -0xcc],EAX LAB_00147811: MOV EAX,dword ptr [RBP + -0xcc] MOV dword ptr [RBP + -0xb4],EAX LAB_0014781d: CMP qword ptr [RBP + -0xa8],0x0 JZ 0x00147833 MOV RDI,qword ptr [RBP + -0xa8] CALL 0x00125ed0 LAB_00147833: MOV EAX,dword ptr [RBP + -0xb4] MOV dword ptr [RBP + -0xd4],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00147860 MOV EAX,dword ptr [RBP + -0xd4] ADD RSP,0xe0 POP RBP RET LAB_00147860: CALL 0x00124300
int my_strnncollsp_tis620 (int8 param_1,void *param_2,size_t param_3,void *param_4,size_t param_5) { byte *pbVar1; byte *__dest; ulong uVar2; ulong uVar3; byte *pbVar4; long in_FS_OFFSET; int local_d8; int local_d4; ulong local_d0; int local_bc; byte *local_b0; byte *local_a8; byte *local_a0; byte local_68 [88]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_b0 = (byte *)0x0; local_a0 = local_68; if (0x50 < param_3 + param_5 + 2) { local_b0 = (byte *)my_malloc(0,param_3 + param_5 + 2,8); local_a0 = local_b0; } __dest = local_a0 + param_3 + 1; if (param_3 != 0) { memcpy(local_a0,param_2,param_3); } local_a0[param_3] = 0; if (param_5 != 0) { memcpy(__dest,param_4,param_5); } __dest[param_5] = 0; uVar2 = thai2sortable(local_a0,param_3); uVar3 = thai2sortable(__dest,param_5); local_d0 = uVar3; if (uVar2 < uVar3) { local_d0 = uVar2; } pbVar4 = local_a0 + local_d0; pbVar1 = local_a0; do { local_a0 = pbVar1; local_a8 = __dest; if (pbVar4 <= local_a0) { if (uVar2 == uVar3) { local_d4 = 0; } else { if (uVar2 < uVar3) { local_d8 = my_strnncollsp_padspace_bin(local_a8,uVar3 - local_d0); local_d8 = -local_d8; } else { local_d8 = my_strnncollsp_padspace_bin(local_a0,uVar2 - local_d0); } local_d4 = local_d8; } local_bc = local_d4; goto LAB_0014781d; } __dest = local_a8 + 1; pbVar1 = local_a0 + 1; } while (*local_a0 == *local_a8); local_bc = (uint)*local_a0 - (uint)*local_a8; LAB_0014781d: if (local_b0 != (byte *)0x0) { my_free(local_b0); } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_bc; }
23,587
ma_nommap_pread
eloqsql/storage/maria/ma_dynrec.c
size_t _ma_nommap_pread(MARIA_HA *info, uchar *Buffer, size_t Count, my_off_t offset, myf MyFlags) { return mysql_file_pread(info->dfile.file, Buffer, Count, offset, MyFlags); }
O3
c
ma_nommap_pread: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %r8, -0x30(%rbp) movq %rcx, %r12 movq %rdx, %r14 movq %rsi, %r13 movl 0x480(%rdi), %ebx leaq 0x344d82(%rip), %rax # 0x38c3c8 movq (%rax), %rax leaq -0x78(%rbp), %rdi movl %ebx, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x47688 movl %ebx, %edi movq %r13, %rsi movq %r14, %rdx movq %r12, %rcx movq -0x30(%rbp), %r8 callq 0xa4f3c movq %rax, %rbx movq %rbx, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r15 leaq 0x344d36(%rip), %rax # 0x38c3c8 movq (%rax), %rax leaq 0x96a5a(%rip), %rdx # 0xde0f6 movq %r15, %rdi movq %r14, %rsi movl $0xa2, %ecx callq *0x210(%rax) movl %ebx, %edi movq %r13, %rsi movq %r14, %rdx movq %r12, %rcx movq -0x30(%rbp), %r12 movq %r12, %r8 callq 0xa4f3c movq %rax, %rbx xorl %esi, %esi testq %rax, %rax cmovneq %rsi, %r14 cmpq $-0x1, %rax cmovneq %rax, %rsi testb $0x6, %r12b cmovneq %r14, %rsi leaq 0x344ce1(%rip), %rax # 0x38c3c8 movq (%rax), %rax movq %r15, %rdi callq *0x218(%rax) jmp 0x47676
_ma_nommap_pread: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov [rbp+var_30], r8 mov r12, rcx mov r14, rdx mov r13, rsi mov ebx, [rdi+480h] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_78] mov esi, ebx mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz short loc_47688 mov edi, ebx mov rsi, r13 mov rdx, r14 mov rcx, r12 mov r8, [rbp+var_30] call my_pread mov rbx, rax loc_47676: mov rax, rbx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_47688: mov r15, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r15 mov rsi, r14 mov ecx, 0A2h call qword ptr [rax+210h] mov edi, ebx mov rsi, r13 mov rdx, r14 mov rcx, r12 mov r12, [rbp+var_30] mov r8, r12 call my_pread mov rbx, rax xor esi, esi test rax, rax cmovnz r14, rsi cmp rax, 0FFFFFFFFFFFFFFFFh cmovnz rsi, rax test r12b, 6 cmovnz rsi, r14 lea rax, PSI_server mov rax, [rax] mov rdi, r15 call qword ptr [rax+218h] jmp short loc_47676
long long ma_nommap_pread(long long a1, long long a2, long long a3, long long a4, long long a5) { unsigned int v7; // ebx long long v8; // rax long long v9; // rbx long long v11; // r15 _BYTE v12[72]; // [rsp+8h] [rbp-78h] BYREF long long v13; // [rsp+50h] [rbp-30h] v13 = a5; v7 = *(_DWORD *)(a1 + 1152); v8 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v12, v7, 6LL); if ( !v8 ) return my_pread(v7, a2, a3, a4, v13); v11 = v8; ((void ( *)(long long, long long, const char *, long long))PSI_server[66])( v8, a3, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c", 162LL); v9 = my_pread(v7, a2, a3, a4, v13); ((void ( *)(long long))PSI_server[67])(v11); return v9; }
_ma_nommap_pread: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV qword ptr [RBP + -0x30],R8 MOV R12,RCX MOV R14,RDX MOV R13,RSI MOV EBX,dword ptr [RDI + 0x480] LEA RAX,[0x48c3c8] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x78] MOV ESI,EBX MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00147688 MOV EDI,EBX MOV RSI,R13 MOV RDX,R14 MOV RCX,R12 MOV R8,qword ptr [RBP + -0x30] CALL 0x001a4f3c MOV RBX,RAX LAB_00147676: MOV RAX,RBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00147688: MOV R15,RAX LEA RAX,[0x48c3c8] MOV RAX,qword ptr [RAX] LEA RDX,[0x1de0f6] MOV RDI,R15 MOV RSI,R14 MOV ECX,0xa2 CALL qword ptr [RAX + 0x210] MOV EDI,EBX MOV RSI,R13 MOV RDX,R14 MOV RCX,R12 MOV R12,qword ptr [RBP + -0x30] MOV R8,R12 CALL 0x001a4f3c MOV RBX,RAX XOR ESI,ESI TEST RAX,RAX CMOVNZ R14,RSI CMP RAX,-0x1 CMOVNZ RSI,RAX TEST R12B,0x6 CMOVNZ RSI,R14 LEA RAX,[0x48c3c8] MOV RAX,qword ptr [RAX] MOV RDI,R15 CALL qword ptr [RAX + 0x218] JMP 0x00147676
long _ma_nommap_pread(long param_1,int8 param_2,long param_3,int8 param_4,ulong param_5) { int4 uVar1; ulong uVar2; long lVar3; long lVar4; long lVar5; int1 local_80 [72]; ulong local_38; uVar1 = *(int4 *)(param_1 + 0x480); local_38 = param_5; lVar3 = (**(code **)(PSI_server + 0x158))(local_80,uVar1,6); if (lVar3 == 0) { lVar4 = my_pread(uVar1,param_2,param_3,param_4,local_38); } else { (**(code **)(PSI_server + 0x210)) (lVar3,param_3,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c", 0xa2); uVar2 = local_38; lVar4 = my_pread(uVar1,param_2,param_3,param_4,local_38); if (lVar4 != 0) { param_3 = 0; } lVar5 = 0; if (lVar4 != -1) { lVar5 = lVar4; } if ((uVar2 & 6) != 0) { lVar5 = param_3; } (**(code **)(PSI_server + 0x218))(lVar3,lVar5); } return lVar4; }
23,588
my_wc_mb_big5
eloqsql/strings/ctype-big5.c
static int my_wc_mb_big5(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { int code; if (s >= e) return MY_CS_TOOSMALL; if ((int) wc < 0x80) { s[0]= (uchar) wc; return 1; } if (!(code=func_uni_big5_onechar(wc))) return MY_CS_ILUNI; if (s+2>e) return MY_CS_TOOSMALL; s[0]=code>>8; s[1]=code&0xFF; return 2; }
O0
c
my_wc_mb_big5: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0xd84fb movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0xd8574 movq -0x18(%rbp), %rax cmpl $0x80, %eax jge 0xd851b movq -0x18(%rbp), %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x1, -0x4(%rbp) jmp 0xd8574 movq -0x18(%rbp), %rax movl %eax, %edi callq 0xd8870 movl %eax, -0x2c(%rbp) cmpl $0x0, %eax jne 0xd8537 movl $0x0, -0x4(%rbp) jmp 0xd8574 movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0xd854e movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0xd8574 movl -0x2c(%rbp), %eax sarl $0x8, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl -0x2c(%rbp), %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x1(%rax) movl $0x2, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax)
my_wc_mb_big5: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_D84FB mov [rbp+var_4], 0FFFFFF9Bh jmp short loc_D8574 loc_D84FB: mov rax, [rbp+var_18] cmp eax, 80h jge short loc_D851B mov rax, [rbp+var_18] mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 1 jmp short loc_D8574 loc_D851B: mov rax, [rbp+var_18] mov edi, eax call func_uni_big5_onechar mov [rbp+var_2C], eax cmp eax, 0 jnz short loc_D8537 mov [rbp+var_4], 0 jmp short loc_D8574 loc_D8537: mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_D854E mov [rbp+var_4], 0FFFFFF9Bh jmp short loc_D8574 loc_D854E: mov eax, [rbp+var_2C] sar eax, 8 mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov eax, [rbp+var_2C] and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax+1], cl mov [rbp+var_4], 2 loc_D8574: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long my_wc_mb_big5(long long a1, int a2, _BYTE *a3, unsigned long long a4) { int v5; // [rsp+4h] [rbp-2Ch] if ( (unsigned long long)a3 < a4 ) { if ( a2 >= 128 ) { v5 = func_uni_big5_onechar((unsigned int)a2); if ( v5 ) { if ( (unsigned long long)(a3 + 2) <= a4 ) { *a3 = BYTE1(v5); a3[1] = v5; return 2; } else { return (unsigned int)-101; } } else { return 0; } } else { *a3 = a2; return 1; } } else { return (unsigned int)-101; } }
my_wc_mb_big5: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x001d84fb MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x001d8574 LAB_001d84fb: MOV RAX,qword ptr [RBP + -0x18] CMP EAX,0x80 JGE 0x001d851b MOV RAX,qword ptr [RBP + -0x18] MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x1 JMP 0x001d8574 LAB_001d851b: MOV RAX,qword ptr [RBP + -0x18] MOV EDI,EAX CALL 0x001d8870 MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JNZ 0x001d8537 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001d8574 LAB_001d8537: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x001d854e MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x001d8574 LAB_001d854e: MOV EAX,dword ptr [RBP + -0x2c] SAR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x2c] AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x1],CL MOV dword ptr [RBP + -0x4],0x2 LAB_001d8574: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 my_wc_mb_big5(int8 param_1,int param_2,int1 *param_3,int1 *param_4) { int iVar1; int4 local_c; if (param_3 < param_4) { if (param_2 < 0x80) { *param_3 = (char)param_2; local_c = 1; } else { iVar1 = func_uni_big5_onechar(param_2); if (iVar1 == 0) { local_c = 0; } else if (param_4 < param_3 + 2) { local_c = 0xffffff9b; } else { *param_3 = (char)((uint)iVar1 >> 8); param_3[1] = (char)iVar1; local_c = 2; } } } else { local_c = 0xffffff9b; } return local_c; }
23,589
ma_read_dynamic_record
eloqsql/storage/maria/ma_dynrec.c
int _ma_read_dynamic_record(MARIA_HA *info, uchar *buf, MARIA_RECORD_POS filepos) { int block_of_record; uint b_type; MARIA_BLOCK_INFO block_info; File file; uchar *UNINIT_VAR(to); uint UNINIT_VAR(left_length); MARIA_SHARE *share= info->s; myf flag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0); DBUG_ENTER("_ma_read_dynamic_record"); if (filepos == HA_OFFSET_ERROR) goto err; file= info->dfile.file; block_of_record= 0; /* First block of record is numbered as zero. */ block_info.second_read= 0; do { /* A corrupted table can have wrong pointers. (Bug# 19835) */ if (filepos == HA_OFFSET_ERROR) goto panic; if (info->opt_flag & WRITE_CACHE_USED && (info->rec_cache.pos_in_file < filepos + MARIA_BLOCK_INFO_HEADER_LENGTH) && flush_io_cache(&info->rec_cache)) goto err; info->rec_cache.seek_not_done=1; if ((b_type= _ma_get_block_info(info, &block_info, file, filepos)) & (BLOCK_DELETED | BLOCK_ERROR | BLOCK_SYNC_ERROR | BLOCK_FATAL_ERROR)) { if (b_type & (BLOCK_SYNC_ERROR | BLOCK_DELETED)) my_errno=HA_ERR_RECORD_DELETED; goto err; } if (block_of_record++ == 0) /* First block */ { info->cur_row.total_length= block_info.rec_len; if (block_info.rec_len > (uint) share->base.max_pack_length) goto panic; if (share->base.blobs) { if (_ma_alloc_buffer(&info->rec_buff, &info->rec_buff_size, block_info.rec_len + share->base.extra_rec_buff_size, flag)) goto err; } to= info->rec_buff; left_length=block_info.rec_len; } if (left_length < block_info.data_len || ! block_info.data_len) goto panic; /* Wrong linked record */ /* copy information that is already read */ { uint offset= (uint) (block_info.filepos - filepos); uint prefetch_len= (sizeof(block_info.header) - offset); filepos+= sizeof(block_info.header); if (prefetch_len > block_info.data_len) prefetch_len= block_info.data_len; if (prefetch_len) { memcpy(to, block_info.header + offset, prefetch_len); block_info.data_len-= prefetch_len; left_length-= prefetch_len; to+= prefetch_len; } } /* read rest of record from file */ if (block_info.data_len) { if (info->opt_flag & WRITE_CACHE_USED && info->rec_cache.pos_in_file < filepos + block_info.data_len && flush_io_cache(&info->rec_cache)) goto err; /* What a pity that this method is not called 'file_pread' and that there is no equivalent without seeking. We are at the right position already. :( */ if (share->file_read(info, to, block_info.data_len, filepos, MYF(MY_NABP))) goto panic; left_length-=block_info.data_len; to+=block_info.data_len; } filepos= block_info.next_filepos; } while (left_length); info->update|= HA_STATE_AKTIV; /* We have a aktive record */ fast_ma_writeinfo(info); DBUG_RETURN(_ma_rec_unpack(info,buf,info->rec_buff,block_info.rec_len) != MY_FILE_ERROR ? 0 : my_errno); err: fast_ma_writeinfo(info); DBUG_RETURN(my_errno); panic: _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); goto err; }
O3
c
ma_read_dynamic_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb8, %rsp movq %rsi, -0xb8(%rbp) movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq (%rdi), %r15 cmpb $0x0, 0x7d9(%r15) setne %al cmpq $-0x1, %rdx je 0x3ea0a movq %rdx, %r12 xorl %ecx, %ecx movb %al, %cl shll $0x10, %ecx orq $0x10, %rcx movq %rcx, -0xc8(%rbp) movl 0x480(%rbx), %eax movl %eax, -0xa4(%rbp) leaq -0x88(%rbp), %rax movl $0x0, 0x50(%rax) leaq 0x4b8(%rbx), %rax movq %rax, -0x98(%rbp) leaq 0x3a0(%rbx), %rax movq %rax, -0xb0(%rbp) leaq 0x460(%rbx), %rax movq %rax, -0xc0(%rbp) xorl %r14d, %r14d movq %rbx, -0xd8(%rbp) movq %r15, -0xd0(%rbp) cmpq $-0x1, %r12 je 0x3e9fd testb $0x10, 0x61c(%rbx) je 0x3e819 leaq 0x14(%r12), %rax movq -0x98(%rbp), %rcx cmpq %rax, (%rcx) jae 0x3e819 movq -0x98(%rbp), %rdi movl $0x1, %esi callq 0x95539 testl %eax, %eax jne 0x3ea0a movl $0x1, 0x598(%rbx) movq %rbx, %rdi leaq -0x88(%rbp), %rsi movl -0xa4(%rbp), %edx movq %r12, %rcx callq 0x3d9e8 cmpl $0x4, %eax jae 0x3ea48 subl $0x1, %r14d jae 0x3e8b3 movq -0x70(%rbp), %r13 movq %r13, 0x110(%rbx) movl 0x3b0(%r15), %eax cmpq %rax, %r13 ja 0x3e9fd cmpl $0x0, 0x3f0(%r15) je 0x3e8a2 movl 0x424(%r15), %eax addq %rax, %r13 movq -0xb0(%rbp), %rdi movq -0xc0(%rbp), %rsi movq %r13, %rdx movq -0xc8(%rbp), %rcx callq 0x54e83 testb %al, %al jne 0x3ea0a movq -0x70(%rbp), %r13 movq -0xb0(%rbp), %rax movq (%rax), %rax movq %rax, -0xa0(%rbp) movl %r13d, %eax movq -0x68(%rbp), %rdx leaq -0x1(%rdx), %rcx cmpq %rax, %rcx jae 0x3e9fd movl %r14d, -0x8c(%rbp) movq -0x50(%rbp), %rax subq %r12, %rax movl $0x14, %ecx subl %eax, %ecx cmpq %rcx, %rdx movl %edx, %r14d cmovael %ecx, %r14d testl %r14d, %r14d je 0x3e93e movl %eax, %eax leaq (%rax,%rbp), %rsi addq $-0x88, %rsi movl %r14d, %r15d movq -0xa0(%rbp), %rbx movq %rbx, %rdi movq %r15, %rdx callq 0x29080 movq -0x68(%rbp), %rdx subl %r14d, %r13d addq %r15, %rbx movq %rbx, -0xa0(%rbp) subq %r15, %rdx movq -0xd0(%rbp), %r15 movq -0xd8(%rbp), %rbx movq %rdx, -0x68(%rbp) movl -0x8c(%rbp), %r14d jne 0x3e945 jmp 0x3e9ac movl -0x8c(%rbp), %r14d addq $0x14, %r12 testb $0x10, 0x61c(%rbx) je 0x3e97f leaq (%rdx,%r12), %rax movq -0x98(%rbp), %rcx cmpq %rax, (%rcx) jae 0x3e97f movq -0x98(%rbp), %rdi movl $0x1, %esi callq 0x95539 testl %eax, %eax jne 0x3ea0a movq -0x68(%rbp), %rdx movl $0x4, %r8d movq %rbx, %rdi movq -0xa0(%rbp), %rsi movq %r12, %rcx callq *0x6e0(%r15) testq %rax, %rax jne 0x3e9fd movq -0x68(%rbp), %rax subl %eax, %r13d addq %rax, -0xa0(%rbp) movq -0x48(%rbp), %r12 testl %r13d, %r13d jne 0x3e7dc orb $0x2, 0x624(%rbx) movq (%rbx), %rax cmpl $0x0, 0x7b8(%rax) jne 0x3e9d6 movq %rbx, %rdi xorl %esi, %esi callq 0x37dbe movq 0x3a0(%rbx), %rdx movq -0x70(%rbp), %rcx movq %rbx, %rdi movq -0xb8(%rbp), %rsi callq 0x3e2e3 movq %rax, %rcx xorl %eax, %eax cmpq $-0x1, %rcx jne 0x3ea27 jmp 0x3ea20 movq %rbx, %rdi movl $0x7f, %esi callq 0x36a24 movq (%rbx), %rax cmpl $0x0, 0x7b8(%rax) jne 0x3ea20 movq %rbx, %rdi xorl %esi, %esi callq 0x37dbe callq 0xa1afa movl (%rax), %eax movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x3ea59 addq $0xb8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq testb $0x14, %al je 0x3ea0a callq 0xa1afa movl $0x86, (%rax) jmp 0x3ea0a callq 0x29270
_ma_read_dynamic_record: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0B8h mov [rbp+var_B8], rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax mov r15, [rdi] cmp byte ptr [r15+7D9h], 0 setnz al cmp rdx, 0FFFFFFFFFFFFFFFFh jz loc_3EA0A mov r12, rdx xor ecx, ecx mov cl, al shl ecx, 10h or rcx, 10h mov [rbp+var_C8], rcx mov eax, [rbx+480h] mov [rbp+var_A4], eax lea rax, [rbp+var_88] mov dword ptr [rax+50h], 0 lea rax, [rbx+4B8h] mov [rbp+var_98], rax lea rax, [rbx+3A0h] mov [rbp+var_B0], rax lea rax, [rbx+460h] mov [rbp+var_C0], rax xor r14d, r14d mov [rbp+var_D8], rbx mov [rbp+var_D0], r15 loc_3E7DC: cmp r12, 0FFFFFFFFFFFFFFFFh jz loc_3E9FD test byte ptr [rbx+61Ch], 10h jz short loc_3E819 lea rax, [r12+14h] mov rcx, [rbp+var_98] cmp [rcx], rax jnb short loc_3E819 mov rdi, [rbp+var_98] mov esi, 1 call my_b_flush_io_cache test eax, eax jnz loc_3EA0A loc_3E819: mov dword ptr [rbx+598h], 1 mov rdi, rbx lea rsi, [rbp+var_88] mov edx, [rbp+var_A4] mov rcx, r12 call _ma_get_block_info cmp eax, 4 jnb loc_3EA48 sub r14d, 1 jnb short loc_3E8B3 mov r13, [rbp+var_70] mov [rbx+110h], r13 mov eax, [r15+3B0h] cmp r13, rax ja loc_3E9FD cmp dword ptr [r15+3F0h], 0 jz short loc_3E8A2 mov eax, [r15+424h] add r13, rax mov rdi, [rbp+var_B0] mov rsi, [rbp+var_C0] mov rdx, r13 mov rcx, [rbp+var_C8] call _ma_alloc_buffer test al, al jnz loc_3EA0A mov r13, [rbp+var_70] loc_3E8A2: mov rax, [rbp+var_B0] mov rax, [rax] mov [rbp+var_A0], rax loc_3E8B3: mov eax, r13d mov rdx, [rbp+var_68] lea rcx, [rdx-1] cmp rcx, rax jnb loc_3E9FD mov [rbp+var_8C], r14d mov rax, [rbp+var_50] sub rax, r12 mov ecx, 14h sub ecx, eax cmp rdx, rcx mov r14d, edx cmovnb r14d, ecx test r14d, r14d jz short loc_3E93E mov eax, eax lea rsi, [rax+rbp] add rsi, 0FFFFFFFFFFFFFF78h mov r15d, r14d mov rbx, [rbp+var_A0] mov rdi, rbx mov rdx, r15 call _memcpy mov rdx, [rbp+var_68] sub r13d, r14d add rbx, r15 mov [rbp+var_A0], rbx sub rdx, r15 mov r15, [rbp+var_D0] mov rbx, [rbp+var_D8] mov [rbp+var_68], rdx mov r14d, [rbp+var_8C] jnz short loc_3E945 jmp short loc_3E9AC loc_3E93E: mov r14d, [rbp+var_8C] loc_3E945: add r12, 14h test byte ptr [rbx+61Ch], 10h jz short loc_3E97F lea rax, [rdx+r12] mov rcx, [rbp+var_98] cmp [rcx], rax jnb short loc_3E97F mov rdi, [rbp+var_98] mov esi, 1 call my_b_flush_io_cache test eax, eax jnz loc_3EA0A mov rdx, [rbp+var_68] loc_3E97F: mov r8d, 4 mov rdi, rbx mov rsi, [rbp+var_A0] mov rcx, r12 call qword ptr [r15+6E0h] test rax, rax jnz short loc_3E9FD mov rax, [rbp+var_68] sub r13d, eax add [rbp+var_A0], rax loc_3E9AC: mov r12, [rbp+var_48] test r13d, r13d jnz loc_3E7DC or byte ptr [rbx+624h], 2 mov rax, [rbx] cmp dword ptr [rax+7B8h], 0 jnz short loc_3E9D6 mov rdi, rbx xor esi, esi call _ma_writeinfo loc_3E9D6: mov rdx, [rbx+3A0h] mov rcx, [rbp+var_70] mov rdi, rbx mov rsi, [rbp+var_B8] call _ma_rec_unpack mov rcx, rax xor eax, eax cmp rcx, 0FFFFFFFFFFFFFFFFh jnz short loc_3EA27 jmp short loc_3EA20 loc_3E9FD: mov rdi, rbx mov esi, 7Fh call _ma_set_fatal_error loc_3EA0A: mov rax, [rbx] cmp dword ptr [rax+7B8h], 0 jnz short loc_3EA20 mov rdi, rbx xor esi, esi call _ma_writeinfo loc_3EA20: call _my_thread_var mov eax, [rax] loc_3EA27: mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz short loc_3EA59 add rsp, 0B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3EA48: test al, 14h jz short loc_3EA0A call _my_thread_var mov dword ptr [rax], 86h jmp short loc_3EA0A loc_3EA59: call ___stack_chk_fail
long long ma_read_dynamic_record( _DWORD *a1, unsigned __int8 *a2, long long a3, long long a4, unsigned long long a5, int a6) { unsigned long long v6; // r13 long long v7; // rbx long long v8; // r15 long long v9; // r12 int v10; // r14d unsigned int block_info; // eax bool v12; // cf int v13; // r14d unsigned int v14; // r14d bool v15; // zf long long v16; // r12 long long result; // rax _DWORD *v18; // [rsp+8h] [rbp-D8h] long long v19; // [rsp+10h] [rbp-D0h] long long v20; // [rsp+18h] [rbp-C8h] unsigned __int8 *v21; // [rsp+20h] [rbp-C0h] unsigned __int8 *v22; // [rsp+28h] [rbp-B8h] _QWORD *v23; // [rsp+30h] [rbp-B0h] unsigned int v24; // [rsp+3Ch] [rbp-A4h] long long v25; // [rsp+40h] [rbp-A0h] _QWORD *v26; // [rsp+48h] [rbp-98h] int v27; // [rsp+54h] [rbp-8Ch] unsigned __int8 v28[24]; // [rsp+58h] [rbp-88h] BYREF unsigned long long v29; // [rsp+70h] [rbp-70h] unsigned long long v30; // [rsp+78h] [rbp-68h] long long v31; // [rsp+90h] [rbp-50h] long long v32; // [rsp+98h] [rbp-48h] int v33; // [rsp+A8h] [rbp-38h] unsigned long long v34; // [rsp+B0h] [rbp-30h] v22 = a2; v7 = (long long)a1; v34 = __readfsqword(0x28u); v8 = *(_QWORD *)a1; if ( a3 != -1 ) { v9 = a3; a4 = ((unsigned __int8)(*(_BYTE *)(*(_QWORD *)a1 + 2009LL) != 0) << 16) | 0x10LL; v20 = a4; v24 = a1[288]; v33 = 0; v26 = a1 + 302; v23 = a1 + 232; v21 = (unsigned __int8 *)(a1 + 280); v10 = 0; v18 = a1; v19 = v8; while ( 1 ) { if ( v9 == -1 ) { LABEL_32: a1 = (_DWORD *)v7; a2 = (_BYTE *)(&dword_7C + 3); ma_set_fatal_error((_DWORD *)v7, 127LL, a3, a4, a5, a6); goto LABEL_33; } if ( (*(_BYTE *)(v7 + 1564) & 0x10) != 0 && *v26 < (unsigned long long)(v9 + 20) ) { a1 = v26; a2 = (_BYTE *)(&dword_0 + 1); if ( (unsigned int)my_b_flush_io_cache(v26, 1LL) ) goto LABEL_33; } *(_DWORD *)(v7 + 1432) = 1; a1 = (_DWORD *)v7; a2 = v28; block_info = ma_get_block_info(v7, v28, v24, v9, a5, a6); if ( block_info >= 4 ) { if ( (block_info & 0x14) != 0 ) *(_DWORD *)my_thread_var(v7, v28, a3, a4, a5) = 134; goto LABEL_33; } v12 = v10 == 0; v13 = v10 - 1; if ( v12 ) { v6 = v29; *(_QWORD *)(v7 + 272) = v29; if ( v6 > *(unsigned int *)(v8 + 944) ) goto LABEL_32; if ( *(_DWORD *)(v8 + 1008) ) { a1 = v23; a2 = v21; if ( (unsigned __int8)ma_alloc_buffer(v23, v21, *(unsigned int *)(v8 + 1060) + v6, v20) ) goto LABEL_33; LODWORD(v6) = v29; } v25 = *v23; } a3 = v30; a4 = v30 - 1; if ( v30 - 1 >= (unsigned int)v6 ) goto LABEL_32; v27 = v13; v14 = v30; if ( v30 >= (unsigned int)(20 - (v31 - v9)) ) v14 = 20 - (v31 - v9); if ( !v14 ) break; memcpy(v25, &v28[(unsigned int)(v31 - v9)], v14); LODWORD(v6) = v6 - v14; v25 += v14; a3 = v30 - v14; v15 = v30 == v14; v8 = v19; v7 = (long long)v18; v30 = a3; v10 = v27; if ( !v15 ) goto LABEL_21; LABEL_27: v9 = v32; if ( !(_DWORD)v6 ) { *(_BYTE *)(v7 + 1572) |= 2u; if ( !*(_DWORD *)(*(_QWORD *)v7 + 1976LL) ) ma_writeinfo((long long *)v7, 0LL, a3, a4, a5); a1 = (_DWORD *)v7; a2 = v22; a4 = ma_rec_unpack((_DWORD *)v7, v22, *(_QWORD *)(v7 + 928), v29, a5, a6); result = 0LL; if ( a4 != -1 ) return result; return *(unsigned int *)my_thread_var(a1, a2, a3, a4, a5); } } v10 = v27; LABEL_21: v16 = v9 + 20; if ( (*(_BYTE *)(v7 + 1564) & 0x10) != 0 && *v26 < (unsigned long long)(a3 + v16) ) { a1 = v26; a2 = (_BYTE *)(&dword_0 + 1); if ( (unsigned int)my_b_flush_io_cache(v26, 1LL) ) goto LABEL_33; a3 = v30; } if ( (*(long long ( **)(long long, long long, long long, long long, long long))(v8 + 1760))(v7, v25, a3, v16, 4LL) ) goto LABEL_32; LODWORD(v6) = v6 - v30; v25 += v30; goto LABEL_27; } LABEL_33: if ( !*(_DWORD *)(*(_QWORD *)v7 + 1976LL) ) { a1 = (_DWORD *)v7; a2 = 0LL; ma_writeinfo((long long *)v7, 0LL, a3, a4, a5); } return *(unsigned int *)my_thread_var(a1, a2, a3, a4, a5); }
_ma_read_dynamic_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xb8 MOV qword ptr [RBP + -0xb8],RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV R15,qword ptr [RDI] CMP byte ptr [R15 + 0x7d9],0x0 SETNZ AL CMP RDX,-0x1 JZ 0x0013ea0a MOV R12,RDX XOR ECX,ECX MOV CL,AL SHL ECX,0x10 OR RCX,0x10 MOV qword ptr [RBP + -0xc8],RCX MOV EAX,dword ptr [RBX + 0x480] MOV dword ptr [RBP + -0xa4],EAX LEA RAX,[RBP + -0x88] MOV dword ptr [RAX + 0x50],0x0 LEA RAX,[RBX + 0x4b8] MOV qword ptr [RBP + -0x98],RAX LEA RAX,[RBX + 0x3a0] MOV qword ptr [RBP + -0xb0],RAX LEA RAX,[RBX + 0x460] MOV qword ptr [RBP + -0xc0],RAX XOR R14D,R14D MOV qword ptr [RBP + -0xd8],RBX MOV qword ptr [RBP + -0xd0],R15 LAB_0013e7dc: CMP R12,-0x1 JZ 0x0013e9fd TEST byte ptr [RBX + 0x61c],0x10 JZ 0x0013e819 LEA RAX,[R12 + 0x14] MOV RCX,qword ptr [RBP + -0x98] CMP qword ptr [RCX],RAX JNC 0x0013e819 MOV RDI,qword ptr [RBP + -0x98] MOV ESI,0x1 CALL 0x00195539 TEST EAX,EAX JNZ 0x0013ea0a LAB_0013e819: MOV dword ptr [RBX + 0x598],0x1 MOV RDI,RBX LEA RSI,[RBP + -0x88] MOV EDX,dword ptr [RBP + -0xa4] MOV RCX,R12 CALL 0x0013d9e8 CMP EAX,0x4 JNC 0x0013ea48 SUB R14D,0x1 JNC 0x0013e8b3 MOV R13,qword ptr [RBP + -0x70] MOV qword ptr [RBX + 0x110],R13 MOV EAX,dword ptr [R15 + 0x3b0] CMP R13,RAX JA 0x0013e9fd CMP dword ptr [R15 + 0x3f0],0x0 JZ 0x0013e8a2 MOV EAX,dword ptr [R15 + 0x424] ADD R13,RAX MOV RDI,qword ptr [RBP + -0xb0] MOV RSI,qword ptr [RBP + -0xc0] MOV RDX,R13 MOV RCX,qword ptr [RBP + -0xc8] CALL 0x00154e83 TEST AL,AL JNZ 0x0013ea0a MOV R13,qword ptr [RBP + -0x70] LAB_0013e8a2: MOV RAX,qword ptr [RBP + -0xb0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0xa0],RAX LAB_0013e8b3: MOV EAX,R13D MOV RDX,qword ptr [RBP + -0x68] LEA RCX,[RDX + -0x1] CMP RCX,RAX JNC 0x0013e9fd MOV dword ptr [RBP + -0x8c],R14D MOV RAX,qword ptr [RBP + -0x50] SUB RAX,R12 MOV ECX,0x14 SUB ECX,EAX CMP RDX,RCX MOV R14D,EDX CMOVNC R14D,ECX TEST R14D,R14D JZ 0x0013e93e MOV EAX,EAX LEA RSI,[RAX + RBP*0x1] ADD RSI,-0x88 MOV R15D,R14D MOV RBX,qword ptr [RBP + -0xa0] MOV RDI,RBX MOV RDX,R15 CALL 0x00129080 MOV RDX,qword ptr [RBP + -0x68] SUB R13D,R14D ADD RBX,R15 MOV qword ptr [RBP + -0xa0],RBX SUB RDX,R15 MOV R15,qword ptr [RBP + -0xd0] MOV RBX,qword ptr [RBP + -0xd8] MOV qword ptr [RBP + -0x68],RDX MOV R14D,dword ptr [RBP + -0x8c] JNZ 0x0013e945 JMP 0x0013e9ac LAB_0013e93e: MOV R14D,dword ptr [RBP + -0x8c] LAB_0013e945: ADD R12,0x14 TEST byte ptr [RBX + 0x61c],0x10 JZ 0x0013e97f LEA RAX,[RDX + R12*0x1] MOV RCX,qword ptr [RBP + -0x98] CMP qword ptr [RCX],RAX JNC 0x0013e97f MOV RDI,qword ptr [RBP + -0x98] MOV ESI,0x1 CALL 0x00195539 TEST EAX,EAX JNZ 0x0013ea0a MOV RDX,qword ptr [RBP + -0x68] LAB_0013e97f: MOV R8D,0x4 MOV RDI,RBX MOV RSI,qword ptr [RBP + -0xa0] MOV RCX,R12 CALL qword ptr [R15 + 0x6e0] TEST RAX,RAX JNZ 0x0013e9fd MOV RAX,qword ptr [RBP + -0x68] SUB R13D,EAX ADD qword ptr [RBP + -0xa0],RAX LAB_0013e9ac: MOV R12,qword ptr [RBP + -0x48] TEST R13D,R13D JNZ 0x0013e7dc OR byte ptr [RBX + 0x624],0x2 MOV RAX,qword ptr [RBX] CMP dword ptr [RAX + 0x7b8],0x0 JNZ 0x0013e9d6 MOV RDI,RBX XOR ESI,ESI CALL 0x00137dbe LAB_0013e9d6: MOV RDX,qword ptr [RBX + 0x3a0] MOV RCX,qword ptr [RBP + -0x70] MOV RDI,RBX MOV RSI,qword ptr [RBP + -0xb8] CALL 0x0013e2e3 MOV RCX,RAX XOR EAX,EAX CMP RCX,-0x1 JNZ 0x0013ea27 JMP 0x0013ea20 LAB_0013e9fd: MOV RDI,RBX MOV ESI,0x7f CALL 0x00136a24 LAB_0013ea0a: MOV RAX,qword ptr [RBX] CMP dword ptr [RAX + 0x7b8],0x0 JNZ 0x0013ea20 MOV RDI,RBX XOR ESI,ESI CALL 0x00137dbe LAB_0013ea20: CALL 0x001a1afa MOV EAX,dword ptr [RAX] LAB_0013ea27: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x0013ea59 ADD RSP,0xb8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013ea48: TEST AL,0x14 JZ 0x0013ea0a CALL 0x001a1afa MOV dword ptr [RAX],0x86 JMP 0x0013ea0a LAB_0013ea59: CALL 0x00129270
int4 _ma_read_dynamic_record(long *param_1,int8 param_2,long param_3) { ulong *puVar1; char cVar2; long lVar3; char cVar4; int iVar5; uint uVar6; uint uVar7; int4 uVar8; long lVar9; long lVar10; int4 *puVar11; uint uVar12; ulong unaff_R13; int iVar13; uint uVar14; ulong __n; long in_FS_OFFSET; bool bVar15; void *local_a8; int1 local_90 [24]; ulong local_78; ulong local_70; int8 local_58; long local_50; int4 local_40; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); lVar10 = *param_1; cVar2 = *(char *)(lVar10 + 0x7d9); if (param_3 == -1) { LAB_0013ea0a: if (*(int *)(*param_1 + 0x7b8) == 0) { _ma_writeinfo(param_1,0); } } else { lVar3 = param_1[0x90]; local_40 = 0; puVar1 = (ulong *)(param_1 + 0x97); iVar13 = 0; do { if (param_3 == -1) { LAB_0013e9fd: _ma_set_fatal_error(param_1,0x7f); goto LAB_0013ea0a; } if ((((*(byte *)((long)param_1 + 0x61c) & 0x10) != 0) && (*puVar1 < param_3 + 0x14U)) && (iVar5 = my_b_flush_io_cache(puVar1,1), iVar5 != 0)) goto LAB_0013ea0a; *(int4 *)(param_1 + 0xb3) = 1; uVar6 = _ma_get_block_info(param_1,local_90,(int)lVar3,param_3); if (3 < uVar6) { if ((uVar6 & 0x14) != 0) { puVar11 = (int4 *)_my_thread_var(); *puVar11 = 0x86; } goto LAB_0013ea0a; } bVar15 = iVar13 == 0; iVar13 = iVar13 + -1; if (bVar15) { param_1[0x22] = local_78; if (*(uint *)(lVar10 + 0x3b0) < local_78) goto LAB_0013e9fd; if ((*(int *)(lVar10 + 0x3f0) != 0) && (cVar4 = _ma_alloc_buffer(param_1 + 0x74,param_1 + 0x8c, local_78 + *(uint *)(lVar10 + 0x424), (ulong)(cVar2 != '\0') << 0x10 | 0x10), cVar4 != '\0')) goto LAB_0013ea0a; local_a8 = (void *)param_1[0x74]; unaff_R13 = local_78; } uVar6 = (uint)unaff_R13; if ((unaff_R13 & 0xffffffff) <= local_70 - 1) goto LAB_0013e9fd; uVar7 = (int)local_58 - (int)param_3; uVar12 = 0x14 - uVar7; uVar14 = (uint)local_70; if (uVar12 <= local_70) { uVar14 = uVar12; } if (uVar14 == 0) { LAB_0013e945: if ((((*(byte *)((long)param_1 + 0x61c) & 0x10) != 0) && (*puVar1 < local_70 + param_3 + 0x14)) && (iVar5 = my_b_flush_io_cache(puVar1,1), iVar5 != 0)) goto LAB_0013ea0a; lVar9 = (**(code **)(lVar10 + 0x6e0))(param_1,local_a8,local_70,param_3 + 0x14,4); if (lVar9 != 0) goto LAB_0013e9fd; uVar6 = uVar6 - (int)local_70; local_a8 = (void *)((long)local_a8 + local_70); } else { __n = (ulong)uVar14; memcpy(local_a8,local_90 + uVar7,__n); uVar6 = uVar6 - uVar14; local_a8 = (void *)((long)local_a8 + __n); local_70 = local_70 - __n; if (local_70 != 0) goto LAB_0013e945; } unaff_R13 = (ulong)uVar6; param_3 = local_50; } while (uVar6 != 0); *(byte *)((long)param_1 + 0x624) = *(byte *)((long)param_1 + 0x624) | 2; if (*(int *)(*param_1 + 0x7b8) == 0) { _ma_writeinfo(param_1,0); } lVar10 = _ma_rec_unpack(param_1,param_2,param_1[0x74],local_78); uVar8 = 0; if (lVar10 != -1) goto LAB_0013ea27; } puVar11 = (int4 *)_my_thread_var(); uVar8 = *puVar11; LAB_0013ea27: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar8; }
23,590
bf_add_limb
bluesky950520[P]quickjs/libbf.c
static int bf_add_limb(bf_t *a, slimb_t *ppos, limb_t v) { slimb_t pos; pos = *ppos; if (unlikely(pos < 0)) { limb_t new_size, d, *new_tab; new_size = bf_max(a->len + 1, a->len * 3 / 2); new_tab = bf_realloc(a->ctx, a->tab, sizeof(limb_t) * new_size); if (!new_tab) return -1; a->tab = new_tab; d = new_size - a->len; memmove(a->tab + d, a->tab, a->len * sizeof(limb_t)); a->len = new_size; pos += d; } a->tab[pos--] = v; *ppos = pos; return 0; }
O2
c
bf_add_limb: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movq %rsi, %rbx movq %rdi, %r15 movq (%rsi), %r12 testq %r12, %r12 js 0x78ba4 movq 0x20(%r15), %rax movq %r14, (%rax,%r12,8) decq %r12 movq %r12, (%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x18(%r15), %rax leaq (%rax,%rax,2), %r13 incq %rax shrq %r13 cmpq %r13, %rax cmovgq %rax, %r13 movq (%r15), %rax movq 0x20(%r15), %rsi leaq (,%r13,8), %rdx movq (%rax), %rdi callq *0x8(%rax) testq %rax, %rax je 0x78bfa movq %rax, 0x20(%r15) movq 0x18(%r15), %rdx movq %r13, %rbp subq %rdx, %rbp leaq (%rax,%rbp,8), %rdi shlq $0x3, %rdx movq %rax, %rsi callq 0xe740 movq %r13, 0x18(%r15) addq %rbp, %r12 jmp 0x78b85 pushq $-0x1 popq %rax jmp 0x78b95
bf_add_limb: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rdx mov rbx, rsi mov r15, rdi mov r12, [rsi] test r12, r12 js short loc_78BA4 loc_78B85: mov rax, [r15+20h] mov [rax+r12*8], r14 dec r12 mov [rbx], r12 xor eax, eax loc_78B95: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_78BA4: mov rax, [r15+18h] lea r13, [rax+rax*2] inc rax shr r13, 1 cmp rax, r13 cmovg r13, rax mov rax, [r15] mov rsi, [r15+20h] lea rdx, ds:0[r13*8] mov rdi, [rax] call qword ptr [rax+8] test rax, rax jz short loc_78BFA mov [r15+20h], rax mov rdx, [r15+18h] mov rbp, r13 sub rbp, rdx lea rdi, [rax+rbp*8] shl rdx, 3 mov rsi, rax call _memmove mov [r15+18h], r13 add r12, rbp jmp short loc_78B85 loc_78BFA: push 0FFFFFFFFFFFFFFFFh pop rax jmp short loc_78B95
long long bf_add_limb(_QWORD *a1, long long *a2, long long a3) { long long v4; // r12 long long v6; // rax unsigned long long v7; // r13 signed long long v8; // rax signed long long v9; // r13 long long v10; // rax long long v11; // rdx long long v12; // rbp v4 = *a2; if ( *a2 < 0 ) { v6 = a1[3]; v7 = 3 * v6; v8 = v6 + 1; v9 = v7 >> 1; if ( v8 > v9 ) v9 = v8; v10 = (*(long long ( **)(_QWORD, _QWORD, signed long long))(*a1 + 8LL))(*(_QWORD *)*a1, a1[4], 8 * v9); if ( !v10 ) return -1LL; a1[4] = v10; v11 = a1[3]; v12 = v9 - v11; memmove(v10 + 8 * (v9 - v11), v10, 8 * v11); a1[3] = v9; v4 += v12; } *(_QWORD *)(a1[4] + 8 * v4) = a3; *a2 = v4 - 1; return 0LL; }
bf_add_limb: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDX MOV RBX,RSI MOV R15,RDI MOV R12,qword ptr [RSI] TEST R12,R12 JS 0x00178ba4 LAB_00178b85: MOV RAX,qword ptr [R15 + 0x20] MOV qword ptr [RAX + R12*0x8],R14 DEC R12 MOV qword ptr [RBX],R12 XOR EAX,EAX LAB_00178b95: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00178ba4: MOV RAX,qword ptr [R15 + 0x18] LEA R13,[RAX + RAX*0x2] INC RAX SHR R13,0x1 CMP RAX,R13 CMOVG R13,RAX MOV RAX,qword ptr [R15] MOV RSI,qword ptr [R15 + 0x20] LEA RDX,[R13*0x8] MOV RDI,qword ptr [RAX] CALL qword ptr [RAX + 0x8] TEST RAX,RAX JZ 0x00178bfa MOV qword ptr [R15 + 0x20],RAX MOV RDX,qword ptr [R15 + 0x18] MOV RBP,R13 SUB RBP,RDX LEA RDI,[RAX + RBP*0x8] SHL RDX,0x3 MOV RSI,RAX CALL 0x0010e740 MOV qword ptr [R15 + 0x18],R13 ADD R12,RBP JMP 0x00178b85 LAB_00178bfa: PUSH -0x1 POP RAX JMP 0x00178b95
int8 bf_add_limb(long *param_1,long *param_2,int8 param_3) { ulong uVar1; void *__src; long lVar2; long lVar3; ulong uVar4; lVar3 = *param_2; if (lVar3 < 0) { uVar1 = param_1[3] + 1; uVar4 = (ulong)(param_1[3] * 3) >> 1; if ((long)uVar4 < (long)uVar1) { uVar4 = uVar1; } __src = (void *)(*(code *)((int8 *)*param_1)[1]) (*(int8 *)*param_1,param_1[4],uVar4 * 8); if (__src == (void *)0x0) { return 0xffffffffffffffff; } param_1[4] = (long)__src; lVar2 = uVar4 - param_1[3]; memmove((void *)((long)__src + lVar2 * 8),__src,param_1[3] << 3); param_1[3] = uVar4; lVar3 = lVar3 + lVar2; } *(int8 *)(param_1[4] + lVar3 * 8) = param_3; *param_2 = lVar3 + -1; return 0; }
23,591
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [10], 0>(char const (&) [10]) const
monkey531[P]llama/common/./json.hpp
const_reference at(KeyType && key) const { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return it->second; }
O0
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [10], 0>(char const (&) [10]) const: subq $0xc8, %rsp movq %rdi, 0xc0(%rsp) movq %rsi, 0xb8(%rsp) movq 0xc0(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0xa2c80 xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0x1293f8 jmp 0x1294d4 movb $0x1, 0x83(%rsp) movl $0x20, %edi callq 0x50540 movq 0x20(%rsp), %rdi movq %rax, 0x18(%rsp) callq 0xa04c0 movq %rax, 0x90(%rsp) leaq 0xabd00(%rip), %rsi # 0x1d5128 leaq 0x98(%rsp), %rdi leaq 0x90(%rsp), %rdx callq 0x125a10 jmp 0x12943f movq 0x20(%rsp), %rcx movq 0x18(%rsp), %rdi movl $0x130, %esi # imm = 0x130 leaq 0x98(%rsp), %rdx callq 0xa0260 jmp 0x12945d movq 0x18(%rsp), %rdi movb $0x0, 0x83(%rsp) leaq 0x128c87(%rip), %rsi # 0x2520f8 leaq -0x88f08(%rip), %rdx # 0xa0570 callq 0x508f0 jmp 0x129651 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x1294b9 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x98(%rsp), %rdi callq 0x510c0 testb $0x1, 0x83(%rsp) jne 0x1294c5 jmp 0x1294cf movq 0x18(%rsp), %rdi callq 0x50c40 jmp 0x129644 movq 0x20(%rsp), %rax movq 0x8(%rax), %rdi movq 0xb8(%rsp), %rsi callq 0x126b60 movq %rax, %rcx movq 0x20(%rsp), %rax movq %rcx, 0x78(%rsp) movq 0x8(%rax), %rdi callq 0xa2ac0 movq %rax, 0x70(%rsp) leaq 0x78(%rsp), %rdi leaq 0x70(%rsp), %rsi callq 0xbb9f0 testb $0x1, %al jne 0x12951d jmp 0x12962e movb $0x1, 0x2e(%rsp) movl $0x20, %edi callq 0x50540 movq %rax, (%rsp) movq 0xb8(%rsp), %rax movq %rax, 0x8(%rsp) leaq 0x2f(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x50d60 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x30(%rsp), %rdi callq 0x61bd0 jmp 0x129562 leaq 0xabdeb(%rip), %rsi # 0x1d5354 leaq 0xabdea(%rip), %rcx # 0x1d535a leaq 0x50(%rsp), %rdi leaq 0x30(%rsp), %rdx callq 0x126c30 jmp 0x129581 movq 0x20(%rsp), %rcx movq (%rsp), %rdi movl $0x193, %esi # imm = 0x193 leaq 0x50(%rsp), %rdx callq 0x127b20 jmp 0x12959b movq (%rsp), %rdi movb $0x0, 0x2e(%rsp) leaq 0x128c35(%rip), %rsi # 0x2521e0 leaq -0x70672(%rip), %rdx # 0xb8f40 callq 0x508f0 jmp 0x129651 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x129610 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x129606 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x50(%rsp), %rdi callq 0x510c0 leaq 0x30(%rsp), %rdi callq 0x510c0 leaq 0x2f(%rsp), %rdi callq 0x510a0 testb $0x1, 0x2e(%rsp) jne 0x129623 jmp 0x12962c movq (%rsp), %rdi callq 0x50c40 jmp 0x129644 leaq 0x78(%rsp), %rdi callq 0xbbbe0 addq $0x20, %rax addq $0xc8, %rsp retq movq 0x88(%rsp), %rdi callq 0x50940 nopw %cs:(%rax,%rax) nopl (%rax,%rax)
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: sub rsp, 0C8h mov [rsp+0C8h+var_8], rdi mov qword ptr [rsp+0C8h+var_10], rsi mov rdi, [rsp+0C8h+var_8] mov [rsp+0C8h+var_A8], rdi; int call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9is_objectEv; 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_object(void) xor al, 0FFh xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_1293F8 jmp loc_1294D4 loc_1293F8: mov [rsp+0C8h+var_45], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rdi, [rsp+0C8h+var_A8] mov [rsp+0C8h+var_B0], rax; char 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+0C8h+var_38], rax; char lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+0C8h+var_30]; int lea rdx, [rsp+0C8h+var_38]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) jmp short $+2 loc_12943F: mov rcx, [rsp+0C8h+var_A8] mov rdi, [rsp+0C8h+var_B0]; int mov esi, 130h lea rdx, [rsp+0C8h+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_12945D: mov rdi, [rsp+0C8h+var_B0]; void * mov [rsp+0C8h+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 loc_129651 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_1294B9 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax lea rdi, [rsp+arg_90]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1294B9: test [rsp+arg_7B], 1 jnz short loc_1294C5 jmp short loc_1294CF loc_1294C5: mov rdi, [rsp+arg_10]; void * call ___cxa_free_exception loc_1294CF: jmp loc_129644 loc_1294D4: mov rax, [rsp+0C8h+var_A8] mov rdi, [rax+8] mov rsi, qword ptr [rsp+0C8h+var_10] call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA8_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ mov rcx, rax mov rax, [rsp+0C8h+var_A8] mov qword ptr [rsp+0C8h+var_50], rcx; int mov rdi, [rax+8] call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE3endEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::end(void) mov qword ptr [rsp+0C8h+var_58], rax; char lea rdi, [rsp+0C8h+var_50] lea rsi, [rsp+0C8h+var_58] call _ZN9__gnu_cxxeqIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbRKNS_17__normal_iteratorIT_T0_EESR_; __gnu_cxx::operator==<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&,__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&) test al, 1 jnz short loc_12951D jmp loc_12962E loc_12951D: mov [rsp+0C8h+var_9A], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov [rsp+0C8h+var_C8], rax; int mov rax, qword ptr [rsp+0C8h+var_10] mov qword ptr [rsp+0C8h+var_C0], rax; int lea rdi, [rsp+0C8h+var_99] mov qword ptr [rsp+0C8h+var_B8], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, qword ptr [rsp+0C8h+var_C0] mov rdx, qword ptr [rsp+0C8h+var_B8] lea rdi, [rsp+0C8h+var_99+1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_129562: lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+0C8h+var_78]; int lea rdx, [rsp+0C8h+var_99+1]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) jmp short $+2 loc_129581: mov rcx, [rsp+0C8h+var_A8] mov rdi, [rsp+0C8h+var_C8]; int mov esi, 193h lea rdx, [rsp+0C8h+var_78] call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ jmp short $+2 loc_12959B: mov rdi, [rsp+0C8h+var_C8]; void * mov [rsp+0C8h+var_9A], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail12out_of_rangeD2Ev; void (*)(void *) call ___cxa_throw jmp loc_129651 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_129610 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_129606 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax lea rdi, [rsp+arg_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_129606: lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_129610: lea rdi, [rsp+arg_27] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() test [rsp+arg_26], 1 jnz short loc_129623 jmp short loc_12962C loc_129623: mov rdi, [rsp+0]; void * call ___cxa_free_exception loc_12962C: jmp short loc_129644 loc_12962E: lea rdi, [rsp+0C8h+var_50] call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator->(void) add rax, 20h ; ' ' add rsp, 0C8h retn loc_129644: mov rdi, [rsp+arg_80] call __Unwind_Resume loc_129651: nop word ptr [rax+rax+00000000h] nop dword ptr [rax+rax+00h]
long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_( long long a1, long long a2) { nlohmann::json_abi_v3_11_3::detail::out_of_range *v3; // [rsp+0h] [rbp-C8h] long long v4; // [rsp+8h] [rbp-C0h] void *exception; // [rsp+18h] [rbp-B0h] int v6[8]; // [rsp+2Fh] [rbp-99h] BYREF int v7[8]; // [rsp+50h] [rbp-78h] BYREF char v8[8]; // [rsp+70h] [rbp-58h] BYREF int v9[2]; // [rsp+78h] [rbp-50h] BYREF char v10; // [rsp+83h] [rbp-45h] char v11[8]; // [rsp+90h] [rbp-38h] BYREF int v12[8]; // [rsp+98h] [rbp-30h] BYREF int v13[2]; // [rsp+B8h] [rbp-10h] long long v14; // [rsp+C0h] [rbp-8h] v14 = a1; *(_QWORD *)v13 = 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_object((_BYTE *)a1) ) { exception = __cxa_allocate_exception(0x20uLL); *(_QWORD *)v11 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((_BYTE *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>( (long long)v12, (long long)"cannot use at() with ", (nlohmann::json_abi_v3_11_3::detail **)v11); 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, 304, (long long)v12, a1); v10 = 0; __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); } *(_QWORD *)v9 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA8_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_( *(_QWORD *)(a1 + 8), *(long long *)v13); *(_QWORD *)v8 = std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::end(*(_QWORD *)(a1 + 8)); if ( __gnu_cxx::operator==<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>( (long long)v9, (long long)v8) ) { v3 = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL); v4 = *(_QWORD *)v13; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>((long long)v6 + 1, v4, (long long)v6); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( (long long)v7, (long long)"key '", (long long)v6 + 1, (long long)"' not found"); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( v3, 403, (long long)v7, a1); __cxa_throw( v3, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::out_of_range::~out_of_range); } return __gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> *,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator->((long long)v9) + 32; }
23,592
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [10], 0>(char const (&) [10]) const
monkey531[P]llama/common/./json.hpp
const_reference at(KeyType && key) const { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return it->second; }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [10], 0>(char const (&) [10]) const: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0x835cd movq %rsi, %r15 movq 0x8(%r14), %rdi callq 0x6339a movq 0x8(%r14), %rcx cmpq 0x8(%rcx), %rax je 0x8362b addq $0x20, %rax addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq pushq $0x20 popq %rdi callq 0x20390 movq %rax, %rbx movq %r14, %rdi callq 0x3b8b2 leaq 0x28(%rsp), %rdx movq %rax, (%rdx) leaq 0x1dddd(%rip), %rsi # 0xa13cc leaq 0x8(%rsp), %rdi callq 0x62ca1 movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0x130, %esi # imm = 0x130 movq %r14, %rcx callq 0x3b766 xorl %ebp, %ebp leaq 0x5cc9e(%rip), %rsi # 0xe02b8 leaq -0x3c63f(%rip), %rdx # 0x46fe2 movq %rbx, %rdi callq 0x20b30 jmp 0x83695 pushq $0x20 popq %rdi callq 0x20390 movq %rax, %rbx leaq 0x28(%rsp), %rdi leaq 0x7(%rsp), %rdx movq %r15, %rsi callq 0x262e2 leaq 0x1dfa9(%rip), %rsi # 0xa15f8 leaq 0x1dfa8(%rip), %rcx # 0xa15fe leaq 0x8(%rsp), %rdi leaq 0x28(%rsp), %rdx callq 0x632a9 movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0x193, %esi # imm = 0x193 movq %r14, %rcx callq 0x63712 xorl %ebp, %ebp leaq 0x5cd1a(%rip), %rsi # 0xe03a0 leaq -0x3c6ab(%rip), %rdx # 0x46fe2 movq %rbx, %rdi callq 0x20b30 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x20d78 jmp 0x836aa movq %rax, %r14 movb $0x1, %bpl leaq 0x28(%rsp), %rdi jmp 0x836bb jmp 0x836c7 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x20d78 testb %bpl, %bpl jne 0x836ca jmp 0x836d2 movq %rax, %r14 movq %rbx, %rdi callq 0x20520 movq %r14, %rdi callq 0x20b90
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: push rbp; char push r15; int push r14; int push rbx; int sub rsp, 48h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_835CD mov r15, rsi mov rdi, [r14+8] call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA11_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ mov rcx, [r14+8] cmp rax, [rcx+8] jz short loc_8362B add rax, 20h ; ' ' add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn loc_835CD: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+68h+var_40] mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+68h+var_60] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) mov bpl, 1 lea rdx, [rsp+68h+var_60] mov rdi, rbx; this mov esi, 130h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_83695 loc_8362B: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_61] mov rsi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+68h+var_60] lea rdx, [rsp+68h+var_40] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) mov bpl, 1 lea rdx, [rsp+68h+var_60] mov rdi, rbx; this mov esi, 193h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_83695: mov r14, rax lea rdi, [rsp+68h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_836AA mov r14, rax mov bpl, 1 loc_836AA: lea rdi, [rsp+68h+var_40] jmp short loc_836BB jmp short loc_836C7 mov r14, rax lea rdi, [rsp+68h+var_60]; void * loc_836BB: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_836CA jmp short loc_836D2 loc_836C7: mov r14, rax loc_836CA: mov rdi, rbx; void * call ___cxa_free_exception loc_836D2: mov rdi, r14 call __Unwind_Resume
long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_( long long a1, long long a2) { long long v2; // rax nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx nlohmann::json_abi_v3_11_3::detail::out_of_range *v5; // rbx _BYTE v6[32]; // [rsp+8h] [rbp-60h] BYREF _QWORD v7[8]; // [rsp+28h] [rbp-40h] BYREF if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); v7[0] = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>( (long long)v6, (long long)"cannot use at() with ", v7); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 0x130u, (long long)v6, a1); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v2 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA11_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(*(long long **)(a1 + 8)); if ( v2 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) ) { v5 = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL); std::string::basic_string<std::allocator<char>>(v7, a2); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( (long long)v6, (long long)"key '", (long long)v7, (long long)"' not found"); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( v5, 403, (long long)v6); __cxa_throw( v5, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return v2 + 32; }
23,593
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [10], 0>(char const (&) [10]) const
monkey531[P]llama/common/./json.hpp
const_reference at(KeyType && key) const { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return it->second; }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [10], 0>(char const (&) [10]) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0x69bb7 movq %rsi, %r15 movq 0x8(%r14), %r12 movq (%r12), %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx je 0x69ba1 movq %rbx, %rdi movq %r15, %rsi callq 0x181a0 testl %eax, %eax je 0x69b96 addq $0x30, %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx jne 0x69b77 jmp 0x69b99 movq %rbx, %rax movq 0x8(%r14), %rcx movq 0x8(%rcx), %rbx cmpq %rbx, %rax je 0x69c15 addq $0x20, %rax addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x18360 movq %rax, %rbx movq %r14, %rdi callq 0x3e096 movq %rsp, %rdx movq %rax, (%rdx) leaq 0x52b9a(%rip), %rsi # 0xbc773 leaq 0x20(%rsp), %rdi callq 0x6f3e3 movb $0x1, %bpl leaq 0x20(%rsp), %rdx movq %rbx, %rdi movl $0x130, %esi # imm = 0x130 movq %r14, %rcx callq 0x3de42 xorl %ebp, %ebp leaq 0x846b4(%rip), %rsi # 0xee2b8 leaq -0x1d85b(%rip), %rdx # 0x4c3b0 movq %rbx, %rdi callq 0x18b30 jmp 0x69c8e movl $0x20, %edi callq 0x18360 movq %rax, %rbx leaq 0x10(%rsp), %r12 movq %r12, -0x10(%r12) movq %r15, %rdi callq 0x18310 leaq (%rax,%r15), %rdx movq %rsp, %rdi movq %r15, %rsi callq 0x590a2 leaq 0x52d55(%rip), %rsi # 0xbc99f leaq 0x52d54(%rip), %rcx # 0xbc9a5 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x6f9be movb $0x1, %bpl leaq 0x20(%rsp), %rdx movq %rbx, %rdi movl $0x193, %esi # imm = 0x193 movq %r14, %rcx callq 0x6fd36 xorl %ebp, %ebp leaq 0x84721(%rip), %rsi # 0xee3a0 leaq -0x1d8d6(%rip), %rdx # 0x4c3b0 movq %rbx, %rdi callq 0x18b30 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x69cac movq 0x30(%rsp), %rsi incq %rsi callq 0x186a0 movq (%rsp), %rdi cmpq %r12, %rdi je 0x69cf7 movq 0x10(%rsp), %rsi jmp 0x69cef movq %rax, %r14 movq (%rsp), %rdi cmpq %r12, %rdi je 0x69d01 movq 0x10(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x69d01 jmp 0x69cfe movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x69cf7 movq 0x30(%rsp), %rsi incq %rsi callq 0x186a0 testb %bpl, %bpl jne 0x69d01 jmp 0x69d09 movq %rax, %r14 movq %rbx, %rdi callq 0x18500 movq %r14, %rdi callq 0x18b90 nop
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: push rbp; char push r15; int push r14; int push r12; int push rbx; char sub rsp, 40h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_69BB7 mov r15, rsi mov r12, [r14+8] mov rbx, [r12] mov rax, [r12+8] cmp rbx, rax jz short loc_69BA1 loc_69B77: mov rdi, rbx mov rsi, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_69B96 add rbx, 30h ; '0' mov rax, [r12+8] cmp rbx, rax jnz short loc_69B77 jmp short loc_69B99 loc_69B96: mov rax, rbx loc_69B99: mov rcx, [r14+8] mov rbx, [rcx+8] loc_69BA1: cmp rax, rbx jz short loc_69C15 add rax, 20h ; ' ' add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_69BB7: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) mov rdx, rsp mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+68h+var_48] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) mov bpl, 1 lea rdx, [rsp+68h+var_48] mov rdi, rbx; this mov esi, 130h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_69C8E loc_69C15: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r12, [rsp+68h+var_58] mov [r12-10h], r12 mov rdi, r15 call _strlen lea rdx, [rax+r15] mov rdi, rsp mov rsi, r15 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, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+68h+var_48] mov rdx, rsp call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) mov bpl, 1 lea rdx, [rsp+68h+var_48] mov rdi, rbx; this mov esi, 193h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_69C8E: mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_69CAC mov rsi, [rsp+68h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_69CAC: mov rdi, [rsp+68h+var_68] cmp rdi, r12 jz short loc_69CF7 mov rsi, [rsp+68h+var_58] jmp short loc_69CEF mov r14, rax mov rdi, [rsp+68h+var_68]; void * cmp rdi, r12 jz short loc_69D01 mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_69D01 jmp short loc_69CFE mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_69CF7 mov rsi, [rsp+68h+var_38] loc_69CEF: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_69CF7: test bpl, bpl jnz short loc_69D01 jmp short loc_69D09 loc_69CFE: mov r14, rax loc_69D01: mov rdi, rbx; void * call ___cxa_free_exception loc_69D09: mov rdi, r14 call __Unwind_Resume
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x00169bb7 MOV R15,RSI MOV R12,qword ptr [R14 + 0x8] MOV RBX,qword ptr [R12] MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JZ 0x00169ba1 LAB_00169b77: MOV RDI,RBX MOV RSI,R15 CALL 0x001181a0 TEST EAX,EAX JZ 0x00169b96 ADD RBX,0x30 MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JNZ 0x00169b77 JMP 0x00169b99 LAB_00169b96: MOV RAX,RBX LAB_00169b99: MOV RCX,qword ptr [R14 + 0x8] MOV RBX,qword ptr [RCX + 0x8] LAB_00169ba1: CMP RAX,RBX JZ 0x00169c15 ADD RAX,0x20 ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00169bb7: MOV EDI,0x20 CALL 0x00118360 MOV RBX,RAX MOV RDI,R14 CALL 0x0013e096 MOV RDX,RSP MOV qword ptr [RDX],RAX LAB_00169bd2: LEA RSI,[0x1bc773] LEA RDI,[RSP + 0x20] CALL 0x0016f3e3 MOV BPL,0x1 LAB_00169be6: LEA RDX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x130 MOV RCX,R14 CALL 0x0013de42 XOR EBP,EBP LEA RSI,[0x1ee2b8] LEA RDX,[0x14c3b0] MOV RDI,RBX CALL 0x00118b30 LAB_00169c15: MOV EDI,0x20 CALL 0x00118360 MOV RBX,RAX LEA R12,[RSP + 0x10] MOV qword ptr [R12 + -0x10],R12 MOV RDI,R15 CALL 0x00118310 LEA RDX,[RAX + R15*0x1] LAB_00169c38: MOV RDI,RSP MOV RSI,R15 CALL 0x001590a2 LAB_00169c43: LEA RSI,[0x1bc99f] LEA RCX,[0x1bc9a5] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x0016f9be MOV BPL,0x1 LAB_00169c61: LEA RDX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x193 MOV RCX,R14 CALL 0x0016fd36 XOR EBP,EBP LEA RSI,[0x1ee3a0] LEA RDX,[0x14c3b0] MOV RDI,RBX CALL 0x00118b30
char * _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_ (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_1,char *param_2) { long *plVar1; int iVar2; char *pcVar3; int8 uVar4; size_t sVar5; char *pcVar6; char *local_68 [2]; char local_58 [16]; detail local_48 [32]; if (*param_1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar4 = __cxa_allocate_exception(0x20); local_68[0] = (char *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(param_1); /* try { // try from 00169bd2 to 00169be2 has its CatchHandler @ 00169cfe */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*> (local_48,"cannot use at() with ",local_68); /* try { // try from 00169be6 to 00169c12 has its CatchHandler @ 00169cd9 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar4,0x130,local_48,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } plVar1 = *(long **)(param_1 + 8); pcVar6 = (char *)*plVar1; pcVar3 = (char *)plVar1[1]; if (pcVar6 != pcVar3) { do { pcVar3 = pcVar6; iVar2 = std::__cxx11::string::compare(pcVar3); if (iVar2 == 0) break; pcVar6 = pcVar3 + 0x30; pcVar3 = (char *)plVar1[1]; } while (pcVar6 != pcVar3); pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8); } if (pcVar3 == pcVar6) { uVar4 = __cxa_allocate_exception(0x20); local_68[0] = local_58; sVar5 = strlen(param_2); /* try { // try from 00169c38 to 00169c42 has its CatchHandler @ 00169cd7 */ std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5); /* try { // try from 00169c43 to 00169c5d has its CatchHandler @ 00169cbc */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]> (local_48,"key \'",(string *)local_68,"\' not found"); /* try { // try from 00169c61 to 00169c8d has its CatchHandler @ 00169c8e */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar4,0x193,local_48,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return pcVar3 + 0x20; }
23,594
ma_service_thread_control_end
eloqsql/storage/maria/ma_servicethread.c
void ma_service_thread_control_end(MA_SERVICE_THREAD_CONTROL *control) { DBUG_ENTER("ma_service_thread_control_end"); DBUG_PRINT("init", ("control %p", control)); DBUG_ASSERT(control->inited); mysql_mutex_lock(control->LOCK_control); if (!control->killed) { DBUG_PRINT("info",("killing Maria background thread")); control->killed= TRUE; /* kill it */ mysql_cond_broadcast(control->COND_control); mysql_mutex_unlock(control->LOCK_control); DBUG_PRINT("info", ("waiting for Maria background thread to die")); pthread_join(control->thread, NULL); } else mysql_mutex_unlock(control->LOCK_control); mysql_mutex_destroy(control->LOCK_control); mysql_cond_destroy(control->COND_control); control->inited= FALSE; DBUG_VOID_RETURN; }
O0
c
ma_service_thread_control_end: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) jmp 0x9c5ae jmp 0x9c5b0 jmp 0x9c5b2 movq -0x8(%rbp), %rax movq 0x10(%rax), %rdi leaq 0xb73c6(%rip), %rsi # 0x153987 movl $0x3e, %edx callq 0x9c650 movq -0x8(%rbp), %rax cmpb $0x0, 0x8(%rax) jne 0x9c60f jmp 0x9c5d7 jmp 0x9c5d9 movq -0x8(%rbp), %rax movb $0x1, 0x8(%rax) movq -0x8(%rbp), %rax movq 0x18(%rax), %rdi callq 0x9c6c0 movq -0x8(%rbp), %rax movq 0x10(%rax), %rdi callq 0x9c720 jmp 0x9c5fd movq -0x8(%rbp), %rax movq (%rax), %rdi xorl %eax, %eax movl %eax, %esi callq 0x29260 jmp 0x9c61c movq -0x8(%rbp), %rax movq 0x10(%rax), %rdi callq 0x9c720 movq -0x8(%rbp), %rax movq 0x10(%rax), %rdi callq 0x9c780 movq -0x8(%rbp), %rax movq 0x18(%rax), %rdi callq 0x9c7d0 movq -0x8(%rbp), %rax movb $0x0, 0x9(%rax) jmp 0x9c640 addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_service_thread_control_end: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi jmp short $+2 loc_9C5AE: jmp short $+2 loc_9C5B0: jmp short $+2 loc_9C5B2: mov rax, [rbp+var_8] mov rdi, [rax+10h] lea rsi, aWorkspaceLlm4b_20; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 3Eh ; '>' call inline_mysql_mutex_lock_14 mov rax, [rbp+var_8] cmp byte ptr [rax+8], 0 jnz short loc_9C60F jmp short $+2 loc_9C5D7: jmp short $+2 loc_9C5D9: mov rax, [rbp+var_8] mov byte ptr [rax+8], 1 mov rax, [rbp+var_8] mov rdi, [rax+18h] call inline_mysql_cond_broadcast_2 mov rax, [rbp+var_8] mov rdi, [rax+10h] call inline_mysql_mutex_unlock_15 jmp short $+2 loc_9C5FD: mov rax, [rbp+var_8] mov rdi, [rax] xor eax, eax mov esi, eax call _pthread_join jmp short loc_9C61C loc_9C60F: mov rax, [rbp+var_8] mov rdi, [rax+10h] call inline_mysql_mutex_unlock_15 loc_9C61C: mov rax, [rbp+var_8] mov rdi, [rax+10h] call inline_mysql_mutex_destroy_6 mov rax, [rbp+var_8] mov rdi, [rax+18h] call inline_mysql_cond_destroy_2 mov rax, [rbp+var_8] mov byte ptr [rax+9], 0 jmp short $+2 loc_9C640: add rsp, 10h pop rbp retn
long long ma_service_thread_control_end(long long a1) { long long result; // rax inline_mysql_mutex_lock_14( *(_QWORD *)(a1 + 16), "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_servicethread.c", 62LL); if ( *(_BYTE *)(a1 + 8) ) { inline_mysql_mutex_unlock_15(*(_QWORD *)(a1 + 16)); } else { *(_BYTE *)(a1 + 8) = 1; inline_mysql_cond_broadcast_2(*(_QWORD *)(a1 + 24)); inline_mysql_mutex_unlock_15(*(_QWORD *)(a1 + 16)); pthread_join(*(_QWORD *)a1, 0LL); } inline_mysql_mutex_destroy_6(*(_QWORD *)(a1 + 16)); inline_mysql_cond_destroy_2(*(_QWORD *)(a1 + 24)); result = a1; *(_BYTE *)(a1 + 9) = 0; return result; }
ma_service_thread_control_end: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI JMP 0x0019c5ae LAB_0019c5ae: JMP 0x0019c5b0 LAB_0019c5b0: JMP 0x0019c5b2 LAB_0019c5b2: MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x10] LEA RSI,[0x253987] MOV EDX,0x3e CALL 0x0019c650 MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x8],0x0 JNZ 0x0019c60f JMP 0x0019c5d7 LAB_0019c5d7: JMP 0x0019c5d9 LAB_0019c5d9: MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x8],0x1 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x18] CALL 0x0019c6c0 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x10] CALL 0x0019c720 JMP 0x0019c5fd LAB_0019c5fd: MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX] XOR EAX,EAX MOV ESI,EAX CALL 0x00129260 JMP 0x0019c61c LAB_0019c60f: MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x10] CALL 0x0019c720 LAB_0019c61c: MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x10] CALL 0x0019c780 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x18] CALL 0x0019c7d0 MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x9],0x0 JMP 0x0019c640 LAB_0019c640: ADD RSP,0x10 POP RBP RET
void ma_service_thread_control_end(pthread_t *param_1) { inline_mysql_mutex_lock (param_1[2],"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_servicethread.c", 0x3e); if ((char)param_1[1] == '\0') { *(int1 *)(param_1 + 1) = 1; inline_mysql_cond_broadcast(param_1[3]); inline_mysql_mutex_unlock(param_1[2]); pthread_join(*param_1,(void **)0x0); } else { inline_mysql_mutex_unlock(param_1[2]); } inline_mysql_mutex_destroy(param_1[2]); inline_mysql_cond_destroy(param_1[3]); *(int1 *)((long)param_1 + 9) = 0; return; }
23,595
ma_read_key_record
eloqsql/storage/maria/ma_key.c
int _ma_read_key_record(MARIA_HA *info, uchar *buf, MARIA_RECORD_POS filepos) { fast_ma_writeinfo(info); if (filepos != HA_OFFSET_ERROR) { if (info->lastinx >= 0) { /* Read only key */ if (_ma_put_key_in_record(info, (uint)info->lastinx, TRUE, buf)) { _ma_set_fatal_error(info, HA_ERR_CRASHED); return -1; } info->update|= HA_STATE_AKTIV; /* We should find a record */ return 0; } my_errno=HA_ERR_WRONG_INDEX; } return(-1); /* Wrong data to read */ }
O3
c
ma_read_key_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdx, %r12 movq %rsi, %r15 movq %rdi, %r14 movq (%rdi), %rax cmpl $0x0, 0x7b8(%rax) jne 0x36fc2 movq %r14, %rdi xorl %esi, %esi callq 0x379b2 movl $0xffffffff, %ebx # imm = 0xFFFFFFFF cmpq $-0x1, %r12 je 0x37012 movl 0x62c(%r14), %esi testl %esi, %esi js 0x36ffb movq %r14, %rdi movl $0x1, %edx movq %r15, %rcx callq 0x3701d testl %eax, %eax je 0x37008 movq %r14, %rdi movl $0x7e, %esi callq 0x36618 jmp 0x37012 callq 0xa16ee movl $0x7c, (%rax) jmp 0x37012 orb $0x2, 0x624(%r14) xorl %ebx, %ebx movl %ebx, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_ma_read_key_record: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov r12, rdx mov r15, rsi mov r14, rdi mov rax, [rdi] cmp dword ptr [rax+7B8h], 0 jnz short loc_36FC2 mov rdi, r14 xor esi, esi call _ma_writeinfo loc_36FC2: mov ebx, 0FFFFFFFFh cmp r12, 0FFFFFFFFFFFFFFFFh jz short loc_37012 mov esi, [r14+62Ch] test esi, esi js short loc_36FFB mov rdi, r14 mov edx, 1 mov rcx, r15 call _ma_put_key_in_record test eax, eax jz short loc_37008 mov rdi, r14 mov esi, 7Eh ; '~' call _ma_set_fatal_error jmp short loc_37012 loc_36FFB: call _my_thread_var mov dword ptr [rax], 7Ch ; '|' jmp short loc_37012 loc_37008: or byte ptr [r14+624h], 2 xor ebx, ebx loc_37012: mov eax, ebx pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long ma_read_key_record(unsigned int *a1, long long a2, long long a3, long long a4, long long a5) { unsigned int v7; // ebx long long v8; // rsi long long v9; // rdx long long v10; // rcx long long v11; // r8 int v12; // r9d if ( !*(_DWORD *)(*(_QWORD *)a1 + 1976LL) ) ma_writeinfo(a1, 0LL); v7 = -1; if ( a3 != -1 ) { v8 = a1[395]; if ( (int)v8 < 0 ) { *(_DWORD *)my_thread_var(a1, v8, a3, a4, a5) = 124; } else if ( (unsigned int)ma_put_key_in_record(a1, v8, 1LL, a2) ) { ma_set_fatal_error(a1, 126LL, v9, v10, v11, v12); } else { *((_BYTE *)a1 + 1572) |= 2u; return 0; } } return v7; }
_ma_read_key_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R12,RDX MOV R15,RSI MOV R14,RDI MOV RAX,qword ptr [RDI] CMP dword ptr [RAX + 0x7b8],0x0 JNZ 0x00136fc2 MOV RDI,R14 XOR ESI,ESI CALL 0x001379b2 LAB_00136fc2: MOV EBX,0xffffffff CMP R12,-0x1 JZ 0x00137012 MOV ESI,dword ptr [R14 + 0x62c] TEST ESI,ESI JS 0x00136ffb MOV RDI,R14 MOV EDX,0x1 MOV RCX,R15 CALL 0x0013701d TEST EAX,EAX JZ 0x00137008 MOV RDI,R14 MOV ESI,0x7e CALL 0x00136618 JMP 0x00137012 LAB_00136ffb: CALL 0x001a16ee MOV dword ptr [RAX],0x7c JMP 0x00137012 LAB_00137008: OR byte ptr [R14 + 0x624],0x2 XOR EBX,EBX LAB_00137012: MOV EAX,EBX POP RBX POP R12 POP R14 POP R15 POP RBP RET
int8 _ma_read_key_record(long *param_1,int8 param_2,long param_3) { int iVar1; int4 *puVar2; int8 uVar3; if (*(int *)(*param_1 + 0x7b8) == 0) { _ma_writeinfo(param_1,0); } uVar3 = 0xffffffff; if (param_3 != -1) { if (*(int *)((long)param_1 + 0x62c) < 0) { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x7c; } else { iVar1 = _ma_put_key_in_record(param_1,*(int *)((long)param_1 + 0x62c),1,param_2); if (iVar1 == 0) { *(byte *)((long)param_1 + 0x624) = *(byte *)((long)param_1 + 0x624) | 2; uVar3 = 0; } else { _ma_set_fatal_error(param_1,0x7e); } } } return uVar3; }
23,596
LefDefParser::defwStartFills(int)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp
int defwStartFills(int count) { defwFunc = DEFW_FILL_START; // Current function of writer if (!defwFile) return DEFW_UNINITIALIZED; if ((defwState >= DEFW_FILL_START) && (defwState <= DEFW_FILL_END)) return DEFW_BAD_ORDER; if (defVersionNum < 5.4) return DEFW_WRONG_VERSION; fprintf(defwFile, "FILLS %d ;\n", count); defwLines++; defwState = DEFW_FILL_START; defwCounter = count; return DEFW_OK; }
O3
cpp
LefDefParser::defwStartFills(int): pushq %rbp pushq %r14 pushq %rbx movl %edi, %ebx leaq 0xbc61(%rip), %rax # 0x1e178 movl $0x54, (%rax) leaq 0xbc44(%rip), %rax # 0x1e168 movq (%rax), %rdi testq %rdi, %rdi je 0x12587 leaq 0xbc41(%rip), %r14 # 0x1e174 movl (%r14), %eax addl $-0x54, %eax movl $0x2, %ebp cmpl $0x6, %eax jb 0x1258c movl $0x5, %ebp movsd 0x1bc0(%rip), %xmm0 # 0x14110 ucomisd 0xbb68(%rip), %xmm0 # 0x1e0c0 ja 0x1258c leaq 0x3e33(%rip), %rsi # 0x16394 xorl %ebp, %ebp movl %ebx, %edx xorl %eax, %eax callq 0x10e0 leaq 0xbbfd(%rip), %rax # 0x1e170 incl (%rax) movl $0x54, (%r14) leaq 0xbc05(%rip), %rax # 0x1e188 movl %ebx, (%rax) jmp 0x1258c movl $0x1, %ebp movl %ebp, %eax popq %rbx popq %r14 popq %rbp retq
_ZN12LefDefParser14defwStartFillsEi: push rbp push r14 push rbx mov ebx, edi lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc mov dword ptr [rax], 54h ; 'T' lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile mov rdi, [rax] test rdi, rdi jz short loc_12587 lea r14, _ZN12LefDefParser9defwStateE; LefDefParser::defwState mov eax, [r14] add eax, 0FFFFFFACh mov ebp, 2 cmp eax, 6 jb short loc_1258C mov ebp, 5 movsd xmm0, cs:qword_14110 ucomisd xmm0, cs:_ZN12LefDefParserL13defVersionNumE; LefDefParser::defVersionNum ja short loc_1258C lea rsi, aFillsD; "FILLS %d ;\n" xor ebp, ebp mov edx, ebx xor eax, eax call _fprintf lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines inc dword ptr [rax] mov dword ptr [r14], 54h ; 'T' lea rax, _ZN12LefDefParser11defwCounterE; LefDefParser::defwCounter mov [rax], ebx jmp short loc_1258C loc_12587: mov ebp, 1 loc_1258C: mov eax, ebp pop rbx pop r14 pop rbp retn
long long LefDefParser::defwStartFills(LefDefParser *this) { unsigned int v1; // ebp LefDefParser::defwFunc = 84; if ( LefDefParser::defwFile ) { v1 = 2; if ( (unsigned int)(LefDefParser::defwState - 84) >= 6 ) { v1 = 5; if ( *(double *)&LefDefParser::defVersionNum >= 5.4 ) { v1 = 0; fprintf(LefDefParser::defwFile, "FILLS %d ;\n", (_DWORD)this); ++LefDefParser::defwLines; LefDefParser::defwState = 84; LefDefParser::defwCounter = (_DWORD)this; } } } else { return 1; } return v1; }
defwStartFills: PUSH RBP PUSH R14 PUSH RBX MOV EBX,EDI LEA RAX,[0x11e178] MOV dword ptr [RAX],0x54 LEA RAX,[0x11e168] MOV RDI,qword ptr [RAX] TEST RDI,RDI JZ 0x00112587 LEA R14,[0x11e174] MOV EAX,dword ptr [R14] ADD EAX,-0x54 MOV EBP,0x2 CMP EAX,0x6 JC 0x0011258c MOV EBP,0x5 MOVSD XMM0,qword ptr [0x00114110] UCOMISD XMM0,qword ptr [0x0011e0c0] JA 0x0011258c LEA RSI,[0x116394] XOR EBP,EBP MOV EDX,EBX XOR EAX,EAX CALL 0x001010e0 LEA RAX,[0x11e170] INC dword ptr [RAX] MOV dword ptr [R14],0x54 LEA RAX,[0x11e188] MOV dword ptr [RAX],EBX JMP 0x0011258c LAB_00112587: MOV EBP,0x1 LAB_0011258c: MOV EAX,EBP POP RBX POP R14 POP RBP RET
/* LefDefParser::defwStartFills(int) */ int8 LefDefParser::defwStartFills(int param_1) { int8 uVar1; defwFunc = 0x54; if (defwFile == (FILE *)0x0) { uVar1 = 1; } else { uVar1 = 2; if (5 < defwState - 0x54U) { uVar1 = 5; if (DAT_00114110 <= defVersionNum) { uVar1 = 0; fprintf(defwFile,"FILLS %d ;\n",param_1); defwLines = defwLines + 1; defwState = 0x54; defwCounter = param_1; } } } return uVar1; }
23,597
r3d_frustum_is_point_in_xyz
r3d/src/details/r3d_frustum.c
bool r3d_frustum_is_point_in_xyz(const r3d_frustum_t* frustum, float x, float y, float z) { for (int i = 0; i < R3D_PLANE_COUNT; i++) { if (r3d_frustum_distance_to_plane_xyz(frustum->planes[i], x, y, z) <= 0) { return false; } } return true; }
O3
c
r3d_frustum_is_point_in_xyz: movsd (%rdi), %xmm3 movsd 0x8(%rdi), %xmm4 movaps %xmm3, %xmm5 shufps $0x55, %xmm3, %xmm5 # xmm5 = xmm5[1,1],xmm3[1,1] mulss %xmm1, %xmm5 mulss %xmm0, %xmm3 addss %xmm5, %xmm3 movaps %xmm4, %xmm5 mulss %xmm2, %xmm5 addss %xmm3, %xmm5 shufps $0x55, %xmm4, %xmm4 # xmm4 = xmm4[1,1,1,1] addss %xmm5, %xmm4 xorps %xmm3, %xmm3 ucomiss %xmm4, %xmm3 jae 0xdfd7f pushq %rbp movq %rsp, %rbp addq $0x18, %rdi xorl %ecx, %ecx movq %rcx, %rax cmpq $0x5, %rcx je 0xdfd76 movsd -0x8(%rdi), %xmm4 movsd (%rdi), %xmm5 movaps %xmm4, %xmm6 shufps $0x55, %xmm4, %xmm6 # xmm6 = xmm6[1,1],xmm4[1,1] mulss %xmm1, %xmm6 mulss %xmm0, %xmm4 addss %xmm6, %xmm4 movaps %xmm5, %xmm6 mulss %xmm2, %xmm6 addss %xmm4, %xmm6 shufps $0x55, %xmm5, %xmm5 # xmm5 = xmm5[1,1,1,1] addss %xmm6, %xmm5 addq $0x10, %rdi leaq 0x1(%rax), %rcx ucomiss %xmm5, %xmm3 jb 0xdfd31 cmpq $0x5, %rax setae %al popq %rbp retq xorl %eax, %eax retq
r3d_frustum_is_point_in_xyz: movsd xmm3, qword ptr [rdi] movsd xmm4, qword ptr [rdi+8] movaps xmm5, xmm3 shufps xmm5, xmm3, 55h ; 'U' mulss xmm5, xmm1 mulss xmm3, xmm0 addss xmm3, xmm5 movaps xmm5, xmm4 mulss xmm5, xmm2 addss xmm5, xmm3 shufps xmm4, xmm4, 55h ; 'U' addss xmm4, xmm5 xorps xmm3, xmm3 ucomiss xmm3, xmm4 jnb short loc_DFD7F push rbp mov rbp, rsp add rdi, 18h xor ecx, ecx loc_DFD31: mov rax, rcx cmp rcx, 5 jz short loc_DFD76 movsd xmm4, qword ptr [rdi-8] movsd xmm5, qword ptr [rdi] movaps xmm6, xmm4 shufps xmm6, xmm4, 55h ; 'U' mulss xmm6, xmm1 mulss xmm4, xmm0 addss xmm4, xmm6 movaps xmm6, xmm5 mulss xmm6, xmm2 addss xmm6, xmm4 shufps xmm5, xmm5, 55h ; 'U' addss xmm5, xmm6 add rdi, 10h lea rcx, [rax+1] ucomiss xmm3, xmm5 jb short loc_DFD31 loc_DFD76: cmp rax, 5 setnb al pop rbp retn loc_DFD7F: xor eax, eax retn
bool r3d_frustum_is_point_in_xyz(unsigned long long *a1, float a2, float a3, float a4) { unsigned long long *v4; // rdi unsigned long long v5; // rcx unsigned long long v6; // rax float v7; // xmm5_4 if ( (float)(_mm_shuffle_ps((__m128)a1[1], (__m128)a1[1], 85).m128_f32[0] + (float)((float)(COERCE_FLOAT(a1[1]) * a4) + (float)((float)(COERCE_FLOAT(*a1) * a2) + (float)(_mm_shuffle_ps((__m128)*a1, (__m128)*a1, 85).m128_f32[0] * a3)))) <= 0.0 ) return 0; v4 = a1 + 3; v5 = 0LL; do { v6 = v5; if ( v5 == 5 ) break; v7 = _mm_shuffle_ps((__m128)*v4, (__m128)*v4, 85).m128_f32[0] + (float)((float)(COERCE_FLOAT(*v4) * a4) + (float)((float)(COERCE_FLOAT(*(v4 - 1)) * a2) + (float)(_mm_shuffle_ps((__m128)*(v4 - 1), (__m128)*(v4 - 1), 85).m128_f32[0] * a3))); v4 += 2; ++v5; } while ( v7 > 0.0 ); return v6 >= 5; }
r3d_frustum_is_point_in_xyz: MOVSD XMM3,qword ptr [RDI] MOVSD XMM4,qword ptr [RDI + 0x8] MOVAPS XMM5,XMM3 SHUFPS XMM5,XMM3,0x55 MULSS XMM5,XMM1 MULSS XMM3,XMM0 ADDSS XMM3,XMM5 MOVAPS XMM5,XMM4 MULSS XMM5,XMM2 ADDSS XMM5,XMM3 SHUFPS XMM4,XMM4,0x55 ADDSS XMM4,XMM5 XORPS XMM3,XMM3 UCOMISS XMM3,XMM4 JNC 0x001dfd7f PUSH RBP MOV RBP,RSP ADD RDI,0x18 XOR ECX,ECX LAB_001dfd31: MOV RAX,RCX CMP RCX,0x5 JZ 0x001dfd76 MOVSD XMM4,qword ptr [RDI + -0x8] MOVSD XMM5,qword ptr [RDI] MOVAPS XMM6,XMM4 SHUFPS XMM6,XMM4,0x55 MULSS XMM6,XMM1 MULSS XMM4,XMM0 ADDSS XMM4,XMM6 MOVAPS XMM6,XMM5 MULSS XMM6,XMM2 ADDSS XMM6,XMM4 SHUFPS XMM5,XMM5,0x55 ADDSS XMM5,XMM6 ADD RDI,0x10 LEA RCX,[RAX + 0x1] UCOMISS XMM3,XMM5 JC 0x001dfd31 LAB_001dfd76: CMP RAX,0x5 SETNC AL POP RBP RET LAB_001dfd7f: XOR EAX,EAX RET
int8 r3d_frustum_is_point_in_xyz(float param_1,float param_2,float param_3,int8 *param_4) { int8 *puVar1; int8 uVar2; ulong uVar3; ulong uVar4; if ((float)((ulong)param_4[1] >> 0x20) + (float)param_4[1] * param_3 + (float)*param_4 * param_1 + (float)((ulong)*param_4 >> 0x20) * param_2 <= 0.0) { return 0; } param_4 = param_4 + 3; uVar3 = 0; do { uVar4 = uVar3; if (uVar4 == 5) break; puVar1 = param_4 + -1; uVar2 = *param_4; param_4 = param_4 + 2; uVar3 = uVar4 + 1; } while (0.0 < (float)((ulong)uVar2 >> 0x20) + (float)uVar2 * param_3 + (float)*puVar1 * param_1 + (float)((ulong)*puVar1 >> 0x20) * param_2); return CONCAT71((int7)(uVar4 >> 8),4 < uVar4); }
23,598
inline_mysql_file_fstat
eloqsql/include/mysql/psi/mysql_file.h
static inline int inline_mysql_file_fstat( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif int filenr, MY_STAT *stat_area, myf flags) { int result; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, filenr, PSI_FILE_FSTAT); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); result= my_fstat(filenr, stat_area, flags); PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); return result; } #endif result= my_fstat(filenr, stat_area, flags); return result; }
O0
c
inline_mysql_file_fstat: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) leaq 0x20bef4(%rip), %rax # 0x246648 movq (%rax), %rax movq 0x158(%rax), %rax movl -0x18(%rbp), %esi leaq -0x80(%rbp), %rdi movl $0xc, %edx callq *%rax movq %rax, -0x38(%rbp) cmpq $0x0, -0x38(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x3a7e6 leaq 0x20beb1(%rip), %rax # 0x246648 movq (%rax), %rax movq 0x210(%rax), %rax movq -0x38(%rbp), %rdi movq -0x10(%rbp), %rdx movl -0x14(%rbp), %ecx xorl %esi, %esi callq *%rax movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0x8a5d0 movl %eax, -0x2c(%rbp) leaq 0x20be7e(%rip), %rax # 0x246648 movq (%rax), %rax movq 0x218(%rax), %rax movq -0x38(%rbp), %rdi xorl %ecx, %ecx movl %ecx, %esi callq *%rax movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x3a7ff movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0x8a5d0 movl %eax, -0x2c(%rbp) movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x80, %rsp popq %rbp retq nopl (%rax,%rax)
inline_mysql_file_fstat: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_20], rcx mov [rbp+var_28], r8 lea rax, PSI_server mov rax, [rax] mov rax, [rax+158h] mov esi, [rbp+var_18] lea rdi, [rbp+var_80] mov edx, 0Ch call rax mov [rbp+var_38], rax cmp [rbp+var_38], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_3A7E6 lea rax, PSI_server mov rax, [rax] mov rax, [rax+210h] mov rdi, [rbp+var_38] mov rdx, [rbp+var_10] mov ecx, [rbp+var_14] xor esi, esi call rax mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] call my_fstat mov [rbp+var_2C], eax lea rax, PSI_server mov rax, [rax] mov rax, [rax+218h] mov rdi, [rbp+var_38] xor ecx, ecx mov esi, ecx call rax mov eax, [rbp+var_2C] mov [rbp+var_4], eax jmp short loc_3A7FF loc_3A7E6: mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] call my_fstat mov [rbp+var_2C], eax mov eax, [rbp+var_2C] mov [rbp+var_4], eax loc_3A7FF: mov eax, [rbp+var_4] add rsp, 80h pop rbp retn
long long inline_mysql_file_fstat(long long a1, unsigned int a2, unsigned int a3, long long a4, long long a5) { _BYTE v6[72]; // [rsp+0h] [rbp-80h] BYREF long long v7; // [rsp+48h] [rbp-38h] unsigned int v8; // [rsp+54h] [rbp-2Ch] long long v9; // [rsp+58h] [rbp-28h] long long v10; // [rsp+60h] [rbp-20h] unsigned int v11; // [rsp+68h] [rbp-18h] unsigned int v12; // [rsp+6Ch] [rbp-14h] long long v13; // [rsp+70h] [rbp-10h] v13 = a1; v12 = a2; v11 = a3; v10 = a4; v9 = a5; v7 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server + 43))(v6, a3, 12LL); if ( v7 ) { (*((void ( **)(long long, _QWORD, long long, _QWORD))PSI_server + 66))(v7, 0LL, v13, v12); v8 = my_fstat(v11, v10, v9); (*((void ( **)(long long, _QWORD))PSI_server + 67))(v7, 0LL); } else { return (unsigned int)my_fstat(v11, v10, v9); } return v8; }
inline_mysql_file_fstat: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 LEA RAX,[0x346648] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x158] MOV ESI,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x80] MOV EDX,0xc CALL RAX MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x38],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x0013a7e6 LEA RAX,[0x346648] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x210] MOV RDI,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] XOR ESI,ESI CALL RAX MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] CALL 0x0018a5d0 MOV dword ptr [RBP + -0x2c],EAX LEA RAX,[0x346648] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RDI,qword ptr [RBP + -0x38] XOR ECX,ECX MOV ESI,ECX CALL RAX MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x4],EAX JMP 0x0013a7ff LAB_0013a7e6: MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] CALL 0x0018a5d0 MOV dword ptr [RBP + -0x2c],EAX MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x4],EAX LAB_0013a7ff: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x80 POP RBP RET
int4 inline_mysql_file_fstat (int8 param_1,int4 param_2,int4 param_3,int8 param_4, int8 param_5) { int1 local_88 [72]; long local_40; int4 local_34; int8 local_30; int8 local_28; int4 local_20; int4 local_1c; int8 local_18; int4 local_c; local_30 = param_5; local_28 = param_4; local_20 = param_3; local_1c = param_2; local_18 = param_1; local_40 = (**(code **)(PSI_server + 0x158))(local_88,param_3,0xc); if (local_40 == 0) { local_c = my_fstat(local_20,local_28,local_30); } else { (**(code **)(PSI_server + 0x210))(local_40,0,local_18,local_1c); local_34 = my_fstat(local_20,local_28,local_30); (**(code **)(PSI_server + 0x218))(local_40,0); local_c = local_34; } return local_c; }
23,599
std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::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>>::handle_value<bool&>(bool&, bool)
llama.cpp/common/json.hpp
std::pair<bool, BasicJsonType*> handle_value(Value&& v, const bool skip_callback = false) { JSON_ASSERT(!keep_stack.empty()); // do not handle this value if we know it would be added to a discarded // container if (!keep_stack.back()) { return {false, nullptr}; } // create value auto value = BasicJsonType(std::forward<Value>(v)); // check callback const bool keep = skip_callback || callback(static_cast<int>(ref_stack.size()), parse_event_t::value, value); // do not handle this value if we just learnt it shall be discarded if (!keep) { return {false, nullptr}; } if (ref_stack.empty()) { root = std::move(value); return {true, & root}; } // skip this value if we already decided to skip the parent // (https://github.com/nlohmann/json/issues/971#issuecomment-413678360) if (!ref_stack.back()) { return {false, nullptr}; } // we now only expect arrays and objects JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object()); // array if (ref_stack.back()->is_array()) { ref_stack.back()->m_data.m_value.array->emplace_back(std::move(value)); return {true, & (ref_stack.back()->m_data.m_value.array->back())}; } // object JSON_ASSERT(ref_stack.back()->is_object()); // check if we should store an element for the current key JSON_ASSERT(!key_keep_stack.empty()); const bool store_element = key_keep_stack.back(); key_keep_stack.pop_back(); if (!store_element) { return {false, nullptr}; } JSON_ASSERT(object_element); *object_element = std::move(value); return {true, object_element}; }
O3
cpp
std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::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>>::handle_value<bool&>(bool&, bool): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movl %edx, %ebp movq %rdi, %rbx movq 0x30(%rdi), %rax movl 0x38(%rdi), %ecx cmpq %rax, 0x20(%rdi) sete %dl testl %ecx, %ecx sete %dil andb %dl, %dil cmpb $0x1, %dil je 0x8bf88 movl %ecx, %ecx movabsq $-0x8000000000000000, %r15 # imm = 0x8000000000000000 leaq -0x1(%rcx), %rdx addq $0x3e, %rcx testq %rdx, %rdx cmovnsq %rdx, %rcx sarq $0x6, %rcx leaq (%rax,%rcx,8), %rax leaq 0x3f(%r15), %rcx andq %rdx, %rcx xorl %edi, %edi cmpq %r15, %rcx setbe %dil movq -0x8(%rax,%rdi,8), %rax btq %rdx, %rax jae 0x8be1b xorps %xmm0, %xmm0 leaq 0x10(%rsp), %r14 movaps %xmm0, (%r14) movq (%rsi), %rsi movq %r14, %rdi callq 0x8c022 movq %r14, %rdi movl $0x1, %esi callq 0x84be0 testb %bpl, %bpl jne 0x8bdc8 movq 0x10(%rbx), %rax subq 0x8(%rbx), %rax shrq $0x3, %rax movl %eax, 0xc(%rsp) movb $0x5, 0xb(%rsp) cmpq $0x0, 0x90(%rbx) je 0x8bfa9 leaq 0x80(%rbx), %rdi leaq 0xc(%rsp), %rsi leaq 0xb(%rsp), %rdx leaq 0x10(%rsp), %rcx callq *0x98(%rbx) testb %al, %al je 0x8bf5c movq 0x10(%rbx), %rax cmpq %rax, 0x8(%rbx) je 0x8be25 movq -0x8(%rax), %rax testq %rax, %rax je 0x8bf5c movzbl (%rax), %ecx cmpl $0x1, %ecx je 0x8be7f cmpl $0x2, %ecx jne 0x8bfae movq 0x8(%rax), %rdi leaq 0x10(%rsp), %rsi callq 0x889f6 movq 0x10(%rbx), %rax movq -0x8(%rax), %rax movq 0x8(%rax), %rax movq 0x8(%rax), %r14 addq $-0x10, %r14 jmp 0x8bf58 xorl %ebx, %ebx xorl %r14d, %r14d jmp 0x8bf78 leaq 0x10(%rsp), %r14 movaps (%r14), %xmm0 leaq 0x30(%rsp), %r15 movaps %xmm0, (%r15) movq %r14, %rdi xorl %esi, %esi callq 0x84be0 movb $0x0, (%r14) movq $0x0, 0x8(%r14) movq %r15, %rdi movl $0x1, %esi callq 0x84be0 movq (%rbx), %rdi movq %r15, %rsi callq 0x86d4c movq %r15, %rdi xorl %esi, %esi callq 0x84be0 movq %r15, %rdi callq 0x892fa movq (%rbx), %r14 jmp 0x8bf58 movq 0x58(%rbx), %rax movl 0x60(%rbx), %ecx cmpq %rax, 0x48(%rbx) sete %dl testl %ecx, %ecx sete %sil andb %dl, %sil cmpb $0x1, %sil je 0x8bfbc movl %ecx, %esi leaq -0x1(%rsi), %rcx movq %rsi, %rdx addq $0x3e, %rdx testq %rcx, %rcx cmovnsq %rcx, %rdx sarq $0x6, %rdx leaq (%rax,%rdx,8), %rdi leaq 0x3f(%r15), %rdx andq %rcx, %rdx xorl %r8d, %r8d cmpq %r15, %rdx setbe %r8b movl $0x1, %edx shlq %cl, %rdx andq -0x8(%rdi,%r8,8), %rdx subl $0x1, %esi movl %esi, 0x60(%rbx) jae 0x8bef1 movl $0x3f, 0x60(%rbx) addq $-0x8, %rax movq %rax, 0x58(%rbx) testq %rdx, %rdx je 0x8bf5c cmpq $0x0, 0x70(%rbx) je 0x8bfdd leaq 0x10(%rsp), %r14 movaps (%r14), %xmm0 leaq 0x20(%rsp), %r15 movaps %xmm0, (%r15) movq %r14, %rdi xorl %esi, %esi callq 0x84be0 movb $0x0, (%r14) movq $0x0, 0x8(%r14) movq %r15, %rdi movl $0x1, %esi callq 0x84be0 movq 0x70(%rbx), %rdi movq %r15, %rsi callq 0x86d4c movq %r15, %rdi xorl %esi, %esi callq 0x84be0 movq %r15, %rdi callq 0x892fa movq 0x70(%rbx), %r14 movb $0x1, %bl jmp 0x8bf61 xorl %ebx, %ebx xorl %r14d, %r14d leaq 0x10(%rsp), %r15 movq %r15, %rdi xorl %esi, %esi callq 0x84be0 movq %r15, %rdi callq 0x892fa movl %ebx, %eax movq %r14, %rdx addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x8def9(%rip), %rdi # 0x119e88 leaq 0x8df2d(%rip), %rdx # 0x119ec3 leaq 0x8ee58(%rip), %rcx # 0x11adf5 movl $0x1c28, %esi # imm = 0x1C28 xorl %eax, %eax callq 0x20e70 callq 0x212c0 leaq 0x8ee54(%rip), %rcx # 0x11ae09 movl $0x1c4b, %esi # imm = 0x1C4B jmp 0x8bfc8 leaq 0x8ee84(%rip), %rcx # 0x11ae47 movl $0x1c57, %esi # imm = 0x1C57 leaq 0x8deb9(%rip), %rdi # 0x119e88 leaq 0x8deed(%rip), %rdx # 0x119ec3 xorl %eax, %eax callq 0x20e70 leaq 0x8dea4(%rip), %rdi # 0x119e88 leaq 0x8ded8(%rip), %rdx # 0x119ec3 leaq 0x8ee6d(%rip), %rcx # 0x11ae5f movl $0x1c60, %esi # imm = 0x1C60 xorl %eax, %eax callq 0x20e70 jmp 0x8c000 movq %rax, %rbx leaq 0x10(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x84be0 movq %r14, %rdi callq 0x892fa movq %rbx, %rdi callq 0x20b00
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueIRmEESt4pairIbPSF_EOT_b: push rbp push r15 push r14 push rbx sub rsp, 48h mov ebp, edx mov rbx, rdi mov rax, [rdi+30h] mov ecx, [rdi+38h] cmp [rdi+20h], rax setz dl test ecx, ecx setz dil and dil, dl cmp dil, 1 jz loc_8BF88 mov ecx, ecx mov r15, 8000000000000000h lea rdx, [rcx-1] add rcx, 3Eh ; '>' test rdx, rdx cmovns rcx, rdx sar rcx, 6 lea rax, [rax+rcx*8] lea rcx, [r15+3Fh] and rcx, rdx xor edi, edi cmp rcx, r15 setbe dil mov rax, [rax+rdi*8-8] bt rax, rdx jnb loc_8BE1B xorps xmm0, xmm0 lea r14, [rsp+68h+var_58] movaps xmmword ptr [r14], xmm0 mov rsi, [rsi] mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE6EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_17number_unsigned_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::number_unsigned_t) 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) test bpl, bpl jnz short loc_8BDC8 mov rax, [rbx+10h] sub rax, [rbx+8] shr rax, 3 mov [rsp+68h+var_5C], eax mov [rsp+68h+var_5D], 5 cmp qword ptr [rbx+90h], 0 jz loc_8BFA9 lea rdi, [rbx+80h] lea rsi, [rsp+68h+var_5C] lea rdx, [rsp+68h+var_5D] lea rcx, [rsp+68h+var_58] call qword ptr [rbx+98h] test al, al jz loc_8BF5C loc_8BDC8: mov rax, [rbx+10h] cmp [rbx+8], rax jz short loc_8BE25 mov rax, [rax-8] test rax, rax jz loc_8BF5C movzx ecx, byte ptr [rax] cmp ecx, 1 jz loc_8BE7F cmp ecx, 2 jnz loc_8BFAE mov rdi, [rax+8] lea rsi, [rsp+68h+var_58] call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&) mov rax, [rbx+10h] mov rax, [rax-8] mov rax, [rax+8] mov r14, [rax+8] add r14, 0FFFFFFFFFFFFFFF0h jmp loc_8BF58 loc_8BE1B: xor ebx, ebx xor r14d, r14d jmp loc_8BF78 loc_8BE25: lea r14, [rsp+68h+var_58] movaps xmm0, xmmword ptr [r14] lea r15, [rsp+68h+var_38] movaps xmmword ptr [r15], xmm0 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 byte ptr [r14], 0 mov qword ptr [r14+8], 0 mov rdi, r15 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, [rbx] mov rsi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>) mov rdi, r15 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov r14, [rbx] jmp loc_8BF58 loc_8BE7F: mov rax, [rbx+58h] mov ecx, [rbx+60h] cmp [rbx+48h], rax setz dl test ecx, ecx setz sil and sil, dl cmp sil, 1 jz loc_8BFBC mov esi, ecx lea rcx, [rsi-1] mov rdx, rsi add rdx, 3Eh ; '>' test rcx, rcx cmovns rdx, rcx sar rdx, 6 lea rdi, [rax+rdx*8] lea rdx, [r15+3Fh] and rdx, rcx xor r8d, r8d cmp rdx, r15 setbe r8b mov edx, 1 shl rdx, cl and rdx, [rdi+r8*8-8] sub esi, 1 mov [rbx+60h], esi jnb short loc_8BEF1 mov dword ptr [rbx+60h], 3Fh ; '?' add rax, 0FFFFFFFFFFFFFFF8h mov [rbx+58h], rax loc_8BEF1: test rdx, rdx jz short loc_8BF5C cmp qword ptr [rbx+70h], 0 jz loc_8BFDD lea r14, [rsp+68h+var_58] movaps xmm0, xmmword ptr [r14] lea r15, [rsp+68h+var_48] movaps xmmword ptr [r15], xmm0 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 byte ptr [r14], 0 mov qword ptr [r14+8], 0 mov rdi, r15 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, [rbx+70h] mov rsi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>) mov rdi, r15 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov r14, [rbx+70h] loc_8BF58: mov bl, 1 jmp short loc_8BF61 loc_8BF5C: xor ebx, ebx xor r14d, r14d loc_8BF61: lea r15, [rsp+68h+var_58] mov rdi, r15 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() loc_8BF78: mov eax, ebx mov rdx, r14 add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn loc_8BF88: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKeepStackEmpty; "!keep_stack.empty()" mov esi, 1C28h xor eax, eax call _ggml_abort loc_8BFA9: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) loc_8BFAE: lea rcx, aRefStackBackIs; "ref_stack.back()->is_array() || ref_sta"... mov esi, 1C4Bh jmp short loc_8BFC8 loc_8BFBC: lea rcx, aKeyKeepStackEm; "!key_keep_stack.empty()" mov esi, 1C57h loc_8BFC8: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" xor eax, eax call _ggml_abort loc_8BFDD: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aObjectElement; "object_element" mov esi, 1C60h xor eax, eax call _ggml_abort jmp short $+2 loc_8C000: mov rbx, rax lea r14, [rsp+68h+var_58] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, rbx call __Unwind_Resume
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>>::handle_value<unsigned long &>( long long a1, _QWORD *a2, char a3) { unsigned int v4; // ebx long long v5; // rax unsigned int v6; // ecx signed long long v7; // rdx long long v8; // rcx long long v9; // rax long long v10; // rax unsigned __int8 *v11; // rax int v12; // ecx long long v13; // rax unsigned int v14; // ecx long long v15; // rsi long long v16; // rcx long long v17; // rdx long long v18; // rdx const char *v20; // rcx long long v21; // rsi long long v22; // rax long long v23; // rbx char v24; // [rsp+Bh] [rbp-5Dh] BYREF int v25; // [rsp+Ch] [rbp-5Ch] BYREF __int128 v26; // [rsp+10h] [rbp-58h] BYREF __int128 v27; // [rsp+20h] [rbp-48h] BYREF _OWORD v28[3]; // [rsp+30h] [rbp-38h] BYREF v4 = a1; v5 = *(_QWORD *)(a1 + 48); v6 = *(_DWORD *)(a1 + 56); if ( *(_QWORD *)(a1 + 32) == v5 && v6 == 0 ) { ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 7208LL, "GGML_ASSERT(%s) failed", "!keep_stack.empty()"); goto LABEL_28; } v7 = v6 - 1LL; v8 = v6 + 62LL; if ( v7 >= 0 ) v8 = v7; v9 = *(_QWORD *)(v5 + 8 * (v8 >> 6) + 8LL * ((v7 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8); if ( _bittest64(&v9, v7) ) { v26 = 0LL; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( &v26, *a2); 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 *)&v26); if ( a3 ) { LABEL_8: v10 = *(_QWORD *)(a1 + 16); if ( *(_QWORD *)(a1 + 8) == v10 ) { v28[0] = v26; 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 *)&v26); LOBYTE(v26) = 0; *((_QWORD *)&v26 + 1) = 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 *)v28); 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=( *(_QWORD *)a1, (long long)v28); 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 *)v28); 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(v28); goto LABEL_23; } v11 = *(unsigned __int8 **)(v10 - 8); if ( v11 ) { v12 = *v11; if ( v12 != 1 ) { if ( v12 == 2 ) { std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<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>>( *((_QWORD *)v11 + 1), (long long)&v26); LABEL_23: LOBYTE(v4) = 1; LABEL_25: 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 *)&v26); 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(&v26); return v4; } v20 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()"; v21 = 7243LL; goto LABEL_31; } v13 = *(_QWORD *)(a1 + 88); v14 = *(_DWORD *)(a1 + 96); if ( *(_QWORD *)(a1 + 72) == v13 && v14 == 0 ) { v20 = "!key_keep_stack.empty()"; v21 = 7255LL; LABEL_31: ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", v21, "GGML_ASSERT(%s) failed", v20); goto LABEL_32; } v15 = v14; v16 = v14 - 1LL; v17 = v15 + 62; if ( v16 >= 0 ) v17 = v16; v18 = *(_QWORD *)(v13 + 8 * (v17 >> 6) + 8LL * ((v16 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8) & (1LL << v16); *(_DWORD *)(a1 + 96) = v15 - 1; if ( !(_DWORD)v15 ) { *(_DWORD *)(a1 + 96) = 63; *(_QWORD *)(a1 + 88) = v13 - 8; } if ( v18 ) { if ( *(_QWORD *)(a1 + 112) ) { v27 = v26; 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 *)&v26); LOBYTE(v26) = 0; *((_QWORD *)&v26 + 1) = 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 *)&v27); 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=( *(_QWORD *)(a1 + 112), (long long)&v27); 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 *)&v27); 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(&v27); goto LABEL_23; } LABEL_32: ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 7264LL, "GGML_ASSERT(%s) failed", "object_element"); v23 = v22; 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 *)&v26); 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(&v26); _Unwind_Resume(v23); } } LABEL_24: v4 = 0; goto LABEL_25; } v25 = (*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 3; v24 = 5; if ( *(_QWORD *)(a1 + 144) ) { if ( !(*(unsigned __int8 ( **)(long long, int *, char *, __int128 *))(a1 + 152))( a1 + 128, &v25, &v24, &v26) ) goto LABEL_24; goto LABEL_8; } LABEL_28: std::__throw_bad_function_call(); } return 0; }
handle_value<unsigned_long&>: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV EBP,EDX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x30] MOV ECX,dword ptr [RDI + 0x38] CMP qword ptr [RDI + 0x20],RAX SETZ DL TEST ECX,ECX SETZ DIL AND DIL,DL CMP DIL,0x1 JZ 0x0018bf88 MOV ECX,ECX MOV R15,-0x8000000000000000 LEA RDX,[RCX + -0x1] ADD RCX,0x3e TEST RDX,RDX CMOVNS RCX,RDX SAR RCX,0x6 LEA RAX,[RAX + RCX*0x8] LEA RCX,[R15 + 0x3f] AND RCX,RDX XOR EDI,EDI CMP RCX,R15 SETBE DIL MOV RAX,qword ptr [RAX + RDI*0x8 + -0x8] BT RAX,RDX JNC 0x0018be1b XORPS XMM0,XMM0 LEA R14,[RSP + 0x10] MOVAPS xmmword ptr [R14],XMM0 MOV RSI,qword ptr [RSI] MOV RDI,R14 CALL 0x0018c022 MOV RDI,R14 MOV ESI,0x1 CALL 0x00184be0 TEST BPL,BPL JNZ 0x0018bdc8 MOV RAX,qword ptr [RBX + 0x10] SUB RAX,qword ptr [RBX + 0x8] SHR RAX,0x3 MOV dword ptr [RSP + 0xc],EAX MOV byte ptr [RSP + 0xb],0x5 CMP qword ptr [RBX + 0x90],0x0 JZ 0x0018bfa9 LEA RDI,[RBX + 0x80] LAB_0018bdab: LEA RSI,[RSP + 0xc] LEA RDX,[RSP + 0xb] LEA RCX,[RSP + 0x10] CALL qword ptr [RBX + 0x98] TEST AL,AL JZ 0x0018bf5c LAB_0018bdc8: MOV RAX,qword ptr [RBX + 0x10] CMP qword ptr [RBX + 0x8],RAX JZ 0x0018be25 MOV RAX,qword ptr [RAX + -0x8] TEST RAX,RAX JZ 0x0018bf5c MOVZX ECX,byte ptr [RAX] CMP ECX,0x1 JZ 0x0018be7f CMP ECX,0x2 JNZ 0x0018bfae MOV RDI,qword ptr [RAX + 0x8] LEA RSI,[RSP + 0x10] CALL 0x001889f6 LAB_0018be02: MOV RAX,qword ptr [RBX + 0x10] MOV RAX,qword ptr [RAX + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV R14,qword ptr [RAX + 0x8] ADD R14,-0x10 JMP 0x0018bf58 LAB_0018be1b: XOR EBX,EBX XOR R14D,R14D JMP 0x0018bf78 LAB_0018be25: LEA R14,[RSP + 0x10] MOVAPS XMM0,xmmword ptr [R14] LEA R15,[RSP + 0x30] MOVAPS xmmword ptr [R15],XMM0 MOV RDI,R14 XOR ESI,ESI CALL 0x00184be0 MOV byte ptr [R14],0x0 MOV qword ptr [R14 + 0x8],0x0 MOV RDI,R15 MOV ESI,0x1 CALL 0x00184be0 MOV RDI,qword ptr [RBX] MOV RSI,R15 CALL 0x00186d4c MOV RDI,R15 XOR ESI,ESI CALL 0x00184be0 MOV RDI,R15 CALL 0x001892fa MOV R14,qword ptr [RBX] JMP 0x0018bf58 LAB_0018be7f: MOV RAX,qword ptr [RBX + 0x58] MOV ECX,dword ptr [RBX + 0x60] CMP qword ptr [RBX + 0x48],RAX SETZ DL TEST ECX,ECX SETZ SIL AND SIL,DL CMP SIL,0x1 JZ 0x0018bfbc MOV ESI,ECX LEA RCX,[RSI + -0x1] MOV RDX,RSI ADD RDX,0x3e TEST RCX,RCX CMOVNS RDX,RCX SAR RDX,0x6 LEA RDI,[RAX + RDX*0x8] LEA RDX,[R15 + 0x3f] AND RDX,RCX XOR R8D,R8D CMP RDX,R15 SETBE R8B MOV EDX,0x1 SHL RDX,CL AND RDX,qword ptr [RDI + R8*0x8 + -0x8] SUB ESI,0x1 MOV dword ptr [RBX + 0x60],ESI JNC 0x0018bef1 MOV dword ptr [RBX + 0x60],0x3f ADD RAX,-0x8 MOV qword ptr [RBX + 0x58],RAX LAB_0018bef1: TEST RDX,RDX JZ 0x0018bf5c CMP qword ptr [RBX + 0x70],0x0 JZ 0x0018bfdd LEA R14,[RSP + 0x10] MOVAPS XMM0,xmmword ptr [R14] LEA R15,[RSP + 0x20] MOVAPS xmmword ptr [R15],XMM0 MOV RDI,R14 XOR ESI,ESI CALL 0x00184be0 MOV byte ptr [R14],0x0 MOV qword ptr [R14 + 0x8],0x0 MOV RDI,R15 MOV ESI,0x1 CALL 0x00184be0 MOV RDI,qword ptr [RBX + 0x70] MOV RSI,R15 CALL 0x00186d4c MOV RDI,R15 XOR ESI,ESI CALL 0x00184be0 MOV RDI,R15 CALL 0x001892fa MOV R14,qword ptr [RBX + 0x70] LAB_0018bf58: MOV BL,0x1 JMP 0x0018bf61 LAB_0018bf5c: XOR EBX,EBX XOR R14D,R14D LAB_0018bf61: LEA R15,[RSP + 0x10] MOV RDI,R15 XOR ESI,ESI CALL 0x00184be0 MOV RDI,R15 CALL 0x001892fa LAB_0018bf78: MOV EAX,EBX MOV RDX,R14 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET LAB_0018bf88: LEA RDI,[0x219e88] LEA RDX,[0x219ec3] LEA RCX,[0x21adf5] MOV ESI,0x1c28 XOR EAX,EAX CALL 0x00120e70 LAB_0018bfa9: CALL 0x001212c0 LAB_0018bfae: LEA RCX,[0x21ae09] MOV ESI,0x1c4b JMP 0x0018bfc8 LAB_0018bfbc: LEA RCX,[0x21ae47] MOV ESI,0x1c57 LAB_0018bfc8: LEA RDI,[0x219e88] LEA RDX,[0x219ec3] XOR EAX,EAX CALL 0x00120e70 LAB_0018bfdd: LEA RDI,[0x219e88] LEA RDX,[0x219ec3] LEA RCX,[0x21ae5f] MOV ESI,0x1c60 XOR EAX,EAX CALL 0x00120e70
/* std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>*> nlohmann::json_abi_v3_11_3::detail::json_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> >::handle_value<unsigned long&>(unsigned long&, bool) */ int1 [16] __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>> ::handle_value<unsigned_long&> (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,ulong *param_1,bool param_2) { uint uVar1; char cVar2; ulong uVar3; char *pcVar4; ulong uVar5; int8 uVar6; bool bVar7; long lVar8; int1 auVar9 [16]; int1 local_5d; int4 local_5c; ulong local_58; int8 uStack_50; ulong local_48; int8 uStack_40; ulong local_38; int8 uStack_30; uVar1 = *(uint *)(this + 0x38); if (uVar1 == 0 && *(long *)(this + 0x20) == *(long *)(this + 0x30)) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x1c28, "GGML_ASSERT(%s) failed","!keep_stack.empty()"); } uVar5 = (ulong)uVar1 - 1; uVar3 = (ulong)uVar1 + 0x3e; if (-1 < (long)uVar5) { uVar3 = uVar5; } if ((*(ulong *)(*(long *)(this + 0x30) + ((long)uVar3 >> 6) * 8 + -8 + (ulong)((uVar5 & 0x800000000000003f) < 0x8000000000000001) * 8) >> (uVar5 & 0x3f) & 1) == 0) { uVar5 = 0; lVar8 = 0; goto LAB_0018bf78; } local_58 = 0; uStack_50 = 0; external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>:: construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (&local_58,*param_1); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(&local_58,0)); if (param_2) { LAB_0018bdc8: if (*(long *)(this + 8) == *(long *)(this + 0x10)) { local_38 = local_58; uStack_30 = uStack_50; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(&local_58,0)); local_58 = local_58 & 0xffffffffffffff00; uStack_50 = 0; bVar7 = SUB81((data *)&local_38,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(bVar7); 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> ::operator=(*(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,(data *)&local_38); 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(bVar7); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)&local_38); lVar8 = *(long *)this; } else { pcVar4 = *(char **)(*(long *)(this + 0x10) + -8); if (pcVar4 == (char *)0x0) goto LAB_0018bf5c; if (*pcVar4 == '\x01') { lVar8 = *(long *)(this + 0x58); uVar1 = *(uint *)(this + 0x60); if (uVar1 == 0 && *(long *)(this + 0x48) == lVar8) { pcVar4 = "!key_keep_stack.empty()"; uVar6 = 0x1c57; goto LAB_0018bfc8; } uVar5 = (ulong)uVar1 - 1; uVar3 = (ulong)uVar1 + 0x3e; if (-1 < (long)uVar5) { uVar3 = uVar5; } uVar3 = *(ulong *)(lVar8 + ((long)uVar3 >> 6) * 8 + -8 + (ulong)((uVar5 & 0x800000000000003f) < 0x8000000000000001) * 8); *(uint *)(this + 0x60) = uVar1 - 1; if (uVar1 == 0) { *(int4 *)(this + 0x60) = 0x3f; *(long *)(this + 0x58) = lVar8 + -8; } if ((1L << ((byte)uVar5 & 0x3f) & uVar3) == 0) goto LAB_0018bf5c; if (*(long *)(this + 0x70) == 0) { /* try { // try from 0018bfdd to 0018bffd has its CatchHandler @ 0018bffe */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x1c60, "GGML_ASSERT(%s) failed","object_element"); } local_48 = local_58; uStack_40 = uStack_50; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(&local_58,0)); local_58 = local_58 & 0xffffffffffffff00; uStack_50 = 0; bVar7 = SUB81((data *)&local_48,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(bVar7); 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> ::operator=(*(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 + 0x70),(data *)&local_48); 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(bVar7); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)&local_48); lVar8 = *(long *)(this + 0x70); } else { if (*pcVar4 != '\x02') { pcVar4 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()"; uVar6 = 0x1c4b; LAB_0018bfc8: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",uVar6, "GGML_ASSERT(%s) failed",pcVar4); } std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> :: emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(pcVar4 + 8),(basic_json *)&local_58); lVar8 = *(long *)(*(long *)(*(long *)(*(long *)(this + 0x10) + -8) + 8) + 8) + -0x10; } } uVar5 = CONCAT71((int7)((ulong)this >> 8),1); } else { local_5c = (int4)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3); local_5d = 5; if (*(long *)(this + 0x90) == 0) { /* WARNING: Subroutine does not return */ /* try { // try from 0018bfa9 to 0018bfdc has its CatchHandler @ 0018c000 */ std::__throw_bad_function_call(); } /* try { // try from 0018bdab to 0018be01 has its CatchHandler @ 0018c000 */ cVar2 = (**(code **)(this + 0x98))(this + 0x80,&local_5c,&local_5d,&local_58); if (cVar2 != '\0') goto LAB_0018bdc8; LAB_0018bf5c: uVar5 = 0; lVar8 = 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(SUB81((data *)&local_58,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> ::data::~data((data *)&local_58); LAB_0018bf78: auVar9._0_8_ = uVar5 & 0xffffffff; auVar9._8_8_ = lVar8; return auVar9; }